PageSourceSearch

https://www.newcastleredbulls.com/v3/resources/target/client/versi…/chunks/13519.cee8ab4efd19083493f92b3c.js

js newcastleredbulls.com collected 2026-10-02 06:42:00 UTC 2,831,883 bytes, 219 lines download raw bytes

1(self.rspackChunkrbgemc_rb3=self.rspackChunkrbgemc_rb3||[]).push([[13519],{80909(c,u,d){var p=d(30641);c.exports=d(38329)(p)},5128(c,u,d){var p=d(80909),h=d(64894);c.exports=function(c,u){var d=-1,f=h(c)?Array(c.length):[];return p(c,function(c,p,h){f[++d]=u(c,p,h)}),f}},38329(c,u,d){var p=d(64894);c.exports=function(c,u){return function(d,h){if(null==d)return d;if(!p(d))return c(d,h);for(var f=d.length,m=u?f:-1,g=Object(d);(u?m--:++m<f)&&!1!==h(g[m],m,g););return d}}},85015(c,u,d){var p=d(72552),h=d(56449),f=d(40346);c.exports=function(c){return"string"==typeof c||!h(c)&&f(c)&&"[object String]"==p(c)}},55378(c,u,d){var p=d(34932),h=d(15389),f=d(5128),m=d(56449);c.exports=function(c,u){return(m(c)?p:f)(c,h(u,3))}},45994(c,u,d){"use strict";var p,h,f,m,g=d(50172),v=0,y=[],b=g.fF,S=b.__b,_=b.__r,E=b.diffed,T=b.__c,w=b.unmount,P=b.__;function A(c,u){b.__h&&b.__h(h,c,v||u),v=0;var d=h.__H||(h.__H={__:[],__h:[]});return c>=d.__.length&&d.__.push({}),d.__[c]}function I(c){return v=1,function(c,u){var d=A(p++,2);if(d.t=c,!d.__c&&(d.__=[j(void 0,u),function(c){var u=d.__N?d.__N[0]:d.__[0],p=d.t(u,c);u!==p&&(d.__N=[p,d.__[1]],d.__c.setState({}))}],d.__c=h,!h.__f)){var f=function(c,u,p){if(!d.__c.__H)return!0;var h=d.__c.__H.__.filter(function(c){return!!c.__c});if(h.every(function(c){return!c.__N}))return!m||m.call(this,c,u,p);var f=d.__c.props!==c;return h.forEach(function(c){if(c.__N){var u=c.__[0];c.__=c.__N,c.__N=void 0,u!==c.__[0]&&(f=!0)}}),m&&m.call(this,c,u,p)||f};h.__f=!0;var m=h.shouldComponentUpdate,g=h.componentWillUpdate;h.componentWillUpdate=function(c,u,d){if(this.__e){var p=m;m=void 0,f(c,u,d),m=p}g&&g.call(this,c,u,d)},h.shouldComponentUpdate=f}return d.__N||d.__}(j,c)}function M(c,u){var d=A(p++,3);!b.__s&&B(d.__H,u)&&(d.__=c,d.u=u,h.__H.__h.push(d))}function R(c,u){var d=A(p++,4);!b.__s&&B(d.__H,u)&&(d.__=c,d.u=u,h.__h.push(d))}function k(c){return v=5,x(function(){return{current:c}},[])}function x(c,u){var d=A(p++,7);return B(d.__H,u)&&(d.__=c(),d.__H=u,d.__h=c),d.__}function C(c,u){return v=8,x(function(){return c},u)}function O(c){var u=h.context[c.__c],d=A(p++,9);return d.c=c,u?(null==d.__&&(d.__=!0,u.sub(h)),u.props.value):c.__}function D(){var c=A(p++,11);if(!c.__){for(var u=h.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var d=u.__m||(u.__m=[0,0]);c.__="P"+d[0]+"-"+d[1]++}return c.__}function L(){for(var c;c=y.shift();)if(c.__P&&c.__H)try{c.__H.__h.forEach(U),c.__H.__h.forEach(F),c.__H.__h=[]}catch(u){c.__H.__h=[],b.__e(u,c.__v)}}b.__b=function(c){h=null,S&&S(c)},b.__=function(c,u){c&&u.__k&&u.__k.__m&&(c.__m=u.__k.__m),P&&P(c,u)},b.__r=function(c){_&&_(c),p=0;var u=(h=c.__c).__H;u&&(f===h?(u.__h=[],h.__h=[],u.__.forEach(function(c){c.__N&&(c.__=c.__N),c.u=c.__N=void 0})):(u.__h.forEach(U),u.__h.forEach(F),u.__h=[],p=0)),f=h},b.diffed=function(c){E&&E(c);var u=c.__c;u&&u.__H&&(u.__H.__h.length&&(1!==y.push(u)&&m===b.requestAnimationFrame||((m=b.requestAnimationFrame)||function(c){var u,d=function(){clearTimeout(p),N&&cancelAnimationFrame(u),setTimeout(c)},p=setTimeout(d,100);N&&(u=requestAnimationFrame(d))})(L)),u.__H.__.forEach(function(c){c.u&&(c.__H=c.u),c.u=void 0})),f=h=null},b.__c=function(c,u){u.some(function(c){try{c.__h.forEach(U),c.__h=c.__h.filter(function(c){return!c.__||F(c)})}catch(d){u.some(function(c){c.__h&&(c.__h=[])}),u=[],b.__e(d,c.__v)}}),T&&T(c,u)},b.unmount=function(c){w&&w(c);var u,d=c.__c;d&&d.__H&&(d.__H.__.forEach(function(c){try{U(c)}catch(c){u=c}}),d.__H=void 0,u&&b.__e(u,d.__v))};var N="function"==typeof requestAnimationFrame;function U(c){var u=h,d=c.__c;"function"==typeof d&&(c.__c=void 0,d()),h=u}function F(c){var u=h;c.__c=c.__(),h=u}function B(c,u){return!c||c.length!==u.length||u.some(function(u,d){return u!==c[d]})}function j(c,u){return"function"==typeof u?u(c):u}d.d(u,{Bi:()=>D,J0:()=>I,Kr:()=>x,NT:()=>O,Nf:()=>R,hb:()=>C,li:()=>k,vJ:()=>M})},10201(c,u,d){"use strict";var p=d(50172),h=0;function f(c,u,d,f,m,g){u||(u={});var v,y,b=u;if("ref"in b)for(y in b={},u)"ref"==y?v=u[y]:b[y]=u[y];var S={type:c,props:b,key:d,ref:v,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--h,__i:-1,__u:0,__source:m,__self:g};if("function"==typeof c&&(v=c.defaultProps))for(y in v)void 0===b[y]&&(b[y]=v[y]);return p.fF.vnode&&p.fF.vnode(S),S}d.d(u,{FD:()=>f,FK:()=>p.FK,Y:()=>f})},46942(c){!function(){"use strict";var u={}.hasOwnProperty;function d(){for(var c="",h=0;h<arguments.length;h++){var f=arguments[h];f&&(c=p(c,function(c){if("string"==typeof c||"number"==typeof c)return c;if("object"!=typeof c)return"";if(Array.isArray(c))return d.apply(null,c);if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]"))return c.toString();var h="";for(var f in c)u.call(c,f)&&c[f]&&(h=p(h,f));return h}(f)))}return c}function p(c,u){return u?c?c+" "+u:c+u:c}c.exports?(d.default=d,c.exports=d):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],function(){return d}):window.classNames=d}()},32781(__unused_rspack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";let getRandomValues,t$1,d$1,audioContext,chimeBufferPromise,chimeBufferUrl;__webpack_require__.r(__webpack_exports__);var n$5,l$c,u$6,t$6,o$j,r$m,f$7,e$4,Yh=Object.defineProperty,Xh=(c,u,d)=>u in c?Yh(c,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):c[u]=d,yi=(c,u,d)=>Xh(c,"symbol"!=typeof u?u+"":u,d),c$e={},s$6=[],a$f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,v$4=Array.isArray;function h$4(c,u){for(var d in u)c[d]=u[d];return c}function p$9(c){var u=c.parentNode;u&&u.removeChild(c)}function y$4(c,u,d){var p,h,f,m={};for(f in u)"key"==f?p=u[f]:"ref"==f?h=u[f]:m[f]=u[f];if(arguments.length>2&&(m.children=arguments.length>3?n$5.call(arguments,2):d),"function"==typeof c&&null!=c.defaultProps)for(f in c.defaultProps)void 0===m[f]&&(m[f]=c.defaultProps[f]);return d$6(c,m,p,h,null)}function d$6(c,u,d,p,h){var f={type:c,props:u,key:d,ref:p,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:h??++u$6};return null==h&&null!=l$c.vnode&&l$c.vnode(f),f}function _$5(){return{current:null}}function k$5(c){return c.children}function b$5(c,u){this.props=c,this.context=u}function g$7(c,u){if(null==u)return c.__?g$7(c.__,c.__.__k.indexOf(c)+1):null;for(var d;u<c.__k.length;
vendor: 7,632 bytes, line 1
1u++)if(null!=(d=c.__k[u])&&null!=d.__e)return d.__e;return"function"==typeof c.type?g$7(c):null}function m$7(c){var u,d;if(null!=(c=c.__)&&null!=c.__c){for(c.__e=c.__c.base=null,u=0;u<c.__k.length;u++)if(null!=(d=c.__k[u])&&null!=d.__e){c.__e=c.__c.base=d.__e;break}return m$7(c)}}function w$6(c){(!c.__d&&(c.__d=!0)&&t$6.push(c)&&!x$6.__r++||o$j!==l$c.debounceRendering)&&((o$j=l$c.debounceRendering)||r$m)(x$6)}function x$6(){var c,u,d,p,h,f,m,g;for(t$6.sort(f$7);c=t$6.shift();)c.__d&&(u=t$6.length,p=void 0,h=void 0,m=(f=(d=c).__v).__e,(g=d.__P)&&(p=[],(h=h$4({},f)).__v=f.__v+1,L$4(g,f,h,d.__n,void 0!==g.ownerSVGElement,null!=f.__h?[m]:null,p,m??g$7(f),f.__h),M$3(p,f),f.__e!=m&&m$7(f)),t$6.length>u&&t$6.sort(f$7));x$6.__r=0}function P$3(c,u,d,p,h,f,m,g,v,y){var b,S,_,E,T,w,P,A=p&&p.__k||s$6,I=A.length;for(d.__k=[],b=0;b<u.length;b++)if(null!=(E=d.__k[b]=null==(E=u[b])||"boolean"==typeof E||"function"==typeof E?null:"string"==typeof E||"number"==typeof E||"bigint"==typeof E?d$6(null,E,null,null,E):v$4(E)?d$6(k$5,{children:E},null,null,null):E.__b>0?d$6(E.type,E.props,E.key,E.ref?E.ref:null,E.__v):E)){if(E.__=d,E.__b=d.__b+1,null===(_=A[b])||_&&E.key==_.key&&E.type===_.type)A[b]=void 0;else for(S=0;S<I;S++){if((_=A[S])&&E.key==_.key&&E.type===_.type){A[S]=void 0;break}_=null}L$4(c,E,_=_||c$e,h,f,m,g,v,y),T=E.__e,(S=E.ref)&&_.ref!=S&&(P||(P=[]),_.ref&&P.push(_.ref,null,E),P.push(S,E.__c||T,E)),null!=T?(null==w&&(w=T),"function"==typeof E.type&&E.__k===_.__k?E.__d=v=C$4(E,v,c):v=$$3(c,E,_,A,T,v),"function"==typeof d.type&&(d.__d=v)):v&&_.__e==v&&v.parentNode!=c&&(v=g$7(_))}for(d.__e=w,b=I;b--;)null!=A[b]&&("function"==typeof d.type&&null!=A[b].__e&&A[b].__e==d.__d&&(d.__d=A$4(p).nextSibling),q$3(A[b],A[b]));if(P)for(b=0;b<P.length;b++)O$3(P[b],P[++b],P[++b])}function C$4(c,u,d){for(var p,h=c.__k,f=0;h&&f<h.length;f++)(p=h[f])&&(p.__=c,u="function"==typeof p.type?C$4(p,u,d):$$3(d,p,p,h,p.__e,u));return u}function S$3(c,u){return u=u||[],null==c||"boolean"==typeof c||(v$4(c)?c.some(function(c){S$3(c,u)}):u.push(c)),u}function $$3(c,u,d,p,h,f){var m,g,v;if(void 0!==u.__d)m=u.__d,u.__d=void 0;else if(null==d||h!=f||null==h.parentNode)e:if(null==f||f.parentNode!==c)c.appendChild(h),m=null;else{for(g=f,v=0;(g=g.nextSibling)&&v<p.length;v+=1)if(g==h)break e;c.insertBefore(h,f),m=f}return void 0!==m?m:h.nextSibling}function A$4(c){var u,d,p;if(null==c.type||"string"==typeof c.type)return c.__e;if(c.__k){for(u=c.__k.length-1;u>=0;u--)if((d=c.__k[u])&&(p=A$4(d)))return p}return null}function H$4(c,u,d,p,h){var f;for(f in d)"children"===f||"key"===f||f in u||T$5(c,f,null,d[f],p);for(f in u)h&&"function"!=typeof u[f]||"children"===f||"key"===f||"value"===f||"checked"===f||d[f]===u[f]||T$5(c,f,u[f],d[f],p)}function I$4(c,u,d){"-"===u[0]?c.setProperty(u,d??""):c[u]=null==d?"":"number"!=typeof d||a$f.test(u)?d:d+"px"}function T$5(c,u,d,p,h){var f;e:if("style"===u)if("string"==typeof d)c.style.cssText=d;else{if("string"==typeof p&&(c.style.cssText=p=""),p)for(u in p)d&&u in d||I$4(c.style,u,"");if(d)for(u in d)p&&d[u]===p[u]||I$4(c.style,u,d[u])}else if("o"===u[0]&&"n"===u[1])f=u!==(u=u.replace(/Capture$/,"")),u=u.toLowerCase()in c?u.toLowerCase().slice(2):u.slice(2),c.l||(c.l={}),c.l[u+f]=d,d?p||c.addEventListener(u,f?z$5:j$4,f):c.removeEventListener(u,f?z$5:j$4,f);else if("dangerouslySetInnerHTML"!==u){if(h)u=u.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==u&&"height"!==u&&"href"!==u&&"list"!==u&&"form"!==u&&"tabIndex"!==u&&"download"!==u&&"rowSpan"!==u&&"colSpan"!==u&&u in c)try{c[u]=d??"";break e}catch{}"function"==typeof d||(null==d||!1===d&&"-"!==u[4]?c.removeAttribute(u):c.setAttribute(u,d))}}function j$4(c){return this.l[c.type+!1](l$c.event?l$c.event(c):c)}function z$5(c){return this.l[c.type+!0](l$c.event?l$c.event(c):c)}function L$4(c,u,d,p,h,f,m,g,v){var y,b,S,_,E,T,w,P,A,I,M,R,k,x,C,O=u.type;if(void 0!==u.constructor)return null;null!=d.__h&&(v=d.__h,g=u.__e=d.__e,u.__h=null,f=[g]),(y=l$c.__b)&&y(u);try{e:if("function"==typeof O){if(P=u.props,A=(y=O.contextType)&&p[y.__c],I=y?A?A.props.value:y.__:p,d.__c?w=(b=u.__c=d.__c).__=b.__E:("prototype"in O&&O.prototype.render?u.__c=b=new O(P,I):(u.__c=b=new b$5(P,I),b.constructor=O,b.render=B$5),A&&A.sub(b),b.props=P,b.state||(b.state={}),b.context=I,b.__n=p,S=b.__d=!0,b.__h=[],b._sb=[]),null==b.__s&&(b.__s=b.state),null!=O.getDerivedStateFromProps&&(b.__s==b.state&&(b.__s=h$4({},b.__s)),h$4(b.__s,O.getDerivedStateFromProps(P,b.__s))),_=b.props,E=b.state,b.__v=u,S)null==O.getDerivedStateFromProps&&null!=b.componentWillMount&&b.componentWillMount(),null!=b.componentDidMount&&b.__h.push(b.componentDidMount);else{if(null==O.getDerivedStateFromProps&&P!==_&&null!=b.componentWillReceiveProps&&b.componentWillReceiveProps(P,I),!b.__e&&null!=b.shouldComponentUpdate&&!1===b.shouldComponentUpdate(P,b.__s,I)||u.__v===d.__v){for(u.__v!==d.__v&&(b.props=P,b.state=b.__s,b.__d=!1),b.__e=!1,u.__e=d.__e,u.__k=d.__k,u.__k.forEach(function(c){c&&(c.__=u)}),M=0;M<b._sb.length;M++)b.__h.push(b._sb[M]);b._sb=[],b.__h.length&&m.push(b);break e}null!=b.componentWillUpdate&&b.componentWillUpdate(P,b.__s,I),null!=b.componentDidUpdate&&b.__h.push(function(){b.componentDidUpdate(_,E,T)})}if(b.context=I,b.props=P,b.__P=c,R=l$c.__r,k=0,"prototype"in O&&O.prototype.render){for(b.state=b.__s,b.__d=!1,R&&R(u),y=b.render(b.props,b.state,b.context),x=0;x<b._sb.length;x++)b.__h.push(b._sb[x]);b._sb=[]}else do b.__d=!1,R&&R(u),y=b.render(b.props,b.state,b.context),b.state=b.__s;while(b.__d&&++k<25)b.state=b.__s,null!=b.getChildContext&&(p=h$4(h$4({},p),b.getChildContext())),S||null==b.getSnapshotBeforeUpdate||(T=b.getSnapshotBeforeUpdate(_,E)),P$3(c,v$4(C=null!=y&&y.type===k$5&&null==y.key?y.props.children:y)?C:[C],u,d,p,h,f,m,g,v),b.base=u.__e,u.__h=null,b.__h.length&&m.push(b),w&&(b.__E=b.__=null),b.__e=!1}else null==f&&u.__v===d.__v?(u.__k=d.__k,u.__e=d.__e):u.__e=N$4(d.__e,u,d,p,h,f,m,v);(y=l$c.diffed)&&y(u)}catch(c){u.__v=null,(v||null!=f)&&(u.__e=g,u.__h=!!v,f[f.indexOf(g)]=null),l$c.__e(c,u,d)}}function M$3(c,u){l$c.__c&&l$c.__c(u,c),c.some(function(u){try{c=u.__h,u.__h=[],c.some(function(c){c.call(u)})}catch(c){l$c.__e(c,u.__v)}})}function N$4(c,u,d,p,h,f,m,g){var v,y,b,S=d.props,_=u.props,E=u.type,T=0;if("svg"===E&&(h=!0),null!=f){for(;T<f.length;T++)if((v=f[T])&&"setAttribute"in v==!!E&&(E?v.localName===E:3===v.nodeType)){c=v,f[T]=null;break}}if(null==c){if(null===E)return document.createTextNode(_);c=h?document.createElementNS("http://www.w3.org/2000/svg",E):document.createElement(E,_.is&&_),f=null,g=!1}if(null===E)S===_||g&&c.data===_||(c.data=_);else{if(f=f&&n$5.call(c.childNodes),y=(S=d.props||c$e).dangerouslySetInnerHTML,b=_.dangerouslySetInnerHTML,!g){if(null!=f)for(S={},T=0;T<c.attributes.length;T++)S[c.attributes[T].name]=c.attributes[T].value;(b||y)&&(b&&(y&&b.__html==y.__html||b.__html===c.innerHTML)||(c.innerHTML=b&&b.__html||""))}if(H$4(c,_,S,h,g),b)u.__k=[];else if(P$3(c,v$4(T=u.props.children)?T:[T],u,d,p,h&&"foreignObject"!==E,f,m,f?f[0]:d.__k&&g$7(d,0),g),null!=f)for(T=f.length;T--;)null!=f[T]&&p$9(f[T]);g||("value"in _&&void 0!==(T=_.value)&&(T!==c.value||"progress"===E&&!T||"option"===E&&T!==S.value)&&T$5(c,"value",T,S.value,!1),"checked"in _&&void 0!==(T=_.checked)&&T!==c.checked&&T$5(c,"checked",T,S.checked,!1))}return c}function O$3(c,u,d){try{"function"==typeof c?c(u):c.current=u}catch(c){l$c.__e(c,d)}}function q$3(c,u,d){var p,h;if(l$c.unmount&&l$c.unmount(c),(p=c.ref)&&(p.current&&p.current!==c.__e||O$3(p,null,u)),null!=(p=c.__c)){if(p.componentWillUnmount)try{p.componentWillUnmount()}catch(c){l$c.__e(c,u)}p.base=p.__P=null,c.__c=void 0}
vendor: 2,276 bytes, line 1
1if(p=c.__k)for(h=0;h<p.length;h++)p[h]&&q$3(p[h],u,d||"function"!=typeof c.type);d||null==c.__e||p$9(c.__e),c.__=c.__e=c.__d=void 0}function B$5(c,u,d){return this.constructor(c,d)}function D$4(c,u,d){var p,h,f;l$c.__&&l$c.__(c,u),h=(p="function"==typeof d)?null:d&&d.__k||u.__k,f=[],L$4(u,c=(!p&&d||u).__k=y$4(k$5,null,[c]),h||c$e,c$e,void 0!==u.ownerSVGElement,!p&&d?[d]:h?null:u.firstChild?n$5.call(u.childNodes):null,f,!p&&d?d:h?h.__e:u.firstChild,p),M$3(f,c)}function E$3(c,u){D$4(c,u,E$3)}function F$5(c,u,d){var p,h,f,m,g=h$4({},c.props);for(f in c.type&&c.type.defaultProps&&(m=c.type.defaultProps),u)"key"==f?p=u[f]:"ref"==f?h=u[f]:g[f]=void 0===u[f]&&void 0!==m?m[f]:u[f];return arguments.length>2&&(g.children=arguments.length>3?n$5.call(arguments,2):d),d$6(c.type,g,p||c.key,h||c.ref,null)}function G$1(c,u){var d={__c:u="__cC"+e$4++,__:c,Consumer:function(c,u){return c.children(u)},Provider:function(c){var d,p;return this.getChildContext||(d=[],(p={})[u]=this,this.getChildContext=function(){return p},this.shouldComponentUpdate=function(c){this.props.value!==c.value&&d.some(function(c){c.__e=!0,w$6(c)})},this.sub=function(c){d.push(c);var u=c.componentWillUnmount;c.componentWillUnmount=function(){d.splice(d.indexOf(c),1),u&&u.call(c)}}),c.children}};return d.Provider.__=d.Consumer.contextType=d}function r$l(){return(r$l=Object.assign?Object.assign.bind():function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c}).apply(this,arguments)}n$5=s$6.slice,l$c={__e:function(c,u,d,p){for(var h,f,m;u=u.__;)if((h=u.__c)&&!h.__)try{if((f=h.constructor)&&null!=f.getDerivedStateFromError&&(h.setState(f.getDerivedStateFromError(c)),m=h.__d),null!=h.componentDidCatch&&(h.componentDidCatch(c,p||{}),m=h.__d),m)return h.__E=h}catch(u){c=u}throw c}},u$6=0,b$5.prototype.setState=function(c,u){var d;d=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h$4({},this.state),"function"==typeof c&&(c=c(h$4({},d),this.props)),c&&h$4(d,c),null!=c&&this.__v&&(u&&this._sb.push(u),w$6(this))},b$5.prototype.forceUpdate=function(c){this.__v&&(this.__e=!0,c&&this.__h.push(c),w$6(this))},b$5.prototype.render=k$5,t$6=[],r$m="function"==typeof Promise?Promise.prototype.then.bind(Prom
1ise.resolve()):setTimeout,f$7=function(c,u){return c.__v.__b-u.__v.__b},x$6.__r=0,e$4=0;var i$9=["context","children"];function a$e(c){return this.getChildContext=function(){return c.context},F$5(c.children,function(c,u){if(null==c)return{};var d,p,h={},f=Object.keys(c);for(p=0;p<f.length;p++)u.indexOf(d=f[p])>=0||(h[d]=c[d]);return h}(c,i$9))}function s$5(){var c=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(c),this._vdom=y$4(a$e,r$l({},this._props,{context:c.detail.context}),function c(u,d){if(3===u.nodeType)return u.data;if(1!==u.nodeType)return null;var p=[],h={},f=0,m=u.attributes,g=u.childNodes;for(f=m.length;f--;)"slot"!==m[f].name&&(h[m[f].name]=m[f].value,h[c$d(m[f].name)]=m[f].value);for(f=g.length;f--;){var v=c(g[f],null),y=g[f].slot;y?h[y]=y$4(p$8,{name:y},v):p[f]=v}var b=d?y$4(p$8,null,p):p;return y$4(d||u.nodeName.toLowerCase(),h,b)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?E$3:D$4)(this._vdom,this._root)}function c$d(c){return c.replace(/-(\w)/g,function(c,u){return u?u.toUpperCase():""})}function l$b(c,u,d){if(this._vdom){var p={};p[c]=d=d??void 0,p[c$d(c)]=d,this._vdom=F$5(this._vdom,p),D$4(this._vdom,this._root)}}function u$5(){D$4(this._vdom=null,this._root)}function p$8(c,u){var d=this;return y$4("slot",r$l({},c,{ref:function(c){c?(d.ref=c,d._listener||(d._listener=function(c){c.stopPropagation(),c.detail.context=u},c.addEventListener("_preact",d._listener))):d.ref.removeEventListener("_preact",d._listener)}}))}function register(c,u,d,p){function h(){var u=Reflect.construct(HTMLElement,[],h);return u._vdomComponent=c,u._root=p&&p.shadow?u.attachShadow({mode:p.mode||"open"}):u,u}return(h.prototype=Object.create(HTMLElement.prototype)).constructor=h,h.prototype.connectedCallback=s$5,h.prototype.attributeChangedCallback=l$b,h.prototype.disconnectedCallback=u$5,h.observedAttributes=d=d||c.observedAttributes||Object.keys(c.propTypes||{}),d.forEach(function(c){Object.defineProperty(h.prototype,c,{get:function(){return this._vdom.props[c]},set:function(u){this._vdom?this.attributeChangedCallback(c,null,u):(this._props||(this._props={}),this._props[c]=u,this.connectedCallback());var d=typeof u;null!=u&&"string"!==d&&"boolean"!==d&&"number"!==d||this.setAttribute(c,u)}})}),customElements.define(u||c.tagName||c.displayName||c.name,h)}var _$4=0;function o$i(c,u,d,p,h,f){var m,g,v={};for(g in u)"ref"==g?m=u[g]:v[g]=u[g];var y={type:c,props:v,key:d,ref:m,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--_$4,__source:h,__self:f};if("function"==typeof c&&(m=c.defaultProps))for(g in m)void 0===v[g]&&(v[g]=m[g]);return l$c.vnode&&l$c.vnode(y),y}var commonjsGlobal="u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{};function getDefaultExportFromCjs$1(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var loglevel={exports:{}};!function(c){var u;u=function(){var c=function(){},u="undefined",d=typeof window!==u&&typeof window.navigator!==u&&/Trident\/|MSIE /.test(window.navigator.userAgent),p=["trace","debug","info","warn","error"];function h(c,u){var d=c[u];if("function"==typeof d.bind)return d.bind(c);try{return Function.prototype.bind.call(d,c)}catch{return function(){return Function.prototype.apply.apply(d,[c,arguments])}}}function f(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function m(u,d){for(var h=0;h<p.length;h++){var f=p[h];this[f]=h<u?c:this.methodFactory(f,u,d)}this.log=this.debug}function g(c,d,p){return function(){typeof console!==u&&(m.call(this,d,p),this[c].apply(this,arguments))}}function v(p,m,v){var y;return"debug"===(y=p)&&(y="log"),typeof console!==u&&("trace"===y&&d?f:void 0!==console[y]?h(console,y):void 0!==console.log?h(console,"log"):c)||g.apply(this,arguments)}function y(c,d,h){var f,g=this;d=d??"WARN";var y="loglevel";function b(){var c;if(!(typeof window===u||!y)){try{c=window.localStorage[y]}catch{}if(typeof c===u)try{var d=window.document.cookie,p=d.indexOf(encodeURIComponent(y)+"=");-1!==p&&(c=/^([^;]+)/.exec(d.slice(p))[1])}catch{}return void 0===g.levels[c]&&(c=void 0),c}}"string"==typeof c?y+=":"+c:"symbol"==typeof c&&(y=void 0),g.name=c,g.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},g.methodFactory=h||v,g.getLevel=function(){return f},g.setLevel=function(d,h){if("string"==typeof d&&void 0!==g.levels[d.toUpperCase()]&&(d=g.levels[d.toUpperCase()]),"number"==typeof d&&d>=0&&d<=g.levels.SILENT){if(f=d,!1!==h&&function(c){var d=(p[c]||"silent").toUpperCase();if(!(typeof window===u||!y)){try{window.localStorage[y]=d;return}catch{}try{window.document.cookie=encodeURIComponent(y)+"="+d+";"}catch{}}}(d),m.call(g,d,c),typeof console===u&&d<g.levels.SILENT)return"No console available for logging"}
1else throw"log.setLevel() called with invalid level: "+d},g.setDefaultLevel=function(c){d=c,b()||g.setLevel(c,!1)},g.resetLevel=function(){g.setLevel(d,!1),function(){if(!(typeof window===u||!y)){try{window.localStorage.removeItem(y);return}catch{}try{window.document.cookie=encodeURIComponent(y)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}()},g.enableAll=function(c){g.setLevel(g.levels.TRACE,c)},g.disableAll=function(c){g.setLevel(g.levels.SILENT,c)};var S=b();null==S&&(S=d),g.setLevel(S,!1)}var b=new y,S={};b.getLogger=function(c){if("symbol"!=typeof c&&"string"!=typeof c||""===c)throw TypeError("You must supply a name when creating a logger.");var u=S[c];return u||(u=S[c]=new y(c,b.getLevel(),b.methodFactory)),u};var _=typeof window!==u?window.log:void 0;return b.noConflict=function(){return typeof window!==u&&window.log===b&&(window.log=_),b},b.getLoggers=function(){return S},b.default=b,b},c.exports?c.exports=u():commonjsGlobal.log=u()}(loglevel);var loglevelExports=loglevel.exports;let log$w=getDefaultExportFromCjs$1(loglevelExports),log$v=loglevelExports.getLogger("EventEmitter"),EventEmitter$1=class{constructor(){yi(this,"listeners",[])}addEventListener(c){if(this.listeners.includes(c))throw Error(`Listener ${c} already registered`);this.listeners.push(c)}removeEventListener(c){let u=this.listeners;u.includes(c)?this.listeners=u.filter(u=>u!==c):log$v.warn(`Listener ${c} was not registered`)}fireEvent(c){this.listeners.forEach(u=>{try{u(c)}catch(d){log$v.error("Error invoking listener",u,"for event",c,"error",d)}})}},DEFAULT_FEEDBACK_URL="https://feedback.redbull.com/hc/en-us/requests/new",RBUP_FALLBACK_POSTER_IMAGE="https://player-images.redbull.com/image/upload/{op}/placeholder.jpg",SSDM_SERVER_URL_PRODUCTION="https://api-player.redbull.com",SSDM_SERVER_URL_STAGING="https://api-player-staging.redbull.com";function calculateSsdmUrl(c,u){if(u&&!isNaN(u))return`https://datamanager-pr${u}.eu-central-1.rbup-staging.redbullaws.com`;switch(c){case"PRODUCTION":return SSDM_SERVER_URL_PRODUCTION;case"STAGING":return SSDM_SERVER_URL_STAGING;default:throw Error("unknown server environment")}}loglevelExports.getLogger("fetchUserLocation");class DirectAudioDataloader{async loadData(c){if(!c.mediaSrc)throw Error("invalid configuration, player configuration requires mediaSrc");return{coverArt:c.coverArt,duration:c.duration,episodeNumber:c.episodeNumber,episodePageUrl:c.episodePageUrl,mediaSrc:c.mediaSrc,podcastTitle:c.podcastTitle,podcastShowPageUrl:c.podcastShowPageUrl,publishedAt:c.publishedAt,seasonNumber:c.seasonNumber,space:c.space,title:c.title,waveformPoints:c.waveformPoints,distributions:c.distributions}}}function addLeadingZero(c){return c<0?`${c}`:c<10?`0${c}`:`${c}`}let DATAZOOM_DEVICE_PLATFORM="web",GLOBAL_DATAZOOM_METADATA_FIELDS=new Set(["APP_NAME","APP_VERSION","DEVICE_PLATFORM","PLAYER_VERSION","TVI_CHANNEL_ID"]),DEFAULT_SEEK_SKIP_SECONDS=10,AspectRatios=["16:9","4:5","4:3","2:3","2:1","1:1","9:16"],RBUP_VIDEO_DOM_EVENT_TYPE="rbup-video-core",RBUP_AUDIO_DOM_EVENT_TYPE="rbup-audio-core",publicPlayerEventTypes=["adFinished","adSkipped","beforePlay","loaded","muted","paused","play","playbackFinished","seeking","timeChanged","timeshifting","unmuted","nextUpCancelled","nextUpDisplayed","nextUpTimeout","nextUpTriggered","podcastTitleClick","playerModalClose"],KEYCODE_ARROW_RIGHT="ArrowRight",KEYCODE_ARROW_LEFT="ArrowLeft",KEYCODE_ARROW_DOWN="ArrowDown",KEYCODE_ARROW_UP="ArrowUp",KEYCODE_SPACE=" ",KEYCODE_ESC="Escape",KEYCODE_ENTER="Enter",KEYCODE_TAB="Tab",KEYCODE_B="b",KEYCODE_F="f",KEYCODE_I="i",KEYCODE_K="k",KEYCODE_M="m",KEYCODE_N="n",KEYCODE_P="p",KEYCODE_R="r",KEYCODE_0="0",DEFAULT_NEXT_UP_TIMEOUT_SECS=7,log$u=loglevelExports.getLogger("AspectRatioUtils"),defaultExpectRatio="16:9",aspectRatioRegex=RegExp("^(\\d*):(\\d*)$"),maxWidthForLandscapeAspectRatio="100%",maxWidthForPortraitAspectRatio="400px";function getMaxWidthForAspectRatio(c){switch(c){case"4:5":case"2:3":case"1:1":case"9:16":return maxWidthForPortraitAspectRatio;case"16:9":case"4:3":case"2:1":return maxWidthForLandscapeAspectRatio;default:return log$u.error("unexpected aspect ratio",c),maxWidthForLandscapeAspectRatio}}function validateGivenAspectRatio(c){return c&&aspectRatioRegex.exec(c)&&isAspectRatio(c)?c:defaultExpectRatio}function isAspectRatio(c){return AspectRatios.includes(c)}function transformAspectRatioForCss(c){return c.replace(":","/")}function calcValueOfAspectRatio(c){let[u,d]=c.split(":").map(c=>Number.parseInt(c,10));return u/d}let Breakpoint={small:540,medium:650,large:1e3,xLarge:1200,xxLarge:1350},BREAKPOINTS=[Breakpoint.small,Breakpoint.medium,Breakpoint.large,Breakpoint.xLarge,Breakpoint.xxLarge];function calculateCachingHeaders(c){if(c)return{"cache-control":"max-age=0"}}let imTransformation=c=>`/im:i:${c}/`,imDelimiterTransformation=c=>`/im:i:${c}?`,directTransformation=c=>`/${c}/`,directDelimiterTransformation=c=>`/${c}?`,CLOUDINARY_TRANSFORMATIONS_FULL=[{placeholder:"/im/",transformation:imTransformation},{placeholder:"/{im}/",transformation:imTransformation},{placeholder:"/{im}?",transformation:imDelimiterTransformation},{placeholder:"/{op}/",transformation:directTransformation}],CLOUDINARY_TRANSFORMATIONS_MATURITY_RATING=[{placeholder:"/im/",transformation:imTransformation},{placeholder:"/{im}/",transformation:directTransformation},{placeholder:"/{im}?",transformation:directDelimiterTransformation},{placeholder:"/{op}/",transformation:directTransformation}];function isCloudinaryImage(c,u){return u.some(({placeholder:u})=>c.includes(u))}function applyCloudinaryTransformation(c,u,d){return d.reduce((c,{placeholder:d,transformation:p})=>c.replace(d,p(u)),c)}function generateCloudinaryImageSrcSet(c,u){var d;if(!isCloudinaryImage(c,u.transformations))return{src:c};let p=u.widths.map(d=>{let p=u.paramsBuilder(d);return`${applyCloudinaryTransformation(c,p,u.transformations)} ${d}w`}).join(", "),h=applyCloudinaryTransformation(c,u.paramsBuilder(u.defaultWidth),u.transformations),f=null==(d=u.previewParamsBuilder)?void 0:d.call(u,u.defaultWidth);return{src:h,srcSet:p,preview:f?applyCloudinaryTransformation(c,f,u.transformations):void 0}}let posterSizeWidths=[2560,1920,1280,852,640,424,320],mediaSessionSizeWidths=[512,384,256,192,128,96];function calculateMediaSessionSrcSet(c){if(void 0!==c)return mediaSessionSizeWidths.map(u=>({src:getPosterUrlForWidthAndAspectRatio(c,u,1),sizes:`${u}x${u}`}))}function calculatePosterSrcSet(c,u="16:9"){let d=calcValueOfAspectRatio(u);return generateCloudinaryImageSrcSet(c,{widths:posterSizeWidths,defaultWidth:1280,transformations:CLOUDINARY_TRANSFORMATIONS_FULL,paramsBuilder:c=>
1`c_fill,w_${c},ar_${d},q_auto,g_auto,f_auto`,previewParamsBuilder:c=>`c_fill,w_${c/4},ar_${d},q_auto,g_auto,f_auto,e_blur:100`})}function getPosterUrlForWidthAndAspectRatio(c,u,d){return applyCloudinaryTransformation(c,`c_fill,w_${u},ar_${d},q_auto,g_auto,f_auto`,CLOUDINARY_TRANSFORMATIONS_FULL)}function resolveReviewAppRequestHeaders(c){if(!(!c||isNaN(c)))return{"akamai-viewer-country":"AT"}}function roundPlaybackPercentage(c){return roundNumber(c,5)}function roundPlaybackSec(c){return roundNumber(c,2)}function roundNumber(c,u){let d=Math.pow(10,u);return Math.round(c*d)/d}function getTouch(c){return c.changedTouches.length>=1?c.changedTouches[0]:void 0}function getDetectedInteractionCoordinates(c){var u,d;return isTouchEvent(c)?{clientX:(null==(u=getTouch(c))?void 0:u.clientX)??0,clientY:(null==(d=getTouch(c))?void 0:d.clientY)??0}:{clientX:c.clientX,clientY:c.clientY}}function calculateRelativeCoordinates(c,u){let d=u.current;if(!d)return;let p=d.getBoundingClientRect(),h=getDetectedInteractionCoordinates(c);return{x:h.clientX-(p.x+document.body.scrollLeft),y:h.clientY-(p.y+document.body.scrollTop),elementBoundingRect:p}}function extractPlaybackPositionInPercentFromEvent(c,u){let d=calculateRelativeCoordinates(c,u);if(d){let c=d.elementBoundingRect.width,u=d.x>=0,p=d.x<=c;return roundPlaybackPercentage((u?d.x:0)/(p?c:d.x))}}function isTouchEvent(c){return c.type.includes("touch")}function getBrowserLanguage(){return window.navigator.language?window.navigator.language.split("-")[0]:""}function getFormattedTimeString(c){let u=Math.floor(c/3600),d=Math.floor(c/60)-60*u,p=Math.floor(c)%60;return u<1?`${addLeadingZero(d)}:${addLeadingZero(p)}`:`${addLeadingZero(u)}:${addLeadingZero(d)}:${addLeadingZero(p)}`}function getThemeCSSVariables(c){let u={};return null!=c&&c.fontFamily&&(u={...u,"--rbup-font-family":c.fontFamily}),null!=c&&c.componentFontFamily&&(u={...u,"--rbup-component-font-family":c.componentFontFamily}),null!=c&&c.primaryColor&&(u={...u,"--rbup-primary-color":c.primaryColor,"--rbup-play-button-background-color":c.primaryColor,"--rbup-play-button-background-hover-color":c.primaryColorHover??c.primaryColor}),null!=c&&c.lineHeight&&(u={...u,"--rbup-text-line-height":c.lineHeight}),null!=c&&c.containerBackgroundColor&&(u={...u,"--rbup-container16x9-background-color":c.containerBackgroundColor}),u}function handlePlayPauseToggle(c,u){switch(c){case"ENDED":case"BUFFERING":return;case"PLAYING":null==u||u.pause();break;case"PAUSED":case"IDLE":null==u||u.play()}}function getPositionFromEvent(c){let{pageX:u,pageY:d}="touches"in c?c.touches[0]:c;return{x:u,y:d}}function hasPositionMoved(c,u){let d=u.x-c.x,p=u.y-c.y;return 0!==d&&0!==p}function isMobileDevice(){return!!/(?:iPhone|iPad|iPod|Android)/.test(window.navigator.userAgent)||window.navigator.maxTouchPoints>=3}let MouseButton={primary:0},PointerTypes={mouse:"mouse",touch:"touch",pen:"pen"};function isLeftClick(c){return isMouse(c)&&c.button===MouseButton.primary}function isMouse(c){return c.pointerType===PointerTypes.mouse}function isTouch(c){return c.pointerType===PointerTypes.touch}function isPen(c){return c.pointerType===PointerTypes.pen}function isPrimaryPen(c){return isPen(c)&&c.button===MouseButton.primary}function resolveCurrentAssetAsPlaylistEntry(c){return{assetId:c,countdownDurationSecs:DEFAULT_NEXT_UP_TIMEOUT_SECS,secondsFromEnd:DEFAULT_NEXT_UP_TIMEOUT_SECS}}function eqSet(c,u){if(c.size!==u.size)return!1;for(let d of c)if(!u.has(d))return!1;return!0}function isTrueValue$1(c){return"boolean"==typeof c?c:"string"==typeof c&&"true"===c}function createControllablePromise(){let c,u;return Object.assign(new Promise((d,p)=>{c=d,u=p}),{resolve:u=>c(u),reject:c=>u(c)})}function isNotNullOrUndefined(c){return null!=c}function resolveErrorMessageFromUnknown(c){return isObject$7(c)&&c.hasOwnProperty("message")?c.message:`Unknown error ${null==c?void 0:c.toString()}`}function isObject$7(c){return!!c&&"object"==typeof c}function deepEqual(c,u){if(c===u)return!0;if(!isObject$6(c)||!isObject$6(u)||Object.keys(c).length!==Object.keys(u).length)return!1;for(let d in c)if(!u.hasOwnProperty(d))return!1;else if(!deepEqual(c[d],u[d]))return!1;return!0}function isObject$6(c){return!!c&&"object"==typeof c}let tagId="rbup-video-cosmos-font-injection";function injectCosmosFontIntoHeader(c){if(!alreadyInjected()){let u=document.createElement("style");u.id=tagId,u.innerHTML=c,document.getElementsByTagName("head")[0].appendChild(u)}}function alreadyInjected(){return null!==document.getElementById(tagId)}function dispatchNextUpPlayerEvent(c,u,d){let{playerId:p}=u;
1switch(c){case"CANCELLED_BY_USER_INTERACTION":u.dispatchPlayerEvent({type:"nextUpCancelled",playerId:p,issuer:"USER",assetId:d});break;case"TRIGGERED_BY_USER_INTERACTION":u.dispatchPlayerEvent({type:"nextUpClicked",playerId:p,issuer:"USER",assetId:d}),u.dispatchPlayerEvent({type:"nextUpTriggered",playerId:p,issuer:"USER",assetId:d});break;case"TRIGGERED_AUTOMATICALLY":u.dispatchPlayerEvent({type:"nextUpTimeout",playerId:p,issuer:"AUTOMATICALLY",assetId:d}),u.dispatchPlayerEvent({type:"nextUpTriggered",playerId:p,issuer:"AUTOMATICALLY",assetId:d});break;case"CANCELLED_BY_REPLAY":u.dispatchPlayerEvent({type:"nextUpCancelled",playerId:p,issuer:"CONTEXTUAL",assetId:d});break;case"DISPLAYED":u.dispatchPlayerEvent({type:"nextUpDisplayed",playerId:p,issuer:"CONTEXTUAL",assetId:d})}}function dispatchPlaylistPlayerEvent(c,u){let{playerId:d}=u,p=getIssuerType(c);u.dispatchPlayerEvent({type:"nextEpisodeTriggered",playerId:d,issuer:p})}let getIssuerType=c=>"NEXT_EPISODE_TRIGGERED_AUTOMATICALLY"===c?"AUTOMATICALLY":"USER";function removeNoLongerExistingAttributes(c,u,d){let p=c.getAttributeNames(),h=Object.keys(u);for(let u of p)"id"===u||h.includes(u)||(d.debug("removing excess attribute from web component",u),c.removeAttribute(u))}function deleteUndefinedValues(c){for(let u in c)void 0===c[u]&&delete c[u]}function validatePlaylist(c){c.length>0&&c.forEach((c,u)=>{if(!c.secondsFromEnd&&!c.showNextTimeStampInSec)throw Error(`playlist entry with index ${u} is missing either secondsFromEnd or showNextTimeStampInSec`)})}let stripOffLocaleRegexp=/(?<masterId>rrn:content:.*):(?<locale>[a-z]{2}-[A-Z]{2,3})$/;function stripOffLocaleFromCrepoId(c){var u;if(!c)throw Error(`unexpected content id ${c}`);let d=stripOffLocaleRegexp.exec(c);if(!d){if(isCrepoId(c))return c;throw Error(`content id is not a rrn:content id ${c}`)}return(null==(u=d.groups)?void 0:u.masterId)??c}function isCrepoId(c){return!!c&&c.startsWith("rrn:content:")}function stripOffLocaleFromCrepoIdOrReturnOriginalIfNotRrn(c){if(!c)throw Error(`unexpected content id ${c}`);return isCrepoId(c)?stripOffLocaleFromCrepoId(c):c}function extractLocaleFromCrepoId(c){var u;if(!c)throw Error(`unexpected content id ${c}`);let d=stripOffLocaleRegexp.exec(c);if(!d)throw Error(`content id is not a rrn:content id ${c}`);let p=null==(u=d.groups)?void 0:u.locale;if(!p)throw Error(`unexpected content id ${c}`);return p}function resolveEaseLiveConfig(c,u){return"ACTIVE"===c?u:void 0}function shouldShowPlaylistEntry(c,u,d){if(void 0===c.secondsFromEnd&&void 0===c.showNextTimeStampInSec)throw Error("either secondsFromEnd or showNextTimeStampInSec need to be provided");if(0===u)return!1;let p=c.secondsFromEnd??0;if(p>0)return p>=u-d;let h=c.showNextTimeStampInSec??0;return h>0&&d>=h}function calculateFinalNextUp(c,u,d,p,h){if(!d&&u&&shouldShowPlaylistEntry(u,p,h))return{title:c.title,imageUrl:c.imageUrl,countdownDurationSecs:u.countdownDurationSecs??DEFAULT_NEXT_UP_TIMEOUT_SECS}}function createEaseLiveConfigFromInput(c,u){if(!(!isValuePresent(c.easeLiveAccountId)&&!isValuePresent(c.easeLiveProgramId)&&!isValuePresent(c.easeLiveProjectId)))return{accountId:c.easeLiveAccountId,programId:c.easeLiveProgramId,projectId:c.easeLiveProjectId,language:void 0}}function isValuePresent(c){return!(!c||""===c)}function extractLanguageFromLocale(c){}function isIosDevice(){return!!/(?:iPhone|iPad|iPod)/.test(window.navigator.userAgent)||window.navigator.maxTouchPoints>=3}function isIphoneDevice(){return/iPhone/.test(window.navigator.userAgent)}function isLiveLinearResolver(c){var u;return(null==c?void 0:c.getPlaybackMode())==="LIVE"&&(null==(u=c.getLiveVariant)?void 0:u.call(c))==="LINEAR"}function isLiveDvrResolver(c){var u;return(null==c?void 0:c.getPlaybackMode())==="LIVE"&&(null==(u=c.getLiveVariant)?void 0:u.call(c))==="DVR"}function isValidUrl(c){if(!c||!c.startsWith("http://")&&!c.startsWith("https://"))return!1;try{return new URL(c),!0}catch{return!1}}function calculateFromSS(c){let u=parseInt(c[0],10);return isNaN(u)?0:u}function calculateFromMMSS(c){let u=parseInt(c[1],10),d=parseInt(c[0],10);return isNaN(u)||isNaN(d)?0:u+60*d}function calculateFromHHMMSS(c){let u=parseInt(c[2],10),d=parseInt(c[1],10),p=parseInt(c[0],10);return isNaN(u)||isNaN(d)||isNaN(p)?0:u+60*d+60*p*60}function convertTimeStringToSec(c){let u=c.split(":");return 1===u.length?calculateFromSS(u):2===u.length?calculateFromMMSS(u):3===u.length?calculateFromHHMMSS(u):0}let MIN_HD_HEIGHT=720,HIGH_FRAMRATE_DISPLAY_THRESHOLD=31;function getVideoQualityLabel(c,u=0){let d=u>
1=HIGH_FRAMRATE_DISPLAY_THRESHOLD?`${c}p${u}`:`${c}p`;return c>=MIN_HD_HEIGHT?`${d} HD`:d}function hasValidDuration(c){return c>0}function hasValidProductPlacementComponentDefinition(c){return!!c}function isWithinDisplayTimeWindowBeforeVideoEnds(c,u,d){return c>u-d}loglevelExports.getLogger("resolveEntitlements");let AD_LENGTH_VALUE_NOT_AVAILABLE="not available";function isVideoDataAccessor(c){return"VIDEO"===c.getPlayerType()}function formatPos(c){if(!c)return"0";let u=String(Math.floor(Math.abs(c)));return c<0?`-${u}`:u}let eventMap={adStarted:"playAd",adSkipped:"skipAd",adStopped:"stopAd",playbackFinished:"eof",play:"play",paused:"pause",sourceUnloaded:"stop",posRelative:"posRelative",playInitial:"playInitial",seeking:"seek",timeshifting:"seek",pos:"pos",beforePlay:"init",loaded:"init",podcastTitleClick:"interaction",nextEpisodeTriggered:"interaction"};function EventActionResolver(c){return eventMap[c]}function EventNameResolver(c,u){let d=c.toLowerCase(),p=u.toLowerCase();return`${d}_${p}`}function resolveEventName(c,u){let d=EventActionResolver(u);return d?EventNameResolver(c,d):""}let log$t=loglevelExports.getLogger("TrackingService");function validateVideoPos(c,u,d){return(c<0||c>u)&&log$t.error("videoPos",c," exceeds bounds for reporting interval",u,"for event",d),Math.max(0,Math.min(u,Math.round(c)))}function getEofTrackingEvent(c,u,d){return{event:d.trackingEventType,event_action:"eof",event_name:resolveEventName(d.playerType,"playbackFinished"),current_pos:formatPos(d.playbackPosition),media_id:c.assetId,player_mode:d.playerMode,video_audio_language:d.audioLanguage,video_subtitles_language:d.subtitleLanguage,video_stream_type:d.videoStreamType,video_pos:validateVideoPos(d.videoPos,u,"eof")}}let rnds8=new Uint8Array(16);function rng(){if(!getRandomValues&&!(getRandomValues="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}let byteToHex=[];for(let ie=0;ie<256;++ie)byteToHex.push((ie+256).toString(16).slice(1));function unsafeStringify(c,u=0){return(byteToHex[c[u+0]]+byteToHex[c[u+1]]+byteToHex[c[u+2]]+byteToHex[c[u+3]]+"-"+byteToHex[c[u+4]]+byteToHex[c[u+5]]+"-"+byteToHex[c[u+6]]+byteToHex[c[u+7]]+"-"+byteToHex[c[u+8]]+byteToHex[c[u+9]]+"-"+byteToHex[c[u+10]]+byteToHex[c[u+11]]+byteToHex[c[u+12]]+byteToHex[c[u+13]]+byteToHex[c[u+14]]+byteToHex[c[u+15]]).toLowerCase()}let randomUUID="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),native={randomUUID};function v4(c,u,d){if(native.randomUUID&&!c)return native.randomUUID();let p=(c=c||{}).random||(c.rng||rng)();return p[6]=15&p[6]|64,p[8]=63&p[8]|128,unsafeStringify(p)}let CORE_VERSION="28.23.0";function calculateAutoplay(c){let{autoplay:u,autoplayTriggeredByNextUp:d}=c;return void 0!==d?d:u}function calculateEmbedUrl(c){let u=new URL(c);return`${u.protocol}//${u.host}${u.pathname}`}function isVideoPlayerConfig(c){return"VIDEO"===c.configurationType}function isVideoPlayerMetadata(c,u){return isVideoPlayerConfig(c)}function isAudioPlayerMetadata(c,u){return!!u&&!isVideoPlayerConfig(c)}function calculateTrackingHostname(c){return new URL(c).host}function calculateVideoTrackingInitEvent(c,u,d,p,h){let f=c.tracking.configs.googleAnalytics,m=p.getPlaybackMode(),g=(null==u?void 0:u.duration)??p.getMainMediaDurationInSec(),v=calculateTrackingHostname(d),y=calculateAutoplay(c);return{...f.customInitAttributes,video_account_name:f.accountName,video_chapter:null==u?void 0:u.chapter,video_name:null==u?void 0:u.title,video_display_url:d,event:"rbVideoTracking",event_action:"init",event_name:"video_init",video_display_domain:v,video_stream:h.isStream,video_autoplay:y,video_label:null==u?void 0:u.label,video_label_group:null==u?void 0:u.labelGroup,media_asset_id:null==u?void 0:u.vin,media_id:c.assetId,video_player_id:f.playerId,player_mode:h.playerMode,video_season:null==u?void 0:u.season,rb_source:f.source,player_version:CORE_VERSION,video_asset_id:c.assetId,video_length:"LIVE"===m?0:g,video_play_id:v4(),video_stream_type:h.videoStreamType}}function calculateAudioTrackingInitEvent(c,u,d,p,h){let f=c.tracking.configs.googleAnalytics,m=d.getDurationInSec(),g=calculateTrackingHostname(p);return{...f.customInitAttributes,video_account_name:f.accountName,video_name:null==u?void 0:u.title,video_display_url:p,event:"rbAudioTracking",event_action:"init",event_name:"audio_init",video_display_domain:g,video_stream
1:h.isStream,video_autoplay:!1,media_asset_id:null==u?void 0:u.vin,media_id:c.assetId,video_player_id:f.playerId,player_mode:h.playerMode,rb_source:f.source,megaphone_episode_id:null==u?void 0:u.megaphoneEpisodeId,megaphone_network_id:null==u?void 0:u.megaphoneNetworkId,megaphone_show_id:null==u?void 0:u.megaphoneShowId,player_version:CORE_VERSION,video_asset_id:c.assetId,video_chapter:null==u?void 0:u.chapter,video_label:null==u?void 0:u.label,video_label_group:null==u?void 0:u.labelGroup,video_length:isNaN(m)?(null==u?void 0:u.duration)??0:m,video_play_id:v4(),video_season:null==u?void 0:u.season,video_stream_type:h.videoStreamType}}function getFinalEmbedUrl(){return window.self!==window.top?document.referrer:window.location.href}function getInitTrackingEvent(c,u,d,p){let h=calculateEmbedUrl(c.tracking.configs.googleAnalytics.overrideEmbedUrl??getFinalEmbedUrl());if(isVideoPlayerConfig(c)&&(isVideoPlayerMetadata(c)||!u))return calculateVideoTrackingInitEvent(c,u,h,d,p);if(!isVideoPlayerConfig(c)&&(isAudioPlayerMetadata(c,u)||!u))return calculateAudioTrackingInitEvent(c,u,d,h,p);throw Error("unexpected player config")}function getNextEpisodeTrackingEvent(c,u,d,p){return{event:"rbAudioTracking",event_name:resolveEventName(p.playerType,"nextEpisodeTriggered"),video_interaction:{value:"Next Up",method:"USER"===u?"Click":"Auto",video_name:c.title,media_id:d,widget_type:"Audio Playlist"}}}function getNextUpToastTrackingEvent(c,u,d){return{event:"rbVideoTracking",event_name:"video_interaction",video_interaction:{value:"Next Up",method:u,video_name:c.title,media_id:d,widget_type:"Next Up Bar"}}}function getPauseTrackingEvent(c,u,d){return{current_pos:formatPos(d.playbackPosition),event:d.trackingEventType,event_action:"pause",event_name:resolveEventName(d.playerType,"paused"),video_audio_language:d.audioLanguage,video_subtitles_language:d.subtitleLanguage,media_id:c.assetId,player_mode:d.playerMode,video_stream_type:d.videoStreamType,video_pos:validateVideoPos(d.videoPos,u,"pause")}}function getAdLength(c){return c>1?c:AD_LENGTH_VALUE_NOT_AVAILABLE}function getPlayAdTrackingEvent(c,u,d,p){return{ad_length:getAdLength(c.duration),ad_plays:1,ad_pos:0,ad_type:p.currentEventAdType,current_pos:formatPos(p.playbackPosition),event:p.trackingEventType,video_audio_language:void 0,video_subtitles_language:void 0,event_action:"playAd",event_name:resolveEventName(p.playerType,"adStarted"),media_id:u,video_stream_type:p.videoStreamType,player_mode:p.playerMode,video_pos:validateVideoPos(p.videoPos,d,"playAd")}}function getPlayInitialTrackingEvent(c,u){return{video_audio_language:u.audioLanguage,current_pos:formatPos(u.playbackPosition),event:u.trackingEventType,event_action:"playInitial",event_name:resolveEventName(u.playerType,"playInitial"),media_id:c.assetId,player_mode:u.playerMode,video_subtitles_language:u.subtitleLanguage,video_plays:1,video_stream_type:u.videoStreamType,video_pos:0}}function getPlayTrackingEvent(c,u,d){return{current_pos:formatPos(d.playbackPosition),media_id:c.assetId,player_mode:d.playerMode,event:d.trackingEventType,event_action:"play",video_audio_language:d.audioLanguage,video_subtitles_language:d.subtitleLanguage,video_stream_type:d.videoStreamType,event_name:resolveEventName(d.playerType,"play"),video_pos:validateVideoPos(d.videoPos,u,"play")}}function getPodcastTitleTrackingEvent(c,u,d,p){return{event:"rbAudioTracking",event_name:resolveEventName(p.playerType,"podcastTitleClick"),video_interaction:{value:u,video_name:c.title,media_id:d,widget_type:"Podcast player::inline"}}}function getPosRelativeTrackingEvent(c,u,d,p){return{event_action:"posRelative",event:p.trackingEventType,event_name:resolveEventName(p.playerType,"posRelative"),current_pos:formatPos(p.playbackPosition),video_audio_language:p.audioLanguage,video_subtitles_language:p.subtitleLanguage,player_mode:p.playerMode,video_posrelative:u,media_id:c.assetId,video_stream_type:p.videoStreamType,video_pos:validateVideoPos(p.videoPos,d,"posRelative")}}function getPosTrackingEvent(c,u,d){return{event_action:"pos",event_name:resolveEventName(d.playerType,"pos"),event:d.trackingEventType,video_audio_language:d.audioLanguage,video_subtitles_language:d.subtitleLanguage,current_pos:formatPos(d.playbackPosition),player_mode:d.playerMode,media_id:c.assetId,video_stream_type:d.videoStreamType,video_pos:validateVideoPos(d.videoPos,u,"pos")}}function getSeekTrackingEvent(c,u,d){return{event_action:"seek",event_name:resolveEventName(d.playerType,"seeking"),event:d.trackingEventType,current_pos:formatPos(d.playbackPosition),player_mode:d.playerMode,media_id:c.assetId,video_audio_language:d.audioLanguage,video_subtitles_language:d.subtitleLanguage,video_stream_type:d.videoStreamType,video_pos:validateVideoPos(d.videoPos,u,"seek")}}function getSkipAdTrackingEvent(c,u,d){return{ad_length:getAdLength(d.currentEventDuration??0),ad_plays:1,ad_pos:d.currentAdPlaybackPosition,ad_type:d.currentEventAdType,current_pos:formatPos(d.playbackPosition),event:d.trackingEventType,video_audio_language:void 0,video_subtitles_language:void 0,event_action:"skipAd",event_name:resolveEventName(d.playerType,"adSkipped"),media_id:c,video_stream_type:d.videoStreamType,player_mode:d.playerMode,video_pos:validateVideoPos(d.videoPos,u,"skipAd")}}
1function getStopAdTrackingEvent(c,u,d){if(!d)throw Error("unexpectedly dont have player config");let{currentEventAdType:p,currentEventDuration:h=0}=u;return{ad_length:getAdLength(h),ad_plays:1,ad_pos:u.currentAdPlaybackPosition,ad_type:p,current_pos:formatPos(u.playbackPosition),event:u.trackingEventType,video_audio_language:void 0,video_subtitles_language:void 0,event_action:"stopAd",event_name:resolveEventName(u.playerType,"adStopped"),media_id:d.assetId,video_stream_type:u.videoStreamType,player_mode:u.playerMode,video_pos:validateVideoPos(u.videoPos,c,"stopAd")}}let stopEventAction="stop";function getStopTrackingEvent(c,u,d,p,h){if(!d)throw Error("unexpectedly dont have player config");if(!p)throw Error("unexpectedly dont have player data accessor");return{current_pos:h??formatPos(u.playbackPosition),event:u.trackingEventType,event_action:stopEventAction,event_name:resolveEventName(u.playerType,"sourceUnloaded"),media_id:d.assetId,video_audio_language:u.audioLanguage,video_subtitles_language:u.subtitleLanguage,player_mode:u.playerMode,video_pos:validateVideoPos(u.videoPos,c,"stop"),video_stream_type:u.videoStreamType}}function isInitTrackingEvent(c){return"init"===c.event_action}function isUserInteractionTrackingEvent(c){return"video_interaction"===c.event_name}function serializeValue(c){return"boolean"==typeof c?c.toString():c}function serializeEvent(c){return isInitTrackingEvent(c)?serializeInitEvent(c):isUserInteractionTrackingEvent(c)?serializeUserInteractionTrackingEvent(c):serializeTrackingEvent(c)}let initEventAttributesAtRootLevel=["event","event_action","event_name","player_mode","video_stream_type","player_version"];function serializeInitEvent(c){let u={},d={};for(let[p,h]of Object.entries(c))initEventAttributesAtRootLevel.includes(p)?u[p]=h:d[p]=serializeValue(h),"video_stream_type"===p&&(d[p]=h);return Object.keys(d).length>0&&(u.videos={[c.media_id]:d}),u}function serializeUserInteractionTrackingEvent(c){let u={},d={};for(let[p,h]of(u.event=c.event,u.event_name=c.event_name,Object.entries(c.video_interaction)))d[p]=serializeValue(h);return u.video_interaction=d,u}function serializeTrackingEvent(c){let u={};for(let[d,p]of Object.entries(c))u[d]=serializeValue(p);return u}function DataAccessorResolver(c){if(!c)throw Error("unexpectedly dont have player data accessor");return c}function TrackingAdTypeResolver(c,u){return 0===c?"pre":Math.floor(c)<u?"mid":"post"}class EventAdapter{execute(c){let{log:u}=c,d=this.resolveState(c);return null==u||u.debug(this.constructor.name,d),d}}class AdEventInfoAdapter extends EventAdapter{constructor(c){super(),yi(this,"coordinator"),yi(this,"currentEventId"),yi(this,"currentEventDuration"),yi(this,"currentScheduleTime",0),yi(this,"currentEventAdType","pre"),yi(this,"currentAdPlaybackPosition",0),this.coordinator=c}resolveState(c){let u=c.event;if((null==u?void 0:u.type)==="adBreakStarted"&&(this.currentScheduleTime=u.scheduleTime),(null==u?void 0:u.type)==="adStarted"){let c=DataAccessorResolver(this.coordinator.getPlayerData()).getMainMediaDurationInSec();this.currentEventId=u.adId,this.currentEventDuration=u.duration,this.currentEventAdType=TrackingAdTypeResolver(this.currentScheduleTime,c),this.currentAdPlaybackPosition=0}return(null==u?void 0:u.type)==="adTimeChanged"&&(this.currentAdPlaybackPosition=u.playbackPosition),{currentEventId:this.currentEventId,currentEventDuration:this.currentEventDuration,currentEventAdType:this.currentEventAdType,currentAdPlaybackPosition:this.currentAdPlaybackPosition}}}function VideoAudioLanguageResolver(c){if(isVideoDataAccessor(c))return c.getAudioLanguage()||"und"}let dc=class dc extends EventAdapter{constructor(c){super(),yi(this,"audioLanguage"),yi(this,"coordinator"),this.audioLanguage=dc.UNDEFINED_AUDIO_LANGUAGE,this.coordinator=c}resolveState(){let c=DataAccessorResolver(this.coordinator.getPlayerData());return this.audioLanguage=VideoAudioLanguageResolver(c),{audioLanguage:this.audioLanguage}}};yi(dc,"UNDEFINED_AUDIO_LANGUAGE","und");let AudioLanguageAdapter=dc;class CurrentPosAdapter extends EventAdapter{constructor(){super(...arguments),yi(this,"currentPos"),yi(this,"setCurrentPos",c=>{this.currentPos=c})}resolveState(c){return{currentPos:this.currentPos,setCurrentPos:this.setCurrentPos}}}
1class DisableTrackingAdapter extends EventAdapter{constructor(){super(...arguments),yi(this,"diableTracking")}resolveState(c){let u=c.event,d=null==u?void 0:u.type;return"castStarted"===d&&(this.diableTracking=u.disableTracking),"castStopped"===d&&(this.diableTracking=!1),{disableTracking:!!this.diableTracking}}}class DurationAdapter extends EventAdapter{constructor(c){super(),yi(this,"durationInSec"),yi(this,"coordinator"),this.durationInSec=0,this.coordinator=c}resolveState(){let c=DataAccessorResolver(this.coordinator.getPlayerData()).getMainMediaDurationInSec();return this.durationInSec=isNaN(c)?this.durationInSec:c,{durationInSec:this.durationInSec}}}class HasInitialPlaybackAdapter extends EventAdapter{constructor(){super(...arguments),yi(this,"hadInitialPlayback",!1),yi(this,"sendingPlayInitial",()=>{this.hadInitialPlayback=!0})}resolveState(c){var u,d,p;let h=(null==(u=c.event)?void 0:u.type)==="timeshifting",f=(null==(d=c.event)?void 0:d.type)==="timeChanged",m=hasReachedPlaybackThreshold(h,null==(p=c.metaInfo)?void 0:p.playbackPosition),g=f||h;return{shouldSendInitialPlayback:this.calculateState(m,g),hadInitialPlayback:this.hadInitialPlayback,sendingPlayInitial:this.sendingPlayInitial}}calculateState(c,u){return u&&c&&!this.hadInitialPlayback}}function hasReachedPlaybackThreshold(c,u){let d=c?0:HasInitialPlaybackAdapter.PLAYBACK_THRESHOLD;return"number"==typeof u&&Math.abs(u)>=d}yi(HasInitialPlaybackAdapter,"PLAYBACK_THRESHOLD",.1);class HasReachedEofAdapter extends EventAdapter{constructor(){super(...arguments),yi(this,"hasReachedEof",!1),yi(this,"setHasReachedEof",()=>{this.hasReachedEof=!0})}resolveState(c){return{hasReachedEof:this.hasReachedEof,setHasReachedEof:this.setHasReachedEof}}}class IsCastingAdapter extends EventAdapter{constructor(){super(...arguments),yi(this,"isCasting",!1)}resolveState(c){let u=c.event,d=null==u?void 0:u.type;return"castStarted"===d&&(this.isCasting=!0),"castStopped"===d&&(this.isCasting=!1),{isCasting:this.isCasting}}}function VideoIsStreamResolver(c){let{phasingEnabled:u,playbackMode:d,isPlayerLoaded:p}=c;return!!u||!!p&&"LIVE"===d}class IsStreamAdapter extends EventAdapter{constructor(c){super(),yi(this,"isStream",!1),yi(this,"coordinator"),this.coordinator=c}resolveState(){let c=DataAccessorResolver(this.coordinator.getPlayerData()),u=this.coordinator.getPlayerConfiguration(),d=!!(u&&isVideoPlayerConfig(u))&&u.phasing,p=c.getPlaybackMode(),h=c.isPlayerLoaded();return this.isStream=VideoIsStreamResolver({phasingEnabled:d,playbackMode:p,isPlayerLoaded:h}),{isStream:this.isStream}}}class BasePlaybackPositionAdapter extends EventAdapter{constructor(c){super(),yi(this,"playbackPosition"),yi(this,"coordinator"),this.playbackPosition=0,this.coordinator=c}resolveState(c){let{event:u}=c;if(!isPlayerEvent(u))throw Error("unexpectedly received non-player event");let d=this.playbackPosition,p=DataAccessorResolver(this.coordinator.getPlayerData());return isVideoDataAccessor(p)&&p.isShowingAd()||(this.playbackPosition=this.resolvePlaybackPositionFromEvent(u)),{lastPlaybackPosition:d,playbackPosition:this.playbackPosition}}resolvePlaybackPositionFromEvent(c){return"timeSkipped"===c.type?c.currentPlaybackTimeInSec:isEventWithTargetPosition(c)&&"INITIAL"===c.issuer?c.targetPosition:isEventWithPosition(c)?c.playbackPosition:this.playbackPosition}}function isEventWithPosition(c){return"playbackPosition"in c}function isEventWithTargetPosition(c){return"targetPosition"in c}function isPlayerEvent(c){return void 0!==c&&"playerId"in c}function sendViaBeacon(c,u){if(typeof navigator>"u"||"function"!=typeof navigator.sendBeacon)return!1;try{return navigator.sendBeacon(c,u)}catch{return!1}}function postToClientErrorEndpoint(c,u,d){try{let p=`${calculateSsdmUrl(c)}/client-error`;if(d&&sendViaBeacon(p,u))return;fetch(p,{body:u,method:"POST",...d?{keepalive:!0}:{headers:{"content-type":"application/json"}}}).catch(()=>{})}catch{return}}function reportClientError(c,u,d){try{let p=JSON.stringify({message:c,params:d,href:"u">typeof location?location.href:void 0});postToClientErrorEndpoint(u,p)}catch{return}}function postClientError(c,u){postToClientErrorEndpoint(c,u,!0)}class TimeCorrectionAdapter{constructor(c){yi(this,"timeCorrection"),yi(this,"coordinator"),yi(this,"playbackPositionOfPauseOrPlayEvent"),this.coordinator=c,this.timeCorrection=0,this.playbackPositionOfPauseOrPlayEvent=0}resolveState({event:c,videoStartTimestamp:u,lastPlaybackPosition:d}){let p=DataAccessorResolver(this.coordinator.getPlayerData()),h=isLiveLinearResolver(p),f=isVideoDataAccessor(p)&&p.isS
1howingAd();switch(c.type){case"seeking":case"timeshifting":this.playbackPositionOfPauseOrPlayEvent=0;break;case"seekingDone":case"timeshiftingDone":this.handleTimeshiftingDoneEvent(c,h,u,d);break;case"timeSkipped":this.handleTimeSkippedEvent(c,f);break;case"playing":this.handlePlayingEvent(c,d);break;case"play":this.handlePlayEvent(c);break;case"paused":this.handlePausedEvent(c)}return this.handleRestart(c,f),{timeCorrection:this.timeCorrection}}handlePlayEvent(c){if(this.playbackPositionOfPauseOrPlayEvent){let u=c.playbackPosition-this.playbackPositionOfPauseOrPlayEvent;u>1&&(this.timeCorrection+=u,this.playbackPositionOfPauseOrPlayEvent=c.playbackPosition)}else this.playbackPositionOfPauseOrPlayEvent=c.playbackPosition}handlePlayingEvent(c,u){if(0!==u&&this.playbackPositionOfPauseOrPlayEvent){let u=c.playbackPosition-this.playbackPositionOfPauseOrPlayEvent;this.timeCorrection+=u}this.playbackPositionOfPauseOrPlayEvent=0}handleTimeSkippedEvent(c,u){if(!u){let u=c.currentPlaybackTimeInSec-c.previousPlaybackTimeInSec;this.timeCorrection+=u}reportTimeskipped(this.coordinator,c.previousPlaybackTimeInSec,c.currentPlaybackTimeInSec)}handleTimeshiftingDoneEvent(c,u,d,p){if(u){let u=c.playbackPosition-d;this.timeCorrection=u-p}}handlePausedEvent(c){c.playbackPosition&&(this.playbackPositionOfPauseOrPlayEvent=c.playbackPosition)}handleRestart(c,u){u||"issuer"in c&&"RESTART"===c.issuer&&(this.timeCorrection=0)}}function reportTimeskipped(c,u,d){var p;let h=null==(p=c.getPlayerConfiguration())?void 0:p.environment;h&&reportClientError("TimeSkippedEvent detected",h,{timeSkipStart:u,timeSkipEnd:d})}class LivePlaybackPositionAdapter extends EventAdapter{constructor(c){super(),yi(this,"timeCorrectionAdapter"),yi(this,"basePlaybackPositionAdapter"),yi(this,"videoStartTimestamp"),yi(this,"correctedPlaybackPosition"),yi(this,"playbackPosition"),yi(this,"coordinator"),this.coordinator=c,this.timeCorrectionAdapter=new TimeCorrectionAdapter(c),this.basePlaybackPositionAdapter=new BasePlaybackPositionAdapter(c),this.videoStartTimestamp=0,this.correctedPlaybackPosition=0,this.playbackPosition=0}resolveState(c){let u=this.correctedPlaybackPosition,{event:d}=c,p=DataAccessorResolver(this.coordinator.getPlayerData());if(!isPlayerEvent(d))throw Error("unexpectedly received non-player event");let{playbackPosition:h}=this.basePlaybackPositionAdapter.resolveState(c),{timeCorrection:f}=this.timeCorrectionAdapter.resolveState({event:d,lastPlaybackPosition:this.playbackPosition,videoStartTimestamp:this.videoStartTimestamp}),m=isVideoDataAccessor(p)&&p.isShowingAd(),g=this.handleEvent(d,m);return this.playbackPosition=g??h,this.correctedPlaybackPosition=this.calculateCorrectedPlaybackPosition(this.playbackPosition,f),{lastPlaybackPosition:u,playbackPosition:this.correctedPlaybackPosition}}handleEvent(c,u){switch(c.type){case"timeshifting":case"playing":case"timeChanged":if(!u)return this.getInitialPlaybackPosition(c);break;case"timeshiftingDone":case"seekingDone":return this.handleTimeshiftingDone(c);case"timeSkipped":if(!u)return c.currentPlaybackTimeInSec}}getInitialPlaybackPosition(c){if(0===this.videoStartTimestamp)return this.videoStartTimestamp=c.playbackPosition,c.playbackPosition}handleTimeshiftingDone(c){return c.playbackPosition}calculateCorrectedPlaybackPosition(c,u){return c-(this.videoStartTimestamp+u)}}class UnresolvedPlaybackPositionAdapter extends EventAdapter{constructor(c){super(),yi(this,"coordinator"),yi(this,"basePlaybackPositionAdapter"),yi(this,"livePlaybackPositionAdapter"),yi(this,"lastState",{}),this.coordinator=c,this.basePlaybackPositionAdapter=new BasePlaybackPositionAdapter(c),this.livePlaybackPositionAdapter=new LivePlaybackPositionAdapter(c)}resolveState(c){return null!=c&&c.event&&("LIVE"===this.coordinator.getInitialPlaybackMode()?this.lastState=this.livePlaybackPositionAdapter.resolveState(c):this.lastState=this.basePlaybackPositionAdapter.resolveState(c)),this.lastState}}function PlayerModeResolver(c,u){if(!c)throw Error("unexpectedly dont have player configuration");if(isVideoDataAccessor(u)){if(u.isInFullscreenMode())return"fullscreen";if(u.isInPictureInPictureMode())return"picture-in-picture";if(u.isPlayingVideoViaAirPlay())return"airplay"}return c.tracking.configs.googleAnalytics.defaultPlayerMode}
1class PlayerModeAdapter extends EventAdapter{constructor(c){super(),yi(this,"playerMode","standard"),yi(this,"coordinator"),this.coordinator=c}resolveState(){let c=DataAccessorResolver(this.coordinator.getPlayerData()),u=this.coordinator.getPlayerConfiguration();return this.playerMode=PlayerModeResolver(u,c),{playerMode:this.playerMode}}}class PlayerTypeAdapter extends EventAdapter{constructor(c){super(),yi(this,"coordinator"),this.coordinator=c}resolveState(){var c;let u=null==(c=this.coordinator.getPlayerData())?void 0:c.getPlayerType();if(!u)throw Error("unexpectedly got no player type");return{playerType:u}}}let HEATMAP_TRACKING_ENDPOINT="https://api-player.redbull.com/heatmap";class SecondsWatchedReporter extends EventAdapter{constructor(c){super(),yi(this,"entries"),yi(this,"lastEntry"),yi(this,"shouldTrackSecondsWatched"),yi(this,"assetId"),yi(this,"reportSecondsWatched",()=>{this.shouldTrackSecondsWatched&&this.entries.length>1&&this.assetId&&sendTrackingData(this.assetId,this.entries),this.entries=[]}),this.coordinator=c,this.entries=[];const u=this.coordinator.getMediaMetaData(),d=this.coordinator.getPlaybackMode();this.assetId=null==u?void 0:u.assetId,this.shouldTrackSecondsWatched=!!(this.assetId&&u&&"activateHeatmapTracking"in u&&u.activateHeatmapTracking&&"VOD"===d)}resolveState(c){let{event:u}=c;if(!this.shouldTrackSecondsWatched)return{};if((null==u?void 0:u.type)==="timeChanged"){let c=Math.floor(u.playbackPosition);c!==this.lastEntry&&(this.entries.push(c),this.lastEntry=c)}return{reportSecondsWatched:this.reportSecondsWatched}}}function sendTrackingData(c,u){"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(HEATMAP_TRACKING_ENDPOINT,JSON.stringify({assetId:c,secondsWatched:u}))}class SeekEventAdapter extends EventAdapter{constructor(){super(...arguments),yi(this,"seekTrackingEvent",null),yi(this,"setSeekTrackingEvent",c=>{this.seekTrackingEvent=c}),yi(this,"getSeekTrackingEvent",()=>this.seekTrackingEvent)}resolveState(c){return{setSeekTrackingEvent:this.setSeekTrackingEvent,getSeekTrackingEvent:this.getSeekTrackingEvent}}}function VideoSubtitleLanguageResolver(c){if(!isVideoDataAccessor(c))return;let u=c.getSubtitleTrackLanguage();if(u)return u}class SubtitleLanguageAdapter extends EventAdapter{constructor(c){super(),yi(this,"subtitleLanguage"),yi(this,"coordinator"),this.coordinator=c}resolveState(){let c=DataAccessorResolver(this.coordinator.getPlayerData());return this.subtitleLanguage=VideoSubtitleLanguageResolver(c),{subtitleLanguage:this.subtitleLanguage}}}function TrackingEventTypeResolver(c){switch(c.getPlayerType()){case"VIDEO":return"rbVideoTracking";case"AUDIO":return"rbAudioTracking";default:throw Error(`unknown player type ${c.getPlayerType()}`)}}class TrackingEventTypeAdapter extends EventAdapter{constructor(c){super(),yi(this,"trackingEventType"),yi(this,"coordinator"),this.coordinator=c}resolveState(){if(!this.trackingEventType){let c=DataAccessorResolver(this.coordinator.getPlayerData());this.trackingEventType=TrackingEventTypeResolver(c)}return{trackingEventType:this.trackingEventType}}}class VideoPosAdapter extends EventAdapter{constructor(){super(...arguments),yi(this,"storedPlaybackPosition"),yi(this,"storeVideoPos",c=>{let u=ensureIsNumber(c);this.storedPlaybackPosition=u})}resolveState(c){let{metaInfo:u}=c,d=ensureIsNumber(null==u?void 0:u.playbackPosition),p=this.storedPlaybackPosition??d;return{videoPos:Math.max(0,d-p),storeVideoPos:this.storeVideoPos}}}function ensureIsNumber(c){return"number"==typeof c?Math.floor(c):0}function VideoStreamTypeResolver(c){if(!isVideoDataAccessor(c))return"vod";let u=c.getPlaybackMode();switch(u){case"LIVE":return"LINEAR"===c.getLiveVariant()?"linear":c.getTimeShiftInSec()>=-1?"live":"vod";case"ADS":case"VOD":return"vod";default:throw Error(`unexpected playback mode ${u}`)}}class VideoStreamTypeAdapter extends EventAdapter{constructor(c){super(),yi(this,"videoStreamType"),yi(this,"coordinator"),this.videoStreamType="vod",this.coordinator=c}resolveState(){let c=DataAccessorResolver(this.coordinator.getPlayerData());return this.videoStreamType=VideoStreamTypeResolver(c),{videoStreamType:this.videoStreamType}}}let ADAPTER_LIST=[AudioLanguageAdapter,DurationAdapter,IsStreamAdapter,PlayerModeAdapter,PlayerTypeAdapter,SubtitleLanguageAdapter,TrackingEventTypeAdapter,VideoStreamTypeAdapter,UnresolvedPlaybackPositionAdapter,VideoPosAdapter,HasInitialPlaybackAdapter,SecondsWatchedReporter,AdEventInfoAdapter,HasReachedEofAdapter,SeekEventAdapter,DisableTrackingAdapter,CurrentPosAdapter,IsCastingAdapter],getAdapterList=()=>ADAPTER_LIST,log$s=loglevelExports.getLogger("TrackingServiceStateLayer");class TrackingServiceStateLayer{constructor(c){yi(this,"instantiatedAdapters"),this.instantiatedAdapters=getAdapterList().map(u=>
1new u(c))}getUpdatedState(c){let u=this.instantiatedAdapters.reduce((u,d)=>({...u,...d.execute({event:c,metaInfo:{...u},log:log$s})}),{});return log$s.info(`Resolved state for ${null==c?void 0:c.type}`,u),u}}let log$r=loglevelExports.getLogger("TrackingService"),windowEventTypes=["beforeunload","unload"];function getIntervalFraction(c,u){return Math.floor(c/u)}let REPORT_INTERVAL=60;class TrackingService{constructor(c,u=window.dataLayer){yi(this,"_stateLayer"),yi(this,"_metaInfo"),yi(this,"eofReached",!1),yi(this,"onPlayerEvent",c=>{if("downloadFinished"===c.type)return;let u=this.coordinator.getPlayerConfiguration(),d=this.coordinator.getPlayerData();if(!u)throw Error("unexpectedly dont have player config");if(!d)throw Error("unexpectedly dont have video player data accessor");let p=isVideoDataAccessor(d)&&d.isShowingAd();if(this.metaInfo=this.stateLayer.getUpdatedState(c),!this.metaInfo.disableTracking){if(log$r.debug("onPlayerEvent: ",c,this.metaInfo),p)return void this.handlePlayerEventWhileShowingAd(c,u,d);this.handlePlayerEventWithoutAd(c,u,d),this.handleCustomEvent(c)}}),yi(this,"handleUnloadEvent",()=>{windowEventTypes.forEach(c=>window.removeEventListener(c,this.handleUnloadEvent));let c=this.coordinator.getPlayerConfiguration(),u=this.coordinator.getPlayerData();if(u&&isVideoDataAccessor(u)&&u.isShowingAd()){let u=getStopAdTrackingEvent(REPORT_INTERVAL,this.metaInfo,c);this.sendEvent(u),this.metaInfo.setCurrentPos(u.current_pos)}if(this.metaInfo.hasReachedEof)return;let{isCasting:d,currentPos:p}=this.metaInfo,h=getStopTrackingEvent(REPORT_INTERVAL,this.metaInfo,c,u,d?p:void 0);this.sendEvent(h),this.metaInfo.setCurrentPos(h.current_pos)}),this.coordinator=c,this.dataLayer=u,c.addEventListener(this.onPlayerEvent),windowEventTypes.forEach(c=>window.addEventListener(c,this.handleUnloadEvent))}get stateLayer(){return this._stateLayer||(this._stateLayer=new TrackingServiceStateLayer(this.coordinator)),this._stateLayer}get metaInfo(){return this._metaInfo||(this._metaInfo=this.stateLayer.getUpdatedState()),this._metaInfo}set metaInfo(c){this._metaInfo=c}destroy(){this.handleUnloadEvent(),this.coordinator.removeEventListener(this.onPlayerEvent),windowEventTypes.forEach(c=>window.removeEventListener(c,this.handleUnloadEvent))}reset(){this._stateLayer=new TrackingServiceStateLayer(this.coordinator)}restart(){this.reset();let c=this.coordinator.getPlayerConfiguration();if(!c)throw Error("dont have player config");let u=this.coordinator.getMediaMetaData();if(!u)throw Error("dont have player metadata");let d=this.coordinator.getPlayerData();if(!d)throw Error("unexpectedly dont have video player data accessor");this.sendInitEvent(c,u,d)}handlePlayerEventWithoutAd(c,u,d){switch(c.type){case"loaded":this.handleLoadedEvent(c,u,d);break;case"play":this.handlePlayEvent();break;case"paused":this.handlePausedEvent(u);break;case"timeChanged":this.handleTimeChangedEvent();break;case"seeking":case"timeshifting":this.handleSeekingEvent(c);break;case"seekingDone":case"timeshiftingDone":this.handleSeekingDoneEventForStreamTypes(c,d);break;case"playbackFinished":this.handlePlaybackFinishedEvent();break;case"sourceUnloaded":this.handleUnloadEvent();break;case"adSkipped":this.handleAdSkippedEvent(c,u)}}handleSeekingDoneEventForStreamTypes(c,u){if(["RESTART","INITIAL"].includes(c.issuer)||this.eofReached)return;let d=this.metaInfo.getSeekTrackingEvent();d&&(this.sendEvent(d),this.metaInfo.setCurrentPos(d.current_pos),this.metaInfo.setSeekTrackingEvent(null)),isLiveLinearResolver(u)||this.handleSeekingDoneEvent(c,u)}handlePlayerEventWhileShowingAd(c,u,d){switch(c.type){case"loaded":this.handleLoadedEvent(c,u,d);break;case"adStarted":this.handleAdStartedEvent(c,u);break;case"adSkipped":this.handleAdSkippedEvent(c,u)}}handleCustomEvent(c){switch(c.type){case"nextUpCancelled":this.handleNextUpToastEvent(c,"Close");break;case"nextUpClicked":this.handleNextUpToastEvent(c,"Click");break;case"nextUpTimeout":this.handleNextUpToastEvent(c,"Auto");break;case"podcastTitleClick":this.handlePodcastTitleClickEvent(c);break;case"nextEpisodeTriggered":this.handleNextEpisodeEvent(c)}}handlePodcastTitleClickEvent(c){let u=this.coordinator.getPlayerConfiguration();if(!u)throw Error("dont have player config");let d=this.coordinator.getMediaMetaData();if(!d)throw Error("dont have player metadata");this.sendEvent(getPodcastTitleTrackingEvent(d,c.titleType,u.assetId,this.metaInfo))}handleNextUpToastEvent(c,u){if("CONTEXTUAL"===c.issuer)return;let d=this.coordinator.getPlayerConfiguration();if(!d)throw Error("dont have player config");let p=this.coordinator.getMediaMetaData();if(!p)throw Error("dont have player metadata");
1this.sendEvent(getNextUpToastTrackingEvent(p,u,d.assetId))}handlePlaybackFinishedEvent(){this.eofReached=!0;let c=this.coordinator.getPlayerConfiguration();if(!c)throw Error("dont have player config");let u=getEofTrackingEvent(c,REPORT_INTERVAL,this.metaInfo);this.sendEvent(u),this.metaInfo.setCurrentPos(u.current_pos),this.metaInfo.setHasReachedEof()}handleNextEpisodeEvent(c){let u=this.coordinator.getPlayerConfiguration();if(!u)throw Error("dont have player config");let d=this.coordinator.getMediaMetaData();if(!d)throw Error("dont have player metadata");let{issuer:p}=c,{assetId:h}=u;this.sendEvent(getNextEpisodeTrackingEvent(d,p,h,this.metaInfo)),"USER"===p&&this.handleUnloadEvent()}handleSeekingDoneEvent(c,u){if(["RESTART","INITIAL"].includes(c.issuer)||this.eofReached)return;let d=this.coordinator.getPlayerConfiguration();if(!d)throw Error("dont have player config");let p=this.metaInfo;if("PAUSED"===u.getPlayerStatus()){let c=getPauseTrackingEvent(d,REPORT_INTERVAL,{...p,videoPos:0});this.sendEvent(c),this.metaInfo.setCurrentPos(c.current_pos)}else{let c=getPlayTrackingEvent(d,REPORT_INTERVAL,{...p,videoPos:0});this.sendEvent(c),this.metaInfo.setCurrentPos(c.current_pos)}}handleSeekingEvent(c){if("RESTART"===c.issuer||this.eofReached)return void this.restart();if("INITIAL"===c.issuer)return;this.metaInfo.shouldSendInitialPlayback&&this.sendPlayInitial(this.metaInfo);let u=this.coordinator.getPlayerConfiguration();if(!u)throw Error("dont have player config");let d=getSeekTrackingEvent(u,REPORT_INTERVAL,this.metaInfo);this.metaInfo.setSeekTrackingEvent(d)}handleTimeChangedEvent(){let c=this.coordinator.getCumulatedPlayTimeInSec();log$r.debug("TRACK timeChanged",this.metaInfo.playbackPosition,"cumulated",c),this.metaInfo.shouldSendInitialPlayback&&this.sendPlayInitial(this.metaInfo),"VOD"===this.coordinator.getInitialPlaybackMode()&&(this.handlePosRelativeAspect(),this.metaInfo=this.stateLayer.getUpdatedState()),this.handlePosAspect(this.metaInfo)}sendPlayInitial(c){let u=this.coordinator.getPlayerConfiguration();if(!u)throw Error("dont have player config");this.metaInfo.sendingPlayInitial(),this.eofReached=!1;let d=getPlayInitialTrackingEvent(u,c);this.sendEvent(d),this.metaInfo.setCurrentPos(d.current_pos)}handlePosAspect(c){let{lastPlaybackPosition:u,playbackPosition:d}=c,p=getIntervalFraction(u,REPORT_INTERVAL),h=getIntervalFraction(d,REPORT_INTERVAL);if(p!==h){log$r.debug(`TRACK: ${REPORT_INTERVAL}s changed, last frac: ${p}, cur frac: ${h}, playback: ${d}s`);let u=this.coordinator.getPlayerConfiguration();if(!u)throw Error("dont have player config");let f=getPosTrackingEvent(u,REPORT_INTERVAL,c);this.sendEvent(f),this.metaInfo.setCurrentPos(f.current_pos)}}handlePosRelativeAspect(){let c=this.metaInfo,{lastPlaybackPosition:u,playbackPosition:d,durationInSec:p}=c,h=p/10,f=Math.floor(u/h),m=Math.floor(d/h);if(m%10!=0&&f!==m){log$r.debug("TRACK: 10 percent changed, last frac: ",f,"cur frac",m,"playback",d/c.durationInSec*100,"%");let u=this.coordinator.getPlayerConfiguration();if(!u)throw Error("dont have player config");let p=getPosRelativeTrackingEvent(u,`${m}0%`,REPORT_INTERVAL,c);this.sendEvent(p),this.metaInfo.setCurrentPos(p.current_pos)}}handlePlayEvent(){let c=this.coordinator.getPlayerConfiguration();if(this.metaInfo.hadInitialPlayback){if(!c)throw Error("dont have player config");let u=getPlayTrackingEvent(c,REPORT_INTERVAL,this.metaInfo);this.sendEvent(u),this.metaInfo.setCurrentPos(u.current_pos)}}handlePausedEvent(c){if(this.metaInfo.hadInitialPlayback){let u=getPauseTrackingEvent(c,REPORT_INTERVAL,this.metaInfo);this.sendEvent(u),this.metaInfo.setCurrentPos(u.current_pos)}}handleLoadedEvent(c,u,d){log$r.debug("TRACK: got duration",this.metaInfo.durationInSec),this.sendInitEvent(u,c.data,d)}sendInitEvent(c,u,d){let p=getInitTrackingEvent(c,u,d,this.metaInfo);this.sendEvent(p)}handleAdStartedEvent(c,u){let d=getPlayAdTrackingEvent(c,u.assetId,REPORT_INTERVAL,this.metaInfo);this.sendEvent(d),this.metaInfo.setCurrentPos(d.current_pos)}handleAdSkippedEvent(c,u){let d=this.metaInfo.currentEventId;c.adId!==d&&log$r.warn("adId does not match, got skip event for id",c.adId,"but last start event id was",d);let p=getSkipAdTrackingEvent(u.assetId,REPORT_INTERVAL,this.metaInfo);this.sendEvent(p),this.metaInfo.setCurrentPos(p.current_pos)}sendEvent(c){var u,d,p;if(!this.dataLayer)throw Error("dont have a data layer! Did you forget to initialize Google Tag Manager?");let h=this.coordinator.getPlayerConfiguration();if(!h)throw Error("dont have player config");this.calculateVideoPos(c);let f=h.tracking.configs.googleAnalytics,m=this.coordinator.getMediaMetaData(),g=(null==(u=f.eventCustomizer)?void 0:u.customize(c,m))??c,v=serializeEvent(g);log$r.debug("Tracking: Sending",v),this.dataLayer.push(v),"event_action"in g&&"playInitial"===g.event_action||null==(p=(d=this.metaInfo).reportSecondsWatched)||p.call(d)}calculateVideoPos(c){if(c.hasOwnProperty("video_pos")){let c=this.metaInfo;c.storeVideoPos(c.playbackPosition)}}}function createTrackingService(c,u=window.dataLayer){var d;let p=document.querySelectorAll('script[src*="GTM-5XHDS9"]').length>0;if((null==(d=window.google_tag_manager)?void 0:d.isRedBullPage)||p)return new TrackingService(c,u)}let MAX_DISTINCT_ERRORS=50,MAX_MESSAGE_LENGTH=1e3,MAX_BODY_LENGTH=6e4,FALLBACK_ERROR_COUNT=10;function isErrorLike(c){return c instanceof Error||"[object Error]"===Object.prototype.toString.call(c)}function isPlainObject$2(c){return"object"==typeof c&&null!==c&&!Array.isArray(c)&&!isErrorLike(c)}function serializeArg(c){if("string"==typeof c)return c;if(isErrorLike(c)){let u=c.name??"Error";return c.stack?`${u}: ${c.message} | ${c.stack}`:`${u}: ${c.message}`}try{return JSON.stringify(c)||String(c)}catch{return String(c)}}
1function serializeArgs(c){return c.map(serializeArg).join(" ").slice(0,MAX_MESSAGE_LENGTH)}function buildErrorPayload(c){return 1===c.length&&isPlainObject$2(c[0])?{...c[0]}:{message:serializeArgs(c)}}function byteLength(c){return"function"==typeof TextEncoder?new TextEncoder().encode(c).length:c.length}function interceptErrorLogs(c){let u=log$w.methodFactory,d=(d,p,h)=>{let f=u(d,p,h);return"error"!==d?f:(...u)=>{f(...u),"string"==typeof h&&c(h,u)}};for(let c of(log$w.methodFactory=d,log$w.setLevel(log$w.getLevel(),!1),Object.values(log$w.getLoggers())))c.methodFactory=d,c.setLevel(c.getLevel(),!1)}function onPageLeave(c){"u">typeof document&&document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&c()}),"u">typeof window&&window.addEventListener("pagehide",c)}class LoglevelErrorReporter{constructor(){yi(this,"environment"),yi(this,"componentVersion"),yi(this,"buffer",new Map),yi(this,"installed",!1)}configure(c){this.environment=c.environment??this.environment,this.componentVersion=c.componentVersion??this.componentVersion;try{this.install()}catch{return}}destroy(){try{let c=this.environment;if(0===this.buffer.size||!c)return;let u=[...this.buffer.values()];this.buffer.clear();let d=this.serializeReport(u);byteLength(d)>MAX_BODY_LENGTH&&(d=this.serializeReport(u.slice(0,FALLBACK_ERROR_COUNT))),postClientError(c,d)}catch{return}}reportCaughtError(c,u,d){try{this.capture(c,[u],d)}catch{return}}serializeReport(c){return JSON.stringify({message:"Player Session Error Report",componentVersion:this.componentVersion,href:"u">typeof location?location.href:void 0,errors:c})}install(){this.installed||(this.installed=!0,interceptErrorLogs((c,u)=>this.capture(c,u)),onPageLeave(()=>this.destroy()))}capture(c,u,d){try{let p=buildErrorPayload(u),h=`${d??""}::${c}::${JSON.stringify(p)}`,f=this.buffer.get(h);f?f.count+=1:this.buffer.size<MAX_DISTINCT_ERRORS&&this.buffer.set(h,{component:d,logger:c,count:1,...p})}catch{return}}__resetForTests(){this.buffer.clear(),this.environment=void 0,this.componentVersion=void 0}}let playerErrorReporter=new LoglevelErrorReporter;function resolveMediaMetaData(c){let u=c.getMediaMetaData();if(!u)throw Error("do not have player metadata");return u}function resolvePlayerConfigurationData(c){let u=c.getPlayerConfiguration();if(!u)throw Error("do not have player configuration");return u}function setMediaSessionActionHandler(c,u){navigator.mediaSession&&"function"==typeof navigator.mediaSession.setActionHandler&&navigator.mediaSession.setActionHandler(c,u)}function setMediaSessionMetadata(c){navigator.mediaSession&&"MediaMetadata"in window&&(navigator.mediaSession.metadata=c&&new MediaMetadata(c))}function setMediaSessionPlaybackState(c){navigator.mediaSession&&(navigator.mediaSession.playbackState=c)}function setMediaSessionPositionState(c,u,d){isNaN(c)||isNaN(u)||isNaN(d)||navigator.mediaSession&&"function"==typeof navigator.mediaSession.setPositionState&&navigator.mediaSession.setPositionState({duration:c,playbackRate:u,position:d})}let log$q=loglevelExports.getLogger("MediaSessionService"),SECONDS_OF_MINUTE=60,SECONDS_OF_HOUR=SECONDS_OF_MINUTE*SECONDS_OF_MINUTE,SECONDS_OF_DAY=24*SECONDS_OF_HOUR;class MediaSessionService{constructor(c){yi(this,"DEFAULT_MEDIA_SESSION_SEEK_SECONDS",10),yi(this,"onPlayerEvent",c=>{switch(c.type){case"play":this.handlePlayEvent();break;case"paused":this.handlePausedEvent();break;case"downloadFinished":case"adTimeChanged":case"timeChanged":this.handleTimeChangedEvent();break;case"seeking":this.handleSeekingEvent(c);break;case"timeshifting":this.handleTimeshiftEvent(c)}}),this.coordinator=c,c.addEventListener(this.onPlayerEvent)}destroy(){log$q.info("destroying media-session-service"),this.coordinator.removeEventListener(this.onPlayerEvent),this.reset()}reset(){log$q.info("resetting media-session-service"),setMediaSessionMetadata(null),this.resetMediaSessionActionHandler()}setupMediaSessionActionHandler(){setMediaSessionActionHandler("play",()=>{log$q.info("Play clicked via Media Session API"),this.coordinator.play()}),setMediaSessionActionHandler("pause",()=>{log$q.info("Pause clicked via Media Session API"),this.coordinator.pause()}),setMediaSessionActionHandler("seekto",c=>{if(this.isVOD()){let u=c.seekTime;if(log$q.info(`Seek to ${u} via Media Session API`),void 0!==u){let c=u+this.coordinator.getSeekableRange().start;this.coordinator.seek(c)}}else if(this.isDVR()){let u=c.seekTime;if(log$q.info(`Shift to ${u} via Media Session API`),void 0!==u){let c=u-Math.abs(this.coordinator.getMaxTimeShiftInSec());this.coordinator.timeShift(c)}}}),setMediaSessionActionHandler("seekbackward",()=>{this.isVOD()?(log$q.info(`Seek ${this.DEFAULT_MEDIA_SESSION_SEEK_SECONDS} backward`),this.coordinator.seekRelative(-this.DEFAULT_MEDIA_SESSION_SEEK_SECONDS)):this.isDVR()&&this.coordinator.getPlayerData()&&(log$q.info(`Shift ${this.DEFAULT_MEDIA_SESSION_SEEK_SECONDS} backward`),this.coordinator.seekOrTimeshiftRelative(-this.DEFAULT_MEDIA_SESSION_SEEK_SECONDS))}),setMediaSessionActionHandler("seekforward",()=>{this.isVOD()?(log$q.info(`Seek ${this.DEFAULT_MEDIA_SESSION_SEEK_SECONDS} forward`),this.coordinator.seekRelative(this.DEFAULT_MEDIA_SESSION_SEEK_SECONDS)):this.isDVR()&&(log$q.info(`Shift ${this.DEFAULT_MEDIA_SESSION_SEEK_SECONDS} forward`),this.coordinator.seekOrTimeshiftRelative(this.DEFAULT_MEDIA_SESSION_SEEK_SECONDS))})}resetMediaSessionActionHandler(){setMediaSessionActionHandler("play",null),setMediaSessionActionHandler("pause",null),setMediaSessionActionHandler("seekto",null),setMediaSessionActionHandler("seekbackward",null),setMediaSessionActionHandler("seekforward",null)}handlePlayEvent(){setMediaSessionMetadata({title:this.getTitle(),artist:this.getArtist(),album:this.getAlbum(),artwork:calculateMediaSessionSrcSet(this.getPosterImageUrl())}),setMediaSessionPlaybackState("playing"),this.setupMediaSessionActionHandler()}handlePausedEvent(){setMediaSessionPlaybackState("paused")}handleTimeChangedEvent(){if(this.isVOD()){let c=this.coordinator.getPlayerData();if(c){let u=c.getDurationInSec(),d=c.getPlaybackSpeed(),p=c.getCurrentTimeInSec(),h=this.getAdjustedPosition(p,u);setMediaSessionPositionState(u,d,h)}return}if(this.isLinear())return void setMediaSessionPositionState(SECONDS_OF_DAY,1,this.getCurrentTimeInSeconds());if(this.isDVR()){let c=this.coordinator.getPlayerData();if(c){let u=c.getCurrentTimeInSec(),d=Math.abs(this.coordinator.getMaxTimeShiftInSec()),p=c.getPlaybackSpeed(),h=d-Math.abs(u),f=this.getAdjustedPosition(h,d);setMediaSessionPositionState(d,p,f)}return}}handleSeekingEvent(c){let u=this.coordinator.getPlayerData();if(u&&this.isVOD()){let d=u.getDurationInSec(),p=u.getPlaybackSpeed(),{targetPosition:h}=c,{start:f}=this.coordinator.getSeekableRange(),m=this.getAdjustedPosition(h-f,d);setMediaSessionPositionState(d,p,m)}}handleTimeshiftEvent(c){let u=this.coordinator.getPlayerData();if(u){let d=u.getCurrentTimeInSec(),p=Math.abs(this.coordinator.getMaxTimeShiftInSec()),h=u.getPlaybackSpeed(),f=p-Math.abs(d-c.playbackPosition),m=this.getAdjustedPosition(f,p);setMediaSessionPositionState(p,h,m)}}getCurrentTimeInSeconds(){let c=new Date;return c.getSeconds()+c.getMinutes()*SECONDS_OF_MINUTE+c.getHours()*SECONDS_OF_HOUR}getTitle(){return resolveMediaMetaData(this.coordinator).title}getArtist(){return resolvePlayerConfigurationData(this.coordinator).mediaSessionArtist}getAlbum(){return resolveMediaMetaData(this.coordinator).label}getPosterImageUrl(){let c=resolvePlayerConfigurationData(this.coordinator),u=resolveMediaMetaData(this.coordinator);return isVideoPlayerMetadata(c)?u.posterImageUrl:u.coverArt}isVOD(){var c;return(null==(c=this.coordinator.getPlayerData())?void 0:c.getPlaybackMode())==="VOD"}isLinear(){return isLiveLinearResolver(this.coordinator.getPlayerData())}isDVR(){return isLiveDvrResolver(this.coordinator.getPlayerData())}getAdjustedPosition(c,u){return Math.min(Math.max(0,c),u)}}let log$p=loglevelExports.getLogger("HookService");class HookService{constructor(c){this.hooks=c}async callHookMethod(c,u,d,p){if(c){log$p.debug("calling hook",c.name,"hook:",c);try{return await c(u,d,p)}catch(u){log$p.error("error calling hook",c.name,"on",c,"error",u)}}return u}async beforeLoad(c,u,d){var p;let h=c;for(let c of this.hooks)h=await this.callHookMethod(null==(p=c.onBeforeLoad)?void 0:p.bind(c),h,u,d)??h;return h}async afterLoad(c,u,d){var p;let h=c;for(let c of this.hooks)h=await this.callHookMethod(null==(p=c.onAfterLoad)?void 0:p.bind(c),h,u,d)??h;return h}async beforeDestroy(c,u,d){var p;let h=c;for(let c of this.hooks)h=await this.callHookMethod(null==(p=c.destroy)?void 0:p.bind(c),h??{},u??{},d);return h}}var t$5,r$k,u$4,i$8,o$h=0,f$6=[],c$c=[],e$3=l$c.__b,a$d=l$c.__r,v$3=l$c.diffed,l$a=l$c.__c,m$6=l$c.unmount;function d$5(c,u){l$c.__h&&l$c.__h(r$k,c,o$h||u),o$h=0;var d=r$k.__H||(r$k.__H={__:[],__h:[]});return c>=d.__.length&&d.__.push({__V:c$c}),d.__[c]}function h$3(c){return o$h=1,s$4(B$4,c)}function s$4(c,u,d){var p=d$5(t$5++,2);if(p.t=c,!p.__c&&(p.__=[d?d(u):B$4(void 0,u),function(c){var u=p.__N?p.__N[0]:p.__[0],d=p.t(u,c);
1u!==d&&(p.__N=[d,p.__[1]],p.__c.setState({}))}],p.__c=r$k,!r$k.u)){var h=function(c,u,d){if(!p.__c.__H)return!0;var h=p.__c.__H.__.filter(function(c){return c.__c});if(h.every(function(c){return!c.__N}))return!f||f.call(this,c,u,d);var m=!1;return h.forEach(function(c){if(c.__N){var u=c.__[0];c.__=c.__N,c.__N=void 0,u!==c.__[0]&&(m=!0)}}),!(!m&&p.__c.props===c)&&(!f||f.call(this,c,u,d))};r$k.u=!0;var f=r$k.shouldComponentUpdate,m=r$k.componentWillUpdate;r$k.componentWillUpdate=function(c,u,d){if(this.__e){var p=f;f=void 0,h(c,u,d),f=p}m&&m.call(this,c,u,d)},r$k.shouldComponentUpdate=h}return p.__N||p.__}function p$7(c,u){var d=d$5(t$5++,3);!l$c.__s&&z$4(d.__H,u)&&(d.__=c,d.i=u,r$k.__H.__h.push(d))}function y$3(c,u){var d=d$5(t$5++,4);!l$c.__s&&z$4(d.__H,u)&&(d.__=c,d.i=u,r$k.__h.push(d))}function _$3(c){return o$h=5,F$4(function(){return{current:c}},[])}function A$3(c,u,d){o$h=6,y$3(function(){return"function"==typeof c?(c(u()),function(){return c(null)}):c?(c.current=u(),function(){return c.current=null}):void 0},null==d?d:d.concat(c))}function F$4(c,u){var d=d$5(t$5++,7);return z$4(d.__H,u)?(d.__V=c(),d.i=u,d.__h=c,d.__V):d.__}function T$4(c,u){return o$h=8,F$4(function(){return c},u)}function q$2(c){var u=r$k.context[c.__c],d=d$5(t$5++,9);return d.c=c,u?(null==d.__&&(d.__=!0,u.sub(r$k)),u.props.value):c.__}function b$4(){for(var c;c=f$6.shift();)if(c.__P&&c.__H)try{c.__H.__h.forEach(k$4),c.__H.__h.forEach(w$5),c.__H.__h=[]}catch(u){c.__H.__h=[],l$c.__e(u,c.__v)}}l$c.__b=function(c){r$k=null,e$3&&e$3(c)},l$c.__r=function(c){a$d&&a$d(c),t$5=0;var u=(r$k=c.__c).__H;u&&(u$4===r$k?(u.__h=[],r$k.__h=[],u.__.forEach(function(c){c.__N&&(c.__=c.__N),c.__V=c$c,c.__N=c.i=void 0})):(u.__h.forEach(k$4),u.__h.forEach(w$5),u.__h=[],t$5=0)),u$4=r$k},l$c.diffed=function(c){v$3&&v$3(c);var u=c.__c;u&&u.__H&&(u.__H.__h.length&&(1!==f$6.push(u)&&i$8===l$c.requestAnimationFrame||((i$8=l$c.requestAnimationFrame)||j$3)(b$4)),u.__H.__.forEach(function(c){c.i&&(c.__H=c.i),c.__V!==c$c&&(c.__=c.__V),c.i=void 0,c.__V=c$c})),u$4=r$k=null},l$c.__c=function(c,u){u.some(function(c){try{c.__h.forEach(k$4),c.__h=c.__h.filter(function(c){return!c.__||w$5(c)})}catch(d){u.some(function(c){c.__h&&(c.__h=[])}),u=[],l$c.__e(d,c.__v)}}),l$a&&l$a(c,u)},l$c.unmount=function(c){m$6&&m$6(c);var u,d=c.__c;d&&d.__H&&(d.__H.__.forEach(function(c){try{k$4(c)}catch(c){u=c}}),d.__H=void 0,u&&l$c.__e(u,d.__v))};var g$6="function"==typeof requestAnimationFrame;function j$3(c){var u,d=function(){clearTimeout(p),g$6&&cancelAnimationFrame(u),setTimeout(c)},p=setTimeout(d,100);g$6&&(u=requestAnimationFrame(d))}function k$4(c){var u=r$k,d=c.__c;"function"==typeof d&&(c.__c=void 0,d()),r$k=u}function w$5(c){var u=r$k;c.__c=c.__(),r$k=u}function z$4(c,u){return!c||c.length!==u.length||u.some(function(u,d){return u!==c[d]})}function B$4(c,u){return"function"==typeof u?u(c):u}let useGetTagName=c=>{var u;let d=_$3();if(d.current)return d.current;let p=null==(u=c.current)?void 0:u.getRootNode();if(p&&"host"in p)return d.current=p.host.tagName.toLocaleLowerCase(),d.current},logger$3=loglevelExports.getLogger("UsageReport"),filterOutSubdomainsRegex=/^(?:.*?\.)?([a-zA-Z0-9\-_]{3,}\.(?:\w{2,8}|\w{2,4}\.\w{2,4}))$/;function getLocation(){var c,u;try{let{hostname:d,href:p}=window.location;return{platform:(null==(u=null==(c=filterOutSubdomainsRegex.exec(d))?void 0:c.groups)?void 0:u[1])??d,location:p}}catch(u){let c=resolveErrorMessageFromUnknown(u);return logger$3.warn({message:"failed to resolve host",error:c}),{}}}let useReportUsage=(c,u)=>{let d=_$3(!1),p=useGetTagName(c),{location:h,platform:f}=getLocation();if(d.current)return!1;if(p&&f){d.current=!0;let c=calculateSsdmUrl(u??"PRODUCTION"),m={package:p,version:CORE_VERSION,platform:f,location:h,importType:"npm"};return fetch(`${c}/report-usage?${new URLSearchParams(m)}`).then(c=>logger$3.info({message:"reported usage",queryParams:m,response:c})).catch(c=>{let u=resolveErrorMessageFromUnknown(c);logger$3.warn({message:"failed in reporting usage",queryParams:m,error:u})}),!0}return!1};function getFacebookHref(c){return`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(c)}`}function getPinterestHref(c,u="",d=""){return`https://pinterest.com/pin/create/button/?url=${encodeURIComponent(c)}&media=${encodeURIComponent(d)}&description=${encodeURIComponent(u)}`}function getRedditHref(c){return`https://www.reddit.com/submit?url=${encodeURIComponent(c)}`}function getTwitterHref(c,u=""){return`https://x.com/intent/tweet?url=${encodeURIComponent(c)}&text=${encodeURIComponent(u)}`}let QUERY_PARAM_MEDIA_TIME="rbup-media-time",QUERY_PARAM_MEDIA_ID="rbup-media-id",QUERY_PARAM_MEDIA_TIME_FALLBACK="time";
1function getPageUrl(c,u,d){if(d){let p=new URL(c),h=p.searchParams;return h.set(QUERY_PARAM_MEDIA_TIME,String(d)),h.set(QUERY_PARAM_MEDIA_ID,u),p.href}return c}class QueryParamUrlSharingStrategy{calculateShareUrl(c,u){let d=getPageUrl(this.calculateBaseUrl(),u.assetId,u.mediaPositionInSec);switch(c){case"FACEBOOK":return getFacebookHref(d);case"PINTEREST":return getPinterestHref(d,u.title,u.imageUrl);case"REDDIT":return getRedditHref(d);case"TWITTER":return getTwitterHref(d,u.title);case"PAGE":return d;default:throw Error(`unexpected share service ${c}`)}}determineInitialSeek(c){let u=window.location.search;if(!u)return;let d=new URLSearchParams(u),p=d.get(QUERY_PARAM_MEDIA_TIME);if(d.get(QUERY_PARAM_MEDIA_ID)===c&&p){let c=parseInt(p,10);if(!isNaN(c))return c}let h=d.get(QUERY_PARAM_MEDIA_TIME_FALLBACK);if(h){let c=parseInt(h,10);if(!isNaN(c))return c}}isSharingEnabled(){return!!this.calculateBaseUrl()}calculateBaseUrl(){return window.location.href}}let de={"ad-endsin":"Werbung endet in {{sec}} Sekunden","audio-mediaInfo-episodeText":"E{{episodeNumber}}","audio-mediaInfo-seasonText":"S{{seasonNumber}}","audio-podcast-listenOn":"Anhören auf","button-close":"Schließen","button-closeMenu":"Menü schließen","error-default-message":"Dieses Video ist leider nicht verfügbar.","error-fsk-message":"Dieses Video ist erst ab {{hour}} Uhr verfügbar.","error-fsk-title":"Freigegeben ab {{age}} Jahren","error-geo-message":"Dieses Video ist in Ihrem Land leider nicht verfügbar.","error-geo-title":"Länderbeschränkung","error-missed-message":"Dieses Video ist leider nicht mehr verfügbar.","error-missed-title":"Schade verpasst","error-unauthorized-message":"Leider dürfen Sie diesen Content nicht sehen.","error-unauthorized-title":"Nicht autorisiert","error-upcoming-message":"Dieses Video kann ab {{localizedDate}} Uhr abgespielt werden.","error-upcoming-title":"Bald verfügbar","endslate-title":"Ähnliche Videos","endslate-replay":"Nochmal abspielen","global-month-short-april":"Apr","global-month-short-august":"Aug","global-month-short-december":"Dez","global-month-short-february":"Feb","global-month-short-january":"Jän","global-month-short-july":"Jul","global-month-short-june":"Jun","global-month-short-march":"Mär","global-month-short-may":"Mai","global-month-short-november":"Nov","global-month-short-october":"Okt","global-month-short-september":"Sep","liveStream-airedOn":"Ausgestrahlt am {{date}}","liveStream-canceled":"Abgesagt","liveStream-days":"Tage","liveStream-backToEvent":"Zurück zum Event Hub","liveStream-hours":"Stunden","liveStream-minutes":"Minuten","liveStream-seconds":"Sekunden","liveStream-trimming":"Replay in Kürze verfügbar","liveStream-unconfirmed":"Unbestätigt","liveStream-seekBackToLive":"Zurück zu Live","liveStream-live":"Live","menu-audioTracks":"Tonspuren","menu-feedback":"Rückmeldung geben","menu-quality":"Qualität","menu-quality-auto":"Automatisch","menu-sharing":"Teilen","menu-sharing-copied":"Kopiert","menu-sharing-copyLink":"Link kopieren","menu-sharing-embed":"Embed kopieren","menu-sharing-facebook":"Facebook","menu-sharing-pinterest":"Pinterest","menu-sharing-playFrom":"Abspielen von","menu-sharing-reddit":"Reddit","menu-sharing-twitter":"Twitter","menu-speeds":"Geschwindigkeit","menu-speeds-normal":"Normal","menu-subtitles":"Untertitel","menu-subtitles-off":"Aus","multiChannel-singleStreamLive":"{{figure}} Stream live","multiChannel-multipleStreamsLive":"{{figure}} Streams live","multiChannel-seeSchedule":"Alle Livestreams","multiChannel-schedule":"Livestreams","multiChannel-label-live":"Jetzt live","multiChannel-label-liveIn":"Live in","multiChannel-label-replay":"Aufzeichnung verfügbar","multiChannel-label-trim":"Aufzeichnung bald verfügbar","multiChannel-label-nowWatching":"Das siehst du gerade","nerdMode-assetId":"Asset ID","nerdMode-copyId":"Kopiere ID","nerdMode-crepoId":"CRID","nerdMode-geolocation":"Abgeleitete Geo","nerdMode-idCopied":"ID kopiert","nerdMode-playerVersion":"Player Version","nerdMode-techVersion":"Bitmovin Version","nerdMode-rendition":"Aktuelle Qualität","nerdMode-unknownValue":"unbekannt","nextVideoCountdown-replay":"Nochmal ansehen","nextVideoCountdown-title":"Als nächstes","rbcom-subtitlesAvailable":"Untertitel verfügbar","tooltip-airplay":"AirPlay","tooltip-audioTracks":"Tonspuren","tooltip-ch
1angeVolume":"Lautstärke anpassen","tooltip-dvr":"Zurück zu LIVE","tooltip-forward":"Vorspulen","tooltip-fullscreen":"Vollbild","tooltip-loading":"Laden","tooltip-mute":"Ton aus","tooltip-normalscreen":"Vollbild beenden","tooltip-pause":"Pausieren","tooltip-pip":"Bild in Bild","tooltip-play":"Abspielen","tooltip-replay":"Nochmal ansehen","tooltip-rewind":"Zurückspulen","tooltip-settings":"Einstellungen","tooltip-subtitles":"Untertitel","tooltip-unmute":"Ton an","ad-from-ads":"Werbung {{adPosition}} von {{totalAds}}","audio-duration-hour":"Std.","audio-duration-minute":"Min.","audio-error-default-description":"Diese Podcast-Episode ist nicht mehr verfügbar. Vielleicht wurde sie gelöscht oder entfernt. Schau später nochmal vorbei oder entdecke andere Podcasts.","audio-error-default-title":"Inhalt ist nicht verfügbar","audio-podcast-currently-playing":"Läuft gerade","audio-podcast-playlist-additional-episodes-on":"{{additionalEpisodes}} weitere Folge auf","audio-podcast-playlist-additional-episodes-on_plural":"{{additionalEpisodes}} weitere Folgen auf","audio-podcast-playlist-all-episodes-on":"Alle Folgen auf","nerdMode-audioLanguageOverride":"Audiosprache Überschreibung","nerdMode-localeStorage":"Locale storage","nerdMode-overrideReference":"Überschreibungs Referenz","nerdMode-playerConfiguration":"Player-Konfiguration","nerdMode-subtitlesLanguageOverride":"Untertitel Überschreibung","nerdMode-translationsLanguageOverride":"Übersetzungen Überschreibung","stv-reduce-ads":"Werbung reduzieren","tooltip-stop":"Stop","menu-multi-stream":"Multi Stream","tooltip-multi-stream":"Multi Stream","tooltip-casting":"Übertragen","streaming-tab-info":"Infos","streaming-tab-event-breakdown":"Eventübersicht","streaming-tab-interactive-stats":"Interaktive Statistiken","start-over":"Neu starten","streaming-tab-playlist":"Playlist","watch-on-linkout-button":"Ansehen auf","error-drm-message":"Bitte laden Sie den Stream neu.","playing-on-device":"Wiedergabe auf {{deviceName}}"},en$1={"ad-endsin":"Ad ends in {{sec}} seconds","audio-mediaInfo-episodeText":"E{{episodeNumber}}","audio-mediaInfo-seasonText":"S{{seasonNumber}}","audio-podcast-listenOn":"Listen on","button-close":"Close","button-closeMenu":"Close menu","error-default-message":"This video is currently unavailable.","error-fsk-message":"This video is only allowed for playback from {{hour}}:00.","error-fsk-title":"Released to age {{age}}","error-geo-message":"This video is not available in your country.","error-geo-title":"Geo restricted","error-missed-message":"This video is not available anymore.","error-missed-title":"You've missed it","error-unauthorized-message":"You have insufficient rights to watch this content.","error-unauthorized-title":"Unauthorized","error-upcoming-message":"This video is available from {{localizedDate}}.","error-upcoming-title":"Upcoming","endslate-title":"Related videos","endslate-replay":"Replay video","global-month-short-april":"Apr","global-month-short-august":"Aug","global-month-short-december":"Dec","global-month-short-february":"Feb","global-month-short-january":"Jan","global-month-short-july":"Jul","global-month-short-june":"Jun","global-month-short-march":"Mar","global-month-short-may":"May","global-month-short-november":"Nov","global-month-short-october":"Oct","global-month-short-september":"Sep","liveStream-airedOn":"Aired on {{date}}","liveStream-canceled":"Cancelled","liveStream-days":"Days","liveStream-backToEvent":"Back to Event Hub","liveStream-hours":"Hours","liveStream-minutes":"Minutes","liveStream-seconds":"Seconds","liveStream-trimming":"Awaiting replay","liveStream-unconfirmed":"Unconfirmed","liveStream-seekBackToLive":"Back to Live","liveStream-live":"Live","menu-audioTracks":"Audio Language","menu-feedback":"Give feedback","menu-quality":"Quality","menu-quality-auto":"Auto","menu-sharing":"Share","menu-sharing-copied":"Copied","menu-sharing-copyLink":"Copy link","menu-sharing-embed":"Copy embed","menu-sharing-facebook":"Facebook","menu-sharing-pinterest":"Pinterest","menu-sharing-playFrom":"Play from","menu-sharing-reddit":"Reddit","menu-sharing-twitter":"Twitter","menu-speeds":"Speed","menu-speeds-normal":"Normal","menu-subtitles":"Subtitles","menu-subtitles-off":"Off","multiChannel-singleStreamLive":"{{figure}} stream live","multiChannel-multipleStreamsLive":"{{figure}} streams live","multiChannel-seeSchedule":"See schedule","multiChannel-schedule":"Live streams","multiChannel-label-live":"Live now","multiChannel-label-liveIn":"Live in","multiChannel-label-replay":"Replay available","multiChannel-label-trim":"Awaiting replay","multiChannel-label-nowWatching":"You are now watching","nerdMode-assetId":"Asset ID","nerdMode-copyId":"Copy ID","nerdMode-crepoId":"CRID","nerdMode-geolocation":"Derived geolocation","nerdMode-idCopied":"ID copied to clipboard","nerdMode-playerVersion":"Player Version","nerdMode-techVersion":"Bitmovin Version","nerdMode-rendition":"Current Rendition","nerdMode-unknownValue":"unknown","nextVideoCountdown-replay":"Replay","nextVideoCountdown-title":"Up next","rbcom-subtitlesAvailable":"Subtitles Available","tooltip-airplay":"AirPlay","tooltip-audioTracks":"Audio Language","tooltip-ch
1angeVolume":"Change Volume","tooltip-dvr":"Return to LIVE","tooltip-forward":"Seek forward","tooltip-fullscreen":"Enter Fullscreen","tooltip-loading":"Loading","tooltip-mute":"Mute","tooltip-normalscreen":"Leave Fullscreen","tooltip-pause":"Pause","tooltip-pip":"Picture In Picture","tooltip-play":"Play","tooltip-replay":"Replay","tooltip-rewind":"Seek back","tooltip-settings":"Settings","tooltip-subtitles":"Subtitles","tooltip-unmute":"Unmute","ad-from-ads":"Ad {{adPosition}} of {{totalAds}}","audio-duration-hour":"hr","audio-duration-minute":"min","audio-error-default-description":"This podcast episode is no longer available. It may have been deleted or made unavailable by the provider. Please check back later or explore other podcasts.","audio-error-default-title":"Content is not available","audio-podcast-currently-playing":"Currently playing","audio-podcast-playlist-additional-episodes-on":"{{additionalEpisodes}} additional episode on","audio-podcast-playlist-additional-episodes-on_plural":"{{additionalEpisodes}} additional episodes on","audio-podcast-playlist-all-episodes-on":"All episodes on","nerdMode-audioLanguageOverride":"Audio language override","nerdMode-localeStorage":"Locale storage","nerdMode-overrideReference":"Override reference","nerdMode-playerConfiguration":"Player config","nerdMode-subtitlesLanguageOverride":"Subtitles language override","nerdMode-translationsLanguageOverride":"Translations language override","stv-reduce-ads":"Reduce ads","tooltip-stop":"Stop","menu-multi-stream":"Multi Stream","tooltip-multi-stream":"Multi Stream","tooltip-casting":"Cast","streaming-tab-info":"Info","streaming-tab-event-breakdown":"Event Breakdown","streaming-tab-interactive-stats":"Interactive Stats","start-over":"Start over","streaming-tab-playlist":"Playlist","watch-on-linkout-button":"Watch on","error-drm-message":"Please reload the stream.","playing-on-device":"Playing on {{deviceName}}"},TRANSLATION_BASE_URL="https://translations.redbull.com/player/",logger$2=loglevelExports.getLogger("TranslationService");class TranslationService{constructor(){yi(this,"translationsLoaded",!1),yi(this,"translationsLoadedCallback"),yi(this,"preferredLanguage"),yi(this,"currentTranslationData")}getTranslationForKey(c){return this.getTranslationFile()[c]||this.getFallbackTranslation(this.preferredLanguage??getBrowserLanguage())[c]}async fetchTranslationData(c){try{let u=await fetch(`${TRANSLATION_BASE_URL}${c}`,{redirect:"manual"});if(u.ok)return await u.json()}catch{logger$2.debug(`Could not load translations for ${c} using fallback instead`)}return this.getFallbackTranslation(c)}getTranslationFile(){let c=this.preferredLanguage??getBrowserLanguage();return this.currentTranslationData??this.getFallbackTranslation(c)}
1getFallbackTranslation(c){return null!=c&&c.startsWith("de")?de:en$1}async setAndFetchCurrentLanguage(c){let u=c??getBrowserLanguage(),d=await this.fetchTranslationData(u);return this.preferredLanguage=u,this.currentTranslationData=d,Promise.resolve()}}let translationService=new TranslationService;async function fetchBrowserOrConfiguredTranslationLanguage(c){return translationService.translationsLoaded=!1,await translationService.setAndFetchCurrentLanguage(c).then(()=>{translationService.translationsLoaded=!0,translationService.translationsLoadedCallback&&translationService.translationsLoadedCallback()})}function onTranslationDataLoaded(c){translationService.translationsLoadedCallback=c}function areTranslationsLoaded(){return translationService.translationsLoaded}function translate(c,u={}){let d=translationService.getTranslationForKey(c);return Object.keys(u).reduce((c,d)=>c.replace(`{{${d}}}`,u[d]),d)}let hotKey={"tooltip-fullscreen":KEYCODE_F,"tooltip-normalscreen":KEYCODE_F,"tooltip-pip":KEYCODE_I,"tooltip-play":KEYCODE_K,"tooltip-pause":KEYCODE_K,"tooltip-mute":KEYCODE_M,"tooltip-unmute":KEYCODE_M};function translateWithHotKey(c){let u=translate(c),d=hotKey[c];return d?`${u} [${d}]`:u}loglevelExports.getLogger("ScriptLoader");let log$o=loglevelExports.getLogger("CommonThumbnailService");class CommonThumbnailService{constructor(){yi(this,"thumbnailSprites"),yi(this,"currentThumbnailTrack"),yi(this,"thumbnailDetails"),yi(this,"currentResolution")}setThumbnailSprites(c){this.thumbnailSprites=c}async setThumbnail(c,u,d){let{imgContainerElement:p,imgElement:h,textContainerElement:f}=c;if(null===p||null===h||null===f)return!1;let{smallOrBigger:m,mediumOrBigger:g}=u,v=await this.getThumbnailDetail(g?"HIGH":"LOW",d);return!!v&&(this.styleImageContainerElement(p,v,m),this.styleImageElement(h,v),this.styleTextContainer(f,v),!0)}styleImageContainerElement(c,u,d){c.style.width=`${u.width}px`,c.style.height=`${!d?.85*u.height:u.height}px`}styleImageElement(c,u){c.src=u.thumbnailUrl,c.style.left=`-${u.x}px`,c.style.top=`-${u.y}px`}styleTextContainer(c,u){c.style.maxWidth=`${u.width}px`}async getThumbnailDetail(c,u){return c!==this.currentResolution&&(this.thumbnailDetails=void 0,await this.loadThumbnailTrack(c),this.currentResolution=c),this.getRequestedThumbnailDetail(c,u)}async loadThumbnailTrack(c){var u,d;let p="LOW"===c?null==(u=this.thumbnailSprites)?void 0:u.lowRes:null==(d=this.thumbnailSprites)?void 0:d.highRes;this.currentThumbnailTrack=await this.fetchThumbnailTrack(p).catch(()=>{log$o.warn("Error loading thumbnail track ",p)})}getRequestedThumbnailDetail(c,u){var d,p,h;let f="LOW"===c?null==(d=this.thumbnailSprites)?void 0:d.lowRes:null==(p=this.thumbnailSprites)?void 0:p.highRes;return this.thumbnailDetails||(this.thumbnailDetails=this.calculatedThumbnailDetail(f)),null==(h=this.thumbnailDetails)?void 0:h.find(c=>u<=c.displayTo)}calculatedThumbnailDetail(c){if(!c)return;let u=this.currentThumbnailTrack,d=null==u?void 0:u.match(/(\d{2}:\d{2}:\d{2}\.\d+) +--> +(\d{2}:\d{2}:\d{2}\.\d+)[\r\n]+([^\r\n]*)/g);return null==d?void 0:d.map(u=>{let d=this.calculateDisplayTime(u),p=this.calculateFileUrl(c,u),h=this.calculateThumbnailPosition(u);return{...d,...h,thumbnailUrl:p}})}async fetchThumbnailTrack(c){if(!c)return;let u=await fetch(c);if(u.ok)return await u.text();throw Error(`server returned ${u.status}`)}calculateFileUrl(c,u){var d;let p=(null==(d=u.match(/[0-9]+\.[a-z]{3}/))?void 0:d[0])??"";return c.replace(/([^/]+$)/,p)}calculateThumbnailPosition(c){var u;let d=null==(u=/#xywh=(\d+),(\d+),(\d+),(\d+)/.exec(c))?void 0:u.slice(1,5);return{x:Number(null==d?void 0:d[0]),y:Number(null==d?void 0:d[1]),width:Number(null==d?void 0:d[2]),height:Number(null==d?void 0:d[3])}}calculateDisplayTime(c){let u=c.match(/(\d{2}:\d{2}:\d{2}\.*?)/g),d=(null==u?void 0:u[0])??"",p=(null==u?void 0:u[1])??"";return{displayFrom:convertTimeStringToSec(d),displayTo:convertTimeStringToSec(p)}}}function g$5(c,u){for(var d in u)c[d]=u[d];return c}function C$3(c,u){for(var d in c)if("__source"!==d&&!(d in u))return!0;for(var p in u)if("__source"!==p&&c[p]!==u[p])return!0;return!1}function w$4(c){this.props=c}function x$5(c,u){function d(c){var d=this.props.ref,p=d==c.ref;
vendor: 4,232 bytes, line 1
1return!p&&d&&(d.call?d(null):d.current=null),u?!u(this.props,c)||!p:C$3(this.props,c)}function p(u){return this.shouldComponentUpdate=d,y$4(c,u)}return p.displayName="Memo("+(c.displayName||c.name)+")",p.prototype.isReactComponent=!0,p.__f=!0,p}(w$4.prototype=new b$5).isPureReactComponent=!0,w$4.prototype.shouldComponentUpdate=function(c,u){return C$3(this.props,c)||C$3(this.state,u)};var R$3=l$c.__b;l$c.__b=function(c){c.type&&c.type.__f&&c.ref&&(c.props.ref=c.ref,c.ref=null),R$3&&R$3(c)};var N$3="u">typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function k$3(c){function u(u){var d=g$5({},u);return delete d.ref,c(d,u.ref||null)}return u.$$typeof=N$3,u.render=u,u.prototype.isReactComponent=u.__f=!0,u.displayName="ForwardRef("+(c.displayName||c.name)+")",u}var T$3=l$c.__e;l$c.__e=function(c,u,d,p){if(c.then){for(var h,f=u;f=f.__;)if((h=f.__c)&&h.__c)return null==u.__e&&(u.__e=d.__e,u.__k=d.__k),h.__c(c,u)}T$3(c,u,d,p)};var I$3=l$c.unmount;function L$3(c,u,d){return c&&(c.__c&&c.__c.__H&&(c.__c.__H.__.forEach(function(c){"function"==typeof c.__c&&c.__c()}),c.__c.__H=null),null!=(c=g$5({},c)).__c&&(c.__c.__P===d&&(c.__c.__P=u),c.__c=null),c.__k=c.__k&&c.__k.map(function(c){return L$3(c,u,d)})),c}function U$2(c,u,d){return c&&(c.__v=null,c.__k=c.__k&&c.__k.map(function(c){return U$2(c,u,d)}),c.__c&&c.__c.__P===u&&(c.__e&&d.insertBefore(c.__e,c.__d),c.__c.__e=!0,c.__c.__P=d)),c}function D$3(){this.__u=0,this.t=null,this.__b=null}function F$3(c){var u=c.__.__c;return u&&u.__a&&u.__a(c)}function V$1(){this.u=null,this.o=null}l$c.unmount=function(c){var u=c.__c;u&&u.__R&&u.__R(),u&&!0===c.__h&&(c.type=null),I$3&&I$3(c)},(D$3.prototype=new b$5).__c=function(c,u){var d=u.__c,p=this;null==p.t&&(p.t=[]),p.t.push(d);var h=F$3(p.__v),f=!1,m=function(){f||(f=!0,d.__R=null,h?h(g):g())};d.__R=m;var g=function(){if(!--p.__u){if(p.state.__a){var c,u=p.state.__a;p.__v.__k[0]=U$2(u,u.__c.__P,u.__c.__O)}for(p.setState({__a:p.__b=null});c=p.t.pop();)c.forceUpdate()}},v=!0===u.__h;p.__u++||v||p.setState({__a:p.__b=p.__v.__k[0]}),c.then(m,m)},D$3.prototype.componentWillUnmount=function(){this.t=[]},D$3.prototype.render=function(c,u){if(this.__b){if(this.__v.__k){var d=document.createElement("div"),p=this.__v.__k[0].__c;this.__v.__k[0]=L$3(this.__b,d,p.__O=p.__P)}this.__b=null}var h=u.__a&&y$4(k$5,null,c.fallback);return h&&(h.__h=null),[y$4(k$5,null,u.__a?null:c.children),h]};var W$2=function(c,u,d){if(++d[1]===d[0]&&c.o.delete(u),c.props.revealOrder&&("t"!==c.props.revealOrder[0]||!c.o.size))for(d=c.u;d;){for(;d.length>3;)d.pop()();if(d[1]<d[0])break;c.u=d=d[2]}};(V$1.prototype=new b$5).__a=function(c){var u=this,d=F$3(u.__v),p=u.o.get(c);return p[0]++,function(h){var f=function(){u.props.revealOrder?(p.push(h),W$2(u,c,p)):h()};d?d(f):f()}},V$1.prototype.render=function(c){this.u=null,this.o=new Map;var u=S$3(c.children);c.revealOrder&&"b"===c.revealOrder[0]&&u.reverse();for(var d=u.length;d--;)this.o.set(u[d],this.u=[1,0,this.u]);return c.children},V$1.prototype.componentDidUpdate=V$1.prototype.componentDidMount=function(){var c=this;this.o.forEach(function(u,d){W$2(c,d,u)})};var B$3="u">typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,H$3=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Z$1=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Y$1=/[A-Z0-9]/g,$$2="u">typeof document,q$1=function(c){return("u">typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(c)};b$5.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(c){Object.defineProperty(b$5.prototype,c,{configurable:!0,get:function(){return this["UNSAFE_"+c]},set:function(u){Object.defineProperty(this,c,{configurable:!0,writable:!0,value:u})}})});var K$1=l$c.event;function Q$1(){}function X$1(){return this.cancelBubble}function nn(){return this.defaultPrevented}l$c.event=function(c){return K$1&&(c=K$1(c)),c.persist=Q$1,c.isPropagationStopped=X$1,c.isDefaultPrevented=nn,c.nativeEvent=c};
1var en={enumerable:!1,configurable:!0,get:function(){return this.class}},rn=l$c.vnode;l$c.vnode=function(c){"string"==typeof c.type&&function(c){var u=c.props,d=c.type,p={};for(var h in u){var f=u[h];if(!("value"===h&&"defaultValue"in u&&null==f||$$2&&"children"===h&&"noscript"===d||"class"===h||"className"===h)){var m=h.toLowerCase();"defaultValue"===h&&"value"in u&&null==u.value?h="value":"download"===h&&!0===f?f="":"ondoubleclick"===m?h="ondblclick":"onchange"!==m||"input"!==d&&"textarea"!==d||q$1(u.type)?"onfocus"===m?h="onfocusin":"onblur"===m?h="onfocusout":Z$1.test(h)?h=m:-1===d.indexOf("-")&&H$3.test(h)?h=h.replace(Y$1,"-$&").toLowerCase():null===f&&(f=void 0):m=h="oninput","oninput"===m&&p[h=m]&&(h="oninputCapture"),p[h]=f}}"select"==d&&p.multiple&&Array.isArray(p.value)&&(p.value=S$3(u.children).forEach(function(c){c.props.selected=-1!=p.value.indexOf(c.props.value)})),"select"==d&&null!=p.defaultValue&&(p.value=S$3(u.children).forEach(function(c){c.props.selected=p.multiple?-1!=p.defaultValue.indexOf(c.props.value):p.defaultValue==c.props.value})),u.class&&!u.className?(p.class=u.class,Object.defineProperty(p,"className",en)):(u.className&&!u.class||u.class&&u.className)&&(p.class=p.className=u.className),c.props=p}(c),c.$$typeof=B$3,rn&&rn(c)};var un=l$c.__r;l$c.__r=function(c){un&&un(c),c.__c};var on=l$c.diffed;l$c.diffed=function(c){on&&on(c);var u=c.props,d=c.__e;null!=d&&"textarea"===c.type&&"value"in u&&u.value!==d.value&&(d.value=null==u.value?"":u.value)};var ResizeObserverBoxOptions,resizeObservers=[],hasActiveObservations=function(){return resizeObservers.some(function(c){return c.activeTargets.length>0})},hasSkippedObservations=function(){return resizeObservers.some(function(c){return c.skippedTargets.length>0})},msg="ResizeObserver loop completed with undelivered notifications.",deliverResizeLoopError=function(){var c;"function"==typeof ErrorEvent?c=new ErrorEvent("error",{message:msg}):((c=document.createEvent("Event")).initEvent("error",!1,!1),c.message=msg),window.dispatchEvent(c)};!function(c){c.BORDER_BOX="border-box",c.CONTENT_BOX="content-box",c.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(ResizeObserverBoxOptions||(ResizeObserverBoxOptions={}));var trigger,freeze=function(c){return Object.freeze(c)},ResizeObserverSize=function(c,u){this.inlineSize=c,this.blockSize=u,freeze(this)},DOMRectReadOnly=function(){function c(c,u,d,p){return this.x=c,this.y=u,this.width=d,this.height=p,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,freeze(this)}return c.prototype.toJSON=function(){return{x:this.x,y:this.y,top:this.top,right:this.right,bottom:this.bottom,left:this.left,width:this.width,height:this.height}},c.fromRect=function(u){return new c(u.x,u.y,u.width,u.height)},c}(),isSVG=function(c){return c instanceof SVGElement&&"getBBox"in c},isHidden=function(c){if(isSVG(c)){var u=c.getBBox(),d=u.width,p=u.height;return!d&&!p}var h=c.offsetWidth,f=c.offsetHeight;return!(h||f||c.getClientRects().length)},isElement$2=function(c){if(c instanceof Element)return!0;var u,d=null==(u=null==c?void 0:c.ownerDocument)?void 0:u.defaultView;return!!(d&&c instanceof d.Element)},isReplacedElement=function(c){switch(c.tagName){case"INPUT":if("image"!==c.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},global$1="u">typeof window?window:{},cache=new WeakMap,scrollRegexp=/auto|scroll/,verticalRegexp=/^tb|vertical/,IE=/msie|trident/i.test(global$1.navigator&&global$1.navigator.userAgent),parseDimension=function(c){return parseFloat(c||"0")},size=function(c,u,d){return void 0===c&&(c=0),void 0===u&&(u=0),void 0===d&&(d=!1),new ResizeObserverSize((d?u:c)||0,(d?c:u)||0)},zeroBoxes=freeze({devicePixelContentBoxSize:size(),borderBoxSize:size(),contentBoxSize:size(),contentRect:new DOMRectReadOnly(0,0,0,0)}),calculateBoxSizes=function(c,u){if(void 0===u&&(u=!1),cache.has(c)&&!u)return cache.get(c);if(isHidden(c))return cache.set(c,zeroBoxes),zeroBoxes;var d=getComputedStyle(c),p=isSVG(c)&&c.ownerSVGElement&&c.getBBox(),h=!IE&&"border-box"===d.boxSizing,f=verticalRegexp.test(d.writingMode||""),m=!p&&scrollRegexp.test(d.overflowY||""),g=!p&&scrollRegexp.test(d.overflowX||""),v=p?0:parseDimension(d.paddingTop),y=p?0:parseDimension(d.paddingRight),b=p?0:parseDimension(d.paddingBottom),S=p?0:parseDimension(d.paddingLeft),_=p?0:parseDimension(d.borderTopWidth),E=p?0:parseDimension(d.borderRightWidth),T=p?0:parseDimension(d.borderBottomWidth),w=p?0:parseDimension(d.borderLeftWidth),P=S+y,A=v+b,I=w+E,M=_+T,R=g?c.offsetHeight-M-c.clientHeight:0,k=m?c.offsetWidth-I-c.clientWidth:0,x=p?p.width:parseDimension(d.width)-(h?P+I:0)-k,C=p?p.height:parseDimension(d.height)-(h?A+M:0)-R,O=x+P+k+I,D=C+A+R+M,L=freeze({devicePixelContentBoxSize:size(Math.round(x*devicePixelRatio),Math.round(C*devicePixelRatio),f),borderBoxSize:size(O,D,f),contentBoxSize:size(x,C,f),contentRect:new DOMRectReadOnly(S,v,x,C)});return cache.set(c,L),L},calculateBoxSize=function(c,u,d){var p=calculateBoxSizes(c,d),h=p.borderBoxSize,f=p.contentBoxSize,m=p.devicePixelContentBoxSize;switch(u){case ResizeObserverBoxOptions.DEVICE_PIXEL_CONTENT_BOX:return m;case ResizeObserverBoxOptions.BORDER_BOX:return h;default:return f}},ResizeObserverEntry=function(c){var u=calculateBoxSizes(c);this.target=c,this.contentRect=u.contentRect,this.borderBoxSize=freeze([u.borderBoxSize]),this.contentBoxSize=freeze([u.contentBoxSize]),this.devicePixelContentBoxSize=freeze([u.devicePixelContentBoxSize])},calculateDepthForNode=function(c){if(isHidden(c))return 1/0;for(var u=0,d=c.parentNode;d;)u+=1,d=d.parentNode;return u},broadcastActiveObservations=function(){var c=1/0,u=[];
1resizeObservers.forEach(function(d){if(0!==d.activeTargets.length){var p=[];d.activeTargets.forEach(function(u){var d=new ResizeObserverEntry(u.target),h=calculateDepthForNode(u.target);p.push(d),u.lastReportedSize=calculateBoxSize(u.target,u.observedBox),h<c&&(c=h)}),u.push(function(){d.callback.call(d.observer,p,d.observer)}),d.activeTargets.splice(0,d.activeTargets.length)}});for(var d=0;d<u.length;d++)(0,u[d])();return c},gatherActiveObservationsAtDepth=function(c){resizeObservers.forEach(function(u){u.activeTargets.splice(0,u.activeTargets.length),u.skippedTargets.splice(0,u.skippedTargets.length),u.observationTargets.forEach(function(d){d.isActive()&&(calculateDepthForNode(d.target)>c?u.activeTargets.push(d):u.skippedTargets.push(d))})})},process$1=function(){var c=0;for(gatherActiveObservationsAtDepth(0);hasActiveObservations();)gatherActiveObservationsAtDepth(c=broadcastActiveObservations());return hasSkippedObservations()&&deliverResizeLoopError(),c>0},callbacks=[],notify=function(){return callbacks.splice(0).forEach(function(c){return c()})},queueMicroTask=function(c){if(!trigger){var u=0,d=document.createTextNode("");new MutationObserver(function(){return notify()}).observe(d,{characterData:!0}),trigger=function(){d.textContent="".concat(u?u--:u++)}}callbacks.push(c),trigger()},queueResizeObserver=function(c){queueMicroTask(function(){requestAnimationFrame(c)})},watching=0,isWatching=function(){return!!watching},CATCH_PERIOD=250,observerConfig={attributes:!0,characterData:!0,childList:!0,subtree:!0},events=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],time=function(c){return void 0===c&&(c=0),Date.now()+c}
1,scheduled=!1,Scheduler=function(){function c(){var c=this;this.stopped=!0,this.listener=function(){return c.schedule()}}return c.prototype.run=function(c){var u=this;if(void 0===c&&(c=CATCH_PERIOD),!scheduled){scheduled=!0;var d=time(c);queueResizeObserver(function(){var p=!1;try{p=process$1()}finally{if(scheduled=!1,c=d-time(),!isWatching())return;p?u.run(1e3):c>0?u.run(c):u.start()}})}},c.prototype.schedule=function(){this.stop(),this.run()},c.prototype.observe=function(){var c=this,u=function(){return c.observer&&c.observer.observe(document.body,observerConfig)};document.body?u():global$1.addEventListener("DOMContentLoaded",u)},c.prototype.start=function(){var c=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),events.forEach(function(u){return global$1.addEventListener(u,c.listener,!0)}))},c.prototype.stop=function(){var c=this;this.stopped||(this.observer&&this.observer.disconnect(),events.forEach(function(u){return global$1.removeEventListener(u,c.listener,!0)}),this.stopped=!0)},c}
1(),scheduler=new Scheduler,updateCount=function(c){!watching&&c>0&&scheduler.start(),(watching+=c)||scheduler.stop()},skipNotifyOnElement=function(c){return!isSVG(c)&&!isReplacedElement(c)&&"inline"===getComputedStyle(c).display},ResizeObservation=function(){function c(c,u){this.target=c,this.observedBox=u||ResizeObserverBoxOptions.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return c.prototype.isActive=function(){var c=calculateBoxSize(this.target,this.observedBox,!0);return skipNotifyOnElement(this.target)&&(this.lastReportedSize=c),this.lastReportedSize.inlineSize!==c.inlineSize||this.lastReportedSize.blockSize!==c.blockSize},c}(),ResizeObserverDetail=function(c,u){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=c,this.callback=u},observerMap=new WeakMap,getObservationIndex=function(c,u){for(var d=0;d<c.length;d+=1)if(c[d].target===u)return d;return -1},ResizeObserverController=function(){function c(){}return c.connect=function(c,u){var d=new ResizeObserverDetail(c,u);observerMap.set(c,d)},c.observe=function(c,u,d){var p=observerMap.get(c),h=0===p.observationTargets.length;0>getObservationIndex(p.observationTargets,u)&&(h&&resizeObservers.push(p),p.observationTargets.push(new ResizeObservation(u,d&&d.box)),updateCount(1),scheduler.schedule())},c.unobserve=function(c,u){var d=observerMap.get(c),p=getObservationIndex(d.observationTargets,u),h=1===d.observationTargets.length;p>=0&&(h&&resizeObservers.splice(resizeObservers.indexOf(d),1),d.observationTargets.splice(p,1),updateCount(-1))},c.disconnect=function(c){var u=this,d=observerMap.get(c);d.observationTargets.slice().forEach(function(d){return u.unobserve(c,d.target)}),d.activeTargets.splice(0,d.activeTargets.length)},c}(),ResizeObserver$1=function(){function c(c){if(0==arguments.length)throw TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof c)throw TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ResizeObserverController.connect(this,c)}return c.prototype.observe=function(c,u){if(0==arguments.length)throw TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!isElement$2(c))throw TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ResizeObserverController.observe(this,c,u)},c.prototype.unobserve=function(c){if(0==arguments.length)throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!isElement$2(c))throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ResizeObserverController.unobserve(this,c)},c.prototype.disconnect=function(){ResizeObserverController.disconnect(this)},c.toString=function(){return"function ResizeObserver () { [polyfill code] }"},c}();function newResizeObserver(c){return new(window.ResizeObserver??ResizeObserver$1)(c)}function useContainerQuery(c,u){let[d,p]=h$3([]),h=T$4(c=>{let h=new Set(d),f=new Set(d);c.forEach(c=>{u.forEach(u=>{c.contentRect.width>=u?h.add(u):h.delete(u)})}),eqSet(f,h)||p(Array.from(h))},[u,d]);p$7(()=>{let u=c.current;if(!u)return function(){};let d=newResizeObserver(c=>{window.requestAnimationFrame(()=>h(c))});return d.observe(u),function(){d.unobserve(u)}},[u,d,c,h]);let f=F$4(()=>d.map(c=>`cq-${c}`).join(" "),[d]);if(void 0===f)throw Error("Hooks are broken! Please check RBV-1627 to get more info!");return f}function cssClassesContainsBreakpoint(c,u){return c.includes(`cq-${u}`)}function useResize(c,u){let d=_$3(),p=_$3(),h=_$3(c);h.current=c,p.current||(p.current=newResizeObserver(c=>{window.requestAnimationFrame(()=>{c.forEach(c=>{let u=d.current;(c.contentRect.width!==(null==u?void 0:u.width)||c.contentRect.height!==u.height)&&(d.current={width:c.contentRect.width,height:c.contentRect.height},h.current(c.contentRect))})})})),p$7(()=>{let c=null==u?void 0:u.current;if(!c)return()=>{};let d=p.current;return null==d||d.observe(c),()=>{null==d||d.unobserve(c)}},[u])}let defaultState={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function useMeasure(c,u){let[d,p]=h$3({...defaultState,...u});return useResize(c=>{let{x:u,y:d,width:h,height:f,top:m,left:g,bottom:v,right:y}=c;p({x:u,y:d,width:h,height:f,top:m,left:g,bottom:v,right:y})},c),d}function handleResize(c,u){window.requestAnimationFrame(()=>
1{c.forEach(c=>{u(c.contentRect.width)})})}function usePlayerWidth(c){let[u,d]=h$3(0);return p$7(()=>{let u=c.current;if(!u)return function(){};let p=newResizeObserver(c=>handleResize(c,d));return p.observe(u),function(){p.unobserve(u)}},[c]),u}let log$n=loglevelExports.getLogger("useUserInteraction"),UserInteractionContext=G$1({}),UserInteractionContextProvider=({children:c})=>{let u=_$3([]),d=F$4(()=>({addEventListener(c){u.current.includes(c)||u.current.push(c)},removeEventListener(c){let d=u.current.findIndex(u=>u===c);u.current.splice(d,1)},trigger(c){u.current.forEach(u=>{try{u(c)}catch(c){log$n.error("error invoking user interaction listener",c)}})}}),[u]);return o$i(UserInteractionContext.Provider,{value:d,children:c})},useUserInteractionContext=()=>q$2(UserInteractionContext),log$m=loglevelExports.getLogger("useInformPlaywright"),INFO_LOG_LEVEL=2;function useInformPlaywright(c){let u=_$3(null),d=T$4(()=>log$m.getLevel()<=INFO_LOG_LEVEL,[]),p=T$4(()=>{u.current&&(window.clearTimeout(u.current),u.current=null)},[]);p$7(()=>(d()&&(p(),u.current=window.setTimeout(()=>{log$m.info(c)},1e3)),()=>{p()}),[p,d,c])}function useObjectArrayCache(c,u){return F$4(()=>c,[c.map(c=>c[u]).join(",")])}let ARIA_UPDATE_THRESHOLD_SECONDS=5;function useScrubbarAria(c,u,d){let[p,h]=h$3({valueNow:0,valueMin:0,valueMax:Math.floor(c),valueText:"0:00",valueLive:void 0}),f=_$3(0);f.current=Math.floor(getAbsolutePosition(c,u));let m=T$4(c=>{if("seekingDone"===c.type||"paused"===c.type){let u=getFormattedTimeString(f.current);h(d=>({...d,valueNow:f.current,valueText:u,valueLive:"seekingDone"===c.type?u:d.valueLive}))}else"timeChanged"===c.type&&h(c=>shouldUpdateOnTimeChanged(c.valueNow,f.current)?{...c,valueNow:f.current,valueText:getFormattedTimeString(f.current)}:c)},[]);return p$7(()=>(null==d||d.addEventListener(m),()=>{null==d||d.removeEventListener(m)}),[d,m]),p}function shouldUpdateOnTimeChanged(c,u){return c+ARIA_UPDATE_THRESHOLD_SECONDS<=u}function getAbsolutePosition(c,u){if(c>0)return c*u;let d=Math.abs(c);return d-d*u}function createDefaultAudioPlayerContextState(){return{playerState:{audioLoaded:!1,bufferLengthInSec:0,cumulatedPlayTimeInSec:0,durationInSec:0,playbackPosInSec:0,playbackSpeed:1,playerStatus:"IDLE",uiMode:"dark"},init:()=>{}}}let defaultPlayerContextState$1=createDefaultAudioPlayerContextState(),AudioPlayerStateContext=G$1(defaultPlayerContextState$1);function createPlayerStateFromCoordinator$1(c){var u;return{audioLoaded:c.isAudioLoaded,bufferLengthInSec:c.getBufferLengthInSec(),coverArt:c.getCoverArt(),cumulatedPlayTimeInSec:c.getCumulatedPlayTimeInSec(),currentErrorDetails:c.getCurrentErrorDetails(),durationInSec:c.getDurationInSec(),mediaMetaData:c.getMediaMetaData(),playbackPosInSec:(null==(u=c.getPlayerData())?void 0:u.getCurrentTimeInSec())??0,playbackSpeed:c.getPlaybackSpeed(),playerConfiguration:c.getPlayerConfiguration(),playerCoordinator:c,playerStatus:c.getPlayerStatus(),uiMode:c.getUIMode()}}let AudioPlayerStateContextProvider=({children:c})=>{let[u,d]=h$3(defaultPlayerContextState$1.playerState),[p,h]=h$3(),f=T$4(c=>{h(c)},[]),m=F$4(()=>({playerState:u,init:f}),[u,f]);return p$7(()=>
1{if(!p)return()=>{};let c=c=>{d(createPlayerStateFromCoordinator$1(p))};return p.addEventListener(c),d(createPlayerStateFromCoordinator$1(p)),()=>{p.removeEventListener(c)}},[p]),o$i(AudioPlayerStateContext.Provider,{value:m,children:c})},useAudioPlayerContext=()=>q$2(AudioPlayerStateContext);function r$j(c,u,d){void 0===d&&(d={});var p,h,f,m=null!=(p=d.isImmediate)&&p,g=null!=(h=d.callback)&&h,v=d.maxWait,y=Date.now(),b=[],S=function(){var d=[].slice.call(arguments),p=this;return new Promise(function(h,S){var _=m&&void 0===f;if(void 0!==f&&clearTimeout(f),f=setTimeout(function(){if(f=void 0,y=Date.now(),!m){var u=c.apply(p,d);g&&g(u),b.forEach(function(c){return(0,c.resolve)(u)}),b=[]}},function(){if(void 0!==v){var c=Date.now()-y;if(c+u>=v)return v-c}return u}()),_){var E=c.apply(p,d);return g&&g(E),h(E)}b.push({resolve:h,reject:S})})};return S.cancel=function(c){void 0!==f&&clearTimeout(f),b.forEach(function(u){return(0,u.reject)(c)}),b=[]},S}let log$l=loglevelExports.getLogger("useAudioCoreApi");function useForwardingListener(c,u){let d=F$4(()=>u=>{if(publicPlayerEventTypes.includes(u.type))for(let d of c.current??[])try{d(u)}catch(c){log$l.error("error invoking public event listener",c)}},[c]);p$7(()=>{u&&u.addEventListener(d)},[u,d])}function useAudioCoreApi(c){let u=_$3(c);u.current=c;let d=_$3([]);return useForwardingListener(d,c),F$4(()=>({async play(){var c;return null==(c=u.current)?void 0:c.play()},pause(){var c;null==(c=u.current)||c.pause()},seek(c){var d;null==(d=u.current)||d.seek(c)},getStatus(){var c;return(null==(c=u.current)?void 0:c.getPlayerStatus())??"IDLE"},getCurrentTime(){var c,d;return(null==(d=null==(c=u.current)?void 0:c.getPlayerData())?void 0:d.getCurrentTimeInSec())??0},getDuration(){var c;return(null==(c=u.current)?void 0:c.getDurationInSec())??0},setMuted(c){var d;null==(d=u.current)||d.setMuted(c)},isMuted(){var c;return(null==(c=u.current)?void 0:c.isMuted())??!1},setVolume(c){var d;null==(d=u.current)||d.setVolume(c)},getVolume(){var c;return(null==(c=u.current)?void 0:c.getVolume())??100},addEventListener(c){d.current.push(c)},removeEventListener(c){let u=d.current.findIndex(u=>u===c);-1!==u&&d.current.splice(u,1)}}),[u,d])}let cosmosFonts$1='@font-face{font-family:Bull Text;font-style:normal;font-weight:400;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Regular.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Regular.woff) format("woff")}@font-face{font-family:Bull Text;font-style:normal;font-weight:500;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Medium.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Medium.woff) format("woff")}@font-face{font-family:Bull Text;font-style:normal;font-weight:700;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Bold.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Bold.woff) format("woff")}@font-face{font-family:Bull;font-style:normal;font-weight:700;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Bold.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Bold.woff) format("woff")}@font-face{font-family:Bull;font-style:normal;font-weight:800;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Heavy1.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Heavy1.woff) format("woff")}@font-face{font-family:Bull VF;font-style:normal;font-weight:300 800;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullVAR.woff2) format("woff2-variations"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullVAR.woff2) format("woff2")}';function getCurrentBufferLengthInSec(c,u){if(0===c.length)return 0;for(let d=0;d<c.length;d++){let p=c.start(d),h=c.end(d);if(p<=u&&u<=h)return h}return u}function calculateBufferWidthInPercent(c,u){if(0===u)return 0;let d=roundPlaybackPercentage(c/u);return isNaN(d)?0:100*d}function mapPlayEvent(c,u){return{...c,type:"play",playbackPosition:u.getCurrentTimeInSec()}}function mapPlayingEvent(c,u){return{...c,type:"playing",playbackPosition:u.getCurrentTimeInSec()}}function mapPauseEvent(c,u){return"ENDED"===u.getPlayerStatus()?{type:"playbackFinished",playerId:c.playerId,playbackPosition:u.getCurrentTimeInSec()}:{type:"paused",playerId:c.playerId,playbackPosition:u.getCurrentTimeInSec()}}function mapSeekingEvent(c,u){return{...c,type:"seeking",targetPosition:u.currentSeekTarget,playbackPosition:u.getSeekStartTimeInSec(),issuer:u.currentSeekIssuer??"USER"}}function mapSeekedEvent(c,u){return{...c,type:"seekingDone",issuer:u.currentSeekIssuer??"USER"}}function mapTimeUpdateEvent(c,u){return{...c,type:"timeChanged",duration:u.getDurationInSec()}}function mapErrorEvent(c,u,d){var p;return{...c,type:"error",code:String((null==(p=d.target.error)?void 0:p.code)??0)}}let resolveMappedEvents={play:mapPlayEvent,playing:mapPlayingEvent,pause:mapPauseEvent,seeking:mapSeekingEvent,seeked:mapSeekedEvent,timeupdate:mapTimeUpdateEvent,error:mapErrorEvent};function mapHtml5AudioPlayerEvent(c,u,d){var p;let h={type:c.type,playerId:u,playbackPosition:d.getCurrentTimeInSec()};return null==(p=null==resolveMappedEvents?void 0:resolveMappedEvents[c.type])?void 0:p.call(resolveMappedEvents,h,d,c)}let storedAudioElements=[];function findStoredAudioElement(c){return storedAudioElements.find(u=>u.id===c)}function resetAudioElement(c){let u=findStoredAudioElement(c);u&&(u.audioElement.src="")}function createAudioElement(c,u){let d=findStoredAudioElement(c);if(d)return d;let p=document.createElement("audio");p.id=c,p.preload="none",p.controls=!1;let h={audioElement:p,id:c};return storedAudioElements.push(h),u.appendChild(p),h}let log$k=loglevelExports.getLogger("Html5AudioPlayerAdapter"),nonFastSeekStates=["IDLE","ENDED","ERROR","PAUSED"];class Html5AudioPlayerAdapter{constructor(c){yi(this,"audioElement"),yi(this,"playerId"),yi(this,"hasError",!1),yi(this,"hasStarted",!1),yi(this,"hasLoaded",!1),yi(this,"isStalled",!1),yi(this,"isPlaying",!1),yi(this,"_isSeeking",!1),yi(this,"seekStartTimeInSec",0),yi(this,"currentSeekTarget",0),yi(this,"currentSeekIssuer"),yi(this,"eventEmitter"),yi(this,"_handlePlayerEvent",c=>{log$k.debug("html5 player event",c);let u=this.playerId,d=c.type;switch(this.setInternalStateForEvent(d),d){case"playing":case"timeupdate":if(!this.hasStarted||this.isSeeking)return;break;case"error":this.mapEventAndEmit(c,u);return}this.hasError||this.mapEventAndEmit(c,u),this.resetAdapterStateAfterEmittingEvent(d)});const u=c.playerId;this.playerId=u;const d=c.element;this.eventEmitter=c.eventEmitter;const p=createAudioElement(u,d);this.audioElement=p.audioElement}get isSeeking(){return this._isSeeking}set isSeeking(c){this._isSeeking=c}addEventListeners(c){c.addEventListener("play",this._handlePlayerEvent),c.addEventListener("playing",this._handlePlayerEvent),c.addEventListener("ratechange",this._handlePlayerEvent),c.addEventListener("seeked",this._handlePlayerEvent),c.addEventListener("seeking",this._handlePlayerEvent),c.addEventListener("stalled",this._handlePlayerEvent),c.addEventListener("timeupdate",this._handlePlayerEvent),c.addEventListener("pause",this._handlePlayerEvent),c.addEventListener("error",this._handlePlayerEvent),c.addEventListener("ended",this._handlePlayerEvent),c.addEventListener("abort",this._handlePlayerEvent),c.addEventListener("waiting",this._handlePlayerEvent)}setInternalStateForEvent(c){switch(c){case"play":this.hasStarted=!0;break;case"playing":this.isPlaying=!0,this.isStalled=!1;break;case"timeupdate":this.isStalled=!1;break;case"pause":this.isPlaying=!1;break;case"stalled":case"waiting":this.isStalled=!0;break;case"error":this.hasError=!0,this.isPlaying=!1}}resetAdapterStateAfterEmittingEvent(c){switch(c){case"seeked":this.currentSeekIssuer=void 0,this.currentSeekTarget=0,this.isSeeking=!1;break;case"seeking":this.isSeeking=!0,this.seekStartTimeInSec=0}}mapEventAndEmit(c,u){let d=mapHtml5AudioPlayerEvent(c,u,this);log$k.debug(u,"received html5 event",c,"mapped to",d),d&&this.eventEmitter.f
1ireEvent(d)}canSeekBackward(){return this.getCurrentTimeInSec()>5}canSeekForward(){return this.getCurrentTimeInSec()<this.getDurationInSec()-5}getPlayerType(){return"AUDIO"}mute(){this.audioElement.muted=!0}pause(){log$k.info("pause"),this.audioElement.pause()}async play(){log$k.info("play"),await this.audioElement.play()}seek(c,u){let d=this.getCurrentTimeInSec(),p=this.audioElement.duration,h=isNaN(p)?c:Math.min(p-3,c),f=this.getPlayerStatus();return log$k.debug("html5 seek to",h,"issuer",u,"status",f),this.audioElement.fastSeek&&!nonFastSeekStates.includes(f)?this.audioElement.fastSeek(h):this.audioElement.currentTime=h,this.seekStartTimeInSec=d,this.currentSeekTarget=h,this.currentSeekIssuer=u,!0}unmute(){this.audioElement.muted=!1}async load(c){log$k.debug("loading audio source",c),await this.reset();let u=c.source.audioUrl,d=c.source.mediaType;if(!u)throw log$k.error("dont have audio url to load",c),Error("dont have audio url to load");if(this.audioElement.canPlayType(d))this.addEventListeners(this.audioElement),this.audioElement.src=u,this.hasLoaded=!0;else throw log$k.error(`cannot play media type ${d}`),Error(`cannot play media type ${d}`)}async destroy(){await this.reset()}async reset(){log$k.debug("Reset player",this.playerId),this.hasStarted=!1,this.hasError=!1,this.isStalled=!1,this.isPlaying=!1,this.isSeeking=!1,this.currentSeekTarget=0,this.currentSeekIssuer=void 0,this.seekStartTimeInSec=0,this.removeListeners(this.audioElement),resetAudioElement(this.playerId)}removeListeners(c){c.removeEventListener("play",this._handlePlayerEvent),c.removeEventListener("playing",this._handlePlayerEvent),c.removeEventListener("ratechange",this._handlePlayerEvent),c.removeEventListener("seeked",this._handlePlayerEvent),c.removeEventListener("seeking",this._handlePlayerEvent),c.removeEventListener("stalled",this._handlePlayerEvent),c.removeEventListener("timeupdate",this._handlePlayerEvent),c.removeEventListener("pause",this._handlePlayerEvent),c.removeEventListener("error",this._handlePlayerEvent),c.removeEventListener("ended",this._handlePlayerEvent),c.removeEventListener("abort",this._handlePlayerEvent),c.removeEventListener("waiting",this._handlePlayerEvent)}getPlaybackMode(){return"VOD"}getPlayerStatus(){return this.hasError||this.audioElement.error?"ERROR":this.audioElement.ended?"ENDED":this.isStalled?"BUFFERING":this.isPlaying?"PLAYING":this.hasLoaded&&this.hasStarted?"PAUSED":"IDLE"}getCurrentTimeInSec(){return this.audioElement.currentTime}getDurationInSec(){return this.audioElement.duration}getSeekStartTimeInSec(){return this.seekStartTimeInSec}getVolume(){return this.audioElement.volume}setVolume(c){this.audioElement.volume=c}setHasError(c){this.hasError=c}getBufferLengthInSec(){return getCurrentBufferLengthInSec(this.audioElement.buffered,this.getCurrentTimeInSec())}isPlayerLoaded(){return this.hasLoaded}setPlaybackSpeed(c){this.audioElement.playbackRate=c}getPlaybackSpeed(){return this.audioElement.playbackRate}getAudioLanguage(){return this.audioElement.lang}getAudioLanguageId(){return""}getMainMediaDurationInSec(){return this.getDurationInSec()}getLastMainMediaPositionInSec(){return this.getCurrentTimeInSec()}getTechVersion(){return"1.0.0"}}let _a=class _a{static setPlayerStatus(c){this.staticPlayerStatus=c}constructor(c){_a.staticOptions=c}canSeekBackward(){return!1}canSeekForward(){return!1}getPlayerType(){return"AUDIO"}mute(){}pause(){}async play(){}seek(c,u){return!1}unmute(){}async load(c){}async destroy(){}async reset(){}getPlaybackMode(){return"VOD"}getPlayerStatus(){return _a.staticPlayerStatus}getCurrentTimeInSec(){return 0}getDurationInSec(){return 100}getSeekStartTimeInSec(){return 0}getVolume(){return 1}setVolume(c){}setHasError(c){}getBufferLengthInSec(){return 0}isPlayerLoaded(){return!1}setPlaybackSpeed(c){}getPlaybackSpeed(){return 1}getAudioLanguage(){return"de"}getAudioLanguageId(){return""}getMainMediaDurationInSec(){return 100}getLastMainMediaPositionInSec(){return 0}getTechVersion(){return"1.0.0"}};yi(_a,"staticPlayerStatus","IDLE"),yi(_a,"staticOptions");let SimulationAudioPlayerAdapter=_a;function createAudioPlayerAdapter(c){switch(c.adapterType){case"HTML5":return new Html5AudioPlayerAdapter(c);case"SIMULATION":return new SimulationAudioPlayerAdapter(c);default:throw Error(`unknown player adapter type ${c.adapterType}`)}}function resolveAssetId(c,u){return u||c}function convertToServiceEnablement$1(c,u){return void 0===c?u:c}function resolveGoogleAnalyticsConfig$1(c){return{...c,defaultPlayerMode:c.defaultPlayerMode??"standard",customInitAttributes:c.customInitAttributes??{},dataLayer:c.dataLayer??window.dataLayer}}function resolveTrackingSettings$1(c,u){var d;let p=c.configs,h=c.services;if((null==h?void 0:h.dataZoom)==="ACTIVE"){if(!(null!=(d=p.dataZoom)&&d.configId))throw Error("cannot enable dataZoom without a configuration id");if(!p.dataZoom.assetId)throw Error("cannot enable dataZoom without an assetId")}let f={googleAnalytics:convertToServiceEnablement$1(null==h?void 0:h.googleAnalytics,"ACTIVE"),dataZoom:u?convertToServiceEnablement$1(null==h?void 0:h.dataZoom,"INACTIVE"):"INACTIVE"},m={...p,googleAnalytics:resolveGoogleAnalyticsConfig$1(p.googleAnalytics)};return{...c,configs:m,services:f}}function resolveAudioPlayerDataConfiguration(c){var u;let d=c.cookieConsent??!1,p=c.sharingEnabled??!0,h=c.environment??"PRODUCTION",f=(null==(u=c._debug)?void 0:u.playerAdapterType)??"HTML5",m=c.uiMode??"dark";return{...c,configurationType:"AUDIO",cookieConsent:d,environment:h,hooks:c.hooks??[],sharingEnabled:p,tracking:resolveTrackingSettings$1(c.tracking,d),uiMo
1de:m,_debug:{playerAdapterType:f}}}let log$j=loglevelExports.getLogger("AudioPlayerCoordinator"),creationStats$1={};function printCreationStats$1(){log$j.debug("Creation Stats",creationStats$1)}let OBSERVED_DOM_EVENT_TYPES$1=[RBUP_AUDIO_DOM_EVENT_TYPE,RBUP_VIDEO_DOM_EVENT_TYPE];class AudioPlayerCoordinator{constructor(c){yi(this,"playerId"),yi(this,"urlSharingStrategy"),yi(this,"dataLoader"),yi(this,"eventEmitter"),yi(this,"player"),yi(this,"trackingService"),yi(this,"mediaSessionService"),yi(this,"hookService"),yi(this,"dispatchElement"),yi(this,"playerConfig"),yi(this,"currentErrorDetails"),yi(this,"lastPlaybackPosition",0),yi(this,"cumulatedPlayTimeInSec",0),yi(this,"mediaMetaData"),yi(this,"storedSeekOrTimeShift"),yi(this,"loaded",!1),yi(this,"destroyed",!1),yi(this,"instanceId",v4()),yi(this,"lastRequestedVolume",100),yi(this,"genericListener",c=>{switch(c.type){case"loaded":this.handleLoadedEvent(c),this.dispatchDomEvent(c);break;case"timeChanged":this.handleTimeChangedEvent(c);break;case"seekingDone":this.handleSeekingEvent(c);break;case"play":this.dispatchDomEvent(c);break;case"error":this.handlePlayerOrDataError(c)}}),yi(this,"domEventListener",c=>{if(!OBSERVED_DOM_EVENT_TYPES$1.includes(c.type))return;let u=c.detail;if(u.playerId===this.playerId)return;let d=this.getPlayerStatus();"play"!==u.type||["IDLE","PAUSED"].includes(d)||(log$j.debug("received play event from player",u.playerId,"pausing"),this.pause())}),this.playerId=c.playerId;const u=creationStats$1[this.playerId]??{createCount:0,destroyCount:0};u.createCount+=1,creationStats$1[this.playerId]=u,printCreationStats$1(),this.eventEmitter=c.eventEmitter??new EventEmitter$1,this.dataLoader=c.dataLoader,this.dispatchElement=c.dispatchElement,this.urlSharingStrategy=c.urlSharingStrategy;const d=c.adapterType??"HTML5";log$j.debug("created coordinator",this.playerId,u),this.player=createAudioPlayerAdapter({adapterType:d,playerId:c.playerId,element:c.divElement,eventEmitter:this.eventEmitter}),this.addEventListener(this.genericListener),this.mediaSessionService=new MediaSessionService(this),document.addEventListener(RBUP_AUDIO_DOM_EVENT_TYPE,this.domEventListener),document.addEventListener(RBUP_VIDEO_DOM_EVENT_TYPE,this.domEventListener)}get isAudioLoaded(){return this.loaded}addEventListener(c){this.eventEmitter.addEventListener(c)}async destroy(){var c,u;if(log$j.debug("destroying audio player coordinator",this.playerId),this.destroyed)log$j.warn("calling destroy of an already destroyed audio player coordinator",this.playerId);else{this.loaded=!1,this.destroyed=!0;let d=creationStats$1[this.playerId]??{createCount:0,destroyCount:0};d.destroyCount+=1,creationStats$1[this.playerId]=d,printCreationStats$1(),document.removeEventListener(RBUP_AUDIO_DOM_EVENT_TYPE,this.domEventListener),document.removeEventListener(RBUP_VIDEO_DOM_EVENT_TYPE,this.domEventListener);try{null==(c=this.trackingService)||c.destroy(),await (null==(u=this.hookService)?void 0:u.beforeDestroy(this.playerConfig,this.mediaMetaData,this)),await this.player.destroy(),log$j.debug("done destroying coordinator",this.playerId)}catch(u){let c=resolveErrorMessageFromUnknown(u);log$j.warn("error destroying player adapter for player",this.playerId,c)}this.trackingService=void 0,this.hookService=void 0,log$j.debug("audio player coordinator destroyed",this.playerId)}}canSeekBackward(){return this.player.canSeekBackward()}canSeekForward(){return this.player.canSeekForward()}getCumulatedPlayTimeInSec(){return this.cumulatedPlayTimeInSec}getCurrentErrorDetails(){return this.currentErrorDetails}getDurationInSec(){var c;let u=this.player.getDurationInSec();return isNaN(u)?(null==(c=this.mediaMetaData)?void 0:c.duration)??0:u}getMediaMetaData(){return this.mediaMetaData}getPlaybackSpeed(){return this.player.getPlaybackSpeed()}getPlayerConfiguration(){return this.playerConfig}getPlayerStatus(){return this.player.getPlayerStatus()}getBufferLengthInSec(){return this.player.getBufferLengthInSec()}getPlayerData(){return this.player}getUIMode(){var c;return(null==(c=this.getPlayerConfiguration())?void 0:c.uiMode)??"dark"}getVolume(){return this.player.getVolume()}getPlaybackMode(){return this.player.getPlaybackMode()}async load(c){if(!c)throw Error("no player config provided yet, cannot load");this.reset(),this.trackingService&&(this.trackingService.destroy(),this.trackingService=void 0),this.hookService&&(await this.hookService.beforeDestroy(void 0,void 0,this),this.hookService=void 0),this.loaded=!1,fetchBrowserOrConfiguredTranslationLanguage(c.overrideTranslationLanguage);let u=resolveAudioPlayerDataConfiguration(c);this.playerConfig=u,this.hookService=new HookService(this.playerConfig.hooks);try{let d=await this.dataLoader.loadData(u);this.playerConfig.assetId=resolveAssetId(this.playerConfig.assetId,d.assetId),"ACTIVE"===this.playerConfig.tracking.services.googleAnalytics&&(this.trackingService=createTrackingService(this,this.playerConfig.tracking.configs.googleAnalytics.dataLayer)),this.mediaMetaData=d;try{this.playerConfig=await this.hookService.beforeLoad(this.playerConfig,d,this)}catch(c){log$j.warn("preloadHook failed, carrying on without it, error",c)}let p=await this.doLoad(d),h=c.initialSeekTimeInSec;return h&&this.performInitialSeekOrTimeshift(h),await this.hookService.afterLoad(u,p,this),p}catch(u){log$j.error("error during load",u);let c=u.message.includes("403")?"NOT_AUTHORIZED":"DATA_NOT_LOADED";this.handlePlayerOrDataError({type:"error",playerId:this.playerId,code:c});return}}async doLoad(c){return await this.player.load({source:c.mediaSrc}
1),this.loaded=!0,this.eventEmitter.fireEvent({type:"loaded",playerId:this.playerId,data:c}),c}performInitialSeekOrTimeshift(c){this.seek(c,"INITIAL")}pause(){return log$j.info("pause"),this.player.pause()}async play(){if(!this.loaded)throw Error("player not yet loaded");return this.eventEmitter.fireEvent({type:"beforePlay",playerId:this.playerId}),this.player.play()}removeEventListener(c){this.eventEmitter.removeEventListener(c)}reset(){var c;this.cumulatedPlayTimeInSec=0,this.lastRequestedVolume=100,this.lastPlaybackPosition=0,this.storedSeekOrTimeShift=void 0,null==(c=this.trackingService)||c.reset()}seek(c,u="USER"){return this.player.seek(c,u)}seekRelative(c){let u=this.player;if("LIVE"===this.getPlaybackMode())throw Error("not supported");let d=Math.max(0,Math.min(u.getCurrentTimeInSec()+c,u.getDurationInSec()));return u.seek(d,"USER")}setPlaybackSpeed(c){this.player.setPlaybackSpeed(c)}setVolume(c){c>0&&(this.lastRequestedVolume=c),this.player.setVolume(c)}setMuted(c){this.player.setVolume(c?0:this.lastRequestedVolume)}isMuted(){return 0===this.getVolume()}dispatchDomEvent(c){let u=new CustomEvent(RBUP_AUDIO_DOM_EVENT_TYPE,{detail:c});log$j.debug("dispatching DOM event",u),document.dispatchEvent(u)}
1dispatchPlayerEvent(c){this.eventEmitter.fireEvent(c)}handleLoadedEvent(c){this.lastPlaybackPosition=0,this.cumulatedPlayTimeInSec=0}handleTimeChangedEvent(c){this.cumulatedPlayTimeInSec+=c.playbackPosition-this.lastPlaybackPosition,this.lastPlaybackPosition=c.playbackPosition}handleSeekingEvent(c){this.lastPlaybackPosition=c.playbackPosition}handlePlayerOrDataError(c){let u=c.code;u?this.currentErrorDetails={playerErrorCode:u}:this.currentErrorDetails={serverErrorDetails:c},"PLAYING"===this.player.getPlayerStatus()&&this.player.pause(),this.player.setHasError(!0)}getCoverArt(){var c,u;if(this.isMediaDataLoadedOrError())return(null==(c=this.playerConfig)?void 0:c.coverArt)??(null==(u=this.mediaMetaData)?void 0:u.coverArt)}isMediaDataLoadedOrError(){return!!this.mediaMetaData||!!this.currentErrorDetails}getTechVersion(){return this.player.getTechVersion()}restartPlaybackFromBeginning(){this.reset(),this.player.seek(0,"RESTART")}getMaxTimeShiftInSec(){throw Error("Not supported")}timeShift(c){throw Error("Not supported")}seekOrTimeshiftRelative(c){throw Error("Not supported")}getSeekableRange(){return{start:0,end:this.getDurationInSec()}}getInitialPlaybackMode(){return"VOD"}}function createAudioPlayerCoordinator({urlSharingStrategy:c,dataLoader:u,dispatchElement:d,divElement:p,playerId:h,adapterType:f}){return new AudioPlayerCoordinator({urlSharingStrategy:c,dataLoader:u,dispatchElement:d,divElement:p,playerId:h,adapterType:f})}async function createCoordinatorAndInvokePlayerLoad(c,u,d,p){var h,f;let m=u.current;m&&!m.destroyed&&await m.destroy();let g=d?createAudioPlayerCoordinator(d):void 0;c.skipCosmosFontInjection||injectCosmosFontIntoHeader(cosmosFonts$1);try{return log$i.debug("loading audio coordinator config",c),await (null==g?void 0:g.load(c)),null==(h=p.current)||h.call(p,g),g}catch(u){let c=u instanceof Error?u:Error(`Error loading the audio player ${u}`);throw log$i.error("error loading the audio player",u),null==(f=p.current)||f.call(p,void 0,c),u}}let log$i=loglevelExports.getLogger("rbup-audio-core");function resolveApiAvailablePromise(c,u,d,p){if(c&&!u.current){u.current=!0;let h=c.getCurrentErrorDetails();h?null==d||d.reject(h):c.isAudioLoaded&&(null==d||d.resolve(p))}}let AudioCoreInternal=({config:c,dataLoader:u,onCoordinatorAvailable:d,urlSharingStrategy:p,internalOnApiAvailable:h},f)=>{var m;let[g]=h$3(v4()),v=_$3(null),y=_$3(),[b,S]=h$3(null);p$7(()=>{S(v.current)},[v]);let _=F$4(()=>{var d;if(b)return{urlSharingStrategy:p??new QueryParamUrlSharingStrategy,dataLoader:u??new DirectAudioDataloader,dispatchElement:b,divElement:b,playerId:g,adapterType:null==(d=c._debug)?void 0:d.playerAdapterType}},[b,p,u,g,null==(m=c._debug)?void 0:m.playerAdapterType]),E=useAudioCoreApi(y.current),T=T$4(r$j(createCoordinatorAndInvokePlayerLoad,100),[createCoordinatorAndInvokePlayerLoad]),w=_$3(!1),P=T$4((c,u)=>{c&&resolveApiAvailablePromise(c,w,h,E),u&&(null==h||h.reject(u))},[E,h]),A=_$3(P);return A.current=P,p$7(()=>{let u;return c.assetId&&(async()=>(u=await T(c,y,_,A),y.current=u,null==d||d(u)))(),()=>{u&&!u.destroyed&&u.destroy()}},[c,y,_,T,d]),A$3(f,()=>E,[E]),useReportUsage(v,c.environment),o$i("div",{class:"audio-player",ref:v,"data-rbup-audio-core":!0})},RbupAudioCore=k$3(AudioCoreInternal);async function initRbupAudio(c,u,d){log$i.info("calling initRbupAudio with args",d),await customElements.whenDefined(u);let p=document.querySelector(`#${c}`);if(!p)throw Error(`html element with id ${c} not found`);let h=createControllablePromise(),f={...d,"internal-on-api-available":h};return deleteUndefinedValues(f),Object.assign(p,f),removeNoLongerExistingAttributes(p,f,log$i),h}function calculatePlaybackPositionInPercent(c,u){if(0===u)return 0;let d=roundPlaybackPercentage(c/u);return isNaN(d)?0:100*d}let ScrubBarHandle=({playbackPositionInPercent:c,show:u})=>o$i("div",{"data-rbup-scrub-bar-handle":!0,class:`scrub-bar-handle ${u?"scrub-bar-handle-visible":""}`,style:{left:`${c}%`}}),dashToPascalCase=c=>c.toLowerCase().split("-").map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join(""),isEventProp=c=>0===c.indexOf("on")&&c[2]===c[2].toUpperCase(),normalizeEventPropName=c=>`on${c[2].toLowerCase()}${c.substring(3)}`,camelToKebabCase=c=>c.replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),possibleStandardNames={acceptCharset:"accept-charset",accessKey:"accesskey",allowFullScreen:"allowfullscreen",autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",autoSave:"autosave",cellPadding:"cellpadding",cellSpacing:"cellspacing",charSet:"charset",className:"class",classID:"classid",colSpan:"colspan",contentEditable:"contenteditable",contextMenu:"contextmenu",controlsList:"controlslist",crossOrigin:"crossorigin",dateTime:"datetime",defaultChecked:"defaultchecked",defaultValue:"defaultvalue",disablePictureInPicture:"disablepictureinpicture",disableRemotePlayback:"disableremoteplayback",encType:"enctype",enterKeyHint:"enterkeyhint",fetchPriority:"fetchpriority",htmlFor:"for",formMethod:"formmethod",formAction:"formaction",formEncType:"formenctype",formNoValidate:"formnovalidate",formTarget:"formtarget",frameBorder:"frameborder",hrefLang:"hreflang",httpEquiv:"http-equiv",imageSizes:"imagesizes",imageSrcSet:"imagesrcset",inputMode:"inputmode",itemID:"itemid",itemProp:"itemprop",itemRef:"itemref",itemScope:"itemscope",itemType:"itemtype",keyParams:"keyparams",keyType:"keytype",marginWidth:"marginwidth",marginHeight:"marginheight",maxLength:"maxlength",mediaGroup:"mediagroup",noModule:"nomodule",noValidate:"novalidate",playsInl
1ine:"playsinline",radioGroup:"radiogroup",readOnly:"readonly",referrerPolicy:"referrerpolicy",rowSpan:"rowspan",spellCheck:"spellcheck",srcDoc:"srcdoc",srcLang:"srclang",srcSet:"srcset",tabIndex:"tabindex",useMap:"usemap",accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",attributeName:"attributename",attributeType:"attributetype",autoReverse:"autoreverse",baseFrequency:"basefrequency",baselineShift:"baseline-shift",baseProfile:"baseprofile",calcMode:"calcmode",capHeight:"cap-height",clipPath:"clip-path",clipPathUnits:"clippathunits",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentscripttype",contentStyleType:"contentstyletype",diffuseConstant:"diffuseconstant",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",externalResourcesRequired:"externalresourcesrequired",fillOpacity:"fill-opacity",fillRule:"fill-rule",filterRes:"filterres",filterUnits:"filterunits",floodOpacity:"flood-opacity",floodColor:"flood-color",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",gradientTransform:"gradienttransform",gradientUnits:"gradientunits",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",kernelMatrix:"kernelmatrix",kernelUnitLength:"kernelunitlength",keyPoints:"keypoints",keySplines:"keysplines",keyTimes:"keytimes",lengthAdjust:"lengthadjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingconeangle",markerEnd:"marker-end",markerHeight:"markerheight",markerMid:"marker-mid",markerStart:"marker-start",markerUnits:"markerunits",markerWidth:"markerwidth",maskContentUnits:"maskcontentunits",maskUnits:"maskunits",numOctaves:"numoctaves",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathlength",patternContentUnits:"patterncontentunits",patternTransform:"patterntransform",patternUnits:"patternunits",pointerEvents:"pointer-events",pointsAtX:"pointsatx",pointsAtY:"pointsaty",pointsAtZ:"pointsatz",preserveAlpha:"preservealpha",preserveAspectRatio:"preserveaspectratio",primitiveUnits:"primitiveunits",refX:"refx",refY:"refy",renderingIntent:"rendering-intent",repeatCount:"repeatcount",repeatDur:"repeatdur",requiredExtensions:"requiredextensions",requiredFeatures:"requiredfeatures",shapeRendering:"shape-rendering",slot:"slot",specularConstant:"specularconstant",specularExponent:"specularexponent",spreadMethod:"spreadmethod",startOffset:"startoffset",stdDeviation:"stddeviation",stitchTiles:"stitchtiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeWidth:"stroke-width",strokeOpacity:"stroke-opacity",suppressContentEditableWarning:"suppresscontenteditablewarning",suppressHydrationWarning:"suppresshydrationwarning",surfaceScale:"surfacescale",systemLanguage:"systemlanguage",tableValues:"tablevalues",targetX:"targetx",targetY:"targety",textAnchor:"text-anchor",textDecoration:"text-decoration",textLength:"textlength",textRendering:"text-rendering",transformOrigin:"transform-origin",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xChannelSelector:"xchannelselector",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlLang:"xml:lang",xmlnsXlink:"xmlns:xlink",yChannelSelector:"ychannelselector",zoomAndPan:"zoomandpan"};function createPreactComponent({tagName:c,defaultProps:u,defineCustomElement:d}){void 0!==d&&d();let p=d=>y$4(c,{...Object.entries({...u,...d}).reduce((c,[u,d])=>{if("dangerouslySetInnerHTML"===u)return{...c,[u]:d};if(isEventProp(u))return{...c,[`${normalizeEventPropName(u)}`]:d};let p=possibleStandardNames[u];return p?{...c,[p]:d}:{...c,[camelToKebabCase(u)]:d}},{})});return p.displayName=`${dashToPascalCase(c)}`,p}let versionSuffix="14-2-1",tagPrefixes=["cosmos-"],isScopedTag=c=>tagPrefixes.some(u=>c.startsWith(u)),transformScopedTag=c=>!isScopedTag(c)||c.endsWith(`-${versionSuffix}`)?c:`${c}-${versionSuffix}`,t$4="cosmos-scoped-web",e$2=!1,n$4="hydrated",o$g=!0,l$9=!0,s$3=!0;var r$i=(c=>(c.Undefined="undefined",c.Null="null",c.String="string",c.Number="number",c.SpecialNumber="number",c.Boolean="boolean",c.BigInt="bigint",c))(r$i||{}),i$7=(c=>(c.Array="array",c.Date="date",c.Map="map",c.Object="object",c.RegularExpression="regexp",c.Set="set",c.Channel="channel",c.Symbol="symbol",c))(i$7||{}),c$b="type",a$c="value",f$5="serialized:";function getPropertyDescriptor(c,u,d){let p="u">typeof HTMLElement?HTMLElement.prototype:null;for(;c&&c!==p;){let p=Object.getOwnPropertyDescriptor(c,u);
1if(p&&(!d||p.get))return p;c=Object.getPrototypeOf(c)}}var u$3,reWireGetterSetter=(c,u)=>{var d;Object.entries(null!=(d=u.t.o)?d:{}).map(([d,[p]])=>{if(31&p||32&p){let p=c[d],h=getPropertyDescriptor(Object.getPrototypeOf(c),d,!0)||Object.getOwnPropertyDescriptor(c,d);h&&Object.defineProperty(c,d,{get(){return h.get.call(this)},set(c){h.set.call(this,c)},configurable:!0,enumerable:!0}),u.l.has(d)?c[d]=u.l.get(d):void 0!==p&&(c[d]=p)}})},getHostRef=c=>{if(c.__stencil__getHostRef)return c.__stencil__getHostRef()},isMemberInElement=(c,u)=>u in c,consoleError=(c,u)=>(0,console.error)(c,u),d$4=new Map,p$6="s-id",$$1="sty-id",v$2="c-id",m$5="http://www.w3.org/1999/xlink",y$2="u">typeof window?window:{},b$3=y$2.HTMLElement||class{},g$4={i:0,u:"",jmp:c=>c(),raf:c=>requestAnimationFrame(c),ael:(c,u,d,p)=>c.addEventListener(u,d,p),rel:(c,u,d,p)=>c.removeEventListener(u,d,p),ce:(c,u)=>new CustomEvent(c,u)},w$3=(()=>{var c;let u=!1;try{null==(c=y$2.document)||c.addEventListener("e",null,Object.defineProperty({},"passive",{get(){u=!0}}))}catch{}return u})(),S$2=(()=>{try{return!!y$2.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof new CSSStyleSheet().replaceSync)}catch{}return!1})(),j$2=!!S$2&&!!y$2.document&&Object.getOwnPropertyDescriptor(y$2.document.adoptedStyleSheets,"length").writable,O$2=!1,N$2=[],k$2=[],queueTask=(c,u)=>u=>{c.push(u),O$2||(O$2=!0,4&g$4.i?nextTick$1(flush):g$4.raf(flush))},consume=c=>{for(let u=0;u<c.length;u++)try{c[u](performance.now())}catch(c){consoleError(c)}c.length=0},flush=()=>{consume(N$2),consume(k$2),(O$2=N$2.length>0)&&g$4.raf(flush)},nextTick$1=c=>Promise.resolve(void 0).then(c),x$4=queueTask(k$2);function createShadowRoot(c){let u=this.attachShadow({mode:"open"});void 0===u$3&&(u$3=null),u$3&&(j$2?u.adoptedStyleSheets.push(u$3):u.adoptedStyleSheets=[...u.adoptedStyleSheets,u$3])}var updateFallbackSlotVisibility=c=>{let u=internalCall(c,"childNodes");c.tagName&&c.tagName.includes("-")&&c["s-cr"]&&"SLOT-FB"!==c.tagName&&getHostSlotNodes(u,c.tagName).forEach(c=>{1===c.nodeType&&"SLOT-FB"===c.tagName&&(getSlotChildSiblings(c,getSlotName(c),!1).length?c.hidden=!0:c.hidden=!1)});let d=0;for(d=0;d<u.length;d++){let c=u[d];1===c.nodeType&&internalCall(c,"childNodes").length&&updateFallbackSlotVisibility(c)}};function getHostSlotNodes(c,u,d){let p,h=0,f=[];for(;h<c.length&&(!(p=c[h])["s-sr"]||u&&p["s-hn"]!==u||void 0!==d&&getSlotName(p)!==d||(f.push(p),void 0===d));h++)f=[...f,...getHostSlotNodes(p.childNodes,u,d)];return f}var getSlotChildSiblings=(c,u,d=!0)=>{let p=[];(d&&c["s-sr"]||!c["s-sr"])&&p.push(c);let h=c;for(;h=h.nextSibling;)getSlotName(h)!==u||!d&&h["s-sr"]||p.push(h);return p},isNodeLocatedInSlot=(c,u)=>1===c.nodeType?null===c.getAttribute("slot")&&""===u||c.getAttribute("slot")===u:c["s-sn"]===u||""===u,addSlotRelocateNode=(c,u,d,p)=>{if(c["s-ol"]&&c["s-ol"].isConnected)return;let h=document.createTextNode("");if(h["s-nr"]=c,!u["s-cr"]||!u["s-cr"].parentNode)return;let f=u["s-cr"].parentNode,m=internalCall(f,"appendChild");if(void 0!==p){h["s-oo"]=p;let c=internalCall(f,"childNodes"),u=[h];c.forEach(c=>{c["s-nr"]&&u.push(c)}),u.sort((c,u)=>!c["s-oo"]||c["s-oo"]<(u["s-oo"]||0)?-1:+(!u["s-oo"]||u["s-oo"]<c["s-oo"])),u.forEach(c=>m.call(f,c))}else m.call(f,h);c["s-ol"]=h,c["s-sh"]=u["s-hn"]},getSlotName=c=>"string"==typeof c["s-sn"]?c["s-sn"]:1===c.nodeType&&c.getAttribute("slot")||void 0;function patchSlotNode(c){if(c.assignedElements||c.assignedNodes||!c["s-sr"])return;let u=u=>(function(c){let d=[],p=this["s-sn"];null!=c&&c.flatten&&console.error(`
2          Flattening is not supported for Stencil non-shadow slots.
3          You can use \`.childNodes\` to nested slot fallback content.
4          If you have a particular use case, please open an issue on the Stencil repo.
5        `);let h=this["s-cr"].parentElement;return(h.__childNodes?h.childNodes:(c=>{let u=[];for(let d=0;d<c.length;d++){let p=c[d]["s-nr"]||void 0;p&&p.isConnected&&u.push(p)}return u})(h.childNodes)).forEach(c=>{p===getSlotName(c)&&d.push(c)}),u?d.filter(c=>1===c.nodeType):d}).bind(c);c.assignedElements=u(!0),c.assignedNodes=u(!1)}function internalCall(c,u){if("__"+u in c){let d=c["__"+u];return"function"!=typeof d?d:d.bind(c)}return"function"!=typeof c[u]?c[u]:c[u].bind(c)}var C$2=new WeakMap,registerStyle=(c,u,d)=>{let p=d$4.get(c);S$2&&d?"string"==typeof(p=p||new CSSStyleSheet)?p=u:p.replaceSync(u):p=u,d$4.set(c,p)},addStyle=(c,u,d)=>{var p,h,f,m,g,v;let y=getScopeId(u),b=d$4.get(y);if(!y$2.document)return y;if(c=11===c.nodeType?c:y$2.document,b)if("string"==typeof b){c=c.head||c;let d,f=C$2.get(c);f||C$2.set(c,f=new Set);let S=c.querySelector(`[${$$1}="${y}"]`);if(S)S.textContent=b;else if(!f.has(y)){(d=y$2.document.createElement("style")).textContent=b;let S=null!=(p=g$4.p)?p:null!=(v=null==(g=null==(m=y$2.document.head)?void 0:m.querySelector('meta[name="csp-nonce"]'))?void 0:g.getAttribute("content"))?v:void 0;if(null!=S&&d.setAttribute("nonce",S),!(1&u.i))if("HEAD"===c.nodeName){let u=c.querySelectorAll("link[rel=preconnect]"),p=u.length>0?u[u.length-1].nextSibling:c.querySelector("style");c.insertBefore(d,(null==p?void 0:p.parentNode)===c?p:null)}else if("host"in c)if(S$2){let u=new(null!=(h=c.defaultView)?h:c.ownerDocument.defaultView).CSSStyleSheet;u.replaceSync(b),j$2?c.adoptedStyleSheets.unshift(u):c.adoptedStyleSheets=[u,...c.adoptedStyleSheets]}else{let u=c.querySelector("style");u?u.textContent=b+u.textContent:c.prepend(d)}else c.append(d);1&u.i&&c.insertBefore(d,null),4&u.i&&(d.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),f&&f.add(y)}}else{let u=C$2.get(c);if(u||C$2.set(c,u=new Set),!u.has(y)){let d,p=null!=(f=c.defaultView)?f:c.ownerDocument.defaultView;if(b.constructor===p.CSSStyleSheet)d=b;else{d=new p.CSSStyleSheet;for(let c=0;c<b.cssRules.length;c++)d.insertRule(b.cssRules[c].cssText,c)}
5if(j$2?c.adoptedStyleSheets.push(d):c.adoptedStyleSheets=[...c.adoptedStyleSheets,d],u.add(y),"host"in c){let u=c.querySelector(`[${$$1}="${y}"]`);u&&x$4(()=>u.remove())}}}return y},getScopeId=(c,u)=>"sc-"+c.$,isComplexType=c=>"object"==(c=typeof c)||"function"===c,h$2=(c,u,...d)=>{"string"==typeof c&&(c=transformTag(c));let p=null,h=null,f=null,m=!1,g=!1,v=[],y=u=>{for(let d=0;d<u.length;d++)Array.isArray(p=u[d])?y(p):null!=p&&"boolean"!=typeof p&&((m="function"!=typeof c&&!isComplexType(p))&&(p=String(p)),m&&g?v[v.length-1].h+=p:v.push(m?newVNode(null,p):p),g=m)};if(y(d),u){u.key&&(h=u.key),u.name&&(f=u.name);{let c=u.className||u.class;c&&(u.class="object"!=typeof c?c:Object.keys(c).filter(u=>c[u]).join(" "))}}if("function"==typeof c)return c(null===u?{}:u,v,A$2);let b=newVNode(c,null);return b.v=u,v.length>0&&(b.m=v),b.S=h,b.j=f,b},newVNode=(c,u)=>({i:0,O:c,h:u??null,N:null,m:null,v:null,S:null,j:null}),T$2={},A$2={forEach:(c,u)=>c.map(convertToPublic).forEach(u),map:(c,u)=>c.map(convertToPublic).map(u).map(convertToPrivate)},convertToPublic=c=>({vattrs:c.v,vchildren:c.m,vkey:c.S,vname:c.j,vtag:c.O,vtext:c.h}),convertToPrivate=c=>{if("function"==typeof c.vtag){let u={...c.vattrs};return c.vkey&&(u.key=c.vkey),c.vname&&(u.name=c.vname),h$2(c.vtag,u,...c.vchildren||[])}let u=newVNode(c.vtag,c.vtext);return u.v=c.vattrs,u.m=c.vchildren,u.S=c.vkey,u.j=c.vname,u},clientHydrate=(c,u,d,p,h,f,m,g=[])=>{let v,y,b,S;if(1===f.nodeType){if((v=f.getAttribute(v$2))&&((y=v.split("."))[0]===m||"0"===y[0])){b=createSimpleVNode({i:0,k:y[0],C:y[1],T:y[2],A:y[3],O:f.tagName.toLowerCase(),N:f,v:{class:f.className||""}}),u.push(b),f.removeAttribute(v$2),c.m||(c.m=[]);let h=b.N.getAttribute("s-sn");"string"==typeof h&&("slot-fb"===b.O&&addSlot(h,y[2],b,f,c,u,d,p,g),b.N["s-sn"]=h,b.N.removeAttribute("s-sn")),void 0!==b.A&&(c.m[b.A]=b),c=b,p&&"0"===b.T&&(p[b.A]=b.N)}if(f.shadowRoot)for(S=f.shadowRoot.childNodes.length-1;S>=0;S--)clientHydrate(c,u,d,p,h,f.shadowRoot.childNodes[S],m,g);let _=f.__childNodes||f.childNodes;for(S=_.length-1;S>=0;S--)clientHydrate(c,u,d,p,h,_[S],m,g)}else if(8===f.nodeType)((y=f.nodeValue.split("."))[1]===m||"0"===y[1])&&(v=y[0],b=createSimpleVNode({k:y[1],C:y[2],T:y[3],A:y[4]||"0",N:f,v:null,m:null,S:null,j:null,O:null,h:null}),"t"===v?(b.N=findCorrespondingNode(f,3),b.N&&3===b.N.nodeType&&(b.h=b.N.textContent,u.push(b),f.remove(),m===b.k&&(c.m||(c.m=[]),c.m[b.A]=b),p&&"0"===b.T&&(p[b.A]=b.N))):"c"===v?(b.N=findCorrespondingNode(f,8),b.N&&8===b.N.nodeType&&(u.push(b),f.remove())):b.k===m&&("s"===v?addSlot(f["s-sn"]=y[5]||"",y[2],b,f,c,u,d,p,g):"r"===v&&(p?f.remove():(h["s-cr"]=f,f["s-cn"]=!0))));else if(c&&"style"===c.O){let u=newVNode(null,f.textContent);u.N=f,u.A="0",c.m=[u]}return c},initializeDocumentHydrate=(c,u)=>{if(1===c.nodeType){let d=c[p$6]||c.getAttribute(p$6);d&&u.set(d,c);let p=0;if(c.shadowRoot)for(;p<c.shadowRoot.childNodes.length;p++)initializeDocumentHydrate(c.shadowRoot.childNodes[p],u);let h=c.__childNodes||c.childNodes;for(p=0;p<h.length;p++)initializeDocumentHydrate(h[p],u)}else if(8===c.nodeType){let d=c.nodeValue.split(".");"o"===d[0]&&(u.set(d[1]+"."+d[2],c),c.nodeValue="",c["s-en"]=d[3])}},createSimpleVNode=c=>({i:0,k:null,C:null,T:null,A:"0",N:null,v:null,m:null,S:null,j:null,O:null,h:null,...c});function addSlot(c,u,d,p,h,f,m,g,v){p["s-sr"]=!0,d.j=c||null,d.O="slot";let y=null!=h&&h.N?h.N["s-id"]||h.N.getAttribute("s-id"):"";if(g&&y$2.document){let f=d.N=y$2.document.createElement(d.O);d.j&&d.N.setAttribute("name",c),h.N.shadowRoot&&y&&y!==d.k?internalCall(h.N,"insertBefore")(f,internalCall(h.N,"children")[0]):internalCall(internalCall(p,"parentNode"),"insertBefore")(f,p),addSlottedNodes(v,u,c,p,d.k),p.remove(),"0"===d.T&&(g[d.A]=d.N)}else{let f=d.N,m=y&&y!==d.k&&h.N.shadowRoot;addSlottedNodes(v,u,c,p,m?y:d.k),patchSlotNode(p),m&&h.N.insertBefore(f,h.N.children[0])}f.push(d),m.push(d),h.m||(h.m=[]),h.m[d.A]=d}var addSlottedNodes=(c,u,d,p,h)=>{var f,m;let g=p.nextSibling;if(c[u]=c[u]||[],g&&!(null!=(f=g.nodeValue)&&f.startsWith("s.")))do!g||(g.getAttribute&&g.getAttribute("slot")||g["s-sn"])!==d&&(""!==d||g["s-sn"]||g.getAttribute&&g.getAttribute("slot")||8!==g.nodeType&&3!==g.nodeType)||(g["s-sn"]=d,c[u].push({slot:p,node:g,hostId:h})),g=null==g?void 0:g.nextSibling;while(g&&!(null!=(m=g.nodeValue)&&m.startsWith("s.")))},findCorrespondingNode=(c,u)=>{let d=c;do d=d.nextSibling;while(d&&(d.nodeType!==u||!d.nodeValue))return d},normalizeWatchers=c=>{if(!c)return;let u=Object.keys(c);if(0===u.length)return;let d=!1;for(let p of u){if(d)break;for(let u of c[p])if("string"==typeof u){d=!0;break}}if(!d)return c;let p={};for(let d of u)p[d]=c[d].map(c=>"string"==typeof c?{[c]:0}:c);return p},M$2=class Co{static fromLocalValue(c){let u=c[c$b],d=a$c in c?c[a$c]:void 0;switch(u){case"string":case"boolean":return d;case"bigint":return BigInt(d);case"undefined":return;case"null":return null;case"number":return"NaN"===d?0/0:"-0"===d?-0:"Infinity"===d?1/0:"-Infinity"===d?-1/0:d;case"array":return d.map(c=>Co.fromLocalValue(c));case"date":return new Date(d);case"map":let p=new Map;for(let[c,u]of d){let d="object"==typeof c&&null!==c?Co.fromLocalValue(c):c,h=Co.fromLocalValue(u);p.set(d,h)}return p;case"object":let h={};for(let[c,u]of d)h[c]=Co.fromLocalValue(u);return h;case"regexp":let{pattern:f,flags:m}=d;return new RegExp(f,m);case"set":let g=new Set;for(let c of d)g.add(Co.fromLocalValue(c));return g;case"symbol":return Symbol(d);default:throw Error(`Unsupported type: ${u}`)}}static fromLocalValueArray(c){return c.map(c=>Co.fromLocalValue(c))}static isLocalValueObject(c){if("object"!=typeof c||null===c||!c.hasOwnProperty(c$b))return!1;let u=c[c$b];return!!Object.values({...r$i,...i$7}).includes(u)&&("null"===u||"undefined"===u||c.hasOwnProperty(a$c))}};function deserializeProperty(c){return"string"==typeof c&&c.startsWith(f$5)?M$2.fromLocalValue(JSON.parse(function(c){let u=atob(c),d=new Uint8Array(u.length);for(let c=0;c<u.length;c++)d[c]=u.charCodeAt(c);return new TextDecoder().decode(d)}(c.slice(11)))):c}var E$2,L$2,parsePropertyValue=(c,u,d)=>"string"==typeof c&&c.startsWith(f$5)?c=deserializeProperty(c):null==c||isComplexType(c)?c:4&u?"false"!==c&&(""===c||!!c):2&u?"string"==typeof c?parseFloat(c):"number"==typeof c?c:0/0:1&u?String(c):c,createEvent=(c,u,d)=>({emit:p=>emitEvent(c,u,{bubbles:!!(4&d),composed:!!(2&d),cancelable:!!(1&d),detail:p})}),emitEvent=(c,u,d)=>{let p=g$4.ce(u,d);return c.dispatchEvent(p),p},setAccessor=(c,u,d,p,h,f,m)=>{if(d===p)return;let g=isMemberInElement(c,u),v=u.toLowerCase();if("class"===u){let u=c.classList,h=parseClassList(d),f=parseClassList(p);if((c["s-si"]||c["s-sc"])&&m){let d=c["s-sc"]||c["s-si"];f.push(d),h.forEach(c=>{c.startsWith(d)&&f.push(c)}),f=[...new Set(f)].filter(c=>c),u.add(...f)}else u.remove(...h.filter(c=>c&&!f.includes(c))),u.add(...f.filter(c=>c&&!h.includes(c)))}else if("style"===u){for(let u in d)p&&null!=p[u]||(u.includes("-")?c.style.removeProperty(u):c.style[u]="");for(let u in p)d&&p[u]===d[u]||(u.includes("-")?c.style.setProperty(u,p[u]):c.style[u]=p[u])}else if("key"!==u){if("ref"===u)p&&queueRefAttachment(p,c);else if(c.__lookupSetter__(u)||"o"!==u[0]||"n"!==u[1]){if("a"===u[0]&&u.startsWith("attr:")){let d,h=u.slice(5);{let u=getHostRef(c);if(u&&u.t&&u.t.o){let c=u.t.o[h];c&&c[1]&&(d=c[1])}}return d||(d=h.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==p||!1===p?!1===p&&""!==c.getAttribute(d)||c.removeAttribute(d):c.setAttribute(d,!0===p?"":p))}if("p"===u[0]&&u.startsWith("prop:")){let d=u.slice(5);try{c[d]=p}catch{}return}{let m=isComplexType(p);
5if((g||m&&null!==p)&&!h)try{if(c.tagName.includes("-"))c[u]!==p&&(c[u]=p);else{let h=p??"";"list"===u?g=!1:null!=d&&c[u]===h||("function"==typeof c.__lookupSetter__(u)?c[u]=h:c.setAttribute(u,h))}}catch{}let y=!1;v!==(v=v.replace(/^xlink\:?/,""))&&(u=v,y=!0),null==p||!1===p?!1===p&&""!==c.getAttribute(u)||(y?c.removeAttributeNS(m$5,u):c.removeAttribute(u)):(!g||4&f||h)&&!m&&1===c.nodeType&&(p=!0===p?"":p,y?c.setAttributeNS(m$5,u,p):c.setAttribute(u,p))}}else if(u="-"===u[2]?u.slice(3):isMemberInElement(y$2,v)?v.slice(2):v[2]+u.slice(3),d||p){let h=u.endsWith(R$2);u=u.replace(I$2,""),d&&g$4.rel(c,u,d,h),p&&g$4.ael(c,u,p,h)}}},D$2=/\s/,parseClassList=c=>("object"==typeof c&&c&&"baseVal"in c&&(c=c.baseVal),c&&"string"==typeof c?c.split(D$2):[]),R$2="Capture",I$2=RegExp(R$2+"$"),updateElement=(c,u,d,p)=>{let h=11===u.N.nodeType&&u.N.host?u.N.host:u.N,f=c&&c.v||{},m=u.v||{};for(let c of sortedAttrNames(Object.keys(f)))c in m||setAccessor(h,c,f[c],void 0,d,u.i,p);for(let c of sortedAttrNames(Object.keys(m)))setAccessor(h,c,f[c],m[c],d,u.i,p)};function sortedAttrNames(c){return c.includes("ref")?[...c.filter(c=>"ref"!==c),"ref"]:c}var _$2=!1,P$2=!1,H$2=!1,U$1=!1,W$1=[],F$2=[],createElm=(c,u,d)=>{var p;let h=u.m[d],f,m,g,v=0;if(_$2||(H$2=!0,"slot"===h.O&&(h.i|=h.m?2:1)),null!=h.h)f=h.N=y$2.document.createTextNode(h.h);else if(1&h.i)f=h.N=slotReferenceDebugNode(h),updateElement(null,h,U$1);else{if(U$1||(U$1="svg"===h.O),!y$2.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(f=h.N=y$2.document.createElementNS(U$1?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!_$2&&o$g&&2&h.i?"slot-fb":h.O),U$1&&"foreignObject"===h.O&&(U$1=!1),updateElement(null,h,U$1),h.m){let u="template"===h.O?f.content:f;for(v=0;v<h.m.length;++v)(m=createElm(c,h,v))&&u.appendChild(m)}"svg"===h.O?U$1=!1:"foreignObject"===f.tagName&&(U$1=!0)}return f["s-hn"]=L$2,3&h.i&&(f["s-sr"]=!0,f["s-cr"]=E$2,f["s-sn"]=h.j||"",f["s-rf"]=null==(p=h.v)?void 0:p.ref,patchSlotNode(f),(g=c&&c.m&&c.m[d])&&g.O===h.O&&c.N&&relocateToHostRoot(c.N)),f},relocateToHostRoot=c=>{g$4.i|=1;let u=c.closest(L$2.toLowerCase());if(null!=u){let d=Array.from(u.__childNodes||u.childNodes).find(c=>c["s-cr"]),p=Array.from(c.__childNodes||c.childNodes);for(let c of d?p.reverse():p)null!=c["s-sh"]&&(insertBefore(u,c,d??null),c["s-sh"]=void 0,H$2=!0)}g$4.i&=-2},putBackInOriginalLocation=(c,u)=>{g$4.i|=1;let d=Array.from(c.__childNodes||c.childNodes);if(c["s-sr"]){let u=c;for(;u=u.nextSibling;)u&&u["s-sn"]===c["s-sn"]&&u["s-sh"]===L$2&&d.push(u)}for(let c=d.length-1;c>=0;c--){let p=d[c];p["s-hn"]!==L$2&&p["s-ol"]&&(insertBefore(referenceNode(p).parentNode,p,referenceNode(p)),p["s-ol"].remove(),p["s-ol"]=void 0,p["s-sh"]=void 0,H$2=!0),u&&putBackInOriginalLocation(p,u)}g$4.i&=-2},addVnodes=(c,u,d,p,h,f)=>{let m,g=c["s-cr"]&&c["s-cr"].parentNode||c;for(g.shadowRoot&&g.tagName===L$2&&(g=g.shadowRoot),"template"===d.O&&(g=g.content);h<=f;++h)p[h]&&(m=createElm(null,d,h))&&(p[h].N=m,insertBefore(g,m,referenceNode(u)))},removeVnodes=(c,u,d)=>{for(let p=u;p<=d;++p){let u=c[p];if(u){let c=u.N;nullifyVNodeRefs(u),c&&(P$2=!0,c["s-ol"]?c["s-ol"].remove():putBackInOriginalLocation(c,!0),c.remove())}}},isSameVnode=(c,u,d=!1)=>c.O===u.O&&("slot"===c.O?c.j===u.j:d?(d&&!c.S&&u.S&&(c.S=u.S),!0):c.S===u.S),referenceNode=c=>c&&c["s-ol"]||c,patch=(c,u,d=!1)=>{let p,h=u.N=c.N,f=c.m,m=u.m,g=u.O,v=u.h;null==v?(U$1="svg"===g||"foreignObject"!==g&&U$1,"slot"!==g||_$2||c.j!==u.j&&(u.N["s-sn"]=u.j||"",relocateToHostRoot(u.N.parentElement)),updateElement(c,u,U$1,d),null!==f&&null!==m?((c,u,d,p,h=!1)=>{let f,m,g=0,v=0,y=0,b=0,S=u.length-1,_=u[0],E=u[S],T=p.length-1,w=p[0],P=p[T],A="template"===d.O?c.content:c;for(;g<=S&&v<=T;)if(null==_)_=u[++g];else if(null==E)E=u[--S];else if(null==w)w=p[++v];else if(null==P)P=p[--T];else if(isSameVnode(_,w,h))patch(_,w,h),_=u[++g],w=p[++v];else if(isSameVnode(E,P,h))patch(E,P,h),E=u[--S],P=p[--T];else if(isSameVnode(_,P,h))"slot"!==_.O&&"slot"!==P.O||putBackInOriginalLocation(_.N.parentNode,!1),patch(_,P,h),insertBefore(A,_.N,E.N.nextSibling),_=u[++g],P=p[--T];else if(isSameVnode(E,w,h))"slot"!==_.O&&"slot"!==P.O||putBackInOriginalLocation(E.N.parentNode,!1),patch(E,w,h),insertBefore(A,E.N,_.N),E=u[--S],w=p[++v];else{for(y=-1,b=g;b<=S;++b)if(u[b]&&null!==u[b].S&&u[b].S===w.S){y=b;break}y>=0?(m=u[y]).O!==w.O?f=createElm(u&&u[v],d,y):(patch(m,w,h),u[y]=void 0,f=m.N):f=createElm(u&&u[v],d,v),w=p[++v],f&&insertBefore(referenceNode(_.N).parentNode,f,referenceNode(_.N))}g>S?addVnodes(c,null==p[T+1]?null:p[T+1].N,d,p,v,T):v>T&&removeVnodes(u,g,S)})(h,f,u,m,d):null!==m?(null!==c.h&&(h.textContent=""),addVnodes(h,null,u,m,0,m.length-1)):!d&&s$3&&null!==f?removeVnodes(f,0,f.length-1):d&&s$3&&null!==f&&null===m&&(u.m=f),U$1&&"svg"===g&&(U$1=!1)):(p=h["s-cr"])?p.parentNode.textContent=v:c.h!==v&&(h.data=v)},B$2=[],markSlotContentForRelocation=c=>{let u,d,p;for(let h of c.__childNodes||c.childNodes){if(h["s-sr"]&&(u=h["s-cr"])&&u.parentNode){d=u.parentNode.__childNodes||u.parentNode.childNodes;let c=h["s-sn"];for(p=d.length-1;p>=0;p--)if(!((u=d[p])["s-cn"]||u["s-nr"]||u["s-hn"]===h["s-hn"]||u["s-sh"]&&u["s-sh"]===h["s-hn"]))if(isNodeLocatedInSlot(u,c)){let d=B$2.find(c=>c.M===u);P$2=!0,u["s-sn"]=u["s-sn"]||c,d?(d.M["s-sh"]=h["s-hn"],d.L=h):(u["s-sh"]=h["s-hn"],B$2.push({L:h,M:u})),u["s-sr"]&&B$2.map(c=>{isNodeLocatedInSlot(c.M,u["s-sn"])&&(d=B$2.find(c=>c.M===u))&&!c.L&&(c.L=d.L)})}else B$2.some(c=>
5c.M===u)||B$2.push({M:u})}1===h.nodeType&&markSlotContentForRelocation(h)}},nullifyVNodeRefs=c=>{c.v&&c.v.ref&&W$1.push(()=>c.v.ref(null)),c.m&&c.m.map(nullifyVNodeRefs)},queueRefAttachment=(c,u)=>{F$2.push(()=>c(u))},insertBefore=(c,u,d,p)=>{if("string"==typeof u["s-sn"]){c.insertBefore(u,d);let{slotNode:h}=function(c,u){var d;if(!(u=u||(null==(d=c["s-ol"])?void 0:d.parentElement)))return{slotNode:null,slotName:""};let p=c["s-sn"]=getSlotName(c)||"";return{slotNode:getHostSlotNodes(internalCall(u,"childNodes"),u.tagName,p)[0],slotName:p}}(u);return h&&!p&&h.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1})),u}return c.__insertBefore?c.__insertBefore(u,d):null==c?void 0:c.insertBefore(u,d)},renderVdom=(c,u,d=!1)=>{var p,h,f,m,g;let v=c.$hostElement$,y=c.t,b=c.D||newVNode(null,null),S=u&&u.O===T$2?u:h$2(null,null,u);if(L$2=v.tagName,y.R&&(S.v=S.v||{},y.R.forEach(([c,u])=>{S.v[u]=v[c]})),d&&S.v)for(let c of Object.keys(S.v))v.hasAttribute(c)&&!["key","ref","style","class"].includes(c)&&(S.v[c]=v[c]);if(S.O=null,S.i|=4,c.D=S,S.N=b.N=v.shadowRoot||v,_$2=!(!(1&y.i)||128&y.i),E$2=v["s-cr"],P$2=!1,patch(b,S,d),g$4.i|=1,H$2){for(let c of(markSlotContentForRelocation(S.N),B$2)){let u=c.M;if(!u["s-ol"]&&y$2.document){let c=originalLocationDebugNode(u);c["s-nr"]=u,insertBefore(u.parentNode,u["s-ol"]=c,u,d)}}for(let c of B$2){let u=c.M,g=c.L;if(1===u.nodeType&&d&&(u["s-ih"]=null!=(p=u.hidden)&&p),g){let c=g.parentNode,p=g.nextSibling;if(p&&1===p.nodeType){let d=null==(h=u["s-ol"])?void 0:h.previousSibling;for(;d;){let h=null!=(f=d["s-nr"])?f:null;if(h&&h["s-sn"]===u["s-sn"]&&c===(h.__parentNode||h.parentNode)){for(h=h.nextSibling;h===u||null!=h&&h["s-sr"];)h=null==h?void 0:h.nextSibling;if(!h||!h["s-nr"]){p=h;break}}d=d.previousSibling}}let v=u.__parentNode||u.parentNode,y=u.__nextSibling||u.nextSibling;if((!p&&c!==v||y!==p)&&u!==p){if(insertBefore(c,u,p,d),8===u.nodeType&&u.nodeValue.startsWith("s-nt-")){let c=y$2.document.createTextNode(u.nodeValue.replace(/^s-nt-/,""));c["s-hn"]=u["s-hn"],c["s-sn"]=u["s-sn"],c["s-sh"]=u["s-sh"],c["s-sr"]=u["s-sr"],c["s-ol"]=u["s-ol"],c["s-ol"]["s-nr"]=c,insertBefore(u.parentNode,c,u,d),u.parentNode.removeChild(u)}1===u.nodeType&&"SLOT-FB"!==u.tagName&&(u.hidden=null!=(m=u["s-ih"])&&m)}u&&"function"==typeof g["s-rf"]&&g["s-rf"](g)}else 1===u.nodeType&&(u.hidden=!0)}}if(P$2&&updateFallbackSlotVisibility(S.N),g$4.i&=-2,B$2.length=0,!_$2&&!(1&y.i)&&v["s-cr"]){for(let c of S.N.__childNodes||S.N.childNodes)if(c["s-hn"]!==L$2&&!c["s-sh"]){if(d&&null==c["s-ih"]&&(c["s-ih"]=null!=(g=c.hidden)&&g),1===c.nodeType)c.hidden=!0;else if(3===c.nodeType&&c.nodeValue.trim()){let u=y$2.document.createComment("s-nt-"+c.nodeValue);u["s-sn"]=c["s-sn"],insertBefore(c.parentNode,u,c,d),c.parentNode.removeChild(c)}}}E$2=void 0,W$1.forEach(c=>c()),W$1.length=0,F$2.forEach(c=>c()),F$2.length=0},slotReferenceDebugNode=c=>{var u;return null==(u=y$2.document)?void 0:u.createComment(`<slot${c.j?' name="'+c.j+'"':""}> (host=${L$2.toLowerCase()})`)},originalLocationDebugNode=c=>{var u;return null==(u=y$2.document)?void 0:u.createComment("org-location for "+(c.localName?`<${c.localName}> (host=${c["s-hn"]})`:`[${c.textContent}]`))},attachToAncestor=(c,u)=>{if(u&&!c.I&&u["s-p"]){let d=u["s-p"].push(new Promise(p=>c.I=()=>{u["s-p"].splice(d-1,1),p()}))}},scheduleUpdate=(c,u)=>{if(c.i|=16,4&c.i)return void(c.i|=512);attachToAncestor(c,c._);let d=()=>dispatchHooks(c,u);if(!u)return x$4(d);queueMicrotask(()=>{d()})},dispatchHooks=(c,u)=>{let d,p=c.$hostElement$;if(c.t.$,!p)throw Error(`Can't render component <${p.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);return u?(emitLifecycleEvent(p,"componentWillLoad"),d=safeCall(p,"componentWillLoad",void 0,p)):(emitLifecycleEvent(p,"componentWillUpdate"),d=safeCall(p,"componentWillUpdate",void 0,p)),emitLifecycleEvent(p,"componentWillRender"),d=enqueue(d,()=>safeCall(p,"componentWillRender",void 0,p)),enqueue(d,()=>updateComponent(c,p,u))},enqueue=(c,u)=>
5isPromisey(c)?c.then(u).catch(c=>{console.error(c),u()}):u(),isPromisey=c=>c instanceof Promise||c&&c.then&&"function"==typeof c.then,updateComponent=async(c,u,d)=>{var p;let h,f,m,g,v=c.$hostElement$;c.t.$;let y=v["s-rc"];d&&(h=c.t,f=c.$hostElement$,m=h.i,h.$,g=addStyle(f.shadowRoot?f.shadowRoot:f.getRootNode(),h),10&m&&(f["s-sc"]=g,f.classList.add(g+"-h"))),c.t.$,callRender(c,u,v,d),y&&(y.map(c=>c()),v["s-rc"]=void 0);{let u=null!=(p=v["s-p"])?p:[],d=()=>postUpdateComponent(c);0===u.length?d():(Promise.all(u).then(d).catch(d),c.i|=4,u.length=0)}},callRender=(c,u,d,p)=>{try{u=u.render(),c.i&=-17,c.i|=2,renderVdom(c,u,p)}catch(u){consoleError(u,c.$hostElement$)}return null},postUpdateComponent=c=>{c.t.$;let u=c.$hostElement$,d=c._;safeCall(u,"componentDidRender",void 0,u),emitLifecycleEvent(u,"componentDidRender"),64&c.i?(safeCall(u,"componentDidUpdate",void 0,u),emitLifecycleEvent(u,"componentDidUpdate")):(c.i|=64,addHydratedFlag(u),safeCall(u,"componentDidLoad",void 0,u),emitLifecycleEvent(u,"componentDidLoad"),c.P(u),d||appDidLoad()),c.I&&(c.I(),c.I=void 0),512&c.i&&nextTick$1(()=>scheduleUpdate(c,!1)),c.i&=-517},forceUpdate=c=>{var u;{let d=getHostRef(c),p=null==(u=null==d?void 0:d.$hostElement$)?void 0:u.isConnected;return p&&(18&d.i)==2&&scheduleUpdate(d,!1),p}},appDidLoad=c=>{var u;nextTick$1(()=>emitEvent(y$2,"appload",{detail:{namespace:t$4}})),null!=(u=g$4.H)&&u.size&&g$4.H.clear()},safeCall=(c,u,d,p)=>{if(c&&c[u])try{return c[u](d)}catch(c){consoleError(c,p)}},emitLifecycleEvent=(c,u)=>{emitEvent(c,"stencil_"+u,{bubbles:!0,composed:!0,detail:{namespace:t$4}})},addHydratedFlag=c=>c.classList.add(null!=n$4?n$4:"hydrated"),setValue=(c,u,d,p)=>{let h=getHostRef(c);if(!h)return;let f=h.l.get(u),m=h.i;d=parsePropertyValue(d,p.o[u][0]);let g=Number.isNaN(f)&&Number.isNaN(d);if(d!==f&&!g){if(h.l.set(u,d),p.U){let g=p.U[u];g&&g.map(p=>{try{let[[g,v]]=Object.entries(p);(128&m||1&v)&&(c?c[g](d,f,u):h.W.push(()=>{h.F[g](d,f,u)}))}catch(u){consoleError(u,c)}})}if(2&m){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(d,f,u)&&!(16&m))return;16&m||scheduleUpdate(h,!1)}}},proxyComponent=(c,u,d)=>{var p,h;let f=c.prototype;{c.watchers&&!u.U&&(u.U=normalizeWatchers(c.watchers)),c.deserializers&&!u.B&&(u.B=c.deserializers),c.serializers&&!u.V&&(u.V=c.serializers);let d=Object.entries(null!=(p=u.o)?p:{});d.map(([c,[d]])=>{if(31&d||32&d){let{get:p,set:h}=getPropertyDescriptor(f,c)||{};p&&(u.o[c][0]|=2048),h&&(u.o[c][0]|=4096),Object.defineProperty(f,c,{get(){return p?p.apply(this):getHostRef(this).l.get(c)},configurable:!0,enumerable:!0}),Object.defineProperty(f,c,{set(p){let f=getHostRef(this);if(f){if(h)return(32&d?this[c]:f.$hostElement$[c])===void 0&&f.l.get(c)&&(p=f.l.get(c)),h.apply(this,[parsePropertyValue(p,d)]),p=32&d?this[c]:f.$hostElement$[c],void setValue(this,c,p,u);setValue(this,c,p,u)}}})}});{let p=new Map;f.attributeChangedCallback=function(c,h,m){g$4.jmp(()=>{var g;let v=p.get(c),y=getHostRef(this);if(this.hasOwnProperty(v),f.hasOwnProperty(v)&&"number"==typeof this[v]&&this[v]==m)return;if(null==v){let d=null==y?void 0:y.i;if(y&&d&&!(8&d)&&m!==h){let p=this,f=null==(g=u.U)?void 0:g[c];null==f||f.forEach(u=>{let[[f,g]]=Object.entries(u);null!=p[f]&&(128&d||1&g)&&p[f].call(p,m,h,c)})}return}let b=d.find(([c])=>c===v),S=b&&4&b[1][0],_=S&&null===m&&void 0===this[v];S&&(m=null!==m&&"false"!==m);let E=Object.getOwnPropertyDescriptor(f,v);_||m==this[v]||E.get&&!E.set||(this[v]=m)})},c.observedAttributes=Array.from(new Set([...Object.keys(null!=(h=u.U)?h:{}),...d.filter(([c,u])=>31&u[0]).map(([c,d])=>{var h;let f=d[1]||c;return p.set(f,c),512&d[0]&&(null==(h=u.R)||h.push([c,f])),f})]))}}return c},connectedCallback=c=>{if(!(1&g$4.i)){let u=getHostRef(c);if(!u)return;let d=u.t;if(d.$,1&u.i)addHostEventListeners(c,u,d.q),null!=u&&u.F||null!=u&&u.Y&&u.Y.then(()=>{});else{let p;if(u.i|=1,p=c.getAttribute(p$6)){if(1&d.i){let u=addStyle(c.shadowRoot,d);c.classList.remove(u+"-h",u+"-s")}((c,u,d,p)=>{var h,f,m,g;let v,y=c.shadowRoot,b=[],S=[],_=y?[]:null,E=newVNode(u,null);E.N=c,!y$2.document||g$4.H&&g$4.H.size||initializeDocumentHydrate(y$2.document.body,g$4.H=new Map),c[p$6]=d,c.removeAttribute(p$6),p.D=clientHydrate(E,b,[],_,c,c,d,S);let T=0,w=b.length;for(;T<w;T++){let d=(v=b[T]).k+"."+v.C,p=g$4.H.get(d),f=v.N;if(y){if(null!=(h=v.O)&&h.toString().includes("-")&&"slot-fb"!==v.O&&!v.N.shadowRoot){let c=getHostRef(v.N);if(c){let u=getScopeId(c.t),d=y$2.document.querySelector(`style[sty-id="${u}"]`);d&&_.unshift(d.cloneNode(!0))}}}else f["s-hn"]=transformTag(u).toUpperCase(),"slot"===v.O&&(f["s-cr"]=c["s-cr"]);"slot"===v.O&&(v.j=v.N["s-sn"]||v.N.name||null,v.m?(v.i|=2,v.N.childNodes.length||v.m.forEach(c=>{v.N.appendChild(c.N)})):v.i|=1),p&&p.isConnected&&(p.parentElement.shadowRoot&&""===p["s-en"]&&p.parentNode.insertBefore(f,p.nextSibling),p.parentNode.removeChild(p),y||(f["s-oo"]=parseInt(v.C)
5)),p&&!p["s-id"]&&g$4.H.delete(d)}let P=[],A=S.length,I,M,R,k,x=0,C=0;for(;x<A;x++)if((I=S[x])&&I.length)for(R=I.length,M=0;M<R;M++){if(P[(k=I[M]).hostId]||(P[k.hostId]=g$4.H.get(k.hostId)),!P[k.hostId])continue;let c=P[k.hostId];c.shadowRoot&&k.node.parentElement!==c&&c.insertBefore(k.node,null==(m=null==(f=I[M-1])?void 0:f.node)?void 0:m.nextSibling),c.shadowRoot&&y||(k.slot["s-cr"]||(k.slot["s-cr"]=c["s-cr"],!k.slot["s-cr"]&&c.shadowRoot?k.slot["s-cr"]=c:k.slot["s-cr"]=(c.__childNodes||c.childNodes)[0]),addSlotRelocateNode(k.node,k.slot,0,k.node["s-oo"]||C),null!=(g=k.node.parentElement)&&g.shadowRoot&&k.node.getAttribute&&k.node.getAttribute("slot")&&k.node.removeAttribute("slot")),C=(k.node["s-oo"]||C)+1}if(y&&!y.childNodes.length){let u=0,d=_.length;if(d){for(;u<d;u++){let c=_[u];c&&y.appendChild(c)}Array.from(c.childNodes).forEach(c=>{"string"!=typeof c["s-en"]&&"string"!=typeof c["s-sn"]&&(1===c.nodeType&&c.slot&&c.hidden?c.removeAttribute("hidden"):8!==c.nodeType||c.nodeValue||c.parentNode.removeChild(c))})}}p.$hostElement$=c})(c,d.$,p,u)}p||12&d.i&&setContentReference(c);{let d=c;for(;d=d.parentNode||d.host;)if(1===d.nodeType&&d.hasAttribute("s-id")&&d["s-p"]||d["s-p"]){attachToAncestor(u,u._=d);break}}d.o&&Object.entries(d.o).map(([u,[d]])=>{if(31&d&&Object.prototype.hasOwnProperty.call(c,u)){let d=c[u];delete c[u],c[u]=d}}),(async(c,u,d)=>{let p;try{if(!(32&u.i)){u.i|=32;{p=c.constructor;let d=c.localName;customElements.whenDefined(d).then(()=>u.i|=128)}if(p&&p.style){let c;"string"==typeof p.style&&(c=p.style);let u=getScopeId(d);if(!d$4.has(u)||e$2){let p=(d.$,()=>{});registerStyle(u,c,!!(1&d.i)),p()}}}let h=u._,f=()=>scheduleUpdate(u,!0);h&&h["s-rc"]?h["s-rc"].push(f):f()}catch(d){consoleError(d,c),u.I&&(u.I(),u.I=void 0),u.P&&u.P(c)}})(c,u,d)}}},setContentReference=c=>{if(!y$2.document)return;let u=c["s-cr"]=y$2.document.createComment(`content-ref (host=${c.localName})`);u["s-cn"]=!0,insertBefore(c,u,c.firstChild)},proxyCustomElement=(c,u)=>{let d={i:u[0],$:u[1]};try{d.o=u[2],d.q=u[3],d.U=normalizeWatchers(c.U),d.B=c.B,d.V=c.V,d.R=[],(()=>{if(!y$2.document)return;let c=y$2.document.querySelectorAll(`[${$$1}]`),u=0;for(;u<c.length;u++)registerStyle(c[u].getAttribute($$1),c[u].innerHTML.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),!0)})();let p=c.prototype.connectedCallback,h=c.prototype.disconnectedCallback;return Object.assign(c.prototype,{__hasHostListenerAttached:!1,__registerHost(){let c;(c={i:0,$hostElement$:this,t:d,l:new Map,J:new Map}).Y=new Promise(u=>c.P=u),this["s-p"]=[],this["s-rc"]=[],this.__stencil__getHostRef=()=>c,512&d.i&&l$9&&reWireGetterSetter(this,c)},connectedCallback(){if(!this.__hasHostListenerAttached){let c=getHostRef(this);if(!c)return;addHostEventListeners(this,c,d.q),this.__hasHostListenerAttached=!0}connectedCallback(this),p&&p.call(this)},disconnectedCallback(){(async c=>{if(!(1&g$4.i)){let u=getHostRef(c);null!=u&&u.Z&&(u.Z.map(c=>c()),u.Z=void 0)}C$2.has(c)&&C$2.delete(c),c.shadowRoot&&C$2.has(c.shadowRoot)&&C$2.delete(c.shadowRoot)})(this),h&&h.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${d.$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else createShadowRoot.call(this,d)}}),Object.defineProperty(c,"is",{value:d.$,configurable:!0}),proxyComponent(c,d)}catch(u){return consoleError(u),c}},addHostEventListeners=(c,u,d,p)=>{d&&y$2.document&&d.map(([d,p,h])=>{let f=hostListenerProxy(u,h),m=hostListenerOpts(d);g$4.ael(c,p,f,m),(u.Z=u.Z||[]).push(()=>g$4.rel(c,p,f,m))})},hostListenerProxy=(c,u)=>d=>{try{c.$hostElement$[u](d)}catch(u){consoleError(u,c.$hostElement$)}},hostListenerOpts=c=>w$3?{passive:!!(1&c),capture:!!(2&c)}:!!(2&c),z$3=void 0;function transformTag(c){return z$3?z$3(c):c}function setTagTransformer(c){z$3&&console.warn(`
6      A tagTransformer has already been set. 
7      Overwriting it may lead to error and unexpected results if your components have already been defined.
8    `),z$3=c}["cosmos-button"].every(function(c){return transformTag(c)===transformScopedTag(c)})||setTagTransformer(transformScopedTag);let t$3={elementDelimiter:"__",modifierDelimiter:"--",namespace:"",namespaceDelimiter:"-",strict:!0},includesChars=(c,u)=>u.some(u=>c.includes(u)),invalidMessage=(c,u,d)=>`The ${c} ("${u}") must not use the characters contained within the delimiters ("${d.join('", "')}").`;!function({elementDelimiter:c,modifierDelimiter:u,namespace:d,namespaceDelimiter:p,strict:h}){"string"==typeof c&&(t$3.elementDelimiter=c),"string"==typeof u&&(t$3.modifierDelimiter=u),("string"==typeof d||Array.isArray(d))&&(t$3.namespace=d),"string"==typeof p&&(t$3.namespaceDelimiter=p),t$3.strict=h}({strict:!1});let transformModifierToArray=c=>"object"!=typeof c?c:Object.keys(c).reduce((u,d)=>{let p=c[d];return p?!0===p?[...u,d]:"object"==typeof p?[...u,...Object.keys(p).map(c=>`${d}-${p[c]}@${c}`)]:[...u,`${d}-${p}`]:u},[]),bem=c=>(u,d)=>
8{let p="string"==typeof u?u:transformModifierToArray(u);return(function(c,u={}){let{elementDelimiter:d,modifierDelimiter:p,namespace:h,namespaceDelimiter:f,strict:m}={...t$3,...u},g=`${[].concat(h).filter(Boolean).reduce((c,u)=>`${c}${u}${f}`,"")}${c}`,v=m?[f,d,p]:[],y=m?v.join("").split("").filter((c,u,d)=>d.indexOf(c)===u):[];return function(c,u){if(null==c)return g;let h="string"==typeof c?c:null;if(m&&null!=h&&includesChars(h,y))throw Error(invalidMessage("element",h,v));let f=null==h?g:`${g}${d}${h}`,b="string"==typeof c?u:c;if(null==b)return f;let S=(c,u)=>{if(null!=u&&""!==u){if(m&&includesChars(u,y))throw Error(invalidMessage("modifier",u,v));return`${c} ${f}${p}${u}`}return c};return Array.isArray(b)?b.reduce(S,f):Object.keys(b).filter(c=>!!b[c]).reduce(S,f)}})(c)(p,transformModifierToArray(d))},e$1=typeof window>"u"?{}:window,n$3=!!(null!=(Ah=e$1.cosmosConfig)&&Ah.disableWarnings)||!!(null!=(wh=e$1.gravityConfig)&&wh.disableWarnings),r$h={get disableWarnings(){return n$3},set disableWarnings(ie){n$3=ie}};e$1.cosmosConfig=r$h,e$1.gravityConfig=r$h;let nextTick=()=>new Promise(c=>{requestAnimationFrame(()=>requestAnimationFrame(()=>{c()}))}),i$6=class{constructor(){this.classNames={enter:"enter",leave:"leave"},this.timeouts={enter:void 0,leave:void 0}}async enter(c,u){if(!c)return Promise.reject();let d=this.getClassNames();return this.clearTimeouts(),this.clearClassNames(c),this.addClassName(c,d.enter),await this.addClassNameOnNextTick(c,d.enterActive),new Promise(d=>{this.timeouts.enter=setTimeout(()=>{this.clearClassNames(c),d()},u)})}async leave(c,u){if(!c)return Promise.reject();let d=this.getClassNames();return this.clearTimeouts(),this.clearClassNames(c),this.addClassName(c,d.leave),await this.addClassNameOnNextTick(c,d.leaveActive),new Promise(d=>{this.timeouts.leave=setTimeout(()=>{this.clearClassNames(c),d()},u)})}getClassNames(){return{enter:this.classNames.enter,enterActive:`${this.classNames.enter}-active`,leave:this.classNames.leave,leaveActive:`${this.classNames.leave}-active`}}addClassName(c,u){c.classList.add(u)}clearTimeouts(){Object.values(this.timeouts).forEach(c=>{c&&clearTimeout(c)})}clearClassNames(c){Object.values(this.getClassNames()).forEach(u=>{this.removeClassName(c,u)})}removeClassName(c,u){c.classList.remove(u)}async addClassNameOnNextTick(c,u){await nextTick(),this.addClassName(c,u)}};var o$f="u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{};function getDefaultExportFromCjs(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var Ah,wh,G,P$1,s$2="[object Symbol]",u$2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,a$b=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
87f]/g,f$4="\\ud800-\\udfff",c$a="\\u2700-\\u27bf",l$8="a-z\\xdf-\\xf6\\xf8-\\xff",d$3="A-Z\\xc0-\\xd6\\xd8-\\xde",h$1="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",p$5="['’]",x$3="["+h$1+"]",m$4="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",g$3="\\d+",b$2="["+c$a+"]",y$1="["+l$8+"]",v$1="[^"+f$4+h$1+g$3+c$a+l$8+d$3+"]",$="(?:\\ud83c[\\udde6-\\uddff]){2}",E$1="[\\ud800-\\udbff][\\udc00-\\udfff]",A$1="["+d$3+"]",w$2="(?:"+y$1+"|"+v$1+")",O$1="(?:"+A$1+"|"+v$1+")",S$1="(?:['’](?:d|ll|m|re|s|t|ve))?",D$1="(?:['’](?:D|LL|M|RE|S|T|VE))?",j$1="(?:"+m$4+"|\\ud83c[\\udffb-\\udfff])?",T$1="[\\ufe0e\\ufe0f]?",C$1=T$1+j$1+("(?:\\u200d(?:"+["[^"+f$4+"]",$,E$1].join("|")+")"+T$1)+j$1+")*",U="(?:"+[b$2,$,E$1].join("|")+")"+C$1,I$1=RegExp(p$5,"g"),z$2=RegExp(m$4,"g"),N$1=RegExp([A$1+"?"+y$1+"+"+S$1+"(?="+[x$3,A$1,"$"].join("|")+")",O$1+"+"+D$1+"(?="+[x$3,A$1+w$2,"$"].join("|")+")",A$1+"?"+w$2+"+"+S$1,A$1+"+"+D$1,g$3,U].join("|"),"g"),Z=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,R$1="object"==typeof o$f&&o$f&&o$f.Object===Object&&o$f,L$1="object"==typeof self&&self&&self.Object===Object&&self,F$1=R$1||L$1||Function("return this")(),M$1=(G={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"ss"},function(c){return null==G?void 0:G[c]}),k$1=Object.prototype.toString,H$1=F$1.Symbol,W=H$1?H$1.prototype:void 0,Y=W?W.toString:void 0;function baseToString$1$1(c){if("string"==typeof c)return c;if("symbol"==typeof c||c&&"object"==typeof c&&k$1.call(c)==s$2)return Y?Y.call(c):"";var u=c+"";return"0"==u&&1/c==-1/0?"-0":u}function toString$1$1(c){return null==c?"":baseToString$1$1(c)}var J=getDefaultExportFromCjs((P$1=function(c,u,d){return c+(d?"-":"")+u.toLowerCase()},function(c){for(var u,d,p,h=(d=((u=toString$1$1(u=c))&&u.replace(a$b,M$1).replace(z$2,"")).replace(I$1,""),(p=d=toString$1$1(d),Z.test(p))?d.match(N$1)||[]:d.match(u$2)||[]),f="",m=-1,g=h?h.length:0;++m<g;)f=P$1(f,h[m],m,h);return f}));let formatMemberName=(c,u)=>{switch(u){case"property":return J(c);case"method":return`${c}()`;default:return c}},isNamedSlotUsed=(c,u)=>!!u&&!!c.querySelector(`[slot="${u}"]`),Logger_warn=c=>{r$h.disableWarnings||e$1.console.warn("%c🪐 Gravity / Cosmos","color: #000F1E; background: #FF900099; font-weight: bold; font-size: 10px; padding: 2px 6px; border-radius: 5px;",c)};var q="[object Symbol]",B$1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,K=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
87f]/g,V="\\ud800-\\udfff",_$1="\\u0300-\\u036f\\ufe20-\\ufe23",Q="\\u20d0-\\u20f0",X="\\u2700-\\u27bf",tt="a-z\\xdf-\\xf6\\xf8-\\xff",et="A-Z\\xc0-\\xd6\\xd8-\\xde",nt="\\ufe0e\\ufe0f",rt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",it="['’]",ot="["+V+"]",st="["+rt+"]",ut="["+_$1+Q+"]",at="\\d+",ft="["+X+"]",ct="["+tt+"]",lt="[^"+V+rt+at+X+tt+et+"]",dt="\\ud83c[\\udffb-\\udfff]",ht="[^"+V+"]",pt="(?:\\ud83c[\\udde6-\\uddff]){2}",xt="[\\ud800-\\udbff][\\udc00-\\udfff]",mt="["+et+"]",gt="\\u200d",bt="(?:"+ct+"|"+lt+")",yt="(?:"+mt+"|"+lt+")",vt="(?:['’](?:d|ll|m|re|s|t|ve))?",$t="(?:['’](?:D|LL|M|RE|S|T|VE))?",Et="(?:"+ut+"|"+dt+")?",At="["+nt+"]?",wt=At+Et+("(?:"+gt+"(?:"+[ht,pt,xt].join("|")+")"+At)+Et+")*",Ot="(?:"+[ft,pt,xt].join("|")+")"+wt,St="(?:"+[ht+ut+"?",ut,pt,xt,ot].join("|")+")",Dt=RegExp(it,"g"),jt=RegExp(ut,"g"),Tt=RegExp(dt+"(?="+dt+")|"+St+wt,"g"),Ct=RegExp([mt+"?"+ct+"+"+vt+"(?="+[st,mt,"$"].join("|")+")",yt+"+"+$t+"(?="+[st,mt+bt,"$"].join("|")+")",mt+"?"+bt+"+"+vt,mt+"+"+$t,at,Ot].join("|"),"g"),Ut=RegExp("["+gt+V+_$1+Q+nt+"]"),It=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zt="object"==typeof o$f&&o$f&&o$f.Object===Object&&o$f,Nt="object"==typeof self&&self&&self.Object===Object&&self,Zt=zt||Nt||Function("return this")(),Rt=function(c){return function(u){return null==c?void 0:c[u]}}({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"ss"});function hasUnicode$2(c){return Ut.test(c)}function stringToArray$2(c){return hasUnicode$2(c)?c.match(Tt)||[]:c.split("")}var Lt=Object.prototype.toString,Ft=Zt.Symbol,Gt=Ft?Ft.prototype:void 0,Mt=Gt?Gt.toString:void 0;function baseToString$3(c){if("string"==typeof c)return c;if("symbol"==typeof c||c&&"object"==typeof c&&Lt.call(c)==q)return Mt?Mt.call(c):"";var u=c+"";return"0"==u&&1/c==-1/0?"-0":u}function castSlice$2(c,u,d){var p=c.length;return d=void 0===d?p:d,!u&&d>=p?c:function(c,u,d){var p=-1,h=c.length;u<0&&(u=-u>h?0:h+u),(d=d>
8h?h:d)<0&&(d+=h),h=u>d?0:d-u>>>0,u>>>=0;for(var f=Array(h);++p<h;)f[p]=c[p+u];return f}(c,u,d)}function toString$3(c){return null==c?"":baseToString$3(c)}var kt,Pt=function(c){return function(u){for(var d,p,h,f=(d=((h=toString$3(h=u))&&h.replace(K,Rt).replace(jt,"")).replace(Dt,""),(p=d=toString$3(d),It.test(p))?d.match(Ct)||[]:d.match(B$1)||[]),m="",g=-1,v=f?f.length:0;++g<v;)m=c(m,f[g],g,f);return m}}(function(c,u,d){return u=u.toLowerCase(),c+(d?Ht(toString$3(u).toLowerCase()):u)}),Ht=(kt="toUpperCase",function(c){var u=hasUnicode$2(c=toString$3(c))?stringToArray$2(c):void 0,d=u?u[0]:c.charAt(0),p=u?castSlice$2(u,1).join(""):c.slice(1);return d[kt]()+p}),Wt=getDefaultExportFromCjs(Pt);class Yt{constructor(c,u){this.componentName=c,this.deprecationMap=u}getDeprecationConfig(c,u){var d;return(null==(d=this.deprecationMap[c])?void 0:d.type)===u?this.deprecationMap[c]:void 0}createDeprecationMessage({type:c,name:u,message:d}){let p,h="";h="component"===c?`Deprecated ${c}: "${u}"`:"generic"===c?`Deprecation in ${this.componentName}: "${u}"`:`Deprecated ${c} in ${this.componentName}: "${u}"`;let f=(p=Wt(this.componentName.split("-")[0]),`${p.charAt(0).toUpperCase()}${p.slice(1)}`);return`${h}
9${d}
10See the documentation for more information: https://win.gs/${f}WebDeprecations`}logWarning(c){Logger_warn(this.createDeprecationMessage({...c,componentName:this.componentName}))}warnComponent(){let c="component",u=this.getDeprecationConfig(this.componentName,c);u&&this.logWarning({...u,name:this.componentName,type:c})}warnMethod(c,u){let d="method",p=this.getDeprecationConfig(c,d);p&&(!p.warnCondition||p.warnCondition(u))&&this.logWarning({...p,name:formatMemberName(c,d)})}warnProperty(c,u){let d="property",p=this.getDeprecationConfig(c,d);if(!p||p.warnCondition&&!p.warnCondition(u))return;let h=formatMemberName(c,d);if(p.deprecatedValues){if(!p.deprecatedValues.includes(u))return;d="property value",h=String(u)}this.logWarning({...p,name:h,type:d})}warnProperties(c){for(let u in this.deprecationMap){let d=c[u];void 0!==d&&"property"===this.deprecationMap[u].type&&this.warnProperty(u,d)}}warnEvent(c){let u="event",d=this.getDeprecationConfig(c,u);d&&this.logWarning({...d,name:formatMemberName(c,u)})}warnPart(c){let u="part",d=this.getDeprecationConfig(c,u);d&&this.logWarning({...d,name:formatMemberName(c,u)})}warnParts(c){var u;let d=null==(u=null==e$1?void 0:e$1.document)?void 0:u.styleSheets;if(d)for(let u of((c,u)=>{let d=[];if(!(null!=u&&u.length))return d;for(let p of u)if("cssRules"in p)for(let u of Object.values(p.cssRules))"selectorText"in u&&u.selectorText.includes("::part")&&u.selectorText.split(",").forEach(u=>{if(!(u=u.trim()).includes("::part"))return;let[p,h]=u.split("::part");c.matches(p)&&d.push(h.replace(/[{()}]/g,""))});return[...new Set(d)].sort()})(c,Array.from(d).filter(c=>!c.href||c.href.startsWith(location.origin))))u in this.deprecationMap&&this.warnPart(u)}warnSlot(c){let u="slot",d=this.getDeprecationConfig(c,u);d&&this.logWarning({...d,name:formatMemberName(c,u)})}warnSlots(c){for(let u in this.deprecationMap)"slot"===this.deprecationMap[u].type&&isNamedSlotUsed(c,u)&&this.warnSlot(u)}warnGeneric(c){clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{let u="generic",d=this.getDeprecationConfig(c,u);d&&this.logWarning({...d,name:formatMemberName(c,u)})},300)}}let isNodeEnvironment=()=>"u">typeof process&&null!=process.versions&&null!=process.versions.node;class Jt{constructor(){isNodeEnvironment()||(this.eventTarget=document.createDocumentFragment())}on(c,u){var d;null==(d=this.eventTarget)||d.addEventListener(c,u)}off(c,u){var d;null==(d=this.eventTarget)||d.removeEventListener(c,u)}emit(c,u){var d;let p=new CustomEvent(c,u);null==(d=this.eventTarget)||d.dispatchEvent(p)}}let interceptEvent=c=>{c.preventDefault(),c.stopPropagation()},forceFocus=async function(c,u=5){c.addEventListener("focus",interceptEvent),c.addEventListener("blur",interceptEvent);for(let d=0;d<u;d++)await nextTick(),c.blur(),c.focus();c.blur(),c.removeEventListener("focus",interceptEvent),c.removeEventListener("blur",interceptEvent),c.focus()},hasReducedMotion=()=>e$1.matchMedia("(prefers-reduced-motion: reduce)").matches,isTouchDevice=()=>"ontouchstart"in e$1.window||e$1.navigator.maxTouchPoints>0,requestFormSubmit=c=>{if(c){if("function"==typeof HTMLFormElement.prototype.requestSubmit)return c.requestSubmit();if(!isNodeEnvironment()){let u=e$1.document.createElement("button");u.type="submit",u.style.display="none",c.appendChild(u),u.click(),u.remove()}}},qt=/([a-zA-Z0-9-]+)@([a-zA-Z0-9-]+)/,isResponsiveProperty=c=>"string"==typeof c&&qt.test(c),parseResponsiveProperty=c=>(c.match(RegExp(qt,"g"))||[]).reduce((c,u)=>{let d=u.match(qt);if(d){let[,u,p]=d;c[p]=u}return c},{}),serializeResponsiveProperty=c=>Object.entries(c).filter(([,c])=>null!=c).map(([c,u])=>`${u}@${c}`).join(" "),mapResponsiveProperty=(c,u)=>Object.entries(c).reduce((c,[d,p])=>(p&&u[p]&&(c[d]=u[p]),c),{});function hasNamedSlot(c,u){if(!c||"function"!=typeof c.querySelector)return!1;try{let d=c.querySelector(`:scope > [slot="${u}"]`);return void 0===d?!!c.querySelector(`[slot="${u}"]`):null!==d}catch{return!!c.querySelector(`[slot="${u}"]`)}}function getDefaultSlotTextContent(c){return c&&"function"==typeof c.assignedNodes?c.assignedNodes({flatten:!0}).reduce((c,u)=>c+(u.textContent||""),"").trim():""}function getNamedSlotTextContent(c,u){var d,p,h,f,m;if(!c||"function"!=typeof c.querySelector)return"";try{let f=c.querySelector(`:scope > [slot="${u}"]`);return void 0===f?(null==(p=null==(d=c.querySelector(`[slot="${u}"]`))?void 0:d.textContent)?void 0:p.trim())||"":(null==(h=null==f?void 0:f.textContent)?void 0:h.trim())||""}catch{return(null==(m=null==(f=c.querySelector(`[slot="${u}"]`))?void 0:f.textContent)?void 0:m.trim())||""}}class Bt{constructor(){this.observers=new Map,this.isNodeEnv=isNodeEnvironment(),this.observer=this.isNodeEnv?null:this.createObserver()}static getInstance(){return Bt.instance||(Bt.instance=new Bt),Bt.instance}observe(c,u){var d;this.isNodeEnv||this.observers.has(c)||(this.observers.set(c,u),null==(d=this.observer)||d.observe(c,Bt.OBSERVER_OPTIONS),u.call(c))}unobserve(c){var u;!this.isNodeEnv&&this.observers.has(c)&&(this.observers.delete(c),0===this.observers.size&&(null==(u=this.observer)||u.disconnect()))}createObserver(){return new MutationObserver(this.handleMutations.bind(this))}
vendor: 4,348 bytes, line 10
10handleMutations(c){c.forEach(c=>{this.observers.forEach((u,d)=>{d.contains(c.target)&&u.call(d)})})}}Bt.instance=null,Bt.OBSERVER_OPTIONS={childList:!0,subtree:!0,characterData:!0};let Kt=Bt.getInstance();var e="top",t$2="bottom",n$2="right",o$e="left",r$g="auto",i$5=[e,t$2,n$2,o$e],a$a="start",u$1="end",c$9="viewport",f$3="popper",s$1=i$5.reduce(function(c,u){return c.concat([u+"-"+a$a,u+"-"+u$1])},[]),l$7=[].concat(i$5,[r$g]).reduce(function(c,u){return c.concat([u,u+"-"+a$a,u+"-"+u$1])},[]),d$2=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function getNodeName(c){return c?(c.nodeName||"").toLowerCase():null}function getWindow(c){if(null==c)return window;if("[object Window]"!==c.toString()){var u=c.ownerDocument;return u&&u.defaultView||window}return c}function isElement$1(c){return c instanceof getWindow(c).Element||c instanceof Element}function isHTMLElement(c){return c instanceof getWindow(c).HTMLElement||c instanceof HTMLElement}function isShadowRoot(c){return"u">typeof ShadowRoot&&(c instanceof getWindow(c).ShadowRoot||c instanceof ShadowRoot)}var p$4={name:"applyStyles",enabled:!0,phase:"write",fn:function(c){var u=c.state;Object.keys(u.elements).forEach(function(c){var d=u.styles[c]||{},p=u.attributes[c]||{},h=u.elements[c];isHTMLElement(h)&&getNodeName(h)&&(Object.assign(h.style,d),Object.keys(p).forEach(function(c){var u=p[c];!1===u?h.removeAttribute(c):h.setAttribute(c,!0===u?"":u)}))})},effect:function(c){var u=c.state,d={popper:{position:u.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(u.elements.popper.style,d.popper),u.styles=d,u.elements.arrow&&Object.assign(u.elements.arrow.style,d.arrow),function(){Object.keys(u.elements).forEach(function(c){var p=u.elements[c],h=u.attributes[c]||{},f=Object.keys(u.styles.hasOwnProperty(c)?u.styles[c]:d[c]).reduce(function(c,u){return c[u]="",c},{});isHTMLElement(p)&&getNodeName(p)&&(Object.assign(p.style,f),Object.keys(h).forEach(function(c){p.removeAttribute(c)}))})}},requires:["computeStyles"]};function getBasePlacement$1(c){return c.split("-")[0]}var m$3=Math.max,v=Math.min,g$2=Math.round;function getUAString(){var c=navigator.userAgentData;return null!=c&&c.brands&&Array.isArray(c.brands)?c.brands.map(function(c){return c.brand+"/"+c.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(c,u,d){void 0===u&&(u=!1),void 0===d&&(d=!1);var p=c.getBoundingClientRect(),h=1,f=1;u&&isHTMLElement(c)&&(h=c.offsetWidth>0&&g$2(p.width)/c.offsetWidth||1,f=c.offsetHeight>0&&g$2(p.height)/c.offsetHeight||1);var m=(isElement$1(c)?getWindow(c):window).visualViewport,g=!isLayoutViewport()&&d,v=(p.left+(g&&m?m.offsetLeft:0))/h,y=(p.top+(g&&m?m.offsetTop:0))/f,b=p.width/h,S=p.height/f;return{width:b,height:S,top:y,right:v+b,bottom:y+S,left:v,x:v,y:y}}function getLayoutRect(c){var u=getBoundingClientRect(c),d=c.offsetWidth,p=c.offsetHeight;return 1>=Math.abs(u.width-d)&&(d=u.width),1>=Math.abs(u.height-p)&&(p=u.height),{x:c.offsetLeft,y:c.offsetTop,width:d,height:p}}function contains(c,u){var d=u.getRootNode&&u.getRootNode();if(c.contains(u))return!0;if(d&&isShadowRoot(d)){var p=u;do{if(p&&c.isSameNode(p))return!0;p=p.parentNode||p.host}while(p)}return!1}function getComputedStyle$1(c){return getWindow(c).getComputedStyle(c)}function isTableElement(c){return["table","td","th"].indexOf(getNodeName(c))>=0}function getDocumentElement(c){return((isElement$1(c)?c.ownerDocument:c.document)||window.document).documentElement}function getParentNode(c){return"html"===getNodeName(c)?c:c.assignedSlot||c.parentNode||(isShadowRoot(c)?c.host:null)||getDocumentElement(c)}function getTrueOffsetParent(c){return isHTMLElement(c)&&"fixed"!==getComputedStyle$1(c).position?c.offsetParent:null}function getOffsetParent(c){for(var u=getWindow(c),d=getTrueOffsetParent(c);d&&isTableElement(d)&&"static"===getComputedStyle$1(d).position;)d=getTrueOffsetParent(d);return d&&("html"===getNodeName(d)||"body"===getNodeName(d)&&"static"===getComputedStyle$1(d).position)?u:d||function(c){var u=/firefox/i.test(getUAString());if(/Trident/i.test(getUAString())&&isHTMLElement(c)&&"fixed"===getComputedStyle$1(c).position)return null;var d=getParentNode(c);
vendor: 4,431 bytes, line 10
10for(isShadowRoot(d)&&(d=d.host);isHTMLElement(d)&&0>["html","body"].indexOf(getNodeName(d));){var p=getComputedStyle$1(d);if("none"!==p.transform||"none"!==p.perspective||"paint"===p.contain||-1!==["transform","perspective"].indexOf(p.willChange)||u&&"filter"===p.willChange||u&&p.filter&&"none"!==p.filter)return d;d=d.parentNode}return null}(c)||u}function getMainAxisFromPlacement(c){return["top","bottom"].indexOf(c)>=0?"x":"y"}function within(c,u,d){return m$3(c,v(u,d))}function mergePaddingObject(c){return Object.assign({},{top:0,right:0,bottom:0,left:0},c)}function expandToHashMap(c,u){return u.reduce(function(u,d){return u[d]=c,u},{})}var h={name:"arrow",enabled:!0,phase:"main",fn:function(c){var u,d=c.state,p=c.name,h=c.options,f=d.elements.arrow,m=d.modifiersData.popperOffsets,g=getBasePlacement$1(d.placement),v=getMainAxisFromPlacement(g),y=[o$e,n$2].indexOf(g)>=0?"height":"width";if(f&&m){var b,S=(b=h.padding,mergePaddingObject("number"!=typeof(b="function"==typeof b?b(Object.assign({},d.rects,{placement:d.placement})):b)?b:expandToHashMap(b,i$5))),_=getLayoutRect(f),E="y"===v?e:o$e,T="y"===v?t$2:n$2,w=d.rects.reference[y]+d.rects.reference[v]-m[v]-d.rects.popper[y],P=m[v]-d.rects.reference[v],A=getOffsetParent(f),I=A?"y"===v?A.clientHeight||0:A.clientWidth||0:0,M=S[E],R=I-_[y]-S[T],k=I/2-_[y]/2+(w/2-P/2),x=within(M,k,R);d.modifiersData[p]=((u={})[v]=x,u.centerOffset=x-k,u)}},effect:function(c){var u=c.state,d=c.options.element,p=void 0===d?"[data-popper-arrow]":d;null!=p&&("string"!=typeof p||(p=u.elements.popper.querySelector(p)))&&contains(u.elements.popper,p)&&(u.elements.arrow=p)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(c){return c.split("-")[1]}var y={top:"auto",right:"auto",bottom:"auto",left:"auto"};function mapToStyles(c){var u,d=c.popper,p=c.popperRect,h=c.placement,f=c.variation,m=c.offsets,g=c.position,v=c.gpuAcceleration,b=c.adaptive,S=c.roundOffsets,_=c.isFixed,E=m.x,T=void 0===E?0:E,w=m.y,P=void 0===w?0:w,A="function"==typeof S?S({x:T,y:P}):{x:T,y:P};T=A.x,P=A.y;var I=m.hasOwnProperty("x"),M=m.hasOwnProperty("y"),R=o$e,k=e,x=window;if(b){var C=getOffsetParent(d),O="clientHeight",D="clientWidth";C===getWindow(d)&&"static"!==getComputedStyle$1(C=getDocumentElement(d)).position&&"absolute"===g&&(O="scrollHeight",D="scrollWidth"),(h===e||(h===o$e||h===n$2)&&f===u$1)&&(k=t$2,P-=(_&&C===x&&x.visualViewport?x.visualViewport.height:C[O])-p.height,P*=v?1:-1),(h===o$e||(h===e||h===t$2)&&f===u$1)&&(R=n$2,T-=(_&&C===x&&x.visualViewport?x.visualViewport.width:C[D])-p.width,T*=v?1:-1)}var L,N,U,F,B,j,H=Object.assign({position:g},b&&y),V=!0===S?(L={x:T,y:P},N=getWindow(d),U=L.x,F=L.y,{x:g$2(U*(B=N.devicePixelRatio||1))/B||0,y:g$2(F*B)/B||0}):{x:T,y:P};return T=V.x,P=V.y,v?Object.assign({},H,((j={})[k]=M?"0":"",j[R]=I?"0":"",j.transform=1>=(x.devicePixelRatio||1)?"translate("+T+"px, "+P+"px)":"translate3d("+T+"px, "+P+"px, 0)",j)):Object.assign({},H,((u={})[k]=M?P+"px":"",u[R]=I?T+"px":"",u.transform="",u))}var b$1={passive:!0},w$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(c){return c.replace(/left|right|bottom|top/g,function(c){return w$1[c]})}var O={start:"end",end:"start"};function getOppositeVariationPlacement(c){return c.replace(/start|end/g,function(c){return O[c]})}function getWindowScroll(c){var u=getWindow(c);return{scrollLeft:u.pageXOffset,scrollTop:u.pageYOffset}}function getWindowScrollBarX(c){return getBoundingClientRect(getDocumentElement(c)).left+getWindowScroll(c).scrollLeft}function isScrollParent(c){var u=getComputedStyle$1(c),d=u.overflow,p=u.overflowX,h=u.overflowY;return/auto|scroll|overlay|hidden/.test(d+h+p)}function getScrollParent(c){return["html","body","#document"].indexOf(getNodeName(c))>=0?c.ownerDocument.body:isHTMLElement(c)&&isScrollParent(c)?c:getScrollParent(getParentNode(c))}function listScrollParents(c,u){void 0===u&&(u=[]);var d,p=getScrollParent(c),h=p===(null==(d=c.ownerDocument)?void 0:d.body),f=getWindow(p),m=h?[f].concat(f.visualViewport||[],isScrollParent(p)?p:[]):p,g=u.concat(m);return h?g:g.concat(listScrollParents(getParentNode(m)))}function rectToClientRect(c){return Object.assign({},c,{left:c.x,top:c.y,right:c.x+c.width,bottom:c.y+c.height})}function getClientRectFromMixedType(c,u,d){var p,h,f,m,g,v,y,b,S,_;return u===c$9?rectToClientRect(function(c,u){var d=getWindow(c),p=getDocumentElement(c),h=d.visualVie
10wport,f=p.clientWidth,m=p.clientHeight,g=0,v=0;if(h){f=h.width,m=h.height;var y=isLayoutViewport();(y||!y&&"fixed"===u)&&(g=h.offsetLeft,v=h.offsetTop)}return{width:f,height:m,x:g+getWindowScrollBarX(c),y:v}}(c,d)):isElement$1(u)?((p=getBoundingClientRect(u,!1,"fixed"===d)).top=p.top+u.clientTop,p.left=p.left+u.clientLeft,p.bottom=p.top+u.clientHeight,p.right=p.left+u.clientWidth,p.width=u.clientWidth,p.height=u.clientHeight,p.x=p.left,p.y=p.top,p):rectToClientRect((h=getDocumentElement(c),m=getDocumentElement(h),g=getWindowScroll(h),v=null==(f=h.ownerDocument)?void 0:f.body,y=m$3(m.scrollWidth,m.clientWidth,v?v.scrollWidth:0,v?v.clientWidth:0),b=m$3(m.scrollHeight,m.clientHeight,v?v.scrollHeight:0,v?v.clientHeight:0),S=-g.scrollLeft+getWindowScrollBarX(h),_=-g.scrollTop,"rtl"===getComputedStyle$1(v||m).direction&&(S+=m$3(m.clientWidth,v?v.clientWidth:0)-y),{width:y,height:b,x:S,y:_}))}function getClippingRect(c,u,d,p){var h,f,m=[].concat("clippingParents"===u?(h=listScrollParents(getParentNode(c)),isElement$1(f=["absolute","fixed"].indexOf(getComputedStyle$1(c).position)>=0&&isHTMLElement(c)?getOffsetParent(c):c)?h.filter(function(c){return isElement$1(c)&&contains(c,f)&&"body"!==getNodeName(c)}):[]):[].concat(u),[d]),g=m[0],y=m.reduce(function(u,d){var h=getClientRectFromMixedType(c,d,p);return u.top=m$3(h.top,u.top),u.right=v(h.right,u.right),u.bottom=v(h.bottom,u.bottom),u.left=m$3(h.left,u.left),u},getClientRectFromMixedType(c,g,p));return y.width=y.right-y.left,y.height=y.bottom-y.top,y.x=y.left,y.y=y.top,y}function computeOffsets(c){var u,d=c.reference,p=c.element,h=c.placement,f=h?getBasePlacement$1(h):null,m=h?getVariation(h):null,g=d.x+d.width/2-p.width/2,v=d.y+d.height/2-p.height/2;switch(f){case e:u={x:g,y:d.y-p.height};break;case t$2:u={x:g,y:d.y+d.height};break;case n$2:u={x:d.x+d.width,y:v};break;case o$e:u={x:d.x-p.width,y:v};break;default:u={x:d.x,y:d.y}}var y=f?getMainAxisFromPlacement(f):null;if(null!=y){var b="y"===y?"height":"width";switch(m){case a$a:u[y]=u[y]-(d[b]/2-p[b]/2);break;case u$1:u[y]=u[y]+(d[b]/2-p[b]/2)}}return u}function detectOverflow(c,u){void 0===u&&(u={});var d=u,p=d.placement,h=void 0===p?c.placement:p,f=d.strategy,m=void 0===f?c.strategy:f,g=d.boundary,v=d.rootBoundary,y=d.elementContext,b=void 0===y?f$3:y,S=d.altBoundary,_=d.padding,E=void 0===_?0:_,T=mergePaddingObject("number"!=typeof E?E:expandToHashMap(E,i$5)),w=c.rects.popper,P=c.elements[void 0!==S&&S?b===f$3?"reference":f$3:b],A=getClippingRect(isElement$1(P)?P:P.contextElement||getDocumentElement(c.elements.popper),void 0===g?"clippingParents":g,void 0===v?c$9:v,m),I=getBoundingClientRect(c.elements.reference),M=computeOffsets({reference:I,element:w,placement:h}),R=rectToClientRect(Object.assign({},w,M)),k=b===f$3?R:I,x={top:A.top-k.top+T.top,bottom:k.bottom-A.bottom+T.bottom,left:A.left-k.left+T.left,right:k.right-A.right+T.right},C=c.modifiersData.offset;if(b===f$3&&C){var O=C[h];Object.keys(x).forEach(function(c){var u=[n$2,t$2].indexOf(c)>=0?1:-1,d=[e,t$2].indexOf(c)>=0?"y":"x";x[c]+=O[d]*u})}return x}function computeAutoPlacement(c,u){void 0===u&&(u={});var d=u,p=d.placement,h=d.boundary,f=d.rootBoundary,m=d.padding,g=d.flipVariations,v=d.allowedAutoPlacements,y=void 0===v?l$7:v,b=getVariation(p),S=b?g?s$1:s$1.filter(function(c){return getVariation(c)===b}):i$5,_=S.filter(function(c){return y.indexOf(c)>=0});0===_.length&&(_=S);var E=_.reduce(function(u,d){return u[d]=detectOverflow(c,{placement:d,boundary:h,rootBoundary:f,padding:m})[getBasePlacement$1(d)],u},{});return Object.keys(E).sort(function(c,u){return E[c]-E[u]})}var T={name:"flip",enabled:!0,phase:"main",fn:function(c){var u=c.state,d=c.options,p=c.name;if(!u.modifiersData[p]._skip){for(var h=d.mainAxis,f=void 0===h||h,m=d.altAxis,g=void 0===m||m,v=d.fallbackPlacements,y=d.padding,b=d.boundary,S=d.rootBoundary,_=d.altBoundary,E=d.flipVariations,T=void 0===E||E,w=d.allowedAutoPlacements,P=u.options.placement,A=getBasePlacement$1(P),I=v||(A!==P&&T?function(c){if(getBasePlacement$1(c)===r$g)return[];var u=getOppositePlacement(c);return[getOppositeVariationPlacement(c),u,getOppositeVariationPlacement(u)]}
vendor: 4,395 bytes, line 10
10(P):[getOppositePlacement(P)]),M=[P].concat(I).reduce(function(c,d){return c.concat(getBasePlacement$1(d)===r$g?computeAutoPlacement(u,{placement:d,boundary:b,rootBoundary:S,padding:y,flipVariations:T,allowedAutoPlacements:w}):d)},[]),R=u.rects.reference,k=u.rects.popper,x=new Map,C=!0,O=M[0],D=0;D<M.length;D++){var L=M[D],N=getBasePlacement$1(L),U=getVariation(L)===a$a,F=[e,t$2].indexOf(N)>=0,B=F?"width":"height",j=detectOverflow(u,{placement:L,boundary:b,rootBoundary:S,altBoundary:_,padding:y}),H=F?U?n$2:o$e:U?t$2:e;R[B]>k[B]&&(H=getOppositePlacement(H));var V=getOppositePlacement(H),z=[];if(f&&z.push(j[N]<=0),g&&z.push(j[H]<=0,j[V]<=0),z.every(function(c){return c})){O=L,C=!1;break}x.set(L,z)}if(C)for(var q=function(c){var u=M.find(function(u){var d=x.get(u);if(d)return d.slice(0,c).every(function(c){return c})});if(u)return O=u,"break"},W=T?3:1;W>0&&"break"!==q(W);W--);u.placement!==O&&(u.modifiersData[p]._skip=!0,u.placement=O,u.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(c,u,d){return void 0===d&&(d={x:0,y:0}),{top:c.top-u.height-d.y,right:c.right-u.width+d.x,bottom:c.bottom-u.height+d.y,left:c.left-u.width-d.x}}function isAnySideFullyClipped(c){return[e,n$2,t$2,o$e].some(function(u){return c[u]>=0})}var P={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(c){var u=c.state,d=c.options,p=c.name,h=d.offset,f=void 0===h?[0,0]:h,m=l$7.reduce(function(c,d){var p,h,m,g,v,y;return c[d]=(p=u.rects,m=[o$e,e].indexOf(h=getBasePlacement$1(d))>=0?-1:1,v=(g="function"==typeof f?f(Object.assign({},p,{placement:d})):f)[0],y=g[1],v=v||0,y=(y||0)*m,[o$e,n$2].indexOf(h)>=0?{x:y,y:v}:{x:v,y:y}),c},{}),g=m[u.placement],v=g.x,y=g.y;null!=u.modifiersData.popperOffsets&&(u.modifiersData.popperOffsets.x+=v,u.modifiersData.popperOffsets.y+=y),u.modifiersData[p]=m}},x$2={name:"preventOverflow",enabled:!0,phase:"main",fn:function(c){var u=c.state,d=c.options,p=c.name,h=d.mainAxis,f=d.altAxis,m=d.boundary,g=d.rootBoundary,y=d.altBoundary,b=d.padding,S=d.tether,_=void 0===S||S,E=d.tetherOffset,T=void 0===E?0:E,w=detectOverflow(u,{boundary:m,rootBoundary:g,padding:b,altBoundary:y}),P=getBasePlacement$1(u.placement),A=getVariation(u.placement),I=!A,M=getMainAxisFromPlacement(P),R="x"===M?"y":"x",k=u.modifiersData.popperOffsets,x=u.rects.reference,C=u.rects.popper,O="function"==typeof T?T(Object.assign({},u.rects,{placement:u.placement})):T,D="number"==typeof O?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),L=u.modifiersData.offset?u.modifiersData.offset[u.placement]:null,N={x:0,y:0};if(k){if(void 0===h||h){var U,F="y"===M?e:o$e,B="y"===M?t$2:n$2,j="y"===M?"height":"width",H=k[M],V=H+w[F],z=H-w[B],q=_?-C[j]/2:0,W=A===a$a?x[j]:C[j],G=A===a$a?-C[j]:-x[j],K=u.elements.arrow,Y=_&&K?getLayoutRect(K):{width:0,height:0},X=u.modifiersData["arrow#persistent"]?u.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Q=X[F],Z=X[B],J=within(0,x[j],Y[j]),$=I?x[j]/2-q-J-Q-D.mainAxis:W-J-Q-D.mainAxis,ee=I?-x[j]/2+q+J+Z+D.mainAxis:G+J+Z+D.mainAxis,et=u.elements.arrow&&getOffsetParent(u.elements.arrow),ei=et?"y"===M?et.clientTop||0:et.clientLeft||0:0,en=null!=(U=null==L?void 0:L[M])?U:0,er=within(_?v(V,H+$-en-ei):V,H,_?m$3(z,H+ee-en):z);k[M]=er,N[M]=er-H}if(void 0!==f&&f){var eo,ea,es="x"===M?e:o$e,el="x"===M?t$2:n$2,ec=k[R],eu="y"===R?"height":"width",ed=ec+w[es],ep=ec-w[el],eh=-1!==[e,o$e].indexOf(P),ef=null!=(ea=null==L?void 0:L[R])?ea:0,em=eh?ed:ec-x[eu]-C[eu]-ef+D.altAxis,eg=eh?ec+x[eu]+C[eu]-ef-D.altAxis:ep,ev=_&&eh?(eo=within(em,ec,eg))>eg?eg:eo:within(_?em:ed,ec,_?eg:ep);k[R]=ev,N[R]=ev-ec}u.modifiersData[p]=N}},requiresIfExists:["offset"]};function getCompositeRect(c,u,d){void 0===d&&(d=!1);var p,h,f,m=isHTMLElement(u),g=isHTMLElement(u)&&(h=g$2((p=u.getBoundingClientRect()).width)/u.offsetWidth||1,f=g$2(p.height)/u.offsetHeight||1,1!==h||1!==f),v=getDocumentElement(u),y=getBoundingClientRect(c,g,d),b={scrollLeft:0,scrollTop:0},S={x:0,y:0};return(m||!m&&!d)&&(("body"!==getNodeName(u)||isScrollParent(v))&&(b=u!==getWindow(u)&&isHTMLElement(u)?{scrollLeft:u.scrollLeft,scrollTop:u.scrollTop}:getWindowScroll(u)),isHTMLElement(u)?((S=getBoundingClientRect(u,!0)).x+=u.clientLeft,S.y+=u.clientTop):v&&(S.x=getWindowScrollBarX(v))),{x:y.left+b.scrollLeft-S.x,y:y.top+b.scrollTop-S.y,width:y.width,height:y.height}}function order(c){var u=new Map,d=new Set,p=[];
vendor: 4,864 bytes, line 10
10return c.forEach(function(c){u.set(c.name,c)}),c.forEach(function(c){d.has(c.name)||function c(h){d.add(h.name),[].concat(h.requires||[],h.requiresIfExists||[]).forEach(function(p){if(!d.has(p)){var h=u.get(p);h&&c(h)}}),p.push(h)}(c)}),p}var S={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var c=arguments.length,u=Array(c),d=0;d<c;d++)u[d]=arguments[d];return!u.some(function(c){return!(c&&"function"==typeof c.getBoundingClientRect)})}function popperGenerator(c){void 0===c&&(c={});var u=c,d=u.defaultModifiers,p=void 0===d?[]:d,h=u.defaultOptions,f=void 0===h?S:h;return function(c,u,d){void 0===d&&(d=f);var h,m,g={placement:"bottom",orderedModifiers:[],options:Object.assign({},S,f),modifiersData:{},elements:{reference:c,popper:u},attributes:{},styles:{}},v=[],y=!1,b={state:g,setOptions:function(d){var h="function"==typeof d?d(g.options):d;_(),g.options=Object.assign({},f,g.options,h),g.scrollParents={reference:isElement$1(c)?listScrollParents(c):c.contextElement?listScrollParents(c.contextElement):[],popper:listScrollParents(u)};var m,y,E=(m=order(Object.keys(y=[].concat(p,g.options.modifiers).reduce(function(c,u){var d=c[u.name];return c[u.name]=d?Object.assign({},d,u,{options:Object.assign({},d.options,u.options),data:Object.assign({},d.data,u.data)}):u,c},{})).map(function(c){return y[c]})),d$2.reduce(function(c,u){return c.concat(m.filter(function(c){return c.phase===u}))},[]));return g.orderedModifiers=E.filter(function(c){return c.enabled}),g.orderedModifiers.forEach(function(c){var u=c.name,d=c.options,p=c.effect;if("function"==typeof p){var h=p({state:g,name:u,instance:b,options:void 0===d?{}:d});v.push(h||function(){})}}),b.update()},forceUpdate:function(){if(!y){var c=g.elements,u=c.reference,d=c.popper;if(areValidElements(u,d)){g.rects={reference:getCompositeRect(u,getOffsetParent(d),"fixed"===g.options.strategy),popper:getLayoutRect(d)},g.reset=!1,g.placement=g.options.placement,g.orderedModifiers.forEach(function(c){return g.modifiersData[c.name]=Object.assign({},c.data)});for(var p=0;p<g.orderedModifiers.length;p++)if(!0!==g.reset){var h=g.orderedModifiers[p],f=h.fn,m=h.options,v=void 0===m?{}:m,_=h.name;"function"==typeof f&&(g=f({state:g,options:v,name:_,instance:b})||g)}else g.reset=!1,p=-1}}},update:(h=function(){return new Promise(function(c){b.forceUpdate(),c(g)})},function(){return m||(m=new Promise(function(c){Promise.resolve().then(function(){m=void 0,c(h())})})),m}),destroy:function(){_(),y=!0}};if(!areValidElements(c,u))return b;function _(){v.forEach(function(c){return c()}),v=[]}return b.setOptions(d).then(function(c){!y&&d.onFirstUpdate&&d.onFirstUpdate(c)}),b}}var C=popperGenerator({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(c){var u=c.state,d=c.instance,p=c.options,h=p.scroll,f=void 0===h||h,m=p.resize,g=void 0===m||m,v=getWindow(u.elements.popper),y=[].concat(u.scrollParents.reference,u.scrollParents.popper);return f&&y.forEach(function(c){c.addEventListener("scroll",d.update,b$1)}),g&&v.addEventListener("resize",d.update,b$1),function(){f&&y.forEach(function(c){c.removeEventListener("scroll",d.update,b$1)}),g&&v.removeEventListener("resize",d.update,b$1)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(c){var u=c.state,d=c.name;u.modifiersData[d]=computeOffsets({reference:u.rects.reference,element:u.rects.popper,placement:u.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(c){var u=c.state,d=c.options,p=d.gpuAcceleration,h=d.adaptive,f=d.roundOffsets,m=void 0===f||f,g={placement:getBasePlacement$1(u.placement),variation:getVariation(u.placement),popper:u.elements.popper,popperRect:u.rects.popper,gpuAcceleration:void 0===p||p,isFixed:"fixed"===u.options.strategy};null!=u.modifiersData.popperOffsets&&(u.styles.popper=Object.assign({},u.styles.popper,mapToStyles(Object.assign({},g,{offsets:u.modifiersData.popperOffsets,position:u.options.strategy,adaptive:void 0===h||h,roundOffsets:m})))),null!=u.modifiersData.arrow&&(u.styles.arrow=Object.assign({},u.styles.arrow,mapToStyles(Object.assign({},g,{offsets:u.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:m})))),u.attributes.popper=Object.assign({},u.attributes.popper,{"data-popper-placement":u.placement})},data:{}},p$4,P,T,x$2,h,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(c){var u=c.state,d=c.name,p=u.rects.reference,h=u.rects.popper,f=u.modifiersData.preventOverflow,m=detectOverflow(u,{elementContext:"reference"}),g=detectOverflow(u,{altBoundary:!0}),v=getSideOffsets(m,p),y=getSideOffsets(g,h,f),b=isAnySideFullyClipped(v),S=isAnySideFullyClipped(y);u.modifiersData[d]={referenceClippingOffsets:v,popperEscapeOffsets:y,isReferenceHidden:b,hasPopperEscaped:S},u.attributes.popper=Object.assign({}
10,u.attributes.popper,{"data-popper-reference-hidden":b,"data-popper-escaped":S})}}]}),M={passive:!0,capture:!0},TIPPY_DEFAULT_APPEND_TO=function(){return document.body};function getValueAtIndexOrReturn(c,u,d){return Array.isArray(c)?c[u]??(Array.isArray(d)?d[u]:d):c}function isType(c,u){var d=({}).toString.call(c);return 0===d.indexOf("[object")&&d.indexOf(u+"]")>-1}function invokeWithArgsOrReturn(c,u){return"function"==typeof c?c.apply(void 0,u):c}function debounce(c,u){var d;return 0===u?c:function(p){clearTimeout(d),d=setTimeout(function(){c(p)},u)}}function normalizeToArray(c){return[].concat(c)}function pushIfUnique(c,u){-1===c.indexOf(u)&&c.push(u)}function arrayFrom(c){return[].slice.call(c)}function removeUndefinedProps(c){return Object.keys(c).reduce(function(u,d){return void 0!==c[d]&&(u[d]=c[d]),u},{})}function isElement(c){return["Element","Fragment"].some(function(u){return isType(c,u)})}function isMouseEvent(c){return isType(c,"MouseEvent")}function getArrayOfElements(c){return isElement(c)?[c]:isType(c,"NodeList")?arrayFrom(c):Array.isArray(c)?c:arrayFrom(document.querySelectorAll(c))}function setTransitionDuration(c,u){c.forEach(function(c){c&&(c.style.transitionDuration=u+"ms")})}function setVisibilityState(c,u){c.forEach(function(c){c&&c.setAttribute("data-state",u)})}function getOwnerDocument(c){var u,d=normalizeToArray(c)[0];return null!=d&&null!=(u=d.ownerDocument)&&u.body?d.ownerDocument:document}function updateTransitionEndListener(c,u,d){var p=u+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(u){c[p](u,d)})}function actualContains(c,u){for(var d,p=u;p;){if(c.contains(p))return!0;p=null==p.getRootNode||null==(d=p.getRootNode())?void 0:d.host}return!1}var E={isTouch:!1},D=0;function onDocumentTouchStart(){E.isTouch||(E.isTouch=!0,window.performance&&document.addEventListener("mousemove",onDocumentMouseMove))}function onDocumentMouseMove(){var c=performance.now();c-D<20&&(E.isTouch=!1,document.removeEventListener("mousemove",onDocumentMouseMove)),D=c}function onWindowBlur(){var c=document.activeElement;if(c&&c._tippy&&c._tippy.reference===c){var u=c._tippy;c.blur&&!u.state.isVisible&&c.blur()}}var A="u">typeof window&&"u">typeof document&&!!window.msCrypto,R=Object.assign({appendTo:TIPPY_DEFAULT_APPEND_TO,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),k=Object.keys(R);function getExtendedPassedProps(c){var u=(c.plugins||[]).reduce(function(u,d){var p,h=d.name,f=d.defaultValue;return h&&(u[h]=void 0!==c[h]?c[h]:null!=(p=R[h])?p:f),u},{});return Object.assign({},c,u)}function evaluateProps(c,u){var d,p=Object.assign({},u,{content:invokeWithArgsOrReturn(u.content,[c])},u.ignoreAttributes?{}:((d=u.plugins)?Object.keys(getExtendedPassedProps(Object.assign({},R,{plugins:d}))):k).reduce(function(u,d){var p=(c.getAttribute("data-tippy-"+d)||"").trim();if(!p)return u;if("content"===d)u[d]=p;else try{u[d]=JSON.parse(p)}catch{u[d]=p}return u},{}));return p.aria=Object.assign({},R.aria,p.aria),p.aria={expanded:"auto"===p.aria.expanded?u.interactive:p.aria.expanded,content:"auto"===p.aria.content?u.interactive?null:"describedby":p.aria.content},p}function getChildren(c){var u=c.firstElementChild,d=arrayFrom(u.children);return{box:u,content:d.find(function(c){return c.classList.contains("tippy-content")}),arrow:d.find(function(c){return c.classList.contains("tippy-arrow")||c.classList.contains("tippy-svg-arrow")}),backdrop:d.find(function(c){return c.classList.contains("tippy-backdrop")})}}var j=1,L=[],B=[];function createTippy(c,u){var d,p,h,f,m,g,v,y,b=evaluateProps(c,Object.assign({},R,getExtendedPassedProps(removeUndefinedProps(u)))),S=!1,_=!1,T=!1,w=!1,P=[],I=debounce(el,b.interactiveDebounce),k=j++,x=(y=b.plugins).filter(function(c,u){return y.indexOf(c)===u}),O={id:k,reference:c,popper:document.createElement("div"),popperInstance:null,props:b,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:x,clearDelayTimeouts:function(){clearTimeout(d),clearTimeout(p),cancelAnimationFrame(h)},setProps:function(u){if(!O.state.isDestroyed){Y("onBeforeUpdate",[O,u]),ea();var d=O.props,p=evaluateProps(c,Object.assign({},d,removeUndefinedProps(u),{ignoreAttributes:!0}));O.props=p,eo(),d.interactiveDebounce!==p.interactiveDebounce&&(Z(),I=debounce(el,p.interactiveDebounce)),d.triggerTarget&&!p.triggerTarget?normalizeToArray(d.triggerTarget).forEach(function(c){c.removeAttribute("aria-expanded")}):p.triggerTarget&&c.removeAttribute("aria-expanded"),Q(),K(),U&&U(d,p),O.popperInstance&&(ep(),ef().forEac
10h(function(c){requestAnimationFrame(c._tippy.popperInstance.forceUpdate)})),Y("onAfterUpdate",[O,u])}},setContent:function(c){O.setProps({content:c})},show:function(){var u=O.state.isVisible,d=O.state.isDestroyed,p=!O.state.isEnabled,h=E.isTouch&&!O.props.touch,f=getValueAtIndexOrReturn(O.props.duration,0,R.duration);if(!(u||d||p||h)&&!(v||c).hasAttribute("disabled")&&(Y("onShow",[O],!1),!1!==O.props.onShow(O))){if(O.state.isVisible=!0,q()&&(N.style.visibility="visible"),K(),et(),O.state.isMounted||(N.style.transition="none"),q()){var m,y,b,S=getChildren(N);setTransitionDuration([S.box,S.content],0)}g=function(){var c;if(O.state.isVisible&&!w){if(w=!0,N.style.transition=O.props.moveTransition,q()&&O.props.animation){var u=getChildren(N),d=u.box,p=u.content;setTransitionDuration([d,p],f),setVisibilityState([d,p],"visible")}X(),Q(),pushIfUnique(B,O),null==(c=O.popperInstance)||c.forceUpdate(),Y("onMount",[O]),O.props.animation&&q()&&en(f,function(){O.state.isShown=!0,Y("onShown",[O])})}},y=O.props.appendTo,b=v||c,(m=O.props.interactive&&y===TIPPY_DEFAULT_APPEND_TO||"parent"===y?b.parentNode:invokeWithArgsOrReturn(y,[b])).contains(N)||m.appendChild(N),O.state.isMounted=!0,ep()}},hide:function(){var c=!O.state.isVisible,u=O.state.isDestroyed,d=!O.state.isEnabled,p=getValueAtIndexOrReturn(O.props.duration,1,R.duration);if(!(c||u||d)&&(Y("onHide",[O],!1),!1!==O.props.onHide(O))){if(O.state.isVisible=!1,O.state.isShown=!1,w=!1,S=!1,q()&&(N.style.visibility="hidden"),Z(),ei(),K(!0),q()){var h,f=getChildren(N),m=f.box,g=f.content;O.props.animation&&(setTransitionDuration([m,g],p),setVisibilityState([m,g],"hidden"))}X(),Q(),O.props.animation?q()&&(h=O.unmount,en(p,function(){!O.state.isVisible&&N.parentNode&&N.parentNode.contains(N)&&h()})):O.unmount()}},hideWithInteractivity:function(c){W().addEventListener("mousemove",I),pushIfUnique(L,I),I(c)},enable:function(){O.state.isEnabled=!0},disable:function(){O.hide(),O.state.isEnabled=!1},unmount:function(){O.state.isVisible&&O.hide(),O.state.isMounted&&(eh(),ef().forEach(function(c){c._tippy.unmount()}),N.parentNode&&N.parentNode.removeChild(N),B=B.filter(function(c){return c!==O}),O.state.isMounted=!1,Y("onHidden",[O]))},destroy:function(){O.state.isDestroyed||(O.clearDelayTimeouts(),O.unmount(),ea(),delete c._tippy,O.state.isDestroyed=!0,Y("onDestroy",[O]))}};if(!b.render)return O;var D=b.render(O),N=D.popper,U=D.onUpdate;N.setAttribute("data-tippy-root",""),N.id="tippy-"+O.id,O.popper=N,c._tippy=O,N._tippy=O;var F=x.map(function(c){return c.fn(O)}),H=c.hasAttribute("aria-expanded");return eo(),Q(),K(),Y("onCreate",[O]),b.showOnCreate&&em(),N.addEventListener("mouseenter",function(){O.props.interactive&&O.state.isVisible&&O.clearDelayTimeouts()}),N.addEventListener("mouseleave",function(){O.props.interactive&&O.props.trigger.indexOf("mouseenter")>=0&&W().addEventListener("mousemove",I)}),O;function V(){var c=O.props.touch;return Array.isArray(c)?c:[c,0]}function z(){return"hold"===V()[0]}function q(){var c;return!(null==(c=O.props.render)||!c.$$tippy)}function W(){var u=(v||c).parentNode;return u?getOwnerDocument(u):document}function G(c){return O.state.isMounted&&!O.state.isVisible||E.isTouch||f&&"focus"===f.type?0:getValueAtIndexOrReturn(O.props.delay,+!c,R.delay)}function K(c){void 0===c&&(c=!1),N.style.pointerEvents=O.props.interactive&&!c?"":"none",N.style.zIndex=""+O.props.zIndex}function Y(c,u,d){var p;void 0===d&&(d=!0),F.forEach(function(d){d[c]&&d[c].apply(d,u)}),d&&(p=O.props)[c].apply(p,u)}function X(){var u=O.props.aria;if(u.content){var d="aria-"+u.content,p=N.id;normalizeToArray(O.props.triggerTarget||c).forEach(function(c){var u=c.getAttribute(d);if(O.state.isVisible)c.setAttribute(d,u?u+" "+p:p);else{var h=u&&u.replace(p,"").trim();h?c.setAttribute(d,h):c.removeAttribute(d)}})}}function Q(){!H&&O.props.aria.expanded&&normalizeToArray(O.props.triggerTarget||c).forEach(function(u){O.props.interactive?u.setAttribute("aria-expanded",O.state.isVisible&&u===(v||c)?"true":"false"):u.removeAttribute("aria-expanded")})}function Z(){W().removeEventListener("mousemove",I),L=L.filter(function(c){return c!==I})}function J(u){if(!E.isTouch||!T&&"mousedown"!==u.type){var d=u.composedPath&&u.composedPath()[0]||u.target;
10if(!O.props.interactive||!actualContains(N,d)){if(normalizeToArray(O.props.triggerTarget||c).some(function(c){return actualContains(c,d)})){if(E.isTouch||O.state.isVisible&&O.props.trigger.indexOf("click")>=0)return}else Y("onClickOutside",[O,u]);!0===O.props.hideOnClick&&(O.clearDelayTimeouts(),O.hide(),_=!0,setTimeout(function(){_=!1}),O.state.isMounted||ei())}}}function $(){T=!0}function ee(){T=!1}function et(){var c=W();c.addEventListener("mousedown",J,!0),c.addEventListener("touchend",J,M),c.addEventListener("touchstart",ee,M),c.addEventListener("touchmove",$,M)}function ei(){var c=W();c.removeEventListener("mousedown",J,!0),c.removeEventListener("touchend",J,M),c.removeEventListener("touchstart",ee,M),c.removeEventListener("touchmove",$,M)}function en(c,u){var d=getChildren(N).box;function p(c){c.target===d&&(updateTransitionEndListener(d,"remove",p),u())}if(0===c)return u();updateTransitionEndListener(d,"remove",m),updateTransitionEndListener(d,"add",p),m=p}function er(u,d,p){void 0===p&&(p=!1),normalizeToArray(O.props.triggerTarget||c).forEach(function(c){c.addEventListener(u,d,p),P.push({node:c,eventType:u,handler:d,options:p})})}function eo(){z()&&(er("touchstart",es,{passive:!0}),er("touchend",ec,{passive:!0})),O.props.trigger.split(/\s+/).filter(Boolean).forEach(function(c){if("manual"!==c)switch(er(c,es),c){case"mouseenter":er("mouseleave",ec);break;case"focus":er(A?"focusout":"blur",eu);break;case"focusin":er("focusout",eu)}})}function ea(){P.forEach(function(c){var u=c.node,d=c.eventType,p=c.handler,h=c.options;u.removeEventListener(d,p,h)}),P=[]}function es(c){var u,d=!1;if(O.state.isEnabled&&!ed(c)&&!_){var p=(null==(u=f)?void 0:u.type)==="focus";f=c,v=c.currentTarget,Q(),!O.state.isVisible&&isMouseEvent(c)&&L.forEach(function(u){return u(c)}),"click"===c.type&&(0>O.props.trigger.indexOf("mouseenter")||S)&&!1!==O.props.hideOnClick&&O.state.isVisible?d=!0:em(c),"click"===c.type&&(S=!d),d&&!p&&eg(c)}}function el(u){var d,p,h,f=u.target,m=(v||c).contains(f)||N.contains(f);("mousemove"!==u.type||!m)&&(d=ef().concat(N).map(function(c){var u,d=null==(u=c._tippy.popperInstance)?void 0:u.state;return d?{popperRect:c.getBoundingClientRect(),popperState:d,props:b}:null}).filter(Boolean),p=u.clientX,h=u.clientY,d.every(function(c){var u=c.popperRect,d=c.popperState,f=c.props.interactiveBorder,m=d.placement.split("-")[0],g=d.modifiersData.offset;if(!g)return!0;var v="bottom"===m?g.top.y:0,y="top"===m?g.bottom.y:0,b="right"===m?g.left.x:0,S="left"===m?g.right.x:0,_=u.top-h+v>f,T=h-u.bottom-y>f,w=u.left-p+b>f,P=p-u.right-S>f;return _||T||w||P})&&(Z(),eg(u)))}function ec(c){ed(c)||O.props.trigger.indexOf("click")>=0&&S||(O.props.interactive?O.hideWithInteractivity(c):eg(c))}function eu(u){0>O.props.trigger.indexOf("focusin")&&u.target!==(v||c)||O.props.interactive&&u.relatedTarget&&N.contains(u.relatedTarget)||eg(u)}function ed(c){return!!E.isTouch&&z()!==c.type.indexOf("touch")>=0}function ep(){eh();var u=O.props,d=u.popperOptions,p=u.placement,h=u.offset,f=u.getReferenceClientRect,m=u.moveTransition,y=q()?getChildren(N).arrow:null,b=f?{getBoundingClientRect:f,contextElement:f.contextElement||v||c}:c,S=[{name:"offset",options:{offset:h}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!m}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(c){var u=c.state;if(q()){var d=getChildren(N).box;["placement","reference-hidden","escaped"].forEach(function(c){"placement"===c?d.setAttribute("data-placement",u.placement):u.attributes.popper["data-popper-"+c]?d.setAttribute("data-"+c,""):d.removeAttribute("data-"+c)}),u.attributes.popper={}}}}];q()&&y&&S.push({name:"arrow",options:{element:y,padding:3}}),S.push.apply(S,(null==d?void 0:d.modifiers)||[]),O.popperInstance=C(b,N,Object.assign({},d,{placement:p,onFirstUpdate:g,modifiers:S}))}function eh(){O.popperInstance&&(O.popperInstance.destroy(),O.popperInstance=null)}function ef(){return arrayFrom(N.querySelectorAll("[data-tippy-root]"))}function em(c){O.clearDelayTimeouts(),c&&Y("onTrigger",[O,c]),et();var u=G(!0),p=V(),h=p[0],f=p[1];E.isTouch&&"hold"===h&&f&&(u=f),u?d=setTimeout(function(){O.show()}
10,u):O.show()}function eg(c){if(O.clearDelayTimeouts(),Y("onUntrigger",[O,c]),O.state.isVisible){if(!(O.props.trigger.indexOf("mouseenter")>=0&&O.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(c.type)>=0&&S)){var u=G(!1);u?p=setTimeout(function(){O.state.isVisible&&O.hide()},u):h=requestAnimationFrame(function(){O.hide()})}}else ei()}}function tippy(c,u){void 0===u&&(u={});var d=R.plugins.concat(u.plugins||[]);document.addEventListener("touchstart",onDocumentTouchStart,M),window.addEventListener("blur",onWindowBlur);var p=Object.assign({},u,{plugins:d}),h=getArrayOfElements(c).reduce(function(c,u){var d=u&&createTippy(u,p);return d&&c.push(d),c},[]);return isElement(c)?h[0]:h}tippy.defaultProps=R,tippy.setDefaultProps=function(c){Object.keys(c).forEach(function(u){R[u]=c[u]})},tippy.currentInput=E,Object.assign({},p$4,{effect:function(c){var u=c.state,d={popper:{position:u.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(u.elements.popper.style,d.popper),u.styles=d,u.elements.arrow&&Object.assign(u.elements.arrow.style,d.arrow)}});var H={clientX:0,clientY:0},I=[];function storeMouseCoords(c){H={clientX:c.clientX,clientY:c.clientY}}var F={name:"followCursor",defaultValue:!1,fn:function(c){var u=c.reference,d=getOwnerDocument(c.props.triggerTarget||u),p=!1,h=!1,f=!0,m=c.props;function g(){return"initial"===c.props.followCursor&&c.state.isVisible}function v(){d.addEventListener("mousemove",S)}function y(){d.removeEventListener("mousemove",S)}function b(){p=!0,c.setProps({getReferenceClientRect:null}),p=!1}function S(d){var p=!d.target||u.contains(d.target),h=c.props.followCursor,f=d.clientX,m=d.clientY,g=u.getBoundingClientRect(),v=f-g.left,y=m-g.top;!p&&c.props.interactive||c.setProps({getReferenceClientRect:function(){var c=u.getBoundingClientRect(),d=f,p=m;"initial"===h&&(d=c.left+v,p=c.top+y);var g="horizontal"===h?c.top:p,b="vertical"===h?c.right:d,S="horizontal"===h?c.bottom:p,_="vertical"===h?c.left:d;
10return{width:b-_,height:S-g,top:g,right:b,bottom:S,left:_}}})}function _(){c.props.followCursor&&(I.push({instance:c,doc:d}),d.addEventListener("mousemove",storeMouseCoords))}function E(){0===(I=I.filter(function(u){return u.instance!==c})).filter(function(c){return c.doc===d}).length&&d.removeEventListener("mousemove",storeMouseCoords)}return{onCreate:_,onDestroy:E,onBeforeUpdate:function(){m=c.props},onAfterUpdate:function(u,d){var f=d.followCursor;p||void 0!==f&&m.followCursor!==f&&(E(),f?(_(),!c.state.isMounted||h||g()||v()):(y(),b()))},onMount:function(){c.props.followCursor&&!h&&(f&&(S(H),f=!1),g()||v())},onTrigger:function(c,u){isMouseEvent(u)&&(H={clientX:u.clientX,clientY:u.clientY}),h="focus"===u.type},onHidden:function(){c.props.followCursor&&(b(),y(),f=!0)}}}},N={name:"sticky",defaultValue:!1,fn:function(c){var u=c.reference,d=c.popper;function p(u){return!0===c.props.sticky||c.props.sticky===u}var h=null,f=null;return{onMount:function(){c.props.sticky&&function m(){var g=p("reference")?(c.popperInstance?c.popperInstance.state.elements.reference:u).getBoundingClientRect():null,v=p("popper")?d.getBoundingClientRect():null;(g&&areRectsDifferent(h,g)||v&&areRectsDifferent(f,v))&&c.popperInstance&&c.popperInstance.update(),h=g,f=v,c.state.isMounted&&requestAnimationFrame(m)}()}}}};function areRectsDifferent(c,u){return!c||!u||c.top!==u.top||c.right!==u.right||c.bottom!==u.bottom||c.left!==u.left}tippy.setDefaultProps({animation:!1});let n$1=new WeakMap;function closestElement(c,u){let d=u.closest(c);if(d)return d;let p=u.getRootNode();return p!==e$1.document&&p instanceof ShadowRoot?closestElement(c,p.host):null}function consumeMode(c,u){var d;let p=closestElement(transformTag("cosmos-mode"),c.element);p&&(u(null!=(d=p.getAttribute("mode"))?d:"light"),n$1.has(p)?n$1.get(p).push(u):(null==t$1||t$1.observe(p,{attributes:!0}),n$1.set(p,[u])))}function resolveAppearance({instance:c,modeToAppearanceMap:u,callback:d}){c.appearance?d(c.appearance):consumeMode(c,p=>{c.appearance||d(u[p])})}"u">typeof MutationObserver&&(t$1=new MutationObserver(c=>{c.forEach(function(c){var u;"attributes"===c.type&&(null==(u=n$1.get(c.target))||u.forEach(u=>{var d;return u(null!=(d=c.target.getAttribute("mode"))?d:"light")}))})}));let stringBooleanToBoolean=c=>"boolean"==typeof c?c:!("string"!=typeof c||!["","true","false"].includes(c))&&"false"!==c;function getNumericClampValue(c){return/^-?\d+$/.test(c)?Number(c):("string"==typeof c||"boolean"==typeof c)&&stringBooleanToBoolean(c)?1:void 0}function isSingleLineClamp(c){return"number"==typeof c&&1===c}function isMultiLineClamp(c){return"number"==typeof c&&c>1}let isSafari=()=>{if(void 0!==d$1)return d$1;let c=navigator.userAgent;return d$1=c.includes("Safari")&&!c.includes("Chrome")&&!c.includes("Chromium")},f$2=bem("cosmos-text"),z$1=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow(),this.kind="normal",this.size="medium",this.spacing="none",this.tag="p",this.weight="regular",this.computedAppearance="dark",this.safariPadding=!1}handleAppearanceChange(c){this.computedAppearance=c}setNumericClampValue(){this.numericClampValue=getNumericClampValue(this.clamp)}getSize(){return this.size&&isResponsiveProperty(this.size)?parseResponsiveProperty(this.size):this.size}componentWillLoad(){resolveAppearance({instance:this,modeToAppearanceMap:{dark:"light",light:"dark"},callback:this.handleAppearanceChange.bind(this)}),this.setNumericClampValue()}componentDidLoad(){isSafari()&&(this.safariPadding=!0)}render(){var c;return h$2(T$2,{key:"d56a5b72ba4513ca2ac993e4d64560a046d4be98"},h$2(null!=(c=this.tag)?c:"p",{key:"20b131c284cfa5896664cb4399bdf49d1db8de96",class:f$2({spacing:this.spacing,kind:this.kind,weight:this.weight,appearance:this.computedAppearance,size:this.getSize(),"single-line-clamp":isSingleLineClamp(this.numericClampValue),"multi-line-clamp":isMultiLineClamp(this.numericClampValue),"safari-padding":this.safariPadding}),part:"base",style:isMultiLineClamp(this.numericClampValue)?{"--cosmos-text-clamp-length":`${this.numericClampValue}`}:{}},h$2("slot",{key:"7b6ea7bb928c4ec517dfeb4f0bfbeb2a3d3fc5e2"})))}
10get element(){return this}static get watchers(){return{appearance:[{handleAppearanceChange:0}],clamp:[{setNumericClampValue:0}]}}static get style(){return"@charset \"UTF-8\";:host{display:block}:host([clamp]){min-width:0;overflow:clip}:host([clamp]:focus-within){overflow:visible}:host{--cosmos-text-font-family-default:var(--cosmos-font-family-text, Bull Text, Helvetica, sans-serif)}@supports (font-variation-settings: normal){:host{--cosmos-text-font-family-default:var(--cosmos-font-family-text-variable, Bull VF, Helvetica, sans-serif)}}:host(:lang(ja)){--cosmos-text-font-family-default:var(--cosmos-font-family-japanese-text, Noto Sans JP, Helvetica, sans-serif)}:host(:lang(ar)){--cosmos-text-font-family-default:var(--cosmos-font-family-arabic-text, Noto Kufi Arabic, Helvetica, sans-serif)}:host(:lang(ko)){--cosmos-text-font-family-default:var(--cosmos-font-family-korean-text, Noto Sans KR, Helvetica, sans-serif)}:host(:lang(hi)){--cosmos-text-font-family-default:var(--cosmos-font-family-hindi-text, Noto Sans, Helvetica, sans-serif)}:host(:lang(he)){--cosmos-text-font-family-default:var(--cosmos-font-family-hebrew-text, Noto Sans Hebrew, Helvetica, sans-serif)}:host(:lang(ka)){--cosmos-text-font-family-default:var(--cosmos-font-family-georgian-text, Noto Sans Georgian, Helvetica, sans-serif)}:host(:lang(th)){--cosmos-text-font-family-default:var(--cosmos-font-family-thai-text, Noto Sans Thai, Helvetica, sans-serif)}:host(:lang(zh)){--cosmos-text-font-family-default:var(     --cosmos-font-family-chinese-simplified-text,     Microsoft YaHei, ヒラギノ角ゴ Pro W3, Hiragino Kaku Gothic Pro, Hiragino Kaku Gothic ProN W3, Osaka, メイリオ, Meiryo, MS Pゴシック, MS PGothic, Arial Unicode MS, Tahoma, Helvetica, sans-serif   )}:host(:lang(zh-Hant)){--cosmos-text-font-family-default:var(     --cosmos-font-family-chinese-traditional-text,     Microsoft JhengHei, Geneva CY, ヒラギノ角ゴ Pro W3, Hiragino Kaku Gothic Pro, Hiragino Kaku Gothic ProN W3, Osaka, メイリオ, Meiryo, MS Pゴシック, MS PGothic, Arial Unicode MS, Tahoma, Helvetica, sans-serif   )}@supports (font-variation-settings: normal){::slotted(strong),::slotted(b){font-variation-settings:\"opsz\" 12, \"wght\" 700}}.cosmos-text{--cosmos-font-weight-default-text-variable-regular:'opsz' 12, 'wght' 400;--cosmos-font-weight-default-text-variable-medium:'opsz' 12, 'wght' 500;--cosmos-font-weight-default-text-variable-bold:'opsz' 12, 'wght' 700;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--cosmos-text-color, #000F1E);font-family:var(--cosmos-text-font-family, var(--cosmos-text-font-family-default, var(--cosmos-font-family-text)));font-style:var(--cosmos-text-font-style, inherit);font-variant-numeric:tabular-nums;font-variation-settings:var(--cosmos-font-weight-default-text-variable-regular);font-variation-settings:var(--cosmos-text-font-variation-settings, var(--cosmos-font-weight-default-text-variable-regular));font-weight:var(--cosmos-text-font-weight, 400);letter-spacing:var(--cosmos-text-letter-spacing, inherit);line-height:var(--cosmos-text-line-height, 1.5);margin:0;text-transform:var(--cosmos-text-text-transform, var(--cosmos-text-transform, inherit))}.cosmos-text--single-line-clamp{margin-inline:-4px;overflow:hidden;padding-inline:4px;text-overflow:ellipsis;white-space:nowrap}
10.cosmos-text--multi-line-clamp{-webkit-box-orient:vertical;display:-webkit-box;-webkit-line-clamp:var(--cosmos-text-clamp-length);margin-inline:-4px;overflow:hidden;padding-inline:4px;}.cosmos-text--size-xx-small{line-height:var(--cosmos-text-line-height, 1.25);margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-text--size-xx-small{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-text--size-xx-small{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16))))}}.cosmos-text--size-x-small{line-height:var(--cosmos-text-line-height, 1.357143);margin-bottom:0.428571em;padding-top:0.714286em;font-size:var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-text--size-x-small{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-text--size-x-small{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16))))}}.cosmos-text--size-small{line-height:var(--cosmos-text-line-height, 1.411765);margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-text--size-small{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-text--size-small{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}.cosmos-text--size-medium{line-height:var(--cosmos-text-line-height, 1.5);margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-text--size-medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-text--size-medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}.cosmos-text--size-large{line-height:var(--cosmos-text-line-height, 1.333333);margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-text--size-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-text--size-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}.cosmos-text--size-x-large{line-height:var(--cosmos-text-line-height, 1.137931);margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-text--size-x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-text--size-x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-text--size-xx-small\\@small{line-height:var(--cosmos-text-line-height, 1.25);margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-text--size-xx-small\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-text--size-xx-small\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-text--size-x-small\\@small{line-height:var(--cosmos-text-line-height, 1.357143);margin-bottom:0.428571em;padding-top:0.714286em;font-size:var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-text--size-x-small\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-text--size-x-small\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-text--size-small\\@small{line-height:var(--cosmos-text-line-height, 1.411765);margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-text--size-small\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-text--size-small\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-text--size-medium\\@small{line-height:var(--cosmos-text-line-height, 1.5);margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-text--size-medium\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-text--size-medium\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-text--size-large\\@small{line-height:var(--cosmos-text-line-height, 1.333333);margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-text--size-large\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-text--size-large\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-text--size-x-large\\@small{line-height:var(--cosmos-text-line-height, 1.137931);margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-text--size-x-large\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-text--size-x-large\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-text--size-xx-small\\@medium{line-height:var(--cosmos-text-line-height, 1.25);margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-text--size-xx-small\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-text--size-xx-small\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-text--size-x-small\\@medium{line-height:var(--cosmos-text-line-height, 1.357143);margin-bottom:0.428571em;padding-top:0.714286em;font-size:var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-text--size-x-small\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-text--size-x-small\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-text--size-small\\@medium{line-height:var(--cosmos-text-line-height, 1.411765);margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-text--size-small\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-text--size-small\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-text--size-medium\\@medium{line-height:var(--cosmos-text-line-height, 1.5);margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-text--size-medium\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-text--size-medium\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-text--size-large\\@medium{line-height:var(--cosmos-text-line-height, 1.333333);margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-text--size-large\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-text--size-large\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-text--size-x-large\\@medium{line-height:var(--cosmos-text-line-height, 1.137931);margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-text--size-x-large\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-text--size-x-large\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-text--size-xx-small\\@large{line-height:var(--cosmos-text-line-height, 1.25);margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-text--size-xx-small\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-text--size-xx-small\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-text--size-x-small\\@large{line-height:var(--cosmos-text-line-height, 1.357143);margin-bottom:0.428571em;padding-top:0.714286em;font-size:var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-text--size-x-small\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-text--size-x-small\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-text--size-small\\@large{line-height:var(--cosmos-text-line-height, 1.411765);margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-text--size-small\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-text--size-small\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-text--size-medium\\@large{line-height:var(--cosmos-text-line-height, 1.5);margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-text--size-medium\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-text--size-medium\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-text--size-large\\@large{line-height:var(--cosmos-text-line-height, 1.333333);margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-text--size-large\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-text--size-large\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-text--size-x-large\\@large{line-height:var(--cosmos-text-line-height, 1.137931);margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-text--size-x-large\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-text--size-x-large\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-text--size-xx-small\\@x-large{line-height:var(--cosmos-text-line-height, 1.25);margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-text--size-xx-small\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-text--size-xx-small\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-text--size-x-small\\@x-large{line-height:var(--cosmos-text-line-height, 1.357143);margin-bottom:0.428571em;padding-top:0.714286em;font-size:var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-
10size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-text--size-x-small\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-text--size-x-small\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-text--size-small\\@x-large{line-height:var(--cosmos-text-line-height, 1.411765);margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-text--size-small\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-text--size-small\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-text--size-medium\\@x-large{line-height:var(--cosmos-text-line-height, 1.5);margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-text--size-medium\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-text--size-medium\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-text--size-large\\@x-large{line-height:var(--cosmos-text-line-height, 1.333333);margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-text--size-large\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-text--size-large\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-text--size-x-large\\@x-large{line-height:var(--cosmos-text-line-height, 1.137931);margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-text--size-x-large\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-text--size-x-large\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-text--size-xx-small\\@xx-large{line-height:var(--cosmos-text-line-height, 1.25);margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-text--size-xx-small\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-text--size-xx-small\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-text--size-x-small\\@xx-large{line-height:var(--cosmos-text-line-height, 1.357143);margin-bottom:0.428571em;padding-top:0.714286em;font-size:var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-text--size-x-small\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-text--size-x-small\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-text--size-small\\@xx-large{line-height:var(--cosmos-text-line-height, 1.411765);margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-text--size-small\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-text--size-small\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-text--size-medium\\@xx-large{line-height:var(--cosmos-text-line-height, 1.5);margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-text--size-medium\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-text--size-medium\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-text--size-large\\@xx-large{line-height:var(--cosmos-text-line-height, 1.333333);margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-text--size-large\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-text--size-large\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-text--size-x-large\\@xx-large{line-height:var(--cosmos-text-line-height, 1.137931);margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-text--size-x-large\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-text--size-x-large\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}.cosmos-text--spacing-none{margin-bottom:0;padding-top:0}.cosmos-text--spacing-long-form-bottom{padding-top:0}.cosmos-text--spacing-long-form-top{margin-bottom:0}.cosmos-text--weight-medium{font-variation-settings:var(--cosmos-text-font-variation-settings, var(--cosmos-font-weight-default-text-variable-medium));
10font-weight:var(--cosmos-text-font-weight, 500)}.cosmos-text--weight-bold{font-variation-settings:var(--cosmos-text-font-variation-settings, var(--cosmos-font-weight-default-text-variable-bold));font-weight:var(--cosmos-text-font-weight, 700)}.cosmos-text--kind-normal.cosmos-text--appearance-light{color:var(--cosmos-text-color, #FFFFFF)}.cosmos-text--kind-subtle{color:var(--cosmos-text-color, rgba(0, 15, 30, 0.6))}.cosmos-text--kind-subtle.cosmos-text--appearance-light{color:var(--cosmos-text-color, rgba(255, 255, 255, 0.6))}@supports (-webkit-hyphens: none){.cosmos-text--safari-padding{-webkit-padding-end:2px;padding-inline-end:2px}}"}},[257,"cosmos-text",{appearance:[513],clamp:[520],kind:[513],size:[513],spacing:[513],tag:[513],weight:[513],computedAppearance:[32],safariPadding:[32]},void 0,{appearance:[{handleAppearanceChange:0}],clamp:[{setNumericClampValue:0}]}]);function defineCustomElement$V(){typeof customElements>"u"||["cosmos-text"].forEach(c=>{"cosmos-text"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),z$1))})}let c$8="success",g$1="error",n="loading",d=proxyCustomElement(class extends b$3{handleAppearanceChange(c){this.computedAppearance=c}handleImageChange(c,u){c!==u&&(this.imageState=n)}handleObserveResizeChange(c){this.containerResizeObserver&&(this.containerResizeObserver.unobserve(this.container),c&&this.containerResizeObserver.observe(this.container))}
10handleContainerResize(c){c.forEach(c=>{if(c.target===this.container){let{height:u,width:d}=c.contentRect;this.imageResize.emit({height:u,width:d})}})}preloadImage(){if("u">typeof Image){let c=new Image;c.src=this.image,c.complete?this.imageState=c$8:this.imageState=n}}constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow(),this.imageResize=createEvent(this,"imageresize",5),this.fit="cover",this.imageAlt="",this.radius="none",this.computedAppearance="light",this.generateClassNames=bem("cosmos-image"),this.handleImageLoad=()=>{this.imageState=c$8},this.handleImageError=()=>{this.imageState=g$1},this.handlePreviewError=()=>{this.previewState=g$1},isNodeEnvironment()||(this.containerResizeObserver=new ResizeObserver(c=>this.handleContainerResize(c)))}componentWillLoad(){resolveAppearance({instance:this,modeToAppearanceMap:{dark:"dark",light:"light"},callback:this.handleAppearanceChange.bind(this)}),!this.srcset&&this.image?this.preloadImage():this.image&&(this.imageState=n)}componentDidLoad(){this.observeResize&&this.handleObserveResizeChange(this.observeResize)}render(){let c=!!this.image&&this.imageState!==g$1,u=!!this.imagePreview&&this.previewState!==g$1,d=!c&&!u;return h$2("div",{key:"0595cc1e1f4aca4ed40be9f9b822f19688fb5343",class:this.generateClassNames({appearance:this.computedAppearance,fallback:d,fit:this.fit,"has-image":!!this.image,"has-preview":!!this.imagePreview,"image-state":this.imageState,radius:this.radius}),part:"base",ref:c=>this.container=c},!d&&h$2("div",{key:"cacf0eb186f9c1d2e54cd50d68c1f309a6b39a92",class:this.generateClassNames("container")},u&&h$2("div",{key:"14d0d4c3eb77d3ab37489d166367e0d7e5b4d463",class:this.generateClassNames("preview-container")},h$2("img",{key:"391efd7920aa3c58b90509436b30b3a8e3d769a3",alt:"",class:this.generateClassNames("preview-image"),onError:this.handlePreviewError,src:this.imagePreview}),h$2("img",{key:"ee483267fe3330bcd5ba0f12f170c0ba8ba0cc19",alt:"",class:this.generateClassNames("preview-dummy"),src:this.imagePreview})),c&&h$2("img",{key:"e6d4b500718cdc0bcc3623d55bc1194b47e9dd51",alt:this.imageAlt,class:this.generateClassNames("image"),loading:this.loading,onError:this.handleImageError,onLoad:this.handleImageLoad,part:"image",sizes:this.sizes,src:this.image,srcSet:this.srcset})))}get element(){return this}static get watchers(){return{appearance:[{handleAppearanceChange:0}],image:[{handleImageChange:0}],observeResize:[{handleObserveResizeChange:0}]}}static get style(){return':host{display:block;height:100%}.cosmos-image{display:-ms-flexbox;display:flex;height:100%;isolation:isolate;min-height:inherit;overflow:hidden}.cosmos-image--radius-none{border-radius:var(--cosmos-image-border-radius, 0)}.cosmos-image--radius-small{border-radius:var(--cosmos-image-border-radius, 2px)}.cosmos-image--radius-medium{border-radius:var(--cosmos-image-border-radius, 6px)}.cosmos-image--radius-large{border-radius:var(--cosmos-image-border-radius, 8px)}.cosmos-image--radius-full{border-radius:var(--cosmos-image-border-radius, 9999px)}.cosmos-image--fallback.cosmos-image--appearance-light{background-color:rgba(0, 15, 30, 0.05)}.cosmos-image--fallback.cosmos-image--appearance-dark{background-color:rgba(255, 255, 255, 0.1)}.cosmos-image--image-state-loading,.cosmos-image--fit-contain{background-color:transparent}.cosmos-image__container{display:grid;grid-template-areas:"image";height:100%;width:100%}.cosmos-image--has-preview:not(.cosmos-image--has-image) .cosmos-image__container{display:-ms-flexbox;display:flex}.cosmos-image--fit-contain .cosmos-image__container{place-content:center}.cosmos-image__preview-container,.cosmos-image__image{grid-area:image;max-height:100%;min-height:0}.cosmos-image--fit-contain.cosmos-image--radius-none .cosmos-image__preview-container,.cosmos-image--fit-contain.cosmos-image--radius-none .cosmos-image__image{border-radius:var(--cosmos-image-border-radius, 0)}.cosmos-image--fit-contain.cosmos-image--radius-small .cosmos-image__preview-container,.cosmos-image--fit-contain.cosmos-image--radius-small .cosmos-image__image{border-radius:var(--cosmos-image-border-radius, 2px)}.cosmos-image--fit-contain.cosmos-image--radius-medium .cosmos-image__preview-container,.cosmos-image--fit-contain.cosmos-image--radius-medium .cosmos-image__image{border-radius:var(--cosmos-image-border-radius, 6px)}.cosmos-image--fit-contain.cosmos-image--radius-large .cosmos-image__preview-container,.cosmos-image--fit-contain.cosmos-image--radius-large .cosmos-image__image{border-radius:var(--cosmos-image-border-radius, 8px)}.cosmos-image--fit-contain.cosmos-image--radius-full .cosmos-image__preview-container,.cosmos-image--fit-contain.cosmos-image--radius-full .cosmos-image__image{border-radius:var(--cosmos-image-border-radius, 9999px)}.cosmos-image__preview-image,.cosmos-image__image{-o-object-fit:cover;object-fit:cover}.cosmos-image__preview-container{display:-ms-flexbox;display:flex;overflow:hidden;position:relative}.cosmos-image--fit-cover .cosmos-image__preview-container{width:100%}.cosmos-image__preview-image{-webkit-filter:blur(5px);filter:blur(5px);height:calc(100% + 5px * 2);inset:0;position:absolute;-webkit-transform:translate(-5px, -5px);transform:translate(-5px, -5px);width:calc(100% + 5px * 2)}.cosmos-image__preview-dummy{max-width:100%;width:100%}.cosmos-image__image{max-width:100%;-webkit-transition:opacity 0.2s cubic-bezier(0, 0.32, 0.32, 1);transition:opacity 0.2s cubic-bezier(0, 0.32, 0.32, 1);width:100%;z-index:1}.cosmos-image--image-state-loading .cosmos-image__image{opacity:0}
10.cosmos-image--image-state-success .cosmos-image__image{opacity:1}.cosmos-image--fit-cover .cosmos-image__image{height:100%}'}},[1,"cosmos-image",{appearance:[513],fit:[513],image:[513],imageAlt:[513,"image-alt"],imagePreview:[513,"image-preview"],loading:[513],observeResize:[516,"observe-resize"],radius:[513],sizes:[513],srcset:[513],computedAppearance:[32],imageState:[32],previewState:[32]},void 0,{appearance:[{handleAppearanceChange:0}],image:[{handleImageChange:0}],observeResize:[{handleObserveResizeChange:0}]}]);function defineCustomElement$U(){typeof customElements>"u"||["cosmos-image"].forEach(c=>{"cosmos-image"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),d))})}let t=bem("cosmos-badge"),b=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow(),this.kind="primary",this.shape="pill",this.size="medium",this.computedAppearance="dark"}handleAppearanceChange(c){this.computedAppearance=c}componentWillLoad(){resolveAppearance({instance:this,modeToAppearanceMap:{dark:"light",light:"dark"},callback:this.handleAppearanceChange.bind(this)})}render(){let c=this.href?"a":"div";return h$2(T$2,{key:"9d0e6f83e3ecf479a00ac1d6309b846d8d5dada8",role:"a"===c?void 0:"presentation"},h$2(c,{key:"59cb1e247bb1bce8f1aaa464e4718438b37b52bc",href:this.href,hreflang:"a"===c?this.hreflang:void 0,rel:this.rel,target:this.target,part:"base",class:t({appearance:this.computedAppearance,size:this.size,shape:this.shape,kind:this.kind})},h$2("div",{key:"0a5adf67f2759868fe7b2f7d130de00a4f589b4c",part:"prefix",class:t("prefix"),"aria-hidden":"true"},h$2("slot",{key:"26ea40b959375c7e97fe7372b8d09560b2af172a",name:"prefix"})),h$2("cosmos-text",{key:"69981716627a49414d61e765fe0373276a08afff",appearance:this.computedAppearance,class:t("label"),size:"x-small",exportparts:"base: label",tag:"span",weight:"large"===this.size?"medium":"regular"},h$2("span",{key:"a103327fe50f9096ec29318953738b542953858d"},h$2("slot",{key:"c64b0a35a252bb081b0983af934e9c2f537cbe39"})))))}get element(){return this}static get watchers(){return{appearance:[{handleAppearanceChange:0}]}}static get style(){return'@charset "UTF-8";:host{display:inline-block;max-width:100%;min-width:0}.cosmos-badge{--focus-radius:9999px;-ms-flex-align:center;align-items:center;border-color:transparent;border-radius:var(--cosmos-badge-border-radius, var(--focus-radius));border-style:solid;border-width:var(--cosmos-badge-border-width, 1px);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--cosmos-badge-color, inherit);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;max-width:100%;min-width:0;width:auto}.cosmos-badge[href]{position:relative;text-decoration:none}.cosmos-badge[href]:focus,.cosmos-badge[href]:focus:not(:focus-visible){outline:none}.cosmos-badge[href]:focus:not(:focus-visible)::before{content:none}.cosmos-badge[href]:focus::before{border-radius:calc(var(--focus-radius) * 1.5);bottom:calc((4px + var(--cosmos-badge-border-width, 1px)) * -1);-webkit-box-shadow:inset 0 0 0 2px #1B6AEE, 0 0 0 2px #FFFFFF;box-shadow:inset 0 0 0 2px #1B6AEE, 0 0 0 2px #FFFFFF;left:calc((4px + var(--cosmos-badge-border-width, 1px)) * -1);position:absolute;right:calc((4px + var(--cosmos-badge-border-width, 1px)) * -1);top:calc((4px + var(--cosmos-badge-border-width, 1px)) * -1);content:""}.cosmos-badge--appearance-dark{color:var(--cosmos-badge-color, #000F1E)}.cosmos-badge--appearance-dark.cosmos-badge--kind-primary[href]:hover{background:var(--cosmos-badge-background-hover, var(--cosmos-badge-background-color-hover, rgba(0, 15, 30, 0.2)));color:var(--cosmos-badge-color-hover, #000F1E)}.cosmos-badge--appearance-dark.cosmos-badge--kind-secondary[href]:hover{background:var(--cosmos-badge-background-hover, var(--cosmos-badge-background-color-hover, rgba(0, 15, 30, 0.05)));border-color:var(--cosmos-badge-border-color-hover, rgba(0, 15, 30, 0.2));color:var(--cosmos-badge-color-hover, #000F1E)}.cosmos-badge--appearance-light{color:var(--cosmos-badge-color, #FFFFFF)}.cosmos-badge--appearance-light.cosmos-badge--kind-primary{background:var(--cosmos-badge-background, var(--cosmos-badge-background-color, rgba(255, 255, 255, 0.1)))}.cosmos-badge--appearance-light.cosmos-badge--kind-primary[href]:hover{background:var(--cosmos-badge-background-hover, var(--cosmos-badge-background-color-hover, rgba(255, 255, 255, 0.2)));color:var(--cosmos-badge-color-hover, #FFFFFF)}.cosmos-badge--appearance-light.cosmos-badge--kind-secondary{border-color:var(--cosmos-badge-border-color, rgba(255, 255, 255, 0.2))}.cosmos-badge--appearance-light.cosmos-badge--kind-secondary[href]:hover{background:var(--cosmos-badge-background-hover, var(--cosmos-badge-background-color-hover, rgba(255, 255, 255, 0.1)));border-color:var(--cosmos-badge-border-color-hover, rgba(255, 255, 255, 0.2));color:var(--cosmos-badge-color-hover, #FFFFFF)}.cosmos-badge--kind-primary{background:var(--cosmos-badge-background, var(--cosmos-badge-background-color, rgba(0, 15, 30, 0.1)))}.cosmos-badge--kind-secondary{background:var(--cosmos-badge-background, var(--cosmos-badge-background-color, transparent));border-color:var(--cosmos-badge-border-color, rgba(0, 15, 30, 0.2))}.cosmos-badge--kind-cover-up{background:var(--cosmos-badge-background, var(--cosmos-badge-background-color, rgba(0, 15, 30, 0.6)));-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);border-color:var(--cosmos-badge-border-color, rgba(255, 255, 255, 0.2))}.cosmos-badge--kind-cover-up .cosmos-badge__prefix,.cosmos-badge--kind-cover-up .cosmos-badge__label{--cosmos-text-color:var(--cosmos-badge-color, #FFFFFF)}.cosmos-badge--kind-cover-up[href]:hover{background:var(--cosmos-badge-background-hover, var(--cosmos-badge-background-color-hover, rgba(0, 15, 30, 0.6)));border-color:var(--cosmos-badge-border-color-hover, rgba(255, 255, 255, 0.6))}.cosmos-badge--size-small{height:24px;-webkit-padding-end:8px;padding-inline-end:8px;-webkit-padding-start:var(--cosmos-badge-padding-start, 8px);padding-inline-start:var(--cosmos-badge-padding-start, 8px)}.cosmos-badge--size-medium{height:28px;-webkit-padding-end:12px;padding-inline-end:12px;-webkit-padding-start:var(--cosmos-badge-padding-start, 12px);padding-inline-start:var(--cosmos-badge-padding-start, 12px)}.cosmos-badge--size-large{height:36px;-webkit-padding-end:16px;padding-inline-end:16px;-webkit-padding-start:var(--cosmos-badge-padding-start, 16px);padding-inline-start:var(--cosmos-badge-padding-start, 16px)}.cosmos-badge--shape-pill{--focus-radius:var(--cosmos-badge-border-radius, 9999px)}.cosmos-badge--shape-rectangle{--focus-radius:var(--cosmos-badge-border-radius, 4px)}.cosmos-badge__label{margin-inline:-4px;overflow:hidden;padding-inline:4px;text-overflow:ellipsis;white-space:nowrap;-ms-flex-item-align:baseline;align-self:baseline;display:block;margin-inline:0;max-width:100%;min-width:0;padding-inline:0;--cosmos-text-color:var(--cosmos-badge-color);--cosmos-text-font-family:var(--cosmos-badge-font-family);--cosmos-text-font-size:var(--cosmos-badge-font-size);--cosmos-text-font-style:var(--cosmos-badge-font-style);
10--cosmos-text-font-weight:var(--cosmos-badge-font-weight);--cosmos-text-letter-spacing:var(--cosmos-badge-letter-spacing);--cosmos-text-text-transform:var(--cosmos-badge-text-transform)}.cosmos-badge--size-small .cosmos-badge__label{--cosmos-text-line-height:var(--cosmos-badge-line-height, 24px);-webkit-margin-before:calc(var(--cosmos-badge-border-width, 1px) * -1);margin-block-start:calc(var(--cosmos-badge-border-width, 1px) * -1)}.cosmos-badge--size-medium .cosmos-badge__label{--cosmos-text-line-height:var(--cosmos-badge-line-height, 28px);-webkit-margin-before:calc(var(--cosmos-badge-border-width, 1px) * -1);margin-block-start:calc(var(--cosmos-badge-border-width, 1px) * -1)}.cosmos-badge--size-large .cosmos-badge__label{--cosmos-text-line-height:var(--cosmos-badge-line-height, 36px);-webkit-margin-before:calc(var(--cosmos-badge-border-width, 1px) * -1);margin-block-start:calc(var(--cosmos-badge-border-width, 1px) * -1)}.cosmos-badge__prefix{-ms-flex-align:center;align-items:center;color:var(--cosmos-text-color);display:-ms-flexbox;display:flex}.cosmos-badge__prefix ::slotted([slot=prefix]){--cosmos-icon-size:16px;--cosmos-flag-width:16px;--cosmos-avatar-size:16px;-webkit-margin-end:4px;margin-inline-end:4px}'}},[257,"cosmos-badge",{appearance:[513],href:[513],hreflang:[513],kind:[513],rel:[513],shape:[513],size:[513],target:[513],computedAppearance:[32]},void 0,{appearance:[{handleAppearanceChange:0}]}]);function defineCustomElement$T(){typeof customElements>"u"||["cosmos-badge","cosmos-text"].forEach(c=>{switch(c){case"cosmos-badge":customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),b);break;case"cosmos-text":customElements.get(transformTag(transformTag(c)))||defineCustomElement$V()}})}let r$f=defineCustomElement$T,c$7=bem("cosmos-spinner"),r$e=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow(),this.computedAppearance="dark"}handleAppearanceChange(c){this.computedAppearance=c}componentWillLoad(){resolveAppearance({instance:this,modeToAppearanceMap:{dark:"light",light:"dark"},callback:this.handleAppearanceChange.bind(this)})}render(){let c=Math.floor(1e3*Math.random());return h$2("svg",{key:"d096873eaa445367592a26cd1bf1f53f3cc3b611",class:c$7({appearance:this.computedAppearance}),viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"da9d4e45c5f17a2a7bf977d8bee4a300bd07fb1f",d:"M16.6292 7.75012C17.1997 8.73827 17.5 9.85919 17.5 11.0002C17.5 12.1412 17.1997 13.2621 16.6292 14.2503",stroke:`url(#segment-1-${c})`,"stroke-width":"3","vector-effect":"non-scaling-stroke"}),h$2("path",{key:"336f41e5c62382d7f6138c523e2b2a5f6a4a222e",d:"M16.6291 14.2502C16.0586 15.2384 15.2381 16.0589 14.25 16.6294C13.2619 17.1999 12.141 17.5003 11 17.5003",stroke:`url(#segment-2-${c})`,"stroke-width":"3","vector-effect":"non-scaling-stroke"}),h$2("path",{key:"42956e6f117ab9adf01282537d94f94bd8af2a77",d:"M11 17.5003C9.859 17.5003 8.73812 17.1999 7.75 16.6294C6.76188 16.0589 5.94134 15.2384 5.37085 14.2502",stroke:`url(#segment-3-${c})`,"stroke-width":"3","vector-effect":"non-scaling-stroke"}),h$2("path",{key:"4dbd30556f1c6e71c2e577a65b0e228f3ae2f4e4",d:"M5.37086 14.2503C4.80035 13.2621 4.5 12.1412 4.5 11.0002C4.5 9.85919 4.80035 8.73827 5.37086 7.75012",stroke:`url(#segment-4-${c})`,"stroke-width":"3","vector-effect":"non-scaling-stroke"}),h$2("path",{key:"c0c5360371663a219c15f1630c48c8e375bf70b1",d:"M5.37085 7.75008C5.94134 6.76196 6.76188 5.94141 7.75 5.3709C8.73812 4.80039 9.859 4.50003 11 4.5",stroke:`url(#segment-5-${c})`,"stroke-width":"3","vector-effect":"non-scaling-stroke"}),h$2("defs",{key:"ca1a83ab2d6a60f323090f99800159bf6e79eb73"},h$2("linearGradient",{key:"2f6d06653570dd0df235f21b15e668e953c572a1",id:`segment-1-${c}`,x1:"15.5",y1:"8.5",x2:"15.5",y2:"13.5",gradientUnits:"userSpaceOnUse"},h$2("stop",{key:"9058bb16860e526b8c0c91c184e24362d2952547","stop-opacity":"0"}),h$2("stop",{key:"fd25331f4fcee003a4ed4ee28d3c8c17883f49c2",offset:"1","stop-opacity":"0.25"})),h$2("linearGradient",{key:"bd9eb3497245392fcdf567662cbcd11660f100b7",id:`segment-2-${c}`,x1:"15.5",y1:"13.5",x2:"13.2074",y2:"17.3236",gradientUnits:"userSpaceOnUse"},h$2("stop",{key:"0a2a1b06fdc1bfc3e8938960dc50aa8e44102eee","stop-opacity":"0.25"}),h$2("stop",{key:"437b858d1fa7ada14506db60d7a489e0468aaedf",offset:"1","stop-opacity":"0.5"})),h$2("linearGradient",{key:"71543c9982192e8b39cfbccfdcaaca5f32106a18",id:`segment-3-${c}`,x1:"11",y1:"16",x2:"9.0824",y2:"12.3929",gradientUnits:"userSpaceOnUse"},h$2("stop",{key:"8c76e8800cdb1d348973b167fbf1d7da8214f896","stop-opacity":"0.5"}),h$2("stop",{key:"73b1b63e80af76cd4f00ff6c5233701e071b3d6a",offset:"1","stop-opacity":"0.75"})),h$2("linearGradient",{key:"1b68d7dfcf6f41738cdaea56ef1e95dd064eecc3",id:`segment-4-${c}`,x1:"6.5",y1:"13.5",x2:"6.5",y2:"8.5",gradientUnits:"userSpaceOnUse"}
10,h$2("stop",{key:"b164cb6cb527cbed399872ad8a2e75cad44414b5","stop-opacity":"0.75"}),h$2("stop",{key:"35ac79948f7addb52686e5d1eb7f5c0120365a48",offset:"1"})),h$2("linearGradient",{key:"371e8744236ff6b449b04e7c5b49e07450e9a4bd",id:`segment-5-${c}`,x1:"7",y1:"8",x2:"9.13409",y2:"4.76796",gradientUnits:"userSpaceOnUse"},h$2("stop",{key:"1273e3b52c23c529b7f2e735b7d6f4de9955161a"}),h$2("stop",{key:"38a81f57df644fed3dab78055a92c8a9c504f4be",offset:"1"}))))}get element(){return this}static get watchers(){return{appearance:[{handleAppearanceChange:0}]}}static get style(){return":host{display:block;height:1em;width:1em}.cosmos-spinner{color:var(--cosmos-spinner-color, #000F1E);display:block;height:100%;width:100%}@media screen and (prefers-reduced-motion: no-preference){.cosmos-spinner{-webkit-animation:spin 0.7s linear infinite;animation:spin 0.7s linear infinite}@-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}}.cosmos-spinner *{stop-color:currentColor}.cosmos-spinner--appearance-light{color:var(--cosmos-spinner-color, #FFFFFF)}"}},[1,"cosmos-spinner",{appearance:[513],computedAppearance:[32]},void 0,{appearance:[{handleAppearanceChange:0}]}]);function defineCustomElement$S(){typeof customElements>"u"||["cosmos-spinner"].forEach(c=>{"cosmos-spinner"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),r$e))})}let l$6=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow(),this.busy=!1,this.decorative=!1,this.disabled=!1,this.hovered=!1,this.href=void 0,this.iconPlacement="before",this.kind="primary",this.size="medium",this.type="button",this.width="content",this.computedAppearance="dark",this.hasIconSlot=!1,this.handleIconSlotChange=()=>{this.hasIconSlot=hasNamedSlot(this.element,"icon")}}handleAppearanceChange(c){this.computedAppearance=c}async buttonBlur(){var c;null==(c=this.buttonElement)||c.blur()}async buttonFocus(){var c;null==(c=this.buttonElement)||c.focus()}handleClick(c){let u=this.element.closest("form");return this.disabled||this.busy?(c.stopImmediatePropagation(),c.preventDefault(),void c.stopPropagation()):this.isButton()&&"button"!==this.type&&u?"reset"===this.type?u.reset():"submit"===this.type?requestFormSubmit(u):void 0:void 0}getTextWeight(){return"medium"}getTextSize(){return"small"===this.size?"x-small":"small"}getType(){return this.isButton()?this.type:void 0}getWidth(){return this.width&&isResponsiveProperty(this.width)?parseResponsiveProperty(this.width):this.width}getHostRole(){return this.ariaExpanded||this.ariaHaspopup?"presentation":null}isButton(){return!this.href&&!this.decorative}isLink(){return!!this.href&&!this.decorative}determineTag(){return this.isButton()?"button":this.isLink()?"a":"div"}getButtonAriaLabel(){var c;return void 0!==this.buttonAriaLabel?this.buttonAriaLabel:this.buttonTitle?this.buttonTitle:(null==(c=this.element.textContent)?void 0:c.trim())||""}componentWillLoad(){this.hasIconSlot=hasNamedSlot(this.element,"icon"),resolveAppearance({instance:this,modeToAppearanceMap:{dark:"light",light:"dark"},callback:this.handleAppearanceChange.bind(this)})}render(){let c=this.determineTag(),u=bem("cosmos-button");return h$2(T$2,{key:"0c3f9957c1bd8bf2fbfe0acdd1413e070cf673da",role:this.getHostRole()},h$2(c,{key:"57eb8593244d3af6a958da0893137c629da0a0cb",class:u({kind:this.kind,busy:this.busy,disabled:this.disabled||this.busy,appearance:this.computedAppearance,shape:this.shape||"pill",size:this.size,icon:this.iconPlacement,hovered:this.hovered,width:this.getWidth(),"has-icon":this.hasIconSlot}),disabled:this.disabled||this.busy,href:this.href,hreflang:this.isLink()?this.hreflang:void 0,target:this.target,rel:this.rel,ref:c=>this.buttonElement=c,type:this.getType(),part:"base","aria-expanded":this.ariaExpanded,"aria-haspopup":this.ariaHaspopup,"aria-label":this.getButtonAriaLabel(),title:this.buttonTitle},h$2("div",{key:"cf2cb6d14fd47379553b701fb9e49612c2e2630c",class:u("icon-container")},this.busy?h$2("cosmos-spinner",{class:u("spinner")}):h$2("slot",{name:"icon",onSlotchange:this.handleIconSlotChange})),h$2("cosmos-text",{key:"f826c9abe8713de5d106c2458e0ec6e01acf11db",class:u("label"),size:this.getTextSize(),tag:"span",weight:this.getTextWeight(),exportparts:"base: label"},h$2("span",{key:"334ec7cdefb4fa1738389c80b65fa2aea436ef36"},h$2("slot",{key:"c44d3be2f47a8a667a168456f2319d5cfe660261"})))))}
10get element(){return this}static get watchers(){return{appearance:[{handleAppearanceChange:0}]}}static get style(){return'@charset "UTF-8";:host{display:inline-block;line-height:0;max-width:100%}:host([width=content]){width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}:host([width=full]){width:100%}@media screen and (min-width: 0){:host([width~="content@small"]){width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}}@media screen and (min-width: 0){:host([width~="full@small"]){width:100%}}@media screen and (min-width: 650px){:host([width~="content@medium"]){width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}}@media screen and (min-width: 650px){:host([width~="full@medium"]){width:100%}}@media screen and (min-width: 1000px){:host([width~="content@large"]){width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}}@media screen and (min-width: 1000px){:host([width~="full@large"]){width:100%}}@media screen and (min-width: 1200px){:host([width~="content@x-large"]){width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}}@media screen and (min-width: 1200px){:host([width~="full@x-large"]){width:100%}}@media screen and (min-width: 1350px){:host([width~="content@xx-large"]){width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}}@media screen and (min-width: 1350px){:host([width~="full@xx-large"]){width:100%}}.cosmos-button:focus,.cosmos-button:focus:not(:focus-visible){outline:none}.cosmos-button:focus:not(:focus-visible)::before{content:none}.cosmos-button:focus::before{border-radius:calc(var(--focus-radius, 6px) * 1.5);bottom:calc((4px + var(--focus-offset, 0px)) * -1);-webkit-box-shadow:inset 0 0 0 2px #1B6AEE, 0 0 0 2px #FFFFFF;box-shadow:inset 0 0 0 2px #1B6AEE, 0 0 0 2px #FFFFFF;left:calc((4px + var(--focus-offset, 0px)) * -1);position:absolute;right:calc((4px + var(--focus-offset, 0px)) * -1);top:calc((4px + var(--focus-offset, 0px)) * -1);content:""}.cosmos-button{--cosmos-icon-color:currentColor;--focus-offset:var(--cosmos-button-border-width, 1px);--icon-container-border-radius:var(--cosmos-button-border-radius, 2px);-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-color:var(--cosmos-button-border-color, transparent);border-radius:var(--cosmos-button-border-radius, 6px);border-style:solid;border-width:var(--cosmos-button-border-width, 1px);-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:-ms-flexbox;display:flex;height:var(--cosmos-button-height);-ms-flex-pack:center;justify-content:center;max-width:100%;outline:none;padding-block:0;position:relative;text-decoration:none;white-space:nowrap}.cosmos-button.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){background:var(--cosmos-button-background-hover);border-color:var(--cosmos-button-border-color-hover, transparent)}.cosmos-button--busy:not(.cosmos-button--has-icon) .cosmos-button__spinner{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.cosmos-button--busy:not(.cosmos-button--has-icon) .cosmos-button__label{visibility:hidden}.cosmos-button--busy.cosmos-button--has-icon ::slotted([slot=icon]){display:none}.cosmos-button__label{-ms-flex-item-align:baseline;align-self:baseline;margin-inline:-4px;overflow:hidden;padding-inline:4px;text-overflow:ellipsis;white-space:nowrap;--cosmos-text-color:currentColor;--cosmos-text-font-family:var(--cosmos-button-font-family);--cosmos-text-font-size:var(--cosmos-button-font-size);--cosmos-text-font-style:var(--cosmos-button-font-style);--cosmos-text-font-weight:var(--cosmos-button-font-weight);--cosmos-text-letter-spacing:var(--cosmos-button-letter-spacing);--cosmos-text-line-height:var(--cosmos-button-line-height);--cosmos-text-text-transform:var(--cosmos-button-text-transform)}
10:not(.cosmos-button--kind-link).cosmos-button--size-small .cosmos-button__label{--cosmos-text-line-height:var(--cosmos-button-line-height, calc(36rem / var(--cosmos-base-font-size, 16)));-webkit-margin-before:calc(var(--cosmos-button-border-width, 1px) * -1);margin-block-start:calc(var(--cosmos-button-border-width, 1px) * -1)}.cosmos-button--kind-link.cosmos-button--shape-circle.cosmos-button--size-small .cosmos-button__label,.cosmos-button--kind-link.cosmos-button--shape-square.cosmos-button--size-small .cosmos-button__label{--cosmos-text-line-height:var(--cosmos-button-line-height, calc(36rem / var(--cosmos-base-font-size, 16)))}:not(.cosmos-button--kind-link).cosmos-button--size-medium .cosmos-button__label{--cosmos-text-line-height:var(--cosmos-button-line-height, calc(40rem / var(--cosmos-base-font-size, 16)));-webkit-margin-before:calc(var(--cosmos-button-border-width, 1px) * -1);margin-block-start:calc(var(--cosmos-button-border-width, 1px) * -1)}.cosmos-button--kind-link.cosmos-button--shape-circle.cosmos-button--size-medium .cosmos-button__label,.cosmos-button--kind-link.cosmos-button--shape-square.cosmos-button--size-medium .cosmos-button__label{--cosmos-text-line-height:var(--cosmos-button-line-height, calc(40rem / var(--cosmos-base-font-size, 16)))}:not(.cosmos-button--kind-link).cosmos-button--size-large .cosmos-button__label{--cosmos-text-line-height:var(--cosmos-button-line-height, calc(48rem / var(--cosmos-base-font-size, 16)));-webkit-margin-before:calc(var(--cosmos-button-border-width, 1px) * -1);margin-block-start:calc(var(--cosmos-button-border-width, 1px) * -1)}.cosmos-button--kind-link.cosmos-button--shape-circle.cosmos-button--size-large .cosmos-button__label,.cosmos-button--kind-link.cosmos-button--shape-square.cosmos-button--size-large .cosmos-button__label{--cosmos-text-line-height:var(--cosmos-button-line-height, calc(48rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--kind-link .cosmos-button__label{}@supports (hanging-punctuation: first) and (font: -apple-system-body) and (-webkit-appearance: none){.cosmos-button--kind-link .cosmos-button__label{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex}}.cosmos-button__icon-container:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only){-ms-flex-align:center;align-items:center;background:var(--cosmos-button-icon-background);border-radius:var(--icon-container-border-radius);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:var(--icon-container-padding)}.cosmos-button__spinner{--cosmos-spinner-color:currentColor;height:calc(18rem / var(--cosmos-base-font-size, 16));width:calc(18rem / var(--cosmos-base-font-size, 16))}.cosmos-button ::slotted([slot=icon]),.cosmos-button__spinner{-ms-flex-negative:0;flex-shrink:0}.cosmos-button--icon-after{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.cosmos-button--width-content{width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}.cosmos-button--width-full{width:100%}@media screen and (min-width: 0){.cosmos-button--width-content\\@small{width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}}@media screen and (min-width: 0){.cosmos-button--width-full\\@small{width:100%}}@media screen and (min-width: 650px){.cosmos-button--width-content\\@medium{width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}}@media screen and (min-width: 650px){.cosmos-button--width-full\\@medium{width:100%}}@media screen and (min-width: 1000px){.cosmos-button--width-content\\@large{width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}}@media screen and (min-width: 1000px){.cosmos-button--width-full\\@large{width:100%}}@media screen and (min-width: 1200px){.cosmos-button--width-content\\@x-large{width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}}@media screen and (min-width: 1200px){.cosmos-button--width-full\\@x-large{width:100%}}@media screen and (min-width: 1350px){.cosmos-button--width-content\\@xx-large{width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}}@media screen and (min-width: 1350px){.cosmos-button--width-full\\@xx-large{width:100%}}.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-small.cosmos-button--icon-before{-webkit-padding-start:var(--cosmos-button-padding-start, calc(12rem / var(--cosmos-base-font-size, 16)));padding-inline-start:var(--cosmos-button-padding-start, calc(12rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-small.cosmos-button--icon-after{-webkit-padding-end:var(--cosmos-button-padding-end, calc(12rem / var(--cosmos-base-font-size, 16)));padding-inline-end:var(--cosmos-button-padding-end, calc(12rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-small.cosmos-button--shape-pill,.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-small.cosmos-button--shape-rectangle{--icon-container-padding:calc(4rem / var(--cosmos-base-font-size, 16))}.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-medium.cosmos-button--icon-before{-webkit-padding-start:var(--cosmos-button-padding-start, calc(14rem / var(--cosmos-base-font-size, 16)));padding-inline-start:var(--cosmos-button-padding-start, calc(14rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-medium.cosmos-button--icon-after{-webkit-padding-end:var(--cosmos-button-padding-end, calc(14rem / var(--cosmos-base-font-size, 16)));padding-inline-end:var(--cosmos-button-padding-end, calc(14rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-medium.cosmos-button--shape-pill,.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-medium.cosmos-button--shape-rectangle{--icon-container-padding:calc(6rem / var(--cosmos-base-font-size, 16))}.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-large.cosmos-button--icon-before{-webkit-padding-start:var(--cosmos-button-padding-start, calc(24rem / var(--cosmos-base-font-size, 16)));padding-inline-start:var(--cosmos-button-padding-start, calc(24rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-large.cosmos-button--icon-after{-webkit-padding-end:var(--cosmos-button-padding-end, calc(24rem / var(--cosmos-base-font-size, 16)));padding-inline-end:var(--cosmos-button-padding-end, calc(24rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-large.cosmos-button--shape-pill,.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-large.cosmos-button--shape-rectangle{--icon-container-padding:calc(8rem / var(--cosmos-base-font-size, 16))}.cosmos-button--size-small{--cosmos-button-height:calc(36rem / var(--cosmos-base-font-size, 16));--cosmos-icon-size:var(--cosmos-button-icon-size, calc(16rem / var(--cosmos-base-font-size, 16)));gap:var(--cosmos-button-gap, 0px);-webkit-padding-end:var(--cosmos-button-padding-end, calc(16rem / var(--cosmos-base-font-size, 16)));padding-inline-end:var(--cosmos-button-padding-end, calc(16rem / var(--cosmos-base-font-size, 16)));-webkit-padding-start:var(--cosmos-button-padding-start, calc(16rem / var(--cosmos-base-font-size, 16)));padding-inline-start:var(--cosmos-button-padding-start, calc(16rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--size-small.cosmos-button--kind-link.cosmos-button--has-icon{gap:var(--cosmos-button-gap, calc(4rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--size-medium{--cosmos-button-height:calc(40rem / var(--cosmos-base-font-size, 16));--cosmos-icon-size:var(--cosmos-button-icon-size, calc(18rem / var(--cosmos-base-font-size, 16)));gap:var(--cosmos-button-gap, 0px);-webkit-padding-end:var(--cosmos-button-padding-end, calc(20rem / var(--cosmos-base-font-size, 16)));padding-inline-end:var(--cosmos-button-padding-end, calc(20rem / var(--cosmos-base-font-size, 16)));-webkit-padding-start:var(--cosmos-button-padding-start, calc(20rem / var(--cosmos-base-font-size, 16)));padding-inline-start:var(--cosmos-button-padding-start, calc(20rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--size-medium.cosmos-button--kind-link.cosmos-button--has-icon{gap:var(--cosmos-button-gap, calc(6rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--size-large{--cosmos-button-height:calc(48rem / var(--cosmos-base-font-size, 16));--cosmos-icon-size:var(--cosmos-button-icon-size, calc(18rem / var(--cosmos-base-font-size, 16)));gap:var(--cosmos-button-gap, 0px);-webkit-padding-end:var(--cosmos-button-padding-end, calc(32rem / var(--cosmos-base-font-size, 16)));padding-inline-end:var(--cosmos-button-padding-end, calc(32rem / var(--cosmos-base-font-size, 16)));-webkit-padding-start:var(--cosmos-button-padding-start, calc(32rem / var(--cosmos-base-font-size, 16)));padding-inline-start:var(--cosmos-button-padding-start, calc(32rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--size-large.cosmos-button--kind-link.cosmos-button--has-icon{gap:var(--cosmos-button-gap, calc(6rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--shape-pill:not(.cosmos-button--kind-link){--focus-radius:var(--cosmos-button-border-radius, 9999px);border-radius:var(--cosmos-button-border-radius, 9999px);--icon-container-border-radius:var(--cosmos-button-border-radius, 9999px)}.cosmos-button--shape-square,.cosmos-button--shape-circle{gap:0;padding:0;width:var(--cosmos-button-height)}.cosmos-button--shape-square .cosmos-button__label,.cosmos-button--shape-circle .cosmos-button__label{-ms-flex-item-align:center;align-self:center}.cosmos-button--shape-square.cosmos-button--busy .cosmos-button__label,.cosmos-button--shape-square.cosmos-button--has-icon .cosmos-button__label,.cosmos-button--shape-circle.cosmos-button--busy .cosmos-button__label,.cosmos-button--shape-circle.cosmos-button--has-icon .cosmos-button__label{display:none}.cosmos-button--shape-circle{--focus-radius:var(--cosmos-button-border-radius, 9999px);border-radius:var(--cosmos-button-border-radius, 9999px);--icon-container-border-radius:var(--cosmos-button-border-radius, 9999px)}.cosmos-button--kind-primary.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button--kind-primary:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){background:var(--cosmos-button-background-hover, #C3093B)}
10.cosmos-button--kind-secondary.cosmos-button--appearance-dark{background:var(--cosmos-button-background, rgba(0, 15, 30, 0.1))}.cosmos-button--kind-secondary.cosmos-button--appearance-dark.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button--kind-secondary.cosmos-button--appearance-dark:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){background:var(--cosmos-button-background-hover, rgba(0, 15, 30, 0.2))}.cosmos-button--kind-secondary.cosmos-button--appearance-light{background:var(--cosmos-button-background, rgba(255, 255, 255, 0.1))}.cosmos-button--kind-secondary.cosmos-button--appearance-light.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button--kind-secondary.cosmos-button--appearance-light:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){background:var(--cosmos-button-background-hover, rgba(255, 255, 255, 0.2))}.cosmos-button--kind-tertiary.cosmos-button--appearance-dark.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button--kind-tertiary.cosmos-button--appearance-dark:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){background:var(--cosmos-button-background-hover, rgba(0, 15, 30, 0.1));border-color:var(--cosmos-button-border-color-hover, rgba(0, 15, 30, 0.2))}.cosmos-button--kind-tertiary.cosmos-button--appearance-light.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button--kind-tertiary.cosmos-button--appearance-light:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){background:var(--cosmos-button-background-hover, rgba(255, 255, 255, 0.1));border-color:var(--cosmos-button-border-color-hover, rgba(255, 255, 255, 0.2))}.cosmos-button--kind-bare.cosmos-button--appearance-dark.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button--kind-bare.cosmos-button--appearance-dark:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){background:var(--cosmos-button-background-hover, rgba(0, 15, 30, 0.1))}.cosmos-button--kind-bare.cosmos-button--appearance-light.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button--kind-bare.cosmos-button--appearance-light:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){background:var(--cosmos-button-background-hover, rgba(255, 255, 255, 0.1))}.cosmos-button--kind-link{border-radius:var(--cosmos-button-border-radius, 0);border-width:0}.cosmos-button--kind-link:not(.cosmos-button--shape-circle,.cosmos-button--shape-square){height:auto;padding:0}.cosmos-button--kind-link.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button--kind-link:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){border-width:0 0 var(--cosmos-button-border-width, 2px);margin-bottom:calc(var(--cosmos-button-border-width, 2px) * -1)}.cosmos-button--kind-link.cosmos-button--appearance-dark.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button--kind-link.cosmos-button--appearance-dark:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){border-color:var(--cosmos-button-border-color-hover, var(--cosmos-button-border-color, rgba(0, 15, 30, 0.2)))}.cosmos-button--kind-link.cosmos-button--appearance-light.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button--kind-link.cosmos-button--appearance-light:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){border-color:var(--cosmos-button-border-color-hover, var(--cosmos-button-border-color, rgba(255, 255, 255, 0.2)))}.cosmos-button--kind-secondary,.cosmos-button--kind-cover-up{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.cosmos-button--kind-tertiary,.cosmos-button--kind-bare,.cosmos-button--kind-link{background:var(--cosmos-button-background, transparent)}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-primary,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-cover-up{color:var(--cosmos-button-color, #FFFFFF)}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-primary.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-primary:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-cover-up.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-cover-up:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){color:var(--cosmos-button-color-hover, #FFFFFF)}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-secondary.c
10osmos-button--appearance-dark,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary.cosmos-button--appearance-dark,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-bare.cosmos-button--appearance-dark,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-link.cosmos-button--appearance-dark{color:var(--cosmos-button-color, #000F1E)}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-secondary.cosmos-button--appearance-light,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary.cosmos-button--appearance-light,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-bare.cosmos-button--appearance-light,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-link.cosmos-button--appearance-light{color:var(--cosmos-button-color, #FFFFFF)}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-secondary.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-dark,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-secondary:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-dark,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-dark,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-dark,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-bare.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-dark,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-bare:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-dark,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-link.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-dark,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-link:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-dark{color:var(--cosmos-button-color-hover, #000F1E)}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-secondary.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-light,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-secondary:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-light,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-light,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-light,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-bare.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-light,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-bare:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-light,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-link.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-light,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-link:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-light{color:var(--cosmos-button-color-hover, #FFFFFF)}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-primary{background:var(--cosmos-button-background, #DB0A40)}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary.cosmos-button--appearance-dark{border-color:var(--cosmos-button-border-color, rgba(0, 15, 30, 0.2))}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary.cosmos-button--appearance-light{border-color:var(--cosmos-button-border-color, rgba(255, 255, 255, 0.2))}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary:focus.cosmos-button--appearance-dark{border-color:var(--cosmos-button-border-color, rgba(0, 15, 30, 0.1))}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary:focus.cosmos-button--appearance-light{border-color:var(--cosmos-button-border-color, rgba(255, 255, 255, 0.1))}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-bare.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-bare:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-cover-up{background:var(--cosmos-button-background, rgba(0, 15, 30, 0.6));border-color:var(--cosmos-button-border-color, rgba(255, 255, 255, 0.2))}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-cover-up.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-cover-up:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){background:var(--cosmos-button-background-hover, rgba(0, 15, 30, 0.8));border-color:var(--cosmos-button-border-color-hover, rgba(255, 255, 255, 0.45))}.cosmos-button--disabled{cursor:not-allowed}.cosmos-button--disabled.cosmos-button--kind-primary{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.cosmos-button--disabled.cosmos-button--kind-primary.cosmos-button--appearance-dark{background:var(--cosmos-button-background, rgba(0, 15, 30, 0.1))}.cosmos-button--disabled.cosmos-button--kind-primary.cosmos-button--appearance-light{background:var(--cosmos-button-background, rgba(255, 255, 255, 0.1))}.cosmos-button--disabled.cosmos-button--kind-tertiary.cosmos-button--appearance-dark{border-color:var(--cosmos-button-border-color, rgba(0, 15, 30, 0.1))}.cosmos-button--disabled.cosmos-button--kind-tertiary.cosmos-button--appearance-light{border-color:var(--cosmos-button-border-color, rgba(255, 255, 255, 0.1))}.cosmos-button--disabled.cosmos-button--kind-cover-up{color:var(--cosmos-button-color, rgba(255, 255, 255, 0.45))}.cosmos-button--disabled.cosmos-button--kind-cover-up.cosmos-button--appearance-light{background:var(--cosmos-button-background, rgba(0, 15, 30, 0.45));border-color:var(--cosmos-button-border-color, rgba(255, 255, 255, 0.2))}.cosmos-button--disabled.cosmos-button--kind-cover-up.cosmos-button--appearance-dark{background:var(--cosmos-button-background, rgba(0, 15, 30, 0.45))}
10.cosmos-button--disabled.cosmos-button--appearance-dark:not(.cosmos-button--kind-cover-up){color:var(--cosmos-button-color, rgba(0, 15, 30, 0.45))}.cosmos-button--disabled.cosmos-button--appearance-light:not(.cosmos-button--kind-cover-up){color:var(--cosmos-button-color, rgba(255, 255, 255, 0.45))}'}},[257,"cosmos-button",{appearance:[513],ariaExpanded:[513,"aria-expanded"],ariaHaspopup:[513,"aria-haspopup"],busy:[516],buttonAriaLabel:[513,"button-aria-label"],buttonTitle:[513,"button-title"],decorative:[516],disabled:[516],hovered:[516],href:[513],hreflang:[513],iconPlacement:[513,"icon-placement"],kind:[513],rel:[513],shape:[513],size:[513],target:[513],type:[513],width:[513],computedAppearance:[32],hasIconSlot:[32],buttonBlur:[64],buttonFocus:[64]},[[2,"click","handleClick"]],{appearance:[{handleAppearanceChange:0}]}]);function defineCustomElement$R(){typeof customElements>"u"||["cosmos-button","cosmos-spinner","cosmos-text"].forEach(c=>{switch(c){case"cosmos-button":customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),l$6);break;case"cosmos-spinner":customElements.get(transformTag(transformTag(c)))||defineCustomElement$S();break;case"cosmos-text":customElements.get(transformTag(transformTag(c)))||defineCustomElement$V()}})}let i$4=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"1a97331a27834a74f65df5086e073b45d1ffd328",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"81f7105176798b5d5dbfb6b318a312cbbea87882",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"57feef43df4d625428ea35d3250dec611a4277c9","fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.773 14.712 12.061 11l3.712-3.712a.5.5 0 0 0 0-.707l-.354-.354a.5.5 0 0 0-.707 0L11 9.939 7.288 6.227a.5.5 0 0 0-.707 0l-.354.354a.5.5 0 0 0 0 .707L9.939 11l-3.712 3.712a.5.5 0 0 0 0 .707l.354.354a.5.5 0 0 0 .707 0L11 12.061l3.712 3.712a.5.5 0 0 0 .707 0l.354-.354a.5.5 0 0 0 0-.707",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-close-small",{ariaLabel:[513,"aria-label"]}]);function defineCustomElement$Q(){typeof customElements>"u"||["cosmos-icon-close-small"].forEach(c=>{"cosmos-icon-close-small"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),i$4))})}let p$3=defineCustomElement$R,l$5=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"0d1e54e88446fc8b6e94414b6dbcdc5fcfb3a811",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"84965bfb59d072502d559a57589dbfa523594820",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"96fd86db7f566538c7dd028fefb75347dba8b0d0","fill-rule":"evenodd","clip-rule":"evenodd",d:"m6.56 11.09 5.83 5.82a.5.5 0 0 0 .71 0l.35-.35a.51.51 0 0 0 0-.71l-5.12-5.12 5.12-5.11a.51.51 0 0 0 0-.71l-.35-.35a.5.5 0 0 0-.71 0l-5.83 5.82a.51.51 0 0 0 0 .71",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-chevron-left",{ariaLabel:[513,"aria-label"]}]);function defineCustomElement$P(){typeof customElements>"u"||["cosmos-icon-chevron-left"].forEach(c=>{"cosmos-icon-chevron-left"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),l$5))})}let r$d=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"50377a3adbe09c89cd3362741094743a562318f3",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"2a66df66f7e5d83c8a9a493341e8fb2d60e2163a",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"8e816d5abc0d8895300d2989d278f71cabedc4a8","fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.45 10.38 9.62 4.56a.48.48 0 0 0-.7 0l-.36.35a.51.51 0 0 0 0 .71l5.12 5.12-5.12 5.
1011a.51.51 0 0 0 0 .71l.36.35a.48.48 0 0 0 .7 0l5.83-5.82a.51.51 0 0 0 0-.71",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-chevron-right",{ariaLabel:[513,"aria-label"]}]);function defineCustomElement$O(){typeof customElements>"u"||["cosmos-icon-chevron-right"].forEach(c=>{"cosmos-icon-chevron-right"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),r$d))})}let getAriaDescribedBy=c=>["help-text",c&&"validation-message"].filter(Boolean).join(" "),getAriaInvalid=c=>c?"true":"false",getAriaDisabled=c=>c?"true":void 0,getAriaRequired=c=>c?"true":void 0,getAriaExpanded=c=>c?"true":"false",o$d=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"995bdbf074b8b2951d7e468b9d60c90295eaa234",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"3aec324cab17b9891e93147e431adba94104eab4",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"5d8702b5bd350c4fa56a2155421faf46ddee7e36","fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.57 17.25 11.43 3.11a.49.49 0 0 0-.86 0L2.44 17.25a.5.5 0 0 0 .43.75h16.27a.5.5 0 0 0 .43-.75M10.25 9.5a.5.5 0 0 1 .5-.5h.5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-.5a.5.5 0 0 1-.5-.5zM11 16a1 1 0 1 1 0-2 1 1 0 0 1 0 2",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-warning",{ariaLabel:[513,"aria-label"]}]);function defineCustomElement$N(){typeof customElements>"u"||["cosmos-icon-warning"].forEach(c=>{"cosmos-icon-warning"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),o$d))})}let f$1=bem("cosmos-checkbox"),_=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow(),this.inputchangeEvent=createEvent(this,"inputchange",6),this.inputinvalidEvent=createEvent(this,"inputinvalid",7),this.checked=!1,this.hitArea="content",this.invalid=!1,this.required=!1,this.computedAppearance="dark",this.inputInvalid=!1,this.isHovered=!1,this.labelText="",this.wasSubmitted=!1,this.toggleCheckbox=()=>{this.input.click()},this.getValidationMessage=()=>this.validationMessage?this.validationMessage:this.inputInvalid&&!this.group&&this.input?this.input.validationMessage:void 0,this.reannounceValidationMessage=async()=>{this.validationMessageRef&&(this.validationMessageRef.ariaLabel="",await nextTick(),this.validationMessageRef.ariaLabel=this.getValidationMessage())},this.handleInputChange=c=>{let u=c.target;this.inputchangeEvent.emit({checked:u.checked}),!this.isValidityControlled()&&this.wasSubmitted&&(this.inputInvalid=!this.reportValidity())},this.isValidityControlled=()=>this.group?this.group.invalid||!1:this.invalid||!1,this.handleInvalid=c=>{c.preventDefault(),this.inputInvalid=!0,this.inputinvalidEvent.emit()},this.handleFormData=c=>{if(this.input&&this.name&&this.isInputChecked()&&!this.disabled)return c.formData.append(this.input.name,this.input.value)},this.handleFormSubmit=c=>{this.wasSubmitted=!0,this.input&&!this.reportValidity()&&(c.preventDefault(),this.reannounceValidationMessage())},this.hoveredOn=()=>{this.isHovered=!0},this.hoveredOff=()=>{this.isHovered=!1},this.handleSlotChange=()=>{this.labelText=getDefaultSlotTextContent(this.defaultSlotRef)}}handleChecked(){this.setInputIndeterminateAttribute()}handleAppearanceChange(c){this.computedAppearance=c}handleInvalidChange(c){this.inputInvalid=c}async inputBlur(){this.input.blur()}async inputFocus(){this.input.focus()}async inputCheckValidity(){return this.checkValidity()}async inputReportValidity(){let c=this.reportValidity();return this.inputInvalid=!c,c}async inputSetCustomValidity(c){this.input.setCustomValidity(c)}isChecked(){return stringBooleanToBoolean(this.checked)}isInputChecked(){var c;return(null==(c=this.input)?void 0:c.checked)===!0&&!this.isInputIndeterminate()}isIndeterminate(){return"indeterminate"===this.checked}isInputIndeterminate(){var c;return(null==(c=this.input)?void 0:c.indeterminate)===!0}setInputIndeterminateAttribute(){this.input&&(this.input.indeterminate=this.isIndeterminate())}hasRequiredLabel(){return!!this.required&&!!this.requiredLabel}hasRequiredOrOptionalLabel(){return this.hasRequiredLabel()||!!this.optionalLabel}hasHelpText(){return!!this.helpText||hasNamedSlot(this.element,"help-text")}getTitle(){return this.clamp?this.labelText:void 0}getAriaDescribedby(){let c=[];return this.inputInvalid&&this.getValidationMessage()&&c.push("validation-message"),this.hasHelpText()&&c.push("help-text"),c.length?c.join(" "):void 0}getAriaChecked(){return!!this.isIndeterminate()&&"mixed"}getHelpText(){return this.helpText?this.helpText:hasNamedSlot(this.element,"help-text")?getNamedSlotTextContent(this.element,"help-text"):void 0}getAllCheckboxes(){return this.group?[...this.group.querySelectorAll(`${transformTag("cosmos-checkbox")}
10[name="${this.name}"]`)].filter(c=>!c.disabled):[this.element]}checkValidity(){let c=this.getAllCheckboxes(),u=null==c?void 0:c.some(c=>c.shadowRoot.querySelector('input[type="checkbox"]').checked);return!(null!=c&&c.some(c=>c.required))||u}reportValidity(){let c=this.checkValidity();return c||(this.input.required=!0,this.input.reportValidity()),c}connectedCallback(){this.form=this.element.closest("form"),this.group=this.element.closest(transformTag("cosmos-checkbox-group")),this.form&&(this.form.addEventListener("formdata",this.handleFormData,!0),this.form.addEventListener("submit",this.handleFormSubmit,!0))}componentWillLoad(){this.inputInvalid=this.invalid,resolveAppearance({instance:this,modeToAppearanceMap:{dark:"light",light:"dark"},callback:this.handleAppearanceChange.bind(this)})}componentDidLoad(){this.setInputIndeterminateAttribute(),Kt.observe(this.element,this.handleSlotChange)}disconnectedCallback(){this.form&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit)),Kt.unobserve(this.element)}render(){let c=this.getValidationMessage(),u=this.getHelpText(),d=!!this.labelText;return h$2("div",{key:"5e27d364f6a79a5b2674291c60c4640e40b1d898",class:f$1({appearance:this.computedAppearance,clamp:this.clamp,disabled:this.disabled,hovered:this.isHovered,indeterminate:this.isIndeterminate(),invalid:this.inputInvalid,"has-help-text":this.hasHelpText()}),part:"base"},h$2("div",{key:"a901c7d51a514324aeabaddbe6f38f2d22263889",class:f$1("input-and-prefix")},h$2("cosmos-text",{key:"96da121dbcd424d54d7ba4928f9b2b5216997ac0","aria-hidden":"true",class:f$1("aligner"),size:"small",tag:"span"}),h$2("div",{key:"d2d0393b3415986b898c23ff92366cb63011b0b7",class:f$1("input-container")},h$2("input",{key:"3bc1b6522ec1454ced0a54d0d616dc43ea737133","aria-checked":this.getAriaChecked(),"aria-describedby":getAriaDescribedBy(this.inputInvalid),"aria-invalid":getAriaInvalid(this.inputInvalid),"aria-label":this.labelText,"aria-required":getAriaRequired(this.required),autofocus:this.autofocus,checked:this.isChecked(),class:f$1("input"),disabled:this.disabled,id:"checkbox",name:this.name,onChange:this.handleInputChange,onInvalid:this.handleInvalid,ref:c=>this.input=c,required:this.required,type:"checkbox",value:this.value}),h$2("span",{key:"df95d86cdea571776b29d8d0ac403e97e445a1b3",class:f$1("control"),part:"checkbox"}),h$2("svg",{key:"74ab84f3abc1d1e2f27325834fd17e98283a1bb2","aria-hidden":"true",class:f$1("tick",{selected:!0}),viewBox:"0 0 14 10",xmlns:"http://www.w3.org/2000/svg"},h$2("path",{key:"5b0ecdb126a0c7050a16d65098823862571f56fb",d:"M0.985237 6.1331C0.692033 5.85873 0.67668 5.39865 0.950941 5.10535L1.1595 4.8823C1.42921 4.59387 1.8798 4.57335 2.1746 4.83608L5.21473 7.54546L11.824 0.477201C12.1114 0.169801 12.599 0.169801 12.8864 0.4772L13.0808 0.685097C13.3422 0.964657 13.3422 1.39898 13.0808 1.67854L5.71164 9.55949C5.43724 9.85296 4.97686 9.86832 4.6835 9.5938L0.985237 6.1331Z"})),h$2("span",{key:"197fc01241a63446fab416a32c4d8dd252e5d43d",class:f$1("hyphen")})),h$2("div",{key:"4ad7a09eaa6b107f1edd118cc896111ba58ce2ec",id:"prefix","aria-hidden":"true",class:f$1("prefix",{"end-margin":d}),part:"prefix",onClick:this.toggleCheckbox,onMouseEnter:this.hoveredOn,onMouseLeave:this.hoveredOff},h$2("slot",{key:"001a510fa9ce690d4b4a30f726a8296edee24417",name:"prefix"}))),h$2("div",{key:"35941b517699616a17c5d8759cf60857cf7e3c11",class:f$1("content",{row:"row"===this.hitArea})},h$2("label",{key:"9a295075190a706783f07e8a0e32081a5b9bd00f",class:f$1("label"),htmlFor:"checkbox",onMouseEnter:this.hoveredOn,onMouseLeave:this.hoveredOff},h$2("cosmos-text",{key:"0e77974c649307e2d6ca8d9a1c615836e31359c2",appearance:this.computedAppearance,clamp:this.clamp,class:f$1("label-text"),exportparts:"base: label",tag:"span",title:this.getTitle(),size:"small"},h$2("span",{key:"e8f0e30a0f692225ffad9a781a16e0affce5b6d6"},h$2("slot",{key:"ba4f1ed094feebbf12703ee0b745426e79ac9b37",ref:c=>this.defaultSlotRef=c}))),this.hasRequiredOrOptionalLabel()&&h$2("cosmos-text",{key:"9c9410ecd744db056e06cce56b073515f792c66e",appearance:this.computedAppearance,"aria-hidden":"true",class:f$1("required-optional-label"),exportparts:"base: required-label",kind:"subtle",size:"xx-small",tag:"span"},this.hasRequiredLabel()||this.required?this.requiredLabel:this.optionalLabel)),h$2("cosmos-text",{key:"6364f8db518a692f6d6fb16106c1e042960261c4",appearance:this.computedAppearance,clamp:this.clamp,class:f$1("help-text"),exportparts:"base: help-text",kind:"subtle",size:"x-small"},h$2("span",{key:"dabe1b70dcbe479f79233b7eda34c40ba5e50163","aria-label":u,id:"help-text"},h$2("slot",{key:"817e26ebfa01d35042504c092cbca232c7ffa5cf",name:"help-text"},this.helpText))),h$2("div",{key:"82f3e4472a7536728826fe86e4a16f7a09646ba1","aria-atomic":"false","aria-live":"polite",class:f$1("validation-message-container")},this.inputInvalid&&!!c&&h$2("div",{key:"c2b689d8285cd96a558ee2441f8e9fed6851b3b4",class:f$1("validation-message")},h$2("cosmos-icon-warning",{key:"78f49ecccf81414b03a808931f999e43404b4085","aria-hidden":"true",class:f$1("validation-message-icon")}
10),h$2("cosmos-text",{key:"9f8b44fd7422b70313e01973c5f06cdc402042e0",appearance:this.computedAppearance,class:f$1("validation-message-text"),exportparts:"base: validation-message",size:"x-small",tag:"span"},h$2("span",{key:"2301182fb75c538a7b2b9df672a43b7fbc2622f5","aria-label":c,id:"validation-message",ref:c=>this.validationMessageRef=c},c))))))}get element(){return this}static get watchers(){return{checked:[{handleChecked:0}],appearance:[{handleAppearanceChange:0}],invalid:[{handleInvalidChange:0}]}}static get style(){return'@charset "UTF-8";:host{display:block;min-width:0;width:100%}.cosmos-checkbox{-ms-flex-align:baseline;align-items:baseline;display:-ms-flexbox;display:flex}.cosmos-checkbox__input-and-prefix{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0}.cosmos-checkbox__aligner{--cosmos-text-font-family:var(--cosmos-checkbox-font-family);--cosmos-text-font-size:var(--cosmos-checkbox-font-size);--cosmos-text-font-style:var(--cosmos-checkbox-font-style);--cosmos-text-font-weight:var(--cosmos-checkbox-font-weight);--cosmos-text-letter-spacing:var(--cosmos-checkbox-letter-spacing);--cosmos-text-line-height:var(--cosmos-checkbox-line-height);--cosmos-text-text-transform:var(--cosmos-checkbox-text-transform);width:0}.cosmos-checkbox__aligner::before{content:" "}.cosmos-checkbox__input-container{-ms-flex-negative:0;flex-shrink:0;height:var(--cosmos-checkbox-size, 16px);-webkit-margin-end:var(--cosmos-checkbox-gap, calc(0.5 * var(--cosmos-checkbox-size, 16px)));margin-inline-end:var(--cosmos-checkbox-gap, calc(0.5 * var(--cosmos-checkbox-size, 16px)));position:relative;width:var(--cosmos-checkbox-size, 16px)}.cosmos-checkbox__prefix{display:grid}.cosmos-checkbox__prefix>[slot=prefix]{-webkit-margin-end:var(--cosmos-checkbox-gap, calc(0.375 * var(--cosmos-checkbox-size, 16px)));margin-inline-end:var(--cosmos-checkbox-gap, calc(0.375 * var(--cosmos-checkbox-size, 16px)))}.cosmos-checkbox__prefix ::slotted([slot=prefix]){--cosmos-icon-size:18px;--cosmos-flag-width:18px;--cosmos-avatar-size:18px;-webkit-margin-end:var(--cosmos-checkbox-gap, calc(0.375 * var(--cosmos-checkbox-size, 16px)));margin-inline-end:var(--cosmos-checkbox-gap, calc(0.375 * var(--cosmos-checkbox-size, 16px)));position:relative}.cosmos-checkbox__prefix ::slotted([slot=prefix])::before{content:"";display:block;height:100%;left:0;min-height:calc(var(--cosmos-checkbox-size, 16px) + calc(0.25 * var(--cosmos-checkbox-size, 16px)) * 2);position:absolute;right:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.cosmos-checkbox__input:focus,.cosmos-checkbox__input:focus:not(:focus-visible){outline:none}.cosmos-checkbox__input:focus:not(:focus-visible)::before{content:none}.cosmos-checkbox__input:focus::before{border-radius:calc(var(--cosmos-checkbox-border-radius, 4px) * 1.5);bottom:calc((4px + 0px) * -1);-webkit-box-shadow:inset 0 0 0 2px #1B6AEE, 0 0 0 2px #FFFFFF;box-shadow:inset 0 0 0 2px #1B6AEE, 0 0 0 2px #FFFFFF;left:calc((4px + 0px) * -1);position:absolute;right:calc((4px + 0px) * -1);top:calc((4px + 0px) * -1);content:""}.cosmos-checkbox__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;-webkit-box-shadow:none;box-shadow:none;display:block;height:var(--cosmos-checkbox-size, 16px);margin:0;outline:none;width:var(--cosmos-checkbox-size, 16px)}.cosmos-checkbox__input::after{-webkit-box-sizing:content-box;box-sizing:content-box;content:"";display:block;height:calc(var(--cosmos-checkbox-size, 16px) + calc(0.25 * var(--cosmos-checkbox-size, 16px)) * 2);-webkit-margin-start:calc(calc(0.25 * var(--cosmos-checkbox-size, 16px)) * -1);margin-inline-start:calc(calc(0.25 * var(--cosmos-checkbox-size, 16px)) * -1);position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:calc(var(--cosmos-checkbox-size, 16px) + calc(0.25 * var(--cosmos-checkbox-size, 16px)) * 2);z-index:1}.cosmos-checkbox__input:checked~.cosmos-checkbox__tick{opacity:1}.cosmos-checkbox__input:not(:indeterminate)~.cosmos-checkbox__hyphen{display:none}.cosmos-checkbox__control{border-radius:var(--cosmos-checkbox-border-radius, 4px);border-style:solid;border-width:var(--cosmos-checkbox-border-width, 1px);-webkit-box-sizing:border-box;box-sizing:border-box;display:block;height:100%;left:0;position:absolute;top:0;width:100%}.cosmos-checkbox__tick{fill:currentColor;height:calc(var(--cosmos-checkbox-size, 16px) / 2);left:50%;opacity:0;pointer-events:none;position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.cosmos-checkbox__hyphen{border-radius:0.5px;display:block;height:calc(var(--cosmos-checkbox-size, 16px) / 10);left:50%;pointer-events:none;position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);width:calc(var(--cosmos-checkbox-size, 16px) / 2)}.cosmos-checkbox__content{position:relative}.cosmos-checkbox__content--row{width:100%}.cosmos-checkbox__content--row label{display:inline-block;width:100%}.cosmos-checkbox__label{position:relative}.cosmos-checkbox__label::before{bottom:calc(calc(0.25 * var(--cosmos-checkbox-size, 16px)) * -1);content:"";left:0;position:absolute;right:0;top:calc(calc(0.25 * var(--cosmos-checkbox-size, 16px)) * -1)}.cosmos-checkbox__label-text{--cosmos-text-color:var(--cosmos-checkbox-color);--cosmos-text-font-family:var(--cosmos-checkbox-font-family);--cosmos-text-font-size:var(--cosmos-checkbox-font-size);--cosmos-text-font-style:var(--cosmos-checkbox-font-style);
10--cosmos-text-font-weight:var(--cosmos-checkbox-font-weight);--cosmos-text-letter-spacing:var(--cosmos-checkbox-letter-spacing);--cosmos-text-line-height:var(--cosmos-checkbox-line-height);--cosmos-text-text-transform:var(--cosmos-checkbox-text-transform);display:inline;position:relative}.cosmos-checkbox--hovered .cosmos-checkbox__label-text{--cosmos-text-color:var(--cosmos-checkbox-color-hover)}.cosmos-checkbox__required-optional-label{--cosmos-text-color:var(--cosmos-checkbox-required-optional-label-color);--cosmos-text-font-family:var(--cosmos-checkbox-required-optional-label-font-family);--cosmos-text-font-size:var(--cosmos-checkbox-required-optional-label-font-size);--cosmos-text-font-style:var(--cosmos-checkbox-required-optional-label-font-style);--cosmos-text-font-weight:var(--cosmos-checkbox-required-optional-label-font-weight);--cosmos-text-letter-spacing:var(--cosmos-checkbox-required-optional-label-letter-spacing);--cosmos-text-line-height:var(--cosmos-checkbox-required-optional-label-line-height);--cosmos-text-text-transform:var(--cosmos-checkbox-required-optional-label-text-transform);display:inline;-webkit-margin-start:4px;margin-inline-start:4px;white-space:nowrap}.cosmos-checkbox__help-text{--cosmos-text-color:var(--cosmos-checkbox-help-text-color);--cosmos-text-font-family:var(--cosmos-checkbox-help-text-font-family);--cosmos-text-font-size:var(--cosmos-checkbox-help-text-font-size);--cosmos-text-font-style:var(--cosmos-checkbox-help-text-font-style);--cosmos-text-font-weight:var(--cosmos-checkbox-help-text-font-weight);--cosmos-text-letter-spacing:var(--cosmos-checkbox-help-text-letter-spacing);--cosmos-text-line-height:var(--cosmos-checkbox-help-text-line-height);--cosmos-text-text-transform:var(--cosmos-checkbox-help-text-text-transform);display:block;padding-top:4px}.cosmos-checkbox:not(.cosmos-checkbox--has-help-text) .cosmos-checkbox__help-text{display:none}.cosmos-checkbox--appearance-dark{color:var(--cosmos-checkbox-color, #000F1E)}.cosmos-checkbox--appearance-dark .cosmos-checkbox__input:checked~.cosmos-checkbox__control,.cosmos-checkbox--appearance-dark .cosmos-checkbox__input:indeterminate~.cosmos-checkbox__control{background-color:var(--cosmos-checkbox-background-color, #000F1E)}.cosmos-checkbox--appearance-dark .cosmos-checkbox__control{background-color:var(--cosmos-checkbox-background-color, transparent);border-color:var(--cosmos-checkbox-border-color, rgba(0, 15, 30, 0.6))}.cosmos-checkbox--appearance-dark .cosmos-checkbox__tick{color:var(--cosmos-checkbox-icon-color, #FFFFFF)}.cosmos-checkbox--appearance-dark .cosmos-checkbox__hyphen{background-color:var(--cosmos-checkbox-icon-color, #FFFFFF)}.cosmos-checkbox--appearance-dark:not(.cosmos-checkbox--disabled) .cosmos-checkbox__input-container:hover,.cosmos-checkbox--appearance-dark:not(.cosmos-checkbox--disabled).cosmos-checkbox--hovered{color:var(--cosmos-checkbox-color-hover, #000F1E)}.cosmos-checkbox--appearance-dark:not(.cosmos-checkbox--disabled) .cosmos-checkbox__input-container:hover .cosmos-checkbox__input~.cosmos-checkbox__control,.cosmos-checkbox--appearance-dark:not(.cosmos-checkbox--disabled).cosmos-checkbox--hovered .cosmos-checkbox__input~.cosmos-checkbox__control{background:var(--cosmos-checkbox-background-color-hover, rgba(0, 15, 30, 0.1))}.cosmos-checkbox--appearance-dark:not(.cosmos-checkbox--disabled) .cosmos-checkbox__input-container:hover .cosmos-checkbox__input:checked~.cosmos-checkbox__control,.cosmos-checkbox--appearance-dark:not(.cosmos-checkbox--disabled) .cosmos-checkbox__input-container:hover .cosmos-checkbox__input:indeterminate~.cosmos-checkbox__control,.cosmos-checkbox--appearance-dark:not(.cosmos-checkbox--disabled).cosmos-checkbox--hovered .cosmos-checkbox__input:checked~.cosmos-checkbox__control,.cosmos-checkbox--appearance-dark:not(.cosmos-checkbox--disabled).cosmos-checkbox--hovered .cosmos-checkbox__input:indeterminate~.cosmos-checkbox__control{background-color:var(--cosmos-checkbox-background-color-hover, rgba(0, 15, 30, 0.8));border-color:var(--cosmos-checkbox-border-color-hover, rgba(0, 15, 30, 0.1))}.cosmos-checkbox--appearance-light{color:var(--cosmos-checkbox-color, #FFFFFF)}.cosmos-checkbox--appearance-light .cosmos-checkbox__input:checked~.cosmos-checkbox__control,.cosmos-checkbox--appearance-light .cosmos-checkbox__input:indeterminate~.cosmos-checkbox__control{background-color:var(--cosmos-checkbox-background-color, #FFFFFF)}.cosmos-checkbox--appearance-light .cosmos-checkbox__control{background-color:var(--cosmos-checkbox-background-color, transparent);border-color:var(--cosmos-checkbox-border-color, rgba(255, 255, 255, 0.6))}.cosmos-checkbox--appearance-light .cosmos-checkbox__tick{color:var(--cosmos-checkbox-icon-color, #000F1E)}
10.cosmos-checkbox--appearance-light .cosmos-checkbox__hyphen{background-color:var(--cosmos-checkbox-icon-color, #000F1E)}.cosmos-checkbox--appearance-light:not(.cosmos-checkbox--disabled) .cosmos-checkbox__input-container:hover,.cosmos-checkbox--appearance-light:not(.cosmos-checkbox--disabled).cosmos-checkbox--hovered{color:var(--cosmos-checkbox-color-hover, #FFFFFF)}.cosmos-checkbox--appearance-light:not(.cosmos-checkbox--disabled) .cosmos-checkbox__input-container:hover .cosmos-checkbox__input~.cosmos-checkbox__control,.cosmos-checkbox--appearance-light:not(.cosmos-checkbox--disabled).cosmos-checkbox--hovered .cosmos-checkbox__input~.cosmos-checkbox__control{background:var(--cosmos-checkbox-background-color-hover, rgba(255, 255, 255, 0.1))}.cosmos-checkbox--appearance-light:not(.cosmos-checkbox--disabled) .cosmos-checkbox__input-container:hover .cosmos-checkbox__input:checked~.cosmos-checkbox__control,.cosmos-checkbox--appearance-light:not(.cosmos-checkbox--disabled) .cosmos-checkbox__input-container:hover .cosmos-checkbox__input:indeterminate~.cosmos-checkbox__control,.cosmos-checkbox--appearance-light:not(.cosmos-checkbox--disabled).cosmos-checkbox--hovered .cosmos-checkbox__input:checked~.cosmos-checkbox__control,.cosmos-checkbox--appearance-light:not(.cosmos-checkbox--disabled).cosmos-checkbox--hovered .cosmos-checkbox__input:indeterminate~.cosmos-checkbox__control{background-color:var(--cosmos-checkbox-background-color-hover, rgba(255, 255, 255, 0.8));border-color:var(--cosmos-checkbox-border-color-hover, rgba(255, 255, 255, 0.1))}.cosmos-checkbox--disabled{pointer-events:none}.cosmos-checkbox--disabled .cosmos-checkbox__prefix{opacity:0.4}.cosmos-checkbox--disabled.cosmos-checkbox--appearance-dark .cosmos-checkbox__input:checked~.cosmos-checkbox__control,.cosmos-checkbox--disabled.cosmos-checkbox--appearance-dark .cosmos-checkbox__input:indeterminate~.cosmos-checkbox__control{background-color:var(--cosmos-checkbox-background-color, rgba(0, 15, 30, 0.45));border-color:var(--cosmos-checkbox-border-color, transparent)}.cosmos-checkbox--disabled.cosmos-checkbox--appearance-dark .cosmos-checkbox__control{border-color:var(--cosmos-checkbox-border-color, rgba(0, 15, 30, 0.45))}.cosmos-checkbox--disabled.cosmos-checkbox--appearance-dark .cosmos-checkbox__label-text{--cosmos-text-color:var(--cosmos-checkbox-color, rgba(0, 15, 30, 0.45))}.cosmos-checkbox--disabled.cosmos-checkbox--appearance-light .cosmos-checkbox__input:checked~.cosmos-checkbox__control,.cosmos-checkbox--disabled.cosmos-checkbox--appearance-light .cosmos-checkbox__input:indeterminate~.cosmos-checkbox__control{background-color:var(--cosmos-checkbox-background-color, rgba(255, 255, 255, 0.45));border-color:var(--cosmos-checkbox-border-color, transparent)}.cosmos-checkbox--disabled.cosmos-checkbox--appearance-light .cosmos-checkbox__control{border-color:var(--cosmos-checkbox-border-color, rgba(255, 255, 255, 0.45))}.cosmos-checkbox--disabled.cosmos-checkbox--appearance-light .cosmos-checkbox__label-text{--cosmos-text-color:var(--cosmos-checkbox-color, rgba(255, 255, 255, 0.45))}.cosmos-checkbox--invalid .cosmos-checkbox__control{border-color:var(--cosmos-checkbox-invalid-color, #E06600);border-width:var(--cosmos-checkbox-border-width, 2px)}.cosmos-checkbox--invalid .cosmos-checkbox__required-label{--cosmos-text-color:var(--cosmos-checkbox-invalid-color, #E06600)}.cosmos-checkbox__validation-message{display:-ms-flexbox;display:flex;gap:4px;margin-top:4px}.cosmos-checkbox__validation-message-text{--cosmos-text-color:var(--cosmos-checkbox-color);--cosmos-text-font-family:var(--cosmos-checkbox-validation-message-font-family);--cosmos-text-font-size:var(--cosmos-checkbox-validation-message-font-size);--cosmos-text-font-style:var(--cosmos-checkbox-validation-message-font-style);--cosmos-text-font-weight:var(--cosmos-checkbox-validation-message-font-weight);--cosmos-text-letter-spacing:var(--cosmos-checkbox-validation-message-letter-spacing);--cosmos-text-line-height:var(--cosmos-checkbox-validation-message-line-height);--cosmos-text-text-transform:var(--cosmos-checkbox-validation-message-text-transform)}.cosmos-checkbox__validation-message-icon{--cosmos-icon-color:var(--cosmos-checkbox-invalid-color, #E06600);--cosmos-icon-size:calc(16rem / var(--cosmos-base-font-size, 16));-ms-flex-negative:0;flex-shrink:0;padding:1.5px 0}.cosmos-checkbox--clamp .cosmos-checkbox__content{min-width:0}.cosmos-checkbox--clamp .cosmos-checkbox__label{-ms-flex-align:baseline;align-items:baseline;display:-ms-flexbox;display:flex;min-width:0}.cosmos-checkbox--clamp .cosmos-checkbox__label-text{display:-ms-flexbox;display:flex;min-width:0}'}},[257,"cosmos-checkbox",{appearance:[513],autofocus:[516],checked:[520],clamp:[516],disabled:[516],helpText:[513,"help-text"],hitArea:[513,"hit-area"],invalid:[516],name:[513],optionalLabel:[513,"optional-label"],required:[516],requiredLabel:[513,"required-label"],validationMessage:[513,"validation-message"],value:[513],computedAppearance:[32],inputInvalid:[32],isHovered:[32],labelText:[32],inputBlur:[64],inputFocus:[64],inputCheckValidity:[64],inputReportValidity:[64],inputSetCustomValidity:[64]},void 0,{checked:[{handleChecked:0}],appearance:[{handleAppearanceChange:0}],invalid:[{handleInvalidChange:0}]}]);function defineCustomElement$M(){typeof customElements>"u"||["cosmos-checkbox","cosmos-icon-warning","cosmos-text"].forEach(c=>{switch(c){case"cosmos-checkbox":customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),_);break;case"cosmos-icon-warning":customElements.get(transformTag(transformTag(c)))||defineCustomElement$N();break;case"cosmos-text":customElements.get(transformTag(transformTag(c)))||defineCustomElement$V()}})}let r$c=defineCustomElement$M,FormField=({helpText:c,appearance:u="dark",disabled:d,hideLabel:p,label:h,invalid:f,labelForValue:m,requiredLabel:g,optionalLabel:v,validationMessage:y,class:b,element:S,required:_,validationMessageRef:E},T)=>{let w=bem("cosmos-form-field"),P=_?g:v,A=c||(hasNamedSlot(S,"help-text")?getNamedSlotTextContent(S,"help-text"):"");return h$2("div",{class:[b,w({invalid:f,disabled:d,appearance:u})].join(" "),part:"base"},h$2("div",{class:w("info-container",{"has-label":!!h,"has-help-text":!!A,"has-required-optional-label":!!P,"hide-label":p&&
10!!h})},h$2("label",{htmlFor:m??void 0,class:w("label"),onClick:()=>{let c=S.shadowRoot.querySelector(`#${m}`);null!=c&&c.hasAttribute("role")&&c.focus()}},h$2("cosmos-text",{appearance:u,class:w("label-text"),exportparts:"base: label",size:"x-small",tag:"span",weight:"medium"},h$2("span",{id:"label"},h)),P&&h$2("cosmos-text",{appearance:u,"aria-hidden":"true",class:w("required-optional-label"),exportparts:"base: required-label",kind:"subtle",size:"xx-small",tag:"span"},P)),h$2("cosmos-text",{appearance:u,class:w("help-text"),kind:"subtle",size:"x-small",exportparts:"base: help-text"},h$2("span",{"aria-label":A,id:"help-text"},h$2("slot",{name:"help-text"},c)))),h$2("div",null,T),h$2("div",{"aria-atomic":"false","aria-live":"polite",class:w("validation-message-container")},f&&y&&h$2("div",{class:w("validation-message")},h$2("cosmos-icon-warning",{"aria-hidden":"true",class:w("validation-message-icon")}),h$2("cosmos-text",{appearance:u,class:w("validation-message-text"),exportparts:"base: validation-message",size:"x-small",tag:"span"},h$2("span",{"aria-label":y,id:"validation-message",ref:E},y)))))},c$6=proxyCustomElement(class extends b$3{handleVideoChange(){this.canPlayThroughVideo=!1}handleAppearanceChange(c){this.computedAppearance=c}handleActiveChange(c){c?this.startVideo():this.stopVideo()}handlePlayVideoChange(c){c?this.startVideo():this.stopVideo()}async startVideo(){this.canHandleVideo()&&(this.isVideoPlaying=!0,await this.showVideo(),this.videoElement.play())}async stopVideo(){this.canHandleVideo()&&(await this.hideVideo(),this.isVideoPlaying=!1,this.videoElement.pause(),this.videoElement.currentTime=0)}async showVideo(){this.canPlayThroughVideo&&(this.isVideoVisible=!0,await this.cssTransition.enter(this.videoElement,200))}async hideVideo(){this.isVideoVisible=!1,await this.cssTransition.leave(this.videoElement,200)}canHandleVideo(){return!!this.video&&!hasReducedMotion()}constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow(),this.imageResizeEvent=createEvent(this,"imageresize",5),this.radius="none",this.canPlayThroughVideo=!1,this.computedAppearance="light",this.isVideoPlaying=!1,this.isVideoVisible=!1,this.generateClassNames=bem("cosmos-media-preview"),this.handleImageResize=({detail:{height:c,width:u}})=>{this.imageResizeEvent.emit({height:c,width:u})},this.handleCanPlayThrough=()=>{this.canPlayThroughVideo||(this.canPlayThroughVideo=!0,this.isVideoPlaying&&this.showVideo())},this.handleVideoCompletion=async()=>{await this.hideVideo()},this.cssTransition=new i$6}componentWillLoad(){resolveAppearance({instance:this,modeToAppearanceMap:{dark:"dark",light:"light"},callback:this.handleAppearanceChange.bind(this)}),(this.playVideo||this.active)&&this.startVideo()}render(){return h$2("div",{key:"4b08e3912c98a417ab27f0eba89ec2a5f5abc9e1",class:this.generateClassNames({active:this.active,appearance:this.computedAppearance,radius:this.radius}),part:"base"},h$2("div",{key:"38438e7ffbe3a1607d53df7ec7eb86b3eeb4bf93",class:this.generateClassNames("container")},h$2("cosmos-image",{key:"a74ea66697be66266e6c45a70bab54d7689a792b",class:this.generateClassNames("image"),image:this.image,imagePreview:this.imagePreview,imageAlt:this.imageAlt,appearance:this.appearance,observeResize:this.observeResize,onImageresize:this.handleImageResize,loading:this.loading,sizes:this.sizes,srcset:this.srcset}),this.video&&h$2("video",{key:"acd3f70c341d571647d075d825089030959da970",class:this.generateClassNames("video",{visible:this.isVideoVisible&&this.isVideoPlaying}),ref:c=>this.videoElement=c,src:this.video,muted:!0,preload:"none",playsInline:!0,onCanPlayThrough:this.handleCanPlayThrough,"aria-hidden":"true",onEnded:this.handleVideoCompletion})))}get element(){return this}static get watchers(){return{video:[{handleVideoChange:0}],appearance:[{handleAppearanceChange:0}],active:[{handleActiveChange:0}],playVideo:[{handlePlayVideoChange:0}]}}static get style(){return":host{display:-ms-flexbox;display:flex;overflow:hidden}.cosmos-media-preview{-ms-flex-positive:1;flex-grow:1;overflow:hidden;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}.cosmos-media-preview--radius-none{border-radius:var(--cosmos-media-preview-border-radius, 0)}.cosmos-media-preview--radius-small{border-radius:var(--cosmos-media-preview-border-radius, 2px)}.cosmos-media-preview--radius-medium{border-radius:var(--cosmos-media-preview-border-radius, 6px)}.cosmos-media-preview--radius-large{border-radius:var(--cosmos-media-preview-border-radius, 8px)}.cosmos-media-preview--radius-full{border-radius:var(--cosmos-media-preview-border-radius, 9999px)}.cosmos-media-preview__container{-ms-flex-positive:1;flex-grow:1;height:100%;overflow:hidden;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);-webkit-transition:-webkit-transform 0.6s cubic-bezier(0.35, 0, 0, 1);transition:-webkit-transform 0.6s cubic-bezier(0.35, 0, 0, 1);transition:transform 0.6s cubic-bezier(0.35, 0, 0, 1);transition:transform 0.6s cubic-bezier(0.35, 0, 0, 1), -webkit-transform 0.6s cubic-bezier(0.35, 0, 0, 1);width:100%}.cosmos-media-preview--active .cosmos-media-preview__container{-webkit-transform:scale(1.04) translate3d(0, 0, 0);transform:scale(1.04) translate3d(0, 0, 0)}.cosmos-media-preview__image{height:100%}.cosmos-media-preview__video{display:block;height:100%;left:0;-o-object-fit:cover;object-fit:cover;opacity:0;position:absolute;top:0;width:100%;z-index:4}.cosmos-media-preview__video--visible{opacity:1}.cosmos-media-preview__video.enter{opacity:0;-webkit-transition:0.2s ease-in;transition:0.2s ease-in}.cosmos-media-preview__video.enter-active{opacity:1}.cosmos-media-preview__video.leave{opacity:1;-webkit-transition:0.2s ease-in;transition:0.2s ease-in}.cosmos-media-preview__video.leave-active{opacity:0}
10"}},[1,"cosmos-media-preview",{active:[516],appearance:[513],image:[513],imageAlt:[513,"image-alt"],imagePreview:[513,"image-preview"],loading:[513],observeResize:[516,"observe-resize"],playVideo:[516,"play-video"],radius:[513],sizes:[513],srcset:[513],video:[513],canPlayThroughVideo:[32],computedAppearance:[32],isVideoPlaying:[32],isVideoVisible:[32]},void 0,{video:[{handleVideoChange:0}],appearance:[{handleAppearanceChange:0}],active:[{handleActiveChange:0}],playVideo:[{handlePlayVideoChange:0}]}]);function defineCustomElement$L(){typeof customElements>"u"||["cosmos-media-preview","cosmos-image"].forEach(c=>{switch(c){case"cosmos-media-preview":customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),c$6);break;case"cosmos-image":customElements.get(transformTag(transformTag(c)))||defineCustomElement$U()}})}let m$2=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.mode="light"}render(){return h$2("slot",{key:"4f2803236e94b248c74c8253a6eb7072739b9eea"})}get element(){return this}},[260,"cosmos-mode",{mode:[513]}]);function defineCustomElement$K(){typeof customElements>"u"||["cosmos-mode"].forEach(c=>{"cosmos-mode"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),m$2))})}let z=bem("cosmos-title"),f=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow(),this.kind="normal",this.size="medium",this.spacing="none",this.tag="p",this.weight="bold",this.computedAppearance="dark"}handleAppearanceChange(c){this.computedAppearance=c}setNumericClampValue(){this.numericClampValue=getNumericClampValue(this.clamp)}getSize(){return this.size&&isResponsiveProperty(this.size)?parseResponsiveProperty(this.size):this.size}componentWillLoad(){resolveAppearance({instance:this,modeToAppearanceMap:{dark:"light",light:"dark"},callback:this.handleAppearanceChange.bind(this)}),this.setNumericClampValue()}render(){var c;let u=null!=(c=this.tag)?c:"p";return h$2(T$2,{key:"6f1430e7ae79c6dd93513e2efe542b044cf62afe",style:isMultiLineClamp(this.numericClampValue)?{"--cosmos-title-clamp-length":`${this.numericClampValue}`}:{}},h$2(u,{key:"727ba070888c9033985d179b8cf4a4a7b8a23c6f",class:z({appearance:this.computedAppearance,size:this.getSize(),spacing:this.spacing,weight:this.weight,"single-line-clamp":isSingleLineClamp(this.numericClampValue),"multi-line-clamp":isMultiLineClamp(this.numericClampValue),kind:this.kind}),part:"base"},h$2("slot",{key:"dbef6ba678e18e8c14b26156effdf577403809da"})))}get element(){return this}static get watchers(){return{appearance:[{handleAppearanceChange:0}],clamp:[{setNumericClampValue:0}]}}static get style(){return"@charset \"UTF-8\";:host{display:block}:host([clamp]){min-width:0;overflow:clip}:host([clamp]:focus-within){overflow:visible}:host{--cosmos-title-font-family-default:var(--cosmos-font-family-title, Bull, Helvetica, sans-serif)}@supports (font-variation-settings: normal){:host{--cosmos-title-font-family-default:var(       --cosmos-font-family-title-variable,       Bull VF, Helvetica, sans-serif     )}}:host(:lang(ja)){--cosmos-title-font-family-default:var(--cosmos-font-family-japanese-title, Noto Sans JP, Helvetica, sans-serif)}:host(:lang(ar)){--cosmos-title-font-family-default:var(--cosmos-font-family-arabic-title, Noto Kufi Arabic, Helvetica, sans-serif)}:host(:lang(ko)){--cosmos-title-font-family-default:var(--cosmos-font-family-korean-title, Noto Sans KR, Helvetica, sans-serif)}:host(:lang(he)){--cosmos-title-font-family-default:var(--cosmos-font-family-hebrew-title, Noto Sans Hebrew, Helvetica, sans-serif)}:host(:lang(ka)){--cosmos-title-font-family-default:var(--cosmos-font-family-georgian-title, Noto Sans Georgian, Helvetica, sans-serif)}:host(:lang(hi)){--cosmos-title-font-family-default:var(--cosmos-font-family-hindi-title, Noto Sans, Helvetica, sans-serif)}:host(:lang(th)){--cosmos-title-font-family-default:var(--cosmos-font-family-thai-title, Noto Sans Thai, Helvetica, sans-serif)}:host(:lang(zh)){--cosmos-title-font-family-default:var(     --cosmos-font-family-chinese-simplified-title,     Microsoft YaHei, ヒラã‚
10®ãƒŽè§’ã‚´ Pro W3, Hiragino Kaku Gothic Pro, Hiragino Kaku Gothic ProN W3, Osaka, メイリオ, Meiryo, ï¼­ï¼³ Pゴシック, MS PGothic, Arial Unicode MS, Tahoma, Helvetica, sans-serif   )}:host(:lang(zh-Hant)){--cosmos-title-font-family-default:var(     --cosmos-font-family-chinese-traditional-title,     Microsoft JhengHei, Geneva CY, ヒラギノ角ゴ Pro W3, Hiragino Kaku Gothic Pro, Hiragino Kaku Gothic ProN W3, Osaka, メイリオ, Meiryo, ï¼­ï¼³ Pゴシック, MS PGothic, Arial Unicode MS, Tahoma, Helvetica, sans-serif   )}.cosmos-title{--cosmos-font-weight-default-title-variable-bold:'opsz' 86, 'wght' 700;--cosmos-font-weight-default-title-variable-heavy:'opsz' 86, 'wght' 800;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--cosmos-title-color, #000F1E);font-family:var(--cosmos-title-font-family, var(--cosmos-title-font-family-default, var(--cosmos-font-family-title)));font-style:var(--cosmos-title-font-style, inherit);font-variation-settings:var(--cosmos-title-font-variation-settings, var(--cosmos-font-weight-default-title-variable-bold));font-weight:var(--cosmos-title-font-weight, 700);letter-spacing:var(--cosmos-title-letter-spacing, inherit);line-height:var(--cosmos-title-line-height, inherit);margin:0;text-transform:var(--cosmos-title-text-transform, var(--cosmos-title-transform, inherit))}.cosmos-title--single-line-clamp{margin-inline:-4px;overflow:hidden;padding-inline:4px;text-overflow:ellipsis;white-space:nowrap}
10.cosmos-title--multi-line-clamp{-webkit-box-orient:vertical;display:-webkit-box;-webkit-line-clamp:var(--cosmos-title-clamp-length);margin-inline:-4px;overflow:hidden;padding-inline:4px;}.cosmos-title--size-xx-small{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.411765));margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-title--size-xx-small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-title--size-xx-small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}.cosmos-title--size-x-small{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.5));margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-title--size-x-small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-title--size-x-small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}.cosmos-title--size-small{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.333333));margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-title--size-small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-title--size-small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}.cosmos-title--size-medium{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.137931));margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-title--size-medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-title--size-medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}.cosmos-title--size-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.097561));margin-bottom:0.439024em;padding-top:0.829268em;font-size:var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-title--size-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16) + 10 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-title--size-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(41rem / var(--cosmos-base-font-size, 16))))}}.cosmos-title--size-x-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.066667));margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-title--size-x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16) + 23 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-title--size-x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(60rem / var(--cosmos-base-font-size, 16))))}}.cosmos-title--size-xx-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1));margin-bottom:0.255814em;padding-top:0.55814em;font-size:var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-title--size-xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16) + 41 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-title--size-xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(86rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-title--size-xx-small\\@small{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.411765));margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-title--size-xx-small\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-title--size-xx-small\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-title--size-x-small\\@small{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.5));margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-title--size-x-small\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-title--size-x-small\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-title--size-small\\@small{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.333333));margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-title--size-small\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-title--size-small\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-title--size-medium\\@small{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.137931));margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-title--size-medium\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-title--size-medium\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-title--size-large\\@small{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.097561));margin-bottom:0.439024em;padding-top:0.829268em;font-size:var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-title--size-large\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16) + 10 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-title--size-large\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(41rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-title--size-x-large\\@small{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.066667));margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-title--size-x-large\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16) + 23 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-title--size-x-large\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(60rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-title--size-xx-large\\@small{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1));margin-bottom:0.255814em;padding-top:0.55814em;font-size:var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-title--size-xx-large\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16) + 41 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-title--size-xx-large\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(86rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-title--size-xx-small\\@medium{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.411765));margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-title--size-xx-small\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-title--size-xx-small\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-title--size-x-small\\@medium{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.5));margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-title--size-x-small\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-title--size-x-small\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-title--size-small\\@medium{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.333333));margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-title--size-small\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-title--size-small\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-title--size-medium\\@medium{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.137931));margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-title--size-medium\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-title--size-medium\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-title--size-large\\@medium{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.097561));margin-bottom:0.439024em;padding-top:0.829268em;font-size:var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-title--size-large\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16) + 10 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-title--size-large\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(41rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-title--size-x-large\\@medium{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.066667));margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-title--size-x-large\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16) + 23 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-title--size-x-large\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(60rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-title--size-xx-large\\@medium{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1));margin-bottom:0.255814em;padding-top:0.55814em;font-size:var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-title--size-xx-large\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16) + 41 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-title--size-xx-large\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(86rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1
10000px){.cosmos-title--size-xx-small\\@large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.411765));margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-title--size-xx-small\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-title--size-xx-small\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-title--size-x-small\\@large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.5));margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-title--size-x-small\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-title--size-x-small\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-title--size-small\\@large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.333333));margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-title--size-small\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-title--size-small\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-title--size-medium\\@large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.137931));margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-title--size-medium\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-title--size-medium\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-title--size-large\\@large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.097561));margin-bottom:0.439024em;padding-top:0.829268em;font-size:var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-title--size-large\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16) + 10 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-title--size-large\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(41rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-title--size-x-large\\@large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.066667));margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-title--size-x-large\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16) + 23 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-title--size-x-large\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(60rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-title--size-xx-large\\@large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1));margin-bottom:0.255814em;padding-top:0.55814em;font-size:var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-title--size-xx-large\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16) + 41 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-title--size-xx-large\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(86rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-title--size-xx-small\\@x-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.411765));margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-title--size-xx-small\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-title--size-xx-small\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-title--size-x-small\\@x-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.5));margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-title--size-x-small\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-title--size-x-small\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-title--size-small\\@x-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.333333));margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-title--size-small\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-title--size-small\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-title--size-medium\\@x-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.137931));margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-title--size-medium\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-title--size-medium\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-title--size-large\\@x-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.097561));margin-bottom:0.439024em;padding-top:0.829268em;font-size:var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-title--size-large\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16) + 10 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-title--size-large\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(41rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-title--size-x-large\\@x-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.066667));margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-title--size-x-large\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16) + 23 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-title--size-x-large\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(60rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-title--size-xx-large\\@x-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1));margin-bottom:0.255814em;padding-top:0.55814em;font-size:var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-title--size-xx-large\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16) + 41 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-title--size-xx-large\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(86rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-title--size-xx-small\\@xx-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.411765));margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-title--size-xx-small\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-title--size-xx-small\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-title--size-x-small\\@xx-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.5));margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-title--size-x-small\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-title--size-x-small\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-title--size-small\\@xx-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.333333));margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-title--size-small\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-title--size-small\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-title--size-medium\\@xx-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.137931));margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-title--size-medium\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-title--size-medium\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-title--size-large\\@xx-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.097561));margin-bottom:0.439024em;padding-top:0.829268em;font-size:var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-title--size-large\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16) + 10 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-title--size-large\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(41rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-title--size-x-large\\@xx-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.066667));margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-title--size-x-large\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16) + 23 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-title--size-x-large\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-titl
10e-font-size, calc(60rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-title--size-xx-large\\@xx-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1));margin-bottom:0.255814em;padding-top:0.55814em;font-size:var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-title--size-xx-large\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16) + 41 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-title--size-xx-large\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(86rem / var(--cosmos-base-font-size, 16))))}}.cosmos-title--spacing-none{margin-bottom:0;padding-top:0}.cosmos-title--spacing-long-form-bottom{padding-top:0}.cosmos-title--spacing-long-form-top{margin-bottom:0}.cosmos-title--appearance-light{color:var(--cosmos-title-color, #FFFFFF)}.cosmos-title--weight-heavy{font-variation-settings:var(--cosmos-title-font-variation-settings, var(--cosmos-font-weight-default-title-variable-heavy));font-weight:var(--cosmos-title-font-weight, 800)}.cosmos-title--kind-subtle{color:var(--cosmos-title-color, rgba(0, 15, 30, 0.6))}.cosmos-title--kind-subtle.cosmos-title--appearance-light{color:var(--cosmos-title-color, rgba(255, 255, 255, 0.6))}"}},[257,"cosmos-title",{appearance:[513],clamp:[520],kind:[513],size:[513],spacing:[513],tag:[513],weight:[513],computedAppearance:[32]},void 0,{appearance:[{handleAppearanceChange:0}],clamp:[{setNumericClampValue:0}]}]);function defineCustomElement$J(){typeof customElements>"u"||["cosmos-title"].forEach(c=>{"cosmos-title"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),f))})}let a$9=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"bd8ce7ec956d7b431bfec39cdc4196f1ea10dd8e",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"6a018f9571b1ee03b0521a5a93ca03d5eda42af4",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"66ed02b6f493e1b81eaa75570ba5cc9a84523b1a","fill-rule":"evenodd","clip-rule":"evenodd",d:"m11.36 15.18 5.82-5.83a.48.48 0 0 0 0-.7l-.35-.36a.51.51 0 0 0-.71 0L11 13.41 5.89 8.29a.51.51 0 0 0-.71 0l-.35.36a.48.48 0 0 0 0 .7l5.82 5.83a.51.51 0 0 0 .71 0",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-chevron-down",{ariaLabel:[513,"aria-label"]}]);function defineCustomElement$I(){typeof customElements>"u"||["cosmos-icon-chevron-down"].forEach(c=>{"cosmos-icon-chevron-down"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),a$9))})}let o$c=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"53a13c91bebce45634c59eba45822f135d5d2cc0",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"c384ec8f77b63cb99d67b58d6b82042801a155e4",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"950c0b97c29f91d0739680486607d968c180d5c9","fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.5 4h17a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5h-2.37a.48.48 0 0 1-.41-.22l-.35-.52a.5.5 0 0 1-.09-.26.5.5 0 0 1 .5-.5h1.72v-9h-15v9h1.64a.5.5 0 0 1 .5.5.5.5 0 0 1-.09.27l-.42.54a.51.51 0 0 1-.39.19H2.5a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5m13.488 14.733a.5.5 0 0 1-.438.267h-9.1a.5.5 0 0 1-.45-.78l4.59-6.62a.5.5 0 0 1 .82 0l4.55 6.62a.5.5 0 0 1 .028.513",fill:"
10currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-airplay",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$H=function(){typeof customElements>"u"||["cosmos-icon-airplay"].forEach(c=>{"cosmos-icon-airplay"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),o$c))})},i$3=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"f220505e2d7a1c9d81bd9a1339fb0e65386022d5",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"05f80380789458532b595075733a0504532a632b",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"bb119bc732a288e77a629113c272a076a0d27a5e",d:"M12.523 12.599c-.31-.328-.856-.538-1.5-.538-.643 0-1.188.21-1.499.537a.95.95 0 0 0-.274.596c-.053.484-.023.9.033 1.565.054.634.157 1.48.29 2.34.095.614.173.945.243 1.181.114.384.54.72 1.208.72s1.093-.336 1.207-.72c.07-.236.148-.567.243-1.18.134-.861.236-1.707.29-2.34.057-.666.086-1.082.034-1.566a.95.95 0 0 0-.275-.596m-3.19-2.917a1.693 1.693 0 1 0 3.385 0 1.693 1.693 0 0 0-3.386 0M11.003 3c-3.96.011-7.204 3.224-7.253 7.184-.04 3.207 2.007 5.95 4.867 6.957a.097.097 0 0 0 .128-.106 42 42 0 0 1-.105-.746.25.25 0 0 0-.147-.197 6.35 6.35 0 0 1-3.813-5.879c.034-3.445 2.847-6.254 6.292-6.282a6.35 6.35 0 0 1 6.397 6.344 6.35 6.35 0 0 1-3.814 5.817.25.25 0 0 0-.146.198q-.05.37-.106.745c-.01.072.06.13.13.106 2.831-.996 4.867-3.698 4.867-6.866 0-4.018-3.276-7.286-7.297-7.275m-.131 3.338a3.947 3.947 0 0 1 4.098 3.94c0 1.131-.48 2.153-1.246 2.873a.3.3 0 0 0-.095.237c.016.27.01.534-.008.83-.005.08.084.13.15.086a4.87 4.87 0 0 0 2.13-4.027 4.88 4.88 0 0 0-5.066-4.87 4.89 4.89 0 0 0-4.68 4.807 4.87 4.87 0 0 0 2.13 4.09.096.096 0 0 0 .15-.085 7 7 0 0 1-.01-.831.3.3 0 0 0-.094-.237 3.93 3.93 0 0 1-1.245-2.98 3.954 3.954 0 0 1 3.786-3.833",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-apple-podcasts",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$G=function(){typeof customElements>"u"||["cosmos-icon-apple-podcasts"].forEach(c=>{"cosmos-icon-apple-podcasts"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),i$3))})},o$b=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"76392ef3f06dacf669acb71384502ce0af8aaf99",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"9b96058e9e55bce6eafc6c0a511ac46d67dc3ffc",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"89c126e38be505dbe8c38cdb6d2d6b5fd32e0d19","fill-rule":"evenodd","clip-rule":"evenodd",d:"M11 18.65a7.65 7.65 0 1 0 0-15.3 7.65 7.65 0 0 0 0 15.3M11 20a9 9 0 1 0 0-18 9 9 0 0 0 0 18",fill:"currentColor"}),h$2("path",{key:"f19da338f84af791c1af64856a995e02e8785079",d:"M5.5 9.5A.5.5 0 0 1 6 9h.5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5zm2.5-3a.5.5 0 0 1 .5-.5H9a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-.5a.5.5 0 0 1-.5-.5zm2.5 2A.5.5 0 0 1 11 8h.5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-.5.5H11a.5.5 0 0 1-.5-.5zm2.5-1a.5.5 0 0 1 .5-.5h.5a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-.5.5h-.5a.5.5 0 0 1-.5-.5zm2.5 2A.5.5 0 0 1 16 9h.5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5H16a.5.5 0 0 1-.5-.5z",f
10ill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-audio-settings",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$F=function(){typeof customElements>"u"||["cosmos-icon-audio-settings"].forEach(c=>{"cosmos-icon-audio-settings"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),o$b))})},o$a=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"ecbbad8f9f484927c4cf8261bcafedcb65a8d945",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"1e2db812cc8ceb3a6b5838674b275eb5e0d1acfb",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"04b004fbb32d33a13d3e59c6bd48ed6700f9d9f3","fill-rule":"evenodd","clip-rule":"evenodd",d:"M9 6.472h4.628a5.11 5.11 0 0 1 5.162 4.824 4.85 4.85 0 0 1-1.362 3.562 5 5 0 0 1-2.841 1.493.51.51 0 0 1-.587-.5v-.532a.51.51 0 0 1 .425-.493c.73-.137 1.4-.49 1.926-1.015a3.32 3.32 0 0 0 .939-2.473 3.6 3.6 0 0 0-3.662-3.362H9v2.3a.5.5 0 0 1-.854.352L5.114 7.576a.5.5 0 0 1 0-.706l3.033-3.024A.5.5 0 0 1 9 4.2zm.19 6.846c.312-.3.738-.453 1.169-.418a1.5 1.5 0 0 1 1.62 1.567V15.7a1.5 1.5 0 0 1-1.62 1.571A1.507 1.507 0 0 1 8.732 15.7v-1.229c-.02-.432.147-.852.459-1.153m1.594 2.361c0 .349-.143.531-.425.531s-.431-.187-.431-.531v-1.187c0-.344.143-.532.431-.532s.425.182.425.532zM8.309 16.95v-.621a.23.23 0 0 0-.24-.239h-.46v-2.87a.23.23 0 0 0-.24-.24h-.61a1 1 0 0 0-.23.03l-1.05.33a.234.234 0 0 0-.16.29l.14.53a.235.235 0 0 0 .32.17l.64-.2v1.96h-.66a.23.23 0 0 0-.24.24v.62a.23.23 0 0 0 .24.24h2.31a.23.23 0 0 0 .24-.24",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-back-10",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$E=function(){typeof customElements>"u"||["cosmos-icon-back-10"].forEach(c=>{"cosmos-icon-back-10"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),o$a))})},a$8=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"af9042ba69c6b38f556ae8ddc122a73e9b39eee0",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"f8c2f39a724b898a53ecf4267706183ef9589c88",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"c6e93007a04b80670e94201a722797242ff463f2","fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 4.5a.5.5 0 0 1 .5-.5h14a.5.5 0 0 1 .5.5v14a.5.5 0 0 1-.5.5h-14a.5.5 0 0 1-.5-.5zm1.5 13h12v-12h-12zm15-12h1a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5h-1zM8.412 14.405a.594.594 0 0 1-.912-.502V9.097c0-.469.516-.753.912-.502l3.796 2.403a.594.594 0 0 1 0 1.004z",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-browse",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$D=function(){typeof customElements>"u"||["cosmos-icon-browse"].forEach(c=>{"cosmos-icon-browse"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),a$8))})},p$2=defineCustomElement$I,m$1=defineCustomElement$P,r$b=defineCustomElement$O,i$2=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"ef69e2bac755434025cb6c9d7f916a0f8fdb16e9",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"65bc711258f8f521c65db2c7483c10fa34b9e217",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"9370cfbc41a5777c78e30664552b8d1ad620ce2b","fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.5 4h17a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-.5.5h-5.8a.5.5 0 0 1-.5-.5V17a.5.5 0 0 1 .5-.5h4.8v-11h-16A.5.5 0 0 1 2 5v-.5a.5.5 0 0 1 .5-.5m.12 11.4a2.83 2.83 0 0 1 2 2 .49.49 0 0 1-.49.6h-1.6a.51.51 0 0 1-.51-.5v-1.61a.5.5 0 0 1 .6-.49m5.31 2.04c-.27-2.865-2.536-5.095-5.4-5.37a.5.5 0 0 0-.53.5v.5a.51.51 0 0 0 .48.5c2.11.224 3.776 1.85 4 3.96a.52.52 0 0 0 .5.47h.5a.49.49 0 0 0 .45-.56m-5.44-7.13a.52.52 0 0 1-.49-.5v-.5a.51.51 0 0 1 .54-.5 9.2 9.2 0 0 1 8.67 8.67.51.51 0 0 1-.51.52h-.5a.49.49 0 0 1-.49-.48 7.7 7.7 0 0 0-7.22-7.21",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-chromecast",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$C=function(){typeof customElements>"u"||["cosmos-icon-chromecast"].forEach(c=>{"cosmos-icon-chromecast"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),i$2))})},o$9=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"a56bc0c36ebb553d05c2ad39ba00841356f0f9d3",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"950ba7b59eb8e24dbd11b1f869ddcf957ef8dec2",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"8909d0f98739daf42311de174a456f3d3d0a13cb","fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.5 4h-17a.5.5 0 0 0-.5.5V5a.5.5 0 0 0 .5.5h16v11h-4.8a.5.5 0 0 0-.5.5v.5a.5.5 0 0 0 .5.5h5.8a.5.5 0 0 0 .5-.5v-13a.5.5 0 0 0-.5-.5M4.62 17.4a2.83 2.83 0 0 0-2-2 .5.5 0 0 0-.6.49v1.61a.51.51 0 0 0 .51.5h1.6a.49.49 0 0 0 .49-.6m-2.09-5.33c2.864.275 5.13 2.505 5.4 5.37a.49.49 0 0 1-.45.56h-.5a.52.52 0 0 1-.5-.47c-.224-2.11-1.89-3.736-4-3.96a.51.51 0 0 1-.48-.5v-.5a.5.5 0 0 1 .53-.5M2 9.81a.52.52 0 0 0 .49.5 7.7 7.7 0 0 1 7.22 7.21.49.49 0 0 0 .49.48h.5a.51.51 0 0 0 .51-.52 9.2 9.2 0 0 0-8.67-8.67.51.51 0 0 0-.54.5zm11.1 5.69C12 11 9 8 4.4 6.5h13.1v9z",fill:"
10currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-chromecast-filled",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$B=function(){typeof customElements>"u"||["cosmos-icon-chromecast-filled"].forEach(c=>{"cosmos-icon-chromecast-filled"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),o$9))})},a$7=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"b7d4877be9ebb03658ecda75c8d2c5cb19e824ff",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"99d43845e3f1e8fbe82762a0e8a5a28b311e8664",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"315e4a25f775f0d21a249a66d001f057586a48b8","fill-rule":"evenodd","clip-rule":"evenodd",d:"M11 2a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9m0 1.5a7.5 7.5 0 1 1 0 15 7.5 7.5 0 0 1 0-15m-.63 7.93 3 3a.48.48 0 0 0 .67 0l.36-.35a.51.51 0 0 0 0-.71l-2.68-2.68V6.5a.5.5 0 0 0-.5-.5h-.5a.5.5 0 0 0-.5.5v4.57a.5.5 0 0 0 .15.36",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-clock",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$A=function(){typeof customElements>"u"||["cosmos-icon-clock"].forEach(c=>{"cosmos-icon-clock"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),a$7))})},l$4=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"38d664b1b475a3765c5981537c2c6bca2be39ff8",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"8679df34d87fe026f0901e703b189b19b8b55008",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"15946b119482ac685c0bed16e9a37054cc919af4","fill-rule":"evenodd","clip-rule":"evenodd",d:"m18.18 4.18-.35-.36a.51.51 0 0 0-.71 0L11 9.94 4.89 3.82a.51.51 0 0 0-.71 0l-.35.36a.48.48 0 0 0 0 .7L10 11l-6.17 6.12a.48.48 0 0 0 0 .7l.35.36a.51.51 0 0 0 .71 0L11 12.06l6.11 6.12a.51.51 0 0 0 .71 0l.35-.36a.48.48 0 0 0 0-.7L12.07 11l6.11-6.12a.48.48 0 0 0 0-.7",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-close",{ariaLabel:[513,"aria-label"]}]);function defineCustomElement$z(){typeof customElements>"u"||["cosmos-icon-close"].forEach(c=>{"cosmos-icon-close"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),l$4))})}let r$a=defineCustomElement$z,p$1=defineCustomElement$Q,l$3=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"7d905fafb056183e949896899511797dd588518d",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"1ca9e08b0625ff8cd93fd1bc12ca5a89580a4608",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"488e7203801b810099e8433190b2d3b033971d1f","fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.32 5a.5.5 0 0 0-.48.36l-3.08 11a.5.5 0 0 0 .47.67h.46a.52.52 0 0 0 .49-.36l3.07-11a.5.5 0 0 0-.47-.67zm6.41 5.65-3.39-3.39a.4.4 0 0 0-.28-.12.37.37 0 0 0-.27.11l-.44.44a.36.36 0 0 0-.11.26.44.44 0 0 0 .11.28L17.12 11l-2.77 2.77a.44.44 0 0 0-.11.28c0 .098.04.192.11.26l.44.44a.37.37 0 0 0 .27.11.4.4 0 0 0 .28-.12l3.39-3.39a.5.5 0 0 0 0-.7m-12.2 4.09-3.39-3.39a.48.48 0 0 1 0-.7l3.39-3.34a.4.4 0 0 1 .28-.12.37.37 0 0 1 .27.11l.44.44a.4.4 0 0 1 .11.26.4.4 0 0 1-.12.23L4.75 11l2.76 2.77a.4.4 0 0 1 .12.28.4.4 0 0 1-.11.26l-.44.44a.37.37 0 0 1-.27.11.4.4 0 0 1-.28-.12",fill:"
10currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-code-block",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$y=function(){typeof customElements>"u"||["cosmos-icon-code-block"].forEach(c=>{"cosmos-icon-code-block"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),l$3))})},r$9=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"afbb63474f97ebc6d64c4b4fa696f588a6b04b72",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"b8d32f9de4c49b84f6bf00dc667fc416cbd33101",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"c66da8ddc4209cc71f0e1b963eabfe6303f38cfa","fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.99 2a9 9 0 1 0 .02 18 9 9 0 0 0-.02-18m-.74 4.5a.5.5 0 0 1 .5-.5h.5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-.5.5h-.5a.5.5 0 0 1-.5-.5zM11 16a1 1 0 1 1 0-2 1 1 0 0 1 0 2",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-error-filled",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$x=function(){typeof customElements>"u"||["cosmos-icon-error-filled"].forEach(c=>{"cosmos-icon-error-filled"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),r$9))})},o$8=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"21817fcb5ebedc821682bb7aa32546dbd33facfb",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"5f8f117311f908aee130421902b666e2330f4bbe",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"db361e04ccebcefc5a93f31c0799c4e04610eef1","fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.5 3h-4V2a.5.5 0 0 0-.5-.5h-.5a.5.5 0 0 0-.5.5v1H9V2a.5.5 0 0 0-.5-.5H8a.5.5 0 0 0-.5.5v1h-4a.5.5 0 0 0-.5.5v15a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5V18a.5.5 0 0 0-.5-.5h-2v-13h3v1A.5.5 0 0 0 8 6h.5a.5.5 0 0 0 .5-.5v-1h4v1a.5.5 0 0 0 .5.5h.5a.5.5 0 0 0 .5-.5v-1h3v5a.5.5 0 0 0 .5.5h.5a.5.5 0 0 0 .5-.5v-6a.5.5 0 0 0-.5-.5m-9.435 8.044a7 7 0 0 1 2.5-1.603.5.5 0 0 0 .302-.665l-.667-1.56c-.148-.341-.377-.341-.511 0l-.834 2.238-2.42.218c-.376 0-.443.26-.147.491l1.102.922a.5.5 0 0 0 .675-.041M9 15.998a5 5 0 1 1 10 .004 5 5 0 0 1-10-.003m5.489 3.502A.51.51 0 0 0 15 19v-3a.5.5 0 0 0-.5-.5h-2a.51.51 0 0 0-.511.5v.5a.51.51 0 0 0 .511.5h.989v2a.5.5 0 0 0 .5.5zm-.25-5a1 1 0 1 1 0-2 1 1 0 0 1 0 2",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-event-details",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$w=function(){typeof customElements>"u"||["cosmos-icon-event-details"].forEach(c=>{"cosmos-icon-event-details"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),o$8))})},a$6=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}
10render(){return h$2(T$2,{key:"67d425e1abb31fc33c8ff6a763831d381a6be490",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"b99c0f48a4ae1bcba5a2dec3bf424e85bbf37566",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"aac4efd17d45844d37e6da69fa2b4115e2502fa5","fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 11a9 9 0 1 0-10.406 8.89v-6.288H7.309V11h2.285V9.017c0-2.255 1.343-3.501 3.4-3.501.984 0 2.014.175 2.014.175v2.215h-1.135c-1.118 0-1.467.694-1.467 1.406V11h2.496l-.399 2.602h-2.097v6.289A9 9 0 0 0 20 11",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-facebook",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$v=function(){typeof customElements>"u"||["cosmos-icon-facebook"].forEach(c=>{"cosmos-icon-facebook"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),a$6))})},i$1=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"7a523b7c1a3be70a3797c0ac40fda5a637f16503",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"446371c5447bd322459138892059722c545a9905",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"674caed8e2ecd759d3ff9854eb0177a78997cb4b","fill-rule":"evenodd","clip-rule":"evenodd",d:"M14 6.472H9.372a5.11 5.11 0 0 0-5.162 4.817 4.85 4.85 0 0 0 1.362 3.565 5 5 0 0 0 2.841 1.493.51.51 0 0 0 .587-.5v-.532a.51.51 0 0 0-.425-.493c-.73-.137-1.4-.49-1.926-1.015a3.32 3.32 0 0 1-.939-2.473 3.6 3.6 0 0 1 3.662-3.358H14v2.3a.5.5 0 0 0 .854.352l3.032-3.052a.5.5 0 0 0 0-.706l-3.033-3.024A.5.5 0 0 0 14 4.2zm.149 10.478v-.621a.23.23 0 0 0-.239-.239h-.46v-2.87a.23.23 0 0 0-.24-.24h-.61a1 1 0 0 0-.23.03l-1.05.33a.234.234 0 0 0-.16.29l.14.53a.235.235 0 0 0 .32.17l.64-.2v1.96h-.66a.23.23 0 0 0-.24.24v.62a.23.23 0 0 0 .24.24h2.309a.23.23 0 0 0 .24-.24m.451-1.25v-1.233a1.506 1.506 0 0 1 1.63-1.567 1.505 1.505 0 0 1 1.621 1.571V15.7a1.5 1.5 0 0 1-1.621 1.57 1.506 1.506 0 0 1-1.63-1.57m2.051-1.208v1.184l.004-.001c0 .349-.141.531-.429.531s-.431-.187-.431-.531v-1.183c0-.344.149-.532.431-.532s.425.182.425.532",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-forward-10",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$u=function(){typeof customElements>"u"||["cosmos-icon-forward-10"].forEach(c=>{"cosmos-icon-forward-10"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),i$1))})},o$7=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"ab4afbe20471078874c524d9cbd7781d242e52da",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"03bf2e495ed8004b791188054a44cb5237564758",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"c9e93d5ce2b40e4426b169a30202ff5d5ac5fdab","fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.5 5.5v3A.5.5 0 0 1 3 9h-.5a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 .5.5V5a.5.5 0 0 1-.5.5zm15 0h-5A.5.5 0 0 1 13 5v-.5a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5H19a.5.5 0 0 1-.5-.5zm0 8v3h-5a.5.5 0 0 0-.5.5v.5a.5.5 0 0 0 .5.5h6a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5H19a.5.5 0 0 0-.5.5m-15 3h5a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5h-6a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5H3a.5.5 0 0 1 .5.5z",fill:"
10currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-fullscreen",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$t=function(){typeof customElements>"u"||["cosmos-icon-fullscreen"].forEach(c=>{"cosmos-icon-fullscreen"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),o$7))})},o$6=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"47f14141fb8822f02497593e23e6f1debf71af24",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"24691450e4e915529746f7cde52562d1ea873e9a",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"2f9c61b922f4c38e20ed295a534299fd56f672fc","fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.5 4.5v3h-5A.5.5 0 0 0 2 8v.5a.5.5 0 0 0 .5.5h6a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5H8a.5.5 0 0 0-.5.5m0 10h-5A.5.5 0 0 1 2 14v-.5a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5H8a.5.5 0 0 1-.5-.5zm7 0v3a.5.5 0 0 1-.5.5h-.5a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5zm0-7h5a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5h-6a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5h.5a.5.5 0 0 1 .5.5z",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-fullscreen-exit",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$s=function(){typeof customElements>"u"||["cosmos-icon-fullscreen-exit"].forEach(c=>{"cosmos-icon-fullscreen-exit"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),o$6))})},r$8=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"932576f20135646345c4237b7b1805293b36817b",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"89fb7d9b2f4b56f00ea63d84247e019721f482a4",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"98b209ba3976ff6582b62bfb47321f155d3b3b35","fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.25 11.636C16.234 8.138 14.21 5.75 11 5.75s-5.234 2.388-5.25 5.886h.875c.483 0 .875.428.875.955v4.455c0 .526-.392.954-.875.954h-1.75C4.392 18 4 17.572 4 17.046v-5.41C4.016 7.436 7.146 4 11 4s6.984 3.436 7 7.636v5.41c0 .526-.392.954-.875.954h-1.75c-.483 0-.875-.428-.875-.954V12.59c0-.527.392-.955.875-.955z",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-headphones",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$r=function(){typeof customElements>"u"||["cosmos-icon-headphones"].forEach(c=>{"cosmos-icon-headphones"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),r$8))})},l$2=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"9458973a45d4b77c78f497325c9e12197c4599d4",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"daa8004a46edac8cd8ad6644b0fea5e91032cf65",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"09a19a1b5d04b28c733ea6b36dbdf8b5c6d30031","fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.496 3.434A4 4 0 0 1 17.29 4.78a4 4 0 0 1 .28 5.74l-2.62 2.63a3.43 3.43 0 0 1-2.44 1 4.42 4.42 0 0 1-2.77-1.06.5.5 0 0 1 0-.73l.37-.36a.48.48 0 0 1 .66 0 2.32 2.32 0 0 0 3.13.06l2.63-2.62a2.53 2.53 0 0 0-.3-3.59 2.53 2.53 0 0 0-3.59-.3l-.66.67a.52.52 0 0 1-.72 0l-.35-.36a.5.5 0 0 1 0-.71l.67-.66a4 4 0 0 1 2.916-1.056M7.72 17.11a2.13 2.13 0 0 0 1.65-.61l.65-.64a.49.49 0 0 1 .7 0l.36.35a.5.5 0 0 1 0 .71l-.64.64a3.68 3.68 0 0 1-2.62 1.05h-.16a4.45 4.45 0 0 1-2.94-1.34 4 4 0 0 1-.3-5.72l2.65-2.58a3.79 3.79 0 0 1 5.2.06.5.5 0 0 1 0 .73l-.36.36a.5.5 0 0 1-.67 0A2.34 2.34 0 0 0 8.11 10l-2.63 2.61a2.54 2.54 0 0 0 .3 3.6 3 3 0 0 0 1.94.9",fill:"
10currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-link",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$q=function(){typeof customElements>"u"||["cosmos-icon-link"].forEach(c=>{"cosmos-icon-link"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),l$2))})},a$5=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"c07ee3465d45038bb050e93ca6609f6ad423f610",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"d44509eea8b6d558762cc55aa69a7ad0afaf7712",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"c0f285f2c31489d91faa5e7263dacc267c9f6563","fill-rule":"evenodd","clip-rule":"evenodd",d:"M11 2a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9m0 1.5a7.5 7.5 0 1 1 0 15 7.5 7.5 0 0 1 0-15M7.5 11a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-live",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$p=function(){typeof customElements>"u"||["cosmos-icon-live"].forEach(c=>{"cosmos-icon-live"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),a$5))})},o$5=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"56244a070b97f15f8e782b2ec679c0567c867ef6",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"1dd1666d1fe956bfb7e3fac4f279bd48593a74d0",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"160b6f10828a9463849f6e30d54ad7f1636cbc76","fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.085 4.272a.5.5 0 0 0-.355.148l-.01-.04a9.14 9.14 0 0 0 .09 13.1.5.5 0 0 0 .71 0l.34-.35a.5.5 0 0 0 0-.71 7.66 7.66 0 0 1-.08-10.94.49.49 0 0 0 0-.7l-.34-.36a.5.5 0 0 0-.355-.148m11.84 0a.5.5 0 0 1 .355.148v-.04a9.14 9.14 0 0 1-.09 13.1.5.5 0 0 1-.71 0l-.34-.35a.5.5 0 0 1 0-.71 7.66 7.66 0 0 0 .08-10.94.49.49 0 0 1 0-.7l.35-.36a.5.5 0 0 1 .355-.148M14.42 7.69l-.34.37a.49.49 0 0 0 0 .67 3.14 3.14 0 0 1 .93 2.2 3.45 3.45 0 0 1-1 2.28.51.51 0 0 0 0 .68l.35.36a.5.5 0 0 0 .69 0 4.59 4.59 0 0 0 .09-6.61.5.5 0 0 0-.72.05M9.5 11a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0m1.25 3a.5.5 0 0 0-.5.5v5a.5.5 0 0 0 .5.5h.5a.5.5 0 0 0 .5-.5v-5a.5.5 0 0 0-.5-.5zM7.58 7.69l.35.37a.49.49 0 0 1 0 .67 3.17 3.17 0 0 0-.93 2.2 3.45 3.45 0 0 0 1 2.28.51.51 0 0 1 0 .68l-.35.36a.5.5 0 0 1-.69 0 4.6 4.6 0 0 1-.1-6.61.5.5 0 0 1 .72.05",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-live-broadcast",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$o=function(){typeof customElements>"u"||["cosmos-icon-live-broadcast"].forEach(c=>{"cosmos-icon-live-broadcast"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),o$5))})},a$4=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"f7f4223399af315764e63278a4beb29c7142907c",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"3cf422e0ea72b7c2751b063d3fa63ee7a189ee31",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"9d6268292bb6a6cde286193367a685786b89c861","fill-rule":"evenodd","clip-rule":"evenodd",d:"m13 9.94 6.65 6.65a.51.51 0 0 1 0 .71l-.35.35a.51.51 0 0 1-.71 0L4.32 3.38a.5.5 0 0 1 0-.7l.36-.36a.5.5 0 0 1 .7 0l5 5 1.79-1.61a.5.5 0 0 1 .83.37zM6.82 8.7l6 6a.46.46 0 0 1 .16.38v.78a.5.5 0 0 1-.83.37l-2.56-2.26H6.48a.5.5 0 0 1-.5-.5V9.05a.5.5 0 0 1 .5-.5.5.5 0 0 1 .34.15",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-mute",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$n=function(){typeof customElements>"u"||["cosmos-icon-mute"].forEach(c=>{"cosmos-icon-mute"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),a$4))})},a$3=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"f296b93ab24e95f25a91f54bdc682ab8f39988e2",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"32c75b1a5cb9096ba3967f9213583ceb881c4435",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"76cbc732f84d5b1cec54f28c99f7b421f0fe01ac","fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.253 5.193A7.47 7.47 0 0 1 11 3.5a7.51 7.51 0 0 1 7.5 7.5 7.47 7.47 0 0 1-1.693 4.747zm-1.06 1.06a7.5 7.5 0 0 0 10.554 10.554zM2 11a9 9 0 0 1 9-9 9.01 9.01 0 0 1 9 9 9 9 0 1 1-18 0",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-no-data",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$m=function(){typeof customElements>"u"||["cosmos-icon-no-data"].forEach(c=>{"cosmos-icon-no-data"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),a$3))})},o$4=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"2fc6484b014048f0ab68257e0e67486c01afeda9",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"6eecd84eded5a6e8f982a048b90a46680cbeb7b2",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"2cbc28c509b7136206ec1caeddaa81e4a5715ae1","fill-rule":"evenodd","clip-rule":"evenodd",d:"M5 4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1zm8 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1z",fill:"
10currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-pause",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$l=function(){typeof customElements>"u"||["cosmos-icon-pause"].forEach(c=>{"cosmos-icon-pause"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),o$4))})},r$7=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"609d0edbac4a2ab33366ae224f2cb15df0e19ec9",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"58e0e0411cb7b94bf6ac4b688b5922a361664c9b",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"4288b646dac131a415a4563ae20de52d6e6a9242","fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 4.5a.5.5 0 0 1 .5-.5h17a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-.5.5h-17a.5.5 0 0 1-.5-.5zm1.5 1h15v11h-15zM17 11h-6v4h6z",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-picture-in-picture",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$k=function(){typeof customElements>"u"||["cosmos-icon-picture-in-picture"].forEach(c=>{"cosmos-icon-picture-in-picture"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),r$7))})},c$5=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"bcbeb93aa283ef33d9bf27782e0661ef0cb328f0",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"a12da2cd4c7af6c5a651d0ba891e27ec6febd38c",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"76f29a653f992593e37e9fc6a014b71201e39d34","fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.002 2A9 9 0 0 0 7.72 19.38a8.7 8.7 0 0 1 0-2.588c.168-.698 1.057-4.5 1.057-4.5A3.3 3.3 0 0 1 8.54 11c0-1.249.73-2.182 1.63-2.182a1.124 1.124 0 0 1 1.124 1.26 18.7 18.7 0 0 1-.742 3.003 1.305 1.305 0 0 0 1.327 1.62c1.597 0 2.834-1.688 2.834-4.117a3.544 3.544 0 0 0-3.71-3.667 3.89 3.89 0 0 0-4.071 3.903 3.47 3.47 0 0 0 .697 2.047c.06.072.082.169.056.259-.067.292-.214.9-.247 1.024-.034.123-.124.202-.293.123a4.05 4.05 0 0 1-1.833-3.487c-.056-2.846 2.002-5.41 5.892-5.41a5.273 5.273 0 0 1 5.544 5.196c0 3.094-1.957 5.625-4.666 5.625a2.42 2.42 0 0 1-2.07-1.035s-.45 1.72-.55 2.148a10.3 10.3 0 0 1-1.125 2.351 9.1 9.1 0 0 0 2.665.338c4.968 0 8.996-4.03 8.996-9S15.97 2 11.002 2",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-pinterest",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$j=function(){typeof customElements>"u"||["cosmos-icon-pinterest"].forEach(c=>{"cosmos-icon-pinterest"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),c$5))})},a$2=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"8af218b960eee7047a8169e6fd7e5caf78373389",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"e143abee70ab07e16a8ac9fff0cfc24c01f5cdd8",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"58175ac180745aec10abde063ed2df20957eb490","fill-rule":"evenodd","clip-rule":"evenodd",d:"m7.22 17.44 10.38-5.905a.61.61 0 0 0 .283-.531.61.61 0 0 0-.282-.531L7.22 4.568a.43.43 0 0 0-.495.023.62.62 0 0 0-.225.52v11.81a.62.62 0 0 0 .239.492.43.43 0 0 0 .48.027",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-play",{ariaLabel:[513,"aria-label"]}]);function defineCustomElement$i(){typeof customElements>"u"||["cosmos-icon-play"].forEach(c=>{"cosmos-icon-play"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),a$2))})}let r$6=defineCustomElement$i,c$4=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"12db70af12c200fc792529517c4127f992dcf46b",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"a6cf3b470e19020d76153ca81d9aa4d95d7a65d4",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"139396dcc032054cc22294ec89c65fbf56e8b704","fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.991 5c3.554 0 6.471 1.846 8.806 5.285a1.36 1.36 0 0 1 0 1.43l-.013.02C17.54 15.133 14.564 17 10.991 17c-3.57 0-6.523-1.861-8.775-5.27a1.34 1.34 0 0 1 .007-1.471C4.53 
106.845 7.438 5 10.991 5m0 1.565c-2.943 0-5.37 1.514-7.383 4.436 1.965 2.91 4.426 4.434 7.383 4.434 2.962 0 5.442-1.53 7.403-4.433-2.028-2.925-4.462-4.437-7.403-4.437m0 1.565A2.866 2.866 0 0 1 13.854 11a2.866 2.866 0 0 1-2.863 2.87A2.866 2.866 0 0 1 8.128 11a2.866 2.866 0 0 1 2.863-2.87m0 1.566c-.719 0-1.301.584-1.301 1.304a1.302 1.302 0 1 0 2.603 0c0-.72-.583-1.304-1.302-1.304",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-preview",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$h=function(){typeof customElements>"u"||["cosmos-icon-preview"].forEach(c=>{"cosmos-icon-preview"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),c$4))})},c$3=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"d2ab309bdefb250ec8ac8c98207e46089bad9539",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"fea220c3f7aee6f43d5614d9dc80781a81f2bb54",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"681402145fbedd4829e0aa872a13810085237bbf","fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.54 2.002 19.36 2c.223 0 .304.023.385.067a.45.45 0 0 1 .19.189c.043.081.066.162.066.385v16.718c0 .223-.023.304-.067.385a.45.45 0 0 1-.189.19c-.081.043-.162.066-.385.066H2.641c-.223 0-.304-.023-.385-.067a.45.45 0 0 1-.19-.189.6.6 0 0 1-.064-.285L2 2.641c0-.223.023-.304.067-.385a.45.45 0 0 1 .189-.19.6.6 0 0 1 .285-.064M18.5 3.5h-15v15h15zm-8.356 11.501V12.16h1.092q.636 0 1.146-.18t.87-.51.552-.81.192-1.08q0-1.2-.732-1.89T11.236 7H8.44v8.001zm.972-4.233h-.972v-2.34h.972q.54 0 .84.306t.3.858q0 .54-.3.858t-.84.318",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-product-placement",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$g=function(){typeof customElements>"u"||["cosmos-icon-product-placement"].forEach(c=>{"cosmos-icon-product-placement"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),c$3))})},c$2=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"328465a5bfb8b2a0f6af77f19443ca9b8217daa2",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"9dcccfe5a2019a5cdc3a487c99f14126facdcace",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"29604a5c743d1372cc33b21b782743b28ccc71b9","fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.051 7.859a.5.5 0 0 0 .069-.593l-1.
10174-2.032A.5.5 0 0 0 16.4 5l-2.477.586a6.2 6.2 0 0 0-1.368-.786l-.732-2.439A.5.5 0 0 0 11.344 2H9a.5.5 0 0 0-.479.356L7.786 4.8a6.2 6.2 0 0 0-1.362.789L3.945 5a.5.5 0 0 0-.549.237L2.223 7.266a.5.5 0 0 0 .069.593l1.745 1.854a6.5 6.5 0 0 0 0 1.575l-1.745 1.853a.5.5 0 0 0-.069.593L3.4 15.766a.5.5 0 0 0 .544.234l1.671-.395A.5.5 0 0 0 6 15.122v-3.357a4.13 4.13 0 0 1 .332-3.674 4.382 4.382 0 0 1 8.182 1.465c.032.25.242.44.494.444h1.076a.5.5 0 0 0 .389-.186z",fill:"currentColor"}),h$2("path",{key:"f20433bee2078dc4616ca56488f1174a47ca9d0a","fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.5 12h-11a.5.5 0 0 0-.5.5v7a.5.5 0 0 0 .5.5h11a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.5-.5",fill:"#db0a40"}),h$2("path",{key:"f29fe297cfac61dddb647454c50f9b858171f691","fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.557 17.955a.264.264 0 0 1-.277.288h-.733a.264.264 0 0 1-.277-.288v-1.431h-1.232v1.431a.264.264 0 0 1-.277.288h-.732a.264.264 0 0 1-.278-.288V14.05a.265.265 0 0 1 .277-.288h.733a.265.265 0 0 1 .277.288v1.31h1.232v-1.31a.265.265 0 0 1 .277-.288h.733a.265.265 0 0 1 .277.288zm1.154.288h1.566a2.3 2.3 0 0 0 2.473-2.263 2.254 2.254 0 0 0-2.474-2.22H14.71a.265.265 0 0 0-.277.29v3.905a.264.264 0 0 0 .277.288m1.022-3.317h.544a1.01 1.01 0 0 1 1.12 1.054 1.038 1.038 0 0 1-1.12 1.098h-.544z",fill:"#fff"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-quality",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$f=function(){typeof customElements>"u"||["cosmos-icon-quality"].forEach(c=>{"cosmos-icon-quality"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),c$2))})},o$3=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"9759512276b2d2a8585d5fa6f03403598860ccc5",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"039588fa78c52ec27b2ed66bf5400110b86289b3",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"4dc3c8f1bbe41997c9a893ea5704371cb44067a9",d:"M20.62 11.442a2.033 2.033 0 0 0-2.036-2.035 2.05 2.05 0 0 0-1.418.567c-1.401-1-3.32-1.652-5.456-1.735l.935-4.371 3.036.65A1.453 1.453 0 1 0 17.132 3a1.45 1.45 0 0 0-1.3.818L12.445 3.1c-.1-.017-.2 0-.267.05a.33.33 0 0 0-.15.234l-1.035 4.872c-2.169.066-4.121.717-5.54 1.735a2.05 2.05 0 0 0-1.417-.567A2.033 2.033 0 0 0 3.2 13.31c-.033.2-.05.4-.05.617 0 3.137 3.654 5.69 8.159 5.69s8.159-2.536 8.159-5.69c0-.2-.017-.417-.05-.617a2.06 2.06 0 0 0 1.201-1.869M6.638 12.894a1.453 1.453 0 0 1 2.903 0c0 .8-.65 1.451-1.451 1.451-.801.017-1.452-.65-1.452-1.451m8.126 3.854c-1.001 1.001-2.903 1.068-3.454 1.068-.567 0-2.47-.083-3.454-1.068a.373.373 0 0 1 0-.534c.15-.15.384-.15.534 0 .634.634 1.969.851 2.92.851s2.303-.217 2.92-.85a.37.37 0 0 1 .534 0 .406.406 0 0 1 0 .533m-.267-2.386a1.453 1.453 0 0 1 0-2.903c.8 0 1.451.65 1.451 1.452 0 .784-.65 1.451-1.451 1.451",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-reddit",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$e=function(){typeof customElements>"u"||["cosmos-icon-reddit"].forEach(c=>{"cosmos-icon-reddit"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),o$3))})},o$2=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"8902e52df6656edb99dfbe6198db495965e86aa2",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"b5b55de6ab9c586fc484aacf5ff7b5c7882634ac",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"be8dbd30d1faa80fa30a2d778719d615ae89ae8d",d:"M10.993 18.6a6.504 6.504 0 0 1-6.487-6 .53.53 0 0 0-.52-.5h-.5a.477.477 0 0 0-.485.5 8.005 8.005 0 0 0 7.992 7.5c4.422 0 8.007-3.582 8.007-8s-3.585-8-8.007-8H8.674l-.003-2.196a.4.4 0 0 0-.68-.29l-3.004 3a.4.4 0 0 0 0 .56l3.003 3a.4.4 0 0 0 .69-.29L8.678 5.6h2.316a6.503 6.503 0 0 1 6.506 6.5c0 3.59-2.913 6.5-6.506 6.5",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-replay",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$d=function(){typeof customElements>"u"||["cosmos-icon-replay"].forEach(c=>{"cosmos-icon-replay"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),o$2))})},i=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"3c8dbc3b6d75328837f8c603adee6cf743ecc2d3",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"5f44a2150a55fa8aa4ffe4e2a53dd6706038041f",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"}
10,h$2("path",{key:"a8f4f4f5b344ddaefa743dedbfbe807b5746f78c","fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.51 5a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h11a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5zm.99 1.5h9v9h-9zm12.49 0a.5.5 0 0 0-.5.5v8a.5.5 0 0 0 .5.5h.5a.5.5 0 0 0 .5-.5V7a.5.5 0 0 0-.5-.5zM18.48 8a.5.5 0 0 1 .5-.5h.5a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-.5.5h-.5a.5.5 0 0 1-.5-.5zM6 13.32V8.68a.2.2 0 0 1 .31-.17l4.14 2.32a.21.21 0 0 1 0 .34L6.3 13.49a.2.2 0 0 1-.3-.17",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-season",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$c=function(){typeof customElements>"u"||["cosmos-icon-season"].forEach(c=>{"cosmos-icon-season"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),i))})},o$1=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"bec3aa54e91bb433f479f3fde2f1467611da6fb9",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"436d5165a4b73d1dbb8bec63d74b087d837d578f",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"8a814018bb23d656bf924d591c37ddb528e3bf5a","fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.782 10.942a7 7 0 0 0-.044-.733l1.64-1.765a.44.44 0 0 0 .063-.53L17.329 6.01a.43.43 0 0 0-.486-.212l-2.312.547a6 6 0 0 0-1.297-.697l-.688-2.294A.43.43 0 0 0 12.123 3H9.89a.44.44 0 0 0-.423.318l-.689 2.33q-.695.267-1.306.696L5.17 5.797a.44.44 0 0 0-.485.212L3.572 7.933a.45.45 0 0 0 .062.529l1.641 1.765a6 6 0 0 0 0 1.465l-1.641 1.764a.45.45 0 0 0-.062.53l1.112 1.923a.44.44 0 0 0 .485.212l2.303-.582c.403.288.842.523 1.306.697l.689 2.294a.44.44 0 0 0 .423.318h2.233a.43.43 0 0 0 .423-.318l.688-2.294a5.7 5.7 0 0 0 1.297-.697l2.33.547a.43.43 0 0 0 .485-.212l1.112-1.924a.44.44 0 0 0-.062-.529l-1.64-1.765a7 7 0 0 0 .026-.714m-5.78 4.147a4.147 4.147 0 1 1 0-8.295 4.147 4.147 0 0 1 0 8.295",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-settings",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$b=function(){typeof customElements>"u"||["cosmos-icon-settings"].forEach(c=>{"cosmos-icon-settings"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),o$1))})},c$1=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"ea6ea95dd45aad0c48c06bbf992122b2dd739202",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"183ef53b665a8c87f261ff58e3a37d6ec3bee34c",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"11d028cbb8ccc82ff14d53ec4a72c4935be6e48f","fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.324 9.979C13.423 8.256 8.637 8.097 5.868 8.938a.842.842 0 1 1-.489-1.611c3.18-.965 8.464-.779 11.804 1.204a.842.842 0 0 1-.86 1.448m-.095 2.552a.7.7 0 0 1-.965.23c-2.419-1.486-6.107-1.917-8.969-1.048a.703.703 0 0 1-.407-1.343c3.268-.992 7.332-.511 10.11 1.196a.7.7 0 0 1 .23.964m-1.101 2.45a.56.56 0 0 1-.772.187c-2.113-1.292-4.773-1.583-7.906-.868a.56.56 0 1 1-.25-1.093c3.428-.784 6.37-.447 8.741 1.003a.56.56 0 0 1 .187.771M11 2a9 9 0 1 0 0 18 9 9 0 0 0 0-18",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-spotify",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$a=function(){typeof customElements>"u"||["cosmos-icon-spotify"].forEach(c=>{"cosmos-icon-spotify"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),c$1))})},r$5=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"0b59bc76b43d5873f751c8597fdf95cfbe327596",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"c473d246b79109152ac739909314a68702d9f276",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"1ac447375c7531f80f6a2f009a8b660e7e9863eb","fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.5 6h-9a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h9a.5.5 0 0 0 .5-.5v-9a.5.5 0 0 0-.5-.5",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-stop",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$9=function(){typeof customElements>"u"||["cosmos-icon-stop"].forEach(c=>{"cosmos-icon-stop"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),r$5))})},o=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"54776ff34d3a84c67ce3f6f03cfb7b4f9c708d8c",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"770ed6d1af3e594b02886198ec8ce44fdb26efc7",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"c1b0ad361f6d535cb4253d4d4d24e34fc7bf2ef7","fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.5 3H20v11.5a.5.5 0 0 1-.5.5H13l-5.51 4.59a.3.3 0 0 1-.49-.23V15H2.5a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5m16 10.5v-9h-15v9H8a.5.5 0 0 1 .5.5v2.8l3.82-3.18a.47.47 0 0 1 .32-.12z",fill:"
10currentColor"}),h$2("path",{key:"599a5e3a6e81642609dbbf7a7ec67ea8829f7ea3",d:"M6 7.5a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 .5.5V8a.5.5 0 0 1-.5.5h-6A.5.5 0 0 1 6 8zm5 3a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5zm3-3a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5V8a.5.5 0 0 1-.5.5h-1A.5.5 0 0 1 14 8zm-8 3a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5h-3A.5.5 0 0 1 6 11z",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-subtitles",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$8=function(){typeof customElements>"u"||["cosmos-icon-subtitles"].forEach(c=>{"cosmos-icon-subtitles"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),o))})},a$1=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"035be94a827c083868f9d1308aa138a3d2563081",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"85b7473208dbdc8cdca4f77a48520272cdbb3341",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"4a7a224d33187519374cd48def663eb9c1f678da","fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.51 4.42a.52.52 0 0 1 .72 0v-.04a9.14 9.14 0 0 1-.09 13.1.5.5 0 0 1-.71 0l-.34-.35a.5.5 0 0 1 0-.71 7.66 7.66 0 0 0 .08-10.94.49.49 0 0 1 0-.7zm-5.34 1.29L7.62 8H4.5a.5.5 0 0 0-.5.5v5a.5.5 0 0 0 .5.5h3.11l2.56 2.26a.5.5 0 0 0 .83-.37V6.08a.5.5 0 0 0-.83-.37m3.2 1.98-.37.37a.49.49 0 0 0 0 .67 3.14 3.14 0 0 1 .93 2.2 3.42 3.42 0 0 1-1 2.28.51.51 0 0 0 0 .68l.35.36a.5.5 0 0 0 .69 0 4.59 4.59 0 0 0 .09-6.61.5.5 0 0 0-.69.05",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-volume",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$7=function(){typeof customElements>"u"||["cosmos-icon-volume"].forEach(c=>{"cosmos-icon-volume"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),a$1))})},l$1=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"b39e52d9511975f7ded349ed3bfde2fc3a3c1230",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"ce9d20620804eff1cac83cd2182a8477c54306e0",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"103f42d1d86484899fb8e9a8dc777488e2cd88d4","fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.17 5.71 7.62 8H4.5a.5.5 0 0 0-.5.5v5a.5.5 0 0 0 .5.5h3.11l2.56 2.26a.5.5 0 0 0 .83-.37V6.08a.5.5 0 0 0-.83-.37",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-volume-low",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$6=function(){typeof customElements>"u"||["cosmos-icon-volume-low"].forEach(c=>{"cosmos-icon-volume-low"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),l$1))})},c=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"35cfe05900bee03b1c129cd4f6a12e84a46d2fca",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"49380a8cff7e9f333919568e4878dbf341931bfb",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"0fc5043239fcc6440ca8888966210c5959e3b195","fill-rule":"evenodd","clip-rule":"evenodd",d:"m7.62 8 2.55-2.29a.5.5 0 0 1 .83.37v9.81a.5.5 0 0 1-.83.37L7.61 14H4.5a.5.5 0 0 1-.5-.5v-5a.5.5 0 0 1 .5-.5zm5.38.06.37-.37a.5.5 0 0 1 .69-.05 4.59 4.59 0 0 1-.09 6.61.5.5 0 0 1-.69 0l-.35-.36a.51.51 0 0 1 0-.68 3.42 3.42 0 0 0 1-2.28 3.14 3.14 0 0 0-.93-2.2.49.49 0 0 1 0-.67",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-volume-mid",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$5=function(){typeof customElements>"u"||["cosmos-icon-volume-mid"].forEach(u=>{"cosmos-icon-volume-mid"===u&&(customElements.get(transformTag(transformTag(u)))||customElements.define(transformTag(transformTag(u)),c))})},a=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"06cab218c17e22b6daf6ebae41324f3bfaac4972",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"78db19bfe776ff0d5fc8f2b62173a3a106723238",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"deec95ed4d652aecafb8ee49594d34ef62c4e3ab",d:"M12.317 9.775 18.144 3h-1.38l-5.06 5.883L7.66 3H3l6.112 8.896L3 19h1.381l5.344-6.212L13.993 19h4.661zm-1.892 2.199-.62-.886L4.88 4.04H7l3.977 5.688.62.886 5.168 7.393h-2.121z",fill:"
10currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-x",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$4=function(){typeof customElements>"u"||["cosmos-icon-x"].forEach(c=>{"cosmos-icon-x"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),a))})},r$4=defineCustomElement$U,s=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow(),this.kind="underlined",this.generateClassNames=bem("cosmos-link"),this.handleKeyDown=c=>{"Enter"!==c.key&&" "!==c.key||(c.preventDefault(),c.currentTarget.click())}}get hasText(){var c,u;return!!(null!=(u=null==(c=this.element)?void 0:c.textContent)&&u.trim())}render(){let c=!!this.href;return h$2(c?"a":"span",{key:"a6d27421e413947805155da73c443ca41ac707af","aria-label":this.linkAriaLabel,class:this.generateClassNames({kind:this.kind,"has-text":this.hasText}),href:c?this.href:void 0,hreflang:c?this.hreflang:void 0,onKeyDown:c?void 0:this.handleKeyDown,part:"base",rel:c?this.rel:void 0,role:c?void 0:"button",tabIndex:c?void 0:0,target:c?this.target:void 0},h$2("slot",{key:"0eb4437b7cbbc8896a8e4deb2e86c63c9d2a962e"}))}get element(){return this}static get style(){return'@-webkit-keyframes cosmos-link-dim-border{0%{-webkit-text-decoration-color:transparent;text-decoration-color:transparent}100%{-webkit-text-decoration-color:currentColor;text-decoration-color:currentColor}}@keyframes cosmos-link-dim-border{0%{-webkit-text-decoration-color:transparent;text-decoration-color:transparent}100%{-webkit-text-decoration-color:currentColor;text-decoration-color:currentColor}}.cosmos-link{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;outline:none;padding:0;color:inherit;font:inherit;font-variant-numeric:inherit;letter-spacing:inherit;position:relative;text-align:inherit;text-decoration:none}.cosmos-link:not(:focus):hover{-webkit-animation:none;animation:none;border-color:currentColor;-o-border-image:none;border-image:none}.cosmos-link:not(.cosmos-link--has-text):focus,.cosmos-link:not(.cosmos-link--has-text):focus:not(:focus-visible){outline:none}.cosmos-link:not(.cosmos-link--has-text):focus:not(:focus-visible)::before{content:none}.cosmos-link:not(.cosmos-link--has-text):focus::before{border-radius:calc(6px * 1.5);bottom:calc((4px + 0px) * -1);-webkit-box-shadow:inset 0 0 0 2px #1B6AEE, 0 0 0 2px #FFFFFF;box-shadow:inset 0 0 0 2px #1B6AEE, 0 0 0 2px #FFFFFF;left:calc((4px + 0px) * -1);position:absolute;right:calc((4px + 0px) * -1);top:calc((4px + 0px) * -1);content:""}.cosmos-link:not(.cosmos-link--has-text){display:inline-block}.cosmos-link--has-text:focus-visible{border-radius:0.2em;-webkit-box-shadow:0 0 0 2px #fff, inset 0 0 0 2px #1B6AEE;box-shadow:0 0 0 2px #fff, inset 0 0 0 2px #1B6AEE;margin:-2px;padding:0 2px;text-decoration:none}.cosmos-link--kind-underlined{text-decoration:underline;text-decoration-thickness:0.105em;text-transform:inherit;text-underline-offset:0.125em}.cosmos-link--kind-underlined:not(:focus){-webkit-animation:1s cosmos-link-dim-border steps(2, start) infinite paused;animation:1s cosmos-link-dim-border steps(2, start) infinite paused}'}},[257,"cosmos-link",{href:[513],hreflang:[513],kind:[513],linkAriaLabel:[513,"link-aria-label"],rel:[513],target:[513]}]),defineCustomElement$3=function(){typeof customElements>"u"||["cosmos-link"].forEach(c=>{"cosmos-link"===c&&(customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),s))})},r$3=defineCustomElement$L,r$2=defineCustomElement$K,l=bem("cosmos-radio"),m=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow(),this.inputchangeEvent=createEvent(this,"inputchange",6),this.inputinvali
10dEvent=createEvent(this,"inputinvalid",7),this.checked=!1,this.disabled=!1,this.focusable=!0,this.hitArea="content",this.invalid=!1,this.required=!1,this.computedAppearance="dark",this.inputInvalid=!1,this.isHovered=!1,this.labelText="",this.tabIndex=0,this.radios=[],this.hoveredOn=()=>{this.isHovered=!0},this.hoveredOff=()=>{this.isHovered=!1},this.handleFormData=c=>{if(this.name&&this.input&&this.input.checked&&!this.disabled)return c.formData.append(this.input.name,this.input.value)},this.handleFormSubmit=c=>{this.reportValidity()||c.preventDefault()},this.handleInvalid=c=>{this.group&&c.preventDefault(),this.inputInvalid=!0,this.inputinvalidEvent.emit()},this.handleChange=()=>{var c;this.checked=null==(c=this.input)?void 0:c.checked},this.handleSlotChange=()=>{this.labelText=getDefaultSlotTextContent(this.defaultSlotRef)}}handleAppearanceChange(c){this.computedAppearance=c}handleFocusableChange(c){this.setTabindexFromFocusable(c)}handleInvalidChange(c){this.inputInvalid=c}handleCheckedChange(c,u){c&&c!==u&&this.inputchangeEvent.emit()}async inputCheckValidity(){return this.checkValidity()}async inputReportValidity(){return this.reportValidity()}async inputSetCustomValidity(c){var u;null==(u=this.input)||u.setCustomValidity(c)}async inputFocus(){var c;null==(c=this.input)||c.focus()}async inputBlur(){var c;null==(c=this.input)||c.blur()}deriveTextAppearance(){return"light"===this.computedAppearance?"light":"dark"}getTitle(){var c;return this.clamp?null==(c=this.element.textContent)?void 0:c.trim():void 0}checkValidity(){var c,u;let d=null==(c=this.radios)?void 0:c.some(c=>c.shadowRoot.querySelector('input[type="radio"]').checked);return!(null!=(u=this.radios)&&u.some(c=>c.required))||d}reportValidity(){let c=this.checkValidity();return!c&&this.input&&(this.input.required=!0,this.input.reportValidity()),c}getAllRadios(){return this.group?[...this.group.querySelectorAll(`${transformTag("cosmos-radio")}[name="${this.name}"]`)].filter(c=>!c.disabled):[this.element]}getRadioIndex(){return this.radios.findIndex(c=>c===this.element)}setTabindexFromFocusable(c=this.focusable){this.tabIndex=c?0:-1}connectedCallback(){this.form=this.element.closest("form"),this.group=this.element.closest(transformTag("cosmos-radio-group")),this.form&&(this.form.addEventListener("formdata",this.handleFormData,!0),this.form.addEventListener("submit",this.handleFormSubmit,!0))}componentWillLoad(){resolveAppearance({instance:this,modeToAppearanceMap:{dark:"light",light:"dark"},callback:this.handleAppearanceChange.bind(this)}),this.radios=this.getAllRadios(),this.radioIndex=this.getRadioIndex(),this.setTabindexFromFocusable()}componentDidLoad(){Kt.observe(this.element,this.handleSlotChange)}disconnectedCallback(){this.form&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit)),Kt.unobserve(this.element)}render(){return h$2("div",{key:"94c232980e357568adfc5ed116c227e6f426241f",class:l({appearance:this.computedAppearance,disabled:this.disabled,hovered:this.isHovered,invalid:this.invalid||this.inputInvalid}),part:"base"},h$2("div",{key:"3bdbf3cbb10f47f957f70dd3b52675fd7df787e0",class:l("input-and-prefix")},h$2("cosmos-text",{key:"745fbf4e3b79bf5cae19fd55bf1c90fde0011820","aria-hidden":"true",class:l("aligner"),size:"small",tag:"span"}),h$2("div",{key:"049cbd4a20118b7dfe0204f87509448553172ba3",class:l("input-container")},h$2("input",{key:"a6e83fbdc3aa950e50cf03305c85c53f14667386","aria-label":this.labelText,"aria-posinset":this.radioIndex+1,"aria-setsize":this.radios.length,autofocus:this.autofocus,checked:this.checked,class:l("input"),disabled:this.disabled,id:"radio",name:this.name,onInvalid:this.handleInvalid,ref:c=>this.input=c,required:this.required,tabIndex:this.tabIndex,type:"radio",value:this.value,onChange:this.handleChange,part:"radio"}),h$2("span",{key:"612aee643148b131ff0b0cf2784ad7d496ce5815",class:l("dot")})),h$2("label",{key:"0bae70a45049856766006297b1447db2d5a6d61d","aria-hidden":"true",htmlFor:"radio",class:l("prefix"),onMouseEnter:this.hoveredOn,onMouseLeave:this.hoveredOff,part:"prefix"},h$2("slot",{key:"b8f5c925be10fde983faf09c18d15c94f656952f",name:"prefix"}))),h$2("div",{key:"3270cd408b30ae25d57fc77bea68c6b24b8ef2f6",class:l("content",{row:"row"===this.hitArea})},h$2("label",{key:"e98d149a14d9e9c1fe65655cbcfdda00fc233b04",class:l("label"),htmlFor:"radio"},h$2("cosmos-text",{key:"a309cd2303c8b4ad69bc96b85b7ef0be1c74cc33",appearance:this.deriveTextAppearance(),class:l("label-text"),clamp:this.clamp,onMouseEnter:this.hoveredOn,onMouseLeave:this.hoveredOff,size:"small",tag:"span",title:this.getTitle(),exportparts:"base: label"},h$2("span",{key:"d92e08f10e6da2d7d187570af2c577c76b2a1344"},h$2("slot",{key:"e6bf9b2848cba04948f3e51b3d6fee9e0aff1c99",ref:c=>this.defaultSlotRef=c}))))))}
10get element(){return this}static get watchers(){return{appearance:[{handleAppearanceChange:0}],focusable:[{handleFocusableChange:0}],invalid:[{handleInvalidChange:0}],checked:[{handleCheckedChange:0}]}}static get style(){return'@charset "UTF-8";:host{display:block;min-width:0;width:100%}.cosmos-radio{-ms-flex-align:baseline;align-items:baseline;display:-ms-flexbox;display:flex}.cosmos-radio__input-and-prefix{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0}.cosmos-radio__aligner{--cosmos-text-font-family:var(--cosmos-radio-font-family);--cosmos-text-font-size:var(--cosmos-radio-font-size);--cosmos-text-font-style:var(--cosmos-radio-font-style);--cosmos-text-font-weight:var(--cosmos-radio-font-weight);--cosmos-text-letter-spacing:var(--cosmos-radio-letter-spacing);--cosmos-text-line-height:var(--cosmos-radio-line-height);--cosmos-text-text-transform:var(--cosmos-radio-text-transform);width:0}.cosmos-radio__aligner::before{content:" "}.cosmos-radio__input-container{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;height:var(--cosmos-radio-size, 16px);-ms-flex-pack:center;justify-content:center;-webkit-margin-end:var(--cosmos-radio-gap, calc(0.5 * var(--cosmos-radio-size, 16px)));margin-inline-end:var(--cosmos-radio-gap, calc(0.5 * var(--cosmos-radio-size, 16px)));position:relative;width:var(--cosmos-radio-size, 16px)}.cosmos-radio__prefix{display:grid}.cosmos-radio__prefix>[slot=prefix]{-webkit-margin-end:var(--cosmos-radio-gap, calc(0.375 * var(--cosmos-radio-size, 16px)));margin-inline-end:var(--cosmos-radio-gap, calc(0.375 * var(--cosmos-radio-size, 16px)))}.cosmos-radio__prefix ::slotted([slot=prefix]){--cosmos-icon-size:18px;--cosmos-flag-width:18px;--cosmos-avatar-size:18px;-webkit-margin-end:var(--cosmos-radio-gap, calc(0.375 * var(--cosmos-radio-size, 16px)));margin-inline-end:var(--cosmos-radio-gap, calc(0.375 * var(--cosmos-radio-size, 16px)));position:relative}.cosmos-radio__prefix ::slotted([slot=prefix])::before{content:"";display:block;height:100%;left:0;min-height:calc(var(--cosmos-radio-size, 16px) + calc(0.25 * var(--cosmos-radio-size, 16px)) * 2);position:absolute;right:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.cosmos-radio__input:focus,.cosmos-radio__input:focus:not(:focus-visible){outline:none}.cosmos-radio__input:focus:not(:focus-visible)::before{content:none}.cosmos-radio__input:focus::before{border-radius:calc(9999px * 1.5);bottom:calc((4px + 0px) * -1);-webkit-box-shadow:inset 0 0 0 2px #1B6AEE, 0 0 0 2px #FFFFFF;box-shadow:inset 0 0 0 2px #1B6AEE, 0 0 0 2px #FFFFFF;left:calc((4px + 0px) * -1);position:absolute;right:calc((4px + 0px) * -1);top:calc((4px + 0px) * -1);content:""}.cosmos-radio__input{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border-radius:9999px;border-style:solid;border-width:var(--cosmos-radio-border-width, 1px);-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;height:var(--cosmos-radio-size, 16px);-ms-flex-pack:center;justify-content:center;margin:0;outline:none;padding:0;width:var(--cosmos-radio-size, 16px)}.cosmos-radio__input::after{-webkit-box-sizing:content-box;box-sizing:content-box;content:"";display:block;height:calc(var(--cosmos-radio-size, 16px) + calc(0.25 * var(--cosmos-radio-size, 16px)) * 2);position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:calc(var(--cosmos-radio-size, 16px) + calc(0.25 * var(--cosmos-radio-size, 16px)) * 2);z-index:1}.cosmos-radio__input~.cosmos-radio__dot{border-radius:9999px;display:block;height:6px;left:0;margin:auto;opacity:0;position:absolute;right:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:6px}.cosmos-radio__input:checked~.cosmos-radio__dot{opacity:1}.cosmos-radio__content{min-width:0;position:relative}.cosmos-radio__content--row{width:100%}.cosmos-radio__content--row label{width:100%}.cosmos-radio__label{display:block;min-width:0;position:relative}.cosmos-radio__label::before{bottom:calc(calc(0.25 * var(--cosmos-radio-size, 16px)) * -1);content:"";left:0;position:absolute;right:0;top:calc(calc(0.25 * var(--cosmos-radio-size, 16px)) * -1)}.cosmos-radio__label-text{--cosmos-text-color:var(--cosmos-radio-color);--cosmos-text-font-family:var(--cosmos-radio-font-family);--cosmos-text-font-size:var(--cosmos-radio-font-size);--cosmos-text-font-style:var(--cosmos-radio-font-style);
10--cosmos-text-font-weight:var(--cosmos-radio-font-weight);--cosmos-text-letter-spacing:var(--cosmos-radio-letter-spacing);--cosmos-text-line-height:var(--cosmos-radio-line-height);--cosmos-text-text-transform:var(--cosmos-radio-text-transform);display:-ms-flexbox;display:flex;position:relative}.cosmos-radio--hovered .cosmos-radio__label-text{--cosmos-text-color:var(--cosmos-radio-color-hover)}.cosmos-radio--appearance-dark{color:var(--cosmos-radio-color, #000F1E)}.cosmos-radio--appearance-dark .cosmos-radio__input{background:var(--cosmos-radio-background-color, transparent);border-color:var(--cosmos-radio-border-color, rgba(0, 15, 30, 0.6))}.cosmos-radio--appearance-dark .cosmos-radio__input:checked{background:var(--cosmos-radio-background-color, #000F1E)}.cosmos-radio--appearance-dark .cosmos-radio__input:checked~.cosmos-radio__dot{background-color:var(--cosmos-radio-dot-color, #FFFFFF)}.cosmos-radio--appearance-dark .cosmos-radio__input-container:hover,.cosmos-radio--appearance-dark.cosmos-radio--hovered{color:var(--cosmos-radio-color-hover, #000F1E)}.cosmos-radio--appearance-dark .cosmos-radio__input-container:hover .cosmos-radio__input,.cosmos-radio--appearance-dark.cosmos-radio--hovered .cosmos-radio__input{background:var(--cosmos-radio-background-color-hover, rgba(0, 15, 30, 0.1))}.cosmos-radio--appearance-dark .cosmos-radio__input-container:hover .cosmos-radio__input:checked,.cosmos-radio--appearance-dark.cosmos-radio--hovered .cosmos-radio__input:checked{background:var(--cosmos-radio-background-color-hover, rgba(0, 15, 30, 0.8))}.cosmos-radio--appearance-dark:not(.cosmos-radio--invalid) .cosmos-radio__input:checked{border-color:transparent}.cosmos-radio--appearance-dark:not(.cosmos-radio--invalid) .cosmos-radio__input-container:hover .cosmos-radio__input,.cosmos-radio--appearance-dark:not(.cosmos-radio--invalid).cosmos-radio--hovered .cosmos-radio__input{border-color:var(--cosmos-radio-border-color-hover, rgba(0, 15, 30, 0.6))}.cosmos-radio--appearance-dark:not(.cosmos-radio--invalid) .cosmos-radio__input-container:hover .cosmos-radio__input:checked,.cosmos-radio--appearance-dark:not(.cosmos-radio--invalid).cosmos-radio--hovered .cosmos-radio__input:checked{border-color:var(--cosmos-radio-background-color-hover, rgba(0, 15, 30, 0.1))}.cosmos-radio--appearance-light{color:var(--cosmos-radio-color, #FFFFFF)}.cosmos-radio--appearance-light .cosmos-radio__input{background:var(--cosmos-radio-background-color, transparent);border-color:var(--cosmos-radio-border-color, rgba(255, 255, 255, 0.6))}.cosmos-radio--appearance-light .cosmos-radio__input:checked{background:var(--cosmos-radio-background-color, #FFFFFF)}.cosmos-radio--appearance-light .cosmos-radio__input:checked~.cosmos-radio__dot{background-color:var(--cosmos-radio-dot-color, #000F1E)}.cosmos-radio--appearance-light .cosmos-radio__input-container:hover,.cosmos-radio--appearance-light.cosmos-radio--hovered{color:var(--cosmos-radio-color-hover, #FFFFFF)}.cosmos-radio--appearance-light .cosmos-radio__input-container:hover .cosmos-radio__input,.cosmos-radio--appearance-light.cosmos-radio--hovered .cosmos-radio__input{background:var(--cosmos-radio-background-color-hover, rgba(255, 255, 255, 0.1))}.cosmos-radio--appearance-light .cosmos-radio__input-container:hover .cosmos-radio__input:checked,.cosmos-radio--appearance-light.cosmos-radio--hovered .cosmos-radio__input:checked{background:var(--cosmos-radio-background-color-hover, rgba(255, 255, 255, 0.8))}.cosmos-radio--appearance-light:not(.cosmos-radio--invalid) .cosmos-radio__input:checked{border-color:transparent}.cosmos-radio--appearance-light:not(.cosmos-radio--invalid) .cosmos-radio__input-container:hover .cosmos-radio__input,.cosmos-radio--appearance-light:not(.cosmos-radio--invalid).cosmos-radio--hovered .cosmos-radio__input{border-color:var(--cosmos-radio-border-color-hover, rgba(255, 255, 255, 0.6))}.cosmos-radio--appearance-light:not(.cosmos-radio--invalid) .cosmos-radio__input-container:hover .cosmos-radio__input:checked,.cosmos-radio--appearance-light:not(.cosmos-radio--invalid).cosmos-radio--hovered .cosmos-radio__input:checked{border-color:var(--cosmos-radio-background-color-hover, rgba(255, 255, 255, 0.1))}.cosmos-radio--disabled{pointer-events:none}.cosmos-radio--disabled .cosmos-radio__prefix{opacity:0.4}.cosmos-radio--disabled.cosmos-radio--appearance-dark .cosmos-radio__input{border-color:var(--cosmos-radio-border-color, rgba(0, 15, 30, 0.45))}.cosmos-radio--disabled.cosmos-radio--appearance-dark .cosmos-radio__input:checked{background:var(--cosmos-radio-background-color, rgba(0, 15, 30, 0.45))}.cosmos-radio--disabled.cosmos-radio--appearance-dark .cosmos-radio__label-text{--cosmos-text-color:var(--cosmos-radio-color, rgba(0, 15, 30, 0.45))}.cosmos-radio--disabled.cosmos-radio--appearance-light .cosmos-radio__input{border-color:var(--cosmos-radio-border-color, rgba(255, 255, 255, 0.45))}.cosmos-radio--disabled.cosmos-radio--appearance-light .cosmos-radio__input:checked{background:var(--cosmos-radio-background-color, rgba(255, 255, 255, 0.45))}.cosmos-radio--disabled.cosmos-radio--appearance-light .cosmos-radio__label-text{--cosmos-text-color:var(--cosmos-radio-color, rgba(255, 255, 255, 0.45))}.cosmos-radio--invalid .cosmos-radio__input{border-color:var(--cosmos-radio-invalid-color, #E06600);border-width:var(--cosmos-radio-border-width, 2px)}'}},[257,"cosmos-radio",{appearance:[513],autofocus:[516],checked:[516],clamp:[516],disabled:[516],focusable:[516],hitArea:[513,"hit-area"],invalid:[516],name:[513],required:[516],value:[513],computedAppearance:[32],inputInvalid:[32],isHovered:[32],labelText:[32],tabIndex:[32],inputCheckValidity:[64],inputReportValidity:[64],inputSetCustomValidity:[64],inputFocus:[64],inputBlur:[64]},void 0,{appearance:[{handleAppearanceChange:0}],focusable:[{handleFocusableChange:0}],invalid:[{handleInvalidChange:0}],checked:[{handleCheckedChange:0}]}]),defineCustomElement$2=function(){typeof customElements>"u"||["cosmos-radio","cosmos-text"].forEach(c=>{switch(c){case"cosmos-radio":customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),m);break;case"cosmos-text":customElements.get(transformTag(transformTag(c)))||defineCustomElement$V()}})},u=bem("cosmos-radio-group"),x$1=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow(),this.hideLabel=!1,this.invalid=!1,this.computedAppearance="dark",this.groupInvalid=!1,this.enabledRadios=[],this.isNavigatedWithKeyboard=!1,this.radios=[],this.getValidationMessage=()=>this.validationMessage?this.validationMessage:!this.invalid&&this.groupInvalid&&this.enabledRadios.length?this.enabledRadios[0].shadowRoot.querySelector('input[type="radio"]').validationMessage:void 0,this.reannounceValidationMessage=async()=>{this.validationMessageRef&&(this.validationMessageRef.ariaLabel="",await nextTick(),this.validationMessageRef.ariaLabel=this.getValidationMessage())}
10,this.handleSlotChange=()=>{this.initializeRadios(),forceUpdate(this)}}handleAppearanceChange(c){this.computedAppearance=c,this.updateRadiosAppearance()}handleInvalidChange(c){this.groupInvalid=c,this.updateRadiosInvalidState()}handleDisabledChange(c){void 0!==this.disabled&&this.radios.forEach(u=>{u.disabled=c})}async handleInputchange(c){let u=this.enabledRadios.findIndex(u=>u===c.target);await this.updateRadios(u),this.isInvalidStateControlled()}handleInputInvalid(){this.groupInvalid=!0,this.updateRadiosInvalidState(),this.reannounceValidationMessage()}async handleKeyDown(c){if(this.isNavigatedWithKeyboard="Tab"!==c.key,["ArrowUp","ArrowLeft","ArrowRight","ArrowDown"].includes(c.key)){[this.radios,this.enabledRadios]=this.getRadios(),c.preventDefault();let u=this.enabledRadios.findIndex(c=>c.checked);-1==u&&(u=0),["ArrowUp","ArrowLeft"].includes(c.key)?--u<0&&(u=this.enabledRadios.length-1):++u>=this.enabledRadios.length&&(u=0),await this.updateRadios(u)}}isInvalidStateControlled(){this.invalid||(this.groupInvalid=!1,this.updateRadiosInvalidState())}getRadios(){let c=[...this.element.querySelectorAll(transformTag("cosmos-radio"))],u=c.filter(c=>!c.disabled);return[c,u]}updateRadiosAppearance(){this.radios.forEach(c=>{c.appearance=this.computedAppearance})}async updateRadios(c){if(this.enabledRadios.length)if(this.enabledRadios.forEach((u,d)=>{c!==d&&(u.checked=!1),u.invalid=this.groupInvalid,u.focusable=!1}),void 0!==c&&-1!==c&&this.enabledRadios[c]){let u=this.enabledRadios[c];u.checked=!0,u.focusable=!0,this.isNavigatedWithKeyboard&&await u.inputFocus()}else this.enabledRadios[0].focusable=!0}updateRadiosInvalidState(){this.radios.forEach(c=>{c.invalid=this.groupInvalid})}updateRadiosDisabledState(){void 0!==this.disabled&&this.radios.forEach(c=>{c.disabled=this.disabled})}initializeRadios(){[this.radios,this.enabledRadios]=this.getRadios(),this.updateRadiosDisabledState(),this.updateRadiosInvalidState(),this.updateRadiosAppearance();let c=this.enabledRadios.findIndex(c=>c.checked);this.updateRadios(c)}componentWillLoad(){this.groupInvalid=this.invalid,resolveAppearance({instance:this,modeToAppearanceMap:{dark:"light",light:"dark"},callback:this.handleAppearanceChange.bind(this)}),Kt.observe(this.element,this.handleSlotChange)}disconnectedCallback(){Kt.unobserve(this.element)}render(){return h$2(FormField,{key:"511d64cfd542a08212de2178979ec9e792957c5b",element:this.element,appearance:this.computedAppearance,class:u(),helpText:this.helpText,hideLabel:this.hideLabel,invalid:this.groupInvalid,label:this.label,optionalLabel:this.optionalLabel,requiredLabel:this.requiredLabel,validationMessage:this.getValidationMessage(),validationMessageRef:c=>this.validationMessageRef=c,disabled:this.disabled,required:!!this.requiredLabel},h$2("div",{key:"97cc918034fe0df221843a36551309dbd3143f64","aria-disabled":getAriaDisabled(this.disabled),"aria-invalid":getAriaInvalid(this.groupInvalid),"aria-labelledby":"label "+getAriaDescribedBy(this.groupInvalid),"aria-required":getAriaRequired(!!this.requiredLabel),class:u("list"),role:"radiogroup"},h$2("slot",{key:"3868c80debf709a9f093a67d17c981dc2a2829fb"})))}get element(){return this}static get watchers(){return{appearance:[{handleAppearanceChange:0}],invalid:[{handleInvalidChange:0}],disabled:[{handleDisabledChange:0}]}}static get style(){return'@charset "UTF-8";.cosmos-form-field{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.cosmos-form-field__info-container{display:inline-block;margin-bottom:8px}.cosmos-form-field__info-container:not(.cosmos-form-field__info-container--has-label,.cosmos-form-field__info-container--has-help-text,.cosmos-form-field__info-container--has-required-optional-label){display:none}.cosmos-form-field__info-container--hide-label{clip:rect(0, 0, 0, 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;margin-bottom:0}.cosmos-form-field__label-text,.cosmos-form-field__help-text,.cosmos-form-field__required-optional-label,.cosmos-form-field__validation-message{display:inline}.cosmos-form-field__label-text{--cosmos-text-color:var(--cosmos-radio-group-label-color);--cosmos-text-font-family:var(--cosmos-radio-group-label-font-family);--cosmos-text-font-size:var(--cosmos-radio-group-label-font-size);--cosmos-text-font-style:var(--cosmos-radio-group-label-font-style);
10--cosmos-text-font-weight:var(--cosmos-radio-group-label-font-weight);--cosmos-text-letter-spacing:var(--cosmos-radio-group-label-letter-spacing);--cosmos-text-line-height:var(--cosmos-radio-group-label-line-height);--cosmos-text-text-transform:var(--cosmos-radio-group-label-text-transform)}.cosmos-form-field__help-text{--cosmos-text-color:var(--cosmos-radio-group-help-text-color);--cosmos-text-font-family:var(--cosmos-radio-group-help-text-font-family);--cosmos-text-font-size:var(--cosmos-radio-group-help-text-font-size);--cosmos-text-font-style:var(--cosmos-radio-group-help-text-font-style);--cosmos-text-font-weight:var(--cosmos-radio-group-help-text-font-weight);--cosmos-text-letter-spacing:var(--cosmos-radio-group-help-text-letter-spacing);--cosmos-text-line-height:var(--cosmos-radio-group-help-text-line-height);--cosmos-text-text-transform:var(--cosmos-radio-group-help-text-text-transform)}.cosmos-form-field__required-optional-label{--cosmos-text-color:var(--cosmos-radio-group-required-optional-label-color);--cosmos-text-font-family:var(--cosmos-radio-group-required-optional-label-font-family);--cosmos-text-font-size:var(--cosmos-radio-group-required-optional-label-font-size);--cosmos-text-font-style:var(--cosmos-radio-group-required-optional-label-font-style);--cosmos-text-font-weight:var(--cosmos-radio-group-required-optional-label-font-weight);--cosmos-text-letter-spacing:var(--cosmos-radio-group-required-optional-label-letter-spacing);--cosmos-text-line-height:var(--cosmos-radio-group-required-optional-label-line-height);--cosmos-text-text-transform:var(--cosmos-radio-group-required-optional-label-text-transform);display:inline-block;-webkit-margin-start:4px;margin-inline-start:4px;white-space:nowrap}.cosmos-form-field__validation-message{display:-ms-flexbox;display:flex;gap:4px;margin-top:8px}.cosmos-form-field__validation-message-text{--cosmos-text-font-family:var(--cosmos-radio-group-validation-message-font-family);--cosmos-text-font-size:var(--cosmos-radio-group-validation-message-font-size);--cosmos-text-font-style:var(--cosmos-radio-group-validation-message-font-style);--cosmos-text-font-weight:var(--cosmos-radio-group-validation-message-font-weight);--cosmos-text-letter-spacing:var(--cosmos-radio-group-validation-message-letter-spacing);--cosmos-text-line-height:var(--cosmos-radio-group-validation-message-line-height);--cosmos-text-text-transform:var(--cosmos-radio-group-validation-message-text-transform)}.cosmos-form-field__validation-message-icon{--cosmos-icon-color:var(--cosmos-radio-group-invalid-color, #E06600);--cosmos-icon-size:calc(16rem / var(--cosmos-base-font-size, 16));-ms-flex-negative:0;flex-shrink:0;padding:1.5px 0}.cosmos-form-field--invalid .cosmos-form-field__label-text,.cosmos-form-field--invalid .cosmos-form-field__validation-message{--cosmos-text-color:var(--cosmos-radio-group-label-color)}.cosmos-form-field--disabled.cosmos-form-field--appearance-dark .cosmos-form-field__label-text{--cosmos-text-color:var(--cosmos-radio-group-label-color, rgba(0, 15, 30, 0.45))}.cosmos-form-field--disabled.cosmos-form-field--appearance-dark .cosmos-form-field__help-text{--cosmos-text-color:var(--cosmos-radio-group-help-text-color, rgba(0, 15, 30, 0.45))}.cosmos-form-field--disabled.cosmos-form-field--appearance-dark .cosmos-form-field__required-optional-label{--cosmos-text-color:var(--cosmos-radio-group-required-optional-label-color, rgba(0, 15, 30, 0.45))}.cosmos-form-field--disabled.cosmos-form-field--appearance-light .cosmos-form-field__label-text{--cosmos-text-color:var(--cosmos-radio-group-label-color, rgba(255, 255, 255, 0.45))}.cosmos-form-field--disabled.cosmos-form-field--appearance-light .cosmos-form-field__help-text{--cosmos-text-color:var(--cosmos-radio-group-help-text-color, rgba(255, 255, 255, 0.45))}.cosmos-form-field--disabled.cosmos-form-field--appearance-light .cosmos-form-field__required-optional-label{--cosmos-text-color:var(--cosmos-radio-group-required-optional-label-color, rgba(0, 15, 30, 0.45))}.cosmos-radio-group__list{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:12px}'}},[257,"cosmos-radio-group",{appearance:[513],disabled:[516],helpText:[513,"help-text"],hideLabel:[516,"hide-label"],invalid:[516],label:[513],optionalLabel:[513,"optional-label"],requiredLabel:[513,"required-label"],validationMessage:[513,"validation-message"],computedAppearance:[32],groupInvalid:[32]}
10,[[0,"inputchange","handleInputchange"],[0,"inputinvalid","handleInputInvalid"],[0,"keydown","handleKeyDown"]],{appearance:[{handleAppearanceChange:0}],invalid:[{handleInvalidChange:0}],disabled:[{handleDisabledChange:0}]}]),defineCustomElement$1=function(){typeof customElements>"u"||["cosmos-radio-group","cosmos-icon-warning","cosmos-text"].forEach(c=>{switch(c){case"cosmos-radio-group":customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),x$1);break;case"cosmos-icon-warning":customElements.get(transformTag(transformTag(c)))||defineCustomElement$N();break;case"cosmos-text":customElements.get(transformTag(transformTag(c)))||defineCustomElement$V()}})},p=defineCustomElement$S,r$1=defineCustomElement$V,r=defineCustomElement$J;class g{constructor(){this.emitter=new Jt,this.placementMap={left:"before",right:"after",bottom:"below",top:"above"},this.cssTransition=new i$6}create({target:c,content:u,appendTo:d,interactive:p,placement:h,showOnCreate:f,follow:m,sticky:v,offset:y=8,enterDuration:b=300,leaveDuration:S=300,trigger:_}){this.target=c,this.leaveDuration=S,this.enterDuration=b,this.element=u,this.element.style.display="block",u.remove(),this.tooltipInstance=tippy(this.target,{appendTo:d,hideOnClick:!1,interactive:p,offset:[0,y],placement:this.cosmosToPopperPlacement(h),showOnCreate:f||!1,touch:!1,delay:[null,this.leaveDuration],trigger:_||void 0,sticky:v,plugins:[F,N],onMount:({popperInstance:c,popper:u})=>{var d;let p=m?"follow":null==c?void 0:c.state.placement;null==(d=u.firstElementChild)||d.setAttribute("data-cosmos-tooltip-placement",this.popperToCosmosPlacement(p)),this.cssTransition.enter(u.firstElementChild,this.enterDuration)},onShow:()=>{this.onShowHandler()},onUntrigger:async()=>{await this.onHideHandler()},render:()=>({popper:this.element})}),m&&requestAnimationFrame(()=>{var c;this.tooltipInstance&&"function"==typeof this.tooltipInstance.setProps&&(null==(c=this.tooltipInstance)||c.setProps({followCursor:this.getTippyFollowDirection(h)}))})}on(c,u){this.emitter.on(c,u)}off(c,u){this.emitter.off(c,u)}show(){var c,u,d;null!=(c=this.tooltipInstance)&&c.unmount&&(null==(u=this.tooltipInstance)||u.unmount()),null==(d=this.tooltipInstance)||d.show()}async hide(){await this.onHideHandler(),this.tooltipInstance.hide()}async update(){var c;this.isVisible()&&(await nextTick(),await (null==(c=this.tooltipInstance.popperInstance)?void 0:c.update()))}isVisible(){return this.tooltipInstance.state.isVisible}setProps(c){var u;null==(u=this.tooltipInstance)||u.setProps(c)}destroy(){this.tooltipInstance.destroy()}popperToCosmosPlacement(c){return this.placementMap[c]}cosmosToPopperPlacement(c){return Object.keys(this.placementMap).find(u=>this.placementMap[u]===c)||"top"}getTippyFollowDirection(c){return"above"===c||"below"===c?"horizontal":"vertical"}onShowHandler(){this.emitter.emit("show"),this.target.setAttribute("aria-expanded","true")}onHideHandler(){return this.emitter.emit("hide"),this.triggerCssLeaveTransition()}triggerCssLeaveTransition(){return this.cssTransition.leave(this.element.firstElementChild,this.leaveDuration)}}let w=bem("cosmos-tooltip"),x=proxyCustomElement(class extends b$3{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow(),this.hideEvent=createEvent(this,"hide",7),this.showEvent=createEvent(this,"show",7),this.content="",this.controlled=!1,this.follow=!1,this.offset=8,this.placement="above",this.spacing="tight",this.unreachable=!1,this.visible=!1,this.computedAppearance="light",this.hasContent=!1,this.tippyElement=void 0,this.tippyMount=void 0,this.tooltipInstance=void 0,this.onDefaultSlotChange=()=>{this.tooltipInstance&&!this.getTooltipTarget?(this.tooltipInstance.destroy(),this.tooltipInstance=void 0):(this.instantiateTooltip(),this.createTooltip())},this.showHandler=()=>{this.showEvent.emit()},this.hideHandler=()=>{this.hideEvent.emit()}}handleAppearanceChange(c){this.computedAppearance=c}handleShowChange(){var c,u,d,p;null==(c=this.tooltipInstance)||c.setProps({touch:!0}),this.visible?null==(u=this.tooltipInstance)||u.show():null==(d=this.tooltipInstance)||d.hide(),null==(p=this.tooltipInstance)||p.setProps({touch:!1})}async handleContentChange(){await this.update()}
10async update(){var c;this.tooltipInstance&&await (null==(c=this.tooltipInstance)?void 0:c.update())}createObserver(){let c=this.element.querySelector('[slot="content"]');if(!c||typeof MutationObserver>"u")return;let u=new MutationObserver(c=>{c.forEach(c=>{"childList"===c.type&&this.update()})});u.observe(c,{childList:!0,subtree:!0}),this.observer=u}instantiateTooltip(){!isNodeEnvironment()&&this.getTooltipTarget()&&(this.tooltipInstance=new g)}createTooltip(){var c;this.tooltipInstance&&(this.tooltipOptions={target:this.getTooltipTarget(),appendTo:this.tippyMount,showOnCreate:this.visible,placement:this.placement||"above",content:this.tippyElement,follow:this.normalizedFollowValue,sticky:"target"===this.follow,interactive:!this.unreachable,offset:this.offset,enterDuration:150,leaveDuration:150,trigger:this.controlled?"manual":void 0},null==(c=this.tooltipInstance)||c.create(this.tooltipOptions),this.addTooltipListeners())}addTooltipListeners(){var c,u;this.tooltipInstance&&(null==(c=this.tooltipInstance)||c.on("show",this.showHandler),null==(u=this.tooltipInstance)||u.on("hide",this.hideHandler))}removeTooltipListeners(){var c,u;this.tooltipInstance&&(null==(c=this.tooltipInstance)||c.off("show",this.showHandler),null==(u=this.tooltipInstance)||u.off("hide",this.hideHandler))}getTooltipTarget(){return Array.from(this.element.children).find(c=>"style"!==c.tagName.toLowerCase()&&"content"!==c.getAttribute("slot"))}getContent(){return this.content&&h$2("cosmos-text",{size:"x-small",weight:"medium",exportparts:"base: text"},this.content)}determineIfTooltipHasContent(){let c=hasNamedSlot(this.element,"content");this.hasContent=null!=this.content&&""!==this.content||c}normalizeFollowValue(){return["true","","cursor"].includes((this.follow+"").toLowerCase().trim())}componentWillLoad(){this.instantiateTooltip(),resolveAppearance({instance:this,modeToAppearanceMap:{dark:"dark",light:"light"},callback:this.handleAppearanceChange.bind(this)})}componentDidLoad(){this.createTooltip(),this.createObserver()}componentWillRender(){this.normalizedFollowValue=this.normalizeFollowValue(),this.determineIfTooltipHasContent()}disconnectedCallback(){var c,u;this.removeTooltipListeners(),null==(c=this.tooltipInstance)||c.destroy(),null==(u=this.observer)||u.disconnect()}render(){return h$2(T$2,{key:"2185dec6e19156b26ccdef1ae0f2785ffd426670"},h$2("div",{key:"c1204a4037bd018e9845398de6b15aa1cc8eeec7",class:"tippy-mount",ref:c=>this.tippyMount=c}),h$2("div",{key:"e49dc03f4bad2e793e9d65a41c519b647fb0159f",class:"tippy-element",ref:c=>this.tippyElement=c},h$2("div",{key:"c64c04627c04c1fdfc1b9e9ce3d7ebc894abc80e",class:w({spacing:this.spacing,appearance:this.computedAppearance,unreachable:this.unreachable,empty:!this.hasContent}),part:"base"},h$2("cosmos-mode",{key:"5c631fda33db318ba0e1e4bacf801a35f59168ba",mode:this.computedAppearance},h$2("span",{key:"0cf09d8dab42fdbe55927b1c0426e671b19f0e49"},h$2("slot",{key:"8275fc6495b6d819728dbdcf24f0f5aa79b9d81a",name:"content",onSlotchange:()=>this.determineIfTooltipHasContent()},this.getContent()))))),h$2("slot",{key:"1c8d2a7cab4e15aac7fab2700480d099d1c95d83",onSlotchange:this.onDefaultSlotChange}))}get element(){return this}static get watchers(){return{appearance:[{handleAppearanceChange:0}],visible:[{handleShowChange:0}],content:[{handleContentChange:0}]}}static get style(){return'@charset "UTF-8";@supports (font-variation-settings: normal){::slotted(strong),::slotted(b){font-variation-settings:"opsz" 12, "wght" 700}}:host{display:contents}.tippy-mount{display:inline-block;height:0;width:0}.tippy-element{display:none;z-index:var(--cosmos-tooltip-z-index, 9999) !important}.cosmos-tooltip{--cosmos-text-color:var(--cosmos-tooltip-color);--cosmos-text-font-family:var(--cosmos-tooltip-font-family);--cosmos-text-font-size:var(--cosmos-tooltip-font-size);--cosmos-text-font-style:var(--cosmos-tooltip-font-style);--cosmos-text-font-weight:var(--cosmos-tooltip-font-weight);--cosmos-text-letter-spacing:var(--cosmos-tooltip-letter-spacing);--cosmos-text-line-height:var(--cosmos-tooltip-line-height);--cosmos-text-text-transform:var(--cosmos-tooltip-text-transform);background-color:var(--cosmos-tooltip-background, #FFFFFF);border-color:var(--cosmos-tooltip-border-color, transparent);border-radius:var(--cosmos-tooltip-border-radius, 6px);border-style:solid;border-width:var(--cosmos-tooltip-border-width, 0);
10-webkit-box-shadow:var(--cosmos-tooltip-box-shadow, 0px 16px 24px 0px rgba(0, 15, 30, 0.0588235294), 0px 4px 8px 0px rgba(0, 15, 30, 0.0196078431));box-shadow:var(--cosmos-tooltip-box-shadow, 0px 16px 24px 0px rgba(0, 15, 30, 0.0588235294), 0px 4px 8px 0px rgba(0, 15, 30, 0.0196078431));max-width:calc(288rem / var(--cosmos-base-font-size, 16));padding:var(--cosmos-tooltip-padding, 4px 8px)}.cosmos-tooltip--spacing-loose{padding:var(--cosmos-tooltip-padding, 8px 12px)}.cosmos-tooltip--appearance-dark{background-color:var(--cosmos-tooltip-background, #00162B)}.cosmos-tooltip.enter{opacity:0}.cosmos-tooltip[data-cosmos-tooltip-placement=above].enter{-webkit-transform:translate(0, 8px);transform:translate(0, 8px)}.cosmos-tooltip[data-cosmos-tooltip-placement=below].enter{-webkit-transform:translate(0, -8px);transform:translate(0, -8px)}.cosmos-tooltip[data-cosmos-tooltip-placement=before].enter{-webkit-transform:translate(8px, 0);transform:translate(8px, 0)}.cosmos-tooltip[data-cosmos-tooltip-placement=after].enter{-webkit-transform:translate(-8px, 0);transform:translate(-8px, 0)}.cosmos-tooltip[data-cosmos-tooltip-placement].enter-active{opacity:1;-webkit-transform:translate(0, 0);transform:translate(0, 0);-webkit-transition:0.15s cubic-bezier(0.33, 1, 0.68, 1);transition:0.15s cubic-bezier(0.33, 1, 0.68, 1)}.cosmos-tooltip.leave{opacity:1}.cosmos-tooltip.leave-active{opacity:0;-webkit-transition:0.15s cubic-bezier(0, 0.32, 0.32, 1);transition:0.15s cubic-bezier(0, 0.32, 0.32, 1)}.cosmos-tooltip--empty{display:none}'}},[257,"cosmos-tooltip",{appearance:[513],content:[513],controlled:[516],follow:[520],offset:[514],placement:[513],spacing:[513],unreachable:[516],visible:[516],computedAppearance:[32],hasContent:[32],update:[64]},void 0,{appearance:[{handleAppearanceChange:0}],visible:[{handleShowChange:0}],content:[{handleContentChange:0}]}]),defineCustomElement=function(){typeof customElements>"u"||["cosmos-tooltip","cosmos-mode","cosmos-text"].forEach(c=>{switch(c){case"cosmos-tooltip":customElements.get(transformTag(transformTag(c)))||customElements.define(transformTag(transformTag(c)),x);break;case"cosmos-mode":customElements.get(transformTag(transformTag(c)))||defineCustomElement$K();break;case"cosmos-text":customElements.get(transformTag(transformTag(c)))||defineCustomElement$V()}})},CosmosBadge=createPreactComponent({tagName:"cosmos-badge-14-2-1",defaultProps:{kind:"primary",shape:"pill",size:"medium"},defineCustomElement:r$f}),CosmosButton=createPreactComponent({tagName:"cosmos-button-14-2-1",defaultProps:{busy:!1,decorative:!1,disabled:!1,hovered:!1,href:void 0,iconPlacement:"before",kind:"primary",size:"medium",type:"button",width:"content"},defineCustomElement:p$3}),CosmosCheckbox=createPreactComponent({tagName:"cosmos-checkbox-14-2-1",defaultProps:{checked:!1,hitArea:"content",invalid:!1,required:!1},defineCustomElement:r$c}),CosmosIconAirplay=createPreactComponent({tagName:"cosmos-icon-airplay-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$H}),CosmosIconApplePodcasts=createPreactComponent({tagName:"cosmos-icon-apple-podcasts-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$G}),CosmosIconAudioSettings=createPreactComponent({tagName:"cosmos-icon-audio-settings-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$F}),CosmosIconBack10=createPreactComponent({tagName:"cosmos-icon-back-10-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$E}),CosmosIconBrowse=createPreactComponent({tagName:"cosmos-icon-browse-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$D}),CosmosIconChevronDown=createPreactComponent({tagName:"cosmos-icon-chevron-down-14-2-1",defaultProps:{},defineCustomElement:p$2}),CosmosIconChevronLeft=createPreactComponent({tagName:"cosmos-icon-chevron-left-14-2-1",defaultProps:{},defineCustomElement:m$1}),CosmosIconChevronRight=createPreactComponent({tagName:"cosmos-icon-chevron-right-14-2-1",defaultProps:{},defineCustomElement:r$b}),CosmosIconChromecast=createPreactComponent({tagName:"cosmos-icon-chromecast-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$C}),CosmosIconChromecastFilled=createPreactComponent({tagName:"cosmos-icon-chromecast-filled-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$B}),CosmosIconClock=createPreactComponent({tagName:"cosmos-icon-clock-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$A}),CosmosIconClose=createPreactComponent({tagName:"cosmos-icon-close-14-2-1",defaultProps:{},defineCustomElement:r$a}),CosmosIconCloseSmall=createPreactComponent({tagName:"cosmos-icon-close-small-14-2-1",defaultProps:{},defineCustomElement:p$1}),CosmosIconCodeBlock=createPreactComponent({tagName:"cosmos-icon-code-block-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$y}),CosmosIconErrorFilled=createPreactComponent({tagName:"cosmos-icon-error-filled-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$x}),CosmosIconEventDetails=createPreactComponent({tagName:"cosmos-icon-event-details-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$w}),CosmosIconFacebook=createPreactComponent({tagName:"cosmos-icon-facebook-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$v}),CosmosIconForward10=createPreactComponent({tagName:"cosmos-icon-forward-10-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$u}),CosmosIconFullscreen=createPreactComponent({tagName:"cosmos-icon-fullscreen-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$t}),CosmosIconFullscreenExit=createPreactComponent({tagName:"cosmos-icon-fullscreen-exit-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$s}),CosmosIconHeadphones=createPreactComponent({tagName:"cosmos-icon-headphones-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$r}),CosmosIconLink=createPreactComponent({tagName:"cosmos-icon-link-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$q}),CosmosIconLive=createPreactComponent({tagName:"cosmos-icon-live-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$p}
10),CosmosIconLiveBroadcast=createPreactComponent({tagName:"cosmos-icon-live-broadcast-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$o}),CosmosIconMute=createPreactComponent({tagName:"cosmos-icon-mute-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$n}),CosmosIconNoData=createPreactComponent({tagName:"cosmos-icon-no-data-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$m}),CosmosIconPause=createPreactComponent({tagName:"cosmos-icon-pause-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$l}),CosmosIconPictureInPicture=createPreactComponent({tagName:"cosmos-icon-picture-in-picture-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$k}),CosmosIconPinterest=createPreactComponent({tagName:"cosmos-icon-pinterest-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$j}),CosmosIconPlay=createPreactComponent({tagName:"cosmos-icon-play-14-2-1",defaultProps:{},defineCustomElement:r$6}),CosmosIconPreview=createPreactComponent({tagName:"cosmos-icon-preview-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$h}),CosmosIconProductPlacement=createPreactComponent({tagName:"cosmos-icon-product-placement-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$g}),CosmosIconQuality=createPreactComponent({tagName:"cosmos-icon-quality-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$f}),CosmosIconReddit=createPreactComponent({tagName:"cosmos-icon-reddit-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$e}),CosmosIconReplay=createPreactComponent({tagName:"cosmos-icon-replay-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$d}),CosmosIconSeason=createPreactComponent({tagName:"cosmos-icon-season-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$c}),CosmosIconSettings=createPreactComponent({tagName:"cosmos-icon-settings-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$b}),CosmosIconSpotify=createPreactComponent({tagName:"cosmos-icon-spotify-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$a}),CosmosIconStop=createPreactComponent({tagName:"cosmos-icon-stop-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$9}),CosmosIconSubtitles=createPreactComponent({tagName:"cosmos-icon-subtitles-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$8}),CosmosIconVolume=createPreactComponent({tagName:"cosmos-icon-volume-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$7}),CosmosIconVolumeLow=createPreactComponent({tagName:"cosmos-icon-volume-low-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$6}),CosmosIconVolumeMid=createPreactComponent({tagName:"cosmos-icon-volume-mid-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$5}),CosmosIconX=createPreactComponent({tagName:"cosmos-icon-x-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$4}),CosmosImage=createPreactComponent({tagName:"cosmos-image-14-2-1",defaultProps:{fit:"cover",imageAlt:"",radius:"none"},defineCustomElement:r$4}),CosmosLink=createPreactComponent({tagName:"cosmos-link-14-2-1",defaultProps:{kind:"underlined"},defineCustomElement:defineCustomElement$3}),CosmosMediaPreview=createPreactComponent({tagName:"cosmos-media-preview-14-2-1",defaultProps:{radius:"none"},defineCustomElement:r$3}),CosmosMode=createPreactComponent({tagName:"cosmos-mode-14-2-1",defaultProps:{mode:"light"},defineCustomElement:r$2}),CosmosRadio=createPreactComponent({tagName:"cosmos-radio-14-2-1",defaultProps:{checked:!1,disabled:!1,focusable:!0,hitArea:"content",invalid:!1,required:!1},defineCustomElement:defineCustomElement$2}),CosmosRadioGroup=createPreactComponent({tagName:"cosmos-radio-group-14-2-1",defaultProps:{hideLabel:!1,invalid:!1},defineCustomElement:defineCustomElement$1}),CosmosSpinner=createPreactComponent({tagName:"cosmos-spinner-14-2-1",defaultProps:{},defineCustomElement:p}),CosmosText=createPreactComponent({tagName:"cosmos-text-14-2-1",defaultProps:{kind:"normal",size:"medium",spacing:"none",tag:"p",weight:"regular"},defineCustomElement:r$1}),CosmosTitle=createPreactComponent({tagName:"cosmos-title-14-2-1",defaultProps:{kind:"normal",size:"medium",spacing:"none",tag:"p",weight:"bold"},defineCustomElement:r}),CosmosTooltip=createPreactComponent({tagName:"cosmos-tooltip-14-2-1",defaultProps:{content:"",controlled:!1,follow:!1,offset:8,placement:"above",spacing:"tight",unreachable:!1,visible:!1},defineCustomElement}),ThemedAudioPlayerTooltip=({children:c,...u})=>o$i(CosmosTooltip,{...u,children:c});function getPointColor(c,u,d,p,h,f){return u>c?p:d>c?h:f}function getInterpolatedPoints(c,u,d){let p=Math.ceil(u/c),h=d.length/p,f=[];for(let c=0;c<p;c++){let u=Math.round(c*h);f.push(d[u])}return f}let pixelRatio="u">typeof window&&window.devicePixelRatio||1,Waveform=({bufferColor:c,bufferPosition:u,notPlayedColor:d,playbackPosition:p,playedColor:h,points:f})=>{let m=_$3(null),g=T$4(m=>{m.scale(pixelRatio,pixelRatio);let g=m.canvas.offsetHeight,v=m.canvas.offsetWidth;getInterpolatedPoints(3,v,f).forEach((f,y)=>{let b=3*y,S=Math.floor(f*g);m.fillStyle=getPointColor(b/v*100,p,u,h,c,d),m.fillRect(b,g-S,2,S)})},[c,u,d,p,h,f]),v=T$4(()=>{let c=m.current;if(c){let u=Math.floor(c.offsetWidth*pixelRatio),d=Math.floor(c.offsetHeight*pixelRatio);c.width=u,c.height=d;let p=c.getContext("2d");p&&g(p)}},[g]);return p$7(()=>{v()},[v]),useResize(v,m),o$i("canvas",{"data-rbup-waveform":!0,class:"waveform-canvas",ref:m})};function getRailStyle$1(c,u,d){return{background:"top left no-repeat",backgroundImage:`linear-gradient(to right, ${d.playedColor}, ${d.playedColor}),linear-gradient(to right, ${d.bufferColor}, ${d.bufferColor}),linear-gradient(to right, ${d.notPlayedColor}, ${d.notPlayedColor})`,backgroundSize:`${u}% 100%, ${c}% 100%, 100%`}}function useScrubBarInteraction(c,u,d){let[p,h]=h$3(!1),[f,m]=h$3(!1),[g,v]=h$3(0),y=null==d?void 0:d.getDurationInSec(),b=T$4(c=>{v(100*c)},[]),S=T$4(u=>{b(c(u))},[c,b]),_=T$4(p=>{let f=c(p);f&&y&&(b(f),u(roundPlaybackSec(f*y))),h(!1),document.removeEventListener("pointermove",S),document.removeEventListener("pointerup",_),isMobileDevice()&&m(!1),(null==d?void 0:d.getPlayerStatus())==="IDLE"&&d.play()},[y,c,S,d,u,b]),E=T$4(()=>{p||m(!1)},[p]),T=T$4(()=>{m(!0)},[]),w=T$4(c=>{document.addEventListener("pointermove",S),document.addEventListener("pointerup",_),h(!0),S(c)},[S,_]),P=T$4(u=>{p&&u.preventDefault(),b(c(u))},[c,p,b]);return{isDragging:p,showHandle:f,draggedPlaybackPositionInPercent:g,onDocumentPointerMove:S,onDocumentPointerUp:_,onPointerLeave:E,onPointerOver:T,onPointerDown:w,onPointerMove:P}}function getUIModeColors$1(c,u){return{bufferColor:"dark"===c?"rgb(133,146,160)":"rgb(204,207,210)",notPlayedColor:"dark"===c?"rgb(51,73,97)":"rgb(153,159,165)",playedColor:u}}let ScrubBar$1=({uiMode:c,primaryColor:u})=>{var d,p;let{playerState:{durationInSec:h,playerCoordinator:f,playerConfiguration:m,playerStatus:g}}=useAudioPlayerContext(),v=_$3(null),[y,b]=h$3(0),[S,_]=h$3((null==(d=null==f?void 0:f.getPlayerData())?void 0:d.getCurrentTimeInSec())??0),E=null==(p=null==f?void 0:f.getMediaMetaData())?void 0:p.waveformPoints,{isDragging:T,showHandle:w,draggedPlaybackPositionInPercent:P,onDocumentPointerUp:A,onPointerLeave:I,onPointerOver:M,onPointerDown:R,onPointerMove:k}=useScrubBarInteraction(T$4(c=>extractPlaybackPositionInPercentFromEvent(c,v)??0,[]),T$4(c=>{_(c),null==f||f.seek(c)},[f]),f),x=F$4(()=>h>
100?getFormattedTimeString(P/100*h):getFormattedTimeString(0),[P,h]),C=F$4(()=>getUIModeColors$1(c,u),[c,u]);p$7(()=>{let c=c=>{var u;switch(c.type){case"timeChanged":_(c.playbackPosition);break;case"loaded":case"play":case"seeking":_((null==(u=null==f?void 0:f.getPlayerData())?void 0:u.getCurrentTimeInSec())??0)}b((null==f?void 0:f.getBufferLengthInSec())??0)};return null==f||f.addEventListener(c),()=>{let u=(null==m?void 0:m.initialSeekTimeInSec)??0,d=(null==f?void 0:f.getBufferLengthInSec())??0;_(u),b(d),null==f||f.removeEventListener(c)}},[null==m?void 0:m.initialSeekTimeInSec,f]);let O=calculatePlaybackPositionInPercent(S,h),D=calculateBufferWidthInPercent(y,h),L="ERROR"===g?void 0:getRailStyle$1(D,O,C),N=T?P:O;return o$i("div",{class:"scrub-bar",children:o$i(ThemedAudioPlayerTooltip,{content:x,follow:"cursor",unreachable:!0,children:o$i("section",{class:"scrub-bar-section",onPointerDown:R,onPointerLeave:I,onPointerMove:k,onPointerOver:M,onPointerUp:A,onTouchMove:k,ref:v,children:[E&&o$i("div",{class:"scrub-bar__waveform",children:o$i(Waveform,{bufferColor:C.bufferColor,bufferPosition:D,notPlayedColor:C.notPlayedColor,playbackPosition:O,playedColor:C.playedColor,points:E})}),o$i("div",{class:"scrub-bar__rail-container",children:[o$i("div",{"data-rbup-scrub-bar-rail":!0,class:"scrub-bar__rail",style:L}),o$i(ScrubBarHandle,{playbackPositionInPercent:N,show:w})]})]})})})},minimalPlayerStyles=".scrub-bar{width:100%}.scrub-bar__rail-container{position:relative}.scrub-bar__rail{grid-row:2;height:2px;transition:transform .3s cubic-bezier(0,.32,.32,1);width:100%}.scrub-bar__waveform{grid-row:1;height:20px}.scrub-bar-section{align-items:center;cursor:pointer;display:grid;height:22px;-webkit-user-select:none;user-select:none;font:initial}.default-theme--error-light .scrub-bar__rail{background-color:#000f1e0d}.default-theme--error-dark .scrub-bar__rail{background-color:#ffffff1a}.scrub-bar-section:hover .scrub-bar__rail{transform:scaleY(2)}.default-theme--error-light .scrub-bar,.default-theme--error-dark .scrub-bar{pointer-events:none}.scrub-bar-handle{background:#fff;border-radius:9999px;box-shadow:0 2px 8px #000f1e;color:#fff;cursor:pointer;height:16px;left:0;opacity:0;position:absolute;top:-8px;transform:translate(-8px);transition:opacity .25s;width:16px}.scrub-bar-handle-visible{opacity:1}.waveform-canvas{height:20px;width:100%}.minimal-audio-player{--rbup-primary-color: #DB0A40}";function resolveThemeClassName$2(c,u,d){let p=`minimal-audio-player ${d}`;return u?`${p} default-theme--error-${"light"===c?"light":"dark"}`:p}let InnerMinimalAudioPlayer=k$3((c,u)=>{let{config:d,dataLoader:p,id:h,internalOnApiAvailable:f,styles:m}=c,{init:g,playerState:{playerCoordinator:v,uiMode:y,playerStatus:b}}=useAudioPlayerContext(),S=_$3(null),_=resolveThemeClassName$2(y,"ERROR"===b,useContainerQuery(S,BREAKPOINTS)),E=T$4(c=>{c&&g(c)},[g]),T=S.current,w=T?getComputedStyle(T).getPropertyValue("--rbup-primary-color"):"#fff";return o$i(k$5,{children:[o$i("style",{children:m}),o$i("div",{id:h,class:_,ref:S,children:d&&o$i(k$5,{children:[o$i(RbupAudioCore,{ref:u,config:d,dataLoader:p,onCoordinatorAvailable:E,internalOnApiAvailable:f}),v&&o$i(ScrubBar$1,{primaryColor:w,uiMode:y})]})})]})}),MinimalAudioDefaultTheme=k$3((c,u)=>o$i(AudioPlayerStateContextProvider,{children:o$i(InnerMinimalAudioPlayer,{ref:u,styles:minimalPlayerStyles,...c})})),ElapsedTime=()=>{let{playerState:{playbackPosInSec:c}}=useAudioPlayerContext(),u=isNaN(c)?0:c;return o$i("section",{"data-rbup-elapsed-time-display":!0,class:"remaining-time",children:o$i(CosmosText,{"data-rbup-text":!0,size:"xx-small",children:`${getFormattedTimeString(u)}`})})},ControlsButtonInternal=({Icon:c,dataAttribute:u,disabled:d=!1,label:p,onPointerUp:h,onTooltipUpdate:f,size:m,tooltipText:g,shape:v="circle",appearance:y,kind:b="bare",buttonLabel:S,style:_=""},E)=>{let T=_$5(),w=F$4(()=>({focus(){T.current.base.buttonFocus().catch(c=>console.error("Could not set focus on CosmosButton",c))},blur(){T.current.base.buttonBlur().catch(c=>console.error("Could not remove focus on CosmosButton",c))}}),[T]);A$3(E,()=>w,[w]);let P=T$4(c=>{d||c.key!==KEYCODE_ENTER&&c.key!==KEYCODE_SPACE||(c.stopPropagation(),h(c))},[d,h]);return o$i(CosmosButton,{style:_,[u]:!0,ref:T,"data-rbup-button":!0,"data-rbup":u,disabled:d,appearance:y,buttonAriaLabel:p,kind:b,shape:v,size:m??"medium",onPointerup:c=>{!d&&(isLeftClick(c)||isTouch(c)||isPrimaryPen(c))&&h(c)},onPointerEnter:c=>{g&&f&&f(g,c)},onKeyDown:P,children:[c,S]})}
10,ControlsButton=k$3(ControlsButtonInternal),MaturityRating=({rating:c,ratingFormat:u,size:d,textSize:p="medium"})=>{let h="url"===u,f=h?generateCloudinaryImageSrcSet(c,{widths:[48,96],defaultWidth:d,transformations:CLOUDINARY_TRANSFORMATIONS_MATURITY_RATING,paramsBuilder:c=>`c_fill,w_${c},q_auto,g_auto,f_auto`}):void 0;return o$i("div",{className:`maturity-rating-overlay__rating${h?" maturity-rating-overlay__rating--image":""}`,children:f?o$i("img",{src:f.src,srcSet:f.srcSet,sizes:`${d}px`,alt:"Maturity rating"}):o$i(CosmosText,{appearance:"light",size:p,children:c})})},DEFAULT_CHIME_VOLUME=1,resolveAudioContextConstructor=()=>{let{AudioContext:c,webkitAudioContext:u}=window;return c??u},getAudioContext=()=>{if(audioContext)return audioContext;let c=resolveAudioContextConstructor();return c?audioContext=new c:void console.warn("Web Audio API is not available, skipping maturity rating chime")},loadChimeBuffer=(c,u)=>{u!==chimeBufferUrl&&(chimeBufferPromise=void 0,chimeBufferUrl=u);let d=chimeBufferPromise??(chimeBufferPromise=fetch(u).then(c=>{if(!c.ok)throw Error(`Maturity rating chime server returned ${c.status}`);return c.arrayBuffer()}).then(u=>c.decodeAudioData(u)).catch(c=>{console.error("Error while loading maturity rating chime",c),chimeBufferPromise===d&&(chimeBufferPromise=void 0)}));return d},playMaturityRatingChime=async c=>{let u=getAudioContext();if(!u)return;let d=await loadChimeBuffer(u,c);if(d)try{"suspended"===u.state&&await u.resume();let c=u.createBufferSource();c.buffer=d;let p=u.createGain();p.gain.value=DEFAULT_CHIME_VOLUME,c.connect(p),p.connect(u.destination),c.addEventListener("ended",()=>{c.disconnect(),p.disconnect()}),c.start()}catch(c){console.error("Error while playing maturity rating chime",c)}},useMaturityRatingChime=(c,u)=>{p$7(()=>{c&&u&&playMaturityRatingChime(u)},[c,u])},styles$a=".maturity-rating-overlay{pointer-events:none;position:absolute;top:0;left:0;height:fit-content;display:flex;padding-top:var(--rbup-maturity-padding-top, 12px);padding-left:var(--rbup-maturity-padding-left, 12px);max-width:80%}.maturity-rating-overlay__content{margin:auto;display:flex;gap:12px;align-items:center;position:relative}.maturity-rating-overlay__rating{padding:4px 8px;border-radius:8px;border:2px solid rgba(255,255,255,.2);background:#ffffff0d;-webkit-backdrop-filter:blur(19.75px);backdrop-filter:blur(19.75px);animation:rating-sequence 9s ease-in}.maturity-rating-overlay__rating--image{padding:0;border:none;background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}.maturity-rating-overlay__label{overflow:hidden;width:fit-content}.maturity-rating-overlay__label-text{animation:label-move-sequence 9s ease-out}.cq-540 .maturity-rating-overlay{padding-top:var(--rbup-maturity-padding-top, 16px);padding-left:var(--rbup-maturity-padding-left, 16px)}.cq-650 .maturity-rating-overlay{padding-top:var(--rbup-maturity-padding-top, 24px);padding-left:var(--rbup-maturity-padding-left, 24px)}@keyframes rating-sequence{0%,to{opacity:0}14.67%,60%{opacity:1}70%{opacity:0}}@keyframes label-move-sequence{0%,7.34%,67.06%,to{transform:translate(-100%)}14.67%,52.39%,59.73%{transform:translate(0)}}",MaturityRatingOverlay=({rating:c,advisory:u,ratingFormat:d="text",playerWidth:p,onAnimationEnd:h,chimeUrl:f,playChime:m=!1})=>{let{labelSize:g,ratingSize:v,ratingImageSize:y}=resolveComponentSize(p);return useMaturityRatingChime(m,f),o$i(k$5,{children:[o$i("style",{children:styles$a}),o$i("div",{id:"maturity-rating",className:"maturity-rating-overlay",onAnimationEnd:h,children:o$i("div",{className:"maturity-rating-overlay__content",children:[o$i(MaturityRating,{rating:c,ratingFormat:d,size:y,textSize:v}),u&&o$i("div",{className:"maturity-rating-overlay__label",children:o$i("div",{className:"maturity-rating-overlay__label-text",children:o$i(CosmosText,{appearance:"light",size:g,children:u})})})]})})]})};function resolveComponentSize(c){return c<Breakpoint.small?{labelSize:"xx-small",ratingSize:"x-small",ratingImageSize:42}:c<Breakpoint.medium?{labelSize:"x-small",ratingSize:"small",ratingImageSize:42}:{labelSize:"small",ratingSize:"medium",ratingImageSize:54}}let styles$9=".next-up-toast{align-items:center;background:#fff9;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);bottom:16px;left:16px;right:16px;cursor:pointer;display:flex;height:56px;justify-content:space-between;position:absolute;padding:4px 12px 4px 4px;border-radius:4px;overflow:hidden;isolation:isolate;z-index:1}.next-up-toast__progress-bar{position:absolute;
10left:0;bottom:0;top:0;right:0;background-color:#fff;z-index:-1}.next-up-toast__progress-bar.next-up-toast__countdown{animation-name:count-down-next-up;animation-timing-function:linear;animation-duration:var(--animation-duration)}.next-up-toast__info{align-items:center;display:grid;grid-template-columns:1fr auto}.next-up-toast__image{background-image:var(--next-up-toast-image);background-size:cover;background-position:center;height:48px;width:79px;border-radius:4px}.next-up-toast__text{padding:0 16px;overflow:hidden}.cq-540 .next-up-toast{bottom:32px;left:auto;right:32px;transition:bottom .3s;width:457px}@keyframes count-down-next-up{0%{right:100%}to{right:0}}",NextUpToast=({nextUp:c,onNextUpAction:u,posInSec:d,durationInSec:p,playerStatus:h})=>{let[f]=h$3(h),[m]=h$3(d),g=_$3("displayed"),v=Math.min(Math.max(0,p-m),c.countdownDurationSecs),y=c=>{c.stopPropagation(),c instanceof PointerEvent&&!(isLeftClick(c)||isTouch(c)||isPrimaryPen(c))||("displayed"===g.current&&_(),g.current="cancelled",null==u||u("CANCELLED_BY_USER_INTERACTION"))},b=c=>{if(c.stopPropagation(),c instanceof PointerEvent&&!(isLeftClick(c)||isTouch(c)||isPrimaryPen(c)))return;"displayed"===g.current&&_(),g.current="triggered";let d=c instanceof PointerEvent?"TRIGGERED_BY_USER_INTERACTION":"TRIGGERED_AUTOMATICALLY";null==u||u(d)},S=useUserInteractionContext(),_=T$4(()=>{g.current="stopped",S.removeEventListener(_)},[S]);return p$7(()=>{"displayed"===g.current&&(null==u||u("DISPLAYED"),S.addEventListener(_))},[u,g,S,_,f]),f!==h&&"ENDED"!==h&&"cancelled"!==g.current&&y(new Event("cancel")),o$i(k$5,{children:[o$i("style",{children:styles$9}),("displayed"===g.current||"stopped"===g.current)&&o$i("div",{class:"next-up-toast","data-rbup-next-up":!0,onPointerUp:b,onPointerMove:S.trigger,onAnimationEnd:b,children:[o$i("div",{style:{"--animation-duration":`${v}s`},class:"stopped"===g.current?"next-up-toast__progress-bar":"next-up-toast__progress-bar next-up-toast__countdown"}),o$i("div",{class:"next-up-toast__info",children:[c.imageUrl&&o$i("div",{class:"next-up-toast__image","data-rbup-next-up-image":!0,style:{"--next-up-toast-image":`url(${c.imageUrl}`}}),o$i("div",{class:"next-up-toast__text",children:[o$i(CosmosText,{appearance:"dark","data-rbup-next-up-label":!0,kind:"subtle",size:"xx-small",children:translate("nextVideoCountdown-title")}),o$i(CosmosText,{class:"next-up-toast__title","data-rbup-next-up-title":!0,appearance:"dark",size:"x-small",weight:"medium",clamp:1,children:c.title})]})]}),o$i("div",{class:"next-up-toast__close","data-rbup-next-up-close":!0,children:o$i(ControlsButton,{dataAttribute:"data-rbup-next-up-cancel",appearance:"dark",kind:"secondary",shape:"circle",size:"small",onPointerUp:y,Icon:o$i(CosmosIconCloseSmall,{slot:"icon"})})})]})]})},NextUpToastWrapper=({allowRenderNextUp:c,currentlyPlayingPlaylistEntryRef:u,onNextVideoCallback:d,duration:p,posInSec:h,isShowingAd:f,playerStatus:m,playlistEntriesRef:g,nextUpToastRef:v})=>{let y,b=g.current;return!f&&b.length>0&&(y=calculateFinalNextUp(b[0],u.current,"IDLE"===m,p,h)),y&&c?o$i(NextUpToast,{ref:v,nextUp:y,posInSec:h,durationInSec:p,onNextUpAction:d,playerStatus:m}):null},PlayPauseButton$1=({cssClass:c,onTooltipUpdate:u})=>{let{playerState:{playerStatus:d,playerCoordinator:p}}=useAudioPlayerContext(),h="PLAYING"===d,f="ENDED"===d,m=h?"data-rbup-pause":"data-rbup-play",g=getIconReflectingPlayerState(c,h,f),v=getTooltipTextReflectingPlayerState(h,f);return o$i(ControlsButton,{style:h?"--rbup-play-button-background-hover-color: initial":"",dataAttribute:m,Icon:g,label:v,onPointerUp:T$4(()=>{p&&"ENDED"===d?(p.restartPlaybackFromBeginning(),p.play()):handlePlayPauseToggle(d,p)},[d,p]),tooltipText:v,onTooltipUpdate:u,kind:h?"bare":"primary"})};function getIconReflectingPlayerState(c,u,d){return u?o$i(CosmosIconPause,{"data-rbup-icon-pause":!0,class:`${c}`,slot:"icon"}):d?o$i(CosmosIconReplay,{"data-rbup-icon-replay":!0,class:`${c}`,slot:"icon"}):o$i(CosmosIconPlay,{"data-rbup-icon-play":!0,class:`${c}`,slot:"icon"})}function getTooltipTextReflectingPlayerState(c,u){return translate(c?"tooltip-pause":u?"tooltip-replay":"tooltip-play")}
10let PlaySeekControls$1=()=>{let{playerState:{playerStatus:c,playerCoordinator:u}}=useAudioPlayerContext(),d="BUFFERING"===c,p=!!(null!=u&&u.canSeekBackward()),h=!!(null!=u&&u.canSeekForward()),[f,m]=h$3(""),g=T$4(()=>{null==u||u.seekRelative(DEFAULT_SEEK_SKIP_SECONDS)},[u]),v=T$4(()=>{null==u||u.seekRelative(-DEFAULT_SEEK_SKIP_SECONDS)},[u]),y=T$4(c=>{m(c)},[]);return o$i("section",{"data-rbup-play-controls":!0,children:o$i(ThemedAudioPlayerTooltip,{content:f,placement:"above",spacing:"tight",unreachable:!0,follow:"cursor",offset:30,children:o$i("div",{class:"play-seek-controls__play-seek-pause-container","data-rbup-seek-pause-container":!0,children:[o$i(ControlsButton,{dataAttribute:"data-rbup-seek-back",disabled:!p,Icon:o$i(CosmosIconBack10,{"data-rbup-icon-back-10":!0,class:"play-seek-controls__icon",slot:"icon"}),label:translate("tooltip-rewind"),onPointerUp:v,tooltipText:translate("tooltip-rewind"),onTooltipUpdate:y,kind:"bare"}),d&&o$i(CosmosSpinner,{"data-rbup-buffer":!0,class:"play-seek-controls__spinner",label:"Buffering"}),!d&&o$i(PlayPauseButton$1,{cssClass:"play-seek-controls__icon",onTooltipUpdate:y}),o$i(ControlsButton,{dataAttribute:"data-rbup-seek-forward",disabled:!h,Icon:o$i(CosmosIconForward10,{"data-rbup-icon-forward-10":!0,class:"play-seek-controls__icon",slot:"icon"}),label:translate("tooltip-forward"),onPointerUp:g,tooltipText:translate("tooltip-forward"),onTooltipUpdate:y,kind:"bare"})]})})})},RemainingTime=()=>{let{playerState:{durationInSec:c,playbackPosInSec:u}}=useAudioPlayerContext(),d=isNaN(u)||u>c?0:c-u;return o$i("section",{"data-rbup-remaining-time-display":!0,class:"remaining-time",children:o$i(CosmosText,{"data-rbup-text":!0,size:"xx-small",children:`-${getFormattedTimeString(d)}`})})};function getRailStyle(c,u,d){return{background:"top left no-repeat",backgroundImage:`linear-gradient(to right, ${d.playedColor}, ${d.playedColor}),linear-gradient(to right, ${d.bufferColor}, ${d.bufferColor}),linear-gradient(to right, ${d.notPlayedColor}, ${d.notPlayedColor})`,backgroundSize:`${u}% 100%, ${c}% 100%, 100%`}}function getUIModeColors(c){let u="rgb(204,207,210)",d="rgb(153,159,165)";return{bufferColor:"dark"===c?d:u,notPlayedColor:"dark"===c?u:d,playedColor:"dark"===c?"rgb(0,0,0)":"rgb(255,255,255)"}}let MinimalScrubBar=({uiMode:c})=>{var u;let{playerState:{durationInSec:d,playerCoordinator:p,playerConfiguration:h,playerStatus:f}}=useAudioPlayerContext(),m=_$3(null),[g,v]=h$3(0),[y,b]=h$3((null==(u=null==p?void 0:p.getPlayerData())?void 0:u.getCurrentTimeInSec())??0),{isDragging:S,showHandle:_,draggedPlaybackPositionInPercent:E,onDocumentPointerUp:T,onPointerLeave:w,onPointerOver:P,onPointerDown:A,onPointerMove:I}=useScrubBarInteraction(T$4(c=>extractPlaybackPositionInPercentFromEvent(c,m)??0,[]),T$4(c=>{b(c),null==p||p.seek(c)},[p]),p),M=F$4(()=>d>0?getFormattedTimeString(E/100*d):getFormattedTimeString(0),[E,d]),R=F$4(()=>getUIModeColors(c),[c]);p$7(()=>{let c=c=>{var u;switch(c.type){case"loaded":case"play":case"timeChanged":case"seeking":b((null==(u=null==p?void 0:p.getPlayerData())?void 0:u.getCurrentTimeInSec())??0)}v((null==p?void 0:p.getBufferLengthInSec())??0)};return null==p||p.addEventListener(c),()=>{let u=(null==h?void 0:h.initialSeekTimeInSec)??0,d=(null==p?void 0:p.getBufferLengthInSec())??0;b(u),v(d),null==p||p.removeEventListener(c)}},[null==h?void 0:h.initialSeekTimeInSec,p]);let k=calculatePlaybackPositionInPercent(y,d),x=calculateBufferWidthInPercent(g,d);return o$i("div",{class:"minimal-scrub-bar",children:o$i(ThemedAudioPlayerTooltip,{content:M,follow:"cursor",unreachable:!0,children:o$i("section",{class:"minimal-scrub-bar-section",onPointerDown:A,onPointerLeave:w,onPointerMove:I,onPointerOver:P,onPointerUp:T,onTouchMove:I,ref:m,children:o$i("div",{class:"minimal-scrub-bar__rail-container",children:[o$i("div",{"data-rbup-minimal-scrub-bar-rail":!0,class:"minimal-scrub-bar__rail",style:"ERROR"===f?void 0:getRailStyle(x,k,R)}),o$i(ScrubBarHandle,{playbackPositionInPercent:S?E:k,show:_})]})})})})},minimalPlayerWithControlsStyles='@font-face{font-family:Bull Text;font-style:normal;font-weight:400;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Regular.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Regular.woff) format("woff")}@font-face{font-family:Bull Text;font-style:normal;font-weight:500;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Medium.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Medium.woff) format("woff")}@font-face{font-family:Bull Text;font-style:normal;font-weight:700;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Bold.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Bold.woff) format("woff")}@font-face{font-family:Bull;font-style:normal;font-weight:700;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Bold.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Bold.woff) format("woff")}@font-face{font-family:Bull;font-style:normal;font-weight:800;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Heavy1.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Heavy1.woff) format("woff")}@font-face{font-family:Bull VF;font-style:normal;font-weight:300 800;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullVAR.woff2) format("woff2-variations"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullVAR.woff2) format("woff2")}.elapsed-time{word-break:normal}.default-theme--error-light .elapsed-time,.default-theme--error-dark .elapsed-time{display:none}.play-seek-controls__play-seek-pause-container{justify-content:center;align-items:center;display:flex;gap:12px}.play-seek-controls__play-seek-pause-container .play-seek-controls__icon{height:28px;width:28px}.play-seek-controls__play-seek-pause-container [data-rbup-pause]::part(base),.play-seek-controls__play-seek-pause-container [data-rbup-play]::part(base){height:56px;max-width:56px;min-width:56px;width:56px}.play-seek-controls__play-seek-pause-container [data-rbup-pause]{--cosmos-button-background-hover: var(--rbup-play-button-background-hover-color)}.play-seek-controls__play-seek-pause-container [data-rbup-play]{--cosmos-button-background: var(--rbup-primary-color);--cosmos-button-background-hover: var(--rbup-play-button-background-hover-color)}.play-seek-controls__play-seek-pause-container .play-seek-controls__spinner{width:56px;height:56px}.default-theme--error-light .play-seek-controls__play-seek-pause-container,.default-theme--error-dark .play-seek-controls__play-seek-pause-container{pointer-events:none}.default-theme--error-light .play-seek-controls__play-seek-pause-container [data-rbup-play]{--cosmos-button-background: rgba(0, 15, 30, .05)}.default-theme--error-light .play-seek-controls__play-seek-pause-container [data-rbup-seek-back],.default-theme--error-light .play-seek-controls__play-seek-pause-container [data-rbup-seek-forward]{--cosmos-button-color: rgba(0, 15, 30, .05)}.default-theme--error-dark .play-seek-controls__play-seek-pause-container [data-rbup-play]{--cosmos-button-background: rgba(255, 255, 255, .1);--cosmos-button-color: #000F1E}.default-theme--error-dark .play-seek-controls__play-seek-pause-container [data-rbup-seek-back],.default-theme--error-dark .play-seek-controls__play-seek-pause-container [data-rbup-seek-forward]{--cosmos-button-color: rgba(255, 255, 255, .1)}.remaining-time{word-break:normal}.default-theme--error-light .remaining-time,.default-theme--error-dark .remaining-time{display:none}.minimal-scrub-bar{display:flex;width:100%}.minimal-scrub-bar-section{align-items:center;cursor:pointer;display:grid;-webkit-user-select:none;user-select:none;font:initial;width:100%}.minimal-scrub-bar__rail-container{position:relative}.minimal-scrub-bar__rail{grid-row:2;height:2px;transition:transform .3s cubic-bezier(0,.32,.32,1);width:100%}.default-theme--error-light .minimal-scrub-bar__rail{background-color:#000f1e0d}.default-theme--error-dark .minimal-scrub-bar__rail{background-color:#ffffff1a}.minimal-scrub-bar-section:hover .minimal-scrub-bar__rail{transform:scaleY(2)}.default-theme--error-light .minimal-scrub-bar,.default-theme--error-dark .minimal-scrub-bar{pointer-events:none}.scrub-bar-handle{background:#fff;border-radius:9999px;box-shadow:0 2px 8px #000f1e;color:#fff;cursor:pointer;height:16px;left:0;opacity:0;position:absolute;top:-8px;transform:translate(-8px);transition:opacity .25s;width:16px}.scrub-bar-handle-visible{opacity:1}.waveform-canvas{height:20px;width:100%}.minimal-audio-player-with-controls{max-width:400px;--rbup-primary-color: #1f2435;--rbup-play-button-background-hover-color: #4c505d}';function resolveThemeClassName$1(c,u,d){let p=`minimal-audio-player-with-controls ${d}`;return u?`${p} default-theme--error-${"light"===c?"light":"dark"}`:p}let InnerMinimalAudioPlayerWithControls=k$3((c,u)=>{let{config:d,dataLoader:p,id:h,internalOnApiAvailable:f,styles:m}=c,{init:g,playerState:{playerCoordinator:v,uiMode:y,playerStatus:b}}=useAudioPlayerContext(),S=_$3(null),_=resolveThemeClassName$1(y,"ERROR"===b,useContainerQuery(S,BREAKPOINTS)),E=T$4(c=>{c&&g(c)},[g]);return o$i(k$5,{children:[o$i("style",{children:m}
10),o$i("div",{id:h,class:_,ref:S,children:d&&o$i(k$5,{children:[o$i(RbupAudioCore,{ref:u,config:d,dataLoader:p,onCoordinatorAvailable:E,internalOnApiAvailable:f}),v&&o$i(CosmosMode,{mode:"light"===y?"dark":"light",children:[o$i(PlaySeekControls$1,{}),o$i("div",{style:"display: flex; align-items: center; gap: 16px; padding-top: 16px;",children:[o$i(ElapsedTime,{}),o$i(MinimalScrubBar,{uiMode:y}),o$i(RemainingTime,{})]})]})]})})]})}),MinimalAudioPlayerWithControlsTheme=k$3((c,u)=>o$i(AudioPlayerStateContextProvider,{children:o$i(InnerMinimalAudioPlayerWithControls,{ref:u,styles:minimalPlayerWithControlsStyles,...c})}));function resolveThemeClassName(c,u){let d="default-theme";return u?`${d} default-theme--error-${c}`:`${d} default-theme--${c}`}let transformations=[{placeholder:"/im/",transformation:c=>`/im:i:${c}/`},{placeholder:"/{op}/",transformation:c=>`/${c}/`}],COVER_ART_WIDTH_HEIGHT=240;function calculateCoverArtUrl(c){return c?transformations.some(({placeholder:u})=>c.includes(u))?{defaultRes:getCoverArtUrl(c,COVER_ART_WIDTH_HEIGHT*window.devicePixelRatio),lowRes:getCoverArtUrl(c,Math.floor(COVER_ART_WIDTH_HEIGHT/4)*devicePixelRatio)}:{defaultRes:c}:void 0}function getCoverArtUrl(c,u){return transformations.reduce((c,{placeholder:d,transformation:p})=>c.replace(d,p(`c_fill,w_${u},h_${u},q_auto,g_auto,f_auto`)),c)}let CoverArt=({coverArt:c})=>{let u=calculateCoverArtUrl(c);return o$i(k$5,{children:u&&o$i("section",{"data-rbup-cover-art":!0,children:o$i(CosmosImage,{class:"cover-art",image:u.defaultRes,imagePreview:u.lowRes,imageAlt:""})})})},CLASS_NAME="error-cover-art",ErrorCoverArt=({uiMode:c})=>
10o$i(k$5,{children:o$i("section",{"data-rbup-error-cover-art":!0,children:o$i("div",{class:`${CLASS_NAME} ${CLASS_NAME}--${c}`,children:o$i(CosmosIconNoData,{class:`${CLASS_NAME}__icon`})})})});function errorDescriptionResolver$1(){return{title:translate("audio-error-default-title"),description:translate("audio-error-default-description")}}let ErrorInfo=()=>{let{title:c,description:u}=errorDescriptionResolver$1();return o$i("div",{className:"media-info__title",children:[o$i("section",{className:"media-info media-info--center",children:[o$i(CosmosTitle,{"data-rbup-error-title":!0,size:"x-small",children:c}),o$i(CosmosText,{"data-rbup-error-description":!0,size:"x-small",kind:"subtle",children:u})]}),o$i("div",{class:"error-decoration",children:o$i(CosmosText,{appearance:"light",size:"medium",tag:"span",children:o$i(CosmosIconHeadphones,{"data-rbup-icon-headphones":!0,class:"error-decoration__headphone-icon"})})})]})};function transformUIModeToCosmosAppearance(c){return"light"===c?"dark":"light"}let styles$8=".distribution-icons__tooltip{display:flex}.distribution-icons__tooltip-wrapper{width:100%}.distribution-icons__tooltip-wrapper [data-rbup-button]{margin:0 4px}",DistributionIcons=({distributions:c,buttonType:u,uiMode:d})=>{let[p,h]=h$3(""),f=T$4(c=>{h(c)},[]);return o$i(k$5,{children:c.length>0&&o$i(k$5,{children:[o$i("style",{children:styles$8}),o$i(ThemedAudioPlayerTooltip,{"rbup-distribution-icons-bar":!0,class:"distribution-icons__tooltip",content:p,placement:"above",spacing:"tight",unreachable:!0,follow:"cursor",children:o$i("div",{class:"distribution-icons__tooltip-wrapper",children:getListenOnPlatformButton(c,f,u,d)})})]})})},ElementTooltip={spotify:"Spotify",itunes:"Apple Podcasts"};function getListenOnPlatformButton(c,u,d,p){let h=p&&transformUIModeToCosmosAppearance(p);return c.map((c,p)=>o$i(CosmosButton,{"data-rbup-button":!0,href:c.url,kind:d,shape:"circle",size:"small",target:"_blank",buttonAriaLabel:c.platform,appearance:h,onPointerEnter:()=>{u(ElementTooltip[c.platform]??translate("audio-podcast-listenOn"))},children:getPlatformIcon(c.platform)},p))}function getPlatformIcon(c){let u="distribution-icons__icons";switch(c){case"spotify":return o$i(CosmosIconSpotify,{"data-rbup-icon-spotify":!0,class:u,slot:"icon"});case"itunes":return o$i(CosmosIconApplePodcasts,{"data-rbup-icon-apple-podcasts":!0,class:u,slot:"icon"})}return null}let APPROVED_PODCAST_PLATFORMS=["spotify","itunes"],ListenOn=({isPlayerSizeLarge:c})=>{let{playerState:{mediaMetaData:u}}=useAudioPlayerContext(),d=F$4(()=>{var c;return(null==(c=null==u?void 0:u.distributions)?void 0:c.filter(c=>APPROVED_PODCAST_PLATFORMS.includes(c.platform)))??[]},[u]),p=c?"bare":"tertiary";return o$i("div",{class:"listen-on","data-rbup-listen-on":!0,children:[o$i(CosmosText,{"data-rbup-listen-on-label":!0,class:"listen-on__label",size:"x-small",kind:"subtle",children:translate("audio-podcast-listenOn")}),d.length>0&&o$i(DistributionIcons,{distributions:d,buttonType:p}),0===d.length&&o$i(CosmosButton,{"data-rbup-button":!0,kind:p,shape:"circle",size:"small",children:o$i(CosmosIconHeadphones,{"data-rbup-icon-headphones":!0,slot:"icon"})})]})};function formatDuration(c){let u=Math.floor(c/3600),d=Math.floor(c/60)-60*u,p=Math.floor(c)%60;return u<1?`${addLeadingZero(d)}:${addLeadingZero(p)} ${translate("audio-duration-minute")}`:`${u} ${translate("audio-duration-hour")} ${addLeadingZero(d)} ${translate("audio-duration-minute")}`}let ListSeparator=({classesString:c=""})=>o$i("li",{class:`media-info__separator ${c}`,"aria-hidden":!0,children:o$i(CosmosText,{kind:"subtle",size:"x-small",tag:"span",children:"·"})}),LinkedTitle=({dataAttribute:c,title:u,url:d,cosmosTextProps:p,clickCallback:h})=>o$i(CosmosText,{...p,children:d?o$i(CosmosLink,{[c]:!0,href:d,target:"_blank",onClick:h,children:u}):u}),MediaInfoPodcastTitle=({onClickCallback:c,podcastTitle:u,podcastShowPageUrl:d})=>o$i("div",{class:"media-info__podcast-title",children:o$i(LinkedTitle,{dataAttribute:"data-rbup-podcast-title",title:u,url:d,cosmosTextProps:{clamp:2,kind:"subtle",size:"x-small",tag:"h2"},clickCallback:()=>c("Show",u)})}),MediaInfoTitle=({onClickCallback:c,podcastEpisodeTitle:u,episodePageUrl:d})=>o$i(k$5,{children:u&&o$i("div",{class:"media-info__title",children:o$i(LinkedTitle,{dataAttribute:"data-rbup-media-info-title",title:u,url:d,cosmosTextProps:{clamp:2,size:"x-large",tag:"h1",weight:"bold"},clickCallback:()=>c("Episode",u)})})}),MediaInfoList=({onClickCallback:c,podcastShowTitle:u,podcastShowPageUrl:d,seasonText:p,episodeText:h,publishedAt:f,showHeadphoneIcon:m})=>o$i("ul",{"data-rbup-podcast-data":!0,class:"media-info__data-list",children:[u&&o$i(k$5,{children:[o$i("li",{class:"media-info__data-list-title",children:o$i(LinkedTitle,{dataAttribute:"data-rbup-podcast-list-title",title:u,url:d,cosmosTextProps:{clamp:2,kind:"subtle",size:"x-small",tag:"h2"},clickCallback:()=>c("Show",u)})}),!!(p??h??f)&&o$i(ListSeparator,{classesString:"media-info__data-list-title"})]}),p&&o$i(k$5,{children:[o$i("li",{class:"media-info__data-list-item","data-rbup-podcast-season":!0,children:o$i(CosmosText,{kind:"subtle",size:"x-small",tag:"span",children:p})}),o$i(ListSeparator,{})]}),h&&o$i(k$5,{children:[o$i("li",{class:"media-info__data-list-item","data-rbup-podcast-episode":!0,children:o$i(CosmosText,{kind:"subtle",size:"x-small",tag:"span",children:h})}),o$i(ListSeparator,{})]}),f&&o$i(k$5,{children:[o$i("li",{class:"media-info__data-list-item","data-rbup-podcast-published-date":!0,children:o$i(CosmosText,{kind:"subtle",size:"x-small",tag:"span",children:[m&&o$i(CosmosIconHeadphones,{"data-rbup-icon-headphones":!0,class:"media-info__headphone-icon"}),f]})}),o$i(ListSeparator,{})]})]}),AudioClipMediaInfoList=({duration:c})=>o$i("ul",{"data-rbup-podcast-data":!0,class:"media-info__data-list",children:[o$i("li",{className:"media-info__data-list-item","data-rbup-audio-headphones":!0,children:o$i(CosmosText,{kind:"subtle",size:"x-small",tag:"span",children:o$i(CosmosIconHeadphones,{"data-rbup-icon-headphones":!0,class:"media-info__headphone-icon"})})}),o$i("li",{className:"media-info__data-list-item","data-rbup-audio-audioclip-header":!0,children:o$i(CosmosText,{kind:"subtle",size:"x-small",tag:"span",children:"Audioclip"})}),o$i(ListSeparator,{}),c&&o$i("li",{className:"media-info__data-list-item","data-rbup-audio-duration":!0,children:o$i(CosmosText,{kind:"subtle",size:"x-small",tag:"span",children:c})})]});function calculateFieldValuesFromMetaData(c){let u=null==c?void 0:c.coverArt,d=null==c?void 0:c.podcastTitle,p=null==c?void 0:c.podcastShowPageUrl,h=null==c?void 0:c.title,f=null==c?void 0:c.episodePageUrl,m=null==c?void 0:c.episodeNumber,g=null==c?void 0:c.seasonNumber,v=null!=c&&c.publishedAt?new Intl.DateTimeFormat("default",{day:"numeric",month:"short",year:"numeric"}).format(new Date(c.publishedAt)):void 0,y=null==c?void 0:c.duration;return{coverArt:u,podcastTitle:d,podcastShowPageUrl:p,publishedAt:v,seasonNumber:g,episodeNumber:m,episodeTitle:h,episodePageUrl:f,duration:y?formatDuration(y):void 0,description:null==c?void 0:c.description,hasPodcastData:!!(d??g??m??v)}}let shouldCenterMediaInfoBasedOnConfig=(c,u,d)=>!(!d||!c||u),MediaInfo=({showAudioClipMediaInfo:c=!1})=>{let{playerState:{mediaMetaData:u,playerCoordinator:d}}=useAudioPlayerContext(),{coverArt:p,podcastTitle:h,podcastShowPageUrl:f,publishedAt:m,seasonNumber:g,episodeNumber:v,episodeTitle:y,episodePageUrl:b,duration:S,description:_,hasPodcastData:E}=calculateFieldValuesFromMetaData(u),T=v?translate("audio-mediaInfo-episodeText",{episodeNumber:`${v}`}):void 0,w=g?translate("audio-mediaInfo-seasonText",{seasonNumber:`${g}`}):void 0,P=shouldCenterMediaInfoBasedOnConfig(c,_,p)?"media-info media-info--center":"media-info",A=T$4((c,u)=>{null==d||d.dispatchPlayerEvent({type:"podcastTitleClick",titleType:c,titleText:u,playerId:d.playerId})},[d]);return o$i("section",{class:P,children:[o$i("div",{class:"media-info__podcast-data",children:[h&&o$i(MediaInfoPodcastTitle,{podcastTitle:h,podcastShowPageUrl:f,onClickCallback:A}),E&&o$i(MediaInfoList,{podcastShowTitle:h,podcastShowPageUrl:f,episodeText:T,seasonText:w,publishedAt:m,showHeadphoneIcon:c,onClickCallback:A}),c&&o$i(AudioClipMediaInfoList,{duration:S}
10)]}),o$i(MediaInfoTitle,{podcastEpisodeTitle:y,episodePageUrl:b,onClickCallback:A}),_&&o$i(MediaInfoDescription,{description:_})]})},MediaInfoDescription=({description:c})=>{let[u,d]=h$3(!0),[p,h]=h$3(),f=_$3(null);useResize(()=>{var c,u,p;let m=null==(p=null==(u=null==(c=f.current)?void 0:c.querySelector(".media-info__description--text"))?void 0:u.shadowRoot)?void 0:p.querySelector("p");m&&(h(m.scrollHeight),m.scrollHeight===m.clientHeight&&d(!1))},f);let m=c=>{d(!1),c.stopPropagation()};return o$i("div",{ref:f,onpointerup:isMobileDevice()?m:c=>c.stopPropagation(),style:{"--media-info-description-max-height":`${p}px`},class:u?"media-info__description":"media-info__description media-info__description--expanded",children:[o$i(CosmosText,{class:"media-info__description--text",kind:"subtle",size:"x-small",tag:"p",clamp:u&&2,children:c}),u&&o$i(CosmosText,{class:"media-info__description--expand-icon",kind:"normal",size:"x-small",tag:"span",onPointerup:m,children:o$i(CosmosIconChevronDown,{})})]})},styles$7=':host,:root{all:initial}@font-face{font-family:Bull Text;font-style:normal;font-weight:400;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Regular.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Regular.woff) format("woff")}@font-face{font-family:Bull Text;font-style:normal;font-weight:500;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Medium.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Medium.woff) format("woff")}@font-face{font-family:Bull Text;font-style:normal;font-weight:700;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Bold.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Bold.woff) format("woff")}@font-face{font-family:Bull;font-style:normal;font-weight:700;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Bold.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Bold.woff) format("woff")}@font-face{font-family:Bull;font-style:normal;font-weight:800;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Heavy1.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Heavy1.woff) format("woff")}@font-face{font-family:Bull VF;font-style:normal;font-weight:300 800;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullVAR.woff2) format("woff2-variations"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullVAR.woff2) format("woff2")}.cover-art{border-radius:8px}.error-cover-art{display:flex;justify-content:center;align-items:center;height:100%;border-radius:8px}.error-cover-art__icon{width:32px;height:32px;flex-shrink:0}.error-cover-art--light{background-color:#000f1e0d}.error-cover-art--light .error-cover-art__icon{color:#000f1e33}.error-cover-art--dark{background-color:#ffffff0d}.error-cover-art--dark .error-cover-art__icon{color:#fff3}.error-decoration{align-items:center;justify-content:flex-end;flex-grow:1;padding-right:4px;display:none}.default-theme--error-light .media-info--center,.default-theme--error-dark .media-info--center{gap:4px}.default-theme--error-light .media-info__title,.default-theme--error-dark .media-info__title{height:auto}.default-theme--error-light .error-decoration__headphone-icon{color:#000f1e1a}.default-theme--error-dark .error-decoration__headphone-icon{color:#ffffff1a}.cq-650 .error-decoration{display:flex}.listen-on{align-items:center;display:flex;flex-direction:column;justify-content:center}.listen-on__label{margin:0 0 12px}.listen-on__platforms{height:100%}.listen-on .distribution-icons__icons{width:20px;height:20px;color:#fff9}.cq-900 .listen-on{flex-direction:row;justify-content:flex-start}.cq-900 .listen-on__label{margin:0 4px 0 0}.default-theme--light .listen-on .distribution-icons__icons{color:#000f1e99}.play-seek-controls__play-seek-pause-container{justify-content:center;align-items:center;display:flex;gap:12px}.play-seek-controls__play-seek-pause-container .play-seek-controls__icon{height:28px;width:28px}.play-seek-controls__play-seek-pause-container [data-rbup-pause]::part(base),.play-seek-controls__play-seek-pause-container [data-rbup-play]::part(base){height:56px;max-width:56px;min-width:56px;width:56px}.play-seek-controls__play-seek-pause-container [data-rbup-pause]{--cosmos-button-background-hover: var(--rbup-play-button-background-hover-color)}.play-seek-controls__play-seek-pause-container [data-rbup-play]{--cosmos-button-background: var(--rbup-primary-color);--cosmos-button-background-hover: var(--rbup-play-button-background-hover-color)}.play-seek-controls__play-seek-pause-container .play-seek-controls__spinner{width:56px;height:56px}.default-theme--error-light .play-seek-controls__play-seek-pause-container,.default-theme--error-dark .play-seek-controls__play-seek-pause-container{pointer-events:none}.default-theme--error-light .play-seek-controls__play-seek-pause-container [data-rbup-play]{--cosmos-button-background: rgba(0, 15, 30, .05)}.default-theme--error-light .play-seek-controls__play-seek-pause-container [data-rbup-seek-back],.default-theme--error-light .play-seek-controls__play-seek-pause-container [data-rbup-seek-forward]{--cosmos-button-color: rgba(0, 15, 30, .05)}.default-theme--error-dark .play-seek-controls__play-seek-pause-container [data-rbup-play]{--cosmos-button-background: rgba(255, 255, 255, .1);--cosmos-button-color: #000F1E}.default-theme--error-dark .play-seek-controls__play-seek-pause-container [data-rbup-seek-back],.default-theme--error-dark .play-seek-controls__play-seek-pause-container [data-rbup-seek-forward]{--cosmos-button-color: rgba(255, 255, 255, .1)}.scrub-bar{width:100%}.scrub-bar__rail-container{position:relative}.scrub-bar__rail{grid-row:2;height:2px;transition:transform .3s cubic-bezier(0,.32,.32,1);width:100%}.scrub-bar__waveform{grid-row:1;height:20px}.scrub-bar-section{align-items:center;cursor:pointer;display:grid;height:22px;-webkit-user-select:none;user-select:none;font:initial}.default-theme--error-light .scrub-bar__rail{background-color:#000f1e0d}.default-theme--error-dark .scrub-bar__rail{background-color:#ffffff1a}.scrub-bar-section:hover .scrub-bar__rail{transform:scaleY(2)}.default-theme--error-light .scrub-bar,.default-theme--error-dark .scrub-bar{pointer-events:none}.scrub-bar-handle{background:#fff;border-radius:9999px;box-shadow:0 2px 8px #000f1e;color:#fff;cursor:pointer;height:16px;left:0;opacity:0;position:absolute;top:-8px;transform:translate(-8px);transition:opacity .25s;width:16px}.scrub-bar-handle-visible{opacity:1}.media-info{align-items:center;display:flex;flex-direction:column;gap:10px}.media-info__podcast-data{align-items:center;display:flex;flex-direction:column;gap:4px}.media-info__data-list{align-items:baseline;display:flex;list-style:none;margin:0;padding:0}.media-info__data-list>*:not(:first-child){margin-left:4px}.media-info__data-list>*:not(:last-child){margin-right:4px}.media-info__separator:last-child{display:none}.media-info__data-list-title{display:none}.media-info__title{height:60px;text-align:center;align-content:center}
10.media-info__description{display:flex;max-height:2.5rem;overflow:hidden;transition:max-height 333ms cubic-bezier(.4,0,.22,1)}.media-info__description--expanded{max-height:var(--media-info-description-max-height, 10rem)}.media-info__description--text{text-align:center}.media-info__description--expand-icon{align-self:flex-end;margin-bottom:-4px;padding:2px}.cq-650 .media-info{align-items:start}.cq-650 .media-info__data-list-title{display:flex}.cq-650 .media-info__podcast-data{align-items:flex-start;flex-direction:row}.cq-650 .media-info__podcast-title{display:none}.cq-650 .media-info__title{text-align:start;height:auto}.cq-650 .media-info--center{position:absolute;bottom:50%;transform:translateY(calc(50% - 14px));margin-right:20px}.cq-650 .media-info__description--text{text-align:start}.waveform-canvas{height:20px;width:100%}.remaining-time{word-break:normal}.default-theme--error-light .remaining-time,.default-theme--error-dark .remaining-time{display:none}.themed-audio-player{--rbup-primary-color: #DB0A40}.themed-audio-player__grid{display:grid;gap:24px}.cq-1150 .themed-audio-player__grid{grid-template-areas:". . playlist"}.default-theme{background-color:#001c39;border-radius:8px;box-shadow:0 0 30px #000f1e99}.default-theme *{box-sizing:border-box}.default-theme__grid{display:grid;position:relative;grid-template-areas:". . ." ". cover-image ." ". media-info ." ". controls ." ". scrub-bar ." "listen-on listen-on listen-on";gap:16px}.default-theme__grid--no-cover{grid-template-areas:". . ." "media-info media-info media-info" ". controls ." "scrub-bar scrub-bar scrub-bar" "listen-on listen-on listen-on"}.default-theme__grid--no-cover .scrub-bar{padding:0 16px}.default-theme__controls{align-items:center;display:flex;flex-direction:column;gap:16px;grid-area:controls;margin-top:-16px;margin-bottom:-16px}.default-theme__cover-image{grid-area:cover-image;justify-self:center;margin:16px}.default-theme__cover-image>section{height:135px;width:135px}.default-theme__media-info{grid-area:media-info}.default-theme__grid--no-cover .default-theme__media-info{padding:0 16px}.default-theme__scrub-bar{align-self:center;grid-area:scrub-bar;justify-self:stretch}.default-theme__listen-on{grid-area:listen-on;background-color:#ffffff0d;border-radius:0 0 8px 8px;padding:16px}.default-theme__listen-on-with-media-info{display:none;margin-top:8px}.default-theme__scrub-bar-time{align-items:center;display:none;height:22px}.default-theme__scrub-bar--with-waveform .default-theme__scrub-bar-time{align-items:flex-end}.cq-650 .default-theme__grid{grid-template-areas:". . . . ." ". cover-image media-info media-info ." ". cover-image scrub-bar controls ." "listen-on listen-on listen-on listen-on listen-on";grid-template-columns:0 200px auto 176px 0}.cq-650 .default-theme__grid--no-cover{grid-template-areas:". . . ." ". media-info media-info ." ". scrub-bar controls ." "listen-on listen-on listen-on listen-on";grid-template-columns:0 auto 176px 0;min-height:175px;gap:16px 24px}.cq-650 .default-theme__controls{align-self:end;justify-self:end;margin-bottom:0}.cq-650 .default-theme__controls-time{display:none}.cq-650 .default-theme__cover-image{justify-self:start;margin:0 8px 0 0}.cq-650 .default-theme__cover-image>section{height:200px;width:200px}.cq-650 .default-theme__scrub-bar{align-items:end;align-self:end;display:flex;gap:16px;margin:0 0 8px}.cq-650 .default-theme__listen-on{padding:12px 16px 24px}.cq-650 .default-theme__scrub-bar-time{display:flex}.cq-900 .default-theme__grid{grid-template-columns:0 240px auto 176px 0}.cq-900 .default-theme__grid--no-cover{grid-template-columns:0 auto 176px 0}.cq-900 .default-theme__cover-image>section{height:240px;width:240px}.cq-900 .default-theme__listen-on{display:none}.cq-900 .default-theme__listen-on-with-media-info{display:block}.default-theme--light{background-color:#fff;box-shadow:0 0 30px #000f1e33}.default-theme--light .default-theme__listen-on{background-color:#000f1e0d}.default-theme--error-light{background-color:#efefef}.default-theme--error-dark{background-color:#001c39}',AudioBreakpoint={small:540,medium:650,large:900,"x-large":1150},AUDIO_BREAKPOINTS=[AudioBreakpoint.small,AudioBreakpoint.medium,AudioBreakpoint.large,AudioBreakpoint["x-large"]];function resolveNextEpisodeId(c,u){let d=c.findIndex(c=>c.megaphoneEpisodeId===u);if(d!==c.length-1)return c[d+1]}
10let playbackFinishedHandler=async(c,u)=>{if(!c||!u)return;let d=c.getMediaMetaData(),p=null==d?void 0:d.playlist,h=null==d?void 0:d.megaphoneEpisodeId;if(!p||!h)return;let f=resolveNextEpisodeId(p,h);if(!f)return;dispatchPlaylistPlayerEvent("NEXT_EPISODE_TRIGGERED_AUTOMATICALLY",c);let m={...u,assetId:f.megaphoneEpisodeId};await c.load(m)},loadedHandler=async c=>{await (null==c?void 0:c.play())},PlayerEventHandler={playbackFinished:playbackFinishedHandler,loaded:loadedHandler},usePlaylistAutoAdvance=(c,u)=>{p$7(()=>{if(c){let d=d=>{var p;null==(p=PlayerEventHandler[d.type])||p.call(PlayerEventHandler,c,u)};return c.addEventListener(d),()=>{c.removeEventListener(d)}}},[u,c])},styles$6='@charset "UTF-8";.playlist-item{display:grid;grid-template-areas:"cover-art description";grid-template-columns:auto 1fr;height:108px;padding:16px;gap:16px;cursor:pointer}.playlist-item:hover{background-color:#ffffff1a}.playlist-item__data-list{display:grid;grid-template-columns:repeat(3,max-content);gap:0}.playlist-item__data-list--episode:after,.playlist-item__data-list--publishing-date:after{content:"•";margin:0 8px}.playlist-item__description{grid-area:description;display:flex;flex-direction:column;gap:4px;justify-content:center}.playlist-item__description--currently-playing{--cosmos-text-color: #E06600}.playlist-item__cover-art{grid-area:cover-art;width:76px;height:76px}.playlist-item__title{display:grid}.default-theme .playlist-item__data-list{color:#fff9}.default-theme--light .playlist-item:hover{background-color:#000f1e1a}.default-theme--light .playlist-item__data-list{color:#000f1e99}.themed-audio-player__playlist{position:relative;border-radius:8px;width:100%;-webkit-user-select:none;user-select:none;overflow:hidden}.themed-audio-player__playlist-elements::-webkit-scrollbar{width:4px}.themed-audio-player__playlist-elements::-webkit-scrollbar-track{background-color:transparent}.themed-audio-player__playlist-elements::-webkit-scrollbar-thumb{background-color:#fff9;border-radius:8px}.default-theme{background-color:#001c39}.default-theme--light{background-color:#fff}.default-theme--light .themed-audio-player__playlist-elements::-webkit-scrollbar-thumb{background-color:#000f1e99}.cq-1150 .themed-audio-player__playlist{width:448px;height:272px}.cq-1150 .themed-audio-player__playlist-elements{height:100%;overflow-x:hidden;overflow-y:scroll}',styles$5=".themed-audio-player__playlist-elements-footer{display:flex;align-items:center;flex-direction:column;padding:24px 16px;background-color:#000f1e0d;gap:8px;border-top:1px solid rgba(0,15,30,.1)}.themed-audio-player__playlist-elements-footer .distribution-icons__tooltip-wrapper{display:flex;gap:4px}.themed-audio-player__playlist-elements-footer .distribution-icons__tooltip-wrapper>*{background:#f8f8f8;border-radius:50%}.themed-audio-player__playlist-elements-footer .distribution-icons__tooltip-wrapper .distribution-icons__icons{width:18px;height:18px;color:#000f1e}.default-theme--dark .themed-audio-player__playlist-elements-footer{background-color:#ffffff0d;border-color:#ffffff1a}.default-theme--dark .themed-audio-player__playlist-elements-footer .distribution-icons__tooltip-wrapper>*{background:#000f1e73}.default-theme--dark .themed-audio-player__playlist-elements-footer .distribution-icons__tooltip-wrapper>* .distribution-icons__icons{color:#fff}",PlaylistFooter=({remainingEpisodeCount:c,distributions:u,uiMode:d})=>{let p=resolveFooterText(c);return null!=u&&u.length?o$i(k$5,{children:[o$i("style",{children:styles$5}),o$i("div",{class:"themed-audio-player__playlist-elements-footer",children:[o$i(CosmosText,{size:"x-small",kind:"normal",weight:"bold",appearance:transformUIModeToCosmosAppearance(d),children:p}),o$i(DistributionIcons,{distributions:u,buttonType:"tertiary",uiMode:d})]})]}):null};function resolveFooterText(c){return 0===c||void 0===c?translate("audio-podcast-playlist-all-episodes-on"):1===c?translate("audio-podcast-playlist-additional-episodes-on",{additionalEpisodes:`${c}`}):translate("audio-podcast-playlist-additional-episodes-on_plural",{additionalEpisodes:`${c}`})}function formatPublishedAtDate(c){try{return new Intl.DateTimeFormat(navigator.language,{day:"numeric",month:"long",year:"numeric"}).format(new Date(c))}catch{return"Invalid Date"}}let CurrentlyPlaying=()=>o$i(CosmosText,{"data-rbup-audio-playlist-item-currently-playing":!0,class:"playlist-item__description--currently-playing",size:"x-small",tag:"span",weight:"medium",children:[o$i(CosmosIconPlay,{})," ",translate("audio-podcast-currently-playing")]}),DataListText=({classNamePostfix:c,text:u,appearance:d})=>{let p=`playlist-item__data-list--${c}`;return o$i(CosmosText,{...{[`data-rbup-audio-playlist-item-${c}`]:!0},class:p,size:"x-small",tag:"span",kind:"subtle",weight:"medium",appearance:d,children:u})},PlaylistItem=({currentlyPlaying:c,data:u,episodeIndex:d,onPointerUp:p,uiMode:h})=>{let{coverArt:f,title:m,publishedAt:g,duration:v,megaphoneEpisodeId:y}=u,b=calculateCoverArtUrl(f),S=transformUIModeToCosmosAppearance(h),_=formatDuration(v),E=formatPublishedAtDate(g);return o$i("div",{"data-rbup-audio-playlist-item-currently-playing":c,"data-rbup-audio-playlist-item":!0,class:"playlist-item",role:"button",onPointerUp:()=>p(y),children:[b&&o$i(CosmosImage,{"data-rbup-audio-playlist-item-cover-
10art":!0,class:"playlist-item__cover-art",image:b.defaultRes,imagePreview:b.lowRes,imageAlt:m}),o$i("div",{class:"playlist-item__description",children:[c&&o$i(CurrentlyPlaying,{}),o$i("div",{class:"playlist-item__data-list",children:[d&&o$i(DataListText,{classNamePostfix:"episode",text:d,appearance:S}),o$i(DataListText,{classNamePostfix:"publishing-date",text:E,appearance:S}),o$i(DataListText,{classNamePostfix:"duration",text:`${_}`,appearance:S})]}),o$i(CosmosText,{"data-rbup-audio-playlist-item-title":!0,class:"playlist-item__title",size:"x-small",weight:"bold",appearance:S,clamp:2,children:m})]})]})};function resolveFormattedPlaylistEpisodeNumber(c){return void 0===c||c<0?void 0:`E${c<10?"0":""}${c}`}function resolvePlaylistClassName(c){return["themed-audio-player__playlist",resolveThemeClassName(c,!1)].join(" ")}let Playlist=({config:c})=>{let u=_$3(null),{playerState:{uiMode:d,mediaMetaData:p,playerCoordinator:h}}=useAudioPlayerContext(),{totalNumberOfEpisodes:f,distributions:m,playlist:g,megaphoneEpisodeId:v}=p??{},y=getThemeCSSVariables(c.theme),b=resolvePlaylistClassName(d),S=g&&f?f-g.length:void 0,_=F$4(()=>(null==m?void 0:m.filter(c=>APPROVED_PODCAST_PLATFORMS.includes(c.platform)))??[],[m]),E=T$4(u=>{if(h){dispatchPlaylistPlayerEvent("NEXT_EPISODE_TRIGGERED_BY_USER_INTERACTION",h);let d={...c,assetId:u};h.load(d)}},[c,h]);return p$7(()=>{let c=u.current;if(!c)return;let d=c.querySelector('[data-rbup-audio-playlist-item-currently-playing="true"]');if(d){let u=c.getBoundingClientRect().top,p=d.getBoundingClientRect().top-u+c.scrollTop;c.scrollTo({top:p,behavior:"smooth"})}},[v]),usePlaylistAutoAdvance(h,c),o$i(k$5,{children:[o$i("style",{children:styles$6}),o$i("div",{"data-rbup-audio-playlist":!0,class:b,children:o$i("div",{"data-rbup-audio-playlist-elements":!0,class:"themed-audio-player__playlist-elements",style:y,ref:u,children:[null==g?void 0:g.map((c,u)=>o$i(PlaylistItem,{currentlyPlaying:c.megaphoneEpisodeId===v,data:c,episodeIndex:resolveFormattedPlaylistEpisodeNumber(c.episodeNumber),uiMode:d,onPointerUp:E},u)),_.length>0&&o$i(PlaylistFooter,{remainingEpisodeCount:S,distributions:_,uiMode:d})]})})]})};function resolveHasMegaphonePlaylist(c){return!!c&&c.length>0}let InnerThemedAudioPlayer=k$3((c,u)=>{let{config:d,dataLoader:p,id:h,internalOnApiAvailable:f,styles:m,ThemeComponent:g}=c,{init:v,playerState:{playerCoordinator:y,mediaMetaData:b}}=useAudioPlayerContext(),S=_$3(null),[_,E]=h$3(areTranslationsLoaded());onTranslationDataLoaded(()=>E(!0));let T=useContainerQuery(S,AUDIO_BREAKPOINTS),w=cssClassesContainsBreakpoint(T,`${AudioBreakpoint.large}`),P=getThemeCSSVariables(null==d?void 0:d.theme),A=resolveHasMegaphonePlaylist(null==b?void 0:b.playlist),I=A?"themed-audio-player__grid":"",M=T$4(c=>{c&&v(c)},[v]);return o$i(k$5,{children:[o$i("style",{children:m}),o$i("div",{"data-rbup-themed-audio-player":!0,id:h,class:`themed-audio-player ${T}`,ref:S,style:P,children:d&&o$i(k$5,{children:[o$i(RbupAudioCore,{ref:u,config:d,dataLoader:p,onCoordinatorAvailable:M,internalOnApiAvailable:f}),o$i("div",{class:`${I}`,children:[y&&o$i(g,{isPlayerSizeLarge:w}),A&&o$i(Playlist,{config:d})]})]})})]})}),ThemedAudioPlayer=k$3((c,u)=>o$i(AudioPlayerStateContextProvider,{children:o$i(InnerThemedAudioPlayer,{ref:u,...c})}));function displayErrorOrMediaInfo(c){let{hasError:u,showAudioClipMediaInfo:d,showListenOn:p,isPlayerSizeLarge:h}=c;return o$i("div",{class:"default-theme__media-info",children:u?o$i(ErrorInfo,{}):o$i(k$5,{children:[o$i(MediaInfo,{showAudioClipMediaInfo:d}),o$i("div",{class:"default-theme__listen-on-with-media-info",children:p&&o$i(ListenOn,{isPlayerSizeLarge:h})})]})})}let ErrorOrCoverArtComponent=x$5(({hasError:c,coverArt:u,uiMode:d})=>{let p=({children:c})=>o$i("div",{class:"default-theme__cover-image",children:c});return c?o$i(p,{children:o$i(ErrorCoverArt,{uiMode:d})}):u?o$i(p,{children:o$i(CoverArt,{coverArt:u})}):null}),DefaultThemeComponent$1=({isPlayerSizeLarge:c})=>{let{playerState:{coverArt:u,mediaMetaData:d,uiMode:p,playerStatus:h}}=useAudioPlayerContext(),f=_$3(null),m=f.current,g=m?getComputedStyle(m).getPropertyValue("--rbup-primary-color"):"#fff",v=!!(null!=d&&d.waveformPoints),y=!!(null!=d&&d.distributions),b=!y,S="ERROR"===h,_=resolveThemeClassName(p,S),E=isValidUrl(u)?u:void 0;return o$i("div",{class:_,children:o$i(CosmosMode,{mode:p,children:o$i("div",{class:["default-theme__grid",!E&&!S&&"default-theme__grid--no-cover"].filter(
10Boolean).join(" "),ref:f,children:[o$i(ErrorOrCoverArtComponent,{hasError:S,coverArt:E,uiMode:p}),displayErrorOrMediaInfo({hasError:S,showAudioClipMediaInfo:b,showListenOn:y,isPlayerSizeLarge:c}),o$i("div",{class:"default-theme__controls",children:[o$i(PlaySeekControls$1,{}),o$i("div",{class:"default-theme__controls-time",children:o$i(RemainingTime,{})})]}),o$i("div",{class:`default-theme__scrub-bar ${v?"default-theme__scrub-bar--with-waveform":""}`,children:[o$i(ScrubBar$1,{uiMode:p,primaryColor:g}),o$i("div",{class:"default-theme__scrub-bar-time",children:o$i(RemainingTime,{})})]}),y&&o$i("div",{class:"default-theme__listen-on",children:o$i(ListenOn,{isPlayerSizeLarge:c})})]})})})},RbupAudioDefaultTheme=k$3((c,u)=>o$i(ThemedAudioPlayer,{ref:u,styles:styles$7,ThemeComponent:DefaultThemeComponent$1,...c}));if(typeof window>"u")throw Error("SSR is not supported");function defaultVideoQuality$1(){return{isAuto:!0,id:"auto",height:0,width:0}}function createDefaultPlayerContextState(){return{playerState:{audioTracks:[],cumulatedPlayTimeInSec:0,durationInSec:0,isFullscreenMode:!1,isInPictureInPictureMode:!1,isHdPlayback:!1,isShowingAd:!1,liveStatus:void 0,maxTimeShiftInSec:0,playbackMode:"VOD",playbackPosInSec:0,playbackSpeed:1,playerStatus:"IDLE",selectedAudioTrack:void 0,selectedSubtitleTrack:void 0,selectedVideoQuality:defaultVideoQuality$1(),subtitleTracks:[],timeShiftInSec:0,videoBufferLengthInSec:0,videoLoaded:!1,videoQualities:[],isVRVideo:!1,isCasting:!1,isCastingAvailable:!1},init:()=>{}}}let defaultPlayerContextState=createDefaultPlayerContextState(),PlayerStateContext=G$1(null);function createPlayerStateFromCoordinator(c){var u,d,p;let h=c.getPlaybackMode(),f="LIVE"===h?c.getLiveVariant():void 0;return{audioTracks:c.getAvailableAudioTracks(),cumulatedPlayTimeInSec:c.getCumulatedPlayTimeInSec(),currentErrorDetails:c.getCurrentErrorDetails(),durationInSec:c.getDurationInSec(),isFullscreenMode:c.isInFullscreenMode(),isInPictureInPictureMode:c.isInPictureInPictureMode(),isHdPlayback:c.isHdPlayback(),isShowingAd:(null==(u=c.getPlayerData())?void 0:u.isShowingAd())??!1,liveStatus:c.getLiveStatus(),liveVariant:f,maxTimeShiftInSec:c.getMaxTimeShiftInSec(),mediaMetaData:c.getMediaMetaData(),playbackMode:h,playbackPosInSec:(null==(d=c.getPlayerData())?void 0:d.getCurrentTimeInSec())??0,playbackSpeed:c.getPlaybackSpeed(),playerConfiguration:c.getPlayerConfiguration(),playerCoordinator:c,playerStatus:c.getPlayerStatus(),posterImage:c.getPosterImage(),selectedAudioTrack:c.getSelectedAudioTrack(),selectedSubtitleTrack:c.getSelectedSubtitleTrack(),selectedVideoQuality:c.getSelectedVideoQuality(),subtitleTracks:c.getSubtitleTracks(),timeShiftInSec:c.getTimeShiftInSec(),videoBufferLengthInSec:c.getBufferLengthInSec(),videoLoaded:c.isVideoLoaded,videoQualities:c.getAvailableVideoQualities(),isVRVideo:(null==(p=c.getPlayerData())?void 0:p.isVRVideo())??!1,isCastingAvailable:c.isCastingAvailable(),isCasting:c.isCastingVideo(),castingDeviceName:c.getCastingDeviceName()}}let PlayerStateContextProvider=({children:c})=>{let[u,d]=h$3(defaultPlayerContextState.playerState),[p,h]=h$3(),f=T$4(c=>{h(c)},[]);p$7(()=>
10{if(!p)return()=>{};let c=c=>{d(createPlayerStateFromCoordinator(p))};return p.addEventListener(c),d(createPlayerStateFromCoordinator(p)),()=>{p.removeEventListener(c)}},[p]);let m=F$4(()=>({playerState:u,init:f}),[u,f]);return o$i(PlayerStateContext.Provider,{value:m,children:c})},usePlayerContext=()=>{let c=q$2(PlayerStateContext);if(!c)throw Error("no player state context context found");return c},isFocusedByKeyboard=c=>{let u=c.target;if(!(u instanceof Element))return!1;let d=u.shadowRoot?u.shadowRoot.activeElement:u;return!!(null!=d&&d.matches(":focus-visible"))},ControlsVisibilityContext=G$1({}),ControlsVisibilityContextProvider=({children:c})=>{let u=_$3(-1),{playerState:{playerStatus:d,isInPictureInPictureMode:p}}=usePlayerContext(),[h,f]=h$3("fade-in"),[m,g]=h$3("allow"),[v,y]=h$3("CLOSED"),[b,S]=h$3("NOT_HOVERED"),[_,E]=h$3("NOT_FOCUSED"),T=_$3();T.current=p;let w=_$3();w.current=d;let P=_$3();P.current=v;let A=T$4(c=>{f(c),("hide"===c||"fade-out"===c)&&y("CLOSED")},[f]),I=T$4(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>{T.current||"PAUSED"!==w.current&&"CLOSED"===P.current&&"HOVERED"!==b&&"FOCUSED"!==_&&A("fade-out")},3e3)},[b,_,A]),M=T$4(()=>{I(),A("fade-in")},[A,I]),R=T$4(()=>{window.clearTimeout(u.current),A("fade-in")},[A]),k=T$4(()=>{window.clearTimeout(u.current),A("fade-out")},[A]),x=T$4(()=>{window.clearTimeout(u.current),A("hide")},[A]),C=T$4(()=>{f(c=>{let u="fade-in"===c?"fade-out":"fade-in";return"fade-in"===u&&M(),u})},[M]),O=T$4(c=>{var u;S("NOT_HOVERED"),null==(u=c.target)||u.removeEventListener("pointerleave",O)},[]),D=T$4((c,u=!1)=>{let d="button"===c.target.type;if((isMouse(c)||isPen(c))&&d||u){S("HOVERED");let u=d?c.target:c.currentTarget;null==u||u.addEventListener("pointerleave",O)}},[O]),L=T$4(c=>{isFocusedByKeyboard(c)&&(E("FOCUSED"),R())},[R]),N=T$4(c=>{E("NOT_FOCUSED")},[]),U=T$4(c=>{y(u=>c===u?"CLOSED":c)},[]);p$7(()=>{("PLAYING"===d||"PAUSED"===d)&&M()},[d,M]),p$7(()=>{"CLOSED"===v&&M()},[v,M]),p$7(()=>()=>{window.clearTimeout(u.current)},[]);let F=F$4(()=>({controlsVisibility:h,showControlsTemporarily:M,showControlsPermanently:R,fadeControlsAway:k,hideControls:x,toggleControlsVisibility:C,allowControlsRendering:m,setAllowControlsRendering:g,menuState:v,setMenuState:y,onControlsElementEnter:D,onControlsElementFocus:L,onControlsElementBlur:N,toggleMenu:U,isControlsFocused:"FOCUSED"===_}),[h,M,R,k,x,C,m,v,D,L,N,U,_]);return o$i(ControlsVisibilityContext.Provider,{value:F,children:c})},useControlsVisibilityContext=()=>q$2(ControlsVisibilityContext),findContinuousRegions=(c,u,d,p)=>{let h=[],f=null,m=c=>{c.endTime-c.startTime>=p&&h.push({startTime:c.startTime,endTime:c.endTime})};for(let p=0;p<c.length;p++){let h=c[p],g=p*u,v=(p+1)*u;h>=d?null===f?f={startTime:g,endTime:v}:f.endTime=v:null!==f&&(m(f),f=null)}return null!==f&&m(f),h};function useHeatmapMostReplayedScenes(c,u,d={}){let{threshold:p=.95,minSceneDuration:h=2}=d;return F$4(()=>{if(!(null!=u&&u.values.length)||c<=0)return null;let{values:d,coveredDuration:f}=u,m=f/d.length,g=Math.max(...d);return findContinuousRegions(d,m,p<=1?p*g:p,h)},[u,c,p,h])}let StreamingButtonBarContext=G$1(null);function useStreamingButtonBar(){return q$2(StreamingButtonBarContext)}StreamingButtonBarContext.Provider;let RbupVideoCornerbug=({IconComponent:c})=>{let{playerState:{playerStatus:u}}=usePlayerContext(),d="PLAYING"===u,[p,h]=h$3(d);return p$7(()=>{d&&h(!0)},[d]),o$i("div",{class:"cornerbug",children:p&&o$i("div",{"data-rbup-cornerbug":!0,class:"cornerbug__icon",children:o$i(c,{})})})},RbupVideoDefaultCornerbugIcon=x$5(()=>{let[c,u]=h$3(""),[d]=h$3(`cb${v4().replace(/-/g,"")}`),p=`.default-corner-bug.mono *{transition:.4s linear}.default-corner-bug.mono #o_${d}{fill:hsla(0,0%,100%,0)}.default-corner-bug.mono #b_${d}{fill:#fff}.default-corner-bug.mono #s1_${d} stop:first-child{stop-color:#fff}.default-corner-bug.mono #s1_${d} stop:nth-child(2){stop-color:hsla(0,0%,100%,.64)}.default-corner-bug.mono #s1_${d} stop:nth-child(3){stop-color:hsla(0,0%,100%,0)}.default-corner-bug.mono #s2_${d} stop:first-child{stop-color:#fff}.default-corner-bug.mono #s2_${d} stop:nth-child(2){stop-color:hsla(0,0%,100%,0)}.default-corner-bug.mono #s4_${d} stop{stop-color:#fff}.default-corner-bug.mono #s4_${d} stop:first-child{stop-color:hsla(0,0%,100%,.55)}.default-corner-bug.mono #s31_${d} stop,.default-corner-bug.mono #s32_${d} stop,.default-corner-bug.mono #s33_${d} stop,.default-corner-bug.mono #s34_${d} stop{stop-color:hsla(0,0%,100%,.4)}`,h=o$i("svg",{"data-rbup-default-cornerbug":!0,xmlns:"http://www.w3.org/2000/svg",class:`default-corner-bug ${d} ${c}`,viewBox:"0 0 397.44 222.14",children:[o$i("style",{children:p}),o$i("defs",{children:[o$i("linearGradient",{id:`s1_${d}`,x1:"234",y1:"111",x2:"464",y2:"13",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:".23","stop-color":"#f2940a"}),o$i("stop",{offset:".52","stop-color":"#f2940a"}),o$i("stop",{offset:"1","stop-color":"#f2940a"})]}),o$i("linearGradient",{id:`s2_${d}`,x1:"209",y1:"87",x2:"426",y2:"87",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:"0","stop-color":"#FAD50A"}),o$i("stop",{offset:".92","stop-color":"#FAD50A"})]}),o$i("linearGradient",{id:`s31_${d}`,x1:"221",y1:"163",x2:"379",y2:"129",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:".35","stop-color":"#52bce8"}),o$i("stop",{offset:".78","stop-color":"#3977AB"}),o$i("stop",{offset:"1","stop-color":"#21336e"})]}),o$i("linearGradient",{id:`s32_${d}`,x1:"355",y1:"129",x2:"379",y2:"124",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:"0","stop-color":"#3a78ac"}),o$i("stop",{offset:".86","stop-color":"#253e78"}),o$i("stop",{offset:"1","stop-color":"#21336e"})]}),o$i("linearGradient",{id:`s33_${d}`,x1:"227",y1:"203",x2:"315",y2:"203",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:".54","stop-color":"#52bce8"}),o$i("stop",{offset:"1","stop-color":"#49a4d3"})]}),o$i("linearGradient",{id:`s34_${d}`,x1:"285",y1:"206",x2:"367",y2:"194",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:".24","stop-color":"#52bce8"}),o$i("stop",{offset:"1","stop-color":"#3f88b9"})]}),o$i("linearGradient",{id:`s4_${d}`,x1:"219",y1:"160",x2:"399",y2:"160",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:"0","stop-color":"#1885c8"}),o$i("stop",{offset:".73","stop-color":"#1e4475"}),o$i("stop",{offset:"1","stop-color":"#22183d"})]})]}),o$i("path",{id:`o_${d}`,fill:"#fff",d:"M223.74 174.22c5.18-1.22 9.91-4 15.21-3.57 8.76 1.35 12.91-.36 19.6-4.69 4.91 2.81 10.74 8.67 22.72 8.54 3.85.25 8.32-1.65 7.42-5.72-.24-3.53 6.68-2 7.12-6.5.77-2.69.2-2.58-4-5.11-7-3.83-6.88-11.15-12.15-15.89-.58-.69-2.29-1.93-2.34-2.8-17.57-47.55 3.14-31.32-36.76-76.19-11.35-8.42-27.94-27.78-42.68-26.63-13.38.43-16.77 8-26.63 11.21-12.44 4.41-19.9 5.67-29.91 15-6.48 5.44-15.09-1.28-24.3 8.41-19.51 19.67-21.7 1.18-53.73 26.18-16.56 14.38-39.44 4-21-14.49 9.35-6.67 21.19-14.88 16.82-27.62-1.48-9.54-15.19-12.18-23.83-13.55-
105-1-13.54-7.57-16.36-9.35-8.46 9.49-4.23 31.42 14 33.65a1.49 1.49 0 011.4 1.4 2.83 2.83 0 01-.46 1.87C20.81 78.66 18 82.86 17.54 94.55c-1 16 12.19 28.12 29 27.57a53.25 53.25 0 008-.47c.46 0 .93 0 .93.47 1.32 7.23 1.88 16.07 4.21 18.7.46.93.46 1.87-.47 2.33-5.35 5.26-16.75-.67-19.63 8.88-1.79 3.9-1.36 8.75-5.6 10.75-3-.66-3.8-5.1-7.95-5.14s-11 3.06-14 9.82c-3.2 2.19-6.44.7-7.94 5.6-.68-.05-1.05 2.59-.93 3.74a13.49 13.49 0 01-1.87 6.08c-3.08 3.89.26 8.65 5.14 9.35 3.61.28 5.89 1.7 7 .46.46 0 .46-.46.93-.46 1-.95 1.77-.26 2.8 0 2.08.11 5.1 1.73 7.48 1.4a1.71 1.71 0 011.4.47c7-.06 9.22-2.85 11.68-6.55-.13-1.66 1.2-2.8 1.87-4.2.64-.67 1.1-1 1.87-.94 1.21.35 4 .76 4.68.94 10.7.94 13.5-10 22-11.22 2.1 0 6 .41 14.48 1.4 5.56.44 11-3.6 16.36-6.54 2.4-1.2 4.49-1.87 6.54-4.68 2.52-2 5.55-14.34 8.88-14.48 6.83-.14 13.29-2.38 20.09-2.34 8.35-.37 16.84 1.95 24.3-.93.28.1 1.92-.25 2.34.46 1.06 1.57 4.05 2.27 3.27 4.21 0 .47-.94.93-1.4 1.4-1.54 0-3.78.12-5.14 1.87-.68.62-2.58.8-3.28 0-4.47.4-17.12-1.47-18.69 5.14 1.19 5.12 5.4 17.94 14 16.83.47 0 1.4.46 1.4.93 3.27 6.54 8.88 10.75 14 10.75s17.86-4.57 27.57-9.35H197c5.93-.55 8.3-2.14 11.68-8.88 4.49-4.48.86 9.17 15.1 6.32zm-9-30.13c-1.4 1.4-2.8 1.87-4.67 4.67-3.27-1.4-3.74-5.61-4.2-7.48 2.8-.46 8.87-1.87 12.15-2.33-1.88 1.87-2.82 2.8-3.29 5.14z"}),o$i("path",{id:`b_${d}`,fill:"#db0a40",d:"M287.63 159.51c-6.07-3.27-8.41-10.28-12.15-15.42-9.78-10.12-11.44-27.43-14-41.6-2.58-13.76-14.33-23.94-22.48-34.58-7.23-5.9-26.1-23.78-35-26.64-11.75-4.89-22 4.35-31.78 8.88-7.94 3.27-16.35 4.2-23.36 10.28-11 14.12-17.61 2.82-30.38 14-19 19.92-26.2 2.39-52.33 25.71-7 4.2-13.55 8.41-22 7.94-13.43-.63-18-18.68-7.48-26.64C44 73.24 62 64.81 53.05 51.55c-9.3-8.29-20.24-4.76-31.3-14-5.1 8 1.42 18.85 9.81 21.5C35 61.19 43 57.78 44.64 62.76c-3.54 7.09-13.21 10.93-17.75 17.77C15.58 93.59 26.75 115 42.77 116c5.92 1.92 13.47-2.92 17.29-.93.47 4.67 0 8.88.94 13.09.43 4.6 5.67 9.54 2.8 14a23.58 23.58 0 01-16.8 5.67c-3.19 3.67-3.73 7.84-5.61 12.15-2.33 4.2-7 6.07-10.28 7.94-2.16 3.29-4.31 6.93-8.88 7.48-2.8 3.27-3.27 7.48-4.2 11.69 11.69 3.09 14.19 1.52 20.56-8.42 2.34-2.33 5.61-.46 7.94 0 6.64-.79 11.59-5.23 16.36-9.34 17-4.45 16.84 6.69 36.44-6.08 3.28-1.4 4.68-5.14 6.08-7.95 1.64-3.13 6.17-9.16.47-10.74-14.67 29.7-40.21 5.53-59.82 28-3 .83-.67-3.84 0-4.68 14.07-20.5 46.07-2.45 57-29 1.92-4.08.83-20.34 5.61-20.1.47 0 1.87.47 1.87 1.4-4.54 19.82-1.54 25.97 19.62 22.5 7.24-2.1 28 5.29 27.57-4.67 0-1.87-1.87-2.8 0-4.2.46-.47 1.87 0 2.33.46 1.32 8 8.34 13.87 15 17.3 13.43 9.14 8 21.07-7.48 20.56-5.14-2.8-6.54-7.95-10.28-12.15-4.37-3.83-10.34-2-15.42-.94-2.52 3.81 3.47 8.35 4.67 12.16 2.34 1.4 5.61-.94 7.48 1.86s2.8 5.61 5.61 7.48c8.1 7.77 25-5.88 33.64-6.54 7.55.82 11-6.06 13.55-11.69 4.26-7.78-7.07-15.47-7.94-22.43-2.58-.71-6-2.73-7.95 0 1.43 3.48 9.45 16.21 8.88 20.1-1.05 2.81-3.43 9.33-7 8.88.94-3.27 2.34-7 2.34-10.75-1.7-4-9.21-15.55-9.81-19.63 1.49-3.95 9.16-1.66 12.14-5.61 3.28-5.14 4.21-10.28 5.15-16.82a2.1 2.1 0 011.4-1.41c4.55 2.93-.08 17-2.81 20.1-.26 4.84 9.28 1.6 11.22 0 3.61.75 10.93-2.85 12.61-.47a25.39 25.39 0 00-4.67 9.35c-2.8 3.27-7.47 5.61-7.47 10.28.51 2.94 4.46-1.8 4.67 1.87-4.07 5.17-3.56 6.42-2.34 12.15 4.27 6 12.43 1.06 17.76-.46 9-3.53 19.13 2.06 26.17-7.48a6.2 6.2 0 014.67 2.8 25.73 25.73 0 0020.09 7.95c3.06-2.13-3.63-3.8-4.67-4.68-3.27-1.87-7.48-4.67-8.41-8.41-1.23-5.22-5-10-7.48-14.95 10.91.16 12.06 22.95 28 19.63.78-.54.7-1.12.47-1.87zm-78.5-70.57c-.47.47-.94.47-1.87.47-1.25-4.72-1.69-9.65-4.21-13.56-1.31-1.28-3-2.95-1.87-5.14a2.23 2.23 0 012.81-.47c4.28 3.2 5 7.66 5.14 13.09.93.93.46 3.74 0 5.61m38.31 65.9a27.85 27.85 0 01-6.54.93h-.46c-2.77-2.55 3-7.64 6.07-7.48h1.4c1.71.71 1.27 5.22-.47 6.55m12.15-27.11c-.52.91-1.32 3.29-2.33 3.27s-1.45.15-1.4-.93c-.09-3.14-.6-7-3.28-8.88-6.1-9.49-7.64 2.4-9.81.93-1.3-2.64.75-5.63 1.87-7.94.52-.63.73-1.36 1.4-1.87 1-5.75 6.25-2.47 7.48.93 3.22 4 7 8.51 6.54 13.09-.47-.47-.47.47-.47 1.4m-236.91 43c3.27-1.87 5.14-5.14 6.54-7.95-1-1.57-2.22-3.64-4.67-2.8a60.5 60.5 0 01-7 4.67c-1.17 3.18 1.75 7.18 5.14 6.08m-10.28 0c-5.55 2.27-2.61 9.11-6.07 12.62 0 .46-.94 1.4 0 1.87 2.33.46 4.2 1.4 7 1.87 1.25-4.18 2.46-8.83 3.27-12.62-.94-1.41-2.34-3.27-4.21-3.74m151.4-10.28c1.87 2.33 1.87 5.6 4.21 7.47a10.05 10.05 0 007.94-2.33c1.4-.94-.47-2.34-.93-3.74-1.41-1.87-.47-5.61-3.74-5.61-3.54.82-7.42-.2-10.75.93 0 1.41 2.8 1.41 3.27 3.28"}),o$i("path",{d:"M392.8 128.62c-.23-7.73-3.35-16.12-8.57-21.63l-.24-.28c-2.67 10.55-6.5 19.86-17.5 36.63-4.23 6.42-11.74 6.7-16.39 12.59-1.1-.6-.78-1.42-2.2.1 5.86-6.3-.84-3.06 1.9-6.09 10.22-11.3 19.58-2
101.48 23.54-36.73-1.67 2.09-2.68 2.74-4.36 4.86 1.9-6.49 3.38-12 4.79-18.66l-1.8-.72c-6.27 21.19-16.62 39.73-35.56 52.45-24.6 17.88-3.83 11.9.31 8.2-31 31.65-99.62 52-139.06 19.8 5.76 5.61 12.83 11.88 19.55 16-4.09-.7-7-3.87-10.86-5.08.06.13 9.38 12.26 37.2 15.44 1.79.2 3.5.38 5.15.53 37.93 3 40.24-3.79 66.71-9.39 1.19.51-8.53 5.53-21.9 9.31-21.11 7.72-45.62 2-63.51.14h.08c.41.2 3.19 1.48 17.42 6.57-1 .36-5.65 1-25.05-7.32 47.6 27.45 98.83 6.67 140.89-24.52 0 .14-.06.34-.06.51.37.06.84.12 1.22.15-.23.67-.23.67-3.49 4.56 7.1-5.73 10.74-14.62 18.26-20-3.85 7.73-8.77 13.27-17.93 22.23a24 24 0 002-1.71c-13.85 12.94-32.12 25.78-60.47 32.52a38.9 38.9 0 006.07-1.2c-3.59 1-3.69 1.12-5.21 1.62.94-.12.94-.12 5.83-1.11-2.85 1.4-6.14 2.07-14.1 3.69 47.19-7.48 96.27-44.2 97.34-93.46z",fill:`url(#s4_${d})`}),o$i("path",{d:"M345.37 192.75c-18.7 11.9-39.39 22.28-62.5 24.93 27.8 1 60.79-19.13 78.76-35.62-5.38 3.6-10.76 7.22-16.26 10.69z",fill:`url(#s34_${d})`}),o$i("path",{d:"M315.39 196.71c-26.65 5.6-28.16 12.29-66.29 9.44-3 .91-18.85-.05-21.47-.9.13 0 1.36.53 2.42.95h-.07c4-.5 30.37 5.12 38.79 4 10.93.74 45.23-9.45 46.62-13.49z",fill:`url(#s33_${d})`}),o$i("path",{d:"M374.69 99.86l-.94-.41c-1.42 6.62-2.89 12.16-4.79 18.65 1.68-2.12 2.69-2.77 4.36-4.86-4 15.25-13.32 25.43-23.54 36.73-2.74 3 4-.21-1.9 6.09 1.42-1.52 1.1-.7 2.2-.1 4.64-5.89 12.16-6.17 16.39-12.59 11-16.78 14.83-26.08 17.49-36.63a3.33 3.33 0 01.25.28 30.86 30.86 0 00-9.52-7.16z",fill:`url(#s32_${d})`}),o$i("path",{d:"M249.18 182.88c-17.52-9.88-4.82-3.31 10.53.3a113 113 0 0034.4 3c18.28-7 33.9-17.17 42.58-26.82-4.16 3.8-24.73 9.49-.3-8.2 18.92-12.72 29.29-31.24 35.54-52.42a69.27 69.27 0 00-15.17-3.7c-7.32 17.41-8.41 29.5-24.63 39.12-18.1 11.78-6.77 8.76-6.59 8.67a20.1 20.1 0 004-2.14c-7 11.2-19.18 18.35-33.7 21.58-.46 4.52-7.39 3-7.12 6.5.89 4.07-3.57 6-7.42 5.72-12 .13-17.81-5.73-22.72-8.54-7.66 5.08-11.26 5.73-20.9 4.66-4.79.07-9.16 2.5-13.91 3.6 6.8 6.08 36.08 13.9 25.41 8.67zm92.35-48.5c3.05-6.65 10.13-10.22 12.46-18.25-.34 1.18 2.19 1.67 3.19 1.67 4-.68 4.1-6.16 5.39-7.3-1 12.45-9.45 22.65-18.69 31.09a4.18 4.18 0 00-4-.18c-.39-2.34 4.68-5.6 1.65-7.03z",fill:`url(#s31_${d})`}),o$i("path",{d:"M358 61.05c-11.74-6.68-25-8.24-37.47-13.2 18.76 4 41.07 8.07 54.94 22.11.22.11.74.62 1 .69 1.2.81 2.57 3.68 4.24 2.62-29.1-56.79-117.5-50.47-159.56-27.18 2.29 1.76 4.81 3.83 7.16 5.83 8-6.48 40.45-11 43.31-10.56-10.84 2.17-28.8 8.69-39.71 13.58l1.53 1.29c22.26-7.83 56.14-13.29 80.15-7.53-19.19 2.13-53.4 1.84-76.16 10.9 6.25 4.73 11.82 13.34 17.19 19.66 37.13-18.11 58.55-18.7 77.33-16.33 1.8 1-13.32 1.63-9.65 2.74 4.08.94 11.73-1.32 13.5-1.55 1.15-.37 8.37-.13 10.65.3 8.68 2.11.54 3.21-2.49 2.5a22.44 22.44 0 00-4.48.09c-3.35.63-7.4 1.37-10.74 1.87-.9.15-11.09-.12-9.54 1.2 1.95-.13 10.53 1.42 12.74 1.16 1.33-.3 2.68.15 3.94-.53.62-.43 3.16-.74 3.27.32-2.89 6.44-11.67 1.61-18.28 3-5.89.44-12.14 3.07-13.2 2.15 19.32-11.75-27.61 5.71-26.82 8.68a.29.29 0 00.16 0c.14 2.63 7.51-1.2 9-.92 3.23-.25 7.6-2.26 10.75-3 2.36 0 3.29 1.18 5.64.66 5.16-.09 9.82-2.31 14.8-3.29.44 0 3.55 1.31 3.4 1.67 9.38 8.41 14.33 1.4 24.62 4.17 1.64.22-.3 1.28-.86 1.61-5.43 3.82-11.88 4.41-18.17 4.87a5.69 5.69 0 00-3.08.5c-2.07-.16-4 1-6.07.69-5.89.12-11.71 1-17 3.69-2 .39-4.27.71-5.76 2.2-1.52 1.23-3.81.76-5.15 2.14-2.28 1.37-19.48 5-17.54 8.53h-.1.1a1 1 0 010 .23c28.41-4.06 62.28-24.09 98.11-9.09 14.75 7.51 23 20.57 17.12 45.81.05-.12.69-1.8.68-1.87l-.11.08c1.67-5.89 3.2-10.95 3.16-16.91C398.4 104.84 381.86 74 358 61.05zm-33.62-21.32c5.21 1.17 14.76 2.91 17.88 6.2-8.19-.09-12.25-3.63-12.12-3.54-1.57-.48-6.5-2.24-5.76-2.66z",fill:`url(#s2_${d})`}),o$i("path",{d:"M231.79 54.85L228.37 52c8.15-6.68 40-10.94 43.23-10.61a105.52 105.52 0 00-14.14 3.9c-8.46 2.77-17.78 6.23-25.67 9.56zm165.42 46c-5-37.33-17.74-70.1-63.13-82.14 28.07 6.81 30.18 10.32 33.84 12.75C346.12 11.25 311 4.22 275.5 10.27c20.7-6.71 54.72-5.89 76 7.31C300.74-13.85 239.73-.26 202.22 35.63c7 1.36 13.15 6 18.86 10.42 42.57-23.22 130.42-29.58 159.64 27.22-1.68 1.06-3-1.8-4.24-2.62-.23-.07-.75-.58-1-.69-13.88-14-36.16-18.14-54.94-22.11 12.53 5 25.73 6.52 37.47 13.2 30.63 
1017.62 44 53.33 33.4 82.42l.11-.08a108.25 108.25 0 005.69-42.53zM294 46.26c-19.42 0-44 3.66-60.55 10l3.88 3.28c19.77-7.54 53-9.45 69.26-10.07 17.61-.54-6.15-3.15-12.59-3.21zm36.13-3.87c-.32-.17 4.07 3.5 12.12 3.54-3.15-3.3-12.65-5-17.89-6.2-.72.42 4.21 2.18 5.78 2.66z",fill:`url(#s1_${d})`})]});return p$7(()=>{setTimeout(()=>{u("mono")},3e3)},[]),h});function convertToLocalizedDateString(c){return new Date(c).toLocaleDateString(window.navigator.language,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric"})}function serverErrorResolver(c){var u,d,p;let h=c.playabilityErrors,f=c.playabilityErrorDetails;if(h.includes("DATE_RANGE_UNKNOWN"))return{description:translate("error-default-message")};if(h.includes("NO_LONGER_AVAILABLE"))return{title:translate("error-missed-title"),description:translate("error-missed-message")};if(h.includes("GEO_BLOCKED"))return{title:translate("error-geo-title"),description:translate("error-geo-message")};if(h.includes("NOT_YET_AVAILABLE")){let c=null!=(u=null==f?void 0:f.NOT_YET_AVAILABLE)&&u.availableFrom?convertToLocalizedDateString(f.NOT_YET_AVAILABLE.availableFrom):"N/A";return{title:translate("error-upcoming-title"),description:translate("error-upcoming-message",{localizedDate:c})}}return h.includes("FSK_BLOCKED")?{title:translate("error-fsk-title",{age:(null==(d=null==f?void 0:f.FSK_BLOCKED)?void 0:d.minAge.toString())??""}),description:translate("error-fsk-message",{hour:(null==(p=null==f?void 0:f.FSK_BLOCKED)?void 0:p.minEveningHour.toString())??""})}:{description:translate("error-default-message")}}function errorDescriptionResolver(c){return c?"NOT_AUTHORIZED"===c.playerErrorCode?{description:translate("error-unauthorized-message"),title:translate("error-unauthorized-title")}:"DRM_ERROR"===c.playerErrorCode?{description:translate("error-drm-message")}:c.playerErrorCode?{description:translate("error-default-message")}:c.serverErrorDetails?serverErrorResolver(c.serverErrorDetails):{description:translate("error-default-message")}:{description:translate("error-default-message")}}let ErrorDisplay=()=>{let{playerState:{currentErrorDetails:c}}=usePlayerContext(),[u,d]=h$3(areTranslationsLoaded());onTranslationDataLoaded(()=>d(!0));let p=errorDescriptionResolver(c);return o$i(k$5,{children:!!c&&o$i("div",{class:"error-display",children:o$i("div",{class:"error-display__description",children:[o$i("div",{class:"error-display__icon-container",children:o$i(CosmosIconErrorFilled,{"data-rbup-icon-error-filled":!0,class:"error-display__icon"})}),o$i("div",{class:"error-display__text-container",children:[p.title&&o$i(CosmosText,{"rbup-error-display-title":!0,class:"error-display__text",weight:"bold",appearance:"light",size:"medium",children:p.title}),p.description&&o$i(CosmosText,{"rbup-error-display-description":!0,class:"error-display__text",weight:"regular",appearance:"light",size:"x-small","aria-label":"Video player error message",children:p.description})]})]})})})},resolveGlobalKeyboardNavigation=(c,u)=>{let d=null==c?void 0:c.getMediaMetaData(),p=null==d?void 0:d.globalKeyboardNavigation;return void 0===p?u:p?"ACTIVE":"INACTIVE"},useGlobalKeyboardNavigation=(c,u,d)=>{let p=F$4(()=>resolveGlobalKeyboardNavigation(d,c),[d,c]);p$7(()=>
10{if("ACTIVE"===p){let c=c=>{c.target===window.document.body&&u(c)};return window.document.addEventListener("keydown",c),()=>window.document.removeEventListener("keydown",c)}},[p,u])};function preventEventHandling(c){var u;let d=isLiveLinearResolver(c),p=null==(u=c.getPlayerData())?void 0:u.isShowingAd();return d||p}function handleSeekForward(c){preventEventHandling(c)||c.canSeekOrTimeshiftForward()&&c.seekOrTimeshiftRelative(DEFAULT_SEEK_SKIP_SECONDS)}function handleSeekBackward(c){preventEventHandling(c)||c.canSeekOrTimeshiftBackward()&&c.seekOrTimeshiftRelative(-DEFAULT_SEEK_SKIP_SECONDS)}function handleVolumeDown(c){let u=c.getVolume();u>0&&c.setVolume(Math.max(0,u-5))}function handleVolumeUp(c){let u=c.getVolume();u<100&&c.setVolume(Math.min(100,u+5))}function handleToggleFullscreen(c){c.toggleFullscreen()}function handleTogglePictureInPicture(c){c.togglePictureInPicture()}function handleMuted(c){let u=c.isMuted();c.setMuted(!u)}function handleSeekToBeginning(c){c.restartPlaybackFromBeginning()}function handleTogglePlayback(c){preventEventHandling(c)||handlePlayPauseToggle(c.getPlayerStatus(),c)}async function handleSwitchToPreviewStream(c){await handleSwitchStream(c,-1)}async function handleSwitchToNextStream(c){await handleSwitchStream(c,1)}async function handleSwitchStream(c,u){var d;let p=(null==(d=c.getPlayerData())?void 0:d.getCurrentTimeInSec())??0,h=c.getPlayerConfiguration(),{assetId:f,multiStreamAssets:m}=h;if(!m)return;let g=m.findIndex(c=>c.assetId===f);if(-1===g)return;let v=m.length,y=m[(g+v+u)%v];await c.load({...h,assetId:y.assetId,initialSeekTimeInSec:p}),await c.play()}let ALL_HANDLED_KEYCODES=[KEYCODE_0,KEYCODE_ARROW_DOWN,KEYCODE_ARROW_LEFT,KEYCODE_ARROW_RIGHT,KEYCODE_ARROW_UP,KEYCODE_F,KEYCODE_I,KEYCODE_K,KEYCODE_M,KEYCODE_N,KEYCODE_P,KEYCODE_SPACE],keyboardEventHandler={[KEYCODE_0]:handleSeekToBeginning,[KEYCODE_ARROW_DOWN]:handleVolumeDown,[KEYCODE_ARROW_LEFT]:handleSeekBackward,[KEYCODE_ARROW_RIGHT]:handleSeekForward,[KEYCODE_ARROW_UP]:handleVolumeUp,[KEYCODE_F]:handleToggleFullscreen,[KEYCODE_I]:handleTogglePictureInPicture,[KEYCODE_K]:handleTogglePlayback,[KEYCODE_M]:handleMuted,[KEYCODE_N]:handleSwitchToNextStream,[KEYCODE_P]:handleSwitchToPreviewStream,[KEYCODE_SPACE]:handleTogglePlayback};function isKeycode(c){return ALL_HANDLED_KEYCODES.includes(c)}async function handleKeyboardEvent(c,u){if(!u)return;let{key:d}=c;if(isKeycode(d)){let p=keyboardEventHandler[d];c.preventDefault(),p(u)}}function resolveTagAttributeValue(c){return c?"":null}function useScrubBarEventHandling(c,u,d,p,h,f){var m,g;let[v,y]=h$3((null==(m=null==u?void 0:u.getPlayerData())?void 0:m.getCurrentTimeInSec())??0),[b,S]=h$3((null==u?void 0:u.getDurationInSec())??0),[_,E]=h$3(p((null==(g=null==u?void 0:u.getPlayerData())?void 0:g.getCurrentTimeInSec())??0)),[T,w]=h$3((null==u?void 0:u.getBufferLengthInSec())??0),[P,A]=h$3(0),[I,M]=h$3(!1),[R,k]=h$3(!1),[x,C]=h$3(!1),O=_$3({x:0,y:0}),D=_$3();p$7(()=>{D.current=h},[h]);let L=T$4(u=>extractPlaybackPositionInPercentFromEvent(u,c)??0,[c]),N=T$4(c=>{let u=O.current,d=getPositionFromEvent(c),p=hasPositionMoved(u,d);return O.current=d,p},[]),U=T$4(c=>{A(L(c))},[L]),F=T$4(c=>{var u;let p=L(c);isNaN(b)||(w(0),E(p),A(p),E(p),d(p),c.stopPropagation(),c.preventDefault()),null==(u=D.current)||u.call(D,!1),M(!1);let h=c.currentTarget;h instanceof HTMLElement&&"pointerId"in c&&h.releasePointerCapture(c.pointerId),document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",F),C(!1)},[b,L,U,D,d,C]),B=T$4(()=>{I||C(!1),k(!1)},[I,C]),j=T$4(()=>{k(!0)},[]),H=T$4(c=>{var u;document.addEventListener("pointermove",U),document.addEventListener("pointerup",F);let d=c.currentTarget;d instanceof HTMLElement&&"pointerId"in c&&d.setPointerCapture(c.pointerId),M(!0),C(!0),U(c),null==(u=D.current)||u.call(D,!0)},[U,F,D,C]),V=T$4(c=>{I&&c.preventDefault(),A(L(c)),N(c)&&C(!0)},[I,L,N,C]);return p$7(()=>{let c=c=>{var d,h;if(u){switch(c.type){case"seeking":{let{start:d}=u.getSeekableRange(),{targetPosition:h}=c,f=Math.abs(d-h);y(f),w(u.getBufferLengthInSec()),E(p(f));break}case"timeChanged":{let{start:d}=u.getSeekableRange(),h=c.playbackPosition-d;y(h),w(u.getBufferLengthInSec()),E(p(h));break}case"downloadFinished":{let c=(null==(d=u.getPlayerData())?void 0:d.getCurrentTimeInSec())??0;y(c),w(u.getBufferLengthInSec()),E(p(c));break}case"loaded":case"play":{let c=(null==(h=u.getPlayerData())?void 0:h.getCurrentTimeInSec())??0;S(u.getDurationInSec()),w(u.getBufferLengthInSec()),y(c),E(p(c))}}S(u.getDurationInSec())}};return null==u||u.addEventListener(c),()=>{null==u||u.removeEventListener(c)}},[p,u]),{onDocumentPointerUp:F,onPointerLeave:B,onPointerOver:j,onPointerDown:H,onPointerMove:V,bufferDurationPercent:F$4(()=>0===b?0:roundPlaybackPercentage(T/b),[T,b]),playbackPositionInPercent:_,isDragging:I,draggedPlaybackPositionInPercent:P,durationInSec:b,playbackPositionInSec:v,hovered:R,showHandle:x&&!f}}let POSTROLL_AD_MARKER=-1,PREROLL_AD_MARKER=0,OPEN_HEIGHT=0,CLOSED_HEIGHT=2,MARKER_WIDTH="4px";function calculateAdMarkers(c,u){let d=[],p=(null==c?void 0:c.length)??0;
10if(!(!c||0===p||0===u))return c.forEach(c=>{let p,h;c===PREROLL_AD_MARKER?(p="0%",h=MARKER_WIDTH):c===POSTROLL_AD_MARKER?(p=`calc(100% - ${MARKER_WIDTH})`,h="100%"):(p=`${100*c/u}%`,h=`calc(${p} + ${MARKER_WIDTH})`),drawMarkers(d,p,h)}),`polygon(
11	${d.join(`,
12	`)}
13);`}function drawMarkers(c,u,d){let p=`${u} ${OPEN_HEIGHT}px`,h=`${d} ${OPEN_HEIGHT}px`,f=`${d} ${CLOSED_HEIGHT}px`,m=`${u} ${CLOSED_HEIGHT}px`;c.push(p,h,f,m,p)}let AdMarkers=x$5(({adCuePoints:c,durationInSec:u})=>{let d=calculateAdMarkers(c,u);return d?o$i("div",{class:"ad-markers",children:o$i("div",{class:"ad-markers__background-container",style:`clip-path: ${d}`})}):null}),ProgressBar=({calculatedPositionPercent:c})=>o$i("div",{"data-rbup-scrub-bar-progress":!0,class:"progress-bar",style:{width:`${100*c}%`}}),SeekBarHandle=({playbackPositionInPercent:c})=>o$i("div",{"data-rbup-seek-bar-handle":!0,class:"seek-bar-handle",style:{left:`${100*c}%`},children:o$i("div",{class:"seek-bar-handle__knob"})});function formatPlaybackPosition(c,u){if(c>0)return getFormattedTimeString(c*u);let d=Math.abs(c),p=d-d*u;return`${p>0?"-":""}${getFormattedTimeString(p)}`}let SeekBarTooltip=({durationInSec:c,positionInPercent:u,showTooltip:d,sizeBreakpoints:p,hasHeatmapData:h})=>{let{playerState:{playerCoordinator:f,isVRVideo:m,mediaMetaData:g}}=usePlayerContext(),v=_$3(null),y=_$3(null),b=_$3(null),[S,_]=h$3(!m),E=useHeatmapMostReplayedScenes(c,null==g?void 0:g.heatmapData,{threshold:.99,minSceneDuration:2}),[T,w]=h$3(formatPlaybackPosition(c,u));return p$7(()=>{let d=Math.floor(c*u),p=E?E.find(c=>d>=c.startTime&&d<=c.endTime):null,h=formatPlaybackPosition(c,u);w(p?`${h} - Most replayed scene`:h)},[c,E,u,T]),p$7(()=>{(async()=>{let d=Math.floor(c*u);_(await (null==f?void 0:f.setThumbnail({imgContainerElement:v.current,imgElement:y.current,textContainerElement:b.current},{smallOrBigger:p.smallOrBigger,mediumOrBigger:p.mediumOrBigger},d))??!1)})()},[c,m,f,u,p.smallOrBigger,p.mediumOrBigger]),o$i("div",{"data-rbup-seek-bar-tooltip":!0,class:["seek-bar-tooltip",d&&"seek-bar-tooltip--visible",S&&"seek-bar-tooltip--with-thumbnail",h&&"seek-bar__tooltip-container--with-heatmap"].filter(
13Boolean).join(" "),children:[S&&o$i("div",{class:"seek-bar-tooltip__image-container",ref:v,children:o$i("img",{class:"seek-bar-tooltip__image","data-rbup-seek-bar-thumbnail":!0,ref:y,alt:"preview thumbnail"})}),o$i("div",{class:"seek-bar-tooltip__text",ref:b,children:o$i(CosmosText,{"data-rbup-text":!0,class:"seek-bar-tooltip__position","data-rbup-seek-bar-tooltip":!0,kind:"subtle",size:"xx-small",weight:"medium",children:T})})]})},SeekBar=({durationInSec:c,playbackPositionInPercent:u,showHandle:d,sizeBreakpoints:p,tooltipPositionInPercent:h,hasHeatmapData:f})=>isMobileDevice()?o$i("div",{"data-rbup-seek-bar":!0,class:"seek-bar",children:o$i("div",{class:`seek-bar__handle-container ${d?"seek-bar__handle-container_visible":""}`,children:o$i(CosmosTooltip,{class:"seek-bar__cosmos-tooltip",controlled:!0,follow:"target",unreachable:!0,visible:d,children:[o$i("div",{slot:"content",children:o$i(SeekBarTooltip,{"data-rbup-seek-bar-tool-tip":!0,durationInSec:c,positionInPercent:h,showTooltip:d,sizeBreakpoints:p,hasHeatmapData:f})}),o$i(SeekBarHandle,{"data-rbup-seek-bar-handle":!0,playbackPositionInPercent:u})]})})}):o$i(CosmosTooltip,{class:"seek-bar__cosmos-tooltip",controlled:!0,follow:"cursor",unreachable:!0,visible:d,children:[o$i("div",{slot:"content",children:o$i(SeekBarTooltip,{"data-rbup-seek-bar-tool-tip":!0,durationInSec:c,positionInPercent:h,showTooltip:d,sizeBreakpoints:p,hasHeatmapData:f})}),o$i("div",{"data-rbup-seek-bar":!0,class:"seek-bar",children:o$i("div",{class:`seek-bar__handle-container ${d?"seek-bar__handle-container_visible":""}`,children:o$i(SeekBarHandle,{"data-rbup-seek-bar-handle":!0,playbackPositionInPercent:u})})})]}),DvrScrubBar=({onDragStatusChanged:c,sizeBreakpoints:u,hideScrubBarTooltip:d})=>{let{playerState:{playerCoordinator:p,playerConfiguration:h,maxTimeShiftInSec:f,durationInSec:m}}=usePlayerContext(),g=null==p?void 0:p.getAdCuePoints(),v=null==h?void 0:h.adMarkerEnabled,y=_$3(null),b=T$4(c=>{if(!p)throw Error("Player coordinator is missing while user interaction");let u=f-f*c;p.timeShift(u)},[f,p]),S=T$4(c=>p&&0!==f?1-roundPlaybackPercentage(p.getTimeShiftInSec()/f):1,[f,p]),{onDocumentPointerUp:_,onPointerLeave:E,onPointerOver:T,onPointerDown:w,onPointerMove:P,playbackPositionInPercent:A,draggedPlaybackPositionInPercent:I,hovered:M,isDragging:R,showHandle:k}=useScrubBarEventHandling(y,p,b,S,c,d),x=R?I:A;return o$i("div",{"data-hovered":resolveTagAttributeValue(M),"data-rbup-dvr-scrub-bar":!0,class:"scrub-bar",ref:y,onPointerDown:w,onPointerLeave:E,onPointerMove:P,onPointerOver:T,onPointerUp:_,onTouchMove:P,children:[o$i("div",{class:"scrub-bar__rail"}),o$i(ProgressBar,{calculatedPositionPercent:A}),"ACTIVE"===v?o$i(AdMarkers,{adCuePoints:g,durationInSec:m}):null,o$i(SeekBar,{durationInSec:f,playbackPositionInPercent:x,showHandle:k,sizeBreakpoints:u,tooltipPositionInPercent:I})]})},BufferBar=({calculatedPositionPercent:c,bufferedPercent:u})=>{let d=Math.min(c+u,1);return o$i("div",{class:"buffer-bar","data-rbup-scrub-bar-buffer":!0,style:{width:`${100*d}%`}})};function isTrueValue(c){return"boolean"==typeof c?c:"string"==typeof c&&"true"===c}let smoothing=.2,line=(c,u)=>{let d=u[0]-c[0],p=u[1]-c[1];return{length:Math.sqrt(Math.pow(d,2)+Math.pow(p,2)),angle:Math.atan2(p,d)}},controlPoint=(c,u,d,p)=>{let h=line(u??c,d??c),f=h.angle+(p?Math.PI:0),m=h.length*smoothing;return[c[0]+Math.cos(f)*m,c[1]+Math.sin(f)*m]},bezierCommand=(c,u,d)=>{let p=controlPoint(d[u-1],d[u-2],c),h=controlPoint(c,d[u-1],d[u+1],!0);return`C ${p[0]} ${p[1]}, ${h[0]} ${h[1]}, ${c[0]}
13 ${c[1]}`},svgPath=(c,u)=>`${c.reduce((c,d,p,h)=>0===p?`M 0 ${u} L${d[0]} ${d[1]}`:`${c} ${bezierCommand(d,p,h)}`,"")} L${c.length-1} ${u}`;function handleThemedPlayerKeyDown(c,u,d){d&&(c.target===u.current&&c.key===KEYCODE_ENTER?(c.preventDefault(),handlePlayPauseToggle(d.getPlayerStatus(),d)):handleKeyboardEvent(c,d))}function fillValuesToCorrectLength(c,u,d){if(c<u){let p=Array(Math.round((u-c)/c*d.length));return p.fill(0),d.concat(p)}return d}let HEATMAP_MAX_HEIGHT=20,Heatmap=x$5(({heatmapData:c,videoDuration:u})=>{let{values:d,coveredDuration:p}=c,h=fillValuesToCorrectLength(p,u,d),f=h.map((c,u)=>[u,(1-c)*HEATMAP_MAX_HEIGHT]);return o$i("svg",{class:isMobileDevice()?"heatmap mobile":"heatmap",viewBox:`0 0 ${h.length-1} ${HEATMAP_MAX_HEIGHT}`,width:"100%",height:HEATMAP_MAX_HEIGHT,preserveAspectRatio:"none",children:[o$i("path",{d:svgPath(f,HEATMAP_MAX_HEIGHT),fill:"url(#heatmap-gradient)",stroke:"none"}),o$i("defs",{children:o$i("linearGradient",{id:"heatmap-gradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[o$i("stop",{offset:"0%","stop-color":"var(--color-top)","stop-opacity":"1"}),o$i("stop",{offset:"100%","stop-color":"var(--color-bottom)","stop-opacity":"1"})]})})]})}),VodScrubBar=({onDragStatusChanged:c,sizeBreakpoints:u,hideScrubBarTooltip:d})=>{let p=_$3(null),{playerState:{playerCoordinator:h,mediaMetaData:f,playerConfiguration:m}}=usePlayerContext(),g=null==h?void 0:h.getAdCuePoints(),v=null==m?void 0:m.adMarkerEnabled,y=T$4(c=>{if(!h)throw Error("Player coordinator is missing while user interaction");let u=h.getSeekableRange(),d=h.getDurationInSec()*c+u.start;h.seek(d)},[h]),b=T$4(c=>{if(!h)return 0;let{start:u,end:d}=h.getSeekableRange(),p=d-u;return p>0?c/p:0},[h]),{onDocumentPointerUp:S,onPointerLeave:_,onPointerOver:E,onPointerDown:T,onPointerMove:w,bufferDurationPercent:P,playbackPositionInPercent:A,isDragging:I,draggedPlaybackPositionInPercent:M,durationInSec:R,hovered:k,showHandle:x}=useScrubBarEventHandling(p,h,y,b,c,d),C=I?M:A,O=null==f?void 0:f.heatmapData,{valueMin:D,valueNow:L,valueMax:N,valueText:U,valueLive:F}=useScrubbarAria(R,C,h);return o$i("div",{"data-hovered":resolveTagAttributeValue(k),class:"scrub-bar","data-rbup-scrub-bar":!0,ref:p,"aria-valuemin":D,"aria-valuenow":L,"aria-valuemax":N,"aria-valuetext":U,role:"slider",onPointerDown:T,onPointerLeave:_,onPointerMove:w,onPointerOver:E,onPointerUp:S,onTouchMove:w,tabIndex:0,children:[F&&o$i("div",{class:"aria-message-container","aria-live":"polite",children:F}),o$i("div",{class:"scrub-bar__background-container",children:[o$i("div",{class:"scrub-bar__rail"}),o$i(BufferBar,{calculatedPositionPercent:A,bufferedPercent:P}),o$i(ProgressBar,{calculatedPositionPercent:A}),"ACTIVE"===v?o$i(AdMarkers,{adCuePoints:g,durationInSec:R}):null]}),O&&o$i(Heatmap,{heatmapData:O,videoDuration:R}),o$i(SeekBar,{durationInSec:R,playbackPositionInPercent:C,showHandle:x,sizeBreakpoints:u,tooltipPositionInPercent:M,hasHeatmapData:!!O})]})},ScrubBar=({onDragStatusChanged:c,sizeBreakpoints:u,hideScrubBarTooltip:d,onControlsElementEnter:p})=>{let{playerState:{playbackMode:h,liveVariant:f}}=usePlayerContext();return o$i("div",{onPointerEnterCapture:c=>null==p?void 0:p(c,!0),children:["VOD"===h&&o$i(VodScrubBar,{sizeBreakpoints:u,onDragStatusChanged:c,hideScrubBarTooltip:d}),"LIVE"===h&&"DVR"===f&&o$i(DvrScrubBar,{sizeBreakpoints:u,onDragStatusChanged:c,hideScrubBarTooltip:d})]})};function useClickOutside(c,u){let d=d=>{c.current&&!c.current.contains(d.target)&&u(d)};p$7(()=>(document.addEventListener("pointerup",d),()=>{document.removeEventListener("pointerup",d)}))}let log$h=loglevelExports.getLogger("RadioButton"),RadioButtonInternal=({name:c,checked:u,label:d,onClick:p,onKeyDown:h,value:f,appearance:m,className:g},v)=>{let y=_$5(),b=T$4(c=>{c.stopPropagation(),null==p||p()},[p]),S=T$4(c=>{null==h||h(c)},[h]),_=F$4(()=>({focus(){u&&y.current.base.inputFocus().catch(c=>log$h.error("Could not set focus on CosmosRadio",c))}}),[u,y]);return A$3(v,()=>_,[_]),o$i(CosmosRadio,{ref:y,"data-rbup-radio-button":!0,"data-exposed-checked":resolveTagAttributeValue(u),"data-exposed-value":f,class:g,name:c,checked:u,value:f,appearance:m,onInputchange:b,onKeyDown:S,"hit-area":"row",children:d})},RadioButton=k$3(RadioButtonInternal),AudioSettings=({isPlayerSizeMedium:c,focusOnSelectedRadioButton:u,onCloseMenu:d})=>{let{playerState:{audioTracks:p,playerCoordinator:h,selectedAudioTrack:f}}=usePlayerContext();useInformPlaywright("Audio menu rendered");let m=F$4(()=>[...p],[p]),g=T$4(c=>{d&&(c.key===KEYCODE_ENTER||c.key===KEYCODE_SPACE)&&(c.preventDefault(),d(c))},[d]),v=m.map(c=>{let u=c.id===(null==f?void 0:f.id),d=_$5(),p=o$i(RadioButton,{ref:d,className:"audio-settings__list-item",name:"audio-track",label:c.label,checked:u,value:c.id,onClick:()=>{let u;return u=c.id,null==h?void 0:h.setAudioTrack(u)},onKeyDown:g},c.id);return{radioButtonRef:d,radioButton:p}}),y=_$3(!1);return p$7(()=>{u&&!1===y.current&&v.forEach(c=>{let u=c.radioButtonRef.current;
13u&&(u.focus(),y.current=!0)})},[u,v]),o$i("div",{class:"audio-settings",children:o$i(CosmosRadioGroup,{class:"audio-settings__list",appearance:c?"dark":"light",children:v.map(c=>c.radioButton)})})};function preventEventPropagation$3(c){c.stopPropagation()}let AudioMenu=({onCloseMenu:c})=>{let u=_$3(null);return useClickOutside(u,c),o$i("section",{ref:u,"data-rbup-audio-menu":!0,role:"dialog","aria-labelledby":"rbupAudioMenuTitle",class:"audio-menu",onPointerUp:preventEventPropagation$3,onKeyDown:u=>{u.stopPropagation(),u.key===KEYCODE_ESC&&c(u),u.key===KEYCODE_TAB&&(u.preventDefault(),c(u))},children:[o$i(CosmosText,{id:"rbupAudioMenuTitle",class:"audio-menu__title",size:"x-small",weight:"bold",children:translate("menu-audioTracks")}),o$i(AudioSettings,{isPlayerSizeMedium:!0,focusOnSelectedRadioButton:!0,onCloseMenu:c})]})},MultiStreamSettings=({isPlayerSizeMedium:c,focusOnSelectedRadioButton:u})=>{let{playerState:{playerCoordinator:d,playerConfiguration:p,playbackPosInSec:h}}=usePlayerContext();useInformPlaywright("Multi stream menu rendered");let f=F$4(()=>{if(!(null!=p&&p.multiStreamAssets))return[];let{assetId:c,multiStreamAssets:u}=p;return u.map(u=>({id:u.assetId,label:u.title,selected:c===u.assetId,assetId:u.assetId}))},[p]),m=F$4(()=>[...f.map(c=>{let u=c.selected,f=_$5(),m=o$i(RadioButton,{ref:f,className:"multi-stream-settings__list-item",name:"multi-streams",label:c.label,checked:u,value:c.id,onClick:async()=>{p&&(await (null==d?void 0:d.load({...p,assetId:c.assetId,initialSeekTimeInSec:h})),await (null==d?void 0:d.play()))}},c.id);return{radioButtonRef:f,radioButton:m}})],[f,h,p,d]),g=_$3(!1);return p$7(()=>{u&&!1===g.current&&m.forEach(c=>{let u=c.radioButtonRef.current;u&&(u.focus(),g.current=!0)})},[u,m]),o$i("div",{class:"multi-stream-settings",children:o$i(CosmosRadioGroup,{class:"multi-stream-settings__list",appearance:c?"dark":"light",children:m.map(c=>c.radioButton)})})};function preventEventPropagation$2(c){c.stopPropagation()}let MultiStreamMenu=({onCloseMenu:c})=>{let u=_$3(null);return useClickOutside(u,c),o$i("section",{ref:u,"data-rbup-multi-stream-menu":!0,role:"dialog","aria-labelledby":"rbupMultiStreamMenuTitle",class:"multi-stream-menu",onPointerUp:preventEventPropagation$2,onKeyDown:u=>{u.stopPropagation(),u.key===KEYCODE_ESC&&c(u),u.key===KEYCODE_TAB&&(u.preventDefault(),c(u))},children:[o$i(CosmosText,{id:"rbupMultiStreamMenuTitle",class:"multi-stream-menu__title",size:"x-small",weight:"bold",children:translate("menu-multi-stream")}),o$i(MultiStreamSettings,{isPlayerSizeMedium:!0,focusOnSelectedRadioButton:!0})]})},BackButtonInternal=({onClick:c,text:u},d)=>o$i("button",{ref:d,"data-rbup-back-button":!0,class:"back-button",onClick:c,children:[o$i(CosmosIconChevronLeft,{class:"back-button__icon"}),o$i(CosmosText,{size:"x-small",weight:"bold",children:u})]}),BackButton=k$3(BackButtonInternal),StorageKey$1={QUALITY:"rbup-video-quality"};function setStorageItem$1(c,u,d){let p="string"==typeof u?u:JSON.stringify(u);d.setItem(c,p)}function setQualityHeight(c,u){setStorageItem$1(StorageKey$1.QUALITY,c,u)}let getLabel=c=>c.label??getVideoQualityLabel(c.height,c.frameRate),QualitySettings=({isPlayerSizeMedium:c,onCloseMenu:u})=>{let{playerState:{playerCoordinator:d,selectedVideoQuality:p,videoQualities:h}}=usePlayerContext(),[f,m]=h$3(p),g=useObjectArrayCache(h,"id"),v=F$4(()=>{let c=[...g];return[{id:"auto",label:translate("menu-quality-auto")},...c.reverse()]},[g]);useInformPlaywright("Quality menu rendered"),p$7(()=>{f&&f.id!==p.id&&(null==d||d.setVideoQuality(f.id),setQualityHeight(f.height,window.sessionStorage))},[d,f,p]);let y=T$4(c=>{u&&(c.key===KEYCODE_ENTER||c.key===KEYCODE_SPACE)&&(c.preventDefault(),u(c))},[u]);return o$i("div",{class:"quality-settings","data-rbup-quality-menu":!0,children:o$i(CosmosRadioGroup,{class:"quality-settings__list",appearance:c?"dark":"light",children:v.map(c=>{let u=c.id===(null==f?void 0:f.id);return o$i(RadioButton,{className:"quality-settings__list-item",name:"quality",label:getLabel(c),checked:u,value:c.id,onClick:()=>m(c),onKeyDown:y},c.id)})})})},MenuButtonInternal=({href:c,id:u,onClick:d,settingText:p,text:h},f)=>{let m=u.toLowerCase();return c?o$i("button",{"data-rbup-menu-button":m,"data-rbup":`data-rbup-${m}-menu-button`,ref:f,class:"settings-menu-button",children:o$i(CosmosText,{class:"settings-menu-button__label",size:"x-small",children:o$i(CosmosLink,{tabIndex:-1,href:c,kind:"bare",target:"_blank",children:h})})}):o$i("button",{"data-rbup-menu-button":m,"data-rbup":`data-rbup-${m}-menu-button`,ref:f,class:"settings-menu-button",onClick:d,children:[o$i(CosmosText,{class:"settings-menu-button__label",size:"x-small",children:h}),o$i("div",{class:"settings-menu-button__selected-setting",children:[p&&o$i(CosmosText,{size:"xx-small",kind:"subtle",children:p}),o$i(CosmosIconChevronRight,{class:"settings-menu-button__icon"})]})]})},MenuButton=k$3(MenuButtonInternal);function calculatePlaybackSpeedText(c){return 1===c?translate("menu-speeds-normal"):String(c)}
13let SettingsMainMenu=({onNavClick:c,mainMenuRef:u})=>{let{playerState:{audioTracks:d,playbackSpeed:p,playerCoordinator:h,selectedVideoQuality:f,subtitleTracks:m,videoQualities:g,liveVariant:v}}=usePlayerContext(),y=null==h?void 0:h.getPlayerConfiguration().feedbackUrl,b=(null==h?void 0:h.getPlayerConfiguration().sharingEnabled)??!0,S=calculatePlaybackSpeedText(p),_=getVideoQualityLabel(f.height,f.frameRate),E=f.isAuto?`Auto ${_}`:_,T=g.length>1,w=m.length>0,P=d.length>1,A=null==h?void 0:h.getPlayerConfiguration().multiStreamAssets,I=!!A&&A.length>1;return o$i("div",{ref:u,children:[T&&o$i(MenuButton,{id:"quality",onClick:()=>c("QUALITY"),settingText:E,text:translate("menu-quality")}),"LINEAR"!==v&&o$i(MenuButton,{id:"speed",onClick:()=>c("SPEED"),settingText:S,text:translate("menu-speeds")}),w&&o$i(MenuButton,{id:"subtitles",onClick:()=>c("SUBTITLES"),text:translate("menu-subtitles")}),P&&o$i(MenuButton,{id:"audio",onClick:()=>c("AUDIO"),text:translate("menu-audioTracks")}),I&&o$i(MenuButton,{id:"multi-stream",onClick:()=>c("MULTI-STREAM"),text:"Multi Stream"}),b&&o$i(MenuButton,{id:"share",onClick:()=>c("SHARE"),text:translate("menu-sharing")}),y&&o$i(MenuButton,{id:"feedback",href:y,text:translate("menu-feedback")})]})};function useOnMountSize(c,u){let d=_$3(0);useResize(T$4(u=>{let p=u.height;d.current=p,null==c||c(p)},[c]),u),p$7(()=>{let u=d.current;u>0&&(null==c||c(u))},[c])}let SettingsWrapper=({children:c,cssClass:u,enterPosition:d,leavePosition:p,show:h,widthInPx:f,onMounted:m})=>{let[g,v]=h$3(!1);return p$7(()=>{!g&&h&&v(!0)},[g,h]),o$i("div",{class:u,style:{transform:`translateX(-${h?d:p}px)`,width:f},onTransitionEnd:()=>{g&&!h&&v(!1)},children:g?o$i(SettingsView,{onMounted:m,children:c}):null})},SettingsView=({children:c,onMounted:u})=>{let d=_$3(null);return useOnMountSize(u,d),o$i("div",{class:"settings-menu__settings-wrapper",ref:d,children:o$i("div",{children:c})})},log$g=loglevelExports.getLogger("ShareSettingsInternal"),ARROW_KEYS=[KEYCODE_ARROW_LEFT,KEYCODE_ARROW_RIGHT];function initialShareUrlWithTime(c){return(null==c?void 0:c.urlSharingStrategy.calculateShareUrl("PAGE",{assetId:c.getPlayerConfiguration().assetId}))??""}let ShareSettingsInternal=({isPlayerSizeMedium:c})=>{let{playerState:{mediaMetaData:u,playbackPosInSec:d,playerCoordinator:p,playerConfiguration:h,playbackMode:f}}=usePlayerContext(),m=!!window.navigator.clipboard,g=_$3(0),[v,y]=h$3(!1),[b,S]=h$3(!1),[_,E]=h$3(!1),[T,w]=h$3(0),[P,A]=h$3(initialShareUrlWithTime(p)),[I,M]=h$3(""),[R,k]=h$3(""),[x,C]=h$3(""),[O,D]=h$3(""),[L,N]=h$3(""),U=!!(null!=p&&p.urlSharingStrategy.isSharingEnabled()),F=null==h?void 0:h.iframeEmbedCode;useInformPlaywright("Share menu rendered");let B=async()=>{v||await copy(P)&&y(!0)},j=async()=>{F&&(v||await copy(F)&&S(!0))};return p$7(()=>{w(Math.floor(d)),M(getFormattedTimeString(d))},[]),p$7(()=>{if(!p)return;let c={assetId:p.getPlayerConfiguration().assetId,title:null==u?void 0:u.title,imageUrl:null==u?void 0:u.posterImageUrl,mediaPositionInSec:_?T:void 0};A(p.urlSharingStrategy.calculateShareUrl("PAGE",c)),k(p.urlSharingStrategy.calculateShareUrl("FACEBOOK",c)),C(p.urlSharingStrategy.calculateShareUrl("PINTEREST",c)),D(p.urlSharingStrategy.calculateShareUrl("REDDIT",c)),N(p.urlSharingStrategy.calculateShareUrl("TWITTER",c))},[u,T,_,p]),p$7(()=>(v&&(g.current=window.setTimeout(()=>y(!1),3e3)),b&&(g.current=window.setTimeout(()=>S(!1),3e3)),()=>{window.clearTimeout(g.current)}),[b,v]),o$i("div",{class:"share-settings",children:["VOD"===f&&o$i("div",{class:"share-settings__share-time",children:[o$i(CosmosCheckbox,{"data-rbup-share-time-checkbox":!0,name:"sharetime",checked:_,onInputchange:c=>{E(c.detail.checked)},clamp:!0,value:"true",appearance:c?"dark":"light",children:translate("menu-sharing-playFrom")}),o$i("input",{"data-rbup-share-time-input":!0,class:"share-settings__time-input",disabled:!_,value:I,onChange:c=>{w(convertTimeStringToSec(c.currentTarget.value)),M(c.currentTarget.value)},onKeyDown:c=>{ARROW_KEYS.includes(c.key)&&c.stopPropagation()}})]}),o$i("ul",{class:"share-settings__list",children:[m&&F&&o$i("li",{class:"share-settings__list-item",children:[o$i(CosmosText,{size:"x-small",children:o$i(CosmosLink,{class:"share-settings__link",kind:"bare",onClick:j,children:[o$i(CosmosIconCodeBlock,{}),translate("menu-sharing-embed")]})}),b&&o$i("div",{class:"share-settings__copied-text",children:o$i(CosmosText,{size:"x-small",children:translate("menu-sharing-copied")})})]}),U&&o$i(k$5,{children:[o$i("li",{class:"share-settings__list-item",children:o$i(CosmosText,{size:"x-small",children:o$i(CosmosLink,{"data-rbup-fb-link":!0,class:"share-settings__link",href:R,kind:"bare",target:"_blank",rel:"noopener nofollow",children:[o$i(CosmosIconFacebook,{}),translate("menu-sharing-facebook")]})})}),o$i("li",{class:"share-settings__list-item",children:o$i(CosmosText,{size:"x-small",children:o$i(CosmosLink,{"data-rbup-twitter-link":!0,class:"share-settings__link",href:L,kind:"bare",target:"_blank",rel:"noopener nofollow",children:[o$i(CosmosIconX,{}),translate("menu-sharing-twitter")]})})}),o$i("li",{class:"share-settings__list-item",children:o$i(CosmosText,{size:"x-small",children:o$i(CosmosLink,{"data-rbup-pinterest-link":!0,class:"share-settings__link",href:x,kind:"bare",target:"_blank",rel:"noopener nofollow",children:[o$i(CosmosIconPinterest,{}),translate("menu-sharing-pinterest")]})})}),o$i("li",{class:"share-settings__list-item",children:o$i(CosmosText,{size:"x-small",children:o$i(CosmosLink,{"data-rbup-reddit-link":!0,class:"share-settings__link",href:O,kind:"bare",target:"_blank",rel:"noopener nofollow",children:[o$i(CosmosIconReddit,{}),translate("menu-sharing-reddit")]})})}),m&&o$i("li",{class:"share-settings__list-item",children:[o$i(CosmosText,{size:"x-small",children:o$i(CosmosLink,{class:"share-settings__link",kind:"bare",onClick:B,children:[o$i(CosmosIconLink,{}),translate("menu-sharing-copyLink")]})}),v&&o$i("div",{class:"share-settings__copied-text",children:o$i(CosmosText,{size:"x-small",children:translate("menu-sharing-copied")})})]})]})]})]})},ShareSettings=k$3(ShareSettingsInternal);async function copy(c){try{return await window.navigator.clipboard.writeText(c),!0}catch(c){return log$g.error("Failed to copy to clipboard",c),!1}}let SPEED_1_X_OPTION={speed:1,useLabel:!0},AVAILABLE_SPEED_OPTIONS=[{speed:.25},{speed:.5},{speed:.75},SPEED_1_X_OPTION,{speed:1.25},{speed:1.5},{speed:1.75},{speed:2}],SpeedSettings=({isPlayerSizeMedium:c,onCloseMenu:u})=>{let{playerState:{playerCoordinator:d,playbackSpeed:p}}
13=usePlayerContext(),[h,f]=h$3(AVAILABLE_SPEED_OPTIONS.find(c=>c.speed===p)),m=null==h?void 0:h.speed;useInformPlaywright("Speed menu rendered"),p$7(()=>{if(m!==p){let c=AVAILABLE_SPEED_OPTIONS.find(c=>c.speed===p);c&&f(c)}},[p,m]);let g=T$4(c=>{u&&(c.key===KEYCODE_ENTER||c.key===KEYCODE_SPACE)&&(c.preventDefault(),u(c))},[u]);return o$i("div",{class:"speed-settings",children:o$i(CosmosRadioGroup,{class:"speed-settings__list",appearance:c?"dark":"light",children:AVAILABLE_SPEED_OPTIONS.map(c=>o$i(RadioButton,{className:"speed-settings__list-item",name:"speed",checked:c.speed===m,label:c.useLabel?translate("menu-speeds-normal"):String(c.speed),value:c.speed.toString(),onClick:()=>{c.speed!==m&&(null==d||d.setPlaybackSpeed(c.speed))},onKeyDown:g},`speed-option-${c.speed}`))})})},SubtitlesSettings=({isPlayerSizeMedium:c,focusOnSelectedRadioButton:u,onCloseMenu:d})=>{let{playerState:{subtitleTracks:p,selectedSubtitleTrack:h,playerCoordinator:f}}=usePlayerContext();useInformPlaywright("Subtitles menu rendered");let m=F$4(()=>[...p],[p]),g=T$4(c=>{d&&(c.key===KEYCODE_ENTER||c.key===KEYCODE_SPACE)&&(c.preventDefault(),d(c))},[d]),v=F$4(()=>{let c=_$5();return[{radioButtonRef:c,radioButton:o$i(RadioButton,{className:"subtitles-settings__list-item",name:"subtitles",ref:c,label:translate("menu-subtitles-off"),checked:!h,value:"off",onClick:()=>null==f?void 0:f.disableSubtitle(),onKeyDown:g})},...m.map(c=>{let u=c.id===(null==h?void 0:h.id),d=_$5(),p=o$i(RadioButton,{ref:d,className:"subtitles-settings__list-item",name:"subtitles",label:c.label,checked:u,value:c.id,onClick:()=>null==f?void 0:f.enableSubtitle(c.id),onKeyDown:g},c.id);return{radioButtonRef:d,radioButton:p}})]},[g,m,f,h]),y=_$3(!1);return p$7(()=>{u&&!1===y.current&&v.forEach(c=>{let u=c.radioButtonRef.current;u&&(u.focus(),y.current=!0)})},[u,v]),o$i("div",{class:"subtitles-settings",children:o$i(CosmosRadioGroup,{class:"subtitles-settings__list",appearance:c?"dark":"light",children:v.map(c=>c.radioButton)})})},FULL_HEIGHT="100%";function preventEventPropagation$1(c){c.stopPropagation()}let updateHeightsCache=(c,u,d)=>{c.current={...c.current,[u]:d}},defaultSettingsAreaDimensions={width:320},SETTINGS_MENU_BASE_CLASS="settings-menu",SettingsMenu=({activateResizing:c,onCloseMenu:u})=>{let d=!c,[p,h]=h$3("MAIN_MENU"),[f,m]=h$3({}),g=_$3(null),v=_$3({}),[y,b]=h$3(SETTINGS_MENU_BASE_CLASS),S=_$3(null),_=_$3(null),E=_$3(null),T=_$3(null),w=_$3(null),P=_$3(null),A=_$3(null);useInformPlaywright("Settings menu rendered");let{playerState:{playerCoordinator:I}}=usePlayerContext(),M=null==I?void 0:I.getPlayerConfiguration().sharingEnabled;useClickOutside(g,u);let R=T$4(u=>{u&&(updateHeightsCache(v,p,u),c&&m({height:u}))},[c,p]),k=()=>{x("MAIN_MENU")},x=T$4(c=>{h(c)},[]),C=T$4(c=>{R(`${c}px`)},[R]),O=T$4(()=>{if(S.current){let c=S.current.children.item(0);c&&c.focus({preventScroll:!0})}},[]),D=T$4(c=>{var u;null==(u=c.current)||u.focus({preventScroll:!0})},[]),L=T$4(c=>{if("height"===c.propertyName)switch(p){case"MAIN_MENU":O();break;case"QUALITY":D(_);break;case"SPEED":D(E);break;case"SHARE":D(T);break;case"SUBTITLES":D(w);break;case"AUDIO":D(P);break;case"MULTI-STREAM":D(A)}},[p,O,D]);p$7(()=>{let u=c?v.current[p]:FULL_HEIGHT;u&&u!==f.height&&m({height:u}),"MAIN_MENU"!==p&&b(`${SETTINGS_MENU_BASE_CLASS} settings-menu-animation`)},[c,p,f.height]);let N=_$3(!1);!1===N.current&&S.current&&(O(),N.current=!0);let U=_$3(null),{width:F}=useMeasure(U,defaultSettingsAreaDimensions);return o$i("section",{"data-rbup-settings-menu":!0,ref:g,role:"dialog","aria-labelledby":"rbupMenuTitle",class:y,style:f,onPointerUp:preventEventPropagation$1,onKeyDown:c=>{let d=c.key;(d===KEYCODE_ARROW_DOWN||d===KEYCODE_ARROW_UP||d===KEYCODE_0||d===KEYCODE_SPACE||d===KEYCODE_ENTER)&&c.stopPropagation(),d===KEYCODE_ESC&&("MAIN_MENU"!==p?k():u(c))},onTransitionEnd:L,children:[o$i("p",{class:"g-screen-reader-only settings-menu__invisible-title",id:"rbupMenuTitle",children:translate("tooltip-settings")}),o$i("div",{class:"settings-menu__settings-area",ref:U,children:[o$i(SettingsWrapper,{cssClass:"settings-menu__settings-page",enterPosition:0,leavePosition:F,show:"MAIN_MENU"===p,widthInPx:F,onMounted:C,children:o$i(SettingsMainMenu,{onNavClick:x,mainMenuRef
13:S})}),o$i("div",{class:"settings-menu__settings-container",children:[o$i(SettingsWrapper,{cssClass:"settings-menu__settings-page--positioned",enterPosition:F,leavePosition:0,show:"QUALITY"===p,widthInPx:F,onMounted:C,children:[o$i(BackButton,{onClick:k,text:translate("menu-quality"),ref:_}),o$i(QualitySettings,{isPlayerSizeMedium:c,onCloseMenu:u})]}),o$i(SettingsWrapper,{cssClass:"settings-menu__settings-page--positioned",enterPosition:F,leavePosition:0,show:"SUBTITLES"===p,widthInPx:F,onMounted:C,children:[o$i(BackButton,{onClick:k,text:translate("menu-subtitles"),ref:w}),o$i(SubtitlesSettings,{isPlayerSizeMedium:c,focusOnSelectedRadioButton:!1,onCloseMenu:u})]}),o$i(SettingsWrapper,{cssClass:"settings-menu__settings-page--positioned",enterPosition:F,leavePosition:0,show:"SPEED"===p,widthInPx:F,onMounted:C,children:[o$i(BackButton,{onClick:k,text:translate("menu-speeds"),ref:E}),o$i(SpeedSettings,{isPlayerSizeMedium:c,onCloseMenu:u})]}),o$i(SettingsWrapper,{cssClass:"settings-menu__settings-page--positioned",enterPosition:F,leavePosition:0,show:"AUDIO"===p,widthInPx:F,onMounted:C,children:[o$i(BackButton,{onClick:k,text:translate("menu-audioTracks"),ref:P}),o$i(AudioSettings,{isPlayerSizeMedium:c,focusOnSelectedRadioButton:!1,onCloseMenu:u})]}),o$i(SettingsWrapper,{cssClass:"settings-menu__settings-page--positioned",enterPosition:F,leavePosition:0,show:"MULTI-STREAM"===p,widthInPx:F,onMounted:C,children:[o$i(BackButton,{onClick:k,text:translate("menu-multi-stream"),ref:A}),o$i(MultiStreamSettings,{isPlayerSizeMedium:c,focusOnSelectedRadioButton:!1})]}),M&&o$i(SettingsWrapper,{cssClass:"settings-menu__settings-page--positioned",enterPosition:F,leavePosition:0,show:"SHARE"===p,widthInPx:F,onMounted:C,children:[o$i(BackButton,{onClick:k,text:translate("menu-sharing"),ref:T}),o$i(ShareSettings,{isPlayerSizeMedium:c})]})]})]}),d&&o$i("div",{class:"settings-menu__close-button",children:o$i(CosmosButton,{buttonAriaLabel:translate("button-closeMenu"),kind:"secondary",shape:"circle",onClick:u,children:o$i(CosmosIconClose,{slot:"icon"})})})]})};function preventEventPropagation(c){c.stopPropagation()}let SubtitlesMenu=({onCloseMenu:c})=>{let u=_$3(null);return useClickOutside(u,c),o$i("section",{ref:u,"data-rbup-subtitles-menu":!0,role:"dialog","aria-labelledby":"rbupSubtitlesMenuTitle",class:"subtitles-menu",onPointerUp:preventEventPropagation,onKeyDown:u=>{u.stopPropagation(),u.key===KEYCODE_ESC&&c(u),u.key===KEYCODE_TAB&&(u.preventDefault(),c(u))},children:[o$i(CosmosText,{id:"rbupSubtitlesMenuTitle",class:"subtitles-menu__title",size:"x-small",weight:"bold",children:translate("menu-subtitles")}),o$i(SubtitlesSettings,{isPlayerSizeMedium:!0,focusOnSelectedRadioButton:!0,onCloseMenu:c})]})},CenterControls=({isPlayerSizeMedium:c,CenteredToastComponent:u})=>u&&c?o$i("div",{class:"center-controls",children:o$i(u,{})}):null,Ta=class Ta{constructor(c,u,d,p){yi(this,"velocityReduction",1),yi(this,"pointerHasMoved",!1),yi(this,"viewingProjection",{x:0,y:0,clientX:0,clientY:0}),yi(this,"onPointerDown",c=>{this.viewingProjection=this.resolveInitialViewingProjectionCoordinates(c),this.velocityReduction=this.isMobileDevice?Ta.VR_VELOCITY_REDUCTION_MOBILE:Ta.VR_VELOCITY_REDUCTION_DESKTOP,this.addPointerEventListeners()}),yi(this,"onPointerMove",c=>{var u;c.preventDefault();let{x:d,y:p}=this.calculateViewingDirection(c);null==(u=this.playerData)||u.setViewingDirection(d,p),this.pointerHasMoved=this.detectPointerMove(d,p)}),yi(this,"onPointerUp",()=>{this.removePointerEventListeners(),this.pointerHasMoved&&this.showControlsTimeout.current>-1&&window.clearTimeout(this.showControlsTimeout.current),this.setPointerType("grab"),this.pointerHasMoved=!1}),this.showControlsTimeout=c,this.isMobileDevice=u,this.setPointerType=d,this.playerData=p}addPointerEventListeners(){document.addEventListener("pointermove",this.onPointerMove,{passive:!1}),document.addEventListener("touchmove",this.onPointerMove,{passive:!1}),document.addEventListener("pointerup",this.onPointerUp),document.addEventListener("touchend",this.onPointerUp)}removePointerEventListeners(){document.removeEventListener("pointermove",this.onPointerMove),document.removeEventListener("touchmove",this.onPointerMove),document.removeEventListener("pointerup",this.onPointerUp),document.removeEventListener("touchend",this.onPointerUp)}detectPointerMove(c,u){var d;let p=null==(d=this.playerData)?void 0:d.getViewingDirection();if(!p)return!1;let h=p.x-c,f=p.y-u;return Math.abs(h)>.01||Math.abs(f)>.01}resolveInitialViewingProjectionCoordinates(c){var u;let{x:d,y:p}=(null==(u=this.playerData)?void 0:u.getViewingDirection())??{x:0,y:0},{clientX:h,clientY:f}=this.resolveInputEventPointerCoordinates(c);return{x:d,y:p,clientX:h,clientY:f}}calculateViewingDirection(c){let{clientX:u,clientY:d}=this.resolveInputEventPointerCoordinates(c),p=(u-this.viewingProjection.clientX)/this.velocityReduction,h=(d-this.viewingProjection.clientY)/this.velocityReduction;return{x:p+this.viewingProjection.x,y:h+this.viewingProjection.y}}resolveInputEventPointerCoordinates(c){if("u">typeof TouchEvent&&c instanceof TouchEvent)return 0===c.touches.length?{clientX:0,clientY:0}:{clientX:c.touches[0].clientX,clientY:c.touches[0].clientY};if(c instanceof MouseEvent)return{clientX:c.clientX,clientY:c.clientY};throw Error("Unsupported event type")}destroy(){this.removePointerEventListeners()}};yi(Ta,"VR_VELOCITY_REDUCTION_DESKTOP",10),yi(Ta,"VR_VELOCITY_REDUCTION_MOBILE",5);let VRVideoPointerControl=Ta,DEFAULT_DOUBLE_TAP_INTERVAL=300,ClickAndTapOverlay=({onPointerMove:c}
13)=>{let u=_$3(new Date("1987-04-17T00:00:00")),d=_$3(0),p=_$3(-1),h=_$3(-1),f=_$3(-1),m=_$3(void 0),[g,v]=h$3(!1),[y,b]=h$3(!1),[S,_]=h$3("default"),{playerState:{playerCoordinator:E,playerStatus:T,isVRVideo:w}}=usePlayerContext(),P=isLiveLinearResolver(E),{hideControls:A,showControlsTemporarily:I,toggleControlsVisibility:M,menuState:R,setMenuState:k}=useControlsVisibilityContext(),x=F$4(()=>{if(w){let c=isMobileDevice();return _("grab"),new VRVideoPointerControl(h,c,_,null==E?void 0:E.getPlayerData())}},[w,E]),C=`fast-forward-backward-container__fast-backward-container${y?" fast-forward-backward-container__fast-backward-container--show-animation":""}`,O=`fast-forward-backward-container__fast-forward-container${g?" fast-forward-backward-container__fast-forward-container--show-animation":""}`;(y||g)&&A();let D=(c,u)=>{let d=isLeftClick(c)||isPrimaryPen(c);"CLOSED"!==R?k("CLOSED"):!d||w||P?d&&P?null==E||E.stop():isTouch(c)&&L(u):handlePlayPauseToggle(T,E)},L=c=>{let p=new Date;p.getTime()-u.current.getTime()<=DEFAULT_DOUBLE_TAP_INTERVAL&&!P&&m.current===c&&(d.current+=1,window.clearTimeout(h.current),"left"===c?(b(!0),N(-DEFAULT_SEEK_SKIP_SECONDS)):(v(!0),N(DEFAULT_SEEK_SKIP_SECONDS))),u.current=p,m.current=c},N=c=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{null==E||E.seekOrTimeshiftRelative(d.current*c),d.current=0,window.clearTimeout(f.current),f.current=window.setTimeout(()=>{b(!1),v(!1),I()},200)},DEFAULT_DOUBLE_TAP_INTERVAL)};return p$7(()=>()=>{window.clearTimeout(p.current),window.clearTimeout(h.current),window.clearTimeout(f.current),null==x||x.destroy()},[x]),o$i("div",{class:`click-and-tap-overlay-container ${S}`,"data-play-pause-capture":!0,onDblClick:()=>{isMobileDevice()||null==E||E.toggleFullscreen()},onPointerMove:c,onPointerUpCapture:c=>{(isLeftClick(c)||isPrimaryPen(c))&&I(),isTouch(c)&&(window.clearTimeout(h.current),h.current=window.setTimeout(()=>{M()},DEFAULT_DOUBLE_TAP_INTERVAL))},onPointerDown:c=>{w&&(_("grabbing"),null==x||x.onPointerDown(c))},role:"button",children:[o$i("div",{"data-play-pause-left-capture":!0,onPointerUp:c=>{D(c,"left")},children:o$i("div",{class:"fast-forward-backward-container",children:o$i("div",{class:C,children:[o$i("div",{className:"fast-backward-animation__arrow"}),o$i("div",{className:"fast-backward-animation__arrow animation__arrow--outer"})]})})}),o$i("div",{"data-play-pause-right-capture":!0,onPointerUp:c=>{D(c,"right")},children:o$i("div",{class:"fast-forward-backward-container",children:o$i("div",{class:O,children:[o$i("div",{className:"fast-forward-animation__arrow"}),o$i("div",{className:"fast-forward-animation__arrow animation__arrow--outer"})]})})})]})};function useTooltipVisibility(){let{playerState:{isFullscreenMode:c}}=usePlayerContext(),[u,d]=h$3(!1),[p,h]=h$3(""),f=T$4((c,u)=>{(isMouse(u)||isPen(u))&&(h(c),d(!0))},[]),m=T$4(()=>{d(!1)},[]);return p$7(()=>{d(!1)},[c]),{tooltipVisibility:u,tooltipText:p,onTooltipUpdate:f,hideTooltip:m}}let LIVE_EDGE_MAX_TIME_SHIFT=-4,LiveButton=({onTooltipUpdate:c})=>{let{playerState:{playerCoordinator:u}}=usePlayerContext(),d=isVideoCurrentlyLive(u),p=T$4(()=>{d||null==u||u.timeShift(0)},[d,u]),h=F$4(()=>d?"":translate("tooltip-dvr"),[d]),f=d?o$i(CosmosIconLive,{"data-rbup-icon-live":!0,class:"g-icon live-button__icon",slot:"icon"}):o$i(CosmosIconReplay,{"data-rbup-icon-replay":!0,class:"g-icon live-button__icon",slot:"icon"}),m=translate(d?"liveStream-live":"liveStream-seekBackToLive");return o$i("div",{class:d?"live-button-live":"live-button",children:o$i(ControlsButton,{dataAttribute:d?"data-rbup-live":"data-rbup-dvr",label:m,Icon:f,onPointerUp:p,tooltipText:h,onTooltipUpdate:c,size:"small",shape:"pill",appearance:"light",buttonLabel:m,disabled:d})})};function isVideoCurrentlyLive(c){return((null==c?void 0:c.getTimeShiftInSec())??0)>LIVE_EDGE_MAX_TIME_SHIFT||(null==c?void 0:c.getLiveVariant())==="LINEAR"}function getLabelText(c,u){return u?0===c?translate("multiChannel-seeSchedule"):1===c?translate("multiChannel-singleStreamLive",{figure:"1"}):translate("multiChannel-multipleStreamsLive",{figure:`${c}`}):""}let MultiChannelButton=({isPlayerSizeMedium:c,onTooltipUpdate:u,onPointerUp:d})=>{var p;let{playerState:{liveStatus:h}}=usePlayerContext(),f=translate("multiChannel-seeSchedule"),m=T$4(()=>{null==d||d()},[d]),g=getLabelText((null==(p=null==h?void 0:h.otherLiveVideos)?void 0:p.filter(c=>"live"===c.phase).length)??0,c);return o$i("div",{class:"multi-channel-button",children:o$i(ControlsButton,{dataAttribute:"data-rbup-multi-channel",label:g,Icon:o$i(CosmosIconBrowse,{"data-rbup-icon-browse":!0,class:"g-icon",slot:"icon"}),onPointerUp:m,tooltipText:f,onTooltipUpdate:u,size:"small",shape:c?"pill":"circle",appearance:"light",buttonLabel:g})})},ControlsTimeDisplay=({enableDuration:c=!0})=>{let{playerState:{durationInSec:u,playbackPosInSec:d}}=usePlayerContext(),p=F$4(()=>
13getFormattedTimeString(u),[u]);return o$i("div",{"data-rbup-time-display":!0,class:"controls-time-display",children:[o$i(CosmosText,{"data-rbup-playback-position":!0,appearance:"light",size:"xx-small@small x-small@medium",children:F$4(()=>getFormattedTimeString(d),[d])}),c&&o$i("div",{class:"controls-time-display__duration",children:[o$i(CosmosText,{"data-rbup-time-separator":!0,class:"controls-time-display__separator",appearance:"light",kind:"subtle",size:"xx-small@small x-small@medium",children:"/"}),o$i(CosmosText,{"data-rbup-playback-duration":!0,appearance:"light",kind:"subtle",size:"xx-small@small x-small@medium",children:p})]})]})},ThemedVideoPlayerTooltip=({children:c,...u})=>{let d=[u.class,"themed-video-player-tooltip"].filter(Boolean).join(" ");return o$i(CosmosTooltip,{...u,appearance:"dark",class:d,follow:"cursor",placement:"above",spacing:"tight",unreachable:!0,children:c})};function oneStepLinearCalc(c,u,d){return c/u*d}let VolumeIndicatorElement=c=>{let u=getCssClass(c);return o$i("div",{"data-rbup-volume-indicator":resolveTagAttributeValue(!c.active&&!c.highlight),"data-rbup-volume-indicator-active":resolveTagAttributeValue(c.active),"data-rbup-volume-indicator-highlighted":resolveTagAttributeValue(c.highlight),class:u})};function getCssClass({active:c,highlight:u}){let d="volume-indicator-element";return u?`${d} volume-indicator-element--highlighted`:c?`${d} volume-indicator-element--active`:d}let IndicatorElements=({volume:c})=>{let u=Math.round(c/10)-1,d=[];for(let c=0;c<10;c++)d[c]=o$i("div",{class:"controls-volume-slider__indicator-element",children:o$i(VolumeIndicatorElement,{active:c<u,highlight:c===u},c)},c);return o$i(k$5,{children:d})},SLIDER_WIDTH=38;function getCalculatedVolume(c){return c<0?0:Math.max(0,Math.min(100,Math.round(oneStepLinearCalc(c,SLIDER_WIDTH,100))))}let ControlsVolumeSlider=({currentVolume:c,isDragging:u,isHovering:d,onDraggingChanged:p,onVolumeChanged:h,onTooltipUpdate:f})=>{let m=_$3(null),g=d||u,v=T$4(c=>{var u;let{clientX:d}=c,p=(null==(u=m.current)?void 0:u.getBoundingClientRect().left)??d;g&&h(getCalculatedVolume(d-p))},[h,g]);return o$i("div",{class:"controls-volume-slider",ref:m,children:o$i("div",{class:`controls-volume-slider__slider ${g?"controls-volume-slider__slider--visible":""}`,onPointerDown:T$4(({offsetX:c})=>{let u=()=>{document.removeEventListener("pointerup",u),document.removeEventListener("pointermove",v),p(!1)};return p(!0),h(getCalculatedVolume(c)),document.addEventListener("pointerup",u),document.addEventListener("pointermove",v),()=>{document.removeEventListener("pointerup",u),document.removeEventListener("pointermove",v)}},[v,p,h]),onPointerOver:()=>{f(translate("tooltip-changeVolume"))},children:g&&o$i(IndicatorElements,{volume:c})})})};function convertVolumeLevel(c){if(c<0)throw Error("setting the volume to a value smaller than 0");return 0===c?"OFF":c<=30?"LOW":c<=60?"MEDIUM":"HIGH"}function getIconComponent(c){switch(c){case"OFF":return o$i(CosmosIconMute,{"data-rbup-icon-mute":!0,class:"g-icon",slot:"icon"});case"LOW":return o$i(CosmosIconVolumeLow,{"data-rbup-icon-volume-low":!0,class:"g-icon",slot:"icon"});case"MEDIUM":return o$i(CosmosIconVolumeMid,{"data-rbup-icon-volume-mid":!0,class:"g-icon",slot:"icon"});default:return o$i(CosmosIconVolume,{"data-rbup-icon-volume":!0,class:"g-icon",slot:"icon"})}}let VolumeButton=({volume:c,onClick:u,onTooltipUpdate:d})=>{let p=F$4(()=>convertVolumeLevel(c),[c]),h=translateWithHotKey("OFF"===p?"tooltip-unmute":"tooltip-mute");return o$i(ControlsButton,{size:"small",dataAttribute:"data-rbup-volume",Icon:getIconComponent(p),label:h,onPointerUp:u,onTooltipUpdate:d,tooltipText:h})},VolumeControls=({onControlsElementEnter:c})=>{let{playerState:{playerCoordinator:u,isShowingAd:d}}=usePlayerContext(),p=(null==u?void 0:u.getVolume())??100,[h,f]=h$3(!1),[m,g]=h$3(!1),v=T$4(()=>{let c=!(null==u?void 0:u.isMuted());null==u||u.setMuted(c)},[u]),y=T$4(c=>{null==u||u.setVolume(c)},[u]),b=T$4(()=>{f(!1)},[]),S=T$4(u=>{f(!0),null==c||c(u,!0)},[c]),_=T$4(c=>{g(c)},[]),E=F$4(()=>isMobileDevice(),[]),[T,w]=h$3(""),P=T$4(c=>{w(c)},[]);return o$i(ThemedVideoPlayerTooltip,{content:T,offset:d?7:30,children:o$i("div",{onPointerOver:S,onPointerLeave:b,class:"volume-control
13s",children:[o$i(VolumeButton,{onClick:v,volume:p,onTooltipUpdate:P}),!E&&o$i(ControlsVolumeSlider,{currentVolume:p,isHovering:h,isDragging:m,onDraggingChanged:_,onVolumeChanged:y,onTooltipUpdate:P})]})})},PlayPauseButton=({cssClass:c,onTooltipUpdate:u})=>{let{playerState:{playerStatus:d,playerCoordinator:p}}=usePlayerContext(),h="PLAYING"===d,f=h?o$i(CosmosIconPause,{"data-rbup-icon-pause":!0,class:`g-icon ${c}`,slot:"icon"}):o$i(CosmosIconPlay,{"data-rbup-icon-play":!0,class:`g-icon ${c}`,slot:"icon"}),m=translateWithHotKey(h?"tooltip-pause":"tooltip-play");return o$i(ControlsButton,{dataAttribute:h?"data-rbup-pause":"data-rbup-play",Icon:f,label:m,onPointerUp:T$4(()=>{handlePlayPauseToggle(d,p)},[d,p]),size:"small",tooltipText:m,onTooltipUpdate:u,appearance:"dark"})},BufferingPlaybackControls=({onTooltipUpdate:c})=>{let{playerState:{playerCoordinator:u,playerStatus:d}}=usePlayerContext(),p="BUFFERING"===d,h=translate(p?"tooltip-loading":"tooltip-stop"),f=T$4(async()=>{await (null==u?void 0:u.stop())},[u]);return p?o$i(CosmosSpinner,{"data-rbup-buffer":!0,class:"play-seek-controls__spinner",appearance:"light",label:translate("tooltip-loading"),onPointerEnter:u=>{c(h,u)}}):isLiveLinearResolver(u)&&"PLAYING"===d?o$i(ControlsButton,{dataAttribute:"data-rbup-stop",Icon:o$i(CosmosIconStop,{class:"g-icon play-seek-controls__icon",slot:"icon"}),label:h,tooltipText:h,onPointerUp:f,onTooltipUpdate:c,appearance:"dark"}):o$i(PlayPauseButton,{"data-rbup-play-pause":!0,cssClass:"play-seek-controls__icon",onTooltipUpdate:c})},MAIN_CLASS_NAME$1="play-seek-controls",PlaySeekControls=({enableSeek:c=!0,position:u="center",isMobileDevice:d=!1})=>{let{playerState:{playerCoordinator:p,playbackMode:h,liveVariant:f,isVRVideo:m}}=usePlayerContext(),g=(null==p?void 0:p.canSeekOrTimeshiftBackward())??!1,v=(null==p?void 0:p.canSeekOrTimeshiftForward())??!1,y="center"===u,b=y?void 0:`${MAIN_CLASS_NAME$1}__bottom`,S=[MAIN_CLASS_NAME$1,b,resolveVRContentClassName(m,d)].join(" "),{tooltipText:_,onTooltipUpdate:E}=useTooltipVisibility(),T=T$4(()=>{null==p||p.seekOrTimeshiftRelative(DEFAULT_SEEK_SKIP_SECONDS)},[p]),w=T$4(()=>{null==p||p.seekOrTimeshiftRelative(-DEFAULT_SEEK_SKIP_SECONDS)},[p]),P=F$4(()=>c&&("VOD"===h||"DVR"===f),[c,f,h]);return o$i("div",{"data-rbup-play-controls":resolveTagAttributeValue(y),"data-rbup-bottom-play-controls":resolveTagAttributeValue(!y),class:S,children:o$i(ThemedVideoPlayerTooltip,{content:_,offset:30,children:o$i("div",{class:"play-seek-controls__play-seek-pause-container","data-rbup-seek-pause-container":!0,children:[P&&o$i(ControlsButton,{appearance:"dark",dataAttribute:"data-rbup-seek-back",disabled:!g,Icon:o$i(CosmosIconBack10,{"data-rbup-icon-back-10":!0,class:"g-icon play-seek-controls__icon",slot:"icon"}),label:translate("tooltip-rewind"),onPointerUp:w,tooltipText:translate("tooltip-rewind"),onTooltipUpdate:E}),o$i(BufferingPlaybackControls,{onTooltipUpdate:E}),P&&o$i(ControlsButton,{appearance:"dark",dataAttribute:"data-rbup-seek-forward",disabled:!v,Icon:o$i(CosmosIconForward10,{"data-rbup-icon-forward-10":!0,class:"g-icon play-seek-controls__icon",slot:"icon"}),label:translate("tooltip-forward"),onPointerUp:T,tooltipText:translate("tooltip-forward"),onTooltipUpdate:E})]})})})};function resolveVRContentClassName(c,u){return c&&!u?`${MAIN_CLASS_NAME$1}__vr-content`:void 0}let LeftSideControls=({enableDuration:c,enableSeek:u,isPlayerSizeMedium:d,onShowMultiChannelSwitcher:p,onControlsElementEnter:h})=>{let{playerState:{playerCoordinator:f}}=usePlayerContext(),m=(null==f?void 0:f.getPlaybackMode())??"VOD",{tooltipVisibility:g,tooltipText:v,onTooltipUpdate:y,hideTooltip:b}=useTooltipVisibility();return o$i("div",{class:"left-side-controls",children:[o$i(PlaySeekControls,{enableSeek:u,position:"bottom",isMobileDevice:F$4(()=>isMobileDevice(),[])}),o$i(VolumeControls,{onControlsElementEnter:h}),"VOD"===m&&o$i(ControlsTimeDisplay,{enableDuration:c}),o$i(ThemedVideoPlayerTooltip,{content:v,offset:30,controlled:!0,visible:g,children:o$i("div",{class:"left-side-controls__selective-elements","data-rbup-left-side-control
13s-selective-elements":!0,onPointerLeave:b,children:["LIVE"===m&&o$i(LiveButton,{onTooltipUpdate:y}),p&&o$i(MultiChannelButton,{isPlayerSizeMedium:d,onTooltipUpdate:y,onPointerUp:p})]})})]})},FullscreenButton=({onTooltipUpdate:c})=>{let{playerState:{isFullscreenMode:u,playerCoordinator:d}}=usePlayerContext(),p=_$5(),h=translateWithHotKey(u?"tooltip-normalscreen":"tooltip-fullscreen"),f=T$4(()=>{null==d||d.toggleFullscreen();let c=p.current;null==c||c.blur()},[d,p]),m=u?o$i(CosmosIconFullscreenExit,{"data-rbup-icon-fullscreen-exit":!0,class:"g-icon",slot:"icon"}):o$i(CosmosIconFullscreen,{"data-rbup-icon-fullscreen":!0,class:"g-icon",slot:"icon"});return o$i(k$5,{children:(null==d?void 0:d.isFullscreenAvailable())&&o$i(ControlsButton,{ref:p,dataAttribute:"data-rbup-fullscreen",label:h,Icon:m,onPointerUp:f,tooltipText:h,onTooltipUpdate:c,size:"small"})})},OnlyFullscreenControls=()=>{let{playerState:{playerCoordinator:c}}=usePlayerContext(),{tooltipVisibility:u,tooltipText:d,onTooltipUpdate:p,hideTooltip:h}=useTooltipVisibility();return o$i("div",{class:"right-side-controls",onPointerLeave:h,children:o$i(ThemedVideoPlayerTooltip,{content:d,offset:30,controlled:!0,visible:u,children:o$i("div",{class:"right-side-controls__tooltip-wrapper",children:(null==c?void 0:c.isFullscreenAvailable())&&o$i(FullscreenButton,{onTooltipUpdate:p})})})})};function useShowControlsButtons(c){return c?controlsButtonsDisplaySetting(!1,!1,!0):controlsButtonsDisplaySetting(!0,!0,!0)}function controlsButtonsDisplaySetting(c,u,d){return{showPictureInPicture:c,showAirPlay:u,showFullscreen:d}}let InternalRightSideControls=({onMenuClicked:c,AdditionalButtonComponent:u},d)=>{let{playerState:{audioTracks:p,isHdPlayback:h,playerCoordinator:f,subtitleTracks:m,isVRVideo:g,isCasting:v,isCastingAvailable:y}}=usePlayerContext(),b=_$5(),S=_$5(),_=_$5(),E=_$5(),T=T$4(c=>{let u=c.current;null==u||u.focus()},[]),w=F$4(()=>({focusSubtitleMenuButton(){T(b)},focusAudioMenuButton(){T(S)},focusSettingsMenuButton(){T(E)},focusMultiStreamMenuButton(){T(_)}}),[S,_,T,E,b]);A$3(d,()=>w,[w]);let{showPictureInPicture:P,showAirPlay:A,showFullscreen:I}=useShowControlsButtons(g),M=T$4(u=>{u.stopPropagation(),c("AUDIO")},[c]),R=T$4(u=>{u.stopPropagation(),c("MULTI_STREAM")},[c]),k=T$4(u=>{u.stopPropagation(),c("SETTINGS")},[c]),x=T$4(u=>{u.stopPropagation(),c("SUBTITLES")},[c]),C=T$4(()=>{null==f||f.togglePictureInPicture()},[f]),O=T$4(()=>{null==f||f.playVideoViaAirPlay()},[f]),{tooltipVisibility:D,tooltipText:L,onTooltipUpdate:N,hideTooltip:U}=useTooltipVisibility(),F=m.length>0,B=o$i(CosmosIconSubtitles,{"data-rbup-icon-captions":!0,class:"g-icon",slot:"icon"}),j=p.length>1,H=null==f?void 0:f.getPlayerConfiguration().multiStreamAssets,V=!!H&&H.length>1,z=h?o$i(CosmosIconQuality,{"data-rbup-icon-quality":!0,class:"g-icon",slot:"icon"}):o$i(CosmosIconSettings,{"data-rbup-icon-settings":!0,class:"g-icon",slot:"icon"}),q=T$4(()=>{v?null==f||f.stopCastingVideo():null==f||f.startCastingVideo()},[v,f]);return o$i("div",{class:"right-side-controls",onPointerLeave:U,children:[o$i(ThemedVideoPlayerTooltip,{content:L,offset:30,controlled:!0,visible:D,children:o$i("div",{class:"right-side-controls__tooltip-wrapper",children:[V&&o$i("div",{class:"right-side-controls__multi-stream-button",children:o$i(ControlsButton,{ref:_,dataAttribute:"data-rbup-multi-stream",Icon:o$i(CosmosIconSeason,{"data-rbup-icon-multi-stream":!0,class:"g-icon",slot:"icon"}),label:translate("menu-multi-stream"),onPointerUp:R,tooltipText:translate("tooltip-multi-stream"),onTooltipUpdate:N,size:"small"})}),j&&o$i("div",{class:"right-side-controls__audio-button",children:o$i(ControlsButton,{ref:S,dataAttribute:"data-rbup-audio",Icon:o$i(CosmosIconAudioSettings,{"data-rbup-icon-multi-language":!0,class:"g-icon",slot:"icon"}),label:translate("tooltip-audioTracks"),onPointerUp:M,tooltipText:translate("tooltip-audioTracks"),onTooltipUpdate:N,size:"small"})}),F&&o$i("div",{class:"right-side-controls__subtitles-button",children:o$i(ControlsButton,{ref:b,dataAttribute:"data-rbup-subtitles",Icon:B,label:translate("tooltip-subtitles"),onPointerUp:x,tooltipText:translate("tooltip-subtitles"),onTooltipUpdate:N,size:"small"})}),!v&&o$i(ControlsButton,{ref:E,dataAttribute:"data-rbup-settings",label:translate("tooltip-settings"),Icon:z,onPointerUp:k,tooltipText:translate("tooltip-settings"),onTooltipUpdate:N,size:"small"}),!v&&P&&(null==f?void 0:f.isPictureInPictureAvailable())&&o$i(ControlsButton,{dataAttribute:"data-rbup-pip",Icon:o$i(CosmosIconPictureInPicture,{"data-rbup-icon-picture-in-picture":!0,class:"g-icon",slot:"icon"}),label:translate("tooltip-pip"),onPointerUp:C,tooltipText:translateWithHotKey("tooltip-pip"),onTooltipUpdate:N,size:"small"}),A&&(null==f?void 0:f.isAirPlayAvailable)&&o$i(ControlsButton,{dataAttribute:"data-rbup-airplay",Icon:o$i(CosmosIconAirplay,{"data-rbup-icon-airplay":!0,class:"g-icon",slot:"icon"}),label:translate("tooltip-airplay"),onPointerUp:O,tooltipText:translate("tooltip-airplay"),onTooltipUpdate:N,size:"small"}),y&&o$i(ControlsButton,{dataAttribute:"data-rbup-casting",Icon:v?o$i(CosmosIconChromecastFilled,{"data-rbup-icon-cast":!0,class:"g-icon",slot:"icon"}):o$i(CosmosIconChromecast,{"data-rbup-icon-cast":!0,class:"g-icon",slot:"icon"}),label:translate("tooltip-casting"),onPointerUp:q,tooltipText:translate("tooltip-casting"),onTooltipUpdate:N,size:"small"}),I&&(null==f?void 0:f.isFullscreenAvailable())&&o$i(FullscreenButton,{onTooltipUpdate:N})]})}),u&&o$i(u,{onTooltipUpdate:N})]})},RightSideControls=k$3(InternalRightSideControls),VideoDetails=({sizeBreakpoints:c})=>{let{playerState:{mediaMetaData:u,playerConfiguration:d}}=usePlayerContext(),p=F$4(()=>null!=d&&d.title?d.title:null==u?void 0:u.title,[null==u?void 0:u.title,d]),h=F$4(()=>null!=d&&d.title?d.description:null==u?void 0:u.description,[null==u?void 0:u.description,d]);if((null==d?void 0:d.videoDetails)==="hidden")return null;let f=c.largeOrBigger;
13return p?o$i("div",{"data-rbup-video-details":!0,class:"video-details",children:[o$i(CosmosTitle,{appearance:"light",clamp:1,class:"video-details__title",size:f?"medium":"x-small",weight:"bold",dir:"auto",children:p}),!isMobileDevice()&&h&&o$i(CosmosText,{appearance:"light",clamp:1,class:"video-details__description",kind:"subtle",size:"small",dir:"auto",children:h})]}):null};function calculateControlsClassName(c,u){return`controls-container ${"fade-in"===c?"controls-container--fade-in":"fade-out"===c?"controls-container--fade-out":"controls-container--hide"} ${u?"controls-container--fullscreen":""}`}function shouldShowInnerControls(c,u){return"SETTINGS"!==u||c}let MenuContainer=({menuState:c,isPlayerSizeMedium:u,onCloseSettingsMenu:d,onCloseSubtitleMenu:p,onCloseAudioMenu:h,onCloseMultiStreamMenu:f})=>o$i(k$5,{children:["SETTINGS"===c&&o$i(SettingsMenu,{activateResizing:u,onCloseMenu:d}),"SUBTITLES"===c&&o$i(SubtitlesMenu,{onCloseMenu:p}),"AUDIO"===c&&o$i(AudioMenu,{onCloseMenu:h}),"MULTI_STREAM"===c&&o$i(MultiStreamMenu,{onCloseMenu:f})]}),Controls=({enableDuration:c,enableSeek:u,enableVideoDetails:d=!0,globalKeyboardNavigation:p="ACTIVE",sizeBreakpoints:h,onlyFullscreenControls:f,onShowMultiChannelSwitcher:m,allowCaptureAreaInteraction:g=!0,CenteredToastComponent:v,AdditionalButtonComponent:y})=>{let b=useStreamingButtonBar(),{playerState:{playerStatus:S,isShowingAd:_,playerCoordinator:E,isFullscreenMode:T}}=usePlayerContext(),{controlsVisibility:w,showControlsTemporarily:P,showControlsPermanently:A,menuState:I,setMenuState:M,onControlsElementEnter:R,toggleMenu:k,onControlsElementFocus:x,onControlsElementBlur:C}=useControlsVisibilityContext(),O=h.mediumOrBigger,D=shouldShowInnerControls(O,I),L="CLOSED"!==I,N=calculateControlsClassName(w,T),U=_$3(null),F=_$3(null),B=F$4(()=>isMobileDevice(),[]);useGlobalKeyboardNavigation(p,async c=>{await handleKeyboardEvent(c,E)},E);let j=T$4(c=>{(isMouse(c)||isPen(c))&&P()},[P]),H=T$4(c=>{c?A():P()},[A,P]),V=T$4(c=>{!B||O?k(c):U.current=window.setTimeout(()=>{k(c),U.current=null},100)},[O,B,k]);p$7(()=>()=>{U.current&&window.clearTimeout(U.current)},[]);let z=T$4(()=>{var c;M("CLOSED"),null==(c=F.current)||c.focusSettingsMenuButton()},[M]),q=T$4(()=>{var c;M("CLOSED"),null==(c=F.current)||c.focusSubtitleMenuButton()},[M]),W=T$4(()=>{var c;M("CLOSED"),null==(c=F.current)||c.focusAudioMenuButton()},[M]),G=T$4(()=>{var c;M("CLOSED"),null==(c=F.current)||c.focusMultiStreamMenuButton()},[M]);return p$7(()=>{O||M(c=>"SUBTITLES"===c||"AUDIO"===c||"MULTI_STREAM"===c?"CLOSED":c)},[O,M]),p$7(()=>{"ENDED"===S&&M("CLOSED")},[S,M]),o$i("div",{"data-rbup-controls":!0,class:N,onFocus:()=>{B||P()},onFocusCapture:x,onBlur:C,onPointerEnterCapture:R,role:"region","aria-label":"Video Player Controls",children:[!_&&g&&o$i(ClickAndTapOverlay,{onPointerMove:j}),D&&o$i(k$5,{children:[o$i("div",{className:"controls__gradient"}),d&&o$i("div",{"data-rbup-controls-details":!0,class:"controls__video-details",children:o$i(VideoDetails,{sizeBreakpoints:h})}),o$i("div",{"data-rbup-controls-play-seek":!0,class:"controls__play",onPointerUpCapture:()=>{P()},children:o$i(PlaySeekControls,{enableSeek:u,isMobileDevice:B})}),o$i("div",{"data-rbup-controls-scrub-bar":!0,class:"controls__scrub-bar",children:o$i(ScrubBar,{onDragStatusChanged:H,sizeBreakpoints:h,hideScrubBarTooltip:L,onControlsElementEnter:R})}),o$i("div",{"data-rbup-controls-buttons":!0,class:"controls__buttons-container",onPointerMove:j,onPointerUpCapture:()=>{P()},children:[o$i("div",{class:"controls__buttons",children:[o$i(LeftSideControls,{enableDuration:c,enableSeek:u,isPlayerSizeMedium:O,onShowMultiChannelSwitcher:m,onControlsElementEnter:R}),f&&o$i(OnlyFullscreenControls,{}),!f&&o$i(k$5,{children:[o$i(CenterControls,{isPlayerSizeMedium:O,CenteredToastComponent:v}),o$i(RightSideControls,{ref:F,onMenuClicked:V,AdditionalButtonComponent:y})]})]}),b]})]}),o$i(MenuContainer,{menuState:I,isPlayerSizeMedium:O,onCloseAudioMenu:W,onCloseSettingsMenu:z,onCloseSubtitleMenu:q,onCloseMultiStreamMenu:G})]})},RbupVideoCoreOverlay=({enableDuration:c,enableSeek:u=!0,enableVideoDetails:d,globalKeyboardNavigation:p,playerCoordinator:h,sizeBreakpoints:f,onlyFullscreenControl
13s:m,onShowMultiChannelSwitcher:g,allowControlsCaptureAreaInteraction:v=!0,CenteredToastComponent:y,AdditionalButtonComponent:b})=>{let S=h.getPlayerStatus(),_="allow"===useControlsVisibilityContext().allowControlsRendering&&!["IDLE","ERROR"].includes(S),E=q$2(UserInteractionContext);return o$i("div",{"data-rbup-overlay":!0,class:v?"overlay":"overlay disabled",onPointerMove:T$4(c=>{E.trigger(c)},[E]),dir:"ltr",children:_&&o$i(Controls,{enableDuration:c,enableSeek:u,enableVideoDetails:d,globalKeyboardNavigation:p,sizeBreakpoints:f,onlyFullscreenControls:m,onShowMultiChannelSwitcher:g,allowCaptureAreaInteraction:v,CenteredToastComponent:y,AdditionalButtonComponent:b})})};function getLanguageMatchForIsoCode(c,u){var d;if(!u)return;let p=c.split("-")[0];return null==(d=Object.entries(u).find(([c,u])=>u===p))?void 0:d[0]}function getLanguageMatchForAudioLanguage(c,u){var d;return u?null==(d=Object.entries(u).find(([u,d])=>d===c||u===c))?void 0:d[0]:void 0}function getIsoMatchForAudioLanguage(c,u){var d;return u?null==(d=Object.entries(u).find(([u,d])=>d===c||u===c))?void 0:d[1]:void 0}function getMatchedAudioOrSubtitleTrackLanguage(c,u){var d;return null==(d=u.find(u=>u.lang===c))?void 0:d.lang}function getMatchedAudioTrackId(c,u){var d;return null==(d=u.find(u=>u.lang===c))?void 0:d.id}function getMatchedSubtitleTrackId(c,u){var d;return null==(d=u.find(u=>u.lang===c))?void 0:d.id}function tryResolveRequestedAudioLanguageForAudioTrack(c,u,d){let p=getMatchedAudioOrSubtitleTrackLanguage(c,d);return p||getLanguageMatchForIsoCode(c,u)||getLanguageMatchForAudioLanguage(c,u)}function tryResolveRequestedSubtitleLanguageForSubtitleTrack(c,u,d){let p=getMatchedAudioOrSubtitleTrackLanguage(c,d);return p||getLanguageMatchForIsoCode(c,u)||getLanguageMatchForAudioLanguage(c,u)}var collector_bitmovin={exports:{}};!function(c){var u,d,p,h,f;u={},d=window.URL,p=window.URLSearchParams,h=window.EventTarget,f=window.CustomEvent,function(c,m,g){var v,y,b=c.Object,S=c.Array,_=c.Date,E=c.Number,T=c.String,w=c.RegExp,P=c.Math,A=c.XMLHttpRequest,I=c.Uint8Array,M=c.ArrayBuffer,R=c.JSON,k=c.Promise,x=c.document||{},C=x.currentScript||{},O=c.location||{},D=c.navigator||{},L=D.userAgent||"",N=D.connection||D.mozConnection||D.webkitConnection,U=c.crypto,F=c.console||{},B=c.performance,j=c.setInterval,H=c.setTimeout,V=c.decodeURIComponent,z=c.encodeURIComponent;try{v=c.localStorage,y=c.sessionStorage}catch{}function q(c){return c?function(u,d){u="[DZ] "+u,void 0===d?c.call(F,u):c.call(F,u,d)}:null}var W=q(F.log)||function(){},G=q(F.error)||W,K=q(F.warn)||W,Y=q(F.info)||W,X=q(F.debug)||W,Q={options:{cmcdEnable:!1,cmcdMode:null,cmcdKeys:null}},Z="datazoom_",W="__"+Z+"rootobj",J="custom_";if(Q[W]=1,u)u.datazoom=Q;else{if(to(c.datazoom)){if(c.datazoom[W])return K("Collector already loaded");K("Overwriting window.datazoom")}c.datazoom=Q}function $(c,u,d){var p,h=u.shift();return null==h?p=c:c?h instanceof w?b.keys(c).some(function(d){if(h.test(d))return null!=(p=$(c[d],u.slice()))}):p=$(c[h],u):p=null,p??d}function ee(c){return"function"==typeof c}function et(c,u){if(ee(c))try{return new(c=u?c.bind.apply(c,[null].concat(u)):c),1}catch{}}et(d,["http://x.io"])&&et(p)||(p=function(c){var u=[];function d(c,d){!1!==d&&u.push([c,d])}function p(c){u=u.filter(function(u){return u[0]!==c})}c&&c.slice(1).split("&").forEach(function(c){c=c.split("=");try{u.push([V(c[0]),null==c[1]||V(c[1])])}catch(c){eC(c,"URLSearchParams()")}}),c=this,c.append=d,c.delete=p,c.set=function(c,u){p(c),d(c,u)},c.get=function(c){var d=null;return u.some(function(u){if(u[0]===c)return d=u[1],!0}),d},c.toString=function(){return u.map(function(c){var u=z(c[0]);return!0===c[1]?u:u+"="+z(c[1])}).join("&")}},d=function(c){var u=this,c=c.split("?"),d=c[0],c=c[1]?"?"+c[1]:"";u.search=c,u.searchParams=new p(c),u.toString=function(){return d+u.search}}),et(h)&&et(f,["x"])||(h=function(){var c=this,u={};c.addEventListener=function(c,d){var p=u[c];p||(u[c]=p=[]),p.push(d)},c.removeEventListener=function(c,d){var p=u[c];p&&(u[c]=p.filter(function(c){return c!=d}))},c.dispatchEvent=function(d){var p=u[d.type];p&&p.forEach(function(u){H(function(){u.call(c,d)},0)})}},f=function(c,u){this.type=c,u&&(this.detail=u.detail)}),m=b.assign({},{cn:"Bitmovin Player",sv:"2.28.0",cf:"",mf:null,ev:[],fd:[],md:[],od:null,mb:"",sw:!1,sm:"",sp:[],ss:"",sd:"",sc:"",ab:"",st:null,hi:1e4,ti:200,cm:null,am:null,cq:null,aq:null,rd:[1,2,4,8,8,8,8],bd:50,kd:50,mh:5e3,ml:0,mc:256,mp:2.5,ep:2,ed:2500,ec:E.MAX_VALUE,cc:"",cl:"",ci:"",cd:[],og:!0,os:!0,tt:!1,om:!1,ps:null,sn:["IDLE","CT_REQUESTED","CT_BUFFERING","CT_PLAYING","CT_PAUSED","CT_SEEKING","CT_COMPLETED","CT_STOPPED","CT_ERROR","AD_BUFFERING","AD_PLAYING","AD_PAUSED","AD_SEEKING","AD_COMPLETED","AD_SKIPPED","AD_ERROR","AD_BREAK_STARTED","AD_BREAK_ENDED"],le:function(c){var u=c.event,d=c.video;ek("[Event] "+u.type+(d?" ("+d.media_type+")":"")+" @"+u.timestamp,e6(c))}},m||{});var ei,en,er,eo={datapoints:{events:"ev",flux_data:"fd",metadata:"md",cmcd:"cd"},endpoints:{event_ingest:"mb",sampling:"sm",ad_blocker_bait:"ab"},sampling:{enable:"sw",definition_namespace:"ss",definition_key_name:"sd",criteria_sampling_key_name:"sc",criteria_matching_fields:"sp"},ondemand:"od",customer_code:"cc",connector_list:"cl",app_session_timeout_mins:"st",heartbeat_interval_ms:"hi",content_milestone_percent:"cm",ad_milestone_percent:"am",content_qv_sec:"cq",ad_qv_sec:"aq",observability:{lag_enabled:"og",loss_enabled:"os"},om_enabled:"om",configuration_id:""},ea=!u&&C.src||"/",es=O.href||"https://localhost",el="configuration_id",ec="urn:x-cast:io.datazoom.collector",eu="transfer",ed={off:0,error:1,warning:2,info:3,debug:4,verbose:5},ep=2;function eh(c){var u;c&&(0<=(u=(u=ed[c])??+c)&&u<=5?ep=u:K("Invalid log level: "+c))}function ef(){ei={}
13,en=[],[[m.ps],[ea.split("?")[1]],[es.split("?")[1],Z]].forEach(function(c){var u=c[1];c[0]&&c[0].split("&").forEach(function(c){try{var d=c.split("="),p=V(d[0]);if(u){if(!p.startsWith(u))return;p=p.slice(u.length)}ei[p]=null==d[1]||V(d[1]),p.startsWith("x-")&&en.push([p,ei[p]])}catch(c){K("Invalid query string: "+c.message)}})}),er="true"==ei.demo,eh(ei.log)}ef();var em="io.datazoom.",eg=em,ev="__ss_ev_count",ey="__ss_last_act",eb="__ss_custom_md",eS="__ss_msg_queue",e_="__ss_sm_resp",eE="__ss_appss_to",eT="__ss_on_demand",ew="collector_observability",eP="attempt_count",eA="status_code";function eI(c,u){ep<1||G(c,u)}function eM(c,u){ep<2||K(c,u)}function eR(c,u){ep<3||Y(c,u)}function ek(c,u){ep<4||X(c,u)}function ex(c,u){ep<5||X(c,u)}function eC(c,u){return eI(u="[Exception] "+(u?"("+u+") ":"")+c,c),u}function eO(c,u,d,p,h){var f,m=0,g=1,v=0;return u=u||"",d=d||1,p=p||E.MAX_VALUE,{log:function(y,b){(f=eN())>=v+h&&(m=0,g=1,v=f),++m>=g&&(c("["+m+"] "+u+y,b),g+=P.min(g*d,p))}}}function eD(u,d){eX(c,"postMessage",[{type:u,data:d},"*"])}var eL,eN,eU,eF,eB,ej,eH=[],eV=0;function ez(c,u,d,p,h,f,m,g){var d={time:d,metric_name:p,dimension:{},batch:function(){return f}},v=(c&&(d.type=c),null!=h&&(d.metric_value=h),d.dimension);return u&&(v.target=u),g&&g.forEach(function(c){v[c[0]]=c[1]}),m&&(v.b4_ss=!0),d}function eq(c,u,d,p){var h=u,f=1,g=eV++;return{retry:function(c){h=c,f++},log:function(v,y){var b;m.og&&(null!=d&&eH.push(ez(null,c,b=u-d,"process_duration_ms",v-b,g,p,[[eP,f],[eA,y]]),ez(null,c,b,"queue_duration_ms",d,g,p)),eH.push(ez(null,c,u,"send_duration_ms",v-u,g,!1,[[eP,f],[eA,y]]),ez(null,c,h,"call_duration_ms",v-h,g,!1,[["attempt",f],[eA,y]])))}}}function eW(c){var u,d=eL[c],p=eV++;d[2]&&(d[3]&&(u=[["status_codes",d[3]]]),eH.push(ez("loss",null,6e4*c,"evnt_fail",d[2],p,!1,u)))}function eG(c){return c&&(tr(c)?c.slice():b.assign({},c))}function eK(c,u){return to(u)?c?b.assign({},c,u):u:c}function eY(c,u){var d;return u?c?(d=eG(c),b.keys(u).forEach(function(p){var h=c[p];d[p]=h?b.assign({},h,u[p]):u[p]}),d):u:c}function eX(c,u,d,p){return ee(u=$(c,[u],p))?u.apply(c,d):null}function eQ(c,u,d){return function(){try{return u.apply(c,arguments)}catch(c){eC(c,d)}}}function eZ(c,u){b.keys(c).forEach(function(d){u.forEach(function(u){u[d]=eQ(u,c[d],d)})}),u[0]}function eJ(c){var u={};return c.forEach(function(c){u[c.nm]=c}),u}function e$(c){var u={};return c.forEach(function(c){u[c.nm]=!0}),u}
13function e0(c,u,d){c.forEach(function(c){c[u]=d})}function e1(c,u){var c=new d(c,es),h=new p(c.search);return u(h),c.search="?"+h.toString(),c.toString()}function e2(c){var u,d=en.length;return d?e1(c,function(c){for(u=0;u<d;u++)c.append(en[u][0],en[u][1])}):c}function e3(c,u,p){var h;return null!=(h=c?new d(c,es).searchParams.get(u):h)?h:p}eU=0,eF=m.ec,eB=eO(eM,"Abnormal clock increment: ",.2,1e3,3e5),B&&B.now,ej=eU+_.now(),eN=function(c){var u=_.now(),d=ej,p=(ej=eU+u)-d;return(p<0||eF<p)&&(eU=(ej=d+m.ti)-u,eB.log(p)),ej};var e5=function(){for(var c=[],u=0;u<256;u++)c.push((u+256).toString(16).substr(1).toLowerCase());return function(){var u=new I(16);if(U&&U.getRandomValues)U.getRandomValues(u);else{eM("getRandomValues() not supported");for(var d=0;d<16;d++)u[d]=P.floor(256*P.random())}return u[6]=15&u[6]|64,u[8]=63&u[8]|128,c[u[0]]+c[u[1]]+c[u[2]]+c[u[3]]+"-"+c[u[4]]+c[u[5]]+"-"+c[u[6]]+c[u[7]]+"-"+c[u[8]]+c[u[9]]+"-"+c[u[10]]+c[u[11]]+c[u[12]]+c[u[13]]+c[u[14]]+c[u[15]]}}();function e4(c,u,d,p,h,f){var m=new A;if(m.open(c,u,!0),d)for(var g=b.keys(d),v=0;v<g.length;v++)m.setRequestHeader(g[v],d[g[v]]);return h&&(m.onreadystatechange=function(){h(m)}),m.send(p),{abort:function(){delete m.onreadystatechange,m.abort()}}}function e6(c){if(c)try{return R.stringify(c)}catch(c){eC(c,"toJSON")}return null}function e8(c){if(c)try{return R.parse(c)}catch(c){eC(c,"fromJSON")}return null}function e7(c,u){return(c===y?eg:em)+u}function e9(c,u,d){if(c)if(null==d)tt(c,u);else try{c.setItem(e7(c,u),e6({v:d}))}catch(c){eC(c,"storageSet")}}function te(c,u){return(c=c?e8(c.getItem(e7(c,u))):null)?c.v:null}function tt(c,u){c&&c.removeItem(e7(c,u))}function ti(c){return"string"==typeof c}function tn(c){return E.isFinite(c)}function tr(c){return S.isArray(c)}function to(c){return null!=c&&"object"==typeof c&&!tr(c)}function ta(c){return ti(c)?c:""+c}function ts(c){return tn(c*=1)?c:null}function tl(c,u,d){return null==c&&null==u?ts:function(p){return null!=(p=ts(p))&&(null!=c&&p<c?p=d?null:c:null!=u&&u<p&&(p=d?null:u)),p}}function tc(c,u){for(var d=0;d<u.length;d++)!function(c){for(var u=1;u<arguments.length;u++)c.dv||(c.dv=[]),c.dv.push(arguments[u])}(u[d],c)}function tu(c,u){if(u)for(var d=0;d<u.length&&null!=c;d++)c=u[d](c);return c}c.self!==c.top&&ek("Page loaded in a frame, set sessionStorage prefix to: "+(eg+=(ei.frame_id||e5())+".")),e8("{}");var td,W=17,C=20,B=52,tp={ap:2,nm:"ad_break_start"},th={ap:2,nm:"ad_break_end"},tf={ap:2,nm:"ad_click"},tm={ap:2,nm:"ad_impression"},tg={ap:2,nm:"ad_skip"},tv={ap:4,nm:"app_session_end"},ty={ap:3,nm:"audio_track_changed"},tb={ap:3,nm:"buffer_start"},tS={ap:3,nm:"buffer_end"},t_={ap:3,nm:"cast_start"},tE={ap:3,nm:"cast_end"},tT={ap:3,nm:"cast_transfer"},tw={ap:65535,nm:"context_ready"},tP={ap:4,nm:"datazoom_loaded"},tA={ap:3,nm:"error"},tI={ap:3,nm:"exit_fullscreen"},tM={ap:3,nm:"fullscreen"},tR={ap:3,nm:"heartbeat"},tk={ap:3,nm:"media_loaded"},tx={ap:1,nm:"media_object_request"},tC={ap:3,nm:"media_request"},tO={ap:3,nm:"milestone"},tD={ap:3,nm:"mute"},tL={ap:3,nm:"pause"},tN={ap:3,nm:"play_btn"},tU={ap:3,nm:"playback_start"},tF={ap:3,nm:"playback_complete"},tB={ap:1,nm:"player_ready"},tj={ap:3,nm:"playing"},tH={ap:3,nm:"qualified_view"},tV={ap:1,nm:"quality_change_request"},tz={ap:3,nm:"rendition_change"},tq={ap:3,nm:"resize"},tW={ap:3,nm:"resume"},tG={ap:3,nm:"seek_start"},tK={ap:3,nm:"seek_end"},tY={ap:3,nm:"stall_start"},tX={ap:3,nm:"stall_end"},tQ={ap:3,nm:"stop"},tZ={ap:3,nm:"subtitle_change"},tJ={ap:3,nm:"unmute"},t$={ap:3,nm:"volume_change"},t0=(tC.rtc=0,tU.rtc=1,tL.rtc=2,tb.rtc=3,tY.rtc=4,tG.rtc=5,tz.rtc=6,tO.rtc=7,tC.rta=8,tU.rta=9,tb.rta=10,tY.rta=11,tO.rta=12,tA.rta=tg.rta=tF.rta=13,tp.rta=14,th.rta=15,tR.rt=16,tb.rt=17,tY.rt=18,["event","metrics"]),t1={ap:W,nm:"bandwidth_kbps"},t2={ap:W,nm:"buffer_duration_ms"},t3={ap:W,nm:"buffer_duration_ads_ms"},t5={ap:W,nm:"buffer_duration_content_ms"},t4={ap:W,nm:"buffer_fill_percent"},t6={ap:W,nm:"buffer_length_ms"},t8={ap:W,nm:"content_session_start_ts_ms"},t7={ap:3,nm:"current_audio_track"},t9={ap:W,nm:"current_subtitles"},it={ap:C,nm:"engagement_duration_ms"},ii={ap:C,nm:"engagement_duration_ads_ms"},ir={ap:C,nm:"engagement_duration_content_ms"},io={ap:8,nm:"event_count"},ia={ap:W,nm:"num_ad_break_plays"},is={ap:C,nm:"num_ad_plays"},il={ap:C,nm:"num_content_plays"},ic={ap:C,nm:"num_errors"},iu={ap:C,nm:"num_errors_ads"},id={ap:C,nm:"num_errors_content"},ip={ap:C,nm:"num_requests_content"},ih={ap:W,nm:"pause_duration_ms"},im={ap:W,nm:"pause_duration_ads_ms"},ig={ap:W,nm:"pause_duration_content_ms"},iv={ap:W,nm:"playback_duration_ms"},iy={ap:W,nm:"playback_duration_ads_ms"}
13,ib={ap:2,nm:"playback_duration_ad_session_ms"},iS={ap:W,nm:"playback_duration_content_ms"},i_={ap:W,nm:"playback_duration_promo_ms"},iE={ap:3,nm:"playback_rate"},iT={ap:W,nm:"player_state"},iw={ap:W,nm:"player_viewable"},iP={ap:W,nm:"player_viewable_percent"},iA={ap:3,nm:"playhead_position_sec"},iI={ap:W,nm:"playhead_pdt_sec"},iM={ap:3,nm:"rendition_audio_bitrate_kbps"},iR={ap:3,nm:"rendition_height"},ik={ap:3,nm:"rendition_name"},ix={ap:3,nm:"rendition_video_bitrate_kbps"},iC={ap:3,nm:"rendition_width"},iO={ap:W,nm:"stall_count"},iD={ap:W,nm:"stall_count_ads"},iL={ap:W,nm:"stall_count_content"},iN={ap:W,nm:"stall_duration_ms"},iU={ap:W,nm:"stall_duration_ads_ms"},iF={ap:W,nm:"stall_duration_content_ms"},iB={ap:W,nm:"time_since_last_ad_break_start_ms"},ij={ap:W,nm:"time_since_last_ad_completed_ms"},iH={ap:W,nm:"time_since_last_buffer_start_ms"},iV={ap:W,nm:"time_since_last_buffer_start_ad_ms"},iz={ap:W,nm:"time_since_last_buffer_start_content_ms"},iq={ap:W,nm:"time_since_last_heartbeat_ms"},iW={ap:W,nm:"time_since_last_milestone_ad_ms"},iG={ap:W,nm:"time_since_last_milestone_content_ms"},iK={ap:W,nm:"time_since_last_pause_ms"},iY={ap:W,nm:"time_since_last_rendition_change_ms"},iX={ap:W,nm:"time_since_last_request_ad_ms"},iQ={ap:W,nm:"time_since_last_seek_start_ms"},iZ={ap:W,nm:"time_since_last_stall_start_ms"},iJ={ap:W,nm:"time_since_last_stall_start_ad_ms"},i$={ap:W,nm:"time_since_last_stall_start_content_ms"},i0={ap:W,nm:"time_since_last_started_ad_ms"},i1={ap:W,nm:"time_since_request_content_ms"},i2={ap:W,nm:"time_since_started_content_ms"},i3={ap:W,nm:"volume_level_percent"},i5=(e0([t2,t3,t5,ih,im,ig,iv,iy,iS,i_,iO,iD,iL,iN,iU,iF,is,ic,iu,id,il,ip],"df",0),i1.ts=0,i2.ts=1,iK.ts=2,iz.ts=3,i$.ts=4,iQ.ts=5,iY.ts=6,iG.ts=7,iX.ts=8,i0.ts=9,iV.ts=10,iJ.ts=11,iW.ts=12,iB.ts=14,ij.ts=13,iq.ts=16,iH.ts=17,iZ.ts=18,[]),i4=["event"],i6=["event","attributes"],i8=["cmcd"],i7=["user_details"],i9=["player"],ne=["device"],nt=["video"],ni=["geo_location"],nn=["network"],nr=["page"],no=["ad"],na=["ops_metadata"],ns=["custom"],nl=["vendor"],nc={p:i5,ap:B,nm:"configuration_id"},nu={p:i5,ap:B,nm:"connector_list"},nd={p:i5,ap:B,nm:"customer_code"},np={p:i5,ap:8,nm:"event_id"},nh={p:i4,ap:8,nm:"timestamp"},nf={p:i4,ap:8,nm:"type"},i5={p:i8,ap:8,nm:"bl"},i4={p:i8,ap:8,nm:"br"},nm={p:i8,ap:8,nm:"bs"},ng={p:i8,ap:8,nm:"cid"},nv={p:i8,ap:8,nm:"d"},ny={p:i8,ap:8,nm:"dl"},nb={p:i8,ap:8,nm:"mtp"},nS={p:i8,ap:8,nm:"nor"},n_={p:i8,ap:8,nm:"nrr"},nE={p:i8,ap:8,nm:"ot"},nT={p:i8,ap:8,nm:"pr"},nw={p:i8,ap:8,nm:"rid"},nP={p:i8,ap:8,nm:"rtp"},nA={p:i8,ap:8,nm:"sf"},nI={p:i8,ap:8,nm:"sid"},nM={p:i8,ap:8,nm:"st"},nR={p:i8,ap:8,nm:"su"},nk={p:i8,ap:8,nm:"tb"},i8={p:i8,ap:8,nm:"v"},nx={p:i6,ap:8,nm:"abs_shift"},nC={p:i6,ap:8,nm:"error_code"},nO={p:i6,ap:8,nm:"error_msg"},nD={p:i6,ap:8,nm:"inner_error"},nL={p:i6,ap:8,nm:"heartbeat_count"},nN={p:i6,ap:8,nm:"milestone_percent"},nU={p:i6,ap:8,nm:"qualified_view_sec"},nF={p:i6,ap:8,nm:"seek_start_point_ms"},nB={p:i6,ap:8,nm:"seek_end_point_ms"},nj={p:i6,ap:8,nm:"startup_duration_content_ms"},nH={p:i6,ap:8,nm:"startup_duration_total_ms"},nV={p:i7,ap:C,nm:"app_session_id"},nz={p:i7,ap:C,nm:"app_session_start_ts_ms"},i6={p:i7,ap:C,nm:"app_session_end_ts_ms"},nq={p:i7,ap:W,nm:"cast_app_session_id"},nW={p:i7,ap:W,nm:"cast_content_session_id"},nG={p:i7,ap:B,nm:"client_ip"},nK={p:i7,ap:W,nm:"content_session_id"},i7={p:i7,ap:C,nm:"user_agent"},nY={p:i9,ap:W,nm:"autostart"},nX={p:i9,ap:W,nm:"casting"},nQ={p:i9,ap:W,nm:"controls"},nZ={p:i9,ap:W,nm:"default_muted"},nJ={p:i9,ap:W,nm:"default_playback_rate"},n$={p:i9,ap:W,nm:"fullscreen"},n0={p:i9,ap:W,nm:"loop"},n1={p:i9,ap:W,nm:"muted"},n2={p:i9,ap:W,nm:"player_name"},n3={p:i9,ap:W,nm:"player_version"},n5={p:i9,ap:W,nm:"preload"},n4={p:i9,ap:W,nm:"ready_state"},n6={p:i9,ap:W,nm:"streaming_protocol"},n8={p:i9,ap:W,nm:"streaming_type"},n7={p:i9,ap:W,nm:"subtitles"},i9={p:ne,ap:C,nm:"advertising_id"},n9={p:ne,ap:C,nm:"browser_name"},re={p:ne,ap:C,nm:"browser_height"},rt={p:ne,ap:C,nm:"browser_version"},ri={p:ne,ap:C,nm:"browser_width"},rn={p:ne,ap:C,nm:"cookies_enabled"},rr={p:ne,ap:B,nm:"device_id"},ro={p:ne,ap:C,nm:"device_mfg"},ra={p:ne,ap:C,nm:"device_name"},rs={p:ne,ap:C,nm:"device_type"},rl={p:ne,ap:C,nm:"orientation"},rc={p:ne,ap:C,nm:"os_name"},ne={p:ne,ap:C,nm:"os_version"},ru={p:nt,ap:W,nm:"asset_id"},rd={p:nt,ap:W,nm:"description"},rp={p:nt,ap:W,nm:"duration_sec"},rh={p:nt,ap:W,nm:"frame_rate"},rf={p:nt,ap:W,nm:"media_tags"},rm={p:nt,ap:3,nm:"media_type"},rg={p:nt,ap:W,nm:"player_height"},rv={p:nt,ap:W,nm:"player_width"},ry={p:nt,ap:W,nm:"source"},rb={p:nt,ap:W,nm:"title"},rS={p:ni,ap:B,nm:"city"},r_={p:ni,ap:B,nm:"country"},rE={p:ni,ap:B,nm:"country_code"},rT={p:ni,ap:B,nm:"latitude"},rw={p:ni,ap:B,nm:"longitude"},rP={p:ni,ap:B,nm:"postal_code"},rA={p:ni,ap:B,nm:"region"},rI={p:ni,ap:B,nm:"region_code"},rM={p:ni,ap:B,nm:"continent"},rR={p:ni,ap:B,nm:"continent_code"},nt={p:ni,ap:B,nm:"district"},rk={p:ni,ap:B,nm:"timezone_name"},rx={p:ni,ap:B,nm:"timezone_offset"},rC={p:nn,ap:B,nm:"asn"},ni={p:nn,ap:B,nm:"asn_org"},rO={p:nn,ap:C,nm:"connection_type"},rD={p:nn,ap:B,nm:"isp"},rL={p:nn,ap:B,nm:"mobile_connection"},rN={p:na,ap:8,nm:"context_id"},rU={p:na,ap:8,nm:"context_name"},nn={p:na,ap:C,nm:"dz_dictionary_version"},rF={p:na,ap:8,nm:"msg_send_client_ts_ms"},rB={p:na,ap:8,nm:"player_context_id"},rj={p:na,ap:B,nm:"server_ts_offset_ms"},rH={p:nr,ap:C,nm:"collector_name"},rV={p:nr,ap:C,nm:"dz_sdk_version"},rz={p:nr,ap:C,nm:"page_title"},rq={p:nr,ap:C,nm:"page_url"},rW={p:nr,ap:C,nm:"referrer_url"},rG={p:nr,ap:C,nm:"site_domain"},rK={p:no,ap:B,nm:"ad_blocker"},rY={p:no,ap:W,nm:"ad_break_id"},rX={p:no,ap:2,nm:"ad_click_url"},rQ={p:no,ap:2,nm:"ad_creative_id"},rZ={p:no,ap:2,nm:"ad_duration_sec"},rJ={p:no,ap:2,nm:"ad_id"},nr={p:no,ap:2,nm:"ad_partner"},r$={p:no,ap:W,nm:"ad_position"},r0={p:no,ap:2,nm:"ad_session_id"},r1={p:no,ap:2,nm:"ad_system"},r2={p:no,ap:2,nm:"ad_time_offset_sec"},B={p:no,ap:C,nm:"ad_tracking_opt_out"},r3={p:no,ap:2,nm:"advertiser_name"},r5={p:no,ap:2,nm:"deal_id"},r4={p:no,ap:2,nm:"skip_time_offset_sec"},r6={p:no,ap:2,nm:"wrapper_creative_ids"},r8={p:no,ap:2,nm:"wrapper_id"},r7={p:no,ap:2,nm:"wrapper_systems"},C={p:["cdn"],ap:W,nm:"cdn"},r9=(r5.df="",e0([r6,r8,r7],"df",[]),tc(function(c){return!!c}
13,[rK,B,nY,nm,nX,nQ,rn,nZ,n$,n0,rL,n1,nR,n7,iw]),tc(function(c){tr(c)||(c=[c]);for(var u=0;u<c.length;u++)c[u]=ta(c[u])||"";return c},[r6,r8,r7]),tc(ta,[nx,rY,rX,rQ,rJ,nr,r$,r0,r1,r3,i9,nV,rC,ni,ru,n9,rt,nq,nW,C,ng,rS,nG,nc,nu,nK,rM,rR,r_,rE,nd,r5,rd,rr,ro,ra,rs,nt,rV,nC,nO,np,nD,rD,rm,nS,n_,rl,rc,ne,nE,rz,rq,rB,n2,n3,rP,n5,rW,rA,rI,nw,nA,nI,rG,ry,nM,n6,n8,rk,rb,nf,i7,t7,t9,iT,ik]),tc(tl(0,100),[t4,iP,i3]),tc(tl(0,1e9,!0),[t1]),tc(tl(),[rZ,r2,i6,nz,i5,i4,re,ri,nv,nJ,ny,rp,rh,nL,rT,rw,nN,nb,rg,rv,nT,nU,n4,nP,nB,nF,rj,r4,nj,nH,nk,nh,rx,i8,t3,t5,t2,t6,t8,ii,ir,it,io,ia,is,il,ic,iu,id,ip,im,ig,ih,iy,ib,iS,iv,i_,iE,iA,iM,iR,ix,iC,iO,iD,iL,iU,iF,iN,iB,ij,iV,iz,iH,iq,iW,iG,iK,iY,iX,iQ,iJ,i$,iZ,i0,i1,i2]),tc(0==(no=5)?function(c){return P.round(c)}:(td=P.pow(10,no),function(c){return P.round(c*td)/td}),[rZ,r2,i6,nz,i5,i4,re,ri,nv,nJ,ny,rp,rh,nL,rT,rw,nN,nb,rg,rv,nT,nU,n4,nP,nB,nF,rj,r4,nj,nH,nk,nh,rx,i8,t1,t3,t5,t2,t4,t6,t8,ii,ir,it,io,ia,is,il,ic,iu,id,ip,im,ig,ih,iy,ib,iS,iv,i_,iE,iP,iA,iM,iR,ix,iC,iO,iD,iL,iU,iF,iN,iB,ij,iV,iz,iH,iq,iW,iG,iK,iY,iX,iQ,iJ,i$,iZ,i0,i1,i2,i3]),[tp,th,tf,tm,tg,tv,ty,tb,tS,t_,tE,tT,tw,tP,tA,tI,tM,tR,tk,tx,tC,tO,tD,tL,tN,tU,tF,tB,tj,tH,tV,tz,tq,tW,tG,tK,tY,tX,tQ,tZ,tJ,t$]),oe=eJ(r9);function ot(c,u){var d,p=e$(r9),h={},f={};c?0<c.length?(c=ti(d=m.tt&&ei.beta_ev)?c.concat(d.split(".").map(function(c){return{name:c,media_types:["na"]}})):c).forEach(function(c){var u,d=c&&c.name;d&&p[d]?(c=c.media_types)&&0<c.length&&(h[d]=!0,"na"!=c[0])&&(u={},c.forEach(function(c){u[c]=!0}),f[d]=u):eM("Unknown event: "+d)}):u&&eM("This collector is not active. Configure it to a data pipe to start sending events."):h=f=null,r9.forEach(function(c){c.on=!(h&&!h[c.nm]),c.mm=f&&f[c.nm]})}ot(),e0([is,ic,iu,id,il,ip],"st",y);var oi=[t1,t2,t3,t5,t4,t6,t8,t7,t9,it,ii,ir,io,ia,is,il,ic,iu,id,ip,ih,im,ig,iv,iy,ib,iS,i_,iE,iT,iw,iP,iA,iI,iM,iR,ik,ix,iC,iO,iD,iL,iN,iU,iF,iB,ij,iH,iV,iz,iq,iW,iG,iK,iY,iX,iQ,iZ,iJ,i$,i0,i1,i2,i3],on=[],or=(oi.forEach(function(c){null!=c.ts&&on.push(c)}),[]),oo=[];function oa(c){var u,d=e$(oi),p={};c?(c=ti(u=m.tt&&ei.beta_fd)?c.concat(u.split(".")):c).forEach(function(c){d[c]?p[c]=!0:eM("Unknown flux data: "+c)}):p=null,or=[],oo=[],oi.forEach(function(c){c.on=!(p&&!p[c.nm]),c.on&&(8==c.ap?oo:or).push(c)})}oa(),e0([nV,nz],"st",y);var os,ol,oc,ou,od=[n2,n3,i9,rb,ru,n8,nX],op={},oh=(od.forEach(function(c){op[c.nm.toUpperCase()]=Z+c.nm}),[nc,nu,nd,np,nh,nf,i5,i4,nm,ng,nv,ny,nb,nS,n_,nE,nT,nw,nP,nA,nI,nM,nR,nk,i8,nx,nC,nO,nD,nL,nN,nU,nF,nB,nj,nH,nV,nz,i6,nq,nW,nG,nK,i7,nY,nX,nQ,nZ,nJ,n$,n0,n1,n2,n3,n5,n4,n6,n8,n7,i9,n9,re,rt,ri,rn,rr,ro,ra,rs,rl,rc,ne,ru,rd,rp,rh,rf,rm,rg,rv,ry,rb,rS,r_,rE,rT,rw,rP,rA,rI,rM,rR,nt,rk,rx,rC,ni,rO,rD,rL,rN,rU,nn,rF,rB,rj,rH,rV,rz,rq,rW,rG,rK,rY,rX,rQ,rZ,rJ,nr,r$,r0,r1,r2,B,r3,r5,r4,r6,r8,r7,C]),of=eJ(oh),om=oh.concat(oi),og=[np],ov=[],oy=[];function ob(c){var u,d=e$(oh),p={};os=ol=oc=ou=!1,c?((c=ti(u=m.tt&&ei.beta_md)?c.concat(u.split(".")):c).forEach(function(c){d[c]?p[c]=!0:"custom_metadata_all"==c?os=!0:"custom_events_all"==c?ol=!0:"vendor_metadata_all"==c?oc=!0:"vendor_events_all"==c?ou=!0:eM("Unknown metadata: "+c)}),og.forEach(function(c){p[c.nm]=!0})):(p=null,os=ol=oc=ou=!0),ov=[],oy=[],oh.forEach(function(c){c.on=!(p&&!p[c.nm]),c.on&&(8==c.ap?oy:ov).push(c)})}ob();var oS=/^live$/i,o_="DASH",oE={"application/x-mpegURL":"HLS","application/dash+xml":o_,"application/vnd.ms-sstr+xm":"Smooth","video/x-flv":"Flash","video/mp4":"MP4","video/MP2T":"MPEG2-TS","video/3gpp":"3GPP","video/quicktime":"Quicktime","video/x-msvideo":"AVI","video/x-ms-wmv":"Windows Media"},W=[[/Opera\/([\d.]+)/,"Opera"],[/OPR\/([\d.]+)/,"Opera"],[/Edge\/([\d.]+)/,"Microsoft Edge"],[/Edg\/([\d.]+)/,"Microsoft Edge"],[/MSIE ([\d.]+)/,"Microsoft Internet Explorer"],[/Trident\/.*rv:([\d.]+)/,"Microsoft Internet Explorer"],[/Seamonkey\/([\d.]+)/,"Seamonkey"],[/Firefox\/([\d.]+)/,"Firefox"],[/Chromium\/([\d.]+)/,"Chromium"],[/Chrome\/([\d.]+)/,"Chrome"],[/Safari\/([\d.]+)/,"Safari"]],no=[[/Windows 10\.0|Windows NT 10\.0/,"Windows 10"],[/Windows 8\.1|Windows NT 6\.3/,"Windows 8.1"],[/Windows 8|Windows NT 6\.2/,"Windows 8"],[/Windows 7|Windows NT 6\.1/,"Windows 7"],[/Windows NT 6\.0/,"Windows Vista"],[/Windows NT 5\.2/,"Windows Server 2003"],[/Windows NT 5\.1|Windows XP/,"Windows XP"],[/Windows NT 5\.0|Windows 2000/,"Windows 2000"],[/Win 9x 4\.90|Windows ME/,"Windows ME"],[/Windows 98|Win98/,"Windows 98"],[/Windows 95|Win95|Windows_95/,"Windows 95"],[/Windows NT 4\.0|WinNT4\.0|WinNT|Windows NT/,"Windows NT 4.0"],[/Windows CE/,"Windows CE"],[/Win16/,"Windows 3.11"],[/Tizen/,"Tizen"],[/Android/,"Android"],[/OpenBSD/,"Open BSD"],[/SunOS/,"Sun OS"],[/Linux|X11/,"Linux"],[/iPhone|iPad|iPod/,"iOS"],[/Mac OS X/,"Mac OS X"],[/MacPPC|MacIntel|Mac_PowerPC|Macintosh/,"Mac OS"],[/QNX/,"QNX"],[/UNIX/,"UNIX"],[/BeOS/,"BeOS"],[/OS\/2/,"OS/2"],[/nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver/,"Search Bot"]],tv=[[/SMART-TV|SmartTV|HbbTV|Tizen/i,"tv"],[/mobile/i,"mobile"],[/CrKey/i,"ott device"],[/iPad|Android|Touch/i,"tablet"],[/.*/,"pc"]],oT=["CMCD-Request","CMCD-Object","CMCD-Status","CMCD-Session"];function ow(c,u,d){u&&d.push(c)}function oP(c,u,d){d.push(c+"="+u)}function oA(c,u,d){d.push(c+(ei.cmcd_ntq?"="+u:'="'+u+'"'))}function oI(c,u,d){d.push(c+'="'+u.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"')}function oM(c){return"false"!==c}function oR(c){return+c}function ok(c){return c.replace(/"/g,"")}function ox(c){return c.replace(/^"/,"").replace(/"$/,"").replace(/\\"/g,'"').replace(/\\\\/g,"\\")}var oC,oO,oD={bl:[0,[oP,oR],i5],br:[1,[oP,oR],i4],bs:[2,[ow,oM],nm],cid:[3,[oI,ox],ng],d:[1,[oP,oR],nv],dl:[
130,[oP,oR],ny],mtp:[0,[oP,oR],nb],nor:[0,[oI,ox],nS],nrr:[0,[oI,ox],n_],ot:[1,[oA,ok],nE],pr:[3,[oP,oR],nT],rtp:[2,[oP,oR],nP],sf:[3,[oA,ok],nA],sid:[3,[oI,ox],nI],st:[3,[oA,ok],nM],su:[0,[ow,oM],nR],tb:[1,[oP,oR],nk],v:[3,[oP,oR],i8]},oL={bs:!1,su:!1,v:1,pr:1},oN="org.svalabs-";function oU(c){for(var u,d,p=[[],[],[],[]],h=b.keys(c),f=0;f<h.length;f++)(d=oD[u=h[f]])&&d[3]&&d[1][0](u,c[u],p[d[0]]);return p}function oF(c){var u,d=b.keys(oD);for(oC=!1,oO="header"===(Q.options.cmcdMode||ei.cmcd_mode),u=0;u<d.length;u++)oD[d[u]][3]=!1;if(c&&tr(c)&&0<c.length)if(oC=!0,"na"==c[0])for(u=0;u<d.length;u++)oD[d[u]][3]=!0;else c.forEach(function(c){var u=oD[c];u?u[3]=!0:eM("Unknown CMCD key: "+c)})}function oB(c,u,d){for(var p,h,f=b.keys(c),m=0;m<f.length;m++)delete c[f[m]];for(m=0;m<u.length;m++)(p=u[m]).ap&d&&null!=(h=null==(h=(h=p.st||p.se)&&te(h,p.nm))?p.df:h)&&(c[p.nm]=h)}function oj(c,u,d,p){for(var h,f,m,g,v=0;v<p.length;v++)m=(f=(h=p[v])[0]).nm,f.ap&d?(g=u[m])&&g(h)||(c[m]=h[1],(g=f.st||f.on&&f.se)&&e9(g,m,h[1])):eM("Setting inapplicable data",f)}function oH(c,u,d,p,h){var f,m=[];return d&&m.push([d,f=u(d)+p]),h&&m.push([h,u(h)+p]),c(m),f}function oV(c,u,d){if(u)for(var p,h,f=0;f<u.length;f++)if(h=c[p=u[f]])c=h;else{if(d)return null;c=c[p]={}}return c}function oz(c,u){return(c=oV(c,u.p||t0,!0))&&c[u.nm]}function oq(c,u,d,p){for(var h,f,m,g=0;g<u.length;g++)(h=u[g]).ap&d&&null!=(m=tu(c[f=h.nm],h.dv))&&(oV(p,h.p)[f]=m)}oD[oN+"rid"]=[0,[oI,ox],nw],oD[oN+"tid"]=[0,[oI,ox]],oD[oN+"cmi"]=[0,[oP,oR]],oD[oN+"pmi"]=[0,[oP,oR]],oF();var oW,oG,oK,oY,oX,oQ,oZ,oJ,o$,o0,o1,o2,o3,o5,o4,o6,o8,o7,o9={},ae={},at=te(y,eS)||[],ai=[],an=7,ar=[];function ao(c){return null!=c?6e4*c:12e5}function aa(c,u){if(!an&&0<at.length){for(var d,p=eN(),h=0,f=0;f<at.length;f++)at[f].p&&(d=!0,oq(o9,ov,32,at[f].m)),h=P.max(h,p-at[f].t);o2&&function c(u,d,p,h){var f,g=u.map(function(c){return c.m}),v=(g.forEach(function(c,u){var d,p=oV(c,na);rF.on&&(oV(c,rF.p)[rF.nm]=eN()),o0&&(p[m.ss+"_sampling"]=o0),null!=o1&&(p[m.ss+"_forced_sampling_in"]=o1),u||(f=p[ew],eL&&(b.keys(eL).forEach(eW),eL=null),eH.length&&(f=f?f.concat(eH):eH,eH=[],f.length>m.mc&&(f.sort(function(c,u){return c.batch()>u.batch()?1:-1}),d=f[f.length-m.mc-1].batch(),f=f.filter(function(c){return c.batch()>d})),p[ew]=f))}),e2(m.mb)),g=e6(g);h&&D.sendBeacon&&D.sendBeacon(v,g)||e4("POST",v,{"Content-Type":"application/json"},g,function(h){al(h,"Message post",c,u,d,m.rd,p,null,function(c,d){u.forEach(function(c){var u,p,h;u=c,m.os&&(h=u.t,h=P.trunc(h/6e4),(h=(eL=eL||{})[h]||(eL[h]=[0,0,0]))[2]++,p=(h=h[3]||(h[3]={}))[d],u=oz(u.m,np),p?p.push(u):h[d]=[u])}),f&&(eH=f.concat(eH))})})}(at,0,eq("log",p,h,d),c),u=!0}u&&(at=[],tt(y,eS)),oZ=null}function as(c){(an&=~c)||null!=oZ||aa()}function al(c,u,d,p,h,f,m,g,v){if(4==c.readyState){var y=eN(),b=c.status;if(u+=" status: "+b+", ",(0==b||429==b||500<=b&&b<=599)&&null!=(f=f[h++]))return H(function(){m.retry(eN()),d(p,h,m)},1e3*f),void eM(u+"retry #"+h+" after "+f+"s");m.log(y,b),!(b<200||299<b||g&&!g(c,y))||v&&v(u,b)||eM(u+"failed")}}function ac(){var c;!oJ||1&an||(m.sw&&m.sm?(m.sp,(c=of[m.sd])&&(oJ.sampling_definition_params={namespace:m.ss,key_name:c.nm,key_value:ah(c)}),(c=of[m.sc])&&(oJ.sampling_criteria_params={sampling:{key_name:c.nm,key_value:ah(c)}}),oJ.sampling_override=ei.sampling_override||"NONE",oJ.sampling_request_id=e5(),function c(u,d,p){o$=e4("POST",e2(m.sm),{"Content-Type":"application/json","cache-control":"no-cache"},u,function(h){4==h.readyState&&(o$=null,al(h,"Sampling API",c,u,d,m.rd,p,function(c){if(o0=(c=e8(c.responseText))&&c[m.ss+"_sampling"])return o2=o0.in_sample,o1=!1,as(2),e9(y,e_,o0),!0},function(c){return o2=o1=!0,as(2),eM(c+"forced in"),!0}))})}(e6(oJ),0,eq("sample",eN()))):(o2=!0,as(2)),oJ=null)}function au(c,u){var d=""+(oX+1e7);oV(c,np.p)[np.nm]=oK+"_"+d.substr(-7,2)+"."+d.substr(-5),e9(y,ev,++oX),io.on&&(u[io.nm]=oX)}
13function ad(c,u,d,p,h,f,g){var v,S,_,E,T,g=g?4:16,w=oV(c,t0);for(oq(o9,ov,g,c),oq(o9,or,g,w),(p=p||[]).push([nf,u],[nh,d]),v=0;v<p.length;v++)S=(_=p[v])[0],_[2]||8&S.ap?S.on&&null!=(_=tu(_[1],S.dv))&&(oV(c,S.p)[S.nm]=_):eM("Invalid event data",S);os&&(g=eK(oW,h),u=c,T=(h=e6(g))?h.length:0,(E=m.ml)&&E<T?eM("Custom metadata size: "+T+" > "+E):2<T&&(g=e8(h))&&b.assign(oV(u,ns),g)),oc&&(E=eY(oG,f),T=c,E)&&b.assign(oV(T,nl),E),er&&eD("evInfo",c),!(ep<4)&&m.le&&m.le(c)||(h={p:an,m:c,t:d},1&an?ai.push(h):(au(c,w),at.push(h),e9(y,eS,at),null==oZ&&(oZ=H(aa,m.bd))))}function ap(c){oj(o9,ae,4,c)}function ah(c){return o9[c.nm]}function af(u){var d,p;if(sT&&(sT=!1,ag(tP,u)),!oK||!oY||(d=u,p=m.st,d<oQ&&eM("Activity time reversal: "+oQ+" -> "+d),0<=p&&(d<oQ||oQ+p<=d))){if(aa((ai=[],!1),!0),p=u,d=ar[0],oK=e5(),oY=oQ=p,ap([[nV,oK],[nz,oY],[is,oX=0],[ic,0],[iu,0],[id,0],[il,0],[ip,0]]),e9(y,ev,oX),e9(y,ey,oQ),tt(y,e_),o$&&o$.abort(),o$=o0=null,o2=o1=null,an|=2,oJ={},ac(),ee(d))try{d()}catch(c){eC(c,"onAppSessionStart")}}else e9(y,ey,oQ=u);ap([[it,u-oY],[ri,c.outerWidth],[re,c.outerHeight],[rz,x.title],[rq,O.href],[rW,x.referrer],[rG,O.hostname],[rn,D.cookieEnabled]])}function am(c,u,d){oH(ap,ah,c,u,d)}function ag(c,u,d,p,h){4&c.ap?(af(u),c.on&&ad({},c.nm,u,d,p,h,!0)):eM("Event inapplicable: "+c.nm+", ss",c)}function av(c,u){var d,p;c&&od.forEach(function(h){null!=(p=c[d=Z+h.nm])&&(u([[h,p]]),delete c[d])})}if(oB(o9,om,4),oK=ah(nV),oY=ah(nz),oX=te(y,ev)||0,oQ=te(y,ey)||0,o0=te(y,e_),oW=te(y,eb),oG=te(y,"__ss_vendor_md"),m.st=ao(te(y,eE)),m.od=te(y,eT),o0?(o2=o0.in_sample,o1=!1,as(2)):oJ={},W.some(function(c){if(o7=c[0].exec(L))return o3=c[1],o5=o7[1],!0})||(o7=/(\w+)\/([\d.]+)(?!.*\w+\/[\d.]+)/.exec(L))&&(o3=o7[1],o5=o7[2]),(o7=/Version\/([\d.]+)/.exec(L))&&(o5=o7[1]),no.some(function(c){if(c[0].test(L))return o4=c[1],!0})){switch(o7=null,o4){case"Mac OS X":o7=/Mac OS X (10[\d._]+)/.exec(L);break;case"Android":o7=/Android ([\d._]+)/.exec(L);break;case"iOS":o7=/OS (\d+_\d+(_\d+)?)/.exec(L);break;case"Tizen":o7=/Tizen[ \/]([\d._]+)/.exec(L);break;default:(o7=/Windows (.*)/.exec(o4))&&(o4="Windows")}o7&&(o6=o7[1].replace(/_/g,"."))}else o4=o6="-";tv.some(function(c){if(c[0].test(L))return o8=c[1],!0}),ap([[i7,L],[n9,o3],[rt,o5],[rc,o4],[ne,o6],[rs,o8],[rH,m.cn],[rV,m.sv],[nn,3]]);var ay="adapterID",ab="adapterOptions",aS="baseContext",a_="contextType",aE="contextName",aT="metadata",aw=["base","player","app"],aP={},aA=[];function aI(c){if(!c.destroyed){c.setTimer(null);try{var u=c.destroyCallback;u&&u()}catch(c){eC(c,"onDestroy")}delete aP[c.id],c.removeListeners(),c.destroyed=!0}}function aM(c,u,d,p,h,f,m){(h=h||[]).push([rN,c.id],[rU,c.name]),ad(u,d,p,h,eK(c.customMetadata,f),eY(c.vendorMetadata,m))}function aR(c,u){return!(null!=u&&!to(u)||(c.customMetadata=e8(e6(u)),0))}function ak(c){var u=eG(o9);return u._c_=eK(oW,c.customMetadata),u._v_=eY(oG,c.vendorMetadata),u}function ax(){var c,u=[],d={},p={id:e5(),type:0,destroyed:!1,destroyCallback:null,configCallback:null,customMetadata:null,vendorMetadata:null,shallBlock:function(c,u,d){if(p.destroyed)return eM(c+" after destroyed"+(u?": "+u:""),d),!0},onDestroy:function(c){p.destroyCallback=c},onConfig:function(c){p.configCallback=c},setTimer:function(u){var d;c&&(0<=(d=aA.indexOf(c))&&aA.splice(d,1),c=null),u&&(aA.push(u),c=u)},fireEvent:function(c,u,d,h,f){p.shallBlock("fireEvent",c.nm,c)||(af(u),c.on&&aM(p,{},c.nm,u,d,h,f))},fireVendorEvent:function(c,u,d){var h;p.fireEvent({ap:65535,nm:"v_"+c+"_"+u,on:ou},eN(),null,null,d?((h={})[c]=d,h):null)},addListener:function(c,d,p,h,f){if(c&&d){var m,g,v=c[h=h||"addEventListener"];if(ee(v)){g=eQ(c,p,m="listener: "+(m=d));var y=ep<5?g:function(){ex(m,arguments),g.apply(null,arguments)};try{"-"===d?v.call(c,y):v.call(c,d,y),u.push([c,d,p,y,f||"removeEventListener"])}catch(c){eC(c,"addListener: "+d)}}else eM("Invalid add-listener method: "+h,c)}},removeListeners:function(c,d,p){u=u.filter(function(u){var h=u[0],f=u[1];if(c&&c!=h||d&&d!=f||p&&p!=u[2])return!0;var m=h&&h[u[4]];if(ee(m))try{"-"===f?m.call(h,u[3]):m.call(h,f,u[3])}catch{}else eM("Invalid remove-listener method: "+u[4],h)})},stash:function(c,u,p){d[c]=[u,p]}
13,unstash:function(c){c.forEach(function(c){var u=d[c];if(u){delete d[c];try{u[0].apply(null,u[1])}catch(u){eC(u,"unstash: "+c)}}})}},h={getError:function(){return null},contextID:function(){return p.id},contextName:function(){return p.name},contextType:function(){return aw[p.type]},isDestroyed:function(){return p.destroyed},destroy:function(){aI(p)},setMetadata:function(c){return aR(p,c)},getMetadata:function(){return e8(e6(p.customMetadata))},generateEvent:function(c,u){p.fireEvent({ap:65535,nm:J+c,on:ol},eN(),null,u)},dumpDzData:function(c){var u=e8(e6(ak(p)));return null==c?u:u[c]}};return p.basePublicMethods=h,p.publicContext=eG(h),aP[p.id]=p}function aC(c,u){var d,p;return null==c?p=ax():(p=(d=to(c)&&ee(c.contextID)&&c.contextID())&&ti(d)&&aP[d])&&0===p.type&&p.publicContext===c||(eM("Invalid contextOptions."+aS,c),p=ax()),null!=u&&(p.name=u),p}function aO(c){return m.sn&&m.sn[c]||""+c}var aD,aL,aN,aU,aF=[],aB="idle",aj=(aF[2]=aF[9]="buffering",aF[3]=aF[10]="playing",aF[4]=aF[11]="paused",aF[5]=aF[12]="seeking",aF[6]="ended",aF[0]=aF[7]=aF[8]=aB,function(u,d,p){var h,f,g,v,y,S,_,T,w,A,I,M,R,C,O,D={},L={},U={},F={},B={},j={},H=[],V=[],z=[],q=[],W=[],G=[],K=[],Y=[],X=e5(),Z=aC(p[aS],p[aE]),J=sS(p[ay],1),$=p[ab];function et(){if(A){for(var c,u=b.keys(A),d=eN(),p=0;p<u.length;p++)tc((c=A[u[p]]).ev,d,c.dl);A=null}}function ei(c,u,d){(A=A||{})[d||c.nm]={ev:c,dl:u}}function en(c){oj(D,L,1,c)}function eo(c){oj(U,F,2,c)}function ea(c,u){return(u?U:D)[c.nm]}function es(c){return U[c.nm]}function el(){var c=ea(n2),u=ea(n3);oB(D,om,1),en([[rm,"content"],[n2,c],[n3,u]])}function ec(){oB(U,om,2),eo([[rm,"ad"]])}function ed(c,u){L[c.nm]=u}function ep(c,u,d,p){for(var h=[],f=0;f<u.length;f++)h[u[f]]=!0;K[c]={tr:h,en:d,ex:p}}$=to($)?eG($):{},J&&(R=J[2],C=J[3],b.assign($,J[4]||{}),I=$[sv],M=$[sy],($[sg]||[]).forEach(function(c){B[c[0].nm]=c[1]})),u&&b.keys(aP).some(function(c){if(1==(c=aP[c]).type&&c.player===u)return c.publicContext.destroy(),!0});var eh,ef,em,eg,ev,ey,eb,eS,e_,eE,eT,ew,eP,eA,ex,eL,eU,eF,eB,ej,eH,eV,ez,eq,eW,eK,eY,eX,eQ,eZ,eJ,e$,e0=0,e2=aB,e3=1,e4=eN(),e7=eO(eM,"Abnormal duration increment: ",1,1e3,3e5);function e9(){return 2==e3}function te(){return!!eA&&"ad"===eA.type}function tt(c){e_=c+m.hi,ek("Heartbeats started")}function ti(){e_&&ek("Heartbeats stopped"),e_=0}function ta(c,u,d){return oH(en,ea,c,u,d)}function ts(c){var u=c-e4;u<0||u>m.ed?e7.log(u):0<u&&(4==e0?ta(ig,u,ih):11==e0?ta(im,u,ih):2==e0?(ef&&ta(iF,u,iN),ta(t5,u,t2)):9==e0&&(ef&&ta(iU,u,iN),ta(t3,u,t2))),e4=c}function tl(c,u){null!=c&&(Y[c]=u)}function tc(c,u,d,p,h,f){if(!Z.shallBlock("fireEvent",c.nm,c))if(f=f||(te()?2:e3),(c.ap&f)!=0){if(af(u),(d=d||[]).push([rB,Z.id]),e$||(e$=!0,(v=z.some(function(p){try{return p(u,d,c,f)}catch(c){eC(c,"extEventHandler")}}))||(v=(y=j&&j[c.nm])&&y(u,d,c,f)),e$=!1),!v){ts(u);for(var m,g,v,y,b=[[iT,e2]],S=0;S<on.length;S++)g=Y[(m=on[S]).ts],b.push([m,g?u-g:0]);en(b),null==ea(t1)&&N&&(y=N.downlink)&&en([[t1,1e3*y]]),tl(c.rt,u),tl(2==f?c.rta:c.rtc,u),c.on&&(!c.mm||c.mm[ea(rm,2==f)])&&(y=oV(v={},t0),2==f?(oq(U,ov,2,v),oq(U,or,2,y),oq(D,ov,16,v),oq(D,or,16,y)):(oq(D,ov,1,v),oq(D,or,1,y),oq(U,ov,16,v),oq(U,or,16,y)),aM(Z,v,c.nm,u,d,p,h))}}else eM("Event inapplicable: "+c.nm+", "+f,c)}function td(c){var u=c[1];u&&u!=ea(c[0])&&ei(tT)}function tf(c,u){var d=3==u?eH:eV;if(c!=d){var p,h,f,g,v,y,b,S,_=eN();if(e_||tt(_),eE=!0,3==u){if(v=I||m.mp,eH=c,f=_-ez,ez=_,p=ea(rp),ew){var E,T=eA;if(null==eL&&0<p&&(eL=((E=ew.locate(p)).type?E.start:p)-E._e),p=eL,ex&&d>=ex.start&&d<=ex.end||(ex=ew.locate(d)),(eA=eA&&c>=eA.start&&c<=eA.end?eA:ew.locate(c))&&(y=eA.type,b=eA.start,S=eA._d),eA!=T&&(E=eJ<=c&&c<eJ+v,"ad"===y?eZ!==b&&S&&((null==eZ?tV:(E&&tc(tF,_),ir))(_),eZ=b,eJ=eA.end,it(),eo(S.concat([[rZ,eJ-eZ]])),ii(_,eA._a),tc(tm,_,null,null,null,2),eV=0,eq=_):null!=eZ&&(E&&tc(tF,_,null,null,null,2),ir(),t4(_))),"ad"===y)return void(S&&(tf(T=c-b,10),U[iA.nm]=T))}eS||(h=eU=!eU&&m.cm?m.cm.slice():eU)}else v=M||m.mp,eV=c,f=_-eq,eq=_,p=es(rZ),h=eF=!eF&&m.am?m.am.slice():eF;if(null!=d&&null!=c&&0<=d&&d<c&&c<=d+v){if(0<p&&h)for(var w,P,A=0,R=3==u&&ex&&eA?(P=((ex.type?ex.start:d)-ex._e)/p,((y?b
13:c)-eA._e)/p):(P=d/p,c/p);A<h.length&&!(R<(w=h[A]/100));)P<w?(h.splice(A,1),ei(tO,[[nN,100*w]],tO.nm+w)):A++;if(3==u){if(eY=c,f<0||f>m.ed)e7.log(f);else if(0<f){if(y)ta("promo"===y?i_:null,f,iv);else if(p=ta(iS,f,iv)/1e3,m.cq)for(eB=eB||m.cq.slice();null!=(g=eB[0])&&g<=p;)eB.shift(),ei(tH,[[nU,g]],tH.nm+g)}}else if(eX=c,f<0||f>m.ed)e7.log(f);else if(0<f&&(ta(iy,f,iv),p=oH(eo,es,ib,f)/1e3,m.aq))for(ej=ej||m.aq.slice();null!=(g=ej[0])&&g<=p;)ej.shift(),ei(tH,[[nU,g]],tH.nm+g)}}}function tv(c,u){null==eW&&null!=c&&null!=eY&&c!=eY&&(eW=eY,tc(tG,u||eN()))}function tP(c,u){null==eK&&null!=c&&null!=eX&&c!=eX&&(eK=eX,tc(tG,u||eN()))}function tN(c){eh&&tc(tQ,c),eh=em=!1,e3=1,eW=eY=null,ti()}function tV(c){var u,d,p="pre";ea(iS)>1e3*m.ep&&(u=ea(iA),d=ea(rp),p=null!=u&&null!=d&&u+m.ep>d?"post":"mid"),eg=ey=eb=!1,ec(),en([[rY,e5()],[r$,p],[ia,0]]),tc(tp,c)}function t4(c){eQ+=c-Y[14],tc(th,c,null,null,null,2),en([[rY,null],[r$,null],[ia,null]])}function it(){eb||(eb=!0,eo([[r0,w||e5()],[ib,0]]),w=null)}function ii(c,u){var d=ar[3];if(eg=!0,eF=ej=null,am(is,1),ta(ia,1),ee(d))try{d(T,u)}catch(c){eC(c,"onAdStart")}tc(tU,c)}function ir(){if(eg){var c=ar[4];if(ee(c))try{c(T)}catch(c){eC(c,"onAdEnd")}}eg=ey=eb=!1,eK=eX=eZ=eJ=null,ec()}function io(c,u,d,p){var h,f,m,g;c!=e0&&(m=K[e0],h=aO(e0)+" => "+aO(c),f=aF[c]||e2,Z.shallBlock("setState",h)||(m.tr[c]?(ek("state: "+h+" ("+f+")"),(m=m.ex)&&m(u,c,d,p),ts(u),g=e0,e2=f,(m=K[e0=c].en)&&m(u,g,d,p),eE=!0):eM("Invalid transition: "+h)))}function iE(c){return c!=e0&&!!K[e0].tr[c]}function iI(){return 0==e0||7==e0||8==e0}function iM(c,u,d){return function(p){var h,f;f=p[0],p=p[1]=tu(p[1],f.dv),f=ea(f,d),null!=d&&d!=e9()||null==f||null==p||(u?!p!=!f&&ei(p?c:u):p!=f&&ei(c,h=c==tz?f<p?[[nx,"up"]]:p<f?[[nx,"down"]]:null:h))}}function ik(c){c[1]=tu(c[1],c[0].dv)}ep(0,[1,8]),ep(1,[2,7,8,16],function(c){var u=ar[1];if(tN(c),ev=!1,eh=!0,eS=oS.test(ea(n8)),eQ=0,en([[nK,X],[t8,c]]),X=e5(),am(ip,1),O&&O(),ee(u))try{u(T)}catch(c){eC(c,"onContentSessionStart")}ew=eP,eP=eA=ex=eL=null,eZ=eJ=null,eT=0,tc(tC,c)}),ep(2,[3,4,5,7,8,16],function(c,u){(ef=3==u)&&(ta(iL,1,iO),tc(tY,c)),tc(tb,c)},function(c){tc(tS,c),ef&&tc(tX,c),ef=!1,em||tc(tk,c)}),ep(3,[2,4,5,6,7,8,16],function(c){var u;em||(u=c-Y[0],em=!0,eU=eB=null,am(il,1),tc(tU,c,[[nj,u-eQ],[nH,u]])),eH=eY=ea(iA),ez=c,null!=eW&&(tc(tK,c,[[nF,1e3*eW],[nB,null!=eH?1e3*eH:null]]),eW=null),tc(tj,c),ev&&(ev=!1,tc(tW,c)),e_||tt(c)},function(){eH=null}),ep(4,[2,3,5,6,7,8,16],function(c){ev||(ev=!0,tc(tL,c))}),ep(5,[2,3,4,6,7,8,16],function(c){tv(ea(iA),c)}),ep(6,[2,3,4,5,7,8,16],function(c){tc(tF,c)}),ep(7,[],function(c){tN(c)}),ep(8,[],function(c,u,d){tc(tA,c,d),tN(c)}),ep(9,[10,11,12,14,15,7],function(c,u){it(),(ef=10==u)&&(ta(iD,1,iO),tc(tY,c)),tc(tb,c)},function(c){tc(tS,c),ef&&tc(tX,c),ef=!1}),ep(10,[9,11,12,13,14,15,7],function(c,u,d,p){it(),eg||ii(c,p),eV=eX=es(iA),eq=c,null!=eK&&(tc(tK,c,[[nF,1e3*eK],[nB,null!=eV?1e3*eV:null]]),eK=null),tc(tj,c),ey&&(ey=!1,tc(tW,c)),e_||tt(c)},function(){eV=null}),ep(11,[9,10,12,14,15,7],function(c){ey||(ey=!0,tc(tL,c))}),ep(12,[9,10,11,13,14,15,7],function(c){tP(es(iA),c)}),ep(13,[9,10,17,7],function(c){tc(tF,c),ir()}),ep(14,[9,10,17,7],function(c){tc(tg,c),ir()}),ep(15,[9,10,17,7],function(c,u,d){tc(tA,c,d),ir()}),ep(16,[9,10,15,17,7],function(c){e3=2,tV(c)}),ep(17,[2,3,4,5,6,7],function(c){t4(c),e3=1});var iC,iB=ix,ij=ix;function iH(c){var u=[],d=0,p=0;return u.locate=function(c){return u.find(function(u){return c>=u.start&&c<=u.end})},c.forEach(function(c){var h=c.start,f=c.end;tn(h)&&tn(f)&&(h=h<d?d:h)<f?(d<h&&u.push({start:d,end:h,_e:p}),u.push(b.assign({},c,{start:h,_e:p})),c.type&&(p+=f-h),d=f):eM("Skipped time span",c)}),u.push({start:d,end:E.MAX_VALUE,_e:p}),u}function iV(c,u){(c=c&&c({type:eu,ack:u,appSID:ah(nV),ctSID:ea(nK)}))&&c.catch(function(c){eR("Cast transfer message rejected",c)})}function iz(c){var u,d=Z.publicContext,h=null;Z.player=c,b.assign(d,Z.basePublicMethods,{getError:function(){return h},getPlayer:function(){return c},adapterID:function(){return J?J[0]:null},contentSessionID:function(){return ea(nK)},nextContentSessionID:function(){return X},playerState:function(){return e2}
13,destroy:function(){if(!Z.destroyed){iE(7)&&io(7,eN());for(var c=0;c<V.length;c++)try{V[c]()}catch(c){eC(c,"extOnDestroy")}aI(Z)}},startContentSession:function(){return!!iI()&&(Z.reset(),Z.setState(1),Z.setState(2),!0)},setMetadata:function(c){return!!aR(Z,c)&&(av(Z.customMetadata,Z.setData),!0)},annotateContentSession:function(c){return null==c?(eP=null,!0):!!tr(c)&&(eP=iH(c.slice().sort(function(c,u){return c.start>u.start?1:-1})),!0)},dumpDzData:function(c){var u=b.assign(ak(Z),D,U),d=rm.nm;return u[d]=(e9()||te()?U:D)[d],u=e8(e6(u)),null==c?u:u[c]}}),aV.forEach(function(c){try{c(d,Z,H,V,z,q,W,G)}catch(c){eC(c,"extInit")}});try{h=J?R?R(c,Z,$):null:"Missing adapter"}catch(c){h=eC(c,J[0]+" initContext")}return h?(eI(h),d.destroy()):(null!=(u=p[aT])&&d.setMetadata(u),tc(tw,u=eN()),tc(tB,u),Z.setTimer(function(){for(var c=0;c<H.length;c++)try{H[c]()}catch(c){eC(c,"extOnTimer")}if(iC)try{iC()}catch(c){eC(c,"onTimer")}var u=eN();ts(u),e_&&e_<=u&&(eE?(tc(tR,u,[[nL,++eT]]),e_=u+m.hi,eE=!1):ti())})),d}return 1&(B[iB.nm]||0)&&(iB=iR),2&(B[ij.nm]||0)&&(ij=iR),ed(rp,ik),F[rZ.nm]=ik,ed(n6,function(c){var u=c[1];c[1]=u&&oE[u]||u}),ed(n8,function(c){eS=oS.test(c[1])}),ed(iA,function(c){for(var u=0;u<q.length;u++)try{q[u](c)}catch(c){eC(c,"extPlayheadHandler")}5==e0||2==e0?tv(c[1]):3==e0&&tf(c[1],3)}),h=function(c){12==e0?tP(c[1]):10==e0&&tf(c[1],10)},F[iA.nm]=h,ed(iB,iM(tz,null,!1)),f=ij,g=iM(tz,null,!0),F[f.nm]=g,ed(n1,iM(tD,tJ)),ed(n$,iM(tM,tI)),ed(nX,iM(t_,tE)),ed(rv,iM(tq)),ed(rg,iM(tq)),ed(i3,iM(t$)),ed(t7,iM(ty,null,!1)),v=iM(ty,null,!0),F[t7.nm]=v,ed(t9,iM(tZ)),ed(n7,iM(tZ)),ed(nq,td),ed(nW,td),ed(iP,function(u){var d,p,h,f,m=u[1];m=m&&ee(m.getBoundingClientRect)?"visible"==x.visibilityState?(d=(f=m.getBoundingClientRect()).left,p=f.right,h=f.top,f=f.bottom,P.min(100,P.max(0,P.round(100*(P.min(p,c.innerWidth)-P.max(d,0))*(P.min(f,c.innerHeight)-P.max(h,0))/((p-d)*(f-h)))))):0:tu(m,iP.dv),null!=(u[1]=m)&&en([[iw,50<=m]])}),ed(t6,function(c){var u=c[1];if(u&&ee(u.end)){var d,p,h=ea(iA);if(null!=h){for(d=0;d<u.length;d++)if(p=u.end(d),h>=u.start(d)&&h<=p)return void(c[1]=1e3*(p-h))}c[1]=0}}),y=function(c,u,d,p){2==p&&(w=e5(),u.push([r0,w,!0]))},j[tk.nm]=y,S=function(c,u){w&&u.push([r0,w,!0])},j[tm.nm]=S,_=function(c,u,d,p){am(1==p?id:iu,1,ic)},j[tA.nm]=_,el(),ec(),b.assign(Z,{type:1,fireEvent:tc,fire:function(c,u,d){tc(c,eN(),u,null,null,d)},setState:function(c,u,d){io(c,eN(),u,d)},canSetState:iE,reset:function(){iE(7)&&io(7,eN()),el(),ec(),Y=[],e0=0,e2=aB},setData:function(c){en(c),et()},setAdData:function(c){eo(c),et()},getData:ea,getAdData:es,getState:function(){return e0},isIdle:iI,isAdIdle:function(){return 13==e0||14==e0||15==e0},isInAds:e9,isInSsaiAds:te,onTimer:function(c){iC=c},onCtSessionStart:function(c){O=c},matchCtSource:function(c){return ea(ry)==c},reqCtSID:function(){return iI()?X:ea(nK)},reqTracer:function(c,u){c=e1(c,function(c){c.delete("CMCD")});var d,p=Z.reqCtSID(),h=e5(),f=((u=b.assign({},u||{},{sid:p}))[oN+"rid"]=h,1==u.v&&delete u.v,1==u.pr&&delete u.pr,null==u.cid&&null!=(d=ea(ru))&&(u.cid=d),{url:c,sid:p,rid:h,cmcd:u,start:eN()});return{reqID:h,urlBase:c,url:function(){var d=oU(u);return e1(c,function(c){c.append("CMCD",d[0].concat(d[1],d[2],d[3]).sort().join())})},headers:function(){for(var c={},d=oU(u),p=0;p<4;p++)d[p].length&&(c[oT[p]]=d[p].sort().join());return c},enabledData:function(){for(var c,d,p=b.keys(u),h={},f=0;f<p.length;f++)(d=oD[c=p[f]])&&d[3]&&(h[c]=u[c]);return h},status:function(c){f.status=c},start:function(){f.start=eN()},resp:function(c){f.resp=null!=c?f.start+c:eN(),er&&eD("reqInfo",f)},end:function(c){var d=eN(),p=(f.end=null!=c?f.start+c:d,b.assign({},oL,u)),h=[];b.keys(p).forEach(function(c){var u=oD[c];u&&u[2]&&h.push([u[2],p[c]])}),tc(tx,d,h,null,null,1),er&&eD("reqInfo",f)}}},updateTimedMetadata:function(c,u,d,p,h){for(var f=0;f<W.length;f++)try{W[f](c,u,d,p,h)}catch(c){eC(c,"extTimedMetadataHandler")}},addCtTimeSpans:function(c){var u=ew?ew.filter(function(c){return c.type}):[];c.forEach(function(c){for(var d,p,h,f,m=c.start,g=c.end,v=0;
13v<u.length&&(h=(p=u[v]).start,f=p.end,!(g<=h));v++)m<f&&(h<m?(u.splice(v+1,0,b.assign({},p,{start:m})),p.end=m):(d||(u.splice(v++,0,c),d=!0),g<f?p.start=g:u.splice(v--,1)));d||u.splice(v,0,c)}),ew=iH(u),eA=ex=eL=null},initCastTransfer:function(c){iI()||iV(c,!1)},handleCastMessage:function(c,u){!c||c.type!==eu||iI()||(Z.setData([[nq,c.appSID],[nW,c.ctSID]]),c.ack)||iV(u,!0)},sa:{}}),J&&en([[n2,J[1]]]),1&an&&oF((iB=Q.options).cmcdEnable?iB.cmcdKeys||["sid","org.svalabs-rid"]:null),d?C?new k(function(c,u){try{C(d,Z,$).then(function(u){T=iz(u),c(T)},function(c){eI(c),u(c)})}catch(c){u(eC(c,J[0]+" createTargetObject"))}}):k.reject("Not implemented"):T=iz(u)}),aH=function(c,u){var d=new(c||h),p=(u=u||f,{});function m(){return{currentTime:d.currentTime}}function g(){return{getAdId:function(){return p.adId},getAdSystem:function(){return p.adSystem},getAdvertiserName:function(){return p.advertiserName},getCreativeId:function(){return p.creativeId},getDealId:function(){return p.dealId},getDuration:function(){return p.duration},getSkipTimeOffset:function(){return p.skipTimeOffset},getVastMediaBitrate:function(){return p.vastMediaBitrate},getVastMediaWidth:function(){return p.vastMediaWidth},getVastMediaHeight:function(){return p.vastMediaHeight},getWrapperAdIds:function(){return p.wrapperAdIds},getWrapperAdSystems:function(){return p.wrapperAdSystems},getWrapperCreativeIds:function(){return p.wrapperCreativeIds},getAdPodInfo:function(){return{getPodIndex:function(){return p.adPodIndex},getTimeOffset:function(){return p.adTimeOffset}}},h:{clickThroughUrl:p.clickThroughUrl}}}return d.dispatch=function(c,h,f){var v,y;f=f||{},h&&((v=h.media)&&b.assign(d,v),v=h.ima)&&((h=v.adsManager)&&b.assign(d,h),(h=v.ad)&&b.assign(p,h),f.getAd=g,f.getAdData=m,y=v.error)&&(f.getError=function(){return{getErrorCode:function(){return y.code},getMessage:function(){return y.message},getInnerError:function(){return y.innerError}}}),c&&(h=new u(c),b.assign(h,f),d.dispatchEvent(h))},d.getBoundingClientRect=function(){return d.boundingClientRect||{left:0,right:0,top:0,bottom:0}},d.getVolume=function(){return d.volume},d},aV=[],az="REQUEST_COMPLETE",aq="SLOT_STARTED",aW="SLOT_ENDED",aG="AD_INITIATED",aK="AD_BUFFERING_START",aY="AD_BUFFERING_END",aX="AD_PAUSE",aQ="AD_RESUME",aZ="AD_IMPRESSION",aJ="AD_IMPRESSION_END",a$="AD_COMPLETE",a0="AD_SKIPPED",a1="AD_CLICK",a2=(aV.push(function(u,d,p,h){var f,m,g=d.setState,v=d.setAdData,y=d.fire,b={},S={on:{}};function _(){f&&(d.removeListeners(f),b={},f=m=null)}S.$update=S.update=function(c,u){var p;d.isInAds()&&(u&&v([[r2,eX(u,"getTimePosition")]]),m&&(v([[iA,eX(m,"getPlayheadTime")],[rZ,eX(m,"getDuration")],[rJ,eX(m,"getAdId")],[rQ,m._creativeId],[r5,eX(m,"getDealId")],[r4,eX(m,"getSkipOffset")]]),u=eX(m,"getActiveCreativeRendition"))&&(p=eX(u,"getHeight"),v([[iC,eX(u,"getWidth")],[iR,p],[ik,p?p+"p":null]])),c)&&(u=eX(c,"getAdVolume"),d.setData([[i3,100*u],[n1,0==u]]))},S.on[az]=function(c,u){u.success?y(tC,null,2):y(tA,null,2)},S.on[aq]=function(c,u){m=null,g(16),S.update(c,u.slot)},S.on[aW]=function(){g(17),m=null},S.on[aG]=function(){v([[iE,1]]),y(tk,null,2)},S.on[aK]=function(){g(9)},S.on[aY]=S.on[aQ]=function(){g(10,null,m)},S.on[aZ]=function(){g(10,null,m),y(tm,null,2)},S.on[aX]=function(){g(11)},S.on[a$]=function(){g(13),m=null},S.on[a0]=function(){g(14),m=null},S.on[aJ]=function(){m=null},S.on[a1]=function(){y(tf)},S.on.ERROR=function(c,u){g(15,[[nC,u.errorCode],[nO,u.errorInfo]]),m=null},S.on.AD=function(c,u){m=u.adInstance,S.update(c);var d=b[u.subType];d&&d(c,u)},S.$on=eG(S.on),d.sa.fwContext=S,p.push(function(){f&&S.update(f)}),h.push(_),eZ({attachFwContext:function(u){var p;!d.shallBlock("attachFwContext",null,u)&&u!=f&&(_(),f=u)&&(p=$(c.tv,["freewheel","SDK"]),[az,aq,aW,"AD"].forEach(function(c){var u=p&&p["EVENT_"+c];u&&d.addListener(f,u,function(u){var d=S.on[c];d&&d(f,u)})}),[aG,aK,aY,aX,aQ,aZ,aJ,a$,a0,a1,"ERROR"].forEach(function(c){var u=p&&p["EVENT_"+c];u&&(b[u]=function(u,d){var p=S.on[c];p&&p(u,d)})}))},detachFwContext:_},[u,d])}),"play"),a3="waiting",a5="playing",a4="pause",a6="seeking",a8="seeked",a7="ended",a9="durationchange",se="ratechange",st="timeupdate",si=(aV.push(function(c,u,d,p){var h,f,m,g,v=u.setState,y=u.setData,b=u.addListener,S=u.removeListeners;function _(){f&&S(f),h&&S(h),h=f=null}
13function E(){if(h){for(var c,d,p,g=0;g<h.length;g++)"metadata"===(p=h[g]).kind?d=d||p:"showing"===p.mode&&(c=c||p);m||y([[n7,!!c],[t9,c?c.label||c.language:null]]),f!=d&&(f&&S(f),f=d)&&b(f,"cuechange",function(){var c=f.activeCues;if(c)for(var d,p,h=0;h<c.length;h++)(p=(d=c[h]).value)&&u.updateTimedMetadata("ID3",d.startTime,d.endTime,p.key,p.data)})}}p.push(_);var T={on:{}};function w(){g&&S(g),g=null}T.$update=T.update=function(c,d){d&&(y([[rp,c.duration],[nZ,c.muted],[nJ,c.playbackRate]]),E()),u.isInAds()||y([[iA,c.currentTime],[iE,c.playbackRate],[rv,c.offsetWidth],[rg,c.offsetHeight],[iP,c],[t6,c.buffered],[n0,c.loop],[n1,c.muted],[i3,100*c.volume],[n4,c.readyState]])},T.on[a2]=function(c){u.isIdle()&&(u.reset(),T.update(c,!0),v(1),v(2))},T.on[a3]=function(c){T.update(c),v(2)},T.on[a5]=function(c){T.update(c),u.isAdIdle()&&v(17),v(3)},T.on[a4]=function(c){T.update(c),v(4)},T.on[a6]=function(c){T.update(c),v(5)},T.on[a8]=function(c){T.update(c),v(c.paused?4:3)},T.on[a7]=function(c){T.update(c),u.isAdIdle()&&v(17),v(6)},T.on.error=function(c){var u,d=c.error;d&&(u=[[nC,d.code],[nO,d.message]]),T.update(c),v(8,u)},T.on[a9]=function(c){y([[rp,c.duration]])},T.on[se]=function(c){y([[iE,c.playbackRate]])},T.on[st]=function(c){T.update(c)},T.$on=eG(T.on),u.sa.mediaElement=T,d.push(function(){g&&T.update(g)}),p.push(w),eZ({attachMediaElement:function(c){w(),(g=c)&&[[a2,(c=[[a7,a4,a6,a2,a3,a8,a5]])[0]],[a3,c[0]],[a5,c[0]],[a4,c[0]],[a6,c[0]],[a8,c[0]],[a7,c[0]],["error"],[a9],[se],[st]].forEach(function(c){var d=c[0];b(g,d,function(p){var h,f=T.on[d];f&&((h=c[1])?(u.stash(d,f,[g,p]),H(function(){u.unstash(h)},0)):f(g,p))})})},detachMediaElement:w,attachTextTracks:function(c,u){_(),m=u,(h=c)&&["change","addtrack","removetrack"].forEach(function(c){b(h,c,E)})},detachTextTracks:_},[u])}),"CLICK"),sn="STARTED",sr="AD_PROGRESS",so="AD_BUFFERING",sa="IMPRESSION",ss="PAUSED",sl="RESUMED",sc="COMPLETE",su="LOADED",sd="ALL_ADS_COMPLETED",sp="SKIPPED",sh="VOLUME_CHANGED",sf="AD_ERROR",sm={CLICK:"click",STARTED:"start",AD_PROGRESS:"adProgress",AD_BUFFERING:"adBuffering",IMPRESSION:"impression",PAUSED:"pause",RESUMED:"resume",COMPLETE:"complete",LOADED:"loaded",ALL_ADS_COMPLETED:"allAdsCompleted",SKIPPED:"skip",VOLUME_CHANGED:"volumeChange",AD_ERROR:"adError"},sg=(aV.push(function(u,d,p,h){var f,m=d.setState,g=d.setAdData,v=d.fire,y=d.addListener,b=d.removeListeners;function S(c){var u,c=c.getError();return c&&(u=[[nC,c.getErrorCode()],[nO,c.getMessage()]],c=c.getInnerError())&&u.push([nD,""+c]),u}var _,E,T={on:{}};function w(){f&&b(f),f=null}function P(c){var u=c.getAdPodInfo(),d=c.getVastMediaHeight(),d=[[rJ,c.getAdId(),!0],[r1,c.getAdSystem(),!0],[r3,c.getAdvertiserName(),!0],[rQ,c.getCreativeId(),!0],[r5,c.getDealId(),!0],[rZ,c.getDuration(),!0],[r4,c.getSkipTimeOffset(),!0],[ix,c.getVastMediaBitrate(),!0],[iC,c.getVastMediaWidth(),!0],[iR,d,!0],[ik,d?d+"p":null,!0],[r8,c.getWrapperAdIds(),!0],[r7,c.getWrapperAdSystems(),!0],[r6,c.getWrapperCreativeIds(),!0],[rX,$(c,[/[a-z]/,"clickThroughUrl"]),!0]];return u&&d.push([r2,u.getTimeOffset(),!0]),d}T.$update=T.update=function(c,u){d.isInAds()&&(u&&g(P(u)),c)&&(u=c.getVolume(),d.setData([[i3,100*u],[n1,0==u]]))},T.on[si]=function(c){T.update(c),v(tf)},T.on[sn]=function(c,u){u=u.getAd(),d.isInAds()||m(16),g([[iE,1]]),T.update(c,u),m(10,null,u)},T.on[sr]=function(c,u){null!=(u=$(u.getAdData(),["currentTime"]))&&(T.update(c),9==d.getState()&&(null==_?_=u:_!=u&&m(10)),g([[iA,u]]))},T.on[so]=function(c){T.update(c),m(9),_=null},T.on[sa]=function(c){T.update(c),v(tm,null,2)},T.on[ss]=function(c){T.update(c),m(11)},T.on[sl]=function(c){T.update(c),m(10)},T.on[sc]=function(c){T.update(c),m(13)},T.on[su]=function(c,u){v(tk,(u=u.getAd())&&P(u),2)},T.on[sd]=function(){m(17),w()},T.on[sp]=function(c){T.update(c),m(14)},T.on[sh]=function(c){T.update(c)},T.on[sf]=function(c,u){T.update(c),d.canSetState(15)?m(15,S(u)):v(tA,S(u),2)},T.$on=eG(T.on),d.sa.imaAdsManager=T,p.push(function(){f&&T.update(f)}),h.push(w);var A={on:{}};function I(){E&&b(E),E=null}A.on[sf]=function(c,u){v(tA,S(u),2)},A.$on=eG(A.on),d.sa.imaAdsLoader=A,h.push(I),eZ({attachImaAdsManager:function(u){var p,h;!d.shallBlock("attachImaAdsManager",null,u)&&u!=f&&(w(),f=u)&&(u=$(c.google,["ima"]),p=$(u,["AdEvent","Type"],sm),[[si],[sn,null,(h=[[sn,sa]])[0]],[sr],[so],[sa,null,h[0]],[ss],[sl],[sc],[su],[sd],[sp],[sh],[sf,$(u,["AdErrorEvent","Type"])]].forEac
13h(function(c){var u=c[0],h=(c[1]||p)[u];h&&y(f,h,function(p){var h,m=T.on[u];m&&((h=c[2])?(d.stash(u,m,[f,p]),H(function(){d.unstash(h)},0)):m(f,p))})}),v(tC,null,2))},detachImaAdsManager:w,attachImaAdsLoader:function(u){d.shallBlock("attachImaAdsLoader",null,u)||u==E||(I(),(E=u)&&(u=$(c.google,["ima","AdErrorEvent","Type"],sm)[sf])&&y(E,u,function(c){var u=A.on[sf];u&&u(E,c)}))},detachImaAdsLoader:I},[u,d])}),aV.push(function(u,d,p,h,f,m,g){var v,y,b,S=d.addListener;function _(){v&&d.removeListeners(v),v=y=b=null}function E(c){for(var u;(u=y[0])&&u.t<=c;)y.shift(),delete u.t,v.onTimedMetadata(u)}h.push(_),m.push(function(c){v&&E(b=c[1])}),g.push(function(c,u,d,p,h){var f;v&&p&&h&&ti(f="ID3"===c?h:f)&&((c={t:u})[p]=f,y.push(c),null!=b)&&E(b)}),eZ({attachImaDaiStreamManager:function(p){d.shallBlock("attachImaDaiStreamManager",null,p)||p==v||(_(),(v=p)&&(p=$(c.google,["ima","dai","api","StreamEvent","Type"]),y=[],p)&&(S(v,p.CUEPOINTS_CHANGED,function(c){d.isIdle()&&(c=$(c.getStreamData(),["cuepoints"]))&&c.length&&u.annotateContentSession(c.map(function(c){return{type:"ad",start:c.start,end:c.end}}))}),S(v,p.STARTED,function(c){var u,p,h,c=c.getAd();c&&(u=b||0,p=c.getAdPodInfo(),h=c.getVastMediaHeight(),d.addCtTimeSpans([{type:"ad",start:u,end:u+(c.getDuration()||0),_d:[[rJ,c.getAdId()],[r1,c.getAdSystem()],[r3,c.getAdvertiserName()],[rQ,c.getCreativeId()],[r5,c.getDealId()],[r4,c.getSkipTimeOffset()],[iC,c.getVastMediaWidth()],[iR,h],[ik,h?h+"p":null],[r8,c.getWrapperAdIds()],[r7,c.getWrapperAdSystems()],[r6,c.getWrapperCreativeIds()],[r2,p?p.getTimeOffset():null]],_a:c}]))})))},detachImaDaiStreamManager:_},[u,d])}),(tN=g.mediatailor)&&(tN.clientInfo+=" DZSDK "+m.cn+" v"+m.sv),Q.mediatailor=tN,aV.push(function(c,u,d,p,h,f,m,g){var v,y,b,S,_;function E(c,u,d){if(c&&1===c.playCount)for(var p=g.length,h=0;h<p;h++)g[h](u,d)}function T(){v&&y&&v.removeAdObserver(y),v=y=null,b=S=_=null}p.push(T),h.push(function(c,u,d,p){var h=b&&b[d.nm];return h&&h(c,u,d,p)}),f.push(function(c){v&&!u.isIdle()&&(S=c[1],_=u.getData(iI),ep<5||ex("MT onPlayheadUpdate: "+S+", "+_),v.onPlayheadUpdate(S,_||null))}),eZ({attachMediaTailorSession:function(c,d){var p,h,f,m,g;d=d||Q.mediatailor,!u.shallBlock("attachMediaTailorSession",null,c)&&d&&c!=v&&(T(),h=function(){var c=u.getData(i3);tn(c)&&E(p,14,c)},f=d.AdTrackingEvent,(m=[])[f.IMPRESSION]=(g=function(c){return function(){E(p,c)}})(3),m[f.LOADED]=g(1),m[f.START]=g(2),m[f.FIRST_QUARTILE]=g(4),m[f.MID_POINT]=g(5),m[f.THIRD_QUARTILE]=g(6),m[f.COMPLETE]=g(7),m[f.PAUSE]=g(8),m[f.RESUME]=g(9),m[f.FULLSCREEN]=g(15),m[f.EXIT_FULLSCREEN]=g(16),m[f.MUTE]=function(){E(p,14,0)},m[f.UNMUTE]=h,m[f.CLICK_THROUGH]=function(){u.fire(tf),E(p,13)},m[f.SKIP]=function(){u.fire(tg),E(p,12)},v=c)&&(g=d.PlaybackEvent,b={},[[g.START,tU,1],[g.END,tQ,65535],[g.PAUSE,tL,65535],[g.RESUME,tW,65535],[g.MUTE,tD,65535],[g.UNMUTE,tJ,65535],[g.FULLSCREEN,tM,65535],[g.EXIT_FULLSCREEN,tI,65535]].forEach(function(c){b[c[1].nm]=function(u,d,p,h){c[2]&h&&v.onPlaybackEvent(c[0])}}),b[t$.nm]=h,b[tb.nm]=function(){E(p,10)},b[tS.nm]=function(){E(p,11)},y={onNewAd:function(c){var d;u.addCtTimeSpans([{type:"ad",start:d=(d=c.startDate)&&_?d-_+S:c.start,end:d+c.duration,_a:c,_d:[[rJ,c.vastAdId],[r1,c.adSystem],[rQ,c.creativeId],[r4,c.skipOffset],[r2,c.availStart],[rX,c.videoClickThrough]]}])},onAdLoad:function(c){var d,h,f,m,g;1===(p=c).playCount&&(d=c.adVerifications)&&(h={},f=[],m=u.getData(i3),g=c.skipOffset,tn(m)&&(h.v=m),h.d=c.duration,h.ap=!!u.getData(nY),h.po=+(0!==c.availStart),h.sk=0<=g,h.so=h.sk?g:null,h.vf=f,d.forEach(function(c){var u=$(c.javaScriptResource,[0,"uri"]),d=c.vendor;u&&d&&f.push({url:u,vd:d,p:c.verificationParameters||""})}),E(c,0,h))},onAdEnd:function(c){E(c,17),p=null},onAdTrackingEvent:function(c,u){(u=m[u])&&u()}},v.addAdObserver(y))},detachMediaTailorSession:T},[c])}),aV.push(function(u,d,p,h,f,m,g){var v,y,S,_,E,w,A,R,k,x=["YMID","YSEQ","YTYP","YDUR"];function C(){v&&y&&v.removeAnalyticObserver(y),v=y=null,S=_=E=A=null}function O(c){for(var u;(u=S[0])&&u.t<=c;)S.shift(),v.onTimedMetadata(k.createFromMetadata(u.YMID,u.YSEQ,u.YTYP,u.YDUR,1e3*u.t))}function D(c,u,d){(_=_&&_.t===c?_:{t:c})[u]=d||"",b.keys(_).length===x.length+1&&(S.push(_),(_=null)!=A)&&O(A)}h.push(C),f.push(function(c,u,d,p){var h=E&&E[d.nm];return h&&h(c,u,d,p)}),m.push(function(c){v&&!d.isIdle()&&(A=c[1],w===R.VOD||w===R.DVRLIVE?v.onPlayheadUpdate(P.round(1e3*A)):O(A))});var L=T.fromCharCode;function N(c,u,d){for(var p,h=[];u<d;)31<(p=c[u++])&&p<127&&h.push(L(p));return h.join("")}g.push(function(c,u,d,p,h){var f;if(v&&h&&w===R.LIVE){if("ID3"===c||"org.id3"===c)x.includes(p)&&
13(h instanceof M&&(h=new I(h))||h instanceof I?3===h[0]&&(f=N(h,1,h.length)):f=h,ti(f))&&D(u,p,f);else if("urn:yospace:a:id3:2016"===c){if(h instanceof I)for(var m,g=N(h,0,h.length).split(","),y=0;y<g.length;y++)m=g[y].split("="),x.includes(m[0])&&D(u,m[0],m[1])}else if("https://aomedia.org/emsg/ID3"===c&&h instanceof I){var b=h.length;if(9<b&&73===h[0]&&68===h[1]&&51===h[2]&&(h[3]<<8|h[4])<=1024&&!(192&h[5])){y=6;for(var S=0,_=10;y<_;)S=S<<7|127&h[y++];for(b=P.min(b,S+10);y+9<b;){for(p="",_=y+4;y<_;)p+=L(h[y++]);for(S=0,_=y+4;y<_;)S=S<<7|127&h[y++];_=(y+=2)+S,x.includes(p)&&_<=b&&D(u,p,N(h,y,_)),y=_}}}}}),eZ({attachYospaceSession:function(p){var h,f,m,g,b,_=c.YospaceAdManagement;!d.shallBlock("attachYospaceSession",null,p)&&_&&p!=v&&(C(),v=p)&&(h=_.PlayerEvent,p=_.BreakType,R=_.PlaybackMode,k=_.TimedMetadata,w=v.getPlaybackMode(),S=[],E={},[[h.START,tU,1],[h.STOP,tQ,65535],[h.PAUSE,tL,65535],[h.RESUME,tW,65535],[h.STALL,tY,65535],[h.CONTINUE,tX,65535]].forEach(function(c){E[c[1].nm]=function(u,d,p,h){c[2]&h&&v.onPlayerEvent(c[0],0)}}),E[tK.nm]=function(){v.onPlayerEvent(h.SEEK,1e3*(A||0))},E[tD.nm]=function(){v.onVolumeChange(!0)},E[tJ.nm]=function(){v.onVolumeChange(!1)},f=function(c,u){return(c=c.getProperty(u))&&c.getValue()},m=function(c,u,d,p){c&&(u.push(c.getIdentifier()),d.push(c.getAdSystem()),p.push(c.getCreativeIdentifier()),m(c.getLineage(),u,d,p))},g=function(c){var u=c.getSkipOffset(),d=[],p=[],h=[],u=(m(c.getLineage(),d,p,h),[[rJ,c.getIdentifier()],[r1,f(c,"AdSystem")],[r3,f(c,"Advertiser")],[r4,0<u?u/1e3:u],[r8,d],[r7,p],[r6,h]]),d=c.getLinearCreative(),p=(d&&u.push([rQ,d.getCreativeIdentifier()],[rX,d.getClickThroughUrl()]),c.getStart()/1e3);return{type:"ad",start:p,end:p+c.getDuration()/1e3,_d:u,_a:c}},y={onAdvertBreakStart:function(c){},onAdvertBreakEnd:function(){},onAdvertStart:function(c){d.addCtTimeSpans([g(c)])},onAdvertEnd:function(){},onAdvertBreakEarlyReturn:function(c){},onAnalyticUpdate:function(){},onSessionTimeout:function(){},onTrackingEvent:function(c){}},v.addAnalyticObserver(y),w===R.VOD)&&(b=[],(_=v.getAdBreaksByType(p.LINEAR))&&_.forEach(function(c){(c=c.adverts)&&c.forEach(function(c){b.push(g(c))})}),b.length)&&u.annotateContentSession(b)},detachYospaceSession:C},[u])}),"unsupportedDataList"),sv="maxCtPlayheadInterval",sy="maxAdPlayheadInterval",sb={};function sS(c,u){var d=null==c?aD:ti(c)&&sb[c];return d&&d[5]===u?d:(eM("Invalid adapter for id: "+c),null)}function s_(c,u,d,p,h){d=[c,aL,d,p,h,u],aD=aD||d,sb[c]=d}function sE(){if(!aN){var c=ar[2];if(ee(c))try{c()}catch(c){eC(c,"onPageUnload")}b.keys(aP).forEach(function(c){aP[c].publicContext.destroy()}),aa(!0),aN=!0}}aL="Bitmovin Player",s_("bitmovin",1,function(u,d){var p={hls:"HLS",progressive:"MP4",dash:o_,smooth:"Smooth"};if(!u)return"Invalid player";function h(c,p){d.addListener(u,c,p,"on","off")}function f(){var u=$(c.cast,["framework","CastContext"]),u=u&&u.getInstance();return u&&u.getCurrentSession()}function m(c){var u=f();return u&&u.sendMessage(ec,c)}function g(){if(!d.isIdle()){var c,p=eX(u.subtitles,"list"),p=(p&&p.some(function(u){if(1==u.enabled)return c=u.lang,!0}),u.getVideoElement()),h=u.getAudio(),f=u.getPlaybackSpeed(),m=$(p,["buffered"]),g=u.getCurrentTime(),v=u.getCurrentTime("relativetime"),y=0;if(m)for(var b=0;b<m.length;b++){var S=m.end(b);if(g>=m.start(b)&&g<=S){y=1e3*(S-g);break}}tn(v)&&(tn(g)&&g!==v&&d.setData([[iI,g]]),d.setData([[iA,v]])),d.setData([[t6,y],[iE,f],[t7,$(h,["lang"])],[nX,u.isCasting()],[n4,$(p,["readyState"])],[n7,!!c],[t9,c||null]])}}function v(){u.ads&&(c=u.ads.getActiveAd(),p=u.ads.getActiveAdBreak());var c,p=$(p,["scheduleTime"]);d.setAdData([[iE,1],[r4,$(c,["skippableAfter"])],[rQ,$(c,["data","creative","id"])],[rJ,$(c,["id"])],[r1,$(c,["data","adSystem","name"])],[r2,isFinite(p)?p:-1]])}function y(){var c=u.getDuration(),h=u.getStreamType(),f=$(u.getConfig(),["adaptation","preload"]),v=u.getSource(),y="unknown"!==h?v[h]:null,h="unknown"!==h?p[h]:null,b=u.isLive()?"Live":"VOD",S=u.isMuted(),_=u.getPlaybackSpeed(),E=u.getConfig();d.isIdle()&&(d.reset(),d.setData([[rb,$(v,["title"])],[rd,$(v,["description"])],[rp,c],[ry,y],[n8,b],[n6,h],[n5,null!=f?f?"auto":"none":null],[nZ,S],[nJ,_],[nY,$(E,["playback","autoplay"])]]),g(),d.setState(1),d.setState(2),d.initCastTransfer(m))}d.setData([[n3,u.version]]),h("caststarted",function(){d.removeListeners(null,ec),d.addListener(f(),ec,function(c,u){d.handleCastMessage(e8(u),m)},"addMessageListener","removeMessageListener"),d.initCastTransfer(m)}),h("sourceunloaded",function(){d.isIdle()||(g(),d.setState(7))}),h("sourceloaded",function(){u.isCasting()&&u.isPlaying()&&y()}),h("play",y),h("timechanged",function(c){d.isInAds()?(v(),d.setAdData([[iA,c.time]])):17==d.getState()&&d.setState(3)}),h("stallstarted",function(){d.isInAds()?(v(),d.setState(9)):(g(),d.setState(2))}),h("stallended",function(){d.isInAds()?(v(),d.setState(10)):(g(),d.setState(3))}),h("playing",function(){d.isInAds()?(v(),d.setState(10)):5!=d.getState()&&(g(),d.setState(3))}),h("paused",function(){d.isInAds()?(v(),d.setState(11)):(g(),d.setState(4))}),h("seek",function(){d.setState(5)}),h("seeked",function(){g(),d.setState(u.isPaused()?4:3)}),h("timeshift",function(){d.setState(5)}),h("timeshifted",function(){g(),d.setState(u.isPaused()?4:3)}),h("videoplaybackqualitychanged",function(c){var u=$(c,["targetQuality","height"]),p=$(c,["targetQuality","bitrate"])/1e3;d.setData([[ix,p],[iC,$(c,["targetQuality","width"])],[iR,u],[ik,u?u+"p":null]])}),h("videoqualitychanged",function(){g(),d.fire(tV)}),h("error",function(c){var u=[];c&&(u.push([nO,c.name]),u.push([nC,c.code])),d.setState(8,u)}),h("playbackfinished",function(){g(),d.setState(6)}),h("adbreakstarted",function(){d.setState(16)}),h("adstarted",function(c){c=$(c,["ad","duration"]),d.setAdData([[rZ,c]]),v(),d.setState(10),d.fire(tm,null,2)}),h("aderror",function(c){var u=[];c&&(u.push([nO,$(c,["data","message"])]),u.push([nC,$(c,["data","code"])])),d.canSetState(15)?(v(),d.setState(15,u)):d.fire(tA,u,2)}),h("adclicked",function(){v(),d.fire(tf)}),h("adskipped",function(){v(),d.setState(14)}),h("adfinished",function(){v(),d.setState(13)}),h("adbreakfinished",function(){v(),d.setState(17)}),d.onTimer(function(){var c=u.getVideoElement(),p=u.getVolume(),h=u.getViewMode();(d.isInAds()?v:g)(),d.setData([[iP,c],[n1,u.isMuted()],[n$,h?"fullscreen"==h:null],[i3,p],[rg,$(c,["clientHeight"])],[rv,$(c,["clientWidth"])]])})},function(u,d,p){var h,f,m,g=u[1],v=(oC&&(h=(v=(g=eG(g||{})).network=eG(g.network||{})).preprocessHttpRequest,f=v.preprocessHttpResponse,m={},v.preprocessHttpRequest=function(c,u){function p(c){var u,p=d.reqTracer(c.url);return oO?(u=p.headers(),c.url=p.urlBase,b.keys(u).forEach(function(d){c.headers[d]=u[d]})):c.url=p.url(),m[c.url]=p,k.resolve(c)}return(c=h&&h(c,u))?c.then(p):p(u)},v.preprocessHttpResponse=function(c,u){var d=u.request.url,p=m[d];return p&&(p.status(u.status),p.resp(1e3*u.timeToFirstByte),p.end(1e3*u.elapsedTime),delete m[d]),f?f(c,u):u}),p.bitmovinPlayerClass||$(c.bitmovin,["player","Player"]));return v?k.resolve(new v(u[0],g)):k.reject("Missing bitmovin Player class")}),aL="DOM",s_("dom",2,function(c,u){var d=u.publicContext;if(!c)return"Invalid DOM element";function p(p){var h,f;
13p&&(u.removeListeners(),h=p.events,f=p.metadata,h)&&b.keys(h).forEach(function(p){var m=h[p],g=m.query_selector,v=m.interaction_type;if(g&&v)try{var y=c.querySelectorAll(g);y&&y.forEach(function(h){u.addListener(h,v,function(){var u;f&&(u=d.getMetadata()||{},b.keys(f).forEach(function(d){var p=f[d],h=p.query_selector,m=p.attribute_name;if(h&&m)try{var g=c.querySelectorAll(h);if(g){for(var v=[],y=0;y<g.length;y++){var b=g[y][m];null!=b&&v.push(b)}u[d]=v}}catch(c){eC(c,"querySelectorAll for: "+h)}}),d.setMetadata(u)),d.generateEvent(p)})})}catch(c){eC(c,"querySelectorAll for: "+g)}})}p(m.od),u.onConfig(function(c){p(c.od)})});var sT=!0;function sw(c){if(!aU){if(!(m.ci||e3(ea,el)||c&&c[el]))return!1;c&&(ea=e1(ea,function(u){b.keys(c).forEach(function(d){u.set(d,c[d])})}),ef()),sT&&(sT=!1,ag(tP,eN()));var u=e3(ea,"env");m.cf="staging"===u||"dev"===u||"sandbox"===u?u:"",m.ci=e3(ea,el)||m.ci,m.om=null,ap([[nc,m.ci]]),function c(u,d,p){var h,f;m.ci?(m.tt&&(m.mf=ei.mock_config||m.mf),ek("Get config from "+(h=m.mf||e1(e2("https://"+m.cf+"platform.datazoom.io/beacon/v2/config"),function(c){c.append(el,m.ci)}))),f=eN(),e4("GET",h,null,null,function(h){al(h,"Config API",c,u,d,m.rd,p,function(c,d){var p=e8(c.responseText);if(p)return u(p,c.getResponseHeader("dz-extra"),f,d),!0},function(c,d){d<400||429==d||499<d||(m.om=!1),u()})})):(eM("Missing configuration ID"),m.om=!1,u())}(function(c,u,d,p){m.st=null,c&&function c(u,d){to(u)?b.keys(u).forEach(function(p){var h=u[p],f=d[p];to(f)?c(h,f):null==f?eR("Unknown config key: "+p):null==h?eR("Undef
13ined config key: "+p):f&&(m[f]=h)}):eM("Invalid config object",u)}(c,eo),e9(y,eE,m.st),m.st=ao(m.st),e9(y,eT,m.od),ot(m.ev,c),oa(m.fd),ob(m.md),oF(m.cd),m.og||(eH=[]),m.os||(eL=null),eX(m.cm,"sort"),eX(m.am,"sort"),eX(m.cq,"sort"),eX(m.aq,"sort"),ap([[nd,m.cc],[nu,m.cl]]),ai.forEach(function(c){var u,d,p,h,f,m=!1,g=oz(c.m,nf),v=oe[g];v?m=v.on:g.startsWith(J)?m=ol:g.startsWith("v_")&&(m=ou),m&&(u=c.m,d={},ov.concat(oy).forEach(function(c){null!=(p=oz(u,c))&&(oV(d,c.p)[c.nm]=p)}),h=oV(u,t0),f=oV(d,t0),or.concat(oo).forEach(function(c){null!=(p=oz(h,c))&&(f[c.nm]=p)}),os&&(p=oV(u,ns,!0))&&b.assign(oV(d,ns),p),oc&&(p=oV(u,nl,!0))&&b.assign(oV(d,nl),p),au(d,f),c.m=d,at.push(c))}),e9(y,eS,at),ai=[];var h,c=rr.nm,c=(rr.on?(h=te(v,c))||(h=e5(),e9(v,c,h)):tt(v,c),ap([[rr,h]]),u);try{var f,g,S,_,E,T=c&&e8(atob(c));T?(f=T.latitude,g=T.longitude,S=T.timezone_offset,E=(_=T.time_sync)&&+_,ap([[nG,T.client_ip],[rL,T.mobile_connection],[rC,T.asn],[rI,T.region_code],[rA,T.region],[rE,T.country_code],[r_,T.country],[rP,T.postal_code],[rS,T.city],[rT,f?+f:null],[rw,g?+g:null],[rM,T.continent],[rR,T.continent_code],[rk,T.timezone_name],[rx,null!=S?S/3600:null]]),E&&ap([[rj,P.round(E-(d+p)/2)]])):eM("Missing or invalid dz-extra header")}catch(c){eC(c,"processDzExtra")}m.ab&&rK.on&&null==ah(rK)?e4("GET",e2(m.ab),null,null,function(c){4==c.readyState&&(ap([[rK,!c.status]]),as(4))}):as(4),as(1),ac(),H(function(){as(4),ac()},m.mh),b.keys(aP).forEach(function(c){(c=aP[c].configCallback)&&c(m)})},0,eq("config",eN())),aU=!0}return!0}function sP(c){c()}function sA(c,u,d){to(d)||(null!=d&&eM("Invalid contextOptions",d),d={});var p,h,f,m,g,v,y,S,_,E,T,w,P,A=d[a_]||aw[1];switch(A){case aw[1]:return aj(c,u,d);case aw[2]:return m=c,E=aC((g=d)[aS],g[aE]),T=sS(g[ay],2),w=to(w=g[ab])?eG(w):{},T&&(y=T[2],S=T[3],b.assign(w,T[4]||{})),b.assign(E,{type:2,fire:function(c,u){E.fireEvent(c,eN(),u)},onTimer:function(c){_=c}}),u?S?new k(function(c,d){try{S(u,E,w).then(function(u){v=I(u),c(v)},function(c){eI(c),d(c)})}catch(c){d(eC(c,T[0]+" createTargetObject"))}}):k.reject("Not implemented"):v=I(m);case aw[0]:if(!u)return h=(m=aC(null,d[aE])).publicContext,null!=(f=d[aT])&&h.setMetadata(f),m.fireEvent(tw,eN()),h;p="Invalid context type: "+A;break;default:p="Unknown context type: "+A}function I(c){var u,d=E.publicContext,p=null;E.target=c,b.assign(d,E.basePublicMethods,{getError:function(){return p},getTarget:function(){return c},adapterID:function(){return T?T[0]:null}});try{p=T?y?y(c,E,w):null:"Missing adapter"}catch(c){p=eC(c,T[0]+" initContext")}return p?(eI(p),d.destroy()):(null!=(u=g[aT])&&d.setMetadata(u),E.fire(tw),E.setTimer(function(){if(_)try{_()}catch(c){eC(c,"onTimer")}})),d}return eI(p),u?k.reject(p):(P=p,{getError:function(){return P}})}eX(c,"addEventListener",["pagehide",sE]),"Safari"==o3&&eX(c,"addEventListener",["beforeunload",function(c){H(function(){c.defaultPrevented||c.returnValue||sE()},0)}]),eR("Datazoom SDK "+m.sv+" ("+m.cn+") DDv3"),j(function(){aA.length?aA.forEach(sP):eN()},m.ti),b.assign(Q,{init:sw,setLogLevel:eh,createContext:function(c,u){return sA(c,null,u)},createBaseContext:function(c){return(c=to(c)?eG(c):{})[a_]=aw[0],sA(null,null,c)},createContextAndTarget:function(c){for(var u=[],d=1;d<arguments.length;d++)u.push(arguments[d]);return sA(null,u,c)},createCollectorProxy:function(c,u,d){return(c=c||aw[1])===aw[1]?aH(u,d):(eI("Unsupported context type: "+c),null)},adapterIDs:function(){return b.keys(sb)},contexts:function(){return b.keys(aP).map(function(c){return aP[c].publicContext})},playerContexts:function(){return b.keys(aP).filter(function(c){return 1==aP[c].type}).map(function(c){return aP[c].publicContext})},setMetadata:function(c){return!(null!=c&&!to(c)||(av(oW=e8(e6(c)),ap),e9(y,eb,oW),0))},getMetadata:function(){return e8(e6(oW))},generateEvent:function(c,u,d){(d=!d&&b.keys(aP)[0])?aP[d].publicContext.generateEvent(c,u):ag({ap:4,nm:J+c,on:ol},eN(),null,u)},on:function(c,u){ar[c]=u},appSessionID:function(){return oK},generateUUID:function(){return e5()},sdkEvent:{APP_SESSION_START:0,CONTENT_SESSION_START:1,PAGE_UNLOAD:2,AD_START:3,AD_END:4},timeSpanType:{AD:"ad",PROMO:"promo"},overridableMetadata:op,name:m.cn,version:m.sv,dictionaryVersion:3}),u||H(sw,m.kd)}("object"==typeof globalThis?globalThis:window,{},{}),u&&(c.exports=u.datazoom)}(collector_bitmovin);var collector_bitmovinExports=collector_bitmovin.exports;let datazoom=getDefaultExportFromCjs$1(collector_bitmovinExports),log$f=loglevelExports.getLogger("DataZoomTracker");function getPlayerContext(c){let u=datazoom.playerContexts();if(!(!u||0===u.length))return u.find(u=>u.getPlayer()===c)}function getGlobalDataZoomMetadata(c){let{customMetadata:u}=c;if(!u)return{};let d={};for(let c of GLOBAL_DATAZOOM_METADATA_FIELDS)Object.prototype.hasOwnProperty.call(u,c)&&(d[c]=u[c]);return d}function createDataZoomTracker(c,u){try{if(!c.configId)return void log$f.warn("datazoom config id is missing, skipping initialization");if(datazoom.init({configuration_id:c.configId}),log$f.info("datazoom initialized"),c.customMetadata){let u=getGlobalDataZoomMetadata(c);datazoom.setMetadata(u),log$f.info("datazoom global metadata set",u)}let d=datazoom.createContext(u);c.customMetadata&&d.setMetadata(c.customMetadata)}catch(c){log$f.error("could not initialize datazoom client",c)}}function destroyDataZoomTracker(c){try{log$f.info("preparing to de
13stroy datazoom");let u=getPlayerContext(c);u&&(log$f.info("destroying datazoom context for player",c,u),u.destroy())}catch(c){log$f.error("error destroying datazoom tracker",c)}}function extendDataZoomMetadata(c,u){if(u)try{let d=getPlayerContext(c);if(!d)return void log$f.warn("no datazoom context found for player",c,"not updating metadata");log$f.info("extending datazoom metadata for player",c,u);let p=d.getMetadata();d.setMetadata({...p,...u})}catch(c){log$f.error("error extending datazoom metadata",c)}}let DEFAULT_16_9_VIDEO_TAG_POSTER_IMAGE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAYAAAA7KqwyAAAABmJLR0QA/wD/AP+gvaeTAAAAGElEQVQokWNkYGD4z0ABYKJE86gBw8YAAFmzAREE4ESyAAAAAElFTkSuQmCC";function convertToAspectRatio(c){let u=[{decimal:1.7777777777777777,ratio:{width:16,height:9}},{decimal:.8,ratio:{width:4,height:5}},{decimal:1.3333333333333333,ratio:{width:4,height:3}},{decimal:.6666666666666666,ratio:{width:2,height:3}},{decimal:2,ratio:{width:2,height:1}},{decimal:1,ratio:{width:1,height:1}},{decimal:.5625,ratio:{width:9,height:16}}].find(u=>u.decimal===c);return u?u.ratio:{width:16,height:9}}function generateVideoTagPosterSource(c){if(!c)return DEFAULT_16_9_VIDEO_TAG_POSTER_IMAGE;let u=convertToAspectRatio(c),d=u.width,p=u.height,h=document.createElement("canvas");h.width=d,h.height=p;let f=h.getContext("2d");return f?(f.fillStyle="black",f.fillRect(0,0,d,p),h.toDataURL("image/png")):DEFAULT_16_9_VIDEO_TAG_POSTER_IMAGE}async function sleep(c){await new Promise(u=>setTimeout(u,c))}let StorageKey={AUDIO_LANGUAGE:"rbup-video-audio-language",QUALITY:"rbup-video-quality",SUBTITLE_LANGUAGE:"rbup-video-subtitle-language",VOLUME:"rbup-video-volume"};function setStorageItem(c,u,d){let p="string"==typeof u?u:JSON.stringify(u);d.setItem(c,p)}function clearSubtitleLanguage(c){c.removeItem(StorageKey.SUBTITLE_LANGUAGE)}function getAudioLanguage(c){return c.getItem(StorageKey.AUDIO_LANGUAGE)}function getQualityHeight(c){let u=c.getItem(StorageKey.QUALITY);return u?parseInt(u,10):null}function getSubtitleLanguage(c){return c.getItem(StorageKey.SUBTITLE_LANGUAGE)}function getVolume(c){let u=c.getItem(StorageKey.VOLUME);return u?parseInt(u,10):null}function setAudioLanguage(c,u){setStorageItem(StorageKey.AUDIO_LANGUAGE,c,u)}function setSubtitleLanguage(c,u){setStorageItem(StorageKey.SUBTITLE_LANGUAGE,c,u)}function setVolume(c,u){setStorageItem(StorageKey.VOLUME,c,u)}let MIN_TIMESHIFT_FOR_DVR_SECS=-200;function detectBasedOnAssetId(c){return!1}function detectBasedOnMaxTimeShift(c){return!!(!Number.isFinite(c)||Number.isNaN(c))||c>MIN_TIMESHIFT_FOR_DVR_SECS}function isLinearStream(c,u,d){return!!detectBasedOnAssetId()||detectBasedOnMaxTimeShift(c)}let isDatazoomEnabled=(c,u)=>!!("ACTIVE"===c&&null!=u&&u.configId),extendDatazoomMetadataWithVideoPlayerMetadata=(c,u,d)=>{var p,h;if(!d)return;let f=null==(p=c.services)?void 0:p.dataZoom,m=c.configs.dataZoom;isDatazoomEnabled(f,m)&&extendDataZoomMetadata(d,null==(h=m.dataZoomMetadataCustomizer)?void 0:h.call(m,u))};class AudioLanguageResolver{constructor(c,u,d,p){this.mediaMetadata=c,this.config=u,this.availableAudioTracks=d,this.availableSubtitleTracks=p}resolveAudioTrackId(c){let u=this.availableAudioTracks,d=getBrowserLanguage(),p=this.mediaMetadata.availableAudioLanguages,h=tryResolveRequestedAudioLanguageForAudioTrack(d,p,u)??d,f=c?tryResolveRequestedAudioLanguageForAudioTrack(c,p,u):void 0,m=this.config.overrideAudioLanguage,g=m?tryResolveRequestedAudioLanguageForAudioTrack(m,p,u):void 0;if(u.length>1)return getMatchedAudioTrackId(g??f??h,u)}resolveSubtitleTrackId(c){let u=this.config.overrideSubtitleLanguage,d=u?tryResolveRequestedSubtitleLanguageForSubtitleTrack(u,this.mediaMetadata.availableSubtitleLanguages,this.availableSubtitleTracks):void 0;if(d)return getMatchedSubtitleTrackId(d,this.availableSubtitleTracks);if(c){let u=tryResolveRequestedSubtitleLanguageForSubtitleTrack(c,this.mediaMetadata.availableSubtitleLanguages,this.availableSubtitleTracks);if(u)return getMatchedSubtitleTrackId(u,this.availableSubtitleTracks)}}resolveStorageLanguageForSubtitle(c){if("USER"===c.issuer)return getIsoMatchForAudioLanguage(c.language,this.mediaMetadata.availableSubtitleLanguages)??c.language}resolveStorageLanguageForAudio(c){if("USER"===c.issuer)return getIsoMatchForAudioLanguage(c.language,this.mediaMetadata.availableAudioLanguages)??c.language}}class AudioVolumeResolver{constructor(c){this.playerConfiguration=c}
13resolveVolumeToRestore(c){if("MUTED"!==this.playerConfiguration.muted&&isNotNullOrUndefined(c))return c}resolveStorageVolume(c){let u=c.currentVolume;if("MUTED"!==this.playerConfiguration.muted||u>0)return u}}let log$e=loglevelExports.getLogger("StorageService");class StorageService{constructor(c,u,d,p,h){if(yi(this,"playerCoordinator"),yi(this,"sessionStorage"),yi(this,"localStorage"),yi(this,"audioLanguageResolver"),yi(this,"audioVolumeResolver"),yi(this,"eventListener",c=>{let{localStorage:u,sessionStorage:d}=this;switch(c.type){case"audioChanged":this.handleAudioChanged(u,c);break;case"subtitleDisabled":this.handleSubtitleDisabled(u,c);break;case"subtitleEnabled":this.handleSubtitleEnabled(u,c);break;case"volumeChanged":this.handleVolumeChanged(d,c)}}),this.playerCoordinator=c,this.sessionStorage=p,this.localStorage=h,this.audioLanguageResolver=u,this.audioVolumeResolver=d,this.playerCoordinator.addEventListener(this.eventListener),!p)try{this.sessionStorage=window.sessionStorage}catch(c){log$e.warn("cannot get session storage",c)}if(!h)try{this.localStorage=window.localStorage}catch(c){log$e.warn("cannot get local storage",c)}}load(){this.loadVolume(),this.loadVideoQuality(),("LIVE"!==this.playerCoordinator.getPlaybackMode()||"LINEAR"!==this.playerCoordinator.getLiveVariant())&&this.loadSubtitleLanguage(),this.loadAudioLanguage()}destroy(){this.playerCoordinator.removeEventListener(this.eventListener)}getAllStoredValues(){let c=this.localStorage;if(c)return{audioLanguage:getAudioLanguage(c),qualityHeight:getQualityHeight(c),subtitleLanguage:getSubtitleLanguage(c),volume:getVolume(c)}}handleVolumeChanged(c,u){if(c){let d=this.audioVolumeResolver.resolveStorageVolume(u);void 0!==d&&setVolume(d,c)}}handleSubtitleEnabled(c,u){if(c){let d=this.audioLanguageResolver.resolveStorageLanguageForSubtitle(u);d&&setSubtitleLanguage(d,c)}}handleSubtitleDisabled(c,u){c&&"USER"===u.issuer&&clearSubtitleLanguage(c)}handleAudioChanged(c,u){if(c){let d=this.audioLanguageResolver.resolveStorageLanguageForAudio(u);d&&setAudioLanguage(d,c)}}loadAudioLanguage(){let c=this.localStorage;if(!c)return;let u=getAudioLanguage(c),d=this.audioLanguageResolver.resolveAudioTrackId(u);d&&this.playerCoordinator.setAudioTrack(d,"INITIAL")}loadSubtitleLanguage(){let c=this.localStorage;if(!c)return;let u=getSubtitleLanguage(c),d=this.audioLanguageResolver.resolveSubtitleTrackId(u);d&&this.playerCoordinator.enableSubtitle(d,"INITIAL")}loadVideoQuality(){let c=this.sessionStorage;if(!c)return;let u=getQualityHeight(c);if(null!==u){let c=this.playerCoordinator.getAvailableVideoQualities().find(c=>c.height===u);c&&this.playerCoordinator.setVideoQuality(c.id)}}loadVolume(){let c=this.sessionStorage;if(!c)return;let u=getVolume(c),d=this.audioVolumeResolver.resolveVolumeToRestore(u);void 0!==d&&this.playerCoordinator.setVolume(d)}}var bitmovinplayerCore={exports:{}};!function(module){!function(){if("u">typeof commonjsGlobal&&typeof window>"u"){commonjsGlobal.window=self=commonjsGlobal,window.NodeList="u">typeof NodeList?NodeList:{prototype:{}},window.Document="u">typeof Document?Document:{prototype:{}};var shimArrayFn=function(){return[]},shimElementFn=function(){return{appendChild:shimArrayFn}};window.document="u">typeof document?document:{createTextNode:shimArrayFn,getElementsByTagName:shimArrayFn,createElement:shimElementFn,head:{appendChild:shimArrayFn}},window.Event="u">typeof Event?Event:{prototype:{}},window.Element="u">typeof Element?Element:{prototype:{}},window.screen="u">typeof screen?screen:{prototype:{}},window.navigator="u">typeof navigator?navigator:{prototype:{},userAgent:"shim",platform:{toLowerCase:shimArrayFn}},window.location="u">typeof location?location:{}}!function(c,u){module.exports=u()}(self,function(){return function(){var __webpack_modules__={90040:function(module){var URL=window.URL||window.webkitURL;module.exports=function(content,url){try{try{var blob;try{(blob=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(content),blob=blob.getBlob()}catch{blob=new Blob([content])}return new Worker(URL.createObjectURL(blob))}catch{return new Worker("data:application/javascript,"+encodeURIComponent(content))}}catch(e){try{var exportReturnStatement="return __webpack_require__(",exportStatement="var __webpack_exports__ = __webpack_require__(";return"!"===content.substring(0,1)&&(content=content.substring(1,content.length-1),content="("+content+")"),content.indexOf(exportStatement)>0&&(content=content.replace(exportStatement,exportReturnStatement)),eval(content).getContext()}catch(ie){return{}}}}},37007:function(c){var u,d="object"==typeof Reflect?Reflect:null,p=d&&"function"==typeof d.apply?d.apply:function(c,u,d){return Function.prototype.apply.call(c,u,d)};u=d&&"function"==typeof d.ownKeys?d.ownKeys:Object.getOwnPropertySymbols?function(c){return Object.getOwnPropertyNames(c).concat(Object.getOwnPropertySymbols(c))}:function(c){return Object.getOwnPropertyNames(c)};var h=Number.isNaN||function(c){return c!=c};function f(){f.init.call(this)}c.exports=f,c.exports.once=function(c,u){return new Promise(function(d,p){function h(d){c.removeListener(u,f),p(d)}function f(){"function"==typeof c.removeListener&&c.removeListener("error",h),d([].slice.call(arguments))}w(c,u,f,{once:!0}),"error"!==u&&"function"==typeof c.on&&w(c,"error",h,{once:!0})})},f.EventEmitter=f,f.prototype._events=void 0,f.prototype._eventsCount=0,f.prototype._maxListeners=void 0;var m=10;function g(c){if("function"!=typeof c)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof c)}function v(c){return void 0===c._maxListeners?f.defaultMaxListeners:c._maxListeners}function y(c,u,d,p){var h,f,m;if(g(d),void 0===(f=c._events)?(f=c._events=Object.create(null),c._eventsCount=0):(void 0!==f.newListener&&(c.emit
vendor: 4,326 bytes, line 13
13("newListener",u,d.listener?d.listener:d),f=c._events),m=f[u]),void 0===m)m=f[u]=d,++c._eventsCount;else if("function"==typeof m?m=f[u]=p?[d,m]:[m,d]:p?m.unshift(d):m.push(d),(h=v(c))>0&&m.length>h&&!m.warned){m.warned=!0;var y=Error("Possible EventEmitter memory leak detected. "+m.length+" "+String(u)+" listeners added. Use emitter.setMaxListeners() to increase limit");y.name="MaxListenersExceededWarning",y.emitter=c,y.type=u,y.count=m.length,console&&console.warn&&console.warn(y)}return c}function b(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function S(c,u,d){var p={fired:!1,wrapFn:void 0,target:c,type:u,listener:d},h=b.bind(p);return h.listener=d,p.wrapFn=h,h}function _(c,u,d){var p=c._events;if(void 0===p)return[];var h=p[u];return void 0===h?[]:"function"==typeof h?d?[h.listener||h]:[h]:d?function(c){for(var u=Array(c.length),d=0;d<u.length;++d)u[d]=c[d].listener||c[d];return u}(h):T(h,h.length)}function E(c){var u=this._events;if(void 0!==u){var d=u[c];if("function"==typeof d)return 1;if(void 0!==d)return d.length}return 0}function T(c,u){for(var d=Array(u),p=0;p<u;++p)d[p]=c[p];return d}function w(c,u,d,p){if("function"==typeof c.on)p.once?c.once(u,d):c.on(u,d);else{if("function"!=typeof c.addEventListener)throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof c);c.addEventListener(u,function h(f){p.once&&c.removeEventListener(u,h),d(f)})}}Object.defineProperty(f,"defaultMaxListeners",{enumerable:!0,get:function(){return m},set:function(c){if("number"!=typeof c||c<0||h(c))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+c+".");m=c}}),f.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},f.prototype.setMaxListeners=function(c){if("number"!=typeof c||c<0||h(c))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+c+".");return this._maxListeners=c,this},f.prototype.getMaxListeners=function(){return v(this)},f.prototype.emit=function(c){for(var u=[],d=1;d<arguments.length;d++)u.push(arguments[d]);var h="error"===c,f=this._events;if(void 0!==f)h=h&&void 0===f.error;else if(!h)return!1;if(h){if(u.length>0&&(m=u[0]),m instanceof Error)throw m;var m,g=Error("Unhandled error."+(m?" ("+m.message+")":""));throw g.context=m,g}var v=f[c];if(void 0===v)return!1;if("function"==typeof v)p(v,this,u);else{var y=v.length,b=T(v,y);for(d=0;d<y;++d)p(b[d],this,u)}return!0},f.prototype.addListener=function(c,u){return y(this,c,u,!1)},f.prototype.on=f.prototype.addListener,f.prototype.prependListener=function(c,u){return y(this,c,u,!0)},f.prototype.once=function(c,u){return g(u),this.on(c,S(this,c,u)),this},f.prototype.prependOnceListener=function(c,u){return g(u),this.prependListener(c,S(this,c,u)),this},f.prototype.removeListener=function(c,u){var d,p,h,f,m;if(g(u),void 0===(p=this._events)||void 0===(d=p[c]))return this;if(d===u||d.listener===u)0==--this._eventsCount?this._events=Object.create(null):(delete p[c],p.removeListener&&this.emit("removeListener",c,d.listener||u));else if("function"!=typeof d){for(h=-1,f=d.length-1;f>=0;f--)if(d[f]===u||d[f].listener===u){m=d[f].listener,h=f;break}if(h<0)return this;0===h?d.shift():function(c,u){for(;u+1<c.length;u++)c[u]=c[u+1];c.pop()}(d,h),1===d.length&&(p[c]=d[0]),void 0!==p.removeListener&&this.emit("removeListener",c,m||u)}return this},f.prototype.off=f.prototype.removeListener,f.prototype.removeAllListeners=function(c){var u,d,p;if(void 0===(d=this._events))return this;if(void 0===d.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==d[c]&&(0==--this._eventsCount?this._events=Object.create(null):delete d[c]),this;if(0==arguments.length){var h,f=Object.keys(d);for(p=0;p<f.length;++p)"removeListener"!==(h=f[p])&&this.removeAllListeners(h);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(u=d[c]))this.removeListener(c,u);else if(void 0!==u)for(p=u.length-1;p>=0;
13p--)this.removeListener(c,u[p]);return this},f.prototype.listeners=function(c){return _(this,c,!0)},f.prototype.rawListeners=function(c){return _(this,c,!1)},f.listenerCount=function(c,u){return"function"==typeof c.listenerCount?c.listenerCount(u):E.call(c,u)},f.prototype.listenerCount=E,f.prototype.eventNames=function(){return this._eventsCount>0?u(this._events):[]}},91829:function(c,u,d){function p(c){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(c){return typeof c}:function(c){return c&&"function"==typeof Symbol&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(c)}function h(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter(function(u){return Object.getOwnPropertyDescriptor(c,u).enumerable})),d.push.apply(d,p)}return d}function f(c){for(var u=1;u<arguments.length;u++){var d=null!=arguments[u]?arguments[u]:{};u%2?h(Object(d),!0).forEach(function(u){!function(c,u,d){var h;(h=function(c){if("object"!=p(c)||!c)return c;var u=c[Symbol.toPrimitive];if(void 0!==u){var d=u.call(c,"string");if("object"!=p(d))return d;throw TypeError("@@toPrimitive must return a primitive value.")}return String(c)}(u),(u="symbol"==p(h)?h:h+"")in c)?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d}(c,u,d[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):h(Object(d)).forEach(function(u){Object.defineProperty(c,u,Object.getOwnPropertyDescriptor(d,u))})}return c}function m(c){return"Minified Redux error #"+c+"; visit https://redux.js.org/Errors?code="+c+" for the full message or use the non-minified dev environment for full errors. "}d.r(u),d.d(u,{__DO_NOT_USE__ActionTypes:function(){return y},applyMiddleware:function(){return P},bindActionCreators:function(){return T},combineReducers:function(){return _},compose:function(){return w},createStore:function(){return b},legacy_createStore:function(){return S}});var g="function"==typeof Symbol&&Symbol.observable||"@@observable",v=function(){return Math.random().toString(36).substring(7).split("").join(".")},y={INIT:"@@redux/INIT"+v(),REPLACE:"@@redux/REPLACE"+v(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+v()}};function b(c,u,d){if("function"==typeof u&&"function"==typeof d||"function"==typeof d&&"function"==typeof arguments[3])throw Error(m(0));if("function"==typeof u&&void 0===d&&(d=u,u=void 0),void 0!==d){if("function"!=typeof d)throw Error(m(1));return d(b)(c,u)}if("function"!=typeof c)throw Error(m(2));var p,h=c,f=u,v=[],S=v,_=!1;function E(){S===v&&(S=v.slice())}function T(){if(_)throw Error(m(3));return f}function w(c){if("function"!=typeof c)throw Error(m(4));if(_)throw Error(m(5));var u=!0;return E(),S.push(c),function(){if(u){if(_)throw Error(m(6));u=!1,E();var d=S.indexOf(c);S.splice(d,1),v=null}}}function P(c){if(!function(c){if("object"!=typeof c||null===c)return!1;for(var u=c;null!==Object.getPrototypeOf(u);)u=Object.getPrototypeOf(u);return Object.getPrototypeOf(c)===u}(c))throw Error(m(7));if(void 0===c.type)throw Error(m(8));if(_)throw Error(m(9));try{_=!0,f=h(f,c)}finally{_=!1}for(var u=v=S,d=0;d<u.length;d++)(0,u[d])();return c}return P({type:y.INIT}),(p={dispatch:P,subscribe:w,getState:T,replaceReducer:function(c){if("function"!=typeof c)throw Error(m(10));h=c,P({type:y.REPLACE})}})[g]=function(){var c;return(c={subscribe:function(c){if("object"!=typeof c||null===c)throw Error(m(11));function u(){c.next&&c.next(T())}return u(),{unsubscribe:w(u)}}})[g]=function(){return this},c},p}var S=b;function _(c){for(var u=Object.keys(c),d={},p=0;p<u.length;p++){var h=u[p];"function"==typeof c[h]&&(d[h]=c[h])}var f,g=Object.keys(d);try{Object.keys(d).forEach(function(c){var u=d[c];if(void 0===u(void 0,{type:y.INIT}))throw Error(m(12));if(void 0===u(void 0,{type:y.PROBE_UNKNOWN_ACTION()}))throw Error(m(13))})}catch(c){f=c}return function(c,u){if(void 0===c&&(c={}),f)throw f;for(var p=!1,h={},v=0;v<g.length;v++){var y=g[v],b=d[y],S=c[y],_=b(S,u);if(void 0===_)throw u&&u.type,Error(m(14));h[y]=_,p=p||_!==S}return(p=p||g.length!==Object.keys(c).length)?h:c}}function E(c,u){return function(){return u(c.apply(this,arguments))}}function T(c,u){if("function"==typeof c)return E(c,u);if("object"!=typeof c||null===c)throw Error(m(16));var d={};for(var p in c){var h=c[p];"function"==typeof h&&(d[p]=E(h,u))}return d}function w(){for(var c=arguments.length,u=Array(c),d=0;d<c;d++)u[d]=arguments[d];return 0===u.length?function(c){return c}:1===u.length?u[0]:u.reduce(function(c,u){return function(){return c(u.apply(void 0,arguments))}})}function P(){for(var c=arguments.length,u=Array(c),d=0;d<c;d++)u[d]=arguments[d];return function(c){return function(){var d=c.apply(void 0,arguments),p=function(){throw Error(m(15))},h={getState:d.getState,dispatch:function(){return p.apply(void 0,arguments)}},g=u.map(function(c){return c(h)});return p=w.apply(void 0,g)(d.dispatch),f(f({},d),{},{dispatch:p})}}}}
13,88052:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.ModuleManager=void 0;var p=d(40306),h=d(3336),f=d(95880);u.ModuleManager=function(){function c(){}return c.initialize=function(){this.modules||(this.modules={})},c.add=function(c){if(this.initialize(),!c)throw new h.PlayerError(p.ErrorCode.MODULE_INVALID_DEFINITION,void 0,"Cannot add the module: no module definition was provided to the API.");if(!c.name)throw new h.PlayerError(p.ErrorCode.MODULE_INVALID_DEFINITION,void 0,"Cannot add the module: no `name` property was provided to the module definition.");if(!c.module)throw new h.PlayerError(p.ErrorCode.MODULE_INVALID_DEFINITION,void 0,"Cannot add the module: no `module` property was provided to the module definition.");if(c.dependencies){for(var u=0,d=c.dependencies;u<d.length;u++){var m=d[u];if(!this.has(m))throw new f.PlayerModuleMissingError(c.name,m)}if("function"!=typeof c.module)throw new h.PlayerError(p.ErrorCode.MODULE_INVALID_DEFINITION_DEPENDENCY,{name:c.name},"Cannot add the module: modules with dependencies must pass a deferred loading function to the `ModuleDefinition.module` property.")}var g=c.module;"function"==typeof g&&(g=g()),this.modules[c.name]={moduleDefinition:c,module:g},c.hooks&&c.hooks.add&&c.hooks.add(c.module)},c.remove=function(c){var u;if(this.modules){if(!this.modules[c])throw new f.PlayerModuleMissingError(c);var d=this.modules[c].moduleDefinition;null!=(u=d.hooks)&&u.remove&&d.hooks.remove(d.module),delete this.modules[c]}},c.get=function(c,u){void 0===u&&(u=!0),this.initialize();var d=this.modules[c];if(d&&d.module)return d.module;if(u)throw new f.PlayerModuleMissingError(c)},c.has=function(c){return void 0!==this.get(c,!1)},c.getModuleNames=function(){return Object.getOwnPropertyNames(this.modules)},c.getModuleDefinitions=function(){var c=this;return this.getModuleNames().map(function(u){return c.modules[u]})},c.callSetupHooks=function(c){this.getModuleDefinitions().filter(function(c){return c.moduleDefinition.hooks&&c.moduleDefinition.hooks.setup}).forEach(function(u){return u.moduleDefinition.hooks.setup(u.module,c)})},c.callDestroyHooks=function(c){return Promise.all(this.getModuleDefinitions().filter(function(c){return c.moduleDefinition.hooks&&c.moduleDefinition.hooks.destroy}).map(function(u){return u.moduleDefinition.hooks.destroy(u.module,c)})).then(function(){})},c}()},62756:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.ModuleName=void 0,(p=d||(u.ModuleName=d={})).VR="VR",p.XML="XML",p.Smooth="Smooth",p.AdvertisingCore="AdvertisingCore",p.Advertising="Advertising",p.AdvertisingIma="Advertising",p.AdvertisingBitmovin="Advertising",p.AdvertisingOmSdk="AdvertisingOmSdk",p.SGAI="SGAI",p.Polyfill="Polyfill",p.Patch="Patch",p.RemoteControl="RemoteControl",p.RendererMse="RendererMSE",p.EngineNative="EngineNative",p.EngineBitmovin="EngineBitmovin",p.ABR="ABR",p.Crypto="Crypto",p.HLS="HLS",p.DRM="DRM",p.DASH="DASH",p.ContainerTS="ContainerTS",p.ContainerMP4="ContainerMP4",p.ContainerWebM="ContainerWebM",p.Subtitles="Subtitles",p.SubtitlesTTML="SubtitlesTTML",p.SubtitlesWebVTT="SubtitlesWebVTT",p.SubtitlesCEA608="SubtitlesCEA608",p.SubtitlesNative="SubtitlesNative",p.Style="Style",p.Thumbnail="Thumbnail",p.ThumbnailImp="Thumbnail",p.UI="UI",p.Tizen="Tizen",p.Webos="webos",p.Vidaa="vidaa",p.Wpe="wpe",p.LowLatency="LowLatency",p.ServiceWorkerClient="ServiceWorkerClient",p.Envivio="Envivio",p.PlayStation5="PlayStation5",p.PlayStation4="PlayStation4",p.EngineWebRtc="EngineWebRtc",p.ReactNative="ReactNative"},95880:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.PlayerModuleMissingError=void 0;var f=d(40306);u.PlayerModuleMissingError=function(c){function u(u,d){return d?c.call(this,f.ErrorCode.MODULE_DEPENDENCY_MISSING,{name:u,dependency:d},"The ".concat(u," module requires the ").concat(d," module to be included as well."))||this:c.call(this,f.ErrorCode.MODULE_MISSING,{name:u},"The ".concat(u," module is required to play this stream."))||this}return h(u,c),u}
vendor: 5,180 bytes, line 13
13(d(3336).PlayerError)},22374:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.PlayerModuleMissingWarning=void 0;var f=d(25926),m=d(4224);u.PlayerModuleMissingWarning=function(c){function u(u,d){return c.call(this,m.WarningCode.MODULE_MISSING,d,{moduleName:u})||this}return h(u,c),u}(f.PlayerWarning)},4524:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferRangeHelper=u.MultiRange=void 0,u.rangeFixedValue=y,u.areDisjoint=function(c,u){return y(c.end)<y(u.start)||y(c.start)>y(u.end)},u.isSurrounding=function(c,u){return y(u.start)>y(c.start)&&y(u.end)<y(c.end)},u.isOverlapping=function(c,u){return y(c.start)>=y(u.start)&&y(c.start)<=y(u.end)||y(c.end)>=y(u.start)&&y(c.end)<=y(u.end)},u.isFullyIncluded=b,u.isInTimeRanges=S,u.getBufferedRanges=function(c){var u=[],d=null==c?void 0:c.buffered;if(d)for(var p=0;p<d.length;p++)u.push({start:d.start(p),end:d.end(p)});return u},u.convertRangeToTimeMode=function(c,u,d){var p,f=(0,g.toSeconds)(null!=(p=null==u?void 0:u.getTime())?p:0);return d===h.TimeMode.RelativeTime&&(f=-f),{start:c.start+f,end:c.end+f}};var h=d(20213),f=d(44468),m=d(76399),g=d(89927),v=function(){function c(c,u,d){this.start=c,this.end=u,this.hits=d||1}return c.prototype.getHits=function(){return this.hits},c.prototype.getStart=function(){return this.start},c.prototype.getEnd=function(){return this.end},c.prototype.MD=function(u){for(var d=[],p=0;p<u.length;p++){var h=u[p],f=h.start,m=h.end,g=h.hits,v=this.start<f&&this.end>m,y=this.start<f&&this.end>f&&this.end<m,b=this.start>f&&this.start<m&&this.end>m,S=this.start>f&&this.end<m,_=this.start===f&&this.end<m,E=this.start===f&&this.end>m,T=this.start<f&&this.end===m,w=this.start>f&&this.end===m,P=this.start===f&&this.end===m;v||E||T||P?d.push(new c(f,m,g+1)):y||_?(d.push(new c(f,this.end,g+1)),d.push(new c(this.end,m,g))):b||w?(d.push(new c(f,this.start,g)),d.push(new c(this.start,m,g+1))):S?(d.push(new c(f,this.start,g)),d.push(new c(this.start,this.end,g+1)),d.push(new c(this.end,m,g))):d.push(new c(f,m,g))}return d},c.prototype.ND=function(u){for(var d=0;d<u.length&&!(this.end-this.start<=0);d++){var p=u[d],h=null;d+1<u.length&&(h=u[d+1]),this.start<p.start?(u.unshift(new c(this.start,Math.min(p.start,this.end))),d++,this.start=p.end):h&&h.start>this.start?(u.splice(d,0,new c(Math.max(p.end,this.start),Math.min(this.end,h.start))),this.start=h.end,d++):null===h&&this.end>p.end&&(u.push(new c(Math.max(p.end,this.start),this.end)),this.start=this.end)}return u},c.prototype.intersect=function(c){if(0===c.length)return[this];var u=this.MD(c);return this.ND(u)},c}();function y(c){return void 0===c||isNaN(c)?0:Math.round(100*c)/100}function b(c,u){return y(u.start)<=y(c.start)&&y(u.end)>=y(c.end)}function S(c,u,d){void 0===d&&(d=0);for(var p=0;p<c.length;p++){var h=c[p],f=Math.min(Math.round(1e3*h.start)/1e3,h.start),m=Math.max(Math.round(1e3*h.end)/1e3,h.end);if(u>=f&&u<=m-d)return!0}return!1}u.MultiRange=v,u.BufferRangeHelper=function(){function c(){}return c.mergeRanges=function(c,u,d){if(void 0===u&&(u=0),void 0===d&&(d=!0),c.length<1)return c;c.sort(function(c,u){return c.start-u.start});var h=[];h.push(d?p({},c[0]):c[0]);for(var f=1;f<c.length;f++){var m=h.slice(-1)[0],g=c[f];if(!b(g,m)){var v=m.end>=g.start-u,y=m.end<=g.end+u;v&&y?h[h.length-1].end=g.end:h.push(d?p({},g):g)}}return h},c.excludeTimeRange=function(c,u){return c.filter(function(c){return!b(c,u)}).reduce(function(c,d){var h,f,m=(h=u.start)>d.start&&h<=d.end,g=(f=u.end)<d.end&&f>=d.start;return m&&c.push(p(p({},d),{end:u.start})),g&&c.push(p(p({},d),{start:u.end})),m||g||c.push(p({},d)),c},[])},c.getRangesFromQueue=function(u,d){void 0===d&&(d=0);for(var p=[],h=Array.isArray(u)?new m.ArrayIterator(u):u;h.hasNext();){var f=h.next();if(!f.isInit()){var g={start:f.getPlaybackTime()||0,end:0};g.end=g.start+f.getDuration(),p.push(g)}}return c.mergeRanges(p,d,!1)},c.getMultiRanges=function(c){var u=[],d=0;for(var p in c)if(c.hasOwnProperty(p)){d++;for(var h=c[p],f=0;f<h.length;f++)u=new v(h[f].start,h[f].end).intersect(u)}return[u,d]},c.findGapsInRanges=function(c){for(var u=[],d=0;d<c.length-1;d++)c[d+1].start-c[d].end>0&&u.push({start:c[d].end,end:c[d+1].start});return u},c.getCommonBufferedRanges=function(u){var d=[],p=c.getMultiRanges(u),h=p[0],f=p[1];for(var m in h)h.hasOwnProperty(m)&&h[m].getHits()===f&&d.push(h[m]);return d},c.getCommonBufferedTime=function(u,d,p,h){for(var f=-1,m=c.getCommonBufferedRanges(d),g=0;g<m.length;
13g++)if(m[g].getStart()<=p&&m[g].getEnd()>=p)return p;for(var v in d)if(d.hasOwnProperty(v)){if(d[v].length<1)return null;var y=d[v];for(g=0;g<y.length&&!(y[g].start>=f&&(f=y[g].start,y[g].start>=p));g++);}return -1===f?null:f<p&&p-f<h?p:(u.debug("common time diff [s]",p-f),f)},c.isInBufferedRange=function(c,u){var d=Object.keys(c);return!!d.length&&d.every(function(d){return S(c[d],u)})},c.getTotalCommonBufferLength=function(c){return this.getCommonBufferedRanges(c).reduce(function(c,u){return c+u.getEnd()-u.getStart()},0)},c.getBufferLevel=function(c,u,d){if(!c||!c.length)return 0;var p=0;return d===f.BufferType.ForwardDuration?p=c[c.length-1].end-u:d===f.BufferType.BackwardDuration&&(p=u-c[0].start),Math.max(p,0)},c}()},17564:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.BufferSettings=void 0;var p=d(44468),h=d(85434);u.BufferSettings=function(){function c(c,u){this.logger=u,this.tbb=JSON.parse(JSON.stringify(c)),this.ubb={},this.wbb(this.ubb,this.tbb),this.vbb={currentDistanceToLiveEdge:1/0,minimumBufferLength:1,streamDuration:1/0}}return c.prototype.wbb=function(c,u){Object.keys(u).forEach(function(u){c[u]={}})},c.prototype.setTargetLevel=function(c,u,d){"number"==typeof u&&(this.tbb[d][c]=u)},c.prototype.xbb=function(c,u,d){this.ubb[d][c]=u},c.prototype.setTargetBufferLevelConstraints=function(c){this.vbb=c},c.prototype.setDistanceToLiveEdge=function(c){this.vbb.currentDistanceToLiveEdge=c},c.prototype.getTargetLevel=function(c,u){var d,h,f,m,g=null!=(h=null==(d=this.tbb[u])?void 0:d[c])?h:1/0,v=null!=(m=null==(f=this.ubb[u])?void 0:f[c])?m:1/0,y=this.vbb.minimumBufferLength,b=this.vbb.streamDuration;return Math.max(Math.min(g,v,c===p.BufferType.BackwardDuration?1/0:this.vbb.currentDistanceToLiveEdge,b),y)},c.prototype.getForwardTargetLevel=function(c){return void 0===c&&(c=p.MediaType.Video),this.getTargetLevel(p.BufferType.ForwardDuration,c)},c.prototype.getBackwardTargetLevel=function(c){return void 0===c&&(c=p.MediaType.Video),this.getTargetLevel(p.BufferType.BackwardDuration,c)},c.prototype.ybb=function(c){var u,d=h.MimeTypeHelper.isAudio(c)?p.MediaType.Audio:p.MediaType.Video;return(u={})[p.BufferType.BackwardDuration]=this.getBackwardTargetLevel(d),u[p.BufferType.ForwardDuration]=this.getForwardTargetLevel(d),u},c.prototype.zbb=function(c,u,d){var h,f=d/2,m=d/2,g=this.ybb(c),v=g[p.BufferType.BackwardDuration],y=g[p.BufferType.ForwardDuration],b=y/(y+v);if(!isFinite(v)&&isFinite(y)?(f=u,m=d-u):isFinite(v)&&!isFinite(y)?(f=d-u,m=u):isFinite(v)&&isFinite(y)&&(f=d*b,m=d*(1-b)),d>=2*u&&f<u){var S=u-f;f+=S,m-=S}return(h={})[p.BufferType.BackwardDuration]=m,h[p.BufferType.ForwardDuration]=f,h},c.prototype.adjustMaxBufferLevels=function(c,u,d){var h=this.zbb(u,c,d-c),f=h[p.BufferType.BackwardDuration],m=h[p.BufferType.ForwardDuration];this.logger.debug("Setting new target buffer levels to ".concat(m," (forward) and ").concat(f," (backward)")),this.xbb(p.BufferType.ForwardDuration,m,p.MediaType.Audio),this.xbb(p.BufferType.ForwardDuration,m,p.MediaType.Video),this.xbb(p.BufferType.BackwardDuration,f,p.MediaType.Audio),this.xbb(p.BufferType.BackwardDuration,f,p.MediaType.Video)},c}()},66790:function(c,u){var d,p,h,f,m,g,v,y,b,S,_,E;Object.defineProperty(u,"__esModule",{value:!0}),u.DrmSetupError=u.TransmuxingRejectionReason=u.SegmentVerificationResult=u.APPLE_KEYFORMAT_DELIVERY=u.HlsEncryptionMethods=u.HlsEncryptionMethod=u.SOURCE_BUFFER_APPEND_STATUS=u.RepresentationType=void 0,(v=d||(u.RepresentationType=d={}))[v.AUDIO=1]="AUDIO",v[v.VIDEO=2]="VIDEO",v[v.SUBTITLE=3]="SUBTITLE",(y=p||(u.SOURCE_BUFFER_APPEND_STATUS=p={}))[y.FAILURE=0]="FAILURE",y[y.QUOTA_EXCEEDED=1]="QUOTA_EXCEEDED",y[y.SUSPENDED=2]="SUSPENDED",(b=h||(u.HlsEncryptionMethod=h={})).NONE="NONE",b.AES_128="AES-128",b.SAMPLE_AES="SAMPLE-AES",b.SAMPLE_AES_CTR="SAMPLE-AES-CTR",u.HlsEncryptionMethods=Object.keys(h).map(function(c){return h[c]}),u.APPLE_KEYFORMAT_DELIVERY="com.apple.streamingkeydelivery",(S=f||(u.SegmentVerificationResult=f={})).Publish="publish",S.Drop="drop",S.Park="park",(_=m||(u.TransmuxingRejectionReason=m={})).INVALID_TS_SEGMENT="Invalid TS segment, could not extract segment information",_.TRANSMUXING_ABORTED="Transmuxing was aborted as it is no longer needed",(E=g||(u.DrmSetupError=g={})).CANCELLED="Loading was cancelled for the DRM source",E.MISSING_CONFIGURATION="DRM is not configured"}
vendor: 7,211 bytes, line 13
13,56481:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.dispose=function(c){c&&c.dispose()}},86969:function(c,u,d){var p=this&&this.__createBinding||(Object.create?function(c,u,d,p){void 0===p&&(p=d);var h=Object.getOwnPropertyDescriptor(u,d);h&&!("get"in h?!u.__esModule:h.writable||h.configurable)||(h={enumerable:!0,get:function(){return u[d]}}),Object.defineProperty(c,p,h)}:function(c,u,d,p){void 0===p&&(p=d),c[p]=u[d]}),h=this&&this.__exportStar||function(c,u){for(var d in c)"default"===d||Object.prototype.hasOwnProperty.call(u,d)||p(u,c,d)};Object.defineProperty(u,"__esModule",{value:!0}),u.util=u.Player=void 0;var f=d(43662);Object.defineProperty(u,"Player",{enumerable:!0,get:function(){return f.Player}}),h(d(20213),u),u.util=d(64681),u.default=f.Player},45202:function(c,u){function d(c){return c.hasAttribute("src")&&null!=c.src}Object.defineProperty(u,"__esModule",{value:!0}),u.Environment=void 0,u.Environment=function(){function c(){}return Object.defineProperty(c,"hostname",{get:function(){return this._hostname||(this._hostname=location.hostname),this._hostname},set:function(c){this._hostname=c},enumerable:!1,configurable:!0}),Object.defineProperty(c,"baseUrl",{get:function(){return c.getURL()},enumerable:!1,configurable:!0}),c.checkDomainLock=function(){if(0===this.domains.length||"localhost"===this.hostname)return!0;for(var c=0,u=this.domains.split(",");c<u.length;c++){var d=u[c],p=d.substring(2),h=this.hostname.length-p.length,f=this.hostname.indexOf(p),m=-1!==f&&f===h,g=d.startsWith("*.")&&m;if(d===this.hostname||g)return!0}return!1},c.getURL=function(){var c=this.getCurrentScriptURL();return c.lastIndexOf("/")>-1?c.substring(0,c.lastIndexOf("/")+1):""},c.generateExceptionStack=function(){try{omgwtfnodocumentdotcurrentscript}catch(c){return c.stack}},c.getCurrentScriptFallback=function(){var c=this.generateExceptionStack();if(!c)return"";for(var u=-1!==c.indexOf(" at ")?" at ":"@";-1!==c.indexOf(u);)c=c.substring(c.indexOf(u)+u.length);var d=c.lastIndexOf(":",c.lastIndexOf(":")-1);return c.substring(c.indexOf("(")+1,d)},c.getCurrentScriptURL=function(){var c,u;if(null!=(c=window.document)&&c.currentScript){var p=window.document.currentScript.src;return p.indexOf("modules/bitmovinplayer-core.js")>-1?p.substring(0,p.lastIndexOf("modules/bitmovinplayer-core.js")):p}for(var h=(null==(u=window.document)?void 0:u.getElementsByTagName("script"))||[],f=h.length,m=0;m<f;m++)if(d(h[m])){if(h[m].src.indexOf("bitmovinplayer.js")>-1)return h[m].src;if(h[m].src.indexOf("modules/bitmovinplayer-core.js")>-1)return h[m].src.substring(0,h[m].src.indexOf("modules/bitmovinplayer-core.js"))}return this.getCurrentScriptFallback()||(h.length>0&&d(h[f-1])?h[f-1].src:"")},c.VERSION_NUMBER="8.259.0",c.idPrefix="bitmovinplayer-",c.domains="",c.modules={playerui:null},c}()},3714:function(c,u){var d,p,h,f,m,g,v,y,b,S,_;Object.defineProperty(u,"__esModule",{value:!0}),u.ContentLocationChangedReason=u.LatencyMode=u.AdInteractionType=u.AdQuartile=u.MetadataType=u.PlayerEvent=void 0,(v=d||(u.PlayerEvent=d={})).Ready="ready",v.Play="play",v.Playing="playing",v.Paused="paused",v.Seek="seek",v.Seeked="seeked",v.TimeShift="timeshift",v.TimeShifted="timeshifted",v.VolumeChanged="volumechanged",v.Muted="muted",v.Unmuted="unmuted",v.PlayerResized="playerresized",v.PlaybackFinished="playbackfinished",v.Error="error",v.Warning="warning",v.StallStarted="stallstarted",v.StallEnded="stallended",v.AudioChanged="audiochanged",v.AudioAdded="audioadded",v.AudioRemoved="audioremoved",v.VideoQualityChanged="videoqualitychanged",v.AudioQualityChanged="audioqualitychanged",v.VideoDownloadQualityChange="videodownloadqualitychange",v.AudioDownloadQualityChange="audiodownloadqualitychange",v.VideoDownloadQualityChanged="videodownloadqualitychanged",v.AudioDownloadQualityChanged="audiodownloadqualitychanged",v.VideoPlaybackQualityChanged="videoplaybackqualitychanged",v.AudioPlaybackQualityChanged="audioplaybackqualitychanged",v.TimeChanged="timechanged",v.CueParsed="cueparsed",v.CueEnter="cueenter",v.CueUpdate="cueupdate",v.CueExit="cueexit",v.SegmentPlayback="segmentplayback",v.Metadata="metadata",v.MetadataParsed="metadataparsed",v.MetadataChanged="metadatachanged",v.VideoAdaptation="videoadaptation",v.AudioAdaptation="audioadaptation",v.DownloadFinished="downloadfinished",v.SegmentRequestFinished="segmentrequestfinished",v.AdManifestLoaded="admanifestloaded",v.AdStarted="adstarted",v.OverlayAdStarted="overlayadstarted",v.AdQuartile="adquartile",v.AdSkipped="adskipped",v.AdClicked="adclicked",v.AdInteraction="adinteraction",v.AdLinearityChanged="adlinearitychanged",v.AdBreakStarted="adbreakstarted",v.AdBreakFinished="adbreakfinished",v.RestoringContent="restoringcontent",v.AdFinished="adfinished",v.AdError="aderror",v.VRViewingDirectionChange="vrviewingdirectionchange",v.VRViewingDirectionChanged="vrviewingdirectionchanged",v.VRStereoChanged="vrstereochanged",v.CastAvailable="castavailable",v.CastStopped="caststopped",v.CastStart="caststart",v.CastStarted="caststarted",v.CastWaitingForDevice="castwaitingfordevice",v.SourceLoaded="sourceloaded",v.SourceUnloaded="sourceunloaded",v.PeriodSwitch="periodswitch",v.PeriodSwitched="periodswitched",v.DVRWindowExceeded="dvrwindowexceeded",v.SubtitleAdded="subtitleadded",v.SubtitleRemoved="subtitleremoved",v.ShowAirplayTargetPicker="showairplaytargetpicker",v.AirplayAvailable="airplayavailable",v.AirplayChanged="airplaychanged",v.Destroy="destroy",v.PlaybackSpeedChanged="playbackspeedchanged",v.DurationChanged="durationchanged",v.ViewModeChanged="viewmodechanged",v.ModuleReady="moduleready",v.SubtitleEnable="subtitleenable",v.SubtitleEnabled="subtitleenabled",v.SubtitleDisable="subtitledisable",v.SubtitleDisabled="subtitledisabled",v.VideoQualityAdded="videoqualityadded",v.VideoQualityRemoved="videoqualityremoved",v.AudioQualityAdded="audioqualityadded",v.AudioQualityRemoved="audioqualityremoved",v.TargetLatencyChanged="targetlatencychanged",v.LatencyModeChanged="latencymodechanged",v.LicenseValidated="licensevalidated",v.DrmLicenseAdded="drmlicenseadded",v.AspectRatioChanged="aspectratiochanged",v.VisibilityChanged="visibilitychanged",v.ContentLocationChanged="contentlocationchanged",(y=p||(u.MetadataType=p={})).CUETAG="CUETAG",y.DATERANGE="DATERANGE",y.EVENT_STREAM="EVENT-STREAM",y.CUSTOM="CUSTOM",y.SCTE="SCTE",y.ID3="ID3",y.EMSG="EMSG",y.CAST="CAST",(b=h||(u.AdQuartile=h={})).FIRST_QUARTILE="firstQuartile",b.MIDPOINT="midpoint",b.THIRD_QUARTILE="thirdQuartile",(f||(u.AdInteractionType=f={})).Vpaid="vpaid",(S=m||(u.LatencyMode=m={})).Idle="idle",S.Catchup="catchup",S.Fallback="fallback",S.Suspended="suspended",(_=g||(u.ContentLocationChangedReason=g={})).Failover="failover",_.ContentSteering="contentsteering"},20213:function(c,u,d){var p=this&&this.__createBinding||(Object.create?function(c,u,d,p){void 0===p&&(p=d);var h=Object.getOwnPropertyDescriptor(u,d);h&&!("get"in h?!u.__esModule:h.writable||h.configurable)||(h={enumerable:!0,get:function(){return u[d]}}),Object.defineProperty(c,p,h)}:function(c,u,d,p){void 0===p&&(p=d),c[p]=u[d]}),h=this&&this.__exportStar||function(c,u){for(var d in c)"default"===d||Object.prototype.hasOwnProperty.call(u,d)||p(u,c,d)};
13Object.defineProperty(u,"__esModule",{value:!0}),u.util=void 0,h(d(3714),u),u.util=d(29960),h(d(62756),u),h(d(44468),u),h(d(21281),u),h(d(3336),u),h(d(40306),u),h(d(4224),u),h(d(25926),u),h(d(95880),u),h(d(22374),u),h(d(29669),u)},88210:function(c,u){var d=this&&this.__assign||function(){return(d=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.EnumerableValue=function(c,u){return u.addInitializer(function(){var c=Object.getOwnPropertyDescriptor(this,u.name)||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),u.name);c&&Object.defineProperty(this,u.name,d(d({},c),{enumerable:!0}))}),c}},29691:function(c,u,d){var p,h,f,m,g,v,y,b=this&&this.__assign||function(){return(b=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},S=this&&this.__runInitializers||function(c,u,d){for(var p=arguments.length>2,h=0;h<u.length;h++)d=p?u[h].call(c,d):u[h].call(c);return p?d:void 0},_=this&&this.__esDecorate||function(c,u,d,p,h,f){function m(c){if(void 0!==c&&"function"!=typeof c)throw TypeError("Function expected");return c}for(var g,v=p.kind,y="getter"===v?"get":"setter"===v?"set":"value",b=!u&&c?p.static?c:c.prototype:null,S=u||(b?Object.getOwnPropertyDescriptor(b,p.name):{}),_=!1,E=d.length-1;E>=0;E--){var T={};for(var w in p)T[w]="access"===w?{}:p[w];for(var w in p.access)T.access[w]=p.access[w];T.addInitializer=function(c){if(_)throw TypeError("Cannot add initializers after decoration has completed");f.push(m(c||null))};var P=(0,d[E])("accessor"===v?{get:S.get,set:S.set}:S[y],T);if("accessor"===v){if(void 0===P)continue;if(null===P||"object"!=typeof P)throw TypeError("Object expected");(g=m(P.get))&&(S.get=g),(g=m(P.set))&&(S.set=g),(g=m(P.init))&&h.unshift(g)}else(g=m(P))&&("field"===v?h.unshift(g):S[y]=g)}b&&Object.defineProperty(b,p.name,S),_=!0},E=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.InternalPlayer=u.LOAD_CANCELLED_BY_DESTROY_MESSAGE=u.LOAD_CANCELLED_MESSAGE=void 0;var T,w,P=d(88052),A=d(62756),I=d(90571),M=d(78760),R=d(40306),k=d(3336),x=d(25926),C=d(4224),O=d(48143),D=d(80813),L=d(56481),N=d(45202),U=d(3714),F=d(51289),B=d(75375),j=d(89279),H=d(96859),V=d(13531),z=d(50172),q=d(69957),W=d(44468),G=d(72786),K=d(53031),Y=d(29242),X=d(52546),Q=d(83913),Z=d(70962),J=d(69251),$=d(93907),ee=d(23145),et=d(91565),ei=d(7387),en=d(98714),er=d(23690),eo=d(87827),ea=d(85648),es=d(68925),el=d(63879),ec=d(69573),eu=d(15971),ed=d(30012),ep=d(21513),eh=d(61089),ef=d(93204),em=d(47993),eg=d(34841),ev=d(85434),ey=d(15487),eb=d(28334),eS=d(72537),e_=d(89927),eE=d(88844),eT=d(23068),ew=d(70850),eP=d(2079);(p=T||(T={}))[p.NONE=0]="NONE",p[p.MUTED_PLAY=1]="MUTED_PLAY",p[p.UNMUTED_PLAY=2]="UNMUTED_PLAY",(h=w||(w={})).DROPPED_VIDEO_FRAMES="droppedVideoFrames",h.TOTAL_STALLED_TIME="totalStalledTime",u.LOAD_CANCELLED_MESSAGE="Load call was cancelled by another load or unload call",u.LOAD_CANCELLED_BY_DESTROY_MESSAGE="Load was cancelled as the player is being destroyed";var eA=(v=[],f=function(){function c(c,u,d){var p=this;if(this.sz=S(this,v),this.xz=null,this.yz=null,this.Gz=Promise.resolve(),this.bA=["aHR0cHM6Ly9saWNlbnNpbmcuYml0bW92aW4uY29tL2xpY2Vuc2luZw==","aHR0cHM6Ly9zdHJlYW1pbmcubXBlZy1kYXNoLmNvbS9hY2Nlc3M=","aHR0cHM6Ly9saWNlbnNpbmcucGFuZG9yYXN0cmVhbWluZy5jb20vbGljZW5zaW5n","aHR0cHM6Ly9iaXRtb3Zpbi5zdGEuc2N0di5jaC9saWNlbnNpbmc="].map(function(c){return atob(c)}),this.cA=["aHR0cHM6Ly9saWNlbnNpbmcuYml0bW92aW4uY29tL2ltcHJlc3Npb24=","aHR0cHM6Ly9zdHJlYW1pbmcubXBlZy1kYXNoLmNvbS9wbGF5YmFjaw==","aHR0cHM6Ly9saWNlbnNpbmcucGFuZG9yYXN0cmVhbWluZy5jb20vaW1wcmVzc2lvbg==","aHR0cHM6Ly9iaXRtb3Zpbi5zdGEuc2N0di5jaC9pbXByZXNzaW9u"].map(function(c){return atob(c)}),this.dA=Promise.resolve(),this.eA=Promise.resolve(),this.HA=function(c){var u,d,h,f;if(void 0===c&&(c="api"),null==(d=null==(u=p.wz)?void 0:u.bitdashPlayer)?void 0:d.unload){var m=Promise.resolve();eC(c)||(m=p.JB(),p.GC(),p.JA()),null==(f=null==(h=p.wz)?void 0:h.eventHandler)||f.clearEventsOfType(U.PlayerEvent.TimeChanged),p.gA=!1,p.manifestApi=void 0,p.wz.context&&ex(p.wz.context),p.Gz=p.Gz.then(function(){return m}).then(function(){var u,d;return null==(d=null==(u=p.wz)?void 0:u.bitdashPlayer)?void 0:d.unload(c).then(function(){var u;return null==(u=p.sz)?void 0:u.serviceManager.maybeCall(D.ServiceName.DrmService,function(u){return u.shutdownIfNeeded(eC(c))})}).then(function(){var u,d,h,f,m;p.aA&&(null==(u=p.aA)||u.removePosterImage(),null==(d=p.aA)||d.stopVisibilityTracking()),null!=(f=null==(h=p.wz)?void 0:h.context)&&f.sourceContext&&(eC(c)?p.wz.context.sourceContext.
13isAd&&p.IA():null==(m=p.sz)||m.serviceManager.removeNonPlayerScopeServices(),p.wz.context.sourceContext.dispose())})})}return p.Gz},this.setAudio=function(c){var u;p.wA()&&(null==(u=p.wz.bitdashPlayer)||u.setAudio(c))},this.zB=function(c){return void 0===c&&(c=p.getSource()),!!c&&!!c.vr&&(0,ep.getCapabilities)().isIOS},this.YB=function(c,u,d){if(void 0===d&&(d={}),c)p.fireEvent(U.PlayerEvent.LicenseValidated,{data:d});else{p.Lz=!1,p.Oz=p.XB(u);var h=function(){(0,eE.clearTimeoutIfDefined)(f),p.off(U.PlayerEvent.SourceLoaded,h),p.off(U.PlayerEvent.SourceUnloaded,h),p.Iz&&p.Iz.fireError(p.Oz)},f=window.setTimeout(h,500);p.on(U.PlayerEvent.SourceLoaded,h),p.on(U.PlayerEvent.SourceUnloaded,h),p.unload()}},this.aB=function(){var c,u,d;(null==(d=null==(u=null==(c=p.wz)?void 0:c.videoElement)?void 0:u.style)?void 0:d.getPropertyValue("display"))!=="none"||p.wz.vrHandler||p.wz.videoElement.style.setProperty("display","block","important")},this.bB=function(){p.wz&&p.wz.videoElement&&p.wz.videoElement.style&&p.wz.videoElement.style.setProperty("display","none","important")},this.xC=function(){var c=p.wz.configuration.playback().subtitleLanguage;return c?p.cB(c,p.listSubtitles(),function(c){return p.enableSubtitle(c,!0,!1)}):Promise.resolve()},this.yC=function(){var c=p.wz.configuration.playback().audioLanguage;return c?p.cB(c,p.getAvailableAudio(),p.setAudio):Promise.resolve()},this.DC=function(){var c;if(!(null!=(c=p.sz.sourceContext)&&c.isAd)&&(p.HA(),p.tz)){var u=p.tz.getElementsByClassName(N.Environment.idPrefix+"poster")[0];u&&(u.style.display="block")}},this.FC=function(){if(p.Cz){p.Az.tweaks().hasOwnProperty("impressionServer")&&(p.cA.indexOf(p.Az.tweaks().impressionServer)>-1?p.Cz.setImpressionServerUrl(p.Az.tweaks().impressionServer):p.vz.warn("Invalid impression server",new k.PlayerError(R.ErrorCode.SETUP_INVALID_IMPRESSION_SERVER,{"impression-server":p.Az.tweaks().impressionServer})));var c=p.Az.get("network");p.Cz.issue(p.getConfig().key,p.getPlayerType(),null==c?void 0:c.requestApi).then(function(){},function(){})}},this.JC=function(c,u){if(p.isCastingToCAF()&&u.connectionState===ea.ConnectionState.Disconnected&&p.yA()&&p.AA().isLinearAdActive()){var d=p.AA().playerAdvertisingApi;p.KC(d)}},this.LC=function(){var c,u=eD(p.sz);null!=(c=p.AA())&&c.isLinearAdActive()||p.sz.sourceContext.isAd?p.fireEvent(U.PlayerEvent.PlaybackFinished):p.hA||p.jA||setTimeout(function(){p.jA=Promise.resolve().then(function(){var c,u;return null!=(u=null==(c=p.AA())?void 0:c.playPostRollAds())?u:Promise.resolve()}).then(function(){var c;return null!=(c=null==u?void 0:u.playPostRollAds())?c:Promise.resolve()}).then(function(){p.jA=null,p.MC()})})},this.MC=function(){p.Cz&&p.Cz.reset(),p.hA=!0,p.fireEvent(U.PlayerEvent.PlaybackFinished)},this.NC=function(){!(p.yA()&&p.getAds()&&p.getAds().isLinearAdActive())&&p.hA&&(p.hA=!1),p.Nz=p.OC(p.Nz)},Object.keys((0,ep.getCapabilities)()).length||(0,ep.default)().dispatch((0,et.initializeCapabilities)()),this.tz=c,this.id=u,this.uz=d,this.gA=!1,this.vz=new V.Logger(Z.DefaultSettings),this.zz=new eS.StorageHandler((0,ep.getCapabilities)().isLocalStorageAvailable),this.Az=null,this.Bz=0/0,this.Fz=new Y.PlayerFactory,this.Iz=new F.EventHandler(this.vz,this.uz,this.id),this.Mz=T.NONE,P.ModuleManager.has(A.ModuleName.DRM)){var h=P.ModuleManager.get(A.ModuleName.DRM).DRMDetectorService;this.Jz=new h,this.drmApi=P.ModuleManager.get(A.ModuleName.DRM).createDrmApi(function(){var c;return null==(c=p.sz)?void 0:c.serviceManager},this.vz)}this.lA=!1,this.EC()}return c.prototype.tA=function(){return this.sz&&this.sz.store&&(0,eo.isBeingDestroyed)(this.sz.store.getState().player)||!1},c.prototype.uA=function(){return this.sz&&this.sz.store&&(0,eo.isDestroyed)(this.sz.store.getState().player)||!1},c.prototype.vA=function(){return!!(this.wz&&this.wz.bitdashPlayer)&&!this.uA()},c.prototype.wA=function(){return this.xA()&&this.gA},c.prototype.xA=function(){return this.vA()&&!!this.wz&&!!this.wz.bitdashPlayer},c.prototype.yA=function(){return!!(this.wz&&this.wz.adController)},c.prototype.zA=function(){P.ModuleManager.get(A.ModuleName.Advert
13ising);var c=P.ModuleManager.get(A.ModuleName.AdvertisingCore);this.wz.adController=new c.AdvertisingController(this,this.wz.context),this.Iz&&this.Iz.dispatchEvent(U.PlayerEvent.ModuleReady,{name:A.ModuleName.Advertising})},c.prototype.AA=function(){return this.yA()?this.wz.adController:null},c.prototype.BA=function(){if(!this.vA()||!(null!=(c=this.wz)&&c.vrHandler))return!1;var c,u=this.wz.vrHandler.getState();return!!u&&"error"!==u},c.prototype.CA=function(c,u){var d;if(!c||!u)return null;if(u.streaming===W.StreamType.Dash)d=c.dash;else if(u.streaming===W.StreamType.Hls)d=c.hls;else if(u.streaming===W.StreamType.Progressive)d=c.progressive;else if(u.streaming===W.StreamType.Smooth)d=c.smooth;else{if(u.streaming!==W.StreamType.Whep)return null;d=c.whep}return d?{type:u.streaming,url:d,title:c.title,description:c.description,vr:c.vr,config:c}:null},c.prototype.DA=function(){var c=new O.ServiceManager;return new K.PlayerContext({container:this.tz,eventHandler:this.wz.eventHandler,config:this.wz.configuration.get(),storedConfig:this.zz,settings:this.wz.configuration.getSettings(),logger:this.vz,serviceManager:c,internalPlayer:this,segmentInfoService:this.mA,
13segmentPrefetchingService:this.nA,segmentCacheService:this.oA,adRestorationOptimizationService:this.pA})},c.prototype.EA=function(c,u){var d=this;if(!this.wz)return Promise.resolve();var p=this.wz.configuration;p.logs&&p.logs().level&&this.setLogLevel(p.logs().level),this.vz.setConfig(p);var h=this.Kz;this.wz.videoElement&&(null!=h||(h=this.wz.videoElement.getWrappedElement()),this.wz.videoElement.dispose()),this.sz.setVideoElement(h??document.createElement("video"));var f={context:this.sz,playerInstance:this.wz,container:this.tz,config:p,source:c,forceTech:u,styleManager:this.aA};return this.FA(),this.Fz.getInstance(f).then(function(c){var u,p,h;return d.uA()?null==(u=c.bitdashPlayer)?void 0:u.release().then(function(){c.videoElement&&c.videoElement.dispose(),c.bitdashPlayer=null,c.technology=null,c.videoElement=null}):(d.wz.context=c.context,d.wz.logger=c.logger,d.wz.bitdashPlayer=c.bitdashPlayer,d.wz.technology=c.technology,d.wz.videoElement=c.videoElement,d.wz.hasInitStarted=!0,d.wz.playerConfig.visibility="visible",d.GA(d.wz.context),!d.Pz&&d.tz&&(d.Pz=new eP.ViewModeHandler(d.wz,d.tz,null!=(h=null==(p=d.Iz)?void 0:p.getEventFunction())?h:function(){},d.zB)),d.dB(),Promise.resolve())})},c.prototype.FA=function(){this.rA&&this.rA(),this.sA&&this.sA(),this.rA=(0,ef.subscribe)(this.sz.store)(function(c){return(0,eo.getIsStopped)((0,eo.getPlayerState)(c))},this.LC,function(c){return!0===c}),this.sA=(0,ef.subscribe)(this.sz.store)(function(c){return(0,eo.getRemoteControlState)((0,eo.getPlayerState)(c))},this.JC,function(){return!0})},c.prototype.GA=function(c){this.yA()&&this.AA().updatePlayerContext(c),c.segmentInfoService&&c.segmentInfoService.updatePlayerContext(c),c.segmentPrefetchingService&&c.segmentPrefetchingService.updatePlayerContext(c),c.segmentCacheService&&c.segmentCacheService.updatePlayerContext(c),c.adRestorationOptimizationService&&c.adRestorationOptimizationService.updatePlayerContext(c)},c.prototype.setVideoQuality=function(c){var u;this.wA()&&(c=String(c)||"auto",null==(u=this.wz.bitdashPlayer)||u.setVideoQuality(c))},c.prototype.setAudioQuality=function(c){var u;this.wA()&&(c=String(c)||"auto",null==(u=this.wz.bitdashPlayer)||u.setAudioQuality(c))},c.prototype.IA=function(){this.wz.context.serviceManager.delete(D.ServiceName.SourceStoreService,this.wz.context.sourceContext.sourceIdentifier)},c.prototype.JA=function(){var c,u,d,p,h,f;null==(u=null==(c=this.wz.context)?void 0:c.adRestorationOptimizationService)||u.reset(),null==(p=null==(d=this.wz.context)?void 0:d.segmentPrefetchingService)||p.reset(),null==(f=null==(h=this.sz)?void 0:h.serviceManager)||f.maybeCall(D.ServiceName.ManifestCachingService,function(c){return c.clear()})},c.prototype.unload=function(c){var u,d,p,h,f=this;return void 0===c&&(c="api"),this.fA=null,eC(c)&&(this.Hz=void 0),eC(c)?(this.HC(w.DROPPED_VIDEO_FRAMES,null!=(d=null==(u=this.wz.bitdashPlayer)?void 0:u.getDroppedVideoFrames())?d:0),this.HC(w.TOTAL_STALLED_TIME,null!=(h=null==(p=this.wz.bitdashPlayer)?void 0:p.getTotalStalledTime())?h:0)):(this.xz=null,this.yz=null),this.dA.finally(function(){return f.HA(c)})},c.prototype.isCasting=function(){var c;return!!(this.xA()&&eR(this.wz.bitdashPlayer)&&this.isCastAvailable())&&!!(null!=(c=this.wz.bitdashPlayer)&&c.isCasting())},c.prototype.castVideo=function(){var c;this.xA()&&eR(this.wz.bitdashPlayer)&&this.wz.bitdashPlayer.isCastAvailable()&&(null==(c=this.wz.bitdashPlayer)||c.castVideo())},c.prototype.isCastAvailable=function(){return this.xA()&&eR(this.wz.bitdashPlayer)&&this.wz.bitdashPlayer.isCastAvailable()},c.prototype.seek=function(c,u){if(void 0===u&&(u="api"),this.yA()&&this.AA().isLinearAdActive()||!this.wA())return!1;if(null!=(d=this.Hz)&&d.seeking&&ek(u))return null==(p=this.sz)||p.logger.debug("Seeking blocked by playback restrictions"),!1;var d,p,h,f,m,g=null==(h=this.wz.bitdashPlayer)?void 0:h.isLive(),v=this.getSeekableRange(),y=-1!==v.start||-1!==v.end;return!!(!g||g&&this.wz.settings.ENABLE_SEEK_FOR_LIVE)&&(this.KA()?(this.lA=!0,!!(null!=(f=this.wz.bitdashPlayer)&&f.seek(c,u))):!!y&&(this.lA=!0,c=this.LA(c,v),eC(u)||this.isLive()||(c=Math.min(c,v.end-this.wz.settings.SEEK_TO_END_OFFSET)),!!(null!=(m=this.wz.bitdashPlayer)&&m.seek(c,u))))},c.prototype.KA=function(){return this.getPlayerType().includes(W.PlayerType.
13Native)},c.prototype.addMetadata=function(c,u){var d;return!(!this.xA()||!eR(this.wz.bitdashPlayer))&&(null==(d=this.wz.bitdashPlayer)?void 0:d.addMetadata(c,u))},c.prototype.LA=function(c,u){if(c<u.start||c>u.end){var d=c;c=Math.min(c=Math.max(c,u.start),u.end),this.vz.debug("seek time out of seekable range ("+u.start+" to "+u.end+") correcting from "+d+" to "+c)}return c},c.prototype.isMuted=function(){var c;return this.xA()?!!(null!=(c=this.wz.bitdashPlayer)&&c.isMuted()):this.wz.muted},c.prototype.getAvailableAudio=function(){var c,u;return this.wA()&&null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getAvailableAudio())?u:[]},c.prototype.setAspectRatio=function(c){this.aA?this.aA.setAspectRatio(c):this.vz.debug("Unable to set aspect ratio: the style module is missing.")},c.prototype.MA=function(c){var u=this.listSubtitles().find(function(u){return u.id===c});u&&this.fireEvent(U.PlayerEvent.SubtitleEnabled,{subtitle:b({},u)})},c.prototype.NA=function(){var c=this;return Promise.all(this.listSubtitles().filter(function(c){return c.enabled}).map(function(u){return c.disableSubtitle(u.id,!1)}))},c.prototype.enableSubtitle=function(c,u,d){var p=this;void 0===u&&(u=!0),void 0===d&&(d=!0);var h=this.listSubtitles().find(function(u){return u.id===c});return this.wA()&&h&&!h.enabled?(d&&this.fireEvent(U.PlayerEvent.SubtitleEnable,{subtitle:b({},h)}),Promise.resolve().then(function(){return u?p.NA():Promise.all([!1])}).then(function(){var u;return!!(null!=(u=p.wz.bitdashPlayer)&&u.enableSubtitle(c))}).then(function(u){return u&&p.MA(c),u})):Promise.resolve(!1)},c.prototype.disableSubtitle=function(c,u){var d=this;if(void 0===u&&(u=!0),this.wA()){var p=this.listSubtitles().find(function(u){return u.id===c});if(p&&p.enabled)return u&&this.fireEvent(U.PlayerEvent.SubtitleDisable,{subtitle:b({},p)}),this.wz.bitdashPlayer?this.wz.bitdashPlayer.disableSubtitle(c).then(function(c){return c&&d.fireEvent(U.PlayerEvent.SubtitleDisabled,{subtitle:b(b({},p),{enabled:!1})}),c}):Promise.resolve(!1)}return Promise.resolve(!1)},c.prototype.preload=function(){var c,u;this.wA()&&!this.isLive()&&(this.lA||this.zC(this.wz.source,!!(null!=(c=this.wz.bitdashPlayer)&&c.isLive())),null==(u=this.wz.bitdashPlayer)||u.preload())},c.prototype.mute=function(c){var u;this.wz.muted=!0,this.xA()&&(this.yA()&&!this.isMuted()&&this.AA().onVolumeChanged(0),this.Ez=this.getVolume(),null==(u=this.wz.bitdashPlayer)||u.mute(c))},c.prototype.unmute=function(c){var u;if(this.wz.muted=!1,this.xA()){if(this.yA()&&this.isMuted()){var d=isNaN(this.Ez)?100:this.Ez;this.Ez=0/0,this.AA().onVolumeChanged(d)}null==(u=this.wz.bitdashPlayer)||u.unmute(c)}},c.prototype.listSubtitles=function(){var c,u;return this.wA()?E([],null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.listSubtitles().map(function(c){return b({},c)}))?u:[],!0):[]},c.prototype.getDuration=function(c){var u,d;return void 0===c&&(c="api"),this.xA()?!eC(c)&&this.WA()?this.AA().getDuration():this.wA()&&null!=(d=null==(u=this.wz.bitdashPlayer)?void 0:u.getDuration())?d:0:0},c.prototype.setVolume=function(c,u){var d;this.wz.volume=c,this.xA()&&(null==(d=this.wz.bitdashPlayer)||d.setVolume(c,u),this.yA()&&this.AA().onVolumeChanged(c))},c.prototype.timeShift=function(c,u){var d,p,h;null!=(d=this.Hz)&&d.seeking&&ek(u)?null==(p=this.sz)||p.logger.debug("Time shift blocked by playback restrictions"):this.wA()&&(c=this.OA(c),null==(h=this.wz.bitdashPlayer)||h.timeShift(c,u),this.lA=!0)},c.prototype.OA=function(c){if(c<=0)return c;var u,d=(0,e_.toSeconds)(Date.now());this.KA()||(d-=null==(u=this.bufferApi.getLevel(W.BufferType.ForwardDuration,W.MediaType.Video))?void 0:u.targetLevel);var p=Math.min(c-d,0);return this.vz.debug("Timeshifting to timestamp: ".concat(c,", converted relative offset is: ").concat(p)),p},c.prototype.setQueryParameters=function(c){var u;this.xA()&&(null==(u=this.wz.bitdashPlayer)||u.setQueryParameters(c))},c.prototype.clearQueryParameters=function(){var c;this.xA()&&(null==(c=this.wz.bitdashPlayer)||c.clearQueryParameters())},c.prototype.showAirplayTargetPicker=function(){var c;this.xA()&&(null==(c=this.wz.bitdashPlayer)||c.showAirplayTargetPicker())},c.prototype.getVolume=function(){var c,u;return this.xA()?null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getVolume())?u:0:this.wz.volume},c.prototype.getLatency=function(){var c,u;return this.wA()&&null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getLatency())?u:0},c.prototype.setTargetLatency=function(c){var u;this.wA()&&("number"!=typeof c||c<0?this.ZB("lowlatency.setLiveLatency","Invalid value: ".concat(c),"value","".concat(c)):null==(u=this.wz.bitdashPlayer)||u.setTargetLatency(c))},c.prototype.getTargetLatency=function(){var c,u;return this.wA()?null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getTargetLatency())?u:0:-1},c.prototype.setCatchupConfig=function(c){var u;this.wA()&&(null==(u=this.wz.bitdashPlayer)||u.setCatchupConfig(c))},c.prototype.getCatchupConfig=function(){var c,u;return this.wA()&&null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getCatchupConfig())?u:null},c.prototype.setFallbackConfig=function(c){var u;this.wA()&&(null==(u=this.wz.bitdashPlayer)||u.setFallbackConfig(c))},c.prototype.getFallbackConfig=function(){var c,u;return this.wA()&&null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getFallbackConfig())?u:null},c.prototype.getCurrentTime=function(c,u){var d,p;return void 0===c&&(c="api"),void 0===u&&(u=W.TimeMode.AbsoluteTime),this.WA()&&!eC(c)?this.AA().getCurrentTime():this.wA()&&null!=(p=null==(d=this.wz.bitdashPlayer)?void 0:d.getCurrentTime(u))?p:0},c.prototype.setTargetBufferLevel=function(c,u,d){var p;if(this.xA()){var h=Object.keys(W.BufferType).some(function(u){return c===W.BufferType[u]}),f=Object.keys(W.MediaType).some(function(c){return d===W.MediaType[c]});h?f?"number"!=typeof u||u<0?this.ZB("buffer.setTargetLevel","Invalid value: ".concat(u),"value","".concat(u)):null==(p=this.wz.bitdashPlayer)||p.setTargetBufferLevel(c,u,d):this.ZB("buffer.setTargetLevel","Invalid media type: ".concat(d),"media","".concat(d)):this.ZB("buffer.setTargetLevel","Invalid buffer type: ".concat(c),"type","".concat(c))}},c.prototype.getBufferLevel=function(c,u){var d,p;return this.xA()&&this.PA(c,u)&&null!=(p=null==(d=this.wz.bitdashPlayer)?void 0:d.getBufferLevel(c,u))?p:{level:null,targetLevel:null,type:c,media:u}},c.prototype.PA=function(c,u){var d=Object.keys(W.BufferType).some(function(u){return c===W.BufferType[u]}),p=Object.keys(W.MediaType).some(function(c){return u===W.MediaType[c]});return d&&p},c.prototype.getAudioBufferLength=function(){return this.wA()?this.getBufferLevel(W.BufferType.ForwardDuration,W.MediaType.Audio).level:null},c.prototype.getVideoBufferLength=function(){return this.wA()?this.getBufferLevel(W.BufferType.ForwardDuration,W.MediaType.Video).level:null},c.prototype.getMaxTimeShift=function(){var c,u;return this.wA()&&null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getMaxTimeShift())?u:0},c.prototype.getTimeShift=function(){var c,u;return this.wA()&&null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getTimeShift())?u:0},c.prototype.isStalled=function(){var c;return this.wA()&&!!(null!=(c=this.wz.bitdashPlayer)&&c.isStalled())},c.prototype.isLive=function(){var c;
13return this.wA()&&!!(null!=(c=this.wz.bitdashPlayer)&&c.isLive())},c.prototype.hasEnded=function(){var c;return this.wA()&&!!(null!=(c=this.wz.bitdashPlayer)&&c.hasEnded())},c.prototype.getAvailableVideoQualities=function(){var c,u;return this.wA()&&null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getAvailableVideoQualities())?u:[]},c.prototype.getAvailableAudioQualities=function(){var c,u;return this.wA()&&null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getAvailableAudioQualities())?u:[]},c.prototype.QA=function(){var c;return this.xA()&&!!this.wz.videoElement&&!!(null!=(c=this.wz.videoElement)&&c.isPictureInPicture())},c.prototype.isAirplayAvailable=function(){var c;return this.xA()&&!!(null!=(c=this.wz.bitdashPlayer)&&c.isAirplayAvailable())},c.prototype.isAirplayActive=function(){var c;return this.xA()&&!!(null!=(c=this.wz.bitdashPlayer)&&c.isAirplayActive())},c.prototype.getDownloadedVideoData=function(){var c,u;return this.wA()&&null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getDownloadedVideoData())?u:{id:"",bitrate:0,height:0,width:0,isAuto:!0}},c.prototype.getDownloadedAudioData=function(){var c,u;return this.wA()&&null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getDownloadedAudioData())?u:{id:"",bitrate:0,isAuto:!0}},c.prototype.getPlaybackVideoData=function(){var c,u;return this.wA()&&null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getPlaybackVideoData())?u:{id:"",bitrate:0,height:0,width:0,uid:void 0}},c.prototype.getPlaybackAudioData=function(){var c,u;return this.wA()&&null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getPlaybackAudioData())?u:{id:"",bitrate:0}},c.prototype.getAspectRatio=function(){var c,u;return null!=(u=null==(c=this.aA)?void 0:c.getAspectRatio())?u:0},c.prototype.getVisibility=function(){var c;return(null==(c=this.aA)?void 0:c.getVisibility())||{isVisible:!1,percentVisible:0}},c.prototype.getAudio=function(){var c,u;return this.wA()&&null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getAudio())?u:null},c.prototype.getBufferedRanges=function(){var c,u;return this.wA()&&null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getBufferedRanges())?u:[]},c.prototype.getAvailableSegments=function(){var c,u;return this.wA()&&null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getAvailableSegments())?u:{}},c.prototype.getAudioQuality=function(){var c,u;return this.wA()&&null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getAudioQuality())?u:{id:"auto",bitrate:null}},c.prototype.getManifest=function(){return this.yz},c.prototype.getDroppedVideoFrames=function(){var c,u;return this.IC(w.DROPPED_VIDEO_FRAMES,!(this.yA()&&this.AA().isLinearAdActive()),this.xA()&&null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getDroppedVideoFrames())?u:0)},c.prototype.getTotalStalledTime=function(){var c,u;return this.IC(w.TOTAL_STALLED_TIME,!(this.yA()&&this.AA().isLinearAdActive()),this.xA()&&null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getTotalStalledTime())?u:0)},c.prototype.getVideoQuality=function(){var c,u;return this.wA()&&null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getVideoQuality())?u:{id:"auto",bitrate:null,width:null,height:null}},c.prototype.RA=function(c){var u=this;return new Promise(function(d){var p,h,f=!1,m=!1,g=function(){u.off(U.PlayerEvent.AdBreakStarted,g),f=!0,u.lA=!1},v=function(){u.off(U.PlayerEvent.AdStarted,v),u.iA=null,m=!0,d()};u.on(U.PlayerEvent.AdBreakStarted,g),u.on(U.PlayerEvent.AdStarted,v),u.wz.context.serviceManager.get(D.ServiceName.PlayerStateService).transitionToPlayState(!0,c),(null!=(h=null==(p=u.AA())?void 0:p.playPreRollAds())?h:Promise.resolve()).then(function(){var c,d;return null!=(d=null==(c=eD(u.sz))?void 0:c.playPreRollAds())?d:Promise.resolve()}).then(function(){u.iA=null,u.isContentPlaying()||f&&m||!u.gA?d():d(u.play(c))}).finally(function(){u.off(U.PlayerEvent.AdBreakStarted,g),u.off(U.PlayerEvent.AdStarted,v)})})},c.prototype.isCastingToCAF=function(){var c=(0,eo.getRemoteControlState)(this.sz.store.getState().player);return c.remoteControlType===ea.RemoteControlType.GoogleCastV3&&c.connectionState!==ea.ConnectionState.Disconnected},c.prototype.SA=function(){if(this.hasCurrentSourcePlayedOnce())return!1;var c=this.AA(),u=eD(this.sz);return(null==c?void 0:c.hasAlreadyRequestedPreRollAds())===!1||(null==u?void 0:u.shouldPlayPreRollAds())===!0},c.prototype.TA=function(){if(this.isCasting())return!1;var c=this.Mz===T.NONE,u=this.Mz===T.MUTED_PLAY;return c||!this.isMuted()&&u},c.prototype.UA=function(){var c=this;this.wz.vrHandler&&this.wz.vrHandler.requestDeviceOrientationPermission().then(function(){return c.vz.debug("Device orientation permission granted")}
13).catch(function(){return c.vz.debug("Device orientation permission denied")})},c.prototype.play=function(c){var u=this;return void 0===c&&(c="api"),this.VA(c)?this.iA?this.iA.then(function(){return u.AA().play()}):this.AA().play():this.wA()?this.SA()&&!this.isCastingToCAF()?this.iA=this.RA(c):(this.lA||this.sz.sourceContext.isAd||this.zC(this.wz.source,this.isLive()),this.UA(),this.wz.bitdashPlayer?this.wz.bitdashPlayer.play(c).then(function(){u.Mz=u.OC(u.Mz),u.setPlaybackSpeed(u.wz.playbackSpeed)}).catch(function(d){var p;return u.vz.debug("playback could not be started: ",d),u.TA()&&(u.fireEvent(U.PlayerEvent.Warning,new x.PlayerWarning(C.WarningCode.PLAYBACK_COULD_NOT_BE_STARTED)),!u.isCasting()&&u.gA&&u.pause(),d instanceof Error&&"NotAllowedError"===d.name&&(null==(p=u.wz.context.serviceManager.get(D.ServiceName.PlayerStateService))||p.transitionToPausedState(!0,c))),Promise.reject(d)}):Promise.reject("Player is not available.")):Promise.reject(new k.PlayerError(R.ErrorCode.SOURCE_INVALID,void 0,"No source was loaded when `play()` was called. Please call `load()` first, and wait for the promise to resolve before calling `play()`."))},c.prototype.VA=function(c){if(eC(c))return!1;var u=!!this.iA;return this.WA()||u},c.prototype.WA=function(){return!!this.yA()&&this.AA().isLinearAdActive()},c.prototype.pause=function(c){var u,d=this;void 0===c&&(c="api"),this.VA(c)?this.iA?this.iA.then(function(){return d.AA().pause()}):this.AA().pause():this.wA()&&(null==(u=this.wz.bitdashPlayer)||u.pause(c))},c.prototype.castStop=function(){var c;this.xA()&&eR(this.wz.bitdashPlayer)&&(null==(c=this.wz.bitdashPlayer)||c.castStop())},c.prototype.setLogLevel=function(c){this.vz.setLogLevel(c)},c.prototype.getLogger=function(){return this.vz},c.prototype.XA=function(c,u,d){var p;this.wz&&this.wz.eventHandler?p=this.wz.eventHandler:this.Iz&&(p=this.Iz),p.on(c,u,d)},c.prototype.onInternal=function(c,u){this.XA(c,u,!0)},c.prototype.on=function(c,u){this.XA(c,u,!1)},c.prototype.off=function(c,u){this.wz&&this.wz.eventHandler?this.wz.eventHandler.off(c,u):this.Iz&&this.Iz.off(c,u)},c.prototype.YA=function(c){var u;return{context:null,logger:this.vz,container:this.tz,bitdashPlayer:null,eventHandler:this.Iz,videoElement:null,adController:null,vrHandler:null,hasInitStarted:!1,technology:{player:W.PlayerType.Unknown,streaming:W.StreamType.Unknown},playerConfig:null,configuration:null,settings:null,source:null,volume:null!=(u=c.playback().volume)?u:100,muted:c.playback().muted||!1,playbackSpeed:1}},c.prototype.ZA=function(){try{for(var c=0;this.tz.getElementsByClassName(N.Environment.idPrefix+"error").length>0&&(this.tz.removeChild(this.tz.getElementsByClassName(N.Environment.idPrefix+"error")[0]),!(++c>10)););}catch{this.vz.debug("Error removing container error element")}},c.prototype.kB=function(c){if(!this.wz.playerConfig.isAdPlayer){var u,d=this.Az.licensing().delay,p=this.Az.tweaks();(d||0===d)&&!isNaN(d)&&d>=0&&(u=d);var h=this.bA[0];p.licenseServer&&(this.bA.includes(p.licenseServer)?h=p.licenseServer:this.vz.warn("Invalid license server",new k.PlayerError(R.ErrorCode.SETUP_INVALID_LICENSE_SERVER,{"license-server":p.licenseServer}))),this.Dz=H.LicenseCall.getInstance(this.vz,h,c.key),this.Dz.setDelay(u);var f=this.Az.get("network");this.Dz.issue(this.YB,null==f?void 0:f.requestApi)}},c.prototype.lB=function(c){this.Az=new I.PlayerConfiguration(c),this.zz.setDisabled(!!(null!=(u=c.storage)&&u.disableStorageApi)),this.wz=this.wz||this.YA(this.Az),this.wz.configuration=this.Az,this.wz.settings=this.Az.getSettings(),this.vz.setSettings(this.wz.settings),this.vz.setLogLevel(this.Az.get("logs").level),null==(d=this.Iz)||d.addFromObject(this.Az.get("events")),this.vz.setConfig(this.Az);var u,d,p=this.Az.tweaks().log_level;if(p&&this.setLogLevel(p),this.wz.settings.ENABLE_PERFORMANCE_LOGS&&(0,q.setPerformanceTrackingLogger)(this.vz),P.ModuleManager.has(A.ModuleName.XML)&&P.ModuleManager.get(A.ModuleName.XML).setLogger(this.vz),this.Az.get("logs").bitmovin&&(this.vz.forceLogBeautified("Adaptive Video Streaming Service by www.bitmovin.com","blue","14"),this.vz.forceLogBeautified("Player Version "+N.Environment.VERSION_NUMBER,"black","12")),(0,M.validateAppIdConfig)(this.Az),this.wz.playerConfig={isAdPlayer:!1,prefix:"",visibility:"visible"},this.tz&&(this.tz.player=this.uz,this.ZA()),this.kB(c),P.ModuleManager.has(A.ModuleName.Style)){var h=P.ModuleManager.get(A.ModuleName.Style).StyleManager;this.aA=new h(this,this.wz)}P.ModuleManager.callSetupHooks(this.uz),(0,ey.isLegacyEdge)()&&(Z.DefaultSettings.MAX_STARTUP_BUFFER=eb.LEGACY_EDGE_MAX_STARTUP_BUFFER),this.sz=this.DA()},c.prototype.postSetup=function(){this.QB(),this.BC()},c.prototype.setup=function(c){if(!N.Environment.checkDomainLock())throw new k.PlayerError(R.ErrorCode.SETUP_MISSING_DOMAIN_LICENSE_ALLOWLIST,void 0,"The player is not authorized to play content on the current domain.");return this.lB(c)},c.prototype.addSubtitle=function(c){var u,d=this,p=b(b({},c),{kind:(null==c?void 0:c.kind)||"subtitles",id:(null==c?void 0:c.id)!=null?String(null==c?void 0:c.id):void 0,label:(null==c?void 0:c.label)||(null==c?void 0:c.lang),isSideloaded:!0});if(p&&"object"==typeof p&&("string"==typeof p.id||(0,eT.isNumber)(p.id))&&"string"==typeof p.lang&&["caption","captions","subtitle","subtitles"].includes(p.kind)){if(this.wA()&&!p.isFragmented){var h=p.enabled||!1;p.enabled=!1,null==(u=this.wz.bitdashPlayer)||u.addSubtitle(p).then(function(){h&&d.enableSubtitle(p.id,!1,!1)}).catch(function(){return function(){}})}}else this.fireEvent(U.PlayerEvent.Warning,new x.PlayerWarning(C.WarningCode.API_INVALID_ARGUMENT,"Invalid subtitle track: ".concat(JSON.stringify(c)," Please check the documentation for expected properties."),{method:"subtitles.add",parameter:"subtitle",argument:c}))},c.prototype.removeSubtitle=function(c){var u;this.wA()&&(null==(u=this.wz.bitdashPlayer)||u.removeSubtitle(c))},c.prototype.getContainer=function(){return this.tz},c.prototype.setVRStereo=function(c){return!(!this.vA()||!this.BA()||"boolean"!=typeof c)&&this.wz.vrHandler.setStereo(c)},c.prototype.getStreamType=function(){var c,u;return this.wA()&&null!=(u=null==(c=this.wz.technology)?void 0:c.streaming)?u:W.StreamType.Unknown},c.prototype.getPlayerType=function(){var c,u;return this.wA()&&null!=(u=null==(c=this.wz.technology)?void 0:c.player)?u:W.PlayerType.Unknown}
vendor: 1,057 bytes, line 13
13,c.prototype.getSupportedTech=function(c){switch(c){case W.SupportedTechnologyMode.Platform:return E([],(0,ep.getCapabilities)().techSupportedByPlatform,!0);case W.SupportedTechnologyMode.Modules:return E([],(0,ep.getCapabilities)().techSupportedByModules,!0);case W.SupportedTechnologyMode.PlatformAndModules:return E([],(0,ep.getCapabilities)().techSupportedByModulesOnPlatform,!0);default:return this.fireEvent(U.PlayerEvent.Warning,new x.PlayerWarning(C.WarningCode.API_INVALID_ARGUMENT,"Invalid mode '".concat(c,"'"),{method:"getSupportedTech",parameter:"mode",argument:"".concat(c)})),[]}},c.prototype.getVR=function(){return this.BA()?this.wz.vrHandler:null},c.prototype.getAds=function(){return this.vA()&&this.yA()?this.wz.adController.playerAdvertisingApi:(null==this.getConfig().advertising||P.ModuleManager.has(A.ModuleName.Advertising)||this.vz.warn("A required player module is missing: Advertising"),null)},c.prototype.getSgaiAPI=function(){return this.vA()&&eD(this.sz)?eD(this.sz).getSgaiPlayerAPI():(P.ModuleManager.has(A.ModuleName.Advert
13isingCore)&&P.ModuleManager.has(A.ModuleName.SGAI)||this.vz.warn("A required player module is missing: Advertising Core and/or SGAI"),null)},c.prototype.mB=function(c){if("string"==typeof c)try{c=JSON.parse(c)}catch(c){this.vz.log("Could not parse JSON string given as source: "+c.message)}return c&&"object"==typeof c?c:null},c.prototype.nB=function(c){var u;void 0===c&&(c=!1),this.wz&&this.tz&&((u=this.wz.playerConfig&&this.wz.playerConfig.hasOwnProperty("prefix")?document.getElementById(N.Environment.idPrefix+""+this.wz.playerConfig.prefix+"vr-canvas"):document.getElementById(N.Environment.idPrefix+"vr-canvas"))&&u.parentNode&&u.parentNode.removeChild(u),this.tz&&c&&delete this.tz.player)},c.prototype.oB=function(c){var u=!1,d=null;c&&(c.hasOwnProperty("options")&&c.options&&c.options.hasOwnProperty("persistentPoster")&&(u=c.options.persistentPoster),d=c.poster),this.setPosterImage(d,u)},c.prototype.pB=function(c){if(c)return["dash","hls","progressive","smooth","whep","poster","drm","title","description","options","tracks","labeling","vr"].forEach(function(u){c.hasOwnProperty(u)&&!c[u]&&delete c[u]}),c},c.prototype.qB=function(c){var u,d=c.vr,p=(0,ep.getCapabilities)(),h=!!d,f=p[ei.CapabilityKey.isIOS];if(h&&f){var m=p[ei.CapabilityKey.isInlinePlaybackRestricted];d.restrictedInlinePlayback=m,null!=(u=this.Pz)&&u.isFullscreen()&&this.setViewMode(W.ViewMode.Inline),m&&(d.audioElement=ew.Util.getVRAudioElement(),this.tz.appendChild(d.audioElement.getWrappedElement()))}},c.prototype.rB=function(c,u,d,p){var h;return this.wz.source=c,this.wz.loadOptions=u,(null==(h=this.wz.technology)?void 0:h.player)===d.player?(this.wz.technology=d,Promise.resolve()):this.sB(c,d,p)},c.prototype.sB=function(c,u,d){var p=this,h=function(){var u;p.uA()||(null==(u=p.Iz)||u.off(U.PlayerEvent.Error,h),p.oB(c))};return this.onInternal(U.PlayerEvent.Error,h),this.wz.vrHandler=null,this.tB(d).then(function(){return p.EA(c,u)}).then(function(){return p.qB(c)}).catch(function(c){return c&&c.hasOwnProperty("code")&&c.hasOwnProperty("message")&&p.Iz?p.Iz.fireError(c):c&&p.vz.error(c),Promise.reject(c)})},c.prototype.tB=function(c){var u=this;return this.wz&&this.wz.bitdashPlayer?this.wz.bitdashPlayer.release(c).then(function(){u.wz.bitdashPlayer=null,u.nB()}).catch(function(c){return u.vz.error("There was a problem removing the current player: ".concat(c))}):Promise.resolve()},c.prototype.uB=function(c,u,d){return u===B.ADVERTISING_ISSUER_NAME&&c.canReuseEmeHandler()?c.reInitializeEmeHandler():c.isDrmConfigSet()?void 0:c.setDrmConfig(d)},c.prototype.vB=function(c,u,d){var p=this,h=this.CA(c,this.wz.technology);return this.wz.bitdashPlayer&&h?this.wz.bitdashPlayer.load(h,u.restrictions).then(function(){c.drm&&p.sz.serviceManager.maybeCall(D.ServiceName.DrmService,function(u){return p.uB(u,d,c.drm)})}).catch(function(c){return c&&c.code&&c.message&&p.Iz?p.Iz.fireError(c):c&&p.vz.debug("Failed to load source:",c),Promise.reject(c)}):Promise.reject("Could not load source from configuration.")},c.prototype.wB=function(c){return!!this.fA&&(this.fA.reject(Error(c)),this.fA=null,!0)},c.prototype.xB=function(c){this.wz.bitdashPlayer&&c.set(D.ServiceName.StartOffsetService,new ee.StartOffsetService(this.wz.bitdashPlayer)),c.set(D.ServiceName.MetadataParsedService,new z.MetadataParsedService(this.wz.context)),c.set(D.ServiceName.StallTimeTrackerService,new $.StallTimeTrackerService(this.wz.context)),c.set(D.ServiceName.ThumbnailService,function(c){if(P.ModuleManager.has(A.ModuleName.Thumbnail))return P.ModuleManager.get(A.ModuleName.Thumbnail).createThumbnailService(c)}(this.wz.context)),c.set(D.ServiceName.PlayerStateService,new X.PlayerStateService(this.wz.context))},c.prototype.prepareSource=function(c,u){if(!this.wz.bitdashPlayer||!this.wz.technology)return Promise.reject(Error("Could not prepare source from configuration: current player is not initialized."));var d=u===B.ADVERTISING_ISSUER_NAME,p=this.CA(c,this.wz.technology);if(!p)return Promise.reject(Error("Could not prepare source from configuration."));var h=eM(this.wz,c,d);return this.sz.serviceManager.has(D.ServiceName.SourceStoreService,h.sourceIdentifier)||eI(this.sz,h.sourceIdentifier),this.wz.bitdashPlayer.prepareSource(p,h)},c.prototype.load=function(c,d,p,h){var f=this;void 0===h&&(h="api");var m=h===B.ADVERTISING_ISSUER_NAME;eC(h)||eO(h)||(this.lA=!1,this.Nz=T.NONE,this.hA=!1,this.xz=null,this.yz=null);var g=this.fA=new eg.Deferred;return this.Hz=p,this.dA=this.dA.then(function(){return f.yB(c,{forceTechnology:d,restrictions:p},h)}).catch(function(c){return f.IB(g,c)}),this.eA=this.eA.then(function(){return f.dA}).then(function(){if(!eC(h))return f.CC()}).then(function(){return g===f.fA?Promise.resolve():Promise.reject(Error(u.LOAD_CANCELLED_MESSAGE))}).then(function(){var u=eM(f.wz,c,m);f.wz.context.setSourceContext(u),f.sz.serviceManager.has(D.ServiceName.SourceStoreService,u.sourceIdentifier)||eI(f.sz,u.sourceIdentifier),f.xB(f.wz.context.serviceManager),f.QC(h),f.DB()}).then(function(){return Promise.race([f.EB(c,{forceTechnology:d,restrictions:p},h),g.promise])}).then(g.resolve).then(function(){var c,u,d=null==(c=f.sz.videoElement)?void 0:c.getWrappedElement();d&&(null==(u=f.aA)||u.maybeStartTrackingVisibility(d))}).catch(function(c){return f.IB(g,c)}),g.promise},c.prototype.yB=function(c,u,d){var p,h=this;return null==(p=this.Iz)||p.resetErrors(),this.HA(d).then(function(){h.KB(c);var p,f,m,g=(p=h.Az,f=u.forceTechnology,m=ew.Util.splitPlayerAndStreamingTechnology(f),(0,em.getBestTech)(p.playback().preferredTech,c,m)),v=h.MB(c,g);return h.vz.debug("Using technology: ".concat(v.player,".").concat(v.streaming)),h.LB(c),h.AB(c),h.oB(c),h.rB(h.mB(c),u,v,d)})},c.prototype.AB=function(c){c.hasOwnProperty("vr")&&(0,ep.getCapabilities)().isIOS&&(0,ep.getCapabilities)().isInlinePlaybackRestricted&&(c.vr.audioElement=ew.Util.getVRAudioElement(),c.vr.restrictedInlinePlayback=!0),c.hasOwnProperty("vr")&&c.vr.audioElement&&this.tz.appendChild(c.vr.audioElement.getWrappedElement())},c.prototype.BB=function(c){if(P.ModuleManager.has(A.ModuleName.DRM)&&c.drm&&!this.sz.serviceManager.has(D.ServiceName.DrmService)){var u=P.ModuleManager.get(A.ModuleName.DRM).DrmService;this.sz.serviceManager.set(D.ServiceName.DrmService,new u(this.sz))}},c.prototype.CB=function(){var c;this.sz.serviceManager.has(D.ServiceName.RecoveryService)||(null==(c=this.getConfig().playback)?void 0:c.allowDecodingErrorRecovery)===!1||this.sz.serviceManager.set(D.ServiceName.RecoveryService,new Q.RecoveryService(this.sz))},c.prototype.DB=function(){!this.sz.serviceManager.has(D.ServiceName.ManifestCachingService)&&this.qA&&this.sz.serviceManager.set(D.ServiceName.ManifestCachingService,this.qA)},c.prototype.EB=function(c,u,d){var p=this,h=this.sz.sourceContext.sourceIdentifier;return this.sz.serviceManager.maybeCall(D.ServiceName.SourceStoreService,function(c){return c.dispatch((0,es.resetLoadedRanges)())},null,h),this.PC(d,h),this.GB(d,h),this.CB(),this.BB(c),this.Jz&&this.sz.serviceManager.set(D.ServiceName.DrmDetectorService,this.Jz),this.FB().then(function(){return p.vB(c,u,d)}).then(function(){return p.postSetup(),p.OB(c.subtitleTracks),p.wz.context.serviceManager.maybeCall(D.ServiceName.ThumbnailService,function(u){c&&c.thumbnailTrack&&u.addThumbnails(c.thumbnailTrack.url)}),p.HB(c,d)}).then(function(){var c,u,d;null==(c=(0,eu.getSourceStore)(p.sz))||c.dispatch((0,el.setMseObjectUrl)(null!=(d=null==(u=p.wz.videoElement)?void 0:u.src)?d:"")),p.fireEvent(U.PlayerEvent.SourceLoaded)})},c.prototype.FB=function(){return this.wz.bitdashPlayer?this.wz.bitdashPlayer.prepareLoad():Promise.reject("Could not load source from configuration.")},c.prototype.GB=function(c,u){eC(c)||eO(c)||!this.sz||(this.sz.serviceManager.maybeCall(D.ServiceName.SourceStoreService,function(c){return c.dispatch((0,ed.initializeStartTimeOffset)())},null,u),this.sz.serviceManager.has(D.ServiceName.ManifestCachingService,u)||(this.sz.serviceManager.set(D.ServiceName.ManifestCachingService,this.qA,u),this.sz.serviceManager.maybeCall(D.ServiceName.ManifestCachingService,function(c){return c.clear()},null,u)))},c.prototype.HB=function(c,u){var d,p,h,f;return this.PB(),eC(u)?(this.wz.context.serviceManager.get(D.ServiceName.PlayerStateService).transitionToPlayState(!1,u),Promise.resolve()):eO(u)?(this.yz=null!=(p=null==(d=this.wz.bitdashPlayer)?void 0:d.getManifest())?p:"",Promise.resolve()):(this.Cz&&this.Cz.reset(),this.xz=c,this.yz=null!=(f=null==(h=this.wz.bitdashPlayer)?void 0:h.getManifest())?f:"",this.eB())},c.prototype.IB=function(c,u){this.off(U.PlayerEvent.Error,this.DC),c.reject(u)},c.prototype.JB=function(){var c,u,d,p=this,h=eD(this.sz);if(!this.yA()&&!h)return Promise.resolve();var f=(null==(c=this.AA())?void 0:c.isLinearAdActive())||!!this.iA,m=!this.gA&&f;return(null!=(d=null==(u=this.AA())?void 0:u.reset())?d:Promise.resolve()).then(function(){var c;return null!=(c=null==h?void 0:h.reset())?c:Promise.resolve()}).then(function(){p.iA=null,m&&p.fireEvent(U.PlayerEvent.SourceUnloaded)})},c.prototype.KB=function(c){this.uA()&&this.NB(R.ErrorCode.API_NOT_AVAILABLE,"Cannot load the source: the player has already been destroyed.");var u=this.pB(c),d=Object.values(W.StreamType).filter(function(c){return c!==W.StreamType.Unknown});if(u&&d.some(function(c){return u.hasOwnProperty(c)})||this.NB(R.ErrorCode.SOURCE_INVALID,"Cannot load the source: the provided source config has no usable stream.",{source:c}),!this.Lz)throw this.Oz},c.prototype.LB=function(c){var u,d=!!(null!=(u=c.options)&&u.shouldRecreateSourceBuffersOnPeriodSwitch);
vendor: 11,878 bytes, line 13
13d!==Z.DefaultSettings.DASH_CLEAR_BUFFERS_ON_PERIOD_SWITCHES&&(this.vz.debug("Overriding default setting: `DASH_CLEAR_BUFFERS_ON_PERIOD_SWITCHES = ".concat(d,"`")),Z.DefaultSettings.DASH_CLEAR_BUFFERS_ON_PERIOD_SWITCHES=d,this.sz&&(this.sz.settings=this.wz.configuration.getSettings()))},c.prototype.MB=function(c,u){var d=(0,ep.getCapabilities)().techSupportedByPlatform;return d.length<1&&this.NB(R.ErrorCode.SOURCE_NO_SUPPORTED_TECHNOLOGY,"The platform does not support any of the technologies needed to play back the provided source."),!u&&c.hasOwnProperty("vr")&&this.NB(R.ErrorCode.VR_INCOMPATIBLE_PLAYER_TECHNOLOGY,"This platform does not support VR playback."),u||this.NB(R.ErrorCode.SOURCE_NO_SUPPORTED_TECHNOLOGY,"This platform only supports these technologies: ".concat(JSON.stringify(d),".")),u},c.prototype.NB=function(c,u,d){var p,h=new k.PlayerError(c,d,u,null==(p=this.sz.sourceContext)?void 0:p.sourceIdentifier);throw this.Iz&&this.Iz.fireError(h),h},c.prototype.OB=function(c){var u=this;!this.subtitlesApi&&P.ModuleManager.has(A.ModuleName.Subtitles)&&(this.subtitlesApi=P.ModuleManager.get(A.ModuleName.Subtitles).PlayerSubtitlesApiFactory.build(this),this.fireEvent(U.PlayerEvent.ModuleReady,{name:A.ModuleName.Subtitles})),c&&Array.isArray(c)&&c.forEach(function(c){return u.addSubtitle(c)})},c.prototype.PB=function(){var c,u=null==(c=this.wz.bitdashPlayer)?void 0:c.createManifestApi();u&&(this.manifestApi=u)},c.prototype.QB=function(){if(this.wz.source&&this.wz.source.hasOwnProperty("vr")&&this.vA())if("function"==typeof window.requestAnimationFrame){var c=P.ModuleManager.get(A.ModuleName.VR).VRHandler;this.wz.vrHandler=new c(this.wz.context,this.id,this.wz.source.vr,ew.Util.getVRAudioElement(),this.vz,navigator,this.wz.settings),this.fireEvent(U.PlayerEvent.ModuleReady,{name:A.ModuleName.VR})}else this.vz.warn("VR unavailable","This platform does not support VR")},c.prototype.getConfig=function(c){return void 0===c&&(c=!1),this.Az?c?this.Az.get():this.Az.getUserConfig():{}},c.prototype.getSnapshot=function(c,u){var d;if(this.wA())return null==(d=this.wz.bitdashPlayer)?void 0:d.getSnapshot(c,u)},c.prototype.setPlaybackSpeed=function(c,u){var d,p,h;if(void 0===u&&(u="api"),!isNaN(c=Number(c))&&c>0){if(null!=(d=this.Hz)&&d.playbackRate&&ek(u))return void(null==(p=this.sz)||p.logger.debug("Playback rate changes blocked by playback restrictions"));this.wz.playbackSpeed=c,this.xA()&&(null==(h=this.wz.bitdashPlayer)||h.setPlaybackSpeed(c))}},c.prototype.getPlaybackSpeed=function(){var c,u;return this.xA()&&null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getPlaybackSpeed())?u:1},c.prototype.RB=function(){var c=this;return new Promise(function(u,d){if(c.Pz&&c.getViewMode()!==W.ViewMode.Inline){var p=function(){u(),c.off(U.PlayerEvent.ViewModeChanged,p)};c.on(U.PlayerEvent.ViewModeChanged,p),c.Pz.setViewMode(W.ViewMode.Inline)}else u()})},c.prototype.destroy=function(){var c,u=this;return this.tA()?Promise.resolve():(null==(c=this.sz)||c.store.dispatch((0,er.setDestroyState)(ea.DestroyState.Destroying)),P.ModuleManager.callDestroyHooks(this.uz).then(function(){return u.RB()}).then(function(){return u.TB()}).then(function(){var c,d;null==(c=u.sz)||c.store.dispatch((0,er.setDestroyState)(ea.DestroyState.Destroyed)),null==(d=u.Iz)||d.setBeingDestroyed(),u.UB()}).then(function(){return u.eA}).then(function(){return u.HA()}).then(function(){return u.VB()}).then(function(){u.sz&&(u.SB(),u.sz.dispose(),u.sz=null)}))},c.prototype.SB=function(){this.rA&&this.rA(),this.sA&&this.sA(),this.rA=null,this.sA=null},c.prototype.TB=function(){var c=this;return new Promise(function(u){var d=function(){(0,eE.clearTimeoutIfDefined)(p),c.off(U.PlayerEvent.Destroy,d),u()},p=window.setTimeout(d,250);c.on(U.PlayerEvent.Destroy,d),c.fireEvent(U.PlayerEvent.Destroy,{},!1,!1)})},c.prototype.UB=function(){this.wB(u.LOAD_CANCELLED_BY_DESTROY_MESSAGE),(0,eE.clearTimeoutIfDefined)(this.Bz)},c.prototype.VB=function(){var c=this;if(!this.wz)return Promise.resolve();var u=Promise.resolve();return this.nB(!0),ew.Util.removeVRAudioElement(),this.wz.adController=(0,L.dispose)(this.wz.adController),this.wz.vrHandler=null,this.Pz&&(this.Pz=(0,L.dispose)(this.Pz)),this.mA=(0,L.dispose)(this.mA),this.nA=(0,L.dispose)(this.nA),this.oA=(0,L.dispose)(this.oA),this.pA=(0,L.dispose)(this.pA),this.qA=(0,L.dispose)(this.qA),this.Cz.dispose(),this.wz.bitdashPlayer?u=this.wz.bitdashPlayer.release().then(function(){return c.sz.serviceManager.maybeCall(D.ServiceName.DrmService,function(c){return c.release()})}).finally(function(){c.WB(),c.wz.bitdashPlayer=null}):this.WB(),this.wz.context&&ex(this.wz.context),this.Jz=(0,L.dispose)(this.Jz),this.aA=(0,L.dispose)(this.aA),this.Iz=(0,L.dispose)(this.Iz),this.zz=null,u},c.prototype.WB=function(){if(this.wz.videoElement){var c=this.wz.videoElement.getWrappedElement();this.wz.videoElement=(0,L.dispose)(this.wz.videoElement),this.tz&&c&&c!==this.Kz&&this.tz.removeChild(c)}},c.prototype.XB=function(c){if(!c)return new k.PlayerError(R.ErrorCode.SETUP_LICENSE_ERROR,{"error-message":"No license information was returned from the server"});if(c.message&&c.message.includes("Your player is not allowed to play on the domain"))return new k.PlayerError(R.ErrorCode.SETUP_MISSING_LICENSE_ALLOWLIST,{"error-message":c.message});if(c.hasOwnProperty("validationInformation")){for(var u="",d=0;d<c.validationInformation.length;d++)u+=c.validationInformation[d].key+": ",u+=c.validationInformation[d].errorMessage,d<c.validationInformation.length-1&&(u+="</br>");return new k.PlayerError(R.ErrorCode.SETUP_LICENSE_ERROR,{"error-message":u})}return c.hasOwnProperty("message")?new k.PlayerError(R.ErrorCode.SETUP_LICENSE_ERROR,{"error-message":c.message}):void 0},c.prototype.permitControl=function(c){this.wz&&this.wz.bitdashPlayer&&ew.Util.isFunction(this.wz.bitdashPlayer.permitControl)&&this.wz.bitdashPlayer.permitControl(c)},c.prototype.ZB=function(c,u,d,p){this.fireEvent(U.PlayerEvent.Warning,new x.PlayerWarning(C.WarningCode.API_INVALID_ARGUMENT,u,{method:c,parameter:d,argument:p}))},c.prototype.fireEvent=function(c,u,d,p){this.Iz&&this.Iz.getEventFunction()(c,u,d,p)},c.prototype.isPlaying=function(){return this.isContentPlaying()||this.isAdPlaying()},c.prototype.isContentPlaying=function(){var c;return this.wA()&&!!(null!=(c=this.wz.bitdashPlayer)&&c.isPlaying())},c.prototype.isAdPlaying=function(){return this.yA()&&this.AA().isPlaying()},c.prototype.isPaused=function(){return this.isContentPaused()||this.isAdPaused()},c.prototype.isContentPaused=function(){var c;return this.wA()&&!!(null!=(c=this.wz.bitdashPlayer)&&c.isPaused())},c.prototype.isAdPaused=function(){return this.yA()&&this.AA().isPaused()},c.prototype.setVideoElement=function(c){this.Kz=c},c.prototype.getVideoElement=function(){return this.Kz?this.Kz:this.wz&&this.wz.videoElement?this.wz.videoElement.getWrappedElement():null},c.prototype.isDRMSupported=function(c){return this.Jz?this.Jz.isSupported(c):Promise.reject("DRM module not loaded")},c.prototype.getSupportedDRM=function(){return this.Jz?this.Jz.getSupported():Promise.reject("DRM module not loaded")},c.prototype.setAuthentication=function(c){this.Dz.setCustomData(c)},c.prototype.setPosterImage=function(c,u){this.aA?this.aA.setPosterImage(c,u):this.vz.debug("Unable to set poster image because style module is missing")},c.prototype.getThumbnail=function(c){var u,d;return this.xA()?(d={width:this.getContainer().clientWidth,height:this.getContainer().clientHeight,isFullscreen:!!(null!=(u=this.Pz)&&u.isFullscreen())},this.wz.context.serviceManager.maybeCall(D.ServiceName.ThumbnailService,function(u){return u.getThumbnail(c,d)})):null},c.prototype.getSeekableRange=function(){var c,u;return this.wA()&&null!=(u=null==(c=this.wz.bitdashPlayer)?void 0:c.getSeekableRange())?u:{start:-1,end:-1}},c.prototype.cB=function(c,u,d){var p;u=[].concat(u);for(var h=function(c){if(p=u.find(function(u){return u.lang===c}))return"break"},f=0,m=c=[].concat(c);f<m.length&&"break"!==h(m[f]);f++);return p?Promise.resolve(d(p.id)):Promise.resolve()},c.prototype.dB=function(){var c=this.wz.configuration.buffer();this.AC(c)},c.prototype.eB=function(){return this.jB().then(this.yC).then(this.xC)},c.prototype.fB=function(){if(this.wz.configuration.playback().playsInline&&void 0!==this.sz.videoElement){var c=this.sz.videoElement.getWrappedElement();c.setAttribute("webkit-playsinline",""),c.setAttribute("playsinline","")}},c.prototype.gB=function(){this.isLive()||this.SA()||this.zC(this.wz.source,!1)},c.prototype.hB=function(){var c,u;null!=(u=null==(c=this.wz.vrHandler)?void 0:c.deviceOrientationPermissionRequired())&&u?this.vz.debug("Autoplay disabled: user permission is required to access device orientation data for VR playback"):this.wC()},c.prototype.iB=function(){var c=this.isLive(),u=this.wz.configuration.playback(),d=this.wz.configuration.adaptation();u.autoplay?this.hB():this.uC(d,c)&&this.preload()},c.prototype.jB=function(){var c=this;return new Promise(function(u){(0,eE.clearTimeoutIfDefined)(c.Bz),c.wz&&c.wz.bitdashPlayer?(c.fB(),c.gB(),c.iB(),u()):c.Bz=window.setTimeout(function(){u(c.eB())},100)})},c.prototype.uC=function(c,u){return!u&&("boolean"!=typeof c.preload||c.preload)},Object.defineProperty(c.prototype,"vC",{get:function(){return this.fA&&this.fA.promise||Promise.resolve()},enumerable:!1,configurable:!0}),c.prototype.wC=function(){var c=this;this.vC.then(function(){return c.play()}).catch(function(){return c.vz.insane("Autoplay not triggered because current load call failed")})},c.prototype.zC=function(c,u){var d=this.wz.context.serviceManager.get(D.ServiceName.StartOffsetService).getStartOffset(c);u?this.timeShift(d,B.STARTUP_ISSUER_NAME):this.seek(d,B.STARTUP_ISSUER_NAME)},c.prototype.AC=function(c){var u=this;Object.keys(c).forEach(function(d){Object.keys(c[d]).forEach(function(p){if(u.PA(p,d)){var h=c[d][p];u.setTargetBufferLevel(p,h,d)}})})},c.prototype.BC=function(){this.wz&&(this.gA=!0,this.setVolume(this.wz.volume),this.setPlaybackSpeed(this.wz.playbackSpeed),this.wz.muted?this.mute():this.unmute())},c.prototype.CC=function(){var c;if(this.getConfig().advertising){if(!this.yA())try{this.zA()}catch(c){this.vz.warn(c)}null==(c=this.wz.adController)||c.initializeAdModule()}},c.prototype.EC=function(){var c=this;this.Lz=!0,this.cA&&this.cA.length>0&&(this.Cz=new j.ImpressionCall(this.vz,this.cA[0])),this.onInternal(U.PlayerEvent.Error,this.DC),this.onInternal(U.PlayerEvent.Warning,function(u){return c.vz.warn(u.message)}),this.onInternal(U.PlayerEvent.Playing,this.FC),this.onInternal(U.PlayerEvent.SourceLoaded,this.aB),this.on(U.PlayerEvent.SourceUnloaded,this.bB),this.on(U.PlayerEvent.Playing,this.NC),this.bufferApi=G.PlayerBufferApiFactory.create(this),P.ModuleManager.has(A.ModuleName.LowLatency)&&(this.lowLatencyApi=P.ModuleManager.get(A.ModuleName.LowLatency).LowLatencyApiFactory.create(this)),P.ModuleManager.has(A.ModuleName.ABR)&&(this.adaptationApi=P.ModuleManager.get(A.ModuleName.ABR).AdaptationApiFactory.create(this)),P.ModuleManager.has(A.ModuleName.EngineBitmovin)&&(this.mA=new(P.ModuleManager.get(A.ModuleName.EngineBitmovin)).SegmentInfoService,this.nA=new(P.ModuleManager.get(A.ModuleName.EngineBitmovin)).SegmentPrefetchingService,this.oA=new(P.ModuleManager.get(A.ModuleName.EngineBitmovin)).SegmentCacheService,this.pA=new(P.ModuleManager.get(A.ModuleName.EngineBitmovin)).AdRestorationOptimizationService,this.qA=new(P.ModuleManager.get(A.ModuleName.EngineBitmovin)).ManifestCachingService),this.GC()},c.prototype.GC=function(){this.kA=new Map,this.kA.set(w.DROPPED_VIDEO_FRAMES,0),this.kA.set(w.TOTAL_STALLED_TIME,0)},c.prototype.HC=function(c,u){this.kA.has(c)&&this.kA.set(c,this.kA.get(c)+u)},c.prototype.IC=function(c,u,d){return this.kA.get(c)+(u?d:0)},c.prototype.KC=function(c){var u=c.getActiveAdBreak(),d=c.list().filter(function(c){return c.scheduleTime===u.sc
13heduleTime});[u].concat(d).forEach(function(u){return c.discardAdBreak(u.id)})},c.prototype.updateCallback=function(c){},c.prototype.onFullscreenEnter=function(){},c.prototype.onFullscreenExit=function(){},c.prototype.getViewMode=function(){return this.sz?(0,eo.getPlayerState)(this.sz.store.getState()).viewMode:W.ViewMode.Inline},c.prototype.isViewModeAvailable=function(c){var u;return this.wA()?!!(null!=(u=this.Pz)&&u.isViewModeAvailable(c)):[W.ViewMode.Fullscreen,W.ViewMode.Inline].includes(c)},c.prototype.setViewMode=function(c,u){void 0===u&&(u={}),this.Pz&&this.Pz.setViewMode(c,u)},c.prototype.addExternalEventFilter=function(c){this.Iz&&this.Iz.addExternalEventFilter(c)},c.prototype.removeExternalEventFilter=function(c){this.Iz&&this.Iz.removeExternalEventFilter(c)},c.prototype.getSource=function(){return this.xz},c.prototype.getLoadOptions=function(){var c;return this.wA()&&(null==(c=this.wz)?void 0:c.loadOptions)||null},c.prototype.hasCurrentSourcePlayedOnce=function(){return this.Nz!==T.NONE},c.prototype.OC=function(c){var u=this.isMuted()?T.MUTED_PLAY:T.UNMUTED_PLAY;return u>c?u:c},c.prototype.PC=function(c,u){if(this.sz&&P.ModuleManager.has(A.ModuleName.ABR))for(var d=P.ModuleManager.get(A.ModuleName.ABR).AdaptationUtils,p=eC(c)?0:d.getStartupBitrateFromConfig(this.sz),h=this.sz.serviceManager.get(D.ServiceName.SourceStoreService,u),f=0,m=Object.values(ev.MimeType);f<m.length;f++){var g=m[f];h.dispatch((0,en.setPreferredBitrateForMimeTypeAction)(g,p))}},c.prototype.QC=function(c){var u;if(!eC(c)&&P.ModuleManager.has(A.ModuleName.SGAI)&&this.sz.settings.ENABLE_SGAI_HANDLING){if(!this.sz.serviceManager.has(D.ServiceName.SgaiService)){var d=P.ModuleManager.get(A.ModuleName.SGAI);this.sz.serviceManager.set(D.ServiceName.SgaiService,new d.SgaiService(this.sz))}null==(u=eD(this.sz))||u.initialize()}},c}(),y="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,m=[(0,q.trackPerformance)("InternalPlayer.load")],g=[(0,q.trackPerformance)("InternalPlayer.destroy")],_(f,null,m,{kind:"method",name:"load",static:!1,private:!1,access:{has:function(c){return"load"in c},get:function(c){return c.load}},metadata:y},null,v),_(f,null,g,{kind:"method",name:"destroy",static:!1,private:!1,access:{has:function(c){return"destroy"in c},get:function(c){return c.destroy}},metadata:y},null,v),y&&Object.defineProperty(f,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:y}),f);function eI(c,u){var d=new eh.StoreService(c.store,"sources",u);c.serviceManager.set(D.ServiceName.SourceStoreService,d,u),d.addReducers(ec.staticSourceReducers)}function eM(c,u,d){var p,h=ew.Util.toHash(u)+c.context.internalPlayerID;return new J.SourceContext({source:u,isAd:d,technology:c.technology,sourceIdentifier:h,mseObjectUrl:null==(p=c.videoElement)?void 0:p.src})}function eR(c){return null!=c&&"isCastAvailable"in c}function ek(c){return"api"===c||c===B.UI_SEEK_ISSUER_NAME}function ex(c){[D.ServiceName.MetadataParsedService,D.ServiceName.StartOffsetService,D.ServiceName.PlayerStateService,D.ServiceName.StallTimeTrackerService,D.ServiceName.ThumbnailService].forEach(function(u){return(0,O.disposeService)(c.serviceManager,u)})}function eC(c){return c===B.ADVERTISING_ISSUER_NAME||c===B.ADVERTISING_RESTORE_ISSUER_NAME}function eO(c){return c===B.RECOVERY_ISSUER_NAME}function eD(c){var u;return null==(u=null==c?void 0:c.serviceManager)?void 0:u.get(D.ServiceName.SgaiService)}u.InternalPlayer=eA},75375:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.RECOVERY_ISSUER_NAME=u.UI_SEEK_ISSUER_NAME=u.INTERNAL_ISSUER_NAME=u.ADVERTISING_RESTORE_ISSUER_NAME=u.ADVERTISING_ISSUER_NAME=u.STARTUP_ISSUER_NAME=void 0,u.STARTUP_ISSUER_NAME="startup",u.ADVERTISING_ISSUER_NAME="advertising-api",u.ADVERTISING_RESTORE_ISSUER_NAME="advertising-restore",u.INTERNAL_ISSUER_NAME="internal",u.UI_SEEK_ISSUER_NAME="ui-seek",u.RECOVERY_ISSUER_NAME="error-recovery"},99266:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.LogLevels=void 0,u.LogLevels={DEBUG:"debug",LOG:"log",WARN:"warn",ERROR:"error",OFF:"off"}},13531:function(c,u,d){var p,h=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};
13Object.defineProperty(u,"__esModule",{value:!0}),u.Logger=u.LogLevel=void 0;var f,m=d(99266),g=d(44468);(p=f||(u.LogLevel=f={}))[p.OFF=0]="OFF",p[p.INSANE=1]="INSANE",p[p.DEBUG=2]="DEBUG",p[p.LOG=3]="LOG",p[p.WARN=4]="WARN",p[p.ERROR=5]="ERROR",u.Logger=function(){function c(c,u){void 0===u&&(u=f.WARN),this.bJ=c,this.setLogLevel(u)}return c.prototype.setConfig=function(c){this.cJ=c.logs&&"function"==typeof c.logs().onLog?c.logs().onLog:void 0},c.prototype.setLogLevel=function(u){"string"==typeof u&&(u=c.parseLogLevel(u)),this.aJ=u},c.prototype.getLogLevel=function(){return this.aJ},c.prototype.isLevelEnabled=function(c){return void 0!==this.cJ&&c!==f.INSANE||this.aJ!==f.OFF&&this.aJ<=c},c.prototype.setSettings=function(c){this.bJ=c},c.parseLogLevel=function(c){switch(c){case m.LogLevels.DEBUG:return f.DEBUG;case m.LogLevels.LOG:return f.LOG;case m.LogLevels.WARN:return f.WARN;case m.LogLevels.ERROR:return f.ERROR;default:return f.OFF}},c.prototype.dJ=function(c,u,d){var p,m,v,y=function(c){switch(c){case f.INSANE:case f.DEBUG:return g.LogLevel.DEBUG;case f.LOG:return g.LogLevel.LOG;case f.WARN:return g.LogLevel.WARN;case f.ERROR:return g.LogLevel.ERROR;default:return null}}(c),b=h([],d,!0);if(this.aJ>0&&this.aJ<=c&&("string"==typeof this.bJ.LOG_PREFIX&&this.bJ.LOG_PREFIX.length>0?(p=console[y]).call.apply(p,h([console,this.bJ.LOG_PREFIX,u],b,!1)):(m=console[y]).call.apply(m,h([console,u],b,!1))),this.cJ&&c!==f.INSANE)try{(v=this.cJ).call.apply(v,h([null,y,u],b,!1))}catch{}},c.prototype.insane=function(c){for(var u=[],d=1;d<arguments.length;d++)u[d-1]=arguments[d];this.dJ(f.INSANE,c,u)},c.prototype.debug=function(c){for(var u=[],d=1;d<arguments.length;d++)u[d-1]=arguments[d];this.dJ(f.DEBUG,c,u)},c.prototype.log=function(c){for(var u=[],d=1;d<arguments.length;d++)u[d-1]=arguments[d];this.dJ(f.LOG,c,u)},c.prototype.warn=function(c){for(var u=[],d=1;d<arguments.length;d++)u[d-1]=arguments[d];this.dJ(f.WARN,c,u)},c.prototype.error=function(c){for(var u=[],d=1;d<arguments.length;d++)u[d-1]=arguments[d];this.dJ(f.ERROR,c,u)},c.prototype.forceLogBeautified=function(c,u,d){navigator.userAgent.indexOf("Trident/")>-1||navigator.userAgent.indexOf("Edge/")>-1?console.log(c):console.log("%c"+c,"color:"+u+";font-weight:bold;font-size:"+d+"px;")},c}()},1001:function(c,u){var d,p,h,f;Object.defineProperty(u,"__esModule",{value:!0}),u.NalUnitTypeHevc=u.NalUnitTypeAvc=u.VisualSampleEntryTypes=void 0,u.VisualSampleEntryTypes={Avc:["avc1","avc2","avc3"],Hvc:["hvc1","hev1"]},(h=d||(u.NalUnitTypeAvc=d={}))[h.SEI=6]="SEI",(f=p||(u.NalUnitTypeHevc=p={}))[f.SEI=39]="SEI"},75108:function(c,u){var d,p,h,f;Object.defineProperty(u,"__esModule",{value:!0}),u.ErrorCodeMap=u.MediaErrorCode=void 0,(h=d||(u.MediaErrorCode=d={}))[h.MEDIA_ERR_NETWORK=2]="MEDIA_ERR_NETWORK",h[h.MEDIA_ERR_DECODE=3]="MEDIA_ERR_DECODE",h[h.MEDIA_ERR_SRC_NOT_SUPPORTED=4]="MEDIA_ERR_SRC_NOT_SUPPORTED",(f=p||(u.ErrorCodeMap=p={}))[f.MEDIA_ERR_DECODE=1301]="MEDIA_ERR_DECODE",f[f.MEDIA_ERR_NETWORK=1400]="MEDIA_ERR_NETWORK",f[f.MEDIA_ERR_SRC_NOT_SUPPORTED=1204]="MEDIA_ERR_SRC_NOT_SUPPORTED"},50172:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.MetadataParsedService=void 0;var p=d(3714),h=d(58735),f=d(89927);u.MetadataParsedService=function(){function c(c){this.xX=1.3,this.kW=c.eventHandler,this.kW.on(p.PlayerEvent.SourceUnloaded,this.yX),this.yX()}return c.prototype.yX=function(){this.wX={},this.lW=1/0},c.prototype.addMetadata=function(c,u){if(this.zX(),[p.MetadataType.EVENT_STREAM,p.MetadataType.DATERANGE].includes(u.metadataType)){var d=(0,h.calculateMetadataHash)(u,c);if(this.wX[d])return;this.wX[d]=Date.now()}this.kW.dispatchEvent(p.PlayerEvent.MetadataParsed,u)},c.prototype.zX=function(){for(var c=0,u=Object.keys(this.wX);c<u.length;c++){var d=u[c];this.AX(this.wX[d])&&delete this.wX[d]}},c.prototype.AX=function(c){if(!c)return!0;var u=(0,f.toMilliSeconds)(this.lW*this.xX);return Date.now()-u>c},Object.defineProperty(c.prototype,"expirationTimeInSeconds",{get:function(){return this.lW},set:function(c){this.lW=Math.abs(c)},enumerable:!1,configurable:!0}),c.prototype.dispose=function(){this.wX=null,this.kW.off(p.PlayerEvent.SourceUnloaded,this.yX)},c}()},29669:function(c,u){var d,p,h,f,m,g,v,y;
13Object.defineProperty(u,"__esModule",{value:!0}),u.NetworkRequestApi=u.HttpRequestMethod=u.HttpResponseType=u.HttpRequestType=void 0,(m=d||(u.HttpRequestType=d={})).MANIFEST_DASH="manifest/dash",m.MANIFEST_HLS_MASTER="manifest/hls/master",m.MANIFEST_HLS_VARIANT="manifest/hls/variant",m.MANIFEST_SMOOTH="manifest/smooth",m.MANIFEST_ADS="manifest/ads",m.MANIFEST_STEERING="manifest/steering",m.MEDIA_AUDIO="media/audio",m.MEDIA_VIDEO="media/video",m.MEDIA_SUBTITLES="media/subtitles",m.MEDIA_THUMBNAILS="media/thumbnails",m.MEDIA_SEGMENTINDEX="media/segmentindex",m.DRM_LICENSE_WIDEVINE="drm/license/widevine",m.DRM_LICENSE_PLAYREADY="drm/license/playready",m.DRM_LICENSE_FAIRPLAY="drm/license/fairplay",m.DRM_LICENSE_PRIMETIME="drm/license/primetime",m.DRM_LICENSE_CLEARKEY="drm/license/clearkey",m.DRM_LICENSE_TVKEY="drm/license/tvkey",m.DRM_CERTIFICATE_FAIRPLAY="drm/certificate/fairplay",m.HLS_INTERSTITIALS_ASSET_LIST="hls/interstitials/asset-list",m.KEY_HLS_AES="key/hls/aes",m.TIME_SYNC="time/sync",m.WEBRTC_SDP_REQUEST="webrtc/sdp/request",m.WEBRTC_SDP_ANSWER="webrtc/sdp/answer",m.WEBRTC_SDP_OFFER="webrtc/sdp/offer",m.UNKNOWN="unknown",m.INTERNAL="internal",(g=p||(u.HttpResponseType=p={})).ARRAYBUFFER="arraybuffer",g.BLOB="blob",g.DOCUMENT="document",g.JSON="json",g.TEXT="text",(v=h||(u.HttpRequestMethod=h={})).GET="GET",v.POST="POST",v.HEAD="HEAD",v.PATCH="PATCH",(y=f||(u.NetworkRequestApi=f={})).XHR="xhr",y.Fetch="fetch"},69957:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.setPerformanceTrackingLogger=function(c){d=c},u.trackPerformance=function(c,u){return void 0===u&&(u=!1),function(d,m){return function(){for(var m,g=[],v=0;v<arguments.length;v++)g[v]=arguments[v];var y=function c(u,d){void 0===d&&(d=[]);var p=u.next,h=u.method;return h&&d.push(h),p?c(p,d):{callStack:d,parent:u}}(p),b=y.callStack,S=y.parent,_=Date.now(),E=f(),T=(S.next=m={method:c,isAsync:!1,next:null,subtractions:[]},m),w=function(){var d=f()-E;if(h({name:c,start:_,duration:d,callStack:b}),u&&(S.subtractions=S.subtractions||[],S.subtractions.push({name:c,duration:d})),T.subtractions&&T.subtractions.length){var p=T.subtractions.map(function(c){return c.name}).join(", "),m=T.subtractions.reduce(function(c,u){return c+u.duration},0);h({name:"".concat(c," without ").concat(p),duration:d-m,start:Date.now()})}
vendor: 4,198 bytes, line 13
13S.isAsync&&S.next.isAsync||(S.next=null)},P=d.apply(this,g);return P instanceof Promise?(S.next.isAsync=!0,P.then(w,w)):w(),P}}},u.trackPerformanceStart=function(c){var u=f();m[c]&&g(c,u),m[c]=u},u.trackPerformanceEnd=function(c){g(c,f()),delete m[c]};var d,p={};function h(c){d&&d.debug("[Performance] ".concat(c.name," lasted ").concat(Math.floor(c.duration),"ms"),c)}function f(){var c,u;return(null==(c=performance.now)?void 0:c.call(performance))||(null==(u=performance.webkitNow)?void 0:u.call(performance))||Date.now()}var m={};function g(c,u){d&&h({name:c,start:m[c],duration:u-m[c]})}},51072:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.PlayPromise=void 0;var h=d(88844),f=d(19274);u.PlayPromise=function(){function c(c,u,d){var f=this;this.kab=function(){var c=function(){(0,h.clearTimeoutIfDefined)(f.hab),f.gab&&f.gab.isLicenseRequestOngoing()?f.hab=setTimeout(c,f.eab.settings.PLAYBACK_TIMEOUT):f.qab({code:0,name:"NotAllowedError",message:"user interaction required"})};f.hab=setTimeout(c,f.eab.settings.PLAYBACK_TIMEOUT)},this.oab=function(){f.nab(),f.iab()},this.pab=function(c,u){return f.qab(p(p({},u),{eventName:c}))},this.qab=function(c){f.nab();var u=c;c&&c.type&&(u="error"===c.type?p(p({},c),{name:"NotSupportedError",message:"The operation is not supported"}):p(p({},c),{name:"AbortError",message:"The play call was interrupted by ".concat(c.type)})),f.jab(u)},this.eab=c,this.fab=u,this.gab=d}return c.prototype.lab=function(){var u=this,d=function(d){var h=c.eventMapping[d];p.fab.addEventListener(d,h?p.oab:function(c){return u.pab(d,c)})},p=this;for(var h in c.eventMapping)d(h);4===this.fab.readyState?this.kab():this.fab.addEventListener(f.MediaElementEvent.canplay,this.kab)},c.prototype.mab=function(){for(var u in c.eventMapping){var d=c.eventMapping[u];this.fab.removeEventListener(u,d?this.oab:this.qab)}this.fab.removeEventListener(f.MediaElementEvent.canplay,this.kab)},c.prototype.nab=function(){(0,h.clearTimeoutIfDefined)(this.hab),this.mab()},c.prototype.rab=function(){var c=this;return new Promise(function(u,d){c.iab=u,c.jab=d,c.lab()})},c.new=function(u,d,p){return new c(u,d,p).rab()},c.eventMapping={playing:!0,ended:!0,pause:!1,abort:!1,emptied:!1,error:!1},c}()},43662:function(c,u,d){var p,h,f,m,g,v,y,b,S,_,E,T,w,P,A,I,M=this&&this.__runInitializers||function(c,u,d){for(var p=arguments.length>2,h=0;h<u.length;h++)d=p?u[h].call(c,d):u[h].call(c);return p?d:void 0},R=this&&this.__esDecorate||function(c,u,d,p,h,f){function m(c){if(void 0!==c&&"function"!=typeof c)throw TypeError("Function expected");return c}for(var g,v=p.kind,y="getter"===v?"get":"setter"===v?"set":"value",b=!u&&c?p.static?c:c.prototype:null,S=u||(b?Object.getOwnPropertyDescriptor(b,p.name):{}),_=!1,E=d.length-1;E>=0;E--){var T={};for(var w in p)T[w]="access"===w?{}:p[w];for(var w in p.access)T.access[w]=p.access[w];T.addInitializer=function(c){if(_)throw TypeError("Cannot add initializers after decoration has completed");f.push(m(c||null))};var P=(0,d[E])("accessor"===v?{get:S.get,set:S.set}:S[y],T);if("accessor"===v){if(void 0===P)continue;if(null===P||"object"!=typeof P)throw TypeError("Object expected");(g=m(P.get))&&(S.get=g),(g=m(P.set))&&(S.set=g),(g=m(P.init))&&h.unshift(g)}else(g=m(P))&&("field"===v?h.unshift(g):S[y]=g)}b&&Object.defineProperty(b,p.name,S),_=!0};Object.defineProperty(u,"__esModule",{value:!0}),u.Player=void 0;var k,x=d(88052),C=d(40306),O=d(3336),D=d(45202),L=d(20213),N=d(88210),U=d(29691),F=d(69957),B=d(44468),j=d(70850),H=0;function V(){k||(k=new WeakMap)}function z(c,u){V();var d=k.get(c);if(!d)throw new B.PlayerAPINotAvailableError(u);return d}A=[],p=function(){function c(c,u){M(this,A),this.a(c,u)}return c.prototype.a=function(c,u){if(!(c instanceof HTMLElement))throw new O.PlayerError(C.ErrorCode.SETUP_NO_HTML_ELEMENT,void 0,"The player container must be an HTMLElement.");V();var d=new U.InternalPlayer(c,j.Util.generateUniqueId(),this);k.set(this,d),H++,d.setup(u)}
13,Object.defineProperty(c.prototype,"version",{get:function(){return D.Environment.VERSION_NUMBER},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"vr",{get:function(){return z(this,"vr").getVR()},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"buffer",{get:function(){return z(this,"buffer").bufferApi},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"lowlatency",{get:function(){return z(this,"lowlatency").lowLatencyApi},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"adaptation",{get:function(){return z(this,"adaptation").adaptationApi},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"subtitles",{get:function(){return z(this,"subtitles").subtitlesApi},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"manifest",{get:function(){return z(this,"manifest").manifestApi},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"drm",{get:function(){return z(this,"drm").drmApi},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"ads",{get:function(){return z(this,"ads")?k.get(this).getAds():null},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"sgai",{get:function(){return z(this,"sgai")?k.get(this).getSgaiAPI():null},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"analytics",{get:function(){return z(this,"analytics").analyticsApi}
vendor: 6,869 bytes, line 13
13,set:function(c){z(this,"analytics").analyticsApi=c},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"exports",{get:function(){return L},enumerable:!1,configurable:!0}),c.prototype.on=function(c,u){z(this,"on").on(c,u)},c.prototype.addMetadata=function(c,u){return z(this,"addMetadata").addMetadata(c,u)},c.prototype.castStop=function(){z(this,"cast").castStop()},c.prototype.castVideo=function(){z(this,"castVideo").castVideo()},c.prototype.clearQueryParameters=function(){z(this,"clearQueryParameters").clearQueryParameters()},c.prototype.destroy=function(){var c=z(this,"destroy").destroy();return k.delete(this),H--,c},c.prototype.getAspectRatio=function(){return z(this,"getAspectRatio").getAspectRatio()},c.prototype.getAudio=function(){return z(this,"getAudio").getAudio()},c.prototype.getAudioBufferLength=function(){return z(this,"getAudioBufferLength").getAudioBufferLength()},c.prototype.getAudioQuality=function(){return z(this,"getAudioQuality").getAudioQuality()},c.prototype.getAvailableAudio=function(){return z(this,"getAvailableAudio").getAvailableAudio()},c.prototype.getAvailableAudioQualities=function(){return z(this,"getAvailableAudioQualities").getAvailableAudioQualities()},c.prototype.getAvailableSegments=function(){return z(this,"getAvailableSegments").getAvailableSegments()},c.prototype.getAvailableVideoQualities=function(){return z(this,"getAvailableVideoQualities").getAvailableVideoQualities()},c.prototype.getConfig=function(c){return z(this,"getConfig").getConfig(c)},c.prototype.getContainer=function(){return z(this,"getContainer").getContainer()},c.prototype.getCurrentTime=function(c){return void 0===c&&(c=B.TimeMode.AbsoluteTime),z(this,"getCurrentTime").getCurrentTime("api",c)},c.prototype.getDownloadedAudioData=function(){return z(this,"getDownloadedAudioData").getDownloadedAudioData()},c.prototype.getDownloadedVideoData=function(){return z(this,"getDownloadedVideoData").getDownloadedVideoData()},c.prototype.getDroppedVideoFrames=function(){return z(this,"getDroppedVideoFrames").getDroppedVideoFrames()},c.prototype.getDuration=function(){return z(this,"getDuration").getDuration()},c.prototype.getManifest=function(){return z(this,"getManifest").getManifest()},c.prototype.getMaxTimeShift=function(){return z(this,"getMaxTimeShift").getMaxTimeShift()},c.prototype.getPlaybackAudioData=function(){return z(this,"getPlaybackAudioData").getPlaybackAudioData()},c.prototype.getPlaybackSpeed=function(){return z(this,"getPlaybackSpeed").getPlaybackSpeed()},c.prototype.getPlaybackVideoData=function(){return z(this,"getPlaybackVideoData").getPlaybackVideoData()},c.prototype.getPlayerType=function(){return z(this,"getPlayerType").getPlayerType()},c.prototype.getSnapshot=function(c,u){return z(this,"getSnapshot").getSnapshot(c,u)},c.prototype.getStreamType=function(){return z(this,"getStreamType").getStreamType()},c.prototype.getSupportedDRM=function(){return z(this,"getSupportedDRM").getSupportedDRM()},c.prototype.getSupportedTech=function(c){return void 0===c&&(c=B.SupportedTechnologyMode.Platform),z(this,"getSupportedTech").getSupportedTech(c)},c.prototype.getThumbnail=function(c){return z(this,"getThumbnail").getThumbnail(c)},c.prototype.getTimeShift=function(){return z(this,"getTimeShift").getTimeShift()},c.prototype.getTotalStalledTime=function(){return z(this,"getTotalStalledTime").getTotalStalledTime()},c.prototype.getVideoBufferLength=function(){return z(this,"getVideoBufferLength").getVideoBufferLength()},c.prototype.getVideoQuality=function(){return z(this,"getVideoQuality").getVideoQuality()},c.prototype.getVolume=function(){return z(this,"getVolume").getVolume()},c.prototype.hasEnded=function(){return z(this,"hasEnded").hasEnded()},c.prototype.isCastAvailable=function(){return z(this,"isCastAvailable").isCastAvailable()},c.prototype.isCasting=function(){return z(this,"isCasting").isCasting()},c.prototype.isDRMSupported=function(c){return z(this,"isDRMSupported").isDRMSupported(c)},c.prototype.isLive=function(){return z(this,"isLive").isLive()},c.prototype.isMuted=function(){return z(this,"isMuted").isMuted()},c.prototype.isPaused=function(){return z(this,"isPaused").isPaused()},c.prototype.isPlaying=function(){return z(this,"isPlaying").isPlaying()},c.prototype.isStalled=function(){return z(this,"isStalled").isStalled()},c.prototype.load=function(c,u,d){return z(this,"load").load(c,u,{seeking:d})},c.prototype.mute=function(c){z(this,"mute").mute(c)},c.prototype.pause=function(c){z(this,"pause").pause(c)},c.prototype.play=function(c){return z(this,"play").play(c)},c.prototype.off=function(c,u){z(this,"off").off(c,u)},c.prototype.getSeekableRange=function(){return z(this,"getSeekableRange").getSeekableRange()},c.prototype.seek=function(c,u){return z(this,"seek").seek(c,u)},c.prototype.setAspectRatio=function(c){return z(this,"setAspectRatio").setAspectRatio(c)},c.prototype.setAudio=function(c){z(this,"setAudio").setAudio(c)},c.prototype.setAudioQuality=function(c){z(this,"setAudioQuality").setAudioQuality(c)},c.prototype.setAuthentication=function(c){z(this,"getPlayerInstance").setAuthentication(c)},c.prototype.setPlaybackSpeed=function(c){z(this,"setPlaybackSpeed").setPlaybackSpeed(c)},c.prototype.setPosterImage=function(c,u){z(this,"setPosterImage").setPosterImage(c,u)},c.prototype.setQueryParameters=function(c){z(this,"setQueryParameters").setQueryParameters(c)},c.prototype.setVideoElement=function(c){z(this,"setVideoElement").setVideoElement(c)},c.prototype.setVideoQuality=function(c){z(this,"setVideoQuality").setVideoQuality(c)},c.prototype.setVolume=function(c,u){z(this,"setVolume").setVolume(c,u)},c.prototype.setVRStereo=function(c){return z(this,"setVRStereo").setVRStereo(c)},c.prototype.timeShift=function(c,u){z(this,"timeShift").timeShift(c,u)},c.prototype.unload=function(){return z(this,"unload").unload()},c.prototype.unmute=function(c){z(this,"unmute").unmute(c)},c.prototype.isAirplayAvailable=function(){return z(this,"isAirplayAvailable").isAirplayAvailable()},c.prototype.isAirplayActive=function(){return z(this,"isAirplayActive").isAirplayActive()},c.prototype.showAirplayTargetPicker=function(){z(this,"showAirplayTargetPicker").showAirplayTargetPicker()},c.prototype.getBufferedRanges=function(){return z(this,"getBufferedRanges").getBufferedRanges()},c.prototype.preload=function(){z(this,"preload").preload()},c.prototype.setLogLevel=function(c){z(this,"setLogLevel").setLogLevel(c)},c.prototype.getVideoElement=function(){return z(this,"getVideoElement").getVideoElement()},c.prototype.getViewMode=function(){return z(this,"getViewMode").getViewMode()},c.prototype.isViewModeAvailable=function(c){return z(this,"isViewModeAvailable").isViewModeAvailable(c)},c.prototype.setViewMode=function(c,u){z(this,"setViewMode").setViewMode(c,u)},c.prototype.getSource=function(){return z(this,"getSource").getSource()}
13,Object.defineProperty(c,"version",{get:function(){return D.Environment.VERSION_NUMBER},enumerable:!1,configurable:!0}),c.addModule=function(c){x.ModuleManager.add(c)},c.removeModule=function(c){if(H>0)throw new O.PlayerError(C.ErrorCode.MODULE_REMOVED,void 0,"Cannot remove module while player instances are active");x.ModuleManager.remove(c)},c.getModules=function(){return x.ModuleManager.getModuleNames()},c}(),I="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,h=[(0,F.trackPerformance)("Player.init")],f=[N.EnumerableValue],m=[N.EnumerableValue],g=[N.EnumerableValue],v=[N.EnumerableValue],y=[N.EnumerableValue],b=[N.EnumerableValue],S=[N.EnumerableValue],_=[N.EnumerableValue],E=[N.EnumerableValue],T=[N.EnumerableValue],w=[N.EnumerableValue],P=[N.EnumerableValue],R(p,null,h,{kind:"method",name:"a",static:!1,private:!1,access:{has:function(c){return"a"in c},get:function(c){return c.a}},metadata:I},null,A),R(p,null,f,{kind:"getter",name:"version",static:!1,private:!1,access:{has:function(c){return"version"in c},get:function(c){return c.version}},metadata:I},null,A),R(p,null,m,{kind:"getter",name:"vr",static:!1,private:!1,access:{has:function(c){return"vr"in c},get:function(c){return c.vr}},metadata:I},null,A),R(p,null,g,{kind:"getter",name:"buffer",static:!1,private:!1,access:{has:function(c){return"buffer"in c},get:function(c){return c.buffer}},metadata:I},null,A),R(p,null,v,{kind:"getter",name:"lowlatency",static:!1,private:!1,access:{has:function(c){return"lowlatency"in c},get:function(c){return c.lowlatency}},metadata:I},null,A),R(p,null,y,{kind:"getter",name:"adaptation",static:!1,private:!1,access:{has:function(c){return"adaptation"in c},get:function(c){return c.adaptation}},metadata:I},null,A),R(p,null,b,{kind:"getter",name:"subtitles",static:!1,private:!1,access:{has:function(c){return"subtitles"in c},get:function(c){return c.subtitles}},metadata:I},null,A),R(p,null,S,{kind:"getter",name:"manifest",static:!1,private:!1,access:{has:function(c){return"manifest"in c},get:function(c){return c.manifest}},metadata:I},null,A),R(p,null,_,{kind:"getter",name:"drm",static:!1,private:!1,access:{has:function(c){return"drm"in c},get:function(c){return c.drm}},metadata:I},null,A),R(p,null,E,{kind:"getter",name:"ads",static:!1,private:!1,access:{has:function(c){return"ads"in c},get:function(c){return c.ads}},metadata:I},null,A),R(p,null,T,{kind:"getter",name:"sgai",static:!1,private:!1,access:{has:function(c){return"sgai"in c},get:function(c){return c.sgai}},metadata:I},null,A),R(p,null,w,{kind:"getter",name:"analytics",static:!1,private:!1,access:{has:function(c){return"analytics"in c},get:function(c){return c.analytics}},metadata:I},null,A),R(p,null,P,{kind:"getter",name:"exports",static:!1,private:!1,access:{has:function(c){return"exports"in c},get:function(c){return c.exports}},metadata:I},null,A),I&&Object.defineProperty(p,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:I}),u.Player=p},44468:function(c,u,d){var p,h,f,m,g,v,y,b,S,_=this&&this.__extends||(P=function(c,u){return(P=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}P(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.TimeMode=u.SupportedTechnologyMode=u.ViewMode=u.PlayerAPINotAvailableError=u.LogLevel=u.BufferType=u.MediaType=u.StreamType=u.PlayerType=void 0;var E=d(40306),T=d(3336),w=d(32886);Object.defineProperty(u,"PlayerType",{enumerable:!0,get:function(){return w.PlayerType}});var P,A,I,M,R=d(65623);Object.defineProperty(u,"StreamType",{enumerable:!0,get:function(){return R.StreamType}}),(p=A||(u.MediaType=A={})).Audio="audio",p.Video="video",p.Subtitles="subtitles",p.Thumbn
vendor: 12,136 bytes, line 13
13ails="thumbnails",(h=I||(u.BufferType=I={})).ForwardDuration="forwardduration",h.BackwardDuration="backwardduration",(f=M||(u.LogLevel=M={})).DEBUG="debug",f.LOG="log",f.WARN="warn",f.ERROR="error",f.OFF="off",u.PlayerAPINotAvailableError=function(c){function u(u){return c.call(this,E.ErrorCode.API_NOT_AVAILABLE,void 0,"Cannot use the `player.".concat(u,"` API: the player has already been destroyed."))||this}return _(u,c),u}(T.PlayerError),(y=m||(u.ViewMode=m={})).Inline="inline",y.Fullscreen="fullscreen",y.PictureInPicture="pictureinpicture",(b=g||(u.SupportedTechnologyMode=g={})).Platform="platform",b.Modules="modules",b.PlatformAndModules="platformandmodules",(S=v||(u.TimeMode=v={})).RelativeTime="relativetime",S.AbsoluteTime="absolutetime"},72786:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.PlayerBufferApiFactory=void 0,u.PlayerBufferApiFactory=function(){function c(){}return c.create=function(c){return new(function(){function u(){}return u.prototype.setTargetLevel=function(u,d,p){c.setTargetBufferLevel(u,d,p)},u.prototype.getLevel=function(u,d){return c.getBufferLevel(u,d)},u}())},c}()},21281:function(c,u){var d,p,h,f,m,g,v,y;Object.defineProperty(u,"__esModule",{value:!0}),u.LiveSynchronizationMethod=u.RttEstimationMethod=u.AdaptationLogicType=u.TimelineReferencePoint=void 0,(m=d||(u.TimelineReferencePoint=d={})).Start="start",m.End="end",m.CurrentTime="currenttime",(g=p||(u.AdaptationLogicType=p={})).BUFFER="v1",g.BUFFER_FILL_RATE="v2",g.DOWNLOAD_PREDICTION="v3",g.LOW_LATENCY="low-latency-v1",g.WISH="wish",(v=h||(u.RttEstimationMethod=h={})).WeightedAverage="weightedaverage",v.Median="median",(y=f||(u.LiveSynchronizationMethod=f={})).HttpHead="httphead",y.HttpXsDate="httpxsdate",y.HttpIso="httpiso"},53031:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.PlayerContext=void 0;var p=d(17564),h=d(56481),f=d(70962),m=d(6873),g=d(8973),v=d(21513),y=d(61089),b=d(70850),S=d(85902);u.PlayerContext=function(){function c(c){this.internalPlayer=c.internalPlayer,this.internalPlayerID=b.Util.generateUniqueId(),this.config=c.config||{playback:{}},this.storedConfig=c.storedConfig,this.settings=c.settings||f.DefaultSettings,this.bufferSettings=new p.BufferSettings(this.settings.TARGET_BUFFER_LEVEL,c.logger),this.parentHtmlElement=c.container||null,this.jW(),this.logger=c.logger,this.eventHandler=c.eventHandler,this.serviceManager=c.serviceManager,this.segmentInfoService=c.segmentInfoService,this.segmentPrefetchingService=c.segmentPrefetchingService,this.segmentCacheService=c.segmentCacheService,this.adRestorationOptimizationService=c.adRestorationOptimizationService,this.iW=!1}return c.prototype.jW=function(){this.store=new y.StoreService((0,v.default)(),"instances",this.internalPlayerID),this.store.addReducers({player:g.PlayerReducer,metrics:m.MetricsReducer})},c.prototype.setVideoElement=function(c){this.videoElement=S.VideoElementWrapperFactory.createWrappedVideoElement(this,c)},c.prototype.setSourceContext=function(c){this.sourceContext=c},c.prototype.setRenderer=function(c){this.renderer=c},Object.defineProperty(c.prototype,"isDisposed",{get:function(){return this.iW},enumerable:!1,configurable:!0}),c.prototype.dispose=function(){this.iW=!0,this.serviceManager=(0,h.dispose)(this.serviceManager),this.renderer=null,this.parentHtmlElement=null,this.eventHandler=null,this.segmentInfoService=null,this.segmentPrefetchingService=null,this.segmentCacheService=void 0,this.adRestorationOptimizationService=null,this.store=(0,h.dispose)(this.store)},c}()},29242:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.PlayerFactory=void 0;var p=d(88052),h=d(62756),f=d(40306),m=d(3336),g=d(44468),v=d(21513),y=d(47993),b=d(43767);u.PlayerFactory=function(){function c(){this.EX=b.FileLoader.getInstance()}return c.constructSetupError=function(u,d,p,h){return c.isSourceValid(d)?u?new m.PlayerError(f.ErrorCode.SOURCE_FORCED_TECHNOLOGY_NOT_SUPPORTED,{"player-type":u.player,"supported-tech":JSON.stringify(p)},"The selected technology is not supported by the player on this platform."):d.hasOwnProperty("vr")?new m.PlayerError(f.ErrorCode.VR_INCOMPATIBLE_PLAYER_TECHNOLOGY,void 0,"This platform does not support VR playback."):h?new m.PlayerError(f.ErrorCode.SOURCE_NO_SUPPORTED_TECHNOLOGY,void 0,"The platform does not support any of the technologies needed to play back the provided source."):new m.PlayerError(f.ErrorCode.SOURCE_NO_STREAM_FOUND_FOR_SUPPORTED_TECHNOLOGY,{"supported-tech":JSON.stringify(p)},"The platform does not support any of the technologies needed to play back the provided source."):new m.PlayerError(f.ErrorCode.SOURCE_INVALID,{source:d},"No DASH / HLS / Smooth / Progressive stream detected in the provided source.")},c.isSourceValid=function(c){var u,d,p,h;return c&&!!(null!=(h=null!=(p=null!=(d=null!=(u=c.dash)?u:c.hls)?d:c.progressive)?p:c.smooth)?h:c.whep)},c.prototype.getInstance=function(u){var d=Object.getOwnPropertyNames(u.source),p=(0,v.getCapabilities)().techSupportedByPlatform,h=(0,y.getBestTech)(u.config.playback().preferredTech,u.source,u.forceTech);if(d.length>0&&!c.isSourceValid(u.source))return Promise.reject(new m.PlayerError(f.ErrorCode.SOURCE_STREAM_TYPE_NOT_SUPPORTED,{streamType:JSON.stringify(d),supportedTech:JSON.stringify(p)},"The specified stream type is not supported by this platform."));if(d.length>0&&!h)return Promise.reject(c.constructSetupError(u.forceTech,u.source,p,h));if(d.length<=0&&!p.length)return Promise.reject(c.constructSetupError(u.forceTech,u.source,p));d.length<=0&&(h=p[0]);var g=u.context.videoElement.getWrappedElement();u.styleManager?(u.styleManager.initializeInternalPlayer(g),u.styleManager.maybeStartTrackingVisibility(g)):!g.parentNode&&u.container&&u.container.appendChild(g),g.muted=u.playerInstance.muted,g.volume=u.playerInstance.volume/100;var b=u.config.adaptation(),S=b.bitrates.maxSelectableVideoBitrate;if((0,v.getCapabilities)().isMobile&&(b.bitrates.maxSelectableVideoBitrate=Math.min(S,1e7),b.exclude=!0),h){var _=c.createRenderer(u.context,h);u.context.setRenderer(_)}return this.GX(u.context,h)},c.createRenderer=function(c,u){return u.player===g.PlayerType.Html5?((0,v.getCapabilities)().isTizen||c.settings.DWORD_BASE_MEDIA_DECODE_TIMESTAMPS)&&p.ModuleManager.has(h.ModuleName.Tizen)?new(p.ModuleManager.get(h.ModuleName.Tizen).getTizenMSERendererConstructor())(c):(0,v.getCapabilities)().isWebOS&&p.ModuleManager.has(h.ModuleName.Webos)?new(p.ModuleManager.get(h.ModuleName.Webos).getWebosRendererConstructor())(c):(0,v.getCapabilities)().isPlayStation5&&p.ModuleManager.has(h.ModuleName.PlayStation5)?new(p.ModuleManager.get(h.ModuleName.PlayStation5).getPlayStation5MSERendererConstructor())(c):(0,v.getCapabilities)().isPlayStation4&&p.ModuleManager.has(h.ModuleName.PlayStation4)?new(p.ModuleManager.get(h.ModuleName.PlayStation4).getPlayStation4MSERendererConstructor())(c):(0,v.getCapabilities)().isVidaa&&p.ModuleManager.has(h.ModuleName.Vidaa)?new(p.ModuleManager.get(h.ModuleName.Vidaa).getVidaaMSERendererConstructor())(c):(0,v.getCapabilities)().isWpeWebKit&&p.ModuleManager.has(h.ModuleName.Wpe)?new(p.ModuleManager.get(h.ModuleName.Wpe).getWpeMSERendererConstructor())(c):new(p.ModuleManager.get(h.ModuleName.RendererMse)).MSERenderer(c):null},c.prototype.GX=function(c,u){var d,v=this;if(!c.renderer&&u.player===g.PlayerType.Html5)return Promise.reject(new m.PlayerError(f.ErrorCode.SETUP_NO_RENDERING_ENGINE,{tech:JSON.stringify(u)},"Could not create player: no suitable rendering engine was found. Additional modules may be required."));if(!this.FX&&p.ModuleManager.has(h.ModuleName.RemoteControl)){var y=p.ModuleManager.get(h.ModuleName.RemoteControl).RemoteControlManager;this.FX=new y(c,this.EX)}if(u.player===g.PlayerType.WebRtc)d=Promise.resolve(new(p.ModuleManager.get(h.ModuleName.EngineWebRtc)).WebRtcPlayer(c));else if(u.player===g.PlayerType.Native)d=Promise.resolve(new(p.ModuleManager.get(h.ModuleName.EngineNative)).NativePlayer(c));else{if(u.player!==g.PlayerType.Html5)return Promise.reject(new m.PlayerError(f.ErrorCode.SOURCE_STREAM_TYPE_NOT_SUPPORTED,{given:u.player,supported:"html5, native"},"The specified technology is not supported by the player."));d=c.renderer.ready().then(function(){return new(p.ModuleManager.get(h.ModuleName.EngineBitmovin)).MediaPlayer(c)})}return d.then(function(u){return v.FX?v.FX.getPlayerWrapper(c,u):u}).then(function(d){return{context:c,logger:c.logger,bitdashPlayer:d,technology:u,videoElement:c.videoElement}})},c}()},52546:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.PlayerStateService=void 0;var p=d(80813),h=d(3714),f=d(23690),m=d(87827),g=d(85648);u.PlayerStateService=function(){function c(c){var u=this;this.VX=function(){u.YX((0,f.setPlayerHasBeenPlaying)(!1))},this.WX=function(){u.YX((0,f.setPlayerHasBeenPlaying)(!0))},this.XX=function(){return m.getPlayerState(u.RX.store.getState())},this.YX=function(c){u.RX.store.dispatch(c)},this.bX=function(c,d){u.playbackState!==c&&(u.playbackState=c,u.YX((0,f.addPlayerPendingTransition)(c))),d&&d()},this.cX=function(c,d){if(u.playbackState!==c)u.playbackState=c,u.YX((0,f.filterPlayerPendingTransition)(c));else{if(!u.dX(c))return;u.RX.logger.debug("Pending state ".concat(g.PlaybackState[c])),u.YX((0,f.removePlayerPendingTransition)(0))}d&&d()},this.RX=c,this.SX=c.eventHandler,this.SX.on(h.PlayerEvent.Playing,this.WX,!0),this.SX.on(h.PlayerEvent.SourceUnloaded,this.VX,!0),this.YX((0,f.resetPlayerState)(["viewMode","remoteControlState"])),this.TX=c.serviceManager.get(p.ServiceName.StallTimeTrackerService),this.UX=!1}return c.prototype.reset=function(){this.transitionToSeekedState(!1),this.stallExit(),this.playbackState=g.PlaybackState.None,this.seekState=g.SeekState.None},Object.defineProperty(c.prototype,"playbackState",{get:function(){return this.XX().playbackState},set:function(c){var u=this.XX().playbackState;this.RX.logger.debug("State change ".concat(g.PlaybackState[u]," -> ").concat(g.PlaybackState[c])),this.YX((0,f.setPlayerPlayback)(c))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"seekState",{get:function(){return this.XX().seekState},set:function(c){var u=this.XX().seekState;this.RX.logger.debug("SeekState change ".concat(g.SeekState[u]," -> ").concat(g.SeekState[c])),this.YX((0,f.setPlayerSeek)(c))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"timeShiftState",{get:function(){return this.XX().timeShiftState},set:function(c){var u=this.XX().timeShiftState;this.RX.logger.debug("TimeShiftState change ".concat(g.TimeShiftState[u]," -> ").concat(g.TimeShiftState[c])),this.YX((0,f.setPlayerTimeShift)(c))},enumerable:!1,configurable:!0}),c.prototype.ZX=function(c,u,d,p,m){this.seekState=c,p&&this.SX.dispatchEvent(h.PlayerEvent.Seek,{position:m??this.eX(),seekTarget:u,issuer:d||"api"}),this.YX((0,f.setPlayerTargetPlaybackTime)(u))},c.prototype.transitionToSeekingState=function(c,u,d){void 0===d&&(d=!0),this.ZX(g.SeekState.Seeking,c,u,d)},c.prototype.transitionToSeekingIOSState=function(c,u,d,p){void 0===d&&(d=!0),this.ZX(g.SeekState.SeekingIOS,c,u,d,p)},c.prototype.transitionToSeekedState=function(c){void 0===c&&(c=!0),this.isSeeking()&&(this.seekState=g.SeekState.Seeked,c&&this.SX.dispatchEvent(h.PlayerEvent.Seeked)),this.aX()},c.prototype.aX=function(){this.YX((0,f.setPlayerTargetPlaybackTime)(-1))},c.prototype.isSeeking=function(){return m.getIsSeeking(this.XX())},c.prototype.transitionToTimeShiftingState=function(c,u,d,p){void 0===p&&(p=!0),this.YX((0,f.setPlayerTimeShift)(g.TimeShiftState.Shifting)),p&&this.SX.dispatchEvent(h.PlayerEvent.TimeShift,{position:c,target:u,issuer:d||"api"}),this.YX((0,f.setPlayerTargetPlaybackTime)(u))},c.prototype.transitionToTimeShiftedState=function(c){void 0===c&&(c=!0),this.YX((0,f.setPlayerTimeShift)(g.TimeShiftState.Shifted)),c&&this.SX.dispatchEvent(h.PlayerEvent.TimeShifted),this.aX()},c.prototype.transitionToStoppedState=function(){this.YX((0,f.setPlayerPlayback)(g.PlaybackState.Stopped))},c.prototype.isInitial=function(){return m.getIsInitialPlayback(this.XX())},c.prototype.isTimeShifting=function(){return m.getIsTimeShifting(this.XX())}
13,Object.defineProperty(c.prototype,"isStalled",{get:function(){return this.XX().isStalled},set:function(c){this.YX((0,f.setPlayerStall)(c))},enumerable:!1,configurable:!0}),c.prototype.setIsRendererStalling=function(c){this.YX((0,f.setRendererStallAction)(c)),c&&this.isPlaying()&&!this.hasPendingTransitionToPausedState()&&(this.UX=!0),c?this.stallEnter():this.stallExit()},c.prototype.getIsRendererStalling=function(){return m.getIsRendererStalled(this.XX())},c.prototype.isPlaying=function(){return m.getIsPlaying(this.XX())},c.prototype.isPlay=function(){return m.getIsPlay(this.XX())},c.prototype.isPaused=function(){return m.getIsPaused(this.XX())},c.prototype.isStopped=function(){return m.getIsStopped(this.XX())},c.prototype.stallEnter=function(){this.isPlay()||this.isSeeking()||this.isTimeShifting()||this.isSeeking()||this.isTimeShifting()||this.isStalled||this.isPaused()||this.isStopped()||(this.isStalled=!0,this.TX.startStall(),this.SX.dispatchEvent(h.PlayerEvent.StallStarted,{}))},c.prototype.stallExit=function(){this.isStalled&&(this.isStalled=!1,this.TX.endStall(),this.SX.dispatchEvent(h.PlayerEvent.StallEnded,{}))},c.prototype.hasPendingTransitionToPausedState=function(){return this.dX(g.PlaybackState.Paused)},c.prototype.dX=function(c){return this.XX().pendingTransitions[0]===c},c.prototype.eX=function(){return this.RX.videoElement.currentTime},c.prototype.fX=function(c,u,d){var p=this;this.isPlaying()||(c?d(g.PlaybackState.Play,function(){p.SX.dispatchEvent(h.PlayerEvent.Play,{time:p.eX(),issuer:u},!1)}):d(g.PlaybackState.Play))},c.prototype.transitionToPlayState=function(c,u){this.fX(c,u,this.cX)},c.prototype.transitionToPendingPlayState=function(c,u){this.fX(c,u,this.bX)},c.prototype.transitionToPlayingState=function(c,u){var d=this;void 0===u&&(u=!0),this.cX(g.PlaybackState.Playing,function(){u&&d.SX.dispatchEvent(h.PlayerEvent.Playing,{time:d.eX(),issuer:c},!1)})},c.prototype.transitionToPausedState=function(c,u,d){var p=this;(void 0===d&&(d=!1),d&&this.UX)?(this.RX.logger.insane("Ignoring transition to paused from video element"),this.UX=!1):(this.UX=!1,c&&this.isStalled&&this.stallExit(),this.RX.videoElement.ended||(c?this.cX(g.PlaybackState.Paused,function(){p.SX.dispatchEvent(h.PlayerEvent.Paused,{time:p.eX(),issuer:u},!1)}):this.bX(g.PlaybackState.Paused)))},Object.defineProperty(c.prototype,"targetPlaybackTime",{get:function(){return this.XX().targetPlaybackTime},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"playbackSpeed",{get:function(){var c=this.XX().playbackSpeed;return c.speed*c.multiplier},enumerable:!1,configurable:!0}),c.prototype.setPlaybackSpeed=function(c,u,d){void 0===u&&(u=1),void 0===d&&(d=!0);var p=m.getPlaybackSpeed(this.XX());p.speed===c&&p.multiplier===u||(this.YX((0,f.setPlayerPlaybackSpeed)({speed:c,multiplier:u})),d&&this.SX.dispatchEvent(h.PlayerEvent.PlaybackSpeedChanged,{from:p.speed,to:c}))},Object.defineProperty(c.prototype,"seekingOrTimeshifting",{get:function(){return m.getIsSeekingOrTimeshifting(this.XX())},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"seekedOrTimeshifted",{get:function(){return m.getIsSeekedOrTimeshifted(this.XX())},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isInitialStall",{get:function(){return m.getIsInitialStall(this.XX())},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"hasBeenPlaying",{get:function(){return this.XX().hasBeenPlaying},enumerable:!1,configurable:!0}),c.prototype.dispose=function(){this.SX.off(h.PlayerEvent.Playing,this.WX),this.SX.off(h.PlayerEvent.SourceUnloaded,this.VX)},c}()},29488:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},h=this&&this.__awaiter||function(c,u,d,p){return new(d||(d=Promise))(function(h,f){function m(c){try{v(p.next(c))}catch(c){f(c)}}function g(c){try{v(p.throw(c))}catch(c){f(c)}}function v(c){var u;c.done?h(c.value):((u=c.value)instanceof d?u:new d(function(c){c(u)})).then(m,g)}v((p=p.apply(c,u||[])).next())})},f=this&&this.__generator||function(c,u){var d,p,h,f={label:0,sent:function(){if(1&h[0])throw h[1];return h[1]},trys:[],ops:[]},m=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return m.next=g(0),m.throw=g(1),m.return=g(2),"function"==typeof Symbol&&(m[Symbol.iterator]=function(){return this}),m;function g(g){return function(v){var y=[g,v];if(d)throw TypeError("Generator is already executing.");for(;m&&(m=0,y[0]&&(f=0)),f;)try{if(d=1,p&&(h=2&y[0]?p.return:y[0]?p.throw||((h=p.return)&&h.call(p),0):p.next)&&!(
13h=h.call(p,y[1])).done)return h;switch(p=0,h&&(y=[2&y[0],h.value]),y[0]){case 0:case 1:h=y;break;case 4:return f.label++,{value:y[1],done:!1};case 5:f.label++,p=y[1],y=[0];continue;case 7:y=f.ops.pop(),f.trys.pop();continue;default:if(!((h=(h=f.trys).length>0&&h[h.length-1])||6!==y[0]&&2!==y[0])){f=0;continue}if(3===y[0]&&(!h||y[1]>h[0]&&y[1]<h[3])){f.label=y[1];break}if(6===y[0]&&f.label<h[1]){f.label=h[1],h=y;break}if(h&&f.label<h[2]){f.label=h[2],f.ops.push(y);break}h[2]&&f.ops.pop(),f.trys.pop();continue}y=u.call(c,f)}catch(c){y=[6,c],p=0}finally{d=h=0}if(5&y[0])throw y[1];return{value:y[0]?y[1]:void 0,done:!0}}}};Object.defineProperty(u,"__esModule",{value:!0}),u.PlayerStateStore=void 0;var m=d(3714),g=d(75375),v=d(19274);u.PlayerStateStore=function(){function c(c,u){var d=this;this.context=c,this.internalPlayer=u,this.storedState=null,this.M4=[],this.b5=function(c){var u=c.subtitle;d.M4.some(function(c){return c.id===u.id})&&(d.internalPlayer.enableSubtitle(u.id),d.M4=d.M4.filter(function(c){return c.id!==u.id}))},this.c5=function(){d.a5()},u.on(m.PlayerEvent.SubtitleAdded,this.b5),u.on(m.PlayerEvent.SourceUnloaded,this.c5)}return c.prototype.getStoredState=function(){return this.storedState},c.prototype.hasStoredState=function(){return null!==this.storedState},c.prototype.capture=function(c){return!(c===g.RECOVERY_ISSUER_NAME&&!this.internalPlayer.getSource()||(this.storedState=this.capturePlayerState(c),0))},c.prototype.clear=function(){this.storedState=null},c.prototype.dispose=function(){this.a5()},c.prototype.capturePlayerState=function(c){var u,d=this.internalPlayer.isLive(),h=d&&!this.context.settings.ENABLE_SEEK_FOR_LIVE;return{source:this.internalPlayer.getSource(),loadOptions:this.internalPlayer.getLoadOptions(),playbackSpeed:this.internalPlayer.getPlaybackSpeed(),audioTrackId:null==(u=this.internalPlayer.getAudio())?void 0:u.id,audioQualityId:this.internalPlayer.getAudioQuality().id,videoQualityId:this.internalPlayer.getVideoQuality().id,subtitles:this.internalPlayer.listSubtitles().map(function(c){return p({},c)}),isLive:d,useTimeshiftForRestore:h,playbackPosition:h?this.internalPlayer.getTimeShift():this.internalPlayer.getCurrentTime(c),wasPaused:this.internalPlayer.isPaused(),contentDuration:this.internalPlayer.getDuration(),sourceIdentifier:this.context.sourceContext.sourceIdentifier,hasEnded:this.internalPlayer.hasEnded(),isStartup:!this.internalPlayer.hasCurrentSourcePlayedOnce()}},c.prototype.loadSource=function(c){var u,d,p=this.storedState;return null!=p&&p.source?this.internalPlayer.load(p.source,null==(u=p.loadOptions)?void 0:u.forceTechnology,null==(d=p.loadOptions)?void 0:d.restrictions,c):Promise.reject(Error("no source to load"))},c.prototype.restore=function(c){return h(this,void 0,void 0,function(){var u;return f(this,function(d){switch(d.label){case 0:if(!(u=this.storedState))throw Error("no stored state to restore");if(!u.source)throw Error("stored state has no source to restore");return[4,this.loadSource(c)];case 1:return d.sent(),this.restoreBaseState(u),this.N4(c),this.restoreSubtitles(u.subtitles),[2,!u.wasPaused]}})})},c.prototype.N4=function(c){var u=this.storedState;u&&(u.useTimeshiftForRestore?this.internalPlayer.timeShift(u.playbackPosition,c):this.internalPlayer.seek(u.playbackPosition,c))},c.prototype.restoreBaseState=function(c){c&&(this.internalPlayer.setPlaybackSpeed(c.playbackSpeed),this.Y5(c.audioTrackId),this.internalPlayer.setAudioQuality(c.audioQualityId),this.internalPlayer.setVideoQuality(c.videoQualityId))},c.prototype.Y5=function(c){var u=this;if(null!=c){var d=function(){return!!u.internalPlayer.getAvailableAudio().find(function(u){return u.id===c})&&(u.internalPlayer.setAudio(c),!0)};d()||(this.context.logger.log("Delaying audio track restore",c),this.Z5(d,m.PlayerEvent.AudioAdded))}},c.prototype.restoreSubtitles=function(c){for(var u=function(c){var u=d.internalPlayer.listSubtitles().find(function(u){return u.id===c.id});u?!u.enabled&&c.enabled&&d.internalPlayer.enableSubtitle(c.id,!1,!1):c.url?d.internalPlayer.addSubtitle(c):c.enabled&&(d.context.logger.log("Delaying subtitle restoration as track is not available yet",c),d.M4.push(c))},d=this,p=0;p<c.length;p++)u(c[p])},c.prototype.Z5=function(c,u,d,p){var h,f,g=this;void 0===p&&(p=2e3);var y=function(){var c;clearTimeout(f),g.internalPlayer.off(u,b),g.internalPlayer.off(m.PlayerEvent.SourceUnloaded,y),d?g.internalPlayer.off(d,y):null==(c=g.context.videoElement)||c.removeEventListener(v.MediaElementEvent.canplay,y)},b=function(u){c(u)&&y()};d?this.internalPlayer.onInternal(d,y):null==(h=this.context.videoElement)||h.addEventListener(v.MediaElementEvent.canplay,y),this.internalPlayer.onInternal(u,b),this.internalPlayer.onInternal(m.PlayerEvent.SourceUnloaded,y),f=setTimeout(y,p)},c.prototype.a5=function(){this.internalPlayer.off(m.PlayerEvent.SubtitleAdded,this.b5),this.internalPlayer.off(m.PlayerEvent.SourceUnloaded,this.c5),this.M4=[]},c}()},32886:function(c,u){var d,p;
13Object.defineProperty(u,"__esModule",{value:!0}),u.PlayerType=void 0,(p=d||(u.PlayerType=d={})).Html5="html5",p.Native="native",p.WebRtc="webrtc",p.Unknown="unknown"},83913:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.RecoveryService=void 0;var p=d(40306),h=d(25926),f=d(4224),m=d(3714),g=d(75375),v=d(29488),y=d(40153),b=[m.PlayerEvent.SourceLoaded,m.PlayerEvent.SourceUnloaded,m.PlayerEvent.Play,m.PlayerEvent.Ready,m.PlayerEvent.Playing,m.PlayerEvent.Paused,m.PlayerEvent.Seek,m.PlayerEvent.Seeked,m.PlayerEvent.TimeShift,m.PlayerEvent.TimeShifted];u.RecoveryService=function(){function c(c){this.playerContext=c,this.HX=null,this.IX=null,this.JX=null,this.KX=null,this.LX=function(c){return!b.includes(c)},this.MX=!1,this.NX=-1,this.OX=null,this.HX=c,this.IX=c.internalPlayer,this.JX=c.eventHandler,this.KX=c.logger}return Object.defineProperty(c.prototype,"isRecovering",{get:function(){return this.MX},enumerable:!1,configurable:!0}),c.prototype.PX=function(c){return[p.ErrorCode.PLAYBACK_ERROR,p.ErrorCode.PLAYBACK_VIDEO_DECODING_ERROR].includes(c.code)},c.prototype.handleError=function(c){var u,d,p,h,f,m,g,v,y,b,S,_,E,T,w,P,A=this;return null!=(d=null==(u=this.HX)?void 0:u.sourceContext)&&d.isAd?(null==(f=null==(h=null==(p=this.HX)?void 0:p.logger)?void 0:h.debug)||f.call(h,"Ad is currently playing... Skipping recovery..."),null==(g=null==(m=this.HX)?void 0:m.eventHandler)||g.fireError(c),Promise.resolve()):null!=(v=this.JX)&&v.hasErrorBeenFired?(null==(S=null==(b=null==(y=this.HX)?void 0:y.logger)?void 0:b.debug)||S.call(b,"Error already fired, skipping recovery for ".concat(c.code," (").concat(c.name,")")),Promise.resolve()):!this.PX(c)||this.MX?(this.MX&&(null==(T=null==(E=null==(_=this.HX)?void 0:_.logger)?void 0:E.debug)||T.call(E,"Recovery already in progress, firing error ".concat(c.code," (").concat(c.name,") immediately"))),null==(P=null==(w=this.HX)?void 0:w.eventHandler)||P.fireError(c),Promise.resolve()):(this.MX=!0,Promise.resolve().then(function(){return A.QX()}).catch(function(){var u,d;null==(d=null==(u=A.HX)?void 0:u.eventHandler)||d.fireError(c)}).finally(function(){A.MX=!1}))},c.prototype.QX=function(){var c,u=this;if(!this.IX)return Promise.resolve();if(this.OX=new v.PlayerStateStore(this.HX,this.IX),!this.OX.capture(g.RECOVERY_ISSUER_NAME))return this.OX.dispose(),this.OX=null,Promise.reject(Error("No source available for recovery"));var d=this.IX.getCurrentTime(g.RECOVERY_ISSUER_NAME);return y.ErrorRecoveryUtil.wasRecoveryAttemptedAtPosition(d,this.NX)?(this.OX.dispose(),this.OX=null,Promise.reject(Error("Recovery not allowed: already attempted at position ".concat(d)))):(this.NX=d,this.IX.fireEvent(m.PlayerEvent.Warning,new h.PlayerWarning(f.WarningCode.PLAYBACK_VIDEO_DECODING_ERROR_RECOVERY,"Attempting to recover from error by reloading the media source",{time:d})),null==(c=this.JX)||c.addExternalEventFilter(this.LX),this.OX.restore(g.RECOVERY_ISSUER_NAME).then(function(c){var d,p;return u.OX=null,null==(p=null==(d=u.KX)?void 0:d.log)||p.call(d,"Error recovery completed successfully"),c?u.IX.play(g.RECOVERY_ISSUER_NAME):u.IX.pause(g.RECOVERY_ISSUER_NAME)},function(c){var d,p,h;throw null==(p=null==(d=u.KX)?void 0:d.error)||p.call(d,"Failed to recover from error during reload sequence:",c),null==(h=u.OX)||h.dispose(),u.OX=null,c}).finally(function(){var c;null==(c=u.JX)||c.removeExternalEventFilter(u.LX)}))},c.prototype.dispose=function(){var c,u;this.MX&&(null==(c=this.JX)||c.removeExternalEventFilter(this.LX)),null==(u=this.OX)||u.dispose(),this.OX=null,this.NX=-1,this.MX=!1,this.HX=null,this.IX=null,this.JX=null,this.KX=null},c}()},25541:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.dateRangeToISOString=function(c){return new Date(Date.parse(c.startDate)+(0,p.toMilliSeconds)(c.duration)).toISOString()},u.mergeSegmentLists=h,u.updateTimeline=function(c,u){return u.forEach(function(c){return c.consumed=!1}),0===c.length?u:h(c,u)},u.populateCurrentTimelineWithPlaybackTime=function(c,u,d){var p;c[u]&&(function(){p=d;for(var h=u;h<c.length;h++)c[h].playbackTime=p,p+=c[h].duration}(),function(){p=d;for(var h=u-1;h>=0;h--)c[h].playbackTime=p-c[h].duration,p-=c[h].duration}())};var p=d(89927);function h(c,u){var d={},p=function(c){var u=c.discontinuitySequenceNumber,d=c.uri;return u?"".concat(d,"_").concat(u):d};return u.forEach(function(c){return d[p(c)]=c}
13),c.forEach(function(c){d[p(c)]&&(d[p(c)]=c)}),Object.values(d)}},70962:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.DefaultSettings=u.WishDefaultConfig=void 0;var p,h,f,m,g=d(29669),v=d(44468);u.WishDefaultConfig={TARGET_BITRATE_FACTOR:1,TARGET_BUFFER_FACTOR:.8,BITRATE_MODIFIER_FUNCTION_TYPE:"log",USE_RATE_BASED_SELECTION_ON_SEEKING:!1},u.DefaultSettings={TARGET_BUFFER_LEVEL:((p={})[v.MediaType.Video]=((h={})[v.BufferType.ForwardDuration]=40,h[v.BufferType.BackwardDuration]=20,h),p[v.MediaType.Audio]=((f={})[v.BufferType.ForwardDuration]=40,f[v.BufferType.BackwardDuration]=20,f),p),BUFFER_LOGIC_ACTIVATION_THRESHOLD:10,MIN_TIMELINE_LIVE_OFFSET:4,RETRY_DELAY:2,MAX_INCREASE_RETRY_DELAY_SEC:30,INCREASE_RETRY_DELAY:!0,INCREASE_RETRY_DELAY_BASE_SEC:.25,DISABLE_RETRY_FOR_RESPONSE_STATUS:((m={})[g.HttpRequestType.MANIFEST_DASH]=[],m[g.HttpRequestType.MANIFEST_HLS_MASTER]=[],m[g.HttpRequestType.MANIFEST_HLS_VARIANT]=[],m[g.HttpRequestType.MANIFEST_SMOOTH]=[],m[g.HttpRequestType.MANIFEST_ADS]=[],m[g.HttpRequestType.MANIFEST_STEERING]=[],m[g.HttpRequestType.MEDIA_AUDIO]=[],m[g.HttpRequestType.MEDIA_VIDEO]=[],m[g.HttpRequestType.MEDIA_SUBTITLES]=[],m[g.HttpRequestType.MEDIA_THUMBNAILS]=[],m[g.HttpRequestType.MEDIA_SEGMENTINDEX]=[],m[g.HttpRequestType.DRM_LICENSE_WIDEVINE]=[],m[g.HttpRequestType.DRM_LICENSE_PLAYREADY]=[],m[g.HttpRequestType.DRM_LICENSE_FAIRPLAY]=[],m[g.HttpRequestType.DRM_LICENSE_PRIMETIME]=[],m[g.HttpRequestType.DRM_LICENSE_CLEARKEY]=[],m[g.HttpRequestType.DRM_LICENSE_TVKEY]=[],m[g.HttpRequestType.DRM_CERTIFICATE_FAIRPLAY]=[],m[g.HttpRequestType.HLS_INTERSTITIALS_ASSET_LIST]=[],m[g.HttpRequestType.KEY_HLS_AES]=[],m[g.HttpRequestType.TIME_SYNC]=[],m[g.HttpRequestType.WEBRTC_SDP_REQUEST]=[],m[g.HttpRequestType.WEBRTC_SDP_ANSWER]=[],m[g.HttpRequestType.WEBRTC_SDP_OFFER]=[],m[g.HttpRequestType.INTERNAL]=[],m[g.HttpRequestType.UNKNOWN]=[],m),METRIC_HISTORY_SIZE:30,DEFAULT_ADAPTATION_RULE_HISTORY_SIZE:40,LOG_LEVEL:2,LOG_PREFIX:"",RESTART_THRESHOLD:.9,RESTART_THRESHOLD_DELTA:.5,STARTUP_THRESHOLD:.9,STARTUP_THRESHOLD_DELTA:.5,DURATION_MISMATCH_TOLERANCE:.5,MAX_STARTUP_BUFFER:1/0,START_SEARCHING_END:2,MAX_RETRIES:2,MAX_CDN_RETRIES:2,MAX_MPD_RETRIES:2,MPD_RETRY_DELAY:.5,MPD_UPDATE_PERIOD_TOLERANCE:5,DRM_MAX_RETRIES:1,DRM_RETRY_DELAY:.25,DRM_WITH_CREDENTIALS:!1,CAST_APPLICATION_ID:"D3A86B20",CAST_MESSAGE_NAMESPACE:"urn:x-cast:com.bitmovin.player.cast2",BUFFER_VISIBILITY_DELAY:2,MIN_SELECTABLE_VIDEO_BITRATE:0,MAX_SELECTABLE_VIDEO_BITRATE:1/0,EXCLUDE_DISALLOWED_REPRESENTATIONS:!1,MIN_SELECTABLE_AUDIO_BITRATE:0,MAX_SELECTABLE_AUDIO_BITRATE:1/0,XHR_TIMEOUT:20,QUERY_PARAMETERS:void 0,GAP_TOLERANCE:.1,END_OF_BUFFER_TOLERANCE:.1,END_OF_BUFFER_RECOVERY_TOLERANCE:.5,MAX_POTENTIAL_GAP_TIME_DEVIATION:.125,SEEK_TO_END_OFFSET:2,MINIMUM_ALLOWED_UPDATE_PERIOD:1,MAXIMUM_ALLOWED_UPDATE_PERIOD:1/0,GLOBAL_DISABLE_SEEKING:!1,PRE_ROLL_RESTORE_THRESHOLD:.25,IOS_MIN_TIMEUPDATES_AFTER_AD:2,HTTP_HEADERS:{},DOWNLOAD_DURATION_SAFETY_MARGIN:.4,MAXIMUM_DOWNLOAD_DURATION_MULTIPLIER:2,MAXIMUM_DOWNLOAD_DURATION_MULTIPLIER_SAME_QUALITY:3,RATE_SAFETY_MARGIN_PERCENTAGE:10,MAX_ALLOWED_BANDWIDTH_ESTIMATION:1/0,LIVE_SEGMENT_LIST_START_INDEX_OFFSET:0,MAX_NUM_CACHED_SEGMENTS:1,TRUN_VERSION:void 0,IGNORE_MP4_EDTS_BOX:!0,HLS_AUDIO_ONLY_THRESHOLD_BITRATE:2e5,ENABLE_SEEK_FOR_LIVE:!1,LIVE_EDGE_DISTANCE:0,QUALITY_THRESHOLD:.5,QUALITY_UPPER_THRESHOLD:45,MAX_CONSECUTIVE_VR_ERRORS:3,MAX_CONSECUTIVE_RENDERER_ERRORS:3,DISABLE_HLS_BACKUP_STREAM_FAILOVER:!1,PLAYBACK_TIMEOUT:1500,HLS_SYNC_VIA_MEDIA_SEQUENCE:!1,STOP_DOWNLOAD_ON_PAUSE:!1,VR_SCHEME_ID_URI:"https://bitmovin.com/082017/vr",HLS_VR_CHARACTERISTICS_UTI:"com.bitmovin.vr.",SAFARI_NUM_PROGRESS_EVENTS_AFTER_SEEK_GLITCH:5,SEGMENT_LOADER_POOL_SIZE:{},NATIVE_HLS_PARSING:!1,NATIVE_HLS_DOWNLOAD_ERROR_HANDLING:!1,AKAMAI_DATETIME_PARSING:!1,QJY_BROWSER_WORKAROUND:!1,DWORD_BASE_MEDIA_DECODE_TIMESTAMPS:!1,FORCE_BASE_MEDIA_DECODE_TIME_REWRITE:!1,WEBOS_MAX_SAFE_BMDT:1/0,WEBOS_MAX_SAFE_PTO:1/0,TIZEN_MAX_SAFE_BMDT:1/0,TIZEN_MAX_SAFE_PTO:1/0,VIDAA_MAX_SAFE_BMDT:0xffffffff,VIDAA_MAX_SAFE_PTO:0xffffffff,ADAPTATION_SET_SWITCHING_WITHOUT_SUPPLEMENTAL_PROPERTY:!1,MINIMAL_BACKWARD_BUFFER_CLEARING_INTERVAL:.5,CHUNKED_CMAF_STREAMING:!1,LOW_LATENCY_DEFAULT_TARGET_LATENCY:5,LOW_LATENCY_BUFFER_GUARD:.5,LOW_LATENCY_DEFAULT_FALLBACK_PLAYBACK_RATE:.95,LOW_LATENCY_DEFAULT_CATCHUP_PLAYBACK_RATE:1.2,LOW_LATENCY_SEEK_AHEAD:1,ACCEPTABLE_TIMESHIFT_INACCURACY:3,IGNORE_HLS_AUDIO_GROUPS:!1,OPTIMIZE_AD_RESTORATION:!0,AD_RESTORATION_SEGMENT_PREFETCHING_DURATION:5,MIN_SAFE_BUFFER_LEVEL:3,THUMBNAIL_TO_PLAYER_SIZE_RATIO:.1,FAIRPLAY_IGNORE_DUPLICATE_INIT_DATA_KEY_ERRORS:!1,NO_QUOTA_EXCEEDED_ADJUSTMENT:!1,RESUME_LIVE_CONTENT_AT_PREVIOUS_POSITION_AFTER_AD_BREAK:!1,MIN_EFFECTIVE_SEGMENT_DOWNLOAD_TIME:.5,fixed:{APP_NAME:"html5",VERSION:"8.259.0"}
13,CLEAR_BUFFERS_ON_SEEKING_BACKWARDS:!1,DROP_INVALID_SEGMENTS:!1,PROACTIVE_GAP_SKIP_DISTANCE_SECONDS:0,MIN_SIZE_FOR_GAP_SKIPPING:0,FORCE_SOFTWARE_DECRYPTION:!1,SEGMENT_LOADING_PROGRESS_CHECK_INTERVAL:.5,ENABLE_SEGMENT_INFO_PROVIDER_FROM_STORE:!1,HLS_SYNC_SEGMENT_PLAYBACK_TIME_VIA_MEDIA_SEQUENCE:!1,HLS_PARSE_MANIFEST_IN_WORKER:!1,HLS_CLEAR_BUFFERS_ON_DISCONTINUITY_SWITCHES:!1,PARSE_EMSG_BOXES:!0,WISH_ABR_PARAMS:u.WishDefaultConfig,HLS_BACKUP_STREAM_PENALTY_DURATION:30,CHECK_ALL_DRM_LICENSES_FOR_KID:!0,LL_HLS:!0,LL_HLS_SEGMENT_END_TIME_MATCHING_TOLERANCE:.1,LL_HLS_MAX_PLAYLIST_AGE_FOR_BLOCKING_REQUEST_IN_PART_TARGET_MULTIPLES:2,HLS_PARSE_NATIVE_METADATA:!0,PREFER_MANAGED_MEDIA_SOURCE:!0,INFINITE_RETRIES_FOR_LIVE:!0,MAX_SAFE_MSE_DURATION:1/0,ENABLE_MEDIA_ELEMENT_EVENT_LOGS:!1,ENABLE_MEDIA_ELEMENT_ACTION_LOGS:!1,DISABLE_PARALLEL_SEGMENT_LOADING:!1,ENABLE_MUTED_BACKGROUND_PLAYBACK:!1,POSTPONE_MANIFEST_UPDATES_UNTIL_PLAYBACK_START:!0,DASH_CLEAR_BUFFERS_ON_PERIOD_SWITCHES:!1,DISABLE_AUTO_RECOVERY_ON_DVR_WINDOW_EXCEEDED:!1,ENABLE_SGAI_HANDLING:!1,SGAI_TRIGGER_DELAY_COMPENSATION:0,ENABLE_PERFORMANCE_LOGS:!1,ENABLE_HLS_CONTENT_STEERING:!1,TIZEN_DELAY_END_OF_STREAM_SIGNALING:!1,AUDIO_TRACK_SWITCH_BUFFER_GRACE_PERIOD:2,DISABLE_AUDIO_BUFFER_CLEARING_ON_TRACK_SWITCH:!1}},69251:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.SourceContext=void 0,u.SourceContext=function(){function c(c){this.technology=c.technology,this.source=c.source,this.isAd=c.isAd,this.gX=!1,this.hX=c.sourceIdentifier,this.mseObjectUrl=c.mseObjectUrl}return Object.defineProperty(c.prototype,"isDisposed",{get:function(){return this.gX},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"sourceIdentifier",{get:function(){return this.hX},enumerable:!1,configurable:!0}),c.prototype.dispose=function(){this.gX=!0},c}()},93907:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.StallTimeTrackerService=void 0;var p=d(91678),h=d(46151),f=d(33436),m=d(94685),g=d(89927);u.StallTimeTrackerService=function(){function c(c){this.context=c,this.context=c,this.jX=0}return c.prototype.startStall=function(){this.iX=Date.now()},c.prototype.endStall=function(){var c=(0,g.toSeconds)(Date.now()-this.iX);this.jX+=c,this.kX()},c.prototype.kX=function(){var c=this;(0,m.isContextAvailable)(this.context)&&Object.keys((0,h.getMetricsState)(this.context.store.getState())).forEach(function(u){return c.context.store.dispatch((0,p.addMetricsValue)(u,f.MetricType.StalledSeconds,c.jX))})},c.prototype.reset=function(){this.jX=0},c.prototype.dispose=function(){},c}()},23145:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.StartOffsetService=void 0;var p=d(21281);u.StartOffsetService=function(){function c(c){this.lX=c,this.mX=0}return c.prototype.nX=function(c,u){var d=c.options.startOffset,h=c.options.startOffsetTimelineReference;if(h)switch(h){case p.TimelineReferencePoint.Start:return d>Math.abs(u)?0:d+u;case p.TimelineReferencePoint.End:}return d},c.prototype.oX=function(c,u){var d=c.options.startOffset,h=c.options.startOffsetTimelineReference;if(h)switch(h){case p.TimelineReferencePoint.Start:break;case p.TimelineReferencePoint.End:return u+d}return d},c.prototype.getStartOffset=function(c){if(c.options){if(void 0!==c.options.startOffset)return this.lX.isLive()?this.nX(c,this.lX.getMaxTimeShift()):this.oX(c,this.lX.getDuration());if(void 0!==c.options.startTime)return c.options.startTime}return this.mX},Object.defineProperty(c.prototype,"manifestStartOffset",{set:function(c){this.mX=c},enumerable:!1,configurable:!0}),c.prototype.dispose=function(){this.lX=null},c}()},65623:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.StreamType=void 0,(p=d||(u.StreamType=d={})).Progressive="progressive",p.Dash="dash",p.Hls="hls",p.Smooth="smooth",p.Whep="whep",p.Unknown="unknown"},20649:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.kebabCaseToCamelCase=function(c){return c.split("-").map(function(c,u){return 0===u?c.toLowerCase():c.charAt(0).toUpperCase()+c.slice(1).toLowerCase()}).join("")},u.forceReallocation=function(c){return c?(0,p.isFirefox)()?JSON.parse(JSON.stringify(c)):(" "+c).slice(1):""};var p=d(15487)}
vendor: 4,507 bytes, line 13
13,88847:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.Suspendable=void 0,u.suspend=function(c){c&&c.suspend()},u.restore=function(c){c&&c.restore()},u.Suspendable=function(){function c(c){this.t1=!1,this.u1=null==c?void 0:c.onSuspend,this.v1=null==c?void 0:c.onRestore}return c.prototype.suspend=function(){var c;this.t1||(this.t1=!0,null==(c=this.u1)||c.call(this))},c.prototype.restore=function(){var c;this.t1&&(this.t1=!1,null==(c=this.v1)||c.call(this))},c.prototype.isSuspended=function(){return this.t1},c.prototype.dispose=function(){this.t1=null,this.u1=null,this.v1=null},c}()},94685:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.isObject=function(c){return null!==c&&"object"==typeof c},u.isContextAvailable=function(c){return void 0!==c&&!c.isDisposed}},64681:function(c,u,d){var p=this&&this.__createBinding||(Object.create?function(c,u,d,p){void 0===p&&(p=d);var h=Object.getOwnPropertyDescriptor(u,d);h&&!("get"in h?!u.__esModule:h.writable||h.configurable)||(h={enumerable:!0,get:function(){return u[d]}}),Object.defineProperty(c,p,h)}:function(c,u,d,p){void 0===p&&(p=d),c[p]=u[d]}),h=this&&this.__exportStar||function(c,u){for(var d in c)"default"===d||Object.prototype.hasOwnProperty.call(u,d)||p(u,c,d)};Object.defineProperty(u,"__esModule",{value:!0}),h(d(92006),u)},29960:function(c,u){Object.defineProperty(u,"__esModule",{value:!0})},41138:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.VideoElementUtil=void 0,u.VideoElementUtil=function(){function c(){}return c.removeSource=function(c){for(c.setAttribute("src",""),c.removeAttribute("src");c.firstChild;)c.removeChild(c.firstChild)},c}()},53129:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.DefaultConfig=void 0;var p=d(45202);u.DefaultConfig={key:"",playback:{autoplay:!1,muted:!1,volume:100,timeShift:!0,seeking:!0,playsInline:!0,preferredTech:[],videoCodecPriority:["dvhe","dvh1","vvc","vvi","av01","av1","hevc","hev","hvc","vp9","avc"],audioCodecPriority:["ec-4","ac-4","ec-3","mp4a.a6","ac-3","mp4a.a5","mp4a.40"]},style:{aspectratio:1.7777777777777777,uiManagerFactory:function(c,u){var d=p.Environment.modules.playerui.UIFactory;if(null!=d&&d.buildUI&&"function"==typeof d.buildUI)return new d.buildUI(c,u);if(null!=d&&d.buildDefaultUI&&"function"==typeof d.buildDefaultUI)return new d.buildDefaultUI(c,u);throw Error("Default UI initialization method not found. Provide a custom `uiManagerFactory` via `StyleConfig`.")},visibility:{enableTracking:!1,visibilityThreshold:50}},tweaks:{file_protocol:!1},adaptation:{mobile:{limitToPlayerSize:!1,exclude:!1,qualityStabilityBalance:.5,bitrates:{minSelectableAudioBitrate:0,maxSelectableAudioBitrate:1/0,minSelectableVideoBitrate:0,maxSelectableVideoBitrate:1/0},resolution:{minSelectableVideoHeight:0,maxSelectableVideoHeight:1/0,minSelectableVideoWidth:0,maxSelectableVideoWidth:1/0}},desktop:{limitToPlayerSize:!1,exclude:!1,qualityStabilityBalance:.5,bitrates:{minSelectableAudioBitrate:0,maxSelectableAudioBitrate:1/0,minSelectableVideoBitrate:0,maxSelectableVideoBitrate:1/0},resolution:{minSelectableVideoHeight:0,maxSelectableVideoHeight:1/0,minSelectableVideoWidth:0,maxSelectableVideoWidth:1/0}}},cast:{enable:!1},events:{},licensing:{},live:{incrementalManifestUpdates:!0},logs:{bitmovin:!0},location:{ui:p.Environment.baseUrl+"bitmovinplayer-ui.js",ui_css:p.Environment.baseUrl+"bitmovinplayer-ui.css",serviceworker:"",cast:"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",google_ima:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}}},60865:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.getLowLatencyDefaultConfig=function(c){return void 0===c&&(c={}),{live:h(c),tweaks:f()}};var p=d(21281),h=function(c){return{lowLatency:{targetLatency:c.targetLatency??5,catchup:{playbackRateThreshold:.075,seekThreshold:5,playbackRate:1.2},fallback:{playbackRateThreshold:.075,seekThreshold:5,playbackRate:.95}},synchronization:[{method:p.LiveSynchronizationMethod.HttpHead,serverUrl:"https://time.akamai.com"}]}},f=function(){return{RESTART_THRESHOLD:.2,RESTART_THRESHOLD_DELTA:.05,STARTUP_THRESHOLD:.2,STARTUP_THRESHOLD_DELTA:.05,DURATION_MISMATCH_TOLERANCE:.05,LOW_LATENCY_BUFFER_GUARD:.8}}},90571:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};
13Object.defineProperty(u,"__esModule",{value:!0}),u.PlayerConfiguration=void 0;var h=d(40306),f=d(3336),m=d(44468),g=d(70962),v=d(21513),y=d(70850),b=d(53129);u.PlayerConfiguration=function(){function c(c){if(!c)throw new f.PlayerError(h.ErrorCode.SETUP_MISSING_CONFIGURATION,void 0,"The player must be configured with a valid `PlayerConfig`, but no configuration was provided.");this.BX={},this.CX=c,this.DX()}return c.mergeSizeConfig=function(c,u){var d,p,h=!1,f=!1,m=!1;if(u.style?(m=!!u.style.width,f=!!u.style.height,h=!!u.style.aspectratio):u.style={},c.style=c.style||{},h){var g=(0,y.parseAspectRatio)(null!=(p=null==(d=b.DefaultConfig.style)?void 0:d.aspectratio)?p:1.7777777777777777);c.style.aspectratio=(0,y.parseAspectRatio)(u.style.aspectratio)||g}else c.style.aspectratio=b.DefaultConfig.style.aspectratio;m&&!isNaN(String(u.style.width).slice(-1))&&(c.style.width=u.style.width+"px"),f&&!isNaN(String(u.style.height).slice(-1))&&(c.style.height=u.style.height+"px")},c.prototype.DX=function(){var u=this;y.Util.deepCopyMulti(this.BX,b.DefaultConfig,this.CX);var d=this.CX.adaptation||{},p={};y.Util.deepCopy(p,d),delete p.mobile,delete p.desktop,(0,v.getCapabilities)().isMobile?this.BX.adaptation=y.Util.deepCopyMulti({},b.DefaultConfig.adaptation.mobile,p,d.mobile):this.BX.adaptation=y.Util.deepCopyMulti({},b.DefaultConfig.adaptation.desktop,p,d.desktop);var h=this.BX.adaptation.bitrates;["minSelectableAudioBitrate","maxSelectableAudioBitrate","minSelectableVideoBitrate","maxSelectableVideoBitrate"].forEach(function(c){u.BX.adaptation.bitrates[c]=y.Util.extractBitrateFromString(c.substring(0,3),h[c])}),c.mergeSizeConfig(this.BX,this.CX)},c.overwriteConfigEntries=function(c,u,d){if(u.hasOwnProperty(d)){var p=u[d];for(var h in p)p.hasOwnProperty(h)&&"fixed"!==h&&c.hasOwnProperty(h.toUpperCase())?c[h.toUpperCase()]=p[h]:p.hasOwnProperty(h)&&"MAX_BUFFER_LEVEL"===h.toUpperCase()&&(c.TARGET_BUFFER_LEVEL[m.MediaType.Video][m.BufferType.ForwardDuration]=p[h],c.TARGET_BUFFER_LEVEL[m.MediaType.Audio][m.BufferType.ForwardDuration]=p[h])}},c.prototype.getSettings=function(u){void 0===u&&(u=this.BX);var d,h={},f=u.adaptation||{};return y.Util.deepCopy(h,g.DefaultSettings),c.overwriteConfigEntries(h,u,"tweaks"),c.overwriteConfigEntries(h,u,"cast"),f.bitrates=f.bitrates||{},f.exclude=f.exclude||!1,h.EXCLUDE_DISALLOWED_REPRESENTATIONS=f.exclude,h.MIN_SELECTABLE_AUDIO_BITRATE=f.bitrates.minSelectableAudioBitrate||0,h.MAX_SELECTABLE_AUDIO_BITRATE=f.bitrates.maxSelectableAudioBitrate||1/0,h.MIN_SELECTABLE_VIDEO_BITRATE=f.bitrates.minSelectableVideoBitrate||0,h.MAX_SELECTABLE_VIDEO_BITRATE=f.bitrates.maxSelectableVideoBitrate||1/0,h.QUALITY_THRESHOLD=f.qualityThreshold||h.QUALITY_THRESHOLD,h.QUALITY_UPPER_THRESHOLD=f.qualityUpperThreshold||h.QUALITY_UPPER_THRESHOLD,h.WISH_ABR_PARAMS=p(p({},g.DefaultSettings.WISH_ABR_PARAMS),(null==(d=u.tweaks)?void 0:d.wish_abr_params)||{}),h},c.prototype.getUserConfig=function(){return this.CX},c.prototype.update=function(c){var u={};for(var d in y.Util.deepCopy(u,c),u)u.hasOwnProperty(d)&&(this.BX[d]=u[d],this.CX[d]=u[d])},c.prototype.get=function(c,u){return void 0===u&&(u=this.BX),c?u.hasOwnProperty(c)?this.BX[c]:{}:u},c.prototype.playback=function(){return this.get("playback")},c.prototype.style=function(){return this.get("style")},c.prototype.buffer=function(){return this.get("buffer")},c.prototype.tweaks=function(){return this.get("tweaks")},c.prototype.adaptation=function(){return this.get("adaptation")},c.prototype.advertising=function(){return this.get("advertising")},c.prototype.cast=function(){return this.get("cast")},c.prototype.logs=function(){return this.get("logs")},c.prototype.licensing=function(){return this.get("licensing")},c.prototype.live=function(){return this.get("live")},c.prototype.location=function(){return this.get("location")},c}()},65567:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.getTvDefaultConfig=function(c){var u,d;if((0,p.isUsingFileProtocol)()&&!c)throw Error("You have to provide an app_id if you are loading the app through file protocol");return d={buffer:{video:u={forwardduration:h,backwardduration:f},audio:u},playback:{autoplay:!0},tweaks:{minimal_backward_buffer_clearing_interval:5}},c&&(d.tweaks.app_id=c,d.tweaks.file_protocol=!0,d.analytics={config:{origin:c}}),d};var p=d(47993),h=30,f=10}
13,78760:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.validateAppIdConfig=function(c){var u=c.get("tweaks"),d=(0,g.getCapabilities)()[m.CapabilityKey.isReactNative],y=(0,v.isUsingFileProtocol)();if(y||d){if(!u.app_id||y&&!u.file_protocol)throw new h.PlayerError(p.ErrorCode.SETUP_UNSUPPORTED_PROTOCOL,{tweaks:JSON.stringify(u)},"The current tweaks configuration is not valid: ".concat(u.app_id?"file_protocol":"app_id"," is missing."));u.app_id&&(!f.Environment.hostname||d)&&(f.Environment.hostname=u.app_id)}};var p=d(40306),h=d(3336),f=d(45202),m=d(7387),g=d(21513),v=d(47993)},40306:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.ErrorCode=void 0,(p=d||(u.ErrorCode=d={}))[p.UNKNOWN=1e3]="UNKNOWN",p[p.API_NOT_AVAILABLE=1001]="API_NOT_AVAILABLE",p[p.SETUP_ERROR=1100]="SETUP_ERROR",p[p.SETUP_NO_HTML_ELEMENT=1101]="SETUP_NO_HTML_ELEMENT",p[p.SETUP_MISSING_CONFIGURATION=1102]="SETUP_MISSING_CONFIGURATION",p[p.SETUP_LICENSE_ERROR=1103]="SETUP_LICENSE_ERROR",p[p.SETUP_MISSING_DOMAIN_LICENSE_WHITELIST=1104]="SETUP_MISSING_DOMAIN_LICENSE_WHITELIST",p[p.SETUP_MISSING_DOMAIN_LICENSE_ALLOWLIST=1104]="SETUP_MISSING_DOMAIN_LICENSE_ALLOWLIST",p[p.SETUP_MISSING_LICENSE_WHITELIST=1105]="SETUP_MISSING_LICENSE_WHITELIST",p[p.SETUP_MISSING_LICENSE_ALLOWLIST=1105]="SETUP_MISSING_LICENSE_ALLOWLIST",p[p.SETUP_INVALID_LICENSE_SERVER=1106]="SETUP_INVALID_LICENSE_SERVER",p[p.SETUP_INVALID_IMPRESSION_SERVER=1107]="SETUP_INVALID_IMPRESSION_SERVER",p[p.SETUP_NO_RENDERING_ENGINE=1108]="SETUP_NO_RENDERING_ENGINE",p[p.SETUP_UNSUPPORTED_PROTOCOL=1113]="SETUP_UNSUPPORTED_PROTOCOL",p[p.SOURCE_ERROR=1200]="SOURCE_ERROR",p[p.SOURCE_INVALID=1201]="SOURCE_INVALID",p[p.SOURCE_MANIFEST_INVALID=1202]="SOURCE_MANIFEST_INVALID",p[p.SOURCE_NO_SUPPORTED_TECHNOLOGY=1203]="SOURCE_NO_SUPPORTED_TECHNOLOGY",p[p.SOURCE_STREAM_TYPE_NOT_SUPPORTED=1204]="SOURCE_STREAM_TYPE_NOT_SUPPORTED",p[p.SOURCE_FORCED_TECHNOLOGY_NOT_SUPPORTED=1205]="SOURCE_FORCED_TECHNOLOGY_NOT_SUPPORTED",p[p.SOURCE_NO_STREAM_FOUND_FOR_SUPPORTED_TECHNOLOGY=1206]="SOURCE_NO_STREAM_FOUND_FOR_SUPPORTED_TECHNOLOGY",p[p.SOURCE_EMPTY_SEGMENT=1207]="SOURCE_EMPTY_SEGMENT",p[p.SOURCE_COULD_NOT_LOAD_MANIFEST=1208]="SOURCE_COULD_NOT_LOAD_MANIFEST",p[p.SOURCE_PROGRESSIVE_STREAM_ERROR=1209]="SOURCE_PROGRESSIVE_STREAM_ERROR",p[p.SOURCE_HLS_STREAM_ERROR=1210]="SOURCE_HLS_STREAM_ERROR",p[p.SOURCE_ENCRYPTION_METHOD_NOT_SUPPORTED=1211]="SOURCE_ENCRYPTION_METHOD_NOT_SUPPORTED",p[p.SOURCE_INVALID_H264_CODEC=7043]="SOURCE_INVALID_H264_CODEC",p[p.PLAYBACK_ERROR=1300]="PLAYBACK_ERROR",p[p.PLAYBACK_VIDEO_DECODING_ERROR=1301]="PLAYBACK_VIDEO_DECODING_ERROR",p[p.PLAYBACK_HLS_COULD_NOT_LOAD_TRANSMUXER=1304]="PLAYBACK_HLS_COULD_NOT_LOAD_TRANSMUXER",p[p.NETWORK_ERROR=1400]="NETWORK_ERROR",p[p.NETWORK_MANIFEST_DOWNLOAD_TIMEOUT=1401]="NETWORK_MANIFEST_DOWNLOAD_TIMEOUT",p[p.NETWORK_SEGMENT_DOWNLOAD_TIMEOUT=1402]="NETWORK_SEGMENT_DOWNLOAD_TIMEOUT",p[p.NETWORK_PROGRESSIVE_STREAM_DOWNLOAD_TIMEOUT=1403]="NETWORK_PROGRESSIVE_STREAM_DOWNLOAD_TIMEOUT",p[p.NETWORK_FAILED_CERTIFICATE_REQUEST=1404]="NETWORK_FAILED_CERTIFICATE_REQUEST",p[p.DRM_ERROR=2e3]="DRM_ERROR",p[p.DRM_MISSING_CONFIGURATION=2001]="DRM_MISSING_CONFIGURATION",p[p.DRM_NO_LICENSE_SERVER_URL_PROVIDED=2002]="DRM_NO_LICENSE_SERVER_URL_PROVIDED",p[p.DRM_FAILED_LICENSE_REQUEST=2003]="DRM_FAILED_LICENSE_REQUEST",p[p.DRM_KEY_SIZE_NOT_SUPPORTED=2005]="DRM_KEY_SIZE_NOT_SUPPORTED",p[p.DRM_NO_KEY_SYSTEM=2006]="DRM_NO_KEY_SYSTEM",p[p.DRM_KEY_SESSION_INITIALIZATION_FAILED=2007]="DRM_KEY_SESSION_INITIALIZATION_FAILED",p[p.DRM_MEDIA_KEY_INITIALIZATION_FAILED=2008]="DRM_MEDIA_KEY_INITIALIZATION_FAILED",p[p.DRM_KEY_ERROR=2009]="DRM_KEY_ERROR",p[p.DRM_KEY_SYSTEM_NOT_SUPPORTED=2010]="DRM_KEY_SYSTEM_NOT_SUPPORTED",p[p.DRM_CERTIFICATE_ERROR=2011]="DRM_CERTIFICATE_ERROR",p[p.DRM_PLAYREADY_INVALID_HEADER_KEY_VALUE_PAIR=2012]="DRM_PLAYREADY_INVALID_HEADER_KEY_VALUE_PAIR",p[p.DRM_RESTRICTED_OUTPUT=2013]="DRM_RESTRICTED_OUTPUT",p[p.DRM_INIT_DATA_MISSING=2015]="DRM_INIT_DATA_MISSING",p[p.VR_ERROR=2100]="VR_ERROR",p[p.VR_INCOMPATIBLE_PLAYER_TECHNOLOGY=2101]="VR_INCOMPATIBLE_PLAYER_TECHNOLOGY",p[p.MODULE_ERROR=3e3]="MODULE_ERROR",p[p.MODULE_INVALID_DEFINITION=3001]="MODULE_INVALID_DEFINITION",p[p.MODULE_INVALID_DEFINITION_DEPENDENCY=3002]="MODULE_INVALID_DEFINITION_DEPENDENCY",p[p.MODULE_MISSING=3003]="MODULE_MISSING",p[p.MODULE_DEPENDENCY_MISSING=3004]="MODULE_DEPENDENCY_MISSING",p[p.MODULE_REMOVED=3005]="MODULE_REMOVED",p[p.MODULE_ADVERTISING_ERROR=3100]="MODULE_ADVERTISING_ERROR",p[p.SEGMENT_PSSH_DATA_MISSING=4e3]="SEGMENT_PSSH_DATA_MISSING"}
13,3336:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.PlayerError=void 0;var p=d(40306);u.PlayerError=function(c,u,d,h){this.code=c,this.name=p.ErrorCode[c],this.sourceIdentifier=h,this.message=d??"".concat(this.name),this.data=u,"captureStackTrace"in Error&&"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error(this.message).stack}},25926:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.PlayerWarning=void 0;var p=d(3714),h=d(4224);u.PlayerWarning=function(c,u,d){this.type=p.PlayerEvent.Warning,this.code=c,this.name=h.WarningCode[c],this.message=u||"".concat(this.code,"/").concat(this.name),this.data=d}},4224:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.WarningCode=void 0,(p=d||(u.WarningCode=d={}))[p.GENERAL_WARNING=1e3]="GENERAL_WARNING",p[p.API_INVALID_ARGUMENT=1001]="API_INVALID_ARGUMENT",p[p.SETUP_WARNING=1100]="SETUP_WARNING",p[p.SETUP_CREATE_OBJECT_URL_MISSING=1101]="SETUP_CREATE_OBJECT_URL_MISSING",p[p.SETUP_SERVICE_WORKER_INITIALIZATION_FAILED=1103]="SETUP_SERVICE_WORKER_INITIALIZATION_FAILED",p[p.SETUP_SERVICE_WORKER_LOCATION_MISSING=1104]="SETUP_SERVICE_WORKER_LOCATION_MISSING",p[p.SOURCE_WARNING=1200]="SOURCE_WARNING",p[p.SOURCE_CODEC_OR_FILE_FORMAT_NOT_SUPPORTED=1201]="SOURCE_CODEC_OR_FILE_FORMAT_NOT_SUPPORTED",p[p.SOURCE_SMOOTH_REPRESENTATION_MISSING=1202]="SOURCE_SMOOTH_REPRESENTATION_MISSING",p[p.SOURCE_SMOOTH_INVALID_INIT_DATA=1203]="SOURCE_SMOOTH_INVALID_INIT_DATA",p[p.SOURCE_SMOOTH_UNKNOWN_STREAM_INDEX_TYPE=1204]="SOURCE_SMOOTH_UNKNOWN_STREAM_INDEX_TYPE",p[p.SOURCE_SMOOTH_EMPTY_QUALITY_LEVEL=1205]="SOURCE_SMOOTH_EMPTY_QUALITY_LEVEL",p[p.PLAYBACK_WARNING=1300]="PLAYBACK_WARNING",p[p.PLAYBACK_GAP_DETECTED=1301]="PLAYBACK_GAP_DETECTED",p[p.PLAYBACK_DECODE_RETRIES_EXCEEDED=1302]="PLAYBACK_DECODE_RETRIES_EXCEEDED",p[p.PLAYBACK_COULD_NOT_BE_STARTED=1303]="PLAYBACK_COULD_NOT_BE_STARTED",p[p.PLAYBACK_NEGATIVE_DECODING_TIMESTAMP_ENCOUNTERED=1304]="PLAYBACK_NEGATIVE_DECODING_TIMESTAMP_ENCOUNTERED",p[p.PLAYBACK_INVALID_DATA_SEGMENT_ENCOUNTERED=1305]="PLAYBACK_INVALID_DATA_SEGMENT_ENCOUNTERED",p[p.PLAYBACK_VIDEO_DECODING_ERROR_RECOVERY=1306]="PLAYBACK_VIDEO_DECODING_ERROR_RECOVERY",p[p.NETWORK_WARNING=1400]="NETWORK_WARNING",p[p.NETWORK_COULD_NOT_LOAD_MANIFEST=1401]="NETWORK_COULD_NOT_LOAD_MANIFEST",p[p.NETWORK_COULD_NOT_LOAD_SUBTITLE=1402]="NETWORK_COULD_NOT_LOAD_SUBTITLE",p[p.DRM_WARNING=2e3]="DRM_WARNING",p[p.DRM_SERVER_CERTIFICATE_NOT_SUPPORTED=2001]="DRM_SERVER_CERTIFICATE_NOT_SUPPORTED",p[p.DRM_COULD_NOT_DECRYPT_SEGMENT=2002]="DRM_COULD_NOT_DECRYPT_SEGMENT",p[p.DRM_LICENSE_RENEWAL_FAILED=2003]="DRM_LICENSE_RENEWAL_FAILED",p[p.DRM_FAILED_LICENSE_REQUEST=2004]="DRM_FAILED_LICENSE_REQUEST",p[p.DRM_RESTRICTED_OUTPUT=2013]="DRM_RESTRICTED_OUTPUT",p[p.VR_WARNING=2100]="VR_WARNING",p[p.VR_RENDERING_ERROR=2101]="VR_RENDERING_ERROR",p[p.MODULE_WARNING=3e3]="MODULE_WARNING",p[p.MODULE_MISSING=3001]="MODULE_MISSING",p[p.MODULE_ADVERTISING_WARNING=3100]="MODULE_ADVERTISING_WARNING",p[p.MODULE_ADVERTISING_IMA_SDK_NOT_FOUND=3101]="MODULE_ADVERTISING_IMA_SDK_NOT_FOUND",p[p.MODULE_ADVERTISING_OM_SDK_MODULE_MISSING=3102]="MODULE_ADVERTISING_OM_SDK_MODULE_MISSING",p[p.MODULE_ADVERTISING_OM_SDK_INIT_FAILURE=3103]="MODULE_ADVERTISING_OM_SDK_INIT_FAILURE",p[p.MODULE_ADVERTISING_OM_SDK_TRACKING_FAILURE=3104]="MODULE_ADVERTISING_OM_SDK_TRACKING_FAILURE"},48143:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.ServiceManager=void 0,u.disposeService=function(c,u,d){void 0===d&&(d=h);var p=c.get(u,d);p&&(p.dispose(),c.set(u,null,d))};var p=d(80813),h="player-scoped";function f(c){return Object.keys(c).sort(function(c){return c!==p.ServiceName.SourceStoreService?-1:1}).filter(function(u){return!!c[u]})}u.ServiceManager=function(){function c(){this.OD={},this.PD=new WeakMap}return c.prototype.has=function(c,u){return void 0===u&&(u=h),!!this.get(c,u)},c.prototype.get=function(c,u){if(void 0===u&&(u=h),this.OD[u])return this.OD[u][c]},c.prototype.set=function(c,u,d){void 0===d&&(d=h),this.OD[d]||(this.OD[d]={}),this.OD[d][c]=u,u&&this.PD.set(u,d)},c.prototype.getScope=function(c){return this.PD.get(c)},c.prototype.delete=function(c,u){void 0===u&&(u=h),this.OD[u]&&this.OD[u][c]&&(this.PD.delete(this.OD[u][c]),this.OD[u][c].dispose(),delete this.OD[u][c])},c.prototype.maybeCall=function(c,u,d,p){void 0===d&&(d=null),void 0===p&&(p=h);var f=this.get(c,p);return f?u(f):d}
13,c.prototype.dispose=function(){Object.values(this.OD).forEach(function(c){f(c).forEach(function(u){c[u].dispose()})}),this.OD={},delete this.PD},c.prototype.removeNonPlayerScopeServices=function(){var c=this;Object.keys(this.OD).filter(function(c){return c!==h}).forEach(function(u){f(c.OD[u]).forEach(function(d){c.delete(d,u)}),delete c.OD[u]})},c}()},80813:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.ServiceName=void 0,(p=d||(u.ServiceName=d={})).AdaptationService="AdaptationService",p.DrmDetectorService="DrmDetectorService",p.DrmService="DrmService",p.HeartbeatService="HeartbeatService",p.LiveLatencyService="LiveLatencyService",p.ManifestCachingService="ManifestCachingService",p.ManifestLoadingService="ManifestLoadingService",p.ManifestService="ManifestService",p.ManifestUpdateSchedulingService="ManifestUpdateSchedulingService",p.MetadataParsedService="MetadataParsedService",p.NativeManifestService="NativeManifestService",p.PlayerStateService="PlayerStateService",p.RecoveryService="RecoveryService",p.SegmentService="SegmentService",p.SourceStoreService="SourceStoreService",p.StallTimeTrackerService="StallTimeTrackerService",p.StartOffsetService="StartOffsetService",p.StreamTimeService="StreamTimeService",p.SubtitleService="SubtitleService",p.SynchronizedTimeService="SynchronizedTimeService",p.ThumbnailService="Thumbn
13ailService",p.TimedMetadataService="TimedMetadataService",p.SgaiService="SgaiService"},51289:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.EventHandler=void 0,u.generateTroubleshootUrl=v;var h=d(3336),f=d(3714),m=d(48669),g=function(){function c(){var c=this;this.call=function(){c.aH.call(c.bH,c.data)},this.match=function(u){return!!c.cH&&("string"==typeof u?u===c.eventType:u===c.aH)}}return c.prototype.set=function(c,u,d,p,h){void 0===h&&(h=!0),this.aH=c,this.eventType=u,this.bH=d,this.data=p,this.cH=h},c.prototype.clear=function(){this.aH=null,this.eventType=null,this.bH=null,this.data=null,this.cH=null},Object.defineProperty(c.prototype,"cancelable",{get:function(){return this.cH},enumerable:!1,configurable:!0}),c}();function v(c){return"https://bitmovin.com/docs/player/web/errors/".concat(c)}u.EventHandler=function(){function c(c,u,d){var p=this;for(var h in this.mH=!1,this.nH=!1,this.oH=function(){for(var c,u=p.gH?p.iH.length:20,d=null!=(c=p.iH.splice(0,u))?c:[],h=0;h<d.length;h++){var m=d[h];!m||p.hH&&m.eventType!==f.PlayerEvent.Destroy||p.pH(m)}p.mH=!1,p.iH.length>0&&p.KI()},this.CI=function(c,u,d,h){if(void 0===h&&(h=!0),p.rH(c,u,d)){var f=p.GI(d),v=0,y=p.qH(u,c);f[c].forEach(function(u){var d=p.kH.pop()||new g;d.set(u.listener,c,p.dH,y,h),p.iH.push(d),v+=+!!u.repeatable}),v<f[c].length&&(f[c].sort(function(c,u){return m.Comparators.reverseBoolean(c.repeatable,u.repeatable)}),f[c].length=v),p.iH.length>0&&p.KI()}},this.dispatchEvent=function(c,u,d){void 0===d&&(d=!0),p.gH||p.HI(c,u,d)},this.clearEventsOfType=function(c){var u=p.iH.reduce(function(u,d,p){return d.match(c)?u.concat(p):u},[]);for(u.sort(function(c,u){return c-u});u.length>0;)p.iH.splice(u.pop(),1)},this.LI=function(c){c.data===p.lH&&(window.removeEventListener("message",p.LI),p.oH())},this.eH=c,this.dH=u,this.fH={internal:{},external:{}},this.gH=!1,this.hH=!1,this.iH=[],this.kH=[],f.PlayerEvent)f.PlayerEvent.hasOwnProperty(h)&&(this.fH.internal[f.PlayerEvent[h]]=[],this.fH.external[f.PlayerEvent[h]]=[]);this.jH=[],this.lH="".concat("bitmovin.triggerQueueWorker",".").concat(d)}return c.prototype.pH=function(c){try{c.call(),c.clear(),this.kH.push(c)}catch(c){this.eH.warn("unhandled exception in event callback",c)}},c.prototype.qH=function(c,u){return p({type:u,timestamp:Date.now()},c)},c.prototype.rH=function(c,u,d){var p=this.GI(d),h=p.hasOwnProperty(c)&&p[c].length;return!!(!this.gH&&h)},c.prototype.DI=function(c){this.iH=this.iH.filter(function(u){return!u.match(c)})},c.prototype.EI=function(c,u,d){var p=this.GI(d);p.hasOwnProperty(c)&&(p[c]=p[c].filter(function(c){return c.listener!==u}))},c.prototype.FI=function(c,u){if(c&&c instanceof h.PlayerError){var d={type:f.PlayerEvent.Error,timestamp:Date.now(),code:c.code,name:c.name,message:c.message,data:c.data,troubleShootLink:v(c.code)};u&&(d.sourceIdentifier=c.sourceIdentifier),this.CI(f.PlayerEvent.Error,d,u)}else this.eH.error("Supplied error is not of type PlayerError:",c)},c.prototype.GI=function(c){return c?this.fH.internal:this.fH.external},c.prototype.HI=function(c,u,d){if(void 0===u&&(u={}),void 0===d&&(d=!0),c===f.PlayerEvent.Error){var p=u;p.hasOwnProperty("code")||(p.code=3e3)}u&&!u.hasOwnProperty("timestamp")&&(u.timestamp=Date.now()),this.CI(c,u,!0,d),this.jH.length>0&&!this.II(c,u)||this.CI(c,u,!1,d)},c.prototype.II=function(c,u){return this.jH.every(function(d){return d(c,u)})},c.prototype.JI=function(c,u,d,p){void 0===d&&(d=!1),void 0===p&&(p=!0);var h=this.GI(d);h.hasOwnProperty(c)&&u&&!h[c].find(function(c){return c&&c.listener===u})&&h[c].push({listener:u,repeatable:p})},c.prototype.on=function(c,u,d){void 0===d&&(d=!1),this.JI(c,u,d)},c.prototype.one=function(c,u,d){void 0===d&&(d=!1),this.JI(c,u,d,!1)},c.prototype.addFromObject=function(c,u){for(var d in void 0===u&&(u=!1),c)c.hasOwnProperty(d)&&this.on(d,c[d],u)},c.prototype.off=function(c,u,d){void 0===d&&(d=!0),d&&this.DI(u),this.EI(c,u,!0),this.EI(c,u,!1)},c.prototype.getEventFunction=function(){var c=this;return function(u,d,p,h){void 0===h&&(h=!0),c.dispatchEvent(u,d,h)}},c.prototype.addExternalEventFilter=function(c){0>this.jH.indexOf(c)&&this.jH.push(c)},c.prototype.removeExternalEventFilter=function(c){var u=this.jH.indexOf(c);u>=0&&this.jH.splice(u,1)},c.prototype.dispose=function(){this.iH=this.iH.filter(function(c){return!c.cancelable}),this.gH=!0,this.HI=null,this.jH=null,this.oH()},c.prototype.setBeingDestroyed=function(){this.hH=!0},Object.defineProperty(c.prototype,"hasErrorBeenFired",{get:function(){return this.nH}
13,enumerable:!1,configurable:!0}),c.prototype.resetErrors=function(){this.nH=!1},c.prototype.fireError=function(c){var u,d;this.FI(c,!0),!this.nH&&this.II(f.PlayerEvent.Error,c)&&(this.nH=!0,this.FI(c,!1)),this.eH.error("PlayerError(".concat(c.code,"/").concat(c.name,") ").concat(null!=(u=c.message)?u:""),null!=(d=c.data)?d:" ")},c.prototype.KI=function(){this.mH||(this.mH=!0,window.addEventListener("message",this.LI),window.postMessage(this.lH,location.origin+location.pathname))},c}()},90408:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.maybeFireDurationChangedEvent=function(c,u,d){null!=c&&c!==u&&d&&d.dispatchEvent(p.PlayerEvent.DurationChanged,{from:c,to:u})},u.createPlayerErrorFromMediaError=function(c,u,d){void 0===d&&(d=!1);var p,g=m(c)?c.errorObject.code:c.code,v=m(c)?c.errorMessage:JSON.stringify(c),y=m(c)?c.errorObject:{errorMessage:JSON.stringify(c),code:g};d&&(y.exception=v);var b=null!=(p=f.ErrorCodeMap[f.MediaErrorCode[g]])?p:h.ErrorCode.UNKNOWN;return new h.PlayerError(b,y,"The video element has thrown a media error.",u)};var p=d(3714),h=d(20213),f=d(75108);function m(c){return"errorObject"in c}},89279:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.ImpressionCall=void 0;var p=d(45202),h=d(4129),f=d(29669),m=d(7387),g=d(21513),v=d(79069);u.ImpressionCall=function(){function c(c,u){this.logger=c,this.rX=!1,this.sX=v.LicensingLegacySslBackendBaseUrl+"/impression",this.setImpressionServerUrl(u)}return c.prototype.tX=function(c){return new h.DefaultContentLoader({settings:{RETRY_DELAY:0,INCREASE_RETRY_DELAY:!1,INCREASE_RETRY_DELAY_BASE_SEC:0,MAX_INCREASE_RETRY_DELAY_SEC:0,QUERY_PARAMETERS:[],HTTP_HEADERS:null,XHR_TIMEOUT:2e4,DISABLE_RETRY_FOR_RESPONSE_STATUS:{}},logger:this.logger,config:{network:{requestApi:c}}})},c.prototype.issue=function(c,u,d){var h,v=this;if(this.rX)return Promise.resolve(void 0);this.pX=null!=(h=this.pX)?h:this.tX(d),this.rX=!0;var y={domain:p.Environment.hostname,key:c,version:p.Environment.VERSION_NUMBER,type:"web:"+u,platform:(0,g.getCapabilities)()[m.CapabilityKey.isReactNative]?"Kepler:unknown":"generic"};return this.pX.load(this.qX,f.HttpRequestMethod.POST,null,JSON.stringify(y)).then(function(c){return c},function(p){return v.qX!==v.sX&&(0,g.getCapabilities)().isTizen?(v.rX=!1,v.setImpressionServerUrl(v.sX),v.issue(c,u,d)):p})},c.prototype.setImpressionServerUrl=function(c){c&&(this.qX=c)},c.prototype.reset=function(){this.rX=!1},c.prototype.dispose=function(){var c;null==(c=this.pX)||c.dispose()},c}()},96859:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.LicenseCall=void 0;var p,h,f=d(45202),m=d(4129),g=d(29669),v=d(21513),y=d(79069);(p=h||(h={})).Granted="granted",p.Denied="denied";var b=["localhost","127.0.0.1"],S=y.LicensingLegacySslBackendBaseUrl+"/licensing";function _(c){if("string"==typeof c)try{return JSON.parse(c)}catch{return{}}return c}u.LicenseCall=function(){function c(c,u,d){this.IY=0,this.JY=[],this.KY=!1,this.LY=void 0,this.uX=u,this.vX=d,this.HY=c}return c.prototype.issue=function(c,u){var d=this;this.MY()?setTimeout(function(){return c(!0)},0):this.vX?this.LY?setTimeout(function(){return c(d.LY.granted,d.LY.payload,d.LY.data)},0):(this.JY.push(c),this.KY||(this.KY=!0,setTimeout(function(){d.OY(d.vX,d.uX,u)},this.IY))):setTimeout(function(){return c(!1,{validationInformation:[{key:"key",errorMessage:"field can't take an empty string"}]})},0)},c.prototype.MY=function(){return b.includes(f.Environment.hostname)||!this.uX},c.handleSuccessfulLicenseRequest=function(c){var u,d={granted:!1,payload:{},data:{}};return c&&c.analytics&&(d.data.analytics={key:c.analytics}),c&&c.hasOwnProperty("status")&&(c.status===h.Granted?(d.granted=!0,u={},c.hasOwnProperty("reporting")&&c.reporting&&(u.reporting=!0),c.hasOwnProperty("reportingUrls")&&(u.reportingUrls=c.reportingUrls),c.hasOwnProperty("reportingInterval")&&(u.reportingInterval=c.reportingInterval),c.hasOwnProperty("reportingSampleInterval")&&(u.reportingSampleInterval=c.reportingSampleInterval),d.payload=u):c.status===h.Denied&&(d.granted=!1,d.payload={message:c.message})),d},c.handleFailedLicenseRequest=function(c){var u={granted:!1,payload:{},data:{}};return c&&c.hasOwnProperty("validationInformation")?(u.granted=!1,u.payload=c):u.granted=!0,u},c.prototype.NY=function(c){for(var u=0,d=this.JY;u<d.length;u++)(0,d[u])(c.granted,c.payload,c.data)},c.prototype.setCustomData=function(c){this.GY=c},c.prototype.setDelay=function(c){isNaN(c)||(this.IY=Math.min(c,3e4))},c.prototype.OY=function(u,d,p){var h=this,m=JSON.stringify({domain:f.Environment.hostname,key:u||"",version:f.Environment.VERSION_NUMBER,customData:this.GY}),y=this.PY(p);y.load(d,g.HttpRequestMethod.POST,g.HttpResponseType.JSON,m).then(function(u){y.dispose(),h.LY=c.handleSuccessfulLicenseRequest
vendor: 1,188 bytes, line 13
13(_(u.body)),h.KY=!1,h.NY(h.LY)},function(f){y.dispose(),d!==S&&(0,v.getCapabilities)().isTizen?setTimeout(function(){return h.OY(u,S,p)},h.IY):(h.LY=c.handleFailedLicenseRequest(_(f.body)),h.KY=!1,h.NY(h.LY))})},c.prototype.PY=function(c){return new m.DefaultContentLoader({settings:{RETRY_DELAY:0,INCREASE_RETRY_DELAY:!1,INCREASE_RETRY_DELAY_BASE_SEC:0,MAX_INCREASE_RETRY_DELAY_SEC:0,QUERY_PARAMETERS:[],HTTP_HEADERS:null,XHR_TIMEOUT:2e4,DISABLE_RETRY_FOR_RESPONSE_STATUS:{}},logger:this.HY,config:{network:{requestApi:c}}})},c.getInstance=function(u,d,p){var h=[d,p].toString();return c.instanceMap.hasOwnProperty(h)||(c.instanceMap[h]=new c(u,d,p)),c.instanceMap[h]},c.reset=function(){Object.keys(c.instanceMap).forEach(function(u){return delete c.instanceMap[u]})},c.instanceMap={},c}()},79069:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.LicensingLegacySslBackendBaseUrl=void 0,u.LicensingLegacySslBackendBaseUrl=atob("aHR0cHM6Ly9saWNlbnNpbmctbGVnYWN5LXNzbC1jb21wYXQuYml0bW92aW4uY29t")},32703:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.getDateRangeEvent=h,u.nextDateRangeWithSameClass=f,u.extractDateRangeMetadata=function(c,u,d){c.forEac
13h(function(c,p,m){var g;c.endOnNext&&c.class&&(g=f(c,p,m)),d(h(c,u,g))})};var p=d(89927);function h(c,u,d){var h={};return h.startTime=(0,p.toSeconds)(Date.parse(c.startDate)),c.endDate?h.endTime=(0,p.toSeconds)(Date.parse(c.endDate)):void 0===c.duration||isNaN(c.duration)?c.endOnNext&&d&&(h.endTime=(0,p.toSeconds)(Date.parse(d.startDate))):h.endTime=(0,p.toSeconds)(Date.parse(c.startDate))+c.duration,u&&(h.startTime-=u),h.endTime&&u&&(h.endTime-=u),h.data=c,h}function f(c,u,d){for(var p=u+1;p<d.length;p++)if(d[p].class&&d[p].class===c.class)return d[p]}},58735:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.calculateMetadataHash=function(c,u){var d;return void 0===u&&(u=""),f(c)?String((0,h.calcHash)(c.metadataType+c.start+c.metadata.id+Object.keys(c.metadata).length+Object.keys(null!=(d=c.metadata.clientAttributes)?d:{}).length)):String((0,h.calcHash)(u+JSON.stringify(c)))},u.isDateRangeMetadata=f;var p=d(20213),h=d(57387);function f(c){return c.metadataType===p.MetadataType.DATERANGE}},59225:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.MetadataService=void 0;var p=d(80813),h=d(32485);u.MetadataService=function(){function c(c,u){this.K1=c,this.L1=new h.TimeMetadataHandler(c,u)}return c.prototype.addToMetadataParsedService=function(c,u,d){var h;u.start=u.start||c,null==(h=this.K1.serviceManager.get(p.ServiceName.MetadataParsedService))||h.addMetadata(d,u)},c.prototype.addToTimeline=function(c,u,d){this.L1.add(c,u,d)},c.prototype.removeUntil=function(c){this.L1.removeUntil(c)},c.prototype.removeMatchingCues=function(c,u){this.L1.removeMatchingCues(c,u)},c.prototype.reset=function(c){this.L1.reset(c)},c.prototype.dispose=function(){this.L1.dispose()},c}()},34851:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)}),f=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.MetadataTimeline=void 0;var m=d(3714);u.MetadataTimeline=function(c){function u(){return null!==c&&c.apply(this,arguments)||this}return h(u,c),u.prototype.addCue=function(u,d,p){var h,g;if(!isNaN(u)&&!isNaN(d)&&p){var v=this.scb(p.metadata,this.cues);if(-1===v)c.prototype.addCue.call(this,u,d,p);else{var y=this.scb(p.metadata,this.activeCues);if(this.tcb(v,y,{start:u+this.timestampOffset,end:d+this.timestampOffset,content:p,updates:f([],this.cues[v].updates,!0)}),-1!==y){var b={metadataType:p.metadataType,metadata:p.metadata,data:p.metadata,start:null!=(h=p.start)?h:u,end:null!=(g=p.end)?g:d};this.context.eventHandler.dispatchEvent(m.PlayerEvent.MetadataChanged,b)}}}},u.prototype.scb=function(c,u){return u.findIndex(function(u){return u.content.metadata.id===c.id})},u.prototype.tcb=function(c,u,d){-1!==c&&this.cues.splice(c,1,d),-1!==u&&this.activeCues.splice(u,1,d)},u}(d(80438).Timeline)},8719:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.StoredCueTracker=void 0,u.StoredCueTracker=function(){function c(){this.ugb={}}return c.prototype.add=function(c){this.ugb[c]=void 0},c.prototype.remove=function(c){delete this.ugb[c]},c.prototype.removeAll=function(){this.ugb={}},c.prototype.has=function(c){return c in this.ugb},c.prototype.dispose=function(){this.removeAll()},c}()},32485:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.TimeMetadataHandler=u.TimedMetadataType=void 0,u.isSegmentBoundMetadata=S;var f,m=d(3714),g=d(86897),v=d(15971),y=d(34851),b=d(80438);function S(c){return[f.InBand,f.SegmentPlayback,f.CustomTag].includes(c)}(p=f||(u.TimedMetadataType=f={})).InBand="inband",p.SegmentPlayback="segmentPlayback",p.Manifest="manifest",p.EventStream="eventStream",p.DateRange="dateRange",p.CustomTag="customTag",u.TimeMetadataHandler=function(){function c(c,u){var d=this;this.R1=function(c){var u,p,h;
13if((null==(u=null==c?void 0:c.content)?void 0:u.eventType)!=null)return null==(h=(p=d.O1)[c.content.eventType])?void 0:h.call(p,c.content)},this.M1=c,this.O1=u,this.P1()}return c.prototype.P1=function(){for(var c in this.N1={},this.O1)this.O1.hasOwnProperty(c)&&(this.N1[c]="dateRange"===c?new y.MetadataTimeline(this.M1,{onCueEnter:this.R1}):new b.Timeline(this.M1,{onCueEnter:this.R1,allowDuplicates:c===f.SegmentPlayback}),this.N1[c].show())},c.prototype.Q1=function(c,u){var d=(0,g.getBufferState)((0,v.getSourceState)(this.M1)),p=(0,g.getBufferStartTime)(null==d?void 0:d.bufferStateMap);c.removeMatchingCues(function(c){return c.start<=u&&c.end<=u+1&&c.end<=p})},c.prototype.add=function(c,u,d){if(this.O1.hasOwnProperty(c)){var p,g=this.N1[c],v=u+1;c===f.SegmentPlayback&&(p=d).metadata&&p.metadata.event&&p.metadata.representationId&&"event"in d.metadata&&"duration"in d.metadata.event?v=u+d.metadata.event.duration:d.metadataType===m.MetadataType.DATERANGE&&(v=!0===d.metadata.endOnNext&&void 0===d.end?1/0:d.start===d.end?d.end+1:d.end),S(c)&&this.Q1(g,u);var y=h({eventType:c},d);g.addCue(u,v,y)}},c.prototype.reset=function(c){if(c&&this.O1.hasOwnProperty(c))this.N1[c].removeCues();else for(var u in this.O1)this.O1.hasOwnProperty(u)&&this.N1[u].removeCues()},c.prototype.removeMatchingCues=function(c,u){this.N1[c].removeMatchingCues(u)},c.prototype.removeUntil=function(c){var u=this;Object.keys(this.N1).forEach(function(d){u.N1[d].removeCuesUntil(c)})},c.prototype.dispose=function(){for(var c in this.N1)this.N1.hasOwnProperty(c)&&(this.N1[c].dispose(),this.N1[c]=null);this.N1=null},c.prototype.getTimeline=function(c){if(this.N1)return this.N1[c]},c}()},80438:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.Timeline=void 0;var h=d(80813),f=d(3714),m=d(13531),g=d(57387),v=d(70850),y=d(58735),b=d(8719);function S(c){return(0,y.isDateRangeMetadata)(c.content)?(0,y.calculateMetadataHash)(c.content):String((0,g.calcHash)(JSON.stringify({start:c.start,end:c.end,content:c.content})))}u.Timeline=function(){function c(c,u){var d=this;this.cues=[],this.activeCues=[],this.activeCueUpdates=[],this.timestampOffset=0,this.cbb=function(c){var u=c.time||c.relativeTime||0;d.ebb(u),d.fbb(u),d.qcb(u)},this.context=c,this.abb=c.internalPlayer,this.Zbb=u,this.bbb=!1,u.allowDuplicates||(this.storedCueTracker=new b.StoredCueTracker),this.abb&&this.startListening()}return c.prototype.startListening=function(){this.bbb||(this.bbb=!0,this.abb.on(f.PlayerEvent.TimeChanged,this.cbb))},c.prototype.stopListening=function(){this.bbb&&(this.abb.off(f.PlayerEvent.TimeChanged,this.cbb),this.bbb=!1)},c.shouldCueBeActive=function(c,u){return c.end>=u&&c.start<=u},c.prototype.dbb=function(c){for(var u=0;u<this.activeCues.length;u++)if(c===this.activeCues[u])return!0;return!1},c.prototype.ebb=function(u){for(var d,p,h=0;h<this.activeCues.length;h++){var f=this.activeCues[h];c.shouldCueBeActive(f,u)||(this.activeCues.splice(h,1),h--,null==(p=(d=this.Zbb).onCueExit)||p.call(d,f))}},c.prototype.fbb=function(u){for(var d,p,h=0;h<this.cues.length;h++){var f=this.cues[h];if(c.shouldCueBeActive(f,u)&&!this.dbb(f)){if((null==(p=(d=this.Zbb).onCueEnter)?void 0:p.call(d,f))===!1)continue;this.activeCues.push(f)}}},c.prototype.qcb=function(c){for(var u,d,h=[],f=0,m=this.activeCues;f<m.length;f++){var g=m[f],v=function(c,u){for(var d=c.length-1;d>=0;d--)if(c[d].updateTime<=u)return c[d]}(g.updates,c);void 0!==v&&(h.push(v),this.rcb(v)||null==(d=(u=this.Zbb).onCueUpdate)||d.call(u,p(p({},g),{content:p(p({},g.content),v.content)})))}this.activeCueUpdates=h},c.prototype.rcb=function(c){return!!this.activeCueUpdates.find(function(u){return u===c})},c.prototype.addCue=function(c,u,d,h){var f,g=this;if(void 0===h&&(h=[]),!isNaN(c)&&!isNaN(u)&&d){var y=this.storedCueTracker?S({start:c,end:u,content:d}):void 0;if(!(null!=(f=this.storedCueTracker)&&f.has(y))){var b=h.map(function(c){return p(p({},c),{updateTime:c.updateTime+g.timestampOffset})}),_={start:c+this.timestampOffset,end:u+this.timestampOffset,content:d,updates:b};if(this.cues.length>0){var E=this.cues[this.cues.length-1];
vendor: 9,703 bytes, line 13
13if(v.Util.deepEqual(d,E.content)&&c>=E.start&&c-.5<=E.end)return this.context.logger.isLevelEnabled(m.LogLevel.INSANE)&&this.context.logger.insane("changing end time of existing cue instead of adding a new cue ["+c+"-"+u+"] "+d),void(this.cues[this.cues.length-1].end=Math.max(u,E.end))}if(this.context.logger.isLevelEnabled(m.LogLevel.INSANE)){var T=JSON.stringify(d);T.length>500&&(T=T.substring(0,497)+"..."),this.context.logger.insane("add new cue ["+c+"-"+u+"] "+T)}this.storedCueTracker&&this.storedCueTracker.add(y),this.cues.push(_)}}},c.prototype.addCues=function(c,u){u=u||0;for(var d=0,p=0;p<c.length;p++){var h=c[p];if(h&&h.hasOwnProperty("start")&&h.hasOwnProperty("end")&&h.end>u){var f=function(c){var u={text:c.text};return"html"in c&&(u.html=c.html,u.text=u.text||u.html),"region"in c&&(u.region=c.region),"regionStyle"in c&&(u.regionStyle=c.regionStyle),"position"in c&&(u.position=c.position),"image"in c&&(u.image=c.image),"vtt"in c&&(u.vtt=c.vtt),u}(h),m=function(c){var u=[];return"updates"in c&&(u=c.updates.map(function(u){return{updateTime:u.updateTime,content:{html:u.html,text:c.text}}})),u}(h);this.addCue(h.start,h.end,f,m),d=Math.max(d,h.end)}}return d},c.prototype.removeMatchingCues=function(c){var u=this;this.cues=this.cues.filter(function(d){var p,h=c(d);return h&&(null==(p=u.storedCueTracker)||p.remove(S(d))),!h})},c.prototype.removeCuesUntil=function(c){this.removeMatchingCues(function(u){return u.end<c})},c.prototype.removeCues=function(){var c;this.hide(),this.cues=[],null==(c=this.storedCueTracker)||c.removeAll()},c.prototype.hide=function(){this.ebb(-1),this.activeCues=[],this.activeCueUpdates=[]},c.prototype.show=function(){var c=this.context.serviceManager.get(h.ServiceName.PlayerStateService),u=null!=c&&c.seekingOrTimeshifting?c.targetPlaybackTime:this.abb.getCurrentTime();this.cbb({time:u})},c.prototype.isVisible=function(){return!0},c.prototype.setTimestampOffset=function(c){this.timestampOffset=c},c.prototype.dispose=function(){var c;this.cues=[],this.activeCues=[],this.activeCueUpdates=[],null==(c=this.storedCueTracker)||c.dispose(),this.stopListening()},c.prototype.getCues=function(){return this.cues},c}()},4129:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.DefaultContentLoader=void 0;var h,f=d(89927),m=d(88052),g=d(62756),v=d(3714),y=d(29669),b=d(70962),S=d(68205),_=d(21513),E=d(4527),T=d(47993),w=d(88844),P=d(58313),A=d(70850),I=d(39980),M=d(77401),R=d(91523),k=d(57456),x=d(10647);function C(){return{requestType:y.HttpRequestType.INTERNAL,maxRetries:0}}(h||(h={})).start="_download-start",u.DefaultContentLoader=function(){function c(c,u){void 0===u&&(u=C());var d=this;this.load=function(c,u,p,h,f,m,g,v){return void 0===m&&(m=!1),void 0===v&&(v=!1),(d.cI||d.lI)&&d.ZI.logger.debug("DefaultContentLoader: load called while a request is already active"),d.jI=g,d.mI=v,u=u||y.HttpRequestMethod.GET,c=d.sI(c),f=k.XhrHelper.mergeHeaders(d.iI.HTTP_HEADERS,f),c?(d.kI={method:u,url:P.URLHelper.toFullUrl(c),headers:JSON.parse(JSON.stringify(f)),responseType:p||y.HttpResponseType.TEXT,credentials:m?"include":"omit"},h&&(d.kI.body=h),d.AI(d.kI).then(function(c){return d.tI(c).catch(d.OJ)}).then(d.BI).then(d.yI).then(function(c){return d.nI&&c.body instanceof d.nI.Stream?c.body=c.body.transform(function(c){return c},function(){return d.NJ(c)},function(u){return u.message===M.RequestError.Failed&&d.cancel(),c.body.abort(u.message),u.message}):d.NJ(c),c})):Promise.reject("no url given")},this.yI=function(c){return d.SJ(c.status)?d.RJ("Bad response from server",c):Promise.resolve(c)},this.AI=function(c){return d.zI(c,d.bI.preprocessHttpRequest)},this.BI=function(c){return d.zI(c,d.bI.preprocessHttpResponse)},this.MJ=function(c){if("function"==typeof d.aI.onProgress&&!d.dI&&d.cI&&(!(c.loadedBytes>=0)||void 0===c.totalBytes||!(c.loadedBytes>=c.totalBytes))){var u=d.oI.getElapsedTimeFrom(d.pI.start);d.aI.onProgress(p(p({},c),{elapsedTime:u}))}},this.OJ=function(c){return d.gI++,c.error===M.RequestError.Canceled?d.RJ(c.error,c.response):d.BI(c.response).then(function(u){var p,h,f=null==u?void 0:u.status,m=u?u.url:null;if(!f&&d.aI.resetRetriesWhenOffline&&m&&"string"==typeof(p=m)&&(0,_.getReachableDomains)().domains.includes((0,P.extractOrigin)(p))&&(d.gI=0),d.bI.retryHttpRequest&&"function"==typeof d.bI.retryHttpRequest)return d.PJ(c.error,u);if(null!=u&&u.status&&d.SJ(u.status))return d.RJ("retry disabled for HTTP status code "+u.status,u);var g=null!=(h=d.aI.maxRetries)?h:0;return d.gI>g?(d.ZI.logger.debug("Retries exceeded for ".concat(d.aI.requestType," (max retries: ").concat(g,")")),d.RJ(c.error,u)):d.QJ().catch(d.OJ)})},this.RJ=function(c,u){var p=d.gI;return d.TJ(),d.cI=!1,d.rI(!1,u,p),d.aI.onFailure(u,{name:c},p-1),Promise.reject(u??Error(c))},this.ZI=c,this.bI=this.ZI.config&&this.ZI.config.network||{},m.ModuleManager.has(g.ModuleName.EngineBitmovin)&&(this.nI=m.ModuleManager.get(g.ModuleName.EngineBitmovin)),this.aI=p(p({},C()),u),this.oI=new I.PerformanceMonitor(this.ZI),this.UJ()}return c.prototype.qI=function(c,u,d){return Math.min(Math.exp(c*u),d)},c.prototype.rI=function(c,u,d){u&&this.aI.requestType&&this.hI(v.PlayerEvent.DownloadFinished,{type:v.PlayerEvent.DownloadFinished,timestamp:Date.now(),httpStatus:u.status,success:c,url:u.url,downloadTime:(0,f.toSeconds)(A.Util.roundValue((0,f.toMilliSeconds)(u.elapsedTime),0)),size:u.length||0,attempt:d,maxAttempts:this.aI.maxRetries+1,downloadType:this.aI.requestType,mimeType:this.jI,timeToFirstByte:u.timeToFirstByte})},c.prototype.isLoading=function(){return this.cI},c.prototype.isRetrying=function(){return this.gI>0},c.prototype.setResetRetriesWhenOffline=function(c){this.aI.resetRetriesWhenOffline=c},c.prototype.setMaxRetries=function(c){this.aI.maxRetries=c},c.prototype.sI=function(c){return P.URLHelper.appendQueryParametersToUrl(c,this.iI.QUERY_PARAMETERS)},c.prototype.tI=function(c){var u=this;if(this.dI)return Promise.reject({error:M.RequestError.Canceled,response:null});this.pI&&this.oI.clear(this.pI);var d="request-"+A.Util.generateUniqueId();return this.pI={start:d+h.start},this.oI.addMarker(this.pI.start),this.kI=c,this.cI=!0,this.vI(),this.eI.getResponse().then(function(c){return null==c.elapsedTime&&(c.elapsedTime=u.oI.getElapsedTimeFrom(u.pI.start),c.timeToFirstByte=0),c})},c.prototype.uI=function(){var c,u=this;this.bI.sendHttpRequest&&"function"==typeof this.bI.sendHttpRequest&&(c=(0,A.safeUserCallback)(function(){return u.bI.sendHttpRequest(u.aI.requestType,u.kI)},this.ZI.logger));var d=this.bI.requestApi===y.NetworkRequestApi.Fetch||this.mI;if(d&&!(0,T.isFetchSupported)()&&(this.ZI.logger.debug("Using fetch API is configured but not supported, falling back to XHR!"),d=!1),!c||"function"!=typeof c.getResponse){var p=(0,R.getRequestTimeout)(this.ZI,this.aI.requestType);c=d?this.xI(p):this.wI(p)}return c},c.prototype.vI=function(){var c=this,u=this.uI();u.setProgressListener(function(u){return c.MJ(u)});var d=E.CancelablePromise.makeCancelable(u.getResponse());this.eI={getResponse:function(){return d},cancel:function(){u.cancel(),d.cancel({error:M.RequestError.Canceled,response:null})},setProgressListener:u.setProgressListener}},c.prototype.wI=function(c){var u=this.aI.disableDownloadTimeout?-1:c;return new x.XhrRequestController(this.ZI.logger,this.kI,u)},c.prototype.xI=function(c){return new this.nI.FetchController(this.ZI,this.kI,c,this.mI)},c.prototype.zI=function(c,u){var d,p=this;return u&&"function"==typeof u?Promise.resolve(null!=(d=(0,A.safeUserCallback)(function(){return u(p.aI.requestType,c)},this.ZI.logger))?d:c):Promise.resolve(c)},c.prototype.NJ=function(c){this.cI=!1,this.rI(!0,c,this.gI+1),this.aI.onSuccess(c,c.elapsedTime,c.url),this.TJ(),c.url&&(0,_.default)().dispatch((0,S.addReachableDomain)((0,P.extractOrigin)(c.url)))},c.prototype.PJ=function(c,u){var d=this;return Promise.resolve((0,A.safeUserCallback)(function(){return d.bI.retryHttpRequest(d.aI.requestType,u,d.gI)},this.ZI.logger)).then(function(c){return c.request?(d.ZI.logger.debug("HttpResponse was passed on 'retryHttpRequest' instead of a HttpRequest",c),d.RJ("HttpResponse was passed on 'retryHttpRequest' instead of a HttpRequest",u)):d.tI(c).catch(d.OJ)}).catch(function(){return d.RJ(c,u)})},c.prototype.QJ=function(){var c=this,u=this.aI.retryDelay,d="constant";return this.iI.INCREASE_RETRY_DELAY&&(u=this.qI(this.iI.INCREASE_RETRY_DELAY_BASE_SEC,this.gI,this.iI.MAX_INCREASE_RETRY_DELAY_SEC),d="incremental"),this.ZI.logger.debug("Using ".concat(d," retry delay (").concat(null==u?void 0:u.toFixed(1)," seconds, retry ").concat(this.gI,") for ").concat(this.kI.url)),new Promise(function(d,p){var h=window.setTimeout(function(){c.tI(c.kI).then(d).catch(p)},(0,f.toMilliSeconds)(u));c.lI=function(){c.lI=null,(0,w.clearTimeoutIfDefined)(h),p({error:M.RequestError.Canceled,response:null})}})},c.prototype.SJ=function(c){return this.aI.requestType in this.iI.DISABLE_RETRY_FOR_RESPONSE_STATUS&&this.iI.DISABLE_RETRY_FOR_RESPONSE_STATUS[this.aI.requestType].includes(c)},c.prototype.TJ=function(){this.gI=0,this.dI=!1,this.lI&&"function"==typeof this.lI&&this.lI()},c.prototype.cancel=function(){this.dI=!0,this.cI&&(this.cI=!1,this.lI&&this.lI(),this.eI&&this.eI.cancel())},c.prototype.getResponse=function(){if(this.eI&&"function"==typeof this.eI.getResponse)return this.eI.getResponse()},c.prototype.UJ=function(){var c=["onSuccess","onFailure"];this.gI=0;var u={};A.Util.deepCopy(u,b.DefaultSettings),this.iI=this.ZI.settings||u;
13for(var d=0;d<c.length;d++)this.aI.hasOwnProperty(c[d])&&"function"==typeof this.aI[c[d]]||(this.aI[c[d]]=function(){});this.ZI.eventHandler&&"function"==typeof this.ZI.eventHandler.dispatchEvent?this.hI=this.ZI.eventHandler.dispatchEvent:this.hI=function(){}},c.prototype.dispose=function(){this.isLoading()&&this.cancel(),this.pI&&this.oI.clear(this.pI),this.eI=null,this.hI=null,this.iI=null},c}()},85625:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.ManifestMimeType=void 0,(p=d||(u.ManifestMimeType=d={})).Dash="application/dash+xml",p.Hls="application/x-mpegurl",p.Smooth="application/vnd.ms-sstr+xml"},39980:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.PerformanceMonitor=void 0;var p=d(89927),h=d(50025);u.PerformanceMonitor=function(){function c(c){this.context=c}return c.prototype.g5=function(c){return 0===c.length?(this.context.logger.warn("[PERFORMANCE] Mark was not found"),[{startTime:0,duration:0}]):c},c.prototype.h5=function(c){return this.g5(h.performanceWrapper.getEntriesByName(c))},c.prototype.addMarker=function(c){h.performanceWrapper.mark(c)},c.prototype.getElapsedTimeFrom=function(c){var u=this.h5(c);return(0,p.toSeconds)(h.performanceWrapper.now()-u[0].startTime)},c.prototype.clear=function(c){(Array.isArray(c)?c:Object.values(c)).forEach(function(c){h.performanceWrapper.clearMarks(c)})},c}()},13053:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.getPerformanceShim=void 0,(d=p||(p={})).mark="mark",d.measure="measure";var d,p,h=[],f={},m=function(c,u){h=u?h.filter(function(d){return d.name!==u&&d.entryType===c}):h.filter(function(u){return u.entryType!==c})},g=function(c,u){return h.filter(function(d){return d[c]===u})},v=function(c,u){f[u]=c,h.push(c)};u.getPerformanceShim=function(){return{now:function(){return Date.now()},mark:function(c){v({name:c,entryType:p.mark,startTime:this.now(),duration:0},c)},measure:function(c,u,d){var h=function(c){return"[Performance] Mark ".concat(c," does not exist.")};if(!f[d])throw Error(h(d));if(!f[u])throw Error(h(u));var m=f[u]?f[u].startTime:0;v({name:c,startTime:m,duration:(f[d]?f[d].startTime:this.now())-m,entryType:p.measure},c)},getEntriesByName:function(c){return g("name",c)},getEntriesByType:function(c){return g("entryType",c)},clearMarks:function(c){m(p.mark,c)},clearMeasures:function(c){m(p.measure,c)}}}},50025:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.performanceWrapper=u.resolvePerformanceApi=u.requiredMethodNames=void 0;var p=d(13053);u.requiredMethodNames=["now","mark","measure","getEntriesByName","getEntriesByType","clearMarks","clearMeasures"],u.resolvePerformanceApi=function(c){var d;return(d=c.performance,u.requiredMethodNames.every(function(c){return"function"==typeof d[c]}))?c.performance:(0,p.getPerformanceShim)()},u.performanceWrapper=(0,u.resolvePerformanceApi)(window)},77401:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.RequestError=void 0,(p=d||(u.RequestError=d={})).Failed="request failed",p.Canceled="canceled by user",p.TimedOut="request has timed out"},4131:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.hasLoadedData=function(c){var u,d,p=(null!=(d=null==(u=c.responseTiming)?void 0:u.headersReceivedTimestamp)?d:-1)>-1,h=c.loadedBytes>0;return p&&h}},43446:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.TimingUtil=void 0;var p=d(89927);u.TimingUtil=function(){function c(){}return c.getHiResTimestamp=function(){return window.performance&&"function"==typeof window.performance.now?(0,p.toSeconds)(window.performance.now()):(0,p.toSeconds)(Date.now())},c}()},96266:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.XhrEvent=void 0,(p=d||(u.XhrEvent=d={})).ReadyStateChange="readystatechange",p.Abort="abort",p.Error="error",p.Load="load",p.LoadEnd="loadend",p.LoadStart="loadstart",p.Progress="progress",p.Timeout="timeout"},57456:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};
vendor: 5,094 bytes, lines 13-14
13Object.defineProperty(u,"__esModule",{value:!0}),u.XhrHelper=void 0,u.isDownloadTimeInformationValid=function(c){return c.length>0&&c.elapsedTime>=0&&c.timeToFirstByte>=0&&c.elapsedTime>c.timeToFirstByte};var h=d(29669),f=d(21513);u.XhrHelper=function(){function c(){}return c.headersStringToArray=function(c){if(!c||0===c.trim().length)return{};for(var u={},d=0,p=c.split(`\r
14`);d<p.length;d++){var h=p[d],f=h.indexOf(": ");-1!==f&&(u[h.slice(0,f)]=h.slice(f+2))}return u},c.toHttpResponse=function(u,d,h){var m=u.readyState===XMLHttpRequest.OPENED&&(0,f.getCapabilities)().isTizen?{status:-1,statusText:"PENDING"}:{status:u.status,statusText:u.statusText},g=c.headersStringToArray(u.getAllResponseHeaders()),v=p({request:d,url:u.responseURL||d.url,headers:g},m);return h.openedTimestamp>-1&&h.headersReceivedTimestamp>-1&&h.doneTimestamp>-1&&(v.timeToFirstByte=h.headersReceivedTimestamp-h.openedTimestamp,v.elapsedTime=h.doneTimestamp-h.openedTimestamp),u.response&&(v.body=this.getResponseBody(u,d.responseType),v.length=u.response.byteLength||u.response.length||0),v},c.getResponseBody=function(c,u){var d;if(u===h.HttpResponseType.JSON&&null!=(d=c.getResponseHeader("content-type"))&&d.includes("application/json")&&"string"==typeof c.response)try{return JSON.parse(c.response)}catch{return null}return c.response},c.setHeaders=function(c,u){u&&Object.keys(u).length>0&&Object.keys(u).forEach(function(d){c.setRequestHeader(d,u[d])})},c.mergeHeaders=function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];var d={};return c.forEach(function(c){c&&Object.keys(c).forEach(function(u){var p=Object.keys(d).find(function(c){return c.toLowerCase()===u.toLowerCase()});p?d[p]=c[u]:d[u]=c[u]})}),d},c}()},10647:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.XhrRequestController=void 0;var p=d(77401),h=d(96266),f=d(99313);u.XhrRequestController=function(){function c(c,u,d){var p=this;this.setProgressListener=function(c){p.i5.on(h.XhrEvent.Progress,function(u){return c(u)})},this.i5=new f.XhrWrapper(c,u,d)}return c.prototype.getResponse=function(){return this.j5=this.j5||this.i5.send(),this.j5},c.prototype.cancel=function(){this.i5.abort(p.RequestError.Canceled)},c}()},99313:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.XhrWrapper=void 0;var h=d(89927),f=d(88844),m=d(77401),g=d(43446),v=d(96266),y=d(57456);u.XhrWrapper=function(){function c(c,u,d){var p=this;this.fdb=!1,this.hdb=function(c){var u,d,h=null!=(u=c.total)?u:-1,f=null!=(d=c.loaded)?d:-1,m=g.TimingUtil.getHiResTimestamp();p.ddb.totalBytes=h,p.ddb.loadedBytes=f,p.edb.progressTimestamp=m,f<h&&p.gdb()},this.idb=function(c){var u=(0,h.toSeconds)(c.timeStamp);if(p.Ydb.readyState===p.Ydb.OPENED)p.edb.openedTimestamp=u,p.gdb();else if(p.Ydb.readyState===p.Ydb.HEADERS_RECEIVED)p.edb.headersReceivedTimestamp=u,p.gdb();else if(p.Ydb.readyState===p.Ydb.DONE){var d=p.Ydb.status>=200&&p.Ydb.status<300;p.edb.doneTimestamp=u,d&&null!==p.Ydb.response?p.Zdb(y.XhrHelper.toHttpResponse(p.Ydb,p.Wdb,p.edb)):p.fdb||p.jdb(m.RequestError.Failed),p.dispose()}},this.Vdb=c,this.Wdb=u,this.timeout=d,this.bdb={},this.cdb=!1,this.edb={sendTimestamp:-1,openedTimestamp:-1,headersReceivedTimestamp:-1,progressTimestamp:-1,doneTimestamp:-1},this.ddb={totalBytes:-1,loadedBytes:-1,url:u.url,responseTiming:this.edb}}return c.prototype.on=function(c,u){this.bdb=this.bdb||{},this.bdb[c]=this.bdb[c]||[],this.bdb[c].push(u)},c.prototype.gdb=function(){var c,u=this;(null!=(c=this.bdb[v.XhrEvent.Progress])?c:[]).forEach(function(c){return c(p({},u.ddb))})},c.prototype.send=function(){var c=this;return this.Ydb=new XMLHttpRequest,this.cdb=!1,this.fdb=!1,new Promise(function(u,d){c.Zdb=u,c.adb=d;try{c.Ydb.addEventListener(v.XhrEvent.Progress,c.hdb),c.Ydb.addEventListener(v.XhrEvent.ReadyStateChange,c.idb)}catch(d){return c.Vdb.debug("ContentLoader: could not add event listeners",d),u(c.send())}c.edb.sendTimestamp=g.TimingUtil.getHiResTimestamp(),c.Ydb.open(c.Wdb.method,c.Wdb.url),c.Ydb.withCredentials="include"===c.Wdb.credentials,c.gdb(),y.XhrHelper.setHeaders(c.Ydb,c.Wdb.headers),c.Wdb.responseType&&(c.Ydb.responseType=c.Wdb.responseType),c.timeout>0&&(c.Xdb=window.setTimeout(function(){return c.abort(m.RequestError.TimedOut)},c.timeout)),c.Wdb.body?c.Ydb.send(c.Wdb.body):c.Ydb.send()})},c.prototype.dispose=function(){this.cdb||((0,f.clearTimeoutIfDefined)(this.Xdb),this.Ydb.removeEventListener(v.XhrEvent.Progress,this.hdb),this.Ydb.removeEventListener(v.XhrEvent.ReadyStateChange,this.idb),this.bdb=null,this.Ydb=null,this.Zdb=null,this.adb=null,this.cdb=!0)},c.prototype.jdb=function(c,u){void 0===u&&(u=!1),this.cdb||(this.adb({error:c,response:y.XhrHelper.toHttpResponse(this.Ydb,this.Wdb,this.edb)}),u&&this.Ydb.abort())},c.prototype.abort=function(c){void 0===c&&(c=m.RequestError.Canceled),this.cdb||this.fdb||(this.fdb=!0,this.jdb(c,
14!0),this.dispose())},c}()},91523:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.getRequestTimeout=function(c,u){var d,h,f,m,g=null!=(d=c.config.network)?d:{};return(0,p.toMilliSeconds)(null!=(m=null!=(f=null==(h=g.requestTimeout)?void 0:h[u])?f:g.defaultRequestTimeout)?m:c.settings.XHR_TIMEOUT)};var p=d(89927)},25811:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.DRMSchemeIDURIs=void 0,u.keySystemNameToSchemeUri=function(c){return Object.keys(u.DRMSchemeIDURIs).find(function(d){return u.DRMSchemeIDURIs[d]===c})},u.DRMSchemeIDURIs={"urn:mpeg:dash:mp4protection:2011":"cenc","urn:mpeg:dash:13818:1:CA_descriptor:2011":"cenc4ts","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"widevine","urn:uuid:5e629af5-38da-4063-8977-97ffbd9902d4":"marlin_v1","urn:uuid:adb41c24-2dbf-4a6d-958b-4457c0d27b95":"tvkey","urn:uuid:a68129d3-575b-4f1a-9cba-3223846cf7c3":"nds_videoguard","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"playready","urn:uuid:9a27dd82-fde2-4725-8cbc-4234aa06ec09":"verimatrix_vcas","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"primetime","urn:uuid:1f83e1e8-6ee9-4f0d-ba2f-5ec4e3ed1a66":"securemedia","urn:uuid:644fe7b5-260f-4fad-949a-0762ffb054b4":"cmla_oma","urn:uuid:6a99532d-869f-5922-9a91-113ab7b1e2f3":"mobitv","urn:uuid:35bf197b-530e-42d7-8b65-1b4bf415070f":"divx_drm5","urn:uuid:b4413586-c58c-ffb0-94a5-d4896c1af6c3":"viaccess-orca","urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"common_system-id"}},51682:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.ISOBMFFConstants=void 0,u.ISOBMFFConstants={BOX_HEADER_LENGTH_REGULAR:8,BOX_HEADER_LENGTH_LARGE:16,BOX_SIZE_LENGTH:4,BOX_TYPE_LENGTH:4,FULL_BOX_VERSION_LENGTH:1,FULL_BOX_FLAGS_LENGTH:3,PSSH_KID_COUNT_LENGTH:4,PSSH_KID_LEN:16,PSSH_SYSTEM_ID_LENGTH:16,PSSH_DATA_SIZE:4}},33468:function(c,u){var d,p,h;Object.defineProperty(u,"__esModule",{value:!0}),u.KeySystemMap=u.KeySystemKind=void 0,u.keySystemUidToKind=function(c){return Object.keys(u.KeySystemMap).find(function(d){return u.KeySystemMap[d].includes(c)})},u.getRelevantKeySystemMap=function(c){var d,h=((d={})[p.FAIRPLAY]=[],d[p.PLAYREADY]=[],d[p.PRIMETIME]=[],d[p.WIDEVINE]=[],d[p.TVKEY]=[],d);return Object.keys(p).forEach(function(d){var f=p[d];c[f]&&(h[f]=u.KeySystemMap[f])}),h},(h=p||(u.KeySystemKind=p={})).FAIRPLAY="fairplay",h.PLAYREADY="playready",h.PRIMETIME="primetime",h.WIDEVINE="widevine",h.TVKEY="tvkey",(d={})[p.FAIRPLAY]=["com.apple.fairplay","com.apple.fps.1_0","com.apple.fps.2_0","com.apple.fps.3_0"],d[p.PLAYREADY]=["com.youtube.playready","com.microsoft.playready","com.microsoft.playready.recommendation","com.microsoft.playready.recommendation.3000"],d[p.PRIMETIME]=["com.adobe.primetime","com.adobe.access"],d[p.WIDEVINE]=["com.widevine.alpha","com.widevine.alpha.experiment"],d[p.TVKEY]=["com.tvkey.drm"],u.KeySystemMap=d},35267:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.createAction=function(c,u){return{type:c,meta:{},payload:u}}},48774:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.devToolsExtension=void 0,u.devToolsExtension=d(4081).default.__REDUX_DEVTOOLS_EXTENSION__},39541:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.ReducerTree=void 0,u.isReducer=f,u.isReducerTree=function(c){return!!c&&c instanceof h};var p=d(91829),h=function(){function c(){this.R8={}}return c.prototype.has=function(c){return!!this.R8[c]},c.prototype.set=function(c,u){return this.R8[c]=u,this},c.prototype.get=function(c){return this.R8[c]},c.prototype.delete=function(c){delete this.R8[c]},c.prototype.keys=function(){return Object.keys(this.R8)},c.prototype.S8=function(c){var u=this,d={};return this.keys().forEach(function(p){var h=u.get(p),m=c.concat(String(p));d[p]=f(h)?h:h.S8(m)}),0===Object.keys(d).length?function(c){return{}}:(0,p.combineReducers)(d)},c.prototype.buildReducer=function(){return this.S8([])},c}();function f(c){return!!c&&"function"==typeof c}u.ReducerTree=h},61674:function(c,u){var d=this&&this.__assign||function(){return(d=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};
vendor: 4,534 bytes, line 14
14Object.defineProperty(u,"__esModule",{value:!0}),u.addStoreServiceDecoration=void 0,u.addStoreServiceDecoration=function(c){return function(u){return function(){var p=function(){return c.buildReducer()},h=u(p()),f=function(){return h.replaceReducer(p())};return f(),d(d({},h),{addReducer:function(u,d){c.set(u,d),f()},getReducer:function(u){return c.get(u)},removeReducer:function(u){c.delete(u),f()},hasReducer:function(u){return c.has(u)}})}}}},21513:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.default=S,u.getCapabilities=function(){return S().getState().capabilities},u.getReachableDomains=function(){return S().getState().reachableDomains};var p,h=d(91829),f=d(14638),m=(d(48774),d(81683),d(60430)),g=d(39541),v=d(61674),y=new g.ReducerTree;y.set("capabilities",f.CapabilityReducer).set("reachableDomains",m.ReachableDomainsReducer);var b=function(){var c=[(0,v.addStoreServiceDecoration)(y)];return(0,h.createStore)(function(){return{}},h.compose.apply(void 0,c))};function S(){return p||(p=b()),p}},61089:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.StoreService=void 0;var h=d(39541),f=d(93204);u.StoreService=function(){function c(c,u,d){var p=this;this.parentStore=c,this.levelIdentifier=u,this.identifierValue=d,this.RY=[],this.TY=function(c){return c[p.levelIdentifier][p.identifierValue]},this.QY=new h.ReducerTree,this.VY(this.QY)}return c.prototype.dispatch=function(c){var u;return null==(u=this.parentStore)?void 0:u.dispatch(this.SY(c))},c.prototype.SY=function(c){var u;return p(p({},c),{meta:p(p({},c.meta),((u={})[this.levelIdentifier]=this.identifierValue,u))})},c.prototype.UY=function(){return this.parentStore.hasReducer(this.levelIdentifier)||this.parentStore.addReducer(this.levelIdentifier,new h.ReducerTree),this.parentStore.getReducer(this.levelIdentifier)},c.prototype.VY=function(c){var u=this.UY();(0,h.isReducerTree)(u)&&u.set(this.identifierValue,c),this.parentStore.addReducer(this.levelIdentifier,u)},c.prototype.getState=function(){var c,u=null==(c=this.parentStore)?void 0:c.getState();if(u)return this.TY(u)},c.prototype.subscribe=function(c,u){var d=this,p=(0,f.subscribe)(this.parentStore)(this.TY,c,u);return this.RY.push(p),function(){d.RY=d.RY.filter(function(c){return c!==p}),p()}},c.prototype.WY=function(c){var u=this;return function(d,p){return p.meta&&p.meta[u.levelIdentifier]&&p.meta[u.levelIdentifier]!==u.identifierValue?d:c(d,p)}},c.prototype.addReducer=function(c,u){this.QY.set(c,(0,h.isReducer)(u)?this.WY(u):u),this.VY(this.QY)},c.prototype.addReducers=function(c){for(var u=0,d=Object.entries(c);u<d.length;u++){var p=d[u],f=p[0],m=p[1];void 0!==m&&this.QY.set(f,(0,h.isReducer)(m)?this.WY(m):m)}this.VY(this.QY)},c.prototype.getReducer=function(c){return this.QY.get(c)},c.prototype.removeReducer=function(c){this.QY.delete(c),this.VY(this.QY)},c.prototype.hasReducer=function(c){return this.QY.has(c)},c.prototype.dispose=function(){var c=this.UY();this.RY.forEach(function(c){return c()}),c&&(0,h.isReducerTree)(c)&&c.delete(this.identifierValue),this.parentStore.addReducer(this.levelIdentifier,c),this.RY=[],this.QY=null,this.parentStore=null},c}()},93204:function(c,u){function d(c){return function(u,d,p){void 0===p&&(p=function(){return!0});var h=u(c.getState());return c.subscribe(function(){var f=u(c.getState()),m=h;h=f,null!=f&&f!==m&&p(f,m)&&d(f,m)})}}function p(c){return function(u,p,h){void 0===h&&(h=function(){return!0});var f=d(c)(u,function(c){f(),p(c)},h);return f}}Object.defineProperty(u,"__esModule",{value:!0}),u.subscribe=d,u.waitForStateChange=p,u.waitForStateChangeThen=function(c){return function(u,d){return void 0===d&&(d=function(){return!0}),new Promise(function(h){p(c)(u,function(c){h(c)},d)})}}},91565:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.initializeCapabilities=function(){return(0,f.createAction)(g,y())},u.setCapabilityKey=function(c,u){return(0,f.createAction)(v,{key:c,value:u})};var p=d(47993),h=d(15487),f=d(35267),m=d(7387),g=m.CapabilityActionType.InitCapabilities,v=m.CapabilityActionType.SetCapability,y=function(){var c;return{isPlayStation5:h.isPlayStation5(),isPlayStation4:h.isPlayStation4(),isMobile:h.isMobile(),isTizen:h.isTizen(),isSafari:h.isSafari(),isIOS:h.isIOS(),isSafariIOS:h.isSafariIOS(),isEdge:h.isEdge(
14),isLegacyEdge:h.isLegacyEdge(),isEdgeChromium:h.isEdgeChromium(),isChrome:h.isChrome(),isChromium:h.isChromium(),isFirefox:h.isFirefox(),isFirefoxIOS:h.isFirefoxIOS(),isWebOS:h.isWebOS(),isVidaa:h.isVidaa(),isVizio:h.isVizio(),isReactNative:h.isReactNative(),isWpeWebKit:h.isWpeWebKit(),MSESafari:p.MSESafari(),isLocalStorageAvailable:p.isLocalStorageAvailable(),isInlinePlaybackRestricted:p.isInlinePlaybackRestricted(),edgeVersion:h.getEdgeVersion(),IOSVersion:h.getIOSVersion(),safariVersion:h.getSafariVersion(),webOSChromiumVersion:null!=(c=h.getWebOsChromiumVersion().major)?c:0,techSupportedByModules:p.getTechSupportedByModules(),techSupportedByPlatform:p.getTechSupportedByPlatform(),techSupportedByModulesOnPlatform:p.getTechSupportedByModulesOnPlatform()}}},14638:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.CapabilityReducer=void 0;var f=d(3793),m=d(7387);u.CapabilityReducer=(0,f.default)({},((p={})[m.CapabilityActionType.InitCapabilities]=function(c,u){return u.payload},p[m.CapabilityActionType.SetCapability]=function(c,u){var d,p,f,m;return f=(d=u.payload).key,m=d.value,h(h({},c),((p={})[f]=m,p))},p))},7387:function(c,u){var d,p,h,f;Object.defineProperty(u,"__esModule",{value:!0}),u.CapabilityKey=u.CapabilityActionType=void 0,(h=d||(u.CapabilityActionType=d={})).InitCapabilities="initcapabilities",h.SetCapability="setcapability",(f=p||(u.CapabilityKey=p={})).isPlayStation5="isPlayStation5",f.isPlayStation4="isPlayStation4",f.isMobile="isMobile",f.isTizen="isTizen",f.isSafari="isSafari",f.isChrome="isChrome",f.isChromium="isChromium",f.isFirefox="isFirefox",f.isFirefoxIOS="isFirefoxIOS",f.isWebOS="isWebOS",f.isVidaa="isVidaa",f.isVizio="isVizio",f.isIOS="isIOS",f.isSafariIOS="isSafariIOS",f.isEdge="isEdge",f.isLegacyEdge="isLegacyEdge",f.isEdgeChromium="isEdgeChromium",f.isReactNative="isReactNative",f.isWpeWebKit="isWpeWebKit",f.MSESafari="MSESafari",f.isLocalStorageAvailable="isLocalStorageAvailable",f.isInlinePlaybackRestricted="isInlinePlaybackRestricted",f.IOSVersion="IOSVersion",f.edgeVersion="edgeVersion",f.safariVersion="safariVersion",f.webOSChromiumVersion="webOSChromiumVersion",f.techSupportedByModules="techSupportedByModules",f.techSupportedByPlatform="techSupportedByPlatform",f.techSupportedByModulesOnPlatform="techSupportedByModulesOnPlatform"},3793:function(c,u){var d;Object.defineProperty(u,"__esModule",{value:!0}),u.StaticActionTypes=void 0,(d||(u.StaticActionTypes=d={})).Default="default",u.default=function(c,u){return function(p,h){return void 0===p&&(p=c),u[h.type]?u[h.type](p,h):u[d.Default]?u[d.Default](p,h):p}}},77753:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.isInstanceState=function(c){return(0,p.isObject)(c)&&["player","metrics"].every(function(u){return u in c})};var p=d(94685)},98714:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.setPreferredBitrateForMimeTypeAction=function(c,u){return(0,p.createAction)(h.AdaptationActionType.SetPreferredBitrateForMimeType,{mimeType:c,preferredBitrate:u})},u.clearPreferredBitrateForMimeTypeAction=function(c){return(0,p.createAction)(h.AdaptationActionType.ClearPreferredBitrateForMimeType,{mimeType:c})};var p=d(35267),h=d(56960)},87133:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.AdaptationReducer=void 0;var f=d(3793),m=d(56960);u.AdaptationReducer=(0,f.default)({},((p={})[m.AdaptationActionType.SetPreferredBitrateForMimeType]=function(c,u){var d,p,f,m=u.payload;return d=m.mimeType,p=m.preferredBitrate,h(h({},c),((f={})[d]=h(h({},c[d]),{preferredBitrate:p}),f))},p[m.AdaptationActionType.ClearPreferredBitrateForMimeType]=function(c,u){var d,p;return d=u.payload.mimeType,h(h({},c),((p={})[d]=h(h({},c[d]),{preferredBitrate:void 0}),p))},p))}
14,49859:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.getAdaptationState=function(c){return c.adaptation},u.getPreferredBitrate=function(c,u){return c[u]?c[u].preferredBitrate:void 0}},56960:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.AdaptationActionType=void 0,(p=d||(u.AdaptationActionType=d={})).SetPreferredBitrateForMimeType="setpreferredbitrateformimetype",p.ClearPreferredBitrateForMimeType="clearpreferredbitrateformimetype"},91678:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.initializeMetricsForMimeType=function(c,u,d){return void 0===d&&(d=c),(0,p.createAction)(h.MetricsActionType.InitializeMetricsForMimeType,{mimeType:c,settings:u,saveUnderName:d})},u.removeMetricsForMimeType=function(c){return(0,p.createAction)(h.MetricsActionType.RemoveMetricsForMimeType,{mimeType:c})},u.addMetricsValue=function(c,u,d){return(0,p.createAction)(h.MetricsActionType.AddMetricsValue,{mimeType:c,metricType:u,value:d})},u.removeMetricsValue=function(c,u,d){return(0,p.createAction)(h.MetricsActionType.RemoveMetricsValue,{mimeType:c,metricType:u,value:d})},u.clearMetricsHistory=function(c,u){return(0,p.createAction)(h.MetricsActionType.ClearMetricsHistory,{mimeType:c,metricType:u})},u.setBufferLogicActivationThreshold=function(c,u){return(0,p.createAction)(h.MetricsActionType.SetBufferLogicActivationThreshold,{mimeType:c,threshold:u})};var p=d(35267),h=d(33436)},27359:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.containMimeTypeGuard=function(c){return function(u,d){return u[d.mimeType]?c(u,d):u}}},6873:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},f=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.MetricsReducer=void 0;var m=d(3793),g=d(27359),v=d(33436);function y(c,u){var d,p=u.mimeType,f=u.threshold;return h(h({},c),((d={})[p]=h(h({},c[p]),{bufferLogicActivationThreshold:f}),d))}function b(c,u){var d,p,m=u.mimeType,g=u.metricType,v=u.value,y=c[m].settings.metricHistorySize,b=c[m].data[g]||[],S=y>0&&b.length>=y;return h(h({},c),((d={})[m]=h(h({},c[m]),{data:h(h({},c[m].data),((p={})[g]=f(f([],S?b.slice(1,b.length):b,!0),[{time:Date.now(),value:v}],!1),p))}),d))}function S(c,u){var d,p,f=u.mimeType,m=u.metricType;return h(h({},c),((d={})[f]=h(h({},c[f]),{data:h(h({},c[f].data),((p={})[m]=[],p))}),d))}function _(c,u){var d,p,f=u.mimeType,m=u.metricType,g=u.value,v=(c[f].data[m]||[]).filter(function(c){return c.time!==g.time||c.value!==g.value});return h(h({},c),((d={})[f]=h(h({},c[f]),{data:h(h({},c[f].data),((p={})[m]=v,p))}),d))}u.MetricsReducer=(0,m.default)({},((p={})[v.MetricsActionType.InitializeMetricsForMimeType]=function(c,u){var d,p,f,m,g;return f=(d=u.payload).mimeType,m=d.settings,g=d.saveUnderName,h(h({},c),((p={})[g]={mimeType:f,settings:{metricHistorySize:m.METRIC_HISTORY_SIZE},bufferLogicActivationThreshold:m.BUFFER_LOGIC_ACTIVATION_THRESHOLD,data:{}},p))},p[v.MetricsActionType.RemoveMetricsForMimeType]=function(c,u){var d,p;return d=u.payload,p=h({},c),delete p[d.mimeType],p},p[v.MetricsActionType.SetBufferLogicActivationThreshold]=function(c,u){var d=u.payload;return(0,g.containMimeTypeGuard)(y)(c,d)},p[v.MetricsActionType.AddMetricsValue]=function(c,u){var d=u.payload;return(0,g.containMimeTypeGuard)(b)(c,d)},p[v.MetricsActionType.ClearMetricsHistory]=function(c,u){var d=u.payload;return(0,g.containMimeTypeGuard)(S)(c,d)},p[v.MetricsActionType.RemoveMetricsValue]=function(c,u){var d=u.payload;return(0,g.containMimeTypeGuard)(_)(c,d)},p))},46151:function(c,u){function d(c,u,d){return c[u]&&c[u].data[d]||[]}Object.defineProperty(u,"__esModule",{value:!0}),u.getMetricsHistoryFromInstanceState=u.getMetricsState=void 0,u.getMetricsHistory=d,u.getMetricsLastEntry=function(c,u,p){var h=d(c,u,p);return 0===h.length?{time:void 0,value:void 0}:h[h.length-1]},u.getMetricsState=function(c){return c.metrics},u.getMetricsHistoryFromInstanceState=function(c,p,h){return d((0,u.getMetricsState)(c),p,h)}}
14,33436:function(c,u){var d,p,h,f;Object.defineProperty(u,"__esModule",{value:!0}),u.MetricsActionType=u.MetricType=void 0,(h=d||(u.MetricType=d={})).DownloadTime="downloadtime",h.DecryptionTime="decryptiontime",h.TransmuxingTime="transmuxingtime",h.ProcessingTime="processingtime",h.DownloadSuccess="downloadsuccess",h.RequestedRepresentations="requestedrepresentations",h.DownloadedRepresentation="downloadedrepresentation",h.DownloadedAdaptationSet="downloadedadaptationset",h.DownloadInformation="downloadinformation",h.SegmentInformation="segmentinformation",h.ChunkedDownloadInformation="chunkeddownloadinformation",h.StalledSeconds="stalledseconds",h.StartTime="starttime",h.StartupTimeSeconds="startuptime",h.CachedInitSegments="cachedinitsegments",(f=p||(u.MetricsActionType=p={})).InitializeMetricsForMimeType="@instance/metrics/initializemetricsformimetype",f.RemoveMetricsForMimeType="@instance/metrics/removemetricsformimetype",f.AddMetricsValue="@instance/metrics/addmetricsvalue",f.RemoveMetricsValue="@instance/metrics/removemetricsvalue",f.ClearMetricsHistory="@instance/metrics/clearMetricsHistory",f.SetBufferLogicActivationThreshold="@instance/metrics/setbufferlogicactivationthreshold"},23690:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.getInitialPlayerState=void 0,u.setPlayerViewMode=function(c){return(0,h.createAction)(f.PlayerActionType.SetPlayerViewMode,c)},u.setPlayerHasBeenPlaying=function(c){return(0,h.createAction)(f.PlayerActionType.SetPlayerHasBeenPlaying,c)},u.setPlayerSeek=function(c){return(0,h.createAction)(f.PlayerActionType.SetPlayerSeek,c)},u.setPlayerPlayback=function(c){return(0,h.createAction)(f.PlayerActionType.SetPlayerPlayback,c)},u.setPlayerTimeShift=function(c){return(0,h.createAction)(f.PlayerActionType.SetPlayerTimeshift,c)},u.setPlayerStall=function(c){return(0,h.createAction)(f.PlayerActionType.SetPlayerStall,c)},u.setRendererStallAction=function(c){return(0,h.createAction)(f.PlayerActionType.SetRendererStall,c)},u.setPlayerTargetPlaybackTime=function(c){return(0,h.createAction)(f.PlayerActionType.SetPlayerTargetPlaybackTime,c)},u.setPlayerPlaybackSpeed=function(c){return(0,h.createAction)(f.PlayerActionType.SetPlayerPlaybackSpeed,c)},u.setDestroyState=function(c){return(0,h.createAction)(f.PlayerActionType.SetDestroyState,c)},u.addPlayerPendingTransition=function(c){return(0,h.createAction)(f.PlayerActionType.AddPlayerPendingTransition,c)},u.filterPlayerPendingTransition=function(c){return(0,h.createAction)(f.PlayerActionType.FilterPlayerPendingTransition,c)},u.removePlayerPendingTransition=function(c){return(0,h.createAction)(f.PlayerActionType.RemovePlayerPendingTransition,c)},u.clearPlayerPendingTransitions=function(){return(0,h.createAction)(f.PlayerActionType.ClearPlayerPendingTransitions)},u.setRemoteControlType=function(c){return(0,h.createAction)(f.PlayerActionType.SetRemoteControlType,c)},u.setConnectionState=function(c){return(0,h.createAction)(f.PlayerActionType.SetConnectionState,c)},u.resetPlayerState=function(c){return void 0===c&&(c=[]),(0,h.createAction)(f.PlayerActionType.ResetPlayerState,{keepState:c})},u.updateSeekingProcess=function(c){return(0,h.createAction)(f.PlayerActionType.UpdateSeekingProcess,c)};var p=d(44468),h=d(35267),f=d(85648);u.getInitialPlayerState=function(){return{playbackState:f.PlaybackState.None,seekState:f.SeekState.None,timeShiftState:f.TimeShiftState.None,hasBeenPlaying:!1,isStalled:!1,isRendererStalled:!1,targetPlaybackTime:-1,playbackSpeed:{speed:1,multiplier:1},pendingTransitions:[],viewMode:p.ViewMode.Inline,destroyState:f.DestroyState.None,remoteControlState:{connectionState:f.ConnectionState.Disconnected,remoteControlType:f.RemoteControlType.None},seekingProcess:{targetTime:-1,seekableRange:{start:-1,end:-1},isInitial:!1,issuer:""}}}},8973:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},f=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};
vendor: 5,254 bytes, line 14
14Object.defineProperty(u,"__esModule",{value:!0}),u.PlayerReducer=void 0;var m=d(3793),g=d(23690),v=d(85648),y=(0,g.getInitialPlayerState)();u.PlayerReducer=(0,m.default)(y,((p={})[v.PlayerActionType.SetPlayerPlayback]=function(c,u){var d=u.payload;return h(h({},c),{playbackState:d})},p[v.PlayerActionType.SetPlayerSeek]=function(c,u){var d=u.payload;return h(h({},c),{seekState:d})},p[v.PlayerActionType.SetPlayerStall]=function(c,u){var d=u.payload;return h(h({},c),{isStalled:d})},p[v.PlayerActionType.SetRendererStall]=function(c,u){return h(h({},c),{isRendererStalled:u.payload})},p[v.PlayerActionType.SetPlayerTimeshift]=function(c,u){var d=u.payload;return h(h({},c),{timeShiftState:d})},p[v.PlayerActionType.SetPlayerHasBeenPlaying]=function(c,u){var d=u.payload;return h(h({},c),{hasBeenPlaying:d})},p[v.PlayerActionType.SetPlayerTargetPlaybackTime]=function(c,u){var d=u.payload;return h(h({},c),{targetPlaybackTime:d})},p[v.PlayerActionType.SetPlayerPlaybackSpeed]=function(c,u){var d=u.payload;return h(h({},c),{playbackSpeed:d})},p[v.PlayerActionType.SetPlayerViewMode]=function(c,u){var d=u.payload;return h(h({},c),{viewMode:d})},p[v.PlayerActionType.AddPlayerPendingTransition]=function(c,u){var d=u.payload;return h(h({},c),{pendingTransitions:f(f([],c.pendingTransitions,!0),[d],!1)})},p[v.PlayerActionType.FilterPlayerPendingTransition]=function(c,u){var d=u.payload;return h(h({},c),{pendingTransitions:c.pendingTransitions.filter(function(c){return c!==d})})},p[v.PlayerActionType.RemovePlayerPendingTransition]=function(c,u){var d=u.payload;return h(h({},c),{pendingTransitions:c.pendingTransitions.filter(function(c,u){return u!==d})})},p[v.PlayerActionType.ClearPlayerPendingTransitions]=function(c,u){return h(h({},c),{pendingTransitions:[]})},p[v.PlayerActionType.ResetPlayerState]=function(c,u){var d=u.payload.keepState,p={};return d.forEach(function(u){return p[u]=c[u]}),h(h({},y),p)},p[v.PlayerActionType.SetDestroyState]=function(c,u){var d=u.payload;return h(h({},c),{destroyState:d})},p[v.PlayerActionType.SetRemoteControlType]=function(c,u){var d=u.payload;return h(h({},c),{remoteControlState:h(h({},c.remoteControlState),{remoteControlType:d})})},p[v.PlayerActionType.SetConnectionState]=function(c,u){var d=u.payload;return h(h({},c),{remoteControlState:h(h({},c.remoteControlState),{connectionState:d})})},p[v.PlayerActionType.UpdateSeekingProcess]=function(c,u){var d=u.payload;return h(h({},c),{seekingProcess:h(h({},c.seekingProcess),d)})},p))},87827:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.subscribeToSeekedOrTimeshifted=u.subscribeToSeeked=u.subscribeToSeek=u.getRemoteControlState=u.getIsRendererStalled=u.isDestroyed=u.isBeingDestroyed=u.getIsSeekedOrTimeshifted=u.getIsSeekingOrTimeshifting=u.getPlaybackSpeed=u.getTargetPlaybackTime=u.getIsTimeShifted=u.getIsTimeShifting=u.getIsSeeked=u.getIsSeeking=u.getIsInitialSeek=u.getIsInitialStall=u.getIsStopped=u.getIsPaused=u.getIsPlay=u.getIsPlaying=u.getIsInitialPlayback=u.getPlayerState=void 0;var p=d(23068),h=d(93204),f=d(85648);u.getPlayerState=function(c){return c.player},u.getIsInitialPlayback=function(c){return c.playbackState===f.PlaybackState.None},u.getIsPlaying=function(c){return c.playbackState===f.PlaybackState.Playing},u.getIsPlay=function(c){return c.playbackState===f.PlaybackState.Play},u.getIsPaused=function(c){return c.playbackState===f.PlaybackState.Paused},u.getIsStopped=function(c){return c.playbackState===f.PlaybackState.Stopped},u.getIsInitialStall=function(c){return!c.hasBeenPlaying&&c.isStalled},u.getIsInitialSeek=function(c){return c.seekState===f.SeekState.None},u.getIsSeeking=function(c){return[f.SeekState.Seeking,f.SeekState.SeekingIOS].includes(c.seekState)},u.getIsSeeked=function(c){return c.seekState===f.SeekState.Seeked},u.getIsTimeShifting=function(c){return c.timeShiftState===f.TimeShiftState.Shifting},u.getIsTimeShifted=function(c){return c.timeShiftState===f.TimeShiftState.Shifted},u.getTargetPlaybackTime=function(c){return c.targetPlaybackTime},u.getPlaybackSpeed=function(c){return c.playbackSpeed},u.getIsSeekingOrTimeshifting=function(c){return(0,u.getIsSeeking)(c)||(0,u.getIsTimeShifting)(c)},u.getIsSeekedOrTimeshifted=function(c){return(0,u.getIsSeeked)(c)||(0,u.getIsTimeShifted)(c)},u.isBeingDestroyed=function(c){return c.destroyState!==f.DestroyState.None},u.isDestroyed=function(c){return c.destroyState===f.DestroyState.Destroyed},u.getIsRendererStalled=function(c){return c.isRendererStalled},u.getRemoteControlState=function(c){return c.remoteControlState},u.subscribeToSeek=function(c,d){return(0,h.subscribe)(c)(function(c){return c&&(0,u.getPlayerState)(c)},d,function(c,d){return(0,p.isDefined)(d)&&(0,p.isDefined)(c)&&!(0,u.getIsSeeking)(d)&&(0,u.getIsSeeking)(c)})},u.subscribeToSeeked=function(c,d){return(0,h.subscribe)(c)(function(c){return c&&(0,u.getPlayerState)(c)},d,function(c,d){return(0,p.isDefined)(d)&&(0,p.isDefined)(c)&&(0,u.getIsSeeking)(d)&&!(0,u.getIsSeeking)(c)})},u.subscribeToSeekedOrTimeshifted=function(c,d){return(0,h.subscribe)(c)(function(c){return c&&(0,u.getPlayerState)(c)&&(0,u.getIsSeekingOrTimeshifting)((0,u.getPlayerState)(c))},d,function(c,u){return!0===u&&!1===c})}},85648:function(c,u){var d,p,h,f,m,g,v,y,b,S,_,E,T,w;
14Object.defineProperty(u,"__esModule",{value:!0}),u.PlayerActionType=u.DestroyState=u.TimeShiftState=u.SeekState=u.PlaybackState=u.ConnectionState=u.RemoteControlType=void 0,(y=d||(u.RemoteControlType=d={}))[y.None=0]="None",y[y.Websocket=1]="Websocket",y[y.GoogleCastV2=2]="GoogleCastV2",y[y.GoogleCastV3=3]="GoogleCastV3",(b=p||(u.ConnectionState=p={}))[b.Connecting=0]="Connecting",b[b.Connected=1]="Connected",b[b.Disconnecting=2]="Disconnecting",b[b.Disconnected=3]="Disconnected",(S=h||(u.PlaybackState=h={}))[S.None=0]="None",S[S.Stopped=1]="Stopped",S[S.Play=2]="Play",S[S.Playing=3]="Playing",S[S.Paused=4]="Paused",(_=f||(u.SeekState=f={}))[_.None=0]="None",_[_.Seeking=1]="Seeking",_[_.SeekingIOS=2]="SeekingIOS",_[_.Seeked=3]="Seeked",(E=m||(u.TimeShiftState=m={}))[E.None=0]="None",E[E.Shifting=1]="Shifting",E[E.Shifted=2]="Shifted",(T=g||(u.DestroyState=g={})).None="none",T.Destroying="destroying",T.Destroyed="destroyed",(w=v||(u.PlayerActionType=v={})).SetPlayerSeek="@instance/player/setplayerseek",w.SetPlayerPlayback="@instance/player/setplayerplayback",w.SetPlayerTimeshift="@instance/player/setplayertimeshift",w.SetPlayerStall="@instance/player/setplayerstall",w.SetRendererStall="@instance/player/setplayerrendererstall",w.SetPlayerHasBeenPlaying="@instance/player/setplayerhasbeenplaying",w.SetPlayerTargetPlaybackTime="@instance/player/setplayertargetplaybacktime",w.SetPlayerPlaybackSpeed="@instance/player/setplayerplaybackspeed",w.SetPlayerViewMode="@instance/player/setplayerviewmode",w.SetDestroyState="@instance/player/setDestroyState",w.AddPlayerPendingTransition="@instance/player/addplayerpendingtransition",w.FilterPlayerPendingTransition="@instance/player/filterplayerpendingtransition",w.RemovePlayerPendingTransition="@instance/player/removeplayerpendingtransition",w.ClearPlayerPendingTransitions="@instance/player/clearplayerpendingtransitions",w.ResetPlayerState="@instance/player/resetplayerstate",w.SetRemoteControlType="@instance/player/setremotecontroltype",w.SetConnectionState="@instance/player/setconnectionstate",w.UpdateSeekingProcess="@instance/player/updateseekingprocess"},48488:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.getInitialDrmState=void 0,u.setManifestDrm=function(c){return(0,p.createAction)(h.DrmActionType.SetManifestDrm,c)},u.resetManifestDrm=function(){return(0,p.createAction)(h.DrmActionType.ResetManifestDrm)},u.trackDrmKidError=function(c){return(0,p.createAction)(h.DrmActionType.TrackDrmKidError,c)},u.resetDrmKidErrors=function(){return(0,p.createAction)(h.DrmActionType.ResetDrmKidErrors)},u.setUsedKeySystem=function(c){return(0,p.createAction)(h.DrmActionType.SetUsedKeySystem,c)},u.resetUsedKeySystem=function(){return(0,p.createAction)(h.DrmActionType.ResetUsedKeySystem)};var p=d(35267),h=d(29682);u.getInitialDrmState=function(){return{keyIdsWithErrors:[],usedKeySystem:{kind:null,uid:null}}}},44991:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},f=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.DrmReducer=void 0;var m=d(3793),g=d(48488),v=d(29682),y=(0,g.getInitialDrmState)();u.DrmReducer=(0,m.default)(y,((p={})[v.DrmActionType.SetManifestDrm]=function(c,u){var d=u.payload;return h(h({},c),d)},p[v.DrmActionType.ResetManifestDrm]=function(){return y},p[v.DrmActionType.TrackDrmKidError]=function(c,u){var d=u.payload;return c.keyIdsWithErrors.includes(d)?c:h(h({},c),{keyIdsWithErrors:f(f([],c.keyIdsWithErrors,!0),[d],!1)})},p[v.DrmActionType.ResetDrmKidErrors]=function(c){return c.keyIdsWithErrors.length>0?h(h({},c),{keyIdsWithErrors:[]}):c},p[v.DrmActionType.SetUsedKeySystem]=function(c,u){var d=u.payload;return h(h({},c),{usedKeySystem:d})},p[v.DrmActionType.ResetUsedKeySystem]=function(c,u){return h(h({},c),{usedKeySystem:{kind:null,uid:null}})},p))},29682:function(c,u){var d,p;
14Object.defineProperty(u,"__esModule",{value:!0}),u.DrmActionType=void 0,(p=d||(u.DrmActionType=d={})).SetManifestDrm="@instance/sources/@source/drm/setManifest",p.ResetManifestDrm="@instance/sources/@source/drm/setManifest/resetManifest",p.TrackDrmKidError="@instance/sources/@source/drm/trackDrmKidError",p.ResetDrmKidErrors="@instance/sources/@source/drm/resetDrmKidErrors",p.SetUsedKeySystem="@instance/sources/@source/drm/setusedkeysystem",p.ResetUsedKeySystem="@instance/sources/@source/drm/resetusedkeysystem"},69573:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.staticSourceReducers=void 0;var p=d(87133),h=d(44991),f=d(48557);u.staticSourceReducers={startOptions:d(77179).StartOptionsReducer,drm:h.DrmReducer,adaptation:p.AdaptationReducer,playback:f.PlaybackReducer}},15971:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.getSourceStore=f,u.getSourceState=function(c,u){var d;return void 0===u&&(u=c.sourceContext),null==(d=f(c,u))?void 0:d.getState()};var p=d(80813),h=d(94685);function f(c,u){var d;return void 0===u&&(u=c.sourceContext),(0,h.isContextAvailable)(c)?null==(d=c.serviceManager)?void 0:d.get(p.ServiceName.SourceStoreService,null==u?void 0:u.sourceIdentifier):void 0}},68925:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.setBufferMaxSize=function(c,u){return(0,p.createAction)(h.BufferActionType.SetBufferMaxSize,{mimeType:c,maxBufferSize:u})},u.setRendererRanges=function(c,u){return(0,p.createAction)(h.BufferActionType.SetRendererRanges,{mimeType:c,ranges:u})},u.setBufferBlockSwitchOngoing=function(c){return(0,p.createAction)(h.BufferActionType.SetBufferBlockSwitchOngoing,{isOngoing:c})},u.setTimestampRollingOver=function(c){return(0,p.createAction)(h.BufferActionType.SetTimestampRollingOver,{isRollingOver:c})},u.addLoadedRange=function(c,u){return(0,p.createAction)(h.BufferActionType.AddLoadedRange,{mimeType:c,range:u})},u.removeLoadedRange=function(c,u){return(0,p.createAction)(h.BufferActionType.RemoveLoadedRange,{mimeType:c,range:u})},u.resetLoadedRanges=function(c){return(0,p.createAction)(h.BufferActionType.ResetLoadedRanges,{mimeType:c})},u.setLoadingRangeFinished=function(c){return(0,p.createAction)(h.BufferActionType.SetLoadingRangeFinished,{isFinished:c})};var p=d(35267),h=d(70118)},86897:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.getRendererBufferRangesMap=u.getBufferRangesMap=u.getBufferBlockLoadedRanges=u.getBufferMaxSize=u.hasBufferRangesChanged=u.hasBufferMaxSizeChanged=u.getRendererBufferedRanges=u.getBufferState=u.getBufferStateMap=u.DefaultBufferMaxSize=void 0,u.getLoadedRangesForMimeType=function(c,u){var d,p;return null!=(p=null==(d=c.bufferStateMap[u])?void 0:d.loadedRanges)?p:[]},u.getBufferStartTime=function(c){if(!c)return -1;var u=Object.keys(c).map(function(u){var d,p;return null==(p=null==(d=c[u].rendererRanges)?void 0:d[0])?void 0:p.start}).filter(function(c){return void 0!==c});return u.length>0?Math.max.apply(Math,u):-1},u.getIsTimestampRollingOver=function(c){var u,d;return null!=(d=null==(u=c.buffer)?void 0:u.isTimestampRollingOver)&&d};var p=d(4524),h=d(85434);function f(c){var u;return null!=(u=c.loadedRanges)?u:[]}function m(c,u){return c!==u&&(0!==c.length||0!==u.length)&&c!==u}u.DefaultBufferMaxSize=0,u.getBufferStateMap=function(c){var u;return null==(u=null==c?void 0:c.buffer)?void 0:u.bufferStateMap},u.getBufferState=function(c){return null==c?void 0:c.buffer},u.getRendererBufferedRanges=function(c,u){var d;return u in c&&null!=(d=c[u].rendererRanges)?d:[]},u.hasBufferMaxSizeChanged=function(c){return function(d,p){var h=(0,u.getBufferState)(d),f=(0,u.getBufferState)(p);return(h?(0,u.getBufferMaxSize)(h,c):u.DefaultBufferMaxSize)!==(f?(0,u.getBufferMaxSize)(f,c):u.DefaultBufferMaxSize)}},u.hasBufferRangesChanged=function(c,d){var p=c.bufferStateMap,h=d.bufferStateMap,g=Object.keys(p),v=Object.keys(h);if(g.length!==v.length||g.some(function(c){return!v.includes(c)}))return!0;for(var y=0;y<g.length;y++){var b=g[y];if(m((0,u.getRendererBufferedRanges)(p,b),(0,u.getRendererBufferedRanges)(h,b))||m(f(p[b]),f(h[b])))return!0}return!1},u.getBufferMaxSize=function(c,d){var p;return d in c.bufferStateMap&&null!=(p=c.bufferStateMap[d].maxBufferSize)?p:u.DefaultBufferMaxSize},u.getBufferBlockLoadedRanges=function(c,u){return c?Object.keys(c.bufferStateMap).reduce(function(d,p){var h;return d[p]=(h=c.bufferStateMap[p],f(h).filter(function(c){return c.bufferBlockId===u})),d},{}):{}},u.getBufferRangesMap=function(c,u,d){var h,f,m,v;return void 0===u?{}:(h=Object.keys(u.bufferStateMap),f=c.getSegmentStoreRangesMap(u,h),Object.keys(m=g
14(u,h)).forEach(function(c){return f[c].push(m[c])}),v={},h.forEach(function(c){return v[c]=p.BufferRangeHelper.mergeRanges(f[c].flatMap(function(c){return c}),d)}),v)},u.getRendererBufferRangesMap=function(c,u){return function(d){var p=c.getBufferBlock(d),f=null==p?void 0:p.getAllKnownPeriodIds()[0];return void 0===f||void 0===u||void 0===p?{}:g(u,c.getMediaTypes(f).map(function(c){return c.mimeType}).filter(function(c){return h.MimeTypeHelper.isAV(c)}))}};var g=function(c,d){var p={};return d.forEach(function(d){return p[d]=(0,u.getRendererBufferedRanges)(c.bufferStateMap,d)}),p}},47602:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.subscribeToRendererBufferChanges=function(c,u){var d,f,m=(d=c.getState(),void 0!==(f=(0,h.getBufferStateMap)(d))?Object.keys(f):[]).map(function(d){return(0,p.subscribe)(c)(function(c){var u=(0,h.getBufferStateMap)(c);return u?(0,h.getRendererBufferedRanges)(u,d):[]},function(c){return u(d,c??[])})});return function(){return m.forEach(function(c){return c()})}};var p=d(93204),h=d(86897)},70118:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.BufferActionType=void 0,(p=d||(u.BufferActionType=d={})).SetBufferMaxSize="@instance/source/buffer/setbuffermaxsize",p.SetRendererRanges="@instance/source/buffer/setrendererranges",p.SetBufferBlockSwitchOngoing="@instance/source/buffer/setbufferblockswitchongoing",p.SetTimestampRollingOver="@instance/source/buffer/settimestamprollingover",p.AddLoadedRange="@instance/source/buffer/addloadedrange",p.RemoveLoadedRange="@instance/source/buffer/removeloadedrange",p.ResetLoadedRanges="@instance/source/buffer/resetloadedranges",p.SetLoadingRangeFinished="@instance/source/buffer/setloadingrangefinished"},46922:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.setBackgroundPlaybackState=u.setMainContentPlaybackState=void 0;var p=d(35267),h=d(18192);u.setMainContentPlaybackState=function(c){return(0,p.createAction)(h.PlaybackActionType.SetMainContentPlaybackState,c)},u.setBackgroundPlaybackState=function(c){return(0,p.createAction)(h.PlaybackActionType.SetBackgroundPlaybackState,c)}},48557:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.PlaybackReducer=void 0;var f=d(3793),m=d(18192);u.PlaybackReducer=(0,f.default)({kind:m.PlaybackKind.MainContent},((p={})[m.PlaybackActionType.SetMainContentPlaybackState]=function(c,u){var d;return d=u.payload,h({},d)},p[m.PlaybackActionType.SetBackgroundPlaybackState]=function(c,u){var d;return d=u.payload,h(h({},c),d)},p))},81524:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.getPlaybackPosition=void 0;var p=d(18192);u.getPlaybackPosition=function(c){return c.kind===p.PlaybackKind.Backgroun
14d?c.position:0/0}},18192:function(c,u){var d,p,h,f;Object.defineProperty(u,"__esModule",{value:!0}),u.PlaybackActionType=u.PlaybackKind=void 0,(h=d||(u.PlaybackKind=d={})).MainContent="maincontent",h.Background="background",(f=p||(u.PlaybackActionType=p={})).SetMainContentPlaybackState="@instance/sources/@source/playback/setmaincontentplaybackstate",f.SetBackgroundPlaybackState="@instance/sources/@source/playback/setbackgroundplaybackstate"},63879:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.setMseObjectUrl=function(c){return(0,p.createAction)(h.RendererActionType.SetMseObjectUrl,{url:c})};var p=d(35267),h=d(39564)},39564:function(c,u){var d;Object.defineProperty(u,"__esModule",{value:!0}),u.RendererActionType=void 0,(d||(u.RendererActionType=d={})).SetMseObjectUrl="@instance/source/renderer/setmseobjecturl"},30012:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.initialStartOptions=void 0,u.initializeStartTimeOffset=function(){return f(u.initialStartOptions.startTimeOffset)},u.setStartTimeOffset=f;var p=d(35267),h=d(25934);function f(c){return(0,p.createAction)(h.StartOptionsActionKey.SetStartTimeOffset,{startTimeOffset:c})}u.initialStartOptions={startTimeOffset:0}},77179:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.StartOptionsReducer=void 0,u.getStartTimeOffset=function(c){return c.startOptions.startTimeOffset};var f=d(3793),m=d(30012),g=d(25934),v=m.initialStartOptions,y=function(c,u){var d=u.payload;return h(h({},c),d)};u.StartOptionsReducer=(0,f.default)(v,((p={})[g.StartOptionsActionKey.InitStartTimeOffset]=y,p[g.StartOptionsActionKey.SetStartTimeOffset]=y,p))},25934:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.StartOptionsActionKey=void 0,(p=d||(u.StartOptionsActionKey=d={})).InitStartTimeOffset="@instance/sources/@source/startOptions/initStartTimeOffset",p.SetStartTimeOffset="@instance/sources/@source/startOptions/setStartTimeOffset"},81683:function(c,u){function d(c){Object.freeze(c);var u="function"==typeof c,p=Object.prototype.hasOwnProperty;return Object.getOwnPropertyNames(c).forEach(function(h){!p.call(c,h)||u&&("caller"===h||"callee"===h||"arguments"===h)||null===c[h]||"object"!=typeof c[h]&&"function"!=typeof c[h]||Object.isFrozen(c[h])||d(c[h])}),c}Object.defineProperty(u,"__esModule",{value:!0}),u.freeze=void 0,u.deepFreeze=d;var p=function(c){var u=c.getState();null!==u&&"object"==typeof u&&d(u)};u.freeze=function(c){return p(c),function(u){return function(d){p(c);try{return u(d)}finally{p(c)}}}}},68205:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.addReachableDomain=function(c){return(0,p.createAction)(h.ReachableDomainsActionType.AddDomain,c)};var p=d(35267),h=d(32027)},60430:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},f=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.ReachableDomainsReducer=void 0;var m=d(3793),g=d(32027);u.ReachableDomainsReducer=(0,m.default)({domains:[]},((p={})[g.ReachableDomainsActionType.AddDomain]=function(c,u){var d;return d=u.payload,h(h({},c),{domains:c.domains.includes(d)?c.domains:f(f([],c.domains,!0),[d],!1)})},p))},32027:function(c,u){var d;Object.defineProperty(u,"__esModule",{value:!0}),u.ReachableDomainsActionType=void 0,(d||(u.ReachableDomainsActionType=d={})).AddDomain="adddomain"},74853:function(c,u,d){var p=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};
vendor: 8,749 bytes, line 14
14Object.defineProperty(u,"__esModule",{value:!0}),u.ArrayHelper=void 0,u.invert=function(c){return function(u,d,p){return!c(u,d,p)}},u.findIndexFromEnd=f,u.findIndexWithin=function(c,u,d,p){for(var h=u;h<d;h++)if(p(c[h]))return h;return -1},u.findFromEnd=function(c,u){return c[f(c,u)]},u.forEachFromIndex=function(c,u,d){for(;u<c.length;u++)d(c[u-1],c[u])},u.forceArray=function(c){return Array.isArray(c)?c:[c]},u.contains=function(c,u,d){return void 0===d&&(d=m),null!=c.find(function(c){return d(u,c)})},u.shallowObjectMatcher=m,u.clearArray=function(c){c.splice(0,c.length)},u.removeEntriesFromStart=function(c,u){return u<1?[]:c.splice(0,u)};var h=d(70233);function f(c,u){var d;for(d=c.length-1;d>=0&&!u(c[d]);d--);return d}function m(c,u){return Object.keys(c).length===Object.keys(u).length&&Object.keys(c).every(function(d){return c[d]===u[d]})}u.ArrayHelper=function(){function c(){}return c.comparePrimitiveArrays=function(c,u){if(c.length!==u.length)return!1;for(var d=0;d<c.length;d++)if(c[d]!==u[d])return!1;return!0},c.stringToArrayWithoutEncoding=function(c){for(var u=new Uint8Array(c.length),d=0;d<c.length;d++)u[d]=c.charCodeAt(d);return u},c.convertBufferSourceToUTF8=function(u,d){return void 0===d&&(d="utf-8"),u instanceof ArrayBuffer?u=new Uint8Array(u):u instanceof DataView&&(u=new Uint8Array(u.buffer,u.byteOffset,u.byteLength)),c.convertUint8ArrayToUtf8(u,d)},c.convertUint8ArrayToUtf8=function(c,u){if("u">typeof TextDecoder)return new TextDecoder(u).decode(c);for(var d=0,p="";d<c.length;){var h=c[d++];if(h>127)if(h>191&&h<224){if(d>=c.length||64&c[d]){p+="�";continue}h=(31&h)<<6|63&c[d++]}else if(h>223&&h<240){if(d+1>=c.length||64&c[d]||64&c[d+1]){p+="�";continue}h=(15&h)<<12|(63&c[d++])<<6|63&c[d++]}else{if(!(h>239&&h<248)||d+2>=c.length||64&c[d]||64&c[d+1]||64&c[d+2]){p+="�";continue}h=(7&h)<<18|(63&c[d++])<<12|(63&c[d++])<<6|63&c[d++]}h<=65535?p+=String.fromCharCode(h):h<=1114111?(h-=65536,p+=String.fromCharCode(h>>10|55296),p+=String.fromCharCode(1023&h|56320)):p+="�"}return p},c.sort=function(c,u,d){if("string"==typeof u&&"[object Array]"===Object.prototype.toString.call(c)){var p;if(d||(d="asc"),"asc"===d)p=-1;else{if("desc"!==d)return;p=1}return c.length<2?c:c.sort(function(c,d){return c[u]<d[u]?p:c[u]>d[u]?-1*p:0})}},c.append=function(u,d){var p=c.getTypedArrayType(u),h=c.getTypedArrayType(d);if(!p&&!h||p!==h)return null;var f=new p((u.byteLength+d.byteLength)/p.BYTES_PER_ELEMENT);return f.set(new p(u),0),f.set(new p(d),u.byteLength/p.BYTES_PER_ELEMENT),f},c.concatBuffers=function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];if(!(c=c.filter(function(c){return c})).length)return null;var d=new Uint8Array(c.reduce(function(c,u){return c+u.byteLength},0));return c.reduce(function(c,u){return d.set(new Uint8Array(u),c),c+u.byteLength},0),d.buffer},c.getTypedArrayType=function(c){return c instanceof Uint8Array?Uint8Array:c instanceof Uint16Array?Uint16Array:c instanceof Uint32Array?Uint32Array:null},c.getArray=function(u){return c.getTypedArrayType(u)?[].slice.call(u):Array.isArray(u)?u:null},c.union=function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];var d=[];return c.filter(function(c){return!!c}).forEach(function(c){return c.forEach(function(c){d.includes(c)||d.push(c)})}),d},c.isArrayBuffer=function(c){return!!c&&c instanceof ArrayBuffer&&void 0!==c.byteLength},c.arrayBufferToAsciiString=function(u,d){return void 0===d&&(d=!0),c.sparseArrayBufferToAsciiString(u,1,0,d)},c.arrayBufferToBase64=function(c){for(var u="",d=new Uint8Array(c),p=0;p<d.length;p++)u+=String.fromCharCode(d[p]);return window.btoa(u)},c.sparseArrayBufferToAsciiString=function(c,u,d,p){void 0===u&&(u=2),void 0===d&&(d=0),void 0===p&&(p=!0);for(var h="",f=p?new Uint8Array(c):new Uint16Array(c),m=d;m<f.length;m+=u)h+=String.fromCharCode(f[m]);return h},c.intersect=function(){for(var u=[],d=0;d<arguments.length;d++)u[d]=arguments[d];var p=[],h=u.filter(function(c){return!!c});return c.union.apply(c,u).forEach(function(c){h.every(function(u){return u.includes(c)})&&p.push(c)}),p},c.addAndMergeIntersects=function(u,d){var h=u.filter(function(u){return c.intersect(u,d).length>0}),f=u.filter(function(c){return!h.includes(c)});return 0===h.length?p(p([],u,!0),[d],!1):p([c.union.apply(c,p(p([],h,!1),[d],!1))],f,!0)},c.extractAsciiString=function(c,u,d){for(var p=u+d,h="";u<p;u++)h+=String.fromCharCode(c.getUint8(u));return h},c.extractHexString=function(c,u,d){for(var p=u+d,f="";u<p;u++)f+=h.FormatHelper.intToHex(c.getUint8(u));return f},c.insertInSortedArray=function(c,u,d){var p=c.findIndex(d);return p<0?c.push(u):c.splice(p,0,u),c},c.removeUntilInSortedArray=function(c,u){var d=c.findIndex(u),p=-1===d?c.length:d;return 0===p?[]:c.splice(0,p)},c.toArray=function(c){try{if(!c||!c.length)return[];for(var u=Array(c.length),d=0;d<c.length;d++)u[d]=c[d];return u}catch{return[]}},c}()},19483:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.ArrayMap=void 0,u.ArrayMap=function(){function c(){this.k5=new Map}return c.prototype.get=function(c){return this.k5.get(c)},c.prototype.apply=function(c,u){this.k5.has(c)&&this.k5.set(c,u(this.k5.get(c)))},c.prototype.has=function(c){return this.k5.has(c)},c.prototype.delete=function(c){return this.k5.delete(c)},c.prototype.clear=function(){this.k5.clear()},Object.defineProperty(c.prototype,"size",{get:function(){return this.k5.size},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"length",{get:function(){var c=0;return this.k5.forEach(function(u){return c+=u.length}),c},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"values",{get:function(){var c=[];return this.k5.forEach(function(u){c.push(u)}),c},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"keys",{get:function(){var c=[];return this.k5.forEach(function(u,d){c.push(d)}),c},enumerable:!1,configurable:!0}),c.prototype.add=function(c,u){return this.ensure(c),null!=u&&this.get(c).push(u),this},c.prototype.ensure=function(c){this.has(c)||this.set(c,[])},c.prototype.set=function(c,u){return this.k5.set(c,u),this},c.prototype.addAll=function(c,u){var d=this;this.ensure(c),u.forEach(function(u){return d.add(c,u)})},c.prototype.getObject=function(){var c={};return this.k5.forEach(function(u,d){c[d]=u}),c},c.prototype.forAll=function(c){this.k5.forEach(function(u,d){return u.forEach(function(u){return c(d,u)})})},c.prototype.sort=function(c){this.k5.forEach(function(u){u.sort(c)})},c.prototype.mapEach=function(u){var d=new c;return this.k5.forEach(function(c,p){return d.set(p,c.map(u))}),d},c.prototype.transform=function(c){var u=[];return this.k5.forEach(function(d){return u.push(c(d))}),u},c.prototype.mapAll=function(u){var d=new c;return this.k5.forEach(function(c,p){return d.set(p,u(c))}),d},c.prototype.getAll=function(){var c=[];return this.k5.forEach(function(u){return c.push.apply(c,u)}),c},c.prototype.deleteValue=function(c,u){if(!this.has(c))return!1;var d=this.k5.get(c),p=d.indexOf(u);return p>=0&&(d.splice(p,1),!0)},c}()},81199:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.getPlayableBufferLevel=function(c){var u=[null==c?void 0:c.getAudioBufferLength(),null==c?void 0:c.getVideoBufferLength()].filter(p.isDefined);return Math.min.apply(Math,u)};var p=d(23068)},4527:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.CancelablePromise=void 0,u.CancelablePromise=function(){function c(){}return c.makeCancelable=function(c){var u=function(c){},d=new Promise(function(d,p){u=p,c.then(d,p)});return d.cancel=u.bind(d),d},c}()},47993:function(c,u,d){var p,h=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.MSESafari=u.getBestTech=u.getTechSupportedByModules=u.getTechSupportedByPlatform=u.getTechSupportedByModulesOnPlatform=u.isLocalStorageAvailable=u.isInlinePlaybackRestricted=u.isFairPlayDrmSupported=u.supports=u.checkPlatformSupports=u.hasMediaSourceSupport=u.FairplayKeySystems=void 0,u.isUsingFileProtocol=function(){return"file:"===b.default.location.protocol},u.isFetchSupported=function(){return"function"==typeof b.default.fetch&&"function"==typeof b.default.AbortController};var f,m=d(88052),g=d(62756),v=d(44468),y=d(21513),b=d(4081),S=d(85434),_=d(15487);(p=f||(u.FairplayKeySystems=f={})).FPS_1="com.apple.fps.1_0",p.FPS_2="com.apple.fps.2_0";var E=[{player:v.PlayerType.Html5,streaming:v.StreamType.Dash},{player:v.PlayerType.Html5,streaming:v.StreamType.Hls},{player:v.PlayerType.Html5,streaming:v.StreamType.Smooth},{player:v.PlayerType.WebRtc,streaming:v.StreamType.Whep}
14,{player:v.PlayerType.Native,streaming:v.StreamType.Hls},{player:v.PlayerType.Native,streaming:v.StreamType.Progressive}],T=!!(b.default.ArrayBuffer&&b.default.Uint8Array&&b.default.Uint16Array);u.hasMediaSourceSupport=function(){var c,u,d,p="MediaSource"in b.default&&"function"==typeof(null==(c=b.default.MediaSource)?void 0:c.isTypeSupported),h="WebKitMediaSource"in b.default&&"function"==typeof(null==(u=b.default.WebKitMediaSource)?void 0:u.isTypeSupported),f="ManagedMediaSource"in b.default&&"function"==typeof(null==(d=b.default.ManagedMediaSource)?void 0:d.isTypeSupported);return p||h||f},u.checkPlatformSupports=function(){var c=[];if(T?c=E.filter(function(c){return(0,u.supports)(c.player,c.streaming)}):c.push({player:v.PlayerType.Native,streaming:v.StreamType.Progressive}),(0,_.isSafari)()){for(var d=1;d<c.length;d++)if(c[d].player===v.PlayerType.Native&&c[d].streaming===v.StreamType.Hls){c=c.splice(d,1).concat(c);break}}return c},u.supports=function(c,d){var p,h,f,m,g,y,S,E,T,w=(0,u.hasMediaSourceSupport)()?[v.StreamType.Dash,v.StreamType.Hls,v.StreamType.Smooth]:[],P=(h=!!(p=b.default.RTCPeerConnection)&&"function"==typeof p.prototype.addTransceiver,(null!=(S=null!=(y=null!=(g=null!=(m=null==(f=navigator.mediaDevices)?void 0:f.getUserMedia)?m:navigator.getUserMedia)?g:navigator.webkitGetUserMedia)?y:navigator.mozGetUserMedia)?S:navigator.msGetUserMedia)&&h)?[v.StreamType.Whep]:[],A=function(c){return c.some(function(c){return c===d})};switch(c){case v.PlayerType.Html5:return A(w);case v.PlayerType.WebRtc:return A(P);case v.PlayerType.Native:return A((E=[],(T=document.createElement("video"))&&"function"==typeof T.canPlayType&&("maybe"===T.canPlayType("application/vnd.apple.mpegURL")||"maybe"===T.canPlayType("application/x-mpegURL")||"maybe"===T.canPlayType("audio/mpegurl")||"maybe"===T.canPlayType("audio/x-mpegurl"))&&!(0,_.isEdge)()&&E.push(v.StreamType.Hls),"function"==typeof document.createElement("video").canPlayType&&E.push(v.StreamType.Progressive),E));default:return!1}},u.isFairPlayDrmSupported=function(){return Object.values(f).some(function(c){var u;return null==(u=b.default.WebKitMediaKeys)?void 0:u.isTypeSupported(c,S.MimeType.VideoMp4)})},u.isInlinePlaybackRestricted=function(){var c=(0,_.getIOSVersion)(),u=c<_.IOS_9&&/iPad/i.test(navigator.userAgent),d=c<_.IOS_10&&/iP(hone|od)/i.test(navigator.userAgent);return _.isSafariIOS&&(u||d)},u.isLocalStorageAvailable=function(){try{return b.default.localStorage&&"function"==typeof localStorage.getItem&&"function"==typeof localStorage.setItem}catch{return!1}},u.getTechSupportedByModulesOnPlatform=function(){var c=(0,u.getTechSupportedByModules)();return(0,u.getTechSupportedByPlatform)().filter(function(u){return c.filter(function(c){return c.player===u.player&&c.streaming===u.streaming}).length>0})},u.getTechSupportedByPlatform=function(){return(0,u.checkPlatformSupports)()},u.getTechSupportedByModules=function(){var c=m.ModuleManager.has(g.ModuleName.EngineBitmovin)?m.ModuleManager.get(g.ModuleName.EngineBitmovin).technologyChecker.getSupportedTechnologies():[],u=m.ModuleManager.has(g.ModuleName.EngineNative)?m.ModuleManager.get(g.ModuleName.EngineNative).technologyChecker.getSupportedTechnologies():[],d=m.ModuleManager.has(g.ModuleName.EngineWebRtc)?m.ModuleManager.get(g.ModuleName.EngineWebRtc).technologyChecker.getSupportedTechnologies():[];return h(h(h([],c,!0),u,!0),d,!0)},u.getBestTech=function(c,u,d){void 0===c&&(c=[]),void 0===u&&(u={});var p,f,m=(0,y.getCapabilities)(),g=(p=c,f=h([],(0,y.getCapabilities)().techSupportedByPlatform,!0),p&&0!==p.length?h(h([],p.filter(function(c){return f.some(function(u,d){var p,h=c.player===u.player&&c.streaming===u.streaming,m=null!=(p=c.exclude)&&p;return h&&f.splice(d,1),h&&!m})}).map(function(c){return{player:c.player,streaming:c.streaming}}),!0),f,!0):f),b=m.techSupportedByPlatform;return d&&(g=b.filter(function(c){return c.player===d.player&&c.streaming===d.streaming})),(u.vr&&((0,_.isSafariIOS)()||(0,_.isSafari)())?g.filter(function(c){var u=c.streaming===v.StreamType.Progressive&&c.player===v.PlayerType.Native,d=c.streaming===v.StreamType.Hls&&c.player===v.PlayerType.
vendor: 4,338 bytes, line 14
14Native;return u||d&&(!(0,_.isSafariIOS)()||(0,_.getIOSVersion)()>_.IOS_9)}):g).find(function(c){return!!u[c.streaming]})},u.MSESafari=function(){return(0,_.isSafari)()&&(0,u.hasMediaSourceSupport)()}},34047:function(c,u,d){var p=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.CodecStringHelper=u.HEVC_CODEC_TAGS=u.AVC_CODEC_TAGS=void 0,u.isAVMuxedTogether=function(c){return!!c&&c.indexOf(",")>-1},u.assembleHvcCodecString=function(c,u){if(!u)return null;for(var d=p([],u.general_constraint_indicator_flags_bytes,!0);0===d[d.length-1];)d.pop();var h=d.map(function(c){return c.toString(16).toUpperCase()});return p([c,"".concat(["","A","B","C"][u.general_profile_space]).concat(u.general_profile_idc),"".concat(u.general_profile_compatibility_flags),"".concat(0===u.general_tier_flag?"L":"H").concat(u.general_level_idc)],h,!0).join(".")},u.getMediaTypeFromCodec=function(c){return m.isVideoCodec(c)?h.MediaType.Video:m.isAudioCodec(c)?h.MediaType.Audio:m.isSubtitleCodec(c)?h.MediaType.Subtitles:void 0},u.getCodecTag=function(c){var u=c.getCodec();return(null==u?void 0:u.slice(0,3))||""};var h=d(44468),f=d(84568);u.AVC_CODEC_TAGS=["avc"],u.HEVC_CODEC_TAGS=["hev","hvc"];var m=function(){function c(){}return c.hasOldAvc1CodecFormat=function(u){return c.unsupportedCodecStringFormatRegex.test(u)},c.convertAvc1ToAvcotiCodecFormat=function(c){var u=c.split(".");return u.length>2?u.shift()+"."+parseInt(u.shift()).toString(16)+("000"+parseInt(u.shift()).toString(16)).slice(-4):c},c.isSupportedByRenderer=function(c,u,d){return c.isMediaTypeSupported(u,d)},c.getExtractedCodecStrings=function(u){return c.memoizedExtractCodecStrings||(c.memoizedExtractCodecStrings=(0,f.memoize)(g)),c.memoizedExtractCodecStrings(u)},c.getMimeTypeForCodecString=function(u){if(!u)return"unknown";for(var d=0,p=c.mimeTypeOrder;d<p.length;d++){var h=p[d];if(c.mimeTypeMap[h].find(function(c){return u.indexOf(c)>-1}))return h}return"unknown"},c.addCodec=function(u,d){var p;c.mimeTypeMap[u].push(d),null==(p=c.memoizedExtractCodecStrings)||p.invalidate()},c.canSwitchBetweenAudioCodecs=function(c,u){return c===u||[["mp4a.40.2","mp4a.40.5"],["ac-3","mp4a.a5","mp4a.A5"],["ec-3","mp4a.a6","mp4a.A6"]].some(function(d){return d.includes(c)&&d.includes(u)})},c.extractCodec=function(c){return c?c.split(".")[0]:null},c.isVideoCodec=function(u){return"video"===c.getMimeTypeForCodecString(u)},c.isAudioCodec=function(u){return"audio"===c.getMimeTypeForCodecString(u)},c.isSubtitleCodec=function(u){return"application"===c.getMimeTypeForCodecString(u)},c.unsupportedCodecStringFormatRegex=RegExp("^avc1.[0-9]{2,3}.[0-9]{2,3}$"),c.mimeTypeOrder=["video","audio","application"],c.mimeTypeMap={video:["avc","hvc","hev","mp4v","svc","mvc","av1","av01","vp8","vp9","dvh1","dvhe","dvav","dva1","vvc","vvi"],audio:["mp4a","mp3","opus","vorbis","speex","flac","samr","ac-3","ec-3","ac-4","ec-4"],application:["stpp","wvtt","vtt"]},c}();function g(c){return c||"string"==typeof c?c.split(",").reduce(function(c,u){return u=u.trim(),c[m.getMimeTypeForCodecString(u)]=u,c},{}):{}}u.CodecStringHelper=m},48669:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.Comparators=void 0,u.Comparators=function(){function c(){}return c.boolean=function(c,u){return c===u?0:c?1:-1},c.reverseBoolean=function(u,d){return c.boolean(d,u)},c}()},19541:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.compareValues=function(c,u,d){return!c&&!u||!(!c||!u)&&(d||Object.keys(c)).every(function(d){return c[d]===u[d]})}},79721:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.DEFAULT_PERIOD_ID=void 0,u.DEFAULT_PERIOD_ID="0"},76399:function(c,u){var d,p=this&&this.__extends||(d=function(c,u){return(d=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function p(){this.constructor=c}d(c,u),c.prototype=null===u?Object.create(u):(p.prototype=u.prototype,new p)});
14Object.defineProperty(u,"__esModule",{value:!0}),u.FilterIterator=u.ArrayIterator=u.EmptyIterator=void 0;var h=function(){function c(){}return c.prototype.toArray=function(){for(var c=[];this.hasNext();)c.push(this.next());return c},c}();u.EmptyIterator=function(c){function u(){return c.call(this)||this}return p(u,c),u.prototype.hasNext=function(){return!1},u.prototype.next=function(){},u.getInstance=function(){return this.singletonInstance||(this.singletonInstance=new u),this.singletonInstance},u}(h),u.ArrayIterator=function(c){function u(u){var d=c.call(this)||this;return d.data=u,d.JZ=-1,d}return p(u,c),u.prototype.hasNext=function(){return this.KZ=void 0,this.JZ<this.data.length&&(this.JZ++,this.KZ=this.data[this.JZ]),null!=this.KZ},u.prototype.next=function(){return this.KZ},u}(h),u.FilterIterator=function(c){function u(u,d){var p=c.call(this)||this;return p.iterator=u,p.filter=d,p}return p(u,c),u.prototype.hasNext=function(){var c;for(this.LZ=void 0;this.iterator.hasNext();)if(c=this.iterator.next(),this.filter(c)){this.LZ=c;break}return null!=this.LZ},u.prototype.next=function(){return this.LZ},u}(h)},65348:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.DOMHelper=void 0,u.DOMHelper=function(){function c(){}return c.createTag=function(c,u,d){void 0===u&&(u={}),void 0===d&&(d={});var p=document.createElement(c);return Object.keys(d).forEach(function(c){return p.style[c]=d[c]}),Object.keys(u).forEach(function(c){return p.setAttribute(c,u[c])}),p},c}()},34841:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.Deferred=void 0,u.Deferred=function(){function c(){var c=this;this.YJ="pending",this.VJ=new Promise(function(u,d){c.WJ=function(d){return c.YJ="resolved",u(d)},c.XJ=function(u){return c.YJ="rejected",d(u)}})}return Object.defineProperty(c.prototype,"hasSettled",{get:function(){return"pending"!==this.YJ},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"promise",{get:function(){return this.VJ},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"resolve",{get:function(){return this.WJ},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"reject",{get:function(){return this.XJ},enumerable:!1,configurable:!0}),c}()},35660:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.DelayedEndOfStreamHelper=void 0;var p=d(19274),h=d(34841);u.DelayedEndOfStreamHelper=function(){function c(c,u){void 0===u&&(u=1);var d=this;this.context=c,this.delayThreshold=u,this.aU=function(){d.XU&&!d.ZU(!0)&&d.XU.resolve()},this.YU=c.videoElement}return c.prototype.ZU=function(c){var u;return!(!c||!(null!=(u=this.YU)&&u.buffered.length))&&this.YU.buffered.end(this.YU.buffered.length-1)-this.YU.currentTime>this.delayThreshold},c.prototype.bU=function(){this.context.logger.debug("Resolving delayed setEndOfStream"),this.YU.removeEventListener(p.MediaElementEvent.timeupdate,this.aU),this.XU=void 0},c.prototype.setEndOfStream=function(c,u){var d=this;if(this.ZU(c)){if(this.XU)return Promise.resolve();var f=this.YU.buffered.end(this.YU.buffered.length-1),m=this.YU.currentTime;return this.context.logger.debug("Delaying setEndOfStream(".concat(c,") until playhead is close to end of buffer"),{threshold:this.delayThreshold,currentTime:m,endOfBuffer:f}),this.XU=new h.Deferred,this.YU.addEventListener(p.MediaElementEvent.timeupdate,this.aU),this.XU.promise.then(function(){return d.bU(),u()}).catch(function(){return d.bU()}),Promise.resolve()}return this.XU&&!this.ZU(c)&&this.XU.reject(),u()},c.prototype.release=function(){this.XU&&(this.YU.removeEventListener(p.MediaElementEvent.timeupdate,this.aU),this.XU.reject(),this.XU=void 0)},c}()},52424:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.DurationConverter=void 0,u.DurationConverter=function(){function c(){}return c.getDurationInSec=function(c){if("string"!=typeof c)return 0/0;var u=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?(T)?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*|Infinity)S)?/.exec(c);if(u){var d=!!u[1],p=12*parseFloat(u[2]||"0")*2592e3,h=30*parseFloat(u[4]||"0")*86400,f=24*parseFloat(u[6]||"0")*3600,m=60*parseFloat(u[9]||"0")*60,g=60*parseFloat(u[11]||"0"),v=parseFloat(u[13]||"0");if("T"===u[8]&&(u[9]||u[11]||u[13])===void 0)return 0/0;var y=p+h+f+m+g+v;return d&&(y=-y),y}return 0/0},c}()}
14,40153:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.ErrorRecoveryUtil=void 0,u.ErrorRecoveryUtil=function(){function c(){}return c.wasRecoveryAttemptedAtPosition=function(u,d){return!(d<0)&&Math.abs(u-d)<c.POSITION_TOLERANCE},c.POSITION_TOLERANCE=.1,c}()},43767:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.FileLoader=void 0,u.FileLoader=function(){function c(){this.kL={}}return c.getInstance=function(){return c.instance||(c.instance=new c),c.instance},c.prototype.loadScript=function(c,u){return void 0===u&&(u=!1),this.kL.hasOwnProperty(c)&&this.kL[c]||(u&&window.requirejs&&window.define?this.kL[c]=new Promise(function(u,d){window.requirejs([c],function(c){u(c)},function(c){d(c)})}):this.kL[c]=new Promise(function(u,d){var p=document.getElementsByTagName("head")[0]||document.documentElement,h=!1,f=document.createElement("script");f.type="text/javascript",f.src=c,f.async=!0,f.onload=f.onreadystatechange=function(){h||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(h=!0,f.onload=f.onreadystatechange=null,p&&f.parentNode&&p.removeChild(f),u(void 0))},f.onerror=d,p.insertBefore(f,p.firstChild)})),this.kL[c]},c.prototype.removeScript=function(c,u){this.kL.hasOwnProperty(c)&&this.kL[c]&&delete this.kL[c];for(var d=document.head.getElementsByTagName("script"),p=0;p<d.length;p++)d[p].src.includes(u)&&document.head.removeChild(d[p])},c.prototype.loadCSS=function(c,u){for(var d,p=(null==(d=null==u?void 0:u.container)?void 0:d.call(u))||document.getElementsByTagName("head")[0]||document.documentElement,h=p.querySelectorAll("link"),f=0;f<h.length;f++){var m=h[f];if(m.hasAttribute("href")&&m.getAttribute("href").indexOf(c)>-1)return}var g=document.createElement("link");g.setAttribute("rel","stylesheet"),g.setAttribute("type","text/css"),g.setAttribute("href",c),p.insertBefore(g,p.firstChild),this.kL[c]=!0},c}()},70233:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.FormatHelper=void 0,u.FormatHelper=function(){function c(){}return c.hexToBytes=function(c){var u=c.length;1&u&&(c="0"+c,u++);for(var d=new Uint8Array(u>>1),p=0;p<u;p+=2)d[p>>1]=parseInt(c.substring(p,p+2),16);return d},c.bytesToHex=function(c){c instanceof ArrayBuffer&&(c=new Uint8Array(c));for(var u="",d=0;d<c.byteLength;d++){var p=(255&c[d]).toString(16);p.length<2&&(u+="0"),u+=p}return u},c.bytesToUUID=function(c){return this.beautifyUUID(this.bytesToHex(c))},c.beautifyUUID=function(c){return c.slice(0,8)+"-"+c.slice(8,12)+"-"+c.slice(12,16)+"-"+c.slice(16,20)+"-"+c.slice(20)},c.intToHex=function(c){return("00"+c.toString(16)).slice(-2)},c.base64UrlEncode=function(c){return window.btoa(c).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},c.base64UrlDecode=function(c){return window.atob((c+"===".slice((c.length+3)%4)).replace(/-/g,"+").replace(/_/g,"/"))},c}()},87244:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.isSwitchingBufferBlocks=function(c){var u,d=null==c?void 0:c.getState();return!!d&&(null==(u=d.buffer)?void 0:u.isBufferBlockSwitchOngoing)}},68922:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.applyLabeling=u.getLabelFunction=u.handleLabelAssignment=u.DEFAULT_LABEL=u.LabelingType=void 0;var p,h,f=d(70850);(p=h||(u.LabelingType=h={})).Qualities="qualities",p.Tracks="tracks",p.Subtitles="subtitles",u.DEFAULT_LABEL="",u.handleLabelAssignment=function(c,d,p){if(!p)return u.DEFAULT_LABEL;var h=(0,f.safeUserCallback)(function(){return p(c)},d.logger);return"string"==typeof h?h:u.DEFAULT_LABEL},u.getLabelFunction=function(c,u,d){var p,h;return null==(h=null==(p=c.labeling)?void 0:p[u])?void 0:h[d]},u.applyLabeling=function(c,d){var p=(0,u.getLabelFunction)(c.source,c.streamType,c.labelingType);return(0,u.handleLabelAssignment)(d,c.context,p)}},84568:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.memoize=function(c,u){var d,p=new Map;return(d=function(){for(var d,h,f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];return d=u||0===f.length?p:function c(u,d,p){void 0===p&&(p=0);var h,f=d.length-1===p,m=d[p];return u.has(m)?h=u.get(m):(h=new Map,u.set(m,h)),p+=1,f?h:c(h,d,p)}(p,f),h=u?u.apply(void 0,f):c,d.has(h)||d.set(h,c.apply(void 0,f)),d.get(h)}).invalidate=function(){return p.clear()},d}}
vendor: 45,350 bytes, line 14
14,85434:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.MimeTypeHelper=u.MimeType=void 0,u.isMediaTypeContained=function(c,u){return Object.keys(c).map(function(c){return g.getMediaType(c)}).includes(g.getMediaType(u))};var p,h,f=d(85625),m=d(44468);(p=h||(u.MimeType=h={})).VideoMp4="video/mp4",p.VideoTs="video/mp2t",p.AudioMp4="audio/mp4",p.AudioTs="audio/mp2t";var g=function(){function c(){}return c.isSubtitle=function(c){return this.isApplication(c)||this.isText(c)},c.isText=function(c){return c.toLowerCase().includes("text")},c.isTtmlXml=function(c){return c.toLowerCase().includes("ttml+xml")},c.isApplication=function(c){return c.toLowerCase().includes("application")},c.isAV=function(c){return this.isVideo(c)||this.isAudio(c)},c.isVideo=function(c){return c.toLowerCase().includes("video")},c.isUnknown=function(c){return c.toLowerCase().includes("unknown")},c.isAudio=function(c){return c.toLowerCase().includes("audio")},c.isImage=function(c){return c.toLowerCase().includes("image")},c.isDash=function(c){return c.toLowerCase().includes(f.ManifestMimeType.Dash)},c.isHls=function(c){var u=c.toLowerCase();return u.includes(f.ManifestMimeType.Hls)||u.includes("vnd.apple.mpegurl")},c.isMP4=function(c){return c.toLowerCase().includes("mp4")},c.getMediaType=function(c){return this.isVideo(c)?m.MediaType.Video:this.isAudio(c)?m.MediaType.Audio:this.isSubtitle(c)?m.MediaType.Subtitles:this.isImage(c)?m.MediaType.Thumbnails:void 0},c.extractContentType=function(c){return c.split("/")[0]},c.extractContainerType=function(c){var u=c.split("/");return u.length>1?u[1]:null},c}();u.MimeTypeHelper=g},15014:function(c,u){function d(c,u){var d;return null==(d=null==c?void 0:c.Period)?void 0:d.find(function(c){return c._id===u})}function p(c,u){var p,h=d(c,u.periodId);if(h)return null==(p=h.AdaptationSet)?void 0:p.find(function(c){return c._internalId.equals(u)})}Object.defineProperty(u,"__esModule",{value:!0}),u.findRepresentation=void 0,u.findPeriod=d,u.findAdaptationSet=p,u.findRepresentation=function(c,u){var d,h=p(c,u);if(h)return null==(d=h.Representation)?void 0:d.find(function(c){return c._internalId.equals(u)})}},15487:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.getVidaaVersion=u.isVidaa=u.getTizenVersion=u.isTizen2024=u.isTizen2023=u.isTizen2022=u.isTizen2020=u.isTizen2016=u.isTizen2017=u.isTizen2018=u.isTizen2019=u.isTizen=u.getEdgeVersion=u.isEdge=u.getSafariVersion=u.isSafari=u.isFirefoxIOS=u.isFirefox=u.isChromium=u.isChrome=u.WEBOS_2022_CHROMIUM_VERSION=u.WEBOS_2021_CHROMIUM_VERSION=u.WEBOS_2020_CHROMIUM_VERSION=u.WEBOS_2018_2019_CHROMIUM_VERSION=u.WEBOS_2016_2017_CHROMIUM_VERSION=u.TIZEN_2024_MINOR_VERSION=u.TIZEN_2024_MAJOR_VERSION=u.TIZEN_2023_MINOR_VERSION=u.TIZEN_2023_MAJOR_VERSION=u.TIZEN_2022_MINOR_VERSION=u.TIZEN_2022_MAJOR_VERSION=u.TIZEN_2020_MINOR_VERSION=u.TIZEN_2020_MAJOR_VERSION=u.TIZEN_2019_MINOR_VERSION=u.TIZEN_2019_MAJOR_VERSION=u.TIZEN_2018_MINOR_VERSION=u.TIZEN_2018_MAJOR_VERSION=u.TIZEN_2017_MINOR_VERSION=u.TIZEN_2017_MAJOR_VERSION=u.TIZEN_2016_MINOR_VERSION=u.TIZEN_2016_MAJOR_VERSION=u.SAFARI_18_MAJOR_VERSION=u.SAFARI_17_MAJOR_VERSION=u.SAFARI_15_MAJOR_VERSION=u.IOS_18=u.IOS_17=u.IOS_15=u.IOS_10=u.IOS_9=u.EDGE_CHROMIUM_FIRST_MAJOR_VERSION=void 0,u.resetPlatformDetectorCache=u.isSafariPlatform18orNewer=u.isSafari17orIOS17=u.isSafari15orIOS15=u.getIOSVersion=u.isSafariIOS=u.isIOS=u.isMobile=u.isEdgeAndroid=u.isAndroid=u.isWebOs2022OrNewer=u.isWebOs2020=u.isWebOs2017=u.isWebOs2016=u.isWebOs2019OrOlder=u.getWebOsChromiumVersion=u.isWebOS=u.isWpeWebKit=u.isVizio=void 0,u.isLegacyEdge=h,u.isEdgeChromium=function(){return(0,u.isEdge)()&&(0,u.getEdgeVersion)().major>=u.EDGE_CHROMIUM_FIRST_MAJOR_VERSION},u.isPlayStation5=f,u.isPlayStation4=m,u.isReactNative=function(){return"ReactNative"===window.navigator.product};var p=d(47993);function h(){return(0,u.isEdge)()&&(0,u.getEdgeVersion)().major<u.EDGE_CHROMIUM_FIRST_MAJOR_VERSION}function f(){return/PlayStation 5/i.test(navigator.userAgent)}function m(){return/PlayStation 4/i.test(navigator.userAgent)}u.EDGE_CHROMIUM_FIRST_MAJOR_VERSION=79,u.IOS_9=9,u.IOS_10=10,u.IOS_15=15,u.IOS_17=17,u.IOS_18=18,u.SAFARI_15_MAJOR_VERSION=15,u.SAFARI_17_MAJOR_VERSION=17,u.SAFARI_18_MAJOR_VERSION=18,u.TIZEN_2016_MAJOR_VERSION=2,u.TIZEN_2016_MINOR_VERSION=4,u.TIZEN_2017_MAJOR_VERSION=3,u.TIZEN_2017_MINOR_VERSION=0,u.TIZEN_2018_MAJOR_VERSION=4,u.TIZEN_2018_MINOR_VERSION=0,u.TIZEN_2019_MAJOR_VERSION=5,u.TIZEN_2019_MINOR_VERSION=0,u.TIZEN_2020_MAJOR_VERSION=5,u.TIZEN_2020_MINOR_VERSION=5,u.TIZEN_2022_MAJOR_VERSION=6,u.TIZEN_2022_MINOR_VERSION=5,u.TIZEN_2023_MAJOR_VERSION=7,u.TIZEN_2023_MINOR_VERSION=0,u.TIZEN_2024_MAJOR_VERSION=8,u.TIZEN_2024_MINOR_VERSION=0,u.WEBOS_2016_2017_CHROMIUM_VERSION=38,u.WEBOS_2018_2019_CHROMIUM_VERSION=53,u.WEBOS_2020_CHROMIUM_VERSION=68,u.WEBOS_2021_CHROMIUM_VERSION=79,u.WEBOS_2022_CHROMIUM_VERSION=87,u.isChrome=function(){return navigator.userAgent.includes("Chrome")&&!(0,u.isEdge)()},u.isChromium=function(){return(0,u.isChrome)()||(0,u.isEdge)()&&!h()},u.isFirefox=function(){return navigator.userAgent.includes("Firefox")},u.isFirefoxIOS=function(){return navigator.userAgent.includes("FxiOS")&&(0,u.isIOS)()},u.isSafari=function(){return navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")&&!navigator.userAgent.includes("IEMobile")&&!navigator.userAgent.includes("Edge")&&!(0,u.isTizen)()&&!f()&&!m()&&!(0,u.isWpeWebKit)()||(0,p.isFairPlayDrmSupported)()},u.getSafariVersion=function(){var c=/Version\/(\d+)\.?(\d+)?\.?(\d+)?/.exec(navigator.userAgent)||null;if(!c)return{};var u=c[1],d=c[2],p=c[3],h=function(c){return parseInt(c)};return{major:h(u),minor:h(d),patch:h(p)}},u.isEdge=function(){return/Edge\/\d+/i.test(navigator.userAgent)||/Edg\/\d+/i.test(navigator.userAgent)||/EdgA\/\d+/i.test(navigator.userAgent)||/EdgiOS\/\d+/i.test(navigator.userAgent)},u.getEdgeVersion=function(){var c=/Edge\/(\d+)\.?(\d+)/.exec(navigator.userAgent)||/Edg\/(\d+)\.?(\d+)/.exec(navigator.userAgent)||/EdgA\/(\d+)\.?(\d+)/.exec(navigator.userAgent)||/EdgiOS\/(\d+)\.?(\d+)/.exec(navigator.userAgent);if(!c||0===c.length)return{major:0,minor:0};var u={};return c[1]&&(u.major=parseInt(c[1])),c[1]&&(u.minor=parseInt(c[2])),u};var g,v,y,b,S=function(c,d){var p=(0,u.getTizenVersion)();return p.major===c&&p.minor===d};u.isTizen=function(){return null!=g||(g=navigator.userAgent.includes("Tizen")),g},u.isTizen2019=function(){return S(u.TIZEN_2019_MAJOR_VERSION,u.TIZEN_2019_MINOR_VERSION)},u.isTizen2018=function(){return S(u.TIZEN_2018_MAJOR_VERSION,u.TIZEN_2018_MINOR_VERSION)},u.isTizen2017=function(){return S(u.TIZEN_2017_MAJOR_VERSION,u.TIZEN_2017_MINOR_VERSION)},u.isTizen2016=function(){return S(u.TIZEN_2016_MAJOR_VERSION,u.TIZEN_2016_MINOR_VERSION)},u.isTizen2020=function(){return S(u.TIZEN_2020_MAJOR_VERSION,u.TIZEN_2020_MINOR_VERSION)},u.isTizen2022=function(){return S(u.TIZEN_2022_MAJOR_VERSION,u.TIZEN_2022_MINOR_VERSION)},u.isTizen2023=function(){return S(u.TIZEN_2023_MAJOR_VERSION,u.TIZEN_2023_MINOR_VERSION)},u.isTizen2024=function(){return S(u.TIZEN_2024_MAJOR_VERSION,u.TIZEN_2024_MINOR_VERSION)},u.getTizenVersion=function(){if(void 0===v){var c=/Tizen (\d).(\d)/.exec(navigator.userAgent);v=null!=c&&c[1]?{major:Number(c[1]),minor:Number(c[2]||0)}:{}}return v},u.isVidaa=function(){return navigator.userAgent.includes("VIDAA")},u.getVidaaVersion=function(){var c=new RegExp(/VIDAA\/(\d+)\.?(\d+)/).exec(navigator.userAgent);return null!=c&&c[1]?{major:Number(c[1]),minor:Number(c[2])}:{}},u.isVizio=function(){return navigator.userAgent.includes("VIZIO")},u.isWpeWebKit=function(){return navigator.userAgent.includes("WPE")||navigator.userAgent.includes("Astro")},u.isWebOS=function(){return null!=y||(y=navigator.userAgent.includes("Web0S")||navigator.userAgent.includes("NetCast")),y},u.getWebOsChromiumVersion=function(){var c;if(void 0===b){var u=new RegExp(/Chrome\/(\d+)\.?(\d+)/).exec(navigator.userAgent);if(!(null!=u&&u[1]))return{};b={major:Number(u[1]),minor:Number(null!=(c=u[2])?c:0)}}return b},u.isWebOs2019OrOlder=function(){var c=(0,u.getWebOsChromiumVersion)();return(0,u.isWebOS)()&&(null==c?void 0:c.major)!==void 0&&c.major<=u.WEBOS_2018_2019_CHROMIUM_VERSION},u.isWebOs2016=function(){return(0,u.getWebOsChromiumVersion)().major===u.WEBOS_2016_2017_CHROMIUM_VERSION&&!("requestMediaKeySystemAccess"in navigator)},u.isWebOs2017=function(){return(0,u.getWebOsChromiumVersion)().major===u.WEBOS_2016_2017_CHROMIUM_VERSION&&"requestMediaKeySystemAccess"in navigator},u.isWebOs2020=function(){return(0,u.isWebOS)()&&(0,u.getWebOsChromiumVersion)().major===u.WEBOS_2020_CHROMIUM_VERSION},u.isWebOs2022OrNewer=function(){var c=(0,u.getWebOsChromiumVersion)();return(0,u.isWebOS)()&&(null==c?void 0:c.major)!==void 0&&c.major>=u.WEBOS_2022_CHROMIUM_VERSION},u.isAndroid=function(){return/Android/i.test(navigator.userAgent)},u.isEdgeAndroid=function(){return(0,u.isEdge)()&&(0,u.isAndroid)()},u.isMobile=function(){return/Android/i.test(navigator.userAgent)||/IEMobile/i.test(navigator.userAgent)||/Windows Phone 10.0/i.test(navigator.userAgent)||/Safari/i.test(navigator.userAgent)&&/Mobile/i.test(navigator.userAgent)},u.isIOS=function(){return/Safari/i.test(navigator.userAgent)&&/Mobile/i.test(navigator.userAgent)&&!/Android/i.test(navigator.userAgent)&&!/Windows Phone 10.0/i.test(navigator.userAgent)},u.isSafariIOS=function(){return/Safari/i.test(navigator.userAgent)&&/iP(hone|od|ad)/i.test(navigator.userAgent)},u.getIOSVersion=function(){var c=/OS (\d+)(_\d+)*/.exec(navigator.userAgent);return c&&c.length>0&&parseInt(c[1],10)||0},u.isSafari15orIOS15=function(){return(0,u.isSafari)()&&(0,u.getSafariVersion)().major===u.SAFARI_15_MAJOR_VERSION||(0,u.isIOS)()&&(0,u.getIOSVersion)()===u.IOS_15},u.isSafari17orIOS17=function(){return(0,u.isSafari)()&&(0,u.getSafariVersion)().major===u.SAFARI_17_MAJOR_VERSION||(0,u.isIOS)()&&(0,u.getIOSVersion)()===u.IOS_17},u.isSafariPlatform18orNewer=function(){var c;return!!((0,u.isSafari)()&&(null!=(c=(0,u.getSafariVersion)().major)?c:0)>=u.SAFARI_18_MAJOR_VERSION)||!!((0,u.isIOS)()&&(0,u.getIOSVersion)()>=u.IOS_18)},u.resetPlatformDetectorCache=function(){g=void 0,v=void 0,y=void 0,b=void 0}},28334:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.LEGACY_EDGE_MAX_STARTUP_BUFFER=void 0,u.getPlatformSafeStartupBuffer=function(c,u){if((0,h.isTizen2016)()){var d=u.map(function(c){return p.MimeTypeHelper.getMediaType(c)}).map(function(u){return c.bufferSettings.getForwardTargetLevel(u)});return Math.max.apply(Math,d)}return 0};var p=d(85434),h=d(15487);u.LEGACY_EDGE_MAX_STARTUP_BUFFER=6},92006:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.PlayerConfigBuilder=void 0;var h=d(60865),f=d(65567),m=d(15487),g=d(70850);u.PlayerConfigBuilder=function(){function c(c){"string"==typeof c?this.RC={key:c}:(this.RC={},g.Util.deepCopy(this.RC,c))}return c.prototype.optimizeForPlatform=function(c){var u=(c??{}).appId;if((0,m.isTizen)()||(0,m.isWebOS)()){var d=(0,f.getTvDefaultConfig)(u);g.Util.deepCopy(this.RC,d)}return this},c.prototype.enableLowLatency=function(c){var u=(0,h.getLowLatencyDefaultConfig)(c);return g.Util.deepCopy(this.RC,u),this},c.prototype.mergeWith=function(c){return g.Util.deepCopy(this.RC,c),this},c.prototype.build=function(){return p({},this.RC)},c}()},72537:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.StorageHandler=void 0;var p=d(4081);u.StorageHandler=function(){function c(c){var u;this.ZY=c,this.XY="bitmovinplayer_config",this.data={},this.YY=((u=new Date).setTime(u.getTime()+316224e5),"expires="+u.toUTCString()),this.dY()}return c.prototype.get=function(c){return this.data[c]},c.prototype.set=function(c,u){this.data[c]=u,this.eY()},c.prototype.setDisabled=function(c){this.disabled=c},c.prototype.aY=function(c){var u=this.bY();if(!u)return"";for(var d=c+"=",p=u.split(";"),h=0;h<p.length;h++){for(var f=p[h];" "===f.charAt(0);)f=f.substring(1);if(0===f.indexOf(d))return f.substring(d.length,f.length)}return""},c.prototype.bY=function(){try{return document.cookie}catch{return""}},c.prototype.cY=function(c){if(c)try{this.data=JSON.parse(c)}catch{}},c.prototype.dY=function(){this.ZY?this.cY(localStorage.getItem(this.XY)):this.cY(this.aY(this.XY))},c.prototype.eY=function(){if(!this.disabled)try{if(this.ZY)localStorage.setItem(this.XY,JSON.stringify(this.data));else{var c=p.default.isSecureContext?"Secure; ":"";document.cookie=this.XY+"="+JSON.stringify(this.data)+"; "+c+"SameSite=Strict; path=/; "+this.YY}}catch{}},c}()},66502:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.TextSegmentAnalyzer=void 0;var p=d(74853);u.TextSegmentAnalyzer=function(){function c(){}return c.isPlainTextPayload=function(c){if(!c)return!1;var u=[87,69,66,86,84,84],d=new Uint8Array(c.slice(0,6)),h=new Uint8Array(c.slice(0,9));return p.ArrayHelper.comparePrimitiveArrays(d,new Uint8Array(u))||p.ArrayHelper.comparePrimitiveArrays(h,new Uint8Array([239,187,191].concat(u)))},c.detectEncoding=function(c){for(var u,d=!0,p=[34,85,84,70,45,56,34],h=c instanceof ArrayBuffer?new DataView(c):c,f=0;f<h.byteLength;f++)if((u=h.getUint8(f))>128)d=!1;else{if(0===u)return"utf-16";if(u===p[0]&&h.byteLength>f+p.length){for(var m=!0,g=1;g<p.length;g++)if(p[g]!==h.getUint8(f+g)){m=!1;break}if(m)return"utf-8"}}return d?"ascii":"utf-8"},c}()},89927:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.toSeconds=function(c){return c/d},u.toMilliSeconds=function(c){return c*d};var d=1e3},88844:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.clearTimeoutIfDefined=function(c){c&&p.default.clearTimeout(c)},u.clearIntervalIfDefined=function(c){c&&p.default.clearInterval(c)};var p=d(4081)},23068:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.isBoolean=u.isNumber=void 0,u.isDefined=function(c){return null!=c},u.isVideoRepresentation=function(c){return null!=c._height&&null!=c._width},u.isNumber=function(c){return"number"==typeof c},u.isBoolean=function(c){return"boolean"==typeof c}},58313:function(c,u){function d(){var c;return(null==(c=window.location)?void 0:c.protocol)||"https:"}function p(c){var u=c.indexOf("//")+2,d=c.indexOf("/",u);return -1===d&&(d=c.indexOf("?",u)),-1===d?c:c.slice(0,d)}Object.defineProperty(u,"__esModule",{value:!0}),u.URLHelper=void 0,u.extractOrigin=p,u.removeQueryParameters=function(c,u){var d=c.split("?"),p=d[0],h=d[1];if(!h)return c;var f=h.split("&").filter(function(c){var d=c.split("=")[0];return!u.includes(d)}).join("&");return f?"".concat(p,"?").concat(f):p},u.URLHelper=function(){function c(){}return c.isUrlAbsolute=function(u){return!!u&&("string"!=typeof u&&(u=c.urlObjectToString(u)),!!c.isDataUri(u)||c.ABSOLUTE_URL_REGEX.test(u))},c.removeUrlParameters=function(c){return c.indexOf("?")>-1&&(c=c.split("?")[0]),c},c.urlObjectToString=function(c){return c&&"string"!=typeof c?c&&"string"==typeof c.__text?c.__text:c&&"string"==typeof c.url?c.url:null:c},c.concatUrlParts=function(u,d){var h="/",f=c.urlObjectToString(u),m=c.urlObjectToString(d);return!f||f.length<1||c.isUrlAbsolute(m)?m:!m||m.length<1?f:((f=c.removeUrlParameters(f)).indexOf("/")>-1&&(f=f.substring(0,f.lastIndexOf("/"))),"/"===m[0]&&(f=p(f),h=""),f+h+m)},c.removeLastPathPart=function(u){if(!u)return null;u=c.removeUrlParameters(u);var d=c.getProtocolOffset(u),p=u.lastIndexOf("/");return p===u.length-1&&(u=u.substring(0,p)),(p=u.lastIndexOf("/"))<0?"":p>u.length-1?u:p<=d?u+"/":u.substring(0,p+1)},c.isRootRelativeUrl=function(c){return!!(c&&c.length>0)&&"/"===c[0]},c.getProtocolOffset=function(c){var u=c.indexOf("://");return u>-1?u+3:2*(-1===u&&0===c.indexOf("//"))},c.replaceCdn=function(c,u){var d=p(c),h=p(u);return c.replace(d,h)},c.isSubUrl=function(c,u){return!(!c||!u)&&(0===u.indexOf("../")&&(u=u.substring(3)),c.indexOf(u)>-1)},c.concatBaseUrlWithPartial=function(u,h){var f;return c.isUrlAbsolute(h)?(h.startsWith("/")&&(h=((f=u).substring(0,f.indexOf("//"))||d())+h),h):(u=this.toFullUrl(u),h&&0!==h.length?c.isRootRelativeUrl(h)?p(u)+h:(u.endsWith("/")||(u=this.removeLastPathPart(u)),u+h):u)},c.appendQueryParametersToUrl=function(c,u){if(!u||0===Object.keys(u).length)return c;var d,p,h,f="",m=c.indexOf("?")>=0;for(var g in u){u.hasOwnProperty(g)&&(f+=m?"&":"?",m=!0,d=f,p=g,h=u[g],d+=p,null!=h&&(d+="="+encodeURIComponent(h)),f=d)}return c+f},c.toFullUrl=function(u){if(c.isDataUri(u)||!u.includes("//"))return u;var p=u.startsWith("//")?d()+u:u;return u.split("//")[1].includes("/")||(p+="/"),p},c.isDataUri=function(c){return c&&0===c.indexOf(this.DATA_URI_PROTOCOL)},c.parseDataUri=function(c){if(!this.isDataUri(c))throw Error("Invalid data uri: "+c);-1===(c=c.substring(this.DATA_URI_PROTOCOL.length)).indexOf(this.COMMA_CHARACTER)&&(c=this.DATA_URI_DEFAULT_MEDIA_TYPE+this.COMMA_CHARACTER+c);var u=c.split(this.COMMA_CHARACTER),d=u[0],p=u[1],h=d.endsWith(this.DATA_URI_BASE64_MARKER),f=d.length-this.DATA_URI_BASE64_MARKER.length-this.COMMA_CHARACTER.length;return{mediaType:h?d.substring(0,f):d,base64:h?p:void 0,data:h?atob(p):p}},c.buildAbsoluteUrl=function(u,d,p){return c.isUrlAbsolute(p)?p:c.isRootRelativeUrl(p)?d+p:u+p},c.getAbsoluteUrl=function(u,d){return c.isUrlAbsolute(u)?u:c.concatBaseUrlWithPartial(d,u)},c.removeDotSegments=function(u){for(var d=c.isUrlAbsolute(u)?p(u):"",h=[],f=0,m=u.substring(d.length).split("/");f<m.length;f++){var g=m[f];if(".."===g){if(0===h.length)return u;h.pop()}else"."!==g&&h.push(g)}return d+h.join("/")},c.DATA_URI_PROTOCOL="data:",c.DATA_URI_BASE64_MARKER="base64",c.DATA_URI_DEFAULT_MEDIA_TYPE="text/plain;charset=US-ASCII",c.ABSOLUTE_URL_REGEX=RegExp("^(?:[a-z]+:)?//","i"),c.COMMA_CHARACTER=",",c}()},70850:function(c,u,d){var p=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.Util=void 0,u.parseAspectRatio=function(c){if(!c)return 0;if((c=String(c).replace(",",".")).indexOf(":")>-1)u=c.split(":");else{if(!(c.indexOf("/")>-1))return isNaN(parseFloat(c))?0:parseFloat(c);u=c.split("/")}if(u&&Array.isArray(u)&&u.length>1){var u,d=parseFloat(u[0])/parseFloat(u[1]);return isNaN(d)?0:d}return 0},u.removeDuplicates=function(c){return c.filter(function(c,u,d){return u===d.findIndex(function(u){return b.deepEqual(u,c)})})},u.safeUserCallback=function(c,u){if(!b.isFunction(c))return null;try{return c()}catch(c){return u&&u.warn("Exception in userCallback",c),null}};var h=d(56481),f=d(70962),m=d(19274),g=d(26225),v=d(57387),y=d(89927),b=function(){function c(){}return c.deepEqual=function(u,d){if(u===d)return!0;if(!u||"object"!=typeof u||!d||"object"!=typeof d||Object.keys(u).length!==Object.keys(d).length)return!1;for(var p in u)if(!d.hasOwnProperty(p)||!c.deepEqual(u[p],d[p]))return!1;return!0},c.deepCopy=function(u,d){var p=void 0!==window.ArrayBuffer;for(var h in d)d.hasOwnProperty(h)&&(p&&d[h]instanceof ArrayBuffer?u[h]=d[h].slice(0,d[h].byteLength):"object"==typeof d[h]&&null!==d[h]?(u.hasOwnProperty(h)||(Array.isArray(d[h])?u[h]=[]:u[h]={}),c.deepCopy(u[h],d[h])):u[h]=d[h])},c.deepCopyMulti=function(c){for(var u=this,d=[],p=1;p<arguments.length;p++)d[p-1]=arguments[p];return d.forEach(function(d){return u.deepCopy(c,d)}),c},c.isFunction=function(c){return!!c&&"[object Function]"===({}).toString.call(c)},c.extractBitrateFromString=function(c,u){return isNaN(u)?(u=u.toLowerCase().trim().replace(/,/g,".")).indexOf("mbps")>-1?1e6*u.split("m")[0]:u.indexOf("kbps")>-1?1e3*u.split("k")[0]:u.indexOf("bps")>-1?+u.split("b")[0]:"max"===c?1/0:0:1/0===u?u:+u},c.splitPlayerAndStreamingTechnology=function(c){if(c&&"string"==typeof c){for(var u=c.split("."),d=0,p=0;p<c.length;p++)""===u[p]&&(u[p]=null,d++);return d===c.length?null:{player:u[0],streaming:u[1]}}return null},c.createVRAudioElement=function(){var u=document.createElement("source");u.setAttribute("type","audio/mp3"),u.setAttribute("src","data:audio/mpeg;base64,/+MYxAAAAANIAUAAAASEEB/jwOFM/0MM/90b/+RhST//w4NFwOjf///PZu////9lns5GFDv//l9GlUIEEIAAAgIg8Ir/JGq3/+MYxDsLIj5QMYcoAP0dv9HIjUcH//yYSg+CIbkGP//8w0bLVjUP///3Z0x5QCAv/yLjwtGKTEFNRTMuOTeqqqqqqqqqqqqq/+MYxEkNmdJkUYc4AKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq");var d={settings:f.DefaultSettings};for(c.vrAudioElement=c.vrAudioElement||new g.MediaElementWrapper(d,document.createElement("audio")),c.vrAudioElement.setAttribute("id","bitmovinplayer-audio"),c.vrAudioElement.addEventListener(m.MediaElementEvent.playing,function(){return c.vrAudioElement.bit_wasPlayCalled=!0}),c.vrAudioElement.setAttribute("crossorigin","anonymous"),c.vrAudioElement.hasAttribute("src")&&c.vrAudioElement.removeAttribute("src");c.vrAudioElement.firstChild;)c.vrAudioElement.removeChild(c.vrAudioElement.firstChild);c.vrAudioElement.load()},c.getVRAudioElement=function(){return c.vrAudioElement||c.createVRAudioElement(),c.vrAudioElement},c.removeVRAudioElement=function(){if(c.vrAudioElement){var u=c.vrAudioElement.getWrappedElement();c.vrAudioElement=(0,h.dispose)(c.vrAudioElement),u.parentNode&&u.parentNode.removeChild(u)}},c.isFullscreen=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.webkitCurrentFullScreenElement},c.generateUniqueId=function(){return Date.now().toString(16)+Math.floor(1048576*(1+Math.random())).toString(16).substring(1)},c.getUtcDate=function(u){var d=null;return"string"!=typeof u&&isNaN(u)||(d=new Date("string"==typeof u?c.timeZoneRegex.test(u)?u:u+"Z":u)),d},c.delay=function(c,u){return new Promise(function(d){setTimeout(function(){"function"==typeof u?d(u()):d()},c)})},c.timeInSeconds=function(c){return(0,y.toSeconds)(c.getTime())},c.toHash=function(c){var u=new WeakMap,d=JSON.stringify(c,function c(d,p){if(null==p)return p;if("function"==typeof p)return p.toString().replace(/\n|\s\s/g,"");if(p instanceof ArrayBuffer)return String.fromCharCode.apply(null,new Uint8Array(p.slice(0,20)));if(p instanceof Uint8Array)return String.fromCharCode.apply(null,p.slice(0,20));if("object"==typeof p&&!Array.isArray(p)){if(u.has(p)){var h=JSON.stringify(Object.keys(p),c);return"[Object ".concat(Math.abs((0,v.calcHash)(h)).toString(16),"]")}u.set(p,!0)}return p});return(0x10000000|Math.abs((0,v.calcHash)(d))).toString(16)},c.roundValue=function(c,u){var d=Math.pow(10,u);return Math.round(c*d)/d},c.arrayMove=function(c,u,d){var h=p([],c,!0),f=h[u];return h.splice(u,1),h.splice(d,0,f),h},c.vrAudioElement=null,c.timeZoneRegex=/(?:Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9])$/,c}();u.Util=b},57387:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.calcHash=function(c){return(p.ModuleManager.has(h.ModuleName.Subtitles)?p.ModuleManager.get(h.ModuleName.Subtitles).hashCode:function(c){var u=0;if(0===c.length)return u;for(var d=0;d<c.length;d++)u=(u<<5)-u+c.charCodeAt(d)|0;return u})(c)};var p=d(88052),h=d(62756)},78877:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.getBufferEndSafetyMargin=function(c){var u=(0,h.getCapabilities)(),d=u.isChromium,v=u.isChrome,y=u.isVizio,b=u.isWebOS,S=u.isPlayStation4;if(b||y||(0,f.isTizen2018)()||(0,f.isTizen2019)()||S)return g;var _=(null==c?void 0:c.usedKeySystem.kind)===p.KeySystemKind.PLAYREADY;return d&&!v&&_?g:m};var p=d(33468),h=d(21513),f=d(15487),m=.25,g=1.25},4081:function(c,u){var d;function p(c){return"Math"in c&&c.Math===Math}Object.defineProperty(u,"__esModule",{value:!0}),u.default=null!=(d="object"==typeof window&&window&&p(window)?window:void 0)?d:"object"==typeof self&&self&&p(self)?self:void 0},2992:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.rewriteMp4BoxType=function(c,u){u.split("").slice(0,p).forEach(function(u,p){return c._raw.setUint8(d+p,u.charCodeAt(0))})};var d=4,p=4},60877:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.shouldResetCurrentTimeAfterBufferUnderrun=function(){var c=(0,h.getCapabilities)();return c.isWebOS?c[p.CapabilityKey.webOSChromiumVersion]===f.WEBOS_2020_CHROMIUM_VERSION:c.isChromium};var p=d(7387),h=d(21513),f=d(15487)},17891:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.createResizeObserver=function(c,u){var d=["style","width","height","class"],p=function(){return u(c.clientWidth,c.clientHeight)},h=new MutationObserver(p);return{observe:function(){h.observe(c,{attributes:!0,attributeFilter:d,childList:!1,subtree:!0}),window.addEventListener("resize",p)},dispose:function(){h.disconnect(),window.removeEventListener("resize",p)}}}},2079:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.ViewModeHandler=void 0;var p=d(56481),h=d(3714),f=d(44468),m=d(23690),g=d(87827),v=d(93204),y=d(19274),b=d(17891),S=["","webkit","moz","ms","o"],_=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","webkitbeginfullscreen","webkitendfullscreen"];function E(c,u){return S.some(function(d){var p=u;return""!==d&&(p="".concat(d).concat(u.substring(0,1).toUpperCase()).concat(u.substring(1))),"function"==typeof c[p]&&(c[p](),!0)})}function T(){var c,u,d;return null!=(d=null!=(u=null!=(c=document.fullscreenElement)?c:document.mozFullScreenElement)?u:document.webkitFullscreenElement)?d:null}u.ViewModeHandler=function(){function c(c,u,d,p){var g=this;this.currentPlayer=c,this.container=u,this.eventDispatcher=d,this.shouldForceLegacyFullscreen=p,this.OZ=!1,this.width=0,this.height=0,this.a0=function(c){return g.currentPlayer.context.store.dispatch(c)},this.b0=function(c,u){c===g.width&&u===g.height||(g.width=c,g.height=u,g.eventDispatcher(h.PlayerEvent.PlayerResized,{width:"".concat(g.width,"px"),height:"".concat(g.height,"px")}),g.currentPlayer.adController&&"function"==typeof g.currentPlayer.adController.onPlayerResize&&g.currentPlayer.adController.onPlayerResize(g.width,g.height))},this.c0=function(c,u){var d={from:u.viewMode,to:c.viewMode,legacy:g.shouldForceLegacyFullscreen()};g.h0()&&(c.viewMode===f.ViewMode.Fullscreen?(g.currentPlayer.bitdashPlayer.onFullscreenEnter(d),g.width=0,g.height=0):u.viewMode===f.ViewMode.Fullscreen&&g.currentPlayer.bitdashPlayer.onFullscreenExit()),g.eventDispatcher(h.PlayerEvent.ViewModeChanged,d)},this.m0=function(){g.a0((0,m.setPlayerViewMode)(f.ViewMode.PictureInPicture))},this.n0=function(){g.a0((0,m.setPlayerViewMode)(f.ViewMode.Inline))},this.t0=function(c){g.isFullscreen()&&c.type===g.PZ?(g.PZ=void 0,g.s0()):(g.OZ||g.o0())&&!g.PZ&&(g.PZ=c.type,g.r0())},this.MZ=(0,b.createResizeObserver)(this.currentPlayer.container,this.b0),this.MZ.observe(),this.d0(),this.f0(),this.g0()}return c.prototype.d0=function(){this.NZ=(0,v.subscribe)(this.currentPlayer.context.store)(function(c){return(0,g.getPlayerState)(c)},this.c0,function(c,u){return c.viewMode!==u.viewMode})},c.prototype.e0=function(){return(0,g.getPlayerState)(this.currentPlayer.context.store.getState()).viewMode},c.prototype.f0=function(){var c=this;_.forEach(function(u){return document.addEventListener(u,c.t0)}),this.o0()&&(this.a0((0,m.setPlayerViewMode)(f.ViewMode.Fullscreen)),this.q0(!0))},c.prototype.g0=function(){this.currentPlayer.videoElement&&(this.currentPlayer.videoElement.addEventListener(y.MediaElementEvent.enterpictureinpicture,this.m0),this.currentPlayer.videoElement.addEventListener(y.MediaElementEvent.leavepictureinpicture,this.n0))},c.prototype.h0=function(){return!!this.currentPlayer&&!!this.currentPlayer.bitdashPlayer},c.prototype.i0=function(){return this.h0()&&!!this.currentPlayer.videoElement&&this.currentPlayer.videoElement.isPictureInPictureAvailable()},c.prototype.j0=function(){return this.currentPlayer.videoElement.isPictureInPicture()},c.prototype.isViewModeAvailable=function(c){return c===f.ViewMode.PictureInPicture?this.i0():[f.ViewMode.Fullscreen,f.ViewMode.Inline].includes(c)},c.prototype.k0=function(){this.h0()&&this.currentPlayer.videoElement&&(this.currentPlayer.videoElement.exitPictureInPicture(),this.a0((0,m.setPlayerViewMode)(f.ViewMode.Inline)))},c.prototype.l0=function(){var c;null==(c=this.currentPlayer.videoElement)||c.enterPictureInPicture(),this.a0((0,m.setPlayerViewMode)(f.ViewMode.PictureInPicture))},c.prototype.o0=function(){var c=T();return c&&this.currentPlayer.videoElement.getWrappedElement()===c},c.prototype.p0=function(){return this.shouldForceLegacyFullscreen()?"data-legacy-fullscreen":"data-fullscreen"},c.prototype.q0=function(c){var u=this.p0();this.container.setAttribute(u,String(c))},c.prototype.r0=function(){this.q0(!0),this.OZ=!1,this.a0((0,m.setPlayerViewMode)(f.ViewMode.Fullscreen))},c.prototype.s0=function(){this.q0(!1),this.OZ=!1,this.e0()===f.ViewMode.Fullscreen&&this.a0((0,m.setPlayerViewMode)(f.ViewMode.Inline))},c.prototype.isFullscreen=function(){return this.e0()===f.ViewMode.Fullscreen||"true"===this.container.getAttribute(this.p0())},c.prototype.u0=function(c){if(void 0===c&&(c=this.container),T())this.currentPlayer.context.logger.debug("cannot enter fullscreen, another element is already fullscreen");else if(this.shouldForceLegacyFullscreen())this.r0();else{var u=E(c,"requestFullscreen");u?this.OZ=!0:!u&&this.currentPlayer.videoElement.webkitEnterFullScreen&&(this.OZ=!0,this.currentPlayer.videoElement.webkitEnterFullScreen())}},c.prototype.v0=function(){if(this.shouldForceLegacyFullscreen())this.s0();else{var c=E(window.document,"exitFullscreen");c?this.OZ=!0:!c&&this.currentPlayer.videoElement.webkitExitFullscreen&&(this.OZ=!0,this.currentPlayer.videoElement.webkitExitFullscreen())}},c.prototype.w0=function(){var c=this.e0();this.isFullscreen()?this.v0():(c===f.ViewMode.PictureInPicture||this.j0())&&this.k0()},c.prototype.x0=function(c,u){c!==f.ViewMode.Fullscreen?c===f.ViewMode.PictureInPicture&&this.l0():this.u0(u.fullscreenElement)},c.prototype.setViewMode=function(c,u){void 0===u&&(u={}),c!==this.e0()&&(this.w0(),this.isViewModeAvailable(c)&&this.x0(c,u))},c.prototype.dispose=function(){var c,u,d=this;this.MZ=(0,p.dispose)(this.MZ),_.forEach(function(c){return document.removeEventListener(c,d.t0)}),null==(c=this.currentPlayer.videoElement)||c.removeEventListener(y.MediaElementEvent.enterpictureinpicture,this.m0),null==(u=this.currentPlayer.videoElement)||u.removeEventListener(y.MediaElementEvent.leavepictureinpicture,this.n0),this.NZ()},c}()},46057:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.yieldToMain=function(){return new Promise(function(c){window.setTimeout(c)})}},19274:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.MediaElementEvent=void 0,(p=d||(u.MediaElementEvent=d={})).abort="abort",p.canplay="canplay",p.canplaythrough="canplaythrough",p.durationchange="durationchange",p.emptied="emptied",p.encrypted="encrypted",p.ended="ended",p.error="error",p.loadeddata="loadeddata",p.loadedmetadata="loadedmetadata",p.loadstart="loadstart",p.pause="pause",p.play="play",p.playing="playing",p.progress="progress",p.ratechange="ratechange",p.seeked="seeked",p.seeking="seeking",p.stalled="stalled",p.suspend="suspend",p.timeupdate="timeupdate",p.volumechange="volumechange",p.waiting="waiting",p.waitingforkey="waitingforkey",p.currenttimenotadvancing="currenttimenotadvancing",p.primestart="primestart",p.msneedkey="msneedkey",p.enterpictureinpicture="enterpictureinpicture",p.leavepictureinpicture="leavepictureinpicture",p.webkitkeymessage="webkitkeymessage",p.webkitneedkey="webkitneedkey",p.webkitkeyerror="webkitkeyerror",p.webkitkeyadded="webkitkeyadded",p.webkitplaybacktargetavailabilitychanged="webkitplaybacktargetavailabilitychanged",p.webkitpresentationmodechanged="webkitpresentationmodechanged",p.webkitcurrentplaybacktargetiswirelesschanged="webkitcurrentplaybacktargetiswirelesschanged"},96556:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.MediaElementEventHandler=void 0;var p=d(13531),h=d(4081),f=d(88844),m=d(70850),g=d(19274);u.MediaElementEventHandler=function(){function c(u,d){var p=this;this.handleVideoElementErrorEvent=function(u){if(p.Aab(u.type,u),!p.shouldSuppressEvent(u)){if(p.tab.error){u.errorObject={code:p.tab.error.code};var d=c.getMediaErrorName(p.tab.error.code);d&&(u.errorObject.mediaError=d),"msExtendedCode"in p.tab.error&&p.tab.error.msExtendedCode&&(u.errorObject.systemCode=p.tab.error.msExtendedCode.toString(16)),p.tab.error.message&&(u.errorObject.message=p.tab.error.message),u.errorMessage=Object.keys(u.errorObject).map(function(c){return c+": "+u.errorObject[c]}).join(", ")}else u.errorMessage="Video element triggered an Error, but has no error object.";p.callAllHandlers(u)}},this.handleVideoElementEvent=function(c){p.Aab(c.type),p.shouldSuppressEvent(c)||p.callAllHandlers(c)},this.sab=u,this.tab=d,this.uab={},this.vab={},this.wab=[],this.xab=!1,this.yab=!1,this.attachVideoEventHandlers()}return Object.defineProperty(c.prototype,"isAd",{get:function(){return this.xab},set:function(c){this.xab=c},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isPriming",{get:function(){return this.yab},set:function(c){this.yab=c},enumerable:!1,configurable:!0}),c.prototype.suppressEvent=function(c,u,d){var p=this;if(void 0===u&&(u=1e8),this.vab[c]=this.vab[c]||0,this.vab[c]+=u,d&&d>0){var h=window.setTimeout(function(){p.vab[c]=Math.max(p.vab[c]-u,0),p.wab.splice(p.wab.indexOf(h),1)},d);this.wab.push(h)}},c.prototype.clearEventSuppression=function(c){this.vab[c]&&(this.vab[c]=0)},c.prototype.zab=function(){var c=this;Object.keys(this.vab).forEach(function(u){return c.clearEventSuppression(u)}),this.wab.forEach(function(c){return(0,f.clearTimeoutIfDefined)(c)})},c.prototype.triggerEvent=function(c,u){void 0===u&&(u={type:c}),c===g.MediaElementEvent.error?this.handleVideoElementErrorEvent(u):this.handleVideoElementEvent(u)},c.prototype.attachVideoEventHandlers=function(){var c=this;Object.keys(g.MediaElementEvent).forEach(function(u){u===g.MediaElementEvent.error?c.tab.addEventListener(g.MediaElementEvent.error,c.handleVideoElementErrorEvent):c.tab.addEventListener(u,c.handleVideoElementEvent)})},c.prototype.removeVideoEventHandlers=function(){var c=this;Object.keys(g.MediaElementEvent).forEach(function(u){c.tab.removeEventListener(u,c.handleVideoElementEvent)}),this.tab.removeEventListener(g.MediaElementEvent.error,this.handleVideoElementErrorEvent)},c.prototype.shouldSuppressEvent=function(u){return!!this.isAd||!(!this.isPriming||!c.PRIME_RELATED_EVENTS.includes(u.type))||this.vab[u.type]>0&&(this.vab[u.type]--,!0)},c.prototype.Aab=function(c,u){var d,h;if(null!=(h=null==(d=this.sab)?void 0:d.logger)&&h.isLevelEnabled(p.LogLevel.DEBUG)){var f=this.sab.logger,m="[MediaElementEvent] ".concat(c);this.sab.settings.ENABLE_MEDIA_ELEMENT_EVENT_LOGS?u?f.debug(m,u):f.debug(m):f.isLevelEnabled(p.LogLevel.INSANE)&&(u?f.insane(m,u):f.insane(m))}},c.prototype.callAllHandlers=function(c){var u=this;this.uab[c.type]&&this.uab[c.type].forEach(function(d){u.Bab(d,c)})},c.prototype.Bab=function(c,u){var d=c.eventModification?c.eventModification(u):u;c.eventHandler.handleEvent?c.eventHandler.handleEvent(d):"function"==typeof c.eventHandler?c.eventHandler(d):this.sab.logger.debug("Encountered unknown event handler for "+u.type+": ",c.eventHandler)},c.prototype.addEventListener=function(c,u,d){this.uab[c]=this.uab[c]||[],this.uab[c].push(new v(u,d))},c.prototype.hasEventHandler=function(c,u){return!!this.uab[c]&&null!=this.uab[c].find(function(c){return c.eventHandler===u})},c.prototype.removeEventListener=function(c,u){this.uab[c]&&(this.uab[c]=this.uab[c].filter(function(c){return c.eventHandler!==u}))},c.prototype.reset=function(){this.zab()},c.prototype.dispose=function(){this.reset(),this.removeVideoEventHandlers(),this.uab=null},c.getMediaErrorName=function(c){if("MediaError"in h.default){for(var u in MediaError)if(u.indexOf("MEDIA_ERR_")>-1&&MediaError[u]===c)return u}return null},c.PRIME_RELATED_EVENTS=[g.MediaElementEvent.play,g.MediaElementEvent.playing,g.MediaElementEvent.pause,g.MediaElementEvent.timeupdate],c}();var v=function(c,u){this.eventHandler=c,u&&m.Util.isFunction(u)&&(this.eventModification=u)}},26225:function(c,u,d){var p=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.MediaElementWrapper=void 0;var h=d(56481),f=d(13531),m=d(51072),g=d(88844),v=d(19274),y=d(96556),b=d(97583);u.MediaElementWrapper=function(){function c(c,u){this.element=u,this.context=c,this.mediaElementEventHandler=new y.MediaElementEventHandler(c,u),this.nativeMediaEventListener=new b.NativeMediaEventListener(c,this),this.drmHandler=null}return Object.defineProperty(c.prototype,"audioTracks",{get:function(){return this.element.audioTracks},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"buffered",{get:function(){return this.element.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"currentSrc",{get:function(){return this.element.currentSrc},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"duration",{get:function(){return this.element.duration},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"ended",{get:function(){return this.element.ended},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"error",{get:function(){return this.element.error},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"mediaKeys",{get:function(){return this.element.mediaKeys},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"msKeys",{get:function(){return this.element.msKeys},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"paused",{get:function(){return this.element.paused},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"networkState",{get:function(){return this.element.networkState},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"played",{get:function(){return this.element.played},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"readyState",{get:function(){return this.element.readyState},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"seekable",{get:function(){return this.element.seekable},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"seeking",{get:function(){return this.element.seeking},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"style",{get:function(){return this.element&&this.element.style},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"textTracks",{get:function(){return this.element.textTracks},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"videoTracks",{get:function(){return this.element.videoTracks},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"firstChild",{get:function(){return this.element.firstChild},enumerable:!1,configurable:!0}),c.prototype.SU=function(c){for(var u,d=[],h=1;h<arguments.length;h++)d[h-1]=arguments[h];this.context.settings.ENABLE_MEDIA_ELEMENT_ACTION_LOGS&&this.context.logger.isLevelEnabled(f.LogLevel.DEBUG)&&(u=this.context.logger).debug.apply(u,p(["[MediaElementAction] ".concat(c)],d,!1))},Object.defineProperty(c.prototype,"autoplay",{get:function(){return this.element.autoplay},set:function(c){this.SU("set 'autoplay'",c),this.element.autoplay=c},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"controls",{get:function(){return this.element.controls},set:function(c){this.SU("set 'controls'",c),this.element.controls=c},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"crossOrigin",{get:function(){return this.element.crossOrigin},set:function(c){this.SU("set 'crossOrigin'",c),this.element.crossOrigin=c},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"currentTime",{get:function(){var c,u;return null!=(u=null==(c=this.element)?void 0:c.currentTime)?u:0},set:function(c){this.SU("set 'currentTime'",c),this.element.currentTime=c},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"innerHTML",{get:function(){return this.element.innerHTML},set:function(c){this.element.innerHTML=c},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"muted",{get:function(){return this.context.settings.ENABLE_MUTED_BACKGROUND_PLAYBACK?this.element&&0===this.element.volume:this.element&&this.element.muted},set:function(c){if(this.context.settings.ENABLE_MUTED_BACKGROUND_PLAYBACK){if(c){var u=this.volume;this.volume=0,this.nativeMediaEventListener.lastKnownState.volume=u}else this.volume=this.nativeMediaEventListener.lastKnownState.volume;this.SU("set 'muted'",!1),this.nativeMediaEventListener.lastKnownState.muted=c,this.element.muted=!1}else this.SU("set 'muted'",c),this.nativeMediaEventListener.lastKnownState.muted=c,this.element.muted=c},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"preload",{get:function(){return this.element.preload},set:function(c){this.SU("set 'preload'",c),this.element.preload=c},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"src",{get:function(){return this.element.src},set:function(c){this.SU("set 'src'",c),this.nativeMediaEventListener.reset(),this.element.src=c},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"srcObject",{get:function(){return this.element.srcObject},set:function(c){this.SU("set 'srcObject'",c),this.nativeMediaEventListener.reset(),this.element.srcObject=c},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"playbackRate",{get:function(){return this.element.playbackRate},set:function(c){this.SU("set 'playbackRate'",c);try{this.element.playbackRate=c}catch{this.context.logger.log("Browser rejected to set playback rate to "+c)}},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"volume",{get:function(){var c;return(null==(c=this.nativeMediaEventListener)?void 0:c.lastKnownState.muted)===!0&&this.context.settings.ENABLE_MUTED_BACKGROUND_PLAYBACK?this.nativeMediaEventListener.lastKnownState.volume:this.element.volume},set:function(c){this.SU("set 'volume'",c),this.nativeMediaEventListener.lastKnownState.volume=c,this.element.volume=c},enumerable:!1,configurable:!0}),c.prototype.addTextTrack=function(c,u,d){return this.SU("addTextTrack()",c,u,d),this.element.addTextTrack(c,u,d)},c.prototype.canPlayType=function(c,u){return this.element.canPlayType(c,u)},c.prototype.load=function(){this.SU("load()"),this.element.load()},c.prototype.pause=function(){this.SU("pause()"),this.element&&this.element.pause()},c.prototype.play=function(){return this.internalPlay()},c.prototype.internalPlay=function(){return this.SU("play()"),this.element.play()||m.PlayPromise.new(this.context,this,this.drmHandler)},c.prototype.prime=function(){var c=this;this.SU("prime()");var u=function(u){c.mediaElementEventHandler&&(c.mediaElementEventHandler.isPriming=u)};return u(!0),this.mediaElementEventHandler.triggerEvent(v.MediaElementEvent.primestart),this.internalPrime().then(function(){u(!1)})},c.prototype.internalPrime=function(){this.internalPlay().catch(function(){}),this.pause();var c=this.getWrappedElement();return new Promise(function(u){var d=window.setTimeout(function(){c.removeEventListener(v.MediaElementEvent.pause,p),u()},100),p=function(){(0,g.clearTimeoutIfDefined)(d),c.removeEventListener(v.MediaElementEvent.pause,p),u()};c.addEventListener(v.MediaElementEvent.pause,p)})},c.prototype.setMediaKeys=function(c){return this.SU("setMediaKeys()",c),this.element&&this.element.setMediaKeys(c)||Promise.resolve()},c.prototype.msSetMediaKeys=function(c){return this.SU("msSetMediaKeys()",c),this.element&&this.element.msSetMediaKeys(c)},c.prototype.msSetMediaProtectionManager=function(c){this.SU("msSetMediaProtectionManager()",c),this.element.msSetMediaProtectionManager(c)},c.prototype.getAttribute=function(c){return this.element.getAttribute(c)},c.prototype.setAttribute=function(c,u){this.SU("setAttribute()",c,u),this.element.setAttribute(c,u)},c.prototype.removeAttribute=function(c){this.SU("removeAttribute()",c),this.element.removeAttribute(c)},c.prototype.hasAttribute=function(c){return this.element.hasAttribute(c)},c.prototype.appendChild=function(c){this.element.appendChild(c)},c.prototype.removeChild=function(c){return this.element.removeChild(c)},c.prototype.getElementsByTagName=function(c){return this.element.getElementsByTagName(c)},c.prototype.addEventListener=function(c,u,d){this.mediaElementEventHandler.addEventListener(c,u,d)},c.prototype.removeEventListener=function(c,u){this.mediaElementEventHandler&&this.mediaElementEventHandler.removeEventListener(c,u)},Object.defineProperty(c.prototype,"eventHandler",{get:function(){return this.mediaElementEventHandler},enumerable:!1,configurable:!0}),c.prototype.getWrappedElement=function(){return this.element},c.prototype.dispose=function(){this.mediaElementEventHandler=(0,h.dispose)(this.mediaElementEventHandler),this.nativeMediaEventListener=(0,h.dispose)(this.nativeMediaEventListener),this.drmHandler=null,this.element=null,this.context.logger&&this.context.logger.debug("Disposed wrapped element")},c}()}
14,97583:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.NativeMediaEventListener=void 0;var p=d(80813),h=d(3714),f=d(94685),m=d(19274);u.NativeMediaEventListener=function(){function c(c,u){var d,f,m,g,v,y,b=this;this.context=c,this.Eab=function(){var c=b.Cab.volume,u=b.Cab.muted;b.lastKnownState.muted!==u&&(u?b.Hab(h.PlayerEvent.Muted,{issuer:"media-element"}):b.Hab(h.PlayerEvent.Unmuted,{issuer:"media-element"}),b.lastKnownState.muted=u),b.lastKnownState.volume!==c&&(b.Hab(h.PlayerEvent.VolumeChanged,{issuer:"media-element",targetVolume:100*c,sourceVolume:100*b.lastKnownState.volume}),b.lastKnownState.volume=c)},this.Fab=function(){var c=b.Cab.playbackRate;b.context.serviceManager.maybeCall(p.ServiceName.PlayerStateService,function(u){u.playbackSpeed!==c&&u.setPlaybackSpeed(c)})},this.Gab=function(){b.lastKnownState.canPlay||(b.lastKnownState.canPlay=!0,b.Hab(h.PlayerEvent.Ready))},this.Cab=u,this.lastKnownState={muted:null!=(m=null==(f=null==(d=c.config)?void 0:d.playback)?void 0:f.muted)?m:u.muted,volume:null!=(y=null==(v=null==(g=c.config)?void 0:g.playback)?void 0:v.volume)?y:u.volume,playbackRate:u.playbackRate,canPlay:!1},this.Dab()}return c.prototype.Dab=function(){this.Cab.addEventListener(m.MediaElementEvent.volumechange,this.Eab),this.Cab.addEventListener(m.MediaElementEvent.canplay,this.Gab),this.Cab.addEventListener(m.MediaElementEvent.ratechange,this.Fab)},c.prototype.Hab=function(c,u){(0,f.isContextAvailable)(this.context)&&this.context.eventHandler&&this.context.eventHandler.dispatchEvent(c,u)},c.prototype.Iab=function(){this.Cab.removeEventListener(m.MediaElementEvent.volumechange,this.Eab),this.Cab.removeEventListener(m.MediaElementEvent.canplay,this.Gab),this.Cab.removeEventListener(m.MediaElementEvent.ratechange,this.Fab)},c.prototype.reset=function(){this.lastKnownState.canPlay=!1},c.prototype.dispose=function(){this.Iab()},c}()},79186:function(c,u,d){var p,h,f,m=this&&this.__extends||(h=function(c,u){return(h=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}h(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.VideoElementWrapper=void 0;var g,v=d(44468),y=d(26225);(p=g||(g={})).Inline="inline",p.PictureInPicture="picture-in-picture",p.Fullscreen="fullscreen";var b=((f={})[g.Inline]=v.ViewMode.Inline,f[g.PictureInPicture]=v.ViewMode.PictureInPicture,f[g.Fullscreen]=v.ViewMode.Fullscreen,f);u.VideoElementWrapper=function(c){function u(u,d){return c.call(this,u,d)||this}return m(u,c),Object.defineProperty(u.prototype,"droppedVideoFrames",{get:function(){var c,u;return null!=(u=null!=(c=this.element.droppedVideoFrames)?c:this.element.webkitDroppedFrameCount)?u:0},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"videoWidth",{get:function(){return this.element&&this.element.videoWidth||0},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"videoHeight",{get:function(){return this.element&&this.element.videoHeight||0},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"webkitKeys",{get:function(){return this.element.webkitKeys},enumerable:!1,configurable:!0}),u.prototype.webkitGenerateKeyRequest=function(c,u){this.element.webkitGenerateKeyRequest(c,u)},Object.defineProperty(u.prototype,"width",{get:function(){return this.element.width},set:function(c){this.element.width=c},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"height",{get:function(){return this.element.height},set:function(c){this.element.height=c},enumerable:!1,configurable:!0}),u.prototype.webkitAddKey=function(c,u,d,p){this.element.webkitAddKey(c,u,d,p)},u.prototype.webkitEnterFullScreen=function(){this.element.webkitEnterFullScreen()},u.prototype.webkitExitFullscreen=function(){this.element.webkitExitFullscreen()},u.prototype.webkitShowPlaybackTargetPicker=function(){return this.element.webkitShowPlaybackTargetPicker()}
14,Object.defineProperty(u.prototype,"webkitDisplayingFullscreen",{get:function(){var c;return null!=(c=this.element.webkitDisplayingFullscreen)&&c},enumerable:!1,configurable:!0}),u.prototype.getViewModeFromPresentationMode=function(){return b[this.element.webkitPresentationMode]||(document.pictureInPictureElement===this.element?v.ViewMode.PictureInPicture:v.ViewMode.Inline)},u.prototype.getVideoPlaybackQuality=function(){var c,u;return null==(u=(c=this.element).getVideoPlaybackQuality)?void 0:u.call(c)},Object.defineProperty(u.prototype,"disableRemotePlayback",{set:function(c){this.element.disableRemotePlayback=c},enumerable:!1,configurable:!0}),u.prototype.isPictureInPictureAvailable=function(){if(!this.element)return!1;var c="function"==typeof this.element.webkitSupportsPresentationMode&&this.element.webkitSupportsPresentationMode(g.PictureInPicture)&&"function"==typeof this.element.webkitSetPresentationMode&&!/iP(hone|od)/i.test(navigator.userAgent),u="function"==typeof this.element.requestPictureInPicture&&"function"==typeof document.exitPictureInPicture&&document.pictureInPictureEnabled;return c||u},u.prototype.isPictureInPicture=function(){return!!this.isPictureInPictureAvailable()&&(this.element.webkitPresentationMode===g.PictureInPicture||document.pictureInPictureElement===this.element)},u.prototype.isAirplayActive=function(){return!!this.element.webkitCurrentPlaybackTargetIsWireless},u.prototype.enterPictureInPicture=function(){var c=this;this.isPictureInPictureAvailable()&&(this.element.webkitSetPresentationMode?this.element.webkitSetPresentationMode(g.PictureInPicture):this.element.requestPictureInPicture&&this.element.requestPictureInPicture().catch(function(u){c.context.logger.debug("Request for PiP failed",u)}))},u.prototype.exitPictureInPicture=function(){var c=this;this.isPictureInPicture()&&(this.element.webkitPresentationMode===g.PictureInPicture?this.element.webkitSetPresentationMode(g.Inline):document.pictureInPictureElement===this.element&&document.exitPictureInPicture().catch(function(u){c.context.logger.debug("Exiting of PiP failed",u)}))},u.prototype.webkitSetMediaKeys=function(c){this.element.webkitSetMediaKeys(c)},u}(y.MediaElementWrapper)},85902:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.VideoElementWrapperFactory=void 0;var p=d(88052),h=d(62756),f=d(7387),m=d(21513),g=d(15487),v=d(96907),y=d(76253),b=d(79186);function S(c,u){return{casUse:c,getConstructor:u}}var _=[S(function(){return(0,g.isSafari15orIOS15)()},function(){return v.Safari15VideoElementWrapper}),S(function(){return(0,m.getCapabilities)()[f.CapabilityKey.isSafari]},function(){return y.SafariVideoElementWrapper}),S(function(){return(0,m.getCapabilities)()[f.CapabilityKey.isWpeWebKit]&&p.ModuleManager.has(h.ModuleName.Wpe)},function(){return p.ModuleManager.get(h.ModuleName.Wpe).WpeVideoElementWrapper}),S(function(){return(0,m.getCapabilities)()[f.CapabilityKey.isTizen]&&p.ModuleManager.has(h.ModuleName.Tizen)},function(){return p.ModuleManager.get(h.ModuleName.Tizen).TizenVideoElementWrapper}),S(function(){return(0,m.getCapabilities)()[f.CapabilityKey.isWebOS]&&p.ModuleManager.has(h.ModuleName.Webos)},function(){return p.ModuleManager.get(h.ModuleName.Webos).WebosVideoElementWrapper}),S(function(){return(0,m.getCapabilities)()[f.CapabilityKey.isVidaa]&&p.ModuleManager.has(h.ModuleName.Vidaa)},function(){return p.ModuleManager.get(h.ModuleName.Vidaa).VidaaVideoElementWrapper}),S(function(){return(0,m.getCapabilities)()[f.CapabilityKey.isPlayStation5]&&p.ModuleManager.has(h.ModuleName.PlayStation5)},function(){return p.ModuleManager.get(h.ModuleName.PlayStation5).PlayStation5VideoElementWrapper}),S(function(){return(0,m.getCapabilities)()[f.CapabilityKey.isPlayStation4]&&p.ModuleManager.has(h.ModuleName.PlayStation4)},function(){return p.ModuleManager.get(h.ModuleName.PlayStation4).PlayStation4VideoElementWrapper})];u.VideoElementWrapperFactory=function(){function c(){}return c.createWrappedVideoElement=function(c,u){var d,p;if(u&&u.nodeName&&"video"===u.nodeName.toLowerCase())return new(null!=(p=null==(d=_.find(function(c){return(0,c.casUse)()}))?void 0:d.getConstructor())?p:b.VideoElementWrapper)(c,u)},c}()}
vendor: 4,198 bytes, line 14
14,50239:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.CurrentTimeCache=void 0;var p=d(19274);u.CurrentTimeCache=function(){function c(c){var u=c.eventHandler,d=c.getVideoElementCurrentTime,h=this;this.Ghb=function(){h.Dhb=h.Ehb(),h.Fhb.addEventListener(p.MediaElementEvent.timeupdate,h.reset),h.Fhb.addEventListener(p.MediaElementEvent.playing,h.reset)},this.reset=function(){h.Fhb.removeEventListener(p.MediaElementEvent.timeupdate,h.reset),h.Fhb.removeEventListener(p.MediaElementEvent.playing,h.reset),h.Hhb()},this.Fhb=u,this.Ehb=d,this.Fhb.addEventListener(p.MediaElementEvent.primestart,this.Ghb)}return c.prototype.Hhb=function(){this.Dhb=void 0},c.prototype.get=function(){return void 0!==this.Dhb?this.Dhb:this.Ehb()},c.prototype.dispose=function(){this.Fhb.removeEventListener(p.MediaElementEvent.primestart,this.Ghb),this.Fhb.removeEventListener(p.MediaElementEvent.timeupdate,this.reset),this.Fhb.removeEventListener(p.MediaElementEvent.playing,this.reset),this.Hhb()},c}()},11103:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.CurrentTimeObserver=u.MIN_CURRENT_TIME_PROGRESSION=void 0;var p=d(88844),h=d(19274);u.MIN_CURRENT_TIME_PROGRESSION=.01;var f=function(){function c(c,u){var d=this;this.context=c,this.videoElement=u,this.Uab=!1,this.gbb=Date.now(),this.hbb=0,this.ibb=function(){!d.context.isDisposed&&d.videoElement&&(d.videoElement.paused||d.videoElement.seeking||Date.now()-d.gbb>1e3&&(d.hbb++,d.nbb()))},this.jbb=function(){d.Uab=!1,(0,p.clearIntervalIfDefined)(d.Tab),d.Tab=void 0},this.kbb=function(){d.Uab=!0,(0,p.clearIntervalIfDefined)(d.Tab),d.Tab=window.setInterval(d.ibb,250)},this.lbb=function(){d.hbb++},this.mbb=function(){if(d.gbb=Date.now(),!d.videoElement.paused&&!d.videoElement.seeking){d.Uab=!0;var c=d.videoElement.currentTime;c===d.Vab?d.hbb++:(d.hbb=0,d.Vab=c)}},this.videoElement.addEventListener(h.MediaElementEvent.pause,this.jbb),this.videoElement.addEventListener(h.MediaElementEvent.playing,this.kbb),this.videoElement.addEventListener(h.MediaElementEvent.timeupdate,this.mbb),this.videoElement.addEventListener(h.MediaElementEvent.waiting,this.lbb),this.Tab=window.setInterval(this.ibb,250)}return c.prototype.dispose=function(){(0,p.clearIntervalIfDefined)(this.Tab),this.videoElement.removeEventListener(h.MediaElementEvent.pause,this.jbb),this.videoElement.removeEventListener(h.MediaElementEvent.playing,this.kbb),this.videoElement.removeEventListener(h.MediaElementEvent.timeupdate,this.mbb),this.videoElement.removeEventListener(h.MediaElementEvent.waiting,this.lbb)},c.prototype.reset=function(){this.hbb=0,this.Uab=!1,this.gbb=Date.now()},c.prototype.maybePokeVideoElement=function(){var c=this.videoElement.currentTime,d=this.videoElement.duration;d>0&&c>=d?(this.context.logger.debug("[".concat(this.logPrefix,"] Playback has stalled at the end of the stream. Trying to recover...")),this.videoElement.dispatchEvent(new Event(h.MediaElementEvent.ended))):(this.context.logger.debug("[".concat(this.logPrefix,"] Video element is stuck. Trying to recover...")),this.setCurrentTime(c+u.MIN_CURRENT_TIME_PROGRESSION))},c.prototype.setCurrentTime=function(c){try{this.videoElement.currentTime=c}catch(u){this.context.logger.debug("[".concat(this.logPrefix,"] Failed to set currentTime on video element to ").concat(c),u)}},c.prototype.nbb=function(){this.hbb<=12||(this.hbb=0,this.Uab?(this.context.logger.debug("[".concat(this.logPrefix,"] currentTime is not progressing from ").concat(this.videoElement.currentTime)),this.maybePokeVideoElement()):this.context.logger.debug("[".concat(this.logPrefix,"] Playback is possibly stuck, but no `playing` event was emitted")))},c}();u.CurrentTimeObserver=f},96907:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});
14Object.defineProperty(u,"__esModule",{value:!0}),u.Safari15VideoElementWrapper=void 0;var f=d(19274);function m(c){return 0!==c.buffered.length&&c.getWrappedElement().currentTime>=c.buffered.start(0)}u.Safari15VideoElementWrapper=function(c){function u(u,d){var p=c.call(this,u,d)||this;return p.Pfb=-1,p.Qfb=!1,p.Rfb=!1,p.Sfb=function(){p.Pfb=p.getWrappedElement().currentTime,p.paused||(p.Qfb=!0,p.mediaElementEventHandler.suppressEvent(f.MediaElementEvent.seeked),p.mediaElementEventHandler.suppressEvent(f.MediaElementEvent.timeupdate))},p.Tfb=function(){p.Rfb=!0},p.egb=function(){m(p)&&(p.Pfb=p.getWrappedElement().currentTime,p.Qfb&&p.Rfb&&!p.getWrappedElement().seeking&&(p.Qfb=!1,p.Rfb=!1,p.mediaElementEventHandler.clearEventSuppression(f.MediaElementEvent.timeupdate),p.mediaElementEventHandler.clearEventSuppression(f.MediaElementEvent.seeked),p.mediaElementEventHandler.triggerEvent(f.MediaElementEvent.seeked),p.mediaElementEventHandler.triggerEvent(f.MediaElementEvent.timeupdate)))},p.getWrappedElement().addEventListener(f.MediaElementEvent.seeking,p.Sfb),p.getWrappedElement().addEventListener(f.MediaElementEvent.seeked,p.Tfb),p.getWrappedElement().addEventListener(f.MediaElementEvent.timeupdate,p.egb),p}return h(u,c),Object.defineProperty(u.prototype,"currentTime",{get:function(){var c=this.currentTimeCache.get();return -1===this.Pfb&&0!==c&&(this.Pfb=c),m(this)?c:Math.max(this.Pfb,0)},set:function(c){this.getWrappedElement().currentTime=c},enumerable:!1,configurable:!0}),u.prototype.load=function(){this.fgb(),c.prototype.load.call(this)},u.prototype.play=function(){return this.ended&&(this.Pfb=-1),c.prototype.play.call(this)},u.prototype.dispose=function(){this.getWrappedElement().removeEventListener(f.MediaElementEvent.seeking,this.Sfb),this.getWrappedElement().removeEventListener(f.MediaElementEvent.seeked,this.Tfb),this.getWrappedElement().removeEventListener(f.MediaElementEvent.timeupdate,this.egb),c.prototype.dispose.call(this)},u.prototype.fgb=function(){this.Pfb=-1,this.Qfb=!1,this.Rfb=!1},u}(d(76253).SafariVideoElementWrapper)},55471:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.SafariCurrentTimeObserver=void 0;var f=d(20213),m=d(15487);u.SafariCurrentTimeObserver=function(c){function u(){var u=null!==c&&c.apply(this,arguments)||this;return u.logPrefix="Safari",u}return h(u,c),u.prototype.maybePokeVideoElement=function(){var u;(this.context.internalPlayer.getStreamType()!==f.StreamType.Progressive||(0,m.isSafari)()&&(null!=(u=(0,m.getSafariVersion)().major)?u:0)>=m.SAFARI_15_MAJOR_VERSION||(0,m.isIOS)()&&(0,m.getIOSVersion)()>=m.IOS_15)&&c.prototype.maybePokeVideoElement.call(this)},u}(d(11103).CurrentTimeObserver)},76253:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.SafariVideoElementWrapper=void 0;var f=d(51072),m=d(19274),g=d(79186),v=d(50239),y=d(55471);u.SafariVideoElementWrapper=function(c){function u(u,d){var p=c.call(this,u,d)||this;return p.hgb=!1,p.onPlaying=function(){var c;p.paused||p.hgb||(p.hgb=!0,null==(c=p.mediaElementEventHandler)||c.suppressEvent(m.MediaElementEvent.playing))},p.maybeTriggerDelayedPlaying=function(){var c,u;p.hgb&&!p.paused&&!p.seeking&&p.readyState>=HTMLMediaElement.HAVE_FUTURE_DATA&&(p.hgb=!1,null==(c=p.mediaElementEventHandler)||c.clearEventSuppression(m.MediaElementEvent.playing),null==(u=p.mediaElementEventHandler)||u.triggerEvent(m.MediaElementEvent.playing))},p.ggb=new y.SafariCurrentTimeObserver(u,d),p.currentTimeCache=new v.CurrentTimeCache({eventHandler:p.eventHandler,getVideoElementCurrentTime:function(){return p.getWrappedElement().currentTime}}),p.igb(),p}return h(u,c),u.prototype.igb=function(){this.getWrappedElement().addEventListener(m.MediaElementEvent.timeupdate,this.maybeTriggerDelayedPlaying),this.getWrappedElement().addEventListener(m.MediaElementEvent.playing,this.onPlaying)},u.prototype.jgb=function(){this.getWrappedElement().removeEventListener(m.MediaElementEvent.timeupdate,this.maybeTriggerDelayedPlaying),this.getWrappedElement().removeEventListener(m.MediaElementEvent.playing,this.onPlaying)},Object.defineProperty(u.prototype,"currentTime",{get:function(){return this.currentTimeCache.get()},set:function(c){this.getWrappedElement().currentTime=c}
14,enumerable:!1,configurable:!0}),u.prototype.dispose=function(){this.ggb.dispose(),this.currentTimeCache.dispose(),this.jgb(),c.prototype.dispose.call(this)},u.prototype.load=function(){this.mediaElementEventHandler.suppressEvent(m.MediaElementEvent.playing),this.hgb=!1,this.ggb.reset(),this.currentTimeCache.reset(),c.prototype.load.call(this)},u.prototype.prime=function(){return c.prototype.prime.call(this).then(function(){return new Promise(function(c){return setTimeout(c,0)})})},u.prototype.play=function(){var c=this;this.mediaElementEventHandler.suppressEvent(m.MediaElementEvent.playing),this.mediaElementEventHandler.suppressEvent(m.MediaElementEvent.timeupdate,1);var u=this.element.play();return null==u&&(u=f.PlayPromise.new(this.context,this,this.drmHandler)),u.then(function(){return c.maybeTriggerDelayedPlaying()})},u}(g.VideoElementWrapper)}},__webpack_module_cache__={};function __nested_rspack_require_1499561__(c){var u=__webpack_module_cache__[c];if(void 0!==u)return u.exports;var d=__webpack_module_cache__[c]={exports:{}};return __webpack_modules__[c].call(d.exports,d,d.exports,__nested_rspack_require_1499561__),d.exports}__nested_rspack_require_1499561__.m=__webpack_modules__,function(){var c=[];__nested_rspack_require_1499561__.O=function(u,d,p,h){if(!d){var f=1/0;for(y=0;y<c.length;y++){d=c[y][0],p=c[y][1],h=c[y][2];for(var m=!0,g=0;g<d.length;g++)(!1&h||f>=h)&&Object.keys(__nested_rspack_require_1499561__.O).every(function(c){return __nested_rspack_require_1499561__.O[c](d[g])})?d.splice(g--,1):(m=!1,h<f&&(f=h));if(m){c.splice(y--,1);var v=p();void 0!==v&&(u=v)}}return u}h=h||0;for(var y=c.length;y>0&&c[y-1][2]>h;y--)c[y]=c[y-1];c[y]=[d,p,h]}}(),__nested_rspack_require_1499561__.d=function(c,u){for(var d in u)__nested_rspack_require_1499561__.o(u,d)&&!__nested_rspack_require_1499561__.o(c,d)&&Object.defineProperty(c,d,{enumerable:!0,get:u[d]})},__nested_rspack_require_1499561__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch{if("object"==typeof window)return window}}(),__nested_rspack_require_1499561__.o=function(c,u){return Object.prototype.hasOwnProperty.call(c,u)},__nested_rspack_require_1499561__.r=function(c){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})},__nested_rspack_require_1499561__.p="",function(){var c={114:0};__nested_rspack_require_1499561__.O.j=function(u){return 0===c[u]};var u=function(u,d){var p,h,f=d[0],m=d[1],g=d[2],v=0;if(f.some(function(u){return 0!==c[u]})){for(p in m)__nested_rspack_require_1499561__.o(m,p)&&(__nested_rspack_require_1499561__.m[p]=m[p]);if(g)var y=g(__nested_rspack_require_1499561__)}try{g&&!y&&(y=g(__nested_rspack_require_1499561__))}catch{}for(u&&u(d);v<f.length;v++)h=f[v],__nested_rspack_require_1499561__.o(c,h)&&c[h]&&c[h][0](),c[h]=0;return __nested_rspack_require_1499561__.O(y)},d=self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[];d.forEach(u.bind(null,0)),d.push=u.bind(null,d.push.bind(d))}();var __nested_rspack_exports__=__nested_rspack_require_1499561__(86969);return __nested_rspack_require_1499561__.O(__nested_rspack_exports__)}()})}()}(bitmovinplayerCore);var bitmovinplayerCoreExports=bitmovinplayerCore.exports,bitmovinplayerAdvertisingCore={exports:{}};!function(c){var u;self,c.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[561],{28610:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.VmapTrackingEventType=void 0,(p=d||(u.VmapTrackingEventType=d={})).BreakStart="breakstart",p.BreakEnd="breakend",p.Error="error"},45392:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.AdManifestHelper=void 0,u.pingVmapTrackingUrls=function(c,u){void 0===c&&(c=[]),c.filter(function(c){return c.type===u}).forEach(function(c){return(0,h.pingUrl)(c.url)})};var p=d(70850),h=d(95217),f=d(88457),m=d(60326),g=d(47091);u.AdManifestHelper=function(){function c(){}return c.setLoader=function(u){c.loader=u},c.setVideoLoadTimeout=function(u){c.videoLoadTimeout=u},c.setWithCredentials=function(u){c.withCredentials=u},c.setDisableStorage=function(u){c.disableStorage=u},c.downloadVastManifest=function(u){return c.domParser||(c.domParser=new DOMParser),c.loader.load(u,void 0,void 0,void 0,void 0,c.withCredentials).catch(function(){return Promise.reject({code:f.Advert
14isingModuleErrorCode.COULD_NOT_LOAD_AD_MANIFEST})}).then(function(u){if(!u.body)return Promise.reject({code:g.VastErrorCode.XML_PARSING_ERROR});var d,p=c.domParser.parseFromString(u.body,"text/xml"),h=null==(d=p.childNodes[0].childNodes[0])?void 0:d.nodeName.includes("Error"),m=p.childNodes[0].nodeName.includes("error");return p.childNodes[0].nodeName.includes("VMAP")?Promise.reject({code:f.AdvertisingModuleErrorCode.AD_TAG_TYPE_NOT_MATCHING}):void 0===h||h?Promise.reject({code:g.VastErrorCode.NO_ADS_VAST_RESPONSE}):m?Promise.reject({code:g.VastErrorCode.XML_PARSING_ERROR}):Promise.resolve({manifest:p,downloadTiming:{downloadTime:u.elapsedTime,timeToFirstByte:u.timeToFirstByte}})})},c.downloadVmapManifest=function(u){return c.loader.load(u,void 0,void 0,void 0,void 0,c.withCredentials)},c.parseAdVerifications=function(u){return c.vastClientWrapper||(c.vastClientWrapper=new m.VastClientWrapper(c.videoLoadTimeout,c.withCredentials,c.disableStorage)),c.vastClientWrapper.parseManifest(u,!1).then(function(c){return c.ads.length<1?Promise.resolve([]):Promise.resolve(c.ads.map(function(c){return{id:c.id||"adVerification-"+p.Util.generateUniqueId(),verifications:c.verifications}}))}).catch(function(c){return Promise.resolve([])})},c.xmlToString=function(c){return new XMLSerializer().serializeToString(c.documentElement)},c.toDataUri=function(c){return"data:text/xml,"+encodeURIComponent(c)},c}()},63524:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.AdPlaybackFactory=void 0;var p=d(60937),h=d(52448);u.AdPlaybackFactory=function(){function c(){}return c.create=function(c,u){var d=!1,f=function(){d=!1},m=function(c){return Promise.reject("The current ad playback has to be finished by calling ".concat(c,".done(), before a new one can be requested."))};return new(function(){function g(){}return g.prototype.requestPlayer=function(){return d?m("AdPlayerAPI"):(d=!0,Promise.resolve(h.AdPlayerFactory.createAdPlayer(c,f)))},g.prototype.requestReporter=function(){return d?m("AdPlaybackReportingAPI"):(d=!0,Promise.resolve(new p.AdPlaybackReporter(c,f)))},g.prototype.done=function(c){return void 0===c&&(c=!0),u(c)},g}())},c}()},60937:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.AdPlaybackReporter=void 0;var p=d(3714),h=d(75375),f=d(19483);u.AdPlaybackReporter=function(c,u){var d=this,m=new f.ArrayMap;this.videoElement=c.getVideoElement();var g=!1,v=function(){if(g)throw"AdPlaybackReporter is no longer usable. Request a new one."},y=this.videoElement.addEventListener;this.videoElement.addEventListener=function(c,u,p){m.add(c,u),y.apply(d.videoElement,[c,u,p])},this.started=function(u){if(v(),d.K4)throw"Ad playback is already in progress. A new one can not be started.";d.K4=u,d.L4=!1,c.hasCurrentSourcePlayedOnce()||c.fireEvent(p.PlayerEvent.Playing,{time:c.getCurrentTime(),issuer:h.ADVERTISING_ISSUER_NAME}),c.fireEvent(p.PlayerEvent.AdStarted,{ad:u})},this.paused=function(u){v(),c.fireEvent(p.PlayerEvent.Paused,{time:u,issuer:h.ADVERTISING_ISSUER_NAME})},this.resumed=function(u){v(),c.fireEvent(p.PlayerEvent.Play,{time:u,issuer:h.ADVERTISING_ISSUER_NAME}),c.fireEvent(p.PlayerEvent.Playing,{time:u,issuer:h.ADVERTISING_ISSUER_NAME})},this.timeupdate=function(u){v(),c.fireEvent(p.PlayerEvent.TimeChanged,{time:u,issuer:h.ADVERTISING_ISSUER_NAME})},this.skipped=function(){d.L4||(v(),c.fireEvent(p.PlayerEvent.AdSkipped,{ad:d.K4}),d.L4=!0,d.K4=null)},this.done=function(){return v(),m.forAll(function(c,u){d.videoElement.removeEventListener(c,u),d.videoElement.addEventListener=y}),!d.L4&&d.K4&&c.fireEvent(p.PlayerEvent.AdFinished,{ad:d.K4}),d.K4=null,u(),g=!0,Promise.resolve()}}},43255:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.AdPlayerDelegate=void 0;var h=d(40306),f=d(80813),m=d(3714),g=d(51289),v=d(90408),y=d(20213),b=d(75375),S=d(18192),_=d(94685),E=d(41138),T=d(63524),w=d(44202),P=d(65185),A=d(47091);u.AdPlayerDelegate=function(){function c(u){var d,_=u.internalPlayer,E=new w.AdPlayerStateStore(u.context,_),I=Promise.resolve(),k=!1,x=!1,C=!1,O={width:0,height:0},D=[],L=function(c){c.code===y.WarningCode.PLAYBACK_COULD_NOT_BE_STARTED&&(x=!0)};_.onInternal(m.PlayerEvent.PlayerResized,function(c){O={width:M(c.width),height:M(c.height)}});var N=function(){x=!1};this.getVideoElement=function(){return _.getVideoElement()},this.getVolume=function(){return _.isMuted()?0:_.getVolume()},this.parsePosition=function(u){var d;return d=E.hasStoredState()?E.getStoredState().contentDuration:_.getDuration(),c.parsePosition(u,d)},this.selectMediaFile=function(c){var d,p=c.every(function(c){return c.bitrate||c.minBitrate&&c.maxBitrate}),h=_.getDownloadedVideoData(),m=_.getDownloadedAudioData(),g=!!(m&&h&&h.bitrate>0),v=u.context.serviceManager.get(f.ServiceName.AdaptationService);return p&&(v||g)?U(c,[h,m],v):(d=O,h&&h.width>0?(0,P.findMediaFileByResolution)(h.width,h.height,c):(0,P.findMediaFileByResolution)(d.width,d.height,c))};var U=function(c,u,d){var p=u[0],h=u[1];return d?d.selectQualityBasedOnBitrateMeasurement(c):(0,P.findMediaFileByBitrate)(p.bitrate+h.bitrate,c)};this.metadataLoaded=function(c,u){var d={adBreak:null,downloadTiming:u};c.hasOwnProperty("scheduleTime")&&(d.adBreak=c),d.adConfig=c,_.fireEvent(m.PlayerEvent.AdManifestLoaded,d)};var F=function(){D.forEach(function(c){return _.fireEvent(m.PlayerEvent.Error,{type:m.PlayerEvent.Error,code:c.code,name:c.name,message:c.message,data:c.data,troubleShootLink:(0,g.generateTroubleshootUrl)(c.code)})})},B=function(c){if(!E.hasStoredState())return Promise.resolve();
vendor: 1,724 bytes, line 14
14var p=E.getStoredState().contentDuration,g=Promise.resolve();return k=!c,c&&(g=I=(D.length?(_.removeExternalEventFilter(H),E.clear(),_.off(m.PlayerEvent.Warning,L),_.off(m.PlayerEvent.Playing,N),_.unload().then(F)):(_.fireEvent(m.PlayerEvent.RestoringContent),_.addExternalEventFilter(z),E.restore(b.ADVERTISING_RESTORE_ISSUER_NAME).then(function(c){if(_.removeExternalEventFilter(H),D.length)throw Error("Background errors occurred during ad break");if(x)x=!1;else{if(c)return _.play(b.ADVERTISING_ISSUER_NAME).catch(function(c){C=!0,u.context.logger.debug("Unable to start playback after restoring the content after an ad break:",c)});var d=u.context.serviceManager.get(f.ServiceName.PlayerStateService);null==d||d.transitionToStoppedState()}}).catch(function(){D.length?F():_.fireEvent(m.PlayerEvent.Error,{code:h.ErrorCode.UNKNOWN})}).finally(function(){E.clear(),_.removeExternalEventFilter(z),_.off(m.PlayerEvent.Warning,L),_.off(m.PlayerEvent.Playing,N)}))).then(function(){u.restoreContentDeferred&&u.restoreContentDeferred.resolve()})),g.then(function(){var h=d?{adBreak:d}:void 0;_.fireEvent(m.PlayerEvent.AdBreakFinished,h),d=null,c&&(0,v.maybeFireDurationChangedEvent)(p,_.getDuration(),u.context.eventHandler),_.hasCurrentSourcePlayedOnce()||C||_.fireEvent(m.PlayerEvent.Playing,{time:_.getCurrentTime(),issuer:b.ADVERTISING_ISSUER_NAME}),C=!1})},j=[m.PlayerEvent.Error,m.PlayerEvent.SourceLoaded,m.PlayerEvent.SourceUnloaded,m.PlayerEvent.PlaybackFinished,m.PlayerEvent.Ready],H=function(c,d){var p,h=(null==(p=u.context.store.getState())?void 0:p.sources)&&Object.keys(p.sources).find(function(c){var u;return p.sources&&p.sources[c]&&(null==(u=p.sources[c].playback)?void 0:u.kind)===S.PlaybackKind.Backgroun
14d});return R(c,d)&&h&&d.sourceIdentifier===h&&D.push(d),!j.includes(c)},V=[m.PlayerEvent.Play,m.PlayerEvent.Playing,m.PlayerEvent.Seek,m.PlayerEvent.Seeked,m.PlayerEvent.TimeShift,m.PlayerEvent.TimeShifted],z=function(c){return!V.includes(c)};this.requestAdPlayback=function(c){return d?Promise.reject("Ad break already in progress"):(d=c,I.then(function(){var u=k?Promise.resolve():q(c),d={adBreak:p(p({},JSON.parse(JSON.stringify(c))),{scheduleTime:c.scheduleTime})};return _.fireEvent(m.PlayerEvent.AdBreakStarted,d),_.onInternal(m.PlayerEvent.Warning,L),_.onInternal(m.PlayerEvent.Playing,N),u.then(function(){return _.unload(b.ADVERTISING_ISSUER_NAME)}).then(function(){return T.AdPlaybackFactory.create(_,B)})}))},this.updateAdRestoreState=function(c){d&&E.setAdRestoreState(c)};var q=function(d){var p=u.context,h=p.sourceContext.sourceIdentifier,m=p.adRestorationOptimizationService,g=p.serviceManager.get(f.ServiceName.ManifestService,h),v=m&&p.settings.OPTIMIZE_AD_RESTORATION,y=c.getAdBreakDuration(d),S=d.replaceContentDuration;return E.capture(b.ADVERTISING_ISSUER_NAME),E.setAdRestoreState({adBreakDuration:y,replaceContentDuration:S}),_.addExternalEventFilter(H),v&&g&&!g.isLive()?m.optimizeRestorationAfterUpcomingAdBreak():Promise.resolve()};this.overlayAdStarted=function(c){_.fireEvent(m.PlayerEvent.OverlayAdStarted,{ad:c})},this.adClicked=function(c){_.fireEvent(m.PlayerEvent.AdClicked,{clickThroughUrl:c})},this.adInteraction=function(c,u){_.fireEvent(m.PlayerEvent.AdInteraction,{interactionType:c,id:u})},this.onQuartile=function(c){_.fireEvent(m.PlayerEvent.AdQuartile,{quartile:c})},this.onError=function(c,u,d){var p={code:c||A.VastErrorCode.UNDEFINED_ERROR};u&&(p.message=u),d&&(p.adConfig=d),_.fireEvent(m.PlayerEvent.AdError,{code:h.ErrorCode.MODULE_ADVERTISING_ERROR,data:p,name:h.ErrorCode[h.ErrorCode.MODULE_ADVERTISING_ERROR],message:u,troubleShootLink:(0,g.generateTroubleshootUrl)(h.ErrorCode.MODULE_ADVERTISING_ERROR)})},this.onWarning=function(c,u,d){_.fireEvent(m.PlayerEvent.Warning,new y.PlayerWarning(c,u,d))},this.reset=function(){var u=_.getVideoElement();k=!1,x=!1,E.clear(),_.removeExternalEventFilter(H),_.removeExternalEventFilter(z),d&&u instanceof HTMLVideoElement&&c.clearVideoElement(u),d=null}}return c.getAdBreakDuration=function(c){var u,d;return c.totalPlannedDuration??(null!=(d=null==(u=c.ads)?void 0:u.reduce(function(c,u){var d;return c+(u.isLinear&&null!=(d=u.duration)?d:0)},0))?d:0)},c.parsePosition=function(c,u){var d=Number(c);return!isNaN(d)&&d<=0&&(c="pre"),c.includes("pre")||"0%"===c?0:c.includes("post")?1/0:this.parseNumericalPosition(c,u)},c.parseNumericalPosition=function(c,u){var d;if(/%/.test(c)){if(!u)return 0/0;d=parseFloat(c=c.replace(/%/gi,""))/100*u}else if(c.indexOf(":")>-1){var p=c.split(":");d=3600*parseFloat(p[0])+60*parseFloat(p[1])+parseFloat(p[2])}else d=parseFloat(c);return d>=0?d:0/0},c.clearVideoElement=function(c){E.VideoElementUtil.removeSource(c),c.load()},c}();var I=/(\d+)/;function M(c){return Number(c.match(I)?c.match(I)[0]:0)}var R=function(c,u){return c===m.PlayerEvent.Error&&(0,_.isObject)(u)}},52448:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.AdPlayerFactory=u.DEFAULT_AD_PLAYBACK_RATE=void 0;var p=d(40306),h=d(3714),f=d(75375),m=d(19483),g=d(85434),v=d(6365),y=d(7581);u.DEFAULT_AD_PLAYBACK_RATE=1;var b=function(){function c(){}return c.createAdPlayer=function(c,d){var b,S=new m.ArrayMap,_=!1,E=!1,T=[h.PlayerEvent.Play,h.PlayerEvent.Playing],w=function(){if(E)throw"AdPlayer is no longer usable. Request a new one."};return new(function(){function m(){this.adPlaybackStartEventFilter=function(u){return!c.hasCurrentSourcePlayedOnce()||!T.includes(u)}}return m.prototype.done=function(){w();var u,p,m=Promise.resolve();return _?m=c.unload(f.ADVERTISING_ISSUER_NAME):c.hasEnded()?(u=b,c.fireEvent(h.PlayerEvent.AdFinished,{ad:u})):(p=b,c.fireEvent(h.PlayerEvent.AdSkipped,{ad:p})),b=null,S.forAll(function(u,d){c.off(u,d)}),d(),E=!0,_=!1,m},m.prototype.on=function(u,d){w(),S.add(u,d),c.onInternal(u,d)},m.prototype.pause=function(){w(),c.pause(f.ADVERTISING_ISSUER_NAME)},m.prototype.play=function(){return w(),c.play(f.ADVERTISING_ISSUER_NAME)},m.prototype.load=function(d,m){var S=this;return w(),b=d,c.addExternalEventFilter(this.adPlaybackStartEventFilter),_=!0,c.load(d.data.delivery===v.MediaFileDeliveryType.Streaming?g.MimeTypeHelper.isDash(d.data.mimeType)?{dash:d.mediaFileUrl}:{hls:d.mediaFileUrl}:{progressive:d.mediaFileUrl},void 0,m??{seeking:!0},f.ADVERTISING_ISSUER_NAME).then(function(){return c.setPlaybackSpeed(u.DEFAULT_AD_PLAYBACK_RATE)}).then(function(){return c.play(f.ADVERTISING_ISSUER_NAME).catch(function(){})}).then(function(){_&&c.fireEvent(h.PlayerEvent.AdStarted,{ad:d})}).catch(function(u){throw u&&u.code===p.ErrorCode.MODULE_MISSING?{code:y.AdvertisingModuleErrorCode.REQUIRED_PLAYER_MODULE_MISSING,message:u.data.name}
14:(c.getLogger().debug("Failed to load Ad due to error: ".concat(null==u?void 0:u.message),u),u)}).finally(function(){c.removeExternalEventFilter(S.adPlaybackStartEventFilter),_=!1})},Object.defineProperty(m.prototype,"duration",{get:function(){return w(),c.getDuration(f.ADVERTISING_ISSUER_NAME)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"currentTime",{get:function(){return w(),c.getCurrentTime(f.ADVERTISING_ISSUER_NAME)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"volume",{get:function(){return w(),c.getVolume()},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"muted",{get:function(){return w(),c.isMuted()},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"paused",{get:function(){w();var u=c.isContentPaused(),d=c.isContentPlaying();return!1===u&&!1===d||u},enumerable:!1,configurable:!0}),m}())},c}();u.AdPlayerFactory=b},44202:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)}),f=this&&this.__awaiter||function(c,u,d,p){return new(d||(d=Promise))(function(h,f){function m(c){try{v(p.next(c))}catch(c){f(c)}}function g(c){try{v(p.throw(c))}catch(c){f(c)}}function v(c){var u;c.done?h(c.value):((u=c.value)instanceof d?u:new d(function(c){c(u)})).then(m,g)}v((p=p.apply(c,u||[])).next())})},m=this&&this.__generator||function(c,u){var d,p,h,f={label:0,sent:function(){if(1&h[0])throw h[1];return h[1]},trys:[],ops:[]},m=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return m.next=g(0),m.throw=g(1),m.return=g(2),"function"==typeof Symbol&&(m[Symbol.iterator]=function(){return this}),m;function g(g){return function(v){var y=[g,v];if(d)throw TypeError("Generator is already executing.");for(;m&&(m=0,y[0]&&(f=0)),f;)try{if(d=1,p&&(h=2&y[0]?p.return:y[0]?p.throw||((h=p.return)&&h.call(p),0):p.next)&&!(h=h.call(p,y[1])).done)return h;switch(p=0,h&&(y=[2&y[0],h.value]),y[0]){case 0:case 1:h=y;break;case 4:return f.label++,{value:y[1],done:!1};case 5:f.label++,p=y[1],y=[0];continue;case 7:y=f.ops.pop(),f.trys.pop();continue;default:if(!((h=(h=f.trys).length>0&&h[h.length-1])||6!==y[0]&&2!==y[0])){f=0;continue}if(3===y[0]&&(!h||y[1]>h[0]&&y[1]<h[3])){f.label=y[1];break}if(6===y[0]&&f.label<h[1]){f.label=h[1],h=y;break}if(h&&f.label<h[2]){f.label=h[2],f.ops.push(y);break}h[2]&&f.ops.pop(),f.trys.pop();continue}y=u.call(c,f)}catch(c){y=[6,c],p=0}finally{d=h=0}if(5&y[0])throw y[1];return{value:y[0]?y[1]:void 0,done:!0}}}};Object.defineProperty(u,"__esModule",{value:!0}),u.AdPlayerStateStore=void 0;var g=d(80813),v=d(3714),y=d(44468),b=d(29488),S=d(46922),_=d(81524),E=d(18192),T=d(15487),w=d(88844),P=d(93531);u.AdPlayerStateStore=function(c){function u(){var u=null!==c&&c.apply(this,arguments)||this;return u.UI=null,u}return h(u,c),u.prototype.setAdRestoreState=function(c){this.hasStoredState()&&(this.UI=c,this.XI())},u.prototype.VI=function(){var c,u,d=null!=(u=null==(c=this.storedState)?void 0:c.sourceIdentifier)?u:this.context.sourceContext.sourceIdentifier;return this.context.serviceManager.get(g.ServiceName.SourceStoreService,d)},u.prototype.WI=function(){if(!this.storedState)return 0/0;if(!this.UI)return this.storedState.playbackPosition;var c={adBreakDuration:this.UI.adBreakDuration,isLive:this.storedState.isLive,replaceContentDuration:this.UI.replaceContentDuration,playbackPosition:this.storedState.playbackPosition,resumeLiveContentAtPreviousPosition:this.context.settings.RESUME_LIVE_CONTENT_AT_PREVIOUS_POSITION_AFTER_AD_BREAK};return this.storedState.useTimeshiftForRestore?(0,P.calculateTimeshiftRestorationPosition)(c):(0,P.calculatePlaybackRestorationPosition)(c)},u.prototype.XI=function(){var c;if(this.storedState){var u=this.WI();this.context.logger.debug("Saving content restore position: ".concat(u)),null==(c=this.VI())||c.dispatch((0,S.setBackgroun
14dPlaybackState)({kind:E.PlaybackKind.Background,position:u}))}},u.prototype.YI=function(c){var u,d,p,h,f=this,m=this.storedState;if(!m)return Promise.reject(Error("no stored state to restore playback position"));if(m.isStartup)return Promise.resolve(!0);var g=null==(d=null==(u=this.VI())?void 0:u.getState())?void 0:d.playback;if(!g)return Promise.reject(Error("no playback state available to restore playback position"));var b=(0,_.getPlaybackPosition)(g);if(m.useTimeshiftForRestore)return this.internalPlayer.timeShift(b,c),Promise.resolve(!0);var S=(null==(p=this.context.renderer)?void 0:p.getDuration())||(null==(h=this.context.videoElement)?void 0:h.duration)||m.contentDuration||b;return b>=S?Promise.resolve(!1):new Promise(function(u,d){var p,h=function(){(0,w.clearTimeoutIfDefined)(p),f.internalPlayer.off(v.PlayerEvent.Seeked,m),f.internalPlayer.off(v.PlayerEvent.Error,g)},m=function(){h(),u(!0)},g=function(){h(),d(Error("Error during playback restoration"))};f.internalPlayer.onInternal(v.PlayerEvent.Seeked,m),f.internalPlayer.onInternal(v.PlayerEvent.Error,g),f.internalPlayer.getPlayerType()===y.PlayerType.Native&&((0,T.isWebOS)()||(0,T.isPlayStation4)())&&(p=window.setTimeout(m,5e3)),f.internalPlayer.seek(b,c)||m()})},u.prototype.restore=function(c){return f(this,void 0,void 0,function(){var u,d,p;return m(this,function(h){switch(h.label){case 0:if(!(u=this.storedState))throw Error("no stored state to restore");if(!u.source)throw Error("stored state has no source to restore");return[4,this.loadSource(c)];case 1:return h.sent(),this.restoreBaseState(u),[4,this.YI(c)];case 2:return d=h.sent(),this.restoreSubtitles(u.subtitles),null==(p=this.VI())||p.dispatch((0,S.setMainContentPlaybackState)({kind:E.PlaybackKind.MainContent})),this.clear(),[2,d]}})})},u.prototype.clear=function(){c.prototype.clear.call(this),this.UI=null},u}(b.PlayerStateStore)},95217:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.AdTrackingEvent=void 0,u.pingUrl=function(c){new Image().src=c},(p=d||(u.AdTrackingEvent=d={})).FirstQuartile="firstQuartile",p.Midpoint="midpoint",p.ThirdQuartile="thirdQuartile"},90176:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.AdvertisingController=u.adTagPlaceholderDefaults=void 0,u.applyModuleSpecificConfig=I,u.createPlayerAdvertisingApi=M;var p=d(4224),h=d(3714),f=d(4129),m=d(29669),g=d(44468),v=d(87827),y=d(93204),b=d(94685),S=d(34841),_=d(88844),E=d(70850),T=d(88052),w=d(62756),P=d(45392),A={videoLoadTimeout:d(6365).DEFAULT_VIDEO_LOAD_TIMEOUT,strategy:{shouldLoadAdBreak:function(){return!0},shouldPlayAdBreak:function(){return!0},shouldPlaySkippedAdBreaks:function(c){var u=Math.max.apply(Math,c.map(function(c){return c.scheduleTime}));return[c.find(function(c){return c.scheduleTime===u})]}}};
14function I(c,u,d){T.ModuleManager.get(w.ModuleName.Advertising).bitmovinMarker?(d.debug("Using Bitmovin Advertising Module"),c.playback&&Array.isArray(c.playback.preferredTech)?u.preferredTechnology=c.playback.preferredTech:u.preferredTechnology=[]):T.ModuleManager.get(w.ModuleName.Advertising).imaMarker&&(d.debug("Using IMA Advertising Module"),u.sdkUrl||(u.sdkUrl=c.location.google_ima))}function M(c,u){return new(function(){function d(){}return d.prototype.schedule=function(u){return c.scheduleAd(u)},d.prototype.skip=function(){return u.skip()},d.prototype.list=function(){return u.list()},d.prototype.getActiveAdBreak=function(){return u.getActiveAdBreak()},d.prototype.getActiveAd=function(){return u.getActiveAd()},d.prototype.discardAdBreak=function(c){u.discardAdBreak(c)},d.prototype.isLinearAdActive=function(){return u.isLinearAdActive()},d.prototype.getModuleInfo=function(){return u.getModuleInfo()},d}())}function R(c){return!!c.position}u.adTagPlaceholderDefaults={playbackTime:["[CONTENTPLAYHEAD]"],height:["[HEIGHT]"],width:["[WIDTH]"],domain:["[DOMAIN]"],page:["[SITE]"],referrer:["[REFERRER]"],random:["[random]","[CACHEBUSTING]"],timestamp:["[TIMESTAMP]"]},u.AdvertisingController=function(){function c(c,u){var d,v,y,b,S,_=this;this.context=u,this.Yb=function(c){_.Ob.isCastingToCAF()||_.Ub.onTimeChanged(c.time)},this.Zb=function(c){return _.Ub.onSeek(c.position,c.seekTarget)},this.ab=function(c){return _.Xb=c.position},this.bb=function(){return _.Zb({position:_.Xb,seekTarget:_.Ob.getCurrentTime()})},this.cb=function(c){_.Tb&&c.code===p.WarningCode.PLAYBACK_COULD_NOT_BE_STARTED&&(_.Tb=!1)},this.onVolumeChanged=function(c){return _.Ub.onVolumeChanged(c)},this.db=function(){_.Qb.length>0&&_.fb(_.Qb.splice(0,_.Qb.length)),_.Ob.off(h.PlayerEvent.SourceLoaded,_.db)},this.onPlayerResize=function(c,u){_.Ub.onResize(c,u,_.Ob.getViewMode()===g.ViewMode.Fullscreen)};var T=c.getConfig(!0);this.Pb=T.advertising||{},this.Ob=c,this.Qb=[],this.Rb=null,this.Sb=!0,this.Tb=!1;var w=(d=this.Pb,b={},S={},E.Util.deepCopy(S,d),delete S.adBreaks,E.Util.deepCopyMulti(b,A,S),b.hasOwnProperty("withCredentials")||(b.withCredentials=!0),b.hasOwnProperty("disableStorageApi")||(b.disableStorageApi=null!=(y=null==(v=T.storage)?void 0:v.disableStorageApi)&&y),b);P.AdManifestHelper.setLoader(new f.DefaultContentLoader(u,{requestType:m.HttpRequestType.MANIFEST_ADS})),P.AdManifestHelper.setVideoLoadTimeout(w.videoLoadTimeout),P.AdManifestHelper.setWithCredentials(w.withCredentials),P.AdManifestHelper.setDisableStorage(w.disableStorageApi),I(T,w,u.logger),this.createAdvertisingModule(w),this.Pb.adBreaks&&this.Pb.adBreaks.length>0&&this.Pb.adBreaks.splice(0).forEach(function(c){return _.scheduleAd(c).catch(function(c){return _.context.logger.warn(c)})}),this.Ob.on(h.PlayerEvent.TimeChanged,this.Yb),this.Ob.on(h.PlayerEvent.Seek,this.Zb),this.Ob.on(h.PlayerEvent.Warning,this.cb),this.Ob.on(h.PlayerEvent.TimeShift,this.ab),this.Ob.on(h.PlayerEvent.TimeShifted,this.bb),this.playerAdvertisingApi=M(this,this.Ub)}return c.prototype.createAdvertisingModule=function(c){this.Wb={internalPlayer:this.Ob,context:this.context,restoreContentDeferred:null};
14var u=T.ModuleManager.get(w.ModuleName.AdvertisingCore),d=T.ModuleManager.get(w.ModuleName.Advertising),p=new u.AdPlayerDelegate(this.Wb);this.Ub=new d(p,c),this.Vb=p},c.prototype.updatePlayerContext=function(c){this.context=c,this.Wb.context=c},c.prototype.initializeAdModule=function(){this.Ub.initialize()},c.prototype.scheduleAd=function(c){return R(c)&&(c.discardAfterPlayback=!1!==c.discardAfterPlayback,this.eb(c)&&!this.hb())?(this.Qb.push(c),this.Rb||(this.Rb=new S.Deferred,this.Ob.on(h.PlayerEvent.SourceLoaded,this.db)),this.Rb.promise):this.gb(c)},c.prototype.eb=function(c){return c.position.includes("%")&&"0%"!==c.position},c.prototype.fb=function(c){var u=this,d=c.map(function(c){return u.gb(c)});this.Rb&&Promise.all(d).then(function(c){var d=[].concat.apply([],c);u.Rb.resolve(d),u.Rb=null}).catch(function(c){return u.context.logger.warn(c)})},c.prototype.gb=function(c){return R(c)&&this.Ob.isLive()&&this.eb(c)?Promise.reject("percentage based ad break positions can not be used for live streams"):this.Ub.schedule(c)},c.prototype.playPreRollAds=function(){var c,u,d=this,p=Promise.resolve();return this.Tb=!0,this.Sb&&null!=(u=null==(c=this.context)?void 0:c.videoElement)&&u.prime&&(p=this.context.videoElement.prime()),Promise.resolve(this.Ub.beforeContent()).catch(function(c){(0,b.isContextAvailable)(d.context)&&d.context.logger.debug("Failed to trigger preroll ad playback: ",c)}).then(function(){return p}).catch(function(c){(0,b.isContextAvailable)(d.context)&&d.context.logger.debug("Failed to prime video element: ",c)})},c.prototype.playPostRollAds=function(){var c=this,u=!1,d=function(){u=!0,c.Ob.off(h.PlayerEvent.AdBreakStarted,d)};return this.Ob.on(h.PlayerEvent.AdBreakStarted,d),this.Wb.restoreContentDeferred=new S.Deferred,Promise.resolve(this.Ub.afterContent()).then(function(){return new Promise(function(d,p){if(u){var h,f=function(){c.Wb.restoreContentDeferred.promise.then(d).catch(p),m(),(0,_.clearTimeoutIfDefined)(h)},m=(0,y.subscribe)(c.context.store)(function(c){return(0,v.getIsStopped)((0,v.getPlayerState)(c))},f,function(c){return c});h=window.setTimeout(f,1e3)}else d()})}).then(function(){return c.Wb.restoreContentDeferred=null}).catch(function(u){c.Wb.restoreContentDeferred=null,c.context.logger.debug(u)})},c.prototype.hasAlreadyRequestedPreRollAds=function(){return this.Tb},c.prototype.play=function(){return this.Ub.resume(),Promise.resolve()},c.prototype.pause=function(){this.Ub.pause()},c.prototype.getCurrentTime=function(){var c,u=null==(c=this.Ub)?void 0:c.currentTime();return isNaN(u)?0:u??0},c.prototype.getDuration=function(){return this.Ub.duration()},c.prototype.isLinearAdActive=function(){return this.Ub.isLinearAdActive()},c.prototype.isPlaying=function(){return this.Ub.isLinearAdActive(!0)},c.prototype.isPaused=function(){return this.isLinearAdActive()&&!this.isPlaying()},c.prototype.hb=function(){return this.Ob.getDuration()>0},c.prototype.reset=function(){return this.Qb=[],this.Tb=!1,this.Vb.reset(),this.Ub.reset()},c.prototype.dispose=function(){this.Ob.off(h.PlayerEvent.TimeChanged,this.Yb),this.Ob.off(h.PlayerEvent.Seek,this.Zb),this.Ob.off(h.PlayerEvent.Warning,this.cb),this.Ob.off(h.PlayerEvent.TimeShift,this.ab),this.Ob.off(h.PlayerEvent.TimeShifted,this.bb),this.Ob=null,this.Pb=null,this.Ub.dispose(),this.Ub=null,this.Vb=null},c}()},28412:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.AdvertisingModule=void 0,u.AdvertisingModule=function(c,u){this.player=c,this.config=u}},88457:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.AdvertisingModuleErrorCode=void 0,(p=d||(u.AdvertisingModuleErrorCode=d={}))[p.AD_TAG_TYPE_NOT_MATCHING=110]="AD_TAG_TYPE_NOT_MATCHING",p[p.COULD_NOT_LOAD_AD_MANIFEST=404]="COULD_NOT_LOAD_AD_MANIFEST",p[p.REQUIRED_PLAYER_MODULE_MISSING=2e3]="REQUIRED_PLAYER_MODULE_MISSING"},23912:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.AdTagType=void 0,(p=d||(u.AdTagType=d={})).VAST="vast",p.VMAP="vmap",p.VPAID="vpaid"},93531:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.calculatePlaybackRestorationPosition=function(c){var u=c.adBreakDuration,d=c.isLive,p=c.playbackPosition,h=c.replaceContentDuration,f=c.resumeLiveContentAtPreviousPosition;return p+(h??(!d||f?0:u))},u.calculateTimeshiftRestorationPosition=function(c){var u=c.adBreakDuration,d=c.playbackPosition,h=c.replaceContentDuration,f=c.resumeLiveContentAtPreviousPosition?u:0;return Math.min(d-((0,p.isDefined)(h)?u-h:f),0)};var p=d(23068)},6365:function(c,u){var d,p,h;
14Object.defineProperty(u,"__esModule",{value:!0}),u.VastApiFramework=u.MediaFileDeliveryType=u.DEFAULT_OVERLAY_AD_BOTTOM_POSITION=u.DEFAULT_VIDEO_LOAD_TIMEOUT=u.NON_SKIPPABLE_IDENTIFIER=u.DEFAULT_PRELOAD_OFFSET=u.DEFAULT_AD_BREAK_POSITION=void 0,u.DEFAULT_AD_BREAK_POSITION="pre",u.DEFAULT_PRELOAD_OFFSET=0,u.NON_SKIPPABLE_IDENTIFIER=-1,u.DEFAULT_VIDEO_LOAD_TIMEOUT=8e3,u.DEFAULT_OVERLAY_AD_BOTTOM_POSITION="4.5em",(h=d||(u.MediaFileDeliveryType=d={})).Progressive="progressive",h.Streaming="streaming",(p||(u.VastApiFramework=p={})).Vpaid="vpaid"},65185:function(c,u){function d(c){return c.bitrate||(c.maxBitrate+c.minBitrate)/2}Object.defineProperty(u,"__esModule",{value:!0}),u.findMediaFileByResolution=function(c,u,d){return d.reduce(function(d,p){var h=Math.abs(c-d.width)+Math.abs(u-d.height);return Math.abs(c-p.width)+Math.abs(u-p.height)<h?p:d})},u.findMediaFileByBitrate=function(c,u){return u.reduce(function(u,p){var h=d(u),f=d(p),m=Math.abs(h-c);return Math.abs(f-c)<m?p:u})}},7581:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.VastErrorCode=u.AdvertisingModuleErrorCode=u.AdTagType=u.AdvertisingCoreModuleDefinition=void 0;var p=d(62756),h=d(43255),f=d(90176),m=d(88457);Object.defineProperty(u,"AdvertisingModuleErrorCode",{enumerable:!0,get:function(){return m.AdvertisingModuleErrorCode}});var g=d(23912);Object.defineProperty(u,"AdTagType",{enumerable:!0,get:function(){return g.AdTagType}});var v=d(47091);Object.defineProperty(u,"VastErrorCode",{enumerable:!0,get:function(){return v.VastErrorCode}}
14),u.AdvertisingCoreModuleDefinition={name:p.ModuleName.AdvertisingCore,module:function(){return{AdvertisingController:f.AdvertisingController,AdPlayerDelegate:h.AdPlayerDelegate}},dependencies:[p.ModuleName.XML],exports:{AdTagType:g.AdTagType,AdvertisingModuleErrorCode:m.AdvertisingModuleErrorCode,VastErrorCode:v.VastErrorCode}},u.default=u.AdvertisingCoreModuleDefinition},60326:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.VastClientWrapper=void 0;var p=d(6036),h=d(6365),f=d(47091);u.VastClientWrapper=function(){function c(c,u,d){this.lL=new p.VASTClient({allowUsingBrowserStorageApi:!d}),this.lL.vastParser.initParsingStatus(),this.mL=c||h.DEFAULT_VIDEO_LOAD_TIMEOUT,this.nL=u}return c.prototype.parseManifest=function(c,u){var d=this,p=[],h=function(c){p.push({code:c.ERRORCODE})};return this.lL.vastParser.addListener("VAST-error",h),this.lL.vastParser.parseVAST(c,{timeout:this.mL,withCredentials:this.nL,replaceUnavailableAdPodAds:!u}).catch(function(c){return d.lL.vastParser.removeListener("VAST-error",h),Promise.reject({code:c&&c.ERRORCODE||f.VastErrorCode.UNDEFINED_ERROR})}).then(function(c){var u;return d.lL.vastParser.removeListener("VAST-error",h),(null==(u=c.ads)?void 0:u.length)>0?c:p.length>0?Promise.reject(p[0]):Promise.reject({code:f.VastErrorCode.UNDEFINED_ERROR})})},c}()},47091:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.VastErrorCode=void 0,(p=d||(u.VastErrorCode=d={}))[p.XML_PARSING_ERROR=100]="XML_PARSING_ERROR",p[p.VAST_SCHEMA_VALIDATION_ERROR=101]="VAST_SCHEMA_VALIDATION_ERROR",p[p.VERSION_NOT_SUPPORTED=102]="VERSION_NOT_SUPPORTED",p[p.TRAFFICKING_ERROR=200]="TRAFFICKING_ERROR",p[p.EXPECTING_DIFFERENT_LINEARITY=201]="EXPECTING_DIFFERENT_LINEARITY",p[p.EXPECTING_DIFFERENT_DURATION=202]="EXPECTING_DIFFERENT_DURATION",p[p.EXPECTING_DIFFERENT_SIZE=203]="EXPECTING_DIFFERENT_SIZE",p[p.GENERAL_WRAPPER_ERROR=300]="GENERAL_WRAPPER_ERROR",p[p.WRAPPER_VAST_URI_TIMEOUT=301]="WRAPPER_VAST_URI_TIMEOUT",p[p.WRAPPER_LIMIT_REACHED=302]="WRAPPER_LIMIT_REACHED",p[p.NO_ADS_VAST_RESPONSE=303]="NO_ADS_VAST_RESPONSE",p[p.GENERAL_LINEAR_ERROR=400]="GENERAL_LINEAR_ERROR",p[p.FILE_NOT_FOUND=401]="FILE_NOT_FOUND",p[p.MEDIAFILE_URI_TIMEOUT=402]="MEDIAFILE_URI_TIMEOUT",p[p.NO_SUPPORTED_MEDIAFILE=403]="NO_SUPPORTED_MEDIAFILE",p[p.PROBLEM_DISPLAYING_MEDIAFILE=405]="PROBLEM_DISPLAYING_MEDIAFILE",p[p.GENERAL_NONLINEARADS_ERROR=500]="GENERAL_NONLINEARADS_ERROR",p[p.NONLINEAR_AD_INVALID_DIMENSIONS=501]="NONLINEAR_AD_INVALID_DIMENSIONS",p[p.UNABLE_TO_FETCH_NONLINEAR_RESOURCE=502]="UNABLE_TO_FETCH_NONLINEAR_RESOURCE",p[p.NO_SUPPORTED_NONLINEAR_RESOURCE_TYPE=503]="NO_SUPPORTED_NONLINEAR_RESOURCE_TYPE",p[p.GENERAL_COMPANIONADS_ERROR=600]="GENERAL_COMPANIONADS_ERROR",p[p.COMPANION_AD_INVALID_DIMENSIONS=601]="COMPANION_AD_INVALID_DIMENSIONS",p[p.UNABLE_TO_DISPLAY_REQUIRED_COMPANION=602]="UNABLE_TO_DISPLAY_REQUIRED_COMPANION",p[p.UNABLE_TO_FETCH_COMPANION_RESOURCE=603]="UNABLE_TO_FETCH_COMPANION_RESOURCE",p[p.NO_SUPPORTED_COMPANION_RESOURCE_TYPE=604]="NO_SUPPORTED_COMPANION_RESOURCE_TYPE",p[p.UNDEFINED_ERROR=900]="UNDEFINED_ERROR",p[p.GENERAL_VPAID_ERROR=901]="GENERAL_VPAID_ERROR"},5838:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.VmapExtractor=void 0;var p=d(70850),h=d(88052),f=d(62756),m=d(45392),g=d(88457),v=d(23912),y=d(6365),b=d(47091);u.VmapExtractor=function(){function c(){}return c.xml2js=function(c){return(0,h.ModuleManager.get(f.ModuleName.XML).parseXML)(c,{decodeEntities:!1,useArrayRepresentationForChildren:!0})},c.js2xml=function(c){return(0,h.ModuleManager.get(f.ModuleName.XML).parseJSONtoXML)(c)},c.extractAdBreakConfigs=function(u){return c.getParsedManifest(u.tag.url).then(function(d){return d.manifest.VMAP?Promise.resolve({adBreakConfigs:c.parseVmapAdBreaks(d.manifest,u),downloadTiming:d.downloadTiming}):Promise.reject({code:g.AdvertisingModuleErrorCode.AD_TAG_TYPE_NOT_MATCHING})})},c.getParsedManifest=function(u){return m.AdManifestHelper.downloadVmapManifest(u).catch(function(){return Promise.reject({code:g.AdvertisingModuleErrorCode.COULD_NOT_LOAD_AD_MANIFEST})}).then(function(u){if(!u.body)return Promise.reject({code:b.VastErrorCode.XML_PARSING_ERROR});try{var d=c.xml2js(u.body),p=d.success?d.parsed:{},h={downloadTime:u.elapsedTime,timeToFirstByte:u.timeToFirstByte};return Promise.resolve({manifest:p,downloadTiming:h})}catch{return Promise.reject({code:b.VastErrorCode.XML_PARSING_ERROR})}})},c.parseVmapAdBreaks=function(u,d){return c.extractAdBreaks(u).map(function(c){var u,h={id:c.id||p.Util.generateUniqueId(),tag:{url:c.tag,type:v.AdTagType.VAST},position:c.offset,preloadOffset:null!=(u=d.preloadOffset)?u:y.DEFAULT_PRELOAD_OFFSET};d.hasOwnProperty("replaceContentDuration")&&(h.replaceContentDuration=d.replaceContentDuration),d.passthroughMode&&(h.passthroughMode=d.passthroughMode);var f={publicAdBreakConfig:h};return c.trackingEvents&&Object.keys(c.trackingEvents).length>0&&(f.trackingEvents=c.trackingEvents),f})||[]},c.extractAdBreaks=function(u){return u.VMAP?u.VMAP.AdBreak.map(function(u){var d=u._breakId,p=u._timeOffset;switch(p){case"start":p="pre";break;case"end":p="post"}var h=c.getAdBreakUri(u),f=[];return u.TrackingEvents&&u.TrackingEvents[0]&&u.TrackingEvents[0].Tracking&&u.TrackingEvents[0].Tracking.forEach(function(c){var u=c._event.toLocaleLowerCase();f.push({type:u,url:c.toString()})}),{id:d,offset:p,tag:h,trackingEvents:f}}):[]},c.getAdBreakUri=function(u){var d=!!(u.AdSource&&u.AdSource[0]),p=!!(d&&u.AdSource[0].AdTagURI&&u.AdSource[0].AdTagURI[0]),h=!!(d&&u.AdSource[0].VASTAdData&&u.AdSource[0].VASTAdData[0]);return p||h?p&&u.AdSource[0].AdTagURI[0].toString?u.AdSource[0].AdTagURI[0].toString():h?m.AdManifestHelper.toDataUri(c.js2xml(u.AdSource[0].VASTAdData[0])):void 0:""},c}()}
14,63207:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.Ad=void 0,u.Ad=function(){this.id=null,this.wrapperAdIds=[],this.sequence=null,this.system=null,this.title=null,this.description=null,this.advertiser=null,this.pricing=null,this.survey=null,this.errorURLTemplates=[],this.impressionURLTemplates=[],this.creatives=[],this.extensions=[],this.verifications=[]}},19637:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.AdExtension=void 0,u.AdExtension=function(){function c(){this.name=null,this.value=null,this.attributes={},this.children=[]}return c.prototype.isEmpty=function(){return null===this.value&&0===Object.keys(this.attributes).length&&0===this.children.length},c}()},31472:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.CompanionAd=void 0,u.CompanionAd=function(){this.id=null,this.width=0,this.height=0,this.type=null,this.staticResource=null,this.htmlResource=null,this.iframeResource=null,this.altText=null,this.companionClickThroughURLTemplate=null,this.companionClickTrackingURLTemplates=[],this.trackingEvents={}}},36828:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.Creative=void 0,u.Creative=function(c){void 0===c&&(c={}),this.id=c.id||null,this.adId=c.adId||null,this.universalAdId=c.universalAdId||null,this.sequence=c.sequence||null,this.apiFramework=c.apiFramework||null,this.trackingEvents={}}},81214:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.CreativeCompanion=void 0,u.CreativeCompanion=function(c){function u(u){void 0===u&&(u={});var d=c.call(this,u)||this;return d.type="companion",d.variations=[],d}return h(u,c),u}(d(36828).Creative)},77615:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.CreativeLinear=void 0,u.CreativeLinear=function(c){function u(u){void 0===u&&(u={});var d=c.call(this,u)||this;return d.type="linear",d.duration=0,d.skipDelay=null,d.mediaFiles=[],d.videoClickThroughURLTemplate=null,d.videoClickTrackingURLTemplates=[],d.videoCustomClickURLTemplates=[],d.adParameters=null,d.icons=[],d}return h(u,c),u}(d(36828).Creative)},35475:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.CreativeNonLinear=void 0,u.CreativeNonLinear=function(c){function u(u){void 0===u&&(u={});var d=c.call(this,u)||this;return d.type="nonlinear",d.variations=[],d}return h(u,c),u}(d(36828).Creative)},50199:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.Icon=void 0,u.Icon=function(){this.program=null,this.height=0,this.width=0,this.xPosition=0,this.yPosition=0,this.apiFramework=null,this.offset=null,this.duration=0,this.type=null,this.staticResource=null,this.htmlResource=null,this.iframeResource=null,this.iconClickThroughURLTemplate=null,this.iconClickTrackingURLTemplates=[],this.iconViewTrackingURLTemplate=null}}
vendor: 1,970 bytes, line 14
14,36629:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.MediaFile=void 0,u.MediaFile=function(){this.id=null,this.fileURL=null,this.deliveryType="progressive",this.mimeType=null,this.codec=null,this.bitrate=0,this.minBitrate=0,this.maxBitrate=0,this.width=0,this.height=0,this.apiFramework=null,this.scalable=null,this.maintainAspectRatio=null}},57219:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.NonLinearAd=void 0,u.NonLinearAd=function(){this.id=null,this.width=0,this.height=0,this.expandedWidth=0,this.expandedHeight=0,this.scalable=!0,this.maintainAspectRatio=!0,this.minSuggestedDuration=0,this.apiFramework="static",this.type=null,this.staticResource=null,this.htmlResource=null,this.iframeResource=null,this.nonlinearClickThroughURLTemplate=null,this.nonlinearClickTrackingURLTemplates=[],this.adParameters=null}},71119:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.parseAd=function(c){var u=c.childNodes;for(var d in u){var p=u[d];if(-1!==["Wrapper","InLine"].indexOf(p.nodeName)){if(v.parserUtils.copyNodeAttribute("id",c,p),v.parserUtils.copyNodeAttribute("sequence",c,p),"Wrapper"===p.nodeName)return function(c){var u=y(c),d=v.parserUtils.childByName(c,"VASTAdTagURI");if(d?u.nextWrapperURL=v.parserUtils.parseNodeText(d):(d=v.parserUtils.childByName(c,"VASTAdTagURL"))&&(u.nextWrapperURL=v.parserUtils.parseNodeText(v.parserUtils.childByName(d,"URL"))),u.creatives.forEach(function(c){if(-1!==["linear","nonlinear"].indexOf(c.type)){if(c.trackingEvents){u.trackingEvents||(u.trackingEvents={}),u.trackingEvents[c.type]||(u.trackingEvents[c.type]={});var d=function(d){var p=c.trackingEvents[d];u.trackingEvents[c.type][d]||(u.trackingEvents[c.type][d]=[]),p.forEach(function(p){u.trackingEvents[c.type][d].push(p)})};for(var p in c.trackingEvents)d(p)}c.videoClickTrackingURLTemplates&&(u.videoClickTrackingURLTemplates||(u.videoClickTrackingURLTemplates=[]),c.videoClickTrackingURLTemplates.forEac
14h(function(c){u.videoClickTrackingURLTemplates.push(c)})),c.videoClickThroughURLTemplate&&(u.videoClickThroughURLTemplate=c.videoClickThroughURLTemplate),c.videoCustomClickURLTemplates&&(u.videoCustomClickURLTemplates||(u.videoCustomClickURLTemplates=[]),c.videoCustomClickURLTemplates.forEach(function(c){u.videoCustomClickURLTemplates.push(c)}))}}),u.nextWrapperURL)return u}(p);if("InLine"===p.nodeName)return y(p)}}},u.parseExtensions=b;var p=d(63207),h=d(19637),f=d(93088),m=d(2035),g=d(64815),v=d(75065);function y(c){var u=c.childNodes,d=new p.Ad;for(var h in d.id=c.getAttribute("id")||null,d.sequence=c.getAttribute("sequence")||null,u){var y=u[h];switch(y.nodeName){case"Error":d.errorURLTemplates.push(v.parserUtils.parseNodeText(y));break;case"Impression":d.impressionURLTemplates.push(v.parserUtils.parseNodeText(y));break;case"Creatives":v.parserUtils.childrenByName(y,"Creative").forEach(function(c){var u={id:c.getAttribute("id")||null,adId:(h=c).getAttribute("AdID")||h.getAttribute("adID")||h.getAttribute("adId")||null,sequence:c.getAttribute("sequence")||null,apiFramework:c.getAttribute("apiFramework")||null};for(var p in c.childNodes){var h,y,b=c.childNodes[p];switch(b.nodeName){case"UniversalAdId":u.universalAdId={idRegistry:(y=b).getAttribute("idRegistry")||"unknown",value:v.parserUtils.parseNodeText(y)||"unknown"};break;case"Linear":var S=(0,m.parseCreativeLinear)(b,u);S&&d.creatives.push(S);break;case"NonLinearAds":var _=(0,g.parseCreativeNonLinear)(b,u);_&&d.creatives.push(_);break;case"CompanionAds":var E=(0,f.parseCreativeCompanion)(b,u);E&&d.creatives.push(E)}}});break;case"Extensions":d.extensions=b(v.parserUtils.childrenByName(y,"Extension"),d);break;case"AdSystem":d.system={value:v.parserUtils.parseNodeText(y),version:y.getAttribute("version")||null};break;case"AdTitle":d.title=v.parserUtils.parseNodeText(y);break;case"Description":d.description=v.parserUtils.parseNodeText(y);break;
14case"Advertiser":d.advertiser={name:v.parserUtils.parseNodeText(y),id:y.getAttribute("id")||null};break;case"Pricing":d.pricing={value:v.parserUtils.parseNodeText(y),model:y.getAttribute("model")||null,currency:y.getAttribute("currency")||null};break;case"Survey":d.survey={uri:v.parserUtils.parseNodeText(y),type:y.getAttribute("type")||null};break;case"AdVerifications":S(d.verifications,v.parserUtils.childrenByName(y,"Verification"))}}return d}function b(c,u){var d=[];return c.forEach(function(c){var p=function c(u,d){if("#comment"===u.nodeName)return null;var p=new h.AdExtension,f=u.attributes,m=u.childNodes;if(p.name=u.nodeName,u.attributes){for(var g in f)if(f.hasOwnProperty(g)){var y=f[g];y.nodeName&&y.nodeValue&&(p.attributes[y.nodeName]=y.nodeValue)}}for(var b in m)if(m.hasOwnProperty(b)){if("AdVerifications"===m[b].nodeName){S(d.verifications,v.parserUtils.childrenByName(m[b],"Verification"));continue}var _=c(m[b],d);_&&p.children.push(_)}if(0===p.children.length||1===p.children.length&&["#cdata-section","#text"].indexOf(p.children[0].name)>=0){var E=v.parserUtils.parseNodeText(u);""!==E&&(p.value=E),p.children=[]}return p.isEmpty()?null:p}(c,u);p&&d.push(p)}),d}function S(c,u){var d=["Verification","JavaScriptResource","ExecutableResource","TrackingEvents","Tracking","VerificationParameters"],p=function(c){var u={},h=v.parserUtils.parseNodeText(c);return Object.keys(c.attributes).forEach(function(d){var p=c.attributes[d].nodeName,h=c.attributes[d].nodeValue;p&&h&&(u[p]=h)}
vendor: 17,900 bytes, line 14
14),"#comment"!==c.nodeName&&""!==h&&(c.children&&c.children.length>0?c.childNodes.forEach(function(c){d.includes(c.nodeName)&&(u[c.nodeName]||(u[c.nodeName]=[]),u[c.nodeName].push(p(c)))}):u.content=h),u};u.forEach(function(u){var d=p(u);c.push(d)})}},93088:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.parseCreativeCompanion=function(c,u){var d=new h.CreativeCompanion(u);return f.parserUtils.childrenByName(c,"Companion").forEach(function(c){var u=new p.CompanionAd;u.id=c.getAttribute("id")||null,u.width=c.getAttribute("width"),u.height=c.getAttribute("height"),u.companionClickTrackingURLTemplates=[],f.parserUtils.childrenByName(c,"HTMLResource").forEach(function(c){u.type=c.getAttribute("creativeType")||"text/html",u.htmlResource=f.parserUtils.parseNodeText(c)}),f.parserUtils.childrenByName(c,"IFrameResource").forEach(function(c){u.type=c.getAttribute("creativeType")||0,u.iframeResource=f.parserUtils.parseNodeText(c)}),f.parserUtils.childrenByName(c,"StaticResource").forEach(function(d){u.type=d.getAttribute("creativeType")||0,f.parserUtils.childrenByName(c,"AltText").forEach(function(c){u.altText=f.parserUtils.parseNodeText(c)}),u.staticResource=f.parserUtils.parseNodeText(d)}),f.parserUtils.childrenByName(c,"TrackingEvents").forEach(function(c){f.parserUtils.childrenByName(c,"Tracking").forEach(function(c){var d=c.getAttribute("event"),p=f.parserUtils.parseNodeText(c);d&&p&&(null==u.trackingEvents[d]&&(u.trackingEvents[d]=[]),u.trackingEvents[d].push(p))})}),f.parserUtils.childrenByName(c,"CompanionClickTracking").forEach(function(c){u.companionClickTrackingURLTemplates.push(f.parserUtils.parseNodeText(c))}),u.companionClickThroughURLTemplate=f.parserUtils.parseNodeText(f.parserUtils.childByName(c,"CompanionClickThrough")),u.companionClickTrackingURLTemplate=f.parserUtils.parseNodeText(f.parserUtils.childByName(c,"CompanionClickTracking")),d.variations.push(u)}),d};var p=d(31472),h=d(81214),f=d(75065)},2035:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.parseCreativeLinear=function(c,u){var d,g=new p.CreativeLinear(u);g.duration=m.parserUtils.parseDuration(m.parserUtils.parseNodeText(m.parserUtils.childByName(c,"Duration")));var v=c.getAttribute("skipoffset");if(null==v)g.skipDelay=null;else if("%"===v.charAt(v.length-1)&&-1!==g.duration){var y=parseInt(v,10);g.skipDelay=g.duration*(y/100)}else g.skipDelay=m.parserUtils.parseDuration(v);var b=m.parserUtils.childByName(c,"VideoClicks");b&&(g.videoClickThroughURLTemplate=m.parserUtils.parseNodeText(m.parserUtils.childByName(b,"ClickThrough")),m.parserUtils.childrenByName(b,"ClickTracking").forEach(function(c){g.videoClickTrackingURLTemplates.push(m.parserUtils.parseNodeText(c))}),m.parserUtils.childrenByName(b,"CustomClick").forEach(function(c){g.videoCustomClickURLTemplates.push(m.parserUtils.parseNodeText(c))}));var S=m.parserUtils.childByName(c,"AdParameters");S&&(g.adParameters=m.parserUtils.parseNodeText(S)),m.parserUtils.childrenByName(c,"TrackingEvents").forEach(function(c){m.parserUtils.childrenByName(c,"Tracking").forEach(function(c){var u=c.getAttribute("event"),p=m.parserUtils.parseNodeText(c);if(u&&p){if("progress"===u){if(!(d=c.getAttribute("offset")))return;u="%"===d.charAt(d.length-1)?"progress-".concat(d):"progress-".concat(Math.round(m.parserUtils.parseDuration(d)))}null==g.trackingEvents[u]&&(g.trackingEvents[u]=[]),g.trackingEvents[u].push(p)}})}),m.parserUtils.childrenByName(c,"MediaFiles").forEach(function(c){m.parserUtils.childrenByName(c,"MediaFile").forEach(function(c){var u=new f.MediaFile;u.id=c.getAttribute("id"),u.fileURL=m.parserUtils.parseNodeText(c),u.deliveryType=c.getAttribute("delivery"),u.codec=c.getAttribute("codec"),u.mimeType=c.getAttribute("type"),u.apiFramework=c.getAttribute("apiFramework"),u.bitrate=parseInt(c.getAttribute("bitrate")||0),u.minBitrate=parseInt(c.getAttribute("minBitrate")||0),u.maxBitrate=parseInt(c.getAttribute("maxBitrate")||0),u.width=parseInt(c.getAttribute("width")||0),u.height=parseInt(c.getAttribute("height")||0);var d=c.getAttribute("scalable");d&&"string"==typeof d&&("true"===(d=d.toLowerCase())?u.scalable=!0:"false"===d&&(u.scalable=!1));var p=c.getAttribute("maintainAspectRatio");p&&"string"==typeof p&&("true"===(p=p.toLowerCase())?u.maintainAspectRatio=!0:"false"===p&&(u.maintainAspectRatio=!1)),g.mediaFiles.push(u)})});var _=m.parserUtils.childByName(c,"Icons");return _&&m.parserUtils.childrenByName(_,"Icon").forEach(function(c){var u,d,p=new h.Icon;p.program=c.getAttribute("program"),p.height=parseInt(c.getAttribute("height")||0),p.width=parseInt(c.getAttribute("width")||0),p.xPosition=-1!==["left","right"].indexOf(u=c.getAttribute("xPosition"))?u:parseInt(u||0),p.yPosition=-1!==["top","bottom"].indexOf(d=c.getAttribute("yPosition"))?d:parseInt(d||0),p.apiFramework=c.getAttribute("apiFramework"),p.offset=m.parserUtils.parseDuration(c.getAttribute("offset")),p.duration=m.parserUtils.parseDuration(c.getAttribute("duration")),m.parserUtils.childrenByName(c,"HTMLResource").forEach(function(c){p.type=c.getAttribute("creativeType")||"text/html",p.htmlResource=m.parserUtils.parseNodeText(c)}),m.parserUtils.childrenByName(c,"IFrameResource").forEach(function(c){p.type=c.getAttribute("creativeType")||0,p.iframeResource=m.parserUtils.parseNodeText(c)}),m.parserUtils.childrenByName(c,"StaticResource").forEach(function(c){p.type=c.getAttribute("creativeType")||0,p.staticResource=m.parserUtils.parseNodeText(c)});var f=m.parserUtils.childByName(c,"IconClicks");f&&(p.iconClickThroughURLTemplate=m.parserUtils.parseNodeText(m.parserUtils.childByName(f,"IconClickThrough")),m.parserUtils.childrenByName(f,"IconClickTracking").forEach(function(c){p.iconClickTrackingURLTemplates.push(m.parserUtils.parseNodeText(c))})),p.iconViewTrackingURLTemplate=m.parserUtils.parseNodeText(m.parserUtils.childByName(c,"IconViewTracking")),g.icons.push(p)}),g};var p=d(77615),h=d(50199),f=d(36629),m=d(75065)},64815:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.parseCreativeNonLinear=function(c,u){var d=new p.CreativeNonLinear(u);return f.parserUtils.childrenByName(c,"TrackingEvents").forEach(function(c){var u,p;f.parserUtils.childrenByName(c,"Tracking").forEach(function(c){u=c.getAttribute("event"),p=f.parserUtils.parseNodeText(c),u&&p&&(null==d.trackingEvents[u]&&(d.trackingEvents[u]=[]),d.trackingEvents[u].push(p))})}),f.parserUtils.childrenByName(c,"NonLinear").forEach(function(c){var u=new h.NonLinearAd;u.id=c.getAttribute("id")||null,u.width=c.getAttribute("width"),u.height=c.getAttribute("height"),u.expandedWidth=c.getAttribute("expandedWidth"),u.expandedHeight=c.getAttribute("expandedHeight"),u.scalable=f.parserUtils.parseBoolean(c.getAttribute("scalable")),u.maintainAspectRatio=f.parserUtils.parseBoolean(c.getAttribute("maintainAspectRatio")),u.minSuggestedDuration=f.parserUtils.parseDuration(c.getAttribute("minSuggestedDuration")),u.apiFramework=c.getAttribute("apiFramework"),f.parserUtils.childrenByName(c,"HTMLResource").forEach(function(c){u.type=c.getAttribute("creativeType")||"text/html",u.htmlResource=f.parserUtils.parseNodeText(c)}),f.parserUtils.childrenByName(c,"IFrameResource").forEach(function(c){u.type=c.getAttribute("creativeType")||0,u.iframeResource=f.parserUtils.parseNodeText(c)}),f.parserUtils.childrenByName(c,"StaticResource").forEach(function(c){u.type=c.getAttribute("creativeType")||0,u.staticResource=f.parserUtils.parseNodeText(c)});var p=f.parserUtils.childByName(c,"AdParameters");p&&(u.adParameters=f.parserUtils.parseNodeText(p)),u.nonlinearClickThroughURLTemplate=f.parserUtils.parseNodeText(f.parserUtils.childByName(c,"NonLinearClickThrough")),f.parserUtils.childrenByName(c,"NonLinearClickTracking").forEach(function(c){u.nonlinearClickTrackingURLTemplates.push(f.parserUtils.parseNodeText(c))}),d.variations.push(u)}),d};var p=d(35475),h=d(57219),f=d(75065)},75065:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.parserUtils=void 0;var p=d(11417);u.parserUtils={childByName:function(c,u){var d=c.childNodes;for(var p in d){var h=d[p];if(h.nodeName===u)return h}},childrenByName:function(c,u){var d=[],p=c.childNodes;for(var h in p){var f=p[h];f.nodeName===u&&d.push(f)}return d},resolveVastAdTagURI:function(c,u){if(!u)return c;if(0===c.indexOf("//")){var d=location.protocol;return"".concat(d).concat(c)}if(-1===c.indexOf("://")){var p=u.slice(0,u.lastIndexOf("/"));return"".concat(p,"/").concat(c)}return c},parseBoolean:function(c){return -1!==["true","TRUE","1"].indexOf(c)},parseNodeText:function(c){return c&&(c.textContent||c.text||"").trim()},copyNodeAttribute:function(c,u,d){var p=u.getAttribute(c);p&&d.setAttribute(c,p)},parseDuration:function(c){if(null==c)return -1;if(p.util.isNumeric(c))return parseInt(c);var u=c.split(":");if(3!==u.length)return -1;var d=u[2].split("."),h=parseInt(d[0]);2===d.length&&(h+=parseFloat("0.".concat(d[1])));var f=parseInt(60*u[1]),m=parseInt(60*u[0]*60);return isNaN(m)||isNaN(f)||isNaN(h)||f>3600||h>60?-1:m+f+h},splitVAST:function(c){var u=[],d=null;return c.forEach(function(p,h){if(p.sequence&&(p.sequence=parseInt(p.sequence,10)),p.sequence>1){var f=c[h-1];if(f&&f.sequence===p.sequence-1)return void(d&&d.push(p));delete p.sequence}d=[p],u.push(d)}),u},mergeWrapperAdData:function(c,u){if(c.errorURLTemplates=u.errorURLTemplates.concat(c.errorURLTemplates),c.impressionURLTemplates=u.impressionURLTemplates.concat(c.impressionURLTemplates),c.extensions=u.extensions.concat(c.extensions),c.verifications=u.verifications.concat(c.verifications),c.wrapperAdIds.push(u.id),c.creatives.forEach(function(c){if(u.trackingEvents&&u.trackingEvents[c.type])for(var d in u.trackingEvents[c.type]){var p=u.trackingEvents[c.type][d];c.trackingEvents[d]||(c.trackingEvents[d]=[]),c.trackingEvents[d]=c.trackingEvents[d].concat(p)}}),u.videoClickTrackingURLTemplates&&u.videoClickTrackingURLTemplates.length&&c.creatives.forEach(function(c){"linear"===c.type&&(c.videoClickTrackingURLTemplates=c.videoClickTrackingURLTemplates.concat(u.videoClickTrackingURLTemplates))}),u.videoCustomClickURLTemplates&&u.videoCustomClickURLTemplates.length&&c.creatives.forEach(function(c){"linear"===c.type&&(c.videoCustomClickURLTemplates=c.videoCustomClickURLTemplates.concat(u.videoCustomClickURLTemplates))}),u.videoClickThroughURLTemplate&&c.creatives.forEach(function(c){"linear"===c.type&&null==c.videoClickThroughURLTemplate&&(c.videoClickThroughURLTemplate=u.videoClickThroughURLTemplate)}),c.fallbackAdSequence&&c.sequence!==c.fallbackAdSequence)(u.sequence||u.fallbackAdSequence)&&(c.sequence=null,c.fallbackAdSequence=u.fallbackAdSequence||u.sequence);else if(u.fallbackAdSequence)c.sequence=null,c.fallbackAdSequence=u.fallbackAdSequence||u.sequence;else{if(!u.sequence&&!u.fallbackAdSequence)return;c.sequence=u.sequence}}}},29902:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)}),f=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.VASTParser=void 0;var m=d(71119),g=d(37007),v=d(75065),y=d(27294),b=d(11417),S=d(71076),_={ERRORCODE:900,extensions:[]};u.VASTParser=function(c){function u(){var u=c.call(this)||this;return u.remainingAds=[],u.parentURLs=[],u.errorURLTemplates=[],u.rootErrorURLTemplates=[],u.maxWrapperDepth=null,u.URLTemplateFilters=[],u.fetchingOptions={},u.currentAdSequence=null,u}return h(u,c),u.prototype.addURLTemplateFilter=function(c){"function"==typeof c&&this.URLTemplateFilters.push(c)},u.prototype.removeURLTemplateFilter=function(){this.URLTemplateFilters.pop()},u.prototype.countURLTemplateFilters=function(){return this.URLTemplateFilters.length},u.prototype.clearURLTemplateFilters=function(){this.URLTemplateFilters=[]},u.prototype.trackVastError=function(c,u){for(var d=[],p=2;p<arguments.length;p++)d[p-2]=arguments[p];this.emit("VAST-error",Object.assign.apply(Object,f([_,u],d,!1))),b.util.track(c,u)},u.prototype.getErrorURLTemplates=function(){return this.rootErrorURLTemplates.concat(this.errorURLTemplates)},u.prototype.fetchVAST=function(c,u,d){var p=this;return new Promise(function(h,f){p.URLTemplateFilters.forEach(function(u){c=u(c)}),p.parentURLs.push(c),p.emit("VAST-resolving",{url:c,wrapperDepth:u,originalUrl:d}),p.urlHandler.get(c,p.fetchingOptions,function(u,d){p.emit("VAST-resolved",{url:c,error:u}),u?f(u):h(d)})})},u.prototype.initParsingStatus=function(c){void 0===c&&(c={}),this.rootURL="",this.remainingAds=[],this.parentURLs=[],this.errorURLTemplates=[],this.rootErrorURLTemplates=[],this.maxWrapperDepth=c.wrapperLimit||10,this.fetchingOptions={timeout:c.timeout,withCredentials:c.withCredentials},this.urlHandler=c.urlhandler||y.urlHandler},u.prototype.getRemainingAds=function(c){var u=this;if(0===this.remainingAds.length)return Promise.reject(Error("No more ads are available for the given VAST"));var d=c?b.util.flatten(this.remainingAds):this.remainingAds.shift();return this.errorURLTemplates=[],this.parentURLs=[],this.resolveAds(d,{wrapperDepth:0,originalUrl:this.rootURL}).then(function(c){return u.buildVASTResponse(c)})},u.prototype.getAndParseVAST=function(c,u){var d=this;return void 0===u&&(u={}),this.initParsingStatus(u),this.rootURL=c,this.fetchVAST(c).then(function(p){return u.originalUrl=c,u.isRootVAST=!0,d.parse(p,u).then(function(c){return d.buildVASTResponse(c,u)})})},u.prototype.parseVAST=function(c,u){var d=this;return void 0===u&&(u={}),this.initParsingStatus(u),u.isRootVAST=!0,this.parse(c,u).then(function(c){return d.buildVASTResponse(c,u)})},u.prototype.getPodAds=function(c){return c.filter(function(c){return null!=c.sequence})},u.prototype.getStandaloneAds=function(c){return c.filter(function(c){return null==c.sequence})},u.prototype.hasMediaFiles=function(c){return!(!c||null!=c.errorCode)&&(Array.isArray(c.creatives)?c.creatives:[]).some(function(c){return c.mediaFiles&&c.mediaFiles.length>0})},u.prototype.replaceUnavailableAdPodAds=function(c){var u=this,d=this.getPodAds(c),p=this.getStandaloneAds(c).filter(this.hasMediaFiles);return 0===d.length||0===p.length?c:(d=d.map(function(c){return u.hasMediaFiles(c)?c:p.shift()}).filter(Boolean),p.forEach(function(c){return c.isFallback=!0}),d.concat(p))},u.prototype.markFallbackAds=function(c){return this.getPodAds(c).length>0&&this.getStandaloneAds(c).forEach(function(c){return c.isFallback=!0}),c},u.prototype.buildVASTResponse=function(c,u){void 0===u&&(u={});var d=new S.VASTResponse;return d.errorURLTemplates=this.getErrorURLTemplates(),c.forEach(function(c){return c.isFallback=!1}),d.ads=u.replaceUnavailableAdPodAds?this.replaceUnavailableAdPodAds(c):this.markFallbackAds(c),this.completeWrapperResolving(d),d},u.prototype.parse=function(c,u){var d=this,p=u.resolveAll,h=u.wrapperSequence,f=void 0===h?null:h,g=u.originalUrl,y=u.wrapperDepth,b=u.isRootVAST,S=void 0!==b&&b,_=u.parentAdSequence,E=void 0===_?null:_;if(!c||!c.documentElement||"VAST"!==c.documentElement.nodeName)return Promise.reject(Error("Invalid VAST XMLDocument"));var T=[],w=c.documentElement.childNodes;for(var P in w){var A=w[P];if("Error"===A.nodeName){var I=v.parserUtils.parseNodeText(A);S?this.rootErrorURLTemplates.push(I):this.errorURLTemplates.push(I)}if("Ad"===A.nodeName){var M=(0,m.parseAd)(A);M?T.push(M):this.trackVastError(this.getErrorURLTemplates(),{ERRORCODE:101})}}var R=T.length,k=T[R-1];return 1===R&&null!=f&&k&&!k.sequence&&(k.sequence=f),T.forEach(function(c){return d.handleFallbackAdSequence(c,E)}),!1===(void 0===p||p)&&(this.remainingAds=v.parserUtils.splitVAST(T),T=this.remainingAds.shift()),this.resolveAds(T,{wrapperDepth:void 0===y?0:y,originalUrl:void 0===g?null:g})},u.prototype.handleFallbackAdSequence=function(c,u){null==c.sequence?c.fallbackAdSequence=u||this.currentAdSequence:this.currentAdSequence=c.sequence},u.prototype.resolveAds=function(c,u){var d=this;void 0===c&&(c=[]);var p=u.wrapperDepth,h=u.originalUrl,f=[];return c.forEach(function(c){var u=d.resolveWrappers(c,p,h);f.push(u)}),Promise.all(f).then(function(c){var u=b.util.flatten(c);if(!u&&d.remainingAds.length>0){var f=d.remainingAds.shift();return d.resolveAds(f,{wrapperDepth:p,originalUrl:h})}return u})},u.prototype.resolveWrappers=function(c,u,d){var p=this;return new Promise(function(h){if(u++,!c.nextWrapperURL)return delete c.nextWrapperURL,h(c);if(u>=p.maxWrapperDepth||-1!==p.parentURLs.indexOf(c.nextWrapperURL))return c.errorCode=302,delete c.nextWrapperURL,h(c);c.nextWrapperURL=v.parserUtils.resolveVastAdTagURI(c.nextWrapperURL,d);var f=c.sequence;d=c.nextWrapperURL,p.fetchVAST(c.nextWrapperURL,u,d).then(function(m){return p.parse(m,{originalUrl:d,wrapperSequence:f,wrapperDepth:u,parentAdSequence:c.sequence||c.fallbackAdSequence}).then(function(u){if(delete c.nextWrapperURL,0===u.length)return c.creatives=[],h(c);u.forEach(function(u){u&&v.parserUtils.mergeWrapperAdData(u,c)}),h(u)})}).catch(function(u){c.errorCode=301,c.errorMessage=u.message,h(c)})})},u.prototype.completeWrapperResolving=function(c){if(0===c.ads.length)this.trackVastError(c.errorURLTemplates,{ERRORCODE:303});else for(var u=c.ads.length-1;u>=0;u--){var d=c.ads[u];(d.errorCode||0===d.creatives.length)&&(this.trackVastError(d.errorURLTemplates.concat(c.errorURLTemplates),{ERRORCODE:d.errorCode||303},{ERRORMESSAGE:d.errorMessage||""},{extensions:d.extensions},{system:d.system}),c.ads.splice(u,1))}},u}(g.EventEmitter)}
14,27294:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.urlHandler=void 0;var p=d(82664),h=d(13769),f=d(2860);u.urlHandler={get:function(c,u,d){return d||("function"==typeof u&&(d=u),u={}),typeof window>"u"||null===window?h.nodeURLHandler.get(c,u,d):f.XHRURLHandler.supported()?f.XHRURLHandler.get(c,u,d):p.flashURLHandler.supported()?p.flashURLHandler.get(c,u,d):d(Error("Current context is not supported by any of the default URLHandlers. Please provide a custom URLHandler"))}}},82664:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.flashURLHandler=void 0,u.flashURLHandler={get:function(c,u,d){var p="function"==typeof window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLDOM"):void 0;if(!p)return d(Error("FlashURLHandler: Microsoft.XMLDOM format not supported"));p.async=!1;var h=h();request.open("GET",c),request.timeout=u.timeout||0,request.withCredentials=u.withCredentials||!1,request.send(),request.onprogress=function(){},request.onload=function(){p.loadXML(request.responseText),d(null,p)}},supported:function(){var c;return window.XDomainRequest&&(c=new XDomainRequest),!!c}}},13769:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.nodeURLHandler=void 0,u.nodeURLHandler={get:function(c,u,d){d(Error("Please bundle the library for node to use the node urlHandler"))}}},2860:function(c,u){function d(){try{var c=new window.XMLHttpRequest;return"withCredentials"in c?c:null}catch(c){return console.log("Error in XHRURLHandler support check:",c),null}}Object.defineProperty(u,"__esModule",{value:!0}),u.XHRURLHandler=void 0,u.XHRURLHandler={get:function(c,u,p){if("https:"===window.location.protocol&&0===c.indexOf("http://"))return p(Error("XHRURLHandler: Cannot go from HTTPS to HTTP."));try{var h=d();h.open("GET",c),h.timeout=u.timeout||0,h.withCredentials=u.withCredentials||!1,h.overrideMimeType&&h.overrideMimeType("text/xml"),h.onreadystatechange=function(){4===h.readyState&&(200===h.status?p(null,h.responseXML):p(Error("XHRURLHandler: ".concat(h.statusText))))},h.send()}catch{p(Error("XHRURLHandler: Unexpected error"))}},supported:function(){return!!d()}}},1100:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.Storage=void 0;var d=null,p={data:{},length:0,getItem:function(c){return this.data[c]},setItem:function(c,u){this.data[c]=u,this.length=Object.keys(this.data).length},removeItem:function(c){delete data[c],this.length=Object.keys(this.data).length},clear:function(){this.data={},this.length=0}};u.Storage=function(){function c(c){this.storage=this.initStorage(c)}return c.prototype.initStorage=function(c){if(d&&(typeof window>"u"||null===window||Object.getPrototypeOf(d)!==window.Storage.prototype||c))return d;try{d="u">typeof window&&null!==window?window.localStorage||window.sessionStorage:null}catch{d=null}return d&&c&&!this.isStorageDisabled(d)||(d=p).clear(),d},c.prototype.isStorageDisabled=function(c){var u="__VASTStorage__";try{if(c.setItem(u,u),c.getItem(u)!==u)return c.removeItem(u),!0}catch{return!0}return c.removeItem(u),!1},c.prototype.getItem=function(c){return this.storage.getItem(c)},c.prototype.setItem=function(c,u){return this.storage.setItem(c,u)},c.prototype.removeItem=function(c){return this.storage.removeItem(c)},c.prototype.clear=function(){return this.storage.clear()},c}()},11417:function(c,u){function d(c,u){void 0===u&&(u={});var d=[];u.ASSETURI&&(u.ASSETURI=p(u.ASSETURI)),u.CONTENTPLAYHEAD&&(u.CONTENTPLAYHEAD=p(u.CONTENTPLAYHEAD)),u.
14ERRORCODE&&!/^[0-9]{3}$/.test(u.ERRORCODE)&&(u.ERRORCODE=900),u.CACHEBUSTING=h(Math.round(1e8*Math.random()).toString()),u.TIMESTAMP=p((new Date).toISOString()),u.RANDOM=u.random=u.CACHEBUSTING;for(var f=0;f<c.length;f++){var m=c[f];if("string"==typeof m){for(var g in u){var v=u[g],y="[".concat(g,"]"),b="%%".concat(g,"%%");m=(m=m.replace(y,v)).replace(b,v)}d.push(m)}}return d}function p(c){return encodeURIComponent(c).replace(/[!'()*]/g,function(c){return"%".concat(c.charCodeAt(0).toString(16))})}function h(c){return c.length<8?f(0,8-c.length,!1).map(function(c){return"0"}).join("")+c:c}function f(c,u,d){for(var p=[],h=c<u,f=d?h?u+1:u-1:u,m=c;h?m<f:m>f;h?m++:m--)p.push(m);return p}Object.defineProperty(u,"__esModule",{value:!0}),u.util=void 0,u.util={track:function(c,u){d(c,u).forEach(function(c){"u">typeof window&&null!==window&&(new Image().src=c)})},resolveURLTemplates:d,encodeURIComponentRFC3986:p,leftpad:h,range:f,isNumeric:function(c){return!isNaN(parseFloat(c))&&isFinite(c)},flatten:function c(u){return u.reduce(function(u,d){return u.concat(Array.isArray(d)?c(d):d)},[])}}},6036:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.VASTClient=void 0;var p=d(1100),h=d(29902);u.VASTClient=function(){function c(c){c=c||{},this.cappingFreeLunch=c.cappingFreeLunch||0,this.cappingMinimumTimeInterval=c.cappingMinimumTimeInterval||0,this.defaultOptions={withCredentials:!1,timeout:0},this.vastParser=new h.VASTParser;var u=null==c.allowUsingBrowserStorageApi||c.allowUsingBrowserStorageApi;this.storage=c.customStorage||new p.Storage(u),void 0===this.lastSuccessfulAd&&(this.lastSuccessfulAd=0),void 0===this.totalCalls&&(this.totalCalls=0),void 0===this.totalCallsTimeout&&(this.totalCallsTimeout=0)}return c.prototype.getParser=function(){return this.vastParser},Object.defineProperty(c.prototype,"lastSuccessfulAd",{get:function(){return this.storage.getItem("vast-client-last-successful-ad")},set:function(c){this.storage.setItem("vast-client-last-successful-ad",c)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"totalCalls",{get:function(){return this.storage.getItem("vast-client-total-calls")},set:function(c){this.storage.setItem("vast-client-total-calls",c)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"totalCallsTimeout",{get:function(){return this.storage.getItem("vast-client-total-calls-timeout")},set:function(c){this.storage.setItem("vast-client-total-calls-timeout",c)},enumerable:!1,configurable:!0}),c.prototype.hasRemainingAds=function(){return this.vastParser.remainingAds.length>0},c.prototype.getNextAds=function(c){return this.vastParser.getRemainingAds(c)},c.prototype.get=function(c,u){var d=this;void 0===u&&(u={});var p=Date.now();return(u=Object.assign(this.defaultOptions,u)).hasOwnProperty("resolveAll")||(u.resolveAll=!1),this.totalCallsTimeout<p?(this.totalCalls=1,this.totalCallsTimeout=p+36e5):this.totalCalls++,new Promise(function(h,f){if(d.cappingFreeLunch>=d.totalCalls)return f(Error("VAST call canceled – FreeLunch capping not reached yet ".concat(d.totalCalls,"/").concat(d.cappingFreeLunch)));var m=p-d.lastSuccessfulAd;if(m<0)d.lastSuccessfulAd=0;else if(m<d.cappingMinimumTimeInterval)return f(Error("VAST call canceled – (".concat(d.cappingMinimumTimeInterval,")ms minimum interval reached")));d.vastParser.getAndParseVAST(c,u).then(function(c){return h(c)}).catch(function(c){return f(c)})})},c}()},71076:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.VASTResponse=void 0,u.VASTResponse=function(){this.ads=[],this.errorURLTemplates=[]}}},function(c){return c(c.s=7581)}])}(bitmovinplayerAdvertisingCore);var bitmovinplayerAdvertisingCoreExports=bitmovinplayerAdvertisingCore.exports;let AdvertisingCoreModule=getDefaultExportFromCjs$1(bitmovinplayerAdvertisingCoreExports);function defaultVideoQuality(){return{isAuto:!0,id:"auto",height:0,width:0}}class SubtitleHandler{constructor(){yi(this,"subtitles",[])}handleSubtitleEvent(c,u){return this.updateSubtitles(c),this.getMappedEvent(u)}updateSubtitles(c){let u=`${c.subtitleId}-${c.text}`;c.type===bitmovinplayerCoreExports.PlayerEvent.CueEnter?this.addSubtitle({id:u,text:c.html??c.text,startTime:c.start,endTime:c.end}):c.type===bitmovinplayerCoreExports.PlayerEvent.CueUpdate?this.updateExistingSubtitle(c,u):c.type===bitmovinplayerCoreExports.PlayerEvent.CueExit&&this.removeSubtitle(u)}updateExistingSubtitle(c,u){let d=this.subtitles.length>=0?this.subtitles[this.subtitles.length-1]:void 0,p=this.subtitles.find(u=>u.startTime===c.start&&u.endTime===c.end||u.text===c.text||u.text===c.html)??d;p&&(p.text=c.html??c.text,p.id=u,p.endTime=c.end,p.startTime=c.start)}removeSubtitle(c){this.subtitles=this.subtitles.filter(u=>u.id!==c)}
14addSubtitle(c){this.subtitles.push(c)}getMappedEvent(c){return{type:"subtitleUpdate",playerId:c,currentSubtitleHtmls:this.subtitles.flatMap(c=>c.text)}}resetAndGetEvent(c){return this.subtitles=[],this.getMappedEvent(c)}}class DrmPlayerError extends Error{constructor(c){super(`DRM ${c} failure`),this.category=c,this.name="DrmPlayerError"}}class StaleDrmRequestError extends DrmPlayerError{constructor(){super("license"),this.name="StaleDrmRequestError"}}function isDrmPlayerError(c){return c instanceof DrmPlayerError}function isStaleDrmRequestError(c){return c instanceof StaleDrmRequestError}function isMediaTimeWithinTheLast3Secs(c,u){return c>0&&3>Math.abs(c-u)}function calculateAdType(c,u,d){return 3>Math.abs(c-u)?"PRE_ROLL":isMediaTimeWithinTheLast3Secs(d,c)?"POST_ROLL":"MID_ROLL"}let DRM_FAILURE_CATEGORY_BY_CODE={1211:"configuration",1301:"cdm",2001:"configuration",2002:"configuration",2003:"license",2011:"certificate",2012:"configuration",2013:"output-protection"};function resolveBitmovinDrmFailureCategory(c){let u=Number(c.code);return 1404===u?"certificate":u in DRM_FAILURE_CATEGORY_BY_CODE?DRM_FAILURE_CATEGORY_BY_CODE[u]:u>=2e3&&u<=2015?"cdm":void 0}function mapBitmovinPlayerEvent(c,u,d){var p;if(isAirplayChangedEvent(c))return{type:"airPlayAvailabilityChanged",playerId:u,isAirPlayAvailable:c.airplayEnabled};if(isAudioChangedEvent(c)){let h=c.time;return void 0===h&&(h=d.getCurrentTimeInSeconds()),{type:"audioChanged",language:c.targetAudio.lang,previousLanguage:null==(p=c.sourceAudio)?void 0:p.lang,playerId:u,issuer:d.getCurrentSetAudioTrackIssuer()??"USER",playbackPosition:h}}if(isMutedEvent(c))return{type:"muted",playerId:u};if(isDownloadFinished(c))return{type:"downloadFinished",playerId:u};if(isPlayEvent(c)){let p=c.time;return void 0===p&&(p=d.getCurrentTimeInSeconds()),{type:"play",playerId:u,playbackPosition:p}}if(isPlayingEvent(c)){let p=c.time;return void 0===p&&(p=d.getCurrentTimeInSeconds()),{type:"playing",playerId:u,playbackPosition:p}}if(isPausedEvent(c)){let p=c.time;return void 0===p&&(p=d.getCurrentTimeInSeconds()),{type:"paused",playerId:u,playbackPosition:p}}if(isTimeChangedEvent(c)){let p=c.time;return void 0===p&&(p=d.getCurrentTimeInSeconds()),{type:"timeChanged",playerId:u,playbackPosition:p,duration:d.getDurationInSec()}}if(isViewModeChangedEvent(c))return{type:"toggleFullscreen",playerId:u,isInFullscreen:"fullscreen"===c.to};if(isUnmuteEvent(c))return{type:"unmuted",playerId:u};if(isVolumeChangedEvent(c))return{type:"volumeChanged",playerId:u,currentVolume:c.targetVolume};if(isSeekEvent(c))return{type:"seeking",playerId:u,playbackPosition:c.position,targetPosition:c.seekTarget,issuer:c.issuer};if(isSeekedEvent(c))return{type:"seekingDone",playerId:u,playbackPosition:d.getActualTimeFromPlayer(),issuer:c.issuer};if(isTimeshiftEvent(c))return{type:"timeshifting",playerId:u,playbackPosition:c.position,targetPosition:c.target,issuer:c.issuer};if(isTimeshiftedEvent(c))return{type:"timeshiftingDone",playerId:u,playbackPosition:c.time,issuer:c.issuer};if(isPlaybackFinishedEvent(c))return{type:"playbackFinished",playerId:u,playbackPosition:d.getActualTimeFromPlayer()};if(isPlaybackSpeedChangedEvent(c))return{type:"playbackSpeedChanged",playerId:u,currentSpeed:c.to,previousSpeed:c.from};if(isSubtitleAddedEvent(c))return{type:"subtitleAdded",trackId:c.subtitle.id,playerId:u};if(isSubtitleDisabledEvent(c))return{type:"subtitleDisabled",playbackPosition:d.getCurrentTimeInSeconds(),playerId:u,issuer:d.getCurrentSetSubtitleTrackIssuer()??"USER"};if(isSubtitleEnabledEvent(c))return{type:"subtitleEnabled",language:c.subtitle.lang,playbackPosition:d.getCurrentTimeInSeconds(),playerId:u,issuer:d.getCurrentSetSubtitleTrackIssuer()??"USER"};if(isErrorEvent(c))return{type:"error",code:String(c.code),playerId:u};if(isAdBreakStartedEvent(c)){let{scheduleTime:d}=c.adBreak;return{type:"adBreakStarted",playerId:u,scheduleTime:d}}if(isAdBreakFinishedEvent(c))return{type:"adBreakFinished",playerId:u};if(isAdStartedEvent(c)){let p=c.ad;if(isLinearAd(p))return{type:"adStarted",playerId:u,adId:p.id,skippable:(p.skippableAfter??0)>0,adType:calculateAdType(d.getLastMainMediaPositionInSec(),d.getInitialSeekTimeInSec(),d.getMainMediaDurationInSec()),duration:p.duration};throw Error(`unsupported non-linear ad ${p}`)}return isAdFinishedEvent(c)?{type:"adFinished",playerId:u,adId:c.ad.id}:isAdSkippedEvent(c)?{type:"adSkipped",playerId:u,adId:c.ad.id}:isVideoQualityChangedEvent(c)?{type:"videoQualityChanged",playerId:u,quality:d.getSelectedVideoQuality()}:isStalledStartedEvent(c)?{type:"bufferingStarted",playerId:u}:isStalledEndedEvent(c)?{type:"bufferingEnded",playerId:u}:void 0}function isAirplayChangedEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.AirplayChanged}function isAudioChangedEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.AudioChanged}function isMutedEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.Muted}function isPlayEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.Play}function isDownloadFinished(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.DownloadFinished}function isPlayingEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.Playing}
14function isPausedEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.Paused}function isTimeChangedEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.TimeChanged}function isPlaybackFinishedEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.PlaybackFinished}function isSeekEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.Seek}function isTimeshiftEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.TimeShift}function isVolumeChangedEvent(c){return(!("issuer"in c)||"media-element"!==c.issuer)&&c.type===bitmovinplayerCoreExports.PlayerEvent.VolumeChanged}function isSeekedEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.Seeked}function isVideoQualityChangedEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.VideoQualityChanged}function isTimeshiftedEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.TimeShifted}function isUnmuteEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.Unmuted}function isViewModeChangedEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.ViewModeChanged}function isPlaybackSpeedChangedEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.PlaybackSpeedChanged}function isErrorEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.Error}function isAdBreakStartedEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.AdBreakStarted}function isAdBreakFinishedEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.AdBreakFinished}function isAdStartedEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.AdStarted}function isAdFinishedEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.AdFinished}function isAdSkippedEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.AdSkipped}function isSubtitleAddedEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.SubtitleAdded}function isSubtitleDisabledEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.SubtitleDisabled}function isSubtitleEnabledEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.SubtitleEnabled}function isStalledStartedEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.StallStarted}function isStalledEndedEvent(c){return c.type===bitmovinplayerCoreExports.PlayerEvent.StallEnded}function isLinearAd(c){return c.isLinear}var bitmovinplayerAbr={exports:{}};!function(c){var u;self,c.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[744],{98154:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.AdaptationApiFactory=void 0;var h=d(23068);function f(c){return(0,h.isNumber)(c)&&c>=0}u.AdaptationApiFactory=function(){function c(){}return c.create=function(c){var u=c.getLogger(),d=function(c){u.debug("[ABR] ".concat(c))};return{setConfig:function(u){var p,m,g,v,y,b,S,_;d("Updating adaptation config with ".concat(JSON.stringify(u))),(0,h.isNumber)(u.qualityStabilityBalance)&&function(u){if(u<0||u>1)d("Failed to set qualityStabilityBalance to ".concat(u,", valid range is 0 to 1"));else{var p=c.getConfig(!0).adaptation;p&&(p.qualityStabilityBalance=u,d("Updated qualityStabilityBalance to ".concat(u)))}}(u.qualityStabilityBalance),u.resolution&&(m=(p=u.resolution).maxSelectableVideoHeight,g=p.maxSelectableVideoWidth,v=p.minSelectableVideoHeight,y=p.minSelectableVideoWidth,b=c.getConfig(!0).adaptation.resolution,f(m)&&(b.maxSelectableVideoHeight=m),f(g)&&(b.maxSelectableVideoWidth=g),f(v)&&(b.minSelectableVideoHeight=v),f(y)&&(b.minSelectableVideoWidth=y),d("Updated resolution boundaries to ".concat(JSON.stringify(b)))),(0,h.isBoolean)(u.limitToPlayerSize)&&(S=u.limitToPlayerSize,(_=c.getConfig(!0).adaptation)&&(_.limitToPlayerSize=S,d("Updated limitToPlayerSize to ".concat(S))))},getConfig:function(){var u=c.getConfig(!0).adaptation,d=u.qualityStabilityBalance,h=u.resolution,f=u.limitToPlayerSize;return{qualityStabilityBalance:d,resolution:p({},h),limitToPlayerSize:f}}}},c}()},89498:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};
14Object.defineProperty(u,"__esModule",{value:!0}),u.AdaptationHandler=void 0;var h=d(80813),f=d(98714),m=d(49859),g=d(91678),v=d(33436),y=d(86897),b=d(93204),S=d(79721),_=d(85434),E=d(70850),T=d(46057),w=d(47151),P=d(79505),A=d(49024),I=d(19119),M=d(43008),R=d(59113),k=d(7676);u.AdaptationHandler=function(){function c(c,u,d){var p,h,f=this;this.context=c,this.mimeType=u,this.constraints=d,this.jO=!1,this.lO=function(c){var u;return void 0===c&&(c=null==(u=f.hO)?void 0:u.getState()),c?(0,m.getPreferredBitrate)((0,m.getAdaptationState)(c),f.mimeType):null},this.aO=(0,A.createAdaptationLogic)(this.context,this.mimeType,{minBitrate:this.constraints.minBitrate,maxBitrate:this.constraints.maxBitrate},null==(h=null==(p=this.context.config)?void 0:p.adaptation)?void 0:h.logic),this.eO=this.BO(this.fO),this.sO()}return Object.defineProperty(c.prototype,"hO",{get:function(){var c=this.context.sourceContext.sourceIdentifier;return this.context.serviceManager.get(h.ServiceName.SourceStoreService,c)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"kO",{get:function(){var c=this.context.sourceContext.sourceIdentifier;return this.context.serviceManager.get(h.ServiceName.ManifestService,c)},enumerable:!1,configurable:!0}),c.prototype.mO=function(c,u,d){var p,h;return c?this.eO:u&&null!=(h=null==(p=this.aO.findRepresentationForBitrate(u,d))?void 0:p._internalId)?h:null},c.prototype.nO=function(c,u){var d,p=this.oO(),h=this.lO();return p||h?this.mO(p,h,u):null!=(d=this.aO.selectRepresentationID(c,u))?d:null},c.prototype.oO=function(){return!this.isAuto()&&!!this.tO(this.eO,this.qO())},c.prototype.pO=function(c){this.bO=c},c.prototype.qO=function(){var c,u,d;return null!=(d=null==(u=null==(c=this.kO)?void 0:c.getAdaptationSet(this.fO))?void 0:u.Representation)?d:[]},c.prototype.selectRepresentationID=function(c,u){void 0===c&&(c={});var d=this.uO(u??this.qO()),p=this.nO(c,d);return p&&this.pO(p),this.bO},c.prototype.rO=function(){var c=this,u=!!this.dO;this.hO&&!u&&(this.dO=(0,b.subscribe)(this.hO)(y.getBufferStateMap,function(u){var d,p,h=null==u?void 0:u[c.mimeType];if(h){var m=h.rendererRanges;m&&m.length>0&&(null==(d=c.hO)||d.dispatch((0,f.clearPreferredBitrateForMimeTypeAction)(c.mimeType)),null==(p=c.dO)||p.call(c),c.dO=void 0)}}))},c.prototype.sO=function(){var c=this;this.hO&&(this.lO()&&this.rO(),this.cO=(0,b.subscribe)(this.hO)(this.lO,function(){return c.rO()},function(c){return!!c}))},c.prototype.tO=function(c,u){var d;return u?u.find(function(u){return u._internalId.equals(c)}):null==(d=this.kO)?void 0:d.getRepresentationById(c)},c.prototype.uO=function(c){this.yO();var u=c.map(function(c){return{representation:c,bitrate:c._bandwidth,width:c._width,height:c._height}});return this.vO(u).map(function(c){return c.representation})},c.prototype.vO=function(c){var u=this,d=this.context.config.adaptation.resolution,p=d.minSelectableVideoHeight,h=d.maxSelectableVideoHeight,f=d.minSelectableVideoWidth,m=d.maxSelectableVideoWidth,g=c.filter(function(c){var d,g,v,y,b,S,_,E,T;return!((0,M.hasBitrate)(c)&&(d=c.bitrate,g=u.constraints.minBitrate,v=u.constraints.maxBitrate,!(d>=g)||!(d<=v)))&&(!(0,M.hasResolution)(c)||(y=c.width,b=f,S=m,y>=b&&y<=S&&(_=c.height,E=p,T=h,_>=E&&_<=T)))});if(g.length>0)return g;this.context.logger.debug("No selectable qualities found for mimeType ".concat(this.mimeType," within the given bitrate/resolution constraints! Falling back to alternative selection."));var v=this.wO(c);return v?[v]:c},c.prototype.wO=function(c){var u=0!==this.constraints.minBitrate,d=1/0!==this.constraints.maxBitrate,p=c.filter(M.hasBitrate);return u?(0,k.findMaximum)(p,function(c){return c.bitrate}):d?(0,k.findMinimum)(p,function(c){return c.bitrate}):_.MimeTypeHelper.isVideo(this.mimeType)?this.xO(c):void 0},c.prototype.xO=function(c){var u=this.context.config.adaptation.resolution,d=u.minSelectableVideoHeight,p=u.maxSelectableVideoHeight,h=u.minSelectableVideoWidth,f=u.maxSelectableVideoWidth,m=c.filter(M.hasResolution);return 0!==d?(0,k.findMaximum)(m,function(c){return c.height}):1/0!==p?(0,k.findMinimum)(m,function(c){return c.height}):0!==h?(0,k.findMaximum)(m,function(c){return c.width}):1/0!==f?(0,k.findMinimum)(m,function(c){return c.width}):void 0},c.prototype.yO=function(){_.MimeTypeHelper.isVideo(this.mimeType)&&(this.context.config.adaptation.limitToPlayerSize&&!this.jO?this.AO():!this.context.config.adaptation.limitToPlayerSize&&this.jO&&this.zO())},c.prototype.zO=function(){this.jO=!1,this.context.config.adaptation.onVideoAdaptation=this.iO},c.prototype.AO=function(){var c=this;this.jO=!0;var u=this.context.config.adaptation.onVideoAdaptation;this.iO=u,this.context.config.adaptation.onVideoAdaptation=u&&"function"==typeof u?function(d){var p,h,f;
14return d.suggested=(0,I.AdaptToPlayerResolution)(c.context.internalPlayer,d.suggested,null!=(h=null==(p=c.gO)?void 0:p.isFullscreen())&&h)||d.suggested,null!=(f=(0,E.safeUserCallback)(function(){return u(d)},c.context.logger))?f:d.suggested}:function(u){var d,p;return(0,I.AdaptToPlayerResolution)(c.context.internalPlayer,u.suggested,null!=(p=null==(d=c.gO)?void 0:d.isFullscreen())&&p)||u.suggested}},c.prototype.BO=function(c){return c?new P.RepresentationId(c,"auto"):new P.RepresentationId(new w.AdaptationSetId(S.DEFAULT_PERIOD_ID,this.mimeType),"auto")},c.prototype.CO=function(c){var u,d={id:c._id,bitrate:c._bandwidth,width:c._width,height:c._height};null==(u=this.context.store)||u.dispatch((0,g.addMetricsValue)(this.mimeType,v.MetricType.DownloadedAdaptationSet,d))},c.prototype.DO=function(){var c,u,d=this;if(this.kO){var h=this.kO.getAdaptationSet(this.fO);if(h){var f=p(p({},h),{Representation:this.uO(h.Representation),_minBandwidth:Math.max(null!=(c=h._minBandwidth)?c:0,this.constraints.minBitrate),_maxBandwidth:Math.min(null!=(u=h._maxBandwidth)?u:1/0,this.constraints.maxBitrate)});this.aO.setAdaptationSet(f),(0,T.yieldToMain)().then(function(){return d.CO(f)})}}else this.context.logger.debug("Could not update adaptation set in AdaptationHandler!")},c.prototype.EO=function(c){return this.fO&&c&&this.kO?this.kO.getRepresentation(this.fO,c):null},c.prototype.FO=function(){if(this.eO){var c=this.eO.representationId;this.eO=this.BO(this.fO);var u=this.EO(c);u&&(this.eO=u._internalId)}else this.eO=this.BO(this.fO)},c.prototype.setAdaptationSetId=function(c){c||this.context.logger.debug("newAdaptationSetId is ".concat(c)),this.fO=c,this.FO(),this.DO()},c.prototype.setFixedRepresentation=function(c){var u;if("auto"===c)this.eO=new P.RepresentationId(this.fO,"auto");else if(this.fO){var d=null==(u=this.kO)?void 0:u.getRepresentation(this.fO,c);d&&(this.eO=d._internalId,this.selectRepresentationID())}},c.prototype.getFixedRepresentation=function(){return this.bO},c.prototype.getLowestRepresentationId=function(){var c;return this.isAuto()?null==(c=this.aO.getLowestRepresentation())?void 0:c._internalId.representationId:this.eO.representationId},c.prototype.isAuto=function(){return"auto"===this.eO.representationId},c.prototype.shouldDownloadBeCancelled=function(c,u){var d,p,h,f,m,g,v,y=null!=(p=null==(d=this.context.config.adaptation)?void 0:d.disableDownloadCancelling)&&p,b=null!=(m=null==(f=null==(h=this.kO)?void 0:h.getAdaptationSet(this.fO))?void 0:f.Representation)?m:[],S=1===b.length,_=b.some(function(c){return!!c._bandwidth});if(!this.isAuto()||y||S||!_)return!1;var E=function(c){if(!(0,k.hasTotalBytes)(c))return 1/0;var u,d,p=(d=null!=(u=c.elapsedTime)?u:0,c.loadedBytes>0&&d>0?8*c.loadedBytes/1024/d:0);return p>0?8*c.totalBytes/1024/p:1/0}(c),T=(null!=(v=null==(g=c.responseTiming)?void 0:g.doneTimestamp)?v:0)>0,w=!!c.segmentDuration&&E>1.5*c.segmentDuration;return!(T||!w)&&(!(0,k.hasTotalBytes)(c)||!(c.loadedBytes>=.9*c.totalBytes))&&this.aO.shouldDownloadBeCancelled(c,u)},c.prototype.setStartupPhase=function(){this.aO.setStartupPhase()},c.prototype.addSample=function(c){this.aO.addSample(p({timestamp:Date.now()},c))},c.prototype.shutdown=function(){this.aO.shutdown()},c.prototype.dispose=function(){var c,u;this.shutdown(),this.aO.dispose(),null==(c=this.cO)||c.call(this),null==(u=this.dO)||u.call(this)},c.prototype.selectQualityBasedOnBitrateMeasurement=function(c){var u=this.vO(c),d=this.lO();if(d)return(0,R.findQualityForBitrate)(d,u);if(this.oO()){var p=this.uO(this.qO()),h=this.tO(this.bO,p);if(h)return(0,R.findQualityForBitrate)(h._bandwidth,u)}return(0,R.findQualityForBitrate)(this.aO.getCurrentBitrateMeasurement(),u)},c}()},49024:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.createAdaptationLogic=function(c,u,d,y){var b=d.minBitrate,S=d.maxBitrate;return void 0===y&&(y=p.AdaptationLogicType.DOWNLOAD_PREDICTION),c.logger.debug("Using adaptation logic ".concat(y)),y===p.AdaptationLogicType.LOW_LATENCY?new g.LowLatencyAbr(c,u):y===p.AdaptationLogicType.WISH?new v.WishLogic(c,u):y===p.AdaptationLogicType.DOWNLOAD_PREDICTION?new m.DownloadPredictionLogic(c,u):y===p.AdaptationLogicType.BUFFER_FILL_RATE?new h.BufferFillRateLogic(c,u):new f.BufferLogic(c,u,b||0,S||1/0)};var p=d(21281),h=d(48968),f=d(39201),m=d(85696),g=d(24296),v=d(7290)},49541:function(c,u,d){u.X=void 0;var p=d(85434),h=d(89498),f=d(83429);u.X=function(){function c(c){this.context=c,this.dm=new Map}return c.prototype.em=function(c){if(c){if(!this.dm.has(c)){var u,d,f=(u=this.context.settings,d={minBitrate:0,maxBitrate:1/0},p.MimeTypeHelper.isVideo(c)?(d.minBitrate=Number(u.MIN_SELECTABLE_VIDEO_BITRATE)||d.minBitrate,d.maxBitrate=Number(u.MAX_SELECTABLE_VIDEO_BITRATE)||d.maxBitrate):p.MimeTypeHelper.isAudio(c)&&(d.minBitrate=Number(u.MIN_SELECTABLE_AUDIO_BITRATE)||d.minBitrate,d.maxBitrate=Number(u.MAX_SELECTABLE_AUDIO_BITRATE)||d.maxBitrate),d);this.dm.set(c,new h.AdaptationHandler(this.context,c,f))}return this.dm.get(c)}},c.prototype.selectRepresentation=function(c,u,d){var p,h;return void 0===u&&(u={}),null!=(h=null==(p=this.em(c))?void 0:p.selectRepresentationID(u,d))?h:void 0},c.prototype.isAuto=function(c){var u,d;return null==(d=null==(u=this.em(c))?void 0:u.isAuto())||d},c.prototype.shouldDownloadBeCancelled=function(c,u,d){var p,h;return null!=(h=null==(p=this.em(c))?void 0:p.shouldDownloadBeCancelled(u,d))&&h},c.prototype.selectQualityBasedOnBitrateMeasurement=function(c,u){var d=u?this.dm.get(u):this.fm(),h=null;d||(h=u??p.MimeType.VideoMp4,d=this.em(h));var f=null==d?void 0:d.selectQualityBasedOnBitrateMeasurement(c);return h&&this.release(h),f??c[0]},c.prototype.fm=function(){var c=void 0;return this.dm.forEach(function(u,d){c&&!p.MimeTypeHelper.isVideo(d)||
14(c=u)}),c},c.prototype.setAdaptationSetId=function(c,u){var d;null==(d=this.em(c))||d.setAdaptationSetId(u)},c.prototype.setFixedRepresentation=function(c,u){var d;null==(d=this.em(c))||d.setFixedRepresentation(u)},c.prototype.getCurrentRepresentationId=function(c){var u,d;return null!=(d=null==(u=this.em(c))?void 0:u.getFixedRepresentation())?d:null},c.prototype.getLowestRepresentationId=function(c){var u;return null==(u=this.em(c))?void 0:u.getLowestRepresentationId()},c.prototype.setStartupPhase=function(c){var u;null==(u=this.em(c))||u.setStartupPhase()},c.prototype.shutdown=function(c){var u;null==(u=this.em(c))||u.shutdown()},c.prototype.addSample=function(c,u){var d;null==(d=this.em(c))||d.addSample(u)},c.prototype.getUserSelectedRepresentation=function(c,u,d){return(0,f.getUserSelectedRepresentation)(this.context,c,u,d)},c.prototype.release=function(c){var u;null==(u=this.dm.get(c))||u.dispose(),this.dm.delete(c)},c.prototype.dispose=function(){this.dm.forEach(function(c){return c.dispose()}),this.dm.clear()},c}()},81723:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.BaseAdaptationLogic=void 0;var h=d(46151),f=d(15971),m=d(85434),g=d(89927),v=d(88844),y=d(59113),b=d(59406),S=d(70238),_=d(7676);u.BaseAdaptationLogic=function(){function c(c,u){this.context=c,this.mimeType=u,this.lastRateMeasurement=0,this.availableRepresentations=[],this.startupPhase=!0,this.lastDownloadCancelled=!1,this.monitoringMimeType=this.getMonitoringMimeType()}return c.prototype.getMonitoringMimeType=function(){var c,u=null,d=null==(c=this.context.store)?void 0:c.getState();return d&&(u=Object.keys((0,h.getMetricsState)(d)).find(m.MimeTypeHelper.isVideo)),u??this.mimeType},c.prototype.updateAvailableRepresentations=function(c){c&&(this.availableRepresentations=c.map(function(c,u){return p(p({},c),{arrayIndex:u})}))},c.prototype.getAvailableRepresentations=function(){var c,u=this;return this.lastDownloadCancelled&&null!=(c=this.lastRepresentation)&&c._bandwidth?this.availableRepresentations.filter(function(c){var d=c._bandwidth;return u.lastRepresentation&&d<u.lastRepresentation._bandwidth}):this.availableRepresentations},c.prototype.setAdaptationSet=function(c){var u,d,p;if(this.updateAvailableRepresentations(c.Representation),this.lastRepresentation)this.lastRepresentation=this.findRepresentationForBitrate(this.lastRepresentation._bandwidth,c.Representation);else{var h=null==(p=null==(d=null==(u=(0,f.getSourceState)(this.context))?void 0:u.activeTracks)?void 0:d[c._internalId.adaptationSetId])?void 0:p.selectedRepresentationId;this.lastRepresentation=h?this.availableRepresentations.find(function(c){return c._internalId.equals(h)}):void 0}},c.prototype.findRepresentationForBitrate=function(c,u){var d,p;return this.updateAvailableRepresentations(u),null!=(p=null==(d=(0,y.findQualityForBitrate)(c,this.getAvailableRepresentations().map(function(c){return{rep:c,bitrate:Number(c._bandwidth)}})))?void 0:d.rep)?p:this.getLowestRepresentation()},c.prototype.checkStartupPhase=function(c){this.startupPhase&&this.ygb(c)},c.prototype.getLowestRepresentation=function(){return(0,_.getLowestRepresentation)(this.availableRepresentations)},c.prototype.ygb=function(c){var u=this,d=this.context.bufferSettings.getForwardTargetLevel();this.startupPhaseTimerID||(this.startupPhaseTimerID=window.setTimeout(function(){u.context.logger.insane("startup phase timed out... moving to normal adaptation"),u.startupPhase=!1,u.startupPhaseTimerID=void 0},(0,g.toMilliSeconds)(d))),c.value>=.5*d&&(this.context.logger.insane("startup is over as steady phase has been reached... moving to normal adaptation"),(0,v.clearTimeoutIfDefined)(this.startupPhaseTimerID),this.startupPhase=!1,this.startupPhaseTimerID=void 0)},c.prototype.getRepresentationForNormalChange=function(c,u,d){return this.startupPhase||!d?this.getRepresentationForRateMeasurement(S.SwitchingAggressiveness.Mid):this.getRepresentationToSwitchTo(u.result,c.result)},c.prototype.getCurrentBitrate=function(c){return this.lastDownloadCancelled?this.lastRateMeasurement:c.value},c.prototype.getRepresentationToSwitchTo=function(c,u){if(this.lastDownloadCancelled)return this.switchDown(S.SwitchingAggressiveness.VeryHigh);switch(c){case b.Rules.SHOULD_SWITCH_UP:return this.ifFillStateHigh(u);case b.Rules.SHOULD_STAY:return this.ifFillStateMid(u);case b.Rules.SHOULD_SWITCH_DOWN:return this.ifFillStateLow(u);default:return this.context.logger.insane("unknown fill state result, keep the current representation"),this.useLastRepresentation()}},c.prototype.switchUp=function(c){if(void 0===c&&(c=S.SwitchingAggressiveness.Conservative),(null==(u=this.lastRepresentation)?void 0:u.arrayIndex)!==void 0&&this.lastRepresentation.arrayIndex>=this.availableRepresentations.length-1)return this.lastRepresentation;var u,d=this.getRepresentationForRateMeasurement(c);return this.lastRepresentation&&Number(d._bandwidth)<=Number(this.lastRepresentation._bandwidth)?this.lastRepresentation:(this.context.logger.insane("switching up to "+d._id),d)},c.prototype.switchDown=function(c){if(void 0===c&&(c=S.SwitchingAggressiveness.VeryHigh),(null==(u=this.lastRepresentation)?void 0:u.arrayIndex)!==void 0&&(null==(d=this.lastRepresentation)?void 0:d.arrayIndex)<1&&(null==(p=this.lastRepresentation)?void 0:p._id)!==null)return this.context.logger.insane(this.mimeType+" is already on the lowest quality, can not switch to lower quality."),this.lastRepresentation;var u,d,p,h,f=this.getRepresentationForRateMeasurement(c);return this.lastRepresentation&&(!f||f._bandwidth>=(null==(h=this.lastRepresentation)?void 0:h._bandwidth))?(f=this.getOneRepresentationLower(),this.context.logger.insane("step-wise switch down to "+f._id)):this.context.logger.insane("switching down to "+f._id),f},c.prototype.stay=function(){var c;return null!=(c=this.lastRepresentation)?c:this.getLowestRepresentation()},c.prototype.ifFillStateHigh=function(c){switch(c){case b.Rules.SHOULD_SWITCH_UP:return this.switchUp(S.SwitchingAggressiveness.VeryHigh);case b.Rules.SHOULD_STAY:return this.switchUp(S.SwitchingAggressiveness.High);case b.Rules.SHOULD_SWITCH_DOWN:return this.stay();default:return this.context.logger.insane("unknown fill rate result, keep the current representation"),this.stay()}},c.prototype.ifFillStateMid=function(c){switch(c){case b.Rules.SHOULD_SWITCH_UP:return this.switchUp(S.SwitchingAggressiveness.Mid);case b.Rules.SHOULD_STAY:return this.stay();case b.Rules.SHOULD_SWITCH_DOWN:return this.switchDown(S.SwitchingAggressiveness.High);default:return this.context.logger.insane("unknown fill rate result, keep the current representation"),this.stay()}},c.prototype.ifFillStateLow=function(c){switch(c){case b.Rules.SHOULD_SWITCH_UP:return this.stay();case b.Rules.SHOULD_STAY:return this.switchDown(S.SwitchingAggressiveness.High);case b.Rules.SHOULD_SWITCH_DOWN:return this.switchDown(S.SwitchingAggressiveness.VeryHigh);default:return this.context.logger.insane("unknown fill rate result, keep the current representation"),this.stay()}},c.prototype.useLastRepresentation=function(){var c;return null!=(c=this.lastRepresentation)&&c._id?this.lastRepresentation:this.getLowestRepresentation()},c.prototype.getOneRepresentationLower=function(){var c,u,d=Math.max(0,(null!=(u=null==(c=this.lastRepresentation)?void 0:c.arrayIndex)?u:0)-1);return this.availableRepresentations[d]},c}()},48968:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.
14setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.BufferFillRateLogic=void 0;var f=d(46151),m=d(33436),g=d(88844),v=d(81723),y=d(4865),b=d(20066),S=d(64463),_=d(70238);u.BufferFillRateLogic=function(c){function u(u,d){var p=c.call(this,u,d)||this;return p.Aeb=0,p.shouldDownloadBeCancelled=function(c,u){var d,h;return(null==(d=p.lastRepresentation)?void 0:d.arrayIndex)!==0&&p.Feb()._id!==(null==(h=p.lastRepresentation)?void 0:h._id)&&(p.lastDownloadCancelled=!0,!0)},p.zeb={bufferFillRate:new b.BufferFillRateRule(p.context,p.monitoringMimeType),bufferFillState:(0,S.BufferFillStateRule)(p.context,p.monitoringMimeType),rateMeasurement:new y.BlockBasedRateMeasurementRule(p.context,p.monitoringMimeType)},p}return h(u,c),u.prototype.getRepresentationForRateMeasurement=function(c){void 0===c&&(c=_.SwitchingAggressiveness.Mid);var u=this.zeb.rateMeasurement.getStatus(c),d=this.context.settings.RATE_SAFETY_MARGIN_PERCENTAGE/100,p=u.value*(1-d);return this.findRepresentationForBitrate(p)},u.prototype.addSample=function(c){Object.values(this.zeb).forEach(function(u){return u.addSample(c)})},u.prototype.Beb=function(c){var u=this.switchDown(_.SwitchingAggressiveness.VeryHigh);return this.context.logger.insane("connection dropped more than half, use aggressive adaptation [last="+this.lastRateMeasurement/1024+"kbps, current="+c/1024+"], using "+u._id),u},u.calcEstimatedDownloadDuration=function(c,u,d,p){var h=parseFloat((d*c/u).toFixed(2));return p&&(h*=2),1.1*h},u.prototype.Ceb=function(c,d,p,h,f){var m=u.calcEstimatedDownloadDuration(p,c,d,f);return m<h||m<=p},u.prototype.Deb=function(c,u,d,p){var h,f,m,g,v=null==c?void 0:c.hlsDependentSegments;if(v&&(null==(h=this.lastRepresentation)?void 0:h._id)!==null&&(null==(f=this.lastRepresentation)?void 0:f.arrayIndex)!==u.arrayIndex){var y=Math.min.apply(null,this.availableRepresentations.map(function(c){return Number(c._bandwidth)})),b=Number(u._bandwidth);if(!(isFinite(b)&&b===y||this.Ceb(d,u._bandwidth,c.segmentDuration,p,v))){for(var S=!1,_=null!=(m=u.arrayIndex)?m:-1;_>=0;_--){var E=this.availableRepresentations[_];if(this.Ceb(d,E._bandwidth,c.segmentDuration,p,v)){this.context.logger.insane("fall back to "+E.arrayIndex),u=E,S=!0;break}}S||(this.context.logger.insane("keep old rep for now, not switching from "+(null==(g=this.lastRepresentation)?void 0:g.arrayIndex)+" to "+u.arrayIndex),u=this.useLastRepresentation())}}return u},u.prototype.Eeb=function(c){var u,d=this.lastRateMeasurement>0&&2*c<=this.lastRateMeasurement;return d&&null!=(u=this.lastRepresentation)&&u._id?1.5*c<this.lastRepresentation._bandwidth:d},u.prototype.Feb=function(c){var u,d,p=this.context.store.getState();p&&(d=(0,f.getMetricsState)(p));var h,g=this.zeb.bufferFillState.getStatus(),v=this.zeb.bufferFillRate.getStatus(),y=this.zeb.rateMeasurement.getStatus(1).value,b=null!=d&&this.context.bufferSettings.getForwardTargetLevel()>d.default.bufferLogicActivationThreshold,S=this.Eeb(y);this.checkStartupPhase(g),h=S?this.Beb(y):this.getRepresentationForNormalChange(v,g,b);var E=(0,f.getMetricsLastEntry)(d??{},this.mimeType,m.MetricType.StalledSeconds).value;return E>this.Aeb?(this.Aeb=E,this.switchDown(_.SwitchingAggressiveness.MidHigh)):(h=this.Deb(c,h,y,g.value),this.lastRateMeasurement=y,this.lastDownloadCancelled&&void 0!==h.arrayIndex&&(null==(u=this.lastRepresentation)?void 0:u.arrayIndex)!==void 0&&h.arrayIndex>=this.lastRepresentation.arrayIndex&&(h=this.getOneRepresentationLower(),this.lastDownloadCancelled=!1),h)},u.prototype.selectRepresentationID=function(c,u){return this.updateAvailableRepresentations(u),this.lastRepresentation=this.Feb(c),this.lastRepresentation._internalId},u.prototype.setAdaptationSet=function(u){var d;c.prototype.setAdaptationSet.call(this,u),null!=this.lastRepresentation||(this.lastRepresentation={_id:null,_bandwidth:0,arrayIndex:-1})},u.prototype.getCurrentBitrateMeasurement=function(){return this.getCurrentBitrate(this.zeb.rateMeasurement.getStatus())},u.prototype.getAvailableRepresentations=function(){return this.availableRepresentations},u.prototype.setStartupPhase=function(){this.startupPhase=!0,(0,g.clearTimeoutIfDefined)(this.startupPhaseTimerID),this.startupPhaseTimerID=void 0,Object.values(this.zeb).forEach(function(c){return c.setStartupPhase()})},u.prototype.shutdown=function(){(0,g.clearTimeoutIfDefined)(this.startupPhaseTimerID),this.startupPhaseTimerID=void 0,this.lastDownloadCancelled=!1,Object.values(this.zeb).forEach(function(c){return c.shutdown()})},u.prototype.dispose=function(){this.shutdown(),Object.values(this.zeb).forEach(function(c){return c.dispose()}),this.zeb={},this.lastRepresentation=void 0,this.availableRepresentations=[]},u}(v.BaseAdaptationLogic)}
14,39201:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLogic=void 0;var p=d(85434),h=d(96533),f=d(7676);u.BufferLogic=function(){function c(c,u,d,h){this.context=c,this.mimeType=u,this.minSelectableBitrate=d,this.maxSelectableBitrate=h,this.Ufb=[],this.Geb=p.MimeTypeHelper.getMediaType(this.mimeType),this.Jeb={timestamp:Date.now(),bufferLevel:0,bufferTargetLevel:0}}return c.prototype.Vfb=function(c){c&&(this.Ufb=c)},c.prototype.Wfb=function(){return(0,h.findLowestPossibleBandwidthFromRepresentations)(this.Ufb,this.minSelectableBitrate)},c.prototype.Xfb=function(){var c;return null==(c=this.findRepresentationForBitrate(this.maxSelectableBitrate))?void 0:c._bandwidth},c.prototype.Yfb=function(){return this.context.bufferSettings.getForwardTargetLevel(this.Geb)},c.prototype.Zfb=function(){var c=this.Wfb(),u=this.Xfb();return this.Ieb=this.Yfb(),function(c,u,d){var p=[];0===u&&(u=c);var h=2*Math.floor(.1*d),f=8*Math.floor(.1*d);f<=h&&(f=Math.floor(.9*d)),h<=1&&(h=1);for(var m=(u-c)/(f-h),g=c-m*h,v=0;v<h;v++)p[v]=c;for(v=h;v<f;v++)p[v]=Math.floor(m*v+g);for(v=f;v<=d;v++)p[v]=u;return p}(c,u||c,this.Ieb)},c.prototype.afb=function(){var c=this.Yfb();this.Ieb!==c&&(this.Heb=this.Zfb())},c.prototype.findRepresentationForBitrate=function(c,u){return this.Vfb(u),(0,h.getMatchingRepresentationByBandwidth)(this.Ufb,c)},c.prototype.bfb=function(){var c,u=this.Yfb(),d=this.Jeb.bufferLevel;return(d=Math.floor(d))>u&&(d=u),c=this.Heb.hasOwnProperty(d)?this.Heb[d]:this.Heb[0],this.findRepresentationForBitrate(c)},c.prototype.selectRepresentationID=function(c,u){this.Vfb(u);var d=this.bfb();return this.afb(),d._internalId},c.prototype.setAdaptationSet=function(c){this.Vfb(c.Representation),this.Heb=this.Zfb()},c.prototype.shouldDownloadBeCancelled=function(){return!1},c.prototype.setStartupPhase=function(){},c.prototype.shutdown=function(){},c.prototype.addSample=function(c){this.Jeb=c},c.prototype.dispose=function(){this.Heb=[]},c.prototype.getCurrentBitrateMeasurement=function(){return 0},c.prototype.getLowestRepresentation=function(){return(0,f.getLowestRepresentation)(this.Ufb)},c}()},11958:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.CancellableAdaptationLogic=void 0;var f=d(80813),m=d(4131),g=d(21281),v=d(46151),y=d(33436),b=d(81199),S=d(81723),_=d(39185),E=d(45199),T=d(17006),w=d(70238),P=d(7676);function A(c){var u,d,p,h,f=null!=(d=null==(u=c.responseTiming)?void 0:u.openedTimestamp)?d:-1,m=null!=(h=null==(p=c.responseTiming)?void 0:p.headersReceivedTimestamp)?h:-1;return f<0||m<0?0:m-f}function I(c,u){var d=c.filter(function(c){return c.value.representationId.equals(u)}).slice(-3).map(function(c){return c.value.time});return(0,T.calculateExponentialWeightedAverage)(d,.8)}u.CancellableAdaptationLogic=function(c){function u(u,d){var p=c.call(this,u,d)||this;return p.shouldDownloadBeCancelled=function(c,u){var d,h,f,g,v=null!=(f=c.elapsedTime)?f:-1,y=null==(g=p.Fgb)?void 0:g.isPaused(),b=p.isStartupBitrateInEffect(),S=(h=null!=(d=c.elapsedTime)?d:-1)<0?0:h-A(c),_=p.Ggb(u),E=(0,m.hasLoadedData)(c),T=E?S>p.context.settings.MIN_EFFECTIVE_SEGMENT_DOWNLOAD_TIME:v>p.context.settings.MIN_EFFECTIVE_SEGMENT_DOWNLOAD_TIME;return!(y||b||_||!T)&&p.Tgb(c,S,E,v)},p.timeToFirstByteMeasurementRule=new E.TimeToFirstByteMeasurementRule(p.context,p.monitoringMimeType),p.rateMeasurementRule=new _.SegmentBasedRateMeasurementRule(p.context,p.monitoringMimeType),p}return h(u,c),Object.defineProperty(u.prototype,"Egb",{get:function(){return this.context.serviceManager.get(f.ServiceName.ManifestService,this.context.sourceContext.sourceIdentifier)}
14,enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"Fgb",{get:function(){return this.context.serviceManager.get(f.ServiceName.PlayerStateService)},enumerable:!1,configurable:!0}),u.prototype.setAdaptationSet=function(u){c.prototype.setAdaptationSet.call(this,u),this.previousRequestProgress=void 0},u.prototype.isStartupBitrateInEffect=function(){var c,u=this.context.store.getState(),d=u?(0,v.getMetricsHistoryFromInstanceState)(u,this.mimeType,y.MetricType.DownloadInformation):[],p=!!(null!=(c=this.context.config.adaptation)&&c.startupBitrate),h=d.filter(function(c){return!!c.value}).length>0;return p&&!h},u.prototype.Ggb=function(c){return!!c&&this.getLowestRepresentation()._internalId.equals(c)},u.prototype.Hgb=function(){return(0,b.getPlayableBufferLevel)(this.context.internalPlayer)},u.prototype.estimateTimeToFirstByte=function(c){var u,d,p;switch(void 0===c&&(c=0),u=0!==c?this.timeToFirstByteMeasurementRule.estimateStatus(c,5,.2).value:this.timeToFirstByteMeasurementRule.getStatus(5,.2).value,null!=(p=null==(d=this.context.config.adaptation)?void 0:d.rttEstimationMethod)?p:g.RttEstimationMethod.WeightedAverage){case g.RttEstimationMethod.Median:return u.median;case g.RttEstimationMethod.WeightedAverage:default:return u.standardDeviation>u.mean?u.mean+u.standardDeviation:u.weightedAverage}},u.prototype.Igb=function(c,u,d,p,h,f){var m,g,b,S,_,E,w,P,A,M,R,k,x,C=null!=(P=null==(w=this.Egb)?void 0:w.isManifestFetchRequired(c))&&P,O=!this.Kgb(c),D=null!=(A=null==f?void 0:f.hlsDependentSegments)&&A,L=null!=(R=null==(M=this.Egb)?void 0:M.getRepresentationById(c))?R:null,N=!!this.lastRepresentation&&(null==(k=this.lastRepresentation)?void 0:k._id)!==null&&(null==(x=this.lastRepresentation)?void 0:x.arrayIndex)!==(null==L?void 0:L.arrayIndex),U=this.context.store.getState(),F=p*u/d+
14h;return F+=(m=this.mimeType,g=U?(0,v.getMetricsState)(U):{},I((0,v.getMetricsHistory)(g,m,y.MetricType.DecryptionTime),c)+I((0,v.getMetricsHistory)(g,m,y.MetricType.TransmuxingTime),c)),D&&N&&(F*=2),O&&(F+=h),C&&(F+=Math.max((S=b=U?(0,v.getMetricsState)(U):{},_=(0,v.getMetricsHistory)(S,"default",y.MetricType.DownloadInformation).slice(-3).map(function(c){return c.value.time}),(0,T.calculateExponentialWeightedAverage)(_,.8)+(E=(0,v.getMetricsHistory)(b,"default",y.MetricType.ProcessingTime).slice(-3).map(function(c){return c.value}),(0,T.calculateExponentialWeightedAverage)(E,.8))),h)),F},u.prototype.Jgb=function(c,u,d,p){var h=1-this.context.settings.DOWNLOAD_DURATION_SAFETY_MARGIN,f=(p?this.context.settings.MAXIMUM_DOWNLOAD_DURATION_MULTIPLIER_SAME_QUALITY:this.context.settings.MAXIMUM_DOWNLOAD_DURATION_MULTIPLIER)-h;return Math.min(c*(h+Math.min(u,d)*f/d),d)},u.prototype.isDownloadFeasible=function(c,u,d,p,h,f,m){var g,v=c.arrayIndex===(null==(g=this.lastRepresentation)?void 0:g.arrayIndex),y=this.Jgb(d,f,m,v);return this.Igb(c._internalId,d,u,c._bandwidth,h,{hlsDependentSegments:p})<=y},u.prototype.Kgb=function(c){var u,d,p=this.context.store.getState(),h=p?(0,v.getMetricsHistoryFromInstanceState)(p,this.mimeType,y.MetricType.CachedInitSegments):[];return 0===h.length?null!=(d=null==(u=this.Egb)?void 0:u.hasSelfInitialisingSegments())&&d:h.some(function(u){var d=u.hasOwnProperty("value")&&u.value.hasOwnProperty("internalRepId")?u.value.internalRepId:null;return null!==d&&d.equals(c)})},u.prototype.Lgb=function(c,u,d){var p=this;void 0===d&&(d=this.estimateTimeToFirstByte());var h=this.availableRepresentations.filter(function(c){var u;return p.lastRepresentation&&!c._internalId.equals(null==(u=p.lastRepresentation)?void 0:u._internalId)});return Math.min.apply(Math,h.map(function(h){var f;return p.Igb(h._internalId,null!=(f=p.lastSegmentInfo?p.lastSegmentInfo.segmentDuration:u)?f:0,c,h._bandwidth,d,p.lastSegmentInfo)}))},u.prototype.Mgb=function(c){var u,d,p,h,f,m,g=null!=(u=c.elapsedTime)?u:0,v=(null==(d=this.previousRequestProgress)?void 0:d.url)===c.url?(c.loadedBytes-(null!=(h=null==(p=this.previousRequestProgress)?void 0:p.loadedBytes)?h:0))/(g-(null!=(m=null==(f=this.previousRequestProgress)?void 0:f.elapsedTime)?m:0)):-1;return this.previousRequestProgress=c,v},u.prototype.Ngb=function(c,u){var d,p=u?A(c):null!=(d=c.elapsedTime)?d:0;return this.estimateTimeToFirstByte(p)},u.prototype.Ogb=function(c){return void 0===c&&(c=4),this.lastRepresentation?this.lastRepresentation._bandwidth/8*c*1.2:0},u.prototype.Pgb=function(c,u){var d=(0,m.hasLoadedData)(c),p=d?this.Mgb(c):0,h=d&&(0,P.hasTotalBytes)(c)?c.totalBytes-c.loadedBytes:this.Ogb(c.segmentDuration);return Math.min(h/(u/8),p>0?h/p:1/0)},u.prototype.Qgb=function(c,u,d){if((0,m.hasLoadedData)(c))return c.loadedBytes/u*8;var p=this.context.bufferSettings.getForwardTargetLevel(),h=this.rateMeasurementRule.getStatus(w.SwitchingAggressiveness.Mid,d/p);return this.getCurrentBitrate(h)},u.prototype.Rgb=function(c,u,d,p,h){var f=this.Pgb(p,d);return f>u&&f>h&&u<=h+c},u.prototype.Sgb=function(c,u,d,p){var h,f;return(null==(f=null==(h=this.Fgb)?void 0:h.isPlay())||!f)&&p>Math.max(c,3*this.timeToFirstByteMeasurementRule.getStatus(5,.2).value.mean)&&u<=d+c},u.prototype.Tgb=function(c,u,d,p){var h,f,m,g=this.Hgb(),v=this.Qgb(c,u,g),y=this.Ngb(c,d),b=null!=(m=null!=(h=c.segmentDuration)?h:null==(f=this.lastSegmentInfo)?void 0:f.segmentDuration)?m:0,S=this.Lgb(v,b,y);if(d?this.Rgb(b,g,v,c,S):this.Sgb(b,g,S,p)){var _=(0,P.hasTotalBytes)(c)?(c.loadedBytes/c.totalBytes*100).toFixed(1):void 0;return this.context.logger.debug("Cancelling download after ".concat(p.toFixed(2),"s, bw: ").concat((0,P.toKbps)(v).toFixed(2),"kbps, buffer: ").concat(g.toFixed(2),"s, ").concat(d?"".concat(_,"% progress"):"headers not received")),this.lastDownloadCancelled=!0,this.lastRateMeasurement=v,!0}return!1},u}(S.BaseAdaptationLogic)},85696:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});
14Object.defineProperty(u,"__esModule",{value:!0}),u.DownloadPredictionLogic=void 0;var f=d(13531),m=d(70962),g=d(46151),v=d(88844),y=d(11958),b=d(64463),S=d(43829),_=d(70238),E=d(7676);u.DownloadPredictionLogic=function(c){function u(u,d){var p=c.call(this,u,d)||this;return p.cfb=new S.DownloadRateRule(p.context,p.monitoringMimeType),p.dfb=(0,b.BufferFillStateRule)(p.context,p.monitoringMimeType),p}return h(u,c),u.prototype.getRepresentationForRateMeasurement=function(c){void 0===c&&(c=_.SwitchingAggressiveness.Mid);var u=this.context.bufferSettings.getForwardTargetLevel(),d=this.dfb.getStatus().value,p=this.rateMeasurementRule.getStatus(c,d/u),h=this.getCurrentBitrate(p),f=(0,E.adjustRateToSafetyMargin)(h,this.context.settings.RATE_SAFETY_MARGIN_PERCENTAGE);return this.findRepresentationForBitrate(f)},u.prototype.getCurrentBitrateMeasurement=function(){var c=this.getCurrentBitrate(this.rateMeasurementRule.getStatus());return(0,E.adjustRateToSafetyMargin)(c,this.context.settings.RATE_SAFETY_MARGIN_PERCENTAGE)},u.prototype.addSample=function(c){this.cfb.addSample(c),this.dfb.addSample(c),this.rateMeasurementRule.addSample(),this.timeToFirstByteMeasurementRule.addSample()},u.prototype.efb=function(c,u,d,p,h){var f=this;if(!c.segmentDuration||this.isStartupBitrateInEffect())return u;this.lastSegmentInfo=c;var m=this.availableRepresentations.filter(function(c){return c._bandwidth<=u._bandwidth});if(0===m.length)return this.availableRepresentations[0];var g=h.value||0,v=this.context.bufferSettings.getForwardTargetLevel(),y=(0,E.adjustRateToSafetyMargin)(d,this.context.settings.RATE_SAFETY_MARGIN_PERCENTAGE),b=m.filter(function(u){var d;return f.isDownloadFeasible(u,y,null!=(d=c.segmentDuration)?d:0,!1,p,g,v)});return 0===b.length?m[0]:b[b.length-1]},u.prototype.ffb=function(c,u,d,p){this.checkStartupPhase(u);var h,f,v=this.context.store.getState(),y=null!=(f=null==(h=(v?(0,g.getMetricsState)(v):{}).default)?void 0:h.bufferLogicActivationThreshold)?f:m.DefaultSettings.BUFFER_LOGIC_ACTIVATION_THRESHOLD,b=this.context.bufferSettings.getForwardTargetLevel()>y,S=this.getRepresentationForNormalChange(d,u,b);if(p){var _=this.estimateTimeToFirstByte();S=this.efb(p,S,c,_,u)}return S},u.prototype.selectRepresentationID=function(c,u){this.updateAvailableRepresentations(u);var d,p,h,m,g=this.rateMeasurementRule.getStatus(),v=this.getCurrentBitrate(g),y=this.dfb.getStatus(),b=this.cfb.getStatus(),S=this.ffb(v,y,b,c);return this.lastRepresentation&&!(null!=(p=null==(d=this.lastRepresentation)?void 0:d._internalId)&&p.equals(null==S?void 0:S._internalId))&&this.context.logger.isLevelEnabled(f.LogLevel.DEBUG)&&this.context.logger.debug("Switching from ".concat(null==(h=this.lastRepresentation)?void 0:h._internalId.representationId," to ").concat(null==S?void 0:S._internalId.representationId," (currentRate: ").concat((0,E.toMbps)(v).toFixed(2)+"mbps",", fillState: ").concat(y.value.toFixed(2),", fillRate: ").concat(b.value.toFixed(2),")")),this.lastRepresentation=S,this.lastRateMeasurement=v,this.lastDownloadCancelled=!1,this.previousRequestProgress=void 0,null==(m=this.lastRepresentation)?void 0:m._internalId},u.prototype.setStartupPhase=function(){var c,u,d,p;this.startupPhase=!0,(0,v.clearTimeoutIfDefined)(this.startupPhaseTimerID),this.startupPhaseTimerID=void 0,null==(c=this.cfb)||c.setStartupPhase(),null==(u=this.dfb)||u.setStartupPhase(),null==(d=this.rateMeasurementRule)||d.setStartupPhase(),null==(p=this.timeToFirstByteMeasurementRule)||p.setStartupPhase()},u.prototype.shutdown=function(){var c,u,d,p;(0,v.clearTimeoutIfDefined)(this.startupPhaseTimerID),this.startupPhaseTimerID=void 0,this.lastDownloadCancelled=!1,this.previousRequestProgress=void 0,null==(c=this.cfb)||c.shutdown(),null==(u=this.dfb)||u.shutdown(),null==(d=this.rateMeasurementRule)||d.shutdown(),null==(p=this.timeToFirstByteMeasurementRule)||p.shutdown()},u.prototype.dispose=function(){var c,u,d,p;this.shutdown(),null==(c=this.cfb)||c.dispose(),null==(u=this.dfb)||u.dispose(),null==(d=this.rateMeasurementRule)||d.dispose(),null==(p=this.timeToFirstByteMeasurementRule)||p.dispose(),this.lastRepresentation=void 0,this.availableRepresentations=[]},u}(y.CancellableAdaptationLogic)}
14,76344:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.AdaptationModuleDefinition=void 0;var p=d(62756),h=d(98154),f=d(7676);u.AdaptationModuleDefinition={name:p.ModuleName.ABR,module:function(){return{AdaptationService:d(49541).X,AdaptToPlayerResolution:d(19119).AdaptToPlayerResolution,AdaptationUtils:f,AdaptationApiFactory:h.AdaptationApiFactory}},dependencies:[p.ModuleName.EngineBitmovin]},u.default=u.AdaptationModuleDefinition},19119:function(c,u){function d(c){return c&&c.clientWidth&&c.clientHeight?{width:c.clientWidth*devicePixelRatio,height:c.clientHeight*devicePixelRatio}:null}Object.defineProperty(u,"__esModule",{value:!0}),u.AdaptToPlayerResolution=function(c,u,p){var h,f,m=function(c,u){var p=u.getVideoElement();if(!p)return null;var h=p.parentElement,f=h&&h.querySelector("#bitmovinplayer-vr-canvas");return c?{width:screen.width*devicePixelRatio,height:screen.height*devicePixelRatio}:d(p)||f&&d(f)||h&&d(h)}(p,c);if(!m)return u;var g=null!=(f=c.getAvailableVideoQualities())?f:[],v=g.find(function(c){return c.id===u});if(!v)return u;var y=(h=v.bitrate,g.filter(function(c){var u,d=c.bitrate<=h,p=(u=c.width/c.height,m.width/m.height<u?c.width>=m.width:c.height>=m.height);return d&&p}));return 0===y.length?u:y[Math.max(0,y.findIndex(function(c){return c.width>y[0].width&&c.height>y[0].height})-1)].id}},43008:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.hasBitrate=function(c){return null!=c.bitrate},u.hasBitrateBounds=function(c){return null!=c.minBitrate&&null!=c.maxBitrate},u.hasResolution=function(c){return null!=c.height&&null!=c.width}},59113:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.findQualityForBitrate=function(c,u){if(u&&0!==u.length)return f.invalidate(),u.reduce(function(u,d){var p=f(d),h=f(u);return h>c||p>c?p>h?u:d:p>h?d:u})};var p=d(84568),h=d(43008),f=(0,p.memoize)(function(c){return(0,h.hasBitrate)(c)&&c.bitrate>0?c.bitrate:(0,h.hasBitrateBounds)(c)?(c.maxBitrate+c.minBitrate)/2:0})},17006:function(c,u){function d(c){return c.length>0?c.reduce(function(c,u){return c+u},0)/c.length:0}Object.defineProperty(u,"__esModule",{value:!0}),u.calculateExponentialWeightedAverage=void 0,u.calculateMean=d,u.calculateStandardDeviation=function(c,u){if(void 0===u&&(u=d(c)),c.length<2)return 0;var p=c.reduce(function(c,d){return c+Math.pow(d-u,2)},0);return Math.sqrt(1/(c.length-1)*p)},u.calculateMedian=function(c){var u=c.slice(0).sort(function(c,u){return c-u});return 0===u.length?0:u.length%2==1?u[Math.floor(u.length/2)]:.5*(u[u.length/2-1]+u[u.length/2])},u.calculateExponentialWeightedAverage=function(c,d,p){return void 0===p&&(p=c.length-1),0===c.length||p<0?0:0===p||0===d?c[p]:d*c[p]+(1-d)*(0,u.calculateExponentialWeightedAverage)(c,d,p-1)}},70238:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.SwitchingAggressiveness=void 0,(p=d||(u.SwitchingAggressiveness=d={}))[p.Conservative=10]="Conservative",p[p.VeryLow=8]="VeryLow",p[p.Low=7]="Low",p[p.LowMid=6]="LowMid",p[p.Mid=5]="Mid",p[p.MidHigh=4]="MidHigh",p[p.High=3]="High",p[p.VeryHigh=2]="VeryHigh",p[p.Extreme=1]="Extreme"},7676:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.toMbps=u.toKbps=u.findMaximum=u.findMinimum=void 0,u.getMaxStartupBitrateFromConfig=function(c){var u,d=null==(u=c.config)?void 0:u.adaptation;if(!d)return 0;var h=d.maxStartupBitrate?p.Util.extractBitrateFromString("max",d.maxStartupBitrate):1/0;return!isNaN(h)&&isFinite(h)?h:0},u.getStartupBitrateFromConfig=function(c){var u,d,h,f=null==(h=c.config)?void 0:h.adaptation,m=c.settings;if(!f||!m)return 0;var g=f.startupBitrate||0;if(!g)return 0;var v=(u=m.RATE_SAFETY_MARGIN_PERCENTAGE,p.Util.extractBitrateFromString("min",g)*(1+u/100)+8);return!isNaN(v)&&isFinite(v)?v:0},u.findExtremum=h,u.hasTotalBytes=function(c){return void 0!==c.totalBytes},u.adjustRateToSafetyMargin=function(c,u){return c*(1-u/100)},u.getLowestRepresentation=function(c){return(0,u.findMinimum)(c,function(c){return c._bandwidth})};var p=d(70850);function h(c,u){return c[c.reduce(function(d,p,h){return u(c[d],c[h])?d:h},0)]}var f=function(c){return c};u.findMinimum=function(c,u){return void 0===u&&(u=f),h(c,function(c,d){return u(c)<u(d)})},u.findMaximum=function(c,u){return void 0===u&&(u=f),h(c,function(c,d){return u(c)>u(d)})},u.toKbps=function(c){return c/1024},u.toMbps=function(c){return c/1048576}},7290:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.
14setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.WishLogic=void 0;var f=d(44468),m=d(70962),g=d(46151),v=d(33436),y=d(85434),b=d(88844),S=d(11958),_=d(59113),E=d(59406),T=d(70238),w=d(7676),P=d(47577);u.WishLogic=function(c){function u(u,d){var p=c.call(this,u,d)||this;return p.context=u,p.mimeType=d,p.hfb=[],p.ifb=[],p.jfb=0,p.ofb(),p.gfb=u.settings.WISH_ABR_PARAMS,p}return h(u,c),Object.defineProperty(u.prototype,"kfb",{get:function(){var c,u=y.MimeTypeHelper.isVideo(this.mimeType)?f.MediaType.Video:f.MediaType.Audio,d=null!=(c=this.context.internalPlayer.bufferApi.getLevel(f.BufferType.ForwardDuration,u).level)?c:0;return d>this.context.bufferSettings.getTargetLevel(f.BufferType.ForwardDuration,u)+this.jfb?0:d},enumerable:!1,configurable:!0}),u.prototype.ofb=function(){var c=this.context.settings.WISH_ABR_PARAMS.BITRATE_MODIFIER_FUNCTION_TYPE,u=this.context.settings.WISH_ABR_PARAMS.TARGET_BUFFER_FACTOR,d=this.context.settings.WISH_ABR_PARAMS.TARGET_BITRATE_FACTOR;if(!["log","linear"].includes(c)){var p=m.WishDefaultConfig.BITRATE_MODIFIER_FUNCTION_TYPE;this.context.logger.warn("WISH: invalid bitrate function type: ".concat(c,", falling back to default (").concat(p,")")),this.context.settings.WISH_ABR_PARAMS.BITRATE_MODIFIER_FUNCTION_TYPE=p}if(u>1||u<1e-4){var h=Math.min(Math.max(u,1e-4),1);this.context.logger.warn("WISH: invalid xi value: ".concat(u,", falling back to closest valid value: ").concat(h)),this.context.settings.WISH_ABR_PARAMS.TARGET_BUFFER_FACTOR=h}if(d<1e-4){var f=Math.max(d,1e-4);this.context.logger.warn("WISH: invalid delta value: ".concat(d,", falling back to closest valid value: ").concat(f)),this.context.settings.WISH_ABR_PARAMS.TARGET_BITRATE_FACTOR=f}},u.prototype.getRepresentationForRateMeasurement=function(c){void 0===c&&(c=T.SwitchingAggressiveness.Mid);var u=this.context.bufferSettings.getForwardTargetLevel(),d=this.rateMeasurementRule.getStatus(c,this.kfb/u),p=this.getCurrentBitrate(d),h=(0,w.adjustRateToSafetyMargin)(p,this.context.settings.RATE_SAFETY_MARGIN_PERCENTAGE);return this.findRepresentationForBitrate(h)},u.prototype.pfb=function(){var c=this.context.store.getState();return(c?(0,g.getMetricsHistoryFromInstanceState)(c,this.mimeType,v.MetricType.DownloadInformation):[]).filter(function(c){return!!c.value}).length>2},u.prototype.addSample=function(c){null!=c.segmentDuration&&(this.rateMeasurementRule.addSample(),this.timeToFirstByteMeasurementRule.addSample(),c.segmentDuration!==this.jfb&&(this.jfb=c.segmentDuration,this.qfb()))},u.prototype.selectRepresentationID=function(c,u){this.updateAvailableRepresentations(u),this.checkStartupPhase({value:this.kfb,result:E.Rules.SHOULD_STAY});var d,p=this.sfb(),h=null==(d=p.rep)?void 0:d._internalId,f=p.index;return this.ifb.push(this.hfb[f]),this.ifb.length>20&&(this.ifb=this.ifb.slice(-10)),this.lastSegmentInfo=c,this.lastRepresentation=p.rep,this.lastRateMeasurement=this.getCurrentBitrate(this.rateMeasurementRule.getStatus()),this.lastDownloadCancelled=!1,this.previousRequestProgress=void 0,h},u.prototype.getCurrentBitrateMeasurement=function(){return this.rateMeasurementRule.getStatus().value},u.prototype.setAdaptationSet=function(u){c.prototype.setAdaptationSet.call(this,u);var d=this.getAvailableRepresentations().map(function(c){return(0,w.toKbps)(c._bandwidth)});this.hfb=(0,P.applyQualityFunction)(d,this.gfb.BITRATE_MODIFIER_FUNCTION_TYPE),this.qfb()},u.prototype.findRepresentationForBitrate=function(c,u){var d,p=(0,_.findQualityForBitrate)(c,this.getAvailableRepresentations().map(function(c){return{rep:c,bitrate:c._bandwidth}}));return null!=(d=null==p?void 0:p.rep)?d:this.getLowestRepresentation()},u.prototype.setStartupPhase=function(){this.startupPhase=!0,(0,b.clearTimeoutIfDefined)(this.startupPhaseTimerID),this.startupPhaseTimerID=void 0},u.prototype.shutdown=function(){var c,u;this.lastRateMeasurement=0,this.lastDownloadCancelled=!1,this.previousRequestProgress=void 0,null==(c=this.rateMeasurementRule)||c.shutdown(),null==(u=this.timeToFirstByteMeasurementRule)||u.shutdown()},u.prototype.dispose=function(){var c,u;this.shutdown(),null==(c=this.rateMeasurementRule)||c.dispose(),null==(u=this.timeToFirstByteMeasurementRule)||u.dispose(),this.lastRepresentation=void 0,this.availableRepresentations=[],this.hfb=[],this.jfb=0,this.ifb=[]},u.prototype.qfb=function(){if((0,P.canUseWishAlgorithm)(this.hfb,this.jfb)){var c=this.getAvailableRepresentations().map(function(c){return(0,w.toKbps)(c._bandwidth)}),u=y.MimeTypeHelper.isVideo(this.mimeType)?f.MediaType.Video:f.MediaType.Audio,d=this.context.bufferSettings.getTargetLevel(f.BufferType.ForwardDuration,u);this.lfb=(0,P.computeAlpha)(this.gfb,c,this.hfb,this.jfb,d),this.mfb=(0,P.computeBeta)(this.gfb,this.lfb,d,this.jfb),this.nfb=(0,P.computeGamma)(this.lfb,this.mfb)}},u.prototype.rfb=function(c,u,d,p){var h=(0,P.determineBandwidthCost)(c._bandwidth,p),f=(0,P.determineBufferCost)(h,this.jfb,this.kfb),m=(0,P.determineQualityCost)(this.hfb,u,d);return this.lfb*h+this.mfb*f+this.nfb*m},u.prototype.isStartupBitrateInEffect=function(){var c,u,d=!!(null!=(c=this.context.config.adaptation)&&c.startupBitrate),p=!!(null!=(u=this.context.config.adaptation)&&u.maxStartupBitrate);return(d||p)&&!this.pfb()},u.prototype.sfb=function(){var c=this;if(this.startupPhase&&(this.isStartupBitrateInEffect()||this.gfb.USE_RATE_BASED_SELECTION_ON_SEEKING)){var u=this.getRepresentationForRateMeasurement(),d=this.getAvailableRepresentations().indexOf(u);return{rep:u,index:-1!==d?d:0}}if(this.kfb<this.jfb||!(0,P.canUseWishAlgorithm)(this.hfb,this.jfb))return{rep:this.getAvailableRepresentations()[0],index:0};var p=(0,P.getAverageSelectedQuality)(this.ifb,10),h=this.rateMeasurementRule.getStatus(5,.325).value,f=Math.min(h,this.getCurrentBitrate(this.rateMeasurementRule.getStatus())),m=Math.max(1.1*h,this.getAvailableRepresentations()[0]._bandwidth),g=this.getAvailableRepresentations().filter(function(c){return c._bandwidth<=m}).map(function(u,d){return{rep:u,index:d,cost:c.rfb(u,d,p,f)}}).sort(function(c,u){return c.cost-u.cost});return{rep:g[0].rep,index:g[0].index}},u}(S.CancellableAdaptationLogic)}
14,47577:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.applyQualityFunction=function(c,u){switch(u){case"linear":var d=c[c.length-1];return c.map(function(c){return c/d});case"log":var p=c[0];return c.map(function(c){return Math.log(c/p)})}},u.computeAlpha=function(c,u,d,p,h){var f,m,g,v,y;switch(c.BITRATE_MODIFIER_FUNCTION_TYPE){case"linear":return f=c.TARGET_BITRATE_FACTOR,1/(1+(c.TARGET_BUFFER_FACTOR*h-p)/p+Math.exp(3-2*d[0]-d[d.length-2])/f);case"log":return m=c.TARGET_BITRATE_FACTOR,g=c.TARGET_BUFFER_FACTOR,v=u[0],1/(1+(g*h-p)/p+2*(y=u[u.length-1])*y/(m*v*u[u.length-2]))}},u.computeBeta=function(c,u,d,p){return u*((c.TARGET_BUFFER_FACTOR*d-p)/p)},u.computeGamma=function(c,u){return 1-c-u},u.determineBandwidthCost=function(c,u){return u?c/u:1},u.determineBufferCost=function(c,u,d){return d<=u?1/0:u/(d-u)*c},u.determineQualityCost=function(c,u,d){var p=c[c.length-1],h=c[0];return Math.exp(p+d-2*c[u])/Math.exp(2*p-2*h)},u.getAverageSelectedQuality=function(c,u){if(0===c.length)return 0;var d=c.slice(-u);return d.reduce(function(c,u){return c+u})/d.length},u.canUseWishAlgorithm=function(c,u){return!(c.length<=1||!u)}},82873:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.BandwidthValueType=void 0,u.getBandwidth=function(c){if(0!==c.length){for(var u=c.length,d=u-1;d>=0;d--){var f=c[d].value,m=f.downloadRate,g=f.segmentBitrate;if(void 0===g||m<g*h)return{rateBps:m,type:p.Accurate}}return{rateBps:c[u-1].value.downloadRate,type:p.Estimated}}};var d,p,h=.9;(d=p||(u.BandwidthValueType=p={})).Accurate="accurate",d.Estimated="estimated"},24296:function(c,u,d){var p=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.LowLatencyAbr=void 0;var h=d(80813),f=d(46151),m=d(33436),g=d(59113),v=d(28922),y=d(7676),b=d(82873),S=d(50265),_=d(52902);u.LowLatencyAbr=function(){function c(c,u){this.context=c,this.mimeType=u,this.Jfb=new S.RateLimitedCancelCheck}return Object.defineProperty(c.prototype,"Kfb",{get:function(){return this.context.serviceManager.get(h.ServiceName.ManifestService,this.context.sourceContext.sourceIdentifier)},enumerable:!1,configurable:!0}),c.prototype.Lfb=function(c){for(var u,d=[],h=1;h<arguments.length;h++)d[h-1]=arguments[h];this.context.logger&&(u=this.context.logger).debug.apply(u,p(["[".concat("LL-ABR","][").concat(this.mimeType,"] ").concat(c)],d,!1))},c.prototype.Mfb=function(){var c=(0,f.getMetricsHistoryFromInstanceState)(this.context.store.getState(),this.mimeType,m.MetricType.ChunkedDownloadInformation),u=this.Nfb();return(0,b.getBandwidth)(c.slice(-u))},c.prototype.Nfb=function(){var c;return Math.max(1,Math.ceil(20*(null==(c=this.context.config.adaptation)?void 0:c.qualityStabilityBalance)))},c.prototype.Ofb=function(c){var u,d,p,h,f=null!=(p=null==(d=null==(u=this.Kfb)?void 0:u.getAdaptationSet(c))?void 0:d.Representation)?p:[],m=(0,y.getLowestRepresentation)(f);return null!=(h=null==m?void 0:m._internalId.equals(c))&&h},c.prototype.getCurrentBitrateMeasurement=function(){var c,u;return null!=(u=null==(c=this.Mfb())?void 0:c.rateBps)?u:0},c.prototype.getLowestRepresentation=function(){var c,u,d;if(this.Ifb){var p=null!=(d=null==(u=null==(c=this.Kfb)?void 0:c.getAdaptationSet(this.Ifb._internalId))?void 0:u.Representation)?d:[];return(0,y.getLowestRepresentation)(p)}},c.prototype.selectRepresentationID=function(c,u){var d,p,h,g;if(u&&0!==u.length){var S,_=this.Mfb();if(this.Lfb("current bandwidth",_),!_)return null==(d=(0,y.getLowestRepresentation)(u))?void 0:d._internalId;if(_.type===b.BandwidthValueType.Accurate&&(S=null!=(p=this.findRepresentationForBitrate(_.rateBps,u))?p:void 0,this.Lfb("accurate value, selecting ",null==S?void 0:S._bandwidth)),_.type===b.BandwidthValueType.Estimated){var E=null==(h=(0,f.getMetricsLastEntry)((0,f.getMetricsState)(this.context.store.getState()),this.mimeType,m.MetricType.ChunkedDownloadInformation).value)?void 0:h.representationBitrate;void 0!==E&&(S=(0,v.findNextHigherBitrateRepresentation)(u,E),this.Lfb("estimated value, currently on ".concat(E,", selecting ").concat(null==S?void 0:S._bandwidth)))}return S?S._internalId:null==(g=(0,y.getLowestRepresentation)(u))?void 0:g._internalId}},c.prototype.findRepresentationForBitrate=function(c,u){var d,p;return!u||u.length<1?null:null!=(p=(null==(d=(0,g.findQualityForBitrate)(c,u.map(function(c){return{rep:c,bitrate:c._bandwidth}})))?void 0:d.rep)??(0,y.getLowestRepresentation)(u))?p:null},c.prototype.shouldDownloadBeCancelled=function(c,u){if(this.Jfb.shouldExecuteCancelCheck(c)){if
14(this.Ofb(u))return!1;var d=(0,_.shouldCancelDownload)(c);return d&&this.Lfb("Cancelling segment download, current download rate is significantly lower than segment bitrate"),d}return!1},c.prototype.addSample=function(c){},c.prototype.setAdaptationSet=function(c){this.Ifb=c},c.prototype.setStartupPhase=function(){},c.prototype.shutdown=function(){},c.prototype.dispose=function(){this.shutdown()},c}()},50265:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.RateLimitedCancelCheck=void 0,u.RateLimitedCancelCheck=function(){function c(){this.Bhb=0}return c.prototype.shouldExecuteCancelCheck=function(c){if(void 0===c.segmentDuration||void 0===c.elapsedTime)return!1;this.Chb(c)&&(this.Bhb=0);var u=this.Bhb+.2;if(c.elapsedTime>=c.segmentDuration*u){var d=c.elapsedTime/c.segmentDuration;return this.Bhb=.2*Math.floor(d/.2),!0}return!1},c.prototype.Chb=function(c){return c.elapsedTime<this.Bhb*c.segmentDuration},c}()},52902:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.shouldCancelDownload=function(c){var u=c.responseTiming;if(!u)return!1;var d=u.progressTimestamp-u.headersReceivedTimestamp,h=(0,p.bytesToBits)(c.loadedBytes)/d,f=1-(0,p.bytesToBits)(c.loadedBytes)/(c.representationBitrate*c.segmentDuration);return h<c.representationBitrate*f};var p=d(33004)},4865:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.BlockBasedRateMeasurementRule=void 0;var f=d(46151),m=d(33436),g=d(70850),v=d(59406);u.BlockBasedRateMeasurementRule=function(c){function u(u,d){var p,h,f,m,v=c.call(this,u,d)||this;return v.Vgb=u.settings,v.Ugb=d,v.agb=!0,v.Ygb=16e5,(null==(h=null==(p=u.config)?void 0:p.adaptation)?void 0:h.maxStartupBitrate)!=null&&(v.Ygb=g.Util.extractBitrateFromString("max",u.config.adaptation.maxStartupBitrate)),(null==(m=null==(f=u.config)?void 0:f.adaptation)?void 0:m.startupBitrate)!=null&&(v.Wgb=g.Util.extractBitrateFromString("min",u.config.adaptation.startupBitrate)),v.Zgb={bytes:0,time:0},v.Xgb=[],v}return h(u,c),u.calcRateInBps=function(c,u){return 8*c/u},u.prototype.bgb=function(c){var d=this.Xgb.pop();if((null==d?void 0:d.bytes)===1e6&&(this.Xgb.push(d),d=void 0),d||(d={bytes:0,time:0,rateInBps:0}),d.bytes+c.bytes<=1e6){var p=d.bytes+c.bytes,h=d.time+c.time;this.Xgb.push({bytes:p,time:h,rateInBps:u.calcRateInBps(p,h)})}else{var f=(1e6-d.bytes)/c.bytes;d.bytes+=c.bytes*f,d.time+=c.time*f,d.rateInBps=u.calcRateInBps(d.bytes,d.time),this.Xgb.push(d);for(var m=c.bytes*(1-f),g=c.time*(1-f);m>1e6;){var v=g/(m/1e6);this.Xgb.push({bytes:1e6,time:v,rateInBps:u.calcRateInBps(1e6,v)}),m-=1e6,g-=v}this.Xgb.push({bytes:m,time:g,rateInBps:u.calcRateInBps(m,g)})}},u.prototype.cgb=function(c){if(c&&!isNaN(c.bytes)){var u=this.Zgb;(u.bytes!==c.bytes||u.time!==c.time)&&(this.Zgb=c,this.bgb(c),this.Xgb.length>40&&this.Xgb.shift(),this.phb())}},u.prototype.dgb=function(c,d){var p,h=-c;null!=d&&(h=-c-d,p=-d);var f=this.Xgb.slice(h,p);if(0===f.length)return 0;var m=f.reduce(function(c,u){return{bytes:c.bytes+u.bytes,time:c.time+u.time,rateInBps:c.rateInBps+u.rateInBps}});return m.rateInBps=u.calcRateInBps(m.bytes,m.time),m.rateInBps},u.prototype.ohb=function(){if(null==this.Wgb)return null;var c=this.Wgb;return c*=1+this.Vgb.RATE_SAFETY_MARGIN_PERCENTAGE/100,isNaN(c+=8)?null:(this.context.logger.insane("use startup bitrate from configuration ".concat(c)),{bytes:c/8,time:1})},u.prototype.addSample=function(){if(this.instanceState){var c=(0,f.getMetricsState)(this.instanceState),u=(0,f.getMetricsLastEntry)(c,this.Ugb,m.MetricType.DownloadInformation);if(this.agb){this.agb=!1;var d=this.ohb();d&&(u={value:d})}if(!u||!u.value||!u.value.bytes){u=u||{};var p=this.qhb();p>0&&(u.value={bytes:p/8,time:1}
vendor: 4,141 bytes, line 14
14),u&&u.value||(u=(0,f.getMetricsLastEntry)(c,"default",m.MetricType.DownloadInformation));var h=1/0;u&&u.value&&!isNaN(u.value.bytes)&&!isNaN(u.value.time)&&(h=u.value.bytes/u.value.time),h>this.Ygb&&(u.value=u.value||{},u.value.bytes=this.Ygb/8,u.value.time=1)}this.cgb(u.value)}},u.prototype.getStatus=function(c){0===this.Xgb.length&&this.addSample();var u=this.dgb(c),d=this.dgb(c,1);return{value:u,result:u>1.1*d?v.Rules.SHOULD_SWITCH_UP:u<.9*d?v.Rules.SHOULD_SWITCH_DOWN:v.Rules.SHOULD_STAY}},u.prototype.phb=function(){if(this.instanceState){var c=(0,f.getMetricsHistoryFromInstanceState)(this.instanceState,this.Ugb,m.MetricType.DownloadInformation).slice(-3).map(function(c){return Math.round(8*c.value.bytes/c.value.time)});this.context.storedConfig.set("b",c),this.context.storedConfig.set("b_t",Date.now())}},u.prototype.qhb=function(){var c=this.context.storedConfig.get("b")||[];return Math.round(c.reduce(function(c,u){return c+u},0)/c.length)||-1},u.prototype.shutdown=function(){},u.prototype.setStartupPhase=function(){},u.prototype.dispose=function(){},u}(v.AdaptationRule)},20066:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.BufferFillRateRule=void 0;var f=d(89927),m=d(88844),g=d(59406);u.BufferFillRateRule=function(c){function u(u,d){var p=c.call(this,u,d)||this;return p.rhb=u.bufferSettings,p.shb=!0,p.uhb=[],p}return h(u,c),u.prototype.vhb=function(){if(0===this.uhb.length)return 0/0;var c=this.uhb[this.uhb.length-1],u=c.bufferTargetLevel;if(this.shb){var d=c.bufferLevel,p=this.uhb[this.uhb.length-2],h=0;p&&(h=p.bufferLevel),d>=c.bufferTargetLevel||h>d?(this.logger.insane("startup phase is over"),this.shb=!1):u=d}return u},u.prototype.whb=function(c){isNaN(c)&&(c=this.rhb.getForwardTargetLevel());for(var u,d=Date.now()-(0,f.toMilliSeconds)(c),p=0,h=0,m=0;m<this.uhb.length;m++)(u=this.uhb[m]).timestamp>=d&&(p+=u.bufferLevel-h),h=u.bufferLevel;return((p/=this.vhb())<-1||p>1)&&this.logger.insane("buffer is changing too fast, fill rate should be between -1 and 1, but is "+p),isNaN(p)?1:p},u.prototype.addSample=function(c){var u=this;this.thb||(this.thb=window.setTimeout(function(){u.logger.insane("buffer fill rate startup phase is over (timeout)"),u.shb=!1},(0,f.toMilliSeconds)(this.rhb.getForwardTargetLevel()))),this.uhb.push(c),c.timestamp-this.uhb[0].timestamp>6e4&&this.uhb.shift()},u.prototype.getStatus=function(c){var u=this.whb(c),d=g.Rules.SHOULD_STAY;return u>.7?d=g.Rules.SHOULD_SWITCH_UP:u<-.5&&(d=g.Rules.SHOULD_SWITCH_DOWN),{value:u,result:d}},u.prototype.setStartupPhase=function(){this.shb=!0},u.prototype.shutdown=function(){(0,m.clearTimeoutIfDefined)(this.thb),this.thb=void 0},u.prototype.dispose=function(){this.shutdown(),this.uhb=[]},u}(g.AdaptationRule)},64463:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.BufferFillStateRule=function(c,u){var d,g,v=!0,y={bufferTargetLevel:(null==(d=p.DefaultSettings.TARGET_BUFFER_LEVEL.video)?void 0:d.forwardduration)||0,bufferLevel:0},b=function(){(0,f.clearTimeoutIfDefined)(g),g=void 0};return{addSample:function(u){g||(g=window.setTimeout(function(){v=!1},(0,h.toMilliSeconds)(c.bufferSettings.getForwardTargetLevel()))),y=u},getStatus:function(){var c;return y.bufferLevel>.8*y.bufferTargetLevel?(c=m.Rules.SHOULD_SWITCH_UP,v&&(v=!1,(0,f.clearTimeoutIfDefined)(g))):c=y.bufferLevel<.4*y.bufferTargetLevel?m.Rules.SHOULD_SWITCH_DOWN:m.Rules.SHOULD_STAY,v&&(c=m.Rules.SHOULD_STAY),{value:y.bufferLevel,result:c}},setStartupPhase:function(){v=!0},shutdown:b,dispose:function(){b()}}};var p=d(70962),h=d(89927),f=d(88844),m=d(59406)},43829:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.
14setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.DownloadRateRule=void 0;var f=d(89927),m=d(59406);u.DownloadRateRule=function(c){function u(u,d){var p=c.call(this,u,d)||this;return p.xhb=[],p}return h(u,c),u.prototype.yhb=function(c){void 0===c&&(c=this.context.bufferSettings.getForwardTargetLevel());var u=Date.now()-(0,f.toMilliSeconds)(c),d=this.xhb.filter(function(c){return c.timestamp>=u});if(0===d.length)return 1;var p=0;return d.forEach(function(c,u){var h=d[u-1],m=c.segmentDuration,g=m/8,v=Math.min(c.bufferLevel/c.bufferTargetLevel,1),y=Math.max(c.segmentDownloadDuration,g),b=m/y*v+m/(h?Math.max(c.timestamp-h.timestamp,g):(0,f.toMilliSeconds)(Math.max(m,y)))*(1-v);p=c.downloadCancelled?p-b:p+b}),p/d.length},u.prototype.addSample=function(c){null!=c.segmentDuration&&null!=c.segmentDownloadDuration&&(this.xhb.push(c),c.timestamp-this.xhb[0].timestamp>6e4&&this.xhb.shift())},u.prototype.getStatus=function(c,u){var d=this.yhb(c),p=m.Rules.SHOULD_STAY;return d>1.7?p=m.Rules.SHOULD_SWITCH_UP:d<.5&&(p=m.Rules.SHOULD_SWITCH_DOWN),{value:d,result:p}},u.prototype.setStartupPhase=function(){},u.prototype.shutdown=function(){},u.prototype.dispose=function(){this.shutdown(),this.xhb=[]},u}(m.AdaptationRule)},59406:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.AdaptationRule=u.Rules=void 0,(d=p||(u.Rules=p={})).SHOULD_SWITCH_UP="SWITCH_UP",d.SHOULD_STAY="STAY",d.SHOULD_SWITCH_DOWN="SWITCH_DOWN",u.AdaptationRule=function(){function c(c,u){this.context=c,this.samples=[],this.mimeType=u,this.logger=c.logger,this.Settings=c.settings,this.maxHistorySize=this.Settings.DEFAULT_ADAPTATION_RULE_HISTORY_SIZE}return Object.defineProperty(c.prototype,"instanceState",{get:function(){var c;return null==(c=this.context.store)?void 0:c.getState()},enumerable:!1,configurable:!0}),c.prototype.estimateStatus=function(c,u,d){return this.getStatus(u,d)},c}()},39185:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.SegmentBasedRateMeasurementRule=void 0;var f=d(46151),m=d(33436),g=d(89927),v=d(70850),y=d(17006),b=d(7676),S=d(59406);function _(c){return c.transferSize>0&&!/^https?:\/\/localhost(:\d+)?(\/|$)/.test(c.name)}function E(c,u){void 0===u&&(u=1/0);var d,p=c.value.time-(null!=(d=c.value.timeToFirstByte)?d:0);return T(8*c.value.bytes/p,u)}function T(c,u){return Math.min(c,v.Util.extractBitrateFromString("max",u))}u.SegmentBasedRateMeasurementRule=function(c){function u(u,d){var p=c.call(this,u,d)||this;return p.Ihb=-1,p.Jhb=.1,p.Khb=!0,p}return h(u,c),u.getBitrateFromPerformanceAPI=function(){if(!performance||"function"!=typeof performance.getEntriesByName)return 0;var c=0,u=0;return performance.getEntriesByType("resource").filter(_).forEach(function(d){c+=8*d.transferSize,u+=(0,g.toSeconds)(d.duration-(d.responseStart-d.requestStart))}),c>0&&u>0?c/u:0},u.prototype.Lhb=function(c,u,d){void 0===u&&(u=1),void 0===d&&(d=0);var p,h=-c-d;return p=0!==d?this.samples.slice(h,-d):this.samples.slice(h),(0,y.calculateExponentialWeightedAverage)(p,1-u)},u.validateDownloadInfo=function(c){if(c&&c.value){var u=!!c.value.bytes,d=!isNaN(c.value.time),p=void 0!==c.value.timeToFirstByte&&!isNaN(c.value.timeToFirstByte);return u&&d&&p}return!1},u.prototype.Mhb=function(c){if(!this.instanceState)return 0;
vendor: 4,089 bytes, line 14
14var d=(0,f.getMetricsLastEntry)((0,f.getMetricsState)(this.instanceState),c,m.MetricType.DownloadInformation),p=u.validateDownloadInfo(d),h=p&&this.Ihb<d.time;return h&&isFinite(d.time)&&(this.Ihb=d.time),p&&h?E(d,this.context.settings.MAX_ALLOWED_BANDWIDTH_ESTIMATION):p&&!h?-1:0},u.prototype.Nhb=function(){var c=[],d=this.Phb();d>0&&c.push(d);var p=this.Mhb("default");p>0&&c.push(p);var h=Math.min.apply(Math,c);return h>0&&isFinite(h)?h:u.getBitrateFromPerformanceAPI()},u.prototype.addSample=function(){var c,u,d,p=this.Mhb(this.mimeType),h=0;this.Khb&&(c=this.context,u=(0,b.getStartupBitrateFromConfig)(c),d=(0,b.getMaxStartupBitrateFromConfig)(c),d=p>0?Math.min(d,p):d,h=u||d||0,this.Khb=!1),0===(h=h||p||0)&&(h=this.Nhb()),h>0&&(this.samples.push(h),this.samples.length>this.maxHistorySize&&this.samples.splice(0,this.samples.length-this.maxHistorySize)),p>0&&this.Ohb()},u.prototype.getStatus=function(c,u){void 0===c&&(c=1),void 0===u&&(u=1),0===this.samples.length&&this.addSample();var d=this.Lhb(c,u),p=this.Lhb(c,u,1);return{value:d,result:d>p*(1+this.Jhb)?S.Rules.SHOULD_SWITCH_UP:d<p*(1-this.Jhb)?S.Rules.SHOULD_SWITCH_DOWN:S.Rules.SHOULD_STAY}},u.prototype.Ohb=function(){if(this.instanceState){var c=(0,f.getMetricsHistoryFromInstanceState)(this.instanceState,this.mimeType,m.MetricType.DownloadInformation).filter(u.validateDownloadInfo).slice(-3).map(function(c){return E(c)});this.context.storedConfig.set("b",c),this.context.storedConfig.set("b_t",Date.now())}},u.prototype.Phb=function(){var c=this,u=(this.context.storedConfig.get("b")||[]).map(function(u){return T(u,c.context.settings.MAX_ALLOWED_BANDWIDTH_ESTIMATION)});return Math.round(u.reduce(function(c,u){return c+u},0)/u.length)||0},u.prototype.shutdown=function(){},u.prototype.setStartupPhase=function(){},u.prototype.dispose=function(){},u}(S.AdaptationRule)},45199:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)}),f=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.TimeToFirstByteMeasurementRule=void 0;var m=d(46151),g=d(33436),v=d(17006),y=d(59406);u.TimeToFirstByteMeasurementRule=function(c){function u(u,d){var p=c.call(this,u,d)||this;return p.Qhb=-1,p}return h(u,c),u.prototype.Rhb=function(c){if(!this.instanceState)return 0;var u=(0,m.getMetricsLastEntry)((0,m.getMetricsState)(this.instanceState),c,g.MetricType.DownloadInformation),d=!!u&&!!u.value,p=d&&void 0!==u.value.timeToFirstByte&&!isNaN(u.value.timeToFirstByte),h=d&&this.Qhb<u.time;return h&&isFinite(u.time)&&(this.Qhb=u.time),p&&h?u.value.timeToFirstByte:p&&!h?-1:0},u.prototype.addSample=function(){var c=this.Rhb(this.mimeType),u=this.Rhb("default"),d=c||u||0;if(d>0)for(this.samples.push(d);this.samples.length>this.maxHistorySize;)this.samples.shift()},u.prototype.Shb=function(c){return c>0?this.samples.slice(-c):[]},u.prototype.Thb=function(c,u){var d=(0,v.calculateMean)(c),p=(0,v.calculateExponentialWeightedAverage)(c,u),h=(0,v.calculateStandardDeviation)(c,d);return{value:{median:(0,v.calculateMedian)(c),mean:d,weightedAverage:p,standardDeviation:h},result:y.Rules.SHOULD_STAY}},u.prototype.getStatus=function(c,u){return void 0===c&&(c=1),void 0===u&&(u=1),this.Thb(this.Shb(c),u)},u.prototype.estimateStatus=function(c,u,d){void 0===u&&(u=1),void 0===d&&(d=1);var p=f(f([],this.Shb(u-1),!0),[c],!1);return this.Thb(p,d)},u.prototype.setStartupPhase=function(){},u.prototype.shutdown=function(){},u.prototype.dispose=function(){},u}(y.AdaptationRule)}
14,28922:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.findNextHigherBitrateRepresentation=function(c,u){for(var d,p,h=0;h<c.length;h++){var f=c[h];f._bandwidth>u&&(void 0===d||f._bandwidth<d._bandwidth)&&(d=f),(void 0===p||f._bandwidth>p._bandwidth)&&(p=f)}return d??p}},83429:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.getUserSelectedRepresentation=function(c,u,d,m){var g,v,y,b,S=(g=c.config.adaptation,h.MimeTypeHelper.isAudio(u)?null==g?void 0:g.onAudioAdaptation:h.MimeTypeHelper.isVideo(u)?null==g?void 0:g.onVideoAdaptation:void 0);if(S){var _=c.serviceManager.maybeCall(p.ServiceName.ManifestService,function(c){return c.getAdaptationSet(d)},null,c.sourceContext.sourceIdentifier),E=null!=(v=null==_?void 0:_.Representation.map(function(c){return{bandwidth:c._bandwidth,id:c._id}}))?v:[],T={suggested:m.representationId,isAd:c.sourceContext.isAd,representations:E},w=null!=(y=(0,f.safeUserCallback)(function(){return S(T)},c.logger))?y:void 0;return w&&(null==(b=c.logger)||b.debug("[".concat(u,"] user has overridden adaptation suggestion! suggested: ").concat(m.representationId,", user: ")+"".concat(w))),c.serviceManager.maybeCall(p.ServiceName.ManifestService,function(c){return d&&c.getRepresentation(d,w)},void 0,c.sourceContext.sourceIdentifier)||void 0}};var p=d(80813),h=d(85434),f=d(70850)}},function(c){return c(c.s=76344)}])}(bitmovinplayerAbr);
14var bitmovinplayerAbrExports=bitmovinplayerAbr.exports;let ABRModule=getDefaultExportFromCjs$1(bitmovinplayerAbrExports);var bitmovinplayerEngineBitmovin={exports:{}};!function(c){var u;self,c.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[238],{34795:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.ContainerFormat=void 0,(p=d||(u.ContainerFormat=d={})).MP4="mp4",p.TS="ts",p.WEBM="webm"},12030:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.DrmKidErrorHandler=void 0;var p=d(80813),h=d(91678),f=d(46151),m=d(33436),g=d(93204),v=d(13114);u.DrmKidErrorHandler=function(){function c(c,u){var d=this;this.context=c,this.onDownloadedRepresentationExcludedCallback=u,this.g1=function(c,u){if(void 0!==c&&void 0!==u){var p=c.filter(function(c){return!u.includes(c)});d.f1(p)}};var h=c.sourceContext.sourceIdentifier;this.d1=c.store,this.a1=c.logger,this.e1=c.serviceManager.get(p.ServiceName.SourceStoreService,h),this.b1=c.serviceManager.get(p.ServiceName.ManifestService,h),this.c1=(0,g.subscribe)(this.e1)(v.getDrmKeyIdsWithErrors,this.g1)}return c.prototype.f1=function(c){var u=(p=this.b1,p.getAllRepresentations().filter(function(u){return u.associatedKid&&c.includes(u.associatedKid)}).map(function(c){return c._internalId})),d=this.d1.getState();if(0!==u.length&&void 0!==d){var p,g,v=(g=(0,f.getMetricsHistoryFromInstanceState)(d,"default",m.MetricType.RequestedRepresentations).map(function(c){return c.value}),u.some(function(c){return g.some(function(u){return u.equals(c)})}));this.a1.debug("Excluding representations due to DRM licenses not being available",u),this.b1.excludeRepresentations(u)&&v&&(this.d1.dispatch((0,h.clearMetricsHistory)("default",m.MetricType.RequestedRepresentations)),this.onDownloadedRepresentationExcludedCallback())}},c.prototype.trackSegment=function(c){var u=c.getDrmKid();if(void 0!==u){var d=this.e1.getState(),p=c.getRepresentationId(),h=d?(0,v.getDrmKeyIdsWithErrors)(d):[];u!==this.b1.getRepresentationDrmKid(p)&&(this.b1.setRepresentationDrmKid(p,u),this.f1(h))}},c.prototype.dispose=function(){this.c1()},c}()},65272:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.HeartbeatService=void 0;var p=d(80813),h=d(88844);function f(c){c.shouldClearSubtitleServiceBuffers()&&c.clearSubtitleServiceBuffers()}function m(c,u){var d,p;c.shouldSuspendHeartbeat()||((p=(d=c.getActiveSegmentControllers()).length>0)&&d.forEach(function(d){var p=u.getTimeForNextSegment(d.getMimeType());c.getNextSegment(d,p)}),c.areAllLoadersReady()&&(p?f(c):c.isLoadingLastPeriod()?(c.areMediaTypesFinalForPlayingPeriod()?c.maybeStop():c.isAVCompletelyLoaded()&&c.signalEndOfStream(),f(c)):(c.switchLoadingPeriod(),m(c,u))))}u.HeartbeatService=function(){function c(c,u){this.serviceManager=c,this.mediaPlayerController=u,this.QD=-1}return Object.defineProperty(c.prototype,"RD",{get:function(){return this.serviceManager.get(p.ServiceName.StreamTimeService)},enumerable:!1,configurable:!0}),c.prototype.SD=function(){var c=this;(0,h.clearTimeoutIfDefined)(this.QD),this.QD=window.setTimeout(function(){return c.TD()},250)},c.prototype.TD=function(){this.SD(),m(this.mediaPlayerController,this.RD)},c.prototype.beat=function(){this.started&&m(this.mediaPlayerController,this.RD)},Object.defineProperty(c.prototype,"started",{get:function(){return -1!==this.QD},enumerable:!1,configurable:!0}),c.prototype.start=function(){this.TD()},c.prototype.stop=function(){(0,h.clearTimeoutIfDefined)(this.QD),this.QD=-1},c.prototype.dispose=function(){this.stop()},c}()},94358:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.MediaPlayer=u.LoadState=void 0,u.checkIfGapSkip=et;var f,m=d(4524),g=d(48143),v=d(80813),y=d(56481),b=d(3714),S=d(90408),_=d(75375),E=d(44468),T=d(91678),w=d(46151),P=d(33436),A=d(23690),I=d(87827),M=d(93204),R=d(34047),k=d(85434),x=d(89927),C=d(19274),O=d(88052),D=d(62756),L=d(65272),N=d(23901),U=d(96533),F=d(38568),B=d(90087),j=d(23940),H=d(52090),V=d(44552),z=d(15761),q=d(36193),W=d(52447),G=d(88935),K=d(27531),Y=d(33903),X=d(47531),Q=d(16870),Z=d(68981);(p=f||(u.LoadState=f={})).Unloaded="unloaded",p.Preparing="preparing",p.Loading="loading",p.Loaded="loaded";var J=Object.freeze({id:"auto",bitrate:null}),$=Object.freeze({id:"auto",bitrate:null,width:null,height:null});function ee(c){return c===_.ADVERTISING_ISSUER_NAME||c===_.ADVERTISING_RESTORE_ISSUER_NAME}function et(c,u){if(!O.ModuleManager.has(D.ModuleName.RendererMse)||!c.videoElement)return!1;for(var d=O.ModuleManager.get(D.ModuleName.RendererMse).Ranges,p=c.settings.MIN_SIZE_FOR_GAP_SKIPPING,h=d.findGaps(c.videoElement.buffered,p),f=!1,m=0;m<h.length;m++).1>=Math.abs(h.end(m)+d.TIME_FUDGE_FACTOR-u)&&(f=!0);return f}u.MediaPlayer=function(){function c(c){var u=this;this.j=-1,this.l=!1,this.o=!1,this.p=!1,this.q=!0,this.r="api",this.s="api",this.I=function(c){if(null==u.R()&&!c.isInit()){var d=u.isLive()?u.J(c):0;u.S(d)}},this.K=function(){u.isLive()&&u.O()&&u.P()},this.L=function(c){if(u.l)u.l=!1;else{u.d.debug("Caught a video element error: ",c);var d=(0,S.createPlayerErrorFromMediaError)(c,u.c.sourceContext.sourceIdentifier),p=u.c.serviceManager.get(v.ServiceName.RecoveryService);if(p)return void p.handleError(d);u.unload(),u.h.fireError(d)}},this.N=function(){if(u.w){var c=u.w.getStatus(u.v,u.T());u.v!==c.mode&&(u.c.eventHandler.dispatchEvent(b.PlayerEvent.LatencyModeChanged,{from:u.v,to:c.mode}),u.v=c.mode),c.mode===b.LatencyMode.Suspended||u.x.seekingOrTimeshifting||(c.requiredAction===u.i.LiveLatencyControlA
vendor: 4,170 bytes, line 14
14ction.Seek?u.M():c.requiredAction===u.i.LiveLatencyControlAction.PlaybackRate&&u.setPlaybackSpeed(1,c.actionParam,!1))}},this.V=function(){u.x.getIsRendererStalling()?(u.d.debug("Renderer is currently stalled. Waiting for unstalling before ending stall."),u.Hb(),u.A=(0,M.subscribe)(u.c.store)(function(c){return(0,I.getPlayerState)(c)},function(){return u.U()},function(c){return!(0,I.getIsRendererStalled)(c)})):u.U()},this.W=function(){u.o&&(u.d.debug("Detected replay attempt from video element"),u.c.internalPlayer.play()),u.x.transitionToPlayState(!0,u.r)},this.X=function(){u.d.insane("video element signaled pause in state: ".concat(u.x.playbackState)),u.m.maybeTransitionToPausedState(u.s)},this.zb=function(c){return{id:c.id,lang:c.lang,label:c.label,role:c.role,metadata:c.metadata,getQualities:function(){var d=(0,U.getManifestService)(u.c);return d?B.MediaPlayerManifestApiFactory.getAudioQualities(d,u.getCurrentPlayingPeriodId(),c.id):[]}}},this.Bb=function(c){var d=et(u.c,c.time);u.f.GLOBAL_DISABLE_SEEKING&&!d&&Math.abs(c.time-u.t)>.05&&(u.d.debug("Seeking now allowed, seeking back to expected time"),u.c.videoElement.currentTime=u.t)},this.Cb=function(c){if(!u.o){var d=0===u.g.getCurrentTime(!0),p=u.isPlaying(),h=u.x.isSeeking(),f=u.isStalled();!p||h||f||d?u.d.debug("Skipping timeupdate",{isPlaying:p,isSeeking:h,isStalled:f,timeUpdateWithoutBuffer:d,time:c.time}):u.kb(u.getCurrentTime())}},this.Db=function(){u.o=!0},this.Eb=function(){u.c.logger.debug("DVR window exceeded"),u.x.isPlaying()?u.f.DISABLE_AUTO_RECOVERY_ON_DVR_WINDOW_EXCEEDED||u.Fb():u.p=!0},this.Gb=function(c){3001===c.code&&u.unload()},this.Kb=function(){var c;null!=(c=(0,U.getManifestService)(u.c))&&c.isHlsManifest()||u.Jb()},this.Lb=function(){var c;null!=(c=(0,U.getManifestService)(u.c))&&c.isHlsManifest()||u.Ib()},this.Nb=function(c){u.isLive()&&(u.O()?u.P():u.Q(!1))},this.c=c,this.d=c.logger,this.e=c.config,this.f=c.settings,this.g=c.renderer,this.h=c.eventHandler,this.n=f.Unloaded,this.c.store.dispatch((0,T.initializeMetricsForMimeType)("default",this.c.settings)),this.m=new H.MediaPlayerController(c,this.I),O.ModuleManager.has(D.ModuleName.LowLatency)&&(this.i=O.ModuleManager.get(D.ModuleName.LowLatency)),this.h.on(b.PlayerEvent.PeriodSwitch,this.Kb),this.h.on(b.PlayerEvent.PeriodSwitched,this.Lb),this.h.on(b.PlayerEvent.PlaybackSpeedChanged,this.Nb),this.z=(0,M.subscribe)(this.c.store)(function(c){return(0,I.getIsPlaying)((0,I.getPlayerState)(c))},this.K,function(c,u){return c&&!u})}return c.prototype.C=function(c,u){this.D(c,u,u.sourceContext),this.E(u)},c.prototype.D=function(c,u,d){(0,Q.initializeSynchronizedTimeService)(u,d),(0,U.initializeManifestService)(u,d),(0,N.initializeManifestLoadingService)(u,d,c),(0,F.initializeManifestUpdateSchedulingService)(u,d)},c.prototype.E=function(c){var u,d,p;u=O.ModuleManager.get(D.ModuleName.ABR).AdaptationService,c.serviceManager.set(v.ServiceName.AdaptationService,new u(c)),c.serviceManager.set(v.ServiceName.TimedMetadataService,new z.TimedMetadataService(c)),c.serviceManager.set(v.ServiceName.SegmentService,new V.SegmentService(c)),d=new X.StreamTimeService(c.serviceManager,c.sourceContext.sourceIdentifier),c.serviceManager.set(v.ServiceName.StreamTimeService,d),p=this.m,c.serviceManager.set(v.ServiceName.HeartbeatService,new L.HeartbeatService(c.serviceManager,p),c.sourceContext.sourceIdentifier),this.u=this.F(c),this.w=this.G(c)},c.prototype.F=function(c){var u=c.serviceManager,d=c.sourceContext.sourceIdentifier;if(O.ModuleManager.has(D.ModuleName.Subtitles)&&!u.has(v.ServiceName.SubtitleService,d)){var p=O.ModuleManager.get(D.ModuleName.Subtitles).SubtitleService;u.set(v.ServiceName.SubtitleService,new p(c),d)}return u.get(v.ServiceName.SubtitleService,d)},c.prototype.G=function(c){var u,d=c.serviceManager;if(null==(u=this.w)||u.dispose(),O.ModuleManager.has(D.ModuleName.LowLatency)&&this.i)return d.set(v.ServiceName.LiveLatencyService,new this.i.LiveLatencyService(c)),d.get(v.ServiceName.LiveLatencyService)},c.prototype.H=function(c){var u,d,p,h,f=this.c.serviceManager;[v.ServiceName.LiveLatencyService,v.ServiceName.TimedMetadataService].forEach(function(c){return(0,g.dis
14poseService)(f,c)});var m=null==(u=this.c.sourceContext)?void 0:u.sourceIdentifier;if(m){(0,g.disposeService)(f,v.ServiceName.HeartbeatService,m),(0,g.disposeService)(f,v.ServiceName.SegmentService,m);var y=!this.c.sourceContext.isAd;c===_.ADVERTISING_ISSUER_NAME&&y?(null==(d=f.get(v.ServiceName.ManifestService,m))||d.suspend(),null==(p=f.get(v.ServiceName.ManifestUpdateSchedulingService,m))||p.suspend(),null==(h=f.get(v.ServiceName.SubtitleService,m))||h.disableAllSubtitles()):[v.ServiceName.ManifestService,v.ServiceName.ManifestLoadingService,v.ServiceName.ManifestUpdateSchedulingService,v.ServiceName.SynchronizedTimeService,v.ServiceName.SubtitleService].forEach(function(c){return(0,g.disposeService)(f,c,m)})}},c.prototype.J=function(c){var u=null!=c.getSegmentInfo().wallClockTime?c.getPlaybackTime()-(0,x.toSeconds)(c.getSegmentInfo().wallClockTime):0;return this.m.getSeekableRange().start+u},c.prototype.play=function(c){return this.r=c,this.q?this.k?this.x.isPlaying()?(this.d.debug("Ignoring play call as play was already triggered or we're already playing"),Promise.resolve()):(this.o=!1,this.x.isPaused()&&this.isLive()&&(this.p||this.getMaxTimeShift()>=0)&&!this.f.DISABLE_AUTO_RECOVERY_ON_DVR_WINDOW_EXCEEDED&&(this.c.logger.debug("Handling DVR window excursion - going to live edge"),this.M(),this.p=!1),this.m.start(),this.x.transitionToPendingPlayState(!1,c),this.g.play()):Promise.resolve():Promise.reject("Play control not permitted")},c.prototype.M=function(){var c=this;this.f.ENABLE_SEEK_FOR_LIVE?this.x.isSeeking()||this.seek(this.getSeekableRange().end,_.INTERNAL_ISSUER_NAME):this.m.timeShift(0,function(){return c.yb()}).catch(function(){return c.xb()})},c.prototype.O=function(){return!!this.w&&!this.isPaused()&&0===this.getTimeShift()&&1===this.getPlaybackSpeed()&&!this.x.isTimeShifting()&&!this.x.isSeeking()},c.prototype.P=function(){var c;null==(c=this.w)||c.resumeControl()},c.prototype.Q=function(c){void 0===c&&(c=!0);var u=this.v===b.LatencyMode.Suspended;this.w&&!u&&(this.w.suspendControl(),c&&this.setPlaybackSpeed(1,1,!1))},c.prototype.R=function(){var c;
14return(0,Y.getRelativeCurrentTimeOffset)(null==(c=this.rb())?void 0:c.getState())},c.prototype.S=function(c){var u;null==(u=this.rb())||u.dispatch((0,K.setRelativeCurrentTimeOffset)(c))},c.prototype.T=function(){var c=[this.getBufferLevel(E.BufferType.ForwardDuration,E.MediaType.Audio),this.getBufferLevel(E.BufferType.ForwardDuration,E.MediaType.Video)].map(function(c){return c.level}).filter(function(c){return null!==c});return 0===c.length?0:Math.min.apply(Math,c)},c.prototype.U=function(){this.Hb(),this.x.stallExit(),this.x.transitionToPlayingState(this.r),this.o=!1},c.prototype.preload=function(){this.n!==f.Unloaded&&this.m&&this.m.start()},c.prototype.pause=function(c){var u;this.q&&(this.d.insane("Pause was called via the API"),this.x.isInitial()||(this.s=c,this.isLive()&&null!=(u=this.w)&&u.isConfigured()&&(this.Q(),this.N()),this.x.isPaused()||this.x.isStopped()||this.g.pause(),this.x.transitionToPausedState(this.g.isPaused(),c)))},c.prototype.mute=function(c){this.isMuted()||(this.g.mute(),this.c.eventHandler.dispatchEvent(b.PlayerEvent.Muted,{issuer:c||"api"}))},c.prototype.unmute=function(c){this.isMuted()&&(this.g.unmute(),this.c.eventHandler.dispatchEvent(b.PlayerEvent.Unmuted,{issuer:c||"api"}))},c.prototype.Y=function(c,u){var d,p=null==(d=this.rb())?void 0:d.getState();if(!p)return c;for(var h=O.ModuleManager.get(D.ModuleName.HLS).selectors,f=h.getHlsState,m=(0,h.getMergedDiscontinuityTimings)(f(p)),g=Object.values(m),v=0;v<g.length-1;v++){var y=g[v].endTime,b=g[v+1].startTime;if(c>=y-u&&c<b)return this.d.debug("Adjusting seek target to discontinuity start: ".concat(c," -> ").concat(b)),b}return c},c.prototype.seek=function(c,u){void 0===u&&(u="");var d,p,h,f=this.e&&this.e.hasOwnProperty("playback")?this.e.playback:{},m=!f.hasOwnProperty("seeking")||f.seeking,g=this.c.store.getState(),v=!!g&&null!=(h=null==(p=null==(d=(0,I.getPlayerState)(g))?void 0:d.seekingProcess)?void 0:p.isInitial)&&h,y=![_.STARTUP_ISSUER_NAME,_.INTERNAL_ISSUER_NAME].includes(u),b=v||!this.f.GLOBAL_DISABLE_SEEKING&&m,S=(0,U.getManifestService)(this.c);if(!b||!this.q||!S)return!1;var E=this.f.END_OF_BUFFER_TOLERANCE,T=S.isHlsManifest()?this.Y(c,E):(0,Z.adjustTargetTimeToPeriodStart)(c,E,S,this.d);return this.o=!1,this.Z(),this.Mb(),this.x.transitionToSeekingState(T,u,y),this.c.store.dispatch((0,A.updateSeekingProcess)({issuer:u,targetTime:T,seekableRange:this.getSeekableRange(),isInitial:v})),!0},c.prototype.Z=function(){this.x.isTimeShifting()&&(this.m.getTimeShiftHandler().cancel(),this.x.transitionToTimeShiftedState(!1))},c.prototype.kb=function(c){var u;c!==this.t&&(this.c.eventHandler.dispatchEvent(b.PlayerEvent.TimeChanged,{time:c}),this.t=c,this.isLive()&&null!=(u=this.w)&&u.isConfigured()&&this.N())},c.prototype.setVolume=function(c,u){var d=this.g.getVolume();this.g.setVolume(c),d!==c&&this.c.eventHandler.dispatchEvent(b.PlayerEvent.VolumeChanged,{targetVolume:c,sourceVolume:d,issuer:u||"api"})},c.prototype.setAudioQuality=function(c){var u,d=this.getAvailableAudioQualities(),p=this.getAudioQuality();(u="auto"===c?J:d.find(function(u){return u.id===c}))&&p.id!==u.id&&(this.lb(E.MediaType.Audio,c),this.c.eventHandler.dispatchEvent(b.PlayerEvent.AudioQualityChanged,{sourceQuality:p,sourceQualityId:p.id,targetQuality:u,targetQualityId:u.id}))},c.prototype.getAudioQuality=function(){var c=this.tb(E.MediaType.Audio),u=this.c.serviceManager.get(v.ServiceName.AdaptationService),d=u.isAuto(c),p=u.getCurrentRepresentationId(c);return d||null===p?J:this.getAvailableAudioQualities().find(function(c){return c.id===p.representationId})},c.prototype.lb=function(c,u){var d=this.tb(c);this.c.serviceManager.get(v.ServiceName.AdaptationService).setFixedRepresentation(d,u)},c.prototype.setVideoQuality=function(c){var u,d=this.getAvailableVideoQualities(),p=this.getVideoQuality();(u="auto"===c?$:d.find(function(u){return u.id===c}))&&p.id!==u.id&&(this.c.eventHandler.dispatchEvent(b.PlayerEvent.VideoQualityChanged,{sourceQuality:p,sourceQualityId:p.id,targetQuality:u,targetQualityId:u.id}),this.lb(E.MediaType.Video,c))},c.prototype.getVideoQuality=function(){var c=this.tb(E.MediaType.Video),u=this.c.serviceManager.get(v.ServiceName.AdaptationService),d=u.isAuto(c),p=u.getCurrentRepresentationId(c);return d||null===p?$:this.getAvailableVideoQualities().find(function(c){return c.id===p.representationId})},c.prototype.mb=function(){var c=this.c.sourceContext;c.source&&c.source.options&&c.source.options.headers&&(this.f.HTTP_HEADERS=c.source.options.headers)},c.prototype.nb=function(c,u){var d=this.rb(u);
14if(void 0!==d)if(c.type===E.StreamType.Hls&&O.ModuleManager.has(D.ModuleName.HLS)&&!d.hasReducer("hls")){var p=O.ModuleManager.get(D.ModuleName.HLS);d.addReducers(h(h({},W.engineBitmovinSourceReducers),{hls:p.HlsReducer}))}else d.addReducers(W.engineBitmovinSourceReducers)},c.prototype.ob=function(){this.g.on(C.MediaElementEvent.error,this.L),this.g.on(C.MediaElementEvent.timeupdate,this.Cb),this.g.on(C.MediaElementEvent.seeking,this.Bb),this.g.on(C.MediaElementEvent.playing,this.V),this.g.on(C.MediaElementEvent.play,this.W),this.g.on(C.MediaElementEvent.pause,this.X)},c.prototype.pb=function(){this.d.debug("setting bitrate boundaries for audio to "+this.f.MIN_SELECTABLE_AUDIO_BITRATE+" - "+this.f.MAX_SELECTABLE_AUDIO_BITRATE),this.d.debug("setting bitrate boundaries for video to "+this.f.MIN_SELECTABLE_VIDEO_BITRATE+" - "+this.f.MAX_SELECTABLE_VIDEO_BITRATE)},c.prototype.qb=function(c,u){var d,p=this;return this.n===f.Unloaded?Promise.reject("Unload during load"):(this.C(c,this.c),this.c.sourceContext.source=c.config,null!=(d=this.c.videoElement)&&d.eventHandler&&this.c.videoElement.eventHandler.reset(),this.k=c,this.o=!1,this.p=!1,this.c.store.dispatch((0,A.updateSeekingProcess)({isInitial:!0})),this.pb(),this.w&&(this.v=b.LatencyMode.Suspended,this.w.reset()),this.ob(),this.f.GLOBAL_DISABLE_SEEKING=u||!1,this.n=f.Loading,this.m.init(c).then(function(){p.n=f.Loaded,p.Ib()}))},c.prototype.prepareSource=function(c,u){this.nb(c,u.sourceIdentifier),this.D(c,this.c,u);var d,p=this.c.serviceManager.get(v.ServiceName.ManifestUpdateSchedulingService,u.sourceIdentifier);return null!=p&&p.isInitiated()?Promise.resolve():null!=(d=null==p?void 0:p.init(c.url.toString()))?d:Promise.resolve()},c.prototype.prepareLoad=function(){var c=this.c.serviceManager.get(v.ServiceName.PlayerStateService);c&&(this.x=c);var u=Promise.resolve();return this.n===f.Loading&&(u=this.unload()),this.x.reset(),this.n=f.Preparing,u},c.prototype.load=function(c,u){var d,p=this;if("dash"!==c.type&&"hls"!==c.type&&"smooth"!==c.type)return Promise.reject("invalid source");this.nb(c),this.mb(),this.y=(0,M.subscribe)(this.c.store)(function(c){return(0,I.getIsStopped)((0,I.getPlayerState)(c))},this.Db,function(c){return!0===c}),this.h.on(b.PlayerEvent.DVRWindowExceeded,this.Eb,!0),this.h.on(b.PlayerEvent.Error,this.Gb,!0);var h=null!=(d=null==u?void 0:u.seeking)&&d;return this.g.ready().then(function(){return p.qb(c,h)})},c.prototype.rb=function(c){return this.c.serviceManager.get(v.ServiceName.SourceStoreService,c??this.c.sourceContext.sourceIdentifier)},c.prototype.unload=function(c){var u=this;if(this.Hb(),this.n===f.Unloaded)return Promise.resolve();var d=this.n===f.Loaded;this.o=!1,this.n=f.Unloaded,this.l=!0,this.g.off(C.MediaElementEvent.error,this.L),this.g.off(C.MediaElementEvent.timeupdate,this.Cb),this.g.off(C.MediaElementEvent.seeking,this.Bb),this.g.off(C.MediaElementEvent.playing,this.V),this.g.off(C.MediaElementEvent.play,this.W),this.g.off(C.MediaElementEvent.pause,this.X),this==null||this.y(),this.h.off(b.PlayerEvent.DVRWindowExceeded,this.Eb),this.h.off(b.PlayerEvent.Error,this.Gb),this.x.isPlaying()&&this.g.pause(),this.x.reset();var p=this.c.sourceContext.sourceIdentifier;return this.c.serviceManager.has(v.ServiceName.SynchronizedTimeService,p)&&!ee(c)&&this.c.serviceManager.get(v.ServiceName.SynchronizedTimeService,p).reset(),this.Jb(),(this.m?this.m.terminate():Promise.resolve()).then(function(){u.k=void 0,u.H(c),ee(c)||c&&c===_.RECOVERY_ISSUER_NAME||(u.rb().dispatch((0,q.clearActiveTracksAction)()),u.S(null)),d&&u.h.dispatchEvent(b.PlayerEvent.SourceUnloaded)})},c.prototype.sb=function(){return this.m.isInitialized()},c.prototype.isPlaying=function(){return this.x.isPlaying()},c.prototype.isPaused=function(){return this.x.isPaused()},c.prototype.hasEnded=function(){return this.o},c.prototype.isMuted=function(){return this.g.isMuted()},c.prototype.isStalled=function(){return this.x.isStalled},c.prototype.isLive=function(){var c,u;return null!=(u=null==(c=(0,U.getManifestService)(this.c))?void 0:c.isLive())&&u},c.prototype.getVolume=function(){return this.g.getVolume()},c.prototype.getCurrentTime=function(c){void 0===c&&(c=E.TimeMode.AbsoluteTime);var u,d=null!=(u=this.R())?u:0;return!this.isLive()&&this.hasEnded()?c===E.TimeMode.RelativeTime?this.getDuration():this.getDuration()+d:c===E.TimeMode.RelativeTime?Math.max(0,this.m.getCurrentTime()-d):this.m.getCurrentTime()},c.prototype.getDuration=function(){var c,u;return null!=(u=null==(c=(0,U.getManifestService)(this.c))?void 0:c.getDuration())?u:0},c.prototype.getAvailableVideoQualities=function(){var c=(0,U.getManifestService)(this.c);return this.sb()&&c?c.getVideoRepresentations(this.getCurrentPlayingPerio
vendor: 13,869 bytes, line 14
14dId()):[]},c.prototype.getAvailableSegments=function(){return this.sb()?this.m.getAvailableSegments():{}},c.prototype.getAvailableAudioQualities=function(){var c=this.getAudio(),u=(0,U.getManifestService)(this.c);if(!this.sb()||!c||!u)return[];var d=u.getAudioRepresentations(this.getCurrentPlayingPeriodId());return d[c.id]?d[c.id]:[]},c.prototype.getDroppedVideoFrames=function(){return this.g.getDroppedVideoFrames()},c.prototype.setTargetBufferLevel=function(c,u,d){this.c.bufferSettings.setTargetLevel(c,u,d)},c.prototype.getBufferLevel=function(c,u){var d={level:null,targetLevel:this.c.bufferSettings.getTargetLevel(c,u),type:c,media:u},p=this.g.getCurrentTime(),h=(0,w.getMetricsState)(this.c.store.getState()),f=Object.keys(h).find(function(c){return k.MimeTypeHelper.isVideo(c)}),m=Object.keys(h).find(function(c){return k.MimeTypeHelper.isAudio(c)});return u===E.MediaType.Video&&f?d.level=this.m.getBufferLevel(f,p,c):u===E.MediaType.Audio&&m&&(d.level=this.m.getBufferLevel(m,p,c)),d},c.prototype.getTotalStalledTime=function(){var c=(0,w.getMetricsState)(this.c.store.getState());for(var u in c)if(c[u]){var d=(0,w.getMetricsLastEntry)(c,u,P.MetricType.StalledSeconds);if(d&&d.value&&!isNaN(d.value))return Math.round(100*d.value)/100}return 0},c.prototype.tb=function(c){return Object.keys((0,w.getMetricsState)(this.c.store.getState())).find(function(u){return u.includes(c)})},c.prototype.getDownloadedData=function(c){var u=this.tb(c),d=h({},this.vb(u)),p=h({},this.ub(u));return p.id&&(p.id=""+p.id),void 0===p.width&&void 0!==d.width&&(p.width=d.width),p.width=parseInt(""+p.width),void 0===p.height&&void 0!==d.height&&(p.height=d.height),p.height=parseInt(""+p.height),void 0===p.bitrate&&void 0!==d.bitrate&&(p.bitrate=d.bitrate),p.bitrate=parseInt(""+p.bitrate),p.isAuto=this.c.serviceManager.get(v.ServiceName.AdaptationService).isAuto(u),p},c.prototype.ub=function(c){if(this.m.hasStarted()){var u=(0,w.getMetricsState)(this.c.store.getState());if(u[c])return(0,w.getMetricsLastEntry)(u,c,P.MetricType.DownloadedRepresentation).value}return{}},c.prototype.vb=function(c){if(this.m.hasStarted()){var u=(0,w.getMetricsState)(this.c.store.getState());if(u[c])return(0,w.getMetricsLastEntry)(u,c,P.MetricType.DownloadedAdaptationSet).value}return{}},c.prototype.getDownloadedVideoData=function(){var c=this.getDownloadedData(E.MediaType.Video),u=!0;return c.hasOwnProperty("isAuto")&&(u=c.isAuto),c&&(c.bitrate||c.id)?{id:c.id,bitrate:c.bitrate,height:c.height,width:c.width,isAuto:u}:{id:"",bitrate:0,height:0,width:0,isAuto:!0}},c.prototype.getDownloadedAudioData=function(){var c=this.getDownloadedData(E.MediaType.Audio),u=!0;return c.hasOwnProperty("isAuto")&&(u=c.isAuto),c&&(c.bitrate||c.id)?{id:c.id,bitrate:c.bitrate,isAuto:u}:{id:"",bitrate:0,isAuto:!0}},c.prototype.getPlaybackVideoData=function(){var c=this.m.getPlaybackRepresentation(E.MediaType.Video)||{},u=isNaN(c._height)?0:Number(c._height),d=isNaN(c._width)?0:Number(c._width),p={id:c._id+"",bitrate:Number(c._bandwidth)||0,frameRate:c._frameRate,height:u,width:d,uid:c.uid};return c._codecs&&(p.codec=R.CodecStringHelper.getExtractedCodecStrings(c._codecs).video),p},c.prototype.getPlaybackAudioData=function(){var c,u={id:String(void 0),bitrate:0/0},d=this.m.getPlaybackRepresentation(E.MediaType.Audio);return d&&null!=(c=(0,j.representationToQuality)(d,d._mimeType))?c:u},c.prototype.setQueryParameters=function(c){this.f.QUERY_PARAMETERS=c},c.prototype.clearQueryParameters=function(){this.f.QUERY_PARAMETERS=void 0},c.prototype.wb=function(c){this.x&&this.x.isTimeShifting()&&(this.x.transitionToTimeShiftedState(c),this.j=-1)},c.prototype.xb=function(){this.wb(!1)},c.prototype.yb=function(c){this.wb(c!==_.STARTUP_ISSUER_NAME)},c.prototype.getMaxTimeShift=function(){if(this.isLive()&&this.sb())return this.e.playback&&!1===this.e.playback.timeShift?0:this.m.getMaxTimeShift()},c.prototype.timeShift=function(c,u){var d=this;if(this.sb()&&0>=this.getMaxTimeShift()){-1===this.j&&(this.j=this.getCurrentTime(),0===this.j&&(this.j=this.m.getTimeShiftLiveEdge())),this.Mb();var p=this.m.getPlaybackTimeForTimeShiftOffset(c);this.x.transitionToTimeShiftingState(this.j,p,u||"api",u!==_.STARTUP_ISSUER_NAME),this.m.timeShift(c,function(){return d.yb(u)}).catch(function(){return d.xb()})}},c.prototype.getTimeShift=function(){return this.sb()?this.m.getTimeShift():0},c.prototype.addSubtitle=function(c){var u=this;return this.sb()&&this.u?Promise.resolve(void 0).then(function(){u.u.addExternalSubtitle(c)}):Promise.reject(void 0)},c.prototype.removeSubtitle=function(c){this.sb()&&this.u&&this.u.removeSubtitle(c)},c.prototype.enableSubtitle=function(c){return this.sb()&&this.u?this.u.enableSubtitle(c):Promise.resolve(!1)},c.prototype.disableSubtitle=function(c){return this.sb()&&this.u?this.u.disableSubtitle(c):Promise.resolve(!1)},c.prototype.listSubtitles=function(){return this.sb()&&this.u&&this.m?this.u.getAvailableSubtitles(this.getCurrentPlayingPeriodId()):[]},c.prototype.setAudio=function(c){var u=this;if(this.sb()&&this.m&&"string"==typeof c){var d=this.getAudio();if(d&&d.id===String(c))return;this.m.setAudio(c).then(function(){var c=u.getAudio();c&&d&&c.id!==d.id&&u.c.eventHandler.dispatchEvent(b.PlayerEvent.AudioChanged,{targetAudio:c,sourceAudio:d,time:u.g.getCurrentTime()})}).catch(function(c){u.d.debug("setAudio failed for lang ",c)})}},c.prototype.getAvailableAudio=function(){return this.sb()&&this.m?this.m.getAvailableAudio(this.getCurrentPlayingPeriodId()).map(this.zb):[]},c.prototype.getAudio=function(){if(this.sb()&&this.m){var c=this.m.getAudio();if(c)return this.zb(c)}return null},c.prototype.getManifest=function(){var c,u=null==(c=(0,U.getManifestService)(this.c))?void 0:c.getManifest();if(u)return u._isHls?this.Ab():u.originalDashManifest},c.prototype.Ab=function(){return O.ModuleManager.get(D.ModuleName.HLS).selectors.getHlsState(this.rb().getState()).masterPlaylist.string},c.prototype.getBufferedRanges=function(){var c=this.m.getBufferedRanges(!0);return m.BufferRangeHelper.getCommonBufferedRanges(c).map(function(c){return{start:c.getStart(),end:c.getEnd()}})},c.prototype.getSnapshot=function(c,u){if(this.isPlaying()||this.isPaused())return this.g.getSnapshotData(c,u)},c.prototype.setPlaybackSpeed=function(c,u,d){void 0===u&&(u=1),void 0===d&&(d=!0),this.g.setPlaybackSpeed(c*u),this.x.playbackSpeed!==this.g.getPlaybackSpeed()&&this.x.setPlaybackSpeed(c,u,d)},c.prototype.getPlaybackSpeed=function(){return this.x.playbackSpeed},c.prototype.permitControl=function(c){this.q=c},c.prototype.getSeekableRange=function(){return(!this.isLive()||this.f.ENABLE_SEEK_FOR_LIVE)&&this.m?this.m.getSeekableRange():{start:-1,end:-1}},c.prototype.createManifestApi=function(){return B.MediaPlayerManifestApiFactory.create(this,this.c)},c.prototype.Fb=function(){var c=this.m.getTimeShiftHandler(),u=this.getMaxTimeShift()+c.getMinSegmentDuration(),d=this.m.getPlaybackTimeForTimeShiftOffset(u),p=c.isTimeInBufferedRange(d);this.c.logger.debug("Handling DVRWindowExceeded - TimeShifting to ".concat(p?u:"live edge")),this.timeShift(p?u:0)},c.prototype.getLatency=function(){var c;return null==(c=this.w)?void 0:c.getLatency()},c.prototype.setTargetLatency=function(c){var u=(0,U.getManifestService)(this.c);if(this.w&&u){var d=Math.abs(u.getTimeShiftBufferDepthSeconds());c>d&&(c=d,this.d.debug("Tried to set target latency outside DVR window, corrected to lower bound",d)),this.c.eventHandler.dispatchEvent(b.PlayerEvent.TargetLatencyChanged,{from:this.w.getTargetLatency(),to:c}),this.w.setTargetLatency(c)}},c.prototype.getTargetLatency=function(){var c;return null==(c=this.w)?void 0:c.getTargetLatency()},c.prototype.setCatchupConfig=function(c){var u;null==(u=this.w)||u.setCatchupConfig(c)},c.prototype.getCatchupConfig=function(){var c;return null==(c=this.w)?void 0:c.getCatchupConfig()},c.prototype.setFallbackConfig=function(c){var u;null==(u=this.w)||u.setFallbackConfig(c)},c.prototype.getFallbackConfig=function(){var c;return null==(c=this.w)?void 0:c.getFallbackConfig()},c.prototype.release=function(c){var u,d=this;return this.h.off(b.PlayerEvent.PeriodSwitch,this.Kb),this.h.off(b.PlayerEvent.PeriodSwitched,this.Lb),this.h.off(b.PlayerEvent.PlaybackSpeedChanged,this.Nb),this.z(),null==(u=this.B)||u.call(this),this.unload(c).then(function(){return d.x=null,d.m=(0,y.dispose)(d.m),d.g.release().then(function(){return d.g=null})})},c.prototype.Hb=function(){this.A&&(this.A(),this.A=void 0)},c.prototype.Ib=function(){for(var c=this.getCurrentTime(),u=0,d=this.getAvailableAudio();u<d.length;u++){var p=d[u];this.c.eventHandler.dispatchEvent(b.PlayerEvent.AudioAdded,{track:p,time:c})}},c.prototype.Jb=function(){for(var c=this.getCurrentTime(),u=0,d=this.getAvailableAudio();u<d.length;u++){var p=d[u];this.c.eventHandler.dispatchEvent(b.PlayerEvent.AudioRemoved,{track:p,time:c})}},c.prototype.Mb=function(){var c=this;!this.B&&this.c.store&&(this.B=(0,I.subscribeToSeekedOrTimeshifted)(this.c.store,function(){var u;null==(u=c.B)||u.call(c),c.B=void 0,c.O()?c.P():c.Q()}))},c.prototype.getCurrentPlayingPeriodId=function(){return(0,G.getPlayingPeriodId)(this.rb().getState())},c.prototype.updateCallback=function(c){},c.prototype.onFullscreenEnter=function(){},c.prototype.onFullscreenExit=function(){},c.prototype.isAirplayAvailable=function(){return!1},c.prototype.isAirplayActive=function(){return!1},c.prototype.showAirplayTargetPicker=function(){},c}()},52090:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.MediaPlayerController=void 0,u.isBufferChangeRequired=et;var p=d(4524),h=d(80813),f=d(56481),m=d(3714),g=d(75375),v=d(44468),y=d(70962),b=d(91678),S=d(23690),_=d(87827),E=d(48488),T=d(15971),w=d(77179),P=d(93204),A=d(34047),I=d(79721),M=d(78877),R=d(87244),k=d(85434),x=d(28334),C=d(19274),O=d(88052),D=d(62756),L=d(35046),N=d(12030),U=d(87222),F=d(13422),B=d(16197),j=d(84696),H=d(14443),V=d(58784),z=d(11536),q=d(36193),W=d(62198),G=d(42208),K=d(88935),Y=d(13114),X=d(39523),Q=d(99529),Z=d(52602),J=d(69102),$=d(60729);function ee(c){var u=O.ModuleManager.get(D.ModuleName.HLS,!1),d=null==u?void 0:u.M3u8Loader;return void 0!==d&&c instanceof d}function et(c,u){return!(0,J.areAudioMimeCodecsCompatible)({mimeType:c._mimeType,codec:(0,F.getCodecsFromAdaptationSet)(c)},{mimeType:u._mimeType,codec:(0,F.getCodecsFromAdaptationSet)(u)})}function ei(c,u){var d=c.getPlaybackTimeRange(),p=(0,Q.getTrackIdentifier)(c.getSegmentInfo());d&&(null==u||u.dispatch((0,X.removeStreamTimeRange)(p,d,Q.StreamTimeRangeType.Loading)))}u.MediaPlayerController=function(){function c(c,u){var d=this;this.zF={},this.iG=function(c){if(d.yF.isBufferClearingOngoing())ei(c,d.jG());else{if(d.PF.trackSegment(c),d.XF(c))return d.sF.logger.debug("Dropping segment ".concat(c.getUrl())),void ei(c,d.jG());var u=c.getMimeType(),p=d.zF[u];p&&d.kG(p)&&d.UF(c.getPeriodId()),d.yF.addSegment(c).then(function(){var c;null==(c=d.LF)||c.beat()}).catch(function(c){d.nF&&d.nF.debug(c)}),d.tF(c)}},this.HG=function(){var c=d.yF.getBufferedRangesMap(),u=Math.max.apply(Math,Object.values(c).filter(function(c){return c.length>0}).map(function(c){return c[c.length-1].start}));d.seek(u,!1,!0)},this.IG=function(){var c;d.KG(),d.vF&&d.vG(),d.GG(),d.JG(),d.vF&&(d.getAllSegmentControllers().forEach(function(c){return c.updateMpd()}),null==(c=d.NF)||c.onManifestUpdate()),d.sF.serviceManager.get(h.ServiceName.TimedMetadataService).parseEventStream()},this.YG=function(){(d.hasStreamEnded()||d.isInitialized()&&!d.DF.isPlaying())&&d.start()},this.eG=function(c){var u;if(c){if(c.success||408===c.httpStatus){var p=d.zF[c.mimeType];p&&d.fG(c,p)}c.success||null==(u=d.LF)||u.beat()}},this.gG=function(){d.getAllSegmentControllers().every(function(c){var u=d.MF.getTimeForNextSegment(c.getMimeType());return c.hasNext(u)})?d.nF.debug("ignoring ended event in firePlaybackFinishedEvent as there are more segments available"):d.CF.isLastPeriod(d.EF.getCurrentPlayingPeriodId())?d.yF.hasFutureBufferBlockData()||(d.stop(),d.nF.debug("Stopping buffer controller"),d.yF.stop(!0),d.DF.transitionToStoppedState()):d.nF.debug("ignoring ended event in firePlaybackFinishedEvent as there is a future period")},this.sF=c,this.nF=c.logger,this.oF=c.settings,this.pF=c.bufferSettings,this.qF=c.eventHandler,this.rF=c.renderer,this.tF=u,this.vF=!1,this.uF=null,this.wF={},this.xF=0,this.HF=!1,this.GF=!1,this.QF=new z.PlayerConfigEnhancer(c)}return c.prototype.UF=function(c){this.yF.addRequiredMediaType(c,"video/mp4"),this.yF.addRequiredMediaType(c,"audio/mp4")},c.prototype.VF=function(){var c=this,u=this.CF.isLive(),d=u?this.getTimeShift():this.rF.getCurrentTime();u?this.timeShift(d,function(){},!0).catch(function(u){return c.sF.logger.debug("TimeShift failed",u)}):this.seek(d,!1,!1,!0)},c.prototype.WF=function(){this.VF(),this.sF.logger.debug("manifest update interrupted by DRM key status change")},c.prototype.XF=function(c){var u=k.MimeTypeHelper.isSubtitle(c.getMimeType()),d=this.sF.sourceContext.technology.streaming===v.StreamType.Hls,p=(0,w.getStartTimeOffset)(this.jG().getState())+this.CF.getDuration(),h=this.isVod()&&c.getPlaybackTime()>=p,f=this.HF||h,m=this.CF.isRepresentationExcluded(c.getRepresentationId());return!u&&!d&&f||m},c.prototype.jG=function(){return this.sF.serviceManager.get(h.ServiceName.SourceStoreService,this.sF.sourceContext.sourceIdentifier)},c.prototype.kG=function(c){var u=A.CodecStringHelper.getExtractedCodecStrings(c.getCodecs());return!!(u.video&&u.audio)},c.prototype.getMaxTimeShift=function(){return this.getTimeShiftHandler().getMaxTimeShift()},c.prototype.lG=function(){this.qF.off(m.PlayerEvent.SegmentRequestFinished,this.eG)},c.prototype.mG=function(){var c=this,u=this.sF.store;!this.TF&&u&&(this.TF=(0,P.subscribe)(u)(function(c){if(c)return(0,_.getPlayerState)(c).seekingProcess},function(u,d){return u&&d&&c.bG(u,d)}))},c.prototype.nG=function(){var c=this.jG();
14!this.RF&&c&&(this.RF=(0,P.subscribe)(c)(W.getManifest,this.IG,function(c,u){return c.isInitialized&&!u.isInitialized}))},c.prototype.oG=function(){this.RF&&(this.RF(),this.RF=null)},c.prototype.pG=function(){var c=this.jG();!this.SF&&c&&(this.SF=(0,P.subscribe)(c)(K.getPlayingTracksState,this.YG,K.wasSwitchingToPeriodIdReset))},c.prototype.qG=function(){this.SF&&(this.SF(),this.SF=void 0)},c.prototype.rG=function(c){var u,d,p=(0,F.getMimeTypeForAdaptationSet)(c);if(k.MimeTypeHelper.isAV(p)){this.sF.store.dispatch((0,b.initializeMetricsForMimeType)(p,this.sF.settings)),this.jG().dispatch((0,q.setMediaTypeAction)(c._internalId,(0,j.resolveMediaTypes)(c))),this.wF[p]=(0,F.getCodecsFromAdaptationSet)(c);var h=this.EF.getCurrentPlayingPeriodId();this.zF[p]=new H.SegmentController(this.sF,this.iG,p,this.wF[p],c.isTransmuxingRequired,this.AF,null!=(u=c._periodId)?u:h,this.jG()),null==(d=this.NF)||d.updateSegmentControllers(this.zF),this.IF&&this.zF[p].setTransmuxer(this.IF),h&&this.rF.storeDrmInitDataFromManifest(c),this.sF.segmentInfoService&&this.sF.segmentInfoService.setSegmentControllers(Object.values(this.zF))}},c.prototype.updatePeriodForTimeshift=function(c,u,d){var p,h=this.EF.getCurrentPlayingPeriodId();h||this.EF.setCurrentPlayingPeriodId(c),this.EF.getCurrentLoadingPeriodId()!==c&&d&&this.switchLoadingPeriodForAllMedia(c),u&&h!==c&&(this.sF.logger.debug("Updating current playing period to ".concat(c)),this.EF.setCurrentPlayingPeriodId(c)),h!==c&&(null==(p=(0,T.getSourceStore)(this.sF))||p.dispatch((0,G.periodSwitchStarted)(c)))},c.prototype.sG=function(c){var u=c.AdaptationSet.find(function(c){return k.MimeTypeHelper.isVideo(c._mimeType)});u&&this.yF.addRequiredMediaType(c._id,u._mimeType);var d=c.AdaptationSet.find(function(c){return k.MimeTypeHelper.isAudio(c._mimeType)});d&&this.yF.addRequiredMediaType(c._id,d._mimeType)},c.prototype.tG=function(c){var u=this;c.AdaptationSet.filter(function(c){return k.MimeTypeHelper.isSubtitle(c._mimeType)}).forEach(function(d){u.yF.addRequiredMediaType(c._id,d._mimeType)})},c.prototype.uG=function(c){this.sG(c),this.tG(c)},c.prototype.vG=function(){var c=this;
14this.CF.getAllPeriods().forEach(function(u){c.uG(u),c.yF.checkIfEndOfBufferReached(c.oF.END_OF_BUFFER_TOLERANCE,!0)})},c.prototype.wG=function(){var c=this;return this.uF?this.uF:!0===this.vF||null===this.CF.getManifest()?this.uF=Promise.resolve():(this.xG(),this.wF={},this.uF=this.rF.ready().then(function(){return c.AG()}))},c.prototype.xG=function(){var c=this;this.zF&&(Object.keys(this.zF).forEach(function(u){return c.zF[u].dispose()}),this.zF={})},c.prototype.yG=function(){var c=this;if(O.ModuleManager.has(D.ModuleName.ContainerTS)){var u=O.ModuleManager.get(D.ModuleName.ContainerTS);this.getAllSegmentControllers().filter(function(c){return c.isTransmuxerRequired()}).forEach(function(d){c.IF=c.IF||new u.WebWorkerTransmuxer(c.sF,c.zG()),d.setTransmuxer(c.IF)}),this.JF&&this.JF.setTransmuxer(this.IF)}},c.prototype.zG=function(){return this.getAllSegmentControllers().filter(function(c){return k.MimeTypeHelper.isAV(c.getMimeType())}).length>1},c.prototype.AG=function(){this.EF.setInitialPeriod(),this.FG(),this.vG();var c=this.EF.getCurrentPlayingPeriod()||this.CF.getFirstPeriod();c&&this.CG(c),this.BG(),this.yG(),this.vF=!0},c.prototype.BG=function(){var c,u,d,p,h=this.getAudioSegmentController();if(this.JF){var f=null!=(d=null==(u=null==(c=null==h?void 0:h.getCurrentLangObj)?void 0:c.call(h))?void 0:u.lang)?d:null==(p=(0,U.getPreferredLanguage)("audio/mp4"))?void 0:p.language;this.JF.enableForcedSubtitle(f)}},c.prototype.CG=function(c){var u,d=this;
14this.DG(null!=(u=null==c?void 0:c.AdaptationSet)?u:[]).forEach(function(c){return d.EG(c)})},c.prototype.DG=function(c){var u,d,p,h=c.find(function(c){return k.MimeTypeHelper.isAudio(c._mimeType)}),f=c.find(function(c){return k.MimeTypeHelper.isVideo(c._mimeType)}),m=(null!=(d=null==(u=null==f?void 0:f.ContentComponent)?void 0:u.length)?d:0)>1;if(!h||!f||!m)return c;var g=(0,U.getHlsDefaultLanguage)(h._mimeType,this.jG().getState()),v=null==(p=f.ContentComponent)?void 0:p.find(function(c){return c._lang===(null==g?void 0:g.language)&&c._id===(null==g?void 0:g.name)});return g&&v?[f]:c},c.prototype.EG=function(c){var u=(0,F.getMimeTypeForAdaptationSet)(c);(0,k.isMediaTypeContained)(this.wF,u)||this.rG(c)},c.prototype.FG=function(){this.yF&&this.yF.dispose(),this.yF=new L.BufferController(this.sF,this.HG,this.CF.getTotalDuration(),this.EF.getCurrentPlayingPeriodId())},c.prototype.getBufferLevel=function(c,u,d,p){return void 0===p&&(p=!0),this.yF?this.yF.getOverallBufferLevel(c,u,d,p):0},c.prototype.GG=function(){var c=this;if(this.EF.shouldHandleDroppedOutPeriod()&&this.EF.isLoadingPeriodDroppedOut()){var u=this.getTimeShift();this.nF.debug("Current loading period (".concat(this.EF.getCurrentLoadingPeriodId(),") ")+"dropped out of the manifest, handling gracefully by time shifting to current offset ".concat(u)),this.timeShift(u,void 0,!0).catch(function(u){return c.sF.logger.debug("TimeShift failed",u)})}},c.prototype.JG=function(){var c=this;this.sF.serviceManager.maybeCall(h.ServiceName.ThumbnailService,function(u){c.sF.sourceContext.source&&c.sF.sourceContext.source.thumbnailTrack||u.addThumbnails(c.CF.getAllDashThumbnailSources())})},c.prototype.KG=function(){var c=this.CF.isLive(),u=this.sF.serviceManager.get(h.ServiceName.StartOffsetService),d=this.CF.hasSuggestedStartPosition();if(c){var p=this.CF.getTimeShiftBufferDepthSeconds();0!==p&&(this.KF.expirationTimeInSeconds=p),d&&(u.manifestStartOffset=this.CF.getLiveStartOffset(),this.LG())}else d&&(u.manifestStartOffset=this.CF.getVodStartOffset())},c.prototype.LG=function(){if(!this.isInitialized()){var c=Math.abs(this.CF.getLiveStartOffset(!1));c=c>0?c:this.CF.getMaxSegmentDuration(),this.sF.bufferSettings.setDistanceToLiveEdge(c)}},c.prototype.terminate=function(){var c,u,d=this;this.nF.debug("stopping playback"),this.stop(),this.getAllSegmentControllers().forEach(function(c){return c.stop()}),this.yF&&this.yF.stop(!0),this.IF=(0,f.dispose)(this.IF),this.NF=(0,f.dispose)(this.NF),this.PF=(0,f.dispose)(this.PF),(0,f.dispose)(this.EF),this.OF=null,this.rF.off(C.MediaElementEvent.ended,this.gG);var p=this.rF.shutdown(!1).catch(function(c){return d.nF.debug("Got an error on shutdown",{message:c.message}),Promise.resolve()});return this.lG(),this.qG(),this.vF=!1,null==(c=this.EF)||c.setCurrentPlayingPeriodId(void 0),this.wF=null,this.sF.store.dispatch((0,E.resetDrmKidErrors)()),null==(u=this.CF)||u.resetExcludedRepresentations(),this.xG(),p},c.prototype.dispose=function(){this.NF=(0,f.dispose)(this.NF),this.yF=(0,f.dispose)(this.yF),(0,f.dispose)(this.EF);try{this.lG()}catch{}this.oG(),this.qG(),this.xG(),this.TF&&this.TF(),this.JF=null,this.LF=null,this.MF=null,this.zF=null,this.oF=null,this.pF=null,this.qF=null,this.rF=null,this.wF=null},c.prototype.MG=function(){var c=this.sF.sourceContext.sourceIdentifier;this.CF=this.sF.serviceManager.get(h.ServiceName.ManifestService,c),this.DF=this.sF.serviceManager.get(h.ServiceName.PlayerStateService),this.JF=this.sF.serviceManager.get(h.ServiceName.SubtitleService,c),this.KF=this.sF.serviceManager.get(h.ServiceName.MetadataParsedService),this.AF=this.sF.serviceManager.get(h.ServiceName.ManifestLoadingService,c),this.LF=this.sF.serviceManager.get(h.ServiceName.HeartbeatService,c),this.MF=this.sF.serviceManager.get(h.ServiceName.StreamTimeService),this.BF=this.sF.serviceManager.get(h.ServiceName.ManifestUpdateSchedulingService,c)},c.prototype.init=function(c){var u,d=this,p=this.jG();this.EF=new V.PeriodSwitchTracker(this.sF),this.pG(),this.mG(),this.FF=!1,this.sF.store.dispatch((0,E.resetDrmKidErrors)()),this.MG(),p&&!this.PF&&(this.PF=new N.DrmKidErrorHandler(this.sF,function(){return d.WF()})),this.rF.on(C.MediaElementEvent.ended,this.gG);var f=this.BF.isInitiated()?Promise.resolve():this.BF.init(c.url.toString());c.config.drm&&(null==(u=this.sF.serviceManager.get(h.ServiceName.DrmService))||u.resolveDrmSystemFromSourceConfig(c.config.drm));var m=this.sF.settings.MAX_STARTUP_BUFFER,g=y.DefaultSettings.MAX_STARTUP_BUFFER;
vendor: 22,959 bytes, line 14
14return 1/0!==g&&m<g&&this.nF.debug("MAX_STARTUP_BUFFER (".concat(m," s) is below the recommended startup buffer for this platform (").concat(g," s). Playback may stall on initial play.")),f.then(function(){return d.nG(),d.IG(),d.QF.adjustToCurrentSource(d.sF,d.CF),d.vF?Promise.resolve():d.wG()})},c.prototype.stop=function(){var c;this.nF.debug("Stopping main timer"),null==(c=this.LF)||c.stop(),this.uF=null,this.qF.off(m.PlayerEvent.SegmentRequestFinished,this.eG),this.oG()},c.prototype.isOneLoaderReady=function(){return this.getAllSegmentControllers().some(function(c){return c.canLoad()})},c.prototype.areAllLoadersReady=function(){return this.getAllSegmentControllers().every(function(c){return c.canLoad()})},c.prototype.isVod=function(){return!this.CF.isLive()},c.prototype.NG=function(){return this.DF.isPaused()&&this.oF.STOP_DOWNLOAD_ON_PAUSE&&this.CF.isLive()},c.prototype.OG=function(c){var u=Object.keys(this.zF).find(function(u){return k.MimeTypeHelper.isAV(u)&&c!==u});if(!u||(0,$.isPlayingLowLatencyHls)(this.sF))return!1;if(this.FF)return k.MimeTypeHelper.isAudio(u);var d=this.zF[u],p=this.MF.getTimeForNextSegment(u);if(d.hasNext(p)&&!d.hasDownloadError&&!d.hasDelayedSegmentsInTransmuxer()){var h=this.getBufferRelevantTime(),f=this.VG(c,h),m=this.VG(u,h);return this.oF.DISABLE_PARALLEL_SEGMENT_LOADING&&f===m?k.MimeTypeHelper.isVideo(u):!this.PG(u,m)&&p<this.MF.getTimeForNextSegment(c)}return d.getCurrentPeriodId()!==this.zF[c].getCurrentPeriodId()},c.prototype.PG=function(c,u){var d=k.MimeTypeHelper.getMediaType(c);return u>=this.pF.getForwardTargetLevel(d)},c.prototype.QG=function(){var c=this,u=this.getAllSegmentControllers(),d=this.yF.hasPendingSegments(),p=u.map(function(c){return c.getMimeType()}),h=u.some(function(c){return c.hasPendingSegments()}),f=p.some(function(u){return c.rF.isDataBeingAppended(u)});return!h&&!d&&!f},c.prototype.shouldSuspendHeartbeat=function(){return!this.isOneLoaderReady()||this.NG()||this.yF.isBufferClearingOngoing()||this.GF},c.prototype.getActiveSegmentControllers=function(){var c=this;return this.getAllSegmentControllers().filter(function(u){return c.RG(u)})},c.prototype.RG=function(c){var u=this.EF.getCurrentLoadingPeriodId(),d=this.MF.getTimeForNextSegment(c.getMimeType());return c.canLoad()&&(c.hasNext(d)||c.hasPendingSegments(u))&&!this.OG(c.getMimeType())},c.prototype.shouldClearSubtitleServiceBuffers=function(){var c;return!this.DF.seekingOrTimeshifting&&!!(null!=(c=this.JF)&&c.hasSubtitles())},c.prototype.clearSubtitleServiceBuffers=function(){var c;null==(c=this.JF)||c.clearBuffersUntil(this.rF.getCurrentTime()-10)},c.prototype.areMediaTypesFinalForPlayingPeriod=function(){var c=this.EF.getCurrentPlayingPeriodId();return this.yF.areBufferBlockMediaTypesFinalForPeriod(c)},c.prototype.maybeStop=function(){var c=this.CF.isManifestFinalized(),u=this.CF.isLastPeriod(this.EF.getCurrentLoadingPeriodId());c&&u&&(this.yF.stop(!1),this.QG()&&(this.signalEndOfStream(),this.stop()))},c.prototype.SG=function(){var c=this;if(!this.DF.isPlay()||this.DF.hasBeenPlaying)return!1;var u=this.sF.settings.MAX_STARTUP_BUFFER;if(1/0===u||this.yF.isSegmentStoreWaitingForSegments())return!1;var d=this.getBufferRelevantTime();if(this.UG(d))return this.nF.debug("Not delaying segment loading despite reaching max startup buffer: current time ".concat(d," is in an A/V timeline gap")),!1;var p=Object.keys(this.wF),h=Math.max(u,this.TG(p)),f=p.map(function(u){return c.VG(u,d)});return!(Math.min.apply(Math,f)<h||(this.nF.debug("Max startup buffer of ".concat(h," reached, delaying segment loading until playback has started"),{currentTime:d,maxStartupBuffer:h,bufferLevels:f}),0))},c.prototype.TG=function(c){var u=this.sF.settings.STARTUP_THRESHOLD,d=this.jG(),p=(0,Y.getDrmState)(null==d?void 0:d.getState()),h=(0,M.getBufferEndSafetyMargin)(p);return Math.max((0,x.getPlatformSafeStartupBuffer)(this.sF,c),u,h)},c.prototype.UG=function(c){if(this.yF.isInStartupPhase())return!1;var u=this.yF.getBufferedRangesMap(!1),d=Object.keys(u),h=d.filter(function(d){return!(0,p.isInTimeRanges)(u[d],c)});return 0!==h.length&&h.length!==d.length&&h.every(function(d){return Math.min.apply(Math,u[d].map(function(c){return c.start}))-c>=1})},c.prototype.getNextSegment=function(c,u){if(c.canLoad()&&this.rF.shouldContinueBuffering()&&!this.SG()){var d=k.MimeTypeHelper.getMediaType(c.getMimeType()),p=this.pF.getForwardTargetLevel(d),f=this.VG(c.getMimeType(),this.getBufferRelevantTime());f>=p||(this.sF.serviceManager.get(h.ServiceName.AdaptationService).addSample(c.getMimeType(),{bufferTargetLevel:p,bufferLevel:f}),c.hasNext(u)&&c.getNext(u))}},c.prototype.getBufferRelevantTime=function(){return this.DF.seekingOrTimeshifting?this.DF.targetPlaybackTime:this.rF.getCurrentTime()},c.prototype.VG=function(c,u){return this.getBufferLevel(c,u,v.BufferType.ForwardDuration)},c.prototype.isLoadingLastPeriod=function(){return this.EF.isLoadingLastPeriod()&&!this.FF},c.prototype.switchLoadingPeriod=function(){if(this.FF){var c=this.getAudioSegmentController(),u=c.getCurrentPeriodId(),d=this.CF.getNextPeriod(u)._id;this.XG(d),c.getCurrentPeriodId()===this.EF.getCurrentLoadingPeriodId()&&(c.isTransmuxerRequired()&&c.getTransmuxer()&&(c.getTransmuxer().dispose(),c.setTransmuxer(this.IF)),this.FF=!1,this.nF.debug("The audio SegmentController caught up to the overall loading period again."))}else{var p=this.CF.getNextPeriod(this.EF.getCurrentLoadingPeriodId());p&&this.switchLoadingPeriodForAllMedia(p._id)}},c.prototype.switchLoadingPeriodForAllMedia=function(c){var u=this;c!==this.EF.getCurrentLoadingPeriodId()&&(this.FF=!1,this.WG(c),this.getAllSegmentControllers().filter(function(u){return u.getCurrentPeriodId()!==c}).forEach(function(d){d.switchPeriod(c),u.rF.storeDrmInitDataFromManifest(d.getAdaptationSetForPeriodId(c))}),this.EF.setCurrentLoadingPeriodId(c))},c.prototype.WG=function(c){var u,d,p=this;(null!=(d=null==(u=this.CF.getPeriod(new B.PeriodId(c)))?void 0:u.AdaptationSet)?d:[]).forEach(function(c){return p.EG(c)}),this.resetTransmuxer()},c.prototype.XG=function(c){var u=this.getAudioSegmentController(),d=u.getCurrentPeriodId();u.resetTransmuxer(),u.switchPeriod(c),this.nF.debug("Switched audio loading period from ".concat(d," to ").concat(c))},c.prototype.isAVCompletelyLoaded=function(){var c=this.getAllSegmentControllers().some(function(c){return c.hasPendingSegments()})||this.yF.hasPendingSegments();return this.CF.isManifestFinalized()&&!c},c.prototype.getBufferedRanges=function(c){return void 0===c&&(c=!1),this.yF.getBufferedRangesMap(c)},c.prototype.resetTransmuxer=function(){this.IF&&(this.IF.dispose(),this.IF=null),this.yG()},c.prototype.ZG=function(){this.yF.hasStopped()&&this.yF.restart()},c.prototype.aG=function(c,u,d,p){if(d&&0===c)return!1;var h=c<this.rF.getCurrentTime()&&this.sF.settings.CLEAR_BUFFERS_ON_SEEKING_BACKWARDS;return!u&&(!this.yF.isInBufferedRange(c)||h)||p},c.prototype.bG=function(c,u){var d;if(-1===c.targetTime&&u.targetTime>=0)null==(d=this.DF)||d.transitionToSeekedState(u.issuer!==g.STARTUP_ISSUER_NAME);else{var p=c.targetTime!==u.targetTime,h=c.targetTime>=0;p&&h&&this.seek(c.targetTime,c.issuer===g.STARTUP_ISSUER_NAME)}},c.prototype.seek=function(c,u,d,p){var h,f=this;if(void 0===u&&(u=!1),void 0===d&&(d=!1),void 0===p&&(p=!1),this.yF){this.ZG(),this.xF++;var m=this.xF,v=null!=(h=this.CF.getPeriodIdForTime(c))?h:I.DEFAULT_PERIOD_ID;this.cG(v);var y,b,E=this.EF.getCurrentPlayingPeriodId();this.nF.debug("seek from current period (".concat(E,") to target period ")+"(".concat(v,") - seek time in period is: ").concat(c)),this.yF.readyToSeek().then(function(){var h;if(b=f.aG(c,d,u,p),y=f.EF.getCurrentLoadingPeriodId()!==v&&b,E!==v&&(null==(h=(0,T.getSourceStore)(f.sF))||h.dispatch((0,G.periodSwitchStarted)(v))),b&&f.yF.isBufferAvailable())return f.dG()}).then(function(){return f.vF?(y&&f.switchLoadingPeriodForAllMedia(v),b&&f.getAllSegmentControllers().forEach(function(u){u.setAdaptionLogicStartupPhase(),u.seekTo(c)}),(u?Promise.resolve():f.start()).then(function(){var u;null==(u=f.LF)||u.beat(),f.yF.setCurrentTime(c).then(function(u){var d;f.sF.isDisposed||(f.xF===m?(f.nF.debug("Successfully seeked to ".concat(u)),null==(d=(0,T.getSourceStore)(f.sF))||d.dispatch((0,G.periodSwitchFinished)(v)),f.sF.store.dispatch((0,S.updateSeekingProcess)({targetTime:-1,issuer:"",isInitial:!1,seekableRange:{start:-1,end:-1}}))):function(c){var u=c.getState();if(!u)return!1;var d=(0,_.getPlayerState)(u).seekingProcess.issuer;return d!==g.STARTUP_ISSUER_NAME&&""!==d}(f.sF.store)&&f.sF.logger.debug("Seek to ".concat(c," has finished but a newer operation has been started")))}).catch(function(c){f.nF.debug("Failed to set currentTime on seek",c)})})):(f.nF.debug("Aborting seek as MediaPlayerController has been terminated!"),Promise.resolve())})}},c.prototype.cG=function(c){var u=this;void 0===this.EF.getCurrentPlayingPeriodId()&&(this.nF.debug("current period is undefined, using seek target period "+c),this.EF.setCurrentPlayingPeriodId(c),this.resetTransmuxer(),this.getAllSegmentControllers().forEach(function(c){c.switchPeriod(u.EF.getCurrentPlayingPeriodId()),k.MimeTypeHelper.isAV(c.getMimeType())&&u.rF.storeDrmInitDataFromManifest(c.getCurrentAdaptationSet())}),this.EF.setCurrentLoadingPeriodId(this.EF.getCurrentPlayingPeriodId()))},c.prototype.dG=function(){var c=this;return this.sF.logger.debug("Clearing buffer on seek"),this.HF=!1,this.getAllSegmentControllers().forEach(function(c){return c.cancelLoading()}),this.yF.clearBuffers().catch(function(){c.nF.debug("Failed to clear buffers on seek, carrying on regardless")})},c.prototype.getAllSegmentControllers=function(){return Object.values(this.zF||{})},c.prototype.getAudioSegmentController=function(){return this.getAllSegmentControllers().find(function(c){return k.MimeTypeHelper.isAudio(c.getMimeType())})},c.prototype.fG=function(c,u){var d,p;if(!(c.isInit||!c.success&&this.DF.seekingOrTimeshifting)){var f=k.MimeTypeHelper.getMediaType(u.getMimeType()),m=this.getBufferLevel(u.getMimeType(),this.rF.getCurrentTime(),v.BufferType.ForwardDuration),g=this.pF.getForwardTargetLevel(f);null==(p=null==(d=this.sF.serviceManager)?void 0:d.get(h.ServiceName.AdaptationService))||p.addSample(u.getMimeType(),{bufferTargetLevel:g,bufferLevel:m,segmentDuration:c.duration,segmentDownloadDuration:c.downloadTime,downloadCancelled:!c.success})}},c.prototype.signalEndOfStream=function(c){void 0===c&&(c=!0),this.isVod()&&(this.HF||(this.HF=!0,this.yF.setEndOfStream(!0),c&&this.stop()),this.yF.isStarted()&&this.yF.stop())},c.prototype.start=function(){var c=this;return this.hasStarted()?Promise.resolve():this.wG().then(function(){var u;c.yF.hasStreamEnded()&&(c.seek((0,w.getStartTimeOffset)(c.jG().getState())),c.getAllSegmentControllers().forEach(function(c){return c.resetTransmuxer()})),c.yF.isStarted()||c.yF.restart(),c.getAllSegmentControllers().filter(function(c){return k.MimeTypeHelper.isAV(c.getMimeType())}).forEach(function(u){return c.rF.storeDrmInitDataFromManifest(u.getCurrentAdaptationSet())}),c.nF.debug("Starting main timer"),c.HF=!1,null==(u=c.LF)||u.start(),c.nG(),c.qF.on(m.PlayerEvent.SegmentRequestFinished,c.eG)})},c.prototype.maybeTransitionToPausedState=function(c){(0,R.isSwitchingBufferBlocks)(this.jG())?this.sF.logger.debug("Ignoring transition to Paused because buffer block switch is ongoing"):this.DF.transitionToPausedState(!0,c,!0)},c.prototype.hG=function(c){var u=this;return Promise.all(c.map(function(c){return u.yF.clearCacheForMimeType(c),u.yF.clearBuffer(c)})).then(function(){})},c.prototype.sH=function(c,u){var d=this,p=c.getSourceBufferTypes().find(k.MimeTypeHelper.isAudio);return this.yF.clearCacheForMimeType(p),this.yF.removeBufferRange(p,u+this.oF.AUDIO_TRACK_SWITCH_BUFFER_GRACE_PERIOD).catch(function(){return d.nF.debug("Failed to trim forward buffer after audio track switch")})},c.prototype.tH=function(c,u){var d=this;return this.yF.setEndOfStream(!1).then(function(){var p=d.oF.DISABLE_AUDIO_BUFFER_CLEARING_ON_TRACK_SWITCH?d.sH(c,u):d.hG(c.getSourceBufferTypes());return c.getCurrentPeriodId()!==d.EF.getCurrentPlayingPeriodId()?d.CH(c):c.getCurrentPeriodId()!==d.EF.getCurrentLoadingPeriodId()&&d.EF.setCurrentLoadingPeriodId(c.getCurrentPeriodId()),c.setAdaptionLogicStartupPhase(),c.seekTo(u),d.start().catch(function(){return d.nF.debug("Failed to restart stopped MPC after audio track switch")}),p.then(function(){d.oF.DISABLE_AUDIO_BUFFER_CLEARING_ON_TRACK_SWITCH||d.rF.setCurrentTime(u).catch(function(c){return d.nF.debug("Failed to set currentTime on audio track switch",c)})}).catch(function(c){return d.nF.debug("Failed to attempt to restore playback after audio track switch",c)})})},c.prototype.setAudio=function(c){var u,d=this,p=this.getAvailableAudio(this.EF.getCurrentPlayingPeriodId()),h=p.find(function(u){return u.id===c});if(!this.vF||!h)return Promise.reject(null);var f=null==(u=this.getAudio())?void 0:u.id,m=p.find(function(c){return c.id===f});if(!m||f===c)return Promise.reject(f);var g=Object.keys(this.zF),v=g.find(k.MimeTypeHelper.isAudio)||g.find(k.MimeTypeHelper.isVideo),y=this.CF.getAdaptationSet(m.adaptationSetId),b=this.CF.getAdaptationSet(h.adaptationSetId);return y&&b&&v?(this.GF=!0,this.uH(b,h.id).then(function(){var c,u=null!=(c=d.CF.getAdaptationSet(h.adaptationSetId))?c:b;return d.wH(y,u,v).then(function(c){return d.xH(y,u,h,c)}).then(function(c){return d.vH(c)}).then(function(c){return d.AH(c,h)})}).finally(function(){return d.GF=!1})):Promise.reject("Did not find matching adaptation set")},c.prototype.uH=function(c,u){return k.MimeTypeHelper.isAudio(c._mimeType)&&ee(this.AF)?this.AF.updateAdaptationSet(u):Promise.resolve()},c.prototype.vH=function(c){return Object.keys(c).some(k.MimeTypeHelper.isAudio)&&ee(this.AF)&&this.getAllSegmentControllers().forEach(function(c){return c.updateMpd()}),Promise.resolve(c)},c.prototype.wH=function(c,u,d){var p,h=this,f=et(u,c),m=k.MimeTypeHelper.isVideo(u._mimeType)||k.MimeTypeHelper.isVideo(c._mimeType),g=!(0,J.hasContentProtection)(c.ContentProtection,u.ContentProtection);return!m&&(f||g)?(this.yF.updateRequiredMediaType(u._mimeType,d),this.zH(d,u).then(function(){var c=Object.keys(h.zF).find(k.MimeTypeHelper.isVideo);return g&&c?h.hG([c]).then(function(){var u,d=h.zF[c],p=h.EF.getCurrentPlayingPeriodId();d.getCurrentPeriodId()!==p&&h.zF[c].switchPeriod(p),h.zF[c].seekTo(h.rF.getCurrentTime()),null==(u=h.NF)||u.updateSegmentControllers(h.zF)}):Promise.resolve()}).then(function(){return h.yF.changeBufferType(u._mimeType,h.wF[u._mimeType],g)})):Promise.resolve(((p={})[u._mimeType]="",p))},c.prototype.xH=function(c,u,d,p){var h=this;return k.MimeTypeHelper.isVideo(u._mimeType)||k.MimeTypeHelper.isVideo(c._mimeType)?this.hG([c._mimeType,u._mimeType]).then(function(){var p=k.MimeTypeHelper.isVideo(u._mimeType);return h.IF.setShouldExpectSeparateAvSegments(!p),p?(h.yH(c),Promise.resolve()):(h.EG(u),h.BH(d,c._mimeType))}).then(function(){return p}):Promise.resolve(p)},c.prototype.yH=function(c){var u;if(c){var d=c._mimeType,p=this.zF[d];p.cancelLoading(),p.dispose(),delete this.zF[d],delete this.wF[d],null==(u=this.NF)||u.updateSegmentControllers(this.zF),this.jG().dispatch((0,q.removeActiveTrackAction)(c._internalId)),this.sF.segmentInfoService&&this.sF.segmentInfoService.setSegmentControllers(Object.values(this.zF))}},c.prototype.zH=function(c,u){var d=this,p=this.zF[c];return this.yH(p.getCurrentAdaptationSet()),this.hG([c]).then(function(){return d.rG(u),u._mimeType})},c.prototype.AH=function(c,u){var d=this;return Promise.all(Object.keys(c).map(function(c){return d.BH(u,c)})).then(function(){})},c.prototype.BH=function(c,u){if(this.JF&&this.JF.enableForcedSubtitle(c.lang),this.zF[u].setCurrentLangObj(c),this.zF[u].cancelLoading(),this.hasStarted()||this.HF){var d=this.getBufferRelevantTime();return this.tH(this.zF[u],d)}return Promise.resolve()},c.prototype.getAudio=function(){if(this.vF){var c=void 0,u=Object.keys(this.zF).find(function(c){return k.MimeTypeHelper.isAudio(c)});if(u&&(c=this.zF[u].getCurrentLangObj()),!c){var d=Object.keys(this.zF).find(function(c){return k.MimeTypeHelper.isVideo(c)});if(d&&this.zF[d].getSourceBufferTypes()){var p=this.zF[d];if(p.getSourceBufferTypes().some(function(c){return k.MimeTypeHelper.isAudio(c)})){var h=p.getCurrentAdaptationSet()._internalId;c=this.getAvailableAudio(this.EF.getCurrentPlayingPeriodId()).find(function(c){return c.adaptationSetId===h})||p.getCurrentLangObj()}}}return c||null}return null},c.prototype.CH=function(c){if(this.kG(c))this.switchLoadingPeriodForAllMedia(this.EF.getCurrentPlayingPeriodId());else{if(this.nF.debug("audio needs to load previous period(s) and catch up to the overall loading period"),c.isTransmuxerRequired()){var u=O.ModuleManager.get(D.ModuleName.ContainerTS);c.setTransmuxer(new u.WebWorkerTransmuxer(this.sF,this.zG()))}this.FF=!0,this.XG(this.EF.getCurrentPlayingPeriodId())}},c.prototype.getPlaybackRepresentation=function(c){for(var u in this.zF)if(this.zF[u]&&u.includes(c))return this.sF.serviceManager.get(h.ServiceName.TimedMetadataService).getPlaybackRepresentation(u)},c.prototype.getTimeShift=function(){return this.getTimeShiftHandler().getTimeShift()},c.prototype.getTimeShiftLiveEdge=function(){return this.CF.isLive()?this.getTimeShiftHandler().getTimeShiftLiveEdge():0},c.prototype.getPlaybackTimeForTimeShiftOffset=function(c){return this.getTimeShiftHandler().calculatePlaybackTimeForTimeShiftOffset(c)},c.prototype.getTimeShiftHandler=function(){return this.NF||(this.NF=new Z.TimeShiftHandler(this.sF,this,this.yF,this.zF)),this.NF},c.prototype.timeShift=function(c,u,d){return void 0===d&&(d=!1),this.getTimeShiftHandler().timeShift(c,u,d)},c.prototype.getAvailableAudio=function(c){return this.CF.getAvailableAudio(c)},c.prototype.hasStreamEnded=function(){return!!this.yF&&this.yF.hasStreamEnded()},c.prototype.getCurrentTime=function(){return this.rF.getCurrentTime()},c.prototype.getSeekableRange=function(){if(this.CF.isLive()){if(this.DF.seekingOrTimeshifting&&this.OF)return this.OF;var c=this.getTimeShiftLiveEdge(),u=c+this.getMaxTimeShift();return this.OF={start:u,end:c}}var d=this.getAllSegmentControllers().find(function(c){return k.MimeTypeHelper.isAV(c.getMimeType())});return d?d.getMPDHandler().getSeekableRange():{start:-1,end:-1}},c.prototype.getAvailableSegments=function(){var c=this,u={};return Object.keys(this.zF).forEach(function(d){u[d]=c.zF[d].getSegmentInfos()}),u},c.prototype.isInitialized=function(){return this.vF},c.prototype.hasStarted=function(){var c,u;return null!=(u=null==(c=this.LF)?void 0:c.started)&&u},c}()},84696:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.resolveMediaTypes=function(c){return(0,h.getCodecsFromAdaptationSet)(c).split(",").map(function(c){return(0,p.getMediaTypeFromCodec)(c)})};var p=d(34047),h=d(13422)},52570:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.MseModuleDefinition=void 0;var p=d(68925),h=d(86897),f=d(62756),m=d(34795),g=d(47151),v=d(67580),y=d(13422),b=d(79505),S=d(94358),_=d(99257),E=d(71809),T=d(88618),w=d(48514),P=d(14443),A=d(25248),I=d(63066),M=d(54015),R=d(97587),k=d(36193),x=d(44115),C=d(88935),O=d(72498),D=d(39523),L=d(99529),N=d(64922),U={removeStreamTimeRange:D.removeStreamTimeRange,removeLoadedRange:p.removeLoadedRange,addLoadedRange:p.addLoadedRange,resetLoadedRanges:p.resetLoadedRanges,resetStreamTimeline:D.resetStreamTimeline,removeActiveTrackAction:k.removeActiveTrackAction,setRepresentationIdAction:k.setRepresentationIdAction,setMediaTypeAction:k.setMediaTypeAction},F={getPlayingPeriodId:C.getPlayingPeriodId,getContainerFormat:x.getContainerFormat,getLoadedRangesForMimeType:h.getLoadedRangesForMimeType,getSegmentInfos:O.getSegmentInfos},B={containerFormat:m.ContainerFormat,streamTimeRangeType:L.StreamTimeRangeType};u.MseModuleDefinition={name:f.ModuleName.EngineBitmovin,module:{MediaPlayer:S.MediaPlayer,SegmentController:P.SegmentController,technologyChecker:new N.TechnologyChecker,Stream:R.Stream,FetchController:T.FetchController,SegmentInfoService:A.SegmentInfoService,SegmentPrefetchingService:M.SegmentPrefetchingService,SegmentCacheService:w.SegmentCacheService,AdRestorationOptimizationService:_.AdRestorationOptimizationService,ManifestCachingService:v.ManifestCachingService,SegmentListMPDHandler:I.SegmentListMPDHandler,actions:U,selectors:F,mseModuleTypes:B,AdaptationSetId:g.AdaptationSetId,RepresentationId:b.RepresentationId,getTrackIdentifier:L.getTrackIdentifier,getCodecsFromAdaptationSet:y.getCodecsFromAdaptationSet,getMimeTypeForAdaptationSet:y.getMimeTypeForAdaptationSet,collectInitialAdSegmentInfos:E.collectInitialAdSegmentInfos}},u.default=u.MseModuleDefinition},58784:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.PeriodSwitchTracker=void 0;var p=d(80813),h=d(3714),f=d(93204),m=d(89927),g=d(42208),v=d(88935);u.PeriodSwitchTracker=function(){function c(c){var u=this;this.z2=function(c,d){var p=u.getCurrentPlayingPeriodId(),f=c.switchingToPeriodId;p!==f&&(u.i1.debug("Starting switch from Period ".concat(p," to Period ").concat(f)),u.h1.eventHandler.dispatchEvent(h.PlayerEvent.PeriodSwitch,{sourcePeriod:{periodId:p},targetPeriod:{periodId:f}}))},this.A2=function(c,d){var p=d.switchingToPeriodId,f=u.getCurrentPlayingPeriodId();if(p!==f){u.setCurrentPlayingPeriodId(p);var m=u.getCurrentPlayingPeriod();m&&m.AdaptationSet.forEach(function(c){return u.h1.renderer.storeDrmInitDataFromManifest(c)}),u.i1.debug("Successfully switched from Period ".concat(f," to Period ").concat(p)),u.h1.eventHandler.dispatchEvent(h.PlayerEvent.PeriodSwitched,{sourcePeriod:{periodId:f},targetPeriod:{periodId:p}})}},this.h1=c,this.i1=c.logger,this.x2()}return c.prototype.w2=function(){return this.h1.serviceManager.get(p.ServiceName.ManifestService,this.h1.sourceContext.sourceIdentifier)},c.prototype.getCurrentPlayingPeriod=function(){return this.w2().findPeriod(this.getCurrentPlayingPeriodId())},c.prototype.x2=function(){var c=this.B2();!this.v2&&c&&(this.v2=(0,f.subscribe)(c)(v.getPlayingTracksState,this.z2,v.isSwitchingPeriods)),!this.u2&&c&&(this.u2=(0,f.subscribe)(c)(v.getPlayingTracksState,this.A2,v.wasSwitchingToPeriodIdReset))},c.prototype.y2=function(){this.u2&&(this.u2(),this.u2=void 0),this.v2&&(this.v2(),this.v2=void 0)},c.prototype.B2=function(){return this.h1.serviceManager.get(p.ServiceName.SourceStoreService,this.h1.sourceContext.sourceIdentifier)},c.prototype.getCurrentLoadingPeriodId=function(){return this.j1},c.prototype.setCurrentLoadingPeriodId=function(c){this.j1=c},c.prototype.getCurrentPlayingPeriodId=function(){return(0,v.getPlayingPeriodId)(this.B2().getState())},c.prototype.setCurrentPlayingPeriodId=function(c){this.B2().dispatch((0,g.setPlayingPeriodId)(c))},c.prototype.resetPeriodIds=function(){this.setCurrentPlayingPeriodId(void 0),this.setCurrentLoadingPeriodId(void 0)},c.prototype.shouldHandleDroppedOutPeriod=function(){return null!=this.getCurrentPlayingPeriodId()||null!=this.j1}
14,c.prototype.C2=function(c){return!this.w2().getAllPeriods().map(function(c){return c._id}).includes(c)},c.prototype.isLoadingPeriodDroppedOut=function(){return this.C2(this.j1)},c.prototype.isLoadingLastPeriod=function(){return this.w2().isLastPeriod(this.j1)},c.prototype.setInitialPeriod=function(){var c=this.w2().isLive()?this.D2():this.E2();this.j1=c,this.setCurrentPlayingPeriodId(this.j1),this.i1.debug("setting initial period to ".concat(this.j1))},c.prototype.D2=function(){var c=(0,m.toSeconds)(Date.now())-this.w2().getDesiredDistanceToLiveEdge();return this.w2().getPeriodIdForTime(c)},c.prototype.E2=function(){var c=this.h1.serviceManager.get(p.ServiceName.StartOffsetService).getStartOffset(this.h1.sourceContext.source);return this.w2().getPeriodIdForTime(c)},c.prototype.dispose=function(){this.y2()},c}()},11536:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.PlayerConfigEnhancer=void 0;var p=d(21281),h=d(70850),f=d(50962);u.PlayerConfigEnhancer=function(){function c(c){this.F2={},h.Util.deepCopy(this.F2,c.config),this.G2={},h.Util.deepCopy(this.G2,c.settings)}return c.prototype.adjustToCurrentSource=function(c,u){var d,h,m,g,v=c.config;if(v.adaptation&&(v.adaptation.logic=null==(d=this.F2.adaptation)?void 0:d.logic),c.settings.CHUNKED_CMAF_STREAMING=this.G2.CHUNKED_CMAF_STREAMING,u.isDashManifest()&&u.isLive()&&(0,f.isLowLatencyConfigured)(c)){c.logger.debug("Detected DASH Live stream and LL config, enabling 'low-latency-v1' adaptation logic and CHUNKED_CMAF_STREAMING tweak"),v.adaptation=null!=(h=v.adaptation)?h:{},v.adaptation.logic=null!=(m=v.adaptation.logic)?m:p.AdaptationLogicType.LOW_LATENCY;var y=c.internalPlayer.getConfig().tweaks||{};c.settings.CHUNKED_CMAF_STREAMING=null==(g=y.CHUNKED_CMAF_STREAMING)||g}},c}()},3095:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.createSegmentParser=function(c,u){if(u===f.ContainerFormat.MP4&&p.ModuleManager.has(h.ModuleName.ContainerMP4)){var d=p.ModuleManager.get(h.ModuleName.ContainerMP4);return new d.MP4Parser(c,new d.MP4EncryptionParser(c))}if(u===f.ContainerFormat.WEBM&&p.ModuleManager.has(h.ModuleName.ContainerWebM))return new(p.ModuleManager.get(h.ModuleName.ContainerWebM)).WebMParser};var p=d(88052),h=d(62756),f=d(34795)},47531:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.StreamTimeService=void 0;var p=d(80813),h=d(74853),f=d(99529);function m(c){return[f.StreamTimeRangeType.Loading,f.StreamTimeRangeType.Failed].includes(c.type)}u.StreamTimeService=function(){function c(c,u){this.serviceManager=c,this.sourceIdentifier=u}return Object.defineProperty(c.prototype,"WH",{get:function(){return this.serviceManager.get(p.ServiceName.SourceStoreService,this.sourceIdentifier).getState()},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"XH",{get:function(){var c;return null==(c=this.WH)?void 0:c.streamTimeline},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"YH",{get:function(){var c;return null==(c=this.WH)?void 0:c.buffer.bufferStateMap},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"ZH",{get:function(){return this.serviceManager.get(p.ServiceName.PlayerStateService)},enumerable:!1,configurable:!0}),c.prototype.getTimeForNextSegment=function(c){var u,d,p,f,g=(0,h.findFromEnd)(this.XH[c]||[],m),v=null==(u=this.YH)?void 0:u[c],y=[g,(null==(d=null==v?void 0:v.loadedRanges)?void 0:d[v.loadedRanges.length-1])||(null==(p=null==v?void 0:v.rendererRanges)?void 0:p[v.rendererRanges.length-1])].filter(function(c){return c}).map(function(c){return c.end}),b=Math.max.apply(Math,y);return isFinite(b)?b:null!=(f=this.ZH)&&f.seekingOrTimeshifting?this.ZH.targetPlaybackTime:0},c.prototype.dispose=function(){},c}()},64922:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.TechnologyChecker=void 0;var p=d(88052),h=d(62756);u.TechnologyChecker=function(){function c(){}return c.prototype.getSupportedTechnologies=function(){return p.ModuleManager.has(h.ModuleName.RendererMse)?p.ModuleManager.get(h.ModuleName.RendererMse).technologyChecker.getSupportedTechnologies():[]},c}()}
14,52602:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.TimeShiftHandler=void 0;var p=d(80813),h=d(3714),f=d(87827),m=d(15971),g=d(79721),v=d(89927),y=d(23068),b=d(70850),S=d(88052),_=d(62756),E=d(42208),T=d(39523),w=d(99529),P=d(68981),A=d(50962),I=d(60729);u.TimeShiftHandler=function(){function c(c,u,d,h){var f=this;this.S2=!1,this.f2=function(){f.g2(!0)},this.h2=function(c){var u=f.H2.renderer.getCurrentTime(!0),d=u-c;d=b.Util.roundValue(d,1),f.e2(d,u)},this.H2=c,this.I2=u,this.J2=d,this.K2=Object.keys(h).map(function(c){return h[c]}),this.L2=c.serviceManager.get(p.ServiceName.ManifestService,c.sourceContext.sourceIdentifier),this.M2=c.logger,this.P2=0,this.T2=c.sourceContext.sourceIdentifier,this.i2()}return c.prototype.U2=function(){var c=(0,A.isLowLatencyConfigured)(this.H2),u=(0,I.isPlayingLowLatencyHls)(this.H2);return c||u},c.prototype.V2=function(){var c;if(this.Q2&&!this.Q2.isOngoing){var u=(0,v.toSeconds)(Date.now()-this.Q2.timestamp);c=this.Q2.liveEdge+u}else c=this.W2();return isFinite(c)||(c=(0,v.toSeconds)(Date.now()-this.L2.getAvailabilityStartTime())),c},c.prototype.W2=function(){var c=this.Y2();if(!this.U2())return c;var u=this.K2.reduce(function(c,u){return Math.min(c,u.getMPDHandler().getSegmentDuration())},1/0),d=this.X2();return d-c<u?d:c},c.prototype.X2=function(){var c=this.H2.serviceManager.maybeCall(p.ServiceName.SynchronizedTimeService,function(c){return c.getTimeDifference()},0,this.H2.sourceContext.sourceIdentifier);return(0,v.toSeconds)(Date.now()+c)},c.prototype.Y2=function(){return this.K2.map(function(c){return c.getLiveEdgeTime()}).reduce(function(c,u){return u<c&&u>=0?u:c},1/0)},c.prototype.updateSegmentControllers=function(c){this.K2=Object.values(c)},c.prototype.getMaxTimeShift=function(){return this.L2.getManifest()?Math.min(this.L2.getTimeShiftBufferDepthSeconds()+this.L2.getDesiredDistanceToLiveEdge(),0):0},c.prototype.getTimeShiftLiveEdge=function(){return this.V2()-this.L2.getDesiredDistanceToLiveEdge()},c.prototype.getTimeShift=function(){var c=this.Z2();if(this.R2&&Math.abs((0,v.toSeconds)(Date.now()-this.R2.completionDate)-(this.I2.getCurrentTime()-this.R2.reachedTime))<this.H2.settings.ACCEPTABLE_TIMESHIFT_INACCURACY)return this.R2.offset;var u=this.getMaxTimeShift();return c<u&&(c=u),c>0&&(c=0),c},c.prototype.Z2=function(c){return void 0===c&&(c=!1),!this.Q2||this.Q2.isOngoing?0:(c?this.I2.getBufferRelevantTime():this.I2.getCurrentTime())-this.getTimeShiftLiveEdge()},c.prototype.a2=function(){return this.V2()-this.I2.getBufferRelevantTime()},c.prototype.timeShift=function(c,u,d){var p,h=this;void 0===d&&(d=!1);var f=!!this.Q2;f||this.d2(),c=Math.max(this.getMaxTimeShift(),c);var v=this.I2.getCurrentTime(),b=this.calculatePlaybackTimeForTimeShiftOffset(c),S=null!=(p=this.L2.getPeriodIdForTime(b))?p:g.DEFAULT_PERIOD_ID;this.P2++;var _=this.P2,T=d||this.J2.shouldBuffersBeClearedOnTimeshift(b);return this.M2.debug("Performing timeShift to offset ".concat(c,", time: ").concat(v," -> ").concat(b,", period: ").concat(S)),this.J2.setTimeshiftCancelState(!1),(0,y.isDefined)(S)&&this.I2.updatePeriodForTimeshift(S,!f,T),T&&this.K2.forEach(function(c){return c.seekTo(b)}),f&&this.b2(b),this.g2(!0),this.J2.setCurrentTime(b,!0,d).then(function(d){var p;h.g2(!1),h.R2={offset:c,completionDate:Date.now(),reachedTime:d},h.P2===_&&u?(h.M2.debug("Successfully timeShifted to ".concat(d,", hit target time with a diff of ").concat(d-b)),null==(p=(0,m.getSourceStore)(h.H2))||p.dispatch((0,E.periodSwitchFinished)(S)),u()):u&&h.H2.logger.debug("Timeshift to ".concat(c," has finished but a newer operation has been started"))}).catch(function(c){h.M2.debug("Failed to set currentTime on timeShift",c)}).finally(function(){return h.J2.setTimeshiftCancelState(!1)})},c.prototype.b2=function(c){var u;if(this.L2.isHlsManifest()){var d,h,f,m,g=this.H2.serviceManager.get(p.ServiceName.SourceStoreService,this.T2);d=null==(u=S.ModuleManager.get(_.ModuleName.HLS))?void 0:u.selectors.getHlsState(null==g?void 0:g.getState()),-1!==(m=null!=(f=null==(h=null==d?void 0:d.timestampRolloverPositions)?void 0:h.next)?f:-1)&&(c>=m||c<=d.timestampRolloverPositions.previous)&&(this.H2.logger.debug("Resetting transmuxer because target is beyond a timestamp rollover"),this.I2.resetTransmuxer())}},c.prototype.cancel=function(){this.H2.logger.debug("Cancelling ongoing time shift operation..."),this.J2.setTimeshiftCancelState(!0)},c.prototype.calculatePlaybackTimeForTimeShiftOffset=function(c){var u=this.L2.getDesiredDistanceToLiveEdge(),d=this.V2(),p=d+(c-u);return p=Math.max(p,0),this.L2.hasMultiplePeriods()?(0,P.adjustTargetTimeToPeriodStart)(p,this.H2.settings.END_OF_BUFFER_TOLERANCE,this.L2,this.H2.logger):0===c&&this.U2()?Math.min(d,p+this.H2.settings.LOW_LATENCY_SEEK_AHEAD):p},c.prototype.onManifestUpdate=function(){this.d2(),this.L2.isLive()&&
14(this.Z2(!0)<this.getMaxTimeShift()-this.getMinSegmentDuration()?this.H2.settings.DISABLE_AUTO_RECOVERY_ON_DVR_WINDOW_EXCEEDED?this.S2||(this.H2.eventHandler.dispatchEvent(h.PlayerEvent.DVRWindowExceeded),this.S2=!0):this.H2.eventHandler.dispatchEvent(h.PlayerEvent.DVRWindowExceeded):this.S2=!1,this.c2())},c.prototype.c2=function(){var c=this;this.H2.serviceManager.maybeCall(p.ServiceName.SourceStoreService,function(u){var d,p=c.L2.getTimeShiftBufferDepthSeconds(),h=c.V2()+p,f=null==(d=u.getState())?void 0:d.streamTimeline;void 0!==f&&Object.keys(f).forEach(function(c){u.dispatch((0,T.removeStreamTimeRange)(c,{start:0,end:h},w.StreamTimeRangeType.Failed))})})},c.prototype.isTimeInBufferedRange=function(c){return this.J2.isInBufferedRange(c)},c.prototype.getMinSegmentDuration=function(){return this.K2.reduce(function(c,u){return Math.min(c,u.getMPDHandler().getSegmentDuration())},1/0)},c.prototype.d2=function(){var c=this.L2.isLive(),u=c?this.a2():1/0,d=c?Math.abs(this.L2.getTimeShiftBufferDepthSeconds()):this.L2.getDuration();this.H2.bufferSettings.setTargetBufferLevelConstraints({minimumBufferLength:this.getMinSegmentDuration(),currentDistanceToLiveEdge:u,streamDuration:d})},c.prototype.e2=function(c,u){this.R2={completionDate:Date.now(),reachedTime:u,offset:c},this.g2(!1)},c.prototype.g2=function(c){this.Q2&&(c||!this.Q2.isOngoing)||(this.Q2={timestamp:Date.now(),liveEdge:this.V2(),isOngoing:c})},c.prototype.i2=function(){var c=this;this.N2=(0,f.subscribeToSeek)(this.H2.store,this.f2),this.O2=(0,f.subscribeToSeeked)(this.H2.store,function(u,d){return c.h2(d.seekingProcess.seekableRange.end)})},c.prototype.j2=function(){var c,u;null==(c=this.N2)||c.call(this),null==(u=this.O2)||u.call(this)},c.prototype.dispose=function(){this.j2(),this.J2.setTimeshiftCancelState(!0)},c}()},90685:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.BufferBlock=u.EncryptionState=void 0,u.isPrecedingSegment=v;var p,h,f=d(85434),m=d(48954);function g(c,u,d){c.hasOwnProperty(u)&&d(c[u])}function v(c,u,d){var p=c.isInit(),h=c.getMimeType()!==u;return!p&&!h&&c.getPlaybackTime()+c.getDuration()<d}(p=h||(u.EncryptionState=h={})).Encrypted="encrypted",p.Clear="clear",u.BufferBlock=function(){function c(c){this.wcb={},this.xcb={},this.id=c,this.ucb=[],this.vcb=new Map}return c.prototype.addSegment=function(c){var u=c.getMimeType();c.isInit()&&this.Dcb(u),this.ycb(c),this.zcb(c);var d=c.isInit()?0:c.getDuration();this.ucb.push({segment:c}),c.isInit()||(this.setMaxSegmentDuration(u,Math.max(d,this.getMaxSegmentDuration(u))),this.Ccb(c,u)),c.setBufferBlockId(this.id),this.Bcb(c)},c.prototype.ycb=function(c){var u=c.getSegmentInfo(),d=u.discontinuitySequenceNumber,p=u.mimeType;p&&(this.wcb[p]||(this.wcb[p]=[]),null==d||this.wcb[p].includes(d)||this.wcb[p].push(d))},c.prototype.zcb=function(c){var u=c.getSegmentInfo(),d=u.periodId,p=u.mimeType;p&&(this.xcb[p]||(this.xcb[p]=[]),null==d||this.xcb[p].includes(d)||this.xcb[p].push(d))},c.prototype.setSegregationCriteria=function(c,u){this.vcb.has(u)||this.Acb(u),this.Ecb(u).segregationCriteria=c},c.prototype.Acb=function(c){var u={};return this.vcb.set(c,u),u},c.prototype.updateMediaTypeForMimeType=function(c){var u=this.Ecb(c.mimeType)||this.Acb(c.mimeType);u.mediaType?(g(c,"codec",function(c){u.mediaType.codec=c}),g(c,"timescale",function(c){u.mediaType.timescale=c})):u.mediaType=c},c.prototype.getSegregationCriteria=function(c){var u;return null==(u=this.Ecb(c))?void 0:u.segregationCriteria},c.prototype.Bcb=function(c){var u,d,p=c.getMimeType(),h=this.getMediaType(p);h?(null!=h.codec||(h.codec=c.getCodec()),null!=h.timescale||(h.timescale=c.getTimescale())):(this.vcb.has(p)||this.vcb.set(p,{}),this.Ecb(p).mediaType={mimeType:p,codec:c.getCodec(),timescale:c.getTimescale()})},c.prototype.getMediaType=function(c){var u,d;return null!=(d=null==(u=this.Ecb(c))?void 0:u.mediaType)?d:null},c.prototype.addMediaType=function(c){f.MimeTypeHelper.isAV(c.mimeType)&&!this.getMediaType(c.mimeType)&&(this.vcb.has(c.mimeType)||this.Acb(c.mimeType),this.Ecb(c.mimeType).mediaType=c)},c.prototype.removeMediaType=function(c){this.vcb.delete(c)},c.prototype.hasMediaType=function(c){var u,d;return null!=(d=null==(u=this.vcb)?void 0:u.has(c))&&d},c.prototype.getMediaTypes=function(){return(0,m.getValues)(this.vcb).map(function(c){return c.mediaType})},c.prototype.getMediaTypesWithoutSubs=function(){return this.getMediaTypes().filter(function(c){return f.MimeTypeHelper.isAV(c.mimeType)})},c.prototype.removeSegment=function(c){var u=this.ucb.findIndex(function(u){return u.segment===c});u>-1&&this.ucb.splice(u,1)},c.prototype.clearSegments=function(c){this.ucb=this.ucb.filter(function(u){return u.segment.getMimeType()!==c});var u=this.Ecb(c);u&&(u.playbackTimeRange=void 0),this.wcb[c]=[],this.xcb[c]=[]},c.prototype.getPrecedingSegments=function(c,u){var d=[];return this.ucb.forEach(function(p){v(p.segment,c,u)&&d.push(p.segment)}),d},c.prototype.Ccb=function(c,u){var d=this.getPlaybackTimeRange(u),p=c.getPlaybackTime(),h=p+c.getDuration();d?(p<d.start&&(d.start=p),h>d.end&&(d.end=h)):this.Ecb(u).playbackTimeRange={start:p,end:h}},c.prototype.getPlaybackTimeRange=function(c){var u,d;return null!=(d=null==(u=this.Ecb(c))?void 0:u.playbackTimeRange)?d:null},c.prototype.getId=function(){return this.id},c.prototype.getAllKnownPeriodIds=function(){var c;return(c=[]).concat.apply(c,Object.values(this.xcb))},c.prototype.getMinCommonStartTime=function(){return(0,m.getValues)(this.vcb).filter(function(c){return c.playbackTimeRange}).map(function(c){return c.playbackTimeRange}).reduce(function(c,u){return Math.max(u.start,c)},-1/0)},c.prototype.getCommonPlaybackTimeRanges=function(){return(0,m.getValues)(this.vcb).filter(function(c){return c.playbackTimeRange}).map(function(c){return c.playbackTimeRange}).reduce(function(c,u){return{start:Math.max(u.start,c.start),end:Math.min(u.end,c.end)}},{start:-1/0,end:1/0}
vendor: 5,603 bytes, line 14
14)},c.prototype.setMaxSegmentDuration=function(c,u){this.vcb.has(c)||this.Acb(c),this.Ecb(c).maxSegmentDuration=u},c.prototype.getMaxSegmentDuration=function(c){var u;return(null==(u=this.Ecb(c))?void 0:u.maxSegmentDuration)||0},c.prototype.hasMaxSegmentDuration=function(c){var u;return(null==(u=this.Ecb(c))?void 0:u.maxSegmentDuration)!=null},c.prototype.hasMaxSegmentDurations=function(){return!!(0,m.getValues)(this.vcb).map(function(c){return c.maxSegmentDuration}).find(function(c){return c>=0})},c.prototype.getMinMaxSegmentDuration=function(){var c=Number.MAX_VALUE;return(0,m.getValues)(this.vcb).map(function(c){return c.maxSegmentDuration}).forEach(function(u){return c=u<c?u:c}),c},c.prototype.getAllSegmentsForMimeType=function(c){return this.getAllSegments().filter(function(u){return u.getMimeType()===c})},c.prototype.getAllSegments=function(){return this.ucb.map(function(c){return c.segment})},c.prototype.hasDataSegments=function(c){return this.ucb.some(function(u){return!u.segment.isInit()&&u.segment.getMimeType()===c})},c.prototype.hasSegments=function(){return this.getAllSegments().length>0},c.prototype.hasTrackedDiscontinuity=function(c){var u=this;return Object.keys(this.wcb).some(function(d){return u.wcb[d].includes(c)})},c.prototype.hasTrackedPeriodId=function(c){var u=this;return Object.keys(this.xcb).some(function(d){return u.xcb[d].includes(c)})},c.prototype.getNextSegment=function(){var c=this.ucb.filter(function(c){return!c.pendingRemoval});if(0===c.length)return null;var u=c.find(function(u){return c.filter(function(c){return u.segment.getMimeType()===c.segment.getMimeType()}).some(function(c){return!c.segment.isInit()})});return u?(u.pendingRemoval=!0,u.segment):null},c.prototype.Dcb=function(c){var u=this.getAllSegmentsForMimeType(c);if(u.length>0){var d=u[u.length-1];d.isInit()&&this.removeSegment(d)}},c.prototype.Ecb=function(c){return this.vcb.get(c)},Object.defineProperty(c.prototype,"mediaTypes",{get:function(){var c={};return this.vcb.forEach(function(u,d){c[d]=u.mediaType}),c},enumerable:!1,configurable:!0}),c.prototype.getMinDistanceFromBufferBlock=function(c){var u=this.getCommonPlaybackTimeRanges();return Math.min(Math.min(Math.abs(c.getPlaybackTime()-u.start),Math.abs(c.getPlaybackTime()-u.end)),Math.min(Math.abs(c.getPlaybackEndTime()-u.start),Math.abs(c.getPlaybackEndTime()-u.end)))},c}()},674:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.areBufferBlocksEqual=function(c,u){return!(!c||!u)&&c===u}},35046:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferController=void 0;var h=d(4524),f=d(66790),m=d(40306),g=d(3336),v=d(25926),y=d(4224),b=d(80813),S=d(56481),_=d(3714),E=d(44468),T=d(33468),w=d(91678),P=d(46151),A=d(33436),I=d(87827),M=d(85648),R=d(68925),k=d(86897),x=d(21513),C=d(93204),O=d(79721),D=d(34841),L=d(87244),N=d(85434),U=d(15487),F=d(89927),B=d(23068),j=d(70850),H=d(19274),V=d(88052),z=d(62756),q=d(95880),W=d(62198),G=d(42208),K=d(59604),Y=d(13114),X=d(39523),Q=d(14808),Z=d(99529),J=d(90685),$=d(60632),ee=d(94305),et=d(51888),ei=d(39494),en=d(77264);function er(c,u){return{periodId:u,contentInformation:c.getMediaTypes().map(function(u){return{codec:u.codec,mimeType:u.mimeType,isDrmProtected:c.getSegregationCriteria(u.mimeType).encryption===J.EncryptionState.Encrypted}})}}u.BufferController=function(){function c(c,u,d,p){var h=this;this.s2=[],this.M3=!1,this.N3=!0,this.O3=!1,this.P3=!1,this.W3={},this.Y3={},this.b3=!1,this.d3=0,this.i3=function(){h.K3=h.q2.getTotalDuration(),h.K3>(h.p2.getDuration()||0)&&h.l3()},this.l3=function(){h.O3||h.p2.setDuration(h.K3)},this.m3=function(c){h.k2.logger.debug("Renderer setup failed with",c)},this.O4=function(){Date.now()-h.S3>h.R3&&h.D3()&&h.w3();var c=!(0,x.getCapabilities)().isTizen;h.checkIfEndOfBufferReached(h.m2.END_OF_BUFFER_TOLERANCE,c)},this.P4=function(){if(h.r2){var c=h.r2.getBufferBlock(h.I3),u=c?h.r2.getSmallestMaxSegmentDuration(c):h.m2.END_OF_BUFFER_RECOVERY_TOLERANCE;h.checkIfEndOfBufferReached(u,!0)}},this.Q4=function(){h.V4(h.p2.getCurrentTime(!0))},this.R4=function(){h.checkIfEndOfBufferReached(h.m2.END_OF_BUFFER_RECOVERY_TOLERANCE,!0)},this.k2=c,this.l2=c.logger,this.m2=c.settings,this.n2=c.bufferSettings,this.o2=c.eventHandler,this.p2=c.renderer,this.q2=c.serviceManager.get(b.ServiceName.ManifestService,c.sourceContext.sourceIdentifier),this.r2=new ei.SegmentStore(this.k2,this.m2),this.J3=u,this.X3=new ee.BufferStallingService(this.B4(),this.l2,this.k2.renderer),this.K3=d,this.I3=ei.INITIAL_BUFFER_BLOCK_ID,this.V3=new Map,this.Q3=!1,this.S3=0,this.R3=(0,F.toMilliSeconds)(this.k2.settings.MINIMAL_BACKWARD_BUFFER_CLEARING_INTERVAL),this.U3=new Map,this.a3=new et.DeferredReject,this.t2=Promise.resolve(null),this.e3=new $.BufferRangesCache(this.k2,this.r2),this.h3(),this.p2.ready().then(function(){h.l3(),h.k3()&&h.q3(p)}).catch(this.m3),this.g3=(0,C.subscribe)(this.k2.store)(function(c){return c&&(0,I.getPlayerState)(c).seekState},function(){h.D3()&&h.w3()},function(c,u){return c===M.SeekState.Seeked&&u!==M.SeekState.Seeked})}return c.prototype.h3=function(){var c=this,u=this.k2.store;void 0!==u&&(this.f3=(0,C.subscribe)(u)(function(c){return c&&(0,I.getIsStopped)((0,I.getPlayerState)(c))},function(){return c.P3=!0},function(c){return!0===c}))},Object.defineProperty(c.prototype,"j3",{get:function(){return this.X3.isRendererStalling()}
14,enumerable:!1,configurable:!0}),c.prototype.k3=function(){var c,u;return!!(null!=(u=(0,Y.getDrmState)(null==(c=this.r3())?void 0:c.getState()))&&u.immediateLicenseRequest)},c.prototype.n3=function(c,u){var d=this,p=Promise.resolve();return this.T3=new D.Deferred,this.N3||(p=this.p2.shutdown(!0)),this.W3={},this.T3.resolve(p.then(function(){return d.p2.ready()}).then(function(){d.l3(),d.I4(),c.forEach(function(c){var u=c.mimeType;d.addMimeTypeAndCodec(u,c.codec)||(d.l2.debug("Could not create source buffer for ".concat(u)),d.k2.store.dispatch((0,w.removeMetricsForMimeType)(u))),d.o3(u)}),d.s2=c.filter(function(c){return N.MimeTypeHelper.isAV(c.mimeType)});var p,h=null!=(p=u.getAllKnownPeriodIds()[0])?p:O.DEFAULT_PERIOD_ID;return d.q3(h),Promise.resolve(d.s2.length)})),this.T3.promise.catch(function(c){return d.l2.warn(c)}).then(function(){d.T3=null}),this.T3.promise},c.prototype.o3=function(c){var u=this,d=this.r3();d&&(this.Y3[c]=d.subscribe(function(){return u.x3(c)},(0,k.hasBufferMaxSizeChanged)(c)))},c.prototype.p3=function(c){var u=this.Y3[c];u&&(u(),delete this.Y3[c])},c.prototype.q3=function(c){var u,d=this,h=(0,Y.getDrmState)(null==(u=this.r3())?void 0:u.getState());if(void 0!==h&&Object.keys(h).length>0){var m=p(p({},this.k2.sourceContext.source),{drm:h}),g=this.q2.getDRMCapabilitiesForPeriod(c);Object.keys(T.KeySystemMap).some(function(c){return m.drm.hasOwnProperty(c)})&&(this.t2=this.p2.setDrmConfig(h,g),this.t2.catch(function(c){(null==c?void 0:c.message)!==f.DrmSetupError.CANCELLED&&d.l2.debug("Could not initialize renderer with given DRM config: ".concat(null==c?void 0:c.message),c)}))}},c.prototype.r3=function(){var c;return null==(c=this.k2.serviceManager)?void 0:c.get(b.ServiceName.SourceStoreService,this.k2.sourceContext.sourceIdentifier)},c.prototype.s3=function(){var c=this;return this.c3?this.c3.catch(function(){return c.b3=!0,Promise.reject("Failed to clear buffer on timeshift, stopping segment cache processing")}).then(function(){return c.b3?(c.b3=!1,Promise.reject("Timeshift cancelled, stopping segment cache processing")):Promise.resolve()}):Promise.resolve()},c.prototype.addSegment=function(c){var u,d,p,h,f=this;if(!this.r2)return Promise.reject("Skipping segment processing, segment store is already disposed");this.l2.insane("adding segment to cache for period ".concat(c.getPeriodId()," with playback time ").concat(c.getPlaybackTime()," and mime type ").concat(c.getMimeType())),this.r2.addSegment(c);var m=this.F4(),g=this.r2.getBufferBlock(m);if(this.r2.getNextBufferBlock(m)&&this.B3(g)&&(null==(h=this.r3())||h.dispatch((0,R.setLoadingRangeFinished)(!0))),this.H4(),u=this.r3(),d=(0,Z.getTrackIdentifier)(c.getSegmentInfo()),(p=c.getPlaybackTimeRange())&&(null==u||u.dispatch((0,X.removeStreamTimeRange)(d,p,Z.StreamTimeRangeType.Loading))),null==u||u.dispatch((0,R.addLoadedRange)(d,(0,K.segmentToBufferBlockTimeRange)(c))),!this.areBufferBlockMediaTypesFinalForPeriod(c.getPeriodId()))return Promise.resolve();var v=Promise.resolve();if(this.E3){var y=this.E3.time,b=this.a4(y);if(!this.r2.canSwitchToBufferBlock(b))return Promise.resolve();v=this.s3().then(function(){return f.b4(y,b)})}else if((0,L.isSwitchingBufferBlocks)(this.r3())||this.isBufferAvailable()||this.T3)this.T3&&(v=this.T3.promise);else{var S=this.r2.getBufferBlockForSegment(c),_=null==S?void 0:S.getMediaTypesWithoutSubs();if(!_||!S)return this.l2.debug("Chosen buffer block for segment unexpectedly had no mediaTypes"),Promise.resolve();v=this.n3(_,S)}return v.then(function(){return f.p2?f.p2.ready():Promise.reject("Stopping queue processing, renderer is not available")}).then(function(){return f.z3()})},c.prototype.t3=function(c,u){var d=this;this.r2&&this.r2.getPrecedingSegments(c,u).forEach(function(c){var u;d.r2.removeSegment(c),null==(u=d.r3())||u.dispatch((0,R.removeLoadedRange)(c.getMimeType(),(0,K.segmentToBufferBlockTimeRange)(c)))})},c.prototype.u3=function(c,u){var d=this;return this.t3(c,u),this.S3=Date.now(),this.p2.removeData(c,0,u).catch(function(u){return d.l2.debug("Error clearing ".concat(c," backward buffer:"),u)})},c.prototype.v3=function(){if(this.r2){var c=this.r2.getBufferBlock(this.I3),u=c?this.r2.getSmallestMaxSegmentDuration(c):-1;this.R3=(0,F.toMilliSeconds)(Math.max(u/2,this.k2.settings.MINIMAL_BACKWARD_BUFFER_CLEARING_INTERVAL))}},c.prototype.w3=function(){var c,u,d=this;this.v3();var p=null==(c=this.r2)?void 0:c.getBufferBlock(this.I3),h=this.p2.getCurrentTime(),f=(0,k.getBufferStateMap)(null==(u=this.r3())?void 0:u.getState());f&&Object.keys(f).forEach(function(c){var u,m=null==(u=(0,k.getRendererBufferedRanges)(f,c)[0])?void 0:u.start,g=N.MimeTypeHelper.getMediaType(c);if(void 0!==m&&null!=p&&p.hasMaxSegmentDuration(c)){var v=h-Math.max(p.getMaxSegmentDuration(c)+1,d.n2.getBackwardTargetLevel(g));m<v&&(d.l2.debug("Clearing backward buffer for ".concat(c," from ").concat(m," to ").concat(v)),d.u3(c,v).cat
14ch(function(c){d.k2.logger.debug("Could not clear backward buffer",c)}))}})},c.prototype.setEndOfStream=function(c){var u;return c&&this.H3||!this.p2?(this.l2.debug("Skipping setting EOS"),Promise.resolve()):(c&&(null==(u=this.r3())||u.dispatch((0,R.setLoadingRangeFinished)(!0))),this.Q3=c,this.p2.setEndOfStream(c))},c.prototype.x3=function(c){var u,d=(0,k.getBufferState)(null==(u=this.r3())?void 0:u.getState()),p=void 0!==d?(0,k.getBufferMaxSize)(d,c):k.DefaultBufferMaxSize;if(this.l2.debug("Exceeded quota for ".concat(c," with ").concat(p," seconds of data in the buffers")),!this.k2.settings.NO_QUOTA_EXCEEDED_ADJUSTMENT){var h=this.p2.getCurrentTime(),f=this.r2.getSmallestSafeBufferSize(h,c);this.n2.adjustMaxBufferLevels(f,c,p)}},c.prototype.y3=function(){var c,u,d=this.r2.getBufferBlock(this.I3),p=(c=this.r2.getAllSegmentsFromBufferBlock(d).toArray()).reduce(function(c,u){var d=c.getPlaybackTime();return u.getPlaybackTime()<d?u:c},c[0]),h=null!=(u=null==p?void 0:p.getPlaybackTime())?u:0;h<0&&(this.o2.dispatchEvent(_.PlayerEvent.Warning,new v.PlayerWarning(y.WarningCode.PLAYBACK_NEGATIVE_DECODING_TIMESTAMP_ENCOUNTERED)),this.l2.debug("Encountered negative DTS ".concat(h,", attempting to correct PTO...")),this.d3=h)},c.prototype.z3=function(){var c=this;return this.N3?this.p4()?(this.y3(),this.C3(1/0).then(function(){return c.r4()})):Promise.resolve():this.C3(1/0)},c.prototype.getBufferedRangesMap=function(c){void 0===c&&(c=!0);var u,d=(0,k.getBufferState)(null==(u=this.r3())?void 0:u.getState());return void 0!==d&&this.r2?c?this.e3.getRanges(d):(0,k.getRendererBufferRangesMap)(this.r2,d)(this.I3):{}},c.prototype.A3=function(c,u){var d=this;if(!this.r2)return Promise.resolve();var p=this.r2.getAllSegmentsFromBufferBlock(c),f=p.hasNext()&&p.next();return f?(this.r2.removeSegment(f),this.v4(f).catch(function(c){d.l2.warn("Could not add segment to renderer (mimeType: ".concat(f.getMimeType(),", playbackTime: ").concat(f.getPlaybackTime(),")"),c)}).then(function(){f.isInit()||null==(p=d.r3())||p.dispatch((0,R.removeLoadedRange)(f.getMimeType(),(0,K.segmentToBufferBlockTimeRange)(f))),d.V3.set(f.getMimeType(),!f.isInit());var p,m=h.BufferRangeHelper.getTotalCommonBufferLength(d.getBufferedRangesMap());return!(0,L.isSwitchingBufferBlocks)(d.r3())||m<u?d.A3(c,u):Promise.resolve()})):Promise.resolve()},c.prototype.B3=function(c){var u,d,p=this;if(!c)return!1;var h=this.hasStopped(),f=null==(u=this.r2)?void 0:u.hasStartedLoadingNextBufferBlock(this.I3),m=null==(d=this.r2)?void 0:d.hasSegmentsForBufferBlock(c);return!this.s2.some(function(c){return p.p2.isDataBeingAppended(c.mimeType)})&&(f||h)&&!m},c.prototype.isSegmentStoreWaitingForSegments=function(){var c,u;return null!=(u=null==(c=this.r2)?void 0:c.isWaitingForSegments())&&u},c.prototype.C3=function(c){var u=this,d=this.r2.getBufferBlock(this.I3);return this.H3=!0,this.A3(d,c).then(function(){var c,p;u.H3=!1,u.j3&&!u.isBufferClearingOngoing()&&u.y4()&&u.D4(),u.B3(d)?(u.l2.debug("Finished loading BB ".concat(u.I3,": signaling EOS")),null==(c=u.r3())||c.dispatch((0,R.setLoadingRangeFinished)(!0)),u.G3?u.l2.debug("Skipped EOS signaling as a BufferBlock switch is just being executed"):u.F3&&(0,L.isSwitchingBufferBlocks)(u.r3())?(u.l2.debug("delaying EOS signal until ongoing period switch is completed"),u.F3.then(function(){u.setEndOfStream(!0)})):u.setEndOfStream(!0)):null==(p=u.r3())||p.dispatch((0,R.setLoadingRangeFinished)(!1))})},c.prototype.D3=function(){var c,u,d=this.k2.serviceManager.get(b.ServiceName.PlayerStateService);if(!d)return!1;var p=null!=(c=d.seekingOrTimeshifting)&&c,h=null==(u=this.r3())?void 0:u.getState(),f=h&&(0,k.getIsTimestampRollingOver)(h);return!(this.Q3||(0,L.isSwitchingBufferBlocks)(this.r3())||p||f)},c.prototype.checkIfEndOfBufferReached=function(c,u){if(this.p2.hasDataInSourceBuffers()){var d=this.p2.getCurrentTime(!0);this.S4(d,c)&&(this.T4()?u?this.V4(d):this.l2.debug("End of buffer reached, but cannot switch buffer block yet."):!this.O3&&this.q4()>0&&(this.A4(),this.U4()))}else this.p2.isPaused()||this.A4()},c.prototype.S4=function(c,u){var d=this.p2.getEndOfBufferTime();return void 0!==d&&(c>=d-u||this.q2.isLive()&&0===c)},c.prototype.T4=function(){var c,u=null==(c=this.r2)?void 0:c.getBufferBlock(this.I3);return!!u&&!!this.r2&&this.r2.hasStartedLoadingNextBufferBlock(u.getId())},c.prototype.U4=function(){var c,u=!0;this.V3.forEach(function(d,p){N.MimeTypeHelper.isVideo(p)&&(u=d,c=p
14)}),u||(this.l2.debug("Resetting currentTime on video element on stalling"),this.k2.videoElement.currentTime=this.k2.videoElement.currentTime,this.V3.set(c,!0))},c.prototype.V4=function(c){var u,d,p=this.r3();if((0,L.isSwitchingBufferBlocks)(p))return!1;var h=null==p?void 0:p.getState();if(!h||(0,k.getIsTimestampRollingOver)(h))return!1;var f=this.T4(),m=null==(u=this.r2)?void 0:u.getNextBufferBlock(this.I3);if(f&&m&&null!=(d=this.r2)&&d.areBufferBlockMediaTypesFinal(m)){var g=m.getMinCommonStartTime(),v=isFinite(g)&&g>=c?g:c;return this.b4(v,m),!0}return!1},c.prototype.readyToSeek=function(){return this.F3?(this.l2.debug("Awaiting ongoing buffer block switch before seek"),this.F3.then(function(){}).catch(function(){})):Promise.resolve()},c.prototype.shouldBuffersBeClearedOnTimeshift=function(c){var u=this.p2.getCurrentTime();return!this.isInBufferedRange(c)||c<u},c.prototype.W4=function(c,u){return void 0===u&&(u=!1),u||this.shouldBuffersBeClearedOnTimeshift(c)?this.X4():Promise.resolve()},c.prototype.setTimeshiftCancelState=function(c){this.b3=c},c.prototype.X4=function(){var c=this;return this.k2.logger.debug("Clearing buffer on timeshift"),this.clearBuffers().then(function(){return c.b3?(c.b3=!1,Promise.reject("cancelled timeshift")):Promise.resolve()})},c.prototype.setCurrentTime=function(c,u,d){var p=this;void 0===u&&(u=!1),void 0===d&&(d=!1);var h=this.r2.getBufferBlockForPlaybackTime(c),f=this.r2.getBufferBlock(this.I3),m=!h||h.getId()!==f.getId();return this.L3=c,this.N3||this.isInBufferedRange(c)||this.A4(),u&&this.isBufferAvailable()&&!this.isBufferClearingOngoing()&&this.W4(c,d).catch(function(c){return p.l2.debug("Error clearing buffers:",c)}),m?h?this.b4(c,h):this.d4(c):(this.E3=void 0,this.p2.setCurrentTime(c).then(function(c){return p.Y4(c)}))},c.prototype.Y4=function(c){return this.L3=void 0,this.y4()?this.j3&&(this.l2.debug("End stalling after seek to ".concat(c)),this.D4()):this.l2.debug("Delay ending stall as the restart threshold is not yet reached"),Promise.resolve(c)},c.prototype.Z4=function(c,u){var d,p,h,f,m,g=null!=(p=null==(d=this.E3)?void 0:d.time)?p:u,v=(0,B.isNumber)(null==(h=this.E3)?void 0:h.time)&&(null==(f=this.r2)?void 0:f.canSwitchToBufferBlockForTime(g));if(this.l2.debug("Buffer block switch failed:",c),this.a3=new et.DeferredReject,v){this.l2.debug("Trying to continue delayed BufferBlock switch to ".concat(g,"..."));var y=this.a4(g);return this.b4(g,y)}return null==(m=this.r3())||m.dispatch((0,R.setBufferBlockSwitchOngoing)(!1)),Promise.resolve(u)},c.prototype.a4=function(c){var u,d=this.q2.getPeriodIdForTime(c);return null==(u=this.r2)?void 0:u.getTargetBufferBlock(c,d)},c.prototype.b4=function(c,u){var d,p,h=this,f=function(){};if(this.a3&&this.a3.reject("BufferBlock switch interrupted by newest one"),this.a3=new et.DeferredReject,null==(d=this.r3())||d.dispatch((0,R.setBufferBlockSwitchOngoing)(!0)),this.E3&&(f=this.E3.deferred.resolve),!(null!=(p=this.r2)&&p.canSwitchToBufferBlock(u)))return this.d4(c);this.G3=!0;var m=this.c3||Promise.resolve();return this.F3=m.then(function(){return h.setEndOfStream(!1)}).then(function(){return h.E3=void 0}).then(function(){return h.a3.next(function(){return h.clearRendererBuffers()})}).then(function(){return h.a3.next(function(){return h.c4(u,c)})}).then(function(c){return h.G3=!1,h.a3=new et.DeferredReject,f(c),c}).catch(function(u){return h.Z4(u,c)}).finally(function(){h.F3=void 0}),this.F3},c.prototype.c4=function(c,u){var d,p;return this.hasStreamEnded()?(null==(d=this.a3)||d.reject("BufferBlock switch interrupted by source unloading"),Promise.reject("Source was unloaded")):(0,U.isTizen2017)()||null!=(p=this.r2)&&p.shouldSwitchBufferBlock(c,this.I3)?this.i4(u,c):this.e4(u,c)},c.prototype.d4=function(c){(0,L.isSwitchingBufferBlocks)(this.r3())&&this.a3&&this.a3.reject("BufferBlock switch interrupted by newest one");var u=this.r2.getAvailablePositionForTime(c,this.p2.getCurrentTime());return this.E3&&this.E3.time===c||(this.E3&&this.E3.time!==c&&this.E3.deferred.reject(),this.E3={time:u,deferred:new D.Deferred}),this.E3.deferred.promise},c.prototype.e4=function(c,u){var d,p=this,h=u.getId();return null!=(d=this.r2)&&d.getBufferBlock(h)?(this.Q3=!1,this.I3=h,this.r2.deleteOldBufferBlocks(h),this.G3=!1,this.U3.clear(),this.a3.next(function(){return p.C3(1/0)}).then(function(){return p.a3.next(function(){return p.k4(c)})}).then(function(c){var u;return null==(u=p.r3())||u.dispatch((0,R.setBufferBlockSwitchOngoing)(!1)),p.f4(),p.Y4(c)})):(this.l2.debug("Target BufferBlock is no longer available, cancelling BufferBlock switch..."),Promise.reject("The targeted buffer BufferBlock is no longer available"))},c.prototype.f4=function(){var c=this,u=this.B4();
14u&&(this.j3||u.isPaused()||this.p2.play().catch(function(u){c.l2.debug("play call failed with reason: ".concat(u))}))},c.prototype.g4=function(c,u){var d,p=null==(d=this.r2)?void 0:d.getBufferBlock(this.I3);if(!p)return!0;var h=p.getAllKnownPeriodIds().some(function(u){return c.hasTrackedPeriodId(u)}),f=this.s2.length===u.length,m=!(h||f)||!(0,en.canReuseSourceBuffer)(p,c,u);return this.h4(m,p,c)},c.prototype.h4=function(c,u,d){var p,h,f,m,g=null==(p=this.k2)?void 0:p.sourceContext.source,v=null==(h=null==g?void 0:g.options)?void 0:h.shouldRecreateSourceBuffersOnPeriodSwitch;if(!v)return c;var y=u.getAllKnownPeriodIds(),b=er(u,null!=(f=y[y.length-1])?f:O.DEFAULT_PERIOD_ID),S=null!=(m=d.getAllKnownPeriodIds()[0])?m:O.DEFAULT_PERIOD_ID,_=er(d,S),E=(0,j.safeUserCallback)(function(){return v(b,_,c)},this.k2.logger);return"boolean"==typeof E?(this.l2.debug("User overwrote default SourceBuffer recreation strategy from ".concat(c," to ").concat(E)+" for the switch from ".concat(b.periodId," to ").concat(_.periodId,".")),E):c},c.prototype.i4=function(c,u){var d,p,h,f,m,g,v=this;this.l2.debug("Switching buffer block for time ".concat(c));var y=u.getMediaTypesWithoutSubs(),S=this.j4(u,y);if(this.s2=y,null==(d=this.r3())||d.dispatch((0,R.setLoadingRangeFinished)(!1)),null==(h=null==(p=this.k2.serviceManager)?void 0:p.get(b.ServiceName.TimedMetadataService))||h.resetContentBoundaryTracking(),(null==(f=this.B4())?void 0:f.seekingOrTimeshifting)===!1){var _=null!=(m=u.getAllKnownPeriodIds()[0])?m:O.DEFAULT_PERIOD_ID;null==(g=this.r3())||g.dispatch((0,G.periodSwitchStarted)(_))}return this.a3.next(function(){return S}).then(function(){return v.a3.next(function(){return v.e4(c,u)})}).then(function(c){return v.a3.next(function(){return v.C3(1/0).catch(function(){return v.k2.logger.debug("Could not push segment into renderer")})}).then(function(){return c})})},c.prototype.j4=function(c,u){return this.g4(c,u)?(this.l2.debug("recreating the buffers with types",u),this.n3(u,c)):Promise.resolve(0)},c.prototype.k4=function(c){var u=this,d=this.E3;return this.E3=void 0,this.a3.next(function(){return u.p2.setCurrentTime(c)}).then(function(c){return d&&d.deferred&&d.deferred.resolve(c),c})},c.prototype.addMimeTypeAndCodec=function(c,u,d){if(void 0===d&&(d=!1),!N.MimeTypeHelper.isAV(c))return!0;var p=this.p2.addBuffer(c,u);return p&&((0,P.getMetricsState)(this.k2.store.getState())[c]||this.k2.store.dispatch((0,w.initializeMetricsForMimeType)(c,this.k2.settings)),d||this.k2.store.dispatch((0,w.addMetricsValue)(c,A.MetricType.StalledSeconds,0))),p},c.prototype.l4=function(){var c,u,d,p,h,f=this.F4(),m=null==(c=this.r2)?void 0:c.getAllBufferBlocks(),g=null==(u=this.r2)?void 0:u.getFutureBufferBlocks(f),v=null==(d=this.r2)?void 0:d.getBufferBlock(f);if(null!=m&&m.length){if(!(null!=g&&g.length))return v;for(var y=m.findIndex(function(c){return c.getId()===f}),b=y;b<m.length;b++){var S=m[b];null!=(p=this.r2)&&p.hasStartedLoadingNextBufferBlock(S.getId())&&(v=null==(h=this.r2)?void 0:h.getNextBufferBlock(S.getId()))}return v}},c.prototype.m4=function(){return this.s2.map(function(c){return c.mimeType})},c.prototype.n4=function(){var c,u;return null!=(u=null==(c=this.l4())?void 0:c.getMediaTypes().map(function(c){return c.mimeType}))?u:[]},c.prototype.o4=function(c,u,d){var p=this;if(!this.isBufferAvailable())return 0;var h=c.map(function(c){return p.getOverallBufferLevel(c,u,E.BufferType.ForwardDuration,d)});return h.length>0?Math.min.apply(Math,h):0},c.prototype.p4=function(){var c=this.n2.getForwardTargetLevel(),u=this.q4()-this.m2.DURATION_MISMATCH_TOLERANCE,d=Math.min(this.m2.STARTUP_THRESHOLD,c-this.m2.STARTUP_THRESHOLD_DELTA,isFinite(u)?u:1/0),p=this.n4();return this.o4(p)>=d},c.prototype.q4=function(){return this.q2.isLive()?1/0:this.p2.getDuration()-this.E4()},c.prototype.r4=function(){if(this.N3){var c=Date.now(),u=(0,P.getMetricsState)(this.k2.store.getState()),d=(0,P.getMetricsLastEntry)(u,"default",A.MetricType.StartTime).value,p=(0,F.toSeconds)(c-d);this.k2.store.dispatch((0,w.addMetricsValue)("default",A.MetricType.StartupTimeSeconds,p)),isNaN(p)||this.l2.debug("start up time: ".concat(p)),this.N3=!1,this.D4()}},c.prototype.s4=function(c){var u=this.p2.getCurrentTime(!0);c.isInit()&&N.MimeTypeHelper.isVideo(c.getMimeType())&&this.j3&&this.isInBufferedRange(u)&&(this.l2.debug("Resetting currentTime on video element on unstalling"),this.k2.videoElement.currentTime=this.k2.videoElement.currentTime)},c.prototype.t4=function(c){var u=this;c.getDrmInitData().filter(function(c){var u;return(null==(u=c.kid)?void 0:u.length)>0}
14).forEach(function(d){return u.q2.setRepresentationDrmKid(c.getRepresentationId(),d.kid[0])})},c.prototype.u4=function(c){var u=c.getPresentationTimeOffset()+this.d3;isNaN(u)||c.setPresentationTimeOffset(u)},c.prototype.v4=function(c){var u=this;this.d3<0&&this.u4(c);var d=N.MimeTypeHelper.extractContentType(c.getMimeType());if(this.W3[d]!==c.getInitSegment()){var p=c.getInitSegment();return this.W3[d]=p,Promise.all([p,c].map(function(c){return u.w4(c)})).then()}return this.w4(c)},c.prototype.w4=function(c){var u=this;return c.hasDrmInitData()&&this.t4(c),this.t2.catch(function(d){if(c.isEncrypted()){var p,h;throw(null==d?void 0:d.message)!==f.DrmSetupError.CANCELLED&&u.k2.eventHandler.fireError((p=u.k2.sourceContext.sourceIdentifier,V.ModuleManager.has(z.ModuleName.DRM)?(null==d?void 0:d.message)===f.DrmSetupError.MISSING_CONFIGURATION?new g.PlayerError(m.ErrorCode.DRM_MISSING_CONFIGURATION,{reason:d.message},void 0,p):new g.PlayerError(m.ErrorCode.DRM_NO_KEY_SYSTEM,{reason:null!=(h=null==d?void 0:d.message)?h:d},void 0,p):new q.PlayerModuleMissingError(z.ModuleName.DRM))),"DRMConfig failure"}u.l2.debug("Problem ensuring segment, error:",d)}).then(function(){return u.s4(c),u.x4(c),u.p2.appendData(c).catch(function(c){u.l2.debug("could not append data to renderer",c)})})},c.prototype.x4=function(c){var u,d;if(!c.isInit()){var p=c.getSegmentInfo().discontinuitySequenceNumber,h=c.getPeriodId(),f=void 0!==p?String(p):h,m=c.getMimeType();if(f!==this.U3.get(m)){var g=c.getPresentationTimeOffset();(0,B.isNumber)(g)&&isFinite(g)&&this.p2.setTimestampOffset(m,-g),this.U3.set(m,f),null==(d=null==(u=this.k2.serviceManager)?void 0:u.get(b.ServiceName.TimedMetadataService))||d.trackContentBoundary(c)}}},c.prototype.y4=function(){var c=this;if(!this.n2)return!1;var u=this.m2.RESTART_THRESHOLD;(0,U.isWebOS)()&&(u=Math.max(u,1.5));var d=Math.min(u,this.n2.getForwardTargetLevel()-this.m2.RESTART_THRESHOLD_DELTA,this.q4()),p=this.m4();return p.every(function(u){return c.p2.getBufferedRanges(u).length>0})&&this.o4(p)>=d},c.prototype.z4=function(){return!this.N3&&!(0,L.isSwitchingBufferBlocks)(this.r3())},c.prototype.A4=function(){this.z4()&&this.X3.startStalling()},c.prototype.B4=function(){return this.k2.serviceManager.get(b.ServiceName.PlayerStateService)},c.prototype.C4=function(c){var u=this.B4();if(!u)return!1;var d=this.m2,p=Math.max(d.END_OF_BUFFER_TOLERANCE,d.END_OF_BUFFER_RECOVERY_TOLERANCE,d.RESTART_THRESHOLD),h=this.m4(),f=this.o4(h,c,!1),m=f>=this.q4()||this.O3;return!(f>=p)&&!m&&!u.seekingOrTimeshifting},c.prototype.D4=function(){if(this.j3)if((0,L.isSwitchingBufferBlocks)(this.r3()))this.l2.debug("Ending stall was aborted due to buffer block switching");else{var c=this.E4();this.C4(c)?this.G4(c)?(this.l2.debug("Ending stall at the gap"),this.J3()):this.l2.debug("Cannot unstall yet as playback is stalling at a gap and there is no future common buffer"):this.X3.endStalling()}},c.prototype.E4=function(){return void 0!==this.L3?this.L3:this.p2.getCurrentTime()},c.prototype.F4=function(){return this.r2.getCurrentBufferBlockId()},c.prototype.hasPendingSegments=function(c){return c=c||this.F4(),this.r2.getFutureBufferBlocks(c).some(function(c){return c.hasSegments()})},c.prototype.getOverallBufferLevel=function(c,u,d,p){void 0===u&&(u=this.p2.getCurrentTime()),void 0===d&&(d=E.BufferType.ForwardDuration),void 0===p&&(p=!0),this.N3&&(u=this.E4());var f=this.getBufferedRangesMap()[c];return f&&0!==f.length?(f=p?h.BufferRangeHelper.mergeRanges(f.concat(h.BufferRangeHelper.findGapsInRanges(f)),this.m2.GAP_TOLERANCE):f.filter(function(c){return c.start<=u&&u<=c.end}),h.BufferRangeHelper.getBufferLevel(f,u,d)):0},c.prototype.G4=function(c){return void 0===c&&(c=this.p2.getCurrentTime()),h.BufferRangeHelper.getCommonBufferedRanges(this.getBufferedRangesMap()).some(function(u){return u.getStart()>c})},c.prototype.hasFutureBufferBlockData=function(){var c;return!!(null!=(c=this.r2)&&c.getNextBufferBlock(this.I3))||(0,L.isSwitchingBufferBlocks)(this.r3())},c.prototype.isInBufferedRange=function(c){return h.BufferRangeHelper.isInBufferedRange(this.getBufferedRangesMap(),c)},c.prototype.isStarted=function(){return this.M3},c.prototype.isInStartupPhase=function(){return this.N3},c.prototype.hasStreamEnded=function(){return this.P3},c.prototype.H4=function(){var c;if(!this.Z3){var u=this.r3();void 0!==u&&(null==(c=u.getState())?void 0:c.manifest)!==void 0&&(this.Z3=(0,C.subscribe)(u)(W.getManifest,this.i3,function(c){return(null==c?void 0:c.isInitialized)||!1}))}},c.prototype.stop=function(c){void 0===c&&(c=!1),this.O3=!0,this.M3=!1,this.N3=!1,c?(this.p2.end(),this.P3=!0,this.l2.debug("stopped playback"),this.p2.off(H.MediaElementEvent.stalled,this.R4),this.p2.off(H.MediaElementEvent.waiting,this.R4),this.p2.off(H.MediaElementEvent.ended,this.Q4),this.p2.off(H.MediaElementEvent.timeupdate,this.O4),this.p2.off(H.MediaElementEvent.currenttimenotadvancing,this.P4),this.Z3&&(this.Z3(),this.Z3=void 0),void 0!==this.f3&&(this.f3(),this.f3=void 0),this.I4(),this.V3.clear()):this.D4()},c.prototype.hasStopped=function(){return this.O3},c.prototype.I4=function(){var c=this;Object.keys(this.Y3).forEach(function(u){return c.p3(u)})},c.prototype.restart=function(){this.O3=!1,this.M3||(this.M3=!0,this.p2.on(H.MediaElementEvent.stalled,this.R4),this.p2.on(H.MediaElementEvent.waiting,this.R4),this.p2.on(H.MediaElementEvent.ended,this.Q4),this.p2.on(H.MediaElementEvent.timeupdate,this.O4),this.p2.on(H.MediaElementEvent.currenttimenotadvancing,this.P4)),this.P3=!1},c.prototype.dispose=function(){var c,u;this.stop(!0),this.p2=null,this.o2=null,this.m2=null,this.n2=null,this.o2=null,this.r2=void 0,this.W3=null,null==(c=this.g3)||c.call(this),null==(u=this.r3())||u.dispatch((0,R.resetLoadedRanges)()),this.e3.dispose(),this.s2=[],this.I4(),this.t2=null,this.X3=(0,S.dispose)(this.X3)},c.prototype.changeBufferType=function(c,u,d){var p,h,f=this.s2.find(function(u){return N.MimeTypeHelper.getMediaType(u.mimeType)===N.MimeTypeHelper.getMediaType(c)});return f&&(this.s2.splice(this.s2.indexOf(f),1),this.s2.push({mimeType:c,codec:u}),this.p3(f.mimeType),null==(h=this.r3())||h.dispatch((0,R.resetLoadedRanges)(f.mimeType))),this.o3(c),this.W3={},f?this.p2.changeBufferType(c,u,d):Promise.resolve(((p={})[c]=u,p))},c.prototype.addRequiredMediaType=function(c,u){this.r2.addRequiredMediaType(c,u)},c.prototype.updateRequiredMediaType=function(c,u){var d;null==(d=this.r2)||d.changeMediaType(c,u)}
vendor: 4,512 bytes, line 14
14,c.prototype.areBufferBlockMediaTypesFinalForPeriod=function(c){var u,d;return null!=(d=null==(u=this.r2)?void 0:u.areBufferBlockMediaTypesFinalForPeriod(c))&&d},c.prototype.clearCacheForMimeType=function(c){var u;null==(u=this.r3())||u.dispatch((0,R.resetLoadedRanges)(c)),this.r2.clearSegments(c)},c.prototype.J4=function(){var c,u=this;Object.keys((0,Q.getStreamTimeline)(null==(c=this.r3())?void 0:c.getState())).filter(function(c){return N.MimeTypeHelper.isAV(c)}).forEach(function(c){return u.clearCacheForMimeType(c)})},c.prototype.isBufferClearingOngoing=function(){return void 0!==this.c3},c.prototype.clearBuffers=function(){var c=this;return this.c3?this.l2.debug("Skipping buffer clearing as it is already ongoing"):(this.A4(),this.J4(),this.c3=this.setEndOfStream(!1).then(function(){return c.clearRendererBuffers()}),this.c3.finally(function(){return c.c3=void 0})),this.c3},c.prototype.clearRendererBuffers=function(){var c=this;return this.isBufferAvailable()?Promise.all(this.s2.map(function(u){return c.clearBuffer(u.mimeType)})).then(function(){}):Promise.resolve()},c.prototype.clearBuffer=function(c){var u=this;return this.p2.removeData(c).catch(function(d){return u.l2.debug("Error clearing ".concat(c," buffer:"),d)})},c.prototype.removeBufferRange=function(c,u,d){var p=this;return this.p2.removeData(c,u,d).catch(function(u){return p.l2.debug("Error removing ".concat(c," buffer range:"),u)})},c.prototype.isBufferAvailable=function(){return this.s2.length>0},c}()},60632:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.BufferRangesCache=void 0;var p=d(80813),h=d(86897),f=d(93204),m=d(10333);u.BufferRangesCache=function(){function c(c,u){var d=this;this.context=c,this.segmentStore=u,this.Icb=this.Kcb(),this.Gcb=(0,f.subscribe)(c.store)(m.sourceIdentifiersSelector,function(){return d.Jcb()},function(c,u){return!!c.includes(d.context.sourceContext.sourceIdentifier)&&(0,m.hasASourceStoreIdentifierChanged)(c,u)}),this.Mcb(),this.Ncb((0,h.getBufferState)(this.Icb.getState()))}return c.prototype.Jcb=function(){this.Icb=this.Kcb(),this.Icb?(this.Mcb(),this.Ncb((0,h.getBufferState)(this.Icb.getState()))):this.Lcb()},c.prototype.Kcb=function(){return this.context.serviceManager.get(p.ServiceName.SourceStoreService,this.context.sourceContext.sourceIdentifier)},c.prototype.Lcb=function(){this.Fcb&&this.Fcb(),this.Fcb=void 0,this.Gcb=void 0},c.prototype.Mcb=function(){var c=this;this.Lcb(),this.Fcb=(0,f.subscribe)(this.Icb)(function(c){return(0,h.getBufferState)(c)},function(u){return c.Ncb(u)},h.hasBufferRangesChanged)},c.prototype.Ncb=function(c){this.Hcb={overallBufferRanges:(0,h.getBufferRangesMap)(this.segmentStore,c,this.context.settings.GAP_TOLERANCE)}},c.prototype.getRanges=function(c){return void 0!==this.Fcb&&void 0!==this.Hcb&&0!==Object.keys(this.Hcb.overallBufferRanges).length||this.Ncb(c),this.Hcb.overallBufferRanges},c.prototype.dispose=function(){this.Lcb(),this.Gcb&&(this.Gcb(),this.Gcb=void 0),this.Hcb=void 0},c}()},94305:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.BufferStallingService=void 0;var p=d(85648),h=d(60877);u.BufferStallingService=function(){function c(c,u,d){this.playerStateService=c,this.logger=u,this.renderer=d}return c.prototype.startStalling=function(){this.isRendererStalling()||(this.logger.debug("Stalling playback at ".concat(this.renderer.getCurrentTime(!0))),this.logger.insane("Video element stall started in state: ".concat(this.playerStateService.playbackState)),this.playerStateService.setIsRendererStalling(!0),this.playerStateService.isPlaying()&&(this.logger.insane("Call pause on renderer"),this.renderer.pause()))},c.prototype.endStalling=function(){var c=this;if(this.isRendererStalling()){this.playerStateService.setIsRendererStalling(!1);var u=[p.PlaybackState.Play,p.PlaybackState.Playing].includes(this.playerStateService.playbackState);this.logger.debug("Unstalling and ".concat(u?"":"not ","restarting playback")),u&&(!this.playerStateService.seekingOrTimeshifting&&(0,h.shouldResetCurrentTimeAfterBufferUnderrun)()&&(this.logger.debug("Resetting current time before unstalling"),this.renderer.setCurrentTime(this.renderer.getCurrentTime())),this.renderer.play().catch(function(u){c.logger&&c.logger.debug("Play after unstalling failed with reason: ".concat(u))}))}},c.prototype.isRendererStalling=function(){return this.playerStateService.getIsRendererStalling()},c.prototype.dispose=function(){this.logger=null,this.playerStateService=null,this.renderer=null},c}()}
14,51888:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.DeferredReject=void 0,u.DeferredReject=function(){function c(){this.dcb=!1}return c.prototype.reject=function(c){this.dcb=!0,this.ecb=c},c.prototype.next=function(c){return this.dcb?Promise.reject(this.ecb):c()},c}()},39494:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.SegmentStore=u.INITIAL_BUFFER_BLOCK_ID=void 0;var h=d(68925),f=d(86897),m=d(15971),g=d(34047),v=d(79721),y=d(76399),b=d(85434),S=d(88052),_=d(62756),E=d(59604),T=d(99529),w=d(90685),P=d(674),A=d(77264);u.INITIAL_BUFFER_BLOCK_ID=0;var I=function(){function c(c,d){this.context=c,this.Pcb=[],this.Rcb={};var p=new w.BufferBlock(u.INITIAL_BUFFER_BLOCK_ID);this.Rcb={},this.Qcb=new A.Segregation(this.Rcb,d),this.Ocb=[p]}return c.prototype.Scb=function(c){return this.Ocb.find(function(u){return u.hasTrackedPeriodId(c)})},c.prototype.hasSegmentsForBufferBlock=function(c){return this.getAllSegmentsFromBufferBlock(c).hasNext()},c.prototype.isWaitingForSegments=function(){return 0!==this.Pcb.length},c.prototype.hasDataSegmentsForBufferBlock=function(c){return Object.keys(c.mediaTypes).filter(function(c){return b.MimeTypeHelper.isAV(c)}).every(function(u){return c.hasDataSegments(u)})},c.prototype.getTargetBufferBlock=function(c,u){return this.getBufferBlockForPlaybackTime(c)||this.ccb(c)||this.Scb(u)},c.prototype.canSwitchToBufferBlock=function(c){if(!c)return!1;var u=this.areBufferBlockMediaTypesFinal(c);return this.hasDataSegmentsForBufferBlock(c)&&u},c.prototype.canSwitchToBufferBlockForTime=function(c){var u=this.getBufferBlockForPlaybackTime(c);return this.canSwitchToBufferBlock(u)},c.prototype.areBufferBlockMediaTypesFinalForPeriod=function(c){var u,d=this;if(void 0===this.Rcb[c])return!1;var p=this.Scb(c);if(!p||0===Object.keys(null!=(u=null==p?void 0:p.mediaTypes)?u:{}).length)return!1;var h=Object.keys(p.mediaTypes);return Object.keys(this.Rcb[c]).filter(function(c){return b.MimeTypeHelper.isAV(c)}).every(function(u){var p;return h.includes(u)&&(null==(p=d.Rcb[c][u])?void 0:p.codec)})},c.prototype.areBufferBlockMediaTypesFinal=function(c){var u,d=this;return!(!c||0===Object.keys(null!=(u=null==c?void 0:c.mediaTypes)?u:{}).length)&&c.getAllKnownPeriodIds().every(function(c){return d.areBufferBlockMediaTypesFinalForPeriod(c)})},c.prototype.addRequiredMediaType=function(c,u){this.Rcb[c]||(this.Rcb[c]={}),this.Rcb[c][u]||(this.Rcb[c][u]={mimeType:u});var d=this.Scb(c);d&&(d.mediaTypes[u]||d.addMediaType({mimeType:u}))},c.prototype.changeMediaType=function(c,u){var d=this,p=Object.keys(this.Rcb),h=u;p.forEach(function(p){u||(h=Object.keys(d.Rcb[p]).find(function(u){return b.MimeTypeHelper.getMediaType(u)===b.MimeTypeHelper.getMediaType(c)})),d.Tcb(p,h),d.addRequiredMediaType(p,c),d.clearSegments(h)})},c.prototype.Tcb=function(c,u){if(this.Rcb[c]){delete this.Rcb[c][u];var d=this.Scb(c);d&&d.removeMediaType(u)}},c.prototype.Ucb=function(c,u){var d;if(this.Rcb[c]){var h=this.Rcb[c][u.mimeType];this.Rcb[c][u.mimeType]=p(p({},h),u)}else this.Rcb[c]=((d={})[u.mimeType]=u,d)},c.prototype.Vcb=function(c,u){var d=this;if(1===this.Ocb.length&&this.Qcb.canAddSegmentToBufferBlock(c,this.Ocb[0],u))return this.Ocb[0];var p=this.Ocb.reduce(function(p,h){return d.Qcb.canAddSegmentToBufferBlock(c,h,u)&&(!p||h.getMinDistanceFromBufferBlock(c)<p.getMinDistanceFromBufferBlock(c))?h:p},void 0);if(p){var h,f,m=p.getCommonPlaybackTimeRanges(),g=c.getPlaybackTime(),v=this.Ocb.filter(function(c){return c!==p}).map(function(c){return{range:c.getCommonPlaybackTimeRanges(),block:c}}).sort(function(c,u){return c.range.start-u.range.start}),y=(h=m.start,v.reduce(function(c,u){return u.range.end<=h?Math.max(u.range.start,c):c},-1/0)),b=(f=m.end,v.reduce(function(c,u){return u.range.start>=f?Math.min(u.range.start,c):c},1/0));if(y<=g&&g<=b&&!this.Wcb(g,p,v))return p}},c.prototype.Wcb=function(c,u,d){return d.filter(function(c){return isFinite(c.range.start)&&c.range.start>u.getCommonPlaybackTimeRanges().start&&isFinite(c.range.end)&&c.range.end>u.getCommonPlaybackTimeRanges().end}).some(function(u){var d=u.range.start<=c&&c<=u.range.end,p=c>u.range.end;return d||p})},c.prototype.Xcb=function(c,u){var d=this,p=c??v.DEFAULT_PERIOD_ID;return Object.keys(this.Rcb[p]).filter(function(c){return b.MimeTypeHelper.isAV(c)}).every(function(c){return d.Pcb.some(function(d){return d.getMimeType()===c&&d.getSegmentInfo().discontinuitySequenceNumber===u&&d.getPeriodId()===p})})},c.prototype.Ycb=function(c){var u,d=null==(u=(0,m.getSourceState)(this.context))?void 0:u.hls;return!!d&&(0,S.ModuleManager.get(_.ModuleName.HLS).selectors.areDiscontinuitiesMisaligned)(d,Object.keys(this.Rcb[v.DEFAULT_PERIOD_ID]).filter(function(c){return b.MimeTypeHelper.isAV(c)}),c.getDuration())},c.prototype.addSegment=function(c){var u,d,p,h,f,m=this;if(u=this.Ocb,p=(d=c.getSegmentInfo()).codecs,h=d.discontinuitySequenceNumber,f=d.periodId,null!=h?u.some(function(c){return c.hasTrackedDiscontinuity(h)})||(0,g.isAVMuxedTogether)(p):void 0===f||u.some(function(c){return c.hasTrackedPeriodId(f)}))this.Zcb([c]);else{var v=c.getSegmentInfo(),y=v.discontinuitySequenceNumber,b=v.periodId;if(this.Pcb.push(c),this.context.logger.debug("[SegmentStore] Reached new content boundary ".concat(y??b," with ").concat(c.getMimeType()," segment"),{url:c.getUrl()}),this.Xcb(b,y)){var S=this.Pcb.filter(function(c){return c.getSegmentInfo().discontinuitySequenceNumber===y&&c.getSegmentInfo().periodId===b});this.context.logger.debug("[SegmentStore] ".concat(null==y?"Period":"Discontinuity"," ").concat(y??b," is ready: adding segments to store")),this.Zcb(S),this.Pcb=this.Pcb.filter(function(c){return c.getSegmentInfo().discontinuitySequenceNumber!==y||c.getSegmentInfo().periodId!==b})}else this.Ycb(c)&&(this.context.logger.debug("[SegmentStore] Detected misaligned discontinuities: flushing all delayed segments"),this.Pcb.forEach(function(c){return m.Zcb([c])}),this.Pcb=[])}},c.prototype.Zcb=function(c){var u=this,d=c.reduce(function(c,d){var p=u.Qcb.getSegregationCriteria(d),h=u.Vcb(d,p);return null===c?h:h!==c?void 0:h},null);
vendor: 4,764 bytes, line 14
14d||(d=this.bcb(),this.Ocb.push(d)),c.forEach(function(c){var p=u.Qcb.getSegregationCriteria(c);u.context.logger.debug("[SegmentStore] Added ".concat(c.getMimeType()," segment to BB with ID ").concat(d.getId()),{segment:c.getUrl(),segmentCriteria:p});var f=(0,m.getSourceStore)(u.context),g=(0,T.getTrackIdentifier)(c.getSegmentInfo());null==f||f.dispatch((0,h.removeLoadedRange)(g,(0,E.segmentToBufferBlockTimeRange)(c))),d.addSegment(c),null==f||f.dispatch((0,h.addLoadedRange)(g,(0,E.segmentToBufferBlockTimeRange)(c))),d.getSegregationCriteria(c.getMimeType())||d.setSegregationCriteria(p,c.getMimeType());var v=d.getMediaType(c.getMimeType());v&&u.Ucb(c.getPeriodId(),v)})},c.prototype.acb=function(){var c=this.Ocb[this.Ocb.length-1];return c?c.getId()+1:u.INITIAL_BUFFER_BLOCK_ID},c.prototype.bcb=function(){var c=this.acb();return this.context.logger.debug("[SegmentStore] creating new BB with ID ".concat(c)),new w.BufferBlock(c)},c.prototype.getMediaTypes=function(c){var u=this;return c&&this.Rcb[c]?Object.keys(this.Rcb[c]).map(function(d){return u.Rcb[c][d]}):[]},c.prototype.getAllBufferBlocks=function(){return this.Ocb},c.prototype.getCurrentBufferBlockId=function(){var c,d=this.Ocb[0];return null!=(c=null==d?void 0:d.getId())?c:u.INITIAL_BUFFER_BLOCK_ID},c.prototype.deleteOldBufferBlocks=function(c){this.Ocb=this.Ocb.filter(function(u){return u.getId()>=c&&u.getAllSegments().length>0})},c.prototype.getActiveBufferBlock=function(){var c;return null!=(c=this.getBufferBlock(this.getCurrentBufferBlockId()))?c:null},c.prototype.getBufferBlock=function(c){return this.Ocb.find(function(u){return u.getId()===c})},c.prototype.getBufferBlockForSegment=function(c){return this.getBufferBlock(c.getBufferBlockId())},c.prototype.getBufferBlockForPlaybackTime=function(c){var u=this,d=this.Ocb.filter(function(d){var p=0===c?u.getSmallestMaxSegmentDuration(d)-.01:.01;return Object.keys(d.mediaTypes).filter(function(c){return b.MimeTypeHelper.isAV(c)}).every(function(u){var h,f;return(null==(h=d.getPlaybackTimeRange(u))?void 0:h.start)<=c+p&&(null==(f=d.getPlaybackTimeRange(u))?void 0:f.end)>=c})});return d[d.length-1]},c.prototype.ccb=function(c){return this.Ocb.filter(function(u){return u.getMinCommonStartTime()>=c}).sort(function(c,u){return c.getMinCommonStartTime()-u.getMinCommonStartTime()})[0]},c.prototype.getNextSegment=function(){var c,u;return null!=(u=null==(c=this.getActiveBufferBlock())?void 0:c.getNextSegment())?u:null},c.prototype.removeSegment=function(c){var u=this.getBufferBlockForSegment(c);u&&u.removeSegment(c),this.Pcb=this.Pcb.filter(function(u){return u!==c})},c.prototype.getAllSegmentsFromBufferBlock=function(c,u){if(!c)return y.EmptyIterator.getInstance();var d=c.getAllSegments();return u?new y.FilterIterator(new y.ArrayIterator(d),function(c){return c.getMimeType()===u}):new y.ArrayIterator(d)},c.prototype.getNextBufferBlock=function(c){return this.Ocb.find(function(u){return u.getId()>c})},c.prototype.getFutureBufferBlocks=function(c){return this.Ocb.filter(function(u){return u.getId()>=c})},c.prototype.getPrecedingSegments=function(c,u){var d=this.Pcb.filter(function(d){return(0,w.isPrecedingSegment)(d,c,u)});return this.Ocb.flatMap(function(d){return d.getPrecedingSegments(c,u)}).concat(d)},c.prototype.clearSegments=function(c){this.context.logger.debug("[SegmentStore] clearing all segments for ".concat(c)),this.Ocb.forEach(function(u){return u.clearSegments(c)}),this.Pcb=this.Pcb.filter(function(u){return u.getMimeType()!==c})},c.prototype.getSmallestMaxSegmentDuration=function(c){return c&&c.hasMaxSegmentDurations()?c.getMinMaxSegmentDuration():-1},c.prototype.getSmallestSafeBufferSize=function(c,u){var d=this.getBufferBlockForPlaybackTime(c);return null!=d&&d.hasMaxSegmentDuration(u)?d.getMaxSegmentDuration(u)+1:1},c.prototype.getAvailablePositionForTime=function(c,u){var d=c;if(u&&c>u){var p=this.getBufferBlockForPlaybackTime(c);p||(p=this.ccb(c))&&(d=p.getMinCommonStartTime())}return d},c.prototype.getPlaybackTimesForBufferBlock=function(c,u){var d=this,p=this.getBufferBlock(c);return u.map(function(c){var u=new y.FilterIterator(d.getAllSegmentsFromBufferBlock(p,c),function(c){return!c.isInit()});return u.hasNext()?u.next().getPlaybackTime():-1/0})},c.prototype.hasStartedLoadingNextBufferBlock=function(c){var u=this.getNextBufferBlock(c);return!!u&&this.hasDataSegmentsForBufferBlock(u)},c.prototype.shouldSwitchBufferBlock=function(c,u){return!(0,P.areBufferBlocksEqual)(c,this.getBufferBlock(u))},c.prototype.getSegmentStoreRangesMap=function(c,u){var d={};return u.forEach(function(c){return d[c]=[]}),this.getFutureBufferBlocks(this.getCurrentBufferBlockId()).map(function(c){return c.getId()}).concat(1/0).map(function(u){return(0,f.getBufferBlockLoadedRanges)(c,u)}
14).forEach(function(c){return Object.keys(c).forEach(function(u){return d[u].push(c[u])})}),d},c}();u.SegmentStore=I},77264:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.Segregation=void 0,u.areSegregationCriteriaEqual=y,u.canReuseSourceBuffer=function(c,u,d){var f=(0,h.getCapabilities)().isTizen?P:(0,h.getCapabilities)().isLegacyEdge?I:(0,h.getCapabilities)()[p.CapabilityKey.isEdge]?w:(0,h.getCapabilities)()[p.CapabilityKey.isWebOS]?A:(0,h.getCapabilities)()[p.CapabilityKey.isPlayStation4]?E:(0,h.getCapabilities)()[p.CapabilityKey.isPlayStation5]?T:_;return d.every(function(d){var p=d.mimeType;return f.canReuseSourceBuffers(c,u,p)})};var p=d(7387),h=d(21513),f=d(34047),m=d(85434),g=d(15487),v=d(90685);function y(c,u,d){return void 0===d&&(d=[]),Object.keys(c).filter(function(c){return!d.includes(c)}).every(function(d){return u&&u[d]===c[d]})}function b(c,u){var d=c.getMediaTypes().find(function(c){return c.mimeType===u});return d?d.timescale:0}function S(c,u,d){return{currentCriteria:c.getSegregationCriteria(d),nextCriteria:u.getSegregationCriteria(d)}}u.Segregation=function(){function c(c,u){this.requiredMediaTypes=c,this.settings=u,this.requiredMediaTypes=c}return c.prototype.fcb=function(c){var u;return!!(null!=(u=this.requiredMediaTypes[c.getPeriodId()])&&u[c.getMimeType()])},c.prototype.gcb=function(c,u){var d=this;if(void 0!==u.getSegmentInfo().discontinuitySequenceNumber)return!0;if(!this.fcb(u))return!1;var p=u.getPeriodId(),h=Object.keys(this.requiredMediaTypes[p]||{}).filter(function(c){return m.MimeTypeHelper.isAV(c)});return c.length===h.length&&c.every(function(c){var u;return null==(u=d.requiredMediaTypes[p])?void 0:u[c.mimeType]})},c.prototype.getSegregationCriteria=function(c){var u,d={encryption:c.isEncrypted()?v.EncryptionState.Encrypted:v.EncryptionState.Clear,codec:f.CodecStringHelper.extractCodec(c.getCodec())};if(this.settings.HLS_CLEAR_BUFFERS_ON_DISCONTINUITY_SWITCHES){var p=null==(u=c.getSegmentInfo())?void 0:u.discontinuitySequenceNumber;null!=p&&(d.discontinuityNumber=p)}return(this.settings.DASH_CLEAR_BUFFERS_ON_PERIOD_SWITCHES||(0,g.isTizen2016)())&&(d.periodId=c.getPeriodId()),d},c.prototype.canAddSegmentToBufferBlock=function(c,u,d){var p,h=u.getMediaTypes();if(0===h.length)return!0;if(!this.gcb(h,c))return!1;var f=c.getMimeType(),m=u.getSegregationCriteria(f);if(m)return y(d,m);var g=null==(p=h.find(function(c){return c.mimeType!==f}))?void 0:p.mimeType;return!g||y(d,u.getSegregationCriteria(g),["codec","encryption"])},c}();var _={canReuseSourceBuffers:function(c,u,d){var p=S(c,u,d);return M(p.currentCriteria,p.nextCriteria)}},E={canReuseSourceBuffers:function(c,u,d){var p=S(c,u,d),h=p.currentCriteria,f=p.nextCriteria;return M(h,f)&&R(h,f)&&k(h,f)&&(null==h?void 0:h.periodId)===(null==f?void 0:f.periodId)&&x(c,u,d)}},T={canReuseSourceBuffers:function(c,u,d){var p=S(c,u,d),h=p.currentCriteria,f=p.nextCriteria;return M(h,f)&&R(h,f)&&x(c,u,d)}},w={canReuseSourceBuffers:function(c,u,d){var p=S(c,u,d),h=p.currentCriteria,f=p.nextCriteria;return M(h,f)&&R(h,f)}},P={canReuseSourceBuffers:function(c,u,d){var p=S(c,u,d),h=p.currentCriteria,f=p.nextCriteria;return!(0,g.isTizen2017)()&&M(h,f)&&R(h,f)&&x(c,u,d)}},A={canReuseSourceBuffers:function(c,u,d){var p=S(c,u,d),h=p.currentCriteria,f=p.nextCriteria,m=M(h,f)&&x(c,u,d)&&!k(h,f);return((0,g.isWebOs2017)()||(0,g.isWebOs2016)())&&(m=m&&R(h,f)),m}},I={canReuseSourceBuffers:function(c,u,d){return!1}};function M(c,u){return(null==c?void 0:c.codec)===(null==u?void 0:u.codec)}function R(c,u){return(null==c?void 0:c.encryption)===(null==u?void 0:u.encryption)}function k(c,u){return(null==c?void 0:c.discontinuityNumber)===(null==u?void 0:u.discontinuityNumber)}function x(c,u,d){return b(c,d)===b(u,d)}},14302:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.AbstractUpdater=u.REPRESENTATION_UPDATE_CANCEL=void 0,u.calculateUpdateDelayInMillis=y;var p=d(80813),h=d(3714),f=d(34841),m=d(89927),g=d(88844);u.REPRESENTATION_UPDATE_CANCEL="CANCEL";var v=function(){function c(c,u){var d=this;this.context=c,this.updateCallbacks=u,this.yQ=function(){var c,u;(null==(c=d.xQ)?void 0:c.hasSettled)===!1&&(d.context.logger.debug("Scheduling delayed manifest update as playback has started"),null==(u=d.xQ)||u.resolve(),d.xQ=void 0)},this.EQ=function(c){d.FQ(c),d.clearTimeout()},this.GQ=function(c){d.success(c),d.clearTimeout(),d.wQ||d.scheduleUpdate()},this.wQ=!1,c.eventHandler.on(h.PlayerEvent.Playing,this.yQ,!0)}return c.prototype.cancel=function(){var c;this.uQ&&(this.uQ.reject(u.REPRESENTATION_UPDATE_CANCEL),this.updateCallbacks.error(u.REPRESENTATION_UPDATE_CANCEL),null==(c=this.xQ)||c.reject(u.REPRESENTATION_UPDATE_CANCEL),this.xQ=void 0),this.clearTimeout()},c.prototype.clearTimeout=function(){(0,g.clearTimeoutIfDefined)(this.vQ),this.vQ=null},c.prototype.stop=function(){null!==this.vQ&&(this.wQ=!0,this.cancel())},c.prototype.start=function(){this.wQ=!1,this.scheduleUpdate()},c.prototype.scheduleUpdate=function(c){void 0===c&&(c=!1),this.vQ||this.wQ||this.zQ(c)},c.prototype.zQ=function(c){var u=this,d=y(this.getLastReloadTimestamp(),this.getReloadIntervalInSeconds());if(!(d>0x7fffffff)){var p=new f.Deferred,h={isForcedUpdate:c,wasInvalidated:function(){return p!==u.uQ}};p.promise.catch(function(){}),this.uQ=p,this.vQ=window.setTimeout(function(){return u.AQ(h)},d)}},c.prototype.AQ=function(c){var u=this;
14this.BQ(c.isForcedUpdate).then(function(){return u.update()}).then(function(d){c.wasInvalidated()||u.GQ(d)}).catch(function(d){c.wasInvalidated()||u.EQ(d)})},c.prototype.BQ=function(c){var u,d,h,m;return!(null!=(u=this.context.settings)&&u.POSTPONE_MANIFEST_UPDATES_UNTIL_PLAYBACK_START)||c||(null==(m=null==(h=null==(d=this.context)?void 0:d.serviceManager)?void 0:h.get(p.ServiceName.PlayerStateService))?void 0:m.isPlay())!==!0||this.DQ()?Promise.resolve():(this.context.logger.debug("Delaying manifest update until playback has started"),this.xQ=this.xQ||new f.Deferred,this.xQ.promise)},c.prototype.CQ=function(){return this.context.serviceManager.get(p.ServiceName.SourceStoreService,this.context.sourceContext.sourceIdentifier)},c.prototype.DQ=function(){var c,u,d;return null==(d=null==(u=null==(c=this.CQ())?void 0:c.getState())?void 0:u.hls)?void 0:d.isLowLatencyPlaylist},c.prototype.FQ=function(c){this.uQ.reject(c),this.updateCallbacks.error(c)},c.prototype.success=function(c){this.uQ.resolve(c),this.updateCallbacks.success(c)},c.prototype.dispose=function(){this.context.eventHandler.off(h.PlayerEvent.Playing,this.yQ,!0)},Object.defineProperty(c.prototype,"isStopped",{get:function(){return this.wQ},enumerable:!1,configurable:!0}),c.prototype.getPayload=function(){return this.uQ.promise},c}();function y(c,u){if(isNaN(u))return 0;var d=(0,m.toSeconds)(Date.now()-c);return d>=u?0:(0,m.toMilliSeconds)(u-d)}u.AbstractUpdater=v},87222:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.findAdaptationSetOfMimeType=function(c,u,d){void 0===d&&(d={});var p,h=d.sourceState,f=d.langObj,y=d.periodSwitched,S=g(c,h),_=b(u,c);return S&&(p=v(_,S,f,y)),!p&&h&&(p=v(_,m(c,h),f,y)),p||_[0]},u.getHlsDefaultLanguage=m,u.getPreferredLanguage=g,u.findAdaptationSetsForMimeType=b;var p=d(85434),h=d(88052),f=d(62756);function m(c,u){var d;if(h.ModuleManager.has(f.ModuleName.HLS)){var m=h.ModuleManager.get(f.ModuleName.HLS).selectors,g=m.getHlsState,v=m.getDefaultLanguages,y=g(u),b=y?v(y):void 0;if(b){var S=null==(d=p.MimeTypeHelper.getMediaType(c))?void 0:d.toUpperCase();return S?b[S]:void 0}}}function g(c,u){var d=u&&m(c,u),p={language:navigator.language||navigator.userLanguage||(null==d?void 0:d.language)};return p.language&&d&&y(p.language,d.language)&&(p.name=d.name),p}function v(c,u,d,p){if(void 0===p&&(p=!1),0!==c.length){var h,f,m,g=void 0;if(d&&(h=p,f=c.find(function(c){return c._lang&&d.lang&&c._lang===d.lang}),m=(m=c.find(function(c){return d.adaptationSetId&&c._internalId.equals(d.adaptationSetId)}))||c.find(function(c){return d.id===c._internalId.adaptationSetId}),g=h?f||m:m||f),g)return g;if(u&&u.language){var v=c.filter(function(c){return!(!c._lang||null==c._lang)&&y(c._lang,u.language)});return v.find(function(c){return c.Representation.find(function(c){return c._name===u.name})})||v[0]}}}function y(c,u){return!!(null!=c&&c.includes(u)||null!=u&&u.includes(c))}function b(c,u){return c.AdaptationSet.filter(function(c){return c._mimeType===u||c.Representation.find(function(c){return c._mimeType===u})})}},47151:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.AdaptationSetId=void 0,u.createAdaptationSetIdFromMimeTypeAndIndex=function(c,u,d){return new f(c,"".concat(u,"-").concat(d))};var f=function(c){function u(u,d){var p=c.call(this,u)||this;return p.ib=d,p}return h(u,c),Object.defineProperty(u.prototype,"adaptationSetId",{get:function(){return this.ib},enumerable:!1,configurable:!0}),u.prototype.equals=function(u){return c.prototype.equals.call(this,u)&&this.adaptationSetId===(null==u?void 0:u.adaptationSetId)},u.prototype.key=function(){return c.prototype.key.call(this)+"-"+this.adaptationSetId},u}(d(16197).PeriodId);u.AdaptationSetId=f},92778:function(c,u){var d;
14Object.defineProperty(u,"__esModule",{value:!0}),u.DashSchemeUri=void 0,(d||(u.DashSchemeUri=d={})).AudioChannelConfig="urn:mpeg:dash:23003:3:audio_channel_configuration:2011"},23940:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.MPDExtractor=void 0,u.stripUnderscorePrefix=P,u.applyProperties=A,u.representationToQuality=I,u.getMinimumUpdatePeriodInSeconds=function(c){return(null==c?void 0:c._minimumUpdatePeriod)==null?1/0:g.DurationConverter.getDurationInSec(c._minimumUpdatePeriod)},u.getContentTypeFromMimeTypeAndCodecs=R;var p=d(80813),h=d(44468),f=d(77179),m=d(34047),g=d(52424),v=d(85434),y=d(89927),b=d(70850),S=d(88052),_=d(62756),E=d(59707),T=d(62198),w=d(92778);function P(c){return 0===c.indexOf("_")?c.substring(1):c}function A(c,u,d){return void 0===d&&(d=[]),Object.keys(c).filter(function(c){return 0===d.length||d.indexOf(c)>-1}).forEach(function(d){u[P(d)]=c[d]}),u}function I(c,u,d){if(!c)return null;var p,h,f,g,y={id:c._id?String(c._id):null,bitrate:c._bandwidth||0},b=m.CodecStringHelper.getExtractedCodecStrings(c._codecs||d);return v.MimeTypeHelper.isAudio(u)?(b.audio&&(y.codec=b.audio),(f=null==(h=null==(p=c.AudioChannelConfiguration)?void 0:p.find(function(c){var u=c._schemeIdUri,d=c._value;return u===w.DashSchemeUri.AudioChannelConfig&&void 0!==d}))?void 0:h._value)&&(y.channels=parseInt(f)),y.label=c._label||M(y.bitrate)):v.MimeTypeHelper.isVideo(u)?(y.width=c._width||0,y.height=c._height||0,b.video&&(y.codec=b.video),c.hasOwnProperty("_frameRate")&&(y.frameRate=c._frameRate),g=M(y.bitrate),y.width&&y.height&&(g="".concat(y.width,"x").concat(y.height,", ").concat(g)),y.label=c._label||g):y.label=c._label||M(y.bitrate),y}function M(c){return"".concat(Math.round(c/1e3),"kbps")}function R(c,u){return"".concat(c,'; codecs="').concat(u,'"')}function k(c,u){for(var d=function(u){-1===c.findIndex(function(c){return c.contentType===u.contentType})&&c.push(u)},p=0;p<u.length;p++)d(u[p])}u.MPDExtractor=function(){function c(c,u){var d=this;this.isLive=function(){var c;return(null==(c=d.BE())?void 0:c._type)==="dynamic"},this.vE=c,this.wE=u,this.xE=c.settings,this.zE=!1,this.yE=c.serviceManager.get(p.ServiceName.SynchronizedTimeService,this.wE.sourceIdentifier),this.AE=c.serviceManager.get(p.ServiceName.SourceStoreService,this.wE.sourceIdentifier)}return c.prototype.BE=function(){var c;return(0,T.getManifest)(null==(c=this.AE)?void 0:c.getState())},c.prototype.CE=function(){var c,u;return null!=(u=null==(c=this.BE())?void 0:c.Period)?u:[]},c.prototype.DE=function(c){var u=this.CE().find(function(u){return u._id===c});return u?u.AdaptationSet:[]},c.prototype.adjustPeriodStartTimes=function(){var c,u,d,p=null==(c=this.AE)?void 0:c.getState();if(p&&!this.zE&&!(null!=(u=this.BE())&&u._isHls)){var h=this.isLive()?(0,y.toSeconds)(this.getAvailabilityStartTime()):(0,f.getStartTimeOffset)(p);null==(d=this.AE)||d.dispatch((0,E.adjustPeriodStartTimes)(h)),this.zE=!0}},c.prototype.getAvailabilityStartTime=function(){var c;return this.isLive()&&null!=(c=this.BE())&&c._availabilityStartTime?b.Util.getUtcDate(this.BE()._availabilityStartTime).getTime()-this.EE():0},c.prototype.getAvailabilityEndTime=function(){var c;return null!=(c=this.BE())&&c.hasOwnProperty("_availabilityEndTime")?new Date(b.Util.getUtcDate(this.BE()._availabilityEndTime).getTime()-this.EE()):null},c.prototype.EE=function(){return this.yE?this.yE.getTimeDifference():0},c.prototype.getType=function(){var c;return null==(c=this.BE())?void 0:c._type},c.prototype.getDuration=function(){var c;return null==(c=this.BE())?void 0:c._mediaPresentationDuration},c.prototype.getRequestTimestamp=function(){var c;return null==(c=this.BE())?void 0:c._requestTimestamp},c.isValueWithinBounds=function(c,u,d){return!c||c>=u&&c<=d},c.prototype.FE=function(u){var d=c.isValueWithinBounds(u.width,this.vE.config.adaptation.resolution.minSelectableVideoWidth,this.vE.config.adaptation.resolution.maxSelectableVideoWidth),p=c.isValueWithinBounds(u.height,this.vE.config.adaptation.resolution.minSelectableVideoHeight,this.vE.config.adaptation.resolution.maxSelectableVideoHeight),h=c.isValueWithinBounds(u.bitrate,this.xE.MIN_SELECTABLE_VIDEO_BITRATE,this.xE.MAX_
vendor: 4,448 bytes, line 14
14SELECTABLE_VIDEO_BITRATE);return d&&p&&h},c.prototype.GE=function(u){return c.isValueWithinBounds(u.bitrate,this.xE.MIN_SELECTABLE_AUDIO_BITRATE,this.xE.MAX_SELECTABLE_AUDIO_BITRATE)},c.prototype.HE=function(c,u){var d=this;if(!c)return[];var p=u.filter(function(u){return v.MimeTypeHelper.isVideo(c)&&d.FE(u)||v.MimeTypeHelper.isAudio(c)&&d.GE(u)});return p.length<1&&u.length>0?u:p},c.prototype.IE=function(c){if(!c)return[];var u=c.Representation.map(function(u){return I(u,c._mimeType,c._codecs)});return this.xE.EXCLUDE_DISALLOWED_REPRESENTATIONS&&(u=this.HE(c._mimeType,u)),u},c.prototype.getAudioQualities=function(c){var u=this,d=this.KE(c);return d?this.DE(d).reduce(function(c,d){return d._mimeType&&v.MimeTypeHelper.isAudio(d._mimeType)&&(c[d._internalId.adaptationSetId]=u.IE(d)),c},{}):{}},c.prototype.getVideoQualities=function(c){var u=this.KE(c);if(!u)return[];var d=this.DE(u).find(function(c){return c._mimeType&&v.MimeTypeHelper.isVideo(c._mimeType)});return d?this.IE(d):[]},c.prototype.getLangObjectFromAdaptationSet=function(c,u,d){var p={id:null,lang:null,adaptationSetId:null,kind:null,label:"off",url:null},h=c._mimeType&&c._mimeType.indexOf(u)>-1,f=d&&c._mimeType.indexOf(d)>-1;return v.MimeTypeHelper.isSubtitle(u)&&(p.kind="subtitle"),c.Role&&c.Role.length>0&&(p.role=c.Role.map(function(c){return A(c,{})})),(h||f)&&(A(c,p,["_lang","_isFragmented"]),p.lang=p.lang||"und",p.label=c._label||p.lang,p.adaptationSetId=c._internalId,p.id=c._internalId.adaptationSetId,p.metadata=this.JE(c)),p},c.prototype.JE=function(c){var u;if(null!=(u=c.SupplementalProperty)&&u.length)return c.SupplementalProperty.map(function(c){return{schemeIdUri:c._schemeIdUri,value:c._value,id:c._id}})},c.prototype.toSubtitleTrack=function(c,u,d){var p,h,f,m,g=this.getLangObjectFromAdaptationSet(c,u,d),v={id:g.id,lang:g.lang,kind:g.kind,isFragmented:null!=(m=g.isFragmented)&&m,isSideloaded:!1,enabled:!1,label:g.label};return null!=g.role&&(v.role=g.role),null!=g.metadata&&(v.metadata=g.metadata),p=c.Representation[0],v.forced=!!(null!=(h=v.role)&&h.some(function(c){return c.value&&["forced_subtitle","forced-subtitle"].includes(c.value)}))||!!(null!=(f=null==p?void 0:p._hls)&&f.isForced),v},c.prototype.getAvailableSubtitles=function(c){var u=this,d=0;return(c=this.KE(c))?this.DE(c).filter(function(c){return v.MimeTypeHelper.isSubtitle(c._mimeType)}).map(function(c){var p=u.toSubtitleTrack(c,"application","text");return p.id||(d++,p.id="sub_".concat(d)),p}):[]},c.prototype.getClosedCaptionLabels=function(c){return(c=this.KE(c))?this.DE(c).filter(function(c){return c.ClosedCaptionLabels}).flatMap(function(c){return Object.keys(c.ClosedCaptionLabels).map(function(u){var d=c.ClosedCaptionLabels[u];return{id:u,kind:"captions",lang:d.lang||"unknown",label:d.label||"Captions (".concat(u,")")}})}):[]},c.prototype.getAvailableAudio=function(c,u){var d=this;void 0===u&&(u=!0);var p=this.KE(c);if(!p)return[];var f=this.DE(p),m=0,g=f.filter(function(c){return v.MimeTypeHelper.isAudio(c._mimeType)}).map(function(c){var u=d.getLangObjectFromAdaptationSet(c,h.MediaType.Audio);return u&&"off"!==u.label?(u.id||(u.id="audio_"+m,m++),u):null});if(u){var y=f.find(function(c){return v.MimeTypeHelper.isVideo(c._mimeType)});if(y&&y.ContentComponent){var b=y.ContentComponent.filter(function(c){return c._contentType===h.MediaType.Audio}).map(function(c){return{id:c._id,lang:c._lang,label:c._id,adaptationSetId:y._internalId}});g=g.concat(b)}}return g.filter(function(c){return c})},c.prototype.getAvailableVideo=function(c){var u=this.KE(c);if(!u)return[];var d=this.DE(u).find(function(c){return v.MimeTypeHelper.isVideo(c._mimeType)});return d?[this.getLangObjectFromAdaptationSet(d,h.MediaType.Video)]:[]},c.getContentProtectionForManifestElement=function(c){var u;return null!=(u=null==c?void 0:c.ContentProtection)&&u.length&&S.ModuleManager.has(_.ModuleName.DRM)?S.ModuleManager.get(_.ModuleName.DRM).ContentProtectionHelper.parseContentProtectionDescriptors(c.ContentProtection):[]},c.getContentProtectionForAdaptationSet=function(u){for(var d=[],p=0;p<u.Representation.length;p++)d=d.concat(c.getContentProtectionForManifestElement(u.Representation[p]));return d.concat(c.getContentProtectionForManifestElement(u))},c.prototype.getTimeShiftBufferDepthSeconds=function(){if(this.isLive()){var c=this.BE()._timeShiftBufferDepth,u=(0,y.toSeconds)(Date.now()-this.getAvailabilityStartTime());return -1/0===c?-u:Math.max(c,-u)}return 0}
14,c.getCurrentAndSuccessorPeriod=function(c,u){for(var d=null,p=0,h=null;p<c.length;p++)if(c[p]._id===u){d=c[p],h=c[p+1]||null;break}return[d,h]},c.prototype.getPeriodDuration=function(u,d){d=d??this.CE();var p,h=c.getCurrentAndSuccessorPeriod(d,u),f=h[0],m=h[1];if(f&&f._duration)return g.DurationConverter.getDurationInSec(f._duration);if(f&&f.start&&m&&m.start)return m.start-f.start;if(null!=(p=this.BE())&&p._mediaPresentationDuration){var v=g.DurationConverter.getDurationInSec(this.BE()._mediaPresentationDuration);if(!isNaN(v))return v}return 1/0},c.prototype.getDRMCapabilitiesForPeriod=function(c){if(!(c=this.KE(c)))return[[],[]];var u=this.CE().find(function(u){return u._id===c});return this.getDRMCapabilitiesFromPeriod(u)},c.prototype.getDRMCapabilitiesFromPeriod=function(u){for(var d=[],p=[],h=0,f=u.AdaptationSet;h<f.length;h++){var m=f[h],g=m._mimeType,y=c.getMimeTypeCodecStringForAdaptationSet(m);v.MimeTypeHelper.isVideo(g)?k(p,y):v.MimeTypeHelper.isAudio(g)&&k(d,y)}return[d,p]},c.prototype.dispose=function(){this.xE=null},c.getMimeTypeCodecStringForAdaptationSet=function(u){for(var d=[],p=0,h=u.Representation;p<h.length;p++){var f=h[p],m=c.getAttributeFromRepresentationOrAdaptationSet("_codecs",f,u),g=u._mimeType;if(u._mimeType&&m){var v=R(g,m);d.push({contentType:v})}}return d},c.getAttributeFromRepresentationOrAdaptationSet=function(c,u,d){return u.hasOwnProperty(c)&&u[c]?u[c]:d.hasOwnProperty(c)&&d[c]?d[c]:null},c.prototype.KE=function(c){var u=this.CE();if(0===u.length)return this.vE.logger.warn("No periods available in the manifest"),null;if(u.find(function(u){return u._id===c}))return c;var d=u[u.length-1]._id;return this.vE.logger.debug("Period "+c+" not available - return last period ("+d+")"),d},c.prototype.getEventStreamEvents=function(c){var u=this;return c&&c.EventStream?c.EventStream.filter(function(c){return c.Event}).flatMap(function(d){var p,h=Number(null!=(p=d._timescale)?p:1);return u.LE(c.start,d,h)}):[]},c.prototype.LE=function(c,u,d){var p=this;return u.Event.map(function(h){var f={};if(f.startTime=(h._presentationTime||0)/d+c,h._duration){var m=h._duration/d;f.endTime=f.startTime+m}else f.endTime=f.startTime;return f.data=p.ME(h,u._schemeIdUri),f})},c.prototype.ME=function(c,u){var d=/<event[^>]*>(.*)(<\/event>|\/>)/g.exec(c.rawXmlRepresentation),p=void 0;d&&d.length>1&&(p=d[1]);var h={};return Object.getOwnPropertyNames(c).filter(function(c){return!["_presentationTime","_duration","__text"].some(function(u){return u===c})&&0===c.lastIndexOf("_",0)}).forEach(function(u){h[u.substring(1,u.length)]=c[u]}),{properties:h,content:p,schemeIdUri:u}},c}()},67580:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.ManifestCachingService=void 0;var p=d(58313);u.ManifestCachingService=function(){function c(){this.jb={}}return c.prototype.set=function(c,u,d){var h,f,m=p.URLHelper.toFullUrl(c);h=m,(f=this.jb)[h]||(f[h]={}),this.jb[m][u]=d},c.prototype.uc=function(c,u){var d,h,f=p.URLHelper.toFullUrl(c);d=f,(h=this.jb)[d]||(h[d]={}),this.jb[f].expire=u},c.prototype.get=function(c,u){var d=p.URLHelper.toFullUrl(u),h=this.jb[d];if(h&&h.expire>=Date.now())return h[c];delete this.jb[d]},c.prototype.cacheHttpResponse=function(c,u,d){void 0===d&&(d=1/0),this.set(u,"httpResponse",c),this.uc(u,d)},c.prototype.cacheParsedManifest=function(c,u,d){void 0===d&&(d=1/0),this.set(u,"parsedManifest",c),this.uc(u,d)},c.prototype.cacheSegmentList=function(c,u,d){void 0===d&&(d=1/0),this.set(u,"segmentList",c),this.uc(u,d)},c.prototype.getHttpResponse=function(c){return this.get("httpResponse",c)},c.prototype.getParsedManifest=function(c){return this.get("parsedManifest",c)},c.prototype.getSegmentList=function(c){return this.get("segmentList",c)},c.prototype.clear=function(){this.jb={}},c.prototype.dispose=function(){this.jb={}},c}()},23901:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.createManifestLoadingService=y,u.initializeManifestLoadingService=function(c,u,d){var p=c.serviceManager,h=u.sourceIdentifier;if(!p.has(f.ServiceName.ManifestLoadingService,h)){var m=y(d,c,u);p.set(f.ServiceName.ManifestLoadingService,m,h)}};var p=d(40306),h=d(3336),f=d(80813),m=d(44468),g=d(88052),v=d(62756);function y(c,u,d){switch(c.type){case m.StreamType.Dash:return new(g.ModuleManager.get(v.ModuleName.DASH)).MPDLoader(u,d);case m.StreamType.Hls:return new(g.ModuleManager.get(v.ModuleName.HLS)).M3u8Loader(u,d);case m.StreamType.Smooth:return new(g.ModuleManager.get(v.ModuleName.Smooth)).SmoothStreamingLoader(u,d);default:throw new h.PlayerError(p.ErrorCode.SOURCE_INVALID,{given:c.type,supported:"dash, hls, smooth"},"The provided stream type is not supported by the player.",d.sourceIdentifier)}}},13422:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};
14Object.defineProperty(u,"__esModule",{value:!0}),u.orderAdaptationSetsByCodec=function(c,u){return(c=p({},c)).Period=c.Period.map(function(c){if(!c.AdaptationSet)return p({},c);var d=c.AdaptationSet.reduce(function(c,u){var d=v(u);return h.MimeTypeHelper.isVideo(d)?c.videoSets.push(u):h.MimeTypeHelper.isAudio(d)?c.audioSets.push(u):c.otherSets.push(u),c},{videoSets:[],audioSets:[],otherSets:[]}),f=d.videoSets,g=d.audioSets,y=d.otherSets,b=m(f,u.video),S={};return g.forEach(function(c){var u=c._lang||"none";S[u]=S[u]||[],S[u].push(c)}),Object.keys(S).forEach(function(c){b=b.concat(m(S[c],u.audio))}),p(p({},c),{AdaptationSet:b.concat(y)})}),c},u.sortAdaptationSetsByBestCodec=m,u.getCodecsFromAdaptationSet=g,u.getMimeTypeForAdaptationSet=v,u.removeRepresentations=function(c,u){if(!(c.Period&&c.Period.length>0)||0===u.length)return c;var d=c.Period.map(function(c){var d;return d=c.AdaptationSet.map(function(c){var d,h;return d=c._internalId,h=c.Representation.filter(function(c){return!u.some(function(u){return u.equals(new f.RepresentationId(d,c._id))})}),p(p({},c),{Representation:h})}).filter(function(c){return c.Representation.length>0}),p(p({},c),{AdaptationSet:d})}).filter(function(c){return c.AdaptationSet.length>0});return p(p({},c),{Period:d})};var h=d(85434),f=d(79505);function m(c,u){var d=function(c){for(var d=0;d<u.length;d++)if(0===c.indexOf(u[d]))return d;return u.length+1};return c.sort(function(c,u){return d(g(c))-d(g(u))})}function g(c){var u;if((null==(u=null==c?void 0:c._codecs)?void 0:u.length)>0)return c._codecs;if(c.Representation&&c.Representation.length>0){var d=c.Representation[c.Representation.length-1];if(d._codecs)return d._codecs}return""}function v(c){if(c._mimeType)return c._mimeType;if(Array.isArray(c.Representation)){var u=c.Representation.find(function(c){return c._mimeType});if(u)return u._mimeType}return""}},96533:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)}),f=this&&this.__assign||function(){return(f=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},m=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.ManifestService=void 0,u.initializeInternalIds=Y,u.addDrmKidsToRepresentations=X,u.iterateAdaptationSets=Q,u.getNearestPeriodForTime=Z,u.findLowestPossibleBandwidthFromRepresentations=function(c,u){return void 0===u&&(u=-1/0),c.reduce(function(c,d){return d._bandwidth>=u?Math.min(c,d._bandwidth):c},1/0)},u.getMatchingRepresentationsByBandwidth=J,u.getMatchingRepresentationByBandwidth=$,u.getCodecPriorities=et,u.getCodecOfAdaptationSetMimeType=ei,u.getManifestService=function(c,u){var d,p=u??(null==(d=c.sourceContext)?void 0:d.sourceIdentifier);if(p)return c.serviceManager.get(y.ServiceName.ManifestService,p)},u.initializeManifestService=function(c,u){var d,p=c.serviceManager,h=u.sourceIdentifier;if(p.has(y.ServiceName.ManifestService,h))null==(d=p.get(y.ServiceName.ManifestService,h))||d.restore();else{var f=new K(c,u);p.set(y.ServiceName.ManifestService,f,h)}};var g=d(40306),v=d(3336),y=d(80813),b=d(56481),S=d(3714),_=d(90408),E=d(25811),T=d(48488),w=d(30012),P=d(20649),A=d(88847),I=d(94685),M=d(74853),R=d(34047),k=d(52424),x=d(85434),C=d(15014),O=d(89927),D=d(23068),L=d(88052),N=d(62756),U=d(59707),F=d(62198),B=d(90919),j=d(87222),H=d(47151),V=d(13422),z=d(23940),q=d(16197),W=d(79505),G="Outdated",K=function(c){function u(u,d){var p=c.call(this,{onRestore:function(){return p.lD()}})||this;p.context=u,p.dD=0,p.kD=function(c){var u=p.getAdaptationSet(c._internalId);if(u){var d=function(u){p.context.eventHandler.dispatchEvent(u,{quality:{id:c._id,bitrate:c._bandwidth}})};x.MimeTypeHelper.isAudio(u._mimeType)?d(S.PlayerEvent.AudioQualityRemoved):x.MimeTypeHelper.isVideo(u._mimeType)&&d(S.PlayerEvent.VideoQualityRemoved)}}
14,p.qD=function(c){(c.Representation||[]).forEach(function(u){c._codecs&&!u._codecs&&(u._codecs=c._codecs),c._width&&!u._width&&(u._width=c._width),c._height&&!u._height&&(u._height=c._height)}),delete c.SegmentTemplate},p.VD=d,p.UD=u.settings,p.ZD=[];var h=p.VD.sourceIdentifier;return p.aD=u.serviceManager.get(y.ServiceName.SynchronizedTimeService,h),p.WD=u.serviceManager.get(y.ServiceName.SourceStoreService,h),p}return h(u,c),Object.defineProperty(u.prototype,"eD",{get:function(){return this.YD||(this.YD=new z.MPDExtractor(this.context,this.VD)),this.YD},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"fD",{get:function(){var c;return(0,F.getManifest)(null==(c=this.WD)?void 0:c.getState())},enumerable:!1,configurable:!0}),u.prototype.gD=function(c){this.WD.dispatch((0,U.setManifestAction)(this.preProcessManifest(c)))},u.prototype.updateManifest=function(c){var u=this;this.dD++;var d=this.dD;return this.DD(c).then(function(){return u.hD(d),u.iD(c)}).then(function(){u.hD(d),u.jD(c)}).catch(function(c){if(c!==G)throw c;u.context.logger.debug("Skipping manifest update, since a newer manifest is available")})},u.prototype.hD=function(c){if(c!==this.dD)throw G},u.prototype.iD=function(c){var u,d,p=this,h=null==(u=this.context.serviceManager)?void 0:u.get(y.ServiceName.DrmService),f=null==(d=this.context.serviceManager)?void 0:d.get(y.ServiceName.DrmDetectorService);return h&&f&&null!=c&&c.Period?h.getUsedOrEarlyResolvedKeySystemUid().then(function(u){if(u){var d,h,m,g=(d=p.eD,h=[],m=[],c.Period.forEach(function(c){var u=d.getDRMCapabilitiesFromPeriod(c);h=h.concat(u[0]),m=m.concat(u[1])}),{audioCapabilities:h,videoCapabilities:m}),v=g.audioCapabilities,y=g.videoCapabilities;return f.getSupportedCapabilities(u,v,y).then(function(u){var d;return d=p.context.logger,void c.Period.forEach(function(c){c.AdaptationSet=c.AdaptationSet.filter(function(p){return p.Representation=p.Representation.filter(function(h){var f,m,g=c.ContentProtection||p.ContentProtection,v=(null==g?void 0:g.length)>0,y=(0,z.getContentTypeFromMimeTypeAndCodecs)(h._mimeType,h._codecs),b=(f=u.audioCapabilities,m=u.videoCapabilities,x.MimeTypeHelper.isAudio(y)?!!f.find(function(c){return c.contentType===y}):!x.MimeTypeHelper.isVideo(y)||!!m.find(function(c){return c.contentType===y}));return v&&!b&&d.debug("Representation not supported by MediaKeySystem (".concat(y,")")),!v||b}),!x.MimeTypeHelper.isAV(p._mimeType)||p.Representation.length>0})})})}}):Promise.resolve()},u.prototype.jD=function(c){if((0,I.isContextAvailable)(this.context)&&this.context.serviceManager){if(this.BD(),c.isInitialized=!1,this.gD(c),this.isLive()){var u=this.getFirstPeriod(),d=this.isHlsManifest()&&u?u.start:(0,O.toSeconds)(this.getAvailabilityStartTime());this.WD.dispatch((0,w.setStartTimeOffset)(d))}this.eD.adjustPeriodStartTimes();var p=this.yD();(0,_.maybeFireDurationChangedEvent)(this.XD,p,this.context.eventHandler),this.XD=p,this.uD(!0),this.context.serviceManager.maybeCall(y.ServiceName.HeartbeatService,function(c){return c.beat()},void 0,this.VD.sourceIdentifier)}},u.prototype.excludeRepresentations=function(c){var u=this,d=c.map(function(c){return u.getRepresentationById(c)}).filter(function(c){return!!c});this.uD(!1);
vendor: 4,950 bytes, line 14
14var p=en(this.getAllPeriods());this.ZD=M.ArrayHelper.union(this.ZD,c),this.WD.dispatch((0,U.removeRepresentationsAction)(this.ZD));var h=en(this.getAllPeriods());return Object.keys(p).every(function(c){return null!=h[c]&&p[c].length===h[c].length})?(this.BD(),d.forEach(this.kD),this.uD(!0),!0):(this.context.eventHandler.fireError(new v.PlayerError(g.ErrorCode.SOURCE_ERROR,void 0,"No playable track left",this.VD.sourceIdentifier)),!1)},u.prototype.isRepresentationExcluded=function(c){return this.ZD.some(function(u){return u.equals(c)})},u.prototype.resetExcludedRepresentations=function(){this.ZD=[]},u.prototype.lD=function(){this.vD(this.getManifest()),this.WD.dispatch((0,U.setManifestAction)(Y(this.getManifest())))},u.getAdaptationSetSwitchingSupplementalProperties=function(c){return!c.SupplementalProperty||c.SupplementalProperty.length<=0?null:c.SupplementalProperty.filter(function(c){return"urn:mpeg:dash:adaptation-set-switching:2016"===c._schemeIdUri})},u.prototype.mD=function(c,u,d){var p=d&&d.length>0;if(!p&&!this.UD.ADAPTATION_SET_SWITCHING_WITHOUT_SUPPLEMENTAL_PROPERTY)return null;var h=[],f=c._group,m=ei(c);return p&&d.forEach(function(c){c._value&&h.push.apply(h,c._value.split(","))}),this.UD.ADAPTATION_SET_SWITCHING_WITHOUT_SUPPLEMENTAL_PROPERTY&&u.forEach(function(c){h.includes(c._id)||h.push(c._id)}),u.filter(function(u){if(!h.includes(u._id)||u._id===c._id)return!1;var d=u._group===f,p=u._mimeType===c._mimeType,g=ei(u)===m,v=u._lang===c._lang;return p&&g&&d&&v})},u.prototype.nD=function(c){var d=this;return c.AdaptationSet?c.AdaptationSet.reduce(function(p,h){var f=u.getAdaptationSetSwitchingSupplementalProperties(h),g=d.mD(h,c.AdaptationSet,f);return g&&0!==g.length?M.ArrayHelper.addAndMergeIntersects(p,m([h],g,!0)):p},[]):[]},u.mergeAdaptationSetProperties=function(c,u,d){var p=c.hasOwnProperty(d),h=u.hasOwnProperty(d);(p||h)&&(p?h||(u[d]=[]):c[d]=[],c[d]=c[d].concat(u[d]))},u.prototype.oD=function(c,u){return c.filter(function(c){return c.hasOwnProperty(u)}).map(function(c){return c[u]})},u.prototype.pD=function(c,u){var d=[c].concat(u),p=this.oD(d,"_minWidth"),h=this.oD(d,"_maxWidth"),f=this.oD(d,"_minHeight"),m=this.oD(d,"_maxHeight"),g=this.oD(d,"_minBandwidth"),v=this.oD(d,"_maxBandwidth");p.length>0&&(c._minWidth=Math.min.apply(null,p)),h.length>0&&(c._maxWidth=Math.max.apply(null,h)),f.length>0&&(c._minHeight=Math.min.apply(null,f)),m.length>0&&(c._maxHeight=Math.max.apply(null,m)),g.length>0&&(c._minBandwidth=Math.min.apply(null,g)),v.length>0&&(c._maxBandwidth=Math.max.apply(null,v))},u.prototype.rD=function(c,d){d.forEach(this.qD);var p=d.shift();d.forEach(function(c){["Representation","ContentComponent","ContentProtection","SupplementalProperty"].forEach(function(d){return u.mergeAdaptationSetProperties(p,c,d)})}),this.pD(p,d),c.AdaptationSet=c.AdaptationSet.filter(function(c){return!d.includes(c)})},u.prototype.sD=function(c){var u;null==(u=null==c?void 0:c.AdaptationSet)||u.forEach(function(c){var u;null==(u=null==c?void 0:c.Representation)||u.sort(function(c,u){return c._bandwidth-u._bandwidth})})},u.prototype.tD=function(c){var u=this;return c.Period.forEach(function(c){u.nD(c).forEach(function(d){u.rD(c,d)}),u.sD(c)}),c},u.prototype.setRepresentationDrmKid=function(c,u){this.WD.dispatch((0,U.setRepresentationDrmKidAction)(c,u))},u.prototype.getRepresentationDrmKid=function(c){var u;return null==(u=this.getRepresentationById(c))?void 0:u.associatedKid},u.prototype.uD=function(c){this.WD.dispatch((0,U.setManifestInitializedAction)(c))},u.prototype.vD=function(c){var u=this.VD.source.drm,d=null==c.Period?[]:c.Period.filter(function(c){return c.AdaptationSet&&c.AdaptationSet.length>0}).reduce(function(c,u){return c.concat(u.AdaptationSet)},[]).filter(function(c){return c.ContentProtection&&c.ContentProtection.length>0}).flatMap(function(c){return c.ContentProtection}).filter(function(c){return null!=c.laurl&&c.laurl.length>0}).flatMap(function(c){return c.laurl.map(function(u){return f(f({},u),{drmType:E.DRMSchemeIDURIs[c._schemeIdUri]})})}).filter(function(c){return null!=c.drmType}).map(function(c){var u;return(u={})[c.drmType]={LA_URL:c._licenseUrl},u}),p={};d.length>0&&(p=f({},d[0])),null!=u&&Object.keys(u).length>0&&Object.keys(u).forEach(function(c){p[c]=null!=p[c]?f(f({},p[c]),u[c]):u[c]}),this.wD(p);var h=Object.keys(p).length>0?(0,T.setManifestDrm)(p):(0,T.resetManifestDrm)();this.WD.dispatch(h)},u.prototype.wD=function(c){if(L.ModuleManager.has(N.ModuleName.DRM)&&Object.keys(c).length>0&&!this.context.serviceManager.has(y.ServiceName.DrmService)){var u=L.ModuleManager.get(N.ModuleName.DRM).DrmService;this.context.serviceManager.set(y.ServiceName.DrmService,new u(this.context))}this.context.serviceManager.maybeCall(y.ServiceName.DrmService,function(u){u.isDrmConfigSet()||u.setDrmConfig(c)})},u.prototype.xD=function(){var c=new Map;return this.getAllRepresentations().filter(function(c){return c._internalId&&c.associatedKid}
14).forEach(function(u){return c.set(u._internalId.key(),u.associatedKid)}),c},u.prototype.preProcessManifest=function(c){var u,d=this.xD();return c.Period&&c.Period.length>0?(X(c=(0,V.orderAdaptationSetsByCodec)(c,et(this.context.config,this.VD.source))),c=this.tD(c),L.ModuleManager.has(N.ModuleName.Envivio)&&(c=L.ModuleManager.get(N.ModuleName.Envivio).fixSegmentTimelineLiveStream(c)),this.isSuspended()||this.vD(c),c=Y(c),u=c=(0,V.removeRepresentations)(c,this.ZD),u.Period.flatMap(function(c){var u;return null!=(u=null==c?void 0:c.AdaptationSet)?u:[]}).flatMap(function(c){var u;return null!=(u=null==c?void 0:c.Representation)?u:[]}).forEach(function(c){d.has(c._internalId.key())&&(c.associatedKid=d.get(c._internalId.key()))}),c):(this.context.eventHandler.fireError(new v.PlayerError(g.ErrorCode.SOURCE_ERROR,void 0,"No playable track left",this.VD.sourceIdentifier)),null)},u.prototype.yD=function(){if(this.eD){var c=0/0,u=this.eD.getDuration();return u&&(this.bD&&this.bD===u?c=this.cD:(c=k.DurationConverter.getDurationInSec(u),this.bD=u,this.cD=c)),isNaN(c)&&this.isLive()?1/0:c}return 0},u.prototype.getDuration=function(){return this.XD},u.prototype.isLive=function(){return!!this.fD&&this.eD.isLive()},u.prototype.getAvailabilityStartTime=function(){return this.eD.getAvailabilityStartTime()},u.prototype.getAvailabilityEndTime=function(){return this.eD.getAvailabilityEndTime()},u.prototype.isAvailabilityEndTimeExceeded=function(){var c=this.getAvailabilityEndTime();return c&&Date.now()>c.getTime()},u.prototype.findPeriod=function(c){return(0,C.findPeriod)(this.fD,c)},u.prototype.getAllPeriods=function(){var c,u;return null!=(u=null==(c=this.fD)?void 0:c.Period)?u:[]},u.prototype.getPeriod=function(c){return c?this.findPeriod(c.periodId):null},u.prototype.isLanguageAvailable=function(c,u,d){var p=(0,C.findPeriod)(this.fD,c)||this.getFirstPeriod();return(0,j.findAdaptationSetsForMimeType)(p,u).some(function(c){var u=c._lang&&d.lang&&c._lang===d.lang,p=d.adaptationSetId&&c._internalId.equals(d.adaptationSetId);return u||p})},u.prototype.findAdaptationSet=function(c,u,d,p){void 0===p&&(p=!1);var h=(0,C.findPeriod)(this.fD,c)||this.getFirstPeriod();if(void 0!==h){var f=this.WD.getState(),m=(0,j.findAdaptationSetOfMimeType)(u,h,{sourceState:f,langObj:d,periodSwitched:p,playbackConfig:this.context.config.playback});return m||this.context.logger.debug("No AdaptationSet found to match mime type "+u),m}},u.prototype.getManifest=function(){return this.fD},u.prototype.getAvailableAudio=function(c,u){return this.eD.getAvailableAudio(c,u)},u.prototype.getAvailableVideo=function(c){return this.eD.getAvailableVideo(c)},u.prototype.getAvailableSubtitles=function(c){return this.eD.getAvailableSubtitles(c)},u.prototype.getClosedCaptionLabels=function(c){return this.eD.getClosedCaptionLabels(c)},u.prototype.getVideoRepresentations=function(c){return this.eD.getVideoQualities(c)},u.prototype.getAudioRepresentations=function(c){return this.eD.getAudioQualities(c)},u.prototype.getPeriodDuration=function(c,u){var d;return this.eD.getPeriodDuration(c,u??(null==(d=this.getManifest())?void 0:d.Period))},u.prototype.zD=function(c){var u,d,p,h,f,m,g,v,y,b,S,_,E,T,w,P;return this.isLastPeriod(c._id)?null!=(d=null!=(p=c.AdaptationSet[0])&&p.SegmentTemplate?null==(m=null==(f=null==(h=p.SegmentTemplate[0])?void 0:h.SegmentTimeline)?void 0:f[0])?void 0:m.totalDuration:null!=p&&p.SegmentList?null==(g=p.SegmentList[0])?void 0:g.totalDuration:null!=p&&p.Representation?null!=(E=null==(_=null==(S=null==(b=null==(y=null==(v=p.Representation[0])?void 0:v.SegmentTemplate)?void 0:y[0])?void 0:b.SegmentTimeline)?void 0:S[0])?void 0:_.totalDuration)?E:null==(P=null==(w=null==(T=p.Representation[0])?void 0:T.SegmentList)?void 0:w[0])?void 0:P.totalDuration:void 0)?d:1/0:null!=(u=c.duration)?u:this.getPeriodDuration(c._id)},u.prototype.hasMultiplePeriods=function(){return this.getAllPerio
14ds().length>1},u.prototype.hasSinglePeriod=function(){return 1===this.getAllPeriods().length},u.prototype.AD=function(){var c=this;return this.getAllPeriods().reduce(function(u,d){return u+c.zD(d)},0)},u.prototype.getTimeShiftBufferDepthSeconds=function(){var c=this.eD.getTimeShiftBufferDepthSeconds();return this.isHlsManifest()?c:Math.max(c,-this.AD())},u.prototype.getRequestTimestamp=function(){return this.eD.getRequestTimestamp()},u.prototype.getMediaPresentationDuration=function(){var c,u=k.DurationConverter.getDurationInSec(null==(c=this.fD)?void 0:c._mediaPresentationDuration);return isNaN(u)?0:u},u.prototype.calculateCumulativePeriodDuration=function(c){for(var u,d,p=0,h=0,f=null!=(d=null==(u=this.fD)?void 0:u.Period)?d:[];h<f.length;h++){var m=f[h];if(m._id===c)break;p+=this.getPeriodDuration(m._id)}return this.isLive()?(0,O.toSeconds)(Date.now()-this.getAvailabilityStartTime())-p:p},u.prototype.getMinimumUpdatePeriod=function(){return(0,z.getMinimumUpdatePeriodInSeconds)(this.fD)},u.prototype.getContentProtectionForAdaptationSet=function(c){return z.MPDExtractor.getContentProtectionForAdaptationSet(c)},u.prototype.getLangObjectFromAdaptationSet=function(c,u){return this.eD.getLangObjectFromAdaptationSet(c,u)},u.prototype.toSubtitleTrack=function(c,u){return this.eD.toSubtitleTrack(c,u)},u.prototype.getDRMCapabilitiesForPeriod=function(c){return this.eD.getDRMCapabilitiesForPeriod(c)},u.prototype.hasManifestTypeChanged=function(c){return!(!this.fD||this.fD._type===c||(this.context.logger.log("Manifest has just changed from "+this.fD._type+" to "+c),0))},u.prototype.getPeriodIdForTime=function(c){var u,d=this.getAllPerio
14ds();return 1===d.length?d[0]._id:null==(u=Z(d,c))?void 0:u._id},u.prototype.dispose=function(){this.BD(),c.prototype.dispose.call(this)},u.prototype.BD=function(){this.YD=(0,b.dispose)(this.YD)},u.prototype.CD=function(){var c=this.getFirstPeriod();if(this.cD&&c&&c.start)return c.start+this.cD},u.prototype.getTotalDuration=function(){if(this.isLive())return this.CD()||1/0;var c=this.getLastPeriod();return c?(c.start||c._start&&k.DurationConverter.getDurationInSec(c._start)||0)+this.eD.getPeriodDuration(c._id):0},u.prototype.getFirstPeriod=function(){return this.getAllPeriods()[0]},u.prototype.getLastPeriod=function(){var c=this.getAllPeriods();if(c.length>0)return c[c.length-1]},u.prototype.isLastPeriod=function(c){var u=this.getLastPeriod();return!!u&&c===u._id},u.prototype.isManifestFinalized=function(){return!this.isLive()},u.prototype.isFirstPeriod=function(c){var u=this.getFirstPeriod();return!!u&&u._id===c},u.prototype.isHlsManifest=function(){var c,u;return null!=(u=null==(c=this.getManifest())?void 0:c._isHls)&&u},u.prototype.isDashManifest=function(){return!this.isHlsManifest()&&!this.isSmoothManifest()},u.prototype.isSmoothManifest=function(){var c,u;return(null==(u=null==(c=this.fD)?void 0:c.originalFormat)?void 0:u.format)==="smooth"},u.prototype.getHlsTags=function(){if(!this.isHlsManifest())return null;var c=L.ModuleManager.get(N.ModuleName.HLS).selectors,u=c.getHlsState;return(0,c.getCustomTags)(u(this.WD.getState()))},u.prototype.isMimeTypePartOfPeriod=function(c,u){var d=this.getPeriod(new q.PeriodId(u));return(d?d.AdaptationSet:[]).some(function(u){return u._mimeType===c})},u.prototype.getNextPeriod=function(c){var u;if(null!=(u=this.fD)&&u.Period)for(var d=this.findPeriod(c),p=this.fD.Period.indexOf(d)+1;p<this.fD.Period.length;p++){var h=this.fD.Period[p];if(h)return h}return null},u.prototype.getEventStreamEvents=function(c){return this.eD.getEventStreamEvents(c)},u.prototype.hasAdaptationSets=function(c){var u=this.fD;if(u&&u.Period){var d=u.Period.find(function(u){return u._id===c});return!!(d&&d.AdaptationSet)}return!1},u.prototype.DD=function(c){if(this.aD){var u=this.aD.getSynchronizationPromise();if(u)return u;if(c.UTCTiming&&c.UTCTiming.length>0)return this.aD.synchronizeWithServer(c.UTCTiming,c._downloadTime)}return Promise.resolve()},u.prototype.getAdaptationSet=function(c){if(c&&this.fD)return(0,C.findAdaptationSet)(this.fD,c)},u.prototype.getRepresentationById=function(c){if(c&&this.fD)return(0,C.findRepresentation)(this.fD,c)},u.prototype.representationExists=function(c){return!!this.getRepresentationById(c)},u.prototype.getMatchingRepresentationsByBandwidth=function(c,u,d){void 0===d&&(d=function(){return!0});var p=this.getAdaptationSet(c);return p?J(p.Representation,u,d):[]},u.prototype.getMatchingRepresentationByBandwidth=function(c,u,d){void 0===d&&(d=function(){return!0});var p=this.getAdaptationSet(c);return p?$(p.Representation,u,d):null},u.prototype.getAllRepresentations=function(){return this.getAllPerio
14ds().flatMap(function(c){var u;return(null==(u=c.AdaptationSet)?void 0:u.flatMap(function(c){return c.Representation}))||[]})},u.prototype.getRepresentation=function(c,u){return this.getRepresentationById(new W.RepresentationId(c,u))},u.prototype.getAllAdaptationSets=function(){return this.getAllPeriods().flatMap(function(c){return c.AdaptationSet})},u.prototype.getAllImageAdaptationSets=function(){return this.getAllAdaptationSets().filter(function(c){return c._mimeType.includes("image")&&"image"===c._contentType})},u.prototype.getAllDashThumbnailSources=function(){var c=this;return this.getAllImageAdaptationSets().map(function(u){var d=c.findPeriod(u._internalId.periodId);return{adaptationSet:u,timing:{startTime:d.start,duration:d.duration}}})},u.prototype.getAdaptationSetIndex=function(c){var u=this.findPeriod(c.periodId);return u&&u.AdaptationSet&&0!==u.AdaptationSet.length?u.AdaptationSet.findIndex(function(u){return u._internalId.equals(c)}):-1},u.prototype.getAvailableBaseURLsForRepresentation=function(c){var u=this.getAdaptationSet(c);if(void 0===c||!u)return[];for(var d=[],p=u.Representation,h=0;h<p.length;h++)if(p[h]._internalId.equals(c)&&p[h].BaseURL&&p[h].BaseURL.length>0){d=p[h].BaseURL;break}var f=[];for(h=0;h<d.length;h++)f.push((0,P.forceReallocation)(d[h].url));return f},u.prototype.findDownloadedHlsRepresentation=function(c){var u=this.getAdaptationSet(c);return u?u.Representation.find(function(c){return c._hls&&!!c._hls.requestTimestamp}):null},u.prototype.isManifestFetchRequired=function(c){if(!this.isHlsManifest())return!1;var u=Date.now(),d=this.getRepresentationById(c),p=!!d.SegmentList&&d.SegmentList.length>0&&!!d.SegmentList[0].SegmentURL,h=p?d.SegmentList[0].SegmentURL.length:0,f=u-(d._requestTimestamp||u),m=this.isLive()&&f>=this.getMinimumUpdatePeriod();return!(!p||h>0)||m},u.prototype.hasSelfInitialisingSegments=function(){return this.getAllPerio
14ds().map(function(c){return c.AdaptationSet}).reduce(function(c,u){return c.concat(u)},[]).map(function(c){return c.Representation}).reduce(function(c,u){return c.concat(u)},[]).some(function(c){var u=c.SegmentList&&c.SegmentList.length>0?c.SegmentList:[],d=!!c.SegmentBase&&c.SegmentBase.length>0,p=c.SegmentTemplate&&c.SegmentTemplate.length>0?c.SegmentTemplate:[];return!(c.init||d||u.some(function(c){return!!c.init})||p.some(function(c){return!!c._initialization}))})},u.prototype.isSegmentInfoLoaded=function(c){var u=this.getRepresentationById(c);return!(!u||!u.segmentIndex&&!u.segmentIndexParsingError)},u.prototype.isPrecedingPeriod=function(c,u){if(!(c&&u&&this.fD&&this.fD.Period))return!1;var d=this.fD.Period.findIndex(function(u){return u._id===c}),p=this.fD.Period.findIndex(function(c){return c._id===u});return d>=0&&p>=0&&p<d},u.prototype.getMaxSegmentDuration=function(){var c=k.DurationConverter.getDurationInSec(this.fD._maxSegmentDuration);return isNaN(c)?0:c},u.prototype.getDesiredDistanceToLiveEdge=function(){var c,u=null==(c=this.context.serviceManager.get(y.ServiceName.LiveLatencyService))?void 0:c.getTargetLatency();return(0,D.isDefined)(u)?u:this.context.bufferSettings.getForwardTargetLevel()+this.UD.LIVE_EDGE_DISTANCE},u.prototype.hasSuggestedStartPosition=function(){var c,u;return null!=(u=null==(c=this.fD)?void 0:c.hasOwnProperty("_startOffset"))&&u},u.prototype.getVodStartOffset=function(){return Math.max(0,Math.min(this.fD._startOffset,this.getDuration()-this.UD.SEEK_TO_END_OFFSET))},u.prototype.getLiveStartOffset=function(c){void 0===c&&(c=!0);var u=this.fD._startOffset;return u-=Math.abs(this.getTimeShiftBufferDepthSeconds()),c&&(u+=this.getDesiredDistanceToLiveEdge(),u=Math.min(0,u)),u},u.prototype.initSegmentStartTimesFromReferenceSegment=function(c){this.WD.dispatch((0,U.initPlaybackTimesFromReferenceSegment)(c))},u.prototype.initializeSegmentStartTimesFromStart=function(c){var u,d,p=this.getRepresentationById(c),h=null==(d=null==(u=null==p?void 0:p.SegmentList)?void 0:u[0])?void 0:d.SegmentURL;if(p&&null!=h&&h.length){var f=h.length-1,m=(0,O.toSeconds)(p._requestTimestamp)-h[f]._duration;this.context.logger.debug("Initializing segment start times with start time of last segment ".concat(m),c),this.WD.dispatch((0,U.initPlaybackTimesFromIndex)(c,f,m))}else this.context.logger.debug("Failed to initialize segment start times, no segments found",c)},u.prototype.hasSegmentStartTimeForHlsRepresentation=function(c){var u,d,p,h=this.getRepresentationById(c);return(null==(p=null==(d=null==(u=null==h?void 0:h.SegmentList)?void 0:u[0])?void 0:d.SegmentURL[0])?void 0:p._playbackTime)!==void 0},u.prototype.getStartTimeForHlsSegment=function(c,u){var d,p,h,f,m,g=this.getRepresentationById(c),v=null!=(h=null==(p=null==(d=null==g?void 0:g.SegmentList)?void 0:d[0])?void 0:p.SegmentURL)?h:[],y=(0,B.findSegmentUrlIndexWithinSegmentList)(u,v);return -1!==y&&void 0!==v[y]._playbackTime?v[y]._playbackTime:null!=(m=null==(f=this.getFirstPeriod())?void 0:f.start)?m:void 0},u.prototype.isTimeNearPeriodEnd=function(c,u,d){var p=this.findPeriod(u),h=null==p?void 0:p.start;if(void 0===h)return!1;
vendor: 8,564 bytes, line 14
14var f=h+this.getPeriodDuration(p._id,this.getAllPeriods());return c>=h&&c<=f&&f-c<=d},u}(A.Suspendable);function Y(c){var u;return(c=f({},c)).Period=null==(u=c.Period)?void 0:u.map(function(c){var u;return f(f({},c),{AdaptationSet:null==(u=c.AdaptationSet)?void 0:u.map(function(u,d){var p,h=(0,H.createAdaptationSetIdFromMimeTypeAndIndex)(c._id,u._mimeType,d);return f(f({},u),{_internalId:h,_periodId:c._id,Representation:null==(p=u.Representation)?void 0:p.map(function(c){return f(f({},c),{_internalId:new W.RepresentationId(h,c._id)})})})})})}),c}function X(c){if(L.ModuleManager.has(N.ModuleName.DRM)){var u=L.ModuleManager.get(N.ModuleName.DRM).ContentProtectionHelper.getFirstKeyId;Q(c,function(c){for(var d=u(c.ContentProtection),p=0;c.Representation&&p<c.Representation.length;p++){var h=c.Representation[p];(d||h.ContentProtection)&&(h.associatedKid=h.ContentProtection&&u(h.ContentProtection)||d)}})}}function Q(c,u){for(var d=0;c.Period&&d<c.Period.length;d++)for(var p=c.Period[d],h=0;p.AdaptationSet&&h<p.AdaptationSet.length;h++)u(p.AdaptationSet[h])}function Z(c,u){if(c&&c.length){if(u<c[0].start)return c[0];var d=c[c.length-1];return u>=d.start?d:function(c,u){for(var d=c.length-1;d>=0;d--){var p=c[d].start+c[d].duration;if(u>=c[d].start&&u<p)return c[d];if(u>=p&&u<c[d+1].start)return c[d+1]}}(c,u)||d}}function J(c,u,d){void 0===d&&(d=function(){return!0});var p,h=c.filter(d),f=h.filter(function(c){return c._bandwidth===u});return f.length>0?f:(p=h.map(function(c){return c._bandwidth}).reduce(function(c,d){return Math.abs(d-u)<Math.abs(c-u)?d:c}),h.filter(function(c){return c._bandwidth===p}))}function $(c,u,d){void 0===c&&(c=[]),void 0===d&&(d=function(){return!0});var p=c.filter(d),h=null,f=-1/0;return p.forEach(function(c){c._bandwidth>f&&c._bandwidth<=u&&(f=c._bandwidth,h=c)}),h||p[0]}function ee(c,u,d){var p=d?"videoCodecPriority":"audioCodecPriority";return null!=u&&u.options&&u.options[p]?u.options[p]:c.playback&&c.playback[p]?c.playback&&c.playback[p]:[]}function et(c,u){return{video:ee(c,u,!0),audio:ee(c,u,!1)}}function ei(c){var u=(0,V.getCodecsFromAdaptationSet)(c);if(!u||0===u.length)return null;var d=R.CodecStringHelper.getExtractedCodecStrings(u),p=c._mimeType.split("/")[0];return d[p]?R.CodecStringHelper.extractCodec(d[p]):null}function en(c){return c.reduce(function(c,u){return c[u._id]=u.AdaptationSet.map(function(c){return c._mimeType}).filter(function(c,u,d){return x.MimeTypeHelper.isAV(c)&&d.indexOf(c)===u}),c},{})}u.ManifestService=K},38568:function(c,u,d){var p,h,f,m,g,v,y=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)}),b=this&&this.__runInitializers||function(c,u,d){for(var p=arguments.length>2,h=0;h<u.length;h++)d=p?u[h].call(c,d):u[h].call(c);return p?d:void 0},S=this&&this.__esDecorate||function(c,u,d,p,h,f){function m(c){if(void 0!==c&&"function"!=typeof c)throw TypeError("Function expected");return c}for(var g,v=p.kind,y="getter"===v?"get":"setter"===v?"set":"value",b=!u&&c?p.static?c:c.prototype:null,S=u||(b?Object.getOwnPropertyDescriptor(b,p.name):{}),_=!1,E=d.length-1;E>=0;E--){var T={};for(var w in p)T[w]="access"===w?{}:p[w];for(var w in p.access)T.access[w]=p.access[w];T.addInitializer=function(c){if(_)throw TypeError("Cannot add initializers after decoration has completed");f.push(m(c||null))};var P=(0,d[E])("accessor"===v?{get:S.get,set:S.set}:S[y],T);if("accessor"===v){if(void 0===P)continue;if(null===P||"object"!=typeof P)throw TypeError("Object expected");(g=m(P.get))&&(S.get=g),(g=m(P.set))&&(S.set=g),(g=m(P.init))&&h.unshift(g)}else(g=m(P))&&("field"===v?h.unshift(g):S[y]=g)}b&&Object.defineProperty(b,p.name,S),_=!0};Object.defineProperty(u,"__esModule",{value:!0}),u.ManifestUpdateScheduler=void 0,u.initializeManifestUpdateSchedulingService=function(c,u){var d,p=c.serviceManager,h=u.sourceIdentifier;if(p.has(E.ServiceName.ManifestUpdateSchedulingService,h))null==(d=p.get(E.ServiceName.ManifestUpdateSchedulingService,h))||d.restore();else{var f=new O(c,u);p.set(E.ServiceName.ManifestUpdateSchedulingService,f,h)}},u.isRepresentationUpToDate=D;var _=d(3336),E=d(80813),T=d(77401),w=d(69957),P=d(85648),A=d(93204),I=d(88847),M=d(85434),R=d(89927),k=d(59707),x=d(22059),C=d(63147),O=(f=I.Suspendable,m=[],h=function(c){function u(u,d){var p=c.call(this,{onSuspend:function(){return p.tE()},onRestore:function(){return p.uE()}})||this;p.OE=b(p,m),p.WE=!1,p.XE={},p.cE=function(c){return null==c?void 0:c.activeTracks},p.dE=function(c){c&&p.QE.isHlsManifest()&&p.eE(c)},p.iE=function(c){return c.player&&c.player.playbackState},p.jE=function(c){c&&(c===P.PlaybackState.Paused?p.rE():c===P.PlaybackState.Playing&&p.sE())},p.mE=function(c){p.oE(c),p.QE.updateManifest(p.QE.getManifest()).catch(function(){p.VE.debug("Updating the manifest failed")})},p.nE=function(c,u){if(p.VE.debug("Rejection while updating the representation",c),c===T.RequestError.Failed||c===T.RequestError.TimedOut||c instanceof _.PlayerError){var d=c instanceof _.PlayerError?c.name:c;p.TE.dispatch((0,k.updateRepresentationFailedDownloadAction)(u._internalId,d)),p.QE.updateManifest(p.QE.getManifest()).catch(function(c){p.VE.debug("Error while updating the manifest after the representation failed to load",c)})}},p.pE=function(){p.VE.debug("Error while loading manifest")},p.OE=u,p.PE=d;var h=p.PE.sourceIdentifier;return p.QE=u.serviceManager.get(E.ServiceName.ManifestService,h),p.RE=u.serviceManager.get(E.ServiceName.ManifestLoadingService,h),p.SE=u.store,p.TE=u.serviceManager.get(E.ServiceName.SourceStoreService,h),p.UE=u.eventHandler,p.VE=u.logger,p.ZE=p.bE(),p.aE=p.hE(u),p}return y(u,c),u.prototype.bE=function(){var c=this;return(0,A.subscribe)(this.TE)(function(u){return c.cE(u)},this.dE)},u.prototype.eE=function(c){this.fE(c),this.gE(c)},u.prototype.fE=function(c){var u=this;Object.keys(c).filter(function(u){return c[u].selectedRepresentationId}).forEach(function(d){u.kE(c[d].selectedRepresentationId)})},u.prototype.gE=function(c){var u=this;Object.keys(this.XE).filter(function(u){return!Object.keys(c).includes(u)}).forEach(function(c){u.XE[c].stop(),delete u.XE[c]})},u.prototype.hE=function(c){return(0,A.subscribe)(this.SE)(this.iE,this.jE,function(){return c.settings.STOP_DOWNLOAD_ON_PAUSE})},u.prototype.kE=function(c){var u=this.QE.getRepresentationById(c),d=c.adaptationSetId;u?this.XE[d]?this.XE[d].getRepresentation()._internalId.equals(c)||this.XE[d].setRepresentation(u):this.XE[u._internalId.adaptationSetId]=this.lE(u):this.VE.debug("[ManifestUpdateScheduler] Representation not found for update: ".concat(c.representationId," (adaptationSet: ").concat(d,", periodId: ").concat(c.periodId,")"))},u.prototype.stopRepresentationUpdates=function(c){var u,d=this.XE[c._internalId.adaptationSetId];return null!=(u=null==d?void 0:d.stopRepresentationUpdate(c))?u:Promise.resolve()},u.prototype.scheduleRepresentationUpdate=function(c){var u=this.XE[c._internalId.adaptationSetId];null==u||u.setRepresentation(c),null==u||u.start()},u.prototype.lE=function(c){var u=this,d=new C.RepresentationUpdater(this.OE,c,this.RE,{success:this.mE,error:function(c){return u.nE(c,d.getRepresentation())}});return M.MimeTypeHelper.isAV(c._mimeType)||d.setRepresentation(c),d.start(),d},u.prototype.oE=function(c){this.TE.dispatch((0,k.updateRepresentationAction)(c))},u.prototype.init=function(c){var u=this;return this.RE.load(c).then(function(c){return u.QE.updateManifest(c).then(function(){u.WE=!0,u.QE.isLive()&&!u.QE.isHlsManifest()&&u.qE(c)})}).catch(function(c){return c instanceof _.PlayerError||c instanceof Error?Promise.reject(c):Promise.reject(Error("The loading of the manifest has failed or was cancelled"))})},u.prototype.qE=function(c){var u=this;this.YE=new x.ManifestUpdater(this.OE,this.RE,c,{minAllowedUpdatePeriod:this.OE.settings.MINIMUM_ALLOWED_UPDATE_PERIOD,maxAllowedUpdatePeriod:this.OE.settings.MAXIMUM_ALLOWED_UPDATE_PERIOD},{success:function(c){return u.QE.updateManifest(c)},error:this.pE}),this.YE.start()},u.prototype.waitForRepUpdate=function(c){return 0===Object.keys(this.XE).length||D(this.QE.getRepresentationById(c))?Promise.resolve():this.XE[c.adaptationSetId].updateRepresentation().then(function(){})}
14,u.prototype.rE=function(){Object.values(this.XE).forEach(function(c){return c.stop()}),this.YE&&this.YE.stop()},u.prototype.sE=function(){Object.values(this.XE).filter(function(c){return c.isStopped}).forEach(function(c){c.start()}),this.YE&&this.YE.isStopped&&this.YE.start()},u.prototype.tE=function(){this.aE()},u.prototype.uE=function(){this.aE=this.hE(this.OE)},u.prototype.isInitiated=function(){return this.WE},u.prototype.dispose=function(){var u;this.ZE(),this.aE(),this.rE(),null==(u=this.YE)||u.dispose(),Object.values(this.XE).forEach(function(c){c.dispose()}),this.YE=null,this.XE=null,c.prototype.dispose.call(this)},u}(f),v="function"==typeof Symbol&&Symbol.metadata?Object.create(null!=(g=f[Symbol.metadata])?g:null):void 0,S(h,null,[(0,w.trackPerformance)("ManifestUpdateScheduler.init",!0)],{kind:"method",name:"init",static:!1,private:!1,access:{has:function(c){return"init"in c},get:function(c){return c.init}},metadata:v},null,m),v&&Object.defineProperty(h,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:v}),h);function D(c){var u;return!!c._requestTimestamp&&c._requestTimestamp+(0,R.toMilliSeconds)(null!=(u=c._updateInterval)?u:1/0)>Date.now()}u.ManifestUpdateScheduler=O},22059:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.ManifestUpdater=void 0;var f=d(14302),m=d(23940);u.ManifestUpdater=function(c){function u(u,d,p,h,f){var m=c.call(this,u,f)||this;return m.context=u,m.manifestLoader=d,m.manifest=p,m.settings=h,m}return h(u,c),u.prototype.getUpdatedManifest=function(){return this.getPayload()},u.prototype.update=function(){var c=this;return this.manifestLoader.load(this.manifest._currentLoadingUrl).then(function(u){return c.manifest=u,u})},u.prototype.getReloadIntervalInSeconds=function(){var c=(0,m.getMinimumUpdatePeriodInSeconds)(this.manifest);return isNaN(c)?this.settings.minAllowedUpdatePeriod:Math.min(this.settings.maxAllowedUpdatePeriod,Math.max(this.settings.minAllowedUpdatePeriod,c))},u.prototype.getLastReloadTimestamp=function(){return this.manifest._requestTimestamp},u}(f.AbstractUpdater)},90087:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.MediaPlayerManifestApiFactory=void 0;var p=d(80813),h=d(3714),f=d(16197);u.MediaPlayerManifestApiFactory=function(){function c(){}return c.create=function(u,d){var h=d.serviceManager.get(p.ServiceName.ManifestService,d.sourceContext.sourceIdentifier);return new function(){h.isHlsManifest()?this.hls=c.createHlsApi(h):h.isSmoothManifest()||(this.dash=c.createDashApi(u,h))}},c.createDashApi=function(u,d){return new(function(){function p(){}return p.prototype.getPeriod=function(){var p=d.getPeriodIdForTime(u.getCurrentTime()),h=d.getPeriod(new f.PeriodId(p));return h?c.createPeriodApi(d,h):null}
vendor: 4,912 bytes, line 14
14,p.prototype.listPeriods=function(){return d.getAllPeriods().map(function(u){return c.createPeriodApi(d,u)})},p}())},c.createHlsApi=function(u){return new(function(){function d(){this.properties=u.getHlsTags()}return d.prototype.getVideoTracks=function(){return c.getVideoTracks(u,u.getFirstPeriod()._id)},d.prototype.getAudioTracks=function(){return c.getAudioTracks(u,u.getFirstPeriod()._id)},d.prototype.getTextTracks=function(){return c.getTextTracks(u,u.getFirstPeriod()._id)},d}())},c.createPeriodApi=function(u,d){return new(function(){function p(){this.id=d._id,this.properties={},d._id&&(this.properties.id=d._id),d._start&&(this.properties.start=d._start),d._duration&&(this.properties.duration=d._duration)}return p.prototype.getVideoTracks=function(){return c.getVideoTracks(u,this.id)},p.prototype.getAudioTracks=function(){return c.getAudioTracks(u,this.id)},p.prototype.getTextTracks=function(){return c.getTextTracks(u,this.id)},p.prototype.getMetadata=function(){return c.getMetadata(u,this.id)},p}())},c.getAudioTracks=function(u,d){return u.getAvailableAudio(d,!1).map(function(p){var h={id:p.id,label:p.label,lang:p.lang,getQualities:function(){return c.getAudioQualities(u,d,p.id)}};return p.role&&(h.role=p.role),p.metadata&&(h.metadata=p.metadata),h})},c.getVideoTracks=function(u,d){return u.getAvailableVideo(d).map(function(p){var h={id:p.id,label:p.label,getQualities:function(){return c.getVideoQualities(u,d)}};return p.role&&(h.role=p.role),p.metadata&&(h.metadata=p.metadata),h})},c.getTextTracks=function(c,u){return c.getAvailableSubtitles(u)},c.getMetadata=function(c,u){return c.getEventStreamEvents(c.findPeriod(u)).map(function(c){return{type:h.MetadataType.EVENT_STREAM,payload:c.data,start:c.startTime,end:c.endTime}})},c.getAudioQualities=function(c,u,d){return c.getAudioRepresentations(u)[d]||[]},c.getVideoQualities=function(c,u){return c.getVideoRepresentations(u)},c}()},16197:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.PeriodId=void 0,u.PeriodId=function(){function c(c){this.ZJ=c}return Object.defineProperty(c.prototype,"periodId",{get:function(){return this.ZJ},enumerable:!1,configurable:!0}),c.prototype.equals=function(c){return null!=c&&this.periodId===c.periodId},c.prototype.key=function(){return this.periodId},c}()},79505:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.RepresentationId=void 0;var f=d(47151);u.RepresentationId=function(c){function u(u,d){var p=c.call(this,u.periodId,u.adaptationSetId)||this;return p.vc=d,p}return h(u,c),Object.defineProperty(u.prototype,"representationId",{get:function(){return this.vc},enumerable:!1,configurable:!0}),u.prototype.equals=function(u){return c.prototype.equals.call(this,u)&&this.representationId===(null==u?void 0:u.representationId)},u.prototype.key=function(){return c.prototype.key.call(this)+"-"+this.representationId},u.from=function(c){return c._representationId&&c._adaptationSetId&&c._periodId?new u(new f.AdaptationSetId(c._periodId,c._adaptationSetId),c._representationId):null},u}(f.AdaptationSetId)},63147:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.RepresentationUpdater=void 0;var f=d(88052),m=d(62756),g=d(60729),v=d(14302);u.RepresentationUpdater=function(c){function u(u,d,p,h){var f=c.call(this,u,h)||this;return f.context=u,f.representation=d,f.manifestLoader=p,f}return h(u,c),u.prototype.getRepresentation=function(){return this.representation},u.prototype.setRepresentation=function(c){this.representation._internalId.equals(c._internalId)||this.cancel(),this.representation=c,this.scheduleUpdate(!0)},u.prototype.updateRepresentation=function(){return this.getPayload()},u.prototype.stopRepresentationUpdate=function(u){return c.prototype.stop.call(this),this.manifestLoader.stopRepresentationUpdate(u)},u.prototype.update=function(){var c=this;return this.manifestLoader.updateRepresentation(this.representation).then(function(u){if(c.representation._id!==u._id
14)throw v.REPRESENTATION_UPDATE_CANCEL;return c.representation=u,u})},u.prototype.getReloadIntervalInSeconds=function(){var c,u;return this.representation._requestTimestamp?(0,g.isPlayingLowLatencyHls)(this.context)&&null!=(c=f.ModuleManager.get(m.ModuleName.HLS))&&c.canMakeBlockingPlaylistReload(this.representation,this.context.settings)?0:null!=(u=this.representation._updateInterval)?u:1/0:0},u.prototype.getLastReloadTimestamp=function(){return this.representation._requestTimestamp?this.representation._requestTimestamp:0},u}(v.AbstractUpdater)},99257:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.AdRestorationOptimizationService=void 0;var p=d(3714),h=d(91678),f=d(46151),m=d(94685),g=d(13422),v=d(80813),y=d(81524);u.AdRestorationOptimizationService=function(){function c(){var c=this;this.Gc=function(){(0,m.isContextAvailable)(c.xc)&&c.xc.eventHandler.off(p.PlayerEvent.AdStarted,c.Gc),c.Hc(c.Bc),c.Bc=[]}}return c.prototype.updatePlayerContext=function(c){this.wc=[],this.xc=c,this.yc=c.segmentInfoService,this.zc=c.segmentPrefetchingService,this.Ac=c.segmentCacheService,this.Dc()},c.prototype.Dc=function(){var c;null!=(c=this.xc)&&c.sourceContext&&!this.xc.sourceContext.isAd&&(this.Cc=this.xc.sourceContext)},c.prototype.optimizeRestorationAfterUpcomingAdBreak=function(){var c,u,d=this,h=null==(u=null==(c=this.Ec())?void 0:c.getState())?void 0:u.playback;if(!(0,m.isContextAvailable)(this.xc)||!this.yc||!h)return Promise.reject("Could not get playback state and/or SegmentInfoService");this.Dc();var f=(0,y.getPlaybackPosition)(h);return isNaN(f)?Promise.reject("Could not get playback position"):this.yc.getSegmentInfos(f,this.xc.settings.AD_RESTORATION_SEGMENT_PREFETCHING_DURATION).then(function(c){d.Fc(c),d.Bc=c,(0,m.isContextAvailable)(d.xc)&&d.xc.eventHandler&&d.xc.eventHandler.on(p.PlayerEvent.AdStarted,d.Gc)})},c.prototype.Ec=function(){return(0,m.isContextAvailable)(this.xc)?this.xc.serviceManager.get(v.ServiceName.SourceStoreService,this.xc.sourceContext.sourceIdentifier):void 0},c.prototype.Fc=function(c){var u=(0,m.isContextAvailable)(this.xc)?this.xc.sourceContext.sourceIdentifier:void 0,d=u?this.xc.serviceManager.get(v.ServiceName.ManifestService,u):void 0;d&&c.forEach(function(c){var u=d.getAdaptationSet(c.internalRepresentationId);u&&(c.codecs=(0,g.getCodecsFromAdaptationSet)(u))})},c.prototype.Hc=function(c){var u;this.wc=c.reduce(function(c,u){return u.mimeType&&!c.includes(u.mimeType)&&c.push(u.mimeType),c},[]),this.Ic(),this.Cc&&(null==(u=this.zc)||u.fetchAll(c,this.Cc))},c.prototype.hasPrefetchedSegment=function(c,u){var d,p;return(!(0,m.isContextAvailable)(this.xc)||!this.xc.sourceContext.isAd)&&!!this.Cc&&null!=(p=null==(d=this.Ac)?void 0:d.hasPrefetchedSegment(c,u,this.Cc))&&p},c.prototype.getPrefetchedSegment=function(c,u){var d,p;return this.Cc&&null!=(p=null==(d=this.Ac)?void 0:d.getPrefetchedSegment(c,u,this.Cc))?p:null},c.prototype.getRepresentationForPrefetchedSegment=function(c){var u;if(this.Cc)return null==(u=this.Ac)?void 0:u.getRepresentationForPrefetchedSegment(c,this.Cc)},c.prototype.Ic=function(){var c=this;if((0,m.isContextAvailable)(this.xc)){var u=this.xc.store.getState();if(0!==this.wc.length&&u){var d=(0,f.getMetricsState)(u);this.wc.forEach(function(u){d[u]||c.xc.store.dispatch((0,h.initializeMetricsForMimeType)(u,c.xc.settings))})}}},c.prototype.reset=function(){(0,m.isContextAvailable)(this.xc)&&this.xc.eventHandler.off(p.PlayerEvent.AdStarted,this.Gc),this.wc=[],this.Bc=[]},c.prototype.dispose=function(){this.reset(),this.yc=void 0,this.zc=void 0,this.Ac=void 0},c}()},17382:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.calculateDownloadRates=function(c){return c.map(function(c){return(0,p.bytesToBits)(c.bytes)/c.downloadDuration}).filter(function(c){return c<1/0})},u.filterValuesExceedingAverageByMargin=function(c){var u=1.1*h(c);return c.filter(function(c){return c<=u})},u.calcAverage=h,u.bpsToMbps=function(c){return c/1024/1024};var p=d(33004);function h(c){return c.reduce(function(c,u){return c+u},0)/c.length}}
14,49440:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.resolveContainerFormat=function(c,u,d){var g,y,b;return d?(y=h.ModuleManager.has(f.ModuleName.ContainerMP4),b=null==(g=h.ModuleManager.get(f.ModuleName.ContainerMP4,!1))?void 0:g.isValidMp4,y&&b(u)?{source:m.ContainerFormat.MP4,target:m.ContainerFormat.MP4}:p.MimeTypeHelper.isSubtitle(c)?v(c):{source:m.ContainerFormat.TS,target:m.ContainerFormat.MP4}):v(c)};var p=d(85434),h=d(88052),f=d(62756),m=d(34795),g=d(14443);function v(c){var u=(0,g.extractContainerFormat)(c);return u?{source:u,target:u}:void 0}},23133:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.addEncryptionKeyToStore=function(c,u,d){return(0,m.getEncryptionKey)(d.getState(),c)?d.dispatch((0,f.updateEncryptionKey)({uri:c,key:void 0,loadState:g.KeyLoadState.Loading})):d.dispatch((0,f.addEncryptionKey)({uri:c,key:void 0,loadState:g.KeyLoadState.Loading})),u.load(c).then(function(u){var p;return null==d||d.dispatch((0,f.updateEncryptionKey)({uri:c,key:h.FormatHelper.bytesToHex(u),loadState:g.KeyLoadState.Loaded})),(p=(0,m.getAllEncryptionKeys)(d.getState()))&&p.length>v&&d.dispatch((0,f.removeEncryptionKey)(p[0].uri)),u}).catch(function(u){return null==d||d.dispatch((0,f.updateEncryptionKey)({uri:c,key:void 0,loadState:g.KeyLoadState.Cancel})),Promise.reject(u)})},u.waitForKeyToBeLoaded=function(c,u){return new Promise(function(d,f){var v=(0,p.subscribe)(c)(function(c){return(0,m.getEncryptionKey)(c,u)},function(c){return c.loadState===g.KeyLoadState.Cancel?(v(),f(Error("Encryption key load cancelled!"))):c.loadState===g.KeyLoadState.Loaded&&c.key?(v(),d(h.FormatHelper.hexToBytes(c.key).buffer)):void 0})})};var p=d(93204),h=d(70233),f=d(51386),m=d(66628),g=d(92096),v=20},88618:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.FetchController=void 0;var f,m=d(77401),g=d(43446),v=d(29669),y=d(34841),b=d(88844),S=d(97587);(p=f||(f={})).User="user",p.Timeout="timeout",u.FetchController=function(){function c(c,u,d,p){var f=this;this.useStreamResponse=p,this.setProgressListener=function(c){f.Sc=c},this.bc=function(c){f.Sc&&(f.Rc.progressTimestamp=g.TimingUtil.getHiResTimestamp(),f.Tc.loadedBytes=c,f.Sc(h({},f.Tc)))},this.cc=function(){(0,b.clearTimeoutIfDefined)(f.Oc)},this.Jc=c.logger,this.Kc=d,this.Mc=u,this.Nc=new y.Deferred,this.Qc=0,this.Rc={sendTimestamp:-1,openedTimestamp:-1,headersReceivedTimestamp:-1,progressTimestamp:-1,doneTimestamp:-1},this.Lc=new AbortController,this.Tc={loadedBytes:0,url:u.url,responseTiming:this.Rc,chunks:[],elapsedTime:0}}return c.prototype.getResponse=function(){return this.Uc(this.Mc),this.Nc.promise},c.prototype.cancel=function(c){void 0===c&&(c=f.User),(0,b.clearTimeoutIfDefined)(this.Oc),this.Pc=c,this.Lc.abort()},c.prototype.Uc=function(c){var u,d,p=this,y={method:c.method,headers:new Headers(c.headers),credentials:c.credentials,signal:this.Lc?this.Lc.signal:void 0,body:(u=c.method,[v.HttpRequestMethod.GET,v.HttpRequestMethod.HEAD].includes(u))?void 0:c.body};this.Rc.sendTimestamp=g.TimingUtil.getHiResTimestamp(),fetch(c.url,y).then(function(c){var u;if(p.Rc.headersReceivedTimestamp=g.TimingUtil.getHiResTimestamp(),null==(u=p.Sc)||u.call(p,h({},p.Tc)),c.ok){var d=p.Wc(c);p.Yc(c).then(function(c){d.body=c,d.length=p.Qc,d.timeToFirstByte=p.Rc.headersReceivedTimestamp-p.Rc.sendTimestamp,p.Rc.doneTimestamp>0&&(d.elapsedTime=p.Rc.doneTimestamp-p.Rc.sendTimestamp),p.Nc.resolve(d)}).catch(function(u){p.dc({error:u.message,response:p.Wc(c)})})}else p.dc({error:m.RequestError.Failed,response:p.Wc(c)})}).catch(function(c){p.dc({error:p.Xc(c)})}),this.Rc.openedTimestamp=g.TimingUtil.getHiResTimestamp(),null==(d=this.Sc)||d.call(this,h({},this.Tc)),this.Oc=window.setTimeout(function(){return p.cancel(f.Timeout)},this.Kc)},c.prototype.Vc=function(c){var u={};return c.headers.forEach(function(c,d){return u[d]=c}),u},c.prototype.Wc=function(c){return{request:this.Mc,url:c.url,headers:this.Vc(c),status:c.status,statusText:c.statusText}},c.prototype.Xc=function(c){return this.Jc.debug("fetch error",c),c instanceof Error&&"AbortError"===c.name?this.Pc===f.User?m.RequestError.Canceled:m.RequestError.TimedOut:m.RequestError.Failed},c.prototype.Yc=function(c){var u=this;if(c.body&&this.useStreamResponse){var d=new S.Stream,p=this.Rc.headersReceivedTimestamp;return this.Zc(c,function(c){var h=g.TimingUtil.getHiResTimestamp(),f=h-p;p=h,u.Tc.chunks.push({downloadDuration:f,bytes:c.byteLength});var m=c instanceof Uint8Array?c.buffer:c;d.add(m)}).then(function(){d.end(),u.cc()}).catch(function(c){u.Jc.debug("Error reading of fetch response:",c),d.abort(u.Xc(c))}),Promise.resolve(d)}var h=c.headers.get("Content-Length"),f=h?parseInt(h):0;return this.Tc.totalBytes=f,this.Zc(c.clone()).catch(function(c){u.Jc.debug("Error reading of fetch response:",c)}),this.ac(c).then(function(c){return u.Qc=f,u.Rc.doneTimestamp=g.TimingUtil.getHiResTimestamp(),u.cc(),c})},c.prototype.Zc=function(c,u){var d=this;if(!c.body)return Promise.reject(Error("response.body is null"));var p=c.body.getReader(),h=function(){return p.read().then(function(c){var p=c.done,f=c.value;return p?(d.Rc.doneTimestamp=g.TimingUtil.getHiResTimestamp(),void d.bc(d.Qc)):f?(null==u||u(f),d.Qc+=f.byteLength,d.bc(d.Qc),h()):void 0})};return h()},c.prototype.ac=function(c){switch(this.Mc.responseType){case v.HttpResponseType.ARRAYBUFFER:return c.arrayBuffer();case v.HttpResponseType.TEXT:return c.text();case v.HttpResponseType.JSON:return c.json();default:return Promise.reject(Error("Unsupported response type on fetch request"))}},c.prototype.dc=function(c){(0,b.clearTimeoutIfDefined)(this.Oc),this.Jc.debug("Error performing fetch: ".concat(c.error),c.response),this.Nc.reject(c)},c}()}
14,94618:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.KeyLoader=void 0;var p=d(40306),h=d(3336),f=d(4129),m=d(77401),g=d(29669);u.KeyLoader=function(){function c(c){this.l5=c,this.m5=c.settings,this.o5=c.sourceContext.sourceIdentifier,this.n5=new f.DefaultContentLoader(this.l5,{maxRetries:this.m5.MAX_RETRIES,retryDelay:this.m5.RETRY_DELAY,requestType:g.HttpRequestType.KEY_HLS_AES})}return c.prototype.p5=function(){var c=this.l5.sourceContext.source&&this.l5.sourceContext.source.hasOwnProperty("options")&&this.l5.sourceContext.source.options,u=c&&c.hasOwnProperty("withCredentials")&&c.withCredentials,d=c&&c.hasOwnProperty("hlsWithCredentials")&&c.hlsWithCredentials;return!!u||!!d},c.prototype.load=function(c){var u=this;return this.n5?this.n5.load(c,g.HttpRequestMethod.GET,g.HttpResponseType.ARRAYBUFFER,void 0,void 0,this.p5()).then(function(c){return c.body}).catch(function(d){if(d.message===m.RequestError.Canceled)return Promise.reject(d);var f=new h.PlayerError(p.ErrorCode.DRM_FAILED_LICENSE_REQUEST,{statusCode:d.status,statusText:d.statusText,keyUrl:c},"Failed to load the DRM key: ".concat(d.status," ").concat(d.statusText,"."),u.o5);return u.l5.eventHandler.fireError(f),Promise.reject(f)}):Promise.reject("Could not load: No loader.")},c.prototype.isLoading=function(){return!!this.n5&&this.n5.isLoading()},c.prototype.dispose=function(){this.n5&&"function"==typeof this.n5.dispose&&this.n5.dispose(),this.n5=void 0,this.m5=void 0},c}()},689:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.getLoaderConfig=function(c,u){var d,p;return null!=(d=c.config.tweaks)&&d.segmentLoaderArgs?c.config.tweaks.segmentLoaderArgs:{maxRetries:c.settings.MAX_CDN_RETRIES,requestType:(p=u,f.MimeTypeHelper.isVideo(p)?h.HttpRequestType.MEDIA_VIDEO:f.MimeTypeHelper.isAudio(p)?h.HttpRequestType.MEDIA_AUDIO:f.MimeTypeHelper.isSubtitle(p)?h.HttpRequestType.MEDIA_SUBTITLES:f.MimeTypeHelper.isUnknown(p)?h.HttpRequestType.INTERNAL:h.HttpRequestType.UNKNOWN),disableDownloadTimeout:!0,resetRetriesWhenOffline:!0}},u.getLoader=function(c,u){var d,h=null==(d=c.config.tweaks)?void 0:d.segmentLoader;return h&&"function"==typeof h?new h(u):new p.DefaultContentLoader(c,u)};var p=d(4129),h=d(29669),f=d(85434)},54053:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.SegmentInfoError=void 0,(p=d||(u.SegmentInfoError=d={})).END_OF_STREAM_REACHED="END_OF_STREAM_REACHED",p.PERIOD_COMPLETE="PERIOD_COMPLETE",p.SEGMENT_EXCEEDING_PERIOD_DURATION="SEGMENT_EXCEEDING_PERIOD_DURATION"},86219:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.MPDHandlerFactory=void 0;var p=d(80813),h=d(79721),f=d(88052),m=d(62756),g=d(63066);u.MPDHandlerFactory=function(){function c(){}return c.createInstance=function(c,u,d,v,y){void 0===v&&(v=h.DEFAULT_PERIOD_ID);var b,S=c.serviceManager.get(p.ServiceName.ManifestService,u.sourceIdentifier);if(!(null!=S&&S.hasAdaptationSets(v)))return null;var _=S.findAdaptationSet(v,d,y);if(!_)return c.logger.debug("Did not find adaptation set for mime type [".concat(d,"] in period ").concat(v)),null;var E=_.Representation&&_.Representation[0],T=E&&E.SegmentTemplate?E.SegmentTemplate:_.SegmentTemplate;if(S.isSmoothManifest()){var w=c.serviceManager.get(p.ServiceName.ManifestLoadingService,u.sourceIdentifier);return w?T?new(f.ModuleManager.get(m.ModuleName.Smooth).createSmoothSegmentTemplateMPDHandler())(c,u,d,w):null:null}return S.isHlsManifest()?E.SegmentList?new g.SegmentListMPDHandler(c,u):null:(b=f.ModuleManager.get(m.ModuleName.DASH),T&&T[0].SegmentTimeline?new b.SegmentTimelineMPDHandler(c,u):T?new b.SegmentTemplateMPDHandler(c,u):E.SegmentList?new g.SegmentListMPDHandler(c,u):E.SegmentBase?new b.SegmentBaseMPDHandler(c,u):null)},c}()},34810:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.throwPlaylistDownloadError=function(c,u,d,g){if(c.logger.debug(u),g instanceof h.PlayerError)c.eventHandler.fireError(g);else if(g&&Object.keys(p.ErrorCode).includes(g)){var v=p.ErrorCode[g];c.eventHandler.fireError(new h.PlayerError(v,m(d),u,c.sourceContext.sourceIdentifier))}else g!==f.RequestError.TimedOut?c.eventHandler.fireError(new h.PlayerError(p.ErrorCode.SOURCE_COULD_NOT_LOAD_MANIFEST,m(d),u,c.sourceContext.sourceIdentifier)):c.eventHandler.fireError(new h.PlayerError(p.ErrorCode.NETWORK_MANIFEST_DOW
vendor: 7,620 bytes, line 14
14NLOAD_TIMEOUT,m(d),"Failed to load the segment: the request timed out.",c.sourceContext.sourceIdentifier))};var p=d(40306),h=d(3336),f=d(77401);function m(c){return{url:null==c?void 0:c.Uri,mimeType:null==c?void 0:c._mimeType,codecs:null==c?void 0:c._codecs,bitrate:null==c?void 0:c._bandwidth}}},37641:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.SegmentCache=void 0,u.areSegmentsIdentical=f;var p=d(74853),h=d(19541);function f(c,u){return(c.isInitSegment?["url","periodId","byteRange","representationId"]:["url","periodId","byteRange","discontinuitySequenceNumber"]).every(function(d){return"object"==typeof c[d]?(0,h.compareValues)(c[d],u[d]):c[d]===u[d]})}u.SegmentCache=function(){function c(c){this.iJ=Math.max(0,c),this.jJ=[]}return c.prototype.contains=function(c){return this.jJ.some(function(u){return f(c.getSegmentInfo(),u.getSegmentInfo())})},c.prototype.kJ=function(c){this.jJ=0!==c?this.jJ.slice(-c):[]},c.prototype.add=function(c){this.contains(c)||(this.jJ.push(c),this.kJ(this.iJ))},c.prototype.get=function(c){return this.jJ.find(function(u){return f(c,u.getSegmentInfo())})},c.prototype.clear=function(){this.kJ(0)},c.prototype.remove=function(c){this.jJ=this.jJ.filter((0,p.invert)(c))},c.prototype.getCapacity=function(){return this.iJ},c.prototype.getCachedCount=function(){return this.jJ.length},c.prototype.getCachedSegments=function(){return this.jJ.slice(0)},c}()},48514:function(c,u){function d(c,u){var d=[];return c.forEach(function(c){return d.push(u(c))}),d}Object.defineProperty(u,"__esModule",{value:!0}),u.SegmentCacheService=void 0,u.SegmentCacheService=function(){function c(){}return c.prototype.updatePlayerContext=function(c){this.ec=c.segmentPrefetchingService},c.prototype.hasPrefetchedSegment=function(c,u,d){var p=c;return"string"==typeof c&&(p=this.fc(c,u,d)),!(!p||"string"==typeof p||!this.ec)&&!!this.ec.getPrefetchedSegment(p,d)},c.prototype.getPrefetchedSegment=function(c,u,d){var p=this;if(!this.ec||!c.mimeType)return null;var h=this.ec.getPrefetchedSegment(c,d);return this.ec.clearPrefetchingQueue(c.mimeType,d),h&&(this.ec.removePrefetchedSegment(c,d),this.ec.setShouldDownloadBeCancelledCallback(c.mimeType,u,d),h.catch(function(){}).finally(function(){p.ec&&c.mimeType&&p.ec.removeShouldDownloadBeCancelledCallback(c.mimeType,d)})),h},c.prototype.getRepresentationForPrefetchedSegment=function(c,u){var p,h,f=null==(h=null==(p=this.ec)?void 0:p.getPrefetchedSegments(u))?void 0:h.get(c);if(f)return d(f,function(c){return c.segmentInfo.internalRepresentationId}).find(Boolean)},c.prototype.fc=function(c,u,p){var h,f,m=null==(f=null==(h=this.ec)?void 0:h.getPrefetchedSegments(p))?void 0:f.get(c);if(m)return d(m,function(c){return c.segmentInfo}).find(function(c){if((null==u?void 0:u.segmentNumber)==null||(null==u?void 0:u.startTime)==null||(null==u?void 0:u.duration)==null)return!0;var d=u.segmentNumber+1,p=Math.round(u.startTime+u.duration),h=c.segmentNumber===d,f=null!=c.startTime&&Math.round(c.startTime)===p;return h||f})},c.prototype.dispose=function(){this.ec=void 0},c}()},14443:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},h=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.SegmentController=void 0,u.getSegmentManager=ed,u.extractContainerFormat=ep;var f=d(66790),m=d(40306),g=d(3336),v=d(25926),y=d(4224),b=d(80813),S=d(56481),_=d(3714),E=d(13531),T=d(77401),w=d(98714),P=d(49859),A=d(91678),I=d(46151),M=d(33436),R=d(15971),k=d(93204),x=d(94685),C=d(34047),O=d(85434),D=d(15014),L=d(89927),N=d(23068),U=d(58313),F=d(88052),B=d(62756),j=d(95880),H=d(34795),V=d(13422),z=d(23940),q=d(84696),W=d(3095),G=d(19627),K=d(36193),Y=d(44115),X=d(59707),Q=d(88935),Z=d(39523),J=d(99529),$=d(60729),ee=d(49440),et=d(73794),ei=d(86219),en=d(34810),er=d(37641),eo=d(50429),ea=d(65439),es=d(65244),el=d(98892),ec=d(25902);function eu(c,u){var d=(0,ea.getSegmentInfoTimeRange)(c),p=(0,J.getTrackIdentifier)(c);d&&(null==u||u.dispatch((0,Z.removeStreamTimeRange)(p,d,J.StreamTimeRangeType.Loading)))}function ed(c,u,d,p,h,f){var m=c.serviceManager.get(b.ServiceName.AdaptationService),g=c.serviceManager.get(b.ServiceName.ManifestService,u.sourceIdentifier),v=function(u,p){var f=!!(null!=m&&m.shouldDownloadBeCancelled(d,u,p));return null!=g&&g.isHlsManifest()&&h.possiblyDependentSegments&&f?(c.logger.debug("Download should be cancelled, but this is disabled for segments not starting with key frames"),!1):f};return c.serviceManager.maybeCall(b.ServiceName.SegmentService,function(c){return c.add({mimeType:d,shouldDownloadBeCancelledCallback:v},p,f)})}function ep(c){var u=c.split("/")[1].toLowerCase();return Object.values(H.ContainerFormat).find(function(c){return c===u})}function eh(c,u,d){if(c&&(0,x.isContextAvailable)(u))return u.serviceManager.maybeCall(b.ServiceName.ManifestService,function(u){return u.getRepresentationById(c)},void 0,d.sourceIdentifier)}u.SegmentController=function(){function c(c,u,d,p,h,m,g,v){var y=this;if(this.context=c,this.onDataAvailableCallback=u,this.mimeType=d,this.manifestLoader=m,this.gc=F.ModuleManager.get(B.ModuleName.HLS,!1),this.mc={},this.nc=[],this.hasDownloadError=!1,this.tc=!1,this.Id=!1,this.Jd=!1,this.Sd=[],this.jd=function(c){if((0,x.isContextAvailable)(y.context)){var u="Error obtaining ".concat(y.mimeType," segment info");y.pc&&y.pc===c?y.Td.insane(u,c):y.Se(u,c),y.pc=c}},this.qd=function(c){y.Se("Error in cancelLoading of segmentLoaderPool ",c)},this.getNext=function(c,u){var d,p=!(null!=(d=y.Wd)&&d.canLoad())||y.Fd||y.hasActiveTransmuxingJobs()||y.Jd||y.Ye();if(y.kc&&!p){y.Se("Getting next segment for time ".concat(c));var h={periodId:y.sc,recommendedRepresentationId:u,time:c};y.fd(h).then(function(c){return y.Qe(c)}).catch(y.jd)}},this.Ad=function(c){y.hasDownloadError=!1,y.wd(c);var u=y.xd(c);if(u!==f.SegmentVerificationResult.Drop){if(u!==f.SegmentVerificationResult.Park)if(y.isTransmuxerRequired()){var d=c.getSegmentInfo();d.presentationTimeOffset&&isNaN(d.presentationTimeOffset)&&(y.jc.setTimestampOffset(0),d.presentationTimeOffset=0),y.vd(c)}else{var p=!1;y.kc&&y.Wd&&(p=y.qc.onSegmentAvailable(c,{id3:[],closedCaptions:[]},y.kc,y.Wd)),p||eu(c.getSegmentInfo(),y.Rd),c.getMimeType().indexOf("mp4")>-1&&!y.qe()&&(y.oc=c.isLastSegment())}}else eu(c.getSegmentInfo(),y.Rd)},this.je=function(c,u){var d,p=!!(null!=(d=y.Od)&&d.shouldDownloadBeCancelled(y.mimeType,c,u));return y.qe()&&y.Nd.possiblyDependentSegments&&p?(y.Se("Download should be cancelled, but this is disabled for segments not starting with key frames"),!1):p},this.Qd=c.sourceContext,this.sc=g,this.Rd=v,this.hc=c.serviceManager.get(b.ServiceName.ManifestUpdateSchedulingService,this.Qd.sourceIdentifier),this.Gd=new G.SegmentUnavailabilityHandler(this.context),this.Od=this.context.serviceManager.get(b.ServiceName.AdaptationService),this.Pd=this.context.serviceManager.get(b.ServiceName.StreamTimeService),this.Nd={isTransmuxingRequired:h&&!this.Xd,transmuxer:void 0,possiblyDependentSegments:!1,isAvMuxedTogether:(0,C.isAVMuxedTogether)(p),discardNextSegment:!1,muxedAudioTrackIndex:0},this.Pe()){var S=this.Oe();this.Nd.isTransmuxingRequired=S.source!==S.target}this.ne()}return Object.defineProperty(c.prototype,"Td",{get:function(){return this.context.logger}
14,enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"Ud",{get:function(){return this.context.settings},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"Vd",{get:function(){return this.context.eventHandler},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"Wd",{get:function(){return ed(this.context,this.Qd,this.mimeType,this.ic,this.Nd,this.Kd)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"Xd",{get:function(){return O.MimeTypeHelper.isSubtitle(this.mimeType)},enumerable:!1,configurable:!0}),c.prototype.Yd=function(c){var u,d=this.Zd();if(d){var p=null==(u=this.Od)?void 0:u.getUserSelectedRepresentation(this.mimeType,this.kc,c);return p?(this.Vd.dispatchEvent(d,{representationID:p._internalId.representationId}),p._internalId):void this.Vd.dispatchEvent(d,{representationID:c.representationId})}},c.prototype.Zd=function(){return O.MimeTypeHelper.isAudio(this.mimeType)?_.PlayerEvent.AudioAdaptation:O.MimeTypeHelper.isVideo(this.mimeType)?_.PlayerEvent.VideoAdaptation:null},c.prototype.ad=function(){var c;if(null!=(c=this.context.segmentCacheService)&&c.hasPrefetchedSegment(this.mimeType,this.Ed,this.Qd))return this.context.segmentCacheService.getRepresentationForPrefetchedSegment(this.mimeType,this.Qd)},c.prototype.bd=function(c){if(!this.jc.canSwitchRepresentation(c.time)&&this.lc)return this.lc;var u=this.ad();if(u)return u;var d=this.Rd.getState(),p=!!d&&!!(0,P.getPreferredBitrate)((0,P.getAdaptationState)(d),this.mimeType),h=this.cd(),f=c.recommendedRepresentationId,m=(null==f?void 0:f.periodId)===this.getCurrentPeriodId();f&&m&&!p&&(h=f);var g=h?this.Yd(h):void 0;return g?(this.Id=!0,g):h},c.prototype.cd=function(){var c,u,d={hlsDependentSegments:this.Nd.possiblyDependentSegments,segmentDuration:this.jc.getSegmentDuration()};return null==(c=this.Od)?void 0:c.selectRepresentation(this.mimeType,d,null==(u=this.getCurrentAdaptationSet())?void 0:u.Representation)},c.prototype.dd=function(c){var u=this.lc?this.lc.representationId:null;this.Se("switching representation from ".concat(u," to ").concat(c.representationId)),this.jc.setRepresentationId(c),this.lc=c},c.prototype.invalidateOngoingRequests=function(){this.tc=!0},c.prototype.ed=function(c,u){var d,p=eh(c,this.context,this.Qd),h=eh(u,this.context,this.Qd),f=p?(0,z.representationToQuality)(p,this.mimeType):void 0,m=h?(0,z.representationToQuality)(h,this.mimeType):void 0;if(m){var g={targetQuality:m,targetQualityId:m.id,sourceQuality:f,sourceQualityId:null!=(d=null==f?void 0:f.id)?d:null};O.MimeTypeHelper.isVideo(this.mimeType)?this.context.eventHandler.dispatchEvent(_.PlayerEvent.VideoDownloadQualityChange,g):O.MimeTypeHelper.isAudio(this.mimeType)&&this.context.eventHandler.dispatchEvent(_.PlayerEvent.AudioDownloadQualityChange,g)}},c.prototype.fd=function(c){var u,d=this,h=(null==(u=this.Ed)?void 0:u.segmentNumber)!==void 0?this.Ed.segmentNumber+1:0,f=this.bd(c),v=!f.equals(this.lc);return v&&O.MimeTypeHelper.isAV(this.mimeType)&&this.ed(this.lc,f),this.tc=!1,this.Fd=this.od(f).then(function(){return d.kc&&d.jc.setAdaptationSetId(d.kc,f),v&&d.dd(f),d.jc.getNextSegmentInfo(c.time)}).then(function(c){var u,m=null!=(u=d.lc)?u:f;if(d.kd(c,h,m),d.gd(c))throw(0,x.isContextAvailable)(d.context)&&d.Se("invalidating ongoing SegmentInfo request for",p({}
14,c)),"ongoing segment info request was invalidated";return d.Ed=c,c}).catch(function(u){if(d.Fd=void 0,u instanceof g.PlayerError?[m.ErrorCode.SOURCE_MANIFEST_INVALID,m.ErrorCode.SOURCE_COULD_NOT_LOAD_MANIFEST].includes(u.code):u===T.RequestError.Failed||u===T.RequestError.TimedOut){var h,v,y=null!=(v=null!=(h=null==u?void 0:u.name)?h:null==u?void 0:u.message)?v:u;d.Se("HLS playlist loading failed for representation ".concat(f.representationId," (").concat(y,")"));var b=d.de(f);if(b)return d.Se("Trying with lower quality representation ".concat(b.representationId)),d.fd(p(p({},c),{recommendedRepresentationId:b}));d.ee(f,u)}throw u}).finally(function(){d.Hd=void 0}),this.Fd},c.prototype.gd=function(c){return this.tc&&c&&!c.isInitSegment&&!this.hd(c)},c.prototype.hd=function(c){return void 0!==this.Hd&&(0,N.isNumber)(c.startTime)&&(0,N.isNumber)(c.duration)&&this.Hd>=c.startTime&&this.Hd<=c.startTime+c.duration},c.prototype.getDataSegmentInfo=function(c){var u={periodId:this.sc,time:c};return this.lc&&this.lc.periodId===this.getCurrentPeriodId()?this.fd(p(p({},u),{recommendedRepresentationId:this.lc})):this.fd(u)},c.prototype.kd=function(c,u,d){c&&(this.ld(c,d),this.md(c),this.nd(d,c),c.duration||c.isInitSegment||(c.duration=this.jc.getSegmentDuration()),(void 0===c.segmentNumber||isNaN(c.segmentNumber))&&(c.segmentNumber=u),c.discardData=this.Nd.discardNextSegment,this.Nd.discardNextSegment=!1,this.Id&&(c.preventDownloadCanceling=!0,this.Id=!1))},c.prototype.ld=function(c,u){var d=eh(u,this.context,this.Qd);d&&(c.representationId=u.representationId,c.internalRepresentationId=u,c.mimeType=this.mimeType,c.bitrate=d._bandwidth,c.periodId=u.periodId,c.codecs=this.getCodecs(),O.MimeTypeHelper.isAudio(this.mimeType)?(c.sampleRate=d._audioSamplingRate,c.width=void 0,c.height=void 0):O.MimeTypeHelper.isVideo(this.mimeType)&&(c.width=d._width,c.height=d._height,c.frameRate=d._frameRate))},c.prototype.md=function(c){if(O.MimeTypeHelper.isVideo(this.mimeType)&&!c.dateTime&&this.Ud.AKAMAI_DATETIME_PARSING&&this.gc){var u=null!=c.duration?this.gc.PlaylistUtils.getProgramDateTimeFromSegmentUrl(c.url,c.duration):void 0;u&&(c.dateTime=u)}},c.prototype.nd=function(c,u){var d=this.context.serviceManager.maybeCall(b.ServiceName.ManifestService,function(u){return u.getAvailableBaseURLsForRepresentation(c)},void 0,this.Qd.sourceIdentifier);u.availableBaseURLs=d,u.firstUsedBaseURLIndex=0,this.Ed&&this.Ed.lastUsedBaseURLIndex&&(u.firstUsedBaseURLIndex=this.Ed.lastUsedBaseURLIndex),u.lastUsedBaseURLIndex=u.firstUsedBaseURLIndex,this.qe()?(u.baseURL="",u.mediaURL||(u.mediaURL=u.url)):(u.baseURL=d[u.firstUsedBaseURLIndex],u.mediaURL=u.mediaURL||u.url,delete u.url),u.url=U.URLHelper.concatBaseUrlWithPartial(u.baseURL,u.mediaURL)},c.prototype.od=function(c){var u,d,p,h,f=this,m=null!=(d=null==(u=this.kc)?void 0:u.adaptationSetId)?d:"",g=null==(p=this.Rd.getState().activeTracks)?void 0:p[m],v=!(null!=(h=null==g?void 0:g.selectedRepresentationId)&&h.equals(c));return this.Rd.dispatch((0,K.setRepresentationIdAction)(c)),v?this.hc?this.hc.waitForRepUpdate(c).then(function(){return f.jc.updateRepresentation(c)}):Promise.reject("ManifestUpdateScheduler does not exist."):Promise.resolve()},c.prototype.pd=function(){var c;return this.isTransmuxerRequired()&&!!(null!=(c=this.Nd.transmuxer)&&c.isTransmuxing())},c.prototype.hasActiveTransmuxingJobs=function(){var c;return!!this.isTransmuxerRequired()&&(this.hasDelayedSegmentsInTransmuxer()||!!(null!=(c=this.Nd.transmuxer)&&c.hasActiveJobs()))},c.prototype.hasDelayedSegmentsInTransmuxer=function(){var c;return O.MimeTypeHelper.isAudio(this.mimeType)&&this.isTransmuxerRequired()&&!!(null!=(c=this.Nd.transmuxer)&&c.hasDelayedAudioSegments())},c.prototype.rd=function(){var c,u,d=this;(null!=(u=null==(c=this.Nd.transmuxer)?void 0:c.discardCurrentJobs(this.mimeType))?u:[]).forEac
vendor: 4,104 bytes, line 14
14h(function(c){return eu(c.mp2tsSegment.getSegmentInfo(),d.Rd)})},c.prototype.cancelLoading=function(){var c;this.tc=!0,null==(c=this.Wd)||c.cancel().catch(this.qd)},c.prototype.seekTo=function(c){var u=this;null!==c&&this.kc&&(this.cancelLoading(),this.rd(),this.nc=[],this.hasDownloadError=!1,this.oc=!1,this.Md&&this.Md.reset(),this.isTransmuxerRequired()&&this.Nd.transmuxer&&this.Nd.transmuxer.resetCaptionParser(),c>=0&&(this.Hd=c,this.jc.seekTo(c),this.context.serviceManager.maybeCall(b.ServiceName.TimedMetadataService,function(c){return c.clearSegmentBoundMetadata(u.mimeType)})))},c.prototype.sd=function(c){var u,d=this,p=this.te(this.sc),h=this.context.serviceManager.maybeCall(b.ServiceName.ManifestService,function(c){return c.getMediaPresentationDuration()},0,this.Qd.sourceIdentifier);if(p&&p.hasOwnProperty("_duration"))u=this.context.serviceManager.maybeCall(b.ServiceName.ManifestService,function(c){return c.getPeriodDuration(d.sc)},void 0,this.Qd.sourceIdentifier);else{if(0===h)return!1;u=h}return this.jc.hasNext(u)},c.prototype.td=function(c){var u=this;if(this.context.serviceManager.maybeCall(b.ServiceName.ManifestService,function(c){return c.isAvailabilityEndTimeExceeded()},!1,this.Qd.sourceIdentifier))return this.Td.log("Stream (".concat(this.mimeType,") availability end time reached, stopping download of further segments.")),this.oc=!0,!1;this.context.serviceManager.maybeCall(b.ServiceName.ManifestService,function(c){return c.isLastPeriod(u.sc)},!1,this.Qd.sourceIdentifier)&&this.jc.resolvePendingSegmentInfoRequests();var d=this.context.serviceManager.maybeCall(b.ServiceName.ManifestService,function(c){return c.getPeriodDuration(u.sc)},void 0,this.Qd.sourceIdentifier);return this.jc.hasNext(d)},c.prototype.hasNext=function(c){var u=this,d=this.context.serviceManager.maybeCall(b.ServiceName.ManifestService,function(c){return c.isLastPeriod(u.sc)},!1,this.Qd.sourceIdentifier);return!(this.oc&&d||!this.kc||!this.jc)&&(this.se()?this.td(c):this.sd(c))},c.prototype.ud=function(c){var u=this;if(c.transmuxedSegments.every(function(c){return null!==c.getCodec()})){!this.Nd.possiblyDependentSegments&&c.transmuxedSegments.some(function(c){return O.MimeTypeHelper.isAV(c.getMimeType())&&!c.isIndependentlyDecodable()})&&(this.Se("Encountered HLS segment not starting with a key frame"),this.Nd.possiblyDependentSegments=!0);var d=c.transmuxedSegments.find(function(c){return"video/mp4"===c.getMimeType()}),p=c.transmuxedSegments.filter(function(c){return"audio/mp4"===c.getMimeType()}),h=[d,p[this.Nd.muxedAudioTrackIndex]||p[0]].filter(function(c){return!!c});h.forEach(function(c){return u.rc.maybeAdjustTimestampOffsetAtDiscontinuityChange(c,u.jc)}),this.Wd&&this.kc&&this.qc.onMuxedSegmentAvailable(c,h,this.kc,this.Wd);var f=h[h.length-1];f&&f.getMimeType().indexOf("mp4")>-1&&(this.oc=f.isLastSegment()),this.Se("Transmuxing done",c.originalSegment.getUrl())}else{var m=c.originalSegment.getUrl();this.Se("Discarding muxing because codecs were not available in the segment: ".concat(m))}},c.prototype.hasPendingSegments=function(c){var u,d,p,h,f,m;return c?(f=this.isTransmuxerRequired()&&!!this.Nd.transmuxer&&this.Nd.transmuxer.isTransmuxingSegmentsForPeriod(c),m=null!=(d=null==(u=this.Wd)?void 0:u.isLoading(c))&&d):(f=this.pd(),m=null!=(h=null==(p=this.Wd)?void 0:p.isLoading())&&h),m||f||this.Jd||!!this.Fd},c.prototype.vd=function(c){var u=this;if(this.Nd.transmuxer){var d=c.getSegmentInfo();this.Nd.transmuxer.isSetupForDiscontinuity(d.discontinuitySequenceNumber)||(void 0===d.startTime&&(this.Se("resetting segment playback times for new initialization"),this.Rd.dispatch((0,X.resetSegmentPlaybackTimes)())),(0,et.initializeHlsSegmentStartTimes)(c,this.context,this.jc));var p=Date.now();this.Nd.transmuxer.transmuxSegment(c).then(function(c){var h,f=(0,L.toSeconds)(Date.now()-p),m={time:f,representationId:d.internalRepresentationId};return u.context.store.dispatch((0,A.addMetricsValue)(u.mimeType,M.MetricType.TransmuxingTime,m)),u.context.logger.debug("Transmuxed ".concat(u.mimeType," segment in: ").concat(null==f?void 0:f.toFixed(2),", qual
14ity: ").concat(null!=(h=d.representationId)?h:"")),u.ud(c)}).catch(function(d){eu(c.getSegmentInfo(),u.Rd),d!==f.TransmuxingRejectionReason.TRANSMUXING_ABORTED?u.Dd(c,"Transmuxing failed: ".concat(d)):u.Se(d,c.getUrl())})}},c.prototype.wd=function(c){var u;if(!this.Pe()||this.Bd(c)){var d=(0,ee.resolveContainerFormat)(this.mimeType,c,this.qe());this.Se("Container format is ".concat(null==d?void 0:d.source)),d&&this.Rd.dispatch((0,K.setContainerFormatAction)(c.getRepresentationId(),d)),this.Nd.isTransmuxingRequired=!!(d&&d.source!==d.target),!this.Nd.isTransmuxingRequired&&O.MimeTypeHelper.isAV(this.mimeType)&&(null==(u=this.Nd.transmuxer)||u.dispose(),this.context.serviceManager.maybeCall(b.ServiceName.SubtitleService,function(c){c.setTransmuxer(void 0)},void 0,this.Qd.sourceIdentifier))}},c.prototype.xd=function(c){if(this.Bd(c))return this.Se("Warning: Loaded segment has size 0 bytes, skipping further processing! May cause gap!",c.getUrl()),null==(u=this.Md)||u.reset(),f.SegmentVerificationResult.Drop;if(this.isTransmuxerRequired()){if(!F.ModuleManager.has(B.ModuleName.ContainerTS))return this.context.eventHandler.fireError(new j.PlayerModuleMissingError(B.ModuleName.ContainerTS)),f.SegmentVerificationResult.Drop}else if(!this.re()&&this.Cd(c)){if(this.context.settings.DROP_INVALID_SEGMENTS)return this.Dd(c,"The loaded MP4 segment is invalid, skipping further processing! May cause gap!"),f.SegmentVerificationResult.Drop;this.Dd(c,"The loaded MP4 segment is invalid. This may cause playback issues!")}var u,d=F.ModuleManager.get(B.ModuleName.LowLatency,!1),p=this.context.serviceManager.get(b.ServiceName.ManifestService,this.Qd.sourceIdentifier);if((0,$.isPlayingLowLatencyHls)(this.context)&&d&&p){var h=d.verifyLlHlsSegment(c,p);if(h===f.SegmentVerificationResult.Drop)return this.Se("LL-HLS Segment Verification: Dropping (partial) segment as it disappeared from playlist",c.getUrl()),f.SegmentVerificationResult.Drop;if(h===f.SegmentVerificationResult.Park)return this.yd(c),f.SegmentVerificationResult.Park}return f.SegmentVerificationResult.Publish},c.prototype.yd=function(c){var u=this,d=(0,k.subscribe)(this.Rd)(function(u){var d;if(u.manifest)return null==(d=(0,D.findRepresentation)(u.manifest,c.getRepresentationId()))?void 0:d._requestTimestamp},function(){d(),u.zd(d),u.Ad(c)},function(c,u){return c!==u});this.Sd.push(d)},c.prototype.zd=function(c){var u=this.Sd.findIndex(function(u){return u===c});u>-1&&this.Sd.splice(u,1)},c.prototype.Bd=function(c){var u=c.getData();return!!(u&&u.byteLength<1)},c.prototype.Cd=function(c){if(!F.ModuleManager.has(B.ModuleName.ContainerMP4)||!O.MimeTypeHelper.isAV(this.mimeType))return!1;var u=F.ModuleManager.get(B.ModuleName.ContainerMP4,!1),d=u.isValidMp4,p=u.MP4Parser;return this.ic instanceof p&&!d(c)},c.prototype.Dd=function(c,u){this.Vd.dispatchEvent(_.PlayerEvent.Warning,new v.PlayerWarning(y.WarningCode.PLAYBACK_INVALID_DATA_SEGMENT_ENCOUNTERED,u,{mimeType:c.getMimeType(),segmentUrl:c.getUrl()}))},c.prototype.Oe=function(){var c=this.Rd.getState();return c&&(0,Y.getContainerFormat)(c,O.MimeTypeHelper.getMediaType(this.mimeType))},c.prototype.Pe=function(){return!!this.Oe()},c.prototype.Qe=function(c){var u=this;return this.Fd=void 0,this.Jd=!0,c?(this.nc.push(c),this.pc=void 0,this.Re(c),this.Te(c).catch(function(d){return u.We(d,c)}).finally(function(){return u.Jd=!1})):Promise.resolve()},c.prototype.Re=function(c){var u=this.getInitSegmentInfoForDataSegmentInfo(c);u&&(c.init=u)},c.prototype.Se=function(c){for(var u,d,p,f=[],m=1;m<arguments.length;m++)f[m-1]=arguments[m];null!=(d=this.Td)&&d.isLevelEnabled(E.LogLevel.DEBUG)&&(u=this.Td).debug.apply(u,h(["[".concat(this.mimeType,"][").concat(null==(p=this.lc)?void 0:p.representationId,"] SegmentController: ").concat(c)],f,!1))},c.prototype.Te=function(c){var u;return null!=(u=this.Td)&&u.isLevelEnabled(E.LogLevel.DEBUG)&&this.Se("Loading ".concat(JSON.stringify(c))),this.Ue(c)},c.prototype.getInitSegmentInfoForDataSegmentInfo=function(c){var u;return(u=c.init?p(p({},c.init),{isInitSegment:!0,internalRepresentationId:c.internalRepresentationId}):this.jc.getInitSegmentInfo(c.internalRepresentationId))&&this.kd(u,void 0,c.internalRepresentationId),u},c.prototype.Ue=function(c){var u=this;return this.Wd?this.Wd.getSegment(c).then(function(c){return u.Ve(c)}):Promise.reject()},c.prototype.Ve=function(c){var u=this;return new Promise(function(d,p){c.transform(function(c){var d,p,h;d=c.getSegmentInfo(),(h=(p=u.nc).findIndex(function(c){return(0,er.areSegmentsIdentical)(c,d)}))>-1&&p.splice(h,1),u.Ad(c)},function(){return d()},function(c){var d=c.message,h={reason:d};return p(h),h.reason!==es.SegmentLoadingErrorReason.CANCEL&&u.Se("Error loading segment",d),d})})},c.prototype.We=function(c,u){null==(d=(0,R.getSourceStore)(this.context))||d.dispatch((0,w.clearPreferredBitrateForMimeTypeAction)(this.mimeType)),eu(u,this.Rd);var d,p=null!=c&&c.info?c.info.response.status:0;switch(null==c?void 0:c.reason){case es.SegmentLoadingErrorReason.CANCEL:this.Se("Download was cancelled as the segment is probably outdated");break;case es.SegmentLoadingErrorReason.ERROR_DECRYPTING:this.Se("Could not decrypt segment",u.url),this.Vd.dispatchEvent(_.PlayerEvent.Warning,new v.PlayerWarning(y.WarningCode.DRM_COULD_NOT_DECRYPT_SEGMENT));break;case es.SegmentLoadingErrorReason.ERROR_LOADING:this.ae(p,u,es.SegmentLoadingErrorReason.ERROR_LOADING);break;case es.SegmentLoadingErrorReason.TIMEOUT:this.ae(p,u,es.SegmentLoadingErrorReason.TIMEOUT);break;case es.SegmentLoadingErrorReason.ABR_TIMEOUT:this.ie(u);break;default:this.Se("Unexpected error while loading the segment",{url:u.url,error:c})}},c.prototype.Xe=function(c,u){var d=this;return this.gc&&this.manifestLoader instanceof this.gc.M3u8Loader?this.manifestLoader.switchToBackupStream(c,u).then(function(c){return c.length>0}).catch(function(c){return d.Se("Could not switch to HLS backup stream
14: ".concat(c)),Promise.resolve(!1)}):Promise.resolve(!1)},c.prototype.Ye=function(){return!!(this.gc&&this.manifestLoader instanceof this.gc.M3u8Loader)&&this.manifestLoader.isSwitchingToBackupStreams()},c.prototype.Ze=function(){var c=this.Ud.CHUNKED_CMAF_STREAMING?1:this.nc.length;return this.jc.getIndex()-c},c.prototype.ae=function(c,u,d){null!=u&&u.isPreloadHint?this.Se("Ignoring download error of preload hint segment.",u.url):(this.Se("Failed to load segment (code: ".concat(c,") ").concat(u.url)),this.Gd.shouldTryAlternatives(c)?this.be(u,c,d):(this.ge(u),this.hasDownloadError=!0))},c.prototype.be=function(c,u,d){var p=this;if(this.lc&&this.lc.equals(c.internalRepresentationId)){var h=this.context.serviceManager.maybeCall(b.ServiceName.ManifestService,function(c){return p.kc&&c.getRepresentation(p.kc,p.lc.representationId)},null,this.Qd.sourceIdentifier);if(h){var f=!1;this.Xe(h,c).then(function(c){return f=c}).then(function(){var c;return null==(c=p.Wd)?void 0:c.cancel()}).then(function(){return p.ce(f,c,u,d)})}}else this.Se("Ignoring download error of previous representation.")},c.prototype.ce=function(c,u,d,p){var h,f=this.Ze();if(this.nc=[],c)this.jc.setIndex(Math.max(0,f));else if(h=this.Gd.switchBaseURL(u))this.context.logger.debug("Switching ".concat(this.mimeType," segment location to ").concat(h.baseURL)),this.Qe(h);else{var m=this.de(this.lc);if(m){if(this.Pd){this.jc.setIndex(Math.max(0,f)),this.Se("Trying with lower quality segment ".concat(m.representationId));var g=this.Pd.getTimeForNextSegment((0,J.getTrackIdentifier)(u)),v=this.jc.getLatestTimeForPossibleSwitch(g);this.getNext(v,m)}}else this.hasDownloadError=!0,this.fe(u,d,p)}},c.prototype.de=function(c){var u,d,p;if(c&&null!=(u=this.Od)&&u.isAuto(this.mimeType)){var h=null!=(p=null==(d=this.ue(this.kc))?void 0:d.Representation)?p:[];return this.Gd.switchQuality(h,c)}},c.prototype.ee=function(c,u){var d;if(this.se()&&this.Ud.INFINITE_RETRIES_FOR_LIVE){this.Se("Could not load any segment of any quality from any CDN: restart retries."),this.Gd.downloadSuccess(!1);var p=eh(this.lc,this.context,this.Qd);p&&(this.Rd.dispatch((0,X.updateRepresentationFailedDownloadAction)(p._internalId,null)),null==(d=this.hc)||d.scheduleRepresentationUpdate(p))}else{var h=eh(c,this.context,this.Qd);(0,en.throwPlaylistDownloadError)(this.context,"Could not load segments of any quality from any CDN",h,u)}},c.prototype.fe=function(c,u,d){this.ge(c),this.se()&&this.Ud.INFINITE_RETRIES_FOR_LIVE?(this.Se("Could not load current segment of any quality from any CDN (all retries failed), skipping it..."),this.he(c)):(0,eo.throwDownloadError)(this.context,"Segment not available at any quality or location",u,c,d)},c.prototype.ge=function(c){var u,d=(0,ea.getSegmentInfoTimeRange)(c);if(d&&(0,x.isContextAvailable)(this.context)&&c.mimeType){var p=(0,J.getTrackIdentifier)(c);null==(u=(0,R.getSourceStore)(this.context))||u.dispatch((0,Z.addStreamTimeRange)(p,d,J.StreamTimeRangeType.Failed))}},c.prototype.he=function(c){if(this.Gd.downloadSuccess(!1),c.hasDownloadFailed=!0,null!=c.startTime&&null!=c.duration){var u=c.startTime+c.duration,d=this.jc.adjustTimeToNextSegmentStart(u);this.getNext(d)}},c.prototype.ie=function(c){var u,d=this;(0,x.isContextAvailable)(this.context)&&(this.Se("Download took too long, cancelled it",c.url),!c.isInitSegment&&this.jc&&(null==(u=this.Wd)||u.cancel().then(function(){if(d.jc){var c=d.Ze();d.nc=[],d.Se("Trying to get the same segment with a lower bitrate."),d.jc.setIndex(Math.max(0,c))}})))},c.prototype.ke=function(c,u,d){var p=this;if(void 0===d&&(d=!1),this.Xd&&!(null!=u&&u.id))return this.Kd=u,void(this.Wd&&this.cancelLoading());var h=this.context.serviceManager.maybeCall(b.ServiceName.ManifestService,function(h){return h.findAdaptationSet(c,p.mimeType,u,d)},null,this.Qd.sourceIdentifier);return h?(this.Kd=this.context.serviceManager.maybeCall(b.ServiceName.ManifestService,function(c){return c.getLangObjectFromAdaptationSet(h,p.mimeType)},void 0,this.Qd.sourceIdentifier),h._internalId):void 0},c.prototype.getCurrentAdaptationSet=function(){return this.ue(this.kc)}
14,c.prototype.getAdaptationSetForPeriodId=function(c){return this.ue(this.mc[c])||this.getCurrentAdaptationSet()},c.prototype.updateMpd=function(){this.Se("Caught a manifest update event");var c,u=!this.te(this.sc);for(var d in this.kc=this.ke(this.sc,this.Kd,!1),!u&&this.kc&&(this.mc[this.sc]=this.kc,null==(c=this.Od)||c.setAdaptationSetId(this.mimeType,this.kc),this.jc.setAdaptationSetId(this.kc,this.lc,{isPeriodSwitch:!1,isManifestUpdate:!0})),this.mc)this.te(d)||delete this.mc[d]},c.prototype.activateSubtitleSegmentController=function(c){var u;this.Xd&&(this.kc&&(this.jc.setAdaptationSetId(this.kc),null==(u=this.Od)||u.setAdaptationSetId(this.mimeType,this.kc)),isNaN(this.jc.getTimestampOffset())&&this.jc.setTimestampOffset(0),this.seekTo(c))},c.prototype.setCurrentLangObj=function(c){var u;if(this.Nd.isAvMuxedTogether&&O.MimeTypeHelper.isVideo(this.mimeType)){var d=this.ue(this.kc);if(null!=d&&d.ContentComponent){var p=d.ContentComponent.find(function(u){return"audio"===u._contentType&&u._id===c.id});if(p)return this.Nd.muxedAudioTrackIndex=d.ContentComponent.filter(function(c){return"audio"===c._contentType}).indexOf(p),void(this.Kd=c)}}c.id!==(null==(u=this.Kd)?void 0:u.id)&&this.le(c)},c.prototype.le=function(c){var u=this.kc;if(this.kc&&this.Rd.dispatch((0,K.removeActiveTrackAction)(this.kc)),this.kc=this.ke(this.sc,c),this.kc){var d=this.ue(this.kc);d&&this.Rd.dispatch((0,K.setMediaTypeAction)(d._internalId,(0,q.resolveMediaTypes)(d))),this.mc[this.sc]=this.kc,u&&!this.kc.equals(u)&&this.me(c)}},c.prototype.me=function(c){var u,d;this.Kd=c,this.Ld=c,this.Se("Trying to set language to ID ".concat(this.Kd.id)+" (lang: ".concat(this.Kd.lang,") for mpd handler and adaption handler")),this.kc&&(this.jc.setAdaptationSetId(this.kc),null==(u=this.Od)||u.setAdaptationSetId(this.mimeType,this.kc),null==(d=this.Od)||d.selectRepresentation(this.mimeType))},c.prototype.getCurrentLangObj=function(){return this.Kd},c.prototype.stop=function(){var c,u;this.cancelLoading(),null==(c=this.Wd)||c.clearCache(),null==(u=this.Od)||u.shutdown(this.mimeType)},c.prototype.ne=function(){var c,u=this,d=this.context.serviceManager.maybeCall(b.ServiceName.ManifestService,function(c){return c.getFirstPeriod()},void 0,this.Qd.sourceIdentifier);!this.sc&&d&&(this.sc=d._id);var p=ei.MPDHandlerFactory.createInstance(this.context,this.Qd,this.mimeType,this.sc);if(p){this.jc=p;var h,f=ep(this.mimeType);f&&(h=(0,W.createSegmentParser)(this.context,f)),h?this.ic=h:this.Se("Could not create segment parser for mime type"),this.rc=new ec.TimestampOffsetService(this.context,this.mimeType),this.qc=new el.SegmentPreProcessor(this.context,this.mimeType,this.onDataAvailableCallback,this.Nd,this.Gd,this.rc,this.ic),this.qc.setMpdHandler(this.jc),this.hasDownloadError=!1,this.kc=this.ke(this.sc,this.Kd),this.kc&&(this.mc[this.sc]=this.kc),this.context.serviceManager.maybeCall(b.ServiceName.SegmentService,function(c){return c.add({mimeType:u.mimeType,shouldDownloadBeCancelledCallback:u.je},u.ic,u.Kd)}),this.qe()&&(this.Md=new this.gc.HlsTimelineTracker(this.context,this.Ud.GAP_TOLERANCE),this.qc.setHlsTimelineTracker(this.Md)),O.MimeTypeHelper.isMP4(this.mimeType)&&this.context.serviceManager.maybeCall(b.ServiceName.SubtitleService,function(c){c.setupCea608CaptionExtractor(u.context.logger)},void 0,this.Qd.sourceIdentifier),this.kc&&(null==(c=this.Od)||c.setAdaptationSetId(this.mimeType,this.kc),this.jc.setAdaptationSetId(this.kc,void 0,{isPeriodSwitch:!0}),this.se()&&!this.Ud.ENABLE_SEEK_FOR_LIVE&&this.jc.timeShift(0,this.sc)),this.oc=!1}else this.Vd.fireError(new g.PlayerError(m.ErrorCode.SOURCE_MANIFEST_INVALID,void 0,"Could not create an MPD handler for the given source.",this.Qd.sourceIdentifier))},c.prototype.getSegmentInfos=function(){var c,u=this,d=null==(c=this.context.serviceManager.maybeCall(b.ServiceName.ManifestService,function(c){return c.getAvailableBaseURLsForRepresentation(u.lc)},null,this.Qd.sourceIdentifier))?void 0:c[0];return this.jc.getSegmentInfos(d)},c.prototype.getCurrentPeriodId=function(){return this.sc},c.prototype.oe=function(c){var u=this;return this.Ld&&this.context.serviceManager.maybeCall(b.ServiceName.ManifestService,function(d){return d.isLanguageAvailable(c,u.mimeType,u.Ld)},!1,this.Qd.sourceIdentifier)?this.Ld:this.Kd},c.prototype.switchPeriod=function(c){var u,d,p,h=this,f=this.oe(c);if(this.Se("switching period from ".concat(this.sc," to ").concat(c)),this.cancelLoading(),null==(u=this.Wd)||u.clearCache(),this.pe(),this.sc=c,this.lc=void 0,this.kc=this.ke(c,f,!0),this.kc&&(this.mc[c]=this.kc),this.kc){null==(d=this.Od)||d.setAdaptationSetId(this.mimeType,this.kc);var v=this.jc.getPendingSegmentInfoRequest(),y=ei.MPDHandlerFactory.createInstance(this.context,this.Qd,this.mimeType,c,f);y?(this.jc.dispose(),this.jc=y):this.Vd.fireError(new g.PlayerError(m.ErrorCode.SOURCE_MANIFEST_INVALID)),this.qc.setMpdHandler(this.jc),this.jc.setPendingSegmentInfoRequest(v),this.jc.setAdaptationSetId(this.kc,void 0,{isPeriodSwitch:!0})}if(this.isTransmuxerRequired()){var S=this.context.serviceManager.maybeCall(b.ServiceName.ManifestService,function(c){return h.kc&&c.findDownloadedHlsRepresentation(h.kc)},null,this.Qd.sourceIdentifier);S&&this.jc.setRepresentationId(S._internalId),this.Md&&this.Md.reset(),null==(p=this.Wd)||p.clearCache(!1)}this.hasDownloadError=!1,this.oc=!1},c.prototype.getMPDHandler=function(){return this.jc},c.prototype.getIndex=function(){return this.jc&&this.jc.getIndex()||0},c.prototype.getSourceBufferTypes=function(){var c=[];return this.isTransmuxerRequired()&&this.Nd.isAvMuxedTogether?(c.push("video/mp4"),c.push("audio/mp4")):c.push(this.mimeType),c},c.prototype.getCodecs=function(){var c,u=this.getCurrentAdaptationSet();return null!=(c=u&&(0,V.getCodecsFromAdaptationSet)(u))?c:void 0},c.prototype.getLiveEdgeTime=function(){return this.se()?this.jc.getLiveEdgeTime():-1},c.prototype.setAdaptionLogicStartupPhase=function(){var c;null==(c=this.Od)||c.setStartupPhase(this.mimeType)},c.prototype.getMimeType=function(){return this.mimeType},c.prototype.pe=function(){var c=this,u=this.context.store.getState(),d=u?(0,I.getMetricsState)(u):void 0;if(this.Wd&&d){var p=this.Rd.getState(),h=p?(0,Q.getPlayingPerio
vendor: 4,352 bytes, line 14
14dId)(p):void 0;this.Wd.removeCachedInitSegments(function(u){return c.context.serviceManager.maybeCall(b.ServiceName.ManifestService,function(c){return c.isPrecedingPeriod(h,u.getPeriodId())},!1,c.Qd.sourceIdentifier)}),((0,I.getMetricsHistory)(d,this.mimeType,M.MetricType.CachedInitSegments)||[]).filter(function(u){var d=u.value.internalRepId.periodId;return c.context.serviceManager.maybeCall(b.ServiceName.ManifestService,function(c){return c.isPrecedingPeriod(h,d)},!1,c.Qd.sourceIdentifier)}).forEach(function(u){return c.context.store.dispatch((0,A.removeMetricsValue)(c.mimeType,M.MetricType.CachedInitSegments,u))})}},c.prototype.canLoad=function(){var c;return!!(null!=(c=this.Wd)&&c.canLoad())},c.prototype.isTransmuxerRequired=function(){return this.Nd.isTransmuxingRequired},c.prototype.setTransmuxer=function(c){this.Nd.transmuxer=c},c.prototype.getTransmuxer=function(){return this.Nd.transmuxer},c.prototype.resetTransmuxer=function(){this.Nd.transmuxer&&this.Nd.transmuxer.reset()},c.prototype.qe=function(){return this.context.serviceManager.maybeCall(b.ServiceName.ManifestService,function(c){return c.isHlsManifest()},!1,this.Qd.sourceIdentifier)},c.prototype.re=function(){return this.context.serviceManager.maybeCall(b.ServiceName.ManifestService,function(c){return c.isSmoothManifest()},!1,this.Qd.sourceIdentifier)},c.prototype.se=function(){return this.context.serviceManager.maybeCall(b.ServiceName.ManifestService,function(c){return c.isLive()},!1,this.Qd.sourceIdentifier)},c.prototype.te=function(c){return this.context.serviceManager.maybeCall(b.ServiceName.ManifestService,function(u){return u.findPeriod(c)},null,this.Qd.sourceIdentifier)},c.prototype.ue=function(c){return this.context.serviceManager.maybeCall(b.ServiceName.ManifestService,function(u){return u.getAdaptationSet(c)},null,this.Qd.sourceIdentifier)},c.prototype.dispose=function(){var c,u;(0,S.dispose)(this.jc),(0,S.dispose)(this.rc),(0,S.dispose)(this.qc),null==(c=this.Od)||c.release(this.mimeType),this.Md&&this.Md.dispose(),(0,x.isContextAvailable)(this.context)&&(null==(u=this.context.serviceManager.get(b.ServiceName.SegmentService))||u.disposeOfType(this.mimeType,this.Kd)),this.Sd.forEach(function(c){return c()})},c}()},50429:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.throwDownloadError=function(c,u,d,b,S){c.eventHandler.dispatchEvent(g.PlayerEvent.Warning,new f.PlayerWarning(m.WarningCode.PLAYBACK_DECODE_RETRIES_EXCEEDED)),c.eventHandler.fireError(function(c,u,d,f,m){var g=c.sourceContext.sourceIdentifier;if(0===d)return u&&u===v.RequestError.TimedOut||m===y.SegmentLoadingErrorReason.TIMEOUT?new h.PlayerError(p.ErrorCode.NETWORK_SEGMENT_DOWNLOAD_TIMEOUT,{segmentUrl:f.url,mimeType:f.mimeType},"Failed to load the segment: the request timed out.",g):new h.PlayerError(p.ErrorCode.NETWORK_ERROR,{url:f.url,statusCode:d},u,g);c.logger.debug(u);var b={message:u};return f.url&&(b.segment={url:f.url,mimeType:f.mimeType,codecs:f.codecs}),m===y.SegmentLoadingErrorReason.TIMEOUT?new h.PlayerError(p.ErrorCode.NETWORK_SEGMENT_DOWNLOAD_TIMEOUT,b,u,g):new h.PlayerError(p.ErrorCode.NETWORK_ERROR,b,u,g)}(c,u,d,b,S))};var p=d(40306),h=d(3336),f=d(25926),m=d(4224),g=d(3714),v=d(77401),y=d(65244)},77286:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.SegmentInfoProvider=void 0;var p=d(58313),h=d(90919);u.SegmentInfoProvider=function(){function c(){}return c.findSegmentInfoOfRepresentation=function(u,d){if(d.SegmentList){var p=d.SegmentList[0].SegmentURL,h=u.getUrl(),f=p.find(function(u){return c.getSegmentInfoUrl(u,d)===h});if(f)return f}return null},c.findHlsRepresentationForSegment=function(c,u){var d,p,f=u.Representation.find(function(u){return c.getRepresentationId().representationId===u._internalId.representationId});if(f){var m=(0,h.findSegmentUrlIndexWithinSegmentList)(c.getSegmentInfo(),null!=(p=null==(d=f.SegmentList)?void 0:d[0].SegmentURL)?p:[]);if(-1!==m)return{representation:f,index:m}}},c.getSegmentInfoUrl=function(c,u){var d=c._media;return p.URLHelper.isUrlAbsolute(d)||(d=p.URLHelper.concatUrlParts(u.BaseURL[0],d)),d},c}()},25248:function(c,u,d){var p=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};
14Object.defineProperty(u,"__esModule",{value:!0}),u.SegmentInfoService=void 0,u.getSegmentInfoId=function(c){return c.url+(c.byteRange?","+JSON.stringify(c.byteRange):"")};var h=d(80813),f=d(94685);u.SegmentInfoService=function(){function c(){this.we=[]}return c.prototype.updatePlayerContext=function(c){this.ve=c},c.prototype.setSegmentControllers=function(c){this.we=c},c.prototype.getSegmentControllerMimeTypes=function(){return this.we.map(function(c){return c.getMimeType()})},c.prototype.getSegmentInfos=function(c,u){if(!(0,f.isContextAvailable)(this.ve))return Promise.resolve([]);var d=this.ve.serviceManager.get(h.ServiceName.ManifestService,this.ve.sourceContext.sourceIdentifier).getPeriodIdForTime(c);return Promise.all(this.we.map(function(h){var f;return f={startTime:c,duration:u,targetPeriodId:d},h.getCurrentPeriodId()!==f.targetPeriodId&&h.switchPeriod(f.targetPeriodId),h.seekTo(f.startTime),h.getCurrentAdaptationSet()?(function c(u,d,p){void 0===p&&(p=[]);var h=p[p.length-1],f=h?h.startTime+h.duration:0;return d<=0||!u.hasNext(f)?Promise.resolve(p):u.getDataSegmentInfo(f).then(function(h){return h.duration&&(d-=h.duration),p.push(h),c(u,d,p)})})(h,f.duration).then(function(c){if(c.length>0){var u=h.getInitSegmentInfoForDataSegmentInfo(c[0]);if(u)return p([u],c,!0)}return c}):Promise.resolve([])})).then(function(c){return c.flatMap(function(c){return c})})},c.prototype.dispose=function(){this.we=[]},c}()},65439:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.isSegmentTiming=function(c){return"startTime"in c&&(0,p.isNumber)(c.startTime)&&"duration"in c&&(0,p.isNumber)(c.duration)},u.findSegmentIndexForTime=function(c,u,d){var p=!c||!c.length,f=u<c[0].startTime+c[0].duration;if(p||f)return 0;var m=c.length-1;if(u>=c[m].startTime)return m;var g=Math.min(Math.floor(Math.max(u-c[0].startTime,0)/d),c.length-1);return h(c[0])&&h(c[g])?function(c,u,d){for(;c[d]&&c[d].startTime>u;)d--;for(;c[d]&&c[d].startTime+c[d].duration<=u;)d++;return Math.min(d=Math.max(d,0),c.length-1)}(c,u,g):null},u.createInitSegmentInfoBase=function(c){var u=c._internalId;return{internalRepresentationId:u,representationId:u.representationId,periodId:u.periodId,mimeType:c._mimeType,isInitSegment:!0}},u.getSegmentInfoTimeRange=function(c){if(null!=c&&c.duration&&(null==c?void 0:c.startTime)!==void 0)return{start:c.startTime,end:c.startTime+c.duration}};var p=d(23068);function h(c){return c&&(0,p.isNumber)(c.startTime)}},63066:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.SegmentListMPDHandler=u.PHANTOM_SEGMENT_URL=void 0,u.assignSegmentStartTimesFromHlsRepresentation=R,u.copyPropValues=x,u.getMatchingPart=C;var h=d(66790),f=d(80813),m=d(77179),g=d(20649),v=d(74853),y=d(52424),b=d(89927),S=d(23068),_=d(88052),E=d(62756),T=d(50827),w=d(72498),P=d(60729),A=d(54053),I=d(65439);u.PHANTOM_SEGMENT_URL="PHANTOM-SEGMENT";var M=function(){function c(c,u){this.xe=c,this.ye=u,this.Ae=c.settings,this.ze=c.logger,this.Ge=c.serviceManager.get(f.ServiceName.ManifestService,this.ye.sourceIdentifier),this.Fe=0,this.Ie={},this.He=0/0}return Object.defineProperty(c.prototype,"Je",{get:function(){return this.xe.serviceManager.get(f.ServiceName.PlayerStateService)},enumerable:!1,configurable:!0}),c.prototype.Ke=function(c,u){if(!c)return null;var d,f={isInitSegment:!1,url:c._media,duration:c._duration,internalRepresentationId:u,periodId:u.periodId};if(c._key&&c._key.method!==h.HlsEncryptionMethod.NONE&&(f.key=c._key),void 0!==c._playbackTime&&(f.startTime=c._playbackTime),c._dateTime&&(f.dateTime=c._dateTime),c._metadata&&(f.metadata=c._metadata),c._byteRange&&(f.byteRange=c._byteRange),c._init&&(f.init=c._init,(null==(d=c._init.key)?void 0:d.method)===h.HlsEncryptionMethod.NONE&&(f.init=p({},f.init),delete f.init.key)),void 0!==c._mediaSequence&&(f.mediaSequence=c._mediaSequence),void 0!==c._discontinuitySequenceNumber&&(f.discontinuitySequenceNumber=c._discontinuitySequenceNumber),c._parts){var m=f.dateTime;f.parts=c._parts.map(function(c){var u,d=(u={url:c.uri,duration:c.duration,isInitSegment:!1,internalRepresentationId:f.internalRepresentationId,isPreloadHint:!!c.isPreloadHint,isIndependent:!!c.independent},c.byteRange&&(u.byteRange=c.byteRange),f.key&&(u.key=f.key),f.init&&(u.init=f.init),(0,S.isDefined)(f.mediaSequence)&&(u.mediaSequence=f.mediaSequence),(0,S.isDefined)(f.discontinuitySequenceNumber)&&(u.discontinuitySequenceNumber=f.discontinuitySequenceNumber),u);return m&&(d.dateTime=m,d.startTime=(0,b.toSeconds)(m.getTime()),m=new Date(m.getTime()+(0,b.toMilliSeconds)(c.duration))),d})}return f},c.prototype.Le=function(c,u,d){if(u.SegmentURL.length<1)return c.entries=[],c.totalDuration=0,
14c.entries.length;for(var p=this.Ke(u.SegmentURL[0],d),h=0,f=0,m=0;m<c.entries.length;m++){var g=c.entries[m];if((0,T.isIdenticalSegmentInfo)(g,p))break;h+=g.duration,c.entries.splice(m,1),m--,f++,this.Ce.equals(d)&&this.rewindOneSegment()}return c.totalDuration-=h,f},c.prototype.Me=function(c,d,p,h){for(var f,m,v=[],y=c.entries[c.entries.length-1],b=0,S=h?(m=[],null==(f=h.S)||f.forEach(function(c){m.push(c);for(var u=c._r?parseInt(c._r):0;u>0;)m.push({_d:c._d}),u--}),m):void 0,_=this.Mf(p),E=d.SegmentURL.length-1;E>=0;E--){var w=this.Ke(d.SegmentURL[E],p);if(y&&(0,T.isIdenticalSegmentInfo)(y,w)){if(k(y)){var P=function(c,d){var p=d.duration-c.duration;return x(d,c,["url","mediaURL","duration","parts","init","key","discontinuitySequenceNumber","isDiscontinuityStart"]),c.url.endsWith(u.PHANTOM_SEGMENT_URL)||(c.url=(0,g.forceReallocation)(c.url)),p}(y,w);c.totalDuration+=P}break}y&&(0,T.isIdenticalInitSegmentInfo)(y.init,w.init)&&(w.init=y.init),null!=S&&S[E]&&this.Ne(w,S[E],c,_),isNaN(w.duration)&&(w.duration=c.maximumSegmentDuration),w.duration/=c.timescale,b+=w.duration,v.push(w)}return c.totalDuration+=b,v.reverse(),c.entries=c.entries.concat(v),v.length},c.prototype.Ne=function(c,u,d,p){var h,f;if(c.duration=parseInt(u._d),void 0!==u._t){var m=null!=(h=d.timescale)?h:1,g=null!=(f=d.presentationTimeOffset)?f:0;c.startTime=p+(parseInt(u._t)-g)/m}},c.prototype.Yf=function(c,u){var d,p,h,f=u.SegmentList,m=u._internalId.representationId,g=null==(d=this.Ce)?void 0:d.equals(u._internalId),v=null==(p=null==f?void 0:f[0])?void 0:p.SegmentURL.length;if(!g||v){c.Uri&&c.Uri!==u.Uri&&this.Zf(c,null==f?void 0:f[0],g),c.Uri=u.Uri,c.timescale=1,c.maximumSegmentDuration=1,c.startNumber=1;for(var y=this,b=0;b<f.length;b++)!function(d){var p=f[d];if(p.hasOwnProperty("_duration")&&(c.maximumSegmentDuration=Number(p._duration)),["_timescale","_startNumber","_presentationTimeOffset"].filter(function(c){return p.hasOwnProperty(c)}).forEach(function(u){return c[u.substr(1)]=p[u]}),y.af(c,p,u),p.hasOwnProperty("SegmentURL")){var g=y.Le(c,p,u._internalId),v=y.Me(c,p,u._internalId,null==(h=p.SegmentTimeline)?void 0:h[0]);y.bf(u._mimeType,m,g,v),y.Ge.isHlsManifest()?R(c.entries,u._internalId,y.Ge):y.cf(c,u._internalId)}}(b)}},c.prototype.Zf=function(c,u,d){var p,h,f,m,g,y;if(this.Ge.isLive()&&d){var b,S,_=null!=(f=null==(h=null==(p=c.entries)?void 0:p[0])?void 0:h.mediaSequence)?f:1/0,E=(null!=(g=null==(m=null==u?void 0:u.SegmentURL[0])?void 0:m._mediaSequence)?g:0)-_,T=Math.ceil(24/(c.totalDuration/(null!=(S=null==(b=c.entries)?void 0:b.length)?S:1)));!isNaN(E)&&E>0&&E<T&&this.Ef(E)}(0,v.clearArray)(null!=(y=c.entries)?y:[]),c.totalDuration=0},c.prototype.af=function(c,u,d){var p,h=null==(p=_.ModuleManager.get(E.ModuleName.DASH,!1))?void 0:p.initSegmentInfoSourceDetectors.isInitializationNode;null!=h&&h(u)?c.init=_.ModuleManager.get(E.ModuleName.DASH,!1).initSegmentInfoProviders.provideSegmentInfoFromInitializationNodeProperty(u,d):delete c.init},c.prototype.bf=function(c,u,d,p){(d>0||p>0)&&this.ze.debug("[".concat(c,"][").concat(u,"] Updated segment list, removed ").concat(d," segments and added ").concat(p," segments"))},c.prototype.cf=function(c,u){var d=this.Mf(u);c.entries.forEach(function(c){var u,p;null!=c.startTime||(c.startTime=d),d=c.startTime+(null!=(p=c.duration)?p:0)})},c.prototype.extrapolateStartTimesFromDiscontinuityStarts=function(c){var u,d,p,h,f=null==(d=null==(u=this.df())?void 0:u.getState())?void 0:d.hls;if(f){var m=c.getRepresentationId().representationId,g=this.getSegmentListEntries(this.Ce),v=_.ModuleManager.get(E.ModuleName.HLS).selectors,y=v.getDiscoSequenceTimings,b=v.getMergedDiscontinuityTimings,S=function(c,u){for(var d=c[0].discontinuitySequenceNumber,p=1;p<c.length;p++){var h=c[p].discontinuitySequenceNumber;if(h!==d){var f=function(c,u){var d=c[String(u)];return d&&d.startTime>0?d.startTime:(d=c[String(u-1)])&&d.endTime>0?d.endTime:null}(u,h);
vendor: 10,877 bytes, line 14
14if(null!=f)return{index:p,discontinuityStartTime:f}}}return null}(g,null!=(p=y(f,c.getMimeType()))?p:b(f));if(!S){var T=null==(h=this.Ff())?void 0:h.start;if(void 0===T)return;S={index:0,discontinuityStartTime:T},this.ze.debug("Could not find discontinuity boundary with start time, using period start time ".concat(T))}this.ze.debug("Assigning segment start times for rep ".concat(m," from discontinuity at index ").concat(S.index," with time ").concat(S.discontinuityStartTime)),g[S.index].startTime=S.discontinuityStartTime;for(var w=S.index-1;w>=0;w--)g[w].startTime=g[w+1].startTime-g[w+1].duration;for(w=S.index+1;w<g.length;w++)g[w].startTime=g[w-1].startTime+g[w-1].duration}},c.prototype.df=function(){return this.xe.serviceManager.get(f.ServiceName.SourceStoreService,this.ye.sourceIdentifier)},c.prototype.ef=function(c,u){for(var d=-1,p=this.getSegmentListEntries(u),h=p.length-1;h>=0;h--)if((0,T.isIdenticalSegmentInfo)(p[h],c)){d=h;break}return d},c.prototype.ff=function(c){var u,d=this,p=null==(u=this.Ge)?void 0:u.getAdaptationSet(c);p&&p.Representation.forEach(function(c){var u=d.Ie[c._internalId.key()];if(u||(u=d.kf(c._internalId.key())),c.hasOwnProperty("SegmentList")&&(d.Yf(u,c),_.ModuleManager.has(E.ModuleName.DASH))){var p=_.ModuleManager.get(E.ModuleName.DASH).initSegmentInfoSourceDetectors.isInitializationNode;if(!u.hasOwnProperty("init")&&c.hasOwnProperty("SegmentBase")&&c.SegmentBase&&p(c.SegmentBase[0])){var h=_.ModuleManager.get(E.ModuleName.DASH).initSegmentInfoProviders.provideSegmentInfoFromInitializationNodeProperty;u.init=h(c.SegmentBase[0],c)}}})},c.prototype.gf=function(){var c,u,d=this,p=null==(c=this.xe.serviceManager.get(f.ServiceName.SourceStoreService,this.ye.sourceIdentifier).getState().activeTracks)?void 0:c[this.De.adaptationSetId];if((null==(u=null==p?void 0:p.selectedRepresentationId)?void 0:u.periodId)===this.De.periodId)return p.selectedRepresentationId;if(this.Ce){var h=this.Ge.getRepresentation(this.De,this.Ce.representationId);if(h)return h._internalId}return(this.hf(function(c){return d.isSegmentInfoLoaded(c._internalId)})||this.hf())._internalId},c.prototype.hf=function(c){return this.Ge.getMatchingRepresentationByBandwidth(this.De,this.lf(),c)},c.prototype.jf=function(){var c=this.De.equals(this.Ce),u=!this.Ce||!!this.Ge.getRepresentationById(this.Ce);return!this.Ce||!c||!u},c.prototype.setAdaptationSetId=function(c){this.De=c,this.ff(this.De);var u,d=this.Ge.isLive(),p=0;this.jf()&&(this.Ce=this.gf());var h=this.Ie[this.Ce.key()];if(h||(h=this.kf(this.Ce.key())),h&&d&&h.entries&&h.entries.length>0){var f=h.entries.length-1;this.Be>f&&(p=this.Be-f),this.Be=Math.min(f,this.Be||0),this.Be=Math.max(0,this.Be),u=h.entries[this.Be]}if(this.Be=this.Be||0,d&&(this.Fe=this.getSegmentDuration()*this.Ae.LIVE_SEGMENT_LIST_START_INDEX_OFFSET),d){if(u&&h){var m=this.ef(u,this.Ce);m>=0?this.Be=m+p:this.nf()}else this.nf();var g=this.mf();g?this.Af(g):this.resolvePendingSegmentInfoRequests()}else this.resolvePendingSegmentInfoRequests()},c.prototype.kf=function(c){var u={totalDuration:0,entries:[],SegmentURL:[],startNumber:0,init:null,maximumSegmentDuration:1,timescale:1};return this.Ie[c]=u,u},c.prototype.lf=function(){var c=0,u=this.Hf();return u&&(c=u._bandwidth),c},c.prototype.mf=function(){var c;if(this.Ge.isHlsManifest()){var u=this.Ge.getRepresentationById(this.Ce);if(null!=(c=null==u?void 0:u._hls)&&c.loadFailureReason)return u._hls.loadFailureReason}return this.hasNext()||this.Ge.isLastPeriod(this.Ce.periodId)?null:A.SegmentInfoError.PERIOD_COMPLETE},c.prototype.nf=function(){this.Ae.ENABLE_SEEK_FOR_LIVE?this.Be=0:this.timeShift(0)},c.prototype.pf=function(c,u){var d,p,h=this.Ge.getRepresentationById(c),f=this.Ge.getRepresentationById(u),m=(0,S.isNumber)(null==(d=null==f?void 0:f._hls)?void 0:d.mediaSequence)&&(0,S.isNumber)(null==(p=null==h?void 0:h._hls)?void 0:p.mediaSequence);if(h&&f&&m){var g=f._hls.mediaSequence-h._hls.mediaSequence,y=this.getSegmentListEntries(c),b=this.getSegmentListEntries(u);g>=y.length||(b[0].startTime=y[g].startTime,(0,v.forEachFromIndex)(b,1,function(c,u){(0,S.isNumber)(c.startTime)&&(0,S.isNumber)(c.duration)&&(u.startTime=c.startTime+c.duration)}))}},c.prototype.setRepresentationId=function(c){var u=this.Ge.getRepresentationById(c),d=this.getSegmentListEntries(this.Ce)[this.Be];if(u){var p=void 0===this.Ce,h=this.Ce;if(this.Ce=c,this.Ge.isLive()&&u._hls){if(this.Ae.HLS_SYNC_SEGMENT_PLAYBACK_TIME_VIA_MEDIA_SEQUENCE&&this.pf(h,this.Ce),p)this.nf();else if(this.Ae.HLS_SYNC_VIA_MEDIA_SEQUENCE){var f=this.Ge.getRepresentationById(h)._hls.mediaSequence+this.Be;this.Be=f-u._hls.mediaSequence,this.Be=Math.max(this.Be,0)}else if((null==d?void 0:d.startTime)!=null&&!isNaN(d.startTime)){var m=this.Lf(d.startTime);null===m||isNaN(m)||(this.Be=this.qf(m,d.startTime))}}return!0}return!1},c.prototype.qf=function(c,u){var d=this.getSegmentListEntries(this.Ce),p=[d[c],d[c+1]];if(c===d.length-1||p.some(function(c){return!c.startTime}))return c;var h=p.map(function(c){return Math.abs(c.startTime-u)}),f=Math.min.apply(this,h);return c+h.indexOf(f)},c.prototype.getInitSegmentInfo=function(){var c=this.If(this.Ce);if(null!=c&&c.init)return c.init.presentationTimeOffset=this.getTimestampOffset(),c.init;var u=this.getSegmentListEntries(this.Ce);if(this.xf(u)&&this.Be>-1){var d=p({},u[this.Be]);if(d.init){var h=d.init;return h.isInitSegment=!0,h}}return null},c.prototype.rf=function(c){var u;if(!(this.getSegmentListEntries(this.Ce).length<1||this.Be<0)){var d=this.sf(c);return d&&this.ze.debug("".concat(null==(u=this.De)?void 0:u.adaptationSetId," given time ").concat(c," matches seek time, performing precise segment/part search"),c),(0,P.isPlayingLowLatencyHls)(this.xe)&&this.tf(c,d),this.uf(c,d)}},c.prototype.sf=function(c){var u;return c===(null==(u=this.Je)?void 0:u.targetPlaybackTime)},c.prototype.tf=function(c,u){var d;if(0!==c){if(this.Be=this.Lf(c),!u){var p=this.getSegmentListEntries(this.Ce),h=p[this.Be];if(!(h.parts&&h.parts.length>0)){var f=this.Be;this.Be=O(c,this.Be,p),this.Be!==f&&this.ze.debug("Snapped segment index for time ".concat(c," to next segment boundary at ").concat(null==(d=p[this.Be])?void 0:d.startTime))}}}else this.xe.logger.debug("Ignoring target time of 0 for LL-HLS")},c.prototype.uf=function(c,u){var d=this.getSegmentListEntries(this.Ce);if(this.xf(d)){var p=d[this.Be];if(!(p.parts&&p.parts.length>0))return this.wf();if(k(p))return C(p,c,u);var h=C(p,c,u);return h?p.parts.indexOf(h)>0?h:this.wf():(this.Be++,this.uf(c,u))}},c.prototype.getNextSegmentInfo=function(c){var u=this.rf(c);return u?(this.vf(u),Promise.resolve(u)):this.zf({time:c})},c.prototype.vf=function(c){return c.presentationTimeOffset=this.getTimestampOffset(),c.startTime&&(c.wallClockTime=(0,b.toMilliSeconds)(c.startTime)),c},c.prototype.wf=function(){return this.getSegmentListEntries(this.Ce)[this.Be++]},c.prototype.getSegmentInfos=function(){var c=this,u={},d=this.Ge.getAdaptationSet(this.De);return d&&d.Representation.forEach(function(d){var p=c.getSegmentListEntries(d._internalId);u[d._id]=p.map(function(c){return{url:c.url,duration:c.duration,startTime:c.startTime}})}),u},c.prototype.getSubtitleUrl=function(){return this.Ge.getAvailableSubtitles(this.De.periodId)[0].url},c.prototype.getStartNumber=function(){var c=this.If(this.Ce);return c?c.startNumber:1},c.prototype.getSegmentDuration=function(){var c=this,u=this.If(this.Ce),d=this.getSegmentListEntries(this.Ce);if(u)return d.length>0&&(0,S.isNumber)(u.totalDuration)?u.totalDuration/d.length:u.maximumSegmentDuration;if(this.Ge.getAdaptationSet(this.De)){var p=Object.keys(this.Ie).map(function(u){return c.Ie[u]}).find(function(c){return null!==c});if(p)return p.maximumSegmentDuration}return 1},c.prototype.seekTo=function(c){c>-1&&(this.Be=this.Lf(c))},c.prototype.xf=function(c){return this.Be<c.length},c.prototype.hasNext=function(){var c=this.getSegmentListEntries(this.Ce);return!this.Ce||!c.length||(this.Ge.isLive()?this.yf(c):this.xf(c))},c.prototype.yf=function(c){return!!this.Ge.isLastPeriod(this.Ce.periodId)||this.xf(c)},c.prototype.setTimestampOffset=function(c,u){void 0===u&&(u=1),this.He=c/u},c.prototype.getTimestampOffset=function(){if(!isNaN(this.He))return this.He;var c=this.Ff(),u=0;if(this.Ce){var d=this.If(this.Ce);d&&!isNaN(d.presentationTimeOffset)&&(u=d.presentationTimeOffset/d.timescale)}return c&&!this.Ge.isHlsManifest()&&(u-=c.start),u},c.prototype.getIndex=function(){return this.Be},c.prototype.setIndex=function(c){"number"==typeof c?c<0?(this.ze.debug("Tried to set index at MPDHandler to value smaller 0. Setting to 0."),this.Be=0):this.Be=c:this.ze.debug("Tried to set index at MPDHandler with parameter not being a number!")},c.prototype.zf=function(c){var u,d=this;if(this.Ee)return Promise.reject("fail");var h=this.Ge.getRepresentationById(this.Ce);return null!=(u=null==h?void 0:h._hls)&&u.loadFailureReason?Promise.reject(h._hls.loadFailureReason):(this.ze.debug("No segment info was found for the target time. Waiting for representation update."),new Promise(function(u,h){d.Ee=p(p({},c),{resolve:u,reject:h})}))},c.prototype.resolvePendingSegmentInfoRequests=function(){if(this.Ee){var c=this.rf(this.Ee.time);c?(this.vf(c),this.Ee.resolve(c),this.Ee=null):this.Ge.isLive()||this.hasNext()||this.Ee.reject(A.SegmentInfoError.END_OF_STREAM_REACHED)}},c.prototype.Af=function(c){this.Ee&&(this.Ee.reject(c),this.Ee=null)},c.prototype.Bf=function(){var c=this.getSegmentListEntries(this.Ce);return c.length>0?c.length-1:0},c.prototype.Cf=function(c){for(var u,d=Math.abs(c),p=this.getSegmentDuration(),h=this.getSegmentListEntries(this.Ce),f=this.Bf(),m=0,g=h.length-1;g>=0&&!((m+=null!=(u=h[g].duration)?u:p)>=d);g--)f--;return Math.max(0,f)},c.prototype.timeShift=function(c,u,d){if(this.Ge.isLive()){var p=this.Be;this.Be=d&&this.Df()?this.Lf(d):this.Cf(c),this.ze.debug("timeShift changes index from ".concat(p," to ").concat(this.Be,", based on")+" offset ".concat(c," and target time ").concat(d))}},c.prototype.Df=function(){var c,u=null==(c=this.getSegmentListEntries(this.Ce)[0])?void 0:c.startTime;return(0,S.isNumber)(u)&&u>=0},c.prototype.updateRepresentation=function(c){return Promise.resolve(c)},c.prototype.isSegmentInfoLoaded=function(c){if(void 0===c&&(c=this.Ce),!c)return!1;var u=this.getSegmentListEntries(c),d=this.Ge.getRepresentationById(c);return!(!u.length||!d)},c.prototype.Ef=function(c){this.ze.debug("Rewinding segment list index by ".concat(c," segments")),this.Be-=c,this.Be<0&&(this.ze.debug("List array index is smaller than 0, probably a discontinuity. Using 0."),this.Be=0)},c.prototype.rewindOneSegment=function(){return this.Be--,!(this.Be<0&&(this.ze.debug("List array index is smaller than 0, probably a discontinuity. Using 0."),this.Be=0,1))},c.prototype.Ff=function(){return this.Ge.getPeriod(this.Ce)},c.prototype.Gf=function(c){var u=this.Ff().start;
14return(this.Ge.hasSinglePeriod()?this.getSeekableRange().start:u)+this.getSegmentListEntries(this.Ce).slice(0,c).reduce(function(c,u){return c+u.duration},0)},c.prototype.Hf=function(){return this.Ge.getRepresentationById(this.Ce)},c.prototype.If=function(c){if(c)return this.Ie[c.key()]},c.prototype.getSegmentListEntries=function(c){var u,d;return c?this.Ae.ENABLE_SEGMENT_INFO_PROVIDER_FROM_STORE&&this.Ge.isHlsManifest()?this.Jf(c):null!=(d=null==(u=this.If(c))?void 0:u.entries)?d:[]:[]},c.prototype.Jf=function(c){var u,d=null==(u=this.df())?void 0:u.getState();return(0,w.getSegmentInfos)(d,c.key())},c.prototype.Kf=function(c,u){var d,p;if(!this.De)return 0;for(var h=this.Ge.getPeriod(this.De),f=null!=(d=null==h?void 0:h.start)?d:0,m=this.getSegmentListEntries(this.Ce),g=0,v=f;v<=u&&g<m.length;g++)v+=null!=(p=m[g].duration)?p:0;return Math.max(g-1,0)},c.prototype.Lf=function(c){var u,d,p=this.If(this.Ce),h=this.getSegmentListEntries(this.Ce);if(!p||0===h.length||!(0,S.isNumber)(p.totalDuration))return 0;var f=this.Mf(),m=Math.max(null!=(u=this.Ge)&&u.isFirstPeriod(null==(d=this.Ce)?void 0:d.periodId)?f+this.Fe:f,c),g=p.totalDuration/h.length,v=(0,I.findSegmentIndexForTime)(h,m,g);return null!==v?v:this.Kf(p,m)},c.prototype.Mf=function(c){void 0===c&&(c=this.Ce);var u,d,p=null==(d=null==(u=this.Ge)?void 0:u.getPeriod(c))?void 0:d.start;return void 0!==p?p:(this.ze.debug("Unexpected period start of undefined for period ".concat(c.periodId,", falling back to 0")),0)},c.prototype.getLiveEdgeTime=function(){var c,u,d,p=null==(c=this.Ge)?void 0:c.getLastPeriod();if((null==p?void 0:p.start)===void 0)return 1/0;var h=null!=(u=this.Nf())?u:y.DurationConverter.getDurationInSec(null!=(d=p._duration)?d:"");return p.start+h},c.prototype.Nf=function(){var c;return null==(c=this.If(this.Ce))?void 0:c.totalDuration},c.prototype.getActualTimeShiftBufferDepth=function(){return this.Ge.getTimeShiftBufferDepthSeconds()},c.prototype.getSeekableRange=function(){var c={start:0,end:0},u=this.Ge.getTotalDuration();if(!this.Ge.isLive())return c.start=(0,m.getStartTimeOffset)(this.df().getState()),c.end=u,c;var d=this.Ge.getTimeShiftBufferDepthSeconds(),p=(0,b.toSeconds)(this.Ge.getRequestTimestamp()-this.Ge.getAvailabilityStartTime());if(c.start=Math.max(p+d,0),c.end=Math.max(p,0),_.ModuleManager.has(E.ModuleName.HLS)&&this.Ge.isHlsManifest()){var h=_.ModuleManager.get(E.ModuleName.HLS).selectors,f=h.getHlsState;"EVENT"===(0,h.getPlaylistType)(f(this.df().getState()))?(c.start=0,c.end=u):c.start+=this.Fe}return c.end-=this.Ge.getDesiredDistanceToLiveEdge(),c},c.prototype.getPendingSegmentInfoRequest=function(){return this.Ee},c.prototype.setPendingSegmentInfoRequest=function(c){this.Ee=c},c.prototype.canSwitchRepresentation=function(c){var u,d,p=this.getSegmentListEntries(this.Ce)[this.Be];if(!p)return!0;var h=(u=this.Ae.LL_HLS_SEGMENT_END_TIME_MATCHING_TOLERANCE,void 0!==p.startTime&&void 0!==p.duration&&Math.abs(c-(p.startTime+p.duration))<u);if(!k(p)&&h)return!0;var f=this.sf(c);return!(null!=(d=null==p?void 0:p.parts)&&d.length&&C(p,c,f)!==p.parts[0])},c.prototype.getLatestTimeForPossibleSwitch=function(c){var u,d=this.Of(c),p=d.isLoadingCurrentSegmentsParts,h=d.currentSegment;return h&&p&&null!=(u=h.startTime)?u:c},c.prototype.adjustTimeToNextSegmentStart=function(c){var u=this.Of(c),d=u.isLoadingCurrentSegmentsParts,p=u.currentSegment;return d&&null!=p&&p.startTime&&null!=p&&p.duration?p.startTime+p.duration:c},c.prototype.Of=function(c){var u,d=function(c,u){var d,p,h;if(u&&!(u.length<1)&&null!=(d=u[0])&&d.duration){var f=(0,I.findSegmentIndexForTime)(u,c,u[0].duration),m=c<(null!=(h=null==(p=u[0])?void 0:p.startTime)?h:1/0),g=u[u.length-1];if(void 0!==g.startTime&&void 0!==g.duration){var v=c>g.startTime+g.duration;if(!(null===f||m||v))return u[f]}}}(c,this.getSegmentListEntries(this.Ce)),p=null==(u=null==d?void 0:d.parts)?void 0:u[0],h=this.sf(c),f=!1;if(p&&d){var m=C(d,c,h);f=void 0!==m&&m!==p}return{currentSegment:d,isLoadingCurrentSegmentsParts:f}},c.prototype.dispose=function(){this.Ae=null,this.Ge=null,this.De=null,this.Ce=null,this.Ge=null,this.Ee=null,this.Ie=null},c}();function R(c,u,d){var p;c.length&&d.hasSegmentStartTimeForHlsRepresentation(u)&&(null!=c[0].startTime?p=(0,v.findIndexFromEnd)(c,function(c){return null!=c.startTime})+1:(c[0].startTime=d.getStartTimeForHlsSegment(u,c[0]),p=1),(0,v.forEachFromIndex)(c,p,function(c,u){return u.startTime=c.startTime+c.duration}))}function k(c){return c.url.endsWith(u.PHANTOM_SEGMENT_URL)}function x(c,u,d){d.forEach(function(d){return u[d]=c[d]})}function C(c,u,d){var p,h=null==(p=c.parts)?void 0:p.every(I.isSegmentTiming);if(c.parts&&h){var f=c.parts,m=f.reduce(function(c,u){return c+u.duration}
14,0)/f.length,g=(0,I.findSegmentIndexForTime)(f,u,m);if(null!=g)return d?c.parts[0]:(g=O(u,g,f),c.parts[g])}}function O(c,u,d){var p=d[u],h=p.startTime+p.duration;return Math.abs(c-p.startTime)<=Math.abs(c-h)?u:u+1}u.SegmentListMPDHandler=M},65244:function(c,u,d){var p,h,f=this&&this.__assign||function(){return(f=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.SegmentLoader=u.State=u.SegmentLoadingErrorReason=void 0;var m,g,v=d(66790),y=d(40306),b=d(3336),S=d(80813),_=d(3714),E=d(77401),T=d(4131),w=d(43446),P=d(91523),A=d(57456),I=d(29669),M=d(91678),R=d(46151),k=d(33436),x=d(70233),C=d(85434),O=d(89927),D=d(88844),L=d(23068),N=d(88052),U=d(62756),F=d(95880),B=d(34795),j=d(87187),H=d(44115),V=d(66628),z=d(92096),q=d(33004),W=d(17382),G=d(23133),K=d(94618),Y=d(689),X=d(97587);function Q(c){switch(c){case g.ABR_TIMEOUT:return m.ABR_TIMEOUT;case g.TIMEOUT:return m.TIMEOUT;default:return m.CANCEL}}(p=m||(u.SegmentLoadingErrorReason=m={})).CANCEL="CANCEL",p.ERROR_LOADING="ERROR_LOADING",p.ERROR_DECRYPTING="ERROR_DECRYPTING",p.BUSY="BUSY",p.UNKNOWN="UNKNOWN",p.TIMEOUT="TIMEOUT",p.ABR_TIMEOUT="ABR_TIMEOUT",(h=g||(u.State=g={}))[h.IDLE=1]="IDLE",h[h.LOADING=2]="LOADING",h[h.CANCELLING=3]="CANCELLING",h[h.TERMINATED=4]="TERMINATED",h[h.TIMEOUT=5]="TIMEOUT",h[h.ABR_TIMEOUT=6]="ABR_TIMEOUT",u.SegmentLoader=function(){function c(c,u,d,p,h){void 0===h&&(h=!1);var m=this;if(this.context=c,this.cancelLoading=function(c){var u,d,p,h,f,v,y;if(void 0===c&&(c=g.CANCELLING),(0,D.clearTimeoutIfDefined)(m.oJ),m.oJ=void 0,(0,D.clearIntervalIfDefined)(m.pJ),m.pJ=void 0,m.isLoading()){var b=m.yJ[m.BJ];if(delete m.yJ[m.BJ],m.FJ=c,m.qJ.cancel(),void 0!==m.zJ){var S=null!=(d=null==(u=m.zJ.responseTiming)?void 0:u.headersReceivedTimestamp)?d:-1,_=null!=(h=null==(p=m.zJ.responseTiming)?void 0:p.openedTimestamp)?h:-1,E=null!=(f=m.zJ.elapsedTime)?f:-1,w=S-_;E>=0&&w>=0&&E>w&&m.context.store.dispatch((0,M.addMetricsValue)(m.nJ,k.MetricType.DownloadInformation,{bytes:m.zJ.loadedBytes,time:E,timeToFirstByte:w})),null!=(v=m.zJ)&&v.chunks&&b&&m.WK(b),m.HJ={success:!1,httpStatus:408,url:m.BJ,downloadTime:E,size:m.zJ.loadedBytes,duration:null!=(y=m.AJ)?y:0,isInit:m.DJ,mimeType:m.nJ,uid:void 0,timeToFirstByte:(0,T.hasLoadedData)(m.zJ)?w:-1}}m.zJ=void 0}},this.dK=function(){var c,u,d,p=null!=(d=null==(u=null==(c=m.zJ)?void 0:c.responseTiming)?void 0:u.sendTimestamp)?d:-1;void 0===m.zJ||p<0||m.eK(f(f({},m.zJ),{elapsedTime:w.TimingUtil.getHiResTimestamp()-p}))},this.eK=function(c){var u,d=null!=(u=c.elapsedTime)?u:-1,p=m.yJ[m.BJ];m.zJ=f(f({},c),{segmentDuration:m.AJ,url:m.BJ,representationBitrate:p.bitrate}),m.DJ||d<=.5||m.FJ!==g.LOADING||m.rJ(m.zJ,p.internalRepresentationId)&&m.cancelLoading(g.ABR_TIMEOUT)},this.fK=function(c,u,d){var p,h,f,g,v,y,b=m.context.store.getState(),S=b?(0,R.getMetricsState)(b):void 0;if(m.context.logger.debug("Downloaded ".concat(m.nJ," ").concat(m.DJ?"init":"data"," segment in: ").concat(null==(p=c.elapsedTime)?void 0:p.toFixed(2),", TTFB: ").concat(null==(h=c.timeToFirstByte)?void 0:h.toFixed(2),", quality: ").concat(null!=(g=null==(f=m.yJ[m.BJ])?void 0:f.representationId)?g:"")),!m.DJ&&S&&m.nJ in S&&(m.context.store.dispatch((0,M.addMetricsValue)(m.nJ,k.MetricType.DownloadTime,u)),m.context.store.dispatch((0,M.addMetricsValue)(m.nJ,k.MetricType.DownloadSuccess,!0)),(0,A.isDownloadTimeInformationValid)(c)&&m.context.store.dispatch((0,M.addMetricsValue)(m.nJ,k.MetricType.DownloadInformation,{bytes:c.length,time:c.elapsedTime,timeToFirstByte:c.timeToFirstByte})),null==(v=m.zJ)?void 0:v.chunks)){m.lJ.debug("[SegmentLoader] ",m.zJ.chunks);var E=(0,W.calculateDownloadRates)(m.zJ.chunks),T=(0,W.calcAverage)((0,W.filterValuesExceedingAverageByMargin)(E)),w=m.zJ.loadedBytes,P=m.yJ[m.BJ],I=P.duration,x=void 0!==I?(0,q.bytesToBits)(w)/I:void 0,C=P.bitrate;m.lJ.debug("[SegmentLoader] DL rate (AVG-based filter): ".concat((0,W.bpsToMbps)(T),", segmentBitrate: ").concat(x)),m.context.store.dispatch((0,M.addMetricsValue)(m.nJ,k.MetricType.ChunkedDownloadInformation,{downloadRate:T,segmentBitrate:x,representationBitrate:C}))}(0,D.clearTimeoutIfDefined)(m.oJ),m.oJ=void 0,(0,D.clearIntervalIfDefined)(m.pJ),m.pJ=void 0;var O={success:!0,httpStatus:c.status,url:c.url,downloadTime:c.elapsedTime,size:c.length,duration:m.AJ,isInit:m.DJ,mimeType:m.nJ,uid:m.CJ,timeToFirstByte:null!=(y=c.timeToFirstByte)?y:-1};m.mJ.dispatchEvent(_.PlayerEvent.SegmentRequestFinished,O)},this.LJ=p,this.lJ=c.logger,this.mJ=c.eventHandler,this.tJ=c.config.tweaks.segmentLoaderArgs||null,this.sJ=c.config.tweaks.segmentLoader||null,this.AJ=1,this.FJ=g.IDLE,this.nJ=u,this.rJ=d,this.xJ=null,this.yJ={},this.HJ=null,this.KJ=h,N.ModuleManager.has(U.ModuleName.ContainerMP4)){var v=N.ModuleManager.get(U.ModuleName.ContainerMP4);this.JJ=new v.CmafChunkParser(this.context)}this.oK()}return c.prototype.WK=function(c){var u,d,p,h,f,m,g,v,y=(null!=(p=null==(d=null==(u=this.zJ)?void 0:u.responseTiming)?void 0:d.progressTimestamp)?p:w.TimingUtil.getHiResTimestamp())-(null!=(m=null==(f=null==(h=this.zJ)?void 0:h.responseTiming)?void 0:f.headersReceivedTimestamp)?m:0),b=(0,q.bytesToBits)(null!=(v=null==(g=this.zJ)?void 0:g.loadedBytes)?v:0)/y,S=void 0===c.duration?1:Math.max(1-y/c.duration,.1);this.context.store.dispatch((0,M.addMetricsValue)(this.nJ,k.MetricType.ChunkedDownloadInformation,{downloadRate:b*S,segmentBitrate:void 0,representationBitrate:c.bitrate}))},c.prototype.isLoading=function(){var c=!!(this.uJ&&this.uJ.isLoading());return this.FJ===g.LOADING||this.FJ===g.CANCELLING||this.qJ&&this.qJ.isLoading()||c},c.prototype.isRetrying=function(){return this.qJ&&this.qJ.isRetrying()},c.prototype.load=function(c){var u=this;if(this.isLoading())return this.lJ.debug("Error loading segment, loader is busy!"+this.BJ),Promise.reject({reason:m.BUSY});this.qJ&&this.qJ.dispose();var d=this.XK(c);return this.HJ=null,this.zJ=void 0,this.qJ=(0,Y.getLoader)(this.context,d),this.FJ=g.LOADING,this.BJ=c.url,this.CJ=btoa(this.BJ),this.yJ[this.BJ]=c,this.DJ=c.isInitSegment,this.AJ=c.duration,this.xJ=this.YK(c).then(function(){return u.gK(c)}).catch(function(c){throw u.FJ=g.IDLE,u.xJ=null,c}),this.xJ},c.prototype.XK=function(c){var u=f({},this.GJ);return c.isPreloadHint&&(u.maxRetries=0),(c.isInitSegment||c.preventDownloadCanceling||function(c,u){var d,p=null==(d=null==c?void 0:c.serviceManager)?void 0:d.get(S.ServiceName.AdaptationService);if(!p||!u.mimeType||!u.representationId)return!1;var h=p.getLowestRepresentationId(u.mimeType);return u.representationId===h}(this.context,c))&&(u.disableDownloadTimeout=!1,c.preventDownloadCanceling=!0),u},c.prototype.YK=function(c){var u,d=this;this.EJ=c.key;var p=!!(null!=(u=this.EJ)&&u.buffer);if(!this.EJ||p)return Promise.resolve();switch(this.EJ.method){case v.HlsEncryptionMethod.AES_128:return this.aK(c).then(function(c){c&&(d.EJ.buffer=c)});case v.HlsEncryptionMethod.SAMPLE_AES:return this.EJ.keyformat===v.APPLE_KEYFORMAT_DELIVERY?Promise.resolve():(this.mJ.fireError(new b.PlayerError(y.ErrorCode.SOURCE_ENCRYPTION_METHOD_NOT_SUPPORTED,{"encryption-method":this.EJ.method,supported:v.HlsEncryptionMethod.AES_128},"The ".concat(v.HlsEncryptionMethod.SAMPLE_AES," encryption method is not supported."),this.LJ.sourceIdentifier)),Promise.reject({reason:m.ERROR_DECRYPTING}));case v.HlsEncryptionMethod.SAMPLE_AES_CTR:return Promise.resolve();default:return Promise.reject({reason:m.ERROR_DECRYPTING})}},c.prototype.getCurrentLoadPromise=function(){return this.xJ},c.prototype.ZK=function(){var c;return null==(c=this.context.serviceManager)?void 0:c.get(S.ServiceName.SourceStoreService,this.LJ.sourceIdentifier)},c.prototype.aK=function(c){var u,d,p=null==(u=c.key)?void 0:u.uri,h=this.ZK();if(!h||!p)return Promise.reject(Error("Source store not available."));var f=h.getState(),m=(0,V.getEncryptionKey)(f,p);return null!=m&&m.uri&&m.loadState!==z.KeyLoadState.Cancel?m.key?Promise.resolve(x.FormatHelper.hexToBytes(m.key).buffer):(0,G.waitForKeyToBeLoaded)(h,p):(null!=this.uJ||(this.uJ=new K.KeyLoader(this.context)),(0,G.addEncryptionKeyToStore)(p,this.uJ,h))},c.prototype.bK=function(c,u){var d;return this.KJ||!(null!=(d=this.context.adRestorationOptimizationService)&&d.hasPrefetchedSegment(u))?null:(this.yJ[c]&&(this.yJ[c].wasPrefetched=!0),this.context.adRestorationOptimizationService.getPrefetchedSegment(u,this.rJ))},c.prototype.cK=function(){(0,D.clearIntervalIfDefined)(this.pJ);var c=(0,O.toMilliSeconds)(this.context.settings.SEGMENT_LOADING_PROGRESS_CHECK_INTERVAL);this.pJ=c<=0?void 0:window.setInterval(this.dK,c)},c.prototype.gK=function(c){var u,d=this,p={};c.byteRange&&(p.Range=["bytes=",c.byteRange.start,"-",c.byteRange.end].join(""));var h=this.LJ.source,f=null!=h&&h.options?!!h.options.withCredentials:void 0;(0,D.clearTimeoutIfDefined)(this.oJ),this.oJ=void 0,(0,D.clearIntervalIfDefined)(this.pJ),this.pJ=void 0,c.preventDownloadCanceling||(this.oJ=window.setTimeout(function(){return d.cancelLoading(g.TIMEOUT)},(0,P.getRequestTimeout)(this.context,this.GJ.requestType)));var m=this.bK(this.BJ,c);if(m)return this.context.logger.debug("return prefetched segment for",this.BJ),m.then(function(c){var u=new X.Stream;return d.nK(),u.add(c),c.getSegmentInfo().wasPrefetched=!0,u.end(),u}).catch(function(c){throw c});var v=null==(u=this.ZK())?void 0:u.getState(),y=v&&(0,H.getContainerFormat)(v,C.MimeTypeHelper.getMediaType(this.nJ)),b=(null==y?void 0:y.source)===B.ContainerFormat.MP4,S=!!this.EJ||!!this.wJ,_=this.context.settings.CHUNKED_CMAF_STREAMING&&this.JJ&&b&&!c.isInitSegment&&!S;return this.cK(),this.qJ.load(this.BJ,I.HttpRequestMethod.GET,I.HttpResponseType.ARRAYBUFFER,null,p,f,this.nJ,_).then(function(c){return d.mK(c.body)}).catch(function(c){throw d.hK(c)})},c.prototype.hK=function(c){var u,d;return[g.CANCELLING,g.TIMEOUT,g.ABR_TIMEOUT].includes(this.FJ)?(this.lJ.debug("Cancelled ".concat(this.nJ," download [").concat(this.BJ,"]")),this.HJ&&(null==(u=this.mJ)||u.dispatchEvent(_.PlayerEvent.SegmentRequestFinished,this.HJ)),d={reason:Q(this.FJ)}):this.FJ===g.LOADING&&(d={reason:m.ERROR_LOADING,info:{response:c,isInit:this.DJ}}),d}
14,c.prototype.getAllLoadingPeriodIds=function(){var c=this;return Object.keys(this.yJ).map(function(u){var d;return null==(d=c.yJ[u])?void 0:d.periodId}).filter(L.isDefined)},c.prototype.getCurrentLoadingSegmentInfo=function(){return this.isLoading()&&this.BJ&&this.yJ[this.BJ]?this.yJ[this.BJ]:null},c.prototype.attachDecrypter=function(c){this.wJ=this.wJ||c},c.prototype.attachClearKeyLoader=function(c){this.vJ=this.vJ||c},c.prototype.terminate=function(){var c,u=this;this.isLoading()?(null==(c=this.xJ)||c.catch(function(){u.FJ=g.TERMINATED}),this.cancelLoading()):this.FJ=g.TERMINATED},c.prototype.iK=function(c){var u,d=this.DJ?j.SegmentInitType.INIT:j.SegmentInitType.NONE,p=this.yJ[this.BJ],h=new j.Segment(c,this.nJ,null!=(u=p.codecs)?u:null,p.periodId,this.AJ,d,!0,c.byteLength,p.internalRepresentationId,p.startTime);return h.setUrl(this.BJ),h.setSegmentInfo(p),h},c.prototype.jK=function(c,u){return this.EJ&&this.EJ.method===v.HlsEncryptionMethod.AES_128&&!u?this.kK(c):this.wJ?this.lK(c):Promise.resolve(c)},c.prototype.kK=function(c){var u,d;return N.ModuleManager.has(U.ModuleName.Crypto)?null!=(u=this.EJ)&&u.buffer&&null!=(d=this.EJ)&&d.iv?(this.lJ.debug("Decrypting AES-128-encrypted segment ".concat(this.BJ,", ")+"KEY: 0x".concat(x.FormatHelper.bytesToHex(this.EJ.buffer),", ")+"IV: 0x".concat(this.EJ.iv)),new(N.ModuleManager.get(U.ModuleName.Crypto)).CryptoApi(this.context,"AES-CBC",this.EJ.buffer,this.EJ.iv,this.nJ).decrypt(c).then(function(c){if(!c||0===c.byteLength)throw{reason:m.ERROR_DECRYPTING};return c}).catch(function(){throw{reason:m.ERROR_DECRYPTING}})):(this.lJ.debug("Error decrypting AES-128-encrypted segment, missing key or IV"),Promise.reject({reason:m.ERROR_DECRYPTING})):(this.context.eventHandler.fireError(new F.PlayerModuleMissingError(U.ModuleName.Crypto)),Promise.reject({reason:m.ERROR_DECRYPTING}))},c.prototype.lK=function(c){var u=this,d=Promise.resolve(c);if(this.DJ)d=this.wJ.parseInitSegment(c),this.vJ&&(d=d.then(function(c){return u.vJ.load(u.wJ.getKeyIds()).then(function(d){return u.wJ.addKeys(d),Promise.resolve(c)})}));else if(this.wJ.isEncrypted()){var p=x.FormatHelper.bytesToHex(this.wJ.getKey());this.lJ.debug("Decrypting SAMPLE-AES-encrypted segment ".concat(this.BJ,", KEY: 0x").concat(p)),d=this.wJ.decryptDataSegment(c)}return d.catch(function(){throw{reason:m.ERROR_DECRYPTING}})},c.prototype.mK=function(c,u){var d=this;if(void 0===u&&(u=!1),c instanceof ArrayBuffer){this.IJ=new X.Stream;var p=Date.now();this.jK(c,u).then(function(u){d.FJ===g.TERMINATED||d.FJ===g.CANCELLING?d.IJ.abort(m.CANCEL):(d.IJ.add(d.iK(u)),d.IJ.end());var h,f=d.yJ[d.BJ];if(c!==u&&f){var v=(0,O.toSeconds)(Date.now()-p),y=f.internalRepresentationId;d.context.store.dispatch((0,M.addMetricsValue)(d.nJ,k.MetricType.DecryptionTime,{time:v,representationId:y})),d.context.logger.debug("Decrypted ".concat(d.nJ," segment in: ").concat(null==v?void 0:v.toFixed(2),", quality: ").concat(null!=(h=null==y?void 0:y.representationId)?h:""))}}).catch(function(){return d.IJ.abort(m.ERROR_DECRYPTING)}).finally(function(){return d.nK()})}else this.IJ=c.transform(function(c){return d.JJ.appendData(c),d.JJ.getCompleteChunks()},function(){},function(c){return c.message}).transform(function(c){return d.iK(c)},function(){return d.nK()},function(c){d.lJ.debug("Error handling fetch segment request",c);var u=m.ERROR_LOADING;return c.message===E.RequestError.Canceled&&(u=Q(d.FJ)),d.nK(),u});return Promise.resolve(this.IJ)},c.prototype.nK=function(){this.FJ=g.IDLE,this.xJ=null,this.JJ&&this.JJ.reset(),this.yJ&&delete this.yJ[this.BJ]},c.prototype.dispose=function(){this.terminate(),(0,D.clearTimeoutIfDefined)(this.oJ),(0,D.clearIntervalIfDefined)(this.pJ),this.qJ&&this.qJ.dispose&&this.qJ.dispose(),this.uJ&&this.uJ.dispose(),N.ModuleManager.has(U.ModuleName.Crypto)&&N.ModuleManager.get(U.ModuleName.Crypto).WebWorkerCrypto.dispose(),this.qJ=null,this.sJ=null,this.tJ=null,this.uJ=null,this.BJ=null,this.CJ=null,this.EJ=null,this.yJ={},this.zJ=void 0,this.wJ=null,this.mJ=null},c.prototype.oK=function(){var c=this;this.GJ=f(f({},(0,Y.getLoaderConfig)(this.context,this.nJ)),{onSuccess:this.fK,onProgress:this.eK,onFailure:function(u,d){var p,h;c.context.store.dispatch((0,M.addMetricsValue)(c.nJ,k.MetricType.DownloadSuccess,!1)),(null==d?void 0:d.name)===E.RequestError.TimedOut&&(c.FJ=g.TIMEOUT),(0,D.clearTimeoutIfDefined)(c.oJ),c.oJ=void 0,(0,D.clearIntervalIfDefined)(c.pJ),c.pJ=void 0,delete c.yJ[c.BJ],c.mJ.dispatchEvent(_.PlayerEvent.SegmentRequestFinished,{success:!1,httpStatus:u&&u.status||0,url:null!=(p=null==u?void 0:u.url)?p:c.BJ,downloadTime:-1,size:-1,duration:c.AJ,isInit:c.DJ,mimeType:c.nJ,uid:void 0,timeToFirstByte:null!=(h=null==u?void 0:u.timeToFirstByte)?h:-1})}})},c}()}
vendor: 4,513 bytes, line 14
14,71018:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.SegmentLoaderPool=void 0,u.getLoaderPoolSize=P;var p=d(91678),h=d(46151),f=d(33436),m=d(15971),g=d(94685),v=d(85434),y=d(23068),b=d(88052),S=d(62756),_=d(39523),E=d(99529),T=d(65439),w=d(65244);function P(c,u){var d=v.MimeTypeHelper.extractContentType(c);return u&&(0,y.isNumber)(u[d])?Math.max(1,u[d]):1}function A(c){return!!(null!=c&&c.LA_URL)}function I(c){return(null==c?void 0:c.length)>0}u.SegmentLoaderPool=function(){function c(c,u){this.context=c,this.z1=c.sourceContext,this.w1=u.mimeType,this.x1=[],this.y1=u.shouldDownloadBeCancelledCallback,this.addLoaders(P(this.w1,c.settings.SEGMENT_LOADER_POOL_SIZE)),this.C1()}return c.prototype.addLoaders=function(c){for(var u=0;u<c;u++)this.x1.push(new w.SegmentLoader(this.context,this.w1,this.y1,this.z1))},c.prototype.A1=function(c){if(this.context.segmentPrefetchingService&&this.context.segmentPrefetchingService.hasMp4Decrypter(this.w1,this.z1))return this.context.segmentPrefetchingService.getDecrypter(this.w1,this.z1);var u=b.ModuleManager.get(S.ModuleName.Crypto).createDecrypter,d=I(c.drm.clearkey)?c.drm.clearkey:[];return u(this.context,this.w1,d)},c.prototype.B1=function(c){return new(b.ModuleManager.get(S.ModuleName.Crypto)).ClearKeyLoader(this.context,c)},c.prototype.C1=function(){var c,u,d=this.z1.source,p=I(null==(c=null==d?void 0:d.drm)?void 0:c.clearkey)||A(null==(u=null==d?void 0:d.drm)?void 0:u.clearkey)?this.A1(d):null;if(p&&(this.x1.forEach(function(c){return c.attachDecrypter(p)}),this.context.segmentPrefetchingService&&this.context.segmentPrefetchingService.setDecrypter(p,this.w1,this.z1),A(d.drm.clearkey))){var h=this.B1(d.drm.clearkey);this.x1.forEach(function(c){return c.attachClearKeyLoader(h)})}},c.prototype.isLoading=function(){return this.x1.some(function(c){return c.isLoading()})},c.prototype.isFreeLoaderAvailable=function(){return this.x1.some(function(c){return!c.isLoading()})},c.prototype.D1=function(c){var u=(0,h.getMetricsHistoryFromInstanceState)(this.context.store.getState(),"default",f.MetricType.RequestedRepresentations);(u?u.map(function(c){return c.value}):[]).includes(c)||this.context.store.dispatch((0,p.addMetricsValue)("default",f.MetricType.RequestedRepresentations,c))},c.prototype.load=function(c){var u=this.x1.find(function(c){return!c.isLoading()});if(!u)return this.context.logger.debug("Failed to load segment. No free loader!",c.url),Promise.reject(null);this.D1(c.internalRepresentationId),this.context.logger.debug("[SegmentLoader ".concat(this.x1.indexOf(u),"][").concat(c.mimeType,"][").concat(c.representationId,"] Loading ").concat(c.startTime," ").concat(c.url));var d=(0,T.getSegmentInfoTimeRange)(c),p=(0,E.getTrackIdentifier)(c),h=(0,m.getSourceStore)(this.context);return d&&(null==h||h.dispatch((0,_.addStreamTimeRange)(p,d,E.StreamTimeRangeType.Loading))),u.load(c).catch(function(c){throw d&&(null==h||h.dispatch((0,_.removeStreamTimeRange)(p,d,E.StreamTimeRangeType.Loading))),c})},c.prototype.cancelLoading=function(){var c=this;return Promise.all(this.x1.map(function(c){return c.isLoading()&&c.cancelLoading(),Promise.resolve(c.getCurrentLoadPromise())})).then(function(){}).catch(function(u){(null==u?void 0:u.reason)!==w.SegmentLoadingErrorReason.CANCEL&&(0,g.isContextAvailable)(c.context)&&c.context.logger.debug("Error while loading a segment ",u)})},c.prototype.getLoadingPeriodIds=function(){return this.x1.flatMap(function(c){return c.getAllLoadingPeriodIds()})},c.prototype.dispose=function(){this.cancelLoading(),this.x1.forEach(function(c){return c.dispose()}),this.x1=null},c}()},98892:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.SegmentPreProcessor=void 0;var p=d(80813),h=d(3714),f=d(91678),m=d(33436),g=d(15971),v=d(85434),y=d(66502),b=d(88052),S=d(62756),_=d(23940),E=d(39523),T=d(99529),w=d(60729),P=d(73794),A=d(37641),I=d(77286),M=d(65439),R=d(63066);function k(c,u){return!u.isAvMuxedTogether||v.MimeTypeHelper.isVideo(c.getMimeType())}function x(c){return v.MimeTypeHelper.isSubtitle(c.getMimeType())}u.SegmentPreProcessor=function(){function c(c,u,d,h,f,m,g){this.context=c,this.mimeType=u,this.onDataAvailableCallback=d,this.hls=h,this.segmentUnavailabilityHandler=f,this.timestampOffsetService=m,this.segmentParser=g,this.rK=!1,this.sK=null;var v=c.sourceContext.sourceIdentifier;this.pK=this.context.serviceManager.get(p.ServiceName.ManifestService,v)}return Object.defineProperty(c.prototype,"uK",{get:function(){return this.context.logger}
14,enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"vK",{get:function(){return this.context.eventHandler},enumerable:!1,configurable:!0}),c.prototype.setHlsTimelineTracker=function(c){this.qK=c},c.prototype.setMpdHandler=function(c){this.tK=c},c.prototype.onMuxedSegmentAvailable=function(c,u,d,p){var h=this,f=u.find(function(c){return k(c,h.hls)});if(f){var m,v,y,b,S,_,w=!f.getRepresentationId().equals(this.sK),P=this.BK(f,d,w),A=P.shouldMakeSegmentAvailable,I=P.shouldCacheSegment;A?u.forEach(function(u){var f=c.metadata[c.transmuxedSegments.indexOf(u)];h.onSegmentAvailable(u,f,d,p)||p.cacheSegment(c.originalSegment)}):(I&&p.cacheSegment(c.originalSegment),m=c.originalSegment,v=this.context,y=(0,g.getSourceStore)(v),b=m.getSegmentInfo(),S=(0,M.getSegmentInfoTimeRange)(b),_=(0,T.getTrackIdentifier)(b),y&&S&&y.dispatch((0,E.removeStreamTimeRange)(_,S,T.StreamTimeRangeType.Loading)))}},c.prototype.onSegmentAvailable=function(c,u,d,p){var h,f,m;return this.uK.debug("onSegmentAvailable ".concat(c.getMimeType()).concat(c.isInit()?" init":""," segment [").concat(c.getUrl(),"]")),this.segmentUnavailabilityHandler.downloadSuccess(c.isInit()),null==(f=(h=this.tK).generateSmoothInitSegment)||f.call(h,c,this.segmentParser),this.hls.isTransmuxingRequired||y.TextSegmentAnalyzer.isPlainTextPayload(c.getData())||null==(m
vendor: 4,422 bytes, line 14
14=this.segmentParser)||m.parseSegment(c),!!c.isInit()||this.wK(c,u,d,p)},c.prototype.wK=function(c,u,d,h){var f,m,v,b,S,_,w,A,I,R,C=this,O=!c.getRepresentationId().equals(this.sK);k(c,this.hls)&&O&&this.yK(c,this.sK);var D=this.hls.isTransmuxingRequired,L=!0;if(this.pK.isHlsManifest()){if(this.xK(c),!D&&!y.TextSegmentAnalyzer.isPlainTextPayload(c.getData())){(isNaN(this.tK.getTimestampOffset())||0===this.tK.getTimestampOffset())&&(0,P.initializeHlsSegmentStartTimes)(c,this.context,this.tK),this.timestampOffsetService.maybeAdjustTimestampOffsetAtDiscontinuityChange(c,this.tK)&&(null==(w=this.segmentParser)||w.parseSegment(c));var N=this.BK(c,d,O),U=N.shouldMakeSegmentAvailable,F=N.shouldCacheSegment;if(!U)return F&&h.cacheSegment(c),!1}x(c)&&this.timestampOffsetService.maybeAdjustTimestampOffsetAtDiscontinuityChange(c,this.tK),this.pK.initSegmentStartTimesFromReferenceSegment(c)}if(D&&this.hls.possiblyDependentSegments&&O&&k(c,this.hls)&&!this.rK){this.uK.debug("Just switched playlists, isIndependentlyDecodable=".concat(c.isIndependentlyDecodable(),", (").concat(c.getMimeType(),", ").concat(c.getUrl(),")"));var B=this.tK.getIndex()>1;!c.isIndependentlyDecodable()&&B&&(this.uK.debug("Started keyframe recovery"),this.tK.setIndex(this.tK.getIndex()-2),L=!1,this.hls.discardNextSegment=!0,this.rK=!0)}if(!L)return!1;f=this.context,m=(0,g.getSourceStore)(f),v=c.getSegmentInfo(),b=(0,M.getSegmentInfoTimeRange)(v),S=c.getPlaybackTimeRange(),_=(0,T.getTrackIdentifier)(v),m&&b&&S&&(m.dispatch((0,E.removeStreamTimeRange)(_,b,T.StreamTimeRangeType.Loading)),m.dispatch((0,E.addStreamTimeRange)(_,S,T.StreamTimeRangeType.Loading))),this.context.serviceManager.get(p.ServiceName.TimedMetadataService).onSegmentAvailable({segment:c,extractedMetadata:u,isSegmentOfMainStream:k(c,this.hls),presentationTimeOffset:this.tK.getTimestampOffset()}),this.context.serviceManager.maybeCall(p.ServiceName.SubtitleService,function(d){d.handleClosedCaptions(C.tK,c,null==u?void 0:u.closedCaptions,D)},void 0,null==(A=this.context.sourceContext)?void 0:A.sourceIdentifier);var j=c.getPlaybackTime(),H=null==(I=c.getSegmentInfo())?void 0:I.startTime,V=H?Math.abs(j-H):void 0;return this.uK.debug("[".concat("SegmentPreProcessor","][").concat(c.getMimeType(),"]: playbackTimeForSegment=").concat(j," expected=").concat(H," (diff=").concat(null==V?void 0:V.toFixed(3),") ").concat(c.getUrl())),k(c,this.hls)&&(null==(R=this.qK)||R.trackPlaybackTime(c),this.rK=!1),this.onDataAvailableCallback(c),L},c.prototype.xK=function(c){var u=b.ModuleManager.get(S.ModuleName.LowLatency,!1);(0,w.isPlayingLowLatencyHls)(this.context)&&u&&u.applyUpdatedSegmentInfoProps(c,this.pK)},c.prototype.yK=function(c,u){this.zK(c.getMimeType(),u,c.getRepresentationId());var d=c.getSegmentInfo(),p={id:d.representationId,bitrate:d.bitrate,width:d.width,height:d.height};this.context.store.dispatch((0,f.addMetricsValue)(this.mimeType,m.MetricType.DownloadedRepresentation,p)),this.sK=c.getRepresentationId()},c.prototype.zK=function(c,u,d){if(v.MimeTypeHelper.isVideo(c))p=h.PlayerEvent.VideoDownloadQualityChanged;else{if(!v.MimeTypeHelper.isAudio(c))return;p=h.PlayerEvent.AudioDownloadQualityChanged}var p,f=(0,_.representationToQuality)(this.pK.getRepresentationById(u),c),m=(0,_.representationToQuality)(this.pK.getRepresentationById(d),c);this.vK.dispatchEvent(p,{targetQuality:m,targetQualityId:m.id,sourceQuality:f,sourceQualityId:f?f.id:null})},c.prototype.AK=function(c,u){var d={hasGap:!1};if(c&&this.pK.isHlsManifest()&&!x(c)&&k(c,this.hls)&&this.qK){var p=I.SegmentInfoProvider.findHlsRepresentationForSegment(c,this.pK.getAdaptationSet(u));if(p&&(d=this.qK.checkForTimelineGap(c,p.representation,p.index)).hasGap&&void 0!==d.correctedIndex){this.uK.debug("Encountered timeline gap (".concat(d.gapSizeSec,"), just loaded ").concat(c.getUrl()));var h=p.representation._internalId,f=this.tK instanceof R.SegmentListMPDHandler&&this.tK.getSegmentListEntries(h)&&this.tK.getSegmentListEntries(h)[d.correctedIndex];if(f&&(0,A.areSegmentsIdentical)(c.getSegmentInfo(),f))return this.uK.debug("Gap handling: Segment is identical to the one we just loaded, not rewinding"),d.hasGap=!1,d;f&&f.hasDownloadFailed?(this.uK.debug("Gap handling: Could not handle gap, segment has failed to download"),d.couldHandle=!1):(this.uK.debug("Gap handling: Correcting index from ".concat(this.tK.getIndex()," to ").concat(d.correctedIndex)),this.tK.setIndex(d.c
14orrectedIndex))}}return d},c.prototype.BK=function(c,u,d){if(!(this.qK.isGapVerificationNeeded()||this.qK.isSeekTargetVerificationNeeded()||d))return{shouldMakeSegmentAvailable:!0,shouldCacheSegment:!1};var p,h=this.AK(c,u);return h.hasGap?h.couldHandle?(null!=(p=h.gapSizeSec)?p:0)>0?{shouldMakeSegmentAvailable:!1,shouldCacheSegment:!0}:{shouldMakeSegmentAvailable:!1,shouldCacheSegment:!1}:(this.qK.reset(),{shouldMakeSegmentAvailable:!0,shouldCacheSegment:!1}):{shouldMakeSegmentAvailable:!0,shouldCacheSegment:!1}},c.prototype.dispose=function(){this.sK=null,this.qK=null,this.pK=null,this.onDataAvailableCallback=null,this.hls=null,this.segmentUnavailabilityHandler=null,this.timestampOffsetService=null,this.segmentParser=null,this.tK=null},c}()},11991:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.SegmentPrefetcher=void 0;var p=d(94685),h=d(19483),f=d(65244);u.SegmentPrefetcher=function(){function c(c){var u=this;this.TK=function(c){var d=u.NK.get(c);d&&0!==d.length&&u.UK(d.shift()).then(function(){return u.TK(c)})},this.NK=new h.ArrayMap,this.PK=new Map,this.OK=new Map,this.QK=new Map,this.RK=c,this.SK=new Map}return c.prototype.updateContext=function(c,u){this.LK=c,this.MK=u??c.sourceContext},c.prototype.setShouldDownloadBeCancelledCallback=function(c,u){this.SK.set(c,u)},c.prototype.removeShouldDownloadBeCancelledCallback=function(c){this.SK.delete(c)},c.prototype.setDecrypter=function(c,u){this.OK.set(u,c),this.QK.has(u)&&this.QK.get(u).attachDecrypter(c)},c.prototype.removeDecrypter=function(c){this.OK.delete(c)},c.prototype.getDecrypter=function(c){return this.OK.get(c)},c.prototype.prefetchSegment=function(c){return this.UK(c)},c.prototype.prefetchSegments=function(c){var u=this;c.forEach(function(c){return u.NK.add(c.mimeType,c)}),this.NK.keys.forEach(function(c){return u.TK(c)})},c.prototype.UK=function(c){var u=this,d=this.gL(c.mimeType).then(function(){return u.VK(c)}).then(function(){}).catch(function(){});return this.PK.set(c.mimeType,d),d},c.prototype.VK=function(c){var u=this;if(!(0,p.isContextAvailable)(this.LK))return Promise.reject("PlayerContext not available");var d=this.hL(c).load(c).then(function(c){return c.read()}).then(function(c){return c.value});return this.RK.onPrefetch({segmentInfo:c,loadingPromise:d}),d.catch(function(d){(0,p.isContextAvailable)(u.LK)&&u.LK.logger.debug("segment prefetching failed for",c,"with",d)}),d},c.prototype.gL=function(c){return this.PK.has(c)||this.PK.set(c,Promise.resolve()),this.PK.get(c)},c.prototype.hL=function(c){return this.QK.has(c.mimeType)||this.QK.set(c.mimeType,this.iL(c)),this.QK.get(c.mimeType)},c.prototype.iL=function(c){this.PK.set(c.mimeType,Promise.resolve());var u=new f.SegmentLoader(this.LK,c.mimeType,this.jL(c),this.MK,!0);return u.attachDecrypter(this.OK.get(c.mimeType)),u},c.prototype.jL=function(c){var u=this;return function(d){var p=c.mimeType,h=u.QK.get(p),f=h?h.getCurrentLoadingSegmentInfo():null,m=void 0!==p?u.SK.get(p):void 0,g=f?f.internalRepresentationId:c.internalRepresentationId;return void 0!==m&&m(d,g)}},c.prototype.clearPrefetchingQueue=function(c){this.NK.delete(c)},c.prototype.reset=function(){this.NK.clear(),this.QK.forEach(function(c){return c.dispose()}),this.SK.clear(),this.QK.clear(),this.OK.clear()},c.prototype.dispose=function(){this.reset(),this.QK=null,this.SK=null},c}()},54015:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.SegmentPrefetchingService=void 0;var p=d(25248),h=d(11991);u.SegmentPrefetchingService=function(){function c(){this.Qf=new Map,this.Rf=new Map}return c.prototype.updatePlayerContext=function(c){this.Pf=c;var u,d,p=null==(u=c.sourceContext)?void 0:u.sourceIdentifier;p&&(null==(d=this.Qf.get(p))||d.updateContext(c))},c.prototype.setDecrypter=function(c,u,d){this.Tf(d).setDecrypter(c,u)},c.prototype.removeDecrypter=function(c,u){this.Tf(u).removeDecrypter(c)},c.prototype.getDecrypter=function(c,u){return this.Tf(u).getDecrypter(c)},c.prototype.hasMp4Decrypter=function(c,u){return!!this.getDecrypter(c,u)},c.prototype.setShouldDownloadBeCancelledCallback=function(c,u,d){this.Tf(d).setShouldDownloadBeCancelledCallback(c,u)},c.prototype.removeShouldDownloadBeCancelledCallback=function(c,u){this.Tf(u).removeShouldDownloadBeCancelledCallback(c)},c.prototype.fetch=function(c,u){var d=this,h=u.sourceIdentifier;return this.Tf(u).prefetchSegment(c).then(function(){var u,f,m=c.mimeType?null==(f=null==(u=d.Vf(h))?void 0:u.get(c.mimeType))?void 0:f.get((0,p.getSegmentInfoId)(c)):void 0;return m?Promise.resolve(m.loadingPromise):Promise.reject()})},c.prototype.fetchAll=function(c,u){this.Tf(u).prefetchSegments(c)},c.prototype.hasPrefetchedSegment=function(c,u){return!!this.Sf(c,u)},c.prototype.getPrefetchedSegment=function(c,u){var d=this.Sf(c,u);return d?d.loadingPromise:null},c.prototype.Sf=function(c,u){var d,h,f=u.sourceIdentifier,m=this.Vf(f);return c.mimeType&&null!=m&&m.has(c.mimeType)&&null!=(h=null==(d=m.get(c.mimeType))?void 0:d.get((0,p.getSegmentInfoId)(c)))?h:null}
vendor: 9,165 bytes, line 14
14,c.prototype.getPrefetchedSegments=function(c){return this.Vf(c.sourceIdentifier)},c.prototype.removePrefetchedSegment=function(c,u){var d=u.sourceIdentifier,h=this.Vf(d);c.mimeType&&null!=h&&h.has(c.mimeType)&&h.get(c.mimeType).delete((0,p.getSegmentInfoId)(c))},c.prototype.clearPrefetchingQueue=function(c,u){var d=u.sourceIdentifier,p=this.Qf.get(d);null==p||p.clearPrefetchingQueue(c)},c.prototype.reset=function(){this.Qf.forEach(function(c){return c.reset()}),this.Qf.clear(),this.Rf.clear()},c.prototype.dispose=function(){this.Qf.forEach(function(c){return c.dispose()}),this.Qf.clear(),this.Rf=null},c.prototype.Tf=function(c){var u=this,d=c.sourceIdentifier;if(!this.Qf.has(d)){var p=new h.SegmentPrefetcher({onPrefetch:function(c){return u.Uf(d,c)}});p.updateContext(this.Pf,c),this.Qf.set(d,p)}return this.Qf.get(d)},c.prototype.Uf=function(c,u){var d,h=u.segmentInfo.mimeType;if(void 0!==h){var f=this.Wf(c);f.has(h)||f.set(h,new Map),null==(d=f.get(h))||d.set((0,p.getSegmentInfoId)(u.segmentInfo),u)}},c.prototype.Vf=function(c){return this.Rf.get(c)},c.prototype.Wf=function(c){return this.Rf.has(c)||this.Rf.set(c,new Map),this.Vf(c)},c}()},44552:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.SegmentManager=u.SegmentService=void 0;var p=d(56481),h=d(85434),f=d(15487),m=d(37641),g=d(71018),v=d(97587),y=d(88401);u.SegmentService=function(){function c(c){var u=this;this.context=c,this.ZF=function(c){u.NE.has(c)&&(u.NE.get(c).dispose(),u.NE.delete(c))},this.NE=new Map}return c.prototype.YF=function(c,u){var d=void 0===u?{}:u,p=d.id,f=d.lang;return h.MimeTypeHelper.isSubtitle(c)?[c,p,f].filter(Boolean).join("-"):c},c.prototype.add=function(c,u,d){var p=this.get(c.mimeType,d);return p||(p=this.createSegmentManager(c,u),this.NE.set(this.YF(c.mimeType,d),p)),p},c.prototype.createSegmentManager=function(c,u){return new b(this.context,c,u)},c.prototype.get=function(c,u){return this.NE.get(this.YF(c,u))},c.prototype.disposeOfType=function(c,u){this.ZF(this.YF(c,u))},c.prototype.dispose=function(){this.NE.forEach(function(c){return c.dispose()}),this.NE.clear()},c}();var b=function(){function c(c,u,d){this.context=c,this.segmentParser=d,this.eF=!1,this.cF=new g.SegmentLoaderPool(c,u),this.bF=new y.UrlInitSegmentProvider(c,u.mimeType),this.aF=new m.SegmentCache(c.settings.MAX_NUM_CACHED_SEGMENTS),this.dF=Promise.resolve(null)}return c.prototype.getSegment=function(c){var u=c.isInitSegment?this.fF(c).then(function(c){return S(c)}):this.gF(c);return this.dF=this.dF.catch(function(){}).then(function(){return u}),this.dF},c.prototype.fF=function(c){var u=this;return this.bF.getSegment(c).then(function(c){var d;return null==(d=u.segmentParser)||d.parseSegment(c),c}).catch(function(c){return u.context.logger.debug("Error during loading an init segment",c),Promise.reject(c)})},c.prototype.gF=function(c){var u,d=this;null!=(u=c.key)&&u.method&&(this.eF=!0);var p=this.hF(c);return(this.iF()?this.jF(p,c):this.kF(p,c)).then(function(c){var u=c[0],p=c[1];return u.transform(function(c){return d.mF(c,p),c},function(){},function(c){return d.context.logger.debug("Loading failed",c),c.message})})},c.prototype.hF=function(c){var u=Promise.resolve();if(c.init){var d=this.bF.getCachedSegment(c);u=d?Promise.resolve(d):this.fF(c.init)}return u},c.prototype.iF=function(){var c;return this.context.settings.DISABLE_PARALLEL_SEGMENT_LOADING||!!(null!=(c=this.context.sourceContext.source.drm)&&c.clearkey)||this.eF||(0,f.isTizen2016)()},c.prototype.jF=function(c,u){var d=this;return c.then(function(c){return d.lF(u).then(function(u){return[u,c]})})},c.prototype.kF=function(c,u){return Promise.all([this.lF(u),c])},c.prototype.lF=function(c){var u=this.getCachedSegment(c);return null!=u?(this.context.logger.debug("Returning segment from cache for URL: ".concat(c.url)),Promise.resolve(S(u))):this.cF.load(c)},c.prototype.mF=function(c,u){u&&c.setInitSegment(u)},c.prototype.isLoading=function(c){return c?this.cF.getLoadingPeriodIds().includes(c):this.cF.getLoadingPeriodIds().length>0},c.prototype.canLoad=function(){var c=this.cF.isFreeLoaderAvailable();return this.iF()?c&&!this.bF.isLoading():c},c.prototype.cacheSegment=function(c){this.aF.add(c)},c.prototype.hasCachedSegment=function(c){return!!this.getCachedSegment(c)},c.prototype.getCachedSegment=function(c){return c.isInitSegment?this.bF.getCachedSegment(c):this.aF.get(c)},c.prototype.removeCachedInitSegments=function(c){this.bF.removeCachedSegments(c)},c.prototype.clearCache=function(c){void 0===c&&(c=!0),c&&this.bF.removeCachedSegments(function(){return!0}),this.aF.clear()},c.prototype.cancel=function(){return this.cF.cancelLoading()},c.prototype.dispose=function(){this.cancel(),this.clearCache(!1),this.cF=(0,p.dispose)(this.cF),this.segmentParser=void 0,(0,p.dispose)(this.bF)},c}();function S(c){var u=new v.Stream;return u.add(c),u.end(),u}u.SegmentManager=b},25902:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.TimestampOffsetService=void 0;var p=d(80813),h=d(85434),f=d(66502),m=d(88052),g=d(62756);u.TimestampOffsetService=function(){function c(c,u){this.context=c,this.mimeType=u,this.CK=new Map;var d=c.sourceContext.sourceIdentifier;this.DK=c.serviceManager.get(p.ServiceName.SourceStoreService,d)}return Object.defineProperty(c.prototype,"EK",{get:function(){return this.context.logger},enumerable:!1,configurable:!0}),c.prototype.maybeAdjustTimestampOffsetAtDiscontinuityChange=function(c,u){var d=c.getSegmentInfo().discontinuitySequenceNumber;if(null==d||c.isInit())return!1;var p=this.CK.get(c.getMimeType())!==d,h=isNaN(u.getTimestampOffset());if(p||h)this.FK(c,d,u);else if(c.getSegmentInfo().wasPrefetched){var f=this.GK(c,d);this.HK(c,f)}return this.CK.set(c.getMimeType(),d),!0},c.prototype.FK=function(c,u,d){var p=this.GK(c,u);this.IK(c,u,d),this.EK.debug("[".concat(this.mimeType,"] Initialized PTO for new discontinuity ").concat(u," to ").concat(p," on segment ").concat(c.getUrl())),d.setTimestampOffset(p),this.HK(c,p)},c.prototype.GK=function(c,u){var d,p,h=this.KK(c).encodedPlaybackTime,f=m.ModuleManager.get(g.ModuleName.HLS),v=null!=(d=null==f?void 0:f.selectors)?d:{},y=v.getHlsState,b=v.getPresentationTimeOffset,S=null==y?void 0:y(this.DK.getState());return S&&null!=(p=b(S,String(u)))?p:this.JK(c,h,u)},c.prototype.HK=function(c,u){var d=this.KK(c),p=d.encodedPlaybackTime,h=d.shouldUpdatePlaybackTime;c.getSegmentInfo().presentationTimeOffset=u,c.setPresentationTimeOffset(u),h&&c.setPlaybackTime(p-u)},c.prototype.IK=function(c,u,d){null==c.getSegmentInfo().startTime&&"extrapolateStartTimesFromDiscontinuityStarts"in d&&(this.EK.debug("[".concat(c.getMimeType(),"] Missing segment startTime when trying to calculate PTO for discontinuity ").concat(u)),d.extrapolateStartTimesFromDiscontinuityStarts(c))},c.prototype.JK=function(c,u,d){var p=u-c.getSegmentInfo().startTime,v=m.ModuleManager.get(g.ModuleName.HLS);return h.MimeTypeHelper.isSubtitle(c.getMimeType())&&f.TextSegmentAnalyzer.isPlainTextPayload(c.getData())||(this.DK.dispatch(v.actions.setPresentationTimeOffset(String(d),p)),this.EK.debug("[".concat(c.getMimeType(),"] Setting PTO for discontinuity ").concat(d," to ").concat(p))),p},c.prototype.KK=function(c){var u,d=m.ModuleManager.get(g.ModuleName.ContainerMP4,!1),p=!0,h=d?d.parsePlaybackTime(c,this.EK):c.getBaseMediaDecodeTime()/c.getTimescale();return isNaN(h)&&(h=null!=(u=c.getPlaybackTime())?u:c.getSegmentInfo().startTime,p=!1),{encodedPlaybackTime:h,shouldUpdatePlaybackTime:p}},c.prototype.dispose=function(){this.CK=null,this.DK=null},c}()},88401:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.UrlInitSegmentProvider=void 0;var p=d(91678),h=d(33436),f=d(37641),m=d(71018);u.UrlInitSegmentProvider=function(){function c(c,u){this.H1={},this.E1=c,this.F1=new m.SegmentLoaderPool(c,{mimeType:u,shouldDownloadBeCancelledCallback:function(){return!1}}),this.G1=new f.SegmentCache(1/0)}return c.prototype.getSegment=function(c){var u=this,d=this.G1.get(c);return d?Promise.resolve(d):null!=this.H1[c.url]?this.H1[c.url]:this.I1(c).then(function(c){return u.J1(c),c})},c.prototype.isLoading=function(){return this.F1.isLoading()},c.prototype.I1=function(c){var u=this;this.F1.isFreeLoaderAvailable()||this.F1.addLoaders(1),this.E1.logger.debug("Loading init segment",c.url);var d=this.F1.load(c).then(function(c){return c.read()}).then(function(u){if(!u.value)throw Error("SegmentStream error ".concat(c.url));return u.value}).finally(function(){delete u.H1[c.url]});return this.H1[c.url]=d,d},c.prototype.J1=function(c){this.G1.add(c),this.E1.store.dispatch((0,p.addMetricsValue)(c.getMimeType(),h.MetricType.CachedInitSegments,{internalRepId:c.getSegmentInfo().internalRepresentationId}))},c.prototype.getCachedSegment=function(c){return this.G1.get(c)},c.prototype.removeCachedSegments=function(c){this.G1.remove(c)},c.prototype.dispose=function(){this.G1.clear(),this.F1.dispose()},c}()},71809:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};
14Object.defineProperty(u,"__esModule",{value:!0}),u.collectInitialAdSegmentInfos=function(c,u){var d,p,v,y=(0,f.getManifestService)(c,u.sourceIdentifier),b=null==(d=(0,h.getSourceState)(c,u))?void 0:d.activeTracks,S=null==(v=null==(p=null==y?void 0:y.getManifest())?void 0:p.Period)?void 0:v[0];if(!S||!b)return Promise.resolve([]);var _=[];return Promise.all(Object.entries(b).map(function(d){var p=function(c,u,d){var p,h,f=d.selectedRepresentationId;if(f){var m=(null!=(p=c.AdaptationSet)?p:[]).find(function(c){return c._internalId.adaptationSetId===u});if(m){var g=(null!=(h=m.Representation)?h:[]).find(function(c){return c._internalId.representationId===f.representationId});if(g)return{adaptationSet:m,representation:g}}}}(S,d[0],d[1]);if(!p)return Promise.resolve();var h=p.adaptationSet,f=p.representation,v=h._mimeType;if(!v)return Promise.resolve();var y=m.MPDHandlerFactory.createInstance(c,u,v,S._id);return y?Promise.resolve().then(function(){y.setAdaptationSetId(h._internalId,f._internalId);var c=y.getInitSegmentInfo(f._internalId);return c&&_.push(g(c,v,f)),y.getNextSegmentInfo(0)}).then(function(c){c&&_.push(g(c,v,f))}).finally(function(){return y.dispose()}):Promise.resolve()})).then(function(){return _})};var h=d(15971),f=d(96533),m=d(86219);function g(c,u,d){var h,f,m,g;return p(p({},c),{mimeType:null!=(h=c.mimeType)?h:u,internalRepresentationId:null!=(f=c.internalRepresentationId)?f:d._internalId,codecs:null!=(m=c.codecs)?m:d._codecs,periodId:null!=(g=c.periodId)?g:d._internalId.periodId})}},73794:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.initializeHlsSegmentStartTimes=function(c,u,d){var f=u.sourceContext.sourceIdentifier,m=u.serviceManager.get(p.ServiceName.ManifestService,f);if(m&&!m.getAllAdaptationSets().some(function(c){return c.Representation.some(function(c){var u,d;return(null==(d=null==(u=c.SegmentList)?void 0:u[0].SegmentURL[0])?void 0:d._playbackTime)!==void 0})})){var g=c.getRepresentationId();m.initializeSegmentStartTimesFromStart(g),(0,h.assignSegmentStartTimesFromHlsRepresentation)(d.getSegmentListEntries(c.getRepresentationId()),g,m)}};var p=d(80813),h=d(63066)},97587:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.Stream=void 0;var p=d(34841),h=d(24389),f=d(78006);u.Stream=function(){function c(){var c=this;this.lg=function(){c.jg&&!c.isEmpty()&&(c.jg.resolve({done:!1,value:c.ig.shift()}),c.jg=null)}
vendor: 1,916 bytes, line 14
14,this.Xf=f.StreamState.Open,this.ig=[],this.kg=new p.Deferred,this.kg.promise.catch(function(){})}return c.prototype.add=function(c){this.Xf===f.StreamState.Open&&(this.ig.push(c),this.lg())},c.prototype.read=function(){if(this.jg)return Promise.reject({name:h.StreamReadError.ParallelRead});if(this.Xf===f.StreamState.Ended&&this.isEmpty())return Promise.resolve({done:!0});if(this.Xf===f.StreamState.Aborted)return Promise.reject({name:h.StreamReadError.Aborted,message:this.getError()});this.jg=new p.Deferred;var c=this.jg.promise;return this.lg(),c},c.prototype.end=function(){this.Xf===f.StreamState.Open&&(this.Xf=f.StreamState.Ended,this.jg&&this.isEmpty()&&(this.jg.resolve({done:!0}),this.jg=null),this.kg.resolve())},c.prototype.abort=function(c){var u;if(this.Xf===f.StreamState.Open){this.Xf=f.StreamState.Aborted,this.error=c;var d={name:f.StreamState.Aborted,message:null!=(u=this.getError())?u:""};this.jg&&(this.jg.reject(d),this.jg=null),this.kg.reject(d)}},c.prototype.transform=function(u,d,p){var h=this,f=new c,m=function(){h.read().then(function(c){var p=c.done,h=c.value;if(p)d&&d(),f.end();else{var g=null!=h&&u(h);g&&f.add(g),m()}}).catch(function(c){p?f.abort(p(c)):f.abort(c)})};return m(),f},c.prototype.isEmpty=function(){return 0===this.ig.length},c.prototype.getError=function(){return this.error||null},c}()},24389:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.StreamReadError=void 0,(p=d||(u.StreamReadError=d={})).Aborted="aborted",p.ParallelRead="parallelread"},78006:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.StreamState=void 0,(p=d||(u.StreamState=d={})).Open="open",p.Ended="ended",p.Aborted="aborted"},61800:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.DiscontinuityMonitor=void 0;var p=d(3714);u.DiscontinuityMonitor=function(){function c(c){var u=this;this.context=c,this.X1=function(){u.U1=!0}
14,this.Y1=function(){var c=u.context.internalPlayer.getCurrentTime();Object.values(u.V1).forEach(function(d){c>=d.playbackTime&&d.playbackTime+d.duration>=c&&u.maybeFirePeriodSwitchEvents(d)}),u.V1={},u.U1=!1},this.T1={},this.V1={},this.U1=!1,this.W1=[],this.context.eventHandler.on(p.PlayerEvent.Seek,this.X1,!0),this.context.eventHandler.on(p.PlayerEvent.Seeked,this.Y1,!0)}return c.prototype.trackIncomingDiscontinuity=function(c,u,d,p){this.T1[u]?this.U1&&(this.V1[u]={mimeType:u,discontinuitySequenceNumber:c,playbackTime:d,duration:p}):this.T1[u]={discontinuitySequenceNumber:c,startTime:d||0},this.W1.includes(c)||this.W1.push(c)},c.prototype.isDiscontinuityExpected=function(c){return this.W1.includes(c)},c.prototype.reset=function(){this.W1=[]},c.prototype.maybeFirePeriodSwitchEvents=function(c){var u=c.mimeType,d=c.discontinuitySequenceNumber,h=c.playbackTime;if(null!=d&&this.T1[u]){var f=this.T1[u].discontinuitySequenceNumber;f!==d&&(this.Z1(u,d,h)&&(this.context.eventHandler.dispatchEvent(p.PlayerEvent.PeriodSwitch),this.context.eventHandler.dispatchEvent(p.PlayerEvent.PeriodSwitched,{sourcePeriod:{periodId:String(f)},targetPeriod:{periodId:String(d)}})),this.T1[u]={discontinuitySequenceNumber:d,startTime:h})}},c.prototype.Z1=function(c,u,d){var p=this,h=Object.keys(this.T1).filter(function(u){return u!==c}),f=!0;return h.forEach(function(c){var h=p.T1[c];h.discontinuitySequenceNumber===u&&1>Math.abs(d-h.startTime)&&(f=!1)}),f},c.prototype.dispose=function(){this.context.eventHandler.off(p.PlayerEvent.Seek,this.X1),this.context.eventHandler.off(p.PlayerEvent.Seeked,this.Y1)},c}()},86163:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.PeriodSwitchMonitor=void 0;var p=d(15971),h=d(42208),f=d(88935);u.PeriodSwitchMonitor=function(){function c(c){this.context=c,this.S1=[]}return c.prototype.isPeriodExpected=function(c){return this.S1.includes(c)},c.prototype.trackIncomingPeriod=function(c){this.S1.includes(c)||this.S1.push(c)},c.prototype.maybeHandlePeriodSwitch=function(c){var u=(0,p.getSourceStore)(this.context),d=null==u?void 0:u.getState();if(u&&d){var m=c.periodId,g=(0,f.getPlayingPeriodId)(d);m&&m!==g&&this.S1.includes(m)&&(u.dispatch((0,h.periodSwitchStarted)(m)),u.dispatch((0,h.periodSwitchFinished)(m)))}},c.prototype.reset=function(){this.S1=[]},c.prototype.dispose=function(){this.S1=[]},c}()},87187:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.SegmentInitType=u.Segment=void 0;var f,m=d(74853),g=d(85434),v=d(65439);u.Segment=function(){function c(c,u,d,p,h,g,v,y,b,S){void 0===g&&(g=f.NONE),this.eP=[],this.data=c,this.ZP=u,this.aP=d,this.YP=p,this.bP=h,this.cP=g,this.dP=v,this.gP=!1,this.GO={subtitles:[]},this.hP=y,this.iP=b,this.JO=S,this.jP=!1,this.mP=null,c instanceof ArrayBuffer||"string"==typeof c&&(this.data=m.ArrayHelper.stringToArrayWithoutEncoding(c).buffer)}return c.prototype.setDrmKid=function(c){this.oP=c},c.prototype.hasDrmKid=function(){return!!this.getDrmKid()},c.prototype.getDrmKid=function(){var c,u,d;return null!=(d=null!=(c=this.oP)?c:null==(u=this.nP)?void 0:u.getDrmKid())?d:void 0},c.prototype.setDrmInitData=function(c){this.mP=c},c.prototype.hasDrmInitData=function(){var c;return(null==(c=this.mP)?void 0:c.length)>0},c.prototype.getDrmInitData=function(){return this.hasDrmInitData()?this.mP:[]},c.prototype.getMimeType=function(){return this.ZP},c.prototype.isInit=function(){return this.cP===f.INIT},c.prototype.isSelfInit=function(){return this.cP===f.SELF_INIT},c.prototype.isEncrypted=function(){return this.gP},c.prototype.setEncrypted=function(c){this.gP=c},c.prototype.setUrl=function(c){this.HO=c},c.prototype.getUrl=function(){return this.HO},c.prototype.getData=function(){return this.data},c.prototype.setData=function(c){this.data=c},c.prototype.getMetadata=function(){return this.GO},c.prototype.setMetadata=function(c){this.GO=c},c.prototype.getPlaybackTime=function(){return this.JO},c.prototype.setPlaybackTime=function(c){this.JO=c},c.prototype.getPlaybackEndTime=function(){return this.JO+this.bP},c.prototype.getPlaybackTimeRange=function(){return this.bP?{start:this.getPlaybackTime(),end:this.getPlaybackEndTime()}:(0,v.getSegmentInfoTimeRange)(this.getSegmentInfo())},c.prototype.getBaseMediaDecodeTime=function(){return this.VP},c.prototype.setBaseMediaDecodeTime=function(c){this.VP=c},c.prototype.getPresentationTimeOffset=function(){return this.WP},c.prototype.setPresentationTimeOffset=function(c){this.WP=c},c.prototype.getTFDTBoxOffsets=function(){return this.UP},c.prototype.setTFDTBoxOffsets=function(c){this.UP=c},c.prototype.pP=function(c){var u;return this.getParserMetadata()&&this.getParserMetadata()[c]?this.getParserMetadata()[c]:null!=(u=this.getInitSegment())&&u.getParserMetadata()?this.getInitSegment().getParserMetadata()[c]:void 0},c.prototype.getTimescale=function(){return this.pP("timescale")},c.prototype.getIvSize=function(){return this.pP("ivSize")},c.prototype.getDefaultSampleDuration=function(){return this.pP("defaultSampleDuration")},c.prototype.getDefaultSampleSize=function(){return this.pP("defaultSampleSize")},c.prototype.setTimescale=function(c){this.updateParserMetadata({timescale:c}
vendor: 12,643 bytes, line 14
14)},c.prototype.getPeriodId=function(){return this.YP},c.prototype.getCodec=function(){return this.aP},c.prototype.setCodec=function(c){this.aP=c},c.prototype.getDuration=function(){return this.bP},c.prototype.setDuration=function(c){this.bP=c},c.prototype.getNetworkRequestSize=function(){return this.hP},c.prototype.getRepresentationId=function(){return this.iP},c.prototype.getParsedData=function(){return this.IO},c.prototype.setParsedData=function(c){this.IO=c},c.prototype.getSegmentInfo=function(){return this.XP},c.prototype.isIndependentlyDecodable=function(){return this.dP},c.prototype.setSegmentInfo=function(c){this.XP=c},c.prototype.getMediaInfo=function(){var c={};return this.XP&&this.XP.bitrate&&(c.bitrate=this.XP.bitrate),g.MimeTypeHelper.isAudio(this.ZP)?this.XP&&this.XP.sampleRate&&(c.sampleRate=this.XP.sampleRate):g.MimeTypeHelper.isVideo(this.ZP)&&(this.XP&&this.XP.width&&(c.width=this.XP.width),this.XP&&this.XP.height&&(c.height=this.XP.height),this.XP&&this.XP.frameRate&&(c.frameRate=this.XP.frameRate)),c},c.prototype.isDirty=function(){return this.jP},c.prototype.setDirty=function(c){this.jP=c},c.prototype.setInbandEvents=function(c){this.eP=c},c.prototype.getInbandEvents=function(){return this.eP},c.prototype.setLastSegment=function(c){this.fP=c},c.prototype.isLastSegment=function(){return this.fP},c.prototype.wasLoadedFrom=function(c){return this.getUrl().includes(c)},c.prototype.getParserMetadata=function(){return this.kP},c.prototype.setParserMetadata=function(c){this.kP=c},c.prototype.updateParserMetadata=function(c){this.kP=h(h({},this.kP),c)},c.prototype.setBufferBlockId=function(c){this.lP=c},c.prototype.getBufferBlockId=function(){return this.lP},c.prototype.setInitSegment=function(c){this.nP=c},c.prototype.getInitSegment=function(){return this.nP},c}(),(p=f||(u.SegmentInitType=f={}))[p.NONE=0]="NONE",p[p.INIT=1]="INIT",p[p.SELF_INIT=2]="SELF_INIT"},50827:function(c,u){function d(c){return[c.url,c.mediaURL].filter(Boolean)}function p(c,u){return null==c?null==u:null!=u&&c.start===u.start&&c.end===u.end}Object.defineProperty(u,"__esModule",{value:!0}),u.isIdenticalSegmentInfo=function(c,u){if(void 0!==c.mediaSequence&&void 0!==u.mediaSequence)return c.mediaSequence===u.mediaSequence;var h,f,m=(h=d(c),f=d(u),h.some(function(c){return f.includes(c)})),g=p(c.byteRange,u.byteRange),v=c.discontinuitySequenceNumber===u.discontinuitySequenceNumber;return m&&g&&v},u.isIdenticalInitSegmentInfo=function(c,u){var d=(null==c?void 0:c.url)===(null==u?void 0:u.url),h=p(null==c?void 0:c.byteRange,null==u?void 0:u.byteRange);return d&&h}},19627:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.SegmentUnavailabilityHandler=void 0;var p=d(3714),h=d(58313);u.SegmentUnavailabilityHandler=function(){function c(c){this.fJ={},this.gJ=!1,this.eJ=c}return c.prototype.downloadSuccess=function(c){this.gJ&&c?this.gJ=!1:this.fJ={}},c.prototype.hJ=function(c,u){for(var d=[],p=0;p<c.length&&!c[p]._internalId.equals(u);p++)this.fJ[c[p]._id]||d.push(c[p]);return d.length>0?d[d.length-1]._internalId:null},c.prototype.switchQuality=function(c,u){this.fJ[u.representationId]=!0;var d=this.hJ(c,u);return d?(this.gJ=!0,d):(this.eJ.logger.log("no quality left, all tried"),null)},c.prototype.switchBaseURL=function(c){var u=c.availableBaseURLs,d=c.lastUsedBaseURLIndex+1;if((d%=u.length)===c.firstUsedBaseURLIndex)return this.eJ.logger.log("no base url left, all tried"),null;var f=c.baseURL;return c.lastUsedBaseURLIndex=d,c.baseURL=u[d],c.url=h.URLHelper.concatBaseUrlWithPartial(c.baseURL,c.mediaURL),this.eJ.eventHandler.dispatchEvent(p.PlayerEvent.ContentLocationChanged,{sourceLocationId:f??"",targetLocationId:c.baseURL,reason:p.ContentLocationChangedReason.Failover}),c},c.prototype.shouldTryAlternatives=function(c){return c>=400&&c<=599||0===c},c}()},15761:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.TimedMetadataService=void 0;var h=d(80813),f=d(56481),m=d(3714),g=d(59225),v=d(32485),y=d(91678),b=d(46151),S=d(33436),_=d(85434),E=d(79505),T=d(61800),w=d(86163);function P(c){var u=c.getSegmentInfo();return{uid:btoa(c.getUrl()),url:c.getUrl(),mimeType:c.getMimeType(),playbackTime:c.getPlaybackTime(),presentationTimestamp:c.getBaseMediaDecodeTime()/c.getTimescale(),duration:c.getDuration(),mediaInfo:c.getMediaInfo(),wallClockTime:u.wallClockTime,discontinuitySequenceNumber:u.discontinuitySequenceNumber,periodId:void 0===u.discontinuitySequenceNumber?u.periodId:void 0}}u.TimedMetadataService=function(){function c(c){var u,d=this;this.context=c,this.LH=function(c){if(c.hasOwnProperty("metadata")){var u={metadataType:c.metadataType.toUpperCase(),metadata:c.metadata};(c.start||0===c.start)&&(u.start=c.start),c.end&&(u.end=c.end),d.context.eventHandler.dispatchEvent(m.PlayerEvent.Metadata,u)}},this.NH=function(c){c&&c.hasOwnProperty("metadataType")&&d.context.eventHandler.dispatchEvent(m.PlayerEvent.Metadata,{metadataType:c.metadataType,metadata:c.metadata})},this.OH=function(c){var u=c.metadata.event;return!(void 0!==u.periodId&&!d.JH.isPeriodExpected(u.periodId))&&!(void 0!==u.discontinuitySequenceNumber&&!d.IH.isDiscontinuityExpected(u.discontinuitySequenceNumber))&&(d.FH[u.mimeType]=u,d.EH[u.mimeType]=E.RepresentationId.from(c.metadata.representationId),d.IH.maybeFirePeriodSwitchEvents(u),d.JH.maybeHandlePeriodSwitch(u),d.DH[u.mimeType]&&d.DH[u.mimeType].id===u.representationId||d.PH(u),void d.context.eventHandler.dispatchEvent(m.PlayerEvent.SegmentPlayback,u))},this.DH={},this.EH={},this.FH={},this.HH=this.context.serviceManager.get(h.ServiceName.ManifestService,c.sourceContext.sourceIdentifier);var p=((u={})[v.TimedMetadataType.InBand]=this.NH,u[v.TimedMetadataType.SegmentPlayback]=this.OH,u[v.TimedMetadataType.Manifest]=this.LH,u[v.TimedMetadataType.EventStream]=this.LH,u[v.TimedMetadataType.DateRange]=this.LH,u[v.TimedMetadataType.CustomTag]=this.LH,u);this.GH=new g.MetadataService(c,p),this.IH=new T.DiscontinuityMonitor(c),this.JH=new w.PeriodSwitchMonitor(c)}return c.prototype.clearSegmentBoundMetadata=function(c){this.GH.removeMatchingCues(v.TimedMetadataType.SegmentPlayback,function(u){return u.content.metadata.mimeType===c})},c.prototype.onSegmentAvailable=function(c){var u,d=this,p=c.segment,h=c.extractedMetadata,f=c.isSegmentOfMainStream,g=c.presentationTimeOffset;if(f){v=P(p),(y=p.getSegmentInfo()).dateTime&&(v.dateTime=y.dateTime),y.representationId&&(v.representationId=y.representationId),u=v;var v,y,b=p.getSegmentInfo();b.metadata&&b.metadata.forEach(function(c){d.VH(c,u,p.getPeriodId())}),b.metadata&&b.metadata.length>0&&b.metadata[0].type===m.MetadataType.CUSTOM&&this.TH(b),this.RH(h,g,p.getPeriodId())}else u=P(p);this.KH(p,u),p.getInbandEvents().forEach(function(c){d.UH(c,p.getPeriodId())})},c.prototype.KH=function(c,u){if(!c.isInit()){var d=c.getSegmentInfo(),p=c.getMimeType(),h={metadata:{event:u,representationId:{_periodId:d.internalRepresentationId.periodId,_adaptationSetId:d.internalRepresentationId.adaptationSetId,_representationId:d.internalRepresentationId.representationId},mimeType:p}};this.GH.addToTimeline(v.TimedMetadataType.SegmentPlayback,u.playbackTime,h),(0,b.getMetricsState)(this.context.store.getState())[p]||this.context.store.dispatch((0,y.initializeMetricsForMimeType)(p,this.context.settings)),this.context.store.dispatch((0,y.addMetricsValue)(p,S.MetricType.SegmentInformation,{bitrate:8*c.getNetworkRequestSize()/c.getDuration(),duration:c.getDuration(),playbackTime:d.startTime||c.getPlaybackTime(),representationId:c.getRepresentationId()}))}},c.prototype.parseEventStream=function(){var c=this;this.HH.getAllPeriods().forEach(function(u){c.HH.getEventStreamEvents(u).forEach(function(d){c.MH(d,u)})})},c.prototype.MH=function(c,u){var d={metadataType:m.MetadataType.EVENT_STREAM,metadata:c.data,start:c.startTime,end:c.endTime};this.GH.addToMetadataParsedService(c.startTime,p(p({},d),{data:c.data}),u._id),this.GH.addToTimeline(v.TimedMetadataType.EventStream,c.startTime,d)},c.prototype.getPlaybackRepresentation=function(c){var u=this.context.serviceManager.get(h.ServiceName.ManifestService,this.context.sourceContext.sourceIdentifier),d=null==u?void 0:u.getRepresentationById(this.EH[c]);if(d)return d=p({},d),this.FH[c]&&(d.uid=this.FH[c].uid),d},c.prototype.trackContentBoundary=function(c){var u=c.getPeriodId();this.JH.trackIncomingPeriod(u);var d=c.getSegmentInfo().discontinuitySequenceNumber;if(void 0!==d){var p=c.getSegmentInfo().startTime,h=c.getSegmentInfo().duration,f=c.getMimeType();this.IH.trackIncomingDiscontinuity(d,f,p,h)}},c.prototype.resetContentBoundaryTracking=function(){this.JH.reset(),this.IH.reset()},c.prototype.PH=function(c){var u,d;_.MimeTypeHelper.isAudio(c.mimeType)?(u=m.PlayerEvent.AudioPlaybackQualityChanged,d={id:c.representationId,bitrate:parseFloat(c.mediaInfo.bitrate)}):_.MimeTypeHelper.isVideo(c.mimeType)&&(u=m.PlayerEvent.VideoPlaybackQualityChanged,d={id:c.representationId,bitrate:parseFloat(c.mediaInfo.bitrate),width:parseFloat(c.mediaInfo.width),height:parseFloat(c.mediaInfo.height)}),u&&this.context.eventHandler.dispatchEvent(u,{targetQuality:d,sourceQuality:this.DH[c.mimeType]||null}),this.DH[c.mimeType]=d},c.prototype.processDateRangeEvent=function(c,u){var d={metadataType:m.MetadataType.DATERANGE,metadata:c.data,start:c.startTime,end:c.endTime};this.GH.addToMetadataParsedService(c.startTime,p(p({},d),{data:c.data}),u),this.GH.addToTimeline(v.TimedMetadataType.DateRange,c.startTime,d)},c.prototype.QH=function(c,u){var d=this;c.forEach(function(c){if(c._metadata&&c._metadata.length>0&&c._playbackTime){var p={metadataType:m.MetadataType.CUSTOM,metadata:c._metadata,data:c._metadata,start:c._playbackTime,end:c._playbackTime+c._duration};d.GH.addToMetadataParsedService(c._playbackTime,p,u)}})},c.prototype.RH=function(c,u,d){var p=this;c&&Array.isArray(c.id3)&&c.id3.length>0&&c.id3.forEach(function(c){p.SH(c,u,d)})},c.prototype.SH=function(c,u,d){var h=c.presentationTime-u,f={metadataType:m.MetadataType.ID3,metadata:c.data,start:h};this.GH.addToMetadataParsedService(h,p(p({},f),{data:c.data}),d),this.GH.addToTimeline(v.TimedMetadataType.InBand,h,f)},c.prototype.TH=function(c){var u=this,d=this.HH.getRepresentationById(c.internalRepresentationId);d.SegmentList[0].SegmentURL.forEach(function(p,h){p._media===c.url&&(p._playbackTime||function(c,u,d){for(var p=u,h=d;p>=0;)c[p]._playbackTime=h,h-=c[p]._duration,p--;for(p=u+1,h=d+c[u]._duration;p<c.length;)c[p]._playbackTime=h,h+=c[p]._duration,p++}(d.SegmentList[0].SegmentURL,h,c.startTime),u.GH.addToTimeline(v.TimedMetadataType.CustomTag,c.startTime,{metadataType:m.MetadataType.CUSTOM,metadata:p._metadata,start:c.startTime,end:c.startTime+c.duration}))}),this.QH(d.SegmentList[0].SegmentURL,c.periodId)},c.prototype.UH=function(c,u){var d=c.presentationTime,h={metadataType:m.MetadataType.EMSG,metadata:c,start:d};this.GH.addToMetadataParsedService(d,p(p({},h),{data:c}),u),this.GH.addToTimeline(v.TimedMetadataType.InBand,d,h)},c.prototype.VH=function(c,u,d){var h=c.type;if(h===m.MetadataType.CUSTOM)u.EXPERIMENTAL=u.EXPERIMENTAL||{},u.EXPERIMENTAL.hlsAttributes=u.EXPERIMENTAL.hlsAttributes||[],u.EXPERIMENTAL.hlsAttributes=u.EXPERIMENTAL.hlsAttributes.concat(c.attributes);else{var f={metadataType:/^CUE-(IN|OUT(-CONT)?)$/.test(h)?m.MetadataType.CUETAG:m.MetadataType[c.type],metadata:c,start:u.playbackTime};this.GH.addToMetadataParsedService(f.start,p(p({},f),{data:c}),d),this.GH.addToTimeline(v.TimedMetadataType.Manifest,f.start,f)}},c.prototype.dispose=function(){this.GH=(0,f.dispose)(this.GH),this.HH=null,this.IH=(0,f.dispose)(this.IH),this.JH.dispose()},c}()},36193:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.setRepresentationIdAction=function(c){return(0,p.createAction)(f.ActiveTracksActionType.SetSelectedRepresentationId,{selectedRepresentationId:c})},u.setMediaTypeAction=function(c,u){var d=(0,h.forceArray)(u);return(0,p.createAction)(f.ActiveTracksActionType.SetMediaType,{trackId:c,mediaTypes:d})},u.setContainerFormatAction=function(c,u){return(0,p.createAction)(f.ActiveTracksActionType.SetContainerFormat,{trackId:c,containerFormat:u})},u.removeActiveTrackAction=function(c){return(0,p.createAction)(f.ActiveTracksActionType.RemoveActiveTrack,{adaptationSetId:c})},u.clearActiveTracksAction=function(){return(0,p.createAction)(f.ActiveTracksActionType.ClearActiveTracks)};var p=d(35267),h=d(74853),f=d(7511)},7511:function(c,u){var d,p;
14Object.defineProperty(u,"__esModule",{value:!0}),u.ActiveTracksActionType=void 0,(p=d||(u.ActiveTracksActionType=d={})).SetSelectedRepresentationId="@instance/sources/@source/activetracks/setselectedrepresentationid",p.SetMediaType="@instance/sources/@source/activetracks/setmediatype",p.SetContainerFormat="@instance/sources/@source/activetracks/setcontainerformat",p.RemoveActiveTrack="@instance/sources/@source/activetracks/remove",p.ClearActiveTracks="@instance/sources/@source/activetracks/clear"},44115:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},f=this&&this.__rest||function(c,u){var d={};for(var p in c)Object.prototype.hasOwnProperty.call(c,p)&&0>u.indexOf(p)&&(d[p]=c[p]);if(null!=c&&"function"==typeof Object.getOwnPropertySymbols){var h=0;for(p=Object.getOwnPropertySymbols(c);h<p.length;h++)0>u.indexOf(p[h])&&Object.prototype.propertyIsEnumerable.call(c,p[h])&&(d[p[h]]=c[p[h]])}return d};Object.defineProperty(u,"__esModule",{value:!0}),u.ActiveTracksReducer=void 0,u.getContainerFormat=function(c,u){var d;if(c.activeTracks)return null==(d=Object.values(c.activeTracks).find(function(c){var d;return null==(d=c.mediaTypes)?void 0:d.includes(u)}))?void 0:d.containerFormat},u.getMediaTypes=function(c,u){var d;return c.activeTracks&&(null==(d=c.activeTracks[u.adaptationSetId])?void 0:d.mediaTypes)||[]};var m=d(3793),g=d(7511),v={};u.ActiveTracksReducer=(0,m.default)({},((p={})[g.ActiveTracksActionType.SetSelectedRepresentationId]=function(c,u){var d,p,f;return f=c[(p=u.payload.selectedRepresentationId).adaptationSetId],h(h({},c),((d={})[p.adaptationSetId]=h(h({},f),{selectedRepresentationId:p}),d))},p[g.ActiveTracksActionType.SetMediaType]=function(c,u){var d,p,f,m,g;return f=(d=u.payload).trackId,m=d.mediaTypes,g=c[f.adaptationSetId],h(h({},c),((p={})[f.adaptationSetId]=h(h({},g),{mediaTypes:m}),p))},p[g.ActiveTracksActionType.SetContainerFormat]=function(c,u){var d,p,f,m,g;return f=(d=u.payload).trackId,m=d.containerFormat,g=c[f.adaptationSetId],h(h({},c),((p={})[f.adaptationSetId]=h(h({},g),{containerFormat:m}),p))},p[g.ActiveTracksActionType.RemoveActiveTrack]=function(c,u){var d,p;return c[d=u.payload.adaptationSetId.adaptationSetId],p=f(c,["symbol"==typeof d?d:d+""]),h({},p)},p[g.ActiveTracksActionType.ClearActiveTracks]=function(){return v},p))},51386:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.removeEncryptionKey=u.updateEncryptionKey=u.addEncryptionKey=void 0;var p=d(35267),h=d(92096);u.addEncryptionKey=function(c){return(0,p.createAction)(h.EncryptionKeyActionKey.AddEncryptionKey,c)},u.updateEncryptionKey=function(c){return(0,p.createAction)(h.EncryptionKeyActionKey.UpdateEncryptionKey,c)},u.removeEncryptionKey=function(c){return(0,p.createAction)(h.EncryptionKeyActionKey.RemoveEncryptionKey,{keyUri:c})}},20477:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},f=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.EncryptionKeyReducer=void 0;var m=d(3793),g=d(92096);u.EncryptionKeyReducer=(0,m.default)([],((p={})[g.EncryptionKeyActionKey.AddEncryptionKey]=function(c,u){var d=u.payload;return f(f([],c,!0),[h({},d)],!1)},p[g.EncryptionKeyActionKey.UpdateEncryptionKey]=function(c,u){var d=u.payload,p=c.findIndex(function(c){return c.uri===d.uri});if(-1===p)return c;var m=c[p],g=f([],c,!0);return g.splice(p,1,h(h({},m),d)),g},p[g.EncryptionKeyActionKey.RemoveEncryptionKey]=function(c,u){var d=u.payload;return f([],c,!0).filter(function(c){return c.uri!==d.keyUri})},p))}
14,66628:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.getEncryptionKey=u.getAllEncryptionKeys=void 0,u.getAllEncryptionKeys=function(c){return null==c?void 0:c.encryptionKeys},u.getEncryptionKey=function(c,u){var d;return null==(d=null==c?void 0:c.encryptionKeys)?void 0:d.find(function(c){return c.uri===u})}},92096:function(c,u){var d,p,h,f;Object.defineProperty(u,"__esModule",{value:!0}),u.EncryptionKeyActionKey=u.KeyLoadState=void 0,(h=d||(u.KeyLoadState=d={})).Loading="loading",h.Loaded="loaded",h.Cancel="cancel",(f=p||(u.EncryptionKeyActionKey=p={})).AddEncryptionKey="@instance/sources/@source/encryptionkey/addEncryptionKey",f.UpdateEncryptionKey="@instance/sources/@source/encryptionkey/updateEncryptionKey",f.RemoveEncryptionKey="@instance/sources/@source/encryptionkey/removeEncryptionKey"},52447:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.engineBitmovinSourceReducers=void 0;var p=d(44115),h=d(20477),f=d(79872),m=d(88935),g=d(63184),v=d(95236),y=d(73861),b=d(41710),S=d(14808);u.engineBitmovinSourceReducers={manifest:f.ManifestReducer,activeTracks:p.ActiveTracksReducer,playingTracks:m.PlayingTracksReducer,encryptionKeys:h.EncryptionKeyReducer,buffer:y.BufferReducer,renderer:b.RendererReducer,streamTimeline:S.StreamTimelineReducer,segmentInfoMap:v.SegmentInfoMapReducer,relativeCurrentTimeOff
14set:g.RelativeCurrentTimeOffsetReducer}},42208:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.periodSwitchStarted=u.periodSwitchFinished=u.setPlayingPeriodId=void 0;var p=d(35267),h=d(84362);u.setPlayingPeriodId=function(c){return(0,p.createAction)(h.PlayingTracksActionKey.SetPlayingPeriodId,c)},u.periodSwitchFinished=function(c){return(0,p.createAction)(h.PlayingTracksActionKey.FinishedPeriodSwitch,c)},u.periodSwitchStarted=function(c){return(0,p.createAction)(h.PlayingTracksActionKey.StartedPeriodSwitch,c)}},88935:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.PlayingTracksReducer=u.isSwitchingPeriods=u.wasSwitchingToPeriodIdReset=u.getPlayingTracksState=u.getPlayingPeriodId=void 0;var f=d(3793),m=d(84362);u.getPlayingPeriodId=function(c){var u;return null==(u=c.playingTracks)?void 0:u.playingPeriodId},u.getPlayingTracksState=function(c){return c.playingTracks},u.wasSwitchingToPeriodIdReset=function(c,u){return(null==u?void 0:u.switchingToPeriodId)!==void 0&&(null==c?void 0:c.switchingToPeriodId)===void 0},u.isSwitchingPeriods=function(c,u){return(null==u?void 0:u.switchingToPeriodId)===void 0&&(null==c?void 0:c.switchingToPeriodId)!==void 0},u.PlayingTracksReducer=(0,f.default)({},((p={})[m.PlayingTracksActionKey.SetPlayingPeriodId]=function(c,u){var d=u.payload;return h(h({},c),{playingPeriodId:d})},p[m.PlayingTracksActionKey.FinishedPeriodSwitch]=function(c,u){var d=u.payload;return h(h({},c),{switchingToPeriodId:c.switchingToPeriodId===d?void 0:c.switchingToPeriodId})},p[m.PlayingTracksActionKey.StartedPeriodSwitch]=function(c,u){var d=u.payload;return h(h({},c),{switchingToPeriodId:d})},p))},84362:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.PlayingTracksActionKey=void 0,(p=d||(u.PlayingTracksActionKey=d={})).SetPlayingPeriodId="@instance/sources/@source/playingTracks/setPlayingPeriodId",p.FinishedPeriodSwitch="@instance/sources/@source/playingTracks/periodSwitchFinished",p.StartedPeriodSwitch="@instance/sources/@source/playingTracks/periodSwitchStarted"},27531:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}
14),u.RelativeCurrentTimeOffsetActionType=void 0,u.setRelativeCurrentTimeOffset=function(c){return(0,h.createAction)(p.SetRelativeCurrentTimeOffset,c)};var p,h=d(35267);(p||(u.RelativeCurrentTimeOffsetActionType=p={})).SetRelativeCurrentTimeOffset="@instance/source/setrelativecurrenttimeoffset"},63184:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.RelativeCurrentTimeOffsetReducer=void 0;var p,h=d(3793),f=d(27531);u.RelativeCurrentTimeOffsetReducer=(0,h.default)(null,((p={})[f.RelativeCurrentTimeOffsetActionType.SetRelativeCurrentTimeOffset]=function(c,u){return u.payload},p))},33903:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.getRelativeCurrentTimeOffset=void 0,u.getRelativeCurrentTimeOffset=function(c){var u;return null!=(u=null==c?void 0:c.relativeCurrentTimeOffset)?u:null}},10333:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.sourceIdentifiersSelector=u.hasASourceStoreIdentifierChanged=void 0,u.hasASourceStoreIdentifierChanged=function(c,u){return c.length!==u.length||c.some(function(c){return!u.includes(c)})},u.sourceIdentifiersSelector=function(c){var u;return Object.keys(null!=(u=c.sources)?u:{})}},59707:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.setManifestAction=function(c){return(0,p.createAction)(h.ManifestActionType.SetManifest,{manifest:c})},u.setManifestInitializedAction=function(c){return(0,p.createAction)(h.ManifestActionType.SetManifestInitialized,{isInitialized:c})},u.removeRepresentationsAction=function(c){return(0,p.createAction)(h.ManifestActionType.RemoveRepresentations,{representationIds:c})},u.updateManifestAction=function(c){return(0,p.createAction)(h.ManifestActionType.UpdateManifest,c)},u.updateAdaptationSetAction=function(c,u){return(0,p.createAction)(h.ManifestActionType.UpdateAdaptationSet,{adaptationSetId:c,updates:u})},u.updateRepresentationAction=function(c){return(0,p.createAction)(h.ManifestActionType.UpdateRepresentation,c)},u.updatePeriodTimingAction=function(c,u){return(0,p.createAction)(h.ManifestActionType.UpdatePeriodTiming,{periodId:c,timing:u})},u.adjustPeriodStartTimes=function(c){return(0,p.createAction)(h.ManifestActionType.AdjustPeriodStartTimes,{offset:c})},u.setRepresentationDrmKidAction=function(c,u){return(0,p.createAction)(h.ManifestActionType.SetRepresentationDrmKid,{representationId:c,associatedKid:u})},u.updateRepresentationFailedDownloadAction=function(c,u){return(0,p.createAction)(h.ManifestActionType.UpdateRepresentationFailedDownload,{representationId:c,loadFailureReason:u})},u.setRepresentationSegmentIndexAction=function(c,u){return(0,p.createAction)(h.ManifestActionType.SetRepresentationSegmentIndex,{representationId:c,segmentIndex:u})},u.setRepresentationIsLoadingAction=function(c,u){return(0,p.createAction)(h.ManifestActionType.SetRepresentationIsLoading,{representationId:c,isLoading:u})},u.setRepresentationSegmentIndexParsingErrorAction=function(c,u){return(0,p.createAction)(h.ManifestActionType.SetRepresentationSegmentIndexParsingError,{representationId:c,segmentIndexParsingError:u})},u.setRepresentationAnchorPointAction=function(c,u){return(0,p.createAction)(h.ManifestActionType.SetRepresentationAnchorPoint,{representationId:c,anchorPoint:u})},u.initPlaybackTimesFromIndex=function(c,u,d){return(0,p.createAction)(h.ManifestActionType.InitPlaybackTimesFromIndex,{representationId:c,index:u,playbackTimeForIndex:d})},u.initPlaybackTimesFromReferenceSegment=function(c){return(0,p.createAction)(h.ManifestActionType.InitPlaybackTimesFromReferenceSegment,{representationId:c.getRepresentationId(),segmentUrl:c.getUrl(),segmentPlaybackTime:c.getPlaybackTime(),discontinuitySequenceNumber:c.getSegmentInfo().discontinuitySequenceNumber})},u.resetSegmentPlaybackTimes=function(){return(0,p.createAction)(h.ManifestActionType.ResetSegmentPlaybackTimes)};var p=d(35267),h=d(71050)},79872:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},f=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};
14Object.defineProperty(u,"__esModule",{value:!0}),u.ManifestReducer=void 0;var m=d(3793),g=d(15014),v=d(13422),y=d(71050);function b(c,u,d){var p,f;return h(h({},c),{Period:null!=(f=null==(p=c.Period)?void 0:p.map(function(c){var p;return h(h({},c),{AdaptationSet:null==(p=c.AdaptationSet)?void 0:p.map(function(c){var p;return h(h({},c),{Representation:null==(p=c.Representation)?void 0:p.map(function(c){return c._internalId.equals(u)?h(h({},c),d):c})})})})}))?f:[]})}function S(c,u,d){var p=f([],c,!0);return p[u]=h({},p[u]),p[u]._playbackTime=d,function(c,u){for(var d=u-1;d>=0;d--)c[d]=h({},c[d]),c[d]._playbackTime=c[d+1]._playbackTime-c[d]._duration}(p,u),function(c,u){for(var d=u+1;d<c.length;d++)c[d]=h({},c[d]),c[d]._playbackTime=c[d-1]._playbackTime+c[d-1]._duration}(p,u),p}function _(c){return h(h({},c),{SegmentURL:c.SegmentURL.map(function(c){var u=h({},c);return delete u._playbackTime,u})})}u.ManifestReducer=(0,m.default)({},((p={})[y.ManifestActionType.SetManifest]=function(c,u){return u.payload.manifest||c},p[y.ManifestActionType.SetManifestInitialized]=function(c,u){return h(h({},c),{isInitialized:u.payload.isInitialized})},p[y.ManifestActionType.RemoveRepresentations]=function(c,u){return 0===u.payload.representationIds.length?c:(0,v.removeRepresentations)(c,u.payload.representationIds)},p[y.ManifestActionType.UpdateManifest]=function(c,u){var d;return d=u.payload,h(h({},c),d)},p[y.ManifestActionType.UpdateAdaptationSet]=function(c,u){return function(c,u){var d,p=u.adaptationSetId,m=u.updates,g=c.Period.findIndex(function(c){return c._id===p.periodId});if(g<0)return c;var v=null==(d=c.Period[g])?void 0:d.AdaptationSet.findIndex(function(c){return c._internalId.equals(p)});if(v<0)return c;var y=h({},c);y.Period=f([],y.Period,!0),y.Period[g]=h({},y.Period[g]);var b=y.Period[g];return b.AdaptationSet=f([],b.AdaptationSet,!0),b.AdaptationSet[v]=h(h({},b.AdaptationSet[v]),m),y}(c,u.payload)},p[y.ManifestActionType.UpdateRepresentation]=function(c,u){return function(c,u){var d,p,m,g=u._internalId;if(!c.Period)return c;var v=c.Period.findIndex(function(c){return c._id===g.periodId}),y=null==(d=c.Period[v])?void 0:d.AdaptationSet.findIndex(function(c){return c._internalId.equals(g)}),b=null==(m=null==(p=c.Period[v])?void 0:p.AdaptationSet[y])?void 0:m.Representation.findIndex(function(c){return c._internalId.equals(g)}),S=h({},c);S.Period=f([],S.Period,!0),S.Period[v]=h({},S.Period[v]);var _=S.Period[v];_.AdaptationSet=f([],_.AdaptationSet,!0),_.AdaptationSet[y]=h({},_.AdaptationSet[y]);var E=_.AdaptationSet[y];return E.Representation=f([],E.Representation,!0),E.Representation[b]=u,S}(c,u.payload)},p[y.ManifestActionType.UpdateRepresentationFailedDownload]=function(c,u){var d,p,f=u.payload,m=f.representationId,g=f.loadFailureReason,v=function(c){var u;return c._internalId.equals(m)?g:null==(u=c._hls)?void 0:u.loadFailureReason};return h(h({},c),{Period:null!=(p=null==(d=c.Period)?void 0:d.map(function(c){var u;return h(h({},c),{AdaptationSet:null==(u=c.AdaptationSet)?void 0:u.map(function(c){var u;return h(h({},c),{Representation:null==(u=c.Representation)?void 0:u.map(function(c){return h(h({},c),{_hls:h(h({},c._hls),{loadFailureReason:v(c)})})})})})})}))?p:[]})},p[y.ManifestActionType.AdjustPeriodStartTimes]=function(c,u){return u.payload.offset?h(h({},c),{Period:c.Period.map(function(c){return h(h({},c),{start:c.start+u.payload.offset})})}):c},p[y.ManifestActionType.UpdatePeriodTiming]=function(c,u){return function(c,u){if(!c.Period)return c;var d=u.periodId,p=u.timing,m=c.Period.findIndex(function(c){return c._id===d});if(m<0)return c;var g=f([],c.Period,!0);return g[m]=h(h({},g[m]),p),h(h({},c),{Period:g})}(c,u.payload)},p[y.ManifestActionType.SetRepresentationDrmKid]=function(c,u){var d=u.payload;return b(c,d.representationId,{associatedKid:d.associatedKid})},p[y.ManifestActionType.SetRepresentationIsLoading]=function(c,u){var d=u.payload;return b(c,d.representationId,{isLoading:d.isLoading})},p[y.ManifestActionType.SetRepresentationSegmentIndex]=function(c,u){var d=u.payload;return b(c,d.representationId,{segmentIndex:d.segmentIndex})},p[y.ManifestActionType.SetRepresentationSegmentIndexParsingError]=function(c,u){var d=u.payload;return b(c,d.representationId,{segmentIndexParsingError:d.segmentIndexParsingError})},p[y.ManifestActionType.SetRepresentationAnchorPoint]=function(c,u){var d=u.payload;return b(c,d.representationId,{anchorPoint:d.anchorPoint})},p[y.ManifestActionType.InitPlaybackTimesFromIndex]=function(c,u){var d,p=u.payload,f=p.representationId,m=p.index,v=p.playbackTimeForIndex,y=(0,g.findRepresentation)(c,f);return y?b(c,f,h(h({},y),{SegmentList:null==(d=y.SegmentList)?void 0:d.map(function(c){return h(h({},c),{SegmentURL:S(c.SegmentURL,m,v)})})})):c},p[y.ManifestActionType.InitPlaybackTimesFromReferenceSegment]=function(c,u){var d,p=u.payload,f=p.representationId,m=p.segmentUrl,v=p.segmentPlaybackTime,y=p.discontinuitySequenceNumber,_=(0,g.findRepresentation)(c,f);if(!(null!=_&&_.SegmentList)||0===_.SegmentList.length||(null==(d=_.SegmentList[0].SegmentURL[0])?void 0:d._playbackTime)!==void 0||void 0===v)return c;var E=_.SegmentList[0].SegmentURL.findIndex(function(c){return c._media===m&&c._discontinuitySequenceNumber===y});return -1===E?c:b(c,f,h(h({},_),{SegmentList:_.SegmentList.map(function(c){return h(h({},c),{SegmentURL:S(c.SegmentURL,E,v)})})}))},p[y.ManifestActionType.ResetSegmentPlaybackTimes]=function(c){return h(h({},c),{Period:c.Period.map(function(c){return h(h({},c),{AdaptationSet:c.AdaptationSet.map(function(c){return h(h({},c),{Representation:c.Representation.map(function(c){var u;return h(h({},c),{SegmentList:null==(u=c.SegmentList)?void 0:u.map(_)})})})})})})})},p))}
14,62198:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.getManifest=void 0,u.getManifest=function(c){return null==c?void 0:c.manifest}},71050:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.ManifestActionType=void 0,(p=d||(u.ManifestActionType=d={})).SetManifest="@instance/manifest/setmanifest",p.SetManifestInitialized="@instance/manifest/setmanifestinitialized",p.RemoveRepresentations="@instance/manifest/removerepresentations",p.UpdateManifest="@instance/manifest/updatemanifest",p.UpdateAdaptationSet="@instance/manifest/updateadaptationset",p.UpdateRepresentation="@instance/manifest/updaterepresentation",p.UpdatePeriodTiming="@instance/manifest/updateperiodtiming",p.AdjustPeriodStartTimes="@instance/manifest/adjustperiodstarttimes",p.SetRepresentationDrmKid="@instance/manifest/setrepresentationdrmkid",p.UpdateRepresentationFailedDownload="@instance/manifest/setrepresentationfaileddownload",p.SetRepresentationSegmentIndex="@instance/manifest/setrepresentationsegmentindex",p.SetRepresentationIsLoading="@instance/manifest/setrepresentationisloading",p.SetRepresentationSegmentIndexParsingError="@instance/manifest/setrepresentationsegmentindexparsingerror",p.SetRepresentationAnchorPoint="@instance/manifest/setrepresentationacnhorpoint",p.InitPlaybackTimesFromIndex="@instance/manifest/initplaybacktimesfromindex",p.InitPlaybackTimesFromReferenceSegment="@instance/manifest/initplaybacktimesfromreferencesegment",p.ResetSegmentPlaybackTimes="@instance/manifest/resetsegmentplaybacktimes"},95236:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},f=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.SegmentInfoMapReducer=void 0;var m=d(3793),g=d(37641),v=d(49713);function y(c,u,d){var p;return h(h({},c),((p={})[u]=d,p))}u.SegmentInfoMapReducer=(0,m.default)({},((p={})[v.SegmentInfoMapActionType.SetSegmentInfos]=function(c,u){return y(c,u.payload.qualityPath,u.payload.updatedEntry)},p[v.SegmentInfoMapActionType.UpdateSegmentInfos]=function(c,u){return function(c,u,d){if(!c[u]||0===d.segmentInfos.length)return y(c,u,d);var p=c[u].segmentInfos,m=p.findIndex(function(c){return(0,g.areSegmentsIdentical)(c,d.segmentInfos[0])});if(-1===m)return y(c,u,d);var v,b,S=p.length-m,_=d.segmentInfos.length-S;if(0!==m||0!==_){var E=_>0?d.segmentInfos.slice(-_):[];b=f(f([],p.slice(m),!0),E,!0)}else b=p;var T=h(h(h({},c[u]),d),{segmentInfos:b});return h(h({},c),((v={})[u]=T,v))}(c,u.payload.qualityPath,u.payload.updatedEntry)},p))},72498:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.getMostRecentlyRefreshedQuality=u.getSegmentInfos=u.getSegmentMapEntry=void 0,u.getSegmentMapEntry=function(c,u){return null==c?void 0:c.segmentInfoMap[u]},u.getSegmentInfos=function(c,d){var p,h;return null!=(h=null==(p=(0,u.getSegmentMapEntry)(c,d))?void 0:p.segmentInfos)?h:[]},u.getMostRecentlyRefreshedQuality=function(c){if(c)return Object.values(c.segmentInfoMap).filter(function(c){return null!=c.qualityInfo.lastUpdateTimestamp}).sort(function(c,u){var d=c.qualityInfo.lastUpdateTimestamp;return u.qualityInfo.lastUpdateTimestamp-d})[0]}},49713:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.SegmentInfoMapActionType=void 0,(p=d||(u.SegmentInfoMapActionType=d={})).SetSegmentInfos="@instance/sources/@source/playback/setSegmentInfos",p.UpdateSegmentInfos="@instance/sources/@source/playback/updateSegmentInfos"},59604:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.mergeBufferBlockTimeRanges=function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];var d=m(c);return Object.keys(d).flatMap(function(c){return p.BufferRangeHelper.mergeRanges(d[c],h)})},u.excludeBufferBlockTimeRange=function(c,u){var d,g=u.bufferBlockId,v=m(c.map(function(c){return f(c.start,c.end,c.bufferBlockId)})),y=v[g];if(!(null!=y&&y.length))return c;
14var b=(d=[],y.forEach(function(c){(0,p.areDisjoint)(c,u)?d.push(c):(0,p.isSurrounding)(c,u)?d.push.apply(d,[f(c.start,u.start,c.bufferBlockId),f(u.end,c.end,c.bufferBlockId)]):(0,p.isFullyIncluded)(c,u)||d.push(f(c.start>=u.start?u.end:c.start,c.end>u.end?c.end:u.start,c.bufferBlockId))}),d.filter(function(c){return c.end-c.start>=h}));return v[g]=p.BufferRangeHelper.mergeRanges(b,h),Object.keys(v).flatMap(function(c){return v[c]})},u.segmentToBufferBlockTimeRange=function(c){var u,d=null!=(u=c.getBufferBlockId())?u:1/0,p=c.getPlaybackTime();return f(p,p+c.getDuration(),d)};var p=d(4524),h=.1;function f(c,u,d){return{start:(0,p.rangeFixedValue)(c),end:(0,p.rangeFixedValue)(u),bufferBlockId:d}}function m(c){var u={};return c.forEach(function(c){u[c.bufferBlockId]||(u[c.bufferBlockId]=[]),u[c.bufferBlockId].push(c)}),u}},73861:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},f=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferReducer=void 0;var m=d(4524),g=d(3793),v=d(70118),y=d(59604);function b(){return{isLoadingRangeFinished:!1,isBufferBlockSwitchOngoing:!1,isTimestampRollingOver:!1,bufferStateMap:{}}}u.BufferReducer=(0,g.default)(b(),((p={})[v.BufferActionType.SetBufferMaxSize]=function(c,u){var d,p=u.payload;return h(h({},c),{bufferStateMap:h(h({},c.bufferStateMap),((d={})[p.mimeType]=h(h({},c.bufferStateMap[p.mimeType]),{maxBufferSize:p.maxBufferSize}),d))})},p[v.BufferActionType.SetRendererRanges]=function(c,u){var d,p=u.payload;return h(h({},c),{bufferStateMap:h(h({},c.bufferStateMap),((d={})[p.mimeType]=h(h({},c.bufferStateMap[p.mimeType]),{rendererRanges:p.ranges}),d))})},p[v.BufferActionType.SetBufferBlockSwitchOngoing]=function(c,u){var d=u.payload;return h(h({},c),{isBufferBlockSwitchOngoing:d.isOngoing})},p[v.BufferActionType.SetTimestampRollingOver]=function(c,u){var d=u.payload;return h(h({},c),{isTimestampRollingOver:d.isRollingOver})},p[v.BufferActionType.AddLoadedRange]=function(c,u){var d,p,g,v=u.payload,b=v.mimeType,S=v.range;if(!b)return c;var _=null!=(g=null==(p=c.bufferStateMap[b])?void 0:p.loadedRanges)?g:[];return _.some(function(c){return(0,m.isFullyIncluded)(S,c)})?c:h(h({},c),{bufferStateMap:h(h({},c.bufferStateMap),((d={})[b]=h(h({},c.bufferStateMap[b]),{loadedRanges:y.mergeBufferBlockTimeRanges.apply(void 0,f(f([],_,!1),[S],!1))}),d))})},p[v.BufferActionType.RemoveLoadedRange]=function(c,u){var d,p,f,g=u.payload,v=g.mimeType,b=g.range;if(!v)return c;var S=null!=(f=null==(p=c.bufferStateMap[v])?void 0:p.loadedRanges)?f:[];return S.every(function(c){return!(0,m.isOverlapping)(b,c)})?c:h(h({},c),{bufferStateMap:h(h({},c.bufferStateMap),((d={})[v]=h(h({},c.bufferStateMap[v]),{loadedRanges:(0,y.excludeBufferBlockTimeRange)(S,b)}),d))})},p[v.BufferActionType.ResetLoadedRanges]=function(c,u){var d,p,f,m=u.payload.mimeType;if(void 0===m){if(void 0===c)return b();var g=h(h({},c),{bufferStateMap:h({},c.bufferStateMap)});return Object.keys(g.bufferStateMap).forEach(function(c){g.bufferStateMap[c]=h(h({},g.bufferStateMap[c]),{loadedRanges:[]})}),g}return(null!=(f=null==(p=c.bufferStateMap[m])?void 0:p.loadedRanges)?f:[]).length>0?h(h({},c),{bufferStateMap:h(h({},c.bufferStateMap),((d={})[m]=h(h({},c.bufferStateMap[m]),{loadedRanges:[]}),d))}):c},p[v.BufferActionType.SetLoadingRangeFinished]=function(c,u){var d=u.payload.isFinished;return d!==c.isLoadingRangeFinished?h(h({},c),{isLoadingRangeFinished:d}):c},p))},13114:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.getDrmUsedKeySystem=u.getDrmKeyIdsWithErrors=u.getDrmState=void 0,u.getDrmState=function(c){return null==c?void 0:c.drm},u.getDrmKeyIdsWithErrors=function(c){var u,d;return null!=(d=null==(u=c.drm)?void 0:u.keyIdsWithErrors)?d:[]},u.getDrmUsedKeySystem=function(c){var d;return(null==(d=(0,u.getDrmState)(c))?void 0:d.usedKeySystem)||{kind:null,uid:null}}},41710:function(c,u,d){var p,h=this&&this.__assign||function(){return(
vendor: 6,211 bytes, line 14
14h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.RendererReducer=void 0;var f=d(3793),m=d(39564);u.RendererReducer=(0,f.default)({mseObjectUrl:""},((p={})[m.RendererActionType.SetMseObjectUrl]=function(c,u){var d=u.payload;return h(h({},c),{mseObjectUrl:d.url})},p))},39523:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.addStreamTimeRange=function(c,u,d){var f={start:u.start,end:u.end,type:d};return(0,p.createAction)(h.StreamTimelineActionType.StreamTimeRangeAdd,{mimeType:c,streamTimeRange:f})},u.removeStreamTimeRange=function(c,u,d){return(0,p.createAction)(h.StreamTimelineActionType.StreamTimeRangeRemove,{mimeType:c,range:u,type:d})},u.resetStreamTimeline=function(c){return(0,p.createAction)(h.StreamTimelineActionType.StreamTimelineReset,c)};var p=d(35267),h=d(80965)},14808:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},f=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.getStreamTimeline=u.StreamTimelineReducer=void 0;var m=d(4524),g=d(3793),v=d(99529),y=d(80965),b={};u.StreamTimelineReducer=(0,g.default)(b,((p={})[y.StreamTimelineActionType.StreamTimeRangeAdd]=function(c,u){var d,p,m,g;return d=u.payload.mimeType,p=u.payload.streamTimeRange,g=c[d]?f([],c[d],!0):[],h(h({},c),((m={})[d]=(0,v.addStreamTimeRangeToTimeline)(g,p),m))},p[y.StreamTimelineActionType.StreamTimeRangeRemove]=function(c,u){return function(c,u,d,p){if(!c[u])return c;var g,y=f([],c[u],!0);if(p){var b=h(h({},d),{type:p});y=(0,v.removeStreamTimeRangeFromTimeline)(y,b)}else y=m.BufferRangeHelper.excludeTimeRange(y,d);return h(h({},c),((g={})[u]=y,g))}(c,u.payload.mimeType,u.payload.range,u.payload.type)},p[y.StreamTimelineActionType.StreamTimelineReset]=function(c,u){var d,p;return(d=u.payload)?h(h({},c),((p={})[d]=[],p)):b},p)),u.getStreamTimeline=function(c){var u;return null!=(u=null==c?void 0:c.streamTimeline)?u:{}}},80965:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.StreamTimelineActionType=void 0,(p=d||(u.StreamTimelineActionType=d={})).StreamTimelineReset="@instance/source/stream/streamtimelinereset",p.StreamTimeRangeRemove="@instance/source/stream/streamtimerangeremove",p.StreamTimeRangeAdd="@instance/source/stream/streamtimerangeadd"},99529:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.StreamTimeRangeType=void 0,u.addStreamTimeRangeToTimeline=function(c,u){var d=c.filter(function(c){return c.type===u.type}).concat(u),p=f.BufferRangeHelper.mergeRanges(d,m.DefaultSettings.GAP_TOLERANCE);return c=c.filter(function(c){return c.type!==u.type}),p.forEach(function(u){c=g.ArrayHelper.insertInSortedArray(c,u,function(c){return c.start>u.start})}),c},u.removeStreamTimeRangeFromTimeline=function(c,u){var d=c.filter(function(c){return c.type===u.type}),p=f.BufferRangeHelper.excludeTimeRange(d,u);return c=c.filter(function(c){return c.type!==u.type}),p.forEach(function(u){u.end-u.start>m.DefaultSettings.GAP_TOLERANCE&&(c=g.ArrayHelper.insertInSortedArray(c,u,function(c){return c.start>u.start}))}),c},u.getTrackIdentifier=function(c){var u=c.mimeType,d=c.internalRepresentationId;return v.MimeTypeHelper.isSubtitle(u)?"".concat(u,"/").concat(d.adaptationSetId):u};var p,h,f=d(4524),m=d(70962),g=d(74853),v=d(85434);(p=h||(u.StreamTimeRangeType=h={})).Loading="loading",p.Failed="failed"},16870:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.SynchronizedTimeService=void 0,u.initializeSynchronizedTimeService=function(c,u){var d=c.serviceManager,h=u.sourceIdentifier;if(!d.has(p.ServiceName.SynchronizedTimeService,h)){var f=new v(c,u);d.set(p.ServiceName.SynchronizedTimeService,f,h)}};var p=d(80813),h=d(89927),f=d(55938),m=d(58747),g=d(58486),v=function(){function c(c,u){this.MI=c,this.NI=u,this.OI=0;var d=new g.HttpHeadTimeProvider(this.MI,new m.ISO8601TimeDecoder),p=new g.HttpGetTimeProvider(this.MI,new m.XSDateTimeDecoder),h=new g.HttpGetTimeProvider(this.MI,new m.ISO8601TimeDecoder),f=new g.StringTimeProvider(new m.XSDateTimeDecoder);this.PI={"urn:mpeg:dash:utc:http-head:2012":d,"urn:mpeg:dash:utc:http-head:2014":d,"urn:mpeg:dash:utc:http-xsdate:2012":p,"urn:mpeg:dash:utc:http-xsdate:2014":p,"urn:mpeg:dash:utc:http-iso:2012":h,"urn:mpeg:dash:utc:http-iso:2014":h,"urn:mpeg:dash:utc:direct:2012":f,"urn:mpeg:dash:utc:direct:2014":f},this.SI()}return c.prototype.SI=function(){var c=(0,f.getUtcTimingSources)(this.MI.config,this.NI.source);c.length>0&&this.synchronizeWithServer(c)},c.prototype.getTimeDifference=function(){return this.OI},c.prototype.TI=function(c){var u=this,d=c.shift();if(!d)return Promise.reject(Error("No time source left to try"));if(!this.PI[d.schemeIdUri])return this.MI.logger.debug("UTCTiming scheme ".concat(d.schemeIdUri," is not supported.")),this.TI(c);this.QI=this.PI[d.schemeIdUri];var p=Date.now();return this.QI.requestTime(d.value).then(function(c){return c+(Date.now()-p)/2}).catch(function(){return u.MI.logger.debug("UTCTiming scheme ".concat(d.schemeIdUri," resulted in an error")),u.TI(c)})},c.prototype.synchronizeWithServer=function(c,u){var d=this;return void 0===u&&(u=0),this.RI||(this.RI=this.TI(c).then(function(c){d.QI=void 0,d.OI=c+(0,h.toMilliSeconds)(u)-Date.now(),d.MI.logger.debug("Synchronized client time with time server - drift: ".concat((0,h.toSeconds)(d.OI),"s"))}).catch(function(){d.MI.logger.debug("Synchronizing client time with time server unsuccessful")})),this.RI},c.prototype.getSynchronizationPromise=function(){return this.RI},c.prototype.reset=function(){this.OI=0,this.RI=void 0,this.QI&&(this.QI.cancelRequest(),this.QI=void 0)},c.prototype.dispose=function(){this.reset()},c}();u.SynchronizedTimeService=v}
14,58747:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.XSDateTimeDecoder=u.ISO8601TimeDecoder=void 0,u.ISO8601TimeDecoder=function(){function c(){}return c.prototype.decode=function(c){return Date.parse(c)},c}(),u.XSDateTimeDecoder=function(){function c(){}return c.prototype.decode=function(u){var d=Date.parse(u);if(isNaN(d)){var p=c.DATETIME_REGEX.exec(u);if(!p)return 0/0;var h=Date.UTC(parseInt(p[1],10),parseInt(p[2],10)-1,parseInt(p[3],10),parseInt(p[4],10),parseInt(p[5],10),p[6]&&parseInt(p[6],10)||0,p[7]&&1e3*parseFloat(p[7])||0);if(p[9]&&p[10]){var f=60*parseInt(p[9],10)+parseInt(p[10],10);h+=("+"===p[8]?-1:1)*f*6e4}return new Date(h).getTime()}return d},c.DATETIME_REGEX=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d*)(\.\d*)?)?(?:([+-])(\d{2}):(\d{2}))?/,c}()},58486:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.StringTimeProvider=u.HttpHeadTimeProvider=u.HttpGetTimeProvider=u.HttpTimeProvider=u.ServerTimeProvider=void 0;var f=d(4129),m=d(29669),g=function(c){this.timeDecoder=c};u.ServerTimeProvider=g;var v=function(c){function u(u,d){var p=c.call(this,d)||this;return p.d5=u,p}return h(u,c),u.prototype.f5=function(c){var u=this,d=c.shift();return d?(this.e5=new f.DefaultContentLoader(this.d5,{requestType:m.HttpRequestType.TIME_SYNC,maxRetries:1}),this.e5.load(d,this.requestMethod).then(function(c){var d=u.timeDecoder.decode(u.processResponse(c));return u.e5=void 0,isNaN(d)?Promise.reject(Error("Failed to decode time")):Promise.resolve(d)}).catch(function(d){return u.d5.logger.debug("could not load UTC time url",d),u.f5(c)})):Promise.reject(Error("No time source left to try"))},u.prototype.requestTime=function(c){var u=this,d=c.match(/\S+/g);return d?this.f5(d).then(function(c){return u.e5=void 0,c}):Promise.reject(Error("No time source left to try"))},u.prototype.cancelRequest=function(){this.e5&&this.e5.cancel()},u}(g);u.HttpTimeProvider=v;var y=function(c){function u(u,d){var p=c.call(this,u,d)||this;return p.requestMethod=m.HttpRequestMethod.GET,p}return h(u,c),u.prototype.processResponse=function(c){return c.body},u}(v);u.HttpGetTimeProvider=y,u.HttpHeadTimeProvider=function(c){function u(u,d){var p=c.call(this,u,d)||this;return p.requestMethod=m.HttpRequestMethod.HEAD,p}return h(u,c),u.prototype.processResponse=function(c){var u=Object.keys(c.headers).find(function(c){return"date"===c.toLocaleLowerCase()});return u&&c.headers[u]||""},u}(y),u.StringTimeProvider=function(c){function u(){return null!==c&&c.apply(this,arguments)||this}return h(u,c),u.prototype.requestTime=function(c){var u=this.timeDecoder.decode(c);return isNaN(u)?Promise.reject(Error("Failed to decode time")):Promise.resolve(u)},u.prototype.cancelRequest=function(){},u}(g)},55938:function(c,u,d){var p=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.getUtcTimingSources=function(c,u){var d,f,m,g,v=[];return(m=(null==(d=c.live)?void 0:d.synchronization)||[],g=(null==(f=u.live)?void 0:f.synchronization)||[],p(p([],m,!0),g.filter(function(c){return!m.some(function(u){return u.method===c.method})}),!0)).forEach(function(c){var u=function(c){switch(c){case h.LiveSynchronizationMethod.HttpHead:return"urn:mpeg:dash:utc:http-head:2014";case h.LiveSynchronizationMethod.HttpXsDate:return"urn:mpeg:dash:utc:http-xsdate:2014";case h.LiveSynchronizationMethod.HttpIso:return"urn:mpeg:dash:utc:http-iso:2014";default:return}}(c.method);u&&v.push({schemeIdUri:u,value:c.serverUrl})}),v};var h=d(21281)}
vendor: 5,698 bytes, line 14
14,69102:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.areAudioMimeCodecsCompatible=function(c,u){return c.mimeType===u.mimeType&&p.CodecStringHelper.canSwitchBetweenAudioCodecs(c.codec,u.codec)},u.hasContentProtection=function(c,u){return void 0===c&&(c=[]),void 0===u&&(u=[]),0===c.length&&0===u.length||c.length>0&&u.length>0};var p=d(34047)},90919:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.findSegmentUrlIndexWithinSegmentList=function(c,u){return u.findIndex(function(u){var d=c.discontinuitySequenceNumber===u._discontinuitySequenceNumber,f=h(c.url,u._media),m=(0,p.compareValues)(c.byteRange,u._byteRange);return d&&f&&m})},u.matchesMediaUrl=h;var p=d(19541);function h(c,u){return c.endsWith(u)||c.split("?")[0].endsWith(u)}},48954:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.getValues=function(c){var u=[];return c.forEach(function(c){u.push(c)}),u},u.getKeys=function(c){var u=[];return c.forEach(function(c,d){u.push(d)}),u}},33004:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.bytesToBits=function(c){return 8*c}},68981:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.adjustTargetTimeToPeriodStart=function(c,u,d,p){var h,f=d.getPeriodIdForTime(c);if(!f)return c;var m=d.isTimeNearPeriodEnd(c,f,u),g=d.getNextPeriod(f);return m&&g?(p.debug("Target time ".concat(c," too close to end of period ").concat(f,", adjusting to next period start ").concat(g.start)),null!=(h=g.start)?h:c):c}},50962:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.isLowLatencyConfigured=function(c){var u=c.serviceManager.get(p.ServiceName.LiveLatencyService);return(null==u?void 0:u.isConfigured())||!1};var p=d(80813)},60729:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.isPlayingLowLatencyHls=function(c){if(!(0,m.isLowLatencyConfigured)(c)||!c.settings.LL_HLS)return!1;var u,d=(0,p.getSourceState)(c);if(!d)return!1;var g=h.ModuleManager.get(f.ModuleName.HLS,!1);if(!g)return!1;var v=g.selectors,y=v.getHlsState,b=v.getIsLowLatencyPlaylist,S=y(d);return!!S&&null!=(u=b(S))&&u};var p=d(15971),h=d(88052),f=d(62756),m=d(50962)}},function(c){return c(c.s=52570)}])}(bitmovinplayerEngineBitmovin);var bitmovinplayerEngineBitmovinExports=bitmovinplayerEngineBitmovin.exports;let BitmovinEngineModule=getDefaultExportFromCjs$1(bitmovinplayerEngineBitmovinExports);var bitmovinplayerEngineNative={exports:{}};!function(c){var u;self,c.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[855],{48297:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.AbstractHlsManifestController=void 0;var p,h,f=d(80813),m=d(3714),g=d(32703),v=d(59225),y=d(32485),b=d(79721),S=d(89927),_=d(70850),E=d(88052),T=d(62756);(p=h||(h={})).CueTag="cueTag",p.Scte35="scte35",p.DateRange="dateRange",p.CustomTags="customTags",u.AbstractHlsManifestController=function(){function c(c){var u,d=this;this.context=c,this.d7=function(c){if(c.hasOwnProperty("metadata")){var u={metadataType:c.metadataType.toUpperCase(),metadata:c.metadata};(c.start||0===c.start)&&(u.start=c.start),c.end&&(u.end=c.end),d.context.eventHandler.dispatchEvent(m.PlayerEvent.Metadata,u)}},this.e7=function(c){var u=d.segmentTimelineController.getPlayingSegment(c.relativeTime||c.time);u&&!u.consumed&&(u.consumed=!0,d.g7(u),d.f7(u))},this.h7=function(){d.segmentTimelineController.reset()},this.i7=function(){d.segmentTimelineController.reset()},this.settings=c.settings,this.b7=c.eventHandler,this.b7.on(m.PlayerEvent.TimeChanged,this.e7),this.b7.on(m.PlayerEvent.TimeShifted,this.h7),this.b7.on(m.PlayerEvent.Seeked,this.i7),this.c7=new v.MetadataService(this.context,((u={})[y.TimedMetadataType.Manifest]=this.d7,u[y.TimedMetadataType.DateRange]=this.d7,u))}return c.prototype.f7=function(c){var u={url:c.uri,uid:null,mimeType:"video/mp4",playbackTime:c.playbackTime,duration:c.duration,mediaInfo:{},dateTime:null};c.dateTime&&(u.dateTime=c.dateTime.toISOString()),c.customTags&&c.customTags.length>0&&(u.EXPERIMENTAL=u.EXPERIMENTAL||{},u.EXPERIMENTAL.hlsAttributes=c.customTags.map(function(c){return c.attributes})),this.context.eventHandler.dispatchEvent(m.PlayerEvent.SegmentPlayback,u)},c.prototype.g7=function(c){var u=this,d=c.dateTime?(0,S.toSeconds)(c.dateTime.getTime()):c.playbackTime,p=d+c.duration;c.metadata&&c.metadata.forEach(function(c){c.type.includes("CUE")?u.context.eventHandler.dispatchEvent(m.PlayerEvent.Metadata,{metadataType:m.MetadataType.CUETAG,metadata:c}):u.context.eventHandler.dispatchEvent(m.PlayerEvent.Metadata,{metadataType:c.type,metadata:c})}),c.customTags&&this.context.eventHandler.dispatchEvent(m.PlayerEvent.Metadata,{metadataType:m.MetadataType.CUSTOM,metadata:c.customTags,start:d,end:p})},c.prototype.isValidMasterPlaylist=function(c){return E.ModuleManager.get(T.ModuleName.HLS).NativeHlsManifestParserUtils.isValidMasterPlaylist(c)},c.prototype.j7=function(c){return E.ModuleManager.get(T.ModuleName.HLS).NativeHlsManifestParserUtils.parsePlaylist(c)},c.prototype.dispatchDateRangeToParsedService=function(c){var u,d={metadataType:m.MetadataType.DATERANGE,metadata:c.data,data:c.data,start:c.startTime,end:c.endTime};null==(u=this.context.serviceManager.get(f.ServiceName.MetadataParsedService))||u.addMetadata(b.DEFAULT_PERIOD_ID,d)},c.prototype.k7=function(c){return{metadataType:c.metadataType,metadata:c.metadata,data:c.metadata,start:c.start,end:c.end}},c.prototype.l7=function(c){var u=c.metadataType===m.MetadataType.DATERANGE?y.TimedMetadataType.DateRange:y.TimedMetadataType.Manifest;this.c7.addToMetadataParsedService(c.start,this.k7(c),b.DEFAULT_PERIOD_ID),c.metadataType!==m.MetadataType.CUSTOM&&this.c7.addToT
14imeline(u,c.start,c)},c.prototype.onPlaylistUpdated=function(c){var u,d,p=this,h=c.playlist,v=c.variant,b=c.segments;this.segmentTimelineController.switchTimeline(v.id);var S=this.segmentTimelineController.updateTimeline(v.id,b),E=this.context.serviceManager.get(f.ServiceName.MetadataParsedService);E&&(E.expirationTimeInSeconds=S);var T=null==(u=b[0])?void 0:u.dateTime;T&&this.c7.removeUntil(_.Util.timeInSeconds(T)),(0,g.extractDateRangeMetadata)(null!=(d=h.dateRange)?d:[],h.endList?h.programDateTime:void 0,function(c){var u={metadataType:m.MetadataType.DATERANGE,metadata:c.data,start:c.startTime,end:c.endTime};p.c7.addToTimeline(y.TimedMetadataType.DateRange,c.startTime,u)});var w=this.segmentTimelineController.getCurrentTimeline();this.extractMetadataFromTimeline(w,!h.endList)},c.prototype.extractMetadataFromTimeline=function(c,u){var d=this;c.forEach(function(c){Object.values(h).forEach(function(p){c.hasOwnProperty(p)&&(function(c,u,d){var p=d&&u.dateTime?(0,S.toSeconds)(u.dateTime.getTime()):u.playbackTime;switch(c){case h.CueTag:return[{metadataType:m.MetadataType.CUETAG,metadata:u[h.CueTag],start:p}];case h.Scte35:return[{metadataType:m.MetadataType.SCTE,metadata:u[h.Scte35],start:p}];case h.CustomTags:return[{metadataType:m.MetadataType.CUSTOM,metadata:u[h.CustomTags],start:p,end:p+u.duration}];default:return[]}})(p,c,u).forEach(function(c){return d.l7(c)})})})},c.prototype.parseTimelineEntries=function(c){var u=this.j7(c);return E.ModuleManager.get(T.ModuleName.HLS).NativeHlsManifestParserUtils.isValidVariantPlaylist(u)?u.segments.map(function(c){var u;return{uri:c.uri,duration:c.duration,discontinuity:null!=(u=c.discontinuity)&&u,dateTime:null,metadata:[],consumed:!1,playbackTime:-1,keys:[]}}):[]},c.prototype.getPlaybackTimeOfFirstSegmentInTimeline=function(c){for(var u=0;u<c.length;u++)for(var d=c[u],p=0,h=0;h<d.timeline.length;h++){for(var f=d.timeline[h],m=this.segmentTimelineController.getCurrentTimeline(),g=0;g<m.length;g++){var v=m[g];if(v.uri===f.uri)return v.playbackTime-p}p+=f.duration}return -1},c.prototype.m7=function(){this.b7&&(this.b7.off(m.PlayerEvent.TimeChanged,this.e7),this.b7.off(m.PlayerEvent.TimeShifted,this.h7),this.b7.off(m.PlayerEvent.Seeked,this.i7))},c.prototype.dispose=function(){this.m7(),this.segmentTimelineController&&(this.segmentTimelineController.dispose(),this.segmentTimelineController=null),this.c7&&(this.c7.dispose(),this.c7=null),this.settings=null,this.b7=null},c}()},32418:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.AppleAirplayService=u.isAirplaySupported=void 0;var p,h,f=d(3714),m=d(19274);(p=h||(h={})).Available="available",p.NotAvailable="not-available",u.isAirplaySupported=function(){return!!window.WebKitPlaybackTargetAvailabilityEvent},u.AppleAirplayService=function(){function c(c,u){var d=this;this.videoElement=c,this.eventHandler=u,this.RO=!1,this.SO=function(c){switch(c.availability){case h.Available:d.RO=!0,d.eventHandler.dispatchEvent(f.PlayerEvent.AirplayAvailable);break;case h.NotAvailable:d.RO=!1}},this.TO=function(){d.eventHandler.dispatchEvent(f.PlayerEvent.AirplayChanged,{airplayEnabled:d.isAirplayActive(),time:d.videoElement.currentTime})},this.initAirplay()}return c.prototype.initAirplay=function(){this.videoElement.setAttribute("x-webkit-airplay","allow"),this.videoElement.addEventListener(m.MediaElementEvent.webkitplaybacktargetavailabilitychanged,this.SO),this.videoElement.addEventListener(m.MediaElementEvent.webkitcurrentplaybacktargetiswirelesschanged,this.TO)},c.prototype.isAirplayAvailable=function(){return this.RO},c.prototype.isAirplayActive=function(){return this.videoElement.isAirplayActive()},c.prototype.showAirplayTargetPicker=function(){this.isAirplayAvailable()&&(this.videoElement.webkitShowPlaybackTargetPicker(),this.eventHandler.dispatchEvent(f.PlayerEvent.ShowAirplayTargetPicker))},c.prototype.dispose=function(){this.videoElement.removeEventListener(m.MediaElementEvent.webkitplaybacktargetavailabilitychanged,this.SO),this.videoElement.removeEventListener(m.MediaElementEvent.webkitcurrentplaybacktargetiswirelesschanged,this.TO)},c}()}
vendor: 9,501 bytes, lines 14-15
14,99373:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.AssetAvailabilityChecker=void 0;var p=d(4129),h=d(29669),f=d(89927),m=d(88844),g=d(19274);u.AssetAvailabilityChecker=function(){function c(c,u,d){var m=this;this.context=c,this.source=u,this.mediaElement=d,this.nN=function(){m.mediaElement.removeEventListener(g.MediaElementEvent.loadstart,m.nN);var c=(0,f.toMilliSeconds)(m.context.settings.XHR_TIMEOUT)/2;m.lN=window.setTimeout(function(){m.context.logger.debug("Asset loading has not resolved after ".concat((0,f.toSeconds)(c),"s. Checking accessibility."));var u=!1;m.mN=new p.DefaultContentLoader(m.context,{onProgress:function(c){var d;c.loadedBytes>0&&(u=!0,null==(d=m.mN)||d.cancel())},requestType:h.HttpRequestType.INTERNAL}),m.mN.load(m.source.src).catch(function(c){if(!u){m.context.logger.debug("Forcing error event as the asset was not accessible.",c);var d=new Event(g.MediaElementEvent.error,{bubbles:!1,cancelable:!1});m.source.dispatchEvent(d)}})},c)},d.addEventListener(g.MediaElementEvent.loadstart,this.nN)}return c.prototype.dispose=function(){(0,m.clearTimeoutIfDefined)(this.lN),this.mediaElement.removeEventListener(g.MediaElementEvent.loadstart,this.nN),this.mN&&(this.mN.cancel(),this.mN.dispose())},c}()},95945:function(c,u,d){var p=this&&this.__extends||(h=function(c,u){return(h=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}h(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.FallbackHlsManifestController=void 0;var h,f,m=d(25926),g=d(4224),v=d(3714),y=d(29669),b=d(88052),S=d(62756),_=d(48297),E=d(56191),T=d(59043),w=d(77374);u.FallbackHlsManifestController=function(c){function u(u,d){var p=c.call(this,u)||this;return p.R7=function(c){p.onPlaylistUpdated(c)},p.Y7=function(c){return p.context.logger.debug("Error while loading the playlist ",c),null},f=b.ModuleManager.get(S.ModuleName.HLS).PlaylistUtils,p.P7=d,p.Q7=new T.HlsDownloadService(p.context),p.segmentTimelineController=new E.FallbackSegmentTimelineController(u.videoElement),p.context.logger.debug("Initializing controller for native HLS parsing"),p.P7.setOnPlaylistUpdated(p.R7),p}return p(u,c),u.prototype.init=function(){return Promise.resolve()},u.prototype.getDownloadedVideoData=function(){return{id:"not available",bitrate:0,height:0,width:0,isAuto:!0}},u.prototype.getPlayingVideoData=function(){return null},u.prototype.resolveMasterManifest=function(c){var u=this;return this.P7.resolveMasterManifest(c).then(function(c){var d=c.masterManifest,p=c.firstVariantPlaylist,h=c.resolvedMasterUrl;return u.overrideManifestUrl(d,h,p)})},u.prototype.getParsedManifest=function(){return this.P7.getParsedManifest()},u.prototype.getManifest=function(){return this.P7.getManifest()},u.prototype.overrideManifestUrl=function(c,u,d){return"createObjectURL"in window.URL?this.S7(c,d):(this.context.eventHandler.dispatchEvent(v.PlayerEvent.Warning,new m.PlayerWarning(g.WarningCode.SETUP_CREATE_OBJECT_URL_MISSING)),Promise.resolve(u))},u.prototype.S7=function(c,u){var d=this;return f.isLive(u)?Promise.resolve(this.X7(c)):Promise.all(this.T7(c)).then(function(u){return u.filter(function(c){return!!c}).forEach(function(u){c=c.replace(u.mediaUrl,u.blobUrl)}),d.X7(c)})},u.prototype.T7=function(c){var u=this;return c.split(`
15`).map(function(c){return w.parseUrlFromLine(c)}).filter(function(c){return null!==c}).map(function(c){return u.U7(c)})},u.prototype.U7=function(c){var u=this;return this.Q7.downloadPlaylist(c,y.HttpRequestType.MANIFEST_HLS_VARIANT).then(function(d){var p=w.replaceManifestUrls(c,d.body,u.settings.QUERY_PARAMETERS);return{blobUrl:u.W7(p),mediaUrl:c}}).catch(this.Y7)},u.prototype.V7=function(c){var u=this;return this.Q7.downloadPlaylist(c.uri,y.HttpRequestType.MANIFEST_HLS_VARIANT).then(function(d){return{width:c.width,height:c.height,timeline:u.parseTimelineEntries(d.body)}}).catch(this.Y7)},u.prototype.W7=function(c){var u=new Blob([c],{type:"application/x-mpegURL"});return window.URL.createObjectURL(u)},u.prototype.X7=function(c){return"data:application/x-mpegURL,"+encodeURIComponent(c)},u.prototype.Z7=function(){var c=this.P7.getParsedManifest();return c?c.playlists.map(function(c){return{uri:c.uri,width:c.attributes&&c.attributes.RESOLUTION?c.attributes.RESOLUTION.width:-1,height:c.attributes&&c.attributes.RESOLUTION?c.attributes.RESOLUTION.height:-1}}):[]},u.prototype.a7=function(){var c=this,u=this.Z7();return u.reverse(),Promise.all(u.map(function(u){return c.V7(u)})).then(function(u){var d=c.getPlaybackTimeOfFirstSegmentInTimeline(u);return d>=0&&u.forEach(function(c){c.timeline.reduce(function(c,u){return u.playbackTime=c,c+u.duration},d)}),u})},u.prototype.getCurrentSegments=function(c,u,d,p){return void 0===p&&(p=1),this.a7().then(function(h){var f=h.find(function(c){return c.width===u&&c.height===d});return function(c,u,d){for(var p,h=[],f=0;f<c.length;f++){var m=c[f];p=0;for(var g=0;g<m.timeline.length;g++){var v=m.timeline[g];if(v.playbackTime+v.duration>=d&&(h.push(v.uri),p++),p>u)break}}return h}(f?[f]:h,p,c)})},u.prototype.dispose=function(){var u;null==(u=this.P7)||u.setOnPlaylistUpdated(void 0),c.prototype.dispose.call(this)},u}(_.AbstractHlsManifestController)},56191:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.FallbackSegmentTimelineController=void 0;var p=d(25541);u.FallbackSegmentTimelineController=function(){function c(c){this.deb=c,this.eeb=!0,this.beb={}}return c.prototype.feb=function(){return 1/0===this.deb.duration},c.prototype.switchTimeline=function(c){this.beb[c]||(this.ceb=c,this.beb[c]=[])},c.prototype.updateTimeline=function(c,u){var d=this,h=this.beb[c],f=p.updateTimeline(h,u),m=f.findIndex(function(c){return c.hasOwnProperty("playbackTime")});-1!==m&&p.populateCurrentTimelineWithPlaybackTime(f,m,f[m].playbackTime),this.beb[c]=f;var g=f.reduce(function(c,u){return d.feb()&&!d.eeb||(u.playbackTime=c),c+u.duration},0);return this.eeb&&(this.eeb=!1),g},c.prototype.getPlayingSegment=function(c){for(var u=this.getCurrentTimeline(),d=0;d<u.length;d++){var p=u[d];if(c>=p.playbackTime&&c<=p.playbackTime+p.duration)return u[d]}return null},c.prototype.addDownloadedSegments=function(c){},c.prototype.getCurrentTimeline=function(){return this.beb[this.ceb]},c.prototype.getAllTimelines=function(){return this.beb},c.prototype.reset=function(){this.beb[this.ceb].forEach(function(c){return c.consumed=!1})},c.prototype.dispose=function(){this.beb={},this.deb=null},c}()},30712:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.HlsDownloadErrorHandler=void 0;var p=d(40306),h=d(3336),f=d(4129),m=d(43446),g=d(29669),v=d(21513),y=d(88844),b=d(19274);u.HlsDownloadErrorHandler=function(){function c(c,u){var d=this;this.zN=function(){for(var c=d.pN.buffered,u="",p=0;p<c.length;p++)u+="".concat(c.start(p)," - ").concat(c.end(p),", ");u===d.wN?d.xN++:d.xN=0,d.xN>=10&&d.LO(),d.wN=u},this.KO=function(){var c=m.TimingUtil.getHiResTimestamp(),u=!d.pN.paused&&!d.pN.seeking&&!d.pN.ended;c-d.yN>5&&u&&d.NO()},this.LO=function(){d.uN=m.TimingUtil.getHiResTimestamp(),d.PO()},this.MO=function(){d.uN=-1/0,(0,y.clearTimeoutIfDefined)(d.tN)},this.NO=function(){d.sN=m.TimingUtil.getHiResTimestamp(),d.PO()},this.OO=function(){d.sN=-1/0,d.yN=m.TimingUtil.getHiResTimestamp(),(0,y.clearTimeoutIfDefined)(d.tN)},this.QO=function(){if(0!==d.pN.buffered.length){var c=d.pN.currentTime,u=d.pN.buffered.end(d.pN.buffered.length-1),m=c<=u&&c+.5>u,v=d.pN.paused,y=d.pN.networkState===HTMLMediaElement.NETWORK_LOADING,b=d.pN.videoWidth,S=d.pN.videoHeight;!v&&m&&y&&d.qN.getCurrentSegments(u,b,S,2).then(function(c){var u=new f.DefaultContentLoader(d.oN),m=function(d,p){return void 0===d&&(d=!0),c.length>0&&d?u.load(c.pop(),g.HttpRequestMethod.HEAD).then(function(c){return m(c.status>=200&&c.status<300,c)}):d?Promise.resolve():Promise.reject(p)};m().catch(function(c){var u=c.url,f=c.status,m=c.statusText;d.oN.eventHandler.fireError(new h.PlayerError(p.ErrorCode.NETWORK_ERROR,{url:u,statusCode:f,statusText:m},"Failed to load segment ".concat(u,", statusCode: ").concat(f,", statusText: ").concat(m),d.oN.sourceContext.sourceIdentifier))})})}},this.oN=c,this.pN=c.videoElement,this.qN=u,this.rN=!1,this.uN=-1/0,this.sN=-1/0,this.tN=-1,this.wN="",this.xN=0,this.yN=-1/0,this.pN.addEventListener(b.MediaElementEvent.waiting,this.NO),this.pN.addEventListener(b.MediaElementEvent.stalled,this.LO),this.pN.addEventListener(b.MediaElementEvent.progress,this.MO),this.pN.addEventListener(b.MediaElementEvent.timeupdate,this.OO),(0,v.getCapabilities)().isIOS&&(this.vN=window.setInterval(function(){d.zN(),d.KO()},500))}return c.prototype.PO=function(){var c=Math.abs(this.sN-this.uN);(0,y.clearTimeoutIfDefined)(this.tN),isFinite(c)&&(this.tN=window.setTimeout(this.QO,1e3*(5-Math.min(5,c))))},c.prototype.dispose=function(){(0,y.clearTimeoutIfDefined)(this.vN),(0,y.clearTimeoutIfDefined)(this.tN),this.pN.removeEventListener(b.MediaElementEvent.waiting,this.NO),this.pN.removeEventListener(b.MediaElementEvent.stalled,this.LO),this.pN.removeEventListener(b.MediaElementEvent.progress,this.MO),this.pN.removeEventListener(b.MediaElementEvent.timeupdate,this.OO),this.pN=null,this.qN=null},c}()}
15,59043:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.HlsDownloadService=void 0;var p=d(25926),h=d(4224),f=d(3714),m=d(4129),g=d(29669);u.HlsDownloadService=function(){function c(c){var u=this;this.ieb=!1,this.oeb=function(c){u.geb.eventHandler.dispatchEvent(f.PlayerEvent.Warning,new p.PlayerWarning(h.WarningCode.NETWORK_COULD_NOT_LOAD_MANIFEST)),u.geb.logger.debug("Could not load manifest, got HTTP status code "+c.status)},this.geb=c,this.jeb()}return c.prototype.jeb=function(){this.keb(),this.leb()},c.prototype.keb=function(){this.heb={}},c.prototype.leb=function(){var c=this.geb.sourceContext.source&&this.geb.sourceContext.source.options||{};this.ieb="boolean"==typeof c.hlsManifestWithCredentials?c.hlsManifestWithCredentials:!0===c.manifestWithCredentials},c.prototype.downloadPlaylist=function(c,u,d){return void 0===d&&(d=!0),d&&this.heb.hasOwnProperty(c)?Promise.resolve(this.heb[c]):this.meb(u,c)},c.prototype.meb=function(c,u){var d=this,p=this.neb(c);return p.load(u,g.HttpRequestMethod.GET,g.HttpResponseType.TEXT,null,{},this.ieb).then(function(c){return p.dispose(),d.heb[u]=c,c}).catch(function(c){return p.dispose(),Promise.reject(c)})},c.prototype.neb=function(c){return new m.DefaultContentLoader(this.geb,{onFailure:this.oeb,maxRetries:this.geb.settings.MAX_MPD_RETRIES,requestType:c})},c.prototype.dispose=function(){},c}()},81152:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.HlsLiveNativeTimeTracker=void 0;var p=d(75375),h=d(89927),f=d(88844),m=d(70850),g=d(19274);u.HlsLiveNativeTimeTracker=function(){function c(c,u){this.nativePlayer=c,this.context=u,this.UO=0,this.VO=null,this.WO=null}return c.prototype.onUnload=function(c){c===p.ADVERTISING_ISSUER_NAME&&this.context.settings.RESUME_LIVE_CONTENT_AT_PREVIOUS_POSITION_AFTER_AD_BREAK&&null==this.VO&&(this.nativePlayer.isLive()?(this.VO=Date.now(),this.UO=this.nativePlayer.getSeekableRange().start,this.WO=this.nativePlayer.getStartDate()):this.XO())},c.prototype.XO=function(){this.VO=null,this.UO=0,this.WO=null},c.prototype.adjustTargetTime=function(c,u){var d=this;return u!==p.ADVERTISING_RESTORE_ISSUER_NAME||null==this.VO?(this.context.logger.debug("No adjustments are made",this.VO),Promise.resolve(c)):(null!=this.WO?this.YO():Promise.resolve(null)).then(function(u){if(null!=u){d.context.logger.debug("StartDate progressed from ".concat(d.WO," to: ").concat(u," during the ad"));var p=m.Util.timeInSeconds(u)-m.Util.timeInSeconds(d.WO);d.UO=p}else{d.context.logger.debug("Adjusting time based on seekable range");var f=(0,h.toSeconds)(Date.now()-d.VO);d.UO+=f}var g=c-d.UO;return d.context.logger.debug("Adjusting target time from ".concat(c," by ").concat(d.UO," to ").concat(g)),d.XO(),g})},c.prototype.YO=function(){var c=this,u=this.ZO();return u?Promise.resolve(u):new Promise(function(u){var d=void 0,p=function(){u(c.ZO()),c.context.videoElement.removeEventListener(g.MediaElementEvent.loadeddata,p),(0,f.clearTimeoutIfDefined)(d)};c.context.logger.debug("Waiting for video.startDate to be valid"),c.context.videoElement.addEventListener(g.MediaElementEvent.loadeddata,p),d=window.setTimeout(p,2e3)})},c.prototype.ZO=function(){var c=this.nativePlayer.getStartDate();return c&&!isNaN(c.getTime())?c:null},c}()},81929:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.createHlsManifestController=function(c){if(y(c)){var u=new(h.ModuleManager.get(f.ModuleName.ServiceWorkerClient).createServiceWorkerHlsManifestController(m.AbstractHlsManifestController))(c);return u.init().then(function(){return u}).catch(function(){return b(c)})}return b(c)},u.shouldUseServiceWorker=y;var p=d(80813),h=d(88052),f=d(62756),m=d(48297),g=d(95945),v=d(690);function y(c){var u=c.config.location&&c.config.location.serviceworker;return"serviceWorker"in navigator&&u&&h.ModuleManager.has(f.ModuleName.ServiceWorkerClient)}function b(c){var u=function(c){var u=c.sourceContext.sourceIdentifier,d=c.serviceManager.get(p.ServiceName.NativeManifestService,u);if(d)return d.isSuspended()&&d.restore(),d;var h=new v.NativeManifestService(c);return c.serviceManager.set(p.ServiceName.NativeManifestService,h,u),h}(c),d=new g.FallbackHlsManifestController(c,u);return d.init().then(function(){return d})}}
15,77374:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.replaceManifestUrls=function(c,u,d){var p=u.split(/\r?\n/);return p.forEach(function(u,g){var v=f(u);if(v&&u.match(h)){var y=m(c,v,d);p[g]=u.replace(h,function(){return'URI="'.concat(y,'"')})}else v&&(p[g]=m(c,v,d))}),p.join(`
16`)},u.parseUrlFromLine=f,u.replaceUrlAndAddUriParams=m;var p=d(58313),h=/URI="([^"]+)"/;function f(c){if("#"!==c[0]&&c.trim().length>0)return c;if(c.indexOf("URI")>-1){var u=c.match(h);if(u&&0>u[1].indexOf("skd://")&&0>u[1].indexOf("skds://"))return u[1]}return null}function m(c,u,d){var h=p.URLHelper.concatBaseUrlWithPartial(c,u);return p.URLHelper.appendQueryParametersToUrl(h,d)}},27530:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.NativeModuleDefinition=void 0;var p=d(62756),h=d(925),f=d(49706);u.NativeModuleDefinition={name:p.ModuleName.EngineNative,module:{NativePlayer:h.NativePlayer,technologyChecker:new f.TechnologyChecker}},u.default=u.NativeModuleDefinition},690:function(c,u,d){var p=this&&this.__extends||(h=function(c,u){return(h=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}h(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.NativeManifestService=void 0;var h,f,m=d(80813),g=d(3714),v=d(32703),y=d(29669),b=d(88847),S=d(79721),_=d(89927),E=d(88844),T=d(70850),w=d(88052),P=d(62756),A=d(59043),I=d(77374);u.NativeManifestService=function(c){function u(u){var d=c.call(this)||this;return d.r7=null,d.C8=null,d.D8=null,d.E8=null,d.G8=[],f=w.ModuleManager.get(P.ModuleName.HLS).PlaylistUtils,d.n7=u,d.o7=u.settings,d.p7=u.config,d.q7=new A.HlsDownloadService(u),d}return p(u,c),u.prototype.resolveMasterManifest=function(c){var u=this;return this.r7&&this.D8&&this.J8?Promise.resolve({masterManifest:this.D8,firstVariantPlaylist:this.J8.playlist,resolvedMasterUrl:this.E8}):this.q7.downloadPlaylist(c,y.HttpRequestType.MANIFEST_HLS_MASTER).then(function(c){u.E8=c.url;var d,p,h,f=u.K8(c,c.url);if(!u.r7)throw Error("Manifest parsing failed");u.D8=f;var m=w.ModuleManager.get(P.ModuleName.HLS).NativeHlsManifestParserUtils.isVideoVariant,g=null!=(p=null==(d=u.r7.playlists.find(function(c){return m(c,u.r7)}))?void 0:d.uri)?p:null==(h=u.r7.playlists[0])?void 0:h.uri;return u.F8=g,u.Q8(g,!0).then(function(u){return{masterManifest:f,firstVariantPlaylist:u,resolvedMasterUrl:c.url}})})},u.prototype.getParsedManifest=function(){return this.r7},u.prototype.getManifest=function(){return this.C8},u.prototype.getVariantUrl=function(){return this.F8},u.prototype.getLastPlaylistData=function(){return this.J8},u.prototype.setOnPlaylistUpdated=function(c){this.I8=c,this.M8()},u.prototype.restore=function(){c.prototype.restore.call(this),this.M8()},u.prototype.dispose=function(){(0,E.clearTimeoutIfDefined)(this.H8),this.H8=void 0,this.q7.dispose(),this.r7=null,this.C8=null,this.D8=null,this.E8=null,this.F8=void 0,this.G8=[],this.I8=void 0,this.J8=void 0,this.p7=null,c.prototype.dispose.call(this)},u.prototype.K8=function(c,u){var d,p,h=w.ModuleManager.get(P.ModuleName.HLS).NativeHlsManifestParserUtils;this.C8=null!=(d=c.body)?d:null;var f=(0,I.replaceManifestUrls)(u,null!=(p=c.body)?p:"",this.o7.QUERY_PARAMETERS);if(this.r7=h.parsePlaylist(f),h.isValidMasterPlaylist(this.r7))return f;if(h.isValidVariantPlaylist(this.r7)){var m=`#EXTM3U
17#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=100000
18$VARIANT$
19`.replace("$VARIANT$",u);f=(0,I.replaceManifestUrls)(u,m,this.o7.QUERY_PARAMETERS),this.C8=m,this.r7=h.parsePlaylist(f)}else this.r7=null;return f},u.prototype.L8=function(c){var u,d=this,p=w.ModuleManager.get(P.ModuleName.HLS).NativeHlsManifestParserUtils.parseAndPrepareVariantPlaylist(this.r7,c,this.G8,this.p7),h=p.playlist,f=p.variant,m=p.segments,g=p.discontinuitySequences;this.G8=g;var y=null==(u=m[0])?void 0:u.dateTime;return y&&(h.programDateTime=T.Util.timeInSeconds(y)),(0,v.extractDateRangeMetadata)(h.dateRange,h.endList?h.programDateTime:void 0,function(c){return d.N8(c)}),this.J8={playlist:h,variant:f,segments:m},this.M8(),h},u.prototype.M8=function(){this.J8&&this.I8&&!this.isSuspended()&&this.I8(this.J8)},u.prototype.N8=function(c){var u,d={metadataType:g.MetadataType.DATERANGE,metadata:c.data,data:c.data,start:c.startTime,end:c.endTime};null==(u=this.n7.serviceManager.get(m.ServiceName.MetadataParsedService))||u.addMetadata(S.DEFAULT_PERIOD_ID,d)},u.prototype.O8=function(c,u){var d=this;(0,E.clearTimeoutIfDefined)(this.H8),this.H8=setTimeout(function(){return d.P8(u)},(0,_.toMilliSeconds)(c.targetDuration))},u.prototype.P8=function(c){var u=this;this.Q8(c,!1).catch(function(c){u.n7.logger.debug("Error while reloading the playlist ",c)})}
vendor: 14,271 bytes, line 19
19,u.prototype.Q8=function(c,u){var d=this;return this.q7.downloadPlaylist(c,y.HttpRequestType.MANIFEST_HLS_VARIANT,u).then(function(u){var p=d.L8(u);return f.isLive(p)&&d.O8(p,c),p})},u}(b.Suspendable)},925:function(c,u,d){var p,h,f,m,g,v=this&&this.__assign||function(){return(v=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},y=this&&this.__runInitializers||function(c,u,d){for(var p=arguments.length>2,h=0;h<u.length;h++)d=p?u[h].call(c,d):u[h].call(c);return p?d:void 0},b=this&&this.__esDecorate||function(c,u,d,p,h,f){function m(c){if(void 0!==c&&"function"!=typeof c)throw TypeError("Function expected");return c}for(var g,v=p.kind,y="getter"===v?"get":"setter"===v?"set":"value",b=!u&&c?p.static?c:c.prototype:null,S=u||(b?Object.getOwnPropertyDescriptor(b,p.name):{}),_=!1,E=d.length-1;E>=0;E--){var T={};for(var w in p)T[w]="access"===w?{}:p[w];for(var w in p.access)T.access[w]=p.access[w];T.addInitializer=function(c){if(_)throw TypeError("Cannot add initializers after decoration has completed");f.push(m(c||null))};var P=(0,d[E])("accessor"===v?{get:S.get,set:S.set}:S[y],T);if("accessor"===v){if(void 0===P)continue;if(null===P||"object"!=typeof P)throw TypeError("Object expected");(g=m(P.get))&&(S.get=g),(g=m(P.set))&&(S.set=g),(g=m(P.init))&&h.unshift(g)}else(g=m(P))&&("field"===v?h.unshift(g):S[y]=g)}b&&Object.defineProperty(b,p.name,S),_=!0};Object.defineProperty(u,"__esModule",{value:!0}),u.NativePlayer=void 0;var S,_=d(4524),E=d(40306),T=d(3336),w=d(25926),P=d(4224),A=d(48143),I=d(80813),M=d(56481),R=d(3714),k=d(90408),x=d(75375),C=d(4129),O=d(69957),D=d(44468),L=d(23690),N=d(87827),U=d(21513),F=d(93204),B=d(74853),j=d(34841),H=d(85434),V=d(15487),z=d(89927),q=d(88844),W=d(23068),G=d(58313),K=d(70850),Y=d(41138),X=d(19274),Q=d(88052),Z=d(62756),J=d(29669),$=d(32418),ee=d(99373),et=d(30712),ei=d(81152),en=d(81929),er=d(56678);(p=S||(S={})).None="none",p.Metadata="metadata",p.Auto="auto";var eo="not available";function ea(c,u){return(c<u.start||c>u.end)&&(c=Math.min(c=Math.max(c,u.start),u.end)),c}function es(c){return c.length>0&&1/0!==c.end(c.length-1)}m=[],h=function(){function c(c){var u=this;this.Yj=y(this,m),this.ej=0,this.jj=!1,this.kj=null,this.lj=!1,this.mj=!1,this.nj=!0,this.oj=-1,this.pj=!1,this.qj=!1,this.rj=!1,this.sj=0,this.vj=-1,this.yj=-1,this.zj=null,this.Aj="api",this.Bj="api",this.Cj="api",this.Ej=0,this.Gj=-1,this.Hj=0,this.Ij=!1,this.bk=0,this.ck=[],this.fk=!0,this.gk=!1,this.hk=!1,this.jk=[],this.kk=!1,this.lk=!1,this.nk={},this.rk=!1,this.vk=!1,this.wk=!1,this.xk=function(c){if(u.Vl()){var d=c.track;u.Hk(R.PlayerEvent.AudioAdded,{track:u.Wl(d)}),d.enabled&&u.jj&&u.tl(null,d)}},this.yk=function(c){u.Vl()&&u.Hk(R.PlayerEvent.AudioRemoved,{track:u.Wl(c.track)})},this.zk=function(){var c,d,p=u.aj.getViewModeFromPresentationMode();p===D.ViewMode.PictureInPicture||p===D.ViewMode.Fullscreen&&(0,U.getCapabilities)().isIOS?null==(c=u.zj)||c.enableNative():null==(d=u.zj)||d.disableNative(),u.Yj.store.dispatch((0,L.setPlayerViewMode)(p))},this.Ak=function(){(0,k.maybeFireDurationChangedEvent)(u.ak,u.getDuration(),u.cj),u.ak=u.getDuration(),u.hk&&u.Fk()},this.Bk=function(){u.Fj.stallExit(),u.Ij&&u.kj&&u.Mk(),u.lj=!1,u.Fj.transitionToPlayState(!0,u.Aj)},this.Ck=function(){u.Fj.isStalled?(u.Fj.stallExit(),u.Fj.transitionToPlayingState(u.Aj)):u.Fj.isStopped()?u.Pk():u.Fj.isPlaying()||(u.Fj.transitionToPlayState(!0,u.Aj),u.Fj.transitionToPlayingState(u.Aj))},this.Gk=function(){var c;(0,q.clearTimeoutIfDefined)(u.Yk),null==(c=u.Zk)||c.dispose(),u.gk||(0,q.clearTimeoutIfDefined)(u.Xk),u.gk=!0,u.rk=!1,u.fk=!0,u.hk=!0,u.Fk()},this.Hk=function(c,d,p,h){void 0===d&&(d={}),void 0===p&&(p=!1),void 0===h&&(h=!1),u.cj&&(u.fk||p)&&u.cj.dispatchEvent(c,d,h)},this.Ik=function(c){var d=u.Lk(),p=d.currentTime;(-1!==u.Gj||p!==u.Gj)&&!u.qj&&(u.Kk(p)?(Promise.resolve(u.aj.play()).catch(function(c){u.Zj.insane("Play promise rejected:",c)}),u.rj=!0,d.currentTime=u.Hj):u.Jk(d,p),u.pj=!1,u.dk&&(u.dk.width=u.aj.videoWidth,u.dk.height=u.aj.videoHeight))},this.Pk=function(){u.isPlaying()||(u.lj=!1,u.vl(),u.Fj.transitionToPlayingState(u.Aj))},this.Qk=function(){u.lj=!0},this.getCurrentTime=function(c){void 0===c&&(c=D.TimeMode.AbsoluteTime);var d=u.getStartDate();return c===D.TimeMode.AbsoluteTime&&d?K.Util.timeInSeconds(d)+u.Lk().currentTime:u.Lk().currentTime},this.getAudioQuality=this.getPlaybackAudioData,this.getVideoQuality=this.getPlaybackVideoData,this.fl=function(){var c,d=u.Lk(),p=Math.abs(d.currentTime-u.Hj),h=u.dj.GLOBAL_DISABLE_SEEKING,f=null!=(c=u.tj)?c:d.duration;h&&(p>.75||d.currentTime<f-.75)?(Promise.resolve(u.aj.play()).catch(function(c){u.Zj.insane("Play promise rejected:"+c)}),u.rj=!0,u.aj.currentTime=u.Hj):(u.Hj=0,u.Fj.isPlaying()&&u.Fj.transitionToPausedState(!0,u.Bj),u.Fj.transitionToStoppedState())},this.um=function(){u.qm(),u.sj=0,!u.dj.GLOBAL_DISABLE_SEEKING||u.kk||u.mk?(u.Gj=u.Lk().currentTime,u.mk=!1,u.Fj.isSeeking()&&(u.zj&&u.zj.seek(),u.tm())):u.qj=!1,u.vm()},this.wm=function(){if(u.dj.GLOBAL_DISABLE_SEEKING&&!u.mk)u.qj=!u.kk,u.sj++,u.sj>1&&(u.rj=!1);else if(!u.Fj.isTimeShifting()){var c=u.Lk().currentTime;u.Fj.isSeeking()?(0,U.getCapabilities)().isIOS&&u.wk&&(u.Fj.transitionToSeekingIOSState(c,x.INTERNAL_ISSUER_NAME,!0,u.Hj),u.Gj=c):u.Fj.transitionToSeekingIOSState(c,x.INTERNAL_ISSUER_NAME)}},this.Am=function(){void 0===u.uj&&(u.uj=u.Lk().currentTime)},this.Bm=function(){u.ej++,u.ej<u.dj.IOS_MIN_TIMEUPDATES_AFTER_AD||(u.cj.off(R.PlayerEvent.TimeChanged,u.Bm),u.kk=!0,u.Vk({time:u.fj,issuer:"api",force:!0}))},this.Yj=c,this.wj=!1,this.Zj=c.logger,this.aj=c.videoElement,this.bj=c.config,this.cj=c.eventHandler,this.dj=c.settings,this.pk=[],this.Wk=null,this.ij=this.aj.volume,this.sk=this.aj.getAttribute("crossOrigin"),this.xj=-1/0,(0,$.isAirplaySupported)()&&(this.Jj=new $.AppleAirplayService(this.aj,this.cj)),this.tk=new ei.HlsLiveNativeTimeTracker(this,c),this.qk=[{event:X.MediaElementEvent.pause,handler:function(){u.qm(),u.lj||u.Fj.transitionToPausedState(!0,u.Bj,!0)}},{event:X.MediaElementEvent.ended,handler:function(){u.fl()}},{event:X.MediaElementEvent.play,handler:this.Bk},{event:X.MediaElementEvent.canplay,handler:function(){u.Fj.stallExit()}},{event:X.MediaElementEvent.seeking,handler:function(){u.pj=!0,u.wm(),u.getCurrentTime()>=u.getDuration()&&(u.um(),u.fl())}},{event:X.MediaElementEvent.seeked,handler:function(){u.um(),u.Ij&&u.kj&&u.Mk()}},{event:X.MediaElementEvent.durationchange,handler:this.Ak},{event:X.MediaElementEvent.loadeddata,handler:this.Gk},{event:X.MediaElementEvent.loadedmetadata,handler:function(){u.Yk=window.setTimeout(u.Gk,200)}},{event:X.MediaElementEvent.playing,handler:this.Ck},{event:X.MediaElementEvent.waiting,handler:function(){u.qm(),u.Fj.stallEnter()}},{event:X.MediaElementEvent.timeupdate,handler:this.Ik},{event:X.MediaElementEvent.error,handler:function(c){var d;u.gk||1!==u.ck.length||u.type!==D.StreamType.Progressive?(u.ik.reject(),u.mj?(u.Zj.debug("Ignoring video element error",c.errorObject),u.mj=!1):(u.Zj.debug("video element has thrown an error",c.errorObject),(0,q.clearTimeoutIfDefined)(u.Xk),null==(d=u.cj)||d.fireError((0,k.createPlayerErrorFromMediaError)(c,u.Yj.sourceContext.sourceIdentifier,!0)))):u.Jl(E.ErrorCode.SOURCE_PROGRESSIVE_STREAM_ERROR,u.aj.getWrappedElement().src,c)}},{event:X.MediaElementEvent.webkitpresentationmodechanged,handler:this.zk},{elementSelector:function(c){return c.audioTracks},event:"addtrack",handler:this.xk},{elementSelector:function(c){return c.audioTracks},event:"removetrack",handler:this.yk}]}return c.prototype.Dk=function(){var c,u;return!((0,V.isWebOS)()||(0,V.isTizen2023)()||(0,V.isTizen2024)()||(0,V.isEdgeAndroid)()||null!=(u=null==(c=this.bj)?void 0:c.tweaks)&&u.prevent_video_element_preloading||this.getDuration())},c.prototype.Ek=function(){if(!this.al()||null!=(u=null==(c=this.bj)?void 0:c.tweaks)&&u.prevent_video_element_preloading||(0,V.isWebOS)()||this.vk)return!1;var c,u,d=this.aj.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA;return!es(this.Lk().seekable)&&!d},c.prototype.Fk=function(){this.Dk()||this.Ek()?this.Zj.debug("Cannot resolve deferred loading yet, waiting for required data to be loaded ",{duration:String(this.getDuration()),seekableRangeAvailable:es(this.Lk().seekable),videoElementReadyState:this.Lk().readyState}):this.ik.resolve()},c.prototype.Jk=function(c,u){(this.rj=!1,this.tj=c.duration,u>this.tj+2)?(this.Yj.logger.debug("CurrentTime ".concat(u," exceeds video duration (").concat(this.tj,"), reverting current time")),c.currentTime=this.tj-.1):(this.Fj.isSeeking()?this.Zj.debug("Detected timeupdate during seeking. Time: ".concat(u)):this.Hj=u,this.Fj.stallExit(),this.Fj.isSeeking()||this.Fj.isTimeShifting()||!this.isPlaying()||(null!=this.getStartDate()?this.Hk(R.PlayerEvent.TimeChanged,{time:this.getCurrentTime(),relativeTime:u}):this.Hk(R.PlayerEvent.TimeChanged,{time:this.getCurrentTime()})))},c.prototype.Kk=function(c){if(!this.dj.GLOBAL_DISABLE_SEEKING||!this.pj)return!1;var u=-1!==this.Gj&&c>this.Gj+.75,d=Math.abs(c-this.Hj);return(!this.rj||u)&&d>.75},c.prototype.Lk=function(){return this.Ij&&this.kj?this.kj:this.aj},c.prototype.Mk=function(){var c=Date.now();(0,z.toSeconds)(c-this.bk)>=1/30&&(this.aj.currentTime=this.kj.currentTime,this.bk=c),this.isPlaying()&&window.requestAnimationFrame(this.Mk)},c.prototype.Nk=function(){if(this.isLive()&&!this.Uk()){var c=this.Dm();c.end>=0&&this.Sk(c.end,x.STARTUP_ISSUER_NAME)}},c.prototype.Ok=function(){void 0!==this.uk&&(this.rl(),this.seek(this.uk,"api-play"))},c.prototype.play=function(c){return this.nj?(this.Aj=c,this.Ok(),this.Nk(),this.Lk().play()):Promise.reject("Play control not permitted")},c.prototype.getStartDate=function(){if(!this.isLive())return null;var c=this.Lk().getWrappedElement(),u="function"==typeof c.getStartDate?c.getStartDate():null;return u&&!isNaN(u.getTime())?u:null},c.prototype.preload=function(){this.Lk().preload=this.xl()},c.prototype.pause=function(c){this.Bj=c;var u=this.Lk();this.nj&&this.jj&&(this.Fj.transitionToPausedState(!1,this.Bj),u.pause())},c.prototype.mute=function(c){this.Lk().muted||(this.Lk().muted=!0,this.Hk(R.PlayerEvent.Muted,{issuer:c||"api"}))},c.prototype.unmute=function(c){this.Lk().muted&&(this.Lk().muted=!1,this.Hk(R.PlayerEvent.Unmuted,{issuer:c||"api"}))},c.prototype.Rk=function(c){var u=this.getStartDate();return u?c-(0,z.toSeconds)(u.getTime()):c},c.prototype.seek=function(c,u){var d=this;return!(!this.Tk(c)||this.getCurrentTime()===c)&&(this.tk.adjustTargetTime(c,u).then(function(c){d.Cj=u,d.ml(c,u);var p=d.Rk(c);return d.Vk({time:p,issuer:u})}),this.hk&&this.getDuration()>0)},c.prototype.Sk=function(c,u){this.vj=this.getCurrentTime(),this.Cj=u,this.nl(c,u),this.gl({time:c,issuer:u})},c.prototype.Tk=function(c){this.mk=this.lk&&this.ll(c);var u=!this.dj.GLOBAL_DISABLE_SEEKING&&this.kl();return(this.mk||u)&&this.nj},c.prototype.Uk=function(){var c=!(this.bj.playback&&this.bj.playback.hasOwnProperty("timeShift"))||!!this.bj.playback.timeShift;return this.isLive()&&c},c.prototype.Vk=function(c){return!this.hl(c)&&(this.Fj.transitionToSeekingState(c.time,c.issuer,!1),this.il(c),!0)},c.prototype.gl=function(c){this.hl(c,!0)||(this.Fj.transitionToTimeShiftingState(this.getCurrentTime(),c.time,c.issuer,!1),c.time<0&&(c.time=this.Dm().end+c.time,this.qm()),this.il(c))},c.prototype.hl=function(c,u){return void 0===u&&(u=!1),this.Fj.isSeeking()&&"api-play"!==c.issuer?(this.Zj.debug("Seeking already in progress, delaying seek for time",c.time),this.sl(c,u,[X.MediaElementEvent.seeked]),!0):this.hk?0===this.getDuration()?(this.Zj.debug("Delaying the seek until stream duration is known"),this.sl(c,u,[X.MediaElementEvent.durationchange]),!0):this.aj.seekable.length<1&&(this.Zj.debug("Delaying the seek as the seekable range is not yet known"),this.sl(c,u,[X.MediaElementEvent.timeupdate,X.MediaElementEvent.canplay]),!0):(this.Zj.debug("Delaying the seek until data is loaded"),this.sl(c,u,[X.MediaElementEvent.loadeddata]),!0)},c.prototype.il=function(c){var u=c.issuer===x.ADVERTISING_ISSUER_NAME,d=this.Dm();this.Zj.debug("Seek to ".concat(c.time,", seekable range:"),d);var p=this.jl(c.time,d,u);this.lk=!1,this.rj=this.rj||this.mk||c.force;var h=parseFloat(p.toFixed(2));this.yj=h,this.Zj.debug("Setting time on video element from ".concat(this.Lk().currentTime," to ").concat(h)),this.Lk().currentTime=h},c.prototype.jl=function(c,u,d){void 0===d&&(d=!1);var p=ea(c,u);return d?c>=u.end&&(p=u.end-.1):p=Math.min(p,u.end-this.dj.SEEK_TO_END_OFFSET),p!==c&&this.Zj.debug("Adjusted seek target from ".concat(c," to ").concat(p)),p},c.prototype.kl=function(){var c=this.bj&&this.bj.hasOwnProperty("playback")?this.bj.playback:{};return!c.hasOwnProperty("seeking")||c.seeking},c.prototype.ll=function(c){var u=this.Yj.sourceContext.source?this.Yj.sourceContext.source:{};return u.hasOwnProperty("options")&&u.options.hasOwnProperty("startTime")&&c===u.options.startTime},c.prototype.ml=function(c,u){u!==x.STARTUP_ISSUER_NAME&&this.Hk(R.PlayerEvent.Seek,{position:this.getCurrentTime(),seekTarget:c,issuer:u||"api"})},c.prototype.nl=function(c,u){u!==x.STARTUP_ISSUER_NAME&&this.Hk(R.PlayerEvent.TimeShift,{target:c<0?this.vj+c:c,position:this.vj,issuer:u||"api"})},c.prototype.ol=function(c){var u=this;return new Promise(function(d){var p=function(){c.removeEventListener(X.MediaElementEvent.seeked,p),d()};u.pk.push({el:c,ev:X.MediaElementEvent.seeked,fn:p}),c.addEventListener(X.MediaElementEvent.seeked,p)})},c.prototype.pl=function(c,u){var d=this;return new Promise(function(p,h){var f=0,m=function(){var g=c.buffered,v=g.length>0?g.end(g.length-1):-1/0;(f+=+!!isFinite(v))>d.dj.SAFARI_NUM_PROGRESS_EVENTS_AFTER_SEEK_GLITCH&&v<u?(c.removeEventListener(X.MediaElementEvent.progress,m),h(null)):v>=u&&(c.removeEventListener(X.MediaElementEvent.progress,m),p())};d.pk.push({el:c,ev:X.MediaElementEvent.progress,fn:m}),c.addEventListener(X.MediaElementEvent.progress,m)})},c.prototype.ql=function(c,u){var d=this;return this.type!==D.StreamType.Hls?Promise.resolve():this.ol(c).then(function(){return d.pl(c,u)}).catch(function(){throw d.Zj.debug("seek to target time (".concat(u,") failed - trying to re
19cover by seeking to ").concat(u+1)),null})},c.prototype.rl=function(){var c=this;Object.keys(this.nk).forEach(function(u){c.Lk().removeEventListener(u,c.nk[u])}),this.nk={}},c.prototype.sl=function(c,u,d){var p=this,h=this.Lk();this.rl(),this.uk=c.time;var f=function(d){p.rl();var m={time:(0,W.isNumber)(d)?d:c.time,issuer:c.issuer,force:c.force};p.ql(h,c.time).catch(function(){return f(c.time+1)}),p.uk=void 0,u?p.gl(m):p.Vk(m)};d.forEach(function(c){h.addEventListener(c,f),p.nk[c]=f})},c.prototype.setAudio=function(c){var u=B.ArrayHelper.toArray(this.aj.audioTracks).find(function(u){return u.id===c});u&&this.ul(u)},c.prototype.tl=function(c,u){this.Hk(R.PlayerEvent.AudioChanged,{targetAudio:{id:u.id,label:u.label,lang:u.language},sourceAudio:c,time:this.aj.currentTime})},c.prototype.ul=function(c){if(!c.enabled){var u=B.ArrayHelper.toArray(this.aj.audioTracks).find(function(c){return c.enabled}),d=null;u&&(u.enabled=!1,d=this.Wl(u)),c.enabled=!0,this.tl(d,c)}},c.prototype.setVolume=function(c,u){var d=this.Lk(),p=this.ij,h=Math.min(c/100,1);p!==h&&(this.ij=h,d.volume=h,this.Hk(R.PlayerEvent.VolumeChanged,{targetVolume:100*h,sourceVolume:100*p,issuer:u||"api"}))},c.prototype.vl=function(){var c=this;(0,q.clearTimeoutIfDefined)(this.Xk),this.gk||(this.Xk=window.setTimeout(function(){c.Xk=void 0,!c.gk&&c.cj&&(c.type===D.StreamType.Hls?c.cj.fireError(new T.PlayerError(E.ErrorCode.NETWORK_MANIFEST_DOWNLOAD_TIMEOUT,{sourceUrl:c.ek.url},"Failed to load the HLS playlist: the request timed out.",c.Yj.sourceContext.sourceIdentifier)):c.type===D.StreamType.Progressive&&c.cj.fireError(new T.PlayerError(E.ErrorCode.NETWORK_PROGRESSIVE_STREAM_DOWNLOAD_TIMEOUT,{sourceUrl:c.ek.url},"Failed to load the progressive source: the request timed out.",c.Yj.sourceContext.sourceIdentifier)))},(0,z.toMilliSeconds)(this.dj.XHR_TIMEOUT/2)))},c.getContentDomain=function(c){var u=document.createElement("a");return u.href=c,""===u.host&&(u.href=u.href),u.hostname},c.prototype.wl=function(c){var u;(0,V.isTizen)()&&(null==(u=this.Zk)||u.dispose(),this.Zk=new ee.AssetAvailabilityChecker(this.Yj,c,this.aj))},c.prototype.prepareLoad=function(){return Promise.resolve()},c.prototype.prepareSource=function(c,u){return Promise.resolve()},c.prototype.xl=function(){var c,u,d,p;return null!=(u=null==(c=this.bj)?void 0:c.tweaks)&&u.prevent_video_element_preloading?S.None:(null==(p=null==(d=this.bj)?void 0:d.adaptation)?void 0:p.preload)===!1?S.Metadata:S.Auto},c.prototype.load=function(c,u,d){var p,f=this,m=null!=(p=null==u?void 0:u.seeking)&&p;this.Fj=this.Yj.serviceManager.get(I.ServiceName.PlayerStateService),this.Fj.transitionToSeekedState(!1);var g=this.xl();g!==S.Auto&&this.aj.setAttribute("preload",g),this.type=this.Yj.sourceContext.technology.streaming,this.ek=c,c.type&&(this.type=c.type),!0===this.jj&&this.unload().catch(function(){}),this.gk=!1,this.hk=!1,this.Lk().nativeMediaEventListener.reset(),this.lk=!0,this.mj=!1,this.Ej=0,this.uk=void 0,this.vk=!1,c.hasOwnProperty("vr")&&c.vr&&c.vr.restrictedInlinePlayback?(this.Ij=!0,this.kj=K.Util.getVRAudioElement(),this.xm(this.kj)):(this.kj=null,this.Ij=!1,this.xm(this.aj)),this.cj.on(R.PlayerEvent.TimeChanged,this.Am),this.ok=(0,F.subscribe)(this.Yj.store)(function(c){return(0,N.getIsStopped)((0,N.getPlayerState)(c))},this.Qk,function(c){return!0===c}),this.dj.GLOBAL_DISABLE_SEEKING=m||!1,this.oj>-1&&((0,q.clearTimeoutIfDefined)(this.oj),this.oj=-1);var v="";c&&c.url&&("string"==typeof c.url?v=c.url:c.url.length>0&&(v=c.url[0].url));var y=window.location.hostname===h.getContentDomain(v);c.hasOwnProperty("vr")&&c.vr&&!y&&(this.sk=this.aj.getAttribute("crossOrigin"),this.aj.setAttribute("crossOrigin","anonymous")),this.aj.eventHandler.reset(),this.rk||(this.zj=this.zm()),this.ik=new j.Deferred;var b=this.zl(c,d);return this.ik.promise.then(function(){f.Yj.sourceContext.source=c.config}).then(function(){return b}).then(function(){return f.Al(c)})},c.prototype.yl=function(c){var u=this;(0,V.isSafari17orIOS17)()&&fetch(c.url,{method:J.HttpRequestMethod.GET,headers:{Range:"bytes=0-0"}}).then(function(c){c.redirected&&(u.Zj.debug("Detected source redirection."),u.hk&&u.ik.resolve(),u.vk=!0)}).catch(function(){})},c.prototype.zl=function(c,u){var d=this;return this.type===D.StreamType.Hls?(this.yl(c),this.Gl(c)):this.type===D.StreamType.Progressive?this.Hl(c,u).then(function(){return d.Bl()}):Promise.resolve()},c.prototype.Al=function(c){this.Dj=c,this.jj=!0,this.Hj=0,this.rj=!1},c.prototype.Bl=function(){var c,u;
vendor: 21,624 bytes, line 19
19null!=(u=null==(c=this.bj)?void 0:c.tweaks)&&u.prevent_video_element_preloading?this.Fk():this.aj.load()},c.prototype.Cl=function(c,u){var d=this;if(c.config.drm&&c.config.drm.fairplay){var p=Q.ModuleManager.get(Z.ModuleName.DRM).FairplayHandler;this.Kj=new p(this.Yj,this.aj,c.config.drm.fairplay)}var f=h.createSourceElement(u,null);this.Ml(f,"0",c),this.wl(f);var m={element:f,handler:function(c){return d.Jl(E.ErrorCode.SOURCE_HLS_STREAM_ERROR,f.src,c)}};this.jk.push(m),m.element.addEventListener(X.MediaElementEvent.error,m.handler)},c.prototype.Dl=function(c,u){this.Cl(c,u),this.Bl()},c.prototype.El=function(c,u){var d=this,p=G.URLHelper.appendQueryParametersToUrl(u,{"bitmovin-player-id":this.Yj.internalPlayerID});return this.Dl(c,p),this.Lj.resolveMasterManifest(c.url).then(function(){}).catch(function(c){d.Zj.debug("Couldn't access master playlist with ServiceWorker: ".concat(c))})},c.prototype.Fl=function(c,u){var d=this;return en.createHlsManifestController(this.Yj).then(function(p){return d.Lj=p,d.dj.NATIVE_HLS_DOWNLOAD_ERROR_HANDLING&&(d.Wk=new et.HlsDownloadErrorHandler(d.Yj,p)),en.shouldUseServiceWorker(d.Yj)?d.El(c,u):d.Lj.resolveMasterManifest(c.url).then(function(u){0!==u.indexOf("data")&&0!==u.indexOf("blob")||d.Dl(c,u)}).catch(function(c){d.Zj.debug("Couldn't access master playlist for native HLS parsing: ".concat(c))})})},c.prototype.Gl=function(c){if("string"!=typeof c.url){var u,d=new T.PlayerError(E.ErrorCode.SOURCE_INVALID,{given:c.url},"Cannot load the HLS playlist: the source URL should be a string.",this.Yj.sourceContext.sourceIdentifier);return null==(u=this.cj)||u.fireError(d),this.ik.reject(d),Promise.resolve()}var p=this.adjustToFullUrlWithQueryParams(c.url);return this.dj.NATIVE_HLS_PARSING?this.Fl(c,p):(this.Dl(c,p),Promise.resolve())},c.prototype.Hl=function(c,u){if(this.ck=[],Array.isArray(c.url))this.Il(c.url,u);else{var d={url:c.url,bitrate:0};this.aj.src=this.adjustToFullUrlWithQueryParams(d.url),this.Ol("0",d),this.Pl("0",d),this.wl(this.aj.getWrappedElement())}return Promise.resolve()},c.prototype.Il=function(c,u){var d,p=this;u=u||((d=c.findIndex(function(c){return!0===c.preferred}))>-1?String(d):"0");var h=this.Kl(c,u,!0);if(h){var f={element:h,handler:function(c){return p.Jl(E.ErrorCode.SOURCE_PROGRESSIVE_STREAM_ERROR,h.src,c)}};this.jk.push(f),f.element.addEventListener(X.MediaElementEvent.error,f.handler),this.Ij&&this.kj&&this.kj.load(),this.wl(h)}},c.prototype.Jl=function(c,u,d){var p,h=this;(0,q.clearTimeoutIfDefined)(this.Xk),null==(p=this.Zk)||p.dispose(),this.jj=!0,this.Zj.debug("Caught a stream error event (".concat(c,", ").concat(u,")"),d),new C.DefaultContentLoader(this.Yj).load(u).then(function(c){return{status:c.status,statusText:c.statusText,error:void 0}}).catch(function(c){return{error:c,status:(null==c?void 0:c.status)||0,statusText:(null==c?void 0:c.statusText)||""}}).then(function(p){var f,m=p.error,g=p.status,v=p.statusText,y=(null==d?void 0:d.message)||d,b=function(c,u){h.ik.reject(new T.PlayerError(c,u,"The video element has thrown an error while loading the stream.",h.Yj.sourceContext.sourceIdentifier))};200!==g?(f={event:d,error:m,status:g,statusText:v,src:u,extraMessage:y},h.Zj.debug("last/only source has thrown an error ".concat(g," - ").concat(v),f),b(c,f)):(f={event:d,error:m,src:u,extraMessage:y},h.Zj.debug("last/only source has thrown an error, but we are able to download the asset during the error handling.",f),h.ek&&h.Ej<h.dj.MAX_RETRIES?(h.Ej++,h.Zj.debug("Reloading the source: attempt ".concat(h.Ej," of ").concat(h.dj.MAX_RETRIES,".")),h.zl(h.ek).catch(function(){return b(c,f)})):b(c,f))})},c.prototype.Kl=function(c,u,d){for(var p,f=[],m=-1,g=null,v=null,y=0;y<c.length;y++){var b=c[y];if(!this.Ll(b,v,d)){if(p=h.createSourceElement(this.adjustToFullUrlWithQueryParams(b.url),b.type),v=v||b.type,this.Ol(String(y),b),d){if(f.indexOf(b.type)>-1){this.Zj.debug("Stream of mime type ".concat(b.type," already added.. continuing"));continue}u===String(y)?(g=p,m=b.bitrate,this.Ml(p,String(y),b),f.push(b.type)):m===b.bitrate&&(g=p,this.Nl(p),f.push(b.type))}else g=p,this.Ml(p,String(y),b);this.Ij&&this.kj&&(this.kj.innerHTML=this.aj.innerHTML)}}return g},c.prototype.Ll=function(c,u,d){return!h.isValidProgressiveSourceObject(c)||!!d&&(!this.Ql(c.type)||!!u&&u!==c.type)},c.isValidProgressiveSourceObject=function(c){return"object"==typeof c&&c&&c.url&&""!==c.url},c.prototype.Ml=function(c,u,d){this.aj.appendChild(c),this.Pl(u,d)},c.prototype.Nl=function(c){this.aj.appendChild(c)},c.prototype.Ol=function(c,u){var d={id:c};u.bitrate&&(d.bitrate=u.bitrate),d.label=String(u.label||u.bitrate||"unknown"),this.ck.push(d)},c.prototype.Pl=function(c,u){this.dk={id:c},u.bitrate&&(this.dk.bitrate=u.bitrate),this.dk.label=""+(u.label||u.bitrate||"unknown")},c.prototype.Ql=function(c){return!(this.aj.canPlayType(c).length<=0&&(this.Zj.debug("Mime type"+c+" not supported.. continuing"),1))},c.createSourceElement=function(c,u){var d=document.createElement("source");return d.src=c,u&&(0>u.indexOf("/")&&(u="video/"+u),d.type=u),d},c.prototype.unload=function(c,u){var d,p;return void 0===c&&(c="api"),void 0===u&&(u=!1),this.tk.onUnload(c),this.rl(),this.ik&&!u&&this.ik.reject(),(0,q.clearTimeoutIfDefined)(this.Yk),(0,q.clearTimeoutIfDefined)(this.Xk),null==(d=this.Zk)||d.dispose(),this.lj=!1,this.Kj=(0,M.dispose)(this.Kj),this.Wk=(0,M.dispose)(this.Wk),this.Lj=(0,M.dispose)(this.Lj),this.Rl(c),this.pk.forEach(function(c){return c.el.removeEventListener(c.ev,c.fn)}),this.pk=[],this.rk||(null==(p=this.zj)||p.signalSourceChange(),this.zj=(0,M.dispose)(this.zj)),this.Ul(),this.Sl(),this.pause(),this.mj=!0,this.Tl(),this.ok&&this.ok(),this.fk&&(this.dk=null),this.jj&&(this.jj=!1,u||(this.Hk(R.PlayerEvent.SourceUnloaded,{oldSource:this.Dj}),this.ak=null)),Promise.resolve()},c.prototype.Rl=function(c){var u,d,p,h=null==(u=this.Yj.sourceContext)?void 0:u.sourceIdentifier;if(h){var f=this.Yj.serviceManager,m=!(null!=(d=this.Yj.sourceContext)&&d.isAd);c===x.ADVERTISING_ISSUER_NAME&&m?null==(p=f.get(I.ServiceName.NativeManifestService,h))||p.suspend():(0,A.disposeService)(f,I.ServiceName.NativeManifestService,h)}},c.prototype.Sl=function(){if(this.Ij&&this.kj){for(this.kj.removeAttribute("src");this.kj.firstChild;)this.kj.removeChild(this.kj.firstChild);this.kj.load()}},c.prototype.Tl=function(){var c=this;this.Ij?this.kj&&this.ym(this.kj):this.ym(this.aj),this.rl(),this.cj.off(R.PlayerEvent.TimeChanged,this.Am),this.cj.off(R.PlayerEvent.TimeChanged,this.Bm),this.jk.forEach(function(u){try{u.element.removeEventListener(X.MediaElementEvent.error,u.handler)}catch(u){c.Zj.debug("Error while removing event listener",u)}})},c.prototype.Ul=function(){Y.VideoElementUtil.removeSource(this.aj),null!=this.sk?this.aj.setAttribute("crossOrigin",this.sk):this.aj.removeAttribute("crossOrigin"),this.aj.load()},c.prototype.Vl=function(){return this.Ij&&this.kj&&"readyState"in this.kj?this.kj.readyState!==HTMLMediaElement.HAVE_NOTHING:!("readyState"in this.aj)||this.aj.readyState!==HTMLMediaElement.HAVE_NOTHING},c.prototype.isLive=function(){return 1/0===this.Lk().duration},c.prototype.isPlaying=function(){return this.Fj.isPlaying()},c.prototype.isPaused=function(){return this.Fj.isPaused()},c.prototype.hasEnded=function(){return this.lj},c.prototype.isMuted=function(){return this.Lk().muted},c.prototype.isStalled=function(){return this.Fj.isStalled},c.prototype.getVolume=function(){return 100*this.Lk().volume},c.prototype.getDuration=function(){return this.Lk().duration},c.prototype.Wl=function(c){var u={id:c.id||String(B.ArrayHelper.toArray(this.aj.audioTracks).indexOf(c)),label:c.label,lang:c.language,getQualities:null},d=this.Xl(u);return d&&"string"==typeof d&&(u.label=d),u},c.prototype.getAudio=function(){var c=B.ArrayHelper.toArray(this.aj.audioTracks).find(function(c){return c.enabled});return c?this.Wl(c):null},c.prototype.getAvailableAudio=function(){var c=this;return B.ArrayHelper.toArray(this.aj.audioTracks).map(function(u){return c.Wl(u)})},c.prototype.Xl=function(c){var u={id:c.id,lang:c.lang,mimeType:H.MimeType.AudioMp4};return this.Yl()(u)},c.prototype.Yl=function(){var c=this.Yj.sourceContext,u=c&&c.source&&c.source.labeling;return u&&u[this.type]&&u[this.type].tracks?"function"!=typeof u[this.type].tracks?h.getDefaultLabelForAudio:u[this.type].tracks:h.getDefaultLabelForAudio},c.getDefaultLabelForAudio=function(){return null},c.prototype.getDownloadedVideoData=function(){return this.type===D.StreamType.Progressive?this.dk:this.Lj?this.Lj.getDownloadedVideoData():{id:eo,bitrate:0,height:0,width:0,isAuto:!0}},c.prototype.getDownloadedAudioData=function(){return{id:eo,bitrate:0,isAuto:this.type===D.StreamType.Progressive}},c.prototype.Zl=function(c){var u={};return u.id=c.id,u.label=c.label,c.width>1?u.width=c.width:this.dk&&this.dk.id===c.id&&(this.dk.width>1?u.width=this.dk.width:!isNaN(this.aj.videoWidth)&&this.aj.videoWidth>1&&(u.width=this.aj.videoWidth)),c.height>1?u.height=c.height:this.dk&&this.dk.id===c.id&&(this.dk.height>1?u.height=this.dk.height:!isNaN(this.aj.videoHeight)&&this.aj.videoHeight>1&&(u.height=this.aj.videoHeight)),void 0!==c.bitrate&&"unknown"!==c.bitrate&&(u.bitrate=c.bitrate),u},c.prototype.getPlaybackVideoData=function(){if(this.Lj){var c=this.Lj.getPlayingVideoData();if(c)return c}if(this.dk){var u=this.Zl(this.dk);return"progressive"!==this.type&&(u.id=eo),u}return{id:eo,bitrate:0,height:this.aj.videoHeight,width:this.aj.videoWidth}},c.prototype.getPlaybackAudioData=function(){return{id:eo,bitrate:0}},c.prototype.getMaxTimeShift=function(){if(!this.Uk())return 0;var c=this.Dm();return this.al()&&c.start>=0?c.start-c.end:0},c.prototype.al=function(){return this.type===D.StreamType.Hls&&this.isLive()},c.prototype.timeShift=function(c,u){if(this.Uk()&&this.bl(c,u))if(0===c){var d=this.Dm();d.end>=0&&this.Sk(d.end)}else this.Sk(c,u)},c.prototype.bl=function(c,u){if(u===x.STARTUP_ISSUER_NAME&&(null==(d=this.Yj.sourceContext.source.options)?void 0:d.startTime)==null&&(null==d?void 0:d.startOffset)==null)return!1;var d,p=Math.abs(Math.abs(c)-Math.abs(this.getTimeShift())),h=this.rm(c);return p>.25&&!(this.wj&&h)},c.prototype.getTimeShift=function(){if(this.cl())return 0;var c=this.Dm();if(c.start>=0&&this.el()){var u=ea(this.Lk().currentTime-c.end,this.Cm());this.wj=this.rm(u)&&!this.dl(),this.xj=this.wj?0:u}return isFinite(this.xj)?this.xj:0},c.prototype.cl=function(){return!this.isLive()||!this.Fj.hasBeenPlaying&&!this.Fj.seekedOrTimeshifted||this.wj},c.prototype.dl=function(){return this.isStalled()||this.isPaused()},c.prototype.el=function(){return!isFinite(this.xj)||this.dl()},c.prototype.getManifest=function(){return this.Lj?this.Lj.getManifest():null},c.prototype.getSnapshot=function(c,u){if(this.isPlaying()||this.isPaused()){var d=this.aj.videoWidth,p=this.aj.videoHeight;if(this.gj||(this.gj=document.createElement("canvas"),this.gj.id="snapshotHiddenCanvas"),this.gj&&this.gj.getContext&&this.gj.getContext("2d")){this.gj.height=p,this.gj.width=d,this.hj=this.gj.getContext("2d"),this.hj.drawImage(this.aj.getWrappedElement(),0,0,d,p);var h=void 0;try{("image/jpeg"===c||"image/webp"===c)&&(Number(u)===u?(u<0||u>1)&&(u=1):u=1),h=this.gj.toDataURL(c,u)}catch(c){return void(c&&c.message?this.Zj.debug("Snapshot acquisition failed: "+c.message):this.Zj.debug("Snapshot acquisition failed"))}return{height:p,width:d,data:h}}}},c.prototype.setPlaybackSpeed=function(c){this.Lk().playbackRate=c},c.prototype.getPlaybackSpeed=function(){return this.Lk().playbackRate},c.prototype.permitControl=function(c){this.nj=c},c.prototype.qm=function(){this.xj=-1/0,this.Uk()&&(this.wj=!1)},c.prototype.rm=function(c){return Math.abs(c)<2*this.dj.SEEK_TO_END_OFFSET},c.prototype.sm=function(){return this.yj!==this.Gj&&this.Cj===x.STARTUP_ISSUER_NAME},c.prototype.tm=function(){this.sm()&&(this.Yj.logger.debug("Seek target changed during startup..."),this.ml(this.yj),this.Cj="api",this.yj=-1)},c.prototype.vm=function(){this.Fj.isSeeking()&&(this.Fj.transitionToSeekedState(this.Cj!==x.STARTUP_ISSUER_NAME),this.Cj="api"),this.Fj.isTimeShifting()&&this.Fj.transitionToTimeShiftedState(this.Cj!==x.STARTUP_ISSUER_NAME)},c.prototype.xm=function(c){for(var u=0;u<this.qk.length;u++){var d=this.qk[u].elementSelector?this.qk[u].elementSelector(c):c;d&&d.addEventListener(this.qk[u].event,this.qk[u].handler)}},c.prototype.ym=function(c){for(var u=0;u<this.qk.length;u++){var d=this.qk[u].elementSelector?this.qk[u].elementSelector(c):c;d&&d.removeEventListener&&d.removeEventListener(this.qk[u].event,this.qk[u].handler)}},c.prototype.getBufferLevel=function(c){var u={level:null,targetLevel:null,type:c,media:D.MediaType.Video},d=this.Lk();if(!d.buffered||d.buffered.length<1)return u;var p=function(p){for(var h=0;h<d.buffered.length;h++){var f=d.buffered.start(h),m=d.buffered.end(h);f>p||m<=p||(u.level=m-p,c===D.BufferType.BackwardDuration&&(u.level=p-f))}},h=d.currentTime;if(p(h),null==u.level){var f=function(c,u){for(var d=c.buffered.start(0),p=Math.abs(d-u),h=1;h<c.buffered.length;h++){var f=Math.abs(c.buffered.start(h)-u);f<p&&(p=f,d=c.buffered.start(h))}return{distanceToCurrentTime:p,closestBufferStart:d}}(d,h),m=f.distanceToCurrentTime,g=f.closestBufferStart;m<1&&(this.Yj.logger.debug("Adjusting buffer level to closest buffer range ",g),p(g))}return u},c.prototype.zm=function(){if(Q.ModuleManager.has(Z.ModuleName.SubtitlesNative))return new(Q.ModuleManager.get(Z.ModuleName.SubtitlesNative)).TextTrackController(this.Yj,this.aj,this.bj,this.type);this.Zj.log("Unable to create native SubtitleController because the ".concat(Z.ModuleName.SubtitlesNative," module is missing"))},c.prototype.removeSubtitle=function(c){c&&this.zj&&this.zj.removeSubtitle(c)},c.prototype.addSubtitle=function(c){return this.zj?(this.removeSubtitle(c.id),c.kind="subtitles",this.zj.addSubtitle(c)):Promise.reject()},c.prototype.listSubtitles=function(){return this.zj?this.zj.getAvailableSubtitles():[]},c.prototype.enableSubtitle=function(c){return this.zj?this.zj.enableSubtitle(c):Promise.resolve(!1)},c.prototype.disableSubtitle=function(c){return this.zj?Promise.resolve(this.zj.disableSubtitle(c)):Promise.resolve(!1)},c.prototype.adjustToFullUrlWithQueryParams=function(c){var u=G.URLHelper.toFullUrl(c);return G.URLHelper.appendQueryParametersToUrl(u,this.dj.QUERY_PARAMETERS)},c.prototype.onFullscreenEnter=function(){this.wk=this.aj.webkitDisplayingFullscreen,this.zj&&this.wk&&this.zj.enableNative()},c.prototype.onFullscreenExit=function(){this.zj&&this.wk&&this.zj.disableNative(),this.wk=!1},c.prototype.getAvailableVideoQualities=function(){var c=this;return"progressive"!==this.type?[]:this.ck.map(function(u){return c.Zl(u)})},c.prototype.getBufferedRanges=function(){var c=this;return(0,_.getBufferedRanges)(this.Lk()).map(function(u){return(0,_.convertRangeToTimeMode)(u,c.getStartDate(),D.TimeMode.AbsoluteTime)})},c.prototype.setVideoQuality=function(c){var u,d=this,p=this.getPlaybackSpeed(),h=this.ck.find(function(u){return u.id===c});if("progressive"===this.type&&h&&(!this.dk||this.dk.id!==c)){this.rk=!0,this.fj=this.getCurrentTime(),this.ck=[],this.fk=!1;var f=this.Fj.isPlaying()||this.Fj.isPlay();this.Fj.stallEnter(),this.unload("api",!0).catch(function(){});var m=this.Zl(h),g={sourceQuality:this.dk,sourceQualityId:this.dk?this.dk.id:null,targetQuality:m,targetQualityId:m.id};this.cj.one(R.PlayerEvent.StallEnded,function(){d.fk=!0,(0,U.getCapabilities)().isIOS||(0,U.getCapabilities)().isSafari?(d.ej=0,d.cj.on(R.PlayerEvent.TimeChanged,d.Bm)):(d.ej=1/0,d.Bm()),f&&(d.play(x.INTERNAL_ISSUER_NAME).catch(function(){d.Hk(R.PlayerEvent.Warning,new w.PlayerWarning(P.WarningCode.PLAYBACK_COULD_NOT_BE_STARTED))}),d.Fj.transitionToPlayingState(x.INTERNAL_ISSUER_NAME,!1))}),this.Hk(R.PlayerEvent.VideoQualityChanged,v({},g),!0),null==(u=this.Jj)||u.initAirplay(),this.load(this.ek,{seeking:this.dj.GLOBAL_DISABLE_SEEKING},c).then(function(){d.setPlaybackSpeed(p),d.Hk(R.PlayerEvent.VideoDownloadQualityChange,v({},g),!0),d.Hk(R.PlayerEvent.VideoDownloadQualityChanged,v({},g),!0),d.Hk(R.PlayerEvent.VideoPlaybackQualityChanged,{sourceQuality:g.sourceQuality,targetQuality:g.targetQuality},!0)})}},c.prototype.isAirplayAvailable=function(){var c,u;return null!=(u=null==(c=this.Jj)?void 0:c.isAirplayAvailable())&&u},c.prototype.isAirplayActive=function(){var c,u;return null!=(u=null==(c=this.Jj)?void 0:c.isAirplayActive())&&u},c.prototype.showAirplayTargetPicker=function(){var c;null==(c=this.Jj)||c.showAirplayTargetPicker()},c.prototype.Cm=function(){return this.isLive()?{start:this.getMaxTimeShift(),end:0}:{start:-1,end:-1}},c.prototype.Dm=function(){var c=this.aj.seekable;if(c.length>0){var u={start:c.start(0),end:c.end(0)};return u.start=Math.max(0,u.start),u}return{start:-1,end:-1}},c.prototype.getSeekableRange=function(){if(!this.isLive()||this.dj.ENABLE_SEEK_FOR_LIVE){var c=this.getStartDate(),u=this.Dm();return c?(0,_.convertRangeToTimeMode)(u,c,D.TimeMode.AbsoluteTime):u}return{start:-1,end:-1}},c.prototype.createManifestApi=function(){return this.Lj?er.NativePlayerManifestApiFactory.create(this.Lj):null},c.prototype.release=function(){var c,u=this,d=this.unload("api").catch(function(){});return(0,q.clearTimeoutIfDefined)(this.Xk),d=d.then(function(){u.type=null,u.bj=null,u.cj=null,u.dj=null,u.fj=null,u.gj=null,u.hj=null,u.kj=null,u.aj=null,u.Aj=null,u.Bj=null,u.Cj=null,u.Dj=null,u.ek=null,u.dk=null,u.ck=null,u.jk=null,u.uk=void 0}),null==(c=this.Jj)||c.dispose(),this.zj&&this.zj.dispose(),this.zj=null,this.Kj&&this.Kj.dispose(),this.Kj=null,this.Wk&&this.Wk.dispose(),this.Wk=null,this.Lj&&this.Lj.dispose(),this.Lj=null,d},c.prototype.setQueryParameters=function(c){this.dj.QUERY_PARAMETERS=c},c.prototype.clearQueryParameters=function(){this.dj.QUERY_PARAMETERS=void 0},c.prototype.setAudioQuality=function(c){},c.prototype.setTargetBufferLevel=function(){},c.prototype.getAvailableAudioQualities=function(){return[]},c.prototype.getDroppedVideoFrames=function(){return 0},c.prototype.getTotalStalledTime=function(){return 0},c.prototype.updateCallback=function(c){},c.prototype.getAvailableSegments=function(){return{}},c.prototype.getLatency=function(){var c=this.aj.getWrappedElement();if(!c.getStartDate)return 1/0;var u=c.getStartDate().getTime();if(isNaN(u))return 1/0;var d=(new Date).getTime();return(0,z.toSeconds)(d-u)-this.aj.currentTime},c.prototype.setTargetLatency=function(c){},c.prototype.getTargetLatency=function(){},c.prototype.setCatchupConfig=function(c){},c.prototype.getCatchupConfig=function(){},c.prototype.setFallbackConfig=function(c){},c.prototype.getFallbackConfig=function(){},c}(),g="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,f=[(0,O.trackPerformance)("NativePlayer.load",!0)],b(h,null,f,{kind:"method",name:"load",static:!1,private:!1,access:{has:function(c){return"load"in c},get:function(c){return c.load}},metadata:g},null,m),g&&Object.defineProperty(h,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:g}),u.NativePlayer=h},56678:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.NativePlayerManifestApiFactory=void 0;var p=d(34047);u.NativePlayerManifestApiFactory=function(){function c(){}return c.create=function(u){var d=u.getParsedManifest();return u.isValidMasterPlaylist(d)?new function(){this.hls=c.createHlsApi(u)}:null},c.createHlsApi=function(u){var d=u.getParsedManifest(),p=d.media.filter(function(c){return"AUDIO"===c.attributes.TYPE}),h=d.media.filter(function(c){return"SUBTITLES"===c.attributes.TYPE||"CLOSED-CAPTIONS"===c.attributes.TYPE});return new(function(){function f(){this.properties=u.getParsedManifest().tags}return f.prototype.getVideoTracks=function(){return c.getVideoTracks(d.playlists)},f.prototype.getAudioTracks=function(){return c.getAudioTracks(p,d.playlists)},f.prototype.getTextTracks=function(){return c.getTextTracks(h)},f}())},c.getAudioTracks=function(c,u){var d=c.reduce(function(c,u){return c[u.attributes.LANGUAGE]||(c[u.attributes.LANGUAGE]=u.attributes.NAME),c},{}),h=Object.keys(d).map(function(u,p){return{id:"audio-".concat(p),label:d[u],lang:u,getQualities:function(){return c.filter(function(c){return c.attributes.LANGUAGE===u}).map(function(c,u){return{id:u+"",bitrate:0,label:c.attributes.NAME}})}}}),f=function(c){return c.attributes.CODECS&&p.CodecStringHelper.getMimeTypeForCodecString(c.attributes.CODECS).includes("audio")};return u.some(f)&&h.push({id:"audio-".concat(h.length),label:"und",lang:"",getQualities:function(){return u.filter(f).map(function(c,u){return{id:u+"",bitrate:c.attributes.BANDWIDTH,codec:p.CodecStringHelper.getExtractedCodecStrings(c.attributes.CODECS).audio}})}}),h},c.getVideoTracks=function(u){var d=u.filter(function(c){return!c.attributes.CODECS||p.CodecStringHelper.getMimeTypeForCodecString(c.attributes.CODECS).includes("video")});return[{id:"video-0",label:"und",getQualities:function(){return c.getVideoQualities(d)}}]},c.getTextTracks=function(c){return c.map(function(c,u){return{id:"text-".concat(u),label:c.attributes.NAME,lang:c.attributes.LANGUAGE,isFragmented:!0,kind:"CLOSED-CAPTIONS"===c.attributes.TYPE?"caption":"subtitle",url:c.attributes.URI}})},c.getVideoQualities=function(c){return c.map(function(c){var u=c.attributes.RESOLUTION&&c.attributes.RESOLUTION.width,d=c.attributes.RESOLUTION&&c.attributes.RESOLUTION.height,h={id:d?"".concat(d,"_").concat(c.attributes.BANDWIDTH):"".concat(c.attributes.BANDWIDTH),bitrate:c.attributes.BANDWIDTH,width:u||0,height:d||0};if(c.attributes.CODECS){var f=p.CodecStringHelper.getExtractedCodecStrings(c.attributes.CODECS);f.video&&(h.codec=f.video)}return h})},c}()}
19,49706:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.TechnologyChecker=void 0;var p=d(44468);u.TechnologyChecker=function(){function c(){}return c.prototype.getSupportedTechnologies=function(){return[{player:p.PlayerType.Native,streaming:p.StreamType.Progressive},{player:p.PlayerType.Native,streaming:p.StreamType.Hls},{player:p.PlayerType.Native,streaming:p.StreamType.Dash}]},c}()}},function(c){return c(c.s=27530)}])}(bitmovinplayerEngineNative);var bitmovinplayerEngineNativeExports=bitmovinplayerEngineNative.exports;let EngineNative=getDefaultExportFromCjs$1(bitmovinplayerEngineNativeExports);var bitmovinplayerHls={exports:{}};!function(c){var u;self,c.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[458],{62903:function(c,u,d){c.exports=function(){return d(90040)('!function(){"use strict";var e={1829:function(e,t,n){function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function r(e,t,n){return(t=function(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}n.r(t),n.d(t,{__DO_NOT_USE__ActionTypes:function(){return d},applyMiddleware:function(){return h},bindActionCreators:function(){return g},combineReducers:function(){return p},compose:function(){return v},createStore:function(){return c},legacy_createStore:function(){return f}});var u=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}(),l=function(){return Math.random().toString(36).substring(7).split("").join(".")},d={INIT:"@@redux/INIT"+l(),REPLACE:"@@redux/REPLACE"+l(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+l()}};function c(e,t,n){var i;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(s(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(s(1));return n(c)(e,t)}if("function"!=typeof e)throw new Error(s(2));var r=e,o=t,a=[],l=a,f=!1;function p(){l===a&&(l=a.slice())}function S(){if(f)throw new Error(s(3));return o}function g(e){if("function"!=typeof e)throw new Error(s(4));if(f)throw new Error(s(5));var t=!0;return p(),l.push(e),function(){if(t){if(f)throw new Error(s(6));t=!1,p();var n=l.indexOf(e);l.splice(n,1),a=null}}}function v(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(s(7));if(void 0===e.type)throw new Error(s(8));if(f)throw new Error(s(9));try{f=!0,o=r(o,e)}finally{f=!1}for(var t=a=l,n=0;n<t.length;n++)(0,t[n])();return e}return v({type:d.INIT}),(i={dispatch:v,subscribe:g,getState:S,replaceReducer:function(e){if("function"!=typeof e)throw new Error(s(10));r=e,v({type:d.REPLACE})}})[u]=function(){var e,t=g;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(s(11));function n(){e.next&&e.next(S())}return n(),{unsubscribe:t(n)}}})[u]=function(){return this},e},i}var f=c;function p(e){for(var t=Object.keys(e),n={},i=0;i<t.length;i++){var r=t[i];"function"==typeof e[r]&&(n[r]=e[r])}var o,a=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:d.INIT}))throw new Error(s(12));if(void 0===n(void 0,{type:d.PROBE_UNKNOWN_ACTION()}))throw new Error(s(13))}))}(n)}catch(e){o=e}return function(e,t){if(void 0===e&&(e={}),o)throw o;for(var i=!1,r={},u=0;u<a.length;u++){var l=a[u],d=n[l],c=e[l],f=d(c,t);if(void 0===f)throw t&&t.type,new Error(s(14));r[l]=f,i=i||f!==c}return(i=i||a.length!==Object.keys(e).length)?r:e}}function S(e,t){return function(){return t(e.apply(this,arguments))}}function g(e,t){if("function"==typeof e)return S(e,t);if("object"!=typeof e||null===e)throw new Error(s(16));var n={};for(var i in e){var r=e[i];"function"==typeof r&&(n[i]=S(r,t))}return n}function v(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function h(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),i=function(){throw new Error(s(15))},r={getState:n.getState,dispatch:function(){return i.apply(void 0,arguments)}},o=t.map((function(e){return e(r)}));return i=v.apply(void 0,o)(n.dispatch),a(a({},n),{},{dispatch:i})}}}}
19,4499:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayIncludesPolyfill=void 0,t.ArrayIncludesPolyfill=function(){return{polyfill:function(){Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError(\'"this" is null or not defined\');var n=Object(this),i=n.length>>>0;if(0===i)return!1;var r=0|t,o=Math.max(r>=0?r:i-Math.abs(r),0);function a(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}for(;o<i;){if(a(n[o],e))return!0;o++}return!1}})}}}()},3878:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.StringEndsWithPolyfill=void 0,t.StringEndsWithPolyfill=function(){return{polyfill:function(){String.prototype.endsWith=function(e,t){if(null==e)return!1;var n=this.length;return null!=t&&(n=Math.min(t,this.length)),this.substring(n-e.length,n)===e}}}}()},4205:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.StringIncludesPolyfill=void 0,t.StringIncludesPolyfill=function(){return{polyfill:function(){String.prototype.includes=function(e,t){return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)}}}}()},829:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.StringStartsWithPolyfill=void 0,t.StringStartsWithPolyfill=function(){return{polyfill:function(){String.prototype.startsWith=function(e,t){var n=t>0?0|t:0;return this.substring(n,n+e.length)===e}}}}()},8052:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ModuleManager=void 0;var i=n(306),r=n(3336),o=n(5880),a=function(){function e(){}return e.initialize=function(){this.modules||(this.modules={})},e.add=function(e){if(this.initialize(),!e)throw new r.PlayerError(i.ErrorCode.MODULE_INVALID_DEFINITION,void 0,"Cannot add the module: no module definition was provided to the API.");if(!e.name)throw new r.PlayerError(i.ErrorCode.MODULE_INVALID_DEFINITION,void 0,"Cannot add the module: no `name` property was provided to the module definition.");if(!e.module)throw new r.PlayerError(i.ErrorCode.MODULE_INVALID_DEFINITION,void 0,"Cannot add the module: no `module` property was provided to the module definition.");if(e.dependencies){for(var t=0,n=e.dependencies;t<n.length;t++){var a=n[t];if(!this.has(a))throw new o.PlayerModuleMissingError(e.name,a)}if("function"!=typeof e.module)throw new r.PlayerError(i.ErrorCode.MODULE_INVALID_DEFINITION_DEPENDENCY,{name:e.name},"Cannot add the module: modules with dependencies must pass a deferred loading function to the `ModuleDefinition.module` property.")}var s=e.module;"function"==typeof s&&(s=s()),this.modules[e.name]={moduleDefinition:e,module:s},e.hooks&&e.hooks.add&&e.hooks.add(e.module)},e.remove=function(e){var t;if(this.modules){if(!this.modules[e])throw new o.PlayerModuleMissingError(e);var n=this.modules[e].moduleDefinition;(null===(t=n.hooks)||void 0===t?void 0:t.remove)&&n.hooks.remove(n.module),delete this.modules[e]}},e.get=function(e,t){void 0===t&&(t=!0),this.initialize();var n=this.modules[e];if(n&&n.module)return n.module;if(t)throw new o.PlayerModuleMissingError(e)},e.has=function(e){return void 0!==this.get(e,!1)},e.getModuleNames=function(){return Object.getOwnPropertyNames(this.modules)},e.getModuleDefinitions=function(){var e=this;return this.getModuleNames().map((function(t){return e.modules[t]}))},e.callSetupHooks=function(e){this.getModuleDefinitions().filter((function(e){return e.moduleDefinition.hooks&&e.moduleDefinition.hooks.setup})).forEach((function(t){return t.moduleDefinition.hooks.setup(t.module,e)}))},e.callDestroyHooks=function(e){var t=this.getModuleDefinitions().filter((function(e){return e.moduleDefinition.hooks&&e.moduleDefinition.hooks.destroy})).map((function(t){return t.moduleDefinition.hooks.destroy(t.module,e)}));return Promise.all(t).then((function(){}))},e}();t.ModuleManager=a},2756:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ModuleName=void 0,function(e){e.VR="VR",e.XML="XML",e.Smooth="Smooth",e.AdvertisingCore="AdvertisingCore",e.Advert
vendor: 15,565 bytes, line 19
19ising="Advertising",e.AdvertisingIma="Advertising",e.AdvertisingBitmovin="Advertising",e.AdvertisingOmSdk="AdvertisingOmSdk",e.SGAI="SGAI",e.Polyfill="Polyfill",e.Patch="Patch",e.RemoteControl="RemoteControl",e.RendererMse="RendererMSE",e.EngineNative="EngineNative",e.EngineBitmovin="EngineBitmovin",e.ABR="ABR",e.Crypto="Crypto",e.HLS="HLS",e.DRM="DRM",e.DASH="DASH",e.ContainerTS="ContainerTS",e.ContainerMP4="ContainerMP4",e.ContainerWebM="ContainerWebM",e.Subtitles="Subtitles",e.SubtitlesTTML="SubtitlesTTML",e.SubtitlesWebVTT="SubtitlesWebVTT",e.SubtitlesCEA608="SubtitlesCEA608",e.SubtitlesNative="SubtitlesNative",e.Style="Style",e.Thumbnail="Thumbnail",e.ThumbnailImp="Thumbnail",e.UI="UI",e.Tizen="Tizen",e.Webos="webos",e.Vidaa="vidaa",e.Wpe="wpe",e.LowLatency="LowLatency",e.ServiceWorkerClient="ServiceWorkerClient",e.Envivio="Envivio",e.PlayStation5="PlayStation5",e.PlayStation4="PlayStation4",e.EngineWebRtc="EngineWebRtc",e.ReactNative="ReactNative"}(n||(t.ModuleName=n={}))},5880:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerModuleMissingError=void 0;var r=n(306),o=function(e){function t(t,n){return n?e.call(this,r.ErrorCode.MODULE_DEPENDENCY_MISSING,{name:t,dependency:n},"The ".concat(t," module requires the ").concat(n," module to be included as well."))||this:e.call(this,r.ErrorCode.MODULE_MISSING,{name:t},"The ".concat(t," module is required to play this stream."))||this}return i(t,e),t}(n(3336).PlayerError);t.PlayerModuleMissingError=o},6790:function(e,t){var n,i,r,o,a,s;Object.defineProperty(t,"__esModule",{value:!0}),t.DrmSetupError=t.TransmuxingRejectionReason=t.SegmentVerificationResult=t.APPLE_KEYFORMAT_DELIVERY=t.HlsEncryptionMethods=t.HlsEncryptionMethod=t.SOURCE_BUFFER_APPEND_STATUS=t.RepresentationType=void 0,function(e){e[e.AUDIO=1]="AUDIO",e[e.VIDEO=2]="VIDEO",e[e.SUBTITLE=3]="SUBTITLE"}(n||(t.RepresentationType=n={})),function(e){e[e.FAILURE=0]="FAILURE",e[e.QUOTA_EXCEEDED=1]="QUOTA_EXCEEDED",e[e.SUSPENDED=2]="SUSPENDED"}(i||(t.SOURCE_BUFFER_APPEND_STATUS=i={})),function(e){e.NONE="NONE",e.AES_128="AES-128",e.SAMPLE_AES="SAMPLE-AES",e.SAMPLE_AES_CTR="SAMPLE-AES-CTR"}(r||(t.HlsEncryptionMethod=r={})),t.HlsEncryptionMethods=Object.keys(r).map((function(e){return r[e]})),t.APPLE_KEYFORMAT_DELIVERY="com.apple.streamingkeydelivery",function(e){e.Publish="publish",e.Drop="drop",e.Park="park"}(o||(t.SegmentVerificationResult=o={})),function(e){e.INVALID_TS_SEGMENT="Invalid TS segment, could not extract segment information",e.TRANSMUXING_ABORTED="Transmuxing was aborted as it is no longer needed"}(a||(t.TransmuxingRejectionReason=a={})),function(e){e.CANCELLED="Loading was cancelled for the DRM source",e.MISSING_CONFIGURATION="DRM is not configured"}(s||(t.DrmSetupError=s={}))},3714:function(e,t){var n,i,r,o,a,s;Object.defineProperty(t,"__esModule",{value:!0}),t.ContentLocationChangedReason=t.LatencyMode=t.AdInteractionType=t.AdQuartile=t.MetadataType=t.PlayerEvent=void 0,function(e){e.Ready="ready",e.Play="play",e.Playing="playing",e.Paused="paused",e.Seek="seek",e.Seeked="seeked",e.TimeShift="timeshift",e.TimeShifted="timeshifted",e.VolumeChanged="volumechanged",e.Muted="muted",e.Unmuted="unmuted",e.PlayerResized="playerresized",e.PlaybackFinished="playbackfinished",e.Error="error",e.Warning="warning",e.StallStarted="stallstarted",e.StallEnded="stallended",e.AudioChanged="audiochanged",e.AudioAdded="audioadded",e.AudioRemoved="audioremoved",e.VideoQualityChanged="videoqualitychanged",e.AudioQualityChanged="audioqualitychanged",e.VideoDownloadQualityChange="videodownloadqualitychange",e.AudioDownloadQualityChange="audiodownloadqualitychange",e.VideoDownloadQualityChanged="videodownloadqualitychanged",e.AudioDownloadQualityChanged="audiodownloadqualitychanged",e.VideoPlaybackQualityChanged="videoplaybackqualitychanged",e.AudioPlaybackQualityChanged="audioplaybackqualitychanged",e.TimeChanged="timechanged",e.CueParsed="cueparsed",e.CueEnter="cueenter",e.CueUpdate="cueupdate",e.CueExit="cueexit",e.SegmentPlayback="segmentplayback",e.Metadata="metadata",e.MetadataParsed="metadataparsed",e.MetadataChanged="metadatachanged",e.VideoAdaptation="videoadaptation",e.AudioAdaptation="audioadaptation",e.DownloadFinished="downloadfinished",e.SegmentRequestFinished="segmentrequestfinished",e.AdManifestLoaded="admanifestloaded",e.AdStarted="adstarted",e.OverlayAdStarted="overlayadstarted",e.AdQuartile="adquartile",e.AdSkipped="adskipped",e.AdClicked="adclicked",e.AdInteraction="adinteraction",e.AdLinearityChanged="adlinearitychanged",e.AdBreakStarted="adbreakstarted",e.AdBreakFinished="adbreakfinished",e.RestoringContent="restoringcontent",e.AdFinished="adfinished",e.AdError="aderror",e.VRViewingDirectionChange="vrviewingdirectionchange",e.VRViewingDirectionChanged="vrviewingdirectionchanged",e.VRStereoChanged="vrstereochanged",e.CastAvailable="castavailable",e.CastStopped="caststopped",e.CastStart="caststart",e.CastStarted="caststarted",e.CastWaitingForDevice="castwaitingfordevice",e.SourceLoaded="sourceloaded",e.SourceUnloaded="sourceunloaded",e.PeriodSwitch="periodswitch",e.PeriodSwitched="periodswitched",e.DVRWindowExceeded="dvrwindowexceeded",e.SubtitleAdded="subtitleadded",e.SubtitleRemoved="subtitleremoved",e.ShowAirplayTargetPicker="showairplaytargetpicker",e.AirplayAvailable="airplayavailable",e.AirplayChanged="airplaychanged",e.Destroy="destroy",e.PlaybackSpeedChanged="playbackspeedchanged",e.DurationChanged="durationchanged",e.ViewModeChanged="viewmodechanged",e.ModuleReady="moduleready",e.SubtitleEnable="subtitleenable",e.SubtitleEnabled="subtitleenabled",e.SubtitleDisable="subtitledisable",e.SubtitleDisabled="subtitledisabled",e.VideoQualityAdded="videoqualityadded",e.VideoQualityRemoved="videoqualityremoved",e.AudioQualityAdded="audioqualityadded",e.AudioQualityRemoved="audioqualityremoved",e.TargetLatencyChanged="targetlatencychanged",e.LatencyModeChanged="latencymodechanged",e.LicenseValidated="licensevalidated",e.DrmLicenseAdded="drmlicenseadded",e.AspectRatioChanged="aspectratiochanged",e.VisibilityChanged="visibilitychanged",e.ContentLocationChanged="contentlocationchanged"}(n||(t.PlayerEvent=n={})),function(e){e.CUETAG="CUETAG",e.DATERANGE="DATERANGE",e.EVENT_STREAM="EVENT-STREAM",e.CUSTOM="CUSTOM",e.SCTE="SCTE",e.ID3="ID3",e.EMSG="EMSG",e.CAST="CAST"}(i||(t.MetadataType=i={})),function(e){e.FIRST_QUARTILE="firstQuartile",e.MIDPOINT="midpoint",e.THIRD_QUARTILE="thirdQuartile"}(r||(t.AdQuartile=r={})),function(e){e.Vpaid="vpaid"}(o||(t.AdInteractionType=o={})),function(e){e.Idle="idle",e.Catchup="catchup",e.Fallback="fallback",e.Suspended="suspended"}(a||(t.LatencyMode=a={})),function(e){e.Failover="failover",e.ContentSteering="contentsteering"}(s||(t.ContentLocationChangedReason=s={}))},4468:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.TimeMode=t.SupportedTechnologyMode=t.ViewMode=t.PlayerAPINotAvailableError=t.LogLevel=t.BufferType=t.MediaType=t.StreamType=t.PlayerType=void 0;var r=n(306),o=n(3336),a=n(2886);Object.defineProperty(t,"PlayerType",{enumerable:!0,get:function(){return a.PlayerType}});var s,u,l,d=n(5623);Object.defineProperty(t,"StreamType",{enumerable:!0,get:function(){return d.StreamType}}),function(e){e.Audio="audio",e.Video="video",e.Subtitles="subtitles",e.Thumbnails="thumbnails"}(s||(t.MediaType=s={})),function(e){e.ForwardDuration="forwardduration",e.BackwardDuration="backwardduration"}(u||(t.BufferType=u={})),function(e){e.DEBUG="debug",e.LOG="log",e.WARN="warn",e.ERROR="error",e.OFF="off"}(l||(t.LogLevel=l={}));var c,f,p,S=function(e){function t(t){return e.call(this,r.ErrorCode.API_NOT_AVAILABLE,void 0,"Cannot use the `player.".concat(t,"` API: the player has already been destroyed."))||this}return i(t,e),t}(o.PlayerError);t.PlayerAPINotAvailableError=S,function(e){e.Inline="inline",e.Fullscreen="fullscreen",e.PictureInPicture="pictureinpicture"}(c||(t.ViewMode=c={})),function(e){e.Platform="platform",e.Modules="modules",e.PlatformAndModules="platformandmodules"}(f||(t.SupportedTechnologyMode=f={})),function(e){e.RelativeTime="relativetime",e.AbsoluteTime="absolutetime"}(p||(t.TimeMode=p={}))},2886:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerType=void 0,function(e){e.Html5="html5",e.Native="native",e.WebRtc="webrtc",e.Unknown="unknown"}(n||(t.PlayerType=n={}))},5623:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.StreamType=void 0,function(e){e.Progressive="progressive",e.Dash="dash",e.Hls="hls",e.Smooth="smooth",e.Whep="whep",e.Unknown="unknown"}(n||(t.StreamType=n={}))},649:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.kebabCaseToCamelCase=function(e){return e.split("-").map((function(e,t){return 0===t?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()})).join("")},t.forceReallocation=function(e){return e?(0,i.isFirefox)()?JSON.parse(JSON.stringify(e)):(" "+e).slice(1):""};var i=n(5487)},4685:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){return null!==e&&"object"==typeof e},t.isContextAvailable=function(e){return void 0!==e&&!e.isDisposed}},306:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorCode=void 0,function(e){e[e.UNKNOWN=1e3]="UNKNOWN",e[e.API_NOT_AVAILABLE=1001]="API_NOT_AVAILABLE",e[e.SETUP_ERROR=1100]="SETUP_ERROR",e[e.SETUP_NO_HTML_ELEMENT=1101]="SETUP_NO_HTML_ELEMENT",e[e.SETUP_MISSING_CONFIGURATION=1102]="SETUP_MISSING_CONFIGURATION",e[e.SETUP_LICENSE_ERROR=1103]="SETUP_LICENSE_ERROR",e[e.SETUP_MISSING_DOMAIN_LICENSE_WHITELIST=1104]="SETUP_MISSING_DOMAIN_LICENSE_WHITELIST",e[e.SETUP_MISSING_DOMAIN_LICENSE_ALLOWLIST=1104]="SETUP_MISSING_DOMAIN_LICENSE_ALLOWLIST",e[e.SETUP_MISSING_LICENSE_WHITELIST=1105]="SETUP_MISSING_LICENSE_WHITELIST",e[e.SETUP_MISSING_LICENSE_ALLOWLIST=1105]="SETUP_MISSING_LICENSE_ALLOWLIST",e[e.SETUP_INVALID_LICENSE_SERVER=1106]="SETUP_INVALID_LICENSE_SERVER",e[e.SETUP_INVALID_IMPRESSION_SERVER=1107]="SETUP_INVALID_IMPRESSION_SERVER",e[e.SETUP_NO_RENDERING_ENGINE=1108]="SETUP_NO_RENDERING_ENGINE",e[e.SETUP_UNSUPPORTED_PROTOCOL=1113]="SETUP_UNSUPPORTED_PROTOCOL",e[e.SOURCE_ERROR=1200]="SOURCE_ERROR",e[e.SOURCE_INVALID=1201]="SOURCE_INVALID",e[e.SOURCE_MANIFEST_INVALID=1202]="SOURCE_MANIFEST_INVALID",e[e.SOURCE_NO_SUPPORTED_TECHNOLOGY=1203]="SOURCE_NO_SUPPORTED_TECHNOLOGY",e[e.SOURCE_STREAM_TYPE_NOT_SUPPORTED=1204]="SOURCE_STREAM_TYPE_NOT_SUPPORTED",e[e.SOURCE_FORCED_TECHNOLOGY_NOT_SUPPORTED=1205]="SOURCE_FORCED_TECHNOLOGY_NOT_SUPPORTED",e[e.SOURCE_NO_STREAM_FOUND_FOR_SUPPORTED_TECHNOLOGY=1206]="SOURCE_NO_STREAM_FOUND_FOR_SUPPORTED_TECHNOLOGY",e[e.SOURCE_EMPTY_SEGMENT=1207]="SOURCE_EMPTY_SEGMENT",e[e.SOURCE_COULD_NOT_LOAD_MANIFEST=1208]="SOURCE_COULD_NOT_LOAD_MANIFEST",e[e.SOURCE_PROGRESSIVE_STREAM_ERROR=1209]="SOURCE_PROGRESSIVE_STREAM_ERROR",e[e.SOURCE_HLS_STREAM_ERROR=1210]="SOURCE_HLS_STREAM_ERROR",e[e.SOURCE_ENCRYPTION_METHOD_NOT_SUPPORTED=1211]="SOURCE_ENCRYPTION_METHOD_NOT_SUPPORTED",e[e.SOURCE_INVALID_H264_CODEC=7043]="SOURCE_INVALID_H264_CODEC",e[e.PLAYBACK_ERROR=1300]="PLAYBACK_ERROR",e[e.PLAYBACK_VIDEO_DECODING_ERROR=1301]="PLAYBACK_VIDEO_DECODING_ERROR",e[e.PLAYBACK_HLS_COULD_NOT_LOAD_TRANSMUXER=1304]="PLAYBACK_HLS_COULD_NOT_LOAD_TRANSMUXER",e[e.NETWORK_ERROR=1400]="NETWORK_ERROR",e[e.NETWORK_MANIFEST_DOWNLOAD_TIMEOUT=1401]="NETWORK_MANIFEST_DOWNLOAD_TIMEOUT",e[e.NETWORK_SEGMENT_DOWNLOAD_TIMEOUT=1402]="NETWORK_SEGMENT_DOWNLOAD_TIMEOUT",e[e.NETWORK_PROGRESSIVE_STREAM_DOWNLOAD_TIMEOUT=1403]="NETWORK_PROGRESSIVE_STREAM_DOWNLOAD_TIMEOUT",e[e.NETWORK_FAILED_CERTIFICATE_REQUEST=1404]="NETWORK_FAILED_CERTIFICATE_REQUEST",e[e.DRM_ERROR=2e3]="DRM_ERROR",e[e.DRM_MISSING_CONFIGURATION=2001]="DRM_MISSING_CONFIGURATION",e[e.DRM_NO_LICENSE_SERVER_URL_PROVIDED=2002]="DRM_NO_LICENSE_SERVER_URL_PROVIDED",e[e.DRM_FAILED_LICENSE_REQUEST=2003]="DRM_FAILED_LICENSE_REQUEST",e[e.DRM_KEY_SIZE_NOT_SUPPORTED=2005]="DRM_KEY_SIZE_NOT_SUPPORTED",e[e.DRM_NO_KEY_SYSTEM=2006]="DRM_NO_KEY_SYSTEM",e[e.DRM_KEY_SESSION_INITIALIZATION_FAILED=2007]="DRM_KEY_SESSION_INITIALIZATION_FAILED",e[e.DRM_MEDIA_KEY_INITIALIZATION_FAILED=2008]="DRM_MEDIA_KEY_INITIALIZATION_FAILED",e[e.DRM_KEY_ERROR=2009]="DRM_KEY_ERROR",e[e.DRM_KEY_SYSTEM_NOT_SUPPORTED=2010]="DRM_KEY_SYSTEM_NOT_SUPPORTED",e[e.DRM_CERTIFICATE_ERROR=2011]="DRM_CERTIFICATE_ERROR",e[e.DRM_PLAYREADY_INVALID_HEADER_KEY_VALUE_PAIR=2012]="DRM_PLAYREADY_INVALID_HEADER_KEY_VALUE_PAIR",e[e.DRM_RESTRICTED_OUTPUT=2013]="DRM_RESTRICTED_OUTPUT",e[e.DRM_INIT_DATA_MISSING=2015]="DRM_INIT_DATA_MISSING",e[e.VR_ERROR=2100]="VR_ERROR",e[e.VR_INCOMPATIBLE_PLAYER_TECHNOLOGY=2101]="VR_INCOMPATIBLE_PLAYER_TECHNOLOGY",e[e.MODULE_ERROR=3e3]="MODULE_ERROR",e[e.MODULE_INVALID_DEFINITION=3001]="MODULE_INVALID_DEFINITION",e[e.MODULE_INVALID_DEFINITION_DEPENDENCY=3002]="MODULE_INVALID_DEFINITION_DEPENDENCY",e[e.MODULE_MISSING=3003]="MODULE_MISSING",e[e.MODULE_DEPENDENCY_MISSING=3004]="MODULE_DEPENDENCY_MISSING",e[e.MODULE_REMOVED=3005]="MODULE_REMOVED",e[e.MODULE_ADVERTISING_ERROR=3100]="MODULE_ADVERTISING_ERROR",e[e.SEGMENT_PSSH_DATA_MISSING=4e3]="SEGMENT_PSSH_DATA_MISSING"}(n||(t.ErrorCode=n={}))},3336:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerError=void 0;var i=n(306),r=function(){return function(e,t,n,r){this.code=e,this.name=i.ErrorCode[e],this.sourceIdentifier=r,this.message=null!=n?n:"".concat(this.name),this.data=t,"captureStackTrace"in Error&&"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(this.message).stack}}();t.PlayerError=r},813:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceName=void 0,function(e){e.AdaptationService="AdaptationService",e.DrmDetectorService="DrmDetectorService",e.DrmService="DrmService",e.HeartbeatService="HeartbeatService",e.LiveLatencyService="LiveLatencyService",e.ManifestCachingService="ManifestCachingService",e.ManifestLoadingService="ManifestLoadingService",e.ManifestService="ManifestService",e.ManifestUpdateSchedulingService="ManifestUpdateSchedulingService",e.MetadataParsedService="MetadataParsedService",e.NativeManifestService="NativeManifestService",e.PlayerStateService="PlayerStateService",e.RecoveryService="RecoveryService",e.SegmentService="SegmentService",e.SourceStoreService="SourceStoreService",e.StallTimeTrackerService="StallTimeTrackerService",e.StartOffsetService="StartOffsetService",e.StreamTimeService="StreamTimeService",e.SubtitleService="SubtitleService",e.SynchronizedTimeService="SynchronizedTimeService",e.ThumbnailService="Thumbn
19ailService",e.TimedMetadataService="TimedMetadataService",e.SgaiService="SgaiService"}(n||(t.ServiceName=n={}))},5625:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ManifestMimeType=void 0,function(e){e.Dash="application/dash+xml",e.Hls="application/x-mpegurl",e.Smooth="application/vnd.ms-sstr+xml"}(n||(t.ManifestMimeType=n={}))},5267:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.createAction=function(e,t){return{type:e,meta:{},payload:t}}},8774:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.devToolsExtension=void 0;var i=n(4081);t.devToolsExtension=i.default.__REDUX_DEVTOOLS_EXTENSION__},9541:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ReducerTree=void 0,t.isReducer=o,t.isReducerTree=function(e){return Boolean(e)&&e instanceof r};var i=n(1829),r=function(){function e(){this.wb={}}return e.prototype.has=function(e){return Boolean(this.wb[e])},e.prototype.set=function(e,t){return this.wb[e]=t,this},e.prototype.get=function(e){return this.wb[e]},e.prototype.delete=function(e){delete this.wb[e]},e.prototype.keys=function(){return Object.keys(this.wb)},e.prototype.xb=function(e){var t=this,n={};return this.keys().forEach((function(i){var r=t.get(i),a=e.concat(String(i));n[i]=o(r)?r:r.xb(a)})),0===Object.keys(n).length?function(e){return{}}:(0,i.combineReducers)(n)},e.prototype.buildReducer=function(){return this.xb([])},e}();function o(e){return Boolean(e)&&"function"==typeof e}t.ReducerTree=r},1674:function(e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.addStoreServiceDecoration=void 0,t.addStoreServiceDecoration=function(e){return function(t){return function(){var i=function(){return e.buildReducer()},r=t(i()),o=function(){return r.replaceReducer(i())};return o(),n(n({},r),{addReducer:function(t,n){e.set(t,n),o()},getReducer:function(t){return e.get(t)},removeReducer:function(t){e.delete(t),o()},hasReducer:function(t){return e.has(t)}})}}}},1513:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c,t.getCapabilities=function(){return function(e){return e.capabilities}(c().getState())},t.getReachableDomains=function(){return function(e){return e.reachableDomains}(c().getState())};var i,r=n(1829),o=n(4638),a=(n(8774),n(1683),n(430)),s=n(9541),u=n(1674),l=new s.ReducerTree;l.set("capabilities",o.CapabilityReducer).set("reachableDomains",a.ReachableDomainsReducer);var d=function(){var e=[(0,u.addStoreServiceDecoration)(l)];return(0,r.createStore)((function(){return{}}),r.compose.apply(void 0,e))};function c(){return i||(i=d()),i}},4638:function(e,t,n){var i,r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.CapabilityReducer=void 0;var o=n(3793),a=n(7387);t.CapabilityReducer=(0,o.default)({},((i={})[a.CapabilityActionType.InitCapabilities]=function(e,t){return function(e){return e}(t.payload)},i[a.CapabilityActionType.SetCapability]=function(e,t){return function(e,t){var n,i=t.key,o=t.value;return r(r({},e),((n={})[i]=o,n))}(e,t.payload)},i))},7387:function(e,t){var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.CapabilityKey=t.CapabilityActionType=void 0,function(e){e.InitCapabilities="initcapabilities",e.SetCapability="setcapability"}(n||(t.CapabilityActionType=n={})),function(e){e.isPlayStation5="isPlayStation5",e.isPlayStation4="isPlayStation4",e.isMobile="isMobile",e.isTizen="isTizen",e.isSafari="isSafari",e.isChrome="isChrome",e.isChromium="isChromium",e.isFirefox="isFirefox",e.isFirefoxIOS="isFirefoxIOS",e.isWebOS="isWebOS",e.isVidaa="isVidaa",e.isVizio="isVizio",e.isIOS="isIOS",e.isSafariIOS="isSafariIOS",e.isEdge="isEdge",e.isLegacyEdge="isLegacyEdge",e.isEdgeChromium="isEdgeChromium",e.isReactNative="isReactNative",e.isWpeWebKit="isWpeWebKit",e.MSESafari="MSESafari",e.isLocalStorageAvailable="isLocalStorageAvailable",e.isInlinePlaybackRestricted="isInlinePlaybackRestricted",e.IOSVersion="IOSVersion",e.edgeVersion="edgeVersion",e.safariVersion="safariVersion",e.webOSChromiumVersion="webOSChromiumVersion",e.techSupportedByModules="techSupportedByModules",e.techSupportedByPlatform="techSupportedByPlatform",e.techSupportedByModulesOnPlatform="techSupportedByModulesOnPlatform"}(i||(t.CapabilityKey=i={}))},3793:function(e,t){var n;
vendor: 5,745 bytes, line 19
19Object.defineProperty(t,"__esModule",{value:!0}),t.StaticActionTypes=void 0,function(e){e.Default="default"}(n||(t.StaticActionTypes=n={})),t.default=function(e,t){return function(i,r){return void 0===i&&(i=e),t[r.type]?t[r.type](i,r):t[n.Default]?t[n.Default](i,r):i}}},5971:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getSourceStore=o,t.getSourceState=function(e,t){var n;return void 0===t&&(t=e.sourceContext),null===(n=o(e,t))||void 0===n?void 0:n.getState()};var i=n(813),r=n(4685);function o(e,t){var n;return void 0===t&&(t=e.sourceContext),(0,r.isContextAvailable)(e)?null===(n=e.serviceManager)||void 0===n?void 0:n.get(i.ServiceName.SourceStoreService,null==t?void 0:t.sourceIdentifier):void 0}},12:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.initialStartOptions=void 0,t.initializeStartTimeOffset=function(){return o(t.initialStartOptions.startTimeOffset)},t.setStartTimeOffset=o;var i=n(5267),r=n(5934);function o(e){return(0,i.createAction)(r.StartOptionsActionKey.SetStartTimeOffset,{startTimeOffset:e})}t.initialStartOptions={startTimeOffset:0}},7179:function(e,t,n){var i,r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.StartOptionsReducer=void 0,t.getStartTimeOffset=function(e){return e.startOptions.startTimeOffset};var o=n(3793),a=n(12),s=n(5934),u=a.initialStartOptions,l=function(e,t){var n=t.payload;return r(r({},e),n)};t.StartOptionsReducer=(0,o.default)(u,((i={})[s.StartOptionsActionKey.InitStartTimeOffset]=l,i[s.StartOptionsActionKey.SetStartTimeOffset]=l,i))},5934:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.StartOptionsActionKey=void 0,function(e){e.InitStartTimeOffset="@instance/sources/@source/startOptions/initStartTimeOffset",e.SetStartTimeOffset="@instance/sources/@source/startOptions/setStartTimeOffset"}(n||(t.StartOptionsActionKey=n={}))},1683:function(e,t){function n(e){Object.freeze(e);var t="function"==typeof e,i=Object.prototype.hasOwnProperty;return Object.getOwnPropertyNames(e).forEach((function(r){!i.call(e,r)||t&&("caller"===r||"callee"===r||"arguments"===r)||null===e[r]||"object"!=typeof e[r]&&"function"!=typeof e[r]||Object.isFrozen(e[r])||n(e[r])})),e}Object.defineProperty(t,"__esModule",{value:!0}),t.freeze=void 0,t.deepFreeze=n;var i=function(e){var t=e.getState();(function(e){return null!==e&&"object"==typeof e})(t)&&n(t)};t.freeze=function(e){return i(e),function(t){return function(n){i(e);try{return t(n)}finally{i(e)}}}}},430:function(e,t,n){var i,r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},r.apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ReachableDomainsReducer=void 0;var a=n(3793),s=n(2027);t.ReachableDomainsReducer=(0,a.default)({domains:[]},((i={})[s.ReachableDomainsActionType.AddDomain]=function(e,t){return function(e,t){return r(r({},e),{domains:e.domains.includes(t)?e.domains:o(o([],e.domains,!0),[t],!1)})}(e,t.payload)},i))},2027:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ReachableDomainsActionType=void 0,function(e){e.AddDomain="adddomain"}(n||(t.ReachableDomainsActionType=n={}))},4853:function(e,t,n){var i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayHelper=void 0,t.invert=function(e){return function(t,n,i){return!e(t,n,i)}},t.findIndexFromEnd=a,t.findIndexWithin=function(e,t,n,i){for(var r=t;r<n;r++)if(i(e[r]))return r;return-1},t.findFromEnd=function(e,t){return e[a(e,t)]},t.forEachFromIndex=function(e,t,n){for(;t<e.length;t++)n(e[t-1],e[t])},t.forceArray=function(e){return Array.isArray(e)?e:[e]},t.contains=function(e,t,n){return void 0===n&&(n=s),null!=e.find((function(e){return n(t,e)}))},t.shallowObjectMatcher=s,t.clearArray=function(e){e.splice(0,e.length)},t.removeEntriesFromStart=function(e,t){return t<1?[]:e.splice(0,t)};var r=n(233),o=function(){function e(){}return e.comparePrimitiveArrays=function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},e.stringToArrayWithoutEncoding=function(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t},e.convertBufferSourceToUTF8=function(t,n){return void 0===n&&(n="utf-8"),t instanceof ArrayBuffer?t=new Uint8Array(t):t instanceof DataView&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),e.convertUint8ArrayToUtf8(t,n)},e.convertUint8ArrayToUtf8=function(e,t){if("undefined"!=typeof TextDecoder)return new TextDecoder(t).decode(e);for(var n=0,i="";n<e.length;){var r=e[n++];if(r>127)if(r>191&&r<224){if(n>=e.length||64&e[n]){i+="�";continue}r=(31&r)<<6|63&e[n++]}else if(r>223&&r<240){if(n+1>=e.length||64&e[n]||64&e[n+1]){i+="�";continue}r=(15&r)<<12|(63&e[n++])<<6|63&e[n++]}else{if(!(r>239&&r<248)){i+="�";continue}if(n+2>=e.length||64&e[n]||64&e[n+1]||64&e[n+2]){i+="�";continue}r=(7&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++]}r<=65535?i+=String.fromCharCode(r):r<=1114111?(r-=65536,i+=String.fromCharCode(r>>
1910|55296),i+=String.fromCharCode(1023&r|56320)):i+="�"}return i},e.sort=function(e,t,n){if("string"==typeof t&&"[object Array]"===Object.prototype.toString.call(e)){var i;if(n||(n="asc"),"asc"===n)i=-1;else{if("desc"!==n)return;i=1}return e.length<2?e:e.sort((function(e,n){return e[t]<n[t]?i:e[t]>n[t]?-1*i:0}))}},e.append=function(t,n){var i=e.getTypedArrayType(t),r=e.getTypedArrayType(n);if(!i&&!r||i!==r)return null;var o=new i((t.byteLength+n.byteLength)/i.BYTES_PER_ELEMENT);return o.set(new i(t),0),o.set(new i(n),t.byteLength/i.BYTES_PER_ELEMENT),o},e.concatBuffers=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!(e=e.filter((function(e){return e}))).length)return null;var n=e.reduce((function(e,t){return e+t.byteLength}),0),i=new Uint8Array(n);return e.reduce((function(e,t){return i.set(new Uint8Array(t),e),e+t.byteLength}),0),i.buffer},e.getTypedArrayType=function(e){return e instanceof Uint8Array?Uint8Array:e instanceof Uint16Array?Uint16Array:e instanceof Uint32Array?Uint32Array:null},e.getArray=function(t){return e.getTypedArrayType(t)?[].slice.call(t):Array.isArray(t)?t:null},e.union=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=[];return e.filter((function(e){return Boolean(e)})).forEach((function(e){return e.forEach((function(e){n.includes(e)||n.push(e)}))})),n},e.isArrayBuffer=function(e){return Boolean(e)&&e instanceof ArrayBuffer&&void 0!==e.byteLength},e.arrayBufferToAsciiString=function(t,n){return void 0===n&&(n=!0),e.sparseArrayBufferToAsciiString(t,1,0,n)},e.arrayBufferToBase64=function(e){for(var t="",n=new Uint8Array(e),i=0;i<n.length;i++)t+=String.fromCharCode(n[i]);return window.btoa(t)},e.sparseArrayBufferToAsciiString=function(e,t,n,i){void 0===t&&(t=2),void 0===n&&(n=0),void 0===i&&(i=!0);for(var r="",o=i?new Uint8Array(e):new Uint16Array(e),a=n;a<o.length;a+=t)r+=String.fromCharCode(o[a]);return r},e.intersect=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=[],r=t.filter((function(e){return Boolean(e)}));return e.union.apply(e,t).forEach((function(e){r.every((function(t){return t.includes(e)}))&&i.push(e)})),i},e.addAndMergeIntersects=function(t,n){var r=t.filter((function(t){return e.intersect(t,n).length>0})),o=t.filter((function(e){return!r.includes(e)}));return 0===r.length?i(i([],t,!0),[n],!1):i([e.union.apply(e,i(i([],r,!1),[n],!1))],o,!0)},e.extractAsciiString=function(e,t,n){for(var i=t+n,r="";t<i;t++)r+=String.fromCharCode(e.getUint8(t));return r},e.extractHexString=function(e,t,n){for(var i=t+n,o="";t<i;t++)o+=r.FormatHelper.intToHex(e.getUint8(t));return o},e.insertInSortedArray=function(e,t,n){var i=e.findIndex(n);return i<0?e.push(t):e.splice(i,0,t),e},e.removeUntilInSortedArray=function(e,t){var n=e.findIndex(t),i=-1===n?e.length:n;return 0===i?[]:e.splice(0,i)},e.toArray=function(e){try{if(!e||!e.length)return[];for(var t=new Array(e.length),n=0;n<e.length;n++)t[n]=e[n];return t}catch(e){return[]}},e}();function a(e,t){var n;for(n=e.length-1;n>=0&&!t(e[n]);n--);return n}function s(e,t){return Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every((function(n){return e[n]===t[n]}))}t.ArrayHelper=o},7993:function(e,t,n){var i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.MSESafari=t.getBestTech=t.getTechSupportedByModules=t.getTechSupportedByPlatform=t.getTechSupportedByModulesOnPlatform=t.isLocalStorageAvailable=t.isInlinePlaybackRestricted=t.isFairPlayDrmSupported=t.supports=t.checkPlatformSupports=t.hasMediaSourceSupport=t.FairplayKeySystems=void 0,t.isUsingFileProtocol=function(){return"file:"===l.default.location.protocol},t.isFetchSupported=function(){return"function"==typeof l.default.fetch&&"function"==typeof l.default.AbortController};var r,o=n(8052),a=n(2756),s=n(4468),u=n(1513),l=n(4081),d=n(5434),c=n(5487);!function(e){e.FPS_1="com.apple.fps.1_0",e.FPS_2="com.apple.fps.2_0"}(r||(t.FairplayKeySystems=r={}));var f=[{player:s.PlayerType.Html5,streaming:s.StreamType.Dash},{player:s.PlayerType.Html5,streaming:s.StreamType.Hls},{player:s.PlayerType.Html5,streaming:s.StreamType.Smooth},{player:s.PlayerType.WebRtc,streaming:s.StreamType.Whep}
vendor: 8,178 bytes, line 19
19,{player:s.PlayerType.Native,streaming:s.StreamType.Hls},{player:s.PlayerType.Native,streaming:s.StreamType.Progressive}],p=Boolean(l.default.ArrayBuffer&&l.default.Uint8Array&&l.default.Uint16Array);t.hasMediaSourceSupport=function(){var e,t,n,i="MediaSource"in l.default&&"function"==typeof(null===(e=l.default.MediaSource)||void 0===e?void 0:e.isTypeSupported),r="WebKitMediaSource"in l.default&&"function"==typeof(null===(t=l.default.WebKitMediaSource)||void 0===t?void 0:t.isTypeSupported),o="ManagedMediaSource"in l.default&&"function"==typeof(null===(n=l.default.ManagedMediaSource)||void 0===n?void 0:n.isTypeSupported);return i||r||o};t.checkPlatformSupports=function(){var e=[];if(p?e=f.filter((function(e){return(0,t.supports)(e.player,e.streaming)})):e.push({player:s.PlayerType.Native,streaming:s.StreamType.Progressive}),(0,c.isSafari)())for(var n=1;n<e.length;n++)if(e[n].player===s.PlayerType.Native&&e[n].streaming===s.StreamType.Hls){e=e.splice(n,1).concat(e);break}return e},t.supports=function(e,n){var i=(0,t.hasMediaSourceSupport)()?[s.StreamType.Dash,s.StreamType.Hls,s.StreamType.Smooth]:[],r=function(){var e=l.default.RTCPeerConnection,t=Boolean(e)&&"function"==typeof e.prototype.addTransceiver;return function(){var e,t,n,i,r;return Boolean(null!==(r=null!==(i=null!==(n=null!==(t=null===(e=navigator.mediaDevices)||void 0===e?void 0:e.getUserMedia)&&void 0!==t?t:navigator.getUserMedia)&&void 0!==n?n:navigator.webkitGetUserMedia)&&void 0!==i?i:navigator.mozGetUserMedia)&&void 0!==r?r:navigator.msGetUserMedia)}()&&t}()?[s.StreamType.Whep]:[],o=function(e){return e.some((function(e){return e===n}))};switch(e){case s.PlayerType.Html5:return o(i);case s.PlayerType.WebRtc:return o(r);case s.PlayerType.Native:return o(function(){var e=[];return function(){var e=document.createElement("video");return e&&"function"==typeof e.canPlayType&&("maybe"===e.canPlayType("application/vnd.apple.mpegURL")||"maybe"===e.canPlayType("application/x-mpegURL")||"maybe"===e.canPlayType("audio/mpegurl")||"maybe"===e.canPlayType("audio/x-mpegurl"))}()&&!(0,c.isEdge)()&&e.push(s.StreamType.Hls),function(){return"function"==typeof document.createElement("video").canPlayType}()&&e.push(s.StreamType.Progressive),e}());default:return!1}},t.isFairPlayDrmSupported=function(){return Object.values(r).some((function(e){var t;return null===(t=l.default.WebKitMediaKeys)||void 0===t?void 0:t.isTypeSupported(e,d.MimeType.VideoMp4)}))},t.isInlinePlaybackRestricted=function(){var e=(0,c.getIOSVersion)(),t=e<c.IOS_9&&/iPad/i.test(navigator.userAgent),n=e<c.IOS_10&&/iP(hone|od)/i.test(navigator.userAgent);return c.isSafariIOS&&(t||n)},t.isLocalStorageAvailable=function(){try{return l.default.localStorage&&"function"==typeof localStorage.getItem&&"function"==typeof localStorage.setItem}catch(e){return!1}},t.getTechSupportedByModulesOnPlatform=function(){var e=(0,t.getTechSupportedByModules)();return(0,t.getTechSupportedByPlatform)().filter((function(t){return e.filter((function(e){return function(e,t){return e.player===t.player&&e.streaming===t.streaming}(e,t)})).length>0}))},t.getTechSupportedByPlatform=function(){return(0,t.checkPlatformSupports)()},t.getTechSupportedByModules=function(){var e=o.ModuleManager.has(a.ModuleName.EngineBitmovin)?o.ModuleManager.get(a.ModuleName.EngineBitmovin).technologyChecker.getSupportedTechnologies():[],t=o.ModuleManager.has(a.ModuleName.EngineNative)?o.ModuleManager.get(a.ModuleName.EngineNative).technologyChecker.getSupportedTechnologies():[],n=o.ModuleManager.has(a.ModuleName.EngineWebRtc)?o.ModuleManager.get(a.ModuleName.EngineWebRtc).technologyChecker.getSupportedTechnologies():[];return i(i(i([],e,!0),t,!0),n,!0)},t.getBestTech=function(e,t,n){void 0===e&&(e=[]),void 0===t&&(t={});var r=(0,u.getCapabilities)(),o=function(e){var t=(0,u.getCapabilities)(),n=i([],t.techSupportedByPlatform,!0);if(!e||0===e.length)return n;var r=e.filter((function(e){return n.some((function(t,i){var r,o=e.player===t.player&&e.streaming===t.streaming,a=null!==(r=e.exclude)&&void 0!==r&&r;return o&&n.splice(i,1),o&&!a}))})).map((function(e){return{player:e.player,streaming:e.streaming}}));return i(i([],r,!0),n,!0)}(e),a=r.techSupportedByPlatform;return n&&(o=a.filter((function(e){return e.player===n.player&&e.streaming===n.streaming}))),(t.vr&&((0,c.isSafariIOS)()||(0,c.isSafari)())?o.filter((function(e){var t=e.streaming===s.StreamType.Progressive&&e.player===s.PlayerType.Native,n=e.streaming===s.StreamType.Hls&&e.player===s.PlayerType.Native;return t||n&&(!(0,c.isSafariIOS)()||(0,c.getIOSVersion)()>c.IOS_9)})):o).find((function(e){return Boolean(t[e.streaming])}))},t.MSESafari=function(){return(0,c.isSafari)()&&(0,t.hasMediaSourceSupport)()}},2424:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DurationConverter=void 0;var n=function(){function e(){}return e.getDurationInSec=function(e){if("string"!=typeof e)return NaN;var t=/^([-])?P(([\\d.]*)Y)?(([\\d.]*)M)?(([\\d.]*)D)?(T)?(([\\d.]*)H)?(([\\d.]*)M)?(([\\d.]*|Infinity)S)?/.exec(e);if(t){var n=Boolean(t[1]),i=12*parseFloat(t[2]||"0")*30*24*60*60,r=30*parseFloat(t[4]||"0")*24*60*60,o=24*parseFloat(t[6]||"0")*60*60,a=60*parseFloat(t[9]||"0")*60,s=60*parseFloat(t[11]||"0"),u=parseFloat(t[13]||"0");if("T"===t[8]&&void 0===(t[9]||t[11]||t[13]))return NaN;var l=i+r+o+a+s+u;return n&&(l=-l),l}return NaN},e}();t.DurationConverter=n},233:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.FormatHelper=void 0;var n=function(){function e(){}return e.hexToBytes=function(e){var t=e.length;1&t&&(e="0"+e,t++);for(var n=new Uint8Array(t>>1),i=0;i<t;i+=2)n[i>>1]=parseInt(e.substring(i,i+2),16);return n},e.bytesToHex=function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));for(var t="",n=0;n<e.byteLength;n++){var i=(255&e[n]).toString(16);i.length<2&&(t+="0"),t+=i}return t},e.bytesToUUID=function(e){return this.beautifyUUID(this.bytesToHex(e))},e.beautifyUUID=function(e){return e.slice(0,8)+"-"+e.slice(8,12)+"-"+e.slice(12,16)+"-"+e.slice(16,20)+"-"+e.slice(20)},e.intToHex=function(e){return("00"+e.toString(16)).slice(-2)},e.base64UrlEncode=function(e){return window.btoa(e).replace(/\\+/g,"-").replace(/\\//g,"_").replace(/=/g,"")},e.base64UrlDecode=function(e){return window.atob((e+"===".slice((e.length+3)%4)).replace(/-/g,"+").replace(/_/g,"/"))},e}();t.FormatHelper=n},6599:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var n=function(){return function(e,t){this.runsInWebWorker=e,this.postMessageFunction=t}}();t.MessageHandler=n},5434:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.MimeTypeHelper=t.MimeType=void 0,t.isMediaTypeContained=function(e,t){return Object.keys(e).map((function(e){return a.getMediaType(e)})).includes(a.getMediaType(t))};var i,r=n(5625),o=n(4468);!function(e){e.VideoMp4="video/mp4",e.VideoTs="video/mp2t",e.AudioMp4="audio/mp4",e.AudioTs="audio/mp2t"}(i||(t.MimeType=i={}));var a=function(){function e(){}return e.isSubtitle=function(e){return this.isApplication(e)||this.isText(e)},e.isText=function(e){return e.toLowerCase().includes("text")},e.isTtmlXml=function(e){return e.toLowerCase().includes("ttml+xml")},e.isApplication=function(e){return e.toLowerCase().includes("application")},e.isAV=function(e){return this.isVideo(e)||this.isAudio(e)},e.isVideo=function(e){return e.toLowerCase().includes("video")},e.isUnknown=function(e){return e.toLowerCase().includes("unknown")},e.isAudio=function(e){return e.toLowerCase().includes("audio")},e.isImage=function(e){return e.toLowerCase().includes("image")},e.isDash=function(e){return e.toLowerCase().includes(r.ManifestMimeType.Dash)},e.isHls=function(e){var t=e.toLowerCase();return t.includes(r.ManifestMimeType.Hls)||t.includes("vnd.apple.mpegurl")},e.isMP4=function(e){return e.toLowerCase().includes("mp4")},e.getMediaType=function(e){return this.isVideo(e)?o.MediaType.Video:this.isAudio(e)?o.MediaType.Audio:this.isSubtitle(e)?o.MediaType.Subtitles:this.isImage(e)?o.MediaType.Thumbnails:void 0},e.extractContentType=function(e){return e.split("/")[0]},e.extractContainerType=function(e){var t=e.split("/");return t.length>1?t[1]:null},e}();t.MimeTypeHelper=a}
19,5487:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getVidaaVersion=t.isVidaa=t.getTizenVersion=t.isTizen2024=t.isTizen2023=t.isTizen2022=t.isTizen2020=t.isTizen2016=t.isTizen2017=t.isTizen2018=t.isTizen2019=t.isTizen=t.getEdgeVersion=t.isEdge=t.getSafariVersion=t.isSafari=t.isFirefoxIOS=t.isFirefox=t.isChromium=t.isChrome=t.WEBOS_2022_CHROMIUM_VERSION=t.WEBOS_2021_CHROMIUM_VERSION=t.WEBOS_2020_CHROMIUM_VERSION=t.WEBOS_2018_2019_CHROMIUM_VERSION=t.WEBOS_2016_2017_CHROMIUM_VERSION=t.TIZEN_2024_MINOR_VERSION=t.TIZEN_2024_MAJOR_VERSION=t.TIZEN_2023_MINOR_VERSION=t.TIZEN_2023_MAJOR_VERSION=t.TIZEN_2022_MINOR_VERSION=t.TIZEN_2022_MAJOR_VERSION=t.TIZEN_2020_MINOR_VERSION=t.TIZEN_2020_MAJOR_VERSION=t.TIZEN_2019_MINOR_VERSION=t.TIZEN_2019_MAJOR_VERSION=t.TIZEN_2018_MINOR_VERSION=t.TIZEN_2018_MAJOR_VERSION=t.TIZEN_2017_MINOR_VERSION=t.TIZEN_2017_MAJOR_VERSION=t.TIZEN_2016_MINOR_VERSION=t.TIZEN_2016_MAJOR_VERSION=t.SAFARI_18_MAJOR_VERSION=t.SAFARI_17_MAJOR_VERSION=t.SAFARI_15_MAJOR_VERSION=t.IOS_18=t.IOS_17=t.IOS_15=t.IOS_10=t.IOS_9=t.EDGE_CHROMIUM_FIRST_MAJOR_VERSION=void 0,t.resetPlatformDetectorCache=t.isSafariPlatform18orNewer=t.isSafari17orIOS17=t.isSafari15orIOS15=t.getIOSVersion=t.isSafariIOS=t.isIOS=t.isMobile=t.isEdgeAndroid=t.isAndroid=t.isWebOs2022OrNewer=t.isWebOs2020=t.isWebOs2017=t.isWebOs2016=t.isWebOs2019OrOlder=t.getWebOsChromiumVersion=t.isWebOS=t.isWpeWebKit=t.isVizio=void 0,t.isLegacyEdge=r,t.isEdgeChromium=function(){return(0,t.isEdge)()&&(0,t.getEdgeVersion)().major>=t.EDGE_CHROMIUM_FIRST_MAJOR_VERSION},t.isPlayStation5=o,t.isPlayStation4=a,t.isReactNative=function(){return"ReactNative"===window.navigator.product};var i=n(7993);function r(){return(0,t.isEdge)()&&(0,t.getEdgeVersion)().major<t.EDGE_CHROMIUM_FIRST_MAJOR_VERSION}function o(){return/PlayStation 5/i.test(navigator.userAgent)}function a(){return/PlayStation 4/i.test(navigator.userAgent)}t.EDGE_CHROMIUM_FIRST_MAJOR_VERSION=79,t.IOS_9=9,t.IOS_10=10,t.IOS_15=15,t.IOS_17=17,t.IOS_18=18,t.SAFARI_15_MAJOR_VERSION=15,t.SAFARI_17_MAJOR_VERSION=17,t.SAFARI_18_MAJOR_VERSION=18,t.TIZEN_2016_MAJOR_VERSION=2,t.TIZEN_2016_MINOR_VERSION=4,t.TIZEN_2017_MAJOR_VERSION=3,t.TIZEN_2017_MINOR_VERSION=0,t.TIZEN_2018_MAJOR_VERSION=4,t.TIZEN_2018_MINOR_VERSION=0,t.TIZEN_2019_MAJOR_VERSION=5,t.TIZEN_2019_MINOR_VERSION=0,t.TIZEN_2020_MAJOR_VERSION=5,t.TIZEN_2020_MINOR_VERSION=5,t.TIZEN_2022_MAJOR_VERSION=6,t.TIZEN_2022_MINOR_VERSION=5,t.TIZEN_2023_MAJOR_VERSION=7,t.TIZEN_2023_MINOR_VERSION=0,t.TIZEN_2024_MAJOR_VERSION=8,t.TIZEN_2024_MINOR_VERSION=0,t.WEBOS_2016_2017_CHROMIUM_VERSION=38,t.WEBOS_2018_2019_CHROMIUM_VERSION=53,t.WEBOS_2020_CHROMIUM_VERSION=68,t.WEBOS_2021_CHROMIUM_VERSION=79,t.WEBOS_2022_CHROMIUM_VERSION=87,t.isChrome=function(){return navigator.userAgent.includes("Chrome")&&!(0,t.isEdge)()},t.isChromium=function(){return(0,t.isChrome)()||(0,t.isEdge)()&&!r()},t.isFirefox=function(){return navigator.userAgent.includes("Firefox")},t.isFirefoxIOS=function(){return navigator.userAgent.includes("FxiOS")&&(0,t.isIOS)()},t.isSafari=function(){return navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")&&!navigator.userAgent.includes("IEMobile")&&!navigator.userAgent.includes("Edge")&&!(0,t.isTizen)()&&!o()&&!a()&&!(0,t.isWpeWebKit)()||(0,i.isFairPlayDrmSupported)()},t.getSafariVersion=function(){var e=/Version\\/(\\d+)\\.?(\\d+)?\\.?(\\d+)?/.exec(navigator.userAgent)||null;if(!e)return{};var t=e[1],n=e[2],i=e[3],r=function(e){return parseInt(e)};return{major:r(t),minor:r(n),patch:r(i)}},t.isEdge=function(){return/Edge\\/\\d+/i.test(navigator.userAgent)||/Edg\\/\\d+/i.test(navigator.userAgent)||/EdgA\\/\\d+/i.test(navigator.userAgent)||/EdgiOS\\/\\d+/i.test(navigator.userAgent)},t.getEdgeVersion=function(){var e=/Edge\\/(\\d+)\\.?(\\d+)/.exec(navigator.userAgent)||/Edg\\/(\\d+)\\.?(\\d+)/.exec(navigator.userAgent)||/EdgA\\/(\\d+)\\.?(\\d+)/.exec(navigator.userAgent)||/EdgiOS\\/(\\d+)\\.?(\\d+)/.exec(navigator.userAgent);if(!e||0===e.length)return{major:0,minor:0};var t={};return e[1]&&(t.major=parseInt(e[1])),e[1]&&(t.minor=parseInt(e[2])),t};var s,u,l,d,c=function(e,n){var i=(0,t.getTizenVersion)();return i.major===e&&i.minor===n};t.isTizen=function(){return null!=s||(s=navigator.userAgent.includes("Tizen")),s},t.isTizen2019=function(){return c(t.TIZEN_2019_MAJOR_VERSION,t.TIZEN_2019_MINOR_VERSION)},t.isTizen2018=function(){return c(t.TIZEN_2018_MAJOR_VERSION,t.TIZEN_2018_MINOR_VERSION)},t.isTizen2017=function(){return c(t.TIZEN_2017_MAJOR_VERSION,t.TIZEN_2017_MINOR_VERSION)},t.isTizen2016=function(){return c(t.TIZEN_2016_MAJOR_VERSION,t.TIZEN_2016_MINOR_VERSION)},t.isTizen2020=function(){return c(t.TIZEN_2020_MAJOR_VERSION,t.TIZEN_2020_MINOR_VERSION)},t.isTizen2022=function(){return c(t.TIZEN_2022_MAJOR_VERSION,t.TIZEN_2022_MINOR_VERSION)},t.isTizen2023=function(){return c(t.TIZEN_2023_MAJOR_VERSION,t.TIZEN_2023_MINOR_VERSION)},t.isTizen2024=function(){return c(t.TIZEN_2024_MAJOR_VERSION,t.TIZEN_2024_MINOR_VERSION)},t.getTizenVersion=function(){if(void 0===u){var e=/Tizen (\\d).(\\d)/.exec(navigator.userAgent);u=(null==e?void 0:e[1])?{major:Number(e[1]),minor:Number(e[2]||0)}:{}}return u},t.isVidaa=function(){return navigator.userAgent.includes("VIDAA")},t.getVidaaVersion=function(){var e=new RegExp(/VIDAA\\/(\\d+)\\.?(\\d+)/).exec(navigator.userAgent);return(null==e?void 0:e[1])?{major:Number(e[1]),minor:Number(e[2])}:{}}
19,t.isVizio=function(){return navigator.userAgent.includes("VIZIO")},t.isWpeWebKit=function(){return navigator.userAgent.includes("WPE")||navigator.userAgent.includes("Astro")},t.isWebOS=function(){return null!=l||(l=navigator.userAgent.includes("Web0S")||navigator.userAgent.includes("NetCast")),l},t.getWebOsChromiumVersion=function(){var e;if(void 0===d){var t=new RegExp(/Chrome\\/(\\d+)\\.?(\\d+)/).exec(navigator.userAgent);if(!(null==t?void 0:t[1]))return{};d={major:Number(t[1]),minor:Number(null!==(e=t[2])&&void 0!==e?e:0)}}return d},t.isWebOs2019OrOlder=function(){var e=(0,t.getWebOsChromiumVersion)();return(0,t.isWebOS)()&&void 0!==(null==e?void 0:e.major)&&e.major<=t.WEBOS_2018_2019_CHROMIUM_VERSION},t.isWebOs2016=function(){return(0,t.getWebOsChromiumVersion)().major===t.WEBOS_2016_2017_CHROMIUM_VERSION&&!("requestMediaKeySystemAccess"in navigator)},t.isWebOs2017=function(){return(0,t.getWebOsChromiumVersion)().major===t.WEBOS_2016_2017_CHROMIUM_VERSION&&"requestMediaKeySystemAccess"in navigator},t.isWebOs2020=function(){return(0,t.isWebOS)()&&(0,t.getWebOsChromiumVersion)().major===t.WEBOS_2020_CHROMIUM_VERSION},t.isWebOs2022OrNewer=function(){var e=(0,t.getWebOsChromiumVersion)();return(0,t.isWebOS)()&&void 0!==(null==e?void 0:e.major)&&e.major>=t.WEBOS_2022_CHROMIUM_VERSION},t.isAndroid=function(){return/Android/i.test(navigator.userAgent)},t.isEdgeAndroid=function(){return(0,t.isEdge)()&&(0,t.isAndroid)()},t.isMobile=function(){return/Android/i.test(navigator.userAgent)||/IEMobile/i.test(navigator.userAgent)||/Windows Phone 10.0/i.test(navigator.userAgent)||/Safari/i.test(navigator.userAgent)&&/Mobile/i.test(navigator.userAgent)},t.isIOS=function(){return/Safari/i.test(navigator.userAgent)&&/Mobile/i.test(navigator.userAgent)&&!/Android/i.test(navigator.userAgent)&&!/Windows Phone 10.0/i.test(navigator.userAgent)},t.isSafariIOS=function(){return/Safari/i.test(navigator.userAgent)&&/iP(hone|od|ad)/i.test(navigator.userAgent)},t.getIOSVersion=function(){var e=/OS (\\d+)(_\\d+)*/.exec(navigator.userAgent);return e&&e.length>0&&parseInt(e[1],10)||0},t.isSafari15orIOS15=function(){return function(){return(0,t.isSafari)()&&(0,t.getSafariVersion)().major===t.SAFARI_15_MAJOR_VERSION}()||function(){return(0,t.isIOS)()&&(0,t.getIOSVersion)()===t.IOS_15}()},t.isSafari17orIOS17=function(){return function(){return(0,t.isSafari)()&&(0,t.getSafariVersion)().major===t.SAFARI_17_MAJOR_VERSION}()||function(){return(0,t.isIOS)()&&(0,t.getIOSVersion)()===t.IOS_17}()},t.isSafariPlatform18orNewer=function(){var e;return!!((0,t.isSafari)()&&(null!==(e=(0,t.getSafariVersion)().major)&&void 0!==e?e:0)>=t.SAFARI_18_MAJOR_VERSION)||!!((0,t.isIOS)()&&(0,t.getIOSVersion)()>=t.IOS_18)},t.resetPlatformDetectorCache=function(){s=void 0,u=void 0,l=void 0,d=void 0}},9927:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.toSeconds=function(e){return e/n},t.toMilliSeconds=function(e){return e*n};var n=1e3},3068:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isBoolean=t.isNumber=void 0,t.isDefined=function(e){return null!=e},t.isVideoRepresentation=function(e){return null!=e._height&&null!=e._width},t.isNumber=function(e){return"number"==typeof e},t.isBoolean=function(e){return"boolean"==typeof e}},6741:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.WebWorkerContext=void 0;var i=n(8041),r=function(){return function(e){var t=this;this.b="undefined"==typeof window,this.onmessage=null,this.c=function(e,n){t.b?postMessage(e,n):"function"==typeof t.onmessage&&setTimeout((function(){t.onmessage({data:e})}),0)},this.postMessage=function(e){setTimeout((function(){t.onMessageCallback({data:e})}),0)},this.terminate=function(){},this.onMessageCallback=function(e){e.data.action&&e.data&&t.a[e.data.action]&&t.a[e.data.action](e.data)},this.b&&(0,i.installWorkerPolyfills)(),this.a=new e(this.b,this.c)}}();t.WebWorkerContext=r},4081:function(e,t){var n;function i(e){return"Math"in e&&e.Math===Math}Object.defineProperty(t,"__esModule",{value:!0});var r=null!==(n=function(){return"object"==typeof window&&window&&i(window)?window:void 0}())&&void 0!==n?n:function(){return"object"==typeof self&&self&&i(self)?self:void 0}();t.default=r},6110:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();
vendor: 40,444 bytes, line 19
19Object.defineProperty(t,"__esModule",{value:!0}),t.HlsParserWebworkerMessageHandler=void 0,t.getContext=function(){return s||u()};var r=n(6599),o=n(6741),a=n(7432),s=null;function u(){var e=new o.WebWorkerContext(l);return onmessage=e.onMessageCallback,e}var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parseHlsPlaylist=function(e){var t=e.payload;try{var n=(0,a.parsePlaylist)(t.data,t.options);this.postMessageFunction({action:"parsedPlaylist",data:n})}catch(e){this.postMessageFunction({action:"error",data:e.message})}},t}(r.MessageHandler);t.HlsParserWebworkerMessageHandler=l,"undefined"==typeof window&&(s=u())},5707:function(e,t,n){var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.generateRendition=function(e){var t,n,r;return{name:e.name,attributes:i(i({},e.attributes),{TYPE:null===(t=e.attributes)||void 0===t?void 0:t.TYPE,"GROUP-ID":null===(n=e.attributes)||void 0===n?void 0:n["GROUP-ID"],NAME:null===(r=e.attributes)||void 0===r?void 0:r.NAME})}},t.generateStartAttributes=function(e){var t,n;return(null===(t=e.attributes)||void 0===t?void 0:t.hasOwnProperty("TIME-OFFSET"))&&(n={timeOffset:Number(e.attributes["TIME-OFFSET"]),precise:"YES"===e.attributes.PRECISE}),e.attributes&&n&&n.hasOwnProperty("timeOffset")&&(e.attributes["TIME-OFFSET"]=n.timeOffset,e.attributes.PRECISE=n.precise),n},t.generatePartInfoTag=function(e){return{targetDuration:parseFloat(e["PART-TARGET"])}},t.generateServerControlTag=function(e){var t={canBlockReload:!1};return e.attributes?(e.attributes["CAN-SKIP-UNTIL"]&&(t.canSkipUntil=parseFloat(e.attributes["CAN-SKIP-UNTIL"])),void 0!==t.canSkipUntil&&e.attributes["CAN-SKIP-DATERANGES"]&&(t.canSkipDateRanges="YES"===e.attributes["CAN-SKIP-DATERANGES"]),e.attributes["HOLD-BACK"]&&(t.holdBack=parseFloat(e.attributes["HOLD-BACK"])),e.attributes["PART-HOLD-BACK"]&&(t.partHoldBack=parseFloat(e.attributes["PART-HOLD-BACK"])),e.attributes["CAN-BLOCK-RELOAD"]&&(t.canBlockReload="YES"===e.attributes["CAN-BLOCK-RELOAD"]),t):t},t.generateSkipTag=function(e){var t={skippedSegments:0,recentlyRemovedDateranges:[]};return e.attributes?(e.attributes["SKIPPED-SEGMENTS"]&&(t.skippedSegments=parseInt(e.attributes["SKIPPED-SEGMENTS"])),e.attributes["RECENTLY-REMOVED-DATERANGES"]&&(t.recentlyRemovedDateranges=e.attributes["RECENTLY-REMOVED-DATERANGES"].split("\\t")),t):t},t.generatePartTag=function(e,t){var n={uri:(0,s.forceReallocation)(e.URI),duration:parseFloat(e.DURATION)};if("YES"===e.INDEPENDENT&&(n.independent=!0),e.BYTERANGE){var i=e.BYTERANGE.split("@"),r=parseInt(i[0]),o=parseInt(i[1]);isNaN(o)&&(o=(null==t?void 0:t.byteRange)?t.byteRange.end+1:0),n.byteRange={start:o,end:o+r-1}}return"YES"===e.GAP&&(n.gap=!0),n},t.generatePreloadHintTag=function(e,t){if("PART"===e.TYPE){var n={uri:(0,s.forceReallocation)(e.URI),duration:t,isPreloadHint:!0};return(i=u(e))&&(n.byteRange=i),{part:n}}if("MAP"===e.TYPE){var i,r={url:(0,s.forceReallocation)(e.URI)};return(i=u(e))&&(r.byteRange=i),{init:r}}return{}},t.generateStreamInfTag=function(e,t){var n,r,o,a,s,u={name:e.name,uri:t,attributes:i(i({},e.attributes),{BANDWIDTH:null===(n=e.attributes)||void 0===n?void 0:n.BANDWIDTH})};return(null===(r=e.attributes)||void 0===r?void 0:r.RESOLUTION)&&(u.attributes.RESOLUTION=f(e)),(null===(o=e.attributes)||void 0===o?void 0:o.BANDWIDTH)&&(u.attributes.BANDWIDTH=parseInt(e.attributes.BANDWIDTH)),(null===(a=e.attributes)||void 0===a?void 0:a["AVERAGE-BANDWIDTH"])&&(u.attributes["AVERAGE-BANDWIDTH"]=parseInt(e.attributes["AVERAGE-BANDWIDTH"])),(null===(s=e.attributes)||void 0===s?void 0:s["PROGRAM-ID"])&&(u.attributes["PROGRAM-ID"]=parseInt(e.attributes["PROGRAM-ID"])),u.id=l(u.attributes),u},t.generateVariantPlaylistId=l,t.generateSessionKeyTag=function(e){c(e)},t.generateIFrameStreamInfTag=function(e){var t,n,i;(null===(t=e.attributes)||void 0===t?void 0:t.BANDWIDTH)&&(e.attributes.BANDWIDTH=parseInt(e.attributes.BANDWIDTH)),(null===(n=e.attributes)||void 0===n?void 0:n["AVERAGE-BANDWIDTH"])&&(e.attributes["AVERAGE-BANDWIDTH"]=parseInt(e.attributes["AVERAGE-BANDWIDTH"],10)),(null===(i=e.attributes)||void 0===i?void 0:i.RESOLUTION)&&(e.attributes.RESOLUTION=f(e))},t.generateSegmentEntrySkeleton=function(){return{uri:"",duration:0,mediaSequence:0}},t.generateCueTag=function(e,t){var n={type:t};if(e.attributes){var i=[];for(var r in e.attributes)if(e.attributes.hasOwnProperty(r)){var o=e.attributes[r]?"".concat(r,"=").concat(e.attributes[r]):r;i.push(o)}n.attributes=i}return n},t.generateDateRange=function(e){var t={type:a.MetadataType.DATERANGE};if(e.attributes){t.clientAttributes={};var n=e.attributes;for(var i in n)if(n.hasOwnProperty(i)){var r=d(i,n[i]);i.startsWith("X-")?t.clientAttributes[(0,s.kebabCaseToCamelCase)(i.substring(2))]=r:t[(0,s.kebabCaseToCamelCase)(i)]=r}}return t.duration&&(t.duration=Number(t.duration)),t.plannedDuration&&(t.plannedDuration=Number(t.plannedDuration)),t.endOnNext&&(t.endOnNext=!0),t},t.generateKeyTag=function(e){var t;if(c(e),e.attributes&&"NONE"!==e.attributes.METHOD&&e.attributes.URI){var n={method:null!==(t=o.HlsEncryptionMethods.find((function(t){return t===e.attributes.METHOD})))&&void 0!==t?t:o.HlsEncryptionMethod.AES_128,uri:(0,s.forceReallocation)(e.attributes.URI)};return void 0!==e.attributes.IV&&(n.iv=e.attributes.IV),e.attributes.KEYFORMAT&&(n.keyformat=(0,s.forceReallocation)(e.attributes.KEYFORMAT)),e.attributes.KEYFORMATVERSIONS&&(n.keyformatversions=(0,s.forceReallocation)(e.attributes.KEYFORMATVERSIONS)),e.attributes.KEYID&&(n.keyid=(0,s.forceReallocation)(e.attributes.KEYID)),n}},t.generateByteRangeTag=function(e,t){var n;if(e.value){var i=e.value.split("@"),r=i[0],o=i[1],a={length:parseInt(r||"0")};if(o)a.offset=parseInt(o);else{var s=t[t.length-1];(null==s?void 0:s.byterange)&&(a.offset=(null!==(n=s.byterange.offset)&&void 0!==n?n:0)+s.byterange.length)}return a}},t.generateMapTag=function(e,t){var n,i;if(null===(n=e.attributes)||void 0===n?void 0:n.URI){var o={url:(0,s.forceReallocation)(e.attributes.URI)};if(null===(i=e.attributes)||void 0===i?void 0:i.BYTERANGE){var a=e.attributes.BYTERANGE.split("@"),u=a[0],l=a[1];o.byteRange={start:parseInt(l),end:parseInt(l)+parseInt(u)-1}}return t.keys.length>0&&(o.keys=r([],t.keys,!0),t.keyInUse=!0),o}},t.generateCustomTag=function(e){try{e=(0,s.forceReallocation)(e);var t=/^#([^:=]*)([:=])?(.*)$/.exec(e);if(!(null==t?void 0:t[1]))return;var n={name:t[1]},i="";if("="===t[2]&&t[3])i=t[3];else if(":"===t[2]&&t[3]){var r=h.exec(t[3]);r&&"="===r[2]&&r[3]?n.attributes=function(e){for(var t=e.split(p),n=t.length,i={};n--;)if(""!==t[n]){var r=S.exec(t[n]);if(r){var o=r.slice(1),a=o[0],s=o[1];i[a.trim()]=s.trim().replace(g,"$1")}}return i}(t[3]):i=t[3]}return i&&(n.value=i.replace(v,"$1")),n}catch(e){return}};var o=n(6790),a=n(3714),s=n(649);function u(e){var t=parseInt(e["BYTERANGE-START"]),n=parseInt(e["BYTERANGE-END"]);if(!isNaN(t)||!isNaN(n))return{start:isNaN(t)?0:t,end:isNaN(n)?Math.pow(2,53)-1:n}}function l(e){var t="";return e.RESOLUTION&&(t+=e.RESOLUTION.height+"_"),t+e.BANDWIDTH}function d(e,t){var n=(0,s.forceReallocation)(t);return function(e){return["X-RESUME-OFFSET","X-PLAYOUT-LIMIT"].includes(e)}(e)?Number(n):function(e){return["X-SNAP","X-RESTRICT"].includes(e)}(e)?n.split(","):n}function c(e){var t;if(null===(t=e.attributes)||void 0===t?void 0:t.IV){var n=e.attributes.IV;(n.startsWith("0x")||n.startsWith("0X"))&&(e.attributes.IV=n.substring(2))}}function f(e){var t,n={width:0,height:0},i=null===(t=e.attributes)||void 0===t?void 0:t.RESOLUTION.split("x");return i[0]&&(n.width=parseInt(i[0])),i[1]&&(n.height=parseInt(i[1])),n}var p=/(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))/,S=/([^=]*)=(.*)/,g=/^[\'"](.*)[\'"]$/,v=/^[\'"](.*)[\'"]$/g,h=/^([^:="]*)([:=])?(.*)$/},9297:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TextParser=void 0;var n=/[ \\t]+/gm,i=function(){function e(e){this.data=e,this.tb=0}return e.prototype.ub=function(){return this.tb===this.data.length},e.prototype.skipWhitespace=function(){this.readRegex(n)},e.prototype.readRegex=function(e){var t=this.vb(e);if(!this.ub()&&void 0!==t&&t.position===this.tb)return this.tb+=t.length,t.results},e.prototype.vb=function(e){e.lastIndex=this.tb;var t=e.exec(this.data);if(null!==t)return{position:t.index,length:t[0].length,results:t}},e}();t.TextParser=i},7432:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.parsePlaylist=function(e,t){void 0===t&&(t={});var n=-1===e.indexOf("#EXTINF")?i.Master:i.Media,c=e.replace(u,"\\n").trim().split(/\\n+/m),f=(0,r.removeTrailingWhitespaces)(c[0]);if(!l.test(f))throw new Error("Playlist parsing failed: missing #EXTM3U tag");if(n===i.Media)return(0,a.parseVariant)(c,t);for(var p,S=[],g=[],v=[],h=1,E=!0,m=!1,y=!0,T=0;T<c.length;T++){var _=(0,r.removeTrailingWhitespaces)(c[T]),O=c[T+1];if((0,r.isCustomTag)(_))d(S,_);else if(y)y=!1;else{var I=(0,o.parseTag)(_);switch(I.name){case"EXT-X-STREAM-INF":v.push((0,s.generateStreamInfTag)(I,(0,r.removeTrailingWhitespaces)(O))),y=!0;break;case"EXT-X-MEDIA":var R=(0,s.generateRendition)(I);g.push(R),S.push(R);break;case"EXT-X-VERSION":h=Number(I.value);break;case"EXT-X-START":p=(0,s.generateStartAttributes)(I),S.push(I);break;case"EXT-X-ALLOW-CACHE":E="YES"===I.value||void 0===I.value;break;case"EXT-X-INDEPENDENT-SEGMENTS":m=!0,S.push(I);break;case"EXT-X-I-FRAME-STREAM-INF":(0,s.generateIFrameStreamInfTag)(I),S.push(I);break;case"EXT-X-SESSION-DATA":default:S.push(I);break;case"EXT-X-SESSION-KEY":(0,s.generateSessionKeyTag)(I),S.push(I)}}}var b={version:h,allowCache:E,independentSegments:m,hasM3u:!0,media:g,playlists:v,tags:S=S.concat(v)};return p&&(b.start=p),b};var i,r=n(3577),o=n(1908),a=n(1945),s=n(5707),u=/\\r\\n|\\r(?=[^\\n]|$)/gm,l=/^#EXTM3U($|[ \\t\\n])/m;function d(e,t){var n=(0,s.generateCustomTag)(t);n&&e.push(n)}!function(e){e.Master="master",e.Media="media"}(i||(i={}))},3577:function(e,t,n){var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.parseSegments=function(e,t,n,c){void 0===c&&(c={});for(var g,v=[],h=0,E=(0,d.generateSegmentEntrySkeleton)(),m=r([],t,!0),y=0,T=n.mediaSequence,_={keys:[],keyInUse:!1},O=function(e){!function(e,t,n,i,o,a,s){e.duration=t,e.uri=n,e.mediaSequence=s,i&&(e.init=i),a.length>0&&(e.customTags=a),o.keys.length>0&&(e.keys=r([],o.keys,!0),o.keyInUse=!0)}(E,y,e,g,_,m,T),v.push(E),h+=y,T++,function(){E=(0,d.generateSegmentEntrySkeleton)(),m=[],y=0}()},I=function(e){var t,s,f=(0,u.parseTag)(e);switch(f.name){case"EXTINF":y=parseFloat(f.value);break;case"EXT-X-BYTERANGE":E.byterange=(0,d.generateByteRangeTag)(f,v);break;case"EXT-X-DISCONTINUITY":E.discontinuity=!0;break;case"EXT-X-PROGRAM-DATE-TIME":!function(e,t){t.value&&(e.dateTime=new Date(t.value))}(E,f);break;case"EXT-X-KEY":if("NONE"===(null===(t=f.attributes)||void 0===t?void 0:t.METHOD)){_.keys=[{method:o.HlsEncryptionMethod.NONE}];break}!function(e,t){t.keyInUse&&(t.keys=[],t.keyInUse=!1);var n=(0,d.generateKeyTag)(e);void 0!==n&&t.keys.push(n)}(f,_);break;case"EXT-X-MAP":g=(0,d.generateMapTag)(f,_);break;case"EXT-X-DATERANGE":n.dateRange.push((0,d.generateDateRange)(f));break;case"EXT-X-CUE-OUT-CONT":E.cueTag=(0,d.generateCueTag)(f,"CUE-OUT-CONT");break;case"EXT-X-CUE-OUT":E.cueTag=(0,d.generateCueTag)(f,"CUE-OUT");break;case"EXT-X-CUE-IN":E.cueTag=(0,d.generateCueTag)(f,"CUE-IN");break;case"EXT-X-SCTE35":!function(e,t){var n;void 0===e.scte35&&(e.scte35=[]),e.scte35.push({type:a.MetadataType.SCTE,attributes:i({CUE:null===(n=t.attributes)||void 0===n?void 0:n.CUE},t.attributes)})}(E,f);break;case"EXT-X-PART":!function(e,t,n){var i;if(n.parsePartTags){t.parts=null!==(i=t.parts)&&void 0!==i?i:[];var r=t.parts[t.parts.length-1];t.parts.push((0,d.generatePartTag)(e.attributes,r))}}(f,E,c);break;case"EXT-X-PRELOAD-HINT":var p=function(e,t,n){return n.parsePartTags&&t?(0,d.generatePreloadHintTag)(e.attributes,t.targetDuration):{}}(f,n.partInfo,c);p.init&&(g=p.init,_.keys.length>0&&(g.keys=r([],_.keys,!0),_.keyInUse=!0)),p.part&&(E.parts=null!==(s=E.parts)&&void 0!==s?s:[],E.parts.push(p.part));break;case"EXT-X-SKIP":var S=(0,d.generateSkipTag)(f);n.skippedSegmentsCount=S.skippedSegments,T+=S.skippedSegments;break;case"EXT-X-ENDLIST":n.endList=!0;break;case"EXT-X-MEDIA-SEQUENCE":(0,l.resolvePlaylistTag)(n,f,m),T=n.mediaSequence,n.skippedSegmentsCount&&(T+=n.skippedSegmentsCount);break;default:(0,l.resolvePlaylistTag)(n,f,m)}},R=0,b=e;R<b.length;R++){var N=p(b[R]);""!==N&&(N.startsWith("#")?S(N)?f(n,m,N):I(N):O(N))}E.parts&&E.parts.length>0&&(y=E.parts.reduce((function(e,t){return e+t.duration}),0),O(s.PHANTOM_SEGMENT_URL)),n.segments=v,n.totalDuration=h},t.addCustomTagToPlaylistTagList=c,t.handleCustomTag=f,t.removeTrailingWhitespaces=p,t.isCustomTag=S;var o=n(6790),a=n(3714),s=n(3066),u=n(1908),l=n(1945),d=n(5707);function c(e,t){void 0===e.tags&&(e.tags=[]),t&&e.tags.push(t)}function f(e,t,n){t.push({type:a.MetadataType.CUSTOM,attributes:n}),c(e,(0,d.generateCustomTag)(n))}function p(e){return e.replace(/^[ \\t]+/g,"")}function S(e){return/^#(?!EXT)/m.test(e)}},1908:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.parseTag=function(e){var t,n=r.exec(e);if(!n)throw new Error("Invalid tag "+e);var s,u=n[1],l=n[2],d={};if(l){var c=new i.TextParser(l),f=void 0,p=c.readRegex(o);for(p&&(s=null!==(t=p[1])&&void 0!==t?t:p[2]);f=c.readRegex(a);){var S=f[1],g=f[2]||f[3];if(S.includes(",")){var v=S.split(","),h=v[0];S=v[1].trim(),d[h]=void 0}d[S]=g,c.skipWhitespace()}}return{name:u,attributes:d,value:s}};var i=n(9297),r=/^#(EXT[^:]*)(?::(.*))?$/,o=/^(?:"([^"]*)"|([^,=]+))(?:,|$)/g,a=/([^=]+)=*(?:"([^"]*)"|([^",]*))(?:,|$)/g},1945:function(e,t,n){var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SEGMENT_TAGS=void 0,t.parseVariant=function(e,n){void 0===n&&(n={});for(var i={version:1,allowCache:!0,hasM3u:!0,endList:!1,segments:[],dateRange:[],skippedSegmentsCount:0,targetDuration:0,totalDuration:0,mediaSequence:0},r=[],s=0;s<e.length;s++){var d=(0,o.removeTrailingWhitespaces)(e[s]);if(""!==d)if((0,o.isCustomTag)(d))(0,o.handleCustomTag)(i,r,d);else{var c=(0,a.parseTag)(d);if(t.SEGMENT_TAGS.includes(c.name))return(0,o.parseSegments)(e.slice(s),r,i,n),u(i),i;l(i,c,r)}}return u(i),i},t.resolvePlaylistTag=l;var r=n(3714),o=n(3577),a=n(1908),s=n(5707);function u(e){var t;"EVENT"===e.playlistType&&(e.discontinuitySequence=null!==(t=e.discontinuitySequence)&&void 0!==t?t:0)}function l(e,t,n){switch(t.name){case"EXT-X-VERSION":e.version=Number(t.value);break;case"EXT-X-START":e.start=(0,s.generateStartAttributes)(t);break;case"EXT-X-INDEPENDENT-SEGMENTS":e.independentSegments=!0;break;case"EXT-X-TARGETDURATION":t.value&&(e.targetDuration=parseInt(t.value));break;case"EXT-X-MEDIA-SEQUENCE":t.value&&(e.mediaSequence=parseInt(t.value));break;case"EXT-X-DISCONTINUITY-SEQUENCE":t.value&&(e.discontinuitySequence=parseInt(t.value));break;case"EXT-X-PLAYLIST-TYPE":e.playlistType="EVENT"===t.value?"EVENT":"VOD";break;case"EXT-X-PART-INF":e.partInfo=(0,s.generatePartInfoTag)(t.attributes);break;case"EXT-X-ALLOW-CACHE":e.allowCache="NO"!==t.value;break;case"EXT-X-SERVER-CONTROL":e.serverControl=(0,s.generateServerControlTag)(t);break;case"EXT-X-DATERANGE":e.dateRange.push((0,s.generateDateRange)(t));break;case"EXT-X-ENDLIST":e.endList=!0;break;case"EXTM3U":break;default:n.push(i({type:r.MetadataType.CUSTOM},t)),(0,o.addCustomTagToPlaylistTagList)(e,t)}}t.SEGMENT_TAGS=["EXTINF","EXT-X-BYTERANGE","EXT-X-DISCONTINUITY","EXT-X-PROGRAM-DATE-TIME","EXT-X-KEY","EXT-X-GAP","EXT-X-BITRATE","EXT-X-PART","EXT-X-MAP","EXT-X-CUE-OUT-CONT","EXT-X-CUE-OUT","EXT-X-CUE-IN","EXT-X-SCTE35","EXT-X-SKIP"]},4053:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentInfoError=void 0,function(e){e.END_OF_STREAM_REACHED="END_OF_STREAM_REACHED",e.PERIOD_COMPLETE="PERIOD_COMPLETE",e.SEGMENT_EXCEEDING_PERIOD_DURATION="SEGMENT_EXCEEDING_PERIOD_DURATION"}(n||(t.SegmentInfoError=n={}))},5439:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isSegmentTiming=function(e){return"startTime"in e&&(0,i.isNumber)(e.startTime)&&"duration"in e&&(0,i.isNumber)(e.duration)},t.findSegmentIndexForTime=function(e,t,n){var i=!e||!e.length,o=t<e[0].startTime+e[0].duration;if(i||o)return 0;var a=e.length-1;if(t>=e[a].startTime)return a;var s=Math.max(t-e[0].startTime,0),u=Math.min(Math.floor(s/n),e.length-1);return r(e[0])&&r(e[u])?function(e,t,n){for(;e[n]&&e[n].startTime>t;)n--;for(;e[n]&&e[n].startTime+e[n].duration<=t;)n++;return n=Math.max(n,0),n=Math.min(n,e.length-1)}(e,t,u):null},t.createInitSegmentInfoBase=function(e){var t=e._internalId;return{internalRepresentationId:t,representationId:t.representationId,periodId:t.periodId,mimeType:e._mimeType,isInitSegment:!0}},t.getSegmentInfoTimeRange=function(e){if((null==e?void 0:e.duration)&&void 0!==(null==e?void 0:e.startTime))return{start:e.startTime,end:e.startTime+e.duration}};var i=n(3068);function r(e){return e&&(0,i.isNumber)(e.startTime)}},3066:function(e,t,n){var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentListMPDHandler=t.PHANTOM_SEGMENT_URL=void 0,t.assignSegmentStartTimesFromHlsRepresentation=T,t.copyPropValues=I,t.getMatchingPart=R;var r=n(6790),o=n(813),a=n(7179),s=n(649),u=n(4853),l=n(2424),d=n(9927),c=n(3068),f=n(8052),p=n(2756),S=n(827),g=n(2498),v=n(729),h=n(4053),E=n(5439);t.PHANTOM_SEGMENT_URL="PHANTOM-SEGMENT";var m=function(){function e(e,t){this.d=e,this.e=t,this.g=e.settings,this.f=e.logger,this.m=e.serviceManager.get(o.ServiceName.ManifestService,this.e.sourceIdentifier),this.l=0,this.o={},this.n=NaN}return Object.defineProperty(e.prototype,"p",{get:function(){return this.d.serviceManager.get(o.ServiceName.PlayerStateService)},enumerable:!1,configurable:!0}),e.prototype.q=function(e,t){var n;if(!e)return null;var o={isInitSegment:!1,url:e._media,duration:e._duration,internalRepresentationId:t,periodId:t.periodId};if(e._key&&e._key.method!==r.HlsEncryptionMethod.NONE&&(o.key=e._key),void 0!==e._playbackTime&&(o.startTime=e._playbackTime),e._dateTime&&(o.dateTime=e._dateTime),e._metadata&&(o.metadata=e._metadata),e._byteRange&&(o.byteRange=e._byteRange),e._init&&(o.init=e._init,(null===(n=e._init.key)||void 0===n?void 0:n.method)===r.HlsEncryptionMethod.NONE&&(o.init=i({},o.init),delete o.init.key)),void 0!==e._mediaSequence&&(o.mediaSequence=e._mediaSequence),void 0!==e._discontinuitySequenceNumber&&(o.discontinuitySequenceNumber=e._discontinuitySequenceNumber),e._parts){var a=o.dateTime;o.parts=e._parts.map((function(e){var t=function(e,t){var n={url:e.uri,duration:e.duration,isInitSegment:!1,internalRepresentationId:t.internalRepresentationId,isPreloadHint:Boolean(e.isPreloadHint),isIndependent:Boolean(e.independent)};return e.byteRange&&(n.byteRange=e.byteRange),t.key&&(n.key=t.key),t.init&&(n.init=t.init),(0,c.isDefined)(t.mediaSequence)&&(n.mediaSequence=t.mediaSequence),(0,c.isDefined)(t.discontinuitySequenceNumber)&&(n.discontinuitySequenceNumber=t.discontinuitySequenceNumber),n}(e,o);return a&&(t.dateTime=a,t.startTime=(0,d.toSeconds)(a.getTime()),a=new Date(a.getTime()+(0,d.toMilliSeconds)(e.duration))),t}))}return o},e.prototype.r=function(e,t,n){if(t.SegmentURL.length<1)return e.entries=[],e.totalDuration=0,e.entries.length;for(var i=this.q(t.SegmentURL[0],n),r=0,o=0,a=0;a<e.entries.length;a++){var s=e.entries[a];if((0,S.isIdenticalSegmentInfo)(s,i))break;r+=s.duration,e.entries.splice(a,1),a--,o++,this.i.equals(n)&&this.rewindOneSegment()}return e.totalDuration-=r,o},e.prototype.s=function(e,t,n,i){for(var r=[],o=e.entries[e.entries.length-1],a=0,s=i?function(e){var t,n=[];return null===(t=e.S)||void 0===t||t.forEach((function(e){n.push(e);for(var t=e._r?parseInt(e._r):0;t>0;)n.push({_d:e._d}),t--})),n}(i):void 0,u=this.qb(n),l=t.SegmentURL.length-1;l>=0;l--){var d=this.q(t.SegmentURL[l],n);if(o&&(0,S.isIdenticalSegmentInfo)(o,d)){if(_(o)){var c=O(o,d);e.totalDuration+=c}break}o&&(0,S.isIdenticalInitSegmentInfo)(o.init,d.init)&&(d.init=o.init),(null==s?void 0:s[l])&&this.t(d,s[l],e,u),isNaN(d.duration)&&(d.duration=e.maximumSegmentDuration),d.duration/=e.timescale,a+=d.duration,r.push(d)}return e.totalDuration+=a,r.reverse(),e.entries=e.entries.concat(r),r.length},e.prototype.t=function(e,t,n,i){var r,o;if(e.duration=parseInt(t._d),void 0!==t._t){var a=null!==(r=n.timescale)&&void 0!==r?r:1,s=null!==(o=n.presentationTimeOffset)&&void 0!==o?o:0;e.startTime=i+(parseInt(t._t)-s)/a}},e.prototype.u=function(e,t){var n,i,r,o=t.SegmentList,a=t._internalId.representationId,s=null===(n=this.i)||void 0===n?void 0:n.equals(t._internalId),u=null===(i=null==o?void 0:o[0])||void 0===i?void 0:i.SegmentURL.length;if(!s||u){e.Uri&&e.Uri!==t.Uri&&this.v(e,null==o?void 0:o[0],s),e.Uri=t.Uri,e.timescale=1,e.maximumSegmentDuration=1,e.startNumber=1;for(var l=function(n){var i=o[n];if(i.hasOwnProperty("_duration")&&(e.maximumSegmentDuration=Number(i._duration)),["_timescale","_startNumber","_presentationTimeOffset"].filter((function(e){return i.hasOwnProperty(e)})).forEach((function(t){return e[t.substr(1)]=i[t]})),d.w(e,i,t),i.hasOwnProperty("SegmentURL")){var s=d.r(e,i,t._internalId),u=d.s(e,i,t._internalId,null===(r=i.SegmentTimeline)||void 0===r?void 0:r[0]);d.x(t._mimeType,a,s,u),d.m.isHlsManifest()?T(e.entries,t._internalId,d.m):d.y(e,t._internalId)}},d=this,c=0;c<o.length;c++)l(c)}},e.prototype.v=function(e,t,n){var i,r,o,a,s,l;if(this.m.isLive()&&n){var d=null!==(o=null===(r=null===(i=e.entries)||void 0===i?void 0:i[0])||void 0===r?void 0:r.mediaSequence)&&void 0!==o?o:1/0,c=(null!==(s=null===(a=null==t?void 0:t.SegmentURL[0])||void 0===a?void 0:a._mediaSequence)&&void 0!==s?s:0)-d,f=function(e){var t,n,i=e.totalDuration/(null!==(n=null===(t=e.entries)||void 0===t?void 0:t.length)&&void 0!==n?n:1);return Math.ceil(24/i)}(e);!isNaN(c)&&c>0&&c<f&&this.Y(c)}(0,u.clearArray)(null!==(l=e.entries)&&void 0!==l?l:[]),e.totalDuration=0},e.prototype.w=function(e,t,n){var i,r=null===(i=f.ModuleManager.get(p.ModuleName.DASH,!1))||void 0===i?void 0:i.initSegmentInfoSourceDetectors.isInitializationNode;(null==r?void 0:r(t))?e.init=f.ModuleManager.get(p.ModuleName.DASH,!1).initSegmentInfoProviders.provideSegmentInfoFromInitializationNodeProperty(t,n):delete e.init},e.prototype.x=function(e,t,n,i){(n>0||i>0)&&this.f.debug("[".concat(e,"][").concat(t,"] Updated segment list, removed ").concat(n," segments and added ").concat(i," segments"))},e.prototype.y=function(e,t){var n=this.qb(t);e.entries.forEach((function(e){var t,i;null!==(t=e.startTime)&&void 0!==t||(e.startTime=n),n=e.startTime+(null!==(i=e.duration)&&void 0!==i?i:0)}))},e.prototype.extrapolateStartTimesFromDiscontinuityStarts=function(e){var t,n,i,r,o=null===(n=null===(t=this.z())||void 0===t?void 0:t.getState())||void 0===n?void 0:n.hls;if(o){var a=e.getRepresentationId().representationId,s=this.getSegmentListEntries(this.i),u=f.ModuleManager.get(p.ModuleName.HLS).selectors,l=u.getDiscoSequenceTimings,d=u.getMergedDiscontinuityTimings,c=function(e,t){for(var n=e[0].discontinuitySequenceNumber,i=1;i<e.length;i++){var r=e[i].discontinuitySequenceNumber;if(r!==n){var o=y(t,r);if(null!=o)return{index:i,discontinuityStartTime:o}}}return null}(s,null!==(i=l(o,e.getMimeType()))&&void 0!==i?i:d(o));if(!c){var S=null===(r=this.Z())||void 0===r?void 0:r.start;if(void 0===S)return;c={index:0,discontinuityStartTime:S},this.f.debug("Could not find discontinuity boundary with start time, using period start time ".concat(S))}this.f.debug("Assigning segment start times for rep ".concat(a," from discontinuity at index ").concat(c.index," with time ").concat(c.discontinuityStartTime)),s[c.index].startTime=c.discontinuityStartTime;for(var g=c.index-1;g>=0;g--)s[g].startTime=s[g+1].startTime-s[g+1].duration;for(g=c.index+1;g<s.length;g++)s[g].startTime=s[g-1].startTime+s[g-1].duration}},e.prototype.z=function(){return this.d.serviceManager.get(o.ServiceName.SourceStoreService,this.e.sourceIdentifier)},e.prototype.A=function(e,t){for(var n=-1,i=this.getSegmentListEntries(t),r=i.length-1;r>=0;r--)if((0,S.isIdenticalSegmentInfo)(i[r],e)){n=r;break}return n},e.prototype.B=function(e){var t,n=this,i=null===(t=this.m)||void 0===t?void 0:t.getAdaptationSet(e);i&&i.Representation.forEach((function(e){var t=n.o[e._internalId.key()];if(t||(t=n.F(e._internalId.key())),e.hasOwnProperty("SegmentList")&&(n.u(t,e),f.ModuleManager.has(p.ModuleName.DASH))){var i=f.ModuleManager.get(p.ModuleName.DASH).initSegmentInfoSourceDetectors.isInitializationNode;if(!t.hasOwnProperty("init")&&e.hasOwnProperty("SegmentBase")&&e.SegmentBase&&i(e.SegmentBase[0])){var r=f.ModuleManager.get(p.ModuleName.DASH).initSegmentInfoProviders.provideSegmentInfoFromInitializationNodeProperty;t.init=r(e.SegmentBase[0],e)}}}))},e.prototype.C=function(){var e,t,n=this,i=null===(e=this.d.serviceManager.get(o.ServiceName.SourceStoreService,this.e.sourceIdentifier).getState().activeTracks)||void 0===e?void 0:e[this.j.adaptationSetId];if((null===(t=null==i?void 0:i.selectedRepresentationId)||void 0===t?void 0:t.periodId)===this.j.periodId)return i.selectedRepresentationId;if(this.i){var r=this.m.getRepresentation(this.j,this.i.representationId);if(r)return r._internalId}return(this.D((function(e){return n.isSegmentInfoLoaded(e._internalId)}))||this.D())._internalId},e.prototype.D=function(e){return this.m.getMatchingRepresentationByBandwidth(this.j,this.G(),e)},e.prototype.E=function(){var e=this.j.equals(this.i),t=!this.i||Boolean(this.m.getRepresentationById(this.i));return!this.i||!e||!t},e.prototype.setAdaptationSetId=function(e){this.j=e,this.B(this.j);var t,n=this.m.isLive(),i=0;this.E()&&(this.i=this.C());var r=this.o[this.i.key()];if(r||(r=this.F(this.i.key())),r&&n&&r.entries&&r.entries.length>0){var o=r.entries.length-1;this.h>o&&(i=this.h-o),this.h=Math.min(o,this.h||0),this.h=Math.max(0,this.h),t=r.entries[this.h]}if(this.h=this.h||0,n&&(this.l=this.getSegmentDuration()*this.g.LIVE_SEGMENT_LIST_START_INDEX_OFFSET),n){if(t&&r){var a=this.A(t,this.i);a>=0?this.h=a+i:this.I()}else this.I();var s=this.H();s?this.U(s):this.resolvePendingSegmentInfoRequests()}else this.resolvePendingSegmentInfoRequests()},e.prototype.F=function(e){var t={totalDuration:0,entries:[],SegmentURL:[],startNumber:0,init:null,maximumSegmentDuration:1,timescale:1};return this.o[e]=t,t},e.prototype.G=function(){var e=0,t=this.lb();return t&&(e=t._bandwidth),e},e.prototype.H=function(){var e;if(this.m.isHlsManifest()){var t=this.m.getRepresentationById(this.i);if(null===(e=null==t?void 0:t._hls)||void 0===e?void 0:e.loadFailureReason)return t._hls.loadFailureReason}return this.hasNext()||this.m.isLastPeriod(this.i.periodId)?null:h.SegmentInfoError.PERIOD_COMPLETE},e.prototype.I=function(){this.g.ENABLE_SEEK_FOR_LIVE?this.h=0:this.timeShift(0)},e.prototype.J=function(e,t){var n,i,r=this.m.getRepresentationById(e),o=this.m.getRepresentationById(t),a=(0,c.isNumber)(null===(n=null==o?void 0:o._hls)||void 0===n?void 0:n.mediaSequence)&&(0,c.isNumber)(null===(i=null==r?void 0:r._hls)||void 0===i?void 0:i.mediaSequence);if(r&&o&&a){var s=o._hls.mediaSequence-r._hls.mediaSequence,l=this.getSegmentListEntries(e),d=this.getSegmentListEntries(t);s>=l.length||(d[0].startTime=l[s].startTime,(0,u.forEachFromIndex)(d,1,(function(e,t){(0,c.isNumber)(e.startTime)&&(0,c.isNumber)(e.duration)&&(t.startTime=e.startTime+e.duration)})))}},e.prototype.setRepresentationId=function(e){var t=this.m.getRepresentationById(e),n=this.getSegmentListEntries(this.i)[this.h];if(t){var i=void 0===this.i,r=this.i;if(this.i=e,this.m.isLive()&&t._hls)if(this.g.HLS_SYNC_SEGMENT_PLAYBACK_TIME_VIA_MEDIA_SEQUENCE&&this.J(r,this.i),i)this.I();else if(this.g.HLS_SYNC_VIA_MEDIA_SEQUENCE){var o=this.m.getRepresentationById(r)._hls.mediaSequence+this.h;this.h=o-t._hls.mediaSequence,this.h=Math.max(this.h,0)}else if(null!=(null==n?void 0:n.startTime)&&!isNaN(n.startTime)){var a=this.pb(n.startTime);null===a||isNaN(a)||(this.h=this.K(a,n.startTime))}return!0}return!1},e.prototype.K=function(e,t){var n=this.getSegmentListEntries(this.i),i=[n[e],n[e+1]];if(e===n.length-1||i.some((function(e){return!e.startTime})))return e;var r=i.map((function(e){return Math.abs(e.startTime-t)})),o=Math.min.apply(this,r);return e+r.indexOf(o)},e.prototype.getInitSegmentInfo=function(){var e=this.mb(this.i);if(null==e?void 0:e.init)return e.init.presentationTimeOffset=this.getTimestampOffset(),e.init;var t=this.getSegmentListEntries(this.i);if(this.R(t)&&this.h>-1){var n=i({},t[this.h]);if(n.init){var r=n.init;return r.isInitSegment=!0,r}}return null},e.prototype.L=function(e){var t;if(!(this.getSegmentListEntries(this.i).length<1||this.h<0)){var n=this.M(e);return n&&this.f.debug("".concat(null===(t=this.j)||void 0===t?void 0:t.adaptationSetId," given time ").concat(e," matches seek time, performing precise segment/part search"),e),(0,v.isPlayingLowLatencyHls)(this.d)&&this.N(e,n),this.O(e,n)}},e.prototype.M=function(e){var t;return e===(null===(t=this.p)||void 0===t?void 0:t.targetPlaybackTime)||!1},e.prototype.N=function(e,t){var n;if(0!==e){if(this.h=this.pb(e),!t){var i=this.getSegmentListEntries(this.i),r=i[this.h];if(!(r.parts&&r.parts.length>0)){var o=this.h;this.h=b(e,this.h,i),this.h!==o&&this.f.debug("Snapped segment index for time ".concat(e," to next segment boundary at ").concat(null===(n=i[this.h])||void 0===n?void 0:n.startTime))}}}else this.d.logger.debug("Ignoring target time of 0 for LL-HLS")},e.prototype.O=function(e,t){var n=this.getSegmentListEntries(this.i);if(this.R(n)){var i=n[this.h];if(!(i.parts&&i.parts.length>0))return this.Q();if(_(i))return R(i,e,t);var r=R(i,e,t);return r?i.parts.indexOf(r)>0?r:this.Q():(this.h++,this.O(e,t))}},e.prototype.getNextSegmentInfo=function(e){var t=this.L(e);return t?(this.P(t),Promise.resolve(t)):this.T({time:e})},e.prototype.P=function(e){return e.presentationTimeOffset=this.getTimestampOffset(),e.startTime&&(e.wallClockTime=(0,d.toMilliSeconds)(e.startTime)),e},e.prototype.Q=function(){return this.getSegmentListEntries(this.i)[this.h++]},e.prototype.getSegmentInfos=function(){var e=this,t={},n=this.m.getAdaptationSet(this.j);return n&&n.Representation.forEach((function(n){var i=e.getSegmentListEntries(n._internalId);t[n._id]=i.map((function(e){return{url:e.url,duration:e.duration,startTime:e.startTime}}))})),t},e.prototype.getSubtitleUrl=function(){return this.m.getAvailableSubtitles(this.j.periodId)[0].url},e.prototype.getStartNumber=function(){var e=this.mb(this.i);return e?e.startNumber:1},e.prototype.getSegmentDuration=function(){var e=this,t=this.mb(this.i),n=this.getSegmentListEntries(this.i);if(t)return n.length>0&&(0,c.isNumber)(t.totalDuration)?t.totalDuration/n.length:t.maximumSegmentDuration;if(this.m.getAdaptationSet(this.j)){var i=Object.keys(this.o).map((function(t){return e.o[t]})).find((function(e){return null!==e}));if(i)return i.maximumSegmentDuration}return 1},e.prototype.seekTo=function(e){e>-1&&(this.h=this.pb(e))},e.prototype.R=function(e){return this.h<e.length},e.prototype.hasNext=function(){var e=this.getSegmentListEntries(this.i);return!this.i||!e.length||(this.m.isLive()?this.S(e):this.R(e))},e.prototype.S=function(e){return!!this.m.isLastPeriod(this.i.periodId)||this.R(e)},e.prototype.setTimestampOffset=function(e,t){void 0===t&&(t=1),this.n=e/t},e.prototype.getTimestampOffset=function(){if(!isNaN(this.n))return this.n;var e=this.Z(),t=0;if(this.i){var n=this.mb(this.i);n&&!isNaN(n.presentationTimeOffset)&&(t=n.presentationTimeOffset/n.timescale)}return e&&!this.m.isHlsManifest()&&(t-=e.start),t},e.prototype.getIndex=function(){return this.h},e.prototype.setIndex=function(e){if("number"==typeof e)return e<0?(this.f.debug("Tried to set index at MPDHandler to value smaller 0. Setting to 0."),void(this.h=0)):void(this.h=e);this.f.debug("Tried to set index at MPDHandler with parameter not being a number!")},e.prototype.T=function(e){var t,n=this;if(this.k)return Promise.reject("fail");var r=this.m.getRepresentationById(this.i);return(null===(t=null==r?void 0:r._hls)||void 0===t?void 0:t.loadFailureReason)?Promise.reject(r._hls.loadFailureReason):(this.f.debug("No segment info was found for the target time. Waiting for representation update."),new Promise((function(t,r){n.k=i(i({},e),{resolve:t,reject:r})})))},e.prototype.resolvePendingSegmentInfoRequests=function(){if(this.k){var e=this.L(this.k.time);e?(this.P(e),this.k.resolve(e),this.k=null):this.m.isLive()||this.hasNext()||this.k.reject(h.SegmentInfoError.END_OF_STREAM_REACHED)}},e.prototype.U=function(e){this.k&&(this.k.reject(e),this.k=null)},e.prototype.V=function(){var e=this.getSegmentListEntries(this.i);return e.length>0?e.length-1:0},e.prototype.W=function(e){for(var t,n=Math.abs(e),i=this.getSegmentDuration(),r=this.getSegmentListEntries(this.i),o=this.V(),a=0,s=r.length-1;s>=0&&!((a+=null!==(t=r[s].duration)&&void 0!==t?t:i)>=n);s--)o--;return Math.max(0,o)},e.prototype.timeShift=function(e,t,n){if(this.m.isLive()){var i=this.h;this.h=n&&this.X()?this.pb(n):this.W(e),this.f.debug("timeShift changes index from ".concat(i," to ").concat(this.h,", based on")+" offset ".concat(e," and target time ").concat(n))}},e.prototype.X=function(){var e,t=null===(e=this.getSegmentListEntries(this.i)[0])||void 0===e?void 0:e.startTime;return(0,c.isNumber)(t)&&t>=0},e.prototype.updateRepresentation=function(e){return Promise.resolve(e)},e.prototype.isSegmentInfoLoaded=function(e){if(void 0===e&&(e=this.i),!e)return!1;var t=this.getSegmentListEntries(e),n=this.m.getRepresentationById(e);return!(!t.length||!n)},e.prototype.Y=function(e){this.f.debug("Rewinding segment list index by ".concat(e," segments")),this.h-=e,this.h<0&&(this.f.debug("List array index is smaller than 0, probably a discontinuity. Using 0."),this.h=0)},e.prototype.rewindOneSegment=function(){return this.h--,!(this.h<0&&(this.f.debug("List array index is smaller than 0, probably a discontinuity. Using 0."),this.h=0,1))},e.prototype.Z=function(){return this.m.getPeriod(this.i)},e.prototype.kb=function(e){var t=this.Z().start;return(this.m.hasSinglePeriod()?this.getSeekableRange().start:t)+this.getSegmentListEntries(this.i).slice(0,e).reduce((function(e,t){return e+t.duration}),0)},e.prototype.lb=function(){return this.m.getRepresentationById(this.i)},e.prototype.mb=function(e){if(e)return this.o[e.key()]},e.prototype.getSegmentListEntries=function(e){var t,n;return e?this.g.ENABLE_SEGMENT_INFO_PROVIDER_FROM_STORE&&this.m.isHlsManifest()?this.nb(e):null!==(n=null===(t=this.mb(e))||void 0===t?void 0:t.entries)&&void 0!==n?n:[]:[]},e.prototype.nb=function(e){var t,n=null===(t=this.z())||void 0===t?void 0:t.getState();return(0,g.getSegmentInfos)(n,e.key())},e.prototype.ob=function(e,t){var n,i;if(!this.j)return 0;for(var r=this.m.getPeriod(this.j),o=null!==(n=null==r?void 0:r.start)&&void 0!==n?n:0,a=this.getSegmentListEntries(this.i),s=0,u=o;u<=t&&s<a.length;s++)u+=null!==(i=a[s].duration)&&void 0!==i?i:0;return Math.max(s-1,0)},e.prototype.pb=function(e){var t,n,i=this.mb(this.i),r=this.getSegmentListEntries(this.i);if(!i||0===r.length||!(0,c.isNumber)(i.totalDuration))return 0;var o=this.qb(),a=(null===(t=this.m)||void 0===t?void 0:t.isFirstPeriod(null===(n=this.i)||void 0===n?void 0:n.periodId))?o+this.l:o,s=Math.max(a,e),u=i.totalDuration/r.length,l=(0,E.findSegmentIndexForTime)(r,s,u);return null!==l?l:this.ob(i,s)},e.prototype.qb=function(e){var t,n;void 0===e&&(e=this.i);var i=null===(n=null===(t=this.m)||void 0===t?void 0:t.getPeriod(e))||void 0===n?void 0:n.start;return void 0!==i?i:(this.f.debug("Unexpected period start of undefined for period ".concat(e.periodId,", falling back to 0")),0)},e.prototype.getLiveEdgeTime=function(){var e,t,n,i=null===(e=this.m)||void 0===e?void 0:e.getLastPeriod();if(void 0===(null==i?void 0:i.start))return 1/0;var r=null!==(t=this.rb())&&void 0!==t?t:l.DurationConverter.getDurationInSec(null!==(n=i._duration)&&void 0!==n?n:"");return i.start+r},e.prototype.rb=function(){var e;return null===(e=this.mb(this.i))||void 0===e?void 0:e.totalDuration},e.prototype.getActualTimeShiftBufferDepth=function(){return this.m.getTimeShiftBufferDepthSeconds()},e.prototype.getSeekableRange=function(){var e={start:0,end:0},t=this.m.getTotalDuration();if(!this.m.isLive())return e.start=(0,a.getStartTimeOffset)(this.z().getState()),e.end=t,e;var n=this.m.getTimeShiftBufferDepthSeconds(),i=(0,d.toSeconds)(this.m.getRequestTimestamp()-this.m.getAvailabilityStartTime());if(e.start=Math.max(i+n,0),e.end=Math.max(i,0),f.ModuleManager.has(p.ModuleName.HLS)&&this.m.isHlsManifest()){var r=f.ModuleManager.get(p.ModuleName.HLS).selectors,o=r.getHlsState;"EVENT"===(0,r.getPlaylistType)(o(this.z().getState()))?(e.start=0,e.end=t):e.start+=this.l}return e.end-=this.m.getDesiredDistanceToLiveEdge(),e},e.prototype.getPendingSegmentInfoRequest=function(){return this.k},e.prototype.setPendingSegmentInfoRequest=function(e){this.k=e},e.prototype.canSwitchRepresentation=function(e){var t,n=this.getSegmentListEntries(this.i)[this.h];if(!n)return!0;var i=function(e,t,n){return void 0!==t.startTime&&void 0!==t.duration&&Math.abs(e-(t.startTime+t.duration))<n}(e,n,this.g.LL_HLS_SEGMENT_END_TIME_MATCHING_TOLERANCE);if(!_(n)&&i)return!0;var r=this.M(e);return!((null===(t=null==n?void 0:n.parts)||void 0===t?void 0:t.length)&&R(n,e,r)!==n.parts[0])},e.prototype.getLatestTimeForPossibleSwitch=function(e){var t,n=this.sb(e),i=n.isLoadingCurrentSegmentsParts,r=n.currentSegment;return r&&i&&null!==(t=r.startTime)&&void 0!==t?t:e},e.prototype.adjustTimeToNextSegmentStart=function(e){var t=this.sb(e),n=t.isLoadingCurrentSegmentsParts,i=t.currentSegment;return n&&(null==i?void 0:i.startTime)&&(null==i?void 0:i.duration)?i.startTime+i.duration:e},e.prototype.sb=function(e){var t,n=function(e,t){var n,i,r;if(t&&!(t.length<1)&&(null===(n=t[0])||void 0===n?void 0:n.duration)){var o=(0,E.findSegmentIndexForTime)(t,e,t[0].duration),a=null===o,s=e<(null!==(r=null===(i=t[0])||void 0===i?void 0:i.startTime)&&void 0!==r?r:1/0),u=t[t.length-1];if(void 0!==u.startTime&&void 0!==u.duration){var l=e>u.startTime+u.duration;if(!(a||s||l))return t[o]}}}(e,this.getSegmentListEntries(this.i)),i=null===(t=null==n?void 0:n.parts)||void 0===t?void 0:t[0],r=this.M(e),o=!1;if(i&&n){var a=R(n,e,r);o=void 0!==a&&a!==i}return{currentSegment:n,isLoadingCurrentSegmentsParts:o}},e.prototype.dispose=function(){this.g=null,this.m=null,this.j=null,this.i=null,this.m=null,this.k=null,this.o=null},e}();function y(e,t){var n=e[String(t)];return n&&n.startTime>0?n.startTime:(n=e[String(t-1)])&&n.endTime>0?n.endTime:null}function T(e,t,n){var i;e.length&&n.hasSegmentStartTimeForHlsRepresentation(t)&&(null!=e[0].startTime?i=(0,u.findIndexFromEnd)(e,(function(e){return null!=e.startTime}))+1:(e[0].startTime=n.getStartTimeForHlsSegment(t,e[0]),i=1),(0,u.forEachFromIndex)(e,i,(function(e,t){return t.startTime=e.startTime+e.duration})))}function _(e){return e.url.endsWith(t.PHANTOM_SEGMENT_URL)}function O(e,n){var i=n.duration-e.duration;return I(n,e,["url","mediaURL","duration","parts","init","key","discontinuitySequenceNumber","isDiscontinuityStart"]),!e.url.endsWith(t.PHANTOM_SEGMENT_URL)&&(e.url=(0,s.forceReallocation)(e.url)),i}
19function I(e,t,n){n.forEach((function(n){return t[n]=e[n]}))}function R(e,t,n){var i,r=null===(i=e.parts)||void 0===i?void 0:i.every(E.isSegmentTiming);if(e.parts&&r){var o=e.parts,a=o.reduce((function(e,t){return e+t.duration}),0)/o.length,s=(0,E.findSegmentIndexForTime)(o,t,a);if(null!=s)return n?e.parts[0]:(s=b(t,s,o),e.parts[s])}}function b(e,t,n){var i=n[t],r=i.startTime+i.duration;return Math.abs(e-i.startTime)<=Math.abs(e-r)?t:t+1}t.SegmentListMPDHandler=m},827:function(e,t){function n(e){return[e.url,e.mediaURL].filter(Boolean)}function i(e,t){return null==e?null==t:null!=t&&e.start===t.start&&e.end===t.end}Object.defineProperty(t,"__esModule",{value:!0}),t.isIdenticalSegmentInfo=function(e,t){if(void 0!==e.mediaSequence&&void 0!==t.mediaSequence)return e.mediaSequence===t.mediaSequence;var r=function(e,t){var i=n(e),r=n(t);return i.some((function(e){return r.includes(e)}))}(e,t),o=i(e.byteRange,t.byteRange),a=e.discontinuitySequenceNumber===t.discontinuitySequenceNumber;return r&&o&&a},t.isIdenticalInitSegmentInfo=function(e,t){var n=(null==e?void 0:e.url)===(null==t?void 0:t.url),r=i(null==e?void 0:e.byteRange,null==t?void 0:t.byteRange);return n&&r}},2498:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getMostRecentlyRefreshedQuality=t.getSegmentInfos=t.getSegmentMapEntry=void 0,t.getSegmentMapEntry=function(e,t){return null==e?void 0:e.segmentInfoMap[t]},t.getSegmentInfos=function(e,n){var i,r;return null!==(r=null===(i=(0,t.getSegmentMapEntry)(e,n))||void 0===i?void 0:i.segmentInfos)&&void 0!==r?r:[]},t.getMostRecentlyRefreshedQuality=function(e){if(e)return Object.values(e.segmentInfoMap).filter((function(e){return null!=e.qualityInfo.lastUpdateTimestamp})).sort((function(e,t){var n=e.qualityInfo.lastUpdateTimestamp;return t.qualityInfo.lastUpdateTimestamp-n}))[0]}},962:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isLowLatencyConfigured=function(e){var t=e.serviceManager.get(i.ServiceName.LiveLatencyService);return(null==t?void 0:t.isConfigured())||!1};var i=n(813)},729:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isPlayingLowLatencyHls=function(e){var t;if(!(0,a.isLowLatencyConfigured)(e)||!e.settings.LL_HLS)return!1;var n=(0,i.getSourceState)(e);if(!n)return!1;var s=r.ModuleManager.get(o.ModuleName.HLS,!1);if(!s)return!1;var u=s.selectors,l=u.getHlsState,d=u.getIsLowLatencyPlaylist,c=l(n);return!!c&&null!==(t=d(c))&&void 0!==t&&t};var i=n(5971),r=n(8052),o=n(2756),a=n(962)},8041:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.installWorkerPolyfills=function(){Array.prototype.includes||i.ArrayIncludesPolyfill.polyfill(),String.prototype.includes||o.StringIncludesPolyfill.polyfill(),String.prototype.startsWith||a.StringStartsWithPolyfill.polyfill(),String.prototype.endsWith||r.StringEndsWithPolyfill.polyfill()};var i=n(4499),r=n(3878),o=n(4205),a=n(829)}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports}!function(){n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}}(),function(){n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),n(6110)}();',d.p+"ac3121a55122bc6ac206.worker.js")}},16661:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.CodecDetector=void 0,u.extractCodecFromTsSegment=_,u.extractCodecFromMp4Segment=E,u.mergeSegmentCodecs=T,u.isFmp4Segment=w;var p=d(66790),h=d(3336),f=d(4129),m=d(74853),g=d(58313),v=d(88052),y=d(62756),b=d(95880),S=d(18146);function _(c,u){if(!v.ModuleManager.has(y.ModuleName.ContainerTS))return Promise.reject(new b.PlayerModuleMissingError(y.ModuleName.ContainerTS));var d=new(v.ModuleManager.get(y.ModuleName.ContainerTS)).WebWorkerTransmuxer(u,!1);return d.transmuxSegment(c).then(function(u){var d=T(u.transmuxedSegments);if(!d)throw"couldn't detect codec for ".concat(c.getMimeType());return d}).finally(function(){d.dispose()})}function E(c){if(!v.ModuleManager.has(y.ModuleName.ContainerMP4))return Promise.reject(new b.PlayerModuleMissingError(y.ModuleName.ContainerMP4));var u=v.ModuleManager.get(y.ModuleName.ContainerMP4).getCodecFromSegment(c);return u?Promise.resolve(u):Promise.reject("couldn't detect codec for ".concat(c.getMimeType()))}function T(c){for(var u="",d=0;d<c.length;d++){var p=c[d];if(!p.getCodec())return null;u+=(""===u?"":",")+p.getCodec()}return u}function w(c){for(var u=c.getData(),d=new DataView(u,0,u.byteLength),p=[],h=0;
19h+8<d.byteLength;){var f=d.getUint32(h);if(0===f)break;var g=m.ArrayHelper.extractAsciiString(d,h+4,4);p.push(g),h+=f}return c.isInit()?["ftyp","moov"].every(function(c){return p.includes(c)}):["moof","mdat"].every(function(c){return p.includes(c)})}u.CodecDetector=function(){function c(c,u){this.qP=c,this.rP=u,this.sP=new f.DefaultContentLoader(this.qP)}return c.prototype.tP=function(c){var u;return this.qP.segmentPrefetchingService?null!=(u=this.qP.segmentPrefetchingService.getPrefetchedSegment(c,this.rP))?u:this.qP.segmentPrefetchingService.fetch(c,this.rP):Promise.reject()},c.prototype.probeCodecs=function(c,u,d,f,m){var v=this;void 0===m&&(m=u?c.length-1:0);var y=c.slice(),b=u?y.pop():y.shift();if(!b)return Promise.reject(Error("Could not load any segment"));var _,E=b.init,T=void 0!==E,w=(0,g.extractOrigin)(d),P=g.URLHelper.buildAbsoluteUrl(d,w,T?E.url:b.uri),A=function(c,u,d,p){for(var h,f=0;f<c.length;f++){var m=c[f];h=(0,S.generateSegmentEncryptionInfo)(m,u,d,p)}return h}((T?E.keys:b.keys)??[],d,w,f+m);(null==A?void 0:A.method)===p.HlsEncryptionMethod.AES_128&&(_=A);var I={url:P,key:_,byteRange:(0,S.parseSegmentByteRange)(b.byterange),mimeType:"unknown/mp4",internalRepresentationId:null,isInitSegment:!!b.init,preventDownloadCanceling:!0};return this.tP(I).then(function(c){return v.uP(c)}).catch(function(c){if(c instanceof h.PlayerError)return Promise.reject(c);v.qP.logger.debug("Codec probing from segment failed",c);var p=u?m-1:m+1;return v.probeCodecs(y,u,d,f,p)}).then(function(c){return v.qP.logger.debug("Probed codec is",c),c})},c.prototype.uP=function(c){return w(c)?E(c):_(c,this.qP)},c}()},8251:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.DiscontinuitySequenceNumberTracker=void 0,u.DiscontinuitySequenceNumberTracker=function(){function c(c){this.Kn=c,this.Mn=[],this.reset()}return c.prototype.Nn=function(c){var u=this;this.Mn.forEach(function(d){return d(u.Ln,c)})},c.prototype.trackSegment=function(c){if(this.Kn(c.getMimeType())&&!c.isInit()){var u=c.getSegmentInfo(),d=null==u?void 0:u.discontinuitySequenceNumber,p=isFinite(this.Ln),h=this.Ln!==d;p&&h&&this.Nn(d),this.Ln=d}},c.prototype.subscribe=function(c){this.Mn.push(c)},c.prototype.unsubscribe=function(c){var u=this.Mn.indexOf(c);u<0||this.Mn.splice(u,1)},c.prototype.reset=function(){this.Ln=-1/0},c.prototype.dispose=function(){this.reset(),this.Mn=[]},c}()},15617:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.HlsBackupStreamsHandler=u.BackupStreamErrors=void 0,u.getLocationIdForRep=I;var f,m=d(80813),g=d(3714),v=d(43446),y=d(15971),b=d(85434),S=d(15014),_=d(14302),E=d(59707),T=d(62198),w=d(90919),P=d(18146),A=d(73315);function I(c,u){var d,p;if(c)return M(null!=(p=null==(d=u[c._mimeType])?void 0:d[c._id])?p:{},c.Uri)}function M(c,u){return Object.keys(c).find(function(d){return Object.values(c[d]).includes(u)})}function R(c,u){var d={},p=[];for(var h in c){var f=c[h][u];p.includes(f)||(p.push(f),d[h]=c[h])}return d}(p=f||(u.BackupStreamErrors=f={})).ALL_PENALIZED="ALL_PENALIZED",p.LOADING_FAILED="LOADING_FAILED",p.NO_BACKUP_STREAMS="NO_BACKUP_STREAMS",u.HlsBackupStreamsHandler=function(){function c(c,u,d){this.context=c,this.backupStreamInfo=u,this.updateRepresentation=d,this.backupStreamsMap={}
19,this.penalizedStreams={},this.vP=!1,this.wP=!1,this.xP=c.serviceManager.get(m.ServiceName.ManifestService,c.sourceContext.sourceIdentifier),this.yP=this.context.serviceManager.get(m.ServiceName.ManifestUpdateSchedulingService,this.context.sourceContext.sourceIdentifier)}return c.prototype.populateBackupStreamsMap=function(c){this.backupStreamsMap=(u=this.backupStreamInfo,(d={})[b.MimeType.AudioMp4]={},d[b.MimeType.VideoMp4]={},p=d,c.forEach(function(c){var d,h=c._mimeType===b.MimeType.AudioMp4?null!=(d=c._name)?d:b.MimeType.AudioMp4:b.MimeType.VideoMp4,f=u.find(function(u){return Object.values(u).find(function(u){return u[h]===c.Uri})});f&&(p[c._mimeType][c._id]=R(f,h))}),p);var u,d,p,h,f,m=I(null!=(h=c.find(function(c){return b.MimeTypeHelper.isVideo(c._mimeType)}))?h:c[0],this.backupStreamsMap);void 0!==m&&(this.context.logger.debug("Setting initial content location ID to ".concat(m)),null==(f=(0,y.getSourceStore)(this.context))||f.dispatch((0,A.setContentLocationId)(m)))},c.prototype.isCurrentlySwitchingToBackupStreams=function(){return this.wP},c.prototype.signalLoadingFinished=function(){this.vP=!0},c.prototype.switchToBackupStream=function(c,u){var d,p,h=this,m=null!=(p=null==(d=this.backupStreamsMap[c._mimeType])?void 0:d[c._id])?p:{};if(Object.keys(m).length<=1)return Promise.reject(f.NO_BACKUP_STREAMS);var v=this.getCurrentRepresentation(c._mimeType),b=(null==v?void 0:v._id)===c._id&&(null==v?void 0:v.Uri)!==c.Uri,S=function(c,u){if(!u)return!0;var d,p,h=null==(p=null==(d=c.SegmentList)?void 0:d[0])?void 0:p.SegmentURL;return!!h&&-1!==(0,w.findSegmentUrlIndexWithinSegmentList)(u,h)}(c,u);if(b||!S)return this.context.logger.debug("Ignoring outdated failover request for ".concat(c._mimeType," rep ").concat(c._id),{hasPlaylistUriChanged:b,isSegmentInPlaylist:S}),Promise.resolve([v]);var E=M(m,c.Uri);if(void 0===E)return this.context.logger.debug("Could not find the failing rep in the current list of backup streams.",{id:c._id,uri:c.Uri,backupStreams:m}),Promise.reject(f.NO_BACKUP_STREAMS);this.AP(E),this.depenalizeExpiredStreams();var T=this.getNextLocationId(Object.keys(m),E);if(void 0===T)return this.context.logger.debug("No other backup stream is available: all penalized."),Promise.reject(f.ALL_PENALIZED);this.context.logger.debug("Starting failover from stream ".concat(E," to ").concat(T));var P=this.zP(c);return this.triggerPlaylistRotation(P,E,T).then(function(c){var u,d,p,f=M(m,null!=(d=null==(u=c[0])?void 0:u.Uri)?d:"");return h.context.logger.debug("Successfully completed failover to stream index ".concat(f)),void 0!==f&&f!==E&&(null==(p=(0,y.getSourceStore)(h.context))||p.dispatch((0,A.setContentLocationId)(String(f))),h.context.eventHandler.dispatchEvent(g.PlayerEvent.ContentLocationChanged,{sourceLocationId:E,targetLocationId:f,reason:g.ContentLocationChangedReason.Failover})),c}).catch(function(c){return c===_.REPRESENTATION_UPDATE_CANCEL?Promise.reject(c):(h.context.logger.debug("Failover from stream ".concat(E," to ").concat(T," failed")),Promise.reject(f.LOADING_FAILED))})},c.prototype.zP=function(c){var u=[c],d=c._mimeType===b.MimeType.AudioMp4?this.getCurrentRepresentation(b.MimeType.VideoMp4):this.getCurrentRepresentation(b.MimeType.AudioMp4);return d&&this.vP&&u.push(d),u},c.prototype.AP=function(c){this.context.logger.debug("Penalizing stream ".concat(c," for ").concat(this.context.settings.HLS_BACKUP_STREAM_PENALTY_DURATION,"s")),this.penalizedStream
19s[c]=v.TimingUtil.getHiResTimestamp()},c.prototype.depenalizeExpiredStreams=function(){var c=this,u=v.TimingUtil.getHiResTimestamp();Object.keys(this.penalizedStreams).forEach(function(d){u-c.penalizedStreams[d]>=c.context.settings.HLS_BACKUP_STREAM_PENALTY_DURATION&&(c.context.logger.debug("Depenalizing stream ".concat(d)),delete c.penalizedStreams[d])})},c.prototype.triggerPlaylistRotation=function(c,u,d){var p=this,h=c.map(function(c){return p.BP(c,d).catch(function(d){var h;return d!==_.REPRESENTATION_UPDATE_CANCEL&&(p.context.logger.debug("Failed to rotate URL for rep ".concat(c._id,": ").concat(null!=(h=null==d?void 0:d.message)?h:d)),p.CP(c,u)),Promise.reject(d)})});return this.wP=!0,Promise.all(h).finally(function(){return p.wP=!1})},c.prototype.BP=function(c,u){var d=this,p=(0,y.getSourceStore)(this.context);if(!p)return Promise.resolve(c);this.FP(c,u,p);var h=(0,T.getManifest)(p.getState());if(!h)return Promise.resolve(c);var f=c._internalId,m=(0,S.findRepresentation)(h,f);return c.Uri===(null==m?void 0:m.Uri)?(this.context.logger.debug("Current ".concat(c._mimeType," rep ").concat(c._id," does not need update")),Promise.resolve(c)):(this.context.logger.debug("Rotating URL for rep ".concat(c._id," from ").concat(c.Uri," to ").concat(m.Uri)),this.DP(c).then(function(){return d.updateRepresentation(m)}).then(function(c){return d.EP(c),c}))},c.prototype.CP=function(c,u){var d=(0,y.getSourceStore)(this.context);d&&(this.FP(c,u,d),this.context.logger.debug("Restoring URL for rep ".concat(c._id," to ").concat(c.Uri)),this.EP(c))},c.prototype.DP=function(c){var u;return null!=(u=this.xP)&&u.isLive()&&this.yP?this.yP.stopRepresentationUpdates(c):Promise.resolve()},c.prototype.EP=function(c){var u,d;null!=(u=this.xP)&&u.isLive()&&(null==(d=this.yP)||d.scheduleRepresentationUpdate(c))},c.prototype.FP=function(c,u,d){var p,f=this;null==(p=this.xP)||p.getAllRepresentations().filter(function(u){return u._mimeType===c._mimeType}).forEach(function(p){var m,g,v,y,b=null!=(g=null==(m=f.backupStreamsMap[p._mimeType])?void 0:m[p._id])?g:{},S=null!=(v=p._name)?v:p._mimeType,_=null==(y=b[u])?void 0:y[S];if(_&&p.Uri!==_){var w,A,I,M,R,k,x,C=h(h({},p),{Uri:_,BaseURL:[{url:(w=_,x=(A=d.getState())&&null!=(k=null==(R=null==(M=null==(I=(0,T.getManifest)(A))?void 0:I.BaseURL)?void 0:M[0])?void 0:R.url)?k:"",P.PlaylistUtils.getBaseUrl(x,w))}],SegmentList:p.SegmentList?[h(h({},p.SegmentList[0]),{SegmentURL:[]})]:p.SegmentList,_requestTimestamp:p._id!==c._id?0:p._requestTimestamp});d.dispatch((0,E.updateRepresentationAction)(C))}})},c.prototype.getNextLocationId=function(c,u){for(var d=Number(u)||0,p=1;p<=c.length;p++){var h=(d+p)%c.length;
19if(void 0===this.penalizedStreams[h])return String(h)}},c.prototype.getCurrentRepresentation=function(c){var u,d,p=this.context.serviceManager.get(m.ServiceName.AdaptationService),h=null!=(u=null==p?void 0:p.getCurrentRepresentationId(c))?u:void 0;return null==(d=this.xP)?void 0:d.getRepresentationById(h)},c.prototype.getNextBackupUriForCodecProbing=function(c){var u,d,p,h,f,m=function(u){return Object.keys(u).find(function(d){return u[d]===c})},g=null!=(u=this.backupStreamInfo.find(function(c){return Object.values(c).some(m)}))?u:{},v=null!=(d=Object.keys(g).find(function(c){return m(g[c])}))?d:"",y=null!=(p=g[v])?p:{},b=null!=(h=Object.keys(y).find(function(u){return y[u]===c}))?h:"",S=R(g,b),_=Object.keys(S),E=_.indexOf(v);return null==(f=S[_[E+1]])?void 0:f[b]},c.prototype.dispose=function(){this.penalizedStreams={}},c}()},40870:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.HlsContentSteeringHandler=void 0;var f=d(40306),m=d(3336),g=d(3714),v=d(4129),y=d(77401),b=d(29669),S=d(15971),_=d(85434),E=d(89927),T=d(88844),w=d(58313),P=d(15617),A=d(23483),I=d(73315),M=d(61895);u.HlsContentSteeringHandler=function(c){function u(u,d,p,h){var g,S=c.call(this,u,d,p)||this;if(S.context=u,S.backupStreamInfo=d,S.updateRepresentation=p,S.defaultContentSteeringInfo=h,S.qQ=function(){var c,u=null==(c=S.context.sourceContext.source.options)?void 0:c.manifestWithCredentials;S.oQ.load(S.mQ,b.HttpRequestMethod.GET,void 0,void 0,void 0,u).then(function(c){return S.rQ(c)}).catch(function(c){var u;(null==c?void 0:c.message)===y.RequestError.Canceled||S.context.isDisposed||(S.context.logger.debug("Loading of the steering manifest failed",null!=(u=null==c?void 0:c.message)?u:c),S.pQ())})},S.mQ=null==(g=S.defaultContentSteeringInfo.attributes)?void 0:g["SERVER-URI"],!S.mQ)throw new m.PlayerError(f.ErrorCode.SOURCE_MANIFEST_INVALID,{message:"The EXT-X-CONTENT-STEERING tag is missing the required SERVER-URI attribute."},"Invalid HLS manifest: missing required content steering SERVER-URI attribute.",S.context.sourceContext.sourceIdentifier);return S.oQ=new v.DefaultContentLoader(S.context,{maxRetries:S.context.settings.MAX_MPD_RETRIES,requestType:b.HttpRequestType.MANIFEST_STEERING,resetRetriesWhenOffline:!0}),S.lQ=2e3,S}return h(u,c),u.prototype.populateBackupStreamsMap=function(u){c.prototype.populateBackupStreamsMap.call(this,u),this.pQ()},u.prototype.pQ=function(){(0,T.clearTimeoutIfDefined)(this.kQ),this.kQ=window.setTimeout(this.qQ,this.lQ)},u.prototype.rQ=function(c){if(!this.context.isDisposed){var u=(0,A.parseSteeringManifest)(c.body);if(!u)return this.context.logger.debug("Ignoring invalid steering manifest"),void this.pQ();this.nQ=u["PATHWAY-PRIORITY"],this.sQ();var d=u["RELOAD-URI"];d&&(this.mQ=w.URLHelper.getAbsoluteUrl(d,c.url)),this.lQ=(0,E.toMilliSeconds)(u.TTL),this.pQ()}},u.prototype.sQ=function(){var c=this;if(this.isCurrentlySwitchingToBackupStreams())this.context.logger.debug("Cannot run content steering as HLS playlist rotation is already in progress");else{this.depenalizeExpiredStreams();var u=this.getNextLocationId([],void 0);if(u){var d=this.tQ();if(d)if(u!==d){this.context.logger.debug("Starting content steering from ".concat(d," to ").concat(u));var p=this.getCurrentRepresentation(_.MimeType.AudioMp4),h=[this.getCurrentRepresentation(_.MimeType.VideoMp4),p].filter(Boolean);0!==h.length?this.triggerPlaylistRotation(h,d,u).then(function(u){var p,h=(0,P.getLocationIdForRep)(u[0],c.backupStreamsMap);c.context.logger.debug("Successfully completed content steering to stream ".concat(h)),void 0!==h&&h!==d&&(null==(p=(0,S.getSourceStore)(c.context))||p.dispatch((0,I.setContentLocationId)(h)),c.context.eventHandler.dispatchEvent(g.PlayerEvent.ContentLocationChanged,{sourceLocationId:d,targetL
19ocationId:h,reason:g.ContentLocationChangedReason.ContentSteering}))}).catch(function(u){c.context.logger.debug("Content steering failed",u)}):this.context.logger.debug("Cannot run content steering as no active HLS representations are available")}else this.context.logger.debug("Content steering not needed as we are on the optimal pathway already");else this.context.logger.debug("Cannot run content steering as previous pathway has not been determined yet")}else this.context.logger.debug("Cannot run content steering as all streams are currently penalized")}},u.prototype.tQ=function(){var c,u=null==(c=(0,S.getSourceStore)(this.context))?void 0:c.getState(),d=u?(0,M.getHlsState)(u):void 0;return d?(0,M.getContentLocationId)(d):void 0},u.prototype.getNextLocationId=function(c,u){var d,p,h=this;return(null!=(p=null!=(d=this.nQ)?d:c)?p:[]).find(function(c){return!h.penalizedStreams[c]&&c!==u})},u.prototype.dispose=function(){(0,T.clearTimeoutIfDefined)(this.kQ),this.kQ=void 0,this.oQ.dispose(),c.prototype.dispose.call(this)},u}(P.HlsBackupStreamsHandler)},23483:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.parseSteeringManifest=function(c){if(c)try{var u=JSON.parse(c);return!function(c){if("object"!=typeof c||null===c)return!1;var u=c.VERSION,d="number"==typeof u&&Number.isInteger(u)&&u>0,p=c["PATHWAY-PRIORITY"],h=Array.isArray(p)&&p.length>0&&p.every(function(c){return"string"==typeof c}),f=c.TTL,m=c["RELOAD-URI"],g=void 0===m||"string"==typeof m&&m.length>0;return d&&h&&"number"==typeof f&&f>0&&g}(u)?void 0:u}catch{return}}},30234:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.isValidHlsPlaylist=function(c){return(0,y.isMasterPlaylist)(c)&&c.playlists.length>0||(0,y.isMediaPlaylist)(c)&&c.segments.length>0},u.getPeriod=function(c){return(0,m.getManifest)(c.getState()).Period[0]},u.parseHlsManifest=S,u.ensureMasterPlaylist=function(c,u,d){return(0,y.isMasterPlaylist)(u)?Promise.resolve(u):(c.logger.debug("HLS manifest is not a master playlist but a variant. Using master playlist template!"),S(c,["#EXTM3U","#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=0",d].join(`
20`)).then(function(c){if(!(0,y.isMasterPlaylist)(c))throw Error("Template is not of type HLS MasterPlaylist");return c}))},u.parsePlaylistInWorker=_,u.createDiscontinuitySequences=function(c,u){var d=y.PlaylistUtils.createDiscontinuitySequences(c,u);return d.forEach(function(c,u){y.PlaylistUtils.extrapolateProgramDateTime(c.segments),c.indexOfFirstSegment=0===u?0:d[u-1].indexOfLastSegment+1,c.indexOfLastSegment=c.indexOfFirstSegment+c.segments.length-1}),d},u.getTracksWithUnknownCodecs=function(c){return{audioTracksWithoutCodecs:c.media.filter(function(u){var d,p=u.attributes;if("AUDIO"!==p.TYPE||void 0===p.URI||void 0!==p.CODECS)return!1;var f=c.playlists.find(function(c){return c.attributes.AUDIO===p["GROUP-ID"]});if(void 0===f||f.uri===p.URI)return!1;var m=null==(d=f.attributes.CODECS)?void 0:d.split(",");return void 0===m||m.every(function(c){return!h.CodecStringHelper.isAudioCodec(c)})}),videoTracksWithoutCodecs:c.playlists.filter(function(c){return void 0===c.attributes.CODECS})}},u.updateMissingCodecsForPlaylists=function(c,u,d){E(u,d).forEach(function(u){var d,p,f,m;return u.attributes.CODECS=(d=u.attributes.CODECS,p=Object.keys(h.CodecStringHelper.getExtractedCodecStrings(d)),(m=Object.keys(f=h.CodecStringHelper.getExtractedCodecStrings(c)).filter(function(c){return!p.includes(c)}).map(function(c){return f[c]}).join(","))&&0!==m.length?"string"!=typeof d||0===d.length?m:d+","+m:d)})},u.findAllOrMatchingVariants=E;var p=d(69957),h=d(34047),f=d(58313),m=d(62198),g=d(50962),v=d(37432),y=d(18146),b=d(97123);function S(c,u){var d={parsePartTags:(0,g.isLowLatencyConfigured)(c)&&c.settings.LL_HLS};return(c.settings.HLS_PARSE_MANIFEST_IN_WORKER?_(u,c.logger,d):function(c,u){try{(0,p.trackPerformanceStart)("HlsPlaylist.parsePlaylist");var d=(0,v.parsePlaylist)(c,u);return(0,p.trackPerformanceEnd)("HlsPlaylist.parsePlaylist"),Promise.resolve(d)}catch(c){return Promise.reject(c)}}(u,d)).then(function(u){if("playlists"in u){var d=u.playlists.filter(function(u){return u.attributes.BANDWIDTH>=c.settings.HLS_AUDIO_ONLY_THRESHOLD_BITRATE});u.playlists=d.length?d:u.playlists}return u})}function _(c,u,d){return b.WebWorkerParser.getInstance(u).parsePlaylist(c,d)}function E(c,u){var d,p=c.playlists||[],h=p.some(function(c){return f.URLHelper.isSubUrl(u,c.uri)}),m=(c.media||[]).find(function(c){var d;return f.URLHelper.isSubUrl(u,null==(d=c.attributes)?void 0:d.URI)});if(!h&&m){var g=null==(d=m.attributes)?void 0:d["GROUP-ID"];
20if(g)return p.filter(function(c){var u,d;return(null==(u=c.attributes)?void 0:u.AUDIO)===g||(null==(d=c.attributes)?void 0:d.VIDEO)===g})}return p}},56727:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.HlsTimelineTracker=void 0;var p=d(80813),h=d(87827),f=d(15971),m=d(93204),g=d(90919),v=d(61895);function y(c,u,d,p){return{hasGap:c,gapSizeSec:u,couldHandle:d,correctedIndex:p}}function b(c){return c>=0&&isFinite(c)}function S(c,u,d){for(;c>.001;){if(d<=0)return -1;c-=u[d-1]._duration,d--}return d}function _(c,u,d){for(;c<-.001;)if(c+=u[d]._duration,++d>=u.length)return 1/0;return d}u.HlsTimelineTracker=function(){function c(c,u){var d=this;this.Vn=!1,this.On=c,this.Tn=-1,this.Pn=u,this.Qn=this.On.serviceManager.get(p.ServiceName.PlayerStateService),this.Rn=(0,m.subscribe)(this.On.store)(function(c){return(0,h.getTargetPlaybackTime)((0,h.getPlayerState)(c))},function(){return d.Un=!0},function(c){return -1!==c});var g=(0,f.getSourceStore)(this.On);g&&(this.Sn=(0,m.subscribe)(g)(function(c){return c&&(0,v.getContentLocationId)((0,v.getHlsState)(c))},function(){return d.Vn=!0},function(c,u){return c!==u}))}return c.prototype.reset=function(){this.Tn=-1,this.Vn=!1},c.prototype.isGapVerificationNeeded=function(){return this.Vn&&-1!==this.Tn},c.prototype.isSeekTargetVerificationNeeded=function(){return this.Un&&-1===this.Tn},c.prototype.trackPlaybackTime=function(c){var u,d=null==(u=c.getSegmentInfo())?void 0:u.duration,p=c.getDuration();this.Tn=c.getPlaybackTime()+Math.max(p,d??p)},c.prototype.checkForTimelineGap=function(c,u,d){if(this.Tn>=0)return this.Vn=!1,this.Wn(c,u,d);var p,h=null!=(p=this.Qn)&&p.seekingOrTimeshifting?this.Qn.targetPlaybackTime:-1;return this.Un&&h>-1?(this.Un=!1,this.Xn(h,c,u,d)):{hasGap:!1}},c.prototype.Wn=function(c,u,d){var p,h,f,m,v,E,T,w,P=(m=this.Pn,E=null==(v=c.getSegmentInfo())?void 0:v.startTime,T=c.getPlaybackTime(),void 0===E||Math.abs(T-E)>c.getDuration()+m?T:Math.min(T,E));if(p=this.Tn,h=P-this.Pn,f=P+c.getDuration(),p>=h&&p<=f)return{hasGap:!1};var A={hasGap:!1},I=c.getPlaybackTime()-this.Tn,M=u.SegmentList?u.SegmentList[0].SegmentURL:[],R=(0,g.findSegmentUrlIndexWithinSegmentList)(c.getSegmentInfo(),M),k=R>=0?R:d,x=k;return I>0?((w=b(x=S(I,M,k)))||(this.On.logger.debug("Could not handle gap on playlist switch, reached lower boundary of segment list"),x=0),A=y(!0,I,w,x)):I<0&&((w=b(x=_(I,M,k)))||(this.On.logger.debug("Could not handle gap on playlist switch, reached upper boundary of segment list"),x=M.length),A=y(!0,I,w,x)),x===k&&A.hasGap&&(this.On.logger.debug("Ignoring gap as calculated new segment index did not change"),A.hasGap=!1),A},c.prototype.Xn=function(c,u,d,p){var h=d.SegmentList?d.SegmentList[0].SegmentURL:[],f=u.getPlaybackTime(),m=u.getPlaybackTime()+u.getDuration();this.On.logger.debug("HLS seek target verification",{seekTarget:c,segmentStartTime:f,segmentEndTime:m});var v,E,T,w=(0,g.findSegmentUrlIndexWithinSegmentList)(u.getSegmentInfo(),h);return w=w>=0?w:p,c<f?((T=b(v=S(E=f-c,h,w)))||(v=0),this.On.logger.debug("Target segment starts too late, corrected segment index from ".concat(w," to ").concat(v)),y(!0,E,T,v)):c>m?((T=b(v=_(E=m-c,h,w)))||(v=h.length),this.On.logger.debug("Target segment ends too early, corrected segment index from ".concat(w," to ").concat(v)),y(!0,E,T,v)):{hasGap:!1}},c.prototype.dispose=function(){var c;null==(c=this.Sn)||c.call(this),this.Rn(),this.Vn=!1,this.Un=!1,this.Tn=-1},c}()},67113:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},h=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.M3u8DashManifest=void 0;var f=d(56481),m=d(32703),g=d(77179),v=d(74853),y=d(79721),b=d(89927),S=d(58313),_=d(70850),E=d(13422),T=d(96533),w=d(59707),P=d(62198),A=d(5671),I=d(80813),M=d(85434),R=d(52610),k=d(42594),x=d(57778),C=d(18146),O=d(47596),D=d(73315),L=d(61895);u.M3u8DashManifest=function(){function c(c,u){this.LP=-1/0,this.GP=c,this.HP=u,this.IP=new x.M3u8Translator(c,u),this.JP=1/0,this.KP=c.serviceManager.get(I.ServiceName.SourceStoreService,u.sourceIdentifier)}return c.prototype.updateBaseUrl=function(c){this.IP.updateBaseUrl(c)},c.prototype.getBaseUrl=function(){return this.IP.getBaseUrl()},c.prototype.MP=function(){return(0,L.getHlsState)(this.KP.getState())},c.prototype.findAdaptationSet=function(c){return this.getManifest().Perio
20d[0].AdaptationSet.find(function(u){var d;return u._internalId.adaptationSetId===c||(null==(d=u.ContentComponent)?void 0:d.some(function(u){return u._id===c}))})},c.prototype.createDashManifestSkeleton=function(c){var u=this.IP.createDashManifestSkeleton(c);return u=(0,E.orderAdaptationSetsByCodec)(u,(0,T.getCodecPriorities)(this.GP.config,this.HP.source)),(0,T.initializeInternalIds)(u)},c.prototype.extractBackupStreams=function(c){return this.IP.extractBackupStreams(c)},c.prototype.onMasterPlaylistAvailable=function(c){var u=this.createDashManifestSkeleton(c);this.KP.dispatch((0,w.setManifestAction)(u)),this.KP.dispatch((0,D.setDefaultLanguages)(c)),this.KP.dispatch((0,D.setCustomTags)(c)),this.KP.dispatch((0,D.setMasterPlaylistString)(c.rawString))},c.prototype.getManifest=function(){return(0,P.getManifest)(this.KP.getState())},c.prototype.getAllVariantRepresentions=function(){return this.getManifest().Period[0].AdaptationSet.filter(function(c){return M.MimeTypeHelper.isAV(c._mimeType)||M.MimeTypeHelper.isSubtitle(c._mimeType)||M.MimeTypeHelper.isImage(c._mimeType)}).flatMap(function(c){return c.Representation})},c.prototype.onMediaLoaded=function(c,u,d){var p=this;this.KP.dispatch((0,D.setMasterPlaylistString)(c)),this.KP.dispatch((0,D.setEndlist)(!!d.endList)),d.playlistType&&!(0,L.getPlaylistType)(this.MP())&&this.KP.dispatch((0,D.setPlaylistType)(d.playlistType)),void 0===(0,L.getIsLowLatencyPlaylist)(this.MP())&&this.KP.dispatch((0,D.setIsLowLatencyPlaylist)(void 0!==d.partInfo)),this.iQ(d),this.jQ(d);var h=this.getManifest().Period[0],f=this.eQ(u.Uri,h).map(function(c){return p.fQ(c,d)});return M.MimeTypeHelper.isAV(u._mimeType)&&(this.SP(d,f),this.TP(d)),f.forEach(function(c){var u=p.QP(c,d);p.RP(h,u,!d.endList),p.NP(c),p.GP.settings.ENABLE_SEGMENT_INFO_PROVIDER_FROM_STORE&&p.OP(d,c)}),this.GP.serviceManager.maybeCall(I.ServiceName.TimedMetadataService,function(c){return(0,m.extractDateRangeMetadata)(d.dateRange,d.endList?d.programDateTime:void 0,function(u){c.processDateRangeEvent(u,y.DEFAULT_PERIOD_ID)})}),f.find(function(c){return c._id===u._id})},c.prototype.NP=function(c){var u,d=null==(u=c.ContentProtection)?void 0:u.map(function(c){return{_schemeIdUri:c._schemeIdUri,pssh:[],pro:[]}}),p=this.findAdaptationSet(c._internalId.adaptationSetId);if(p&&d&&d.some(function(c){var u;return!(null!=(u=p.ContentProtection)&&u.some(function(u){return u._schemeIdUri===c._schemeIdUri}))})){var f=p.ContentProtection?(0,_.removeDuplicates)(h(h([],p.ContentProtection,!0),d,!0)):d;this.KP.dispatch((0,w.updateAdaptationSetAction)(c._internalId,{ContentProtection:f}))}},c.prototype.OP=function(c,u){var d,p,h=u._internalId.key(),f=null==(d=this.KP.getState())?void 0:d.segmentInfoMap[h];f&&(p=(0,k.updateMapEntry)(f,c,u))||(p=(0,k.createNewMapEntry)(c,u),this.PP(p,c)),this.KP.dispatch((0,A.setSegmentInfos)(h,p))},c.prototype.PP=function(c,u){var d=this.KP.getState();if(d){var p=(0,O.getStartTimeExtrapolationReferencePoint)(c,u,d);(0,O.extrapolateStartTime)(c.segmentInfos,p)}},c.prototype.QP=function(c,u){var d,p,h,f=null!=(h=null==(p=null==(d=c.SegmentList)?void 0:d[0])?void 0:p.SegmentURL)?h:[];return f.length>0&&null!=f[0]._playbackTime?(0,L.getFirstDiscoSequenceTiming)(this.MP()).startTime:u.startTime},c.prototype.RP=function(c,u,d){var p=0===c.duration?this.JP:Math.min(c.duration,this.JP);this.KP.dispatch((0,w.updatePeriodTimingAction)(y.DEFAULT_PERIOD_ID,{start:u,_start:"PT".concat(u,"S"),duration:d?1/0:p,_duration:"PT".concat(p,"S")}))},c.prototype.SP=function(c,u){var d,p,h,f,m,g=c.totalDuration,v=null!=(d=u.find(function(u){return u.Uri===c.uri}))?d:u[0],y=null==(h=null==(p=null==v?void 0:v.SegmentList)?void 0:p[0])?void 0:h.SegmentURL,b=(null!=(f=null==y?void 0:y.length)?f:0)>0&&(null==(m=null==y?void 0:y[0])?void 0:m._playbackTime)!==void 0;if(y&&b){var S=(0,R.getTimingInfoFromSegmentList)(y);g=S.totalDuration,this.KP.dispatch((0,D.setDiscoTimings)(v._mimeType,S.discoTimings))}this.JP=c.endList?Math.min(this.JP,g):g},c.prototype.TP=function(c){var u,d=!c.endList,p=(0,P.getManifest)(this.KP.getState()),h={_requestTimestamp:c.requestTimestamp,_type:d?"dynamic":"static",_mediaPresentationDuration:d?1/0:"PT".concat(this.JP,"S"),_maxSegmentDuration:"PT".concat(c.targetDuration,"S"),_hasIndependentSegments:p._hasIndependentSegments||c.independentSegments};c.start&&(c.start.timeOffset=C.PlaylistUtils.getStartOffsetCloseToPlaylistEnd(c,this.LP),this.LP=c.start.timeOffset,h._startOffset=C.PlaylistUtils.getStartOffset(c)),d&&(h._minimumUpdatePeriod="PT".concat(c.targetDuration,"S"),h._timeShiftBufferDepth=-this.JP,h._availabilityStartTime=null!=(u=p._availabilityStartTime)?u:new Date(c.requestTimestamp-(0,b.toMilliSeconds)(this.JP)).toISOString()),this.KP.dispatch((0,w.updateManifestAction)(h))},c.prototype.eQ=function(c,u){return u.AdaptationSet.flatMap(function(u){return u.Representation.filter(function(u){return S.URLHelper.isSubUrl(c,u.Uri)})})},c.prototype.fQ=function(c,u){var d=p({},c);return d._requestTimestamp=u.requestTimestamp,d._updateInterval=(0,C.calculateUpdateIntervalInSeconds)(this.GP,u),d._hls=p(p({},d._hls),{requestTimestamp:u.requestTimestamp,mediaSequence:u.mediaSequence,serverControl:u.serverControl,loadFailureReason:null}
vendor: 6,264 bytes, line 20
20),u.partInfo&&(d._hls.partTargetDuration=u.partInfo.targetDuration),d.SegmentList=[p({},d.SegmentList[0])],d.SegmentList[0].SegmentURL=h([],d.SegmentList[0].SegmentURL,!0),this.gQ(d,u),this.KP.dispatch((0,w.updateRepresentationAction)(d)),d},c.prototype.gQ=function(u,d){var p;if(0!==d.segments.length){if(u.SegmentList){this.GP.logger.debug("Updating segment list for playlist ".concat(u._id));var f=this.hQ(u,d);if(f.contentProtectionInfos.length>0){var m=c.contentProtectionToXmlJson(f.contentProtectionInfos);if((0,C.isDeltaPlaylist)(d)){var g=null!=(p=u.ContentProtection)?p:[];u.ContentProtection=(0,_.removeDuplicates)(h(h([],g,!0),m,!0))}else u.ContentProtection=m}var y=u.SegmentList[0].SegmentURL,b=f.entries,S=(0,C.calcNumberOfSegmentsToDrop)(y,b,d.skippedSegmentsCount);(0,v.removeEntriesFromStart)(y,S),(0,C.addNewSegments)(y,b),u.SegmentList[0]._duration=d.targetDuration,u.SegmentList[0]._timescale=1}}else this.GP.logger.debug("No segments for representation ".concat(u._id," in loaded playlist"))},c.prototype.hQ=function(c,u){if(C.PlaylistUtils.isLive(u))return this.IP.translateSegmentList(c,u);var d=this.GP.serviceManager.maybeCall(I.ServiceName.ManifestCachingService,function(u){return u.getSegmentList(c.Uri)});if(d)return d;var p=this.IP.translateSegmentList(c,u);return this.GP.serviceManager.maybeCall(I.ServiceName.ManifestCachingService,function(u){return u.cacheSegmentList(p,c.Uri)}),p},c.prototype.iQ=function(c){var u=c.segments[0];null!=u&&u.dateTime&&(c.programDateTime=(0,b.toSeconds)(u.dateTime.getTime()))},c.prototype.jQ=function(c){var u=c.segments[0];c.endList?(c.startTime=(0,g.getStartTimeOffset)(this.KP.getState()),c.segments[0].startTime=c.startTime):u&&u.dateTime?(c.startTime=(0,b.toSeconds)(u.dateTime.getTime()),c.segments[0].startTime=c.startTime):c.startTime=(0,b.toSeconds)(c.requestTimestamp)-c.totalDuration},c.contentProtectionToXmlJson=function(c){return c.map(function(c){var u={_schemeIdUri:c.schemeIdUri};return c.defaultKid&&(u["_cenc:default_KID"]=c.defaultKid),c.pssh&&(u.pssh=[{__text:c.pssh}]),u})},c.prototype.dispose=function(){this.IP=(0,f.dispose)(this.IP)},c}()},14447:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.M3u8Loader=u.HlsQueryParamNames=void 0,u.getParsedManifest=V;var f,m=d(40306),g=d(3336),v=d(80813),y=d(56481),b=d(3714),S=d(4129),_=d(77401),E=d(57456),T=d(29669),w=d(98714),P=d(91678),A=d(33436),I=d(85434),M=d(89927),R=d(58313),k=d(14302),x=d(87222),C=d(36193),O=d(59707),D=d(60729),L=d(16661),N=d(15617),U=d(40870),F=d(30234),B=d(67113),j=d(95212),H=d(18146);function V(c,u,d){var p=d.url,h=d.manifestText,f=c.serviceManager.maybeCall(v.ServiceName.ManifestCachingService,function(c){return c.getParsedManifest(p)});return f?Promise.resolve(f):(0,F.parseHlsManifest)(c,h)}function z(c){return{url:c.url,statusCode:c.status,statusText:c.statusText}}(p=f||(u.HlsQueryParamNames=f={})).MediaSequenceNumber="_HLS_msn",p.PartIndex="_HLS_part",p.Skip="_HLS_skip",u.M3u8Loader=function(){function c(c,u){var d=this;this.dn={},this.updateRepresentation=function(c){var u=d.No(c,c.Uri);d.Yn.logger.debug("M3u8Loader: updateRepresentation (".concat(u,")"));var p=d.dn[c._id];return d.Po(p,u).then(function(u){return d.Ko(u,c)}).then(function(c){var u,h,f=d.Ro(),m=(null==(h=null==(u=d.Yn)?void 0:u.settings)?void 0:h.INFINITE_RETRIES_FOR_LIVE)===!0;return f&&m&&p.setResetRetriesWhenOffline(!0),c}).catch(function(u){return d.Oo(u,c)})},this.Qo=function(c,u){d.en||(d.fn=u.name,d.Yn.logger.debug("Failed to load playlist: ".concat(c.url," - ").concat(u.name)))},this.Yn=c,this.Zn=u,this.gn=[],this.hn=[],this.bn={},this.en=!1,this.kn=new B.M3u8DashManifest(c,u),this.cn=this.So(T.HttpRequestType.MANIFEST_HLS_MASTER),this.ln=c.serviceManager.get(v.ServiceName.SourceStoreService,u.sourceIdentifier)}return c.prototype.load=function(c){var u=this;return this.en=!1,this.fn=null,this.Po(this.cn,c).then(function(c){return u.mn(c)}).then(function(c){return u.kn.updateBaseUrl(c.url),u.nn(c),u.sn(c)}).then(function(c){return u.zn(c),u.on()}).then(function(){return u.kn.getManifest()}).catch(function(c){var d=c instanceof Error?c.message:void 0;return u.en||d===_.RequestError.Canceled?Promise.reject():c instanceof g.PlayerError||c instanceof Error?Promise.reject(c):Promise.reject(u.To(c))}).finally(function(){var c;return null==(c=u.jn)?void 0:c.signalLoadingFinished()})},c.prototype.mn=function(c){var u=this;if(this.en)return Promise.reject(Error("The loading of the HLS source was cancelled."));var d=c.body;if(void 0===d)return Promise.reject(Error("Cannot parse the playlist: content is empty."));var p={manifestText:d,url:c.url};return V(this.Yn,this.Zn,p).then(function(d){return(0,F.isValidHlsPlaylist)(d)?(u.rn(c,d),(0,F.ensureMasterPlaylist)(u.Yn,d,c.url)):Promise.reject(Error("Cannot parse master playlist: invalid format."))}).then(function(u){return h(h({},u),{rawString:d,url:c.url})}).catch(function(c){return Promise.reject(new g.PlayerError(m.ErrorCode.SOURCE_MANIFEST_INVALID,{errorMessage:c.message},"HLS manifest is not a valid M3U playlist",u.Zn.sourceIdentifier))})},c.prototype.nn=function(c){var u=this.kn.extractBackupStreams(c);if(!u.every(function(c){return Object.keys(c).length<=1})){var d=c.tags.find(function(c){return"EXT-X-CONTENT-STEERING"===c.name});this.jn=d&&this.Yn.settings.ENABLE_HLS_CONTENT_STEERING?new U.HlsContentSteeringHandler(this.Yn,u,this.updateRepresentation,d):new N.HlsBackupStreamsHandler(this.Yn,u,this.updateRepresentation)}},c.prototype.on=function(){var c=this,u=this.ln.getState(),d=this.kn.getManifest().Period[0],p=(0,x.findAdaptationSetOfMimeType)(I.MimeType.VideoMp4,d,{sourceState:u}),h=(0,x.findAdaptationSetOfMimeType)(I.MimeType.AudioMp4,d,{sourceState:u,playbackConfig:this.Yn.config.playback}),f=[];return p&&f.push(this.pn(p)),h&&f.push(this.pn(h)),Promise.all(f).catch(function(u){return u instanceof g.PlayerError?Promise.reject(u):c.fn===_.RequestError.TimedOut||u===_.RequestError.TimedOut?Promise.reject(new g.PlayerError(m.ErrorCode.NETWORK_MANIFEST_DOW
20NLOAD_TIMEOUT,{error:u},"Failed to load the HLS variant playlists: the request timed out.",c.Zn.sourceIdentifier)):Promise.reject(new g.PlayerError(m.ErrorCode.SOURCE_HLS_STREAM_ERROR,{error:u},"There was an error while retrieving the variant playlists.",c.Zn.sourceIdentifier))})},c.prototype.pn=function(c){var u=this,d=this.qn(c);if(!d){var p="No ".concat(c._mimeType," variants/renditions available");return this.Yn.logger.log(p),Promise.reject(new g.PlayerError(m.ErrorCode.SOURCE_MANIFEST_INVALID,{reason:p},p,this.Zn.sourceIdentifier))}return this.updateRepresentation(d).then(function(c){return u.ln.dispatch((0,w.setPreferredBitrateForMimeTypeAction)(d._mimeType,d._bandwidth)),u.ln.dispatch((0,C.setRepresentationIdAction)(d._internalId)),c}).catch(function(p){var h,f;return u.Yn.logger.debug("Representation ".concat(d._id," failed, dropping it"),null!=(h=null==p?void 0:p.message)?h:p),c.Representation=c.Representation.filter(function(c){return c!==d}),c.Representation.length>0?u.pn(c):(u.Yn.logger.log("All ".concat(c._mimeType," variants/renditions failed"),null!=(f=null==p?void 0:p.message)?f:p),Promise.reject(p))})},c.prototype.qn=function(c){return this.Yn.serviceManager.maybeCall(v.ServiceName.AdaptationService,function(u){var d,p=c.Representation.map(function(c){return{rep:c,bitrate:c._bandwidth,width:c._width,height:c._height}});return null==(d=u.selectQualityBasedOnBitrateMeasurement(p,c._mimeType))?void 0:d.rep})},c.prototype.updateAdaptationSet=function(c){var u=this,d=this.kn.findAdaptationSet(c);return d?Promise.all(d.Representation.map(function(c){var d=u.So(T.HttpRequestType.MANIFEST_HLS_VARIANT);return u.Po(d,c.Uri).then(function(d){return u.Ko(d,c)}).then(function(c){u.ln.dispatch((0,O.updateRepresentationAction)(c))})})):Promise.reject("Could not find data")},c.prototype.rn=function(c,u){this.Yn.serviceManager.maybeCall(v.ServiceName.ManifestCachingService,function(d){d.cacheHttpResponse(c,c.url),d.cacheParsedManifest(u,c.url)})},c.prototype.sn=function(c){var u=this,d=(0,F.getTracksWithUnknownCodecs)(c),p=d.audioTracksWithoutCodecs,h=d.videoTracksWithoutCodecs;return 0===p.length&&0===h.length?Promise.resolve(c):(this.Yn.logger.debug("Codecs are missing in master playlist - probing them from segments now"),this.xn(c,p).then(function(){return u.yn(c,h)}).then(function(){return c}).catch(function(c){if(c instanceof g.PlayerError)return Promise.reject(c);var d,p="Codec verification failed",h=null!=(d=null==c?void 0:c.message)?d:c;u.Yn.logger.debug(p,c);var f=u.fn===_.RequestError.TimedOut?m.ErrorCode.NETWORK_MANIFEST_DOWNLOAD_TIMEOUT:m.ErrorCode.SOURCE_MANIFEST_INVALID;return Promise.reject(new g.PlayerError(f,{reason:h},p,u.Zn.sourceIdentifier))}))},c.prototype.tn=function(c,u){var d=this,p=c.url,h=c.body;return void 0===h?Promise.reject("Cannot parse codec, empty manifest response"):V(this.Yn,this.Zn,{url:u,manifestText:h}).then(function(h){var f=(0,H.calculateUpdateIntervalInSeconds)(d.Yn,h),m=Date.now()+(0,M.toMilliSeconds)(f);d.Yn.serviceManager.maybeCall(v.ServiceName.ManifestCachingService,function(u){u.cacheHttpResponse(c,p,m),u.cacheParsedManifest(h,p,m)});var g=h.segments,y=H.PlaylistUtils.isLive(h),b=h.mediaSequence,S=H.PlaylistUtils.getBaseUrl(d.kn.getBaseUrl(),u);return new L.CodecDetector(d.Yn,d.Zn).probeCodecs(g,y,S,b)})},c.prototype.un=function(c){return this.Yn.serviceManager.maybeCall(v.ServiceName.AdaptationService,function(u){var d=c.map(function(c,u){var d,p;return{bitrate:c.attributes.BANDWIDTH,width:null==(d=c.attributes.RESOLUTION)?void 0:d.width,height:null==(p=c.attributes.RESOLUTION)?void 0:p.height,id:u}});return c[u.selectQualityBasedOnBitrateMeasurement(d).id]})},c.prototype.vn=function(c,u){var d=this,p=new S.DefaultContentLoader(this.Yn,{requestType:T.HttpRequestType.MANIFEST_HLS_VARIANT,onFailure:this.Qo});return this.wn(p,c).then(function(u){return d.tn(u,c)}).then(function(d){return(0,F.updateMissingCodecsForPlaylists)(d,u,c)})},c.prototype.wn=function(c,u){var d=this;return this.Po(c,u).catch(function(p){d.Yn.logger.debug("Representation failed to load during codec probing ".concat(u));
20var h,f=null==(h=d.jn)?void 0:h.getNextBackupUriForCodecProbing(u);return f?(d.Yn.logger.debug("Attempting to continue codec probing using backup stream ".concat(f)),d.wn(c,f)):Promise.reject(p)})},c.prototype.xn=function(c,u){var d=this,p=u.shift();if(!(null!=p&&p.attributes.URI))return Promise.resolve();var h=R.URLHelper.getAbsoluteUrl(p.attributes.URI,this.kn.getBaseUrl());return this.vn(h,c).then(function(){return d.xn(c,u)})},c.prototype.yn=function(c,u){if(0===u.length)return Promise.resolve();var d=this.un(u),p=R.URLHelper.getAbsoluteUrl(d.uri,this.kn.getBaseUrl());return this.vn(p,c)},c.prototype.zn=function(c){var u,d=this;void 0===this.an&&(this.an=c),this.kn.onMasterPlaylistAvailable(c);var p=this.kn.getAllVariantRepresentions();p.forEach(function(c){d.dn[c._id]=d.So(T.HttpRequestType.MANIFEST_HLS_VARIANT)}),null==(u=this.jn)||u.populateBackupStreamsMap(p)},c.prototype.Ko=function(c,u){var d=this;if(this.en)return Promise.reject(k.REPRESENTATION_UPDATE_CANCEL);var p=c.url,h=c.body;if(!h)return Promise.reject(new g.PlayerError(m.ErrorCode.SOURCE_MANIFEST_INVALID,void 0,"Cannot parse the playlist: the body of the response is empty.",this.Zn.sourceIdentifier));var y=Date.now();return V(this.Yn,this.Zn,{url:p,manifestText:h}).then(function(b){b.uri=(0,R.removeQueryParameters)(p,Object.values(f)),b.requestTimestamp=y;var S,_,E=j.M3u8Validator.checkForError(b);if(E)return Promise.reject(new g.PlayerError(m.ErrorCode.SOURCE_MANIFEST_INVALID,{M3u8ValidatorError:E},"The parsed media playlist is invalid: ".concat(E),d.Zn.sourceIdentifier));b.start=null!=(S=b.start)?S:d.an.start;var T=u._mimeType;d.bn[T]=(0,F.createDiscontinuitySequences)(b,null!=(_=d.bn[T])?_:[]);var w=d.Lo(d.bn[T],!H.PlaylistUtils.isLive(b));b.segments=w.flatMap(function(c){return c.segments});var I=d.kn.onMediaLoaded(h,u,b);H.PlaylistUtils.isLive(b)||d.Yn.serviceManager.maybeCall(v.ServiceName.ManifestCachingService,function(u){u.cacheHttpResponse(c,p),u.cacheParsedManifest(b,p)});var k=(0,M.toSeconds)(Date.now()-y);return d.Yn.store.dispatch((0,P.addMetricsValue)("default",A.MetricType.ProcessingTime,k)),d.Yn.logger.insane("Parsed playlist in: ".concat(null==k?void 0:k.toFixed(2))),I}).catch(function(c){if(c instanceof g.PlayerError)return Promise.reject(c);var u="Failed to parse the media playlist",p=c instanceof Error?c.message:u;return Promise.reject(new g.PlayerError(m.ErrorCode.SOURCE_MANIFEST_INVALID,{errorMessage:p},u,d.Zn.sourceIdentifier))})},c.prototype.Lo=function(c,u){return c.filter(function(d,p){var h=!u&&p===c.length-1,f=d.segments.reduce(function(c,u){return c+u.duration},0);return!!(0===p&&f>0||h)||f>0})},c.prototype.stop=function(){var c=this;this.gn.forEach(function(u){return c.Yn.eventHandler.off(b.PlayerEvent.Play,u)}),this.hn.forEach(function(u){return c.Yn.eventHandler.off(b.PlayerEvent.Paused,u)}),this.gn=[],this.hn=[],this.Mo(),this.en=!0},c.prototype.Mo=function(){var c=this;this.cn.cancel(),Object.keys(this.dn).forEach(function(u){c.dn[u].dispose(),delete c.dn[u]})},c.prototype.stopRepresentationUpdate=function(c){var u,d=this.dn[c._id];return null!=d&&d.isLoading()?(this.Yn.logger.debug("M3u8Loader: stopping ongoing representation update (".concat(c.Uri,")")),d.cancel(),(null!=(u=d.getResponse())?u:Promise.resolve()).catch(function(){}).then(function(){})):Promise.resolve()},c.prototype.No=function(c,u){var d,p={},h=(0,H.getLastMediaSequenceAndPartIndex)(c);return(0,D.isPlayingLowLatencyHls)(this.Yn)&&(0,H.canMakeBlockingPlaylistReload)(c,this.Yn.settings)&&h&&(p[f.MediaSequenceNumber]=String(h.mediaSequence),p[f.PartIndex]=String(h.partIndex+1)),null!=(d=this.Yn.config.live)&&d.incrementalManifestUpdates&&(0,H.canPerformDeltaUpdate)(c)&&(p[f.Skip]=(0,H.isDeltaUpdateV2Supported)(c)?"v2":"YES"),R.URLHelper.appendQueryParametersToUrl(u,p)},c.prototype.Oo=function(c,u){var d,p=this;return this.en||(null==c?void 0:c.message)===_.RequestError.Canceled?Promise.reject(k.REPRESENTATION_UPDATE_CANCEL):(this.Yn.logger.debug("M3u8Loader: updateRepresentation failed (".concat(u.Uri,")"),null!=(d=null==c?void 0:c.message)?d:c),this.switchToBackupStream(u).then(function(c){var u;return c[0]||Promise.reject(null!=(u=p.fn)?u:_.RequestError.Failed)}).catch(function(u){return p.fn===_.RequestError.TimedOut?Promise.reject(_.RequestError.TimedOut):Object.values(N.BackupStreamErrors).includes(u)&&c instanceof g.PlayerError?Promise.reject(c):Promise.reject(u===k.REPRESENTATION_UPDATE_CANCEL?u:_.RequestError.Failed)}))},c.prototype.switchToBackupStream=function(c,u){return this.jn?this.jn.switchToBackupStream(c,u):Promise.reject(N.BackupStreamErrors.NO_BACKUP_STREAMS)}
20,c.prototype.isSwitchingToBackupStreams=function(){var c,u;return null!=(u=null==(c=this.jn)?void 0:c.isCurrentlySwitchingToBackupStreams())&&u},c.prototype.Po=function(c,u){if(!u){var d,p=new g.PlayerError(m.ErrorCode.SOURCE_INVALID,void 0,"Cannot load the playlist: no URL was provided.",this.Zn.sourceIdentifier);return this.Yn.eventHandler.fireError(p),Promise.reject(p)}var h=this.Yn.serviceManager.maybeCall(v.ServiceName.ManifestCachingService,function(c){return c.getHttpResponse(u)});if(h)return Promise.resolve(h);var f=null==(d=this.Zn.source.options)?void 0:d.manifestWithCredentials;return c.load(u,T.HttpRequestMethod.GET,null,null,null,f)},c.prototype.Ro=function(){return this.Yn.serviceManager.maybeCall(v.ServiceName.ManifestService,function(c){return c.isLive()},!1,this.Zn.sourceIdentifier)},c.prototype.So=function(c){var u,d,p=this,h=(null==(d=null==(u=this.Yn)?void 0:u.settings)?void 0:d.INFINITE_RETRIES_FOR_LIVE)===!0,f=this.Ro();return new S.DefaultContentLoader(this.Yn,{onSuccess:function(c,u){var d,h;p.fn=null,(0,E.isDownloadTimeInformationValid)(c)&&(p.Yn.logger.debug("Downloaded playlist in: ".concat(null==(d=c.elapsedTime)?void 0:d.toFixed(2),", TTFB: ").concat(null==(h=c.timeToFirstByte)?void 0:h.toFixed(2))),p.Yn.store.dispatch((0,P.addMetricsValue)("default",A.MetricType.DownloadInformation,{bytes:c.length,time:c.elapsedTime,timeToFirstByte:c.timeToFirstByte})))},onFailure:this.Qo,maxRetries:this.Yn.settings.MAX_MPD_RETRIES,requestType:c,resetRetriesWhenOffline:f&&h})},c.prototype.To=function(c){if(this.fn===_.RequestError.TimedOut)return new g.PlayerError(m.ErrorCode.NETWORK_MANIFEST_DOWNLOAD_TIMEOUT,z(c),"Failed to load HLS playlist: the request timed out.",this.Zn.sourceIdentifier);var u=(null==c?void 0:c.status)===XMLHttpRequest.UNSENT?"Failed to load the HLS playlist due to CORS restrictions or because the client is offline.":"Failed to load HLS playlist: ".concat(null==c?void 0:c.status," ").concat(null==c?void 0:c.statusText,".");return new g.PlayerError(m.ErrorCode.SOURCE_COULD_NOT_LOAD_MANIFEST,z(c),u,this.Zn.sourceIdentifier)},c.prototype.dispose=function(){var c,u=this;this.stop(),this.kn=(0,y.dispose)(this.kn),this.an=null,this.fn=null,this.cn.dispose(),null==(c=this.jn)||c.dispose(),Object.keys(this.dn).forEach(function(c){return u.dn[c].dispose()}),this.dn=null},c}()},36848:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.uniqueRenditions=function(c){var u=[];return c.forEach(function(c){var d=u.findIndex(function(u){return(0,p.compareValues)(c,u,["GROUP-ID","NAME","TYPE"])});if(-1!==d){var h=u[d];"YES"===c.DEFAULT&&"YES"!==h.DEFAULT&&(u[d]=c)}else u.push(c)}),u};var p=d(19541)},17051:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.M3u8RepresentationFactory=void 0;var p=d(66790),h=d(44468),f=d(34047),m=d(68922),g=d(58313),v=d(92778),y=d(18146);u.M3u8RepresentationFactory=function(){function c(c,u){this.seb=c,this.teb=u}return c.prototype.create=function(c,u,d,h,f){if(void 0===f&&(f=!0),!c)return null;var m=this.ueb(c,h);if(u===p.RepresentationType.AUDIO)m=this.web(c,m,d,h);else if(u===p.RepresentationType.VIDEO)m=this.veb(c,m,d,h,f);else{if(u!==p.RepresentationType.SUBTITLE)return null;m=this.xeb(c,m,d,h)}var g=this.yeb(m);return g&&(m._label=g),m},c.prototype.ueb=function(c,u){var d=c.uri||c.URI;d&&!g.URLHelper.isUrlAbsolute(d)&&(d=g.URLHelper.concatBaseUrlWithPartial(u,d));var p={_id:"",_mimeType:"",_bandwidth:0,_codecs:"",_hls:{requestTimestamp:0},BaseURL:null,SegmentList:[{SegmentURL:[],entries:[],totalDuration:0}],Uri:d};return c.NAME&&(p._label=c.NAME),p},c.prototype.veb=function(c,u,d,p,h){if(u._mimeType="video/"+d,u._width=0,u._height=0,u.BaseURL=[{url:y.PlaylistUtils.getBaseUrl(p,c.uri)}],u._bandwidth=c.attributes["AVERAGE-BANDWIDTH"]||c.attributes.BANDWIDTH,u._bandwidth||(u._bandwidth=this.seb.settings.MIN_SELECTABLE_VIDEO_BITRATE),u._bandwidth=Number(u._bandwidth),c.attributes.CODECS){var m=f.CodecStringHelper.getExtractedCodecStrings(c.attributes.CODECS);f.CodecStringHelper.hasOldAvc1CodecFormat(m.video)&&(m.video=f.CodecStringHelper.convertAvc1ToAvcotiCodecFormat(m.video)),h?m.video&&m.audio?u._codecs=m.video+","+m.audio:m.video&&!m.audio?u._codecs=m.video:!m.video&&m.audio&&(u._codecs=m.audio):u._codecs=m.video}return c.attributes["FRAME-RATE"]&&(u._frameRate=parseFloat(c.attributes["FRAME-RATE"])),c.attributes.RESOLUTION&&(u._width=c.attributes.RESOLUTION.width,u._height=c.attributes.RESOLUTION.height,u._id+=c.attributes.RESOLUTION.height+"_"),u._id+=c.attributes.BANDWIDTH,u},c.prototype.web=function(c,u,d,p){var h,f,m;if(u._id=c.NAME+" "+c["GROUP-ID"]||"",u._mimeType="audio/"+d,u._codecs=c.CODECS||(null==(h=c.attributes)?void 0:h.CODECS),u._name=c.NAME||"",u._groupId=c["GROUP-ID"]||"",u._label=u._name+" "+u._groupId,u._bandwidth=null!=(m=null!=(f=c["AVERAGE-BANDWIDTH"])?f:c.BANDWIDTH)?m:0,u.BaseURL=[{url:y.PlaylistUtils.getBaseUrl(p,c.URI||c.uri)}],c.CHANNELS){var g=c.CHANNELS.split("/")[0];u.AudioChannelConfiguration=[{_schemeIdUri:v.DashSchemeUri.AudioChannelConfig,_value:g}]}return u},c.prototype.xeb=function(c,u,d,p){return u._id=c.NAME,u._mimeType="application/"+d,u._codecs="wvtt",u._name=c.NAME||"",u.BaseURL=[{url:y.PlaylistUtils.getBaseUrl(p,c.URI)}],u._hls.isForced="YES"===c.FORCED,u},c.prototype.yeb=function(c){var u={id:c._id,mimeType:c._mimeType,width:c._width,height:c._height,bitrate:c._bandwidth};return(0,m.applyLabeling)({source:this.teb.source,context:this.seb,streamType:h.StreamType.Hls,labelingType:m.LabelingType.Qualities},u)},c}()},42594:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},h=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};
20Object.defineProperty(u,"__esModule",{value:!0}),u.createNewMapEntry=g,u.updateMapEntry=function(c,u,d){var f=c.segmentInfos,y=f.findIndex(function(c){var d,p,h,f,m;return d=u.segments[0],p=c.url===d.uri,h=c.discontinuitySequenceNumber===d.discontinuitySequenceNumber,f=!c.byteRange&&!d.byterange,m=c.byteRange&&d.byterange&&c.byteRange.start===d.byterange.offset&&c.byteRange.end===d.byterange.offset+d.byterange.length,p&&h&&(m||f)});if(-1===y)return g(u,d);var b=f.length-y,S=u.segments.length-b;if(0!==y||0!==S){var _=u.segments.slice(-S).map(function(c){return v(c,d)}),E=function(c){var u=c[c.length-1];if(void 0!==u.startTime&&void 0!==u.duration)return u.startTime+u.duration}(f);return null!=E&&(0,m.forwardExtrapolateSegmentStartTime)(_,{index:0,startTime:E}),{qualityInfo:p(p({},c.qualityInfo),{lastUpdateTimestamp:Date.now()}),segmentInfos:h(h([],f.slice(y),!0),_,!0)}}return c};var f=d(23068),m=d(47596);function g(c,u){var d=c.segments.map(function(c){return v(c,u)});return{qualityInfo:{lastUpdateTimestamp:Date.now()},segmentInfos:d}}function v(c,u){var d,p={url:c.uri,isInitSegment:!1,internalRepresentationId:u._internalId,isDiscontinuityStart:c.discontinuity,discontinuitySequenceNumber:c.discontinuitySequenceNumber,duration:c.duration,startTime:c.startTime,periodId:u._internalId.periodId,key:c.key,metadata:null!=(d=c.metadata)?d:[],mimeType:u._mimeType,bitrate:u._bandwidth,codecs:u._codecs};return c.byterange&&(p.byteRange={start:c.byterange.offset,end:c.byterange.offset+c.byterange.length}),c.init&&(p.init=c.init),c.dateTime&&(p.dateTime=c.dateTime),(0,f.isVideoRepresentation)(u)&&(p.height=u._height,p.width=u._width,p.frameRate=u._frameRate),p}},57778:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.HlsParsing=u.M3u8Translator=void 0;var h,f=d(66790),m=d(34047),g=d(79721),v=d(84568),y=d(85434),b=d(89927),S=d(58313),_=d(70850),E=d(88052),T=d(62756),w=d(34795),P=d(47151),A=d(36848),I=d(17051),M=d(18146),R=new RegExp(/^data:text\/plain.*;base64.*,(.+)/);function k(c){return"AUDIO"===c.TYPE}function x(c,u,d){var p,h;return d&&null!=(h=null==(p=null==c?void 0:c.attributes)?void 0:p["PATHWAY-ID"])?h:String(Object.keys(u).length)}function C(c,u,d){void 0!==d&&(c[u]=d)}u.M3u8Translator=function(){function c(c,u){this.a8=0,this.b8=!1,this.A8=(0,v.memoize)(function(c){var u=R.exec(c);return null!==u&&2===u.length?u[1]:null}),this.X8=c,this.Y8=u,this.Z8=new I.M3u8RepresentationFactory(c,u)}return c.prototype.updateBaseUrl=function(c){this.c8=S.URLHelper.removeLastPathPart(c)},c.prototype.getBaseUrl=function(){var c;return null!=(c=this.c8)?c:""},c.prototype.d8=function(c,u){for(var d={},p={_schemeIdUri:"urn:scte:dash:cc:cea-"+u+":2015",_value:""},h=0;h<c.length;h++){var f=c[h]["INSTREAM-ID"];d[f]={lang:c[h].LANGUAGE||c[h].NAME||f,label:c[h].NAME||c[h].LANGUAGE||f},p._value.length>0&&(p._value+=";"),p._value+="708"===u?f.substring(7)+"=lang:":f+"=",p._value+=c[h].LANGUAGE}return{closedCaptionLabel:d,accessibility:p}},c.prototype.e8=function(c){if(!c)return{closedCaptionLabel:null,accessibility:[]};var u=this.d8(c.cea608,"608"),d=this.d8(c.cea708,"708"),p=[],h=null;return u.accessibility._value&&(p.push(u.accessibility),h=u.closedCaptionLabel),d.accessibility._value&&p.push(d.accessibility),{closedCaptionLabel:h,accessibility:p}},c.prototype.f8=function(c,u,d,p,h){for(var m=[],g=1/0,v=0,y=1/0,b=0,S=1/0,_=0,E=0;E<c.length;E++){var T=c[E];if(T.uri){var w=this.Z8.create(T,f.RepresentationType.VIDEO,p,this.c8,this.b8);m.push(w),g=Math.min(g,w._height),v=Math.max(v,w._height),y=Math.min(y,w._width),b=Math.max(b,w._width),S=Math.min(S,w._bandwidth),_=Math.max(_,w._bandwidth)}}m.sort(function(c,u){return c._bandwidth-u._bandwidth});var A={Representation:m,ContentComponent:[{_id:"video",_contentType:"video"}],_id:String(this.a8),_group:null,_mimeType:"video/"+p,_internalId:new P.AdaptationSetId(d,String(this.a8++)),_minBandwidth:S,_maxBandwidth:_,_minHeight:g,_maxHeight:v,_minWidth:y,_maxWidth:b,isTransmuxingRequired:!0};
vendor: 2,213 bytes, line 20
20h&&Object.keys(h).forEach(function(c){h[c].entries.filter(function(c){return!c.URI}).forEach(function(c){A.ContentComponent.push({_id:c.NAME,_contentType:"audio",_lang:c.LANGUAGE})})});var I=this.e8(u);I.closedCaptionLabel&&(A.ClosedCaptionLabels=I.closedCaptionLabel),I.accessibility.length>0&&(A.Accessibility=I.accessibility);var M=this.j8(A);return M&&"string"==typeof M&&(A._label=M),A},c.prototype.g8=function(c,u,d,p){for(var h=[],m=0;m<c.length;m++){var g=c[m];if(g.uri){var v=this.Z8.create(g,f.RepresentationType.AUDIO,p,this.c8,this.b8);h.push(v)}}h.sort(function(c,u){return c._bandwidth-u._bandwidth});var y={Representation:h,_id:String(this.a8),_group:null,_mimeType:"audio/"+p,_internalId:new P.AdaptationSetId(d,String(this.a8++)),_minBandwidth:1/0,_maxBandwidth:0,isTransmuxingRequired:!0},b=this.e8(u);b.closedCaptionLabel&&(y.ClosedCaptionLabels=b.closedCaptionLabel),b.accessibility.length>0&&(y.Accessibility=b.accessibility);var S=this.j8(y);return S&&"string"==typeof S&&(y._label=S),y},c.prototype.h8=function(c,u,d){var p=this,h=this.X8.settings.IGNORE_HLS_AUDIO_GROUPS,m=0,g=[],v=function(u){return{Representation:[],_id:String(p.a8),_internalId:new P.AdaptationSetId(c,String(p.a8++)),_mimeType:"audio/"+d,_minBandwidth:1/0,_maxBandwidth:-1,_lang:u,_group:String(m++),isTransmuxingRequired:!0}};return Object.keys(u).forEach(function(c){var m,y,b,S=u[c],_=S.entries.find(function(c){return c.LANGUAGE&&"und"!==c.LANGUAGE});_&&(y=_.LANGUAGE),h||(b=v(y));for(var E=(0,A.uniqueRenditions)(S.entries.filter(function(c){return c.URI})),T=0;T<E.length;T++){var w=E[T];h&&(b=v(y));var P=p.Z8.create(w,f.RepresentationType.AUDIO,d,p.c8,p.b8);b.Representation.push(P),b._minBandwidth=Math.min(b._minBandwidth,P._bandwidth),b._maxBandwidth=Math.max(b._maxBandwidth,P._bandwidth);var I=w.CHARACTERISTICS;if(I&&0===I.indexOf(p.X8.settings.HLS_VR_CHARACTERISTICS_UTI)&&(b.Role=[{_schemeIdUri:p.X8.settings.VR_SCHEME_ID_URI,_value:I.substring(p.X8.settings.HLS_VR_CHARACTERISTICS_UTI.length)}]),!b._label){var M=p.j8(b);M&&"string"==typeof M?b._label=M:P._name?b._label=P._name:b._label=c}h&&b.Representation.length>0&&g.push(b),b.Representation.sort(function(c,u){return c._bandwidth-u._bandwidth})}
20(null!=(m=null==b?void 0:b.Representation)?m:[]).forEach(function(c,u){c._bandwidth=128e3+32e3*u}),!h&&b.Representation.length>0&&g.push(b)}),g},c.prototype.i8=function(c,u,d){var p=this,h=0;return Object.values(u).filter(function(c){return c.URI}).map(function(u){var m={Representation:[],_id:String(p.a8),_internalId:new P.AdaptationSetId(c,String(p.a8++)),_mimeType:"application/mp4",_lang:u.LANGUAGE,_group:""+h++,_isFragmented:!0},g=p.Z8.create(u,f.RepresentationType.SUBTITLE,d,p.c8,p.b8);m.Representation.push(g);var v=p.j8(m);return v&&"string"==typeof v?m._label=v:g._name?m._label=g._name:m._label=u.LANGUAGE,m})},c.prototype.j8=function(c){var u={mimeType:c._mimeType,lang:c._lang};return c._label&&(u.label=c._label),this.k8()(u)},c.prototype.k8=function(){var c,u,d,p,h=this,f=null==(p=null==(d=null==(u=null==(c=this.Y8)?void 0:c.source)?void 0:u.labeling)?void 0:d.hls)?void 0:p.tracks;return"function"!=typeof f?this.l8:function(c){var u;return null!=(u=(0,_.safeUserCallback)(function(){return f(c)},h.X8.logger))?u:null}},c.prototype.l8=function(){return null},c.prototype.extractBackupStreams=function(c){for(var u,d=[],p=null!=(u=this.c8)?u:"",h=c.playlists,f={},m=this.X8.settings.ENABLE_HLS_CONTENT_STEERING,g=x(c.tags.find(function(c){return"EXT-X-CONTENT-STEERING"===c.name}),{},m),v=0;v<h.length;v++){var y={},b=h[v],S=x(b,y,m);this.m8(y,b,c.media,p,S);for(var _=v+1;_<h.length;_++){var E=h[_];if(function(c,u){var d,p,h,f,m=c.attributes.BANDWIDTH===u.attributes.BANDWIDTH,g=(null==(d=c.attributes.RESOLUTION)?void 0:d.height)===(null==(p=u.attributes.RESOLUTION)?void 0:p.height)&&(null==(h=c.attributes.RESOLUTION)?void 0:h.width)===(null==(f=u.attributes.RESOLUTION)?void 0:f.width),v=c.attributes.CODECS===u.attributes.CODECS;return m&&g&&v}(b,E)){var T,w,P,A,I=x(E,y,m);this.m8(y,E,c.media,p,I);var M=I===g;M&&h.splice(v,1,E),T=f,w=b.attributes.AUDIO,P=E.attributes.AUDIO,A=M,w&&P&&w!==P&&(T[A?w:P]=!0),h.splice(_,1),_--}}d.push(y)}return this.X8.settings.IGNORE_HLS_AUDIO_GROUPS||(c.media=c.media.filter(function(c){return!f[c.attributes["GROUP-ID"]]})),d},c.prototype.m8=function(c,u,d,p,h){var f,m;this.X8.settings.DISABLE_HLS_BACKUP_STREAM_FAILOVER||(c[h]=((f={})[y.MimeType.VideoMp4]=S.URLHelper.getAbsoluteUrl(u.uri,p),u.attributes.AUDIO&&(m=u.attributes.AUDIO,d.filter(function(c){return k(c.attributes)&&c.attributes["GROUP-ID"]===m&&c.attributes.URI}).map(function(c){var u;return{id:c.attributes.NAME,url:S.URLHelper.getAbsoluteUrl(null!=(u=c.attributes.URI)?u:"",p)}})).forEach(function(c){f[c.id]=c.url}),f))},c.prototype.createDashManifestSkeleton=function(c){return this.n8(c),this.q8(c),this.b8=this.x8(c),{BaseURL:[{url:this.c8}],Period:[this.w8(c,g.DEFAULT_PERIOD_ID)],_hasIndependentSegments:c.independentSegments,_isHls:!0,isInitialized:!1}},c.prototype.n8=function(c){var u=this;
vendor: 4,329 bytes, line 20
20c.playlists.forEach(function(c){if(c.attributes.CODECS){var d=m.CodecStringHelper.getExtractedCodecStrings(c.attributes.CODECS);if(!d.video&&d.unknown&&(c.attributes.RESOLUTION||c.attributes["FRAME-RATE"])){var p=m.CodecStringHelper.extractCodec(d.unknown);u.X8.logger.debug("Assuming unknown codec ".concat(p," is video")),m.CodecStringHelper.addCodec("video",p)}}})},c.prototype.o8=function(c,u){return m.CodecStringHelper.getMimeTypeForCodecString(c.attributes.CODECS)===u},c.prototype.p8=function(c){var u=this,d=c.playlists.some(function(c){return u.o8(c,"video")}),p=c.playlists.some(function(c){return u.o8(c,"audio")});d&&p&&(c.playlists=c.playlists.filter(function(c){return u.o8(c,"video")}))},c.prototype.q8=function(c){this.p8(c)},c.prototype.r8=function(c,u){void 0===u&&(u=!1);var d=m.CodecStringHelper.getExtractedCodecStrings(c.attributes.CODECS);return d.video?(m.CodecStringHelper.hasOldAvc1CodecFormat(d.video)&&(d.video=m.CodecStringHelper.convertAvc1ToAvcotiCodecFormat(d.video)),u?d.video:d.video.split(".")[0]):null},c.prototype.s8=function(c,u){void 0===u&&(u=!1);var d=m.CodecStringHelper.getExtractedCodecStrings(c.attributes.CODECS);return d.audio?u?d.audio:d.audio.split(".")[0]:null},c.prototype.t8=function(c){var u=this;return c.map(function(c){return u.r8(c)}).filter(function(c,u,d){return c&&d.indexOf(c)===u})},c.prototype.u8=function(c){var u=this;return c.map(function(c){return u.s8(c)}).filter(function(c,u,d){return c&&d.indexOf(c)===u})},c.prototype.v8=function(c){var u=this.t8(c),d=this.u8(c);if(0===u.length&&0===d.length)return{unknown:c};if(0===u.length){var p={};return d.forEach(function(u){p[u]=c.filter(function(c){var d;return null==(d=c.attributes.CODECS)?void 0:d.includes(u)})}),p}var h={};return u.forEach(function(u){h[u]=c.filter(function(c){var d;return null==(d=c.attributes.CODECS)?void 0:d.includes(u)})}),h},c.prototype.w8=function(u,d){var p=this,f={_id:d,_duration:"PT0S",duration:0,AdaptationSet:[]},g=h.extractMediaRenditions(u,this.X8.settings.IGNORE_HLS_AUDIO_GROUPS,function(c){if(null!=c.attributes.CODECS){var u=c.attributes.CODECS.split(",").map(function(c){return m.CodecStringHelper.hasOldAvc1CodecFormat(c)?m.CodecStringHelper.convertAvc1ToAvcotiCodecFormat(c):c}).join(","),d=m.CodecStringHelper.getExtractedCodecStrings(u).video;return!!d&&p.X8.renderer.isMediaTypeSupported("video/mp4",d)}return!0}),v=this.v8(u.playlists),y=Object.keys(v),b=y.filter(function(c){return m.CodecStringHelper.isVideoCodec(c)}).map(function(c){return p.f8(v[c],g.captions,f._id,w.ContainerFormat.MP4,g.audio)}).filter(function(u){return u.Representation=u.Representation.reduce(function(u,d){var h=c.isRepresentationSupported(d,p.X8.renderer),f=!!u.find(function(c){return c.Uri===d.Uri});return h&&!f&&u.push(d),u},[]),u.Representation.length>0}),S=this.h8(f._id,g.audio,w.ContainerFormat.MP4).filter(function(u){return u.Representation=u.Representation.filter(function(u){return c.isRepresentationSupported(u,p.X8.renderer)}),u.Representation.length>0}).concat(y.filter(function(c){return m.CodecStringHelper.isAudioCodec(c)}).map(function(c){return p.g8(v[c],g.captions,f._id,w.ContainerFormat.MP4)})),_=this.i8(f._id,g.subtitles,w.ContainerFormat.MP4);return f.AdaptationSet=[].concat(b,S,_),E.ModuleManager.has(T.ModuleName.Thumbnail)&&(f.AdaptationSet=E.ModuleManager.get(T.ModuleName.Thumbnail).extendAdaptationSets(f.AdaptationSet,u,this.c8)),f},c.isRepresentationSupported=function(c,u){var d=!c._mimeType.includes("audio")&&!c._mimeType.includes("video");if(!c._codecs||d)return!0;var p=m.CodecStringHelper.getExtractedCodecStrings(c._codecs);return Object.keys(p).every(function(c){return m.CodecStringHelper.isSupportedByRenderer(u,c+"/mp4",p[c])})},c.prototype.x8=function(c){var u=c.media.filter(function(c){return k(c.attributes)});return!u.length||u.some(function(c){return!c.attributes.URI})},c.prototype.y8=function(c,u,d,p,h){for(var f,m=function(c){null!==g.A8(c.uri)?(void 0!==u.find(function(u){return!Object.keys(c).some(function(d){return c[d]!==u[d]})})||u.push(c),u.length>0&&(f=void 0)):f=(0,M.generateSegmentEncryptionInfo)(c,d,p,h)},g=this,v=0,y=c??[];v<y.length;v++)m(y[v]);return f},c.prototype.translateSegmentList=function(c,u){var d,h,f,m=u.segments,g=[],v=[],y=null!=(f=null==(h=null==(d=c.BaseURL)?void 0:d[0])?void 0:h.url)?f:"",_="";
20y&&(_=(0,S.extractOrigin)(y)),this.A8.invalidate();for(var E=0,T=function(c){y&&(c.uri=S.URLHelper.buildAbsoluteUrl(y,_,c.uri));var d,h,f,m=w.y8(c.keys,v,y,_,c.mediaSequence);c.init&&(c.init.url=S.URLHelper.buildAbsoluteUrl(y,_,c.init.url),c.init.key=w.y8(c.init.keys,v,y,_,c.mediaSequence));var T={_media:c.uri,_duration:c.duration,_mediaSequence:c.mediaSequence,_discontinuitySequenceNumber:c.discontinuitySequenceNumber,_metadata:[]};C(T,"_discontinuity",c.discontinuity),C(T,"_key",m),C(T,"_init",c.init),C(T,"_dateTime",c.dateTime),C(T,"_byteRange",(0,M.parseSegmentByteRange)(c.byterange)),C(T,"_playbackTime",(d=E,h=c.dateTime,u.endList?(null!=(f=u.startTime)?f:0)+d:h?(0,b.toSeconds)(h.getTime()):void 0)),["cueTag","scte35","customTags"].filter(function(u){return c.hasOwnProperty(u)}).forEach(function(u){return T._metadata=T._metadata.concat(c[u])}),c.parts&&(T._parts=c.parts.map(function(c){return p(p({},c),{uri:S.URLHelper.buildAbsoluteUrl(y,_,c.uri)})})),g.push(T),E+=c.duration},w=this,P=0;P<m.length;P++)T(m[P]);return{entries:g,contentProtectionInfos:this.z8(v)}},c.prototype.z8=function(c){var u=this,d=[];return c.forEach(function(c){var p,h=(p=u.A8(c.uri),E.ModuleManager.has(T.ModuleName.DRM)?E.ModuleManager.get(T.ModuleName.DRM).ContentProtectionHelper.parseContentProtection(c,p):null);h?d.push(h):u.X8.logger.debug("Encountered unknown/unsupported DRM scheme:",c.keyformat)}),d},c.prototype.dispose=function(){this.c8=null,this.A8.invalidate()},c}(),function(c){function u(c){var u,d=(u={},c.forEach(function(c){var d=c.attributes.AUDIO;u[d]||(u[d]=[]);var p={"AVERAGE-BANDWIDTH":c.attributes["AVERAGE-BANDWIDTH"],BANDWIDTH:c.attributes.BANDWIDTH,CODECS:void 0};c.attributes.CODECS&&c.attributes.CODECS.indexOf(",")>-1&&(p.CODECS=c.attributes.CODECS.split(",").find(function(c){return m.CodecStringHelper.isAudioCodec(c)})),u[d].push(p)}),u);return Object.values(d).forEach(function(c){c.sort(function(c,u){return c.BANDWIDTH-u.BANDWIDTH})}),d}c.extractMediaRenditions=function(c,d,p){var h,f,g,v=c.playlists.filter(p),y=c.media.map(function(c){return c.attributes}),b=u(v),S=y.filter(function(c){var u=b[c["GROUP-ID"]];return k(c)&&(d||u)}),_=y.filter(function(c){return"SUBTITLES"===c.TYPE}),E=y.filter(function(c){return"CLOSED-CAPTIONS"===c.TYPE});return{audio:(h={},S.forEach(function(c){var u=b[c["GROUP-ID"]]||b[Object.keys(b)[0]];c["AVERAGE-BANDWIDTH"]=u[0]["AVERAGE-BANDWIDTH"],c.BANDWIDTH=u[0].BANDWIDTH,c.CODECS=u[0].CODECS;var d=c["AVERAGE-BANDWIDTH"]||c.BANDWIDTH,p=Object.keys(h).find(function(u){var d,p,f=h[u].entries[0];return(null==f?void 0:f.NAME)===c.NAME&&m.CodecStringHelper.canSwitchBetweenAudioCodecs(null!=(d=null==f?void 0:f.CODECS)?d:"",null!=(p=c.CODECS)?p:"")});if(p&&h[p]){var f=h[p];f.entries.push(c),f.MIN_BANDWIDTH=Math.min(f.MIN_BANDWIDTH,d),f.MAX_BANDWIDTH=Math.max(f.MAX_BANDWIDTH,d)}else h[c.CODECS?"".concat(c.NAME," (").concat(c.CODECS,")"):c.NAME]={entries:[c],MIN_BANDWIDTH:d,MAX_BANDWIDTH:d}}),h),subtitles:(f={},_.forEach(function(c){return f[c.NAME]=c}),f),captions:(g={cea608:[],cea708:[]},E.forEach(function(c){c["INSTREAM-ID"]&&0===c["INSTREAM-ID"].indexOf("CC")?g.cea608.push(c):c["INSTREAM-ID"]&&0===c["INSTREAM-ID"].indexOf("SERVICE")&&g.cea708.push(c)}),g)}},c.getPropertiesForAudioGroups=u}(h||(u.HlsParsing=h={}))},95212:function(c,u){var d;Object.defineProperty(u,"__esModule",{value:!0}),u.M3u8Validator=u.M3u8ValidatorError=void 0,(d||(u.M3u8ValidatorError=d={})).EmptyPlaylist="EmptyPlaylist",u.M3u8Validator=function(){function c(){}return c.checkForError=function(u){for(var d=0,p=c.mediaPlaylistRules;d<p.length;d++){var h=p[d];if(!h.fn(u))return h.err}return null},c.mediaPlaylistRules=[{fn:function(c){var u;return(null==(u=c.segments)?void 0:u.length)>0},err:d.EmptyPlaylist}],c}()},81232:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.HLSModuleDefinition=void 0;var p=d(62756),h=d(8251),f=d(56727),m=d(14447),g=d(31474),v=d(37432),y=d(18146),b=d(73315),S=d(23512),_=d(61895),E={setPresentationTimeOffset:b.setPresentationTimeOffset,setTimestampRolloverPositions:b.setTimestampRolloverPositions},T={areDiscontinuitiesMisaligned:_.areDiscontinuitiesMisaligned,getPresentationTimeOffset:_.getPresentationTimeOffset,getHlsState:_.getHlsState,getPlaylistType:_.getPlaylistType,getIsLowLatencyPlaylist:_.getIsLowLatencyPlaylist,getEndlist:_.getEndlist,getDefaultLanguages:_.getDefaultLanguages,getCustomTags:_.getCustomTags,getDiscoSequenceTiming:_.getDiscoSequenceTiming,getDiscoSequenceTimings:_.getDiscoSequenceTimings,getFirstDiscoSequenceTiming:_.getFirstDiscoSequenceTiming,getMergedDiscontinuityTimings:_.getMergedDiscontinuityTimings};u.HLSModuleDefinition={name:p.ModuleName.HLS,module:function(){return{HlsTimelineTracker:f.HlsTimelineTracker,M3u8Loader:m.M3u8Loader,NativeHlsManifestParserUtils:g,parsePlaylist:v.parsePlaylist,PlaylistUtils:y.PlaylistUtils,DiscontinuitySequenceNumberTracker:h.DiscontinuitySequenceNumberTracker,HlsReducer:S.HlsReducer,actions:E,selectors:T,canMakeBlockingPlaylistReload:y.canMakeBlockingPlaylistReload}},dependencies:[p.ModuleName.EngineBitmovin]},u.default=u.HLSModuleDefinition}
20,31474:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.isMediaElement=m,u.isVideoVariant=g,u.parsePlaylist=v,u.isValidMasterPlaylist=function(c){return null!=c&&"playlists"in c&&c.playlists.length>0},u.isValidVariantPlaylist=y,u.parseAndPrepareVariantPlaylist=function(c,u,d,h){if(!c)throw Error("No master manifest available, cannot process variant playlist.");var S,_=v(null!=(S=u.body)?S:"");if(!y(_))throw Error("Variant playlist is not valid.");var E=c.playlists.find(function(c){var d=p.URLHelper.removeDotSegments(c.uri);return p.URLHelper.removeDotSegments(u.url).includes(d)});if(!E)throw Error("Variant playlist was not found in master manifest.");if(!E.id)throw Error("Variant playlist has no id.");var T=c.playlists.every(function(u){return m(u.uri,c)});if(!g(E,c)&&!T)throw Error("Variant playlist is not a video variant");f.PlaylistUtils.extrapolateProgramDateTime(_.segments);var w=f.PlaylistUtils.createDiscontinuitySequences(_,d);return{playlist:_,variant:E,segments:b(_,E.id,h),discontinuitySequences:w}},u.extractAndPrepareSegmentsFromVariantPlaylist=b;var p=d(58313),h=d(37432),f=d(18146);function m(c,u){var d,p;return null!=(p=null==(d=u.media)?void 0:d.some(function(u){var d;return null==(d=u.attributes.URI)?void 0:d.includes(c)}))&&p}function g(c,u){var d,p;return null!=(p=null==(d=u.playlists)?void 0:d.some(function(d){return c.uri.includes(d.uri)&&!m(c.uri,u)}))&&p}function v(c){try{return(0,h.parsePlaylist)(c)}catch{return null}}function y(c){return null!=c&&"segments"in c&&c.segments.length>0}function b(c,u,d){for(var p,h=c.segments,m=h.some(function(c){return void 0!==c.dateTime}),g=0;g<h.length;g++){var v=h[g];if(v.variantPlaylistId=u,v.mediaSequenceNumber=c.mediaSequence+g,!m&&(null==(p=null==d?void 0:d.tweaks)?void 0:p.akamai_datetime_parsing)){var y=f.PlaylistUtils.getProgramDateTimeFromSegmentUrl(v.uri,v.duration);y&&(v.dateTime=y)}}return h}},18146:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.PlaylistUtils=u.isMediaPlaylist=u.isMasterPlaylist=void 0,u.calculateUpdateIntervalInSeconds=function(c,u){if(!S.isLive(u))return 1/0;var d=u.segments[u.segments.length-1];if(void 0!==d){if((0,y.isPlayingLowLatencyHls)(c)){var p,h,f,m=(f=d.parts)&&f.length>0?f[f.length-1].duration:null!=(h=null==(p=u.partInfo)?void 0:p.targetDuration)?h:void 0;if(void 0!==m)return m}return Math.max(c.settings.MINIMUM_ALLOWED_UPDATE_PERIOD,d.duration)}return c.settings.MINIMUM_ALLOWED_UPDATE_PERIOD},u.parseSegmentByteRange=function(c){var u,d;if(c)return{start:null!=(u=c.offset)?u:0,end:(null!=(d=c.offset)?d:0)+c.length-1}},u.generateSegmentEncryptionInfo=function(c,u,d,m){if(c.method===h.HlsEncryptionMethod.NONE)return c;var g,y,b=p(p({},c),{uri:v.URLHelper.buildAbsoluteUrl(u,d,c.uri)});return b.iv=b.iv?(0,f.forceReallocation)(b.iv):(y=(g=m.toString(16)).length)>=32?g:"00000000000000000000000000000000".substring(0,32-y)+g,b},u.getLastMediaSequenceAndPartIndex=T,u.canMakeBlockingPlaylistReload=function(c,u){var d,p,h,f,m=!!(null!=(f=null==(h=c._hls)?void 0:h.serverControl)&&f.canBlockReload),g=T(c),v=E(c)<=((p=null==(d=c._hls)?void 0:d.partTargetDuration)?p*u.LL_HLS_MAX_PLAYLIST_AGE_FOR_BLOCKING_REQUEST_IN_PART_TARGET_MULTIPLES:-1);return m&&void 0!==g&&v},u.canPerformDeltaUpdate=function(c){var u,d,p=null==(d=null==(u=c._hls)?void 0:u.serverControl)?void 0:d.canSkipUntil;return void 0!==p&&!(E(c)>p/2)},u.isDeltaUpdateV2Supported=function(c){var u,d;return(null==(d=null==(u=c._hls)?void 0:u.serverControl)?void 0:d.canSkipUntil)!==void 0&&!0===c._hls.serverControl.canSkipDateRanges},u.calcNumberOfSegmentsToDrop=function(c,u,d){return 0===c.length?0:0===u.length?c.length:u[0]._mediaSequence-c[0]._mediaSequence-d},u.addNewSegments=function(c,u){if(0!==u.length)if(0!==c.length){var d=c[c.length-1],h=u[u.length-1]._mediaSequence-d._mediaSequence,f=(0,m.findFromEnd)(u,function(c){return c._mediaSequence===d._mediaSequence}),g=p(p({},d),f);
vendor: 4,615 bytes, line 20
20if(w(g),c[c.length-1]=g,0!==h){var v,y,b=u.slice(-h);b.forEach(w),v=["_init","_key"],b.forEach(function(c){v.forEach(function(u){g[u]&&!c[u]&&(c[u]=g[u])})}),void 0!==d._playbackTime&&(y=d._playbackTime+d._duration,b.forEach(function(c){void 0===c._playbackTime&&(c._playbackTime=y),y=c._playbackTime+c._duration})),c.push.apply(c,b)}}else c.push.apply(c,u)},u.isDeltaPlaylist=function(c){return c.skippedSegmentsCount>0};var h=d(66790),f=d(20649),m=d(74853),g=d(89927),v=d(58313),y=d(60729),b=d(93187);u.isMasterPlaylist=function(c){return"playlists"in c},u.isMediaPlaylist=function(c){return!(0,u.isMasterPlaylist)(c)};var S=function(){function c(){}return c.createDiscontinuitySequences=function(c,u){var d=c.segments.filter(function(c){return c.duration>0}),p=this.getStartingDiscontinuity(c,d,u),h={id:p,segments:[],duration:0},f=[h];return d.forEach(function(c,u){void 0!==c.discontinuity&&(p++,0===u?h.id=p:(h={id:p,duration:0,segments:[]},f.push(h))),c.discontinuitySequenceNumber=p,h.segments.push(c),h.duration+=c.duration}),f},c.getStartingDiscontinuity=function(u,d,p){var h=u.discontinuitySequence;return null==h&&(h=0!==p.length&&c.isLive(u)?this.findCurrentDiscontinuitySequenceNumber(d,p):0),h},c.findCurrentDiscontinuitySequenceNumber=function(c,u){for(var d=[],p=0,h=0;h<u.length-1;h++)p+=u[h].segments.length,d.push(p);var f=[];return c.forEach(function(c,u){void 0!==c.discontinuity&&f.push(u)}),0===d.length?u[0]?u[0].id:0:0===f.length?u[u.length-1].id:f.length!==d.length?f.length>d.length?u[0].id:u[1].id:this.findFirstPeriodByIndexTracking(d,f,u)},c.findFirstPeriodByIndexTracking=function(c,u,d){if(c[0]>u[0])return d[0].id;if(c[0]<u[0]){for(var p=c[0]-u[0],h=0,f=0;f<c.length;f++)c[f]+p<u[0]&&h++;return d[h].id}var m=function(){return c.every(function(c,d){return c===u[d]})};if(m())return d[0].id;for(var g=1;c.length>0;){for(c.shift(),f=0;f<c.length;f++)c[f]--;if(m())break;g++}return d[g].id},c.extrapolateProgramDateTime=function(c){var u,d=null;if(c.find(function(c,u){return c.dateTime&&(d=u),void 0!==c.dateTime}),null!==d){for(u=d-1;u>=0;u--){var p=c[u+1].dateTime,h=Math.ceil((0,g.toMilliSeconds)(c[u].duration));c[u].dateTime=new Date(p.getTime()-h)}for(u=d+1;u<c.length;u++){var f=c[u-1].dateTime,m=Math.ceil((0,g.toMilliSeconds)(c[u-1].duration));c[u].dateTime=new Date(f.getTime()+m)}}},c.isLive=function(c){return!0!==c.endList},c.getProgramDateTimeFromSegmentUrl=function(c,u){if(c.indexOf("akamaihd.net")>-1){var d=c.match(/segment(\d{9})/);if(d&&2===d.length)return new Date(parseInt(d[1])*Math.round((0,g.toMilliSeconds)(u)))}return null},c.correctStartOffsetToBounds=function(c,u){return c>0&&c>u?u:c<0&&Math.abs(c)>u?-u:c},c.getImpreciseStartOffsetFromStartOfPlaylist=function(c){for(var u=c.start.timeOffset,d=0,p=0;p<c.segments.length-1&&u-c.segments[p+1].duration>0;p++){var h=c.segments[p].duration;u-=h,d+=h}return d},c.getImpreciseStartOffsetFromEndOfPlaylist=function(c){for(var u=Math.abs(c.start.timeOffset),d=0,p=c.segments.length-1;p>=0&&_(u,1)>0;p--)u-=c.segments[p].duration,d+=_(c.segments[p].duration,2);return c.totalDuration-d},c.getImpreciseStartOffset=function(u){return u.start.timeOffset>=0?c.getImpreciseStartOffsetFromStartOfPlaylist(u):c.getImpreciseStartOffsetFromEndOfPlaylist(u)},c.getStartOffsetCloseToPlaylistEnd=function(u,d){var p=u.start.timeOffset;return Math.max(d,p=(p=c.correctStartOffsetToBounds(p,u.totalDuration))<0?-_(Math.abs(p),2):_(p,2))},c.getStartOffset=function(u){var d=u.start.timeOffset;return(d=c.correctStartOffsetToBounds(d,u.totalDuration))<0&&(d+=u.totalDuration),u.start.precise||(d=c.getImpreciseStartOffset(u)),Number(d.toFixed(2))},c.getBaseUrl=function(c,u){var d=c;return d=v.URLHelper.removeUrlParameters(d),!(u=v.URLHelper.removeLastPathPart(u))||0>u.indexOf("/")?c:v.URLHelper.concatUrlParts(d,u)},c}();function _(c,u){return Math.floor(c*Math.pow(10,u))/Math.pow(10,u)}function E(c){var u;return null!=(u=null==c?void 0:c._hls)&&u.requestTimestamp?(0,g.toSeconds)(Date.now()-c._hls.requestTimestamp):1/0}function T(c){var u,d,p=null==(u=c.SegmentList)?void 0:u[0].SegmentURL,h=null==p?void 0:p[p.length-1],f=null!=(d=null==h?void 0:h._parts)?d:[];if(h&&0!==f.length){if((f=f.filter(function(c){return!c.isPreloadHint})).length>0)return{mediaSequence:h._mediaSequence,partIndex:f.length-1};var m=null==p?void 0:p[p.length-2];if(null!=m&&m._parts&&0!==m._parts.length)return{mediaSequence:m._mediaSequence,partIndex:m._parts.length-1}}}function w(c){var u;c._media=(0,f.forceReallocation)(c._media),null==(u=c._metadata)||u.forEach(function(c){return(0,b.forceReallocateStringProps)(c)})}u.PlaylistUtils=S}
20,47596:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.StartTimeExtrapolationDirection=void 0,u.extrapolateStartTime=function(c,u,d){void 0===d&&(d=h.Bidirectional),d===h.Backward?b(c,u):(d===h.Forward||b(c,u),y(c,u))},u.forwardExtrapolateSegmentStartTime=y,u.backwardExtrapolateSegmentStartTime=b,u.getStartTimeExtrapolationReferencePoint=function(c,u,d){if(u.endList)return{index:0,startTime:(0,f.getStartTimeOffset)(d)};var p,h,m=c.segmentInfos[0];if(null!=m&&m.dateTime)return{index:0,startTime:(0,g.toSeconds)(m.dateTime.getTime())};var y=(0,v.getMostRecentlyRefreshedQuality)(d);if(y){var b=S(c,y);if(b)return b}return{index:0,startTime:null!=(h=null==(p=null==y?void 0:y.segmentInfos[0])?void 0:p.startTime)?h:(0,g.toSeconds)(u.requestTimestamp)-u.totalDuration}},u.getStartTimeViaDiscontinuityBoundaries=S,u.findDiscontinuityBoundary=_,u.hasDiscontinuityBoundary=E;var p,h,f=d(77179),m=d(74853),g=d(89927),v=d(72498);function y(c,u){var d=u.index,p=u.startTime;c[d].startTime=p;for(var h=d+1;h<c.length;h++)c[h].startTime=c[h-1].startTime+c[h-1].duration}function b(c,u){var d=u.index,p=u.startTime;c[d].startTime=p;for(var h=d-1;h>=0;h--)c[h].startTime=c[h+1].startTime-c[h].duration}function S(c,u){if(E(c.segmentInfos)&&E(u.segmentInfos)){var d=u.segmentInfos[u.segmentInfos.length-1],p=_(u.segmentInfos,d.discontinuitySequenceNumber),h=u.segmentInfos[p],f=_(c.segmentInfos,h.discontinuitySequenceNumber);if(null!=f)return{index:f,startTime:h.startTime}}}function _(c,u){return E(c)?(0,m.findIndexFromEnd)(c,function(c){return!!c.isDiscontinuityStart&&c.discontinuitySequenceNumber===u}):-1}function E(c){if(!c.length)return!1;if(c[0].isDiscontinuityStart)return!0;var u=c[0],d=c[c.length-1];return u.discontinuitySequenceNumber!==d.discontinuitySequenceNumber}(p=h||(u.StartTimeExtrapolationDirection=h={})).Backward="backward",p.Forward="forward",p.Bidirectional="Bidirectional"},97123:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.WebWorkerParser=void 0,u.WebWorkerParser=function(){function c(c){var u=this;this.U8=!1,this.V8=[],this.W8=function(c){var d=c.data;if(["parsedPlaylist","error"].includes(d.action)&&0!==u.V8.length){var p=u.V8.shift();if("error"===d.action&&(null==p||p.rejectFn(d.data)),"parsedPlaylist"===d.action&&(null==p||p.resolveFn(d.data)),u.V8.length>0){var h=u.V8[0];u.T8.postMessage(h.message)}else u.U8=!1}};try{var p=d(62903);this.T8=new p,this.T8.onmessage=this.W8}catch(u){c.warn("WebWorkerParser: Could not create web worker",u)}}return c.prototype.parsePlaylist=function(c,u){var d=this;return new Promise(function(p,h){var f={action:"parseHlsPlaylist",payload:{data:c,options:u}};d.V8.push({resolveFn:p,rejectFn:h,message:f}),d.U8||(d.U8=!0,d.T8.postMessage(f))})},c.getInstance=function(u){return c.instance||(c.instance=new c(u)),c.instance},c.instance=null,c}()},93187:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.forceReallocateStringProps=function c(u){Object.keys(u).forEach(function(d){"string"==typeof u[d]&&(u[d]=(0,p.forceReallocation)(u[d])),"object"==typeof u[d]&&c(u[d])})};var p=d(20649)},52610:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.getTimingInfoFromSegmentList=function(c){return c.reduce(function(c,u,d,p){var h=u._discontinuitySequenceNumber,f=u._playbackTime;if(void 0===c.discoTimings[h]){c.discoTimings[h]={startTime:f,endTime:1/0};var m=c.discoTimings[h-1];m&&(m.endTime=f)}return d===p.length-1&&(c.discoTimings[h].endTime=f+u._duration),c.totalDuration+=u._duration,c},{totalDuration:0,discoTimings:{}})}},5707:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},h=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.generateRendition=function(c){var u,d,h;return{name:c.name,attributes:p(p({},c.attributes),{TYPE:null==(u=c.attributes)?void 0:u.TYPE,"GROUP-ID":null==(d=c.attributes)?void 0:d["GROUP-ID"],NAME:null==(h=c.attributes)?void 0:h.NAME})}},u.generateStartAttributes=function(c){var u,d;return null!=(u=c.attributes)&&u.hasOwnProperty("TIME-OFFSET")&&(d={timeOffset:Number(c.attributes["TIME-OFFSET"]),precise:"YES"===c.attributes.PRECISE}),c.attributes&&d&&d.hasOwnProperty("timeOffset")&&(c.attributes["TIME-OFFSET"]=d.timeOffset,c.attributes.PRECISE=d.precise),d},u.generatePartInfoTag=function(c){return{targetDuration:parseFloat(c["PART-TARGET"])}},u.generateServerControlTag=function(c){var u={canBlockReload:!1};return c.attributes&&(c.attributes["CAN-SKIP-UNTIL"]&&(u.canSkipUntil=parseFloat(c.attributes["CAN-SKIP-UNTIL"])),void 0!==u.canSkipUntil&&c.attributes["CAN-SKIP-DATERANGES"]&&(u.canSkipDateRanges="YES"===c.attributes["CAN-SKIP-DATERANGES"]),c.attributes["HOLD-BACK"]&&(u.holdBack=parseFloat(c.attributes["HOLD-BACK"])),c.attributes["PART-HOLD-BACK"]&&(u.partHoldBack=parseFloat(c.attributes["PART-HOLD-BACK"])),c.attributes["CAN-BLOCK-RELOAD"]&&(u.canBlockReload="YES"===c.attributes["CAN-BLOCK-RELOAD"])),u},u.generateSkipTag=function(c){var u={skippedSegments:0,recentlyRemovedDateranges:[]};return c.attributes&&(c.attributes["SKIPPED-SEGMENTS"]&&(u.skippedSegments=parseInt(c.attributes["SKIPPED-SEGMENTS"])),c.attributes["RECENTLY-REMOVED-DATERANGES"]&&(u.recentlyRemovedDateranges=c.attributes["RECENTLY-REMOVED-DATERANGES"].split("	"))),u},u.generatePartTag=function(c,u){var d={uri:(0,g.forceReallocation)(c.URI),duration:parseFloat(c.DURATION)};if("YES"===c.INDEPENDENT&&(d.independent=!0),c.BYTERANGE){var p=c.BYTERANGE.split("@"),h=parseInt(p[0]),f=parseInt(p[1]);isNaN(f)&&(f=null!=u&&u.byteRange?u.byteRange.end+1:0),d.byteRange={start:f,end:f+h-1}}return"YES"===c.GAP&&(d.gap=!0),d},u.generatePreloadHintTag=function(c,u){if("PART"===c.TYPE){var d={uri:(0,g.forceReallocation)(c.URI),duration:u,isPreloadHint:!0};return(p=v(c))&&(d.byteRange=p),{part:d}}if("MAP"===c.TYPE){var p,h={url:(0,g.forceReallocation)(c.URI)};return(p=v(c))&&(h.byteRange=p),{init:h}}return{}},u.generateStreamInfTag=function(c,u){var d,h,f,m,g,v={name:c.name,uri:u,attributes:p(p({},c.attributes),{BANDWIDTH:null==(d=c.attributes)?void 0:d.BANDWIDTH})};return null!=(h=c.attributes)&&h.RESOLUTION&&(v.attributes.RESOLUTION=S(c)),null!=(f=c.attributes)&&f.BANDWIDTH&&(v.attributes.BANDWIDTH=parseInt(c.attributes.BANDWIDTH)),null!=(m=c.attributes)&&m["AVERAGE-BANDWIDTH"]&&(v.attributes["AVERAGE-BANDWIDTH"]=parseInt(c.attributes["AVERAGE-BANDWIDTH"])),null!=(g=c.attributes)&&g["PROGRAM-ID"]&&(v.attributes["PROGRAM-ID"]=parseInt(c.attributes["PROGRAM-ID"])),v.id=y(v.attributes),v},u.generateVariantPlaylistId=y,u.generateSessionKeyTag=function(c){b(c)},u.generateIFrameStreamInfTag=function(c){var u,d,p;null!=(u=c.attributes)&&u.BANDWIDTH&&(c.attributes.BANDWIDTH=parseInt(c.attributes.BANDWIDTH)),null!=(d=c.attributes)&&d["A
20VERAGE-BANDWIDTH"]&&(c.attributes["AVERAGE-BANDWIDTH"]=parseInt(c.attributes["AVERAGE-BANDWIDTH"],10)),null!=(p=c.attributes)&&p.RESOLUTION&&(c.attributes.RESOLUTION=S(c))},u.generateSegmentEntrySkeleton=function(){return{uri:"",duration:0,mediaSequence:0}},u.generateCueTag=function(c,u){var d={type:u};if(c.attributes){var p=[];for(var h in c.attributes)if(c.attributes.hasOwnProperty(h)){var f=c.attributes[h]?"".concat(h,"=").concat(c.attributes[h]):h;p.push(f)}d.attributes=p}return d},u.generateDateRange=function(c){var u={type:m.MetadataType.DATERANGE};if(c.attributes){u.clientAttributes={};var d=c.attributes;for(var p in d)if(d.hasOwnProperty(p)){var h=function(c,u){var d=(0,g.forceReallocation)(u);return["X-RESUME-OFFSET","X-PLAYOUT-LIMIT"].includes(c)?Number(d):["X-SNAP","X-RESTRICT"].includes(c)?d.split(","):d}(p,d[p]);p.startsWith("X-")?u.clientAttributes[(0,g.kebabCaseToCamelCase)(p.substring(2))]=h:u[(0,g.kebabCaseToCamelCase)(p)]=h}}return u.duration&&(u.duration=Number(u.duration)),u.plannedDuration&&(u.plannedDuration=Number(u.plannedDuration)),u.endOnNext&&(u.endOnNext=!0),u},u.generateKeyTag=function(c){var u;if(b(c),c.attributes&&"NONE"!==c.attributes.METHOD&&c.attributes.URI){var d={method:null!=(u=f.HlsEncryptionMethods.find(function(u){return u===c.attributes.METHOD}))?u:f.HlsEncryptionMethod.AES_128,uri:(0,g.forceReallocation)(c.attributes.URI)};return void 0!==c.attributes.IV&&(d.iv=c.attributes.IV),c.attributes.KEYFORMAT&&(d.keyformat=(0,g.forceReallocation)(c.attributes.KEYFORMAT)),c.attributes.KEYFORMATVERSIONS&&(d.keyformatversions=(0,g.forceReallocation)(c.attributes.KEYFORMATVERSIONS)),c.attributes.KEYID&&(d.keyid=(0,g.forceReallocation)(c.attributes.KEYID)),d}},u.generateByteRangeTag=function(c,u){var d;if(c.value){var p=c.value.split("@"),h=p[0],f=p[1],m={length:parseInt(h||"0")};if(f)m.offset=parseInt(f);else{var g=u[u.length-1];null!=g&&g.byterange&&(m.offset=(null!=(d=g.byterange.offset)?d:0)+g.byterange.length)}return m}},u.generateMapTag=function(c,u){var d,p;if(null!=(d=c.attributes)&&d.URI){var f={url:(0,g.forceReallocation)(c.attributes.URI)};if(null!=(p=c.attributes)&&p.BYTERANGE){var m=c.attributes.BYTERANGE.split("@"),v=m[0],y=m[1];f.byteRange={start:parseInt(y),end:parseInt(y)+parseInt(v)-1}}return u.keys.length>0&&(f.keys=h([],u.keys,!0),u.keyInUse=!0),f}},u.generateCustomTag=function(c){try{c=(0,g.forceReallocation)(c);var u=/^#([^:=]*)([:=])?(.*)$/.exec(c);if(!(null!=u&&u[1]))return;var d={name:u[1]},p="";if("="===u[2]&&u[3])p=u[3];else if(":"===u[2]&&u[3]){var h=P.exec(u[3]);h&&"="===h[2]&&h[3]?d.attributes=function(c){for(var u=c.split(_),d=u.length,p={};d--;)if(""!==u[d]){var h=E.exec(u[d]);if(h){var f=h.slice(1),m=f[0],g=f[1];p[m.trim()]=g.trim().replace(T,"$1")}}return p}(u[3]):p=u[3]}return p&&(d.value=p.replace(w,"$1")),d}catch{return}};var f=d(66790),m=d(3714),g=d(20649);function v(c){var u=parseInt(c["BYTERANGE-START"]),d=parseInt(c["BYTERANGE-END"]);if(!isNaN(u)||!isNaN(d))return{start:isNaN(u)?0:u,end:isNaN(d)?0x1fffffffffffff:d}}function y(c){var u="";return c.RESOLUTION&&(u+=c.RESOLUTION.height+"_"),u+c.BANDWIDTH}function b(c){var u;if(null!=(u=c.attributes)&&u.IV){var d=c.attributes.IV;(d.startsWith("0x")||d.startsWith("0X"))&&(c.attributes.IV=d.substring(2))}}function S(c){var u,d={width:0,height:0},p=null==(u=c.attributes)?void 0:u.RESOLUTION.split("x");return p[0]&&(d.width=parseInt(p[0])),p[1]&&(d.height=parseInt(p[1])),d}var _=/(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))/,E=/([^=]*)=(.*)/,T=/^['"](.*)['"]$/,w=/^['"](.*)['"]$/g,P=/^([^:="]*)([:=])?(.*)$/},39297:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.TextParser=void 0;var d=/[ \t]+/gm;u.TextParser=function(){function c(c){this.data=c,this.B8=0}return c.prototype.M9=function(){return this.B8===this.data.length},c.prototype.skipWhitespace=function(){this.readRegex(d)},c.prototype.readRegex=function(c){var u=this.N9(c);if(!this.M9()&&void 0!==u&&u.position===this.B8)return this.B8+=u.length,u.results},c.prototype.N9=function(c){c.lastIndex=this.B8;var u=c.exec(this.data);if(null!==u)return{position:u.index,length:u[0].length,results:u}},c}()}
20,37432:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.parsePlaylist=function(c,u){void 0===u&&(u={});var d=-1===c.indexOf("#EXTINF")?h.Master:h.Media,p=c.replace(y,`
21`).trim().split(/\n+/m);if(!b.test((0,f.removeTrailingWhitespaces)(p[0])))throw Error("Playlist parsing failed: missing #EXTM3U tag");if(d===h.Media)return(0,g.parseVariant)(p,u);for(var S,_=[],E=[],T=[],w=1,P=!0,A=!1,I=!0,M=0;M<p.length;M++){var R=(0,f.removeTrailingWhitespaces)(p[M]),k=p[M+1];if((0,f.isCustomTag)(R))!function(c,u){var d=(0,v.generateCustomTag)(u);d&&c.push(d)}(_,R);else if(I)I=!1;else{var x=(0,m.parseTag)(R);switch(x.name){case"EXT-X-STREAM-INF":T.push((0,v.generateStreamInfTag)(x,(0,f.removeTrailingWhitespaces)(k))),I=!0;break;case"EXT-X-MEDIA":var C=(0,v.generateRendition)(x);E.push(C),_.push(C);break;case"EXT-X-VERSION":w=Number(x.value);break;case"EXT-X-START":S=(0,v.generateStartAttributes)(x),_.push(x);break;case"EXT-X-ALLOW-CACHE":P="YES"===x.value||void 0===x.value;break;case"EXT-X-INDEPENDENT-SEGMENTS":A=!0,_.push(x);break;case"EXT-X-I-FRAME-STREAM-INF":(0,v.generateIFrameStreamInfTag)(x),_.push(x);break;case"EXT-X-SESSION-DATA":default:_.push(x);break;case"EXT-X-SESSION-KEY":(0,v.generateSessionKeyTag)(x),_.push(x)}}}var O={version:w,allowCache:P,independentSegments:A,hasM3u:!0,media:E,playlists:T,tags:_=_.concat(T)};return S&&(O.start=S),O};var p,h,f=d(73577),m=d(41908),g=d(1945),v=d(5707),y=/\r\n|\r(?=[^\n]|$)/gm,b=/^#EXTM3U($|[ \t\n])/m;(p=h||(h={})).Master="master",p.Media="media"},73577:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},h=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.parseSegments=function(c,u,d,S){void 0===S&&(S={});for(var w,P=[],A=0,I=(0,b.generateSegmentEntrySkeleton)(),M=h([],u,!0),R=0,k=d.mediaSequence,x={keys:[],keyInUse:!1}
21,C=function(c){var u,d,p,f,m;u=I,d=R,p=w,f=M,m=k,u.duration=d,u.uri=c,u.mediaSequence=m,p&&(u.init=p),f.length>0&&(u.customTags=f),x.keys.length>0&&(u.keys=h([],x.keys,!0),x.keyInUse=!0),P.push(I),A+=R,k++,I=(0,b.generateSegmentEntrySkeleton)(),M=[],R=0},O=0;O<c.length;O++){var D=E(c[O]);""!==D&&(D.startsWith("#")?T(D)?_(d,M,D):function(c){var u,g,_=(0,v.parseTag)(c);switch(_.name){case"EXTINF":R=parseFloat(_.value);break;case"EXT-X-BYTERANGE":I.byterange=(0,b.generateByteRangeTag)(_,P);break;case"EXT-X-DISCONTINUITY":I.discontinuity=!0;break;case"EXT-X-PROGRAM-DATE-TIME":E=I,_.value&&(E.dateTime=new Date(_.value));break;case"EXT-X-KEY":if((null==(u=_.attributes)?void 0:u.METHOD)==="NONE"){x.keys=[{method:f.HlsEncryptionMethod.NONE}];break}x.keyInUse&&(x.keys=[],x.keyInUse=!1),void 0!==(T=(0,b.generateKeyTag)(_))&&x.keys.push(T);break;case"EXT-X-MAP":w=(0,b.generateMapTag)(_,x);break;case"EXT-X-DATERANGE":d.dateRange.push((0,b.generateDateRange)(_));break;case"EXT-X-CUE-OUT-CONT":I.cueTag=(0,b.generateCueTag)(_,"CUE-OUT-CONT");break;case"EXT-X-CUE-OUT":I.cueTag=(0,b.generateCueTag)(_,"CUE-OUT");break;case"EXT-X-CUE-IN":I.cueTag=(0,b.generateCueTag)(_,"CUE-IN");break;case"EXT-X-SCTE35":void 0===(A=I).scte35&&(A.scte35=[]),A.scte35.push({type:m.MetadataType.SCTE,attributes:p({CUE:null==(C=_.attributes)?void 0:C.CUE},_.attributes)});break;case"EXT-X-PART":var E,T,A,C,O,D=I;if(S.parsePartTags){D.parts=null!=(O=D.parts)?O:[];var L=D.parts[D.parts.length-1];D.parts.push((0,b.generatePartTag)(_.attributes,L))}break;case"EXT-X-PRELOAD-HINT":var N,U=(N=d.partInfo,S.parsePartTags&&N?(0,b.generatePreloadHintTag)(_.attributes,N.targetDuration):{});U.init&&(w=U.init,x.keys.length>0&&(w.keys=h([],x.keys,!0),x.keyInUse=!0)),U.part&&(I.parts=null!=(g=I.parts)?g:[],I.parts.push(U.part));break;case"EXT-X-SKIP":var F=(0,b.generateSkipTag)(_);d.skippedSegmentsCount=F.skippedSegments,k+=F.skippedSegments;break;case"EXT-X-ENDLIST":d.endList=!0;break;case"EXT-X-MEDIA-SEQUENCE":(0,y.resolvePlaylistTag)(d,_,M),k=d.mediaSequence,d.skippedSegmentsCount&&(k+=d.skippedSegmentsCount);break;default:(0,y.resolvePlaylistTag)(d,_,M)}}(D):C(D))}I.parts&&I.parts.length>0&&(R=I.parts.reduce(function(c,u){return c+u.duration},0),C(g.PHANTOM_SEGMENT_URL)),d.segments=P,d.totalDuration=A},u.addCustomTagToPlaylistTagList=S,u.handleCustomTag=_,u.removeTrailingWhitespaces=E,u.isCustomTag=T;var f=d(66790),m=d(3714),g=d(63066),v=d(41908),y=d(1945),b=d(5707);function S(c,u){void 0===c.tags&&(c.tags=[]),u&&c.tags.push(u)}function _(c,u,d){u.push({type:m.MetadataType.CUSTOM,attributes:d}),S(c,(0,b.generateCustomTag)(d))}function E(c){return c.replace(/^[ \t]+/g,"")}function T(c){return/^#(?!EXT)/m.test(c)}},41908:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.parseTag=function(c){var u,d=h.exec(c);if(!d)throw Error("Invalid tag "+c);var g,v=d[1],y=d[2],b={};if(y){var S=new p.TextParser(y),_=void 0,E=S.readRegex(f);for(E&&(g=null!=(u=E[1])?u:E[2]);_=S.readRegex(m);){var T=_[1],w=_[2]||_[3];if(T.includes(",")){var P=T.split(","),A=P[0];T=P[1].trim(),b[A]=void 0}b[T]=w,S.skipWhitespace()}}return{name:v,attributes:b,value:g}};var p=d(39297),h=/^#(EXT[^:]*)(?::(.*))?$/,f=/^(?:"([^"]*)"|([^,=]+))(?:,|$)/g,m=/([^=]+)=*(?:"([^"]*)"|([^",]*))(?:,|$)/g},1945:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.SEGMENT_TAGS=void 0,u.parseVariant=function(c,d){void 0===d&&(d={});for(var p={version:1,allowCache:!0,hasM3u:!0,endList:!1,segments:[],dateRange:[],skippedSegmentsCount:0,targetDuration:0,totalDuration:0,mediaSequence:0},h=[],g=0;g<c.length;g++){var b=(0,f.removeTrailingWhitespaces)(c[g]);if(""!==b)if((0,f.isCustomTag)(b))(0,f.handleCustomTag)(p,h,b);else{var S=(0,m.parseTag)(b);if(u.SEGMENT_TAGS.includes(S.name))return(0,f.parseSegments)(c.slice(g),h,p,d),v(p),p;y(p,S,h)}}return v(p),p},u.resolvePlaylistTag=y;
vendor: 4,447 bytes, line 21
21var h=d(3714),f=d(73577),m=d(41908),g=d(5707);function v(c){var u;"EVENT"===c.playlistType&&(c.discontinuitySequence=null!=(u=c.discontinuitySequence)?u:0)}function y(c,u,d){switch(u.name){case"EXT-X-VERSION":c.version=Number(u.value);break;case"EXT-X-START":c.start=(0,g.generateStartAttributes)(u);break;case"EXT-X-INDEPENDENT-SEGMENTS":c.independentSegments=!0;break;case"EXT-X-TARGETDURATION":u.value&&(c.targetDuration=parseInt(u.value));break;case"EXT-X-MEDIA-SEQUENCE":u.value&&(c.mediaSequence=parseInt(u.value));break;case"EXT-X-DISCONTINUITY-SEQUENCE":u.value&&(c.discontinuitySequence=parseInt(u.value));break;case"EXT-X-PLAYLIST-TYPE":c.playlistType="EVENT"===u.value?"EVENT":"VOD";break;case"EXT-X-PART-INF":c.partInfo=(0,g.generatePartInfoTag)(u.attributes);break;case"EXT-X-ALLOW-CACHE":c.allowCache="NO"!==u.value;break;case"EXT-X-SERVER-CONTROL":c.serverControl=(0,g.generateServerControlTag)(u);break;case"EXT-X-DATERANGE":c.dateRange.push((0,g.generateDateRange)(u));break;case"EXT-X-ENDLIST":c.endList=!0;break;case"EXTM3U":break;default:d.push(p({type:h.MetadataType.CUSTOM},u)),(0,f.addCustomTagToPlaylistTagList)(c,u)}}u.SEGMENT_TAGS=["EXTINF","EXT-X-BYTERANGE","EXT-X-DISCONTINUITY","EXT-X-PROGRAM-DATE-TIME","EXT-X-KEY","EXT-X-GAP","EXT-X-BITRATE","EXT-X-PART","EXT-X-MAP","EXT-X-CUE-OUT-CONT","EXT-X-CUE-OUT","EXT-X-CUE-IN","EXT-X-SCTE35","EXT-X-SKIP"]},73315:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.setContentLocationId=u.setTimestampRolloverPositions=u.setPresentationTimeOffset=u.setDiscoTimings=u.setCustomTags=u.setDefaultLanguages=u.setEndlist=u.setIsLowLatencyPlaylist=u.setPlaylistType=u.setMasterPlaylistString=void 0;var p=d(35267),h=d(45861);u.setMasterPlaylistString=function(c){return(0,p.createAction)(h.HlsActionType.SetMasterPlaylistString,c)},u.setPlaylistType=function(c){return(0,p.createAction)(h.HlsActionType.SetPlaylistType,c)},u.setIsLowLatencyPlaylist=function(c){return(0,p.createAction)(h.HlsActionType.SetIsLowLatencyPlaylist,c)},u.setEndlist=function(c){return(0,p.createAction)(h.HlsActionType.SetEndlist,c)},u.setDefaultLanguages=function(c){return(0,p.createAction)(h.HlsActionType.SetDefaultLanguages,c)},u.setCustomTags=function(c){return(0,p.createAction)(h.HlsActionType.SetCustomTags,c)},u.setDiscoTimings=function(c,u){return(0,p.createAction)(h.HlsActionType.SetDiscoTimings,{mimeType:c,discoTimings:u})},u.setPresentationTimeOffset=function(c,u){return(0,p.createAction)(h.HlsActionType.SetPresentationTimeOffset,{discoSequenceNumber:c,presentationTimeOffset:u})},u.setTimestampRolloverPositions=function(c,u){return(0,p.createAction)(h.HlsActionType.SetTimestampRolloverPositions,{next:c,previous:u})},u.setContentLocationId=function(c){return(0,p.createAction)(h.HlsActionType.SetContentLocationId,{locationId:c})}},23512:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},f=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.HlsReducer=void 0,u.extrapolateSegmentStartTime=function(c,u,d){var p=f([],c,!0);return p[u]=h({},p[u]),p[u].startTime=d,function(c,u){for(var d=u-1;d>=0;d--)c[d]=h({},c[d]),c[d].startTime=c[d+1].startTime-c[d].duration}(p,u),function(c,u){for(var d=u+1;d<c.length;d++)c[d]=h({},c[d]),c[d].startTime=c[d-1].startTime+c[d-1].duration}(p,u),p};var m=d(3793),g=d(45861);u.HlsReducer=(0,m.default)({masterPlaylist:{string:""},defaultLanguages:{},discontinuitySequenceTiming:{},presentationTimeOffsets:{},timestampRolloverPositions:{previous:-1,next:-1}},((p={})[g.HlsActionType.SetMasterPlaylistString]=function(c,u){var d;return d=u.payload,c.masterPlaylist.string?c:h(h({},c),{masterPlaylist:{string:d}})},p[g.HlsActionType.SetPlaylistType]=function(c,u){var d;return d=u.payload,h(h({},c),{playlistType:d})},p[g.HlsActionType.SetIsLowLatencyPlaylist]=function(c,u){var d;return d=u.payload,h(h({},c),{isLowLatencyPlaylist:d})},p[g.HlsActionType.SetEndlist]=function(c,u){var d;return d=u.payload,h(h({},c),{endlist:d})},p[g.HlsActionType.SetDefaultLanguages]=function(c,u){var d,p,f;return d=u.payload,p={},f={}
21,d.media.forEach(function(c){var u=!!c.attributes;if(u){var d=c.attributes,h=d.TYPE,m=d.LANGUAGE;m&&null!=m&&(u&&"YES"===c.attributes.DEFAULT&&!p[h]&&(p[h]={name:c.attributes.NAME,language:m}),"YES"!==c.attributes.AUTOSELECT||f[h]||(f[h]={name:c.attributes.NAME,language:m}))}}),h(h({},c),{defaultLanguages:h(h({},f),p)})},p[g.HlsActionType.SetCustomTags]=function(c,u){var d;return d=u.payload,h(h({},c),{customTags:d.tags})},p[g.HlsActionType.SetDiscoTimings]=function(c,u){var d,p,f,m;return f=(d=u.payload).mimeType,m=d.discoTimings,h(h({},c),{discontinuitySequenceTiming:h(h({},c.discontinuitySequenceTiming),((p={})[f]=m,p))})},p[g.HlsActionType.SetPresentationTimeOffset]=function(c,u){var d,p,f,m;return f=(d=u.payload).discoSequenceNumber,m=d.presentationTimeOffset,h(h({},c),{presentationTimeOffsets:h(h({},c.presentationTimeOffsets),((p={})[f]=m,p))})},p[g.HlsActionType.SetTimestampRolloverPositions]=function(c,u){var d;return d=u.payload,h(h({},c),{timestampRolloverPositions:d})},p[g.HlsActionType.SetContentLocationId]=function(c,u){var d;return d=u.payload,h(h({},c),{contentLocationId:d.locationId})},p))},61895:function(c,u){var d=this&&this.__assign||function(){return(d=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};function p(c){var u={};return Object.keys(c).forEach(function(d){var p;Object.keys(null!=(p=c[d])?p:{}).forEach(function(p){var h,f,m,g,v,y,b,S,_,E;u[p]={startTime:Math.max(null!=(m=null==(f=null==(h=c[d])?void 0:h[p])?void 0:f.startTime)?m:-1/0,null!=(v=null==(g=u[p])?void 0:g.startTime)?v:-1/0),endTime:Math.min(null!=(S=null==(b=null==(y=c[d])?void 0:y[p])?void 0:b.endTime)?S:1/0,null!=(E=null==(_=u[p])?void 0:_.endTime)?E:1/0)}})}),u}Object.defineProperty(u,"__esModule",{value:!0}),u.getContentLocationId=u.getPresentationTimeOffset=u.getMergedDiscontinuityTimings=u.getFirstDiscoSequenceTiming=u.getDiscoSequenceTimings=u.getDiscoSequenceTiming=u.getCustomTags=u.getDefaultLanguages=u.getEndlist=u.getIsLowLatencyPlaylist=u.getPlaylistType=void 0,u.getHlsState=function(c){return c.hls},u.computeMergedDiscontinuityTimings=p,u.areDiscontinuitiesMisaligned=function(c,u,d){if(void 0===d&&(d=2),u.length<=1||!c.discontinuitySequenceTiming)return!1;var h,f=(h=c.discontinuitySequenceTiming,u.reduce(function(c,u){return u in h&&(c[u]=h[u]),c},{})),m=p(f);return 1!==Object.keys(m).length&&!Object.keys(m).every(function(c,p){var h=m[c];return u.every(function(u){var g,v=null==(g=f[u])?void 0:g[c];if(!v)return!0;var y=Math.abs(v.startTime-h.startTime),b=Math.abs(v.endTime-h.endTime);return 0===p?b<=d:p===Object.keys(m).length-1?y<=d:y<=d&&b<=d})})},u.getPlaylistType=function(c){return c.playlistType},u.getIsLowLatencyPlaylist=function(c){return c.isLowLatencyPlaylist},u.getEndlist=function(c){return c.endlist},u.getDefaultLanguages=function(c){return c.defaultLanguages},u.getCustomTags=function(c){return c.customTags},u.getDiscoSequenceTiming=function(c,u,p){var h,f;return null!=(f=null==(h=c.discontinuitySequenceTiming)?void 0:h[u])&&f[p]?d({},c.discontinuitySequenceTiming[u][p]):null},u.getDiscoSequenceTimings=function(c,u){var p;return null!=(p=c.discontinuitySequenceTiming)&&p[u]?d({},c.discontinuitySequenceTiming[u]):null},u.getFirstDiscoSequenceTiming=function(c){var d,p=(0,u.getMergedDiscontinuityTimings)(c);return null!=(d=p[Object.keys(p)[0]])?d:{startTime:0,endTime:0}},u.getMergedDiscontinuityTimings=function(c){var u;return p(null!=(u=c.discontinuitySequenceTiming)?u:{})},u.getPresentationTimeOffset=function(c,u){return c.presentationTimeOffsets[u]},u.getContentLocationId=function(c){return c.contentLocationId}},45861:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.HlsActionType=void 0,(p=d||(u.HlsActionType=d={})).SetMasterPlaylistString="@instance/hls/setmasterplayliststring",p.SetPlaylistType="@instance/hls/setplaylisttype",p.SetIsLowLatencyPlaylist="@instance/hls/setislowlatencyplaylist",p.SetEndlist="@instance/hls/setendlist",p.SetDefaultLanguages="@instance/hls/setsefaultlanguages",p.SetCustomTags="@instance/hls/setsustomtags",p.SetDiscoTimings="@instance/hls/setdiscotimings",p.SetPresentationTimeOffset="@instance/hls/setpresentationtimeoffset",p.SetTimestampRolloverPositions="@instance/hls/settimestamprolloverpositions",p.SetContentLocationId="@instance/hls/setcontentlocationid"}
21,5671:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.setSegmentInfos=function(c,u){return(0,p.createAction)(h.SegmentInfoMapActionType.SetSegmentInfos,{qualityPath:c,updatedEntry:u})},u.updateSegmentInfos=function(c,u){return(0,p.createAction)(h.SegmentInfoMapActionType.UpdateSegmentInfos,{qualityPath:c,updatedEntry:u})};var p=d(35267),h=d(49713)}},function(c){return c(c.s=81232)}])}(bitmovinplayerHls);var bitmovinplayerHlsExports=bitmovinplayerHls.exports;let HLSModule=getDefaultExportFromCjs$1(bitmovinplayerHlsExports);var bitmovinplayerMserenderer={exports:{}};!function(c){var u;self,c.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[737],{1765:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.BufferMimeCodecMap=void 0;var p=d(77753),h=d(91678),f=d(46151),m=d(33436),g=d(94685),v=d(85434);u.BufferMimeCodecMap=function(){function c(c,u){this.AV={},this.BV=c,this.CV=u}return c.prototype.DV=function(c){var u,d,m=null==(u=this.BV)?void 0:u.getState();(0,p.isInstanceState)(m)&&y(this.CV)&&((0,f.getMetricsState)(m)[c]||null==(d=this.BV)||d.dispatch((0,h.initializeMetricsForMimeType)(c,this.CV)))},c.prototype.EV=function(c){var u;null==(u=this.BV)||u.dispatch((0,h.removeMetricsForMimeType)(c))},c.prototype.add=function(c,u){var d;this.AV[c]=u,this.DV(c),null==(d=this.BV)||d.dispatch((0,h.addMetricsValue)(c,m.MetricType.StalledSeconds,0))},c.prototype.remove=function(c){var u=this,d=v.MimeTypeHelper.getMediaType(c);Object.keys(this.AV).forEach(function(c){v.MimeTypeHelper.getMediaType(c)===d&&(u.EV(c),delete u.AV[c])})},c.prototype.has=function(c,u){var d=this,p=v.MimeTypeHelper.getMediaType(c),h=v.MimeTypeHelper.extractContainerType(c);return Object.keys(this.AV).some(function(f){var m=v.MimeTypeHelper.getMediaType(f),g=v.MimeTypeHelper.extractContainerType(f);return m===p&&g===h&&u===d.AV[c]})},c.prototype.update=function(c,u){this.remove(c),this.add(c,u)},c.prototype.forEach=function(c){var u=this;Object.keys(this.entries()).forEach(function(d){return c(d,u.entries()[d])})},c.prototype.entries=function(){return this.AV},c.prototype.dispose=function(){this.AV={},this.BV=void 0,this.CV=void 0},c}();var y=function(c){return(0,g.isObject)(c)}},98331:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.GapHandler=void 0;var p=d(3714),h=d(77753),f=d(87827),m=d(86897),g=d(15971),v=d(21513),y=d(85434),b=d(15487),S=d(60877),_=d(88844),E=d(19274),T=d(80354),w=d(82889),P=[E.MediaElementEvent.seeking,E.MediaElementEvent.seeked,E.MediaElementEvent.pause,E.MediaElementEvent.playing,E.MediaElementEvent.error];function A(c,u){return c.find(function(c){return c.start-w.Ranges.TIME_FUDGE_FACTOR>=u})}u.GapHandler=function(){function c(c){var u,d,v=this;this.PV=!1,this.play=function(){v.QV=Date.now()},this.UV=function(){if(!v.FV.isDisposed&&void 0!==v.GV){var c=v.GV.paused,u=v.GV.seeking,d=v.vW(v.GV.currentTime),p=v.TV(),h=v.SV();c||u&&!d||p||(v.IV++,h||v.VV())}},this.VV=function(){var c,u=v.FV.store.getState();if((0,h.isInstanceState)(u)&&v.GV){var d=(0,f.getPlayerState)(u);((0,f.getIsSeeking)(d)||null!=(c=v.GV)&&c.seeking)&&!v.vW(v.GV.currentTime)||v.sW()}},this.WV=function(){var c=(0,g.getSourceState)(v.FV);c&&!(0,m.getIsTimestampRollingOver)(c)&&v.sW()},this.XV=function(){v.OV=void 0},this.bV=function(){if(v.LV=Date.now(),v.GV&&!v.GV.paused&&!v.GV.seeking){v.NV||(v.RV(),v.NV=!0);var c=v.FV.renderer.getCurrentTime(!0);if(v.YV(c))v.aV();else{var u=v.FV.renderer.getVideoElementBufferedRanges();if(u.length>1&&!v.OV){var d=v.FV.settings.MIN_SIZE_FOR_GAP_SKIPPING;v.OV=function(c,u,d){for(var p=0;p<c.length-1;p++){var h=c[p].end,f=c[p+1].start;if(h>u&&f>h&&f-h>=d)return{start:h,end:f}}}(u,c,d)}else v.ZV(c)?(v.HV++,v.VV()):c===v.JV?v.HV++:(v.HV=0,v.IV=0,v.JV=c)}}},this.mW=function(){v.HV=0,v.IV=0,(0,_.clearTimeoutIfDefined)(v.KV),v.KV=-1},this.nW=function(c){if(v.GV&&!v.PV){var u=v.FV.renderer.getVideoElementBufferedRanges().sort(function(c,u){return c.start-u.start}),d=v.FV.renderer.getCurrentTime(!0),p=A(u,d);if(v.HV=0,v.IV=0,v.KV=-1,void 0!==p&&d===c){var h=p.start;v.FV.logger.debug("Skipping gap from ".concat(d," to ").concat(h)),v.oW(d,h)}}},this.FV=c,this.GV=c.videoElement,this.LV=0,this.HV=0,this.IV=0,this.QV=0,this.NV=!1,this.OV=void 0,null==(u=this.GV)||u.addEventListener(E.MediaElementEvent.timeupdate,this.bV),null==(d=this.GV)||d.addEventListener(E.MediaElementEvent.play,this.play),this.FV.eventHandler.on(p.PlayerEvent.Seek,this.XV)}return c.prototype.RV=function(){var c,u,d;null==(c=this.GV)||c.addEventListener(E.MediaElementEvent.waiting,this.VV),null==(u=this.GV)||u.addEventListener(E.MediaElementEvent.stalled,this.WV);for(var p=0;p<P.length;p++){var h=P[p];null==(d=this.GV)||d.addEventListener(h,this.mW)}this.MV=window.setInterval(this.UV,250)},c.prototype.SV=function(){return Date.now()-this.QV<500},c.prototype.TV=function(){return Date.now()-this.LV<=1e3},c.prototype.YV=function(c){var u,d,p;return!(!this.OV||this.PV)&&(c>(u=this.OV).start&&c<u.end||(d=this.FV.settings.PROACTIVE_GAP_SKIP_DISTANCE_SECONDS,p=this.OV,!(d<=0)&&p.start>c&&p.start-d<=c)||c>this.OV.end&&(0,S.shouldResetCurrentTimeAfterBufferUnderrun)())}
vendor: 15,487 bytes, line 21
21,c.prototype.ZV=function(c){return 5===this.HV&&c===this.JV},c.prototype.aV=function(){if(this.GV&&this.OV){var c=this.FV.renderer.getCurrentTime(!0),u=Math.max(c+.01,this.OV.end);this.FV.logger.debug("Skipping gap proactively from ".concat(c," to ").concat(u)),this.oW(c,u)}},c.prototype.oW=function(c,u){var d=this;this.PV=!0,this.OV=void 0,this.pW(c,u).then(function(){return d.FV.renderer.setCurrentTime(u+w.Ranges.TIME_FUDGE_FACTOR)}).then(function(u){return d.FV.logger.debug("Jumped buffer gap from ".concat(c," to ").concat(u))}).catch(function(p){return d.FV.logger.debug("Failed to skip buffer gap from ".concat(c," to ").concat(u),p)}).finally(function(){d.PV=!1,d.OV=void 0})},c.prototype.pW=function(c,u){if(!(0,v.getCapabilities)().isTizen)return Promise.resolve();var d=this.qW();if(void 0===d)return Promise.resolve();var p=A(this.FV.renderer.getBufferedRanges(d).sort(function(c,u){return c.start-u.start}),c);return u!==(null==p?void 0:p.start)?(this.FV.logger.debug("Clearing video data from ".concat(c," to ").concat(u," to ensure gap can be skipped")),this.FV.renderer.removeData(d,c,u)):Promise.resolve()},c.prototype.qW=function(){var c;return null==(c=this.FV.segmentInfoService)?void 0:c.getSegmentControllerMimeTypes().find(function(c){return y.MimeTypeHelper.isVideo(c)})},c.prototype.rW=function(c,u,d){for(var p=w.Ranges.findGaps(c,d),h=0;h<p.length;h++){var f=p.start(h),m=p.end(h);if(u-f<4&&u-f>2)return{start:f,end:m}}},c.prototype.sW=function(){if(!(this.KV>-1)&&this.NV&&this.GV){var c=this.GV.buffered,u=this.GV.currentTime,d=w.Ranges.findNextRange(c,u),p=this.FV.settings.MIN_SIZE_FOR_GAP_SKIPPING;if(0===d.length){var h=this.rW(c,u,p);if(h)return this.FV.logger.debug("Encountered a gap in video from ".concat(h.start," to ").concat(h.end,". Seeking to ").concat(u,"...")),this.IV=0,void this.wW(u);var f=(0,T.findNextRangeForGap)(u,c),m=f.isNearEndOfBufferedRange,g=f.nextRangeStart;return m&&isFinite(g)?(this.FV.logger.debug("Playback stalled because of a very small gap. Seeking to ".concat(g,"...")),this.IV=0,void this.wW(g)):void(this.IV>10&&(this.IV=0,this.tW(u,this.GV)))}if(!function(c,u,d){if(0===d)return!1;var p=w.Ranges.findNextRange(c,u);if(0===p.length)return!1;var h=w.Ranges.findRangeForTime(c,u),f=h.length?h.end(0):u;return p.start(0)-f<d}(c,u,p)){var v=d.start(0)-u;this.FV.logger.debug("setTimer: stopped at: ".concat(u,", setting timer for: ").concat(v,", seeking to: ").concat(d.start(0))),this.KV=window.setTimeout(this.nW.bind(this),v,this.FV.renderer.getCurrentTime(!0))}}},c.prototype.tW=function(c,u){this.FV.logger.debug("currentTime not advancing from ".concat(c," although the video element is neither paused nor seeking")),this.uW(c,u),u.eventHandler.triggerEvent(E.MediaElementEvent.currenttimenotadvancing)},c.prototype.uW=function(c,u){var d=(0,v.getCapabilities)(),p=d.isSafari,h=d.isTizen,f=d.isWpeWebKit;c>u.duration&&!p?this.wW(u.duration):this.FV.settings.QJY_BROWSER_WORKAROUND||h||(0,b.isWebOs2016)()||(0,b.isWebOs2022OrNewer)()||f?this.wW(c+.01):this.wW(c)},c.prototype.vW=function(c){if(!this.GV)return!1;for(var u=this.GV.buffered,d=0;d<u.length;d++)if(u.end(d)===c)return!0;return!1},c.prototype.shutdown=function(){var c,u,d,h,f;null==(c=this.GV)||c.removeEventListener(E.MediaElementEvent.waiting,this.VV),null==(u=this.GV)||u.removeEventListener(E.MediaElementEvent.stalled,this.WV),null==(d=this.GV)||d.removeEventListener(E.MediaElementEvent.timeupdate,this.bV),null==(h=this.GV)||h.removeEventListener(E.MediaElementEvent.play,this.play),this.FV.eventHandler.off(p.PlayerEvent.Seek,this.XV);for(var m=0;m<P.length;m++){var g=P[m];null==(f=this.GV)||f.removeEventListener(g,this.mW)}(0,_.clearIntervalIfDefined)(this.MV),this.mW()},c.prototype.wW=function(c){if(this.GV&&this.GV.currentTime!==c)try{this.GV.currentTime=c}catch(u){this.FV.logger.debug("GapHandler failed to set currentTime on video element to ".concat(c),u)}},c}()},80354:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.findNextRangeForGap=function(c,u){for(var d=!1,h=1/0,f=0;f<u.length;f++){var m=u.start(f),g=u.end(f),v=c+2*p.Ranges.TIME_FUDGE_FACTOR;if(d&&!isFinite(h)){h=m;break}m<c&&g>c&&v>g&&(d=!0)}return{isNearEndOfBufferedRange:d,nextRangeStart:h}};var p=d(82889)},79323:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.MSERenderer=void 0;var p=d(4524),h=d(66790),f=d(40306),m=d(3336),g=d(80813),v=d(3714),y=d(44468),b=d(33468),S=d(7387),_=d(23690),E=d(15971),T=d(21513),w=d(93204),P=d(94685),A=d(34841),I=d(78877),M=d(87244),R=d(84568),k=d(85434),x=d(23068),C=d(19274),O=d(68925),D=d(86897),L=d(1765),N=d(98331),U=d(48873),F=d(65940),B=d(10344);u.MSERenderer=function(){function c(c){var u=this;this.context=c,this.yw=0,this.waitingForSeekedPromise=null,this.Hw=function(c){u.setCurrentTimeDelayedContext&&u.setCurrentTimeDelayedContext.time!==c.seekTarget&&Math.abs(u.setCurrentTimeDelayedContext.time-c.seekTarget)>=u.context.settings.GAP_TOLERANCE&&u.cancelSetCurrentTimeDelayed()},this.reOpenMse=function(){var c=u.segmentQueueMimeTypes;if(c.length<1)return Promise.resolve();var d=c.find(function(c){return u.zw.hasOwnProperty(c)});return d?u.setTimestampOffset(d,u.zw[d]):u.setTimestampOffset(c[0],0)},this.Iw=function(){if(u.video){var c=u.video.isPictureInPicture()?y.ViewMode.PictureInPicture:y.ViewMode.Inline;u.context.store.dispatch((0,_.setPlayerViewMode)(c))}},this.Jw=function(c){c.time&&c.time>0&&(u.yw=0)},this.postBufferRemoval=function(c,d,p){u.logger.debug("successfully removed buffer for ".concat(c," (from  ").concat(d," to ").concat(p,")"))},this.Nw=(0,R.memoize)(this.Ow.bind(this)),this.logger=c.logger,this.video=c.videoElement,this.settings=c.settings,this.sw=Promise.resolve(),this.eventHandler=void 0,this.zw={},this.tw=new L.BufferMimeCodecMap(c.store,c.settings),this.savedCurrentTime=0,this.playerEventHandler=c.eventHandler,this.shutdownPromise=Promise.resolve(),this.init(!0)}return c.prototype.createMSEWrapper=function(){return new U.MSEWrapper(this.context)},c.prototype.Ew=function(c){return c?this.Gw():this.Fw()},c.prototype.Fw=function(){var c=this;return function(){var u;return null==(u=c.mse)?void 0:u.createNewMSE()}},c.prototype.Gw=function(){var c,u=null==(c=this.mse)?void 0:c.createNewMSE();return function(){return u}},c.prototype.init=function(c){var u=this;this.Bw=Promise.resolve(),this.mse=this.createMSEWrapper(),this.sw=this.sw.catch(function(c){return u.context.logger.debug("Caught error during MSE recreation",c)}).then(this.Ew(c)),this.vw=!0,this.segmentQueues={},this.setCurrentTimeContext=void 0,this.setCurrentTimeDelayedContext=void 0,this.Cw=new Map,this.Dw=new Map,this.xw=new N.GapHandler(this.context),null==this.eventHandler&&this.video&&(this.eventHandler=new B.VideoEventHandler(this.video),this.eventHandler.on(C.MediaElementEvent.timeupdate,this.Jw)),this.on(C.MediaElementEvent.webkitpresentationmodechanged,this.Iw),this.playerEventHandler.on(v.PlayerEvent.Seek,this.Hw)},c.prototype.trackRendererError=function(c){this.yw++,this.yw>=this.settings.MAX_CONSECUTIVE_RENDERER_ERRORS&&this.context.eventHandler.fireError(new m.PlayerError(f.ErrorCode.PLAYBACK_VIDEO_DECODING_ERROR,{codec:c.getCodec(),mimeType:c.getMimeType(),segmentUrl:c.getUrl()},"Failed to append the segment to the buffer. The MSE has thrown an error.",this.context.sourceContext.sourceIdentifier))},c.prototype.hasSourceBuffers=function(){return this.segmentQueueMimeTypes.length>0},c.prototype.hasDataInSourceBuffers=function(){var c=this.mse;return!(!c||!this.hasSourceBuffers())&&this.segmentQueueMimeTypes.every(function(u){return c.getBufferedRanges(u).length>0})},c.prototype.updateRendererRangesInStore=function(c){var u;null==(u=(0,E.getSourceStore)(this.context))||u.dispatch((0,O.setRendererRanges)(c,this.getOverallBufferedRanges(c)))},c.prototype.addBuffer=function(c,u){var d,p=this;if(!this.mse)return!1;this.tw.add(c,u);var h=!!this.mse.addBuffer(c,u,function(){return p.updateRendererRangesInStore(c)});return h&&(this.mse.addUpdateEndCallback(c,function(){var u;return null==(u=p.setCurrentTimeDelayedContext)||u.reevaluateDataInBuffer(),p.Cw.set(c,!1)}),this.segmentQueues[c]=[],null==(d=(0,E.getSourceStore)(this.context))||d.dispatch((0,O.setRendererRanges)(c,[]))),h},c.prototype.addDrmInitData=function(c){if(null!=c&&c.length){var u=this.drmService;u?c.forEach(function(c){return u.addInitData(c)}):this.context.logger.debug("PSSH data found but DRM is not configured")}},c.prototype.storeDrmInitDataFromManifest=function(c){var u=this;c&&this.context.serviceManager.maybeCall(g.ServiceName.ManifestService,function(d){var p=d.getContentProtectionForAdaptationSet(c).flatMap(function(c){var d=b.KeySystemKind[c.name.toUpperCase()],p=c.schemeIdUri.replace("urn:uuid:","").replace(/-/g,"");return(c.pssh||[]).map(function(h,f){return u.logger.insane("adding pssh for ".concat(c.name," : ").concat(h)),{initData:c.psshData[f],initDataStr:h,systemID:c.schemeIdUri,systemIDraw:p,systemName:d,kid:[]}})});u.addDrmInitData(p)},void 0,this.context.sourceContext.sourceIdentifier)},c.prototype.appendData=function(c){var u=this;return this.addDrmInitData(c.getDrmInitData()),this.addSegmentToSegmentQueue(c),this.Bw=this.Bw.catch(function(){}).then(function(){return u.processSegmentQueues()}),this.Bw},c.prototype.addSegmentToSegmentQueue=function(c){var u=c.getMimeType();this.segmentQueues[u]?(this.segmentQueues[u].push(c),this.updateRendererRangesInStore(u)):this.logger.debug("Renderer missing segment queue for mimeType(".concat(u,") but trying to push segment.(url=").concat(c.getUrl(),")"))},c.prototype.getBufferedRanges=function(c){var u,d;return null!=(d=null==(u=this.mse)?void 0:u.getBufferedRanges(c))?d:[]},c.prototype.getVideoElementBufferedRanges=function(){return(0,p.getBufferedRanges)(this.video)},c.prototype.getOverallBufferedRanges=function(c){if(!this.mse||!this.segmentQueues.hasOwnProperty(c))return[];var u=p.BufferRangeHelper.getRangesFromQueue(this.segmentQueues[c],this.settings.GAP_TOLERANCE);return u=u.concat(this.getBufferedRanges(c)),p.BufferRangeHelper.mergeRanges(u,this.settings.GAP_TOLERANCE)},c.prototype.isDataBeingAppended=function(c){return!!this.mse&&(this.segmentQueues&&this.segmentQueues[c]&&this.segmentQueues[c].length>0||this.mse.isAnyBufferUpdating())},c.prototype.Kw=function(c){var u=(0,E.getSourceState)(this.context);if(!u)return[];var d=(0,D.getBufferStateMap)(u);return d?(0,D.getRendererBufferedRanges)(d,c):[]},c.prototype.getEndOfBufferTime=function(){var c=this,u=[];if(this.segmentQueueMimeTypes.forEach(function(d){var p=c.Kw(d);if(p.length>0){var h=p[p.length-1].end;u.push(h)}}),0!==u.length)return Math.min.apply(Math,u)},c.prototype.removeDataFromSegmentQueues=function(c,u,d){var p=this;void 0===u&&(u=-1/0),void 0===d&&(d=1/0),this.segmentQueues.hasOwnProperty(c)&&(this.segmentQueues[c]=this.segmentQueues[c].filter(function(h){var f=h.getDuration(),m=h.getPlaybackTime(),g=h.getRepresentationId().representationId,v=h.isInit()||m<u||m+f>d;return p.logger.debug("[MSERenderer][".concat(c,"][").concat(g,"] Removing segment from queue [").concat(!v,"]. ")+"Clearing from ".concat(u," to ").concat(d,". Segment: [playbackTime=").concat(h.getPlaybackTime(),", ")+"duration=".concat(h.getDuration(),", url=").concat(h.getUrl(),"]")),v}),this.updateRendererRangesInStore(c))},c.prototype.removeData=function(c,u,d){return this.mse?(void 0===u&&void 0===d&&this.saveCurrentTime(),this.removeDataFromSegmentQueues(c,u,d),this.mse.removeFromBuffer(c,u,d,this.postBufferRemoval)):Promise.reject()},c.prototype.getDroppedVideoFrames=function(){var c,u,d,p,h;return null!=(h=null!=(d=null==(u=null==(c=this.video)?void 0:c.getVideoPlaybackQuality())?void 0:u.droppedVideoFrames)?d:null==(p=this.video)?void 0:p.droppedVideoFrames)?h:0},c.prototype.setPlaybackSpeed=function(c){this.video&&!isNaN(c)&&c>0&&c!==this.video.playbackRate&&(this.video.playbackRate=c)},c.prototype.getPlaybackSpeed=function(){var c,u;return null!=(u=null==(c=this.video)?void 0:c.playbackRate)?u:1},c.prototype.setVolume=function(c){this.video&&!isNaN(c)&&(this.video.volume=Math.min(c/100,1))},c.prototype.getVolume=function(){var c,u;return 100*(null!=(u=null==(c=this.video)?void 0:c.volume)?u:1)},c.prototype.mute=function(){this.video&&(this.video.muted=!0)},c.prototype.unmute=function(){this.video&&(this.video.muted=!1)},c.prototype.isMuted=function(){var c,u;return null!=(u=null==(c=this.video)?void 0:c.muted)&&u},c.prototype.play=function(){var c=this;return this.video?this.video.play().catch(function(u){if((0,M.isSwitchingBufferBlocks)((0,E.getSourceStore)(c.context)))return c.ready();throw u}):Promise.resolve()},c.prototype.pause=function(){this.video&&this.video.pause()},c.prototype.end=function(){this.pause(),this.cancelSetCurrentTimeDelayed()},c.prototype.isPaused=function(){var c,u;return null==(u=null==(c=this.video)?void 0:c.paused)||u},c.prototype.setDuration=function(c){this.mse&&(c=Math.floor(1e4*c)/1e4,this.ww=c,this.mse.setDuration(c))},c.prototype.getDuration=function(){var c,u;return null!=(u=null==(c=this.video)?void 0:c.duration)?u:0/0},c.prototype.setCurrentTime=function(c){var u=this;if(!this.mse)return Promise.reject("MSE is not open");if(c=Math.ceil(100*c)/100,this.setCurrentTimeContext){if(this.setCurrentTimeContext.time===c)return this.setCurrentTimeContext.promise;this.cancelSetCurrentTimeDelayed()}var d=Promise.resolve();this.isMSEOpen()||this.Sw(c)||(this.logger.debug("reopen MSE on setCurrentTime"),d=this.reOpenMse());var p=d.then(function(){return u.setCurrentTimeInternal(c).catch(function(d){return u.logger.debug("could not set time ".concat(c," on video element"),d),u.getCurrentTime()}).finally(function(){return u.vw=!1})});return this.setCurrentTimeContext={time:c,isInitialSeek:this.vw,promise:p},p},c.prototype.getCurrentVideoTime=function(){var c,u;return null!=(u=null==(c=this.video)?void 0:c.currentTime)?u:0},c.prototype.getCurrentFallbackTime=function(){var c=this.setCurrentTimeContext;return c&&c.isInitialSeek&&-1!==c.time?c.time:0!==this.savedCurrentTime&&this.Lw()?this.savedCurrentTime:(this.savedCurrentTime=0,this.getCurrentVideoTime())},c.prototype.Lw=function(){var c;return!this.hasDataInSourceBuffers()&&!(null!=(c=this.mse)&&c.isBufferRemovalPending())||!(!(0,M.isSwitchingBufferBlocks)((0,E.getSourceStore)(this.context))&&this.Sw(this.getCurrentVideoTime()))},c.prototype.getCurrentTime=function(c){return void 0===c&&(c=!1),c?this.getCurrentVideoTime():this.getCurrentFallbackTime()},c.prototype.getSnapshotData=function(c,u){void 0===u&&(u=1);try{if(!this.video)return;var d=this.video.videoWidth,p=this.video.videoHeight;this.Aw||(this.Aw=document.createElement("canvas"),this.Aw.id="snapshotHiddenCanvas"),this.Aw.width=d,this.Aw.height=p;var h=this.Aw.getContext("2d");null==h||h.drawImage(this.video.getWrappedElement(),0,0,d,p);var f=void 0;return("image/jpeg"===c||"image/webp"===c)&&(u=Math.max(u,0),u=Math.min(u,1)),f=this.Aw.toDataURL(c,u),{height:p,width:d,data:f}}catch(c){return void(c&&c.message?this.logger.debug("Snapshot acquisition failed: "+c.message):this.logger.debug("Snapshot acquisition failed"))}},c.prototype.Mw=function(){return this.drmService?this.drmService.shutdownPromise:Promise.resolve()},c.prototype.ready=function(){var c=this;return this.shutdownPromise.then(function(){return c.Mw()}).then(function(){return c.mse||c.init(!1),c.sw})},c.prototype.setTimestampOffset=function(c,u){var d=this;return this.mse?this.mse.setTimestampOffset(c,u).then(function(){d.zw[
21c]=u}):Promise.resolve()},c.prototype.shutdown=function(c){var u,d=this;if(!this.mse)return this.shutdownPromise;for(var p in this.waitingForSeekedPromise=null,c&&this.saveCurrentTime(),this.segmentQueues)this.segmentQueues.hasOwnProperty(p)&&(delete this.segmentQueues[p],null==(u=(0,E.getSourceStore)(this.context))||u.dispatch((0,O.setRendererRanges)(p,[])));var h=this.mse;return this.shutdownPromise=this.shutdownPromise.then(function(){return h.tearDownMediaSource()}).catch(function(c){d.logger.debug("Could not tear down media source",{err:c,message:c.message})}),this.mse=void 0,this.cancelSetCurrentTimeDelayed(),this.xw&&(this.xw.shutdown(),this.xw=void 0),this.eventHandler&&!c&&(this.eventHandler.dispose(),this.eventHandler=void 0),this.Cw.clear(),this.Dw.clear(),this.shutdownPromise},c.prototype.release=function(){var c;for(var u in this.segmentQueues)this.segmentQueues.hasOwnProperty(u)&&null!==this.mse&&(delete this.segmentQueues[u],null==(c=(0,E.getSourceStore)(this.context))||c.dispatch((0,O.setRendererRanges)(u,[])));return this.tw.dispose(),this.mse&&this.mse.dispose(),this.sw=Promise.resolve(),this.zw={},this.cancelSetCurrentTimeDelayed(),this.xw&&(this.xw.shutdown(),this.xw=void 0),this.off(C.MediaElementEvent.webkitpresentationmodechanged,this.Iw),this.eventHandler&&(this.eventHandler.off(C.MediaElementEvent.timeupdate,this.Jw),this.eventHandler.dispose(),this.eventHandler=void 0),this.waitingForSeekedPromise=null,this.playerEventHandler.off(v.PlayerEvent.Seek,this.Hw),this.Nw.invalidate(),this.Mw()},c.prototype.on=function(c,u){var d;null==(d=this.eventHandler)||d.on(c,u)},c.prototype.off=function(c,u){this.eventHandler&&this.eventHandler.off(c,u)},Object.defineProperty(c.prototype,"drmService",{get:function(){var c;return null==(c=this.context.serviceManager)?void 0:c.get(g.ServiceName.DrmService)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"segmentQueueMimeTypes",{get:function(){return Object.keys(this.segmentQueues)},enumerable:!1,configurable:!0}),c.prototype.setDrmConfig=function(c,u){return this.drmService?this.drmService.updateDrmConfig(c,u):Promise.reject(h.DrmSetupError.MISSING_CONFIGURATION)},c.prototype.isMediaTypeSupported=function(c,u){return this.Nw("".concat(c,'; codecs="').concat(u,'"'))},c.prototype.Ow=function(c){return(0,F.shouldUseManagedMediaSource)(this.context.settings.PREFER_MANAGED_MEDIA_SOURCE)?window.ManagedMediaSource.isTypeSupported(c):"MediaSource"in window&&MediaSource.isTypeSupported(c)},c.prototype.Pw=function(){this.uw&&(this.uw.reject(Error("Cancelled pending end of stream.")),this.uw=void 0)},c.prototype.Qw=function(){var c=this;return this.uw=this.uw||new A.Deferred,this.uw.promise.then(function(){var u;return null==(u=c.mse)?void 0:u.endOfStream()}).catch(function(u){(0,P.isContextAvailable)(c.context)&&c.context.logger.debug(u)})},c.prototype.setEndOfStream=function(c){if(void 0===c&&(c=!0),!c)return this.Pw(),this.isMSEOpen()?Promise.resolve():this.reOpenMse();if(!this.hasSourceBuffers()||!this.mse)return this.logger.debug("Cannot signal EOS as no buffers have been added yet"),Promise.resolve();var u=this.getEndOfBufferTime();return this.setCurrentTimeDelayedContext&&this.setCurrentTimeDelayedContext.time>=this.ww&&u&&!isNaN(u)&&this.cancelSetCurrentTimeDelayed(),this.setCurrentTimeDelayedContext?this.Qw():this.mse.endOfStream()},c.prototype.Rw=function(c){var u=this.Uw();for(var d in u){var p=u[d];if(p.start<=c&&p.end>=c)return!0}return!1},c.prototype.Sw=function(c,u){if(void 0===u&&(u=0),this.Rw(c))return!1;var d=this.getRangesInSourceBuffers();return!!d&&Object.keys(d).every(function(h){return(0,p.isInTimeRanges)(d[h],c,u)})},c.prototype.Tw=function(c,u){var d,h=null!=(d=this.getRangesInSourceBuffers())?d:{},f=Object.keys(h),m=Object.keys(h).map(function(u){return h[u].find(function(u){return(0,p.isInTimeRanges)([u],c)})}).filter(x.isDefined);if(0===f.length||m.length<f.length)return 0/0;var g=Math.min.apply(Math,m.map(function(c){var u;return null!=(u=null==c?void 0:c.end)?u:1/0}))-c;return g>=u?c:c-(u-g)},c.prototype.adjustTimeToNextCommonBufferStart=function(c){var u,d,p,h=this,f=null==(u=(0,E.getSourceState)(this.context))?void 0:u.drm,m=(0,I.getBufferEndSafetyMargin)(f);if(this.Sw(c,m))return c;var g=this.Sw(c),v=this.getFutureBufferStarts(c).filter(function(u){return u>=c}),y=0===v.length,b=null==(p=null==(d=(0,E.getSourceState)(this.context))?void 0:d.buffer.isLoadingRangeFinished)||p;if(g&&y){var S=this.Tw(c,m);return S===c||b?!isNaN(S)&&this.Sw(S)?(this.logger.debug("Adjusting current time away from end of buffer: ".concat(S)),S):c:(this.logger.debug("Not adjusting seek target, because there will be future data"),0/0)}if(!g&&y)return 0/0;var _=v.find(function(c){return h.Sw(c,m)}),T=_??Math.min.apply(Math,v);return _||b?(this.logger.debug("Adjusting current time to next safe buffer start: ".concat(T)),T):(this.logger.debug("Not adjusting seek target, as it is not safe across media types and there will be future data"),0/0)},c.prototype.getFutureBufferStarts=function(c){var u,d=this.getRangesInSourceBuffers();if(!d)return[];if(this.mse){var h=this.Uw();u=Object.keys(h).map(function(c){return h[c]})}else u=[];return p.BufferRangeHelper.getCommonBufferedRanges(d).filter(function(u){return u.getEnd()>=c&&!isNaN(u.getStart())}).filter(function(c){return u.every(function(u){return(0,p.areDisjoint)(u,{start:c.getStart(),end:c.getEnd()})})}).map(function(c){return c.getStart()})},c.prototype.getRangesInSourceBuffers=function(){if(!this.mse)return null;var c={};for(var u in this.segmentQueues)if(this.segmentQueues.hasOwnProperty(u)&&(c[u]=this.mse.getBufferedRanges(u),c[u].length<1))return null;return Object.keys(c).length?c:null},c.prototype.Uw=function(){if(!this.mse||!this.mse.isBufferRemovalPending())return{};var c={};for(var u in this.segmentQueues){var d=this.mse.getRangePendingRemoval(u);this.segmentQueues.hasOwnProperty(u)&&d&&(c[u]=d)}return c},c.prototype.processSegmentQueues=function(){var c=this,u=this.segmentQueueMimeTypes.filter(function(u){return c.segmentQueues[u].length>0}).map(function(u){return c.addSegmentFromQueueToMse(u)});return 0===u.length?Promise.resolve():Promise.all(u).then(function(){return c.processSegmentQueues()}).catch(function(c){if(c!==h.SOURCE_BUFFER_APPEND_STATUS.SUSPENDED)throw c})},c.prototype.getHeadOfQueue=function(c){return this.segmentQueues[c][0]},c.prototype.isMSEOpen=function(){var c;return(null==(c=this.mse)?void 0:c.readyState)===U.MediaSourceReadyState.o
vendor: 18,178 bytes, line 21
21pen},c.prototype.Vw=function(c){var u,d=null==(u=(0,E.getSourceState)(this.context))?void 0:u.drm;return this.context.serviceManager.maybeCall(g.ServiceName.DrmService,function(u){return u.maybeWaitForDrmLicense(c,d)},Promise.resolve())},c.prototype.addSegmentFromQueueToMse=function(c){var u=this;if(!this.mse)return Promise.resolve();var d=Promise.resolve();this.isMSEOpen()||(d=this.reOpenMse());var p=this.getHeadOfQueue(c);if(!p)return Promise.resolve();var f=p.getRepresentationId().representationId,m=p.getUrl();return this.context.logger.debug("[MSERenderer][".concat(c,"][").concat(f,"] Scheduling appendage to buffer [url=").concat(m,"], DRM key ID (").concat(p.getDrmKid(),")")),d.then(function(){return u.Vw(p)}).then(function(){return u.mse?u.segmentQueues[c].includes(p)?u.mse.addToBuffer(p).then(function(){var d=u.getHeadOfQueue(c)!==p;if(u.logger.debug("[MSERenderer][".concat(c,"][").concat(f,"] Appended segment to buffer [url=").concat(m,"]")),d){var h=u.segmentQueues[c][0],g=h?h.getUrl():"none";u.logger.debug("[MSERenderer][".concat(c,"][").concat(f,"] Skipping removal of [url=").concat(m,"] ")+"from segment queue as the queue head has unexpectedly changed to [url=".concat(g,"]"))}else u.segmentQueues[c].shift();u.drmService&&u.hasDataInSourceBuffers()&&!(0,M.isSwitchingBufferBlocks)((0,E.getSourceStore)(u.context))&&u.drmService.signalInitDataShouldBeAvailable()}):(u.logger.debug("[MSERenderer][".concat(c,"][").concat(f,"] Segment ").concat(p.getUrl()," no longer part of the queue - skipping appendage")),Promise.resolve()):Promise.reject(h.SOURCE_BUFFER_APPEND_STATUS.FAILURE)}).catch(function(d){if(u.logger.debug("[MSERenderer][".concat(c,"][").concat(f,"] Adding segment from queue to buffer failed"),d),d===h.SOURCE_BUFFER_APPEND_STATUS.FAILURE&&u.trackRendererError(p),u.mse&&d===h.SOURCE_BUFFER_APPEND_STATUS.QUOTA_EXCEEDED){u.Cw.set(c,!0);var m=u.Dw.get(c);return m||(m=new A.Deferred,u.Dw.set(c,m)),u.mse.addOneUpdateEndCallback(c,m.resolve).then(function(){u.Dw.delete(c),u.context.logger.debug("Appending segment after quota has been exceeded...")}),m.promise.then(function(){return u.processSegmentQueues()})}return u.mse?u.mse.queueActionOnBuffer(c,function(){return u.processSegmentQueues()}):Promise.reject(d)})},c.prototype.cancelSetCurrentTimeDelayed=function(){this.setCurrentTimeDelayedContext&&(this.context.logger.debug("Cancelling delayed set currentTime to ".concat(this.setCurrentTimeDelayedContext.time)),this.setCurrentTimeDelayedContext.unsubscribeFromSourceStore(),this.setCurrentTimeDelayedContext.deferred.reject("cancelled seek"),this.setCurrentTimeDelayedContext=void 0)},c.prototype.Ww=function(c){var u=this;this.segmentQueueMimeTypes.forEach(function(d){u.segmentQueues[d]=u.segmentQueues[d].filter(function(u){return u.getPlaybackTime()+u.getDuration()>=c}),u.updateRendererRangesInStore(d),u.Cw.set(d,!1)}),this.Dw.forEach(function(c){return c.reject()}),this.Dw.clear()},c.prototype.resolvePendingEndOfStream=function(){this.uw&&(this.uw.resolve(),this.uw=void 0)},c.prototype.setCurrentTimeInternal=function(c){var u,d,p=this;if(!this.mse)return Promise.reject("Couldn't set current time, MSE is not open");u=this.Cw,d=!1,u.forEach(function(c){return d=d||c}),d&&this.Ww(c);var h=this.mse.waitForBuffers().then(function(){return p.waitingForSeekedPromise}).then(function(){if(p.setCurrentTimeContext){if(p.setCurrentTimeContext.time!==c)return Promise.reject("A newer setting of change time has been scheduled.")}else p.setCurrentTimeContext={time:c,isInitialSeek:!1,promise:h};var u=p.adjustTimeToNextCommonBufferStart(c);return isNaN(u)?p.Xw(c):u}).then(function(c){var u,d,h,f,m=null!=(d=null==(u=p.video)?void 0:u.currentTime)?d:0,g=!p.isPaused();return null!=(h=p.setCurrentTimeContext)&&h.isInitialSeek&&g&&m>c?(p.logger.debug("Skip initial seek to ".concat(c," as playback has started and is already at ").concat(m)),f=Promise.resolve(m)):(p.logger.debug("set time on video element to ".concat(c)),f=p.seekOnVideoElement(c)),f.then(function(c){return p.resolvePendingEndOfStream(),c}).catch(function(u){return p.handleVideoSetCurrentTimeError(c,u)}).finally(function(){p.waitingForSeekedPromise=null,p.setCurrentTimeContext=void 0,p.savedCurrentTime=0})});return h},c.prototype.Xw=function(c){var u=this;this.context.logger.debug("Delaying seek, waiting for data in buffer for time ".concat(c));var d=(0,E.getSourceStore)(this.context);if(!d)return Promise.reject(Error("No source store available"));var p=new A.Deferred,h=(0,w.subscribe)(d)(function(c){return(0,D.getBufferState)(c)},function(){var c;null==(c=u.setCurrentTimeDelayedContext)||c.reevaluateDataInBuffer()},function(c,u){return!!(null!=c&&c.isLoadingRangeFinished&&!(null!=u&&u.isLoadingRangeFinished))});return this.setCurrentTimeDelayedContext={time:c,reevaluateDataInBuffer:function(){var d=u.adjustTimeToNextCommonBufferStart(c);isNaN(d)?u.context.logger.debug("Re-evaluated delayed seek to ".concat(c,": Cannot yet resolve, waiting for data in buffer"),{video:u.getBufferedRanges("video/mp4"),audio:u.getBufferedRanges("audio/mp4"),adjustedTime:d}):(h(),u.context.logger.debug("Re-evaluated delayed seek to ".concat(c,": Resolving with seek target ").concat(d)),u.setCurrentTimeDelayedContext=void 0,p.resolve(d))},deferred:p,unsubscribeFromSourceStore:h},p.promise},c.prototype.handleVideoSetCurrentTimeError=function(c,u){return this.logger.debug("failed to set current time",u),this.waitingForSeekedPromise=null,this.setCurrentTimeInternal(c)},c.prototype.seekOnVideoElement=function(c){var u=this;return this.waitingForSeekedPromise=new Promise(function(d,p){u.video?(u.video.currentTime=c,d(u.video.currentTime)):p("No video reference")}),this.waitingForSeekedPromise},c.prototype.saveCurrentTime=function(){this.setCurrentTimeContext?this.savedCurrentTime=this.setCurrentTimeContext.time:this.savedCurrentTime=this.getCurrentVideoTime()},c.prototype.Yw=function(c){var u=this;return void 0===c&&(c=this.getCurrentTime()),this.shutdown(!1).then(function(){return u.ready()}).then(function(){u.tw.forEach(function(c,d){u.addBuffer(c,d)||(u.context.logger.debug("Failed to create source buffer ".concat(c)),u.tw.remove(c))})}).then(function(){u.setCurrentTime(c).then(function(){var c,d;return null!=(d=null==(c=u.context.serviceManager)?void 0:c.get(g.ServiceName.PlayerStateService))&&d.isPlaying()?u.play():Promise.resolve()})})},c.prototype.Zw=function(c){var u,d=this,p=k.MimeTypeHelper.getMediaType(c);this.segmentQueueMimeTypes.forEach(function(c){var u;k.MimeTypeHelper.getMediaType(c)===p&&(delete d.segmentQueues[c],null==(u=(0,E.getSourceStore)(d.context))||u.dispatch((0,O.setRendererRanges)(c,[])))}),this.segmentQueues[c]=[],null==(u=(0,E.getSourceStore)(this.context))||u.dispatch((0,O.setRendererRanges)(c,[]))},c.prototype.changeBufferType=function(c,u,d){var p=this;if(this.tw.update(c,u),this.Zw(c),this.mse&&this.mse.isChangeTypeSupported()){var h=!(d&&(0,T.getCapabilities)()[S.CapabilityKey.isEdgeChromium]);return this.mse.changeBufferType(c,u,h).then(function(){var d;return(d={})[c]=u,d}).catch(function(d){return p.logger.debug("Failed to change buffer type to ".concat(c," ").concat(u,":"),d),p.Yw().then(function(){return p.tw.entries()})})}return this.Yw().then(function(){return p.tw.entries()})},c.prototype.shouldContinueBuffering=function(){var c,u;return null!=(u=null==(c=this.mse)?void 0:c.shouldContinueBuffering)&&u},c}()},48873:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.MSEWrapper=u.MediaSourceReadyState=void 0;var f,m=d(66790),g=d(40306),v=d(3336),y=d(25926),b=d(4224),S=d(80813),_=d(3714),E=d(13531),T=d(75108),w=d(7387),P=d(68925),A=d(63879),I=d(15971),M=d(21513),R=d(34841),k=d(85434),x=d(15487),C=d(23068),O=d(41138),D=d(76340),L=d(60321),N=d(65940);function U(c){for(var u=[],d=0;d<(null==c?void 0:c.length);d++){var p="[".concat(c.start(d)," - ").concat(c.end(d),"]");u.push(p)}return u.toString()}(p=f||(u.MediaSourceReadyState=f={})).closed="closed",p.open="open",p.ended="ended",u.MSEWrapper=function(){function c(c){var u=this;this.hw=function(c,d,p){u.logger.debug("successfully removed buffer for ".concat(c," (from  ").concat(d," to ").concat(p,")"))},this.waitForBuffer=function(c){return u.sourceBuffers.hasOwnProperty(c)?u.Dx().then(function(){return u.sourceBuffers[c].ready()}):Promise.reject("No SourceBuffer for '".concat(c,"' available"))},this.Ex=function(){u.logger.debug("[MSEWrapper][ManagedMediaSource] Start Streaming received, resuming loading"),u.ew=!0},this.Fx=function(){u.logger.debug("[MSEWrapper][ManagedMediaSource] Stop Streaming received, stopping loading"),u.ew=!1},this.Gx=function(c){u.logger.isLevelEnabled(E.LogLevel.DEBUG)&&u.logger.debug("Received bufferedChange event, Added Ranges: ".concat(U(c.addedRanges),", Removed Ranges: ").concat(U(c.removedRanges)))},c.videoElement&&(this.context=c,this.logger=c.logger,this.video=c.videoElement,this.sourceBuffers={},this.cw=!1,this.fw=Promise.resolve(),this.ew=!0)}return c.prototype.getBufferedRanges=function(c){return this.sourceBuffers.hasOwnProperty(c)?this.sourceBuffers[c].bufferedRanges:[]},c.prototype.printDetailedBufferRange=function(c,u){var d;try{d=c.buffered}catch{return void this.logger.debug("".concat(u," buffer range: Error accessing buffered ranges"))}if(0!==d.length)for(var p=0;p<d.length;p++)this.logger.debug("".concat(u," buffer range [").concat(p,"]: ").concat(d.start(p)," - ").concat(d.end(p)));else this.logger.debug("".concat(u," buffer range: empty"))},c.prototype.getBufferStartTime=function(){var c=this,u=Object.keys(this.sourceBuffers).map(function(u){return 0===c.sourceBuffers[u].bufferedRanges.length?0:c.sourceBuffers[u].bufferedRanges[0].start});return Math.max.apply(null,u)},c.prototype.addBuffer=function(c,u,d){var p=this;if(this.mediaSource){if(this.cw&&!this.sourceBuffers.hasOwnProperty(c))try{var h=this.mediaSource.addSourceBuffer(c+"; codecs="+u);this.sourceBuffers[c]=new L.SourceBufferWrapper(h,{mimeType:c,codec:u},function(u){d(u),p.context.logger.isLevelEnabled(E.LogLevel.DEBUG)&&p.printDetailedBufferRange(h,c)})}catch(d){return this.logger.debug("Could not add SourceBuffer for "+c+" with codecs "+u+":"+d),void this.context.eventHandler.dispatchEvent(_.PlayerEvent.Warning,new y.PlayerWarning(b.WarningCode.SOURCE_CODEC_OR_FILE_FORMAT_NOT_SUPPORTED))}return this.logger.debug("Added SourceBuffer for "+c+" with codecs "+u),isNaN(this.mediaSource.duration)||(this.sourceBuffers[c].appendWindowEnd=this.mediaSource.duration),this.sourceBuffers[c].buffer}},c.prototype.updateTimestampOffset=function(c,u){var d=this.sourceBuffers[c];d&&(this.logger.debug("setting new source buffer [".concat(c,"] offset from ").concat(d.buffer.timestampOffset," to ").concat(u)),d.buffer.timestampOffset=u)},c.prototype.setTimestampOffset=function(c,u){return this.sourceBuffers.hasOwnProperty(c)?((0,C.isDefined)(u)&&!isNaN(u)||(this.logger.debug("source buffer [".concat(c,"] offset is ").concat(u,", setting it to 0")),u=0),this.queueTimestampOffsetUpdate(c,u)):(this.logger.debug("no such source buffer found (mime type=".concat(c,")")),Promise.resolve())},c.prototype.queueTimestampOffsetUpdate=function(c,u){var d=this;return this.queueActionOnBuffer(c,function(){return d.updateTimestampOffset(c,u)}).catch(function(u){d.logger.debug("Failed to set timestamp offset for",c,":",u)})},c.prototype.getBufferRangeStart=function(c,u){return u||c.start(0)},c.prototype.getBufferRangeEnd=function(c,u){return u||c.end(c.length-1)},c.prototype.gw=function(c,u,d){var p=this.sourceBuffers[c].buffer.buffered;return{start:this.getBufferRangeStart(p,u),end:this.getBufferRangeEnd(p,d)}},c.prototype.preBufferRemoval=function(c,u,d){this.logger.debug("removing buffer for ".concat(c," (from ").concat(u," to ").concat(d,")"))},c.prototype.removeBufferRange=function(c,u,d){this.preBufferRemoval(c,u,d),this.sourceBuffers[c].buffer.remove(u,d)},c.prototype.removeFromBuffer=function(c,u,d,p){var h=this;return void 0===p&&(p=this.hw),this.queueActionOnBuffer(c,function(){var m,g,v;try{if(h.video&&h.video.currentTime>=0&&(null==(v=null==(g=null==(m=h.sourceBuffers[c])?void 0:m.buffer)?void 0:g.buffered)?void 0:v.length)>0){var S=h.gw(c,u,d),E=S.start,T=S.end;if(E>=0&&T>E){if(h.sourceBuffers[c].removalPending=!0,h.sourceBuffers[c].rangePendingRemoval={start:E,end:T},!h.mediaSource||h.mediaSource.readyState===f.open){var w=h.sourceBuffers[c].onUpdateEnded().then(function(){h.sourceBuffers[c]&&(h.sourceBuffers[c].rangePendingRemoval=null,h.sourceBuffers[c].removalPending=!1,p(c,E,T))});return h.removeBufferRange(c,E,T),w}h.logger.debug("cannot remove buffer for ".concat(c," (from ").concat(E," to ").concat(T,"): MediaSource is not open")),h.addOneSourceOpenCallback(function(){h.removeFromBuffer(c,E,T,p).catch(function(u){h.logger.debug("Couldn't remove buffer from ".concat(E," to ").concat(T," for ").concat(c),u)})})}else h.logger.debug("Ignoring buffer clearing request for ".concat(c,", as the passed-in range is not valid: ").concat(E," to ").concat(T))}else h.logger.debug("Ignoring buffer clearing request for ".concat(c,", as there are no buffered ranges."))}catch(u){var P="".concat(b.WarningCode[b.WarningCode.PLAYBACK_WARNING],": Buffer clearing failed for ").concat(c,". Exception: ").concat(JSON.stringify(u));h.context.eventHandler.dispatchEvent(_.PlayerEvent.Warning,new y.PlayerWarning(b.WarningCode.PLAYBACK_WARNING,P))}return Promise.resolve()})},c.prototype.removeBuffer=function(c){var u=this,d=Promise.resolve(),p=this.sourceBuffers[c];if(!p||!this.mediaSource)return d;if(this.isMediaSourceOpen())try{null==p||p.buffer.abort()}catch(c){return this.logger.debug("Could not abort last action on buffer",h({},c)),Promise.resolve()}if(k.MimeTypeHelper.isSubtitle(c))d=d.then(function(){return u.removeFromBuffer(c).catch(function(c){u.logger.debug("Error removing buffer data",c)})});else try{this.mediaSource&&this.mediaSource.removeSourceBuffer(p.buffer)}catch(u){this.logger.debug("Error while trying to remove ".concat(c," source buffer."),u)}return this.iw(c),d},c.prototype.iw=function(c){this.sourceBuffers[c]?(this.sourceBuffers[c].dispose(),delete this.sourceBuffers[c],this.logger.debug("Removed SourceBuffer for ".concat(c))):this.logger.debug("No source buffer to remove for mimeType=".concat(c))},c.prototype.isMediaSourceOpen=function(){var c;return(null==(c=this.mediaSource)?void 0:c.readyState)===f.open},c.prototype.jw=function(){var c=this;if(!this.mediaSource)return this.logger.debug("Media source is removed. Can not reset buffers."),Promise.resolve();var u=[];for(var d in this.sourceBuffers)this.sourceBuffers.hasOwnProperty(d)&&u.push(this.removeBuffer(d));return Promise.all(u).then(function(){c.sourceBuffers={},c.logger.debug("Removed all SourceBuffers")})},c.prototype.tearDownMediaSource=function(){var c=this;return this.fw=this.fw.then(function(){return c.jw()}).then(function(){c.mediaSource?c.kw():c.logger.debug("Media source has already been removed.")}),this.fw},c.prototype.kw=function(){var c;if(this.video)if(null!==this.video.getWrappedElement()){var u=(0,D.getMseObjectUrl)((0,I.getSourceState)(this.context));if("function"==typeof(null==(c=null==window?void 0:window.URL)?void 0:c.revokeObjectURL)&&""!==u)try{window.URL.revokeObjectURL(u)}catch{this.logger.debug("Could not revoke MSE object URL")}this.mediaSource&&(this.mediaSource.removeEventListener("startstreaming",this.Ex),this.mediaSource.removeEventListener("endstreaming",this.Fx),this.mediaSource.removeEventListener("bufferedchange",this.Gx)),this.aw&&this.aw.reject("MediaSource is being destroyed."),this.aw=void 0,this.bw=void 0,u===this.video.src&&(O.VideoElementUtil.removeSource(this.video),this.video.load()),this.mediaSource=void 0,this.cw=!1,this.logger.debug("Detached video element and MSE")}else this.logger.debug("No video element to teardown.");else this.logger.debug("No video wrapper to teardown.")},c.prototype.removeUpdateEndCallback=function(c,u){this.sourceBuffers.hasOwnProperty(c)&&this.sourceBuffers[c].buffer.removeEventListener("updateend",u)},c.prototype.addUpdateEndCallback=function(c,u){this.sourceBuffers.hasOwnProperty(c)&&this.sourceBuffers[c].buffer.addEventListener("updateend",u)},c.prototype.addOneUpdateEndCallback=function(c,u){return this.sourceBuffers[c].onUpdateEnded().catch(function(){}).then(u)},c.prototype.addSourceOpenCallback=function(c){this.mediaSource&&this.mediaSource.addEventListener("sourceopen",c)},c.prototype.removeSourceOpenCallback=function(c){this.mediaSource&&this.mediaSource.removeEventListener("sourceopen",c)},c.prototype.addOneSourceOpenCallback=function(c){var u=this,d=function(p){u.removeSourceOpenCallback(d),c(p)};this.addSourceOpenCallback(d)},c.prototype.isAnyBufferUpdating=function(){var c=this;return 0!==Object.keys(this.sourceBuffers).filter(function(u){return c.sourceBuffers[u].buffer.updating}).length},c.prototype.setDuration=function(c){var u=this;this.queueActionOnBuffers(function(){if(u.mediaSource){var d=(0,C.isNumber)(c)&&c>0?c:1/0;1/0===d&&1/0!==u.context.settings.MAX_SAFE_MSE_DURATION&&(0,C.isNumber)(u.context.settings.MAX_SAFE_MSE_DURATION)&&u.context.settings.MAX_SAFE_MSE_DURATION>0&&(d=u.context.settings.MAX_SAFE_MSE_DURATION),u.mediaSource.duration!==d&&(u.isMediaSourceOpen()?(u.logger.debug("Setting video duration on MSE: ".concat(u.mediaSource.duration," -> ").concat(d)),u.mediaSource.duration=d):u.logger.debug("Skipping setDuration (".concat(u.mediaSource.duration," -> ").concat(d,"), MSE is not open")))}else u.logger.debug("Skipping setDuration (".concat(c,"), MSE is gone"))}).catch(function(c){u.logger.debug("Could not set the duration of the MSE!",c)})},c.prototype.getDuration=function(){return this.mediaSource&&!isNaN(this.mediaSource.duration)?this.mediaSource.duration:0},c.prototype.isInitialized=function(){return this.cw},Object.defineProperty(c.prototype,"readyState",{get:function(){return this.mediaSource?this.mediaSource.readyState:void 0}
21,enumerable:!1,configurable:!0}),c.prototype.isBufferRemovalPending=function(){var c=this;return Object.keys(this.sourceBuffers).some(function(u){return c.sourceBuffers[u].removalPending})},c.prototype.getRangePendingRemoval=function(c){var u,d,p;return null!=(p=null==(d=null==(u=this.sourceBuffers)?void 0:u[c])?void 0:d.rangePendingRemoval)?p:void 0},c.prototype.lw=function(c){return this.getBufferedRanges(c).reduce(function(c,u){return c+(u.end-u.start)},0)},c.prototype.addToBuffer=function(c){var u=this,d=c.getMimeType();return this.queueActionOnBuffer(d,function(){return u.mediaSource?u.mediaSource.readyState!==f.open?(u.logger.warn("MediaSource is not open (readyState="+u.mediaSource.readyState+")"),Promise.reject(m.SOURCE_BUFFER_APPEND_STATUS.FAILURE)):u.sourceBuffers.hasOwnProperty(d)?u.wx(c,d):(u.logger.log("sourceBuffers has no entry for "+d),Promise.reject(m.SOURCE_BUFFER_APPEND_STATUS.FAILURE)):(u.logger.debug("Could not queue action on SourceBuffer: MediaSource has been destroyed"),Promise.reject(m.SOURCE_BUFFER_APPEND_STATUS.FAILURE))})},c.prototype.wx=function(c,u){var d=c.getRepresentationId().representationId;try{this.logger.debug("[MSEWrapper][".concat(u,"][").concat(d,"] Adding segment to SourceBuffer [").concat(c.getUrl(),"]"));var p=this.sourceBuffers[u];return p.buffer.appendBuffer(c.getData()),p.onUpdateEnded()}catch(p){return this.xx(p,c,u,d)}},c.prototype.xx=function(c,u,d,p){var h;return this.logger.debug("[MSEWrapper][".concat(d,"][").concat(p,"] appendBuffer() failed"),c),"QuotaExceededError"===c.name?this.yx(d):(null!=(h=this.video)&&h.error?this.zx(c,u,d,p):this.Bx(c,u,d,p),this.logger.debug("[MSEWrapper][".concat(d,"][").concat(p,"] Failed appending segment to SourceBuffer"),c),Promise.reject(m.SOURCE_BUFFER_APPEND_STATUS.FAILURE))},c.prototype.yx=function(c){return this.logger.debug("QuotaExceededError, trying to remove old data from buffers..."),this.context.store.dispatch((0,P.setBufferMaxSize)(c,this.lw(c))),Promise.reject(m.SOURCE_BUFFER_APPEND_STATUS.QUOTA_EXCEEDED)},c.prototype.zx=function(c,u,d,p){var h;if(null!=(h=this.video)&&h.error){var f={mediaError:this.video.error,appendBufferError:c,mimeType:d,segmentUrl:u.getUrl(),codec:u.getCodec(),networkState:this.video.networkState,readyState:this.video.readyState};if(this.logger.warn("[MSEWrapper][".concat(d,"][").concat(p,"] appendBuffer() failed due to HTMLMediaElement.error: ").concat(this.video.error.code," - ").concat(this.video.error.message),f),this.Ax(this.video.error.code)){var m=new v.PlayerError(g.ErrorCode.PLAYBACK_ERROR,f,"Fatal media error detected: ".concat(this.video.error.message,". Player reload may be required."),this.context.sourceContext.sourceIdentifier),E=this.context.serviceManager.get(S.ServiceName.RecoveryService);E?E.handleError(m):this.context.eventHandler.fireError(m)}else this.context.eventHandler.dispatchEvent(_.PlayerEvent.Warning,new y.PlayerWarning(b.WarningCode.PLAYBACK_WARNING,"appendBuffer failed due to HTMLMediaElement.error: ".concat(this.video.error.code," - ").concat(this.video.error.message),f))}},c.prototype.Ax=function(c){return[T.MediaErrorCode.MEDIA_ERR_DECODE,T.MediaErrorCode.MEDIA_ERR_SRC_NOT_SUPPORTED].includes(c)},c.prototype.Bx=function(c,u,d,p){var h,f,m={appendBufferError:c,mimeType:d,segmentUrl:u.getUrl(),codec:u.getCodec(),networkState:null==(h=this.video)?void 0:h.networkState,readyState:null==(f=this.video)?void 0:f.readyState};this.logger.warn("[MSEWrapper][".concat(d,"][").concat(p,"] appendBuffer() failed without HTMLMediaElement.error - treating as non-fatal"),m),this.context.eventHandler.dispatchEvent(_.PlayerEvent.Warning,new y.PlayerWarning(b.WarningCode.PLAYBACK_WARNING,"appendBuffer failed without HTMLMediaElement.error: ".concat(c.message||c.name||"Unknown error"),m))},c.prototype.endOfStream=function(){var c=this;return this.queueActionOnBuffers(function(){var u;c.isMediaSourceOpen()?(c.logger.debug("Signaled mse end of stream"),null==(u=c.mediaSource)||u.endOfStream()):c.logger.debug("Skipped signaling EOS as the mse is not open")}).catch(function(u){c.logger.debug("Unable to signal EOS on media s
21ource",u)})},c.prototype.waitForBuffers=function(){var c=Object.keys(this.sourceBuffers).map(this.waitForBuffer);return this.Dx().then(function(){return Promise.all(c).then(function(){})})},c.prototype.queueActionOnBuffers=function(c){var u=this,d=new Promise(function(c,p){Promise.all(Object.keys(u.sourceBuffers).map(function(c){var p=u.queueActionOnBuffer(c,function(){});return u.queueActionOnBuffer(c,function(){return d}).then().catch(),p})).then(function(){return c()},p)}).then(function(){return c()}).then(function(){return Promise.all(Object.keys(u.sourceBuffers).map(function(c){return u.sourceBuffers[c].ready()})).then(function(){})});return d},c.prototype.queueActionOnBuffer=function(c,u){return this.sourceBuffers.hasOwnProperty(c)?this.sourceBuffers[c].queueAction(u):Promise.reject("No SourceBuffer for '".concat(c,"' available"))},c.prototype.Cx=function(c){var u,d=this;return null==(u=this.aw)||u.reject(c),this.bw?this.bw.then(function(){d.aw=void 0}):Promise.reject(c)},c.prototype.Dx=function(){var c,u=this;if(this.bw)return this.bw;this.aw=new R.Deferred,this.bw=this.aw.promise;var d=function(c){var d;h(),null==(d=u.aw)||d.reject(c)},p=function(){var c;h(),u.cw=!0,u.dw||(u.ew=!0),null==(c=u.aw)||c.resolve()},h=function(){u.mediaSource&&(u.mediaSource.removeEventListener("error",d),u.mediaSource.removeEventListener("sourceopen",p),u.mediaSource.removeEventListener("webkitsourceopen",p))};if(!this.video)return this.Cx("Could not set source to video element");if(!this.mediaSource)return this.Cx("mediaSource must not be null or undefined");if(this.mediaSource.addEventListener("error",d),this.mediaSource.addEventListener("sourceopen",p,!1),this.mediaSource.addEventListener("webkitsourceopen",p,!1),this.dw&&(this.video.disableRemotePlayback=!0,this.mediaSource.addEventListener("startstreaming",this.Ex),this.mediaSource.addEventListener("endstreaming",this.Fx),this.mediaSource.addEventListener("bufferedchange",this.Gx)),window&&window.URL&&"function"==typeof window.URL.createObjectURL){var f=window.URL.createObjectURL(this.mediaSource);this.video.src=f,null==(c=(0,I.getSourceStore)(this.context))||c.dispatch((0,A.setMseObjectUrl)(f))}else this.logger.debug("Could not use window.URL.createObjectURL(mediaSource) as the browser claims the function does not exist."),this.aw.reject("Could not create Object URL");return this.bw.then(function(){u.aw=void 0})},Object.defineProperty(c.prototype,"shouldContinueBuffering",{get:function(){return this.ew},enumerable:!1,configurable:!0}),c.prototype.createNewMSE=function(){var c=this;return this.mediaSource?this.tearDownMediaSource().then(function(){return c.Hx()}):this.fw.then(function(){return c.Hx()})},c.prototype.Hx=function(){return this.dw=(0,N.shouldUseManagedMediaSource)(this.context.settings.PREFER_MANAGED_MEDIA_SOURCE),this.dw?(this.logger.debug("[MSEWrapper] Using ManagedMediaSource"),this.mediaSource=new window.ManagedMediaSource):(this.logger.debug("[MSEWrapper] Using MediaSource"),this.mediaSource=new window.MediaSource),this.Dx()},c.prototype.isChangeTypeSupported=function(){var c,u,d=(0,M.getCapabilities)(),p=d.isWebOS&&d[w.CapabilityKey.webOSChromiumVersion]>=x.WEBOS_2021_CHROMIUM_VERSION;return!!(null!=(u=null==(c=window.SourceBuffer)?void 0:c.prototype)&&u.changeType)&&!(0,M.getCapabilities)().isTizen&&!p},c.prototype.Ix=function(c){var u=this,d=k.MimeTypeHelper.getMediaType(c),p=Object.keys(this.sourceBuffers).find(function(p){var h=k.MimeTypeHelper.getMediaType(p);return u.sourceBuffers.hasOwnProperty(p)&&h===d&&p!==c});p&&(this.sourceBuffers[c]=this.sourceBuffers[p],delete this.sourceBuffers[p])},c.prototype.changeBufferType=function(c,u,d){var p=this;this.Ix(c);var h=this.sourceBuffers[c];return h?d&&h.getMimeType()===c&&h.getCodec()===u?(this.context.logger.debug("Skipping buffer type change for ".concat(c," - mimeType and codec unchanged: ").concat(u)),Promise.resolve()):this.queueActionOnBuffer(c,function(){h.changeType(c,u),p.context.logger.debug("Changed ".concat(c," SourceBuffer type with codec=").concat(u))}):(this.context.logger.error("SourceBuffer not found for ".concat(c)),Promise.reject(Error("SourceBuffer not found for ".concat(c))))},c.prototype.dispose=function(){var c=this;this.tearDownMediaSource().then(function(){c.video=void 0})},c}()}
vendor: 4,269 bytes, line 21
21,21586:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.MSERendererModuleDefinition=void 0;var p=d(62756),h=d(79323),f=d(48873),m=d(82889),g=d(44914);u.MSERendererModuleDefinition={name:p.ModuleName.RendererMse,module:{MSEWrapper:f.MSEWrapper,MSERenderer:h.MSERenderer,Ranges:m.Ranges,technologyChecker:new g.TechnologyChecker}},u.default=u.MSERendererModuleDefinition},69200:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.LinkedListQueue=void 0;var d=function(c){this.value=c};u.LinkedListQueue=function(){function c(){this.Jab=0}return Object.defineProperty(c.prototype,"length",{get:function(){return this.Jab},enumerable:!1,configurable:!0}),c.prototype.dequeue=function(){if(0!==this.Jab){var c=this.Lab;return this.Lab=null==c?void 0:c.previous,c&&(c.previous=void 0,c.next=void 0),this.Jab--,null==c?void 0:c.value}},c.prototype.enqueue=function(c){if(0===this.Jab){var u=new d(c);this.Kab=u,this.Lab=u}else{var p=this.Kab;this.Kab=new d(c),this.Kab.next=p,p&&(p.previous=this.Kab)}this.Jab++},c.prototype.isEmpty=function(){return 0===this.length},c}()},82889:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.Ranges=void 0,u.Ranges=function(){function c(){}return c.filterRanges=function(u,d){var p=[];if(u&&u.length)for(var h=0;h<u.length;h++)d(u.start(h),u.end(h))&&p.push([u.start(h),u.end(h)]);return c.createTimeRanges(p)},c.createTimeRangesObj=function(c){return void 0===c||0===c.length?{length:0,start:function(){return 0},end:function(){return 0}}:{length:c.length,start:function(u){return c[u][0]},end:function(u){return c[u][1]}}},c.createTimeRanges=function(u,d){return Array.isArray(u)?c.createTimeRangesObj(u):void 0===u||void 0===d?c.createTimeRangesObj():c.createTimeRangesObj([[u,d]])},c.findNextRange=function(u,d){return c.filterRanges(u,function(u,p){return u-c.TIME_FUDGE_FACTOR>=d&&p-u>c.MIN_RANGE_DURATION})},c.findGaps=function(u,d){if(u.length<2)return c.createTimeRanges();for(var p=[],h=1;h<u.length;h++){var f=u.end(h-1),m=u.start(h);m-f>d&&p.push([f,m])}return c.createTimeRanges(p)},c.findRangeForTime=function(u,d){return c.filterRanges(u,function(c,u){return c<=d&&u>=d})},c.TIME_FUDGE_FACTOR=1/30,c.MIN_RANGE_DURATION=.2,c}()},76340:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.getMseObjectUrl=void 0,u.getMseObjectUrl=function(c){var u,d;return null!=(d=null==(u=null==c?void 0:c.renderer)?void 0:u.mseObjectUrl)?d:""}},60321:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.SourceBufferWrapper=void 0;var p=d(34841),h=d(69200);u.SourceBufferWrapper=function(){function c(c,u,d){var p=this;this.onBufferedRangesChanged=d,this.HW=function(){p.KW(),p.onBufferedRangesChanged(p.bufferedRanges),p.JW(function(c){return c.resolve()})},this.IW=function(c){p.JW(function(u){return u.reject(c)})},this.ready=function(){return p.buffer.updating?p.onUpdateEnded():Promise.resolve()},this.buffer=c,this.FW=u,this.bufferedRanges=[],this.queuePromise=Promise.resolve(),this.GW=new h.LinkedListQueue,["error","abort","sourceended","sourceclose"].forEach(function(c){p.buffer.addEventListener(c,p.IW)}),this.buffer.addEventListener("updateend",this.HW)}return c.prototype.JW=function(c){for(var u;null!=(u=this.GW.dequeue());)c(u)},c.prototype.KW=function(){try{this.bufferedRanges=function(c){for(var u=[],d=0;d<c.length;d++)u.push({start:c.start(d),end:c.end(d)});return u}(this.buffer.buffered)}catch{}},c.prototype.onUpdateEnded=function(){var c=new p.Deferred;return this.GW.enqueue(c),c.promise},c.prototype.queueAction=function(c){var u=this,d=this.queuePromise.then(function(){return u.ready()}).then(function(){return Promise.resolve(c()).then(function(){return u.ready()})});return this.queuePromise=d.catch(function(){}),d},c.prototype.changeType=function(c,u){this.buffer.changeType("".concat(c,"; codecs=").concat(u)),this.FW.mimeType=c,this.FW.codec=u},c.prototype.getCodec=function(){return this.FW.codec},c.prototype.getMimeType=function(){return this.FW.mimeType},c.prototype.dispose=function(){var c=this;["error","abort","sourceended","sourceclose"].forEach(function(u){c.buffer.removeEventListener(u,c.IW)}),this.JW(function(c){return c.reject("disposing source buffer")}),this.buffer.removeEventListener("updateend",this.HW)},c}()}
21,44914:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.TechnologyChecker=void 0;var p=d(44468);u.TechnologyChecker=function(){function c(){}return c.prototype.getSupportedTechnologies=function(){return[{player:p.PlayerType.Html5,streaming:p.StreamType.Dash},{player:p.PlayerType.Html5,streaming:p.StreamType.Hls},{player:p.PlayerType.Html5,streaming:p.StreamType.Smooth}]},c}()},10344:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.VideoEventHandler=void 0,u.VideoEventHandler=function(){function c(c){var u=this;this.yW=function(c){return c.time=u.xW&&u.xW.currentTime||0,c},this.xW=c}return c.prototype.on=function(c,u){this.xW&&this.xW.addEventListener(c,u,this.yW)},c.prototype.off=function(c,u){this.xW&&this.xW.removeEventListener(c,u)},c.prototype.fire=function(c,u){this.xW&&this.xW.eventHandler.triggerEvent(c,u)},c.prototype.dispose=function(){},c}()},65940:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.shouldUseManagedMediaSource=function(c){return"ManagedMediaSource"in window&&(c||!("MediaSource"in window))}}},function(c){return c(c.s=21586)}])}(bitmovinplayerMserenderer);var bitmovinplayerMserendererExports=bitmovinplayerMserenderer.exports;let MSERendererModule=getDefaultExportFromCjs$1(bitmovinplayerMserendererExports);var bitmovinplayerSubtitles={exports:{}};!function(c){var u;self,c.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[482],{82657:function(c,u){Object.defineProperty(u,"__esModule",{value:!0})},37723:function(c,u){var d=this&&this.__assign||function(){return(d=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};function p(c,u){return Object.keys(u).find(function(d){var p=u[d].getSubtitle(),h=p.id,f=p.lang,m=p.isFragmented,g=p.kind,v=h===c.id,y=!c.isFragmented||m===c.isFragmented,b=f===c.lang;c.isPreferred&&c.lang&&(b=f.includes(c.lang)||c.lang.includes(f));var S=g===c.kind&&b&&y;return v||S})}Object.defineProperty(u,"__esModule",{value:!0}),u.EnabledSubtitlesTracker=void 0,u.EnabledSubtitlesTracker=function(){function c(){this.WS={},this.XS=0}return c.prototype.addSubtitle=function(c){this.removeSubtitle(c.id),this.WS[this.ZS()]=d({isFragmented:!1},c)},c.prototype.removeSubtitle=function(c){var u=this;Object.keys(this.WS).forEach(function(d){u.WS[d].id===c&&delete u.WS[d]})},c.prototype.shouldEnableSubtitle=function(c,u){var d=this;return!!Object.keys(this.WS).find(function(p){return d.YS(d.WS[p],u)===c.id})},c.prototype.YS=function(c,u){var d=c.id,h=c.kind,f=c.lang,m=c.isFragmented;return p({lang:f,kind:h,isFragmented:m,id:d},u)||p({lang:f,kind:h,isFragmented:m},u)||p({lang:f,kind:h},u)},c.prototype.ZS=function(){return this.XS++,this.XS},c.prototype.dispose=function(){this.WS={},this.XS=0},c}()},53396:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.ForcedSubtitleController=void 0;var p=d(55552);u.ForcedSubtitleController=function(){function c(){this.aS={}}return c.prototype.addSubtitleHandler=function(c){this.aS[c.getSubtitle().id]=c},c.prototype.deactivate=function(){return this.cS()?Promise.all(Object.values(this.aS).map(function(c){return c.deactivate()})).then(function(){}):Promise.resolve()},c.prototype.activate=function(c){var u=this;return void 0===c&&(c=this.bS),this.cS()?(this.bS=c,this.deactivate().then(function(){var c=Object.values(u.aS).find(function(c){return(0,p.isEqualIsoLanguage)(c.getSubtitle().lang,u.bS)});if((c=c??Object.values(u.aS)[0])&&!c.isActive())return c.activate().catch(function(){})})):Promise.resolve()},c.prototype.onSeek=function(c,u){Object.values(this.aS).forEach(function(d){return d.onSeek(c,u)})},c.prototype.onSeeked=function(c,u){Object.values(this.aS).forEach(function(d){return d.onSeeked(c,u)})},c.prototype.dispose=function(){Object.values(this.aS).forEach(function(c){return c.dispose()}),this.aS=null},c.prototype.cS=function(){return Object.keys(this.aS).length>0},c.prototype.getForcedSubtitleHandler=function(c){if(this.aS)return Object.values(this.aS).find(function(u){return c(u)})},c}()},42009:function(c,u){function d(c){return c.replace(/<[^>]*>?/g,"")}function p(c){return c.replace(/<br\s*\/?>/g,`
22`)}
22Object.defineProperty(u,"__esModule",{value:!0}),u.htmlToText=function(c){return d(p(c))},u.stripHtmlTags=d,u.prepareHtml=function(c){return c.replace(/(\r\n|\r|\n)/g,"<br />")},u.replaceHtmlBreakPointsWithNewLine=p,u.stripAwayHtmlBreakPoints=function(c){return c.replace(/<br\s*\/?>/g,"")}},55552:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.isEqualIsoLanguage=function(c,u){var d;if(void 0===u)return!1;if(null!=(d=window.Intl)&&d.DisplayNames){var p=new window.Intl.DisplayNames(["en"],{type:"language"});try{return p.of(c.split("-")[0])===p.of(u.split("-")[0])}catch{}}return c===u}},86058:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.parseMP4WrappedSubtitles=function(c,u){var d,y,b,S,_=c.getTimescale();if(void 0===_||!m.ModuleManager.has(g.ModuleName.ContainerMP4))return[];var E=m.ModuleManager.get(g.ModuleName.ContainerMP4);return d=E.getMp4Fragments(c).flatMap(function(d){return E.getTrackSamples(d.moof,d.mdat,c,u)}),y=0,b=[],S=0,d.forEach(function(u){var d,m,g=h.CodecStringHelper.extractCodec(c.getCodec()),E=u.duration/_,T=c.getPlaybackTime()+y,w=T+E;if(y+=E,"wvtt"===g||"vtt"===g){var P=function(c,u,d,h){for(var f=c.data.buffer,m=c.data.byteOffset,g=0,y=[],b="",S="";g<c.data.byteLength;){var _=c.data.getUint32(g),E=m+g,T=p.ArrayHelper.convertBufferSourceToUTF8(new Uint8Array(f,E+4,4));if("vttc"===T){if(b){var w=v(u,d,h,S,b);y.push(w),h+=1,b="",S=""}g+=8}else"payl"===T?b=p.ArrayHelper.convertBufferSourceToUTF8(new Uint8Array(f,E+8,_-8)):"sttg"===T&&(S=p.ArrayHelper.convertBufferSourceToUTF8(new Uint8Array(f,E+8,_-8))),g+=_}return b&&(w=v(u,d,h,S,b),y.push(w)),y}(u,T,w,S);S+=P.length,P.forEach(function(c){b.push({start:T,end:w,text:c})})}else{"stpp"===g&&b.push({start:T,end:w,text:(m=new Uint8Array((d=u).data.buffer,d.data.byteOffset,d.data.byteLength),p.ArrayHelper.convertBufferSourceToUTF8(m,f.TextSegmentAnalyzer.detectEncoding(d.data)))})}}),b};var p=d(74853),h=d(34047),f=d(66502),m=d(88052),g=d(62756);function v(c,u,d,p,h){return["[EMBEDDEDWEBVTT]",c,u,d,p,h].join(`
23`)}},52112:function(c,u,d){var p=this&&this.__createBinding||(Object.create?function(c,u,d,p){void 0===p&&(p=d);var h=Object.getOwnPropertyDescriptor(u,d);h&&!("get"in h?!u.__esModule:h.writable||h.configurable)||(h={enumerable:!0,get:function(){return u[d]}}),Object.defineProperty(c,p,h)}:function(c,u,d,p){void 0===p&&(p=d),c[p]=u[d]}),h=this&&this.__exportStar||function(c,u){for(var d in c)"default"===d||Object.prototype.hasOwnProperty.call(u,d)||p(u,c,d)};Object.defineProperty(u,"__esModule",{value:!0}),u.SubtitleModuleDefinition=void 0;var f=d(62756),m=d(71340),g=d(42009),v=d(55552),y=d(78717),b=d(26438),S=d(606),_=d(85224);u.SubtitleModuleDefinition={name:f.ModuleName.Subtitles,module:function(){return{SubtitleService:S.SubtitleService,SubtitleParserFactory:b.SubtitleParserFactory,PlayerSubtitlesApiFactory:y.PlayerSubtitlesApiFactory,HtmlTransformer:g,LanguageComparer:v,hashCode:m.hashCode,createHtmlElement:_.createHtmlElement}},dependencies:[f.ModuleName.EngineBitmovin]},u.default=u.SubtitleModuleDefinition,h(d(82657),u)},15569:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.parsePlainTextSubtitles=function(c){var u,d,f=h.TextSegmentAnalyzer.detectEncoding(c.getData()),m=p.ArrayHelper.convertBufferSourceToUTF8(c.getData(),f),g=null!=(u=c.getPlaybackTime())?u:0;return[{start:g,end:g+(null!=(d=c.getDuration())?d:0),text:m}]};var p=d(74853),h=d(66502)},78717:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.PlayerSubtitlesApiFactory=void 0;var h=d(3714);u.PlayerSubtitlesApiFactory=function(){function c(){}return c.build=function(c){return new(function(){function u(){}return u.prototype.add=function(u){c.addSubtitle(u)},u.prototype.remove=function(u){c.removeSubtitle(u)},u.prototype.list=function(){return c.listSubtitles()},u.prototype.enable=function(u,d){void 0===d&&(d=!0),c.enableSubtitle(u,d)},u.prototype.disable=function(u){c.disableSubtitle(u)},u.prototype.cueEnter=function(u){c.fireEvent(h.PlayerEvent.CueEnter,p(p({},u),{type:h.PlayerEvent.CueEnter}))},u.prototype.cueExit=function(u){c.fireEvent(h.PlayerEvent.CueExit,p(p({},u),{type:h.PlayerEvent.CueExit}))},u}())},c}()}
23,26438:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.SubtitleParserFactory=void 0;var p=d(3714),h=d(88052),f=d(62756),m=d(22374);u.SubtitleParserFactory=function(){function c(){}return c.createInstance=function(c,u){var d;return u.indexOf("<?")>-1||u.indexOf("<tt")>-1?h.ModuleManager.has(f.ModuleName.SubtitlesTTML)?d=new(h.ModuleManager.get(f.ModuleName.SubtitlesTTML)).TTMLParser(c):c.eventHandler.dispatchEvent(p.PlayerEvent.Warning,new m.PlayerModuleMissingWarning(f.ModuleName.SubtitlesTTML,"The ".concat(f.ModuleName.SubtitlesTTML," module is required to parse TTML subtitles."))):h.ModuleManager.has(f.ModuleName.SubtitlesWebVTT)?d=new(h.ModuleManager.get(f.ModuleName.SubtitlesWebVTT)).WebVttParser:c.eventHandler.dispatchEvent(p.PlayerEvent.Warning,new m.PlayerModuleMissingWarning(f.ModuleName.SubtitlesWebVTT,"The ".concat(f.ModuleName.SubtitlesWebVTT," module is required to parse WebVTT subtitles."))),d},c}()},606:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.SubtitleService=void 0;var h=d(80813),f=d(56481),m=d(3714),g=d(91678),v=d(93204),y=d(34047),b=d(85434),S=d(70850),_=d(88052),E=d(62756),T=d(22374),w=d(37723),P=d(53396),A=d(39310),I=d(60672),M=d(88788),R=d(69363),k=d(74715);u.SubtitleService=function(){function c(c){var u=this;this.context=c,this.getTransmuxer=function(){return u.Rs},this.ks=function(){u.js()},this.qs=function(c){u.js(),u.Ws=c.position;var d,p=null!=(d=u.Ws)?d:0,h="seekTarget"in c?c.seekTarget:c.target;Object.values(u.Os).forEach(function(c){return c.onSeek(p,h)}),u.Us.onSeek(p,h)},this.rs=function(){var c,d=null!=(c=u.Ws)?c:0,p=u.context.internalPlayer.getCurrentTime();Object.values(u.Os).forEach(function(c){return c.onSeeked(d,p)}),u.Us.onSeeked(d,p)},this.vs=function(c,d){u.context.logger.debug("Switching periods in subtitleService");var p=u.Qs.findPeriod(c);p?(u.us(c,d),u.setupControllersForNextPeriod(p),u.ws()):u.context.logger.log("Can not find period with id = ".concat(c," in Manifest. Skipping period update"))},this.It=function(){Object.keys(u.Os).forEach(function(c){return u.Os[c].dispose()}),u.Os={},u.Ps&&(u.Ps.dispose(),u.Ps=void 0),u.Vs&&u.Vs.reset()},this.Os={},this.Ss=c.eventHandler,this.Qs=c.serviceManager.get(h.ServiceName.ManifestService,c.sourceContext.sourceIdentifier),this.Ts=new w.EnabledSubtitlesTracker,this.Us=new P.ForcedSubtitleController,this.Ss.on(m.PlayerEvent.Seek,this.qs),this.Ss.on(m.PlayerEvent.TimeShift,this.qs),this.Ss.on(m.PlayerEvent.Seeked,this.rs),this.Ss.on(m.PlayerEvent.TimeShifted,this.rs),this.Ss.on(m.PlayerEvent.SourceUnloaded,this.It),this.Ys=_.ModuleManager.has(E.ModuleName.SubtitlesCEA608)?_.ModuleManager.get(E.ModuleName.SubtitlesCEA608):void 0,this.bs()}return c.prototype.Zs=function(c,u){var d=this.Qs.isHlsManifest()&&!(u||!c);return c!==u||d},c.prototype.bs=function(){var c=this,u=this.context.serviceManager.get(h.ServiceName.SourceStoreService,this.context.sourceContext.sourceIdentifier);this.Xs=(0,v.subscribe)(u)(_.ModuleManager.get(E.ModuleName.EngineBitmovin).selectors.getPlayingPeriodId,this.vs,function(u,d){return c.Zs(u,d)})},c.prototype.setupControllersForNextPeriod=function(c){var u=this,d=_.ModuleManager.get(E.ModuleName.EngineBitmovin).getMimeTypeForAdaptationSet;c.AdaptationSet.forEach(function(c){var p=d(c);(0,k.isSubtitleTrack)(p,u.Qs.isHlsManifest())&&u.cs(c,p)})},c.prototype.cs=function(c,u){(0,k.isFragmentedAdaptationSet)(c)?(this.context.store.dispatch((0,g.initializeMetricsForMimeType)(u,this.context.settings)),this.ds(c,u)):this.es(c,u)},c.prototype.ds=function(c,u){var d=this.context.sourceContext.sourceIdentifier,p=this.context.serviceManager.get(h.ServiceName.SourceStoreService,this.context.sourceContext.sourceIdentifier);if(p){var f={mimeType:u,codec:_.ModuleManager.get(E.ModuleName.EngineBitmovin).getCodecsFromAdaptationSet(c),isHls:this.Qs.isHlsManifest(),manifestLoader:this.context.serviceManager.get(h.ServiceName.ManifestLoadingService,d),periodId:c._internalId.periodId,sourceStore:p};this.addFragmentSubtitle(f,c)}},c.prototype.es=function(c,u){if(_.ModuleManager.has(E.ModuleName.DASH)){var d=new(_.ModuleManager.get(E.ModuleName.DASH)).SegmentTemplateMPDHandler(this.context,this.context.sourceContext),p=this.Qs.toSubtitleTrack(c,u);d.setAdaptationSetId(c._internalId),p.url=d.getSubtitleUrl().toString(),this.addExternalSubtitle(p,c)}},c.prototype.setTransmuxer=function(c){this.Rs=c},c.prototype.hasSubtitle=function(c){return!!this.Os[c]},c.prototype.enableSubtitle=function(c){var u=this,d=this.Os[c];return d&&!d.isActive()?d.activate().then(function(){d.refresh(),u.Us.deactivate()}).then(function(){return u.Ts.addSubtitle(d.getSubtitle()),!0}).catch(function(c){return u.context.logger.debug("Error during subtitle activation",c),!1}):Promise.resolve(!1)},c.prototype.addExternalSubtitle=function(c,u){if(void 0===u&&(u=null),c.id||(c.id=c.url),this.fs(c,u))return c;var d=new I.ExternalFileSubtitleHandler(this.context,c,u);return this.gs(d),c},c.prototype.fs=function(c,u){var d,p,h=this.Os[c.id],f=null!=(d=null==h?void 0:h.periodId)?d:null,m=null!=(p=null==u?void 0:u._internalId.periodId)?p:null;return h&&f===m?h:this.Us.getForcedSubtitleHandler(function(u){var d,p=u.getSubtitle().id===c.id,h=(null!=(d=u.periodId)?d:null)===m;return p&&h}
23)},c.prototype.gs=function(c){var u=c.getSubtitle(),d=this.context.config.playback.isForcedSubtitle;if("function"==typeof d?(0,S.safeUserCallback)(function(){return d(u)},this.context.logger):u.forced)this.Us.addSubtitleHandler(c);else{var p=!1,h=u.id;this.Os[h]&&(p=this.Os[h].isActive(),this.xs(h)),this.hs(c),p&&c.activate()}},c.prototype.hs=function(c){var u=c.getSubtitle();this.is(u),this.Os[u.id]=c,this.ss(u)},c.prototype.is=function(c){var u,d,p=this.context.sourceContext.source.labeling,h=this.Qs.isHlsManifest()?null==(u=null==p?void 0:p.hls)?void 0:u.subtitles:null==(d=null==p?void 0:p.dash)?void 0:d.subtitles;"function"==typeof h&&(c.label=(0,S.safeUserCallback)(function(){return h(c)},this.context.logger))},c.prototype.addFragmentSubtitle=function(c,u){if(!_.ModuleManager.has(E.ModuleName.EngineBitmovin))return this.context.logger.warn("Unable to add fragmented subtitles because MSE Module is missing"),null;var d=this.Qs.toSubtitleTrack(u,c.mimeType);d.isFragmented=!0,d.url=null;var p=new M.FragmentedSubtitleHandler(this.context,c,d,this.getTransmuxer);return this.gs(p),d},c.prototype.setupCea608CaptionExtractor=function(c){if(!this.Ys)return this.Ss.dispatchEvent(m.PlayerEvent.Warning,new T.PlayerModuleMissingWarning(E.ModuleName.SubtitlesCEA608,"The ".concat(E.ModuleName.SubtitlesCEA608," module is required to parse CEA captions."))),this.context.logger.log("CEA Caption parsing is disabled, because the Cea680 module is not loaded"),null;if(!_.ModuleManager.has(E.ModuleName.ContainerMP4))return this.Ss.dispatchEvent(m.PlayerEvent.Warning,new T.PlayerModuleMissingWarning(E.ModuleName.ContainerMP4,"The ".concat(E.ModuleName.ContainerMP4," module is required to parse CEA captions."))),this.context.logger.log("CEA Caption parsing is disabled, because the ContainerMP4 module is not loaded"),null;this.Ps&&this.Ps.dispose();var u,d=_.ModuleManager.get(E.ModuleName.ContainerMP4),p=this.Ys.Cea608Extractor;return this.Ps=new p(c,d,null==(u=this.context.config.tweaks)?void 0:u.parse_cea_708_caption),this.Ps},c.prototype.js=function(){this.Ps&&(this.context.logger.debug("Resetting CEA caption extractor..."),this.Ps.reset())},c.prototype.ls=function(){var c=_.ModuleManager.get(E.ModuleName.HLS);this.Vs=new c.DiscontinuitySequenceNumberTracker(b.MimeTypeHelper.isVideo),this.Vs.subscribe(this.ks)},c.prototype.ms=function(c){this.Vs||this.ls(),this.Vs.trackSegment(c)},c.prototype.ns=function(){return this.Qs.getManifest()&&this.Qs.isHlsManifest()&&_.ModuleManager.has(E.ModuleName.HLS)},c.prototype.handleClosedCaptions=function(c,u,d,p){var h;return!p&&b.MimeTypeHelper.isVideo(u.getMimeType())&&null!=(h=this.Ys)&&h.CEA_EXTRACTOR_SUPPORTED_CODEC_TAGS.includes((0,y.getCodecTag)(u))?this.os(u,c.getTimestampOffset()):(this.ps(d,u.getPeriodId()),Promise.resolve())},c.prototype.os=function(c,u){var d=this;return this.Ps?(this.ns()&&this.ms(c),this.Ps.extract(c).then(function(p){p.forEach(function(c){c.start-=u,c.end-=u}),p.length>0&&(d.context.logger.insane("Extracted Closed Captions from fMP4: "+JSON.stringify(p)),d.ps(p,c.getPeriodId()))}).catch(function(c){var u;c instanceof T.PlayerModuleMissingWarning?(null==(u=d.Ps)||u.dispose(),d.Ps=void 0,d.Ss.dispatchEvent(m.PlayerEvent.Warning,c)):d.context.logger.debug("Error parsing CEA-608 Captions from fMP4: "+c)})):Promise.resolve()},c.prototype.ps=function(c,u){if(c&&Array.isArray(c)&&0!==c.length)for(var d=this.Qs.getClosedCaptionLabels(u),p=this,h=0;h<c.length;h++)!function(c){var h=c.channel;if(!p.Os[h]){var f=d.find(function(c){return c.id===h})||{id:h,kind:"captions",lang:"unknown",label:"Captions (".concat(c.channel,")")};p.hs(new A.Cea608Handler(p.context,f))}p.Os[h].addCaption(c,u)}(c[h])},c.prototype.ss=function(c){this.Ss.dispatchEvent(m.PlayerEvent.SubtitleAdded,{subtitle:p({},c)})},c.prototype.disableSubtitle=function(c){var u=this,d=this.Os[c];return d?d.deactivate().then(function(){return u.Ts.removeSubtitle(c),0===u.getActiveSubtitles().length&&u.Us.activate().catch(function(){}),!0}).catch(function(){return!1}):Promise.resolve(!1)},c.prototype.disableAllSubtitles=function(){var c=this;
vendor: 4,900 bytes, line 23
23this.getActiveSubtitles().forEach(function(u){return c.disableSubtitle(u.id)})},c.prototype.removeSubtitle=function(c){this.xs(c),this.Ts.removeSubtitle(c)},c.prototype.getActiveSubtitles=function(){var c=this;return Object.keys(this.Os).filter(function(u){return c.Os[u].isActive()}).map(function(u){return c.Os[u].getSubtitle()})},c.prototype.hasSubtitles=function(){return Object.keys(this.Os).length>0},c.prototype.getAvailableSubtitles=function(c){return Object.values(this.Os).filter(function(u){var d=u.periodId;return!d||c===d}).map(function(c){return c.getSubtitle()})},c.prototype.enableForcedSubtitle=function(c){this.Us.activate(c).catch(function(){})},c.prototype.ts=function(c,u,d){var p=c.getSubtitleType()===R.SubtitleType.FRAGMENTED&&c.periodId===d,h=c.getSubtitleType()===R.SubtitleType.EXTERNAL_FILE&&c.periodId&&c.periodId!==u;return p||h},c.prototype.us=function(c,u){var d=this;Object.keys(this.Os).forEach(function(p){var h=d.Os[p];d.ts(h,c,u)&&d.xs(p)})},c.prototype.ws=function(){var c=this;Object.keys(this.Os).forEach(function(u){var d,p=c.Os[u];if(!p.isActive()&&c.Ts.shouldEnableSubtitle(p.getSubtitle(),c.Os)){var h={subtitle:p.getSubtitle()};null==(d=c.Ss)||d.dispatchEvent(m.PlayerEvent.SubtitleEnable,h),p.activate().then(function(){var u;null==(u=c.Ss)||u.dispatchEvent(m.PlayerEvent.SubtitleEnabled,h)})}})},c.prototype.xs=function(c){if(this.Os[c]){var u=this.Os[c].getSubtitle();this.Os[c].dispose(),delete this.Os[c],this.Ss&&this.Ss.dispatchEvent(m.PlayerEvent.SubtitleRemoved,{subtitle:u})}},c.prototype.clearBuffersUntil=function(c){var u=this;Object.keys(this.Os).forEach(function(d){return u.Os[d].clearBuffersUntil(c)})},c.prototype.dispose=function(){this.It(),this.Ts=(0,f.dispose)(this.Ts),this.Us=(0,f.dispose)(this.Us),this.Vs=(0,f.dispose)(this.Vs),this.Rs=void 0,this.Qs=null,this.Ss.off(m.PlayerEvent.Seek,this.qs),this.Ss.off(m.PlayerEvent.TimeShift,this.qs),this.Ss.off(m.PlayerEvent.Seeked,this.rs),this.Ss.off(m.PlayerEvent.TimeShifted,this.rs),this.Ss.off(m.PlayerEvent.SourceUnloaded,this.It),this.Xs(),this.Os={},this.Ss=null},c}()},74715:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.isSubtitleTrack=function(c,u){return(p.MimeTypeHelper.isText(c)||p.MimeTypeHelper.isTtmlXml(c))&&!u||p.MimeTypeHelper.isApplication(c)},u.isFragmentedAdaptationSet=function(c){var u=[c];return c.Representation&&c.Representation.length>0&&u.push(c.Representation[0]),u.some(function(c){return c.SegmentList||c.SegmentTemplate||c.SegmentBase})};var p=d(85434)},74437:function(c,u,d){var p,h,f,m=this&&this.__assign||function(){return(m=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},g=this&&this.__runInitializers||function(c,u,d){for(var p=arguments.length>2,h=0;h<u.length;h++)d=p?u[h].call(c,d):u[h].call(c);return p?d:void 0},v=this&&this.__esDecorate||function(c,u,d,p,h,f){function m(c){if(void 0!==c&&"function"!=typeof c)throw TypeError("Function expected");return c}for(var g,v=p.kind,y="getter"===v?"get":"setter"===v?"set":"value",b=!u&&c?p.static?c:c.prototype:null,S=u||(b?Object.getOwnPropertyDescriptor(b,p.name):{}),_=!1,E=d.length-1;E>=0;E--){var T={};for(var w in p)T[w]="access"===w?{}:p[w];for(var w in p.access)T.access[w]=p.access[w];T.addInitializer=function(c){if(_)throw TypeError("Cannot add initializers after decoration has completed");f.push(m(c||null))};var P=(0,d[E])("accessor"===v?{get:S.get,set:S.set}:S[y],T);if("accessor"===v){if(void 0===P)continue;if(null===P||"object"!=typeof P)throw TypeError("Object expected");(g=m(P.get))&&(S.get=g),(g=m(P.set))&&(S.set=g),(g=m(P.init))&&h.unshift(g)}else(g=m(P))&&("field"===v?h.unshift(g):S[y]=g)}b&&Object.defineProperty(b,p.name,S),_=!0};Object.defineProperty(u,"__esModule",{value:!0}),u.AbstractSubtitleHandler=void 0;var y=d(80813),b=d(3714),S=d(80438),_=d(69957),E=d(44468),T=d(88052),w=d(62756);function P(c,u){return m({subtitleId:u,start:c.start,end:c.end},c.content)}h=[],p=function(){function c(c,u,d){void 0===d&&(d=null);var p=this;this.timeline=g(this,h),this.onCueEnter=function(c){p.context.eventHandler.dispatchEvent(b.PlayerEvent.CueEnter,P(c,p.getSubtitle().id))},this.onCueExit=function(c){p.context.eventHandler&&p.context.eventHandler.dispatchEvent(b.PlayerEvent.CueExit,P(c,p.getSubtitle().id))},this.onCueUpdate=function(c){p.context.eventHandler.dispatchEvent(b.PlayerEvent.CueUpdate,P(c,p.getSubtitle().id))},this.context=c,this.H9=u,this.H9.enabled=this.H9.enabled||!1,this.timeline=new S.Timeline(c,{onCueEnter:this.onCueEnter,onCueExit:this.onCueExit,onCueUpdate:this.onCueUpdate}),this.timeline.stopListening(),this.periodId=d,this.I9=c.serviceManager.get(y.ServiceName.SourceStoreService,c.sourceContext.sourceIdentifier)}return c.prototype.fireOnCueParsedEvents=function(c,u){var d=this;
23c&&this.context.eventHandler&&c.forEach(function(c){d.context.eventHandler.dispatchEvent(b.PlayerEvent.CueParsed,m(m({subtitleId:d.getSubtitle().id},c),{periodId:u}))})},c.prototype.isActive=function(){return this.H9.enabled},c.prototype.activate=function(){return this.H9.enabled=!0,this.timeline.startListening(),this.timeline.show(),Promise.resolve()},c.prototype.deactivate=function(){return this.H9.enabled=!1,this.timeline.stopListening(),this.timeline.hide(),Promise.resolve()},c.prototype.refresh=function(){this.timeline.show()},c.prototype.getSubtitle=function(){return this.H9},c.prototype.clearBuffersUntil=function(c){this.timeline.removeCuesUntil(c)},c.prototype.dispose=function(){this.I9=null,this.deactivate(),this.timeline.dispose()},c.prototype.isTsContainer=function(){var c,u=T.ModuleManager.get(w.ModuleName.EngineBitmovin),d=u.selectors,p=u.mseModuleTypes;return(null==(c=d.getContainerFormat(this.I9.getState(),E.MediaType.Video))?void 0:c.source)===p.containerFormat.TS},c.prototype.applyVttOffset=function(c){return this.isTsContainer()?c.map(function(c){return null!=c.offset?m(m({},c),{start:c.start+c.offset,end:c.end+c.offset,updates:c.updates.map(function(u){return m(m({},u),{updateTime:u.updateTime+c.offset})})}):c}):c},c}(),f="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,v(p,null,[(0,_.trackPerformance)("SubtitleHandler.activate")],{kind:"method",name:"activate",static:!1,private:!1,access:{has:function(c){return"activate"in c},get:function(c){return c.activate}},metadata:f},null,h),f&&Object.defineProperty(p,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:f}),u.AbstractSubtitleHandler=p},39310:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.Cea608Handler=void 0;var f=d(74437),m=d(69363);u.Cea608Handler=function(c){function u(u,d,p){return void 0===p&&(p=null),c.call(this,u,d,p)||this}return h(u,c),u.prototype.onSeek=function(){},u.prototype.onSeeked=function(c,u){var d=this.context.settings.CLEAR_BUFFERS_ON_SEEKING_BACKWARDS;u<c&&d&&this.clearBuffersUntil(this.context.renderer.getDuration())},u.prototype.addCaption=function(c,u){c&&(this.fireOnCueParsedEvents([c],u),this.timeline.addCues([c],0))},u.prototype.getSubtitleType=function(){return m.SubtitleType.IN_STREAM},u}(f.AbstractSubtitleHandler)},60672:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.ExternalFileSubtitleHandler=void 0;var f=d(25926),m=d(4224),g=d(56481),v=d(3714),y=d(4129),b=d(29669),S=d(26438),_=d(74437),E=d(69363);u.ExternalFileSubtitleHandler=function(c){function u(d,p,h){var f=c.call(this,d,p,h&&h._internalId.periodId)||this;return f.hS=function(c){if(f.timeline.removeCues(),null==c?void 0:c.body){f.gS=!0;var u=f.iS(c.body.trim()),d=f.applyVttOffset(u);f.fireOnCueParsedEvents(d,null),f.timeline.addCues(d)}},h&&(p.id=h.Representation[0]._id),p.url?(f.fS=u.enforceHTTPSForSecureOrigins(p.url.trim()),f.gS=!1,f.dS=new y.DefaultContentLoader(f.context,{maxRetries:f.context.settings.MAX_RETRIES,retryDelay:f.context.settings.RETRY_DELAY,requestType:b.HttpRequestType.MEDIA_SUBTITLES})):(f.context.logger.log("No url was provided for an external subtitle, nothing will be loaded."),f.gS=!0,f.eS=Promise.resolve()),f}return h(u,c),u.prototype.activate=function(){var u=this;return this.context.logger.debug("loading "+this.fS),c.prototype.activate.call(this).then(function(){return u.eS?u.eS:u.gS?Promise.resolve():(u.eS=u.dS.load(u.fS).then(u.hS).catch(function(c){var d,p;if(u.eS=void 0,!u.isActive())return Promise.resolve();throw u.context.eventHandler&&u.context.eventHandler.dispatchEvent(v.PlayerEvent.Warning,new f.PlayerWarning(m.WarningCode.NETWORK_COULD_NOT_LOAD_SUBTITLE)),u.context.logger.debug("Could not load subtitles/captions, got HTTP status code ".concat(null!=(p=null==(d=null==c?void 0:c.status)?void 0:d.toString())?p:""),c),u.deactivate(),"loading failed"}),u.eS)})},u.prototype.iS=function(c){return S.SubtitleParserFactory.createInstance(this.context,c).parse(c)},u.enforceHTTPSForSecureOrigins=function(c){var u=RegExp("^(?:[a-z]+:)?//","i");return"https:"===location.protocol?c.replace(u,"//"):c},u.prototype.getSubtitleType=function(){return E.SubtitleType.EXTERNAL_FILE},u.prototype.clearBuffersUntil=function(){},u.prototype.onSeek=function(){},u.prototype.onSeeked=function(){},u.prototype.dispose=function(){c.prototype.dispose.call(this),this.dS=(0,g.dis
23pose)(this.dS)},u}(_.AbstractSubtitleHandler)},88788:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)}),f=this&&this.__assign||function(){return(f=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.FragmentedSubtitleHandler=void 0;var m=d(4524),g=d(80813),v=d(3714),y=d(44468),b=d(87827),S=d(86897),_=d(93204),E=d(81199),T=d(34047),w=d(79721),P=d(85434),A=d(66502),I=d(23068),M=d(88052),R=d(62756),k=d(86058),x=d(15569),C=d(26438),O=d(74437),D=d(69363);function L(c){return A.TextSegmentAnalyzer.isPlainTextPayload(c.getData())}function N(c){var u=c.getCodec();return("wvtt"===u||"vtt"===u||""===u&&c.getMimeType().includes("vtt"))&&L(c)}function U(c,u){var d=M.ModuleManager.get(R.ModuleName.EngineBitmovin,!1);if(void 0!==u&&void 0!==d)return d.selectors.getContainerFormat(u,c)}function F(c){return"discontinuitySequenceNumber"in c}u.FragmentedSubtitleHandler=function(c){function u(u,d,p,h){var f=c.call(this,u,p,d.periodId)||this;return f.RT=function(c){var u,d,p,h,m,v=void 0!==(d=null==(u=f.context.serviceManager.get(g.ServiceName.SourceStoreService,f.context.sourceContext.sourceIdentifier))?void 0:u.getState())&&void 0!==u?Promise.race(Object.keys(h=null!=(p=d.activeTracks)?p:{}).flatMap(function(c){var u;return null!=(u=h[c].mediaTypes)?u:[]}).filter(function(c){return c===y.MediaType.Video||c===y.MediaType.Audio}).map(function(c){var p;return void 0!==(p=U(c,d))?Promise.resolve(p):(0,_.waitForStateChangeThen)(u)(function(u){return U(c,u)},function(c){return void 0!==c})})):Promise.reject("SourceState unavailable"),b=null==(m=c.getSegmentInfo())?void 0:m.discontinuitySequenceNumber;return void 0!==b&&(v=v.then(function(){return f.IT(b)}).then(function(){return f.JT(b)}).then(function(){return f.isActive()}).catch(function(){return!1})),v.then(function(u){f.ST(c),u&&f.PT(c)})},f.ZT=function(c){var u;if(c&&void 0!==c.time){var d=c.time;f.clearBuffersUntil(d);var p=(null==(u=f.qS)?void 0:u.getTimeForNextSegment(f.jS))||d,h=p-d,m=(0,E.getPlayableBufferLevel)(f.context.internalPlayer);isNaN(p)||h>=m||f.kS.hasNext(p)&&(f.kS.getMPDHandler().resolvePendingSegmentInfoRequests(),f.kS.getNext(p))}},f.bT=function(){f.kS.updateMpd()},f.eventHandler=u.eventHandler,f.oS=d.sourceStore,f.qS=u.serviceManager.get(g.ServiceName.StreamTimeService),f.pS=u.serviceManager.get(g.ServiceName.ManifestUpdateSchedulingService,u.sourceContext.sourceIdentifier),f.mS=h,f.lS=d.isHls,f.nS=u.bufferSettings,f.kS=new(M.ModuleManager.get(R.ModuleName.EngineBitmovin)).SegmentController(u,f.RT,d.mimeType,d.codec,d.isHls,d.manifestLoader,d.periodId,d.sourceStore),f.kS.setCurrentLangObj(p),f.jS="".concat(d.mimeType,"/").concat(p.id),f.rS=M.ModuleManager.get(R.ModuleName.HLS,!1),f.tS(),f}return h(u,c),u.prototype.tS=function(){!this.sS&&this.oS&&(this.sS=(0,_.subscribe)(this.oS)(function(c){return null==c?void 0:c.manifest},this.bT,function(c,u){return!!(null!=c&&c.isInitialized&&!(null!=u&&u.isInitialized))}))},u.prototype.uS=function(){this.sS&&(this.sS(),this.sS=void 0)},u.prototype.vS=function(c){return N(c)?(0,x.parsePlainTextSubtitles)(c):P.MimeTypeHelper.isApplication(c.getMimeType())&&!L(c)?(0,k.parseMP4WrappedSubtitles)(c,this.context.logger):c.getMetadata().subtitles},u.prototype.wS=function(c){var u=c.getMetadata();u.subtitles=this.vS(c),c.setMetadata(u)},u.prototype.xS=function(c){var u,d=null!=(u=c.getPlaybackTime())?u:c.getSegmentInfo().startTime;c.setPlaybackTime(d)},u.prototype.IT=function(c){var u=this.mS();return this.lS&&u?(void 0!==c&&this.OT()||(c=-1),u.waitForInitializationForDiscontinuity(c)):Promise.resolve()},u.prototype.JT=function(c){if(!this.OT()||void 0!==this.QT(c))return Promise.resolve();if(!this.rS)return Promise.reject(Error("HLS Module missing"));var u=this.rS.selectors,d=u.getHlsState,p=u.getPresentationTimeOffset;return(0,_.waitForStateChangeThen)(this.oS)(function(u){return p(d(u),String(c))},function(c){return void 0!==c}).then()},u.prototype.KT=function(c){var u,d,p=null==(u=this.context.serviceManager.get(g.ServiceName.SourceStoreService,c))?void 0:u.getState(),h=null==(d=this.kS.getCurrentAdaptationSet())?void 0:d.Representation[0];return h&&p?(0,M.ModuleManager.get(R.ModuleName.EngineBitmovin).selectors.getSegmentInfos)(p,h._internalId.key()):[]},u.prototype.LT=function(c,u){var d,p,h,f,m=M.ModuleManager.get(R.ModuleName.EngineBitmovin).AdaptationSetId,v=this.context.serviceManager.get(g.ServiceName.ManifestService,c),y=new m(w.DEFAULT_PERIOD_ID,u),b=null==v?void 0:v.getAdaptationSet(y);return null!=(f=null==(h=null==(p=null==(d=null==b?void 0:b.Representation[0])?void 0:d.SegmentList)?void 0:p[0])?void 0:h.SegmentURL)?f:[]},u.prototype.MT=function(){var c=this.context.sourceContext.sourceIdentifier;return this.context.settings.ENABLE_SEGMENT_INFO_PROVIDER_FROM_STORE?this.KT(c):this.LT(c,this.get
vendor: 5,214 bytes, line 23
23Subtitle().id)},u.prototype.NT=function(){var c=this.MT();if(c&&0!==c.length)return c.reduce(function(c,u){var d=F(u)?u.startTime:u._playbackTime,p=F(u)?u.discontinuitySequenceNumber:u._discontinuitySequenceNumber;return(0,I.isNumber)(d)&&(0,I.isNumber)(p)&&void 0===c[p]&&(c[p]=d),c},{})},u.prototype.OT=function(){var c,u=M.ModuleManager.get(R.ModuleName.HLS,!1),d=null==(c=this.oS)?void 0:c.getState();if(!u||!d)return!1;var p=u.selectors,h=p.getHlsState,f=p.getMergedDiscontinuityTimings,m=h(d);if(!m)return!1;var g=this.NT();if(!g)return!1;var v=f(m),y=Object.keys(g).find(function(c){return!v[c]||Math.abs(v[c].startTime-g[c])>1}),b=Object.keys(v).find(function(c){return null==g[c]});return null==y&&null==b},u.prototype.PT=function(c){this.TT(c),this.wS(c),this.xS(c),this.VT(c),this.isActive()&&this.timeline.show()},u.prototype.QT=function(c){var u;if(this.rS){var d=this.rS.selectors,p=d.getHlsState,h=d.getPresentationTimeOffset,f=null==(u=this.oS)?void 0:u.getState(),m=f?p(f):void 0;if(m)return h(m,String(c))}},u.prototype.ST=function(c){var u,d=c.getPlaybackTimeRange();if(d){var p=M.ModuleManager.get(R.ModuleName.EngineBitmovin),h=p.actions.removeStreamTimeRange,f=p.mseModuleTypes.streamTimeRangeType;null==(u=this.oS)||u.dispatch(h(this.jS,d,f.Loading))}},u.prototype.TT=function(c){var u,d=c.getPlaybackTimeRange();if(!c.isInit()&&d){var p=M.ModuleManager.get(R.ModuleName.EngineBitmovin).actions.addLoadedRange,h=f(f({},d),{bufferBlockId:-1});null==(u=this.oS)||u.dispatch(p(this.jS,h))}},u.prototype.UT=function(c){var u,d,p=-this.kS.getMPDHandler().getTimestampOffset();if(this.lS){var h=c.getSegmentInfo().discontinuitySequenceNumber,f=this.QT(h);void 0!==f?p=-f:this.context.logger.warn("FragmentedSubtitleHandler: Failed to get PTO for disco sequence ".concat(h," from store, falling back to MPDHandler value of ").concat(-p),c.getSegmentInfo())}return p+(null!=(d=null==(u=this.mS())?void 0:u.getTimestampMappingOffset(c))?d:0)},u.prototype.VT=function(c){var d=c.getMetadata().subtitles;if(Array.isArray(d)&&0!==d.length){var p=N(c),h=this.UT(c),f=p||"stpp"===T.CodecStringHelper.extractCodec(c.getCodec())||"application/mp4"===c.getMimeType()&&"wvtt"===c.getCodec()&&!L(c)?this.WT(d,h):d,m=p?this.applyVttOffset(f):f,g=u.ensureCueInSegmentRange(m,c.getPlaybackTime(),c.getDuration(),h,this.isTsContainer());this.fireOnCueParsedEvents(g,this.periodId),this.timeline.addCues(g)}},u.prototype.WT=function(c,u){var d=this;return c.flatMap(function(c){return d.XT(c.text,u)})},u.ensureCueInSegmentRange=function(c,u,d,p,h){if(void 0===h&&(h=!1),!u&&0!==u||u<0||!d)return c;if(c.length>0){var m=d+p;if(c.every(function(c){return c.end<=m}))return c.map(function(c){return h&&null!=c.offset?f(f({},c),{start:c.start+u-p-c.offset,end:c.end+u-p-c.offset}):f(f({},c),{start:c.start+u-p,end:c.end+u-p})})}return c},u.prototype.XT=function(c,u){var d=C.SubtitleParserFactory.createInstance(this.context,c);return u?d.parse(c,u):d.parse(c)},u.prototype.activate=function(){var u=this;return c.prototype.activate.call(this),this.YT().then(function(){if(u.isActive()){var c,d,p,h=(c=u.context.renderer,d=u.context.store,p=(0,b.getPlayerState)(d.getState()),(0,b.getIsSeekingOrTimeshifting)(p)?p.targetPlaybackTime:c.getCurrentTime(!0));u.kS.activateSubtitleSegmentController(h),u.kS.hasNext(h)&&u.kS.getNext(h),u.eventHandler.on(v.PlayerEvent.TimeChanged,u.ZT)}})},u.prototype.YT=function(){var c=this.kS.getCurrentAdaptationSet().Representation[0],u=c._internalId,d=c._mimeType,p=M.ModuleManager.get(R.ModuleName.EngineBitmovin).actions,h=p.setRepresentationIdAction,f=p.setMediaTypeAction;return this.oS.dispatch(h(u)),this.oS.dispatch(f(u,P.MimeTypeHelper.getMediaType(d))),this.pS.waitForRepUpdate(u)},u.prototype.deactivate=function(){this.timeline.removeCues();var u,d=M.ModuleManager.get(R.ModuleName.EngineBitmovin).actions,p=d.resetStreamTimeline,h=d.resetLoadedRanges;this.eventHandler.off(v.PlayerEvent.TimeChanged,this.ZT),this.oS.dispatch(p(this.jS)),this.oS.dispatch(h(this.jS));var f=null==(u=this.kS.getCurrentAdaptationSet())?void 0:u._internalId;return f&&this.oS.dispatch(M.ModuleManager.get(R.ModuleName.EngineBitmovin).actions.removeActiveTrackAction(f)),c.prototype.deactivate.call(this)},u.prototype.getSubtitleType=function(){return D.SubtitleType.FRAGMENTED},u.prototype.clearBuffersUntil=function(u){c.prototype.clearBuffersUntil.call(this,u);var d=M.ModuleManager.get(R.ModuleName.EngineBitmovin).actions.removeLoadedRange;this.oS.dispatch(d(this.jS,{start:0,end:u,bufferBlockId:-1}))},u.prototype.aT=function(c){var u,d=null==(u=this.oS)?void 0:u.getState(),p=(0,S.getBufferState)(d),h=p?(0,S.getLoadedRangesForMimeType)(p,this.jS):[];return(0,m.isInTimeRanges)(h,c)},u.prototype.onSeek=function(c,u){this.isActive()&&(this.aT(u)||this.kS.cancelLoading())},u.prototype.onSeeked=function(c,u){if(this.isActive()&&!this.aT(u)){this.timeline.removeCues();var d=M.ModuleManager.get(R.ModuleName.EngineBitmovin).actions.resetLoadedRanges;this.oS.dispatch(d(this.jS)),this.kS.seekTo(u),this.kS.hasNext(u)&&this.kS.getNext(u)}},u.prototype.dispose=function(){c.prototype.dispose.call(this),this.uS(),this.kS.dispose()},u}(O.AbstractSubtitleHandler)},69363:function(c,u){var d,p;
23Object.defineProperty(u,"__esModule",{value:!0}),u.SubtitleType=void 0,(p=d||(u.SubtitleType=d={}))[p.EXTERNAL_FILE=0]="EXTERNAL_FILE",p[p.FRAGMENTED=1]="FRAGMENTED",p[p.IN_STREAM=2]="IN_STREAM"},71340:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.hashCode=function(c){var u=0;if(0===c.length)return u;for(var d=0;d<c.length;d++)u=(u<<5)-u+c.charCodeAt(d)|0;return u}},85224:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.createHtmlElement=function(c){var u;if(function(){if(void 0===f){var c=(0,h.getCapabilities)().isReactNative;f=!(window&&window.document&&"function"==typeof window.document.createElement)||c}return f}()){var d=(null!=p||(p=new DOMParser),p).parseFromString("<".concat(c,"></").concat(c,">"),"text/html");return(null==(u=d.body)?void 0:u.firstChild)||d.firstChild}return document.createElement(c)};var p,h=d(21513),f=void 0}},function(c){return c(c.s=52112)}])}(bitmovinplayerSubtitles);var bitmovinplayerSubtitlesExports=bitmovinplayerSubtitles.exports;let SubtitlesModule=getDefaultExportFromCjs$1(bitmovinplayerSubtitlesExports);var bitmovinplayerSubtitlesVtt={exports:{}};!function(c){var u;self,c.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[831],{48519:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.WebVttSubtitlesModuleDefinition=void 0;var p=d(62756),h=d(69041),f=d(1757);u.WebVttSubtitlesModuleDefinition={name:p.ModuleName.SubtitlesWebVTT,module:function(){return{WebVttParser:f.WebVttParser,extractVttProperties:h.extractVttProperties}},dependencies:[p.ModuleName.Subtitles]},u.default=u.WebVttSubtitlesModuleDefinition},1757:function(c,u,d){var p,h,f,m=this&&this.__assign||function(){return(m=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},g=this&&this.__runInitializers||function(c,u,d){for(var p=arguments.length>2,h=0;h<u.length;h++)d=p?u[h].call(c,d):u[h].call(c);return p?d:void 0},v=this&&this.__esDecorate||function(c,u,d,p,h,f){function m(c){if(void 0!==c&&"function"!=typeof c)throw TypeError("Function expected");return c}for(var g,v=p.kind,y="getter"===v?"get":"setter"===v?"set":"value",b=!u&&c?p.static?c:c.prototype:null,S=u||(b?Object.getOwnPropertyDescriptor(b,p.name):{}),_=!1,E=d.length-1;E>=0;E--){var T={};for(var w in p)T[w]="access"===w?{}:p[w];for(var w in p.access)T.access[w]=p.access[w];T.addInitializer=function(c){if(_)throw TypeError("Cannot add initializers after decoration has completed");f.push(m(c||null))};var P=(0,d[E])("accessor"===v?{get:S.get,set:S.set}:S[y],T);if("accessor"===v){if(void 0===P)continue;if(null===P||"object"!=typeof P)throw TypeError("Object expected");(g=m(P.get))&&(S.get=g),(g=m(P.set))&&(S.set=g),(g=m(P.init))&&h.unshift(g)}else(g=m(P))&&("field"===v?h.unshift(g):S[y]=g)}b&&Object.defineProperty(b,p.name,S),_=!0};Object.defineProperty(u,"__esModule",{value:!0}),u.WebVttParser=void 0;var y=d(69957),b=d(730),S=/(<\d+:\d{2}:\d{2}[.,]\d{3}>)/g,_=(h=[],p=function(){function c(){g(this,h)}return c.prototype.parse=function(c,u){return void 0===u&&(u=0),(c=c.replace(/\r\n/gm,`
24`)).startsWith("[EMBEDDEDWEBVTT]")?this.Kt(c):this.Lt(c,u)},c.prototype.Kt=function(c){var u,d,p=c.split(`
25`),h=p[1],f=p[2],m=p[3],g=p[4],v=p.slice(5).join(`
26`),y=E();y.start=Number(h),y.end=Number(f),y.i=Number(m);var S=b.parseContents(v,0,b.getPlaceholderVttStyleProperties());return y.text=null!=(d=null!=(u=null==S?void 0:S.textContent)?u:null==S?void 0:S.innerText)?d:"",y.html=b.stringifyCueHtml(S),g&&(y.vtt=b.parseOptions(g,[])),y.vtt.id=m,[y]},c.prototype.Lt=function(c,u){var d=c.split(/\n{2,}
26|^[WEBVTT\n+]?X-TIMESTAMP-MAP=.*\n+|^WEBVTT\n+/m).filter(function(c){return null!=c&&""!==c}).map(function(c){return c.split(`
27`)}),p=this.Mt(c),h=this.Nt(d);return this.Ut(d,h,{vtt:p,base:u})},c.prototype.Mt=function(c){var u=/X-TIMESTAMP-MAP=(.*)\n/.exec(c);if((null==u?void 0:u[1])==null)return 0;var d=u[0],p=/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m.exec(d),h=/MPEGTS:(\d+)/m.exec(d),f=0;if(null!=p&&p[1]){var m=b.parseTime(p[1]);null!=m&&(f=m)}var g=0;return null!=h&&(g=Number(h[1])),g/9e4-f},c.prototype.Nt=function(c){for(var u=[],d=[],p=0;p<c.length;p++){var h=c[p],f=h[0];/^STYLE/.test(f.trim())&&d.push.apply(d,b.parseStyles(h)),/^region:?/i.test(f.trim())&&u.push.apply(u,b.parseRegions(h))}return{regions:u,styles:d}},c.prototype.Ot=function(c){var u=/^NOTE/.test(c),d=/^STYLE/.test(c),p=/^region:?/i.test(c);return!u&&!d&&!p},c.prototype.Pt=function(c){return null!=c&&""!==c&&!!c.includes("--\x3e")},c.prototype.Qt=function(c){var u={},d=[];return c.forEach(function(c){null==c.identifier&&(u=m(m({},u),c.style));var p=d.findIndex(function(u){return u.identifier===c.identifier});-1!==p?d[p]={identifier:c.identifier,style:m(m({},d[p].style),c.style)}:d.push(c)}),b.getPlaceholderVttStyleProperties().forEach(function(c){d.find(function(u){return u.identifier===c.identifier})||d.push(c)}),{globalStyle:u,contentStyles:d}},c.prototype.Rt=function(c,u){var d=b.stringifyCssProperties(u);d&&(c.html.setAttribute("style",d),c.subCues.forEach(function(c){c.html.setAttribute("style",d)}))},c.prototype.St=function(c,u,d,p){var h=(v=(g=c[u]).indexOf("--\x3e"))<0?{start:null,end:null}:{start:b.parseTime(g.substring(0,v).trim()),end:b.parseTime(g.substring(v+3).trim())},f=h.start,m=h.end;if(null!==f&&null!==m){for(var g,v,y,_,E=(y=u+1,c.slice(y).join(`
28`).trim()),w=E.split(S),P="",A=E.replace(S,""),I=f,M=[],R=0;R<w.length;R+=2){var k=w[R],x=w[R+1],C=(x?b.parseTime(x):m)??m;if(I!==C){var O,D,L,N=(O=k,D=P,L=A=A.substring(k.length),(D?T(D,"cue-past"):"")+O+(L?T(L,"cue-future"):""));P+=k;var U=b.parseContents(N,p,d);null==_?_=U:M.push({updateTime:I,html:U}),I=C}}if(null!=_)return{start:f,end:m,html:_,subCues:M}}},c.prototype.Tt=function(c,u,d){var p=m({},u);if(d)for(var h="#"+d,f=0;f<c.length;f++){var g=c[f];g.identifier===h&&Object.assign(p,g.style)}return p},c.prototype.Ut=function(c,u,d){for(var p=[],h=0,f=u.regions,g=u.styles,v=this.Qt(g),y=v.globalStyle,S=v.contentStyles,_=0;_<c.length;_++){var T=c[_];if(this.Ot(T[0])){var w=void 0,P=0;T[0].includes("--\x3e")||(w=T[0].trim(),P=1);var A=this.Vt(w,h);if(h=A,this.Pt(T[P])){var I=b.parseOptions(T[P],f);I.id=w;var M=this.St(T,P,S,d.base);if(void 0!==M){var R=this.Tt(S,y,w);this.Rt(M,R);var k=function(c,u,d,p){var h,f,g=E();return g.i=u,g.start=c.start+d.base,g.end=c.end+d.base,g.text=(null==(h=c.html)?void 0:h.textContent)||(null==(f=c.html)?void 0:f.innerText)||"",g.html=b.stringifyCueHtml(c.html),g.vtt=m({},p),0!==d.vtt&&(g.offset=d.vtt),g.updates=c.subCues.map(function(c){return{updateTime:c.updateTime+d.base,html:b.stringifyCueHtml(c.html)}}),g}(M,A,d,I);p.push(k)}}}}return p},c.prototype.Vt=function(c,u){var d=Number(c);return null==c||isNaN(d)?u+1:d},c}(),f="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,v(p,null,[(0,y.trackPerformance)("WebVttParser.parse")],{kind:"method",name:"parse",static:!1,private:!1,access:{has:function(c){return"parse"in c},get:function(c){return c.parse}},metadata:f},null,h),f&&Object.defineProperty(p,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:f}),p);function E(){return{i:null,start:null,end:null,text:null,html:null,vtt:b.getDefaultVttProperties(),offset:null,updates:[]}}function T(c,u){return"<c.".concat(u,">").concat(c,"</c>")}u.WebVttParser=_,u.default=_},39157:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.parseContents=function(c,u,d){var f=p.ModuleManager.get(h.ModuleName.Subtitles).createHtmlElement("span");return function c(u){var d=function(c){if(!c)return null;var u=/^([^<]*)(<[^>]+>?)?/.exec(c);if(!u)return null;var d=u[1],p=u[2];return d||p}(u.input);
28return null==d?u.root:(u.input=u.input.substring(d.length),function(u,d){if("<"!==u[0]){var p,h,f,E,T,w,P=d.current.ownerDocument.createTextNode(function(c){for(var u=0;u<g.length;u++){var d=g[u],p=d[0],h=d[1];c=c.replace(p,h)}return c}(u));return d.current.appendChild(P),c(d)}if("/"===u[1])return(p=d.tagStack).length>0&&p[p.length-1]===u.substring(2).replace(">","")&&(d.tagStack.pop(),d.current=d.current.parentNode),c(d);var A=(0,m.parseTime)(u.substring(1,u.length-1));if(null!=A){var I=d.current.ownerDocument.createComment("time: ".concat(A+d.offset));return d.current.appendChild(I),c(d)}var M=/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/.exec(u);if(!M)return c(d);var R=M[0],k=M[1],x=M[2],C=M[3],O=function(c,u,d){var p=v[c];if(!p)return null;var h=d.createElement(p),f=y[c];return f&&u&&(h[f]=u.trim()),h}(k,C,d.current.ownerDocument);return O&&(h=d.current,!b[O.localName]||b[O.localName]===h.localName)&&(E=(f=function(c,u){var d,p,h,f="",g="",v={};if(u.type&&"v"!==u.type&&(v=null!=(d=_(c,u.type))?d:v),u.contents){v={};for(var y=u.contents.substring(1).split("."),b=0;b<y.length;b++){var E=y[b],T=_(c,S[E]||".".concat(E));T&&Object.assign(v,T)}f=y.join(" ").trim()}return"v"===u.type&&u.annotation&&(g=u.annotation.substring(1),v=null!=(p=_(c,"".concat(u.type,'[voice="').concat(g,'"]')))?p:v),{className:f,title:g,styleString:null!=(h=(0,m.stringifyCssProperties)(v))?h:""}}(d.styles,{type:k,contents:x,annotation:C})).className,T=f.title,w=f.styleString,T&&(O.title=T),E&&(O.className=E),w&&O.setAttribute("style",w),d.tagStack.push(R[1]),d.current.appendChild(O),d.current=O),c(d)}(d,u))}({input:c,root:f,current:f,tagStack:[],offset:u,styles:d})};var p=d(88052),h=d(62756),f=d(99735),m=d(69041),g=[[/&amp;/g,"&"],[/&lt;/g,"<"],[/&gt;/g,">"],[/&lrm;/g,"‎"],[/&rlm;/g,"‏"],[/&nbsp;/g," "]],v={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},y={v:"title",lang:"lang"},b={rt:"ruby"},S={"cue-future":":future","cue-past":":past"};function _(c,u){for(var d,p=0;p<c.length;p++)if((d=c[p]).identifier===u)return d.style;for(var h=0,m=f.webVttDefaultClassStyles;h<m.length;h++)if((d=m[h]).identifier===u)return d.style}},99735:function(c,u){var d=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.webVttDefaultClassStyles=void 0;var p=["white","lime","cyan","red","yellow","magenta","blue","black"];u.webVttDefaultClassStyles=d(d([],p.map(function(c){return{identifier:".".concat(c),style:{color:c}}}),!0),p.map(function(c){return{identifier:".bg_".concat(c),style:{background:c}}}),!0)},76171:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.parseOptions=function(c,u){for(var d,p=c.split(/\s/),m=(0,h.getDefaultVttProperties)(),g=0;g<p.length;g++){var v=p[g],y=v.indexOf(":");-1!==y&&f(v.substring(0,y),v.substring(y+1),u,m)}return d=(0,h.getDefaultVttProperties)(),null!=m.region&&(m.vertical!==d.vertical||m.size!==d.size||m.line!==d.line)&&delete m.region,m},u.setOptionProperty=f;var p=d(23068),h=d(69041);function f(c,u,d,f){var g,v,y,b,S,_,E,T,w,P,A;switch(c){case"region":null!=(g=d.find(function(c){return c.id===u}))&&(f.region=g);break;case"vertical":null!=(v=(0,h.ensureArray)(/^(lr|rl)$/.exec(u))[1])&&(f.vertical=v);break;case"align":null!=(y=(0,h.ensureArray)(/^(start|middle|center|end|left|right)$/.exec(u))[1])&&(f.align=y),f.positionAlign=m(void 0,f);break;case"size":null!=(b=(0,h.ensureArray)(/^([\d.]+)%$/.exec(u))[1])&&(f.size=Number(b));break;case"position":_=(S=(0,h.ensureArray)(/^([\d.]+|auto)%?(?:,(line-left|line-right|center))?$/.exec(u)))[1],E=S[2],"auto"===_?f.position="auto":void 0!==_&&(f.position=Number(_)),f.positionAlign=m(E,f);break;case"line":w=(T=(0,h.ensureArray)(/^(-?[\d.]+|auto)(%)?(?:,(start|end|center|auto))?$/.exec(u)))[1],P=T[2],A=T[3],"auto"===w?f.line="auto":"%"===P?f.line="".concat(w,"%"):null!=u&&(f.line=Number(w)),null!=A&&(f.lineAlign=A),f.snapToLines=(0,p.isNumber)(f.line)}}function m(c,u){if(null!=c)return c;switch(u.align){case"start":case"left":return"line-left";case"end":case"right":return"line-right";default:return"center"}}}
28,69041:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.getDefaultVttProperties=g,u.extractVttProperties=function(c){var u=g(),d=v();return Object.keys(u).forEach(function(h){var f,g,v,y=(f=c[h],g=u[h],v=String(f||g),("position"===h&&(0,p.isNumber)(f)||"line"===h&&!1===c.snapToLines)&&(v+="%"),v);(0,m.setOptionProperty)(h,y,[d],u)}),u},u.getDefaultVttRegionProperties=v,u.parseTime=function(c){var u=/(?:(\d{1,}):)?(\d{2}):(\d{2})[.,](\d{3})/g.exec(c);if(null==u)return null;var d=u[1],p=u[2],h=u[3];return Number(u[4])/1e3+Number(h)+60*Number(p)+3600*(Number(d)||0)},u.ensureArray=function(c){return Array.isArray(c)?c:[]},u.stringifyCssProperties=function(c){return c?Object.entries(c).map(function(c){return"".concat(c[0],":").concat(c[1],";")}).join(""):null},u.stringifyCueHtml=function(c){return(0,h.ModuleManager.get(f.ModuleName.Subtitles).HtmlTransformer.prepareHtml)((null==c?void 0:c.outerHTML)||"")};var p=d(23068),h=d(88052),f=d(62756),m=d(76171);function g(){return{vertical:"",align:"center",size:100,line:"auto",lineAlign:"start",position:"auto",positionAlign:"center",snapToLines:!1}}function v(){return{id:null,width:100,lines:3,regionAnchorX:0,regionAnchorY:100,viewportAnchorX:0,viewportAnchorY:100,scroll:""}}},79347:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.parseRegions=function(c){for(var u=[],d=0;d<c.length;d++){var p=c[d];if(p=p.trim(),/^REGION$/i.test(p)){u.push(h(c.slice(1),":"));break}/^Region:/i.test(p)&&u.push(h(p.split(/[ \t]+/).slice(1),"="))}return u};var p=d(69041);function h(c,u){var d=(0,p.getDefaultVttRegionProperties)();return c.forEach(function(c){!function(c,u){var d,h,f,m,g,v,y,b,S,_=c[0],E=c[1];switch(_){case"id":null!=E&&(u.id=E);break;case"width":null!=(d=(0,p.ensureArray)(/^(\d{1,2}|100)%$/.exec(E))[1])&&(u.width=Number(d));break;case"lines":null!=(h=(0,p.ensureArray)(/^(\d+)$/.exec(E))[1])&&(u.lines=Number(h));break;case"regionanchor":m=(f=(0,p.ensureArray)(/^(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(E)))[1],g=f[2],null!=m&&(u.regionAnchorX=Number(m)),null!=g&&(u.regionAnchorY=Number(g));break;case"viewportanchor":y=(v=(0,p.ensureArray)(/^(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(E)))[1],b=v[2],null!=y&&(u.viewportAnchorX=Number(y)),null!=b&&(u.viewportAnchorY=Number(b));break;case"scroll":null!=(S=(0,p.ensureArray)(/^(up)$/.exec(E))[1])&&(u.scroll=S)}}(c.split(u),d)}),d}},22649:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.parseStyles=function(c){var u=[],d=/::cue(\((.+)\))?(?= |{)/,p=/([a-zA-Z0-9-]+):(.+?(?=;|}|$))/g,h=d.exec(c[1]);if(!h)return u;for(var f=1;f<c.length;f++){for(var m=d.exec(c[f]),g=null!==m,v=(h=g?m:h)[2],y={},b=p.exec(c[f]);null!==b;){var S=b[1],_=b[2];y[S]=_.trim(),b=p.exec(c[f])}(g||Object.keys(y).length>0)&&u.push({identifier:v,style:y})}return u},u.getPlaceholderVttStyleProperties=function(){return[{identifier:":future",style:{visibility:"hidden"}}]}},730:function(c,u,d){var p=this&&this.__createBinding||(Object.create?function(c,u,d,p){void 0===p&&(p=d);var h=Object.getOwnPropertyDescriptor(u,d);h&&!("get"in h?!u.__esModule:h.writable||h.configurable)||(h={enumerable:!0,get:function(){return u[d]}}),Object.defineProperty(c,p,h)}:function(c,u,d,p){void 0===p&&(p=d),c[p]=u[d]}),h=this&&this.__exportStar||function(c,u){for(var d in c)"default"===d||Object.prototype.hasOwnProperty.call(u,d)||p(u,c,d)};Object.defineProperty(u,"__esModule",{value:!0}),h(d(79347),u),h(d(39157),u),h(d(76171),u),h(d(69041),u),h(d(22649),u)}},function(c){return c(c.s=48519)}])}(bitmovinplayerSubtitlesVtt);var bitmovinplayerSubtitlesVttExports=bitmovinplayerSubtitlesVtt.exports;let SubtitlesVTT=getDefaultExportFromCjs$1(bitmovinplayerSubtitlesVttExports);var bitmovinplayerSubtitlesNative={exports:{}};!function(c){var u;self,c.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[826],{91444:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.NativeSubtitlesModuleDefinition=void 0;var p=d(62756),h=d(43931);u.NativeSubtitlesModuleDefinition={name:p.ModuleName.SubtitlesNative,module:function(){return{TextTrackController:h.TextTrackController}},dependencies:[p.ModuleName.Subtitles]},u.default=u.NativeSubtitlesModuleDefinition},43931:function(c,u,d){var p,h,f,m=this&&this.__assign||function(){return(m=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},g=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};
vendor: 4,046 bytes, line 28
28Object.defineProperty(u,"__esModule",{value:!0}),u.TextTrackController=void 0;var v,y,b,S=d(25926),_=d(4224),E=d(3714),T=d(4129),w=d(29669),P=d(74853),A=d(15487),I=d(88844),M=d(58313),R=d(88052),k=d(62756),x=d(52364);(p=v||(v={})).Showing="showing",p.Hidden="hidden",p.Disabled="disabled",(h=y||(y={})).Subtitle="subtitles",h.ForcedSubtitle="forced",h.Caption="captions",h.Metadata="metadata",(f=b||(b={})).ID3="org.id3",f.DATERANGE="com.apple.quicktime.HLS",f.EMSG="https://aomedia.org/emsg/ID3";var C=RegExp("^(?:[a-z]+:)?//","i"),O=function(c){var u={id:c.id,lang:c.lang,label:c.label,kind:c.kind,isFragmented:c.isFragmented,isSideloaded:c.isSideloaded,enabled:c.textTrack&&c.textTrack.mode!==v.Disabled,forced:c.kind===y.ForcedSubtitle};return c.url&&(u.url=c.url),c.metadata&&(u.metadata=c.metadata),u};function D(c,u){for(var d=0;d<c.length;d++){var p=c[d];if(p===u.textTrack)return p}}u.TextTrackController=function(){function c(c,u,d,p){var h=this;this.Yu=function(){h.Wu=!0,h.Zu()},this.du=function(c,u,d){var p=c.body;p&&h.cu(p.trim(),d)},this.eu=function(c,u){h.wt.logger.debug("Error loading subtitle file: "+JSON.stringify(u)),h.removeSubtitle(h.bu(c.url)),h.xt.dispatchEvent(E.PlayerEvent.Warning,new S.PlayerWarning(_.WarningCode.NETWORK_COULD_NOT_LOAD_SUBTITLE)),h.wt.logger.debug("Could not load subtitles/captions, got HTTP status code "+c.status)},this.gu=function(c){var u=c.currentTarget.activeCues,d={frames:[]};for(var p in u)if(u[p].type===b.ID3&&void 0!==u[p].value){var f=u[p].value;P.ArrayHelper.isArrayBuffer(f.data)&&((f=m({},f)).data=P.ArrayHelper.getArray(new Uint8Array(f.data))),d[f.key]=f.data,d.frames.push(f),h.Vu&&h.hu(u[p],c.currentTarget)}d.frames.length&&h.xt.dispatchEvent(E.PlayerEvent.Metadata,{metadataType:E.MetadataType.ID3,metadata:d})},this.iu=function(c){var u=c.target;if(u.activeCues&&u.activeCues.length>0){var d=x.TextTrackCueHelper.cueListToArray(u.activeCues),p=h.xu(u);x.TextTrackCueHelper.sort(d).forEach(function(c){return h.ku(p,c)})}},this.qu=function(c){var u=window.setTimeout(function(){return h.ru(c)},0);h.Su.push(u)},this.wu=function(){return null},this.Au=function(){var c;h.zt?h.At&&h.disableSubtitle(h.At):(h.At=null==(c=h.zu())?void 0:c.id,h.At&&h.enableSubtitle(h.At,!0))},this.Bu=function(){h.disableSubtitle(h.At),h.Au()},this.Du=function(){var c=h.yu(),u=c[0],d=c[1];h.Cu(d)?(h.disableSubtitle(d),h.Au()):(d||(h.zt=void 0),h.Au(),h.Xu&&h.Eu(),d&&u&&u.mode!==v.Hidden&&!h.Tu.includes(u)&&h.enableSubtitle(d))},this.wt=c,this.xt=c.eventHandler,this.yt=u,this.type=p,this.Et=[],this.Ft={},this.Ct=1,this.Dt=0,this.Ht=!1,this.Su=[],this.Tu=[],this.Uu=[],this.Bt=null,this.Vu=(0,A.isSafariPlatform18orNewer)(),this.Wu=!1,d.hasOwnProperty("style")&&d.style.hasOwnProperty("nativeSubtitles")?this.Gt=!!d.style.nativeSubtitles:this.Gt=!1,u.audioTracks&&u.audioTracks.addEventListener("change",this.Bu),u.textTracks&&"function"==typeof u.textTracks.addEventListener&&(u.textTracks.addEventListener("addtrack",this.qu),u.textTracks.addEventListener("change",this.Du)),this.xt.one(E.PlayerEvent.SourceLoaded,this.Yu,!0)}return Object.defineProperty(c.prototype,"Xu",{get:function(){return this.Ht||this.Gt},enumerable:!1,configurable:!0}),c.prototype.getAvailableSubtitles=function(){return Object.values(this.Ft||{}).filter(function(c){return c.kind!==y.ForcedSubtitle}).map(O)},c.prototype.Zu=function(){var c=this;this.getAvailableSubtitles().filter(function(c){return!c.isSideloaded}).forEach(function(u){return c.xt.dispatchEvent(E.PlayerEvent.SubtitleAdded,{subtitle:u})})},c.prototype.enableSubtitle=function(c,u){void 0===u&&(u=!1);var d=this.Ft[c];return d?(u||(this.zt=c),d.textTrack&&(this.Gt||this.Ht?d.textTrack.mode=v.Showing:d.textTrack.mode=v.Hidden),d.enabled?Promise.resolve(!1):(d.enabled=!0,d.textTrack?d.loadPromise.then(function(){return!0},function(){return!1}):Promise.resolve(!0))):Promise.resolve(!1)},c.prototype.disableSubtitle=function(c){var u=this,d=this.Ft[c];return!!d&&(d.textTrack&&(d.textTrack.mode=v.Disabled),d.enabled=!1,g([],this.Uu,!0).forEac
28h(function(d){return d.subtitleId===c&&u.ou(c,d)}),!0)},c.prototype.au=function(c){var u,d;return window.VTTCue?new window.VTTCue(c.start,c.end,null!=(u=c.html)?u:c.text):window.TextTrackCue?new TextTrackCue(c.start,c.end,null!=(d=c.html)?d:c.text):void 0},c.prototype.bu=function(c){if(c&&this.Ft){for(var u in this.Ft)if(this.Ft.hasOwnProperty(u)&&this.Ft[u].url===c)return u}},c.prototype.cu=function(c,u){var d=this.bu(u);if(d&&c){for(var p=R.ModuleManager.get(k.ModuleName.Subtitles).SubtitleParserFactory.createInstance(this.wt,c).parse(c),h=0;h<p.length;h++)this.xt.dispatchEvent(E.PlayerEvent.CueParsed,m(m({subtitleId:d},p[h]),{periodId:null})),this.Ft[d].textTrack.addCue(this.au(p[h]));this.xt.dispatchEvent(E.PlayerEvent.SubtitleAdded,{subtitle:O(this.Ft[d])})}},c.prototype.fu=function(c){var u=this;if(c&&c.trim())return this.wt.logger.debug("loading "+c),this.Bt=new T.DefaultContentLoader(this.wt,{maxRetries:this.wt.settings.MAX_RETRIES,retryDelay:this.wt.settings.RETRY_DELAY,onSuccess:this.du,onFailure:this.eu,requestType:w.HttpRequestType.MEDIA_SUBTITLES}),this.Bt.load(c).catch(function(c){u.wt.logger.debug("Error while loading subtitles ",c)})},c.prototype.hu=function(c,u){try{u.removeCue(c)}catch(c){"NotFoundError"!==c.name&&this.wt.logger.debug("Error removing cue from native TextTrack: ".concat(c.name,": ").concat(c.message))}},c.prototype.ju=function(c,u){var d=R.ModuleManager.get(k.ModuleName.Subtitles).HtmlTransformer,p=d.htmlToText,h=d.stripHtmlTags,f=(R.ModuleManager.get(k.ModuleName.SubtitlesWebVTT,!1)||{}).extractVttProperties,m={subtitleId:c,text:p(u.text),start:u.startTime,end:u.endTime},g=[m];if("subtitles"===u.track.kind)v=u.text,m.html=(y=(0,R.ModuleManager.get(k.ModuleName.Subtitles).HtmlTransformer.prepareHtml)(v)).startsWith("<span>")?y:"<span>".concat(y,"</span>"),window.VTTCue&&(u instanceof VTTCue&&f?m.vtt=f(u):u instanceof VTTCue&&this.wt.logger.debug("Could not interpret VTT properties from native VTTCue Event as ".concat(k.ModuleName.SubtitlesWebVTT," is missing")));
vendor: 5,227 bytes, line 28
28else if("captions"===u.track.kind){b=u.line-10,S=u.position-10,b-=b%5.333333333333333,S-=S%2.5,m.position={row:b=Math.round(b/5.333333333333333),column:S=Math.round(S/2.5)};var v,y,b,S,_=h(m.text);m.position.column+_.length>x.CEA_608_MAX_LINE_LENGTH-1&&(g=x.TextTrackCueHelper.splitCea608Cue(m))}return g},c.prototype.ku=function(c,u){var d=this;if(u){var p=Object.values(this.Ft).find(function(c){return c.textTrack===u.track});if(function(c,u,d){if(d){var p=R.ModuleManager.get(k.ModuleName.Subtitles).HtmlTransformer,h=p.stripAwayHtmlBreakPoints,f=p.replaceHtmlBreakPointsWithNewLine;c&&d.isSideloaded&&(u.text=f(u.text)),c||d.isSideloaded||(u.text=h(u.text))}}(this.Gt||this.Ht,u,p),!this.Gt&&!this.Ht){var h=this.ju(c,u);h.forEach(function(p){d.mu(p)?d.xt.dispatchEvent(E.PlayerEvent.CueUpdate,p):d.nu(c,u,p)}),this.lu(c,h)}}},c.prototype.lu=function(c,u){var d=this,p=this.Uu.filter(function(d){return!u.find(function(c){return d.start===c.start&&d.text===c.text&&d.subtitleId===c.subtitleId})&&1/0===d.end&&d.subtitleId===c});p.length>0&&p.forEach(function(u){d.ou(c,u)})},c.prototype.mu=function(c){var u=this,d=this.Uu.find(function(d){var p=d.start===c.start,h=d.text===c.text,f=!c.end||1/0===d.end||d.end===u.yt.duration||d.end===c.end;return p&&h&&f});return!!d&&(d.end=c.end,!0)},c.prototype.nu=function(c,u,d){var p=this;this.Uu.push(d),u.onexit=function(){p.ju(c,u).forEach(function(u){return p.ou(c,u)})},this.xt.dispatchEvent(E.PlayerEvent.CueEnter,d)},c.prototype.ou=function(c,u){var d=this.Uu.find(function(c){return c.start===u.start&&c.end===u.end&&c.text===u.text});if(d){this.Uu=this.Uu.filter(function(c){return c!==d});var p={subtitleId:c,text:d.text,start:d.start,end:d.end};d.position&&(p.position=d.position),this.xt.dispatchEvent(E.PlayerEvent.CueExit,p)}},c.prototype.removeSubtitle=function(c){if(this.Ft.hasOwnProperty(c)){this.Ft[c].textTrack.mode!==v.Disabled&&this.disableSubtitle(c),this.Ft[c].textTrack.mode=v.Disabled;var u=this.Ft[c];delete this.Ft[c],this.xt.dispatchEvent(E.PlayerEvent.SubtitleRemoved,{subtitle:O(u)})}},c.prototype.signalSourceChange=function(){this.yt&&this.yt.textTracks&&"function"==typeof this.yt.textTracks.addEventListener&&this.yt.textTracks.removeEventListener("addtrack",this.qu),this.removeAll()},c.prototype.removeAll=function(){for(var c in this.wt.logger.debug("removing all subtitle tracks"),this.Su.forEach(function(c){return(0,I.clearTimeoutIfDefined)(c)}),this.Su=[],this.Ft)this.Ft.hasOwnProperty(c)&&(this.Ft[c].textTrack.mode=v.Disabled,this.Ft[c].textTrack.removeEventListener("cuechange",this.iu));this.Ft={},this.Uu=[],this.Ct=1,this.Dt=0},c.prototype.addSubtitle=function(c){if("function"!=typeof this.yt.addTextTrack)return this.wt.logger.warn("adding subtitles not supported!"),Promise.reject();this.Ft.hasOwnProperty(c.id)&&(this.wt.logger.debug("re-adding subtitle "+c.id),this.removeSubtitle(c.id));var u,d=c.url?M.URLHelper.toFullUrl((u=c.url.trim(),"https:"===location.protocol?u.replace(C,"//"):u)):null,p={id:c.id,url:d,kind:c.kind,lang:c.lang,label:c.label,textTrack:null,isFragmented:!1,isSideloaded:!0,loadPromise:null,metadata:c.metadata};return this.Ft[c.id]=p,this.Ft[c.id].textTrack=this.yt.addTextTrack(c.kind,c.label),this.Ft[c.id].textTrack.mode=v.Disabled,this.Ft[c.id].textTrack.addEventListener("cuechange",this.iu),this.pu(p)},c.prototype.pu=function(c){var u=this;return c.url?c.loadPromise=this.fu(c.url).then(function(){if(!u.getAvailableSubtitles().find(function(u){return u.id===c.id}))throw"subtitle adding failed"}):(this.wt.logger.log("No url was provided for an external subtitle, nothing will be loaded."),c.loadPromise=Promise.resolve(),this.xt.dispatchEvent(E.PlayerEvent.SubtitleAdded,{subtitle:O(c)})),c.loadPromise},c.prototype.ru=function(c){for(var u,d,p=this,h=c.track,f=c.isFragmented&&h.kind===y.Subtitle||!1,m=0,g=Object.keys(this.Ft);m<g.length;m++){var b=g[m],S=this.Ft[b];if(S.textTrack===h&&S.isSideloaded)return void this.wt.logger.insane("track "+h.label+" has already been added externally")}switch(h.kind){case y.Subtitle:u=h.id||"sub".concat(this.Dt),d=h.label||"Subtitles (".concat(this.Dt,")"),this.Dt++;break;case y.ForcedSubtitle:u=h.id||"fsub".concat(this.Dt),d=h.label||"Subtitles (".concat(this.Dt,")) (Forced)"),this.Dt++;break;case y.Caption:u="CC".concat(this.Ct),d=h.label||"Captions (CC ".concat(this.Ct,")"),this.Ct++;break;default:return void this.su(h)}this.wt.logger.debug("adding ".concat(h.kind," text track ").concat(u)),this.Ft[u]={id:u,url:null,kind:h.kind,lang:h.language||"unknown",label:d,textTrack:h,isFragmented:f,isSideloaded:!1,loadPromise:Promise.resolve()},(d=this.uu(this.Ft[u]))&&"string"==typeof d&&(this.Ft[u].label=d),this.Tu.push(h),h.addEventListener("cuechange",this.iu),h.kind!==y.ForcedSubtitle&&(this.Wu?this.xt.dispatchEvent(E.PlayerEvent.SubtitleAdded,{subtitle:O(this.Ft[u])}):this.wt.logger.debug('Delaying SubtitleAdded event until source is loaded track id="'.concat(u,'" label="').concat(this.Ft[u].label,'"'))),h.mode=v.Disabled;var _=window.setTimeout(function(){p.Tu=p.Tu.filter(function(c){return c!==h}),Object.keys(p.Ft).map(function(c){return p.Ft[c]}).filter(function(c){return c.enabled&&!!c.textTrack&&c.textTrack.mode===v.Disabled}
28).forEach(function(c){p.Xu?c.textTrack.mode=v.Showing:c.textTrack.mode=v.Hidden})},0);this.Su.push(_),this.tu()&&this.Au()},c.prototype.su=function(c){this.wt.settings.HLS_PARSE_NATIVE_METADATA&&(this.Et.push(c),c.mode=v.Hidden,c.addEventListener("cuechange",this.gu))},c.prototype.tu=function(){var c=Object.keys(this.Ft).length;return this.yt.textTracks.length===c},c.prototype.uu=function(c){var u={kind:c.kind,id:c.id,label:c.label,lang:c.lang};return this.vu()(u)},c.prototype.vu=function(){var c=this.wt.sourceContext,u=c&&c.source&&c.source.labeling;return u&&u[this.type]&&u[this.type].subtitles?"function"!=typeof u[this.type].subtitles?this.wu:u[this.type].subtitles:this.wu},c.prototype.xu=function(c){var u;return(null==(u=Object.values(this.Ft).find(function(u){return u.textTrack===c}))?void 0:u.id)||null},c.prototype.yu=function(){for(var c=0,u=this.yt.textTracks;c<u.length;c++){var d=u[c];if((d.mode===v.Showing||d.mode===v.Hidden)&&d.kind!==y.Metadata&&d.kind!==y.ForcedSubtitle)return[d,this.xu(d)]}return[void 0,void 0]},c.prototype.enableNative=function(){var c=this;Object.keys(this.Ft).map(function(u){return c.Ft[u]}).filter(function(c){return c.enabled&&!!c.textTrack}).forEach(function(c){return c.textTrack.mode=v.Showing}),this.Ht=!0},c.prototype.disableNative=function(){var c=this;Object.keys(this.Ft).map(function(u){return c.Ft[u]}).filter(function(c){return c.enabled&&!!c.textTrack}).forEach(function(c){return c.textTrack.mode=v.Hidden}),this.Ht=!1},c.prototype.seek=function(){var c=this;Object.keys(this.Ft).map(function(u){return c.Ft[u]}).filter(function(c){return c.enabled&&!!c.textTrack}).forEach(function(c){var u=c.textTrack.mode;c.textTrack.mode=v.Disabled,c.textTrack.mode=u})},c.prototype.zu=function(){var c,u,d,p=this.yt.audioTracks,h=R.ModuleManager.get(k.ModuleName.Subtitles).LanguageComparer.isEqualIsoLanguage;if(this.zt)d=null==(c=this.Ft[this.zt])?void 0:c.lang;else{if(!p)return;var f=P.ArrayHelper.toArray(p).find(function(c){return c.enabled});d=null==f?void 0:f.language}d=null!=(u=d??navigator.language)?u:navigator.userLanguage;var m=Object.values(this.Ft).filter(function(c){return c.kind===y.ForcedSubtitle});return m.find(function(c){return h(c.lang,d)})??m[0]},c.prototype.Cu=function(c){var u=this,d=Object.keys(this.Ft).some(function(d){return d===c&&u.Ft[d].enabled});return c&&!this.Xu&&!d},c.prototype.Eu=function(){var c=this,u=function(c){var u=m({},c);return delete u.loadPromise,delete u.textTrack,m({},u)};this.Fu().forEach(function(d){c.disableSubtitle(d.id),c.xt.dispatchEvent(E.PlayerEvent.SubtitleDisabled,{subtitle:u(d)})}),this.Gu().forEach(function(d){c.xt.dispatchEvent(E.PlayerEvent.SubtitleEnabled,{subtitle:u(d)})})},c.prototype.Fu=function(){var c=this.yt.textTracks;return Object.values(this.Ft).filter(function(c){return c.enabled}).filter(function(u){var d=D(c,u);return d&&d.mode===v.Disabled})},c.prototype.Gu=function(){var c=this.yt.textTracks;return Object.values(this.Ft).filter(function(c){return!c.enabled}).filter(function(u){var d=D(c,u);return d&&d.mode!==v.Disabled})},c.prototype.dispose=function(){var c;this.removeAll(),this.xt.off(E.PlayerEvent.SourceLoaded,this.Yu),this.xt=null,this.Uu=null,this.Ft=null,this.Et=null,null==(c=this.yt.audioTracks)||c.removeEventListener("change",this.Bu),this.yt&&this.yt.textTracks&&"function"==typeof this.yt.textTracks.addEventListener&&(this.yt.textTracks.removeEventListener("addtrack",this.qu),this.yt.textTracks.removeEventListener("change",this.Du)),this.Bt&&this.Bt.dispose(),this.Bt=null},c}()},52364:function(c,u){var d=this&&this.__assign||function(){return(d=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.TextTrackCueHelper=u.CEA_608_MAX_LINE_LENGTH=void 0,u.CEA_608_MAX_LINE_LENGTH=32;var p=function(){function c(){}return c.cueListToArray=function(c){for(var u=[],d=0;d<c.length;d++)u.push(c[d]);return u},c.sortEqualStartTimeByLineFn=function(c,u){if("line"in c&&"line"in u&&c.startTime===u.startTime){if(c.line<u.line)return -1;if(c.line>u.line)return 1}return 0},c.sortByStartTimeFn=function(c,u){return c.startTime<u.startTime?-1:+(c.startTime>u.startTime)},c.sort=function(u){return u.sort(c.sortByStartTimeFn),u.sort(c.sortEqualStartTimeByLineFn),u},c.getTagIndexRanges=function(c){for(var u,d=RegExp("<[^>]*>","g"),p=[];u=d.exec(c);){var h=u[0];p.push({start:u.index,end:u.index+h.length-1})}return p},c.splitCea608Cue=function(d){for(var p=u.CEA_608_MAX_LINE_LENGTH-d.position.column,h=d.text,f=c.getTagIndexRanges(h),m=[],g=0,v=0,y=!1,b=0,S=0;S<h.length;){if(S===h.length-1){m.push(h.substring(g));break}if(f.length>0&&S===f[0].start&&(y=!0),!y&&(v++," "===h[S]&&(b=S),v>=p&&b>g)){S=b+1;var _=h.substring(g,S);_&&m.push(_),g=S,v=1}y&&f.length>0&&S===f[0].end&&(y=!1,f.shift()),S++}var E=c.createCueEvents(m,d);
28return c.adjustCea608CaptionPositioning(E),E},c.createCueEvents=function(c,u){var p=c.length-1;return c.map(function(c){var h=d({},u);return h.text=c,h.position={column:h.position.column,row:h.position.row-p},p--,h})},c.adjustCea608CaptionPositioning=function(c){var u=Math.max.apply(Math,c.map(function(c){return c.position.row})),d=Math.min.apply(Math,c.map(function(c){return c.position.row}));if(u>14){var p=14-u;c.forEach(function(c){return c.position.row+=p})}if(d<0){var h=0-d;c.forEach(function(c){return c.position.row+=h})}},c}();u.TextTrackCueHelper=p}},function(c){return c(c.s=91444)}])}(bitmovinplayerSubtitlesNative);var bitmovinplayerSubtitlesNativeExports=bitmovinplayerSubtitlesNative.exports;let SubtitlesNative=getDefaultExportFromCjs$1(bitmovinplayerSubtitlesNativeExports);var bitmovinplayerContainerTs={exports:{}};!function(c){var u;self,c.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[858],{72387:function(c,u,d){c.exports=function(){return d
vendor: 9,903 bytes, line 28
28(90040)('!function(){var t={48:function(t){!function(){t.exports=function(){"use strict";var t,e,i,n,a,r,s,o,d,p,h,l,c,u,f,m,g,y,_,S,b,v,T,w,k,C,P,A,E,x,U,M,R,I,D,O,L,B,G,W,F=Math.pow(2,32),N=F;(function(){var t;if(C={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dec3:[],dinf:[],dref:[],"ec-3":[],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(t in C)C.hasOwnProperty(t)&&(C[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);P=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)]),x=new Uint8Array(["h".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),A=new Uint8Array([0,0,0,1]),U=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]),M=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]),R={video:U,audio:M},O=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),B=L,G=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),W=L,I=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),t=function(t){var e,i,n=[],a=0;for(e=1;e<arguments.length;e++)n.push(arguments[e]);for(e=n.length;e--;)a+=n[e].byteLength;for(i=new Uint8Array(a+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(t,4),e=0,a=8;e<n.length;e++)i.set(n[e],a),a+=n[e].byteLength;return i},n=function(){return t(C.dinf,t(C.dref,O))},a=function(e){return t(C.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]))},i=function(e){var i=e.fscod||0,n=e.bsid||16,a=e.acmod||0,r=e.lfeon||0;return t(C.dec3,new Uint8Array([0,0,i<<6|n<<1,a<<1|r,0]))},r=function(e){var i,n,a;for(a=0;a<e.length;a++)if("video"===(n=e[a]).type){i={avc:E,hevc:x}[n.codec];break}return t(C.ftyp,P,A,P,i||E)},_=function(e){return t(C.hdlr,R[e])},s=function(e){return t(C.mdat,e)},y=function(e){var i=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&&(i[12]=e.samplerate>>>24&255,i[13]=e.samplerate>>>16&255,i[14]=e.samplerate>>>8&255,i[15]=255&e.samplerate),t(C.mdhd,i)},g=function(e){return t(C.mdia,y(e),_(e.type),d(e))},o=function(e){return t(C.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},d=function(e){return t(C.minf,"video"===e.type?t(C.vmhd,I):t(C.smhd,D),n(),b(e))},p=function(e,i){for(var n=[],a=i.length;a--;)n[a]=T(i[a]);return t.apply(null,[C.moof,o(e)].concat(n))},h=function(e){for(var i=e.length,n=[];i--;)n[i]=f(e[i]);return t.apply(null,[C.moov,c(4294967295)].concat(n).concat(l(e)))},l=function(e){for(var i=e.length,n=[];i--;)n[i]=w(e[i]);return t.apply(null,[C.mvex].concat(n))},c=function(e){var i=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(C.mvhd,i)},S=function(e){var i,n,a=e.samples||[],r=new Uint8Array(4+a.length);for(n=0;n<a.length;n++)i=a[n].flags,r[n+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return t(C.sdtp,r)},b=function(e){return t(C.stbl,v(e),t(C.stts,W),t(C.stsc,B),t(C.stsz,G),t(C.stco,L))},e=function(){return t(C.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))},u=function(e,i){return t(C.pasp,new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,(4278190080&i)>>24,(16711680&i)>>16,(65280&i)>>8,255&i]))},function(){var n,r;v=function(e){return t(C.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?n(e):r(e))},n=function(i){var n,a,r=i.sps||[],s=i.parsedSps||{},o=i.pps||[],d=i.vps||[],p=[],h=[],l=[];for(n=0;n<r.length;n++)p.push((65280&r[n].byteLength)>>>8),p.push(255&r[n].byteLength),p=p.concat(Array.prototype.slice.call(r[n]));for(n=0;n<o.length;n++)h.push((65280&o[n].byteLength)>>>8),h.push(255&o[n].byteLength),h=h.concat(Array.prototype.slice.call(o[n]));for(n=0;n<d.length;n++)l.push(d[n].byteLength>>>8&255),l.push(255&d[n].byteLength),l=l.concat(Array.prototype.slice.call(d[n]));var c=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&s.width)>>8,255&s.width,(65280&s.height)>>8,255&s.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,255,255]);if("avc"===i.codec)return a=[C.avc1,c,t(C.avcC,new Uint8Array([1,s.profileIdc,s.profileCompatibility,s.levelIdc,255].concat([r.length],p,[o.length],h))),e()],i.sarRatio&&a.push(u(i.sarRatio[0],i.sarRatio[1])),t.apply(null,a);if("hevc"===i.codec){var f,m=s.sps_max_sub_layers_minus1+1,g=s.sps_temporal_id_nesting_flag,y=61440|s.min_spatial_segmentation_idc,_=new DataView(new ArrayBuffer(2)),S=new DataView(new ArrayBuffer(2)),b=new DataView(new ArrayBuffer(2));return _.setUint16(0,d.length),S.setUint16(0,r.length),b.setUint16(0,o.length),f=new Uint8Array([1,s.general_profile_space<<6|s.general_tier_flag<<5|s.general_profile_idc,s.general_profile_compatibility_flags>>>24&255,s.general_profile_compatibility_flags>>>16&255,s.general_profile_compatibility_flags>>>8&255,255&s.general_profile_compatibility_flags,s.general_constraint_indicator_flags_bytes[0],s.general_constraint_indicator_flags_bytes[1],s.general_constraint_indicator_flags_bytes[2],s.general_constraint_indicator_flags_bytes[3],s.general_constraint_indicator_flags_bytes[4],s.general_constraint_indicator_flags_bytes[5],s.general_level_idc,y>>>8&255,255&y,252,252|s.chroma_format_idc,248|s.bit_depth_luma_minus8,248|s.bit_depth_chroma_minus8,0,0,m<<3|g<<2|3,3].concat([160,_.getUint8(0),_.getUint8(1)],l).concat([161,S.getUint8(0),S.getUint8(1)],p).concat([162,b.getUint8(0),b.getUint8(1)],h)),t(C.hvc1,c,t(C.hvcC,f),e())}},r=function(e){var n=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]);return"ec-3"===e.codec?t(C["ec-3"],n,i(e)):t(C.mp4a,n,a(e))}}(),m=function(e){var i=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(C.tkhd,i)},T=function(e){var i,n,a,r,s,o;return i=t(C.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/N),o=Math.floor(e.baseMediaDecodeTime%N),n=t(C.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?(a=k(e,92),t(C.traf,i,n,a)):(r=S(e),a=k(e,r.length+92),t(C.traf,i,n,a,r))},f=function(e){return e.duration=e.duration||4294967295,t(C.trak,m(e),g(e))},w=function(e){var i=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&&(i[i.length-1]=0),t(C.trex,i)},function(){var e,i,n;n=function(t,e){var i=0,n=0,a=0,r=0;return t.length&&(void 0!==t[0].duration&&(i=1),void 0!==t[0].size&&(n=2),void 0!==t[0].flags&&(a=4),void 0!==t[0].compositionTimeOffset&&(r=8)),[0,0,i|n|a|r,1,(4278190080&t.length)>>>24,(16711680&t.length)>>>16,(65280&t.length)>>>8,255&t.length,(4278190080&e)>>>24,(16711680&e)>>>16,(65280&e)>>>8,255&e]},i=function(e,i){var a,r,s,o,d,p;i+=20+16*(o=e.samples||[]).length,s=n(o,i),(r=new Uint8Array(s.length+16*o.length)).set(s),a=s.length;var h=0;for(p=0;p<o.length;p++)h+=(d=o[p]).duration,r[a++]=(4278190080&d.duration)>>>24,r[a++]=(16711680&d.duration)>>>16,r[a++]=(65280&d.duration)>>>8,r[a++]=255&d.duration,r[a++]=(4278190080&d.size)>>>24,r[a++]=(16711680&d.size)>>>16,r[a++]=(65280&d.size)>>>8,r[a++]=255&d.size,r[a++]=d.flags.isLeading<<2|d.flags.dependsOn,r[a++]=d.flags.isDependedOn<<6|d.flags.hasRedundancy<<4|d.flags.paddingValue<<1|d.flags.isNonSyncSample,r[a++]=61440&d.flags.degradationPriority,r[a++]=15&d.flags.degradationPriority,r[a++]=(4278190080&d.compositionTimeOffset)>>>24,r[a++]=(16711680&d.compositionTimeOffset)>>>16,r[a++]=(65280&d.compositionTimeOffset)>>>8,r[a++]=255&d.compositionTimeOffset;return e.segmentDuration=h,t(C.trun,r)},e=function(e,i){var a,r,s,o,d,p;i+=20+8*(o=e.samples||[]).length,s=n(o,i),(a=new Uint8Array(s.length+8*o.length)).set(s),r=s.length;var h=0;for(p=0;p<o.length;p++)h+=(d=o[p]).duration,a[r++]=(4278190080&d.duration)>>>24,a[r++]=(16711680&d.duration)>>>16,a[r++]=(65280&d.duration)>>>8,a[r++]=255&d.duration,a[r++]=(4278190080&d.size)>>>24,a[r++]=(16711680&d.size)>>>16,a[r++]=(65280&d.size)>>>8,a[r++]=255&d.size;return e.segmentDuration=h,t(C.trun,a)},k=function(t,n){return"audio"===t.type?e(t,n):i(t,n)}}();var z={ftyp:r,mdat:s,moof:p,moov:h,initSegment:function(t){var e,i=r(t),n=h(t);return(e=new Uint8Array(i.byteLength+n.byteLength)).set(i),e.set(n,i.byteLength),e}};var Y=function(t,e,i){return t(i={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&i.path)}},i.exports),i.exports}(
vendor: 4,710 bytes, line 28
28(function(t){function e(){return t.exports=e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},t.exports.__esModule=!0,t.exports.default=t.exports,e.apply(this,arguments)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})),j=function(){this.init=function(){var t={};this.on=function(e,i){t[e]||(t[e]=[]),t[e]=t[e].concat(i)},this.off=function(e,i){var n;return!!t[e]&&(n=t[e].indexOf(i),t[e]=t[e].slice(),t[e].splice(n,1),n>-1)},this.trigger=function(e){var i,n,a,r;if(i=t[e])if(2===arguments.length)for(a=i.length,n=0;n<a;++n)i[n].call(this,arguments[1]);else{for(r=[],n=arguments.length,n=1;n<arguments.length;++n)r.push(arguments[n]);for(a=i.length,n=0;n<a;++n)i[n].apply(this,r)}},this.dispose=function(){t={}}}};j.prototype.pipe=function(t){return this.on("data",(function(e){t.push(e)})),this.on("done",(function(e){t.flush(e)})),this.on("partialdone",(function(e){t.partialFlush(e)})),this.on("endedtimeline",(function(e){t.endTimeline(e)})),this.on("reset",(function(e){t.reset(e)})),t},j.prototype.push=function(t){this.trigger("data",t)},j.prototype.flush=function(t){this.trigger("done",t)},j.prototype.partialFlush=function(t){this.trigger("partialdone",t)},j.prototype.endTimeline=function(t){this.trigger("endedtimeline",t)},j.prototype.reset=function(t){this.trigger("reset",t)};var V,H,X,q,K,Z,$,J,Q=j,tt=function(t,e){var i=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}}();return i.dataOffset=e,i.compositionTimeOffset=t.pts-t.dts,i.duration=t.duration,i.size=4*t.length,i.size+=t.byteLength,t.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},et=function(t){var e,i,n=[],a=[];for(a.byteLength=0,a.nalCount=0,a.duration=0,n.byteLength=0,e=0;e<t.length;e++)"access_unit_delimiter_rbsp"===(i=t[e]).nalUnitType?(n.length&&(n.duration=i.dts-n.dts,a.byteLength+=n.byteLength,a.nalCount+=n.length,a.duration+=n.duration,a.push(n)),(n=[i]).byteLength=i.data.byteLength,n.pts=i.pts,n.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(n.keyFrame=!0),n.duration=i.dts-n.dts,n.byteLength+=i.data.byteLength,n.push(i));return a.length&&(!n.duration||n.duration<=0)&&(n.duration=a[a.length-1].duration),a.byteLength+=n.byteLength,a.nalCount+=n.length,a.duration+=n.duration,a.push(n),a},it=function(t){var e,i,n=[],a=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=t[0].pts,n.dts=t[0].dts,a.byteLength=0,a.nalCount=0,a.duration=0,a.pts=t[0].pts,a.dts=t[0].dts,e=0;e<t.length;e++)(i=t[e]).keyFrame?(n.length&&(a.push(n),a.byteLength+=n.byteLength,a.nalCount+=n.nalCount,a.duration+=n.duration),(n=[i]).nalCount=i.length,n.byteLength=i.byteLength,n.pts=i.pts,n.dts=i.dts,n.duration=i.duration):(n.duration+=i.duration,n.nalCount+=i.length,n.byteLength+=i.byteLength,n.push(i));return a.length&&n.duration<=0&&(n.duration=a[a.length-1].duration),a.byteLength+=n.byteLength,a.nalCount+=n.nalCount,a.duration+=n.duration,a.push(n),a},nt=function(t){var e;return!t[0][0].keyFrame&&t.length>1&&(e=t.shift(),t.byteLength-=e.byteLength,t.nalCount-=e.nalCount,t[0][0].dts=e.dts,t[0][0].pts=e.pts,t[0][0].duration+=e.duration),t},at=function(t,e){var i,n,a,r,s,o=e||0,d=[];for(i=0;i<t.length;i++)for(r=t[i],n=0;n<r.length;n++)s=r[n],o+=(a=tt(s,o)).size,d.push(a);return d},rt=function(t){var e,i,n,a,r,s,o=0,d=t.byteLength,p=t.nalCount,h=new Uint8Array(d+4*p),l=new DataView(h.buffer);for(e=0;e<t.length;e++)for(a=t[e],i=0;i<a.length;i++)for(r=a[i],n=0;n<r.length;n++)s=r[n],l.setUint32(o,s.data.byteLength),o+=4,h.set(s.data,o),o+=s.data.byteLength;return h},st=[33,16,5,32,164,27],ot=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],dt=function(t){for(var e=[];t--;)e.push(0);return e},pt=function(){if(!V){var t={96e3:[st,[227,64],dt(154),[56]],88200:[st,[231],dt(170),[56]],64e3:[st,[248,192],dt(240),[56]],48e3:[st,[255,192],dt(268),[55,148,128],dt(54),[112]],44100:[st,[255,192],dt(268),[55,163,128],dt(84),[112]],32e3:[st,[255,192],dt(268),[55,234],dt(226),[112]],24e3:[st,[255,192],dt(268),[55,255,128],dt(268),[111,112],dt(126),[224]],16e3:[st,[255,192],dt(268),[55,255,128],dt(268),[111,255],dt(269),[223,108],dt(195),[1,192]],12e3:[ot,dt(268),[3,127,248],dt(268),[6,255,240],dt(268),[13,255,224],dt(268),[27,253,128],dt(259),[56]],11025:[ot,dt(268),[3,127,248],dt(268),[6,255,240],dt(268),[13,255,224],dt(268),[27,255,192],dt(268),[55,175,128],dt(108),[112]],8e3:[ot,dt(268),[3,121,16],dt(47),[7]]};V=function(t){return Object.keys(t).reduce((function(e,i){return e[i]=new Uint8Array(t[i].reduce((function(t,e){return t.concat(e)}),[])),e})
vendor: 10,187 bytes, line 28
28,{})}(t)}return V},ht={"48000_2":new Uint8Array([11,119,0,255,52,135,192,0,32,0,0,0,68,64,22,4,4,4,4,4,4,4,1,1,1,1,1,1,1,0,199,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,239,249,213,243,231,207,159,62,124,249,243,231,207,159,62,63,231,87,207,159,62,124,249,243,231,207,159,62,124,248,0,0,0,0,1,227,109,182,219,109,227,199,143,29,221,221,220,0,0,0,0,0,0,0,0,0,0,0,107,90,214,181,173,107,90,214,181,173,107,90,214,181,173,0,0,0,0,219,109,182,219,120,241,227,199,119,119,119,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,120,219,109,182,219,120,241,227,199,119,119,119,0,0,0,0,0,0,0,0,0,0,0,26,214,181,173,107,90,214,181,173,107,90,214,181,173,107,64,0,0,0,54,219,109,182,222,60,120,241,221,221,221,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,54,219,109,182,222,60,120,241,221,221,221,192,0,0,0,0,0,0,0,0,0,0,6,181,173,107,90,214,181,173,107,90,214,181,173,107,90,208,0,0,0,13,182,219,109,183,143,30,60,119,119,119,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,141,182,219,109,183,143,30,60,119,119,119,112,0,0,0,0,0,0,0,0,0,0,1,173,107,90,214,181,173,107,90,214,181,173,107,90,214,180,0,0,0,3,109,182,219,109,227,199,143,29,221,221,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,227,109,182,219,109,227,199,143,29,221,221,220,0,0,0,0,0,0,0,0,0,0,0,107,90,214,181,173,107,90,214,181,173,107,90,214,181,173,0,0,0,0,219,109,182,219,120,241,227,199,119,119,119,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,120,219,109,182,219,120,241,227,199,119,119,119,0,0,0,0,0,0,0,0,0,0,0,26,214,181,173,107,90,214,181,173,107,90,214,181,173,107,64,0,0,0,54,219,109,182,222,60,120,241,221,221,221,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,11]),"48000_6":new Uint8Array([11,119,2,255,63,135,192,0,32,0,0,0,2,0,0,0,4,16,31,186,4,4,1,1,0,64,64,16,16,4,4,24,249,243,231,207,159,62,125,255,58,190,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,199,252,234,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,31,243,171,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,127,206,175,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,241,255,58,190,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,199,252,234,0,0,0,0,54,190,124,249,243,109,182,219,111,30,60,120,241,227,199,143,30,60,120,241,227,109,182,249,243,90,214,181,173,107,90,214,181,173,104,0,0,0,111,159,62,124,219,109,182,219,199,143,30,60,120,241,227,199,143,30,60,109,182,223,62,107,90,214,181,173,107,90,214,181,173,0,0,0,13,243,231,207,155,109,182,219,120,241,227,199,143,30,60,120,241,227,199,143,27,109,183,207,154,214,181,173,107,90,214,181,173,107,64,0,0,3,107,231,207,159,54,219,109,182,241,227,199,143,30,60,120,241,227,199,143,27,109,183,207,154,214,181,173,107,90,214,181,173,107,64,0,0,3,124,249,243,230,219,109,182,222,60,120,241,227,199,143,30,60,120,241,227,118,219,109,243,230,181,173,107,90,214,181,173,107,90,208,0,0,0,217,0,0,0,0,3,107,231,207,159,54,219,109,182,241,227,199,143,30,60,120,241,227,199,143,30,54,219,111,159,53,173,107,90,214,181,173,107,90,214,128,0,0,6,249,243,231,205,182,219,109,188,120,241,227,199,143,30,60,120,241,227,198,219,109,243,230,181,173,107,90,214,181,173,107,90,208,0,0,0,223,62,124,249,182,219,109,183,143,30,60,120,241,227,199,143,30,60,120,241,182,219,124,249,173,107,90,214,181,173,107,90,214,180,0,0,0,54,190,124,249,243,109,182,219,111,30,60,120,241,227,199,143,30,60,120,241,182,219,124,249,173,107,90,214,181,173,107,90,214,180,0,0,0,55,207,159,62,109,182,219,109,227,199,143,30,60,120,241,227,199,143,30,55,109,182,223,62,107,90,214,181,173,107,90,214,181,173,0,0,0,13,144,0,0,0,0,54,190,124,249,243,109,182,219,111,30,60,120,241,227,199,143,30,60,120,241,227,109,182,249,243,90,214,181,173,107,90,214,181,173,104,0,0,0,111,159,62,124,219,109,182,219,199,143,30,60,120,241,227,199,143,30,60,109,182,223,62,107,90,214,181,173,107,90,214,181,173,0,0,0,13,243,231,207,155,109,182,219,120,241,227,199,143,30,60,120,241,227,199,143,27,109,183,207,154,214,181,173,107,90,214,181,173,107,64,0,0,3,107,231,207,159,54,219,109,182,241,227,199,143,30,60,120,241,227,199,143,27,109,183,207,154,214,181,173,107,90,214,181,173,107,64,0,0,3,124,249,243,230,219,109,182,222,60,120,241,227,199,143,30,60,120,241,227,118,219,109,243,230,181,173,107,90,214,181,173,107,90,208,0,0,0,217,0,0,0,0,3,107,231,207,159,54,219,109,182,241,227,199,143,30,60,120,241,227,199,143,30,54,219,111,159,53,173,107,90,214,181,173,107,90,214,128,0,0,6,249,243,231,205,182,219,109,188,120,241,227,199,143,30,60,120,241,227,198,219,109,243,230,181,173,107,90,214,181,173,107,90,208,0,0,0,223,62,124,249,182,219,109,183,143,30,60,120,241,227,199,143,30,60,120,241,182,219,124,249,173,107,90,214,181,173,107,90,214,180,0,0,0,54,190,124,249,243,109,182,219,111,30,60,120,241,227,199,143,30,60,120,241,182,219,124,249,173,107,90,214,181,173,107,90,214,180,0,0,0,55,207,159,62,109,182,219,109,227,199,143,30,60,120,241,227,199,143,30,55,109,182,223,62,107,90,214,181,173,107,90,214,181,173,0,0,0,13,144,0,0,0,0,54,190,124,249,243,109,182,219,111,30,60,120,241,227,199,143,30,60,120,241,227,109,182,249,243,90,214,181,173,107,90,214,181,173,104,0,0,0,111,159,62,124,219,109,182,219,199,143,30,60,120,241,227,199,143,30,60,109,182,223,62,107,90,214,181,173,107,90,214,181,173,0,0,0,13,243,231,207,155,109,182,219,120,241,227,199,143,30,60,120,241,227,199,143,27,109,183,207,154,214,181,173,107,90,214,181,173,107,64,0,0,3,107,231,207,159,54,219,109,182,241,227,199,143,30,60,120,241,227,199,143,27,109,183,207,154,214,181,173,107,90,214,181,173,107,64,0,0,3,124,249,243,230,219,109,182,222,60,120,241,227,199,143,30,60,120,241,227,118,219,109,243,230,181,173,107,90,214,181,173,107,90,208,0,0,0,217,0,0,0,0,3,107,231,207,159,54,219,109,182,241,227,199,143,30,60,120,241,227,199,143,30,54,219,111,159,53,173,107,90,214,181,173,107,90,214,128,0,0,6,249,243,231,205,182,219,109,188,120,241,227,199,143,30,60,120,241,227,198,219,109,243,230,181,173,107,90,214,181,173,107,90,208,0,0,0,223,62,124,249,182,219,109,183,143,30,60,120,241,227,199,143,30,60,120,241,182,219,124,249,173,107,90,214,181,173,107,90,214,180,0,0,0,54,190,124,249,243,109,182,219,111,30,60,120,241,227,199,143,30,60,120,241,182,219,124,249,173,107,90,214,181,173,107,90,214,180,0,0,0,55,207,159,62,109,182,219,109,227,199,143,30,60,120,241,227,199,143,30,55,109,182,223,62,107,90,214,181,173,107,90,214,181,173,0,0,0,13,144,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,6])},lt=9e4;Z=function(t,e){return H(K(t,e))},$=function(t,e){return X(q(t),e)},J=function(t,e,i){return q(i?t:t-e)};var ct=lt,ut=(H=function(t){return t*lt},X=function(t,e){return t*e},q=function(t){return t/lt},K=function(t,e){return t/e},Z),ft=$,mt=J,gt=function(t,e,i,n){var a,r,s,o,d=0,p=0,h=0,l=0;if(e.length){a=ut(t.baseMediaDecodeTime,t.samplerate);var c=e[0]&&e[0].sampleCount||1024;if(d=Math.ceil(ct/(t.samplerate/c)),i&&n&&(p=a-Math.max(i,n),l=(h=Math.floor(p/d))*d),!(h<1||l>ct/2)){var u;for("ec-3"===t.codec?(r=ht[t.samplerate+"_"+t.channelcount],u=1536):(r=pt()[t.samplerate],u=1024),r||(r=e[0].data,u=c),s=0;s<h;s++)o=e[0],e.splice(0,0,{data:r,dts:o.dts-d,pts:o.pts-d,sampleCount:u});return t.baseMediaDecodeTime-=Math.floor(ft(l,t.samplerate)),l}}},yt=function(t){var e,i,n=[];for(e=0;e<t.length;e++)i=t[e],n.push({size:i.data.byteLength,duration:i.sampleCount||1024});return n},_t=function(t){var e,i,n=0,a=new Uint8Array(function(t){var e,i=0;for(e=0;e<t.length;e++)i+=t[e].data.byteLength;return i}(t));for(e=0;e<t.length;e++)i=t[e],a.set(i.data,n),n+=i.data.byteLength;return a},St=ct,bt=function(t){delete t.minSegmentDts,delete t.maxSegmentDts,delete t.minSegmentPts,delete t.maxSegmentPts},vt=function(t,e){var i,n=t.minSegmentDts;return e||(n-=t.timelineStartInfo.dts),i=t.timelineStartInfo.baseMediaDecodeTime,i+=n,i=Math.max(0,i),"audio"===t.type&&(i*=t.samplerate/St,i=Math.floor(i)),i},Tt=function(t,e){"number"==typeof e.pts&&(void 0===t.timelineStartInfo.pts&&(t.timelineStartInfo.pts=e.pts),void 0===t.minSegmentPts?t.minSegmentPts=e.pts:t.minSegmentPts=Math.min(t.minSegmentPts,e.pts),t.timelineStartInfo.minSegmentPts=t.minSegmentPts,void 0===t.maxSegmentPts?t.maxSegmentPts=e.pts:t.maxSegmentPts=Math.max(t.maxSegmentPts,e.pts)),"number"==typeof e.dts&&(void 0===t.timelineStartInfo.dts&&(t.timelineStartInfo.dts=e.dts),void 0===t.minSegmentDts?t.minSegmentDts=e.dts:t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),void 0===t.maxSegmentDts?t.maxSegmentDts=e.dts:t.maxSegmentDts=Math.max(t.maxSegmentDts,e.dts))},wt=function(t){for(var e=0,i=[],n=0,a=0;e<t.byteLength&&128!==t[e];){for(;255===t[e];)n+=255,e++;for(n+=t[e++];255===t[e];)a+=255,e++;a+=t[e++];var r=String.fromCharCode(t[e+3],t[e+4],t[e+5],t[e+6]);4===n&&"GA94"===r&&i.push({payloadType:n,payloadSize:a,payload:t.subarray(e,e+a)}),e+=a,n=0,a=0}return i},kt=function(t){return 181!==t.payload[0]||49!=(t.payload[1]<<8|t.payload[2])||"GA94"!==String.fromCharCode(t.payload[3],t.payload[4],t.payload[5],t.payload[6])||3!==t.payload[7]?null:t.payload.subarray(8,t.payload.length-1)},Ct=function(t,e){var i,n,a,r,s=[];if(!(64&e[0]))return s;for(n=31&e[0],i=0;i<n;i++)r={type:3&e[2+(a=3*i)],pts:t},4&e[a+2]&&(r.ccData=e[a+3]<<8|e[a+4],s.push(r));return s},Pt=4,At=function t(e){e=e||{},t.prototype.init.call(this),this.parse708captions_="boolean"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Gt(0,0),new Gt(0,1),new Gt(1,0),new Gt(1,1)],this.parse708captions_&&(this.cc708Stream_=new Rt({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach(
vendor: 6,749 bytes, line 28
28(function(t){t.on("data",this.trigger.bind(this,"data")),t.on("partialdone",this.trigger.bind(this,"partialdone")),t.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")))};(At.prototype=new Q).push=function(t){var e=this;"sei_rbsp"===t.nalUnitType&&wt(t.escapedRBSP).filter((function(t){return t.payloadType===Pt})).map(kt).forEach((function(i){i&&(e.captionPackets_=e.captionPackets_.concat(Ct(t.pts,i)))}))},At.prototype.flushCCStreams=function(t){this.ccStreams_.forEach((function(e){return"flush"===t?e.flush():e.partialFlush()}),this)},At.prototype.flushStream=function(t){this.captionPackets_.length?(this.captionPackets_.forEach((function(t,e){t.presortIndex=e})),this.captionPackets_.sort((function(t,e){return t.pts===e.pts?t.presortIndex-e.presortIndex:t.pts-e.pts})),this.captionPackets_.forEach((function(t){t.type<2?this.dispatchCea608Packet(t):this.dispatchCea708Packet(t)}),this),this.captionPackets_.length=0,this.flushCCStreams(t)):this.flushCCStreams(t)},At.prototype.flush=function(){return this.flushStream("flush")},At.prototype.partialFlush=function(){return this.flushStream("partialFlush")},At.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(t){t.reset()}))},At.prototype.dispatchCea608Packet=function(t){this.setsTextOrXDSActive(t)?this.activeCea608Channel_[t.type]=null:this.setsChannel1Active(t)?this.activeCea608Channel_[t.type]=0:this.setsChannel2Active(t)&&(this.activeCea608Channel_[t.type]=1),null!==this.activeCea608Channel_[t.type]&&this.ccStreams_[(t.type<<1)+this.activeCea608Channel_[t.type]].push(t)},At.prototype.setsChannel1Active=function(t){return 4096==(30720&t.ccData)},At.prototype.setsChannel2Active=function(t){return 6144==(30720&t.ccData)},At.prototype.setsTextOrXDSActive=function(t){return 256==(28928&t.ccData)||4138==(30974&t.ccData)||6186==(30974&t.ccData)},At.prototype.dispatchCea708Packet=function(t){this.parse708captions_&&this.cc708Stream_.push(t)};var Et={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},xt=function(t){return 32<=t&&t<=127||160<=t&&t<=255},Ut=function(t){this.windowNum=t,this.reset()};Ut.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},Ut.prototype.getText=function(){return this.rows.join("\\n")},Ut.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Ut.prototype.newLine=function(t){for(this.rows.length>=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(t),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Ut.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},Ut.prototype.addText=function(t){this.rows[this.rowIdx]+=t},Ut.prototype.backspace=function(){if(!this.isEmpty()){var t=this.rows[this.rowIdx];this.rows[this.rowIdx]=t.substr(0,t.length-1)}};var Mt=function(t,e,i){this.serviceNum=t,this.text="",this.currentWindow=new Ut(-1),this.windows=[],this.stream=i,"string"==typeof e&&this.createTextDecoder(e)};Mt.prototype.init=function(t,e){this.startPts=t;for(var i=0;i<8;i++)this.windows[i]=new Ut(i),"function"==typeof e&&(this.windows[i].beforeRowOverflow=e)},Mt.prototype.setCurrentWindow=function(t){this.currentWindow=this.windows[t]},Mt.prototype.createTextDecoder=function(t){if("undefined"==typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(t)}catch(e){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+t+" encoding. "+e})}};var Rt=function t(e){e=e||{},t.prototype.init.call(this);var i,n=this,a=e.captionServices||{},r={};Object.keys(a).forEach((function(t){i=a[t],/^SERVICE/.test(t)&&(r[t]=i.encoding)})),this.serviceEncodings=r,this.current708Packet=null,this.services={},this.push=function(t){3===t.type?(n.new708Packet(),n.add708Bytes(t)):(null===n.current708Packet&&n.new708Packet(),n.add708Bytes(t))}};Rt.prototype=new Q,Rt.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Rt.prototype.add708Bytes=function(t){var e=t.ccData,i=e>>>8,n=255&e;this.current708Packet.ptsVals.push(t.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(n)},Rt.prototype.push708Packet=function(){var t=this.current708Packet,e=t.data,i=null,n=null,a=0,r=e[a++];for(t.seq=r>>6,t.sizeCode=63&r;a<e.length;a++)n=31&(r=e[a++]),7==(i=r>>5)&&n>0&&(i=r=e[a++]),this.pushServiceBlock(i,a,n),n>0&&(a+=n-1)},Rt.prototype.pushServiceBlock=function(t,e,i){var n,a=e,r=this.current708Packet.data,s=this.services[t];for(s||(s=this.initService(t,a));a<e+i&&a<r.length;a++)n=r[a],xt(n)?a=this.handleText(a,s):24===n?a=this.multiByteCharacter(a,s):16===n?a=this.extendedCommands(a,s):128<=n&&n<=135?a=this.setCurrentWindow(a,s):152<=n&&n<=159?a=this.defineWindow(a,s):136===n?a=this.clearWindows(a,s):140===n?a=this.deleteWindows(a,s):137===n?a=this.displayWindows(a,s):138===n?a=this.hideWindows(a,s):139===n?a=this.toggleWindows(a,s):151===n?a=this.setWindowAttributes(a,s):144===n?a=this.setPenAttributes(a,s):145===n?a=this.setPenColor(a,s):146===n?a=this.setPenLocation(a,s):143===n?s=this.reset(a,s):8===n?s.currentWindow.backspace():12===n?s.currentWindow.clearText():13===n?s.currentWindow.pendingNewLine=!0:14===n?s.currentWindow.clearText():141===n&&a++},Rt.prototype.extendedCommands=function(t,e){var i=this.current708Packet.data[++t];return xt(i)&&(t=this.handleText(t,e,{isExtended:!0})),t},Rt.prototype.getPts=function(t){return this.current708Packet.ptsVals[Math.floor(t/2)]},Rt.prototype.initService=function(t,e){var i,n,a=this;return(i="SERVICE"+t)in this.serviceEncodings&&(n=this.serviceEncodings[i]),this.services[t]=new Mt(t,n,a),this.services[t].init(this.getPts(e),(function(e){a.flushDisplayed(e,a.services[t])})
vendor: 10,372 bytes, line 28
28),this.services[t]},Rt.prototype.handleText=function(t,e,i){var n,a,r=i&&i.isExtended,s=i&&i.isMultiByte,o=this.current708Packet.data,d=r?4096:0,p=o[t],h=o[t+1],l=e.currentWindow;return e.textDecoder_&&!r?(s?(a=[p,h],t++):a=[p],n=e.textDecoder_.decode(new Uint8Array(a))):n=function(t){var e=Et[t]||t;return 4096&t&&t===e?"":String.fromCharCode(e)}(d|p),l.pendingNewLine&&!l.isEmpty()&&l.newLine(this.getPts(t)),l.pendingNewLine=!1,l.addText(n),t},Rt.prototype.multiByteCharacter=function(t,e){var i=this.current708Packet.data,n=i[t+1],a=i[t+2];return xt(n)&&xt(a)&&(t=this.handleText(++t,e,{isMultiByte:!0})),t},Rt.prototype.setCurrentWindow=function(t,e){var i=7&this.current708Packet.data[t];return e.setCurrentWindow(i),t},Rt.prototype.defineWindow=function(t,e){var i=this.current708Packet.data,n=i[t],a=7&n;e.setCurrentWindow(a);var r=e.currentWindow;return n=i[++t],r.visible=(32&n)>>5,r.rowLock=(16&n)>>4,r.columnLock=(8&n)>>3,r.priority=7&n,n=i[++t],r.relativePositioning=(128&n)>>7,r.anchorVertical=127&n,n=i[++t],r.anchorHorizontal=n,n=i[++t],r.anchorPoint=(240&n)>>4,r.rowCount=15&n,n=i[++t],r.columnCount=63&n,n=i[++t],r.windowStyle=(56&n)>>3,r.penStyle=7&n,r.virtualRowCount=r.rowCount+1,t},Rt.prototype.setWindowAttributes=function(t,e){var i=this.current708Packet.data,n=i[t],a=e.currentWindow.winAttr;return n=i[++t],a.fillOpacity=(192&n)>>6,a.fillRed=(48&n)>>4,a.fillGreen=(12&n)>>2,a.fillBlue=3&n,n=i[++t],a.borderType=(192&n)>>6,a.borderRed=(48&n)>>4,a.borderGreen=(12&n)>>2,a.borderBlue=3&n,n=i[++t],a.borderType+=(128&n)>>5,a.wordWrap=(64&n)>>6,a.printDirection=(48&n)>>4,a.scrollDirection=(12&n)>>2,a.justify=3&n,n=i[++t],a.effectSpeed=(240&n)>>4,a.effectDirection=(12&n)>>2,a.displayEffect=3&n,t},Rt.prototype.flushDisplayed=function(t,e){for(var i=[],n=0;n<8;n++)e.windows[n].visible&&!e.windows[n].isEmpty()&&i.push(e.windows[n].getText());e.endPts=t,e.text=i.join("\\n\\n"),this.pushCaption(e),e.startPts=t},Rt.prototype.pushCaption=function(t){""!==t.text&&(this.trigger("data",{startPts:t.startPts,endPts:t.endPts,text:t.text,stream:"cc708_"+t.serviceNum}),t.text="",t.startPts=t.endPts)},Rt.prototype.displayWindows=function(t,e){var i=this.current708Packet.data[++t],n=this.getPts(t);this.flushDisplayed(n,e);for(var a=0;a<8;a++)i&1<<a&&(e.windows[a].visible=1);return t},Rt.prototype.hideWindows=function(t,e){var i=this.current708Packet.data[++t],n=this.getPts(t);this.flushDisplayed(n,e);for(var a=0;a<8;a++)i&1<<a&&(e.windows[a].visible=0);return t},Rt.prototype.toggleWindows=function(t,e){var i=this.current708Packet.data[++t],n=this.getPts(t);this.flushDisplayed(n,e);for(var a=0;a<8;a++)i&1<<a&&(e.windows[a].visible^=1);return t},Rt.prototype.clearWindows=function(t,e){var i=this.current708Packet.data[++t],n=this.getPts(t);this.flushDisplayed(n,e);for(var a=0;a<8;a++)i&1<<a&&e.windows[a].clearText();return t},Rt.prototype.deleteWindows=function(t,e){var i=this.current708Packet.data[++t],n=this.getPts(t);this.flushDisplayed(n,e);for(var a=0;a<8;a++)i&1<<a&&e.windows[a].reset();return t},Rt.prototype.setPenAttributes=function(t,e){var i=this.current708Packet.data,n=i[t],a=e.currentWindow.penAttr;return n=i[++t],a.textTag=(240&n)>>4,a.offset=(12&n)>>2,a.penSize=3&n,n=i[++t],a.italics=(128&n)>>7,a.underline=(64&n)>>6,a.edgeType=(56&n)>>3,a.fontStyle=7&n,t},Rt.prototype.setPenColor=function(t,e){var i=this.current708Packet.data,n=i[t],a=e.currentWindow.penColor;return n=i[++t],a.fgOpacity=(192&n)>>6,a.fgRed=(48&n)>>4,a.fgGreen=(12&n)>>2,a.fgBlue=3&n,n=i[++t],a.bgOpacity=(192&n)>>6,a.bgRed=(48&n)>>4,a.bgGreen=(12&n)>>2,a.bgBlue=3&n,n=i[++t],a.edgeRed=(48&n)>>4,a.edgeGreen=(12&n)>>2,a.edgeBlue=3&n,t},Rt.prototype.setPenLocation=function(t,e){var i=this.current708Packet.data,n=i[t],a=e.currentWindow.penLoc;return e.currentWindow.pendingNewLine=!0,n=i[++t],a.row=15&n,n=i[++t],a.column=63&n,t},Rt.prototype.reset=function(t,e){var i=this.getPts(t);return this.flushDisplayed(i,e),this.initService(e.serviceNum,t)};var It={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},Dt=function(t){return t=It[t]||t,String.fromCharCode(t).replace(/[\\x00]/g,"")},Ot=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Lt=function(){for(var t=[],e=15;e--;)t.push("");return t},Bt=function(){for(var t=[],e=15;e--;)t[e]=0;return t},Gt=function t(e,i,n){t.prototype.init.call(this),this.field_=e||0,this.dataChannel_=i||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(t){var e,i,n,a,r;if((e=32639&t.ccData)!==this.lastControlCode_){if(4096==(61440&e)?this.lastControlCode_=e:e!==this.PADDING_&&(this.lastControlCode_=null),n=e>>>8,a=255&e,e!==this.PADDING_)if(e===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(e===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(t.pts),this.flushDisplayed(t.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,i=this.displayedIndent_,this.displayedIndent_=this.nonDisplayedIndent_,this.nonDisplayedIndent_=i,this.startPts_=t.pts;else if(e===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(t.pts);else if(e===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(t.pts);else if(e===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(t.pts);else if(e===this.CARRIAGE_RETURN_)this.clearFormatting(t.pts),this.flushDisplayed(t.pts),this.shiftRowsUp_(),this.startPts_=t.pts;else if(e===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(e===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(t.pts),this.displayed_=Lt(),this.displayedIndent_=Bt();else if(e===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Lt(),this.nonDisplayedIndent_=Bt();else if(e===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(t.pts),this.displayed_=Lt(),this.displayedIndent_=Bt()),this.mode_="paintOn",this.startPts_=t.pts;else{if(!Boolean(this.mode_))return;if(this.isSpecialCharacter(n,a))r=Dt((n=(3&n)<<8)|a),this[this.mode_](t.pts,r),this.column_++;else if(this.isExtCharacter(n,a))"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),r=Dt((n=(3&n)<<8)|a),this[this.mode_](t.pts,r),this.column_++;else if(this.isMidRowCode(n,a))this.clearFormatting(t.pts),this[this.mode_](t.pts," "),this.column_++,14&~a||this.addFormatting(t.pts,["i"]),1&~a||this.addFormatting(t.pts,["u"]);else if(this.isOffsetControlCode(n,a)){var s=3&a;this.column_+=s,this.incrementIdentation(s)}else if(this.isPAC(n,a)){var o=Ot.indexOf(7968&e);"rollUp"===this.mode_&&(o-this.rollUpRows_+1<0&&(o=this.rollUpRows_-1),this.setRollUp(t.pts,o)),o!==this.row_&&(this.clearFormatting(t.pts),this.changeRow(o)),1&a&&-1===this.formatting_.indexOf("u")&&this.addFormatting(t.pts,["u"]),16&~e||(this.column_=4*((14&e)>>1),"popOn"===this.mode_?this.nonDisplayedIndent_[this.row_]=this.column_:"rollUp"===this.mode_&&(this.displayedIndent_[this.row_]=this.column_)),this.isColorPAC(a)&&(14&~a||this.addFormatting(t.pts,["i"]))}else this.isNormalChar(n)&&(r=Dt(n),0!==a&&(r+=Dt(a)),this[this.mode_](t.pts,r),this.column_+=r.length)}}else this.lastControlCode_=null}};Gt.prototype=new Q,Gt.prototype.flushDisplayed=function(t){for(var e=0;e<this.displayed_.length;e++){var i=this.displayed_[e];i&&i.length&&this.trigger("data",{startPts:this.startPts_,endPts:t,text:i,stream:this.name_,position:{row:e,column:this.displayedIndent_[e]}})}},Gt.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Lt(),this.nonDisplayed_=Lt(),this.displayedIndent_=Bt(),this.nonDisplayedIndent_=Bt(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Gt.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_,this.TAB_OFFSET_1_=33,this.TAB_OFFSET_2_=34,this.TAB_OFFSET_3_=35},Gt.prototype.isSpecialCharacter=function(t,e){return t===this.EXT_&&e>=48&&e<=63},Gt.prototype.isExtCharacter=function(t,e){return(t===this.EXT_+1||t===this.EXT_+2)&&e>=32&&e<=63},Gt.prototype.isMidRowCode=function(t,e){return t===this.EXT_&&e>=32&&e<=47},Gt.prototype.isOffsetControlCode=function(t,e){return t===this.OFFSET_&&e>=this.TAB_OFFSET_1_&&e<=this.TAB_OFFSET_3_},Gt.prototype.isPAC=function(t,e){return t>=this.BASE_&&t<this.BASE_+8&&e>=64&&e<=127},Gt.prototype.isColorPAC=function(t){return t>=64&&t<=79||t>=96&&t<=127},Gt.prototype.isNormalChar=function(t){return t>=32&&t<=127},Gt.prototype.setRollUp=function(t,e){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(t),this.nonDisplayed_=Lt(),this.displayed_=Lt(),this.displayedIndent_=Bt(),this.nonDisplayedIndent_=Bt()),void 0!==e&&e!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[e-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";void 0===e&&(e=this.row_),this.topRow_=e-this.rollUpRows_+1},Gt.prototype.addFormatting=function(t,e){this.formatting_=this.formatting_.concat(e);var i=e.reduce(
28(function(t,e){return t+"<"+e+">"}),"");this[this.mode_](t,i)},Gt.prototype.clearFormatting=function(t){if(this.formatting_.length){var e=this.formatting_.reverse().reduce((function(t,e){return t+"<
vendor: 6,458 bytes, line 28
28/"+e+">"}),"");this.formatting_=[],this[this.mode_](t,e)}},Gt.prototype.popOn=function(t,e){var i=this.nonDisplayed_[this.row_];i+=e,this.nonDisplayed_[this.row_]=i},Gt.prototype.rollUp=function(t,e){var i=this.displayed_[this.row_];i+=e,this.displayed_[this.row_]=i},Gt.prototype.shiftRowsUp_=function(){var t;for(t=0;t<this.topRow_;t++)this.displayed_[t]="";for(t=this.row_+1;t<15;t++)this.displayed_[t]="";for(t=this.topRow_;t<this.row_;t++)this.displayed_[t]=this.displayed_[t+1];this.displayed_[this.row_]=""},Gt.prototype.paintOn=function(t,e){var i=this.displayed_[this.row_];i+=e,this.displayed_[this.row_]=i},Gt.prototype.changeRow=function(t){if("rollUp"===this.mode_){var e=this.row_-this.topRow_+1;this.topRow_=t-e+1;var i=this.displayed_,n=this.displayedIndent_;this.displayed_=Lt(),this.displayedIndent_=Bt();for(var a=0;a<e;a++)t-a>=0&&(this.displayed_[t-a]=i[this.row_-a],this.displayedIndent_[t-a]=n[this.row_-a])}this.row_=t},Gt.prototype.incrementIdentation=function(t){"popOn"===this.mode_?this.nonDisplayedIndent_[this.row_]+=t:"rollUp"===this.mode_&&(this.displayedIndent_[this.row_]+=t)};var Wt={CaptionStream:At,Cea608Stream:Gt,Cea708Stream:Rt},Ft={H264_STREAM_TYPE:27,H265_STREAM_TYPE:36,ADTS_STREAM_TYPE:15,AC3_STREAM_TYPE:129,EC3_STREAM_TYPE:135,METADATA_STREAM_TYPE:21},Nt=4294967296,zt="shared",Yt=function(t,e){var i=1;for(t>e&&(i=-1);Math.abs(e-t)>Nt;)t+=8589934592*i;return t},jt=function t(e){var i,n;t.prototype.init.call(this),this.type_=e||zt,this.push=function(t){this.type_!==zt&&t.type!==this.type_||(void 0===t.dts&&void 0===t.pts||(void 0===n&&(n=t.dts),t.dts=Yt(t.dts,n),t.pts=Yt(t.pts,n),i=t.dts),this.trigger("data",t))},this.flush=function(){n=i,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){n=void 0,i=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};jt.prototype=new Q;var Vt,Ht=jt,Xt=Nt,qt=function(t,e,i){if(!t)return-1;for(var n=i;n<t.length;n++)if(t[n]===e)return n;return-1},Kt=0,Zt=3,$t=function(t,e,i){var n,a="";for(n=e;n<i;n++)a+="%"+("00"+t[n].toString(16)).slice(-2);return a},Jt=function(t,e,i){var n=decodeURIComponent($t(t,e,i));return"\\0"===n[n.length-1]&&(n=n.slice(0,-1)),n},Qt=function(t,e,i){return unescape($t(t,e,i))},te=function(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]},ee=function(t){return t.data[0]===Zt?Jt:t.data[0]===Kt?Qt:void 0},ie={APIC:function(t){var e,i,n=1;t.data[0]===Zt&&((e=qt(t.data,0,n))<0||(t.mimeType=Qt(t.data,n,e),n=e+1,t.pictureType=t.data[n],n++,(i=qt(t.data,0,n))<0||(t.description=Jt(t.data,n,i),n=i+1,"--\\x3e"===t.mimeType?t.url=Qt(t.data,n,t.data.length):t.pictureData=t.data.subarray(n,t.data.length))))},"T*":function(t){var e=ee(t);e&&(t.value=e(t.data,1,t.data.length).replace(/\\0*$/,""),t.data=t.value,t.values=t.value.split("\\0"))},TXXX:function(t){var e,i=ee(t);i&&-1!==(e=qt(t.data,0,1))&&(t.description=i(t.data,1,e),t.value=i(t.data,e+1,t.data.length).replace(/\\0*$/,""),t.data=t.value)},"W*":function(t){t.url=Qt(t.data,0,t.data.length).replace(/\\0.*$/,"")},WXXX:function(t){var e;t.data[0]===Zt&&-1!==(e=qt(t.data,0,1))&&(t.description=Jt(t.data,1,e),t.url=Qt(t.data,e+1,t.data.length).replace(/\\0.*$/,""))},PRIV:function(t){var e;for(e=0;e<t.data.length;e++)if(0===t.data[e]){t.owner=Qt(t.data,0,e);break}t.privateData=t.data.subarray(e+1),t.data=t.privateData}},ne={parseId3Frames:function(t){var e,i=10,n=0,a=[];if(!(t.length<10||t[0]!=="I".charCodeAt(0)||t[1]!=="D".charCodeAt(0)||t[2]!=="3".charCodeAt(0))){n=te(t.subarray(6,10)),n+=10,64&t[5]&&(i+=4,i+=te(t.subarray(10,14)),n-=te(t.subarray(16,20)));do{if((e=te(t.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(t[i],t[i+1],t[i+2],t[i+3]),data:t.subarray(i+10,i+e+10)};r.key=r.id,ie[r.id]?ie[r.id](r):"T"===r.id[0]?ie["T*"](r):"W"===r.id[0]&&ie["W*"](r),a.push(r),i+=10,i+=e}while(i<n);return a}},parseSyncSafeInteger:te,frameParsers:ie};(Vt=function(t){var e,i={descriptor:t&&t.descriptor},n=0,a=[],r=0;if(Vt.prototype.init.call(this),this.dispatchType=Ft.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(e=0;e<i.descriptor.length;e++)this.dispatchType+=("00"+i.descriptor[e].toString(16)).slice(-2);this.push=function(t){var e,i,s,o,d;if("timed-metadata"===t.type)if(t.dataAlignmentIndicator&&(r=0,a.length=0),0===a.length&&(t.data.length<10||t.data[0]!=="I".charCodeAt(0)||t.data[1]!=="D".charCodeAt(0)||t.data[2]!=="3".charCodeAt(0)))this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});else if(a.push(t),r+=t.data.byteLength,1===a.length&&(n=ne.parseSyncSafeInteger(t.data.subarray(6,10)),n+=10),!(r<n)){for(e={data:new Uint8Array(n),frames:[],pts:a[0].pts,dts:a[0].dts},d=0;d<n;)e.data.set(a[0].data.subarray(0,n-d),d),d+=a[0].data.byteLength,r-=a[0].data.byteLength,a.shift();i=10,64&e.data[5]&&(i+=4,i+=ne.parseSyncSafeInteger(e.data.subarray(10,14)),n-=ne.parseSyncSafeInteger(e.data.subarray(16,20)));do{if((s=ne.parseSyncSafeInteger(e.data.subarray(i+4,i+8)))<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if((o={id:String.fromCharCode(e.data[i],e.data[i+1],e.data[i+2],e.data[i+3]),data:e.data.subarray(i+10,i+s+10)}).key=o.id,ne.frameParsers[o.id]?ne.frameParsers[o.id](o):"T"===o.id[0]?ne.frameParsers["T*"](o):"W"===o.id[0]&&ne.frameParsers["W*"](o),"com.apple.streaming.transportStreamTimestamp"===o.owner){var p=o.data,h=(1&p[3])<<30|p[4]<<22|p[5]<<14|p[6]<<6|p[7]>>>2;h*=4,h+=3&p[7],o.timeStamp=h,void 0===e.pts&&void 0===e.dts&&(e.pts=o.timeStamp,e.dts=o.timeStamp),this.trigger("timestamp",o)}e.frames.push(o),i+=10,i+=s}while(i<n);this.trigger("data",e)}}}).prototype=new Q;var ae,re,se,oe,de=Vt,pe=Xt,he=Ht,le=188;(re=function(){var t=new Uint8Array(le),e=0;re.prototype.init.call(this),this.push=function(i){var n,a=0,r=le;for(e?((n=new Uint8Array(i.byteLength+e)).set(t.subarray(0,e)),n.set(i,e),e=0):n=i;r<n.byteLength;)71!==n[a]||71!==n[r]?(a++,r++):(this.trigger("data",n.subarray(a,r)),a+=le,r+=le);a<n.byteLength&&(t.set(n.subarray(a),0),e=n.byteLength-a)},this.flush=function(){e===le&&71===t[0]&&(this.trigger("data",t),e=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){e=0,this.trigger("reset")}}).prototype=new Q,(se=function(){var t,e,i,n;se.prototype.init.call(this),n=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,t=function(t,n){var a=0;
28n.payloadUnitStartIndicator&&(a+=t[a]+1),"pat"===n.type?e(t.subarray(a),n):i(t.subarray(a),n)},e=function(t,e){e.section_number=t[7],e.last_section_number=t[8],n.pmtPid=(31&t[10])<<8|t[11],e.pmtPid=n.pmtPid},i=function(t,e){var i,a;if(1&t[5]){for(n.programMapTable={video:null,audio:null,"timed-metadata":{}},i=3+((15&t[1])<<8|t[2])-4,a=12+((15&t[10])<<8|t[11]);a<i;){var r=t[a],s=(31&t[a+1])<<8|t[a+2];[Ft.H264_STREAM_TYPE,Ft.H265_STREAM_TYPE].indexOf(r)>-1&&null===n.programMapTable.video?n.programMapTable.video={pid:s,streamType:r,codec:ce[r]}:r!==Ft.ADTS_STREAM_TYPE&&r!==Ft.AC3_STREAM_TYPE&&r!==Ft.EC3_STREAM_TYPE||null!==n.programMapTable.audio?r===Ft.METADATA_STREAM_TYPE&&(n.programMapTable["timed-metadata"][s]=r):n.programMapTable.audio={pid:s,streamType:r,codec:ce[r]},a+=5+((15&t[a+3])<<8|t[a+4])}e.programMapTable=n.programMapTable}},this.push=function(e){var i={},n=4;if(i.payloadUnitStartIndicator=!!(64&e[1]),i.pid=31&e[1],i.pid<<=8,i.pid|=e[2],(48&e[3])>>>4>1&&(n+=e[n]+1),0===i.pid)i.type="pat",t(e.subarray(n),i),this.trigger("data",i);else if(i.pid===this.pmtPid)for(i.type="pmt",t(e.subarray(n),i),this.trigger("data",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([e,n,i]):this.processPes_(e,n,i)},this.processPes_=function(t,e,i){this.programMapTable.video&&i.pid===this.programMapTable.video.pid?i.streamType=this.programMapTable.video.streamType:this.programMapTable.audio&&i.pid===this.programMapTable.audio.pid?i.streamType=this.programMapTable.audio.streamType:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=t.subarray(e),i.data.length>0&&this.trigger("data",i)}}).prototype=new Q,se.STREAM_TYPES={h264:27,adts:15},(oe=function(){var t,e=this,i=!1,n={data:[],size:0},a={data:[],size:0},r={data:[],size:0},s={video:!1,audio:!1,metadata:!1},o={video:[],audio:[],"timed-metadata":[]},d=!0,p=function(t,e,i){var n,a=new Uint8Array(t.size),r={type:e,codec:t.codec},d=0,p=0,h=!1;if(t.data.length&&!(t.size<9)){for(r.trackId=t.data[0].pid,d=0;d<t.data.length;d++)n=t.data[d],a.set(n.data,p),p+=n.data.byteLength;if(function(t,e){var i,n=t[0]<<16|t[1]<<8|t[2];e.data=new Uint8Array,1===n&&(e.packetLength=6+(t[4]<<8|t[5]),e.dataAlignmentIndicator=!!(4&t[6]),192&(i=t[7])&&(e.pts=(14&t[9])<<27|(255&t[10])<<20|(254&t[11])<<12|(255&t[12])<<5|(254&t[13])>>>3,e.pts*=4,e.pts+=(6&t[13])>>>1,e.dts=e.pts,64&i&&(e.dts=(14&t[14])<<27|(255&t[15])<<20|(254&t[16])<<12|(255&t[17])<<5|(254&t[18])>>>3,e.dts*=4,e.dts+=(6&t[18])>>>1)),s[e.type]||(e.dts>e.pts?e.dts=0:s[e.type]=!0),e.data=t.subarray(9+t[8]))}(a,r),h="video"===e||r.packetLength<=t.size,(i||h)&&(t.size=0,t.data.length=0),h)o[e].push(r);else{var l=new ArrayBuffer(t.size),c=0;t.data.forEach((function(t){var e=t.data;t.data=new Uint8Array(l,c,e.length),t.data.set(e),c+=t.data.length}))}}};oe.prototype.init.call(this),this.push=function(s){({pat:function(){},pes:function(){var t,e;switch(s.streamType){case Ft.H264_STREAM_TYPE:case Ft.H265_STREAM_TYPE:(t=n).codec=ce[s.streamType],e="video";break;case Ft.ADTS_STREAM_TYPE:case Ft.AC3_STREAM_TYPE:case Ft.EC3_STREAM_TYPE:e="audio",(t=a).codec=ce[s.streamType];break;case Ft.METADATA_STREAM_TYPE:t=r,e="timed-metadata";break;default:return}s.payloadUnitStartIndicator&&p(t,e,!0),t.data.push(s),t.size+=s.data.byteLength},pmt:function(){var n={type:"metadata",tracks:[]};null!==(t=s.programMapTable).video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.video.pid,codec:t.video.codec,type:"video"}),null!==t.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.audio.pid,codec:t.audio.codec,type:"audio"}),i=!0,e.trigger("data",n)}})[s.type]()},this.reset=function(){n.size=0,n.data.length=0,a.size=0,a.data.length=0,this.trigger("reset")},this.flushStreams_=function(){p(n,"video"),p(a,"audio"),p(r,"timed-metadata"),d&&o.video.length>0&&o.audio.length>0&&(d=!1,this.handleInitialRollover_()),o.video.forEach((function(t){e.trigger("data",t)})),o.audio.forEach((function(t){e.trigger("data",t)})),o["timed-metadata"].forEach((function(t){e.trigger("data",t)})
vendor: 10,495 bytes, line 28
28),o.video=[],o.audio=[],o["timed-metadata"]=[]},this.handleInitialRollover_=function(){var t=o.video[0].dts>o.video[o.video.length-1].dts,e=o.audio[0].dts>o.audio[o.audio.length-1].dts;if(e&&!t)for(;0<o.audio.length&&o.audio[0].dts>pe;)o.audio[0].dts=o.audio[0].pts=0;else if(!e&&t)for(;0<o.video.length&&o.video[0].dts>pe;)o.video[0].dts=o.video[0].pts=0},this.flush=function(){if(!i&&t){var n={type:"metadata",tracks:[]};null!==t.video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.video.pid,codec:t.video.codec,type:"video"}),null!==t.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.audio.pid,codec:t.audio.codec,type:"audio"}),e.trigger("data",n)}i=!1,this.flushStreams_(),this.trigger("done")}}).prototype=new Q;var ce=((ae={})[Ft.H264_STREAM_TYPE]="avc",ae[Ft.H265_STREAM_TYPE]="hevc",ae[Ft.ADTS_STREAM_TYPE]="adts",ae[Ft.AC3_STREAM_TYPE]="ac3-family",ae[Ft.EC3_STREAM_TYPE]="ec-3",ae),ue={PAT_PID:0,MP2T_PACKET_LENGTH:le,TransportPacketStream:re,TransportParseStream:se,ElementaryStream:oe,TimestampRolloverStream:he,CaptionStream:Wt.CaptionStream,Cea608Stream:Wt.Cea608Stream,Cea708Stream:Wt.Cea708Stream,MetadataStream:de};for(var fe in Ft)Ft.hasOwnProperty(fe)&&(ue[fe]=Ft[fe]);var me,ge=ue,ye=ct,_e=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(me=function(t){var e,i=0;me.prototype.init.call(this),this.skipWarn_=function(t,e){this.trigger("log",{level:"warn",message:"adts skiping bytes "+t+" to "+e+" in frame "+i+" outside syncword"})},this.push=function(n){var a,r,s,o,d,p=0,h=!n.codec||"adts"===n.codec;if(t||(i=0),"audio"===n.type&&h){var l;for(e&&e.length?(s=e,(e=new Uint8Array(s.byteLength+n.data.byteLength)).set(s),e.set(n.data,s.byteLength)):e=n.data;p+7<e.length;)if(255===e[p]&&240==(246&e[p+1])){if("number"==typeof l&&(this.skipWarn_(l,p),l=null),r=2*(1&~e[p+1]),a=(3&e[p+3])<<11|e[p+4]<<3|(224&e[p+5])>>5,d=(o=1024*(1+(3&e[p+6])))*ye/_e[(60&e[p+2])>>>2],e.byteLength-p<a)break;this.trigger("data",{pts:n.pts+i*d,dts:n.dts+i*d,sampleCount:o,audioobjecttype:1+(e[p+2]>>>6&3),channelcount:(1&e[p+2])<<2|(192&e[p+3])>>>6,samplerate:_e[(60&e[p+2])>>>2],samplingfrequencyindex:(60&e[p+2])>>>2,samplesize:16,data:e.subarray(p+7+r,p+a)}),i++,p+=a}else"number"!=typeof l&&(l=p),p++;"number"==typeof l&&(this.skipWarn_(l,p),l=null),e=e.subarray(p)}},this.flush=function(){i=0,this.trigger("done")},this.reset=function(){e=void 0,this.trigger("reset")},this.endTimeline=function(){e=void 0,this.trigger("endedtimeline")}}).prototype=new Q;var Se=me,be=[48e3,44100,32e3],ve=[24e3,22050,16e3],Te=[1,2,3,6],we=[2,1,2,3,3,4,4,5],ke=function(t,e){if(e+8>t.length)return null;if(2935!=(t[e]<<8|t[e+1]))return null;var i=1+((7&t[e+2])<<8|t[e+3])<<1;if(e+i>t.length)return null;var n,a,r=t[e+4],s=t[e+5],o=r>>6&3;3===o?(n=ve[r>>4&3],a=3):(n=be[o],a=r>>4&3);var d=(14&r)>>1,p=1&r,h=Te[a];return{frameLength:i,sampleRate:n,channelCount:we[d]+p,sampleCount:256*h,numBlocks:h,acmod:d,lfeon:p,bsid:s>>3&31,fscod:o}},Ce=function t(){var e;t.prototype.init.call(this),this.push=function(t){var i,n,a=0,r=0,s=!t.codec||"ac3-family"===t.codec||"ec-3"===t.codec;if("audio"===t.type&&s){if(e){var o=e;(e=new Uint8Array(o.byteLength+t.data.byteLength)).set(o),e.set(t.data,o.byteLength)}else e=t.data;for(;a+8<e.length;)if(2935==(e[a]<<8|e[a+1])){if(!(i=ke(e,a)))break;n=9e4*i.sampleCount/i.sampleRate,this.trigger("data",{pts:t.pts+r*n,dts:t.dts+r*n,sampleCount:i.sampleCount,channelcount:i.channelCount,samplerate:i.sampleRate,samplesize:16,codec:i.bsid>10?"ec-3":"ac-3",acmod:i.acmod,lfeon:i.lfeon,bsid:i.bsid,fscod:i.fscod,data:e.subarray(a,a+i.frameLength)}),r++,a+=i.frameLength}else a++;e=a<e.length?e.subarray(a):void 0}},this.flush=function(){this.trigger("done")}};Ce.prototype=new Q;var Pe,Ae,Ee,xe=Ce,Ue=function(t){var e=t.byteLength,i=0,n=0;this.length=function(){return 8*e},this.bitsAvailable=function(){return 8*e+n},this.loadWord=function(){var a=t.byteLength-e,r=new Uint8Array(4),s=Math.min(4,e);if(0===s)throw new Error("no bytes available");r.set(t.subarray(a,a+s)),i=new DataView(r.buffer).getUint32(0),n=8*s,e-=s},this.skipBits=function(t){var a;n>t?(i<<=t,n-=t):(t-=n,t-=8*(a=Math.floor(t/8)),e-=a,this.loadWord(),i<<=t,n-=t)},this.readBits=function(t){var a=Math.min(n,t),r=i>>>32-a;return(n-=a)>0?i<<=a:e>0&&this.loadWord(),(a=t-a)>0?r<<a|this.readBits(a):r},this.skipLeadingZeros=function(){var t;for(t=0;t<n;++t)if(i&2147483648>>>t)return i<<=t,n-=t,t;return this.loadWord(),t+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var t=this.skipLeadingZeros();return this.readBits(t+1)-1},this.readExpGolomb=function(){var t=this.readUnsignedExpGolomb();return 1&t?1+t>>>1:-1*(t>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()},Me=[{chroma_format_idc:0,separate_colour_plane_flag:0,SubWidthC:1,SubHeightC:1},{chroma_format_idc:1,separate_colour_plane_flag:0,SubWidthC:2,SubHeightC:2},{chroma_format_idc:2,separate_colour_plane_flag:0,SubWidthC:2,SubHeightC:1},{chroma_format_idc:3,separate_colour_plane_flag:0,SubWidthC:1,SubHeightC:1},{chroma_format_idc:4,separate_colour_plane_flag:1,SubWidthC:1,SubHeightC:1}],Re=function(t,e,i,n){var a,r=0;if(i[e]=0,0!==e&&(r=t.readBits(1)),r)for(e===n&&t.skipUnsignedExpGolomb(),t.skipBits(1),t.skipUnsignedExpGolomb(),a=0;a<=i[e-1];a++)t.readBits(1)||t.skipBits(1);else{var s=t.readUnsignedExpGolomb(),o=t.readUnsignedExpGolomb();for(a=0;a<s;a++)t.skipUnsignedExpGolomb(),t.skipBits(1);for(a=0;a<o;a++)t.skipUnsignedExpGolomb(),t.skipBits(1)}},Ie=function(t,e,i,n){for(var a=0;a<i;a++)t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),n&&(t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb()),t.skipBits(1)},De=function(t,e){var i=0;return t.readBits(1)&&255===t.readUnsignedByte()&&t.skipBits(32),t.readBits(1)&&t.skipBits(1),t.readBits(1)&&(t.skipBits(4),t.readBits(1)&&t.skipBits(24)),t.readBits(1)&&(t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb()),t.skipBits(3),t.readBits(1)&&(t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb()),t.readBits(1)&&(t.skipBits(64),t.readBits(1)&&t.skipUnsignedExpGolomb(),t.readBits(1)&&function(t,e,i){var n=0,a=0,r=0;e&&(a=t.readBits(1),r=t.readBits(1),(a||r)&&((n=t.readBits(1))&&t.skipBits(19),t.skipBits(8),n&&t.skipBits(4),t.skipBits(15)));for(var s=0;s<=i;s++){var o=1,d=0,p=0;t.readBits(1)||(o=t.readBits(1)),o?t.skipUnsignedExpGolomb():d=t.readBits(1),d||(p=t.readUnsignedExpGolomb()),a&&Ie(t,0,p+1,n),r&&Ie(t,0,p+1,n)}}(t,1,e)),t.readBits(1)&&(t.skipBits(3),i=t.readUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb()),{min_spatial_segmentation_idc:i}},Oe=function(t){var e,i,n=new Ue(t),a=[],r=0,s=0,o=0,d=0,p=0,h=0,l=(i=n.readUnsignedByte())>>>1&7,c=1&i,u=function(t,e,i){var n,a,r,s,o,d,p,h=[],l=0,c=0;if(e)for(r=(a=t.readUnsignedByte())>>>6&3,s=a>>>5&1,o=31&a,d=t.readBits(32),n=0;n<6;n++)h.push(t.readUnsignedByte());for(p=t.readUnsignedByte(),n=0;n<i;n++)l|=t.readBits(1)<<n,c|=t.readBits(1)<<n;if(i>0)for(n=i;n<8;n++)t.skipBits(2);for(n=0;n<i;n++)l&1<<n&&t.skipBits(88),c&1<<n&&t.skipBits(8);return{general_profile_space:r,general_tier_flag:s,general_profile_idc:o,general_profile_compatibility_flags:d,general_constraint_indicator_flags_bytes:h,general_level_idc:p}}(n,1,l);n.skipUnsignedExpGolomb();var f=n.readUnsignedExpGolomb();3===f&&(r=n.readBits(1));var m=n.readUnsignedExpGolomb(),g=n.readUnsignedExpGolomb();n.readBits(1)&&(s=n.readUnsignedExpGolomb(),o=n.readUnsignedExpGolomb(),d=n.readUnsignedExpGolomb(),p=n.readUnsignedExpGolomb());var y=n.readUnsignedExpGolomb(),_=n.readUnsignedExpGolomb(),S=n.readUnsignedExpGolomb();for(e=n.readBits(1)?0:l;e<=l;e++)n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb();n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb(),n.readBits(1)&&n.readBits(1)&&function(t){for(var e=0;e<4;e++)for(var i=3===e?3:1,n=0;n<6;n+=i)if(t.readBits(1))t.skipUnsignedExpGolomb();else{e>1&&t.readExpGolomb();for(var a=Math.min(64,1<<4+(e<<1)),r=0;r<a;r++)t.readExpGolomb()}}(n),n.skipBits(1),n.skipBits(1),n.readBits(1)&&(n.skipBits(8),n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb(),n.skipBits(1));var b,v=n.readUnsignedExpGolomb();for(e=0;e<v;e++)Re(n,e,a,v);if(n.readBits(1)){var T=n.readUnsignedExpGolomb();for(e=0;e<T;e++)n.skipBits(S+4),n.skipBits(1)}for(n.skipBits(2),n.readBits(1)&&(h=De(n,l).min_spatial_segmentation_idc),e=0;e<Me.length;e++){var w=Me[e];w.chroma_format_idc===f&&w.separate_colour_plane_flag===r&&(b=w)}return{width:m-b.SubWidthC*(o+s),height:g-b.SubHeightC*(p+d),general_profile_space:u.general_profile_space,general_tier_flag:u.general_tier_flag,general_profile_idc:u.general_profile_idc,general_profile_compatibility_flags:u.general_profile_compatibility_flags,general_constraint_indicator_flags_bytes:u.general_constraint_indicator_flags_bytes,general_level_idc:u.general_level_idc,min_spatial_segmentation_idc:h,chroma_format_idc:f,bit_depth_luma_minus8:y,bit_depth_chroma_minus8:_,sps_max_sub_layers_minus1:l,sps_temporal_id_nesting_flag:c}};(Ae=function(){var t,e,i=0;Ae.prototype.init.call(this),this.push=function(n){var a;e?((a=new Uint8Array(e.byteLength+n.data.byteLength)).set(e),a.set(n.data,e.byteLength),e=a):e=n.data;for(var r=e.byteLength;i<r-3;i++)if(1===e[i+2]){t=i+5;break}for(;t<r;)switch(e[t]){case 0:if(0!==e[t-1]){t+=2;break}if(0!==e[t-2]){t++;break}i+3!==t-2&&this.trigger("data",e.subarray(i+3,t-2));do{t++}while(1!==e[t]&&t<r);i=t-2,t+=3;break;case 1:if(0!==e[t-1]||0!==e[t-2]){t+=3;break}this.trigger("data",e.subarray(i+3,t-2)),i=t-2,t+=3;break;default:t+=3}e=e.subarray(i),t-=i,i=0},this.reset=function(){e=null,i=0,this.trigger("reset")},this.flush=function(){e&&e.byteLength>3&&this.trigger("data",e.subarray(i+3)),e=null,i=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new Q,Ee={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(Pe=function(){var t,e,i,n,a,r,s,o,d=new Ae;Pe.prototype.init.call(this),t=this,this.push=function(t){"video"===t.type&&(e=t.trackId,i=t.codec,n=t.pts,a=t.dts,d.push(t))},d.on("data",
vendor: 3,295 bytes, line 28
28(function(o){var d={trackId:e,pts:n,dts:a,data:o,nalUnitTypeCode:"avc"===i?31&o[0]:o[0]>>>1&63};if("avc"===i){switch(d.nalUnitTypeCode){case 5:d.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:d.nalUnitType="sei_rbsp",d.escapedRBSP=r(o.subarray(1));break;case 7:d.nalUnitType="seq_parameter_set_rbsp",d.escapedRBSP=r(o.subarray(1)),d.config=s(d.escapedRBSP);break;case 8:d.nalUnitType="pic_parameter_set_rbsp";break;case 9:d.nalUnitType="access_unit_delimiter_rbsp"}0!==d.nalUnitTypeCode&&t.trigger("data",d)}else if("hevc"===i){switch(d.nalUnitTypeCode){case 19:case 20:d.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 39:d.nalUnitType="sei_rbsp",d.escapedRBSP=r(o.subarray(2));break;case 32:d.nalUnitType="vid_parameter_set_rbsp";break;case 33:d.nalUnitType="seq_parameter_set_rbsp",d.escapedRBSP=r(o.subarray(2)),d.config=Oe(d.escapedRBSP);break;case 34:d.nalUnitType="pic_parameter_set_rbsp";break;case 35:d.nalUnitType="access_unit_delimiter_rbsp"}t.trigger("data",d)}})),d.on("done",(function(){t.trigger("done")})),d.on("partialdone",(function(){t.trigger("partialdone")})),d.on("reset",(function(){t.trigger("reset")})),d.on("endedtimeline",(function(){t.trigger("endedtimeline")})),this.flush=function(){d.flush()},this.partialFlush=function(){d.partialFlush()},this.reset=function(){d.reset()},this.endTimeline=function(){d.endTimeline()},o=function(t,e){var i,n=8,a=8;for(i=0;i<t;i++)0!==a&&(a=(n+e.readExpGolomb()+256)%256),n=0===a?n:a},r=function(t){for(var e,i,n=t.byteLength,a=[],r=1;r<n-2;)0===t[r]&&0===t[r+1]&&3===t[r+2]?(a.push(r+2),r+=2):r++;if(0===a.length)return t;e=n-a.length,i=new Uint8Array(e);var s=0;for(r=0;r<e;s++,r++)s===a[0]&&(s++,a.shift()),i[r]=t[s];return i},s=function(t){var e,i,n,a,r,s,d,p,h,l,c,u,f=0,m=0,g=0,y=0,_=[1,1];if(i=(e=new Ue(t)).readUnsignedByte(),a=e.readUnsignedByte(),n=e.readUnsignedByte(),e.skipUnsignedExpGolomb(),Ee[i]&&(3===(r=e.readUnsignedExpGolomb())&&e.skipBits(1),e.skipUnsignedExpGolomb(),e.skipUnsignedExpGolomb(),e.skipBits(1),e.readBoolean()))for(c=3!==r?8:12,u=0;u<c;u++)e.readBoolean()&&o(u<6?16:64,e);if(e.skipUnsignedExpGolomb(),0===(s=e.readUnsignedExpGolomb()))e.readUnsignedExpGolomb();else if(1===s)for(e.skipBits(1),e.skipExpGolomb(),e.skipExpGolomb(),d=e.readUnsignedExpGolomb(),u=0;u<d;u++)e.skipExpGolomb();if(e.skipUnsignedExpGolomb(),e.skipBits(1),p=e.readUnsignedExpGolomb(),h=e.readUnsignedExpGolomb(),0===(l=e.readBits(1))&&e.skipBits(1),e.skipBits(1),e.readBoolean()&&(f=e.readUnsignedExpGolomb(),m=e.readUnsignedExpGolomb(),g=e.readUnsignedExpGolomb(),y=e.readUnsignedExpGolomb()),e.readBoolean()&&e.readBoolean()){switch(e.readUnsignedByte()){case 1:_=[1,1];break;case 2:_=[12,11];break;case 3:_=[10,11];break;case 4:_=[16,11];break;case 5:_=[40,33];break;case 6:_=[24,11];break;case 7:_=[20,11];break;case 8:_=[32,11];break;case 9:_=[80,33];break;case 10:_=[18,11];break;case 11:_=[15,11];break;case 12:_=[64,33];break;case 13:_=[160,99];break;case 14:_=[4,3];break;case 15:_=[3,2];break;case 16:_=[2,1];break;case 255:_=[e.readUnsignedByte()<<8|e.readUnsignedByte(),e.readUnsignedByte()<<8|e.readUnsignedByte()]}_&&(_[0],_[1])}return{profileIdc:i,levelIdc:n,profileCompatibility:a,width:16*(p+1)-2*f-2*m,height:(2-l)*(h+1)*16-2*g-2*y,sarRatio:_}}}).prototype=new Q;
28var Le,Be={H26XStream:Pe,NalByteStream:Ae},Ge=function(t,e){var i=t[e+6]<<21|t[e+7]<<14|t[e+8]<<7|t[e+9];return i=i>=0?i:0,(16&t[e+5])>>4?i+20:i+10},We=function t(e,i){return e.length-i<10||e[i]!=="I".charCodeAt(0)||e[i+1]!=="D".charCodeAt(0)||e[i+2]!=="3".charCodeAt(0)?i:t(e,i+=Ge(e,i))},Fe=function(t){var e=We(t,0);return t.length>=e+2&&!(255&~t[e])&&!(240&~t[e+1])&&16==(22&t[e+1])},Ne=Ge,ze=function(t,e){var i=(224&t[e+5])>>5,n=t[e+4]<<3;return 6144&t[e+3]|n|i};(Le=function(){var t=new Uint8Array,e=0;Le.prototype.init.call(this),this.setTimestamp=function(t){e=t},this.push=function(i){var n,a,r,s,o=0,d=0;for(t.length?(s=t.length,(t=new Uint8Array(i.byteLength+s)).set(t.subarray(0,s)),t.set(i,s)):t=i;t.length-d>=3;)if(t[d]!=="I".charCodeAt(0)||t[d+1]!=="D".charCodeAt(0)||t[d+2]!=="3".charCodeAt(0))if(255&~t[d]||240&~t[d+1])d++;else{if(t.length-d<7)break;if(d+(o=ze(t,d))>t.length)break;r={type:"audio",data:t.subarray(d,d+o),pts:e,dts:e,trackId:9999},this.trigger("data",r),d+=o}else{if(t.length-d<10)break;if(d+(o=Ne(t,d))>t.length)break;a={type:"timed-metadata",data:t.subarray(d,d+o)},this.trigger("data",a),d+=o}n=t.length-d,t=n>0?t.subarray(d):new Uint8Array},this.reset=function(){t=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){t=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new Q;var Ye,je=Le,Ve=Ne,He=function t(e,i){return e.length-i<10||e[i]!=="I".charCodeAt(0)||e[i+1]!=="D".charCodeAt(0)||e[i+2]!=="3".charCodeAt(0)?i:t(e,i+=Ve(e,i))},Xe={isLikelyEc3Data:function(t){var e=He(t,0);return t.length>=e+2&&11===t[e]&&119===t[e+1]},parseEc3FrameSize:function(t,e){return e+4>t.length?null:1+((7&t[e+2])<<8|t[e+3])<<1},parseId3TagSize:Ve};(Ye=function(){var t=new Uint8Array,e=0;Ye.prototype.init.call(this),this.setTimestamp=function(t){e=t},this.push=function(i){var n,a,r,s=0,o=0;if(t.length){var d=t;(t=new Uint8Array(i.byteLength+d.length)).set(d),t.set(i,d.length)}else t=i;for(;t.length-o>=3;)if(t[o]!=="I".charCodeAt(0)||t[o+1]!=="D".charCodeAt(0)||t[o+2]!=="3".charCodeAt(0))if(t.length-o>=2&&2935==(t[o]<<8|t[o+1])){for(var p=o;o<t.length-1&&2935==(t[o]<<8|t[o+1])&&(s=Xe.parseEc3FrameSize(t,o))&&!(o+s>t.length);)o+=s;if(o===p)break;r={type:"audio",data:t.subarray(p,o),pts:e,dts:e,trackId:9998},this.trigger("data",r)}else o++;else{if(t.length-o<10)break;if(o+(s=Xe.parseId3TagSize(t,o))>t.length)break;a={type:"timed-metadata",data:t.subarray(o,o+s)},this.trigger("data",a),o+=s}n=t.length-o,t=n>0?t.subarray(o):new Uint8Array},this.reset=function(){t=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){t=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new Q;var qe,Ke,Ze,$e,Je=Ye,Qe=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize","baseMediaDecodeTime","segmentDuration"],ti=["codec","channelcount","samplerate","samplesize","acmod","lfeon","bsid","fscod","baseMediaDecodeTime","segmentDuration"],ei=["width","height","sarRatio","baseMediaDecodeTime","segmentDuration"],ii=xe,ni=Be.H26XStream,ai=Fe,ri=Xe.isLikelyEc3Data,si=ct,oi=function(t){return"ec-3"===t||"ac-3"===t||"ac3-family"===t},di=function(t,e){e.stream=t,this.trigger("log",e)},pi=function(t,e){for(var i=Object.keys(e),n=0;n<i.length;n++){var a=i[n];"headOfPipeline"!==a&&e[a].on&&e[a].on("log",di.bind(t,a))}},hi=function(t,e){var i;if(t.length!==e.length)return!1;for(i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0},li=function(t,e,i,n,a,r){return{start:{dts:t,pts:t+(i-e)},end:{dts:t+(n-e),pts:t+(a-i)},prependedContentDuration:r,baseMediaDecodeTime:t}};(Ke=function(t,e){var i,n=[],a=0,r=1/0;i=(e=e||{}).firstSequenceNumber||0,Ke.prototype.init.call(this),this.push=function(e){Tt(t,e),t&&(oi(t.codec)?ti:Qe).forEach((function(i){t[i]=e[i]})),n.push(e)},this.setVideoBaseMediaDecodeTime=function(t){r=t},this.setAudioAppendStart=function(t){a=t},this.flush=function(){var s,o,d,p,h;if(0!==n.length){if(t.baseMediaDecodeTime=vt(t,e.keepOriginalTimestamps),h=gt(t,n,a,r),t.samples=yt(n),o=z.mdat(_t(n)),s=z.moof(i,[t]),d=new Uint8Array(s.byteLength+o.byteLength),i++,d.set(s),d.set(o,s.byteLength),bt(t),n.length){p=0;for(var l=0;l<n.length;l++){var c=n[l].sampleCount||1024;p+=Math.ceil(si*c/t.samplerate)}this.trigger("segmentTimingInfo",li(ut(t.baseMediaDecodeTime,t.samplerate),n[0].dts,n[0].pts,n[0].dts+p,n[0].pts+p,h||0)),this.trigger("timingInfo",{start:n[0].pts,end:n[0].pts+p})}n=[],this.trigger("data",{track:t,boxes:d}),this.trigger("done","AudioSegmentStream")}else this.trigger("done","AudioSegmentStream")},this.reset=function(){bt(t),n=[],this.trigger("reset")}}).prototype=new Q,(qe=function(t,e){var i,n,a,r,s=[],o=[];i=(e=e||{}).firstSequenceNumber||0,qe.prototype.init.call(this),delete t.minPTS,this.gopCache_=[],this.push=function(e){Tt(t,e),"seq_parameter_set_rbsp"!==e.nal
vendor: 4,250 bytes, line 28
28UnitType||n||(n=e.config,t.sps=[e.data],t.parsedSps=n,ei.forEach((function(e){t[e]=n[e]}),this)),"pic_parameter_set_rbsp"!==e.nalUnitType||a||(a=e.data,t.pps=[e.data]),"vid_parameter_set_rbsp"!==e.nalUnitType||r||(r=e.data,t.vps=[e.data]),s.push(e)},this.flush=function(){for(var n,a,r,d,p,h,l,c,u=0;s.length&&"access_unit_delimiter_rbsp"!==s[0].nalUnitType;)s.shift();if(0===s.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=et(s),(r=it(n))[0][0].keyFrame?t.isCurrentSegmentStartingWithKeyframe=!0:(a=this.getGopForFusion_(s[0],t),t.isCurrentSegmentStartingWithKeyframe=!1,a?(u=a.duration,r.unshift(a),r.byteLength+=a.byteLength,r.nalCount+=a.nalCount,r.pts=a.pts,r.dts=a.dts,r.duration+=a.duration):r=nt(r)),o.length){var f;if(!(f=e.alignGopsAtEnd?this.alignGopsAtEnd_(r):this.alignGopsAtStart_(r)))return this.gopCache_.unshift({gop:r.pop(),pps:t.pps,sps:t.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");bt(t),r=f}Tt(t,r),t.samples=at(r),p=z.mdat(rt(r)),t.baseMediaDecodeTime=vt(t,e.keepOriginalTimestamps),this.trigger("processedGopsInfo",r.map((function(t){return{pts:t.pts,dts:t.dts,byteLength:t.byteLength}}))),l=r[0],c=r[r.length-1],this.trigger("segmentTimingInfo",li(t.baseMediaDecodeTime,l.dts,l.pts,c.dts+c.duration,c.pts+c.duration,u)),this.trigger("timingInfo",{start:r[0].pts,end:r[r.length-1].pts+r[r.length-1].duration}),this.gopCache_.unshift({gop:r.pop(),pps:t.pps,sps:t.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.trigger("baseMediaDecodeTime",t.baseMediaDecodeTime),this.trigger("timelineStartInfo",t.timelineStartInfo),d=z.moof(i,[t]),h=new Uint8Array(d.byteLength+p.byteLength),i++,h.set(d),h.set(p,d.byteLength),this.trigger("data",{track:t,boxes:h}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),s=[],this.gopCache_.length=0,o.length=0,this.trigger("reset")},this.resetStream_=function(){bt(t),n=void 0,a=void 0},this.getGopForFusion_=function(e){var i,n,a,r,s,o,d=1/0;for(o=0;o<this.gopCache_.length;o++)r=(s=this.gopCache_[o]).gop,t.pps&&s.pps&&hi(t.pps[0],s.pps[0])&&t.sps&&s.sps&&hi(t.sps[0],s.sps[0])&&(r.dts<t.timelineStartInfo.dts&&(a=t.timelineStartInfo.dts-t.timelineStartInfo.baseMediaDecodeTime,r.dts<a)||(i=e.dts-r.dts-r.duration)>=-1e4&&i<=45e3&&(!n||d>i)&&(n=s,d=i));return n?n.gop:null},this.alignGopsAtStart_=function(t){var e,i,n,a,r,s,d,p;for(r=t.byteLength,s=t.nalCount,d=t.duration,e=i=0;e<o.length&&i<t.length&&(n=o[e],a=t[i],n.pts!==a.pts);)a.pts>n.pts?e++:(i++,r-=a.byteLength,s-=a.nalCount,d-=a.duration);return 0===i?t:i===t.length?null:((p=t.slice(i)).byteLength=r,p.duration=d,p.nalCount=s,p.pts=p[0].pts,p.dts=p[0].dts,p)},this.alignGopsAtEnd_=function(t){var e,i,n,a,r,s,d;for(e=o.length-1,i=t.length-1,r=null,s=!1;e>=0&&i>=0;){if(n=o[e],a=t[i],n.pts===a.pts){s=!0;break}n.pts>a.pts?e--:(e===o.length-1&&(r=i),i--)}if(!s&&null===r)return null;if(0===(d=s?i:r))return t;var p=t.slice(d),h=p.reduce((function(t,e){return t.byteLength+=e.byteLength,t.duration+=e.duration,t.nalCount+=e.nalCount,t}),{byteLength:0,duration:0,nalCount:0});return p.byteLength=h.byteLength,p.duration=h.duration,p.nalCount=h.nalCount,p.pts=p[0].pts,p.dts=p[0].dts,p},this.alignGopsWith=function(t){o=t}}).prototype=new Q,($e=function(t,e){this.numberOfTracks=0,this.metadataStream=e,void 0!==(t=t||{}).remux?this.remuxTracks=!!t.remux:this.remuxTracks=!0,"boolean"==typeof t.keepOriginalTimestamps?this.keepOriginalTimestamps=t.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,$e.prototype.init.call(this),this.push=function(t){return t.text?this.pendingCaptions.push(t):t.frames?this.pendingMetadata.push(t):(this.pendingTracks.push(t.track),this.pendingBytes+=t.boxes.byteLength,"video"===t.track.type&&(this.videoTrack=t.track,this.pendingBoxes.push(t.boxes)),void("audio"===t.track.type&&(this.audioTrack=t.track,this.pendingBoxes.unshift(t.boxes))))}}).prototype=new Q,$e.prototype.flush=function(t){var e,i,n,a,r=0,s={captions:[],captionStream
28s:{},metadata:[],info:{}},o=0,d=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==t&&"AudioSegmentStream"!==t)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?(o=this.videoTrack.timelineStartInfo.pts,d=this.videoTrack.timelineStartInfo.baseMediaDecodeTime,ei.forEach((function(t){s.info[t]=this.videoTrack[t]}),this),s.info.codec=this.videoTrack.codec,s.info.sps=this.videoTrack.parsedSps?Y({},this.videoTrack.parsedSps):null,s.info.startsWithKeyframe=this.videoTrack.isCurrentSegmentStartingWithKeyframe,s.info.trackId=this.videoTrack.id,s.info.timelineStartInfo=this.videoTrack.timelineStartInfo):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,d=this.audioTrack.timelineStartInfo.baseMediaDecodeTime,(oi(this.audioTrack.codec)?ti:Qe).forEach((function(t){s.info[t]=this.audioTrack[t]}),this),s.info.trackId=this.audioTrack.id,s.info.timelineStartInfo=this.audioTrack.timelineStartInfo,s.info.startsWithKeyframe=!0),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type="combined",this.emittedTracks+=this.pendingTracks.length,n=z.initSegment(this.pendingTracks),s.initSegment=new Uint8Array(n.byteLength),s.initSegment.set(n),s.data=new Uint8Array(this.pendingBytes),a=0;a<this.pendingBoxes.length;a++)s.data.set(this.pendingBoxes[a],r),r+=this.pendingBoxes[a].byteLength;for(a=0;a<this.pendingCaptions.length;a++)(e=this.pendingCaptions[a]).startTime=mt(e.startPts+d,o,this.keepOriginalTimestamps),e.endTime=mt(e.endPts+d,o,this.keepOriginalTimestamps),s.captionStreams[e.stream]=!0,s.captions.push(e);for(a=0;a<this.pendingMetadata.length;a++)(i=this.pendingMetadata[a]).cueTime=mt(i.pts+d,o,this.keepOriginalTimestamps),s.metadata.push(i);for(s.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",s),a=0;a<s.captions.length;a++)e=s.captions[a],this.trigger("caption",e);for(a=0;a<s.metadata.length;a++)i=s.metadata[a],this.trigger("id3Frame",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},$e.prototype.setRemux=function(t){this.remuxTracks=t},(Ze=function(t){var e,i,n=this;Ze.prototype.init.call(this),t=t||{},this.baseMediaDecodeTime=t.baseMediaDecodeTime||0,this.activeCaptionStream=null,this.setupAacPipeline=function(){var a={};return this.aacTransmuxPipeline=a,a.type="aac",a.hasFlushed=!0,a.metadataStream=new ge.MetadataStream,a.aacStream=new je,a.audioTimestampRolloverStream=new ge.TimestampRolloverStream("audio"),a.timedMetadataTimestampRolloverStream=new ge.TimestampRolloverStream("timed-metadata"),a.adtsStream=new Se,a.coalesceStream=new $e(t,a.metadataStream),a.headOfPipeline=a.aacStream,a.aacStream.pipe(a.audioTimestampRolloverStream).pipe(a.adtsStream),a.aacStream.pipe(a.timedMetadataTimestampRolloverStream).pipe(a.metadataStream).pipe(a.coalesceStream),a.metadataStream.on("timestamp",(function(t){a.aacStream.setTimestamp(t.timeStamp)})),a.aacStream.on("data",(function(r){"timed-metadata"!==r.type&&"audio"!==r.type||a.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:n.baseMediaDecodeTime},codec:"adts",type:"audio",id:9999},a.coalesceStream.numberOfTracks++,a.audioSegmentStream=new Ke(i,t),a.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")),a.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),a.adtsStream.pipe(a.audioSegmentStream).pipe(a.coalesceStream),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!e}))})),a.coalesceStream.on("data",this.trigger.bind(this,"data")),a.coalesceStream.on("done",this.trigger.bind(this,"done")),pi(this,a),a},this.setupEc3Pipeline=function(){var a={};return this.ec3TransmuxPipeline=a,a.type="ec3",a.hasFlushed=!0,a.metadataStream=new ge.MetadataStream,a.ec3RawStream=new Je,a.audioTimestampRolloverStream=new ge.TimestampRolloverStream("audio"),a.timedMetadataTimestampRolloverStream=new ge.TimestampRolloverStream("timed-metadata"),a.ac3Stream=new ii,a.coalesceStream=new $e(t,a.metadataStream),a.headOfPipeline=a.ec3RawStream,a.ec3RawStream.pipe(a.audioTimestampRolloverStream).pipe(a.ac3Stream),a.ec3RawStream.pipe(a.timedMetadataTimestampRolloverStream).pipe(a.metadataStream).pipe(a.coalesceStream),a.metadataStream.on("timestamp",(function(t){a.ec3RawStream.setTimestamp(t.timeStamp)})),a.ec3RawStream.on("data",(function(r){"timed-metadata"!==r.type&&"audio"!==r.type||a.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:n.baseMediaDecodeTime},codec:"ec-3",type:"audio",id:9998},a.coalesceStream.numberOfTracks++,a.audioSegmentStream=new Ke(i,t),a.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")),a.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),a.ac3Stream.pipe(a.audioSegmentStream).pipe(a.coalesceStream),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!e}))})),a.coalesceStream.on("data",this.trigger.bind(this,"data")),a.coalesceStream.on("done",this.trigger.bind(this,"done")),pi(this,a),a},this.setupTsPipeline=function(){var a={};return this.tsTransmuxPipeline=a,a.type="ts",a.hasFlushed=!0,a.metadataStream=new ge.MetadataStream,a.packetStream=new ge.TransportPacketStream,a.parseStream=new ge.TransportParseStream,a.elementaryStream=new ge.ElementaryStream,a.timestampRolloverStream=new ge.TimestampRolloverStream,a.adtsStream=new Se,a.ac3Stream=new ii,a.h26xStream=new ni,a.captionStream=new ge.CaptionStream(t),a.coalesceStream=new $e(t,a.metadataStream),a.headOfPipeline=a.packetStream,this.activeCaptionStream=a.captionStream,a.packetStream.pipe(a.parseStream).pipe(a.elementaryStream).pipe(a.timestampRolloverStream),a.timestampRolloverStream.pipe(a.h26xStream),a.timestampRolloverStream.pipe(a.adtsStream),a.timestampRolloverStream.pipe(a.ac3Stream),a.timestampRolloverStream.pipe(a.metadataStream).pipe(a.coalesceStream),a.h26xStream.pipe(a.captionStream).pipe(a.coalesceStream),a.elementaryStream.on("data",(function(r){var s;if("metadata"===r.type){for(s=r.tracks.length;s--;)e||"video"!==r.tracks[s].type?i||"audio"!==r.tracks[s].type||(i=r.tracks[s],e&&!t.keepOriginalTimestamps?i.timelineStartInfo=e.timelineStartInfo:i.timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime):(e=r.tracks[s]).timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime;e&&!a.videoSegmentStream&&(a.coalesceStream.numberOfTracks++,a.videoSegmentStream=new qe(e,t),a.videoSegmentStream.on("log",n.getLogTrigger_("videoSegmentStream")),a.videoSegmentStream.on("timelineStartInfo",(function(e){i&&a.audioSegmentStream&&!t.keepOriginalTimestamps&&(i.timelineStartInfo=e)})),a.videoSegmentStream.on("processedGopsInfo",n.trigger.bind(n,"gopInfo")),a.videoSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"videoSegmentTimingInfo")),a.videoSegmentStream.on("baseMediaDecodeTime",(function(t){i&&a.audioSegmentStream&&a.audioSegmentStream.setVideoBaseMediaDecodeTime(t)})),a.videoSegmentStream.on("timingInfo",n.trigger.bind(n,"videoTimingInfo")),a.h26xStream.pipe(a.videoSegmentStream).pipe(a.coalesceStream)),i&&!a.audioSegmentStream&&(a.coalesceStream.numberOfTracks++,a.audioSegmentStream=new Ke(i,t),a.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")),a.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),a.audioSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"audioSegmentTimingInfo")),(oi(i.codec)?a.ac3Stream:a.adtsStream).pipe(a.audioSegmentStream).pipe(a.coalesceStream)),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!e})}})),a.coalesceStream.on("data",this.trigger.bind(this,"data")),a.coalesceStream.on("id3Frame",(function(t){t.dispatchType=a.metadataStream.dispatchType,n.trigger("id3Frame",t)})),a.coalesceStream.on("caption",this.trigger.bind(this,"caption")),a.coalesceStream.on("done",this.trigger.bind(this,"done")),pi(this,a),a},this.setBaseMediaDecodeTime=function(n){t.keepOriginalTimestamps||(this.baseMediaDecodeTime=n),this.getAllPipelines().forEac
28h((function(a){i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,t.keepOriginalTimestamps||(i.timelineStartInfo.baseMediaDecodeTime=n),bt(i),a.audioTimestampRolloverStream&&a.audioTimestampRolloverStream.discontinuity()),e&&(a.videoSegmentStream&&(a.videoSegmentStream.gopCache_=[]),e.timelineStartInfo.dts=void 0,e.timelineStartInfo.pts=void 0,t.keepOriginalTimestamps||(e.timelineStartInfo.baseMediaDecodeTime=n),bt(e),a.captionStream&&a.captionStream.reset()),a.timestampRolloverStream&&a.timestampRolloverStream.discontinuity()}))},this.setAudioAppendStart=function(t){this.getAllPipelines().forEach((function(e){i&&e.audioSegmentStream&&e.audioSegmentStream.setAudioAppendStart(t)}))},this.setRemux=function(e){t.remux=e,this.getAllPipelines().forEach((function(t){t.coalesceStream&&t.coalesceStream.setRemux(e)}))},this.alignGopsWith=function(t){e&&this.tsTransmuxPipeline.videoSegmentStream&&this.tsTransmuxPipeline.videoSegmentStream.alignGopsWith(t)},this.getLogTrigger_=function(t){var e=this;return function(i){i.stream=t,e.trigger("log",i)}},this.push=function(t){var e;ai(t)?(this.aacTransmuxPipeline=this.aacTransmuxPipeline||this.setupAacPipeline(),e=this.aacTransmuxPipeline):ri(t)?(this.ec3TransmuxPipeline=this.ec3TransmuxPipeline||this.setupEc3Pipeline(),e=this.ec3TransmuxPipeline):(this.tsTransmuxPipeline=this.tsTransmuxPipeline||this.setupTsPipeline(),e=this.tsTransmuxPipeline),e.hasFlushed=!1,e.headOfPipeline.push(t)},this.flush=function(){this.getAllPipelines().filter((function(t){return!t.hasFlushed})).forEach((function(t){t.hasFlushed=!0,t.headOfPipeline.flush()}))},this.endTimeline=function(){this.getAllPipelines().forEach((function(t){t.headOfPipeline&&t.headOfPipeline.endTimeline()}))},this.reset=function(){this.getAllPipelines().forEach((function(t){t.headOfPipeline&&t.headOfPipeline.reset()}))},this.resetCaptions=function(){this.tsTransmuxPipeline&&this.tsTransmuxPipeline.captionStream.reset()},this.getAllPipelines=function(){return[this.tsTransmuxPipeline,this.aacTransmuxPipeline,this.ec3TransmuxPipeline].filter((function(t){return Boolean(t)}))}}).prototype=new Q;var ci={Transmuxer:Ze,VideoSegmentStream:qe,AudioSegmentStream:Ke,AAC_AUDIO_PROPERTIES:Qe,AC3_AUDIO_PROPERTIES:ti,VIDEO_PROPERTIES:ei,CaptionStream:ge.CaptionStream,generateSegmentTimingInfo:li};return{generator:z,Transmuxer:ci.Transmuxer,AudioSegmentStream:ci.AudioSegmentStream,VideoSegmentStream:ci.VideoSegmentStream,CaptionStream:ci.CaptionStream}}()}()},499:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayIncludesPolyfill=void 0,e.ArrayIncludesPolyfill=function(){return{polyfill:function(){Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(null==this)throw new TypeError(\'"this" is null or not defined\');var i=Object(this),n=i.length>>>0;if(0===n)return!1;var a=0|e,r=Math.max(a>=0?a:n-Math.abs(a),0);function s(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)}for(;r<n;){if(s(i[r],t))return!0;r++}return!1}})}}}()},878:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringEndsWithPolyfill=void 0,e.StringEndsWithPolyfill=function(){return{polyfill:function(){String.prototype.endsWith=function(t,e){if(null==t)return!1;var i=this.length;return null!=e&&(i=Math.min(e,this.length)),this.substring(i-t.length,i)===t}}}}()},205:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringIncludesPolyfill=void 0,e.StringIncludesPolyfill=function(){return{polyfill:function(){String.prototype.includes=function(t,e){return"number"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)}}}}()},829:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringStartsWithPolyfill=void 0,e.StringStartsWithPolyfill=function(){return{polyfill:function(){String.prototype.startsWith=function(t,e){var i=e>0?0|e:0;return this.substring(i,i+t.length)===t}}}}()},956:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assembleCaption=function(t){return{start:a(t)?t.startTime:t.startPts/n.MP2TS_TIMESCALE,end:a(t)?t.endTime:t.endPts/n.MP2TS_TIMESCALE,text:t.text,channel:t.stream,position:t.position}};var n=i(226);function a(t){return"startTime"in t}}
28,226:function(t,e,i){"use strict";var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.TransmuxerMessageHandler=e.MP2TS_TIMESCALE=void 0,e.getContext=function(){return a||p()};var a,r=i(48),s=i(599),o=i(741),d=i(956);function p(){var t=new o.WebWorkerContext(h);return onmessage=t.onMessageCallback,t}e.MP2TS_TIMESCALE=9e4;var h=function(t){function i(i,n){var a=t.call(this,i,n)||this;return a.b=!1,a.push=function(t){a.c=t.data,a.a.push(new Uint8Array(t.data))},a.flush=function(){a.a.flush()},a.initCaptionParser=function(){a.a.setupTsPipeline(),a.g()},a.pushCaptions=function(t){a.e((function(e){a.b=!1,t.data.forEach((function(t){return e.push(t)}))}))},a.flushCaptions=function(){a.e((function(t){return t.flush()}))},a.resetCaptions=function(){a.e((function(t){return t.reset()}))},a.setTimestampOffset=function(t){var i=t.offset;a.a.setBaseMediaDecodeTime(Math.round(i*e.MP2TS_TIMESCALE))},a.setAudioAppendStart=function(t){a.a.setAudioAppendStart(t.appendStart*e.MP2TS_TIMESCALE,t.trackId)},a.reset=function(){a.d()},a.dispose=function(){a.a&&a.a.dispose()},a.f=function(t){t.on("data",(function(t){var e=t.data;a.runsInWebWorker?t.data=e.buffer:t.data=e.buffer.slice(0),t.captions=t.captions.map(d.assembleCaption),a.postMessageFunction({action:"data",segment:t,byteOffset:e.byteOffset,byteLength:e.byteLength},[t.data])})),t.on("done",(function(){a.c&&a.postMessageFunction({action:"done",what:"transmuxing",originalSegment:a.c},[a.c])}))},a.g=function(){a.e((function(t){t.on("data",(function(t){a.postMessageFunction({action:"caption",caption:(0,d.assembleCaption)(t)})})),t.on("done",(function(){a.b||(a.b=!0,a.postMessageFunction({action:"done",what:"captions"}))}))}))},a.d(),a}return n(i,t),i.prototype.d=function(){this.dispose(),this.a=new r.Transmuxer({remux:!1}),this.f(this.a)},i.prototype.e=function(t){var e,i=null===(e=this.a)||void 0===e?void 0:e.activeCaptionStream;i&&t(i)},i}(s.MessageHandler);e.TransmuxerMessageHandler=h,"undefined"==typeof window&&(a=p())},599:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageHandler=void 0;var i=function(){return function(t,e){this.runsInWebWorker=t,this.postMessageFunction=e}}();e.MessageHandler=i},741:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebWorkerContext=void 0;var n=i(41),a=function(){return function(t){var e=this;this.i="undefined"==typeof window,this.onmessage=null,this.j=function(t,i){e.i?postMessage(t,i):"function"==typeof e.onmessage&&setTimeout((function(){e.onmessage({data:t})}),0)},this.postMessage=function(t){setTimeout((function(){e.onMessageCallback({data:t})}),0)},this.terminate=function(){},this.onMessageCallback=function(t){t.data.action&&t.data&&e.h[t.data.action]&&e.h[t.data.action](t.data)},this.i&&(0,n.installWorkerPolyfills)(),this.h=new t(this.i,this.j)}}();e.WebWorkerContext=a},41:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.installWorkerPolyfills=function(){Array.prototype.includes||n.ArrayIncludesPolyfill.polyfill(),String.prototype.includes||r.StringIncludesPolyfill.polyfill(),String.prototype.startsWith||s.StringStartsWithPolyfill.polyfill(),String.prototype.endsWith||a.StringEndsWithPolyfill.polyfill()};var n=i(499),a=i(878),r=i(205),s=i(829)}},e={};!function i(n){var a=e[n];if(void 0!==a)return a.exports;var r=e[n]={exports:{}};return t[n].call(r.exports,r,r.exports,i),r.exports}(226)}();',d.p+"af97e37630fe11ab4c17.worker.js")}},21332:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.ContainerTsModuleDefinition=void 0;var p=d(62756),h=d(67889);u.ContainerTsModuleDefinition={name:p.ModuleName.ContainerTS,module:function(){return{WebWorkerTransmuxer:d(77869).WebWorkerTransmuxer,TransmuxerWorker:h.TransmuxerWorkerClass}}},u.default=u.ContainerTsModuleDefinition}
28,67889:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.TransmuxerWorkerClass=void 0,u.TransmuxerWorkerClass=d(72387)},77869:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.WebWorkerTransmuxer=void 0,u.isRawAAC=I;var h=d(66790),f=d(40306),m=d(3336),g=d(80813),v=d(15971),y=d(74853),b=d(34047),S=d(34841),_=d(70233),E=d(85434),T=d(88052),w=d(62756),P=d(87187),A=d(67889);u.WebWorkerTransmuxer=function(){function c(u,d){var p=this;this.Lx=[],this.Px={},this.Qx={},this.Tx=!1,this.Vx=function(){p.resetCaptionParser()},this.cx=function(u){u.data=c.makeSegmentSelfInitializing(u.initSegment,u.data);var d={id3:c.getId3Metadata(u),closedCaptions:u.captions};p.Ox.push({segment:u,metadata:d})},this.jx=function(c){var u,d=p.Lx.shift();if(d){if(d.mp2tsSegment.setData(c),p.Jx.logger.debug("Transmuxed",d.mp2tsSegment.getUrl()),p.Ox.length<1||0===Object.keys(p.Ox[0].segment.info).length)return d.rejectFn(h.TransmuxingRejectionReason.INVALID_TS_SEGMENT),void p.ix();if(d.mp2tsSegment.getSegmentInfo().discardData||d.discard)p.ix();else{p.kx(d),p.Ox.sort(function(c,u){return c.segment.info.trackId-u.segment.info.trackId});var f=p.Ox.map(function(c){return c.metadata}),m=null==(u=p.Jx.config.tweaks)?void 0:u.parse_cea_708_caption;f.forEach(function(c){c.closedCaptions=c.closedCaptions.filter(function(c){return m?c.channel.includes("708"):!c.channel.includes("708")})});var g=p.fx(p.Ox,d.mp2tsSegment);p.Tx&&g.length>1&&(p.Jx.logger.debug("Discarding muxed audio from video segment since there is a separate audio playlist."),g=g.filter(function(c){var u=c[0];return c[1],E.MimeTypeHelper.isVideo(u.getMimeType())})),g.forEach(function(c){var u,d=c[0],h=c[1];E.MimeTypeHelper.isAudio(d.getMimeType())&&(null==(u=p.Mx)||u.postMessage({action:"setAudioAppendStart",appendStart:function(c,u){var d=u.getTimescale();if(void 0===d)return 0/0;var p=c&&c.segment.info,h=p&&p.segmentDuration>0?p.segmentDuration/d:u.getDuration();return u.getBaseMediaDecodeTime()/d+h}(h,d),trackId:h.segment.info.trackId}))}),d.resolveFn({originalSegment:d.mp2tsSegment,transmuxedSegments:g.map(function(c){var u=c[0];return c[1],u}),metadata:f}),p.ix()}}},this.sx=function(u){if("done"!==u.data.action||"transmuxing"===u.data.what){var d=p.Nx[u.data.action];for(var h in d)if(d.hasOwnProperty(h))if("data"===u.data.action){var f=c.postProcessSegment(u.data.segment);d[h].call(p.Mx,f)}else"done"===u.data.action&&d[h].call(p.Mx,u.data.originalSegment)}},this.Jx=u,this.Kx=!1,this.Tx=d;try{this.Mx=new A.TransmuxerWorkerClass,this.Mx&&(this.Mx.onmessage=this.sx)}catch(c){this.Jx.eventHandler.fireError(new m.PlayerError(f.ErrorCode.PLAYBACK_HLS_COULD_NOT_LOAD_TRANSMUXER,{error:c},"There was an error during the transmuxer initialization.",this.Jx.sourceContext.sourceIdentifier))}this.Nx={},this.Ox=[],this.rx("data",this.cx),this.rx("done",this.jx)}return c.prototype.setShouldExpectSeparateAvSegments=function(c){this.Tx=c},c.prototype.waitForInitializationForDiscontinuity=function(c){return this.lx(c).promise},c.prototype.isSetupForDiscontinuity=function(c){return this.Sx===c},c.prototype.transmuxSegment=function(c){var u=this;return this.Ux(c).then(function(){return u.Zx(c)})},c.prototype.Ux=function(c){var u,d,p=c.getSegmentInfo().discontinuitySequenceNumber;if(null==p||null==c.getCodec()||E.MimeTypeHelper.isVideo(c.getMimeType())||!this.Tx||this.isSetupForDiscontinuity(p))return Promise.resolve();var h=null==(u=(0,v.getSourceState)(this.Jx))?void 0:u.hls,f=Object.keys(null!=(d=null==h?void 0:h.discontinuitySequenceTiming)?d:{}).filter(function(c){return E.MimeTypeHelper.isAV(c)}),m=T.ModuleManager.get(w.ModuleName.HLS).selectors.areDiscontinuitiesMisaligned;return h&&m(h,f,c.getDuration())?(this.Jx.logger.debug("[Transmuxer] Skipping delayed transmuxer initialization for disco ".concat(p," as discontinuities are misaligned")),Promise.resolve()):(this.Jx.logger.debug("[Transmuxer] Awaiting video segment to complete initialization for discontinuity ".concat(p)),this.waitForInitializationForDiscontinuity(p))},c.prototype.Wx=function(){var c=T.ModuleManager.get(w.ModuleName.HLS);this.Rx=new c.DiscontinuitySequenceNumberTracker(E.MimeTypeHelper.isVideo),this.Rx.subscribe(this.Vx)},c.prototype.Xx=function(c){this.Rx||this.Wx(),this.Rx.trackSegment(c)},c.prototype.Yx=function(){var c=this.Jx.sourceContext.sourceIdentifier,u=!1;return this.Jx.serviceManager.maybeCall(g.ServiceName.ManifestService,function(c){u=!!(c.getManifest()&&c.isHlsManifest()&&T.ModuleManager.has(w.ModuleName.HLS))},null,c),u},c.prototype.Zx=function(c){var u=this;return new Promise(function(d,p){var h={resolveFn:d,rejectFn:p,mp2tsSegment:c,discard:!1};u.Lx.push(h),u.Kx||(u.Kx=!0,u.bx(h))})},c.prototype.ax=function(c){return!(!E.MimeTypeHelper.isAudio(c.getMimeType())||this.Tx)&&I(c.getData())},c.prototype.bx=function(c){this.Jx.logger.debug("Transmuxing "+c.mp2tsSegment.getUrl()),this.Yx()&&this.Xx(c.mp2tsSegment);var u=c.mp2tsSegment.getSegmentInfo(),d=this.ax(c.mp2tsSegment),p=u.discontinuitySequenceNumber;if((d||!this.isSetupForDiscontinuity(p))&&null!=u.startTime){var h=u.startTime;d?this.Jx.logger.debug("[Transmuxer] Applying startTime offset to raw AAC, BMDT: ".concat(h," (").concat(9e4*h,")")):this.Jx.logger.debug("[Transmuxer] Initializing disco ".concat(p,", BMDT: ").concat(h," (").concat(9e4*h,")")),this.Sx=p,this.ox(h)}this.px(c.mp2tsSegment.getData()),this.qx()},c.makeSegmentSelfInitializing=function(c,u){return y.ArrayHelper.append(c,u)},c.prototype.dx=function(c){return c.sps?"avc"===c.codec?"avc1.".concat(_.FormatHelper.intToHex(c.sps.profileIdc)).concat(_.FormatHelper.intToHex(c.sps.profileCompatibility)).concat(_.FormatHelper.intToHex(c.sps.levelIdc)):"hevc"===c.codec?(0,b.assembleHvcCodecString)("hvc1",p(p({},c.sps),{general_profile_compatibility_flags:function(c){for(var u=[],d=0;d<32;d++)u.push(c>>>d&1);return parseInt(u.join(""),2)}(c.sps.general_profile_compatibility_flags)})):null:null},c.prototype.ex=function(c){return"audioobjecttype"in c?"mp4a.40.".concat(c.audioobjecttype):"bsid"in c?c.codec:""},c.prototype.fx=function(c,u){var d=this;return c.map(function(c){d.Jx.logger.debug("Got transmuxed "+c.segment.type,u.getUrl());var h,f=c.segment.type,m=c.segment.info,g="video"===f?9e4:m.samplerate,v=u.getSegmentInfo().presentationTimeOffset;h="video"===f?d.dx(m):d.ex(m),d.gx(c,u);
28var y=new P.Segment(c.segment.data.buffer,f+"/mp4",h,u.getPeriodId(),u.getDuration(),P.SegmentInitType.SELF_INIT,c.segment.info.startsWithKeyframe,u.getNetworkRequestSize(),u.getRepresentationId());return y.setTimescale(g),y.setUrl(u.getUrl()),y.setSegmentInfo(p(p({},u.getSegmentInfo()),{mimeType:y.getMimeType()})),y.setBaseMediaDecodeTime(m.baseMediaDecodeTime),void 0!==v?(y.setPresentationTimeOffset(v),y.setPlaybackTime(m.baseMediaDecodeTime/g-v)):y.setPlaybackTime(0/0),y.setDuration(d.hx(m,g,u.getDuration())),[y,c]})},c.prototype.gx=function(c,u){var d=this.Jx.serviceManager.get(g.ServiceName.SourceStoreService,this.Jx.sourceContext.sourceIdentifier),p=T.ModuleManager.get(w.ModuleName.HLS,!1);if(d&&p){var h=c.segment.info.timelineStartInfo.minSegmentPts%0x200000000,f=u.getPlaybackTime()-h/9e4;d.dispatch(p.actions.setTimestampRolloverPositions(f+95443.7176888889,f))}},c.prototype.hx=function(c,u,d){var p=c.segmentDuration/u;if(p){var h=Math.abs(d-p);return h>.1&&this.Jx.logger.debug("Segment duration is off by ".concat(h,", corrected from ").concat(d," to ").concat(p)),p}return d},c.prototype.ix=function(){if(this.Ox=[],this.Lx.length>0){var c=this.Lx[0];this.bx(c)}else this.Kx=!1},c.prototype.kx=function(c){var u=c.mp2tsSegment.getSegmentInfo().discontinuitySequenceNumber;if(void 0!==u){if(void 0===this.Px[u]){var d=this.Ox[0].segment.info.timelineStartInfo;this.Px[u]=(d.baseMediaDecodeTime-d.pts)/9e4}this.mx(u),this.mx(-1),this.nx(function(c){return c<u})}},c.prototype.lx=function(c){return this.Qx[c]||(this.Qx[c]=new S.Deferred),this.Qx[c]},c.prototype.mx=function(c){void 0!==c&&this.lx(c).resolve()},c.prototype.nx=function(c){var u=this;void 0===c&&(c=function(){return!0}),Object.entries(this.Qx).forEach(function(d){var p=d[0],f=d[1];!f.hasSettled&&c(Number(p))&&(u.Jx.logger.debug("[Transmuxer] Rejecting unresolved disco initialization ".concat(p)),f.reject(h.TransmuxingRejectionReason.TRANSMUXING_ABORTED),delete u.Qx[Number(p)])})},c.prototype.getTimestampMappingOffset=function(c){var u,d=null==(u=c.getSegmentInfo())?void 0:u.discontinuitySequenceNumber,p=this.Px[d];if(void 0!==d&&void 0!==p)return p+95443.7176888889*Math.floor((c.getPlaybackTime()-p)/95443.7176888889)},c.prototype.discardCurrentJobs=function(c){return E.MimeTypeHelper.isVideo(c)&&(this.nx(),this.Qx={}),this.isTransmuxing()?this.Lx.filter(function(u){return u.mp2tsSegment.getMimeType()===c}).map(function(c){return c.discard=!0,{mp2tsSegment:c.mp2tsSegment}}):[]},c.prototype.ox=function(c){var u;null==(u=this.Mx)||u.postMessage({action:"setTimestampOffset",offset:c})},c.prototype.px=function(c){var u;null==(u=this.Mx)||u.postMessage({action:"push",data:c},[c])},c.prototype.qx=function(){var c;null==(c=this.Mx)||c.postMessage({action:"flush"})},c.prototype.resetCaptionParser=function(){var c;this.Jx.logger.debug("Resetting caption parser..."),null==(c=this.Mx)||c.postMessage({action:"resetCaptions"})},c.prototype.hasActiveJobs=function(){return this.Kx&&this.Lx.some(function(c){return!1===c.discard})},c.prototype.hasDelayedAudioSegments=function(){return Object.values(this.Qx).some(function(c){return!c.hasSettled})},c.prototype.isTransmuxing=function(){return this.Kx},c.prototype.isTransmuxingSegmentsForPeriod=function(c){return this.Lx.some(function(u){return c===u.mp2tsSegment.getPeriodId()})},c.prototype.reset=function(){this.Jx.logger.debug("Resetting transmuxer..."),this.Sx=void 0,this.Rx&&this.Rx.reset()},c.prototype.dispose=function(){var c;this.Mx&&(this.Nx={},this.Lx=[],this.Ox=[],this.Mx.postMessage({action:"dispose"}),this.Mx.terminate(),this.Mx=null),this.reset(),this.nx(),null==(c=this.Rx)||c.dispose(),this.Qx={},this.Px={}},c.prototype.rx=function(c,u){this.Nx.hasOwnProperty(c)||(this.Nx[c]=[]),this.Nx[c].push(u)},c.getId3Frame=function(c){if(c&&c.key&&c.data){var u={key:c.key,data:""};return"TXXX"===c.key&&"string"==typeof c.data?(u.info=c.description,u.data=c.data):"PRIV"===c.key?(u.info=c.owner,u.data=c.data):"WXXX"===c.key&&"string"==typeof c.data?(u.info=c.description,c.url&&(u.data=c.url)):u.data=c.data,u.data instanceof Uint8Array&&(u.data=y.ArrayHelper.getArray(u.data)),u}},c.getId3Metadata=function(u){if(!u.hasOwnProperty("metadata")||!Array.isArray(u.metadata))return[];for(var d=[],p=0;p<u.metadata.length;p++){for(var h={frames:[]},f=0;f<u.metadata[p].frames.length;f++){var m=c.getId3Frame(u.metadata[p].frames[f]);m&&(h.frames.push(m),h[m.key]=m.data)}d.push({presentationTime:u.metadata[p].cueTime,data:h})}return d},c.postProcessSegment=function(c){if(c)return c.data=new Uint8Array(c.data),c},c}();function I(c){var u=new Uint8Array(c);return!(u.length<4||73===u[0]&&68===u[1]&&51===u[2]||255!==u[0]||(240&u[1])!=240)}}},function(c){return c(c.s=21332)}])}(bitmovinplayerContainerTs);var bitmovinplayerContainerTsExports=bitmovinplayerContainerTs.exports;let TSContainerModule=getDefaultExportFromCjs$1(bitmovinplayerContainerTsExports);var bitmovinplayerDash={exports:{}};!function(c){var u;self,c.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[367],{96693:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};
vendor: 4,296 bytes, line 28
28Object.defineProperty(u,"__esModule",{value:!0}),u.isInitializationStringNode=function(c){return(0,h.isObject)(c)&&null!=c._initialization},u.isInitializationNode=function(c){return(0,h.isObject)(c)&&Array.isArray(c.Initialization)&&c.Initialization.length>0},u.isIndexRangeNode=function(c){return(0,h.isObject)(c)&&null!=c._indexRange},u.provideSegmentInfoFromInitializationProperty=function(c,u){var d=(0,g.default)(c._initialization,u),h=f.URLHelper.concatBaseUrlWithPartial(v(u),d);return p(p({},(0,m.createInitSegmentInfoBase)(u)),{url:h,mediaURL:d})},u.extractBaseUrlFromRepresentation=v,u.provideSegmentInfoFromInitializationNodeProperty=function(c,u){var d,h,g,y=c.Initialization[0],b=y._sourceURL?y._sourceURL:v(u),S=f.URLHelper.concatBaseUrlWithPartial(v(u),b),_=(g=null!=(h=null==(d=y._range)?void 0:d.split("-").map(function(c){return parseInt(c)}))?h:[]).length>1?{start:g[0],end:g[1]}:null;return p(p({},(0,m.createInitSegmentInfoBase)(u)),{url:S,mediaURL:b,byteRange:_})},u.provideSegmentInfoFromIndexRangeProperty=function(c,u){var d=v(u),h={start:0,end:parseInt(c._indexRange.split("-")[0])-1};return p(p({},(0,m.createInitSegmentInfoBase)(u)),{url:d,mediaURL:d,byteRange:h})};var h=d(94685),f=d(58313),m=d(65439),g=d(4771);function v(c){return c.BaseURL?f.URLHelper.urlObjectToString(c.BaseURL[0]):""}},44908:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},h=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.MPDLoader=void 0;var f=d(40306),m=d(3336),g=d(80813),v=d(3714),y=d(4129),b=d(85625),S=d(77401),_=d(57456),E=d(29669),T=d(91678),w=d(33436),P=d(89927),A=d(58313),I=d(78340);function M(c){return{url:c.url,statusCode:c.status,statusText:c.statusText}}function R(c){return(null==c?void 0:c._type)==="dynamic"}u.MPDLoader=function(){function c(c,u){var d=this;this.Kq=0,this.Sq=function(c){return c.body?d.Tq(c):(d.Iq.load(null,null).catch(function(){}),null)},this.Uq=function(c,u){d.Lq=function(c,u,d){if((null==u?void 0:u.name)===S.RequestError.Canceled)return null;if((null==u?void 0:u.name)===S.RequestError.TimedOut)return new m.PlayerError(f.ErrorCode.NETWORK_MANIFEST_DOWNLOAD_TIMEOUT,M(c),"Failed to load DASH manifest: the request timed out.",d);var p=(null==c?void 0:c.status)===XMLHttpRequest.UNSENT?"Failed to load the DASH manifest due to CORS restrictions or because the client is offline.":"Failed to load DASH manifest: ".concat(c.status," ").concat(c.statusText,".");return new m.PlayerError(f.ErrorCode.SOURCE_COULD_NOT_LOAD_MANIFEST,M(c),p,d)}(c,u,d.Dq.sourceIdentifier)},this.Cq=c,this.Dq=u,this.Jq=c.settings,this.Fq=new I.MPDParser(c,u),this.Eq=!1,this.Mq=c.eventHandler,this.Hq=[];var p={onFailure:this.Uq,maxRetries:this.Jq.MAX_MPD_RETRIES,requestType:E.HttpRequestType.MANIFEST_DASH,resetRetriesWhenOffline:!1};this.Iq=new y.DefaultContentLoader(c,p)}return c.prototype.Nq=function(c,u){if(this.Eq)return null;var d=c.trim();return this.Oq(d,u)},c.prototype.Oq=function(c,u){var d,p=this.Cq.serviceManager.get(g.ServiceName.ManifestCachingService),f=null!=(d=null==p?void 0:p.getParsedManifest(this.Gq))?d:this.Pq(c,u);return f?(R(f)||null==p||p.cacheParsedManifest(f,this.Gq),this.Hq=f.BaseURL?h(h([],f.Location,!0),f.BaseURL.map(function(c){return c.url}),!0):f.Location,this.Gq=this.Hq[0],f):null},c.prototype.Pq=function(c,u){return this.Fq.parse(c,this.Gq,u)},c.prototype.Qq=function(){this.Iq&&this.Iq.cancel(),this.Eq=!0,this.Gq=null},c.prototype.dispose=function(){this.Qq(),this.Iq.dispose(),this.Fq&&(this.Fq.dispose(),this.Fq=null),this.Jq=null},c.prototype.load=function(c){var u=this;this.Gq=c??this.Gq;var d=this.Gq;return this.Lq=null,c&&(this.Eq=!1),d?this.Rq(d).then(function(c){return u.Sq(c)}).then(function(c){return u.Gq!==d&&u.Hq.includes(u.Gq)&&(u.Cq.logger.debug("Switched manifest location to ".concat(u.Gq)),u.Cq.eventHandler.dispatchEvent(v.PlayerEvent.ContentLocationChanged,{sourceLocationId:d,targetL
28ocationId:u.Gq,reason:v.ContentLocationChangedReason.Failover})),c}).catch(function(c){return u.Eq||(null==c?void 0:c.message)===S.RequestError.Canceled?Promise.reject():(u.Cq.logger.debug("Error during loading: "+u.Gq+": ",c),Promise.reject(c))}):(this.Cq.eventHandler.fireError(new m.PlayerError(f.ErrorCode.SOURCE_INVALID,void 0,"Cannot load the manifest: no URL was provided.",this.Dq.sourceIdentifier)),Promise.reject("No manifest url provided"))},c.prototype.Rq=function(c){var u,d=this,p=this.Cq.serviceManager.maybeCall(g.ServiceName.ManifestCachingService,function(u){return u.getHttpResponse(c)});if(p)return Promise.resolve(p);var h=null==(u=this.Dq.source.options)?void 0:u.manifestWithCredentials;return this.Iq.load(c,E.HttpRequestMethod.GET,null,null,null,h,b.ManifestMimeType.Dash).catch(function(c){return d.Kq++,d.Kq<d.Hq.length?(d.Gq=A.URLHelper.replaceCdn(d.Gq,d.Hq[d.Kq]),d.Rq(d.Gq)):(d.Cq.logger.debug("no base url left, all tried"),d.Lq&&d.Mq.fireError(d.Lq),d.Lq=null,Promise.reject(c))})},c.prototype.updateRepresentation=function(c){return Promise.resolve(c)},c.prototype.stopRepresentationUpdate=function(c){return Promise.resolve()},c.prototype.Tq=function(c){var u,d,h,f,m=null!=(u=c.elapsedTime)?u:0;(0,_.isDownloadTimeInformationValid)(c)&&(this.Cq.logger.debug("Downloaded manifest in: ".concat(m.toFixed(2),", TTFB: ").concat(null==(d=c.timeToFirstByte)?void 0:d.toFixed(2))),this.Cq.store.dispatch((0,T.addMetricsValue)("default",w.MetricType.DownloadInformation,{bytes:c.length,time:m,timeToFirstByte:c.timeToFirstByte}))),this.Gq=c.url;var v=p({},this.Nq(c.body,(0,P.toSeconds)(Math.round(m))));return v._currentLoadingUrl=this.Gq,R(v)?(null==(f=null==(h=this.Cq)?void 0:h.settings)?void 0:f.INFINITE_RETRIES_FOR_LIVE)===!0&&this.Iq.setResetRetriesWhenOffline(!0):this.Cq.serviceManager.maybeCall(g.ServiceName.ManifestCachingService,function(u){return u.cacheHttpResponse(c,c.url)}),v},c}()},78340:function(c,u,d){var p,h,f,m,g=this&&this.__assign||function(){return(g=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},v=this&&this.__runInitializers||function(c,u,d){for(var p=arguments.length>2,h=0;h<u.length;h++)d=p?u[h].call(c,d):u[h].call(c);return p?d:void 0},y=this&&this.__esDecorate||function(c,u,d,p,h,f){function m(c){if(void 0!==c&&"function"!=typeof c)throw TypeError("Function expected");return c}for(var g,v=p.kind,y="getter"===v?"get":"setter"===v?"set":"value",b=!u&&c?p.static?c:c.prototype:null,S=u||(b?Object.getOwnPropertyDescriptor(b,p.name):{}),_=!1,E=d.length-1;E>=0;E--){var T={};for(var w in p)T[w]="access"===w?{}:p[w];for(var w in p.access)T.access[w]=p.access[w];T.addInitializer=function(c){if(_)throw TypeError("Cannot add initializers after decoration has completed");f.push(m(c||null))};var P=(0,d[E])("accessor"===v?{get:S.get,set:S.set}:S[y],T);if("accessor"===v){if(void 0===P)continue;if(null===P||"object"!=typeof P)throw TypeError("Object expected");(g=m(P.get))&&(S.get=g),(g=m(P.set))&&(S.set=g),(g=m(P.init))&&h.unshift(g)}else(g=m(P))&&("field"===v?h.unshift(g):S[y]=g)}b&&Object.defineProperty(b,p.name,S),_=!0};Object.defineProperty(u,"__esModule",{value:!0}),u.BaseURL=u.MPDParser=void 0,u.mergeCommonAttributes=D,u.parseFraction=L;var b=d(25926),S=d(4224),_=d(3714),E=d(20213),T=d(69957),w=d(44468),P=d(34047),A=d(52424),I=d(68922),M=d(85434),R=d(58313),k=d(88052),x=d(62756),C=RegExp("_(.*:)?label","i"),O=["__text","_byteRange","_serviceLocation","_availabilityTimeOffset","_availabilityTimeComplete"];function D(c,u){if(c&&u)for(var d=["SegmentBase","SegmentList","SegmentTemplate"],p=0;p<d.length;p++){var h=d[p],f=Array.isArray(c[h])&&c[h][0],m=Array.isArray(u[h])&&u[h][0],v=d.find(function(u){return c[u]});m&&f?c[h]=[g(g({},u[h][0]),c[h][0])]:m&&!v&&(c[h]=u[h])}}function L(c){var u=c.split("/");return parseInt(u[0])/(parseInt(u[1])||1)}function N(c,u){return c.S.reduce(function(c,u){var d;return c+Number(u._d)*(Number(null!=(d=u._r)?d:"0")+1)},0)/u}function U(c){return"string"==typeof c?[{value:c}]:Array.isArray(c)?c.map(function(c){return{id:c._id,lang:c._lang,value:c.toString()}}):[]}u.MPDParser=(f=[],p=function(){function c(c,u){this.aQ=v(this,f),this.aQ=c,this.bQ=u,this.cQ=c.renderer;var d=k.ModuleManager.get(x.ModuleName.XML);this.dQ=d.parseXML,this.oR=d.parseJSONtoXML}return c.prototype.pR=function(c,u){return(0,I.applyLabeling)({source:this.bQ.source,context:this.aQ,streamType:w.StreamType.Dash,labelingType:c},u)},c.prototype.qR=function(c){var u,d,p,h=null!=(p=null==(d=null==(u=c.Label)?void 0:u[0])?void 0:d.value)?p:c._label,f={mimeType:c._mimeType,lang:c._lang};return this.pR(I.LabelingType.Tracks,f)||h},c.prototype.rR=function(c,u){var d,p,h,f=null!=(h=null==(p=null==(d=u.Label)?void 0:d[0])?void 0:p.value)?h:u._label,m={id:u._id,mimeType:c,bitrate:u._bandwidth,qualityRanking:u._qualityRanking,width:u._width,height:u._height,frameRate:u._framerate};return this.pR(I.LabelingType.Qualities,m)||f},c.prototype.sR=function(c){var u=this,d=0;for(var p in c)if(c.hasOwnProperty(p)){if("Accessibility"===p&&this.tR(c,c[p]),"EssentialProperty"===p&&function(c){var u;return(null==(u=null==c?void 0:c[0])?void 0:u._schemeIdUri)==="http://dashif.org/guidelines/trickmode"}(c[p]))return this.aQ.logger.debug("Ignoring trickplay track ".concat(c._id," from Period ").concat(c._periodId)),null;"Label"===p&&(c.Label=U(c[p])),"SegmentTemplate"===p&&this.uR(c[p]),"SegmentList"===p&&this.vR(c[p]),"SegmentTemplate"===p||0===p.indexOf("_")||Array.isArray(c[p])||(c[p]=[c[p]]),"Representation"===p&&(c[p]=c[p].filter(function(p){var h,f,m,g=p._mimeType||c._mimeType;if(p._mimeType=p._mimeType||c._mimeType,g&&(g=g.toLowerCase()),"AudioChannelConfiguration"in c){var v=c.AudioChannelConfiguration;null!=p.AudioChannelConfiguration||(p.AudioChannelConfiguration=v)}D(p,c),"string"==typeof(h=p)._audioSamplingRate&&(h._audioSamplingRate=parseFloat(h._audioSamplingRate)),"string"==typeof(f=p)._height&&(f._height=parseFloat(f._height)),"string"==typeof f._width&&(f._width=parseFloat(f._width)),"string"==typeof f._frameRate&&(f._frameRate=L(f._frameRate)),"string"==typeof p._bandwidth&&(p._bandwidth=parseFloat(p._bandwidth)),p.Label&&(p.Label=U(p.Label)),p.SegmentTemplate&&u.uR(p.SegmentTemplate),p.SegmentList&&u.vR(p.SegmentList);var y=p._codecs||c._codecs;if(g&&(0===g.indexOf("application")||0===g.indexOf("text")||0===g.indexOf("image")||g.indexOf("mp2t")>=0))d++,p._label=u.rR(g,p);
vendor: 10,827 bytes, line 28
28else if(g&&y){if(p._codecs=y,!P.CodecStringHelper.isSupportedByRenderer(u.cQ,g,y))return u.aQ.logger.debug("Representation not supported ("+g+'; codecs="'+y+'")'),!1;d++,p._label=u.rR(g,p)}return!0}))}return d>0?(!c.hasOwnProperty("_mimeType")&&c.Representation[0].hasOwnProperty("_mimeType")&&(c._mimeType=c.Representation[0]._mimeType),c._label=this.qR(c),c.Representation.sort(function(c,u){return c._bandwidth-u._bandwidth}),c):(this.aQ.logger.debug("AdaptationSet ".concat(c._id," from Period ").concat(c._periodId," has no supported representations")),null)},c.prototype.tR=function(c,u){c.ClosedCaptionLabels={};for(var d=p.filterAccessibilityTagsByScheme(u,"urn:scte:dash:cc:cea-608:2015"),h=p.extractLabelGroups(d),f=0;f<h.length;f++){var m=h[f],g=m.split("="),v=2===g.length?[g[0],g[1]]:["CC"+f,m],y=v[0],b=v[1];c.ClosedCaptionLabels[y]={label:b,lang:b}}},c.prototype.uR=function(c){for(var u,d,p=0;p<c.length;p++){var h=c[p];if(h.hasOwnProperty("SegmentTimeline"))for(var f=Number(null!=(u=h._timescale)?u:"1"),m=0,g=null!=(d=h.SegmentTimeline)?d:[];m<g.length;m++){var v=g[m];v.totalDuration=N(v,f)}}},c.prototype.vR=function(c){for(var u,d,p,h,f,m,g=0;g<c.length;g++){var v=c[g];if(v.hasOwnProperty("SegmentTimeline")){for(var y=Number(null!=(u=v._timescale)?u:"1"),b=0,S=null!=(d=v.SegmentTimeline)?d:[];b<S.length;b++){var _=S[b];_.totalDuration=N(_,y)}v.totalDuration=null!=(f=null==(h=null==(p=v.SegmentTimeline)?void 0:p[0])?void 0:h.totalDuration)?f:0}else if(v.hasOwnProperty("_duration")&&v.hasOwnProperty("SegmentURL")){y=Number(null!=(m=v._timescale)?m:"1");var E=Number(v._duration)/y;v.totalDuration=E*v.SegmentURL.length}}},c.filterAccessibilityTagsByScheme=function(c,u){return c&&c.length>0?c.filter(function(c){return c._schemeIdUri===u}):[]},c.extractLabelGroups=function(c){for(var u=[],d=0;d<c.length;d++){var p=c[d];if(p._value){var h=p._value.split(";");u.push.apply(u,h)}}return u},c.prototype.wR=function(c,u){for(var d=0;d<c.length;d++)if("string"==typeof u&&c[d].url===u||"object"==typeof u&&c[d].url===u.url)return!0;return!1},c.prototype.xR=function(c,u,d,p){var h;Array.isArray(c.BaseURL)||(c.BaseURL=[c.BaseURL]);for(var f=[],m=0;m<c.BaseURL.length;m++){if((h=new F).customAttributes=[],null!=u&&(h.parentIds={},void 0!==u[0]&&null!==u[0]&&(h.parentIds.PeriodID=u[0]),void 0!==u[1]&&null!==u[1]&&(h.parentIds.AdaptationSetID=u[1]),void 0!==u[2]&&null!==u[2]&&(h.parentIds.RepresentationID=u[2])),"string"==typeof c.BaseURL[m])h.url=c.BaseURL[m];else if("object"==typeof c.BaseURL[m]){for(var g in c.BaseURL[m].hasOwnProperty("__text")&&(h.url=c.BaseURL[m].__text),c.BaseURL[m].hasOwnProperty("_serviceLocation")&&(h.serviceLocation=c.BaseURL[m]._serviceLocation),c.BaseURL[m].hasOwnProperty("_byteRange")&&(h.serviceLocation=c.BaseURL[m]._byteRange),c.BaseURL[m].hasOwnProperty("_availabilityTimeOffset")&&(h.serviceLocation=c.BaseURL[m]._availabilityTimeOffset),c.BaseURL[m].hasOwnProperty("_availabilityTimeComplete")&&(h.serviceLocation=c.BaseURL[m]._availabilityTimeComplete),c.BaseURL[m])if(c.BaseURL[m].hasOwnProperty(g)&&0===g.indexOf("_")&&-1===O.indexOf(g)){var v={};v[g.substring(1)]=c.BaseURL[m][g],h.customAttributes.push(v)}}f.push(h)}for(c.BaseURL=[],m=0;m<f.length;m++){var y=f[m];if(R.URLHelper.isUrlAbsolute(y))this.wR(c.BaseURL,y)||(y.isAbsolute=!0,p.push(y),c.BaseURL.push(y));else for(var b=0;b<d.length;b++){var S=d[b].toString();"/"!==d[b].url[d[b].url.length-1]&&(S+="/");var _=R.URLHelper.concatUrlParts(S,y);this.wR(c.BaseURL,_)||((h=new F).url=_,h.parentIds={},void 0!==u[0]&&null!==u[0]&&(h.parentIds.PeriodID=u[0]),void 0!==u[1]&&null!==u[1]&&(h.parentIds.AdaptationSetID=u[1]),void 0!==u[2]&&null!==u[2]&&(h.parentIds.RepresentationID=u[2]),h.serviceLocation=y.serviceLocation||d[b].serviceLocation,h.byteRange=y.byteRange||d[b].byteRange,h.availabilityTimeOffset=y.availabilityTimeOffset||d[b].availabilityTimeOffset,h.availabilityTimeComplete=y.availabilityTimeComplete||d[b].availabilityTimeComplete,c.BaseURL.push(h),p.push(h))}}return p},c.prototype.yR=function(c,u,d){var p=[];if(u=u||[],d=d||[],"object"!=typeof c)return c;for(var h in c.hasOwnProperty("BaseURL")&&(p=this.xR(c,d,u,p)),p.length<1&&(p=u),c)if(c.hasOwnProperty(h))if("object"==typeof c[h]&&0!==h.indexOf("_")){Array.isArray(c[h])||(c[h]=[c[h]]);for(var f=0;f<c[h].length;f++)if("BaseURL"!==h){var m=c[h][f]._id||f+"";c[h][f]=this.yR(c[h][f],p,d.concat([m])),"Representation"!==h||c[h][f].hasOwnProperty("BaseURL")||(c[h][f].BaseURL=p)}}else 0===h.indexOf("_")&&(C.test(h)||"_streamName"===h)&&(c._label=c[h],"_label"!==h&&delete c[h]);return c},c.prototype.zR=function(c){var u=A.DurationConverter.getDurationInSec(c._timeShiftBufferDepth);return(u=isNaN(u)?-1/0:-u)>0&&u<this.aQ.bufferSettings.getForwardTargetLevel()&&(u=this.aQ.bufferSettings.getForwardTargetLevel()),u},c.fillInMissingIds=function(c){Array.isArray(c.Period)||(c.Period=[c.Period]);for(var u=[],d=[],p=[],h=[],f=[],m=[],g=c.Period,v=0;v<g.length;v++){g[v].hasOwnProperty("_id")&&g[v]._id?u.push(g[v]._id):h.push(g[v]),Array.isArray(g[v].AdaptationSet)||(g[v].AdaptationSet=[g[v].AdaptationSet]);for(var y=g[v].AdaptationSet,b=0;b<y.length;b++){y[b].hasOwnProperty("_id")&&y[b]._id?d.push(y[b]._id):f.push(y[b]),y[b]._periodId=g[v]._id,Array.isArray(y[b].Representation)||(y[b].Representation=[y[b].Representation]);for(var S=y[b].Representation,_=0;_<S.length;_++)S[_].hasOwnProperty("_id")&&S[_]._id?p.push(S[_]._id):m.push(S[_])}}for(var E=0,T=0;T<h.length;T++){var w=h[T];do E++;while(u.includes(""+E))w._id=""+E;for(var P=0,A=w.AdaptationSet;P<A.length;P++)A[P]._periodId=w._id;u.push(""+E)}E=0;for(var I=0;I<f.length;I++){var M=f[I];do E++;while(d.includes(""+E))M._id=""+E,d.push(""+E)}E=0;for(var R=0;R<m.length;R++){var k=m[R];do E++;while(p.includes(""+E))k._id=""+E,p.push(""+E)}},c.prototype.AR=function(c){return"dynamic"===c._type&&(c._timeShiftBufferDepth=this.zR(c)),c},c.prototype.BR=function(c){return c._publishTime&&(c._publishTime=new Date(c._publishTime).getTime()),c},c.prototype.CR=function(c,u){return c.hasOwnProperty("Location")?Array.isArray(c.Location)||(c.Location=[c.Location]):c.Location=[u],c},c.prototype.DR=function(c){c.hasOwnProperty("BaseURL")&&!Array.isArray(c.BaseURL)&&(c.BaseURL=[c.BaseURL]);for(var u=[],d=0;d<c.Location.length;d++){var p=c.Location[d],h=new F;h.url=R.URLHelper.removeLastPathPart(p),u.push(h)}return this.yR(c,u,null)},c.prototype.ER=function(c,u){u._start?u.start=A.DurationConverter.getDurationInSec(u._start):(u.start=c.start+c.duration,u._start="PT"+u.start+"S")},c.prototype.FR=function(c){for(var u={start:0,duration:0,_start:"PT0S",_duration:"PT0S"},d=0;d<c.Period.length;d++){var p=c.Period[d];this.ER(u,p),p._duration?p.duration=A.DurationConverter.getDurationInSec(p._duration):(c.Period[d+1]?p.duration=(A.DurationConverter.getDurationInSec(c.Period[d+1]._start)||0)-p.start:c._mediaPresentationDuration?p.duration=(A.DurationConverter.getDurationInSec(c._mediaPresentationDuration)||0)-p.start:p.duration=1/0,p._duration="PT"+p.duration+"S"),this.aQ.logger.debug("period ".concat(d," (id=").concat(p._id,"): ").concat(p.start,"-").concat(p.start+p.duration)),c.Period[d]=p,u=p}return c},c.prototype.GR=function(c){for(var u,d,p=this,h=[],f=[],m=A.DurationConverter.getDurationInSec(c._mediaPresentationDuration),g=this,v=0;v<c.Period.length;v++)!function(v){var y=c.Period[v];for(var E in u=A.DurationConverter.getDurationInSec(y._start),d=A.DurationConverter.getDurationInSec(y._duration),isNaN(u)&&0===f.length&&"static"===c._type&&(u=0),isNaN(u)&&f.length>0&&!isNaN(parseFloat(f[f.length-1].start))&&!isNaN(parseFloat(f[f.length-1].duration))&&(u=f[f.length-1].start+f[f.length-1].duration),isNaN(u)&&v===c.Period.length-1&&!isNaN(m)&&(d=m-u),f.length>0&&isNaN(parseFloat(f[f.length-1].duration))&&!isNaN(u)&&(f[f.length-1].duration=u-f[f.length-1].start),f.push({start:u,duration:d}),y)if(y.hasOwnProperty(E)&&["BaseURL","AdaptationSet","EventStream"].includes(E)){if(Array.isArray(y[E])||(y[E]=[y[E]]),"AdaptationSet"===E){var T=y[E].map(function(c){var u=c._mimeType;return!u&&c.Representation.length>0&&(u=c.Representation[0]._mimeType),M.MimeTypeHelper.extractContentType(u)}).filter(function(c,u,d){return d.indexOf(c)===u});y[E]=y[E].map(function(c){D(c,y);var u=p.sR(c);return null!==u&&!u.hasOwnProperty("ContentProtection")&&u.Representation[0].hasOwnProperty("ContentProtection")&&(u.ContentProtection=u.Representation[0].ContentProtection),u}).filter(function(c){return!!c});for(var w=function(c){y[E].some(function(u){return u._mimeType.includes(c)})||g.aQ.eventHandler.dispatchEvent(_.PlayerEvent.Warning,new b.PlayerWarning(S.WarningCode.SOURCE_CODEC_OR_FILE_FORMAT_NOT_SUPPORTED))},P=0,I=T.filter(function(c){return"audio"===c||"video"===c});P<I.length;P++)w(I[P]);y[E].length<1&&h.push(v)}else if("EventStream"===E)for(var R=0,k=y[E].filter(function(c){return c.Event});R<k.length;R++)for(var x=0,C=k[R].Event;x<C.length;x++){var O=C[x];O.rawXmlRepresentation=g.oR({event:O})}}}(v);return h.length>0&&"static"===c._type&&this.HR(h,f,m,c),c=this.FR(c)},c.prototype.HR=function(c,u,d,p){for(var h,f,m;!isNaN(parseInt(h=c.pop()));){if(f=u[h].start,m=u[h].duration,!isNaN(f)&&!isNaN(m)){isNaN(d)||(p._mediaPresentationDuration="PT"+(d-=m)+"S");for(var g=h+1;g<u.length;g++)isNaN(parseFloat(u[g].start))||(u[g].start=u[g].start-m,p.Period[g]._start="PT"+u[g].start+"S")}u.splice(h,1),p.Period.splice(h,1)}},c.parseUTCTimingInformation=function(c,u){var d,p,h,f;c.hasOwnProperty("UTCTiming")&&!Array.isArray(c.UTCTiming)&&(c.UTCTiming=[c.UTCTiming]);for(var m=[],g=0,v=(c.UTCTiming||[]).filter(function(c){return c.hasOwnProperty("_schemeIdUri")&&"string"==typeof c._schemeIdUri});g<v.length;g++)!function(g){var v={schemeIdUri:g._schemeIdUri,value:""};if("string"==typeof g._value)if(v.schemeIdUri.startsWith("urn:mpeg:dash:utc:http")){var y=null!=(h=null==(p=null==(d=c.BaseURL)?void 0:d[0])?void 0:p.url)?h:R.URLHelper.removeLastPathPart(u);v.value=(null!=(f=g._value.match(/\S+/g))?f:[g._value]).map(function(c){return R.URLHelper.concatBaseUrlWithPartial(y,c)}).join(" ")}else v.value=g._value;m.push(v)}(v[g]);return m.length>0?c.UTCTiming=m:delete c.UTCTiming,c},c.prototype.parse=function(c,u,d){var h,f=this.dQ(c,{decodeEntities:!0});if(!1===f.success)throw new E.PlayerError(E.ErrorCode.SOURCE_MANIFEST_INVALID,{errorMessage:f.error.message},"DASH manifest is not a valid XML",this.bQ.sourceIdentifier);var m=f.parsed.MPD;return m._requestTimestamp=Date.now(),m._downloadTime=d,m._type=null!=(h=m._type)?h:"static",p.fillInMissingIds(m),m=this.AR(m),m=this.BR(m),m=this.CR(m,u),m=this.DR(m),m=this.GR(m),(m=p.parseUTCTimingInformation(m,u))&&m.Period&&0!==m.Period.length?(m.originalDashManifest=c,m):(this.aQ.eventHandler.fireError(new E.PlayerError(E.ErrorCode.SOURCE_MANIFEST_INVALID,void 0,"DASH manifest contains 
28no usable periods",this.bQ.sourceIdentifier)),null)},c.prototype.dispose=function(){this.cQ=null},c}(),m="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,h=[(0,T.trackPerformance)("MPDParser.parse")],y(p,null,h,{kind:"method",name:"parse",static:!1,private:!1,access:{has:function(c){return"parse"in c},get:function(c){return c.parse}},metadata:m},null,f),m&&Object.defineProperty(p,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:m}),p);var F=function(){function c(){this.url=null,this.parentIds=null,this.serviceLocation=null,this.byteRange=null,this.availabilityTimeOffset=null,this.availabilityTimeComplete=null,this.isAbsolute=!1,this.customAttributes=null}return c.prototype.toString=function(){return this.url?""+this.url:""},c}();u.BaseURL=F},66759:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.DASHModuleDefinition=void 0;var p=d(62756),h=d(96693),f=d(44908),m=d(4771),g=d(63889),v=d(12054),y=d(31439),b={isIndexRangeNode:h.isIndexRangeNode,isInitializationNode:h.isInitializationNode,isInitializationStringNode:h.isInitializationStringNode},S={provideSegmentInfoFromInitializationProperty:h.provideSegmentInfoFromInitializationProperty,provideSegmentInfoFromInitializationNodeProperty:h.provideSegmentInfoFromInitializationNodeProperty,provideSegmentInfoFromIndexRangeProperty:h.provideSegmentInfoFromIndexRangeProperty};u.DASHModuleDefinition={name:p.ModuleName.DASH,module:function(){return{MPDLoader:f.MPDLoader,SegmentBaseMPDHandler:g.SegmentBaseMPDHandler,SegmentTemplateMPDHandler:v.SegmentTemplateMPDHandler,SegmentTimelineMPDHandler:y.SegmentTimelineMPDHandler,replaceAllPlaceholders:m.default,initSegmentInfoSourceDetectors:b,initSegmentInfoProviders:S}},dependencies:[p.ModuleName.EngineBitmovin,p.ModuleName.XML]},u.default=u.DASHModuleDefinition},63889:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.SegmentBaseMPDHandler=void 0;
vendor: 4,576 bytes, line 28
28var h=d(80813),f=d(56481),m=d(4129),g=d(29669),v=d(79721),y=d(84568),b=d(58313),S=d(88052),_=d(62756),E=d(13422),T=d(59707),w=d(96693);u.SegmentBaseMPDHandler=function(){function c(c,u){var d=this;this.context=c,this.Xq=0,this.Zq=-1,this.tr=(0,y.memoize)(this.Gr.bind(this),function(c,u){return u._internalId.representationId}),this.ur=function(c){var u=p({},d.qr.getRepresentationById(d.cq));return d.tr(c,u).then(function(c){var p;if(d.sr.dispatch((0,T.setRepresentationSegmentIndexAction)(u._internalId,c)),d.sr.dispatch((0,T.setRepresentationIsLoadingAction)(u._internalId,!1)),c||(d.sr.dispatch((0,T.setRepresentationSegmentIndexParsingErrorAction)(u._internalId,!0)),d.context.logger.warn("Error parsing SegmentIndex for representation with id ".concat(null==(p=d.cq)?void 0:p.key()))),d.Zq>=0){var h=d.Zq;d.Zq=-1,d.seekTo(h)}return d.pr=null,d.cq}).catch(function(c){throw d.tr.invalidate(),c})},this.vr=function(c){return d.pr=null,d.context.logger.warn("Getting segment index failed for representation with id ".concat(d.cq.key()," (Error: ").concat(JSON.stringify(c),")")),Promise.reject(JSON.stringify(c))},this.zr=function(c){return d.or?Promise.reject("fail"):new Promise(function(u,h){d.or=p(p({},c),{resolve:u,reject:h})})},this.Vq=c.settings;var f=u.sourceIdentifier;this.qr=c.serviceManager.get(h.ServiceName.ManifestService,f);var b=this.qr.getFirstPeriod()||{_id:v.DEFAULT_PERIOD_ID};this.Wq=b._id;var S=this.Vq.MAX_RETRIES;this.dq=new m.DefaultContentLoader(c,{maxRetries:S,retryDelay:this.Vq.RETRY_DELAY,requestType:g.HttpRequestType.MEDIA_SEGMENTINDEX}),this.sr=c.serviceManager.get(h.ServiceName.SourceStoreService,f)}return c.prototype.wr=function(c){var u,d,p=this.qr.getRepresentationById(c);if(p&&p.segmentIndex){var h=this.qr.getPeriodDuration(this.Wq);isFinite(h)&&(d=h/p.segmentIndex.references.length);var f=this.qr.getMediaPresentationDuration();0!==f&&(isFinite(f)&&(u=f/p.segmentIndex.references.length),d||(d=u)),p.segmentIndex&&(u=p.segmentIndex.references[0].duration/p.segmentIndex.timescale,d||(d=u))}return d},c.prototype.xr=function(){var c,u,d=this.qr.getRepresentationById(this.aq);if(null!=(u=null==(c=null==d?void 0:d.segmentIndex)?void 0:c.references)&&u.length){var p=d.segmentIndex.timescale||1,h=d.segmentIndex.references[this.Xq].time/p,f=this.getTimestampOffset(),m={url:"",byteRange:d.segmentIndex.references[this.Xq].byteRange,periodId:d._internalId.periodId,presentationTimeOffset:f,startTime:h-f};return this.Xq++,this.Yq=Math.floor(this.Xq*this.getSegmentDuration())+this.Dr(),m}},c.prototype.getInitSegmentInfo=function(c){var u=this.qr.getRepresentationById(c);return u&&u.SegmentBase&&u.BaseURL?p(p({},this.yr(u)),{codecs:(0,E.getCodecsFromAdaptationSet)(this.qr.getAdaptationSet(c))}):null},c.prototype.yr=function(c){var u,d=c.SegmentBase[0];return(0,w.isInitializationNode)(d)?(0,w.provideSegmentInfoFromInitializationNodeProperty)(d,c):c.segmentIndex?(0,w.isIndexRangeNode)(d)?(0,w.provideSegmentInfoFromIndexRangeProperty)(d,c):null:(this.context.logger.debug("SegmentIndex for representation ".concat(null==(u=c._internalId)?void 0:u.key()," not parsed yet!")),null)},c.prototype.resolvePendingSegmentInfoRequests=function(){if(this.or){var c=this.xr();c&&(this.or.resolve(c),this.or=null)}},c.prototype.setAdaptationSetId=function(c){this.bq=c,this.rr=c.adaptationSetId.split("-")[0],this.Ar(),this.resolvePendingSegmentInfoRequests()},c.prototype.Ar=function(){var c,u=this,d=this.qr.getRepresentationById(this.aq);d&&(c=d._bandwidth);var p=this.qr.getMatchingRepresentationsByBandwidth(this.bq,c),h=(this.aq?p.find(function(c){return c._internalId===u.aq}):null)??p[0];this.aq=h._internalId,this.Wq=this.aq.periodId,h.segmentIndex||(this.updateRepresentation(this.aq),h=this.qr.getRepresentationById(h._internalId)),h.hasOwnProperty("SegmentBase")&&h.SegmentBase.length>1&&this.context.logger.debug("Representation ".concat(h._id," has more than one SegmentBase! Taking the first one."))},c.prototype.setRepresentationId=function(c){return!!this.qr.getRepresentationById(c)&&(this.aq=c,this.seekTo(this.Yq),!0)},c.prototype.getSegmentInfos=function(){var c=this.getSeekableRange();return this.Br(c)},c.prototype.Br=function(c){var u=this,d={};return this.qr.getAdaptationSet(this.bq).Representation.forEach(function(p){var h=p._id;if(d[h]=[],1===p.BaseURL.length){var f=p.BaseURL[0].url;d[h].push({url:b.URLHelper.appendQueryParametersToUrl(f,u.Vq.QUERY_PARAMETERS)})}else for(var m=0;m<p.BaseURL.length;m++)f=b.URLHelper.appendQueryParametersToUrl(p.BaseURL[m].url,u.Vq.QUERY_PARAMETERS),d[h].push({url:f});
28d[h].forEach(function(u){u.duration=c.end-c.start,u.startTime=c.start})}),d},c.prototype.getNextSegmentInfo=function(c){var u=this.xr();return u?Promise.resolve(u):this.zr({time:c})},c.prototype.getSubtitleUrl=function(){var c=this.qr.getAvailableBaseURLsForRepresentation(this.aq);return c?c[0]:null},c.prototype.getStartNumber=function(){},c.prototype.getLiveEdgeTime=function(){return -1},c.prototype.getActualTimeShiftBufferDepth=function(){return this.qr.getTimeShiftBufferDepthSeconds()},c.prototype.Cr=function(){var c,u=this;return this.qr.getRepresentationById(this.aq)&&(c=this.wr(this.aq)),c<0&&(c=this.qr.getAdaptationSet(this.bq).Representation.map(function(c){return u.wr(c._internalId)}).find(function(c){return c>0})),isFinite(c)?[c,!0]:[1,!1]},c.prototype.getSegmentDuration=function(){return this.Cr()[0]},c.prototype.hasNext=function(){this.resolvePendingSegmentInfoRequests();var c=this.qr.getRepresentationById(this.aq);if(c){if(c.segmentIndex)return this.Xq<c.segmentIndex.references.length;if(!this.isSegmentInfoLoaded(this.aq))return!0}return!1},c.prototype.Dr=function(){var c,u,d;return null!=(d=null==(u=null==(c=this.qr)?void 0:c.findPeriod(this.Wq))?void 0:u.start)?d:0},c.prototype.seekTo=function(c){this.Yq=c;var u,d,p=this.Cr(),h=p[0],f=p[1];if((h<0||!f)&&(this.Zq=c),h>0&&f&&c>-1){var m=Math.max(c-this.Dr(),0),g=null==(u=this.qr)?void 0:u.getRepresentationById(this.aq);this.aq&&g&&(this.setIndex(Math.floor(m/h)),this.context.logger.debug("seekTo: ".concat(c,", new index: ").concat(this.Xq," (representationId: ").concat(null==(d=this.aq)?void 0:d.key(),", ").concat(g._mimeType,")")))}},c.prototype.getTimestampOffset=function(){var c=this.qr.findPeriod(this.Wq),u=this.qr.getRepresentationById(this.aq),d=u&&u.SegmentBase?u.SegmentBase[0]:null,p=0;if(d&&d.hasOwnProperty("_presentationTimeOffset")&&d.hasOwnProperty("_timescale")){var h=d.hasOwnProperty("_timescale")?parseInt(d._timescale):1;p=parseInt(d._presentationTimeOffset)/h}return c&&(p-=c.start),p},c.prototype.getIndex=function(){return this.Xq},c.prototype.setIndex=function(c){this.Xq=c},c.prototype.timeShift=function(c){},c.prototype.updateRepresentation=function(c){var u=this;if(this.isSegmentInfoLoaded(c))return this.context.logger.debug("Skipping updateRepresentation, SIDX info already loaded"),Promise.resolve(c);if(this.pr)return this.pr.catch(function(){}).then(function(){return u.updateRepresentation(c)});var d=void 0,p=void 0,h=this.qr.getRepresentationById(c);if(h){if(this.dq.isLoading())return;this.context.logger.debug("Going to load segment index (Representation Id: ".concat(null==c?void 0:c.key(),")")),d=(0,w.extractBaseUrlFromRepresentation)(h);var f=parseInt((p=h.SegmentBase[0]._indexRange).split("-")[1])+1;return this.sr.dispatch((0,T.setRepresentationAnchorPointAction)(h._internalId,f)),this.cq=c,this.pr=this.dq.load(d,g.HttpRequestMethod.GET,g.HttpResponseType.ARRAYBUFFER,null,{Range:"bytes="+p}).then(function(c){return u.ur(c.body)}).catch(this.vr)}return this.context.logger.log("Getting segment index failed (Invalid Representation Id: ".concat(null==c?void 0:c.key(),")")),Promise.reject(null)},c.prototype.isSegmentInfoLoaded=function(c){return this.qr.isSegmentInfoLoaded(c)},c.prototype.rewindOneSegment=function(){return this.Xq--,!(this.Xq<0&&(this.context.logger.debug("SegmentBase array index is smaller than 0, probably a discontinuity. Using 0."),this.setIndex(0),1))},c.prototype.getSeekableRange=function(){return{start:0,end:this.qr.getMediaPresentationDuration()}},c.prototype.getPendingSegmentInfoRequest=function(){return this.or},c.prototype.setPendingSegmentInfoRequest=function(c){this.or=c},c.prototype.canSwitchRepresentation=function(c){return!0},c.prototype.getLatestTimeForPossibleSwitch=function(c){return c},c.prototype.adjustTimeToNextSegmentStart=function(c){return c},c.prototype.dispose=function(){this.Vq=null,this.qr=null,this.aq=null,this.sr=null,this.dq=(0,f.dispose)(this.dq),this.or=null,this.tr=null},c.prototype.setTimestampOffset=function(c,u){},c.prototype.Er=function(){return this.context.serviceManager.get(h.ServiceName.SegmentService).get(this.rr).getSegment(this.getInitSegmentInfo(this.cq)).then(function(c){return c.read()}).then(function(c){return c.value})},c.prototype.Fr=function(c,u){return this.Er().then(function(d){var p=S.ModuleManager.get(_.ModuleName.ContainerWebM).WebMSegmentIndex,h=S.ModuleManager.get(_.ModuleName.ContainerWebM).WebMInitFile,f=new p(c),m=new h(d.getData()).segment.segmentInfo,g=function(c,u,d){for(var p,h,f,m=c.cues.flatMap(function(c){return c.cuePoints}),g=Array(m.length),v=u-((f=(h=(p=c.cues&&c.cues[0])&&p.cuePoints&&p.cuePoints[0])&&h.trackPositions&&h.trackPositions[0])&&f.clusterPosition||0),y=m.length-1;y>=0;y--)g[y]={time:m[y].time,byteRange:{start:v+m[y].trackPositions[0].clusterPosition}},y===m.length-1?g[y].duration=d-g[y].time:(g[y].byteRange.end=g[y+1].byteRange.start-1,g[y].duration=g[y+1].time-g[y].time);return g}(f,parseInt(u.SegmentBase[0]._indexRange.split("-")[1])+1,m.getDuration()/m.getTimecodeScale());return{timescale:m.getTimecodeScale(),references:g}})},c.prototype.Gr=function(c,u){return"webm"===this.rr.split("/")[1]?this.Fr(c,u):Promise.resolve(this.Hr(c,u.anchorPoint))},c.prototype.Hr=function(c,u){if(!c||!u)return this.context.logger.debug("Error parsing SegmentIndex: Wrong Parameters"),null;var d=S.ModuleManager.get(_.ModuleName.ContainerMP4).parseBuffer(c).boxes.find(function(c){return"sidx"===c.type});return d?{timescale:d.timescale,references:function(c,u,d){for(var p=[],h=0;h<c.length;h++){var f=c[h],m=f.referenced_size,g=f.subsegment_duration,v=u,y=v+m-1;p.push({byteRange:{start:v,end:y},time:d,duration:g}),u+=m,d+=g}return p}(d.references,d.first_offset+u,d.earliest_presentation_time)}
vendor: 8,640 bytes, line 28
28:(this.context.logger.debug("Error parsing SegmentIndex: No sidx box found"),null)},c}()},12054:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.SegmentTemplateMPDHandler=void 0,u.getTimescaleFromTemplate=E;var h=d(80813),f=d(77179),m=d(89927),g=d(23068),v=d(58313),y=d(16197),b=d(54053),S=d(96693),_=d(4771);function E(c){return c&&null!=c._timescale&&parseInt(c._timescale)||1}u.SegmentTemplateMPDHandler=function(){function c(c,u){this.context=c,this.sourceContext=u,this.settings=c.settings,this.manifestService=c.serviceManager.get(h.ServiceName.ManifestService,u.sourceIdentifier),this.time=0}return c.prototype.getStartNumber=function(){var c=this.getTemplate(this.currentRepresentationId);return c&&c.hasOwnProperty("_startNumber")?parseInt(c._startNumber):1},c.prototype.Jr=function(){var c=this.getTemplate(this.currentRepresentationId);return c&&c._endNumber?parseInt(c._endNumber):0/0},c.prototype.setAdaptationSetId=function(c,u,d){void 0===u&&(u=null),this.currentAdaptationSetId=c,this.currentRepresentationId=u;var p=!this.currentRepresentationId||!!this.manifestService.getRepresentationById(this.currentRepresentationId),h=this.manifestService.getAdaptationSet(this.currentAdaptationSetId);this.currentRepresentationId&&p||(this.currentRepresentationId=h.Representation[0]._internalId),this.getTemplate(this.currentRepresentationId)?this.Ir||this.setIndex(this.getStartNumber()):this.context.logger.debug("No template found in SegmentTemplateMPDHandler."),this.resolvePendingSegmentInfoRequests()},c.prototype.getCurrentPeriod=function(){return this.manifestService.getPeriod(this.currentRepresentationId||this.currentAdaptationSetId)},c.prototype.setRepresentationId=function(c){return!!this.manifestService.getRepresentationById(c)&&(this.currentRepresentationId=c,!0)},c.prototype.getInitSegmentInfo=function(c){var u=this.getTemplate(c),d=this.manifestService.getRepresentationById(c);return(0,S.isInitializationStringNode)(u)?(0,S.provideSegmentInfoFromInitializationProperty)(u,d):null},c.prototype.Kr=function(){return parseFloat(this.getTemplate(this.currentRepresentationId)._availabilityTimeOffset)||0},c.prototype.Lr=function(c){var u=this.getExpectedPresentationTime(c);return u-=this.Kr(),(0,m.toMilliSeconds)(u+this.getSegmentDuration()+this.settings.LIVE_EDGE_DISTANCE)},c.prototype.getTemplate=function(c){var u=this.manifestService.getRepresentationById(c);if(null!=u&&u.SegmentTemplate)return u.SegmentTemplate[0]},c.prototype.Mr=function(){var c;return(null==(c=this.getCurrentPeriod())?void 0:c.start)||0},c.prototype.isExpectedSegmentPlaybackTimeExceedingPeriodDuration=function(c){var u=this.Jr();if(isFinite(u))return c>u;var d=this.getCurrentPeriod(),p=null!=d&&d._duration?d.start+d.duration:1/0;return this.getExpectedPresentationTime(c)>=p},c.prototype.checkIfSegmentAvailable=function(c){return this.Lr(c)<=Date.now()},c.prototype.getNextSegmentInfo_=function(){var c={isInitSegment:!1,presentationTimeOffset:this.getTimestampOffset()},u=this.getTemplate(this.currentRepresentationId);if(!u||!u._media||!this.manifestService.representationExists(this.currentRepresentationId))return null;if(this.manifestService.isLive()){var d=this.checkIfSegmentAvailable(this.Ir),p=this.isExpectedSegmentPlaybackTimeExceedingPeriodDuration(this.Ir);if(!d||p)return null;c.wallClockTime=this.Lr(this.Ir)-(0,m.toMilliSeconds)(this.getSegmentDuration())}var h=this.manifestService.getRepresentationById(this.currentRepresentationId);return c.periodId=null==h?void 0:h._internalId.periodId,c.url=(0,_.default)(u._media,h,this.Ir,this.time),c.segmentNumber=this.Ir,c.startTime=this.getExpectedPresentationTime(this.Ir),this.setIndex(this.Ir+1),c},c.prototype.getNextSegmentInfo=function(c){var u=this.getNextSegmentInfo_();return u?Promise.resolve(u):this.queueSegmentInfoRequest({time:c})},c.prototype.queueSegmentInfoRequest=function(c){var u=this;return this.pendingSegmentInfoRequest?Promise.reject("fail"):new Promise(function(d,h){u.pendingSegmentInfoRequest=p(p({},c),{resolve:d,reject:h})})},c.prototype.resolvePendingSegmentInfoRequests=function(){if(this.pendingSegmentInfoRequest){var c=this.getNextSegmentInfo_(),u=this.isExpectedSegmentPlaybackTimeExceedingPeriodDuration(this.Ir);c?(this.pendingSegmentInfoRequest.resolve(c),this.pendingSegmentInfoRequest=null):u&&(this.pendingSegmentInfoRequest.reject(b.SegmentInfoError.SEGMENT_EXCEEDING_PERIOD_DURATION),this.pendingSegmentInfoRequest=null)}},c.prototype.getSegmentInfos=function(c){var u=this,d={};return this.manifestService.getAdaptationSet(this.currentRepresentationId).Representation.forEach(function(p){var h,f,m,g=p._internalId,y=u.getTemplate(g),b=[],S=u.getSeekableRange().end-u.getSeekableRange().start,E=0,T=u.manifestService.isLive();T?(m=u.time-S,h=u.Ir-S/u.getSegmentDuration(),f=u.Ir):(m=y._presentationTimeOffset||0,f=parseInt((h=0)+S/u.getSegmentDuration()));for(var w=h;w<=f;w++){var P={};P.duration=u.getSegmentDuration(),P.startTime=T?u.getExpectedPresentationTime(w):E*u.getSegmentDuration();var A=(0,_.default)(y._media,p,h+E,m+E*u.getSegmentDuration());P.url=c?v.URLHelper.concatBaseUrlWithPartial(c,A):A,P.url=v.URLHelper.appendQueryParametersToUrl(P.url,u.settings.QUERY_PARAMETERS),b.push(P),E++}d[g.representationId]=b}),d},c.prototype.getSubtitleUrl=function(){var c=this.manifestService.getRepresentationById(this.currentRepresentationId).BaseURL[0];return c.url||c},c.prototype.Nr=function(){var c=this.getTemplate(this.currentRepresentationId);return c&&c.hasOwnProperty("_liveEdgeNumber")},c.prototype.Or=function(){if(this.Nr())return parseInt(this.getTemplate(this.currentRepresentationId)._liveEdgeNumber)},c.prototype.getSegmentDuration=function(){var c=this.getTemplate(this.currentRepresentationId),u=Number(null==c?void 0:c._duration),d=Number(null==c?void 0:c._timescale);return isNaN(u)?1:isNaN(d)?u:u/d},c.prototype.seekTo=function(c){c>-1&&this.setIndex(this.Pr(c))},c.prototype.getTimescale=function(){return E(this.getTemplate(this.currentRepresentationId))},c.prototype.getExpectedPresentationTime=function(c){var u=this.Mr();return(c-this.getStartNumber())*this.getSegmentDuration()+u},c.prototype.Pr=function(c){var u=this.getSegmentDuration();return Math.floor(Math.max(c-this.Mr()-u/2,0)/u)+this.getStartNumber()},c.prototype.getActualTimeShiftBufferDepth=function(){var c=this.Qr();return c.end-c.start},c.prototype.Qr=function(){var c=(0,f.getStartTimeOffset)(this.Rr().getState()),u=this.manifestService.getMediaPresentationDuration()||1/0;return this.manifestService.isLive()?this.Tr(u):this.Sr(c,u)},c.prototype.Rr=function(){return this.context.serviceManager.get(h.ServiceName.SourceStoreService,this.sourceContext.sourceIdentifier)},c.prototype.Sr=function(c,u){return{start:c,end:isFinite(u)?c+u:0}},c.prototype.Tr=function(c){var u=(this.manifestService.getFirstPeriod()||{start:0}).start,d=Math.min(-1*this.manifestService.getTimeShiftBufferDepthSeconds(),(0,m.toSeconds)(Date.now()-this.manifestService.getAvailabilityStartTime())),p=this.getLiveEdgeTime();return{start:Math.max(u,p-d),end:p}},c.prototype.getSeekableRange=function(){var c=this.Qr();if(this.manifestService.isLive()){var u=this.manifestService.getDesiredDistanceToLiveEdge();c.end=Math.max(c.end-u,c.start)}return c},c.prototype.hasNext=function(c){var u=this.isExpectedSegmentPlaybackTimeExceedingPeriodDuration(this.Ir),d=Math.ceil(c/this.getSegmentDuration())+this.getStartNumber()-1;return!u&&this.Ir<=d},c.prototype.getTimestampOffset=function(){var c=this.getCurrentPeriod(),u=0,d=this.getTemplate(this.currentRepresentationId);return d&&d._presentationTimeOffset&&(u=d._presentationTimeOffset/this.getTimescale()),c&&(u-=c.start),u},c.prototype.Ur=function(c,u){var d=this.manifestService.getPeriod(c)||this.getCurrentPeriod();return this.manifestService.isLastPeriod(c.periodId)?d&&(0,g.isNumber)(d.duration)&&isFinite(d.duration)?d.duration:d&&d.start?(0,m.toSeconds)(u)-d.start:this.manifestService.calculateCumulativePeriodDuration(c.periodId):this.manifestService.getPeriodDuration(c.periodId)},c.prototype.Vr=function(c){var u=Date.now(),d=(0,m.toSeconds)(u-this.manifestService.getRequestTimestamp());return this.Nr()?this.Or()+Math.floor(d/this.getSegmentDuration()):this.manifestService.isLive()&&this.manifestService.getManifest()._availabilityStartTime?Math.floor(this.Ur(c,u)/this.getSegmentDuration()+this.getStartNumber()):this.getStartNumber()}
28,c.prototype.Wr=function(c){return Math.max(this.Vr(c),this.getStartNumber())},c.prototype.getIndex=function(){return this.Ir},c.prototype.setIndex=function(c){this.Ir=c},c.prototype.getLiveEdgeTime=function(){return(0,m.toSeconds)(Date.now())},c.prototype.timeShift=function(c,u){if(void 0===u&&(u=this.currentRepresentationId.periodId),this.manifestService.isLive()){var d=this.Ir,p=this.Wr(new y.PeriodId(u));0===c?(this.setIndex(p),this.context.logger.debug("timeShift changes index from "+d+" to "+this.Ir+" [back to live edge]")):(this.setIndex(p+Math.floor(c/this.getSegmentDuration())),this.Ir<this.getStartNumber()&&this.setIndex(this.getStartNumber()),this.context.logger.debug("timeShift changes index from "+d+" to "+this.Ir))}},c.prototype.updateRepresentation=function(c){return this.currentRepresentationId=c,Promise.resolve(c)},c.prototype.isSegmentInfoLoaded=function(c){return!0},c.prototype.rewindOneSegment=function(){return this.setIndex(this.Ir-1),this.Ir<this.getStartNumber()&&(this.context.logger.debug("Template number is smaller than start number, probably a discontinuity. Using start number."),this.setIndex(this.getStartNumber())),!0},c.prototype.getPendingSegmentInfoRequest=function(){return this.pendingSegmentInfoRequest},c.prototype.setPendingSegmentInfoRequest=function(c){this.pendingSegmentInfoRequest=c},c.prototype.canSwitchRepresentation=function(c){return!0},c.prototype.getLatestTimeForPossibleSwitch=function(c){return c},c.prototype.adjustTimeToNextSegmentStart=function(c){return c},c.prototype.dispose=function(){this.settings=null,this.manifestService=null,this.currentRepresentationId=null,this.currentAdaptationSetId=null,this.pendingSegmentInfoRequest=null},c.prototype.setTimestampOffset=function(c,u){},c}()},31439:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)}),f=this&&this.__assign||function(){return(f=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.SegmentTimelineMPDHandler=void 0;var m=d(74853),g=d(89927),v=d(58313),y=d(54053),b=d(4771),S=d(12054),_=d(39761);function E(c,u,d){var p;(p=c.entries).push.apply(p,u),c.latestTime+=d*u.length,c.latestOriginalTime+=d*u.length,c.index+=u.length}function T(c){return Math.round(1e8*c)/1e8}u.SegmentTimelineMPDHandler=function(c){function u(u,d){var p=c.call(this,u,d)||this;return p.Xr=0,p.Yr=null,p.Zr=[],p.ar=!0,p.er=!1,p.br=1,p.cr=0,p.dr=0,p}return h(u,c),u.prototype.setAdaptationSetId=function(u,d,p){void 0===d&&(d=null),void 0===p&&(p={isPeriodSwitch:!1,isManifestUpdate:!1}),this.currentAdaptationSetId=u,this.currentRepresentationId=d;var h=!this.currentRepresentationId||!!this.manifestService.getRepresentationById(this.currentRepresentationId),f=this.manifestService.getAdaptationSet(this.currentAdaptationSetId);this.currentRepresentationId&&h||(this.currentRepresentationId=f.Representation[0]._internalId);var m=this.getTemplate(this.currentRepresentationId);m?(this.setTimeline(m,p.isPeriodSwitch),this.getIndex()||c.prototype.setIndex.call(this,this.getStartNumber())):this.context.logger.debug("No template found in SegmentTemplateMPDHandler."),this.resolvePendingSegmentInfoRequests()},u.prototype.setRepresentationId=function(c){if(this.manifestService.getRepresentationById(c)){this.currentRepresentationId=c;var u=this.getTemplate(this.currentRepresentationId);return u&&this.setTimeline(u),!0}return!1},u.prototype.fr=function(c){return(null==c?void 0:c.start)!=null&&isFinite(c.start)?c.start:0},u.prototype.gr=function(){this.manifestService.isLive()&&this.ar&&(this.er||this.timeShift(0),this.ar=!1)},u.prototype.hr=function(c){return!(null!=c&&c._media)||!this.manifestService.representationExists(this.currentRepresentationId)},u.prototype.ir=function(c){var u=this.Zr[this.Xr];u&&(c.wallClockTime=(0,g.toMilliSeconds)(u.ot/this.br-this.getTimestampOffset()))},u.prototype.getNextSegmentInfo_=function(){var u,d,p={isInitSegment:!1,presentationTimeOffset:this.getTimestampOffset()},h=this.getTemplate(this.currentRepresentationId);if(this.hr(h)||(this.gr(),!(this.Zr.length>0&&this.Xr<this.Zr.length)))return null;var f=this.Zr[this.Xr];c.prototype.setIndex.call(this,f.i),this.time=f.ot,p.duration=f.duration,p.mediaPresentationTime=f.t,p.segmentNumber=f.i;var m=null!=(d=null==(u=this.getCurrentPeriod())?void 0:u.start)?d:0;if(p.startTime=f.playbackTime+m,this.manifestService.isLive()){if(this.isExpectedSegmentPlaybackTimeExceedingPerio
vendor: 37,034 bytes, line 28
28dDuration(this.Xr))return null;this.ir(p)}var g=this.manifestService.getRepresentationById(this.currentRepresentationId);return g?(p.periodId=null==g?void 0:g._internalId.periodId,p.url=(0,b.default)(h._media,g,this.getIndex(),this.time),c.prototype.setIndex.call(this,this.getIndex()+1),this.Xr++,p):null},u.prototype.getNextSegmentInfo=function(c){var u=this.getNextSegmentInfo_();return u?Promise.resolve(u):this.queueSegmentInfoRequest({time:c})},u.prototype.queueSegmentInfoRequest=function(c){var u=this;return this.pendingSegmentInfoRequest?Promise.reject("fail"):new Promise(function(d,p){u.pendingSegmentInfoRequest=f(f({},c),{resolve:d,reject:p})})},u.prototype.resolvePendingSegmentInfoRequests=function(){if(this.pendingSegmentInfoRequest){var c=this.getNextSegmentInfo_();if(c)this.pendingSegmentInfoRequest.resolve(c),this.pendingSegmentInfoRequest=null;else if(!this.manifestService.isSmoothManifest()){var u=this.getCurrentPeriod();if(isFinite(u.duration)){var d=this.getTimelineDuration(),p=d/this.getTimelineLength(),h=u.start+d,f=u.duration-p/2;isFinite(f)&&h>=f&&(this.pendingSegmentInfoRequest.reject(y.SegmentInfoError.PERIOD_COMPLETE),this.pendingSegmentInfoRequest=null)}}}},u.prototype.getSegmentInfos=function(c){var u=this,d={};return this.manifestService.getAdaptationSet(this.currentRepresentationId).Representation.forEach(function(p){for(var h=p._internalId,f=u.getTemplate(h),m=[],g=u.manifestService.isLive(),y=u.getTimelineLength(),S=0,_=0;_<y;_++){var E=u.Zr[_],T={};T.duration=E.duration,g?T.startTime=u.getExpectedPresentationTime(_):(T.startTime=S,S+=E.duration);var w=(0,b.default)(f._media,p,E.i,E.ot);T.url=c?v.URLHelper.concatBaseUrlWithPartial(c,w):w,T.url=v.URLHelper.appendQueryParametersToUrl(T.url,u.settings.QUERY_PARAMETERS),m.push(T)}d[h.representationId]=m}),d},u.prototype.getSubtitleUrl=function(){var c=this.manifestService.getRepresentationById(this.currentRepresentationId).BaseURL[0];return c.url||c},u.prototype.getSegmentDuration=function(){return this.getSegmentDurationCurrentElement()},u.prototype.seekTo=function(u){if(u>-1){var d=this.fr(this.getCurrentPeriod());this.er=!1,isFinite(d)&&(u-=d);for(var p=1;p<this.Zr.length;p++)if(this.Zr[p].playbackTime>u)return this.Xr=p-1,c.prototype.setIndex.call(this,this.Zr[this.Xr].i),this.ar=!1,this.getIndex();this.Xr=Math.max(this.Zr.length-1,0)}return c.prototype.setIndex.call(this,this.Zr[this.Xr].i),this.getIndex()},u.prototype.getExpectedPresentationTime=function(c){var u,d;return(null!=(d=null==(u=this.getCurrentPeriod())?void 0:u.start)?d:0)+this.Zr[c].playbackTime},u.prototype.hasNext=function(c){if(this.Xr<this.Zr.length){var u=this.Zr[0].t,d=this.Zr[this.Xr];if(this.isExpectedSegmentPlaybackTimeExceedingPeriodDuration(this.Xr))return!1;if(d)return d.t-u<=c*this.br}return!1},u.prototype.getTimestampOffset=function(){var c=this.getCurrentPeriod(),u=this.cr/this.br;return c&&(u-=c.start),u},u.prototype.setIndex=function(u){if(c.prototype.setIndex.call(this,u),this.Zr&&this.Zr.length>0)for(var d=0;d<this.Zr.length;d++)this.Zr[d].i===u&&(this.Xr=d)},u.prototype.getLiveEdgeTime=function(){if(!this.manifestService.isLive())return -1;var u=this.manifestService.getLastPeriod(),d=this.getCurrentPeriod();if(null==u||(null==d?void 0:d._id)===u._id)return this.fr(d)+this.jr()/this.br;var p=(0,_.getFirstAvSegmentTemplateFromPeriod)(u);return null!=p&&p.SegmentTimeline?this.fr(u)+(0,_.calculateTimelineEnd)(p):c.prototype.getLiveEdgeTime.call(this)},u.prototype.jr=function(){if(!this.Zr.length)return 0;var c=this.Zr[this.Zr.length-1];return c.t+c.d},u.prototype.timeShift=function(u,d){if(this.manifestService.isLive()&&!(this.Zr.length<1)){this.er=!1;for(var p=this.Zr[0].t,h=this.jr(),f=u*this.br,m=Math.max(this.dr,this.settings.MIN_TIMELINE_LIVE_OFFSET)*this.br,g=Math.max(p+m,h+f),v=this.Zr.length-1;v>=0;v--)if(this.Zr[v].t<=g){this.Xr=v;break}(this.Xr>=this.Zr.length||this.Xr<=0)&&(this.context.logger.debug("timeline index ran out of bounds on timeShift, falling back to 0"),this.Xr=0),this.context.logger.debug("timeShift changes index to "+this.Xr),this.ar=!1,c.prototype.setIndex.call(this,this.Zr[this.Xr].i)}},u.prototype.updateRepresentation=function(c){return this.currentRepresentationId=c,Promise.resolve(c)},u.prototype.isSegmentInfoLoaded=function(c){return!0},u.prototype.rewindOneSegment=function(){return this.Xr--,this.Xr<0&&(this.context.logger.debug("Timeline array index is smaller than 0, probably a discontinuity. Using 0."),this.Xr=0),!0},u.prototype.kr=function(c,u){for(var d,p={entries:[],latestTime:0,latestOriginalTime:0,lastPreviousTimelineEntryIndex:0,index:this.getStartNumber()},h=0,f=0,m=0;m<c.length;m++)for(var g=0,v=null!=(d=c[m].S)?d:[];g<v.length;g++){var y=v[g],b=(0,_.parseStringToNumber)(y._r),S=parseInt(y._d);if(y.hasOwnProperty("_t")){var T=(0,_.parseStringToNumber)(y._t);p.latestOriginalTime=T,p.latestTime=T-this.cr}for(;p.latestTime+S<=0&&b>=0;)this.context.logger.debug("Negative timeline entry detected, discarding segment. Time: ".concat(p.latestTime,", presentationTimeOffset: ").concat(this.cr,".")),p.latestTime+=S,p.latestOriginalTime+=S,b--;for(var w=this.nr(p,u,S,b),P=0;P<w.length;P++)w[P].i=p.index+P;h+=w.length,E(p,w,S);var A=b-w.length+1;f+=A,E(p,this.mr(p,A,S),S)}return this.lr(h,f),p.entries},u.prototype.lr=function(c,u){var d;this.context.logger.debug("[SegmentTimeline][".concat(null==(d=this.currentRepresentationId)?void 0:d.representationId,"] Re-using ").concat(c," entries, adding ").concat(u," new entries"))},u.prototype.mr=function(c,u,d){for(var p=[],h=0;h<u;h++){var f=c.latestTime+d*h,m={d:d,t:f,ot:c.latestOriginalTime+d*h,i:c.index+h,playbackTime:f/this.br,duration:d/this.br};p.push(m)}return p},u.prototype.nr=function(c,u,d,p){var h=(0,m.findIndexWithin)(u,c.lastPreviousTimelineEntryIndex,u.length,function(u){return u.t===c.latestTime&&u.d===d});if(-1===h)return[];var f=function(c,u,d,p){for(var h=c[u].t,f=p;f>0;f--){var m=u+f,g=c[m],v=h+d*f;if(g&&g.t===v&&g.d===d)return m}return u}(u,h,d,p);return c.lastPreviousTimelineEntryIndex=f,u.slice(h,f+1)},u.prototype.getTimelineDuration=function(){var c=this;return this.Zr&&this.Zr.length>0&&isFinite(this.br)?this.Zr.reduce(function(u,d){return u+d.d/c.br},0):0},u.prototype.getTimelineLength=function(){return this.Zr?this.Zr.length:0},u.prototype.setTimeline=function(c,u){void 0===u&&(u=!1);var d=c.SegmentTimeline;if(this.er=this.er||!!u,d&&this.Yr!==d){this.Yr=d;var p=this.ys(),h=this.getTimescale();this.br=h,this.cr=parseFloat(String(c._presentationTimeOffset))||0;var f=this.kr(d,this.Zr);f.length>0&&(this.dr=f[0].d/h),this.zs(f,h,p),this.Zr=f}},u.prototype.ys=function(){return this.Zr&&this.Zr.length>0?this.br:this.getTimescale()},u.prototype.zs=function(u,d,p){var h,f=!1;if(this.Zr&&this.Zr.length>0?h=(f=this.Xr>=this.Zr.length)?this.Zr[this.Zr.length-1]:this.Zr[this.Xr]:(this.Xr=0,c.prototype.setIndex.call(this,0)),h){for(var m=u.length-1;m>=0;m--)if(function(c,u,d,p){var h=T(c.t/u),f=T(h+c.d/u),m=T(d.t/p);return h<=m&&m<f}(u[m],d,h,p)){this.Xr=m+ +!!f,c.prototype.setIndex.call(this,u[m].i+ +!!f);break}}},u.prototype.getSegmentDurationCurrentElement=function(){var c=this.Zr[this.Xr];return c?c.d/this.br:1},u.prototype.dispose=function(){this.settings=null,this.Zr=[]},u}(S.SegmentTemplateMPDHandler)},4771:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.default=function(c,u,d,h){var f=c.match(/(\$((RepresentationID)|(Bandwidth)|(Time)|(Number(%([\d]*[A-Za-z]))?)|())\$)/g),m=null!=d,g=u.hasOwnProperty("_bandwidth"),v=null!=h,y=[].concat(f).filter(function(c){return c}).map(function(c){return c.substring(1,c.length-1)}).map(function(c){return[c,function(c){if(0===c.indexOf("Number")&&m){if(c.indexOf("%")>-1){for(var p,f,y,b,S,_=(f=parseInt((p=c.substring(c.indexOf("%")+1)).substring(0,p.length-1)),y=p[p.length-1].toLowerCase(),b=0!==p[p.length-1].indexOf(y),[0===y.indexOf("o")?8:0===y.indexOf("x")?16:(y.indexOf("d"),10),f,b]),E=_[0],T=_[1],w=_[2],P=(S=d.toString(E),w?S.toUpperCase():S.toLowerCase());P.length<T;)P="0"+P;return P}return String(d)}return 0===c.indexOf("RepresentationID")?u._internalId.representationId:0===c.indexOf("Bandwidth")&&g?String(u._bandwidth):0===c.indexOf("Time")&&v?String(h):""===c?"$":void 0}(c)]}).filter(function(c){return c[1].length>0}).reduce(function(c,u){var d=u[0],p=u[1];return c.replace("$".concat(d,"$"),p)},c);return(0,p.forceReallocation)(y)};var p=d(20649)},39761:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.getFirstAvSegmentTemplateFromPeriod=function(c){var u,d=c.AdaptationSet.find(function(c){return p.MimeTypeHelper.isAV(c._mimeType)}),h=null==(u=null==d?void 0:d.Representation[0])?void 0:u.SegmentTemplate;return null==h?void 0:h[0]},u.calculateTimelineEnd=function(c){for(var u,d,p=parseFloat(String(c._presentationTimeOffset))||0,m=(0,h.getTimescaleFromTemplate)(c),g=0,v=0,y=null!=(u=c.SegmentTimeline)?u:[];v<y.length;v++)for(var b=0,S=null!=(d=y[v].S)?d:[];b<S.length;b++){var _=S[b],E=f(_._r),T=parseInt(_._d);_.hasOwnProperty("_t")&&(g=Math.max(0,f(_._t)-p)),g+=T*(E+1)}return g/m},u.parseStringToNumber=f;var p=d(85434),h=d(12054);function f(c,u){return void 0===u&&(u=0),c?parseInt(c):u}}},function(c){return c(c.s=66759)}])}(bitmovinplayerDash);var bitmovinplayerDashExports=bitmovinplayerDash.exports;let DashModule=getDefaultExportFromCjs$1(bitmovinplayerDashExports);var bitmovinplayerContainerMp4={exports:{}};!function(c){var u;self,c.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[270],{97441:function(c,u){var d=this&&this.__assign||function(){return(d=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};function p(c){return void 0===c&&(c=0),{offset:c}}function h(c){return 0===c.length?null:c[0]}function f(c,u){var d=u.indexOf("."),p=[];if(-1===d)for(var h=0;h<c.length;h++)c[h].type===u&&p.push(c[h]);else{var f=u.substring(0,d),m=u.substring(d+1);for(h=0;h<c.length;h++)c[h].type===f&&(p=p.concat(c[h].list(m)))}return p}function m(c,d){c.forEach(function(c){u.ISOBox.prototype._boxParsers[c]=d})}function g(c,u){return c._cursor.offset-c._raw.byteOffset+u<=c.size}Object.defineProperty(u,"__esModule",{value:!0}),u.ISOBox=u.ISOFile=u.ISOBoxer=void 0,u.ISOBoxer={parseBuffer:function(c,d){return void 0===d&&(d={}),new u.ISOFile(c,d).parse()}},u.ISOFile=function(c,u){void 0===u&&(u={}),this.options=d({},u),this.options.iv_size=u.iv_size||8,c&&(this._raw=new DataView(c)),this._cursor=p(),this.boxes=[]},u.ISOFile.prototype.fetch=function(c){var u=this.fetchAll(c,!0);return u.length?u[0]:null},u.ISOFile.prototype.fetchAll=function(c,d){var p=[];return u.ISOFile._sweep.call(this,c,p,d),p},u.ISOFile.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var c=u.ISOBox.parse(this);if(void 0===c.type)break;this.boxes.push(c)}return this},u.ISOFile._sweep=function(c,d,p){for(var h in this.type&&this.type===c&&d.push(this),this.boxes){if(d.length&&p)return;u.ISOFile._sweep.call(this.boxes[h],c,d,p)}},u.ISOFile.prototype.get=function(c){return h(this.list(c))},u.ISOFile.prototype.list=function(c){return f(this.boxes,c)},u.ISOBox=function(){this._cursor=p()},u.ISOBox.parse=function(c){var d=new u.ISOBox;return d._offset=c._cursor.offset,d._root=c._root?c._root:c,d._raw=c._raw,d._parent=c,d._parseBox(),c._cursor.offset=d._raw.byteOffset+d._raw.byteLength,d},u.ISOBox.prototype.list=function(c){return f(this.boxes||this.entries||[],c)},u.ISOBox.prototype.get=function(c){return h(this.list(c))},u.ISOBox.prototype._readUint64=function(){return 0x100000000*this._raw.getUint32(this._cursor.offset-this._raw.byteOffset)+this._raw.getUint32(this._cursor.offset-this._raw.byteOffset+4)},u.ISOBox.prototype._readInt64=function(){return 0x100000000*this._raw.getInt32(this._cursor.offset-this._raw.byteOffset)+this._raw.getInt32(this._cursor.offset-this._raw.byteOffset+4)},u.ISOBox.prototype._readInt=function(c){var u=null;switch(c){case 8:u=this._raw.getInt8(this._cursor.offset-this._raw.byteOffset);break;case 16:u=this._raw.getInt16(this._cursor.offset-this._raw.byteOffset);break;case 32:u=this._raw.getInt32(this._cursor.offset-this._raw.byteOffset);break;case 64:u=this._readInt64()}return this._cursor.offset+=c>>3,u},u.ISOBox.prototype._readUint=function(c){var u=null;switch(c){case 8:u=this._raw.getUint8(this._cursor.offset-this._raw.byteOffset);break;case 16:u=this._raw.getUint16(this._cursor.offset-this._raw.byteOffset);break;case 24:u=(this._raw.getUint16(this._cursor.offset-this._raw.byteOffset)<<8)+this._raw.getUint8(this._cursor.offset-this._raw.byteOffset+2);break;case 32:u=this._raw.getUint32(this._cursor.offset-this._raw.byteOffset);break;case 64:u=this._readUint64()}return this._cursor.offset+=c>>3,u},u.ISOBox.prototype._readUintArray=function(c,u){for(var d=Array(u),p=0;p<u;++p)d[p]=this._readUint(c);return d},u.ISOBox.prototype._readFP=function(c){return this._readInt(2*c)/Math.pow(2,c)},u.ISOBox.prototype._readString=function(c){for(var u="",d=0;d<c;d++)u+=String.fromCharCode(this._readUint(8));return u},u.ISOBox.prototype._readHex=function(c){for(var u=[],d=0;d<c;d++){var p=this._readUint(8);u.push((p>>>4).toString(16)),u.push((15&p).toString(16))}return u.join("")},u.ISOBox.prototype._readUUID=function(){return this._readUintArray(8,16)},u.ISOBox.prototype._readTerminatedString=function(){for(var c="";;){var u=this._readUint(8);if(0==u)break;c+=String.fromCharCode(u)}return c},u.ISOBox.prototype._readTemplate=function(c){return this._readUint(c/2)+this._readUint(c/2)/Math.pow(2,c/2)},u.ISOBox.prototype._parseBox=function(){if(this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)this._root._incomplete=!0;else{switch(this.size=this._readUint(32),this.type=this._readString(4),1===this.size&&(this.largesize=this._readUint(64)),"uuid"===this.type&&(this.usertype=this._readUUID()),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset,this._raw.byteLength-this._cursor.offset);break;case 1:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.largesize);break;default:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.size)}!this._incomplete&&this._boxParsers[this.type]&&this._boxParsers[this.type].call(this)}},u.ISOBox.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},u.ISOBox.prototype._createDataView=function(){return new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset))},u.ISOBox.prototype._boxParsers={},m(["moov","trak","tref","mdia","minf","stbl","edts","dinf","sinf","mvex","moof","traf","mfra","udta","meco","strk","vttc","schi"],function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(u.ISOBox.parse(this))}),u.ISOBox.prototype._boxParsers.elst=function(){this._parseFullBox(),this.entry_count=this._readUint(32),this.entries=[];for(var c=1;c<=this.entry_count;c++){var d=new u.ISOBox;1===this.version?(d.segment_duration=this._readUint(64),d.media_time=this._readInt(64)):(d.segment_duration=this._readUint(32),d.media_time=this._readInt(32)),d.media_rate_integer=this._readInt(16),d.media_rate_fraction=this._readInt(16),this.entries.push(d)}},u.ISOBox.prototype._boxParsers.emsg=function(){this._parseFullBox(),0===this.version?(this.scheme_id_uri=this._readTerminatedString(),this.value=this._readTerminatedString(),this.timescale=this._readUint(32),this.presentation_time_delta=this._readUint(32),this.event_duration=this._readUint(32),this.id=this._readUint(32)):(this.timescale=this._readUint(32),this.presentation_time=this._readUint(64),this.event_duration=this._readUint(32),this.id=this._readUint(32),this.scheme_id_uri=this._readTerminatedString(),this.value=this._readTerminatedString()),this.message_data=this._createDataView()},m(["free","mdat"],function(){this.data=this._createDataView()}),m(["ftyp","styp"],function(){for(this.major_brand=this._readString(4),this.minor_versions=this._readUint(32),this.compatible_brands=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.compatible_brands.push(this._readString(4))}),u.ISOBox.prototype._boxParsers.hdlr=function(){this._parseFullBox(),this.pre_defined=this._readUint(32),this.handler_type=this._readString(4),this.reserved=[this._readUint(32),this._readUint(32),this._readUint(32)],this.name=this._readTerminatedString()},u.ISOBox.prototype._boxParsers.mdhd=function(){this._parseFullBox(),1==this.version?(this.creation_time=this._readUint(64),this.modification_time=this._readUint(64),this.timescale=this._readUint(32),this.duration=this._readUint(64)):(this.creation_time=this._readUint(32),this.modification_time=this._readUint(32),this.timescale=this._readUint(32),this.duration=this._readUint(32));var c=this._readUint(16);this.pad=c>>15,this.language=String.fromCharCode(96+(c>>10&31),96+(c>>5&31),96+(31&c)),this.pre_defined=this._readUint(16)},u.ISOBox.prototype._boxParsers.mfhd=function(){this._parseFullBox(),this.sequence_number=this._readUint(32)},u.ISOBox.prototype._boxParsers.mvhd=function(){this._parseFullBox(),1===this.version?(this.creation_time=this._readUint(64),this.modification_time=this._readUint(64),this.timescale=this._readUint(32),this.duration=this._readUint(64)):(this.creation_time=this._readUint(32),this.modification_time=this._readUint(32),this.timescale=this._readUint(32),this.duration=this._readUint(32)),this.rate=this._readTemplate(32),this.volume=this._readTemplate(16),this.reserved1=this._readUint(16),this.reserved2=[this._readUint(32),this._readUint(32)],this.matrix=[];for(var c=0;c<9;c++)this.matrix.push(this._readTemplate(32));for(this.pre_defined=[],c=0;c<6;c++)this.pre_defined.push(this._readUint(32));this.next_track_ID=this._readUint(32)},u.ISOBox.prototype._boxParsers.sidx=function(){this._parseFullBox(),this.reference_ID=this._readUint(32),this.timescale=this._readUint(32),0===this.version?(this.earliest_presentation_time=this._readUint(32),this.first_offset=this._readUint(32)):(this.earliest_presentation_time=this._readUint(64),this.first_offset=this._readUint(64)),this.reserved=this._readUint(16),this.reference_count=this._readUint(16),this.references=[];for(var c=0;c<this.reference_count;c++){var u={},d=this._readUint(32);u.reference_type=d>>31&1,u.referenced_size=0x7fffffff&d,u.subsegment_duration=this._readUint(32);var p=this._readUint(32);u.starts_with_SAP=p>>31&1,u.SAP_type=p>>28&7,u.SAP_delta_time=0xfffffff&p,this.references.push(u)}},u.ISOBox.prototype._boxParsers.ssix=function(){this._parseFullBox(),this.subsegment_count=this._readUint(32),this.subsegments=[];for(var c=0;c<this.subsegment_count;c++){var u={};u.ranges_count=this._readUint(32),u.ranges=[];for(var d=0;d<u.ranges_count;d++){var p={};p.level=this._readUint(8),p.range_size=this._readUint(24),u.ranges.push(p)}this.subsegments.push(u)}},u.ISOBox.prototype._boxParsers.tfdt=function(){this._parseFullBox(),1===this.version?this.baseMediaDecodeTime=this._readUint(64):this.baseMediaDecodeTime=this._readUint(32)},u.ISOBox.prototype._boxParsers.tfhd=function(){this._parseFullBox(),this.track_ID=this._readUint(32),1&this.flags?(this.base_data_offset_present=!0,this.base_data_offset=this._readUint(64)):131072&this.flags&&(this.default_base_is_moof=!0),2&this.flags&&(this.sample_description_offset=this._readUint(32)),8&this.flags&&(this.default_sample_duration=this._readUint(32)),16&this.flags&&(this.default_sample_size=this._readUint(32)),32&this.flags&&(this.default_sample_flags=this._readUint(32))},u.ISOBox.prototype._boxParsers.tkhd=function(){this._parseFullBox(),1===this.version?(this.creation_time=this._readUint(64),this.modification_time=this._readUint(64),this.track_ID=this._readUint(32),this.reserved1=this._readUint(32),this.duration=this._readUint(64)):(this.creation_time=this._readUint(32),this.modification_time=this._readUint(32),this.track_ID=this._readUint(32),this.reserved1=this._readUint(32),this.duration=this._readUint(32)),this.reserved2=[this._readUint(32),this._readUint(32)],this.layer=this._readUint(16),this.alternate_group=this._readUint(16),this.volume=this._readTemplate(16),this.reserved3=this._readUint(16),this.matrix=[];for(var c=0;c<9;c++)this.matrix.push(this._readTemplate(32));this.width=this._readTemplate(32),this.height=this._readTemplate(32)},u.ISOBox.prototype._boxParsers.trun=function(){this._parseFullBox(),this.sample_count=this._readUint(32),1&this.flags&&(this.data_offset_present=!0,this.data_offset=this._readInt(32)),4&this.flags&&(this.first_sample_flags=this._readUint(32)),this.samples=[];for(var c=0;c<this.sample_count;c++){var u={};256&this.flags&&(u.sample_duration=this._readUint(32)),512&this.flags&&(u.sample_size=this._readUint(32)),1024&this.flags&&(u.sample_flags=this._readUint(32)),2048&this.flags&&(0==this.version?u.sample_composition_time_offset=this._readUint(32):u.sample_composition_time_offset=this._readInt(32)),this.samples.push(u)}},u.ISOBox.prototype._boxParsers.trex=function(){this._parseFullBox(),this.track_ID=this._readUint(32),this.default_sample_description_index=this._readUint(32),this.default_sample_duration=this._readUint(32),this.default_sample_size=this._readUint(32),this.default_sample_flags=this._readUint(32)},u.ISOBox.prototype._boxParsers.stsd=function(){for(this._parseFullBox(),this.entry_count=this._readUint(32),this.entries=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.entries.push(u.ISOBox.parse(this))},u.ISOBox.prototype._boxParsers.encv=function(){for(this._readHex(6),this.data_reference_index=this._readUint(16),this._readUint(16),this._readUint(16),this._readUint(32),this._readUint(32),this._readUint(32),this.width=this._readUint(16),this.height=this._readUint(16),this.horizresolution=this._readTemplate(32),this.vertresolution=this._readTemplate(32),this._readUint(32),this.frame_count=this._readUint(16),this._readUint(8),this.compressor_name=this._readString(4),this.depth=this._readUint(16),this._readUint(16),this._readHex(27),this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(u.ISOBox.parse(this))},m(["enca","mp4a"],function(){for(this._readHex(6),this.data_reference_index=this._readUint(16),this._readUint(32),this._readUint(32),this.channel_count=this._readUint(16),this.sample_size=this._readUint(16),this._readUint(16),this._readUint(16),this.sample_rate=this._readUint(32)>>>16,this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(u.ISOBox.parse(this))}),m(["avc1","hvc1","hev1"],function(){this._readUint(32),this._readUint(16),this.data_reference_index=this._readUint(16),this.version=this._readUint(16),this.revision_level=this._readUint(16),this.vendor=this._readUint(32),this.temporal_quality=this._readUint(32),this.spatial_quality=this._readUint(32),this.width=this._readUint(16),this.height=this._readUint(16),this.horizontal_resolution=this._readTemplate(32),this.vertical_resolution=this._readTemplate(32),this.data_size=this._readUint(32),this.frame_count=this._readUint(16);var c=this._readUint(8);this.compressor_name="";for(var d=0;d<31;d++){var p=this._readUint(8);d<c&&(this.compressor_name+=String.fromCharCode(p))}for(this.depth=this._readUint(16),this._readInt(16),this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(u.ISOBox.parse(this))}),u.ISOBox.prototype._boxParsers.avcC=function(){this.configuration_version=this._readUint(8),this.avc_profile_indication=this._readUint(8),this.profile_compatibility=this._readUint(8),this.avc_level_indication=this._readUint(8);var c=this._readUint(8);this.complete_representation=c>>>7&1,this.length_size_minus_one=3&c,this.num_sps=31&this._readUint(8),this.sps=[];for(var u=0;u<this.num_sps;++u)this.sps.push(this._readUintArray(8,this._readUint(16)));for(this.num_pps=31&this._readUint(8),this.pps=[],u=0;u<this.num_pps;++u)this.pps.push(this._readUintArray(8,this._readUint(16)))},u.ISOBox.prototype._boxParsers.hvcC=function(){var c;this.configurationVersion=this._readUint(8),c=this._readUint(8),this.general_profile_space=c>>>6,this.general_tier_flag=c>>>5&1,this.general_profile_idc=31&c,this.general_profile_compatibility_flags=this._readUint(32),this.general_constraint_indicator_flags_bytes=[];for(var u=0;u<6;u++)this.general_constraint_indicator_flags_bytes[u]=this._readUint(8);this.general_level_idc=this._readUint(8),this.min_spatial_segmentation_idc=4095&this._readUint(16),this.parallelismType=3&this._readUint(8),this.chroma_format_idc=3&this._readUint(8),this.bit_depth_luma_minus8=7&this._readUint(8),this.bit_depth_chroma_minus8=7&this._readUint(8),this.avgFrameRate=this._readUint(16),c=this._readUint(8),this.constantFrameRate=c>>>6,this.numTemporalLayers=c>>>3&7,this.temporalIdNested=c>>>2&1,this.lengthSizeMinusOne=3&c,this.numOfArrays=this._readUint(8)},u.ISOBox.prototype._boxParsers.esds=function(){this._parseFullBox(),this._readUint(16),this.esId=this._readUint(16),this.streamPriority=31&this._readUint(8),this._readUint(16),this.decoderConfig={},this.decoderConfig.objectProfileIndication=this._readUint(8),this.decoderConfig.streamType=this._readUint(8)>>>2&63,this.decoderConfig.bufferSize=this._readUint(24),this.decoderConfig.maxBitrate=this._readUint(32),this.decoderConfig.avgBitrate=this._readUint(32),this.decoderConfig.decoderConfigDescriptor={},this.decoderConfig.decoderConfigDescriptor.tag=this._readUint(8),this.decoderConfig.decoderConfigDescriptor.length=this._readUint(8);var c=this._readUint(8),u=this._readUint(8),d=this.decoderConfig.decoderConfigDescriptor;d.audioObjectType=c>>>3&31,d.samplingFrequencyIndex=(7&c)<<1|u>>>7&1,d.channelConfiguration=u>>>3&15},u.ISOBox.prototype._boxParsers.tenc=function(){this._parseFullBox(),this.default_is_encrypted=1===this._readUint(24),this.default_iv_size=this._readUint(8),this.default_kid=this._readHex(16)},u.ISOBox.prototype._boxParsers.senc=function(){var c=this;this._parseFullBox(),this.sample_count=this._readUint(32),this.samples=Array.apply(null,Array(this.sample_count)).map(function(u){if(g(c,c._root.options.iv_size)){var p,h={iv:c._readHex(c._root.options.iv_size)};return c.flags&&(p=h,h=g(c,2)?(p.subsample_count=c._readUint(16),p.subsamples=Array.apply(null,Array(p.subsample_count)).map(function(u){return g(c,6)?{bytes_of_clear_data:c._readUint(16),bytes_of_encrypted_data:c._readUint(32)}:{bytes_of_clear_data:0,bytes_of_encrypted_data:0}}),p):d(d({},p),{subsample_count:0,subsamples:[]})),h}c.samples=[]})},u.ISOBox.prototype._boxParsers.frma=function(){this.codingname=this._readString(4)},u.ISOBox.prototype._boxParsers.schm=function(){this._parseFullBox(),this.scheme_type=this._readString(4),this.scheme_version=this._readUint(32),1&this.flags&&(this.scheme_uri=this._readUint(8))},u.ISOBox.prototype._boxParsers.saiz=function(){if(this._parseFullBox(),1&this.flags&&(this.aux_info_type=this._readUint(32),this.aux_info_type_parameter=this._readUint(32)),this.default_sample_info_size=this._readUint(8),this.sample_count=this._readUint(32),0===this.default_sample_info_size){this.sample_info_size=[];for(var c=0;c<this.sample_count;++c)this.sample_info_size.push(this._readUint(8))}},u.ISOBox.prototype._boxParsers.pssh=function(){if(this._parseFullBox(),this.system_id=this._readUUID(),this.version>0){this.kid_count=this._readUint(32),this.kids=[];for(var c=0;c<this.kid_count;++c)this.kids.push(this._readString(16))}this.data_size=this._readUint(32),this.data=new DataView(this._raw.buffer,this._cursor.offset,this.data_size)},u.ISOBox.prototype._boxParsers.prft=function(){this._parseFullBox(),this.reference_track_ID=this._readUint(32),this.ntp_timestamp_seconds=this._readUint(32),this.ntp_timestamp_seconds_fraction=this._readUint(32),0===this.version?this.media_time=this._readUint(32):this.media_time=this._readUint(64)}},51700:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.CmafChunkParser=void 0;var p=d(74853);u.CmafChunkParser=function(){function c(c){this.Qy=c,this.Ry=new ArrayBuffer(0)}return c.parseIsoBoxType=function(c,u){return String.fromCharCode(c[u])+String.fromCharCode(c[u+1])+String.fromCharCode(c[u+2])+String.fromCharCode(c[u+3])},c.prototype.appendData=function(c){this.Ry=p.ArrayHelper.concatBuffers(this.Ry,c)},c.prototype.getCompleteChunks=function(){var u=c.findCompleteCmafChunks(this.Ry);if(0===u.length)return null;this.Qy.logger.insane("Found ".concat(u.length," CMAF chunks"));var d=u[u.length-1].end,p=this.Ry.slice(0,d);return this.Ry=this.Ry.slice(d),p},c.findCompleteCmafChunks=function(u){if(!u||u.byteLength<8)return[];for(var d=new DataView(u),p=[],h=["moof","mdat"],f=0,m=[],g=0;g+8<u.byteLength;){var v=d.getUint32(g),y=c.parseIsoBoxType(new Uint8Array(u),g+4);if(0===v)break;g+v<=u.byteLength&&(m.push(y),y===h[0]&&h.shift(),0===h.length&&(p.push({start:f,end:g+v,boxes:m}),h=["moof","mdat"],f=g+v+1,m=[])),g+=v}return p},c.prototype.reset=function(){this.Ry.byteLength>0&&this.Qy.logger.debug("CMAF chunk parser discarded ".concat(this.Ry.byteLength," bytes")),this.Ry=new ArrayBuffer(0)},c}()},12392:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.MP4Decrypter=void 0;var p=d(97441),h=d(74853),f=d(70233),m=d(2992),g=d(88052),v=d(62756);u.MP4Decrypter=function(){function c(c,u,d){this.Sy=c,this.Ty=u,this.Vy=!1,this.ay=d,this.Uy=[]}return c.prototype.parseInitSegment=function(c){var u=this;this.Vy=!1;for(var d=p.ISOBoxer.parseBuffer(c),g=d._raw.buffer,v=function(c){var u=[],d=[];d.push.apply(d,c.list("moov.pssh")),d.push.apply(d,c.list("moof.pssh"));for(var p=0;p<d.length;p++){var h=d[p];h.kids&&h.kids.length>0&&u.push.apply(u,h.kids)}return u}(d),y=0;y<v.length;y++){var b=v[y];this.by(b)}var S=d.get("moov.trak.mdia.minf.stbl.stsd").entries[0];return S.list("sinf").forEach(function(c){var p=c.get("frma"),g=c.get("schm"),v=c.get("schi.tenc");if(p&&v&&g){for(var y=0;y<4;++y)d._raw.setUint8(S._offset+4+y,p.codingname.charCodeAt(y));u.Yy=v.default_is_encrypted,u.Zy=v.default_iv_size,u.Xy=v.default_kid,u.Vy=!0;var b=h.ArrayHelper.arrayBufferToAsciiString(f.FormatHelper.hexToBytes(u.Xy).buffer,!0);u.by(b)}(0,m.rewriteMp4BoxType)(c,"free")}),Promise.resolve(g)},c.prototype.by=function(c){this.Uy.includes(c)||this.Uy.push(c)},c.prototype.getKeyIds=function(){return this.Uy},c.prototype.addKeys=function(c){for(var u=function(c){var u=d.Ty.find(function(u){return u.kid===c.kid});u?u.key=c.key:d.Ty.push(c)},d=this,p=0;p<c.length;p++)u(c[p])},c.prototype.getKey=function(){var c;if(this.Wy)return this.Wy;for(var u in this.Ty)if(this.Ty.hasOwnProperty(u)&&this.Ty[u].hasOwnProperty("key")&&this.Ty[u].hasOwnProperty("kid")&&this.Ty[u].kid===this.Xy){c=this.Ty[u].key;break}return void 0===c&&(c=this.Ty[0].key),"string"==typeof c?this.Wy=f.FormatHelper.hexToBytes(c).buffer:c instanceof Uint8Array?this.Wy=c.buffer:this.Wy=c,this.Wy},c.prototype.decryptDataSegment=function(c){if(!this.getKey())return this.Sy.logger.debug("MP4Decrypter.decryptSegment: Error decrypting AES-128 encrypted content"),Promise.reject("Error decrypting AES-128 encrypted content");if(!1===this.isEncrypted())return this.Sy.logger.debug("MP4Decrypter.decryptSegment: NO ENCRYPTED CONTENT"),Promise.reject("NO ENCRYPTED CONTENT");for(var u=p.ISOBoxer.parseBuffer(c,{iv_size:this.Zy}),d=new y(u),h=[],f=0;f<d.getSampleCount();++f)h.push(this.cy(c,d,f));return Promise.all(h).then(function(){return[d.uuidBox,d.sencBox,d.saioBox,d.saizBox,d.seigBox,d.sbgpBox].forEach(function(c){c&&(0,m.rewriteMp4BoxType)(c,"free")}),c})},c.prototype.cy=function(c,u,d){var p=u.sampleToOffset(d),h=u.sampleToSize(d,1),f=u.getSampleEncodeInfo(d);return f.iv?function(c,u,d,p,h){if(!((null!=(g=h.subsample_count)?g:0)>0&&h.subsamples))return m=u.slice(d,d+p),c.decrypt(m).then(function(c){new Uint8Array(u).set(new Uint8Array(c),d)});var f,m,g,v=function(c,u,d){if(!d.subsamples)return[];for(var p=[],h=0,f=d.subsamples;h<f.length;h++){var m=f[h];u+=m.bytes_of_clear_data;var g=m.bytes_of_encrypted_data;if(g>0){var v=new Uint8Array(c,u,g);p.push(v),u+=g}}return p}(u,d,h);return f=function(c){for(var u=c.reduce(function(c,u){return c+u.byteLength},0),d=new Uint8Array(u),p=0,h=0;h<c.length;h++){var f=c[h];d.set(f,p),p+=f.byteLength}return d.buffer}(v),c.decrypt(f).then(function(c){for(var u=0,d=0;d<v.length;d++){var p=v[d],h=new Uint8Array(c,u,p.byteLength);p.set(h),u+=p.byteLength}})}(new(g.ModuleManager.get(v.ModuleName.Crypto)).CryptoApi(this.Sy,"AES-CTR",this.getKey(),f.iv,this.ay),c,p,h,f):(this.Sy.logger.debug("MP4Decrypter.decryptSegment: NO INITIAL VECTOR PROVIDED"),Promise.reject("NO INITIAL VECTOR PROVIDED"))},c.prototype.isEncrypted=function(){return this.Vy},c}();var y=function(){function c(c){var u=c.get("moof.traf");this.trunBox=u.get("trun"),this.sencBox=u.get("senc"),this.uuidBox=u.get("uuid"),this.saizBox=u.get("saiz"),this.saioBox=u.get("saio"),this.seigBox=u.get("seig"),this.sbgpBox=u.get("sbgp"),this.mdatOffset=c.get("mdat")._offset+8}return c.prototype.getSampleSizeTable=function(){return this.trunBox.samples},c.prototype.getSampleCount=function(){return this.getSampleSizeTable().length},c.prototype.getSampleEncodeInfo=function(c){return this.sencBox.samples[c]},c.prototype.sampleToOffset=function(c){return this.mdatOffset+this.sampleToSize(0,c)},c.prototype.sampleToSize=function(c,u){for(var d,p=this.getSampleSizeTable(),h=0,f=c;f<c+u;f++)h+=null!=(d=p[f].sample_size)?d:0;return h},c}()},24014:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.MP4EncryptionParser=void 0;var p=d(40306),h=d(3336),f=d(13531),m=d(25811),g=d(51682),v=d(74853),y=d(70233),b=d(85434),S=d(15487);u.MP4EncryptionParser=function(){function c(c){var u=this;this.vy={stsd:function(c){var d;switch(c+=g.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+g.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH,u.ty[0]){case"vide":d=u.vy.encv;break;case"soun":d=u.vy.enca;break;case"hint":case"meta":case"auxv":u.uy.logger.debug("handler type "+u.ty[0]+" not yet supported");break;default:u.uy.logger.debug("invalid handler type "+u.ty[0])}return d?c+=4:(u.uy.logger.debug("unsupported handler type "+u.ty[0]),-1)},encv:function(c){return c+78},enca:function(c){return c+28}},this.uy=c}return c.prototype.wy=function(c,u){var d=c.getUint32(u);return d<=0?null:d},c.prototype.xy=function(c,u){for(var d="",p=0;p<g.ISOBMFFConstants.BOX_TYPE_LENGTH;p++)d+=String.fromCharCode(c.getInt8(u+p));return d},c.prototype.yy=function(c,u){for(var d,p,h=0,f=[],m=new DataView(c);h+3<m.byteLength;){if(p=this.wy(m,h),d=this.xy(m,h+g.ISOBMFFConstants.BOX_SIZE_LENGTH),null===p)return this.uy.logger.debug("size is 0, maybe an error, or the largesize should be parsed. Returning with null."),[];if(d!==u[0])h+=p;else{if(u.length<=1)f.push(c.slice(h,h+p));else{var v=h;if(h+=g.ISOBMFFConstants.BOX_SIZE_LENGTH+g.ISOBMFFConstants.BOX_TYPE_LENGTH,this.vy.hasOwnProperty(d)){var y=this.vy[d](h);-1!==y&&(h=y)}var b=h-v;b=p-b;var S=c.slice(h,h+b),_=this.yy(S,u.slice(1));_&&(f=f.concat(_)),h=v}h+=p}}return f.length>0?f:[]},c.prototype.zy=function(c){for(var u=this.yy(c,["moov","trak","mdia","hdlr"]),d=[],p=0;p<u.length;p++){var h=new DataView(u[p]),f=g.ISOBMFFConstants.BOX_SIZE_LENGTH+g.ISOBMFFConstants.BOX_TYPE_LENGTH;f+=g.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+g.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH,f+=4,d.push(this.xy(h,f))}return d},c.prototype.Ay=function(c){if(!c||!(c instanceof ArrayBuffer)||c.byteLength<1)return null;var u=new DataView(c),d=g.ISOBMFFConstants.BOX_SIZE_LENGTH+g.ISOBMFFConstants.BOX_TYPE_LENGTH;d+=g.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+g.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH+3+1;for(var p="",h=0;h<16;h++)p+=y.FormatHelper.intToHex(u.getUint8(d+h));return p},c.prototype.parseDefaultKIDFromBuffer=function(c,u){this.ty=this.zy(c),d=b.MimeTypeHelper.isVideo(u)?["moov","trak","mdia","minf","stbl","stsd","encv","sinf","schi","tenc"]:["moov","trak","mdia","minf","stbl","stsd","enca","sinf","schi","tenc"];var d,p=this.yy(c,d);if(!p||p.length<1)return null;for(var h=[],f=0;f<p.length;f++){var m=this.Ay(p[f]);null!==m&&h.push(m)}return this.uy.logger.debug("default KID extracted: "+h),h},c.prototype.By=function(c){return v.ArrayHelper.arrayBufferToAsciiString(c,!0)},c.prototype.Cy=function(c){if(!c||!(c instanceof ArrayBuffer)||c.byteLength<3)return this.uy.logger.debug("could not parse pssh data from box"),null;this.uy.logger.isLevelEnabled(f.LogLevel.DEBUG)&&this.uy.logger.debug(this.By(c));var u,d={},p=new DataView(c);u=0+(g.ISOBMFFConstants.BOX_SIZE_LENGTH+g.ISOBMFFConstants.BOX_TYPE_LENGTH);var h=p.getUint8(u);u+=g.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+g.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH;for(var b="",S=0;S<g.ISOBMFFConstants.PSSH_SYSTEM_ID_LENGTH;S++)b+=y.FormatHelper.intToHex(p.getUint8(u)),u++;
28if(d.systemIDraw=b,d.systemID="urn:uuid:".concat(y.FormatHelper.beautifyUUID(b)),m.DRMSchemeIDURIs.hasOwnProperty(d.systemID)&&(d.systemName=m.DRMSchemeIDURIs[d.systemID]),h>0){var _=p.getUint32(u);for(u+=4,d.kid=[],S=0;S<_;S++){var E=v.ArrayHelper.extractHexString(p,u,g.ISOBMFFConstants.PSSH_KID_LEN);u+=g.ISOBMFFConstants.PSSH_KID_LEN,d.kid.push(E)}}return d.initData=c.slice(0),d.initDataStr=this.By(d.initData),d},c.prototype.parsePsshBox=function(c){if(0>c.getMimeType().indexOf("mp4"))return null;var u=c.getData();if(!(u&&u instanceof ArrayBuffer))return null;var d=[];if(d=(d=d.concat(this.yy(u,["moov","pssh"]))).concat(this.yy(u,["moof","pssh"])),c.isEncrypted()&&!d.length&&c.isInit()&&(0,S.isTizen2016)())return this.uy.eventHandler.fireError(new h.PlayerError(p.ErrorCode.SEGMENT_PSSH_DATA_MISSING,void 0,void 0,this.uy.sourceContext.sourceIdentifier)),[];var f=[];if(Array.isArray(d))for(var m=0;m<d.length;m++){var g=this.Cy(d[m]);null!==g&&f.push(g)}return f},c}()},32951:function(c,u,d){var p=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.MP4Parser=void 0,u.getVideoSamples=function(c,u,d,p){var h=(0,S.getCodecTag)(u);return M(c.moof,c.mdat,u,p).map(function(c){return c.nalus=function(c,u,d){void 0===d&&(d=[]);for(var p=S.AVC_CODEC_TAGS.includes(u)?k:x,h=R+p,f=[],m=0;m+h<c.byteLength;){var g=Math.min(c.getUint32(m),c.byteLength-m-h);if(m+=4,0!==g){var v=S.AVC_CODEC_TAGS.includes(u)?31&c.getUint8(m):c.getUint8(m)>>1&63;if(m+=p,0===d.length||d.includes(v)){var y={type:v,data:new DataView(c.buffer,c.byteOffset+m,g-p)};C(y),f.push(y)}m+=g-p}}return f}(c.data,h,d),c})},u.getTrackSamples=M,u.removeEmulationPreventionThreeBytes=C,u.getMp4Fragments=function(c){var u=c.getParsedData().fetchAll("moof"),d=c.getParsedData().fetchAll("mdat");return u.length===d.length?u.map(function(c,u){return{moof:c,mdat:d[u]}}):[]},u.parseTfdtBoxOffsets=function(c){var u=O(c.getData()).fetchAll("tfdt");return u?u.map(function(c){return c._raw.byteOffset}):[]},u.getTrackId=function(c,u){var d=u.get("moof.traf.tfhd");return d?d.track_ID?d.track_ID:(c.log("Track fragment header has no track_ID field. This does not look like a valid mp4."),-1):(c.log("Cannot extract trackID from data fragment."),-1)},u.parseBuffer=O,u.parsePlaybackTime=function(c,u){var d=N(c).get("moof.traf.tfdt");U(c,u);var p=c.getTimescale();return d&&void 0!==p?d.baseMediaDecodeTime/p:void 0===p?0/0:void 0},u.parseSegmentData=D,u.isValidMp4=function(c){var u=N(c),d=(c.isInit()?["ftyp","moov"]:["moof","mdat"]).every(function(c){return!!u.fetch(c)}),p=u.boxes[u.boxes.length-1],h=(p?p.size+p._offset:0)===c.getData().byteLength,f=!u._incomplete;return d&&h&&f},u.getCodecFromSegment=function(c){var u=D(c);return function(c){var u,d=L(c);if(!d)return null;var h=d.entries.find(function(c){return p(p([],v.VisualSampleEntryTypes.Avc,!0),v.VisualSampleEntryTypes.Hvc,!0).includes(c.type)});return h?v.VisualSampleEntryTypes.Avc.includes(h.type)?(u=h.get("avcC"))&&0!==u.sps.length?h.type+"."+_.FormatHelper.bytesToHex(new Uint8Array(u.sps[0].splice(1,3))):null:v.VisualSampleEntryTypes.Hvc.includes(h.type)?(0,S.assembleHvcCodecString)(h.type,h.get("hvcC")):null:null}(u)||function(c){var u=L(c);if(!u)return null;var d=u.entries[0],p=(d.get("esds")||{}).decoderConfig;return p?d.type+"."+p.objectProfileIndication.toString(16)+"."+p.decoderConfigDescriptor.audioObjectType:null}(u)};var h=d(97441),f=d(40306),m=d(3336),g=d(13531),v=d(1001),y=d(51682),b=d(74853),S=d(34047),_=d(70233),E=d(85434),T=d(2992),w=d(23068),P=d(88052),A=d(62756),I=d(78246);function M(c,u,d,p){var h,f,m,g=c.get("traf"),v=g.get("tfhd"),b=g.get("trun"),S=null!=(h=v.base_data_offset)?h:c._offset,_=null!=(f=b.data_offset)?f:0;return null!=(m=null==b?void 0:b.samples)&&m.length?b.samples.map(function(c){var h=c.sample_size||v.default_sample_size||d.getDefaultSampleSize();h>b._raw.buffer.byteLength&&(h=b._raw.buffer.byteLength-(S+_),p.warn("trun.samples.sample_size (".concat(c.sample_size,") is bigger than the available buffer length:").concat(b._raw.buffer.byteLength,". Adjusting to remaining bytes:").concat(h))),1!==b.sample_count||c.sample_size||(h=u.size-(u.hasOwnProperty("largesize")?y.ISOBMFFConstants.BOX_HEADER_LENGTH_LARGE:y.ISOBMFFConstants.BOX_HEADER_LENGTH_REGULAR));var f={duration:c.sample_duration||v.default_sample_duration||d.getDefaultSampleDuration(),size:h,compositionTimeOffset:c.sample_composition_time_offset||0,data:new DataView(b._raw.buffer,S+_,h)};return _+=h,f}):[]}u.MP4Parser=function(){function c(c,u,d){void 0===d&&(d=h.ISOBoxer),this.context=c,this.mp4EncryptionParser=u,this.isoBoxer=d,this.dy=P.ModuleManager.get(A.ModuleName.Crypto,!1)}return c.prototype.parseSegment=function(c){"mp4"===E.MimeTypeHelper.extractContainerType(c.getMimeType())?(c.isInit()?this.jy(c):this.ly(c),c.setDrmInitData(this.ey(c))):this.context.logger.debug("Skipping parsing of a non MP4 segment")},c.prototype.ey=function(c){var u=this,d=this.mp4EncryptionParser.parsePsshBox(c);return this.context.logger.isLevelEnabled(g.LogLevel.DEBUG)&&(null==d||d.forEach(function(c){return u.context.logger.debug("initData found: ".concat(c.initDataStr))})),Array.isArray(d)&&d.length>0?d:[]},c.prototype.fy=function(c){var u=c.getParsedData().get("moov.mvex.trex");if(u){var d={defaultSampleSize:u.default_sample_size,defaultSampleDuration:u.default_sample_duration};c.updateParserMetadata(d),this.context.logger.debug("default sample duration for "+c.getMimeType()+" : "+d.defaultSampleDuration)}},c.prototype.gy=function(c){var u=c.getParsedData().get("moof.traf.sgpd");if(u&&"seig"===String.fromCharCode(u._raw.getUint8(12),u._raw.getUint8(13),u._raw.getUint8(14),u._raw.getUint8(15))){var d=(p=1===F(u)?20:16,u._raw.getUint32(p));if(!(d<1)){var p,h,f,m,g,v,y,b,S=(h=F(u),f=B(u),1===h&&0===f?u._raw.getUint32(1===h?24:20):f),E=(m=F(u),g=B(u),v=1===m&&0===g?28:24,(u._raw.getUint16(v)<<16)+u._raw.getUint8(v+2)),T=(y=F(u),b=B(u),u._raw.getUint8(1===y&&0===b?31:27)),w=function(c){for(var u=F(c),d=B(c),p=1===u&&0===d?32:28,h=new Uint8Array(16),f=0;f<16;f++)h[f]=c._raw.getUint8(p+f);return _.FormatHelper.bytesToUUID(h)}(u);this.context.logger.debug("Parsed SGPD/SEIG, entries(".concat(d,"), key ID(").concat(w,"), IV size(").concat(T,"), isEncrypted(").concat(!!E,"), descriptor length(").concat(S,")")),c.setDrmKid(w)}}},c.prototype.hy=function(c){var u=this.mp4EncryptionParser.parseDefaultKIDFromBuffer(c.getData(),c.getMimeType()),d=null!=u&&u.length?u.pop():void 0,p=c.getParsedData().get("moov.trak.mdia.minf.stbl.stsd.encv.sinf.schi.tenc")||c.getParsedData().get("moov.trak.mdia.minf.stbl.stsd.enca.sinf.schi.tenc");p&&(c.updateParserMetadata({ivSize:p.default_iv_size}),c.setEncrypted(!0)),d&&c.setDrmKid(_.FormatHelper.beautifyUUID(d)
vendor: 62,629 bytes, line 28
28)},c.prototype.iy=function(c){var u=c.get("elst");return!(u&&u.entries.length>0&&u.entries[0].media_time<0)},c.prototype.jy=function(c){var u=D(c,{},this.isoBoxer);u?(this.hy(c),U(c,this.context.logger),this.fy(c),this.context.settings.IGNORE_MP4_EDTS_BOX&&this.ky(u)):this.context.eventHandler.fireError(new m.PlayerError(f.ErrorCode.SOURCE_EMPTY_SEGMENT,{mimeType:c.getMimeType(),segmentUrl:c.getUrl()},"The player has encountered an init segment that is unexpectedly empty.",this.context.sourceContext.sourceIdentifier))},c.prototype.ky=function(c){var u=c.get("moov.trak.edts");u&&!this.iy(u)&&(this.context.logger.debug("Found unsupported edts box, dropping it!"),(0,T.rewriteMp4BoxType)(u,"free"))},c.prototype.ly=function(u){var d,p,h=0,f=u.getSegmentInfo();null!=f&&f.presentationTimeOffset&&(h=f.presentationTimeOffset);var m=this.oy(u);u.isSelfInit()&&this.fy(u),this.gy(u),this.hy(u),u.setEncrypted(null!=(p=null==(d=u.getInitSegment())?void 0:d.isEncrypted())&&p),u.getParsedData().fetch("senc")&&u.setEncrypted(!0),U(u,this.context.logger),this.ny(u,h,m),this.my(u),this.context.settings.PARSE_EMSG_BOXES&&u.setInbandEvents(this.ry(u,h)),u.setLastSegment(this.sy(u));var g=c.getProducerReferenceTime(u);g&&(f.wallClockTime=g)},c.prototype.my=function(c){var u=this.py(c);if(u){var d=Math.abs(c.getDuration()-u);d>.5&&this.context.logger.debug("Segment duration is off by "+d+", corrected from "+c.getDuration()+" to "+u),c.setDuration(u)}},c.prototype.ny=function(c,u,d){var p=d.fetchAll("tfdt"),h=p[0],f=p.map(function(c){return c._offset});if(h){var m=c.getTimescale();c.setTFDTBoxOffsets(f),c.setBaseMediaDecodeTime(h.baseMediaDecodeTime),c.setPresentationTimeOffset(u),void 0===m?this.context.logger.debug("Could not set playback time - segment is missing timescale."):c.setPlaybackTime(h.baseMediaDecodeTime/m-u)}},c.prototype.oy=function(c){return D(c,{iv_size:c.getIvSize()||8},this.isoBoxer)},c.prototype.py=function(c){var u=this,d=c.getTimescale();return E.MimeTypeHelper.isAV(c.getMimeType())?void 0===d?(this.context.logger.debug("Could not parse segment duration - segment is missing timescale."),null):c.getParsedData().list("moof.traf").reduce(function(d,p){return d+u.qy(p,c.getDefaultSampleDuration())},0)/d:null},c.prototype.qy=function(c,u){var d,p=c.get("trun");if(!p)return this.context.logger.insane("Media segment is missing trun box!"),0;var h=c.get("tfhd"),f=h?h.default_sample_duration:null;return(null==(d=p.samples)?void 0:d.reduce(function(c,d){return c+(d.sample_duration||f||u||0)},0))??0},c.prototype.ry=function(c,u){var d=this.oy(c),p=function(c,u,d){var p=u.fetch("sidx"),h=0,f=c.getTimescale();if(void 0===f)return 0;if(p&&p.earliest_presentation_time)h=p.earliest_presentation_time/f;else{var m=u.fetch("tfdt");m&&m.baseMediaDecodeTime&&(h=m.baseMediaDecodeTime/f)}return(0,w.isNumber)(h)?h-=d:h=0,h}(c,d,u);return d.fetchAll("emsg").map(function(c){var d,h,f;return{schemeIdUri:c.scheme_id_uri,value:c.value,presentationTime:(d=c,h=p,f=u,1===d.version?d.presentation_time/d.timescale-f:h+d.presentation_time_delta/d.timescale),eventDuration:c.event_duration/c.timescale,id:String(c.id),messageData:b.ArrayHelper.convertBufferSourceToUTF8(c.message_data)}})},c.parseFourCharsText=function(c,u){for(var d="",p=0;p<4;p++)d+=String.fromCharCode(c.getInt8(u+p));return d},c.prototype.sy=function(u){var d=u.getData();if(!d||d.byteLength<4)return!1;for(var p=new DataView(d),h=0;h+3<p.byteLength;){var f=p.getUint32(h);if(f<=0)break;if("styp"===c.parseFourCharsText(p,h+4)){h+=8,h+=8;for(var m=void 0;h<f;)if(m=c.parseFourCharsText(p,h),h+=4,"lmsg"===m)return this.context.logger.debug("lmsg found, this should be the last segment in this stream"),!0;break}h+=f}return!1},c.getProducerReferenceTime=function(c){var u=c.getParsedData().fetch("prft");if(!u)return null;var d=1e3*u.ntp_timestamp_seconds;return d+=Math.round(u.ntp_timestamp_seconds_fraction/0x100000000*1e3),(0,I.ntpToUnix)(d)},c}();var R=4,k=1,x=2;function C(c){for(var u=[],d=1;d<c.data.byteLength-2;)0===c.data.getUint8(d)&&0===c.data.getUint8(d+1)&&3===c.data.getUint8(d+2)?(u.push(d+2),d+=3):d++;if(0!==u.length){for(var p=new DataView(new ArrayBuffer(c.data.byteLength-u.length)),h=0,f=0;h<p.byteLength;h++,f++)u[0]===f&&(u.shift(),f++),p.setUint8(h,c.data.getInt8(f));c.data=p}}function O(c,u,d){return void 0===u&&(u={}),void 0===d&&(d=h.ISOBoxer),d.parseBuffer(c,u)}function D(c,u,d){if(void 0===u&&(u={}),void 0===d&&(d=h.ISOBoxer),!c.getParsedData()){var p=O(c.getData(),u,d);c.setParsedData(p)}return c.getParsedData()}function L(c){return c.get("moov.trak.mdia.minf.stbl.stsd")}function N(c,u){return void 0===u&&(u=h.ISOBoxer),D(c,{iv_size:c.getIvSize()||8},u)}function U(c,u){var d=c.getParsedData().get("moov.trak.mdia.mdhd");if(d){var p=d.timescale;c.setTimescale(p),u.debug("timescale for ".concat(c.getMimeType()," is ").concat(p))}}function F(c){return c._raw.getUint8(8)}function B(c){return 1===F(c)?c._raw.getUint32(16):0}},37910:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.ContainerMp4ModuleDefinition=void 0;var p=d(62756),h=d(51700),f=d(12392),m=d(24014),g=d(32951);u.ContainerMp4ModuleDefinition={name:p.ModuleName.ContainerMP4,module:{MP4Parser:g.MP4Parser,MP4Decrypter:f.MP4Decrypter,MP4EncryptionParser:m.MP4EncryptionParser,CmafChunkParser:h.CmafChunkParser,getMp4Fragments:g.getMp4Fragments,getVideoSamples:g.getVideoSamples,parseTfdtBoxOffsets:g.parseTfdtBoxOffsets,getTrackId:g.getTrackId,parseBuffer:g.parseBuffer,parsePlaybackTime:g.parsePlaybackTime,isValidMp4:g.isValidMp4,getCodecFromSegment:g.getCodecFromSegment,getTrackSamples:g.getTrackSamples}},u.default=u.ContainerMp4ModuleDefinition},78246:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.ntpToUnix=function(c){return c+d};var d=new Date(Date.UTC(1900,0,1)).getTime()}},function(c){return c(c.s=37910)}])}(bitmovinplayerContainerMp4);var bitmovinplayerContainerMp4Exports=bitmovinplayerContainerMp4.exports;let MP4ContainerModule=getDefaultExportFromCjs$1(bitmovinplayerContainerMp4Exports);var bitmovinplayerVr={exports:{}};!function(c){var u;self,c.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[339],{50879:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.ByteBuffer=void 0,u.ByteBuffer=function(){function c(){}return c.stringToBytes=function(c,u){u=!!u;for(var d=c.length,p=new Uint8Array(u?4*d:d),h=0,f=0;f<d;f++){var m=c.charCodeAt(f);if(u&&55296<=m&&m<=56319){if(++f>=d)throw Error("Malformed string, low surrogate expected at position "+f);m=(55296^m)<<10|65536|56320^c.charCodeAt(f)}else if(!u&&m>>>8)throw Error("Wide characters are not allowed.");!u||m<=127?p[h++]=m:(m<=2047?p[h++]=192|m>>6:(m<=65535?p[h++]=224|m>>12:(p[h++]=240|m>>18,p[h++]=128|m>>12&63),p[h++]=128|m>>6&63),p[h++]=128|63&m)}return p.subarray(0,h)},c.bytesToHex=function(c){for(var u="",d=0;d<c.length;d++){var p=(255&c[d]).toString(16);p.length<2&&(u+="0"),u+=p}return u},c.hexToBytes=function(c){var u=c.length;1&u&&(c="0"+c,u++);for(var d=new Uint8Array(u>>1),p=0;p<u;p+=2)d[p>>1]=parseInt(c.substr(p,2),16);return d},c.base64ToBytes=function(u){return c.stringToBytes(atob(u))},c}()},5357:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.Cardboard=void 0;var p=d(57160),h=d(50879);u.Cardboard=function(){function c(){}return c.decode=function(u){return new p.ProtoBuf(h.ByteBuffer.base64ToBytes(u),c.proto).readAll()},c.proto={1:{name:"vendor",type:"string"},2:{name:"model",type:"string"},3:{name:"screen_to_lens_distance",type:"float"},4:{name:"inter_lens_distance",type:"float"},5:{name:"left_eye_field_of_view_angles",type:"float",packed:!0},11:{name:"vertical_alignment",type:{0:"bottom",1:"center",2:"top"}},6:{name:"tray_to_lens_distance",type:"float"},7:{name:"distortion_coefficients",type:"float",packed:!0},10:{name:"has_magnet",type:"boolean"},12:{name:"primary_button",type:{0:"none",1:"magnet",2:"touch",3:"indirect_touch"}},defaults:{vertical_alignment:"bottom",primary_button:"magnet"}},c}()},7247:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.CardboardViewer=void 0;var p=d(67392);u.CardboardViewer=function(c){this.label=c.model,this.fov=c.left_eye_field_of_view_angles[0],this.interLensDistance=c.inter_lens_distance,this.baselineLensDistance=c.tray_to_lens_distance,this.screenLensDistance=c.screen_to_lens_distance,this.distortion=new p.Distortion(c.distortion_coefficients),this.inverseCoefficients=this.distortion.approximateInverse()}},95433:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.Device=void 0;var d=[{type:"android",rules:[{ua:"Nexus 7"}],dpi:[320.8,323],bw:3,ac:500},{type:"android",rules:[{ua:"ASUS_Z00AD"}],dpi:[403,404.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"HTC6435LVW"}],dpi:[449.7,443.3],bw:3,ac:1e3},{type:"android",rules:[{ua:"HTC One XL"}],dpi:[315.3,314.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 9"}],dpi:289,bw:3,ac:500},{type:"android",rules:[{ua:"HTC One M9"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{ua:"HTC One_M8"}],dpi:[449.7,447.4],bw:3,ac:500},{type:"android",rules:[{ua:"HTC One"}],dpi:472.8,bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 6P"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 5X"}],dpi:[422,419.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"LGMS345"}],dpi:[221.7,219.1],bw:3,ac:500},{type:"android",rules:[{ua:"LG-D800"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{ua:"LG-D850"}],dpi:[537.9,541.9],bw:3,ac:500},{type:"android",rules:[{ua:"VS985 4G"}],dpi:[537.9,535.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 5 "}],dpi:[442.4,444.8],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 4"}],dpi:[319.8,318.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"LG-P769"}],dpi:[240.6,247.5],bw:3,ac:1e3},{type:"android",rules:[{ua:"LGMS323"}],dpi:[206.6,204.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"LGLS996"}],dpi:[403.4,401.5],bw:3,ac:1e3},{type:"android",rules:[{ua:"4560MMX"}],dpi:[240,219.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"Micromax A250"}],dpi:[480,446.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"Micromax AQ4501"}],dpi:240,bw:3,ac:500},{type:"android",rules:[{ua:"DROID RAZR"}],dpi:[368.1,256.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT830C"}],dpi:[254,255.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1021"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{ua:"XT1023"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{ua:"XT1028"}],dpi:[326.6,327.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1034"}],dpi:[326.6,328.4],bw:3,ac:500},{type:"android",rules:[{ua:"XT1053"}],dpi:[315.3,316.1],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1562"}],dpi:[403.4,402.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 6 "}],dpi:[494.3,489.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1063"}],dpi:[295,296.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1064"}],dpi:[295,295.6],bw:3,ac:500},{type:"android",rules:[{ua:"XT1092"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{ua:"XT1095"}],dpi:[422,423.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"A0001"}],dpi:[403.4,401],bw:3,ac:1e3},{type:"android",rules:[{ua:"ONE E1005"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"ONE A2005"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"X909"}],dpi:[442.4,444.1],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9082"}],dpi:[184.7,185.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G360P"}],dpi:[196.7,205.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus S"}],dpi:[234.5,229.8],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9300"}],dpi:[304.8,303.9],bw:5,ac:500},{type:"android",rules:[{ua:"SM-T230NU"}],dpi:216,bw:3,ac:500},{type:"android",rules:[{ua:"SGH-T399"}],dpi:[217.7,231.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-N9005"}],dpi:[386.4,387],bw:3,ac:500},{type:"android",rules:[{ua:"SAMSUNG-SM-N900A"}],dpi:[386.4,387.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9500"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{ua:"GT-I9505"}],dpi:439.4,bw:4,ac:1e3},{type:"android",rules:[{ua:"SM-G900F"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{ua:"SM-G900M"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{ua:"SM-G800F"}],dpi:326.8,bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G906S"}],dpi:[562.7,572.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9300"}],dpi:[306.7,304.8],bw:5,ac:1e3},{type:"android",rules:[{ua:"SM-T535"}],dpi:[142.6,136.4],bw:3,ac:500},{type:"android",rules:[{ua:"SM-N920C"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9300I"}],dpi:[304.8,305.8],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9195"}],dpi:[249.4,256.7],bw:3,ac:500},{type:"android",rules:[{ua:"SPH-L520"}],dpi:[249.4,255.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"SAMSUNG-SGH-I717"}],dpi:285.8,bw:3,ac:1e3},{type:"android",rules:[{ua:"SPH-D710"}],dpi:[217.7,204.2],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-N7100"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{ua:"SCH-I605"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{ua:"Galaxy Nexus"}],dpi:[315.3,314.2],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-N910H"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-N910C"}],dpi:[515.2,520.2],bw:3,ac:500},{type:"android",rules:[{ua:"SM-G130M"}],dpi:[165.9,164.8],bw:3,ac:500},{type:"android",rules:[{ua:"SM-G928I"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G920F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{ua:"SM-G920P"}],dpi:[522.5,577],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G925F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{ua:"SM-G925V"}],dpi:[522.5,576.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"C6903"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{ua:"D6653"}],dpi:[428.6,427.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"E6653"}],dpi:[428.6,425.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"E6853"}],dpi:[403.4,401.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"SGP321"}],dpi:[224.7,224.1],bw:3,ac:500},{type:"android",rules:[{ua:"ALCATEL ONE TOUCH Fierce"}],dpi:[240,247.5],bw:3,ac:1e3},{type:"android",rules:[{ua:"thl 5000"}],dpi:[480,443.3],bw:3,ac:1e3},{type:"android",rules:[{ua:"ZTE Blade L2"}],dpi:240,bw:3,ac:500},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3}],p=function(){function c(u){this.width=u.width||c.getScreenWidth(),this.height=u.height||c.getScreenHeight(),this.widthMeters=u.widthMeters,this.heightMeters=u.heightMeters,this.bevelMeters=u.bevelMeters}return c.isIOS=function(){return/iPad|iPhone|iPod/.test(navigator.platform)},c.getScreenWidth=function(){return Math.max(window.screen.width,window.screen.height)*window.devicePixelRatio},c.getScreenHeight=function(){return Math.min(window.screen.width,window.screen.height)*window.devicePixelRatio},c.detect=function(u){for(var p=navigator.userAgent||navigator.vendor||window.opera,m=c.getScreenWidth(),g=c.getScreenHeight(),v=0;v<d.length;v++){var y=d[v];if(y.rules)if("ios"===y.type||"android"===y.type){if(c.isIOS()===("ios"===y.type)){for(var b=!1,S=0;S<y.rules.length;S++){var _=y.rules[S];if(c.matchRule(_,p,m,g)){u.debug("Rule matched:"+JSON.stringify(_)),b=!0;break}}if(b){var E={width:m,height:g,widthMeters:.0254/(y.dpi[0]||y.dpi)*m,heightMeters:.0254/(y.dpi[1]||y.dpi)*g,bevelMeters:.001*y.bw};return u.debug("Device found: "+JSON.stringify(E)),new c(E)}}}else u.debug("Device["+v+"] has invalid type.");else u.debug("Device["+v+"] has no rules section.")}return c.isIOS()?(u.debug("Using fallback iOS device measurements."),f):(u.debug("Using fallback Android device measurements."),h)},c.matchRule=function(c,u,d,p){if(!c.ua&&!c.res||c.ua&&0>u.indexOf(c.ua))return!1;if(c.res){if(!c.res[0]||!c.res[1])return!1;var h=c.res[0],f=c.res[1];if(Math.min(d,p)!==Math.min(h,f)||Math.max(d,p)!==Math.max(h,f))return!1}return!0},c}();u.Device=p;var h=new p({widthMeters:.11,heightMeters:.062,bevelMeters:.004}),f=new p({widthMeters:.1038,heightMeters:.0584,bevelMeters:.004})},3973:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.DeviceInfo=void 0;var p=d(95433),h=d(44369),f=d(7247);u.DeviceInfo=function(){function c(c,u){this.y0=new f.CardboardViewer(c),this.z0=p.Device.detect(u)}return c.prototype.getDevice=function(){return this.z0},c.prototype.setViewer=function(c){this.y0=c},c.prototype.getDistortedFieldOfViewLeftEye=function(){var c=this.y0.screenLensDistance,u=this.y0.distortion,d=(this.z0.widthMeters-this.y0.interLensDistance)/2,p=this.y0.interLensDistance/2,f=this.y0.baselineLensDistance-this.z0.bevelMeters,m=this.z0.heightMeters-f,g=h.MathUtil.radToDeg(Math.atan(u.distort(d/c))),v=h.MathUtil.radToDeg(Math.atan(u.distort(p/c))),y=h.MathUtil.radToDeg(Math.atan(u.distort(f/c))),b=h.MathUtil.radToDeg(Math.atan(u.distort(m/c)));return{leftDegrees:Math.min(g,this.y0.fov),rightDegrees:Math.min(v,this.y0.fov),downDegrees:Math.min(y,this.y0.fov),upDegrees:Math.min(b,this.y0.fov)}},c.prototype.getLeftEyeVisibleTanAngles=function(){var c=this.y0.distortion,u=Math.tan(-h.MathUtil.degToRad(this.y0.fov)),d=Math.tan(h.MathUtil.degToRad(this.y0.fov)),p=Math.tan(h.MathUtil.degToRad(this.y0.fov)),f=Math.tan(-h.MathUtil.degToRad(this.y0.fov)),m=this.z0.widthMeters/4,g=this.z0.heightMeters/2,v=this.y0.baselineLensDistance-this.z0.bevelMeters-g,y=this.y0.interLensDistance/2-m,b=-v,S=this.y0.screenLensDistance,_=c.distort((y-m)/S),E=c.distort((b+g)/S),T=c.distort((y+m)/S),w=c.distort((b-g)/S),P=new Float32Array(4);return P[0]=Math.max(u,_),P[1]=Math.min(d,E),P[2]=Math.min(p,T),P[3]=Math.max(f,w),P},c.prototype.getLeftEyeNoLensTanAngles=function(){var c=this.y0.distortion,u=new Float32Array(4),d=c.distortInverse(Math.tan(-h.MathUtil.degToRad(this.y0.fov))),p=c.distortInverse(Math.tan(h.MathUtil.degToRad(this.y0.fov))),f=c.distortInverse(Math.tan(h.MathUtil.degToRad(this.y0.fov))),m=c.distortInverse(Math.tan(-h.MathUtil.degToRad(this.y0.fov))),g=this.z0.widthMeters/4,v=this.z0.heightMeters/2,y=this.y0.baselineLensDistance-this.z0.bevelMeters-v,b=this.y0.interLensDistance/2-g,S=-y,_=this.y0.screenLensDistance;return u[0]=Math.max(d,(b-g)/_),u[1]=Math.min(p,(S+v)/_),u[2]=Math.min(f,(b+g)/_),u[3]=Math.max(m,(S-v)/_),u},c.prototype.getLeftEyeVisibleScreenRect=function(c){var u=this.y0.screenLensDistance,d=(this.z0.widthMeters-this.y0.interLensDistance)/2,p=this.y0.baselineLensDistance-this.z0.bevelMeters,h=(c[0]*u+d)/this.z0.widthMeters,f=(c[1]*u+p)/this.z0.heightMeters,m=(c[2]*u+d)/this.z0.widthMeters,g=(c[3]*u+p)/this.z0.heightMeters;return{x:h,y:g,width:m-h,height:f-g}},c.prototype.getFieldOfViewLeftEye=function(c){return c?this.getUndistortedFieldOfViewLeftEye():this.getDistortedFieldOfViewLeftEye()},c.prototype.getFieldOfViewRightEye=function(c){var u=this.getFieldOfViewLeftEye(c);return{leftDegrees:u.leftDegrees,rightDegrees:u.rightDegrees,downDegrees:u.downDegrees,upDegrees:u.upDegrees}},c.prototype.getUndistortedFieldOfViewLeftEye=function(){var c=this.getUndistortedParams_();return{leftDegrees:h.MathUtil.radToDeg(Math.atan(c.outerDist)),rightDegrees:h.MathUtil.radToDeg(Math.atan(c.innerDist)),downDegrees:h.MathUtil.radToDeg(Math.atan(c.bottomDist)),upDegrees:h.MathUtil.radToDeg(Math.atan(c.topDist))}},c.prototype.getUndistortedViewportLeftEye=function(){var c=this.getUndistortedParams_(),u=this.y0.screenLensDistance,d=this.z0.widthMeters/u,p=this.z0.heightMeters/u,h=this.z0.width/d,f=this.z0.height/p,m=Math.round((c.eyePosX-c.outerDist)*h),g=Math.round((c.eyePosY-c.bottomDist)*f);return{x:m,y:g,width:Math.round((c.eyePosX+c.innerDist)*h)-m,height:Math.round((c.eyePosY+c.topDist)*f)-g}},c.prototype.getUndistortedParams_=function(){var c=this.y0.distortion,u=this.y0.screenLensDistance,d=this.y0.interLensDistance/2/u,p=this.z0.widthMeters/u,f=this.z0.heightMeters/u,m=p/2-d,g=(this.y0.baselineLensDistance-this.z0.bevelMeters)/u,v=this.y0.fov,y=c.distortInverse(Math.tan(h.MathUtil.degToRad(v))),b=Math.min(m,y),S=Math.min(d,y),_=Math.min(g,y);return{outerDist:b,innerDist:S,topDist:Math.min(f-g,y),bottomDist:_,eyePosX:m,eyePosY:g}},c}()},67392:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.Distortion=void 0,u.Distortion=function(){function c(c){this.hcb=c}return c.prototype.distortInverse=function(c){for(var u=0,d=1,p=c-this.distort(u);Math.abs(d-u)>1e-4;){var h=c-this.distort(d),f=d-(d-u)/(h-p)*h;u=d,d=f,p=h}return d},c.prototype.distort=function(c){for(var u=c*c,d=0,p=this.hcb.length-1;p>=0;p--)d=u*(d+this.hcb[p]);return(d+1)*c},c.solveLinear_=function(c,u){var d,p,h,f=c.length;for(p=0;p<f-1;++p)for(h=p+1;h<f;++h){var m=c[p][h]/c[p][p];for(d=p+1;d<f;++d)c[d][h]-=m*c[d][p];u[h]-=m*u[p]}var g=Array(f);for(p=f-1;p>=0;--p){var v=u[p];for(d=p+1;d<f;++d)v-=c[d][p]*g[d];g[p]=v/c[p][p]}return g},c.solveLeastSquares_=function(u,d){var p,h,f,m,g=u.length,v=u[0].length;if(v!==d.length)throw Error("Matrix / vector dimension mismatch");var y=Array(g);for(f=0;f<g;++f)for(y[f]=Array(g),h=0;h<g;++h){for(m=0,p=0;p<v;++p)m+=u[h][p]*u[f][p];y[f][h]=m}var b=Array(g);for(h=0;h<g;++h){for(m=0,p=0;p<v;++p)m+=u[h][p]*d[p];b[h]=m}return c.solveLinear_(y,b)},c.prototype.approximateInverse=function(u,d){u=u||1,d=d||100;var p,h,f=Array(12);for(h=0;h<12;++h)f[h]=Array(d);var m=Array(d);for(p=0;p<d;++p){var g=u*(p+1)/d,v=this.distort(g),y=v;for(h=0;h<12;++h)y*=v*v,f[h][p]=y;m[p]=g-v}return c.solveLeastSquares_(f,m)},c}()},44369:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.Quat=u.Vec3=u.Mat4=u.MathUtil=void 0,u.MathUtil=function(){function c(){}return c.degToRad=function(c){return c*Math.PI/180},c.radToDeg=function(c){return 180*c/Math.PI},c.hypot=function(c,u){return Math.sqrt(c*c+u*u)},c.getSum=function(c){return c.length>0?c.reduce(function(c,u){return c+u},0):0},c.getAverage=function(u){return u.length>0?c.getSum(u)/u.length:1/0},c.sign=function(c){return Math.sign&&Math.sign(c)||(c>0?1:c<0?-1:0)},c}(),u.Mat4=function(){function c(){}return c.create=function(){var c;return(c="u">typeof Float32Array?new Float32Array(16):Array(16))[0]=1,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=1,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=1,c[11]=0,c[12]=0,c[13]=0,c[14]=0,c[15]=1,c},c.identity=function(c){return c[0]=1,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=1,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=1,c[11]=0,c[12]=0,c[13]=0,c[14]=0,c[15]=1,c},c.rotate=function(c,u,d){var p,h,f,m,g,v,y,b,S,_,E,T,w,P,A,I,M,R,k,x,C,O,D,L,N=d[0],U=d[1],F=d[2],B=Math.sqrt(N*N+U*U+F*F);return 1e-6>Math.abs(B)?null:(N*=B=1/B,U*=B,F*=B,p=Math.sin(u),f=1-(h=Math.cos(u)),m=c[0],g=c[1],v=c[2],y=c[3],b=c[4],S=c[5],_=c[6],E=c[7],T=c[8],w=c[9],P=c[10],A=c[11],I=N*N*f+h,M=U*N*f+F*p,R=F*N*f-U*p,k=N*U*f-F*p,x=U*U*f+h,C=F*U*f+N*p,O=N*F*f+U*p,D=U*F*f-N*p,L=F*F*f+h,c[0]=m*I+b*M+T*R,c[1]=g*I+S*M+w*R,c[2]=v*I+_*M+P*R,c[3]=y*I+E*M+A*R,c[4]=m*k+b*x+T*C,c[5]=g*k+S*x+w*C,c[6]=v*k+_*x+P*C,c[7]=y*k+E*x+A*C,c[8]=m*O+b*D+T*L,c[9]=g*O+S*D+w*L,c[10]=v*O+_*D+P*L,c[11]=y*O+E*D+A*L,c)},c.multiply=function(c,u,d){var p=u[0],h=u[1],f=u[2],m=u[3],g=u[4],v=u[5],y=u[6],b=u[7],S=u[8],_=u[9],E=u[10],T=u[11],w=u[12],P=u[13],A=u[14],I=u[15],M=d[0],R=d[1],k=d[2],x=d[3];return c[0]=M*p+R*g+k*S+x*w,c[1]=M*h+R*v+k*_+x*P,c[2]=M*f+R*y+k*E+x*A,c[3]=M*m+R*b+k*T+x*I,M=d[4],R=d[5],k=d[6],x=d[7],c[4]=M*p+R*g+k*S+x*w,c[5]=M*h+R*v+k*_+x*P,c[6]=M*f+R*y+k*E+x*A,c[7]=M*m+R*b+k*T+x*I,M=d[8],R=d[9],k=d[10],x=d[11],c[8]=M*p+R*g+k*S+x*w,c[9]=M*h+R*v+k*_+x*P,c[10]=M*f+R*y+k*E+x*A,c[11]=M*m+R*b+k*T+x*I,M=d[12],R=d[13],k=d[14],x=d[15],c[12]=M*p+R*g+k*S+x*w,c[13]=M*h+R*v+k*_+x*P,c[14]=M*f+R*y+k*E+x*A,c[15]=M*m+R*b+k*T+x*I,c},c.perspective=function(c,u,d,p,h){var f=1/Math.tan(u/2),m=1/(p-h);return c[0]=f/d,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=f,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=(h+p)*m,c[11]=-1,c[12]=0,c[13]=0,c[14]=2*h*p*m,c[15]=0,c},c.invert=function(c,u){var d=u[0],p=u[1],h=u[2],f=u[3],m=u[4],g=u[5],v=u[6],y=u[7],b=u[8],S=u[9],_=u[10],E=u[11],T=u[12],w=u[13],P=u[14],A=u[15],I=d*g-p*m,M=d*v-h*m,R=d*y-f*m,k=p*v-h*g,x=p*y-f*g,C=h*y-f*v,O=b*w-S*T,D=b*P-_*T,L=b*A-E*T,N=S*P-_*w,U=S*A-E*w,F=_*A-E*P,B=I*F-M*U+R*N+k*L-x*D+C*O;return B?(B=1/B,c[0]=(g*F-v*U+y*N)*B,c[1]=(h*U-p*F-f*N)*B,c[2]=(w*C-P*x+A*k)*B,c[3]=(_*x-S*C-E*k)*B,c[4]=(v*L-m*F-y*D)*B,c[5]=(d*F-h*L+f*D)*B,c[6]=(P*R-T*C-A*M)*B,c[7]=(b*C-_*R+E*M)*B,c[8]=(m*U-g*L+y*O)*B,c[9]=(p*L-d*U-f*O)*B,c[10]=(T*x-w*R+A*I)*B,c[11]=(S*R-b*x-E*I)*B,c[12]=(g*D-m*N-v*O)*B,c[13]=(d*N-p*D+h*O)*B,c[14]=(w*M-T*k-P*I)*B,c[15]=(b*k-S*M+_*I)*B,c):null},c}();var d=function(){function c(){}return c.create=function(){var c;return(c="u">typeof Float32Array?new Float32Array(3):[,,,])[0]=0,c[1]=0,c[2]=0,c},c}();u.Vec3=d,u.Quat=function(){function c(){}return c.create=function(){var c;return(c="u">typeof Float32Array?new Float32Array(4):[,,,,])[0]=0,c[1]=0,c[2]=0,c[3]=1,c},c.fromValues=function(c,u,d,p){var h;return(h="u">typeof Float32Array?new Float32Array(4):[,,,,])[0]=c,h[1]=u,h[2]=d,h[3]=p,h},c.multiply=function(c,u,d){var p=u[0],h=u[1],f=u[2],m=u[3],g=d[0],v=d[1],y=d[2],b=d[3];return c[0]=p*b+m*g+h*y-f*v,c[1]=h*b+m*v+f*g-p*y,c[2]=f*b+m*y+p*v-h*g,c[3]=m*b-p*g-h*v-f*y,c},c.toAngle=function(c){var u=d.create(),p=c[0]*c[0],h=c[1]*c[1],f=c[2]*c[2],m=c[0]*c[1]+c[2]*c[3];return m>.499?(u[2]=2*Math.atan2(c[0],c[3]),u[0]=Math.PI/2,u[1]=0):m<-.499?(u[2]=-2*Math.atan2(c[0],c[3]),u[0]=-Math.PI/2,u[1]=0):(u[2]=Math.atan2(2*c[1]*c[3]-2*c[0]*c[2],1-2*h-2*f),u[0]=Math.asin(2*m),u[1]=Math.atan2(2*c[0]*c[3]-2*c[1]*c[2],1-2*p-2*f)),{yaw:180*u[2]/Math.PI,pitch:180*u[1]/Math.PI,roll:180*u[0]/Math.PI}},c}()},57160:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.ProtoBuf=void 0,u.ProtoBuf=function(){function c(c,u){this.Nbb=c,this.Qbb=u,this.Obb=0,this.Pbb=new DataView(this.Nbb.buffer,0,this.Nbb.length)}return c.prototype.readVarInt=function(){var c,u=0;for(c=0;this.Obb<this.Nbb.length&&(u|=(127&this.Nbb[this.Obb])<<c,128&this.Nbb[this.Obb]);this.Obb++)c+=7;return this.Obb++,u},c.prototype.readHeader=function(){var c=this.readVarInt();return{tag:c>>>3,type:7&c}},c.prototype.readString=function(){for(var c=this.readVarInt(),u=Array(c),d=0,p=this.Obb;p<this.Obb+c;p++){var h=this.Nbb[p];if(h<128)u[d++]=h;else if(h>=192&&h<224&&p+1<c)u[d++]=(31&h)<<6|63&this.Nbb[++p];else if(h>=224&&h<240&&p+2<c)u[d++]=(15&h)<<12|(63&this.Nbb[++p])<<6|63&this.Nbb[++p];else{if(!(h>=240&&h<248&&p+3<c))throw Error("Malformed UTF8 character at byte offset "+p);var f=(7&h)<<18|(63&this.Nbb[++p])<<12|(63&this.Nbb[++p])<<6|63&this.Nbb[++p];f<=65535?u[d++]=f:(f^=65536,u[d++]=55296|f>>10,u[d++]=56320|1023&f)}}var m="";for(p=0;p<d;p+=16384)m+=String.fromCharCode.apply(String,u.slice(p,p+16384<=d?p+16384:d));return this.Obb+=c,m},c.prototype.readPacked=function(c){var u=this.readVarInt(),d=[];switch(c){case"float":for(var p=0;p<u/4;p++)d.push(this.Pbb.getFloat32(this.Obb,!0)),this.Obb+=4;break;case"int":for(var h=this.Obb;this.Obb<h+u;)d.push(this.readVarInt())}return d},c.prototype.Rbb=function(c){for(var u=0,d=0;d<c;d++)u=(u<<8)+this.Nbb[this.Obb+d],this.Obb++;return u},c.prototype.readNum32=function(){var c=this.Pbb.getFloat32(this.Obb,!0);return this.Obb+=4,c},c.prototype.readNum64=function(){return this.Rbb(8)},c.prototype.readField=function(c){var u;switch(c){case 0:u=this.readVarInt();break;case 1:u=this.readNum64();break;case 2:u=this.readString();break;case 5:u=this.readNum32()}return u},c.prototype.readAll=function(){for(var c={};this.Obb<this.Nbb.length;){var u=this.readHeader(),d=void 0;if(this.Qbb.hasOwnProperty(u.tag))if(d=this.Qbb[u.tag],2===u.type&&d&&d.hasOwnProperty("packed")&&d.packed)c[d.name]=this.readPacked(d.type);else{var p=this.readField(u.type);"boolean"===d.type?p=!!p:"object"==typeof d.type&&(p=d.type[p]),c[d.name]=p}}if(c.length>0)for(var h in this.Qbb.defaults)this.Qbb.defaults.hasOwnProperty(h)&&void 0===c[h]&&(c[h]=this.Qbb.defaults[h]);return c},c}()},43948:function(c,u){var d,p,h,f,m,g;Object.defineProperty(u,"__esModule",{value:!0}),u.TransitionTimingType=u.VRState=u.VRContentType=void 0,(f=d||(u.VRContentType=d={})).Single="single",f.TAB="tab",f.SBS="sbs",(m=p||(u.VRState=p={})).Ready="ready",m.Playing="playing",m.Error="error",m.Uninitialized="uninitialized",(g=h||(u.TransitionTimingType=h={})).None="none",g.EaseIn="ease-in",g.EaseOut="ease-out",g.EaseInOut="ease-in-out"},61535:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.InternalVRHandler=void 0;var p=d(5357),h=d(3973),f=d(25926),m=d(4224),g=d(45202),v=d(3714),y=d(44468),b=d(21513),S=d(19274),_=d(43948),E=d(33639),T=d(85361);u.InternalVRHandler=function(){function c(u,d,y,w,P,A,I,M){var R=this;this.SC=null,this.TC=null,this.UC=null,this.VC=null,this.WC=_.VRState.Uninitialized,this.XC=null,this.YC=!1,this.ZC=!1,this.aC=null,this.bC=null,this.cC=null,this.dC=!1,this.tC=function(){R.eC=!0},this.HD=function(c){if(R.WC!==_.VRState.Playing)return R.gC&&R.lC.onRenderingSuspended&&R.lC.onRenderingSuspended(),void(R.gC=!1);R.ED(),R.ZC!==R.YC&&(R.iC.getEventFunction()(v.PlayerEvent.VRStereoChanged,{stereo:R.YC}),R.ZC=R.YC);var u=R.bC.update(c),d=!R.dC||R.eC||0===c;d||u||0===c||R.fC?(R.hC&&R.lC.onStartRendering&&R.lC.onStartRendering(),!R.gC&&R.lC.onRenderingResumed&&R.lC.onRenderingResumed(),R.aC.drawScene(R.bC.getProjectionInverse(),d),R.hC=!1,R.gC=!0):(R.gC&&R.lC.onRenderingSuspended&&R.lC.onRenderingSuspended(),R.gC=!1),null===R.XC&&(R.UC=requestAnimationFrame(R.HD)),R.eC=!1,R.fC=!1},this.ID=function(){R.sC().removeEventListener(S.MediaElementEvent.playing,R.ID),R.sC().removeEventListener(S.MediaElementEvent.seeked,R.ID),R.WC===_.VRState.Ready&&(R.ED(),R.WC=_.VRState.Playing,R.UC=requestAnimationFrame(R.HD))},this.JD=function(c){R.WC=_.VRState.Error,R.XC=c,R.GD(),R.UC&&(cancelAnimationFrame(R.UC),R.UC=null),R.iC.getEventFunction()(v.PlayerEvent.Warning,new f.PlayerWarning(m.WarningCode.VR_RENDERING_ERROR)),R.mC.debug("VR Rendering error: "+c)},this.enableGyroscope=function(){return R.bC.enableGyroscope(),!0},this.disableGyroscope=function(){return R.bC.disableGyroscope(),!0},this.isGyroscopeEnabled=function(){return R.bC.isGyroscopeEnabled()},this.enableMouseControl=function(){return R.bC.enableMouseControl(),!0},this.disableMouseControl=function(){return R.bC.disableMouseControl(),!0},this.isMouseControlEnabled=function(){return R.bC.isMouseControlEnabled()},this.enableKeyboardControl=function(){return R.bC.enableKeyboardControl(),!0},this.disableKeyboardControl=function(){return R.bC.disableKeyboardControl(),!0},this.isKeyboardControlEnabled=function(){return R.bC.isKeyboardControlEnabled()},this.setViewingDirection=function(c){return!!R.bC&&(R.bC.setViewingDirection(c),!0)},this.pause=function(){R.dC=!0},this.KD=function(){var c=R.sC();4!==c.readyState?c.addEventListener(S.MediaElementEvent.playing,function(){return R.dC=!1}):R.dC=!1},this.LD=function(){R.iC.off(v.PlayerEvent.Playing,R.KD),R.iC.off(v.PlayerEvent.Paused,R.pause),R.iC.off(v.PlayerEvent.Destroy,R.LD),R.iC.off(v.PlayerEvent.SourceUnloaded,R.LD),R.iC=null;var c=R.sC();R.pC&&R.pC.removeEventListener(S.MediaElementEvent.seeked,R.tC),R.GD(),R.SC&&R.SC.parentNode&&(R.SC.parentNode.removeChild(R.SC),R.SC=null),R.TC&&R.TC.parentNode&&(R.TC.parentNode.removeChild(R.TC),R.TC=null),R.VC&&R.VC.parentNode&&(R.VC.parentNode.removeChild(R.VC),R.VC=null),R.WC=_.VRState.Uninitialized,R.UC&&(cancelAnimationFrame(R.UC),R.UC=null),R.bC&&R.bC.destroy(),R.bC=null,R.aC.destroy(),R.aC=null,c.removeEventListener(S.MediaElementEvent.playing,R.ID),c.removeEventListener(S.MediaElementEvent.seeked,R.ID)},this.iC=u.eventHandler,this.pC=u.videoElement,this.qC=w,this.jC=u.parentHtmlElement,this.id=d,this.kC=y,this.lC=M,this.mC=P,this.nC=A,this.oC=u.sourceContext.technology.streaming,this.rC=I,this.eC=!1,this.fC=!1,this.gC=!1,this.hC=!0,this.SC=document.createElement("canvas"),this.SC.setAttribute("id","bitmovinplayer-vr-canvas"),this.SC.style.display="none",this.SC.style.position="absolute";var k=this.jC.getElementsByClassName(g.Environment.idPrefix+"poster")[0];k?this.jC.insertBefore(this.SC,k):this.jC.appendChild(this.SC);var x=u.sourceContext.technology.player;if(c.isVideoTextureSupported(A,this.oC,x)?this.mC.debug("VR: using 3D rendering context"):(this.TC=document.createElement("canvas"),this.TC.setAttribute("id","bitmovinplayer-vr-helper-canvas"),this.TC.style.display="none",this.TC.style.position="absolute",this.jC.insertBefore(this.TC,this.SC),this.mC.debug("VR: using 2D rendering context")),(0,b.getCapabilities)().isSafariIOS&&(this.pC.setAttribute("playsinline",""),this.pC.setAttribute("webkit-playsinline",""),this.mC.debug("VR: set playsinline = true")),this.VC=document.getElementById("bitmovinplayer-no-select-style-node"),this.VC||(this.VC=document.createElement("style"),this.VC.setAttribute("id","bitmovinplayer-no-select-style-node"),this.VC.appendChild(document.createTextNode(".bitmovinplayer-no-select { -webkit-user-select: none; -moz-user-select: -moz-none; -ms-user-select: none; user-select: none; }")),document.getElementsByTagName("head")[0].appendChild(this.VC)),this.YC=this.kC.stereo,this.ZC=this.YC,this.kC.restrictedInlinePlayback?this.mC.debug("VR: using restricted inline playback"):this.pC.addEventListener(S.MediaElementEvent.seeked,this.tC),"string"==typeof this.kC.cardboard){var C=p.Cardboard.decode(this.kC.cardboard);this.mC.debug("cardboard: "+JSON.stringify(C)),C.hasOwnProperty("distortion_coefficients")&&(this.cC=new h.DeviceInfo(C,this.mC))}this.WC=_.VRState.Ready,this.bC=new E.OrientationHandler(this.SC,this.jC,this.kC,this.lC,this.iC),this.aC=new T.Renderer(this.SC,this.TC,u,this.cC,this.JD,this.mC,this.rC,this.kC,this.lC),this.iC.on(v.PlayerEvent.Playing,this.KD),this.iC.on(v.PlayerEvent.Paused,this.pause),this.iC.on(v.PlayerEvent.Destroy,this.LD),this.iC.on(v.PlayerEvent.SourceUnloaded,this.LD),this.FD(),this.ED();var O=this.sC();4!==O.readyState&&O.paused?(O.addEventListener(S.MediaElementEvent.playing,this.ID),O.addEventListener(S.MediaElementEvent.seeked,this.ID)):this.ID()}return c.prototype.sC=function(){return this.kC.restrictedInlinePlayback&&this.qC?this.qC:this.pC},c.prototype.ED=function(){if(this.SC){this.jC&&this.jC.clientWidth&&this.jC.clientHeight?(c=this.jC.clientWidth,u=this.jC.clientHeight):(c=window.innerWidth,u=window.innerHeight),this.pC&&this.pC.videoWidth&&this.pC.videoHeight?(d=this.pC.videoWidth,p=this.pC.videoHeight):(d=c,p=u);var c,u,d,p,h=(this.nC.devicePixelRatio||1)/this.aC.getBackingStoreRatio(),f=c*h,m=u*h,g=f/m;f>d&&(m=(f=d)/g),m>p&&(f=(m=p)*g),this.SC.width===f&&this.SC.height===m||(this.SC.width=f,this.SC.height=m),this.TC&&(this.TC.width!==d||this.TC.height!==p)&&(this.TC.width=d,this.TC.height=p)}},c.prototype.FD=function(){this.SC&&(this.SC.style.display="block"),this.TC&&(this.TC.style.display="block"),this.pC&&(this.pC.style.display="none")},c.prototype.GD=function(){this.SC&&(this.SC.style.display="none"),this.TC&&(this.TC.style.display="none"),this.pC&&this.pC.style&&(this.pC.style.display="block")},c.isVideoTextureSupported=function(c,u,d){var p=c.appName,h=c.userAgent,f=c.appVersion,m=(0,b.getCapabilities)().safariVersion,g=(m.major>10||10===m.major&&m.minor>=1)&&!(0,b.getCapabilities)().isSafariIOS,v=-1;return!(u===y.StreamType.Hls&&d===y.PlayerType.Native&&!g)&&("Microsoft Internet Explorer"===p?null!==RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(h)&&(v=parseFloat(RegExp.$1)):"Netscape"===p&&(-1!==f.indexOf("Trident")?v=11:null!==RegExp("Edge/([0-9]{1,}[\\.0-9]{0,})").exec(h)&&(v=parseFloat(RegExp.$1))),-1===v||v>=13)},c.prototype.setStereo=function(c){return this.fC=this.YC!==c,this.YC=c,this.YC?(this.aC.enableStereo(),this.bC.enableStereo()):(this.aC.disableStereo(),this.bC.disableStereo()),!0},c.prototype.getStereo=function(){return this.YC},c.prototype.getState=function(){return this.WC===_.VRState.Ready?_.VRState.Ready:this.WC===_.VRState.Playing?_.VRState.Playing:this.WC===_.VRState.Error?_.VRState.Error:this.WC===_.VRState.Uninitialized?null:void 0},c.prototype.getLastError=function(){return this.XC},c.prototype.getViewingDirection=function(){return this.bC?this.bC.getViewingDirection():{yaw:0,pitch:0,roll:0}},c.prototype.moveViewingDirection=function(c){return!!this.bC&&(this.bC.moveViewingDirection(c),!0)},c.prototype.setViewingDirectionChangeEventInterval=function(c){return!!this.bC&&(this.bC.setViewingDirectionChangeEventInterval(c),!0)},c.prototype.getViewingDirectionChangeEventInterval=function(){return this.bC?this.bC.getViewingDirectionChangeEventInterval():-1},c.prototype.setViewingDirectionChangeThreshold=function(c){return!!this.bC&&(this.bC.setViewingDirectionChangeThreshold(c),!0)},c.prototype.getViewingDirectionChangeThreshold=function(){return this.bC?this.bC.getViewingDirectionChangeThreshold():-1},c.prototype.setVerticalFieldOfView=function(c){return!!this.bC&&(this.bC.setVerticalFieldOfView(c),!0)},c.prototype.getVerticalFieldOfView=function(){return this.bC?this.bC.getVerticalFieldOfView():-1},c.prototype.setHorizontalFieldOfView=function(c){return!!this.bC&&(this.bC.setHorizontalFieldOfView(c),!0)},c.prototype.getHorizontalFieldOfView=function(){return this.bC?this.bC.getHorizontalFieldOfView():-1},c.prototype.zoom=function(c){return!!this.bC&&this.bC.zoom(c)},c.prototype.getZoom=function(){return this.bC?this.bC.getZoom():-1},c.prototype.deviceOrientationPermissionRequired=function(){var c,u;return null!=(u=null==(c=this.bC)?void 0:c.permissionRequired())&&u},c.prototype.requestDeviceOrientationPermission=function(){var c,u;return null!=(u=null==(c=this.bC)?void 0:c.requestPermission())?u:Promise.resolve()},c}()},6463:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.VRState=u.TransitionTimingType=u.VRContentType=u.VRModuleDefinition=void 0;var p=d(62756),h=d(43948);Object.defineProperty(u,"TransitionTimingType",{enumerable:!0,get:function(){return h.TransitionTimingType}}),Object.defineProperty(u,"VRContentType",{enumerable:!0,get:function(){return h.VRContentType}}),Object.defineProperty(u,"VRState",{enumerable:!0,get:function(){return h.VRState}});var f=d(24180);u.VRModuleDefinition={name:p.ModuleName.VR,module:{VRHandler:f.VRHandler},exports:{VRContentType:h.VRContentType,TransitionTimingType:h.TransitionTimingType,VRState:h.VRState}},u.default=u.VRModuleDefinition},85361:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.Renderer=void 0;var p=d(44369),h=d(3714),f=d(44468),m=d(43948),g=d(54479),v=d(17378),y=function(){function c(){this.fY=[],this.gY=[]}return c.prototype.getVideoWidths=function(){return this.fY},c.prototype.getVideoHeights=function(){return this.gY},c.prototype.add=function(c,u){0>this.fY.indexOf(c)&&(this.fY.push(c),this.fY.sort(function(c,u){return c-u})),0>this.gY.indexOf(u)&&(this.gY.push(u),this.gY.sort(function(c,u){return c-u}))},c}();u.Renderer=function(){function c(c,u,d,p,f,m,b,S,_){var E=this;this.hY=null,this.iY=null,this.jY=g.GL_ERROR.NO_ERROR,this.lY=-1,this.mY=!1,this.nY=-1,this.oY=-1,this.pY=-1,this.qY=-1,this.rY=-1,this.sY=[-1,-1,1,-1,1,1,-1,1],this.tY=[0,1,2,0,2,3],this.uY=-1,this.vY=/mediump/g,this.wY=!0,this.xY=[0,0,0,0,0,0,0,0,0,0,0,0],this.yY={LEFT:0,RIGHT:1},this.zY=[0,0,0,0,0,0,0,0,0,0,0,0],this.AY=1,this.BY=[[1,1],[1,1]],this.CY=[1,1],this.RZ=null,this.SZ=null,this.TZ=null,this.UZ=null,this.VZ=null,this.WZ=null,this.XZ=-1,this.YZ=-1,this.ZZ=null,this.aZ=!1,this.bZ=null,S.stereo?(this.mY=!0,this.lY=2):(this.mY=!1,this.lY=1),this.QZ=d.eventHandler,this.RZ=m,this.SZ=c,this.TZ=u,this.UZ=d.videoElement,this.VZ=f,this.WZ=d.sourceContext.technology.streaming,this.bZ=b,this.cZ=S,this.dZ=_,this.kY=[],this.QZ.on(h.PlayerEvent.TimeChanged,function(){return E.wY=!1}),p&&(this.zY=this.EZ(p),this.AY=this.FZ(p),this.BY[this.yY.LEFT]=this.HZ(p,this.yY.LEFT),this.BY[this.yY.RIGHT]=this.HZ(p,this.yY.RIGHT),this.CY=this.IZ(p)),this.ZZ=new y,this.FY=new v.FrameRateMonitor(1500,1e3),this.cZ.enableFrameRateMeasurements?(this.FY.enable(),this.FY.subscribe(this)):this.FY.disable();try{this.uZ(),this.tZ(),this.vZ(),this.wZ(),this.xZ(),this.yZ(),this.zZ(),this.AZ()}catch(c){this.RZ.error(c)}}return c.prototype.qZ=function(c){if(void 0===c&&(c=[]),null!==this.hY){var u=this.hY.getError();if(u===g.GL_ERROR.NO_ERROR)return this.jY=g.GL_ERROR.NO_ERROR,void(this.kY=[]);if(this.kY.push(u),c.indexOf(u)>-1&&this.wY)throw this.jY=g.GL_ERROR.NO_ERROR,this.kY=[],"STARTUP ERROR";if(!(this.kY.length>=this.bZ.MAX_CONSECUTIVE_VR_ERRORS))return;this.jY=this.kY[this.kY.length-1]}var d="Unable to initialize WebGL";throw g.GL_ERROR_STR[this.jY]&&(d=g.GL_ERROR_STR[this.jY]),this.VZ(d),d},c.prototype.rZ=function(c,u){for(var d=[],p=2;p<arguments.length;p++)d[p-2]=arguments[p];var h=null;if(c&&"function"==typeof c[u]){try{h=c[u].apply(c,d)}catch(c){this.RZ.warn("could not call WebGL function ("+u+"("+JSON.stringify(d)+")): "+c)}this.qZ()}return h},c.prototype.sZ=function(c){throw this.jY=g.GL_ERROR.OTHER_ERROR,this.VZ(c),c},c.prototype.tZ=function(){this.EY=d(10768),this.DY=d(50766);var c=this.rZ(this.hY,"getShaderPrecisionFormat",this.hY.FRAGMENT_SHADER,this.hY.HIGH_FLOAT);0!==c.precision&&0!==c.rangeMin&&0!==c.rangeMax&&(this.EY=this.EY.replace(this.vY,"highp")),0!==(c=this.rZ(this.hY,"getShaderPrecisionFormat",this.hY.VERTEX_SHADER,this.hY.HIGH_FLOAT)).precision&&0!==c.rangeMin&&0!==c.rangeMax&&(this.DY=this.DY.replace(this.vY,"highp"))},c.prototype.uZ=function(){this.TZ&&(this.iY=this.TZ.getContext("2d"));var c={failIfMajorPerformanceCaveat:!0};this.hY=this.SZ.getContext("webgl",c)||this.SZ.getContext("experimental-webgl",c),this.qZ(),this.rZ(this.hY,"clearColor",.5,.5,.5,1),this.rZ(this.hY,"clearDepth",1),this.rZ(this.hY,"disable",this.hY.DEPTH_TEST)},c.prototype.vZ=function(){this.nY=this.rZ(this.hY,"createShader",this.hY.VERTEX_SHADER),this.rZ(this.hY,"shaderSource",this.nY,this.DY),this.rZ(this.hY,"compileShader",this.nY),this.rZ(this.hY,"getShaderParameter",this.nY,this.hY.COMPILE_STATUS)||this.sZ("Vertex shader compilation failed ("+this.rZ(this.hY,"getShaderInfoLog",this.nY)+")"),this.oY=this.rZ(this.hY,"createShader",this.hY.FRAGMENT_SHADER),this.rZ(this.hY,"shaderSource",this.oY,this.EY),this.rZ(this.hY,"compileShader",this.oY),this.rZ(this.hY,"getShaderParameter",this.oY,this.hY.COMPILE_STATUS)||this.sZ("Fragment shader compilation failed ("+this.rZ(this.hY,"getShaderInfoLog",this.oY)+")")},c.prototype.wZ=function(){this.pY=this.rZ(this.hY,"createProgram"),this.rZ(this.hY,"attachShader",this.pY,this.nY),this.rZ(this.hY,"attachShader",this.pY,this.oY),this.rZ(this.hY,"linkProgram",this.pY),this.rZ(this.hY,"getProgramParameter",this.pY,this.hY.LINK_STATUS)||this.sZ("Unable to link program: "+this.rZ(this.hY,"getProgramInfoLog",this.pY)),this.rZ(this.hY,"useProgram",this.pY)},c.prototype.xZ=function(){this.eZ=new g.GLAttribute(this.hY,this.pY,"vertexPosition",null)},c.prototype.yZ=function(){this.fZ=new g.GLUniform(this.hY,this.pY,"eyeSelector",g.GLVariableType.UNIFORM_1I),this.gZ=new g.GLUniform(this.hY,this.pY,"textureUnit",g.GLVariableType.UNIFORM_1I),this.iZ=new g.GLUniform(this.hY,this.pY,"contentType",g.GLVariableType.UNIFORM_1I),this.jZ=new g.GLUniform(this.hY,this.pY,"contentFieldOfView",g.GLVariableType.UNIFORM_1F),this.kZ=new g.GLUniform(this.hY,this.pY,"videoWidth",g.GLVariableType.UNIFORM_1F),this.lZ=new g.GLUniform(this.hY,this.pY,"videoHeight",g.GLVariableType.UNIFORM_1F),this.hZ=new g.GLUniform(this.hY,this.pY,"projectionInverse",g.GLVariableType.UNIFORM_MATRIX_4FV),this.mZ=new g.GLUniform(this.hY,this.pY,"distortionCoefficients",g.GLVariableType.UNIFORM_1FV),this.nZ=new g.GLUniform(this.hY,this.pY,"distortionMaxFovSquared",g.GLVariableType.UNIFORM_1F),this.oZ=new g.GLUniform(this.hY,this.pY,"distortionFovOffset",g.GLVariableType.UNIFORM_2FV),this.pZ=new g.GLUniform(this.hY,this.pY,"distortionFovScale",g.GLVariableType.UNIFORM_2FV)},c.prototype.zZ=function(){this.qY=this.rZ(this.hY,"createBuffer"),this.rZ(this.hY,"bindBuffer",this.hY.ARRAY_BUFFER,this.qY),this.rZ(this.hY,"bufferData",this.hY.ARRAY_BUFFER,new Float32Array(this.sY),this.hY.STATIC_DRAW),this.rY=this.rZ(this.hY,"createBuffer"),this.rZ(this.hY,"bindBuffer",this.hY.ELEMENT_ARRAY_BUFFER,this.rY),this.rZ(this.hY,"bufferData",this.hY.ELEMENT_ARRAY_BUFFER,new Uint16Array(this.tY),this.hY.STATIC_DRAW)},c.prototype.AZ=function(){this.uY=this.rZ(this.hY,"createTexture"),this.rZ(this.hY,"bindTexture",this.hY.TEXTURE_2D,this.uY),this.rZ(this.hY,"texParameteri",this.hY.TEXTURE_2D,this.hY.TEXTURE_MAG_FILTER,this.hY.LINEAR),this.rZ(this.hY,"texParameteri",this.hY.TEXTURE_2D,this.hY.TEXTURE_MIN_FILTER,this.hY.LINEAR),this.rZ(this.hY,"texParameteri",this.hY.TEXTURE_2D,this.hY.TEXTURE_WRAP_S,this.hY.CLAMP_TO_EDGE),this.rZ(this.hY,"texParameteri",this.hY.TEXTURE_2D,this.hY.TEXTURE_WRAP_T,this.hY.CLAMP_TO_EDGE)},c.prototype.BZ=function(c,u){var d,p,h=this.rZ(this.iY,"getImageData",0,0,c,u);if(!h)return this.RZ.debug("Texture size verification failed."),void(this.aZ=!1);for(var f=this.ZZ.getVideoWidths(),m=this.ZZ.getVideoHeights(),g=0;g<f.length&&h.data[4*(f[g]-1)+3]>0;g++)d=Math.min(f[g],c);for(var v=0;v<m.length&&h.data[(m[v]-1)*this.UZ.videoWidth*4+3]>0;v++)p=Math.min(m[v],u);d&&p&&(d!==c||p!==u)?(this.RZ.debug("Texture size mismatch! Expected "+c+"x"+u+" but got "+d+"x"+p+" instead."),this.rZ(this.iY,"drawImage",this.TZ,0,0,d,p,0,0,this.TZ.width,this.TZ.height)):this.aZ=!1},c.prototype.CZ=function(){if(!this.jY||this.jY===g.GL_ERROR.NO_ERROR){var c=this.UZ.videoWidth,u=this.UZ.videoHeight;if(this.TZ&&this.iY){var d=0;this.WZ!==f.StreamType.Progressive&&/Trident/.test(navigator.userAgent)&&(d=.0555555*u);var p=u-2*d;this.rZ(this.iY,"drawImage",this.UZ.getWrappedElement(),0,d,c,p,0,0,this.TZ.width,this.TZ.height),this.ZZ.add(c,u);var h=this.XZ!==c,m=this.YZ!==u;!h&&!m||/Trident/.test(navigator.userAgent)||(this.aZ=!0),this.aZ&&this.BZ(c,u),this.XZ=c,this.YZ=u}this.rZ(this.hY,"activeTexture",this.hY.TEXTURE0),this.rZ(this.hY,"bindTexture",this.hY.TEXTURE_2D,this.uY);try{var v=null!==this.dZ.requestFakeInput?this.dZ.requestFakeInput():null;null!==v?this.rZ(this.hY,"texImage2D",this.hY.TEXTURE_2D,0,this.hY.RGB,this.hY.RGB,this.hY.UNSIGNED_BYTE,v):this.TZ?this.rZ(this.hY,"texImage2D",this.hY.TEXTURE_2D,0,this.hY.RGB,this.hY.RGB,this.hY.UNSIGNED_BYTE,this.TZ):this.rZ(this.hY,"texImage2D",this.hY.TEXTURE_2D,0,this.hY.RGB,this.hY.RGB,this.hY.UNSIGNED_BYTE,this.UZ.getWrappedElement())}catch(c){this.sZ(c.message)}}},c.prototype.onFrameRateAvailable=function(c,u,d){this.RZ.debug("Average framerate: "+c.toFixed(2)+"fps, of which "+(100*d).toFixed(2)+"% were spent drawing the scene, "+(100*u).toFixed(2)+"% were spent updating the texture")},c.prototype.DZ=function(c,u){if(!this.jY||this.jY===g.GL_ERROR.NO_ERROR){switch(this.rZ(this.hY,"useProgram",this.pY),this.rZ(this.hY,"bindBuffer",this.hY.ARRAY_BUFFER,this.qY),this.rZ(this.hY,"vertexAttribPointer",this.eZ.loc,2,this.hY.FLOAT,!1,0,0),this.rZ(this.hY,"activeTexture",this.hY.TEXTURE0),this.rZ(this.hY,"bindTexture",this.hY.TEXTURE_2D,this.uY),this.fZ.setValue(c),this.gZ.setValue(0),this.jZ.setValue(this.cZ.contentFieldOfView),isFinite(this.UZ.videoWidth)&&this.UZ.videoWidth>0&&isFinite(this.UZ.videoHeight)&&this.UZ.videoHeight>0?(this.kZ.setValue(this.UZ.videoWidth),this.lZ.setValue(this.UZ.videoHeight)):(this.kZ.setValue(4096),this.lZ.setValue(2048)),this.cZ.contentType){case m.VRContentType.Single:this.iZ.setValue(0);break;case m.VRContentType.SBS:this.iZ.setValue(1);break;case m.VRContentType.TAB:this.iZ.setValue(2);break;default:this.sZ("Invalid content type specified ("+this.cZ.contentType+")")}this.mZ.setValue(this.zY),this.nZ.setValue(this.AY),this.oZ.setValue(this.BY[c]),this.pZ.setValue(this.CY),this.hZ.setValue(u),this.rZ(this.hY,"viewport",this.SZ.width/2*c,0,this.SZ.width/this.lY,this.SZ.height),this.rZ(this.hY,"bindBuffer",this.hY.ELEMENT_ARRAY_BUFFER,this.rY),this.rZ(this.hY,"drawElements",this.hY.TRIANGLES,6,this.hY.UNSIGNED_SHORT,0)}},c.prototype.EZ=function(c){return c?c.viewer.inverseCoefficients:this.xY},c.prototype.FZ=function(c){var u=this.GZ(c),d=p.MathUtil.hypot(Math.tan(p.MathUtil.degToRad(Math.max(u.leftDegrees,u.rightDegrees))),Math.tan(p.MathUtil.degToRad(Math.max(u.downDegrees,u.upDegrees))));return d*d},c.prototype.GZ=function(c,u){var d=u||this.yY.LEFT;return d===this.yY.LEFT?c.getFieldOfViewLeftEye(!0):d===this.yY.RIGHT?c.getFieldOfViewRightEye(!0):null},c.prototype.HZ=function(c,u){var d=this.GZ(c,u);return[Math.tan(p.MathUtil.degToRad(d.leftDegrees)),Math.tan(p.MathUtil.degToRad(d.downDegrees))]},c.prototype.IZ=function(c){var u=this.GZ(c);return[Math.tan(p.MathUtil.degToRad(u.leftDegrees))+Math.tan(p.MathUtil.degToRad(u.rightDegrees)),Math.tan(p.MathUtil.degToRad(u.upDegrees))+Math.tan(p.MathUtil.degToRad(u.downDegrees))]},c.prototype.getBackingStoreRatio=function(){var c=0;return this.jY===g.GL_ERROR.NO_ERROR&&(c=(c=(c=(c=(c=c||this.hY.webkitBackingStorePixelRatio)||this.hY.mozBackingStorePixelRatio)||this.hY.msBackingStorePixelRatio)||this.hY.oBackingStorePixelRatio)||this.hY.backingStorePixelRatio),c||1},c.prototype.enableStereo=function(){this.mY=!0,this.lY=2},c.prototype.disableStereo=function(){this.mY=!1,this.lY=1},c.prototype.drawScene=function(c,u){if((!this.jY||this.jY===g.GL_ERROR.NO_ERROR)&&this.hY&&this.UZ.getWrappedElement()){this.FY.endAnimationFrame(),this.FY.startAnimationFrame(),this.FY.startDrawScene();try{this.FY.startUpdateTexture(),u&&this.CZ(),this.FY.endUpdateTexture(),this.DZ(this.yY.LEFT,c),this.mY&&this.DZ(this.yY.RIGHT,c),null!==this.dZ.onDrawScene&&this.dZ.onDrawScene(this.hY),this.qZ([g.GL_ERROR.INVALID_VALUE])}catch(c){this.RZ.warn("Texture update failed: "+c)}this.FY.endDrawScene()}},c.prototype.destroy=function(){this.FY.unsubscribe(this),this.FY.destroy(),this.FY=null,this.ZZ=null,this.hY=null,this.SZ=null,this.iY=null,this.TZ=null},c}()},24180:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.VRHandler=void 0;var p,h=d(61535),f=d(70372);u.VRHandler=function(){function c(c,u,d,m,g,v,y){var b=f.ConfigParser.parse(d),S=b[0],_=b[1],E=new h.InternalVRHandler(c,u,S,m,g,v,y,_);(p=p||new window.WeakMap).set(this,E)}return c.prototype.b=function(){return p.has(this)&&"error"!==p.get(this).getState()},c.prototype.setStereo=function(c){var u="boolean"==typeof c;return!(!this.b()||!u)&&p.get(this).setStereo(c)},c.prototype.enableGyroscope=function(){return!!this.b()&&p.get(this).enableGyroscope()},c.prototype.disableGyroscope=function(){return!!this.b()&&p.get(this).disableGyroscope()},c.prototype.isGyroscopeEnabled=function(){return!!this.b()&&p.get(this).isGyroscopeEnabled()},c.prototype.enableMouseControl=function(){return!!this.b()&&p.get(this).enableMouseControl()},c.prototype.disableMouseControl=function(){return!!this.b()&&p.get(this).disableMouseControl()},c.prototype.isMouseControlEnabled=function(){return!!this.b()&&p.get(this).isMouseControlEnabled()},c.prototype.enableKeyboardControl=function(){return!!this.b()&&p.get(this).enableKeyboardControl()},c.prototype.disableKeyboardControl=function(){return!!this.b()&&p.get(this).disableKeyboardControl()},c.prototype.isKeyboardControlEnabled=function(){return!!this.b()&&p.get(this).isKeyboardControlEnabled()},c.prototype.getStereo=function(){return!!this.b()&&p.get(this).getStereo()},c.prototype.getState=function(){return p.has(this)?p.get(this).getState():null},c.prototype.getLastError=function(){return p.has(this)?p.get(this).getLastError():null},c.prototype.getViewingDirection=function(){return this.b()?p.get(this).getViewingDirection():{yaw:0,pitch:0,roll:0}},c.prototype.setViewingDirection=function(c){var u=c&&isFinite(c.yaw)&&isFinite(c.pitch)&&isFinite(c.roll);return!(!this.b()||!u)&&p.get(this).setViewingDirection(c)},c.prototype.moveViewingDirection=function(c){var u=isFinite(c.x)&&isFinite(c.y)&&isFinite(c.phi);return!(!this.b()||!u)&&p.get(this).moveViewingDirection(c)},c.prototype.setViewingDirectionChangeEventInterval=function(c){var u=isFinite(c);return!(!this.b()||!u)&&p.get(this).setViewingDirectionChangeEventInterval(c)},c.prototype.getViewingDirectionChangeEventInterval=function(){return this.b()?p.get(this).getViewingDirectionChangeEventInterval():-1},c.prototype.setViewingDirectionChangeThreshold=function(c){var u=isFinite(c);return!(!this.b()||!u)&&p.get(this).setViewingDirectionChangeThreshold(c)},c.prototype.getViewingDirectionChangeThreshold=function(){return this.b()?p.get(this).getViewingDirectionChangeThreshold():-1},c.prototype.setVerticalFieldOfView=function(c){return!!this.b()&&p.get(this).setVerticalFieldOfView(c)},c.prototype.getVerticalFieldOfView=function(){return this.b()?p.get(this).getVerticalFieldOfView():-1},c.prototype.setHorizontalFieldOfView=function(c){return!!this.b()&&p.get(this).setHorizontalFieldOfView(c)},c.prototype.getHorizontalFieldOfView=function(){return this.b()?p.get(this).getHorizontalFieldOfView():-1},c.prototype.zoom=function(c){return!!this.b()&&p.get(this).zoom(c)},c.prototype.getZoom=function(){return this.b()?p.get(this).getZoom():-1},c.prototype.deviceOrientationPermissionRequired=function(){var c,u;return this.b()&&null!=(u=null==(c=p.get(this))?void 0:c.deviceOrientationPermissionRequired())&&u},c.prototype.requestDeviceOrientationPermission=function(){var c,u;return this.b()&&null!=(u=null==(c=p.get(this))?void 0:c.requestDeviceOrientationPermission())?u:Promise.resolve()},c}()},45698:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.ApiControl=void 0;var f=d(37485);u.ApiControl=function(c){function u(u,d,p){var h=c.call(this,u,d)||this;return h.setViewingDirectionChangeEventInterval(p),h.icb=new f.DisplacementVector,h.jcb=new f.DisplacementVector,h.lcb=0,h}return h(u,c),u.prototype.getDisplacementVector=function(c){return this.lcb+=c,this.lcb>this.kcb?this.jcb.update(0,0,0,!1,c):(f.DisplacementVector.clone(this.icb,this.jcb),this.jcb.length=this.icb.length*c,this.jcb.phi=this.icb.phi*c,this.jcb.update(this.jcb.x,this.jcb.y,this.jcb.phi,!0,c)),this.jcb},u.prototype.setTargetVector=function(c){this.icb.fromVec3(c,!0),this.lcb=0},u.prototype.setViewingDirectionChangeEventInterval=function(c){this.kcb=c},u.prototype.dispose=function(){this.disable()},u}(d(67982).Control)},67982:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.Control=void 0,u.Control=function(){function c(c,u){this.config=c,this.debugHooks=u}return c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.isEnabled=function(){return this.enabled},c}()},22185:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.KeyboardControl=void 0;var f=d(37485),m=d(67982),g=function(){function c(c){this.setKeyCombinations(c),this.ncb=!1}return c.prototype.checkAndSetActiveState=function(c){return this.mcb.some(function(u){return!u.some(function(u){return 0>c.indexOf(u)})})?(this.ncb=!0,!0):(this.ncb=!1,!1)},c.prototype.isActive=function(){return this.ncb},c.prototype.setKeyCombinations=function(c){for(var u=[],d=0;d<c.length;d++){var p=c[d].split(" ").filter(function(c){return c.length>0});p.length>0&&u.push(p)}this.mcb=u},c}();u.KeyboardControl=function(c){function u(u,d){var p=c.call(this,u,d)||this;return p.Hdb=function(c){if(c&&"string"==typeof c.key){var u=c.key.replace(" ","Space"),d=p.Fdb.indexOf(u);d>=0&&"keyup"===c.type?p.Fdb.splice(d,1):d<0&&"keydown"===c.type&&p.Fdb.push(u),p.pcb.checkAndSetActiveState(p.Fdb),p.Adb.checkAndSetActiveState(p.Fdb),p.Bdb.checkAndSetActiveState(p.Fdb),p.Cdb.checkAndSetActiveState(p.Fdb),p.Ddb.checkAndSetActiveState(p.Fdb),p.Edb.checkAndSetActiveState(p.Fdb)}},p.ocb=p.config.maxDisplacementSpeed,p.pcb=new g(["w"]),p.Adb=new g(["s"]),p.Bdb=new g(["a"]),p.Cdb=new g(["d"]),p.Ddb=new g(["e"]),p.Edb=new g(["q"]),p.Fdb=[],p.Gdb=new f.DisplacementVector,p.applyKeyMap(p.config.keyMap),p.enable(),p}return h(u,c),u.prototype.getDisplacementVector=function(c){if(this.enabled){var u=0,d=0,p=0;this.debugHooks.requestKeyActiveState?(d+=this.debugHooks.requestKeyActiveState("up")?this.ocb*c:0,d-=this.debugHooks.requestKeyActiveState("down")?this.ocb*c:0,u+=this.debugHooks.requestKeyActiveState("left")?this.ocb*c:0,u-=this.debugHooks.requestKeyActiveState("right")?this.ocb*c:0,p-=this.debugHooks.requestKeyActiveState("rotateClockwise")?this.ocb*c:0,p+=this.debugHooks.requestKeyActiveState("rotateCounterclockwise")?this.ocb*c:0):(d+=this.pcb.isActive()?this.ocb*c:0,d-=this.Adb.isActive()?this.ocb*c:0,u+=this.Bdb.isActive()?this.ocb*c:0,u-=this.Cdb.isActive()?this.ocb*c:0,p-=this.Ddb.isActive()?this.ocb*c:0,p+=this.Edb.isActive()?this.ocb*c:0);var h=0!==u||0!==d||0!==p;this.Gdb.update(u,d,p,h,c)}else this.Gdb.update(0,0,0,!1,c);return this.Gdb},u.prototype.enable=function(){this.enabled=!0,document.addEventListener("keydown",this.Hdb,!1),document.addEventListener("keyup",this.Hdb,!1)},u.prototype.disable=function(){this.enabled=!1,document.removeEventListener("keydown",this.Hdb,!1),document.removeEventListener("keyup",this.Hdb,!1)},u.prototype.dispose=function(){this.disable()},u.prototype.applyKeyMap=function(c){c.hasOwnProperty("up")&&this.pcb.setKeyCombinations(c.up),c.hasOwnProperty("down")&&this.Adb.setKeyCombinations(c.down),c.hasOwnProperty("left")&&this.Bdb.setKeyCombinations(c.left),c.hasOwnProperty("right")&&this.Cdb.setKeyCombinations(c.right),c.hasOwnProperty("rotateClockwise")&&this.Ddb.setKeyCombinations(c.rotateClockwise),c.hasOwnProperty("rotateCounterclockwise")&&this.Edb.setKeyCombinations(c.rotateCounterclockwise)},u}(m.Control)},64419:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.MouseControl=void 0;var f=d(37485),m=d(51629);u.MouseControl=function(c){function u(d,p,h,g,v){void 0===v&&(v=90);var y=c.call(this,d,p)||this;return y.Rdb=function(c){var d=u.getTouchPosition(c),p=0,h=0;y.Kdb&&(p=d.x-y.Ndb.x,h=d.y-y.Ndb.y,y.Odb.x+=p,y.Odb.y+=h,y.Ndb=d),Math.abs(p)+Math.abs(h)>0&&(y.Mdb=!0),c.preventDefault()},y.Sdb=function(c){c.stopPropagation(),c.preventDefault(),m.ElementHelper.removeEventListener(document,["click"],y.Sdb,!0)},y.Tdb=function(c){m.ElementHelper.removeEventListener(document,m.ElementHelper.touchEvents.move,y.Rdb,!1),m.ElementHelper.removeEventListener(document,m.ElementHelper.touchEvents.up,y.Tdb,!1),m.ElementHelper.removeEventListener(y.Idb,m.ElementHelper.touchEvents.up,y.Tdb,!1),m.ElementHelper.removeClass(document.body,"bitmovinplayer-no-select"),y.Ndb=null,y.Kdb=!1,y.Mdb&&y.Ldb&&c.target===y.Ldb&&m.ElementHelper.addEventListener(document,["click"],y.Sdb,!0),y.Mdb=!1,y.Ldb=null},y.Udb=function(c){y.Ndb=u.getTouchPosition(c),y.Odb={x:0,y:0},y.Kdb=!0,y.Mdb=!1,y.Ldb=c.target,m.ElementHelper.addEventListener(document,m.ElementHelper.touchEvents.move,y.Rdb,!1),m.ElementHelper.addEventListener(document,m.ElementHelper.touchEvents.up,y.Tdb,!1),m.ElementHelper.addEventListener(y.Idb,m.ElementHelper.touchEvents.up,y.Tdb,!1),m.ElementHelper.addClass(document.body,"bitmovinplayer-no-select")},y.Idb=h,y.Jdb=g,y.Kdb=!1,y.Ndb=null,y.Odb={x:0,y:0},y.Pdb=v,y.Qdb=new f.DisplacementVector,y.enable(),y}return h(u,c),u.prototype.getDisplacementVector=function(c){var u=this.Jdb.clientWidth,d=this.Jdb.clientHeight,p=!!this.debugHooks.requestTraveledMouseDistance,h=this.Pdb*(d/u);if(this.Odb=p?this.debugHooks.requestTraveledMouseDistance(c):this.Odb,this.enabled&&isFinite(h)&&h>0){var f=this.Kdb||0!==this.Odb.x||0!==this.Odb.y;this.Qdb.update(this.Odb.x/this.Jdb.clientWidth*this.Pdb,this.Odb.y/this.Jdb.clientHeight*h,0,f,c),this.Odb={x:0,y:0}}else this.Qdb.update(0,0,0,this.Kdb,c);return this.Qdb},u.prototype.enable=function(){this.enabled=!0,m.ElementHelper.addEventListener(this.Idb,m.ElementHelper.touchEvents.down,this.Udb,!1)},u.prototype.disable=function(){this.enabled=!1,m.ElementHelper.removeEventListener(document,m.ElementHelper.touchEvents.move,this.Rdb,!1),m.ElementHelper.removeEventListener(document,m.ElementHelper.touchEvents.up,this.Tdb,!1),m.ElementHelper.removeEventListener(this.Idb,m.ElementHelper.touchEvents.up,this.Tdb,!1),m.ElementHelper.removeEventListener(this.Idb,m.ElementHelper.touchEvents.down,this.Udb,!1),m.ElementHelper.removeEventListener(document,["click"],this.Sdb,!0),this.Ndb=null,this.Kdb=!1,this.Mdb=!1,this.Ldb=null,m.ElementHelper.removeClass(document.body,"bitmovinplayer-no-select")},u.prototype.dispose=function(){this.disable(),this.Idb=null,this.Jdb=null},u.getTouchPosition=function(c){var u={x:0,y:0};return"ms"===m.ElementHelper.touchEvents.type?(u.x=c.clientX||c.originalEvent.layerX,u.y=c.clientY||c.originalEvent.layerY):"mobile"===m.ElementHelper.touchEvents.type?(u.x=c.touches[0].clientX,u.y=c.touches[0].clientY):(u.x=c.clientX,u.y=c.clientY),u.x=u.x||0,u.y=u.y||0,u},u}(d(67982).Control)},54479:function(c,u){var d,p,h,f,m,g=this&&this.__extends||(h=function(c,u){return(h=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}h(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});
28Object.defineProperty(u,"__esModule",{value:!0}),u.GLUniform=u.GLAttribute=u.GLVariableType=u.GL_ERROR_STR=u.GL_ERROR=void 0,(d=f||(u.GL_ERROR=f={}))[d.NO_ERROR=0]="NO_ERROR",d[d.OTHER_ERROR=1]="OTHER_ERROR",d[d.INVALID_ENUM=1280]="INVALID_ENUM",d[d.INVALID_FRAMEBUFFER_OPERATION=1286]="INVALID_FRAMEBUFFER_OPERATION",d[d.INVALID_OPERATION=1282]="INVALID_OPERATION",d[d.INVALID_VALUE=1281]="INVALID_VALUE",u.GL_ERROR_STR={1280:"INVALID_ENUM",1286:"INVALID_FRAMEBUFFER_OPERATION",1282:"INVALID_OPERATION",1281:"INVALID_VALUE"},(p=m||(u.GLVariableType=m={})).UNIFORM_1I="uniform1i",p.UNIFORM_1F="uniform1f",p.UNIFORM_MATRIX_4FV="uniformMatrix4fv",p.UNIFORM_1FV="uniform1fv",p.UNIFORM_2FV="uniform2fv";var v=function(){function c(c,u,d,p){this.context=c,this.program=u,this.name=d,this.type=p}return Object.defineProperty(c.prototype,"loc",{get:function(){return this.location},enumerable:!1,configurable:!0}),c}();u.GLAttribute=function(c){function u(u,d,p,h){var f=c.call(this,u,d,p,h)||this;return f.location=f.context.getAttribLocation(f.program,f.name),f.context.enableVertexAttribArray(f.name),f}return g(u,c),u.prototype.setValue=function(c){},u}(v),u.GLUniform=function(c){function u(u,d,p,h){var f=c.call(this,u,d,p,h)||this;return f.location=f.context.getUniformLocation(f.program,f.name),f.context.enableVertexAttribArray(f.name),f}return g(u,c),u.prototype.setValue=function(c){this.type.indexOf("Matrix")>-1?this.context[this.type].call(this.context,this.location,!1,c):this.context[this.type].call(this.context,this.location,c)},u}(v)},55443:function(c,u,d){var p,h=this&&this.__extends||(f=function(c,u){return(f=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}f(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.DefaultDeviceOrientationProvider=void 0;var f,m,g=d(44369),v=d(16404);(p=m||(m={})).Granted="granted",p.Denied="denied",u.DefaultDeviceOrientationProvider=function(c){function u(){var d=c.call(this)||this;d.kgb=null,d.lgb=null,d.mgb=null,d.ngb=0,d.ogb=0,d.rgb=function(c){var u=void 0!==c.alpha&&null!==c.alpha,p=void 0!==c.beta&&null!==c.beta,h=void 0!==c.gamma&&null!==c.gamma;u&&p&&h&&(d.kgb=c.alpha,d.lgb=c.gamma,d.mgb=c.beta),c.hasOwnProperty("screenOrientation")&&(d.ngb=d.qgb(c))},d.sgb=function(){d.rgb(u.getDeviceOrientationFromWindow())},d.tgb=function(c){c&&c.data&&d.rgb(c.data)},window.top!==window?window.addEventListener("message",d.tgb,!1):window.addEventListener("deviceorientation",d.rgb);try{window.addEventListener("orientationchange",d.sgb);var p=u.getDeviceOrientationFromWindow();d.rgb(p)}catch{window.removeEventListener("orientationchange",d.sgb)}return d.enable(),d}return h(u,c),u.prototype.getOrientation=function(){if(!this.orientationDataAvailable()||!this.enabled)return this.defaultDeviceOrientation;var c=g.MathUtil.degToRad(this.kgb)/2,u=g.MathUtil.degToRad(this.mgb)/2,d=g.MathUtil.degToRad(this.lgb)/2,p=Math.cos(u),h=Math.cos(d),f=Math.cos(c),m=Math.sin(u),v=Math.sin(d),y=Math.sin(c),b=g.Quat.fromValues(m*h*f-p*v*y,p*v*f+m*h*y,p*h*y+m*v*f,p*h*f-m*v*y),S=g.MathUtil.degToRad(this.pgb())/2,_=g.Quat.fromValues(0,0,-Math.sin(S),Math.cos(S)),E=g.Quat.create();g.Quat.multiply(E,b,_);var T=Math.sqrt(.5);return g.Quat.multiply(E,g.Quat.fromValues(-T,0,0,T),E),g.Quat.toAngle(E)},u.prototype.orientationDataAvailable=function(){return null!==this.kgb},u.supported=function(){return!!window.DeviceOrientationEvent},u.prototype.pgb=function(){return this.ngb},u.prototype.qgb=function(c){var u;switch(c.screenOrientation.type){case"landscape-primary":u=90;break;case"landscape-secondary":u=-90;break;case"portrait-secondary":u=180;break;case"portrait-primary":u=0}return!u&&isNaN(u)&&(u=isNaN(c.screenOrientation.type)?c.orientation||0:c.screenOrientation.type),window.top!==window&&u===this.ogb&&c.orientation!==u&&(u=c.orientation||0),u},u.getDeviceOrientationFromWindow=function(){var c=window.screen,u=c.orientation||c.mozOrientation||c.msOrientation||{};return{screenOrientation:{type:u.type||u,angle:u.angle},orientation:window.orientation}},u.prototype.permissionRequired=function(){return"u">typeof DeviceMotionEvent&&"function"==typeof DeviceMotionEvent.requestPermission},u.prototype.requestPermission=function(){return typeof DeviceMotionEvent>"u"||"function"!=typeof DeviceMotionEvent.requestPermission?Promise.resolve():DeviceMotionEvent.requestPermission().then(function(c){return c===m.Granted?Promise.resolve():Promise.reject()})},u}(v.DeviceOrientationProvider)}
vendor: 16,600 bytes, line 28
28,16404:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.DeviceOrientationProvider=void 0,u.DeviceOrientationProvider=function(){function c(){this.defaultFieldOfView={upDegrees:45,rightDegrees:55,downDegrees:45,leftDegrees:55},this.defaultDeviceOrientation={yaw:0,pitch:0,roll:0}}return c.prototype.getFieldOfViewParams=function(){return this.defaultFieldOfView},c.supported=function(){return!1},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.isEnabled=function(){return this.enabled},c.prototype.permissionRequired=function(){return!1},c.prototype.requestPermission=function(){return Promise.resolve()},c}()},59324:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.DeviceOrientationProviderFactory=void 0;var p=d(55443),h=d(11805),f=d(72458);u.DeviceOrientationProviderFactory=function(){function c(){}return c.get=function(){return f.WebVRDeviceOrientationProvider.supported()?new f.WebVRDeviceOrientationProvider:p.DefaultDeviceOrientationProvider.supported()?new p.DefaultDeviceOrientationProvider:new h.NoDeviceOrientationProvider},c}()},37485:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.DisplacementVector=void 0;var p=d(23068),h=Math.PI/180,f=180/Math.PI;u.DisplacementVector=function(){function c(c,u,d,p){void 0===c&&(c=0),void 0===u&&(u=0),void 0===d&&(d=0),void 0===p&&(p=!1),this.Ybb=null,this.update(c,u,d,p)}return Object.defineProperty(c.prototype,"x",{get:function(){return this.Sbb},set:function(c){this.Sbb!==c&&this.update(c,this.Tbb,this.Ubb)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"y",{get:function(){return this.Tbb},set:function(c){this.Tbb!==c&&this.update(this.Sbb,c,this.Ubb)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"phi",{get:function(){return this.Ubb},set:function(c){this.Ubb!==c&&this.update(this.Sbb,this.Tbb,c)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"alpha",{get:function(){return this.Wbb},set:function(c){this.Wbb!==c&&this.update(this.Vbb*Math.cos(c*h),this.Vbb*Math.sin(c*h),this.Ubb)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"length",{get:function(){return this.Vbb},set:function(c){this.Vbb!==c&&this.update(c*Math.cos(this.Wbb*h),c*Math.sin(this.Wbb*h),this.Ubb)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"active",{get:function(){return this.Xbb},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"deltaTime",{get:function(){return this.Ybb||0},set:function(c){this.Ybb=c},enumerable:!1,configurable:!0}),c.prototype.update=function(c,u,d,h,m){if(void 0===d&&(d=0),"boolean"==typeof h&&(this.Xbb=h),(0,p.isNumber)(m)&&(this.Ybb=m),this.Sbb!==c||this.Tbb!==u||this.Ubb!==d){if(this.Sbb=1e-4>Math.abs(c)?0:c,this.Tbb=1e-4>Math.abs(u)?0:u,this.Ubb=1e-4>Math.abs(d)?0:d,0===this.Sbb&&0===this.Tbb&&0===this.Ubb)return this.Vbb=0,void(this.Wbb=0);this.Vbb=Math.sqrt(this.Sbb*this.Sbb+this.Tbb*this.Tbb),0===this.Tbb&&this.Sbb>=0?this.Wbb=0:0===this.Sbb&&this.Tbb>0?this.Wbb=90:0===this.Sbb&&this.Tbb<0?this.Wbb=270:this.Sbb<0&&0===this.Tbb?this.Wbb=180:this.Sbb>0&&this.Tbb>0?this.Wbb=Math.atan(this.Tbb/this.Sbb)*f:this.Sbb<0&&this.Tbb>0||this.Sbb<0&&this.Tbb<0?this.Wbb=180+Math.atan(this.Tbb/this.Sbb)*f:this.Sbb>0&&this.Tbb<0?this.Wbb=360+Math.atan(this.Tbb/this.Sbb)*f:this.Wbb=0}},c.prototype.fromVec3=function(c,u,d){this.update(c.x,c.y,c.phi,u,d)},c.prototype.add=function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];for(var d=this.Sbb,p=this.Tbb,h=this.Ubb,f=0;f<c.length;f++){var m=c[f];d+=m.Sbb,p+=m.Tbb,h+=m.Ubb}this.update(d,p,h)},c.prototype.diff=function(u,d){d instanceof c?this.update(d.x-u.x,d.y-u.y,d.phi-u.phi):this.update(u.x-this.Sbb,u.y-this.Tbb,u.phi-this.Ubb)},c.clone=function(u,d){u instanceof c&&d instanceof c&&d.update(u.Sbb,u.Tbb,u.Ubb,u.Xbb,u.Ybb)},c.prototype.scale=function(c){this.length=this.Vbb*c},c}()},11805:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.NoDeviceOrientationProvider=void 0,u.NoDeviceOrientationProvider=function(c){function u(){var u=c.call(this)||this;return u.enable(),u}return h(u,c),u.prototype.getOrientation=function(){return this.defaultDeviceOrientation},u.prototype.orientationDataAvailable=function(){return!0},u.supported=function(){return!0},u}(d(16404).DeviceOrientationProvider)},33639:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.OrientationHandler=void 0;var p,h,f=d(44369),m=d(3714),g=d(45698),v=d(22185),y=d(64419),b=d(76320),S=d(59324),_=d(37485);(p=h||(h={})).VERTICAL="vertical",p.HORIZONTAL="horizontal",p.BOTH="BOTH",u.OrientationHandler=function(){function c(c,u,d,p,m){var E=this;this.B0=null,this.C0=null,this.D0=1,this.E0=null,this.F0=null,this.G0=null,this.H0=null,this.I0=null,this.J0=null,this.K0=null,this.enableGyroscope=function(){E.A0.enable()},this.disableGyroscope=function(){E.A0.disable()},this.isGyroscopeEnabled=function(){return E.A0.isEnabled()},this.enableMouseControl=function(){E.O0.enable()},this.disableMouseControl=function(){E.O0.disable()},this.isMouseControlEnabled=function(){return E.O0.isEnabled()},this.enableKeyboardControl=function(){E.N0.enable()},this.disableKeyboardControl=function(){E.N0.disable()},this.isKeyboardControlEnabled=function(){return E.N0.isEnabled()},this.L0=c,this.M0=d,this.q1=m,this.A0=S.DeviceOrientationProviderFactory.get(),this.H0=f.Mat4.create(),this.I0=f.Mat4.create(),this.J0=f.Mat4.create(),this.E0=f.Mat4.create(),this.B0=f.Mat4.create(),this.D0=this.M0.stereo?2:1,this.G0={yaw:0,pitch:0,roll:0},this.G0.yaw=this.M0.startPosition,this.T0=new _.DisplacementVector,this.U0=new _.DisplacementVector,this.F0={yaw:this.G0.yaw,pitch:0,roll:0},this.V0=this.M0.viewingDirectionChangeEventInterval,this.W0=this.M0.viewingDirectionChangeThreshold,this.l1=this.M0.verticalFieldOfView,this.m1=this.M0.horizontalFieldOfView,this.n1=this.l1>-1,this.o1=this.m1>-1,this.p1=1,this.X0=0,this.Y0=!1,this.N0=new v.KeyboardControl(this.M0.keyboardControl,p),this.O0=new y.MouseControl(this.M0.mouseControl,p,u,this.L0),this.P0=new g.ApiControl(this.M0.apiControl,p,this.V0),this.R0=b.TransitionTimingFactory.get(this.M0.keyboardControl),this.Q0=b.TransitionTimingFactory.get(this.M0.mouseControl),this.S0=b.TransitionTimingFactory.get(this.M0.apiControl),this.l1>-1&&this.m1>-1?this.k1=h.BOTH:this.m1>-1?this.k1=h.HORIZONTAL:this.k1=h.VERTICAL}return c.clampValue=function(c,u,d){return 0===u&&360===d?c%360:c>d?d:c<u?u:c},c.clampToWindow=function(u,d){var p={yaw:0,pitch:0,roll:u.roll};return p.yaw=c.clampValue(u.yaw,d.minYaw,d.maxYaw),p.pitch=c.clampValue(u.pitch,d.minPitch,d.maxPitch),p},c.prototype.r1=function(u){void 0===u&&(u={yaw:0,pitch:0,roll:0}),null!==this.K0&&(this.K0=c.clampToWindow(this.K0,this.M0.viewingWindow),this.G0.yaw=this.K0.yaw-u.yaw,this.G0.pitch=this.K0.pitch-u.pitch,this.G0.roll=this.K0.roll-u.roll,this.Q0.reset(),this.R0.reset(),this.S0.reset()),this.K0=null,this.F0.yaw=this.G0.yaw+u.yaw,this.F0.pitch=this.G0.pitch+u.pitch,this.F0.roll=this.G0.roll+u.roll,this.F0=c.clampToWindow(this.F0,this.M0.viewingWindow),f.Mat4.identity(this.E0),f.Mat4.rotate(this.E0,f.MathUtil.degToRad(this.F0.yaw+180),[0,1,0]),f.Mat4.rotate(this.E0,f.MathUtil.degToRad(this.F0.pitch),[1,0,0]),f.Mat4.rotate(this.E0,f.MathUtil.degToRad(this.F0.roll),[0,0,1])},c.prototype.getProjectionInverse=function(){return this.B0},c.prototype.getViewingDirection=function(){return this.F0},c.prototype.setViewingDirection=function(c){this.K0=c},c.prototype.setVerticalFieldOfView=function(c){this.n1=-1!==c,this.l1=-1===c?-1:Math.max(Math.min(180,c),0),-1===c&&this.k1===h.BOTH?this.k1=h.HORIZONTAL:this.k1===h.HORIZONTAL&&(this.o1?this.k1=h.BOTH:this.k1=h.VERTICAL)},c.prototype.getVerticalFieldOfView=function(){return this.l1/this.p1},c.prototype.setHorizontalFieldOfView=function(c){this.o1=-1!==c,this.m1=-1===c?-1:Math.max(Math.min(180,c),0),-1===c&&this.k1===h.BOTH?this.k1=h.VERTICAL:this.k1===h.VERTICAL&&(this.n1?this.k1=h.BOTH:this.k1=h.HORIZONTAL)},c.prototype.getHorizontalFieldOfView=function(){return this.m1/this.p1},c.prototype.zoom=function(c){return!!isFinite(c)&&(this.p1=Math.max(Number(c),1e-10),!0)},c.prototype.getZoom=function(){return this.p1},c.prototype.s1=function(){var c,u,d=this.A0.getFieldOfViewParams(),p=[1];this.l1<0&&(this.l1=d.upDegrees+d.downDegrees),this.m1<0&&(this.m1=d.leftDegrees+d.rightDegrees),this.k1!==h.BOTH&&this.k1!==h.HORIZONTAL||p.push(180/(this.m1/this.p1)),this.k1!==h.BOTH&&this.k1!==h.VERTICAL||p.push(180/(this.l1/this.p1)),this.p1/=Math.min.apply(null,p);var m=f.MathUtil.degToRad(this.l1/this.p1),g=f.MathUtil.degToRad(this.m1/this.p1);this.k1===h.BOTH?(c=m,u=Math.tan(.5*g)/Math.tan(.5*m)):u=this.L0.width/this.D0/this.L0.height,this.k1===h.HORIZONTAL?(c=2*Math.atan(Math.tan(g/2)/u),this.l1=f.MathUtil.radToDeg(c)*this.p1):this.k1===h.VERTICAL&&(c=m,this.m1=f.MathUtil.radToDeg(2*Math.atan(u*Math.tan(m/2)))/this.D0*this.p1),f.Mat4.perspective(this.J0,c,u,.1,10),f.Mat4.invert(this.H0,this.J0),f.Mat4.multiply(this.B0,this.E0,this.H0)},c.prototype.update=function(u){this.C0=this.C0||u;for(var d=(u-this.C0)/1e3,p=f.Mat4.create(),h=0;h<this.B0.length;h++)p[h]=this.B0[h];this.X0+=d,this.T0.update(0,0,0),d>0&&this.T0.add(this.Q0.apply(this.O0.getDisplacementVector(d)),this.R0.apply(this.N0.getDisplacementVector(d)),this.S0.apply(this.P0.getDisplacementVector(d))),this.G0.yaw+=this.T0.x,this.G0.pitch+=this.T0.y,this.G0.roll+=this.T0.phi,this.G0=c.clampToWindow(this.G0,this.M0.viewingWindow),this.C0=u,this.A0.orientationDataAvailable()?this.r1(this.A0.getOrientation()):this.r1(),this.U0.add(this.T0);var g=Math.abs(this.U0.length)>this.W0||Math.abs(this.U0.phi)>this.W0;g||this.Y0||(this.X0=0);var v=this.X0>=this.V0;for(g&&(v||!this.Y0)?(this.Y0=!0,this.X0=0,this.U0.update(0,0,0),this.q1.getEventFunction()(m.PlayerEvent.VRViewingDirectionChange,{direction:this.F0})):v&&this.Y0&&(this.Y0=!1,this.U0.update(0,0,0),this.X0=0,this.q1.getEventFunction()(m.PlayerEvent.VRViewingDirectionChanged,{direction:this.F0})),this.s1(),h=0;h<this.B0.length;h++)if(p[h]!==this.B0[h])return!0;return!1},c.prototype.enableStereo=function(){this.D0=2},c.prototype.disableStereo=function(){this.D0=1},c.prototype.moveViewingDirection=function(c){this.P0.setTargetVector(c)},c.prototype.setViewingDirectionChangeEventInterval=function(c){this.V0=c},c.prototype.getViewingDirectionChangeEventInterval=function(){return this.V0},c.prototype.setViewingDirectionChangeThreshold=function(c){this.W0=c},c.prototype.getViewingDirectionChangeThreshold=function(){return this.W0},c.prototype.permissionRequired=function(){return this.A0.permissionRequired()},c.prototype.requestPermission=function(){return this.A0.requestPermission()},c.prototype.destroy=function(){this.N0.dispose(),this.O0.dispose(),this.N0=null,this.O0=null},c}()},72458:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.WebVRDeviceOrientationProvider=void 0;var f=d(44369);u.WebVRDeviceOrientationProvider=function(c){function u(){var u=c.call(this)||this;return u.vgb=null,u.wgb=null,u.xgb=function(c){var d;for(d=0;d<c.length;++d)if(c[d]instanceof HMDVRDevice){u.vgb=c[d];break}if(u.vgb){for(d=0;d<c.length;++d)if(c[d]instanceof PositionSensorVRDevice&&c[d].hardwareUnitId===u.vgb.hardwareUnitId){u.wgb=c[d];break}}},navigator.getVRDevices&&navigator.getVRDevices().then(u.xgb),u.enable(),u}return h(u,c),u.prototype.getOrientation=function(){if(this.orientationDataAvailable()&&this.enabled){var c=this.wgb.getState(),u=new Float32Array([0,0,0,0]);return null!==c&&c.orientation&&(u=new Float32Array([c.orientation.x,c.orientation.y,c.orientation.z,c.orientation.w])),f.Quat.toAngle(u)}return this.defaultDeviceOrientation},u.prototype.getFieldOfViewParams=function(){return this.orientationDataAvailable()?this.vgb.getEyeParameters("left").recommendedFieldOfView:this.defaultFieldOfView},u.prototype.orientationDataAvailable=function(){return null!==this.wgb&&null!==this.vgb},u.supported=function(){return!!navigator.getVRDevices},u}(d(16404).DeviceOrientationProvider)},81116:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.EaseInOutTransitionTiming=void 0;var f=d(44369),m=d(37485);u.EaseInOutTransitionTiming=function(c){function u(u){var d=c.call(this,u)||this;return d.currentDisplacementVector=new m.DisplacementVector,d.intermediateDisplacementVector=new m.DisplacementVector,d.targetDisplacementVector=new m.DisplacementVector,d.normalizedTargetDisplacementVector=new m.DisplacementVector,d.normalizedDisplacementVector=new m.DisplacementVector,d.maximumLinearAcceleration=0,d.maximumAngularAcceleration=0,d}return h(u,c),u.prototype.shouldTransitionBeApplied=function(){var c=isFinite(this.targetDisplacementVector.deltaTime),u=this.targetDisplacementVector.deltaTime>0;return c&&u},u.prototype.apply=function(c){if(this.targetDisplacementVector.deltaTime=c.deltaTime,m.DisplacementVector.clone(c,this.normalizedDisplacementVector),m.DisplacementVector.clone(this.targetDisplacementVector,this.normalizedTargetDisplacementVector),this.normalizedDisplacementVector.length/=this.normalizedDisplacementVector.deltaTime,this.normalizedTargetDisplacementVector.length/=this.normalizedTargetDisplacementVector.deltaTime,this.normalizedDisplacementVector.phi/=this.normalizedDisplacementVector.deltaTime,this.normalizedTargetDisplacementVector.phi/=this.normalizedTargetDisplacementVector.deltaTime,this.normalizedDisplacementVector.diff(this.normalizedTargetDisplacementVector),this.normalizedDisplacementVector.length>0&&(this.maximumLinearAcceleration=this.normalizedDisplacementVector.length/this.config.transitionTime),0!==Math.abs(this.normalizedDisplacementVector.phi)&&(this.maximumAngularAcceleration=Math.abs(this.normalizedDisplacementVector.phi)/this.config.transitionTime),m.DisplacementVector.clone(c,this.targetDisplacementVector),!this.shouldTransitionBeApplied())return m.DisplacementVector.clone(this.targetDisplacementVector,this.currentDisplacementVector),this.targetDisplacementVector;this.intermediateDisplacementVector.diff(this.currentDisplacementVector,this.targetDisplacementVector);var u=Math.min(this.maximumLinearAcceleration*this.targetDisplacementVector.deltaTime*this.targetDisplacementVector.deltaTime,this.config.maxDisplacementSpeed),d=Math.min(this.maximumAngularAcceleration*this.targetDisplacementVector.deltaTime*this.targetDisplacementVector.deltaTime,this.config.maxDisplacementSpeed);return this.intermediateDisplacementVector.length>u&&(this.intermediateDisplacementVector.length=u),Math.abs(this.intermediateDisplacementVector.phi)>d&&(this.intermediateDisplacementVector.phi=f.MathUtil.sign(this.intermediateDisplacementVector.phi)*d),this.currentDisplacementVector.add(this.intermediateDisplacementVector),this.currentDisplacementVector},u.prototype.reset=function(){this.currentDisplacementVector.update(0,0,0),this.intermediateDisplacementVector.update(0,0,0),this.targetDisplacementVector.update(0,0,0),this.maximumLinearAcceleration=0,this.maximumAngularAcceleration=0},u}(d(7192).TransitionTiming)},68801:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.
28setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.EaseInTransitionTiming=void 0,u.EaseInTransitionTiming=function(c){function u(){return null!==c&&c.apply(this,arguments)||this}return h(u,c),u.prototype.shouldTransitionBeApplied=function(){var c=isFinite(this.targetDisplacementVector.deltaTime),u=this.targetDisplacementVector.deltaTime>0,d=this.targetDisplacementVector.active;return c&&u&&d},u}(d(81116).EaseInOutTransitionTiming)},95746:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.EaseOutTransitionTiming=void 0,u.EaseOutTransitionTiming=function(c){function u(){return null!==c&&c.apply(this,arguments)||this}return h(u,c),u.prototype.shouldTransitionBeApplied=function(){var c=isFinite(this.targetDisplacementVector.deltaTime),u=this.targetDisplacementVector.deltaTime>0,d=this.targetDisplacementVector.active;return c&&u&&!d},u}(d(81116).EaseInOutTransitionTiming)},4551:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.NoTransitionTiming=void 0,u.NoTransitionTiming=function(c){function u(){return null!==c&&c.apply(this,arguments)||this}return h(u,c),u.prototype.apply=function(c){return c},u.prototype.reset=function(){},u}(d(7192).TransitionTiming)},7192:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.TransitionTiming=void 0,u.TransitionTiming=function(c){this.config=c}},76320:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.TransitionTimingFactory=void 0;var p=d(43948),h=d(81116),f=d(68801),m=d(95746),g=d(4551);u.TransitionTimingFactory=function(){function c(){}return c.get=function(c){switch(c.transitionTimingType){case p.TransitionTimingType.None:return new g.NoTransitionTiming(c);case p.TransitionTimingType.EaseIn:return new f.EaseInTransitionTiming(c);case p.TransitionTimingType.EaseOut:return new m.EaseOutTransitionTiming(c);case p.TransitionTimingType.EaseInOut:return new h.EaseInOutTransitionTiming(c)}},c}()},70372:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.ConfigParser=void 0;var p=d(43948),h={contentType:p.VRContentType.Single,stereo:!1,startPosition:0,contentFieldOfView:360,verticalFieldOfView:-1,horizontalFieldOfView:-1,viewingWindow:{minYaw:0,maxYaw:360,minPitch:-90,maxPitch:90},restrictedInlinePlayback:!1,enableFrameRateMeasurements:!1,cardboard:null,viewingDirectionChangeThreshold:5,viewingDirectionChangeEventInterval:.25,keyboardControl:{transitionTimingType:p.TransitionTimingType.EaseInOut,transitionTime:.25,maxDisplacementSpeed:90,keyMap:{up:["w"],right:["d"],down:["s"],left:["a"],rotateClockwise:["e"],rotateCounterclockwise:["q"]}},mouseControl:{transitionTimingType:p.TransitionTimingType.EaseOut,transitionTime:.25,maxDisplacementSpeed:1/0},apiControl:{transitionTimingType:p.TransitionTimingType.EaseInOut,transitionTime:.25,maxDisplacementSpeed:1/0}};u.ConfigParser=function(){function c(){}return c.getObject=function(c,u){for(var d=u.split("."),p=!0,f=c,m=h,g=0;g<d.length;g++){var v=d[g];f.hasOwnProperty(v)&&p?f=f[v]:p=!1,m.hasOwnProperty(v)&&(m=m[v])}return[p,f,m]},c.getPrimitive=function(u,d,p,h){var f=c.getObject(u,d),m=f[0],g=f[1],v=f[2],y=!0;if(h)for(var b in h){if(h.hasOwnProperty(b)&&h[b]===g){y=!0;break}y=!1}return m&&typeof g===p&&y?g:v},c.getArray=function(u,d,p){var h=c.getObject(u,d),f=h[0],m=h[1],g=h[2];return f&&"object"==typeof m&&m instanceof Array&&!m.some(function(c){return typeof c!==
vendor: 16,545 bytes, lines 28-129
28p})?m:g},c.getStringPrimitive=function(u,d,p){return c.getPrimitive(u,d,"string",p)},c.getEnumPrimitive=function(u,d,p){return c.getPrimitive(u,d,"string",p)},c.getBooleanPrimitive=function(u,d,p){return c.getPrimitive(u,d,"boolean",p)},c.getNumberPrimitive=function(u,d,p){return c.getPrimitive(u,d,"number",p)},c.getStringArray=function(u,d){return c.getArray(u,d,"string")},c.parseGeneralConfig=function(u,d){d.stereo=c.getBooleanPrimitive(u,"stereo"),d.restrictedInlinePlayback=c.getBooleanPrimitive(u,"restrictedInlinePlayback"),d.startPosition=c.getNumberPrimitive(u,"startPosition"),d.contentFieldOfView=c.getNumberPrimitive(u,"contentFieldOfView"),d.verticalFieldOfView=c.getNumberPrimitive(u,"verticalFieldOfView"),d.horizontalFieldOfView=c.getNumberPrimitive(u,"horizontalFieldOfView"),d.enableFrameRateMeasurements=c.getBooleanPrimitive(u,"enableFrameRateMeasurements"),d.cardboard=c.getStringPrimitive(u,"cardboard"),d.viewingDirectionChangeThreshold=c.getNumberPrimitive(u,"viewingDirectionChangeThreshold"),d.viewingDirectionChangeEventInterval=c.getNumberPrimitive(u,"viewingDirectionChangeEventInterval")},c.parseViewingWindow=function(u,d){d.viewingWindow=h.viewingWindow,u.hasOwnProperty("viewingWindow")&&"object"==typeof u.viewingWindow&&(d.viewingWindow.minYaw=c.getNumberPrimitive(u,"viewingWindow.minYaw"),d.viewingWindow.maxYaw=c.getNumberPrimitive(u,"viewingWindow.maxYaw"),d.viewingWindow.minPitch=c.getNumberPrimitive(u,"viewingWindow.minPitch"),d.viewingWindow.maxPitch=c.getNumberPrimitive(u,"viewingWindow.maxPitch"))},c.parseKeyboardControl=function(u,d){d.keyboardControl=h.keyboardControl,u.hasOwnProperty("keyboardControl")&&"object"==typeof u.keyboardControl&&(d.keyboardControl.transitionTimingType=c.getEnumPrimitive(u,"keyboardControl.transitionTimingType",p.TransitionTimingType),d.keyboardControl.transitionTime=c.getNumberPrimitive(u,"keyboardControl.transitionTime"),d.keyboardControl.maxDisplacementSpeed=c.getNumberPrimitive(u,"keyboardControl.maxDisplacementSpeed"),u.keyboardControl.hasOwnProperty("keyMap")&&"object"==typeof u.keyboardControl.keyMap&&(d.keyboardControl.keyMap.up=c.getStringArray(u,"keyboardControl.keyMap.up"),d.keyboardControl.keyMap.right=c.getStringArray(u,"keyboardControl.keyMap.right"),d.keyboardControl.keyMap.down=c.getStringArray(u,"keyboardControl.keyMap.down"),d.keyboardControl.keyMap.left=c.getStringArray(u,"keyboardControl.keyMap.left"),d.keyboardControl.keyMap.rotateClockwise=c.getStringArray(u,"keyboardControl.keyMap.rotateClockwise"),d.keyboardControl.keyMap.rotateCounterclockwise=c.getStringArray(u,"keyboardControl.keyMap.rotateCounterclockwise")))},c.parseMouseControl=function(u,d){d.mouseControl=h.mouseControl,u.hasOwnProperty("mouseControl")&&"object"==typeof u.mouseControl&&(d.mouseControl.transitionTimingType=c.getEnumPrimitive(u,"mouseControl.transitionTimingType",p.TransitionTimingType),d.mouseControl.transitionTime=c.getNumberPrimitive(u,"mouseControl.transitionTime"),d.mouseControl.maxDisplacementSpeed=c.getNumberPrimitive(u,"mouseControl.maxDisplacementSpeed"))},c.parseApiControl=function(u,d){d.apiControl=h.apiControl,u.hasOwnProperty("apiControl")&&"object"==typeof u.apiControl&&(d.apiControl.transitionTimingType=c.getEnumPrimitive(u,"apiControl.transitionTimingType",p.TransitionTimingType),d.apiControl.transitionTime=c.getNumberPrimitive(u,"apiControl.transitionTime"),d.apiControl.maxDisplacementSpeed=c.getNumberPrimitive(u,"apiControl.maxDisplacementSpeed"))},c.parseDebugHooks=function(c){var u={onDrawScene:null,onStartRendering:null,onRenderingSuspended:null,onRenderingResumed:null,requestFakeInput:null,requestTraveledMouseDistance:null,requestKeyActiveState:null};return c.debugHooks&&Object.keys(u).filter(function(u){return"function"==typeof c.debugHooks[u]}).forEach(function(d){return u[d]=c.debugHooks[d]}),u},c.parse=function(u){u=u||{};var d={contentType:c.getEnumPrimitive(u,"contentType",p.VRContentType)};return c.parseGeneralConfig(u,d),c.parseViewingWindow(u,d),c.parseKeyboardControl(u,d),c.parseMouseControl(u,d),c.parseApiControl(u,d),[d,c.parseDebugHooks(u)]},c}()},51629:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.ElementHelper=void 0,u.ElementHelper=function(){function c(){}return c.addEventListener=function(c,u,d,p){for(var h=0;h<u.length;h++)c.addEventListener(u[h],d,p)},c.removeEventListener=function(c,u,d,p){for(var h=0;h<u.length;h++)c.removeEventListener(u[h],d,p)},c.addClass=function(c,u){if(c&&u){var d=c.getAttribute("class"),p=!0;d&&d.length>0&&(p=0>d.split(" ").indexOf(u)),d&&d.length>0&&p&&(u=d+" "+u),p&&c.setAttribute("class",u)}},c.removeClass=function(c,u){if(c&&u){var d=c.getAttribute("class");d&&d.indexOf(u)>-1&&(d=d.replace(RegExp("(?:^|\\s)"+u+"(?!\\S)"),"").trim(),c.setAttribute("class",d))}},c.getNavigator=function(){return window.navigator},Object.defineProperty(c,"touchEvents",{get:function(){var u=c.getNavigator().userAgent,d=c.getNavigator().msPointerEnabled;return/Android|IEMobile|iP(hone|ad|od)/i.test(u)?d?{start:["MSPointerDown"],move:["MSPointerMove"],end:["MSPointerUp"],down:["MSPointerDown"],up:["MSPointerUp"],click:["MSPointerUp"],type:"ms"}:{start:["touchstart"],move:["touchmove"],end:["touchend","touchcancel"],down:["touchstart"],up:["touchend","touchcancel"],click:["touchend"],type:"mobile"}:{start:["mouseover"],move:["mousemove"],end:["mouseleave","mouseout"],down:["mousedown"],up:["mouseup"],click:["click"],type:"desktop"}},enumerable:!1,configurable:!0}),c}()},17378:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.FrameRateMonitor=void 0;var p=d(44369);u.FrameRateMonitor=function(){function c(c,u){void 0===u&&(u=1e3);var d=this;this.startAnimationFrame=function(){d.Kbb&&(d.Gbb=window.performance.now())},this.endAnimationFrame=function(){if(!(d.Gbb<0)){var c=window.performance.now()-d.Gbb;d.Dbb.push(c),d.Mbb(),d.Jbb+=c,d.Jbb>d.Bbb&&d.Cbb&&(d.Jbb=0,d.Lbb(d.getAverageFrameRate(),d.getTimeSpentUpdatingTexture(),d.getTimeSpentDrawingScene()))}},this.startUpdateTexture=function(){d.Kbb&&(d.Hbb=window.performance.now())},this.endUpdateTexture=function(){d.Hbb<0||d.Fbb.push(window.performance.now()-d.Hbb)},this.startDrawScene=function(){d.Kbb&&(d.Ibb=window.performance.now())},this.endDrawScene=function(){d.Ibb<0||d.Ebb.push(window.performance.now()-d.Ibb)},this.Dbb=[],this.Fbb=[],this.Ebb=[],this.Gbb=-1,this.Hbb=-1,this.Ibb=-1,this.Abb=c,this.Bbb=u,this.Cbb=[],this.Jbb=0,this.Kbb=!1}return c.prototype.enable=function(){this.Kbb=!0},c.prototype.disable=function(){this.Kbb=!1,this.Dbb=[],this.Fbb=[],this.Ebb=[],this.Gbb=-1,this.Hbb=-1,this.Ibb=-1},c.prototype.subscribe=function(c){-1===this.Cbb.indexOf(c)&&this.Cbb.push(c)},c.prototype.unsubscribe=function(c){this.Cbb.indexOf(c)>-1&&this.Cbb.splice(this.Cbb.indexOf(c),1)},c.prototype.getAverageFrameRate=function(){return 1/(p.MathUtil.getAverage(this.Dbb)/1e3)},c.prototype.getTimeSpentUpdatingTexture=function(){return p.MathUtil.getSum(this.Fbb)/p.MathUtil.getSum(this.Dbb)},c.prototype.getTimeSpentDrawingScene=function(){return p.MathUtil.getSum(this.Ebb)/p.MathUtil.getSum(this.Dbb)},c.prototype.destroy=function(){this.disable(),this.Cbb=null},c.prototype.Lbb=function(c,u,d){for(var p=0,h=this.Cbb;p<h.length;p++)h[p].onFrameRateAvailable(c,u,d)},c.prototype.Mbb=function(){for(var c=0,u=this.Dbb.length-1;u>=0;u--)if((c+=this.Dbb[u])>=this.Abb){this.Dbb.splice(0,u+1),this.Fbb.splice(0,u+1),this.Ebb.splice(0,u+1);break}},c}()},10768:function(c){c.exports=`precision mediump float;
29
30const int LEFT_EYE = 0;
31const int RIGHT_EYE = 1;
32const int CONTENT_TYPE_MONO = 0;
33const int CONTENT_TYPE_STEREO_SBS = 1;
34const int CONTENT_TYPE_STEREO_TAB = 2;
35const float PI = 3.1415926535897932384626433832795;
36const float TwoPI = 6.283185307179586476925286766559;
37
38uniform int eyeSelector;
39uniform int contentType;
40uniform float videoWidth;
41uniform float videoHeight;
42uniform float contentFieldOfView;
43uniform sampler2D textureUnit;
44varying vec3 viewingDirection;
45
46float restrictedMod(float value, float divisor, float bound) {
47  return mod(value, divisor) * (1.0 - (2.0 * bound)) + bound;
48}
49
50vec4 directionToColor(vec3 direction, int eye, int contentType, float contentFieldOfView, float videoWidth, float videoHeight) {
51  float eyeOffset = 0.0;
52  float textureSizeMultiplier = contentFieldOfView / 180.;
53  float theta = atan(direction.x, direction.z * -1.0);
54  float verticalSamplingOffset = 1.0 / (2.0 * videoHeight);
55  float horizontalSamplingOffset = 1.0 / (2.0 * videoWidth);
56  float phi = atan(direction.y * -1.0, length(direction.xz));
57
58  float u = mod(theta / (PI * textureSizeMultiplier), 1.0);
59  float v = mod(phi / PI + 0.5, 1.0);
60
61  if (eye == LEFT_EYE) {
62    eyeOffset = 0.0;
63  } else if (eye == RIGHT_EYE) {
64    eyeOffset = 0.5;
65  }
66
67  if ((theta + PI) / PI > textureSizeMultiplier) {
68    return vec4(0., 0., 0., 1.);
69  }
70
71  if (contentType == CONTENT_TYPE_STEREO_SBS) {
72    u = restrictedMod(theta / (TwoPI * textureSizeMultiplier), 0.5, horizontalSamplingOffset) + eyeOffset;
73  } else if (contentType == CONTENT_TYPE_STEREO_TAB) {
74    v = restrictedMod(v / 2.0, 0.5, verticalSamplingOffset) + (0.5 - eyeOffset);
75  }
76
77  return texture2D(textureUnit, vec2(u, v));
78}
79void main(void) {
80  gl_FragColor = directionToColor(viewingDirection, eyeSelector, contentType, contentFieldOfView, videoWidth, videoHeight);
81}
82`},50766:function(c){c.exports=`precision mediump float;
83
84attribute vec2 vertexPosition;
85varying vec3 viewingDirection;
86uniform mat4 projectionInverse;
87uniform vec2 distortionFovScale;
88uniform vec2 distortionFovOffset;
89uniform float contentWidthDegrees;
90uniform float distortionMaxFovSquared;
91uniform float distortionCoefficients[12];
92
93float DistortionFactor(float rSquared) {
94    float ret = 0.0;
95    rSquared = min(distortionMaxFovSquared, rSquared);
96    ret = rSquared * (ret + distortionCoefficients[11]);
97    ret = rSquared * (ret + distortionCoefficients[10]);
98    ret = rSquared * (ret + distortionCoefficients[9]);
99    ret = rSquared * (ret + distortionCoefficients[8]);
100    ret = rSquared * (ret + distortionCoefficients[7]);
101    ret = rSquared * (ret + distortionCoefficients[6]);
102    ret = rSquared * (ret + distortionCoefficients[5]);
103    ret = rSquared * (ret + distortionCoefficients[4]);
104    ret = rSquared * (ret + distortionCoefficients[3]);
105    ret = rSquared * (ret + distortionCoefficients[2]);
106    ret = rSquared * (ret + distortionCoefficients[1]);
107    ret = rSquared * (ret + distortionCoefficients[0]);
108    return ret + 1.0;
109}
110
111vec4 Distort(vec4 point) {
112    vec3 pointNdc = point.xyz / point.w;
113    vec2 pointUnitSquare = (pointNdc.xy + vec2(1.0)) / 2.0;
114    vec2 pointTanAngle = pointUnitSquare * distortionFovScale - distortionFovOffset;
115    float radiusSquared = dot(pointTanAngle, pointTanAngle);
116    float distortionFactor = DistortionFactor(radiusSquared);
117    vec2 distortedPointTanAngle = pointTanAngle * distortionFactor;
118    vec2 distortedPointUnitSquare = (distortedPointTanAngle + distortionFovOffset)
119        / distortionFovScale;
120    vec3 distortedPointNdc = vec3(distortedPointUnitSquare * 2.0 - vec2(1.0), pointNdc.z);
121    return vec4(distortedPointNdc, 1.0) * point.w;
122}
123
124void main(void) {
125  gl_Position = Distort(vec4(vertexPosition, 1.0, 1.0));
126  vec4 projectiveDirection = projectionInverse * gl_Position;
127  viewingDirection = projectiveDirection.xyz / projectiveDirection.w;
128 }
129`}},function(c){return c(c.s=6463)}])}(bitmovinplayerVr);var bitmovinplayerVrExports=bitmovinplayerVr.exports;let VR=getDefaultExportFromCjs$1(bitmovinplayerVrExports);var bitmovinplayerXml={exports:{}};!function(c){var u;self,c.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[962],{54663:function(c,u,d){d.r(u),d.d(u,{SaxXMLParserWrapper:function(){return P},decode:function(){return v}});var p=String.fromCharCode,h=Object.prototype.hasOwnProperty,f=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,m={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function g(c,u,d,f){return f?h.call(m,f)?m[f]:"&"+f+";":p(u||parseInt(d,16))}function v(c){return c.length>3&&-1!==c.indexOf("&")?c.replace(f,g):c}Object.keys(m).forEach(function(c){m[c.toUpperCase()]=m[c]});var y="xsi:type",b="non-whitespace outside of root node";function S(c){return Error(c)}function _(c){return"missing namespace for prefix <"+c+">"}function E(c){return{get:c,enumerable:!0}}function T(){return{line:0,column:0}}function w(c){throw c}function P(c){if(!this)return new P(c);var u,d,p,h,f,m,g,A,I,M=c&&c.proxy,R=c&&c.attributeNamePrefix||"",k=w,x=T,C=!1,O=!1,D=null,L=!1;function N(c){c instanceof Error||(c=S(c)),D=c,k(c,x)}function U(c){f&&(c instanceof Error||(c=S(c)),f(c,x))}this.on=function(c,v){if("function"!=typeof v)throw S("required args <name, cb>");switch(c){case"openTag":d=v;break;case"text":u=v;break;case"closeTag":p=v;break;case"error":k=v;break;case"warn":f=v;break;case"cdata":h=v;break;case"attention":A=v;break;case"question":g=v;break;case"comment":m=v;break;default:throw S("unsupported event: "+c)}return this},this.ns=function(c){if(void 0===c&&(c={}),"object"!=typeof c)throw S("required args <nsMap={}>");var u,d={};for(u in c)d[u]=c[u];return d["http://www.w3.org/2001/XMLSchema-instance"]="xsi",O=!0,I=d,this},this.parse=function(c){if("string"!=typeof c)throw S("required args <xml=string>");return D=null,function(c){var f,S,T,w,P,k,D,F,B,j,H,V=O?[]:null,z=O?function(c){var u,d,p={};for(u in c)p[d=c[u]]=d,p[d+"$uri"]=u;return p}(I):null,q=[],W=0,G=!1,K=!1,Y=0,X=0,Q="",Z=0;function J(){if(null!==H)return H;var c,u,d,p,h,f,m,g,b,S,E,T=O&&z.xmlns,w=O&&C?[]:null,P=Z,A=Q,M=A.length,k={},x={},D=function(c,u){return k[R+c]=u};e:for(;P<M;P++)if(b=!1,!(32===(S=A.charCodeAt(P))||S<14&&S>8)){for((S<65||S>122||S>90&&S<97)&&95!==S&&58!==S&&(U("illegal first char attribute name"),b=!0),E=P+1;E<M;E++)if(!((S=A.charCodeAt(E))>96&&S<123||S>64&&S<91||S>47&&S<59||46===S||45===S||95===S)){if(32===S||S<14&&S>8){U("missing attribute value"),P=E;continue e}if(61===S)break;U("illegal attribute name char"),b=!0}if("xmlns:xmlns"===(g=A.substring(P,E))&&(U("illegal declaration of xmlns"),b=!0),34===(S=A.charCodeAt(E+1)))-1===(E=A.indexOf('"',P=E+2))&&-1!==(E=A.indexOf("'",P))&&(U("attribute value quote missmatch"),b=!0);else if(39===S)-1===(E=A.indexOf("'",P=E+2))&&-1!==(E=A.indexOf('"',P))&&(U("attribute value quote missmatch"),b=!0);else for(U("missing attribute value quotes"),b=!0,E+=1;E<M&&!(32===(S=A.charCodeAt(E+1))||S<14&&S>8);E++);for(-1===E&&(U("missing closing quotes"),E=M,b=!0),b||(f=A.substring(P,E)),P=E;E+1<M&&!(32===(S=A.charCodeAt(E+1))||S<14&&S>8);E++)P===E&&(U("illegal character after attribute end"),b=!0);if(P=E+1,!b)if(g in x)U("attribute <"+g+"> already defined");else if(x[g]=!0,O)if(C){if(null!==(h="xmlns"===g?"xmlns":120===g.charCodeAt(0)&&"xmlns:"===g.substr(0,6)?g.substr(6):null)){if(c=v(f),u=h+"$uri",!(m=I[c])){if("xmlns"===h||u in z&&z[u]!==c)do m="ns"+W++;while(void 0!==z[m])else m=h;I[c]=m}z[h]!==m&&(p||(z=function(c){var u,d={};for(u in c)d[u]=c[u];return d}(z),p=!0),z[h]=m,"xmlns"===h&&(z[m+"$uri"]=c,T=m),z[u]=c),D(g,f);continue}w.push(g,f)}else -1!==(S=g.indexOf(":"))?(d=z[g.substring(0,S)])?((g=T===d?g.substr(S+1):d+g.substr(S))===y&&(f=-1!==(S=f.indexOf(":"))?(d=z[d=f.substring(0,S)]||d)+f.substring(S):T+":"+f),D(g,f)):U(_(g.substring(0,S))):D(g,f);else D(g,f)}if(C)for(P=0,M=w.length;P<M;P++){if(g=w[P++],f=w[P],-1!==(S=g.indexOf(":"))){if(!(d=z[g.substring(0,S)])){U(_(g.substring(0,S)));continue}(g=T===d?g.substr(S+1):d+g.substr(S))===y&&(f=-1!==(S=f.indexOf(":"))?(d=z[d=f.substring(0,S)]||d)+f.substring(S):T+":"+f)}D(g,f)}return H=k}for(x=function(){for(var u,d,p=/(\r\n|\r|\n)/g,h=0,f=0,m=0,g=X;Y>=m&&(u=p.exec(c))&&!((g=u[0].length+u.index)>Y);)h+=1,m=g;return -1==Y?(f=g,d=c.substring(X)):0===X?d=c.substring(X,Y):(f=Y-m,d=-1==X?c.substring(Y):c.substring(Y,X+1)),{data:d,line:h,column:f}},M&&(j=Object.create({},{name:E(function(){return F}),originalName:E(function(){return B}),attrs:E(J),ns:E(function(){return z})}));-1!==X;){if(-1===(Y=60===c.charCodeAt(X)?X:c.indexOf("<",X)))return q.length?N("unexpected end of file"):0===X?N("missing start tag"):void(X<c.length&&c.substring(X).trim()&&U(b));if(X!==Y){if(q.length){if(u&&(u(c.substring(X,Y),v,x),L))return}else if(c.substring(X,Y).trim()&&(U(b),L))return}if(33===(P=c.charCodeAt(Y+1))){if(91===(w=c.charCodeAt(Y+2))&&"CDATA["===c.substr(Y+3,6)){if(-1===(X=c.indexOf("]]>",Y)))return N("unclosed cdata");if(h&&(h(c.substring(Y+9,X),x),L))return;X+=3;continue}if(45===w&&45===c.charCodeAt(Y+3)){if(-1===(X=c.indexOf("--\x3e",Y)))return N("unclosed comment");
129if(m&&(m(c.substring(Y+4,X),v,x),L))return;X+=3;continue}}if(63!==P){for(S=Y+1;;S++){if(isNaN(k=c.charCodeAt(S)))return X=-1,N("unclosed tag");if(34===k)S=-1!==(w=c.indexOf('"',S+1))?w:S;else if(39===k)S=-1!==(w=c.indexOf("'",S+1))?w:S;else if(62===k){X=S;break}}if(33!==P){if(H={},47===P){if(G=!1,K=!0,!q.length)return N("missing open tag");if(S=F=q.pop(),w=Y+2+S.length,c.substring(Y+2,w)!==S)return N("closing tag mismatch");for(;w<X;w++)if(!(32===(P=c.charCodeAt(w))||P>8&&P<14))return N("close tag")}else{if(47===c.charCodeAt(X-1)?(S=F=c.substring(Y+1,X-1),G=!0,K=!0):(S=F=c.substring(Y+1,X),G=!0,K=!1),!(P>96&&P<123||P>64&&P<91||95===P||58===P))return N("illegal first char nodeName");for(w=1,T=S.length;w<T;w++)if(!((P=S.charCodeAt(w))>96&&P<123||P>64&&P<91||P>47&&P<59||45===P||95===P||46==P)){if(32===P||P<14&&P>8){F=S.substring(0,w),H=null;break}return N("invalid nodeName")}K||q.push(F)}if(O){if(f=z,G&&(K||V.push(f),null===H&&(C=-1!==S.indexOf("xmlns",w))&&(Z=w,Q=S,J(),C=!1)),B=F,-1!==(P=F.indexOf(":"))){if(!(D=z[F.substring(0,P)]))return N("missing namespace on <"+B+">");F=F.substr(P+1)}else D=z.xmlns;D&&(F=D+":"+F)}if(G&&(Z=w,Q=S,d&&(M?d(j,v,K,x):d(F,J,v,K,x),L)))return;if(K){if(p&&(p(M?j:F,v,G,x),L))return;O&&(z=G?f:V.pop())}X+=1}else{if(A&&(A(c.substring(Y,X+1),v,x),L))return;X+=1}}else{if(-1===(X=c.indexOf("?>",Y)))return N("unclosed question");if(g&&(g(c.substring(Y,X+2),x),L))return;X+=2}}}(c),x=T,L=!1,D},this.stop=function(){L=!0}}},78442:function(c,u){var d=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.parseJSONtoXML=function c(u,p){var f=function(c){for(var u=Object.keys(c).filter(h),d=null,p=[],f=0;f<u.length;f++){var m=u[f];"__prefix"===m&&(d=c[m]),"__text"===m&&p.push(c[m]),"__cdata"===m&&c[m].forEach(function(c){p.push("<![CDATA[".concat(c,"]]>"))})}return[d,p]}(u),g=f[0],v=f[1],y=function(u){for(var d=Object.keys(u).filter(function(c){return!c.startsWith("_")}),p=[],h=0;h<d.length;h++){var f=d[h],g=u[f];"string"!=typeof g?g instanceof Array?p.push.apply(p,function(u,d){return d.map(function(d){return"string"==typeof d?m(""!==d?[d]:[],[],u):c(d,u)})}(f,g)):"object"==typeof g&&p.push(c(g,f)):p.push("<".concat(f,">").concat(g,"</").concat(f,">"))}return p}(u),b=Object.keys(u).filter(function(c){return c.startsWith("_")&&!h(c)}).map(function(c){return"".concat(c.replace("_",""),'="').concat(u[c],'"')}),S=p;return S&&g&&(S="".concat(g,":").concat(p)),m(d(d([],v,!0),y,!0),b,S)};var p=["__prefix","__text","__cdata"];function h(c){return p.includes(c)}function f(c){return c.length>0&&""!==c.join("")}function m(c,u,d){var p,h,m;return p=f(c),h="",(d?(h+="<".concat(d),h+=u.length>0?" ".concat(u.join(" ")):"",h+=p?">":"/>"):h)+(m="",f(c)&&(m+=c.join(""),m+=d?"</".concat(d,">"):""),m)}},15872:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.XMLModuleDefinition=void 0;var p=d(62756),h=d(78442),f=d(89214),m=d(89214);u.XMLModuleDefinition={name:p.ModuleName.XML,module:{parseXML:m.parseXML,parseJSONtoXML:h.parseJSONtoXML,setLogger:f.setLogger}},u.default=u.XMLModuleDefinition},89214:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.sanitizeXML=E,u.setLogger=function(c){y=c},u.parseXML=function(c,u){v=v||new h.SaxXMLParserWrapper({attributeNamePrefix:"_"});var d,m=E(c),g={},T=u.useArrayRepresentationForChildren?b:S;return v.on(p.TagOpened,function(c,d,p,h){var f=function(c,u){var d=u();if(!c.includes(":"))return[c,d];var p=c.split(":"),h=p[0],f=p[1];return d.__prefix=h,[f,d]}(c,d),m=f[0],v=f[1];u.decodeEntities&&(v._media&&(v._media=p(v._media)),v._initialization&&(v._initialization=p(v._initialization))),g=T(g,m,v,h)}),v.on(p.TagClosed,function(c){var u,d;d=(u=g).parent,delete u.parent,function(c,u){if(_(u)&&null!=u.key)if(c[u.key]!==u){if(c[u.key].constructor===Array){var d=c[u.key].indexOf(u);c[u.key][d]=u.__text}}else c[u.key]=u.__text}(d,u),delete u.key,g=d}),v.on(p.Text,function(c,d){var p;(p=g).__text=(u.decodeEntities?d(c):c).trim(),f(p)}),v.on(p.CData,function(c){null==g.__cdata?g.__cdata=[c]:g.__cdata.push(c),f(g)}),v.on(p.Error,function(c){d=Error("XML parsing failed: ".concat(c instanceof Error?c.message:String(c))),y&&y.debug(d.message),v.stop(),g={}}),v.parse(m),d?{success:!1,error:d}:{success:!0,parsed:g}};var p,h=d(54663);function f(c){c.toString=function(){return(this.__text?this.__text:"")+(this.__cdata?this.__cdata:"")}}function m(c,u){u&&2===Object.keys(c).length&&(c.__text="",f(c))}(g=p||(p={})).TagOpened="openTag",g.TagClosed="closeTag",g.Text="text",g.Error="error",g.Warning="warn",g.CData="cdata",g.Attention="attention",g.Question="question",g.Comment="comment";var g,v,y,b=function(c,u,d,p){return d.parent=c,d.key=u,c.parent||c.key||c[u]?c[u]?c[u].push(d):(m(d,p),c[u]=[d]):c[u]=d,d},S=function(c,u,d,p){return d.parent=c,d.key=u,c[u]?c[u].constructor===Array?c[u].push(d):c[u]=[c[u],d]:(m(d,p),c[u]=d),d},_=function(c){return null!=c.__text&&3===Object.keys(c).length};function E(c){return c.replace(/>\s+</g,"><").replace(/[\n|\r]+/g," ").trim()}}},function(c){return c(c.s=15872)}])}(bitmovinplayerXml);var bitmovinplayerXmlExports=bitmovinplayerXml.exports;let XML=getDefaultExportFromCjs$1(bitmovinplayerXmlExports);var bitmovinplayerDrm={exports:{}};!function(c){var u;self,c.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[766],{67579:function(c,u){var d,p,h,f,m;
vendor: 4,389 bytes, line 129
129Object.defineProperty(u,"__esModule",{value:!0}),u.MediaKeySystemConfig=void 0,(h=(p=d||(u.MediaKeySystemConfig=d={})).PersistentState||(p.PersistentState={})).Required="required",h.Optional="optional",(f=p.DistinctiveIdentifier||(p.DistinctiveIdentifier={})).Optional="optional",f.NotAllowed="not-allowed",(m=p.SessionType||(p.SessionType={})).Temporary="temporary",m.PersistentLicense="persistent-license"},88559:function(c,u,d){var p=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.ContentProtectionHelper=void 0;var h=d(25811),f=d(51682),m=d(33468),g=d(74853),v=d(70233),y=d(92656),b="_cenc:default_KID",S=function(){function c(){}return c.extractUint32FromString=function(c,u){return(c.charCodeAt(u)<<24)+(c.charCodeAt(u+1)<<16)+(c.charCodeAt(u+2)<<8)+c.charCodeAt(u+3)},c.parseKeyIds=function(c){var u=y.PlayReady.parseWrmHeader(c,4);if(!u||!u.length)return[];var d=y.PlayReady.extractKeyIdsFromPlayReadyHeaders(u);return d&&d.length?d.map(function(c){var u;return u=g.ArrayHelper.stringToArrayWithoutEncoding(atob(c)),y.PlayReady.kidToCENC(u),g.ArrayHelper.arrayBufferToAsciiString(u.buffer)}):[]},c.getFirstKeyId=function(c){if(!c||!c.length)return null;for(var u=0;u<c.length;u++){var d=function(c){var u,d,p=c._schemeIdUri.toLowerCase(),f=h.DRMSchemeIDURIs[p];return"cenc"===f&&"string"==typeof c[b]?[c[b].toLowerCase()]:"playready"===f&&c.pro&&c.pro.length?(u=T(c,"pro"),S.parseKeyIds(u).map(function(c){return v.FormatHelper.bytesToUUID(g.ArrayHelper.stringToArrayWithoutEncoding(c))})):(d=T(c,"pssh"),S.extractKidsFromPSSHBox(d.buffer))}(c[u]);if(d&&d.length)return d[0]}return null},c.writeKeySystemId=function(c,u,d){return c.setUint32(u,parseInt(d.substring(0,8),16)),u+=4,c.setUint32(u,parseInt(d.substring(8,16),16)),u+=4,c.setUint32(u,parseInt(d.substring(16,24),16)),u+=4,c.setUint32(u,parseInt(d.substring(24,32),16)),u+4},c.writeKeyIds=function(u,d,p){return u.setUint32(d,p.length),d+=4,p.forEach(function(p){u.setUint32(d,c.extractUint32FromString(p,0)),d+=4,u.setUint32(d,c.extractUint32FromString(p,4)),d+=4,u.setUint32(d,c.extractUint32FromString(p,8)),d+=4,u.setUint32(d,c.extractUint32FromString(p,12)),d+=4}),d},c.extractKeySystemIdFromUri=function(c){return c.replace(/-/g,"").split(":")[2]},c.wrapInPsshBox=function(c,u){var d=g.ArrayHelper.stringToArrayWithoutEncoding(atob(c)),p=this.parseKeyIds(d),h=p.length>0,m=f.ISOBMFFConstants.BOX_SIZE_LENGTH+f.ISOBMFFConstants.BOX_TYPE_LENGTH+f.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+f.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH+f.ISOBMFFConstants.PSSH_SYSTEM_ID_LENGTH+f.ISOBMFFConstants.PSSH_DATA_SIZE;h&&(m+=f.ISOBMFFConstants.PSSH_KID_COUNT_LENGTH+p.length*f.ISOBMFFConstants.PSSH_KID_LEN);var v=this.extractKeySystemIdFromUri(u),y=m+d.byteLength,b=new Uint8Array(y),S=new DataView(b.buffer),_=0;if(S.setUint32(_,y),_+=4,S.setUint32(_,0x70737368),_+=4,S.setUint8(_,+!!h),_+=1,_+=3,!v||32!==v.length)return g.ArrayHelper.arrayBufferToAsciiString(d.buffer);_=this.writeKeySystemId(S,_,v),h&&(_=this.writeKeyIds(S,_,p)),S.setUint32(_,d.length),_+=4;for(var E=0;E<d.byteLength;E++)S.setUint8(_+E,d[E]);return btoa(g.ArrayHelper.arrayBufferToAsciiString(b.buffer))},c.parseBoxSize=function(c){return new DataView(c.buffer,0).getUint32(0)},c.parseBoxType=function(c){var u=new DataView(c.buffer,4);return String.fromCharCode(u.getUint8(0))+String.fromCharCode(u.getUint8(1))+String.fromCharCode(u.getUint8(2))+String.fromCharCode(u.getUint8(3))},c.isValidPsshBox=function(c){var u=g.ArrayHelper.stringToArrayWithoutEncoding(atob(c)),d=this.parseBoxSize(u),p=this.parseBoxType(u);return d===u.byteLength&&"pssh"===p},c.extractKidsFromPSSHBox=function(c){if(!c||c.byteLength<3)return[];var u=8,d=[],p=new DataView(c);if(0>=p.getUint8(u))return[];u+=20;var h=p.getUint32(u);u+=4;for(var f=0;f<h;f++){for(var m="",g=u;g<u+16;g++)m+=("00"+p.getUint8(g).toString(16)).slice(-2);u+=16,d.push(v.FormatHelper.beautifyUUID(m))}return d},c.parseContentProtection=function(u,d){var p=function(c){if(h.DRMSchemeIDURIs[c])return c;var u=(0,m.keySystemUidToKind)(c);return(0,h.keySystemNameToSchemeUri)(u)}(u.keyformat);if(!p)return null;c.isValidPsshBox(d)||(d=c.wrapInPsshBox(d,p));var f={schemeIdUri:p,pssh:d};
129return u.keyid&&(f.defaultKid=u.keyid),f},c.parseContentProtectionDescriptors=function(c){return c.filter(_).map(E)},c}();function _(c){var u;return h.DRMSchemeIDURIs.hasOwnProperty(null==(u=null==c?void 0:c._schemeIdUri)?void 0:u.toLowerCase())}function E(c){var u,d,f,m={schemeIdUri:c._schemeIdUri.toLowerCase(),name:h.DRMSchemeIDURIs[c._schemeIdUri.toLowerCase()]};"cenc"===m.name&&"string"==typeof c[b]&&(m.defaultKid=c[b].toLowerCase());var v=(null==(f=c.pssh)?void 0:f.length)>0?c.pssh:(u=c.pro,d=c._schemeIdUri,(null==u?void 0:u.length)>0?u.map(function(c){return{__text:S.wrapInPsshBox(c.__text,d)}}):[]);return v.length>0&&(m.pssh=[],m.kids=[],m.psshData=[]),v.forEach(function(c){var u=atob(c.__text),d=g.ArrayHelper.stringToArrayWithoutEncoding(u).buffer,h=S.extractKidsFromPSSHBox(d);m.pssh.push(u),m.psshData.push(d),m.kids=p(p([],m.kids,!0),h,!0)}),m}function T(c,u){var d=function(c,u){var d,p,h=null!=(d=c[u])?d:null;if(!h)return"";var f=null!=(p=h[0])?p:null;return f?f.__text:""}(c,u);return g.ArrayHelper.stringToArrayWithoutEncoding(atob(d))}u.ContentProtectionHelper=S},29173:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.DRMManager=void 0;var h=d(66790),f=d(40306),m=d(3336),g=d(20213),v=d(33468),y=d(48488),b=d(15971),S=d(74853),_=d(34841),E=d(70581),T=d(92656),w=d(58857),P=d(84344);u.DRMManager=function(){function c(c){var u=this;this.Zo=function(){return Promise.all([u.Wo.promise,u.Xo.promise]).then(u.ho).catch(function(){})},this.ao=function(c){return u.addInitData(c)},this.isLicenseRequestOngoing=function(){return!(!u.emeHandler||"function"!=typeof u.emeHandler.isLicenseRequestOngoing)&&u.emeHandler.isLicenseRequestOngoing()},this.fo=function(c,d){if(u.context.logger.debug("DRM license request failed",JSON.stringify(c)),c.response!==T.EMPTY_KEY_MESSAGE)return c.hasOwnProperty("statusCode")&&"postponed"===c.statusCode?(u.context.logger.debug("postponed license acquisition ("+c.licenseRequestId+") as there is currently a license being requested"),void u.licenseStorage.resetLicense(u.usedKeySystem.kind,c.initDataStr)):void(u.usedKeySystem.kind?(u.licenseStorage.addLicense(u.usedKeySystem.kind,{initDataStr:c.initDataStr}),d.forEach(function(c){return u.context.store.dispatch((0,y.trackDrmKidError)(c))})):u.context.logger.debug("key system info not available, probably has already been shut down due to an error"))},this.go=function(c){u.usedKeySystem.kind&&u.licenseStorage.addLicense(u.usedKeySystem.kind,c)},this.ho=function(){u.usedKeySystem.kind&&!u.Vo&&u.context.eventHandler.fireError(new m.PlayerError(f.ErrorCode.DRM_INIT_DATA_MISSING,{drmKeySystem:u.usedKeySystem.kind},"No init data was found in the manifest or the segments for the used key system.",u.context.sourceContext.sourceIdentifier))},this.context=c,this.emeHandler=null,this.Uo=!1,this.licenseStorage=new w.LicenseStorage(this.context),this.context.videoElement.drmHandler=this,this.Vo=!1,this.Wo=new _.Deferred,this.Wo.promise.catch(function(){}),this.Xo=new _.Deferred,this.usedKeySystem={kind:null,uid:null}}return c.prototype.shutdown=function(){var c;return this.Yo=!0,this.licenseStorage.dispose(),this.context.videoElement.drmHandler=null,this.Uo=!1,this.usedKeySystem={kind:null,uid:null},this.Vo=!1,this.Wo.reject(),null==(c=(0,b.getSourceStore)(this.context))||c.dispatch((0,y.resetUsedKeySystem)()),null===this.emeHandler?Promise.resolve():(this.emeHandler.setWaitingForKeyListener(null),this.emeHandler.unload())},c.prototype.bo=function(){var c=this;this.licenseStorage.getEntriesWithoutLicense().filter(function(u){return u.systemName!==c.usedKeySystem.kind}).forEach(function(u){return c.licenseStorage.remove(u.initDataStr)})},c.prototype.co=function(){this.licenseStorage.getEntriesWithoutLicense().some(function(c){return c.initData})&&(this.Vo=!0)},c.prototype.eo=function(){var c=this;this.licenseStorage.getEntriesWithoutLicense().filter(function(c){return c.initData&&!c.initDataStr}
129).forEach(function(u){var d=c.emeHandler.getIdentifierFromInitData(S.ArrayHelper.arrayBufferToAsciiString(u.initData));c.licenseStorage.updateInitData(p(p({},u),{initDataStr:d}))})},c.prototype.setConfig=function(c,u){var d=this,p=(0,v.getRelevantKeySystemMap)(c);return(0,P.resolveDRMSystem)(p,c,this.context).then(function(c){if(d.Yo)return d.context.logger.debug("Shutdown in progress - prevented resolving DRM system!"),Promise.reject(Error(h.DrmSetupError.CANCELLED));d.usedKeySystem=c.keySystem,d.Uo=!0,null==(p=(0,b.getSourceStore)(d.context))||p.dispatch((0,y.setUsedKeySystem)(d.usedKeySystem)),d.emeHandler=c.emeHandler.instance,d.emeHandler.setEncryptedListener(d.ao),d.emeHandler.setWaitingForKeyListener(d.Zo);var p,f=d.emeHandler.load(c.keySystem.instance,c.keySystem.uid,c.config,u);return d.bo(),d.co(),d.eo(),d.requestMissingLicenses(),d.Wo.resolve(),f.then(function(){return c.emeHandler.kind})}).catch(function(c){return d.context.logger.debug("Error while loading EME handler: ".concat(null==c?void 0:c.message),c),null!==d.emeHandler&&d.emeHandler.unload(),d.Wo.reject(),Promise.reject(c)})},c.prototype.requestMissingLicenses=function(){var c=this;this.Uo&&this.usedKeySystem.kind&&this.licenseStorage.getEntriesWithoutLicense().forEach(function(u){var d=u.initData,p=u.initDataStr,h=u.sessionId,f=u.systemName,m=u.wasRequested,g=u.isPending;f===c.usedKeySystem.kind?d?m||(c.licenseStorage.setRequested(p,f),c.emeHandler.requestLicense(d,p,h).then(c.go).catch(function(d){return c.fo(d,u.keyIds)})):g||c.licenseStorage.setPending(p,f):c.licenseStorage.remove(p)})},c.prototype.preprocessInitDataStr=function(c){var u;return c.initDataStr?null==(u=this.emeHandler)?void 0:u.getIdentifierFromInitData(c.initDataStr):void 0},c.prototype.hasOngoingLicenseRequests=function(c){return this.licenseStorage.hasOngoingLicenseRequests(c)},c.prototype.hasUsableMediaKey=function(c){return this.emeHandler instanceof E.UnprefixedEMEHandler?this.licenseStorage.hasUsableOrPendingMediaKey(c,this.usedKeySystem.kind):this.licenseStorage.hasLicense(c,this.usedKeySystem.kind)},c.prototype.addInitData=function(c){var u,d;if(c&&(!this.usedKeySystem.kind||c.systemName===this.usedKeySystem.kind)){var h=this.preprocessInitDataStr(c),f=this.usedKeySystem.kind||c.systemName,m=h?this.licenseStorage.getLicense(h,f):void 0;null!=m&&m.initData||(c.initDataStr=h,c.kid=null!=(d=null==(u=this.emeHandler)?void 0:u.getKeyUuidsFromInitData(c.initData))?d:[],m?this.licenseStorage.updateInitData(p(p({},m),{systemName:f,initData:c.initData,initDataStr:c.initDataStr,keyIds:c.kid})):this.licenseStorage.add(c),this.Vo=this.Vo||!!(this.usedKeySystem.kind&&c.initData)),this.requestMissingLicenses()}},c.prototype.getUsedKeySystemKind=function(){return this.usedKeySystem.kind},c.prototype.getUsedKeySystemUid=function(){return this.usedKeySystem.uid},c.prototype.reInitializeEmeHandler=function(){var c;null==(c=this.emeHandler)||c.reInitialize()},c.prototype.signalInitDataShouldBeAvailable=function(){this.Xo.resolve()},c.prototype.prepareForMseShutdown=function(){var c,u,d;return null!=(d=null==(u=null==(c=this.emeHandler)?void 0:c.prepareForMseShutdown)?void 0:u.call(c))?d:Promise.resolve()},c.prototype.suspend=function(){var c,u;return null!=(u=null==(c=this.emeHandler)?void 0:c.suspend())?u:Promise.resolve()},c.prototype.renewLicense=function(c){if((null==(u=this.usedKeySystem)?void 0:u.kind)!==v.KeySystemKind.PLAYREADY)return this.context.logger.debug("RenewLicense is only supported for playready."),Promise.reject(g.WarningCode.DRM_LICENSE_RENEWAL_FAILED);if(!(null!=(d=this.emeHandler)&&d.disposeSessionForInitData))return this.context.logger.debug("RenewLicense is not supported for the current EME."),Promise.reject(g.WarningCode.DRM_LICENSE_RENEWAL_FAILED);var u,d,p=this.licenseStorage.findLicenseForPublicId(c,this.usedKeySystem.kind);return p?this.io(p.initDataStr):(this.context.logger.debug("Could not find active drm session for "+c),Promise.reject(g.WarningCode.DRM_LICENSE_RENEWAL_FAILED))},c.prototype.isUsingUnprefixedEmeHandler=function(){return!!this.emeHandler&&this.emeHandler instanceof E.UnprefixedEMEHandler},c.prototype.io=function(c){var u=this;return this.licenseStorage.resetLicense(this.usedKeySystem.kind,c),this.emeHandler.disposeSessionForInitData(c).then(function(){return u.requestMissingLicenses()}).catch(function(d){return u.context.eventHandler.dispatchEvent(g.PlayerEvent.Warning,new g.PlayerWarning(g.WarningCode.DRM_LICENSE_RENEWAL_FAILED,null,{keyIds:c.split(";"),error:d})),Promise.reject(d)})},c}()}
129,34079:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.createDrmApi=function(c,u){return new(function(){function d(){}return d.prototype.renewLicense=function(d){var h=c();if(!h)return u.debug("Unable to renew license, since there is no source loaded."),Promise.reject("NoSourceLoaded");var f=h.get(p.ServiceName.DrmService);return f?f.renewLicense(d):(u.debug("No DRM source loaded, ignoring renewLicense call"),Promise.reject("NoDrmSource"))},d}())};var p=d(80813)},97115:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.createDrmManager=function(c){return(0,h.getCapabilities)()[p.CapabilityKey.isTizen]&&f.ModuleManager.has(m.ModuleName.Tizen)?f.ModuleManager.get(m.ModuleName.Tizen).createTizenDRMManager(c):(0,h.getCapabilities)()[p.CapabilityKey.isWebOS]&&f.ModuleManager.has(m.ModuleName.Webos)?new(f.ModuleManager.get(m.ModuleName.Webos).getWebosDrmManagerConstructor())(c):new g.DRMManager(c)};var p=d(7387),h=d(21513),f=d(88052),m=d(62756),g=d(29173)},93101:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.DrmService=void 0;var h=d(66790),f=d(33468),m=d(7387),g=d(21513),v=d(93204),y=d(34841),b=d(46057),S=d(97115),_=d(55327),E=d(84344),T=d(99921);u.DrmService=function(){function c(c){this.context=c,this.lo=new y.Deferred,this.mo=!1,this.po=Promise.resolve()}return c.prototype.qo=function(){var c=this;this.to().then(function(){return c.ko=(0,S.createDrmManager)(c.context)})},c.prototype.canReuseEmeHandler=function(){var c=this.no;return c===T.EMEHandlerKind.UNPREFIXED||c===T.EMEHandlerKind.MS_PREFIXED},c.prototype.reInitializeEmeHandler=function(){return this.ko.reInitializeEmeHandler()},c.prototype.resolveDrmSystemFromSourceConfig=function(c){var u=this;if(!this.oo){var d=(0,f.getRelevantKeySystemMap)(c);this.oo=(0,b.yieldToMain)().then(function(){return(0,E.resolveUsedDRMSystem)(d,c,u.context)}).then(function(d){return u.context.logger.debug("Early DRM key system resolved",d),p(p({},d),{config:c})}).catch(function(c){return u.context.logger.debug("Early DRM key system resolving failed:",c),null})}},c.prototype.setDrmConfig=function(c){this.jo=c,this.lo=new y.Deferred,this.mo=!1,this.qo()},c.prototype.updateDrmConfig=function(c,u){var d=this;return this.mo?this.lo.promise:(this.jo=p(p({},this.jo),c),this.mo=!0,this.ko.setConfig(this.jo,u).then(function(c){d.no=c,d.lo.resolve()}).catch(function(c){d.mo=!1,d.lo.reject(c)}).finally(function(){return d.lo.promise}))},c.prototype.addInitData=function(c){var u=this;this.ko&&this.lo.promise.then(function(){var d;return null==(d=u.ko)?void 0:d.addInitData(c)}).catch(function(c){(null==c?void 0:c.message)!==h.DrmSetupError.CANCELLED&&u.context.logger.debug("Adding DRM init data failed: ".concat(null==c?void 0:c.message),c)})},c.prototype.renewLicense=function(c){var u,d;return null!=(d=null==(u=this.ko)?void 0:u.renewLicense(c))?d:Promise.reject("No active drm manager")},c.prototype.getUsedKeySystemKind=function(){var c;return(null==(c=this.ko)?void 0:c.getUsedKeySystemKind())||null},c.prototype.getUsedKeySystemUid=function(){var c;return(null==(c=this.ko)?void 0:c.getUsedKeySystemUid())||null},c.prototype.getUsedOrEarlyResolvedKeySystemUid=function(){var c=this.getUsedKeySystemUid();return c?Promise.resolve(c):this.oo?this.oo.then(function(c){var u;return null!=(u=null==c?void 0:c.keySystem.uid)?u:null}):Promise.resolve(null)},c.prototype.getResolvedKeySystemFromSourceConfig=function(){return this.oo||Promise.resolve(null)},c.prototype.waitForPendingLicenseRequests=function(c){var u=this,d=function(){var d,p;return null!=(p=null==(d=u.ko)?void 0:d.hasOngoingLicenseRequests(c))&&p};if(!d())return Promise.resolve();this.context.logger.debug("Waiting for pending DRM license requests to complete");var p=new y.Deferred,h=(0,v.subscribe)(this.context.store)(function(c){return _.getLicenseState(c)},function(){d()||(h(),p.resolve())});return p.promise},c.prototype.ro=function(c){var u,d=this;if(null!=(u=this.ko)&&u.hasUsableMediaKey(c))return Promise.resolve();var p=new y.Deferred,h=(0,v.subscribe)(this.context.store)(function(c){return _.getLicenseState(c)},function(){var u;null!=(u=d.ko)&&u.hasUsableMediaKey(c)&&(d.context.logger.debug("DRM license added for key ID ".concat(c)),h(),p.resolve())});return this.ko&&this.ko.requestMissingLicenses(),p.promise},c.prototype.so=function(c){var u,d,p,h=this.getUsedKeySystemKind()===f.KeySystemKind.PLAYREADY,v=(0,g.getCapabilities)()[m.CapabilityKey.isEdge],y=null!=(d=null==(u=this.ko)?void 0:u.isUsingUnprefixedEmeHandler())&&d,b=c.hasDrmKid()?c.getDrmKid():void 0;return!(!this.mo||void 0===b||!(h&&v&&y)||null!=(p=this.ko)&&p.hasUsableMediaKey(b))},c.prototype.maybeWaitForDrmLicense=function(c,u){var d=this,p=!c.isInit()||c.isSelfInit(),h=this.so(c),f=void 0!==u&&Object.keys(u).length>0,m=c.hasDrmKid()?c.getDrmKid():void 0;return f&&h&&p&&void 0!==m?(this.context.logger.debug("Deferring appendage of ".concat(c.getUrl()," as DR
129M license for key ID ").concat(m," has not yet been requested")),c.getDrmInitData().forEach(function(c){return d.addInitData(c)}),this.ro(m)):Promise.resolve()},c.prototype.preprocessInitDataStr=function(c){return this.ko.preprocessInitDataStr(c)},c.prototype.signalInitDataShouldBeAvailable=function(){this.ko.signalInitDataShouldBeAvailable()},Object.defineProperty(c.prototype,"shutdownPromise",{get:function(){return this.po},enumerable:!1,configurable:!0}),c.prototype.to=function(){var c=this;return this.ko&&(this.po=this.po.then(function(){var u;return null==(u=c.ko)?void 0:u.shutdown().catch(function(u){c.context.logger.debug("Couldn't shut down DRMManager ".concat(u))})})),this.po},c.prototype.shutdownIfNeeded=function(c){return c&&this.canReuseEmeHandler()?Promise.resolve():this.release()},c.prototype.release=function(){var c=this;return this.jo=null,this.to().then(function(){return c.ko=null})},c.prototype.prepareForMseShutdown=function(){var c,u;return null!=(u=null==(c=this.ko)?void 0:c.prepareForMseShutdown())?u:Promise.resolve()},c.prototype.suspend=function(){var c,u;return null!=(u=null==(c=this.ko)?void 0:c.suspend())?u:Promise.resolve()},c.prototype.dispose=function(){this.release()}
vendor: 39,218 bytes, line 129
129,c.prototype.isDrmConfigSet=function(){return!!this.jo},c}()},24109:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.FairplayHandler=u.SupportedFairplayKeySystems=void 0;var f,m,g=d(40306),v=d(3336),y=d(4129),b=d(91523),S=d(57456),_=d(29669),E=d(74853),T=d(88844),w=d(19274);(p=f||(f={}))[p.MEDIA_KEYERR_DOMAIN=6]="MEDIA_KEYERR_DOMAIN",(m||(u.SupportedFairplayKeySystems=m={})).FPS_1="com.apple.fps.1_0",u.FairplayHandler=function(){function c(u,d,p){var h=this;this.Xp=function(c){if(h.yo){h.zo=!0;var u=c.initData,d=h.cp(u);if(h.Jo(u),h.Eo)h.ap(d,u);else{var p=h.yo.serverCertificate;if(p)return p instanceof ArrayBuffer==0?void h.uo.eventHandler.fireError(new v.PlayerError(g.ErrorCode.DRM_CERTIFICATE_ERROR,void 0,"The provided `AppleFairplayDRMConfig.serverCertificate` is not of type `ArrayBuffer`.",h.uo.sourceContext.sourceIdentifier)):(h.Eo=h.Zp(p),void h.ap(d,u));h.Wp().then(function(c){h.Eo=h.Zp(c.body),h.ap(d,u)}).catch(function(c){h.uo.logger.debug("Error while loading the certificate ",c)}),h.Ho()}}else h.uo.eventHandler.fireError(new v.PlayerError(g.ErrorCode.DRM_MISSING_CONFIGURATION,void 0,"A FairPlay DRM config is required to play this source, but none was provided.",h.uo.sourceContext.sourceIdentifier))},this.bp=function(c,u){h.uo.eventHandler.fireError(new v.PlayerError(g.ErrorCode.NETWORK_FAILED_CERTIFICATE_REQUEST,{responseCode:c.status,responseText:c.statusText,serverResponse:c.body,reason:u.message},"Failed to load the FairPlay certificate: ".concat(c.status," ").concat(c.statusText,"."),h.uo.sourceContext.sourceIdentifier))},this.fp=function(){(0,T.clearTimeoutIfDefined)(h.Fo)},this.gp=function(u,d){h.zo=!0;var p=u.message,f=u.target,m=h.yo,b=m.withCredentials,E=m.licenseResponseType,T=void 0===E?_.HttpResponseType.TEXT:E,w=m.maxLicenseRequestRetries,P=m.headers,A=m.prepareMessage,I=S.XhrHelper.mergeHeaders({"Content-Type":"application/x-www-form-urlencoded"},P),M=h.Up(w),R=new y.DefaultContentLoader(h.uo,{maxRetries:M,requestType:_.HttpRequestType.DRM_LICENSE_FAIRPLAY});u.messageBase64Encoded=c.base64EncodeUint8Array(p);var k="function"==typeof A?A(u,f):"spc=".concat(encodeURIComponent(u.messageBase64Encoded),"&assetId=").concat(f.contentId),x=h.Yp(d);x&&"string"==typeof x?R.load(x,_.HttpRequestMethod.POST,T,k,I,void 0!==b&&b).then(function(c){h.hp(c,f)}).catch(h.ip):(h.zo=!1,h.uo.eventHandler.fireError(new v.PlayerError(g.ErrorCode.DRM_NO_LICENSE_SERVER_URL_PROVIDED,{licenseServer:x},"No valid license server URL was provided through the FairPlay DRM config.",h.uo.sourceContext.sourceIdentifier)))},this.hp=function(u,d){if(h.zo=!1,"function"!=typeof h.yo.prepareLicenseAsync){var p=u.body;"function"==typeof h.yo.prepareLicense?p=h.yo.prepareLicense(p):(p=p.trim()).startsWith("<ckc>")&&p.endsWith("</ckc>")&&(p=p.slice(5,-6));var f=p;"string"==typeof p&&(f=c.base64DecodeUint8Array(p)),d.update(f)}else h.yo.prepareLicenseAsync(u.body).then(function(c){d.update(c)}).catch(function(c){h.uo.logger.log(c),h.uo.eventHandler.fireError(new v.PlayerError(g.ErrorCode.DRM_CERTIFICATE_ERROR,{reason:c},"Unable to parse the certificate: `AppleFairplayDRMConfig.prepareLicenseAsync` failed.",h.uo.sourceContext.sourceIdentifier))})},this.ip=function(c){h.zo=!1,h.uo.logger.debug("The license request failed."),h.uo.eventHandler.fireError(new v.PlayerError(g.ErrorCode.DRM_FAILED_LICENSE_REQUEST,{responseCode:c.status,responseText:c.statusText,serverResponse:c.body},void 0,h.vo))},this.jp=function(c){h.zo=!1,h.uo.logger.debug("A decryption key error was encountered"),h.uo.logger.debug(c);var u=c.target,d=u?u.error:{},p=d.code,m=d.systemCode,y=h.Bo&&h.uo.settings.FAIRPLAY_IGNORE_DUPLICATE_INIT_DATA_KEY_ERRORS;p===f.MEDIA_KEYERR_DOMAIN&&0x48444350===m?h.uo.eventHandler.fireError(new v.PlayerError(g.ErrorCode.DRM_RESTRICTED_OUTPUT,void 0,void 0,h.vo)):y?h.uo.logger.debug("Ignoring key error as duplicate needkey events have been tracked"):h.uo.eventHandler.fireError(new v.PlayerError(g.ErrorCode.DRM_KEY_ERROR,{code:p,systemCode:m},void 0,h.vo))},this.kp=function(){h.uo.logger.debug("Decryption key was added to session.")},this.isLicenseRequestOngoing=function(){return h.zo},this.uo=u,this.vo=u.sourceContext.sourceIdentifier,this.wo=u.settings,this.xo=d,this.yo=p,this.zo=!1,this.Ao=[],this.Bo=!1,this.Do=null,this.Co=null,p&&p.hasOwnProperty("certificateURL")&&(this.Go=p.certificateURL),this.xo.drmHandler=this,this.xo.addEventListener(w.MediaElementEvent.webkitneedkey,this.Xp),this.xo.addEventListener(w.MediaElementEvent.error,this.fp)}return c.prototype.Ho=function(){var c=this;(0,T.clearTimeoutIfDefined)(this.Fo);var u=(0,b.getRequestTimeout)(this.uo,_.HttpRequestType.DRM_CERTIFICATE_FAIRPLAY);this.Fo=window.setTimeout(function(){c.uo.eventHandler.fireError(new v.PlayerError(g.ErrorCode.DRM_CERTIFICATE_ERROR,void 0,"The FairPlay certificate request was not completed within the timeout of ".concat(u," ms."),c.uo.sourceContext.sourceIdentifier))},u)},c.stringToArray=function(c){for(var u=new ArrayBuffer(2*c.length),d=new Uint16Array(u),p=0,h=c.length;p<h;p++)d[p]=c.charCodeAt(p);return d},c.base64DecodeUint8Array=function(c){for(var u=window.atob(c),d=u.length,p=new Uint8Array(new ArrayBuffer(d)),h=0;h<d;h++)p[h]=u.charCodeAt(h);return p},c.base64EncodeUint8Array=function(c){for(var u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d="",p=0;p<c.length;){var h=c[p++],f=p<c.length?c[p++]:0/0,m=p<c.length?c[p++]:0/0,g=h>>2,v=(3&h)<<4|f>>4,y=(15&f)<<2|m>>6,b=63&m;isNaN(f)?y=b=64:isNaN(m)&&(b=64),d+=u.charAt(g)+u.charAt(v)+u.charAt(y)+u.charAt(b)}return d},c.prototype.Io=function(c,u,d,p){void 0===p&&(p=null),d.addEventListener(c,function(c){return u(c,p)},!1)},c.prototype.Jo=function(c){var u=E.ArrayHelper.arrayBufferToAsciiString(c.buffer,!1);this.Ao.includes(u)?(this.uo.logger.debug("Observed duplicate need key event with initData",u),this.Bo=!0):this.Ao.push(u)},c.prototype.Up=function(c){var u=parseInt("".concat(c));return isFinite(u)?u:3},c.prototype.Vp=function(){var c=this.yo.maxCertificateRequestRetries;return new y.DefaultContentLoader(this.uo,{onFailure:this.bp,maxRetries:this.Up(c),requestType:_.HttpRequestType.DRM_CERTIFICATE_FAIRPLAY})},c.prototype.Wp=function(){var c=this,u=this.yo,d=u.withCredentials,p=void 0!==d&&d,f=u.certificateHeaders,m=h({},f);return this.Co=this.Vp(),new Promise(function(u,d){c.Co.load(c.Go,_.HttpRequestMethod.GET,_.HttpResponseType.ARRAYBUFFER,null,m,p).then(function(c){return u(c)}).catch(function(c){return d(c)}).finally(function(){c.Co=null})})},c.prototype.Yp=function(c){var u=E.ArrayHelper.arrayBufferToAsciiString(c.buffer,!1);if(this.yo&&this.yo.hasOwnProperty("LA_URL"))return this.uo.logger.debug("licenseServerUrl (config param): "+this.yo.LA_URL),this.yo.LA_URL;if(/skd:\/\//.test(u)){var d="function"==typeof this.yo.getLicenseServerUrl?this.yo.getLicenseServerUrl(u.substring(u.indexOf("skd:"))):u.substring(u.indexOf("skd:")+4);return this.uo.logger.debug("licenseServerUrl: "+d),d}return null},c.prototype.Zp=function(c){var u="function"==typeof this.yo.prepareCertificate;try{return new Uint8Array(u?this.yo.prepareCertificate(c):c)}catch(c){return void this.uo.eventHandler.fireError(new v.PlayerError(g.ErrorCode.DRM_CERTIFICATE_ERROR,{reason:c},"There was an error during the processing of the certificate: ".concat(u?"`AppleFairplayDRMConfig.prepareCertificate` failed":"the obtained certificate is invalid","."),this.uo.sourceContext.sourceIdentifier))}},c.prototype.ap=function(c,u){(0,T.clearTimeoutIfDefined)(this.Fo);var d=this.dp(u,c,this.Eo);if(this.Do||this.ep(),this.xo.webkitKeys||this.xo.webkitSetMediaKeys(new WebKitMediaKeys(this.Do)),this.xo.webkitKeys){var p=this.xo.webkitKeys.createSession("video/mp4",d);p?(p.contentId=c,this.Io("webkitkeymessage",this.gp,p,u),this.Io("webkitkeyadded",this.kp,p),this.Io("webkitkeyerror",this.jp,p)):this.uo.eventHandler.fireError(new v.PlayerError(g.ErrorCode.DRM_KEY_SESSION_INITIALIZATION_FAILED,void 0,"Unable to initialize DRM key session: `webkitKeys.createSession` failed.",this.uo.sourceContext.sourceIdentifier))}else this.uo.eventHandler.fireError(new v.PlayerError(g.ErrorCode.DRM_MEDIA_KEY_INITIALIZATION_FAILED,void 0,"Unable to initialize the DRM media keys: the video element does not support WebKit keys.",this.uo.sourceContext.sourceIdentifier))},c.prototype.cp=function(c){var u=E.ArrayHelper.arrayBufferToAsciiString(c.buffer,!1);if("function"==typeof this.yo.prepareContentId)u=this.yo.prepareContentId(u);else{var d=u.indexOf("?");u=d<0?"":u.substring(d+1)}return this.uo.logger.debug("contentId: "+u),u},c.prototype.dp=function(u,d,p){var h="string"==typeof d?c.stringToArray(d):d,f=0,m=new ArrayBuffer(u.byteLength+4+h.byteLength+4+p.byteLength),g=new DataView(m);new Uint8Array(m,f,u.byteLength).set(u),f+=u.byteLength,g.setUint32(f,h.byteLength,!0),f+=4;var v=this.yo.useUint16InitData?new Uint16Array(m,f,h.length):new Uint8Array(m,f,h.byteLength);return v.set(h),f+=v.byteLength,g.setUint32(f,p.byteLength,!0),new Uint8Array(m,f+=4,p.byteLength).set(p),new Uint8Array(m,0,m.byteLength)},c.prototype.ep=function(){var c=Object.keys(m).map(function(c){return m[c]});this.Do=c.find(function(c){return WebKitMediaKeys.isTypeSupported(c,"video/mp4")})||null,this.Do||this.uo.eventHandler.fireError(new v.PlayerError(g.ErrorCode.DRM_KEY_SYSTEM_NOT_SUPPORTED,{supportedKeySystem:c},"FairPlay DRM is not supported on this platform.",this.uo.sourceContext.sourceIdentifier))},c.prototype.destroy=function(){this.xo.drmHandler=null,this.xo.removeEventListener(w.MediaElementEvent.webkitneedkey,this.Xp),this.xo.removeEventListener(w.MediaElementEvent.error,this.fp),this.Do=null,this.Eo=null,this.Ao=[],this.Go=null,this.Bo=!1},c.prototype.dispose=function(){var c;this.destroy(),(0,T.clearTimeoutIfDefined)(this.Fo),null==(c=this.Co)||c.cancel(),this.wo=null,this.Do=null,this.Eo=null,this.Go=null},c}()},58857:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.hasMatchingLicenseInfoForKeySystem=u.LicenseStorage=void 0,u.isMediaKeyStatusUnknownOrPendingOrUsable=function(c){return c.mediaKeyStatus===y.MediaKeyStatus.Usable||c.mediaKeyStatus===y.MediaKeyStatus.Pending||c.mediaKeyStatus===y.MediaKeyStatus.Unknown},u.getKeySystemMap=E,u.getAllLicensesForKeySystem=T;var h=d(3714),f=d(93204),m=d(4358),g=d(91921),v=d(55327),y=d(56068),b=function(){function c(c){var u=this;this.JQ=1,this.KQ=function(c){u.HQ.store.dispatch((0,m.resetLicenses)())},this.NQ=function(){return v.getLicenseState(u.HQ.store.getState())},this.OQ=function(c){u.HQ.store.dispatch(c)},this.HQ=c,this.HQ.store.hasReducer("drmLicenses")||(this.HQ.store.addReducer("drmLicenses",g.LicenseReducer),this.HQ.store.dispatch((0,m.initializeLicenseStorage)(c.storedConfig))),this.LQ(),this.KQ=this.KQ.bind(this),window.addEventListener("beforeunload",this.KQ)}return c.prototype.LQ=function(){var c=this;this.IQ=(0,f.subscribe)(this.HQ.store)(function(c){return v.getLicenseState(c)},function(u){return c.MQ(u)})},c.prototype.MQ=function(c){(0,m.maybeStoreLicences)(c,this.HQ.storedConfig)},c.prototype.add=function(c){var u=c.systemName,d=c.initData,p=c.initDataStr;if(!u||!p||this.getLicense(p,u))return!1;var h={hasLicense:!1,initData:d,initDataStr:p,license:null,isPending:!1,systemName:u,wasRequested:!1,keyIds:c.kid,mediaKeyStatus:y.MediaKeyStatus.Unknown,usedByPlayerId:this.HQ.internalPlayerID};return this.OQ((0,m.addLicense)({systemName:u,licenseInfo:h,initDataStr:p})),!0},c.prototype.addLicense=function(c,u){var d=u.initDataStr,f=u.license,g=u.response,v=u.sessionInfo;if(f||g||u.restoredFromPersistentLicense){var y=this.getLicense(d,c),b=p(p(p({},y||{}),void 0===v?{}:v),{isPending:!1,hasLicense:!0,license:f||null,usedByPlayerId:this.HQ.internalPlayerID});b.publicId||(b.publicId=String(this.JQ++)),this.HQ.eventHandler.dispatchEvent(h.PlayerEvent.DrmLicenseAdded,{license:{id:b.publicId,keyIds:b.initDataStr.split(";"),keySystemString:c}});var S={licenseInfo:b,initDataStr:d,systemName:c};return this.OQ(y?(0,m.updateLicense)(S):(0,m.addLicense)(S))}this.OQ((0,m.removeLicense)({initDataStr:d,systemName:c}))},c.prototype.findLicenseForPublicId=function(c,u){var d,p=this.NQ().drmData[u];return Object.keys(p).forEach(function(u){p[u].publicId===c&&(d=p[u])}),d},c.prototype.getEntriesWithoutLicense=function(){return Object.values(this.NQ().drmData).flatMap(function(c){return Object.values(c)}).filter(function(c){return!c.hasLicense&&!c.wasRequested})},c.prototype.getLicense=function(c,u){var d=this.NQ(),p=(0,m.getLicenseInfoKey)(c);return d.drmData[u]&&d.drmData[u][p]},c.prototype.getAllLicensesForKeySystem=function(c){return T(c,this.NQ())},c.prototype.PQ=function(c,u,d){var h=this.getLicense(c,u);h&&this.OQ((0,m.updateLicense)({initDataStr:c,licenseInfo:d(p({},h)),systemName:u}))},c.prototype.setRequested=function(c,u){this.PQ(c,u,function(c){return p(p({},c),{wasRequested:!0})})},c.prototype.hasLicense=function(c,d){return(0,u.hasMatchingLicenseInfoForKeySystem)(c,E(this.NQ(),d),S)},c.prototype.hasUsableOrPendingMediaKey=function(c,d){return(0,u.hasMatchingLicenseInfoForKeySystem)(c,E(this.NQ(),d),_)},c.prototype.hasOngoingLicenseRequests=function(c){return this.getAllLicensesForKeySystem(c).some(function(c){return!c.hasLicense&&c.wasRequested})},c.prototype.setKeyIds=function(c,u,d){this.PQ(c,u,function(c){return p(p({},c),{keyIds:d})})},c.prototype.setPending=function(c,u){this.PQ(c,u,function(c){return p(p({},c),{isPending:!0})})},c.prototype.resetLicense=function(c,u){var d=this.getLicense(u,c)||{},h=p(p({},d),{keyIds:[],isPending:!1,hasLicense:!1,license:null,expiration:null,sessionId:null,wasRequested:!1});this.OQ((0,m.resetLicense)({systemName:c,initDataStr:u,licenseInfo:h}))},c.prototype.remove=function(c){this.OQ((0,m.removeLicense)({initDataStr:c}))},c.prototype.updateInitData=function(c){var u=c.initDataStr,d=c.systemName;this.OQ((0,m.updateLicense)({initDataStr:u,licenseInfo:c,systemName:d}))},c.prototype.dispose=function(){this.HQ.store.getState().drmLicenses&&!this.HQ.store.getState().drmLicenses.inPersistentState?this.HQ.store.dispatch((0,m.clearLicenseStorage)()):this.HQ.store.dispatch((0,m.resetLicenses)()),this.IQ&&this.IQ(),window.removeEventListener("beforeunload",this.KQ)},c}();function S(c){return c.hasLicense}function _(c){return c.mediaKeyStatus===y.MediaKeyStatus.Usable||c.mediaKeyStatus===y.MediaKeyStatus.Pending}function E(c,u){var d;return null!=(d=null==c?void 0:c.drmData[u])?d:{}}function T(c,u){var d=u.drmData[c];return d?Object.values(d):[]}u.LicenseStorage=b,u.hasMatchingLicenseInfoForKeySystem=function(c,u,d){return Object.values(u).some(function(u){return u.keyIds.includes(c)&&d(u)})}},47272:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.DRMModuleDefinition=void 0;var p=d(62756),h=d(67579),f=d(88559),m=d(34079),g=d(29173),v=d(93101),y=d(70581),b=d(80680),S=d(24109),_=d(92656),E=d(4358),T=d(55327),w=d(78763),P=d(6234);u.DRMModuleDefinition={name:p.ModuleName.DRM,module:{DrmService:v.DrmService,DRMManager:g.DRMManager,FairplayHandler:S.FairplayHandler,PlayReady:_.PlayReady,DRMDetectorService:w.DRMDetectorService,WebKitPrefixedEMEHandler:b.WebKitPrefixedEMEHandler,UnprefixedEMEHandler:y.UnprefixedEMEHandler,parseInitData:P.parseInitData,getLicenseState:T.getLicenseState,getLicenseInfoKey:E.getLicenseInfoKey,createDrmApi:m.createDrmApi,ContentProtectionHelper:f.ContentProtectionHelper},exports:{MediaKeySystemConfig:h.MediaKeySystemConfig}},u.default=u.DRMModuleDefinition},46658:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.ParallelContentLoader=void 0;var p=d(4129);u.ParallelContentLoader=function(){function c(c,u){this.SQ=[],this.QQ=c,this.RQ=u}return c.prototype.load=function(c,u,d,h,f,m,g,v){var y=this,b=new p.DefaultContentLoader(this.QQ,this.RQ);return this.SQ.push(b),b.load(c,u,d,h,f,m,g,v).finally(function(){y.SQ=y.SQ.filter(function(c){return c!==b}),b.dispose()})},c.prototype.cancel=function(){this.SQ.forEach(function(c){return c.cancel()})},c.prototype.isLoading=function(){return this.SQ.some(function(c){return c.isLoading()})},c.prototype.isRetrying=function(){return this.SQ.some(function(c){return c.isRetrying()})},c.prototype.dispose=function(){this.SQ.forEach(function(c){return c.dispose()}),this.SQ=[]},c}()},86558:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.MSPrefixedEMEHandler=void 0,u.isMsPrefixedEmeHandlerSupported=function(c){return window.MSMediaKeys&&"function"==typeof MSMediaKeys.isTypeSupported&&MSMediaKeys.isTypeSupported(c)?Promise.resolve({keySystem:c}):Promise.reject("DOMException: Unsupported keySystem")};var p,h,f=d(40306),m=d(3336),g=d(34841),v=d(70850),y=d(19274),b=d(6234);(p=h||(h={})).KeyMessage="mskeymessage",p.KeyAdded="mskeyadded",p.KeyError="mskeyerror",u.MSPrefixedEMEHandler=function(){function c(c){var u=this;this.y9=function(){if(u.k9)return Promise.reject("EME handler destroyed");if(u.w9.readyState===HTMLMediaElement.HAVE_NOTHING)return v.Util.delay(250,u.y9);if(u.w9.msKeys)return u.l9.logger.debug("session already created"),Promise.resolve();try{u.v9=new MSMediaKeys(u.m9),u.w9.msSetMediaKeys(u.v9)}catch(c){return u.n9.fireError(new m.PlayerError(f.ErrorCode.DRM_MEDIA_KEY_INITIALIZATION_FAILED,{keySystem:u.m9,eme:"msPrefixed",error:c},"Unable to initialize the DRM media keys: `msSetMediaKeys` failed.",u.l9.sourceContext.sourceIdentifier)),Promise.reject(c)}return Promise.resolve()},this.z9=function(c){if(u.l9.logger.debug("onKeyNeeded"),u.p9&&u.p9(),c){var d=(0,b.parseInitData)(c.initData);d&&d.length&&u.s9&&d.forEach(function(c){return u.s9(c)})}},this.l9=c,this.k9=!1,this.r9=[],this.o9=!1,this.n9=this.l9.eventHandler}return Object.defineProperty(c.prototype,"w9",{get:function(){return this.l9.videoElement},enumerable:!1,configurable:!0}),c.getVideoErrorNameFromError=function(c,u){for(var d in c)if((d.indexOf("MEDIA_ERR_")>-1||d.indexOf("MEDIA_KEYERR_")>-1)&&c[d]===u)return d;return"UNKNOWN"},c.getHexFromCode=function(c){return isFinite(c)?(c<0&&(c=0xffffffff+c+1),"0x"+c.toString(16).toUpperCase()):null},c.prototype.x9=function(u,d){if(this.o9=!1,null!==u&&u.deferred.reject(),d&&d.target&&d.target.error){this.w9.removeEventListener(y.MediaElementEvent.error,this.t9);var p=d.target.error,h=Number(p.code),g=Number(p.systemCode),v=Number(p.msExtendedCode),b=c.getVideoErrorNameFromError(p,h),S=c.getHexFromCode(g),_=c.getHexFromCode(v)||S,E=f.ErrorCode[f.ErrorCode.DRM_KEY_ERROR]+" - "+b+" (code: "+h+"), "+_;this.n9.fireError(new m.PlayerError(f.ErrorCode.DRM_KEY_ERROR,{code:h,systemCode:g},E,this.l9.sourceContext.sourceIdentifier))}},c.prototype.A9=function(c,u){var d=this,p=u.target.sessionId;this.u9[p]=u.target,this.o9=!0,this.l9.logger.debug("("+c.id+") onKeyMessage",JSON.stringify(u)),this.j9.handleLicenseRequest(u).then(function(u){d.l9.logger.debug("license available ("+c.id+")"),d.E9(u.body,p,c.id),c.license=u,d.o9=!1}).catch(function(u){d.l9.logger.debug("license request failed ("+c.id+")"),c.deferred.reject(u),d.o9=!1})},c.prototype.B9=function(c,u){this.l9.logger.debug("key added for request ID ".concat(c.id)),c&&c.license?(this.l9.logger.debug("license request successful ("+c.id+")"),c.deferred.resolve(c.license)):c.deferred.resolve({response:"automatically added by EME",licenseRequestId:c.id}),this.o9=!1},c.prototype.C9=function(c){var u=this.j9.getCDMData();return u?this.w9.msKeys.createSession("video/mp4",c,new Uint8Array(u)):this.w9.msKeys.createSession("video/mp4",c)},c.prototype.D9=function(c){var u=this,d={deferred:new g.Deferred,id:v.Util.generateUniqueId()};return c?(this.q9.then(function(){u.w9.msKeys?u.o9?d.deferred.reject({status:"postponed",licenseRequestId:d.id}):(0===c.byteLength&&u.l9.logger.log("no init data"),u.o9=!0,u.l9.logger.debug("create key session ("+d.id+") ..."),d.onKeyError=u.x9.bind(u,d),d.onKeyAdded=u.B9.bind(u,d),d.onKeyMessage=u.A9.bind(u,d),d.session=u.C9(new Uint8Array(c)),d.session.addEventListener(h.KeyError,d.onKeyError,!1),d.session.addEventListener(h.KeyAdded,d.onKeyAdded,!1),d.session.addEventListener(h.KeyMessage,d.onKeyMessage,!1),u.r9.push(d)):u.l9.logger.debug("video.keys not available.")}),d.deferred.promise):Promise.reject("no init data ("+d.id+")")},c.prototype.E9=function(c,u,d){this.o9=!1,c&&(this.l9.logger.debug("updating keySession ("+d+")"),this.u9[u].update(this.j9.prepareLicense(c)))},c.prototype.setWaitingForKeyListener=function(c){this.p9=c},c.prototype.setEncryptedListener=function(c){this.s9=c},c.prototype.load=function(c,u){var d=this;return this.j9=c,this.m9=u,this.k9=!1,this.u9={},this.q9=this.y9(),this.q9.then(function(){d.t9&&d.w9.removeEventListener(y.MediaElementEvent.error,d.t9),d.t9=d.x9.bind(d,null),d.w9.addEventListener(y.MediaElementEvent.error,d.t9)}).catch(function(){}),this.w9.addEventListener(y.MediaElementEvent.msneedkey,this.z9),this.q9},c.prototype.reInitialize=function(){this.w9.eventHandler.hasEventHandler(y.MediaElementEvent.msneedkey,this.z9)||this.w9.addEventListener(y.MediaElementEvent.msneedkey,this.z9),null==this.w9.msKeys?this.w9.msSetMediaKeys(this.v9):this.l9.logger.debug("Unable to reuse msKeys object as there already is an existing one on the video.")},c.prototype.F9=function(c){var u=c.getElementsByTagName("KID");if(!u)return null;for(var d="",p=0;p<u.length;p++){var h=u[p];h&&h.childNodes&&h.childNodes.length>0?d+=h.childNodes[0].nodeValue+";":h&&h.hasAttribute("value")?d+=h.getAttribute("value")+";":h&&h.hasAttribute("VALUE")?d+=h.getAttribute("VALUE")+";":this.l9.logger.debug("could not parse PlayReady KID",h)}return d.split(";")[0]||null},c.prototype.G9=function(c){var u=RegExp("p[\0]+l[\0]+a[\0]+y[\0]+r[\0]+e[\0]+a[\0]+d[\0]+y","gi"),d=RegExp("w[\0]+r[\0]+m[\0]+h[\0]+e[\0]+a[\0]+d[\0]+e[\0]+r","gi"),p=u.test(c)||d.test(c);if(!c.includes("<")||!p)return c;for(var h=c.slice(c.indexOf("<")),f="",m=0;m<h.length;m+=2)f+=h[m];try{var g=new DOMParser;return this.F9(g.parseFromString(f,"application/xml"))||c}catch{return this.l9.logger.debug("could not parse PlayReady PSSH XML, could be another cdm..."),c}},c.prototype.getKeyUuidsFromInitData=function(c){var u,d;return null!=(d=null==(u=this.j9)?void 0:u.getKeyUuidsFromInitData(c))?d:[]},c.prototype.getIdentifierFromInitData=function(c){return this.j9?this.j9.getIdentifierFromInitData(c):this.G9(c)},c.prototype.requestLicense=function(c,u){var d=this;return this.l9.logger.debug("request a new license for "+u+"..."),this.q9.then(function(){return d.l9.logger.debug("keySystem is ready, sending license request..."),d.D9(c).then(function(c){return{initDataStr:u,license:c.body,response:c.response,licenseRequestId:c.licenseRequestId}}).catch(function(c){return Promise.reject({initDataStr:u,statusCode:c.status,licenseRequestId:c.licenseRequestId,response:c})})}).catch(function(c){return Promise.reject(c)})},c.prototype.isLicenseRequestOngoing=function(){return this.o9},c.prototype.unload=function(){var c=this;this.k9=!0,this.w9.removeEventListener(y.MediaElementEvent.msneedkey,this.z9),this.w9.removeEventListener(y.MediaElementEvent.error,this.t9),this.r9.forEach(function(u){try{var d=u.session;d.removeEventListener(h.KeyError,u.onKeyError),d.removeEventListener(h.KeyAdded,u.onKeyAdded),d.removeEventListener(h.KeyMessage,u.onKeyMessage)}catch(u){c.l9.logger.debug("Could not destroy license request context",u)}});var u=Object.keys(this.u9||{}).map(function(u){return Promise.resolve(c.u9[u].close())});return this.u9={},this.j9=null,this.m9=null,this.r9=[],this.q9=null,this.p9=null,this.v9=null,Promise.all(u).catch(function(u){return c.l9.logger.debug("couldn't close key session!",u),Promise.resolve(null)})},c.prototype.suspend=function(){return Promise.resolve()},c}()},70581:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},f=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.UnprefixedEMEHandler=void 0,u.isUnprefixedEmeHandlerSupported=function(c){return window.navigator.requestMediaKeySystemAccess?window.navigator.requestMediaKeySystemAccess(c,[{initDataTypes:["cenc"],audioCapabilities:[{contentType:'audio/mp4;codecs="mp4a.40.2"'}],videoCapabilities:[{contentType:'video/mp4;codecs="avc1.4d401e"'}]},{initDataTypes:["cenc"],videoCapabilities:void 0,audioCapabilities:void 0}]):Promise.reject("no requestMediaKeySystemAccess call available")};var m,g=d(66790),v=d(40306),y=d(3336),b=d(25926),S=d(4224),_=d(3714),E=d(33468),T=d(48488),w=d(21513),P=d(74853),A=d(34841),I=d(70233),M=d(15487),R=d(19274),k=d(67579),x=d(92656),C=d(4358),O=d(55327),D=d(56068),L=d(6234);(p=m||(m={})).KeyMessage="message",p.KeyStatusChange="keystatuseschange",u.UnprefixedEMEHandler=function(){function c(c){var u=this;this.Ap=function(c,d){if(!u.tp)return u.closeSession(c),Promise.resolve(d);var p=u.pp.get(c);return p&&(p.loaded=!0),u.context.logger.debug("drm license response base64:",btoa(P.ArrayHelper.arrayBufferToAsciiString(d.body,!0))),u.Ip(d.body,c).then(function(){return u.context.logger.debug("keySession updated successfully"),d}).catch(function(c){return u.context.logger.warn("update() failed. reason: "+c),Promise.reject(c)})},this.encryptedEventHandler=function(c){c&&u.processMediaEncryptedEvent(c)},this.Jp=function(c){u.context.logger.debug("waiting for key..."),u.sp&&u.sp()},this.Np=function(c,d){switch(c){case D.MediaKeyStatus.Usable:u.context.logger.debug("key ".concat(d," is now usable"));break;case D.MediaKeyStatus.Expired:u.context.logger.debug("key ".concat(d," has expired."));break;case D.MediaKeyStatus.Pending:u.context.logger.debug("key ".concat(d," does not have a status yet, still pending"));break;case D.MediaKeyStatus.OutputRestricted:u.context.logger.debug("key ".concat(d," has restricted the output"));break;default:u.context.logger.debug("Status of key ".concat(d," changed to ").concat(c))}},this.Op=function(c){u.context.logger.debug("key status change...");var d,p=c.target,h=u.pp.get(p),f=u.Mp(p.keyStatuses),m=Object.values(f),g=Object.keys(f);if(h){var v=h.initDataStr;u.context.logger.debug("key session init data",v),u.Qp(f,btoa(v)),u.hasExpiredKeys(m)&&(u.closeSession(p),u.pp.delete(p),null==(d=u.context.store)||d.dispatch((0,C.removeLicense)({initDataStr:v})),u.context.logger.debug("Session key expired. Closing session ".concat(p.sessionId)));var y=!(!u.context.settings.CHECK_ALL_DRM_LICENSES_FOR_KID||!u.wp)&&(0,O.verifyKeysAreUsableOrPendingOnAnyLicense)(g,(0,E.keySystemUidToKind)(u.op),(0,O.getLicenseState)(u.wp));if(g.length>0&&y)u.context.logger.debug("all known keys of session either pending or still usable");else if(m.includes(D.MediaKeyStatus.OutputRestricted)){var b=Object.keys(f).filter(function(c){return f[c]===D.MediaKeyStatus.OutputRestricted});u.Pp(b,p,v)}}else u.context.logger.debug("failed to handle key status change, key session was removed",p)},this.context=c,this.mp=c.sourceContext.sourceIdentifier,this.pp=new Map,this.qp=[],this.rp=!1,this.np=null}return Object.defineProperty(c.prototype,"video",{get:function(){return this.context.videoElement},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"wp",{get:function(){return this.context.store.getState()},enumerable:!1,configurable:!0}),c.prototype.xp=function(c,u){var d=this,p=[],h=[];return u&&2===u.length&&(p=u[0]||[],h=u[1]||[]),c.hasOwnProperty("initDataTypes")||(c.initDataTypes=["cenc"]),c.hasOwnProperty("distinctiveIdentifier")||(c.distinctiveIdentifier="optional"),c.videoCapabilities&&c.videoCapabilities.length<1&&delete c.videoCapabilities,c.audioCapabilities&&c.audioCapabilities.length<1&&delete c.audioCapabilities,p&&p.length>0&&(c.audioCapabilities=c.audioCapabilities||[],c.audioCapabilities=c.audioCapabilities.concat(p),(this.up.audioRobustness||""===this.up.audioRobustness)&&c.audioCapabilities.forEach(function(c){c.robustness=d.up.audioRobustness})),h&&h.length>0&&(c.videoCapabilities=c.videoCapabilities||[],c.videoCapabilities=c.videoCapabilities.concat(h),(this.up.videoRobustness||""===this.up.videoRobustness)&&c.videoCapabilities.forEach(function(c){c.robustness=d.up.videoRobustness})),this.context.logger.debug("Prepared the MediaKeySystemConfig:",c),c},c.prototype.yp=function(c,u){void 0===u&&(u=!1);var d=h({},this.xp(this.lp.getMediaKeySystemConfiguration(),c));return(u||(0,w.default)().getState().capabilities.isTizen)&&(d.sessionTypes=[k.MediaKeySystemConfig.SessionType.Temporary]),[d,{initDataTypes:["cenc"],videoCapabilities:void 0,audioCapabilities:void 0,distinctiveIdentifier:d.distinctiveIdentifier,persistentState:d.persistentState,sessionTypes:d.sessionTypes}]},c.prototype.zp=function(c){var u=this,d=this.yp(c);return window.navigator.requestMediaKeySystemAccess(this.op,d).catch(function(){var d=u.yp(c,!0);return window.navigator.requestMediaKeySystemAccess(u.op,d)}).then(function(c){var d=c.getConfiguration();return u.context.store.dispatch((0,C.setPersistentState)(u.Cp(d))),u.np=d,c.createMediaKeys()})},c.prototype.Bp=function(c,u){var d=this;if(this.lp){this.rp=!0;var p=u.message,f=u.target,m=this.pp.get(f);m&&(m.expiration=f.expiration);var g=2===p.byteLength,v=btoa(P.ArrayHelper.arrayBufferToAsciiString(p,!0));this.context.logger.debug("drm license request base64:",v),this.lp.handleLicenseRequest(u).then(this.Ap.bind(this,f)).then(function(u){g||c.resolve(h(h({},u),{session:f,wasLicenseRestored:!1}))}).catch(function(u){d.context.logger.debug("license request failed, destroying keySession:"),d.closeSession(f),d.pp.delete(f),c.reject(u)})}else c.reject("session destroyed")},c.prototype.Cp=function(c){var u=c||this.np||{},d=u.persistentState,p=u.sessionTypes;return d===k.MediaKeySystemConfig.PersistentState.Required&&(void 0===p?[]:p).includes(k.MediaKeySystemConfig.SessionType.PersistentLicense)},c.prototype.Dp=function(c,u,d){var p=this.video.mediaKeysObject,h=this.Cp()?p.createSession(k.MediaKeySystemConfig.SessionType.PersistentLicense):p.createSession();return this.pp.set(h,{expiration:null,initData:c,initDataStr:u,loaded:!1,onKeyMessage:d}),h},c.prototype.Ep=function(c,u,d,p){var h=this;this.context.logger.debug("load stored session with sessionId: ".concat(d));var f=this.Bp.bind(this,p),g=this.Dp(c,u,f);return g.addEventListener(m.KeyStatusChange,this.Op),g.addEventListener(m.KeyMessage,f),g.load(d).then(function(c){c?(h.context.logger.debug("stored session: ".concat(g.sessionId," succesfully loaded")),p.resolve({session:g,wasLicenseRestored:!0})):(h.context.logger.debug("stored session: ".concat(g.sessionId," not loaded")),h.pp.delete(g))}).catch(function(c){h.context.logger.debug("stored session: ".concat(g.sessionId," not loaded"),c),p.reject(c),h.pp.delete(g)}),p.promise},c.prototype.Fp=function(c,u,d){var p=this,h=this.Bp.bind(this,d),f=this.Dp(c,u,h);return f.addEventListener(m.KeyStatusChange,this.Op),f.addEventListener(m.KeyMessage,h),f.generateRequest("cenc",c).catch(function(c){p.pp.delete(f),d.reject(c),p.context.eventHandler.fireError(new y.PlayerError(v.ErrorCode.DRM_KEY_SESSION_INITIALIZATION_FAILED,{reason:c,licenseInitDataString:u},"Unable to initialize DRM key session: `MediaKeySession.generateRequest` failed.",p.mp))}),d.promise},c.prototype.setMediaKeys=function(c){var u=this,d=new A.Deferred;return this.video.mediaKeysPromise=(this.video.mediaKeysPromise||Promise.resolve()).then(function(){var p=u.video.setMediaKeys(c)||Promise.resolve();return d.resolve(p),p.then(function(){return u.context.logger.debug("MediaKeys ".concat(null===c?"reset":"set"," successfully"))}).catch(function(c){return u.context.logger.debug("Could not set MediaKeys:",c),Promise.reject(c)})}),d.promise},c.prototype.Gp=function(c){c||this.context.eventHandler.dispatchEvent(_.PlayerEvent.Warning,new b.PlayerWarning(S.WarningCode.DRM_SERVER_CERTIFICATE_NOT_SUPPORTED))},c.prototype.onServerCertificateSetFailed=function(c,u,d){d.reason=u instanceof Error?u.message:"unknown error",this.context.eventHandler.fireError(new y.PlayerError(v.ErrorCode.DRM_CERTIFICATE_ERROR,d,"Unable to setup the key system: `MediaKeys.setServerCertificate` failed.",this.mp))},c.prototype.Hp=function(c,u){var d=this;this.up.serverCertificate&&c&&c.setServerCertificate(this.up.serverCertificate).then(function(c){return d.Gp(c)}).catch(function(p){return d.onServerCertificateSetFailed(c,p,u)})},c.prototype.setupKeySystem=function(c){var u=this,d={drmCapabilities:c,keySystem:this.op,eme:"unprefixed"};return this.zp(c).then(function(c){return d.createdMediaKeys=c,null===u.op?(u.context.logger.debug("EMEHandler was unloaded during key-system creation"),Promise.reject(Error(g.DrmSetupError.CANCELLED))):(u.video.mediaKeysObject=c,u.Hp(c,d),u.setMediaKeys(c))}).catch(function(c){var p;return(null==c?void 0:c.message)!==g.DrmSetupError.CANCELLED&&(d.reason=null!=(p=null==c?void 0:c.message)?p:c,u.context.eventHandler.fireError(new y.PlayerError(v.ErrorCode.DRM_MEDIA_KEY_INITIALIZATION_FAILED,d,"Unable to initialize the DRM key system with the specified combinations.",u.mp))),Promise.reject(c)})},c.prototype.Ip=function(c,u){return this.rp=!1,c&&this.lp?(this.qp.includes(u)||this.qp.push(u),u.update(this.lp.prepareLicense(c))):Promise.reject()},c.prototype.processMediaEncryptedEvent=function(c){var u=this;this.context.logger.debug("encrypted event for initData: "+String.fromCharCode.apply(null,new Uint8Array(c.initData)));var d=(0,L.parseInitData)(c.initData);d&&d.length&&this.vp&&d.forEach(function(c){return u.vp(c)})},c.prototype.hasExpiredKeys=function(c){return c.some(function(c){return c===D.MediaKeyStatus.Expired})},c.prototype.Kp=function(c){var u=new Uint8Array(c instanceof ArrayBuffer?c:c.buffer);return(0,E.keySystemUidToKind)(this.op)===E.KeySystemKind.PLAYREADY&&(0,M.isEdge)()&&x.PlayReady.kidToCENC(u),I.FormatHelper.bytesToUUID(u)},c.prototype.Lp=function(c,u){var d="",p="";return"string"==typeof c?(d=this.Kp(u),p=String(c)):"string"==typeof u?(d=this.Kp(c),p=String(u)):this.context.logger.debug("could not parse key id and status",typeof c,typeof u),[d,p]},c.prototype.Mp=function(c){var u=this,d={};return c.forEach(function(c,p){var h=u.Lp(c,p),f=h[0],m=h[1];d[f]=m}),d},c.prototype.Pp=function(c,u,d){var p,h=this;this.context.eventHandler.dispatchEvent(_.PlayerEvent.Warning,new b.PlayerWarning(S.WarningCode.DRM_RESTRICTED_OUTPUT,"Output restricted for "+c.join(", "))),c.forEach(function(c){var u;return null==(u=h.context.store)?void 0:u.dispatch((0,T.trackDrmKidError)(c))}),this.closeSession(u),this.pp.delete(u),null==(p=this.context.store)||p.dispatch((0,C.removeLicense)({initDataStr:d}))},c.prototype.Qp=function(c,u){var d=this;Object.keys(c).forEach(function(p){var h,f,m=c[p];null==(h=d.context.store)||h.dispatch((0,C.setMediaKeyStatus)((0,E.keySystemUidToKind)(d.op),p,m,u)),m===D.MediaKeyStatus.InternalError&&(null==(f=d.context.store)||f.dispatch((0,T.trackDrmKidError)(p))),d.Np(m,p)})},c.prototype.unload=function(){var c,u=this,d=[];this.pp.forEach(function(c,u){return d.push(u)}),this.video.removeEventListener(R.MediaElementEvent.waitingforkey,this.Jp),this.video.removeEventListener(R.MediaElementEvent.encrypted,this.encryptedEventHandler);var p=d.map(function(c){var d=u.closeSession(c);return u.qp.includes(c)?d:Promise.resolve()});this.lp=null,this.pp=new Map,this.qp=[],this.op=null,this.sp=null,this.video.mediaKeysObject=null;var h=null==(c=this.tp)?void 0:c.catch(function(c){return u.context.logger.debug("Caught key system promise rejection:",c)}).finally(function(){return u.tp=void 0});return Promise.all(f(f([],p,!0),[h],!1)).then(function(){return u.setMediaKeys(null).catch(function(c){u.context.logger.debug("couldn't remove media keys!",c)})}).catch(function(c){u.context.logger.debug("couldn't close key session!",c)})},c.prototype.closeSession=function(c){var u=this,d=this.pp.get(c);return d&&(c.removeEventListener(m.KeyStatusChange,this.Op),c.removeEventListener(m.KeyMessage,d.onKeyMessage)),Promise.race([c.closed,c.close()]).catch(function(c){u.context.logger.debug("couldn't close session on unload",c)})},c.prototype.load=function(c,u,d,p){return this.lp=c,this.op=u,this.up=d[(0,E.keySystemUidToKind)(u)],this.video.addEventListener(R.MediaElementEvent.encrypted,this.encryptedEventHandler),this.video.addEventListener(R.MediaElementEvent.waitingforkey,this.Jp),this.tp=this.setupKeySystem(p),this.tp},c.prototype.Rp=function(c){var u=!1;return this.pp.forEach(function(d){return u=u||d.initData===c}),u},c.prototype.reInitialize=function(){this.video.eventHandler.hasEventHandler(R.MediaElementEvent.encrypted,this.encryptedEventHandler)||this.video.addEventListener(R.MediaElementEvent.encrypted,this.encryptedEventHandler),this.video.eventHandler.hasEventHandler(R.MediaElementEvent.waitingforkey,this.Jp)||this.video.addEventListener(R.MediaElementEvent.waitingforkey,this.Jp)},c.prototype.Sp=function(c){if(!this.wp)return!1;for(var u=(0,E.keySystemUidToKind)(this.op),d=(0,O.getLicenseState)(this.wp).drmData[u],p=0,h=Object.keys(d);p<h.length;p++){var f=d[h[p]];if(f.sessionId===c)return void 0===f.usedByPlayerId||f.usedByPlayerId===this.context.internalPlayerID}return!1},c.prototype.Tp=function(c,u,d,p){return c?this.Rp(c)?(p.reject({message:"session for requested initData already present"}),p.promise):d&&this.Cp()&&this.Sp(d)?this.Ep(c,u,d,p):this.Fp(c,u,p):(p.reject({message:"no initData provided for license request"}),p.promise)},c.prototype.eq=function(){return new A.Deferred},c.prototype.requestLicense=function(c,u,d){var p=this;this.rp=!0,this.context.logger.debug("request a new license for ".concat(u," ..."));var h=this.eq();return this.tp.then(function(){return null===p.video.mediaKeysObject?Promise.reject(Error(g.DrmSetupError.CANCELLED)):p.Tp(c,u,d,h)}).then(function(c){p.rp=!1;var d=c.session,h=void 0===d?{}:d;return{initDataStr:u,license:c.wasLicenseRestored?null:c.body,sessionInfo:{sessionId:h.sessionId,expiration:h.expiration},restoredFromPersistentLicense:c.wasLicenseRestored}}).catch(function(c){return p.rp=!1,Promise.reject({response:c,initDataStr:u})})},c.prototype.getKeyUuidsFromInitData=function(c){var u,d;return null!=(d=null==(u=this.lp)?void 0:u.getKeyUuidsFromInitData(c))?d:[]},c.prototype.getIdentifierFromInitData=function(c){return this.lp?this.lp.getIdentifierFromInitData(c):c},c.prototype.isLicenseRequestOngoing=function(){return this.rp},c.prototype.setWaitingForKeyListener=function(c){this.sp=c},c.prototype.setEncryptedListener=function(c){this.vp=c},c.prototype.suspend=function(){return Promise.resolve()},c.prototype.disposeSessionForInitData=function(c){var u=this,d=[];
129return this.pp.forEach(function(p,h){p.initDataStr===c&&(d.push(u.closeSession(h).then(function(){u.context.logger.debug("Closed session "+h.sessionId)})),u.qp=u.qp.filter(function(c){return c.sessionId!==h.sessionId}),u.pp.delete(h))}),d.length<1?Promise.reject("Unable to find an existing drm session for "+c):Promise.all(d)},c}()},80680:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.WebKitPrefixedEMEHandler=void 0,u.isWebkitPrefixedEmeHandlerSupported=function(c,u){return"function"==typeof c.getWrappedElement().webkitGenerateKeyRequest&&"function"==typeof c.canPlayType&&c.canPlayType("video/mp4",u)?Promise.resolve({keySystem:u}):Promise.reject("DOMException: Unsupported keySystem")};var p,h,f,m,g=d(40306),v=d(3336),y=d(34841),b=d(19274),S=d(6234);(p=f||(f={}))[p.Domain=6]="Domain",(h=m||(m={}))[h.HDCP=0x48444350]="HDCP",u.WebKitPrefixedEMEHandler=function(){function c(c){var u=this;this.mq=function(c){if(u.context.logger.debug("key needed..."),u.gq&&u.gq(),c){var d=(0,S.parseInitData)(c.initData);d&&d.length&&u.jq&&u.invokeEncryptedListener(c.initData,d)}},this.context=c,this.hq=c.sourceContext.sourceIdentifier,this.video=c.videoElement,this.iq=[],this.lq=[]}return c.prototype.invokeEncryptedListener=function(c,u){var d=this;u.forEach(function(c){return d.jq(c)})},c.prototype.nq=function(c,u,d){this.iq.includes(d)&&this.iq.splice(this.iq.indexOf(d)),this.context.logger.debug("keySystem: "+this.selectedKeySystem+", license: "+c+", KID: "+u+", sessionId: "+d),this.video.webkitAddKey(this.selectedKeySystem,c,u,d)},c.prototype.oq=function(c,u,d){this.fq=!1,null!==c?this.nq(this.keySystem.prepareLicense(c),u,d):this.context.logger.debug("Empty license response")},c.prototype.pq=function(c,u){null!==c&&c.deferred.reject();var d=u.target||{},p=d.error||d.errorCode||{},h=p.code,y=p.systemCode;this.context.logger.debug("A decryption key error was encountered:",{error:p,code:h,systemCode:y}),h===f.Domain&&y===m.HDCP?this.context.eventHandler.fireError(new v.PlayerError(g.ErrorCode.DRM_RESTRICTED_OUTPUT,void 0,void 0,this.hq)):this.context.eventHandler.fireError(new v.PlayerError(g.ErrorCode.DRM_KEY_ERROR,{code:h,systemCode:y},void 0,this.hq))},c.prototype.qq=function(c,u){this.context.logger.debug("key added for kid ".concat(c.kid)),c&&c.license&&c.deferred.resolve(c.license),c&&c.onKeyError&&this.video.removeEventListener(b.MediaElementEvent.webkitkeyerror,c.onKeyError)},c.prototype.rq=function(c,u){var d=this,p=u.sessionId;u.kid=c.kid,this.iq.includes(p)?this.context.logger.debug("Session ".concat(p," already handled, ignoring...")):(this.iq.push(p),this.fq=!0,this.keySystem.handleLicenseRequest
vendor: 4,889 bytes, line 129
129(u).then(function(u){d.oq(u.body,u.kid||c.initData,p),c.license=u}).catch(function(u){return c.deferred.reject(u)}))},c.prototype.sq=function(c,u){var d=this,p={kid:u,initData:c,deferred:new y.Deferred};return this.lq.push(p.deferred),p.onKeyError=this.pq.bind(this,p),p.onKeyAdded=this.qq.bind(this,p),p.onKeyMessage=this.rq.bind(this,p),this.video.addEventListener(b.MediaElementEvent.webkitkeyerror,p.onKeyError),this.video.addEventListener(b.MediaElementEvent.webkitkeyadded,p.onKeyAdded),this.video.addEventListener(b.MediaElementEvent.webkitkeymessage,p.onKeyMessage),this.video.webkitGenerateKeyRequest(this.selectedKeySystem,new Uint8Array(c)),p.deferred.promise.finally(function(){d.video.removeEventListener(b.MediaElementEvent.webkitkeyerror,p.onKeyError),d.video.removeEventListener(b.MediaElementEvent.webkitkeyadded,p.onKeyAdded),d.video.removeEventListener(b.MediaElementEvent.webkitkeymessage,p.onKeyMessage),d.tq(p.deferred)}),p.deferred.promise},c.prototype.tq=function(c){var u=this.lq.findIndex(function(u){return u===c});this.lq.splice(u,1)},c.prototype.unload=function(){var c;return this.kq&&this.video.removeEventListener(b.MediaElementEvent.webkitkeyerror,this.kq),this.lq.forEach(function(c){c.reject("unloading the WebKITPrefixedEMEHandler")}),this.lq=[],this.video.removeEventListener(b.MediaElementEvent.webkitneedkey,this.mq),this.selectedKeySystem=null,null==(c=this.keySystem)||c.dispose(),this.keySystem=null,this.gq=null,Promise.resolve()},c.prototype.load=function(c,u){return this.keySystem=c,this.selectedKeySystem=u,this.kq&&this.video.removeEventListener(b.MediaElementEvent.webkitkeyerror,this.kq),this.kq=this.pq.bind(this,null),this.video.addEventListener(b.MediaElementEvent.webkitneedkey,this.mq),this.video.addEventListener(b.MediaElementEvent.webkitkeyerror,this.kq),Promise.resolve()},c.prototype.reInitialize=function(){},c.prototype.requestLicense=function(c,u){var d=this;return this.fq=!0,this.context.logger.debug("request a new license for "+u+"..."),this.sq(c).then(function(c){return d.fq=!1,{initDataStr:u,license:c.body}}).catch(function(c){return d.fq=!1,Promise.reject({initDataStr:u,statusCode:c.status,response:c})})},c.prototype.getKeyUuidsFromInitData=function(c){var u,d;return null!=(d=null==(u=this.keySystem)?void 0:u.getKeyUuidsFromInitData(c))?d:[]},c.prototype.getIdentifierFromInitData=function(c){return this.keySystem?this.keySystem.getIdentifierFromInitData(c):c},c.prototype.isLicenseRequestOngoing=function(){return this.fq},c.prototype.setWaitingForKeyListener=function(c){this.gq=c},c.prototype.setEncryptedListener=function(c){this.jq=c},c.prototype.suspend=function(){return Promise.resolve()},c}()},92656:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.PlayReady=u.EMPTY_KEY_MESSAGE=void 0;var h=d(40306),f=d(3336),m=d(25926),g=d(4224),v=d(3714),y=d(57456),b=d(29669),S=d(51682),_=d(74853),E=d(70233),T=d(67579),w=d(46658),P="<WRMHEADER";function A(c){var u="string"==typeof c?new DOMParser().parseFromString(c,"application/xml"):c;if(!u)return null;var d=u.getElementsByTagName("LA_URL");return d.length>0?d.item(0).textContent:null}u.EMPTY_KEY_MESSAGE="KeyMessageWasEmpty";var I=function(){function c(c,u){var d=this;this.context=c,this.yq=function(c,u){(d.context.logger.debug("PlayReady license request failed: ".concat(null==u?void 0:u.name,". Response:"),null==c?void 0:c.body),null!==c)?d.xq(null==c?void 0:c.status)?(d.context.logger.debug("Retrying other KIDs",c),d.context.eventHandler.dispatchEvent(v.PlayerEvent.Warning,new m.PlayerWarning(g.WarningCode.DRM_FAILED_LICENSE_REQUEST,"License request failed, retrying with other keys.",{responseCode:null==c?void 0:c.status,responseText:null==c?void 0:c.statusText,serverResponse:null==c?void 0:c.body}))):d.context.eventHandler.fireError(new f.PlayerError(h.ErrorCode.DRM_FAILED_LICENSE_REQUEST,{statusCode:null==c?void 0:c.status,statusText:null==c?void 0:c.statusText,serverResponse:null==c?void 0:c.body},"Failed to load the PlayReady DRM license: ".concat(null==c?void 0:c.status," ").concat(null==c?void 0:c.statusText,"."),d.uq)):d.context.logger.debug("Playready license failed without specific reason",c,u)},this.uq=c.sourceContext.sourceIdentifier,this.vq=u,c.logger.debug("Using DRM key system: PlayReady"),this.wq=new w.ParallelContentLoader(c,{onFailure:this.yq,maxRetries:u.maxLicenseRequestRetries,retryDelay:u.licenseRequestRetryDelay,requestType:b.HttpRequestType.DRM_LICENSE_PLAYREADY})}return c.getPlaintextChallengeText=function(c,u){var d=c.getElementsByTagName("Challenge")[0];if(d.hasOwnProperty("innerHTML"))return'<Challenge xmlns="http://schemas.microsoft.com/DRM/2007/03/
129protocols/messages">'+d.innerHTML+"</Challenge>";var p=u.indexOf("<Challenge"),h=u.indexOf("</Challenge>")+12;return u.substring(p,h)},c.prototype.xq=function(c){return!!this.vq.retryOtherKeysOnHttpStatusCode&&this.vq.retryOtherKeysOnHttpStatusCode.includes(c)},c.prototype.zq=function(d){var p,m=d.message.buffer||d.message,g=this.vq.hasOwnProperty("utf8message")&&this.vq.utf8message,v=_.ArrayHelper.arrayBufferToAsciiString(m,g);if(0===v.length)return this.context.logger.debug("MediaKeyMessageEvent contained an empty message, skipping"),u.EMPTY_KEY_MESSAGE;this.context.logger.debug(v);var y=new DOMParser().parseFromString(v,"application/xml");if(y.getElementsByTagName("Challenge")[0])if(this.vq.hasOwnProperty("plaintextChallenge")&&this.vq.plaintextChallenge)p='<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><AcquireLicense xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols"><challenge>'+c.getPlaintextChallengeText(y,v)+"</challenge></AcquireLicense></soap:Body></soap:Envelope>";else{var b=y.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;b&&(p=window.atob(b))}else this.context.logger.log("TODO: playready update needed, not implemented yet");var S={},E=v.match(/<HttpHeaders>.*<\/HttpHeaders>/);if(E&&1===E.length){var T=E[0].match(/<name>([^<]+?)<\/name>/g),w=E[0].match(/<value>([^<]+?)<\/value>/g);if(null===T||null===w||T.length!==w.length)return this.context.eventHandler.fireError(new f.PlayerError(h.ErrorCode.DRM_PLAYREADY_INVALID_HEADER_KEY_VALUE_PAIR,{headerNameListEmpty:null===T,headerValueListEmpty:null===w,headerPairLengthMismatch:(null==T?void 0:T.length)!==(null==w?void 0:w.length)},"An invalid key/value pair was encountered while parsing the PlayReady license request headers.",this.uq)),null;for(var P=0;P<T.length;P++)S[T[P].replace(/<\/?name>/g,"")]=w[P].replace(/<\/?value>/g,"")}return{challenge:p,laURL:this.vq.LA_URL||d.destinationURL||d.defaultURL||A(y)||A(p),headers:S}},c.prototype.handleLicenseRequest=function(c){var d=this.zq(c);if(d===u.EMPTY_KEY_MESSAGE)return Promise.reject(u.EMPTY_KEY_MESSAGE);if(!d||!d.laURL)return Promise.reject("no LA URL given");if(!("forceSSL"in this.vq)||this.vq.forceSSL){var p=document.createElement("a");p.href=d.laURL,p.protocol="https:",d.laURL=p.href}return d.headers=y.XhrHelper.mergeHeaders(d.headers,this.vq.headers||{}),this.wq.load(d.laURL,b.HttpRequestMethod.POST,b.HttpResponseType.ARRAYBUFFER,d.challenge,d.headers,this.vq.withCredentials)},c.prototype.prepareLicense=function(c){try{return new Uint8Array(c)}catch{return this.context.eventHandler.fireError(new f.PlayerError(h.ErrorCode.DRM_KEY_ERROR,{reason:"Unable to construct a Uint8Array from the license response"},void 0,this.uq)),null}},c.prototype.getCDMData=function(){if(this.vq&&this.vq.customData){for(var u=[],d=0;d<this.vq.customData.length;++d)u.push(this.vq.customData.charCodeAt(d)),u.push(0);var p=String.fromCharCode.apply(null,u);p=btoa(p);var h=c.PRCDMData.replace("%PROACTIVE%",!!this.vq.proactiveLicense+"").replace("%CUSTOMDATA%",p),f=[];for(d=0;d<h.length;
vendor: 11,422 bytes, line 129
129++d)f.push(h.charCodeAt(d)),f.push(0);return new Uint8Array(f).buffer}return null},c.getPlayreadyRecordsFromWrmHeader=function(c,u){for(var d=0,p=[],h=_.ArrayHelper.sparseArrayBufferToAsciiString(c.buffer,2,u);d<h.length;){var f=h.indexOf(P,d),m=h.indexOf("WRMHEADER>",f);if(f>=0&&m>f&&d<m){var g=u+2*f,v=u+2*m+20;p.push({type:1,value:c.buffer.slice(g,v)}),d=m}else d=h.length}return p},c.getPlayReadyRecordsFromPlayreadyObject=function(c,u){var d=u+4,p=[],h=new DataView(c.buffer),f=h.getUint16(d,!0);d+=2;for(var m=0;m<f;m++){var g=h.getUint16(d,!0);d+=2;var v=h.getUint16(d,!0);d+=2;var y={type:g,value:c.buffer.slice(d,d+v)};p.push(y),d+=v}return p},c.isValidPlayReadyObject=function(c,u){var d=new DataView(c.buffer,u);return!(d.getUint32(0,!0)>d.byteLength)&&P.split("").map(function(c){return c.charCodeAt(0)}).some(function(c,u){return d.getUint16(u,!0)!==c})},c.getPlayReadyRecords=function(c,u){return this.isValidPlayReadyObject(c,u)?this.getPlayReadyRecordsFromPlayreadyObject(c,u):this.getPlayreadyRecordsFromWrmHeader(c,u)},c.parsePlayReadyRecord=function(c,u){if(1!==c.type)return null;try{return new DOMParser().parseFromString(_.ArrayHelper.sparseArrayBufferToAsciiString(c.value),"application/xml")}catch(d){return null!==u&&u.logger.debug("could not parse PlayReady PSSH XML",d,c),null}},c.parseWrmHeader=function(c,u,d){var p=this;return void 0===d&&(d=null),this.getPlayReadyRecords(c,u).map(function(c){return p.parsePlayReadyRecord(c,d)}).filter(function(c){return null!==c})},c.prototype.Aq=function(c){var u=_.ArrayHelper.stringToArrayWithoutEncoding(c);return this.parsePlayReadyInitDataBuffer(u.buffer)},c.prototype.parsePlayReadyInitDataBuffer=function(u){for(var d=new DataView(u),p="",h=S.ISOBMFFConstants.BOX_SIZE_LENGTH,f=0;f<S.ISOBMFFConstants.BOX_TYPE_LENGTH;f++)p+=String.fromCharCode(d.getInt8(h+f));if("pssh"===p){h+=S.ISOBMFFConstants.BOX_TYPE_LENGTH;var m=d.getUint8(h);h+=S.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+S.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH+S.ISOBMFFConstants.PSSH_SYSTEM_ID_LENGTH,m>0&&(h+=4+d.getUint32(h)*S.ISOBMFFConstants.PSSH_KID_LEN),h+=4}return c.parseWrmHeader(new Uint8Array(u),h,this.context)},c.extractKeyIdsFromPlayReadyHeaders=function(c,u){for(var d=[],p=0;p<c.length;p++){var h=c[p].getElementsByTagName("KID");if(h&&h.length>0)for(var f=0;f<h.length;f++){var m=h[f];m&&m.childNodes&&m.childNodes.length>0?d.push(m.childNodes[0].nodeValue):m&&m.hasAttribute("value")?d.push(m.getAttribute("value")):m&&m.hasAttribute("VALUE")?d.push(m.getAttribute("VALUE")):u&&u.logger.debug("could not parse PlayReady KID",m)}}return d},c.prototype.getKeyUuidsFromInitData=function(u){return c.extractKeyIdsFromPlayReadyHeaders(this.parsePlayReadyInitDataBuffer(u),this.context).map(function(c){return atob(c)}).map(function(c){return _.ArrayHelper.stringToArrayWithoutEncoding(c)}).map(function(u){var d=new Uint8Array(u);return c.kidToCENC(d),d}).map(function(c){return E.FormatHelper.bytesToUUID(c)})},c.prototype.getIdentifierFromInitData=function(u){if(!u.includes("<"))return u;var d=this.Aq(u),p=c.extractKeyIdsFromPlayReadyHeaders(d,this.context);return p&&p.length>0?p.join(";"):u},c.prototype.getMediaKeySystemConfiguration=function(){var c=this.vq.mediaKeySystemConfig,u={persistentState:T.MediaKeySystemConfig.PersistentState.Optional,sessionTypes:[T.MediaKeySystemConfig.SessionType.Temporary]};return"object"==typeof c?p(p({},u),c):u},c.swapBytes=function(c,u,d){var p=c[d];c[d]=c[u],c[u]=p},c.kidToCENC=function(u){c.swapBytes(u,0,3),c.swapBytes(u,1,2),c.swapBytes(u,4,5),c.swapBytes(u,6,7)},c.prototype.dispose=function(){this.vq=null,this.wq.dispose()},c.PRCDMData='<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0" Proactive="%PROACTIVE%"><CustomData encoding="base64encoded">%CUSTOMDATA%</CustomData></LicenseAcquisition></PlayReadyCDMData>',c}();u.PlayReady=I},25271:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.PrimeTime=void 0;var p=d(40306),h=d(3336),f=d(4129),m=d(29669);u.PrimeTime=function(){function c(c,u){var d=this;this.context=c,this.V9=function(c,u){d.context.logger.debug("PrimeTime license request failed: ".concat(u.name,". Response:"),c.body),d.context.eventHandler.fireError(new h.PlayerError(p.ErrorCode.DRM_FAILED_LICENSE_REQUEST,{statusCode:c.status,statusText:c.statusText,serverResponse:c.body},"Failed to load the PrimeTime DRM license: ".concat(c.status," ").concat(c.statusText,"."),d.S9))},this.S9=c.sourceContext.sourceIdentifier,this.T9=u,c.logger.debug("Using DRM key system: PrimeTime"),this.U9=new f.DefaultContentLoader(c,{onFailure:this.V9,maxRetries:u.maxLicenseRequestRetries,retryDelay:u.licenseRequestRetryDelay,requestType:m.HttpRequestType.DRM_LICENSE_PRIMETIME})}return c.prototype.handleLicenseRequest=function(u){var d,p,h=u.message;switch(this.T9.headers&&Object.keys(this.T9.headers).length>0&&(d=this.T9.headers),u.messageType){case c.INDIVIDUALIZATION_REQUEST:p=this.T9.indivURL||this.T9.LA_URL;break;case c.LICENSE_REQUEST:case c.LICENSE_RELEASE:p=this.T9.LA_URL;break;default:this.context.logger.debug("unknown license request type, assuming license-request"),p=this.T9.LA_URL}return this.U9.load(p,m.HttpRequestMethod.POST,m.HttpResponseType.ARRAYBUFFER,h,d,this.T9.withCredentials,"application/json")},c.prototype.prepareLicense=function(c){return new Uint8Array(c)},c.prototype.getCDMData=function(){return null},c.prototype.getKeyUuidsFromInitData=function(c){return[]},c.prototype.getIdentifierFromInitData=function(c){return c},c.prototype.getMediaKeySystemConfiguration=function(){var c=this.T9.mediaKeySystemConfig;return"object"==typeof c?c:{}},c.prototype.dispose=function(){this.T9=null,this.U9.dispose(),this.U9=null},c.INDIVIDUALIZATION_REQUEST="individualization-request",c.LICENSE_REQUEST="license-request",c.LICENSE_RELEASE="license-release",c}()},31884:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.TVKey=void 0;var h=d(40306),f=d(3336),m=d(4129),g=d(29669),v=d(74853),y=d(67579),b=d(92378);u.TVKey=function(){function c(c,u){var d=this;this.context=c,this.tvkeyConfig=u,this.P9=function(c,u){d.context.logger.debug("TVKey license request failed: ".concat(u.name,". Response:"),c.body),d.context.eventHandler.fireError(new f.PlayerError(h.ErrorCode.DRM_FAILED_LICENSE_REQUEST,{responseCode:c.status,responseText:c.statusText,serverResponse:c.body},"Failed to load the TVKey DRM license: ".concat(c.status," ").concat(c.statusText,"."),d.context.sourceContext.sourceIdentifier))},c.logger.debug("Using DRM key system: TVKey"),this.O9=new m.DefaultContentLoader(c,{onFailure:this.P9,maxRetries:u.maxLicenseRequestRetries,requestType:g.HttpRequestType.DRM_LICENSE_TVKEY})}return c.prototype.Q9=function(c){if("function"==typeof this.tvkeyConfig.prepareMessage)return this.tvkeyConfig.prepareMessage(c);var u=new Uint8Array(c.message),d=v.ArrayHelper.convertBufferSourceToUTF8(u);return'{"OttLicenseRequestMessage":'.concat(d,"}")},c.prototype.R9=function(){var c=this.tvkeyConfig.headers||{};return p({"Content-Type":"application/json"},c)},c.prototype.handleLicenseRequest=function(c){if(!this.tvkeyConfig.LA_URL)return Promise.reject(Error("No LA URL given"));var u=this.Q9(c),d=this.R9();return this.O9.load(this.tvkeyConfig.LA_URL,g.HttpRequestMethod.POST,g.HttpResponseType.TEXT,u,d,this.tvkeyConfig.withCredentials,"application/json")},c.prototype.prepareLicense=function(c){return"function"==typeof this.tvkeyConfig.prepareLicense?this.tvkeyConfig.prepareLicense(c):"string"==typeof c?v.ArrayHelper.stringToArrayWithoutEncoding(c):new Uint8Array(c)},c.prototype.getCDMData=function(){return null},c.prototype.getKeyUuidsFromInitData=function(c){return(0,b.parseKidsFromTVKeyPssh)(c,this.context.logger)},c.prototype.getIdentifierFromInitData=function(c){try{var u=v.ArrayHelper.stringToArrayWithoutEncoding(c),d=(0,b.parseKidsFromTVKeyPssh)(u.buffer,this.context.logger);return d.length?d.join(";"):c}catch(u){return this.context.logger.debug("Failed to extract key IDs for TVKey identifier:",u),c}},c.prototype.getMediaKeySystemConfiguration=function(){var c;return p({persistentState:y.MediaKeySystemConfig.PersistentState.Optional,sessionTypes:[y.MediaKeySystemConfig.SessionType.Temporary]},null!=(c=this.tvkeyConfig.mediaKeySystemConfig)?c:{})},c.prototype.dispose=function(){this.O9.dispose()},c}()},81982:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.Widevine=void 0;var h=d(40306),f=d(3336),m=d(25926),g=d(4224),v=d(3714),y=d(29669),b=d(48488),S=d(67579),_=d(46658),E=d(51063);u.Widevine=function(){function c(c,u){var d=this;this.context=c,this.b9=function(c,u){d.context.logger.debug("Widevine license request failed: ".concat(u.name,". Response:"),c.body),d.a9(c.status)?d.context.eventHandler.dispatchEvent(v.PlayerEvent.Warning,new m.PlayerWarning(g.WarningCode.DRM_FAILED_LICENSE_REQUEST,"License request failed, retrying with other keys.",{responseCode:c.status,responseText:c.statusText,serverResponse:c.body})):d.context.eventHandler.fireError(new f.PlayerError(h.ErrorCode.DRM_FAILED_LICENSE_REQUEST,{responseCode:c.status,responseText:c.statusText,serverResponse:c.body},"Failed to load the Widevine DRM license: ".concat(c.status," ").concat(c.statusText,"."),d.W9))},this.W9=c.sourceContext.sourceIdentifier,this.X9=u,this.Z9=new Map,c.logger.debug("Using DRM key system: Widevine"),this.Y9=new _.ParallelContentLoader(c,{onFailure:this.b9,maxRetries:u.maxLicenseRequestRetries,retryDelay:u.licenseRequestRetryDelay,requestType:y.HttpRequestType.DRM_LICENSE_WIDEVINE})}return c.prototype.a9=function(c){return this.X9.retryOtherKeysOnHttpStatusCode?this.X9.retryOtherKeysOnHttpStatusCode.includes(c):!(!this.X9.retryOtherKeysOnForbiddenLicense||403!==c)},c.prototype.c9=function(c){return"function"==typeof this.X9.prepareMessage?this.X9.prepareMessage(c):c.message},c.prototype.d9=function(){return this.X9.headers&&Object.keys(this.X9.headers).length>0?this.X9.headers:void 0},c.prototype.e9=function(c){var u=(0,E.parseWidevineLicenseRequestProtoBuf)(c);void 0!==u&&this.Z9.set(u.requestId,u.requestedKeyIds)},c.prototype.handleLicenseRequest=function(c){if(!this.X9.LA_URL)return Promise.reject("no LA URL given");var u=this.c9(c),d=this.d9();return this.e9(u),this.Y9.load(this.X9.LA_URL,y.HttpRequestMethod.POST,y.HttpResponseType.ARRAYBUFFER,u,d,this.X9.withCredentials,"application/json")},c.prototype.f9=function(c){var u;if("function"==typeof this.X9.prepareLicense){var d=this.X9.prepareLicense({license:c});return null!=(u=null==d?void 0:d.license)?u:void 0}},c.prototype.g9=function(c){var u=new Uint8Array(c);return this.f9(u)??u},c.prototype.h9=function(c){this.context.logger.debug("No DRM license received for key ID ".concat(c)),this.context.store.dispatch((0,b.trackDrmKidError)(c))},c.prototype.i9=function(c){var u,d=this,p=(0,E.parseWidevineLicenseResponseProtoBuf)(c);void 0!==p&&(null!=(u=this.Z9.get(p.requestId))?u:[]).filter(function(c){return!p.returnedKeyIds.includes(c)}
129).forEach(function(c){return d.h9(c)})},c.prototype.prepareLicense=function(c){return this.i9(c),this.g9(c)},c.prototype.getCDMData=function(){return null},c.prototype.getKeyUuidsFromInitData=function(c){return(0,E.parseKidsFromWidevinePssh)(c)},c.prototype.getIdentifierFromInitData=function(c){return c},c.prototype.getMediaKeySystemConfiguration=function(){var c,u=this.X9.mediaKeySystemConfig,d=null==(c=null==u?void 0:u.sessionTypes)?void 0:c.includes(S.MediaKeySystemConfig.SessionType.PersistentLicense),h={persistentState:S.MediaKeySystemConfig.PersistentState.Optional,sessionTypes:d?[S.MediaKeySystemConfig.SessionType.PersistentLicense]:[S.MediaKeySystemConfig.SessionType.Temporary]};return"object"==typeof u?p(p({},h),u):h},c.prototype.dispose=function(){this.X9=null,this.Y9.dispose(),this.Z9.clear()},c}()},4358:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},h=this&&this.__rest||function(c,u){var d={};for(var p in c)Object.prototype.hasOwnProperty.call(c,p)&&0>u.indexOf(p)&&(d[p]=c[p]);if(null!=c&&"function"==typeof Object.getOwnPropertySymbols){var h=0;for(p=Object.getOwnPropertySymbols(c);h<p.length;h++)0>u.indexOf(p[h])&&Object.prototype.propertyIsEnumerable.call(c,p[h])&&(d[p[h]]=c[p[h]])}return d};Object.defineProperty(u,"__esModule",{value:!0}),u.getInitialLicenseState=void 0,u.addLicense=function(c){return(0,f.createAction)(g.LicenseActionType.AddLicense,c)},u.updateLicense=function(c){return(0,f.createAction)(g.LicenseActionType.UpdateLicense,c)},u.removeLicense=function(c){return(0,f.createAction)(g.LicenseActionType.RemoveLicense,c)},u.resetLicense=function(c){return(0,f.createAction)(g.LicenseActionType.ResetLicense,c)},u.resetLicenses=function(){return(0,f.createAction)(g.LicenseActionType.ResetLicenses)},u.clearLicenseStorage=function(){return(0,f.createAction)(g.LicenseActionType.ClearLicenseStorage)},u.initializeLicenseStorage=function(c){return(0,f.createAction)(g.LicenseActionType.InitializeLicenseStorage,{storageHandler:c})},u.setPersistentState=function(c){return(0,f.createAction)(g.LicenseActionType.SetPersistentState,c)},u.setMediaKeyStatus=function(c,u,d,p){return(0,f.createAction)(g.LicenseActionType.SetMediaKeyStatus,{keySystemKind:c,keyUuid:u,status:d,initDataStr:p})},u.loadLicences=b,u.maybeStoreLicences=function(c,u){c&&((0,m.clearTimeoutIfDefined)(y),y=window.setTimeout(function(){try{var d=c.drmData,f={};Object.keys(d).forEach(function(c){f[c]={},Object.entries(d[c]).forEach(function(u){var d=u[0],m=u[1],v=void 0===m?{}:m,y=(v.license,v.initData,h(v,["license","initData"]));delete y.publicId,f[c][d]=p(p({},y),{hasLicense:!1,isPending:!1,wasRequested:!1,mediaKeyStatus:g.MediaKeyStatus.Unknown})})});var m=JSON.stringify(p(p({},c),{drmData:f}));u.set(v,m)}catch{}}))},u.getLicenseInfoKey=function(c){return btoa(c)};var f=d(35267),m=d(88844),g=d(56068),v="bitmovinplayer_licenseStorage",y=-1;function b(c){try{var u=c.get(v);return JSON.parse(u)||{}}catch{return{}}}u.getInitialLicenseState=function(c){var u=b(c);return p({inPersistentState:!1,drmData:{}},u)}},91921:function(c,u,d){var p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.LicenseReducer=void 0;var f=d(33468),m=d(3793),g=d(4358),v=d(56068),y={drmData:{},inPersistentState:!1};function b(c,u,d){var p,f=(0,g.getLicenseInfoKey)(u),m=h(h({},c),{drmData:h({},c.drmData)});return d&&(c.drmData[d]?m.drmData[d]=h(h({},c.drmData[d]),((p={})[f]=h({},c.drmData[d][f]),p)):m.drmData[d]={}),m}function S(c,u){var d,p=u.initDataStr,f=u.licenseInfo,m=u.systemName,v=b(c,p,m),y=(0,g.getLicenseInfoKey)(p),S=c.drmData[m]&&c.drmData[m][y]||{};return v.drmData[m]=h(h({},c.drmData[m]),((d={})[y]=h(h({},S),f),d)),v}u.LicenseReducer=(0,m.default)(y,((p={})[v.LicenseActionType.AddLicense]=function(c,u){return S(c,u.payload)},p[v.LicenseActionType.UpdateLicense]=function(c,u){return S(c,u.payload)},p[v.LicenseActionType.RemoveLicense]=function(c,u){var d,p,h;return d=u.payload.initDataStr,p=null,h=(0,g.getLicenseInfoKey)(d),Object.keys(c.drmData).forEac
vendor: 4,218 bytes, line 129
129h(function(u){if(u){var m=(p=b(p||c,d,f.KeySystemKind[u])).drmData[u];p.drmData[u]=m?Object.keys(m).filter(function(c){return h!==c}).reduce(function(c,u){return c[u]=m[u],c},{}):{}}}),p||c},p[v.LicenseActionType.ResetLicense]=function(c,u){return S(c,u.payload)},p[v.LicenseActionType.ResetLicenses]=function(c){var u;return u={},Object.keys(c.drmData).forEach(function(d){d&&(u[d]={},Object.entries(c.drmData[d]).forEach(function(c){var p=c[0],f=c[1];u[d][p]=h(h({},f),{keyIds:[],license:null,hasLicense:!1,isPending:!1,wasRequested:!1,initData:null,usedByPlayerId:void 0})}))}),{inPersistentState:c.inPersistentState,drmData:u}},p[v.LicenseActionType.SetPersistentState]=function(c,u){var d=u.payload;return h(h({},c),{inPersistentState:d})},p[v.LicenseActionType.ClearLicenseStorage]=function(){return y},p[v.LicenseActionType.InitializeLicenseStorage]=function(c,u){var d=u.payload;return(0,g.getInitialLicenseState)(d.storageHandler)},p[v.LicenseActionType.SetMediaKeyStatus]=function(c,u){var d,p=u.payload,f=p.keySystemKind,m=p.keyUuid,g=p.status,v=p.initDataStr,y=c.drmData[f];if(!(null!=y&&y[v]))return c;var b=h({},y),S=b[v];return S.keyIds.includes(m)&&(b[v]=h(h({},S),{mediaKeyStatus:g})),h(h({},c),{drmData:h(h({},c.drmData),((d={})[f]=b,d))})},p))},55327:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.getLicenseState=void 0,u.verifyKeysAreUsableOrPendingOnAnyLicense=function(c,u,d){var h=(0,p.getAllLicensesForKeySystem)(u,d).flatMap(function(c){return c.keyIds});return c.filter(function(c){return h.includes(c)}).map(function(c){return(0,p.hasMatchingLicenseInfoForKeySystem)(c,(0,p.getKeySystemMap)(d,u),p.isMediaKeyStatusUnknownOrPendingOrUsable)}).every(function(c){return!0===c})};var p=d(58857);u.getLicenseState=function(c){return c.drmLicenses}},56068:function(c,u){var d,p,h,f;Object.defineProperty(u,"__esModule",{value:!0}),u.MediaKeyStatus=u.LicenseActionType=void 0,(h=d||(u.LicenseActionType=d={})).AddLicense="@instance/license/add",h.UpdateLicense="@instance/license/update",h.RemoveLicense="@instance/license/remove",h.ResetLicense="@instance/license/reset",h.ResetLicenses="@instance/license/reset-all",h.SetMediaKeyStatus="@instance/license/setMediaKeyStatus",h.SetPersistentState="@instance/license/setPersistentState",h.ClearLicenseStorage="@instance/license/clearLicenseStorage",h.InitializeLicenseStorage="@instance/license/initializeLicenseStorage",(f=p||(u.MediaKeyStatus=p={})).Unknown="unknown",f.Usable="usable",f.Expired="expired",f.Released="released",f.Pending="status-pending",f.OutputRestricted="output-restricted",f.OutputDownscaled="output-downscaled",f.InternalError="internal-error"},78763:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},h=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.DRMDetectorService=void 0;var f=d(33468),m=d(74853),g=d(15487),v=d(35987),y=d(24273);function b(c){return c.filter(function(c){var u;return null==(u=c.contentType)?void 0:u.includes("ac-3")})}function S(c){return b(c).length>0&&(0,g.isTizen)()&&(0,g.getTizenVersion)().major>=g.TIZEN_2018_MAJOR_VERSION}u.DRMDetectorService=function(){function c(){this.Bq=new y.EMEWrapper}return c.prototype.isSupported=function(c){return this.Bq?this.Bq.isSupported(c):Promise.reject("No supported EME available")},c.prototype.getSupported=function(){var c=this,u=Object.keys(f.KeySystemMap).flatMap(function(c){return f.KeySystemMap[c]});return(0,v.allSettledPromises)(u.map(function(u){return c.isSupported(u).catch(function(){return""})})).then(function(c){return c.filter(function(c){return c})})},c.prototype.getSupportedCapabilities=function(c,u,d){var f;if(S(u)){var g=b(u).map(function(c){return p(p({},c),{contentType:c.contentType.replace("ac-3","ec-3")})});g=g.filter(function(c){return!(0,m.contains)(u,c)}),f=h(h([],u,!0),g,!0)}else f=u;
129return this.Bq.getSupportedCapabilities(c,f,d).then(function(c){if(S(u)){var d,f;f=(d=c.audioCapabilities).filter(function(c){var u;return null==(u=c.contentType)?void 0:u.includes("ec-3")}).map(function(c){return p(p({},c),{contentType:c.contentType.replace("ec-3","ac-3")})}).filter(function(c){return!(0,m.contains)(d,c)}),c.audioCapabilities=h(h([],d,!0),f,!0),c.audioCapabilities=c.audioCapabilities.filter(function(c){return(0,m.contains)(u,c,function(c,u){return c.contentType===u.contentType})})}return c})},c.prototype.dispose=function(){this.Bq.dispose()},c}()},24273:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.EMEWrapper=void 0;var p=d(57387),h=d(84568),f="DOMException: Unsupported keySystem",m=[{initDataTypes:["cenc"],audioCapabilities:[{contentType:'audio/mp4;codecs="mp4a.40.2"'}],videoCapabilities:[{contentType:'video/mp4;codecs="avc1.4d401e"'}]},{initDataTypes:["cenc"],videoCapabilities:void 0,audioCapabilities:void 0}];u.EMEWrapper=function(){function c(){this.TQ=document.createElement("video"),this.UQ=(0,h.memoize)(this.ZQ.bind(this),function(c,u,d){return String((0,p.calcHash)(JSON.stringify({keySystem:c,audioCapabilities:u,videoCapabilities:d})))})}return c.prototype.isSupported=function(c){var u;return"function"==typeof window.WebKitMediaKeys?this.VQ(c):"function"==typeof window.navigator.requestMediaKeySystemAccess?this.WQ(c).then(function(c){return c.keySystem}):"function"==typeof window.MSMediaKeys?this.XQ(c):"function"==typeof(null==(u=this.TQ)?void 0:u.webkitGenerateKeyRequest)?this.YQ(c):Promise.reject(f)},c.prototype.VQ=function(c){var u,d;return null!=(d=(u=window.WebKitMediaKeys).isTypeSupported)&&d.call(u,c)?Promise.resolve(c):Promise.reject(f)},c.prototype.WQ=function(c,u){void 0===u&&(u=m);try{return window.navigator.requestMediaKeySystemAccess(c,u)}catch(c){return Promise.reject(c)}},c.prototype.XQ=function(c){var u,d;return null!=(d=(u=window.MSMediaKeys).isTypeSupported)&&d.call(u,c)?Promise.resolve(c):Promise.reject(f)},c.prototype.YQ=function(c){var u;return null!=(u=this.TQ)&&u.canPlayType("video/mp4",c)?Promise.resolve(c):Promise.reject(f)},c.prototype.getSupportedCapabilities=function(c,u,d){return this.UQ(c,u,d)},c.prototype.ZQ=function(c,u,d){return"function"==typeof window.navigator.requestMediaKeySystemAccess?window.navigator.requestMediaKeySystemAccess(c,[{initDataTypes:["cenc"],audioCapabilities:u,videoCapabilities:d},{initDataTypes:["cenc"],videoCapabilities:void 0,audioCapabilities:void 0}]).then(function(c){var p,h,f=c.getConfiguration();return{audioCapabilities:null!=(p=null==f?void 0:f.audioCapabilities)?p:u,videoCapabilities:null!=(h=null==f?void 0:f.videoCapabilities)?h:d}}).catch(function(){return{audioCapabilities:u,videoCapabilities:d}}):Promise.resolve({audioCapabilities:u,videoCapabilities:d})},c.prototype.dispose=function(){this.TQ=null,this.UQ.invalidate()},c}()},84344:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},h=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.mergeKeySystemPriorities=u.resolveDRMSystem=u.instantiateDRMSystem=void 0,u.resolveUsedDRMSystem=R;var f=d(80813),m=d(33468),g=d(70962),v=d(67579),y=d(92656),b=d(25271),S=d(31884),_=d(81982),E=d(99921),T=d(30665),w=function(c,u){var d,f,v,y,b=function(c){return"number"==typeof c&&1/0!==c&&-1/0!==c&&!isNaN(c)},S=Object.keys(u).filter(function(d){return!!u[d]&&d in c}).reduce(function(c,d){return c[d]=p(p({},u[d]),{licenseRequestRetryDelay:b(u[d].licenseRequestRetryDelay)?Math.max(0,u[d].licenseRequestRetryDelay):g.DefaultSettings.DRM_RETRY_DELAY,maxLicenseRequestRetries:b(u[d].maxLicenseRequestRetries)?Math.floor(Math.max(0,u[d].maxLicenseRequestRetries)):g.DefaultSettings.DRM_MAX_RETRIES,withCredentials:"boolean"==typeof u[d].withCredentials?u[d].withCredentials:g.DefaultSettings.DRM_WITH_CREDENTIALS}),c}
vendor: 9,160 bytes, line 129
129,Object.create(null)),_=(d=u.preferredKeySystems,f=[m.KeySystemKind.FAIRPLAY,m.KeySystemKind.PLAYREADY,m.KeySystemKind.PRIMETIME,m.KeySystemKind.WIDEVINE,m.KeySystemKind.TVKEY],v=(Array.isArray(d)?d.filter(function(c){return f.includes(c)}):[]).reduce(function(c,u){return c.includes(u)||c.push(u),c},[]),y=[m.KeySystemKind.PLAYREADY,m.KeySystemKind.FAIRPLAY,m.KeySystemKind.TVKEY,m.KeySystemKind.WIDEVINE,m.KeySystemKind.PRIMETIME].filter(function(c){return!v.includes(c)}),h(h([],v,!0),y,!0));return p(p({},S),{preferredKeySystems:_})},P=function(c,u){var d=Object.keys(c).flatMap(function(u){return c[u].map(function(c){return{kind:u,uid:c}})});return u.flatMap(function(c){var u=c.kind;return d.map(function(c){return{emeHandler:{kind:u},keySystem:c}})})},A=function(c,u){var d,p,h,f=(0,T.or)(function(c){return c.keySystem.kind===m.KeySystemKind.FAIRPLAY},function(c){return!!u.playready&&!!u.playready.customData&&c.keySystem.kind===m.KeySystemKind.PLAYREADY&&c.emeHandler.kind===E.EMEHandlerKind.UNPREFIXED}),g=(0,T.or)(function(c){return!!u.playready&&c.keySystem.kind===m.KeySystemKind.PLAYREADY},function(c){return!!u.primetime&&c.keySystem.kind===m.KeySystemKind.PRIMETIME},function(c){return!!u.widevine&&c.keySystem.kind===m.KeySystemKind.WIDEVINE},function(c){return!!u.tvkey&&c.keySystem.kind===m.KeySystemKind.TVKEY}),y=c.filter((0,T.and)((0,T.not)(f),g));return null!=(h=null==(p=null==(d=u.playready)?void 0:d.mediaKeySystemConfig)?void 0:p.sessionTypes)&&h.includes(v.MediaKeySystemConfig.SessionType.PersistentLicense)?y.filter(function(c){return c.keySystem.uid!==m.KeySystemMap[m.KeySystemKind.PLAYREADY][1]}):y},I=function(c,u){var d=function(c,u){return u.weight-c.weight},p=function(c){return c.wrapped},h=function(c,u){return function(d){var p=u(d),h=c.findIndex(function(c){return c===p});return{weight:-1!==h?c.length-h:h,wrapped:d}}},f=h([E.EMEHandlerKind.WEBOS_2017_UNPREFIXED,E.EMEHandlerKind.WEBOS_UNPREFIXED,E.EMEHandlerKind.WEBOS_WEBKIT_PREFIXED,E.EMEHandlerKind.PLAYSTATION_4,E.EMEHandlerKind.UNPREFIXED,E.EMEHandlerKind.TIZEN,E.EMEHandlerKind.WEBKIT_PREFIXED,E.EMEHandlerKind.MS_PREFIXED],function(c){return c.emeHandler.kind}),m=h(c,function(c){return c.keySystem.kind});return u.map(m).sort(d).map(p).reduce(function(c,u){var d=c[c.length-1];return void 0!==d&&d[d.length-1].keySystem.kind===u.keySystem.kind?d.push(u):c.push([u]),c},[]).flatMap(function(c){return c.map(f).sort(d).map(p)})},M=function(c,u,d){switch(c){case m.KeySystemKind.FAIRPLAY:throw Error("Can not create Fairplay instance");case m.KeySystemKind.PLAYREADY:return new y.PlayReady(d,u.playready);case m.KeySystemKind.PRIMETIME:return new b.PrimeTime(d,u.primetime);case m.KeySystemKind.WIDEVINE:return new _.Widevine(d,u.widevine);case m.KeySystemKind.TVKEY:return new S.TVKey(d,u.tvkey);default:throw Error("Could not create KeySystem ".concat(c))}};function R(c,d,p){p.logger.debug("Resolving DRM key system...",{keySystemMap:c,config:d});var h=w(c,d),f=(0,E.allEMEHandlers)(p).filter(function(c){return c.isAvailable}),g=A(P((0,u.mergeKeySystemPriorities)(c,d),f),h),v=I(h.preferredKeySystems,g),y=function(c){if(0===c.length){var u=Object.keys(d).filter(function(c){return Object.values(m.KeySystemKind).includes(c)}).join(", ");return Promise.reject("Unable to find a valid DRM key system! The provided DRM key system configurations [".concat(u,"] are not supported."))}var h=c[0],g=c.slice(1);p.logger.debug("Checking support for DRM key system",JSON.stringify(h));var v=f.find(function(c){return c.kind===h.emeHandler.kind});return v?v.isSupported(h.keySystem.uid).then(function(){return h}).catch(function(){return y(g)}):y(g)};return y(v)}u.instantiateDRMSystem=function(c,u,d){return p(p({},c),{config:u,emeHandler:p(p({},c.emeHandler),{instance:(0,E.createEMEHandlerInstance)(c.emeHandler.kind,d)}),keySystem:p(p({},c.keySystem),{instance:M(c.keySystem.kind,u,d)})})},u.resolveDRMSystem=function(c,d,p){var h=w(c,d),g=p.serviceManager.get(f.ServiceName.DrmService);return(g?g.getResolvedKeySystemFromSourceConfig():Promise.resolve(null)).then(function(f){return f&&0===Object.values(m.KeySystemKind).filter(function(c){return!(c in f.config)&&c in h}).length?(0,u.instantiateDRMSystem)(f,h,p):R(c,d,p).then(function(c){return(0,u.instantiateDRMSystem)(c,h,p)})})},u.mergeKeySystemPriorities=function(c,u){for(var d,p,h={fairplay:[],playready:[],primetime:[],widevine:[],tvkey:[]},f=function(c,f){if(!c||!Object.values(m.KeySystemKind).some(function(u){return u===c}))return"continue";var g=null!=(p=null==(d=null==u?void 0:u[c])?void 0:d.keySystemPriority)?p:[];h[c]=g;var v=f.filter(function(c){return!g.includes(c)});h[c]=h[c].concat(v)},g=0,v=Object.entries(c);g<v.length;g++){var y=v[g];f(y[0],y[1])}return h}},99921:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.createEMEHandlerInstance=u.allEMEHandlers=u.EMEHandlerKind=void 0;var p,h,f=d(21513),m=d(15487),g=d(88052),v=d(62756),y=d(86558),b=d(70581),S=d(80680);(p=h||(u.EMEHandlerKind=h={})).MS_PREFIXED="MS_PREFIXED",p.WEBOS_UNPREFIXED="WEBOS_UNPREFIXED",p.WEBOS_WEBKIT_PREFIXED="WEBOS_WEBKIT_PREFIXED",p.WEBOS_2017_UNPREFIXED="WEBOS_2017_UNPREFIXED",p.UNPREFIXED="UNPREFIXED",p.PLAYSTATION_4="PLAYSTATION_4",p.TIZEN="TIZEN",p.WEBKIT_PREFIXED="WEBKIT_PREFIXED";var _=function(c){return(0,b.isUnprefixedEmeHandlerSupported)(c)},E=function(c){return(0,y.isMsPrefixedEmeHandlerSupported)(c)},T=function(c){return function(u){return(0,S.isWebkitPrefixedEmeHandlerSupported)(c.videoElement,u)}};u.allEMEHandlers=function(c){return[{kind:h.UNPREFIXED,isAvailable:!0,isSupported:_},{kind:h.WEBOS_UNPREFIXED,isAvailable:(0,f.getCapabilities)().isWebOS&&g.ModuleManager.has(v.ModuleName.Webos),isSupported:_},{kind:h.WEBOS_2017_UNPREFIXED,isAvailable:(0,f.getCapabilities)().isWebOS&&(0,m.isWebOs2017)()&&g.ModuleManager.has(v.ModuleName.Webos),isSupported:_},{kind:h.WEBOS_WEBKIT_PREFIXED,isAvailable:(0,f.getCapabilities)().isWebOS&&g.ModuleManager.has(v.ModuleName.Webos),isSupported:T(c)},{kind:h.MS_PREFIXED,isAvailable:!0,isSupported:E},{kind:h.PLAYSTATION_4,isAvailable:(0,f.getCapabilities)().isPlayStation4&&g.ModuleManager.has(v.ModuleName.PlayStation4),isSupported:_},{kind:h.TIZEN,isAvailable:(0,f.getCapabilities)().isTizen&&g.ModuleManager.has(v.ModuleName.Tizen),isSupported:T(c)},{kind:h.WEBKIT_PREFIXED,isAvailable:!0,isSupported:T(c)}]},u.createEMEHandlerInstance=function(c,u){switch(c){case h.MS_PREFIXED:return new y.MSPrefixedEMEHandler(u);case h.WEBOS_UNPREFIXED:return new(g.ModuleManager.get(v.ModuleName.Webos).getWebosUnprefixedEmeHandlerConstructor())(u);case h.WEBOS_2017_UNPREFIXED:return new(g.ModuleManager.get(v.ModuleName.Webos).getWebos2017UnprefixedEmeHandlerConstructor())(u);case h.WEBOS_WEBKIT_PREFIXED:return new(g.ModuleManager.get(v.ModuleName.Webos).getWebosWebkitPrefixedEmeHandlerConstructor())(u);case h.TIZEN:return new(g.ModuleManager.get(v.ModuleName.Tizen).getTizenEMEHandlerConstructor())(u);case h.PLAYSTATION_4:return new(g.ModuleManager.get(v.ModuleName.PlayStation4).getPlayStation4EMEHandlerConstructor())(u);case h.UNPREFIXED:return new b.UnprefixedEMEHandler(u);case h.WEBKIT_PREFIXED:return new S.WebKitPrefixedEMEHandler(u);default:throw Error("Could not create EMEHandler")}}},30665:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.removeFromObject=u.memoOne=u.not=u.or=u.and=void 0,u.and=function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return function(){for(var u=[],d=0;d<arguments.length;d++)u[d]=arguments[d];return c.reduce(function(c,d){return c&&d.apply(void 0,u)},!0)}},u.or=function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return function(){for(var u=[],d=0;d<arguments.length;d++)u[d]=arguments[d];return c.reduce(function(c,d){return c||d.apply(void 0,u)},!1)}},u.not=function(c){return function(){for(var u=[],d=0;d<arguments.length;d++)u[d]=arguments[d];return!c.apply(void 0,u)}};var d=function(c,u){if(c.length!==u.length)return!1;for(var d=0;d<c.length;d++)if(c[d]!==u[d])return!1;return!0};u.memoOne=function(c,u){var p,h=null,f=void 0!==u?u:d;return function(){for(var u=[],d=0;d<arguments.length;d++)u[d]=arguments[d];return null!==h&&f(u,h)||(p=c.apply(void 0,u),h=u),p}},u.removeFromObject=function(c,u){return Object.keys(c).filter(function(c){return!u.includes(c)}).reduce(function(u,d){return u[d]=c[d],u},Object.create(null))}},6234:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.parseInitData=function(c){if(!c||c.byteLength<h.ISOBMFFConstants.BOX_SIZE_LENGTH+h.ISOBMFFConstants.BOX_TYPE_LENGTH)return[];var u=0,d=c instanceof Uint8Array?c.buffer:c,g=new DataView(d),v=[];do{var y=g.getUint32(u),b=d.slice(u,u+y);u+=y;var S=function(c){var u={},d=new DataView(c),g=h.ISOBMFFConstants.BOX_SIZE_LENGTH,v=f.ArrayHelper.extractAsciiString(d,g,h.ISOBMFFConstants.BOX_TYPE_LENGTH);if(g+=h.ISOBMFFConstants.BOX_TYPE_LENGTH,"pssh"!==v)return null;var y=d.getUint8(g);g+=h.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+h.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH;var b=f.ArrayHelper.extractHexString(d,g,h.ISOBMFFConstants.PSSH_SYSTEM_ID_LENGTH);if(g+=h.ISOBMFFConstants.PSSH_SYSTEM_ID_LENGTH,u.systemIDraw=b,u.systemID="ur
129n:uuid:".concat(m.FormatHelper.beautifyUUID(b)),p.DRMSchemeIDURIs.hasOwnProperty(u.systemID)&&(u.systemName=p.DRMSchemeIDURIs[u.systemID]),y>0){var S=d.getUint32(g);g+=h.ISOBMFFConstants.PSSH_KID_COUNT_LENGTH,u.kid=[];for(var _=0;_<S;_++)u.kid.push(f.ArrayHelper.extractHexString(d,g,h.ISOBMFFConstants.PSSH_KID_LEN)),g+=h.ISOBMFFConstants.PSSH_KID_LEN}return u.initData=c,u.initDataStr=f.ArrayHelper.arrayBufferToAsciiString(c,!0),u}(b);S&&v.push(S)}while(u<c.byteLength)return v};var p=d(25811),h=d(51682),f=d(74853),m=d(70233)},35987:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.allSettledPromises=function(c){if(!c||!Array.isArray(c))return Promise.reject("The passed argument is not an array");var u=[],d=c.length>0,p=Promise.resolve(null);return c.forEach(function(c,h){p=p.then(function(){return c}).then(function(c){u[h]=c,d=!1}).catch(function(){u[h]=void 0})}),p.then(function(){return d?Promise.reject(u):u})}},49988:function(c,u){var d,p,h=this&&this.__assign||function(){return(h=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.ProtoBufWireType=void 0,u.parseProtoBufMessage=function(c){for(var u=v(c)?new Uint8Array(c).buffer:c,p=[],y=new f(u);y.hasNext();){var b=function(c){var u=m(c);if(void 0!==u)return{wireType:7&u,fieldNumber:u>>3}}(y);if(!b)break;var S=function(c,u){switch(c.wireType){case d.VarInt:return h(h({},c),{value:m(u)});case d.Bit64:return h(h({},c),{value:g(u,8)});case d.LengthLimited:var p=m(u);return p?h(h({},c),{value:g(u,p)}):void 0;case d.Bit32:return h(h({},c),{value:g(u,4)});case d.StartGroup:case d.EndGroup:default:return}}(b,y);S&&p.push(S)}return p},u.getFieldsByFieldNumber=function(c,u){return c.filter(function(c){return c.fieldNumber===u})},u.findFieldByFieldNumber=function(c,u){return c.find(function(c){return c.fieldNumber===u})},u.isLengthLimitedProtoBufField=function(c){return void 0!==c&&c.wireType===d.LengthLimited&&v(c.value)},(p=d||(u.ProtoBufWireType=d={}))[p.VarInt=0]="VarInt",p[p.Bit64=1]="Bit64",p[p.LengthLimited=2]="LengthLimited",p[p.StartGroup=3]="StartGroup",p[p.EndGroup=4]="EndGroup",p[p.Bit32=5]="Bit32";var f=function(){function c(c){this.zhb=0,this.Ahb=new Uint8Array(c)}return c.prototype.hasNext=function(){return this.zhb<this.Ahb.byteLength},c.prototype.getNext=function(){if(this.hasNext()){var c=this.Ahb[this.zhb];return this.zhb++,c}},c.prototype.reset=function(){this.zhb=0},c}();function m(c){var u,d=[];do{if(void 0===(u=c.getNext()))break;d.push(127&u)}while(128&u)return d.reduce(function(c,u,d){return c+(u<<7*d)},0)}function g(c,u){for(var d=[],p=0;p<u;p++){var h=c.getNext();if(void 0===h)break;d.push(h)}return d}function v(c){return Array.isArray(c)&&c.every(function(c){return"number"==typeof c})}},92378:function(c,u,d){var p=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.parseKidsFromTVKeyPssh=function(c,u){try{var d=(0,v.parseInitData)(c).flatMap(function(c){var d,m,g;return m=null!=(d=c.kid)?d:[],g=function(c,u){var d=c.initData,p=new DataView(d),m=function(c){var u=new DataView(c),d=h.ISOBMFFConstants.BOX_SIZE_LENGTH+h.ISOBMFFConstants.BOX_TYPE_LENGTH+h.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+h.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH+h.ISOBMFFConstants.PSSH_SYSTEM_ID_LENGTH;if(u.getUint8(h.ISOBMFFConstants.BOX_SIZE_LENGTH+h.ISOBMFFConstants.BOX_TYPE_LENGTH)>0){var p=u.getUint32(d);d+=h.ISOBMFFConstants.PSSH_KID_COUNT_LENGTH+p*h.ISOBMFFConstants.PSSH_KID_LEN}return d}(d),g=p.getUint32(m),v=m+h.ISOBMFFConstants.PSSH_DATA_SIZE;if(g<=0||v+g>d.byteLength)return u.debug("Invalid Nagra data size"),[];var y=new Uint8Array(d,v,g),b=f.ArrayHelper.convertBufferSourceToUTF8(y),S=JSON.parse(atob(b));return"string"==typeof S.keyId?[S.keyId]:[]}(c,u),p(p([],m,!0),g,!0)}).map(y);return(0,g.removeDuplicates)(d)}catch(c){return u.debug("Failed to parse key IDs from TVKey PSSH data:",c),[]}};var h=d(51682),f=d(74853),m=d(70233),g=d(70850),v=d(6234),y=function(c){return c.includes("-")?c:m.FormatHelper.beautifyUUID(c)}}
129,51063:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.parseWidevineLicenseRequestProtoBuf=function(c){var u=x(c,f.LicenseRequest);if(u){var d=(0,y.findFieldByFieldNumber)(u,b);if((0,y.isLengthLimitedProtoBufField)(d)){var p=(0,y.parseProtoBufMessage)(d.value),h=(0,y.findFieldByFieldNumber)(p,S);if((0,y.isLengthLimitedProtoBufField)(h)){var m=(0,y.parseProtoBufMessage)(h.value),v=(0,y.findFieldByFieldNumber)(m,_),T=(0,y.findFieldByFieldNumber)(m,E);if((0,y.isLengthLimitedProtoBufField)(T)&&(0,y.isLengthLimitedProtoBufField)(v)){var w=g.ArrayHelper.arrayBufferToBase64(new Uint8Array(T.value).buffer),P=C((0,y.parseProtoBufMessage)(v.value));if(P)return{requestId:w,requestedKeyIds:P}}}}}},u.parseWidevineLicenseResponseProtoBuf=function(c){var u=x(c,f.License);if(u){var d=(0,y.findFieldByFieldNumber)(u,T);if((0,y.isLengthLimitedProtoBufField)(d)){var p=(0,y.parseProtoBufMessage)(d.value),h=(0,y.findFieldByFieldNumber)(p,w);if((0,y.isLengthLimitedProtoBufField)(h)){var m=g.ArrayHelper.arrayBufferToBase64(new Uint8Array(h.value).buffer),b=(0,y.getFieldsByFieldNumber)(u,P).filter(y.isLengthLimitedProtoBufField).map(function(c){return(0,y.parseProtoBufMessage)(c.value)}).filter(k);if(0!==b.length){var S=function(c){for(var u=[],d=0;d<c.length;d++){var p=c[d],h=(0,y.findFieldByFieldNumber)(p,A);if(!(0,y.isLengthLimitedProtoBufField)(h))return;u.push(v.FormatHelper.bytesToUUID(new Uint8Array(h.value).buffer))}return u}(b);if(S&&S.every(function(c){return"string"==typeof c}))return{requestId:m,returnedKeyIds:S}}}}}},u.parseKidsFromWidevinePssh=function(c){var u=function(c){var u=new DataView(c.buffer);if(!(u.byteLength<=M)){if(1===u.getUint8(M)&&u.byteLength>I){var d=u.getUint32(I);return c.buffer.slice(28+d*R)}return c.buffer.slice(28)}}(new Uint8Array(c));return u?C((0,y.parseProtoBufMessage)(u))??[]:[]};var p,h,f,m,g=d(74853),v=d(70233),y=d(49988),b=2,S=1,_=1,E=3,T=1,w=1,P=3,A=1,I=27,M=8,R=16;function k(c){var u=(0,y.findFieldByFieldNumber)(c,4);return(null==u?void 0:u.value)===m.Content}function x(c,u){var d=(0,y.parseProtoBufMessage)(c);if(function(c){var u=(0,y.findFieldByFieldNumber)(c,1);if("number"==typeof(null==u?void 0:u.value))return null==u?void 0:u.value}(d)===u){var p=(0,y.findFieldByFieldNumber)(d,2);return(0,y.isLengthLimitedProtoBufField)(p)?(0,y.parseProtoBufMessage)(p.value):void 0}}function C(c){var u=(0,y.getFieldsByFieldNumber)(c,2).filter(y.isLengthLimitedProtoBufField).filter(function(c){return c.value.length===R||32===c.value.length}).map(function(c){return 32===c.value.length?v.FormatHelper.beautifyUUID(String.fromCodePoint.apply(null,c.value)):v.FormatHelper.bytesToUUID(new Uint8Array(c.value).buffer)});return u.length>0?u:void 0}(p=f||(f={}))[p.LicenseRequest=1]="LicenseRequest",p[p.License=2]="License",(h=m||(m={}))[h.Content=2]="Content"}},function(c){return c(c.s=47272)}])}(bitmovinplayerDrm);var bitmovinplayerDrmExports=bitmovinplayerDrm.exports;let DrmModule=getDefaultExportFromCjs$1(bitmovinplayerDrmExports);var bitmovinplayerRemotecontrol={exports:{}};!function(module){!function(){!function(c,u){module.exports=u()}(self,function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[140],{71223:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.isSameSource=h;var p=d(58313);function h(c,u){return!c&&!u||!(!c||!u)&&(c.dash?f(c.dash,u.dash,u):c.hls?f(c.hls,u.hls,u):!!c.progressive&&!Array.isArray(u.progressive)&&f(c.progressive,u.progressive,u))}function f(c,u,d){try{return h(JSON.parse(c),d)}catch{}return!!u&&p.URLHelper.toFullUrl(u)===p.URLHelper.toFullUrl(c)}},68657:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.GoogleCastReceiverVersion=void 0,(p=d||(u.GoogleCastReceiverVersion=d={})).v2="v2",p.v3="v3"},32645:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});
vendor: 9,805 bytes, line 129
129Object.defineProperty(u,"__esModule",{value:!0}),u.GoogleCastRemoteControlBase=void 0,u.mediaInfoToSourceConfig=b;var f=d(3714),m=d(20213),g=d(85625),v=d(94685),y=d(60768);function b(c){var u=c.contentUrl||c.contentId;switch(c.contentType.toLowerCase()){case g.ManifestMimeType.Dash:return{dash:u};case g.ManifestMimeType.Hls:return{hls:u};case g.ManifestMimeType.Smooth:return{smooth:u};default:return{progressive:u}}}u.GoogleCastRemoteControlBase=function(c){function u(u,d){var p=c.call(this,u)||this;p.KM=function(c,u){p.context.logger.debug("addReceiverActionListener",c),p.isConnected()||p.onConnect(c.friendlyName)},p.LM=function(c){switch(p.context.logger.debug("CAST_STATE_CHANGED",c),c.castState){case cast.framework.CastState.NO_DEVICES_AVAILABLE:p.onReady(!1);break;case cast.framework.CastState.NOT_CONNECTED:p.onReady(!0);case cast.framework.CastState.CONNECTING:case cast.framework.CastState.CONNECTED:}},p.MM=function(c){switch(p.context.logger.debug("SESSION_STATE_CHANGED",c),c.sessionState){case cast.framework.SessionState.NO_SESSION:case cast.framework.SessionState.SESSION_STARTING:break;case cast.framework.SessionState.SESSION_STARTED:p.onConnected(c.session.getCastDevice().friendlyName,!1);break;case cast.framework.SessionState.SESSION_START_FAILED:p.context.logger.debug("SESSION_START_FAILED",c.errorCode),c.errorCode!==chrome.cast.ErrorCode.CANCEL&&p.onError();break;case cast.framework.SessionState.SESSION_ENDING:break;case cast.framework.SessionState.SESSION_ENDED:p.onDisconnected();break;case cast.framework.SessionState.SESSION_RESUMED:p.onConnected(c.session.getCastDevice().friendlyName,!0),p.remotePlayer.isPaused||(p.JM(),p.onRemotePlayerEvent({event:f.PlayerEvent.Play}))}},p.NM=function(c){p.mediaInfoChangedEventHandler(c)},p.OM=function(c){switch(p.context.logger.debug("PLAYER_STATE_CHANGED",c),c.value){case chrome.cast.media.PlayerState.PAUSED:p.onRemotePlayerEvent({event:f.PlayerEvent.Paused});break;case chrome.cast.media.PlayerState.PLAYING:p.onRemotePlayerEvent({event:f.PlayerEvent.Playing})}},p.PM=function(){p.context.logger.debug("IS_PAUSED_CHANGED",p.remotePlayer.isPaused),p.remotePlayer.isPaused||p.onRemotePlayerEvent({event:f.PlayerEvent.Play})},p.QM=function(){p.context.logger.debug("CURRENT_TIME_CHANGED",p.remotePlayer.currentTime),p.onRemotePlayerEvent({event:f.PlayerEvent.TimeChanged})},p.RM=function(){p.context.logger.debug("VOLUME_LEVEL_CHANGED",p.remotePlayer.volumeLevel),p.onRemotePlayerEvent({event:f.PlayerEvent.VolumeChanged})},p.SM=function(){p.context.logger.debug("IS_MUTED_CHANGED",p.remotePlayer.isMuted),p.onRemotePlayerEvent({event:p.remotePlayer.isMuted?f.PlayerEvent.Muted:f.PlayerEvent.Unmuted})},p.TM=function(c){p.context.logger.debug("IS_CONNECTED_CHANGED",c),p.remotePlayer.isConnected?p.context.logger.debug("remotePlayer connected"):p.context.logger.debug("remotePlayer not connected")},p.UM=function(){p.remotePlayer.isPaused||(p.context.logger.debug('Switching receiver state to "paused"'),p.remotePlayerController.playOrPause())},p.config=d,p.IM=void 0;var h=function(c){if(u.logger.debug("__onGCastApiAvailable "+c),c)try{p.initializeCast()}catch(c){u.logger.debug("Cast initialization failed",c)}p.IM&&p.IM(c)};return window.chrome&&window.chrome.cast&&window.cast&&window.cast.framework?setTimeout(function(){return h(!0)},1e3):(p.IM=window.__onGCastApiAvailable,window.__onGCastApiAvailable=h),p}return h(u,c),u.prototype.JM=function(){var c,u,d=this;null==(u=null==(c=this.castSession)?void 0:c.getMediaSession())||u.getStatus(void 0,function(){(0,v.isContextAvailable)(d.context)&&d.context.logger.debug("State updated from Receiver")},function(c){(0,v.isContextAvailable)(d.context)&&d.context.logger.debug("State update from receiver failed:",c)})},u.prototype.initializeCast=function(){cast.framework.CastContext.getInstance().setOptions({receiverApplicationId:this.config.receiverApplicationId,autoJoinPolicy:chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED,resumeSavedSession:null!=(c=this.config.rejoinActiveSession)&&c}),this.remotePlayer=new cast.framework.RemotePlayer,this.remotePlayerController=new cast.framework.RemotePlayerController(this.remotePlayer),this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.IS_CONNECTED_CHANGED,this.TM),this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.PLAYER_STATE_CHANGED,this.OM),this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED,this.PM),this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,this.QM),this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.VOLUME_LEVEL_CHANGED,this.RM),this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.IS_MUTED_CHANGED,this.SM),cast.framework.CastContext.getInstance().getCastState()!==cast.framework.CastState.NO_DEVICES_AVAILABLE?this.onReady(!0):cast.framework.CastContext.getInstance().addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,this.LM),cast.framework.CastContext.getInstance().addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,this.MM),chrome.cast.addReceiverActionListener(this.KM);var c,u=cast.framework.CastContext.getInstance().getCurrentSession();u&&this.onConnected(u.getCastDevice().friendlyName,!0)},u.prototype.mediaInfoChangedEventHandler=function(c){var u=this.remotePlayer.mediaInfo;this.mediaInfo=c.value,this.context.logger.debug("MEDIA_INFO_CHANGED",u)},u.prototype.getConfig=function(){return this.config},u.prototype.connect=function(){var c=this;cast.framework.CastContext.getInstance().requestSession().then(function(){return c.context.logger.debug("Session request successful")}).catch(function(u){u===chrome.cast.ErrorCode.CANCEL||(c.context.logger.debug("Session request failed",u),c.onError())})},u.prototype.onConnected=function(u,d){var p=this;this.castSession=cast.framework.CastContext.getInstance().getCurrentSession(),this.castSession.addMessageListener(this.config.messageNamespace,function(c,u){p.context.logger.insane(c,u);try{var d=JSON.parse(u);p.handleRemoteControlReceiverMessage(d)}catch{p.context.logger.error("message parsing failed",u)}}),this.context.eventHandler.on(f.PlayerEvent.PlaybackFinished,this.UM),c.prototype.onConnected.call(this,u,d)},u.prototype.sendMessage=function(c,u){void 0===c&&(c=y.RemoteControlMessageType.PlayerApiMethodCall),this.castSession.sendMessage(this.config.messageNamespace,{type:c,data:u})},u.prototype.disconnect=function(){cast.framework.CastContext.getInstance().endCurrentSession(!0),this.onDisconnect()},u.prototype.onDisconnected=function(){c.prototype.onDisconnected.call(this),this.context.eventHandler.off(f.PlayerEvent.PlaybackFinished,this.UM),this.playerState=null},u.prototype.release=function(){window.__onGCastApiAvailable=this.IM||void 0,this.remotePlayerController&&(this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,this.NM),this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.PLAYER_STATE_CHANGED,this.OM),this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.IS_MUTED_CHANGED,this.SM),this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.VOLUME_LEVEL_CHANGED,this.RM),this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,this.QM),this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED,this.PM),this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.IS_CONNECTED_CHANGED,this.TM),chrome.cast.removeReceiverActionListener(this.KM),cast.framework.CastContext.getInstance().removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,this.LM),cast.framework.CastContext.getInstance().removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,this.MM))},u.prototype.setSource=function(c,u,d){var p=this;return this.lastSource=c,this.getMediaInfo(c).then(function(c){var h=new chrome.cast.media.LoadRequest(c);return h.autoplay=u||!1,null!=d&&(h.currentTime=d),p.loadMediaRequest(h)})},u.prototype.loadMediaRequest=function(c){var u=this,d=cast.framework.CastContext.getInstance().getCurrentSession().getSessionObj();return new Promise(function(p,h){d.loadMedia(c,function(c){u.context.logger.debug("Load successful",c),u.media=c,u.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,u.NM),p()},function(c){u.context.logger.debug("Load failed with error",c),h(c)})})},u.prototype.getSource=function(){return this.remotePlayer.mediaInfo?b(this.remotePlayer.mediaInfo):null},u.prototype.play=function(){this.remotePlayer.isPaused&&this.remotePlayerController.playOrPause()},u.prototype.isPlaying=function(){return!this.remotePlayer.isPaused},u.prototype.pause=function(){this.remotePlayer.isPaused||this.remotePlayerController.playOrPause()},u.prototype.isPaused=function(){return this.remotePlayer.isPaused},u.prototype.getCurrentTime=function(u){return void 0===u&&(u=m.TimeMode.AbsoluteTime),u===m.TimeMode.RelativeTime?c.prototype.getCurrentTime.call(this,u):this.remotePlayer.currentTime},u.prototype.seek=function(c){this.remotePlayer.currentTime=c,this.remotePlayerController.seek(),this.onRemotePlayerEvent({event:f.PlayerEvent.Seeked})},u.prototype.setVolume=function(c){this.remotePlayer.volumeLevel=c,this.remotePlayerController.setVolumeLevel()},u.prototype.getVolume=function(){return this.remotePlayer.volumeLevel},u.prototype.setMuted=function(c){c!==this.remotePlayer.isMuted&&this.remotePlayerController.muteOrUnmute()},u.prototype.isMuted=function(){return this.remotePlayer.isMuted}
129,u}(d(35317).RemoteControlBase)},61348:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.GoogleCastRemoteControlV2=void 0;var f=d(58313),m=d(32645),g=d(61567);u.GoogleCastRemoteControlV2=function(c){function u(){return null!==c&&c.apply(this,arguments)||this}return h(u,c),u.prototype.getMediaInfo=function(c){var u=new chrome.cast.media.MediaInfo(g.RemoteJSON.stringify(c),"application/json");if(u.streamType=chrome.cast.media.StreamType.BUFFERED,u.metadata=new chrome.cast.media.GenericMediaMetadata,u.metadata.title=c.title||null,u.metadata.subtitle=c.description||null,c.poster){var d=f.URLHelper.toFullUrl(c.poster);u.metadata.images=[new chrome.cast.Image(d)]}return Promise.resolve(u)},u.prototype.removeSubtitle=function(c){this.sendMethodCallMessage("subtitles.remove",[c])},u.prototype.addSubtitle=function(c){this.sendMethodCallMessage("subtitles.add",[c])},u}(m.GoogleCastRemoteControlBase)},23747:function(c,u,d){var p,h=this&&this.__extends||(m=function(c,u){return(m=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}m(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)}),f=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};Object.defineProperty(u,"__esModule",{value:!0}),u.GoogleCastRemoteControlV3=void 0,u.getDrmConfig=function(c){if(c.widevine)return x(c.widevine,g.WIDEVINE);if(c.playready)return x(c.playready,g.PLAYREADY);if(c.clearkey)return x(c.clearkey,g.CLEARKEY);throw Error("Not supported drm config.")},u.getUrlFromKeys=R,u.sortProgressiveSources=k;var m,g,v=d(80813),y=d(20213),b=d(85625),S=d(74853),_=d(70233),E=d(58313),T=d(32645),w=d(7209),P=d(2025),A=d(58367),I=d(13748),M=d(15529);function R(c){return"data:application/json;base64,"+btoa(JSON.stringify({keys:c.map(function(c){var u=_.FormatHelper.hexToBytes(c.key),d=_.FormatHelper.hexToBytes(c.kid||"");return{kty:"oct",kid:S.ArrayHelper.arrayBufferToBase64(d.buffer).replace(/[=]*$/,""),k:S.ArrayHelper.arrayBufferToBase64(u.buffer).replace(/[=]*$/,"")}})}))}function k(c){return c.sort(function(c,u){return c.preferred===u.preferred?(c.bitrate||0)>(u.bitrate||0)?-1:1:(c.preferred||0)>(u.preferred||0)?-1:1})}function x(c,u){return Array.isArray(c)?{protectionSystem:g.CLEARKEY,licenseUrl:R(c)}:{protectionSystem:u,licenseUrl:c.LA_URL||"",headers:c.headers,withCredentials:c.withCredentials||!1}}(p=g||(g={})).CLEARKEY="clearkey",p.PLAYREADY="playready",p.WIDEVINE="widevine",u.GoogleCastRemoteControlV3=function(c){function u(u,d){var p=c.call(this,u,d)||this;return p.XM=0,p.aM=!1,p.gM=function(c){var u,d;(null==(u=p.mediaInfo)?void 0:u.duration)>0&&(null==(d=p.mediaInfo)?void 0:d.duration)-p.WM<2&&0===c.value&&(p.VM=!0,p.onRemotePlayerEvent({event:y.PlayerEvent.PlaybackFinished})),p.WM=c.value},p.YM=new I.MediaInfoTrackMapper(u),p.ZM=new A.EditTrackInfoProcessor(p.mediaInfo,p.media,p.context.logger),p.bM=new M.MediaInfoWrapper(p.mediaInfo,p.context.logger),p}return h(u,c),u.prototype.initializeCast=function(){c.prototype.initializeCast.call(this),this.fM()},u.prototype.getCurrentTime=function(c){if(void 0===c&&(c=y.TimeMode.AbsoluteTime),!this.remotePlayer)return 0;var u=this.remotePlayer.currentTime;return c===y.TimeMode.RelativeTime?u:this.cM(u)},u.prototype.cM=function(c){return c+this.eM()},u.prototype.dM=function(c){return c-this.eM()},u.prototype.eM=function(){var c,u,d,p=null==(u=null==(c=this.castSession)?void 0:c.getMediaSession())?void 0:u.customData;return null!=(d=null==p?void 0:p.startAbsoluteTime)?d:0},u.prototype.fM=function(){var c=this;this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,this.gM),this.context.eventHandler.on(y.PlayerEvent.PeriodSwitch,function(){new P.GoogleCastV3TrackFinder(c.mediaInfo).hasATrackToLoad()&&c.oM()})},u.prototype.sendMessage=function(c,u){this.config.messageNamespace&&this.castSession.sendMessage(this.config.messageNamespace,{type:"METADATA",data:u})},u.prototype.play=function(){var u=this;this.VM&&this.lastSource?this.setSource(this.lastSource).then(function(){return c.prototype.play.call(u)}):c.prototype.play.call(this),this.VM=!1},u.prototype.hM=function(c){var u=this.kM(c),d=u.url,p=u.mimeType,h=new chrome.cast.media.MediaInfo(d,p);return h.customData=(0,w.getCustomData)(c,p),h},u.prototype.getMediaInfo=function(c){var u,d=this.hM(c),p=this.context.sourceContext.sourceIdentifier,h=this.context.serviceManager.get(v.ServiceName.ManifestService,p);
129return null!=h&&h.isLive()&&(d.streamType=chrome.cast.media.StreamType.LIVE,this.XM=0),this.iM(null!=(u=c.subtitleTracks)?u:[],d),this.config.prepareMediaInfo?this.config.prepareMediaInfo(d):Promise.resolve(d)},u.prototype.iM=function(c,u){var d=new M.MediaInfoWrapper(u,this.context.logger);f(f([],c??[],!0),this.jM(),!0).forEach(function(c){return d.maybeAddInternalTrack(c)})},u.prototype.jM=function(){var c=this.context.internalPlayer.listSubtitles().filter(function(c){return c.isSideloaded}),u=this.context.internalPlayer.getAvailableAudio();return f(f([],c,!0),u,!0)},u.prototype.kM=function(c){var u,d;if(c.dash)u=c.dash,d=b.ManifestMimeType.Dash;else if(c.hls)u=c.hls,d=b.ManifestMimeType.Hls;else if(c.smooth)u=c.smooth,d=b.ManifestMimeType.Smooth;else{if(!c.progressive)throw Error("Source not supported.");var p=this.mM(c.progressive);u=p.url,d=p.mimeType}return{url:u=E.URLHelper.toFullUrl(u),mimeType:d}},u.prototype.timeShift=function(c){var u;this.XM=c,this.seek(((null==(u=this.lM())?void 0:u.end)||0)+c)},u.prototype.seek=function(u){c.prototype.seek.call(this,this.dM(u))},u.prototype.lM=function(){var c,u=null==(c=this.remotePlayer)?void 0:c.liveSeekableRange;return(null==u?void 0:u.start)===void 0||(null==u?void 0:u.end)===void 0?{start:-1,end:-1}:{start:this.cM(u.start),end:this.cM(u.end)}},u.prototype.getTimeShift=function(){var c=this.lM();if(c.end<0)return this.XM;var u=this.getCurrentTime()-c.end;return u>0?0:u},u.prototype.getMaxTimeShift=function(){var c,u,d=this.lM();return(null!=(c=null==d?void 0:d.start)?c:0)-(null!=(u=null==d?void 0:d.end)?u:0)},u.prototype.mM=function(c){var u,d;if(Array.isArray(c)){var p=k(c)[0];u=p.url,d=p.type}else u=c;return{url:u,mimeType:d}},u.prototype.release=function(){c.prototype.release.call(this),this.remotePlayerController&&this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,this.gM)},u.prototype.nM=function(c){var u,d,p=this;c&&(null!=(d=null==(u=c.customData)?void 0:u.needsReloadBeforePlay)&&d?this.oM().then(function(){p.ZM.enableTrack(c)}):this.ZM.enableTrack(c))},u.prototype.enableSubtitle=function(c){var u=new P.GoogleCastV3TrackFinder(this.mediaInfo).findTrackByInternalId(c,chrome.cast.media.TrackType.TEXT);u&&this.nM(u)},u.prototype.disableSubtitle=function(c){this.ZM.disableTrack(c,chrome.cast.media.TrackType.TEXT)},u.prototype.setAudio=function(c){var u=new P.GoogleCastV3TrackFinder(this.mediaInfo).findTrackByInternalId(c,chrome.cast.media.TrackType.AUDIO);u&&this.nM(u)},u.prototype.mediaInfoChangedEventHandler=function(u){c.prototype.mediaInfoChangedEventHandler.call(this,u),this.ZM.setMediaInfo(this.mediaInfo),this.bM=new M.MediaInfoWrapper(this.mediaInfo,this.context.logger),this.YM.maybeReMapTracksForMediaInfo(this.mediaInfo);var d,p,h=new M.MediaInfoWrapper(this.mediaInfo,this.context.logger);this.jM().forEach(function(c){return h.maybeAddInternalTrack(c)}),this.aM&&(null==(p=null==(d=this.mediaInfo)?void 0:d.tracks)?void 0:p.length)>0&&this.pM()},u.prototype.addSubtitle=function(c){this.bM.maybeAddInternalTrack(c)},u.prototype.removeSubtitle=function(c){var u,d,p=new M.MediaInfoWrapper(this.mediaInfo,this.context.logger),h=!!(null!=(d=null==(u=this.media)?void 0:u.activeTrackIds)&&d.find(function(u){return u===p.findTrackIdForTrack(c)}));p.maybeRemoveInternalTrack(c)&&h&&this.ZM.disableTrack(c,chrome.cast.media.TrackType.TEXT)},u.prototype.oM=function(){var c=new chrome.cast.media.LoadRequest(this.mediaInfo);return c.currentTime=this.context.internalPlayer.getCurrentTime(),c.autoplay=this.context.internalPlayer.isPlaying(),this.loadMediaRequest(c)},u.prototype.loadMediaRequest=function(u){var d=this;return this.YM.markAllTracksAsReadyToPlay(u.media.tracks),c.prototype.loadMediaRequest.call(this,u).then(function(){d.aM=!0,d.ZM.setMedia(d.media),d.ZM.setMediaInfo(d.mediaInfo),d.pM()})},u.prototype.pM=function(){var c,u=this;if(this.mediaInfo){this.aM=!1;var d=this.context.internalPlayer.listSubtitles().filter(function(c){return!!c.enabled}).map(function(c){return c.id});d.push(null==(c=this.context.internalPlayer.getAudio())?void 0:c.id),d=d.filter(
129Boolean);var p=new P.GoogleCastV3TrackFinder(this.mediaInfo).findTracksForIds(d),h=p.some(function(c){var u;return null==(u=c.customData)?void 0:u.needsReloadBeforePlay}),f=p.map(function(c){return c.trackId});if(!h)return this.ZM.changeActiveTracksBasedOnCastIds(f);this.oM().then(function(){u.ZM.changeActiveTracksBasedOnCastIds(f)})}},u}(T.GoogleCastRemoteControlBase)},7209:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.getCustomData=function(c,u){var d,g,v,y={};return f(c.drm)&&(y.drm=(0,h.getDrmConfig)(c.drm)),f(c.metadata)&&(y.metadata=c.metadata),f(c.options)&&(v=c.options,u===p.ManifestMimeType.Dash?(d=m(v,["dashWithCredentials","withCredentials"]),g=m(v,["dashManifestWithCredentials","manifestWithCredentials"])):u===p.ManifestMimeType.Hls&&(d=m(v,["hlsWithCredentials","withCredentials"]),g=m(v,["hlsManifestWithCredentials","manifestWithCredentials"])),y.options={withCredentials:d||!1,manifestWithCredentials:g||!1}),y};var p=d(85625),h=d(23747);function f(c){return Object.keys(c??{}).length>0}function m(c,u){for(var d,p=0;p<u.length;p++){var h=u[p];if(h in c){d=c[h];break}}return d}},2025:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.GoogleCastV3TrackFinder=void 0,u.GoogleCastV3TrackFinder=function(){function c(c){this.D7=c}return c.prototype.findTrackIdByInternalId=function(c,u){var d,p;return null!=(p=null==(d=this.findTrackByInternalId(c,u))?void 0:d.trackId)?p:null},c.prototype.findTrackByInternalId=function(c,u){var d,p,h;return null!=(h=(null!=(p=null==(d=this.D7)?void 0:d.tracks)?p:[]).find(function(d){var p;return(null==(p=d.customData)?void 0:p.internalId)===c&&d.type===u}))?h:null},c.prototype.findTracksForIds=function(c){var u,d;return(null!=(d=null==(u=this.D7)?void 0:u.tracks)?d:[]).filter(function(u){var d;return c.includes(null==(d=u.customData)?void 0:d.internalId)})},c.prototype.hasATrackToLoad=function(){var c,u;return!!(null!=(u=null==(c=this.D7)?void 0:c.tracks)&&u.find(function(c){var u;return null==(u=c.customData)?void 0:u.needsReloadBeforePlay}))},c.prototype.setMediaInfo=function(c){this.D7=c},c}()},94952:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.wrapCustomElementRegistry=function(){var c,u,p="object"==typeof(u=c=window.customElements)&&["get","define","whenDefined","upgrade"].every(function(c){return"function"==typeof u[c]})?c:void 0;void 0===d&&void 0!==p&&(d=new h(p),Object.defineProperty(window,"customElements",{get:function(){return d}}))};var d,p=["google-cast-button","google-cast-launcher"],h=function(){function c(c){this.registry=c}return c.prototype.define=function(c,u,d){var h=p.includes(c),f=!!this.registry.get(c);h&&f||this.registry.define(c,u,d)},c.prototype.whenDefined=function(c){return this.registry.whenDefined(c)},c.prototype.get=function(c){return this.registry.get(c)},c.prototype.upgrade=function(c){this.registry.upgrade(c)},c}()},92682:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.RemoteControlModuleDefinition=void 0;var p=d(62756),h=d(42489);u.RemoteControlModuleDefinition={name:p.ModuleName.RemoteControl,module:{RemoteControlManager:h.RemoteControlManager}},u.default=u.RemoteControlModuleDefinition},60768:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.RemoteControlMessageType=void 0,(p=d||(u.RemoteControlMessageType=d={}))[p.SourceSetup=0]="SourceSetup",p[p.PlayerApiMethodCall=1]="PlayerApiMethodCall",p[p.CustomData=2]="CustomData"},35317:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.RemoteControlBase=void 0;var p,h,f=d(20213),m=d(60768),g=d(30165);(p=h||(h={}))[p.Idle=0]="Idle",p[p.Ready=1]="Ready",p[p.Connected=2]="Connected",u.RemoteControlBase=function(){function c(c){this.context=c,this.B7=h.Idle}return Object.defineProperty(c.prototype,"B7",{get:function(){return this.z7},set:function(c){this.context.logger.debug("Remote control session state change: ".concat(h[this.z7]," -> ").concat(h[c])),this.z7=c},enumerable:!1,configurable:!0}),c.prototype.getConfig=function(){throw Error("Not implemented - overwrite in subclasses!")},c.prototype.setOnErrorCallback=function(c){this.s7=c},c.prototype.setOnReadyCallback=function(c){this.t7=c},c.prototype.setOnConnectCallback=function(c){this.u7=c},c.prototype.setOnConnectedCallback=function(c){this.v7=c},c.prototype.setOnDisconnectCallback=function(c){this.w7=c},c.prototype.setOnDisconnectedCallback=function(c){this.x7=c},c.prototype.setOnRemotePlayerEventCallback=function(c){this.y7=c}
vendor: 18,043 bytes, line 129
129,c.prototype.isReady=function(){return this.B7===h.Ready},c.prototype.isConnected=function(){return this.B7===h.Connected},c.prototype.onError=function(){this.B7=h.Ready,this.s7&&this.s7()},c.prototype.onReady=function(c){void 0===c&&(c=!0);var u=c?h.Ready:h.Idle;this.B7!==u&&(this.B7=u,this.t7&&this.t7({receiverAvailable:c}))},c.prototype.C7=function(){this.playerState={isPlaying:!1,isPaused:!1,hasEnded:!1,isMuted:!1,isStalled:!1,isLive:!1,getVolume:1,getCurrentTime:0,getRelativeCurrentTime:0,getDuration:0,getVersion:"",getDroppedVideoFrames:0,getForwardBufferLevelForVideo:0,getBackwardBufferLevelForVideo:0,getForwardBufferLevelForAudio:0,getBackwardBufferLevelForAudio:0,getTotalStalledTime:0,getDownloadedVideoData:null,getDownloadedAudioData:null,getPlaybackVideoData:null,getPlaybackAudioData:null,getMaxTimeShift:0,getTimeShift:0,getSubtitle:null,getAudio:null}},c.prototype.onConnect=function(c){this.u7&&this.u7({deviceName:c}),this.C7()},c.prototype.onConnected=function(c,u){this.B7=h.Connected,this.C7(),this.v7&&this.v7({deviceName:c,resumed:u})},c.prototype.onDisconnect=function(){this.w7&&this.w7()},c.prototype.onDisconnected=function(){this.B7=h.Ready,this.x7&&this.x7()},c.prototype.onRemotePlayerEvent=function(c){this.y7&&this.y7(c)},c.prototype.sendMethodCallMessage=function(c,u){var d=[];u&&(d=Array.isArray(u)?u:1===u.length?[u[0]]:Array.apply(null,u)),this.sendMessage(m.RemoteControlMessageType.PlayerApiMethodCall,{methodName:c,arguments:d})},c.prototype.handleRemoteControlReceiverMessage=function(c){switch(c.type){case g.RemoteControlReceiverMessageType.PlayerState:return this.playerState=c.data,!0;case g.RemoteControlReceiverMessageType.PlayerEvent:var u=c.data;return this.onRemotePlayerEvent(u),!0;case g.RemoteControlReceiverMessageType.PlayerGetterCallReturnValue:return!0}return!1},c.prototype.play=function(){this.sendMethodCallMessage("play")},c.prototype.pause=function(){this.sendMethodCallMessage("pause")},c.prototype.seek=function(c){this.sendMethodCallMessage("seek",[c])},c.prototype.setTargetBufferLevel=function(c,u,d){this.sendMethodCallMessage("setTargetBufferLevel",[c,u,d])},c.prototype.setVolume=function(c){this.sendMethodCallMessage("setVolume",[c])},c.prototype.setMuted=function(c){c?this.sendMethodCallMessage("mute"):this.sendMethodCallMessage("unmute")},c.prototype.isPlaying=function(){return this.playerState.isPlaying},c.prototype.isPaused=function(){return this.playerState.isPaused},c.prototype.getCurrentTime=function(c){return void 0===c&&(c=f.TimeMode.AbsoluteTime),c===f.TimeMode.AbsoluteTime?this.playerState.getCurrentTime:this.playerState.getRelativeCurrentTime},c.prototype.getVolume=function(){return this.playerState.getVolume},c.prototype.isMuted=function(){return this.playerState.isMuted},c.prototype.hasEnded=function(){return this.playerState.hasEnded},c.prototype.isStalled=function(){return this.playerState.isStalled},c.prototype.isLive=function(){return this.playerState.isStalled},c.prototype.getDuration=function(){return this.playerState.getDuration},c.prototype.getDroppedVideoFrames=function(){return this.playerState.getDroppedVideoFrames},c.prototype.getBufferLevel=function(c,u){var d={level:0,targetLevel:this.context.bufferSettings.getTargetLevel(c,u),type:c,media:u};return f.BufferType.ForwardDuration?u===f.MediaType.Video?d.level=this.playerState.getForwardBufferLevelForVideo:u===f.MediaType.Audio&&(d.level=this.playerState.getForwardBufferLevelForAudio):f.BufferType.BackwardDuration&&(u===f.MediaType.Video?d.level=this.playerState.getBackwardBufferLevelForVideo:u===f.MediaType.Audio&&(d.level=this.playerState.getBackwardBufferLevelForAudio)),d},c.prototype.getTotalStalledTime=function(){return this.playerState.getTotalStalledTime},c.prototype.getDownloadedVideoData=function(){return this.playerState.getDownloadedVideoData},c.prototype.getDownloadedAudioData=function(){return this.playerState.getDownloadedAudioData},c.prototype.getPlaybackVideoData=function(){return this.playerState.getPlaybackVideoData},c.prototype.getPlaybackAudioData=function(){return this.playerState.getPlaybackAudioData},c.prototype.getTimeShift=function(){return this.playerState.getTimeShift},c.prototype.getMaxTimeShift=function(){return this.playerState.getMaxTimeShift},c.prototype.preload=function(){this.sendMethodCallMessage("preload",[])},c.prototype.setAudioQuality=function(c){this.sendMethodCallMessage("setAudioQuality",[c])},c.prototype.setVideoQuality=function(c){this.sendMethodCallMessage("setVideoQuality",[c])},c.prototype.setQueryParameters=function(c){this.sendMethodCallMessage("setQueryParameters",[c])},c.prototype.clearQueryParameters=function(){this.sendMethodCallMessage("clearQueryParameters",[])},c.prototype.timeShift=function(c){this.sendMethodCallMessage("timeShift",[c])},c.prototype.enableSubtitle=function(c){this.sendMethodCallMessage("subtitles.enable",[c])},c.prototype.disableSubtitle=function(c){this.sendMethodCallMessage("subtitles.disable",[c])},c.prototype.setAudio=function(c){this.sendMethodCallMessage("setAudio",[c])},c.prototype.getSnapshot=function(c,u){this.sendMethodCallMessage("getSnapshot",[c,u])},c.prototype.setPlaybackSpeed=function(c){this.sendMethodCallMessage("setPlaybackSpeed",[c])},c.prototype.unload=function(){return this.sendMethodCallMessage("unload"),Promise.resolve()},c}()},42489:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.RemoteControlManager=void 0;var p=d(23690),h=d(85648),f=d(68657),m=d(32645),g=d(61348),v=d(23747),y=d(94952),b=d(77118),S=d(91297);u.RemoteControlManager=function(){function c(u,d){var p;this.Xj=c.setupRemoteControl(u),this.Xj instanceof m.GoogleCastRemoteControlBase&&(p=u.config.location.cast,(0,y.wrapCustomElementRegistry)(),d.removeScript(p,"cast_sender.js"),d.removeScript(p,"cast_framework.js"),setTimeout(function(){return d.loadScript(p)},0))}return c.prototype.getPlayerWrapper=function(c,u){return new b.RemoteControlPlayerWrapper(c,u,this.Xj)},c.setupRemoteControl=function(c){if(null==c.config||null==c.settings)return null;var u=c.config,d=c.settings;if((u.cast&&u.cast.enable||(!u.cast||u.cast&&!u.cast.hasOwnProperty("enable"))&&u.remotecontrol&&"googlecast"===u.remotecontrol.type)&&(u.remotecontrol&&"googlecast"===u.remotecontrol.type&&u.remotecontrol.receiverApplicationId?(d.CAST_APPLICATION_ID=u.remotecontrol.receiverApplicationId,c.logger.debug("ChromeCast setting application ID to ".concat(d.CAST_APPLICATION_ID))):u.cast&&u.cast.application_id?(d.CAST_APPLICATION_ID=u.cast.application_id,c.logger.debug("ChromeCast setting application ID to ".concat(d.CAST_APPLICATION_ID))):c.logger.debug("ChromeCast using default application ID ".concat(d.CAST_APPLICATION_ID)),u.remotecontrol&&"googlecast"===u.remotecontrol.type&&u.remotecontrol.messageNamespace?0===u.remotecontrol.messageNamespace.indexOf("urn:x-cast:")?d.CAST_MESSAGE_NAMESPACE=u.remotecontrol.messageNamespace:(c.logger.debug("ChromeCast setting message namespace failed! Namespace must start with urn:x-cast:"),c.logger.debug("ChromeCast using default message namespace ".concat(d.CAST_MESSAGE_NAMESPACE))):u.cast&&u.cast.message_namespace?0===u.cast.message_namespace.indexOf("urn:x-cast:")?(d.CAST_MESSAGE_NAMESPACE=u.cast.message_namespace,c.logger.debug("ChromeCast setting message namespace to ".concat(d.CAST_MESSAGE_NAMESPACE))):(c.logger.debug("ChromeCast setting message namespace failed! Namespace must start with urn:x-cast:"),c.logger.debug("ChromeCast using default message namespace ".concat(d.CAST_MESSAGE_NAMESPACE))):c.logger.debug("ChromeCast using default message namespace ".concat(d.CAST_MESSAGE_NAMESPACE)),u.hasOwnProperty("remotecontrol")||(u.remotecontrol={type:"googlecast",receiverApplicationId:d.CAST_APPLICATION_ID,messageNamespace:d.CAST_MESSAGE_NAMESPACE,customReceiverConfig:{receiverStylesheetUrl:u.cast.receiverStylesheetUrl||null}})),u.remotecontrol&&u.remotecontrol.type)switch(u.remotecontrol.type){case"googlecast":return u.remotecontrol.receiverApplicationId=u.remotecontrol.receiverApplicationId||d.CAST_APPLICATION_ID,u.remotecontrol.messageNamespace=u.remotecontrol.messageNamespace||d.CAST_MESSAGE_NAMESPACE,u.remotecontrol.receiverVersion===f.GoogleCastReceiverVersion.v3?(c.store.dispatch((0,p.setRemoteControlType)(h.RemoteControlType.GoogleCastV3)),new v.GoogleCastRemoteControlV3(c,u.remotecontrol)):(c.store.dispatch((0,p.setRemoteControlType)(h.RemoteControlType.GoogleCastV2)),new g.GoogleCastRemoteControlV2(c,u.remotecontrol));case"websocket":return c.store.dispatch((0,p.setRemoteControlType)(h.RemoteControlType.Websocket)),new S.WebSocketRemoteControl(c,u.remotecontrol);default:c.logger.debug("unknown remote control type: "+u.remotecontrol.type)}return null},c}()},77118:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.RemoteControlPlayerWrapper=u.addStartOffset=u.clamp=u.getForwardBufferDiff=void 0;var p=d(3714),h=d(75375),f=d(44468),m=d(23690),g=d(87827),v=d(85648),y=d(71223),b=d(32645),S=d(60768);u.getForwardBufferDiff=function(c){return c.getBufferLevel(f.BufferType.ForwardDuration,f.MediaType.Video).targetLevel-20},u.clamp=function(c,u,d){return Math.max(u,Math.min(d,c))},u.addStartOffset=function(c,d,p){var h=!!(c.options&&c.options.startOffset);return(d||!h)&&(c.options=c.options||{},c.options.startOffset=p.isLive()?p.getTimeShift()-(0,u.getForwardBufferDiff)(p):p.getCurrentTime()),c};var _=function(){function c(c,d,h){var f=this;if(this.DN=!1,this.EN=!1,this.AN=c,this.BN=d,this.CN=h,h){var g=!1,b=!1,S=function(){f.EN=f.BN.isPlaying(),f.BN.pause()};h.setOnErrorCallback(function(){c.logger.debug("Remote error"),c.eventHandler.dispatchEvent(p.PlayerEvent.CastStopped),g&&(g=!1,f.GN(),c.store.dispatch((0,m.setConnectionState)(v.ConnectionState.Disconnected)))}),h.setOnReadyCallback(function(u){c.logger.debug("Remote ready"),c.eventHandler.dispatchEvent(p.PlayerEvent.CastAvailable,{receiverAvailable:u.receiverAvailable})}),h.setOnConnectCallback(function(u){c.logger.debug("Remote connect",u),c.store.dispatch((0,m.setConnectionState)(v.ConnectionState.Connecting)),S(),c.eventHandler.dispatchEvent(p.PlayerEvent.CastWaitingForDevice,{castPayload:{deviceName:u.deviceName,currentTime:void 0,timestamp:void 0,type:void 0}})}),h.setOnConnectedCallback(function(d){c.logger.debug("Remote connected",d),c.store.dispatch((0,m.setConnectionState)(v.ConnectionState.Connected));var _=(0,y.isSameSource)(h.getSource(),c.sourceContext.source);if(d.resumed&&S(),!d.resumed||!_){c.settings.QUERY_PARAMETERS&&h.setQueryParameters(c.settings.QUERY_PARAMETERS),null!=h.getConfig()&&h.getConfig().customReceiverConfig&&f.addMetadata("CAST",{type:"customReceiverConfig",data:h.getConfig().customReceiverConfig});var E=(0,u.addStartOffset)(c.sourceContext.source,f.DN,f.BN);h.setSource(E,f.FN(),f.BN.getCurrentTime()),b=!0}c.eventHandler.dispatchEvent(p.PlayerEvent.CastStarted,{deviceName:d.deviceName,resuming:d.resumed}),g=!0,c.eventHandler.dispatchEvent(p.PlayerEvent.VolumeChanged)}),h.setOnDisconnectCallback(function(){c.store.dispatch((0,m.setConnectionState)(v.ConnectionState.Disconnecting)),c.logger.debug("Remote disconnect")}),h.setOnDisconnectedCallback(function(){c.logger.debug("Remote disconnected"),c.store.dispatch((0,m.setConnectionState)(v.ConnectionState.Disconnected)),c.eventHandler.dispatchEvent(p.PlayerEvent.CastStopped),g=!1,f.GN(),c.eventHandler.dispatchEvent(p.PlayerEvent.VolumeChanged)}),h.setOnRemotePlayerEventCallback(function(u){if(c.logger.debug("Remote player state changed",u),b)switch(u.event){case p.PlayerEvent.Play:case p.PlayerEvent.Paused:b=!1;for(var f=0,m=d.listSubtitles();f<m.length;f++){var g=m[f];h.addSubtitle(g),g.enabled&&h.enableSubtitle(g.id)}}var v=u.data||{};v.remote=!0,c.eventHandler.dispatchEvent(u.event,v)})}else c.logger.debug("No remote control passed into wrapper")}return c.prototype.FN=function(){return this.AN.config&&this.AN.config.playback&&this.AN.config.playback.autoplay||this.EN},c.prototype.GN=function(){var c=this.AN.settings.ENABLE_SEEK_FOR_LIVE;if(this.BN.isLive()&&!c){var d=this.CN.getTimeShift()+(0,u.getForwardBufferDiff)(this.BN),p=this.BN.getMaxTimeShift();this.BN.timeShift((0,u.clamp)(d,p,0))}else{var h=this.BN.getSeekableRange(),f=this.CN.getCurrentTime();this.BN.seek((0,u.clamp)(f,h.start,h.end))}this.CN.isPlaying()?this.BN.play():this.BN.pause()},c.prototype.HN=function(){return null!=this.CN&&this.CN.isReady()},c.prototype.IN=function(){return null!=this.CN&&this.CN.isConnected()},c.prototype.JN=function(c){var u=(0,g.getRemoteControlState)(this.AN.store.getState().player).remoteControlType===v.RemoteControlType.GoogleCastV3;c===h.UI_SEEK_ISSUER_NAME&&u||this.CN.pause()},c.prototype.KN=function(c){this.BN.pause(c)},c.prototype.getAvailableSegments=function(){return this.BN.getAvailableSegments()},c.prototype.play=function(c){return this.DN=!0,this.IN()?(this.CN.play(),Promise.resolve()):this.BN.play(c)},c.prototype.preload=function(){this.IN()?this.CN.preload():this.BN.preload()},c.prototype.pause=function(c){this.IN()?this.JN(c):this.KN(c)},c.prototype.mute=function(c){this.IN()&&this.CN.setMuted(!0),this.BN.mute(c)},c.prototype.unmute=function(c){this.IN()&&this.CN.setMuted(!1),this.BN.unmute(c)},c.prototype.setVolume=function(c,u){this.IN()?this.CN.setVolume(c/100):this.BN.setVolume(c,u)},c.prototype.seek=function(c,u){return this.IN()?(this.CN.seek(c),!0):this.BN.seek(c,u)},c.prototype.setAudioQuality=function(c){this.IN()&&this.CN.setAudioQuality(c),this.BN.setAudioQuality(c)},c.prototype.setVideoQuality=function(c){this.IN()&&this.CN.setVideoQuality(c),this.BN.setVideoQuality(c)},c.prototype.prepareLoad=function(){return this.BN.prepareLoad()},c.prototype.prepareSource=function(c,u){return this.BN.prepareSource(c,u)},c.prototype.load=function(c,u,d){return this.IN()&&this.CN.setSource(this.AN.sourceContext.source,this.FN()),this.BN.load(c,u,d)},c.prototype.unload=function(c){return this.IN()&&this.CN.unload(),this.BN?this.BN.unload(c):Promise.resolve()},c.prototype.isPlaying=function(){return this.IN()?this.CN.isPlaying():this.BN.isPlaying()},c.prototype.isPaused=function(){return this.IN()?this.CN.isPaused():this.BN.isPaused()},c.prototype.hasEnded=function(){return this.IN()?this.CN.hasEnded():this.BN.hasEnded()},c.prototype.isMuted=function(){return this.IN()?this.CN.isMuted():this.BN.isMuted()},c.prototype.isStalled=function(){return this.IN()?this.CN.isStalled():this.BN.isStalled()},c.prototype.isLive=function(){return this.BN.isLive()},c.prototype.getVolume=function(){return this.IN()?100*this.CN.getVolume():this.BN.getVolume()},c.prototype.getCurrentTime=function(c){return void 0===c&&(c=f.TimeMode.AbsoluteTime),this.IN()?this.CN.getCurrentTime(c):this.BN.getCurrentTime(c)},c.prototype.getDuration=function(){return this.BN.getDuration()},c.prototype.getAvailableVideoQualities=function(){return this.BN.getAvailableVideoQualities()},c.prototype.getAvailableAudioQualities=function(){return this.BN.getAvailableAudioQualities()},c.prototype.getDroppedVideoFrames=function(){return this.IN()?this.CN.getDroppedVideoFrames():this.BN.getDroppedVideoFrames()},c.prototype.setTargetBufferLevel=function(c,u,d){return this.IN()?this.CN.setTargetBufferLevel(c,u,d):this.BN.setTargetBufferLevel(c,u,d)},c.prototype.getBufferLevel=function(c,u){return this.IN()?this.CN.getBufferLevel(c,u):this.BN.getBufferLevel(c,u)},c.prototype.getTotalStalledTime=function(){return this.IN()?this.CN.getTotalStalledTime():this.BN.getTotalStalledTime()},c.prototype.getDownloadedVideoData=function(){return this.IN()?this.CN.getDownloadedVideoData():this.BN.getDownloadedVideoData()},c.prototype.getDownloadedAudioData=function(){return this.IN()?this.CN.getDownloadedAudioData():this.BN.getDownloadedAudioData()},c.prototype.getPlaybackVideoData=function(){return this.IN()?this.CN.getPlaybackVideoData():this.BN.getPlaybackVideoData()},c.prototype.getPlaybackAudioData=function(){return this.IN()?this.CN.getPlaybackAudioData():this.BN.getPlaybackAudioData()},c.prototype.getBufferedRanges=function(){return this.BN.getBufferedRanges()},c.prototype.getManifest=function(){return this.BN.getManifest()},c.prototype.isCasting=function(){return this.IN()},c.prototype.isCastAvailable=function(){return this.HN()||this.IN()},c.prototype.castVideo=function(){this.HN()&&(this.CN.connect(),this.AN.eventHandler.dispatchEvent(p.PlayerEvent.CastStart))},c.prototype.castStop=function(){if(this.IN()){if(this.CN instanceof b.GoogleCastRemoteControlBase)return this.CN.connect();this.CN.disconnect()}},c.prototype.updateCallback=function(c){this.BN.updateCallback(c)},c.prototype.setQueryParameters=function(c){this.IN()&&this.CN.setQueryParameters(c),this.BN.setQueryParameters(c)},c.prototype.clearQueryParameters=function(){this.IN()&&this.CN.clearQueryParameters(),this.BN.clearQueryParameters()},c.prototype.getMaxTimeShift=function(){return this.IN()?this.CN.getMaxTimeShift():this.BN.getMaxTimeShift()},c.prototype.timeShift=function(c,u){this.IN()?this.CN.timeShift(c):this.BN.timeShift(c,u)},c.prototype.getTimeShift=function(){return this.IN()?this.CN.getTimeShift():this.BN.getTimeShift()},c.prototype.addSubtitle=function(c){return this.IN()&&this.CN.addSubtitle(c),this.BN.addSubtitle(c)},c.prototype.removeSubtitle=function(c){this.IN()&&this.CN.removeSubtitle(c),this.BN.removeSubtitle(c)},c.prototype.enableSubtitle=function(c){return this.IN()&&this.CN.enableSubtitle(c),this.BN.enableSubtitle(c)},c.prototype.disableSubtitle=function(c){return this.IN()&&this.CN.disableSubtitle(c),this.BN.disableSubtitle(c)},c.prototype.listSubtitles=function(){return this.BN.listSubtitles()},c.prototype.getAudioQuality=function(){return this.BN.getAudioQuality()},c.prototype.getVideoQuality=function(){return this.BN.getVideoQuality()},c.prototype.setAudio=function(c){this.IN()&&this.CN.setAudio(c),this.BN.setAudio(c)},c.prototype.getAvailableAudio=function(){return this.BN.getAvailableAudio()},c.prototype.getAudio=function(){return this.BN.getAudio()},c.prototype.getSnapshot=function(c,u){if(!this.IN())return this.BN.get
129Snapshot(c,u)},c.prototype.setPlaybackSpeed=function(c){this.IN()&&this.CN.setPlaybackSpeed(c),this.BN.setPlaybackSpeed(c)},c.prototype.getPlaybackSpeed=function(){return this.BN.getPlaybackSpeed()},c.prototype.permitControl=function(c){this.BN.permitControl(c)},c.prototype.addMetadata=function(c,u){return!("CAST"!==c.toUpperCase()||!this.IN()||(this.CN.sendMessage(S.RemoteControlMessageType.CustomData,u),0))},c.prototype.onFullscreenEnter=function(c){this.BN.onFullscreenEnter(c)},c.prototype.onFullscreenExit=function(){this.BN.onFullscreenExit()},c.prototype.isAirplayAvailable=function(){return this.BN.isAirplayAvailable()},c.prototype.isAirplayActive=function(){return this.BN.isAirplayActive()},c.prototype.showAirplayTargetPicker=function(){this.BN.showAirplayTargetPicker()},c.prototype.getSeekableRange=function(){return this.BN.getSeekableRange()},c.prototype.getLatency=function(){return this.BN.getLatency()},c.prototype.setTargetLatency=function(c){this.BN.setTargetLatency(c)},c.prototype.getTargetLatency=function(){return this.BN.getTargetLatency()},c.prototype.setCatchupConfig=function(c){this.BN.setCatchupConfig(c)},c.prototype.getCatchupConfig=function(){return this.BN.getCatchupConfig()},c.prototype.setFallbackConfig=function(c){this.BN.setFallbackConfig(c)},c.prototype.getFallbackConfig=function(){return this.BN.getFallbackConfig()},c.prototype.createManifestApi=function(){return this.BN.createManifestApi()},c.prototype.release=function(c){var u=this;return null!=this.CN&&(this.CN.setOnErrorCallback(null),this.CN.setOnReadyCallback(null),this.CN.setOnConnectCallback(null),this.CN.setOnConnectedCallback(null),this.CN.setOnDisconnectCallback(null),this.CN.setOnDisconnectedCallback(null),this.CN.setOnRemotePlayerEventCallback(null),this.CN.release()),this.BN.release(c).then(function(){u.BN=null,u.CN=null})},c}();u.RemoteControlPlayerWrapper=_},30165:function(c,u){var d,p,h,f;Object.defineProperty(u,"__esModule",{value:!0}),u.UnsupportedPlayerApiMethods=u.RemoteControlReceiverMessageType=void 0,(h=d||(u.RemoteControlReceiverMessageType=d={}))[h.PlayerState=0]="PlayerState",h[h.PlayerEvent=1]="PlayerEvent",h[h.PlayerGetterCallReturnValue=2]="PlayerGetterCallReturnValue",(f=p||(u.UnsupportedPlayerApiMethods=p={})).GET_CONTAINER="getContainer",f.GET_SNAPSHOT="getSnapShot",f.GET_VIDEO_ELEMENT="getVideoElement"},61567:function(__unused_webpack_module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.RemoteJSON=void 0;var RemoteJSON=function(){function RemoteJSON(){}return RemoteJSON.stringifyFunction=function(c){if("function"==typeof c)return RemoteJSON.FUNCTION_PREFIX+c.toString()},RemoteJSON.parseFunction=function(fs){if(fs&&"string"==typeof fs&&0===fs.indexOf(RemoteJSON.FUNCTION_PREFIX)){var f="f = "+fs.substring(RemoteJSON.FUNCTION_PREFIX.length);if(eval(f),"function"==typeof f)return f}},RemoteJSON.stringify=function(c,u,d){return JSON.stringify(c,function(c,d){return"function"==typeof d?RemoteJSON.stringifyFunction(d):u?u(c,d):d},d)},RemoteJSON.parse=function(c,u){return JSON.parse(c,function(c,d){return RemoteJSON.parseFunction(d)||(u?u(c,d):d)})},RemoteJSON.FUNCTION_PREFIX="function::",RemoteJSON}();exports.RemoteJSON=RemoteJSON},91297:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(u,"__esModule",{value:!0}),u.WebSocketRemoteControl=void 0;var f=d(60768),m=d(35317),g=d(61567);u.WebSocketRemoteControl=function(c){function u(u,d){var p=c.call(this,u)||this;return p.LN=d,window.WebSocket&&p.onReady(),p}return h(u,c),u.prototype.getConfig=function(){return this.LN},u.prototype.connect=function(){var c=this;if(!this.isReady())throw Error("Remote is not ready");this.onConnect("WebSocket Receiver"),this.MN=new WebSocket(this.LN.url+"?role=remote"),this.MN.addEventListener("open",function(u){c.onConnected("WebSocket Receiver",!1)}),this.MN.addEventListener("error",function(u){c.context.logger.debug("Error",u),c.onError()}),this.MN.addEventListener("close",function(u){c.context.logger.debug("Close",u),c.onDisconnected()}),this.MN.addEventListener("message",function(u){return c.ON(u)})},u.prototype.ON=function(c){if(c.data)try{var u=JSON.parse(c.data);this.handleRemoteControlReceiverMessage(u)}catch{this.context.logger.error("message parsing failed",c.data)}else this.context.logger.log("unknown message received",c.data)},u.prototype.sendMessage=function(c,u){this.MN.send(g.RemoteJSON.stringify({type:c,data:u}))},u.prototype.addSubtitle=function(c){this.sendMethodCallMessage("subtitles.add",[c])},u.prototype.removeSubtitle=function(c){this.sendMethodCallMessage("subtitles.remove",[c])},u.prototype.disconnect=function(){this.onDisconnect(),this.MN.close()},u.prototype.release=function(){},u.prototype.setSource=function(c,u,d){this.NN=c,this.sendMessage(f.RemoteControlMessageType.SourceSetup,{source:c,autoplay:u,time:d})},u.prototype.getSource=function(){return this.NN},u}(m.RemoteControlBase)}
129,58367:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.EditTrackInfoProcessor=void 0;var p=d(2025),h=d(26662);u.EditTrackInfoProcessor=function(){function c(c,u,d){this.F7=Promise.resolve(),this.E7=new p.GoogleCastV3TrackFinder(c),this.media=u,this.logger=d}return c.prototype.setMedia=function(c){this.media=c},c.prototype.setMediaInfo=function(c){this.E7.setMediaInfo(c)},c.prototype.enableTrack=function(c){var u,d=this,p=c.trackId;this.H7(null==(u=c.customData)?void 0:u.internalId,c.type,p)&&p&&this.F7.then(function(){var u=d.G7(c.type);return u.push(p),new h.EditTrackInfoRequest(d.media,u,d.logger).execute()})},c.prototype.G7=function(c){if(!this.media||!this.media.activeTrackIds)return[];var u,d=this.media.activeTrackIds,p=null==(u=this.media.media)?void 0:u.tracks;if(!p)return d;var h=p.filter(function(u){return u.type!==c});return d.filter(function(c){return h.find(function(u){return u.trackId===c})})},c.prototype.disableTrack=function(c,u){var d,p=this.E7.findTrackIdByInternalId(c,u);if(this.H7(c,u,p)&&p){var f=((null==(d=this.media)?void 0:d.activeTrackIds)||[]).filter(function(c){return c!==p});this.F7=new h.EditTrackInfoRequest(this.media,f,this.logger).execute()}},c.prototype.changeActiveTracksBasedOnCastIds=function(c){this.media&&(this.F7=new h.EditTrackInfoRequest(this.media,c,this.logger).execute())},c.prototype.H7=function(c,u,d){return this.media?null!==d||(this.logger.debug("EditTrackInfoProcessor: Could not make track request. No trackId found for combination:",{requestId:c,type:u}),!1):(this.logger.debug("EditTrackInfoProcessor: Media info is not initialized."),!1)},c}()},26662:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.EditTrackInfoRequest=void 0,u.EditTrackInfoRequest=function(){function c(c,u,d){this.peb=c,this.qeb=u,this.reb=d}return c.prototype.execute=function(){var c=this;return new Promise(function(u,d){if(c.peb){var p=new chrome.cast.media.EditTracksInfoRequest(c.qeb);c.peb.editTracksInfo(p,u,d)}else d("Media is not initialized properly.")}).catch(function(u){c.reb.debug("Problem executing EditTrackInfoRequest",u)})},c}()},13748:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.MediaInfoTrackMapper=void 0;var h=d(80186),f=d(57230);u.MediaInfoTrackMapper=function(){function c(c){this.context=c}return c.prototype.maybeReMapTracksForMediaInfo=function(c){null!=c&&c.tracks&&this.mapTracksWithNoInternalId(c.tracks)},c.prototype.mapTracksWithNoInternalId=function(c){var u=this,d=c.filter(function(c){var u;return!(null!=(u=c.customData)&&u.internalId)}),p={};d.forEach(function(d){var h=d.type,f=p[h];f||(f=u.K7(d),p[h]=f),u.I7(d,c,f)})},c.prototype.I7=function(c,u,d){var h;if(!(null!=(h=null==c?void 0:c.customData)&&h.internalId)&&null!=u&&u.length){var f=this.J7(c,u,d);f?c.customData=p(p({},c.customData),{internalId:f}):this.context.logger.debug("Could not map track for language:",c.language,"No relevant internal track was found.",c)}},c.prototype.J7=function(c,u,d){var p,f,m,g=d.filter(function(u){return(0,h.bothTracksHaveSameLanguage)(u,c)}),v=null==(p=g[0])?void 0:p.id;if(g.length>0){var y=u.filter(function(c){var u;return!!(null!=(u=c.customData)&&u.internalId)}).map(function(c){return c.customData.internalId});return null!=(m=null==(f=g.find(function(c){return!y.includes(c.id)}))?void 0:f.id)?m:null}return v},c.prototype.K7=function(c){return(0,f.isSubtitle)(c)?this.context.internalPlayer.listSubtitles():(0,f.isAudio)(c)?this.context.internalPlayer.getAvailableAudio():[]},c.prototype.markAllTracksAsReadyToPlay=function(c){null==c||c.forEach(function(c){c.customData&&(c.customData.needsReloadBeforePlay=!1)})},c}()},15529:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.MediaInfoWrapper=void 0;var p=d(57230);u.MediaInfoWrapper=function(){function c(c,u){c&&!Array.isArray(c.tracks)&&(c.tracks=[]),this.L7=c,this.M7=u}return c.prototype.N7=function(){var c,u,d,p=null==(c=this.L7)?void 0:c.tracks;return null!=p&&p.length&&null!=(d=null==(u=p[p.length-1])?void 0:u.trackId)?d:0},c.prototype.maybeAddInternalTrack=function(c){if(this.L7&&!(this.O7(c.id)>=0)){var u=(0,p.fromInternalTrackToGoogleTrack)(c,this.N7()+1);(0,p.isValidTrack)(u)?this.L7.tracks.push(u):this.M7.debug("Trying to add an invali
129d track",u)}},c.prototype.maybeRemoveInternalTrack=function(c){var u,d,p=this.O7(c);return p>-1&&(null==(d=null==(u=this.L7)?void 0:u.tracks)||d.splice(p,1)),p>-1},c.prototype.O7=function(c){var u;return c&&null!=(u=this.L7)&&u.tracks?this.L7.tracks.findIndex(function(u){var d;return c===(null==(d=u.customData)?void 0:d.internalId)}):-1},c.prototype.findTrackIdForTrack=function(c){var u,d,p;return null!=(p=null==(d=null==(u=this.L7)?void 0:u.tracks[this.O7(c)])?void 0:d.trackId)?p:-1},c}()},80186:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.bothTracksHaveSameLanguage=function(c,u){var d,h,f,m,g;return!!u.language&&((null==(d=c.lang)?void 0:d.toLowerCase())===u.language.toLowerCase()||(h=u.language,f=c.lang,(m=p.SHAKA_ISO_MAP[h])?f===m:(null!=(g=Object.keys(p.SHAKA_ISO_MAP).find(function(c){return f===p.SHAKA_ISO_MAP[c]||f===c}))?p.SHAKA_ISO_MAP[g]:null)===h))};var p=d(90435)},57230:function(c,u){function d(c){return c.type===chrome.cast.media.TrackType.AUDIO}Object.defineProperty(u,"__esModule",{value:!0}),u.fromInternalTrackToGoogleTrack=function(c,u){var p,h,f,m,g,v=c.getQualities?chrome.cast.media.TrackType.AUDIO:chrome.cast.media.TrackType.TEXT,y=new chrome.cast.media.Track(u,v);return d(y)?y.trackContentType=null!=(h=null==(p=c.getQualities().find(function(c){return c.codec}))?void 0:p.codec)?h:"":(y.trackContentType=c.id?c.id.split("-")[0]:"",y.trackContentId=c.url,y.subtype=c.kind===chrome.cast.media.TextTrackType.METADATA.toLowerCase()?chrome.cast.media.TextTrackType.METADATA:null!=(f=c.kind)&&f.includes("caption")||(null!=(m=c.role)?m:[]).find(function(c){var u;return null==(u=c.value)?void 0:u.includes("caption")})?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES),y.language=c.lang,y.name=c.label,y.roles=(null==(g=c.role)?void 0:g.filter(function(c){return!!c.value}).map(function(c){return c.value||""}))||[],y.customData={internalId:c.id,needsReloadBeforePlay:!0},y},u.isValidTrack=function(c){return!(!(c.trackContentType&&c.trackId&&c.language&&c.name)||d(c))&&!!c.subtype&&!!c.trackContentId},u.isSubtitle=function(c){return c.type===chrome.cast.media.TrackType.TEXT},u.isAudio=d},90435:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.SHAKA_ISO_MAP=void 0,u.SHAKA_ISO_MAP={aar:"aa",abk:"ab",afr:"af",aka:"ak",alb:"sq",amh:"am",ara:"ar",arg:"an",arm:"hy",asm:"as",ava:"av",ave:"ae",aym:"ay",aze:"az",bak:"ba",bam:"bm",baq:"eu",bel:"be",ben:"bn",bih:"bh",bis:"bi",bod:"bo",bos:"bs",bre:"br",bul:"bg",bur:"my",cat:"ca",ces:"cs",cha:"ch",che:"ce",chi:"zh",chu:"cu",chv:"cv",cor:"kw",cos:"co",cre:"cr",cym:"cy",cze:"cs",dan:"da",deu:"de",div:"dv",dut:"nl",dzo:"dz",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",ewe:"ee",fao:"fo",fas:"fa",fij:"fj",fin:"fi",fra:"fr",fre:"fr",fry:"fy",ful:"ff",geo:"ka",ger:"de",gla:"gd",gle:"ga",glg:"gl",glv:"gv",gre:"el",grn:"gn",guj:"gu",hat:"ht",hau:"ha",heb:"he",her:"hz",hin:"hi",hmo:"ho",hrv:"hr",hun:"hu",hye:"hy",ibo:"ig",ice:"is",ido:"io",iii:"ii",iku:"iu",ile:"ie",ina:"ia",ind:"id",ipk:"ik",isl:"is",ita:"it",jav:"jv",jpn:"ja",kal:"kl",kan:"kn",kas:"ks",kat:"ka",kau:"kr",kaz:"kk",khm:"km",kik:"ki",kin:"rw",kir:"ky",kom:"kv",kon:"kg",kor:"ko",kua:"kj",kur:"ku",lao:"lo",lat:"la",lav:"lv",lim:"li",lin:"ln",lit:"lt",ltz:"lb",lub:"lu",lug:"lg",mac:"mk",mah:"mh",mal:"ml",mao:"mi",mar:"mr",may:"ms",mkd:"mk",mlg:"mg",mlt:"mt",mon:"mn",mri:"mi",msa:"ms",mya:"my",nau:"na",nav:"nv",nbl:"nr",nde:"nd",ndo:"ng",nep:"ne",nld:"nl",nno:"nn",nob:"nb",nor:"no",nya:"ny",oci:"oc",oji:"oj",ori:"or",orm:"om",oss:"os",pan:"pa",per:"fa",pli:"pi",pol:"pl",por:"pt",pus:"ps",que:"qu",roh:"rm",ron:"ro",rum:"ro",run:"rn",rus:"ru",sag:"sg",san:"sa",sin:"si",slk:"sk",slo:"sk",slv:"sl",sme:"se",smo:"sm",sna:"sn",snd:"sd",som:"so",sot:"st",spa:"es",sqi:"sq",srd:"sc",srp:"sr",ssw:"ss",sun:"su",swa:"sw",swe:"sv",tah:"ty",tam:"ta",tat:"tt",tel:"te",tgk:"tg",tgl:"tl",tha:"th",tib:"bo",tir:"ti",ton:"to",tsn:"tn",tso:"ts",tuk:"tk",tur:"tr",twi:"tw",uig:"ug",ukr:"uk",urd:"ur",uzb:"uz",ven:"ve",vie:"vi",vol:"vo",wel:"
129cy",wln:"wa",wol:"wo",xho:"xh",yid:"yi",yor:"yo",zha:"za",zho:"zh",zul:"zu"}}},function(c){return c(c.s=92682)}])})}()}(bitmovinplayerRemotecontrol);var bitmovinplayerRemotecontrolExports=bitmovinplayerRemotecontrol.exports;let RemoteControlModule=getDefaultExportFromCjs$1(bitmovinplayerRemotecontrolExports),PERFORMANCE_COOKIE_CATEGORY="C0002";function hasPerformanceCookieConsent(){let c=window.OptanonActiveGroups;return!!(null!=c&&c.includes(PERFORMANCE_COOKIE_CATEGORY))}let logger$1=loglevelExports.getLogger("resolveMutedConfig");function resolveMutedConfig(c){if("MUTED"===c)return!0;if("u">typeof navigator&&"userActivation"in navigator){let{hasBeenActive:c}=navigator.userActivation;return c||logger$1.debug("User has not interacted with the page yet, muting the player by default."),!c}return!1}function resolveRemotecontrolOptions(c){if(!c)return;let{messageNamespace:u,receiverApplicationId:d}=c;return{type:"googlecast",receiverApplicationId:d,messageNamespace:u,receiverVersion:"v3",rejoinActiveSession:!0}}function createBitmovinPlayerOptions(c,u){var d;let p=null==(d=c.adService)?void 0:d.createBitmovinAdConfig(),h=c.autoplay,f=resolveMutedConfig(c.muted),m=hasPerformanceCookieConsent()?resolveRemotecontrolOptions(c.chromecastOptions):void 0;return{...u,playback:{autoplay:h,muted:f},remotecontrol:m,advertising:p}}let log$d=loglevelExports.getLogger("createBitmovinPlayer");function getModuleExport$1(c){return isObject$7(c)&&"default"in c?c.default:c}function getBitmovinModules$1(){try{return bitmovinplayerCoreExports.Player.getModules()}catch{return[]}}function isModuleLoaded$1(c){return(getBitmovinModules$1()??[]).includes(c)}function setupBitmovinModules(){bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(BitmovinEngineModule)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(EngineNative)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(MSERendererModule)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(HLSModule)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(ABRModule)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(TSContainerModule)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(MP4ContainerModule)),isModuleLoaded$1(bitmovinplayerCoreExports.ModuleName.XML)||bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(XML)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(DashModule)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(SubtitlesModule)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(SubtitlesVTT)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(SubtitlesNative)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(VR)),isModuleLoaded$1(bitmovinplayerCoreExports.ModuleName.DRM)||bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(DrmModule)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(RemoteControlModule))}setupBitmovinModules();let storedPlayers=[];function findStoredPlayerInfo(c){return storedPlayers.find(u=>u.id===c)}function createBitmovinPlayer(c,u,d={generation:0}){let p=findStoredPlayerInfo(c.playerId);if(p){p.drmRequestState&&(p.drmRequestState.customHeader=c.customVideoUrlRequestHeader);let{playback:u}=p.player.getConfig(!0);return u&&(u.autoplay=c.autoplay),log$d.debug("reusing previous player instance for id",c.playerId),p}let h=createBitmovinPlayerOptions(c,u);log$d.debug("creating new bitmovin player instance",c.playerId);let f={player:new bitmovinplayerCoreExports.Player(c.element,h),id:c.playerId,drmRequestState:d};return storedPlayers.push(f),f}let HLS_MEDIA_TYPE$1="application/vnd.apple.mpegurl",SKD_URI=/skd:(\/\/[\x21-\x7e]+)/i;function resolveDrmSourceConfig(c,u){if(null!=c&&c.enabled)return u===HLS_MEDIA_TYPE$1?resolveFairplayConfig(c,u):resolveDashConfig(c,u)}function resolveFairplayConfig(c,u){let d=getSingleKeySystem(c,"fairplay");if(u!==HLS_MEDIA_TYPE$1||!isHttpsEndpoint(d.certificateUrl))throw new DrmPlayerError("configuration");let p=readBrandGuid(d.licenseUrl);return{fairplay:{certificateURL:d.certificateUrl,maxCertificateRequestRetries:0,maxLicenseRequestRetries:0,...p?{headers:{"x-drm-brandGuid":p}}:{},getLicenseServerUrl:c=>{let u;
129try{u=new URL(c)}catch{throw new DrmPlayerError("configuration")}if("skd:"!==u.protocol||!u.hostname||u.username||u.password)throw new DrmPlayerError("configuration");return c.replace(/^skd:/i,"https:")},prepareContentId:c=>{let u=SKD_URI.exec(c);if(!u)throw new DrmPlayerError("configuration");try{return new URL(`https:${u[1]}`).hostname}catch{throw new DrmPlayerError("configuration")}},prepareMessage:(c,u)=>`spc=${encodeURIComponent(c.messageBase64Encoded)}&assetId=${encodeURIComponent(u.contentId)}`}}}function readBrandGuid(c){try{return new URL(c).searchParams.get("brandGuid")??void 0}catch{return}}function resolveDashConfig(c,u){if("application/dash+xml"!==u||0===c.keySystems.length)throw new DrmPlayerError("configuration");let d={};c.keySystems.forEach(c=>{if(!isHttpsEndpoint(c.licenseUrl))throw new DrmPlayerError("configuration");if("widevine"===c.system)d.widevine={LA_URL:c.licenseUrl,maxLicenseRequestRetries:0};else if("playready"===c.system)d.playready={LA_URL:c.licenseUrl,maxLicenseRequestRetries:0};else throw new DrmPlayerError("configuration")});let p=c.keySystems.find(c=>c.isDefault);if(!p||1!==c.keySystems.filter(c=>c.isDefault).length)throw new DrmPlayerError("configuration");return d.preferredKeySystems=[p.system,...c.keySystems.filter(c=>c.system!==p.system).map(c=>c.system)],d}function getSingleKeySystem(c,u){let d=c.keySystems.filter(c=>c.system===u);if(1!==d.length||1!==c.keySystems.length)throw new DrmPlayerError("configuration");return d[0]}function isHttpsEndpoint(c){if("string"!=typeof c)return!1;try{let u=new URL(c);return"https:"===u.protocol&&!!u.hostname&&!u.username&&!u.password}catch{return!1}}let DRM_USER_TOKEN_HEADER="X-Drm-UserToken";async function authorizeDrmRequest(c,u,d,p){return c.headers=withCustomHeader(removeDrmTokenHeaders(c.headers??{}),p),"fairplay-certificate"===u.type?(assertFairplayCertificateRequest(d),c):"other"===u.type?c:authorizeLicenseRequest
129(c,u.system,d)}function withCustomHeader(c,u){return u&&!isDrmTokenHeader(u.key)&&(c[u.key]=u.value),c}async function authorizeLicenseRequest(c,u,d){let p=d.activeSource;assertLicenseSystem(p,u),p.selectedSystem=u;let h=await getCurrentLicenseToken(d,p),f=c.headers??{};return f[DRM_USER_TOKEN_HEADER]=h,c.headers=f,c}function assertLicenseSystem(c,u){if(!c)throw new StaleDrmRequestError;if(!c.allowedSystems.has(u)||c.selectedSystem&&c.selectedSystem!==u)throw new DrmPlayerError("configuration")}function assertFairplayCertificateRequest(c){let u=c.activeSource;if(!u)throw new StaleDrmRequestError;if(!u.allowedSystems.has("fairplay"))throw new DrmPlayerError("configuration")}async function getCurrentLicenseToken(c,u){let d=c.generation;try{let p=await u.tokenService.getUserToken();if(c.generation!==d||c.activeSource!==u)throw new StaleDrmRequestError;return p}catch(p){throw p instanceof StaleDrmRequestError||c.generation!==d||c.activeSource!==u?new StaleDrmRequestError:new DrmPlayerError(resolveTokenFailureCategory(p))}}function resolveTokenFailureCategory(c){return c instanceof DrmPlayerError?"account-token"===c.category?"account-token":"user-token":c instanceof Error&&"DrmTokenError"===c.name&&"reason"in c&&"account_token_unavailable"===c.reason?"account-token":"user-token"}function removeDrmTokenHeaders(c){let u=Object.keys(c).filter(isDrmTokenHeader);if(0===u.length)return c;let d={...c};return u.forEach(c=>delete d[c]),d}function isDrmTokenHeader(c){return c.toLowerCase()===DRM_USER_TOKEN_HEADER.toLowerCase()}let DRM_LICENSE_WIDEVINE="drm/license/widevine",DRM_LICENSE_PLAYREADY="drm/license/playready",DRM_LICENSE_FAIRPLAY="drm/license/fairplay",DRM_CERTIFICATE_FAIRPLAY="drm/certificate/fairplay";function createDrmRequestPreprocessor(c){return async(u,d)=>authorizeDrmRequest(d,resolveDrmRequestKind(u),c,c.customHeader)}function resolveDrmRequestKind(c){return c===DRM_CERTIFICATE_FAIRPLAY?{type:"fairplay-certificate"}:c===DRM_LICENSE_WIDEVINE?{type:"license",system:"widevine"}:c===DRM_LICENSE_PLAYREADY?{type:"license",system:"playready"}:c===DRM_LICENSE_FAIRPLAY?{type:"license",system:"fairplay"}:{type:"other"}}function calculateNumber(c){return c??0}function resolveAdBreakStarted(c){var u;return(null==(u=c.ad)?void 0:u.data.adPodInfo.adPosition)===1}let defaultAdData={adId:"",skippable:!1,duration:0,title:""},resolveAdEventData=c=>c??defaultAdData;function resolveAdSkippedOrFinishedType(c){let{SKIPPED:u}=window.google.ima.AdEvent.Type;return c===u?"adSkipped":"adFinished"}function resolveCurrentAdType(c){let{getLastMainMediaPositionInSec:u,getInitialSeekTimeInSec:d,getMainMediaDurationInSec:p}=c;return calculateAdType(u(),d(),p())}class InteractiveMediaAds{constructor(c,u){yi(this,"playerId"),yi(this,"eventEmitter"),yi(this,"resetIsSeekingToFalse"),yi(this,"currentPlaybackPosition"),yi(this,"currentAdId"),yi(this,"_isShowingAd",!1),yi(this,"_isPlaying",!1),yi(this,"handleAdEvent",c=>{let{STARTED:u,AD_PROGRESS:d,SKIPPED:p,COMPLETE:h,RESUMED:f}=window.google.ima.AdEvent.Type;switch(c.type){case d:this.handleProgressEvent(c);break;case u:this.isPlaying=!0,this.isShowingAd=!0,this.handleAdStartedEvent(c);break;case p:case h:this.isPlaying=!1,this.isShowingAd=!1,this.handleAdFinishedEvent(c);break;case f:this.isPlaying=!0;break;default:this.isPlaying=!1}}),yi(this,"handleProgressEvent",c=>{let u=c.getAdData(),d=calculateNumber(null==u?void 0:u.duration);this.currentPlaybackPosition=calculateNumber(null==u?void 0:u.currentTime);let p=calculateNumber(null==u?void 0:u.adPosition),h=calculateNumber(null==u?void 0:u.totalAds);this.dispatchEvent({type:"adTimeChanged",duration:d,playbackPosition:this.currentPlaybackPosition,adPosition:p,totalAds:h})}),yi(this,"handleAdStartedEvent",c=>{var u;this.handleAdBreakStarted(c);let{adId:d,skippable:p,duration:h}=resolveAdEventData(null==(u=c.ad)?void 0:u.data);this.currentAdId=d;let f=resolveCurrentAdType(this.playerDataAccessor);this.dispatchEvent({type:"adStarted",skippable:p,duration:h,adType:f})}),yi(this,"handleAdFinishedEvent",c=>{let u=resolveAdSkippedOrFinishedType(c.type);this.dispatchEvent({type:u})}),this.adsManager=c,this.playerDataAccessor=u;const{playerId:d,eventEmitter:p,resetIsSeekingToFalse:h}=u;this.playerId=d,this.eventEmitter=p,this.resetIsSeekingToFalse=h,this.updateEventListeners()}get isShowingAd(){return this._isShowingAd}set isShowingAd(c){this._isShowingAd=c}get isPlaying(){return this._isPlaying}set isPlaying(c){this._isPlaying=c}updateEventListeners(){this.addOrRemoveEventListeners("removeEventListener"),this.addOrRemoveEventListeners("addEventListener")}addOrRemoveEventListeners(c){let{STARTED:u,AD_PROGRESS:d,PAUSED:p,SKIPPED:h,COMPLETE:f,RESUMED:m}=window.google.ima.AdEvent.Type;this.adsManager[c](u,this.handleAdEvent),this.adsManager[c](d,this.handleAdEvent),this.adsManager[c](p,this.handleAdEvent),this.adsManager[c](h,this.handleAdEvent),this.adsManager[c](f,this.handleAdEvent),this.adsManager[c](m,this.handleAdEvent)}handleAdBreakStarted(c){resolveAdBreakStarted(c)&&this.resetIsSeekingToFalse()}dispatchEvent(c){let u={...c,playerId:this.playerId,adId:this.currentAdId};
129this.eventEmitter.fireEvent(u)}getCurrentTimeInSeconds(){return this.currentPlaybackPosition}destroy(){this.addOrRemoveEventListeners("removeEventListener"),this.adsManager.destroy()}}function resolveVRSourceConfig(c){if(c)return{contentType:"single",keyboardControl:{transitionTimingType:"none",transitionTime:.5,maxDisplacementSpeed:90}}}let log$c=loglevelExports.getLogger("BitmovinPlayerAdapter"),SOURCE_ERROR_CODE=1200;function resolveDrmFailureDetail(c){if("object"!=typeof c||null===c)return{};let{code:u,systemCode:d,mediaError:p}=c;return"number"==typeof d?{keySystemCode:d,..."number"==typeof u?{keyErrorCode:u}:{}}:"string"==typeof p?{mediaError:p}:{}}let playerConfig={key:"adb77626-0c8f-4879-a13a-b0be47d4222b",ui:!1,logs:{bitmovin:!1},adaptation:{preload:!1,limitToPlayerSize:!0},tweaks:{native_hls_parsing:!0}};function createSourceConfig(c,u,d,p){return{hls:(null==c?void 0:c.mediaType)==="application/vnd.apple.mpegurl"?c.videoUrl:void 0,dash:(null==c?void 0:c.mediaType)==="application/dash+xml"?c.videoUrl:void 0,progressive:(null==c?void 0:c.mediaType)==="video/mp4"?c.videoUrl:void 0,vr:resolveVRSourceConfig(null==c?void 0:c.vr),subtitleTracks:null==d?void 0:d.map(c=>({...c,kind:"subtitle"})),...u?{drm:u}:{},options:{startOffset:p}}}function resolvePlayerConfig(c,u){return c.customVideoUrlRequestHeader||c.drmTokenService?{...playerConfig,network:{preprocessHttpRequest:createDrmRequestPreprocessor(u)}}:playerConfig}function summarizeSourceForLog(c,u){var d;return{mediaType:null==c?void 0:c.mediaType,hasVideoUrl:!!(null!=c&&c.videoUrl),drm:null!=u&&u.enabled?{enabled:!0,systems:u.keySystems.map(c=>
129c.system),defaultSystem:null==(d=u.keySystems.find(c=>c.isDefault))?void 0:d.system}:void 0}}class BitmovinPlayerAdapter{constructor(c){var u,d,p,h,f,m,g,v,y;yi(this,"player"),yi(this,"currentSeekTarget",0),yi(this,"currentSeekIssuer"),yi(this,"isSeeking",!1),yi(this,"isPlayRequested",!1),yi(this,"ima"),yi(this,"hasStarted",!1),yi(this,"shouldAutoPlay",!1),yi(this,"hasError",!1),yi(this,"mainMediaDurationInSec",0),yi(this,"initialSeekTimeInSec",0),yi(this,"segmentStartDate",0),yi(this,"loaded",!1),yi(this,"queuedAction"),yi(this,"lastTimeChangedPlaybackTime",0),yi(this,"lastTimeChangedTimestamp",0),yi(this,"lastPlayerEvent"),yi(this,"showingAds",!1),yi(this,"initialPlaybackMode","UNKNOWN"),yi(this,"serverEnvironment"),yi(this,"allBitmovinWarnings",[]),yi(this,"drmRequestState"),yi(this,"loadOperation",Promise.resolve()),yi(this,"hasDrmWarning",!1),yi(this,"drmErrorReported",!1),yi(this,"lastMainMediaPositionInSec",0),yi(this,"playerId"),yi(this,"eventEmitter"),yi(this,"optionsDrmTokenService"),yi(this,"subtitleHandler",new SubtitleHandler),yi(this,"currentSetAudioTrackIssuer","INITIAL"),yi(this,"currentSetSubtitleTrackIssuer","INITIAL"),yi(this,"postRollAdBreakFinished",!1),yi(this,"chromecastOptions"),yi(this,"videoPlayerMediaMetaData"),yi(this,"castingDeviceName"),yi(this,"_handleCastAvailable",()=>{var c,u,d;null==(d=null==(u=null==(c=this.chromecastOptions)?void 0:c.chromecastService)?void 0:u.registerChromecastEventHandler)||d.call(u)}),yi(this,"_handleCastStarted",async c=>{var u,d,p,h;let{resuming:f,deviceName:m}=c;if(this.castingDeviceName=m,f||!this.chromecastOptions)return;null==(d=null==(u=this.chromecastOptions.chromecastService)?void 0:u.castStartedCallback)||d.call(u,this,this.videoPlayerMediaMetaData).catch(c=>{log$c.error("Error while starting cast session",c),reportClientError("Error while starting cast session",this.serverEnvironment,c)});let g=null==(h=null==(p=this.chromecastOptions.chromecastService)?void 0:p.mapCastStartedEvent)?void 0:h.call(p,this.playerId,c);
129g?this.eventEmitter.fireEvent(g):this.eventEmitter.fireEvent({playerId:this.playerId,type:"castStarted"})}),yi(this,"_handleCastStopped",async c=>{var u,d,p;this.castingDeviceName=void 0;let h=null==(p=null==(d=null==(u=this.chromecastOptions)?void 0:u.chromecastService)?void 0:d.mapCastStoppedEvent)?void 0:p.call(d,this.playerId,c);h?this.eventEmitter.fireEvent(h):this.eventEmitter.fireEvent({playerId:this.playerId,type:"castStopped"})}),yi(this,"_handlePlayerEvent",c=>{try{let u=!0;switch(c.type){case bitmovinplayerCoreExports.PlayerEvent.Seeked:case bitmovinplayerCoreExports.PlayerEvent.TimeShifted:this._handleSeekDone(c,this.playerId);return;case bitmovinplayerCoreExports.PlayerEvent.Playing:this.isPlayRequested=!1,this.shouldAutoPlay=!1;break;case bitmovinplayerCoreExports.PlayerEvent.TimeChanged:u=this._handleTimeChanged(c),this.isShowingAd()||(this.lastMainMediaPositionInSec=this.getCurrentTimeInSec());break;case bitmovinplayerCoreExports.PlayerEvent.Play:this.isShowingAd()||(this.lastMainMediaPositionInSec=this.getCurrentTimeInSec());break;case bitmovinplayerCoreExports.PlayerEvent.Warning:this.handleWarningEvent(c);break;case bitmovinplayerCoreExports.PlayerEvent.SegmentPlayback:{let u=c.dateTime,d=u?Date.parse(u):0;d>0&&this.segmentStartDate!==d&&(this.segmentStartDate=d);break}case bitmovinplayerCoreExports.PlayerEvent.SourceUnloaded:this.loaded=!1;break;case bitmovinplayerCoreExports.PlayerEvent.AdBreakStarted:this.showingAds=!0;break;case bitmovinplayerCoreExports.PlayerEvent.AdBreakFinished:this.showingAds=!1;break;case bitmovinplayerCoreExports.PlayerEvent.Error:this.handleErrorEvent(c)}switch(u&&this.mapEventAndEmit(c,this.playerId),c.type){case bitmovinplayerCoreExports.PlayerEvent.TimeChanged:this.handleTimeChangedAfterEmit();break;case bitmovinplayerCoreExports.PlayerEvent.SubtitleEnabled:case bitmovinplayerCoreExports.PlayerEvent.SubtitleDisabled:case bitmovinplayerCoreExports.PlayerEvent.SubtitleDisable:this.currentSetSubtitleTrackIssuer=void 0,this.eventEmitter.f
129ireEvent(this.subtitleHandler.resetAndGetEvent(this.playerId));break;case bitmovinplayerCoreExports.PlayerEvent.AudioChanged:this.currentSetAudioTrackIssuer=void 0}}catch(c){log$c.error("ERROR DURING EVENT HANDLING",c)}this.lastPlayerEvent=c,this.postRollAdBreakFinished=!1}),yi(this,"_handleSubtitleEvent",c=>{let u=this.subtitleHandler.handleSubtitleEvent(c,this.playerId);this.eventEmitter.fireEvent(u)}),yi(this,"resetIsSeekingToFalse",()=>{this.isSeeking=!1}),yi(this,"handleAdBreakFinished",c=>{"adBreakFinished"===c.type&&"POST_ROLL"===c.adType&&(this.postRollAdBreakFinished=!0)});const b=c.playerId;this.eventEmitter=c.eventEmitter,this.optionsDrmTokenService=c.drmTokenService,this.playerId=b,this.serverEnvironment=c.serverEnvironment,this.chromecastOptions=c.chromecastOptions,null==(p=null==(d=null==(u=this.chromecastOptions)?void 0:u.chromecastService)?void 0:d.setPlayerId)||p.call(d,this.playerId),null==(m=null==(f=null==(h=this.chromecastOptions)?void 0:h.chromecastService)?void 0:f.setEventEmitter)||m.call(f,this.eventEmitter),null==(y=null==(v=null==(g=this.chromecastOptions)?void 0:g.chromecastService)?void 0:v.registerPlayerEvents)||y.call(v);const S={customHeader:c.customVideoUrlRequestHeader,generation:0},_=createBitmovinPlayer(c,resolvePlayerConfig(c,S),S);this.player=_.player,this.drmRequestState=_.drmRequestState??{generation:0};const E=this.player;c.autoplay&&(this.hasStarted=!0,this.isPlayRequested=!0,this.shouldAutoPlay=!0),isDatazoomEnabled(c.enableDataZoom,c.dataZoomConfig)&&createDataZoomTracker(c.dataZoomConfig,E),this.addAllEventListeners(E)}getPlayerApi(){return this.player}addAllEventListeners(c){this.addOrRemoveAllEventListeners(c,"add")}removeAllEventListeners(c){this.addOrRemoveAllEventListeners(c,"remove")}addOrRemoveEventListener(c,u,d,p){"add"===u?c.on(d,p):c.off(d,p)}addOrRemoveAllEventListeners(c,u){this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.AirplayChanged,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.AudioChanged,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.CueEnter,this._handleSubtitleEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.CueExit,this._handleSubtitleEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.CueUpdate,this._handleSubtitleEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.Error,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.Muted,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.Paused,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.Play,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.PlaybackFinished,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.PlaybackSpeedChanged,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.Playing,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.Seek,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.Seeked,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.SourceUnloaded,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.StallEnded,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.StallStarted,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.SubtitleAdded,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.SubtitleDisabled,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.SubtitleEnabled,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.TimeChanged,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.TimeShift,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.TimeShifted,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.Unmuted,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.Vie
129wModeChanged,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.VolumeChanged,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.Warning,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.AdBreakStarted,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.AdBreakFinished,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.SegmentPlayback,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.VideoQualityChanged,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.DownloadFinished,this._handlePlayerEvent),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.CastStarted,this._handleCastStarted),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.CastStopped,this._handleCastStopped),this.addOrRemoveEventListener(c,u,bitmovinplayerCoreExports.PlayerEvent.CastAvailable,this._handleCastAvailable)}_handleTimeChanged(c){let u=!0;return this.isSeeking||this.isShowingAd()?u=!1:this.checkForTimeSkipAndNotify(c),u}handleErrorEvent(c){let u=this.resolveDrmFailureCategory(c);if(u){let d={category:u,code:Number(c.code),name:"string"==typeof c.name?c.name:void 0,...resolveDrmFailureDetail(c.data)};log$c.warn("DRM playback failed",d,c.message),reportClientError("Bitmovin DRM error",this.serverEnvironment,d),this.emitDrmErrorOnce();return}reportClientError("Bitmovin threw an error",this.serverEnvironment,[...this.allBitmovinWarnings,c])}handleWarningEvent(c){var u,d;if(this.allBitmovinWarnings.push(c),this.isActiveDrmWarning(c)&&this.handleDrmWarning(c),c.code===bitmovinplayerCoreExports.WarningCode.PLAYBACK_COULD_NOT_BE_STARTED){let c=null==(u=this.player)?void 0:u.getConfig(!0).playback,p=(null==c?void 0:c.autoplay)??!1;if(!(null==c?void 0:c.muted)&&p&&this.shouldAutoPlay){log$c.debug("trying another auto-play with mute turned on"),this.shouldAutoPlay=!1;let c=(null==(d=this.player)?void 0:d.isMuted())??!1;this.mute("INITIAL"),this.play().catch(u=>{log$c.warn("auto play with mute on did not work either",u),c||this.unmute("INITIAL")})}}}handleDrmWarning(c){this.hasDrmWarning=!0,c.code!==bitmovinplayerCoreExports.WarningCode.DRM_RESTRICTED_OUTPUT&&this.emitDrmErrorOnce()}isActiveDrmWarning(c){return!!(this.drmRequestState.activeSource&&(c.code>=2e3&&c.code<=2004||2013===c.code))}resolveDrmFailureCategory(c){if(this.drmRequestState.activeSource)return Number(c.code)===SOURCE_ERROR_CODE&&this.hasDrmWarning?"output-protection":resolveBitmovinDrmFailureCategory(c)}emitDrmErrorOnce(){var c;if(!this.drmErrorReported){if(this.drmErrorReported=!0,this.isPlayRequested=!1,null!=(c=this.player)&&c.isPlaying())try{this.player.pause()}catch(c){log$c.warn("failed to pause protected playback after a DRM error",c)}
129this.hasError=!0,this.eventEmitter.fireEvent({type:"error",playerId:this.playerId,code:"DRM_ERROR"})}}getSubtitlesApi(){var c;return null==(c=this.player)?void 0:c.subtitles}_handleSeekDone(c,u){var d;this.isSeeking=!1;let p=null==(d=this.player)?void 0:d.getCurrentTime(bitmovinplayerCoreExports.TimeMode.AbsoluteTime),h={...c,issuer:this.currentSeekIssuer,time:p};this.currentSeekTarget=0,this.currentSeekIssuer=void 0,this.lastTimeChangedTimestamp=0,this.mapEventAndEmit(h,u)}canSeekOrTimeshiftForward(){return!!this.player&&(this.player.isLive()?0>this.player.getTimeShift():this.getCurrentTimeInSec()<Math.max(0,this.getMainMediaDurationInSec()-1))}canSeekOrTimeshiftBackward(){return!!this.player&&(this.player.isLive()?this.player.getTimeShift()>this.player.getMaxTimeShift():this.getCurrentTimeInSec()>1)}disableSubtitle(){var c,u,d,p;if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");null==(d=null==(u=null==(c=this.chromecastOptions)?void 0:c.chromecastService)?void 0:u.setClosedCaptionsOff)||d.call(u);let h=this.getSelectedSubtitleTrack();h&&(null==(p=this.getSubtitlesApi())||p.disable(h.id))}enableSubtitle(c,u="USER"){var d,p,h,f;if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");this.currentSetSubtitleTrackIssuer=u,this.isCastingVideo()&&(null==(h=null==(p=null==(d=this.chromecastOptions)?void 0:d.chromecastService)?void 0:p.setClosedCaptionsTrack)||h.call(p,c,this.getAvailableSubtitleTracks())),null==(f=this.getSubtitlesApi())||f.enable(c,!0)}getAvailableVideoQualities(){var c;return((null==(c=this.player)?void 0:c.getAvailableVideoQualities())??[]).map(c=>({bitrate:c.bitrate,height:c.height,id:c.id,width:c.width,frameRate:c.frameRate}))}getLiveVariant(){if(!this.player)return"LINEAR";if(this.player.isLive())return isLinearStream(this.player.getMaxTimeShift())?"LINEAR":"DVR";throw Error("trying to get LiveVariant on a VOD player")}getPlaybackMode(){return this.player?this.showingAds||this.isShowingAd()?"ADS":this.player.isLive()?"LIVE":"VOD":"UNKNOWN"}getPlayerType(){return"VIDEO"}getAvailableSubtitleTracks(){var c;return((null==(c=this.getSubtitlesApi())?void 0:c.list())??[]).filter(c=>isValidSubtitleTrack(c))}getSelectedSubtitleTrack(){var c;return((null==(c=this.getSubtitlesApi())?void 0:c.list())??[]).find(c=>c.enabled)}isAirPlayAvailable(){var c;return!!(null!=(c=this.player)&&c.isAirplayAvailable())}isPlayingVideoViaAirPlay(){var c;return!!(null!=(c=this.player)&&c.isAirplayActive())}isShowingAd(){var c,u,d,p;return this.isCastingVideo()?(null==(d=null==(u=null==(c=this.chromecastOptions)?void 0:c.chromecastService)?void 0:u.isShowingAd)?void 0:d.call(u))??!1:!!(null!=(p=this.getNativePlayerAdvertisingAPI())&&p.getActiveAdBreak())}playVideoViaAirPlay(){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");this.isAirPlayAvailable()&&this.player.showAirplayTargetPicker()}setStandardViewMode(){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");this.isInPictureInPictureMode()&&document.exitPictureInPicture(),this.player.setViewMode(bitmovinplayerCoreExports.ViewMode.Inline)}setHasError(c){this.hasError=c}isPictureInPictureAvailable(){return document.pictureInPictureEnabled}isFullscreenAvailable(){var c;return!!(null!=(c=this.player)&&c.isViewModeAvailable(bitmovinplayerCoreExports.ViewMode.Fullscreen))}isInPictureInPictureMode(){return!!document.pictureInPictureElement}isInFullscreenMode(){var c;return(null==(c=this.player)?void 0:c.getViewMode())===bitmovinplayerCoreExports.ViewMode.Fullscreen}isPlayerLoaded(){return this.loaded}togglePictureInPicture(){this.setPictureInPicture(!this.isInPictureInPictureMode())}setPictureInPicture(c){var u;if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");c?null==(u=this.getVideoElement())||u.requestPictureInPicture():document.exitPictureInPicture()}toggleFullscreen(c){this.setFullscreen(!this.isInFullscreenMode(),c)}setFullscreen(c,u){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");c?this.player.setViewMode(bitmovinplayerCoreExports.ViewMode.Fullscreen,{fullscreenElement:u}):this.player.setViewMode(bitmovinplayerCoreExports.ViewMode.Inline)}getCurrentTimeInSeconds(){var c;if(this.isShowingAd()&&this.ima)return this.ima.getCurrentTimeInSeconds()??0;let{start:u}=this.getSeekableRange();return((null==(c=this.player)?void 0:c.getCurrentTime())??0)-u}getCurrentTimeInSec(){var c;if(this.isSeeking){let{start:c}=this.getSeekableRange();return this.currentSeekTarget-c}if("LIVE"===this.getPlaybackMode())return(null==(c=this.player)?void 0:c.getTimeShift())??0;let u=this.getCurrentTimeInSeconds();return isNaN(u)?0:u}getLastTimeChangedPlaybackTime(){return this.lastTimeChangedPlaybackTime}getLatestSegmentStartTimestamp(){return this.segmentStartDate}getDurationInSec(){var c,u,d,p;return this.isCastingVideo()?(null==(d=null==(u=null==(c=this.chromecastOptions)?void 0:c.chromecastService)?void 0:u.getDurationInSec)?void 0:d.call(u))??0:(null==(p=this.player)?void 0:p.getDuration())??0}getMaxTimeShiftInSec(){var c;return(null==(c=this.player)?void 0:c.getMaxTimeShift())??0}getTimeShiftInSec(){var c;return(null==(c=this.player)?void 0:c.getTimeShift())??0}getInitialSeekTimeInSec(){return this.initialSeekTimeInSec}getIsPlayRequested(){return this.isPlayRequested}getShouldAutoPlay(){return this.shouldAutoPlay}getCurrentSetAudioTrackIssuer(){return this.currentSetAudioTrackIssuer}getCurrentSetSubtitleTrackIssuer(){return this.currentSetSubtitleTrackIssuer}getMainMediaDurationInSec(){var c;return this.isShowingAd()?this.mainMediaDurationInSec:(null==(c=this.player)?void 0:c.getDuration())??0}getLastMainMediaPositionInSec(){return this.lastMainMediaPositionInSec}getPlayerAdvertisingAPI(){return this.ima}getNativePlayerAdvertisingAPI(){var c;return null==(c=this.player)?void 0:c.ads}getAdCuePoints(){var c;if(null!=(c=this.player)&&c.ads)return this.player.ads.list().map(c=>c.scheduleTime)}getVideoBufferLength(){var c;return this.isSeeking?0:(null==(c=this.player)?void 0:c.getVideoBufferLength())??0}setPlaybackSpeed(c){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");this.player.setPlaybackSpeed(c)}getPlaybackSpeed(){var c;return(null==(c=this.player)?void 0:c.getPlaybackSpeed())??1}load(c){let u=++this.drmRequestState.generation;this.loaded=!1,this.deactivateDrmSource(),this.lastTimeChangedTimestamp=0,this.lastPlayerEvent=void 0,this.videoPlayerMedia
129MetaData=c.videoPlayerMediaMetaData,this.currentSetSubtitleTrackIssuer="INITIAL",this.currentSetAudioTrackIssuer="INITIAL";let d=this.loadOperation.then(()=>this.loadInternal(c,u));return this.loadOperation=d.catch(()=>{}),d}async loadInternal(c,u){this.assertCurrentLoad(u);let{source:d,drm:p,initialSeekTimeInSec:h,aspectRatio:f,customSubtitleTracks:m}=c;log$c.debug("load player for instance",this.playerId,summarizeSourceForLog(d,p));let g=this.resolveDrmConfig(p,null==d?void 0:d.mediaType),v=createSourceConfig(d,g,m,h);await this.unloadBeforeLoad(),this.assertCurrentLoad(u),this.activateDrmSource(p),log$c.debug("loading bitmovin player with data",this.playerId,summarizeSourceForLog(d,p)),await this.loadSource(v,p,f,h,u)}resolveDrmConfig(c,u){try{let d=resolveDrmSourceConfig(c,u);if(null!=c&&c.enabled&&(0===c.keySystems.length||!this.optionsDrmTokenService))throw new DrmPlayerError("configuration");return d}catch(c){throw this.deactivateDrmSource(),c}}async unloadBeforeLoad(){var c;try{await (null==(c=this.player)?void 0:c.unload())}catch(c){log$c.error("error unloading bitmovin player with data",this.playerId,c)}}activateDrmSource(c){null!=c&&c.enabled&&0!==c.keySystems.length&&this.optionsDrmTokenService&&(this.drmRequestState.activeSource={allowedSystems:new Set(c.keySystems.map(c=>c.system)),tokenService:this.optionsDrmTokenService})}async loadSource(c,u,d,p,h){var f;try{await (null==(f=this.player)?void 0:f.load(c)),this.assertCurrentLoad(h),this.completeSourceLoad(d,p)}catch(c){this.handleSourceLoadError(c,u,h)}}completeSourceLoad(c,u){var d;this.initialPlaybackMode=this.getPlaybackMode(),this.setVideoElementPoster(c),this.loaded=!0,this.mainMediaDurationInSec=(null==(d=this.player)?void 0:d.getDuration())??0,this.initialSeekTimeInSec=u,log$c.debug("Successfully loaded source for instance",this.playerId),this.performInitialSeekOrTimeshift(u),this.queuedAction&&(log$c.debug("have task queue after load",this.queuedAction),this.processAction(this.queuedAction),this.queuedAction=void 0)}handleSourceLoadError(c,u,d){if(this.loaded=!1,null!=u&&u.enabled)return this.handleProtectedSourceLoadError(c,d);throw this.assertCurrentLoad(d),this.deactivateDrmSource(),log$c.error("Error while loading source for instance",this.playerId,c),Error(`bitmovin load error ${c}`)}handleProtectedSourceLoadError(c,u){if(log$c.error("Error while loading protected source for instance",this.playerId),c instanceof StaleDrmRequestError||!this.isCurrentLoad(u))throw this.isCurrentLoad(u)&&this.deactivateDrmSource(),c instanceof StaleDrmRequestError?c:new StaleDrmRequestError;if(this.deactivateDrmSource(),c instanceof DrmPlayerError)throw c;throw new DrmPlayerError(this.resolveDrmFailureCategoryFromUnknown(c)??"cdm")}resolveDrmFailureCategoryFromUnknown(c){if(!(!c||"object"!=typeof c||!("code"in c)))return resolveBitmovinDrmFailureCategory({code:c.code})}assertCurrentLoad(c){if(!this.isCurrentLoad(c))throw new StaleDrmRequestError}isCurrentLoad(c){return this.drmRequestState.generation===c}setVideoElementPoster(c){let u=this.getVideoElement();u&&(u.poster=generateVideoTagPosterSource(c))}performInitialSeekOrTimeshift(c){c>0&&"VOD"===this.getPlaybackMode()?this.seek(c,"INITIAL"):"LIVE"===this.getPlaybackMode()&&c<0&&this.timeShift(c,"INITIAL")}processAction(c){switch(c){case"PLAY":this.play();break;case"PAUSE":this.pause()}}mute(c="USER"){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");this.player.mute(c)}pause(){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");if(this.isPlayRequested=!1,!this.loaded){this.queuedAction="PAUSE";return}this.player.pause()}async play(){if(!this.loaded){this.queuedAction="PLAY";return}if(this.hasStarted=!0,this.isPlayRequested=!0,!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");try{await this.player.play()}catch(c){throw log$c.warn("failed to play",c),this.isPlayRequested=!1,c}}async stop(){this.isInPictureInPictureMode()&&this.setPictureInPicture(!1),this.setFullscreen(!1),await this.reset()}async reset(){this.drmRequestState.generation+=1,this.deactivateDrmSource(),await this.loadOperation,this.hasStarted=!1,this.shouldAutoPlay=!1,this.isPlayRequested=!1,this.hasError=!1,this.queuedAction=void 0,this.lastTimeChangedTimestamp=0,this.lastPlayerEvent=void 0,this.lastTimeChangedPlaybackTime=0,this.currentSetAudioTrackIssuer="INITIAL",this.currentSetSubtitleTrackIssuer="INITIAL",this.currentSeekIssuer=void 0,this.segmentStartDate=0,this.loaded=!1,this.showingAds=!1,this.initialPlaybackMode="UNKNOWN",this.allBitmovinWarnings=[],this.destroyImaInstance(),await this.dispatchUnloadedEventAndUnload()}deactivateDrmSource(){var c;null==(c=this.drmRequestState.activeSource)||c.tokenService.reset(),this.drmRequestState.activeSource=void 0,this.hasDrmWarning=!1,this.drmErrorReported=!1}async dispatchUnloadedEventAndUnload(){var c;
129this.eventEmitter.fireEvent({type:"sourceUnloaded",playerId:this.playerId}),await (null==(c=this.player)?void 0:c.unload())}seek(c,u){if("LIVE"===this.getPlaybackMode())throw Error("cannot seek in live mode, use `timeshift` instead");if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");return this.currentSeekTarget=c,this.currentSeekIssuer=u,this.isSeeking=!0,log$c.debug("SEEK player seek target ",this.currentSeekTarget,"is seeking",this.isSeeking),"RESTART"===u&&0===c&&(this.lastMainMediaPositionInSec=0,this.initialSeekTimeInSec=0),this.player.seek(c,u)}seekRelative(c,u){if("LIVE"===this.getPlaybackMode())throw Error("cannot seek in live mode, use `timeshift` instead");if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");let d=this.player.getCurrentTime(),{start:p,end:h}=this.getSeekableRange(),f=Math.max(Math.min(d+c,h),p);return this.player.seek(f,u)}timeShift(c,u="USER"){var d;if(!(null!=(d=this.player)&&d.isLive()))throw Error("player is not in live mode");return this.isSeeking=!0,this.currentSeekIssuer=u,this.currentSeekTarget=this.player.getCurrentTime(bitmovinplayerCoreExports.TimeMode.AbsoluteTime)+c,this.player.timeShift(c,u),!0}unmute(c="USER"){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");this.player.unmute(c)}async destroy(c=!1){var u,d,p,h,f,m,g,v,y,b;this.player&&(destroyDataZoomTracker(this.player),null==(p=null==(d=null==(u=this.chromecastOptions)?void 0:u.chromecastService)?void 0:d.stopCastingCallback)||p.call(d),null==(m=null==(f=null==(h=this.chromecastOptions)?void 0:h.chromecastService)?void 0:f.deregisterPlayerEvents)||m.call(f),null==(y=null==(v=null==(g=this.chromecastOptions)?void 0:g.chromecastService)?void 0:v.deregisterChromecastEventHandler)||y.call(v),this.removeAllEventListeners(this.player)),c&&this.isInPictureInPictureMode()&&this.setPictureInPicture(!1),this.destroyImaInstance(),await this.reset(),c&&(await (null==(b=this.player)?void 0:b.destroy()),this.player=void 0)}hasEnded(){var c;return this.postRollAdBreakFinished||!!(null!=(c=this.player)&&c.hasEnded())}getPlayerStatus(){var c,u,d;if(this.hasError)return"ERROR";if(!this.loaded)return"IDLE";if(!this.player)return"TRANSITIONING";if(this.player.isStalled())return"BUFFERING";if(this.isCastingVideo()){let p=null==(d=null==(u=null==(c=this.chromecastOptions)?void 0:c.chromecastService)?void 0:u.castPlayerStatusResolver)?void 0:d.call(u);if(p)return p}return this.player.isPlaying()?"PLAYING":this.hasEnded()?"ENDED":this.isPlayRequested?"BUFFERING":this.hasStarted?"PAUSED":"IDLE"}mapEventAndEmit(c,u){if(!this.player)throw Error("dont have player");let d=mapBitmovinPlayerEvent(c,u,this);(null==d?void 0:d.type)==="error"&&this.resolveDrmFailureCategory(c)?this.emitDrmErrorOnce():(log$c.debug(u,"received bitmovin event",c,"mapped to",d),d&&this.eventEmitter.f
129ireEvent(d))}checkForTimeSkipAndNotify(c){var u;let d=Date.now();if((null==(u=this.lastPlayerEvent)?void 0:u.type)!==bitmovinplayerCoreExports.PlayerEvent.TimeChanged)return void this.updateLastTimeChangedPlaybackTimeAndTimeStamp(c.time);if(this.lastTimeChangedTimestamp&&1===this.getPlaybackSpeed()&&"LIVE"===this.getPlaybackMode()){let u=Math.abs((d-this.lastTimeChangedTimestamp)/1e3-(c.time-this.lastTimeChangedPlaybackTime));u>1&&(log$c.info("TIME SKIP detected",{previousPlaybackTimeInSec:this.lastTimeChangedPlaybackTime,currentPlaybackTimeInSec:c.time,timeSkipDurationInSec:u}),this.eventEmitter.fireEvent({type:"timeSkipped",playerId:this.playerId,previousPlaybackTimeInSec:this.lastTimeChangedPlaybackTime,currentPlaybackTimeInSec:c.time}))}this.updateLastTimeChangedPlaybackTimeAndTimeStamp(c.time)}updateLastTimeChangedPlaybackTimeAndTimeStamp(c){c&&(this.lastTimeChangedTimestamp=Date.now(),this.lastTimeChangedPlaybackTime=c)}handleTimeChangedAfterEmit(){this.isShowingAd()||(this.lastMainMediaPositionInSec=this.getCurrentTimeInSec())}isStreamAtLivePos(){let c=this.player;return!!c&&c.isLive()&&c.getTimeShift()>=-4}getAvailableAudioTracks(){return this.player?this.player.getAvailableAudio():[]}getAudioLanguage(){var c,u;return(null==(u=null==(c=this.player)?void 0:c.getAudio())?void 0:u.lang)??""}getAudioLanguageId(){var c,u;return(null==(u=null==(c=this.player)?void 0:c.getAudio())?void 0:u.id)??""}setAudioTrack(c,u="USER"){var d,p,h;if(!this.player)throw Error("setAudioTrack: why is the player undef here?");this.isCastingVideo()&&(null==(h=null==(p=null==(d=this.chromecastOptions)?void 0:d.chromecastService)?void 0:p.setAudioTrack)||h.call(p,c,this.getAvailableAudioTracks())),this.currentSetAudioTrackIssuer=u,this.player.setAudio(c)}getSubtitleTrackLanguage(){var c;return null==(c=this.getSelectedSubtitleTrack())?void 0:c.lang}getVolume(){var c,u;return null!=(c=this.player)&&c.isMuted()?0:(null==(u=this.player)?void 0:u.getVolume())??100}setVolume(c){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");0===c&&this.player.mute(),c>0&&this.player.isMuted()&&this.player.unmute(),this.player.setVolume(c)}getVideoQuality(){if(!this.player)return log$c.info("dont have player"),{height:0,width:0};let c=this.getVideoElement();return{height:(null==c?void 0:c.videoHeight)??0,width:(null==c?void 0:c.videoWidth)??0}}getSelectedVideoQuality(){var c;if(!this.player)return log$c.info("dont have player"),defaultVideoQuality();let u=this.player.getVideoQuality();if("auto"!==u.id)return{isAuto:!1,...u};let d=this.player.getPlaybackVideoData(),p=null==(c=this.getAvailableVideoQualities().find(c=>c.id===d.id))?void 0:c.frameRate;return{...defaultVideoQuality(),height:d.height,width:d.width,frameRate:p}}setVideoQuality(c){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");this.player.setVideoQuality(c)}async scheduleAd(c,u="vmap"){var d;let p=null==(d=this.player)?void 0:d.ads;if(!p)throw Error("dont have ad player api");let h=p.list();h.length>0&&(log$c.debug("got existing ad breaks",h),h.forEach(c=>{p.discardAdBreak(c.id)}));let f={tag:{url:c,type:"vmap"===u?bitmovinplayerAdvertisingCoreExports.AdTagType.VMAP:bitmovinplayerAdvertisingCoreExports.AdTagType.VAST}};return log$c.debug("schedule ad ",f),p.schedule(f)}getTechVersion(){var c;return null==(c=this.player)?void 0:c.version}getActualPlayerInstance(){return this.player}getVideoElement(){var c;return null==(c=this.player)?void 0:c.getVideoElement()}enableInteractiveMediaAds(c){this.destroyImaInstance(),this.ima=new InteractiveMediaAds(c,{playerId:this.playerId,eventEmitter:this.eventEmitter,getLastMainMediaPositionInSec:()=>this.lastMainMediaPositionInSec,getInitialSeekTimeInSec:()=>this.initialSeekTimeInSec,getMainMediaDurationInSec:()=>this.mainMediaDurationInSec,resetIsSeekingToFalse:this.resetIsSeekingToFalse}),this.eventEmitter.addEventListener(this.handleAdBreakFinished)}destroyImaInstance(){this.ima&&(this.ima.destroy(),this.ima=void 0,this.eventEmitter.removeEventListener(this.handleAdBreakFinished))}isVRVideo(){var c,u;return!!(null!=(u=null==(c=this.player)?void 0:c.getSource())&&u.vr)}setViewingDirection(c,u){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");if(!this.isVRVideo())throw Error("trying to set viewing direction on non-VR video");this.player.vr.setViewingDirection({yaw:c,pitch:u,roll:0})}getViewingDirection(){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");if(!this.isVRVideo())throw Error("trying to get viewing direction on non-VR video");let c=this.player.vr.getViewingDirection();return{x:c.yaw,y:c.pitch}}
129addCustomSubtitleTracks(c){c.forEach(c=>{var u;null==(u=this.getSubtitlesApi())||u.add({...c,kind:"subtitle"})})}getSeekableRange(){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");return this.player.getSeekableRange()}getInitialPlaybackMode(){return this.initialPlaybackMode}getActualTimeFromPlayer(){var c;return(null==(c=this.player)?void 0:c.getCurrentTime())??0}isCastingAvailable(){var c;return(null==(c=this.player)?void 0:c.isCastAvailable())??!1}isCastingVideo(){var c;return(null==(c=this.player)?void 0:c.isCasting())??!1}startCastingVideo(){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");this.isInPictureInPictureMode()&&this.setPictureInPicture(!1),this.player.castVideo()}stopCastingVideo(){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");this.player.castStop()}getCastingDeviceName(){return this.castingDeviceName}}function isValidSubtitleTrack(c){return"unknown"!==c.lang}function createPlayerAdapter(c){switch(c.adapterType){case"BITMOVIN":return new BitmovinPlayerAdapter(c);case"SIMULATION":return new SimulationPlayerAdapter(c);default:throw Error(`unknown player adapter type ${c.adapterType}`)}}function convertToServiceEnablement(c,u){return void 0===c?u:c}function resolveGoogleAnalyticsConfig(c){return{...c,defaultPlayerMode:c.defaultPlayerMode??"standard",customInitAttributes:c.customInitAttributes??{},dataLayer:c.dataLayer??window.dataLayer}}function resolveTrackingSettings(c){var u;let d=c.configs,p=c.services;if((null==p?void 0:p.dataZoom)==="ACTIVE"){if(!(null!=(u=d.dataZoom)&&u.configId))throw Error("cannot enable dataZoom without a configuration id");if(!d.dataZoom.assetId)throw Error("cannot enable dataZoom without an assetId")}let h={googleAnalytics:convertToServiceEnablement(null==p?void 0:p.googleAnalytics,"ACTIVE"),dataZoom:convertToServiceEnablement(null==p?void 0:p.dataZoom,"INACTIVE")},f={...d,googleAnalytics:resolveGoogleAnalyticsConfig(d.googleAnalytics)};return{...c,configs:f,services:h}}function getValueOrDefault(c,u){return c??u}function resolvePlayerDataConfiguration(c){let u=getValueOrDefault(c.autoplay,!1),d=getValueOrDefault(c.cookieConsent,!1),p=getValueOrDefault(c.feedbackUrl,DEFAULT_FEEDBACK_URL),h=getValueOrDefault(c.initialSeekTimeInSec,0),f=getValueOrDefault(c.muted,u?"MUTED":"NOT_MUTED"),m=getValueOrDefault(c.phasing,!1),g=getValueOrDefault(c.sharingEnabled,!0),v=getValueOrDefault(c.environment,"PRODUCTION"),y=c.productPlacement,b=getValueOrDefault(c.adMarkerEnabled,"INACTIVE");return{...c,autoplay:u,adMarkerEnabled:b,configurationType:"VIDEO",cookieConsent:d,environment:v,feedbackUrl:p,hooks:c.hooks??[],initialSeekTimeInSec:h,muted:f,phasing:m,productPlacement:y,sharingEnabled:g,tracking:resolveTrackingSettings(c.tracking)}}let log$b=loglevelExports.getLogger("VideoPlayerCoordinator");function resolveLoadErrorCode(c,u){return isDrmPlayerError(c)?"DRM_ERROR":u.includes("403")?"NOT_AUTHORIZED":"DATA_NOT_LOADED"}let creationStats={};function printCreationStats(){log$b.debug("Creation Stats",creationStats)}let OBSERVED_DOM_EVENT_TYPES=[RBUP_AUDIO_DOM_EVENT_TYPE,RBUP_VIDEO_DOM_EVENT_TYPE];class VideoPlayerCoordinator{constructor(c){var u,d;yi(this,"playerId"),yi(this,"urlSharingStrategy"),yi(this,"dataLoader"),yi(this,"adService"),yi(this,"eventEmitter"),yi(this,"player"),yi(this,"phasingService"),yi(this,"storageService"),yi(this,"hookService"),yi(this,"thumbnailService"),yi(this,"trackingService"),yi(this,"mediaSessionService"),yi(this,"dispatchElement"),yi(this,"errorReportingEnabled"),yi(this,"reporterComponent"),yi(this,"playerConfig"),yi(this,"_fullscreenElement"),yi(this,"currentErrorDetails"),yi(this,"loadGeneration",0),yi(this,"drmErrorGeneration"),yi(this,"lastPlaybackPosition",0),yi(this,"cumulatedPlayTimeInSec",0),yi(this,"mediaMetaData"),yi(this,"HdPlaybackHeightThreshold",700),yi(this,"liveStatus"),yi(this,"loaded",!1),yi(this,"destroyed",!1),yi(this,"instanceId",v4()),yi(this,"lastRequestedVolume",100),yi(this,"stopped",!1),yi(this,"nextUpTransitioning",!1),yi(this,"nextUpTransitioningFromEnded",!1),yi(this,"genericListener",c=>{switch(c.type){case"loaded":this.handleLoadedEvent(c),this.dispatchDomEvent(c);break;case"playing":this.handlePlayingEvent(c);break;case"timeChanged":this.handleTimeChangedEvent(c);break;case"seekingDone":this.handleSeekingEvent(c);break;case"timeshiftingDone":this.handleTimeshiftingDoneEvent(c);break;case"play":this.dispatchDomEvent(c);break;case"error":this.handlePlayerOrDataError(c);break;case"liveStatusChanged":this.handleLiveStatusChanged(c);break;case"adBreakFinished":this.handleAdBreakFinished(c);break;case"timeSkipped":this.handleTimeSkippedEvent(c)}}),yi(this,"domEventListener",c=>
129{if(!OBSERVED_DOM_EVENT_TYPES.includes(c.type))return;let u=c.detail;if(u.playerId===this.playerId)return;let d=this.getPlayerStatus();"play"!==u.type||["IDLE","PAUSED"].includes(d)||(log$b.debug("received play event from player",u.playerId,"pausing"),this.pause())}),this.playerId=c.playerId;const p=creationStats[this.playerId]??{createCount:0,destroyCount:0};p.createCount+=1,creationStats[this.playerId]=p,printCreationStats(),this.eventEmitter=c.eventEmitter??new EventEmitter$1,this.dataLoader=c.dataLoader,this.dispatchElement=c.dispatchElement,this.urlSharingStrategy=c.urlSharingStrategy,this.adService=c.adService;const h=resolvePlayerDataConfiguration(c.config),f=(null==(u=c.config._debug)?void 0:u.playerAdapterType)??"BITMOVIN";if(this.playerConfig=h,this.phasingService=c.phasingService,this.thumbnailService=c.config.thumbnailService??c.thumbnailService,this.hookService=new HookService(c.config.hooks??[]),!c.config.assetId)throw Error("no asset id");log$b.debug("created coordinator",this.playerId,this.instanceId,p),this.player=createPlayerAdapter({adapterType:f,adService:c.adService,muted:h.muted,playerId:c.playerId,element:c.divElement,eventEmitter:this.eventEmitter,autoplay:h.autoplay,enableDataZoom:h.tracking.services.dataZoom,dataZoomConfig:h.tracking.configs.dataZoom,customVideoUrlRequestHeader:null==(d=c.config._debug)?void 0:d.customVideoUrlRequestHeader,serverEnvironment:h.environment,drmTokenService:c.drmTokenService,chromecastOptions:h.chromecastOptions}),this.addEventListener(this.genericListener),"ACTIVE"===h.tracking.services.googleAnalytics&&(this.trackingService=createTrackingService(this,h.tracking.configs.googleAnalytics.dataLayer)),this.mediaSessionService=new MediaSessionService(this),this.errorReportingEnabled=!!c.config.enableErrorReporting,this.errorReportingEnabled&&(this.reporterComponent=c.config.componentName,playerErrorReporter.configure({environment:h.environment,componentVersion:CORE_VERSION})),document.addEventListener(RBUP_VIDEO_DOM_EVENT_TYPE,this.domEventListener),document.addEventListener(RBUP_AUDIO_DOM_EVENT_TYPE,this.domEventListener)}get fullscreenElement(){return this._fullscreenElement}set fullscreenElement(c){this._fullscreenElement=c}get isAirPlayAvailable(){return this.player.isAirPlayAvailable()}get isVideoLoaded(){return this.loaded}addEventListener(c){this.eventEmitter.addEventListener(c)}async destroy(c=!1){var u,d,p;this.loaded=!1,this.destroyed=!0;let h=creationStats[this.playerId]??{createCount:0,destroyCount:0};h.destroyCount+=1,creationStats[this.playerId]=h,printCreationStats(),document.removeEventListener(RBUP_VIDEO_DOM_EVENT_TYPE,this.domEventListener),document.removeEventListener(RBUP_AUDIO_DOM_EVENT_TYPE,this.domEventListener);try{null==(u=this.phasingService)||u.stop(),null==(d=this.trackingService)||d.destroy(),this.mediaSessionService.destroy(),null==(p=this.storageService)||p.destroy();let c=this.playerConfig,h=this.mediaMetaData;await this.hookService.beforeDestroy(c,h,this),this.storageService=void 0}catch(u){let c=resolveErrorMessageFromUnknown(u);log$b.warn("error destroying player adapter services for player",this.playerId,this.instanceId,c)}try{await this.player.destroy(c),log$b.debug("done destroying coordinator",this.playerId,this.instanceId)}catch(u){let c=resolveErrorMessageFromUnknown(u);log$b.warn("error destroying player adapter for player",this.playerId,this.instanceId,c)}this.errorReportingEnabled&&playerErrorReporter.destroy()}canSeekOrTimeshiftBackward(){return this.player.canSeekOrTimeshiftBackward()}canSeekOrTimeshiftForward(){return this.player.canSeekOrTimeshiftForward()}canPlayVideo(){var c,u;return!!(null!=(u=null==(c=this.getMediaMetaData())?void 0:c.mediaSrc)&&u.videoUrl)}disableSubtitle(c="USER"){return this.player.disableSubtitle(c)}enableSubtitle(c,u="USER"){return this.player.enableSubtitle(c,u)}getAvailableAudioTracks(){return this.player.getAvailableAudioTracks()}getSelectedAudioTrack(){let c=this.getAvailableAudioTracks(),u=this.player.getAudioLanguageId();return c.find(c=>c.id===u)}getAvailableVideoQualities(){return this.player.getAvailableVideoQualities()}getSubtitleTracks(){return this.player.getAvailableSubtitleTracks()}getSelectedSubtitleTrack(){return this.player.getSelectedSubtitleTrack()}getCumulatedPlayTimeInSec(){return this.cumulatedPlayTimeInSec}getCurrentErrorDetails(){return this.currentErrorDetails}getDurationInSec(){return this.player.getDurationInSec()}getLatestSegmentStartTimestamp(){return this.player.getLatestSegmentStartTimestamp()}getMaxTimeShiftInSec(){return this.player.getMaxTimeShiftInSec()}getTimeShiftInSec(){return this.player.getTimeShiftInSec()}getLiveStatus(){return this.liveStatus}
129getMediaMetaData(){return this.mediaMetaData}getPlaybackSpeed(){return this.player.getPlaybackSpeed()}getPlayerConfiguration(){let c=this.playerConfig;if(!c)throw Error("dont have player config yet!");return c}getPlayerStatus(){return this.nextUpTransitioning?"TRANSITIONING":this.player.getPlayerStatus()}setNextUpTransitioning(c){this.nextUpTransitioning=c,this.nextUpTransitioningFromEnded=c&&"ENDED"===this.player.getPlayerStatus()}isTransitioningFromEnded(){return this.nextUpTransitioning&&this.nextUpTransitioningFromEnded}getSelectedVideoQuality(){return this.player.getSelectedVideoQuality()}getBufferLengthInSec(){return this.player.getVideoBufferLength()}getPlayerData(){return this.player}getVideoQuality(){return this.player.getVideoQuality()}getVolume(){return this.player.getVolume()}isFullscreenAvailable(){return this.player.isFullscreenAvailable()&&!!this.fullscreenElement}isInFullscreenMode(){return this.player.isInFullscreenMode()}isHdPlayback(){return this.getVideoQuality().height>this.HdPlaybackHeightThreshold}getLiveVariant(){return this.player.getLiveVariant()}getPlaybackMode(){return this.player.getPlaybackMode()}isPhasingEnabled(){var c;return!!(null!=(c=this.playerConfig)&&c.phasing)||!!this.mediaMetaData&&"shouldPhase"in this.mediaMetaData&&!!this.mediaMetaData.shouldPhase}isPictureInPictureAvailable(){return this.player.isPictureInPictureAvailable()}async setThumbnail(c,u,d){return this.thumbnailService.setThumbnail(c,u,d)}handleInvalidLoadCall(c){if(!c)throw Error("no player config provided yet, cannot load");if(!this.dataLoader)throw Error("no data loader provided");if(!this.player)throw Error("no player is active")}async load(c,u=!1){this.handleInvalidLoadCall(c);let d=resolvePlayerDataConfiguration(c),p=this.prepareLoad(c,d);try{return await this.loadMedia(c,d,u,p)}catch(c){return this.handleLoadError(c,p)}}prepareLoad(c,u){var d;let p=++this.loadGeneration;return this.drmErrorGeneration=void 0,this.currentErrorDetails=void 0,this.nextUpTransitioning=!1,this.loaded=!1,this.playerConfig=u,null==(d=this.phasingService)||d.stop(),fetchBrowserOrConfiguredTranslationLanguage(c.overrideTranslationLanguage),p}async loadMedia(c,u,d,p){let h=await this.doLoadMetadata(d,u);if(!this.isCurrentLoad(p)||(this.mediaMetaData=h,extendDatazoomMetadataWithVideoPlayerMetadata(c.tracking,h,this.player.getPlayerApi()),await this.applyBeforeLoadHook(h),!this.isCurrentLoad(p)||!await this.shouldLoadAfterPhasing(h,p)))return;
129if(this.hasPlayabilityError(h))return this.eventEmitter.fireEvent({type:"error",playerId:this.playerId,code:"SERVER_ERROR"}),h;h.thumbnailSprites&&this.thumbnailService.setThumbnailSprites(h.thumbnailSprites);let f=await this.doLoadAndScheduleAd(h,this.requirePlayerConfig());if(this.isCurrentLoad(p))return this.setAriaLabelOfVideoElement(h.title),f}async applyBeforeLoadHook(c){try{this.playerConfig=await this.hookService.beforeLoad(this.requirePlayerConfig(),c,this)}catch(c){log$b.warn("preloadHook failed, carrying on without it, error",c)}}async shouldLoadAfterPhasing(c,u){if(!this.isPhasingEnabled())return!0;let d=await this.handleLiveStreamPhasingOnLoad(this.requirePlayerConfig(),c);return!!this.isCurrentLoad(u)&&(log$b.debug("phasing: live stream response",c,"should load",d),d)}hasPlayabilityError(c){var u;return!!((null==(u=c.playabilityErrors)?void 0:u.length)??!this.canPlayVideo())}requirePlayerConfig(){if(!this.playerConfig)throw Error("no player config available");return this.playerConfig}handleLoadError(c,u){if(isStaleDrmRequestError(c)||!this.isCurrentLoad(u))return;let d=resolveErrorMessageFromUnknown(c);log$b.error("error during load",d),this.handlePlayerOrDataError({type:"error",playerId:this.playerId,code:resolveLoadErrorCode(c,d)})}isCurrentLoad(c){return this.loadGeneration===c}async doLoadMetadata(c,u){var d,p;let h=await this.dataLoader.loadData(u);return log$b.debug("got SSDM metadata",h),c&&!(null!=(d=h.mediaSrc)&&d.videoUrl)&&null!=(p=h.playabilityErrors)&&p.includes("NOT_YET_AVAILABLE")&&(await sleep(5e3),log$b.warn("got player data without video url when expecting it!",h,"new livestatus",this.getLiveStatus()),h=await this.dataLoader.loadData(u,!0)),h}initStorageService(c,u,d,p){var h;let f=new AudioLanguageResolver(c,u,d,p),m=new AudioVolumeResolver(u);null==(h=this.storageService)||h.destroy(),this.storageService=void 0,this.storageService=new StorageService(this,f,m),this.storageService.load()}getStorageServiceAllStoredValues(){var c;return null==(c=this.storageService)?void 0:c.getAllStoredValues()}async handleLiveStreamPhasingOnLoad(c,u){if(!this.phasingService)return log$b.warn("no phasing service but config says livestream %o",c),!0;let d=await this.phasingService.start(c,u);return d.shouldKeepPolling||this.phasingService.stop(),this.liveStatus=d.liveStatus,d.shouldLoadPlayer}async doLoadAndScheduleAd(c,u){var d;if(!c.mediaSrc)return;let p={...c.mediaSrc,vr:c.vr},h=c.aspectRatio??16/9;await this.player.load({source:p,drm:c.drm,initialSeekTimeInSec:u.initialSeekTimeInSec,aspectRatio:h,customSubtitleTracks:u.customSubtitleTracks,videoPlayerMediaMetaData:c}),this.loaded=!0;try{let p=u.assetId;await (null==(d=this.adService)?void 0:d.scheduleAd(this.player,p,c))}catch(c){log$b.warn("error during scheduleAd, carrying on anyway",c)}try{this.playerConfig=await this.hookService.afterLoad(u,c,this)}catch(c){log$b.warn("onAfterLoad hook failed, carrying on without it, error",c)}
129return this.eventEmitter.fireEvent({type:"loaded",playerId:this.playerId,data:c}),c}setAriaLabelOfVideoElement(c){let u=this.player.getVideoElement();null==u||u.setAttribute("aria-label",c??"")}pause(){return this.player.pause()}async stop(){await this.player.stop(),await this.hookService.beforeDestroy(this.playerConfig,this.mediaMetaData,this),this.reset(),this.stopped=!0}async play(){if(!this.canPlayVideo())throw Error("no playable video source detected!");return this.stopped&&(this.stopped=!1,await this.load(this.playerConfig,!0)),this.eventEmitter.fireEvent({type:"beforePlay",playerId:this.playerId}),this.nextUpTransitioningFromEnded=!1,this.player.play()}playVideoViaAirPlay(){this.player.playVideoViaAirPlay()}removeEventListener(c){this.eventEmitter.removeEventListener(c)}reset(){var c;this.cumulatedPlayTimeInSec=0,this.lastPlaybackPosition=0,null==(c=this.trackingService)||c.reset(),this.mediaSessionService.reset()}restartPlaybackFromBeginning(){if("VOD"===this.player.getPlaybackMode()){this.reset();let{start:c}=this.player.getSeekableRange();this.player.seek(c,"RESTART")}else if("LIVE"===this.player.getPlaybackMode()&&"DVR"===this.player.getLiveVariant()){let c=this.getMaxTimeShiftInSec();this.timeShift(c)}}seek(c){return!this.player.isShowingAd()&&this.player.seek(c,"USER")}seekOrTimeshiftRelative(c){let u=this.player;if("LIVE"===this.getPlaybackMode()){let d=Math.min(0,u.getTimeShiftInSec()+c);return u.timeShift(d,"USER"),!0}return this.seekRelative(c)}seekRelative(c){return this.player.seekRelative(c,"USER")}setAudioTrack(c,u="USER"){this.player.setAudioTrack(c,u)}setPlaybackSpeed(c){this.player.setPlaybackSpeed(c)}timeShift(c){this.player.timeShift(c,"USER")}toggleFullscreen(){!this.player.isInFullscreenMode()&&this.player.isInPictureInPictureMode()&&this.player.setPictureInPicture(!1),this.player.toggleFullscreen(this.fullscreenElement)}setFullscreen(c){this.player.setFullscreen(c,this.fullscreenElement)}togglePictureInPicture(){this.player.isInFullscreenMode()&&this.player.setFullscreen(!1,this.fullscreenElement),this.player.togglePictureInPicture()}isInPictureInPictureMode(){return this.player.isInPictureInPictureMode()}setVideoQuality(c){this.player.setVideoQuality(c)}setVolume(c){c>0&&(this.lastRequestedVolume=c),this.player.setVolume(c)}setMuted(c){this.player.setVolume(c?0:this.lastRequestedVolume)}isMuted(){return 0===this.getVolume()}dispatchDomEvent(c){let u=new CustomEvent(RBUP_VIDEO_DOM_EVENT_TYPE,{detail:c});log$b.debug("dispatching DOM event",u),document.dispatchEvent(u)}
129dispatchPlayerEvent(c){this.eventEmitter.fireEvent(c)}async handleNonPlayableLiveStatusPhase(){this.isInFullscreenMode()&&this.setFullscreen(!1),this.loaded=!1,this.reset(),await this.player.reset()}handleLiveStatusChanged(c){let{liveStatus:u}=c;this.liveStatus=u,(async()=>{var c,d;log$b.info("live status changed",u);let p=null==(c=this.phasingService)?void 0:c.isPlayablePhase(u.phase);!this.loaded&&this.playerConfig&&p?await this.load(this.playerConfig,!0):this.loaded&&(p?"post"===u.phase&&(log$b.debug("stopping phasing service as we are in POST"),null==(d=this.phasingService)||d.stop()):await this.handleNonPlayableLiveStatusPhase())})()}handleLoadedEvent(c){this.lastPlaybackPosition=0,this.cumulatedPlayTimeInSec=0;let u=this.playerConfig,d=this.getMediaMetaData(),p=this.getAvailableAudioTracks(),h=this.getSubtitleTracks();u&&d&&(p.length>0||h.length>0?this.initStorageService(d,u,p,h):setTimeout(()=>{let c=this.getAvailableAudioTracks(),p=this.getSubtitleTracks();this.initStorageService(d,u,c,p)},300))}handleAdBreakFinished(c){"LIVE"===this.getPlaybackMode()&&(this.lastPlaybackPosition=0)}handleTimeSkippedEvent(c){"LIVE"===this.getPlaybackMode()&&(this.lastPlaybackPosition=c.currentPlaybackTimeInSec)}handlePlayingEvent(c){"LIVE"===this.player.getPlaybackMode()&&(this.lastPlaybackPosition=c.playbackPosition)}handleTimeChangedEvent(c){this.player.isShowingAd()||("LIVE"===this.player.getPlaybackMode()&&0===this.lastPlaybackPosition&&(this.lastPlaybackPosition=c.playbackPosition),this.cumulatedPlayTimeInSec+=c.playbackPosition-this.lastPlaybackPosition,this.lastPlaybackPosition=c.playbackPosition)}handleSeekingEvent(c){this.lastPlaybackPosition=c.playbackPosition}handleTimeshiftingDoneEvent(c){this.lastPlaybackPosition=c.playbackPosition}handlePlayerOrDataError(c){let u="code"in c?c.code:void 0;this.shouldIgnoreDrmError(u)||(this.currentErrorDetails=this.resolveErrorDetails(u,c),this.reportPlayerErrorIfEnabled(),this.pauseAfterErrorIfPlaying(),this.player.setHasError(!0))}shouldIgnoreDrmError(c){return"DRM_ERROR"===c&&(this.drmErrorGeneration===this.loadGeneration||(this.drmErrorGeneration=this.loadGeneration,!1))}resolveErrorDetails(c,u){return"SERVER_ERROR"===c&&this.mediaMetaData?{serverErrorDetails:{playabilityErrors:this.mediaMetaData.playabilityErrors??[],playabilityErrorDetails:this.mediaMetaData.playabilityErrorDetails}}:c?{playerErrorCode:c}:{serverErrorDetails:u}}reportPlayerErrorIfEnabled(){var c;this.errorReportingEnabled&&playerErrorReporter.reportCaughtError("player",{assetId:null==(c=this.playerConfig)?void 0:c.assetId,...this.currentErrorDetails},this.reporterComponent)}pauseAfterErrorIfPlaying(){"PLAYING"===this.player.getPlayerStatus()&&this.player.pause()}getPosterImage(){var c,u,d;if(this.isMediaDataLoadedOrError())return(null==(c=this.playerConfig)?void 0:c.posterImageUrl)??(null==(u=this.mediaMetaData)?void 0:u.posterImageUrl)??(null==(d=this.playerConfig)?void 0:d.customFallbackPosterImageUrl)??RBUP_FALLBACK_POSTER_IMAGE}isMediaDataLoadedOrError(){return!!this.mediaMetaData||!!this.currentErrorDetails}getTechVersion(){return this.player.getTechVersion()}getAspectRatio(){var c;return(null==(c=this.mediaMetaData)?void 0:c.aspectRatio)??16/9}shouldShowProductPlacement(){var c,u;let d=null==(c=this.playerConfig)?void 0:c.productPlacement;return void 0===d?!!(null!=(u=this.getMediaMetaData())&&u.showProductPlacement):"visible"===d}getAdCuePoints(){return this.player.getAdCuePoints()}addCustomSubtitleTracks(c){this.player.addCustomSubtitleTracks(c)}getSeekableRange(){return this.player.getSeekableRange()}getInitialPlaybackMode(){return this.player.getInitialPlaybackMode()}isCastingAvailable(){var c;return!!(null!=(c=this.mediaMetaData)&&c.isCastable)&&void 0===this.mediaMetaData.drm&&this.player.isCastingAvailable()}isCastingVideo(){return this.player.isCastingVideo()}startCastingVideo(){this.player.startCastingVideo()}stopCastingVideo(){this.player.stopCastingVideo()}getCastingDeviceName(){return this.player.getCastingDeviceName()}}let Gn=class Gn{static setPlayerStatus(c){Gn.staticPlayerStatus=c}constructor(c){Gn.staticOptions=c}getPreviousAudioLanguage(){}getCurrentSetAudioTrackIssuer(){}getCurrentSetSubtitleTrackIssuer(){}isInPictureInPictureMode(){return!1}isPlayingVideoViaAirPlay(){return!1}getAvailableAudioTracks(){return[{id:"audio/mp4-1",lang:"en",label:"English"},{id:"audio/mp4-2",lang:"ja",label:"日本語"},{id:"audio/mp4-3",lang:"de",label:"Deutsch"},{id:"audio/mp4-4",lang:"es",label:"español"}]}setAudioTrack(c,u){}getAvailableSubtitleTracks(){return[{id:"application/mp4-5",lang:"en-US",label:"English (US)"},{id:"application/mp4-6",lang:"el-GR",label:"Ελληνικά (GR)"},{id:"application/mp4-7",lang:"pl-PL",label:"polski (PL)"},{id:"application/mp4-8",lang:"pt-BR",label:"português (BR)"}]}getPlayerType(){return"VIDEO"}getSelectedSubtitleTrack(){}disableSubtitle(c){}enableSubtitle(c,u){}timeShift(c,u="USER"){return!1}canSeekOrTimeshiftBackward(){return!1}canSeekOrTimeshiftForward(){return!1}getMaxTimeShiftInSec(){return MIN_TIMESHIFT_FOR_DVR_SECS}getTimeShiftInSec(){return -10}isStream(){return!1}mute(){}pause(){}async play(){}async stop(){}seek(c,u){return!1}seekRelative(c,u){return!1}unmute(){}async load(c){}async destroy(){}async reset(){}getPlaybackMode(){return"VOD"}getLiveVariant(){return"DVR"}getAvailableVideoQualities(){return[{bitrate:535114,height:240,id:"240_639293",width:426,frameRate:25},{bitrate:889212,height:360,id:"360_1057509",width:640,frameRate:25},{bitrate:1594819,height:540,id:"540_1966184",width:960,frameRate:25},{bitrate:3057048,height:720,id:"720_3752211",width:1280,frameRate:25},{bitrate:6154006,height:1080,id:"1080_7560397",width:1920,frameRate:25}]}getSelectedVideoQuality(){return{height:1920,width:1080,id:"1080_7560397",bitrate:2e3,isAuto:!1}}getVideoQuality(){return{height:1900,width:1280}}setVideoQuality(c){}getPlayerStatus(){return Gn.staticPlayerStatus}getCurrentTimeInSeconds(){return 0}getCurrentTimeInSec(){return Gn.staticCurrentTime}static setCurrentTime(c){Gn.staticCurrentTime=c}getLastTimeChangedPlaybackTime(){return 0}getLatestSegmentStartTimestamp(){return 0}getDurationInSec(){return Gn.staticDurationInSec}static setDurationInSec(c){Gn.staticDurationInSec=c}getVolume(){return 1}setVolume(c){}setHasError(c){}isPictureInPictureAvailable(){return!0}isFullscreenAvailable(){return!0}isInFullscreenMode(){return!1}togglePictureInPicture(){}setPictureInPicture(c){}toggleFullscreen(c){}setFullscreen(c,u){}getVideoBufferLength(){return Gn.staticBufferLength}static setVideoBufferLength(c){Gn.staticBufferLength=c}isAirPlayAvailable(){return!1}isPlayerLoaded(){return!1}playVideoViaAirPlay(){}setPlaybackSpeed(c){}getPlaybackSpeed(){return 1}isStreamAtLivePos(){return!1}getPlayerMode(){return"standard"}getAudioLanguage(){return"en"}getAudioLanguageId(){return"audio/mp4-1"}getSubtitleTrackLanguage(){}async scheduleAd(c,u){}getInitialSeekTimeInSec(){return 0}getMainMediaDurationInSec(){return 100}
129getLastMainMediaPositionInSec(){return 0}isShowingAd(){return!1}getTechVersion(){return"1.0.0"}getActualPlayerInstance(){return{}}enableInteractiveMediaAds(c){}getViewingDirection(){return{x:0,y:0}}setViewingDirection(c,u){}isVRVideo(){return!1}getAdCuePoints(){}getVideoElement(){}addCustomSubtitleTracks(c){}getPlayerApi(){}getSeekableRange(){return{start:0,end:Gn.staticDurationInSec}}getInitialPlaybackMode(){return"VOD"}getActualTimeFromPlayer(){return Gn.staticCurrentTime}isCastingAvailable(){return!1}isCastingVideo(){return!1}startCastingVideo(){}stopCastingVideo(){}getCastingDeviceName(){}};yi(Gn,"staticPlayerStatus","IDLE"),yi(Gn,"staticOptions"),yi(Gn,"staticCurrentTime",0),yi(Gn,"staticDurationInSec",42),yi(Gn,"staticBufferLength",1);let SimulationPlayerAdapter=Gn,defaultUrlSharingStrategy=new QueryParamUrlSharingStrategy;function createPlayerCoordinator({adService:c,config:u,dataLoader:d,dispatchElement:p,divElement:h,playerId:f,urlSharingStrategy:m,eventEmitter:g,phasingService:v,thumbnailService:y,drmTokenService:b}){return new VideoPlayerCoordinator({playerId:f,divElement:h,dispatchElement:p,dataLoader:d,eventEmitter:g,phasingService:v,urlSharingStrategy:m??defaultUrlSharingStrategy,config:u,adService:c,thumbnailService:y,drmTokenService:b})}let publicPlayerEventTypesAsString$1=publicPlayerEventTypes,log$a=loglevelExports.getLogger("CoreApi");function assertPlayerLoaded(c){if(!c)throw Error("dont have coordinator");if(!c.isVideoLoaded)throw Error("no video loaded yet")}function pushListener(c,u){let d=c.current;d&&!d.includes(u)&&d.push(u)}function useCoreApi(c,u,d,p){let h=_$3(!1),f=_$3(c);f.current=c;let m=F$4(()=>({isReady(){var c;return(null==(c=f.current)?void 0:c.isVideoLoaded)??!1},async play(){let c=f.current;return assertPlayerLoaded(c),c.play()},async stop(){let c=f.current;return assertPlayerLoaded(c),c.stop()},pause(){let c=f.current;assertPlayerLoaded(c),c.pause()},seek(c){let u=f.current;assertPlayerLoaded(u);let{start:d}=u.getSeekableRange();u.seek(d+c)},timeShift(c){let u=f.current;assertPlayerLoaded(u),u.timeShift(c)},getPlaybackMode(){let c=f.current;return assertPlayerLoaded(c),c.getPlaybackMode()},setFullscreen(c){let u=f.current;assertPlayerLoaded(u),u.setFullscreen(c)},isFullscreen(){let c=f.current;return assertPlayerLoaded(c),c.isInFullscreenMode()},getStatus(){let c=f.current;return assertPlayerLoaded(c),c.getPlayerStatus()},getCurrentTime(){var c;let u=f.current;return assertPlayerLoaded(u),(null==(c=u.getPlayerData())?void 0:c.getCurrentTimeInSec())??0},getDuration(){var c;let u=f.current;return assertPlayerLoaded(u),(null==(c=u.getPlayerData())?void 0:c.getDurationInSec())??0},getCurrentTimeOfMainVideo(){var c;let u=f.current;return assertPlayerLoaded(u),(null==(c=u.getPlayerData())?void 0:c.getLastMainMediaPositionInSec())??0},getDurationOfMainVideo(){var c;let u=f.current;return assertPlayerLoaded(u),(null==(c=u.getPlayerData())?void 0:c.getMainMediaDurationInSec())??0},getCurrentTimeshift(){var c;let u=f.current;return assertPlayerLoaded(u),(null==(c=u.getPlayerData())?void 0:c.getTimeShiftInSec())??0},getMaxTimeshift(){let c=f.current;return assertPlayerLoaded(c),c.getMaxTimeShiftInSec()},setMuted(c){let u=f.current;assertPlayerLoaded(u),u.setMuted(c)},isMuted(){let c=f.current;return assertPlayerLoaded(c),c.isMuted()},setVolume(c){let u=f.current;assertPlayerLoaded(u),u.setVolume(c)},getVolume(){let c=f.current;return assertPlayerLoaded(c),c.getVolume()},addEventListener(c){pushListener(p,c)},removeEventListener(c){var u,d;let h=null==(u=p.current)?void 0:u.findIndex(u=>u===c);void 0!==h&&(null==(d=p.current)||d.splice(h,1))}}),[p]);A$3(u,()=>m,[m]);let g=null==c?void 0:c.isVideoLoaded,v=null==c?void 0:c.getCurrentErrorDetails();return p$7(()=>{log$a.debug("coreApi",{coordinator:c,apiAvailable:d,videoLoaded:g}),c&&!h.current&&d&&(h.current=!0,log$a.debug("coreApi invoking apiAvailable",{coordinator:c,apiAvailable:d,videoLoaded:g}),v?d.reject(v):d.resolve(m))},[d,m,g,c,v]),F$4(()=>c=>{if(publicPlayerEventTypesAsString$1.includes(c.type))for(let u of p.current??[])try{u(c)}catch(c){log$a.error("error invoking public event listener",c)}},[p])}let cosmosFonts='@font-face{font-family:Bull Text;font-style:normal;font-weight:400;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Regular.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Regular.woff) format("woff")}@font-face{font-family:Bull Text;font-style:normal;font-weight:500;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Medium.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Medium.woff) format("woff")}@font-face{font-family:Bull Text;font-style:normal;font-weight:700;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Bold.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Bold.woff) format("woff")}@font-face{font-family:Bull;font-style:normal;font-weight:700;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Bold.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Bold.woff) format("woff")}@font-face{font-family:Bull;font-style:normal;font-weight:800;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Heavy1.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Heavy1.woff) format("woff")}@font-face{font-family:Bull VF;font-style:normal;font-weight:300 800;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullVAR.woff2) format("woff2-variations"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullVAR.woff2) format("woff2")}',playablePhases=["live","post"],nonPollPhases=["canceled","post"];function isPlayablePhase(c){return playablePhases.includes(c)}function shouldPollInPhase(c){return!nonPollPhases.includes(c)}let log$9=loglevelExports.getLogger("PhasingService"),MIN_TO_MS=6e4,THREE_HOURS=180*MIN_TO_MS,TEN_MIN=10*MIN_TO_MS,TEN_SEC=1e4;function calculateInterval(c,u){switch(c){case"pre":case"trim":case"unconfirmed":case"live":return u&&new Date(u).getTime()-Date.now()>THREE_HOURS?TEN_MIN:TEN_SEC;case"post":case"canceled":return;default:log$9.warn("unexpected live status phase %s",c);return}}let log$8=loglevelExports.getLogger("PhasingService");class PhasingService{constructor(c,u,d){yi(this,"liveStatus"),yi(this,"running",!1),yi(this,"timeoutHandle"),yi(this,"currentPlayerConfig"),yi(this,"currentMetaData"),this.playerId=c,this.liveStatusDataLoader=u,this.eventEmitter=d}async loadLiveStatus(c,u){log$8.debug("loading live status for config",c);let d=await this.liveStatusDataLoader.loadLiveStatus(c,u);return log$8.debug("-> got live status response",d),d}async start(c,u){this.running=!0,this.currentPlayerConfig=c,this.currentMetaData=u;let d=await this.poll(c,!1),p=null==d?void 0:d.phase,h=this.isPlayablePhase(p??"pre"),f=(null==d?void 0:d.shouldKeepPolling)??this.shouldPollInPhase(p??"pre");return{shouldLoadPlayer:h,liveStatus:d,shouldKeepPolling:f}}isPlayablePhase(c){return["live","post"].includes(c)}shouldPollInPhase(c){return!["canceled","post"].includes(c)}stop(){this.timeoutHandle&&(window.clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.running=!1,this.currentPlayerConfig=void 0}isRunning(){return this.running}
129emitLiveStatusChangedEvent(c,u,d){c&&this.eventEmitter.fireEvent({type:"liveStatusChanged",playerId:this.playerId,liveStatus:u,previousLiveStatus:d})}keepPolling(c){return this.running&&c}async poll(c,u=!0){var d;let p,h=this.liveStatus;if(!this.currentMetaData)throw Error("dont have media metadata for phasing poll");try{if(p=await this.loadLiveStatus(c,this.currentMetaData),!this.running||this.currentPlayerConfig!==c)return;areLiveStatusResponsesEqual(h,p)||(this.liveStatus=p,this.emitLiveStatusChangedEvent(u,p,h))}catch(c){if(log$8.error("error polling live status",c),!h){let c={phase:"pre",shouldKeepPolling:!0};this.liveStatus=c,this.emitLiveStatusChangedEvent(!0,c)}}let f=calculateInterval((null==(d=this.liveStatus)?void 0:d.phase)??"pre",null==p?void 0:p.startTime);return this.keepPolling(f)&&(this.timeoutHandle=window.setTimeout(()=>this.poll(c),f)),this.liveStatus}_injectStarted(c,u,d,p){this.running=c,this.currentPlayerConfig=u,this.currentMetaData=d,this.liveStatus=p}}function normalizeLiveStatusResponse(c){if(c)return{...c,_meta:void 0}}function areLiveStatusResponsesEqual(c,u){return deepEqual(normalizeLiveStatusResponse(c),normalizeLiveStatusResponse(u))}let styles$4='@font-face{font-family:Bull Text;font-style:normal;font-weight:400;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Regular.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Regular.woff) format("woff")}@font-face{font-family:Bull Text;font-style:normal;font-weight:500;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Medium.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Medium.woff) format("woff")}@font-face{font-family:Bull Text;font-style:normal;font-weight:700;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Bold.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Bold.woff) format("woff")}@font-face{font-family:Bull;font-style:normal;font-weight:700;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Bold.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Bold.woff) format("woff")}@font-face{font-family:Bull;font-style:normal;font-weight:800;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Heavy1.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Heavy1.woff) format("woff")}@font-face{font-family:Bull VF;font-style:normal;font-weight:300 800;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullVAR.woff2) format("woff2-variations"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullVAR.woff2) format("woff2")}.rbup-video-core-container{position:absolute;top:0;left:0;bottom:0;right:0;width:100%;aspect-ratio:var(--aspect-ratio);margin:auto;max-height:100%}.rbup-video-core-container__player{background-color:var(--rbup-container16x9-background-color);height:100%}.rbup-video-core-container__player video{width:100%;height:100%}.rbup-video-core-container__player #bitmovinplayer-vr-canvas{top:0;left:0;bottom:0;right:0;width:100%;height:100%}',log$7=loglevelExports.getLogger("VideoCoreInternal");async function destroyPlayer(c,u,d=!1){if(c&&!c.destroyed)try{log$7.debug("destroying coordinator",c.playerId),c.removeEventListener(u),await c.destroy(d),log$7.debug("coordinator destroyed",c.playerId)}catch(c){log$7.error("Error while destroying coordinator",c)}}async function loadPlayerCoordinatorAndInvokeReadyCallback(c,u,d,p){log$7.debug("config was changed, loading new data into player",c,u,"ref",d),d&&(await d.load(u),log$7.debug("loading done",d.playerId),null==p||p(d))}async function createPlayerCoordinatorAndInvokeReadyCallback({adService:c,config:u,dataLoader:d,dispatchElement:p,divElement:h,liveStatusDataLoader:f,playerId:m,urlSharingStrategy:g,lastCoordinator:v,listener:y,onCoordinatorAvailable:b,drmTokenService:S}){await destroyPlayer(v,y),u.skipCosmosFontInjection||injectCosmosFontIntoHeader(cosmosFonts);let _=new EventEmitter$1,E=f?new PhasingService(m,f,_):void 0,T=u.thumbnailService??new CommonThumbnailService,w=createPlayerCoordinator({adService:c,config:u,dataLoader:d,dispatchElement:p,divElement:h,playerId:m,urlSharingStrategy:g,eventEmitter:_,phasingService:E,thumbnailService:T,drmTokenService:S});return w.addEventListener(y),await loadPlayerCoordinatorAndInvokeReadyCallback(m,u,w,b),w}let VideoCoreInternal=({config:c,dataLoader:u,adService:d,onCoordinatorAvailable:p,urlSharingStrategy:h,liveStatusDataLoader:f,internalOnApiAvailable:m,aspectRatio:g,drmTokenService:v},y)=>{let b=_$3(null),S=_$3(),_=_$3(!1),E=_$3(null),[T,w]=h$3(),[P]=h$3(v4()),A=_$3(null),I=_$3([]),M=T$4(()=>{E.current&&(window.clearTimeout(E.current),E.current=null)},[]);if(!c)throw Error("no config provided");let R=useCoreApi(T,y,m,I),k=_$3(R);k.current=R,p$7(()=>{let m=A.current,g=b.current;if(u&&m&&g&&c.assetId){let y=c=>{null==p||p(c),w(c)};(async()=>{M(),E.current=window.setTimeout(async()=>{let p=await createPlayerCoordinatorAndInvokeReadyCallback({adService:d,config:c,dataLoader:u,dispatchElement:g,divElement:m,liveStatusDataLoader:f,playerId:P,urlSharingStrategy:h,lastCoordinator:S.current,listener:R,onCoordinatorAvailable:y,drmTokenService:v});_.current&&destroyPlayer(p,R,!0),S.current=p,w(p)},100)})()}},[P,u,A,c,h,d,f,p,R,M,v]),p$7(()=>{T&&u&&(T.dataLoader=u)},[T,u]),p$7(()=>()=>{_.current=!0,S.current&&destroyPlayer(S.current,k.current,!0)},[]);let x=(null==T?void 0:T.isInFullscreenMode())??!1;return useReportUsage(b,c.environment),o$i(k$5,{children:[o$i("style",{children:styles$4}),o$i("div",{class:"rbup-video-core-container",style:{"--aspect-ratio":`${g?transformAspectRatioForCss(g):""}`},ref:b,"data-rbup-core":!0,children:o$i("div",{class:"rbup-video-core-container__player",ref:A,"data-rbup-core-container":!0,"data-rbup-fullscreen":resolveTagAttributeValue(x)})})]})},RbupVideoCore=k$3(VideoCoreInternal);async function initRbupVideo(c,u,d){log$7.info("calling initRbupVideo with args",d),await customElements.whenDefined(u);let p=document.querySelector(`#${c}`);if(!p)throw Error(`html element with id ${c} not found`);let h=createControllablePromise(),f={...d,"internal-on-api-available":h};return deleteUndefinedValues(f),Object.assign(p,f),removeNoLongerExistingAttributes(p,f,log$7),h}function useIosVrFullscreen(){let{playerState:{isFullscreenMode:c,isVRVideo:u}}=usePlayerContext(),d=F$4(()=>isIosDevice(),[]),p=F$4(()=>u&&c,[u,c]);return d&&p}function isMultipleAdShown(c,u){return 0!==c&&0!==u&&(1!==c||1!==u)}let AdControlsTimeDisplay=()=>{let{playerState:{playerCoordinator:c}}=usePlayerContext(),u=T$4(c=>{if("adTimeChanged"===c.type){let u=c.adPosition,d=c.totalAds,h=Math.round(c.duration-c.playbackPosition),f=translate("ad-endsin",{sec:`${h}`});if(isMultipleAdShown(u,d)){let c=translate("ad-from-ads",{adPosition:`${u}`,totalAds:`${d}`});p(`${f} \xb7 ${c}`)}else p(f)}},[]),[d,p]=h$3();return p$7(()=>(null==c||c.addEventListener(u),()=>{null==c||c.removeEventListener(u)}),[c,u]),o$i("div",{"data-rbup-time-display":!0,class:"ad-controls-time-display",children:o$i(CosmosText,{appearance:"light",size:"xx-small@small x-small@medium",children:d})})},AdControls=()=>{let{playerState:{durationInSec:c,isCastingAvailable:u,isCasting:d,playerCoordinator:p}}=usePlayerContext(),[h,f]=h$3(""),m=T$4(c=>{f(c)},[]),g=T$4(()=>{d?null==p||p.stopCastingVideo():null==p||p.startCastingVideo()},[d,p]);return o$i(k$5,{children:o$i("div",{"data-rbup-ad-controls":!0,class:"ad-controls",children:isFinite(c)&&o$i("div",{"data-rbup-ad-controls-ui":!0,class:"ad-controls__ui",children:[o$i("div",{class:"ad-controls__left-side-control
129s",children:[o$i(ThemedVideoPlayerTooltip,{class:"ad-controls__tooltip",content:h,children:o$i("div",{class:"ad-controls__buttons",children:o$i(PlayPauseButton,{onTooltipUpdate:m})})}),o$i("div",{class:"ad-controls__buttons",children:o$i(VolumeControls,{})}),o$i(AdControlsTimeDisplay,{})]}),o$i("div",{class:"ad-controls__right-side-controls ad-controls__buttons",children:u&&o$i(ControlsButton,{dataAttribute:"data-rbup-casting",Icon:d?o$i(CosmosIconChromecastFilled,{"data-rbup-icon-cast":!0,class:"g-icon",slot:"icon"}):o$i(CosmosIconChromecast,{"data-rbup-icon-cast":!0,class:"g-icon",slot:"icon"}),label:translate("tooltip-casting"),onPointerUp:g,tooltipText:translate("tooltip-casting"),onTooltipUpdate:m,size:"small"})})]})})})};function isEndState(c){return"ENDED"===c}function isErrorState(c){return"ERROR"===c}function isStartState(c,u,d){let p=c.getPlayerConfiguration().autoplay,h=c.isPhasingEnabled(),f=(d&&isPlayablePhase(d.phase))??!0;return"IDLE"===u&&!p&&(!h||f)}function isStopped(c,u,d){var p;let h=(d&&isPlayablePhase(d.phase))??!0;return"IDLE"===u&&!(null!=(p=c.getPlayerData())&&p.isPlayerLoaded())&&h}function isTransitioning(c){return"TRANSITIONING"===c}function getState(c,u,d){return u?isErrorState(c)?"ERROR":isStartState(u,c,d)||isStopped(u,c,d)?"START":isTransitioning(c)?"TRANSITIONING":isEndState(c)?"END":"HIDDEN":"HIDDEN"}function useStartEndViewState(c){let u=(null==c?void 0:c.getPlayerStatus())??"ERROR",d=null==c?void 0:c.getLiveStatus();return F$4(()=>getState(u,c,d),[d,c,u])}let EndslateViewItem=({title:c,imageUrl:u,targetUrl:d,previewImageUrl:p})=>o$i("a",{"data-rbup-endslate-item":!0,class:"endslate-view-item",href:d,target:"_self",children:[o$i(CosmosMediaPreview,{class:"endslate-view-item__image",image:u,imagePreview:p,"data-rbup-endslate-item-image":!0,imageAlt:""}),o$i(CosmosText,{class:"endslate-view-item__title",weight:"bold",appearance:"light",size:"xx-small@small x-small@medium medium@large",clamp:2,children:c})]}),EndslateView=({relatedVideos:c,config:u,playOrReplayCallback:d})=>{let{playerState:{playerCoordinator:p}}=usePlayerContext(),h=useStartEndViewState(p),f=c&&"END"===h,m=(null==u?void 0:u.title)??translate("endslate-title");return o$i(k$5,{children:f&&o$i("div",{"data-rbup-endslate":!0,children:o$i("div",{class:"endslate-view",children:o$i("div",{class:"endslate-view__grid",children:[o$i(CosmosTitle,{class:"endslate-view__headline","data-rbup-endslate-title":!0,appearance:"light",size:"xx-small@small x-small@medium small@large",weight:"bold",children:m}),o$i("div",{class:"endslate-view__items",children:c.map((c,u)=>o$i(EndslateViewItem,{...c},u))}),o$i(CosmosButton,{class:"endslate-view__replay-button","data-rbup-endslate-replay":!0,kind:"secondary",size:"small",shape:"pill",appearance:"light",onClick:()=>{null==p||p.restartPlaybackFromBeginning(),null==p||p.play(),d()},children:[o$i(CosmosIconReplay,{class:"endslate-view__replay-icon",slot:"icon"}),translate("endslate-replay")]})]})})})})},InitialLoadingSpinner=()=>o$i("div",{class:"initial-loading-spinner","data-rbup-initial-loading-spinner":!0,children:o$i("div",{class:"initial-loading-spinner__container",children:o$i(CosmosSpinner,{"data-rbup-buffer":!0,appearance:"light"})})}),selectedLocales=window.navigator.languages,longDateFormat=Intl.DateTimeFormat(selectedLocales,{dateStyle:"long"}),shortDateFormat=Intl.DateTimeFormat(selectedLocales,{weekday:"short",day:"2-digit",month:"short",year:"numeric"}),timeZonedTimeFormat=Intl.DateTimeFormat(selectedLocales,{hour:"numeric",minute:"numeric",timeZoneName:"short"});function getStreamState(c,u){let d;switch(null==u?void 0:u.phase){case"canceled":d="CANCELED";break;case"live":d="STREAMING";break;case"trim":d="TRIMMING";break;case"unconfirmed":d="UNCONFIRMED";break;case"pre":d="PRE";break;case"post":case void 0:d="NOT_LIVE_STREAM"}return d}function extractPosterImageTag(c){return c?Array.isArray(c)?c.find(c=>extractPosterImageTag(c)):c&&"object"==typeof c&&"type"in c?"img"===c.type||"picture"===c.type?c:extractPosterImageTag(c.props.children):void 0:void 0}function getCountdownString(c,u=new Date){if(!c)return;let d=new Date(c).getTime()-u.getTime(),p=Math.floor(d/864e5),h=Math.floor(d/36e5%24),f=Math.floor(d/1e3/60%60),m=Math.floor(d/1e3%60);return{days:p<0?"00":addLeadingZero(p),hours:h<0?"00":addLeadingZero(h),minutes:f<0?"00":addLeadingZero(f),seconds:m<0?"00":addLeadingZero(m)}}let LiveStreamCountdown=({nowDate:c,startTime:u})=>{let d=_$3(0),[p,h]=h$3(getCountdownString(u));return p$7(()=>(d.current=window.setInterval(()=>{u&&h(getCountdownString(u,c))},1e3),()=>{window.clearInterval(d.current)}),[c,u]),o$i("div",{class:"live-stream-countdown",children:[o$i("div",{class:"live-stream-countdown__segment",children:[o$i("div",{class:"live-stream-countdown__numbers",children:[o$i("div",{class:"live-stream-countdown__number",children:o$i(CosmosText,{size:"medium",weight:"bold",children:null==p?void 0:p.days[0]})}),o$i("div",{class:"live-stream-countdown__number",children:o$i(CosmosText,{size:"medium",weight:"bold",children:null==p?void 0:p.days[1]})})]}),o$i(CosmosText,{appearance:"light",kind:"subtle",size:"x-small",children:translate("liveStream-days")})]}),o$i("div",{class:"live-stream-countdown__segment",children:[o$i("div",{class:"live-stream-countdown__numbers",children:[o$i("div",{class:"live-stream-countdown__number",children:o$i(CosmosText,{size:"medium",weight:"bold",children:null==p?void 0:p.hours[0]})}),o$i("div",{class:"live-stream-countdown__number",children:o$i(CosmosText,{size:"medium",weight:"bold",children:null==p?void 0:p.hours[1]})})]}),o$i(CosmosText,{appearance:"light",kind:"subtle",size:"x-small",children:translate("liveStream-hours")})]}),o$i("div",{class:"live-stream-countdown__segment",children:[o$i("div",{class:"live-stream-countdown__numbers",children:[o$i("div",{class:"live-stream-countdown__number",children:o$i(CosmosText,{size:"medium",weight:"bold",children:null==p?void 0:p.minutes[0]})}),o$i("div",{class:"live-stream-countdown__number",children:o$i(CosmosText,{size:"medium",weight:"bold",children:null==p?void 0:p.minutes[1]})})]}),o$i(CosmosText,{appearance:"light",kind:"subtle",size:"x-small",children:translate("liveStream-minutes")})]}),o$i("div",{class:"live-stream-countdown__segment",children:[o$i("div",{class:"live-stream-countdown__numbers",children:[o$i("div",{class:"live-stream-countdown__number",children:o$i(CosmosText,{size:"medium",weight:"bold",children:null==p?void 0:p.seconds[0]})}),o$i("div",{class:"live-stream-countdown__number",children:o$i(CosmosText,{size:"medium",weight:"bold",children:null==p?void 0:p.seconds[1]})})]}),o$i(CosmosText,{appearance:"light",kind:"subtle",size:"x-small",children:translate("liveStream-seconds")})]})]})};function calculateStateFromStreamState(c){return{renderComponent:"NOT_LIVE_STREAM"!==c&&"STREAMING"!==c,isCanceled:"CANCELED"===c,isPre:"PRE"===c,isTrimming:"TRIMMING"===c,isUnconfirmed:"UNCONFIRMED"===c}}let InfoDisplay=({streamState:c})=>{let{isCanceled:u,isTrimming:d,isUnconfirmed:p}=calculateStateFromStreamState(c),h=c.toLocaleLowerCase(),f=`liveStream-${h}`,m={[`data-rbup-live-stream-info-${h}-badge`]:!0,class:"live-stream-info__badge",appearance:"light",size:"x-small",weight:"bold"};return o$i(k$5,{children:[u&&o$i(CosmosText,{...m,children:[o$i(CosmosIconNoData,{class:"live-stream-info__icon"}),o$i("span",{children:translate(f)})]}),d&&o$i(CosmosText,{...m,children:[o$i(CosmosIconClock,{class:"live-stream-info__icon"}),o$i("span",{children:translate(f)})]}),p&&o$i(CosmosText,{...m,children:[o$i(CosmosIconEventDetails,{class:"live-stream-info__icon"}),o$i("span",{children:translate(f)})]})]})},PreOrCanceledOrTrimmingDisplay=({streamState:c,startTime:u})=>{let{isCanceled:d,isPre:p,isTrimming:h}=calculateStateFromStreamState(c);return o$i(k$5,{children:[(p||d)&&o$i(CosmosText,{class:`live-stream-info__date${d?" live-stream-info__date--canceled":""}`,appearance:"light",size:"x-small",children:u&&o$i(k$5,{children:[o$i("span",{"data-rbup-canceled-date":!0,children:longDateFormat.format(new Date(u))}),o$i("span",{class:"live-stream-info__separator",children:"·"}),o$i("span",{"data-rbup-canceled-time":!0,children:timeZonedTimeFormat.format(new Date(u))})]})}),h&&o$i(CosmosText,{class:"live-stream-info__date live-stream-info__date--trimming",appearance:"light",size:"x-small",children:u&&o$i(k$5,{children:[o$i(CosmosIconLiveBroadcast,{class:"live-stream-info__icon"}),o$i("span",{children:[translate("liveStream-airedOn",{date:shortDateFormat.format(new Date(u))})," "]})]})})]})},LiveStreamInfoPoster=({userPosterImage:c,posterSrcSet:u,playerWidth:d,imgAlt:p})=>o$i(k$5,{children:c?o$i("div",{class:"live-stream-info__custom-poster-container",children:c}):o$i("div",{class:"live-stream-info__poster-container",children:o$i(CosmosImage,{"data-rbup-live-stream-info-poster":!0,fit:"cover",imagePreview:null==u?void 0:u.preview,srcset:null==u?void 0:u.srcSet,image:null==u?void 0:u.src,sizes:`${d}px`,alt:p})})}),LiveStreamInfo=({playerWidth:c,aspectRatio:u,customPosterImage:d})=>{let{playerState:{liveStatus:p,mediaMetaData:h,playbackMode:f,posterImage:m,playerConfiguration:g}}=usePlayerContext(),v=getStreamState(f,p),{renderComponent:y,isPre:b}=calculateStateFromStreamState(v),S=(null==p?void 0:p.startTime)??resolveCurrentSunrise(h),_=S&&100>getDaysFromNow(S),E=F$4(()=>m?calculatePosterSrcSet(m,u):void 0,[u,m]),T=(null==h?void 0:h.title)??(null==g?void 0:g.title),w=F$4(()=>extractPosterImageTag(d),[d]);return o$i(k$5,{children:y&&o$i("div",{"data-rbup-live-stream-info":!0,class:"live-stream-info",children:[o$i(LiveStreamInfoPoster,{userPosterImage:w,posterSrcSet:E,playerWidth:c,imgAlt:T}),o$i("div",{class:"live-stream-info__background"}),o$i("div",{class:"live-stream-info__info",children:[(null==h?void 0:h.eventLogoUrl)&&o$i("img",{"data-rbup-live-stream-info-event-logo":!0,src:h.eventLogoUrl,class:"live-stream-info__event-logo",alt:""}),b&&_&&o$i("div",{"data-rbup-live-stream-info-countdown":!0,class:"live-stream-info__countdown",children:o$i(LiveStreamCountdown,{startTime:S})}),o$i(InfoDisplay,{streamState:v}),o$i(CosmosText,{"data-rbup-live-stream-info-title":!0,appearance:"light",class:"live-stream-info__title",size:"large x-large@medium",weight:"bold",children:null==h?void 0:h.title}),o$i(PreOrCanceledOrTrimmingDisplay,{streamState:v,startTime:null==p?void 0:p.startTime}),o$i(CosmosText,{"data-rbup-live-stream-info-description":!0,class:"live-stream-info__description",appearance:"light",size:"x-small",kind:"subtle",children:null==h?void 0:h.description}),(null==h?void 0:h.eventPageUrl)&&o$i(CosmosText,{class:"live-stream-info__event-link",size:"x-small",weight:"bold",children:o$i(CosmosButton,{"data-rbup-live-stream-info-event-page-link":!0,appearance:"light",href:h.eventPageUrl,kind:"tertiary",shape:"pill",size:"small",target:"_blank",children:[o$i(CosmosIconChevronLeft,{slot:"icon",class:"live-stream-info__icon"}),translate("liveStream-backToEvent")]})})]})]})})};function getDaysFromNow(c){let u=new Date(c);return Math.floor(Math.abs((new Date).getTime()-u.getTime())/1e3/86400)}
129function resolveCurrentSunrise(c){if(c)return c.currentSunrise}function timeDifference(c){return Date.parse(c)-Date.now()}function getTimeRemaining(c){let u=getFormattedTimeString(timeDifference(c)/1e3).split(":"),d=3===u.length,p=d?u[0]:"00",h=d?u[1]:u[0],f=d?u[2]:u[1];return`${p} h ${h} m ${f} s`}function getMonthString(c){return["january","february","march","april","may","june","july","august","september","october","november","december"][c]}let TWO_DAYS_IN_MS=1728e5,MultiChannelSwitcherViewLiveAtLabel=({startTime:c})=>{let[u]=h$3(()=>timeDifference(c)<TWO_DAYS_IN_MS&&timeDifference(c)>=0),d=_$3(0),[p,h]=h$3("...");return p$7(()=>{let p=new Date(c);if(u)d.current=window.setInterval(()=>{h(`${translate("multiChannel-label-liveIn")} ${getTimeRemaining(c)}`)},1e3);else{window.clearInterval(d.current);let c=`global-month-short-${getMonthString(p.getMonth())}`;h(`${p.getDate()} ${translate(c)} ${p.getFullYear()}`)}return()=>{window.clearInterval(d.current)}},[u,c]),o$i(CosmosText,{class:"multi-channel-switcher-view-live-at__label",size:"x-small",children:p})};function getStatusLabel(c){switch(c){case"now":return translate("multiChannel-label-nowWatching");case"live":return translate("multiChannel-label-live");case"post":return translate("multiChannel-label-replay");case"trim":return translate("multiChannel-label-trim");default:return}}function calculateClassName(c){return["multi-channel-switcher-view-item",!isMobileDevice()&&"multi-channel-switcher-view-item__desktop",c&&"multi-channel-switcher-view-item--active"].filter(Boolean).join(" ")}let MultiChannelSwitcherViewItem=({isCurrentlyPlaying:c=!1,phase:u,title:d,startTime:p,videoId:h,onSelectNewAsset:f})=>{let m=("post"===u||"live"===u)&&!c,g=T$4(c=>{m&&(isLeftClick(c)||isTouch(c)||isPrimaryPen(c))&&f(h)},[m,f,h]);return o$i("button",{class:calculateClassName(m),onPointerUp:g,children:o$i("div",{class:"multi-channel-switcher-view-item__container",children:[o$i("div",{class:"multi-channel-switcher-view-item__text",children:[o$i(CosmosText,{class:"multi-channel-switcher-view-item__title",appearance:"light",clamp:1,weight:"bold",size:"small",children:d}),o$i("div",{class:"multi-channel-switcher-view-item__status",children:[c&&o$i("div",{children:o$i(CosmosIconPlay,{class:"multi-channel-switcher-view-item__status-icon"})}),o$i(CosmosText,{class:"multi-channel-switcher-view-item__status-label",appearance:"light",clamp:1,size:"x-small",children:["pre"===u&&p&&o$i(MultiChannelSwitcherViewLiveAtLabel,{startTime:p}),"pre"!==u&&getStatusLabel(c?"now":u)]})]})]}),!c&&o$i("div",{class:"multi-channel-switcher-view-item__icon",children:o$i("div",{children:o$i(CosmosIconPlay,{class:"multi-channel-switcher-view-item__icon-play"})})})]})})};function onScroll(c,u,d){let p={behavior:"smooth"},h=c.scrollWidth/u-16;"left"===d&&(p.left=c.scrollLeft-h),"right"===d&&(p.left=c.scrollLeft+h),c.scrollTo(p)}function showHideScrollButtonsWhenNeeded(c){let u={showLeftButton:!1,showRightButton:!1};return c&&(c.scrollLeft>0&&(u.showLeftButton=!0),Math.round(c.scrollLeft+c.offsetWidth)<c.scrollWidth&&(u.showRightButton=!0)),u}function addCurrentToOtherLiveVideos(c,u){return null!=c&&c.otherLiveVideos&&u?[{phase:c.phase,startTime:c.startTime,title:u.title,videoId:u.videoId}].concat(c.otherLiveVideos):[]}let MultiChannelSwitcherView=({onCloseView:c,onPlayNewAsset:u})=>{let{playerState:{liveStatus:d,mediaMetaData:p}}=usePlayerContext(),h=_$3(null),[f,m]=h$3(),g=F$4(()=>addCurrentToOtherLiveVideos(d,p),[d,p]),v=T$4(u=>{u.stopPropagation(),c()},[c]);p$7(()=>{m(showHideScrollButtonsWhenNeeded(h.current))},[]);let y=T$4((c,u)=>{h.current&&(c.stopPropagation(),onScroll(h.current,g.length,u),m(showHideScrollButtonsWhenNeeded(h.current)))},[g.length]),b=T$4(d=>{u(d),c()},[c,u]);useResize(()=>m(showHideScrollButtonsWhenNeeded(h.current)),h);let[S]=h$3(!isMobileDevice()),_=S?"multi-channel-switcher-view__item-list-items":"multi-channel-switcher-view__item-list-items--mobile",E=["multi-channel-switcher-view__item-list",!S&&"multi-channel-switcher-view__item-list--mobile"].filter(Boolean).join(" "),T=["multi-channel-switcher-view__item-list-headline",S&&"multi-channel-switcher-view__item-list-headline--desktop"].filter(
129Boolean).join(" ");return o$i("div",{"data-rbup-multi-channel-switcher-view":!0,class:"multi-channel-switcher-view",children:[o$i("div",{class:"multi-channel-switcher-view__close-button-container",children:o$i("div",{class:"multi-channel-switcher-view__close-button",children:[o$i(ControlsButton,{dataAttribute:"data-rbup-close-button",Icon:o$i(CosmosIconClose,{"data-rbup-icon-close":!0,class:"multi-channel-switcher-view__close-icon",slot:"icon"}),appearance:"light",shape:"circle",kind:"tertiary",onPointerUp:v}),o$i(CosmosText,{class:"multi-channel-switcher-view__close-label",appearance:"light",size:"x-small",weight:"bold",children:translate("button-close")})]})}),o$i("div",{class:"multi-channel-switcher-view__item-list-container",children:[o$i("div",{class:E,children:[o$i(CosmosTitle,{class:T,appearance:"light",size:"x-small",children:translate("multiChannel-schedule")}),o$i("div",{class:_,onScroll:()=>{m(showHideScrollButtonsWhenNeeded(h.current))},ref:h,children:g.map((c,u)=>o$i(MultiChannelSwitcherViewItem,{isCurrentlyPlaying:0===u,phase:c.phase,title:c.title??"",videoId:c.videoId??"",startTime:c.startTime,onSelectNewAsset:b},u))})]}),!S&&o$i("div",{class:"multi-channel-switcher-view__fade multi-channel-switcher-view__fade--mobile"}),S&&o$i("div",{class:"multi-channel-switcher-view__navi","data-rbup-multi-channel-switcher-view-navi":!0,children:[o$i("div",{class:"multi-channel-switcher-view__fade multi-channel-switcher-view__fade--desktop"}),(null==f?void 0:f.showLeftButton)&&o$i("div",{class:"multi-channel-switcher-view__navi-button multi-channel-switcher-view__navi-button--left",children:o$i(ControlsButton,{dataAttribute:"rbup-multi-channel-switcher-left",Icon:o$i(CosmosIconChevronLeft,{"data-rbup-icon-arrow-left":!0,class:"multi-channel-switcher-view__navi-icon",slot:"icon"}),kind:"primary",shape:"square",onPointerUp:c=>y(c,"left")})}),(null==f?void 0:f.showRightButton)&&o$i("div",{class:"multi-channel-switcher-view__navi-button multi-channel-switcher-view__navi-button--right",children:o$i(ControlsButton,{dataAttribute:"rbup-multi-channel-switcher-right",Icon:o$i(CosmosIconChevronRight,{"data-rbup-icon-arrow-right":!0,class:"multi-channel-switcher-view__navi-icon",slot:"icon"}),kind:"primary",shape:"square",onPointerUp:c=>y(c,"right")})})]})]})]})},BASE_CLASS="product-placement",PRODUCT_PLACEMENT_RENDER_TIME_IN_SECONDS=3,defaultProductPlacementDefinition={ProductPlacementComponent:CosmosIconProductPlacement,displayTimeInSec:PRODUCT_PLACEMENT_RENDER_TIME_IN_SECONDS},RbupVideoProductPlacement=({productPlacementDefinition:c=defaultProductPlacementDefinition,onAnimationEnd:u})=>{let{ProductPlacementComponent:d,displayTimeInSec:p}=c,[h,f]=h$3(!0);return p$7(()=>{let c=window.setTimeout(()=>{f(!1)},1e3*p);return()=>{window.clearTimeout(c)}},[p]),o$i("div",{id:"product-placement","data-rbup-product-placement":!0,class:F$4(()=>getProductPlacementClasses(h),[h]),onAnimationEnd:u,children:o$i(d,{})})};function getProductPlacementClasses(c){return`${BASE_CLASS} ${c?"product-placement--fade-in":"product-placement--fade-out"}`}function usePressedKeyGroup(c,u){let[d,p]=h$3(!1),[h,f]=h$3([]),m=T$4(c=>{let d=c.key;!h.includes(d)&&u.includes(d)&&h.push(c.key)},[u,h]),g=T$4(()=>{p(h.join("")===u.join(""))},[u,h]),v=T$4(c=>{g();let u=c.key;f(h.filter(c=>c!==u))},[g,h]);return p$7(()=>{let u=c.current;if(!u)throw Error("No element provided");return u.addEventListener("keydown",m),u.addEventListener("keyup",v),()=>{u.removeEventListener("keydown",m),u.removeEventListener("keyup",v)}},[c,m,v]),d}let OverrideTarget={AUDIO:"Audio",SUBTITLES:"Subtitles",TRANSLATIONS:"Translations"};function languageOverrideInfo(c){if(!c)return;let u=getBrowserLanguage(),d=c.getStorageServiceAllStoredValues(),p=c.getPlayerConfiguration();return{audioOverride:calculateAudioOverride(p,c,u,d),subtitleOverride:calculateSubtitlesOverride(p,d),translationsOverride:calculateTranslationsOverride(p,u),overrideReference:calculateFormattedOverrideReferenceString(p,d)}}function calculateFormattedOverrideReferenceString(c,u){let d="",p="";return null!=u&&u.audioLanguage&&(d=`${d}${OverrideTarget.AUDIO}: ${u.audioLanguage} `),null!=u&&u.subtitleLanguage&&(d=`${d}${OverrideTarget.SUBTITLES}: ${u.subtitleLanguage} `),c.overrideAudioLanguage&&(p=`${p}${OverrideTarget.AUDIO}: ${c.overrideAudioLanguage} `),c.overrideSubtitleLanguage&&(p=`${p}${OverrideTarget.SUBTITLES}: ${c.overrideSubtitleLanguage} `),c.overrideTranslationLanguage&&(p=`${p}${OverrideTarget.TRANSLATIONS}: ${c.overrideTranslationLanguage} `),{storedRef:""!==d?d:void 0,configRef:""!==p?p:void 0}}function getCurrentAudioIso(c,u){let d=u??"";return c?c[d]:d}function calculateAudioOverride(c,u,d,p){var h,f;let m=getCurrentAudioIso(null==(h=u.getMediaMetaData())?void 0:h.availableAudioLanguages,null==(f=u.getSelectedAudioTrack())?void 0:f.lang),g=d===m&&(null==p?void 0:p.audioLanguage)!==m&&c.overrideAudioLanguage!==m?{source:"Browser",iso:d}:void 0,v=(null==p?void 0:p.audioLanguage)===m&&c.overrideAudioLanguage!==m?{source:"Storage",iso:null==p?void 0:p.audioLanguage}
129:void 0,y=c.overrideAudioLanguage?{source:"Config",iso:c.overrideAudioLanguage}:void 0;return g??v??y}function calculateSubtitlesOverride(c,u){return c.overrideSubtitleLanguage?{source:"Config",iso:c.overrideSubtitleLanguage}:null!=u&&u.subtitleLanguage?{source:"Storage",iso:u.subtitleLanguage}:void 0}function calculateTranslationsOverride(c,u){return c.overrideTranslationLanguage?{source:"Config",iso:c.overrideTranslationLanguage}:{source:"Browser",iso:u}}let CopyableListElement=({body:c})=>{let[u,d]=h$3(!1),p=T$4(async()=>{"string"==typeof c&&(await navigator.clipboard.writeText(c),d(!0),setTimeout(()=>{d(!1)},5e3))},[c]),h=o$i("div",{class:"nerd-mode__list-item-button",children:o$i(CosmosTooltip,{content:translate("nerdMode-copyId"),placement:"above",spacing:"tight",unreachable:!0,follow:"cursor",children:o$i(CosmosButton,{kind:"cover-up",size:"small",shape:"pill",onClick:p,children:c})})}),f=o$i(CosmosText,{size:"small",children:translate("nerdMode-idCopied")});return u?f:h},ListItem=({label:c,crepoOrAssetId:u})=>o$i(k$5,{children:[c&&o$i("li",{class:"nerd-mode__list-item",children:c&&o$i(CosmosText,{size:"small",children:c})}),u&&o$i("li",{class:"nerd-mode__list-item",children:u&&CopyableListElement({body:u})})]}),PropertyList=({crepoId:c,subtitleOverride:u,translationsOverride:d,hasOverrideReference:p})=>o$i("ul",{class:"nerd-mode__label-list","data-rbup-nerd-mode-label-list":!0,children:[o$i(ListItem,{label:translate("nerdMode-assetId")}),c&&o$i(ListItem,{label:translate("nerdMode-crepoId")}),o$i(ListItem,{label:translate("nerdMode-playerVersion")}),o$i(ListItem,{label:translate("nerdMode-techVersion")}),o$i(ListItem,{label:translate("nerdMode-geolocation")}),o$i(ListItem,{label:translate("nerdMode-rendition")}),o$i(ListItem,{label:translate("nerdMode-audioLanguageOverride")}),u&&o$i(ListItem,{label:translate("nerdMode-subtitlesLanguageOverride")}),d&&o$i(ListItem,{label:translate("nerdMode-translationsLanguageOverride")}),p&&o$i(ListItem,{label:translate("nerdMode-overrideReference")})]}),ValueList=({elementRef:c,elementStyle:u,assetId:d,crepoId:p,subtitleOverride:h,playerCoordinator:f,userCountry:m,audioOverride:g,translationsOverride:v,hasOverrideReference:y,overrideReference:b})=>o$i("ul",{class:"nerd-mode__data-list","data-rbup-nerd-mode-data-list":!0,ref:c,style:u,children:[o$i(ListItem,{crepoOrAssetId:d}),p&&o$i(ListItem,{crepoOrAssetId:p}),o$i(ListItem,{label:CORE_VERSION}),o$i(ListItem,{label:(null==f?void 0:f.getTechVersion())??translate("nerdMode-unknownValue")}),o$i(ListItem,{label:m}),o$i(ListItem,{label:`${null==f?void 0:f.getVideoQuality().height}p`}),o$i(ListItem,{label:g??"N/A"}),o$i(ListItem,{label:h}),o$i(ListItem,{label:v}),y&&(null==b?void 0:b.configRef)&&o$i(ListItem,{label:`${translate("nerdMode-playerConfiguration")}: ${b.configRef}`}),y&&(null==b?void 0:b.storedRef)&&o$i(ListItem,{label:`${translate("nerdMode-localeStorage")}: ${b.storedRef}`})]});function getLanguageOverrideInfo(c){return null!=c&&c.iso?`${c.iso} (${c.source})`:void 0}function calculateAssetId(c,u){return(null==c?void 0:c.assetId)??(null==c?void 0:c.videoId)??u}let NerdMode=()=>{let{playerState:{mediaMetaData:c,playerCoordinator:u,playerConfiguration:d}}=usePlayerContext(),p=_$3(null),[h,f]=h$3(""),m=calculateAssetId(c,null==d?void 0:d.assetId),g=null!=c&&c.assetId?c.videoId:void 0,v=F$4(()=>languageOverrideInfo(u),[u]),y=getLanguageOverrideInfo(null==v?void 0:v.audioOverride),b=getLanguageOverrideInfo(null==v?void 0:v.subtitleOverride),S=getLanguageOverrideInfo(null==v?void 0:v.translationsOverride),_=null==v?void 0:v.overrideReference,E=(null==_?void 0:_.storedRef)??(null==_?void 0:_.configRef);return p$7(()=>{p.current&&f(`width: ${p.current.clientWidth+1}px`)},[f]),o$i("section",{class:"nerd-mode","data-rbup-nerd-mode":!0,children:[o$i("header",{class:"nerd-mode__header","data-rbup-nerd-mode-header":!0,children:[o$i(CosmosIconPreview,{class:"nerd-mode__header-icon","data-rbup-nerd-mode-header-icon":!0}),o$i(CosmosTitle,{"data-rbup-nerd-mode-header-title":!0,weight:"bold",size:"x-small",children:"Nerd Mode"})]}),o$i("hr",{class:"nerd-mode__separator-line"}),o$i("div",{class:"nerd-mode__grid",children:[o$i(PropertyList,{crepoId:g,
129subtitleOverride:b,translationsOverride:S,hasOverrideReference:E}),o$i(ValueList,{elementRef:p,elementStyle:h,assetId:m,crepoId:g,playerCoordinator:u,userCountry:(null==c?void 0:c.userCountry)??translate("nerdMode-unknownValue"),audioOverride:y,subtitleOverride:b,translationsOverride:S,hasOverrideReference:E,overrideReference:_})]})]})},ActiveCastIndicator=()=>{let{playerState:{castingDeviceName:c}}=usePlayerContext(),u=F$4(()=>{if(c)return translate("playing-on-device",{deviceName:c})},[c]);return o$i("div",{class:"active-cast-indicator",children:o$i("div",{class:"active-cast-indicator__content",children:[o$i(CosmosIconChromecast,{class:"cast-icon"}),u&&o$i(CosmosTitle,{appearance:"light",children:u})]})})},MAIN_CLASS_NAME="themed-player-root",InnerThemedPlayer=k$3((c,u)=>{let{adService:d,config:p,CustomToastComponent:h,dataLoader:f,drmTokenService:m,id:g,internalOnApiAvailable:v,liveStatusDataLoader:y,styles:b,ThemeComponent:S,aspectRatio:_,globalKeyboardNavigation:E,CenteredToastComponent:T,WrapperComponent:w,AdditionalButtonComponent:P}=c,[A,I]=h$3(),{init:M,playerState:{playerCoordinator:R,playerStatus:k,isVRVideo:x,isCasting:C}}=usePlayerContext(),O=validateGivenAspectRatio(_),D=_$3(null),[L,N]=h$3(p);p$7(()=>{N(p)},[p]);let U=F$4(()=>w??(({children:c})=>o$i(k$5,{children:c})),[w]),F=usePlayerWidth(D),B=useContainerQuery(D,BREAKPOINTS),j={smallOrBigger:cssClassesContainsBreakpoint(B,Breakpoint.small),mediumOrBigger:cssClassesContainsBreakpoint(B,Breakpoint.medium),largeOrBigger:cssClassesContainsBreakpoint(B,Breakpoint.large)},H=getThemeCSSVariables(null==L?void 0:L.theme),V=T$4(c=>{c&&(M(c),c.fullscreenElement=D.current)},[M]),z=usePressedKeyGroup(D,[KEYCODE_R,KEYCODE_B]);p$7(()=>{z&&I(c=>!c)},[z]);let q=T$4(c=>{N({...p,assetId:c})},[p]),W=getMaxWidthForAspectRatio(O),G=`${MAIN_CLASS_NAME}${x?" vr-content":""}`,K=T$4(()=>{var c;null==(c=D.current)||c.focus()},[]),Y=calcValueOfAspectRatio(O);return o$i(k$5,{children:[o$i("style",{children:b}),o$i("div",{"data-rbup-pause-themed-player":!0,id:g,class:`${G} ${B}`,style:{...H,"--max-width":W,"--aspect-ratio":Y},ref:D,tabIndex:0,onKeyDown:c=>{handleThemedPlayerKeyDown(c,D,R)},"aria-label":"Video Player",role:"region",children:L&&o$i(U,{resolvedAspectRatio:Y,sizeBreakpoints:j,children:[o$i(RbupVideoCore,{ref:u,adService:d,config:L,dataLoader:f,drmTokenService:m,liveStatusDataLoader:y,onCoordinatorAvailable:V,internalOnApiAvailable:v,aspectRatio:O}),C&&o$i(ActiveCastIndicator,{}),R&&o$i(S,{...c,config:L,sizeBreakpoints:j,playerWidth:F,playerCoordinator:R,playerStatus:k,onPlayNewAsset:q,CustomToastComponent:h,aspectRatio:O,globalKeyboardNavigation:E,CenteredToastComponent:T,playOrReplayCallback:K,AdditionalButtonComponent:P}),A&&o$i(NerdMode,{}),o$i(ErrorDisplay,{})]})})]})}),ThemedPlayer=k$3((c,u)=>o$i(PlayerStateContextProvider,{children:o$i(UserInteractionContextProvider,{children:o$i(ControlsVisibilityContextProvider,{children:o$i(InnerThemedPlayer,{ref:u,...c})})})})),StartAndEndViewButtons=({currentState:c,showAtEnd:u,tooltipText:d,replayButtonLabel:p,playButtonLabel:h})=>o$i("div",{class:"start-and-end-view__buttons",children:o$i(ThemedVideoPlayerTooltip,{content:d,offset:30,children:["END"===c&&u&&o$i(CosmosButton,{"data-rbup-replay-button":!0,buttonAriaLabel:p,shape:"circle",class:"start-and-end-view__button",children:o$i(CosmosIconReplay,{"data-rbup-replay-icon":!0,class:"start-and-end-view__icon",slot:"icon"})}),"START"===c&&o$i(CosmosButton,{"data-rbup-start-button":!0,buttonAriaLabel:h,shape:"circle",class:"start-and-end-view__button",children:o$i(CosmosIconPlay,{class:"start-and-end-view__icon",slot:"icon"})})]})}),log$6=loglevelExports.getLogger("StartAndEndView");function shouldRenderView(c,u){return"HIDDEN"!==c&&"TRANSITIONING"!==c||u}function shouldShowPoster(c,u){return"START"===c||"END"===c||"ERROR"===c||u}let PosterImage=({userPosterImage:c,posterSrcSet:u,playerWidth:d,imgAlt:p})=>c?o$i("div",{class:"start-and-end-view__bg-custom-image-container",children:c}):o$i("div",{className:"start-and-end-view__bg-image-container",children:o$i(CosmosImage,{"data-rbup-poster":!0,fit:"cover",imagePreview:null==u?void 0:u.preview,srcset:null==u?void 0:u.srcSet,image:null==u?void 0:u.src,sizes:`${d}px`,alt:p})}),StartAndEndView=({playerWidth:c,customPosterImage:u,aspectRatio:d,showAtEnd:p=!0,playOrReplayCallback:h})=>{let{playerState:{playerCoordinator:f,posterImage:m,mediaMetaData:g,playerConfiguration:v}}
129=usePlayerContext(),y=useStartEndViewState(f),b="TRANSITIONING"===y&&((null==f?void 0:f.isTransitioningFromEnded())??!1),S=()=>{"START"===y?(null==f||f.play().catch(c=>log$6.error("failed to start playback",c)),h()):"END"===y&&p&&(null==f||f.restartPlaybackFromBeginning(),null==f||f.play().catch(c=>log$6.error("failed to start playback",c)),h())},_=F$4(()=>m?calculatePosterSrcSet(m,d):void 0,[d,m]),E=translate("tooltip-play"),T=translate("tooltip-replay"),w=(null==g?void 0:g.title)??(null==v?void 0:v.title),P=F$4(()=>extractPosterImageTag(u),[u]),A="END"===y?T:E;return(p$7(()=>{"END"===y&&(isIphoneDevice()&&(null==f||f.setFullscreen(!1)),null!=f&&f.isInPictureInPictureMode()&&f.togglePictureInPicture())},[y,f]),shouldRenderView(y,b))?o$i("div",{"data-rbup-start-end":!0,class:"start-and-end-view",onKeyDown:c=>{let u="keydown"===c.type&&c.key===KEYCODE_ENTER,d="keyup"===c.type&&c.key===KEYCODE_SPACE;(u||d)&&S()},onPointerUp:S,children:[shouldShowPoster(y,b)&&o$i(PosterImage,{userPosterImage:P,posterSrcSet:_,playerWidth:c,imgAlt:w}),"TRANSITIONING"!==y&&o$i(StartAndEndViewButtons,{currentState:y,showAtEnd:p,tooltipText:A,replayButtonLabel:T,playButtonLabel:E}),b&&o$i(InitialLoadingSpinner,{})]}):null},SubtitleContainer=({htmlStringArr:c,controlsVisibility:u})=>o$i("div",{class:`subtitles-overlay ${"fade-in"===u?"subtitles-on-top":""}`,children:o$i("div",{class:"subtitles-overlay__text-container",children:null==c?void 0:c.map((c,u)=>o$i(CosmosText,{size:"medium@small large@large",appearance:"light",weight:"medium",class:"subtitles-overlay__text-display",dir:"auto",children:o$i("span",{dangerouslySetInnerHTML:{__html:c}})},u))})}),SubtitlesOverlay=()=>{let{playerState:{playerCoordinator:c}}=usePlayerContext(),{controlsVisibility:u}=useControlsVisibilityContext(),[d,p]=h$3();return p$7(()=>{let u=c=>{switch(c.type){case"subtitleUpdate":p(c.currentSubtitleHtmls);break;case"playbackFinished":case"loaded":case"seeking":p(void 0)}};return null==c||c.addEventListener(u),()=>{null==c||c.removeEventListener(u)}},[c]),o$i(k$5,{children:d&&o$i(SubtitleContainer,{htmlStringArr:d,controlsVisibility:u})})};function useIsCenteredToastWrapperOverlapping(c,u){let[d,p]=h$3(!0);return p$7(()=>
129{if(c||!d)return;let h=window.setInterval(()=>{var c;let d=null==(c=u.current)?void 0:c.getRootNode(),h=null==d?void 0:d.getElementById("maturity-rating"),f=null==d?void 0:d.getElementById("product-placement"),m=null==d?void 0:d.getElementById("subtitles-available");p(!!h||!!f||!!m)},100);return()=>window.clearInterval(h)},[u,c,d]),d}let CenteredToastWrapper=({CenteredToastComponent:c,sizeBreakpoints:u,parentRef:d})=>{let p=useIsCenteredToastWrapperOverlapping(u.mediumOrBigger,d);return o$i(k$5,{children:!u.mediumOrBigger&&!p&&c&&o$i(c,{})})},styles$3=':host,:root{all:initial;--transition-timing: .3s;--g-controls-animation-fade-in: g-controls-fade-in var(--transition-timing) forwards;--g-controls-animation-fade-out: g-controls-fade-out var(--transition-timing) forwards;-webkit-tap-highlight-color:transparent}:host *,:root *{box-sizing:border-box}.g-icon{color:#fff;height:18px;width:18px}.g-icon--primary{color:var(--rbup-primary-color)}.g-screen-reader-only{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}@keyframes g-controls-fade-in{0%{pointer-events:none;opacity:0}to{pointer-events:auto;opacity:1}}@keyframes g-controls-fade-out{0%{pointer-events:auto;opacity:1}to{pointer-events:none;opacity:0}}.cornerbug{height:100%;justify-self:center;position:absolute;aspect-ratio:var(--aspect-ratio);pointer-events:none}.cornerbug__icon{position:absolute;top:4.9383%;right:2.777%;width:8.888%;max-width:180px;pointer-events:none}.cornerbug__icon:after{content:"";position:relative;display:block;width:1%;height:0;padding-bottom:41.86%}.endslate-view{align-items:center;background:linear-gradient(0deg,#000f1e66,#000f1e66);display:flex;justify-content:center;padding:0 24px;position:absolute;left:0;bottom:0;top:0;right:0;--cosmos-title-font-family: var(--rbup-component-font-family, $default-font-family)}.endslate-view__grid{display:grid;grid-template-areas:"title" "image" "button"}.endslate-view__headline{grid-area:title;margin-bottom:12px}.endslate-view__replay-button{grid-area:button;justify-self:center;margin-top:12px}.endslate-view__replay-icon{height:25px;width:25px}.endslate-view__items{grid-area:image;display:grid;flex:1;grid-column-gap:24px;grid-template-columns:repeat(2,1fr);grid-template-rows:auto 0}.endslate-view-item{background-color:#000f1e99;border-radius:6px;filter:drop-shadow(0 16px 16px rgba(0,15,30,.2));position:relative;height:77px;width:136px}.endslate-view-item__image{height:100%;border-radius:6px}.endslate-view-item:nth-child(3){display:none}.endslate-view-item:after{background:linear-gradient(180deg,#000f1e00,#000f1e66);border-radius:6px;content:"";height:100%;left:0;position:absolute;top:0;width:100%}.endslate-view-item:hover:after{background:linear-gradient(180deg,#000f1e00,#000f1e99)}.endslate-view-item__title{align-items:end;bottom:8px;display:flex;left:14px;max-width:360px;pointer-events:none;position:absolute;z-index:1}.cq-650 .endslate-view-item{height:163px;width:290px}.cq-650 .endslate-view__replay-button{margin-top:40px}.cq-1000 .endslate-view-item{height:170px;width:302px}.cq-1000 .endslate-view__items{grid-template-columns:repeat(3,1fr);grid-template-rows:1fr}.cq-1000 .endslate-view-item:nth-child(3){display:initial}.cq-1200 .endslate-view-item{height:207px;width:368px}.cq-1350 .endslate-view-item{height:225px;width:400px}.error-display{position:absolute;top:0;width:100%;height:100%;display:flex;justify-content:center;text-align:start}.error-display__description{position:absolute;background-color:#000c;border-radius:8px;display:flex;top:24px;padding:12px;
129min-width:200px;max-width:500px;min-height:80px}.cq-650 .error-display__description{min-width:400px}.error-display__icon-container{padding:0 10px 0 0}.error-display__icon{width:36px;height:36px;color:#db0a40}.error-display__text-container{flex-direction:column;display:inherit;padding:4px 0;color:#fff}.error-display__text{width:fit-content}.initial-loading-spinner{align-items:center;display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%}.initial-loading-spinner__container{width:80px;height:80px}.initial-loading-spinner [data-rbup-buffer]{height:100%;width:100%}.nerd-mode{--cosmos-text-color: #FFFFFF;--cosmos-title-color: #FFFFFF;--cosmos-title-font-family: var(--rbup-component-font-family, $default-font-family);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#00162bcc;height:100%;left:0;min-width:430px;overflow:auto;padding:40px;position:absolute;top:0}.nerd-mode__header{align-items:center;display:flex;gap:16px}.nerd-mode__header-icon{color:#fff;height:30px;width:30px}.nerd-mode__separator-line{border:1px solid #DB0A40}.nerd-mode__grid{display:grid;grid-template-columns:auto 1fr;grid-template-areas:"labels data";gap:40px}.nerd-mode__data-list,.nerd-mode__label-list{list-style:none;padding:0}.nerd-mode__data-list{grid-area:data}.nerd-mode__label-list{grid-area:labels}.nerd-mode__list-item{min-height:40px}.live-stream-countdown{display:flex;gap:12px}.live-stream-countdown__segment{align-items:center;display:flex;flex-direction:column}.live-stream-countdown__numbers{display:flex;gap:2px;margin-bottom:8px}.live-stream-countdown__number{background-color:#fff;align-items:center;border-radius:3px;display:flex;height:40px;justify-content:center;width:28px}.live-stream-info{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;top:0;width:100%}.live-stream-info__background{background-color:#00162bb3;display:flex;height:100%;position:absolute;top:0;width:100%}.live-stream-info__badge{background-color:#ffffff1a;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:6px;align-items:center;display:flex;justify-content:center;margin-bottom:24px;padding:8px 16px}.live-stream-info__badge span{position:relative;top:-2px}.live-stream-info__countdown{margin-bottom:8px}.live-stream-info__canceled{padding-bottom:24px;padding-top:24px}.live-stream-info__date{margin-bottom:12px}.live-stream-info__date--canceled{text-decoration:#FFFFFF line-through}.live-stream-info__date--trimming span{position:relative;top:-2px}.live-stream-info__description{display:none;margin-bottom:24px;width:400px}.live-stream-info__event-logo{display:none;margin-bottom:24px;max-height:154px}.live-stream-info__icon{height:20px;margin-right:8px;width:20px}.live-stream-info__info{align-items:center;display:flex;flex-direction:column;justify-content:center;left:0;padding:24px;text-align:center;width:100%;height:100%;position:relative}.live-stream-info__poster-container{position:absolute;height:100%;width:100%}.live-stream-info__poster-container img{height:100%;width:100%;object-fit:cover}.live-stream-info__custom-poster-container{position:absolute;width:100%;height:100%}.live-stream-info__custom-poster-container img{width:100%;height:100%;object-fit:cover}.live-stream-info__separator{margin:0 8px}.live-stream-info__title{margin-bottom:12px}.cq-650 .live-stream-info__description{display:block}.cq-650 .live-stream-info__event-link{left:24px;position:absolute;top:24px}.cq-650 .live-stream-info__event-logo{display:block;max-width:120px}.cq-1000 .live-stream-info__countdown{margin-bottom:24px}.cq-1000 .live-stream-info__event-logo{max-width:170px}.ad-controls{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.ad-controls__back-button{pointer-events:auto}.ad-controls__ui{--cosmos-button-background-hover: rgb(0 0 0 / 0%);align-items:center;background:linear-gradient(0deg,#0000007d,#00000050 36%,#0000 85%);bottom:0;display:flex;justify-content:space-between;gap:8px;left:0;padding:8px;position:absolute;width:100%}.ad-controls__buttons{align-items:center;display:flex;gap:8px;pointer-events:auto}.ad-controls__tooltip{align-items:center;display:flex}
129.ad-controls__left-side-controls,.ad-controls__right-side-controls{display:flex}.ad-controls-time-display{align-items:center;display:flex;gap:4px;margin:0 8px;position:relative;-webkit-user-select:none;user-select:none}.themed-video-player-tooltip{--cosmos-tooltip-background: var(--rbup-tooltip-background, #00162B);--cosmos-tooltip-font-family: var(--rbup-tooltip-font-family, $default-font-family)}.multi-channel-switcher-view{background-color:#000f1ee6;position:absolute;top:0;height:100%;-webkit-user-select:none;user-select:none;width:100%}.multi-channel-switcher-view__navi{position:absolute;bottom:97px;width:100%;pointer-events:none}.multi-channel-switcher-view__navi-button{pointer-events:auto}.multi-channel-switcher-view__navi-button--left{left:-5px;position:absolute}.multi-channel-switcher-view__navi-button--left [kind=primary]{--cosmos-button-background: #FFFFFF;--cosmos-button-background-hover: #F8F8F8;--cosmos-button-border-width: 0}.multi-channel-switcher-view__navi-button--right{right:-5px;position:absolute}.multi-channel-switcher-view__navi-button--right [kind=primary]{--cosmos-button-background: #FFFFFF;--cosmos-button-background-hover: #F8F8F8;--cosmos-button-border-width: 0}.multi-channel-switcher-view__navi-icon{color:#00162b}.multi-channel-switcher-view__close-button-container{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.multi-channel-switcher-view__close-button-container div{text-align:center;margin-bottom:112px}.multi-channel-switcher-view__close-icon{width:30px;height:30px;padding-top:4px}.multi-channel-switcher-view__close-label{margin-top:16px;--cosmos-text-color: rgba(255, 255, 255, .6);display:none}.multi-channel-switcher-view__item-list-container{bottom:0;left:0;position:absolute;right:0;pointer-events:none}.multi-channel-switcher-view__item-list{position:relative;margin:32px 0}.multi-channel-switcher-view__item-list-headline{margin-left:16px;padding:4px 0}.multi-channel-switcher-view__item-list--mobile{margin:32px 0}.multi-channel-switcher-view__item-list-headline--desktop{margin-left:56px}.multi-channel-switcher-view__fade{background:linear-gradient(to right,rgba(0,15,30,.9) 75%,transparent);height:5.3125rem;left:0;position:absolute}.multi-channel-switcher-view__fade--desktop{bottom:-66px;width:56px}.multi-channel-switcher-view__fade--mobile{bottom:32px;width:16px}.multi-channel-switcher-view__item-list-items{overflow:hidden;scroll-behavior:smooth}.multi-channel-switcher-view__item-list-items--mobile{overflow:scroll}.multi-channel-switcher-view__item-list-items,.multi-channel-switcher-view__item-list-items--mobile{display:flex;column-gap:16px;pointer-events:auto}.multi-channel-switcher-view-item--active{cursor:pointer}.multi-channel-switcher-view-item--active:hover{background-color:#fff3}.multi-channel-switcher-view-item{background-color:#ffffff1a;border-radius:6px;border:none;filter:drop-shadow(0 16px 16px rgba(0,15,30,.2));padding:12px;max-width:290px;min-width:290px}.multi-channel-switcher-view-item:first-of-type{border:2px solid rgba(255,255,255,.45);margin-left:16px}.multi-channel-switcher-view-item:last-child{margin-right:16px}.multi-channel-switcher-view-item__desktop:first-of-type{margin-left:56px}.multi-channel-switcher-view-item__desktop:last-child{margin-right:56px}.multi-channel-switcher-view-item__container{display:grid;grid-template:1fr/1fr .1fr;grid-template-areas:"text icon";gap:0 16px}.multi-channel-switcher-view-item__text{grid-area:text;text-align:start;max-width:214px}.multi-channel-switcher-view-item__title{margin-bottom:12px}.multi-channel-switcher-view-item__status{display:flex;align-items:center}.multi-channel-switcher-view-item__status div{background:#db0a40;border-radius:2px;margin-right:12px}.multi-channel-switcher-view-item__status-label{color:#00f}.multi-channel-switcher-view-item__status-icon{color:#fff;padding:2px 2px 0 0}.multi-channel-switcher-view-item__icon{grid-area:icon;display:flex;align-items:center}.multi-channel-switcher-view-item__icon div{display:inherit;align-items:inherit;justify-content:center;background:#db0a40;width:36px;height:36px;border-radius:90px}.multi-channel-switcher-view-item__icon-play{color:#fff;width:25px;height:25px}.multi-channel-switcher-view-live-at__label{--cosmos-text-color: #E06600}.cq-540 .multi-channel-switcher-view__close-button [data-rbup-close-button]::part(base){height:60px;width:60px;max-width:60px;max-height:60px}.cq-540 .multi-channel-switcher-view__close-label{display:initial}.cq-650 .multi-channel-switcher-view__item-list-headline{padding:12px 0}.cq-650 .multi-channel-switcher-view-item{max-width:380px;min-width:380px}.cq-650 .multi-channel-switcher-view-item__text{max-width:305px}.cq-1000 .multi-channel-switcher-view__close-button-container div{margin-bottom:0}.active-cast-indicator{position:absolute;background-color:#000;display:flex;align-items:center;justify-content:center;width:100%;height:100%;pointer-events:none}.active-cast-indicator__content{opacity:.35;text-align:center}.cast-icon{color:#fff;height:300px;width:300px}.controls__gradient{bottom:0;content:"";height:100%;left:0;pointer-events:none;position:absolute;width:100%;--gradient-color: var(--rbup-override-gradient-color, 0 22 43);background:linear-gradient(180deg,rgb(var(--gradient-color)/0%),rgb(var(--gradient-color)/.605%),rgb(var(--gradient-color)/2.49%),rgb(var(--gradient-color)/5.72%),rgb(var(--gradient-color)/10.3%),rgb(var(--gradient-color)/16.2%),rgb(var(--gradient-color)/23.2%),rgb(var(--gradient-color)/31%),rgb(var(--gradient-color)/39%),rgb(var(--gradient-color)/46.8%),rgb(var(--gradient-color)/53.8%),rgb(var(--gradient-color)/59.7%),rgb(var(--gradient-color)/64.3%),rgb(var(--gradient-color)/67.5%),rgb(var(--gradient-color)/69.4%),rgb(var(--gradient-color)/70%))}.controls__play{align-self:center;grid-column:2/3;grid-row:1/5}
129.controls__video-details{pointer-events:none;grid-area:details;width:100%;display:none}.controls__scrub-bar{grid-area:scrub-bar}.controls__buttons-container{grid-area:buttons}.controls__buttons{display:flex;justify-content:space-between;margin:0 8px}.controls__extra-buttons{margin:0 8px}.controls-container--fullscreen{cursor:none}.controls-container{display:grid;grid-template:1fr auto auto auto/1fr 1fr 1fr;grid-template-areas:"top top top" "details details details" "scrub-bar scrub-bar scrub-bar" "buttons buttons buttons";height:100%;padding:8px;outline:none;-webkit-user-select:none;user-select:none}.controls-container--fade-in{cursor:default}.controls-container--fade-in .controls__play,.controls-container--fade-in .controls__video-details,.controls-container--fade-in .controls__scrub-bar,.controls-container--fade-in .controls__buttons-container{animation:var(--g-controls-animation-fade-in)}.controls-container--fade-in .controls__gradient{animation:g-gradient-fade-in var(--transition-timing) forwards}.controls-container--fade-out .controls__play,.controls-container--fade-out .controls__video-details,.controls-container--fade-out .controls__scrub-bar,.controls-container--fade-out .controls__buttons-container{animation:var(--g-controls-animation-fade-out)}.controls-container--fade-out .controls__gradient{animation:g-gradient-fade-out var(--transition-timing) forwards}.controls-container--hide .controls__play,.controls-container--hide .controls__scrub-bar,.controls-container--hide .controls__buttons-container{opacity:0;pointer-events:none}.controls-container--hide .controls__gradient{opacity:0}.cq-650 .controls__buttons,.cq-650 .controls__extra-buttons{margin:0 24px}.cq-650 .controls__gradient{height:60%}.cq-650 .controls__video-details{display:block}.cq-1350 .controls__gradient{height:50%}@keyframes g-gradient-fade-in{0%{opacity:0}to{opacity:1}}@keyframes g-gradient-fade-out{0%{opacity:1}to{opacity:0}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}.fading-content{opacity:0}.fading-content-fade-in{animation:fade-in .7s forwards}.fading-content-fade-out{animation:fade-out .7s forwards}.click-and-tap-overlay-container{display:grid;grid-column:1/4;grid-row:1/5;grid-template:1fr/1fr 1fr}.click-and-tap-overlay-container.grab{cursor:move;cursor:grab}.click-and-tap-overlay-container.grabbing{cursor:move;cursor:grabbing}.fast-forward-backward-container{height:100%;display:flex;align-items:center;justify-content:center}.fast-forward-backward-container__fast-backward-container,.fast-forward-backward-container__fast-forward-container{opacity:0;display:flex;justify-content:center;align-items:center;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);border-radius:70px;height:70px;width:70px}.fast-forward-backward-container__fast-backward-container--show-animation,.fast-forward-backward-container__fast-forward-container--show-animation{opacity:1}.fast-backward-animation__arrow{width:20px;height:20px;background:#fff;margin:0 2px;clip-path:polygon(100% 0,100% 100%,0 50%);opacity:.5;animation:fade-in-out 1s ease-in-out infinite}.fast-forward-animation__arrow{width:20px;height:20px;background:#fff;margin:0 2px;clip-path:polygon(100% 50%,0% 100%,0 0);opacity:.5;animation:fade-in-out 1s ease-in-out infinite}.animation__arrow--outer{animation-delay:.2s}.left-side-controls{align-items:center;display:flex;flex-basis:33%;flex-shrink:1;justify-content:left}.left-side-controls__selective-elements{display:flex}.left-side-controls__tooltip-wrapper{display:flex;align-items:center}.left-side-controls__icon{color:#fff}.center-controls{display:flex;align-items:center;flex-basis:33%;flex-shrink:1;justify-content:center}.play-seek-controls{display:flex;justify-content:center;position:relative}.play-seek-controls.play-seek-controls__bottom,.play-seek-controls.play-seek-controls__vr-content{display:none}.play-seek-controls.play-seek-controls__bottom.play-seek-controls__vr-content{display:flex}.play-seek-controls__play-seek-pause-container{align-items:center;display:flex;gap:12px}.play-seek-controls__play-seek-pause-container [data-rbup-seek-back]::part(base),.play-seek-controls__play-seek-pause-container [data-rbup-seek-forward]::part(base){height:44px;max-width:44px;min-width:44px;width:44px}.play-seek-controls__play-seek-pause-container [data-rbup-seek-back] .play-seek-controls__icon,.play-seek-controls__play-seek-pause-container [data-rbup-seek-forward] .play-seek-controls__icon{height:25px;width:25px}.play-seek-controls__play-seek-pause-container [disabled] .play-seek-controls__icon{color:#ffffff73}.cq-540 .play-seek-controls__play-seek-pause-container [data-rbup-seek-back]::part(base),.cq-540 .play-seek-controls__play-seek-pause-container [data-rbup-seek-forward]::part(base){height:52px;max-width:52px;min-width:52px;width:52px}.cq-540 .play-seek-controls__play-seek-pause-container [data-rbup-seek-back] .play-seek-controls__icon,.cq-540 .play-seek-controls__play-seek-pause-container [data-rbup-seek-forward] .play-seek-controls__icon{height:29.5px;width:29.5px}.cq-650 .play-seek-controls__play-seek-pause-container [data-rbup-seek-back]::part(base),.cq-650 .play-seek-controls__play-seek-pause-container [data-rbup-seek-forward]::part(base){height:60px;max-width:60px;min-width:60px;width:60px}.cq-650 .play-seek-controls__play-seek-pause-container [data-rbup-seek-back] .play-seek-controls__icon,.cq-650 .play-seek-controls__play-seek-pause-container [data-rbup-seek-forward] .play-seek-controls__icon{height:34px;width:34px}.cq-1000 .play-seek-controls{display:none}.cq-1000 .play-seek-controls.play-seek-controls__bottom{display:flex;position:relative}.cq-1000 .play-seek-controls.play-seek-controls__bottom .play-seek-controls__play-seek-pause-container [data-rbup-seek-back]::part(base),.cq-1000 .play-seek-controls.play-seek-controls__bottom .play-seek-controls__play-seek-pause-container [data-rbup-seek-forward]::part(base){height:36px;max-width:36px;min-width:36px;width:36px}.themed-player-root .play-seek-controls.play-seek-controls__vr-content .play-seek-controls__play-seek-pause-container [data-rbup-seek-back]::part(base),.themed-player-root .play-seek-controls.play-seek-controls__vr-content .play-seek-controls__play-seek-pause-container [data-rbup-seek-forward]::part(base){height:36px;max-width:36px;min-width:36px;width:36px}.play-seek-controls__play-seek-pause-container [data-rbup-pause]::part(base),.play-seek-controls__play-seek-pause-container [data-rbup-stop]::part(base),.play-seek-controls__play-seek-pause-container [data-rbup-play]::part(base),.play-seek-controls__play-seek-pause-container .play-seek-controls__spinner{height:44px;max-width:44px;min-width:44px;width:44px}.play-seek-controls__play-seek-pause-container [data-rbup-pause] .play-seek-controls__icon,.play-seek-controls__play-seek-pause-container [data-rbup-stop] .play-seek-controls__icon,.play-seek-controls__play-seek-pause-container [data-rbup-play] .play-seek-controls__icon{height:25px;width:25px}.cq-540 .play-seek-controls__play-seek-pause-container [data-rbup-pause]::part(base),.cq-540 .play-seek-controls__play-seek-pause-container [data-rbup-stop]::part(base),.cq-540 .play-seek-controls__play-seek-pause-container [data-rbup-play]::part(base),.cq-540 .play-seek-controls__play-seek-pause-container .play-seek-controls__spinner{height:66px;max-width:66px;min-width:66px;width:66px}.cq-540 .play-seek-controls__play-seek-pause-container [data-rbup-pause] .play-seek-controls__icon,.cq-540 .play-seek-controls__play-seek-pause-container [data-rbup-stop] .play-seek-controls__icon,.cq-540 .play-seek-controls__play-seek-pause-container [data-rbup-play] .play-seek-controls__icon{height:37.5px;width:37.5px}.cq-650 .play-seek-controls__play-seek-pause-container [data-rbup-pause]::part(base),.cq-650 .play-seek-controls__play-seek-pause-container [data-rbup-stop]::part(base),.cq-650 .play-seek-controls__play-seek-pause-container [data-rbup-play]::part(base),.cq-650 .play-seek-controls__play-seek-pause-container .play-seek-controls__spinner{height:88px;max-width:88px;min-width:88px;width:88px}.cq-650 .play-seek-controls__play-seek-pause-container [data-rbup-pause] .play-seek-controls__icon,.cq-650 .play-seek-controls__play-seek-pause-container [data-rbup-stop] .play-seek-controls__icon,.cq-650 .play-seek-controls__play-seek-pause-container [data-rbup-play] .play-seek-controls__icon{height:50px;width:50px}.cq-1000 .play-seek-controls.play-seek-controls__bottom .play-seek-controls__play-seek-pause-container [data-rbup-pause]::part(base),.cq-1000 .play-seek-controls.play-seek-controls__bottom .play-seek-controls__play-seek-pause-container [data-rbup-stop]::part(base),.cq-1000 .play-seek-controls.play-seek-controls__bottom .play-seek-controls__play-seek-pause-container [data-rbup-play]::part(base),.cq-1000 .play-seek-controls.play-seek-controls__bottom .play-seek-controls__play-seek-pause-container .play-seek-controls__spinner{height:36px;max-width:36px;min-width:36px;width:36px}.cq-1000 .play-seek-controls.play-seek-controls__bottom .play-seek-controls__play-seek-pause-container .play-seek-controls__icon{height:18px;width:18px}.themed-player-root .play-seek-controls.play-seek-controls__vr-content .play-seek-controls__play-seek-pause-container [data-rbup-pause]::part(base),.themed-player-root .play-seek-controls.play-seek-controls__vr-content .play-seek-controls__play-seek-pause-container [data-rbup-stop]::part(base),.themed-player-root .play-seek-controls.play-seek-controls__vr-content .play-seek-controls__play-seek-pause-container [data-rbup-play]::part(base),.themed-player-root .play-seek-controls.play-seek-controls__vr-content .play-seek-controls__play-seek-pause-container .play-seek-controls__spinner{height:36px;max-width:36px;min-width:36px;width:36px}.themed-player-root .play-seek-controls.play-seek-controls__vr-content .play-seek-controls__play-seek-pause-container .play-seek-controls__icon{height:18px;width:18px}
129.right-side-controls{align-items:center;display:flex;gap:0;flex-basis:33%;flex-shrink:1;justify-content:right}.right-side-controls__audio-button,.right-side-controls__subtitles-button,.right-side-controls__multi-stream-button{display:none}.cq-540 .right-side-controls{gap:8px}.cq-650 .right-side-controls__audio-button,.cq-650 .right-side-controls__subtitles-button,.cq-650 .right-side-controls__multi-stream-button{display:contents}.right-side-controls__tooltip-wrapper{display:flex;gap:8px;position:relative}.video-details{padding:8px 24px;position:relative;text-align:start;--cosmos-text-line-height: var(--rbup-text-line-height);--cosmos-title-font-family: var(--rbup-component-font-family, $default-font-family)}.video-details__title{-webkit-user-select:text;user-select:text}.video-details__description{-webkit-user-select:text;user-select:text;margin-top:8px}.overlay{height:100%;left:0;position:absolute;top:0;width:100%}.disabled{pointer-events:none}.live-button,.live-button-live{display:flex;position:relative;--cosmos-button-font-size: .7rem}.live-button .cosmos-button--kind-bare,.live-button-live .cosmos-button--kind-bare{background-color:initial}[data-rbup-live]{--cosmos-button-color: #fff;--cosmos-button-background: rgb(0 0 0 / 0%);--cosmos-button-background-hover: rgb(0 0 0 / 0%)}[data-rbup-live] .live-button__icon{color:var(--rbup-primary-color)}[data-rbup-dvr]{pointer-events:auto}[data-rbup-dvr] .live-button__icon{color:#fff}.multi-channel-button{--cosmos-button-font-size: .7rem;align-items:center;display:flex;position:relative;margin-left:8px}.ad-markers{bottom:0;height:2px;width:100%;left:0;margin:12px 0;position:absolute;pointer-events:none;transition:transform .3s cubic-bezier(0,.32,.32,1);-webkit-user-select:none;user-select:none}.ad-markers__background-container{background-color:#fc0;height:100%;width:100%;position:absolute;transition:clip-path .3s cubic-bezier(0,.32,.32,1)}.buffer-bar{background-color:#fff;bottom:0;height:2px;left:0;margin:12px 0;position:absolute;pointer-events:none;transition:transform .3s cubic-bezier(0,.32,.32,1);-webkit-user-select:none;user-select:none}.heatmap{position:absolute;bottom:calc(100% - 2px);pointer-events:none;opacity:0;transition:opacity .3s cubic-bezier(0,.32,.32,1)}.heatmap.mobile{opacity:1}.controls__scrub-bar:has(.heatmap){margin-top:16px}.scrub-bar:hover .heatmap{opacity:1}#heatmap-gradient{--color-top: rgba(255, 255, 255, .45);--color-bottom: rgba(255, 255, 255, .2)}.progress-bar{background-color:var(--rbup-primary-color);bottom:0;height:2px;left:0;margin:12px 0;position:absolute;pointer-events:none;transition:transform .3s cubic-bezier(0,.32,.32,1);-webkit-user-select:none;user-select:none}.seek-bar{display:inline-block;height:100%;position:relative;width:100%}.seek-bar__cosmos-tooltip::part(base){max-width:initial;padding:0}.seek-bar-handle{bottom:21px;position:absolute;pointer-events:none}.seek-bar-handle__knob{background:#fff;border-radius:9999px;box-shadow:0 2px 8px #000f1e;color:#fff;height:16px;position:absolute;pointer-events:none;right:-8px;width:16px}.seek-bar-tooltip{align-items:center;display:flex;flex-direction:column;opacity:0;transition:opacity .3s cubic-bezier(0,.32,.32,1)}.seek-bar-tooltip--visible{opacity:1}.seek-bar-tooltip__image-container{border-radius:6px 6px 0 0;overflow:hidden}.seek-bar-tooltip__image{position:relative}.seek-bar-tooltip__text{align-items:center;display:flex;flex-direction:column;gap:4px;padding:8px;text-align:center}.seek-bar-tooltip--with-thumbnail .seek-bar-tooltip__text{margin-top:4px;padding:0 4px 4px}.seek-bar__tooltip-container--with-heatmap{margin-bottom:16px}.cq-540 .seek-bar-tooltip{padding:4px}.cq-540 .seek-bar-tooltip__image-container{border-radius:6px}.scrub-bar__rail{background-color:#fff6;bottom:0;left:0;height:2px;margin:12px 0;position:absolute;pointer-events:none;transition:transform .3s cubic-bezier(0,.32,.32,1);-webkit-user-select:none;user-select:none;width:100%}.scrub-bar{cursor:pointer;position:relative;height:20px;margin:0 8px;outline:none}.scrub-bar .scrub-bar__background-container{height:100%;width:100%;position:absolute;transition:clip-path .3s cubic-bezier(0,.32,.32,1)}.scrub-bar[data-hovered] .buffer-bar,.scrub-bar[data-hovered] .progress-bar,.scrub-bar[data-hovered] .scrub-bar__rail,.scrub-bar[data-hovered] .ad-markers{transform-origin:center center;transform:scaleY(3)}.scrub-bar[data-hovered=false]{height:20px}.cq-650 .scrub-bar{margin:0 24px}.aria-message-container{position:absolute;width:0;height:0;overflow:hidden;border:0}.scrub-bar:focus-visible .scrub-bar__rail{outline:0}.scrub-bar:focus-visible .scrub-bar__rail:before{border:1px solid #1B6AEE;border-radius:2px;content:"";height:calc(100% + 2px);bottom:-1px;right:-1px;left:-1px;position:absolute;transition:transform .3s cubic-bezier(0,.32,.32,1);box-sizing:border-box}.controls-time-display{align-items:center;display:flex;flex-shrink:0;margin-left:8px;position:relative;pointer-events:none}
129.controls-time-display__duration{display:none}.controls-time-display__separator{padding:0 4px}.cq-650 .controls-time-display__duration{display:flex}.controls-volume-slider{height:inherit;margin-left:12px;margin-top:1px;position:relative}.controls-volume-slider__slider{cursor:pointer;display:flex;height:36px;margin:0;overflow:hidden;position:relative;transition:width .3s cubic-bezier(0,.32,.32,1);width:0}.controls-volume-slider__slider--visible{width:38px}.controls-volume-slider__indicator-element{pointer-events:none;margin:14px 2px 0 0}.volume-controls{align-items:center;display:flex;position:relative}.volume-indicator-element{width:2px;height:8px;background:#fff9}.volume-indicator-element--active{background-color:var(--rbup-primary-color)}.volume-indicator-element--highlighted{background-color:#fff;height:14px;margin:-3px 0}.product-placement{left:var(--rbup-product-placement-left, 23px);position:absolute;top:var(--rbup-product-placement-top, 23px);color:#fff}.cq-1000 .product-placement{left:var(--rbup-product-placement-left, 48px);top:var(--rbup-product-placement-top, 48px)}.product-placement--fade-in{opacity:1;transition:opacity .5s .5s}.product-placement--fade-out{opacity:0;animation:product-placement-fade-out .5s}@keyframes product-placement-fade-out{0%{opacity:1}to{opacity:0}}.audio-menu{background-color:#fff;border-radius:8px;bottom:0;box-shadow:0 8px 12px #000f1e0a,0 2px 4px #000f1e05;max-height:250px;min-width:180px;overflow-y:auto;padding:16px;position:absolute;right:0;transform:translate(-12px,calc(-3rem + var(--rbup-menu-extra-bottom-offset, 0px)));z-index:2;pointer-events:auto}.audio-menu__title{margin-bottom:12px}.audio-settings{overflow-x:hidden;overflow-y:auto}.cq-650 .audio-settings{overflow:visible}.audio-settings__list{display:block;list-style:none;margin:0;padding:5px 5px 9px}.audio-settings__list-item{--cosmos-radio-font-size: 14px;--cosmos-radio-line-height: 1.357143;--cosmos-button-color: #FFFFFF;--cosmos-text-color: #FFFFFF}.audio-settings__list-item:last-child{margin-bottom:0}.audio-settings__list-item>*{display:inline-block}.audio-settings__list-item label input{background-color:#000f1ee6;border:2px solid rgba(255,255,255,.45)}.audio-settings__list-item label input:checked:before{background-color:#fff}.cq-650 .audio-settings__list-item{--cosmos-button-color: #000F1E;--cosmos-text-color: #000F1E}.cq-650 .audio-settings__list-item label input{background-color:#fff;border:1px solid #00162B}.cq-650 .audio-settings__list-item label input:checked:before{background-color:#000f1e}.back-button{--cosmos-text-color: #FFFFFF;align-items:center;background-color:transparent;border:none;cursor:pointer;display:flex;padding:0;margin-bottom:12px;position:relative}.back-button:focus-visible{outline:0}.back-button:focus-visible:before{border:2px solid #1B6AEE;border-radius:8px;content:"";height:100%;top:-2px;bottom:-2px;left:-2px;right:-2px;position:absolute;width:100%}.back-button .back-button__icon{height:24px;width:24px;color:#fff;transform:translate(-2px);transition:.25s ease-in-out}.back-button:hover .back-button__icon{transform:translate(-8px);color:var(--rbup-primary-color);transition:.25s ease-in-out}.cq-650 .back-button{--cosmos-text-color: #000F1E}.cq-650 .back-button .back-button__icon{color:#000f1e}.settings-menu-button__label{text-align:start}.settings-menu-button{--cosmos-text-color: #FFFFFF;align-items:center;background-color:transparent;border:none;cursor:pointer;display:flex;justify-content:space-between;width:100%;padding:1px 6px;position:relative}.settings-menu-button:focus-visible{outline:0}.settings-menu-button:focus-visible:before{border:2px solid #1B6AEE;border-radius:8px;content:"";height:100%;top:-2px;bottom:-2px;left:-2px;right:-2px;position:absolute;width:100%}.settings-menu-button:not(:last-child){margin-bottom:16px}.settings-menu-button[href]::part(base):not(:focus):hover{border-color:transparent}.settings-menu-button .settings-menu-button__label{color:#fff;font-size:14px;position:relative}.settings-menu-button .settings-menu-button__label:before{border:0;border-bottom:solid 2px var(--rbup-primary-color);border-radius:0;bottom:-3px;content:"";left:0;position:absolute;pointer-events:none;transition:.25s ease-in-out;width:0}.settings-menu-button:hover .settings-menu-button__label:before{width:100%;transition:.25s ease-in-out}.settings-menu-button__icon{height:24px;margin-left:4px;width:24px;color:#fff;transition:.25s ease-in-out}.settings-menu-button__icon:hover .settings-menu-button__icon{transform:translate(8px);color:var(--rbup-primary-color);transition:.25s ease-in-out}.settings-menu-button__selected-setting{--cosmos-text-color: rgba(255, 255, 255, .6);align-items:center;display:flex;text-transform:capitalize}.cq-650 .settings-menu-button{--cosmos-text-color: #000F1E}.cq-650 .settings-menu-button .settings-menu-button__icon{color:#000f1e99}.cq-650 .settings-menu-button .settings-menu-button__label{color:#000f1e}.cq-650 .settings-menu-button__selected-setting{--cosmos-text-color: rgba(0, 15, 30, .6)}.quality-settings{overflow-x:hidden;overflow-y:auto}.cq-650 .quality-settings{overflow:visible}.quality-settings__list{display:block;list-style:none;margin:0;padding:5px 5px 9px}.cq-650 .quality-settings__list{padding:0}.quality-settings__list-item{--cosmos-radio-font-size: 14px;--cosmos-radio-line-height: 1.357143;--cosmos-button-color: #FFFFFF;--cosmos-text-color: #FFFFFF}.quality-settings__list-item:last-child{margin-bottom:0}.quality-settings__list-item>*{display:inline-block}.quality-settings__list-item label input{background-color:#000f1ee6;border:2px solid rgba(255,255,255,.45)}.quality-settings__list-item label input:checked:before{background-color:#fff}.cq-650 .quality-settings__list-item{--cosmos-button-color: #000F1E;--cosmos-text-color: #000F1E}.cq-650 .quality-settings__list-item label input{background-color:#fff;border:1px solid #00162B}.cq-650 .quality-settings__list-item label input:checked:before{background-color:#000f1e}.cq-650 [data-rbup-menu-button=audio],.cq-650 [data-rbup-menu-button=subtitles],.cq-650 [data-rbup-menu-button=multi-stream]{dis
129play:none}.settings-menu{display:grid;grid-template-areas:"close-btn invisible menu ";grid-template-columns:minmax(42px,78px) 1px minmax(240px,320px);bottom:0;position:absolute;height:0;right:0;z-index:2;-webkit-user-select:text;user-select:text;pointer-events:auto}.settings-menu-animation{transition:height .3s cubic-bezier(0,.32,.32,1),width .3s cubic-bezier(0,.32,.32,1)}.settings-menu__invisible-title{grid-area:invisible}.settings-menu__close-button{grid-area:close-btn;--cosmos-button-border-color: rgba(255, 255, 255, .2);--cosmos-button-border-color-hover: rgba(255, 255, 255, .45);--cosmos-button-background: rgba(0, 15, 30, .45);--cosmos-button-color: #FFFFFF;--cosmos-button-color-hover: #FFFFFF;align-self:center;justify-self:center}.settings-menu__settings-area{grid-area:menu;overflow:hidden;display:flex;width:100%;height:100%;background-color:#000f1ee6}.settings-menu__settings-container{position:relative;height:100%}.cq-650 .settings-menu{height:auto;display:block;overflow:hidden;border-radius:8px;transform:translate(-12px,calc(-3rem + var(--rbup-menu-extra-bottom-offset, 0px)));box-shadow:0 8px 12px #000f1e0a,0 2px 4px #000f1e05}.cq-650 .settings-menu .settings-menu__settings-area{background-color:#fff}.settings-menu__settings-page--positioned,.settings-menu__settings-page{transition:transform .3s cubic-bezier(0,.32,.32,1);display:flex;flex-direction:column;width:100%;height:100%}.settings-menu__settings-page{overflow-x:hidden;overflow-y:auto}.settings-menu__settings-page--positioned{position:absolute}.settings-menu__settings-wrapper{max-height:100%}.settings-menu__settings-wrapper>div{padding:16px;display:flex;flex-direction:column;align-items:stretch;height:100%}.cq-650 .settings-menu__settings-wrapper{max-height:initial}.cq-650 .settings-menu__settings-wrapper>div{height:auto}.share-settings{overflow-x:hidden;overflow-y:auto}.cq-650 .share-settings{overflow:visible}.share-settings__copied-text{animation:3s copied-text ease-in-out;margin-left:12px;transform:scale(0)}.share-settings__link::part(base){align-items:center;border:0;display:flex;gap:8px;margin:0;position:relative}.share-settings__link::part(base):focus{margin:0;padding:0}.share-settings__link::part(base):before{border:0;border-bottom:solid 2px var(--rbup-primary-color);border-radius:0;bottom:-6px;content:"";left:0;position:absolute;pointer-events:none;transition:.25s ease-in-out;width:0}.share-settings__link::part(base):focus:before,.share-settings__link::part(base):hover:before{width:100%;transition:.25s ease-in-out}.share-settings__list{display:block;list-style:none;margin:0;padding:5px 5px 9px}.share-settings__list-item{display:flex;align-items:center;margin-bottom:12px;--cosmos-radio-font-size: 14px;--cosmos-radio-line-height: 1.357143;--cosmos-button-color: #FFFFFF;--cosmos-text-color: #FFFFFF}.share-settings__list-item:last-child{margin-bottom:0}.share-settings__list-item>*{display:inline-block}.share-settings__list-item label input{background-color:#000f1ee6;border:2px solid rgba(255,255,255,.45)}.share-settings__list-item label input:checked:before{background-color:#fff}.cq-650 .share-settings__list-item{--cosmos-button-color: #000F1E;--cosmos-text-color: #000F1E}.cq-650 .share-settings__list-item label input{background-color:#fff;border:1px solid #00162B}.cq-650 .share-settings__list-item label input:checked:before{background-color:#000f1e}.share-settings__share-time{--cosmos-text-color: #FFFFFF;align-items:center;border-bottom:1px solid #F8F8F8;display:flex;flex-direction:row;justify-content:space-between;margin-bottom:12px;padding-left:5px;padding-right:5px;padding-bottom:12px}.share-settings__share-time input{border-color:#fff;background-color:unset}.share-settings__share-time [data-rbup-share-time-checkbox]{--cosmos-checkbox-font-size: 14px}.cq-650 .share-settings__share-time{--cosmos-text-color: #000F1E;border-bottom:1px solid #00162B}.cq-650 .share-settings__share-time label input{border-color:#00162b;background-color:#fff}.share-settings__time-input{border:0;border-bottom:2px solid #00162B;border-radius:0;color:#fff;font-family:var(--rbup-font-family);font-size:14px;height:26px;text-align:center;width:56px}.share-settings__time-input:focus{border-color:var(--rbup-primary-color);outline:0}.share-settings__time-input:disabled{background-color:transparent;border-bottom:2px solid rgba(255,255,255,.1);color:#ffffff73}.cq-650 .share-settings__time-input{border-bottom:2px solid #00162B;color:#000f1e}.cq-650 .share-settings__time-input:disabled{border-bottom:2px solid #F8F8F8;color:#000f1e99}@keyframes copied-text{0%{transform:scale(0)}10%{transform:scale(1)}90%{transform:scale(1)}to{transform:scale(0)}}.speed-settings{overflow-x:hidden;overflow-y:auto}.cq-650 .speed-settings{overflow:visible}.speed-settings__list{display:block;list-style:none;margin:0;padding:5px 5px 9px}.speed-settings__list-item{--cosmos-radio-font-size: 14px;--cosmos-radio-line-height: 1.357143;--cosmos-button-color: #FFFFFF;--cosmos-text-color: #FFFFFF}.speed-settings__list-item:last-child{margin-bottom:0}.speed-settings__list-item>*{display:inline-block}.speed-settings__list-item label input{background-color:#000f1ee6;border:2px solid rgba(255,255,255,.45)}.speed-settings__list-item label input:checked:before{background-color:#fff}.cq-650 .speed-settings__list-item{--cosmos-button-color: #000F1E;--cosmos-text-color: #000F1E}.cq-650 .speed-settings__list-item label input{background-color:#fff;border:1px solid #00162B}.cq-650 .speed-settings__list-item label input:checked:before{background-color:#000f1e}.subtitles-menu{background-color:#fff;border-radius:8px;bottom:0;box-shadow:0 8px 12px #000f1e0a,0 2px 4px #000f1e05;max-height:250px;min-width:180px;overflow-y:auto;padding:16px;position:absolute;right:0;transform:translate(-12px,calc(-3rem + var(--rbup-menu-extra-bottom-offset, 0px)));z-index:2;pointer-events:auto}.subtitles-menu__title{margin-bottom:12px}.subtitles-settings{overflow-x:hidden;overflow-y:auto}.cq-650 .subtitles-settings{overflow:visible}.subtitles-settings__list{display:block;list-style:none;margin:0;padding:5px 5px 9px}.subtitles-settings__list-item{--cosmos-radio-font-size: 14px;--cosmos-radio-line-height: 1.357143;--cosmos-button-color: #FFFFFF;--cosmos-text-color: #FFFFFF}.subtitles-settings__list-item:last-child{margin-bottom:0}.subtitles-settings__list-item>*{display:inline-block}.subtitles-settings__list-item label input{background-color:#000f1ee6;border:2px solid rgba(255,255,255,.45)}.subtitles-settings__list-item label input:checked:before{background-color:#fff}.cq-650 .subtitles-settings__list-item{--cosmos-button-color: #000F1E;--cosmos-text-color: #000F1E}.cq-650 .subtitles-settings__list-item label input{background-color:#fff;border:1px solid #00162B}.cq-650 .subtitles-settings__list-item label input:checked:before{background-color:#000f1e}.multi-stream-menu{background-color:#fff;border-radius:8px;bottom:0;box-shadow:0 8px 12px #000f1e0a,0 2px 4px #000f1e05;max-height:250px;min-width:180px;overflow-y:auto;padding:16px;position:absolute;right:0;transform:translate(-12px,calc(-3rem + var(--rbup-menu-extra-bottom-offset, 0px)));z-index:2}.multi-stream-menu__title{margin-bottom:12px}
129.multi-stream-settings{overflow-x:hidden;overflow-y:auto}.cq-650 .multi-stream-settings{overflow:visible}.multi-stream-settings__list{display:block;list-style:none;margin:0;padding:5px 5px 9px}.multi-stream-settings__list-item{--cosmos-radio-font-size: 14px;--cosmos-radio-line-height: 1.357143;--cosmos-button-color: #FFFFFF;--cosmos-text-color: #FFFFFF}.multi-stream-settings__list-item:last-child{margin-bottom:0}.multi-stream-settings__list-item>*{display:inline-block}.multi-stream-settings__list-item label input{background-color:#000f1ee6;border:2px solid rgba(255,255,255,.45)}.multi-stream-settings__list-item label input:checked:before{background-color:#fff}.cq-650 .multi-stream-settings__list-item{--cosmos-button-color: #000F1E;--cosmos-text-color: #000F1E}.cq-650 .multi-stream-settings__list-item label input{background-color:#fff;border:1px solid #00162B}.cq-650 .multi-stream-settings__list-item label input:checked:before{background-color:#000f1e}.start-and-end-view{position:absolute;top:0;width:100%;height:100%}.start-and-end-view__buttons{align-items:center;cursor:pointer;display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%}.start-and-end-view__bg-image-container{height:100%;width:100%}.start-and-end-view__bg-custom-image-container{width:100%;height:100%}.start-and-end-view__bg-custom-image-container img{width:100%;height:100%;object-fit:cover}.start-and-end-view__button{--cosmos-button-background: var(--rbup-play-button-background-color);--cosmos-button-background-hover: var(--rbup-play-button-background-hover-color)}.start-and-end-view__button::part(base){height:80px;max-width:80px;min-width:80px;width:80px}.start-and-end-view__icon{height:50px;width:50px}.subtitles-overlay{position:absolute;left:16px;right:16px;bottom:16px;text-align:center;pointer-events:none}.subtitles-overlay.subtitles-on-top{top:0}.subtitles-overlay__text-container{display:flex;flex-direction:column;align-items:center}.subtitles-overlay__text-display{color:#fff;background-color:#000f1e73;padding:.1666em .5em .3333em;margin-top:.3em}.themed-player-root{position:relative;overflow:hidden;aspect-ratio:var(--aspect-ratio);min-width:300px;max-width:var(--max-width);margin:auto;--rbup-container16x9-background-color: #000;--rbup-font-family: Bull Text, Helvetica, sans-serif;--rbup-primary-color: #DB0A40;--cosmos-button-font-family: var(--rbup-font-family);--cosmos-font-family-text: var(--rbup-font-family);--cosmos-text-font-family: var(--rbup-font-family);--cosmos-tooltip-font-family: var(--rbup-font-family);--cosmos-tooltip-z-index: 1;font-family:var(--rbup-font-family)}.themed-player-root.vr-content{min-width:370px;z-index:9999}.rbup-default-theme__toasts{display:flex;gap:16px;left:12px;position:absolute;top:12px;transition:bottom .3s}.rbup-default-theme__centered-toasts{position:absolute;top:var(--rbup-centered-toast-top, 10px);left:var(--rbup-centered-toast-left, 10px)}.rbup-default-theme__centered-toasts--controls-visible{animation:var(--g-controls-animation-fade-in)}.rbup-default-theme__centered-toasts--controls-hide{animation:var(--g-controls-animation-fade-out)}.rbup-default-theme__toasts--product-placement-visible{top:20px;left:64px}.rbup-default-theme--vr-fullscreen{position:fixed;top:0;left:0;right:0;bottom:0;z-index:9999}.cq-650 .rbup-default-theme__toasts{bottom:32px;left:auto;right:32px;top:auto}.cq-650 .rbup-default-theme__toasts--controls-visible{bottom:70px}@keyframes fade-in-out{0%,40%,to{opacity:1}20%,60%{opacity:.5}}';function getToastCSSClass(c,u){return["rbup-default-theme__toasts","visible"===u&&"rbup-default-theme__toasts--product-placement-visible","fade-in"===c&&"rbup-default-theme__toasts--controls-visible"].filter(Boolean).join(" ")}function getCenteredToastCSSClass(c){return["rbup-default-theme__centered-toasts","fade-in"===c?"rbup-default-theme__centered-toasts--controls-visible":"rbup-default-theme__centered-toasts--controls-hide"].filter(Boolean).join(" ")}function getPlayerDisplayState(c,u,d){return"TRANSITIONING"===c?"transitioning":("IDLE"===c||"BUFFERING"===c)&&u<1?"initial":d?"advertisement":"playback"}let DefaultThemeComponent=({config:c,customPosterImage:u,sizeBreakpoints:d,playerWidth:p,playerCoordinator:h,globalKeyboardNavigation:f,onPlayNewAsset:m,CustomOverlayComponent:g,allowControlsCaptureAreaInteraction:v,CustomToastComponent:y,aspectRatio:b,CenteredToastComponent:S,playOrReplayCallback:_,AdditionalButtonComponent:E})=>{var T,w,P,A;let{playerState:{isShowingAd:I,playerStatus:M,playbackPosInSec:R}}=usePlayerContext(),k=useControlsVisibilityContext().controlsVisibility,[x,C]=h$3(areTranslationsLoaded());onTranslationDataLoaded(()=>C(!0));let O=!!(null!=(T=c.relatedVideos)&&T.items),D=getPlayerDisplayState(M,Math.abs(R-((null==(w=h.getPlayerData())?void 0:w.getInitialSeekTimeInSec())??0)),I);return o$i(CosmosMode,{mode:"light",class:useIosVrFullscreen()?"rbup-default-theme--vr-fullscreen":"",children:[("initial"===D||"transitioning"===D)&&o$i(InitialLoadingSpinner,{}),"playback"===D&&o$i(MainMediaPlaybackComponent,{allowControlsCaptureAreaInteraction:v,config:c,controlsVisibility:k,CustomOverlayComponent:g,CustomToastComponent:y,globalKeyboardNavigation:f,onPlayNewAsset:m,playerCoordinator:h,playerStatus:M,sizeBreakpoints:d,playerWidth:p,CenteredToastComponent:S,AdditionalButtonComponent:E}),"advertisement"!==D&&o$i(k$5,{children:[h.isPhasingEnabled()&&o$i(LiveStreamInfo,{playerWidth:p,aspectRatio:b,customPosterImage:u}),o$i(StartAndEndView,{customPosterImage:u,aspectRatio:b,showAtEnd:!O,playerWidth:p,playOrReplayCallback:_}),O&&o$i(EndslateView,{relatedVideos:null==(P=c.relatedVideos)?void 0:P.items,config:null==(A=c.relatedVideos)?void 0:A.config,playOrReplayCallback:_})]}),"advertisement"===D&&o$i(AdControls,{}),"playback"===D&&o$i(SubtitlesOverlay,{})]})},RbupVideoCoreDefaultTheme=k$3((c,u)=>o$i(ThemedPlayer,{ref:u,styles:styles$3,ThemeComponent:DefaultThemeComponent,...c}));function getShowMultiChannelSwitcherClickedCallback(c,u,d){return c&&d&&d.length>0?u:void 0}let MainMediaPlaybackComponent=({allowControlsCaptureAreaInteraction:c,config:u,controlsVisibility:d,CustomOverlayComponent:p,CustomToastComponent:h,globalKeyboardNavigation:f,onPlayNewAsset:m,playerCoordinator:g,sizeBreakpoints:v,CenteredToastComponent:y,AdditionalButtonComponent:b})=>{let{playerState:{liveStatus:S,mediaMetaData:_}}=usePlayerContext(),E=_$3(null),T=null==S?void 0:S.otherLiveVideos,w=getToastCSSClass(d,u.productPlacement),P=getCenteredToastCSSClass(d),A=g.shouldShowProductPlacement(),[I,M]=h$3(!1),R=T$4((c=!0)=>{M(c)},[]),k=getShowMultiChannelSwitcherClickedCallback("visible"===u.multiChannelSwitcher,R,T),x=F$4(()=>{var c;
129return null==(c=u.resolveCornerbug)?void 0:c.call(u,_)},[u,_]);return o$i(k$5,{children:[x&&o$i("div",{class:"rbup-video-core-container",children:o$i(RbupVideoCornerbug,{IconComponent:x})}),A&&!p&&o$i(RbupVideoProductPlacement,{productPlacementDefinition:u.productPlacementComponentDefinition}),p&&o$i(p,{playerCoordinator:g,sizeBreakpoints:v,showProductPlacement:A,productPlacementDefinition:u.productPlacementComponentDefinition}),o$i(RbupVideoCoreOverlay,{sizeBreakpoints:v,playerCoordinator:g,onShowMultiChannelSwitcher:k,allowControlsCaptureAreaInteraction:c,globalKeyboardNavigation:f,CenteredToastComponent:y,AdditionalButtonComponent:b}),o$i("div",{ref:E,"data-rbup-centered-toast-container":!0,class:P,children:o$i(CenteredToastWrapper,{sizeBreakpoints:v,CenteredToastComponent:y,parentRef:E})}),o$i("div",{"data-rbup-toast-container":!0,class:w,children:h&&o$i(h,{playerCoordinator:g,sizeBreakpoints:v})}),I&&o$i(MultiChannelSwitcherView,{onCloseView:()=>R(!1),onPlayNewAsset:m})]})},styles$2=".subtitles-available{position:absolute;top:var(--rbup-subtitles-top, 16px);left:var(--rbup-subtitles-left, 16px);bottom:auto;transition:bottom .3s}.subtitles-available--controls-visible{animation:var(--g-controls-animation-fade-in)}.subtitles-available--controls-hide{animation:var(--g-controls-animation-fade-out)}.cq-650 .subtitles-available{bottom:var(--rbup-subtitles-bottom-650, 70px);left:auto;right:32px;top:auto}",TIME_TO_DISPLAY_MS=5e3;
129function getCSSClass(c,u){let d=["subtitles-available"];return u?[...d,"fade-in"===c?"subtitles-available--controls-visible":"subtitles-available--controls-hide"].join(" "):d.join(" ")}let SubtitlesAvailable=({playerCoordinator:c,sizeBreakpoints:u})=>{var d;let[p,h]=h$3(!1),[f,m]=h$3(!1),g=_$3(),v=null==(d=c.getMediaMetaData())?void 0:d.availableSubtitleLanguages,y=F$4(()=>{let c=window.navigator.language;return!!v&&void 0!==getLanguageMatchForIsoCode(c,v)},[v]),b=c.getPlayerStatus(),S=u.mediumOrBigger,_=getCSSClass(useControlsVisibilityContext().controlsVisibility,u.mediumOrBigger);return p$7(()=>{!p&&y&&"PLAYING"===b&&(m(!0),h(!0),g.current=window.setTimeout(()=>{m(!1)},TIME_TO_DISPLAY_MS))},[p,y,b]),o$i(k$5,{children:[o$i("style",{children:styles$2}),f&&o$i("div",{id:"subtitles-available",className:_,children:o$i(CosmosBadge,{"data-rbup-subtitles-available":!0,appearance:"light",kind:"cover-up",size:"small",shape:"pill",children:[S&&o$i(CosmosIconSubtitles,{slot:"prefix"}),translate("rbcom-subtitlesAvailable")]})})]})};if(typeof window>"u")throw Error("SSR is not supported");let sparkleIdPattern="(^AA-[A-Z0-9]{13}$)|(^[0-9]+-[0-9]+$)|(^[A-Z]{2}[0-9A-Z]{18}$)",sparkleIdRegex=new RegExp(sparkleIdPattern);function isSparkleAssetId(c){return sparkleIdRegex.test(c)}let PODCAST_RESOURCE_ROUTE="rbcom/podcast",AUDIO_CLIP_RESOURCE_ROUTE="rbcom/audio",OFFSITE_PROJECT_ROUTE$1="offsite-project/audio";function selectServerRoute$1(c){if(isAudioEpisode(c))return PODCAST_RESOURCE_ROUTE;if(isAudioClip(c))return AUDIO_CLIP_RESOURCE_ROUTE;if(isSparkleAssetId(c))return OFFSITE_PROJECT_ROUTE$1;throw Error("Invalid asset id passed!")}function isAudioEpisode(c){return c.startsWith("rrn:content:audio-episodes")}function isAudioClip(c){return c.startsWith("rrn:content:audio-clips")}async function fetchSsdmRbcomAudioMetadata(c,u,d,p){let h={audioId:c},f=selectServerRoute$1(c);p&&f!==OFFSITE_PROJECT_ROUTE$1&&(h.includePreviewAssets="true");let m=calculateSsdmUrl(u,d),g=await fetch(`${m}/${f}?${new URLSearchParams(h)}`);if(g.ok)return await g.json();throw Error(`error loading from server ${g.status}`)}class RbcomAudioDataLoader{constructor(c,u){this.prNumber=c,this.includePreviewAssets=u}async loadData(c){let u=c.assetId,d=await fetchSsdmRbcomAudioMetadata(u,c.environment,this.prNumber,this.includePreviewAssets);return{assetId:u,audioId:d.audioId,coverArt:d.coverArt,description:d.description,distributions:d.distributions,duration:d.duration,episodeNumber:d.episodeNumber,episodePageUrl:d.episodePageUrl,mediaSrc:{audioUrl:d.audioUrl,mediaType:d.audioMediaType},podcastTitle:d.podcastTitle,podcastShowPageUrl:d.podcastShowPageUrl,publishedAt:d.publishedAt,seasonNumber:d.seasonNumber,space:d.space,title:d.title,waveformPoints:d.waveformPoints,vin:d.vin,megaphoneShowId:d.podcastId,megaphoneNetworkId:d.networkId,megaphoneEpisodeId:d.episodeId}}}function calculateAudioContentType(c){if(c.startsWith("rrn:content:audio-episodes"))return"podcast";if(c.startsWith("rrn:content:audio-clips")||isSparkleAssetId(c))return"audio clip";throw Error("Content type could not be calculated")}let crepoIdRegex=/^(?<masterId>rrn:content:([a-z0-9\-_]+):([0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}))(:(([a-z]{2})-([A-Z]{2,3})))?$/;class RbcomTrackingEventCustomizer{customize(c,u){if(isUserInteractionTrackingEvent(c))return this.customizeUserInteractionEvent(c,u);if(isInitTrackingEvent(c))return this.customizeInitTrackingEvent(c,c.media_id,u);let d=isVideoPlayerMediaMetaData(u),p=this.getAssetId(c.media_id,d,u);return{...c,media_id:p}}customizeUserInteractionEvent(c,u){let d=this.getAssetId(c.video_interaction.media_id,!0,u);return{...c,video_interaction:{...c.video_interaction,media_id:d}}}customizeInitTrackingEvent(c,u,d){return isVideoPlayerMediaMetaData(d)?this.customizeVideoInitTrackingEvent(c,u,d):this.customizeAudioInitTrackingEvent(c,u,d)}customizeVideoInitTrackingEvent(c,u,d){let p=d.space,h=this.getAccountNameAccordingToSpace(p,!0),f=this.getPlayerId(h),m=this.getSourceId(h),g=this.getAssetId(u,!0,d),v=this.getCrepoIdSpecificValuesForVideo(u,g,h,d);return{...c,...v,media_id:g,video_account_name:h,video_player_id:f,rb_source:m,video_asset_id:g}}customizeAudioInitTrackingEvent(c,u,d){let p=null==d?void 0:d.space,h=this.getAccountNameAccordingToSpace(p,!1),f=this.getPlayerId(h),m=this.getSourceId(h),g=this.getAssetId(u,!1,d),v=calculateAudioContentType(g),y=g.startsWith("rrn:content")?u:void 0,b=this.getVideoAssetIdForAudio(g,d);return{...c,video_account_name:h,content_type:v,video_display_url:(null==d?void 0:d.podcastShowPageUrl)??c.video_display_url,localized_crepo_id:y,media_id:g,video_player_id:f,rb_source:m,video_asset_id:b,video_product_id:g.startsWith("rrn:content")?g:void 0}}getAssetId(c,u,d){return u?(null==d?void 0:d.assetId)??d.linearId??c:stripOffLocaleFromCrepoIdOrReturnOriginalIfNotRrn(c)}getVideoAssetIdForAudio(c,u){return null!=u&&u.megaphoneEpisodeId?u.megaphoneEpisodeId:null!=u&&u.audioId?u.audioId:c}
129getCrepoIdSpecificValuesForVideo(c,u,d,p){if(!crepoIdRegex.test(c)||!p)return;let h=p.linearId,f=p.videoId??c,m=h?void 0:u,g=this.getVideoProductId(f),v=this.getPageName(d,u,p.title);return{...this.getChannel(h),reference_id:m,localized_crepo_id:f,page_name:v,video_product_id:g}}getAccountNameAccordingToSpace(c,u){return u?"rbtv"===c?"RBTV":"redbull-racing"===c?"Red Bull Racing":"RBCOM":"redbull-racing"===c?"RBR_AUDIO":"RBAUDIO"}getPlayerId(c){switch(c){case"Red Bull Racing":return"RBUP_RBR";case"RBTV":return"RBUP";case"RBAUDIO":return"rbup_audio";case"RBR_AUDIO":return"RBUP_RBR_AUDIO";default:return"RBUP_COM"}}getSourceId(c){switch(c){case"Red Bull Racing":case"RBR_AUDIO":return"redbullracing.com";case"RBTV":return"RBTV";default:return"redbull.com"}}getPageName(c,u,d){if("RBTV"!==c)return;let p=toWebSafeString(d);return`web|${u}|${p}`}getVideoProductId(c){var u,d;return(null==(d=null==(u=crepoIdRegex.exec(c))?void 0:u.groups)?void 0:d.masterId)??c}getChannel(c){return c?{channel:"linear-borb"===c?"borb":c}:void 0}}function isVideoPlayerMediaMetaData(c){return!!(null==c?void 0:c.mediaSrc).videoUrl}function toWebSafeString(c){return c?c.replace(/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/g,"").split(" ").join("-").replace(/(-+)/g,"-").toLowerCase():""}let RbupAudioRbcom=({_debug:c,assetId:u,cookieConsent:d,coverArt:p,customDataLayer:h,environment:f,id:m,internalOnApiAvailable:g,overrideTranslationLanguage:v,uiMode:y,skipCosmosFontInjection:b=!1,prNumber:S,includePreviewAssets:_})=>{let E=F$4(()=>new RbcomAudioDataLoader(S,_),[_,S]),[T]=h$3(new QueryParamUrlSharingStrategy);return o$i(RbupAudioDefaultTheme,{id:m,config:F$4(()=>({_debug:{playerAdapterType:null==c?void 0:c.playerAdapterType},assetId:u,cookieConsent:isTrueValue$1(d),coverArt:p,environment:f,overrideTranslationLanguage:v,uiMode:y,skipCosmosFontInjection:isTrueValue$1(b),initialSeekTimeInSec:T.determineInitialSeek(u),tracking:{configs:{googleAnalytics:{playerId:"",accountName:"",eventCustomizer:new RbcomTrackingEventCustomizer,dataLayer:h}}},mediaSessionArtist:"Red Bull"}),[null==c?void 0:c.playerAdapterType,u,d,p,f,v,y,h,b,T]),dataLoader:E,internalOnApiAvailable:g,urlSharingStrategy:T})};function initRbupAudioRbcom(c,u){return initRbupAudio(c,"rbup-audio-rbcom",u)}let rbcomAudioObservedAttributes=["asset-id","cookie-consent","cover-art","custom-data-layer","environment","include-preview-assets","internal-on-api-available","override-translation-language","pr-number","skip-cosmos-font-injection","ui-mode"],RbupAudioRbcomMinimal=k$3(({_debug:c,assetId:u,cookieConsent:d=!1,customDataLayer:p,environment:h,prNumber:f,id:m,internalOnApiAvailable:g,includePreviewAssets:v},y)=>{let b=F$4(()=>new RbcomAudioDataLoader(f,v),[v,f]),[S]=h$3(new QueryParamUrlSharingStrategy);return o$i(MinimalAudioDefaultTheme,{id:m,ref:y,config:F$4(()=>({_debug:{playerAdapterType:(null==c?void 0:c.playerAdapterType)??"HTML5"},assetId:u,cookieConsent:isTrueValue(d),environment:h,skipCosmosFontInjection:!0,initialSeekTimeInSec:S.determineInitialSeek(u),tracking:{configs:{googleAnalytics:{playerId:"",accountName:"",eventCustomizer:new RbcomTrackingEventCustomizer,dataLayer:p}}},mediaSessionArtist:"Red Bull"}),[null==c?void 0:c.playerAdapterType,u,d,p,h,S]),dataLoader:b,internalOnApiAvailable:g})});function initRbupAudioRbcomMinimal(c,u){return initRbupAudio(c,"rbup-audio-rbcom-minimal",u)}let rbcomAudioMinimalObservedAttributes=["asset-id","cookie-consent","custom-data-layer","environment","include-preview-assets","internal-on-api-available","pr-number"],RbupAudioRbcomMinimalWithControls=k$3(({_debug:c,assetId:u,cookieConsent:d=!1,customDataLayer:p,environment:h,prNumber:f,id:m,internalOnApiAvailable:g,skipCosmosFontInjection:v=!1,uiMode:y},b)=>{let S=F$4(()=>new RbcomAudioDataLoader(f),[f]),[_]=h$3(new QueryParamUrlSharingStrategy);return o$i(MinimalAudioPlayerWithControlsTheme,{id:m,ref:b,config:F$4(()=>({_debug:{playerAdapterType:(null==c?void 0:c.playerAdapterType)??"HTML5"},assetId:u,cookieConsent:isTrueValue(d),environment:h,skipCosmosFontInjection:isTrueValue(v),initialSeekTimeInSec:_.determineInitialSeek(u),tracking:{configs:{googleAnalytics:{playerId:"",accountName:"",eventCustomizer:new RbcomTrackingEventCustomizer,dataLayer:p}}},mediaSessionArtist:"Red Bull",uiMode:y}),[null==c?void 0:c.playerAdapterType,u,d,p,h,v,y,_]),dataLoader:S,internalOnApiAvailable:g})});function initRbupAudioRbcomMinimalWithControls(c,u){return initRbupAudio(c,"rbup-audio-rbcom-minimal",u)}let rbcomAudioMinimalWithControlsObservedAttributes=["asset-id","cookie-consent","custom-data-layer","environment","internal-on-api-available","pr-number","ui-mode"],log$5=loglevelExports.getLogger("AccountService"),INTERVAL_BETWEEN_SAVE_CALLS_IN_SEC=5,MAX_ERROR_COUNT_FOR_RECONNECT=5;class AccountService{constructor(c){yi(this,"playerCoordinator"),yi(this,"socket"),yi(this,"lastSendingTimestamp",0),yi(this,"errorCount",0),yi(this,"socketUrl"),yi(this,"queryParams"),yi(this,"playerEventListener",c=>{var u;switch(c.type){case"playing":(null==(u=this.playerCoordinator)?void 0:u.getPlaybackMode())==="VOD"&&this.startWebSocket();break;case"paused":case"playbackFinished":case"sourceUnloaded":case"error":this.stopWebSocket();break;case"timeChanged":this.sendTimeUpdate(c)}}),this.accountSdk=c;const u=c.getConfig(),d=new URL(u.bookmarksApiUrl);this.socketUrl=`wss://${d.host}
129/ws/bookmark/save`,this.queryParams={namespace:u.namespace}}async onBeforeLoad(c,u,d){if(!isVideoPlayerCoordinator(d))throw Error("wrong type of player coordinator");if(!isVideoPlayerConfig(c))throw Error("wrong type of player config");if(this.playerCoordinator=d,d.addEventListener(this.playerEventListener),log$5.debug("calling account preload hook",c),this.extendChromecastServiceWithAccountSdkUserData(c),c.initialSeekTimeInSec)return c;let p=stripOffLocaleFromCrepoIdOrReturnOriginalIfNotRrn(c.assetId);try{let u=this.accountSdk.getUser();if(u){let d=await this.getUserBookmarks(p,u);log$5.debug("got bookmarks",d);let h=d[p];if(h&&!h.isComplete)return{...c,initialSeekTimeInSec:h.playhead/1e3}}}catch(c){log$5.warn("error during fetching user bookmarks for",p,"Error: ",c)}return c}async getUserBookmarks(c,u){return await this.accountSdk.getUserBookmarks(c)}async destroy(c,u,d){return this.stopWebSocket(),d.removeEventListener(this.playerEventListener),this.playerCoordinator=void 0,this.errorCount=0,this.lastSendingTimestamp=0,c}buildWebsocketUrl(){if(!this.socketUrl)throw Error("dont have websocket url");let c=this.accountSdk.getUser();if(!c)throw Error("dont have user");let u=new URLSearchParams(this.queryParams);return u.set("uid",c.userTokens.uid),u.set("token",c.userTokens.id_token),`${this.socketUrl}?${u.toString()}`}startWebSocket(){if(!this.accountSdk.getUser())return;if(!this.socketUrl)throw Error("dont have websocket url");let c=this.buildWebsocketUrl();log$5.debug("connecting to websocket url",c),this.socket=new WebSocket(c),this.socket.addEventListener("message",c=>{log$5.debug("WS message response",c)}),this.socket.addEventListener("error",c=>{log$5.debug("WS error response",c),this.errorCount=this.errorCount+1}),this.socket.addEventListener("open",c=>{log$5.debug("WS open",c)}),this.socket.addEventListener("close",c=>{log$5.debug("WS close",c)})}stopWebSocket(){this.socket&&(this.socket.close(),this.socket=void 0,this.errorCount=0)}sendTimeUpdate(c){if(!this.playerCoordinator)return;let u=this.playerCoordinator.getPlayerData();if(!u||u.isShowingAd()||"LIVE"===u.getPlaybackMode())return;let d=Date.now(),p=d-this.lastSendingTimestamp;this.socket&&(this.socket.readyState===WebSocket.CLOSED?this.attemptReconnect():this.socket.readyState===WebSocket.OPEN&&p>=1e3*INTERVAL_BETWEEN_SAVE_CALLS_IN_SEC&&this.sendBookmarkUpdateViaWebSocket(c,d))}sendBookmarkUpdateViaWebSocket(c,u){if(!this.socket)throw Error("dont have socket");if(!this.playerCoordinator)throw Error("dont have player coordinator, this should not be possible");let d=this.playerCoordinator.getMediaMetaData();if((null==d?void 0:d.bookmarkAllowed)===!1)return void log$5.debug("Bookmarking not allowed, not sending bookmark update!");let p=c.playbackPosition,h=this.playerCoordinator.getDurationInSec(),f=this.playerCoordinator.getPlayerConfiguration().assetId;if(!f)return void log$5.warn("dont have an asset id, something has gone terribly wrong");let m=stripOffLocaleFromCrepoIdOrReturnOriginalIfNotRrn(f),g=this.accountSdk.getUser();if(!g)return void log$5.debug("dont have account user");this.lastSendingTimestamp=u;let v=g.userTokens.uid,y=this.buildPayload(m,v,p,h);log$5.debug("Sending bookmark update",y),this.socket.send(JSON.stringify(y))}attemptReconnect(){this.errorCount<MAX_ERROR_COUNT_FOR_RECONNECT&&(log$5.info(`current socket connection is closed, trying a reconnect (error count ${this.errorCount})`),this.startWebSocket())}buildPayload(c,u,d,p){return{productId:c,userId:u,playhead:Math.floor(1e3*d),duration:Math.floor(1e3*p),version:"v1.0"}}extendChromecastServiceWithAccountSdkUserData(c){var u,d,p;try{let h=this.accountSdk.getUser();if(h){let{userTokens:f}=h;null==(p=null==(d=null==(u=c.chromecastOptions)?void 0:u.chromecastService)?void 0:d.setAccountSdkUserData)||p.call(d,{userId:f.uid,idToken:f.id_token})}}catch(c){log$5.warn("error during extending Chromecast service with account sdk user data",c)}}}function isVideoPlayerCoordinator(c){return"function"==typeof c.isInFullscreenMode}var bitmovinplayerAdvertisingIma={exports:{}};!function(c){var u;self,c.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[399],{93500:function(c,u){var d,p;
129Object.defineProperty(u,"__esModule",{value:!0}),u.ImaPassthroughMode=void 0,(p=d||(u.ImaPassthroughMode=d={})).None="none",p.Vast="vast",p.VastAndVmap="vastandvmap"},39401:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.ImaInternalAdbreakState=void 0,u.ImaInternalAdBreaksTracker=function(c,u){var p=null,h=c.getCuePoints(),f=h.map(function(c){return{state:d.SCHEDULED,position:c,ads:[]}}),m=function(c){var u=c.getAd();u&&T(u,d.PLAYING)},g=function(c){var u=c.getAd();u&&T(u,d.PLAYED)},v=function(c){var u=c.getAd();u&&T(u,d.SKIPPED)},y=function(c){var u=c.getAd();u&&T(u,d.LOADED)},b=function(c){var u=c.getAd();u&&(p=u)},S=function(c){var u,h,m=c.getAdData();if(m.adError&&p){var g=p.getAdPodInfo().getTimeOffset(),v=f.find(function(c){return c.position===g});v&&[d.SCHEDULED,d.LOADED].includes(v.state)&&T(p,d.PLAYED)}(null==(h=null==(u=m.adError)?void 0:u.data)?void 0:h.errorCode)===google.ima.AdError.ErrorCode.VAST_EMPTY_RESPONSE&&f.forEach(function(c){return c.state=d.PLAYED})},_=function(c){var u=c.getError();if(u&&p){var h=p.getAdPodInfo().getTimeOffset(),m=f.find(function(c){return c.position===h});m&&[d.SCHEDULED,d.LOADED].includes(m.state)&&T(p,d.PLAYED)}(null==u?void 0:u.getErrorCode())===google.ima.AdError.ErrorCode.VAST_EMPTY_RESPONSE&&f.forEach(function(c){return c.state=d.PLAYED})};function E(c){var u,p=c.getAd();if(p){var h=p.getAdPodInfo().getTimeOffset();void 0!==h&&p.isLinear()&&(null==(u=f.find(function(c){return c.position===h}))||u.ads.push({id:p.getAdId(),state:d.LOADED}))}}function T(c,u){var p=c.getAdPodInfo().getTimeOffset(),h=c.getAdId();if(void 0!==p){var m=f.find(function(c){return c.position===p});if(!m)return;var g=m.ads.findIndex(function(c){return c.id===h});-1!==g&&(m.ads[g].state=u,m.ads.every(function(c){return c.state===d.PLAYED||c.state===d.SKIPPED})?(m.state=d.PLAYED,f.filter(function(c){return c.state===d.SCHEDULED&&c.position<p&&c.position>0}).forEach(function(c){c.state=d.MISSED}),f.filter(function(c){return c.state===d.MISSED&&c.position>p}).forEach(function(c){c.state=d.SCHEDULED})):m.state=u)}}return c.addEventListener(google.ima.AdEvent.Type.LOADED,E),c.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,y),c.addEventListener(google.ima.AdEvent.Type.STARTED,m),c.addEventListener(google.ima.AdEvent.Type.COMPLETE,g),c.addEventListener(google.ima.AdEvent.Type.SKIPPED,v),c.addEventListener(google.ima.AdEvent.Type.LOG,S),c.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,_),c.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,b),{updateAdBreakState:T,reset:function(){p=null,f=[],h=[],c.removeEventListener(google.ima.AdEvent.Type.LOADED,E),c.removeEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,y),c.removeEventListener(google.ima.AdEvent.Type.STARTED,m),c.removeEventListener(google.ima.AdEvent.Type.COMPLETE,g),c.removeEventListener(google.ima.AdEvent.Type.SKIPPED,v),c.removeEventListener(google.ima.AdEvent.Type.LOG,S),c.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,_),c.removeEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,b)},hasAdBreaksToPlay:function(c){return f.some(function(p){var h=p.position,f=[d.SCHEDULED,d.LOADED].includes(p.state);return!(p.state===d.LOADED&&0===p.ads.length&&h<=c+2)&&(-1===h?f&&c>=u-2:f&&h<=c+2)})},getImaInternalAdBreaks:function(){return f}}},(p=d||(u.ImaInternalAdbreakState=d={})).SCHEDULED="SCHEDULED",p.LOADED="LOADED",p.PLAYING="PLAYING",p.PLAYED="PLAYED",p.SKIPPED="SKIPPED",p.MISSED="MISSED"},5181:function(c,u,d){var p,h=this&&this.__extends||(p=function(c,u){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(c[d]=u[d])})(c,u)},function(c,u){if("function"!=typeof u&&null!==u)throw TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=c}p(c,u),c.prototype=null===u?Object.create(u):(d.prototype=u.prototype,new d)}),f=this&&this.__assign||function(){return(f=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)},m=this&&this.__spreadArray||function(c,u,d){if(d||2==arguments.length)for(var p,h=0,f=u.length;h<f;h++)!p&&h in u||(p||(p=Array.prototype.slice.call(u,0,h)),p[h]=u[h]);return c.concat(p||Array.prototype.slice.call(u))};
129Object.defineProperty(u,"__esModule",{value:!0}),u.ImaModule=void 0;var g=d(45202),v=d(3714),y=d(34841),b=d(65348),S=d(43767),_=d(89927),E=d(88844),T=d(23068),w=d(70850),P=d(45392),A=d(90176),I=d(28412),M=d(28610),R=d(23912),k=d(6365),x=d(47091),C=d(5838),O=d(93500),D=d(71751),L=d(39401),N=d(73134),U=d(62899);function F(c){for(var u=[],d=1;d<arguments.length;d++)u[d-1]=arguments[d];c&&"function"==typeof c&&c.apply(void 0,u)}function B(c,u){return c.scheduleTime-c.preloadOffset-(u.scheduleTime-u.preloadOffset)}function j(c,u){var d=u.getAd();if(d){if(c.isLinear=d.isLinear(),1===Object.keys(d).length){var p=d[Object.keys(d)[0]].clickThroughUrl;p&&(c.clickThroughUrl=p)}var h=d.getMediaUrl();h&&(c.mediaFileUrl=h),c.data=(0,D.collectAdData)(u)}}u.ImaModule=function(c){function u(u,d){var p=c.call(this,u,d)||this;return p.Tg=!0,p.Wg=function(c){p.Bg.restoreCustomPlaybackStateOnAdBreakComplete=!1,p.Bg.loadVideoTimeout=p.Hg,p.Eg=c.getAdsManager(p.player.getVideoElement(),p.Bg);var u=p.player.getVideoElement().duration;p.Fg=(0,L.ImaInternalAdBreaksTracker)(p.Eg,u),p.Eg.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,p.bg),p.Eg.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,p.cg),p.Eg.addEventListener(google.ima.AdEvent.Type.STARTED,p.uh),p.Eg.addEventListener(google.ima.AdEvent.Type.LOADED,p.hg),p.Eg.addEventListener(google.ima.AdEvent.Type.SKIPPED,p.Bh),p.Eg.addEventListener(google.ima.AdEvent.Type.COMPLETE,p.Ch),p.Eg.addEventListener(google.ima.AdEvent.Type.PAUSED,p.Gh),p.Eg.addEventListener(google.ima.AdEvent.Type.RESUMED,p.Hh),p.Eg.addEventListener(google.ima.AdEvent.Type.CLICK,p.Ih),p.Eg.addEventListener(google.ima.AdEvent.Type.DURATION_CHANGE,p.Kh),p.Eg.addEventListener(google.ima.AdEvent.Type.FIRST_QUARTILE,p.Lh),p.Eg.addEventListener(google.ima.AdEvent.Type.MIDPOINT,p.Mh),p.Eg.addEventListener(google.ima.AdEvent.Type.THIRD_QUARTILE,p.Nh),p.Eg.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,p.Yg),p.Eg.addEventListener(google.ima.AdEvent.Type.INTERACTION,p.Jh),p.Eg.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,p.Dh),F(p.config.onAdsManagerAvailable,p.Eg),p.Eg.init(p.zg.clientWidth,p.zg.clientHeight,google.ima.ViewMode.NORMAL),p.Eg.setVolume(p.player.getVolume()/100),p.getActiveAdBreak()||p.Xg()},p.Yg=function(c){var u,d=p.getActiveAdBreak(),h=c.getError(),f=h.getInnerError(),m=h.getErrorCode(),g=null!=f&&f.getErrorCode?f:null;if(d){if(null==(u=p.tg)||u.then(function(){return(0,P.pingVmapTrackingUrls)(d.trackingEvents,M.VmapTrackingEventType.Error)}),m!==google.ima.AdError.ErrorCode.VAST_EMPTY_RESPONSE&&m!==google.ima.AdError.ErrorCode.VAST_NO_ADS_AFTER_WRAPPER||p.tg||((0,P.pingVmapTrackingUrls)(d.trackingEvents,M.VmapTrackingEventType.BreakStart),
vendor: 13,197 bytes, line 129
129(0,P.pingVmapTrackingUrls)(d.trackingEvents,M.VmapTrackingEventType.Error),(0,P.pingVmapTrackingUrls)(d.trackingEvents,M.VmapTrackingEventType.BreakEnd)),g&&g.getErrorCode()===google.ima.AdError.ErrorCode.AUTOPLAY_DISALLOWED)return p.Pg||(p.mg=[d].concat(p.og,p.mg),p.og=[]),void p.ag(g);p.Ig.includes(h.getErrorCode())?p.bh(d).then(function(c){if(c.manifest)p.eh(d,c.manifest,!0);else{if(d.passthroughMode===O.ImaPassthroughMode.None)return Promise.reject();p.eh(d,null,!0)}}).catch(function(){return p.ag(h)}):p.ag(h)}else p.ag(h)},p.bg=function(c){p.Sg=!0,(p.tg?p.Eh(!1):Promise.resolve()).then(function(){var u=f({},p.getActiveAdBreak());if(p.Wh(u),!u){var d=p.player.getVideoElement().currentTime;u={tag:null,id:w.Util.generateUniqueId(),position:String(d),scheduleTime:d}}p.tg=p.player.requestAdPlayback(p.sh(c,u)),p.ug=p.tg.then(function(c){return c.requestReporter()}),p.tg.then(function(){return(0,P.pingVmapTrackingUrls)(u.trackingEvents,M.VmapTrackingEventType.BreakStart)});var h=c.getAd();p.xh(h.isLinear(),h.getWidth(),h.getHeight())})},p.cg=function(){var c,u,d=null==(c=p.Fg)?void 0:c.hasAdBreaksToPlay(p.qg),h=p.getActiveAdBreak();null==(u=p.tg)||u.then(function(){return(0,P.pingVmapTrackingUrls)(null==h?void 0:h.trackingEvents,M.VmapTrackingEventType.BreakEnd)}),d||(p.sg&&p.Ch(),p.Sg=!1,p.Rg&&(p.Rg=!1,h&&delete h.currentFallbackIndex),p.rg=null,p.Qg=!1,p.Ag.style.display="none",p.tg?p.tg.then(function(c){p.og.length>0?p.ch(p.og.shift()):c.done().then(function(){p.tg=null,p.dg()})}):p.dg())},p.hg=function(c){var u=p.getActiveAdBreak();u&&p.eg(p.sh(c,u))},p.uh=function(c){(p.rg||p.sg)&&(p.xh(c.getAd().isLinear(),c.getAd().getWidth(),c.getAd().getHeight()),p.sg||p.th(c),p.rg&&(p.rg.ads=p.rg.ads||[],p.rg.ads.includes(p.sg)||p.rg.ads.push(p.sg)),p.config&&p.config.companionAdContainers&&p.zh(p.config.companionAdContainers(),c),p.sg.isLinear?p.vh(c):p.wh(c))},p.Ah=function(){if(p.ug){var c=p.currentTime();c!==p.wg&&c>0&&p.ug.then(function(u){return u.timeupdate(c)}),p.wg=c}},p.Bh=function(){p.Fh(),p.ug&&p.ug.then(function(c){return c.skipped()})},p.Ch=function(){var c;p.Oh(),p.Fh(),p.ug&&(p.ug.then(function(c){return c.done()}),p.ug=null==(c=p.tg)?void 0:c.then(function(c){return c.requestReporter()}))},p.Dh=function(){p.Tg||(p.Eg.destroy(),p.Dg.contentComplete())},p.Gh=function(){p.Qg=!1,p.ug.then(function(c){return c.paused(p.currentTime())})},p.Hh=function(){p.Qg=!0,p.ug.then(function(c){return c.resumed(p.currentTime())})},p.Ih=function(){var c=p.sg?p.sg.clickThroughUrl:null;p.player.adClicked(c)},p.Jh=function(c){var u;p.player.adInteraction(v.AdInteractionType.Vpaid,null==(u=c.getAdData())?void 0:u.id)},p.Kh=function(c){p.Gg=c.getAd().getDuration()},p.Lh=function(){p.player.onQuartile(v.AdQuartile.FIRST_QUARTILE),p.yg.push(v.AdQuartile.FIRST_QUARTILE)},p.Mh=function(){p.player.onQuartile(v.AdQuartile.MIDPOINT),p.yg.push(v.AdQuartile.MIDPOINT)},p.Nh=function(){p.player.onQuartile(v.AdQuartile.THIRD_QUARTILE),p.yg.push(v.AdQuartile.THIRD_QUARTILE)},p.Ph=function(c){var u=p.config.strategy.shouldLoadAdBreak(c);return u||p.Qh(c),u},p.mg=[],p.ng=[],p.og=[],p.pg=[],p.qg=0,p.rg=null,p.sg=null,p.Fg=null,p.Hg=d.videoLoadTimeout,p.Ig=[],p.Sg=!1,p.yg=[],p.Mg=!1,p.Ng=!1,p.Og=Promise.resolve(null),p.Qg=!1,p.Rg=!1,p.config.placeholders=f(f({},A.adTagPlaceholderDefaults),p.config.placeholders),p.Kg=new y.Deferred,p.Jg=S.FileLoader.getInstance().loadScript(d.sdkUrl),p}return h(u,c),u.prototype.Ug=function(){"function"==typeof this.config.adContainer&&(this.Ag=this.config.adContainer(),this.Ag instanceof HTMLElement?this.Mg=!0:this.player.onError(x.VastErrorCode.UNDEFINED_ERROR,"AdvertisingConfig.adContainer was defined but did not provide a valid HTMLElement.")),this.Mg||(this.Ag=b.DOMHelper.createTag("div",{class:g.Environment.idPrefix+"ima-container"},{height:"100%",width:"100%",display:"none",border:"none",overflow:"hidden",position:"absolute",top:"0"}),this.zg=this.player.getVideoElement().parentElement,this.zg.appendChild(this.Ag)),F(this.config.onAdContainerAvailable,this.Ag)},u.prototype.initialize=function(){var c=this;this.Jg.then(function(){c.Ug(),c.Vg(),c.Ng=!0}).catch(function(){c.player.onError(N.ImaModuleErrorCode.FAILED_TO_REQUEST_IMA_SDK,"could not load the IMA SDK"),c.Ng=!1,c.Kg.resolve()})},u.prototype.Vg=function(){google.ima.settings.setPlayerType("bitmovin-player"),google.ima.settings.setNumRedirects(25),google.ima.settings.setCookiesEnabled(this.config.withCredentials),F(this.config.beforeInitialization,google.ima.settings),this.Bg=new google.ima.AdsRenderingSettings,this.config.allowedUiElements&&(this.Bg.uiElements=this.config.allowedUiElements),this.Cg=new google.ima.AdDisplayContainer(this.Ag,this.player.getVideoElement()),this.Cg.initialize(),this.Dg=new google.ima.AdsLoader(this.Cg),this.Dg.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.Yg),this.Dg.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.Wg),this.Ig=[100,404,google.ima.AdError.ErrorCode.COMPANION_REQUIRED_ERROR,google.ima.AdError.ErrorCode.FAILED_TO_REQUEST_ADS,google.ima.AdError.ErrorCode.NONLINEAR_DIMENSIONS_ERROR,google.ima.AdError.ErrorCode.UNKNOWN_AD_RESPONSE,google.ima.AdError.ErrorCode.UNKNOWN_ERROR,google.ima.AdError.ErrorCode.VAST_ASSET_NOT_FOUND,google.ima.AdError.ErrorCode.VAST_EMPTY_RESPONSE,google.ima.AdError.ErrorCode.VAST_LINEAR_ASSET_MISMATCH,google.ima.AdError.ErrorCode.VAST_LOAD_TIMEOUT,google.ima.AdError.ErrorCode.VAST_MALFORMED_RESPONSE,google.ima.AdError.ErrorCode.VAST_NO_ADS_AFTER_WRAPPER,google.ima.AdError.ErrorCode.VAST_SCHEMA_VALIDATION_ERROR,google.ima.AdError.ErrorCode.VAST_TOO_MANY_REDIRECTS,google.ima.AdError.ErrorCode.VAST_TRAFFICKING_ERROR,google.ima.AdError.ErrorCode.VAST_UNSUPPORTED_VERSION,google.ima.AdError.ErrorCode.VAST_WRAPPER_ERROR,1012],this.Kg.resolve()},u.prototype.Xg=function(){this.tg&&this.Eh(),this.xg=null},u.prototype.Zg=function(){this.dg(),this.Sg||this.Eh().catch(function(){})},u.prototype.ag=function(c){this.player.onError(c.getErrorCode(),c.getMessage(),this.getActiveAdBreak()),this.Fh(),this.rg=null,this.og.length>0?this.ch(this.og.shift()):this.Zg()},u.prototype.dg=function(){this.Lg&&(this.Lg.resolve(),this.Lg=null)},u.prototype.eg=function(c){c.passthroughMode!==O.ImaPassthroughMode.None&&this.fg(c),this.xg=null,c.hasOwnProperty("ads")||(c.ads=[]),this.gg(c)},u.prototype.fg=function(c){var u=(0,T.isNumber)(c.currentFallbackIndex)&&c.currentFallbackIndex>=0?c.fallbackTags[c.currentFallbackIndex]:c.tag,d=this.xg&&u.type!==R.AdTagType.VMAP?{downloadTime:(0,_.toSeconds)(Date.now()-this.xg)}:null;this.player.metadataLoaded(c,d)},u.prototype.gg=function(c){this.config.strategy.shouldPlayAdBreak(c)?this.Eg.start():(this.rg=null,this.og.length>0?this.ch(this.og.shift()):this.dg())},u.prototype.sh=function(c,u){var d,p=f({},u);p.ads=u.ads?m([],u.ads,!0):[];var h=this.sg;return h||j(h={id:null==(d=c.getAd())?void 0:d.getAdId()},c),-1===p.ads.findIndex(function(u){var d;return u.id===(null==(d=c.getAd())?void 0:d.getAdId())})&&p.ads.push(h),p},u.prototype.th=function(c){var u=this.getActiveAdBreak();if(u&&u.ads){var d=c.getAd().getAdId(),p=u.ads.find(function(c){return c.id===d});p&&(this.sg=p)}this.sg=this.sg||{id:c.getAd().getAdId()},j(this.sg,c)},u.prototype.vh=function(c){var u=this,d=c.getAd().getSkipTimeOffset();this.Gg=c.getAd().getDuration(),-1===this.Gg&&(this.Gg=null),this.sg.width=c.getAd().getVastMediaWidth(),this.sg.height=c.getAd().getVastMediaHeight(),this.sg.duration=this.Gg,this.sg.skippable=d!==k.NON_SKIPPABLE_IDENTIFIER,this.sg.skippable&&(this.sg.skippableAfter=d),this.Qg=!0,this.ug.then(function(c){c.started(u.sg),u.vg=window.setInterval(u.Ah,250)})},u.prototype.wh=function(c){this.og.length>0?this.ch(this.og.shift()):(this.sg.width=c.getAd().getWidth(),this.sg.height=c.getAd().getHeight(),this.player.overlayAdStarted(this.sg),this.Lg&&(this.Lg.resolve(),this.Lg=null)),this.rg=null},u.prototype.xh=function(c,u,d){this.Ag.style.display="block",this.Mg||(c?(this.Ag.style.width="100%",this.Ag.style.height="100%",this.Ag.style.top="0",this.Ag.style.bottom="",this.Ag.style.left="",this.Ag.style.right="",this.Ag.style.marginLeft="",this.Ag.style.marginRight=""):(this.Ag.style.width=u+"px",this.Ag.style.height=d+"px",this.Ag.style.top="",this.Ag.style.bottom=k.DEFAULT_OVERLAY_AD_BOTTOM_POSITION,this.Ag.style.left="0",this.Ag.style.right="0",this.Ag.style.marginLeft="auto",this.Ag.style.marginRight="auto")),this.yh(c,u,d)},u.prototype.yh=function(c,u,d){var p=this.Ag.firstElementChild;p&&(c?(p.style.width="100%",p.style.height="100%"):(p.style.width=u+"px",p.style.height=d+"px"));var h=p.getElementsByTagName("iframe")[0];h&&(c?(h.style.width="100%",h.style.height="100%"):(h.style.width=u+"px",h.style.height=d+"px"))},u.prototype.zh=function(c,u){var d=this,p=u.getAd();p&&c.forEach(function(c){var u=(0,U.selectCompanionAd)(c,p);"innerHTML"in c&&void 0!==u&&(d.sg.hasOwnProperty("companionAds")||(d.sg.companionAds=[]),d.sg.companionAds.push({width:u.getWidth(),height:u.getHeight()}),c.innerHTML=u.getContent())})},u.prototype.Eh=function(c){if(void 0===c&&(c=!0),!this.tg)return Promise.resolve();var u=this.tg.then(function(u){return u.done(c)});return this.tg=null,u},u.prototype.Fh=function(){this.sg&&this.sg.companionAds&&this.config.companionAdContainers().forEach(function(c){return c.innerHTML=""}),(0,E.clearIntervalIfDefined)(this.vg),this.vg=null,this.sg=null,this.Qg=!1,this.wg=null,this.yg=[]},u.prototype.Oh=function(){var c=this;[v.AdQuartile.FIRST_QUARTILE,v.AdQuartile.MIDPOINT,v.AdQuartile.THIRD_QUARTILE].filter(function(u){return!c.yg.includes(u)}).forEach(function(u){c.player.onQuartile(u)})},u.prototype.onTimeChanged=function(c){var u=this;if(!this.isLinearAdActive()){this.Pg=!0,this.qg=c;var d=this.mg.filter(function(u){return u.preloadOffset&&!u.vastResponse&&u.scheduleTime-u.preloadOffset<=c}),p=this.mg.filter(function(u){return u.scheduleTime<=c&&!u.isScheduled});d.filter(this.Ph).forEach(function(c){return u.ah(c)}),p.filter(function(c){return!!c.vastResponse||u.Ph(c)}).forEach(function(c){c.isScheduled=!0,u.ah(c).then(function(){u.mg.includes(c)&&u.ch(c)})})}},u.prototype.Qh=function(c){c.discardAfterPlayback?this.discardAdBreak(c.id):c.isScheduled=!0},u.prototype.Rh=function(c){this.mg.forEach(function(u){return u.scheduleTime>=c&&(u.isScheduled=!1)})},u.prototype.onSeek=function(c,u){this.Rh(u);var d=this.mg.filter(function(c){return c.scheduleTime<=u&&!c.isScheduled});if(this.mg=this.mg.filter(function(c){return!d.includes(c)}),d.length>0){var p=this.config.strategy.shouldPlaySkippedAdBreaks(m([],d,!0),c,u);(d=d.filter(function(c){return!c.discardAfterPlayback||p.includes(c)})).forEach(function(c){return c.isScheduled=!0}),p.forEach(function(c){var u=d.findIndex(function(u){return u===c});u>-1&&(d[u].isScheduled=!1)}),this.mg=d.concat(this.mg)}},u.prototype.onResize=function(c,u,d){if(this.Eg&&(!this.sg||this.sg.isLinear)){var p=d?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL;this.Eg.resize(c,u,p)}},u.prototype.onVolumeChanged=function(c){this.Eg&&this.Eg.setVolume(c/100)},u.prototype.beforeContent=function(){var c=this;return this.Xh(this.ng.splice(0,this.ng.length)),this.Jg.then(function(){return c.Ng?c.Og.catch(function(){}).then(function(){return c.Zh("pre")}):Promise.resolve()})},u.prototype.afterContent=function(){var c=this;return this.Ng?(this.sg&&!this.sg.isLinear&&(this.Fh(),this.rg=null,this.Eg.stop()),this.Dg.contentComplete(),this.Zh("post").then(function(){return c.Rh(0)})):Promise.resolve()},u.prototype.Sh=function(c){return Object.keys(O.ImaPassthroughMode).some(function(u){return c===O.ImaPassthroughMode[u]})},u.prototype.Th=function(c){return c.fallbackTags&&c.fallbackTags.length>0&&(c.fallbackTags=c.fallbackTags.filter(function(c){return!!c.url})),this.Sh(c.passthroughMode)||(c.passthroughMode=O.ImaPassthroughMode.Vast),c.position?c.position=String(c.position).toLowerCase():c.position=k.DEFAULT_AD_BREAK_POSITION,"number"!=typeof c.preloadOffset&&(c.preloadOffset=k.DEFAULT_PRELOAD_OFFSET),c},u.prototype.Uh=function(c){return c.tag?c.tag.url?Object.keys(R.AdTagType).some(function(u){return c.tag.type===R.AdTagType[u]})?void 0:"The provided ad tag type is invalid":"No ad tag url was provided":"No ad tag was provided"},u.prototype.Vh=function(c,u){return c.map(function(c){var d=f(f({},c.publicAdBreakConfig),{isScheduled:!1,parentAdTag:u.tag});return c.trackingEvents&&(d.trackingEvents=c.trackingEvents),void 0===d.id&&(d.id=w.Util.generateUniqueId()),d})},u.prototype.Wh=function(c){return delete c.isScheduled,delete c.parentAdTag,c},u.prototype.schedule=function(c){var u=this;return this.Og=this.Kg.promise.then(function(){if(!u.Ng)return Promise.reject("The IMA SDK was not loaded and initialized properly");var d=u.Uh(c);if(d)return Promise.reject(d);var p=u.Th(c);return u.Yh(p).then(function(d){if(0===d.length&&p.fallbackTags&&p.fallbackTags.length>0)return p.tag=p.fallbackTags.shift(),u.schedule(p);var h=u.Vh(d,c);return h.forEach(function(u){return u.discardAfterPlayback=!1!==c.discardAfterPlayback}),Promise.resolve(m([],u.Xh(h).map(function(c){var d=f({},c);return u.Wh(d),d}),!0))})})},u.prototype.Xh=function(c){var u=this,d=[];
129c.forEach(function(c){var p=u.player.parsePosition(c.position);isNaN(p)?u.ng.push(c):(c.scheduleTime=p,d.push(c))});var p=d.filter(function(c){return c.persistent});return this.mg=this.mg.concat(d),this.pg=this.pg.concat(p),this.mg.sort(B),this.pg.sort(B),d},u.prototype.Yh=function(c){var u=this;return new Promise(function(d){if(c.tag.type===R.AdTagType.VMAP&&c.passthroughMode!==O.ImaPassthroughMode.VastAndVmap){var p=c.tag.url;c.tag.url=u.hh(c.tag.url),C.VmapExtractor.extractAdBreakConfigs(c).then(function(h){var f=h.adBreakConfigs.filter(function(c){var d=u.player.parsePosition(c.publicAdBreakConfig.position);return isNaN(d)||d>=u.qg});c.tag.url=p,u.player.metadataLoaded(c,h.downloadTiming),d(f)}).catch(function(h){c.tag.url=p,h?u.player.onError(h.code,null,c):u.player.onError(x.VastErrorCode.UNDEFINED_ERROR,null,c),d([])})}else d([{publicAdBreakConfig:c}])})},u.prototype.Zh=function(c){var u=this;return this.Kg.promise.then(function(){if(!u.Ng)return Promise.resolve();var d="post"===c?u.mg.filter(function(u){return u.position.includes(c)||1/0===u.scheduleTime}):u.mg.filter(function(u){return u.position.includes(c)||0===u.scheduleTime}),p=Promise.resolve();return(d=d.filter(u.Ph)).length>0&&(u.Lg=new y.Deferred,p=u.Lg.promise,d.forEach(function(c){c.isScheduled=!0,u.ah(c).then(function(){return u.ch(c)})})),p})},u.prototype.ah=function(c,u){var d=this,p=c.tag;if(u&&(c.vastResponse=null,p=u),c.vastResponse&&!u)return c.vastResponse;var h=this.hh(p.url);return c.passthroughMode!==O.ImaPassthroughMode.None?c.vastResponse=Promise.resolve({}):c.vastResponse=P.AdManifestHelper.downloadVastManifest(h).then(function(u){var p=u.manifest,h={manifest:P.AdManifestHelper.xmlToString(p)};return P.AdManifestHelper.parseAdVerifications(p).then(function(p){return p&&p.length>0&&(c.ads=[],p.forEach(function(u){u.verifications&&u.verifications.length>0&&c.ads.push({id:u.id,verifications:u.verifications})})),d.player.metadataLoaded(c,u.downloadTiming),Promise.resolve(h)})}).catch(function(u){return d.bh(c).catch(function(){return delete c.currentFallbackIndex,u?d.player.onError(u.code,null,c):d.player.onError(x.VastErrorCode.UNDEFINED_ERROR,null,c),Promise.resolve({})})}),c.vastResponse},u.prototype.bh=function(c){return"number"!=typeof c.currentFallbackIndex?c.currentFallbackIndex=0:c.currentFallbackIndex++,c.fallbackTags&&c.fallbackTags[c.currentFallbackIndex]?this.ah(c,c.fallbackTags[c.currentFallbackIndex]):Promise.reject()},u.prototype.ch=function(c){var u=this;this.Kg.promise.then(function(){var d;if(u.Ng)if(u.mg.includes(c)&&c.discardAfterPlayback&&u.mg.splice(u.mg.indexOf(c),1),u.rg)u.og.push(c);else{u.sg&&!u.sg.isLinear&&u.Eg&&(u.Dh(),u.Fh()),u.rg=c;var p=function(c){var d;return c.parentAdTag&&(null==(d=u.rg)?void 0:d.parentAdTag)&&c.parentAdTag===u.rg.parentAdTag};u.Tg=u.mg.some(p)||u.og.some(p),null==(d=c.vastResponse)||d.then(function(d){return u.eh(c,d.manifest)})}})},u.prototype.dh=function(c){var u,d,p;return null!=(p=null==(d=null==(u=null==c?void 0:c.fallbackTags)?void 0:u[c.currentFallbackIndex])?void 0:d.url)?p:c.tag.url},u.prototype.eh=function(c,u,d){var p=(u?P.AdManifestHelper.toDataUri(u):void 0)??this.dh(c);p&&this.fh(p,d)},u.prototype.fh=function(c,u){var d,p=new google.ima.AdsRequest;0===c.indexOf("data:text/xml,")?p.adsResponse=decodeURIComponent(c.substring(14)):p.adTagUrl=this.hh(c),this.zg&&(p.linearAdSlotWidth=this.zg.clientWidth,p.linearAdSlotHeight=this.zg.clientHeight,p.nonLinearAdSlotWidth=this.zg.clientWidth),null!=(d=this.config)&&d.vastLoadTimeout&&(p.vastLoadTimeout=this.config.vastLoadTimeout),this.gh(p),p.nonLinearAdSlotHeight=150,this.Rg=u,this.xg=Date.now(),this.Dg.requestAds(p)},u.prototype.gh=function(c){var u,d,p=null==(d=null==(u=this.config.trackers)?void 0:u.omSdk)?void 0:d.onAccessMode;if(void 0!==p&&"function"==typeof p){var h=p(c);if(h){var f={},m=function(c,u){u&&u.forEach(function(u){if("string"==typeof u){var d=google.ima.OmidVerificationVendor[u];void 0!==d&&(f[d]=c)}})};m(google.ima.OmidAccessMode.FULL,h.full),m(google.ima.OmidAccessMode.DOMAIN,h.domain),m(google.ima.OmidAccessMode.LIMITED,h.limited),Object.keys(f).length>0&&(c.omidAccessModeRules=f)}}},u.prototype.hh=function(c){var u=this,d={playbackTime:String(this.player.getVideoElement().currentTime),height:String(this.zg.clientHeight),width:String(this.zg.clientWidth),domain:encodeURIComponent(document.location.hostname),page:encodeURIComponent(document.location.href),referrer:encodeURIComponent(document.referrer),random:Math.floor(1e7+9e7*Math.random()).toString(),timestamp:String(Date.now())};
129return Object.keys(this.config.placeholders).forEach(function(p){u.config.placeholders[p].forEach(function(u){c=c.replace(u,d[p])})}),c},u.prototype.list=function(){var c=this,u=m(m([],this.og.map(function(c){return f({},c)}),!0),this.mg.map(function(c){return f({},c)}),!0);return u.forEach(function(u){return c.Wh(u)}),u},u.prototype.getActiveAdBreak=function(){return this.rg},u.prototype.getActiveAd=function(){return this.sg},u.prototype.isLinearAdActive=function(c){return!!this.sg&&(c?!!this.sg.isLinear&&this.Qg:!!this.sg.isLinear)},u.prototype.discardAdBreak=function(c){c&&(this.rg&&this.rg.id===c&&(this.Bh(),this.rg=null,this.Eg.stop()),this.mg=this.mg.filter(function(u){return u.id!==c}),this.og=this.og.filter(function(u){return u.id!==c}))},u.prototype.currentTime=function(){return!isFinite(this.Gg)||!this.Eg||0>this.Eg.getRemainingTime()?0/0:this.Gg-this.Eg.getRemainingTime()},u.prototype.duration=function(){return isFinite(this.Gg)?this.Gg:0},u.prototype.pause=function(){this.Eg&&this.Eg.pause()},u.prototype.resume=function(){this.Eg&&this.Eg.resume()},u.prototype.skip=function(){return this.Eg&&(this.Eg.skip(),this.sg&&!this.sg.isLinear&&(this.Eg.stop(),this.Ag.style.display="none",this.Fh())),Promise.resolve()},u.prototype.getModuleInfo=function(){return{name:"advertising-ima",version:g.Environment.VERSION_NUMBER}},u.prototype.ih=function(){var c=this.mg,u=this.ng;this.reset(!1),this.mg=c,this.ng=u,this.cleanUpImaSdk(),this.Kg=new y.Deferred,this.Ng=!1},u.prototype.reset=function(c){var u;return void 0===c&&(c=!0),this.tg=null,this.ug=null,this.getActiveAdBreak()&&(null==(u=this.Eg)||u.stop()),this.Fh(),this.mg=this.pg,this.og=[],this.qg=0,this.Gg=null,this.rg=null,this.Pg=!1,this.Rg=!1,this.xg=null,c&&(this.Og=Promise.resolve(null)),this.cleanUpImaSdk(),this.Kg=new y.Deferred,this.Ng=!1,Promise.resolve()},u.prototype.cleanUpImaSdk=function(){var c;this.Dg&&(this.Dg.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.Yg),this.Dg.removeEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.Wg),this.Dg.destroy(),this.Dg=null),this.Eg&&(null==(c=this.Fg)||c.reset(),this.Fg=null,this.Eg.removeEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this.bg),this.Eg.removeEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this.cg),this.Eg.removeEventListener(google.ima.AdEvent.Type.STARTED,this.uh),this.Eg.removeEventListener(google.ima.AdEvent.Type.LOADED,this.hg),this.Eg.removeEventListener(google.ima.AdEvent.Type.SKIPPED,this.Bh),this.Eg.removeEventListener(google.ima.AdEvent.Type.COMPLETE,this.Ch),this.Eg.removeEventListener(google.ima.AdEvent.Type.PAUSED,this.Gh),this.Eg.removeEventListener(google.ima.AdEvent.Type.RESUMED,this.Hh),this.Eg.removeEventListener(google.ima.AdEvent.Type.CLICK,this.Ih),this.Eg.removeEventListener(google.ima.AdEvent.Type.DURATION_CHANGE,this.Kh),this.Eg.removeEventListener(google.ima.AdEvent.Type.FIRST_QUARTILE,this.Lh),this.Eg.removeEventListener(google.ima.AdEvent.Type.MIDPOINT,this.Mh),this.Eg.removeEventListener(google.ima.AdEvent.Type.THIRD_QUARTILE,this.Nh),this.Eg.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.Yg),this.Eg.removeEventListener(google.ima.AdEvent.Type.INTERACTION,this.Jh),this.Eg.removeEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,this.Dh),this.Eg.destroy(),this.Eg=null),this.Cg&&(this.Cg.destroy(),this.Cg=null),this.Bg=null},u.prototype.dispose=function(){this.Fh(),this.cleanUpImaSdk(),this.zg&&this.zg.removeChild(this.Ag),this.Ag=null,this.rg=null,this.sg=null},u.imaMarker=function(){},u}(I.AdvertisingModule)},73134:function(c,u){var d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.ImaModuleErrorCode=void 0,(p=d||(u.ImaModuleErrorCode=d={}))[p.FAILED_TO_REQUEST_IMA_SDK=103]="FAILED_TO_REQUEST_IMA_SDK",p[p.VAST_NO_ADS_AFTER_WRAPPER=303]="VAST_NO_ADS_AFTER_WRAPPER",p[p.FAILED_TO_REQUEST_ADS=1005]="FAILED_TO_REQUEST_ADS",p[p.VAST_ASSET_NOT_FOUND=1007]="VAST_ASSET_NOT_FOUND",p[p.VAST_EMPTY_RESPONSE=1009]="VAST_EMPTY_RESPONSE",p[p.UNKNOWN_AD_RESPONSE=1010]="UNKNOWN_AD_RESPONSE",p[p.UNSUPPORTED_LO
129CALE=1011]="UNSUPPORTED_LOCALE",p[p.ADS_REQUEST_NETWORK_ERROR=1012]="ADS_REQUEST_NETWORK_ERROR",p[p.INVALID_AD_TAG=1013]="INVALID_AD_TAG",p[p.STREAM_INITIALIZATION_FAILED=1020]="STREAM_INITIALIZATION_FAILED",p[p.ASSET_FALLBACK_FAILED=1021]="ASSET_FALLBACK_FAILED",p[p.INVALID_ARGUMENTS=1101]="INVALID_ARGUMENTS",p[p.AUTOPLAY_DISALLOWED=1205]="AUTOPLAY_DISALLOWED"},61647:function(c,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.ImaPassthroughMode=u.ImaModuleErrorCode=u.AdvertisingImaModuleDefinition=void 0;var p=d(62756),h=d(93500);Object.defineProperty(u,"ImaPassthroughMode",{enumerable:!0,get:function(){return h.ImaPassthroughMode}});var f=d(5181),m=d(73134);Object.defineProperty(u,"ImaModuleErrorCode",{enumerable:!0,get:function(){return m.ImaModuleErrorCode}}),u.AdvertisingImaModuleDefinition={name:p.ModuleName.Advertising,module:function(){return f.ImaModule},dependencies:[p.ModuleName.AdvertisingCore],exports:{ImaModuleErrorCode:m.ImaModuleErrorCode,ImaPassthroughMode:h.ImaPassthroughMode}},u.default=u.AdvertisingImaModuleDefinition},71751:function(c,u,d){var p=this&&this.__assign||function(){return(p=Object.assign||function(c){for(var u,d=1,p=arguments.length;d<p;d++)for(var h in u=arguments[d])Object.prototype.hasOwnProperty.call(u,h)&&(c[h]=u[h]);return c}).apply(this,arguments)};Object.defineProperty(u,"__esModule",{value:!0}),u.collectAdData=function(c){var u,d,m,g,v=c.getAd();return v?(d={adTitle:v.getTitle(),adSystem:{name:v.getAdSystem()},mimeType:v.getContentType(),bitrate:v.getVastMediaBitrate&&v.getVastMediaBitrate()>0?v.getVastMediaBitrate():-1,wrapperAdIds:v.getWrapperAdIds(),adDescription:v.getDescription(),advertiser:{name:v.getAdvertiserName()},apiFramework:null!=(g=v.getApiFramework())?g:void 0,creative:{id:v.getCreativeId(),adId:v.getCreativeAdId(),universalAdId:{idRegistry:v.getUniversalAdIdRegistry(),value:v.getUniversalAdIdValue()}},dealId:v.getDealId(),minSuggestedDuration:v.isLinear()?f.NON_SKIPPABLE_IDENTIFIER:v.getMinSuggestedDuration(),survey:(u=v.getSurveyUrl())?{uri:u}:void 0,traffickingParameters:v.getTraffickingParameters()},Object.keys(m=p({},d)).forEach(function(c){var u=m[c],d=u&&"object"==typeof u&&!Object.keys(u).some(function(c){return!!u[c]});((0,h.isNumber)(u)&&u<0||!(0,h.isNumber)(u)&&!u||d)&&delete m[c]}),m):{}};var h=d(23068),f=d(6365)},62899:function(c,u){Object.defineProperty(u,"__esModule",{value:!0}),u.selectCompanionAd=function(c,u){var d,p,h=c.clientWidth,f=c.clientHeight,m=u.getCompanionAds(h,f,((d=new google.ima.CompanionAdSelectionSettings).resourceType=google.ima.CompanionAdSelectionSettings.ResourceType.STATIC,d.creativeType=google.ima.CompanionAdSelectionSettings.CreativeType.IMAGE,d.sizeCriteria=google.ima.CompanionAdSelectionSettings.SizeCriteria.SELECT_NEAR_MATCH,d));return m.length>0?m[0]:u.getCompanionAds(h,f,((p=new google.ima.CompanionAdSelectionSettings).resourceType=google.ima.CompanionAdSelectionSettings.ResourceType.STATIC,p.creativeType=google.ima.CompanionAdSelectionSettings.CreativeType.IMAGE,p.sizeCriteria=google.ima.CompanionAdSelectionSettings.SizeCriteria.IGNORE,p))[0]}}},function(c){return c(c.s=61647)}])}(bitmovinplayerAdvertisingIma);var bitmovinplayerAdvertisingImaExports=bitmovinplayerAdvertisingIma.exports;let AdvertisingImaModule=getDefaultExportFromCjs$1(bitmovinplayerAdvertisingImaExports);function getModuleExport(c){return isObject$7(c)&&"default"in c?c.default:c}function getBitmovinModules(){try{return bitmovinplayerCoreExports.Player.getModules()}catch{return[]}}function isModuleLoaded(c){return getBitmovinModules().includes(c)}function setupModules(){isModuleLoaded(bitmovinplayerCoreExports.ModuleName.XML)||bitmovinplayerCoreExports.Player.addModule(getModuleExport(XML)),bitmovinplayerCoreExports.Player.addModule(getModuleExport(AdvertisingCoreModule)),bitmovinplayerCoreExports.Player.addModule(getModuleExport(AdvertisingImaModule))}setupModules();let MOBILE_DEVICE_DEFINITION="/web/mobile",DESKTOP_DEVICE_DEFINITION="/web/desktop";function calculateDeviceDefinition(){return isMobileDevice()?MOBILE_DEVICE_DEFINITION:DESKTOP_DEVICE_DEFINITION}function calculateAdUnit(c){let u=calculateDeviceDefinition();return`${c}${u}`}function calculateCustomParameterString(c){let u=Object.entries(c).filter(([c,u])=>!!u).map(([c,u])=>`${camelToSnakeCase(c)}=${u}`);return u.length>0?u.join("&"):void 0}function camelToSnakeCase(c){return c.replace(/[A-Z]/g,c=>`_${c.toLowerCase()}`)}function calculateMediaId(c,u,d){return d||("rbcom"===u&&c.startsWith("rrn")?stripOffLocaleFromCrepoId(c):c)}let BASE_URL$1="https://pubads.g.doubleclick.net/gampad/ads",AD_SIZE="640x480";function calculateDfpAdUrl(c,u,d,p,h){let{mediaId:f,config:m}=u,{adUnit:g,cmsId:v,entitlements:y,consentParams:b,pageId:S}=m;if(!f)throw Error("invalid media id");let _=calculateAdUnit(g),E=document.location.href,T=calculateCustomParameterString({pageId:S,streamingType:p,entitlements:y}),w=calculateMediaId(f,d,h),P=isMobileDevice()?"mobile":"desktop",A=new URLSearchParams({iu:_,vid:w,tfcd:"0",npa:"0",sz:AD_SIZE,cmsid:v,gdfp_req:"1",output:"xml_vmap1_vast4",unviewed_position_start:"1",env:"vp",impl:"s",description_url:E,url:E,wta:"1",ad_rule:"1",vpmute:isPlayerMuted(c)?"1":"0",plcmt:"1",pp:`web_${P}
129`,...resolveConsentParams(b),...T?{cust_params:T}:null});return`${BASE_URL$1}?${A.toString()}&correlator=[timestamp]`}function isPlayerMuted(c){return 0===c.getVolume()}function resolveConsentParams(c){return(null==c?void 0:c.gdpr)!=="1"?{gdpr:"0"}:{gdpr:"1",...void 0!==c.gdprConsent&&{gdpr_consent:c.gdprConsent},...void 0!==c.addtlConsent&&{addtl_consent:c.addtlConsent}}}function calculateStreamingType(c){return"LIVE"!==c.getPlaybackMode()?"vod":"LINEAR"===c.getLiveVariant()?"linear":"live"}let logger=loglevelExports.getLogger("DfpAdService");class DfpAdService{constructor(c,u={}){yi(this,"videoPlayerAdapter"),yi(this,"destroy"),this.adRequester=c,this.config=u}createBitmovinAdConfig(){return{allowedUiElements:[],placeholders:{timestamp:["[timestamp]"]},onAdsManagerAvailable:c=>{var u;null==(u=this.videoPlayerAdapter)||u.enableInteractiveMediaAds(c)}}}async scheduleAd(c,u,d){let{dfpAdvertisingConfig:p,dfpVidPropertyOverride:h}=d;if(!p)throw Error("dfpAdvertisingConfig is missing");this.videoPlayerAdapter=c;let f=calculateStreamingType(c),m=calculateDfpAdUrl(c,{mediaId:u,config:{...this.config,...p}},this.adRequester,f,h);logger.info("scheduling ad url",m);let g=await c.scheduleAd(m);return logger.debug(" -> schedule result",g),g}}let CustomEaseLiveOverlayWrapperWithNextUp=({easeLiveEnabled:c,playerCoordinator:u,playlistEntriesRef:d,autoAdvancePlaylistIfAllowed:p,onEaseLiveActivated:h,currentlyPlayingPlaylistEntryRef:f,showProductPlacement:m,sizeBreakpoints:g,productPlacementDefinition:v})=>{var y,b,S,_,E,T,w;let P=u.getMediaMetaData(),A=_$3(null),I=_$3(()=>{}),M=_$3(useControlsVisibilityContext()),[R,k]=h$3(!0),x=(null==(y=u.getPlayerData())?void 0:y.getMainMediaDurationInSec())??0,C=(null==(b=u.getPlayerData())?void 0:b.getLastMainMediaPositionInSec())??0,O=(null==(S=u.getPlayerData())?void 0:S.isShowingAd())??!1,D=u.getPlayerStatus(),L=usePlayerWidth({current:(null==(_=u.getPlayerData())?void 0:_.getVideoElement())??null}),[N,U]=h$3(null==P?void 0:P.maturityRating),[F,B]=h$3(F$4(()=>{let c=!N&&!m,u=!!(null!=g&&g.mediumOrBigger);return c||u},[N,m,null==g?void 0:g.mediumOrBigger])),[j,H]=h$3(m),V=T$4(c=>{switch(c){case"DISPLAYED":M.current.setAllowControlsRendering("disallow");break;case"CANCELLED_BY_REPLAY":case"CANCELLED_BY_USER_INTERACTION":k(!1),M.current.setAllowControlsRendering("allow");break;case"TRIGGERED_AUTOMATICALLY":case"TRIGGERED_BY_USER_INTERACTION":u.setNextUpTransitioning(!0),M.current.setAllowControlsRendering("allow"),d.current.length&&p("TRIGGERED_AUTOMATICALLY"===c)}dispatchNextUpPlayerEvent(c,u)},[p,u,d]);I.current=T$4(c=>{A.current&&("seekingDone"===c.type||"seeking"===c.type)&&"RESTART"===c.issuer&&V("CANCELLED_BY_REPLAY")},[V]),p$7(()=>{let c=I.current;return u.addEventListener(c),()=>{u.removeEventListener(c)}},[u]);let z=F$4(()=>{var d;return resolveEaseLiveConfig(c,null==(d=u.getMediaMetaData())?void 0:d.easeLiveConfig)},[u,c]),{onEaseLiveBackgroundClick:q,onEaseLiveError:W}=useEaseLiveOverlay(z,h);p$7(()=>{m&&hasValidProductPlacementComponentDefinition(v)&&hasValidDuration(x)&&isWithinDisplayTimeWindowBeforeVideoEnds(C,x,v.displayTimeInSec)&&H(!0)},[x,C,v,m]);let G=T$4(()=>{U(void 0),m||B(!0)},[m]),K=T$4(()=>{H(!1),B(!0)},[]),Y=T$4(c=>{let{animationName:u}=c;switch(u){case"rating-sequence":G();break;case"product-placement-fade-out":K()}},[G,K]);return o$i(k$5,{children:[z&&o$i(EaseLiveOverlay,{playerCoordinator:u,config:z,onBackgroundClick:q,onError:W}),N&&o$i(MaturityRatingOverlay,{rating:(null==(E=null==P?void 0:P.maturityRating)?void 0:E.rating)??"",advisory:null==(T=null==P?void 0:P.maturityRating)?void 0:T.advisory,ratingFormat:null==(w=null==P?void 0:P.maturityRating)?void 0:w.ratingFormat,playerWidth:L,onAnimationEnd:Y}),j&&!N&&o$i(RbupVideoProductPlacement,{onAnimationEnd:Y,productPlacementDefinition:v}),g&&F&&o$i(SubtitlesAvailable,{playerCoordinator:u,sizeBreakpoints:g}),o$i(NextUpToastWrapper,{allowRenderNextUp:R,currentlyPlayingPlaylistEntryRef:f,onNextVideoCallback:V,duration:x,posInSec:C,isShowingAd:O,playerStatus:D,playlistEntriesRef:d,nextUpToastRef:A})]})};var freeGlobal$1="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&c
vendor: 2,553 bytes, line 129
129ommonjsGlobal,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root$8=freeGlobal||freeSelf||Function("return this")(),_root=root$8,root$7=_root,Symbol$6=root$7.Symbol,_Symbol=Symbol$6;function arrayMap$2(c,u){for(var d=-1,p=null==c?0:c.length,h=Array(p);++d<p;)h[d]=u(c[d],d,c);return h}var _arrayMap=arrayMap$2,isArray$7=Array.isArray,isArray_1=isArray$7,Symbol$5=_Symbol,objectProto$d=Object.prototype,hasOwnProperty$a=objectProto$d.hasOwnProperty,nativeObjectToString$1=objectProto$d.toString,symToStringTag$1=Symbol$5?Symbol$5.toStringTag:void 0;function getRawTag$1(c){var u=hasOwnProperty$a.call(c,symToStringTag$1),d=c[symToStringTag$1];try{c[symToStringTag$1]=void 0;var p=!0}catch{}var h=nativeObjectToString$1.call(c);return p&&(u?c[symToStringTag$1]=d:delete c[symToStringTag$1]),h}var _getRawTag=getRawTag$1,objectProto$c=Object.prototype,nativeObjectToString=objectProto$c.toString;function objectToString$1(c){return nativeObjectToString.call(c)}var _objectToString=objectToString$1,Symbol$4=_Symbol,getRawTag=_getRawTag,objectToString=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$4?Symbol$4.toStringTag:void 0;function baseGetTag$6(c){return null==c?void 0===c?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(c)?getRawTag(c):objectToString(c)}var _baseGetTag=baseGetTag$6;function isObjectLike$7(c){return null!=c&&"object"==typeof c}var isObjectLike_1=isObjectLike$7,baseGetTag$5=_baseGetTag,isObjectLike$6=isObjectLike_1,symbolTag$2="[object Symbol]";function isSymbol$3(c){return"symbol"==typeof c||isObjectLike$6(c)&&baseGetTag$5(c)==symbolTag$2}var isSymbol_1=isSymbol$3,Symbol$3=_Symbol,arrayMap$1=_arrayMap,isArray$6=isArray_1,isSymbol$2=isSymbol_1,symbolProto$1=Symbol$3?Symbol$3.prototype:void 0,symbolToString=symbolProto$1?symbolProto$1.toString:void 0;function baseToString$2(c){if("string"==typeof c)return c;if(isArray$6(c))return arrayMap$1(c,baseToString$2)+"";if(isSymbol$2(c))return symbolToString?symbolToString.call(c):"";var u=c+"";return"0"==u&&1/c==-1/0?"-0":u}var _baseToString=baseToString$2,reWhitespace=/\s/;function trimmedEndIndex$1(c){for(var u=c.length;u--&&reWhitespace.test(c.charAt(u)););return u}var _trimmedEndIndex=trimmedEndIndex$1,trimmedEndIndex=_trimmedEndIndex,reTrimStart=/^\s+/;function baseTrim$1(c){return c&&c.slice(0,trimmedEndIndex(c)+1).replace(reTrimStart,"")}var _baseTrim=baseTrim$1;function baseSlice$2(c,u,d){var p=-1,h=c.length;u<0&&(u=-u>h?0:h+u),(d=d>
129h?h:d)<0&&(d+=h),h=u>d?0:d-u>>>0,u>>>=0;for(var f=Array(h);++p<h;)f[p]=c[p+u];return f}var _baseSlice=baseSlice$2,baseSlice$1=_baseSlice;function castSlice$1(c,u,d){var p=c.length;return d=void 0===d?p:d,!u&&d>=p?c:baseSlice$1(c,u,d)}var _castSlice=castSlice$1;function baseFindIndex$1(c,u,d,p){for(var h=c.length,f=d+(p?1:-1);p?f--:++f<h;)if(u(c[f],f,c))return f;return -1}var _baseFindIndex=baseFindIndex$1;function baseIsNaN$1(c){return c!=c}var _baseIsNaN=baseIsNaN$1;function strictIndexOf$1(c,u,d){for(var p=d-1,h=c.length;++p<h;)if(c[p]===u)return p;return -1}var _strictIndexOf=strictIndexOf$1,baseFindIndex=_baseFindIndex,baseIsNaN=_baseIsNaN,strictIndexOf=_strictIndexOf;function baseIndexOf$2(c,u,d){return u==u?strictIndexOf(c,u,d):baseFindIndex(c,baseIsNaN,d)}var _baseIndexOf=baseIndexOf$2,baseIndexOf$1=_baseIndexOf;function charsEndIndex$1(c,u){for(var d=c.length;d--&&baseIndexOf$1(u,c[d],0)>-1;);return d}var _charsEndIndex=charsEndIndex$1,baseIndexOf=_baseIndexOf;function charsStartIndex$1(c,u){for(var d=-1,p=c.length;++d<p&&baseIndexOf(u,c[d],0)>-1;);return d}var _charsStartIndex=charsStartIndex$1;function asciiToArray$1(c){return c.split("")}var _asciiToArray=asciiToArray$1,rsAstralRange$1="\\ud800-\\udfff",rsComboMarksRange$1="\\u0300-\\u036f",reComboHalfMarksRange$1="\\ufe20-\\ufe2f",rsComboSymbolsRange$1="\\u20d0-\\u20ff",rsComboRange$1=rsComboMarksRange$1+reComboHalfMarksRange$1+rsComboSymbolsRange$1,rsVarRange$1="\\ufe0e\\ufe0f",rsZWJ$1="\\u200d",reHasUnicode=RegExp("["+rsZWJ$1+rsAstralRange$1+rsComboRange$1+rsVarRange$1+"]");function hasUnicode$1(c){return reHasUnicode.test(c)}var _hasUnicode=hasUnicode$1,rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsVarRange="\\ufe0e\\ufe0f",rsAstral="["+rsAstralRange+"]",rsCombo="["+rsComboRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ="\\u200d",reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsSymbol="(?:"+[rsNonAstral+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")+")",reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g");function unicodeToArray$1(c){return c.match(reUnicode)||[]}var _unicodeToArray=unicodeToArray$1,asciiToArray=_asciiToArray,hasUnicode=_hasUnicode,unicodeToArray=_unicodeToArray;function stringToArray$1(c){return hasUnicode(c)?unicodeToArray(c):asciiToArray(c)}var _stringToArray=stringToArray$1,baseToString$1=_baseToString;function toString$2(c){return null==c?"":baseToString$1(c)}var toString_1=toString$2,baseToString=_baseToString,baseTrim=_baseTrim,castSlice=_castSlice,charsEndIndex=_charsEndIndex,charsStartIndex=_charsStartIndex,stringToArray=_stringToArray,toString$1=toString_1;function trim(c,u,d){if((c=toString$1(c))&&(d||void 0===u))return baseTrim(c);if(!c||!(u=baseToString(u)))return c;var p=stringToArray(c),h=stringToArray(u),f=charsStartIndex(p,h),m=charsEndIndex(p,h)+1;return castSlice(p,f,m).join("")}var trim_1=trim;let _trim=getDefaultExportFromCjs$1(trim_1);var uaParser={exports:{}};!function(c,u){!function(d){var p="function",h="undefined",f="object",m="string",g="major",v="model",y="name",b="type",S="vendor",_="version",E="architecture",T="console",w="mobile",P="tablet",A="smarttv",I="wearable",M="embedded",R="Amazon",k="Apple",x="ASUS",C="BlackBerry",O="Browser",D="Chrome",L="Firefox",N="Google",U="Huawei",F="Microsoft",B="Motorola",j="Opera",H="Samsung",V="Sharp",z="Sony",q="Xiaomi",W="Zebra",G="Facebook",K="Chromium OS",Y="Mac OS",X=function(c,u){var d={};for(var p in c)u[p]&&u[p].length%2==0?d[p]=u[p].concat(c[p]):d[p]=c[p];return d},Q=function(c){for(var u={},d=0;d<c.length;d++)u[c[d].toUpperCase()]=c[d];return u},Z=function(c,u){return typeof c===m&&-1!==J(u).indexOf(J(c))},J=function(c){return c.toLowerCase()},$=function(c,u){if(typeof c===m)return c=c.replace(/^\s\s*/,""),typeof u===h?c:c.substring(0,500)},ee=function(c,u){for(var d,h,m,g,v,y,b=0;b<u.length&&!v;){var S=u[b],_=u[b+1];for(d=h=0;d<S.length&&!v&&S[d];)if(v=S[d++].exec(c))for(m=0;m<_.length;m++)y=v[++h],typeof(g=_[m])===f&&g.length>0?2===g.length?typeof g[1]==p?this[g[0]]=g[1].call(this,y):this[g[0]]=g[1]:3===g.length?typeof g[1]!==p||g[1].exec&&g[1].test?this[g[0]]=y?y.replace(g[1],g[2]):void 0:this[g[0]]=y?g[1].call(this,y,g[2]):void 0:4===g.length&&(this[g[0]]=y?g[3].call(this,y.replace(g[1],g[2])):void 0):this[g]=y||void 0;b+=2}},et=function(c,u){for(var d in u)if(typeof u[d]===f&&u[d].length>0){for(var p=0;p<u[d].length;
vendor: 4,550 bytes, line 129
129p++)if(Z(u[d][p],c))return"?"===d?void 0:d}else if(Z(u[d],c))return"?"===d?void 0:d;return c},ei={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},en={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[_,[y,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[_,[y,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[y,_],[/opios[\/ ]+([\w\.]+)/i],[_,[y,j+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[_,[y,j+" GX"]],[/\bopr\/([\w\.]+)/i],[_,[y,j]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[_,[y,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[y,_],[/\bddg\/([\w\.]+)/i],[_,[y,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[_,[y,"UC"+O]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[_,[y,"WeChat"]],[/konqueror\/([\w\.]+)/i],[_,[y,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[_,[y,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[_,[y,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[_,[y,"Smart Lenovo "+O]],[/(avast|avg)\/([\w\.]+)/i],[[y,/(.+)/,"$1 Secure "+O],_],[/\bfocus\/([\w\.]+)/i],[_,[y,L+" Focus"]],[/\bopt\/([\w\.]+)/i],[_,[y,j+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[_,[y,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[_,[y,"Dolphin"]],[/coast\/([\w\.]+)/i],[_,[y,j+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[_,[y,"MIUI "+O]],[/fxios\/([-\w\.]+)/i],[_,[y,L]],[/\bqihu|(qi?ho?o?|360)browser/i],[[y,"360 "+O]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[y,/(.+)/,"$1 "+O],_],[/samsungbrowser\/([\w\.]+)/i],[_,[y,H+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[y,/_/g," "],_],[/metasr[\/ ]?([\d\.]+)/i],[_,[y,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[y,"Sogou Mobile"],_],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[y,_],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[y],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[y,G],_],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[y,_],[/\bgsa\/([\w\.]+) .*safari\//i],[_,[y,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[_,[y,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[_,[y,D+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[y,D+" WebView"],_],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[_,[y,"Android "+O]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[y,_],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[_,[y,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[_,y],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[y,[_,et,{"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[y,_],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[y,"Netscape"],_],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[_,[y,L+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[y,_],[/(cobalt)\/([\w\.]+)/i],[y,[_,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[E,"amd64"]],[/(ia32(?=;))/i],[[E,J]],[/((?:i[346]|x)86)[;\)]/i],[[E,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[E,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[E,"armhf"]],[/windows (ce|mobile); ppc;/i],[[E,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[E,/ower/,"",J]],[/(sun4\w)[;\)]/i],[[E,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;
vendor: 8,267 bytes, line 129
129|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[E,J]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[v,[S,H],[b,P]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[v,[S,H],[b,w]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[v,[S,k],[b,w]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[v,[S,k],[b,P]],[/(macintosh);/i],[v,[S,k]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[v,[S,V],[b,w]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[v,[S,U],[b,P]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[v,[S,U],[b,w]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[v,/_/g," "],[S,q],[b,w]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[v,/_/g," "],[S,q],[b,P]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[v,[S,"OPPO"],[b,w]],[/\b(opd2\d{3}a?) bui/i],[v,[S,"OPPO"],[b,P]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[v,[S,"Vivo"],[b,w]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[v,[S,"Realme"],[b,w]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[v,[S,B],[b,w]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[v,[S,B],[b,P]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[v,[S,"LG"],[b,P]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[v,[S,"LG"],[b,w]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[v,[S,"Lenovo"],[b,P]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[v,/_/g," "],[S,"Nokia"],[b,w]],[/(pixel c)\b/i],[v,[S,N],[b,P]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[v,[S,N],[b,w]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[v,[S,z],[b,w]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[v,"Xperia Tablet"],[S,z],[b,P]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[v,[S,"OnePlus"],[b,w]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[v,[S,R],[b,P]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[v,/(.+)/g,"Fire Phone $1"],[S,R],[b,w]],[/(playbook);[-\w\),; ]+(rim)/i],[v,S,[b,P]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[v,[S,C],[b,w]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[v,[S,x],[b,P]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[v,[S,x],[b,w]],[/(nexus 9)/i],[v,[S,"HTC"],[b,P]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[S,[v,/_/g," "],[b,w]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[v,[S,"Acer"],[b,P]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[v,[S,"Meizu"],[b,w]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[v,[S,"Ulefone"],[b,w]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[S,v,[b,w]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[S,v,[b,P]],[/(surface duo)/i],[v,[S,F],[b,P]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[v,[S,"Fairphone"],[b,w]],[/(u304aa)/i],[v,[S,"AT&T"],[b,w]],[/\bsie-(\w*)/i],[v,[S,"Siemens"],[b,w]],[/\b(rct\w+) b/i],[v,[S,"RCA"],[b,P]],[/\b(venue[\d ]{2,7}) b/i],[v,[S,"Dell"],[b,P]],[/\b(q(?:mv|ta)\w+) b/i],[v,[S,"Verizon"],[b,P]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[v,[S,"Barnes & Noble"],[b,P]],[/\b(tm\d{3}\w+) b/i],[v,[S,"NuVision"],[b,P]],[/\b(k88) b/i],[v,[S,"ZTE"],[b,P]],[/\b(nx\d{3}j) b/i],[v,[S,"ZTE"],[b,w]],[/\b(gen\d{3}) b.+49h/i],[v,[S,"Swiss"],[b,w]],[/\b(zur\d{3}) b/i],[v,[S,"Swiss"],[b,P]],[/\b((zeki)?tb.*\b) b/i],[v,[S,"Zeki"],[b,P]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[S,"Dragon Touch"],v,[b,P]],[/\b(ns-?\w{0,9}) b/i],[v,[S,"Insignia"],[b,P]],[/\b((nxa|next)-?\w{0,9}) b/i],[v,[S,"NextBook"],[b,P]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[S,"Voice"],v,[b,w]],[/\b(lvtel\-)?(v1[12]) b/i],[[S,"LvTel"],v,[b,w]],[/\b(ph-1) /i],[v,[S,"Essential"],[b,w]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[v,[S,"Envizen"],[b,P]],[/\b(trio[-\w\. ]+) b/i],[v,[S,"MachSpeed"],[b,P]],[/\btu_(1491) b/i],[v,[S,"Rotor"],[b,P]],[/(shield[\w ]+) b/i],[v,[S,"Nvidia"],[b,P]],[/(sprint) (\w+)/i],[S,v,[b,w]],[/(kin\.[onetw]{3})/i],[[v,/\./g," "],[S,F],[b,w]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[v,[S,W],[b,P]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[v,[S,W],[b,w]],[/smart-tv.+(samsung)/i],[S,[b,A]],[/hbbtv.+maple;(\d+)/i],[[v,/^/,"SmartTV"],[S,H],[b,A]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[S,"LG"],[b,A]],[/(apple) ?tv/i],[S,[v,k+" TV"],[b,A]],[/crkey/i],[[v,D+"cast"],[S,N],[b,A]],[/droid.+aft(\w+)( bui|\))/i],[v,[S,R],[b,A]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[v,[S,V],[b,A]],[/(bravia[\w ]+)( bui|\))/i],[v,[S,z],[b,A]],[/(mitv-\w{5}) bui/i],[v,[S,q],[b,A]],[/Hbbtv.*(technisat) (.*);/i],[S,v,[b,A]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[S,$],[v,$],[b,A]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[b,A]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[S,v,[b,T]],[/droid.+; (shield) bui/i],[v,[S,"Nvidia"],[b,T]],[/(playstation [345portablevi]+)/i],[v,[S,z],[b,T]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[v,[S,F],[b,T]],[/((pebble))app/i],[S,v,[b,I]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[v,[S,k],[b,I]],[/droid.+; (glass) \d/i],[v,[S,N],[b,I]],[/droid.+; (wt63?0{2,3})\)/i],[v,[S,W],[b,I]],[/(quest( \d| pro)?)/i],[v,[S,G],[b,I]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[S,[b,M]],[/(aeobc)\b/i],[v,[S,R],[b,M]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[v,[b,w]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[v,[b,P]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[b,P]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[b,w]],[/(android[-\w\. ]{0,9});.+buil/i],[v,[S,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[_,[y,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[_,[y,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[y,_],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[_,y]],os:[[/microsoft (windows) (vista|xp)/i],[y,_],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[y,[_,et,ei]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[_,et,ei],[y,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[_,/_/g,"."],[y,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[y,Y],[_,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[_,y],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[y,_],[/\(bb(10);/i],[_,[y,C]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[_,[y,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+);
129 rv:.+ gecko\/([\w\.]+)/i],[_,[y,L+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[_,[y,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[_,[y,"watchOS"]],[/crkey\/([\d\.]+)/i],[_,[y,D+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[y,K],_],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[y,_],[/(sunos) ?([\w\.\d]*)/i],[[y,"Solaris"],_],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[y,_]]},er=function(c,u){if(typeof c===f&&(u=c,c=void 0),!(this instanceof er))return new er(c,u).getResult();var T=typeof d!==h&&d.navigator?d.navigator:void 0,A=c||(T&&T.userAgent?T.userAgent:""),I=T&&T.userAgentData?T.userAgentData:void 0,M=u?X(en,u):en,R=T&&T.userAgent==A;return this.getBrowser=function(){var c,u={};return u[y]=void 0,u[_]=void 0,ee.call(u,A,M.browser),u[g]=typeof(c=u[_])===m?c.replace(/[^\d\.]/g,"").split(".")[0]:void 0,R&&T&&T.brave&&typeof T.brave.isBrave==p&&(u[y]="Brave"),u},this.getCPU=function(){var c={};return c[E]=void 0,ee.call(c,A,M.cpu),c},this.getDevice=function(){var c={};return c[S]=void 0,c[v]=void 0,c[b]=void 0,ee.call(c,A,M.device),R&&!c[b]&&I&&I.mobile&&(c[b]=w),R&&"Macintosh"==c[v]&&T&&typeof T.standalone!==h&&T.maxTouchPoints&&T.maxTouchPoints>2&&(c[v]="iPad",c[b]=P),c},this.getEngine=function(){var c={};return c[y]=void 0,c[_]=void 0,ee.call(c,A,M.engine),c},this.getOS=function(){var c={};return c[y]=void 0,c[_]=void 0,ee.call(c,A,M.os),R&&!c[y]&&I&&I.platform&&"Unknown"!=I.platform&&(c[y]=I.platform.replace(/chrome os/i,K).replace(/macos/i,Y)),c},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return A},this.setUA=function(c){return A=typeof c===m&&c.length>500?$(c,500):c,this},this.setUA(A),this};er.VERSION="1.0.38",er.BROWSER=Q([y,_,g]),er.CPU=Q([E]),er.DEVICE=Q([v,S,b,T,w,A,P,I,M]),er.ENGINE=er.OS=Q([y,_]),c.exports&&(u=c.exports=er),u.UAParser=er;var eo=typeof d!==h&&(d.jQuery||d.Zepto);if(eo&&!eo.ua){var ea=new er;eo.ua=ea.getResult(),eo.ua.get=function(){return ea.getUA()},eo.ua.set=function(c){ea.setUA(c);var u=ea.getResult();for(var d in u)eo.ua[d]=u[d]}}}("object"==typeof window?window:commonjsGlobal)}(uaParser,uaParser.exports);var uaParserExports=uaParser.exports;let UAParser=getDefaultExportFromCjs$1(uaParserExports);var eventemitter2={exports:{}};!function(c){!function(){var u=Object.hasOwnProperty,d=Array.isArray?Array.isArray:function(c){return"[object Array]"===Object.prototype.toString.call(c)},p="object"==typeof process&&"function"==typeof process.nextTick,h="function"==typeof Symbol,f="object"==typeof Reflect,m="function"==typeof setImmediate?setImmediate:setTimeout,g=h?f&&"function"==typeof Reflect.ownKeys?Reflect.ownKeys:function(c){var u=Object.getOwnPropertyNames(c);return u.push.apply(u,Object.getOwnPropertySymbols(c)),u}:Object.keys;function v(){this._events={},this._conf&&y.call(this,this._conf)}function y(c){c&&(this._conf=c,c.delimiter&&(this.delimiter=c.delimiter),void 0!==c.maxListeners&&(this._maxListeners=c.maxListeners),c.wildcard&&(this.wildcard=c.wildcard),c.newListener&&(this._newListener=c.newListener),c.removeListener&&(this._removeListener=c.removeListener),c.verboseMemoryLeak&&(this.verboseMemoryLeak=c.verboseMemoryLeak),c.ignoreErrors&&(this.ignoreErrors=c.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function b(c,u){var d="(node) warning: possible EventEmitter memory leak detected. "+c+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(d+=" Event name: "+u+"."),"u">typeof process&&process.emitWarning){var p=Error(d);p.name="MaxListenersExceededWarning",p.emitter=this,p.count=c,process.emitWarning(p)}else console.error(d),console.trace&&console.trace()}var S=function(c,u,d){var p=arguments.length;switch(p){case 0:return[];case 1:return[c];case 2:return[c,u];case 3:return[c,u,d];default:for(var h=Array(p);p--;)h[p]=arguments[p];return h}};function _(c,u){for(var d={},p=c.length,h=0;h<p;h++)d[c[h]]=h<0?u[h]:void 0;return d}function E(c,u,d){if(this._emitter=c,this._target=u,this._listeners={},this._listenersCount=0,(d.on||d.off)&&(p=d.on,h=d.off),u.addEventListener?(p=u.addEventListener,h=u.removeEventListener):u.addListener?(p=u.addListener,h=u.removeListener):u.on&&(p=u.on,h=u.off),!p&&!h)throw Error("target does not implement any known event API");if("function"!=typeof p)throw TypeError("on method must be a function");if("function"!=typeof h)throw TypeError("off method must be a function");this._on=p,this._off=h;var p,h,f=c._observers;f?f.push(this):c._observers=[this]}function T(c,d,p,h){var f=Object.assign({},d);if(!c)return f;if("object"!=typeof c)throw TypeError("options must be an object");var m,g,v,y=Object.keys(c),b=y.length;function S(c){throw Error('Invalid "'+m+'" option value'+(c?". Reason: "+c:""))}for(var _=0;_<b;_++){if(m=y[_],!u.call(d,m))throw Error('Unknown "'+m+'" option');void 0!==(g=c[m])&&(v=p[m],f[m]=v?v(g,S):g)}return f}function w(c,u){return"function"==typeof c&&c.hasOwnProperty("prototype")||u("value must be a constructor"),c}function P(c){var u="value must be type of "+c.join("|"),d=c.length,p=c[0],h=c[1];return 1===d?function(c,d){if(typeof c===p)return c;d(u)}:2===d?function(c,d){var f=typeof c;if(f===p||f===h)return c;d(u)}:function(p,h){for(var f=typeof p,m=d;m-- >0;)if(f===c[m])return p;h(u)}}Object.assign(E.prototype,{subscribe:function(c,u,d){var p=this,h=this._target,f=this._emitter,m=this._listeners,g=function(){var p=S.apply(null,arguments),m={data:p,name:u,original:c};if(d){!1!==d.call(h,m)&&f.emit.apply(f,[m.name].concat(p));return}f.emit.apply(f,[u].concat(p))};if(m[c])throw Error("Event '"+c+"' is already listening");this._listenersCount++,f._newListener&&f._removeListener&&!p._onNewListener?(this._onNewListener=function(d){d===u&&null===m[c]&&(m[c]=g,p._on.call(h,c,g))},f.on("newListener",this._onNewListener),this._onRemoveListener=function(d){d===u&&!f.hasListeners(d)&&m[c]&&(m[c]=null,p._off.call(h,c,g))},m[c]=null,f.on("removeListener",this._onRemoveListener)):(m[c]=g,p._on.call(h,c,g))},unsubscribe:function(c){var u,d,p,h=this,f=this._listeners,m=this._emitter,v=this._off,y=this._target;if(c&&"string"!=typeof c)throw TypeError("event must be a string");function b(){h._onNewListener&&(m.off("newListener",h._onNewListener),m.off("removeListener",h._onRemoveListener),h._onNewListener=null,h._onRemoveListener=null);var c=R.call(m,h);m._observers.splice(c,1)}
129if(c){if(!(u=f[c]))return;v.call(y,c,u),delete f[c],--this._listenersCount||b()}else{for(p=(d=g(f)).length;p-- >0;)c=d[p],v.call(y,c,f[c]);this._listeners={},this._listenersCount=0,b()}}});var A=P(["function"]),I=P(["object","function"]);function M(c,u,d){var p,h,f,m=0,g=new c(function(v,y,b){function S(){h&&(h=null),m&&(clearTimeout(m),m=0)}p=!(d=T(d,{timeout:0,overload:!1},{timeout:function(c,u){return("number"!=typeof(c*=1)||c<0||!Number.isFinite(c))&&u("timeout must be a positive number"),c}})).overload&&"function"==typeof c.prototype.cancel&&"function"==typeof b;var _=function(c){S(),v(c)},E=function(c){S(),y(c)};p?u(_,E,b):(h=[function(c){E(c||Error("canceled"))}],u(_,E,function(c){if(f)throw Error("Unable to subscribe on cancel event asynchronously");if("function"!=typeof c)throw TypeError("onCancel callback must be a function");h.push(c)}),f=!0),d.timeout>0&&(m=setTimeout(function(){var c=Error("timeout");c.code="ETIMEDOUT",m=0,g.cancel(c),y(c)},d.timeout))});return p||(g.cancel=function(c){if(h){for(var u=h.length,d=1;d<u;d++)h[d](c);h[0](c),h=null}}),g}function R(c){var u=this._observers;if(!u)return -1;for(var d=u.length,p=0;p<d;p++)if(u[p]._target===c)return p;return -1}function k(c,u,d,p,h){if(!d)return null;if(0===p){var f=typeof u;if("string"===f){var m,v,y=0,b=0,S=this.delimiter,_=S.length;if(-1!==(v=u.indexOf(S))){m=[,,,,,];do m[y++]=u.slice(b,v),b=v+_;while(-1!==(v=u.indexOf(S,b)))m[y++]=u.slice(b),u=m,h=y}else u=[u],h=1}else"object"===f?h=u.length:(u=[u],h=1)}var E,T,w,P,A,I,M,R=null,x=u[p],C=u[p+1];if(p===h)d._listeners&&("function"==typeof d._listeners?c&&c.push(d._listeners):c&&c.push.apply(c,d._listeners),R=[d]);else if("*"===x){for(v=(I=g(d)).length;v-- >0;)"_listeners"!==(E=I[v])&&(M=k(c,u,d[E],p+1,h))&&(R?R.push.apply(R,M):R=M);return R}else if("**"===x){for((A=p+1===h||p+2===h&&"*"===C)&&d._listeners&&(R=k(c,u,d,h,h)),v=(I=g(d)).length;v-- >0;)"_listeners"!==(E=I[v])&&("*"===E||"**"===E?(d[E]._listeners&&!A&&(M=k(c,u,d[E],h,h))&&(R?R.push.apply(R,M):R=M),M=k(c,u,d[E],p,h)):M=E===C?k(c,u,d[E],p+2,h):k(c,u,d[E],p,h),M&&(R?R.push.apply(R,M):R=M));return R}else d[x]&&(R=k(c,u,d[x],p+1,h));if((T=d["*"])&&k(c,u,T,p+1,h),w=d["**"])if(p<h)for(w._listeners&&k(c,u,w,h,h),v=(I=g(w)).length;v-- >0;)"_listeners"!==(E=I[v])&&(E===C?k(c,u,w[E],p+2,h):E===x?k(c,u,w[E],p+1,h):((P={})[E]=w[E],k(c,u,{"**":P},p+1,h)));else w._listeners?k(c,u,w,h,h):w["*"]&&w["*"]._listeners&&k(c,u,w["*"],h,h);return R}function x(c,u,d){var p,h,f=0,m=0,g=this.delimiter,v=g.length;if("string"==typeof c)if(-1!==(p=c.indexOf(g))){h=[,,,,,];do h[f++]=c.slice(m,p),m=p+v;while(-1!==(p=c.indexOf(g,m)))h[f++]=c.slice(m)}else h=[c],f=1;else h=c,f=c.length;if(f>1){for(p=0;p+1<f;p++)if("**"===h[p]&&"**"===h[p+1])return}var y,S=this.listenerTree;for(p=0;p<f;p++)if(S=S[y=h[p]]||(S[y]={}),p===f-1)return S._listeners?("function"==typeof S._listeners&&(S._listeners=[S._listeners]),d?S._listeners.unshift(u):S._listeners.push(u),!S._listeners.warned&&this._maxListeners>0&&S._listeners.length>this._maxListeners&&(S._listeners.warned=!0,b.call(this,S._listeners.length,y))):S._listeners=u,!0;return!0}function C(c,u,d,p){for(var h,f,m,v,y=g(c),b=y.length,S=c._listeners;b-- >0;)h=c[f=y[b]],m="_listeners"===f?d:d?d.concat(f):[f],v=p||"symbol"==typeof f,S&&u.push(v?m:m.join(this.delimiter)),"object"==typeof h&&C.call(this,h,u,m,v);return u}function O(c){for(var u,d,p,h=g(c),f=h.length;f-- >0;)(u=c[d=h[f]])&&(p=!0,"_listeners"===d||O(u)||delete c[d]);return p}function D(c,u,d){this.emitter=c,this.event=u,this.listener=d}function L(c,u,d){if(!0===d)f=!0;else if(!1===d)h=!0;else{if(!d||"object"!=typeof d)throw TypeError("options should be an object or true");var h=d.async,f=d.promisify,g=d.nextTick,v=d.objectify}if(h||g||f){var y=u,b=u._origin||u;if(g&&!p)throw Error("process.nextTick is not supported");void 0===f&&(f="AsyncFunction"===u.constructor.name),(u=function(){var c=arguments,u=this,d=this.event;return f?g?Promise.resolve():new Promise(function(c){m(c)}).then(function(){return u.event=d,y.apply(u,c)}):(g?process.nextTick:m)(function(){u.event=d,y.apply(u,c)})})._async=!0,u._origin=b}return[u,v?new D(this,c,u):this]}function N(c){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,y.call(this,c)}D.prototype.off=function(){return this.emitter.off(this.event,this.listener),this},N.EventEmitter2=N,N.prototype.listenTo=function(c,u,p){if("object"!=typeof c)throw TypeError("target musts be an object");var h=this;return p=T(p,{on:void 0,off:void 0,reducers:void 0},{on:A,off:A,reducers:I}),function(u){if("object"!=typeof u)throw TypeError("events must be an object");var d,f=p.reducers,m=R.call(h,c);d=-1===m?new E(h,c,p):h._observers[m];for(var v,y=g(u),b=y.length,S="function"==typeof f,_=0;_<b;_++)v=y[_],d.subscribe(v,u[v]||v,S?f:f&&f[v])}
129(d(u)?_(u):"string"==typeof u?_(u.split(/\s+/)):u),this},N.prototype.stopListeningTo=function(c,u){var d=this._observers;if(!d)return!1;var p,h=d.length,f=!1;if(c&&"object"!=typeof c)throw TypeError("target should be an object");for(;h-- >0;)p=d[h],c&&p._target!==c||(p.unsubscribe(u),f=!0);return f},N.prototype.delimiter=".",N.prototype.setMaxListeners=function(c){void 0!==c&&(this._maxListeners=c,this._conf||(this._conf={}),this._conf.maxListeners=c)},N.prototype.getMaxListeners=function(){return this._maxListeners},N.prototype.event="",N.prototype.once=function(c,u,d){return this._once(c,u,!1,d)},N.prototype.prependOnceListener=function(c,u,d){return this._once(c,u,!0,d)},N.prototype._once=function(c,u,d,p){return this._many(c,1,u,d,p)},N.prototype.many=function(c,u,d,p){return this._many(c,u,d,!1,p)},N.prototype.prependMany=function(c,u,d,p){return this._many(c,u,d,!0,p)},N.prototype._many=function(c,u,d,p,h){var f=this;if("function"!=typeof d)throw Error("many only accepts instances of Function");function m(){return 0==--u&&f.off(c,m),d.apply(this,arguments)}return m._origin=d,this._on(c,m,p,h)},N.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||v.call(this);var c,u,d,p,f,m,g=arguments[0],y=this.wildcard;if("newListener"===g&&!this._newListener&&!this._events.newListener)return!1;if(y&&(c=g,"newListener"!==g&&"removeListener"!==g&&"object"==typeof g)){if(d=g.length,h){for(p=0;p<d;p++)if("symbol"==typeof g[p]){m=!0;break}}m||(g=g.join(this.delimiter))}var b,S=arguments.length;if(this._all&&this._all.length)for(b=this._all.slice(),p=0,d=b.length;p<d;p++)switch(this.event=g,S){case 1:b[p].call(this,g);break;case 2:b[p].call(this,g,arguments[1]);break;case 3:b[p].call(this,g,arguments[1],arguments[2]);break;default:b[p].apply(this,arguments)}if(y)b=[],k.call(this,b,c,this.listenerTree,0,d);else if("function"==typeof(b=this._events[g])){switch(this.event=g,S){case 1:b.call(this);break;case 2:b.call(this,arguments[1]);break;case 3:b.call(this,arguments[1],arguments[2]);break;default:for(u=Array(S-1),f=1;f<S;f++)u[f-1]=arguments[f];b.apply(this,u)}return!0}else b&&(b=b.slice());if(b&&b.length){if(S>3)for(u=Array(S-1),f=1;f<S;f++)u[f-1]=arguments[f];for(p=0,d=b.length;p<d;p++)switch(this.event=g,S){case 1:b[p].call(this);break;case 2:b[p].call(this,arguments[1]);break;case 3:b[p].call(this,arguments[1],arguments[2]);break;default:b[p].apply(this,u)}return!0}if(!this.ignoreErrors&&!this._all&&"error"===g)throw arguments[1]instanceof Error?arguments[1]:Error("Uncaught, unspecified 'error' event.");return!!this._all},N.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||v.call(this);var c,u,d,p,f,m,g=arguments[0],y=this.wildcard;if("newListener"===g&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(y&&(c=g,"newListener"!==g&&"removeListener"!==g&&"object"==typeof g)){if(p=g.length,h){for(f=0;f<p;f++)if("symbol"==typeof g[f]){u=!0;break}}u||(g=g.join(this.delimiter))}var b,S=[],_=arguments.length;if(this._all)for(f=0,p=this._all.length;f<p;f++)switch(this.event=g,_){case 1:S.push(this._all[f].call(this,g));break;case 2:S.push(this._all[f].call(this,g,arguments[1]));break;case 3:S.push(this._all[f].call(this,g,arguments[1],arguments[2]));break;default:S.push(this._all[f].apply(this,arguments))}if(y?(b=[],k.call(this,b,c,this.listenerTree,0)):b=this._events[g],"function"==typeof b)switch(this.event=g,_){case 1:S.push(b.call(this));break;case 2:S.push(b.call(this,arguments[1]));break;case 3:S.push(b.call(this,arguments[1],arguments[2]));break;default:for(d=Array(_-1),m=1;m<_;m++)d[m-1]=arguments[m];S.push(b.apply(this,d))}else if(b&&b.length){if(b=b.slice(),_>3)for(d=Array(_-1),m=1;m<_;m++)d[m-1]=arguments[m];for(f=0,p=b.length;f<p;f++)switch(this.event=g,_){case 1:S.push(b[f].call(this));break;case 2:S.push(b[f].call(this,arguments[1]));break;case 3:S.push(b[f].call(this,arguments[1],arguments[2]));break;default:S.push(b[f].apply(this,d))}}else if(!this.ignoreErrors&&!this._all&&"error"===g)return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(S)},N.prototype.on=function(c,u,d){return this._on(c,u,!1,d)},N.prototype.prependListener=function(c,u,d){return this._on(c,u,!0,d)},N.prototype.onAny=function(c){return this._onAny(c,!1)},N.prototype.prependAny=function(c){return this._onAny(c,!0)},N.prototype.addListener=N.prototype.on,N.prototype._onAny=function(c,u){if("function"!=typeof c)throw Error("onAny only accepts instances of Function");return this._all||(this._all=[]),u?this._all.unshift(c):this._all.push(c),this},N.prototype._on=function(c,u,d,p){if("function"==typeof c)return this._onAny(c,u),this;if("function"!=typeof u)throw Error("on only accepts instances of Function");this._events||v.call(this);var h,f=this;return void 0!==p&&(u=(h=L.call(this,c,u,p))[0],f=h[1]),this._newListener&&this.emit
129("newListener",c,u),this.wildcard?x.call(this,c,u,d):this._events[c]?("function"==typeof this._events[c]&&(this._events[c]=[this._events[c]]),d?this._events[c].unshift(u):this._events[c].push(u),!this._events[c].warned&&this._maxListeners>0&&this._events[c].length>this._maxListeners&&(this._events[c].warned=!0,b.call(this,this._events[c].length,c))):this._events[c]=u,f},N.prototype.off=function(c,u){if("function"!=typeof u)throw Error("removeListener only takes instances of Function");var p,h=[];if(this.wildcard){var f="string"==typeof c?c.split(this.delimiter):c.slice();if(!(h=k.call(this,null,f,this.listenerTree,0)))return this}else{if(!this._events[c])return this;p=this._events[c],h.push({_listeners:p})}for(var m=0;m<h.length;m++){var g=h[m];if(d(p=g._listeners)){for(var v=-1,y=0,b=p.length;y<b;y++)if(p[y]===u||p[y].listener&&p[y].listener===u||p[y]._origin&&p[y]._origin===u){v=y;break}if(v<0)continue;return this.wildcard?g._listeners.splice(v,1):this._events[c].splice(v,1),0===p.length&&(this.wildcard?delete g._listeners:delete this._events[c]),this._removeListener&&this.emit("removeListener",c,u),this}(p===u||p.listener&&p.listener===u||p._origin&&p._origin===u)&&(this.wildcard?delete g._listeners:delete this._events[c],this._removeListener&&this.emit("removeListener",c,u))}return this.listenerTree&&O(this.listenerTree),this},N.prototype.offAny=function(c){var u,d=0,p=0;if(c&&this._all&&this._all.length>0){for(u=this._all,d=0,p=u.length;d<p;d++)if(c===u[d])return u.splice(d,1),this._removeListener&&this.emit("removeListenerAny",c),this}else{if(u=this._all,this._removeListener)for(d=0,p=u.length;d<p;d++)this.emit("removeListenerAny",u[d]);this._all=[]}return this},N.prototype.removeListener=N.prototype.off,N.prototype.removeAllListeners=function(c){if(void 0===c)return this._events&&v.call(this),this;if(this.wildcard){var u,d=k.call(this,null,c,this.listenerTree,0);if(!d)return this;for(u=0;u<d.length;u++)d[u]._listeners=null;this.listenerTree&&O(this.listenerTree)}else this._events&&(this._events[c]=null);return this},N.prototype.listeners=function(c){var u,d,p,h,f,m=this._events;if(void 0===c){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!m)return[];for(h=(u=g(m)).length,p=[];h-- >0;)"function"==typeof(d=m[u[h]])?p.push(d):p.push.apply(p,d);return p}if(this.wildcard){if(!(f=this.listenerTree))return[];var v=[],y="string"==typeof c?c.split(this.delimiter):c.slice();return k.call(this,v,y,f,0),v}return m&&(d=m[c])?"function"==typeof d?[d]:d:[]},N.prototype.eventNames=function(c){var u=this._events;return this.wildcard?C.call(this,this.listenerTree,[],null,c):u?g(u):[]},N.prototype.listenerCount=function(c){return this.listeners(c).length},N.prototype.hasListeners=function(c){if(this.wildcard){var u=[],d="string"==typeof c?c.split(this.delimiter):c.slice();return k.call(this,u,d,this.listenerTree,0),u.length>0}var p=this._events,h=this._all;return!!(h&&h.length||p&&(void 0===c?g(p).length:p[c]))},N.prototype.listenersAny=function(){return this._all?this._all:[]},N.prototype.waitFor=function(c,u){var d=this,p=typeof u;return"number"===p?u={timeout:u}:"function"===p&&(u={filter:u}),M((u=T(u,{timeout:0,filter:void 0,handleError:!1,Promise,overload:!1},{filter:A,Promise:w})).Promise,function(p,h,f){function m(){var f=u.filter;if(!(f&&!f.apply(d,arguments)))if(d.off(c,m),u.handleError){var g=arguments[0];g?h(g):p(S.apply(null,arguments).slice(1))}else p(S.apply(null,arguments))}f(function(){d.off(c,m)}),d._on(c,m,!1)},{timeout:u.timeout,overload:u.overload})};var U=N.prototype;Object.defineProperties(N,{defaultMaxListeners:{get:function(){return U._maxListeners},set:function(c){if("number"!=typeof c||c<0||Number.isNaN(c))throw TypeError("n must be a non-negative number");U._maxListeners=c},enumerable:!0},once:{value:function(c,u,d){return M((d=T(d,{Promise,timeout:0,overload:!1},{Promise:w})).Promise,function(d,p,h){if("function"==typeof c.addEventListener){f=function(){d(S.apply(null,arguments))},h(function(){c.removeEventListener(u,f)}),c.addEventListener(u,f,{once:!0});return}var f,m,g=function(){m&&c.removeListener("error",m),d(S.apply(null,arguments))};"error"!==u&&(m=function(d){c.removeListener(u,g),p(d)},c.once("error",m)),h(function(){m&&c.removeListener("error",m),c.removeListener(u,g)}),c.once(u,g)},{timeout:d.timeout,overload:d.overload})},writable:!0,configurable:!0}}),Object.defineProperties(U,{_maxListeners:{value:10,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),c.exports=N}()}(eventemitter2);var eventemitter2Exports=eventemitter2.exports;let EventEmitter=getDefaultExportFromCjs$1(eventemitter2Exports);function _classCallCheck$2(c,u){if(!(c instanceof u))throw TypeError("Cannot call a class as a function")}function _defineProperties$2(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function _createClass$2(c,u,d){return u&&_defineProperties$2(c.prototype,u),Object.defineProperty(c,"prototype",{writable:!1}),c}var EventDispatcher=function(){function c(){_classCallCheck$2(this,c),this.eventEmitter=new EventEmitter({wildcard:!0})}return _createClass$2(c,[{key:"on",value:function(){if((arguments.length<=0?void 0:arguments[0])==="*")this.eventEmitter.onAny(arguments.length<=1?void 0:arguments[1]);else{var c;(c=this.eventEmitter).on.apply(c,arguments)}}},{key:"off",value:function(){if((arguments.length<=0?void 0:arguments[0])==="*")this.eventEmitter.offAny(arguments.length<=1?void 0:arguments[1]);else{var c;(c=this.eventEmitter).off.apply(c,arguments)}}},{key:"once",value:function(){var c;(c=this.eventEmitter).once.apply(c,arguments)}},{key:"many",value:function(){var c;(c=this.eventEmitter).many.apply(c,arguments)}},{key:"listeners",value:function(){var c;(c=this.eventEmitter).listeners.apply(c,arguments)}},{key:"emit",value:function(){var c;(c=this.eventEmitter).emit.apply(c,arguments)}},{key:"removeAllListeners",value:function(){var c;(c=this.eventEmitter).removeAllListeners.apply(c,arguments)}}]),c}();function error(c){c.dispatcher.on("*.error",function(c){console.error(c)})}function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;function eq$2(c,u){return c===u||c!=c&&u!=u}var eq_1=eq$2,eq$1=eq_1;function assocIndexOf$4(c,u){for(var d=c.length;d--;)if(eq$1(c[d][0],u))return d;return -1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(c){var u=this.__data__,d=assocIndexOf$3(u,c);return!(d<0)&&(d==u.length-1?u.pop():splice.call(u,d,1),--this.size,!0)}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(c){var u=this.__data__,d=assocIndexOf$2(u,c);return d<0?void 0:u[d][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(c){return assocIndexOf$1(this.__data__,c)>-1}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(c,u){var d=this.__data__,p=assocIndexOf(d,c);return p<0?(++this.size,d.push([c,u])):d[p][1]=u,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$4(c){var u=-1,d=null==c?0:c.length;for(this.clear();++u<d;){var p=c[u];this.set(p[0],p[1])}}ListCache$4.prototype.clear=listCacheClear,ListCache$4.prototype.delete=listCacheDelete,ListCache$4.prototype.get=listCacheGet,ListCache$4.prototype.has=listCacheHas,ListCache$4.prototype.set=listCacheSet;var _ListCache=ListCache$4,ListCache$3=_ListCache;function stackClear$1(){this.__data__=new ListCache$3,this.size=0}var _stackClear=stackClear$1;function stackDelete$1(c){var u=this.__data__,d=u.delete(c);return this.size=u.size,d}var _stackDelete=stackDelete$1;function stackGet$1(c){return this.__data__.get(c)}var _stackGet=stackGet$1;function stackHas$1(c){return this.__data__.has(c)}var _stackHas=stackHas$1;function isObject$5(c){var u=typeof c;return null!=c&&("object"==u||"function"==u)}var isObject_1=isObject$5,baseGetTag$4=_baseGetTag,isObject$4=isObject_1,asyncTag="[object AsyncFunction]",funcTag$2="[object Function]",genTag$1="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$2(c){if(!isObject$4(c))return!1;var u=baseGetTag$4(c);return u==funcTag$2||u==genTag$1||u==asyncTag||u==proxyTag}var isFunction_1=isFunction$2,root$6=_root,coreJsData$1=root$6["__core-js_shared__"],_coreJsData=coreJsData$1,coreJsData=_coreJsData,maskSrcKey=function(){var c=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");
vendor: 9,495 bytes, line 129
129return c?"Symbol(src)_1."+c:""}();function isMasked$1(c){return!!maskSrcKey&&maskSrcKey in c}var _isMasked=isMasked$1,funcProto$2=Function.prototype,funcToString$2=funcProto$2.toString;function toSource$2(c){if(null!=c){try{return funcToString$2.call(c)}catch{}try{return c+""}catch{}}return""}var _toSource=toSource$2,isFunction$1=isFunction_1,isMasked=_isMasked,isObject$3=isObject_1,toSource$1=_toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto$1=Function.prototype,objectProto$b=Object.prototype,funcToString$1=funcProto$1.toString,hasOwnProperty$9=objectProto$b.hasOwnProperty,reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$9).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(c){return!(!isObject$3(c)||isMasked(c))&&(isFunction$1(c)?reIsNative:reIsHostCtor).test(toSource$1(c))}var _baseIsNative=baseIsNative$1;function getValue$1(c,u){return null==c?void 0:c[u]}var _getValue=getValue$1,baseIsNative=_baseIsNative,getValue=_getValue;function getNative$7(c,u){var d=getValue(c,u);return baseIsNative(d)?d:void 0}var _getNative=getNative$7,getNative$6=_getNative,root$5=_root,Map$4=getNative$6(root$5,"Map"),_Map=Map$4,getNative$5=_getNative,nativeCreate$4=getNative$5(Object,"create"),_nativeCreate=nativeCreate$4,nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{},this.size=0}var _hashClear=hashClear$1;function hashDelete$1(c){var u=this.has(c)&&delete this.__data__[c];return this.size-=!!u,u}var _hashDelete=hashDelete$1,nativeCreate$2=_nativeCreate,HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$a=Object.prototype,hasOwnProperty$8=objectProto$a.hasOwnProperty;function hashGet$1(c){var u=this.__data__;if(nativeCreate$2){var d=u[c];return d===HASH_UNDEFINED$1?void 0:d}return hasOwnProperty$8.call(u,c)?u[c]:void 0}var _hashGet=hashGet$1,nativeCreate$1=_nativeCreate,objectProto$9=Object.prototype,hasOwnProperty$7=objectProto$9.hasOwnProperty;function hashHas$1(c){var u=this.__data__;return nativeCreate$1?void 0!==u[c]:hasOwnProperty$7.call(u,c)}var _hashHas=hashHas$1,nativeCreate=_nativeCreate,HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet$1(c,u){var d=this.__data__;return this.size+=+!this.has(c),d[c]=nativeCreate&&void 0===u?HASH_UNDEFINED:u,this}var _hashSet=hashSet$1,hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(c){var u=-1,d=null==c?0:c.length;for(this.clear();++u<d;){var p=c[u];this.set(p[0],p[1])}}Hash$1.prototype.clear=hashClear,Hash$1.prototype.delete=hashDelete,Hash$1.prototype.get=hashGet,Hash$1.prototype.has=hashHas,Hash$1.prototype.set=hashSet;var _Hash=Hash$1,Hash=_Hash,ListCache$2=_ListCache,Map$3=_Map;function mapCacheClear$1(){this.size=0,this.__data__={hash:new Hash,map:new(Map$3||ListCache$2),string:new Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(c){var u=typeof c;return"string"==u||"number"==u||"symbol"==u||"boolean"==u?"__proto__"!==c:null===c}var _isKeyable=isKeyable$1,isKeyable=_isKeyable;function getMapData$4(c,u){var d=c.__data__;return isKeyable(u)?d["string"==typeof u?"string":"hash"]:d.map}var _getMapData=getMapData$4,getMapData$3=_getMapData;function mapCacheDelete$1(c){var u=getMapData$3(this,c).delete(c);return this.size-=!!u,u}var _mapCacheDelete=mapCacheDelete$1,getMapData$2=_getMapData;function mapCacheGet$1(c){return getMapData$2(this,c).get(c)}var _mapCacheGet=mapCacheGet$1,getMapData$1=_getMapData;function mapCacheHas$1(c){return getMapData$1(this,c).has(c)}var _mapCacheHas=mapCacheHas$1,getMapData=_getMapData;function mapCacheSet$1(c,u){var d=getMapData(this,c),p=d.size;return d.set(c,u),this.size+=+(d.size!=p),this}var _mapCacheSet=mapCacheSet$1,mapCacheClear=_mapCacheClear,mapCacheDelete=_mapCacheDelete,mapCacheGet=_mapCacheGet,mapCacheHas=_mapCacheHas,mapCacheSet=_mapCacheSet;function MapCache$2(c){var u=-1,d=null==c?0:c.length;for(this.clear();++u<d;){var p=c[u];this.set(p[0],p[1])}}MapCache$2.prototype.clear=mapCacheClear,MapCache$2.prototype.delete=mapCacheDelete,MapCache$2.prototype.get=mapCacheGet,MapCache$2.prototype.has=mapCacheHas,MapCache$2.prototype.set=mapCacheSet;var _MapCache=MapCache$2,ListCache$1=_ListCache,Map$2=_Map,MapCache$1=_MapCache,LARGE_ARRAY_SIZE=200;function stackSet$1(c,u){var d=this.__data__;if(d instanceof ListCache$1){var p=d.__data__;if(!Map$2||p.length<LARGE_ARRAY_SIZE-1)return p.push([c,u]),this.size=++d.size,this;d=this.__data__=new MapCache$1(p)}return d.set(c,u),this.size=d.size,this}var _stackSet=stackSet$1,ListCache=_ListCache,stackClear=_stackClear,stackDelete=_stackDelete,stackGet=_stackGet,stackHas=_stackHas,stackSet=_stackSet;function Stack$1(c){var u=this.__data__=new ListCache(c);this.size=u.size}Stack$1.prototype.clear=stackClear,Stack$1.prototype.delete=stackDelete,Stack$1.prototype.get=stackGet,Stack$1.prototype.has=stackHas,Stack$1.prototype.set=stackSet;var _Stack=Stack$1;function arrayEach$1(c,u){for(var d=-1,p=null==c?0:c.length;++d<p&&!1!==u(c[d],d,c););return c}var _arrayEach=arrayEach$1,getNative$4=_getNative,defineProperty$2=function(){try{var c=getNative$4(Object,"defineProperty");return c({},"",{}),c}catch{}}(),_defineProperty$2=defineProperty$2,defineProperty$1=_defineProperty$2;function baseAssignValue$2(c,u,d){"__proto__"==u&&defineProperty$1?defineProperty$1(c,u,{configurable:!0,enumerable:!0,value:d,writable:!0}):c[u]=d}var _baseAssignValue=baseAssignValue$2,baseAssignValue$1=_baseAssignValue,eq=eq_1,objectProto$8=Object.prototype,hasOwnProperty$6=objectProto$8.hasOwnProperty;function assignValue$2(c,u,d){var p=c[u];hasOwnProperty$6.call(c,u)&&eq(p,d)&&(void 0!==d||u in c)||baseAssignValue$1(c,u,d)}var _assignValue=assignValue$2,assignValue$1=_assignValue,baseAssignValue=_baseAssignValue;function copyObject$5(c,u,d,p){var h=!d;d||(d={});for(var f=-1,m=u.length;++f<m;){var g=u[f],v=p?p(d[g],c[g],g,d,c):void 0;void 0===v&&(v=c[g]),h?baseAssignValue(d,g,v):assignValue$1(d,g,v)}return d}var _copyObject=copyObject$5;function baseTimes$1(c,u){for(var d=-1,p=Array(c);++d<c;)p[d]=u(d);return p}var _baseTimes=baseTimes$1,baseGetTag$3=_baseGetTag,isObjectLike$5=isObjectLike_1,argsTag$2="[object Arguments]";function baseIsArguments$1(c){return isObjectLike$5(c)&&baseGetTag$3(c)==argsTag$2}var _baseIsArguments=baseIsArguments$1,baseIsArguments=_baseIsArguments,isObjectLike$4=isObjectLike_1,objectProto$7=Object.prototype,hasOwnProperty$5=objectProto$7.hasOwnProperty,propertyIsEnumerable$1=objectProto$7.propertyIsEnumerable,isArguments$2=baseIsArguments(function(){return arguments}())?baseIsArguments:function(c){return isObjectLike$4(c)&&hasOwnProperty$5.call(c,"callee")&&!propertyIsEnumerable$1.call(c,"callee")},isArguments_1=isArguments$2,isBuffer$2={exports:{}};function stubFalse(){return!1}var stubFalse_1=stubFalse;isBuffer$2.exports,function(c,u){var d=u&&!u.nodeType&&u,p=d&&c&&!c.nodeType&&c,h=p&&p.exports===d?_root.Buffer:void 0;c.exports=(h?h.isBuffer:void 0)||stubFalse_1}(isBuffer$2,isBuffer$2.exports);var isBufferExports=isBuffer$2.exports,MAX_SAFE_INTEGER$1=0x1fffffffffffff,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex$1(c,u){var d=typeof c;return!!(u=u??MAX_SAFE_INTEGER$1)&&("number"==d||"symbol"!=d&&reIsUint.test(c))&&c>-1&&c%1==0&&c<u}var _isIndex=isIndex$1,MAX_SAFE_INTEGER=0x1fffffffffffff;function isLength$2(c){return"number"==typeof c&&c>-1&&c%1==0&&c<=MAX_SAFE_INTEGER}var isLength_1=isLength$2,baseGetTag$2=_baseGetTag,isLength$1=isLength_1,isObjectLike$3=isObjectLike_1,argsTag$1="[object Arguments]",arrayTag$1="[object Array]",boolTag$2="[object Boolean]",dateTag$2="[object Date]",errorTag$1="[object Error]",funcTag$1="[object Function]",mapTag$4="[object Map]",numberTag$2="[object Number]",objectTag$3="[object Object]",regexpTag$2="[object RegExp]",setTag$4="[object Set]",stringTag$2="[object String]",weakMapTag$2="[object WeakMap]",arrayBufferTag$2="[object ArrayBuffer]",dataViewTag$3="[object DataView]",float32Tag$2="[object Float32Array]",float64Tag$2="[object Float64Array]",int8Tag$2="[object Int8Array]",int16Tag$2="[object Int16Array]",int32Tag$2="[object Int32Array]",uint8Tag$2="[object Uint8Array]",uint8ClampedTag$2="[object Uint8ClampedArray]",uint16Tag$2="[object Uint16Array]",uint32Tag$2="[object Uint32Array]",typedArrayTags={};function baseIsTypedArray$1(c){return isObjectLike$3(c)&&isLength$1(c.length)&&!!typedArrayTags[baseGetTag$2(c)]}typedArrayTags[float32Tag$2]=typedArrayTags[float64Tag$2]=typedArrayTags[int8Tag$2]=typedArrayTags[int16Tag$2]=typedArrayTags[int32Tag$2]=typedArrayTags[uint8Tag$2]=typedArrayTags[uint8ClampedTag$2]=typedArrayTags[uint16Tag$2]=typedArrayTags[uint32Tag$2]=!0,typedArrayTags[argsTag$1]=typedArrayTags[arrayTag$1]=typedArrayTags[arrayBufferTag$2]=typedArrayTags[boolTag$2]=typedArrayTags[dataViewTag$3]=typedArrayTags[dateTag$2]=typedArrayTags[errorTag$1]=typedArrayTags[funcTag$1]=typedArrayTags[mapTag$4]=typedArrayTags[numberTag$2]=typedArrayTags[objectTag$3]=typedArrayTags[regexpTag$2]=typedArrayTags[setTag$4]=typedArrayTags[stringTag$2]=typedArrayTags[weakMapTag$2]=!1;var _baseIsTypedArray=baseIsTypedArray$1;function baseUnary$3(c){return function(u){return c(u)}}var _baseUnary=baseUnary$3,_nodeUtil={exports:{}};_nodeUtil.exports,function(c,u){var d=u&&!u.nodeType&&u,p=d&&c&&!c.nodeType&&c,h=p&&p.exports===d&&_freeGlobal.process;c.exports=function(){try{return p&&p.require&&p.require("util").t
129ypes||h&&h.binding&&h.binding("util")}catch{}}()}(_nodeUtil,_nodeUtil.exports);var _nodeUtilExports=_nodeUtil.exports,baseIsTypedArray=_baseIsTypedArray,baseUnary$2=_baseUnary,nodeUtil$2=_nodeUtilExports,nodeIsTypedArray=nodeUtil$2&&nodeUtil$2.isTypedArray,isTypedArray$1=nodeIsTypedArray?baseUnary$2(nodeIsTypedArray):baseIsTypedArray,isTypedArray_1=isTypedArray$1,baseTimes=_baseTimes,isArguments$1=isArguments_1,isArray$5=isArray_1,isBuffer$1=isBufferExports,isIndex=_isIndex,isTypedArray=isTypedArray_1,objectProto$6=Object.prototype,hasOwnProperty$4=objectProto$6.hasOwnProperty;function arrayLikeKeys$2(c,u){var d=isArray$5(c),p=!d&&isArguments$1(c),h=!d&&!p&&isBuffer$1(c),f=!d&&!p&&!h&&isTypedArray(c),m=d||p||h||f,g=m?baseTimes(c.length,String):[],v=g.length;for(var y in c)(u||hasOwnProperty$4.call(c,y))&&!(m&&("length"==y||h&&("offset"==y||"parent"==y)||f&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||isIndex(y,v)))&&g.push(y);return g}var _arrayLikeKeys=arrayLikeKeys$2,objectProto$5=Object.prototype;function isPrototype$3(c){var u=c&&c.constructor;return c===("function"==typeof u&&u.prototype||objectProto$5)}var _isPrototype=isPrototype$3;function overArg$2(c,u){return function(d){return c(u(d))}}var _overArg=overArg$2,overArg$1=_overArg,nativeKeys$1=overArg$1(Object.keys,Object),_nativeKeys=nativeKeys$1,isPrototype$2=_isPrototype,nativeKeys=_nativeKeys,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty;function baseKeys$1(c){if(!isPrototype$2(c))return nativeKeys(c);var u=[];for(var d in Object(c))hasOwnProperty$3.call(c,d)&&"constructor"!=d&&u.push(d);return u}var _baseKeys=baseKeys$1,isFunction=isFunction_1,isLength=isLength_1;function isArrayLike$2(c){return null!=c&&isLength(c.length)&&!isFunction(c)}var isArrayLike_1=isArrayLike$2,arrayLikeKeys$1=_arrayLikeKeys,baseKeys=_baseKeys,isArrayLike$1=isArrayLike_1;function keys$3(c){return isArrayLike$1(c)?arrayLikeKeys$1(c):baseKeys(c)}var keys_1=keys$3,copyObject$4=_copyObject,keys$2=keys_1;function baseAssign$1(c,u){return c&&copyObject$4(u,keys$2(u),c)}var _baseAssign=baseAssign$1;function nativeKeysIn$1(c){var u=[];if(null!=c)for(var d in Object(c))u.push(d);return u}var _nativeKeysIn=nativeKeysIn$1,isObject$2=isObject_1,isPrototype$1=_isPrototype,nativeKeysIn=_nativeKeysIn,objectProto$3=Object.prototype,hasOwnProperty$2=objectProto$3.hasOwnProperty;function baseKeysIn$1(c){if(!isObject$2(c))return nativeKeysIn(c);var u=isPrototype$1(c),d=[];for(var p in c)"constructor"==p&&(u||!hasOwnProperty$2.call(c,p))||d.push(p);return d}var _baseKeysIn=baseKeysIn$1,arrayLikeKeys=_arrayLikeKeys,baseKeysIn=_baseKeysIn,isArrayLike=isArrayLike_1;function keysIn$3(c){return isArrayLike(c)?arrayLikeKeys(c,!0):baseKeysIn(c)}var keysIn_1=keysIn$3,copyObject$3=_copyObject,keysIn$2=keysIn_1;function baseAssignIn$1(c,u){return c&&copyObject$3(u,keysIn$2(u),c)}var _baseAssignIn=baseAssignIn$1,_cloneBuffer={exports:{}};_cloneBuffer.exports,function(c,u){var d=u&&!u.nodeType&&u,p=d&&c&&!c.nodeType&&c,h=p&&p.exports===d?_root.Buffer:void 0,f=h?h.allocUnsafe:void 0;c.exports=function(c,u){if(u)return c.slice();var d=c.length,p=f?f(d):new c.constructor(d);return c.copy(p),p}}(_cloneBuffer,_cloneBuffer.exports);var _cloneBufferExports=_cloneBuffer.exports;function copyArray$1(c,u){var d=-1,p=c.length;for(u||(u=Array(p));++d<p;)u[d]=c[d];return u}var _copyArray=copyArray$1;function arrayFilter$1(c,u){for(var d=-1,p=null==c?0:c.length,h=0,f=[];++d<p;){var m=c[d];u(m,d,c)&&(f[h++]=m)}return f}var _arrayFilter=arrayFilter$1;function stubArray$2(){return[]}var stubArray_1=stubArray$2,arrayFilter=_arrayFilter,stubArray$1=stubArray_1,objectProto$2=Object.prototype,propertyIsEnumerable=objectProto$2.propertyIsEnumerable,nativeGetSymbols$1=Object.getOwnPropertySymbols,getSymbols$3=nativeGetSymbols$1?function(c){return null==c?[]:arrayFilter(nativeGetSymbols$1(c=Object(c)),function(u){return propertyIsEnumerable.call(c,u)})}:stubArray$1,_getSymbols=getSymbols$3,copyObject$2=_copyObject,getSymbols$2=_getSymbols;function copySymbols$1(c,u){return copyObject$2(c,getSymbols$2(c),u)}var _copySymbols=copySymbols$1;function arrayPush$3(c,u){for(var d=-1,p=u.length,h=c.length;++d<p;)c[h+d]=u[d];return c}var _arrayPush=arrayPush$3,overArg=_overArg,getPrototype$3=overArg(Object.getPrototypeOf,Object),_getPrototype=getPrototype$3,arrayPush$2=_arrayPush,getPrototype$2=_getPrototype,getSymbols$
vendor: 4,006 bytes, line 129
1291=_getSymbols,stubArray=stubArray_1,nativeGetSymbols=Object.getOwnPropertySymbols,getSymbolsIn$2=nativeGetSymbols?function(c){for(var u=[];c;)arrayPush$2(u,getSymbols$1(c)),c=getPrototype$2(c);return u}:stubArray,_getSymbolsIn=getSymbolsIn$2,copyObject$1=_copyObject,getSymbolsIn$1=_getSymbolsIn;function copySymbolsIn$1(c,u){return copyObject$1(c,getSymbolsIn$1(c),u)}var _copySymbolsIn=copySymbolsIn$1,arrayPush$1=_arrayPush,isArray$4=isArray_1;function baseGetAllKeys$2(c,u,d){var p=u(c);return isArray$4(c)?p:arrayPush$1(p,d(c))}var _baseGetAllKeys=baseGetAllKeys$2,baseGetAllKeys$1=_baseGetAllKeys,getSymbols=_getSymbols,keys$1=keys_1;function getAllKeys$1(c){return baseGetAllKeys$1(c,keys$1,getSymbols)}var _getAllKeys=getAllKeys$1,baseGetAllKeys=_baseGetAllKeys,getSymbolsIn=_getSymbolsIn,keysIn$1=keysIn_1;function getAllKeysIn$2(c){return baseGetAllKeys(c,keysIn$1,getSymbolsIn)}var _getAllKeysIn=getAllKeysIn$2,getNative$3=_getNative,root$4=_root,DataView$2=getNative$3(root$4,"DataView"),_DataView=DataView$2,getNative$2=_getNative,root$3=_root,Promise$2=getNative$2(root$3,"Promise"),_Promise=Promise$2,getNative$1=_getNative,root$2=_root,Set$2=getNative$1(root$2,"Set"),_Set=Set$2,getNative=_getNative,root$1=_root,WeakMap$2=getNative(root$1,"WeakMap"),_WeakMap=WeakMap$2,DataView$1=_DataView,Map$1=_Map,Promise$1=_Promise,Set$1=_Set,WeakMap$1=_WeakMap,baseGetTag$1=_baseGetTag,toSource=_toSource,mapTag$3="[object Map]",objectTag$2="[object Object]",promiseTag="[object Promise]",setTag$3="[object Set]",weakMapTag$1="[object WeakMap]",dataViewTag$2="[object DataView]",dataViewCtorString=toSource(DataView$1),mapCtorString=toSource(Map$1),promiseCtorString=toSource(Promise$1),setCtorString=toSource(Set$1),weakMapCtorString=toSource(WeakMap$1),getTag$3=baseGetTag$1;(DataView$1&&getTag$3(new DataView$1(new ArrayBuffer(1)))!=dataViewTag$2||Map$1&&getTag$3(new Map$1)!=mapTag$3||Promise$1&&getTag$3(Promise$1.resolve())!=promiseTag||Set$1&&getTag$3(new Set$1)!=setTag$3||WeakMap$1&&getTag$3(new WeakMap$1)!=weakMapTag$1)&&(getTag$3=function(c){var u=baseGetTag$1(c),d=u==objectTag$2?c.constructor:void 0,p=d?toSource(d):"";if(p)switch(p){case dataViewCtorString:return dataViewTag$2;case mapCtorString:return mapTag$3;case promiseCtorString:return promiseTag;case setCtorString:return setTag$3;case weakMapCtorString:return weakMapTag$1}return u});var _getTag=getTag$3,objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function initCloneArray$1(c){var u=c.length,d=new c.constructor(u);return u&&"string"==typeof c[0]&&hasOwnProperty$1.call(c,"index")&&(d.index=c.index,d.input=c.input),d}var _initCloneArray=initCloneArray$1,root=_root,Uint8Array$2=root.Uint8Array,_Uint8Array=Uint8Array$2,Uint8Array$1=_Uint8Array;function cloneArrayBuffer$3(c){var u=new c.constructor(c.byteLength);return new Uint8Array$1(u).set(new Uint8Array$1(c)),u}var _cloneArrayBuffer=cloneArrayBuffer$3,cloneArrayBuffer$2=_cloneArrayBuffer;function cloneDataView$1(c,u){var d=u?cloneArrayBuffer$2(c.buffer):c.buffer;return new c.constructor(d,c.byteOffset,c.byteLength)}var _cloneDataView=cloneDataView$1,reFlags=/\w*$/;function cloneRegExp$1(c){var u=new c.constructor(c.source,reFlags.exec(c));return u.lastIndex=c.lastIndex,u}var _cloneRegExp=cloneRegExp$1,Symbol$2=_Symbol,symbolProto=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function cloneSymbol$1(c){return symbolValueOf?Object(symbolValueOf.call(c)):{}}var _cloneSymbol=cloneSymbol$1,cloneArrayBuffer$1=_cloneArrayBuffer;function cloneTypedArray$1(c,u){var d=u?cloneArrayBuffer$1(c.buffer):c.buffer;return new c.constructor(d,c.byteOffset,c.length)}var _cloneTypedArray=cloneTypedArray$1,cloneArrayBuffer=_cloneArrayBuffer,cloneDataView=_cloneDataView,cloneRegExp=_cloneRegExp,cloneSymbol=_cloneSymbol,cloneTypedArray=_cloneTypedArray,boolTag$1="[object Boolean]",dateTag$1="[object Date]",mapTag$2="[object Map]",numberTag$1="[object Number]",regexpTag$1="[object RegExp]",setTag$2
vendor: 4,170 bytes, line 129
129="[object Set]",stringTag$1="[object String]",symbolTag$1="[object Symbol]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag$1="[object Float32Array]",float64Tag$1="[object Float64Array]",int8Tag$1="[object Int8Array]",int16Tag$1="[object Int16Array]",int32Tag$1="[object Int32Array]",uint8Tag$1="[object Uint8Array]",uint8ClampedTag$1="[object Uint8ClampedArray]",uint16Tag$1="[object Uint16Array]",uint32Tag$1="[object Uint32Array]";function initCloneByTag$1(c,u,d){var p=c.constructor;switch(u){case arrayBufferTag$1:return cloneArrayBuffer(c);case boolTag$1:case dateTag$1:return new p(+c);case dataViewTag$1:return cloneDataView(c,d);case float32Tag$1:case float64Tag$1:case int8Tag$1:case int16Tag$1:case int32Tag$1:case uint8Tag$1:case uint8ClampedTag$1:case uint16Tag$1:case uint32Tag$1:return cloneTypedArray(c,d);case mapTag$2:return new p;case numberTag$1:case stringTag$1:return new p(c);case regexpTag$1:return cloneRegExp(c);case setTag$2:return new p;case symbolTag$1:return cloneSymbol(c)}}var _initCloneByTag=initCloneByTag$1,isObject$1=isObject_1,objectCreate=Object.create,baseCreate$1=function(){function c(){}return function(u){if(!isObject$1(u))return{};if(objectCreate)return objectCreate(u);c.prototype=u;var d=new c;return c.prototype=void 0,d}}(),_baseCreate=baseCreate$1,baseCreate=_baseCreate,getPrototype$1=_getPrototype,isPrototype=_isPrototype;function initCloneObject$1(c){return"function"!=typeof c.constructor||isPrototype(c)?{}:baseCreate(getPrototype$1(c))}var _initCloneObject=initCloneObject$1,getTag$2=_getTag,isObjectLike$2=isObjectLike_1,mapTag$1="[object Map]";function baseIsMap$1(c){return isObjectLike$2(c)&&getTag$2(c)==mapTag$1}var _baseIsMap=baseIsMap$1,baseIsMap=_baseIsMap,baseUnary$1=_baseUnary,nodeUtil$1=_nodeUtilExports,nodeIsMap=nodeUtil$1&&nodeUtil$1.isMap,isMap$1=nodeIsMap?baseUnary$1(nodeIsMap):baseIsMap,isMap_1=isMap$1,getTag$1=_getTag,isObjectLike$1=isObjectLike_1,setTag$1="[object Set]";function baseIsSet$1(c){return isObjectLike$1(c)&&getTag$1(c)==setTag$1}var _baseIsSet=baseIsSet$1,baseIsSet=_baseIsSet,baseUnary=_baseUnary,nodeUtil=_nodeUtilExports,nodeIsSet=nodeUtil&&nodeUtil.isSet,isSet$1=nodeIsSet?baseUnary(nodeIsSet):baseIsSet,isSet_1=isSet$1,Stack=_Stack,arrayEach=_arrayEach,assignValue=_assignValue,baseAssign=_baseAssign,baseAssignIn=_baseAssignIn,cloneBuffer=_cloneBufferExports,copyArray=_copyArray,copySymbols=_copySymbols,copySymbolsIn=_copySymbolsIn,getAllKeys=_getAllKeys,getAllKeysIn$1=_getAllKeysIn,getTag=_getTag,initCloneArray=_initCloneArray,initCloneByTag=_initCloneByTag,initCloneObject=_initCloneObject,isArray$3=isArray_1,isBuffer=isBufferExports,isMap=isMap_1,isObject=isObject_1,isSet=isSet_1,keys=keys_1,keysIn=keysIn_1,CLONE_DEEP_FLAG$1=1,CLONE_FLAT_FLAG$1=2,CLONE_SYMBOLS_FLAG$1=4,argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag="[object Map]",numberTag="[object Number]",objectTag$1="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",cloneableTags={};function baseClone$1(c,u,d,p,h,f){var m,g=u&CLONE_DEEP_FLAG$1,v=u&CLONE_FLAT_FLAG$1,y=u&CLONE_SYMBOLS_FLAG$1;if(d&&(m=h?d(c,p,h,f):d(c)),void 0!==m)return m;if(!isObject(c))return c;var b=isArray$3(c);if(b){if(m=initCloneArray(c),!g)return copyArray(c,m)}else{var S=getTag(c),_=S==funcTag||S==genTag;if(isBuffer(c))return cloneBuffer(c,g);if(S==objectTag$1||S==argsTag||_&&!h){if(m=v||_?{}:initCloneObject(c),!g)return v?copySymbolsIn(c,baseAssignIn(m,c)):copySymbols(c,baseAssign(m,c))}else{if(!cloneableTags[S])return h?c:{};m=initCloneByTag(c,S,g)}}
129f||(f=new Stack);var E=f.get(c);if(E)return E;f.set(c,m),isSet(c)?c.forEach(function(p){m.add(baseClone$1(p,u,d,p,c,f))}):isMap(c)&&c.forEach(function(p,h){m.set(h,baseClone$1(p,u,d,h,c,f))});var T=y?v?getAllKeysIn$1:getAllKeys:v?keysIn:keys,w=b?void 0:T(c);return arrayEach(w||c,function(p,h){w&&(p=c[h=p]),assignValue(m,h,baseClone$1(p,u,d,h,c,f))}),m}cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[dataViewTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag]=cloneableTags[numberTag]=cloneableTags[objectTag$1]=cloneableTags[regexpTag]=cloneableTags[setTag]=cloneableTags[stringTag]=cloneableTags[symbolTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0,cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=!1;var _baseClone=baseClone$1,isArray$2=isArray_1,isSymbol$1=isSymbol_1,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey$1(c,u){if(isArray$2(c))return!1;var d=typeof c;return!!("number"==d||"symbol"==d||"boolean"==d||null==c||isSymbol$1(c))||reIsPlainProp.test(c)||!reIsDeepProp.test(c)||null!=u&&c in Object(u)}var _isKey=isKey$1,MapCache=_MapCache,FUNC_ERROR_TEXT="Expected a function";function memoize$1(c,u){if("function"!=typeof c||null!=u&&"function"!=typeof u)throw TypeError(FUNC_ERROR_TEXT);var d=function(){var p=arguments,h=u?u.apply(this,p):p[0],f=d.cache;if(f.has(h))return f.get(h);var m=c.apply(this,p);return d.cache=f.set(h,m)||f,m};return d.cache=new(memoize$1.Cache||MapCache),d}memoize$1.Cache=MapCache;var memoize_1=memoize$1,memoize=memoize_1,MAX_MEMOIZE_SIZE=500;function memoizeCapped$1(c){var u=memoize(c,function(c){return d.size===MAX_MEMOIZE_SIZE&&d.clear(),c}),d=u.cache;return u}var _memoizeCapped=memoizeCapped$1,memoizeCapped=_memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath$1=memoizeCapped(function(c){var u=[];return 46===c.charCodeAt(0)&&u.push(""),c.replace(rePropName,function(c,d,p,h){u.push(p?h.replace(reEscapeChar,"$1"):d||c)}),u}),_stringToPath=stringToPath$1,isArray$1=isArray_1,isKey=_isKey,stringToPath=_stringToPath,toString=toString_1;function castPath$3(c,u){return isArray$1(c)?c:isKey(c,u)?[c]:stringToPath(toString(c))}var _castPath=castPath$3;function last$1(c){var u=null==c?0:c.length;return u?c[u-1]:void 0}var last_1=last$1,isSymbol=isSymbol_1;function toKey$2(c){if("string"==typeof c||isSymbol(c))return c;var u=c+"";return"0"==u&&1/c==-1/0?"-0":u}var _toKey=toKey$2,castPath$2=_castPath,toKey$1=_toKey;function baseGet$1(c,u){u=castPath$2(u,c);for(var d=0,p=u.length;null!=c&&d<p;)c=c[toKey$1(u[d++])];return d&&d==p?c:void 0}var _baseGet=baseGet$1,baseGet=_baseGet,baseSlice=_baseSlice;function parent$1(c,u){return u.length<2?c:baseGet(c,baseSlice(u,0,-1))}var _parent=parent$1,castPath$1=_castPath,last=last_1,parent=_parent,toKey=_toKey;function baseUnset$1(c,u){return u=castPath$1(u,c),null==(c=parent(c,u))||delete c[toKey(last(u))]}var _baseUnset=baseUnset$1,baseGetTag=_baseGetTag,getPrototype=_getPrototype,isObjectLike=isObjectLike_1,objectTag="[object Object]",funcProto=Function.prototype,objectProto=Object.prototype,funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject$1(c){if(!isObjectLike(c)||baseGetTag(c)!=objectTag)return!1;var u=getPrototype(c);if(null===u)return!0;var d=hasOwnProperty.call(u,"constructor")&&u.constructor;return"function"==typeof d&&d instanceof d&&funcToString.call(d)==objectCtorString}var isPlainObject_1=isPlainObject$1,isPlainObject=isPlainObject_1;function customOmitClone$1(c){return isPlainObject(c)?void 0:c}var _customOmitClone=customOmitClone$1,Symbol$1=_Symbol,isArguments=isArguments_1,isArray=isArray_1,spreadableSymbol=Symbol$1?Symbol$1.isConcatSpreadable:void 0;function isFlattenable$1(c){return isArray(c)||isArguments(c)||!!(spreadableSymbol&&c&&c[spreadableSymbol])}var _isFlattenable=isFlattenable$1,arrayPush=_arrayPush,isFlattenable=_isFlattenable;function baseFlatten$1(c,u,d,p,h){var f=-1,m=c.length;for(d||(d=isFlattenable),h||(h=[]);++f<m;){var g=c[f];u>0&&d(g)?u>1?baseFlatten$1(g,u-1,d,p,h):arrayPush(h,g):p||(h[h.length]=g)}return h}var _baseFlatten=baseFlatten$1,baseFlatten=_baseFlatten;function flatten$1(c){return(null==c?0:c.length)?baseFlatten(c,1):[]}var flatten_1=flatten$1;function apply$1(c,u,d){switch(d.length){case 0:return c.call(u);case 1:return c.call(u,d[0]);case 2:return c.call(u,d[0],d[1]);case 3:return c.call(u,d[0],d[1],d[2])}return c.apply(u,d)}var _apply=apply$1,apply=_apply,nativeMax=Math.max;function overRest$1(c,u,d){return u=nativeMax(void 0===u?c.length-1:u,0),function(){for(var p=arguments,h=-1,f=nativeMax(p.length-u,0),m=Array(f);++h<f;)m[h]=p[u+h];h=-1;for(var g=Array(u+1);++h<u;)g[h]=p[h];return g[u]=d(m),apply(c,this,g)}}var _overRest=overRest$1;function constant$1(c){return function(){return c}}var constant_1=constant$1;function identity$1(c){return c}var identity_1=identity$1,constant=constant_1,defineProperty=_defineProperty$2,identity=identity_1,baseSetToString$1=defineProperty?function(c,u){return defineProperty(c,"toString",{configurable:!0,enumerable:!1,value:constant(u),writable:!0})}:identity,_baseSetToString=baseSetToString$1,HOT_COUNT=800,HOT_SPAN=16,nativeNow=Date.now;function shortOut$1(c){var u=0,d=0;return function(){var p=nativeNow(),h=HOT_SPAN-(p-d);if(d=p,h>0){if(++u>=HOT_COUNT)return arguments[0]}else u=0;return c.apply(void 0,arguments)}}var _shortOut=shortOut$1,baseSetToString=_baseSetToString,shortOut=_shortOut,setToString$1=shortOut(baseSetToString),_setToString=setToString$1,flatten=flatten_1,overRest=_overRest,setToString=_setToString;function flatRest$1(c){return setToString(overRest(c,void 0,flatten),c+"")}var _flatRest=flatRest$1,arrayMap=_arrayMap,baseClone=_baseClone,baseUnset=_baseUnset,castPath=_castPath,copyObject=_copyObject,customOmitClone=_customOmitClone,flatRest=_flatRest,getAllKeysIn=_getAllKeysIn,CLONE_DEEP_FLAG=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG=4,omit=flatRest(function(c,u){var d={};if(null==c)return d;var p=!1;u=arrayMap(u,function(u){return u=castPath(u,c),p||(p=u.length>1),u}),copyObject(c,getAllKeysIn(c),d),p&&(d=baseClone(d,CLONE_DEEP_FLAG|CLONE_FLAT_FLAG|CLONE_SYMBOLS_FLAG,customOmitClone));for(var h=u.length;h--;)baseUnset(d,u[h]);return d}),omit_1=omit;let _omit=getDefaultExportFromCjs$1(omit_1);var serialize=function(c){return Object.keys(c).map(function(u){return void 0===c[u]?c[u]:"".concat(encodeURIComponent(u),"=").concat(encodeURIComponent(c[u]))}).filter(function(c){return void 0!==c}).join("&")};function createUrl(c){if(!c.params)return c.url;var u=c.url;u.match(/\?/)?u+="&":u.match(/\/$/)||u.match(/html?$/)?u+="?":u+="/?";var d=(u.match(/[?&][^=]+/g)||[]).map(function(c){return c.slice(1)});return(u+serialize(_omit(c.params,d))).replace(/&$/,"")}function getUrlQueryParam(c,u){if(!c||0===c.length||-1===c.indexOf("?")||!u||0===u.length)return null;var d=new URLSearchParams(c.split("?")[1]);if(d.has(u)){var p=d.get(u);if(p.length>0)return p}return null}function _slicedToArray(c,u){return _arrayWithHoles(c)||_iterableToArrayLimit(c,u)||_unsupportedIterableToArray(c,u)||_nonIterableRest()}function _nonIterableRest(){throw TypeError(`Invalid attempt to de
129structure non-iterable instance.
130In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray(c,u){if(c){if("string"==typeof c)return _arrayLikeToArray(c,u);var d=Object.prototype.toString.call(c).slice(8,-1);if("Object"===d&&c.constructor&&(d=c.constructor.name),"Map"===d||"Set"===d)return Array.from(c);if("Arguments"===d||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return _arrayLikeToArray(c,u)}}function _arrayLikeToArray(c,u){(null==u||u>c.length)&&(u=c.length);for(var d=0,p=Array(u);d<u;d++)p[d]=c[d];return p}function _iterableToArrayLimit(c,u){var d=null==c?null:"u">typeof Symbol&&c[Symbol.iterator]||c["@@iterator"];if(null!=d){var p,h,f=[],m=!0,g=!1;try{for(d=d.call(c);!(m=(p=d.next()).done)&&(f.push(p.value),!(u&&f.length===u));m=!0);}catch(c){g=!0,h=c}finally{try{m||null==d.return||d.return()}finally{if(g)throw h}}return f}}function _arrayWithHoles(c){if(Array.isArray(c))return c}function ownKeys$1(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter(function(u){return Object.getOwnPropertyDescriptor(c,u).enumerable})),d.push.apply(d,p)}return d}function _objectSpread$1(c){for(var u=1;u<arguments.length;u++){var d=null!=arguments[u]?arguments[u]:{};u%2?ownKeys$1(Object(d),!0).forEach(function(u){_defineProperty$1(c,u,d[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):ownKeys$1(Object(d)).forEach(function(u){Object.defineProperty(c,u,Object.getOwnPropertyDescriptor(d,u))})}return c}function _defineProperty$1(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}var zoids={},zoidUrls={},zoidDimensions={};function xcomponent(c){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=c,p=_objectSpread$1(_objectSpread$1({},d.options),u);function h(c){d.dispatcher.emit("view.error",{type:"fatal",message:c})}if(p.params.zoid=1,!p.playerContainer&&!d.options.viewContainer)return void h('Configuration property "playerContainer" is missing. Not able to attach the container to the DOM.');if(!p.url)return void h('Configuration property "url" is missing. Not able to attach the container to the DOM.');var f=p.tag||"ease-live";p.params.tag=f;var m=createUrl(p);d.emit("view.init",{url:m}),zoidUrls[f]=m,zoidDimensions[f]={width:p.width||"100%",height:p.height||"100%"};var g=new URL(m),v=g.hostname,y=g.protocol,b="".concat(y,"//").concat(v),S=p.createView||window.__easeLive.createEaseLiveWebBridgeHost,_=zoids[f]||S({tag:f,defaultLogLevel:"error",url:function(){return zoidUrls[f]},attributes:{iframe:{allow:"camera ".concat(b,";microphone ").concat(b,";clipboard-read ").concat(b,";clipboard-write ").concat(b,";fullscreen ").concat(b,";"),title:""}},dimensions:function(){return zoidDimensions[f]},prerenderTemplate:function(c){return c.doc.createElement("html")},autoResize:{width:!1,height:!1}});zoids[f]||(zoids[f]=_);var E,T,w=d.options.viewContainer||p.playerContainer;"string"==typeof w&&(w=document.querySelector(w));var P={};if(localStorage){var A="ease-live:".concat(c.accountId,":").concat(c.options.projectId);Object.entries(localStorage).forEach(function(c){var u=_slicedToArray(c,2),d=u[0],p=u[1];d.startsWith(A)&&(P[d.slice(A.length+1)]=p)})}var I=_({timeout:p.setupTimeout||3e4,onTimeout:function(){},onError:function(){},logLevel:p.logLevel,emit:function(c,u){var p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{id:"web-app"},h=c;if("StageClicked"===h)h="bridge.stage";else if("WebAppOnLoadEnd"===h)h="app.ready";else if("WebAppOnLoadStart"===h)h="app.loading";else if("app.deeplink"===h&&u&&u.path)return void window.open(u.path);d.emit(h,u,p)},setDispatcher:function(c){E=c},appStorage:P}),M=function(){d.emit("view.mouseenter")},R=!1;function k(c,u,d){d&&"web-app"===d.id||R||E&&E.emit(c,u||{},d)}function x(c,u){"player.ready"!==this.event&&k(this.event,c,u)}function C(c,u){k(this.event,c,u)}function O(c,u){k(this.event,c,u)}function D(c,u){k(this.event,c,u)}
130function L(c,u){"string"!=typeof c.event?console.error('bridge: appMessage data missing "event" field',c):k(c.event,c.metadata,u)}function N(c){localStorage.setItem(c.key,c.value)}function U(){return R=!0,d&&(d.off("destroy",U),d.off("destroyView",U),d.off("bridge.*",C),d.off("player.*",x),d.off("stage.*",O),d.off("app.*",D),d.off("appMessage",L),d.off("app.storage",N)),T&&(T.removeEventListener("mouseenter",M),T.remove()),I.close().then(function(){T=null,E=null,d=null,delete zoids[f]}).catch(function(){}).finally(function(){R=!1})}return I.render(w).then(function(){if(!(T=w.querySelector("div[id^=zoid-".concat(f,"]")))){var c=w.querySelector("slot");if(c&&c.name){var u=document.querySelector("div[slot^=".concat(c.name,"]"));u&&(u.style.width=p.width||"100%",u.style.height=p.height||"100%"),T=document.querySelector("div[slot^=".concat(c.name,"] > div[id^=zoid-").concat(f,"]"))}}if(T){T.addEventListener("mouseenter",M);var h=T.querySelector("iframe");h&&(h.style.pointerEvents="none");var g=!1,v=function(){g=!g,d.emit("bridge.stage",{controls:g?"visible":"hidden"}),d.emit("stage.clicked",{controls:g?"visible":"hidden"})};T.addEventListener("click",v),d.once("app.ready",function(){T&&T.removeEventListener("click",v),h&&(h.style.pointerEvents=""),h=null})}d.emit("view.ready",{viewContainer:T,url:m})}).catch(function(c){R&&c&&"Component closed"===c.message||d.emit("view.error",c)}),d.on("player.*",x),d.on("bridge.*",C),d.on("stage.*",O),d.on("app.*",D),d.on("appMessage",L),d.on("app.storage",N),d.on("destroy",U),{tag:f,focus:function(){if(T){var c=T.querySelector("iframe");if(c)return c.focus(),d.emit("appMessage",{event:"app.focus",metadata:{}}),!0}return!1},hasFocus:function(){if(T){var c=T.querySelector("iframe");if(c)return document.activeElement===c}return!1},destroy:function(){return U()}}}let version$1="1.19.0",packageInfo={version:version$1};function _classCallCheck$1(c,u){if(!(c instanceof u))throw TypeError("Cannot call a class as a function")}function _defineProperties$1(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function _createClass$1(c,u,d){return u&&_defineProperties$1(c.prototype,u),Object.defineProperty(c,"prototype",{writable:!1}),c}var RestApi=function(){function c(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,c),this.hostname=0===u.accountId.indexOf("staging-")?"".concat(u.accountId,".dev.number60.tv"):"".concat(u.accountId,"-cdn.cloud.easelive.tv"),this.baseUrl="https://".concat(this.hostname,"/api/v1")}return _createClass$1(c,[{key:"getProject",value:function(c,u){return fetch("".concat(this.baseUrl,"/projects/live/").concat(c).concat(u&&"prod"!==u?"?env=".concat(u):"")).then(function(c){return c.json()})}},{key:"getProgram",value:function(c){return fetch("".concat(this.baseUrl,"/programs/live/").concat(c)).then(function(c){return c.json()})}}]),c}();function ownKeys(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter(function(u){return Object.getOwnPropertyDescriptor(c,u).enumerable})),d.push.apply(d,p)}return d}function _objectSpread(c){for(var u=1;u<arguments.length;u++){var d=null!=arguments[u]?arguments[u]:{};u%2?ownKeys(Object(d),!0).forEach(function(u){_defineProperty(c,u,d[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):ownKeys(Object(d)).forEach(function(u){Object.defineProperty(c,u,Object.getOwnPropertyDescriptor(d,u))})}return c}function _defineProperty(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function _classCallCheck(c,u){if(!(c instanceof u))throw TypeError("Cannot call a class as a function")}function _defineProperties(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function _createClass(c,u,d){return u&&_defineProperties(c.prototype,u),Object.defineProperty(c,"prototype",{writable:!1}),c}var version=packageInfo.version,loadScript=function(c,u,d){if(window.__easeLive&&window.__easeLive.createEaseLiveWebBridgeHost)return void u();window&&!window.__easeLive&&(window.__easeLive={instances:{}});var p=document.createElement("script");p.src=c,p.onload=function(){window.__easeLive&&window.__easeLive.createEaseLiveWebBridgeHost?(delete window.createEaseLiveWebBridgeHost,u()):d(),p.parentNode.removeChild(p),p=null},p.onerror=function(){p.parentNode.removeChild(p),p=null,d()},document.head.appendChild(p)},EaseLive=function(){function c(){var u=this,d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,c),this.instanceId=Date.now().toString(36)+Math.floor(1e12+9*Math.random()*1e12).toString(36),window&&!window.__easeLive&&(window.__easeLive={instances:{}}),this.player=void 0,this.view=void 0;var p={logLevel:"info",params:{loaderTimeout:30}};this.options=_objectSpread(_objectSpread({},p),d),this.options.params=_objectSpread(_objectSpread({},p.params),d.params),this.isPlayerReady=!1,this.installedPlugins=[],this.dispatcher=new EventDispatcher;var h=this.accountId;h&&(this.api=new RestApi({accountId:h}),this.options.params.accountId||(this.options.params.accountId=h)),!this.options.params.projectId&&this.options.projectId&&(this.options.params.projectId=this.options.projectId),!this.options.params.programId&&this.options.programId&&(this.options.params.programId=this.options.programId),["on","off","emit","once"].forEach(function(c){u[c]=u.dispatcher[c].bind(u.dispatcher)}),error(this),this.checkRequiredParms(),"debug"===d.logLevel&&(console.log("Initializing Ease Live",d),this.on("*",function(c,u,d){console.log(c,u,d)}))}return _createClass(c,[{key:"accountId",get:function(){return this.options.accountId||this.options.params.accountId||getUrlQueryParam(this.options.url,"accountId")}},{key:"checkRequiredParms",value:function(){var c=this;if(["playerPlugin"].forEach(function(u){if(!c.options[u]){var d="missing ".concat(u," parameter");throw c.emit("bridge.error",{type:"fatal",message:d}),Error(d)}}),!(this.options.url||this.options.params.accountId&&(this.options.params.projectId||this.options.params.programId))){var u="accountId or url parameter must be set";
130throw this.emit("bridge.error",{type:"fatal",message:u}),Error(u)}}},{key:"getPlayer",value:function(){return this.player}},{key:"use",value:function(c){if(this.installedPlugins.indexOf(c)>-1)return this;for(var u=arguments.length,d=Array(u>1?u-1:0),p=1;p<u;p++)d[p-1]=arguments[p];d.unshift(this);try{"function"==typeof c.install?c.install.apply(c,d):"function"==typeof c&&c.apply(void 0,d),this.installedPlugins.push(c)}catch(c){console.error("Error loading plug-in",c),this.emit("bridge.error",{type:"warning",message:c.message})}return this}},{key:"init",value:function(){var c=this;if(!this.isInitialized){this.isInitialized=!0,this.options.setupTimeout&&setTimeout(function(){!0!==c.isPlayerReady&&c.dispatcher.emit("player.error",{message:"Player setup timed out."})},this.options.setupTimeout);var u=this.options.playerPlugin;this.on("bridge.ready",function(){var u=new UAParser(navigator.userAgent),d="desktop",p=u.getDevice();p&&p.type&&("tablet"===p.type?d="tablet":"mobile"===p.type?d="phone":("smarttv"===p.type||"console"===p.type)&&(d="tv"));var h={},f=u.getOS();f&&f.name&&(h.name=f.name.toLowerCase().replace(" ",""),h.version=f.version),setTimeout(function(){var u={type:d,orientation:window.innerHeight>window.innerWidth?"portrait":"landscape",model:navigator.userAgent,sdk:"web-".concat(version),protocol:"2.0",os:h};c.options.keymapping&&(u.keymapping=c.options.keymapping),c.dispatcher.emit("app.deviceinfo",u),c.isPlayerReady&&c.dispatcher.emit("easelive.ready")},0),c.addGlobalDebugInfo(c.options)}),this.once("player.ready",function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c.isPlayerReady=!0,u.player&&(c.player=u.player),c._loadView(u)}),this.player=Array.isArray(u)?u[0](this,u[1]):u(this)}}},{key:"_loadView",value:function(c){var u=this,d=this.options.viewPlugin||xcomponent,p=function(){try{u.view=Array.isArray(d)?d[0](u,_objectSpread(_objectSpread({},d[1]),c)):d(u,c)}catch(c){console.error(c),u.emit("view.error",{type:"fatal",message:"Error creating view"})}},h=function(){if(u.options.createView||u.options.viewPlugin)p();else{var c=u.options.url.split("index.html")[0];loadScript("".concat(_trim(c,"/"),"/js/webbridge.js"),function(){p()},function(){loadScript("".concat(c.split("/live/")[0],"/js/webbridge.js"),function(){p()},function(){loadScript("https://studio.easelive.tv/live/js/webbridge.js",function(){p()},function(){u.emit("view.error",{type:"fatal",message:"Error loading bridge script"})})})})}};if(this.api){var f=function(){u.options.url?h():u.api.getProject(u.options.projectId,u.options.env).then(function(c){u.options.url=c.webappUrl,h()}).catch(function(){u.emit("view.error",{type:"fatal",message:"Error loading project"})})};this.options.projectId?f():this.api.getProgram(this.options.params.programId).then(function(c){u.options.projectId=c.projectId,f()}).catch(function(){u.emit("view.error",{type:"fatal",message:"Error loading project"})})}else h()}},{key:"destroy",value:function(){var c=this;return this.view&&this.view.destroy?this.view.destroy().then(function(){return c._cleanup()}):this._cleanup()}},{key:"_shouldDestroyBridgeHost",value:function(){return!!window&&!!window.__easeLive&&0===Object.keys(window.__easeLive.instances).length&&"function"==typeof window.__easeLive.destroyEaseLiveWebBridgeHost}},{key:"_cleanup",value:function(){if(this.isInitialized=!1,this.dispatcher.emit("destroy"),this.dispatcher.removeAllListeners(),this.player=null,this.view=null,window&&window.__easeLive&&(delete window.__easeLive.instances[this.instanceId],this._shouldDestroyBridgeHost())){var c=window.__easeLive.destroyEaseLiveWebBridgeHost();return delete window.__easeLive,c}return Promise.resolve()}},{key:"addGlobalDebugInfo",value:function(){return!!window&&(window.__easeLive||(window.__easeLive={instances:{}}),window.__easeLive.instances[this.instanceId]=this.options,!0)}},{key:"focus",value:function(){return!!this.view&&!!this.view.focus&&this.view.focus()}},{key:"hasFocus",value:function(){return!!this.view&&!!this.view.hasFocus&&this.view.hasFocus()}},{key:"setProgram",value:function(){var c=this,u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options.url=null,this.options=_objectSpread(_objectSpread({},this.options),u),u.url&&(this.options.url=u.url),u.projectId&&(this.options.params.projectId=u.projectId),u.programId&&(this.options.params.programId=u.programId),this.view&&this.view.destroy?this.view.destroy().then(function(){return window.__easeLive.destroyEaseLiveWebBridgeHost()}).then(function(){c._loadView()}).catch(function(){}):this._loadView()}}
130,{key:"setStream",value:function(c){this.emit("app.update",{params:c})}}]),c}();EaseLive.xcomponent=xcomponent;let log$4=loglevelExports.getLogger("EaseLive");function mapPlayerStatus(c){switch(c){case"PLAYING":return"playing";case"BUFFERING":return"buffering";case"PAUSED":return"paused";case"IDLE":case"ENDED":case"ERROR":return"stopped";default:throw Error(`unknown player status ${c}`)}}let _n=class _n{static getInstance(c,u,d,p,h){if(_n.instance)return _n.instance;_n.playerCoordinator=u,_n.divElement=h,_n.instance=new EaseLive({accountId:c.accountId,projectId:c.projectId,params:{programId:c.programId,language:c.language},playerPlugin:(c,u)=>{}}),_n.lastTimestamp=0;let f=_n.instance;return u.addEventListener(_n.playerCoordinatorEventHandler),f.on("bridge.ready",()=>{log$4.info("EaseLive bridge ready",f.view);let c=u.getPlayerStatus();_n.emitEaseLiveEvent("player.state",{state:mapPlayerStatus(c)})}),f.on("*.error",async c=>{log$4.warn("EaseLive error",c),d(),await _n.destroy()}),f.on("view.mouseenter",c=>{log$4.debug("EaseLive view mouse enter",c)}),f.on("stage.clicked",c=>{log$4.debug("EaseLive stage clicked",c),p.current(c)}),f.on("player.time",c=>{let d=_n.lastTimestamp;if(null===d)return;let p=c.timecode-d;Math.abs(p)>0&&u.seekOrTimeshiftRelative(p/1e3)}),_n.instance.init(),u.isVideoLoaded&&(log$4.info("EaseLive player loaded"),_n.emitEaseLiveEvent("player.ready",{playerContainer:h,player:u}),_n.emitEaseLiveEvent("stage.clicked",{controls:"visible"})),f}static emitEaseLiveEvent(c,...u){var d;"player.time"!==c&&log$4.debug("EaseLive emit event",c,u),null==(d=_n.instance)||d.emit(c,...u)}static async destroy(){var c;_n.instance&&(null==(c=_n.playerCoordinator)||c.removeEventListener(_n.playerCoordinatorEventHandler),await _n.instance.destroy(),_n.instance=null,_n.playerCoordinator=null,_n.divElement=null,_n.lastTimestamp=null)}};yi(_n,"instance",null),yi(_n,"playerCoordinator",null),yi(_n,"divElement",null),yi(_n,"lastTimestamp",null),yi(_n,"playerCoordinatorEventHandler",c=>{var u;let d=_n.playerCoordinator,p=_n.divElement;if(!(!d||!p))switch(c.type){case"timeChanged":if(!(null!=(u=d.getPlayerData())&&u.isShowingAd())){let u=getPlayerTimestamp(c,d);_n.lastTimestamp=u,_n.emitEaseLiveEvent("player.time",{timecode:u})}break;case"loaded":_n.emitEaseLiveEvent("player.ready",{playerContainer:p,player:d}),_n.emitEaseLiveEvent("player.time",{timecode:(c.data.duration??0)*1e3});break;case"playing":_n.emitEaseLiveEvent("player.state",{state:"playing"});break;case"paused":_n.emitEaseLiveEvent("player.state",{state:"paused"})}});let EaseLiveInstance=_n;function getPlayerTimestamp(c,u){let d=1e3*c.playbackPosition;return"VOD"===u.getPlaybackMode()?u.getLatestSegmentStartTimestamp():d}let styles$1=".ease-live-overlay{color:#fff;pointer-events:all}.ease-live-overlay__wrapper{top:0;left:0;height:100%;width:100%;position:absolute}",log$3=loglevelExports.getLogger("EaseLive");typeof window.global>"u"&&(window.global=window),typeof process>"u"&&(global.process={env:{}});let EaseLiveOverlay=({playerCoordinator:c,config:u,onBackgroundClick:d,onError:p})=>{let h=useControlsVisibilityContext().controlsVisibility,f=_$3(null),m=f.current,g=_$3(d);return g.current=d,p$7(()=>m?(log$3.info("creating EaseLive",m),EaseLiveInstance.getInstance(u,c,p,g,m),async()=>{log$3.info("Destroying existing EaseLive instance"),await EaseLiveInstance.destroy()}):void log$3.debug("EaseLive div not ready"),[m,u,c,p]),p$7(()=>{EaseLiveInstance.emitEaseLiveEvent("player.controls",{controls:"fade-in"===h?"visible":"hidden"})},[h]),o$i(k$5,{children:[o$i("style",{children:styles$1}),o$i("div",{onPointerUpCapture:()=>d(),class:"ease-live-overlay__wrapper",children:o$i("div",{class:"ease-live-overlay rbup-video-core-container","data-rbup-ease-live-overlay":!0,ref:f})})]})};function shouldShowControls(c,u){return(null==c?void 0:c.controls)==="visible"||(null==c?void 0:c.controls)!=="hidden"&&"disallow"===u}let useEaseLiveOverlay=(c,u)=>{let{allowControlsRendering:d,setAllowControlsRendering:p,showControlsTemporarily:h,fadeControlsAway:f}=useControlsVisibilityContext();return p$7(()=>{u&&c&&u("ACTIVE")}
130,[c,u]),{onEaseLiveBackgroundClick:T$4(c=>{shouldShowControls(c,d)?(p("allow"),h()):(p("disallow"),f())},[d,f,p,h]),onEaseLiveError:T$4(()=>{p("allow"),null==u||u("INACTIVE")},[u,p])}};var isProduction=!0,prefix="Invariant failed";function invariant(c,u){if(!c){if(isProduction)throw Error(prefix);throw Error("".concat(prefix,": ").concat(u))}}function createPlayerConfigurationDataWithNextVideo(c,u,d,p,h,f){return p({...c,initialSeekTimeInSec:void 0,title:u.title,posterImageUrl:u.imageUrl??c.posterImageUrl,description:u.description,assetId:u.assetId,autoplay:h,muted:d?"MUTED":"NOT_MUTED",autoplayTriggeredByNextUp:f},u)}let log$2=loglevelExports.getLogger("useRbupPlaylist");function usePlaylist(c,u,d,p,h=!0){let f=T$4((h,f,m=!0)=>{log$2.info("select playlist entry with index and autoplay",h,m);let g=c.current;if(h>g.length-1)throw Error(`illegal playlist index ${h}, only have ${g.length} playlist entries`);let v=g[h],y=g.slice(h+1);return log$2.debug("new upcoming",v,"remaining",y),d(c=>{var u;invariant(c,"expected old config");let d=createPlayerConfigurationDataWithNextVideo(c,v,p.isMuted()??"MUTED"===c.muted,p.adaptPlayerConfigForNextVideo,m,f);return null==(u=p.onBeforeSwitchToNextVideo)||u.call(p,d,v),d}),c.current=y,u.current=v,v},[c,d,u,p]),m=T$4(c=>{if(h)return f(0,c)},[h,f]);return{selectPlaylistEntryWithIndex:f,autoAdvancePlaylistIfAllowed:m}}let DEFAULT_RBCOM_COOKIE_CONSENT=!1,dataZoomConfigIdWithoutConsent="d8d3750c-70da-43cd-9035-5668d53e5550",dataZoomConfigIdWithConsent="4246816e-bb40-4b1a-8f7f-182fbfd9cf65";function createRbcomDatazoomConfig(c,u,d){if(!c||!isCrepoId(u))return;let p=stripOffLocaleFromCrepoId(u),h=extractLocaleFromCrepoId(u);return{assetId:u,configId:d?dataZoomConfigIdWithConsent:dataZoomConfigIdWithoutConsent,customMetadata:{CUSTOM_ASSET_ID:p,CREPO_LOCALE_LANGUAGE:h,APP_VERSION:CORE_VERSION,APP_NAME:"Red Bull TV",DEVICE_PLATFORM:DATAZOOM_DEVICE_PLATFORM}}}function createRbcomTrackingSettings(c,u,d,p){let h="ACTIVE"===p,f=createRbcomDatazoomConfig(h,c,u),m=f&&h?"ACTIVE":"INACTIVE";return{configs:{googleAnalytics:{playerId:"",accountName:"",eventCustomizer:new RbcomTrackingEventCustomizer,dataLayer:d},dataZoom:f},services:{dataZoom:m}}}let adaptRbcomPlaylistConfig=c=>{var u;let d=(null==(u=c.tracking.services)?void 0:u.dataZoom)??"INACTIVE",p=c.tracking.configs.googleAnalytics.dataLayer,h=createRbcomTrackingSettings(c.assetId,c.cookieConsent??DEFAULT_RBCOM_COOKIE_CONSENT,p,d);return{...c,tracking:h}},BASE_URL="https://www.redbull.com/embed/";function iframeEmbedCodeGenerator(c){return`<iframe width="640px" height="360px" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="${BASE_URL}${c}" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe>`}let CornerbugCnIcon=x$5(()=>{let[c,u]=h$3(""),[d]=h$3(`cb${v4().replace(/-/g,"")}`),p=`.corner-bug-cn * {transition: 0.4s linear;}.corner-bug-cn.mono #${d}-sun-outline,.corner-bug-cn.mono
131        #${d}-bull-left-fill,.corner-bug-cn.mono #${d}-bull-right-fill {fill: #fff;}.corner-bug-cn.mono
132        #${d}-sun-fill,.corner-bug-cn.mono #${d}-bull-left-outline,.corner-bug-cn.mono
133        #${d}-bull-right-outline {fill: transparent;}.corner-bug-cn.mono #${d}-red-bull {fill: #fff;}`,h=o$i("svg",{"data-rbup-cornerbug-cn":!0,xmlns:"http://www.w3.org/2000/svg",class:`corner-bug-cn ${d} ${c}`,viewBox:"0 0 397.4 222.1",children:[o$i("style",{children:p}),o$i("circle",{id:`${d}-sun-fill`,fill:"#ffcc05",cx:"199.3",cy:"107.2",r:"39.3"}),o$i("path",{id:`${d}-sun-outline`,fill:"#ffcc05",d:`M199.3,65.9c-22.8,0-41.3,18.5-41.3,41.3s18.5,41.3,41.3,41.3s41.3-18.5,41.3-41.3
134	l0,0C240.6,84.4,222.1,65.9,199.3,65.9z M199.3,146.5c-21.7,0-39.3-17.6-39.3-39.3s17.6-39.3,39.3-39.3s39.3,17.6,39.3,39.3v0
135	C238.6,128.9,221,146.5,199.3,146.5z`}),o$i("g",{id:`${d}-red-bull`,fill:"#d11f40",children:[o$i("path",{d:`M266.7,206v-20.6h-11.3v22.8c0,7.7,8,14,17.8,14c9.8,0,17.8-6.2,17.8-14v-22.8h-11.2V206
136		c0,3.6-2.9,6.5-6.5,6.5C269.6,212.5,266.7,209.6,266.7,206z`}),o$i("path",{d:"M316.6,160.9H328v59.9h-11.4V160.9z M297.3,160.9h11.4v59.9h-11.4V160.9z"}),o$i("path",{d:`M88.3,173.4h-6.1v47.4H70v-57.2h20.9c9.3-0.2,17,7.2,17.2,16.6c0.1,8-5.3,15-13.1,16.7l16.8,23.9H97.5
137		l-12.2-18.7v-13.7h2.8c4.3,0.2,8-3.2,8.1-7.5c0,0,0,0,0,0c-0.1-4.2-3.5-7.6-7.7-7.5C88.5,173.4,88.4,173.4,88.3,173.4z`}),o$i("path",{d:`M147.6,205.4c0.1-0.8,0.1-1.6,0-2.4c0.2-12.4-8-19.1-18.4-19.1c-10.6,0.3-18.8,9.2-18.5,19.7
138		c0.3,10.1,8.4,18.2,18.5,18.5c7,0.3,13.7-3.2,17.4-9.2l-9.3-4.3c-1.3,2.7-4.1,4.4-7.2,4.3c-4.1,0.2-7.6-3-7.8-7.1v-0.4L147.6,205.4
139		z M122.4,198.8c0-3.9,3.1-7,7-7c3.9,0,7,3.1,7,7H122.4z M193.1,220.8v-59.9h-11.4v28.4c-3-3.1-7.2-4.8-11.5-4.8
140		c-9.4,0-17.1,8.4-17.1,18.7c0,10.3,7.6,18.7,17.1,18.7c4.4,0,8.5-1.8,11.5-5v4.1L193.1,220.8L193.1,220.8z M173.5,212.1
141		c-5.1,0.4-9.5-3.3-10-8.4c-0.4-5.1,3.3-9.5,8.4-10s9.5,3.3,10,8.4c0,0.3,0,0.5,0,0.8C182.1,207.7,178.3,211.8,173.5,212.1z
142		 M241.4,189.7c6.2-5.4,6.8-14.7,1.4-20.9c-0.1-0.2-0.3-0.3-0.4-0.5c-2.7-3-7.5-4.7-14.1-4.7h-19.5v57.2h25.2
143		c9.7-0.2,17.4-7.4,17.4-16.4C251.4,197.8,249,193.3,241.4,189.7z M231.8,210.9h-10.9v-37.5h7.6c3.4,0.1,6.1,3,6.1,6.4
144		c0,3.4-2.7,6.1-6.1,6.1h-3.9v10.2h7.3c4.1,0,7.3,3.3,7.3,7.3s-3.3,7.3-7.3,7.3L231.8,210.9z`})]}),o$i("path",{id:`${d}-bull-right-outline`,fill:"#ffcc05",d:`M306.2,135c-0.6-0.9-0.3-2-0.6-3.1c-0.5-1.2-1.5-2.1-2.8-2.4
145	c-0.1-1.8-3.8-3.3-3.9-3.7c-1.4-1.3-2.7,0.2-3.7,1.2c-0.2,0.1-0.7-0.
1456-0.8-0.9c-0.9-2.9-1.5-5.9-5.2-5.3c-0.6,0-1.4,0-1.5-0.5
146	c0.4-2.4,1.3-5.2,0.7-7.9C302,114,304,100,293.6,92.8c4.2-0.2,7.4-3.8,7.1-7.9c0-0.4-0.1-0.9-0.2-1.3c-0.2-0.9-0.4-2.6-1.5-2.7
147	c-0.7,0-1.3,1-1.9,1.5c-3.7,2-10.2,1.9-11.3,7.4c-0.5,4.3,3.7,6.7,6.2,9.5c2.5,2.8,3.1,6.8-1.4,6.7c-7.2-1-11.8-8.1-19.4-8.5
148	c-4.4-1.1-7.4-5.2-12.2-5.5c-1.6-0.2-2.8-1.7-4.1-2.6c-2.7-2-6.2-2-9.1-3.6c-2.8-3.8-9.3-6.8-13.2-2.7c-5.5,4.5-14,10-17.4,14.1
149	c-7.5,8.1-5.2,20.4-11.7,27.5c-0.8,0.9-1.8,1.8-2.7,2.6c-0.8,0.6-0.9,4.1,4.1,2.4c-4.7,5,6.9,2.6,8.9-1c2,2.8,5.3,1.5,7.1,1.6
150	s4.7,1.9,6.5,1.8c2.1-0.2,3.6-2,3.4-4.1c0-0.1,0-0.2,0-0.2c0.4,0,0.5,0,0.7-0.3c0.2,1.2,0.5,2.5,0.9,3.6c0.6,1.7,2.4,2.6,4.1,2
151	c2.3,2.3,6.2,2.2,8.7,3.4c2.7,0.8,5.6-0.7,6.4-3.5c0-0.1,0.1-0.2,0.1-0.3c0-0.3,0.2-0.3,0.6-0.3c1.6-0.2,2.3-2.2,3.1-3.4
152	c2.8-4.4-3.9-3.8-6.5-3.8c-0.5-0.5-1.2-0.8-1.9-0.8l0.9-0.7c4.1,0.4,8.1-1.1,11.8-1.1c2.6,0.3,5.2,0.3,7.7-0.1
153	c0.4,3.4,1.8,6.9,5.2,8.4c1.9,1.8,4.7,1.4,6.9,0.9c4.9-0.8,8.1,6.5,13,3.8c1.6,3.3,5,3.4,8.1,3.1c0.7,1.3,4.2-0.7,5-0.7
154	C307.4,137.6,306.7,136.2,306.2,135L306.2,135z M232,124.6c-0.8-1.7-1.6-3.3-2.6-4.9c1.7,0.3,3.5,0.4,5.3,0.3
155	C233.7,121.5,232.8,123,232,124.6z`}),o$i("g",{id:`${d}-bull-right-fill`,fill:"#d11f40",children:[o$i("path",{d:`M247.6,126.2c-1.3-0.2-2.6-0.2-3.9,0c-1.2,2-1.2,3.8,2,3.9C247.5,129.9,247.6,127.2,247.6,126.2z M301.6,129.4
156		c-0.9-1.1-2.1-1.9-3.3-2.5c-0.7,0.1-1.3,0.6-1.6,1.2c0,0.6,1.8,3.2,3,3.2C300.5,131.4,301.9,130.3,301.6,129.4z M305.1,135.2
157		c-0.5-1-0.3-2.2-0.8-3.2c-0.7-1.6-3.4-0.6-3,1c0.7,1.5,0.4,3.3,1.4,4.5C303.9,136.8,306.3,137.2,305.1,135.2z`}),o$i("path",{d:`M300.9,137c-0.2-1.5-0.6-2.9-1.2-4.2c-1.4,0-2.2-1-3.1-2c-0.8-1-2.4-2.3-3.1-3.3c-0.8-1.4-0.6-4.5-2.5-5.1
158		c-8.7,0-2-5.1-4.1-9.7c-0.2-0.8-0.7-1.9,0.3-1.9c5.1,1.7,12-0.8,12.1-7.2c0-4.1-4.3-7.5-7.5-11.1c0-0.6,1.8-0.9,2.5-1
159		c3.3-0.5,5.6-3.6,5.1-7c-0.1-0.5-0.2-1.1-0.5-1.5c-1.6,1.7-4.1,2-6.3,2.6c-12.7,5.1,2,10.8,3.3,17.4c0.2,2.4-1.6,4.5-4,4.7
160		c-0.3,0-0.5,0-0.8,0c-6.1-0.3-10.2-6.1-15.7-7.6c-2.7-1.2-5.9-0.9-8.3-2.7c-1.6-1.3-3.4-2.4-5.4-3.1c-1.7-0.2-3.3-0.8-4.7-1.9
161		c-3-2.4-6.6-3.9-10.4-4.5c-1.3-0.3-1.9-1.9-3-2.6c-2.9-2.5-7-3.7-9.7-0.9c-5.6,4.9-11.9,8.1-17,13.8c-8.1,8.9-4.1,22.9-14.8,30.1
162		c-1.2,1.2,2.6,1.7,4.9-0.7c1.5-1.7,2.2-3.9,4.3-5.3c0.4,0.7-0.6,1.6-1,2.3c-1,2.4-2.5,4.4-4.4,6.1c0,0-0.5,0.4-0.4,0.5
163		c0.1,0.1,0.2,0.6,0.8,0.6c3.1,0,5.3-2.2,7.4-4.3c0.2-0.1,0.5-0.1,0.7,0c0.9,0.7,1.9,1.8,3.1,2c1.3-0.2,2.7-0.3,4.1-0.3
164		c2,0.6,3.8,1.4,5.8,2c2.3-0.4,2.7-2.7,2.2-4.6c4.4,0.3,0-3.5-0.4-5.3c-0.4-1.8-3.5-3.4-3.6-5.6h0.3c2.4,2.5,5.9,3.7,9.3,3.2
165		c1.4-0.6-1.1-3.4-1.1-4.8c-0.2-1-1.4-4.9,0-6.4c0.4,0,0.5,0.5,0.5,0.9c-0.1,2.9,0.7,5.7,2.2,8.1c0.9,1.7,4.3,1.9,3.4,4.3
166		c-1.5,2.3-4.3,5.2-3.4,8.1c-0.9-1.2-1.2-2.8-0.8-4.2c0.3-1,2.8-3.6,2.8-4.8c-0.6-0.4-1.3-0.7-2-0.8c-0.9,0.1-3.1,5.1-3.6,5.8
167		c-0.7,2,0.5,4.8,1.3,6.4c1,1,2.7-0.4,3.6,1.1c1.9,1.7,4.9,1.4,7.1,2.6c1.8,0.9,3.9,0.2,4.8-1.6c0.2-0.4,0.3-0.8,0.4-1.2
168		c0.2-1.3,1-0.9,1.9-1.2c0.4-0.2,4.1-4.3,1.7-4.3h-3.6c-2.5,0.2-1.7,4.3-4.4,4.2c-6-1.1-6.2-3.4-1.5-7c1.7-0.4,3.2-1.5,4.1-3
169		c1.6-4.1,2.2-1.2,0.9,1.2c4.5,0.4,8.8-1.6,13.3-0.9c6.5,1.1,7.9-2.7,6.4-9c0-0.4,0.5-0.6,0.6-0.1c4.7,25,11.2,7.7,21.7,19
170		c0.2,0.4-0.4,0.3-0.6,0c-7.8-7.7-15.2,2-20.5-10c-0.1-0.2-0.3-0.3-0.5-0.2c0,0-0.1,0-0.1,0.1c-0.9,0.5-0.1,1.7,0,2.8
171		c0.7,3.6,3.6,6.3,7.2,6.7c3.5-0.9,7.2-0.1,10,2c1.1,0.7,2,2,3.5,1.9s1.6-0.8,2.6-0.8c1.3,0,1.8,1.9,2.8,2.7
172		C297.4,137.7,299.4,137.2,300.9,137L300.9,137z M222,126c-1.3,1.4-3.6-1-2.6-2.4C220.5,123.2,222.6,124.3,222,126z M222.8,113.8
173		c-1.1,1.3-1.3-1.1-2.3-1c-1.8,0.6-3.3,2-4.1,3.7c-0.2,0.6,0,1.3-0.7,1.5c-0.2,0-0.5-0.2-0.5-0.5c-0.4-3.6,3-5.3,4.7-7.9
174		C220.8,108.9,223.2,112.6,222.8,113.8L222.8,113.8z M237.4,93.2c-2.2,1.7-4.1,3.9-5.4,6.3c0,0.1-0.3,0.3-0.4,0.1
175		c-0.6-2.9,1.9-6,4.5-8c0.4-0.4,1-0.3,1.4,0.1C237.9,92.2,237.9,92.8,237.4,93.2C237.4,93.2,237.4,93.2,237.4,93.2L237.4,93.2z`})]}),o$i("path",{id:`${d}-bull-left-outline`,fill:"#ffcc05",d:`M196.3,126.2c-2.3-1.3-2.8-3.9-4.1-5.5c-3.9-4.8-4.1-10-5.1-15.6
176	c-2.5-8.7-14.2-18.5-21.2-22.6c-5.8-2.8-10.7,2.9-16.3,4.2c-2.8,0.6-5.3,2.1-7.3,4.1c-0.4,0.4-0.7,1-1.4,1.1
177	c-6.1-0.6-9.4,6-15.1,6.5c-7.4-0.4-11.4,7.8-18.5,8.3c-2.2,0-3.9-1.8-3.9-4c0-0.6,0.2-1.3,0.5-1.8c2.5-4.7,9.9-5.7,8.1-12.4
178	c-1.5-4.1-6.5-4.3-9.7-5.6c-1.6-0.7-2.4-1.9-4.1-2.2c-4.9,4.2,0.7,12,6.4,11.6c-11.9,7.2-8.1,22.7,6.3,19.9c0,2.4,0.5,4.8,1.5,7
179	c0.3,1.1-2,1.5-2.8,1.9c-5.6-0.6-3.8,3.4-6.5,5.9c-0.5-0.4-2-2-3.1-2c-2.2,0.3-4.1,1.8-5,3.8c-1.8,0.6-3.1,2.2-3.2,4.1
180	c0,1-1,2-1,2.9c0,2,2.2,2,4.1,2.8c0.6,0.1,1-0.3,1.5-0.5c4.1,1.1,7,0.6,9-3.4c2.7,1,5.7,0.2,7.5-2c2-2.6,4.8-0.9,7.6-1
181	s4.7-1.5,7-2.6c2.6-1.5,3.1-4.3,4.1-6.4c2.2,0.3,4.1-0.7,6.3-0.7c3.2,0.4,7.4,1.4,10.8,0.5c0.5,0.5,1.1,0.8,1.6,1.3
182	c-1,0.2-2.2,0-2.9,0.9c-2.4-0.7-9-0.7-7.7,3.2l2.3,3.9c0.6,1.1,1.4,1,2.4,0.9c1.4,0.2,1.4,2,2.7,2.9c1.3,1,3,1.4,4.7,1
183	c2.7-1,5.4-1.9,8-3l3.3-0.5c1.1-0.2,2-1.7,2.2-2.3c0.6-1.1,1-2.2,1.4-3.4c-0.5,7.1,4.8,4.9,9.5,3.6c1.8-0.3,4.1,0.4,5.8-0.4
184	c1.7-0.8,2.6-2,2.9-1.7c2.2,2.2,5.3,3.4,8.4,3.3c2.4,0,2.7-2,1-2.9c3.3,0.4,4.3-1.4,3.6-2C197.5,126.9,196.9,126.5,196.3,126.2
185	L196.3,126.2z M166.7,124.4c-1.1-1.2-1.9-2.7-2.2-4.4c1.6-0.2,3-0.7,5.4-0.8C169.4,121,167.3,121.9,166.7,124.4z`}),o$i("g",{id:`${d}-bull-left-fill`,fill:"#d11f40",children:[o$i("path",{d:`M154.5,128c-0.7-0.8-0.4-2.9-1.8-2.8c-1.4,0.1-2.7-0.1-3.9,0.5c-0.2,0.5,0.7,1,1,1.4s1,2.5,1.6,2.7
186		C152,130,155.2,129.3,154.5,128z M100.2,126.9c-1.3-0.5-2.4,1.1-3.5,1.8c-1.1,0.7,0,2.3,1.2,2.4c1.2,0.1,3.1-3,3.2-3.1
187		C101.1,127.8,100.8,127.3,100.2,126.9z M96.3,132.1c-0.2-0.3-1.1-1.3-1.5-1.3c-0.7,0.3-1.3,0.9-1.5,1.6c-0.2,2.2-0.2,2.4-0.8,3
188		c-0.2,0.2-0.3,0.6,0,0.8c0.8,0.4,1.7,0.7,2.6,0.8c0.6-1.5,1.1-3,1.5-4.6C96.4,132.5,96.4,132.4,96.3,132.1z`}),o$i("path",{d:`M161.1,132c2.9,0.3,5.8-5.1,4.5-7.4c-1.1-1.6-1.9-3.2-2.6-5c-0.8-0.3-2.5-1-3,0c0.4,1.2,3.5,6.1,3.2,7.3
189		c-0.2,0.8-1.5,3.1-2.2,3.3c-0.2-0.5,0.7-3.5,0.4-4.1c-0.6-2.4-3.3-5.1-3.4-7.1c0.5-1.5,3.6-0.8,4.3-2c1.4-1.7,1.6-4.2,2.6-6.5
190		c0,0,0.2,0,0.2,0.2c0.7,2.7-0.7,5.2-1.7,7.5c0.5,1.1,2.6,0.5,4.3-0.2c1.4,0,2.8-0.2,4.2-0.5c0.1,0,0.2,0.1,0.2,0.2
191		c-0.9,1-1.4,2.2-1.7,3.4c-0.8,0.9-3.9,3.2-2.3,4.3c0.4,0,1.1-0.7,1.3,0c-0.7,1-1.8,2.3-1.1,3.6c0.2,3.7,4.7,1.7,6.8,0.9
192		c1.7-0.6,3.6-0.7,5.3-0.3c1.7-0.3,3.2-1.1,4.3-2.4c2.8,1.4,4.9,4.4,8.7,3.9c0.3,0,1,0,1-0.4c0-0.4-1.7-1.1-2-1.4
193		c-3.5-1.7-3.7-5.7-5.8-8.3c3.5,1.2,4.3,7.5,9.2,7.4c0.5,0,1.1,0,1.2-0.5c0-0.2,0-0.4-0.2-0.4c-2.1-0.9-3.7-2.5-4.6-4.5
194		c-0.7-1.3-1.7-2.5-2.8-3.5c-2.4-4.8-2.4-11.4-4.6-17c-2.3-3.5-4.9-6.7-7.7-9.8c-5.5-4.2-12.9-13.5-20.3-7.6
195		c-4.1,3.1-9.8,2.7-13.3,6.7c-1.5,1.4-1.6,1.5-2.8,1.5c-6.2-0.6-8.9,6.5-14.8,6.4c-1,0.1-2,0.2-3,0.5c-6.1,1.8-15.4,13.9-20.5,4.5
196		c-2.6-7.4,12.6-9.8,7.7-17.1c-3.8-3-8.1-1.9-11.6-5.1c-2,3,0.7,7,3.6,8.1c1.2,0.7,6.3-0.4,4.4,2.2c-2.1,1.6-4,3.4-5.8,5.4
197		c-5.8,8.3,3.9,15.8,11.8,12.5c0.5,0.4,0.2,1.7,0.3,2.4c-0.1,2,0.4,3.9,1.2,5.7c1.6,3-4.1,4.1-5.6,4c-2-0.2-2,2.8-2.9,4.3
198		c-1,1.3-2.4,2.3-3.8,3c-0.8,1.2-1.6,2.6-3.2,2.5c-0.9,1.3-1.5,2.8-1.6,4.4c4.4,1,5.5,0.8,7.8-3.1c0.8-0.8,2,0,2.9,0
199		c1.8-0.1,3.5-0.9,4.6-2.3c2.2-2.7,5.9-1.3,8.8-1c2.3,0,4.1-1.6,6-2.5c1.8-1.5,3.1-3.5,3.7-5.7l-1.5-1.1
200		c-5.3,10.2-15.3,2.7-22.4,10.2c2.4-7.1,12.2-3.9,16.9-6.7c3.5-2,4.7-5.6,5.1-9.2c0.3-0.9,0-2.9,1-3.2c0.1,0,0.4,0.1,0.4,0.3
201		c-0.6,2.3-0.6,4.7,0,7c2.5,3.2,8.1-0.5,11.6,1.2c1.5,0.2,7.2,1.7,6.5-1.1c-0.2-0.7-0.7-1.8-0.1-2.3c0.6-0.5,0.6,0.3,0.7,0.6
202		c0.6,4.8,7.7,4.9,8.3,10c-0.3,2.1-3.7,2.8-5.2,3.1c-1.4-0.3-2-1.7-2.8-2.8c-1.2-3.2-4.7-3.1-7.3-1.7c0,1.5,1.5,2.8,2,4.2
203		c0.2,0.2,0.4,0.3,0.7,0.3c0.6,0,1.7-0.2,2,0.3c2.3,6.5,9.2,2.4,13.5,0.4L161.1,132z M165.6,101.6c0,0.3-0.4,0.4-0.5,0
204		c-0.2-1.6-0.6-3.1-1.3-4.5c-0.7-0.9-2-3.1,0.2-2.7C166.3,95.4,165.9,101.4,165.6,101.6z M180.1,124.6c0,1.1-1.3,1.4-2.4,1.3
205		C174.4,126,180.9,120.5,180.1,124.6z M184.1,115.5c0,1.1-1.2,2-1.3,0.7c0-0.7-0.1-1.4-0.3-2c-0.7-1.2-2.4-3.6-3.7-1.5
206		c-1.6,2.5-1.1-1.5-0.4-2.3c0.8-2.5,2.5-2.4,3.5-0.2c1,1.3,2.6,3.5,2.1,5.4L184.1,115.5z`})]}),o$i("g",{id:"lead",fill:"#fff",children:o$i("path",{d:`M151.6,38.1c-2.5,2.2-5.4,3.9-8.6,4.8c-4.4,1.2-9,2-13.6,2.2v-4.7c8.4-1.1,13.8-2.8,16.1-5.2h-15.2v-5.5h17.2
207		v-0.9c0-0.5,0-1,0.1-1.5h7.9c0,1.1,0,1.9-0.1,2.4H173v5.5h-15.6c1.4,0.9,2.9,1.6,4.4,2.2c3.9,1.4,8,2.3,12.1,2.8V45
208		c-3.7-0.3-7.3-0.9-10.9-1.8C158.9,42.3,155,40.6,151.6,38.1z M140.4,9.2V28h-7.2V3.6h11.7c0.7-0.9,1.3-1.9,1.9-3h6.7
209		c-0.2,1-0.5,2.1-0.8,3.1h17.5v24.4h-7.3v-1.5h-5.3c-0.6-1.9-1.4-3.7-2.4-5.5v5.6h-7V24c-2.2,1.6-4.6,2.8-7.2,3.5v-3.7
210		c2.2-1,4.2-2.5,5.7-4.4h-5.1v-4.5h6.6V9.8h7v5.1h6.7v4.5h-6.7v0.7h3.1c1.9,1.8,3.5,4,4.7,6.3V9.1L140.4,9.2L140.4,9.2z M141.5,10.2
211		h3.7c0.9,1.2,1.7,2.6,2.2,4.1h-4.6C142.7,12.9,142.2,11.5,141.5,10.2z M161.2,10.2c0,0.3,0,0.7-0.1,1.2c-0.1,1-0.3,2-0.5,3h-4.9
212		c0.8-1.3,1.4-2.7,1.7-4.3L161.2,10.2z M204.1,11V0.5h6.9v8.1l9.8-3.2v20c0.2,1.8-0.5,3.6-2,4.7c-1.4,0.6-2.9,0.9-4.4,0.8h-1.9
213		l-1.3-5.3h2.8v-12l-2.9,0.9v20.8h-7V16.8l-2.5,0.8v20.5h14.2v-6.2l6,1.5v5.7c0.1,1.2-0.3,2.5-1.2,3.4c-0.9,0.7-2,1-3.1,0.9h-18.5
214		c-0.9,0-1.7-0.1-2.5-0.5c-1.3-0.8-1.9-2.3-1.8-3.8V19.8l-3.1,1v-4.3h-2.8v15l4.1-0.8v5.1L177.3,41v-7.2l4.2-0.7V16.8h-3.8v-5.5h3.8
215		V0.5h7.2v10.7h3.9v3.4l2-0.6V5h6.9v6.8L204.1,11z M234.8,30.1c-1.3,1.6-2.7,3.1-4.3,4.5c-1.4,1.1-2.9,2.1-4.5,3v-6.1
216		c1-0.9,1.7-1.6,2-1.9c1.6-1.7,2.9-3.7,3.9-5.8c0.9-1.7,1.5-3.5,2-5.4h-7.3v-5.3h8.1V7.9h-6.9V2.5h11.5c0.8,0,1.3-0.
2161,1.5-0.4
217		c0.2-0.3,0.3-0.7,0.4-1.1h7.3c-0.1,1.7-0.5,3.3-1.3,4.7c-1.2,1.5-3.1,2.2-5,2H242v5.3h7.5v5.3H242v1.8h3.6c1.1,1.8,1.9,3.1,2.3,3.9
218		c1.3,2.7,2.3,5.5,2.9,8.5H244c-0.5-3.1-1.2-6.1-2-9.2v21.4h-7.2V30.1z M251.4,36.2V4.4h7v31.8L251.4,36.2z M255.1,44.4l-1.4-5.3
219		h7.6V0.6h7.3v39.1c0,3-1.3,4.5-3.8,4.5L255.1,44.4z`})})]});return p$7(()=>{setTimeout(()=>{u("mono")},3e3)},[]),h}),getCornerbugResolver=c=>u=>{switch(c??(null==u?void 0:u.cornerbug)){case"china":return CornerbugCnIcon;case"hidden":return;default:return RbupVideoDefaultCornerbugIcon}};function createPlayerConfiguration(c,u,d,p,h,f,m,g,v,y,b,S,_,E,T,w,P,A,I,M,R,k,x,C){let O=isTrueValue(p);return{_debug:{playerAdapterType:null==c?void 0:c.playerAdapterType},autoplay:isTrueValue(u),assetId:d,cookieConsent:O,resolveCornerbug:h,description:f,environment:m,iframeEmbedCode:isTrueValue(g)?iframeEmbedCodeGenerator(d):void 0,initialSeekTimeInSec:v.determineInitialSeek(d),multiChannelSwitcher:y,muted:b,overrideAudioLanguage:S,overrideSubtitleLanguage:_,overrideTranslationLanguage:E,phasing:isTrueValue(T),posterImageUrl:w,productPlacement:P,relatedVideos:A,title:I,tracking:createRbcomTrackingSettings(d,O,M,R),videoDetails:k,hooks:x,skipCosmosFontInjection:isTrueValue(C),mediaSessionArtist:"Red Bull"}}function useRbcomConfig(c,u,d,p,h,f,m,g,v,y,b,S,_,E,T,w,P,A,I,M,R,k,x,C){let O=F$4(()=>new QueryParamUrlSharingStrategy,[]),D=F$4(()=>getCornerbugResolver(p),[p]);if(k.length>0&&d)throw Error("you should provide either `assetId` or `playlist` but not both");validatePlaylist(k);let[L,N]=h$3(void 0),U=_$3(k),F=_$3(resolveCurrentAssetAsPlaylistEntry(d));return p$7(()=>{U.current=k;let[p,...L]=U.current,B=(null==p?void 0:p.assetId)??d,j=A??(null==p?void 0:p.title)??void 0,H=f??(null==p?void 0:p.description)??void 0;p&&(F.current=p),B&&N(createPlayerConfiguration(c,u,B,h,D,H,m,g,O,v,y,b,S,_,E,T,w,P,j,I,M,R,x,C)),L.length>0&&(U.current=L)},[c,g,d,u,h,p,I,M,m,x,v,y,b,S,_,E,k,U,T,w,P,O,f,R,A,C,D]),{urlSharingStrategy:O,config:L,setConfig:N,playlistEntriesRef:U,currentlyPlayingPlaylistEntryRef:F}}let log$1=loglevelExports.getLogger("useRbcomVideoApi"),publicPlayerEventTypesAsString=[...publicPlayerEventTypes];function useRbcomVideoApi(c,u,d,p){let h=_$3([]),f=F$4(()=>c=>{if(publicPlayerEventTypesAsString.includes(c.type))for(let u of h.current)try{u(c)}catch(c){log$1.error("error invoking public event listener",c)}},[h]);p$7(()=>(c&&c.addEventListener(f),()=>{null==c||c.removeEventListener(f)}),[f,c]);let m=F$4(()=>({...c,addEventListener(c){h.current.includes(c)||h.current.push(c)},removeEventListener(c){let u=h.current.findIndex(u=>u===c);-1!==u&&h.current.splice(u,1)},addPlaylistItems(c){let d=[...u.current,...c];return log$1.info("adding playlist entries",c,"new playlist",d),u.current=d,[...d]},replacePlaylistItems(c){let d=[...c];return log$1.info("replacing playlist entries",d),u.current=d,[...d]},getUpcomingPlaylistEntries:()=>[...u.current],playEntry:c=>p(c,!1),loadEntry:c=>p(c,!1,!1)}),[c,u,p]);return A$3(d,()=>m,[m]),{rbcomVideoApi:m,forwardingListener:f}}let VIDEO_RESOURCE_ROUTE="rbcom/videoresource",OFFSITE_PROJECT_ROUTE="offsite-project";function selectServerRoute(c){return c.startsWith("rrn:content:")?VIDEO_RESOURCE_ROUTE:OFFSITE_PROJECT_ROUTE}async function fetchSsdmRbcomMetadata(c,u,d,p,h,f,m){let g={videoId:c};h&&(g.cacheBuster=v4()),f&&(g.alwaysShowEaseLive="true");let v=selectServerRoute(c);v===VIDEO_RESOURCE_ROUTE&&(p&&(g.localeMixing=p),m&&(g.includePreviewAssets=m.toString()));let y=calculateSsdmUrl(u,d),b=await fetch(`${y}/${v}?${new URLSearchParams(g)}`,{headers:{...calculateCachingHeaders(h),...resolveReviewAppRequestHeaders(d)}});if(b.ok)return await b.json();throw Error(`error loading from server ${b.status}`)}class RbcomDataLoader{constructor(c,u,d,p){this.localeMixing=c,this.prNumber=u,this.alwaysShowEaseLive=d,this.includePreviewAssets=p}async loadData(c,u){let d=await fetchSsdmRbcomMetadata(c.assetId,c.environment,this.prNumber,this.localeMixing,u,this.alwaysShowEaseLive,this.includePreviewAssets),p=d.videoUrl?{videoUrl:d.videoUrl,mediaType:d.videoMediaType}
219:void 0,h=createEaseLiveConfigFromInput(d),f={title:d.title,description:d.description,posterImageUrl:d.poster,thumbnailSprites:d.thumbnailSprites,mediaSrc:p,playabilityErrorDetails:d.playabilityErrorDetails,playabilityErrors:d.playabilityErrors,videoId:d.videoId,vin:d.vin,duration:d.duration,userCountry:d.userCountry??null,aspectRatio:d.aspectRatio,easeLiveConfig:h,availableAudioLanguages:d.availableAudioLanguages,availableSubtitleLanguages:d.availableSubtitleLanguages,cornerbug:d.cornerbug};return isSparkleResponse(d.videoId)?{...f,label:d.label,labelGroup:d.labelGroup,season:d.season,chapter:d.chapter}:{...f,assetId:d.assetId,eventLogoUrl:d.eventLogoUrl,eventPageUrl:d.eventPageUrl,linearId:d.linearId,space:d.space,vr:isVrVideo(c.assetId),dfpAdvertisingConfig:d.dfpAdvertisingConfig,activateHeatmapTracking:d.activateHeatmap,heatmapData:d.heatmap,maturityRating:d.contentMaturityRating}}}function isSparkleResponse(c,u){return!c.startsWith("rrn:content")}function isVrVideo(c){return!!c.startsWith("rrn:content:videos-360:")||void 0}function shouldPollInPhaseOrForOther(c,u){return shouldPollInPhase(c)||!!(null!=u&&u.find(c=>shouldPollInPhase(c.phase)))}async function fetchSsdmRbcomLiveStatus(c,u,d){let p=calculateSsdmUrl(u,d),h=await fetch(`${p}/rbcom/live-status?${new URLSearchParams({videoId:c})}`);if(h.ok)return await h.json();throw Error(`server returned ${h.status}`)}let log=loglevelExports.getLogger("RbcomLiveStatusDataLoader");function mapRbcomPhase(c){switch(c){case"pre":return"pre";case"post":return"post";case"trim":return"trim";case"live":return"live";case"canceled":return"canceled";case"unconfirmed":return"unconfirmed";default:return log.warn("unknown live status phase code %s",c),"pre"}}class RbcomLiveStatusDataLoader{constructor(c){this.prNumber=c}async loadLiveStatus(c,u){var d;let p=u.videoId??c.assetId,h=await fetchSsdmRbcomLiveStatus(p,c.environment,this.prNumber),f=(null==(d=h.otherLiveVideos)?void 0:d.map(c=>({phase:mapRbcomPhase(c.code),startTime:c.startTime,title:c.title,videoId:c.videoId})))??[],m=mapRbcomPhase(h.code),g=shouldPollInPhaseOrForOther(m,f);return{phase:m,startTime:h.startTime,endTime:h.endTime,statusLabel:h.statusLabel,otherLiveVideos:f,shouldKeepPolling:g}}}let LINEAR_STREAM_URL="https://dms.redbull.tv/v5/destination/rbtv/TYPE/personal_computer/http/at/en/playlist.m3u8",HLS_MEDIA_TYPE="application/vnd.apple.mpegurl";function calculateMediaSource(c){if(!(null!=c&&c.startsWith("multilinear:")))throw Error("configured assetId is undefined or is not prefixed with 'multilinear:'");let u=c.split(":")[1];if(!u)throw Error("actual assetId can not be undefined");return{videoUrl:LINEAR_STREAM_URL.replace("TYPE",u),mediaType:HLS_MEDIA_TYPE}}class RbcomMultiLinearDataLoader{async loadData(c){return{...c,userCountry:null,mediaSrc:calculateMediaSource(c.assetId)}}}let defaultEmptyConfig={},defaultEmptyPlaylist=[],MULTI_LINEAR_STREAM_PREFIX="multilinear:",RbupVideoRbcom=k$3(({_debug:c,accountsSdk:u,adsEnabled:d="INACTIVE",assetId:p,autoplay:h=!1,allowShareIframeEmbed:f=!1,alwaysShowEaseLive:m=!1,cookieConsent:g=DEFAULT_RBCOM_COOKIE_CONSENT,cornerbug:v,customDataLayer:y,details:b="visible",enableDataZoom:S="INACTIVE",environment:_,globalKeyboardNavigation:E,id:T,localeMixing:w,multiChannelSwitcher:P="visible",muted:A,includePreviewAssets:I,internalOnApiAvailable:M,internalRbcomOnApiAvailable:R,overrideAudioLanguage:k,overrideSubtitleLanguage:x,overrideTranslationLanguage:C,phasing:O,playlist:D=defaultEmptyPlaylist,playlistAutoAdvancing:L=!0,poster:N,"poster-image":U,productPlacement:F,relatedVideos:B,videoDescription:j,videoTitle:H,skipCosmosFontInjection:V=!1,aspectRatio:z,prNumber:q},W)=>{let G=null==p?void 0:p.startsWith(MULTI_LINEAR_STREAM_PREFIX),K=isTrueValue$1(m),Y=isTrueValue$1(I),X=F$4(()=>G?new RbcomMultiLinearDataLoader:new RbcomDataLoader(w,q,K,Y),[K,Y,G,w,q]),Q=F$4(()=>"ACTIVE"===d?new DfpAdService("rbcom"):void 0,[d]),[Z,J]=h$3(void 0),$=F$4(()=>(null==c?void 0:c.liveStatusDataLoader)??new RbcomLiveStatusDataLoader(q),[null==c?void 0:c.liveStatusDataLoader,q]),{urlSharingStrategy:ee,config:et,setConfig:ei,playlistEntriesRef:en,currentlyPlayingPlaylistEntryRef:er}=useRbcomConfig(c,h,p,v,g,j,_,f,P,A,k,x,C,O,N,F,B,H,y,S,b,D,F$4(()=>u?[new AccountService(u)]:[],[u]),V),{selectPlaylistEntryWithIndex:eo,autoAdvancePlaylistIfAllowed:ea}=usePlaylist(en,er,ei,F$4(()=>({adaptPlayerConfigForNextVideo:(c,u)=>adaptRbcomPlaylistConfig(c),isMuted:()=>null==Z?void 0:Z.isMuted()}),[Z]),isTrueValue$1(L)),{rbcomVideoApi:es}=useRbcomVideoApi(Z,en,W,eo);p$7(()=>{null==M||M.then(J).catch(c=>null==R?void 0:R.reject(c))},[R,M,es]),p$7(()=>{R&&Z&&R.resolve(es)},[R,es,Z]);let[el,ec]=h$3("INACTIVE"),eu=T$4((c="ACTIVE")=>{ec(c)},[]),ed=null==et?void 0:et.assetId;p$7(()=>{ed&&ec("INACTIVE")},[ed]);let ep=T$4(c=>o$i(CustomEaseLiveOverlayWrapperWithNextUp,{...c,easeLiveEnabled:"ACTIVE",onEaseLiveActivated:eu,autoAdvancePlaylistIfAllowed:ea,playlistEntriesRef:en,currentlyPlayingPlaylistEntryRef:er,showProductPlacement:"visible"===F}),[eu,ea,en,er,F]);return o$i(RbupVideoCoreDefaultTheme,{id:T,adService:Q,allowControlsCaptureAreaInteraction:"INACTIVE"===el,config:et??defaultEmptyConfig,CustomOverlayComponent:ep,customPosterImage:U,dataLoader:X,internalOnApiAvailable:M,liveStatusDataLoader:$,urlSharingStrategy:ee,aspectRatio:z,globalKeyboardNavigation:E})});function initRbupVideoRbcom(c,u){let d=createControllablePromise();return initRbupVideo(c,"rbup-video-rbcom",{"internal-rbcom-on-api-available":d,...u}).catch(c=>d.reject(c)),d}let rbcomObservedAttributes=["_debug","accounts-sdk","ads-enabled","allow-share-iframe-embed","always-show-ease-live","aspect-ratio","asset-id","auto
219play","cookie-consent","cornerbug","custom-data-layer","details","enable-data-zoom","environment","global-keyboard-navigation","include-preview-assets","internal-on-api-available","internal-rbcom-on-api-available","locale-mixing","multi-channel-switcher","muted","override-audio-language","override-subtitle-language","override-translation-language","phasing","playlist","playlist-auto-advancing","poster","pr-number","product-placement","related-videos","skip-cosmos-font-injection","video-description","video-title"],styles=".rbup-video-rbcom-chromeless{position:relative;overflow:hidden;aspect-ratio:var(--aspect-ratio);min-width:260px;min-height:150px}",RbupVideoRbcomChromeless=k$3(({_debug:c,assetId:u,autoplay:d=!1,customDataLayer:p,environment:h,globalKeyboardNavigation:f,prNumber:m,internalOnApiAvailable:g,localeMixing:v,overrideAudioLanguage:y,skipCosmosFontInjection:b=!1,aspectRatio:S},_)=>{let E=F$4(()=>new RbcomDataLoader(v,m),[v,m]),T=F$4(()=>({_debug:{playerAdapterType:null==c?void 0:c.playerAdapterType},autoplay:isTrueValue$1(d),assetId:u,chromeless:!0,environment:h,overrideAudioLanguage:y,skipCosmosFontInjection:isTrueValue$1(b),tracking:{configs:{googleAnalytics:{playerId:"",accountName:"",eventCustomizer:new RbcomTrackingEventCustomizer,dataLayer:p}}},videoDetails:"hidden",mediaSessionArtist:"Red Bull"}),[null==c?void 0:c.playerAdapterType,d,u,h,y,p,b]),w=validateGivenAspectRatio(S);return o$i(k$5,{children:[o$i("style",{children:styles}),o$i("div",{class:"rbup-video-rbcom-chromeless",style:{"--aspect-ratio":calcValueOfAspectRatio(w)},children:o$i(RbupVideoCore,{ref:_,config:T,dataLoader:E,internalOnApiAvailable:g,aspectRatio:w,globalKeyboardNavigation:f})})]})});function initRbupVideoRbcomChromeless(c,u){return initRbupVideo(c,"rbup-video-rbcom-chromeless",u)}let rbcomChromelessObservedAttributes=["aspect-ratio","asset-id","autoplay","cookie-consent","custom-data-layer","environment","global-keyboard-navigation","internal-on-api-available","locale-mixing","override-audio-language","pr-number","skip-cosmos-font-injection"];register(RbupVideoRbcom,"rbup-video-rbcom",rbcomObservedAttributes,{shadow:!0}),register(RbupVideoRbcomChromeless,"rbup-video-rbcom-chromeless",rbcomChromelessObservedAttributes,{shadow:!0}),register(RbupAudioRbcomMinimal,"rbup-audio-rbcom-minimal",rbcomAudioMinimalObservedAttributes,{shadow:!0}),register(RbupAudioRbcomMinimalWithControls,"rbup-audio-rbcom-minimal-with-controls",rbcomAudioMinimalWithControlsObservedAttributes,{shadow:!0}),register(RbupAudioRbcom,"rbup-audio-rbcom",rbcomAudioObservedAttributes,{shadow:!0}),window.initRbupVideoRbcom=initRbupVideoRbcom,window.initRbupVideoRbcomChromeless=initRbupVideoRbcomChromeless,window.initRbupAudioRbcom=initRbupAudioRbcom,window.initRbupAudioRbcomMinimal=initRbupAudioRbcomMinimal,window.initRbupAudioRbcomMinimalWithControls=initRbupAudioRbcomMinimalWithControls,__webpack_require__.d(__webpack_exports__,{initRbupAudioRbcom:()=>initRbupAudioRbcom,initRbupAudioRbcomMinimal:()=>initRbupAudioRbcomMinimal,initRbupAudioRbcomMinimalWithControls:()=>initRbupAudioRbcomMinimalWithControls,initRbupVideoRbcom:()=>initRbupVideoRbcom,initRbupVideoRbcomChromeless:()=>initRbupVideoRbcomChromeless})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.