| 3 | | !function(e,t){e.bs=e.bs||{},e.bs.net=e.bs.net||{},e.bs.player=e.bs.player||{},e.bs.player.composer=e.bs.player.composer||{},e.bs.player.core=e.bs.player.core||{},e.bs.player.core.events=e.bs.player.core.events||{},e.bs.player.core.manager=e.bs.player.core.manager||{},e.bs.player.core.model=e.bs.player.core.model||{},e.bs.player.core.plugin=e.bs.player.core.plugin||{},e.bs.player.core.plugin.chromecast=e.bs.player.core.plugin.chromecast||{},e.bs.util=e.bs.util||{},e.haxe=e.haxe||{},e.haxe.http=e.haxe.http||{},e.haxe.io=e.haxe.io||{},e.haxe.crypto=e.haxe.crypto||{},e.haxe.ds=e.haxe.ds||{},e.haxe.ds._List=e.haxe.ds._List||{},e.haxe.ds._StringMap=e.haxe.ds._StringMap||{},e.haxe.iterators=e.haxe.iterators||{};var s,n=function(){return ct.__string_rec(this,"")},r=r||{};class a{constructor(e,t){this.r=new RegExp(e,t.split("u").join(""));}match(e){return this.r.global&&(this.r.lastIndex=0),this.r.m=this.r.exec(e),this.r.s=e,null!=this.r.m}matched(e){if(null!=this.r.m&&e>=0&&e<this.r.m.length)return this.r.m[e];throw je.thrown("EReg::matched")}matchedLeft(){if(null==this.r.m)throw je.thrown("No string matched");return l.substr(this.r.s,0,this.r.m.index)}matchedRight(){if(null==this.r.m)throw je.thrown("No string matched");let e=this.r.m.index+this.r.m[0].length;return l.substr(this.r.s,e,this.r.s.length-e)}matchedPos(){if(null==this.r.m)throw je.thrown("No string matched");return {pos:this.r.m.index,len:this.r.m[0].length}}matchSub(e,t,s){if(null==s&&(s=-1),this.r.global){this.r.lastIndex=t,this.r.m=this.r.exec(s<0?e:l.substr(e,0,t+s));let n=null!=this.r.m;return n&&(this.r.s=e),n}{let n=this.match(s<0?l.substr(e,t,null):l.substr(e,t,s));return n&&(this.r.s=e,this.r.m.index+=t),n}}split(e){return e.replace(this.r,"#__delim__#").split("#__delim__#")}replace(e,t){return e.replace(this.r,t)}map(e,t){let s=0,n="";do{if(s>=e.length)break;if(!this.matchSub(e,s)){n+=c.string(l.substr(e,s,null));break}let r=this.matchedPos();n+=c.string(l.substr(e,s,r.pos-s)),n+=c.string(t(this)),0==r.len?(n+=c.string(l.substr(e,r.pos,1)),s=r.pos+1):s=r.pos+r.len;}while(this.r.global);return !this.r.global&&s>0&&s<e.length&&(n+=c.string(l.substr(e,s,null))),n}static escape(e){return e.replace(a.escapeRe,"\\$&")}}e.haxe.EReg=a,a.__name__="EReg",Object.assign(a.prototype,{__class__:a,r:null});class l{static dateStr(e){let t=e.getMonth()+1,s=e.getDate(),n=e.getHours(),r=e.getMinutes(),a=e.getSeconds();return e.getFullYear()+"-"+(t<10?"0"+t:""+t)+"-"+(s<10?"0"+s:""+s)+" "+(n<10?"0"+n:""+n)+":"+(r<10?"0"+r:""+r)+":"+(a<10?"0"+a:""+a)}static strDate(e){switch(e.length){case 8:let t=e.split(":"),s=new Date;return s.setTime(0),s.setUTCHours(t[0]),s.setUTCMinutes(t[1]),s.setUTCSeconds(t[2]),s;case 10:let n=e.split("-");return new Date(n[0],n[1]-1,n[2],0,0,0);case 19:let r=e.split(" "),a=r[0].split("-"),l=r[1].split(":");return new Date(a[0],a[1]-1,a[2],l[0],l[1],l[2]);default:throw je.thrown("Invalid date format : "+e)}}static cca(e,t){let s=e.charCodeAt(t);if(s==s)return s}static substr(e,t,s){if(null==s)s=e.length;else if(s<0){if(0!=t)return "";s=e.length+s;}return e.substr(t,s)}static indexOf(e,t,s){let n=e.length;for(s<0&&(s+=n)<0&&(s=0);s<n;){if(e[s]===t)return s;++s;}return -1}static lastIndexOf(e,t,s){let n=e.length;for(s>=n?s=n-1:s<0&&(s+=n);s>=0;){if(e[s]===t)return s;--s;}return -1}static remove(e,t){let s=e.indexOf(t);return -1!=s&&(e.splice(s,1),!0)}static iter(e){return {cur:0,arr:e,hasNext:function(){return this.cur<this.arr.length},next:function(){return this.arr[this.cur++]}}}static keyValueIter(e){return new rt(e)}static now(){return Date.now()}}e.haxe.HxOverrides=l,l.__name__="HxOverrides";class i{static array(e){let t=[],s=_t(e);for(;s.hasNext();)t.push(s.next());return t}static list(e){let t=new We,s=_t(e);for(;s.hasNext();)t.add(s.next());return t}static map(e,t){let s=[],n=_t(e);for(;n.hasNext();)s.push(t(n.next()));return s}static mapi(e,t){let s=0,n=[],r=_t(e);for(;r.hasNext();)n.push(t(s++,r.next()));return n}static flatten(e){let t=[],s=_t(e);for(;s.hasNext();){let e=_t(s.next());for(;e.hasNext();)t.push(e.next());}return t}static flatMap(e,t){let s=[],n=_t(e);for(;n.hasNext();)s.push(t(n.next()));let r=[],a=_t(s);for(;a.hasNext();){let e=_t(a.next());for(;e.hasNext();)r.push(e.next());}return r}static has(e,t){let s=_t(e);for(;s.hasNext();)if(s.next()==t)return !0;return !1}static exists(e,t){let s=_t(e);for(;s.hasNext();)if(t(s.next()))return !0;return !1}static foreach(e,t){let s=_t(e);for(;s.hasNext();)if(!t(s.next()))return !1;return !0}static iter(e,t){let s=_t(e);for(;s.hasNext();)t(s.next());}static filter(e,t){let s=[],n=_t(e);for(;n.hasNext();){let e=n.next();t(e)&&s.push(e);}return s}static fold(e,t,s){let n=_t(e);for(;n.hasNext();)s=t(n.next(),s);return s}static foldi(e,t,s){let n=0,r=_t(e);for(;r.hasNext();)s=t(r.next(),s,n),++n;return s}static count(e,t){let s=0;if(null==t){let t=_t(e);for(;t.hasNext();)t.next(),++s;}else {let n=_t(e);for(;n.hasNext();)t(n.next())&&++s;}return s}static empty(e){return !_t(e).hasNext()}static indexOf(e,t){let s=0,n=_t(e);for(;n.hasNext();){if(t==n.next())return s;++s;}return -1}static find(e,t){let s=_t(e);for(;s.hasNext();){let e=s.next();if(t(e))return e}return null}static findIndex(e,t){let s=0,n=_t(e);for(;n.hasNext();){if(t(n.next()))return s;++s;}return -1}static concat(e,t){let s=[],n=_t(e);for(;n.hasNext();)s.push(n.next());let r=_t(t);for(;r.hasNext();)s.push(r.next());return s}}e.haxe.Lambda=i,i.__name__="Lambda",Math.__name__="Math";class o{static hasField(e,t){return Object.prototype.hasOwnProperty.call(e,t)}static field(e,t){try{return e[t]}catch(e){return null}}static setField(e,t,s){e[t]=s;}static getProperty(e,t){let s;if(null==e)return null;{let n;return e.__properties__?(s=e.__properties__["get_"+t],n=s):n=!1,n?e[s]():e[t]}}static setProperty(e,t,s){let n,r;e.__properties__?(n=e.__properties__["set_"+t],r=n):r=!1,r?e[n](s):e[t]=s;}static callMethod(e,t,s){return t.apply(e,s)}static fields(e){let t=[];if(null!=e){let n=Object.prototype.hasOwnProperty;for(var s in e)"__id__"!=s&&"hx__closures__"!=s&&n.call(e,s)&&t.push(s);}return t}static isFunction(e){return "function"==typeof e&&!(e.__name__||e.__ename__)}static compare(e,t){return e==t?0:e>t?1:-1}static compareMethods(e,t){return e==t}static isObject(e){if(null==e)return !1;let t=typeof e;return "string"==t||"object"==t&&null==e.__enum__||"function"==t&&null!=(e.__name__||e.__ename__)}static isEnumValue(e){return null!=e&&null!=e.__enum__}static deleteField(e,t){return !!Object.prototype.hasOwnProperty.call(e,t)&&(delete e[t],!0)}static copy(e){if(null==e)return null;let t={},s=0,n=o.fields(e);for(;s<n.length;){let r=n[s];++s,t[r]=o.field(e,r);}return t}static makeVarArgs(e){return function(){let t=arguments,s=Array.prototype.slice.call(t);return e(s)}}}e.haxe.Reflect=o,o.__name__="Reflect";class c{static string(e){return ct.__string_rec(e,"")}static parseInt(e){let t=parseInt(e);return isNaN(t)?null:t}static random(e){return e<=0?0:Math.floor(Math.random()*e)}}c.__name__="Std";class u{constructor(){this.b="";}}u.__name__="StringBuf",Object.assign(u.prototype,{__class__:u,b:null});class _{}_.__name__="haxe.SysTools";class h{static urlEncode(e){return encodeURIComponent(e)}static urlDecode(e){return decodeURIComponent(e.split("+").join(" "))}static htmlEscape(e,t){let s="",n=0,r=e;for(;n<r.length;){let e=r,a=n++,l=e.charCodeAt(a);l>=55296&&l<=56319&&(l=l-55232<<10|1023&e.charCodeAt(a+1));l>=65536&&++n;let i=l;switch(i){case 34:s+=t?""":String.fromCodePoint(i);break;case 38:s+="&";break;case 39:s+=t?"'":String.fromCodePoint(i);break;case 60:s+="<";break;case 62:s+=">";break;default:s+=String.fromCodePoint(i);}}return s}static htmlUnescape(e){return e.split(">").join(">").split("<").join("<").split(""").join('"').split("'").join("'").split("&").join("&")}static contains(e,t){return e.includes(t)}static startsWith(e,t){return e.startsWith(t)}static endsWith(e,t){return e.endsWith(t)}static isSpace(e,t){let s=l.cca(e,t);return s>8&&s<14||32==s}static ltrim(e){let t=e.length,s=0;for(;s<t&&h.isSpace(e,s);)++s;return s>0?l.substr(e,s,t-s):e}static rtrim(e){let t=e.length,s=0;for(;s<t&&h.isSpace(e,t-s-1);)++s;return s>0?l.substr(e,0,t-s):e}static trim(e){return h.ltrim(h.rtrim(e))}static lpad(e,t,s){if(t.length<=0)return e;let n="";for(s-=e.length;n.length<s;)n+=null==t?"null":""+t;return n+=null==e?"null":""+e,n}static rpad(e,t,s){if(t.length<=0)return e;let n="";for(n=null==e?"null":""+e;n.length<s;)n+=null==t?"null":""+t;return n}static replace(e,t,s){return e.split(t).join(s)}static hex(e,t){let s="";do{s="0123456789ABCDEF".charAt(15&e)+s,e>>>=4;}while(e>0);if(null!=t)for(;s.length<t;)s="0"+s;return s}static fastCodeAt(e,t){return e.charCodeAt(t)}static unsafeCodeAt(e,t){return e.charCodeAt(t)}static iterator(e){return new lt(e)}static keyValueIterator(e){return new it(e)}static isEof(e){return e!=e}static quoteUnixArg(e){return ""==e?"''":new a("[^a-zA-Z0-9_@%+=:,./-]","").match(e)?"'"+h.replace(e,"'","'\"'\"'")+"'":e}static quoteWinArg(e,t){let s=e;if(!new a('^(/)?[^ \t/\\\\"]+$',"").match(s)){let e="",t=-1!=s.indexOf(" ")||-1!=s.indexOf("\t")||""==s||s.indexOf("/")>0;t&&(e+='"');let n=new u,r=0,a=s.length;for(;r<a;){let t=l.cca(s,r++);if(null==t){let s=t;n.b.length>0&&(e+=c.string(n.b),n=new u),e+=String.fromCodePoint(s);}else switch(t){case 34:let s=n.b;e+=c.string(s),e+=c.string(s),n=new u,e+='\\"';break;case 92:n.b+="\\";break;default:let r=t;n.b.length>0&&(e+=c.string(n.b),n=new u),e+=String.fromCodePoint(r);}}e+=c.string(n.b),t&&(e+=c.string(n.b),e+='"'),s=e;}if(t){let e="",t=0,n=s.length;for(;t<n;){let n=l.cca(s,t++);_.winMetaCharacters.indexOf(n)>=0&&(e+=String.fromCodePoint(94)),e+=String.fromCodePoint(n);}return e}return s}static utf16CodePointAt(e,t){let s=e.charCodeAt(t);return s>=55296&&s<=56319&&(s=s-55232<<10|1023&e.charCodeAt(t+1)),s}}e.haxe.StringTools=h,h.__name__="StringTools";class p{static createInstance(e,t){return new(Function.prototype.bind.apply(e,[null].concat(t)))}static getInstanceFields(e){let t=[];for(;null!=e;){let s=0,n=Object.getOwnPropertyNames(e.prototype);for(;s<n.length;){let e=n[s];switch(++s,e){case"__class__":case"__properties__":case"constructor":break;default:-1==t.indexOf(e)&&t.push(e);}}e=e.__super__;}return t}}p.__name__="Type";class d{static error(e){console.error(e);}}d.__name__="bs.Console";class g{constructor(e){g._hx_skip_constructor||this._hx_constructor(e);}_hx_constructor(e){this.url=e,this.headers=[],this.params=[],this.emptyOnData=ht(this,this.onData);}setHeader(e,t){let s=0,n=this.headers.length;for(;s<n;){let n=s++;if(this.headers[n].name==e)return void(this.headers[n]={name:e,value:t})}this.headers.push({name:e,value:t});}addHeader(e,t){this.headers.push({name:e,value:t});}setParameter(e,t){let s=0,n=this.params.length;for(;s<n;){let n=s++;if(this.params[n].name==e)return void(this.params[n]={name:e,value:t})}this.params.push({name:e,value:t});}addParameter(e,t){this.params.push({name:e,value:t});}setPostData(e){this.postData=e,this.postBytes=null;}setPostBytes(e){this.postBytes=e,this.postData=null;}request(e){throw new tt(null,null,{fileName:"haxe/http/HttpBase.hx",lineNumber:186,className:"haxe.http.HttpBase",methodName:"request"})}onData(e){}onBytes(e){}onError(e){}onStatus(e){}hasOnData(){return ht(this,this.onData)!=this.emptyOnData}success(e){this.responseBytes=e,this.responseAsString=null,this.hasOnData()&&this.onData(this.get_responseData()),this.onBytes(this.responseBytes);}get_responseData(){return null==this.responseAsString&&null!=this.responseBytes&&(this.responseAsString=this.responseBytes.getString(0,this.responseBytes.length,He.UTF8)),this.responseAsString}}e.haxe.http.HttpBase=g,g.__name__="haxe.http.HttpBase",Object.assign(g.prototype,{__class__:g,url:null,responseBytes:null,responseAsString:null,postData:null,postBytes:null,headers:null,params:null,emptyOnData:null,__properties__:{get_responseData:"get_responseData"}});class m extends g{constructor(e){g._hx_skip_constructor=!0,super(),g._hx_skip_constructor=!1,this._hx_constructor(e);}_hx_constructor(e){this.async=!0,this.withCredentials=!1,super._hx_constructor(e);}cancel(){null!=this.req&&(this.req.abort(),this.req=null);}request(e){this.responseAsString=null,this.responseBytes=null,this.responseHeaders=null;let s=this.req=ut.createXMLHttpRequest(),n=this,r=function(e){if(4!=s.readyState)return;let r;try{r=s.status;}catch(e){r=null;}if(0==r&&ut.get_supported()&&null!=t.location){let e=t.location.protocol.toLowerCase();new a("^(?:about|app|app-storage|.+-extension|file|res|widget):$","").match(e)&&(r=null!=s.response?200:404);}if(null==r&&(r=null),null!=r&&n.onStatus(r),null!=r&&r>=200&&r<400){n.req=null;let e=s.getAllResponseHeaders().split("\r\n"),t=[],r=0,a=e;for(;r<a.length;){let e=a[r];++r,""!=e&&t.push(e);}e=t,n.responseHeaders=new Ke;let l=0;for(;l<e.length;){let t=e[l++].split(": "),s=t.shift(),r=1==t.length?t[0]:t.join(": ");r=h.ltrim(h.rtrim(r)),n.responseHeaders.h[s]=r;}n.success(Re.ofData(s.response));}else if(null==r||0==r&&null==s.response)n.req=null,n.onError("Failed to connect or resolve host");else if(null==r){n.req=null;let e=null!=s.response?Re.ofData(s.response):null;n.responseBytes=e,n.onError("Http Error #"+s.status);}else switch(r){case 12007:n.req=null,n.onError("Unknown host");break;case 12029:n.req=null,n.onError("Failed to connect to host");break;default:n.req=null;let e=null!=s.response?Re.ofData(s.response):null;n.responseBytes=e,n.onError("Http Error #"+s.status);}};this.async&&(s.onreadystatechange=r);let l=this.postData,o=this.postBytes,u=null==l?null==o?null:new Blob([o.b.bufferValue]):null==o?l:null;if(null!=u)e=!0;else {let e=0,t=this.params;for(;e<t.length;){let s=t[e];++e,u=null==u?"":(null==u?"null":c.string(u))+"&";let n=s.name,r=(null==u?"null":c.string(u))+encodeURIComponent(n)+"=",a=s.value;u=r+encodeURIComponent(a);}}try{e?s.open("POST",this.url,this.async):null!=u?(s.open("GET",this.url+(this.url.split("?").length<=1?"?":"&")+(null==u?"null":c.string(u)),this.async),u=null):s.open("GET",this.url,this.async),s.responseType="arraybuffer";}catch(l){let e=je.caught(l).unwrap();return this.req=null,void this.onError(e.toString())}s.withCredentials=this.withCredentials,!i.exists(this.headers,(function(e){return "Content-Type"==e.name}))&&e&&null==this.postData&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded");let _=0,p=this.headers;for(;_<p.length;){let e=p[_];++_,s.setRequestHeader(e.name,e.value);}s.send(u),this.async||r();}static requestUrl(e){let t=new m(e);t.async=!1;let s=null;return t.onData=function(e){s=e;},t.onError=function(e){throw je.thrown(e)},t.request(!1),s}}e.haxe.http.HttpJs=m,m.__name__="haxe.http.HttpJs",m.__super__=g,Object.assign(m.prototype,{__class__:m,async:null,withCredentials:null,responseHeaders:null,req:null});class f extends m{constructor(e){super(e);}registerEvents(e){let t=this;e.onreadystatechange=function(){if(4!=e.readyState)return;let s;try{s=e.status;}catch(e){s=null;}if(null==s&&(s=null),null!=s&&t.onStatus(s),null!=s&&s>=200&&s<400)t.onData(e.response);else if(null==s)t.onError("Failed to connect or resolve host");else switch(s){case 0:t.onError("Unable to make request (may be blocked due to cross-domain permissions)");break;case 12007:t.onError("Unknown host");break;case 12029:t.onError("Failed to connect to host");break;default:t.onError("Http Error #"+e.status);}};}customRequest(e,t,s,n){let r=new XMLHttpRequest;this.registerEvents(r);let a="",l=0,i=this.params;for(;l<i.length;){let e=i[l];++l,0!=a.length&&(a=c.string(a)+"&");let t=o.field(e,"name");null==t&&(t=o.field(e,"param"));let s=encodeURIComponent(t),n=e.value,r=encodeURIComponent(n);a=c.string(a)+(s+"=")+r;}try{"GET"==n&&null!=a&&""!=a?(r.open(n,this.url+(this.url.split("?").length<=1?"?":"&")+c.string(a),!0),a=""):r.open(n,this.url,!0);}catch(l){let e=je.caught(l).unwrap();return void this.onError(e.toString())}let u=0,_=this.headers;for(;u<_.length;){let e=_[u];++u;let t=o.field(e,"header");null==t&&(t=o.field(e,"name")),r.setRequestHeader(t,e.value);}r.send(a);}}e.bs.net.Http=f,f.__name__="bs.net.Http",f.__super__=m,Object.assign(f.prototype,{__class__:f});class y{constructor(){this.pluginsVideo=[],this.plugins=[],this.data=exports.configuration;}createPlayer(e,t,s){return null==e&&(e="PLAYER"),this.readPlugins(e),this.player=new w,this.player.uid=e,this.player.plugins=this.plugins,this.player.pluginsVideo=this.pluginsVideo,this.player.initialize(this.getParent(t),this.getData(s)),this.player}readPlugins(e){this.resolvePlugins(e,exports.bs.player.plugin);let t=function(e){switch(e.className){case"bs.player.plugin.advertisement.AdvertisementDataProvider":case"bs.player.plugin.dataProvider.BradmaxDataProvider":return 1;case"bs.player.plugin.skin.HtmlSkin":return 0;case"bs.player.plugin.freewheel.FreeWheel":case"bs.player.plugin.video.Video":return 2;default:return 3}};this.plugins.sort((function(e,s){return t(e)-t(s)}));}resolvePlugins(e,t){if(0==o.isObject(t))return;let s=t.__name__;if(null!=s){let n,r=p.createInstance(t,[]),a=t;if(0==o.isObject(a))n=!1;else {let e=Object.prototype.hasOwnProperty.call(a,"__plugfaces__")?o.field(a,"__plugfaces__"):null;n=null!=e&&e.indexOf("IVideoPlayer")>-1;}if(n)return void this.pluginsVideo.push(r);let l,i=t;if(0==o.isObject(i))l=!1;else {let e=Object.prototype.hasOwnProperty.call(i,"__plugfaces__")?o.field(i,"__plugfaces__"):null;l=null!=e&&e.indexOf("IPlugin")>-1;}if(l)return r.className=s,r.uid=r.context=e,void this.plugins.push(r)}else {let s=0,n=o.fields(t);for(;s<n.length;)this.resolvePlugins(e,o.field(t,n[s++]));}}getData(e){return null!=e?e:this.data}getParent(e){return null!=e?e:this.parent}}y.__name__="bs.player.composer.Composer",Object.assign(y.prototype,{__class__:y,data:null,parent:null,plugins:null,pluginsVideo:null,player:null});class b{__keepFieldsFix(){return p.getInstanceFields(b)}static getScreenSize(){let e=window.screen;return {width:0|(e.width>e.height?e.width:e.height),height:0|(e.width>e.width?e.height:e.width)}}static isMobile(){return b.mobile}static isSmartTV(){return b.smartTV}static getUserAgent(){return window.navigator.userAgent}static getBrowserName(){return b.browserName}static isBrowserOnline(){return window.navigator.onLine}static baseUrl(){let e=t.location;return b.baseUrlCacheLastFullUrl!=e.href&&(b.baseUrlCacheLastFullUrl=e.href,b.baseUrlCacheLastBaseUrl=b.baseUrlCacheLastFullUrl.split(e.hash).join("")),b.baseUrlCacheLastBaseUrl}static log(e){null==b.traceLog&&(b.traceLog="<h5>trace:</h5>"),b.traceLog+="<p>"+e+"</p>",b.printLog(),null==b.traceTrg&&window.addEventListener("load",b.printLog);}static printLog(){null==b.traceTrg&&(b.traceTrg=window.document.getElementById("trace")),null!=b.traceTrg&&(b.traceTrg.innerHTML=b.traceLog);}static highlightHtmlNode(e){let t,s=window.document.body;if(Object.prototype.hasOwnProperty.call(s,"createTextRange"))t=s.createTextRange(),t.moveToElementText(e),t.select();else {let s=window.getSelection();t=window.document.createRange(),t.selectNodeContents(e),s.removeAllRanges(),s.addRange(t);}}static copyToClipboard(e){let t=window.document.createElement("input");t.style.fontSize="12pt",t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute","rtl"==window.document.documentElement.getAttribute("dir")?t.style.right="-9999px":t.style.left="-9999px";let s,n=window.pageYOffset;null==n&&(n=window.document.documentElement.scrollTop),t.addEventListener("focus",(function(e){window.scrollTo(0,n);})),t.style.top=n+"px",t.setAttribute("readonly",""),t.value=e,window.document.body.appendChild(t),t.focus(),t.setSelectionRange(0,t.value.length);try{s=window.document.execCommand("copy");}catch(e){s=!1;}return t.blur(),window.document.body.removeChild(t),s}static findThisJsScriptAbsolutePath(e){let t=null;if(t=window.document.currentScript,null!=t)return t.src;let s=window.document.getElementsByTagName("script");return t=b.findScriptBySrc(s,e),null==t&&e.endsWith("_")&&(t=b.findScriptBySrc(s,l.substr(e,0,-1))),null!=t?t.src:null}static findScriptBySrc(e,t){let s=null,n=0;for(;n<e.length;){let r=e[n];if(++n,s=r.getAttribute("src"),null!=s&&(s=s.split("/").pop(),s=s.split(".min.js").join(""),s=s.split(".js.min").join(""),s=s.split(".js").join(""),s==t))return r}return null}static disableHtmlSelection(){b.disableHtmlSelectionFunction=function(e){return e.preventDefault(),!1},window.document.addEventListener("selectstart",b.disableHtmlSelectionFunction);}static enableHtmlSelection(){null!=b.disableHtmlSelectionFunction&&(window.document.removeEventListener("selectstart",b.disableHtmlSelectionFunction),b.disableHtmlSelectionFunction=null);}static canRequestVideoFrameCallback(){return "requestVideoFrameCallback"in HTMLVideoElement.prototype}static isWebGLAvailable(){try{let e=window,t=Object.prototype.hasOwnProperty.call(e,"WebGLRenderingContext"),s=window.document.createElement("canvas");if(!t)return t;let n=null!=s.getContext("webgl")||null!=s.getContext("experimental-webgl");return !!t&&n}catch(e){return !1}}static isWebGL2Available(){try{let e=window,t=Object.prototype.hasOwnProperty.call(e,"WebGL2RenderingContext"),s=window.document.createElement("canvas");if(!t)return t;let n=null!=s.getContext("webgl2");return !!t&&n}catch(e){return !1}}static getOrientation(){if(null!=window.screen.orientation)return window.screen.orientation.angle;let e=window.orientation;return "number"==typeof e&&(0|e)===e?window.orientation:0}static isDeviceOrientationSupported(){let e=window;return Object.prototype.hasOwnProperty.call(e,"DeviceOrientationEvent")}static connectDeviceOrientation(e,t){b.isDeviceOrientationSupported()&&(null!=DeviceOrientationEvent.requestPermission?DeviceOrientationEvent.requestPermission().then((function(t){"granted"==t&&window.addEventListener("deviceorientation",e,!1);})).catch(d.error):window.addEventListener("deviceorientation",e,!1));}static disconnectDeviceOrientation(e){b.isDeviceOrientationSupported()&&window.removeEventListener("deviceorientation",e);}static isVrSupported(){let e=t.navigator;if(null==e)return Promise.resolve(!1);let s=e.xr;return null==s?Promise.resolve(!1):s.isSessionSupported("immersive-vr")}static requestVrSession(){let e=t.navigator;if(null==e)return Promise.resolve(null);let s=e.xr;return null==s?Promise.resolve(null):s.requestSession("immersive-vr",{optionalFeatures:["local-floor","bounded-floor","hand-tracking","layers"]})}}e.bs.util.BrowserTools=b,b.__name__="bs.util.BrowserTools",Object.assign(b.prototype,{__class__:b});class x{constructor(){this.runDetectScripts();}runDetectScripts(){x.expose.player.list=ht(this,this.listPlayers),x.expose.player.create=ht(this,this.createPlayerInElement),x.expose.player.destroy=ht(this,this.destroyPlayer),x.expose.player.getById=ht(this,this.getPlayerById),x.expose.player.getVersion=ht(this,this.getVersion),x.expose.player.collectClickForLaterAutoplay=x.collectClickForLaterAutoplay,this.detectScript(),this.detectScriptAttributes();}getVersion(){return "v2.14.287"}getPlayerById(e){return x.players.h[e]}destroyPlayer(e){if(null==e)return;let t=e.uid,s=x.players;Object.prototype.hasOwnProperty.call(s.h,t)&&delete s.h[t],e.destroy(!0);let n=window.document.getElementById("player_con_"+e.uid.split("_")[1]);null!=n&&ct.__cast(n.parentNode,HTMLDivElement).removeAttribute("data-bradmax-player-pid");let r=window.document.getElementById(e.uid);null!=r&&r.parentNode.removeChild(r),null!=n&&null!=n.remove&&n.remove();}checkIfPlayerExistInElement(e){return !!e.hasAttribute("data-bradmax-player-pid")}getPlayerByElement(e){return e.hasAttribute("data-bradmax-player-pid")?x.players.h["player_"+e.getAttribute("data-bradmax-player-pid")]:null}createPlayerInElement(e,t,s){return this.checkIfPlayerExistInElement(e)?this.getPlayerByElement(e):"string"==typeof t&&null==(t=ke.decode(t))?(console.error("PLAYER VARIABLE DATA INVALID"),null):this.createPlayer(e,t,null,"inside",s)}createPlayer(e,t,s,n,r){if(null==n&&(n="before"),null==s){let e,t=24,n=Fe.UID_CHARS.length,r="",a=0;for(;a<t;){let t;switch(e="xxxx-xxxx-xxxx-xxxx-xxxx".charAt(a++),e){case"-":case"_":t=e;break;default:t=Fe.UID_CHARS.charAt(c.random(n));}r+=t;}s=r;}let a="player_"+s;this.setPID(e,s);let l=window.document.createElement("div");switch(l.setAttribute("id","player_con_"+s),l.style.display="block",l.style.position="relative",l.style.width="100%",l.style.height="100%",l.style.background="#000000",l.style.overflow="hidden",n){case"before":e.parentElement.insertBefore(l,e);break;case"inside":e.appendChild(l);}let i=window.document.createElement("div");return i.setAttribute("id",a),i.setAttribute("class","bsplayer"),i.style.display="block",i.style.position="relative",i.style.width="100%",i.style.height="100%",i.style.background="#000000",i.style.overflow="hidden",l.appendChild(i),this.appendPlayer(this.useHTML5(i,t,a,r))}appendPlayer(e){x.players.h[e.uid]=e;try{window._ba_createPlayer(e);}catch(e){}return e}listPlayers(){let e=[],t=x.players.h,s=Object.keys(t),n=s.length,r=0;for(;r<n;)e.push(t[s[r++]]);return e}detectScriptAttributes(){let e=window.document.getElementsByTagName("script"),t=[],s=0;for(;s<e.length;)t.push(e[s++]);let n=function(e){let t=null!=e.innerText?h.trim(e.innerText):null;return !(null==t||!t.startsWith("{"))&&t.endsWith("}")},r=0;for(;r<t.length;){let e=t[r];if(++r,((a=e).hasAttribute("data-bs-variables")||n(a))&&a.hasAttribute("data-bs-parent-id")&&!a.hasAttribute("data-bradmax-player-pid")){let t={},r=null,a=e.getAttribute("data-bs-parent-id");try{if(r=window.document.getElementById(a),e.hasAttribute("data-bs-variables")&&(t=ke.decode(e.getAttribute("data-bs-variables"))),(null==t||0==o.fields(t).length)&&null!=e.innerText&&n(e))try{t=JSON.parse(e.innerText);}catch(s){let e=je.caught(s).unwrap();return console.error("INNER TEXT VARIABLE INVALID DATA"),void console.error(e)}if(null==t)return void console.error("INLINE VARIABLE DATA INVALID")}catch(s){let e=je.caught(s).unwrap();return console.error("VARIABLE DATA INVALID"),void console.error(e)}if(null==r)return void console.error("ELEMENT ID NOT FOUND: "+a);this.createPlayer(r,t,null,"inside");}}var a;}detectScript(){let e=window.document.getElementsByTagName("script"),t=0;for(;t<e.length;){let s=e[t];if(++t,this.isEmptyPlayerScript(s)){let e={};try{e=JSON.parse(s.textContent);}catch(t){return void console.error("JSON DATA INVALID")}this.createPlayer(s,e);}}}isEmptyPlayerScript(e){return !(!e.hasAttribute("data-bigsoda-player")||e.hasAttribute("data-bradmax-player-pid"))}useHTML5(e,t,s,n){let r=o.field(o.field(x.expose,"player"),"composers"),a=o.fields(r);return p.createInstance(o.field(r,null==n?a[0]:n),[]).createPlayer(s,e,t)}setPID(e,t){return e.hasAttribute("data-bradmax-player-pid")||e.setAttribute("data-bradmax-player-pid",t),e.getAttribute("data-bradmax-player-pid")}__keepFieldsFix(){return p.getInstanceFields(x)}static main(){null==x.expose.player.embeder&&(x.expose.player.embeder={},null==o.field(x.expose.player.embeder,"modular_v2.14.287")&&(x.expose.player.embeder["modular_v2.14.287"]=new x));}static collectClickForLaterAutoplay(){if(x.lastCallForCollectClickForLaterAutoplay=new Date,x.htmlVideoElementsForLaterAutoplay.length>=2)return;let e=window.document.createElement("video");e.controls=!1,e.setAttribute("src",exports.mp4),e.setAttribute(x.VIDEO_TAG_FOR_AUTOPLAY_INITIALSED,"1"),b.isiOS&&(e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""));let t=e.play();null!=t?(x.pendingVideoElementsForLaterAutoplay+=1,t.then((function(){e.pause(),x.htmlVideoElementsForLaterAutoplay.push(e),x.pendingVideoElementsForLaterAutoplay-=1;let t=0,s=x.listenersWaitinfForVideoElementForAutoplay;for(;t<s.length;)s[t++]();x.listenersWaitinfForVideoElementForAutoplay=[];}))):(e.pause(),x.htmlVideoElementsForLaterAutoplay.push(e));}static getLastCallForCollectClickForLaterAutoplay(){return x.lastCallForCollectClickForLaterAutoplay}static getHtmlVideoReadyForAutoplay(){return 0==x.htmlVideoElementsForLaterAutoplay.length?null:x.htmlVideoElementsForLaterAutoplay.pop()}static hasPendingVideoElementsForLaterAutoplay(){return x.pendingVideoElementsForLaterAutoplay>0}static hasHtmlVideoReadyForAutoplay(){return x.htmlVideoElementsForLaterAutoplay.length>0}static addListenerForVideoElementForAutoplay(e){x.listenersWaitinfForVideoElementForAutoplay.push(e);}}e.bs.player.composer.Embeder=x,x.__name__="bs.player.composer.Embeder",Object.assign(x.prototype,{__class__:x});class w{constructor(){this.modules={},this.pluginsVideo=[],this.plugins=[],this.eventHub=j.getInstance();}destroy(e){if(null==e&&(e=!1),!e)return void window.bradmax.player.destroy(this);try{V.destroyMonitor(this.uid);}catch(t){let e=je.caught(t).unwrap();console.error({msg:"Exception catched during destroying monitor.",exception:e});}let t=0,s=this.plugins;for(;t<s.length;){let e=s[t];++t;try{e.destroy();}catch(t){let s=je.caught(t).unwrap();console.error({msg:"Exception catched during destroying plugin.",plugin:e,exception:s});}}for(;this.plugins.length>0;)this.plugins.pop();}activatePlugins(){let e=0,t=this.plugins;for(;e<t.length;){let s=t[e];++e,s.context=s.uid=this.uid,s.set_player(this),this.eventHub.registerPlugin(s),s.set_parentDisplay(this.parent),s.set_variables(this.data),this.modules[s.getPluginName()]=s,"JavascriptApi"==s.getPluginName()&&(this.api=s);}let s=0,n=this.plugins;for(;s<n.length;)n[s++].create();let r=0,a=this.plugins;for(;r<a.length;)a[r++].activate();let l=0,i=this.plugins;for(;l<i.length;)i[l++].postActivate();}initialize(e,t){this.parent=e,this.data=De.merge(exports.variables,t),V.getMonitor(this.uid),this.activatePlugins();}__keepFieldsFix(){return p.getInstanceFields(w)}}e.bs.player.core.Player=w,w.__name__="bs.player.core.Player",Object.assign(w.prototype,{__class__:w,uid:null,configuration:null,plugins:null,pluginsVideo:null,modules:null,api:null,parentDisplay:null,parent:null,data:null,eventHub:null});class v{constructor(e){this.className="bs.player.core.events.BaseEvent",this.type=e;}dispatch(e){j.getInstance().dispatch(e,O.__name__,this.type,this);}__keepFieldsFix(){return p.getInstanceFields(v)}}e.bs.player.core.events.BaseEvent=v,v.__name__="bs.player.core.events.BaseEvent",Object.assign(v.prototype,{__class__:v,className:null,type:null,data:null});class O extends v{constructor(e){super(e),this.className=O.__name__;}dispatch(e){j.getInstance().dispatch(e,O.__name__,this.type,this);}static addOnce(e,t,s){j.getInstance().addOnce(e,O.__name__,t,s);}static add(e,t,s){j.getInstance().add(e,O.__name__,t,s);}static remove(e,t,s){j.getInstance().remove(e,O.__name__,t,s);}static disable(e,t){j.getInstance().disable(e,O.__name__,t);}static enable(e,t){j.getInstance().enable(e,O.__name__,t);}}e.bs.player.core.events.AdEvent=O,O.__name__="bs.player.core.events.AdEvent",O.__super__=v,Object.assign(O.prototype,{__class__:O});class C extends v{constructor(e){super(e),this.className=C.__name__;}dispatch(e){j.getInstance().dispatch(e,C.__name__,this.type,this);}static addOnce(e,t,s){j.getInstance().addOnce(e,C.__name__,t,s);}static add(e,t,s){j.getInstance().add(e,C.__name__,t,s);}static remove(e,t,s){j.getInstance().remove(e,C.__name__,t,s);}static disable(e,t){j.getInstance().disable(e,C.__name__,t);}static enable(e,t){j.getInstance().enable(e,C.__name__,t);}}e.bs.player.core.events.ChromecastEvent=C,C.__name__="bs.player.core.events.ChromecastEvent",C.__super__=v,Object.assign(C.prototype,{__class__:C});class I extends v{constructor(e){super(e),this.className=I.__name__;}dispatch(e){j.getInstance().dispatch(e,I.__name__,this.type,this);}static add(e,t,s){j.getInstance().add(e,I.__name__,t,s);}static addOnce(e,t,s){j.getInstance().addOnce(e,I.__name__,t,s);}static remove(e,t,s){j.getInstance().remove(e,I.__name__,t,s);}static disable(e,t){j.getInstance().disable(e,I.__name__,t);}static enable(e,t){j.getInstance().enable(e,I.__name__,t);}static filter(e){}}e.bs.player.core.events.ControlEvent=I,I.__name__="bs.player.core.events.ControlEvent",I.__super__=v,Object.assign(I.prototype,{__class__:I});class S extends v{constructor(e){super(e),this.className=S.__name__;}dispatch(e){j.getInstance().dispatch(e,S.__name__,this.type,this);}static addOnce(e,t,s){j.getInstance().addOnce(e,S.__name__,t,s);}static add(e,t,s){j.getInstance().add(e,S.__name__,t,s);}static remove(e,t,s){j.getInstance().remove(e,S.__name__,t,s);}static disable(e,t){j.getInstance().disable(e,S.__name__,t);}static enable(e,t){j.getInstance().enable(e,S.__name__,t);}static filter(e){}}e.bs.player.core.events.DataProviderEvent=S,S.__name__="bs.player.core.events.DataProviderEvent",S.__super__=v,Object.assign(S.prototype,{__class__:S});class E extends v{constructor(e){super(e),this.className=E.__name__;}dispatch(e){j.getInstance().dispatch(e,E.__name__,this.type,this);}static addOnce(e,t,s){j.getInstance().addOnce(e,E.__name__,t,s);}static add(e,t,s){j.getInstance().add(e,E.__name__,t,s);}static remove(e,t,s){j.getInstance().remove(e,E.__name__,t,s);}static disable(e,t){j.getInstance().disable(e,E.__name__,t);}static enable(e,t){j.getInstance().enable(e,E.__name__,t);}}e.bs.player.core.events.DisplayEvent=E,E.__name__="bs.player.core.events.DisplayEvent",E.__super__=v,Object.assign(E.prototype,{__class__:E});class P extends v{constructor(e){super(e),this.className=P.__name__;}dispatch(e){j.getInstance().dispatch(e,P.__name__,this.type,this);}static addOnce(e,t,s){j.getInstance().addOnce(e,P.__name__,t,s);}static add(e,t,s){j.getInstance().add(e,P.__name__,t,s);}static remove(e,t,s){j.getInstance().remove(e,P.__name__,t,s);}static disable(e,t){j.getInstance().disable(e,P.__name__,t);}static enable(e,t){j.getInstance().enable(e,P.__name__,t);}}e.bs.player.core.events.EditEvent=P,P.__name__="bs.player.core.events.EditEvent",P.__super__=v,Object.assign(P.prototype,{__class__:P});class L extends v{constructor(e){super(e),this.className=L.__name__;}dispatch(e){j.getInstance().dispatch(e,L.__name__,this.type,this);}static add(e,t,s){j.getInstance().add(e,L.__name__,t,s);}static disable(e,t){j.getInstance().disable(e,L.__name__,t);}static enable(e,t){j.getInstance().enable(e,L.__name__,t);}static filter(e){}}e.bs.player.core.events.ErrorEvent=L,L.__name__="bs.player.core.events.ErrorEvent",L.__super__=v,Object.assign(L.prototype,{__class__:L,message:null});class A{constructor(){}setPlatformEvent(e){this.platformEvent=e;}stopPropagation(){null!=this.platformEvent.stopPropagation?(this.platformEvent.stopPropagation(),this.platformEvent.preventDefault()):this.platformEvent.cancelBubble=!0;}__keepFieldsFix(){return p.getInstanceFields(A)}static get_FULLSCREEN_CHANGE(){return A.fullscreenEventName}}e.bs.player.core.events.NativeEvent=A,A.__name__="bs.player.core.events.NativeEvent",A.__properties__={get_FULLSCREEN_CHANGE:"get_FULLSCREEN_CHANGE"},Object.assign(A.prototype,{__class__:A,currentTarget:null,target:null,type:null,mouseX:null,mouseY:null,wheelDelta:null,platformEvent:null});class k extends v{constructor(e){super(e),this.className=k.__name__;}}e.bs.player.core.events.PlayerCommandEvent=k,k.__name__="bs.player.core.events.PlayerCommandEvent",k.__super__=v,Object.assign(k.prototype,{__class__:k});class D extends v{constructor(e){super(e),this.className=D.__name__;}dispatch(e){j.getInstance().dispatch(e,D.__name__,this.type,this);}static add(e,t,s){j.getInstance().add(e,D.__name__,t,s);}static remove(e,t,s){j.getInstance().remove(e,D.__name__,t,s);}static disable(e,t){j.getInstance().disable(e,D.__name__,t);}static enable(e,t){j.getInstance().enable(e,D.__name__,t);}static filter(e){}}e.bs.player.core.events.ResizeEvent=D,D.__name__="bs.player.core.events.ResizeEvent",D.__super__=v,Object.assign(D.prototype,{__class__:D});class U extends v{constructor(e){super(e),this.className=U.__name__;}dispatch(e){j.getInstance().dispatch(e,U.__name__,this.type,this);}static add(e,t,s){j.getInstance().add(e,U.__name__,t,s);}static addOnce(e,t,s){j.getInstance().addOnce(e,U.__name__,t,s);}static remove(e,t,s){j.getInstance().remove(e,U.__name__,t,s);}static disable(e,t){j.getInstance().disable(e,U.__name__,t);}static enable(e,t){j.getInstance().enable(e,U.__name__,t);}static filter(e){}}e.bs.player.core.events.SphericalVideoEvent=U,U.__name__="bs.player.core.events.SphericalVideoEvent",U.__super__=v,Object.assign(U.prototype,{__class__:U});class F extends v{constructor(e){super(e),this.className=F.__name__;}dispatch(e){j.getInstance().dispatch(e,F.__name__,this.type,this);}static add(e,t,s){j.getInstance().add(e,F.__name__,t,s);}static remove(e,t,s){j.getInstance().remove(e,F.__name__,t,s);}static disable(e,t){j.getInstance().disable(e,F.__name__,t);}static enable(e,t){j.getInstance().enable(e,F.__name__,t);}static filter(e){}}e.bs.player.core.events.SubtitleEvent=F,F.__name__="bs.player.core.events.SubtitleEvent",F.__super__=v,Object.assign(F.prototype,{__class__:F});class N extends v{constructor(e){super(e),this.className=N.__name__;}dispatch(e){j.getInstance().dispatch(e,N.__name__,this.type,this);}static addOnce(e,t,s){j.getInstance().addOnce(e,N.__name__,t,s);}static add(e,t,s){j.getInstance().add(e,N.__name__,t,s);}static remove(e,t,s){j.getInstance().remove(e,N.__name__,t,s);}static disable(e,t){j.getInstance().disable(e,N.__name__,t);}static enable(e,t){j.getInstance().enable(e,N.__name__,t);}}e.bs.player.core.events.VideoEvent=N,N.__name__="bs.player.core.events.VideoEvent",N.__super__=v,Object.assign(N.prototype,{__class__:N});class j{constructor(){null==j.instance&&(this.plugins=[]);}registerPlugin(e){this.plugins.push(e),e.set_eventHub(this);}dispatch(e,t,s,n){let r=e+" | "+t+" | "+s;if(!this.isEnabled(r))return;let a=!1,l=0,i=this.plugins;for(;l<i.length;){let t=i[l];++l,t.context==e&&0==t.eventFilter(n)&&(a=!0);}if(!a){if(Object.prototype.hasOwnProperty.call(j.listenersMap.h,r)){let e=0,t=j.listenersMap.h[r];for(;e<t.length;)t[e++](n);}if(Object.prototype.hasOwnProperty.call(j.onceListenersMap.h,r)){let a=0,l=j.onceListenersMap.h[r];for(;a<l.length;)l[a++](n);let i=0,o=j.onceListenersMap.h[r];for(;i<o.length;)this.remove(e,t,s,o[i++]);}}}addOnce(e,t,s,n){let r,a=e+" | "+t+" | "+s;if(Object.prototype.hasOwnProperty.call(j.onceListenersMap.h,a))r=j.onceListenersMap.h[a];else {let e=[];j.onceListenersMap.h[a]=e,r=j.onceListenersMap.h[a];}let l=0;for(;l<r.length;)if(r[l++]==n)return !1;return r.push(n),!0}add(e,t,s,n){let r,a=e+" | "+t+" | "+s;if(Object.prototype.hasOwnProperty.call(j.listenersMap.h,a))r=j.listenersMap.h[a];else {let e=[];j.listenersMap.h[a]=e,r=j.listenersMap.h[a];}let l=0;for(;l<r.length;)if(r[l++]==n)return;r.push(n);}remove(e,t,s,n){let r=e+" | "+t+" | "+s;this.removeListenerFromMap(r,n,j.listenersMap),this.removeListenerFromMap(r,n,j.onceListenersMap);}isEnabled(e){let t=j.disabledListenersMap.h[e];return null==t||0==t}disable(e,t,s){let n=e+" | "+t+" | "+s,r=j.disabledListenersMap.h[n];j.disabledListenersMap.h[n]=null==r?1:r+1;}enable(e,t,s){let n=e+" | "+t+" | "+s,r=j.disabledListenersMap.h[n];if(null!=r&&r>0)if(--r,r<=0){let e=j.disabledListenersMap;Object.prototype.hasOwnProperty.call(e.h,n)&&delete e.h[n];}else j.disabledListenersMap.h[n]=r;}removeListenerFromMap(e,t,s){let n=[];if(Object.prototype.hasOwnProperty.call(s.h,e)&&(n=s.h[e]),n.length>0){let r=0;for(;r<n.length;)if(n[r++]==t){let r=n.slice();return l.remove(r,t),void(s.h[e]=r)}}}__keepFieldsFix(){return p.getInstanceFields(j)}static getInstance(){return j.instance}}e.bs.player.core.manager.EventHub=j,j.__name__="bs.player.core.manager.EventHub",Object.assign(j.prototype,{__class__:j,plugins:null});class B{constructor(e,t,s,n,r){this.langCodeLong=t,this.langCodeShort=e,this.englishName=s,this.nativeName=n,this.relatedLangCodes=r;}__keepFieldsFix(){return p.getInstanceFields(B)}}e.bs.player.core.manager.LangInfo=B,B.__name__="bs.player.core.manager.LangInfo",Object.assign(B.prototype,{__class__:B,langCodeShort:null,langCodeLong:null,englishName:null,nativeName:null,relatedLangCodes:null});class M{constructor(){if(null!=M.instance)return;let e=[];e.push(new B("no","nor",this.toUtf8("Norwegian"),this.toUtf8("Norsk"),["nb","nn"])),e.push(new B("nb","nob",this.toUtf8("Norwegian%20Bokm%C3%A5l"),this.toUtf8("Norsk"),["no","nn"])),e.push(new B("nn","nno",this.toUtf8("Norwegian%20Nynorsk"),this.toUtf8("Norsk%20nynorsk"),["no","nb"])),e.push(new B("da","dan",this.toUtf8("Danish"),this.toUtf8("dansk"),["dk"])),e.push(new B("sv","swe",this.toUtf8("Swedish"),this.toUtf8("svenska"),["se"])),e.push(new B("be","bel",this.toUtf8("Belarusian"),this.toUtf8("%D0%91%D0%B5%D0%BB%D0%B0%D1%80%D1%83%D1%81%D0%BA%D0%B0%D1%8F"))),e.push(new B("bs","bos",this.toUtf8("Bosnian"),this.toUtf8("bosanski%20jezik"))),e.push(new B("bg","bul",this.toUtf8("Bulgarian"),this.toUtf8("%D0%B1%D1%8A%D0%BB%D0%B3%D0%B0%D1%80%D1%81%D0%BA%D0%B8%20%D0%B5%D0%B7%D0%B8%D0%BA"))),e.push(new B("ca","cat",this.toUtf8("Catalan"),this.toUtf8("Catal%C3%A0"))),e.push(new B("hr","hrv",this.toUtf8("Croatian"),this.toUtf8("hrvatski"))),e.push(new B("cz","ces",this.toUtf8("Czech"),this.toUtf8("%C4%8Cesky"))),e.push(new B("nl","nld",this.toUtf8("Dutch"),this.toUtf8("Nederlands"),["dut"])),e.push(new B("en","eng",this.toUtf8("English"),this.toUtf8("English"))),e.push(new B("eo","epo",this.toUtf8("Esperanto"),this.toUtf8("Esperanto"))),e.push(new B("et","est",this.toUtf8("Estonian"),this.toUtf8("eesti"))),e.push(new B("es","spa",this.toUtf8("Spanish"),this.toUtf8("Espa%C3%B1ol"))),e.push(new B("fo","fao",this.toUtf8("Faroese"),this.toUtf8("f%C3%B8royskt"))),e.push(new B("fi","fin",this.toUtf8("Finnish"),this.toUtf8("suomi"))),e.push(new B("fr","fra",this.toUtf8("French"),this.toUtf8("fran%C3%A7ais"),["fre"])),e.push(new B("gl","glg",this.toUtf8("Galician"),this.toUtf8("Galego"))),e.push(new B("de","deu",this.toUtf8("German"),this.toUtf8("Deutsch"),["ger"])),e.push(new B("el","ell",this.toUtf8("Greek"),this.toUtf8("%CE%95%CE%BB%CE%BB%CE%B7%CE%BD%CE%B9%CE%BA%CE%AC"),["gre"])),e.push(new B("hu","hun",this.toUtf8("Hungarian"),this.toUtf8("Magyar"))),e.push(new B("ia","ina",this.toUtf8("Interlingua"),this.toUtf8("Interlingua"))),e.push(new B("it","ita",this.toUtf8("Italian"),this.toUtf8("Italiano"))),e.push(new B("ga","gle",this.toUtf8("Irish"),this.toUtf8("Gaeilge"))),e.push(new B("lb","ltz",this.toUtf8("Luxembourgish"),this.toUtf8("L%C3%ABtzebuergesch"))),e.push(new B("lt","lit",this.toUtf8("Lithuanian"),this.toUtf8("lietuvi%C5%B3"))),e.push(new B("lv","lav",this.toUtf8("Latvian"),this.toUtf8("latvi%C5%B3"))),e.push(new B("pl","pol",this.toUtf8("Polish"),this.toUtf8("polski"))),e.push(new B("pt","por",this.toUtf8("Portuguese"),this.toUtf8("Portugu%C3%AAs"))),e.push(new B("rm","roh",this.toUtf8("Romansh"),this.toUtf8("rumantsch%20grischun"))),e.push(new B("ro","ron",this.toUtf8("Romanian"),this.toUtf8("rom%C3%A2n%C4%83"),["rum"])),e.push(new B("ru","rus",this.toUtf8("Russian"),this.toUtf8("%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9%20%D1%8F%D0%B7%D1%8B%D0%BA"))),e.push(new B("sk","slk",this.toUtf8("Slovak"),this.toUtf8("Sloven%C4%8Dina"),["slo"])),e.push(new B("sr","srp",this.toUtf8("Serbian"),this.toUtf8("%D0%A1%D1%80%D0%BF%D1%81%D0%BA%D0%B8"))),e.push(new B("sl","slv",this.toUtf8("Slovene"),this.toUtf8("Sloven%C5%A1%C4%8Dina"))),e.push(new B("tr","tur",this.toUtf8("Turkish"),this.toUtf8("T%C3%BCrk%C3%A7e"))),e.push(new B("uk","ukr",this.toUtf8("Ukrainian"),this.toUtf8("%D1%83%D0%BA%D1%80%D0%B0%D1%97%D0%BD%D1%81%D1%8C%D0%BA%D0%B0"))),e.push(new B("zk","chi",this.toUtf8("Chinese"),this.toUtf8("%E4%B8%AD%E6%96%87"),["zho","zh"])),e.push(new B("ms","may",this.toUtf8("Malay"),this.toUtf8("Bahasa Melayu"),["msa"])),e.push(new B("ar","ara",this.toUtf8("Arabic"),this.toUtf8("%D8%A7%D9%8E%D9%84%D9%92%D8%B9%D9%8E%D8%B1%D9%8E%D8%A8%D9%90%D9%8A%D9%8E%D9%91%D8%A9%D9%8F"),["arb"])),e.push(new B("cdo_","cdo",this.toUtf8("Min Dong Chinese"),this.toUtf8("Min Dong Chinese"))),e.push(new B("cjy_","cjy",this.toUtf8("Jinyu Chinese"),this.toUtf8("Jinyu Chinese"))),e.push(new B("cmn_","cmn",this.toUtf8("Mandarin Chinese"),this.toUtf8("Mandarin Chinese"))),e.push(new B("cpx_","cpx",this.toUtf8("Pu-Xian Chinese"),this.toUtf8("Pu-Xian Chinese"))),e.push(new B("czh_","czh",this.toUtf8("Huizhou Chinese"),this.toUtf8("Huizhou Chinese"))),e.push(new B("czo_","czo",this.toUtf8("Min Zhong Chinese"),this.toUtf8("Min Zhong Chinese"))),e.push(new B("gan_","gan",this.toUtf8("Gan Chinese"),this.toUtf8("Gan Chinese"))),e.push(new B("hak_","hak",this.toUtf8("Hakka Chinese"),this.toUtf8("Hakka Chinese"))),e.push(new B("hsn_","hsn",this.toUtf8("Xiang Chinese"),this.toUtf8("Xiang Chinese"))),e.push(new B("lzh_","lzh",this.toUtf8("Literary Chinese"),this.toUtf8("Literary Chinese"))),e.push(new B("mnp_","mnp",this.toUtf8("Min Bei Chinese"),this.toUtf8("Min Bei Chinese"))),e.push(new B("nan_","nan",this.toUtf8("Min Nan Chinese"),this.toUtf8("Min Nan Chinese"))),e.push(new B("wuu_","wuu",this.toUtf8("Wu Chinese"),this.toUtf8("Wu Chinese"))),e.push(new B("yue_","yue",this.toUtf8("Yue Chinese"),this.toUtf8("Yue Chinese"))),e.push(new B("cnp_","cnp",this.toUtf8("Northern Ping Chinese"),this.toUtf8("Northern Ping Chinese"))),e.push(new B("csp_","csp",this.toUtf8("Southern Ping Chinese"),this.toUtf8("Southern Ping Chinese"))),e.push(new B("mul_","mul",this.toUtf8("Multiple languages"),this.toUtf8("Multiple languages"))),e.push(new B("mis_","mis",this.toUtf8("No code for language"),this.toUtf8("No code for language"))),e.push(new B("und_","und",this.toUtf8("Undefined"),this.toUtf8("Undefined"))),this.setLangInfoList(e);}toUtf8(e){let t=null;return t=decodeURIComponent(e),t}setLangInfoList(e){this.langInfoList=e,this.langInfoByLangShortCode=new Ke,this.langInfoByLangLongCode=new Ke,this.langInfoByRelatedCode=new Ke;let t=0,s=this.langInfoList;for(;t<s.length;){let e=s[t];++t,this.langInfoByLangShortCode.h[e.langCodeShort]=e,this.langInfoByLangLongCode.h[e.langCodeLong]=e;}let n=0,r=this.langInfoList;for(;n<r.length;){let e=r[n];if(++n,null!=e.relatedLangCodes){let t=0,s=e.relatedLangCodes;for(;t<s.length;)this.langInfoByRelatedCode.h[s[t++]]=e;}}}getLangInfoList(){return this.langInfoList}__keepFieldsFix(){return p.getInstanceFields(M)}static getInstance(){return M.instance}static getLanguageNativeNameByCode(e){try{e=e.toLowerCase();let t=M.getInstance();return Object.prototype.hasOwnProperty.call(t.langInfoByLangShortCode.h,e)?t.langInfoByLangShortCode.h[e].nativeName:Object.prototype.hasOwnProperty.call(t.langInfoByLangLongCode.h,e)?t.langInfoByLangLongCode.h[e].nativeName:Object.prototype.hasOwnProperty.call(t.langInfoByRelatedCode.h,e)?t.langInfoByRelatedCode.h[e].nativeName:null}catch(e){return Me.trace(je.caught(e).unwrap(),{fileName:"player/src/bs/player/core/manager/I18NHelper.hx",lineNumber:164,className:"bs.player.core.manager.I18NHelper",methodName:"getLanguageNativeNameByCode"}),null}}static getLanguageInfoByCode(e){try{e=e.toLowerCase();let t=M.getInstance();return Object.prototype.hasOwnProperty.call(t.langInfoByLangShortCode.h,e)?t.langInfoByLangShortCode.h[e]:Object.prototype.hasOwnProperty.call(t.langInfoByLangLongCode.h,e)?t.langInfoByLangLongCode.h[e]:Object.prototype.hasOwnProperty.call(t.langInfoByRelatedCode.h,e)?t.langInfoByRelatedCode.h[e]:null}catch(e){return Me.trace(je.caught(e).unwrap(),{fileName:"player/src/bs/player/core/manager/I18NHelper.hx",lineNumber:185,className:"bs.player.core.manager.I18NHelper",methodName:"getLanguageInfoByCode"}),null}}static findBestFittingLangCodeForSelected(e,t){e=e.toLowerCase();let s=M.getLanguageInfoByCode(e);if(null==s)return -1!=t.indexOf(e)?e:null;let n=[],r=0;for(;r<t.length;)n.push(M.getLanguageInfoByCode(t[r++]));let a=[];if(a.push(s),null!=s.relatedLangCodes){let e=0,t=s.relatedLangCodes;for(;e<t.length;){let s=M.getLanguageInfoByCode(t[e++]);null!=s&&a.push(s);}}let l=0;for(;l<a.length;){let e=a[l++],s=0,r=n.length;for(;s<r;){let r=s++,a=n[r];if(null!=a&&e.langCodeShort==a.langCodeShort)return t[r]}}return null}static normalizeLanguageNameFormat(e){return null==e?null:l.substr(e,0,1).toUpperCase()+l.substr(e,1,e.length)}static preselectSubtitlesSet(e,t){if(null==e||null==t||0==t.length||"off"==e)return;let s=[],n=0;for(;n<t.length;)s.push(t[n++].languageCode);let r=M.findBestFittingLangCodeForSelected(e,s),a=0;for(;a<t.length;){let e=t[a];++a,r==e.languageCode&&(e.preselected=!0);}}}e.bs.player.core.manager.I18NHelper=M,M.__name__="bs.player.core.manager.I18NHelper",Object.assign(M.prototype,{__class__:M,langInfoList:null,langInfoByLangShortCode:null,langInfoByLangLongCode:null,langInfoByRelatedCode:null});class T{constructor(e){this.context=e,this.state="init";}init(){N.add(this.context,"bufferingStart",ht(this,this.onVideoBuffering)),N.add(this.context,"complete",ht(this,this.onVideoComplete)),N.add(this.context,"mediaError",ht(this,this.onVideoError)),N.add(this.context,"playing",ht(this,this.onVideoPlaying)),N.add(this.context,"paused",ht(this,this.onVideoPaused)),N.add(this.context,"seekingStart",ht(this,this.onVideoSeeking)),N.add(this.context,"seekingEnd",ht(this,this.onVideoSeekingEnd)),O.add(this.context,"adPlaying",ht(this,this.onVideoPlaying)),O.add(this.context,"adPaused",ht(this,this.onVideoPaused)),O.add(this.context,"seekingStart",ht(this,this.onVideoSeeking)),O.add(this.context,"seekingEnd",ht(this,this.onVideoSeekingEnd)),S.add(this.context,"mediaMetadataData",ht(this,this.onMetadataData));}destroy(){N.remove(this.context,"bufferingStart",ht(this,this.onVideoBuffering)),N.remove(this.context,"complete",ht(this,this.onVideoComplete)),N.remove(this.context,"mediaError",ht(this,this.onVideoError)),N.remove(this.context,"playing",ht(this,this.onVideoPlaying)),N.remove(this.context,"paused",ht(this,this.onVideoPaused)),N.remove(this.context,"seekingStart",ht(this,this.onVideoSeeking)),N.remove(this.context,"seekingEnd",ht(this,this.onVideoSeekingEnd)),S.remove(this.context,"mediaMetadataData",ht(this,this.onMetadataData));}onVideoPlaying(e){this.state="playing";}onVideoComplete(e){this.state="complete";}onVideoPaused(e){this.state="paused";}onVideoBuffering(e){this.state="buffering";}onVideoError(e){this.state="error";}onVideoSeeking(e){this.state="seeking";}onVideoSeekingEnd(e){this.state="playing",null!=e&&null!=e.data&&null!=e.data.media&&(e.data.media.mediaPlaybackInfo.isPlaying||(this.state="paused"));}onMetadataData(e){this.state="init",this.currentMedia=null!=e?e.data:null;}__keepFieldsFix(){return p.getInstanceFields(T)}}e.bs.player.core.manager.PlaybackStateMonitor=T,T.__name__="bs.player.core.manager.PlaybackStateMonitor",Object.assign(T.prototype,{__class__:T,context:null,state:null,currentMedia:null});class V{__keepFieldsFix(){return p.getInstanceFields(V)}static getMonitor(e){if(!Object.prototype.hasOwnProperty.call(V.monitors.h,e)){let t=new T(e);V.monitors.h[e]=t,t.init();}return V.monitors.h[e]}static destroyMonitor(e){if(Object.prototype.hasOwnProperty.call(V.monitors.h,e)){V.monitors.h[e].destroy();let t=V.monitors;Object.prototype.hasOwnProperty.call(t.h,e)&&delete t.h[e];}}}e.bs.player.core.manager.PlaybackStateRegister=V,V.__name__="bs.player.core.manager.PlaybackStateRegister",Object.assign(V.prototype,{__class__:V});class R{}R.__name__="bs.player.core.model.OptionalLiveStreamInfo",R.__isInterface__=!0;class H{constructor(){H._hx_skip_constructor||this._hx_constructor();}_hx_constructor(){this.customParams=new Ke;}__keepFieldsFix(){return p.getInstanceFields(H)}}e.bs.player.core.model.ModelObject=H,H.__name__="bs.player.core.model.ModelObject",Object.assign(H.prototype,{__class__:H,id:null,customParams:null});class q extends H{constructor(){super();}}e.bs.player.core.model.LiveChannelInfo=q,q.__name__="bs.player.core.model.LiveChannelInfo",q.__super__=H,Object.assign(q.prototype,{__class__:q,name:null});class z extends H{constructor(){super(),this.mediaDetails=new se,this.mediaUserSettings=new ne,this.mediaSettings=new re,this.mediaPlaybackInfo=new ae,this.progress=new we,this.drmCustomLicenseServerHandler=null,this.failedPlaybackPlayers=new Ke,this.spherical=!1;}hasFallbackSources(){return null!=this.source&&this.source.length>1||null!=this.sourceFallbacks&&this.sourceFallbacks.length>0&&this.sourceFallbacks[0].length>0}useFallbackSources(){this.hasFallbackSources()&&(null!=this.source&&this.source.length>1?this.source=this.source.slice(1):(this.source=this.sourceFallbacks[0],this.sourceFallbacks=this.sourceFallbacks.slice(1)));}}e.bs.player.core.model.Media=z,z.__name__="bs.player.core.model.Media",z.__super__=H,Object.assign(z.prototype,{__class__:z,title:null,duration:null,source:null,sourceFallbacks:null,subtitlesSets:null,audioSets:null,splashImages:null,posterImages:null,mediaDetails:null,mediaUserSettings:null,mediaSettings:null,mediaPlaybackInfo:null,mediaLandingPage:null,mediaPlaylist:null,drmCustomLicenseServerHandler:null,progress:null,failedPlaybackPlayers:null,spherical:null});class G extends z{constructor(){super();}}e.bs.player.core.model.Live=G,G.__name__="bs.player.core.model.Live",G.__interfaces__=[R],G.__super__=z,Object.assign(G.prototype,{__class__:G,dvrWindowLength:null,dvrWindowLiveEdge:null,lowLatencyMode:null,channelInfo:null,episodeInfo:null,seasonInfo:null,seriesInfo:null,liveProgramInfo:null});class W extends z{constructor(){super();}}e.bs.player.core.model.Catchup=W,W.__name__="bs.player.core.model.Catchup",W.__interfaces__=[R],W.__super__=z,Object.assign(W.prototype,{__class__:W,channelInfo:null,episodeInfo:null,seasonInfo:null,seriesInfo:null,liveProgramInfo:null});class Y extends G{constructor(){super();}}e.bs.player.core.model.LiveStream=Y,Y.__name__="bs.player.core.model.LiveStream",Y.__super__=G,Object.assign(Y.prototype,{__class__:Y,streamEnd:null,streamEndThankYouImageUrl:null,streamWaitingForTransmissionImageUrl:null});class X extends G{constructor(){super();}findProgramForDate(e){if(null==this.programs)return null;null==e&&(e=new Date);let t=e.getTime(),s=0,n=this.programs;for(;s<n.length;){let e=n[s];if(++s,e.eventStart.getTime()<=t&&t<e.eventEnd.getTime())return e}return null}}e.bs.player.core.model.LiveChannel=X,X.__name__="bs.player.core.model.LiveChannel",X.__super__=G,Object.assign(X.prototype,{__class__:X,name:null,logoImages:null,programs:null});class J extends G{constructor(){super();}}e.bs.player.core.model.LiveProgramStream=J,J.__name__="bs.player.core.model.LiveProgramStream",J.__super__=G,Object.assign(J.prototype,{__class__:J});class K extends H{constructor(){super();}}e.bs.player.core.model.LiveProgram=K,K.__name__="bs.player.core.model.LiveProgram",K.__super__=H,Object.assign(K.prototype,{__class__:K,title:null,descriptionLong:null,descriptionShort:null,eventStart:null,eventEnd:null});class Z extends H{constructor(){super(),this.authParams=new Ke;}}e.bs.player.core.model.User=Z,Z.__name__="bs.player.core.model.User",Z.__super__=H,Object.assign(Z.prototype,{__class__:Z,name:null,language:null,domain:null,authParams:null});class ${constructor(){this.currentPos=-1,this.items=[];}hasNext(){return this.currentPos+1<this.items.length}next(){return this.currentPos<this.items.length&&this.currentPos++,0<=this.currentPos&&this.currentPos<this.items.length?this.items[this.currentPos]:null}reset(){this.currentPos=-1;}shift(){this.reset(),this.items.shift();}get_length(){return null!=this.items?this.items.length:0}__keepFieldsFix(){return p.getInstanceFields($)}static clone(e){if(null==e)return null;let t=new $,s=e.items,n=new Array(s.length),r=0,a=s.length;for(;r<a;){let e=r++;n[e]=s[e];}return t.items=n,t.currentPos=e.currentPos+0|0,t}}e.bs.player.core.model.MediaPlaylist=$,$.__name__="bs.player.core.model.MediaPlaylist",Object.assign($.prototype,{__class__:$,items:null,currentPos:null,length:null,__properties__:{get_length:"get_length"}});class Q extends H{constructor(){super();}}e.bs.player.core.model.MediaSource=Q,Q.__name__="bs.player.core.model.MediaSource",Q.__super__=H,Object.assign(Q.prototype,{__class__:Q,url:null,contentType:null,width:null,height:null,bitrate:null,drm:null,spherical:null});class ee extends H{constructor(){super();}}e.bs.player.core.model.Drm=ee,ee.__name__="bs.player.core.model.Drm",ee.__super__=H,Object.assign(ee.prototype,{__class__:ee,provider:null,selectedDrmSystem:null,playready:null,widevine:null,fairplay:null});class te extends H{constructor(){super();}}e.bs.player.core.model.DrmData=te,te.__name__="bs.player.core.model.DrmData",te.__super__=H,Object.assign(te.prototype,{__class__:te,laUrl:null,customData:null,certUrl:null,audioRobustness:null,videoRobustness:null});class se{constructor(){}__keepFieldsFix(){return p.getInstanceFields(se)}}e.bs.player.core.model.MediaDetails=se,se.__name__="bs.player.core.model.MediaDetails",Object.assign(se.prototype,{__class__:se,tags:null,genres:null,descriptionLong:null,descriptionShort:null,year:null,mediaCast:null,directors:null,customParams:null});class ne{constructor(){}__keepFieldsFix(){return p.getInstanceFields(ne)}}e.bs.player.core.model.MediaUserSettings=ne,ne.__name__="bs.player.core.model.MediaUserSettings",Object.assign(ne.prototype,{__class__:ne,wasWatched:null,isFavorite:null,resumePostion:null,hasWatchingFinished:null});class re{constructor(){this.hasConcurrencyControl=!1,this.customParams=new Ke;}__keepFieldsFix(){return p.getInstanceFields(re)}}e.bs.player.core.model.MediaSettings=re,re.__name__="bs.player.core.model.MediaSettings",Object.assign(re.prototype,{__class__:re,hasConcurrencyControl:null,customParams:null});class ae{constructor(){this.currentTime=null,this.currentTotalBitrateKpbs=null,this.playbackRate=null,this.isPlaying=!1,this.customParams=new Ke;}__keepFieldsFix(){return p.getInstanceFields(ae)}}e.bs.player.core.model.MediaPlaybackInfo=ae,ae.__name__="bs.player.core.model.MediaPlaybackInfo",Object.assign(ae.prototype,{__class__:ae,currentTime:null,currentTotalBitrateKpbs:null,playbackRate:null,isPlaying:null,customParams:null});class le extends H{constructor(){super();}}e.bs.player.core.model.Playlist=le,le.__name__="bs.player.core.model.Playlist",le.__super__=H,Object.assign(le.prototype,{__class__:le,mediaList:null});class ie extends H{constructor(){super();}}e.bs.player.core.model.SubtitlesSet=ie,ie.__name__="bs.player.core.model.SubtitlesSet",ie.__super__=H,Object.assign(ie.prototype,{__class__:ie,languageCode:null,name:null,subtitleEntries:null,url:null,preselected:null});class oe{constructor(){this.showTime=0,this.hideTime=0,this.customParams=new Ke,this.texts=[];}__keepFieldsFix(){return p.getInstanceFields(oe)}}e.bs.player.core.model.SubtitleEntry=oe,oe.__name__="bs.player.core.model.SubtitleEntry",Object.assign(oe.prototype,{__class__:oe,showTime:null,hideTime:null,texts:null,customParams:null});class ce{constructor(){}__keepFieldsFix(){return p.getInstanceFields(ce)}}e.bs.player.core.model.SubtitleEntryText=ce,ce.__name__="bs.player.core.model.SubtitleEntryText",Object.assign(ce.prototype,{__class__:ce,styles:null,text:null});class ue extends H{constructor(){H._hx_skip_constructor=!0,super(),H._hx_skip_constructor=!1,this._hx_constructor();}_hx_constructor(){this.isDefault=!1,super._hx_constructor();}}e.bs.player.core.model.AudioSet=ue,ue.__name__="bs.player.core.model.AudioSet",ue.__super__=H,Object.assign(ue.prototype,{__class__:ue,languageCode:null,name:null,isDefault:null,preselected:null});class _e extends H{constructor(){super();}}e.bs.player.core.model.Image=_e,_e.__name__="bs.player.core.model.Image",_e.__super__=H,Object.assign(_e.prototype,{__class__:_e,url:null,width:null,height:null});class he extends H{constructor(){super();}}e.bs.player.core.model.Genre=he,he.__name__="bs.player.core.model.Genre",he.__super__=H,Object.assign(he.prototype,{__class__:he,name:null});class pe{constructor(){this.currentOrderNumber=1,this.totalNumber=1,this.durationPlayed=0,this.customParams=new Ke,this.showTimeProgress=!0,this.showAdPositionInBreak=!0;}__keepFieldsFix(){return p.getInstanceFields(pe)}}e.bs.player.core.model.AdMedia=pe,pe.__name__="bs.player.core.model.AdMedia",Object.assign(pe.prototype,{__class__:pe,media:null,mediaClickTargetUrl:null,currentOrderNumber:null,totalNumber:null,durationPlayed:null,durationTotal:null,adId:null,customParams:null,showTimeProgress:null,showAdPositionInBreak:null,adStartTime:null});class de{constructor(e,t){this.offset=e,this.duration=t;}__keepFieldsFix(){return p.getInstanceFields(de)}}e.bs.player.core.model.AdInStreamBreakInfo=de,de.__name__="bs.player.core.model.AdInStreamBreakInfo",Object.assign(de.prototype,{__class__:de,offset:null,duration:null});class ge{constructor(e,t){this.label=e,this.data=t;}__keepFieldsFix(){return p.getInstanceFields(ge)}}e.bs.player.core.model.VideoQualityEventData=ge,ge.__name__="bs.player.core.model.VideoQualityEventData",Object.assign(ge.prototype,{__class__:ge,label:null,data:null,bitrateKbps:null,width:null,height:null});class me{constructor(e,t,s,n){null==n&&(n="top"),null==s&&(s="left"),this.x=e,this.width=t,this.xPos=s,this.yPos=n;}__keepFieldsFix(){return p.getInstanceFields(me)}}e.bs.player.core.model.BrandImageLoadedEventData=me,me.__name__="bs.player.core.model.BrandImageLoadedEventData",Object.assign(me.prototype,{__class__:me,x:null,width:null,yPos:null,xPos:null});class ye{__keepFieldsFix(){return p.getInstanceFields(ye)}}e.bs.player.core.model.MediaProgressSegment=ye,ye.__name__="bs.player.core.model.MediaProgressSegment",Object.assign(ye.prototype,{__class__:ye,duration:null,label:null});class be{__keepFieldsFix(){return p.getInstanceFields(be)}}e.bs.player.core.model.MediaProgressMarker=be,be.__name__="bs.player.core.model.MediaProgressMarker",Object.assign(be.prototype,{__class__:be,time:null,label:null});class xe{__keepFieldsFix(){return p.getInstanceFields(xe)}}e.bs.player.core.model.MediaProgressThumbnails=xe,xe.__name__="bs.player.core.model.MediaProgressThumbnails",Object.assign(xe.prototype,{__class__:xe,url:null,imageBaseUrl:null});class we{constructor(){this.segments=null,this.segmentsUrl=null,this.markers=null,this.markersUrl=null,this.thumbnails=null;}__keepFieldsFix(){return p.getInstanceFields(we)}}e.bs.player.core.model.MediaProgress=we,we.__name__="bs.player.core.model.MediaProgress",Object.assign(we.prototype,{__class__:we,segmentsUrl:null,segments:null,markersUrl:null,markers:null,thumbnails:null});class ve{constructor(e,t){null==t&&(t=0),null==e&&(e=0),this.x=e,this.y=t;}__keepFieldsFix(){return p.getInstanceFields(ve)}}e.bs.player.core.model.Point=ve,ve.__name__="bs.player.core.model.Point",Object.assign(ve.prototype,{__class__:ve,x:null,y:null});class Oe extends z{constructor(){super();}}e.bs.player.core.model.Episode=Oe,Oe.__name__="bs.player.core.model.Episode",Oe.__super__=z,Object.assign(Oe.prototype,{__class__:Oe,episodeNumber:null,season:null});class Ce extends H{constructor(){super();}}e.bs.player.core.model.EpisodeInfo=Ce,Ce.__name__="bs.player.core.model.EpisodeInfo",Ce.__super__=H,Object.assign(Ce.prototype,{__class__:Ce,episodeNumber:null,title:null});class Ie extends H{constructor(){super();}}e.bs.player.core.model.Season=Ie,Ie.__name__="bs.player.core.model.Season",Ie.__super__=H,Object.assign(Ie.prototype,{__class__:Ie,title:null,descriptionShort:null,descriptionLong:null,images:null,seasonNumber:null,serie:null,episodes:null});class Se extends H{constructor(){super();}}e.bs.player.core.model.Serie=Se,Se.__name__="bs.player.core.model.Serie",Se.__super__=H,Object.assign(Se.prototype,{__class__:Se,title:null,descriptionShort:null,descriptionLong:null,images:null,seasons:null});class Ee{__keepFieldsFix(){return p.getInstanceFields(Ee)}}e.bs.player.core.model.SocialShareData=Ee,Ee.__name__="bs.player.core.model.SocialShareData",Object.assign(Ee.prototype,{__class__:Ee,url:null,title:null});class Pe{constructor(){this.pluginName="";let e=ct.getClass(this);this.pluginName=e.__name__.split(".").pop();let t=this.pluginName,s=exports.configuration;this.pluginConfig=null!=s&&Object.prototype.hasOwnProperty.call(s,t)?o.field(s,t):Object.create(null);}create(){}destroy(){}activate(){}postActivate(){}deactivate(){}eventFilter(e){return !0}registerPlugin(e){}getPluginVersion(){return "v2.14.287"}getPluginName(){return this.pluginName}get_player(){return this.player}set_player(e){return this.player=e}get_variables(){return this.variables}set_variables(e){return this.variables=e}get_eventHub(){return this.eventHub}set_eventHub(e){return this.eventHub=e}get_parentDisplay(){return this.parentDisplay}set_parentDisplay(e){return this.parentDisplay=e}get_display(){return this.display}}Pe.__name__="bs.player.core.plugin.PluginBase",Object.assign(Pe.prototype,{__class__:Pe,uid:null,context:null,className:null,pluginConfig:null,variables:null,eventHub:null,parentDisplay:null,display:null,player:null,pluginName:null,__properties__:{set_player:"set_player",get_player:"get_player",get_display:"get_display",set_parentDisplay:"set_parentDisplay",get_parentDisplay:"get_parentDisplay",set_eventHub:"set_eventHub",get_eventHub:"get_eventHub",set_variables:"set_variables",get_variables:"get_variables"}});class Le{__keepFieldsFix(){return p.getInstanceFields(Le)}static readPluginConfig(e){let t,s=ct.getClass(e);if(0==o.isObject(s))t=!1;else {let e=Object.prototype.hasOwnProperty.call(s,"__plugfaces__")?o.field(s,"__plugfaces__"):null;t=null!=e&&e.indexOf("IVideoPlayer")>-1;}if(0==t)return Object.create(null);let n=s.__name__.split(".").pop(),r=exports.configuration;return null!=r&&Object.prototype.hasOwnProperty.call(r,n)?o.field(r,n):Object.create(null)}}e.bs.player.core.plugin.VideoPlayerUtil=Le,Le.__name__="bs.player.core.plugin.VideoPlayerUtil",Object.assign(Le.prototype,{__class__:Le});class Ae{constructor(e,t){this.remotePlayerController=null,this.remotePlayer=null,this.context=null,this.applicationId="53001214",this.context=e,this.onApiLoadListener=t,this.isConnected=!1,null==Ae.instances&&(Ae.instances=[]),Ae.instances.push(this),Ae.libLoaded||(Ae.libLoaded=!0,this.checkScriptLoad(),this.loadScript()),I.add(e,"chromecast",ht(this,this.onChromecast)),Ae._isAvailable&&(this.onCastApiInitialization(),null!=t&&Te.delay(t,0));}get_isAvailable(){return Ae._isAvailable}onChromecast(e){this.getChromeCast().requestSession(),this.createSession();}connect(){if(!this.isConnected){this.isConnected=!0;let e=new C("connected");e.data={session:this.castSession,sender:this},e.dispatch(this.context),new N("videoCastingStart").dispatch(this.context);}}disconnect(){if(this.isConnected){this.isConnected=!1,this.castSession=null;let e=new C("disconnected");e.data={},e.dispatch(this.context),new N("videoCastingEnd").dispatch(this.context),this.getCast().framework.CastContext.getInstance().endCurrentSession(!0);}}createSession(){null==this.castSession&&this.monitorSessionCreation();}monitorSessionCreation(){null==this.castSession&&(this.castSession=this.getCast().framework.CastContext.getInstance().getCurrentSession()),null!=this.castSession?(this.connect(),this.monitorSessionTimer=new Te(1e3),this.monitorSessionTimer.run=ht(this,this.monitorSession)):this.monitorSessionCreationTimer=Te.delay(ht(this,this.monitorSessionCreation),500);}monitorSession(){null!=this.castSession&&"SESSION_ENDED"!=this.castSession.getSessionState()||(null!=this.monitorSessionTimer&&this.monitorSessionTimer.stop(),this.disconnect());}newRemotePlayerController(e){return new window.cast.framework.RemotePlayerController(e)}newRemotePlayer(){return new window.cast.framework.RemotePlayer}newLoadRequest(e){return new window.chrome.cast.media.LoadRequest(e)}newMediaInfo(e,t){return new window.chrome.cast.media.MediaInfo(e,t)}newGenericMediaMetadata(){return new window.chrome.cast.media.GenericMediaMetadata}newImage(e){return new window.chrome.cast.Image(e)}castMediaImage(e){let t,s,n=this.newImage(e.url);if(null!=e.width){let s=e.width;t=!isNaN(s);}else t=!1;if(t&&(n.width=e.width),null!=e.height){let t=e.height;s=!isNaN(t);}else s=!1;return s&&(n.height=e.height),n}onCastApiInitialization(){null!=this.getCast().framework?this.getCast().framework.CastContext.getInstance().setOptions({receiverApplicationId:this.applicationId,autoJoinPolicy:this.getChromeCast().AutoJoinPolicy.ORIGIN_SCOPED}):console.warn("Cannot start Chromecast. Try restart browser and Chromecast device.");}getChromeCast(){return window.chrome.cast}getChrome(){return window.chrome}getCast(){return window.cast}checkScriptLoad(){window.__onGCastApiAvailable=Ae.initializeCastApi;}loadScript(){var e=document.getElementsByTagName("head")[0],t=document.createElement("script");t.type="text/javascript",t.src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",e.appendChild(t);}destroy(){if(this.disconnect(),null!=Ae.instances){let e=Ae.instances.indexOf(this);e>=0&&Ae.instances.splice(e,1);}}__keepFieldsFix(){return p.getInstanceFields(Ae)}static initializeCastApi(e){if(Ae._isAvailable=e,e){let e=Ae.instances[0];null==e||null==e.getCast()||null==e.getChromeCast()?Ae._isAvailable=!1:e.onCastApiInitialization();}let t=0,s=Ae.instances;for(;t<s.length;){let e=s[t];++t,null!=e.onApiLoadListener&&e.onApiLoadListener();}}}e.bs.player.core.plugin.chromecast.ChromecastSender=Ae,Ae.__name__="bs.player.core.plugin.chromecast.ChromecastSender",Object.assign(Ae.prototype,{__class__:Ae,applicationId:null,context:null,remotePlayer:null,remotePlayerController:null,castSession:null,onApiLoadListener:null,monitorSessionTimer:null,monitorSessionCreationTimer:null,isConnected:null,isAvailable:null,__properties__:{get_isAvailable:"get_isAvailable"}});class ke{static decode(e){let t=null;if(null==e)return t;let s=decodeURIComponent(e.split("+").join(" "));try{t=JSON.parse(s);}catch(e){try{let e=qe.decode(s).toString();try{t=JSON.parse(e);}catch(e){}}catch(e){}}return t}}ke.__name__="bs.util.ConfigParser";class De{constructor(){}__keepFieldsFix(){return p.getInstanceFields(De)}static merge(e,t){return De._merge(De.copy(e),De.copy(t))}static _merge(e,t){if(null==t)return e;if(null!=t&&("string"==typeof t||"number"==typeof t&&(0|t)===t||"number"==typeof t||"boolean"==typeof t))return t;if(t instanceof Array){if(null==e)return e;let s=t,n=0;for(;n<s.length;)e.push(s[n++]);return e}let s=o.fields(t),n=0;for(;n<s.length;){let r=s[n];++n;let a=o.field(t,r);if(null==a){e[r]=null;continue}null==a||"string"!=typeof a&&("number"!=typeof a||(0|a)!==a)&&"number"!=typeof a&&"boolean"!=typeof a?a instanceof Array?(Object.prototype.hasOwnProperty.call(e,r)||(e[r]=[]),De._merge(o.field(e,r),a)):(Object.prototype.hasOwnProperty.call(e,r)||(e[r]={}),De._merge(o.field(e,r),a)):e[r]=a;}return e}static set(e,t,s){e[t]=s;}static get(e,t){return o.field(e,t)}static has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}static fields(e){return o.fields(e)}static copy(e){if(null==e)return null;if(null!=e&&("string"==typeof e||"number"==typeof e&&(0|e)===e||"number"==typeof e||"boolean"==typeof e))return e;if(e instanceof Array){let t=[],s=e,n=0,r=s.length;for(;n<r;)t.push(De.copy(s[n++]));return t}let t={},s=o.fields(e),n=0;for(;n<s.length;){let r=s[n];++n,t[r]=De.copy(o.field(e,r));}return t}static isArray(e){return e instanceof Array}static isPrimitive(e){return null==e?null:"string"==typeof e||"number"==typeof e&&(0|e)===e||"number"==typeof e||"boolean"==typeof e}}e.bs.util.ObjectTools=De,De.__name__="bs.util.ObjectTools",Object.assign(De.prototype,{__class__:De});class Ue{__keepFieldsFix(){return p.getInstanceFields(Ue)}static getTextWidth(e,t){let s=0;return null==Ue.canvasCtx&&(Ue.canvasCtx=ct.__cast(window.document.createElement("canvas"),HTMLCanvasElement).getContext("2d")),Ue.canvasCtx.font=t,s=Ue.canvasCtx.measureText(e).width,s}static formatTime(e,t){if(null==t&&(t=!1),isNaN(e))return "";if(e<0)return "live";let s=e%60|0,n=e/60%60|0,r=e/3600%24|0;return (1==t&&r<10?"0"+r:r+"")+":"+(n<10?"0"+n:n+"")+":"+(s<10?"0"+s:s+"")}static formatTimeMinutes(e){if(e<0)return "live";let t=e%60|0,s=e/60|0;return (s<10?"0"+s:s+"")+":"+(t<10?"0"+t:t+"")}static formatDateTime(e,t){if(null==t&&(t=0),null==e)return "";if(isNaN(e.getTime()))return "";let s=new Date(e.getFullYear(),e.getMonth(),e.getDay(),e.getHours(),e.getMinutes(),e.getSeconds()+t),n=s.getSeconds(),r=s.getMinutes();return s.getHours()+":"+(r<10?"0"+r:r+"")+":"+(n<10?"0"+n:n+"")}static initTranslations(){Ue.translations=new Ke;let e=exports.i18n,t=0,s=o.fields(e);for(;t<s.length;){let n=s[t];++t,Ue.translations.h[n]=new Ke;let r=o.field(e,n),a=Ue.translations.h[n],l=0,i=o.fields(r);for(;l<i.length;){let e=i[l];++l;let t=Ue.decodeUtf8(o.field(r,e));a.h[e]=t;}}}static decodeUtf8(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}static translate(e,t,s){null==t&&(t=Ue.locale),null==Ue.translations&&Ue.initTranslations();try{return Object.prototype.hasOwnProperty.call(Ue.translations.h,t)||(t="en"),Ue.translations.h[t].h[e]}catch(e){return null}}static capilizeFirstLetter(e){return null==e?null:l.substr(e,0,1).toUpperCase()+l.substr(e,1,e.length)}}e.bs.util.TextTools=Ue,Ue.__name__="bs.util.TextTools",Object.assign(Ue.prototype,{__class__:Ue});class Fe{__keepFieldsFix(){return p.getInstanceFields(Fe)}static random(e){null==e&&(e="xxxx-xxxx-xxxx-xxxx-xxxx");let t,s=e.length,n=Fe.UID_CHARS.length,r="",a=0;for(;a<s;){let s;switch(t=e.charAt(a++),t){case"-":case"_":s=t;break;default:s=Fe.UID_CHARS.charAt(c.random(n));}r+=s;}return r}static uuidv4(){let e=0,t="",s=null,n=0;for(;n<36;)e=c.random(16),s="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".charAt(n++),t+="x"==s?h.hex(e):"y"==s?h.hex(3&e|8):s;return t}}e.bs.util.UUID=Fe,Fe.__name__="bs.util.UUID",Object.assign(Fe.prototype,{__class__:Fe});class Ne{}Ne.__name__="haxe.IMap",Ne.__isInterface__=!0,Object.assign(Ne.prototype,{__class__:Ne,get:null,keys:null});class je extends Error{constructor(e,t,s){super(e),this.message=e,this.__previousException=t,this.__nativeException=null!=s?s:this;}unwrap(){return this.__nativeException}toString(){return this.get_message()}get_message(){return this.message}get_native(){return this.__nativeException}static caught(e){return e instanceof je?e:e instanceof Error?new je(e.message,null,e):new Ve(e,null,e)}static thrown(e){if(e instanceof je)return e.get_native();if(e instanceof Error)return e;return new Ve(e)}}je.__name__="haxe.Exception",je.__super__=Error,Object.assign(je.prototype,{__class__:je,__skipStack:null,__nativeException:null,__previousException:null,__properties__:{get_native:"get_native",get_message:"get_message"}});class Be{constructor(e,t){this.high=e,this.low=t;}}Be.__name__="haxe._Int64.___Int64",Object.assign(Be.prototype,{__class__:Be,high:null,low:null});class Me{static formatOutput(e,t){let s=c.string(e);if(null==t)return s;let n=t.fileName+":"+t.lineNumber;if(null!=t.customParams){let e=0,n=t.customParams;for(;e<n.length;)s+=", "+c.string(n[e++]);}return n+": "+s}static trace(e,t){let s=Me.formatOutput(e,t);"undefined"!=typeof console&&null!=console.log&&console.log(s);}}Me.__name__="haxe.Log";class Te{constructor(e){let t=this;this.id=setInterval((function(){t.run();}),e);}stop(){null!=this.id&&(clearInterval(this.id),this.id=null);}run(){}static delay(e,t){let s=new Te(t);return s.run=function(){s.stop(),e();},s}static measure(e,t){let s=l.now()/1e3,n=e();return Me.trace(l.now()/1e3-s+"s",t),n}static stamp(){return l.now()/1e3}}e.haxe.Timer=Te,Te.__name__="haxe.Timer",Object.assign(Te.prototype,{__class__:Te,id:null});class Ve extends je{constructor(e,t,s){super(String(e),t,s),this.value=e;}unwrap(){return this.value}}e.haxe.ValueException=Ve,Ve.__name__="haxe.ValueException",Ve.__super__=je,Object.assign(Ve.prototype,{__class__:Ve,value:null});class Re{constructor(e){this.length=e.byteLength,this.b=new Uint8Array(e),this.b.bufferValue=e,e.hxBytes=this,e.bytes=this.b;}get(e){return this.b[e]}set(e,t){this.b[e]=t;}blit(e,t,s,n){if(e<0||s<0||n<0||e+n>this.length||s+n>t.length)throw je.thrown(st.OutsideBounds);0==s&&n==t.b.byteLength?this.b.set(t.b,e):this.b.set(t.b.subarray(s,s+n),e);}fill(e,t,s){let n=0;for(;n<t;)++n,this.b[e++]=s;}sub(e,t){if(e<0||t<0||e+t>this.length)throw je.thrown(st.OutsideBounds);return new Re(this.b.buffer.slice(e+this.b.byteOffset,e+this.b.byteOffset+t))}compare(e){let t=this.b,s=e.b,n=0,r=this.length<e.length?this.length:e.length;for(;n<r;){let e=n++;if(t[e]!=s[e])return t[e]-s[e]}return this.length-e.length}initData(){null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));}getDouble(e){return null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength)),this.data.getFloat64(e,!0)}getFloat(e){return null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength)),this.data.getFloat32(e,!0)}setDouble(e,t){null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength)),this.data.setFloat64(e,t,!0);}setFloat(e,t){null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength)),this.data.setFloat32(e,t,!0);}getUInt16(e){return null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength)),this.data.getUint16(e,!0)}setUInt16(e,t){null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength)),this.data.setUint16(e,t,!0);}getInt32(e){return null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength)),this.data.getInt32(e,!0)}setInt32(e,t){null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength)),this.data.setInt32(e,t,!0);}getInt64(e){return new Be(this.getInt32(e+4),this.getInt32(e))}setInt64(e,t){this.setInt32(e,t.low),this.setInt32(e+4,t.high);}getString(e,t,s){if(e<0||t<0||e+t>this.length)throw je.thrown(st.OutsideBounds);null==s&&(s=He.UTF8);let n="",r=this.b,a=e,l=e+t;switch(s._hx_index){case 0:for(;a<l;){let e=r[a++];if(e<128){if(0==e)break;n+=String.fromCodePoint(e);}else if(e<224){let t=(63&e)<<6|127&r[a++];n+=String.fromCodePoint(t);}else if(e<240){let t=(31&e)<<12|(127&r[a++])<<6|127&r[a++];n+=String.fromCodePoint(t);}else {let t=(15&e)<<18|(127&r[a++])<<12|(127&r[a++])<<6|127&r[a++];n+=String.fromCodePoint(t);}}break;case 1:for(;a<l;){let e=r[a++]|r[a++]<<8;n+=String.fromCodePoint(e);}}return n}readString(e,t){return this.getString(e,t)}toString(){return this.getString(0,this.length)}toHex(){let e="",t=[],s="0123456789abcdef",n=0;for(;n<16;)t.push(l.cca(s,n++));let r=0,a=this.length;for(;r<a;){let s=this.b[r++];e+=String.fromCodePoint(t[s>>4]),e+=String.fromCodePoint(t[15&s]);}return e}getData(){return this.b.bufferValue}static alloc(e){return new Re(new ArrayBuffer(e))}static ofString(e,t){if(t==He.RawNative){let t=new Uint8Array(e.length<<1),s=0,n=e.length;for(;s<n;){let n=s++,r=e.charCodeAt(n);t[n<<1]=255&r,t[n<<1|1]=r>>8;}return new Re(t.buffer)}let s=[],n=0;for(;n<e.length;){let t=e.charCodeAt(n++);55296<=t&&t<=56319&&(t=t-55232<<10|1023&e.charCodeAt(n++)),t<=127?s.push(t):t<=2047?(s.push(192|t>>6),s.push(128|63&t)):t<=65535?(s.push(224|t>>12),s.push(128|t>>6&63),s.push(128|63&t)):(s.push(240|t>>18),s.push(128|t>>12&63),s.push(128|t>>6&63),s.push(128|63&t));}return new Re(new Uint8Array(s).buffer)}static ofData(e){let t=e.hxBytes;return null!=t?t:new Re(e)}static ofHex(e){if(0!=(1&e.length))throw je.thrown("Not a hex string (odd number of digits)");let t=[],s=0,n=e.length>>1;for(;s<n;){let n=e.charCodeAt(2*s),r=e.charCodeAt(2*s+1);n=(15&n)+9*((64&n)>>6),r=(15&r)+9*((64&r)>>6),t.push(255&(n<<4|r)),++s;}return new Re(new Uint8Array(t).buffer)}static fastGet(e,t){return e.bytes[t]}}e.haxe.io.Bytes=Re,Re.__name__="haxe.io.Bytes",Object.assign(Re.prototype,{__class__:Re,length:null,b:null,data:null});var He=r["haxe.io.Encoding"]={__ename__:!0,__constructs__:null,UTF8:{_hx_name:"UTF8",_hx_index:0,__enum__:"haxe.io.Encoding",toString:n},RawNative:{_hx_name:"RawNative",_hx_index:1,__enum__:"haxe.io.Encoding",toString:n}};He.__constructs__=[He.UTF8,He.RawNative];class qe{static encode(e,t){null==t&&(t=!0);let s=new ze(qe.BYTES).encodeBytes(e).toString();if(t)switch(e.length%3){case 1:s+="==";break;case 2:s+="=";}return s}static decode(e,t){if(null==t&&(t=!0),t)for(;61==l.cca(e,e.length-1);)e=l.substr(e,0,-1);return new ze(qe.BYTES).decodeBytes(Re.ofString(e))}static urlEncode(e,t){null==t&&(t=!1);let s=new ze(qe.URL_BYTES).encodeBytes(e).toString();if(t)switch(e.length%3){case 1:s+="==";break;case 2:s+="=";}return s}static urlDecode(e,t){if(null==t&&(t=!1),t)for(;61==l.cca(e,e.length-1);)e=l.substr(e,0,-1);return new ze(qe.URL_BYTES).decodeBytes(Re.ofString(e))}}e.haxe.crypto.Base64=qe,qe.__name__="haxe.crypto.Base64";class ze{constructor(e){let t=e.length,s=1;for(;t>1<<s;)++s;if(s>8||t!=1<<s)throw je.thrown("BaseCode : base length must be a power of two.");this.base=e,this.nbits=s;}encodeBytes(e){let t=this.nbits,s=this.base,n=8*e.length/t|0,r=new Re(new ArrayBuffer(n+(8*e.length%t==0?0:1))),a=0,l=0,i=(1<<t)-1,o=0,c=0;for(;c<n;){for(;l<t;)l+=8,a<<=8,a|=e.b[o++];l-=t,r.b[c++]=s.b[a>>l&i];}return l>0&&(r.b[c++]=s.b[a<<t-l&i]),r}initTable(){let e=[],t=0;for(;t<256;)e[t++]=-1;let s=0,n=this.base.length;for(;s<n;){let t=s++;e[this.base.b[t]]=t;}this.tbl=e;}decodeBytes(e){let t=this.nbits;null==this.tbl&&this.initTable();let s=this.tbl,n=e.length*t>>3,r=new Re(new ArrayBuffer(n)),a=0,l=0,i=0,o=0;for(;o<n;){for(;l<8;){l+=t,a<<=t;let n=s[e.b[i++]];if(-1==n)throw je.thrown("BaseCode : invalid encoded char");a|=n;}l-=8,r.b[o++]=a>>l&255;}return r}encodeString(e){return this.encodeBytes(Re.ofString(e)).toString()}decodeString(e){return this.decodeBytes(Re.ofString(e)).toString()}static encode(e,t){return new ze(Re.ofString(t)).encodeString(e)}static decode(e,t){return new ze(Re.ofString(t)).decodeString(e)}}e.haxe.crypto.BaseCode=ze,ze.__name__="haxe.crypto.BaseCode",Object.assign(ze.prototype,{__class__:ze,base:null,nbits:null,tbl:null});class Ge{constructor(){this.h={};}set(e,t){this.h[e]=t;}get(e){return this.h[e]}exists(e){return this.h.hasOwnProperty(e)}remove(e){return !!this.h.hasOwnProperty(e)&&(delete this.h[e],!0)}keys(){let e=[];for(var t in this.h)this.h.hasOwnProperty(t)&&e.push(+t);return new nt(e)}iterator(){return {ref:this.h,it:this.keys(),hasNext:function(){return this.it.hasNext()},next:function(){let e=this.it.next();return this.ref[e]}}}keyValueIterator(){return new at(this)}copy(){let e=new Ge,t=this.keys();for(;t.hasNext();){let s=t.next();e.h[s]=this.h[s];}return e}toString(){let e="";e="[";let t=this.keys();for(;t.hasNext();){let s=t.next();e+=null==s?"null":""+s,e+=" => ",e+=c.string(c.string(this.h[s])),t.hasNext()&&(e+=", ");}return e+="]",e}clear(){this.h={};}}e.haxe.ds.IntMap=Ge,Ge.__name__="haxe.ds.IntMap",Ge.__interfaces__=[Ne],Object.assign(Ge.prototype,{__class__:Ge,h:null});class We{constructor(){this.length=0;}add(e){let t=new Ye(e,null);null==this.h?this.h=t:this.q.next=t,this.q=t,this.length++;}push(e){let t=new Ye(e,this.h);this.h=t,null==this.q&&(this.q=t),this.length++;}first(){return null==this.h?null:this.h.item}last(){return null==this.q?null:this.q.item}pop(){if(null==this.h)return null;let e=this.h.item;return this.h=this.h.next,null==this.h&&(this.q=null),this.length--,e}isEmpty(){return null==this.h}clear(){this.h=null,this.q=null,this.length=0;}remove(e){let t=null,s=this.h;for(;null!=s;){if(s.item==e)return null==t?this.h=s.next:t.next=s.next,this.q==s&&(this.q=t),this.length--,!0;t=s,s=s.next;}return !1}iterator(){return new Xe(this.h)}keyValueIterator(){return new Je(this.h)}toString(){let e="",t=!0,s=this.h;for(e="{";null!=s;)t?t=!1:e+=", ",e+=c.string(c.string(s.item)),s=s.next;return e+="}",e}join(e){let t="",s=!0,n=this.h;for(;null!=n;)s?s=!1:t+=null==e?"null":""+e,t+=c.string(n.item),n=n.next;return t}filter(e){let t=new We,s=this.h;for(;null!=s;){let n=s.item;s=s.next,e(n)&&t.add(n);}return t}map(e){let t=new We,s=this.h;for(;null!=s;){let n=s.item;s=s.next,t.add(e(n));}return t}}e.haxe.ds.List=We,We.__name__="haxe.ds.List",Object.assign(We.prototype,{__class__:We,h:null,q:null,length:null});class Ye{constructor(e,t){this.item=e,this.next=t;}}e.haxe.ds._List.ListNode=Ye,Ye.__name__="haxe.ds._List.ListNode",Object.assign(Ye.prototype,{__class__:Ye,item:null,next:null});class Xe{constructor(e){this.head=e;}hasNext(){return null!=this.head}next(){let e=this.head.item;return this.head=this.head.next,e}}e.haxe.ds._List.ListIterator=Xe,Xe.__name__="haxe.ds._List.ListIterator",Object.assign(Xe.prototype,{__class__:Xe,head:null});class Je{constructor(e){this.head=e,this.idx=0;}hasNext(){return null!=this.head}next(){let e=this.head.item;return this.head=this.head.next,{value:e,key:this.idx++}}}e.haxe.ds._List.ListKeyValueIterator=Je,Je.__name__="haxe.ds._List.ListKeyValueIterator",Object.assign(Je.prototype,{__class__:Je,idx:null,head:null});class Ke{constructor(){this.h=Object.create(null);}exists(e){return Object.prototype.hasOwnProperty.call(this.h,e)}get(e){return this.h[e]}set(e,t){this.h[e]=t;}remove(e){return !!Object.prototype.hasOwnProperty.call(this.h,e)&&(delete this.h[e],!0)}keys(){return new Ze(this.h)}iterator(){return new $e(this.h)}keyValueIterator(){return new Qe(this.h)}copy(){return Ke.createCopy(this.h)}clear(){this.h=Object.create(null);}toString(){return Ke.stringify(this.h)}static createCopy(e){let t=new Ke;for(var s in e)t.h[s]=e[s];return t}static stringify(e){let t="[",s=!0;for(var n in e)s?s=!1:t+=",",t+=n+" => "+c.string(e[n]);return t+"]"}}e.haxe.ds.StringMap=Ke,Ke.__name__="haxe.ds.StringMap",Ke.__interfaces__=[Ne],Object.assign(Ke.prototype,{__class__:Ke,h:null});class Ze{constructor(e){this.h=e,this.keys=Object.keys(e),this.length=this.keys.length,this.current=0;}hasNext(){return this.current<this.length}next(){return this.keys[this.current++]}}e.haxe.ds._StringMap.StringMapKeyIterator=Ze,Ze.__name__="haxe.ds._StringMap.StringMapKeyIterator",Object.assign(Ze.prototype,{__class__:Ze,h:null,keys:null,length:null,current:null});class $e{constructor(e){this.h=e,this.keys=Object.keys(e),this.length=this.keys.length,this.current=0;}hasNext(){return this.current<this.length}next(){return this.h[this.keys[this.current++]]}}e.haxe.ds._StringMap.StringMapValueIterator=$e,$e.__name__="haxe.ds._StringMap.StringMapValueIterator",Object.assign($e.prototype,{__class__:$e,h:null,keys:null,length:null,current:null});class Qe{constructor(e){this.h=e,this.keys=Object.keys(e),this.length=this.keys.length,this.current=0;}hasNext(){return this.current<this.length}next(){let e=this.keys[this.current++];return {key:e,value:this.h[e]}}}e.haxe.ds._StringMap.StringMapKeyValueIterator=Qe,Qe.__name__="haxe.ds._StringMap.StringMapKeyValueIterator",Object.assign(Qe.prototype,{__class__:Qe,h:null,keys:null,length:null,current:null});class et extends je{constructor(e,t,s){super(e,t),this.posInfos=null==s?{fileName:"(unknown)",lineNumber:0,className:"(unknown)",methodName:"(unknown)"}:s;}toString(){return super.toString()+" in "+this.posInfos.className+"."+this.posInfos.methodName+" at "+this.posInfos.fileName+":"+this.posInfos.lineNumber}}et.__name__="haxe.exceptions.PosException",et.__super__=je,Object.assign(et.prototype,{__class__:et,posInfos:null});class tt extends et{constructor(e,t,s){null==e&&(e="Not implemented"),super(e,t,s);}}tt.__name__="haxe.exceptions.NotImplementedException",tt.__super__=et,Object.assign(tt.prototype,{__class__:tt});var st=r["haxe.io.Error"]={__ename__:!0,__constructs__:null,Blocked:{_hx_name:"Blocked",_hx_index:0,__enum__:"haxe.io.Error",toString:n},Overflow:{_hx_name:"Overflow",_hx_index:1,__enum__:"haxe.io.Error",toString:n},OutsideBounds:{_hx_name:"OutsideBounds",_hx_index:2,__enum__:"haxe.io.Error",toString:n},Custom:(s=function(e){return {_hx_index:3,e,__enum__:"haxe.io.Error",toString:n}},s._hx_name="Custom",s.__params__=["e"],s)};st.__constructs__=[st.Blocked,st.Overflow,st.OutsideBounds,st.Custom];class nt{constructor(e){this.current=0,this.array=e;}hasNext(){return this.current<this.array.length}next(){return this.array[this.current++]}}e.haxe.iterators.ArrayIterator=nt,nt.__name__="haxe.iterators.ArrayIterator",Object.assign(nt.prototype,{__class__:nt,array:null,current:null});class rt{constructor(e){this.array=e;}}rt.__name__="haxe.iterators.ArrayKeyValueIterator",Object.assign(rt.prototype,{__class__:rt,array:null});class at{constructor(e){this.map=e,this.keys=e.keys();}hasNext(){return this.keys.hasNext()}next(){let e=this.keys.next();return {value:this.map.get(e),key:e}}}at.__name__="haxe.iterators.MapKeyValueIterator",Object.assign(at.prototype,{__class__:at,map:null,keys:null});class lt{constructor(e){this.s=e;}}lt.__name__="haxe.iterators.StringIterator",Object.assign(lt.prototype,{__class__:lt,s:null});class it{constructor(e){this.s=e;}}it.__name__="haxe.iterators.StringKeyValueIterator",Object.assign(it.prototype,{__class__:it,s:null});class ot extends je{constructor(e,t,s){super(e,s),this.pos=t;}}ot.__name__="haxe.macro.Error",ot.__super__=je,Object.assign(ot.prototype,{__class__:ot,pos:null});class ct{static getClass(e){if(null==e)return null;if(e instanceof Array)return Array;{let t=e.__class__;if(null!=t)return t;let s=ct.__nativeClassName(e);return null!=s?ct.__resolveNativeClass(s):null}}static __string_rec(e,t){if(null==e)return "null";if(t.length>=5)return "<...>";let s=typeof e;switch("function"==s&&(e.__name__||e.__ename__)&&(s="object"),s){case"function":return "<function>";case"object":if(e.__enum__){let s=r[e.__enum__].__constructs__[e._hx_index],n=s._hx_name;return s.__params__?(t+="\t",n+"("+function(n){let r=[];{let n=0,a=s.__params__;for(;n<a.length;){let s=a[n];n+=1,r.push(ct.__string_rec(e[s],t));}}return r}().join(",")+")"):n}if(e instanceof Array){let s="[";t+="\t";let n=0,r=e.length;for(;n<r;){let r=n++;s+=(r>0?",":"")+ct.__string_rec(e[r],t);}return s+="]",s}let s;try{s=e.toString;}catch(e){return "???"}if(null!=s&&s!=Object.toString&&"function"==typeof s){let t=e.toString();if("[object Object]"!=t)return t}let n="{\n";t+="\t";let a=null!=e.hasOwnProperty,l=null;for(l in e)a&&!e.hasOwnProperty(l)||"prototype"!=l&&"__class__"!=l&&"__super__"!=l&&"__interfaces__"!=l&&"__properties__"!=l&&(2!=n.length&&(n+=", \n"),n+=t+l+" : "+ct.__string_rec(e[l],t));return n+="\n"+(t=t.substring(1))+"}",n;case"string":return e;default:return String(e)}}static __interfLoop(e,t){for(;;){if(null==e)return !1;if(e==t)return !0;let s=e.__interfaces__;if(null!=s&&(null==e.__super__||e.__super__.__interfaces__!=s)){let e=0,n=s.length;for(;e<n;){let n=s[e++];if(n==t||ct.__interfLoop(n,t))return !0}}e=e.__super__;}}static __instanceof(e,t){if(null==t)return !1;switch(t){case Array:return e instanceof Array;case mt:return "boolean"==typeof e;case dt:return null!=e;case gt:return "number"==typeof e;case pt:return "number"==typeof e&&(0|e)===e;case String:return "string"==typeof e;default:if(null==e)return !1;if("function"==typeof t){if(ct.__downcastCheck(e,t))return !0}else if("object"==typeof t&&ct.__isNativeObj(t)&&e instanceof t)return !0;return t==ft&&null!=e.__name__||(t==yt&&null!=e.__ename__||null!=e.__enum__&&r[e.__enum__]==t)}}static __downcastCheck(e,t){return e instanceof t||!!t.__isInterface__&&ct.__interfLoop(ct.getClass(e),t)}static __cast(e,t){if(null==e||ct.__instanceof(e,t))return e;throw je.thrown("Cannot cast "+c.string(e)+" to "+c.string(t))}static __nativeClassName(e){let t=ct.__toStr.call(e).slice(8,-1);return "Object"==t||"Function"==t||"Math"==t||"JSON"==t?null:t}static __isNativeObj(e){return null!=ct.__nativeClassName(e)}static __resolveNativeClass(e){return t[e]}}ct.__name__="js.Boot";class ut{static get_supported(){return "undefined"!=typeof window&&void 0!==window.location&&"string"==typeof window.location.protocol}static createXMLHttpRequest(){if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)return new ActiveXObject("Microsoft.XMLHTTP");throw je.thrown("Unable to create XMLHttpRequest object.")}}function _t(e){return e instanceof Array?new nt(e):e.iterator()}function ht(e,s){return null==s?null:(null==s.__id__&&(s.__id__=t.$haxeUID++),null==e.hx__closures__?e.hx__closures__={}:n=e.hx__closures__[s.__id__],null==n&&(n=s.bind(e),e.hx__closures__[s.__id__]=n),n);var n;}ut.__name__="js.Browser",ut.__properties__={get_supported:"get_supported"},t.$haxeUID|=0,"undefined"!=typeof performance&&"function"==typeof performance.now&&(l.now=performance.now.bind(performance)),null==String.fromCodePoint&&(String.fromCodePoint=function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55232+(e>>10))+String.fromCharCode(56320+(1023&e))}),Object.defineProperty(String.prototype,"__class__",{value:String,enumerable:!1,writable:!0}),String.__name__="String",Array.__name__="Array",Date.prototype.__class__=Date,Date.__name__="Date";var pt={},dt={},gt=Number,mt=Boolean,ft={},yt={};{let e,t=window.navigator.appVersion,s=window.navigator.userAgent,n=window.navigator.appName,r=parseFloat(navigator.appVersion)+"";b.majorVersion=parseFloat(t);let l=s.indexOf("OPR/");if(-1!=l)n="Opera",r=s.substring(l+4);else if(l=s.indexOf("Opera"),-1!=l)n="Opera",r=s.substring(l+6),l=s.indexOf("Version"),-1!=l&&(r=s.substring(l+8));else if(l=s.indexOf("Edge"),-1!=l){let e;n="Edge",r=s.substring(l+5),window.MediaKeys?(l=s.indexOf("Chrome"),e=-1!=l):e=!1,e?(n="EdgeChromium",r=s.substring(l+7)):"reversed"in document.createElement("ol")&&(n="EdgeChromium",r="80");}else if(l=s.indexOf("Edg/"),-1!=l)n="EdgeChromium",r=s.substring(l+4);else if(l=s.indexOf("MSIE"),-1!=l)n="Microsoft Internet Explorer",r=s.substring(l+5);else {let t;-1!=s.indexOf("Trident/")?(l=s.indexOf("rv:"),t=-1!=l):t=!1,t?(n="Microsoft Internet Explorer",r=s.substring(l+3)):(l=s.indexOf("Chrome"),-1!=l?(n="Chrome",r=s.substring(l+7)):(l=s.indexOf("Safari"),-1!=l?(n="Safari",r=s.substring(l+7),l=s.indexOf("Version"),-1!=l&&(r=s.substring(l+8))):(l=s.indexOf("Firefox"),-1!=l?(n="Firefox",r=s.substring(l+8)):(e=s.lastIndexOf(" ")+1,l=s.lastIndexOf("/"),e<l&&(n=s.substring(e,l),r=s.substring(l+1),n.toLowerCase()==n.toUpperCase()&&(n=window.navigator.appName))))));}let i=r.indexOf(";");if(-1!=i&&(r=r.substring(0,i)),i=r.indexOf(" "),-1!=i)r=r.substring(0,i);else if("Netscape"==n){let e=new a("Trident.*rv:([0-9]{1,}[\\.0-9]{0,})","");e.match(s);try{e.matched(0),r=e.matched(1),n="Microsoft Internet Explorer";}catch(e){}}b.majorVersion=c.parseInt(""+r);let o=b.majorVersion;isNaN(o)&&(r=""+parseFloat(t),b.majorVersion=c.parseInt(t)),b.browserName=n;let u=window.navigator.userAgent;u=u.toLowerCase(),b.isAndroid=u.indexOf("android")>-1,b.isBlackBerry=u.indexOf("blackberry")>-1,b.isiPhone=u.indexOf("iphone")>-1,b.isiPad=u.indexOf("ipad")>-1,b.isiPod=u.indexOf("ipod")>-1,b.isOperaMini=u.indexOf("opera mini")>-1,b.isIeMobile=u.indexOf("iemobile")>-1,b.isWindowsPhone=u.indexOf("windows phone")>-1,b.isEdge="Edge"==b.browserName;let _=navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&-1!=(navigator.platform+"").indexOf("MacIntel");if(b.isiOS=b.isiPhone||b.isiPad||b.isiPod||_,b.mobile=b.isAndroid||b.isBlackBerry||b.isiOS||b.isOperaMini||b.isIeMobile,u.indexOf("smart-tv")>-1||u.indexOf("smarttv")>-1){b.smartTV=!0;let e=u.indexOf("samsungbrowser")>-1,t=u.indexOf("tizen")>-1;b.isSamsungSmartTVTizen=t&&!e;}else b.smartTV=!1,b.isSamsungSmartTVTizen=!1;}{x.expose=o.field(window,"bradmax"),null==x.expose&&(window.bradmax=Object.create(null),x.expose=o.field(window,"bradmax"));let e=["bigsoda"],t=0;for(;t<e.length;){let s=e[t];++t,window[s]=x.expose;}0==Object.prototype.hasOwnProperty.call(x.expose,"player")&&(x.expose.player=Object.create(null));let s=o.field(x.expose,"player");0==Object.prototype.hasOwnProperty.call(s,"plugin")&&(s.plugin=Object.create(null)),0==Object.prototype.hasOwnProperty.call(s,"create")&&(s.create=Object.create(null)),0==Object.prototype.hasOwnProperty.call(s,"destroy")&&(s.destroy=Object.create(null)),0==Object.prototype.hasOwnProperty.call(s,"list")&&(s.list=Object.create(null)),0==Object.prototype.hasOwnProperty.call(s,"getById")&&(s.getById=Object.create(null)),0==Object.prototype.hasOwnProperty.call(s,"embeders")&&(s.embeders=Object.create(null)),0==Object.prototype.hasOwnProperty.call(s,"composers")&&(s.composers=Object.create(null));Object.prototype.hasOwnProperty.call(s,"embeder");let n="modular_v2.14.287";x.sourcePath=b.findThisJsScriptAbsolutePath(n);let r=o.field(s,"embeders");null==o.field(r,n)&&(r[n]=x);let a=o.field(s,"composers");null==o.field(a,n)&&(a[n]=y);}{let e=window.document;A.fullscreenEventName="fullscreenchange","Safari"==b.browserName&&null!=e.webkitIsFullScreen?A.fullscreenEventName="webkitfullscreenchange":"Firefox"==b.browserName&&null!=e.mozFullScreen&&b.majorVersion<64?A.fullscreenEventName="mozfullscreenchange":null!=e.msFullscreenEnabled&&(A.fullscreenEventName="MSFullscreenChange");}ct.__toStr={}.toString,a.escapeRe=new RegExp("[.*+?^${}()|[\\]\\\\]","g"),_.winMetaCharacters=[32,40,41,37,33,94,34,60,62,38,124,10,13,44,59],h.winMetaCharacters=_.winMetaCharacters,h.MIN_SURROGATE_CODE_POINT=65536,g._hx_skip_constructor=!1,x.NAMESPACE="bradmax",x.ATTRIBUTE_PID="data-bradmax-player-pid",x.VIDEO_TAG_FOR_AUTOPLAY_INITIALSED="data-ready-for-autoplay",x.PLAYER_ATTRIBUTE_PARENT_ID="data-bs-parent-id",x.PLAYER_ATTRIBUTE_VARIABLES="data-bs-variables",x.HTML_VIDEO_MAX_ELEMENTS_FOR_LATER_AUTOPLAY=2,x.players=new Ke,x.wrappers=[],x.htmlVideoElementsForLaterAutoplay=[],x.pendingVideoElementsForLaterAutoplay=0,x.listenersWaitinfForVideoElementForAutoplay=[],j.instance=new j,j.listenersMap=new Ke,j.onceListenersMap=new Ke,j.disabledListenersMap=new Ke,M.instance=new M,V.monitors=new Ke,H._hx_skip_constructor=!1,Ae.libLoaded=!1,Ae._isAvailable=!1,Ue.locale="en",Fe.UID_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",qe.CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qe.BYTES=Re.ofString(qe.CHARS),qe.URL_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",qe.URL_BYTES=Re.ofString(qe.URL_CHARS);}(exports,window); |
| 4 | | !function(t,e){t.bs=t.bs||{},t.bs.player=t.bs.player||{},t.bs.player.plugin=t.bs.player.plugin||{},t.bs.player.plugin.skin=t.bs.player.plugin.skin||{};var s,i=function(){return Ht.__string_rec(this,"")},a=a||{},l=require("haxe.EReg"),n=require("haxe.EReg"),r=require("haxe.HxOverrides");Math.__name__="Math";var o=require("haxe.Reflect");class h{static string(t){return Ht.__string_rec(t,"")}static parseInt(t){let e=parseInt(t);return isNaN(e)?null:e}static random(t){return t<=0?0:Math.floor(Math.random()*t)}}h.__name__="Std";var u=require("haxe.StringTools"),c=require("bs.net.Http"),d=require("bs.player.core.events.AdEvent"),p=require("bs.player.core.events.ControlEvent"),m=require("bs.player.core.events.DataProviderEvent"),g=require("bs.player.core.events.DisplayEvent"),f=require("bs.util.BrowserTools"),_=require("bs.player.core.events.NativeEvent"),b=require("bs.player.core.events.ResizeEvent"),v=require("bs.player.core.events.SphericalVideoEvent"),y=require("bs.player.core.events.VideoEvent"),x=require("bs.player.core.manager.PlaybackStateRegister"),w=require("bs.player.core.model.Live"),k=require("bs.player.core.model.LiveStream"),E=require("bs.player.core.model.MediaPlaylist"),S=require("bs.player.core.model.Image"),P=require("bs.player.core.model.Point"),C=require("bs.player.core.model.Episode");class O{constructor(t){this.message=t;}}O.__name__="bs.player.core.model.VttParserError",Object.assign(O.prototype,{__class__:O});class T{constructor(){T._hx_skip_constructor||this._hx_constructor();}_hx_constructor(){this.pluginName="";let t=Ht.getClass(this);this.pluginName=t.__name__.split(".").pop();let e=this.pluginName,s=exports.configuration;this.pluginConfig=null!=s&&Object.prototype.hasOwnProperty.call(s,e)?o.field(s,e):Object.create(null);}create(){}destroy(){}activate(){}postActivate(){}deactivate(){}eventFilter(t){return !0}registerPlugin(t){}getPluginVersion(){return "v2.14.287"}getPluginName(){return this.pluginName}get_player(){return this.player}set_player(t){return this.player=t}get_variables(){return this.variables}set_variables(t){return this.variables=t}get_eventHub(){return this.eventHub}set_eventHub(t){return this.eventHub=t}get_parentDisplay(){return this.parentDisplay}set_parentDisplay(t){return this.parentDisplay=t}get_display(){return this.display}}T.__name__="bs.player.core.plugin.PluginBase",Object.assign(T.prototype,{__class__:T});class M{constructor(){M._hx_skip_constructor||this._hx_constructor();}_hx_constructor(){this.lineNumber=0,this.TIMESTAMP_SEPARATOR=" --\x3e ",this.WHITESPACE_REGEX=new l("[ \t\r\n]+","g"),this.END_LINE_REGEX=new l("(\r\n)|(\n)","g");}readLine(){let t=this.lines[this.lineNumber];return this.lineNumber++,null!=t&&0==this.lineNumber?u.replace(t,"\ufeff",""):t}isFileEnd(){return this.lineNumber>=this.lines.length}isEmptyStr(t){return null==t||""==t}skipEmptyLines(){let t=this.readLine();for(;this.isEmptyStr(t)&&!this.isFileEnd();)t=this.readLine();this.isFileEnd()||this.lineNumber--;}parseTimestamp(t){let e=t.split("."),s=e[0].split(":"),i=e[1],a=s.pop(),l=s.pop(),n=s.pop(),r=0;return r=0+3600*(null==n?0:h.parseInt(n)),r+=60*(null==l?0:h.parseInt(l)),r+=null==a?0:h.parseInt(a),r+=(null==i?0:h.parseInt(i))/1e3,r}parseHeader(t){if(-1==(t=u.trim(t)).indexOf("WEBVTT"))throw Nt.thrown(new O("Error in line: "+this.lineNumber+". WEBVTT text expected in first line."));return t}}M.__name__="bs.player.core.plugin.VttParser",Object.assign(M.prototype,{__class__:M});class A extends T{constructor(){T._hx_skip_constructor=!0,super(),T._hx_skip_constructor=!1,this._hx_constructor();}_hx_constructor(){this.fontsLoaded=!1,this.sourcesLoaded=!1,this.ready=!1,this.layoutAvailable=!1,this.activated=!1,this._css={adPlaying:"iab-playing",vpaidPlaying:"vpaid-playing"};let t={current:{time:0,text:Lt.formatTime(0)},duration:{time:0,text:Lt.formatTime(0)},status:{inited:!1,playing:!1,paused:!1,buffering:!1,seeking:!1,complete:!1,live:!1,dvr:!1},playPause:null,seekEnd:null},e=isNaN(1)||!isFinite(1)?"0%":Math.max(0,Math.min(100,100))+"%",s={time:0,text:Lt.formatTime(0),width:"0",seekable:!0,has:{thumb:!1,segments:!1,segment:!1,markers:!1,marker:!1,texts:!1},popup:{active:!1,time:0,text:Lt.formatTime(0),position:"0",width:"0",bounds:{offset:"0px",ctrl:null},ctrl:null},ctrl:null},i=f.browserName.toLowerCase(),a=f.isMobile(),l=f.isiOS,n=f.isSmartTV();this.state={name:"",prefix:"",title:null,video:t,volume:{mute:!1,value:1,prc:e,text:"100",active:!1,ctrl:null,toggle:null},progress:s,playlist:{hasNext:!1,currentPos:-1,items:null,playItem:null},brand:null,splash:{show:{start:!1,state:!1,end:!1},start:{type:"image"},state:{type:"standard"},end:{type:"standard",playNext:null}},share:null,menu:{count:0,audio:{hasItems:!1,activate:null},casting:null,fullscreen:null,pictureInPicture:null,quality:{hasItems:!1,activate:null},subtitles:{hasItems:!1,activate:null},vr:null,playbackRate:{hasItems:!1,items:null,activate:null}},contextmenu:{show:!1,ctrl:null},ad:null,hide:"show",size:{width:NaN,height:NaN,css:"",is:{xxs:!0,xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1},not:{xxs:!1,xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}},device:{browserName:i,mobile:a,ios:l,tv:n,tizen:f.isSamsungSmartTVTizen,css:null},message:null,icon:{type:"css",airplay:{id:"bmp-ico-airplay"},alert:{id:"bmp-ico-alert"},subtitles:{id:"bmp-ico-subtitles"},pip:{id:"bmp-ico-pip"},chromecast:{id:"bmp-ico-chromecast"},copy:{id:"bmp-ico-copy"},playNext:{id:"bmp-ico-play-next"},maximize:{id:"bmp-ico-maximize"},minimize:{id:"bmp-ico-minimize"},menu:{id:"bmp-ico-menu"},audio:{id:"bmp-ico-audio"},pause:{id:"bmp-ico-pause"},play:{id:"bmp-ico-play"},replay:{id:"bmp-ico-replay"},quality:{id:"bmp-ico-quality"},share:{id:"bmp-ico-share",type:"css",code:{id:"bmp-ico-code",group:"share"},mail:{id:"bmp-ico-mail",group:"share"},facebook:{id:"bmp-ico-facebook",group:"share"},twitter:{id:"bmp-ico-twitter",group:"share"},linkedin:{id:"bmp-ico-linkedin",group:"share"}},volume:{id:"bmp-ico-volume"},volume1:{id:"bmp-ico-volume-1"},volume2:{id:"bmp-ico-volume-2"},volumeX:{id:"bmp-ico-volume-x"},close:{id:"bmp-ico-close"},left:{id:"bmp-ico-left"},right:{id:"bmp-ico-right"},up:{id:"bmp-ico-up"},down:{id:"bmp-ico-down"},center:{id:"bmp-ico-center"},vr:{id:"bmp-ico-vr"},gyroscope:{id:"bmp-ico-gyroscope"},zoom:{plus:{id:"bmp-ico-zoom-plus"},minus:{id:"bmp-ico-zoom-minus"},reset:{id:"bmp-ico-zoom-reset"}},playbackRate:{id:"bmp-ico-playback-rate"}},camera:null,timeCss:yt.formatCss,img:{srcset:bt.stateToAttribute,sizes:bt.stateToSizesAttribute}},this.litOptions={},this.lit=new I,super._hx_constructor();}formatEncapsulation(t){return "[data-"+this.get_prefix()+"-name="+t+"]"}create(){super.create();let t=It.copy(this.pluginConfig),e=this;this.readResources(t,(function(s){if(e.parseResources(t,s),e.state.name=e.get_name(),e.state.prefix=e.get_prefix(),e.litOptions.host=e,e.attachFonts(),e.attachCssVars(),e.fetchSources(),null!=e.icon){let t=e.icon,s=null!=e.get_icons()&&null!=e.get_icons().svg,i=null!=e.get_shareIcons()&&null!=e.get_shareIcons().svg;t.updateTypesState(s?"svg":"css",i?"svg":"css");}})),this.start();}destroy(){this.ready=!1,this.sourcesLoaded=!1,this.fontsLoaded=!1,this.activated=!1,this.layoutAvailable=!1,null!=this.size&&this.size.destroy(),null!=this.device&&this.device.destroy(),null!=this.ad&&this.ad.destroy(),null!=this.video&&this.video.destroy(),null!=this.splash&&this.splash.destroy(),null!=this.progress&&this.progress.destroy(),null!=this.volume&&this.volume.destroy(),null!=this.brand&&this.brand.destroy(),null!=this.title&&this.title.destroy(),null!=this.playlist&&this.playlist.destroy(),null!=this.menu&&this.menu.destroy(),null!=this.share&&this.share.destroy(),null!=this.message&&this.message.destroy(),null!=this.hide&&this.hide.destroy(),null!=this.icon&&this.icon.destroy(),null!=this.camera&&this.camera.destroy(),null!=this.contextmenu&&this.contextmenu.destroy();}activate(){this.activated=!0;}deactivate(){this.activated=!1;}getLayout(t){return null==t&&(t=!1),t?this.get_parsedLayout():this.get_layout()}redrawLayout(t){this.set_layout(t),this.set_parsedLayout(t),this.layoutAvailable=null!=this.get_parsedLayout()&&this.get_parsedLayout().length>0,this.render();}init(){this.state.name=this.get_name(),this.state.prefix=this.get_prefix(),this.litOptions.host=this;}inited(){0!=this.sourcesLoaded&&0!=this.fontsLoaded&&(this.ready=this.sourcesLoaded&&this.fontsLoaded,0!=this.ready&&null!=this.skinElement&&(this.skinElement.classList.add(this.get_prefix()+"-ready"),this.skinElement.style.display="block",this.skinElement.classList.add(this.get_prefix()),1!=this.state.device.tizen?this.skinElement.classList.add(this.get_prefix()+"-can-blur"):this.skinElement.classList.add(this.get_prefix()+"-cant-blur"),this.skinElement.setAttribute("data-"+this.get_prefix()+"-name",this.get_name())));}readResources(t,e){let s=this.get_variables(),i=null;Object.prototype.hasOwnProperty.call(s,"skin")&&(i=o.field(s,"skin"));let a=i,l=null;null!=a&&Object.prototype.hasOwnProperty.call(a,"theme")&&(l=o.field(a,"theme")),null!=t&&Object.prototype.hasOwnProperty.call(t,"theme")&&(l=o.field(t,"theme"));let n=this;if(null!=l&&"string"==typeof l){let t=0==l.indexOf("http");if(0==t&&0==["gorilla","disco","zebra","mole","techno","jazz","snake"].includes(l)){let t={plugin:this.pluginName,error:'Invalid theme name: "'+l+'"'};return void console.error(t)}let s=new c(t?this.versionUrl(l):this.versionUrl("https://bradm.ax/player/VERSION/theme/THEME.json".split("THEME").join(l)));s.onError=Gt(this,this.reportError);let i=function(t){let s=null;try{s=JSON.parse(t);}catch(t){let e=Nt.caught(t),s={plugin:n.pluginName,error:e};console.error(s);}e(It.merge(s,a));};s.onData=i,s.request(!1);}else e(a);}parseResources(t,e){null!=e&&null!=t&&(Object.prototype.hasOwnProperty.call(e,"icon")&&Object.prototype.hasOwnProperty.call(t,"icon")&&(Object.prototype.hasOwnProperty.call(e.icon,"svg")&&Object.prototype.hasOwnProperty.call(t.icon,"font")&&o.deleteField(t.icon,"font"),Object.prototype.hasOwnProperty.call(e.icon,"font")&&Object.prototype.hasOwnProperty.call(t.icon,"svg")&&o.deleteField(t.icon,"svg")),Object.prototype.hasOwnProperty.call(e,"share")&&Object.prototype.hasOwnProperty.call(t,"share")&&(Object.prototype.hasOwnProperty.call(e.share,"svg")&&Object.prototype.hasOwnProperty.call(t.share,"font")&&o.deleteField(t.share,"font"),Object.prototype.hasOwnProperty.call(e.share,"font")&&Object.prototype.hasOwnProperty.call(t.share,"svg")&&o.deleteField(t.share,"svg")));let s=It.merge(t,e),i=Object.prototype.hasOwnProperty.call(s,"prefix")?o.field(s,"prefix"):null;if(null!=i&&"string"==typeof i){let t=u.trim(i);if(""!=t){let e=t;e=(""+t).toLowerCase().split(" ").join(""),e=new l("[^a-zA-Z0-9_-]","g").split(e).join(""),e=new l("^[0-9]*","g").split(e).join(""),this.set_prefix(e);}}let a=Object.prototype.hasOwnProperty.call(s,"css")?o.field(s,"css"):null;if(null!=a){if(null!=a.adPlaying&&"string"==typeof a.adPlaying){let t=u.trim(a.adPlaying);if(""!=t){let e=t;e=(""+t).toLowerCase().split(" ").join(""),e=new l("[^a-zA-Z0-9_-]","g").split(e).join(""),e=new l("^[0-9]*","g").split(e).join(""),this.get_css().adPlaying=e;}}if(null!=a.vpaidPlaying&&"string"==typeof a.vpaidPlaying){let t=u.trim(a.vpaidPlaying);if(""!=t){let e=t;e=(""+t).toLowerCase().split(" ").join(""),e=new l("[^a-zA-Z0-9_-]","g").split(e).join(""),e=new l("^[0-9]*","g").split(e).join(""),this.get_css().vpaidPlaying=e;}}}let n=Object.prototype.hasOwnProperty.call(s,"name")?o.field(s,"name"):null;if(null!=n&&"string"==typeof n){let t=u.trim(n);if(""!=t){let e=t;e=(""+t).toLowerCase().split(" ").join(""),e=new l("[^a-zA-Z0-9_-]","g").split(e).join(""),e=new l("^[0-9]*","g").split(e).join(""),this.set_name(e);}}let r=Object.prototype.hasOwnProperty.call(s,"color")?o.field(s,"color"):null;null!=r&&"string"==typeof r&&this.set_color(u.trim(r));let h=Object.prototype.hasOwnProperty.call(s,"font")?o.field(s,"font"):null;null!=h&&this.set_font(h);let c=Object.prototype.hasOwnProperty.call(s,"icon")?o.field(s,"icon"):null;null!=c&&this.set_icons(c);let d=Object.prototype.hasOwnProperty.call(s,"share")?o.field(s,"share"):null;if(null!=d&&this.set_shareIcons(d),this.set_styles([]),null!=s&&Object.prototype.hasOwnProperty.call(s,"styles")){let t=o.field(s,"styles");if("string"==typeof t)this.get_styles().push(t);else if(t instanceof Array){let e=t,s=0;for(;s<e.length;){let t=e[s++];this.get_styles().push(t);}}}let p=Object.prototype.hasOwnProperty.call(s,"layout")?o.field(s,"layout"):"";null!=p&&"string"==typeof p&&this.set_layout(u.trim(p)),this.skinCssSelector="[id="+this.uid+"_skin][data-"+this.get_prefix()+"-name="+this.get_name()+"]",this.skinIcoPrefix=this.uid+"_skin_ico_";}updateResources(){this.attachFonts(),this.attachCssVars(),this.fetchSources();}start(){this.skinElement=window.document.createElement("div"),this.skinElement.id=this.uid+"_skin",this.skinElement.style.display="none",this.get_parentDisplay().appendChild(this.skinElement);let t=this;this.size=new at(this.context,this.get_variables(),(function(e,s){t.sizeVarChange(e,(function(){t.stateChange({size:e},s);}));}),(function(e){let s={plugin:t.pluginName,error:e};console.error(s);}),this.get_prefix(),this.skinElement),this.device=new H(this.context,this.get_variables(),(function(e,s){t.stateChange({device:e},s);}),(function(e){let s={plugin:t.pluginName,error:e};console.error(s);}),this.get_prefix(),this.skinElement),this.ad=new D(this.context,this.get_variables(),(function(e,s){t.stateChange({ad:e},s);}),(function(e){let s={plugin:t.pluginName,error:e};console.error(s);}),this.get_css(),this.skinElement),this.video=new ut(this.context,this.get_variables(),(function(e,s){t.stateChange({video:e},s);}),(function(e){let s={plugin:t.pluginName,error:e};console.error(s);})),this.splash=new lt(this.context,this.get_variables(),(function(e,s){t.stateChange({splash:e},s);}),(function(e){let s={plugin:t.pluginName,error:e};console.error(s);})),this.progress=new tt(this.context,this.get_variables(),(function(e,s){t.stateChange({progress:e},s);}),(function(e){let s={plugin:t.pluginName,error:e};console.error(s);}),this.skinElement),this.volume=new ct(this.context,this.get_variables(),(function(e,s){t.stateChange({volume:e},s);}),(function(e){let s={plugin:t.pluginName,error:e};console.error(s);}),this.skinElement),this.brand=new N(this.context,this.get_variables(),(function(e,s){t.stateChange({brand:e},s);}),(function(e){let s={plugin:t.pluginName,error:e};console.error(s);})),this.title=new ht(this.context,this.get_variables(),(function(e,s){t.stateChange({title:e},s);}),(function(e){let s={plugin:t.pluginName,error:e};console.error(s);})),this.playlist=new J(this.context,this.get_variables(),(function(e,s){t.stateChange({playlist:e},s);}),(function(e){let s={plugin:t.pluginName,error:e};console.error(s);})),this.menu=new K(this.context,this.get_variables(),(function(e,s){t.stateChange({menu:e},s);}),(function(e){let s={plugin:t.pluginName,error:e};console.error(s);}),this.get_parentDisplay()),this.share=new st(this.context,this.get_variables(),(function(e,s){t.stateChange({share:e},s);}),(function(e){let s={plugin:t.pluginName,error:e};console.error(s);})),this.message=new Q(this.context,this.get_variables(),(function(e,s){t.stateChange({message:e},s);}),(function(e){let s={plugin:t.pluginName,error:e};console.error(s);})),this.icon=new X(this.context,this.get_variables(),(function(e,s){t.stateChange({icon:e},s);}),(function(e){let s={plugin:t.pluginName,error:e};console.error(s);})),this.hide=new G(this.context,this.get_variables(),(function(e,s){t.stateChange({hide:e},s);}),(function(e){let s={plugin:t.pluginName,error:e};console.error(s);}),this.get_prefix(),this.get_parentDisplay()),this.camera=new R(this.context,this.get_variables(),(function(e,s){t.stateChange({camera:e},s);}),(function(e){let s={plugin:t.pluginName,error:e};console.error(s);}),this.skinElement),this.contextmenu=new B(this.context,this.get_variables(),(function(e,s){t.stateChange({contextmenu:e},s);}),(function(e){let s={plugin:t.pluginName,error:e};console.error(s);}),this.get_prefix(),this.skinElement,this.get_playerVersion());this.contextmenu.renderTemplate=function(e){return t.lit.template(t.lit.parseLayout(e))};if(this.contextmenu.renderHtml=function(e,s){return t.lit.render(s,e,t.litOptions)},null!=this.icon){let t=this.icon,e=null!=this.get_icons()&&null!=this.get_icons().svg,s=null!=this.get_shareIcons()&&null!=this.get_shareIcons().svg;t.updateTypesState(e?"svg":"css",s?"svg":"css");}}updateIconTypes(){if(null!=this.icon){let t=this.icon,e=null!=this.get_icons()&&null!=this.get_icons().svg,s=null!=this.get_shareIcons()&&null!=this.get_shareIcons().svg;t.updateTypesState(e?"svg":"css",s?"svg":"css");}}isUrl(t){return null!=t&&"string"==typeof t&&u.trim(t).length>0}versionUrl(t){let e=u.trim(t);return (""+decodeURIComponent(e.split("+").join(" "))).split("VERSION").join(this.get_playerVersion())}attachFonts(){let t=[];if(null!=this.get_font()&&t.push(this.get_font()),null!=this.get_icons()&&null!=this.get_icons().font&&t.push(this.get_icons().font),null!=this.get_shareIcons()&&null!=this.get_shareIcons().font&&t.push(this.get_shareIcons().font),0==t.length)return;let e="",s=0;for(;s<t.length;){let i,a=t[s];if(++s,1==a.fetch&&null!=a.id){let t=a.src;i=null!=t&&"string"==typeof t&&u.trim(t).length>0;}else i=!1;i&&(e+='<link id="'+a.id+'" href="'+this.versionUrl(a.src)+'" rel="stylesheet" crossorigin @load="${ctx._LOADED_}" >');}let i=window.document.createElement("head"),a=0,l=this;this.lit.render(this.lit.template(e)({_LOADED_:function(){if(a-=1,l.fontsLoaded=0==a,l.fontsLoaded){if(null!=l.initedRafId){let t=l.initedRafId;null==t||isNaN(t)||window.cancelAnimationFrame(t);}let t=Gt(l,l.inited),e=-1;e=window.requestAnimationFrame((function(e){t();})),l.initedRafId=e;}}}),i,this.litOptions),a=pt.injectAssets(window.document.head,this.get_prefix(),i),this.fontsLoaded=0==a;}attachCssVars(){let t=[],e=this,s=function(s,i,a){let l=[];if(null!=a.family&&a.family instanceof Array&&l.push("--"+e.get_prefix()+"-"+s+"-family: "+a.family.join(", ")+";"),null!=a.size&&l.push("--"+e.get_prefix()+"-"+s+"-size: "+a.size+";"),null!=a.code){let t=0,i=o.fields(a.code);for(;t<i.length;){let n=i[t];++t,l.push("--"+e.get_prefix()+"-"+s+"-code-"+n+': "\\'+h.string(o.field(a.code,n))+'";');}}let n=[];if(null!=a.variation){let t=0,e=o.fields(a.variation);for(;t<e.length;){let s=e[t];++t,n.push('"'+s+'" '+h.string(o.field(a.variation,s)));}}let r=n.length>0?"font-variation-settings: "+n.join(", ")+";":"";t.push(i+"{"+r+l.join("")+"}");},i=function(s,i,a){let l=[];null!=a.size&&l.push("--"+e.get_prefix()+"-"+s+"-size: "+a.size+";"),l.length>0&&t.push(i+"{"+l.join("")+"}");};if(null!=this.get_font()&&s("font",""+this.skinCssSelector,this.get_font()),null!=this.get_icons()&&(null!=this.get_icons().font&&s("icon",this.skinCssSelector+" ."+this.get_prefix()+"-ico",this.get_icons().font),null!=this.get_icons().svg&&i("icon",this.skinCssSelector+" ."+this.get_prefix()+"-ico",this.get_icons().svg)),null!=this.get_shareIcons()&&(null!=this.get_shareIcons().font&&s("icon-share",this.skinCssSelector+" ."+this.get_prefix()+"-share-ico",this.get_shareIcons().font),null!=this.get_shareIcons().svg&&i("icon-share",this.skinCssSelector+" ."+this.get_prefix()+"-share-ico",this.get_shareIcons().svg)),0!=t.length){if(null==this.fontVarsElement){let t=this.uid+"_skin_font";this.fontVarsElement=window.document.querySelector(t),null==this.fontVarsElement&&(this.fontVarsElement=window.document.createElement("style"),this.fontVarsElement.id=t,null!=this.skinElement?this.get_parentDisplay().insertBefore(this.fontVarsElement,this.skinElement):this.get_parentDisplay().appendChild(this.fontVarsElement));}this.fontVarsElement.innerText="",this.fontVarsElement.insertAdjacentHTML("beforeend",t.join("\n"));}}fetchSources(){let t,e,s=Object.create(null),i=this,a=function(t){s[t].loaded=!0;let e=s,a=Object.keys(e),l=a.length,n=0;for(;n<l;)if(0==e[a[n++]].loaded)return;if(i.sourcesLoaded=!0,i.sourcesLoaded){if(null!=i.initedRafId){let t=i.initedRafId;null==t||isNaN(t)||window.cancelAnimationFrame(t);}let t=Gt(i,i.inited),e=-1;e=window.requestAnimationFrame((function(e){t();})),i.initedRafId=e;}},l=this.get_layout();if(null!=l&&"string"==typeof l&&u.trim(l).length>0){let t="layout",e=new c(this.versionUrl(this.get_layout()));e.onError=Gt(this,this.reportError),e.onData=function(e){a(t),i.redrawLayout(e);},s[t]={loaded:!1,req:e};}else {let t={plugin:this.pluginName,error:"missing layout url"};console.error(t);}if(null!=this.get_icons()&&null!=this.get_icons().svg){let e=this.get_icons().svg.iconset;t=null!=e&&"string"==typeof e&&u.trim(e).length>0;}else t=!1;if(t){let t=this.get_icons().svg.id;if(!Object.prototype.hasOwnProperty.call(s,""+t)){let e=new c(this.versionUrl(this.get_icons().svg.iconset));e.onError=Gt(this,this.reportError),e.onData=function(e){a(t),i.renderSvgset(i.uid+"_"+t+"_skin_iconset",e);},s[""+t]={loaded:!1,req:e};}}if(null!=this.get_shareIcons()&&null!=this.get_shareIcons().svg){let t=this.get_shareIcons().svg.iconset;e=null!=t&&"string"==typeof t&&u.trim(t).length>0;}else e=!1;if(e){let t=this.get_shareIcons().svg.id;if(!Object.prototype.hasOwnProperty.call(s,""+t)){let e=new c(this.versionUrl(this.get_shareIcons().svg.iconset));e.onError=Gt(this,this.reportError),e.onData=function(e){a(t),i.renderSvgset(i.uid+"_"+t+"_skin_iconset",e);},s[""+t]={loaded:!1,req:e};}}let n="style",r=this.get_styles(),o=0;for(;o<r.length;){let t=r[o],e=o++;if(null!=t&&"string"==typeof t&&u.trim(t).length>0){let l=new c(this.versionUrl(t));l.onError=Gt(this,this.reportError);let r=function(t){a(n+"["+e+"]");let s=window.document.head,l=i.get_prefix(),r=i.get_name(),o="[data-"+i.get_prefix()+"-name="+r+"]";pt.appendStyle(s,l,null!=o&&t.includes(":host")?t.split(":host").join(o):t);};l.onData=r,s[n+"["+e+"]"]={loaded:!1,req:l};}}let h=s,d=Object.keys(h),p=d.length,m=0;for(;m<p;)h[d[m++]].req.request(!1);}renderSvgset(t,e){let s=window.document.createElement("div");this.lit.render(this.lit.template(e,"svg")({}),s,this.litOptions);let i,a=s.querySelectorAll("symbol"),l=0;for(;l<a.length;)i=a[l++],i.id=""+this.skinIcoPrefix+i.id;let n=window.document.querySelector(t);null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n),n=s.querySelector("svg"),n.id=t,n.style.display="none",null!=this.skinElement?this.get_parentDisplay().insertBefore(n,this.skinElement):this.get_parentDisplay().appendChild(n);}reportError(t){let e={plugin:this.pluginName,error:t};console.error(e);}sizeVarChange(t,e){let s=this.skinCssSelector+" { --"+this.get_prefix()+"-width: "+t.width+"px; --"+this.get_prefix()+"-height: "+t.height+"px; }";if(null==this.sizeVarsElement){let t=this.uid+"_skin_size";this.sizeVarsElement=window.document.querySelector(t),null==this.sizeVarsElement&&(this.sizeVarsElement=window.document.createElement("style"),this.sizeVarsElement.id=t,null!=this.skinElement?this.get_parentDisplay().insertBefore(this.sizeVarsElement,this.skinElement):this.get_parentDisplay().appendChild(this.sizeVarsElement));}this.sizeVarsElement.innerText="",this.sizeVarsElement.insertAdjacentHTML("beforeend",s),null!=e&&o.isFunction(e)&&e();}stateChange(t,e){if(null!=t){let e=0,s=o.fields(t);for(;e<s.length;){let i=s[e];++e,this.state[i]=o.field(t,i);}}this.render(e);}render(t){0!=this.activated&&0!=this.layoutAvailable&&(this.lit.render(this.skinTemplate(this.state),this.skinElement,this.litOptions),null!=t&&o.isFunction(t)&&t(this.skinElement));}get_prefix(){return this._prefix}set_prefix(t){return this._prefix=t,this.state.prefix=t,this.skinCssSelector="[id="+this.uid+"_skin][data-"+t+"-name="+this.get_name()+"]",null!=this.hide&&this.hide.set_prefix(t),null!=this.contextmenu&&this.contextmenu.set_prefix(t),null!=this.size&&this.size.set_prefix(t),null!=this.device&&this.device.set_prefix(t),this._prefix}get_css(){return this._css}set_css(t){return this._css=t,this._css}get_name(){return this._name}set_name(t){return this._name=t,this.state.name=t,this.skinCssSelector="[id="+this.uid+"_skin][data-"+this.get_prefix()+"-name="+t+"]",this._name}get_playerVersion(){return "v2.14.287"}get_color(){return this._color}set_color(t){if(this._color=t,null==this.colorVarsElement){let t=this.uid+"_skin_colors";this.colorVarsElement=window.document.querySelector(t),null==this.colorVarsElement&&(this.colorVarsElement=window.document.createElement("style"),this.colorVarsElement.id=t,null!=this.skinElement?this.get_parentDisplay().insertBefore(this.colorVarsElement,this.skinElement):this.get_parentDisplay().appendChild(this.colorVarsElement));}this.colorVarsElement.innerText="";let e="string"==typeof t&&""!=t?this.skinCssSelector+" { --"+this.get_prefix()+"-main-color: "+t+"; }":"";return ""!=e&&this.colorVarsElement.insertAdjacentHTML("beforeend",e),this._color}get_font(){return this._font}set_font(t){return this._font=t,this._font}get_icons(){return this._icons}set_icons(t){return this._icons=t,this._icons}get_shareIcons(){return this._shareIcons}set_shareIcons(t){return this._shareIcons=t,this._shareIcons}get_styles(){return this._styles}set_styles(t){return this._styles=t,this._styles}get_layout(){return this._layout}set_layout(t){return this._layout=t,this._layout}get_parsedLayout(){return this._parsedLayout}set_parsedLayout(t){return this._parsedLayout=this.lit.parseLayout(t),this.skinTemplate=this.lit.template(this._parsedLayout),this._parsedLayout}}t.bs.player.plugin.skin.HtmlSkin=A,A.__name__="bs.player.plugin.skin.HtmlSkin",A.__super__=T,Object.assign(A.prototype,{__class__:A});class I{constructor(){this.api=I.native();}render(t,e,s){return this.api.render(t,e,s)}template(t,e){return this.api.template(t,e)}parseLayout(t){return vt.cleanup(t),t=this.litIf(t),t=this.litFor(t)}litFor(t){if(t.indexOf("<for")<0)return t;let e=[],s=[],i=t.length,a=0;for(;a<=i;){let l=t.indexOf("<for",a);if(-1<l){e.push(t.substring(a,l)),a=l+4,l=a;let n=1;for(;0<n&&a<i;){let e=t.charAt(a),s=t.charAt(a+1),i=t.charAt(a+2),l=t.charAt(a+3),r=t.charAt(a+4);n+="<"==e&&"f"==s&&"o"==i&&"r"==l&&" "==r?1:"<"==e&&"/"==s&&"f"==i&&"o"==l&&"r"==r&&">"==t.charAt(a+5)?-1:0,++a;}s.push(this.formatLitFor(t.substring(l-4,a-1))),a+=5;}else e.push(t.substring(a)),a=i+1;}return vt.merge(e,s)}formatLitFor(t){let e=new l("(<for[^>][\\s\\S]*?items=\\W\\$\\{{1})([\\s\\S]+?)(\\}[\\s\\S]*?>)","");if(t=vt.escapeCustomAttributes(t,[e]),0==e.match(t))return t;let s=vt.readCustomAttribute(e.matched(2));return "${"+s+" && "+s+".length > 0 ? "+s+".map((item, index) => html`"+this.litFor(vt.removeCustomTag(t,e))+"`) : nothing}"}litIf(t){if(t.indexOf("<if")<0)return t;let e=[],s=[],i=t.length,a=0;for(;a<=i;){let l=t.indexOf("<if",a);if(-1<l){e.push(t.substring(a,l)),a=l+3,l=a;let n=1;for(;0<n&&a<i;){let e=t.charAt(a),s=t.charAt(a+1),i=t.charAt(a+2),l=t.charAt(a+3);n+="<"==e&&"i"==s&&"f"==i&&" "==l?1:"<"==e&&"/"==s&&"i"==i&&"f"==l&&">"==t.charAt(a+4)?-1:0,++a;}s.push(this._formatLitIf(t.substring(l-3,a-1))),a+=4;}else e.push(t.substring(a)),a=i+1;}return vt.merge(e,s)}_formatLitIf(t){let e=new l("(<if[^>][\\s\\S]*?cond=\\W\\$\\{{1})([\\s\\S]+?)(\\}[\\s\\S]*?>)","");return t=vt.escapeCustomAttributes(t,[e]),0==e.match(t)?t:"${"+vt.readCustomAttribute(e.matched(2))+" ? html`"+this.litIf(vt.removeCustomTag(t,e))+"` : nothing}"}static native(){return exports.lit}}I.__name__="bs.player.plugin.skin.lib.LitHtml",Object.assign(I.prototype,{__class__:I});class L{constructor(t,e,s,i){L._hx_skip_constructor||this._hx_constructor(t,e,s,i);}_hx_constructor(t,e,s,i){this.state=null,this.context=null,this.context=t,this.reportError=i,this.refreshCallback=s;}reportError(t){}refreshCallback(t,e){}destroy(){}}L.__name__="bs.player.plugin.skin.model.core.BaseModel",Object.assign(L.prototype,{__class__:L});class D extends L{constructor(t,e,s,i,a,l){L._hx_skip_constructor=!0,super(),L._hx_skip_constructor=!1,this._hx_constructor(t,e,s,i,a,l);}_hx_constructor(t,e,s,i,a,l){this.adWasClicked=!1,this.adOnClickUrlShowTime=null,this.isVpaid=!1,this.isMuted=!1,this.isPaused=!1,this.total=0,this.current=0,this.progress=0,this.linkUrl=null,this.duration=null,this.time=null,this.skinElement=null,this.keepSkin=!1,super._hx_constructor(t,e,s,i),this.css=a,this.skinElement=l,this.parseVars(e),this.state=null,1!=this.keepSkin&&(d.add(t,"adEnableControls",Gt(this,this.onHide)),d.add(t,"adDisableControls",Gt(this,this.onShow)),d.add(t,"adBarShow",Gt(this,this.onAdBarShow)),d.add(t,"adBarHide",Gt(this,this.onAdBarHide)),d.add(t,"adInStreamClipPlaying",Gt(this,this.onAdInStreamStart)),m.add(t,"adMetadataData",Gt(this,this.onAdStart)),p.addOnce(t,"skinMute",Gt(this,this.onFirstMute)),p.addOnce(t,"skinUnmute",Gt(this,this.onFirstUnmute)));}destroy(){super.destroy(),d.remove(this.context,"adEnableControls",Gt(this,this.onHide)),d.remove(this.context,"adDisableControls",Gt(this,this.onShow)),d.remove(this.context,"adBarShow",Gt(this,this.onAdBarShow)),d.remove(this.context,"adBarHide",Gt(this,this.onAdBarHide)),d.remove(this.context,"adInStreamClipPlaying",Gt(this,this.onAdInStreamStart)),m.remove(this.context,"adMetadataData",Gt(this,this.onAdStart));}parseVars(t){Object.prototype.hasOwnProperty.call(t,"keepSkinOnAd")&&(this.keepSkin=1==o.field(t,"keepSkinOnAd"));}resetState(t){this.linkUrl=null,this.time=null,this.duration=null,this.progress=0,this.current=0,this.total=0,this.isPaused=!1,this.isVpaid=!1,this.adOnClickUrlShowTime=null,this.adWasClicked=!1,this.state=null,t&&this.refreshCallback(this.state);}createState(t){if(this.isVpaid)return void this.resetState(t);let e=this,s=Lt.translate("advertisement_bar_title"),i=this.progress;this.state={label:s,time:this.time,duration:this.duration,progress:{value:this.progress,prc:isNaN(i)||!isFinite(i)?"0%":Math.max(0,Math.min(100,100*i))+"%"},status:{paused:this.isPaused,muted:this.isMuted,vpaid:this.isVpaid},link:{url:null!=this.linkUrl?this.linkUrl:null,target:"_blank"},skip:null,counter:this.current==this.total&&this.current<=1?null:{current:this.current,total:this.total,text:this.current+"/"+this.total},mute:function(t){e.muteClick(t);},click:function(t){e.adClick(t);}},t&&this.refreshCallback(this.state);}onAdInStreamStart(t){this.parseAdMedia(t.data);}onAdStart(t){this.parseAdMedia(t.data);}parseAdMedia(t){if(this.resetState(!1),null!=t){if(null!=t.durationTotal&&null!=t.durationPlayed){let e=t.durationTotal-t.durationPlayed;this.time={time:e,text:Lt.formatTime(e)};}if(null!=t.durationTotal){let e=t.durationTotal;this.duration={time:e,text:Lt.formatTime(e)};}null!=this.time?(this.current=t.currentOrderNumber,this.total=t.totalNumber,this.linkUrl=t.mediaClickTargetUrl,this.createState(!0),this.adOnClickUrlShowTime=new Date):this.resetState(!0);}else this.resetState(!0);}onHide(t){this.adWasClicked=!1,this.skinElement.classList.contains(this.css.adPlaying)&&this.skinElement.classList.remove(this.css.adPlaying),this.skinElement.classList.contains(this.css.vpaidPlaying)&&this.skinElement.classList.remove(this.css.vpaidPlaying),d.remove(this.context,"adGroupCurrentTimeChange",Gt(this,this.afterShowOnTimeChange)),d.remove(this.context,"adSkipButtonShow",Gt(this,this.afterShowOnShowCloseBtn)),d.remove(this.context,"adAdHide",Gt(this,this.afterShowOnShowCloseBtn)),d.remove(this.context,"adPlaying",Gt(this,this.afterShowOnAdPlayResume)),d.remove(this.context,"adPaused",Gt(this,this.afterShowOnAdPause)),this.resetState(!0);}onShow(t){this.adWasClicked=!1,this.skinElement.classList.contains(this.css.adPlaying)||this.skinElement.classList.add(this.css.adPlaying),this.isVpaid&&!this.skinElement.classList.contains(this.css.vpaidPlaying)&&this.skinElement.classList.add(this.css.vpaidPlaying),this.adOnClickUrlShowTime=new Date,d.add(this.context,"adGroupCurrentTimeChange",Gt(this,this.afterShowOnTimeChange)),d.add(this.context,"adSkipButtonShow",Gt(this,this.afterShowOnShowCloseBtn)),d.add(this.context,"adAdHide",Gt(this,this.afterShowOnShowCloseBtn)),d.add(this.context,"adPlaying",Gt(this,this.afterShowOnAdPlayResume)),d.add(this.context,"adPaused",Gt(this,this.afterShowOnAdPause));}afterShowOnTimeChange(t){if(null==this.state)return;let e,s;if(null!=t.data&&null!=t.data.duration&&null!=t.data.currentTime){let e=t.data.duration;s=isNaN(e);}else s=!0;if(s)e=!0;else {let s=t.data.currentTime;e=isNaN(s);}if(e)return;let i=t.data.duration-t.data.currentTime;this.state.time={time:i,text:Lt.formatTime(i)};let a=t.data.duration;this.duration={time:a,text:Lt.formatTime(a)},this.progress=t.data.currentTime/t.data.duration;let l=this.progress,n=this.progress,r=isNaN(n)||!isFinite(n);this.state.progress={value:l,prc:r?"0%":Math.max(0,Math.min(100,100*n))+"%"},this.refreshCallback(this.state);}afterShowOnShowCloseBtn(t){if(null==this.state)return;let e=this,s=Lt.translate("advertisement_skip_label");this.state.skip={label:s,click:function(t){e.closeClick(t);}},this.refreshCallback(this.state);}afterShowOnAdPlayResume(t){this.isPaused=!1,null!=this.state&&(this.state.status.paused=this.isPaused,this.refreshCallback(this.state));}afterShowOnAdPause(t){this.isPaused=!0,null!=this.state&&(this.state.status.paused=this.isPaused,this.refreshCallback(this.state));}onAdBarShow(t){this.isVpaid=!1,this.skinElement.classList.contains(this.css.vpaidPlaying)&&this.skinElement.classList.remove(this.css.vpaidPlaying),this.createState(!0);}onAdBarHide(t){this.isVpaid=!0,this.skinElement.classList.contains(this.css.vpaidPlaying)||this.skinElement.classList.add(this.css.vpaidPlaying),this.resetState(!0);}onFirstMute(t){this.isMuted=!0,null!=this.state&&(this.state.status.muted=this.isMuted,this.refreshCallback(this.state)),p.remove(this.context,"skinUnmute",Gt(this,this.onFirstUnmute)),p.remove(this.context,"skinMute",Gt(this,this.onFirstMute));}onFirstUnmute(t){this.isMuted=!1,null!=this.state&&(this.state.status.muted=this.isMuted,this.refreshCallback(this.state)),p.remove(this.context,"skinUnmute",Gt(this,this.onFirstUnmute)),p.remove(this.context,"skinMute",Gt(this,this.onFirstMute));}muteClick(t){null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault()),p.remove(this.context,"skinUnmute",Gt(this,this.onFirstUnmute)),p.remove(this.context,"skinMute",Gt(this,this.onFirstMute)),new p(this.isMuted?"skinUnmute":"skinMute").dispatch(this.context),this.isMuted=!this.isMuted,null!=this.state&&(this.state.status.muted=this.isMuted,this.refreshCallback(this.state));}closeClick(t){null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault()),new d("adSkipClick").dispatch(this.context);}adClick(t){let e=0;if(null!=this.adOnClickUrlShowTime&&(e=(new Date).getTime()-this.adOnClickUrlShowTime.getTime()),e<=500)return;this.isPaused&&!this.adWasClicked?null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault()):this.adWasClicked?(null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault()),this.linkUrl=null,this.refreshCallback(this.state)):this.adWasClicked=!0;let s=new d("adAdClick");s.data={url:this.linkUrl},s.dispatch(this.context);}}D.__name__="bs.player.plugin.skin.model.ads.AdModel",D.__super__=L,Object.assign(D.prototype,{__class__:D});class j extends L{constructor(t,e,s,i){L._hx_skip_constructor=!0,super(),L._hx_skip_constructor=!1,this._hx_constructor(t,e,s,i);}_hx_constructor(t,e,s,i){this.audioSets=[],super._hx_constructor(t,e,s,i);let a=null;Object.prototype.hasOwnProperty.call(e,"audio")&&(a=o.field(e,"audio"));let l=!1,n=null;if(n=$t.getSessionStorage(),l=null!=n,l){let t,e=null,s=!1,i=null;if(i=$t.getSessionStorage(),s=null!=i,s){try{let t,s=null,i=!1,a=null;if(a=$t.getSessionStorage(),i=null!=a,i){let e=null;e=$t.getSessionStorage(),s=u.trim(e.getItem("_brplayer_aud_lang")),t=s;}else t=s;null!=t&&""!=t&&(e=t);}catch(t){}t=e;}else t=e;null!=t&&(a=t);}this.languageCode=a,this.state={hasItems:!1,activate:null},this.state.activate=Gt(this,this.activate),m.add(t,"audioData",Gt(this,this.onAudioData)),m.add(t,"mediaMetadataData",Gt(this,this.cleanupState)),this.refreshCallback(this.state);}destroy(){super.destroy(),m.remove(this.context,"audioData",Gt(this,this.onAudioData)),m.remove(this.context,"mediaMetadataData",Gt(this,this.cleanupState));}onAudioData(t){if(this.audioSets=t.data,null!=this.audioSets){this.state.items=[];let t=null,e=!1,s=0,i=this.audioSets.length;for(;s<i;){let i=s++;t=this.audioSets[i],e=0==e&&this.languageCode==t.languageCode,this.state.items.push({active:e,label:Lt.capilizeFirstLetter(null==t.name?t.languageCode:t.name),data:t.languageCode}),1==e&&this.dispatch(i);}}else this.state.items=null;this.state.hasItems=null!=this.state.items&&this.state.items.length>0,this.refreshCallback(this.state);}cleanupState(t){this.audioSets=[],o.deleteField(this.state,"items"),this.refreshCallback(this.state);}dispatch(t){let e=this.audioSets[t],s=new p("selectAudio");s.data=e,s.dispatch(this.context);let i=s.data.languageCode,a=!1,l=null;if(l=$t.getSessionStorage(),a=null!=l,a)try{if(null==i){let t=null;t=$t.getSessionStorage(),t.removeItem("_brplayer_aud_lang");}else {let t=null;t=$t.getSessionStorage(),t.setItem("_brplayer_aud_lang",h.string(i));}}catch(t){}}activate(t){if(!Object.prototype.hasOwnProperty.call(this.state,"items"))return;null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault());let e=h.parseInt(Ht.__cast(t.target,HTMLElement).getAttribute("data-item-index"));if(isNaN(e))return;let s=0,i=this.state.items.length;for(;s<i;){let t=s++;this.state.items[t].active=t==e;}this.dispatch(e),this.refreshCallback(this.state);}}j.__name__="bs.player.plugin.skin.model.audio.AudioModel",j.__super__=L,Object.assign(j.prototype,{__class__:j});class N extends L{constructor(t,e,s,i){super(t,e,s,i),this.parseVars(e);}destroy(){super.destroy();}parseVars(t){let e=null;Object.prototype.hasOwnProperty.call(t,"logoFile")&&(e=o.field(t,"logoFile"));let s,i,a=e;if(null==a||""==a)return;if(Object.prototype.hasOwnProperty.call(t,"logoAutohide"))switch(o.field(t,"logoAutohide")){case 0:case"false":case!1:s=!1;break;default:s=!0;}else s=!0;if(Object.prototype.hasOwnProperty.call(t,"logoVisibleDuringAdPlayback"))switch(o.field(t,"logoVisibleDuringAdPlayback")){case 1:case"true":case!0:i=!0;break;default:i=!1;}else i=!1;let l=null;Object.prototype.hasOwnProperty.call(t,"logoText")&&(l=o.field(t,"logoText"));let n=l,r=null;Object.prototype.hasOwnProperty.call(t,"logoLink")&&(r=o.field(t,"logoLink"));let h,u=r;if(Object.prototype.hasOwnProperty.call(t,"logoLinkTarget"))switch(o.field(t,"logoLinkTarget")){case"_blank":default:h="_blank";break;case"_parent":h="_parent";break;case"_self":h="_self";break;case"_top":h="_top";}else h=null;let c,d,p={url:u,target:h};if(Object.prototype.hasOwnProperty.call(t,"logoXPosition"))switch(o.field(t,"logoXPosition")){case"left":default:c="left";break;case"right":c="right";}else c="left";if(Object.prototype.hasOwnProperty.call(t,"logoYPosition"))if("bottom"===o.field(t,"logoYPosition"))d="bottom";else d="top";else d="top";let m={hide:s,adsVisibility:i,logo:a,text:n,link:p,position:{x:c,y:d,top:!0,left:!0,right:!1,bottom:!1}};m.position.top="top"==m.position.y,m.position.right="right"==m.position.x,m.position.left="left"==m.position.x,m.position.bottom="bottom"==m.position.y,this.state=m,this.refreshCallback(this.state);}}N.__name__="bs.player.plugin.skin.model.brand.BrandModel",N.__super__=L,Object.assign(N.prototype,{__class__:N});class V extends L{constructor(t,e,s,i){L._hx_skip_constructor?super():(L._hx_skip_constructor=!0,super(),L._hx_skip_constructor=!1,this._hx_constructor(t,e,s,i));}_hx_constructor(t,e,s,i){let a;if(this.isDvrWallTimeMode=!1,this.isDvr=!1,this.isLiveStream=!1,this.isMediaSpherical=!1,this.duration=0,this.mediaDuration=0,super._hx_constructor(t,e,s,i),Object.prototype.hasOwnProperty.call(e,"isDvrWallTimeMode"))switch(o.field(e,"isDvrWallTimeMode")){case 1:case"true":case!0:a=!0;break;default:a=!1;}else a=!1;this.isDvrWallTimeMode=a,this.monitor=x.getMonitor(t),m.add(t,"mediaMetadataData",Gt(this,this.onMetadataData)),m.add(t,"mediaAfterPlaybackStartMetadata",Gt(this,this.onAfterPlaybackStartMetadataData));}destroy(){super.destroy(),x.destroyMonitor(this.context),m.remove(this.context,"mediaMetadataData",Gt(this,this.onMetadataData)),m.remove(this.context,"mediaAfterPlaybackStartMetadata",Gt(this,this.onAfterPlaybackStartMetadataData));}updateState(t){}onMetadataData(t){let e,s=this.monitor.currentMedia,i=s.duration;if(isNaN(i))e=!1;else {let t=s.duration;e=isFinite(t);}e&&this.mediaDuration!=s.duration&&(this.mediaDuration=this.duration=s.duration),s instanceof C?(this.isDvr=!1,this.isLiveStream=!1):s instanceof w?(this.isDvr=!0,this.isLiveStream=s instanceof k):(this.isDvr=!1,this.isLiveStream=!1),this.isMediaSpherical=s.spherical,this.updateState();}onAfterPlaybackStartMetadataData(t){t.data instanceof w&&!this.isDvr&&(this.isDvr=!0),t.data instanceof w||!this.isDvr||(this.isDvr=!1),this.isMediaSpherical=t.data.spherical,this.updateState();}}V.__name__="bs.player.plugin.skin.model.core.MediaBaseModel",V.__super__=L,Object.assign(V.prototype,{__class__:V});class F extends V{constructor(t,e,s,i){L._hx_skip_constructor?super():(L._hx_skip_constructor=!0,super(),L._hx_skip_constructor=!1,this._hx_constructor(t,e,s,i));}_hx_constructor(t,e,s,i){this.currentTime=0,this.isLive=!1,this.isComplete=!1,this.isSeeking=!1,this.isBuffering=!1,this.isPaused=!1,this.isPlaying=!1,this.isInited=!1,super._hx_constructor(t,e,s,i),y.add(t,"videoMediaElementInit",Gt(this,this.onVideoMediaElementInit)),y.add(t,"ready",Gt(this,this.onReady)),y.add(t,"playing",Gt(this,this.onPlaying)),y.add(t,"paused",Gt(this,this.onPaused)),y.add(t,"stopped",Gt(this,this.onStopped)),y.add(t,"durationChange",Gt(this,this.onDurationChange)),y.add(t,"currentTimeChange",Gt(this,this.onCurrentTimeChange)),y.add(t,"complete",Gt(this,this.onComplete)),y.add(t,"bufferingStart",Gt(this,this.onBufferingStart)),y.add(t,"bufferingEnd",Gt(this,this.onBufferingEnd)),y.add(t,"seekingStart",Gt(this,this.onSeekingStart)),y.add(t,"seekingEnd",Gt(this,this.onSeekingEnd));}destroy(){super.destroy(),y.remove(this.context,"videoMediaElementInit",Gt(this,this.onVideoMediaElementInit)),y.remove(this.context,"ready",Gt(this,this.onReady)),y.remove(this.context,"playing",Gt(this,this.onPlaying)),y.remove(this.context,"paused",Gt(this,this.onPaused)),y.remove(this.context,"stopped",Gt(this,this.onStopped)),y.remove(this.context,"durationChange",Gt(this,this.onDurationChange)),y.remove(this.context,"currentTimeChange",Gt(this,this.onCurrentTimeChange)),y.remove(this.context,"complete",Gt(this,this.onComplete)),y.remove(this.context,"bufferingStart",Gt(this,this.onBufferingStart)),y.remove(this.context,"bufferingEnd",Gt(this,this.onBufferingEnd)),y.remove(this.context,"seekingStart",Gt(this,this.onSeekingStart)),y.remove(this.context,"seekingEnd",Gt(this,this.onSeekingEnd));}updateState(t){super.updateState(t),this.isComplete="complete"==this.monitor.state,this.isPlaying=this.isComplete||this.isDvr||null==t?"playing"==this.monitor.state:t,this.isPaused=!this.isPlaying&&!this.isComplete&&"paused"==this.monitor.state,this.isBuffering=!this.isPlaying&&!this.isComplete&&"buffering"==this.monitor.state,this.isSeeking=!this.isPlaying&&!this.isComplete&&"seeking"==this.monitor.state,this.isDvr?(this.isLive=!0,this.isSeekingPossible()&&(this.isLive=this.currentTime/this.duration>=.99)):this.isLive=!1;}isSeekingPossible(){return !(this.duration<=0||this.isDvr&&this.duration<60)}onVideoMediaElementInit(t){this.isInited=!0,this.updateState();}onReady(t){this.updateState();}onDurationChange(t){this.updateDurationOnEvent(t);}onCurrentTimeChange(t){this.currentTime=t.data.currentTime,this.updateDurationOnEvent(t,!1),this.updateState(!0);}onPlaying(t){this.updateDurationOnEvent(t);}onPaused(t){this.updateState();}onStopped(t){this.updateState();}onComplete(t){this.updateState();}onBufferingStart(t){this.updateState();}onBufferingEnd(t){this.updateDurationOnEvent(t);}onSeekingStart(t){this.updateState();}onSeekingEnd(t){this.updateState();}updateDurationOnEvent(t,e){let s=Object.prototype.hasOwnProperty.call(t.data,"duration")?t.data.duration:NaN;!isNaN(s)&&isFinite(s)&&this.duration!=s&&(this.duration=s,this.updateState());}}F.__name__="bs.player.plugin.skin.model.core.PlaybackBaseModel",F.__super__=V,Object.assign(F.prototype,{__class__:F});class R extends F{constructor(t,e,s,i,a){L._hx_skip_constructor=!0,super(),L._hx_skip_constructor=!1,this._hx_constructor(t,e,s,i,a);}_hx_constructor(t,e,s,i,a){this.isDeviceControlActive=!1,this.isDeviceControlSupported=!1,this.isRendererInitialized=!1,this.wasUserMovingPointer=!1,this.isUserInteracting=!1,this.sphericalElement=null,this.skinElement=null,super._hx_constructor(t,e,s,i),this.skinElement=a,this.state=null,v.add(t,"rendererInitialized",Gt(this,this.onRendererInitialized)),v.add(t,"deviceControlSupport",Gt(this,this.onDeviceControlSupport)),this.refreshCallback(this.state);}destroy(){super.destroy(),v.remove(this.context,"rendererInitialized",Gt(this,this.onRendererInitialized)),v.remove(this.context,"deviceControlSupport",Gt(this,this.onDeviceControlSupport));}updateState(t){super.updateState(t);let e=this;this.state=this.isMediaSpherical&&this.isRendererInitialized?{move:{active:!this.isDeviceControlActive,up:function(t){null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault());let s=new v("move");s.data="U",s.dispatch(e.context);},down:function(t){null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault());let s=new v("move");s.data="D",s.dispatch(e.context);},left:function(t){null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault());let s=new v("move");s.data="L",s.dispatch(e.context);},right:function(t){null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault());let s=new v("move");s.data="R",s.dispatch(e.context);},center:function(t){null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault());let s=new v("move");s.data="C",s.dispatch(e.context);}},zoom:{active:!this.isDeviceControlActive,plus:function(t){null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault());let s=new v("zoom");s.data="P",s.dispatch(e.context);},minus:function(t){null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault());let s=new v("zoom");s.data="M",s.dispatch(e.context);},reset:function(t){null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault());let s=new v("zoom");s.data="R",s.dispatch(e.context);}},device:{supported:this.isDeviceControlSupported,active:this.isDeviceControlActive,click:Gt(this,this.clickDeviceControl)},ctrl:Gt(this,this.ctrl)}:null,this.refreshCallback(this.state);}ctrl(t){null!=t&&0!=this.isMediaSpherical?(this.sphericalElement=t,this.cachedTouchAction=this.sphericalElement.style.touchAction,this.sphericalElement.style.touchAction="none",f.isMobile()?(this.sphericalElement.addEventListener("touchstart",Gt(this,this.handleSphericalEvent),gt.get_passiveOptions()),this.sphericalElement.addEventListener("touchmove",Gt(this,this.handleSphericalEvent),gt.get_passiveOptions()),this.sphericalElement.addEventListener("touchend",Gt(this,this.handleSphericalEvent),gt.get_passiveOptions())):(this.sphericalElement.addEventListener("mousedown",Gt(this,this.handleSphericalEvent),gt.get_passiveOptions()),this.sphericalElement.addEventListener("mousemove",Gt(this,this.handleSphericalEvent),gt.get_passiveOptions()),this.sphericalElement.addEventListener("mouseup",Gt(this,this.handleSphericalEvent),gt.get_passiveOptions()),this.sphericalElement.addEventListener("wheel",Gt(this,this.handleSphericalEvent))),this.sphericalElement.addEventListener("click",Gt(this,this.handleSphericalEvent))):null!=this.sphericalElement&&(null!=this.cachedTouchAction&&(this.sphericalElement.style.touchAction=this.cachedTouchAction),this.cachedTouchAction=null,f.isMobile()?(this.sphericalElement.removeEventListener("touchstart",Gt(this,this.handleSphericalEvent)),this.sphericalElement.removeEventListener("touchmove",Gt(this,this.handleSphericalEvent)),this.sphericalElement.removeEventListener("touchend",Gt(this,this.handleSphericalEvent))):(this.sphericalElement.removeEventListener("mousedown",Gt(this,this.handleSphericalEvent)),this.sphericalElement.removeEventListener("mousemove",Gt(this,this.handleSphericalEvent)),this.sphericalElement.removeEventListener("mouseup",Gt(this,this.handleSphericalEvent)),this.sphericalElement.removeEventListener("wheel",Gt(this,this.handleSphericalEvent))),this.sphericalElement.removeEventListener("click",Gt(this,this.handleSphericalEvent)),this.sphericalElement=null);}handleSphericalEvent(t){if(null!=t&&0!=this.isMediaSpherical)switch(t.type){case"blur":case"mouseleave":case"mouseup":case"touchend":if(!this.isUserInteracting)return;f.enableHtmlSelection();let e=this.skinElement,s=Gt(this,this.handleSphericalEvent);f.enableHtmlSelection(),window.document.removeEventListener("mouseup",s),window.document.removeEventListener("mousemove",s),window.document.removeEventListener("mouseleave",s),window.document.removeEventListener("blur",s),e.removeEventListener("mouseup",s),e.removeEventListener("mousemove",s),e.removeEventListener("blur",s),f.isMobile()&&(window.document.removeEventListener("touchend",s),e.removeEventListener("touchend",s)),new v("up").dispatch(this.context),this.isUserInteracting=!1;break;case"click":this.wasUserMovingPointer&&null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault()),this.wasUserMovingPointer=!1;break;case"mousedown":case"touchstart":if(this.isUserInteracting)return;f.disableHtmlSelection();let i=this.skinElement,a=Gt(this,this.handleSphericalEvent);f.disableHtmlSelection(),window.document.addEventListener("mouseup",a,gt.get_passiveOptions()),window.document.addEventListener("mousemove",a,gt.get_passiveOptions()),window.document.addEventListener("mouseleave",a,gt.get_passiveOptions()),window.document.addEventListener("blur",a,gt.get_passiveOptions()),i.addEventListener("mouseup",a,gt.get_passiveOptions()),i.addEventListener("mousemove",a,gt.get_passiveOptions()),i.addEventListener("blur",a,gt.get_passiveOptions()),f.isMobile()&&(window.document.addEventListener("touchend",a,gt.get_passiveOptions()),i.addEventListener("touchend",a,gt.get_passiveOptions()));let l=new v("down"),n=0;t instanceof MouseEvent&&(n=Ht.__cast(t,MouseEvent).clientX);let r=window;if(Object.prototype.hasOwnProperty.call(r,"TouchEvent")&&t instanceof TouchEvent){let e=t;if(e.touches.length>0){n=e.touches.item(0).clientX;}}let o=0;t instanceof MouseEvent&&(o=Ht.__cast(t,MouseEvent).clientY);let h=window;if(Object.prototype.hasOwnProperty.call(h,"TouchEvent")&&t instanceof TouchEvent){let e=t;if(e.touches.length>0){o=e.touches.item(0).clientY;}}l.data=new P(n,o),l.dispatch(this.context),this.wasUserMovingPointer=!1,this.isUserInteracting=!0;break;case"mousemove":case"touchmove":if(!this.isUserInteracting)return;let u=new v("drag"),c=0;t instanceof MouseEvent&&(c=Ht.__cast(t,MouseEvent).clientX);let d=window;if(Object.prototype.hasOwnProperty.call(d,"TouchEvent")&&t instanceof TouchEvent){let e=t;if(e.touches.length>0){c=e.touches.item(0).clientX;}}let p=0;t instanceof MouseEvent&&(p=Ht.__cast(t,MouseEvent).clientY);let m=window;if(Object.prototype.hasOwnProperty.call(m,"TouchEvent")&&t instanceof TouchEvent){let e=t;if(e.touches.length>0){p=e.touches.item(0).clientY;}}u.data=new P(c,p),u.dispatch(this.context),this.wasUserMovingPointer=!0;break;case"wheel":if(t instanceof WheelEvent){this.isInited&&(this.isPlaying||this.isPaused)&&null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault());let e=new v("zoom");e.data=t.deltaY,e.dispatch(this.context);}break;default:return}}clickDeviceControl(t){if(!this.isMediaSpherical||null==this.state)return;this.isDeviceControlActive=!this.isDeviceControlActive;let e=this.isDeviceControlActive;null!=this.state&&(null!=this.state.device&&(this.state.device.active=e),null!=this.state.move&&(this.state.move.active=this.state.zoom.active=!e)),this.refreshCallback(this.state);let s=new v("deviceControlActive");s.data=e,s.dispatch(this.context);}onRendererInitialized(t){this.isRendererInitialized!=t.data&&(this.isRendererInitialized=t.data);}onDeviceControlSupport(t){if(this.isDeviceControlSupported==t.data)return;this.isDeviceControlSupported=t.data,this.isDeviceControlActive=this.isDeviceControlSupported,null!=this.state&&null!=this.state.device&&(this.state.device.supported=this.isDeviceControlSupported);let e=this.isDeviceControlActive;null!=this.state&&(null!=this.state.device&&(this.state.device.active=e),null!=this.state.move&&(this.state.move.active=this.state.zoom.active=!e)),this.refreshCallback(this.state);let s=new v("deviceControlActive");s.data=e,s.dispatch(this.context);}}R.__name__="bs.player.plugin.skin.model.camera.CameraModel",R.__super__=F,Object.assign(R.prototype,{__class__:R});class z extends L{constructor(t,e,s,i){let a;if(super(t,e,s,i),Object.prototype.hasOwnProperty.call(e,"videoCastEnabled"))switch(o.field(e,"videoCastEnabled")){case 1:case"true":case!0:a=!0;break;default:a=!1;}else a=!1;this.enabled=a,this.state=null,this.enabled&&(p.add(t,"airplayAvailable",Gt(this,this.onAirPlayAvailable)),p.add(t,"chromecastAvailable",Gt(this,this.onChromecastAvailable)),y.add(t,"videoCastingStart",Gt(this,this.onCastingStart)),y.add(t,"videoCastingEnd",Gt(this,this.onCastingEnd))),this.refreshCallback(this.state);}destroy(){super.destroy(),this.enabled&&(p.remove(this.context,"airplayAvailable",Gt(this,this.onAirPlayAvailable)),p.remove(this.context,"chromecastAvailable",Gt(this,this.onChromecastAvailable)),y.remove(this.context,"videoCastingStart",Gt(this,this.onCastingStart)),y.remove(this.context,"videoCastingEnd",Gt(this,this.onCastingEnd)));}dispatchAirPlay(){new p("airplay").dispatch(this.context);}onAirPlayAvailable(t){this.airPlayAvailable=null!=t&&1==t.data,0!=this.enabled&&(0!=this.airPlayAvailable?(null==this.state&&(this.state={}),this.state.airplay={active:!1,click:Gt(this,this.dispatchAirPlay)},this.refreshCallback(this.state)):null!=this.state&&Object.prototype.hasOwnProperty.call(this.state,"airplay")&&(o.deleteField(this.state,"airplay"),this.refreshCallback(this.state)));}dispatchChromecast(){new p("chromecast").dispatch(this.context);}onChromecastAvailable(t){this.chromecastPlayAvailable=null!=t&&1==t.data,0!=this.enabled&&(0!=this.chromecastPlayAvailable?(null==this.state&&(this.state={}),this.state.chromecast={active:!1,click:Gt(this,this.dispatchChromecast)},this.refreshCallback(this.state)):null!=this.state&&Object.prototype.hasOwnProperty.call(this.state,"chromecast")&&(o.deleteField(this.state,"chromecast"),this.refreshCallback(this.state)));}onCastingStart(t){0!=this.enabled&&(null!=this.state.airplay&&(this.state.airplay.active=!0),null!=this.state.chromecast&&(this.state.chromecast.active=!0),this.refreshCallback(this.state));}onCastingEnd(t){0!=this.enabled&&(null!=this.state.airplay&&(this.state.airplay.active=!1),null!=this.state.chromecast&&(this.state.chromecast.active=!1),this.refreshCallback(this.state));}}z.__name__="bs.player.plugin.skin.model.casting.CastModel",z.__super__=L,Object.assign(z.prototype,{__class__:z});class B extends L{constructor(t,e,s,i,a,l,n){L._hx_skip_constructor=!0,super(),L._hx_skip_constructor=!1,this._hx_constructor(t,e,s,i,a,l,n);}_hx_constructor(t,e,s,i,a,l,n){this.contextmenuElement=null,this.skinElement=null,this.pos=new P(0,0),super._hx_constructor(t,e,s,i),this.skinElement=l;let r=this;this.templateCtx={prefix:a,version:n,clickViewPlayerInformation:function(t){null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault()),r.hide(),null!=r.info&&r.info.open();}},this.info=new W(t,e,a,n);this.info.renderTemplate=function(t){return r.renderTemplate(t)};let h;if(this.info.renderHtml=function(t,e){r.renderHtml(t,e);},b.add(t,"resize",Gt(this,this.onResize)),Object.prototype.hasOwnProperty.call(e,"contextMenuDisabled"))switch(o.field(e,"contextMenuDisabled")){case 1:case"true":case!0:h=!0;break;default:h=!1;}else h=!1;1!=h&&(this.state={show:!1,ctrl:null},this.state.ctrl=Gt(this,this.ctrl),this.skinElement.addEventListener("contextmenu",Gt(this,this.onContextMenu)),this.refreshCallback(this.state));}set_prefix(t){return null!=this.templateCtx&&(this.templateCtx.prefix=t),null!=this.info&&this.info.set_prefix(t),t}renderTemplate(t){return null}renderHtml(t,e){}destroy(){super.destroy(),null!=this.skinElement&&this.skinElement.removeEventListener("contextmenu",Gt(this,this.onContextMenu)),this.disconnectGlobalListeners(),b.remove(this.context,"resize",Gt(this,this.onResize)),null!=this.info&&this.info.destroy();}ctrl(t){if(null==t)return this.disconnectGlobalListeners(),void(this.contextmenuElement=null);this.contextmenuElement=t,window.requestAnimationFrame(Gt(this,this.updatePosition)),null==this.template&&(this.template=this.renderTemplate('<ul class="${ctx.prefix}-contextmenu-items">\n\t\x3c!-- items --\x3e\n\t<if cond="${!!ctx.items && ctx.items.length > 0}">\n\t\t<for items="${ctx.items}">\n\t\t\t<li class="${ctx.prefix}-contextmenu-item">\n\t\t\t\t\x3c!-- button --\x3e\n\t\t\t\t<if cond="${!!item.click}">\n\t\t\t\t\t<button @click="${item.click}" type="button" class="${ctx.prefix}-contextmenu-button">\n\t\t\t\t\t\t<if cond="${!!item.html}">${asHtml(item.html)}</if>\n\t\t\t\t\t</button>\n\t\t\t\t</if>\n\t\t\t\t\x3c!-- link --\x3e\n\t\t\t\t<if cond="${!!item.link}">\n\t\t\t\t\t<a href="${item.link}" target="_blank" class="${ctx.prefix}-contextmenu-link">\n\t\t\t\t\t\t<if cond="${!!item.html}">${asHtml(item.html)}</if>\n\t\t\t\t\t</a>\n\t\t\t\t</if>\n\t\t\t\t\x3c!-- else --\x3e\n\t\t\t\t<if cond="${!item.click && !item.link}">\n\t\t\t\t\t<if cond="${!!item.html}">${asHtml(item.html)}</if>\n\t\t\t\t</if>\n\t\t\t</li>\n\t\t</for>\n\t</if>\n\t\x3c!-- info --\x3e\n\t<li class="${ctx.prefix}-contextmenu-item">\n\t\t<button @click="${ctx.clickViewPlayerInformation}" type="button" class="${ctx.prefix}-contextmenu-button">\n\t\t\t<span class="${ctx.prefix}-txt-shdw">View player information</span>\n\t\t</button>\n\t</li>\n\t\x3c!-- powered by --\x3e\n\t<li class="${ctx.prefix}-contextmenu-item">\n\t\t<a href="https://bradmax.com" target="_blank" class="${ctx.prefix}-contextmenu-link">\n\t\t\t<small style="flex-direction:column;">\n\t\t\t\t<small class="${ctx.prefix}-txt-shdw" style="font-size: 9px;line-height: 10px;">powered by</small>\n\t\t\t\t<span style="align-items: center;">\n\t\t\t\t\t<svg width="22px" height="14px" viewBox="0 0 24 24">\n\t\t\t\t\t\t<path d="M5,1l0,21.721l15.739,-10.948l-15.648,-10.773l-0.091,0Z" style="fill:#fad600;fill-rule:nonzero;" />\n\t\t\t\t\t</svg>\n\t\t\t\t\t<span style="flex-direction:column;">\n\t\t\t\t\t\t<strong class="${ctx.prefix}-txt-shdw" style="font-size: 12px;line-height: 14px;">Bradmax Media Player</strong>\n\t\t\t\t\t\t<small class="${ctx.prefix}-txt-shdw" style="font-size: 9px;line-height: 9px;">${ctx.version}</small>\n\t\t\t\t\t</span>\n\t\t\t\t</span>\n\t\t\t</small>\n\t\t</a>\n\t</li>\n</ul>\n')),this.renderHtml(this.contextmenuElement,this.template(this.templateCtx)),this.connectGlobalListeners();}onResize(t){this.updatePosition(),null!=this.info&&this.info.resize(t);}onContextMenu(t){null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault()),this.storePosition(t),this.show();}storePosition(t){this.pos.x=t.pageX,this.pos.y=t.pageY;}updatePosition(){if(null==this.contextmenuElement)return;let t=this.contextmenuElement.offsetWidth+4,e=this.contextmenuElement.offsetHeight+4,s=null;s=this.skinElement.getBoundingClientRect();let i=s,a=window.document.documentElement.scrollLeft,l=window.document.documentElement.scrollTop,n=this.pos.x-(i.x+a),r=this.pos.y-(i.y+l);i.width-n<t?this.contextmenuElement.style.left=i.width-t+"px":this.contextmenuElement.style.left=n+"px",i.height-r<e?this.contextmenuElement.style.top=i.height-e+"px":this.contextmenuElement.style.top=r+"px";}show(){1!=this.state.show?(this.state.show=!0,this.refreshCallback(this.state)):this.updatePosition();}hide(){0!=this.state.show&&(this.state.show=!1,this.refreshCallback(this.state));}connectGlobalListeners(){window.document.addEventListener("click",Gt(this,this.onDocumentClick)),window.addEventListener("keyup",Gt(this,this.onWindowKeyUp));}disconnectGlobalListeners(){window.document.removeEventListener("click",Gt(this,this.onDocumentClick)),window.removeEventListener("keyup",Gt(this,this.onWindowKeyUp));}onDocumentClick(t){this.hide();}onWindowKeyUp(t){27==t.keyCode&&this.hide();}}B.__name__="bs.player.plugin.skin.model.contextmenu.ContextMenuModel",B.__super__=L,Object.assign(B.prototype,{__class__:B});class U{constructor(t,e){U._hx_skip_constructor||this._hx_constructor(t,e);}_hx_constructor(t,e){this.barWidth=null,this.canvas=null,this.canvas2d=null,this.index=0,this.colors=null,this.datum=null,this.width=300,this.height=11,this.colors=t,null!=e&&(this.datum=e),this.barWidth=Math.round(this.width/150);}destroy(){this.index=0,this.canvas2d=null,this.canvas=null;}ctrl(t){if(null==t)return void this.destroy();this.canvas2d=t.getContext("2d");let e=Math.round(150*this.barWidth);if(t.width=e,t.style.width=e+"px",null==this.canvas2d)return;let s=1<window.devicePixelRatio?2:1;t.height=this.height*s,t.style.height=this.height+"px",this.canvas2d.scale(1,s);}render(t){if(null==this.canvas2d)return;let e=0,s=0,i=0,a=0,l=this.datum.length,n=0;for(;n<l;){let l=(n+=2)-2;if(l==this.datum.length-1)break;if(!("number"==typeof this.datum[l+1]==0||"number"==typeof t==0||parseFloat(""+h.string(this.datum[l+1]))<parseFloat(""+h.string(t)))){if(e=parseFloat(""+h.string(t)),s=parseFloat(""+h.string(this.datum[l])),i=parseFloat(""+h.string(this.datum[l+1])),a=Math.min(1,(e-s)/(i-s)),isNaN(a))break;this.canvas2d.fillStyle=""+this.colors[l],this.canvas2d.fillRect(this.index*this.barWidth,0,this.barWidth,this.height),this.canvas2d.fillStyle=""+this.colors[l+1],this.canvas2d.fillRect(this.index*this.barWidth,this.height*(1-a),this.barWidth,this.height),this.index=(this.index+1)%150;break}}this.canvas2d.clearRect(this.index*this.barWidth,0,this.barWidth,this.height);}}U.__name__="bs.player.plugin.skin.model.contextmenu.info.PlayerInfoChart",Object.assign(U.prototype,{__class__:U});class q extends U{constructor(t){U._hx_skip_constructor=!0,super(),U._hx_skip_constructor=!1,this._hx_constructor(t);}_hx_constructor(t){this.offset=0,this.duration=0,super._hx_constructor(t);}ctrl(t){super.ctrl(t),null!=this.canvas2d&&(this.canvas2d.fillStyle=""+this.colors[0],this.canvas2d.strokeStyle=""+this.colors[1]);}render(t){if(null==this.canvas2d)return;let e,s,i;t.duration!=this.duration&&(this.offset=this.width/t.duration,this.duration=t.duration),this.canvas2d.clearRect(0,0,this.width,this.height);let a=0,l=t.buffered.length;for(;a<l;){let l=a++;e=t.buffered.start(l)*this.offset,s=t.buffered.end(l)*this.offset,i=s-e,this.canvas2d.fillRect(e,0,i,this.height),this.canvas2d.rect(e,0,i,this.height),this.canvas2d.stroke();}}}q.__name__="bs.player.plugin.skin.model.contextmenu.info.PlayerInfoBufferChart",q.__super__=U,Object.assign(q.prototype,{__class__:q});class W{constructor(t,e,s,i){this.lastDecodedByteCount=0,this.lastDecodedFrames=0,this.lastDecodedFrameTime=0,this.framesPerSecond=0,this.networkActivityBytes=0,this.playerHeight=0,this.playerWidth=0,this.videoElement=null,this.hasNetworkActivitySamples=!1,this.networkActivitySamples=new Wt,this.bandwidthSteps=[0,18750,37500,81250,128e3,256e3,512e3,1024e3,2048e3,4096e3,8192e3,16384e3,32768e3,65536e3,131072e3],this.bandwidthColors=["#000000","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#2ca02c","#3288bd","#1f77b4","#124588","#9467bd","#8c564b","#ffffff"].slice(0),this.timeOrigin=window.performance.timeOrigin,this.templateCtx={prefix:null,size:{h:0,w:0},version:null,panels:[{title:"Video",id:"video",list:[{defaultValue:0,id:"creationTime",label:"creation time",value:null},{defaultValue:"not available",id:"videoSize",unit:"px",label:"video size",value:null},{defaultValue:"not available",id:"videoFrames",label:"frames",value:null},{chart:null,defaultValue:null,id:"framesPerSecond",unit:"fps",label:"frames per seconds",value:null},{chart:null,defaultValue:null,id:"currentTotalBitrateKpbs",unit:"Kpbs",label:"current total bitrate",value:null},{chart:null,defaultValue:null,id:"networkActivityBytes",unit:"KB",label:"network activity",value:null},{chart:null,defaultValue:0,id:"bufferLength",unit:"s",label:"buffer length",value:null},{chart:null,defaultValue:0,id:"buffer",label:"buffer:",value:null}]},{title:"Media",id:"media",list:[{defaultValue:null,id:"id",label:"id",value:null},{defaultValue:"not available",id:"title",label:"title",value:null},{defaultValue:"not available",id:"duration",unit:"s",label:"duration",value:null},{defaultValue:!1,id:"hasConcurrencyControl",label:"concurrency control",value:null},{defaultValue:!1,id:"isDvr",label:"dvr",value:null},{defaultValue:!1,id:"isLiveStream",label:"live",value:null},{defaultValue:!1,id:"spherical",label:"spherical",value:null},{defaultValue:null,id:"source",label:"source count",value:null},{defaultValue:null,id:"sourceFallbacks",label:"source fallbacks count",value:null},{defaultValue:null,id:"subtitlesSets",label:"subtitles sets count",value:null},{defaultValue:null,id:"audioSets",label:"audio sets count",value:null},{defaultValue:null,id:"splashImages",label:"splash images count",value:null},{defaultValue:null,id:"posterImages",label:"poster images count",value:null},{defaultValue:null,id:"mediaPlaylist",label:"playlist items count",value:null},{defaultValue:null,id:"mediaLandingPage",label:"landing page",value:null}]},{title:"Player",id:"player",list:[{defaultValue:"not available",id:"version",label:"Bradmax Media Player",value:null},{defaultValue:"not available",id:"playerSize",unit:"px",label:"player size",value:null}]},{title:"Configuration",id:"config",list:[{defaultValue:!1,id:"autoplay",label:"autoplay",value:null},{defaultValue:!1,id:"mute",label:"mute",value:null},{defaultValue:null,id:"volume",label:"volume",value:null},{defaultValue:null,id:"startTime",label:"startTime",value:null},{defaultValue:null,id:"qualitySelectionEnabled",label:"quality selection enabled",value:null},{defaultValue:null,id:"qualityLabelType",label:"qualityLabelType",value:null},{defaultValue:null,id:"qualityInitialBandwidthKbs",label:"quality initial bandwidth",value:null},{defaultValue:!0,id:"showSkinOnInit",label:"show skin on init",value:null},{defaultValue:null,id:"shareButtons",label:"share buttons",value:null},{defaultValue:null,id:"endSplash",label:"end splash",value:null},{defaultValue:null,id:"subtitles",label:"subtitles",value:null},{defaultValue:null,id:"audio",label:"audio",value:null},{defaultValue:null,id:"locale",label:"locale",value:null},{defaultValue:null,id:"dvrWindowStartTime",label:"dvr window start time",value:null},{defaultValue:null,id:"dvrWindowEndTime",label:"dvr window end time",value:null},{defaultValue:null,id:"dvrMinLenForSeekbar",label:"dvr minimum length for seekbar",value:null},{defaultValue:!1,id:"isDvrWallTimeMode",label:"dvr wall time",value:null},{defaultValue:!1,id:"iosInlineVideo",label:"ios inline video",value:null},{defaultValue:!1,id:"gdprAgreeRequired",label:"gdpr agree required",value:null},{defaultValue:!1,id:"gdprAgreeForCookie",label:"gdpr agree for cookie",value:null},{defaultValue:null,id:"logoFile",label:"logo",value:null},{defaultValue:null,id:"logoLink",label:"logo link",value:null},{defaultValue:null,id:"logoPosition",label:"logo position",value:null},{defaultValue:null,id:"logoAutohide",label:"logo autohide",value:null},{defaultValue:null,id:"logoVisibleDuringAdPlayback",label:"logo visible during ad playback",value:null},{defaultValue:null,id:"skinColor",label:"skin color",value:null},{defaultValue:!1,id:"fullscreenEnabled",label:"fullscreen enabled",value:null},{defaultValue:!1,id:"pictureInPictureEnabled",label:"picture in picture enabled",value:null},{defaultValue:!1,id:"videoCastEnabled",label:"video casting enabled",value:null}]},{title:"Device",id:"device",list:[{defaultValue:"not available",id:"useragent",label:"user agent",value:null},{defaultValue:"not available",id:"screenSize",unit:"px",label:"screen size",value:null},{defaultValue:!1,id:"isMobile",label:"mobile",value:null},{defaultValue:!1,id:"isSmartTV",label:"smart TV",value:null},{defaultValue:"not available",id:"browserName",label:"browser name",value:null},{defaultValue:!1,id:"isBrowserOnline",label:"online",value:null},{defaultValue:!1,id:"isWebGLAvailable",label:"WebGL",value:null},{defaultValue:!1,id:"isWebGL2Available",label:"WebGL2",value:null},{defaultValue:!1,id:"isDeviceOrientationSupported",label:"device orientation",value:null},{defaultValue:"not available",id:"orientation",unit:"°",label:"orientation",value:null}]}]},this.context=t,null!=s&&this.set_prefix(s),this.templateCtx.version=i,this.initCtx(e),m.add(t,"mediaMetadataData",Gt(this,this.onDataProviderEvent)),m.add(t,"movieData",Gt(this,this.onDataProviderEvent)),y.add(t,"videoMediaElementInit",Gt(this,this.onVideoElementEvent)),y.add(t,"networkActivityUrl",Gt(this,this.onVideoNetworkActivity));}renderTemplate(t){return null}renderHtml(t,e){}set_prefix(t){return null!=this.templateCtx&&(this.templateCtx.prefix=t),t}destroy(){m.remove(this.context,"mediaMetadataData",Gt(this,this.onDataProviderEvent)),m.remove(this.context,"movieData",Gt(this,this.onDataProviderEvent)),y.remove(this.context,"videoMediaElementInit",Gt(this,this.onVideoElementEvent)),y.remove(this.context,"networkActivityUrl",Gt(this,this.onVideoNetworkActivity)),this.destroyCharts();}open(){let t=new g("showMessage");t.data={type:"normal",title:"Player information",text:'<div id="'+this.context+'-info-view" style="flex-direction: column;"></div>',onAfterShow:Gt(this,this.afterShow),close:!0,onAfterClose:Gt(this,this.afterClose),style:{window:{minWidth:"380px",width:"380px",maxWidth:"380px"}}},t.dispatch(this.context);}resize(t){this.playerWidth=t.data.width,this.playerHeight=t.data.height;let e=0,s=this.templateCtx.panels;for(;e<s.length;){let t=s[e];++e,"player"==t.id&&this.updatePlayerCtx(t.list);}}afterShow(){let t=window.document.getElementById(this.context+"-info-view");m.add(this.context,"mediaMetadataData",Gt(this,this.onNewDataProviderEvent)),m.add(this.context,"mediaAfterPlaybackStartMetadata",Gt(this,this.onDataProviderEvent)),y.add(this.context,"currentTimeChange",Gt(this,this.onVideoEvent)),null!=t&&(this.templateCtx.size.w=t.clientWidth,this.templateCtx.size.h=t.clientHeight),null==this.template&&(this.template=this.renderTemplate('${ctx.panels.map((panel, panelIndex) => html`\n<div class="${ctx.prefix}-message-info-con">\n\t<h4 class="${ctx.prefix}-message-info-title">${panel.title}:</h4>\n\t<div class="${ctx.prefix}-message-info-list">\n\t\t${panel.list.map((item, itemIndex) => item.value != item.defaultValue\n\t\t? html`\n\t\t<div class="${ctx.prefix}-message-info-item">\n\t\t\t<small class="${ctx.prefix}-message-info-item-label">${item.label}</small>\n\t\t\t<small class="${ctx.prefix}-message-info-item-value">\n\t\t\t\t${item.value != null ? html`<strong>${item.value}</strong>${item.unit ? html`<small class="${ctx.prefix}-message-info-item-unit"> ${item.unit}</small>` : nothing}` : html`<i>${item.defaultValue}</i>`}\n\t\t\t</small>\n\t\t</div>${item.chart ? html`<canvas ${ctrl(item.chart)} class="${ctx.prefix}-message-info-item-chart"></canvas>` : nothing}`\n\t\t: nothing\n\t\t)}\n\t</div>\n</div>`)}\n'));let e=this,s=function(){e.countNetworkActivityBytes(),e.updateCtx(),e.renderHtml(t,e.template(e.templateCtx));};null==this.renderTimer&&(this.renderTimer=new Vt(250)),this.renderTimer.run=s,s();}afterClose(){m.remove(this.context,"mediaMetadataData",Gt(this,this.onNewDataProviderEvent)),m.remove(this.context,"mediaAfterPlaybackStartMetadata",Gt(this,this.onDataProviderEvent)),y.remove(this.context,"currentTimeChange",Gt(this,this.onVideoEvent)),null!=this.renderTimer&&this.renderTimer.stop(),this.renderTimer=null;}onVideoElementEvent(t){this.videoElement=t.data;}onVideoEvent(t){null!=t&&null!=t.data&&null!=t.data.media&&(this.media=t.data.media);}onVideoNetworkActivity(t){this.hasNetworkActivitySamples=!0,this.networkActivitySamples.h[t.data.url]=t.data.loaded;}onNewDataProviderEvent(t){this.networkActivitySamples.h=Object.create(null),null!=t&&null!=t.data&&(this.media=t.data);}onDataProviderEvent(t){null!=t&&null!=t.data&&(this.media=t.data);}initCtx(t){let e=0,s=this.templateCtx.panels;for(;e<s.length;){let i=s[e];switch(++e,i.id){case"config":this.updateConfigCtx(i.list,t);break;case"device":this.updateDeviceCtx(i.list);break;case"player":this.updatePlayerCtx(i.list);break;default:continue}}}updateCtx(){let t=0,e=this.templateCtx.panels;for(;t<e.length;){let s=e[t];switch(++t,s.id){case"media":this.updateMediaCtx(s.list,this.media);break;case"video":this.updateVideoCtx(s.list,this.media);break;default:continue}}}updatePlayerCtx(t){let e=0;for(;e<t.length;){let s=t[e];switch(++e,s.id){case"playerSize":s.value=this.playerWidth+" x "+this.playerHeight;break;case"version":s.value=this.templateCtx.version;break;default:continue}}this.resolvePlugins(t,exports.bs.player.plugin);}updateConfigCtx(t,e){let s=null;Object.prototype.hasOwnProperty.call(e,"logoFile")&&(s=o.field(e,"logoFile"));let i=null!=s,a=0;for(;a<t.length;){let s=t[a];switch(++a,s.id){case"audio":let t=null;Object.prototype.hasOwnProperty.call(e,"audio")&&(t=o.field(e,"audio"));let l=!1,n=null;if(n=$t.getSessionStorage(),l=null!=n,l){let e,s=null,i=!1,l=null;if(l=$t.getSessionStorage(),i=null!=l,i){try{let t,e=null,i=!1,a=null;if(a=$t.getSessionStorage(),i=null!=a,i){let s=null;s=$t.getSessionStorage(),e=u.trim(s.getItem("_brplayer_aud_lang")),t=e;}else t=e;null!=t&&""!=t&&(s=t);}catch(a){}e=s;}else e=s;null!=e&&(t=e);}s.value=t;break;case"autoplay":let r;if(Object.prototype.hasOwnProperty.call(e,"autoplay"))switch(o.field(e,"autoplay")){case 1:case"true":case!0:r=!0;break;default:r=!1;}else r=!1;s.value=r;break;case"dvrMinLenForSeekbar":s.value=Object.prototype.hasOwnProperty.call(e,"dvrMinLenForSeekbar")?parseFloat(o.field(e,"dvrMinLenForSeekbar")):null;break;case"dvrWindowEndTime":s.value=Object.prototype.hasOwnProperty.call(e,"dvrWindowEndTime")?parseFloat(o.field(e,"dvrWindowEndTime")):null;break;case"dvrWindowStartTime":s.value=Object.prototype.hasOwnProperty.call(e,"dvrWindowStartTime")?parseFloat(o.field(e,"dvrWindowStartTime")):null;break;case"endSplash":let h=null;Object.prototype.hasOwnProperty.call(e,"endSplash")&&(h=o.field(e,"endSplash")),s.value=h;break;case"fullscreenEnabled":if(Object.prototype.hasOwnProperty.call(e,"hideUIElements")){let t=o.field(e,"hideUIElements");null!=t&&"string"==typeof t&&t.indexOf("fullscreenButton")>-1&&(e.fullscreenEnabled=!1);}let c;if(Object.prototype.hasOwnProperty.call(e,"fullscreenEnabled"))switch(o.field(e,"fullscreenEnabled")){case 0:case"false":case!1:c=!1;break;default:c=!0;}else c=!0;s.value=c;break;case"gdprAgreeForCookie":let d;if(Object.prototype.hasOwnProperty.call(e,"gdprAgreeForCookie"))switch(o.field(e,"gdprAgreeForCookie")){case 1:case"true":case!0:d=!0;break;default:d=!1;}else d=!1;s.value=d;break;case"gdprAgreeRequired":let p;if(Object.prototype.hasOwnProperty.call(e,"gdprAgreeRequired"))switch(o.field(e,"gdprAgreeRequired")){case 1:case"true":case!0:p=!0;break;default:p=!1;}else p=!1;s.value=p;break;case"iosInlineVideo":let m;if(Object.prototype.hasOwnProperty.call(e,"iosInlineVideo"))switch(o.field(e,"iosInlineVideo")){case 1:case"true":case!0:m=!0;break;default:m=!1;}else m=!1;s.value=m;break;case"isDvrWallTimeMode":let g;if(Object.prototype.hasOwnProperty.call(e,"isDvrWallTimeMode"))switch(o.field(e,"isDvrWallTimeMode")){case 1:case"true":case!0:g=!0;break;default:g=!1;}else g=!1;s.value=g;break;case"locale":s.value=Object.prototype.hasOwnProperty.call(e,"locale")?o.field(e,"locale"):null;break;case"logoAutohide":if(i){let t;if(Object.prototype.hasOwnProperty.call(e,"logoAutohide"))switch(o.field(e,"logoAutohide")){case 0:case"false":case!1:t=!1;break;default:t=!0;}else t=!0;s.value=t;}break;case"logoFile":if(i){let t=null;Object.prototype.hasOwnProperty.call(e,"logoFile")&&(t=o.field(e,"logoFile")),s.value=t;}break;case"logoLink":if(i){let t=null;Object.prototype.hasOwnProperty.call(e,"logoLink")&&(t=o.field(e,"logoLink")),s.value=t;}break;case"logoPosition":if(i){let t;if(Object.prototype.hasOwnProperty.call(e,"logoXPosition"))switch(o.field(e,"logoXPosition")){case"left":default:t="left";break;case"right":t="right";}else t="left";let i,a=t+" / ";if(Object.prototype.hasOwnProperty.call(e,"logoYPosition"))if("bottom"===o.field(e,"logoYPosition"))i="bottom";else i="top";else i="top";s.value=a+i;}break;case"logoVisibleDuringAdPlayback":if(i){let t;if(Object.prototype.hasOwnProperty.call(e,"logoVisibleDuringAdPlayback"))switch(o.field(e,"logoVisibleDuringAdPlayback")){case 1:case"true":case!0:t=!0;break;default:t=!1;}else t=!1;s.value=t;}break;case"mute":let f;if(Object.prototype.hasOwnProperty.call(e,"mute"))switch(o.field(e,"mute")){case 1:case"true":case!0:f=!0;break;default:f=!1;}else f=!1;s.value=f;break;case"pictureInPictureEnabled":if(Object.prototype.hasOwnProperty.call(e,"pictureInPictureButtonVisible"))switch(o.field(e,"pictureInPictureButtonVisible")){case 1:case"true":case!0:e.pictureInPictureEnabled=!0;break;default:e.pictureInPictureEnabled=!1;}let _;if(Object.prototype.hasOwnProperty.call(e,"pictureInPictureEnabled"))switch(o.field(e,"pictureInPictureEnabled")){case 1:case"true":case!0:_=!0;break;default:_=!1;}else _=!1;s.value=_;break;case"qualityInitialBandwidthKbs":s.value=Object.prototype.hasOwnProperty.call(e,"qualityInitialBandwidthKbs")?parseFloat(o.field(e,"qualityInitialBandwidthKbs")):null;break;case"qualityLabelType":s.value=Object.prototype.hasOwnProperty.call(e,"qualityLabelType")?o.field(e,"qualityLabelType"):null;break;case"qualitySelectionEnabled":let b;if(Object.prototype.hasOwnProperty.call(e,"qualitySelectionEnabled"))switch(o.field(e,"qualitySelectionEnabled")){case 1:case"true":case!0:b=!0;break;default:b=!1;}else b=!1;s.value=b;break;case"shareButtons":let v;if(Object.prototype.hasOwnProperty.call(e,"shareButtons")){let t=o.field(e,"shareButtons");v=null!=t&&"string"==typeof t&&""!=u.trim(t)?t.toLowerCase():null;}else v=null;s.value=v;break;case"showSkinOnInit":let y;if(Object.prototype.hasOwnProperty.call(e,"showSkinOnInit"))switch(o.field(e,"showSkinOnInit")){case 0:case"false":case!1:y=!1;break;default:y=!0;}else y=!0;s.value=y;break;case"skinColor":s.value=Object.prototype.hasOwnProperty.call(e,"skinColor")?o.field(e,"skinColor"):null;break;case"startTime":s.value=Object.prototype.hasOwnProperty.call(e,"startTime")?parseFloat(o.field(e,"startTime")):null;break;case"subtitles":let x=null;Object.prototype.hasOwnProperty.call(e,"subtitles")&&(x=o.field(e,"subtitles"));let w=!1,k=null;if(k=$t.getSessionStorage(),w=null!=k,w){let t,e=null,s=!1,i=null;if(i=$t.getSessionStorage(),s=null!=i,s){try{let t,s=null,i=!1,a=null;if(a=$t.getSessionStorage(),i=null!=a,i){let e=null;e=$t.getSessionStorage(),s=u.trim(e.getItem("_brplayer_sub_lang")),t=s;}else t=s;null!=t&&""!=t&&(e=t);}catch(a){}t=e;}else t=e;null!=t&&(x=t);}s.value=x;break;case"videoCastEnabled":let E;if(Object.prototype.hasOwnProperty.call(e,"videoCastEnabled"))switch(o.field(e,"videoCastEnabled")){case 1:case"true":case!0:E=!0;break;default:E=!1;}else E=!1;s.value=E;break;case"volume":let S=null;Object.prototype.hasOwnProperty.call(e,"volume")&&(S=o.field(e,"volume"));let P=!1,C=null;if(C=$t.getSessionStorage(),P=null!=C,P){let t,e=NaN,s=!1,i=null;if(i=$t.getSessionStorage(),s=null!=i,s){try{let t,s=null,i=!1,a=null;if(a=$t.getSessionStorage(),i=null!=a,i){let e=null;e=$t.getSessionStorage(),s=u.trim(e.getItem("_brplayer_vol")),t=s;}else t=s;null!=t&&""!=t&&(e=parseFloat(t));}catch(a){}t=e;}else t=e;isNaN(t)||(S=t);}s.value=S;break;default:continue}}}updateDeviceCtx(t){let e=0;for(;e<t.length;){let s=t[e];switch(++e,s.id){case"browserName":s.value=f.browserName;break;case"isBrowserOnline":s.value=f.isBrowserOnline();break;case"isDeviceOrientationSupported":s.value=f.isDeviceOrientationSupported();break;case"isMobile":s.value=f.isMobile();break;case"isSmartTV":s.value=f.isSmartTV();break;case"isWebGL2Available":s.value=f.isWebGL2Available();break;case"isWebGLAvailable":s.value=f.isWebGLAvailable();break;case"orientation":s.value=f.getOrientation();break;case"screenSize":let t=f.getScreenSize();s.value=t.width+" x "+t.height;break;case"useragent":s.value=f.getUserAgent();break;default:continue}}}updateMediaCtx(t,e){let s=!1,i=!1;e instanceof C?(s=!1,i=!1):e instanceof w?(s=!0,i=e instanceof k):(s=!1,i=!1);let a=0;for(;a<t.length;){let l=t[a];switch(++a,l.id){case"audioSets":null!=e.audioSets&&e.audioSets.length>0&&(l.value=e.audioSets.length);break;case"duration":l.value=e.duration;break;case"hasConcurrencyControl":l.value=e.mediaSettings.hasConcurrencyControl;break;case"id":l.value=e.id;break;case"isDvr":l.value=s;break;case"isLiveStream":l.value=i;break;case"mediaLandingPage":null!=e.mediaLandingPage&&(l.value=e.mediaLandingPage);break;case"mediaPlaylist":null!=e.mediaPlaylist&&e.mediaPlaylist.get_length()>0&&(l.value=e.mediaPlaylist.get_length());break;case"posterImages":null!=e.posterImages&&e.posterImages.length>0&&(l.value=e.posterImages.length);break;case"source":null!=e.source&&e.source.length>0&&(l.value=e.source.length);break;case"sourceFallbacks":null!=e.sourceFallbacks&&e.sourceFallbacks.length>0&&(l.value=e.sourceFallbacks.length);break;case"spherical":l.value=e.spherical;break;case"splashImages":null!=e.splashImages&&e.splashImages.length>0&&(l.value=e.splashImages.length);break;case"subtitlesSets":null!=e.subtitlesSets&&e.subtitlesSets.length>0&&(l.value=e.subtitlesSets.length);break;case"title":l.value=e.title;break;default:continue}}}updateVideoCtx(t,e){if(null==this.videoElement)return;let i=this.videoElement.getVideoPlaybackQuality(),a=e.mediaPlaybackInfo.currentTime,l=this.videoElement.buffered,n=this.getBufferLength(l,a);null!=i&&(e.mediaPlaybackInfo.isPlaying?this.countFps(i.totalVideoFrames):this.framesPerSecond=0);let o=0;for(;o<t.length;){let h=t[o];switch(++o,h.id){case"buffer":h.value=l.length,null==h.chart&&(null==this.bufferChart&&(this.bufferChart=new q(["#2ca02c","#e6f598"].slice(0))),h.chart=Gt(s=this.bufferChart,s.ctrl)),this.bufferChart.render({duration:e.duration,buffered:l});break;case"bufferLength":h.value=0==n?"0":n.toFixed(2),null==h.chart&&(null==this.bufferLengthChart&&(this.bufferLengthChart=new U(["#000000","#fdae61","#e6f598","#66c2a5","#3288bd","#ffffff"].slice(0),[0,15,30,60,90,120].slice(0))),h.chart=Gt(s=this.bufferLengthChart,s.ctrl)),this.bufferLengthChart.render(n);break;case"creationTime":null!=i&&(h.value=r.dateStr(new Date(this.timeOrigin+i.creationTime)));break;case"currentTime":h.value=a;break;case"currentTotalBitrateKpbs":let t=e.mediaPlaybackInfo.currentTotalBitrateKpbs;null==t&&(t=this.tryToCountBitrate()),h.value=t,null==h.chart&&(null==this.currentTotalBitrateKpbsChart&&(this.currentTotalBitrateKpbsChart=new U(this.bandwidthColors,this.bandwidthSteps.slice(0))),h.chart=Gt(s=this.currentTotalBitrateKpbsChart,s.ctrl)),this.currentTotalBitrateKpbsChart.render(1e3*t);break;case"framesPerSecond":h.value=this.framesPerSecond,null==h.chart&&(null==this.framesPerSecondChart&&(this.framesPerSecondChart=new U(["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5"].slice(0),[0,12,18,24,32,48,60].slice(0))),h.chart=Gt(s=this.framesPerSecondChart,s.ctrl)),this.framesPerSecondChart.render(this.framesPerSecond);break;case"networkActivityBytes":if(0==this.hasNetworkActivitySamples)continue;if(h.value=Math.round(this.networkActivityBytes/1e3),null==h.chart){if(null==this.networkActivityChart){let t=this.bandwidthColors,e=this.bandwidthSteps,s=new Array(e.length),i=0,a=e.length;for(;i<a;){let t=i++;s[t]=e[t]/4;}this.networkActivityChart=new U(t,s.slice(0));}h.chart=Gt(s=this.networkActivityChart,s.ctrl);}this.networkActivityChart.render(8*this.networkActivityBytes/1e3);break;case"videoFrames":null!=i&&(h.value=i.droppedVideoFrames+" dropped of "+i.totalVideoFrames);break;case"videoSize":h.value=this.videoElement.videoWidth+" x "+this.videoElement.videoHeight;break;default:continue}}}destroyCharts(){null!=this.currentTotalBitrateKpbsChart&&this.currentTotalBitrateKpbsChart.destroy(),null!=this.bufferLengthChart&&this.bufferLengthChart.destroy(),null!=this.networkActivityChart&&this.networkActivityChart.destroy(),null!=this.framesPerSecondChart&&this.framesPerSecondChart.destroy(),null!=this.bufferChart&&this.bufferChart.destroy();}getBufferLength(t,e){let s=0,i=t.length;for(;s<i;){let i=s++,a=t.start(i),l=t.end(i);if(a<=e&&e<l)return l-e}return 0}countNetworkActivityBytes(){this.networkActivityBytes=0;let t=this.networkActivitySamples.h,e=Object.keys(t),s=e.length,i=0;for(;i<s;)this.networkActivityBytes+=t[e[i++]];this.networkActivitySamples.h=Object.create(null);}countFps(t){let e=t-this.lastDecodedFrames;if(0!=e){let s=window.performance.now();this.framesPerSecond=Math.round(e/(s-this.lastDecodedFrameTime)*1e3),this.lastDecodedFrames=t,this.lastDecodedFrameTime=s;}}tryToCountBitrate(){if("webkitVideoDecodedByteCount"in this.videoElement){let t=parseFloat(this.videoElement.webkitVideoDecodedByteCount),e=(t-this.lastDecodedByteCount)/1e3*8;return this.lastDecodedByteCount=t,Math.round(e)}return null}resolvePlugins(t,e){if(0==o.isObject(e))return;let s=e.__name__;if(null!=s){let i,a,l=s.split(".").pop(),n=e;if(0==o.isObject(n))a=!1;else {let t=Object.prototype.hasOwnProperty.call(n,"__plugfaces__")?o.field(n,"__plugfaces__"):null;a=null!=t&&t.indexOf("IVideoPlayer")>-1;}if(a)i=!0;else {let t=e;if(0==o.isObject(t))i=!1;else {let e=Object.prototype.hasOwnProperty.call(t,"__plugfaces__")?o.field(t,"__plugfaces__"):null;i=null!=e&&e.indexOf("IPlugin")>-1;}}if(i){let e=[],i=0,a=t;for(;i<a.length;){let t=a[i];++i,t.id==s&&e.push(t);}return void(0==e.length&&t.push({id:s,label:""+l,value:"active"}))}}else {let s=0,i=o.fields(e);for(;s<i.length;)this.resolvePlugins(t,o.field(e,i[s++]));}}}W.__name__="bs.player.plugin.skin.model.contextmenu.info.PlayerInfoMessage",Object.assign(W.prototype,{__class__:W});class H extends L{constructor(t,e,s,i,a,l){L._hx_skip_constructor=!0,super(),L._hx_skip_constructor=!1,this._hx_constructor(t,e,s,i,a,l);}_hx_constructor(t,e,s,i,a,l){this.cssPrefix=null,super._hx_constructor(t,e,s,i),this.state={browserName:f.browserName.toLowerCase(),mobile:f.isMobile(),ios:f.isiOS,tv:f.isSmartTV(),tizen:f.isSamsungSmartTVTizen,css:null},this.element=l,this.set_prefix(a);}set_prefix(t){if(this.cssPrefix=t,null!=this.element&&null!=this.cssPrefix&&""!=this.cssPrefix){let t=this.toStringArray();this.state.css=t.join(" ");let e=0;for(;e<t.length;)this.element.classList.add(t[e++]);this.refreshCallback(this.state);}return this.cssPrefix}toStringArray(){let t=[this.cssPrefix+"-"+this.state.browserName],e=0,s=o.fields(this.state);for(;e<s.length;){let i=s[e];++e;let a=o.field(this.state,i);"boolean"==typeof a&&1==a&&t.push(this.cssPrefix+"-"+i);}return t}}H.__name__="bs.player.plugin.skin.model.device.DeviceModel",H.__super__=L,Object.assign(H.prototype,{__class__:H});class $ extends L{constructor(t,e,s,i,a){L._hx_skip_constructor=!0,super(),L._hx_skip_constructor=!1,this._hx_constructor(t,e,s,i,a);}_hx_constructor(t,e,s,i,a){if(this.active=!1,super._hx_constructor(t,e,s,i),this.element=a,Object.prototype.hasOwnProperty.call(e,"hideUIElements")){let t=o.field(e,"hideUIElements");null!=t&&"string"==typeof t&&t.indexOf("fullscreenButton")>-1&&(e.fullscreenEnabled=!1);}let l;if(Object.prototype.hasOwnProperty.call(e,"fullscreenEnabled"))switch(o.field(e,"fullscreenEnabled")){case 0:case"false":case!1:l=!1;break;default:l=!0;}else l=!0;this.enabled=l,this.enabled&&(f.isiOS?(y.add(t,"videoMediaElementInit",Gt(this,this.oniOSVideoMediaElementInit)),y.add(t,"playing",Gt(this,this.oniOSPlaying)),y.add(t,"complete",Gt(this,this.oniOSComplete))):this.enabled&&this.activate());}destroy(){this.enabled&&(this.deactivate(),f.isiOS&&(y.remove(this.context,"videoMediaElementInit",Gt(this,this.oniOSVideoMediaElementInit)),y.remove(this.context,"playing",Gt(this,this.oniOSPlaying)),y.remove(this.context,"complete",Gt(this,this.oniOSComplete)))),super.destroy();}activate(){0!=this.enabled&&1!=this.active&&(this.active=!0,this.state={active:ft.isFullscreen(this.videoElement),toggle:Gt(this,this.toggle)},p.add(this.context,"fullscreen",Gt(this,this.onFullscreen)),this.refreshCallback(this.state));}deactivate(){0!=this.active&&(this.active=!1,this.state=null,p.remove(this.context,"fullscreen",Gt(this,this.onFullscreen)),this.refreshCallback(this.state));}toggle(t){0!=this.enabled&&(null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault()),ft.toggle(this.element,this.videoElement,Gt(this,this.toggled)),new p("fullscreen").dispatch(this.context));}toggled(t){if(0==this.enabled)return;let e=ft.isFullscreen(this.videoElement);this.state.active!=e&&(this.state.active=e,this.refreshCallback(this.state));}onFullscreen(t){0!=this.enabled&&(this.state.active=!this.state.active,this.refreshCallback(this.state));}oniOSVideoMediaElementInit(t){null!=t&&null!=t.data&&this.videoElement!=t.data&&(this.videoElement=t.data,o.isFunction(Gt(s=this.videoElement,s.webkitSupportsPresentationMode))&&o.isFunction(Gt(s=this.videoElement,s.webkitSetPresentationMode))&&(this.videoElement.removeEventListener("webkitpresentationmodechanged",Gt(this,this.oniOSWebkitPresentationModeChanged)),this.videoElement.addEventListener("webkitpresentationmodechanged",Gt(this,this.oniOSWebkitPresentationModeChanged))));}oniOSWebkitPresentationModeChanged(t){0!=this.enabled&&(this.state.active=null!=this.videoElement&&"fullscreen"==this.videoElement.webkitPresentationMode,this.refreshCallback(this.state));}oniOSPlaying(t){0!=this.enabled&&y.add(this.context,"currentTimeChange",Gt(this,this.oniOSCurrentTimeChange));}oniOSCurrentTimeChange(t){null!=t&&null!=t.data&&null!=t.data.media&&null!=t.data.media.mediaPlaybackInfo&&0!=t.data.media.mediaPlaybackInfo.isPlaying&&(this.enabled=1==this.videoElement.webkitSupportsFullscreen,this.enabled?this.activate():this.deactivate(),y.remove(this.context,"currentTimeChange",Gt(this,this.oniOSCurrentTimeChange)));}oniOSComplete(t){0!=this.enabled&&this.deactivate();}}$.__name__="bs.player.plugin.skin.model.fullscreen.FullscreenModel",$.__super__=L,Object.assign($.prototype,{__class__:$});class G extends L{constructor(t,e,s,i,a,l){L._hx_skip_constructor=!0,super(),L._hx_skip_constructor=!1,this._hx_constructor(t,e,s,i,a,l);}_hx_constructor(t,e,s,i,a,l){let n;if(this.pauseSelector=null,this.isPlaying=!1,this.showSkinOnInit=!0,this.skinElement=null,super._hx_constructor(t,e,s,i),this.skinElement=l,null!=a&&this.set_prefix(a),Object.prototype.hasOwnProperty.call(e,"showSkinOnInit"))switch(o.field(e,"showSkinOnInit")){case 0:case"false":case!1:n=!1;break;default:n=!0;}else n=!0;this.showSkinOnInit=n,this.state="show",m.add(t,"mediaMetadataData",Gt(this,this.onMetadata)),y.add(t,"playing",Gt(this,this.onPlaying)),y.add(t,"paused",Gt(this,this.onStopped)),y.add(t,"complete",Gt(this,this.onStopped)),f.isMobile()?(this.skinElement.addEventListener("touchmove",Gt(this,this.onMove),gt.get_passiveOptions()),this.skinElement.addEventListener("touchend",Gt(this,this.onTouchEnd),gt.get_passiveOptions())):this.skinElement.addEventListener("mousemove",Gt(this,this.onMove),gt.get_passiveOptions()),this.refreshCallback("show");}set_prefix(t){return this.pauseSelector="."+t+"-hide-pause-on-over",t}destroy(){super.destroy(),f.isMobile()?(this.skinElement.removeEventListener("touchmove",Gt(this,this.onMove)),this.skinElement.removeEventListener("touchend",Gt(this,this.onTouchEnd))):this.skinElement.removeEventListener("mousemove",Gt(this,this.onMove)),m.remove(this.context,"mediaMetadataData",Gt(this,this.onMetadata)),y.remove(this.context,"playing",Gt(this,this.onPlaying)),y.remove(this.context,"paused",Gt(this,this.onStopped)),y.remove(this.context,"complete",Gt(this,this.onStopped));}onTouchEnd(t){this.isPlaying&&this.startAutohide();}onMove(t){if(!this.isPlaying)return;null!=t.target.closest(this.pauseSelector)?(this.refreshCallback("show"),this.stopAutohide()):this.startAutohide();}onMetadata(t){this.isPlaying=!1,this.refreshCallback("show"),this.stopAutohide(),this.showSkinOnInit||this.refreshCallback("hide-force");}onStopped(t){this.isPlaying=!1,this.refreshCallback("show"),this.stopAutohide();}onPlaying(t){this.isPlaying=!0,this.refreshCallback("hide"),this.stopAutohide();}startAutohide(){if(this.refreshCallback("show"),this.stopAutohide(),!this.isPlaying)return;let t=this,e=-1;e=window.requestAnimationFrame((function(e){t.refreshCallback("hide"),t.stopAutohide();})),this.animId=e;}stopAutohide(){let t=this.animId;null==t||isNaN(t)||window.cancelAnimationFrame(t);}}G.__name__="bs.player.plugin.skin.model.hide.AutohideModel",G.__super__=L,Object.assign(G.prototype,{__class__:G});class X extends L{constructor(t,e,s,i){super(t,e,s,i),this.state={type:"css",airplay:{id:"bmp-ico-airplay"},alert:{id:"bmp-ico-alert"},subtitles:{id:"bmp-ico-subtitles"},pip:{id:"bmp-ico-pip"},chromecast:{id:"bmp-ico-chromecast"},copy:{id:"bmp-ico-copy"},playNext:{id:"bmp-ico-play-next"},maximize:{id:"bmp-ico-maximize"},minimize:{id:"bmp-ico-minimize"},menu:{id:"bmp-ico-menu"},audio:{id:"bmp-ico-audio"},pause:{id:"bmp-ico-pause"},play:{id:"bmp-ico-play"},replay:{id:"bmp-ico-replay"},quality:{id:"bmp-ico-quality"},share:{id:"bmp-ico-share",type:"css",code:{id:"bmp-ico-code",group:"share"},mail:{id:"bmp-ico-mail",group:"share"},facebook:{id:"bmp-ico-facebook",group:"share"},twitter:{id:"bmp-ico-twitter",group:"share"},linkedin:{id:"bmp-ico-linkedin",group:"share"}},volume:{id:"bmp-ico-volume"},volume1:{id:"bmp-ico-volume-1"},volume2:{id:"bmp-ico-volume-2"},volumeX:{id:"bmp-ico-volume-x"},close:{id:"bmp-ico-close"},left:{id:"bmp-ico-left"},right:{id:"bmp-ico-right"},up:{id:"bmp-ico-up"},down:{id:"bmp-ico-down"},center:{id:"bmp-ico-center"},vr:{id:"bmp-ico-vr"},gyroscope:{id:"bmp-ico-gyroscope"},zoom:{plus:{id:"bmp-ico-zoom-plus"},minus:{id:"bmp-ico-zoom-minus"},reset:{id:"bmp-ico-zoom-reset"}},playbackRate:{id:"bmp-ico-playback-rate"}};}updateTypesState(t,e){this.state.type=t,this.state.share.type=e,this.refreshCallback(this.state);}}X.__name__="bs.player.plugin.skin.model.icon.IconModel",X.__super__=L,Object.assign(X.prototype,{__class__:X});class K extends L{constructor(t,e,s,i,a){super(t,e,s,i),this.state={count:0,audio:{hasItems:!1,activate:null},casting:null,fullscreen:null,pictureInPicture:null,quality:{hasItems:!1,activate:null},subtitles:{hasItems:!1,activate:null},vr:null,playbackRate:{hasItems:!1,items:null,activate:null}};let l=this;this.audio=new j(t,e,(function(t,e){l.menuStateChange({audio:t},e);}),(function(t){l.reportError(t);})),this.casting=new z(t,e,(function(t,e){l.menuStateChange({casting:t},e);}),(function(t){l.reportError(t);})),this.fullscreen=new $(t,e,(function(t,e){l.menuStateChange({fullscreen:t},e);}),(function(t){l.reportError(t);}),a),this.pip=new Y(t,e,(function(t,e){l.menuStateChange({pictureInPicture:t},e);}),(function(t){l.reportError(t);})),this.quality=new et(t,e,(function(t,e){l.menuStateChange({quality:t},e);}),(function(t){l.reportError(t);})),this.subtitles=new ot(t,e,(function(t,e){l.menuStateChange({subtitles:t},e);}),(function(t){l.reportError(t);})),this.vr=new dt(t,e,(function(t,e){l.menuStateChange({vr:t},e);}),(function(t){l.reportError(t);})),this.playbackRate=new Z(t,e,(function(t,e){l.menuStateChange({playbackRate:t},e);}),(function(t){l.reportError(t);}));}menuStateChange(t,e){if(null!=t){let e=0,s=o.fields(t);for(;e<s.length;){let i=s[e];++e,this.state[i]=o.field(t,i);}}let s=0;this.state.quality.hasItems&&(s=1),this.state.subtitles.hasItems&&++s,this.state.audio.hasItems&&++s,null!=this.state.casting&&++s,null!=this.state.pictureInPicture&&++s,null!=this.state.fullscreen&&++s,null!=this.state.vr&&++s,this.state.playbackRate.hasItems&&++s,this.state.count=s,this.refreshCallback(this.state);}destroy(){null!=this.audio&&this.audio.destroy(),null!=this.casting&&this.casting.destroy(),null!=this.fullscreen&&this.fullscreen.destroy(),null!=this.pip&&this.pip.destroy(),null!=this.quality&&this.quality.destroy(),null!=this.subtitles&&this.subtitles.destroy(),null!=this.vr&&this.vr.destroy();}}K.__name__="bs.player.plugin.skin.model.menu.MenuModel",K.__super__=L,Object.assign(K.prototype,{__class__:K});class Q extends L{constructor(t,e,s,i){super(t,e,s,i),this.state=null,g.add(t,"showMessage",Gt(this,this.onOpenEvent)),g.add(t,"closeMessage",Gt(this,this.onCloseEvent)),this.refreshCallback(this.state);}destroy(){super.destroy(),g.remove(this.context,"showMessage",Gt(this,this.onOpenEvent)),g.remove(this.context,"closeMessage",Gt(this,this.onCloseEvent));}close(){new g("closeMessage").dispatch(this.context);}onOpenEvent(t){if(this.state=null,null!=t&&null!=t.data){if(Object.prototype.hasOwnProperty.call(t.data,"type")&&""!=t.data.type)switch(null==this.state&&(this.state={type:{alert:!1,code:!1,normal:!1,text:"normal"}}),t.data.type){case"alert":this.state.type.alert=!0,this.state.type.text="alert";break;case"code":this.state.type.code=!0,this.state.type.text="code";break;case"normal":this.state.type.normal=!0,this.state.type.text="normal";break;default:this.state.type=null;}null!=this.state.type?(Object.prototype.hasOwnProperty.call(t.data,"title")&&""!=t.data.title&&(this.state.title={html:t.data.title}),Object.prototype.hasOwnProperty.call(t.data,"text")&&""!=t.data.text&&(this.state.content={html:t.data.text}),Object.prototype.hasOwnProperty.call(t.data,"textDetails")&&""!=t.data.textDetails&&(null==this.state.content&&(this.state.content={}),this.state.content.text=t.data.textDetails),Object.prototype.hasOwnProperty.call(t.data,"userSingleActionButtonText")&&""!=t.data.userSingleActionButtonText&&Object.prototype.hasOwnProperty.call(t.data,"onUserSingleAction")&&o.isFunction(t.data.onUserSingleAction)&&(this.state.action={icon:this.state.type.code?"copy":null,text:t.data.userSingleActionButtonText,click:t.data.onUserSingleAction}),Object.prototype.hasOwnProperty.call(t.data,"close")&&0==t.data.close?this.state.close=null:this.state.close={click:Gt(this,this.close)},null!=t.data.onAfterShow&&o.isFunction(t.data.onAfterShow)&&(this.onAfterShow=t.data.onAfterShow),null!=t.data.onAfterClose&&o.isFunction(t.data.onAfterClose)&&(this.onAfterClose=t.data.onAfterClose),Object.prototype.hasOwnProperty.call(t.data,"style")&&(this.state.style=o.field(t.data,"style")),this.refreshCallback(this.state,Gt(this,this.afterOpenStateRefresh))):this.refreshCallback(this.state);}else this.refreshCallback(this.state);}afterOpenStateRefresh(t){null!=this.onAfterShow&&this.onAfterShow(),this.onAfterShow=null;}onCloseEvent(t){this.state=null,this.refreshCallback(this.state,Gt(this,this.afterCloseStateRefresh));}afterCloseStateRefresh(t){null!=this.onAfterClose&&this.onAfterClose(),this.onAfterClose=null;}}Q.__name__="bs.player.plugin.skin.model.message.MessageModel",Q.__super__=L,Object.assign(Q.prototype,{__class__:Q});class Y extends L{constructor(t,e,s,i){if(super(t,e,s,i),Object.prototype.hasOwnProperty.call(e,"pictureInPictureButtonVisible"))switch(o.field(e,"pictureInPictureButtonVisible")){case 1:case"true":case!0:e.pictureInPictureEnabled=!0;break;default:e.pictureInPictureEnabled=!1;}let a;if(Object.prototype.hasOwnProperty.call(e,"pictureInPictureEnabled"))switch(o.field(e,"pictureInPictureEnabled")){case 1:case"true":case!0:a=!0;break;default:a=!1;}else a=!1;this.enabled=a,this.state=null,this.enabled&&(p.add(t,"pipAvailable",Gt(this,this.onPipAvailable)),p.add(t,"pipEntered",Gt(this,this.onPipEntered)),p.add(t,"pipLeaved",Gt(this,this.onPipLeaved))),this.refreshCallback(this.state);}destroy(){super.destroy(),this.enabled&&(p.remove(this.context,"pipAvailable",Gt(this,this.onPipAvailable)),p.remove(this.context,"pipEntered",Gt(this,this.onPipEntered)),p.remove(this.context,"pipLeaved",Gt(this,this.onPipLeaved)));}onPipAvailable(t){this.isPipAvailable=null!=t&&1==t.data,0!=this.enabled&&(this.isPipAvailable?this.state={active:!1,click:Gt(this,this.dispatchPipToggle)}:this.state=null,this.refreshCallback(this.state));}onPipEntered(t){0!=this.enabled&&(this.state.active=!0,this.refreshCallback(this.state));}onPipLeaved(t){0!=this.enabled&&(this.state.active=!1,this.refreshCallback(this.state));}dispatchPipToggle(t){new p("pipToggle").dispatch(this.context);}}Y.__name__="bs.player.plugin.skin.model.pip.PictureInPictureModel",Y.__super__=L,Object.assign(Y.prototype,{__class__:Y});class Z extends L{constructor(t,e,s,i){let a;if(super(t,e,s,i),Object.prototype.hasOwnProperty.call(e,"playbackRateEnabled"))switch(o.field(e,"playbackRateEnabled")){case 1:case"true":case!0:a=!0;break;default:a=!1;}else a=!1;this.enabled=a;let l=[.25,.5,.75,1,1.25,1.5,1.75,2],n=Object.prototype.hasOwnProperty.call(e,"playbackRate")?parseFloat(o.field(e,"playbackRate")):null;null==n||isNaN(n)||-1!=l.indexOf(n)||(l=l.concat([n]),l.sort((function(t,e){return t>e?1:-1})));let r=[],h=0;for(;h<l.length;){let t=l[h];++h,r.push({active:1==t,label:1==t?"Normal":""+t,data:""+t});}this.ITEMS=r,this.state={hasItems:!1,items:null,activate:null},this.enabled&&(this.state.hasItems=!0,this.state.items=this.ITEMS,this.state.activate=Gt(this,this.activate)),this.enabled&&(y.add(t,"playbackRate",Gt(this,this.onPlaybackRate)),y.add(t,"videoCastingStart",Gt(this,this.onCastingStart)),y.add(t,"videoCastingEnd",Gt(this,this.onCastingEnd))),this.refreshCallback(this.state);}get_activeRate(){if(null!=this.state&&null!=this.state.items){let t=0,e=this.state.items;for(;t<e.length;){let s=e[t];if(++t,s.active)return parseFloat(s.data)}}return 0}destroy(){super.destroy(),this.enabled&&(y.remove(this.context,"playbackRate",Gt(this,this.onPlaybackRate)),y.remove(this.context,"videoCastingStart",Gt(this,this.onCastingStart)),y.remove(this.context,"videoCastingEnd",Gt(this,this.onCastingEnd)));}onPlaybackRate(t){if(0==t.data)return;if(this.get_activeRate()==t.data||null==this.state.items)return;let e=0,s=this.state.items.length;for(;e<s;){let s=e++,i=t.data,a=parseFloat(this.state.items[s].data);this.state.items[s].active=i==a;}this.refreshCallback(this.state);}onCastingStart(t){let e=this.ITEMS,s=[],i=0;for(;i<e.length;){let t=e[i];++i,parseFloat(t.data)>=.5&&s.push(t);}this.state.items=s,this.refreshCallback(this.state);}onCastingEnd(t){this.state.items=this.ITEMS,this.refreshCallback(this.state);}dispatch(t){let e=this.state.items[t];if(null==e)return;let s=parseFloat(this.state.items[this.state.items.length-1].data),i=Math.max(0,Math.min(s,parseFloat(e.data))),a=new p("setVideoPlaybackRate");a.data=i,a.dispatch(this.context);}activate(t){if(!Object.prototype.hasOwnProperty.call(this.state,"items"))return;null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault());let e=h.parseInt(Ht.__cast(t.target,HTMLElement).getAttribute("data-item-index"));isNaN(e)||(this.dispatch(e),this.refreshCallback(this.state));}}Z.__name__="bs.player.plugin.skin.model.playbackRate.PlaybackRateModel",Z.__super__=L,Object.assign(Z.prototype,{__class__:Z});class J extends L{constructor(t,e,s,i){super(t,e,s,i),this.state={hasNext:!1,currentPos:-1,items:null,playItem:null},this.state.playItem=Gt(this,this.playItem),m.add(t,"mediaMetadataData",Gt(this,this.onMetadataData)),m.add(t,"mediaPlaylistData",Gt(this,this.onPlaylistData)),this.refreshCallback(this.state);}destroy(){super.destroy(),m.remove(this.context,"mediaMetadataData",Gt(this,this.onMetadataData)),m.remove(this.context,"mediaPlaylistData",Gt(this,this.onPlaylistData));}onMetadataData(t){this.state={hasNext:!1,currentPos:-1,items:null,playItem:null},this.state.playItem=Gt(this,this.playItem),this.mediaPlaylist=null,this.refreshCallback(this.state);}onPlaylistData(t){if(null==t||null==t.data)return this.state={hasNext:!1,currentPos:-1,items:null,playItem:null},this.state.playItem=Gt(this,this.playItem),void(this.mediaPlaylist=null);this.mediaPlaylist=E.clone(t.data);let e=null!=this.mediaPlaylist&&this.mediaPlaylist.hasNext();if(this.state.hasNext=e,this.state.currentPos=null!=this.mediaPlaylist?this.mediaPlaylist.currentPos:0,this.state.items=[],null!=this.mediaPlaylist){let t=0,e=this.mediaPlaylist.items;for(;t<e.length;){let s=e[t];++t;let i={},a=this.cleanupCustomParams(o.field(s,"title"));null!=a&&this.copyParams(i,"title",a);let l=this.cleanupCustomParams(o.field(s,"duration"));null!=l&&this.copyParams(i,"duration",l);let n=this.cleanupCustomParams(o.field(s,"splashImages"));null!=n&&this.copyParams(i,"splashImages",n),this.state.items.push(i);}}this.refreshCallback(this.state);}copyParams(t,e,s){if("duration"==e)t[e]={time:s,text:Lt.formatTime(parseFloat(""+h.string(s)))};else if("splashImages"==e){let e=s;null!=e&&e instanceof Array&&e.length>0&&(t.image=bt.imageToState(e));}else t[e]=s;}cleanupCustomParams(t){if(null==t||"string"==typeof t||"number"==typeof t)return t;if(t instanceof Array){let e=t,s=[],i=0;for(;i<e.length;)s.push(this.cleanupCustomParams(e[i++]));return s}if(o.isObject(t)){let e=o.copy(t);return Object.prototype.hasOwnProperty.call(e,"customParams")&&o.deleteField(e,"customParams"),e}return t}playItem(t){if(null==this.mediaPlaylist)return;let e=this.mediaPlaylist.items[t];this.mediaPlaylist.currentPos=t,J.play(this.context,e,this.mediaPlaylist);}static play(t,e,s){if(null==e)return;let i=new m("mediaMetadataData");i.data=e,i.dispatch(t);let a=new m("mediaPlaylistData");a.data=s,a.dispatch(t);let l=new m("movieData");l.data=e,l.dispatch(t);let n=new m("audioData");null!=e.audioSets?n.data=e.audioSets:n.data=[],n.dispatch(t);let r=new m("subtitleData");null!=e.subtitlesSets?r.data=e.subtitlesSets:r.data=[],r.dispatch(t),new p("skinPlay").dispatch(t);}}J.__name__="bs.player.plugin.skin.model.playlist.PlaylistModel",J.__super__=L,Object.assign(J.prototype,{__class__:J});class tt extends F{constructor(t,e,s,i,a){L._hx_skip_constructor=!0,super(),L._hx_skip_constructor=!1,this._hx_constructor(t,e,s,i,a);}_hx_constructor(t,e,s,i,a){this.popupResizeObserver=null,this.popupRect=null,this.popupElement=null,this.boundsRect=null,this.boundsElement=null,this.handleRect=null,this.handleMoveX=null,this.handleMoveTime=null,this.handleMoveFromTime=null,this.handleElement=null,this.skinRect=null,this.skinElement=null,this.segments=null,this.markers=null,this.thumbnails=null,this.isTrackDown=!1,super._hx_constructor(t,e,s,i),this.skinElement=a,this.skinRect=this.skinElement.getBoundingClientRect(),this.state={time:0,text:Lt.formatTime(0),width:"0",seekable:!0,has:{thumb:!1,segments:!1,segment:!1,markers:!1,marker:!1,texts:!1},popup:{active:!1,time:0,text:Lt.formatTime(0),position:"0",width:"0",bounds:{offset:"0px",ctrl:null},ctrl:null},ctrl:null},this.state.ctrl=Gt(this,this.controlHandler),this.state.popup.ctrl=Gt(this,this.controlPopup),this.state.popup.bounds.ctrl=Gt(this,this.controlPopupBounds),b.add(t,"resize",Gt(this,this.onResize)),this.updateState();}destroy(){super.destroy(),b.remove(this.context,"resize",Gt(this,this.onResize)),this.unobservePopupElement();}updateState(t){super.updateState(t),this.state.time=this.currentTime,this.state.text=Lt.formatTime(this.state.time);let e=this.state.time/this.duration,s=isNaN(e)||!isFinite(e);this.state.width=s?"0%":Math.max(0,Math.min(100,100*e))+"%",this.state.has.texts=this.state.has.marker||this.state.has.segment,this.refreshSegments(this.state.time),this.refreshCallback(this.state);}onResize(t){if(null!=this.skinElement){let t=null;t=this.skinElement.getBoundingClientRect(),this.skinRect=t;}this.updatePopupSizes();}updateDuration(t){this.duration=Math.max(0,t),this.duration>0&&(this.state.seekable=this.isSeekingPossible());}controlHandler(t){if(null==t)return f.isMobile()?(this.handleElement.removeEventListener("touchstart",Gt(this,this.handle),!1),this.handleElement.removeEventListener("touchmove",Gt(this,this.handle),!1),this.handleElement.removeEventListener("touchend",Gt(this,this.handle),!1)):(this.handleElement.removeEventListener("mousedown",Gt(this,this.handle),!1),this.handleElement.removeEventListener("mousemove",Gt(this,this.handle),!1),this.handleElement.removeEventListener("mouseup",Gt(this,this.handle),!1)),this.handleElement=null,void(this.handleRect=null);this.handleElement=t;let e=null;e=this.handleElement.getBoundingClientRect(),this.handleRect=e,f.isMobile()?(this.handleElement.addEventListener("touchstart",Gt(this,this.handle),gt.get_passiveOptions()),this.handleElement.addEventListener("touchmove",Gt(this,this.handle),gt.get_passiveOptions()),this.handleElement.addEventListener("touchend",Gt(this,this.handle),gt.get_passiveOptions())):(this.handleElement.addEventListener("mousedown",Gt(this,this.handle),gt.get_passiveOptions()),this.handleElement.addEventListener("mousemove",Gt(this,this.handle),gt.get_passiveOptions()),this.handleElement.addEventListener("mouseup",Gt(this,this.handle),gt.get_passiveOptions()));}dispatchSeek(t){let e=new p("skinSeek");e.data=t,e.dispatch(this.context);}handle(t){if(!(this.duration<=0))switch(t.type){case"blur":case"mouseleave":case"mouseup":case"touchend":let e=this.skinElement,s=Gt(this,this.handle);f.enableHtmlSelection(),window.document.removeEventListener("mouseup",s),window.document.removeEventListener("mousemove",s),window.document.removeEventListener("mouseleave",s),window.document.removeEventListener("blur",s),e.removeEventListener("mouseup",s),e.removeEventListener("mousemove",s),e.removeEventListener("blur",s),f.isMobile()&&(window.document.removeEventListener("touchend",s),e.removeEventListener("touchend",s)),this.state.popup.active=!1;let i=t.target;this.skinElement.contains(i)&&this.isTrackDown?this.handleMoveEnd(t):(this.currentTime=this.handleMoveFromTime,this.updateState()),this.handleMoveFromTime=null,this.isTrackDown=!1;break;case"mousedown":case"touchstart":if(this.isTrackDown)return;let a=this.skinElement,l=Gt(this,this.handle);f.disableHtmlSelection(),window.document.addEventListener("mouseup",l,gt.get_passiveOptions()),window.document.addEventListener("mousemove",l,gt.get_passiveOptions()),window.document.addEventListener("mouseleave",l,gt.get_passiveOptions()),window.document.addEventListener("blur",l,gt.get_passiveOptions()),a.addEventListener("mouseup",l,gt.get_passiveOptions()),a.addEventListener("mousemove",l,gt.get_passiveOptions()),a.addEventListener("blur",l,gt.get_passiveOptions()),f.isMobile()&&(window.document.addEventListener("touchend",l,gt.get_passiveOptions()),a.addEventListener("touchend",l,gt.get_passiveOptions())),this.handleMoveFromTime=this.currentTime,this.state.popup.active=!0,this.handleMoving(t),this.isTrackDown=!0;break;case"mousemove":case"touchmove":this.handleMoving(t);break;default:return}}handleMoving(t){if(null==this.duration)return;this.updatePopupSizes();let e=0;t instanceof MouseEvent&&(e=Ht.__cast(t,MouseEvent).clientX);let s,i=window;if(Object.prototype.hasOwnProperty.call(i,"TouchEvent")&&t instanceof TouchEvent){let s=t;if(s.touches.length>0){e=s.touches.item(0).clientX;}}if(this.handleMoveX=e,this.handleMoveTime=this.calculateProgressTime(),null!=this.handleMoveTime){if(this.isTrackDown&&(this.currentTime=this.handleMoveTime,this.updateState()),this.updatePopupData(this.handleMoveTime),null==t)s=null;else {let e=t.target;s=null==e?null:e.dataset;}null!=s&&Object.prototype.hasOwnProperty.call(s,"markerIndex")&&(this.state.marker=this.state.markers[o.field(s,"markerIndex")],this.state.has.marker=null!=this.state.marker),null!=s&&Object.prototype.hasOwnProperty.call(s,"segmentIndex")&&(this.state.segment=this.state.segments[o.field(s,"segmentIndex")],this.state.has.segment=null!=this.state.segment),this.updateState();}}handleMoveEnd(t){this.isSeekingPossible()&&(this.handleMoveTime<=0||(this.currentTime=this.handleMoveTime,this.dispatchSeek(this.currentTime),this.handleMoveTime=null,this.handleMoveX=null));}onCurrentTimeChange(t){this.isTrackDown||this.currentTime!=t.data.currentTime&&(this.currentTime=Math.max(0,t.data.currentTime),this.updateState(!0));}onDurationChange(t){this.duration!=t.data.duration&&(this.duration=t.data.duration,this.updateDuration(this.duration),this.updateSegments(this.duration),this.updateMarkers(this.duration),this.updateState());}onMetadataData(t){super.onMetadataData(t),this.resetThumbs(),this.resetSegments(),this.resetMarkers(),this.updateDuration(this.duration);let e=this.monitor.currentMedia;if(null==e)return void this.updateState();let s=e.progress;if(null==s)return void this.updateState();let i=s.thumbnails;null!=i?this.onThumbsMetadataData(i):this.resetThumbs(),null!=s.segmentsUrl?this.reqSegmentsVtt(s.segmentsUrl):null!=s.segments?"string"==typeof s.segments?this.reqSegmentsVtt(s.segments):this.parseSegmentsObject(s.segments):this.resetSegments(),null!=s.markersUrl?this.reqMarkersVtt(s.markersUrl):null!=s.markers?"string"==typeof s.markers?this.reqMarkersVtt(s.markers):this.parseMarkersObject(s.markers):this.resetMarkers(),this.updateState();}resetThumbs(){o.deleteField(this.state,"thumb"),this.state.has.thumb=!1,this.thumbnails=null;}onThumbsMetadataData(t){let e=t.url;if(null==e)return void console.error("Cannot load external file. "+e);if(e.lastIndexOf("vtt")<0)return void console.error("Not .vtt file format. "+e+".");let s=e;if(null==t.imageBaseUrl){let t=e.split("/");t.pop(),s=t.join("/");}let i=new c(e);i.onError=Gt(this,this.reportError);let a=this;i.onData=function(t){a.parseThumbs(s,t);},i.request();}parseThumbs(t,e){null!=t&&null!=e&&(this.thumbnails=new At(t).parse(e));}searchForThumbByTime(t){let e=null;if(null!=this.thumbnails){let s=this.thumbnails.entries,i=0;for(;i<s.length;){let a=s[i];if(++i,t>=a.showTime&&t<=a.hideTime){e={url:a.source.url,x:a.source.x,y:a.source.y,w:a.source.w,h:a.source.h,style:{backgroundImage:"url("+a.source.url+")",backgroundPosition:"-"+a.source.x+"px -"+a.source.y+"px",width:a.source.w+"px",height:a.source.h+"px"}};break}}}this.state.thumb=e,this.state.has.thumb=null!=this.state.thumb,null==this.state.thumb&&o.deleteField(this.state,"thumb"),this.state.has.thumb?this.state.popup.width=this.state.thumb.w+"px":this.state.popup.width=null;}resetSegments(){o.deleteField(this.state,"segment"),this.state.has.segment=!1,o.deleteField(this.state,"segments"),this.state.has.segments=!1,this.segments=null;}reqSegmentsVtt(t){let e=new c(t);e.onError=Gt(this,this.reportError),e.onData=Gt(this,this.parseSegmentsVtt),e.request();}parseSegmentsVtt(t){"string"==typeof t?(this.segments=(new Tt).parse(t),this.updateSegments(this.duration)):console.error("progress.segmentsUrl must be string");}parseSegmentsObject(t){if(!(t instanceof Array))return void console.error("progress.segments must be array");this.segments=[];let e,s=0,i=0,a=0,l=t,n=0;for(;n<l.length;){let t=l[n];++n,Object.prototype.hasOwnProperty.call(t,"duration")&&null!=t.duration&&(s=parseFloat(t.duration),null==s||s<=0||(e=new Ot,a=i+s,e.showTime=i,e.hideTime=a,e.duration=s,e.text=t.label,this.segments.push(e),i=e.hideTime));}this.updateSegments(this.duration),this.updateState();}searchForSegmentByTime(t){let e=null;if(null!=this.state.segments){let s=this.state.segments,i=0;for(;i<s.length;){let a=s[i];if(++i,t>a.time.show&&t<a.time.hide){e=a;break}}}this.state.segment=e,this.state.has.segment=null!=this.state.segment,null==this.state.segment&&o.deleteField(this.state,"segment");}updateSegments(t){if(null!=this.segments&&isFinite(t)&&t>0){let e,s,i,a,l,n,r=[],o=this.segments,h=0;for(;h<o.length;){let u=o[h],c=h++;a=u.showTime,l=u.duration,n=u.hideTime,i=0==c?0:this.segments[c-1].hideTime;let d=(a-i)/t;e={type:"space",time:{show:i,duration:a-i,hide:a},width:isNaN(d)||!isFinite(d)?"0%":Math.max(0,Math.min(100,100*d))+"%",progressWidth:isNaN(0)||!isFinite(0)?"0%":Math.max(0,Math.min(100,0))+"%"},e.time.duration>0&&r.push(e);let p=l/t;if(s={type:"item",time:{show:a,duration:l,hide:n},text:u.text,width:isNaN(p)||!isFinite(p)?"0%":Math.max(0,Math.min(100,100*p))+"%",progressWidth:isNaN(0)||!isFinite(0)?"0%":Math.max(0,Math.min(100,0))+"%"},t>0&&n>t){s.time.duration=t-a,s.time.hide=t;let e=(t-a)/t;s.width=isNaN(e)||!isFinite(e)?"0%":Math.max(0,Math.min(100,100*e))+"%";}if(s.time.duration>0&&r.push(s),c==this.segments.length-1){let i=(t-s.time.hide)/t;e={type:"space",time:{show:s.time.hide,duration:t-s.time.hide,hide:t},width:isNaN(i)||!isFinite(i)?"0%":Math.max(0,Math.min(100,100*i))+"%",progressWidth:isNaN(0)||!isFinite(0)?"0%":Math.max(0,Math.min(100,0))+"%"},e.time.duration>0&&r.push(e);}}this.state.segments=r,this.state.has.segments=this.state.segments.length>0;}else this.resetSegments();}hasSegments(){return !(!Object.prototype.hasOwnProperty.call(this.state,"segments")||null==this.state.segments)&&this.state.segments instanceof Array}refreshSegments(t){if(!this.hasSegments())return;let e=0,s=this.state.segments;for(;e<s.length;){let i=s[e];++e;let a="0%";if(i.time.show<=t&&i.time.hide>=t){let e=(t-i.time.show)/i.time.duration;a=isNaN(e)||!isFinite(e)?"0%":Math.max(0,Math.min(100,100*e))+"%";}else i.time.hide<=t&&(a="100%");i.progressWidth!=a&&(i.progressWidth=a);}}resetMarkers(){this.state.has.marker=!1,o.deleteField(this.state,"marker"),this.state.has.markers=!1,o.deleteField(this.state,"markers"),this.markers=null;}reqMarkersVtt(t){let e=new c(t);e.onError=Gt(this,this.reportError),e.onData=Gt(this,this.parseMarkersVtt),e.request();}parseMarkersVtt(t){null!=t&&(this.markers=(new Ct).parse(t),this.updateMarkers(this.duration));}parseMarkersObject(t){if(!(t instanceof Array))return void console.error("progress.segments must be array");this.markers=[];let e,s=0,i=t,a=0;for(;a<i.length;){let t=i[a];++a,Object.prototype.hasOwnProperty.call(t,"time")&&null!=t.time&&(s=parseFloat(t.time),null==s||s<=0||(e=new Pt,e.showTime=s,e.text=Object.prototype.hasOwnProperty.call(t,"label")?o.field(t,"label"):null,this.markers.push(e)));}this.updateMarkers(this.duration),this.updateState();}searchForMarkerByTime(t){let e=null;if(null!=this.state.markers){let s=this.state.markers,i=0;for(;i<s.length;){let a=s[i];if(++i,a.time==t){e=a;break}}}this.state.marker=e,this.state.has.marker=null!=this.state.marker,null==this.state.marker&&o.deleteField(this.state,"marker");}updateMarkers(t){let e;if(null!=this.markers&&isFinite(t)&&t>0){let s=[],i=0,a=this.markers;for(;i<a.length;){let l=a[i];++i;let n=l.showTime/t;e=isNaN(n)||!isFinite(n)?"0%":Math.max(0,Math.min(100,100*n))+"%",s.push({time:l.showTime,text:l.text,left:e});}this.state.markers=s,this.state.has.markers=this.state.markers.length>0;}else this.resetMarkers();}controlPopup(t){if(null==t)return this.unobservePopupElement(),this.popupElement=null,void(this.popupRect=null);this.popupElement=t;let e=null;e=this.popupElement.getBoundingClientRect(),this.popupRect=e,this.observePopupElement();}controlPopupBounds(t){if(null==t)return this.boundsElement=null,void(this.boundsRect=null);if(this.boundsElement=t,null!=this.boundsElement){let t=null;t=this.boundsElement.getBoundingClientRect(),this.boundsRect=t;}}observePopupElement(){let t=this,e=window;Object.prototype.hasOwnProperty.call(e,"ResizeObserver")&&(this.popupResizeObserver=new ResizeObserver((function(){let e=null;e=t.popupElement.getBoundingClientRect(),t.popupRect=e,t.correctPopupPosition();})),this.popupResizeObserver.observe(this.popupElement));}unobservePopupElement(){null!=this.popupResizeObserver&&this.popupResizeObserver.disconnect();}updatePopupData(t){if(null==t)return;let e=t/this.duration,s=isNaN(e)||!isFinite(e);if(this.state.popup.position=s?"0%":Math.max(0,Math.min(100,100*e))+"%",this.state.popup.bounds.offset="0px",this.isDvr){let e=this.duration-t,s={time:-e,text:"-"+Lt.formatTime(e)};if(this.isDvrWallTimeMode){let t,i=this.monitor.currentMedia;if(null!=i&&Object.prototype.hasOwnProperty.call(i,"mediaPlaybackInfo")&&Object.prototype.hasOwnProperty.call(i.mediaPlaybackInfo,"currentTime")){let s=new Date(1e3*i.mediaPlaybackInfo.currentTime),a=0|e;t={time:a,text:Lt.formatDateTime(s,a)};}else t=null;null!=t&&(s=t);}this.state.popup.time=s.time,this.state.popup.text=s.text;}else this.state.popup.time=t,this.state.popup.text=Lt.formatTime(t),this.searchForThumbByTime(t),this.searchForMarkerByTime(t),this.searchForSegmentByTime(t);this.correctPopupPosition();}correctPopupPosition(){if(null==this.popupRect)return;let t=this.popupRect.width/2,e=this.handleMoveX-this.boundsRect.left,s=this.handleMoveX-this.handleRect.left;if(e<t){let e=null!=this.boundsRect?this.handleRect.left-this.boundsRect.left:0,i=Math.abs(t-e);this.state.popup.position=i+"px",this.state.popup.bounds.offset=s-i+"px";}else if(null!=this.boundsRect&&e+t>this.boundsRect.width){let e=this.boundsRect.left-this.handleRect.left,i=this.boundsRect.width-this.handleRect.width,a=this.boundsRect.width-(e+i)-t;this.state.popup.position=a+"px",this.state.popup.bounds.offset=s-a+"px";}else this.state.popup.bounds.offset="0px";}updatePopupSizes(){if(null!=this.handleElement){let t=null;t=this.handleElement.getBoundingClientRect(),this.handleRect=t;}if(null!=this.boundsElement){let t=null;t=this.boundsElement.getBoundingClientRect(),this.boundsRect=t;}if(null!=this.popupElement){let t=null;t=this.popupElement.getBoundingClientRect(),this.popupRect=t;}}calculateProgressTime(){if(null==this.handleMoveX||null==this.handleRect)return 0;let t=0|this.handleRect.left,e=0|this.handleRect.width,s=(this.handleMoveX-t)/e*this.duration;return s>this.duration&&(s=0|this.duration),s<0&&(s=0),s}}tt.__name__="bs.player.plugin.skin.model.progress.ProgressModel",tt.__super__=F,Object.assign(tt.prototype,{__class__:tt});class et extends L{constructor(t,e,s,i){let a;if(super(t,e,s,i),Object.prototype.hasOwnProperty.call(e,"qualitySelectionEnabled"))switch(o.field(e,"qualitySelectionEnabled")){case 1:case"true":case!0:a=!0;break;default:a=!1;}else a=!1;this.enabled=a,this.state={hasItems:!1,activate:null},this.enabled&&(this.state.activate=Gt(this,this.activate)),this.enabled&&(m.add(t,"videoQualityData",Gt(this,this.onQualityData)),m.add(t,"videoQualityPlaybackLevelChange",Gt(this,this.onQualityPlaybackLevelChange)),p.add(t,"videoQualityHasChanged",Gt(this,this.onQualityChange))),this.refreshCallback(this.state);}destroy(){super.destroy(),this.enabled&&(m.remove(this.context,"videoQualityData",Gt(this,this.onQualityData)),m.remove(this.context,"videoQualityPlaybackLevelChange",Gt(this,this.onQualityPlaybackLevelChange)),p.remove(this.context,"videoQualityHasChanged",Gt(this,this.onQualityChange)));}dispatch(t){let e=new p("requestVideoQualityChange");e.data=t.data,e.dispatch(this.context);}activate(t){if(0==this.enabled)return;null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault());let e=h.parseInt(Ht.__cast(t.target,HTMLElement).getAttribute("data-item-index"));isNaN(e)||this.dispatch(this.state.items[e]);}onQualityPlaybackLevelChange(t){}onQualityData(t){let e=t.data;this.items=[];let s=0;for(;s<e.length;){let t=e[s];++s,t.label=Lt.capilizeFirstLetter(t.label),this.items.push(t);}0!=this.enabled&&(this.updateStateItems(),this.refreshCallback(this.state));}updateStateItems(){this.state.hasItems=null!=this.items&&this.items.length>0,this.state.hasItems&&(this.state.items=this.items);}updateActiveQuality(){if(!this.state.hasItems||null==this.activeQualityData)return;let t=0,e=this.state.items;for(;t<e.length;){let s=e[t];++t,s.active=o.field(s,"data")==this.activeQualityData;}}onQualityChange(t){this.activeQualityData=t.data,0!=this.enabled&&(this.updateActiveQuality(),this.refreshCallback(this.state));}}et.__name__="bs.player.plugin.skin.model.quality.QualityModel",et.__super__=L,Object.assign(et.prototype,{__class__:et});class st extends L{constructor(t,e,s,i){super(t,e,s,i);let a,l=this;if(this.openEmbedCodeWindow=function(s){null!=s&&(s.stopImmediatePropagation(),s.stopPropagation(),s.preventDefault()),l.beforeEmbedWindowOpen(),mt.showWindow(t,e,Gt(l,l.afterEmbedWindowClose));},Object.prototype.hasOwnProperty.call(e,"shareButtons")){let t=o.field(e,"shareButtons");a=null!=t&&"string"==typeof t&&""!=u.trim(t)?t.toLowerCase():null;}else a=null;this.shareButtons=a,this.parse();}openEmbedCodeWindow(t){}destroy(){super.destroy();}parse(){this.state=null,this.containButton("embed")&&(null==this.state&&(this.state={}),this.state.embed={click:Gt(this,this.openEmbedCodeWindow)}),this.containButton("mail")&&(null==this.state&&(this.state={}),this.state.email={click:function(t){null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault()),_t.shareViaMail(t);}}),this.containButton("facebook")&&(null==this.state&&(this.state={}),this.state.facebook={click:function(t){null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault()),_t.shareOnFacebook(t);}}),this.containButton("twitter")&&(null==this.state&&(this.state={}),this.state.twitter={click:function(t){null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault()),_t.shareOnTwitter(t);}}),this.containButton("linkedin")&&(null==this.state&&(this.state={}),this.state.linkedin={click:function(t){null!=t&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault()),_t.shareOnLinkedIn(t);}}),this.refreshCallback(this.state);}beforeEmbedWindowOpen(){}afterEmbedWindowClose(){}containButton(t){let e=!1;return null!=this.shareButtons&&"string"==typeof this.shareButtons&&(e=this.shareButtons.indexOf(it.toString(t))>-1),e}}st.__name__="bs.player.plugin.skin.model.share.ShareModel",st.__super__=L,Object.assign(st.prototype,{__class__:st});class it{static toString(t){switch(t){case"embed":return "embed";case"facebook":return "facebook";case"linkedin":return "linkedin";case"mail":return "mail";case"twitter":return "twitter";default:return null}}}class at extends L{constructor(t,e,s,i,a,l){L._hx_skip_constructor=!0,super(),L._hx_skip_constructor=!1,this._hx_constructor(t,e,s,i,a,l);}_hx_constructor(t,e,s,i,a,l){this.resizeObserver=null,this.BREAKPOINT_PX=[0,320,576,768,992,1200,1400],this.BREAKPOINT_KEYS=["xxs","xs","sm","md","lg","xl","xxl"],this.BREAKPOINT_LENGTH=7,super._hx_constructor(t,e,s,i),this.observeElement=l,this.cssPrefix=a,this.state={width:NaN,height:NaN,css:"",is:{xxs:!0,xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1},not:{xxs:!1,xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}};let n=this.observeElement.ownerDocument;"complete"==n.readyState?this.onReady():n.addEventListener("readystatechange",Gt(this,this.onReady));}set_prefix(t){return this.cssPrefix=t,this.state.css=this.formatSizeCss(),this.updateElementSizeCss(),this.refreshCallback(this.state),this.cssPrefix}destroy(){super.destroy(),this.observeElement.ownerDocument.removeEventListener("readystatechange",Gt(this,this.onReady)),null!=this.resizeObserver&&this.resizeObserver.disconnect(),null!=this.timer&&this.timer.stop();}onReady(t){this.observeElement.ownerDocument.removeEventListener("readystatechange",Gt(this,this.onReady)),this.observe();}observe(){let t=window;if(Object.prototype.hasOwnProperty.call(t,"ResizeObserver"))return this.resizeObserver=new ResizeObserver(Gt(this,this.onResizeObserver)),void this.resizeObserver.observe(this.observeElement);let e=this,s=function(){let t=null;t=e.observeElement.getBoundingClientRect();let s=t;e.updateSize(s.width,s.height);};s(),this.timer=new Vt(500),this.timer.run=s;}onResizeObserver(t){let e=NaN,s=NaN,i=0;for(;i<t.length;){let a=t[i];if(++i,a.contentRect)e=a.contentRect.width,s=a.contentRect.height;else if(a.contentBoxSize){let t=a.contentBoxSize instanceof Array?a.contentBoxSize[0]:a.contentBoxSize;e=t.inlineSize,s=t.blockSize;}}let a=e,l=s;a<1||l<1||this.updateSize(a,l);}updateSize(t,e){let s=!1;if(this.state.width!=t&&(this.state.width=t,s=!0),this.state.height!=e&&(this.state.height=e,s=!0),s){this.state.css=this.formatSizeCss(),this.updateElementSizeCss(),this.refreshCallback(this.state);let t=new b("resize");t.data=this.state,t.dispatch(this.context);}}formatSizeCss(){let t="",e=this.cssPrefix+"-"+this.BREAKPOINT_KEYS[0],s=NaN,i=0,a=this.BREAKPOINT_LENGTH;for(;i<a;){let a=i++;t=this.BREAKPOINT_KEYS[a],s=this.BREAKPOINT_PX[a],s<this.state.width?(this.state.is[t]=!0,this.state.not[t]=!1,e+=" "+this.cssPrefix+"-"+t):(this.state.is[t]=!1,this.state.not[t]=!0);}return e}updateElementSizeCss(){let t="",e=!1,s=0,i=this.BREAKPOINT_LENGTH;for(;s<i;)t=this.cssPrefix+"-"+this.BREAKPOINT_KEYS[s++],e=this.observeElement.classList.contains(t),this.state.css.indexOf(t)>-1?e||this.observeElement.classList.add(t):e&&this.observeElement.classList.remove(t);}}at.__name__="bs.player.plugin.skin.model.size.SizeModel",at.__super__=L,Object.assign(at.prototype,{__class__:at});class lt extends F{constructor(t,e,s,i){L._hx_skip_constructor=!0,super(),L._hx_skip_constructor=!1,this._hx_constructor(t,e,s,i);}_hx_constructor(t,e,s,i){let a;if(this.hasShareButtons=!1,super._hx_constructor(t,e,s,i),this.state={show:{start:!1,state:!1,end:!1},start:{type:"image"},state:{type:"standard"},end:{type:"standard",playNext:null}},this.state.end.playNext=Gt(this,this.playNext),Object.prototype.hasOwnProperty.call(e,"shareButtons")){let t=o.field(e,"shareButtons");a=null!=t&&"string"==typeof t&&""!=u.trim(t)?t.toLowerCase():null;}else a=null;this.hasShareButtons=null!=a,this.parseVars(e),m.add(t,"mediaPlaylistData",Gt(this,this.onPlaylistData)),this.updateState();}destroy(){super.destroy(),m.remove(this.context,"mediaPlaylistData",Gt(this,this.onPlaylistData)),this.cleanEndState();}parseVars(t){let e=null;Object.prototype.hasOwnProperty.call(t,"startSplash")&&(e=o.field(t,"startSplash")),null!=e&&(this.state.start.type="image");let s=null;Object.prototype.hasOwnProperty.call(t,"endSplash")&&(s=o.field(t,"endSplash"));let i=s;if(null!=i)if(null==i)this.state.end.type="standard";else switch(i){case"countdown":this.state.end.type="countdown";break;case"share":case"social":this.state.end.type=this.hasShareButtons?"share":"standard";break;case"tiles":this.state.end.type="tiles";break;default:this.state.end.type="standard";}}updateState(t){super.updateState(t);let e=!(this.isComplete||this.isSeeking||this.isBuffering||this.duration>1&&!(this.currentTime<this.duration));this.state.show.start=e&&!this.isPlaying&&this.currentTime<1&&null!=this.state.start.image&&null!=this.state.start.image.url,this.state.show.state=this.isInited&&e,this.state.show.end=this.currentTime>0&&this.duration>0&&this.currentTime>=this.duration-1&&!this.isPlaying&&this.isComplete&&!this.isSeeking&&!this.isBuffering,this.refreshCallback(this.state);}onMetadataData(t){this.cleanEndState();let e=this.monitor.currentMedia;null!=e&&null!=e.splashImages&&e.splashImages.length>0?this.state.start.image=bt.imageToState(e.splashImages):o.deleteField(this.state,"image"),super.onMetadataData(t),this.checkEndStateThankYouImage();}cleanEndState(){null!=this.tiles&&this.tiles.destroy(),this.tiles=null,null!=this.countdown&&this.countdown.destroy(),this.countdown=null,o.deleteField(this.state.end,"nextMedia"),o.deleteField(this.state.end,"standard"),o.deleteField(this.state.end,"countdown"),o.deleteField(this.state.end,"tiles"),o.deleteField(this.state.end,"share"),o.deleteField(this.state.end,"image");}refreshEndState(){let t=null!=this.mediaPlaylist&&this.mediaPlaylist.hasNext();this.cleanEndState();let e=this;switch(this.state.end.type){case"countdown":t?(this.updateNextMediaState(),this.countdown=new nt(this.context,null,(function(t,s){e.state.end.countdown=t,e.updateState();}),Gt(this,this.reportError),Gt(this,this.playNext))):(this.updateNextMediaState(),this.initStandardEndsplash());break;case"image":this.updateNextMediaState(),this.checkEndStateThankYouImage();break;case"reload":case"standard":default:this.updateNextMediaState(),this.initStandardEndsplash();break;case"share":case"social":this.initShareEndsplash();break;case"tiles":t?this.tiles=new rt(this.context,null,(function(t,s){e.state.end.tiles=t,e.updateState();}),Gt(this,this.reportError),this.mediaPlaylist.items.length):(this.updateNextMediaState(),this.initStandardEndsplash());}}updateNextMediaState(){if(this.mediaPlaylist.hasNext()){let t=this.mediaPlaylist.items[this.mediaPlaylist.currentPos+1],e={};null!=t.title&&(e.title=t.title),null!=t.splashImages&&t.splashImages.length>0&&(e.image=bt.imageToState(t.splashImages)),null!=t.duration&&(e.duration={time:t.duration,text:Lt.formatTime(t.duration)}),o.fields(e).length>0?this.state.end.nextMedia=e:o.deleteField(this.state.end,"nextMedia");}else o.deleteField(this.state.end,"nextMedia");}onPlaying(t){if(this.isLiveStream){let t=this.monitor.currentMedia.streamWaitingForTransmissionImageUrl;if(null!=t&&""!=t){let e=new S;e.url=t,this.state.state.image=bt.imageToState([e]),this.state.state.type="image";}}super.onPlaying(t);}onCurrentTimeChange(t){"standard"!=this.state.state.type&&(o.deleteField(this.state.state,"image"),this.state.state.type="standard"),super.onCurrentTimeChange(t);}onComplete(t){this.refreshEndState(),super.onComplete(t);}onPlaylistData(t){this.mediaPlaylist=E.clone(t.data);}playNext(t){let e=null!=this.mediaPlaylist&&this.mediaPlaylist.hasNext()?this.mediaPlaylist.next():null;null==e||null==e.mediaLandingPage||""==e.mediaLandingPage?J.play(this.context,e,this.mediaPlaylist):window.open(e.mediaLandingPage,"_self");}initStandardEndsplash(){this.state.end.standard={replay:!0};}initShareEndsplash(){this.state.end.share={show:!0};}checkEndStateThankYouImage(){if(this.isLiveStream){let t=this.monitor.currentMedia.streamEndThankYouImageUrl;if(null!=t&&""!=t){let e=new S;e.url=t,this.state.end.image=bt.imageToState([e]),this.state.end.type="image",this.updateState();}}}}lt.__name__="bs.player.plugin.skin.model.splash.SplashModel",lt.__super__=F,Object.assign(lt.prototype,{__class__:lt});class nt extends L{constructor(t,e,s,i,a){L._hx_skip_constructor=!0,super(),L._hx_skip_constructor=!1,this._hx_constructor(t,e,s,i,a);}_hx_constructor(t,e,s,i,a){this.counter=10,super._hx_constructor(t,e,s,i),this.onComplete=a,this.state={timer:10},this.refreshCallback(this.state),this.stopCountdown(),this.timer=new Vt(1e3),this.timer.run=Gt(this,this.onCountdown);}destroy(){super.destroy(),null!=this.timer&&this.timer.stop();}onCountdown(){this.counter--,this.state.timer=this.counter,this.refreshCallback(this.state),this.counter>0||this.handleCoundown();}stopCountdown(){this.counter=10,null!=this.timer&&this.timer.stop(),this.timer=null;}handleCoundown(t){this.stopCountdown(),this.onComplete(t);}}nt.__name__="bs.player.plugin.skin.model.splash.end.SplashEndCountdownModel",nt.__super__=L,Object.assign(nt.prototype,{__class__:nt});class rt extends L{constructor(t,e,s,i,a){L._hx_skip_constructor=!0,super(),L._hx_skip_constructor=!1,this._hx_constructor(t,e,s,i,a);}_hx_constructor(t,e,s,i,a){this.tileHeight=0,this.tileWidth=0,this.gridHeight=0,this.gridWidth=0,this.maxTilesCount=0,this.rafId=0,super._hx_constructor(t,e,s,i),this.mediaPlaylistCount=a,this.maxTilesCount=0|Math.max(1,Math.min(12,a)),this.state={count:1,grid:{columns:1,rows:1,ctrl:null},playlist:{from:0,to:1},page:{current:1,total:1,next:null,prev:null}},this.state.count=a,this.state.grid.ctrl=Gt(this,this.gridCtrl),this.state.page.next=Gt(this,this.nextPage),this.state.page.prev=Gt(this,this.prevPage),b.add(t,"resize",Gt(this,this.onResize)),this.refreshCallback(this.state);}destroy(){super.destroy(),b.remove(this.context,"resize",Gt(this,this.onResize)),this.cleanupTilesGrid();}onResize(t){this.setupTilesGrid();}nextPage(t){this.state.page.current!=this.state.page.total&&(this.state.page.current++,this.updateEndTilesGridPlaylist(),this.refreshCallback(this.state));}prevPage(t){1!=this.state.page.current&&(this.state.page.current--,this.updateEndTilesGridPlaylist(),this.refreshCallback(this.state));}gridCtrl(t){this.gridElement=t,this.tileElement=null!=this.gridElement&&null!=this.gridElement.firstElementChild?this.gridElement.firstElementChild:null,this.cleanupTilesGrid();let e=Gt(this,this.setupTilesGrid),s=-1;s=window.requestAnimationFrame((function(t){e();})),this.rafId=s,this.timer=new Vt(250),this.timer.run=Gt(this,this.setupTilesGrid);}updateEndTilesGridPlaylist(){let t=this.state.grid.columns*this.state.grid.rows,e=this.state.page.current;this.state.playlist.from=t*(e-1),this.state.playlist.to=t*e-1;}cleanupTilesGrid(){if(null!=this.rafId){let t=this.rafId;null==t||isNaN(t)||window.cancelAnimationFrame(t);}this.rafId=null,null!=this.timer&&this.timer.stop(),this.timer=null;}setupTilesGrid(){if(this.cleanupTilesGrid(),null==this.gridElement||null==this.gridElement.firstElementChild)return;let t=this.gridElement.style.maxWidth;this.gridElement.style.maxWidth="unset";let e=null;e=this.gridElement.getBoundingClientRect();let s=e,i=null;i=this.gridElement.firstElementChild.getBoundingClientRect();let a=i;if(this.gridElement.style.maxWidth=t,this.gridWidth==s.width&&this.gridHeight==s.height&&this.tileWidth==a.width&&this.tileHeight==a.height)return;this.gridWidth=s.width,this.gridHeight=s.height,this.tileWidth=a.width,this.tileHeight=a.height;let l=Math.floor(Math.max(1,Math.min(Math.min(4,this.maxTilesCount),this.gridWidth/(this.tileWidth+2)))),n=Math.floor(Math.max(1,Math.min(3,this.gridHeight/this.tileHeight)));this.state.page.current=1,this.state.page.total=Math.ceil(this.mediaPlaylistCount/(l*n)),this.state.grid.columns=l,this.state.grid.rows=n,this.updateEndTilesGridPlaylist(),this.gridElement.style.maxWidth=Math.ceil((this.tileWidth+2)*l)+"px",this.refreshCallback(this.state);}}rt.__name__="bs.player.plugin.skin.model.splash.end.SplashEndTilesModel",rt.__super__=L,Object.assign(rt.prototype,{__class__:rt});class ot extends L{constructor(t,e,s,i){L._hx_skip_constructor=!0,super(),L._hx_skip_constructor=!1,this._hx_constructor(t,e,s,i);}_hx_constructor(t,e,s,i){this.subtitlesSets=[],super._hx_constructor(t,e,s,i);let a=null;Object.prototype.hasOwnProperty.call(e,"subtitles")&&(a=o.field(e,"subtitles"));let l=!1,n=null;if(n=$t.getSessionStorage(),l=null!=n,l){let t,e=null,s=!1,i=null;if(i=$t.getSessionStorage(),s=null!=i,s){try{let t,s=null,i=!1,a=null;if(a=$t.getSessionStorage() |