;OATH = window.OATH || {};OATH.VideoPlatform = OATH.VideoPlatform || {};OATH.VideoPlatform.PlayerHosting = {"app":"omega","bucket":null,"colo":"sg3","dbColo":"ap-southeast-1","env":"prod","ver":"8.3.15","config":null,"expiry":600,"req":{"ypv":null,"path":"/p/oath/js/1/dummy.mp4","usm":{"bucket":null,"config":null}},"type":"oath-player-desktop.js","g":[],"gv":2,"lang":"en-us"};

/*! For license information please see oath-player-desktop.js.LICENSE.txt */
(function(){var __webpack_modules__={3661:function(t,i,n){"use strict";var e=n(6837);function r(t,i){var n=this;n._=[],n.length=0,n._t=t||Uint8Array,i&&n.set(i)}t.exports=r,r.prototype.destroy=function(){this._=[],this.length=0},r.prototype.set=function(t){var i=this;i._.push(t),i.length=i.length+t.length},r.prototype.get=function(t){var i=this;if(e.isNullOrUndefined(t)||t<0||t>i.length)throw new Error("[DataManager] Array position out of bounds");for(var n=0,r=0,s=null,o=0;o<i._.length;o++){var u=i._[o];if(t<(n+=u.length)){s=u[t-r];break}r+=u.length}return s},r.prototype.subArray=function(t,i){var n=this;if((e.isNullOrUndefined(i)||i>n.length)&&(i=n.length),e.isNullOrUndefined(t)&&(t=0),t>=i)return new n._t(0);for(var r=i-t,s=new n._t(r),o=0,u=0,h=0,a=0;a<n._.length;a++){var c=n._[a];if(h+=c.length,o>0){if(i<=h){s.set(c.subarray(0,r-o),o);break}s.set(c.subarray(0),o),o+=c.length}else{if(t<h&&i<=h){s=c.subarray(t-u,i-u);break}if(t<h){var f=t-u;s.set(c.subarray(f)),o=c.length-f}}u+=c.length}return s}},2999:function(t){"use strict";function i(t){var i=this;i.name=t||"unnamed",i._i={},i.qi=0}t.exports=i,i.prototype.addEventListener=function(t,i,n){var e=this;if(e._i){e._i[t]||(e._i[t]={});var r=t+"_"+ ++e.qi;return e._i[t][r]={subscriber:n,cb:i},r}},i.prototype.removeEventListener=function(t,i){var n=this;n._i&&t in n._i&&n._i[t].hasOwnProperty(i)&&delete n._i[t][i]},i.prototype.removeEventListeners=function(t){var i=this;i._i&&t&&Object.keys(t).forEach((function(n){var e=t[n];n in i._i&&i._i[n].hasOwnProperty(e)&&(delete i._i[n][e],delete t[n])}))},i.prototype.publish=function(t){var i=this;if(i._i&&t in i._i){var n=i._i[t],e=arguments;Object.keys(n).forEach((function(t){var i=n[t];if(i)try{i.cb&&"function"==typeof i.cb&&i.cb.apply(i.subscriber,Array.prototype.slice.call(e,1))}catch(t){}}))}},i.prototype.destroy=function(){this._i=null}},2990:function(t){"use strict";var i=t.exports={};i.inherits=function(t,i){t.super_=i,t.prototype=Object.create(i.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})},i.guid=function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()},i.base64ToBuffer=function(t){return new Uint8Array(atob(t).split("").map((function(t){return t.charCodeAt(0)})))},i.arrayToUint8Array=function(t){for(var i=t.length,n=new Uint8Array(i),e=new DataView(n.buffer),r=0;r<i;r++)e.setUint8(r,t[r]);return n},i.isDrmItemContained=function(t,i){if(!t||!i||0===i.length)return!1;for(var n=0;n<i.length;n++)if(t.widevine.pssh===i[n].widevine.pssh)return!0;return!1},i.isAbsoluteUrl=function(t){return 0===t.indexOf("http")},i.isUplynk=function(t){return!(!t||!t.length)&&((t=t.toLowerCase()).indexOf("uplynk.com")>-1||t.indexOf("downlynk.com")>-1||t.indexOf("uplynk.localhost")>-1||t.indexOf("downlynk.localhost")>-1)},i.isWithCreds=function(t){return t&&t.length&&i.isUplynk(t)&&t.indexOf("expand=finance")>-1}},6837:function(t,i){i.isArray=function(t){return Array.isArray(t)},i.isBoolean=function(t){return"boolean"==typeof t},i.isNullOrUndefined=function(t){return null==t},i.isNumber=function(t){return"number"==typeof t&&!isNaN(t)},i.isString=function(t){return"string"==typeof t},i.isObject=function(t){return"[object Object]"===(i=t,Object.prototype.toString.call(i));var i},i.isFunction=function(t){return"function"==typeof t},i.deepCopy=function(t){var n={};return i.isNullOrUndefined(t)?t:(Object.keys(t).forEach((function(e){i.isArray(t[e])?n[e]=t[e].slice():i.isObject(t[e])?n[e]=i.deepCopy(t[e]):n[e]=t[e]})),n)}},2576:function(t,i){"use strict";function n(){var t=this;try{t._n=t.getWindow()}catch(i){t._n=null}t._e=!1,t._n&&t._n.performance&&"function"==typeof t._n.performance.clearResourceTimings&&"function"==typeof t._n.performance.getEntriesByName&&(t._e=!0,t._n.performance.onresourcetimingbufferfull=t._r.bind(t))}t.exports=n,i.entryTypes=["mark","measure","navigation","frame","resource","server"],n.prototype.getWindow=function(){return window},n.prototype._r=function(){this._e&&this._n.performance.clearResourceTimings()},n.prototype.getPerformanceTiming=function(t,n,e){var r,s=this,o={};if(!t||!n&&!e)return null;if(e&&i.entryTypes.indexOf(e)<0)return null;if(!s._e)return null;if(!(r=n?s._n.performance.getEntriesByName(n,e||void 0):s._n.performance.getEntriesByType(e))||!r.length)return null;var u=r[r.length-1];return t.forEach((function(t){o[t]=u[t]})),o},n.prototype.destroy=function(){var t=this;t._e&&t._n&&(t._n.performance.onresourcetimingbufferfull=null),t._n=null,t._e=!1}},729:function(t){"use strict";function i(){var t=this;t.LOCALSTORAGE_PREFIX="com.yahoo.yep",t._s=t.do()}t.exports=i,i.prototype.do=function(){try{return"localStorage"in window&&null!==window.localStorage}catch(t){return!1}},i.prototype.writeProperty=function(t,i){this._s&&(i=JSON.stringify(i),t=this.LOCALSTORAGE_PREFIX+"."+t,window.localStorage.setItem(t,i))},i.prototype.readProperty=function(t){if(!t||!t.length)return null;if(this._s){t=this.LOCALSTORAGE_PREFIX+"."+t;var i=JSON.parse(window.localStorage.getItem(t));return i||null}return null}},2849:function(t,i,n){"use strict";var e=n(3576);i.apply=function(){r()};var r=function(){function t(t,i){i=i||{bubbles:!1,cancelable:!1,detail:void 0};var n=window.document.createEvent("CustomEvent");return n.initCustomEvent(t,i.bubbles,i.cancelable,i.detail),n}!e.ie&&window.CustomEvent||(t.prototype=window.Event.prototype,window.CustomEvent=t)}},902:function(t,i,n){"use strict";t.exports=r;var e=n(2999);function r(t,i){var n=this;if(!t||isNaN(t))throw new Error("Invalid Argument: No delay");e.call(n,n.constructor.name),n.delay=Math.max(t,20),n.repeatCount=i>0?i:Number.POSITIVE_INFINITY,n.currentCount=0,n.running=!1,n.startTime=0,n._o=null,n._u={},n._h={}}n(2990).inherits(r,e),r.prototype.destroy=function(){var t=this;t.reset(),t._u={},e.prototype.removeEventListeners.call(t,t._h),e.prototype.destroy.call(t)},r.prototype.addEventListener=function(t,i){if(!i)throw new Error("Invalid Argument: No context");var n=e.prototype.addEventListener.call(this,"timedOut",t,i);this._h.timedOut=n},r.prototype.removeEventListener=function(t,i){if(!i)throw new Error("Invalid Argument: No context");e.removeEventListeners(this._h)},r.prototype.start=function(){var t=this;t._o||t.running||(t._o=setInterval((function(){t.currentCount++,t.currentCount>=t.repeatCount&&t.stop(),t.publish("timedOut"),t.startTime=Date.now()}),t.delay),t.startTime=Date.now(),t.running=!0)},r.prototype.stop=function(){var t=this;t._o&&t.running&&(clearInterval(t._o),t._o=null,t.running=!1,t.startTime=0)},r.prototype.reset=function(){var t=this;t.stop(),t.currentCount=0,t.startTime=0}},3576:function(t,i,n){"use strict";t.exports=n(3093).userAgent},3093:function(t,i,n){"use strict";t.exports={userAgent:n(7870),capabilities:n(895)}},895:function(t,i,n){"use strict";var e=n(7870),r={wifi:!0,broadband:!0,dsl:!0,cable:!0};function s(){if("undefined"!=typeof navigator)return(navigator&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection)||{}).type}function o(){if(!e.mobile)return!0;var t=e.android&&e.chrome>=50,i=e.ios&&!e.iosWebView&&e.safari>=10;return t||i}t.exports={getConnectionType:s,isAutoplaySupported:o,isAutoplayAllowed:function(t){return!e.mobile||!(!(t=(s()||t||"").replace(/^cs_/i,"").toLowerCase())||!r[t])&&o()}}},7870:function(t,i){"use strict";var n="undefined"!=typeof navigator?navigator.userAgent.toLowerCase().replace(/<[A-Za-z]+.*?(\/>|>.*?<\/[A-Za-z]+>)|javascript:/g,""):"",e="undefined"!=typeof window?window:{},r=function(t){if(null===t)return!1;var i=t[1];return parseFloat(i.replace("_",".").split(".",2).join("."))||1},s=function(t){for(var i=(e&&e.location&&e.location.search&&e.location.search.substring(1)||"").split("&"),n=0;n<i.length;n++){var r=i[n].split("=");if(decodeURIComponent(r[0])===t)return decodeURIComponent(r[1])}return null};if(i.ua=n,i.chromium=r(/chromium\/([^\s]*)/.exec(n)),i.edge=r(/edge\/([^\s]*)/.exec(n)),i.opera=/opr\/|opera\//.test(n),i.chrome=!i.chromium&&!i.edge&&!i.opera&&(r(/chrome\/([^\s]*)/.exec(n))||r(/crios\/([^\s]*)/.exec(n))),i.ie=r(/msie ([^;]*)/.exec(n))||r(/trident.*; rv:([0-9.]+)/.exec(n)),i.firefox=!i.ie&&r(/firefox\/([^\s]*)/.exec(n)),i.android=/android/.test(n),i.androidTablet=i.android&&!/mobile/.test(n),i.htc_one=/htc_one/.test(n),i.vizio=/Vizio/i.test(n)||"vizio"===s("man"),i.tivo=/TiVo/i.test(n),i.fios=/Verizon_STB|\(Verizon.*VMS1100|\(Verizon.*IPC1100|\(Verizon.*IPC3200/i.test(n),i.firetv=i.android&&/amazonwebappplatform/.test(n)&&/aft/.test(n),i.lg=/web0s/.test(n),i.tizen=/tizen/.test(n),i.orsay=/smarttv/.test(n)&&!i.tizen&&!i.lg,i.samsung=i.orsay||i.tizen,i.sony=/(sony)/.test(n),i.ps4=/(playstation 4)/.test(n),i.ios=/(ipad|iphone|ipod)/.test(n),i.iphone=/(iphone|ipod)/.test(n)&&!/ipad/.test(n),i.ipad=i.ios&&!i.iphone,i.androidBrowser=!i.chrome&&/android/.test(n),i.androidVersion=r(/android\s([0-9.]*)/.exec(n)),i.safari=!i.chrome&&!i.chromium&&!i.android&&/safari\/([^\s]*)/.test(n)&&r(/version\/([^\s]*)/.exec(n)),i.iosWebView=i.ios&&!navigator.standalone&&!i.safari,i.iosVersion=i.ios&&r(/\bos ((\d+_?){2,3})\s/.exec(n)),i.mobile=i.ios||i.android&&!i.firetv,i.safariDesktop=!i.mobile&&i.safari,i.tv=i.vizio||i.tivo||i.firetv||i.samsung||i.sony||i.ps4||i.lg||i.fios,i.desktop=!i.mobile&&!i.tv,i.phantomJS=e.window&&e.window._a,i.tv)if(i.vizio)i.os="vizio",i.model=s("class")||s("soc");else if(i.tivo)i.os="tivo",/tcd849/.test(n)?(i.model="series6",i.version="tcd849"):/tcd8d9/.test(n)?(i.model="series6",i.version="tcd8d9"):/tcd8f9/.test(n)?(i.model="series6",i.version="tcd8f9"):/tcd8/.test(n)?(i.model="series5",i.version="tcd8"):/tcdd/.test(n)?(i.model="series5",i.version="tcdd"):i.model="series4";else if(i.firetv)i.os="firetv",/aftb/.test(n)?i.model="aftb":/afts/.test(n)?i.model="afts":(/aftm/.test(n),i.model="aftm");else if(i.lg)i.os="lg",i.model="lg";else if(i.samsung){i.os="samsung";var o=void 0!==o?o:window.tizen;o&&o.systeminfo?(i.model="tizen",i.version=o.systeminfo.getCapability("http://tizen.org/feature/platform.version")):i.model="orsay"}else i.sony?(i.os="sony",/bdp/.test(n)?i.model="bdp":i.model="tv"):i.ps4?(i.os="ps4",i.model="4"):i.fios?i.os="fios":i.os=null;else i.ios?i.os="ios":i.android?i.os="android":/windows|win32/.test(n)?(i.os="windows",i.winXP=/(windows nt 5\.[1-3])/.test(n),i.winVista=/(windows nt 6\.0)/.test(n),i.win7=/(windows nt 6\.1)/.test(n),i.win8=/(windows nt 6\.2)/.test(n),i.win8_1=/(windows nt 6\.3)/.test(n),i.win10=/(windows nt 10\.0)/.test(n),i.win64=/(wow64|win64)/.test(n)):/macintosh|mac_powerpc/.test(n)?i.os="macintosh":/symbos/.test(n)?i.os="symbos":/linux/.test(n)?i.os="linux":i.os=null},1426:function(t,i,n){"use strict";t.exports=r;var e=n(4702);function r(){var t=this;t.gc=[],t.gc.push(new e.BandwidthRule),t.gc.push(new e.BufferRule),t.gc.push(new e.ResolutionRule)}r.prototype.destroy=function(){this.gc=[]},r.prototype.getNextStreamIndex=function(t,i){if(!e.validateAbrInput(t))return-1;if(i)return(new e.StartupRule).getNextStreamIndex(t);var n=Number.MAX_VALUE;return this.gc.forEach((function(i){var e=i.getNextStreamIndex(t);e<0||(n=Math.min(n,e))})),n===Number.MAX_VALUE?-1:n}},4702:function(t,i){"use strict";function n(){this.PIXEL_THRESHOLD_FACTOR=.5}function e(){var t=this;t.BANDWIDTH_FACTOR_LOW=1.3,t.BANDWIDTH_FACTOR_HIGH=1.6,t.MIN_BW_FOR_LOW_FACTOR=25e5,t.MIN_BUFFER_TO_SWITCH_DOWN=10}function r(){var t=this;t.BANDWIDTH_FACTOR_LOW=1.3,t.BANDWIDTH_FACTOR_HIGH=1.6,t.MIN_BW_FOR_LOW_FACTOR=25e5,t.MIN_BUFFER_TO_SWITCH_UP=6,t.MIN_LENGTH_DATA=2,t.ALLOWED_LOAD_TIME=500}function s(){var t=this;t.MAX_WIDTH_240P=427,t.MAX_HEIGHT_240P=240,t.MAX_BITRATE_240P=9e5,t.MAX_BITRATE_LIMIT=1e7,t.PIXEL_RATIO_360=6}t.exports.StartupRule=n,t.exports.BandwidthRule=e,t.exports.BufferRule=r,t.exports.ResolutionRule=s,i.validateAbrInput=function(t){return!(!t||"object"!=typeof t||!t.bitrateList||!t.bitrateList.length||"number"!=typeof t.estimatedBandwidthInBps||isNaN(t.estimatedBandwidthInBps)||void 0===t.currentIndex||null===t.currentIndex||isNaN(t.currentIndex)||void 0===t.bufferLength||isNaN(t.bufferLength)||void 0===t.displayWidth||isNaN(t.displayWidth)||t.displayWidth<=0||void 0===t.displayHeight||isNaN(t.displayHeight)||t.displayHeight<=0||void 0===t.streams||t.streams.length<=0)},n.prototype.getNextStreamIndex=function(t){if(!i.validateAbrInput(t))return-1;for(var n,e=t.displayWidth*t.displayHeight*this.PIXEL_THRESHOLD_FACTOR,r=t.streams.length-1;r>=0;r--){var s=t.streams[r].width*t.streams[r].height;if(!n&&s<e&&(n=s),n&&s<n)return r+1}return 0},e.prototype.getNextStreamIndex=function(t){if(!i.validateAbrInput(t))return-1;for(var n=0,e=t.estimatedBandwidthInBps||t.bwHistory,r=this._c(e),s=0;s<t.bitrateList.length&&!(e<r*t.bitrateList[s]);s++)n=s;return n<t.currentIndex&&t.bufferLength>this.MIN_BUFFER_TO_SWITCH_DOWN&&(n=t.currentIndex),n},e.prototype._c=function(t){var i=this;return t>=i.MIN_BW_FOR_LOW_FACTOR?i.BANDWIDTH_FACTOR_LOW:i.BANDWIDTH_FACTOR_HIGH},r.prototype.getNextStreamIndex=function(t){var n=this;if(!i.validateAbrInput(t))return-1;var e=t.segmentLength?Math.min(t.segmentLength,n.MIN_BUFFER_TO_SWITCH_UP):n.MIN_BUFFER_TO_SWITCH_UP;return 0===t.bufferLength?n._f(t):t.bufferLength<e?t.currentIndex:t.bitrateList.length-1},r.prototype._f=function(t){for(var i=this,n=0,e=t.estimatedBandwidthInBps||t.bwHistory,r=i._c(e),s=i.ALLOWED_LOAD_TIME/1e3,o=0;o<t.bitrateList.length&&!(r*t.bitrateList[o]*i.MIN_LENGTH_DATA/e>s);o++)n=o;return n},r.prototype._c=function(t){var i=this;return t>=i.MIN_BW_FOR_LOW_FACTOR?i.BANDWIDTH_FACTOR_LOW:i.BANDWIDTH_FACTOR_HIGH},s.prototype.getNextStreamIndex=function(t){var n=this;if(!i.validateAbrInput(t))return-1;var e=t.pixelRatio||n.getPixelRatio(t),r=t.displayWidth,s=t.displayHeight;!isNaN(e)&&e>1&&(r*=e,s*=e);for(var o=0,u=0;u<t.streams.length&&!(t.streams[u].width>r||t.streams[u].height>s);u++)o=u;var h=t.streams[o].width,a=t.streams[o].height,c=r<=n.MAX_WIDTH_240P||s<=n.MAX_HEIGHT_240P?n.MAX_BITRATE_240P:n.MAX_BITRATE_LIMIT;if((o=n._l(t,h,a,c))<t.streams.length-1&&t.bitrateList[o+1]<c){var f=t.streams[o+1].width,l=t.streams[o+1].height,v=t.streams[o].height;Math.abs(l-s)<=Math.abs(v-s)&&(o=n._l(t,f,l,c))}return o},s.prototype._l=function(t,i,n,e){var r=0;return t.streams.forEach((function(s,o){var u=t.bitrateList[o];s&&s.width===i&&s.height===n&&u<=e&&o>r&&u>t.bitrateList[r]&&(r=o)})),r},s.prototype.getPixelRatio=function(t){var i=1;try{window&&(i=window.devicePixelRatio)}catch(t){i=1}return i||(i=1),t.is360&&(i*=this.PIXEL_RATIO_360),i}},3799:function(t){"use strict";function i(t){var i=this;i.COLLECTION_INTERVAL=100,i.MIN_SAMPLE_SIZE=5e4,i.SAMPLE_QUEUE_LENGTH=40,i.INSTANCE_SAMPLE_QUEUE_LENGTH=15,i.BW_ADJUSTMENT_FACTOR=.8,i._v=[],i._d=[],i.averageBandwidth=t||0,i.instantaneousBandwidth=t||0}t.exports=i,i.prototype.destroy=function(){var t=this;t._v=[],t._d=[],t.averageBandwidth=0,t.instantaneousTotalBandwidth=0},i.prototype.addSample=function(t){var i=this;if(t&&!(t.time<=0)){i.dp(t);var n=0,e=i._v.length,r=e*(e+1)/2,s=1/r;i._v.forEach((function(t,i){n+=(i+1)*s*t.bandwidth})),i.averageBandwidth=i.BW_ADJUSTMENT_FACTOR*n,n=0,e=i._d.length,s=1/(r=e*(e+1)/2),i._d.forEach((function(t,i){n+=(i+1)*s*t.bandwidth})),i.instantaneousBandwidth=i.BW_ADJUSTMENT_FACTOR*n}},i.prototype.dp=function(t){var i=this;!t||t.time<=0||(t.bandwidth=t.size/t.time*.008,t.bandwidth=Math.min(60,t.bandwidth),i._v.push(t),i._d.push(t),i._v.length>i.SAMPLE_QUEUE_LENGTH&&i._v.shift(),i._d.length>i.INSTANCE_SAMPLE_QUEUE_LENGTH&&i._d.shift())},i.prototype.replaceSamples=function(t,i){var n=this,e=t&&i?t/i*.008:0;if(e>0){n.averageBandwidth=e,n._v=[];for(var r=Math.min(Math.ceil(i/n.COLLECTION_INTERVAL),n.SAMPLE_QUEUE_LENGTH),s=0;s<r;s++){var o={bandwidth:e};n._v.push(o)}}}},7027:function(t,i,n){"use strict";t.exports={Command:n(2701),MediaLoadCommand:n(7745),StreamLoadCommand:n(5867),LicenseLoadCommand:n(8158),SegmentLoadCommand:n(8913),Mp4InitSegmentLoadCommand:n(8893),SubtitleSegmentLoadCommand:n(558),ErrorHandleCommand:n(6219)}},1726:function(t,i,n){"use strict";var e=n(2701).CmdNames,r=n(7027);t.exports.create=function(t,i,n){for(var s in e){if(e.hasOwnProperty(s))if(e[s]===t)return new(0,r[t+"Command"])(i,n)}return null}},258:function(t,i,n){"use strict";t.exports=h;var e=n(2701),r=e.CmdEvents,s=e.CmdNames,o=n(1726),u=n(2990);function h(){var t=this;for(var i in t._p={},t._h={},s)s.hasOwnProperty(i)&&(t._p[s[i]]={})}h.prototype.destroy=function(){this.removeAllCommands(),this._p=null},h.prototype.executeCommand=function(t,i,n){i&&(i.controller=this.__controller);var e=this.createCommand(t,i,n);return e&&e.execute(),e},h.prototype.createCommand=function(t,i,n){var e;try{e=o.create(t,i,n)}catch(t){e=null}if(!e)return null;for(var s in e.key=u.guid(),r)if(r.hasOwnProperty(s)){var h=r[s],a="on"+t+h;n[a]&&(this._h[h+t+e.key]=e.addEventListener(h,n[a],n))}return this._p[t][e.key]=e,e},h.prototype.removeCommand=function(t){var i=this;if(t){var n=i._p[t.name];if(n[t.key]===t){if(delete n[t.key],t.client)for(var e in r)if(r.hasOwnProperty(e)){var s=r[e],o="on"+t.name+s;t.client[o]&&(t.removeEventListener(s,i._h[s+t.name+t.key]),delete i._h[s+t.name+t.key])}t.destroy()}}},h.prototype.removeRelatedCommands=function(t){var i=this;if(i._p.hasOwnProperty(t)){var n=i._p[t];for(var e in n)if(n.hasOwnProperty(e)){var r=n[e];r&&i.removeCommand(r)}}},h.prototype.removeAllCommands=function(){var t=this;for(var i in t._p)t._p.hasOwnProperty(i)&&t.removeRelatedCommands(i)},h.prototype.getCommand=function(t){var i=this._p[t];if(!i)return null;var n=Object.keys(i);return n.length<1?null:i[n[n.length-1]]}},2701:function(t,i,n){"use strict";t.exports.Command=s;var e=n(2999),r=n(2990);function s(t,i){var n=this;n.data=t,n.client=i,e.call(n,n.constructor.name)}t.exports.CmdNames={CMD_MEDIA_LOAD:"MediaLoad",CMD_STREAM_LOAD:"StreamLoad",CMD_LICENSE_LOAD:"LicenseLoad",CMD_SEGMENT_LOAD:"SegmentLoad",CMD_MP4_INIT_SEGMENT_LOAD:"Mp4InitSegmentLoad",CMD_SUBTITLE_SEGMENT_LOAD:"SubtitleSegmentLoad",CMD_ERROR_HANDLE:"ErrorHandle"},t.exports.CmdEvents={CMD_COMPLETE:"Complete",CMD_PROGRESS:"Progress",CMD_ERROR:"Error"},r.inherits(s,e),s.prototype.destroy=function(){this.data=null,e.prototype.destroy.call(this)},s.prototype.execute=function(){},s.prototype.cancel=function(){}},6219:function(t,i,n){"use strict";t.exports=l;var e=n(2990),r=n(2701),s=r.Command,o=r.CmdNames,u=r.CmdEvents,h=n(902),a=n(574).AbrModes,c=n(6837),f=n(7572);function l(t,i){var n=this;if(!t||c.isNullOrUndefined(t.streamIndex)||!t.controller)throw new Error("Invalid argument: data argument of the command is not complete");s.call(n,t,i),n.name=o.CMD_ERROR_HANDLE,n.__controller=n.data.controller,n._m=n.__controller.model,n.ERR_INTERVAL_AFTER_BUFFER_EMPTY=1e4,n._b=new h(n.ERR_INTERVAL_AFTER_BUFFER_EMPTY,1),n._b.addEventListener((function(){n._b.destroy(),n._g()}),n),n._y(t.streamIndex),n.Rw=-1}e.inherits(l,s),l.prototype.destroy=function(){var t=this;t._b&&t._b.destroy(),s.prototype.destroy.call(t)},l.prototype.execute=function(t){var i=this;if(!i._b.running||-1===i.Rw||t===i.Rw)if(i.data.error&&i.data.error.code===f.ERR_XHR_LOAD_FORBIDDEN[0])i._g();else{if(i._m.getABRMode()===a.AUTO){if(i.t_.length){var n=i.t_.shift();return i.publish(u.CMD_PROGRESS,i,{index:n}),void(i.Rw=n)}if(0!==i._m.currentLoadingStreamIndex)return i.publish(u.CMD_PROGRESS,i,{index:0}),void(i.Rw=0)}i._m.bufferLength>.15||i._b.start()}},l.prototype.cancel=function(){},l.prototype._y=function(t){var i=this;if(i.t_=[],!(t<0||t>=i._m.streams.length)){var n,e=t;for(n=e-1;n>=0;n--)i.t_.push(n);for(n=e+1;n<i._m.streams.length;n++)i.t_.push(n)}},l.prototype._g=function(){this.publish(u.CMD_ERROR,this)}},8158:function(t,i,n){"use strict";t.exports=a;var e=n(2990),r=n(4939).Events,s=n(2701),o=s.Command,u=s.CmdNames,h=s.CmdEvents;function a(t,i){var n=this;if(!t||!t.controller)throw new Error("Invalid argument: data argument of the command is not complete");o.call(n,t,i),n.i_=1,n.n_=[403],n.name=u.CMD_LICENSE_LOAD,n.e_=t.controller.services.getNewLoader(n.r_())}e.inherits(a,o),a.prototype.destroy=function(){this.e_.destroy(),o.prototype.destroy.call(this)},a.prototype.execute=function(){var t=this,i=t.data.url;t.e_.addEventListener(r.COMPLETE,(function(i){t.publish(h.CMD_COMPLETE,t,i)}),t),t.e_.addEventListener(r.ERROR,(function(i){t.publish(h.CMD_ERROR,t,i)}),t),t.e_.load(i,t.data.challenge)},a.prototype.cancel=function(){},a.prototype.r_=function(){var t=this;return{method:"POST",responseType:"arraybuffer",headerFields:t.data.headerFields,url:t.data.url,maxRetries:t.i_,retryExclusion:t.n_}}},7745:function(t,i,n){"use strict";t.exports=a;var e=n(2990),r=n(4939).Events,s=n(2701),o=s.Command,u=s.CmdNames,h=s.CmdEvents;function a(t,i){var n=this;if(!t||!t.url||!t.controller)throw new Error("Invalid argument: data argument of the command is not complete");o.call(n,t,i),n.name=u.CMD_MEDIA_LOAD,n.e_=t.controller.services.getNewLoader(t)}e.inherits(a,o),a.prototype.destroy=function(){this.e_.destroy(),o.prototype.destroy.call(this)},a.prototype.execute=function(){var t=this,i=t.data.url;t.e_.addEventListener(r.COMPLETE,(function(i){t.publish(h.CMD_COMPLETE,t,i)}),t),t.e_.addEventListener(r.ERROR,(function(i){t.publish(h.CMD_ERROR,t,i)}),t),t.e_.load(i)},a.prototype.cancel=function(){}},8893:function(t,i,n){"use strict";t.exports=h;var e=n(2990),r=n(2701),s=r.CmdNames,o=r.CmdEvents,u=n(8913);function h(t,i){var n=this;n.s_=t.stream,n.o_=[],n.u_=!!t.comboLoad,n.h_=t.initSegment,n.a_=t.segment,n.c_=t.cached,n.f_=n.constructor.super_.prototype,n.constructor.super_.call(n,t,i),n.l_=t.initSegment.url,n.name=s.CMD_MP4_INIT_SEGMENT_LOAD}e.inherits(h,u),h.prototype.destroy=function(){var t=this;t.o_=[],t.f_.destroy.call(t)},h.prototype.v_=function(t){if(!(t&&t.controller&&t.stream&&t.initSegment&&t.initSegment.url))throw new Error("Invalid argument: data argument of the command is not complete")},h.prototype.d_=function(){var t=this;if(t.o_.push(t.h_),t.u_){var i=t.s_.getMp4Chunk("sidx"),n=t.s_.getMp4Chunk("first");i&&t.o_.push(i),n&&t.a_&&t.o_.push(n)}},h.prototype.r_=function(){var t=this,i={responseType:"arraybuffer",isChunkedLoad:!0,minChunkSize:1e3,headerFields:{}};t.d_();var n=-1,e=-1;if(t.o_.length){var r=t.o_[0].range,s=t.o_[t.o_.length-1].range;r&&s&&(n=r.start,e=s.end)}if(n>=0&&e>=0&&(i.headerFields.Range="bytes="+n+"-"+e,t.p_=e-n+1),"atlas"===(t.s_.cdn||t.a_&&t.a_.cdn)){var o=t.s_.sessionId||t.a_&&t.a_.sessionId;i.headerFields.Accept="*/*; X-PB-SESSION-ID="+o}return i},h.prototype.m_=function(){var t=this;t.a_&&t.f_.m_.call(t)},h.prototype.b_=function(){var t=this;!t.u_&&t.c_&&t.h_.loaded?t.g_():t.f_.b_.call(t)},h.prototype.y_=function(t,i){var n=this;t&&(n.u_?n.w_(t,i):n.__(t,i))},h.prototype.w_=function(t,i){var n=this;if(t){var e=0,r=t.byteLength,s=t;i!==n.E_&&n.O_(i);for(var u=null,h=0;h<n.o_.length;h++){if(u=n.o_[h],!s)return;if(u.loaded||(e+=u.append(s),"first"===u.name&&n.A_&&n.A_.append(s),u.loaded&&"first"!==u.name&&n.publish(o.CMD_PROGRESS,n,{chunk:u,stream:n.s_,comboLoad:n.u_})),e>=r)return;if(e>0&&(s=t.subarray(e)),!u.loaded)return}}},h.prototype.__=function(t,i){var n=this;i!==n.E_?n.O_(i):n.A_.append(t)},h.prototype.g_=function(){var t=this;if(!t.u_){var i=t.o_[0];i&&(i.loaded=!0,t.publish(o.CMD_PROGRESS,t,{chunk:i,stream:t.s_,comboLoad:t.u_}),t.publish(o.CMD_COMPLETE,t,{stream:t.s_,comboLoad:t.u_}))}t.f_.g_.call(t)},h.prototype.S_=function(){var t=this;t.publish(o.CMD_COMPLETE,t,{stream:t.s_,comboLoad:t.u_})},h.prototype.T_=function(t,i){var n=this;if(t){if(!n.u_){var e=n.o_[0];return e&&!e.loaded&&e.append(t.data),void n.publish(o.CMD_PROGRESS,n,{chunk:e,stream:n.s_,comboLoad:n.u_})}t.stream=n.s_,t.chunk={name:"first"},n.f_.T_.call(n,t,i)}},h.prototype.I_=function(){return 0},h.prototype.getSegment=function(){return this.a_}},8913:function(t,i,n){"use strict";t.exports=d;var e=n(2990),r=n(4939).Events,s=n(4169),o=n(4641),u=n(2576),h=n(902),a=n(7650).HLSEvent,c=n(2701),f=c.Command,l=c.CmdNames,v=c.CmdEvents;function d(t,i){var n=this;n.v_(t),f.call(n,t,i),n.name=l.CMD_SEGMENT_LOAD,n.a_=t.segment,n.s_=t.stream,n.__controller=n.data.controller,n._m=n.__controller.model,n.l_=n.a_?n.a_.url:t.url,n.j_=n.a_?n.a_.streamIndex:t.stream.index,n.M_=n.a_?n.a_.encryptionData:null,n.N_=!1,n.k_=new u,n.E_=0,n.R_=null;var e=t.controller.services;n.n_=[403],n.e_=e.getNewLoader(n.r_()),n.M_&&n.M_.keyUri&&(n.L_=e.getNewLoader(n.D_())),n.C_=n.__controller.services.bandwidthEstimator,n.P_=new h(n.C_.COLLECTION_INTERVAL),n.P_.addEventListener(n.x_,n),n.m_()}e.inherits(d,f),d.prototype.destroy=function(){var t=this;t.cancel(),t.e_.destroy(),t.P_.destroy(),t.k_.destroy(),t.L_&&t.L_.destroy(),t.A_&&t.A_.destroy(),f.prototype.destroy.call(t)},d.prototype.v_=function(t){if(!(t&&t.segment&&t.stream&&t.controller))throw new Error("Invalid argument: data argument of the command is not complete")},d.prototype.D_=function(){var t=this,i={responseType:"arraybuffer",isChunkedLoad:!1,headerFields:{},retryExclusion:t.n_};return t._m.metadata.skt&&(i.headerFields.skt=t._m.metadata.skt),i},d.prototype.r_=function(){var t=this,i={responseType:"arraybuffer",isChunkedLoad:!0,headerFields:{},retryExclusion:t.n_},n=t.a_?t.a_.bitrate*t.a_.duration/8:0;return t.a_.brStartOffset>=0&&t.a_.brEndOffset>=0&&(i.headerFields.Range="bytes="+t.a_.brStartOffset+"-"+t.a_.brEndOffset,n=t.a_.brEndOffset-t.a_.brStartOffset+1),i.minChunkSize=.025*n,"atlas"===t.a_.cdn&&(i.headerFields.Accept="*/*; X-PB-SESSION-ID="+t.a_.sessionId),0===t.a_.streamIndex&&(i.timeout=1e4),i},d.prototype.m_=function(){var t=this,i=t.U_();i.containerFormat=t.a_.containerFormat,i.encryptionData=t.M_;var n=t.__controller.create(s,i);n&&(n.addEventListener(o.DATA_PROCESS_PROGRESS,t.T_,t),n.addEventListener(o.DATA_PROCESS_COMPLETE,t.S_,t),n.addEventListener(o.DATA_PROCESS_ERROR,t.V_,t),t.A_=n)},d.prototype.U_=function(){var t=this;return{seqNum:t.a_.seqNum,discontinuity:t.a_.discontinuity,demux:t._m.config.demux,width:t.s_?t.s_.width:640,height:t.s_?t.s_.height:360,timescale:t.s_.timescale?t.s_.timescale:t._m.timescale,duration:t._m.duration,segDuration:t.a_.duration?t.a_.duration:-1,pcr:t._m.getPCR(),frameRate:t.s_?t.s_.frameRate:30,mp4State:t.data.state?t.data.state.mp4:null,startOffsetTimestamp:t._m.startOffsetTimestamp,startTime:t.a_.startTime,lastChunkEndTs:t.data.state?t.data.state.lastChunkEndTs:null,lastFrameDuration:t.data.state?t.data.state.lastFrameDuration:null,prevSegEndTimeStamps:t._m.getPrevSegEndTimestamps(t.s_,t.a_),isAltAudioActive:!!t.data.state&&t.data.state.isAltAudioActive,live:t._m.live,onlyMetadata:t.data.onlyMetadata,useEditBox:!0,userAgent:t._m.userAgent,dash:t._m.isDash(),type:t.s_.type}},d.prototype.execute=function(){var t=this;t.E_=0,t.F_=!1,t.N_=!0,t.B_=Date.now(),t.z_=0,t.G_=0,t.a_&&(t.a_.totalDownloadTime=0,t.a_.timeToFirstByte=0),t.H_=Date.now(),t.P_.start(),t.M_&&t.L_&&t.Y_(),t.b_()},d.prototype.cancel=function(){this.q_(),this.e_.reset()},d.prototype.q_=function(){var t=this;t.P_.reset(),t.A_&&t.A_.close(),t.N_=!1},d.prototype.Y_=function(){var t=this;if(t.M_&&t.L_){var i=t.s_.lastKey,n=t.M_.keyUri;if(i&&i.keyUri&&i.key&&i.keyUri===n)t.W_(i.key);else{t.L_.addEventListener(r.COMPLETE,(function(i){t.W_(i)}),t),t.L_.addEventListener(r.ERROR,(function(i){t.publish(v.CMD_ERROR,t,i)}),t),t.L_.load(n)}}},d.prototype.b_=function(){var t=this;if(t.e_){var i=t.l_;t.e_.addEventListener(r.COMPLETE,(function(){t.g_()}),t),t.e_.addEventListener(r.PROGRESS,(function(i,n){t.y_(i,n)}),t),t.e_.addEventListener(r.ERROR,(function(i){t.publish(v.CMD_ERROR,t,i)}),t),t.e_.addEventListener(r.BYTES_LOADED,(function(i,n){t.O_(i,n)}),t),t.e_.load(i)}},d.prototype.O_=function(t,i){var n=this;n.a_&&0===n.a_.timeToFirstByte&&(n.a_.timeToFirstByte=Date.now()-n.H_,n.__controller.sendEvent(a.SEGMENT_FIRST_BYTE_LOADED,i),n.publish(v.CMD_PROGRESS,n,{position:"firstByte"})),n.z_+=Math.max(t-n.E_,0),n.E_=t},d.prototype.y_=function(t,i){var n=this;i!==n.E_&&n.O_(i),n.A_&&n.A_.append(t)},d.prototype.g_=function(){var t=this;t.x_(),t.P_.stop();var i=t.I_();t.A_&&t.A_.endOfSegment(),i>0&&t.C_.replaceSamples(t.E_,i)},d.prototype.W_=function(t){var i=this;t.type="key",t.initVector=i.M_.initVector,t.seqNum=i.a_.seqNum,i.a_.encryptionData.key=t,i.s_.lastKey=i.M_,i.A_.append(t)},d.prototype.T_=function(t){var i=this;t&&(t.putParam&&(i.R_&&t.putParam("perfInfo",i.R_),t.putParam("bytesTotal",i.E_)),i.publish(v.CMD_PROGRESS,i,t))},d.prototype.S_=function(t){this.publish(v.CMD_COMPLETE,this,t)},d.prototype.V_=function(){},d.prototype.x_=function(){var t=this,i=Math.max(t.z_,0),n=Date.now();t.G_=n-t.B_,t.P_.reset(),t.C_&&t.G_>10&&(t.B_=n,t.a_&&(t.a_.totalDownloadTime+=t.G_),t.z_=0,t.C_.addSample({size:i,time:t.G_})),t.P_.start()},d.prototype.I_=function(){var t=this,i=t.k_?t.k_.getPerformanceTiming(["startTime","requestStart","responseStart","responseEnd","secureConnectionStart","fetchStart","connectStart","domainLookupStart"],t.l_):null;return t.R_=i,i&&i.responseEnd&&i.startTime?i.responseEnd-i.startTime:null}},5867:function(t,i,n){"use strict";t.exports=a;var e=n(2990),r=n(4939).Events,s=n(2701),o=s.Command,u=s.CmdNames,h=s.CmdEvents;function a(t,i){var n=this;if(!(t&&t.stream&&t.stream.url&&t.controller))throw new Error("Invalid argument: data argument of the command is not complete");o.call(n,t,i),n.name=u.CMD_STREAM_LOAD,n.e_=t.controller.services.getNewLoader(t.retryOpts,t.stream.url)}e.inherits(a,o),a.prototype.destroy=function(){this.e_.destroy(),o.prototype.destroy.call(this)},a.prototype.execute=function(){var t=this,i=t.data.stream.url;t.e_.addEventListener(r.COMPLETE,(function(n){t.publish(h.CMD_COMPLETE,t,{data:n.data,headers:n.headers,streamUrl:i,stream:t.data.stream})}),t),t.e_.addEventListener(r.ERROR,(function(i){t.publish(h.CMD_ERROR,t,i)}),t),t.e_.load(i)},a.prototype.cancel=function(){}},558:function(t,i,n){"use strict";t.exports=c;var e=n(2990),r=n(4939).Events,s=n(7650).HLSEvent,o=n(2701),u=o.Command,h=o.CmdNames,a=o.CmdEvents;function c(t,i){var n=this;if(!(t&&t.controller&&t.subtitleStream&&t.segment))throw new Error("Invalid Argument: data arg is incomplete");u.call(n,t,i),n.name=h.CMD_SUBTITLE_SEGMENT_LOAD,n.s_=t.subtitleStream,n.__controller=t.controller,n.a_=t.segment||null,n._h={},n.Q_()}e.inherits(c,u),c.prototype.destroy=function(){var t=this;t.e_.destroy(),t.__controller.removeEventListeners(t._h),u.prototype.destroy.call(t)},c.prototype.execute=function(){var t=this;t.a_&&t.e_&&t.e_.load(t.a_.url)},c.prototype.cancel=function(){},c.prototype.Q_=function(){var t=this;t.e_=t.__controller.services.getNewLoader();t.e_.addEventListener(r.COMPLETE,(function(i){t.g_(i)}),t),t.e_.addEventListener(r.ERROR,(function(i){t.publish(a.CMD_ERROR,t,i)}),t)},c.prototype.g_=function(t){var i=this;if(i.a_){i.a_.data=t.data;var n=i.a_.pcr();null!=n?i.Z_():i.__controller.addEventListener(s.PCR_AVAILABLE,i.Z_,i)}},c.prototype.Z_=function(){var t=this;t.a_.parseSegment(),t.publish(a.CMD_COMPLETE,t,{data:t.a_.toObject(),url:t.a_.url})}},6244:function(t,i,n){"use strict";t.exports=s;var e=n(3878),r=n(7572);function s(){var t=this;t._node=t.X_.node,t.J_=t.X_.mediaSource,t.K_=null,t.tE=[],t.iE=!1,t._m=t.X_.appModel,t.nE=t._m.config.pastBufferLengthLimit}s.prototype.destroy=function(){this.eE(),this.tE=[]},s.prototype.setSwitchManager=function(t){this.K_=t},s.prototype.process=function(){var t=this;t.rE()&&"open"===t.J_.readyState&&t.J_.endOfStream()},s.prototype.onError=function(){this.iE=!0},s.prototype.onSeeking=function(t,i){t&&this.eE(),i&&this.sE()},s.prototype.oE=function(t){for(var i=this,n=0;n<i.tE.length;n++)if(t===i.tE[n].type)return i.tE[n];return null},s.prototype.setMinimumBufferTime=function(t){this.tE.forEach((function(i){i.setMinBufferTime(t)}))},s.prototype.createSourceBuffer=function(t,i,n){var s=this;if(!s.J_||s.iE)return null;var o=s.oE(t);if(!o)if(s.X_.isMimetypeSupported(i)){o=s.X_.create(e,s.J_,t,i),s.tE.push(o);var u=s._m.config.minBufferTime,h=isNaN(n)?s._m.live?u.live:u.vod:n;s.setMinimumBufferTime(h)}else{var a=new r.Error(r.ERR_MIMETYPE_NOT_SUPPORTED);s.X_.notifyError(a)}return o},s.prototype.uE=function(){var t=this;if(t.J_&&!t.iE)for(;t.tE.length>0;){t.tE.shift().destroy()}},s.prototype.sE=function(){var t=this,i=[];t.J_&&!t.iE&&"open"===t.J_.readyState&&(t.tE.forEach((function(t){i.push({type:t.type,mimeType:t.mimeType})})),t.uE(),i.forEach((function(i){t.createSourceBuffer(i.type,i.mimeType,NaN)})))},s.prototype.eE=function(){var t=this;t.J_&&!t.iE&&t.tE.forEach((function(t){t.abort()}))},s.prototype.clear=function(t,i){var n=this;if(n.J_&&!n.iE)if(t){if(!(t&&t.end-t.start<10)&&i){i.clearBuffer(t.start,t.end,(function(t){}))}}else n.tE.forEach((function(t){t.clearAll()}))},s.prototype.clearSrcBuffer=function(t,i){var n=this.oE(t);if(n)if(i){n.clearBuffer(i.start,i.end,(function(t){}))}else n.clearAll()},s.prototype.appendBuffer=function(t,i){var n=this,e=n.createSourceBuffer(t.type,t.mimeType);e&&!n.iE&&t.data&&t.data.length&&e.appendBuffer(t.data,t.startTime,t.endTime,t.onlyMetadata,(function(t,e){n.hE(t,e),i(t,e)}))},s.prototype.endOfStream=function(t){this.tE.forEach((function(i){i.setEndOfStream(t)}))},s.prototype.rE=function(){if(!this.tE.length)return!1;var t=!0;return this.tE.forEach((function(i){t=t&&"closed"===i.state})),t},s.prototype.getPendingBufferLength=function(){var t=0;return this.tE.forEach((function(i){var n=i.getTotalPendingBufferLength();t<n&&(t=n)})),t},s.prototype.getBufferedAndPending=function(){var t={};return this.tE.forEach((function(i){var n=i.getTotalPendingBufferLength(),e=i.getBufferLength();-1!==i.mimeType.indexOf("video")?t.video={buffered:e,pending:n,mimeType:i.mimeType}:t.audio={buffered:e,pending:n,mimeType:i.mimeType}})),t},s.prototype.resetReadyState=function(){this.tE.forEach((function(t){t.ready=!1}))},s.prototype.areSrcBuffersReady=function(){for(var t=0;t<this.tE.length;t++)if(!this.tE[t].ready)return!1;return!0},s.prototype.hE=function(t,i){var n=this;i&&(n.clear(n.aE(i),i),n.clear(n.cE(i),i))},s.prototype.aE=function(t){var i=this,n=i._node.currentTime,e=null;try{e=t.buffer.buffered}catch(t){e=null}var r=0,s=0,o=i._m.live?i.nE.live:i.nE.vod;return e&&e.length&&(r=e.start(0),s=Math.max(n-o,0)),{start:r,end:s}},s.prototype.cE=function(t){var i=this,n=i._node.currentTime,e=null;try{e=t.buffer.buffered}catch(t){e=null}var r=i._m.live?i.nE.live:i.nE.vod,s={start:0,end:0};return e&&e.length>1&&n+r<e.start(1)&&(s.start=e.start(1),s.end=e.end(1)),s}},4460:function(t,i,n){"use strict";t.exports=O;var e=n(5557),r=e.MessageIds,s=e.MessageTypes,o=n(2990),u=n(6837),h=n(902),a=n(6769),c=n(2053),f=n(6244),l=n(7650).HLSEvent,v=n(9719),d=n(3789),p=n(729),m=n(2350).SynchTypes,b=n(8630).W,g=n(4998).aU,y=n(4998).sS,w="synchBegin",_="synchMetadataReady",E="synchDone";function O(t){var i=this;i.fE="Controller",i.lE=o.guid(),i._node=i.X_.node,i.J_=i.X_.mediaSource,i._m=i.X_.appModel,i.mediaLoaded=!1,i.vE=!1,i.dE=null,i.pE=t?t.sessionId:null,i.mE=new c(i._node,i.X_.mediaSource,i),i.bE=i.X_.create(f),i.gE=i.X_.create(v),i.yE=new p,i.wE=new h(250),i.wE.addEventListener(i._E,i),i._m.shouldSynchronizePlayers()&&(i.EE=new g(i._node,i.OE()),i.AE()),i.SE=[];var n={userAgent:i._m.userAgent,metadata:t,config:i._m.config};if(n.config.bwHistory=i.TE(),i.IE=i.jE(n),i.IE){if(i.ME=i.NE(i.fE),i.ME)return n.config.inWorkerScope=!0,i.ME.addEventListener("message",i.kE.bind(i)),void i.RE(r.CREATE,[n]);i._m.config.useWorker=!1}i.LE=new a(n,i.DE.bind(i)),i.IE=!1,i.CE=!1,i.PE=!1,i.xE=null,i.dE=null,i.UE=E,i.VE=null,i.FE=!1}O.prototype.destroy=function(){var t=this;t.mE.destroy(),t.bE.destroy(),t.gE.destroy(),t.SE=[],t.BE&&t.BE.destroy(),t.wE&&(t.wE.destroy(),t.wE=null),t.EE&&t.EE.destroy(),t.IE&&t.ME?(t.RE(r.DESTROY),t.ME.terminate()):t.LE.destroy()},O.prototype.AE=function(){var t=this;Object.values(y).forEach((function(i){t.EE.on(i,(function(n){(n=n||{}).bufferLength=t._m.getBufferLength();var e=i===y.SYNCH_STRATEGY_APPLIED;t.LE.setIgnoreBuffering(e),t.X_.sendEvent("stream"+i,n)}))}))},O.prototype.jE=function(t){var i=t?t.userAgent:null,n=!t||!t.config||t.config.useWorker;if(!i)return n;if(i.chrome&&!i.win7)return!1;if(i.safariDesktop)return!1;var e=t?t.metadata:null;return!(e&&e.url&&e.url.indexOf(".mpd")>-1)&&(!(i.firefox&&e&&e.streams&&e.streams.length&&"m3u8:fmp4"===e.streams[0].format)&&((!this.zE(e)||!(i.safari||i.edge||i.ie))&&n))},O.prototype.zE=function(t){if(!t)return!1;var i=t.url,n=t.streams&&t.streams.length?this.GE(t.streams[0]):null;return o.isUplynk(i||n)},O.prototype.GE=function(t){if(!t)return null;var i=t.url;return!i&&t.host&&t.path&&(i=t.host+t.path),i},O.prototype.sendVideoEvent=function(t){var i=this;if(t)switch(t.type){case"play":i.HE();break;case"playing":i.YE();break;case"pause":i.qE();break;case"seeking":i.WE(t);break;case"seeked":i.QE(t);break;case"ended":i.ZE();break;case"error":i.XE();break;case"timeupdate":i.$E(t);break;case"resize":i.JE(t)}},O.prototype.onMediaSourceOpen=function(){var t=this;t.mediaLoaded&&(t.wE.reset(),t.wE.start(),t.SE.length&&t.KE())},O.prototype.play=function(t){var i=this;if(!i.J_||"closed"!==i.J_.readyState&&i.mediaLoaded){var n=i._m.live?i._node.currentTime:i._m.duration,e=t>0&&t<=n?t:null;e&&i.tO(e,m.INIT),i.iO()}else i.SE.push([i,i.play,[t]])},O.prototype.pause=function(){var t=this;!t.J_||"closed"!==t.J_.readyState&&t.mediaLoaded?t._node.pause():t.SE.push([t,t.pause])},O.prototype.preload=function(t){var i=this;!i.J_||"closed"!==i.J_.readyState&&i.mediaLoaded?i.nO("preload",[t]):i.SE.push([i,i.preload,[t]])},O.prototype.setABRMode=function(t){this.nO("setABRMode",[t])},O.prototype.setAudioLanguage=function(t){this.nO("setAudioLanguage",[t])},O.prototype.suspendStreaming=function(){this.nO("suspendStreaming")},O.prototype.resumeStreaming=function(){this.nO("resumeStreaming")},O.prototype.getSegInfo=function(){var t=this,i={mode:"sync",segInfo:null,bufferLen:null,sessionId:t.pE};return t.IE&&t.ME?(i.mode="async",t.RE(r.CALL_METHOD,null,"getSegInfo")):i.segInfo=t.LE.getSegInfo(),i.bufferLen=t._m.getBufferLength(),i},O.prototype.getSyncOffset=function(){return this.EE?this.EE.getSyncOffset():NaN},O.prototype.startSync=function(){this.EE&&this.EE.startSync()},O.prototype.stopSync=function(){this.EE&&this.EE.stopSync()},O.prototype.getSyncState=function(){return this.EE?this.EE.getSyncState():-1},O.prototype.HE=function(){var t=this;if(t._m.setDimensions(),!t.J_||"closed"!==t.J_.readyState&&t.mediaLoaded){var i=t.dE;t.xE&&(i=t.xE,t.xE=null),t.CE=!1,t.nO("onPlay",[i]),t.gE.onPlay()}else t.SE.push([t,t.HE])},O.prototype.YE=function(){this.nO("onPlaying"),this.gE.onPlaying()},O.prototype.qE=function(){var t=this;t.CE=!0,t.nO("onPause"),t.gE.onPause()},O.prototype.WE=function(t){var i=this,n=t.target.currentTime,e=!i._m.live,r=!1,s=i._m.userAgent;s&&s.safariDesktop&&(r=!i._m.live||i.FE),i.bE.onSeeking(e,r),i.FE=!1,i.nO("onSeeking",[n])},O.prototype.QE=function(t){var i=t.target.currentTime;this.nO("onSeeked",[i])},O.prototype.ZE=function(){this.wE.stop(),this.nO("onComplete")},O.prototype.XE=function(){var t=this,i=t._node.error?t._node.error.code:null;t.nO("onError",[i]),t.bE.onError()},O.prototype.JE=function(){this._m.setDimensions()},O.prototype.$E=function(){this.eO("onTimeUpdate")},O.prototype._E=function(){this.mediaLoaded&&this.eO("onUpdate")},O.prototype.eO=function(t){var i=this;i.bE.process();var n={currentTime:i._node.currentTime,bufferedAndPending:i.bE.getBufferedAndPending(),bufferLength:i._m.getBufferLength(),pendingBufferLength:i.bE.getPendingBufferLength(),bufferedRanges:i._m.getBufferedDto(),dimensions:i._m.getDimensions(),pixelRatio:i._m.getPixelRatio(),frameStats:i.gE.getFpsStats()};i.nO(t,[n])},O.prototype.rO=function(){var t=this;t.mediaLoaded=!0,t.J_&&"closed"===t.J_.readyState||(t.wE.start(),t.SE.length&&t.KE())},O.prototype.tO=function(t,i){var n=this;n.dE=t,n.UE=w,n.VE=i,n._m.live&&(n.bE.resetReadyState(),n.bE.clear())},O.prototype.sO=function(t){var i=this;i.dE=null,i.UE=E,i.VE=null,i._m.live&&i.nO("onSynchComplete",[t])},O.prototype.KE=function(){var t=this.SE;this.SE=[],t.forEach((function(t){var i=t[0],n=t[1],e=t.length>2?t[2]:null;n&&"function"==typeof n&&n.apply(i,e)}))},O.prototype.nO=function(t,i){var n=this;n.IE&&n.ME?n.RE(r.CALL_METHOD,i,t):n.LE[t].apply(n.LE,i)},O.prototype.NE=function(){return null},O.prototype.kE=function(t){var i=this;if(t){var n=t.data?new d(t.data):t;if(n&&n.instanceId===i.lE){var e=n.getParam("media");if(e&&(i._m.update(e),i.EE&&i.oO(e)),n.type!==s.EVENT)switch(n.id){case r.CREATE_SRC_BUFFER:i.uO(n.getParam("tracks"));break;case r.APPEND_SRC_BUFFER:i.hO(n.getParam("tracks"));break;case r.SAVE_AVG_BANDWIDTH:i.aO(n.getParam("avgBwInfo"));break;case r.END_OF_STREAM:n.args&&n.args.length&&(i.bE.endOfStream(n.getParam("endOfStream")),i.X_.sendEvent(l.CONTENT_LOAD_FINISHED,n.args[0]));break;case r.PAUSE_BEFORE_STREAM_CHANGE:i.cO(n.getParam("streamType"));break;case r.PLAY_AFTER_STREAM_CHANGE:i.fO();break;case r.DRM_INIT:i.BE||(i.BE=new b(i.LE,i._node,i.X_));for(var o=0;o<i._m.drmInfo.length;o++)i.BE.addDrmItem(i._m.drmInfo[o]);break;case r.DRM_LICENSE_INFO:i.BE&&i.BE.addDrmItem(n.getParam("drmItem"));break;case r.SKIP_GAP:i._node.currentTime=n.getParam("seekPosition")}else i.lO(n.id,n.getParam("eventData"))}}},O.prototype.DE=function(t){t.instanceId=this.lE,this.kE(t)},O.prototype.oO=function(t){var i=this;if(i.EE){var n=t.streams&&t.streams[t.currentLoadingStreamIndex],e=t.currentLoadingSeqNum;if(n&&!u.isNullOrUndefined(e))n.segments.forEach((function(t){t.seqNum===e&&i.EE.addSegmentInfo({startTime:t.startTime,endTime:t.startTime+t.duration,pdt:t.programDateTime,seqNum:e})})),i.EE.updateDateRanges(n.dateRanges)}},O.prototype.lO=function(t,i){var n=this;if(t){switch(t){case l.MEDIA_LOADED:n.rO();break;case l.WAITING:var e=i?i.minBufferTime:.1;n.bE.setMinimumBufferTime(e),n.gE.updateBufferingInfo(i);break;case l.LIVE_SYNCH:var r=i?i.synchPosition:null,s=i?i.synchType:m.INIT;n.tO(r,s);break;case l.SEG_INFO_METRICS_AVAILABLE:i={segInfo:i,bufferLen:n._m.getBufferLength(),sessionId:n.pE};break;case l.VTT_SEGMENT_LOADED:i&&(i.sessionId=n.pE);break;case l.MEDIA_METADATA_LOADED:i=n._m.streams;break;case l.ERROR:return i.error=new Error(i.message,i.code),void n.X_.notifyError(i)}n.X_.sendEvent(t,i)}},O.prototype.uO=function(t){var i=this;t&&(!i.J_||"closed"!==i.J_.readyState&&i.mediaLoaded?(i.vO(),t.forEach((function(t){i.bE.createSourceBuffer(t.type,t.mimeType,t.minBufferTime)}))):i.SE.push([i,i.uO,[t]]))},O.prototype.vO=function(){var t=this;t.J_&&!t.J_.duration&&t._m.duration>0&&(t.J_.duration=t._m.duration)},O.prototype.hO=function(t){var i=this;t&&(t.forEach((function(t){i.bE.appendBuffer(t,(function(t,n){i.hE(t,n)}))})),i._m.preloading&&!i.vE&&(i.X_.sendEvent(l.PRELOAD_PROGRESS),i.vE=!0))},O.prototype.hE=function(){var t=this;if(!t._m.live&&t.UE===w){if(!t.bE.areSrcBuffersReady())return;return t.bE.onSeeking(!0),t.UE=_,void t.nO("onSynchMetadataReady",[t.dE])}if(t.dE&&t.bE.areSrcBuffersReady()){var i=t.dO(t._node),n=t._node.buffered;if(i.length&&n.length){var e=i.start(i.length-1),r=i.end(i.length-1),s=t._m.TIMESTAMP_COMPARE_EPSILON;if(t.dE+s>=e&&t.dE<=r){for(var o=t.dE,u=0;u<n.length;u++)if(!(o>n.end(u))&&o<n.start(u)){o=n.start(u);break}var h=t._m.userAgent;t.FE=h&&h.safariDesktop&&t._m.live&&t.VE===m.TIME_GAP;try{t._node.currentTime=o}catch(t){}t.sO(o)}}}},O.prototype.RE=function(t,i,n){var e=this;if(e.ME&&t){var r={type:s.MESSAGE,id:t,moduleName:e.fE,instanceId:e.lE,funcName:n,args:i,timestamp:Date.now()};e.ME.postMessage(r)}},O.prototype.TE=function(){var t=this.yE.readProperty("avgBW"),i=t?t.avgBWtimestamp:null;if((i?Date.now()-parseInt(i):Number.MAX_VALUE)<1e3*this._m.config.bwHistoryMaxAge&&t){var n=t.avgBW;return n?parseInt(n):0}return 0},O.prototype.aO=function(t){t&&this.yE&&this.yE.writeProperty("avgBW",t)},O.prototype.fO=function(){var t=this;t.PE&&(t.iO(),t.PE=!1,t.X_.sendEvent(l.WAITING,{value:!1,bufferInit:!1}))},O.prototype.cO=function(t){var i=this,n=i._node.currentTime,e=i._m.live;e&&"audio"===t?i.bE.clearSrcBuffer(t):i.bE.clear(),i.CE||(i.X_.sendEvent(l.WAITING,{value:!0,bufferInit:!1}),i._node.pause(),i.PE=!0),e?i.xE=n:i._node.currentTime=n},O.prototype.iO=function(){var t=this;if(t._node){var i=t._node.play();return i&&"function"==typeof i.catch&&i.catch((function(){t._node.paused&&t.X_.sendEvent(l.PLAY_BLOCKED)})),i}},O.prototype.getCurrentDate=function(){return this._m.getCurrentDate()},O.prototype.dO=function(t){var i=this._m.userAgent;return this._m.live&&i.edge&&i.edge>=17&&i.edge<18?t.buffered:t.seekable},O.prototype.OE=function(){var t=this._m.config.streamSynch.synchConfig;return t?{pauseOnAhead:t.pauseOnAhead,synchPoint:t.behindLiveEdgeMs,synchThreshold:t.syncAccuracyMs,variableRateChange:t.variableRateChange}:null}},867:function(t){"use strict";t.exports={ERROR:-1,INITIAL:0,MEDIA_METADATA_LOADING:1,MEDIA_METADATA_LOADED:2,STREAM_METADATA_LOADING:3,STREAM_METADATA_LOADED:4,MEDIA_LOADED:5,PRELOADING:6,PLAY_REQUESTED:7,PLAYING:8,PAUSED:9,PLAY_COMPLETE:10}},3878:function(t){"use strict";t.exports=e;var i="append",n="remove";function e(t,i,n){var e=this;e._node=e.X_.node,e.pO=!1,e.type=i,e.mimeType=n,e.J_=t,e.buffer=t.addSourceBuffer(n),e.mO=[],e.bO=[],e.gO=[],e.yO=!1,e.wO=.1,e.ready=!1,e.TIMESTAMP_COMPARE_EPSILON=.065,e.GOP_LENGTH=2,e._O=e.EO.bind(e),e.buffer.addEventListener("updateend",e._O),e.OO=function(){e.abort()},e.buffer.addEventListener("error",e.OO),e.state="open"}e.prototype.destroy=function(){var t=this;t.remove(),t.mO=[],t.bO=[],t.gO=[],t.state="closed"},e.prototype.remove=function(){var t=this;t.pO||(t.pO=!0,t.abort(),t.buffer.removeEventListener("updateend",t._O),t.buffer.removeEventListener("error",t.OO),"closed"!==t.J_.readyState&&t.J_.removeSourceBuffer(t.buffer))},e.prototype.setMinBufferTime=function(t){this.wO=Math.max(.1,t)},e.prototype.appendBuffer=function(t,n,e,r,s){var o=this;if(!o.pO){var u={type:i,cb:s,buffer:t,startTime:n,endTime:e,time:e-n,onlyMetadata:r||!1};o.mO.push(u),o.AO()}},e.prototype.clearBuffer=function(t,i,e){var r=this;if(r.pO||t>=i)return e("["+r.constructor.name+"] Invalid remove buffer call");var s={type:n,cb:e,startTime:t,endTime:Math.round(1e3*parseFloat(i))/1e3};r.bO.push(s),r.AO()},e.prototype.abort=function(){var t=this;if("open"===t.J_.readyState&&!t.pO){t.mO=[],t.bO=[],t.gO=[];try{t.buffer.abort()}catch(t){}}},e.prototype.clearAll=function(){var t=this;if("closed"!==t.J_.readyState&&!t.pO){t.abort();try{var i=t.buffer.buffered,n=i.length?i.start(0):0,e=i.length?i.end(i.length-1):0;e>n&&t.buffer.remove(n,e)}catch(t){}}},e.prototype.setEndOfStream=function(t){var i=this;i.yO=t,i.pO||(t?(i.SO(),i.AO()):i.state=i.mO.length?i.state:"empty")},e.prototype.SO=function(){var t=this;t.yO&&"empty"===t.state&&!t.gO.length&&(t.state="closed")},e.prototype.EO=function(){var t=this;if(!t.pO){if(t.ready=!0,t.gO.length)t.gO.shift().cb(null,t);t.mO.length||(t.state="empty"),t.AO(),t.SO()}},e.prototype.AO=function(){for(var t=this;t.bO.length;){if(t.buffer.updating)return;t.TO(t.bO.shift())}for(;t.mO.length;){if(t.buffer.updating)return;var i=t.getBufferLength()+t.getTotalPendingBufferLength(),n=t.mO.length&&t.mO[0]&&t.mO[0].onlyMetadata;if(!t.yO&&i<t.wO&&!n)return;t.TO(t.mO.shift())}},e.prototype.TO=function(t){var e=this;if(t&&t.type)try{t.type===i?e.buffer.appendBuffer(t.buffer):t.type===n&&e.buffer.remove(t.startTime,t.endTime),e.gO.push(t),e.state="updating"}catch(n){if("QuotaExceededError"===n.name)e.IO()&&t.type===i&&e.mO.unshift(t)}},e.prototype.IO=function(){var t=this,i=t._node.buffered,n=i.length>0?i.start(0):NaN,e=t._node.currentTime-t.GOP_LENGTH;return e>n&&(t.buffer.remove(n,e),!0)},e.prototype.getTotalPendingBufferLength=function(){var t=0;return this.mO.forEach((function(i){i&&i.time&&(t+=i.time)})),t},e.prototype.getBufferLength=function(){var t,i=this,n=i.X_.node,e=i.TIMESTAMP_COMPARE_EPSILON,r=0,s=n.currentTime,o=null;try{o=i.buffer.buffered;for(var u=0;o&&u<o.length;u++)if(s+e>=o.start(u)&&s<o.end(u)){t=u;break}t>=0&&o&&o.length&&(r=o.end(t)-s)}catch(t){}return r}},2053:function(t){"use strict";function i(t,i,n){var e=this;t&&i&&n&&(e._node=t,e.jO=n,e.J_=i,e.MO())}t.exports=i,i.prototype.destroy=function(){this.NO()},i.prototype.MO=function(){var t=this;t.mE=t.kO.bind(t),t.RO=["play","playing","pause","seeking","seeked","ended","error","timeupdate"],t.RO.forEach((function(i){t._node.addEventListener(i,t.mE)})),t.LO=t.DO.bind(t),t.J_.addEventListener("sourceopen",t.LO),window.addEventListener("resize",t.mE)},i.prototype.NO=function(){var t=this;t.RO.forEach((function(i){t._node.removeEventListener(i,t.mE)})),t.J_.removeEventListener("sourceopen",t.LO),window.removeEventListener("resize",t.mE)},i.prototype.kO=function(t){this.jO.sendVideoEvent(t)},i.prototype.DO=function(t){this.jO.onMediaSourceOpen(t)}},9112:function(t,i,n){"use strict";t.exports.AacStreamer=h,t.exports.AacLiveStreamer=a;var e=n(2990),r=n(2350).Streamer,s=n(7980),o=n(5557),u=n(6837);function h(t,i){this.CO(t,i)}function a(t,i){this.CO(t,i)}e.inherits(h,r),e.inherits(a,s),a.prototype.CO=h.prototype.CO=function(t,i){var n=this;n.constructor.super_.call(n,t,i),n.f_=n.constructor.super_.prototype,n.processOnlyMetadata=!1,n.lastAudioTimestamp=NaN,n.lastAudioFrameDuration=NaN,n.primary=!1,n.PO="mp4a.40.2",n.xO="audio",n.UO();var e=[{type:n.xO,mimeType:n.xO+'/mp4; codecs="'+n.PO+'"',minBufferTime:n.__controller.getMinimumBufferTime()}];n.__controller.sendMessage(o.MessageIds.CREATE_SRC_BUFFER,[e],["tracks"]),n.VO=n.STATES.INITIALIZED},a.prototype.destroy=h.prototype.destroy=function(){this.f_.destroy.call(this)},a.prototype.onSeeking=h.prototype.onSeeking=function(t){var i=this;i.lastAudioTimestamp=NaN,i.f_.onSeeking.call(i,t)},a.prototype.onSwitchBegin=h.prototype.onSwitchBegin=function(){var t=this;t.UO(),t.f_.onSwitchBegin.call(t)},a.prototype.onManualStreamChange=h.prototype.onManualStreamChange=function(){var t=this;t.UO(),t.lastAudioTimestamp=NaN,t.f_.onManualStreamChange.call(t)},a.prototype.FO=h.prototype.FO=function(){this.UO()},a.prototype.BO=h.prototype.BO=function(t){var i=this;if(!i.isActive())return null;var n=i.zO;return{segment:n.getSegmentfromSeqNum(t),stream:n,state:{mp4:i.GO,lastChunkEndTs:{audio:i.lastAudioTimestamp,video:NaN},lastFrameDuration:{audio:i.lastAudioFrameDuration,video:NaN}},onlyMetadata:i.processOnlyMetadata}},a.prototype.onSegmentLoadProgress=h.prototype.onSegmentLoadProgress=function(t,i,n){var e=this;if(i){var r=i.getParam?i.getParam("parsedInfo"):null;r&&(r.lastChunkEndTs&&u.isNumber(r.lastChunkEndTs.audio)&&(e.lastAudioTimestamp=r.lastChunkEndTs.audio),r.lastFrameDuration&&u.isNumber(r.lastFrameDuration.audio)&&(e.lastAudioFrameDuration=r.lastFrameDuration.audio)),e.f_.onSegmentLoadProgress.call(e,t,i,n)}},a.prototype.UO=h.prototype.UO=function(){this.GO={video:{shouldInit:!0,seqNum:0},audio:{shouldInit:!0,seqNum:0}}},a.prototype.HO=h.prototype.HO=function(t,i){},a.prototype.YO=function(t){var i=this;i.lastAudioTimestamp=NaN,i.isActive()&&i.f_.YO.call(i,t)}},39:function(t,i,n){"use strict";t.exports=s;var e=n(7650).HLSEvent,r=n(5557);function s(){var t=this;t._m=t.__controller.model,t.qO=!1,t.iE=!1,t.WO=NaN,t.QO=NaN,t.ZO={},t.CE=!0,t.XO=-1,t.MIN_BUFFER_TO_PLAY=1,t.MIN_TIME_TO_BUFFER_CHECK=150,t.BUFFER_REPORT_THRESHOLD=20,t.MIN_BUFFER_TIME_UPPER_BOUND=5,t.WEIGHT=.5,t.CHROME_BUFFER_GAP_EPSILON=.15,t.$O=!0,t.JO=!1,t.KO()}s.prototype.onPlayRequested=function(){this.iA()},s.prototype.destroy=function(){},s.prototype.checkBuffering=function(t){var i=this,n=i._m.bufferLength,e=i._m.currentTime,r=i._m.duration;if(!(isFinite(r)&&e+.05>r)){var s=i._A();!t&&s<i.MIN_TIME_TO_BUFFER_CHECK||(!(n<=.02||i.tS===e&&n<i.MIN_BUFFER_TO_PLAY)||i.CE||i._m.preloading||i.qO?!isNaN(i.WO)&&e>i.WO?i.iS():!i.CE&&i.tS===e&&i._m.getTotalBufferLength()>i.MIN_BUFFER_TO_PLAY&&i.nS():i.iA(),i.tS=e,i.eS=Date.now())}},s.prototype.onPlaying=function(){this.CE=!1},s.prototype.onPause=function(){var t=this;t.CE=!0,t.qO&&(t.ZO.bufferInit=!0,t.iS())},s.prototype.onSeeking=function(){this.JO=!0},s.prototype.onSeeked=function(){this.JO=!1},s.prototype.onTimeUpdate=function(){this.qO&&this.checkBuffering(!0)},s.prototype.onVideoSync=function(t){this.tS=t},s.prototype.onError=function(){this.qO&&this.iS()},s.prototype.onComplete=function(){var t=this;t.qO&&t.iS(),t.KO()},s.prototype.setIgnoreBuffering=function(t){this.$O=t},s.prototype.nS=function(){var t=this;if(!(t._m.bufferedRanges.length<2)){var i=t._m.TIMESTAMP_COMPARE_EPSILON,n=t._m.currentTime;t._m.userAgent&&t._m.userAgent.chrome&&(n-=3);for(var s=t._m.bufferedRanges.ranges,o=0;o<s.length-1;o++){var u=s[o],h=s[o+1];if(h.start-u.end>t._m.config.skipGapLimit)t._m.currentTime!==t.QO&&(t.__controller.sendEvent(e.BUFFER_GAP_DETECTED,h.start-u.end),t.QO=t._m.currentTime);else{var a=u.end-i-(t._m.userAgent.chrome?t.CHROME_BUFFER_GAP_EPSILON:0),c=h.start;n>a&&n<c&&t.__controller.sendMessage(r.MessageIds.SKIP_GAP,[h.start],["seekPosition"])}}}},s.prototype.iA=function(){var t=this;if(!t.qO){t.qO=!0;var i=t.getMinimumBufferTime();t.rS(),t.WO=t._m.currentTime,t.JO&&(t.$O=!0),t.ZO={value:t.qO,bufferInit:t.$O,minBufferTime:i},t.__controller.sendEvent(e.WAITING,t.ZO)}},s.prototype.iS=function(){var t=this;t.qO&&(t.qO=!1,t.WO=NaN,t.ZO={value:!1,waitTime:t.oS(),bufferInit:t.$O,minBufferTime:.1},t.__controller.sendEvent(e.WAITING,t.ZO),t.ZO={},t.$O=!1)},s.prototype.getMinimumBufferTime=function(){var t=this,i=t.__controller.services.bandwidthEstimator.instantaneousBandwidth,n=t._m.getCurrentLoadingStream(),e=n?n.bitrate/1e6:0,r=t._m.config.minBufferTime;return r=t._m.live?r.live:r.vod,t._m.config.variableMinBuffer&&e&&!isNaN(i)?t.uS(i/e,r):r},s.prototype.uS=function(t,i){var n=this.MIN_BUFFER_TIME_UPPER_BOUND;if(i>=n)return i;var e=Math.max(i,0);if(t>=1)return e;var r=t*n;return 1*Math.max(e,n-r*this.WEIGHT).toFixed(1)},s.prototype._A=function(){var t=this,i=Date.now();return t.eS=t.eS||i,i-t.eS},s.prototype.rS=function(){var t=this,i=t._A(),n=t.hS();t.aS=Date.now()-Math.max(i-n,0)},s.prototype.oS=function(){var t=this,i=t.hS(),n=Math.max(Date.now()-t.aS-i,0);return t.ZO.bufferInit||n<t.BUFFER_REPORT_THRESHOLD?0:n},s.prototype.hS=function(){var t=this,i=0;return t.tS&&(i=1e3*(t._m.currentTime-t.tS).toFixed(3)),i},s.prototype.KO=function(){this.eS=null,this.tS=null},s.prototype.isBuffering=function(){return this.qO}},6769:function(t,i,n){"use strict";t.exports=_;var e=n(7650).HLSEvent,r=n(7572),s=n(6972),o=s.StreamingController,u=s.Events,h=n(39),a=n(574).MetadataTypes,c=n(2701).CmdNames,f=n(258),l=n(902),v=n(867),d=n(2999),p=n(2990),m=n(574).Model,b=n(5212),g=n(5557),y=n(3789),w=n(3093).userAgent;function _(t,i){var n=this;d.call(n,n.constructor.name),n.cS=t,n.fS=i,n.model=n.create(m,t),n.services=n.create(b),n.lS=n.services.metadataParser,n.vS=n.create(f),n.dS=n.create(o),n.pS=n.create(h),n.VO=v.INITIAL,n._h={},n.mS=n.cS.config.inWorkerScope,n.MO(),n.JO=!1,n.bS=!1,n.gS=new l(250),n.gS.addEventListener(n.yS,n),n.initialize()}p.inherits(_,d),_.prototype.create=function(){var t=this,i=Array.prototype.slice.call(arguments),n=i.shift(),e=Object.create(n.prototype);return e.__controller=t,n.apply(e,i),e},_.prototype.destroy=function(){var t=this;t.dS&&(t.dS.destroy(),t.dS=null),t.pS&&(t.pS.destroy(),t.pS=null),t.vS&&(t.vS.destroy(),t.vS=null),t.services&&(t.services.destroy(),t.services=null),t.gS&&(t.gS.destroy(),t.gS=null),t.VO=v.INITIAL,t.removeEventListeners(t._h),d.prototype.destroy.call(t)},_.prototype.initialize=function(){this.wS()},_.prototype.getSegInfo=function(){var t=this;if(!t.dS)return null;var i=t.dS.getMetrics();return t.mS&&t.sendEvent(e.SEG_INFO_METRICS_AVAILABLE,i),i},_.prototype.sendEvent=function(t,i){var n=this;n.publish(t,i);var e=n.create(y,{type:g.MessageTypes.EVENT,id:t,args:[i],argNames:["eventData"]});n._S(e)},_.prototype.sendMessage=function(t,i,n,e){var r=this.create(y,{type:g.MessageTypes.MESSAGE,id:t,args:i,argNames:n});this._S(r,e)},_.prototype.notifyError=function(t){var i=this;i.error=t;var n=i.VO;n!==v.ERROR&&i.ES(v.ERROR),n!==v.PAUSED&&i.sendEvent(e.ERROR,"HlsError"===i.error.constructor.name?i.error.dto():i.error)},_.prototype._S=function(t,i){t&&this.fS&&(t.addMedia(),this.fS(t,i))},_.prototype.MO=function(){var t=this;t.dS.addEventListener(u.STREAM_METADATA_LOADED,t.AS,t),t.dS.addEventListener(u.STREAM_METADATA_LOAD_ERROR,t.SS,t),t.dS.addEventListener(u.PRELOAD_COMPLETE,t.TS,t),t.dS.addEventListener(u.SEG_LOAD_PROGRESS,t.IS,t)},_.prototype.jS=function(t){},_.prototype.ES=function(t,i){var n=this;n.jS(t),n.VO=t,n.sendEvent(e.STATE_CHANGED,t),n.MS(i)},_.prototype.getState=function(){return this.VO},_.prototype.MS=function(t){var i=this;switch(i.VO){case v.MEDIA_METADATA_LOADING:i.NS();break;case v.MEDIA_METADATA_LOADED:if(i.sendEvent(e.MEDIA_METADATA_LOADED),i.model.isDash()){i.sendMessage(g.MessageIds.DRM_INIT),i.ES(v.MEDIA_LOADED);break}i.ES(v.STREAM_METADATA_LOADING);break;case v.STREAM_METADATA_LOADING:i.dS.loadStream(i.model.getCurrentLoadingStream());break;case v.STREAM_METADATA_LOADED:i.ES(v.MEDIA_LOADED);break;case v.MEDIA_LOADED:if(w.android&&w.chrome&&i.model.drmInfo&&i.model.drmInfo.length)return;i.kS();break;case v.PRELOADING:i.dS.onPreloadBegin(),i.sendEvent(e.PRELOAD_START),i.gS.start();break;case v.PLAY_REQUESTED:i.gS.start(),i.dS.onPlay(t),i.bS||(i.pS.onPlayRequested(),i.bS=!0);break;case v.PLAYING:i.dS.onPlaying();break;case v.PLAY_COMPLETE:i.gS.stop(),i.dS.onComplete(),i.pS.onComplete();break;case v.ERROR:i.gS.stop(),i.dS.onError(),i.vS.removeAllCommands(),i.pS.onError()}},_.prototype.wS=function(){var t=this,i=t.model.metadata;if(t.VO===v.INITIAL)return i.type===a.STRUCTURED?(t.model.build(t.lS.parse(i)),void(i.hasStreamMetadata?i.hasSubtitleMetadata?t.dS.loadAllSubtitleStreams():t.ES(v.MEDIA_LOADED):i.hasMediaMetadata&&t.ES(v.MEDIA_METADATA_LOADED))):void t.ES(v.MEDIA_METADATA_LOADING)},_.prototype.yS=function(){var t=this;t.VO<v.MEDIA_LOADED||(t.pS.checkBuffering(),t.dS.process())},_.prototype.onPlay=function(t){var i=this;i.VO===v.ERROR&&i.error&&i.notifyError(i.error),i.VO<v.MEDIA_LOADED||(i.VO===v.PRELOADING&&(i.dS.onPreloadEnd(),this.sendEvent(e.PRELOAD_COMPLETE)),i.ES(v.PLAY_REQUESTED,t))},_.prototype.onPlaying=function(){var t=this;t.VO<v.MEDIA_LOADED||(t.ES(v.PLAYING),t.pS.onPlaying())},_.prototype.onPause=function(){var t=this;t.VO<v.MEDIA_LOADED||(t.dS.onPause(),t.pS.onPause(),t.ES(v.PAUSED))},_.prototype.onSeeking=function(t){var i=this;i.VO<v.MEDIA_LOADED||(i.JO=!0,i.dS.onSeeking(t),i.pS.onSeeking())},_.prototype.onSeeked=function(t){var i=this;i.VO<v.MEDIA_LOADED||(i.JO=!1,i.dS.onSeeked(t),i.pS.onSeeked())},_.prototype.onComplete=function(){this.VO<v.MEDIA_LOADED||this.ES(v.PLAY_COMPLETE)},_.prototype.onError=function(t){this.ES(v.ERROR)},_.prototype.onTimeUpdate=function(t){var i=this;i.RS(t),i.pS.onTimeUpdate(),i.dS.onTimeUpdate(i.model.currentTime)},_.prototype.onUpdate=function(t){this.RS(t),this.pS.onTimeUpdate()},_.prototype.onSynchComplete=function(t){this.dS.onSynchComplete(),this.pS.onVideoSync(t)},_.prototype.onSynchMetadataReady=function(t){this.dS.onSynchMetadataReady(t)},_.prototype.RS=function(t){var i=this;t&&(i.model.currentTime=t.currentTime,i.model.bufferedAndPending=t.bufferedAndPending,i.model.bufferLength=t.bufferLength,i.model.pendingBufferLength=t.pendingBufferLength,i.model.bufferedRanges=t.bufferedRanges,i.model.dimensions=t.dimensions,i.model.pixelRatio=t.pixelRatio,i.services.segmentMetrics.updateFrameStats(t.frameStats))},_.prototype.NS=function(){var t=this,i=t.model.getMediaUrl(),n=i&&-1!==i.indexOf(".mpd"),e={url:i,withResponseHeaders:n};t.vS.executeCommand(c.CMD_MEDIA_LOAD,e,t)},_.prototype.onMediaLoadComplete=function(t,i){var n=this;if(t)if(i){var e={rawData:i.data,headers:i.headers,type:a.RAW,url:t.data?t.data.url:"",cdn:n.model.getMediaCdn()};n.model.build(n.lS.parse(e)),n.vS.removeCommand(t),n.ES(v.MEDIA_METADATA_LOADED)}else n.vS.removeCommand(t)},_.prototype.onMediaLoadError=function(t,i){var n=this;t&&n.vS.removeCommand(t),i&&1===i.code&&(n.ES(v.ERROR),n.notifyError(new r.Error(r.ERR_PLAYLIST_LOAD)))},_.prototype.AS=function(){this.VO<v.MEDIA_LOADED&&this.ES(v.STREAM_METADATA_LOADED)},_.prototype.SS=function(){this.ES(v.ERROR),this.notifyError(new r.Error(r.ERR_PLAYLIST_LOAD))},_.prototype.TS=function(){var t=this;t.VO===v.PRELOADING&&(t.ES(v.MEDIA_LOADED),t.sendEvent(e.PRELOAD_COMPLETE)),t.gS.reset()},_.prototype.IS=function(){this.pS.isBuffering()&&this.sendEvent(e.BUFFER_GROWTH_DETECTED)},_.prototype.LS=function(t){for(var i=Object.keys(v),n=0;n<i.length;n++)if(t===v[i[n]])return i[n]},_.prototype.preload=function(t){var i=this;t&&(i.model.config.preloadBufferLimit=t,i.model.bufferLength+i.model.pendingBufferLength<t&&i.VO===v.MEDIA_LOADED&&i.ES(v.PRELOADING))},_.prototype.setABRMode=function(t){this.VO<v.MEDIA_LOADED||this.dS.setABRMode(t)},_.prototype.setAudioLanguage=function(t){this.VO<v.MEDIA_LOADED||this.dS.setAudioLanguage(t)},_.prototype.setIgnoreBuffering=function(t){this.pS.setIgnoreBuffering(t)},_.prototype.getMinimumBufferTime=function(){return this.pS.getMinimumBufferTime()},_.prototype.suspendStreaming=function(){this.gS.stop(),this.dS.suspendStreaming()},_.prototype.resumeStreaming=function(){var t=this;t.VO!==v.PRELOADING&&t.VO!==v.PLAY_REQUESTED&&t.VO!==v.PLAYING&&t.VO!==v.PAUSED||(t.dS.resumeStreaming(),t.gS.start())},_.prototype.kS=function(){var t=this;t.dS.isInitialized()||(t.dS.init(),t.sendEvent(e.MEDIA_LOADED),!t.model.live&&t.model.bufferLength+t.model.pendingBufferLength<t.model.config.preloadBufferLimit&&t.ES(v.PRELOADING))},_.prototype.onGenerateRequestComplete=function(){this.kS()}},5902:function(t,i,n){"use strict";t.exports.Fmp4Streamer=f,t.exports.Fmp4LiveStreamer=l;var e=n(2990),r=n(7980),s=n(2350).Streamer,o=n(2701).CmdNames,u=n(2503).StreamTypes,h=n(5557),a=n(574).StreamingMode,c=n(6837);function f(t,i){var n=this;s.call(n,t,i),n.f_=n.constructor.super_.prototype,n.DS=null,n._y(t)}function l(t,i){var n=this;r.call(n,t,i),n.f_=n.constructor.super_.prototype,n.DS=null,n._y(t),n.SEGMENT_OFFSET=7}e.inherits(f,s),e.inherits(l,r),f.prototype.destroy=function(){s.prototype.destroy.call(this)},l.prototype.destroy=function(){r.prototype.destroy.call(this)},l.prototype._y=f.prototype._y=function(t){var i=this;i.CS(t);var n=[{type:i.xO,mimeType:i.xO+'/mp4; codecs="'+i.PO+'"',minBufferTime:i.__controller.getMinimumBufferTime()}];i.__controller.sendMessage(h.MessageIds.CREATE_SRC_BUFFER,[n],["tracks"])},l.prototype.CS=f.prototype.CS=function(t){var i=this;t.type===u.AUDIO?(i.PO=i._m.userAgent.android?"mp4a.40.2":t.audioCodec||"mp4a.40.2",i.xO="audio"):(i.PO=t.videoCodec||"avc1.640021",i.xO="video")},l.prototype.setCurrentStream=f.prototype.setCurrentStream=function(t){var i=this;t&&i.zO&&!t.equals(i.zO)&&(i.zO=t,i.VO===i.STATES.LOADING&&i.abortCurrentSegment(i.PS),i.isStreamReady()||(i.VO=i.STATES.NONE))},l.prototype.xS=f.prototype.xS=function(t,i,n,e){var r=this,s=r.zO;r.vS.removeRelatedCommands(o.CMD_MP4_INIT_SEGMENT_LOAD);var u={stream:s,segment:i,initSegment:t,comboLoad:n,cached:e};r.vS.executeCommand(o.CMD_MP4_INIT_SEGMENT_LOAD,u,r)},l.prototype.US=f.prototype.US=function(t){var i=this;if(!(i.VO>=i.STATES.INITIALIZING)){var n=c.isNullOrUndefined(t)?i.VS(i.FS):t,e=i.zO,r=n===e.startSeqNum,s=e.getSegmentfromSeqNum(n);if(s){var o=e.getInitSegment(s),u=!c.isNullOrUndefined(o);u||(o=e.addInitSegment(s.initSegment));var h=e.streamingMode===a.HLS&&!c.isNullOrUndefined(e.mp4Chunks.first);h&&(s=r?s:null),i.VO=i.STATES.INITIALIZING,s&&s.periodId!==i.DS&&i.BS(s.periodId),i.zS(s?s.periodId:null),i.xS(o,s,h,u)}}},l.prototype.onMp4InitSegmentLoadProgress=f.prototype.onMp4InitSegmentLoadProgress=function(t,i){var n=this,e=n.zO;if(i&&e){var r=t.getSegment();if(i.comboLoad&&r&&"firstByte"===i.position)n.onSegmentLoadProgress(t,i);else{var s=i.chunk,o=i.stream;if(s&&o){var u=o.getInitSegment(r);switch(s.name){case"init":o.setMp4Timescale(u);break;case"sidx":var h=s.data;h&&o.updateSegmentRanges(n.GS.mp4BoxParser.parse(h,"sidx",o.sidxOffset));break;case"first":return void n.onSegmentLoadProgress(t,i)}e.equals(o)&&o.isReady()&&(n.HS(u),n.VO=n.STATES.INITIALIZED,i.comboLoad&&r&&(n.YS=r.seqNum,n.VO=n.STATES.LOADING))}}}},l.prototype.onMp4InitSegmentLoadComplete=f.prototype.onMp4InitSegmentLoadComplete=function(t,i){var n=this;if(i){var e=t.getSegment();i.comboLoad&&e?n.onSegmentLoadComplete(t):(n.VO<n.STATES.INITIALIZED&&n.zO.equals(i.stream)&&(n.VO=n.STATES.INITIALIZED),n.vS.removeCommand(t))}},l.prototype.onMp4InitSegmentLoadError=f.prototype.onMp4InitSegmentLoadError=function(t,i){this.vS.removeCommand(t)},l.prototype.onSegmentLoadProgress=f.prototype.onSegmentLoadProgress=function(t,i){var n=this,e=n.zO;if(i&&e){var r=i.stream;if(!r||e.equals(r)){if("firstByte"!==i.position){var o={data:new Uint8Array(i.data),codec:n.PO,type:n.xO,minBufferTime:n.__controller.getMinimumBufferTime(),frames:i.samples,startTime:e.timescale>0?i.baseTime/e.timescale:NaN,endTime:e.timescale>0?(i.baseTime+i.totalDuration)/e.timescale:NaN};n.qS([o])}s.prototype.onSegmentLoadProgress.call(n,t,i)}}},l.prototype.BS=f.prototype.BS=function(t){var i=this;if(i.DS!==t){i.DS=t;var n=i.zO;"MAIN"!==i.type&&"AUDIO"!==i.type||i.WS(t,n),i.zS(t)}},l.prototype.WS=f.prototype.WS=function(t,i){for(var n=this._m.streams,e=(this.type,0);e<n.length;e++)n[e].groupId;i.groupId},l.prototype.zS=f.prototype.zS=function(t){var i=this,n=i.zO;n&&n.drmInfo&&!c.isNullOrUndefined(t)&&n.drmInfo.forEach((function(n){n.periodId===t&&i.__controller.sendMessage(h.MessageIds.DRM_LICENSE_INFO,[n],["drmItem"])}))},l.prototype.HS=f.prototype.HS=function(t){var i=this,n=i.zO;if(t){var e=t.data;if(e){var r={data:new Uint8Array(e.buffer),codec:i.PO,type:i.xO,minBufferTime:i.__controller.getMinimumBufferTime(),onlyMetadata:!0};i.qS([r]),n.activeInitSegment=t;var s=n?n.getMp4Chunk("sidx"):null;if(s){var o=s.data;o&&(r.data=new Uint8Array(o.buffer),i.qS([r]))}}}},l.prototype.HO=f.prototype.HO=function(t,i){},l.prototype.FO=f.prototype.FO=function(t){var i=this,n=i.zO.getSegmentfromSeqNum(t);n&&n.periodId!==i.DS&&i.BS(n.periodId),i.VO=i.STATES.NONE,i.QS=!0,i.YS=t,i.US(t)},f.prototype.onSynchBegin=function(){this.processOnlyMetadata=!0},l.prototype.YO=function(t){var i=this;i.lastChunkEndTs={audio:NaN,video:NaN},i.f_.YO.call(i,t)}},6888:function(t,i,n){"use strict";t.exports.Fmp4SubtitleStreamer=a,t.exports.Fmp4SubtitleLiveStreamer=c;var e=n(2990),r=n(5902).Fmp4Streamer,s=n(5902).Fmp4LiveStreamer,o=n(2835),u=n(6837),h=n(7650).HLSEvent;function a(t){r.call(this,t),this._y()}function c(t){s.call(this,t),this._y()}e.inherits(a,r),e.inherits(c,s),a.prototype.destroy=function(){var t=this;t.ZS=null,t._="",r.prototype.destroy.call(t)},c.prototype.destroy=function(){var t=this;t.ZS=null,t._="",s.prototype.destroy.call(t)},c.prototype._y=a.prototype._y=function(){var t=this;t.xO="subtitle",t.ZS=new o,t.XS()},c.prototype.FO=a.prototype.FO=function(t){this.XS(),r.prototype.FO.call(this,t)},c.prototype.onSegmentLoadProgress=a.prototype.onSegmentLoadProgress=function(t,i){var n=this,e=n.zO;if(i&&e&&e.timescale){var r=i.stream;if((!r||e.equals(r))&&"firstByte"!==i.position){var s=n.ZS.extractVttCaptions(i.data);if(s.length){var o=n.ZS.parse(i.data,"trun"),u=o?o.sampleData:[];if(u.length===s.length){var h=n.ZS.parse(i.data,"tfdt"),a=h?h.baseMediaDecodeTime:0,c=a=1e3*a/e.timescale;s.forEach((function(t,i){var r=u[i],s=r?1e3*r.sampleDuration/e.timescale:0;if(t.cueText){var o=n.$S(t.cueTime)+a,h=null!==o?o+s:c+s;n._+="\n"+n.JS(o)+" --\x3e "+n.JS(h),n._+="\n"+t.cueText+"\n"}c+=s})),n._+="\n"}}}}},c.prototype.onSegmentLoadComplete=a.prototype.onSegmentLoadComplete=function(t,i){var n=this,e=n.zO;if(e){var r=e.getSegmentfromSeqNum(n.YS);r&&n.__controller.sendEvent(h.VTT_SEGMENT_LOADED,n.KS(r))}n.f_.onSegmentLoadComplete.call(n,t,i),n._=""},c.prototype.XS=a.prototype.XS=function(){this._="WEBVTT\nX-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:0\n\n"},c.prototype.$S=a.prototype.$S=function(t){var i=null;if(!t)return i;var n=t.split(":");if(n&&n.length>=3){var e=n[2].split("."),r=0,s=0;e&&e.length>=2&&(r=parseInt(e[0]),s=parseInt(e[1])),i=1e3*(3600*n[0]+60*n[1]+r)+s}return i},c.prototype.JS=a.prototype.JS=function(t){var i="";if(u.isNullOrUndefined(t))return i;function n(t){return t<10?"0"+t:""+t}var e=Math.floor(t/1e3),r=Math.floor(t-1e3*e),s=Math.floor(e/3600);e-=3600*s;var o,h=Math.floor(e/60);return e-=60*h,i=n(s)+":"+n(h)+":"+n(e)+"."+((o=r)<10?"00"+o:o<100?"0"+o:""+o)},c.prototype.KS=a.prototype.KS=function(t){var i={};return t&&(i.discontinuity=t.discontinuity,i.sequenceNum=t.seqNum,i.startTime=t.startTime,i.programDateTime=t.programDateTime,i.url=t.url,i.duration=t.duration,i.clockReference=0,i.localCueTime=0,i.mpegTSTime=0,i.data=this._,i.offset=0,i.adjustedTime=0),i},c.prototype.HO=a.prototype.HO=function(){},c.prototype.HS=a.prototype.HS=function(t){this.zO.activeInitSegment=t},c.prototype.zS=a.prototype.zS=function(){}},8630:function(t,i,n){"use strict";t.exports.W=h;var e=n(2990),r=n(7572),s=n(258),o=n(2701).CmdNames,u=n(902);function h(t,i,n){var e=this;e.tT=o.CMD_LICENSE_LOAD,e.LICENSE_TYPE_NONE=0,e.LICENSE_TYPE_WIDEVINE=1,e.LICENSE_TYPE_PLAYREADY=2,e.iT=0,e.playreadyKeySystem={keySystem:"com.microsoft.playready",supportedConfig:[{initDataTypes:["keyids","cenc"],audioCapabilities:[{contentType:'audio/mp4; codecs="mp4a"',robustness:""}],videoCapabilities:[{contentType:'video/mp4; codecs="avc1"',robustness:""}]}]},e.widevineKeySystem={keySystem:"com.widevine.alpha",supportedConfig:[{label:"foo",initDataTypes:["cenc"],sessionTypes:["temporary"],audioCapabilities:[{contentType:'audio/mp4; codecs="mp4a.40.5"',robustness:"SW_SECURE_CRYPTO"}],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.640028"',robustness:"HW_SECURE_ALL"},{contentType:'video/mp4; codecs="avc1.640028"',robustness:"SW_SECURE_CRYPTO"},{contentType:'video/mp4; codecs="avc1.4d001f"',robustness:"HW_SECURE_ALL"},{contentType:'video/mp4; codecs="avc1.4d001f"',robustness:"SW_SECURE_CRYPTO"},{contentType:'video/mp4; codecs="avc1.42000d"',robustness:"HW_SECURE_ALL"},{contentType:'video/mp4; codecs="avc1.42000d"',robustness:"SW_SECURE_CRYPTO"}]}]},e.LICENSE_STATUS_DONE="DONE",e.LICENSE_STATUS_LOADING="LOADING",e.LICENSE_STATUS_NEW="NEW_REQ",e.vS=t.create(s),e.nT=[],window.addEventListener("beforeunload",e.eT.bind(e)),e.rT=i,e.X_=n,e.sT=null,e.oT=null,e.uT=null,e.hT=[],e.aT=new u(250),e.aT.addEventListener(e.cT,e),e.fT=0,e.LE=t,e.lT()}h.prototype.addDrmItem=function(t){var i=this;e.isDrmItemContained(t,i.hT)||(t.status=i.LICENSE_STATUS_NEW,i.hT.push(t),i.vT(i))},h.prototype.lT=function(){var t=this;t.oT=null,navigator.requestMediaKeySystemAccess?navigator.requestMediaKeySystemAccess(t.widevineKeySystem.keySystem,t.widevineKeySystem.supportedConfig).then((function(i){t.iT=t.LICENSE_TYPE_WIDEVINE,t.X_.appModel.licenseType="widevine",i.createMediaKeys().then((function(i){t.dT(t,i)}),(function(){t.uT={type:r.ERR_DRM_INIT,message:"LicenseManager - createMediaKeys() failed for Widevine"}}))}),(function(){navigator.requestMediaKeySystemAccess(t.playreadyKeySystem.keySystem,t.playreadyKeySystem.supportedConfig).then((function(i){t.iT=t.LICENSE_TYPE_PLAYREADY,t.X_.appModel.licenseType="playready",i.createMediaKeys().then((function(i){t.dT(t,i)}),(function(){t.uT={type:r.ERR_DRM_INIT,message:"LicenseManager - createMediaKeys() failed for PlayReady"}}))}),(function(){t.uT={type:r.ERR_DRM_CONFIG,message:"LicenseManager - Your browser/system does not support the requested configurations for playing DRM protected content."}}))})):t.uT={type:r.ERR_DRM_EME_MISSING,message:"LicenseManager - Browser EME components not detected! (also check URL for HTTPS)"}},h.prototype.dT=function(t,i){t.oT=i,t.aT.start()},h.prototype.cT=function(){var t=this;t.rT.mediaKeys||(t.aT.stop(),t.rT.setMediaKeys(t.oT).then((function(){t.vT(t)}),(function(i){t.uT={type:r.ERR_DRM_INIT,message:"LicenseManager - "+i}})))},h.prototype.vT=function(t){if(null===t.oT&&null!==t.uT)return t.pT(t.uT.type,t.uT.message),void(t.uT=null);if(null!==t.oT)for(var i=0;i<t.hT.length;i++){var n=t.hT[i];n.status===t.LICENSE_STATUS_NEW&&(t.iT===t.LICENSE_TYPE_WIDEVINE?(n.widevine.initData=e.base64ToBuffer(n.widevine.pssh),n.widevine.initDataType="cenc",n.status=t.LICENSE_STATUS_LOADING,t.mT(t,n.widevine)):t.iT===t.LICENSE_TYPE_PLAYREADY&&(n.playready.initData=e.base64ToBuffer(n.playready.pssh),n.playready.initDataType="cenc",n.status=t.LICENSE_STATUS_LOADING,t.mT(t,n.playready)))}},h.prototype.mT=function(t,i){var n=t.oT.createSession("temporary");t.nT.push(n),n.addEventListener("message",(function(n){t.bT(t,i,n)}),!1);var e=n.generateRequest(i.initDataType,i.initData);e.then((function(){t.fT++,t.fT===t.hT.length&&t.LE.onGenerateRequestComplete()})),e.catch((function(i){t.pT(r.ERR_DRM_LICENSE_REQUEST,"LicenseManager - keySession.generateRequest() failed: "+i)}))},h.prototype.gT=function(t,i){return t.iT===t.LICENSE_TYPE_PLAYREADY?i.prefix+"/pr":t.iT===t.LICENSE_TYPE_WIDEVINE?i.prefix+"/wv":""},h.prototype.bT=function(t,i,n){var e=t.gT(t,i),r=t.yT(t,n.message);t.vS.executeCommand(t.tT,{challenge:r.challenge,headerFields:r.headerFields,url:e,drmInfo:i,event:n},t)},h.prototype.yT=function(t,i){var n,s={};if(t.iT===t.LICENSE_TYPE_PLAYREADY){var o=(new DOMParser).parseFromString(String.fromCharCode.apply(null,new Uint16Array(i)),"application/xml");o.getElementsByTagName("Challenge")[0]?n=e.base64ToBuffer(o.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue).buffer:t.pT(r.ERR_DRM_LICENSE_REQUEST,"LicenseManager - Cannot find <Challenge> in key message");var u=o.getElementsByTagName("name"),h=o.getElementsByTagName("value");u.length!==h.length&&t.pT(r.ERR_DRM_LICENSE_REQUEST,"LicenseManager - Playready: Mismatched header <name>/<value> pair in key message");for(var a=0;a<u.length;a++)s[u[a].childNodes[0].nodeValue]=h[a].childNodes[0].nodeValue}else t.iT===t.LICENSE_TYPE_WIDEVINE&&(n=i);return{challenge:n,headerFields:s}},h.prototype.onLicenseLoadComplete=function(t,i){var n=this,e=t.data?t.data.event:null,s=t.data?t.data.drmInfo:null;e.target.update(i.data).catch((function(t){n.pT(r.ERR_DRM_LICENSE_REQUEST,"LicenseManager - call to MediaKeySession.update() failed: "+t)}));for(var o=0;o<n.hT.length;o++)n.hT[o].widevine.pssh!==s.pssh&&n.hT[o].playready.pssh!==s.pssh||(n.hT[o].status=n.LICENSE_STATUS_DONE)},h.prototype.onLicenseLoadError=function(){this.pT(r.ERR_XHR_LOAD,"LicenseManager - XHR failed")},h.prototype.pT=function(t,i){var n=new r.Error(t,i);this.X_.notifyError(n)},h.prototype.eT=function(){for(var t=this,i=0;i<t.nT.length;i++)t.nT[i].close().then((function(){}));t.nT=[]},h.prototype.destroy=function(){var t=this;t.wT=null,t.oT=null,t.hT=[],t.eT(),t.aT.destroy()}},7980:function(t,i,n){"use strict";t.exports=l;var e=n(2990),r=n(2350),s=r.Streamer,o=r.Events,u=r.SynchTypes,h=n(902),a=n(7650).HLSEvent,c=n(2503).StreamTypes,f=n(6837);function l(t,i){var n=this;s.call(n,t,i),n._h={},n._h[a.MEDIA_LOADED]=n.__controller.addEventListener(a.MEDIA_LOADED,n.rO,n),n.DEFAULT_STREAM_UPDATE_INTERVAL=8e3,n.MAX_STREAM_UPDATE_INTERVAL=1e4,n.PAST_BUFFER_LENGTH_LIMIT=n._m.config.pastBufferLengthLimit.live,n.LONG_PAUSE_INTERVAL=24e3,n._T=new h(n.DEFAULT_STREAM_UPDATE_INTERVAL),n._T.addEventListener(n.ET,n),n.dE=null,n.OT=null,n.AT=!1,n.ST=new h(n.LONG_PAUSE_INTERVAL,1),n.ST.addEventListener(n.TT,n)}e.inherits(l,s),l.prototype.destroy=function(){var t=this;t._T.destroy(),t.ST.destroy(),t.__controller.removeEventListeners(t._h),s.prototype.destroy.call(t)},l.prototype.onPlay=function(t){var i=this;if(i.IT(),i.jT()){var n=i.OT?u.TIME_GAP:u.INIT;i.YO(n),i.process(i.FS),i.OT=null}else i.MT&&(i.FS=t,i.CE=!1,i.process(i.FS),i.OT=null);s.prototype.onPlay.call(i),i.ST.stop()},l.prototype.onPause=function(){var t=this;t.OT=Date.now(),t.ST.start(),s.prototype.onPause.call(t)},l.prototype.onSeeking=function(t){var i=this;i.NT(!1),i.AT&&(i.kT(),i.process(t))},l.prototype.onSynchComplete=function(){var t=this;t.dE=null,t.FS=null,t.type===c.MAIN&&t._m.setLivePlaybackStartTime(null)},l.prototype.suspendStreaming=function(){this._T&&this._T.stop()},l.prototype.resumeStreaming=function(){this._T&&this._T.start()},l.prototype.jT=function(){var t=this;if(!t.OT)return!0;if(this._m.config.streamSynch)return!1;var i=t.zO,n=i&&i.targetDuration?3*i.targetDuration*1e3:t.LONG_PAUSE_INTERVAL;return Date.now()-t.OT>n},l.prototype.YO=function(t){var i=this;if(i._m.hasEndlist)i.NT(!0);else{var n=i.zO;if(n.segments.length&&!f.isNullOrUndefined(n.endSeqNum)&&!f.isNullOrUndefined(n.startSeqNum)){var e=i.RT(),r=n.getSegmentfromSeqNum(e);i.FS=r?r.startTime:null,i.dE=i.FS,n.type===c.MAIN&&i._m.setLivePlaybackStartTime(i.dE);var s=i._m.userAgent;i.AT=s&&s.safariDesktop&&t===u.TIME_GAP,i.publish(o.LIVE_SYNCH,i,{synchPosition:i.dE,synchType:t})}}},l.prototype.TT=function(){},l.prototype.LT=function(){var t=this;return!t.DT&&t.VO!==t.STATES.LOADING&&!t.CE&&!t.CT()},l.prototype.PT=function(){var t=this;t.isActive()&&(!t.xT&&t.VO!==t.STATES.INITIALIZING||t.UT||(t.ET(),t.IT()))},l.prototype.RT=function(){var t=this,i=t.zO,n=t._m.getLivePlaybackStartTime();return i.type===c.MAIN||f.isNullOrUndefined(n)?Math.max(i.endSeqNum-t.SEGMENT_OFFSET,i.startSeqNum):i.getSeqNumBeforePosition(n)},l.prototype.VT=function(t){return t},l.prototype.onStreamLoaded=function(t){this.IT(),s.prototype.onStreamLoaded.call(this,t)},l.prototype.rO=function(){this.IT()},l.prototype.IT=function(){var t,i,n=this;n._m.hasEndlist||n.zO.isDash()&&n.type!==c.MAIN?n._T.destroy():(t=n._T.startTime>0?Date.now()-n._T.startTime:0,n._T.reset(),i=n._m.getStreamRefreshInterval()||n.DEFAULT_STREAM_UPDATE_INTERVAL,i-=t,i=Math.max(i,100),i=Math.min(i,n.MAX_STREAM_UPDATE_INTERVAL),n._T.delay=i,n._T.start())},l.prototype.FT=function(){var t=this,i={url:t.zO.url,withResponseHeaders:t._m.isDash()};return t.CE&&(i.stopStreamLoadOnError=!0,i.maxRetries=1),i},l.prototype.stopStreamUpdate=function(){this._T.reset()},l.prototype.canSwitch=function(t){var i=this;return!i.dE&&("mid-segment"!==t||i.VO===i.STATES.LOADING)},l.prototype.BT=function(){var t=this,i=t.zO;i&&i.endSeqNum===t.YS&&t._m.hasEndlist&&t.NT(!0)}},2440:function(t,i,n){"use strict";var e=n(27),r=n(5985),s=n(5902),o=n(9112),u=n(6888),h=n(2503).StreamTypes,a=e.TsStreamer,c=e.TsLiveStreamer,f=r.SubtitleStreamer,l=r.SubtitleLiveStreamer,v=s.Fmp4Streamer,d=s.Fmp4LiveStreamer,p=o.AacStreamer,m=o.AacLiveStreamer,b=u.Fmp4SubtitleStreamer,g=u.Fmp4SubtitleLiveStreamer;t.exports.create=function(t,i,n){if(!t||!i||"function"!=typeof t.create)return null;var e,r=i.type===h.SUBTITLES;switch(i.containerFormat){case"vtt":e=n?l:f;break;case"aac":e=n?m:p;break;case"mp4":e=r?n?g:b:n?d:v;break;case"ts":e=n?c:a}return e?t.create(e,i):null}},2350:function(t,i,n){"use strict";t.exports.Streamer=b;var e=n(2990),r=n(2999),s=n(2701).CmdNames,o=n(7572),u=n(7650).HLSEvent,h=n(4361),a=h.StreamLoader,c=h.Events,f=n(5557),l=n(258),v=n(2503).StreamTypes,d=n(5877),p=t.exports.Events={SEG_LOAD_START:"streamerSegLoadStart",SEG_LOAD_PROGRESS:"streamerSegLoadProgress",SEG_LOAD_COMPLETE:"streamerSegLoadComplete",SEG_LOAD_ERROR:"streamerSegLoadError",PRELOAD_COMPLETE:"streamerPreloadComplete",STREAM_LOAD_COMPLETE:"StreamLoadComplete",STREAM_LOAD_ERROR:"StreamLoadError",LIVE_SYNCH:"streamerLiveSynch"},m=t.exports.SynchTypes={INIT:"synchAtInit",TIME_GAP:"synchAtTimeGap"};function b(t){var i=this,n=i.__controller;r.call(i,i.constructor.name),i._m=n.model,i.GS=n.services,i.vS=n.create(l),i.zT=n.create(a,i.vS),i.zT.addEventListener(c.STREAM_LOADED,i.onStreamLoaded,i),i.zT.addEventListener(c.STREAM_LOAD_ERROR,i.onStreamLoadError,i),i.AVG_BW_MEASUREMENT_INTERVAL=30,i.GT=0,i.HT=0,i.tT=s.CMD_SEGMENT_LOAD,i.zO=t,i.type=t?t.type:null;var e=t.altRenditionGroups&&t.altRenditionGroups.SUBTITLES&&t.altRenditionGroups.SUBTITLES.hasStreams();i.type&&i.type!==v.VIDEO&&i.type!==v.MAIN||e||(i.YT=[],i.qT=new d(i.sendVttEventCB.bind(i))),i.STATES={ERROR:-1,NONE:0,INITIALIZING:1,INITIALIZED:2,LOADING:3},i.VO=i.STATES.NONE,i.UT=!1,i.WT=!1,i.YS=NaN,i.yO=!1,i.FS=null,i.CE=!1,i.QT=i._m.config.maxBuffer,i.ZT=i._m.live,i.XT=!1,i.MT=!1,i.$T={audio:NaN,video:NaN},i.xT=!1,i.n_=[403]}e.inherits(b,r),b.prototype.destroy=function(){var t=this;t.zT.destroy(),t.VO=t.STATES.NONE,t.zO=null,t.vS&&(t.vS.destroy(),t.vS=null),r.prototype.destroy.call(t)},b.prototype.setCurrentStream=function(t){var i=this;t&&!t.equals(i.zO)&&(i.zO=t,i.onSwitchBegin())},b.prototype.isActive=function(){var t=this;return t.zO&&t.zO.url&&t.zO.url.length>0},b.prototype.setAltAudioActive=function(t){this.XT=t},b.prototype.getCurrentStream=function(){return this.zO},b.prototype.process=function(t,i){var n=this;if("number"==typeof t&&(n.FS=t),n.isStreamReady()||n.VO===n.STATES.ERROR){if(n.LT()){var e=n.VS(n.FS,i),r=n.JT(e);"empty"!==r?"ahead"!==r&&("behind"!==r?n.LT()&&(n.FS=null,n.KT(e)):n.YO(m.TIME_GAP)):n.PT()}}else n.US()},b.prototype.suspendStreaming=b.prototype.resumeStreaming=function(){},b.prototype.onPlay=function(t){var i=this;i.CE=!1,i.QT=i._m.config.maxBuffer,t&&i.onSynchBegin()},b.prototype.onPlaying=function(){this.MT=!1},b.prototype.onPause=function(){this.CE=!0},b.prototype.onSeeking=function(t){var i=this;i.kT(),i.NT(!1),i.process(t)},b.prototype.onSeeked=function(){},b.prototype.onError=function(){this.vS&&this.vS.removeAllCommands()},b.prototype.onComplete=function(){},b.prototype.onTimeUpdate=function(t){var i=this;if(i.HT){var n=t-i.HT;n>0&&(i.GT+=n)}i.GT>i.AVG_BW_MEASUREMENT_INTERVAL&&(i.aO(i.GS.bandwidthEstimator.averageBandwidth),i.GT=0),i.HT=t},b.prototype.onPreloadBegin=function(){var t=this;t.WT=!0,t.QT=t._m.config.preloadBufferLimit},b.prototype.onPreloadEnd=function(){this.WT=!1},b.prototype.YO=function(){},b.prototype.isStreamReady=function(){var t=this,i=t.zO;return i&&i.isReady()&&t.VO>=t.STATES.INITIALIZED},b.prototype.US=function(){var t=this;t.isActive()&&(t.VO=t.STATES.INITIALIZING,t.PT())},b.prototype.LT=function(){var t=this,i=t.CT(),n=t._m.config.stopBufferingOnPause;return t.WT&&i&&t.publish(p.PRELOAD_COMPLETE,t),!t.yO&&t.VO!==t.STATES.LOADING&&((!t.CE||!n)&&(!i&&!t.tI()))},b.prototype.JT=function(t){var i=this.zO;if(!i||i.isEmpty()||isNaN(t))return"empty";if(!i.contains(t)){if(t<i.startSeqNum)return"behind";if(t>i.endSeqNum)return"ahead"}return"available"},b.prototype.CT=function(){var t=this;if(t.type&&t._m.bufferedAndPending){var i={buffered:0,pending:0},n=t._m.bufferedAndPending.video||i;return t.type!==v.MAIN&&t.type!==v.VIDEO&&(n=t._m.bufferedAndPending.audio||i),n.buffered+n.pending>=t.QT}return t._m.bufferLength+t._m.pendingBufferLength>=t.QT},b.prototype.tI=function(){var t=this._m;return t.getTotalBufferLength()>=t.config.maxTotalBuffer},b.prototype.onSwitchBegin=function(){this.xT=!0,this.PT()},b.prototype.onSwitchEnd=function(){this.xT=!1},b.prototype.PT=function(){this.UT||this.ET()},b.prototype.ET=function(){var t=this;t.isActive()&&(t.UT=!0,t.zT.load(t.zO,t.FT()))},b.prototype.FT=function(){var t=this;return{url:t.zO.url,retryExclusion:t.n_,withResponseHeaders:t._m.isDash()}},b.prototype.onStreamLoaded=function(t){var i=this;i.VO===i.STATES.INITIALIZING&&(i.VO=i.STATES.INITIALIZED),i.UT=!1,i.publish(p.STREAM_LOAD_COMPLETE,i,{stream:t.dto()})},b.prototype.onStreamLoadError=function(t,i){var n=this;i.code===o.ERR_XHR_LOAD_LIVE_PAUSE[0]&&n.stopStreamUpdate(),n.publish(p.STREAM_LOAD_ERROR,n,{err:i,stream:t}),n.VO=n.STATES.ERROR,n.UT=!1,n.process()},b.prototype.VS=function(t,i){var n=this,e=n.zO,r=NaN;return r="number"==typeof t?e.getSeqNumBeforePosition(t+n._m.TIMESTAMP_COMPARE_EPSILON):isNaN(n.YS)?n.RT():n.VO===n.STATES.ERROR||n.QS?n.YS:n.YS+1,i||(r=n.VT(r)),n.ZT||(r=Math.max(r,e.startSeqNum),r=Math.min(r,e.endSeqNum)),r},b.prototype.VT=function(t){var i=this,n=i.zO,e=i._m.bufferedRanges,r=e.length,s=i.iI(t),o=i._m.userAgent;if(o&&o.safariDesktop)return t;if(i._m.isDash())return t;if(s>=0&&r&&s<r){var u=e.ranges[s].end;return!i.ZT&&u>=i._m.duration?(i.NT(!0),n.endSeqNum):n.getSeqNumBeforePosition(u)}return t},b.prototype.RT=function(){return this.zO.getSeqNumBeforePosition(0)},b.prototype.iI=function(t){var i=this,n=i.zO.getSegmentfromSeqNum(t);if(!n)return-1;for(var e=i._m.TIMESTAMP_COMPARE_EPSILON,r=i._m.bufferedRanges,s=0;s<r.length;s++){var o=r.ranges[s],u=o.start-e,h=o.end+e;if(u=0===n.startTime&&u<.1?0:u,n.startTime>=u&&n.startTime+n.duration<=h)return s}return-1},b.prototype.FO=function(){},b.prototype.KT=function(t){var i=this;if(i.FO(t),!(i.VO<i.STATES.INITIALIZED)){i.kT(),i.VO=i.STATES.LOADING,i.YS=t,i.QS=!1,i._m.updateCurrentLoadingSeqNum(i.YS);var n=i.nI(i.YS);n&&(i.HO(n,i.zO),i.publish(p.SEG_LOAD_START,i),i.eI(t))}},b.prototype.eI=function(){},b.prototype.nI=function(t){var i=this,n=i.BO(t),e=n?n.segment:null;return e?(i.PS=i.vS.executeCommand(i.tT,n,i),e):null},b.prototype.BO=function(t){var i=this.zO;return i?{segment:i.getSegmentfromSeqNum(t),stream:i}:null},b.prototype.onSegmentLoadProgress=function(t,i){var n,e,r,s,o,u=this;if(i)if(i.id!==f.MessageIds.TIMED_METADATA){i.getParam?(n=i.getParam("tracks"),e=i.getParam("perfInfo"),r=i.getParam("bytesTotal")||0,s=i.getParam("parsedInfo"),o=i.getParam("cea608TrackData")):i.cea608TrackData&&(o=i.cea608TrackData);var h=s?s.position:i.position,a=s&&s.inWorkerScope||!1;switch(u.publish(p.SEG_LOAD_PROGRESS,u,{seqNum:u.YS,position:h,bytesTotal:r,inWorkerScope:a,perfInfo:e}),u._m.preloading=u.WT,h){case"firstByte":return;case"start":break;case"end":u.VO===u.STATES.LOADING&&(u.VO=u.STATES.INITIALIZED)}if(n&&(n.forEach((function(t){t.minBufferTime=u.__controller.getMinimumBufferTime(),u.$T[t.type]=t.endTimestamp})),u.qS(n,i.getParam("transferables"))),u.YT&&o&&o.length>0)for(var c=0;c<o.length;c++)u.YT.push(o[c]);"end"===h&&(u._m.setSegEndTimeStamps(u.type,u.zO.groupId,u.YS,u.$T),u.$T.audio=NaN,u.$T.video=NaN)}else{var l=i.getParam("timedMetadata");u._m.updateTimedMetadata(l,u.YS)}},b.prototype.onSegmentLoadComplete=function(t){var i=this;if(i.VO===i.STATES.LOADING&&(i.VO=i.STATES.INITIALIZED),i.YT&&i.YT.length>0){for(var n=[],e=0;e<i.YT.length;e++){for(var r=i.YT[e],s=0;s<n.length&&r.pts>=n[s].pts;)s++;n.splice(s,0,r)}var o=i.zO.getSegmentfromSeqNum(i.YS);i.qT.parse(n,o),i.YT=[]}i.vS.removeCommand(t),i.BT(),i.publish(p.SEG_LOAD_COMPLETE,i,{stream:i.zO}),i.PS=null},b.prototype.onSegmentLoadError=function(t,i){var n=this;n.abortCurrentSegment(t),n.PS=null;var e=i&&i.code===o.ERR_XHR_LOAD[0]?new o.Error(o.ERR_SEGMENT_LOAD):i;n.publish(p.SEG_LOAD_ERROR,n,{seqNum:n.YS,err:e,stream:n.zO})},b.prototype.abortCurrentSegment=function(t){var i=this;return i.VO!==i.STATES.LOADING?null:(t&&i.vS.removeCommand(t),i.VO===i.STATES.LOADING&&(i.VO=i.STATES.INITIALIZED),i.QS=!0,i.$T.audio=NaN,i.$T.video=NaN,i.YS)},b.prototype.kT=function(){var t=this;t.VO===t.STATES.LOADING&&(t.VO=t.STATES.INITIALIZED),t.$T.audio=NaN,t.$T.video=NaN,t.vS.removeRelatedCommands(t.tT)},b.prototype.qS=function(t,i){t&&this.__controller.sendMessage(f.MessageIds.APPEND_SRC_BUFFER,[t],["tracks"],i)},b.prototype.NT=function(t){var i=this;i.yO=t,i.$T.audio=NaN,i.$T.video=NaN,i.type===v.MAIN&&i.__controller.sendMessage(f.MessageIds.END_OF_STREAM,[t],["endOfStream"])},b.prototype.BT=function(){var t=this,i=t.zO;i&&i.endSeqNum===t.YS&&t.NT(!0)},b.prototype.aO=function(t){var i={avgBWtimestamp:Date.now(),avgBW:t};this.type===v.MAIN&&this.__controller.sendMessage(f.MessageIds.SAVE_AVG_BANDWIDTH,[i],["avgBwInfo"])},b.prototype.onManualStreamChange=function(){var t=this;t.NT(!1),t.MT=!0,t.kT(),t.zT.cancel(),t.UT=!1,t.VO=t.VO!==t.STATES.ERROR?t.STATES.INITIALIZING:t.VO,t.PT()},b.prototype.midSegUpSwitch=function(){var t=this;t.PS&&t.abortCurrentSegment(t.PS),t.zT.cancel(),t.UT=!1,t.PT(),t.process(t.HT,!0)},b.prototype.onSynchBegin=function(){},b.prototype.onSynchComplete=function(){},b.prototype.onSynchMetadataReady=function(t){var i=this;i.kT(),i.NT(!1),i.process(t)},b.prototype.canSwitch=function(t){return"mid-segment"!==t||this.VO===this.STATES.LOADING},b.prototype.isInError=function(){return this.VO===this.STATES.ERROR},b.prototype.getSegLoadCommand=function(){return this.vS.getCommand(this.tT)},b.prototype.HO=function(){},b.prototype.sendVttEventCB=function(t){this.__controller.sendEvent(u.VTT_SEGMENT_LOADED,t)}},6972:function(t,i,n){"use strict";t.exports.StreamingController=y;var e=n(2350).Events,r=n(2440),s=n(4571),o=n(1811),u=n(902),h=n(4361),a=h.StreamLoader,c=h.Events,f=n(2503).StreamTypes,l=n(2990),v=n(2999),d=n(7650).HLSEvent,p=n(258),m=n(574).AbrModes,b=n(5557),g=t.exports.Events={STREAM_METADATA_LOADED:"streamMetadataLoaded",STREAM_METADATA_LOAD_ERROR:"streamMetadataLoadError",PRELOAD_COMPLETE:"preloadComplete",SEG_LOAD_PROGRESS:"streamingControllerSegLoadProgress"};function y(){var t=this;v.call(t,t.constructor.name),t._m=t.__controller.model,t.GS=t.__controller.services,t.vS=t.__controller.create(p),t.rI=t.GS.segmentMetrics,t.sI={},t.oI=0,t.uI=0,t.hI={},t.aI=null,t.cI=0,t.FAST_UP_SWITCH_INTERVAL=.3,t.OO=t.__controller.create(o,t.vS),t.OO.addEventListener(t.OO.SWITCH_ON_ERROR,t.fI,t),t.K_=t.__controller.create(s),t.K_.addEventListener(t.K_.SWITCH_BEGIN,t.lI,t),t.K_.addEventListener(t.K_.SWITCH_END,t.vI,t),t.dI=new u(1e3*t._m.config.segmentLoadMonitorInterval),t.dI.addEventListener(t.pI,t),t.mI=new u(1e3*t.FAST_UP_SWITCH_INTERVAL),t.mI.addEventListener(t.bI,t),t.gI={},t.SE=[],t.CE=!1,t.xT=!1,t.MT=!1,t.yI=t.K_.SCENARIOS.STARTUP,t.STATES={ERROR:-1,INITIAL:0,STREAM_METADATA_LOADED:1,INITIALIZED:2},t.VO=t.STATES.INITIAL}l.inherits(y,v),y.prototype.loadStream=function(t){var i=this;t&&i.VO===i.STATES.INITIAL&&(i.wI(t).load(t),i.oI++,Object.keys(t.altRenditionGroups).forEach((function(n){var e=t.getAlternateStream(n);e&&e.url&&(i.wI(e).load(e),i.oI++)})))},y.prototype.loadAllSubtitleStreams=function(){var t=this;if(t.VO===t.STATES.INITIAL){var i=[];t._m.streams.forEach((function(n){var e=n.getAlternateStream(f.SUBTITLES);e&&i.indexOf(e.url)<0&&(i.push(e.url),t.wI(e).load(e),t.oI++)})),t.VO=t.STATES.STREAM_METADATA_LOADED,t.publish(g.STREAM_METADATA_LOADED)}},y.prototype.wI=function(t){var i=this,n=i.__controller.create(a,i.vS);return n.addEventListener(c.STREAM_LOADED,i._I,i),n.addEventListener(c.STREAM_LOAD_ERROR,i.EI,i),i.sI[t.url]=n,t.type===f.SUBTITLES&&i.uI++,n},y.prototype.OI=function(){var t=this;Object.keys(t.sI).forEach((function(i){var n=t.sI[i];n&&n.destroy()})),t.sI={},t.oI=0},y.prototype._I=function(t){var i=this;if(t){var n=i.sI[t.url];if(n){if(i.VO>=i.STATES.STREAM_METADATA_LOADED)return n.destroy(),delete i.sI[t.url],void i._m.synchStreamTimelines(t.type);t.type!==f.SUBTITLES&&i.uI++,i.uI>=i.oI&&(i.VO=i.STATES.STREAM_METADATA_LOADED,i._m.synchStreamTimelines(),i.publish(g.STREAM_METADATA_LOADED)),n.destroy(),delete i.sI[t.url]}}},y.prototype.EI=function(t,i){var n=this;t&&t.type===f.SUBTITLES||(n.VO=n.STATES.ERROR,n.publish(g.STREAM_METADATA_LOAD_ERROR,i))},y.prototype.init=function(){var t=this;if(t.VO!==t.STATES.ERROR&&t.VO!==t.STATES.INITIALIZED){var i=t._m.getCurrentLoadingStream();if(i){t.uI=0;var n=t.AI(i);n.addEventListener(e.PRELOAD_COMPLETE,t.TS,t),n.addEventListener(e.LIVE_SYNCH,t.tO,t),t.hI.MAIN=n,t.aI=n,t.cI++,Object.keys(i.altRenditionGroups).forEach((function(n){var e=i.getAlternateStream(n);if(e){var r=t.AI(e);r&&(t.hI[n]=r,t.cI++)}})),t.SI(),t.TI(),t.VO=t.STATES.INITIALIZED}}},y.prototype.isInitialized=function(){return this.VO>=this.STATES.INITIALIZED},y.prototype.AI=function(t){var i=this;if(!t)return null;var n=r.create(i.__controller,t,i._m.live);return i.II(n),n},y.prototype.jI=function(){var t=this;Object.keys(t.hI).forEach((function(i){t.hI[i].destroy()})),t.hI={},t.aI=null},y.prototype.II=function(t){var i=this;if(t){var n={};n[e.SEG_LOAD_START]=i.MI,n[e.SEG_LOAD_PROGRESS]=i.IS,n[e.SEG_LOAD_COMPLETE]=i.NI,n[e.SEG_LOAD_ERROR]=i.kI,n[e.STREAM_LOAD_ERROR]=i.RI,n[e.STREAM_LOAD_COMPLETE]=i.LI,Object.keys(e).forEach((function(r){var s=e[r];t.addEventListener(s,n[s],i)}))}},y.prototype.SI=function(){var t=this,i=t.hI.AUDIO;t.aI&&t.aI.setAltAudioActive(i&&i.isActive())},y.prototype.DI=function(){var t=this,i=Array.prototype.slice.call(arguments),n=i.shift(),e=t.aI;e&&e[n]&&"function"==typeof e[n]&&e[n].apply(e,i),Object.keys(t.hI).forEach((function(r){r!==f.MAIN&&(e=t.hI[r])&&e[n]&&"function"==typeof e[n]&&e[n].apply(e,i)}))},y.prototype.process=function(){var t=this;t.DI("process"),t.yI=t.K_.SCENARIOS.LOAD},y.prototype.suspendStreaming=function(){this.DI("suspendStreaming")},y.prototype.resumeStreaming=function(){this.DI("resumeStreaming")},y.prototype.setABRMode=function(t){var i=this,n=i._m;n.setABRMode(t)&&n.getABRMode()!==m.AUTO&&(i.CI("video"),i.xT=!1,i.TI())},y.prototype.CI=function(t){var i=this;i.MT=!0,i.__controller.sendMessage(b.MessageIds.PAUSE_BEFORE_STREAM_CHANGE,[t],["streamType"]),i.DI("onManualStreamChange")},y.prototype.setAudioLanguage=function(t){var i=this,n=i._m;if(n.setAudioLanguage(t)){i.CI("audio");var e=f.AUDIO,r=n.getCurrentLoadingStream(),s=r?r.getAlternateStream(e):null,o=i.hI[e];s&&o&&o.setCurrentStream(s),i.SI()}},y.prototype.getMetrics=function(){return this.rI.getMetrics()},y.prototype.onPlay=function(t){var i=this;i.dI.start(),i.xI()?(i.DI("onPlay",t),i.CE=!1,i.MT=!1):i.SE.push([i,i.onPlay,[t]])},y.prototype.onPlaying=function(){this.DI("onPlaying"),this.mI.start()},y.prototype.onPause=function(){var t=this;t.dI.stop(),t.DI("onPause"),t.CE=!0},y.prototype.onSeeking=function(t){var i=this;i._m.live||i.TI(),i.DI("onSeeking",t)},y.prototype.onSeeked=function(t){this.DI("onSeeked",t)},y.prototype.onComplete=function(){this.rI.onComplete(),this.DI("onComplete")},y.prototype.onError=function(){this.DI("onError")},y.prototype.onTimeUpdate=function(t){this.DI("onTimeUpdate",t),this.rI.onTimeUpdate(t)},y.prototype.onSynchMetadataReady=function(t){this.TI(),this.DI("onSynchMetadataReady",t)},y.prototype.onSynchComplete=function(){this.DI("onSynchComplete")},y.prototype.onPreloadBegin=function(){this.DI("onPreloadBegin")},y.prototype.onPreloadEnd=function(){this.DI("onPreloadEnd")},y.prototype.fI=function(t){var i=this;i.xT=!1,i.TI(i.K_.SCENARIOS.ERROR,{index:t})},y.prototype.lI=function(){var t=this,i=t._m.getCurrentLoadingStream();t.xT=!0,t.aI.setCurrentStream(i),Object.keys(i.altRenditionGroups).forEach((function(n){var e=i.getAlternateStream(n);e&&t.hI[n]&&t.hI[n].setCurrentStream(e)})),t.SI()},y.prototype.vI=function(){this.xT=!1,this.DI("onSwitchEnd")},y.prototype.pI=function(){var t=this,i=t.aI?t.aI.getSegLoadCommand():null;i&&t.TI(t.K_.SCENARIOS.MIDSEGMENT,{command:i,position:i.position})},y.prototype.bI=function(){var t=this;t.xT=!1,t.TI(),t._m.getCurrentLoadingStream().bitrate>t._m.getCurrentPlayingStream().bitrate&&(t.mI.reset(),t.DI("midSegUpSwitch"))},y.prototype.UI=function(t,i,n,e,r){var s=this,o=s._m.getCurrentLoadingStream(),u=o?o.getSegmentfromSeqNum(i):null,h={bitrateIndex:o?o.index:0,frameRate:o?o.frameRate:30,bytesTotal:n};"firstByte"===t?(h.beginTime=u?u.startTime:NaN,h.switchReason="none",h.observedBitrate=s.GS.bandwidthEstimator.averageBandwidth,h.timeToFirstByte=u?u.timeToFirstByte:NaN,h.endTime=u?u.startTime+u.duration:NaN,h.programDateTime=u?u.programDateTime:NaN,s.rI.segmentLoadBegin(i,h)):"end"===t&&(h.perfInfo=r,h.timeToDownload=u?u.totalDownloadTime:NaN,h.segmentInWorker=!!e,s.rI.segmentLoadEnd(i,h))},y.prototype.VI=function(){var t=this;t.dI.reset(),t.CE||t.OO.running||t.dI.start()},y.prototype.TI=function(t,i){var n=this;if(t=t||n.yI,!n.xT)if(t!==n.K_.SCENARIOS.MIDSEGMENT){var e=i?i.index:null;n.K_.switchStream(t,null,e)}else{var r=i?i.command:null,s=i?i.position:null;n.FI(t,r,s)}},y.prototype.FI=function(t,i,n){var e=this;if("end"!==n&&(e.aI&&e.aI.canSwitch(t)&&e.K_.switchStream(t,"down"))){var r=e.aI.abortCurrentSegment(i);r&&e.UI("end",r),e.process()}},y.prototype.MI=function(){this.VI()},y.prototype.IS=function(t,i){var n=this;if(n.BI(t)&&i){n.publish(g.SEG_LOAD_PROGRESS,i.bytesTotal),"firstByte"===i.position&&n.K_.switchComplete();var e=i.position,r=i.bytesTotal,s=i.inWorkerScope,o=i.perfInfo,u=i.seqNum;n.UI(e,u,r,s,o),n.VI()}},y.prototype.NI=function(t){var i=this;i.zI(),i.BI(t)&&i.TI()},y.prototype.kI=function(t,i){var n=this;n.BI(t)&&n.UI("end",i.seqNum),n.GI(i.err,i.stream)},y.prototype.LI=function(t,i){var n=this;if(n.zI(),n.BI(t)||n._m.synchStreamTimelines(t.type),n.__controller.sendEvent(d.STREAM_UPDATED,i),n.SE.length>0&&n.KE(),n.MT){for(var e=0,r=Object.keys(n.hI),s=0;s<n.cI;s++)n.hI[r[s]].isActive()&&e++;++n.uI>=e&&(n.uI=0,n.__controller.sendMessage(b.MessageIds.PLAY_AFTER_STREAM_CHANGE))}},y.prototype.RI=function(t,i){this.GI(i.err,i.stream)},y.prototype.GI=function(t,i){this.dI.stop(),this.OO.handle(t,i)},y.prototype.zI=function(){var t=this,i=!0;t.OO.running&&(Object.keys(t.hI).forEach((function(n){var e=t.hI[n],r=e?e.getCurrentStream():null;r&&r.type!==f.SUBTITLES&&(i=i&&!e.isInError())})),i&&(t.OO.onLoadComplete(),t.VI()))},y.prototype.TS=function(){this.onPreloadEnd(),this.publish(g.PRELOAD_COMPLETE)},y.prototype.tO=function(t,i){this.BI(t)&&this.__controller.sendEvent(d.LIVE_SYNCH,i)},y.prototype.BI=function(t){return t&&t.type===f.MAIN},y.prototype.xI=function(){var t=this;if(t.VO!==t.STATES.INITIALIZED)return!1;var i=!0;return Object.keys(t.hI).forEach((function(n){if(n!==f.SUBTITLES){var e=t.hI[n];i=i&&(!e.isActive()||e.isStreamReady())}})),i},y.prototype.KE=function(){var t=this.SE;this.SE=[],t.forEach((function(t){var i=t[0],n=t[1],e=t.length>2?t[2]:null;n&&"function"==typeof n&&n.apply(i,e)}))},y.prototype.destroy=function(){var t=this;t.jI(),t.OI(),t.OO&&(t.OO.destroy(),t.OO=null),t.vS&&(t.vS.destroy(),t.vS=null),t.K_&&(t.K_.destroy(),t.K_=null),t.mI&&(t.mI.destroy(),t.mI=null),t.rI&&(t.rI.destroy(),t.rI=null),t.dI.destroy(),t.SE=[],v.prototype.destroy.call(t)}},5985:function(t,i,n){"use strict";t.exports.SubtitleStreamer=h,t.exports.SubtitleLiveStreamer=a;var e=n(2990),r=n(2350).Streamer,s=n(7980),o=n(2701).CmdNames,u=n(7650).HLSEvent;function h(t,i){this.CO(t,i)}function a(t,i){this.CO(t,i)}e.inherits(h,r),e.inherits(a,s),a.prototype.CO=h.prototype.CO=function(t,i){var n=this;n.constructor.super_.call(n,t,i),n.f_=n.constructor.super_.prototype,n.HI={},n.tT=o.CMD_SUBTITLE_SEGMENT_LOAD,n.primary=!1,n.VO=t.isReady()?n.STATES.INITIALIZED:n.STATES.NONE},a.prototype.destroy=h.prototype.destroy=function(){var t=this;t.HI={},t.f_.destroy.call(t)},a.prototype.onPlay=h.prototype.onPlay=function(t){this.f_.onPlay.call(this,t)},a.prototype.onTimeUpdate=h.prototype.onTimeUpdate=function(t){this.HT=t},a.prototype.CT=h.prototype.CT=function(){var t=this;return t.YI(t.HT)>=t.QT},a.prototype.tI=h.prototype.tI=function(){return this.YI()>=this._m.config.maxTotalBuffer},a.prototype.BO=h.prototype.BO=function(t){var i=this.zO;return i?{subtitleStream:i,segment:i.getSegmentfromSeqNum(t),live:this._m.live}:{}},a.prototype.onSubtitleSegmentLoadComplete=h.prototype.onSubtitleSegmentLoadComplete=function(t,i){var n=this;if(i){var e=i.data;n.__controller.sendEvent(u.VTT_SEGMENT_LOADED,e),n.HI[e.sequenceNum]={start:e.startTime,end:e.startTime+e.duration}}n.f_.onSegmentLoadComplete.call(n,t)},a.prototype.onSubtitleSegmentLoadError=h.prototype.onSubtitleSegmentLoadError=function(t){var i=this;i.VO=i.STATES.NONE,i.vS.removeCommand(t)},a.prototype.VT=h.prototype.VT=function(t){var i=this,n=i.zO,e=t;if(!isNaN(e))for(;i.HI[e];)e++;return!i.ZT&&e>n.endSeqNum?(i.NT(!0),n.endSeqNum):e},a.prototype.YI=h.prototype.YI=function(t){var i=this.zO,n=i.getSeqNumBeforePosition(t);if(isNaN(n))return 0;for(var e=0;n<=i.endSeqNum;n++){var r=this.HI[n];if(!r)break;e=r.end-t}return e},a.prototype.qI=h.prototype.qI=function(){var t=this,i=0;return Object.keys(t.HI).forEach((function(n){var e=t.HI[n];e&&(i+=e.end-e.start)})),i},a.prototype.HO=h.prototype.HO=function(){this.zO},a.prototype.iI=h.prototype.iI=function(){},a.prototype.qS=h.prototype.qS=function(){},a.prototype.onSynchMetadataReady=h.prototype.onSynchMetadataReady=function(){},a.prototype.setABRMode=h.prototype.setABRMode=function(){},a.prototype.canSwitch=h.prototype.canSwitch=function(){return!0}},4571:function(t,i,n){"use strict";t.exports=h;var e=n(1426),r=n(574).AbrModes,s=n(2999),o=n(2990),u=n(7650).HLSEvent;function h(){var t=this;t._m=t.__controller.model,t.WI=t.__controller.create(e),t.QI={estimatedBandwidthInBps:0,bitrateList:[],currentIndex:0,bufferLength:0},t._h={},t.rO(),t.SWITCH_BEGIN="switchBegin",t.SWITCH_END="switchEnd",t.SCENARIOS={STARTUP:"startup",LOAD:"load",ERROR:"error",MIDSEGMENT:"mid-segment"},t.switching=!0,s.call(t,t.constructor.name),t._h[u.MEDIA_LOADED]=t.__controller.addEventListener(u.MEDIA_LOADED,t.rO,t)}o.inherits(h,s),h.prototype.destroy=function(){var t=this;t.WI.destroy(),t.__controller.removeEventListeners(t._h),s.prototype.destroy.call(t)},h.prototype.switchStream=function(t,i,n){var e=this;e._m.getABRMode()!==r.AUTO&&e._m.streams.forEach((function(t,i){e._m.getUserReqBitrate()===t.bitrate&&(n=i)}));var s=e._m.currentLoadingStreamIndex,o=e.ZI(),u=e.XI(n,t,o);return!(u<0)&&(u!==s&&((!i||!("up"===i&&u<s||"down"===i&&u>s))&&(e._m.setCurrentLoadingStream(u),e.switching=!0,e.publish(e.SWITCH_BEGIN,u),!0)))},h.prototype.XI=function(t,i,n){return"number"==typeof t?t:this.WI.getNextStreamIndex(n,i===this.SCENARIOS.STARTUP)},h.prototype.switchComplete=function(){var t=this;t.switching=!1,t.publish(t.SWITCH_END)},h.prototype.ZI=function(){var t=this;t.$I();var i=t.QI,n=t.__controller.services.bandwidthEstimator,e=t._m.dimensions;return i.estimatedBandwidthInBps=1e3*n.averageBandwidth*1e3,i.currentIndex=t._m.currentLoadingStreamIndex,i.bufferLength=t._m.bufferLength,i.displayWidth=isNaN(e.width)?640:e.width,i.displayHeight=isNaN(e.height)?360:e.height,i.pixelRatio=t._m.pixelRatio,i.is360=t._m.is360,i.streams=t._m.streams,i.segmentLength=t._m.getSegmentLength(),i},h.prototype.rO=function(){this.$I()},h.prototype.$I=function(){var t=this;t._m.streams&&!t.QI.bitrateList.length&&(t.QI.bitrateList=[],t._m.streams.forEach((function(i){t.QI.bitrateList.push("VBR"===i.rcMode.toUpperCase()?i.avgBitrate:i.bitrate)})))}},27:function(t,i,n){"use strict";t.exports.TsStreamer=a,t.exports.TsLiveStreamer=c;var e=n(2990),r=n(2350).Streamer,s=n(7980),o=n(2701).CmdNames,u=n(6837),h=n(5557);function a(t,i){this.CO(t,i)}function c(t,i){this.CO(t,i),this.SEGMENT_OFFSET=2}e.inherits(a,r),e.inherits(c,s),c.prototype.CO=a.prototype.CO=function(t,i){var n=this;n.constructor.super_.call(n,t,i),n.f_=n.constructor.super_.prototype,n.processOnlyMetadata=!1,n.lastChunkEndTs={audio:NaN,video:NaN},n.lastFrameDuration={audio:NaN,video:NaN},n.UO(),n.tT=o.CMD_SEGMENT_LOAD,n.primary=!0;var e=n.__controller.getMinimumBufferTime(),r=[{codec:"avc1.640021",type:"video",mimeType:'video/mp4; codecs="avc1.640021"',minBufferTime:e}];t&&t.hasAudio&&r.push({codec:"mp4a.40.2",type:"audio",mimeType:'audio/mp4; codecs="mp4a.40.2"',minBufferTime:e}),n.__controller.sendMessage(h.MessageIds.CREATE_SRC_BUFFER,[r],["tracks"]),n.VO=n.STATES.INITIALIZED},c.prototype.destroy=a.prototype.destroy=function(){var t=this;t.UO(),t.f_.destroy.call(t)},c.prototype.onSeeking=a.prototype.onSeeking=function(t){var i=this;i.lastChunkEndTs={audio:NaN,video:NaN},i.f_.onSeeking.call(i,t)},c.prototype.onSwitchBegin=a.prototype.onSwitchBegin=function(){var t=this;t.UO(),t.f_.onSwitchBegin.call(t)},c.prototype.FO=a.prototype.FO=function(){this.UO()},c.prototype.BO=a.prototype.BO=function(t){var i=this;return{segment:i._m.getSegment(i._m.currentLoadingStreamIndex,t),stream:i.zO,state:{mp4:i.GO,lastChunkEndTs:i.lastChunkEndTs,lastFrameDuration:i.lastFrameDuration,isAltAudioActive:i.XT},onlyMetadata:i.processOnlyMetadata}},c.prototype.onSegmentLoadProgress=a.prototype.onSegmentLoadProgress=function(t,i,n){var e=this;if(i){var r=i.getParam?i.getParam("parsedInfo"):null;r&&(u.isNumber(r.pcr)&&e._m.setPCR(r.pcr),u.isNumber(r.frameRate)&&e.zO.setFrameRate(r.frameRate),u.isNumber(r.startOffsetTimestamp)&&e._m.setStartOffset(r.startOffsetTimestamp),r.lastChunkEndTs&&(e.lastChunkEndTs=r.lastChunkEndTs),r.lastFrameDuration&&(e.lastFrameDuration=r.lastFrameDuration)),e.f_.onSegmentLoadProgress.call(e,t,i,n)}},c.prototype.qS=a.prototype.qS=function(t,i){var n=this;t&&(n.f_.qS.call(n,t,i),t.forEach((function(t){n.GO[t.type].shouldInit=!1})))},c.prototype.onSynchMetadataReady=a.prototype.onSynchMetadataReady=function(t){var i=this;i.processOnlyMetadata=!1,i.f_.onSynchMetadataReady.call(i,t)},c.prototype.onManualStreamChange=a.prototype.onManualStreamChange=function(){var t=this;t.UO(),t.lastChunkEndTs={audio:NaN,video:NaN},t.f_.onManualStreamChange.call(t)},c.prototype.midSegUpSwitch=a.prototype.midSegUpSwitch=function(){var t=this;t.UO(),t.lastChunkEndTs={audio:NaN,video:NaN},t.f_.midSegUpSwitch.call(t)},c.prototype.UO=a.prototype.UO=function(){this.GO={audio:{shouldInit:!0,seqNum:0},video:{shouldInit:!0,seqNum:0}}},c.prototype.HO=a.prototype.HO=function(t,i){},a.prototype.onSynchBegin=function(){this.processOnlyMetadata=!0},c.prototype.YO=function(t){var i=this;i.lastChunkEndTs={audio:NaN,video:NaN},i.f_.YO.call(i,t)}},7572:function(t){"use strict";var i="api",n="network",e="decode";function r(t,i){var n=this;n.code=t[0],n.message=t[1],n.type=t[2],n.isDrm=t[3],i&&(n.message+=": "+i),n.error=new Error(n.message,n.code)}t.exports={Error:r,ERR_XHR_LOAD:[11,"Failed to load xhr request",n,!1],ERR_PLAYLIST_LOAD:[12,"Failed to load Playlist",n,!1],ERR_SUBS_LOAD:[13,"Failed to load Subtitle",n,!1],ERR_SEGMENT_LOAD:[14,"Failed to load Segment",n,!1],ERR_PARTIAL_LOAD:[15,"Loader failed to load complete data",n,!1],ERR_MASTER_PLAYLIST_PARSE:[16,"Failed to parse Master Playlist",e,!1],ERR_MEDIA_PLAYLIST_PARSE:[17,"Failed to parse Media Playlist",e,!1],ERR_SEGMENT_PARSE:[18,"Failed to parse segment data",e,!1],ERR_API_NO_NODE:[19,"No video node is being set",i,!1],ERR_MIMETYPE_NOT_SUPPORTED:[20,"Mimetype is not supported in current browser",e,!1],ERR_XHR_LOAD_LIVE_PAUSE:[21,"Failed to load xhr request during live pause",n,!1],ERR_DRM_EME_MISSING:[22,"Browser EME components not detected or HTTPS required",e,!0],ERR_DRM_INIT:[23,"Failed to initialize DRM components",e,!0],ERR_DRM_CONFIG:[24,"Browser/system does not support the requested DRM configurations",e,!0],ERR_DRM_LICENSE_REQUEST:[25,"Failed to get DRM license",e,!0],ERR_XHR_LOAD_FORBIDDEN:[27,"Forbidden to load xhr request",n,!1]},r.prototype.dto=function(){var t=this;return{code:t.code,message:t.message,type:t.type,isDrm:t.isDrm}}},7650:function(t,i){"use strict";i.HLSEvent={STATE_CHANGED:"stateChanged",PRELOAD_PROGRESS:"preloadProgress",MEDIA_LOADED:"mediaLoaded",MEDIA_METADATA_LOADED:"mediaMetadataLoaded",STREAM_UPDATED:"streamUpdated",INFO_UPDATE:"infoUpdate",SEGMENT_FIRST_BYTE_LOADED:"segmentFirstByteLoaded",SEGMENT_RENDERED:"segmentRendered",VTT_SEGMENT_LOADED:"vttSegmentLoaded",PCR_AVAILABLE:"pcrAvailable",STREAM_SWITCHED:"streamSwitched",LIVE_LOADING_LATE:"liveLoadingLate",LIVE_SYNCH:"liveSynch",WAITING:"hlsWaiting",CUEPOINT_DETECTED:"cuepointDetected",CUEPOINT_STARTED:"cuepointStarted",ABR_DATA_UPDATED:"abrDataUpdated",ERROR:"error",SEG_INFO_METRICS_AVAILABLE:"segInfoMetricsAvailable",CONTENT_LOAD_FINISHED:"contentLoadFinished",PRELOAD_START:"preloadStart",PRELOAD_COMPLETE:"preloadComplete",CC_VTT_AVAILABLE:"ccVttAvailable",BUFFER_GROWTH_DETECTED:"bufferGrowthDetected",MULTI_LANGUAGES_AVAILABLE:"multiLanguagesAvailable",TIMED_METADATA_READY:"timedMetadataReady",PLAY_BLOCKED:"playbackBlocked",BUFFER_GAP_DETECTED:"bufferGapDetected",DATE_RANGE_STARTED:"daterangeStarted",DATE_RANGE_ENDED:"daterangeEnded",STREAM_SYNCH_COMPLETE:"streamsynchComplete",STREAM_SYNCH_STRATEGY_APPLIED:"streamsynchStrategyApplied"},i.ExternalEvents=[i.HLSEvent.MEDIA_LOADED,i.HLSEvent.MEDIA_METADATA_LOADED,i.HLSEvent.INFO_UPDATE,i.HLSEvent.VTT_SEGMENT_LOADED,i.HLSEvent.SEGMENT_FIRST_BYTE_LOADED,i.HLSEvent.SEGMENT_RENDERED,i.HLSEvent.STREAM_SWITCHED,i.HLSEvent.LIVE_LOADING_LATE,i.HLSEvent.STREAM_UPDATED,i.HLSEvent.WAITING,i.HLSEvent.CUEPOINT_DETECTED,i.HLSEvent.CUEPOINT_STARTED,i.HLSEvent.ABR_DATA_UPDATED,i.HLSEvent.PRELOAD_PROGRESS,i.HLSEvent.SEG_INFO_METRICS_AVAILABLE,i.HLSEvent.CONTENT_LOAD_FINISHED,i.HLSEvent.PRELOAD_START,i.HLSEvent.PRELOAD_COMPLETE,i.HLSEvent.CC_VTT_AVAILABLE,i.HLSEvent.BUFFER_GROWTH_DETECTED,i.HLSEvent.MULTI_LANGUAGES_AVAILABLE,i.HLSEvent.TIMED_METADATA_READY,i.HLSEvent.PLAY_BLOCKED,i.HLSEvent.BUFFER_GAP_DETECTED,i.HLSEvent.DATE_RANGE_STARTED,i.HLSEvent.DATE_RANGE_ENDED,i.HLSEvent.STREAM_SYNCH_COMPLETE,i.HLSEvent.STREAM_SYNCH_STRATEGY_APPLIED]},3713:function(t,i,n){"use strict";t.exports=s;var e=n(2990),r=n(4892);function s(t,i){var n=this;t.noDemux=!0,n.constructor.super_.call(n,t,i),n.f_=n.constructor.super_.prototype}e.inherits(s,r),s.prototype.destroy=function(){this.f_.destroy.call(this)}},1811:function(t,i,n){"use strict";t.exports=u;var e=n(2999),r=n(2990),s=n(2701).CmdNames,o=n(2503).StreamTypes;function u(t){var i=this;i._m=i.__controller.model,i.vS=t,i.SWITCH_ON_ERROR="switchOnError",i.iE=null,e.call(i,i.constructor.name),i.running=!1}r.inherits(u,e),u.prototype.destroy=function(){var t=this;t._m=null,t.vS=null,t.iE=null,t.running=!1},u.prototype.handle=function(t,i){var n=this;if(t&&i&&i.type!==o.SUBTITLES){var e=i.index;n.iE=t;var r={streamIndex:e,error:t};n.running=!0;var u=n.vS.getCommand(s.CMD_ERROR_HANDLE);u?u.execute(e):n.vS.executeCommand(s.CMD_ERROR_HANDLE,r,n)}},u.prototype.onErrorHandleProgress=function(t,i){this.publish(this.SWITCH_ON_ERROR,i.index)},u.prototype.onErrorHandleError=function(t){var i=this;i.running=!1,i.vS.removeCommand(t),i.__controller.notifyError(i.iE)},u.prototype.onLoadComplete=function(){var t=this;t.running=!1;var i=t.vS.getCommand(s.CMD_ERROR_HANDLE);t.vS.removeCommand(i)}},1511:function(t,i,n){"use strict";t.exports=h;var e=n(4892),r=n(5557),s=n(2990),o=n(867),u=n(3789);function h(t,i){var n=this;if(n._m=n.__controller.model,n.IE=n._m.config.useWorker,n.JI=n._m.userAgent,n.fE="HlsTransformer",n.lE=s.guid(),n.cS=t,n.fS=i,n.MIN_BUFFER_LENGTH=5,n.jE()){if(n.ME=n.__controller.services.getWorker(n.fE),n.ME)return n.ME.addEventListener("message",n.kE.bind(n)),void n.RE(r.MessageIds.CREATE,[t]);n._m.config.useWorker=!1}n.KI=new e(t,i),n.IE=!1}h.prototype.destroy=function(){var t=this;t.IE&&t.ME?t.RE(r.MessageIds.DESTROY):t.KI.destroy()},h.prototype.close=function(){var t=this;t.IE&&t.ME?t.RE(r.MessageIds.CALL_METHOD,null,"close"):t.KI.close()},h.prototype.append=function(t){var i=this;i.IE&&i.ME?i.RE(r.MessageIds.CALL_METHOD,[t],"append",[t.buffer]):i.KI.append(t)},h.prototype.endOfSegment=function(){var t=this;t.IE&&t.ME?t.RE(r.MessageIds.CALL_METHOD,null,"endOfSegment"):t.KI.endOfSegment()},h.prototype.kE=function(t){if(t){var i=t.data?new u(t.data):t;if(i&&i.instanceId===this.lE&&(i.id===r.MessageIds.APPEND_SRC_BUFFER||i.id===r.MessageIds.TIMED_METADATA)){var n=i.getParam("parsedInfo");n&&(n.inWorkerScope=!0),this.fS(i)}}},h.prototype.jE=function(){var t=this;return!!t.IE&&(t.JI.chrome&&!t.JI.win7?t.IE=!(t.__controller&&t.__controller.getState()>=o.PLAY_REQUESTED)||t._m.bufferLength>t.MIN_BUFFER_LENGTH:t.IE=!1,t.IE)},h.prototype.RE=function(t,i,n,e){var s=this;if(s.ME&&t){var o={type:r.MessageTypes.MESSAGE,id:t,moduleName:s.fE,instanceId:s.lE,funcName:n,args:i,timestamp:Date.now()};s.ME.postMessage(o,e)}}},4892:function(t,i,n){"use strict";t.exports=h;var e=n(8457),r=n(5328),s=n(6837),o=n(5557),u=n(3789);function h(t,i){var n=this;n.cS=t,n.fS=i,n._j=t.noDemux?null:new e(t.demux,n.processSegmentData.bind(n)),n.tM=new r,n.DEFAULT_WIDTH=640,n.DEFAULT_HEIGHT=360,n.GAP_EPSILON=100,n.iM=n.cS.startOffsetTimestamp,n.nM=n.cS.lastChunkEndTs||{audio:NaN,video:NaN},n.eM=n.cS.lastFrameDuration||{audio:NaN,video:NaN},n.XT=n.cS.isAltAudioActive,n.rM=n.cS.prevSegEndTimeStamps;var s=n.cS.mp4State;n.sM={audio:!s||!s.audio||s.audio.shouldInit,video:!s||!s.video||s.video.shouldInit},n.oM={audio:0,video:0},n.uM={audio:{dts:NaN,pts:NaN},video:{dts:NaN,pts:NaN}}}h.prototype.destroy=function(){var t=this;t._j&&(t._j.destroy(),t._j=null),t.tM.destroy()},h.prototype.close=function(){this._j&&this._j.destroy()},h.prototype.append=function(t){this._j&&this._j.append(t)},h.prototype.endOfSegment=function(){this._j&&this._j.endOfSegment()},h.prototype.processSegmentData=function(t){var i=this;if(t&&!t.error){var n,e=t.avData,r=t.pos,s=t.timedMetadata,h=i.cS.startTime,a=i.cS.timescale,c=0;if(e){var f=i.cS.pcr;(null==f||isNaN(f))&&(i.cS.pcr=f=e.pcr-h*a);var l=[],v=e.audio,d=e.video,p=null,m=[];if(v&&v.frames&&v.frames.length&&!i.XT&&(v.type="audio",v.config.timescale=a,v.config.duration=i.cS.duration*v.config.timescale,v.config.useEditBox=i.cS.useEditBox,c=i.hM("audio",v.frames[0],f,h,a),v.frames.forEach((function(t){t.dts-=c,t.pts-=c})),v.startTime=v.frames[0].dts,v.endTime=v.frames[v.frames.length-1].dts,l.push(v)),d&&d.frames&&d.frames.length){if(d.type="video",d.config.timescale=a,d.config.duration=i.cS.duration*d.config.timescale,d.config.width=i.cS.width||i.DEFAULT_WIDTH,d.config.height=i.cS.height||i.DEFAULT_HEIGHT,d.config.useEditBox=i.cS.useEditBox,d.frames.length>1){var b=d.frames[1].dts-d.frames[0].dts;d.config.frameRate=d.config.timescale/b,i.cS.frameRate=d.config.frameRate}c=i.hM("video",d.frames[0],f,h,a),d.frames.forEach((function(t){t.dts-=c,t.pts-=c})),d.startTime=d.frames[0].dts,d.endTime=d.frames[d.frames.length-1].dts,p=d.frames[0].pts,l.push(d);for(var g=0;g<d.frames.length;g++)for(var y=0;y<d.frames[g].cea608Data.length;y++){var w=d.frames[g].cea608Data[y];w.pts=d.frames[g].pts,w.dts=d.frames[g].dts,w.timescale=d.config.timescale,m.push(w)}}n=new u({type:o.MessageTypes.MESSAGE,id:o.MessageIds.APPEND_SRC_BUFFER});var _={};_.position=i.position=r,_.pcr=f,_.frameRate=i.cS.frameRate,"number"!=typeof i.iM&&"number"==typeof p&&(i.iM=p),_.startOffsetTimestamp=i.iM;var E=i.aM(l);_.lastChunkEndTs=i.nM,_.lastFrameDuration=i.eM,n.putParam("parsedInfo",_);var O=[];E&&E.tracks&&(n.putParam("tracks",E.tracks),E.tracks.forEach((function(t){O.push(t.data.buffer)})),m&&m.length>0&&n.putParam("cea608TrackData",m),n.putParam("transferables",O))}else{if(!s)return;var A=s.pts-i.cS.pcr;c=this.cM(A,h,a),s.timestamp=(A-c)/a,delete s.pts,(n=new u({type:o.MessageTypes.MESSAGE,id:o.MessageIds.TIMED_METADATA})).putParam("timedMetadata",s)}i.fS&&i.fS(n)}},h.prototype.hM=function(t,i,n,e,r){var s=this,o=s.uM[t];isNaN(o.dts)&&isNaN(o.pts)&&(s.uM[t]={dts:i.dts-n,pts:i.pts-n});var u=s.oM[t];return 0!==u?u+n:(s.oM[t]=s.cM(s.uM[t].dts,e,r),s.oM[t]+n)},h.prototype.cM=function(t,i,n){var e=this;if(!e.cS.discontinuity)return 0;var r=e.rM?e.rM.audio:NaN;return t-(i=isNaN(r)?i*n:r)},h.prototype.aM=function(t){var i=this;if(t&&t.length){var n={tracks:[]};return t.forEach((function(t){if(t){t.config.offset=i.cS.live?0:i.iM;var e=i.cS.mp4State,r=i.sM[t.type];t.config.shouldInit=s.isNullOrUndefined(r)?"start"===i.position:r,t.config.seqNum=e[t.type]?e[t.type].seqNum++:0,"video"===t.type?t.config.defaultFrameDuration=i.cS.timescale/i.cS.frameRate:"audio"===t.type&&(t.config.defaultFrameDuration=Math.ceil(1024*i.cS.timescale/t.config.samplingFreq)),i.fM(t.type,t.frames,t.config.defaultFrameDuration),i.sM[t.type]=!1,i.cS.onlyMetadata&&(t.frames=[]);var o=i.tM.generate(t);o.onlyMetadata=i.cS.onlyMetadata,n.tracks.push(o)}})),n}},h.prototype.fM=function(t,i,n){var e=this;if(i&&i.length){var r=i[i.length-1].dts,o=i[0].dts;if(s.isNumber(e.nM[t])&&!isNaN(e.nM[t])){var u=o-e.nM[t],h=Math.ceil(2*e.eM[t])-e.GAP_EPSILON,a=Math.ceil(10*e.eM[t]);if(u>h);else if(u<e.eM[t]-e.GAP_EPSILON&&"audio"===t){var c=e.nM[t]+e.eM[t];c-o>n&&(c=o+n-1),i[0].pts=c,i[0].dts=i[0].pts}if(u>h&&u<a)for(var f=Math.floor(u/n),l=0;l<f;l++){var v=i[0].pts,d=i[0].dts;i.unshift(s.deepCopy(i[0])),i[0].pts=v-n,i[0].dts=d-n}}e.nM[t]=r,e.eM[t]=n}}},6473:function(t){"use strict";t.exports=i;function i(){}i.prototype.lM=function(t,i){for(var n=this,e=i,r=0;n.vM(t,i);)r+=10,r+=n.dM(t,i+6),n.pM(t,i+10)&&(r+=10),i+=r;return r>0?t.subarray(e,e+r):null},i.prototype.vM=function(t,i){return i+10<=t.length&&73===t[i]&&68===t[i+1]&&51===t[i+2]&&t[i+3]<255&&t[i+4]<255&&t[i+6]<128&&t[i+7]<128&&t[i+8]<128&&t[i+9]<128},i.prototype.pM=function(t,i){return i+10<=t.length&&51===t[i]&&68===t[i+1]&&73===t[i+2]&&t[i+3]<255&&t[i+4]<255&&t[i+6]<128&&t[i+7]<128&&t[i+8]<128&&t[i+9]<128},i.prototype.dM=function(t,i){var n=(127&t[i])<<21;return n|=(127&t[i+1])<<14,n|=(127&t[i+2])<<7,n|=127&t[i+3]},i.prototype.getString=function(t){var i=this.lM(t,0);if(!i||!i.length)return null;for(var n="",e=0;e<i.length;e++)n+=String.fromCharCode(i[e]);return n},i.prototype.mM=function(t){return 100===t[5]?self.dM(t,10):0},i.prototype.bM=function(t,i){var n=t.subarray(i,i+4);return String.fromCharCode.apply(null,n)},i.prototype.getID3Payload=function(t){var i=this,n=i.lM(t,0);if(!n||!n.length)return null;var e=10+i.mM(n);return{key:i.bM(n,e),data:n.subarray(e+10)}},i.prototype.extractID3FromMessage=function(t){if(!t)return null;t=new Uint8Array(t);for(var i=0;!this.vM(t,i);)i++;return i+10>t.length?null:t.subarray(i)}},4361:function(t,i,n){"use strict";t.exports.StreamLoader=a;var e=n(2701).CmdNames,r=n(574).MetadataTypes,s=n(7572),o=n(2990),u=n(2999),h=t.exports.Events={STREAM_LOADED:"streamLoaded",STREAM_LOAD_ERROR:"streamLoadError"};function a(t){var i=this;u.call(i,i.constructor.name),i._m=i.__controller.model,i.vS=t,i.lS=i.__controller.services.metadataParser,i.stream=null,i.loaded=!1}o.inherits(a,u),a.prototype.destroy=function(){u.prototype.destroy.call(this)},a.prototype.load=function(t,i){var n=this;t&&(n.stream=t,n.loaded=!1,n.vS.executeCommand(e.CMD_STREAM_LOAD,{stream:t,retryOpts:i},n))},a.prototype.cancel=function(){this.vS.removeRelatedCommands(e.CMD_STREAM_LOAD)},a.prototype.onStreamLoadComplete=function(t,i){var n=this;if(t)if(i&&i.stream){var e=i.stream,s={rawData:i.data,headers:i.headers,type:r.RAW,streamType:e.type,groupId:e.groupId,name:e.name,url:i.streamUrl,index:e.index};n._m.build(n.lS.parse(s)),n.vS.removeCommand(t),n.loaded=!0,n.publish(h.STREAM_LOADED,e)}else n.vS.removeCommand(t)},a.prototype.onStreamLoadError=function(t,i){var n=this;n.vS.removeCommand(t);var e=i.code===s.ERR_XHR_LOAD[0]?new s.Error(s.ERR_PLAYLIST_LOAD):i;n.publish(h.STREAM_LOAD_ERROR,n.stream,e)}},2191:function(t,i,n){"use strict";t.exports=r;var e=n(6837);function r(){var t=this;t.gM={},t.yM=Number.NaN,t.wM=!1,t._M=NaN,t.EM=[]}r.prototype.destroy=function(){this.gM={},this.EM=[]},r.prototype.addStream=function(t){var i=this;i.EM.push(t),i.EM.length&&(i.yM=i.EM[0].endSeqNum)},r.prototype.update=function(t){var i=this;if(t){var n=i.OM(t);if(n){var e=i.__controller.model.live;if(e&&(t=n.isDash()?i.AM(t,n):i.SM(t)),n.updateConfig(t),i.TM(t),e&&!n.isDash()&&i.yM>=n.endSeqNum){var r=1e3*n.targetDuration,s=!isNaN(r)&&r>0?r:n.refreshInterval;n.refreshInterval=.5*s}i.yM=n.endSeqNum}}},r.prototype.OM=function(t){var i=this;if(!t||!i.EM.length)return null;for(var n=0;n<i.EM.length;n++)if(i.EM[n].equals(t))return i.EM[n];return null},r.prototype.TM=function(t){var i=this;if(t&&t.segmentInfoList&&t.segmentInfoList[0].programDateTime&&i.EM.length)for(var n,e=t.segmentInfoList[0],r=0;r<i.EM.length;r++){var s=i.EM[r],o=s.segments;if(s.index!==t.index){for(n=0;o&&n<o.length;n++)if(o[n].seqNum===e.sequenceNum){o[n].programDateTime=e.programDateTime;break}}else for(n=1;n<t.segmentInfoList.length;n++){var u=o[n],h=o[n-1];u.programDateTime=h.programDateTime+1e3*h.duration}}},r.prototype.SM=function(t){var i=this;if(!t)return t;var n=t.segmentInfoList;if(!n||!n.length)return t;Object.keys(i.gM).length||(i.gM[n[0].sequenceNum]={startTime:n[0].startTime,programDateTime:n[0].programDateTime});var e,r,s,o,u=i.gM[n[0].sequenceNum];if(u&&"number"==typeof u.startTime)e=i.gM[n[0].sequenceNum].startTime;else{var h=Object.keys(i.gM),a=parseInt(h[h.length-1]);n[n.length-1].sequenceNum;var c=0;for(r=1;r<n.length;r++)if(-1!==h.indexOf(n[r].sequenceNum.toString())){c=r;break}if(c)for(e=i.gM[n[c].sequenceNum].startTime,r=c-1;r>=0;r--)e-=n[r].duration;else{if(n[0].sequenceNum>a)s=parseInt(h[h.length-1]),o=i.gM[s];else for(r=n[n.length-1].sequenceNum;r<=a;){if(-1!==h.indexOf(r.toString())){s=r,o=i.gM[s];break}r++}e="number"==typeof o.programDateTime?o.startTime+(n[0].programDateTime-o.programDateTime)/1e3:o.startTime+(n[0].sequenceNum-s)*n[0].duration}}var f=0;return n.forEach((function(t){t.startTime=e+f,f+=t.duration,!i.wM&&t.discontinuity&&(i.wM=!0,i._M=t.startTime),i.wM&&!isNaN(i._M)&&(t.discontinuity=t.startTime>=i._M),i.gM[t.sequenceNum]||(i.gM[t.sequenceNum]={startTime:t.startTime,programDateTime:t.programDateTime})})),t},r.prototype.AM=function(t,i){if(!t||!i)return t;var n=t.segmentInfoList;if(!n||!n.length)return t;var e=i.segments;if(!e||!e.length)return t;for(var r=0,s=!1,o=0;o<e.length;o++)if(r=e[o].seqNum,e[o].startTime>=n[0].startTime){s=!0;break}s||r++;for(var u=0;u<n.length;u++)n[u].sequenceNum=r,r++;return t},r.prototype.adjustStartTime=function(t,i,n){var r=this;if(t&&!e.isNullOrUndefined(n)&&!e.isNullOrUndefined(i)){var s=Object.keys(r.gM),o=s.length?s[0]:null,u=o?r.gM[o]:null,h=u?(u.programDateTime-n)/1e3-(u.startTime-i):0;h?(s.forEach((function(t){(u=r.gM[t]).startTime+=h})),t.segments.forEach((function(t){u=r.gM[t.seqNum],t.startTime=u?u.startTime:t.startTime+h})),t.adjusted=!0):t.adjusted=!0}}},5514:function(t,i,n){"use strict";t.exports=a;var e=n(4460),r=n(2999),s=n(7650),o=n(2990),u=n(3093).userAgent,h=n(8734);function a(t,i,n,e){var s=this;r.call(s,s.constructor.name),s.node=i,s.window=t,s.mediaSource=new t.MediaSource,s.SE=[],s.IM=!1,s.node.mediaKeys?(s.node.src="",s.node.setMediaKeys(null).then((function(){s._y(t,i,n,e)}))):s._y(t,i,n,e)}o.inherits(a,r),a.prototype._y=function(t,i,n,r){var s=this;s.node.src=t.URL.createObjectURL(s.mediaSource),(r=r||{}).userAgent=u,r.inWorkerScope=!1,r.metadata=n,s.appModel=s.create(h,r),s.controller=s.create(e,n),s.IM=!0,s.node.load(),this.KE()},a.prototype.create=function(){var t=this,i=Array.prototype.slice.call(arguments),n=i.shift(),e=Object.create(n.prototype);return e.X_=t,n.apply(e,i),e},a.prototype.sendEvent=function(t,i){var n=this;n.publish(t,i),t&&s.ExternalEvents.indexOf(t)>=0&&n.node.dispatchEvent(n.jM(t,i))},a.prototype.getSegInfo=function(){return this.controller?this.controller.getSegInfo():null},a.prototype.notifyError=function(t){var i=this;i.error=t;var n=i.error.type||"decode";"open"===i.mediaSource.readyState&&i.mediaSource.endOfStream(n),i.controller&&i.controller.destroy()},a.prototype.isMimetypeSupported=function(t){return this.window.MediaSource.isTypeSupported(t)},a.prototype.jM=function(t,i){return new this.window.CustomEvent(t,{detail:i,bubbles:!1,cancelable:!1})},a.prototype.setABRMode=function(t){var i=this;i.controller?i.controller.setABRMode(t):i.SE.push(["setABRMode",[t]])},a.prototype.setAudioLanguage=function(t){var i=this;i.controller?i.controller.setAudioLanguage(t):i.SE.push(["setAudioLanguage",[t]])},a.prototype.play=function(t){var i=this;i.controller?i.controller.play(t):i.SE.push(["play",[t]])},a.prototype.pause=function(){var t=this;t.controller?t.controller.pause():t.SE.push(["pause"])},a.prototype.preload=function(t){var i=this;i.controller?i.controller.preload(t):i.SE.push(["preload",[t]])},a.prototype.getCurrentDate=function(){return this.controller?this.controller.getCurrentDate():null},a.prototype.suspendStreaming=function(){var t=this;t.controller&&(t.IM=!1,t.controller.suspendStreaming())},a.prototype.resumeStreaming=function(){var t=this;t.controller&&!t.IM&&(t.controller.resumeStreaming(),t.IM=!0)},a.prototype.getSyncOffset=function(){return this.controller?this.controller.getSyncOffset():NaN},a.prototype.startSync=function(){this.controller&&this.controller.startSync()},a.prototype.stopSync=function(){this.controller&&this.controller.stopSync()},a.prototype.getSyncState=function(){return this.controller?this.controller.getSyncState():-1},a.prototype.destroy=function(){var t=this;t.controller&&t.controller.destroy(),t.appModel&&t.appModel.destroy(),t.mediaSource=null,t.IM=!1,r.prototype.destroy.call(t)},a.prototype.KE=function(){var t=this,i=t.SE;t.SE=[],i.forEach((function(i){var n=t.controller,e=n[i[0]],r=i.length>1?i[1]:null;e&&"function"==typeof e&&e.apply(n,r)}))}},1842:function(t,i,n){"use strict";t.exports=o;var e=n(5514),r=n(7572),s=n(2849);function o(t,i){var n=this;n.MM=i||{},n._node="string"==typeof t?document.querySelector(t):t||null,Object.defineProperty(n,"error",{enumerable:!0,get:function(){return n.X_?n.X_.error:null}}),s.apply()}o.prototype.setSrc=function(t){var i=this;if(!i._node)throw new r.Error(r.ERR_API_NO_NODE).error;if(t){if(t!==i.NM){i.NM=t,i.X_&&i.unload();try{i.X_=new e(window,i._node,i.NM,i.MM)}catch(t){}}}else i._node.src=""},o.prototype.getSegInfo=function(){try{return this.X_?this.X_.getSegInfo():null}catch(t){return null}},o.prototype.setQuality=function(t){try{this.X_.setABRMode(t)}catch(t){}},o.prototype.setAudioLanguage=function(t){try{this.X_.setAudioLanguage(t)}catch(t){}},o.prototype.unload=function(){var t=this;t.X_&&t.X_.destroy(),t.X_=null},o.prototype.play=function(t){this.X_&&this.X_.play(t)},o.prototype.pause=function(){var t=this;t.X_?t.X_.pause():t._node&&t._node.pause()},o.prototype.preload=function(t){this.X_&&this.X_.preload(t)},o.prototype.getCurrentDate=function(){if(this.X_)return this.X_.getCurrentDate()||null},o.prototype.suspendStreaming=function(){this.X_&&this.X_.suspendStreaming()},o.prototype.resumeStreaming=function(){this.X_&&this.X_.resumeStreaming()},o.prototype.getSyncOffset=function(){return this.X_?this.X_.getSyncOffset():NaN},o.prototype.startSync=function(){this.X_&&this.X_.startSync()},o.prototype.stopSync=function(){this.X_&&this.X_.stopSync()},o.prototype.getSyncState=function(){return this.X_?this.X_.getSyncState():-1},o.prototype.destroy=function(){var t=this;t.X_&&t.X_.destroy(),t.X_=null,t.NM=null,t.MM=null,t._node=null}},2807:function(t){"use strict";t.exports={useWorker:!0,maxRetries:5,maxBuffer:60,maxTotalBuffer:300,requestTimeout:10,chunkedRequestTimeout:5,pastBufferLengthLimit:{vod:180,live:10},segmentLoadMonitorInterval:1,preloadBufferLimit:0,skipGapLimit:.5,variableMinBuffer:!0,minBufferTime:{vod:.1,live:4},sendAbrAnalytics:!1,demux:{startChunkWithKeyFrame:!0},stopBufferingOnPause:!1,dimensions:{width:640,height:360},bwHistoryMaxAge:300,streamSynch:{synchronize:!1,synchConfig:null}}},8734:function(t,i,n){"use strict";t.exports=u;var e=n(2807),r=n(6837),s=n(2990),o=n(574).StreamingMode;function u(t){var i=this;if(!t||!t.userAgent)throw new Error("Invalid/incomplete configuration to AppModel");i.configure(t),i.streams=[],i.altRenditionGroups=[],i.live=!1,i.duration=0,i.timescale=9e4,i.TIMESTAMP_COMPARE_EPSILON=.065,i.PIXEL_RATIO_360=6,i.currentPlayingStreamIndex=0,i.currentLoadingStreamIndex=0,i.preloading=!1,i.currentKbps=0,i.infoUpdateSent=!0,i.streamingMode=o.HLS,i.drmRequired=!1,i.drmInfo=[],i.licenseType="none",i.is360=t.metadata&&t.metadata.is360||!1,i.setDimensions(t.dimensions)}u.prototype.destroy=function(){var t=this;t.config=null,t.streams=[],t.altRenditionGroups=[]},u.prototype.configure=function(t){var i=this;i.config=i.config||r.deepCopy(e),i.userAgent=t.userAgent,t&&Object.keys(t).forEach((function(n){i.config.hasOwnProperty(n)&&(i.config[n]=t[n])})),i.config.demux.startChunkWithKeyFrame=!(i.userAgent.chrome&&i.userAgent.chrome>=50)||i.zE(t.metadata),i.config.demux.useTimer=!(i.userAgent.chrome||i.userAgent.ie||i.userAgent.edge);var n=i.config.streamSynch.synchConfig||{},s=t.metadata,o=s&&s.syncPoint?1e3*s.syncPoint:null;n.behindLiveEdgeMs=n.behindLiveEdgeMs||o,i.config.streamSynch.synchConfig=n},u.prototype.zE=function(t){if(!t)return!1;var i=t.url,n=t.streams&&t.streams.length?this.GE(t.streams[0]):null;return s.isUplynk(i||n)},u.prototype.GE=function(t){if(!t)return null;var i=t.url;return!i&&t.host&&t.path&&(i=t.host+t.path),i},u.prototype.update=function(t){var i=this;t&&(Object.keys(t).forEach((function(n){("currentKbps"!==n||t.currentKbps||i.infoUpdateSent)&&i.hasOwnProperty(n)&&(i[n]=t[n])})),i.infoUpdateSent=!1)},u.prototype.setDimensions=function(t){var i=this.X_.node;this.kM=t||{width:i?i.clientWidth:0,height:i?i.clientHeight:0}},u.prototype.getBufferLength=function(){var t,i,n=this,e=n.X_.node,r=e.buffered,s=0,o=e.currentTime;if(0===o){for(t=0;t<r.length;t++)s+=r.end(t)-r.start(t);return s}var u=n.X_.mediaSource;s=1/0;for(var h=0;h<u.activeSourceBuffers.length;h++){var a=n.RM(o,u.activeSourceBuffers[h]);a>=0&&(s=Math.min(s,a))}for(t=0;t<r.length;t++)if(o>=r.start(t)&&o<r.end(t)){i=t;break}return i>=0&&r.length&&(s=Math.min(r.end(i)-o,s)),s===1/0&&(s=0),s},u.prototype.RM=function(t,i){if(!i)return-1;for(var n,e=i.buffered,r=0,s=0;s<e.length;s++)if(t>=e.start(s)&&t<e.end(s)){n=s;break}return n>=0&&e.length&&(r=e.end(n)-t),r},u.prototype.getBufferedDto=function(){for(var t=this.X_.node.buffered,i={length:t.length,ranges:[]},n=0;n<t.length;n++)i.ranges[n]={start:t.start(n),end:t.end(n)};return i},u.prototype.getCurrentPlayingStream=function(){var t=this;return t.streams&&t.streams.length&&t.currentPlayingStreamIndex>=0&&t.currentPlayingStreamIndex<t.streams.length?t.streams[t.currentPlayingStreamIndex]:null},u.prototype.getDimensions=function(){return this.kM},u.prototype.getPixelRatio=function(){var t=1;try{window&&(t=window.devicePixelRatio)}catch(i){t=1}return t||(t=1),this.is360&&(t*=this.PIXEL_RATIO_360),t},u.prototype.getCurrentDate=function(){var t=this.getCurrentPlayingStream(),i=this.X_.node.currentTime,n=t?t.segments:null;if(n)for(var e=n.length-1;e>=0;e--)if(n[e].programDateTime>0&&i>=n[e].startTime){var r=parseInt(1e3*(i-n[e].startTime));return n[e].programDateTime+r}},u.prototype.shouldSynchronizePlayers=function(){return this.config.streamSynch.synchronize}},676:function(t,i,n){"use strict";t.exports=u;var e=n(8776),r=n(7650).HLSEvent,s=n(2503).StreamTypes,o=n(2191);function u(t,i,n,u){var h=this;if(h.type=t,h.groupId=i,h.LM=[],h.DM=h.__controller.create(o),n){(n=h.CM(n)).forEach((function(t){var i=h.__controller.create(e,t);h.LM.push(i),h.DM.addStream(i)}));var a=h.PM("default");a||(a=h.PM("autoSelect")),a&&(h.setCurrentStream(a),a.type===s.SUBTITLES&&h.__controller.sendEvent(r.CC_VTT_AVAILABLE,{sessionId:h.__controller.model.sessionId})),t===s.AUDIO&&(u&&h.setCurrentStreamWithName(u),h.xM())}h.UM()}u.prototype.PM=function(t){for(var i=this,n=0;n<i.LM.length;n++)if(i.LM[n][t])return i.LM[n];return null},u.prototype.destroy=function(){var t=this;t.LM.forEach((function(t){t.destroy()})),t.LM=[],t.DM.destroy()},u.prototype.getCurrentStream=function(){return this.zO},u.prototype.setCurrentStream=function(t){t&&(this.zO=t)},u.prototype.setCurrentStreamWithName=function(t){var i=this;if(!t||!i.zO||t===i.zO.name)return!1;for(var n=0;n<i.LM.length;n++){var e=i.LM[n];if(t===e.name)return i.setCurrentStream(e),!0}return!1},u.prototype.update=function(t){this.DM.update(t)},u.prototype.adjustStartTime=function(t,i){var n=this;n.LM.forEach((function(e){e.adjusted||n.DM.adjustStartTime(e,t,i)}))},u.prototype.getContainerFormat=function(){return this.zO?this.zO.containerFormat:null},u.prototype.setContainerFormat=function(t){this.LM.forEach((function(i){i.containerFormat||(i.containerFormat=t)}))},u.prototype.getDrmInfo=function(){for(var t=[],i=0;i<this.LM.length;i++){var n=this.LM[i].drmInfo;if(!n)break;for(var e=0;e<n.length;e++)t.push(n[e])}return t},u.prototype.hasStreams=function(){return this.LM.length>0},u.prototype.UM=function(){return!0},u.prototype.xM=function(){var t=this,i={},n=[];t.LM.forEach((function(e){i[e.name]||(i[e.name]=1,n.push({name:e.name,language:e.language,selected:t.zO&&e.name===t.zO.name}))})),n.length>1&&t.__controller.sendEvent(r.MULTI_LANGUAGES_AVAILABLE,{sessionId:t.__controller.model.sessionId,languages:n})},u.prototype.CM=function(t){return t?t.filter((function(t){return!!t.url})):t}},8776:function(t,i,n){"use strict";t.exports=f;var e=n(7988),r=n(7159),s=n(2990),o=n(6837),u=n(2503),h=u.Stream,a=u.StreamTypes,c=n(574).StreamingMode;function f(t){var i=this;i.constructor.super_.call(i),i.f_=i.constructor.super_.prototype,i.segments=[],t&&i.updateConfig(t)}s.inherits(f,h),f.prototype.destroy=function(){var t=this;t.segments=[],t.f_.destroy.call(t)},f.prototype.updateConfig=function(t){var i=this;i.f_.updateConfig.call(i,t),t&&(i.type=t.type||i.type,i.groupId=t.groupId||i.groupId,i.language=t.language||i.language,i.name=t.name||i.name,i.default=o.isNullOrUndefined(t.default)?i.default:t.default,i.autoSelect=o.isNullOrUndefined(t.autoSelect)?i.autoSelect:t.autoSelect,i.forced=o.isNullOrUndefined(t.forced)?i.forced:t.forced);var n=e;i.type===a.SUBTITLES&&(n=i.streamingMode===c.DASH&&"mp4"===t.containerFormat?e:r),t.segmentInfoList&&t.segmentInfoList.length&&(i.segments=t.segmentInfoList.map((function(t){return t.bitrate=i.bitrate,t.sessionId=i.sessionId,t.cdn=i.cdn,i.__controller.create(n,t)}))),i.segments.length&&(i.startSeqNum=i.segments[0].seqNum,i.endSeqNum=i.segments[i.segments.length-1].seqNum),i.adjusted=i.type===a.MAIN||i.adjusted},f.prototype.equals=function(t){var i=this;return!!t&&(i.url===t.url&&i.groupId===t.groupId&&i.name===t.name)},f.prototype.setStreamIndex=function(){},f.prototype.dto=function(){}},5086:function(t){"use strict";function i(t){var i=this;t&&(i.startSeqNum=t.startSeqNum,i.startTime=t.startTime,i.cuepointDuration=t.cuepointDuration,i.isCueOutFired=!1,i.isCueOutDetectedFired=!1)}t.exports=i,i.prototype.setCueOutFiredState=function(t){this.isCueOutFired=t},i.prototype.setCueOutDetectedState=function(t){this.isCueOutDetectedFired=t},i.prototype.setCueOutStartTime=function(t){this.startTime=t},i.prototype.dto=function(){var t=this,i={};return Object.keys(t).forEach((function(n){i[n]=t[n]})),i}},87:function(t,i,n){"use strict";t.exports=r;var e=n(7166);function r(){this.VM={}}r.prototype.destroy=function(){var t=this;Object.keys(t.VM).forEach((function(i){var n=t.VM[i];n&&n.destroy()})),t.VM={}},r.prototype.add=function(t){var i=this;if(!t||!t.url)return null;var n=i.FM(t);return i.VM[n]||(i.VM[n]=new e({name:"init",url:t.url,range:t.range})),i.VM[n]},r.prototype.remove=function(t){var i=this;if(t&&t.url){var n=i.FM(t);(t=i.VM[n])&&(t.destroy(),delete i.VM[n])}},r.prototype.get=function(t){if(!t||!t.url)return null;var i=this.FM(t);return this.VM[i]},r.prototype.getFirst=function(){var t=Object.keys(this.VM);return t&&t.length?this.VM[t[0]]:null},r.prototype.FM=function(t){var i=t.range,n=i?"_"+i.start+"_"+i.end:"";return t.url+n}},574:function(t,i,n){"use strict";i.Model=d;var e=i.StreamingMode={DASH:"dash",HLS:"hls"};i.MetadataTypes={RAW:"raw",RAW_SUBTITLE:"rawSubtitle",STRUCTURED:"structured"};var r=i.AbrModes={AUTO:"auto",LOW:"low",MID:"medium",HIGH:"high"},s=n(2503),o=s.Stream,u=s.StreamTypes,h=n(676),a=n(7650).HLSEvent,c=n(2807),f=n(6837),l=n(2990),v=n(2191);function d(t){var i=this;if(!(t&&t.userAgent&&t.config&&t.metadata))throw new Error("Incomplete input parameters to Model");i.configure(t.config,t.userAgent),i.BM={},i.streams=[],i.altRenditionGroups=[],i.zM=i.__controller.create(v),i.GM(t.metadata),i.live=t.metadata&&t.metadata.live,i.hasEndlist=!1,i.duration=0,i.bufferLength=0,i.pendingBufferLength=0,i.bufferedRanges={length:0,ranges:[]},i.currentTime=0,i.timescale=9e4,i.TIMESTAMP_COMPARE_EPSILON=.065,i.preloading=!1,i.timedMetadataStore={},i.dimensions=t.config.dimensions?t.config.dimensions:{width:NaN,height:NaN},i.pixelRatio=1,i.bwHistory=t.config.bwHistory,i.HM=r.AUTO,i.YM=0,i.gM={},i.currentLoadingStreamIndex=-1,i.currentLoadingSeqNum=-1,i.qM=null,i.WM=null,i.QM=t.metadata.url&&-1!==t.metadata.url.indexOf(".mpd")?e.DASH:e.HLS,i.drmRequired=!1,i.drmInfo=[]}d.prototype.destroy=function(){var t=this;t.config=null,t.streams&&(t.streams.forEach((function(t){t.destroy()})),t.streams=[]),t.altRenditionGroups&&(t.altRenditionGroups.forEach((function(t){t.destroy()})),t.altRenditionGroups=[]),t.gM={},t.zM.destroy(),t.timedMetadataStore=null},d.prototype.configure=function(t,i){var n=this;n.config=n.config||f.deepCopy(c),n.userAgent=i,t&&(Object.keys(t).forEach((function(i){n.config.hasOwnProperty(i)&&(n.config[i]=t[i])})),n.inWorkerScope=t.inWorkerScope),f.isNullOrUndefined(n.config.demux.startChunkWithKeyFrame)&&n.userAgent&&(n.config.demux.startChunkWithKeyFrame=!(n.userAgent.chrome&&n.userAgent.chrome>=50))},d.prototype.build=function(t){var i=this;if(t){t.streamingMode===e.DASH&&(i.QM=t.streamingMode,i.drmRequired=t.drm,i.ZM=t,i.live=!(!t.type||"dynamic"!==t.type.toLowerCase()));var n=i.XM(t.renditionGroups);i.$M(t.streamInfoList,n)}},d.prototype.JM=function(t){var i,n,e,r;for(i=0;i<t.length&&(e=t[i].getDrmInfo());i++)for(n=0;n<e.length;n++)r=e[n],l.isDrmItemContained(r,this.drmInfo)||this.drmInfo.push(r)},d.prototype.XM=function(t){var i=this;return t?(Object.keys(t).forEach((function(n){var e=t[n];e&&Object.keys(e).forEach((function(t){var r=i.KM(n,t),s=e[t];s&&s.length&&(i.tN(s[0]),r?i.iN(n,t,s):i.nN(n,t,s))}))})),i.JM(i.altRenditionGroups),i.altRenditionGroups):i.altRenditionGroups},d.prototype.KM=function(t,i){for(var n=0;n<this.altRenditionGroups.length;n++){var e=this.altRenditionGroups[n];if(e.type===t&&e.groupId===i)return e}return null},d.prototype.nN=function(t,i,n){var e=this,r=e.metadata&&e.metadata.currLang,s=e.__controller.create(h,t,i,n,r);e.altRenditionGroups.push(s)},d.prototype.iN=function(t,i,n){if(n&&n.length){var e=this.KM(t,i);n.forEach((function(t){e.update(t)}))}},d.prototype.$M=function(t,i){var n=this;t&&t.length&&((t=n.CM(t)).forEach((function(t){t.sessionId=n.sessionId,t.type=u.MAIN,n.tN(t);for(var e=!1,r=n.isDash()?"groupId":"url",s=0;s<n.streams.length;s++){if(n.streams[s][r]===t[r]){n.updateStream(s,t),e=!0;break}}e||n.addStream(t,i)})),n.JM(n.streams),n.eN(),n.duration=n.live?NaN:t[0].duration)},d.prototype.CM=function(t){return t&&t.length?(this.userAgent.firefox&&t[0].channels&&(t=this.rN(t)),t=t.filter((function(t){if(!t.url)return!1;var i=t.codecs;if(!i)return!0;for(var n=0;n<i.length;n++)if(-1===i[n].indexOf("avc1")&&-1===i[n].indexOf("mp4a")&&-1===i[n].indexOf("aac"))return!1;return!0}))):t},d.prototype.rN=function(t){for(var i=!1,n=t[0].channels,e=1;e<t.length;e++)if(t[e].channels&&n!==t[e].channels){i=!0;break}return i?t.filter((function(t){return 1!==t.channels})):t},d.prototype.isDash=function(){return this.QM===e.DASH},d.prototype.addStream=function(t,i){var n=this,e=n.__controller.create(o,t,i);n.streams.push(e),e.setStreamIndex(n.streams.length-1),n.zM.addStream(e),1===n.streams.length&&n.setCurrentLoadingStream(e.index)},d.prototype.updateStream=function(t,i){var n=this;t>=n.streams.length||(!0===i.hasEndList&&(n.hasEndlist=!0),n.zM.update(i))},d.prototype.synchStreamTimelines=function(t){var i=this,n=i.getCurrentLoadingStream();if(n&&i.live&&n.segments.length){var e=n.segments[0].programDateTime,r=n.segments[0].startTime;f.isNullOrUndefined(e)||f.isNullOrUndefined(r)||i.altRenditionGroups.forEach((function(i){t&&i.type!==t||i.adjustStartTime(r,e)}))}},d.prototype.getCurrentLoadingStream=function(){return this.getStreamByIndex(this.currentLoadingStreamIndex)},d.prototype.setCurrentLoadingStream=function(t){var i=this;i.streams&&i.streams.length&&(t<0||t>=i.streams.length||(i.currentLoadingStreamIndex=t))},d.prototype.getCurrentPlayingStream=function(){return this.getStreamByIndex(this.currentPlayingStreamIndex)},d.prototype.setCurrentPlayingStream=function(t){var i=this;i.streams&&i.streams.length&&(t<0||t>=i.streams.length||(i.currentPlayingStreamIndex=t))},d.prototype.getTotalBufferLength=function(){for(var t=this.bufferedRanges,i=0,n=0;n<t.length;n++)i+=t.ranges[n].end-t.ranges[n].start;return i},d.prototype.setPCR=function(t){var i=this;(null===i.qM||void 0===i.qM||isNaN(i.qM))&&(i.qM=t,i.__controller.sendEvent(a.PCR_AVAILABLE,t))},d.prototype.getPCR=function(){return this.qM},d.prototype.setLivePlaybackStartTime=function(t){this.WM=t},d.prototype.getLivePlaybackStartTime=function(){return this.WM},d.prototype.setStartOffset=function(t){var i=this;i.startOffsetTimestamp&&!isNaN(i.startOffsetTimestamp)||(i.startOffsetTimestamp=t)},d.prototype.setSegEndTimeStamps=function(t,i,n,e){if(t&&e){var r=t===u.MAIN?this.streams:this.KM(t,i);r&&r.length&&r.forEach((function(t){var i=t.getSegmentfromSeqNum(n);i&&(i.endTimestamps.audio=e.audio,i.endTimestamps.video=e.video)}))}},d.prototype.getPrevSegEndTimestamps=function(t,i){if(!t||!i)return null;var n=t.getIndexFromSeqNum(i.seqNum);return n>=1&&t.segments&&n<t.segments.length?t.segments[n-1].endTimestamps:null},d.prototype.getStreamRefreshInterval=function(){var t=this.getCurrentLoadingStream();return t?t.refreshInterval:null},d.prototype.GM=function(t){var n=this;if(t){n.sessionId=t?t.sessionId:null,n.is360=!!t&&t.is360,t.type=i.MetadataTypes.RAW,n.metadata=t;var e=t.streams,r=t.altStreams;e&&e.length>0&&((e[0].hls_info||e[0].hlsInfo||e.length>1)&&(n.metadata.type=i.MetadataTypes.STRUCTURED,n.metadata.hasMediaMetadata=!0),(e[0].hls_info||e[0].hlsInfo)&&(n.metadata.hasStreamMetadata=!0)),n.metadata.hasMediaMetadata||n.metadata.hasStreamMetadata||(n.BM=e&&1===e.length?e[0]:t),r&&r.length&&(n.metadata.hasAltStreamMetadata=!0)}},d.prototype.eN=function(){this.streams.sort((function(t,i){return t.bitrate-i.bitrate})),this.streams.forEach((function(t,i){t.index=i,t.segments.forEach((function(t){t.setStreamIndex(i)}))}))},d.prototype.getSegment=function(t,i){return t<0||t>=this.streams.length?null:this.streams[t].getSegmentfromSeqNum(i)},d.prototype.sN=function(t){var i=[];return this.streams.forEach((function(n){n.index!==t&&i.push({index:n.index,url:n.url})})),i},d.prototype.setABRMode=function(t){var i=this,n=i.HM;return i.HM=r.AUTO,Object.keys(r).forEach((function(n){r[n]===t.preference&&(i.HM=t.preference)})),i.YM=1e3*t.stream.bitrate,n!==i.HM},d.prototype.getABRMode=function(){return this.HM},d.prototype.setAudioLanguage=function(t){var i=!1;return this.altRenditionGroups.forEach((function(n){n.type===u.AUDIO&&(i=n.setCurrentStreamWithName(t)||i)})),i},d.prototype.getMediaDto=function(){var t=this,i={streams:[],altRenditionGroups:[],live:t.live,duration:t.duration,currentPlayingStreamIndex:t.currentPlayingStreamIndex,currentLoadingStreamIndex:t.currentLoadingStreamIndex,currentLoadingSeqNum:t.currentLoadingSeqNum,preloading:t.preloading,currentKbps:t.__controller.services.segmentMetrics.getMetricsBandwidthInfo(),abrMode:t.HM,streamingMode:t.QM,drmRequired:t.drmRequired,drmInfo:t.drmInfo};return t.streams.forEach((function(t){i.streams.push(t.dto())})),i},d.prototype.updateCurrentLoadingSeqNum=function(t){return this.currentLoadingSeqNum=t},d.prototype.getUserReqBitrate=function(){return this.YM},d.prototype.tN=function(t){t&&t.segmentInfoList&&!f.isNullOrUndefined(t.hasEndList)&&f.isNullOrUndefined(this.live)&&(this.live=!t.hasEndList)},d.prototype.getMediaUrl=function(){var t=this,i=t.BM.url||"";return!i.length&&t.BM.host&&t.BM.path&&(i=t.BM.host+t.BM.path),i},d.prototype.getMediaCdn=function(){return this.BM.cdn||""},d.prototype.getStreamByIndex=function(t){var i=this;return i.streams&&i.streams.length&&t>=0&&t<i.streams.length?i.streams[t]:null},d.prototype.getSegmentLength=function(){var t=this;return t.streams&&t.streams.length?t.streams[0].targetDuration:NaN},d.prototype.updateTimedMetadata=function(t,i){var n=this;if(t&&t.payload){n.timedMetadataStore[i]=n.timedMetadataStore[i]||[];for(var e=n.timedMetadataStore[i].length,r=0;r<n.timedMetadataStore[i].length;r++){var s=n.timedMetadataStore[i][r];if(Math.abs(s.timestamp-t.timestamp)<=.1&&n.oN(s.payload,t.payload))return!1;if(t.timestamp<s.timestamp){e=r;break}}return n.timedMetadataStore[i].splice(e,0,t),!0}},d.prototype.oN=function(t,i){return!(t.key!==i.key||!t.data||!i.data||t.data.byteLength!==i.data.byteLength)&&t.data.every((function(t,n){return t===i.data[n]}))}},7166:function(t){"use strict";function i(t){var i=this;t&&(i.url=t.url,i.name=t.name,i.range=t.range);var n=i.range;i.loaded=!1,i.data=n&&n.end>=0&&n.start>=0&&n.end>n.start?new Uint8Array(n.end-n.start+1):null,i.uN=0,i.z_=i.data?i.data.byteLength:0}t.exports=i,i.prototype.destroy=function(){this.data=null},i.prototype.append=function(t){var i=this;if(i.loaded||!t)return 0;var n=0;if(i.z_&&i.data){n=Math.min(t.byteLength,i.z_-i.uN);for(var e=0;e<n;e++)i.data[i.uN+e]=t[e];i.uN+=n,i.uN>=i.z_&&(i.loaded=!0)}else{var r=t.byteLength;if(!r)return;var s=null,o=0;i.data&&(o=(s=i.data).length),n=o+r,i.data=new Uint8Array(n),s&&i.data.set(s),i.data.set(t,o),i.uN+=n}return n},i.prototype.equals=function(t){var i=this;return!!t&&(i.url===t.url&&i.name===t.name&&(!i.range||!t.range||i.range.start===t.range.start&&i.range.end===t.range.end))}},7988:function(t){"use strict";function i(t){var i=this;t&&(i.duration=t.duration,i.url=t.url,i.initSegment=t.initSegment,i.seqNum=t.sequenceNum,i.startTime=t.startTime,i.discontinuity=t.discontinuity,i.programDateTime=t.programDateTime,i.streamIndex=t.levelIndex,i.bitrate=t.bitrate,i.sessionId=t.sessionId,i.cdn=t.cdn,i.hN=i.streamIndex+"_"+i.seqNum,i.brStartOffset=t.brStartOffset,i.brEndOffset=t.brEndOffset,i.containerFormat=t.containerFormat,i.encryptionData=t.encryptionData,i.endTimestamps=t.endTimestamps,i.periodId=t.periodId),i.endTimestamps||(i.endTimestamps={audio:NaN,video:NaN}),i.totalDownloadTime=0,i.timeToFirstByte=0,i.aN=0}t.exports=i,i.prototype.setStreamIndex=function(t){var i=this;i.streamIndex=t,i.hN=i.streamIndex+"_"+i.seqNum},i.prototype.dto=function(){var t=this,i={};return Object.keys(t).forEach((function(n){"__controller"!==n&&(i[n]=t[n])})),i}},2503:function(t,i,n){"use strict";t.exports.Stream=c;var e=i.StreamTypes={MAIN:"MAIN",AUDIO:"AUDIO",VIDEO:"VIDEO",SUBTITLES:"SUBTITLES",CLOSED_CAPTIONS:"CLOSED_CAPTIONS"},r=n(7988),s=n(5086),o=n(7166),u=n(574).StreamingMode,h=n(2835),a=n(87);function c(t,i){var n=this;n.segments=[],n.cuepoints=[],n.dateRanges={},n.type=e.MAIN,n.videoCodec=null,n.audioCodec=null,n.mp4Chunks={sidx:null,first:null},n.adjusted=!1,n.cN=new a(n),n.activeInitSegment=null,t&&(n.fN(t,i),n.updateConfig(t)),n.ZS=new h}c.prototype.destroy=function(){var t=this;t.segments=[],t.cuepoints=[],t.dateRanges={},"mp4"===t.containerFormat&&Object.keys(t.mp4Chunks).forEach((function(i){var n=t.mp4Chunks[i];n&&n.destroy()})),t.cN.destroy()},c.prototype.fN=function(t,i){var n=this;if(n.altRenditionGroups={},i)for(var e=0;e<i.length;e++){var r=i[e];r.groupId===t.audioGroupId?(n.altRenditionGroups.AUDIO=r,n.audioGroupId=t.audioGroupId):r.groupId===t.videoGroupId?(n.altRenditionGroups.VIDEO=r,n.videoGroupId=t.videoGroupId):r.groupId===t.subtitlesGroupId?(n.altRenditionGroups.SUBTITLES=r,n.subtitlesGroupId=t.subtitlesGroupId):r.groupId===t.ccGroupId&&(n.altRenditionGroups.CLOSED_CAPTIONS=r,n.ccGroupId=t.ccGroupId)}},c.prototype.getAlternateStream=function(t){if(this.altRenditionGroups[t])return this.altRenditionGroups[t].getCurrentStream()},c.prototype.setAlternateStream=function(t,i){this.altRenditionGroups[t]&&this.altRenditionGroups[t].setCurrentStream(i)},c.prototype.updateConfig=function(t){var i=this,n=i.audioCodec&&i.audioCodec.length>0;if(t&&(i.streamingMode=t.streamingMode||i.streamingMode,i.bitrate=t.bitrate||i.bitrate,i.avgBitrate=t.avgBitrate||i.avgBitrate,i.url=t.url||i.url,i.containerFormat=t.containerFormat||i.containerFormat,i.cdn=t.cdn||i.cdn,i.rcMode=t.rcMode||"cbr",i.channels=t.channels>=0?t.channels:i.channels,i.width=t.width>=0?t.width:i.width,i.height=t.height>=0?t.height:i.height,i.index=t.index>=0?t.index:i.index,i.hlsInfo=t.hlsInfo||i.hlsInfo,i.targetDuration=t.targetDuration||NaN,i.sessionId=t.sessionId||null,i.audioCodec=t.audioCodec||i.audioCodec,i.videoCodec=t.videoCodec||i.videoCodec,i.type=t.type||e.MAIN,i.sidxOffset=t.sidxOffset>=0?t.sidxOffset:i.sidxOffset,i.sidxLength=t.sidxLength>=0?t.sidxLength:i.sidxLength,i.firstSegOffset=t.firstSegOffset>=0?t.firstSegOffset:i.firstSegOffset,i.firstSegLength=t.firstSegLength>=0?t.firstSegLength:i.firstSegLength,i.hasAudio=t.hasAudio||n||i.channels>0||i.hasAudio,i.groupId=t.groupId||null,void 0!==t.hasEndList&&null!==t.hasEndList&&(i.hasEndList=t.hasEndList),i.hlsInfo&&i.hlsInfo.mp4_url&&(i.mp4Chunks.sidx=i.lN("sidx",i.sidxOffset,i.sidxLength,i.hlsInfo.mp4_url),i.mp4Chunks.first=i.lN("first",i.firstSegOffset,i.firstSegLength,i.hlsInfo.mp4_url)),t.drmInfo&&(i.drmInfo=t.drmInfo),i.vN(t.dateRanges)),i.url&&i.url.length&&i.url.indexOf("_60fps")>=0?i.frameRate=60:i.frameRate="AUDIO"===i.type?0:30,t&&t.segmentInfoList){var o=[];i.dN(i.segments,t.segmentInfoList),t.segmentInfoList.forEach((function(t){t.levelIndex=i.index,t.bitrate=i.bitrate,t.sessionId=i.sessionId,t.cdn=i.cdn;var n=i.getSegmentfromSeqNum(t.sequenceNum);n&&(t.endTimestamps=n.endTimestamps),o.push(i.__controller.create(r,t))})),o.length&&(i.segments=o,i.startSeqNum=o[0].seqNum,i.endSeqNum=o[o.length-1].seqNum,t.cuepointList&&t.cuepointList.length&&(t.cuepointList.forEach((function(t){i.hasCuepoint(t.startSeqNum)||i.cuepoints.push(new s(t))})),i.updateCuepointTime()))}i.segments&&i.segments.length&&(i.refreshInterval=1e3*i.segments[i.segments.length-1].duration);var u=i.altRenditionGroups?i.altRenditionGroups.AUDIO:null;i.type===e.MAIN&&u&&i.containerFormat&&!u.getContainerFormat()&&u.setContainerFormat("ts"===i.containerFormat?"aac":"mp4")},c.prototype.dN=function(t,i){t&&t.length&&t.forEach((function(t){t.seqNum!==i[0].sequenceNum||(i[0].programDateTime=t.programDateTime)}))},c.prototype.addInitSegment=function(t){return"mp4"===this.containerFormat?this.cN.add(t):null},c.prototype.getInitSegment=function(t){var i=this;if(!t){if(!i.segments.length)return null;t=i.segments[0]}return i.cN.get(t.initSegment)},c.prototype.lN=function(t,i,n,e){var r,s=this.mp4Chunks[t];return s||("mp4"===this.containerFormat&&e?(i>=0&&n>=0&&(r={start:i,end:i+n-1}),new o({name:t,url:e,range:r})):null)},c.prototype.getMp4Chunk=function(t){return"mp4"===this.containerFormat?this.mp4Chunks[t]:null},c.prototype.dto=function(){var t=this,i={segments:[],cuepoints:[]},n=["segments","__controller","cuepoints","altRenditionGroups","_initSegmentCache","activeInitSegment"];return Object.keys(t).forEach((function(e){n.indexOf(e)>=0||(i[e]=t[e])})),t.segments.forEach((function(t){i.segments.push(t.dto())})),t.cuepoints.forEach((function(t){i.cuepoints.push(t.dto())})),i},c.prototype.setStreamIndex=function(t){this.index=t,this.segments.forEach((function(i){i.setStreamIndex(t)}))},c.prototype.getSeqNumBeforePosition=function(t){var i=this;if(!i.segments.length)return NaN;if(t<i.segments[0].startTime)return i.startSeqNum;for(var n=0;n<i.segments.length;n++){var e=i.segments[n];if(e&&e.startTime<=t&&e.startTime+e.duration>t)return i.startSeqNum+n}var r=i.segments[i.segments.length-1];return r&&r.startTime+r.duration===t?i.endSeqNum:NaN},c.prototype.getSegmentfromSeqNum=function(t){var i=this,n=i.getIndexFromSeqNum(t);return n>=0&&n<i.segments.length?i.segments[n]:null},c.prototype.getIndexFromSeqNum=function(t){var i=this;if(t>=i.startSeqNum&&t<=i.endSeqNum)for(var n=0;n<i.segments.length;n++)if(i.segments[n]&&i.segments[n].seqNum===t)return n;return-1},c.prototype.contains=function(t){return t>=this.startSeqNum&&t<=this.endSeqNum},c.prototype.isEmpty=function(){return 0===this.segments.length},c.prototype.isReady=function(){var t=this;if("mp4"!==t.containerFormat)return t.url&&t.segments.length>0;var i=t.cN.getFirst();if(t.streamingMode===u.HLS&&t.hlsInfo&&t.hlsInfo.mp4_url){var n=t.mp4Chunks.sidx;return i&&n&&i.loaded&&n.loaded}return i&&i.loaded&&t.segments.length>0},c.prototype.hasCuepoint=function(t){for(var i=this.cuepoints.length-1;i>=0;i--)if(this.cuepoints[i].startSeqNum===t)return!0;return!1},c.prototype.updateCuepointTime=function(){for(var t,i=this,n=0;n<i.cuepoints.length;n++)(t=i.getSegmentfromSeqNum(i.cuepoints[n].startSeqNum))&&i.cuepoints[n].setCueOutStartTime(t.startTime)},c.prototype.equals=function(t){var i=this;return!!t&&(i.url===t.url&&i.type===t.type&&(i.isDash()?i.groupId===t.groupId:i.index===t.index))},c.prototype.updateSegmentRanges=function(t){var i=this;if(t&&t.length)for(var n=0;n<t.length&&n<i.segments.length;n++)i.segments[n].brStartOffset=t[n].brStartOffset,i.segments[n].brEndOffset=t[n].brEndOffset},c.prototype.setMp4Timescale=function(t){var i=this;if("mp4"===i.containerFormat&&t&&t.loaded&&t.data){var n=i.ZS.parse(t.data,"mdhd");if(n&&n.timescale>0)i.timescale=n.timescale;else{var e=i.ZS.parse(t.data,"mvhd");i.timescale=e.timescale}}},c.prototype.isDash=function(){return this.streamingMode===u.DASH},c.prototype.setFrameRate=function(t){t&&(this.frameRate=t)},c.prototype.getDrmInfo=function(){return this.drmInfo},c.prototype.vN=function(t){var i=this;t&&t.forEach((function(t){var n=t.id+"-"+t.startDate;i.dateRanges[n]=t}))}},7159:function(t){"use strict";function i(t){var i=this;t&&(i.discontinuity=t.discontinuity,i.seqNum=t.sequenceNum,i.startTime=t.startTime,i.programDateTime=t.programDateTime,i.url=t.url,i.duration=t.duration),i.clockReference=0,i.localCueTime=0,i.mpegTSTime=0,i.offset=0,i.adjustedTime=0}t.exports=i,i.prototype.destroy=function(){this.data=null},i.prototype.toObject=function(){var t=this,i={};return i.discontinuity=t.discontinuity,i.sequenceNum=t.seqNum,i.startTime=t.startTime,i.programDateTime=t.programDateTime,i.url=t.url,i.duration=t.duration,i.playlistUrl=t.playlistUrl,i.clockReference=t.clockReference,i.localCueTime=t.localCueTime,i.mpegTSTime=t.mpegTSTime,i.data=t.data,i.offset=t.offset,i.adjustedTime=t.adjustedTime,i},i.prototype.parseSegment=function(){var t=this;if(t.data){var i=t.data.split("\n");if(!(i.length<=0)&&0===i[0].indexOf("WEBVTT")){for(var n=Math.floor((Math.pow(2,33)-1)/90),e=0,r=0,s=1;s<i.length;s++){var o=i[s].trim();if(0===o.indexOf("X-TIMESTAMP-MAP")){var u=new RegExp(/LOCAL[:=]([^,]+)/),h=new RegExp(/MPEGTS[:=]([^,]+)/);r=0,e=0;var a=u.exec(o);if(a&&a.length>=2){var c=a[1].split(":");if(c&&c.length>=3){var f=c[2].split("."),l=0,v=0;f&&f.length>=2&&(l=parseInt(f[0]),v=parseInt(f[1])),r=1e3*(3600*c[0]+60*c[1]+l)+v,r%=n}}var d=h.exec(o);d&&d.length>=2&&(e=parseFloat(d[1]),e=Math.round(e/90)),t.clockReference=t.pcr(),t.localCueTime=r,t.mpegTSTime=e,null===t.clockReference||t.clockReference}else if(o.indexOf("--\x3e")>=0){var p=o.split("--\x3e");if(p){var m=p[0].split(":");if(m){var b=1e3*(3600*parseInt(m[0])+60*parseInt(m[1])+parseFloat(m[2]));null!==t.clockReference&&void 0!==t.clockReference||(t.clockReference=b%n+t.mpegTSTime)}}break}}t.adjustedTime=e-r-t.clockReference+t.offset}}},i.prototype.pcr=function(){var t=this;if(!t.__controller)return 0;var i=t.__controller.model,n=i.getPCR();if("number"!=typeof n)return null;if(n=n/t.__controller.model.timescale*1e3,i.live&&n<0){var e=-Math.floor(Math.pow(2,32)/90),r=Math.floor((Math.pow(2,32)-1)/90);n=Math.abs(n-e)+r}return n},i.prototype.isBuffered=function(){return!!this.data}},2835:function(t,i,n){"use strict";t.exports=s;var e=n(3288),r=n(6837);function s(){this.pN=0}s.prototype.destroy=function(){this.pN=0},s.prototype.parse=function(t,i,n){var s=this;if(!t||!i||!e[i])return null;s.pN=0;var o=new DataView(t.buffer);if(r.isNullOrUndefined(n)?(n=s.findBoxOffset(o,i),s.pN=n):s.pN=n,s.pN<0)return null;var u=s.parseHeader(o,i,s.pN);return!u||u.boxSize>o.byteLength?null:"sidx"===u.boxType?s.mN(o,u,n):s.Z_(o,u)},s.prototype.bN=function(t){var i=this,n=[];if(!t)return n;i.pN=0;for(var r=new DataView(t.buffer);i.pN+8<=r.byteLength;){var s=i.pN,o=i.gN(r.getUint32(s+4),4);if(e[o]){var u=i.parseHeader(r,o,s);u&&("sidx"===u.boxType?n.push(i.mN(r,u)):n.push(i.Z_(r,u)))}else i.pN++}return n},s.prototype.parseHeader=function(t,i,n){var r=this,s={boxOffset:n};r.pN=n;var o=r.yN(t,s);return-1===o||s.boxType!==i||e[i].fullBox&&-1===(o=r.wN(t,s))?null:s},s.prototype.extractVttCaptions=function(t){var i=this,n=[];if(i.pN=0,!t)return n;var e=new DataView(t.buffer),r=i.findBoxOffset(e,"mdat");if(r<0)return n;var s=t.slice(r+8),o=i.bN(s);if(!o.length)return n;for(var u=0;u<o.length;u++){var h=o[u];if(h)if("vttc"===h.boxType){i.pN=0;var a=s.slice(h.boxOffset+8,h.boxOffset+h.boxSize),c=i.bN(a);n.push(i._N(c))}else"vtte"===h.boxType&&n.push({})}return n},s.prototype.Z_=function(t,i,n){var r=this;if(!t||!i||i.boxSize>t.byteLength)return i;var s=e[i.boxType],o=s.properties;if(!o)return r.pN+=i.boxSize-(s.fullBox?12:8),i;for(var u=Object.keys(o),h=0;h<u.length;h++){var a=u[h],c=o[a];if(r.EN(c.validator,i[c.validationProperty]||i.flags,c.validationResult))if("array"===c.type){i[a]=[];var f=c.length||c.lengthField&&i[c.lengthField],l=c.itemSchema;if(!l)break;f?r.AN(i,a,t,f,l,n):r.SN(i,a,t,l)}else r.TN(t,c,n,a),i[a]=r.IN(i,c,t)}return i},s.prototype.TN=function(t,i,n,e,r,s){if(n&&i){var o=!n.pos||n.pos&&n.pos===r||r===s-1&&-1===n.pos;n.name&&e===n.name&&n.length&&i.length&&n.length===i.length&&o&&this.jN(t,n)}},s.prototype.AN=function(t,i,n,e,r,s){for(var o,u=this,h=0;h<e;h++){if(r.length)o=u.IN(t,r,n);else{o={};for(var a=Object.keys(r),c=0;c<a.length;c++){var f=a[c],l=r[f];u.EN(l.validator,t.flags)&&(u.TN(n,l,s,f,h,e),o[f]=u.IN(t,l,n))}}t[i].push(o)}},s.prototype.SN=function(t,i,n,e){for(var r;this.pN<t.boxOffset+t.boxSize;)r=this.IN(t,e,n),t[i].push(r)},s.prototype.EN=function(t,i,n){return!t||(n?(i&t)===n:i&t)},s.prototype.IN=function(t,i,n){var e,r=this;return i.length&&(e=r.MN(n,i.length),r.pN+=e.readBytes,e.readBytes===i.length/8)?"string"===i.type?r.gN(e.value,4):e.value:"string"===i.type?r.NN(t,n):"boxstring"===i.type?r.kN(t,n):null},s.prototype.MN=function(t,i){var n=this,e={value:0,readBytes:0},r=i/8;if(n.pN+r<=t.byteLength){switch(i){case 8:e.value=t.getUint8(n.pN);break;case 16:e.value=t.getUint16(n.pN);break;case 32:e.value=t.getUint32(n.pN);break;case 64:for(var s=new Uint8Array(8),o=0;o<8;o++)s[o]=t.getUint8(n.pN+o);e.value=s}e.readBytes=r}return e},s.prototype.jN=function(t,i){var n=this,e=i.value;switch(i.length){case 8:t.setUint8(n.pN,e);break;case 16:t.setUint16(n.pN,e);break;case 32:t.setUint32(n.pN,e)}},s.prototype.NN=function(t,i){var n=this,e="",r=n.MN(i,8);for(n.pN+=r.readBytes;r.readBytes>0&&r.value>0&&n.pN<t.boxOffset+t.boxSize;)e+=String.fromCharCode(r.value),r=n.MN(i,8),n.pN+=r.readBytes;return e},s.prototype.kN=function(t,i){var n=this,e=t.boxSize-(n.pN-t.boxOffset),r=String.fromCharCode.apply(null,new Uint8Array(i.buffer,n.pN,e));return n.pN+=e,r},s.prototype.findBoxOffset=function(t,i){if(!t||t.byteLength<8)return-1;var n,r=e[i].parents,s=0;if(r&&r.length>0){for(var o=!1,u=0;u<r.length;u++){var h=r[u];if((n=this.findBoxOffset(t,h))>=0){s=n+(e[h].fullBox?12:8);var a=e[h].payload;a&&(s+=a),o=!0;break}}if(!o)return-1}for(;s+8<=t.byteLength;){if(this.gN(t.getUint32(s+4),4)===i)return s;var c=t.getUint32(s);if(!(c>0))break;s+=c}return-1},s.prototype.yN=function(t,i){var n=this;if(!t||!i||t.byteLength<8)return-1;i.boxSize=t.getUint32(n.pN),n.pN+=4;var e=t.getUint32(n.pN);return i.boxType=n.gN(e,4),n.pN+=4,1===i.boxSize&&(i.boxSize=n.RN(t),n.pN+=8),0},s.prototype.wN=function(t,i){if(!t||!i)return-1;var n=t.getUint32(this.pN);return i.boxVersion=n>>24,i.flags=16777215&n,this.pN+=4,0},s.prototype.mN=function(t,i,n){var e,r=this;if(!t||!i)return null;n=n||0,r.pN+=4,r.pN+=4,0===i.boxVersion?(t.getUint32(r.pN),r.pN+=4,e=t.getUint32(r.pN),r.pN+=4):(r.RN(t),r.pN+=8,e=r.RN(t),r.pN+=8),r.pN+=2;var s=t.getUint16(r.pN);r.pN+=2;for(var o=i.boxOffset+i.boxSize+e,u=[],h=0;h<s;h++){var a=t.getUint32(r.pN);if(r.pN+=4,1===a>>>31)return null;var c=2147483647&a;r.pN+=8,u.push({brStartOffset:o+n,brEndOffset:o+n+c-1}),o+=c}return u},s.prototype.setSingleProp=function(t,i,n){var e=this;if(t&&i){var r=new DataView(t.buffer),s=e.findBoxOffset(r,i);if(!(s<0)){e.pN=s;var o=e.parseHeader(r,i,s);o&&e.Z_(r,o,n)}}},s.prototype.gN=function(t,i){if(!t||!i)return"";for(var n=new Array(i),e=i-1;e>=0;e--){var r=255&t;n[e]=String.fromCharCode(r),t>>>=8}return n.join("")},s.prototype.RN=function(t){var i=this.pN,n=t.getUint32(i);i+=4;var e=t.getUint32(i);return n*Math.pow(2,32)+e},s.prototype._N=function(t){for(var i={},n=0;n<t.length;n++){var e=t[n];if(e)switch(e.boxType){case"vsid":i.sourceId=e.sourceId;break;case"ctim":i.cueTime=e.cueTime;break;case"payl":i.cueText=e.cueText}}return i}},3288:function(t){"use strict";t.exports={ftyp:{fullBox:!1,properties:{majorBrand:{length:32,type:"string"},minorVersion:{length:32},compatibleBrands:{type:"array",itemSchema:{length:32,type:"string"}}}},moov:{fullBox:!1},styp:{fullBox:!1,properties:{majorBrand:{length:32,type:"string"},minorVersion:{length:32},compatibleBrands:{type:"array",itemSchema:{length:32,type:"string"}}}},moof:{fullBox:!1},mdat:{fullBox:!1},sidx:{fullBox:!0,properties:{referenceId:{length:32},timescale:{length:32},earliestPresentationTime:{length:32},firstOffset:{length:32},reserved:{length:16},referenceCount:{length:16},referenceData:{type:"array",lengthField:"referenceCount",itemSchema:{referenceType:{length:1},referencedSize:{length:31},subsegmentDuration:{length:32},startsWithSAP:{length:1},sapType:{length:3},sapDeltaTime:{length:28}}}}},emsg:{fullBox:!0,properties:{schemeIdUri:{type:"string"},value:{type:"string"},timescale:{length:32},presentationTimeDelta:{length:32},eventDuration:{length:32},id:{length:32},message:{type:"array",itemSchema:{length:8}}}},trak:{fullBox:!1,parents:["moov"]},mdia:{fullBox:!1,parents:["trak"]},mvhd:{fullBox:!0,parents:["moov"],properties:{creationTime:{length:32},modificationTime:{length:32},timescale:{length:32},duration:{length:32},rate:{length:32},volume:{length:16},reserved:{length:80},matrix:{type:"array",length:9,itemSchema:{length:32}},preDefined:{length:192},nextTrackId:{length:32}}},mdhd:{fullBox:!0,parents:["mdia"],properties:{creationTime:{length:32},modificationTime:{length:32},timescale:{length:32},duration:{length:32},language:{length:16},preDefined:{length:16}}},esds:{fullBox:!0,parents:["mp4a","enca"],properties:{descriptorTag:{length:8},descriptorLength:{length:8},esId:{length:16},streamPriority:{length:8},decoderConfigDesc:{length:8},decoderConfigLength:{length:8},codecTag:{length:8},streamType:{length:8},bufferSize:{length:8},bufferSize2:{length:16},maxBitrate:{length:32},avgBitrate:{length:32},decoderInfoDescriptor:{length:8},decoderInfoDescriptorLength:{length:8},audioSpecificConfig0:{length:8},audioSpecificConfig1:{length:8},audioSpecificConfig2:{length:8,validator:248,validationProperty:"audioSpecificConfig0",validationResult:40},audioSpecificConfig3:{length:8,validator:248,validationProperty:"audioSpecificConfig0",validationResult:40},slDescriptor:{length:8},slDescriptorLength:{length:8},slValue:{length:8}}},mp4a:{fullBox:!1,parents:["stsd"],payload:28,properties:{reserved0:{length:48},dataReferenceIndex:{length:16},reserved1:{length:32},reserved2:{length:32},channelCount:{length:16},sampleSize:{length:16},predefined:{length:16},reserved3:{length:16},sampleRate:{length:32}}},enca:{fullBox:!1,parents:["stsd"],payload:28,properties:{reserved0:{length:48},dataReferenceIndex:{length:16},reserved1:{length:32},reserved2:{length:32},channelCount:{length:16},sampleSize:{length:16},predefined:{length:16},reserved3:{length:16},sampleRate:{length:32}}},stsd:{fullBox:!0,parents:["stbl"],payload:4,properties:{entryCount:{length:32}}},stbl:{fullBox:!1,parents:["minf"]},minf:{fullBox:!1,parents:["mdia"]},traf:{fullBox:!1,parents:["moof"]},tfdt:{fullBox:!0,parents:["traf"],properties:{baseMediaDecodeTime:{length:32}}},tfhd:{fullBox:!0,parents:["traf"],properties:{trackId:{length:32},baseDataOffset:{length:64,validator:1},sampleDescriptionIndex:{length:32,validator:2},defaultSampleDuration:{length:32,validator:8},defaultSampleSize:{length:32,validator:16},defaultSampleFlags:{length:32,validator:32}}},trun:{fullBox:!0,parents:["traf"],properties:{sampleCount:{length:32},dataOffset:{validator:1,length:32},firstSampleFlags:{validator:4,length:32},sampleData:{type:"array",lengthField:"sampleCount",itemSchema:{sampleDuration:{validator:256,length:32},sampleSize:{validator:512,length:32},sampleFlags:{validator:1024,length:32},sampleCompositionTimeOffset:{validator:2048,length:32}}}}},vttc:{fullBox:!1},vtte:{fullBox:!1},vsid:{fullBox:!1,parents:["vttc"],properties:{sourceId:{length:32}}},ctim:{fullBox:!1,parents:["vttc"],properties:{cueTime:{type:"boxstring"}}},payl:{fullBox:!1,parents:["vttc"],properties:{cueText:{type:"boxstring"}}},iden:{fullBox:!1,parents:["vttc"],properties:{cueId:{type:"boxstring"}}},sttg:{fullBox:!1,parents:["vttc"],properties:{settings:{type:"boxstring"}}}}},9730:function(t){"use strict";t.exports=i;function i(){}i.prototype.initSegment=function(t,i){var n=this.ftyp(i),e=this.moov(t),r=new Uint8Array(n.byteLength+e.byteLength);return r.set(n),r.set(e,n.byteLength),r},i.prototype.ftyp=function(t){t=t||"avc1";var i=new Uint8Array([105,115,111,109]),n=new Uint8Array([0,0,0,1]),e=new Uint8Array([t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);return this.LN("ftyp",[i,n,e])},i.prototype.moov=function(t){var i=this,n=[];n.push(i.DN(t[0].config.duration,t[0].config.timescale));for(var e=0;e<t.length;e++)n.push(i.CN(t[e]));return n.push(i.PN(t)),i.LN("moov",n)},i.prototype.moof=function(t,i){var n=this,e=[];e.push(n.xN(t));for(var r=0;r<i.length;r++){var s=n.UN(i[r]);e.push(s)}return n.LN("moof",e)},i.prototype.mdat=function(t){var i=[];if(t&&t.frames)for(var n=0;n<t.frames.length;n++)i.push(t.frames[n].data);return this.LN("mdat",i)},i.prototype.xN=function(t){var i=new Uint8Array(4);return new DataView(i.buffer).setUint32(0,t),this.VN("mfhd",0,new Uint8Array(3),[i])},i.prototype.UN=function(t){if(t){var i,n,e=this,r=[],s=32,o=e.FN(t);return s+=o.length,r.push(o),t.frames&&t.frames.length&&(s+=(i=e.BN(t.frames[0].dts)).length,r.push(i)),"video"===t.type&&(s+=(n=e.zN(t)).length),r.push(e.GN(t,s)),n&&r.push(n),e.LN("traf",r)}},i.prototype.FN=function(t){var i=new Uint8Array(4);return new DataView(i.buffer).setUint32(0,t.streamId),this.VN("tfhd",0,new Uint8Array([0,0,0]),[i])},i.prototype.BN=function(t){var i=new Uint8Array(4);return new DataView(i.buffer).setUint32(0,Math.max(0,t)),this.VN("tfdt",0,new Uint8Array([0,0,0]),[i])},i.prototype.GN=function(t,i){var n=this,e=t.frames||[],r=e.length,s=n.HN(e),o=0,u=s[1],h=0;for(h=0;h<4;h++)o+=u&1<<h?1:0;var a=new Uint8Array(4*o*r),c=new DataView(a.buffer);i+=20+a.length+8;var f=n.YN(r,i),l=0;for(h=0;h<r;h++){var v=e[h];if(1&u&&(c.setUint32(l,v.duration),l+=4),2&u&&(c.setUint32(l,v.size),l+=4),4&u){var d=(v.flags.isLeading<<2|v.flags.dependsOn)<<24|(v.flags.isDependedOn<<6|v.flags.hasRedundancy<<4|v.flags.paddingValue<<1|v.flags.isNonSyncSample)<<16|(240&v.flags.degradationPriority)<<8|15&v.flags.degradationPriority;c.setUint32(l,d),l+=4}8&u&&(c.setUint32(l,v.pts-v.dts),l+=4)}return n.VN("trun",0,s,[f,a])},i.prototype.zN=function(t){for(var i=t.frames||[],n=i.length,e=new Uint8Array(n),r=0;r<n;r++){var s=i[r];s.flags&&(e[r]=s.flags.isLeading<<6|s.flags.dependsOn<<4|s.flags.isDependedOn<<2|s.flags.hasRedundancy)}return this.VN("sdtp",0,new Uint8Array(3),[e])},i.prototype.YN=function(t,i){var n=new Uint8Array(8),e=new DataView(n.buffer);return e.setUint32(0,t),e.setInt32(4,i),n},i.prototype.HN=function(t){var i=t.length,n=new Uint8Array(3);return n[2]=1,i&&(void 0!==t[0].duration&&(n[1]|=1),void 0!==t[0].size&&(n[1]|=2),void 0!==t[0].flags&&(n[1]|=4),void 0!==t[0].pts&&(n[1]|=8)),n},i.prototype.DN=function(t,i){var n=new Uint8Array(96),e=new DataView(n.buffer);e.setUint32(0,1),e.setUint32(4,2);var r=i||9e4;return e.setUint32(8,r),t&&e.setUint32(12,t),e.setUint32(16,65536),e.setUint16(20,256),e.setUint32(32,65536),e.setUint32(48,65536),e.setUint32(64,1073741824),e.setUint32(92,4294967295),this.VN("mvhd",0,new Uint8Array(3),[n])},i.prototype.CN=function(t){var i=this;t.config.duration=t.config.duration||4294967295;var n=[i.qN(t)];return t.config.useEditBox&&n.push(i.WN(t)),n.push(i.QN(t)),i.LN("trak",n)},i.prototype.qN=function(t){var i=new Uint8Array(80),n=new DataView(i.buffer);return n.setUint32(8,t.streamId),n.setUint32(16,t.config.duration),n.setUint8(32,"audio"===t.type?1:0),n.setUint32(36,65536),n.setUint32(52,65536),n.setUint32(68,1073741824),n.setUint16(72,t.config.width),n.setUint16(76,t.config.height),this.VN("tkhd",0,new Uint8Array([0,0,7]),[i])},i.prototype.WN=function(t){return this.LN("edts",[this.ZN(t)])},i.prototype.ZN=function(t){var i=new Uint8Array(16),n=new DataView(i.buffer);return n.setUint32(0,1),n.setUint32(4,0),n.setUint32(8,t.config.offset),n.setUint16(12,1),n.setUint16(14,0),this.VN("elst",0,new Uint8Array(3),[i])},i.prototype.QN=function(t){var i=this;return i.LN("mdia",[i.XN(t),i.$N(t.type),i.JN(t)])},i.prototype.XN=function(t){var i=new Uint8Array(20),n=new DataView(i.buffer);n.setUint32(0,2),n.setUint32(4,3);var e=t.config.timescale||9e4;return n.setUint32(8,e),n.setUint32(12,t.config.duration),n.setUint16(16,21956),this.VN("mdhd",0,new Uint8Array(3),[i])},i.prototype.$N=function(t){var i={video:1986618469,audio:1936684398,hint:1751740020},n=new Uint8Array(32),e=new DataView(n.buffer);return e.setUint32(4,i[t]),e.setUint32(20,i[t]),e.setUint32(24,1214344804),e.setUint32(28,1818587648),this.VN("hdlr",0,new Uint8Array(3),[n])},i.prototype.JN=function(t){var i=this,n="audio"===t.type?i.KN():i.rk();return i.LN("minf",[n,i._k(),i.tR(t)])},i.prototype.rk=function(){var t=new Uint8Array(8);return this.VN("vmhd",0,new Uint8Array([0,0,1]),[t])},i.prototype.KN=function(){var t=new Uint8Array(4);return this.VN("smhd",0,new Uint8Array(3),[t])},i.prototype._k=function(){return this.LN("dinf",[this.iR()])},i.prototype.iR=function(){var t=new Uint8Array([0,0,0,1]),i=[];return i.push(t),i.push(this.l_(new Uint8Array([0,0,1]))),this.VN("dref",0,new Uint8Array(3),i)},i.prototype.l_=function(t){return this.VN("url ",0,t,[])},i.prototype.nR=function(t){return this.VN("urn ",0,t,[])},i.prototype.tR=function(t){var i=this;return i.LN("stbl",[i.eR(t),i.rR(),i.sR(),i.oR(),i.uR()])},i.prototype.eR=function(t){var i=this,n="audio"===t.type?i.hR(t):i.aR(t),e=new Uint8Array([0,0,0,1]);return i.VN("stsd",0,new Uint8Array(3),[e,n])},i.prototype.aR=function(t){var i=this,n=[];n.push((65280&t.config.ppsLength)>>>8),n.push(255&t.config.ppsLength);try{t.config.ppsLength>0&&(n=n.concat(Array.prototype.slice.call(t.config.pps)))}catch(t){}var e=[];e.push((65280&t.config.spsLength)>>>8),e.push(255&t.config.spsLength);try{t.config.spsLength>0&&(e=e.concat(Array.prototype.slice.call(t.config.sps)))}catch(t){}var r=new Uint8Array(78),s=new DataView(r.buffer);return s.setUint16(6,1),s.setUint16(24,t.config.width),s.setUint16(26,t.config.height),s.setUint32(28,4718592),s.setUint32(32,4718592),s.setUint16(40,1),s.setUint32(42,259613032),s.setUint32(46,1869557110),s.setUint32(50,1768187247),s.setUint32(54,761818227),s.setUint16(74,24),s.setUint16(76,65535),i.LN("avc1",[r,i.LN("avcC",[new Uint8Array([1,t.config.profileIndication,t.config.profileCompatibility,t.config.levelIndication,255].concat([255&t.config.numOfSPS|224]).concat(e).concat([255&t.config.numOfPPS]).concat(n))]),i.cR()])},i.prototype.cR=function(){var t=new Uint8Array(12);return new DataView(t.buffer).setUint32(0,1875072),this.LN("btrt",[t])},i.prototype.hR=function(t){var i=new Uint8Array(8),n=new DataView(i.buffer);n.setUint16(6,1);var e=new Uint8Array(20);return(n=new DataView(e.buffer)).setUint16(8,t.config.channels),n.setUint16(10,t.config.sampleSize),n.setUint16(16,t.config.samplingFreq),this.LN("mp4a",[i,e,this.fR(t)])},i.prototype.fR=function(t){var i=new Uint8Array(27),n=new DataView(i.buffer);return n.setUint8(0,3),n.setUint8(1,25),n.setUint8(5,4),n.setUint8(6,17),n.setUint8(7,64),n.setUint8(8,21),n.setUint16(10,1536),n.setUint8(20,5),n.setUint8(21,2),n.setUint8(22,t.config.audioObjectTypeIndex<<3|t.config.samplingFreqIndex>>>1),n.setUint8(23,t.config.samplingFreqIndex<<7|t.config.channels<<3),n.setUint8(24,6),n.setUint8(25,1),n.setUint8(26,2),this.VN("esds",0,new Uint8Array(3),[i])},i.prototype.rR=function(){var t=new Uint8Array(4);return this.VN("stts",0,new Uint8Array(3),[t])},i.prototype.sR=function(){var t=new Uint8Array(4);return this.VN("stsc",0,new Uint8Array(3),[t])},i.prototype.oR=function(){var t=new Uint8Array(8);return this.VN("stsz",0,new Uint8Array(3),[t])},i.prototype.uR=function(){var t=new Uint8Array(4);return this.VN("stco",0,new Uint8Array(3),[t])},i.prototype.PN=function(t){for(var i=[],n=0;n<t.length;n++)i.push(this.lR(t[n]));return this.LN("mvex",i)},i.prototype.lR=function(t){var i=new Uint8Array(20),n=new DataView(i.buffer);return n.setUint32(0,t.streamId),n.setUint32(4,1),n.setUint32(16,65537),"video"!==t.type&&(i[i.length-1]=0),this.VN("trex",0,new Uint8Array(3),[i])},i.prototype.VN=function(t,i,n,e){var r=new Uint8Array(1);r[0]=i;var s=[r,n];return s=s.concat(e),this.LN(t,s)},i.prototype.LN=function(t,i){var n=0,e=new Uint8Array([t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]),r=0,s=0;for(s=0;s<i.length;s++)r+=i[s].length;var o=new Uint8Array(r+8);for(new DataView(o.buffer,o.byteOffset,o.byteLength).setUint32(0,o.byteLength),o.set(e,4),n=8,s=0;s<i.length;s++)o.set(i[s],n),n+=i[s].length;return o}},5328:function(t,i,n){"use strict";t.exports=r;var e=n(9730);function r(){this.vR=null,this.dR=new e}r.prototype.destroy=function(){this.vR=null},r.prototype.generate=function(t){if(!t)return null;var i=this,n=[t],e=null,r=null,s=null,o=0;if(t.config.shouldInit){var u="audio"===t.type?"mp41":"avc1";o+=(e=i.pR(n,u))?e.length:0}t.frames.length&&(o+=(r=i.mR(n))?r.length:0,o+=(s=i.bR(n))?s.length:0),i.vR=new Uint8Array(o);var h=0;e&&(i.vR.set(e,h),h+=e.length),r&&(i.vR.set(r,h),h+=r.length),s&&(i.vR.set(s,h),h+=s.length);var a=t.frames.length>0?t.frames[t.frames.length-1].duration:0,c=t.endTime+a;return{data:i.vR,type:t.type,codec:t.config.codec,mimeType:t.type+'/mp4; codecs="'+t.config.codec+'"',startTime:t.frames.length?t.startTime/t.config.timescale:0,endTime:t.frames.length?c/t.config.timescale:0,endTimestamp:c}},r.prototype.pR=function(t,i){if(!t||!t.length)return null;var n=this.dR.initSegment(t,i);return n||null},r.prototype.mR=function(t){var i=this,n=0;return t&&t.length?(t.forEach((function(t){n=t.config.seqNum,t.frames&&t.frames.length&&t.frames.forEach((function(n,e,r){n.size=n.nalUnitSize?n.nalUnitSize+4*n.nalUnits.length:n.data?n.data.length:0,e<r.length-1?n.duration=t.frames[e+1].dts-n.dts:n.duration=e>0?n.dts-t.frames[e-1].dts:t.config.defaultFrameDuration||i.gR(t.type.track.config.timescale),n.duration}))})),i.dR.moof(n,t)):null},r.prototype.bR=function(t){var i=this;if(!t||!t.length)return null;var n,e=[],r=0;t.forEach((function(t){"video"===t.type&&t.frames.forEach((function(t){t.normalizedData=new Uint8Array(t.nalUnitSize+4*t.nalUnits.length);var i=new DataView(t.normalizedData.buffer),n=0;t.nalUnits.forEach((function(e){i.setUint32(n,e.data.byteLength),n+=4,t.normalizedData.set(e.data,n),n+=e.data.byteLength})),t.data=t.normalizedData})),(n=i.dR.mdat(t))&&n.length&&(e.push(n),r+=n.length)}));var s=new Uint8Array(r),o=0;return e.forEach((function(t){s.set(t,o),o+=t.length})),s},r.prototype.gR=function(t,i){return("audio"===t?.0232199546:.0333333333)*i}},4838:function(t,i,n){"use strict";t.exports=c;var e=n(3713),r=n(2990),s=n(6837),o=n(2999),u=n(4641),h=n(7279).AACStream,a=n(7650).HLSEvent.PCR_AVAILABLE;function c(t){var i=this;o.call(i,i.constructor.name),i.yR=t,i._=null,i.wR="start",i.s_=new h,i.ER=!1,i._h={},i.OR=i.__controller.create(e,t,i.AR.bind(i)),i.SR=t.lastChunkEndTs?t.lastChunkEndTs.audio:NaN,i.TR=t.lastFrameDuration?t.lastFrameDuration.audio:NaN,s.isNullOrUndefined(i.yR.pcr)&&(i._h[a]=i.__controller.addEventListener(a,i.IR,i))}r.inherits(c,o),c.prototype.destroy=function(){var t=this;t.close(),t.OR.destroy(),t.s_.destroy(),o.prototype.destroy.call(t)},c.prototype.setSource=function(t){this.jR=t,this.MO()},c.prototype.MO=function(){var t=this;t.jR&&(t.jR.addEventListener(u.DATA_PROCESS_PROGRESS,(function(i){t.append(i)}),t),t.jR.addEventListener(u.DATA_PROCESS_COMPLETE,(function(){t.endOfSegment()}),t),t.jR.addEventListener(u.DATA_PROCESS_ERROR,(function(i){t.publish(u.DATA_PROCESS_ERROR,i)}),t))},c.prototype.close=function(){var t=this;t._=null,t.__controller.removeEventListener(a,t._h[a]),t.OR.close()},c.prototype.append=function(t){var i=this;if(t){var n=t.length;if(n){var e=null,r=0;i._&&(r=(e=i._).length);var s=r+n;i._=new Uint8Array(s),e&&i._.set(e),i._.set(t,r),i.Z_()}}},c.prototype.IR=function(t){var i=this;i.yR.pcr=t,i.Z_(),i.__controller.removeEventListener(a,i._h[a])},c.prototype.Z_=function(){var t=this,i=t.yR.pcr;if(!s.isNullOrUndefined(i)){if(t._&&t._.length>0){var n;n=t.SR&&t.TR?i+t.SR+t.TR:i+t.yR.startTime*t.yR.timescale;var e=t.s_.readFramesFromBitstream(t._,n);t._=t._.subarray(e)}var r=t.s_.getLastFrameDetails();r&&(t.SR=r.timestamp-i,t.TR=r.duration),(t.s_.ready||t.ER)&&t.MR()}},c.prototype.MR=function(){var t=this,i=t.s_.getFrames(),n=i&&i.length>0;if("end"===t.wR||n){var e=n?i[0].dts:null,r={audio:{frames:i,config:t.s_.getConfig()},pcr:e};t.OR.processSegmentData({avData:r,pos:t.wR}),"start"===t.wR&&(t.wR="middle")}},c.prototype.endOfSegment=function(){var t=this;t.wR="end",t.ER=!0,t.Z_(),t.OR.endOfSegment()},c.prototype.AR=function(t,i){var n;t&&(this.publish(u.DATA_PROCESS_PROGRESS,t,i),t.getParam&&(n=t.getParam("parsedInfo")),"end"===(n?n.position:t.position)&&this.publish(u.DATA_PROCESS_COMPLETE))}},5619:function(t,i,n){"use strict";t.exports=h,t.exports.KEY_METHODS={AES_128:"AES-128",NONE:"NONE"};var e=n(4641),r=n(2990),s=n(2999),o="Key Import is rejected",u="Decryption is rejected";function h(){var t=this;t.JI=t.__controller.model.userAgent,s.call(t,t.constructor.name),"undefined"==typeof window?t.NR=crypto||msCrypto:t.NR=window.crypto||window.msCrypto,t.NR=t.NR.subtle||t.NR.webkitSubtle,t._=null,t.kR=null,t.RR={name:"AES-CBC",length:128,iv:null}}r.inherits(h,s),h.prototype.destroy=function(){this.close(),s.prototype.destroy.call(this)},h.prototype.close=function(){var t=this;t._=null,t.LR=null,t.kR=null,t.DR=null},h.prototype.append=function(t){t&&("key"===t.type?this.CR(t):this.PR(t))},h.prototype.PR=function(t){var i=this;if(t)if(i.LR){var n=new Uint8Array(i.LR.byteLength+t.byteLength);n.set(new Uint8Array(i.LR),0),n.set(new Uint8Array(t),i.LR.byteLength),i.LR=n}else i.LR=t},h.prototype.CR=function(t){var i=this;t&&(t.initVector||(t.initVector=i.xR(t.seqNum)),i.kR=t,i.RR.iv=i.UR(t.initVector).buffer,11!==i.JI.ie?i.NR.importKey("raw",t.data,i.RR,!0,["decrypt"]).then((function(t){i.DR=t,i.VR()}),(function(t){i.XE(o,t)})):i.FR(t))},h.prototype.FR=function(t){var i=this,n=i.NR.importKey("raw",t.data,i.RR,!0,["decrypt"]);n?(n.onerror=function(t){i.XE(o,t)},n.oncomplete=function(t){i.DR=t&&t.target?t.target.result:null,i.VR()}):i.XE("Key Import operation is not created in IE-11")},h.prototype.VR=function(){var t=this;if(t.DR&&t.LR&&t.LR.byteLength&&t.ER){var i=t.LR.buffer,n=i.byteLength-i.byteLength%16,e=i.slice(0,n);t.LR=new Uint8Array(i.slice(n)),11!==t.JI.ie?t.NR.decrypt(t.RR,t.DR,e).then((function(i){t.BR(i)}),(function(i){t.XE(u,i)})).catch((function(i){t.XE("Exception",i.toString())})):t.zR(e)}},h.prototype.zR=function(t){var i=this;if(i.DR&&t){var n=i.NR.decrypt(i.RR,i.DR,t);n?(n.onerror=function(t){i.XE(u,t)},n.oncomplete=function(t){t&&t.target&&i.BR(t.target.result)}):i.XE("Decryption operation is not created in IE-11")}},h.prototype.BR=function(t){var i=this;i.publish(e.DATA_PROCESS_PROGRESS,new Uint8Array(t)),i.ER&&(0===i.LR.byteLength?i.publish(e.DATA_PROCESS_COMPLETE):i.VR())},h.prototype.UR=function(t){for(var i=[],n=0,e=(t=t.substr(2)).length;n<e;n+=2)i.push(parseInt(t.substr(n,2),16));return new Uint8Array(i)},h.prototype.endOfSegment=function(){var t=this;t.ER=!0,t.kR&&t.DR&&t.VR()},h.prototype.XE=function(t,i){this.publish(e.DATA_PROCESS_ERROR)},h.prototype.xR=function(t){for(var i="0x",n=(t=t||0).toString(16),e=n.length<32?32-n.length:0,r=0;r<e;r++)i+="0";return i+=n}},5267:function(t,i,n){"use strict";t.exports=d;var e=n(6837),r=n(2990),s=n(2999),o=n(4641),u=n(2835),h=n(6473),a=n(5557),c=n(3789),f=n(1849),l=n(7279).NAL_UNIT_TYPES,v=n(2503).StreamTypes;function d(t){var i=this;s.call(i,i.constructor.name),i._=null,i.yR=t,i.GR=new h,i.ZS=new u,i.HR=new f}r.inherits(d,s),d.prototype.destroy=function(){var t=this;t._=null,t.ZS.destroy(),t.HR.destroy(),s.prototype.destroy.call(t)},d.prototype.setSource=function(t){this.jR=t,this.MO()},d.prototype.MO=function(){var t=this;t.jR&&(t.jR.addEventListener(o.DATA_PROCESS_PROGRESS,(function(i){t.append(i)}),t),t.jR.addEventListener(o.DATA_PROCESS_COMPLETE,(function(){t.endOfSegment()}),t),t.jR.addEventListener(o.DATA_PROCESS_ERROR,(function(i){t.publish(o.DATA_PROCESS_ERROR,i)}),t))},d.prototype.close=function(){this._=null},d.prototype.append=function(t){var i=this;if(t){var n=t.length;if(n){var e=null,r=0;i._&&(r=(e=i._).length);var s=r+n;i._=new Uint8Array(s),e&&i._.set(e),i._.set(t,r),i.YR()}}},d.prototype.YR=function(){for(var t=this;t._&&t._.length>=8;){var i=t._.length,n=new DataView(t._.buffer),e=t.ZS.parse(t._,"styp"),r=t.ZS.parse(t._,"emsg"),s=t.ZS.parse(t._,"moof"),u=t.ZS.parse(t._,"ftyp"),h=t.ZS.parse(t._,"moov");if(u&&h){t.yR.userAgent.android&&t.qR();var a=[];u&&a.push(u),h&&a.push(h);var c=t.WR(a),f=t.QR(a),l=new Uint8Array(t._.buffer.slice(c,f));t.publish(o.DATA_PROCESS_PROGRESS,{position:"init",data:l}),t._.length>f?t._=new Uint8Array(t._.buffer.slice(f)):t._=null}else{if(!s)return;var d=t.ZS.findBoxOffset(n,"mdat");if(d<0)return;var p=t.ZS.parseHeader(n,"mdat",d),m=[];e&&m.push(e),r&&m.push(r),s&&m.push(s),p&&m.push(p);var b=t.WR(m),g=t.QR(m);if(i<g)return;var y=t.ZR(),w=t.yR.timescale,_=t.XR(),E=t.$R(),O=t.JR(_,y);if(t.yR.dash){var A=Math.round(t.yR.startTime*w),S=t.yR.segDuration*w;E!==A&&(E=A,t.KR(E)),O!==S&&(t.tL(_,S),O=S)}var T=null;t.yR.type!==v.MAIN&&t.yR.type!==v.VIDEO||(T=t.iL(d,_,E,w));var I=new Uint8Array(t._.buffer.slice(b,g));t.wR="firstByte"===t.wR?"start":"middle",t.publish(o.DATA_PROCESS_PROGRESS,{position:t.wR,data:I,cea608TrackData:T,baseTime:E,defaultSampleDuration:y,totalDuration:O,samples:_.samples}),t.yR.dash&&r&&t.nL(r),t._.length>g?t._=new Uint8Array(t._.buffer.slice(g)):t._=null}}},d.prototype.endOfSegment=function(){this.YR(),this.publish(o.DATA_PROCESS_COMPLETE)},d.prototype.WR=function(t){if(!t||!t.length)return 0;var i=Number.POSITIVE_INFINITY;return t.forEach((function(t){i=Math.min(i,t.boxOffset)})),i},d.prototype.QR=function(t){if(!t||!t.length)return 0;var i=0,n=t[0];return t.forEach((function(t){i<t.boxOffset&&(i=t.boxOffset,n=t)})),n.boxOffset+n.boxSize},d.prototype.$R=function(){var t=this.ZS.parse(this._,"tfdt");return t?t.baseMediaDecodeTime:0},d.prototype.KR=function(t){this.ZS.setSingleProp(this._,"tfdt",{name:"baseMediaDecodeTime",value:t,length:32})},d.prototype.tL=function(t,i){if(t&&t.totalDuration){var n=i-t.totalDuration,e=t.samples[t.samples.length-1].duration+n;e<0&&(e=0),this.ZS.setSingleProp(this._,"trun",{name:"sampleDuration",value:e,length:32,pos:-1})}},d.prototype.ZR=function(){var t=this.ZS.parse(this._,"tfhd");return t&&t.defaultSampleDuration>0?t.defaultSampleDuration:0},d.prototype.JR=function(t,i){return t.totalDuration?t.totalDuration:t.samples.length*i},d.prototype.XR=function(){var t=[],i=0,n=this.ZS.parse(this._,"trun");if(n&&n.sampleData)for(var r=n.sampleData.length,s=n.sampleData,o=0;o<r;o++){var u={};s[o].sampleDuration&&(u.duration=s[o].sampleDuration,i+=u.duration),s[o].sampleSize&&(u.size=s[o].sampleSize),s[o].sampleFlags&&(u.flags=s[o].sampleFlags),e.isNullOrUndefined(s[o].sampleCompositionTimeOffset)||(u.cto=s[o].sampleCompositionTimeOffset),t.push(u)}return{samples:t,totalDuration:i}},d.prototype.nL=function(t){var i=this;if(t){var n=i.eL(t.presentationTimeDelta,t.timescale),e=t.message&&i.GR.extractID3FromMessage(t.message),r={payload:e&&i.GR.getID3Payload(e),timestamp:i.yR.startTime+n},s=new c({type:a.MessageTypes.MESSAGE,id:a.MessageIds.TIMED_METADATA});s.putParam("timedMetadata",r),i.publish(o.DATA_PROCESS_PROGRESS,s)}},d.prototype.eL=function(t,i){return 0===i?0:t/i},d.prototype.qR=function(){var t=this,i=t.ZS.parse(t._,"esds");if(i){var n=i.audioSpecificConfig0>>3,e=i.audioSpecificConfig0<<1&14|i.audioSpecificConfig1>>7&1,r=i.audioSpecificConfig1>>3&7;if(5===n){var s=(n=2)<<3|(14&e)>>1,o=(1&e)<<7|r<<3;t.ZS.setSingleProp(t._,"esds",{name:"audioSpecificConfig0",value:s,length:8}),t.ZS.setSingleProp(t._,"esds",{name:"audioSpecificConfig1",value:o,length:8}),t.ZS.setSingleProp(t._,"esds",{name:"audioSpecificConfig2",value:0,length:8}),t.ZS.setSingleProp(t._,"esds",{name:"audioSpecificConfig3",value:0,length:8})}}},d.prototype.iL=function(t,i,n,e){for(var r=[],s=this._.slice(t+8),o=n,u=0,h=0,a=0;a<i.samples.length;a++){var c=i.samples[a];for(h+=c.size;u<h&&u<s.length;){var f=s[u]<<24|s[u+1]<<16|s[u+2]<<8|s[u+3];if((15&s[u+=4])===l.AD_INFO_SEI)for(var v=this.HR.parse(s,u+1),d=0;d<v.length;d++){var p=v[d];p.pts=o+c.cto,p.dts=o,p.timescale=e,r.push(p)}u+=f}o+=c.duration}return r}},4169:function(t,i,n){"use strict";t.exports=a;var e=n(8169),r=n(4641),s=n(2990),o=n(2999),u=n(5619),h=n(5619).KEY_METHODS;function a(t){if(!t)throw new Error("Invalid argument: data argument of the ProcessorChain is not complete");var i=this;i.yR=t,i.rL=null,i.sL=null,o.call(i,i.constructor.name),t.encryptionData&&t.encryptionData.method!==h.NONE&&(i.rL=i.__controller.create(u,t.encryptionData)),i.sL=e.create(i.__controller,t.containerFormat,t),i.rL&&i.sL.setSource(i.rL),i.oL=i.rL||i.sL,i.uL=i.sL,i.uL&&(i.uL.addEventListener(r.DATA_PROCESS_PROGRESS,(function(t,n){i.publish(r.DATA_PROCESS_PROGRESS,t,n)}),i),i.uL.addEventListener(r.DATA_PROCESS_COMPLETE,(function(t){i.publish(r.DATA_PROCESS_COMPLETE,t)}),i),i.uL.addEventListener(r.DATA_PROCESS_ERROR,(function(){i.publish(r.DATA_PROCESS_ERROR)}),i))}s.inherits(a,o),a.prototype.destroy=function(){var t=this;t.rL&&(t.rL.destroy(),t.rL=null),t.sL&&(t.sL.destroy(),t.sL=null),t.oL=null,t.uL=null,o.prototype.destroy.call(t)},a.prototype.append=function(t){this.oL&&this.oL.append(t)},a.prototype.close=function(){this.oL&&this.oL.close()},a.prototype.endOfSegment=function(){this.oL&&this.oL.endOfSegment()}},4641:function(t){"use strict";t.exports={DATA_PROCESS_PROGRESS:"dataProcessProgress",DATA_PROCESS_ERROR:"dataProcessError",DATA_PROCESS_COMPLETE:"dataProcessComplete"}},8169:function(t,i,n){"use strict";var e=n(8520),r=n(4838),s=n(5267);t.exports.create=function(t,i,n){if(!t||!i||"function"!=typeof t.create)return null;var o;switch(i){case"mp4":o=s;break;case"aac":o=r;break;default:case"ts":o=e}return t.create(o,n)}},8520:function(t,i,n){"use strict";t.exports=u;var e=n(1511),r=n(2990),s=n(2999),o=n(4641);function u(t){var i=this;s.call(i,i.constructor.name),i.yR=t,i.hL=i.__controller.create(e,t,i.AR.bind(i))}r.inherits(u,s),u.prototype.destroy=function(){this.hL.destroy(),s.prototype.destroy.call(this)},u.prototype.setSource=function(t){this.jR=t,this.MO()},u.prototype.MO=function(){var t=this;t.jR&&(t.jR.addEventListener(o.DATA_PROCESS_PROGRESS,(function(i){t.append(i)}),t),t.jR.addEventListener(o.DATA_PROCESS_COMPLETE,(function(){t.endOfSegment()}),t),t.jR.addEventListener(o.DATA_PROCESS_ERROR,(function(i){t.publish(o.DATA_PROCESS_ERROR,i)}),t))},u.prototype.close=function(){this.hL.close()},u.prototype.append=function(t){this.hL.append(t)},u.prototype.endOfSegment=function(){this.hL.endOfSegment()},u.prototype.AR=function(t){var i;t&&(this.publish(o.DATA_PROCESS_PROGRESS,t),t.getParam&&(i=t.getParam("parsedInfo")),"end"===(i?i.position:t.position)&&this.publish(o.DATA_PROCESS_COMPLETE,t))}},5877:function(t){"use strict";function i(t){var i=this;i.aL=t,i.a_=null,i.cL=!1,i.fL=0,i.lL=[],i.vL=null,i.dL=0,i.pL=0,i.mL=0,i.bL=[],i.gL=0,i.yL=0,i.wL=0,i._L=!1,i.EL=4}t.exports=i,i.prototype.destroy=function(){this.aL=null},i.prototype.parse=function(t,i){var n=this;n.a_=i;for(var e=0;e<t.length;e++)n.OL(t[e]);n.a_=null},i.prototype.OL=function(t){var i=this;if(i.AL(t.data1)&&i.AL(t.data2)&&(i.wL=t.pts/t.timescale,t.data1&=127,t.data2&=127,0!==t.data1||0!==t.data2))if(t.data1>=1&&t.data1<=14&&1===t.fieldType&&(i.cL=!0),15===t.data1&&i.cL&&1===t.fieldType)i.cL=!1;else{if(t.data1>=16&&t.data1<31){if(i.SL(t.data1,t.data2))return;if(8!=(8&t.data1)&&0===t.fieldType?i.TL(0):8==(8&t.data1)&&0===t.fieldType?i.TL(1):8!=(8&t.data1)&&1===t.fieldType?i.TL(2):8==(8&t.data1)&&1===t.fieldType&&i.TL(3),null===i.vL)return;i.IL(t),i.jL(t),i.ML(t);var n=119&t.data1;17===n&&48==(112&t.data2)?i.NL(15&t.data2):18!==n&&26!==n||64&t.data2?19!==n&&27!==n||64&t.data2||i.kL(63&t.data2):i.RL(63&t.data2)}else{if(i.cL&&1===t.fieldType)return;if(t.data1>=32&&t.data1<=126){if(0===t.fieldType&&2===i.fL?i.TL(0):0===t.fieldType&&3===i.fL?i.TL(1):1===t.fieldType&&0===i.fL?i.TL(2):1===t.fieldType&&1===i.fL&&i.TL(3),null===i.vL)return;var e=i.LL(t.data1);if(i.vL.appendChar(e),t.data2>=32&&t.data2<=126){var r=i.LL(t.data2);i.vL.appendChar(r)}}}i.dL=t.data1,i.pL=t.data2}},i.prototype.IL=function(t){var i=this,n=119&t.data1,e=96&t.data2;17===n&&64===e?(i.vL.startNewRow(1),i.DL(t.data2)):17===n&&96===e?(i.vL.startNewRow(2),i.DL(t.data2)):18===n&&64===e?(i.vL.startNewRow(3),i.DL(t.data2)):18===n&&96===e?(i.vL.startNewRow(4),i.DL(t.data2)):21===n&&64===e?(i.vL.startNewRow(5),i.DL(t.data2)):21===n&&96===e?(i.vL.startNewRow(6),i.DL(t.data2)):22===n&&64===e?(i.vL.startNewRow(7),i.DL(t.data2)):22===n&&96===e?(i.vL.startNewRow(8),i.DL(t.data2)):23===n&&64===e?(i.vL.startNewRow(9),i.DL(t.data2)):23===n&&96===e?(i.vL.startNewRow(10),i.DL(t.data2)):16===n&&64===e?(i.vL.startNewRow(11),i.DL(t.data2)):19===n&&64===e?(i.vL.startNewRow(12),i.DL(t.data2)):19===n&&96===e?(i.vL.startNewRow(13),i.DL(t.data2)):20===n&&64===e?(i.vL.startNewRow(14),i.DL(t.data2)):20===n&&96===e&&(i.vL.startNewRow(15),i.DL(t.data2))},i.prototype.jL=function(t){17===(119&t.data1)&&32==(112&t.data2)&&(this.DL(t.data2),this.vL.appendChar(" "))},i.prototype.ML=function(t){var i=this,e=119&t.data1;20===e&&32===t.data2?i.vL.setMode(n.POP_ON_MODE):20===e&&33===t.data2?i.vL.backspace():20===e&&36===t.data2?i.vL.clearEndOfRow():20===e&&37===t.data2?i.vL.setMode(n.ROLL_UP_MODE,2):20===e&&38===t.data2?i.vL.setMode(n.ROLL_UP_MODE,3):20===e&&39===t.data2?i.vL.setMode(n.ROLL_UP_MODE,4):20===e&&41===t.data2?i.vL.setMode(n.PAINT_ON_MODE):20===e&&44===t.data2?i.vL.eraseDisplayMemory():20===e&&45===t.data2?i.vL.linebreak():20===e&&46===t.data2?i.vL.eraseNondisplayMemory():20===e&&47===t.data2?i.vL.endOfCaption():23===e&&33===t.data2?i.vL.setIndent(1):23===e&&34===t.data2?i.vL.setIndent(2):23===e&&35===t.data2&&i.vL.setIndent(3)},i.prototype.NL=function(t){var i=["®","°","½","¿","™","¢","£","♪","à"," ","è","â","ê","î","ô","û"],n=t;n<0||n>=i.length||this.vL.appendChar(i[n])},i.prototype.RL=function(t){var i=["Á","É","Ó","Ú","Ü","ü","´","¡","*","'","-","©","℠","·",'"','"',"À","Â","Ç","È","Ê","Ë","ë","Î","Ï","ï","Ô","Ù","ù","Û","«","»"],n=t-32;n<0||n>=i.length||this.vL.appendChar(i[n])},i.prototype.kL=function(t){var i=["Ã","ã","Í","Ì","ì","Ò","ò","Õ","õ","{","}","\\","^","_","|","~","Ä","ä","Ö","ö","ß","¥","¤","¦","Å","å","Ø","ø","┌","┐","└","┘"],n=t-32;n<0||n>=i.length||this.vL.appendChar(i[n])},i.prototype.AL=function(t){return[0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0][t]},i.prototype.LL=function(t){return 42===t?"á":92===t?"é":94===t?"í":95===t?"ó":96===t?"ú":123===t?"ç":124===t?"÷":125===t?"Ñ":126===t?"ñ":String.fromCharCode(t)},i.prototype.SL=function(t,i){return this.dL===t&&this.pL===i},i.prototype.DL=function(t){var i=this;if(16==(16&t)){var n=0;0==(14&t)?n=0:2==(14&t)?n=4:4==(14&t)?n=8:6==(14&t)?n=12:8==(14&t)?n=16:10==(14&t)?n=20:12==(14&t)?n=24:14==(14&t)&&(n=28),i.vL.setColumn(n)}else 14==(14&t)&&i.vL.setItalic();1==(1&t)&&i.vL.setUnderlined()},i.prototype.TL=function(t){var i=this;i.lL[t]||(i.lL[t]=new e(t,i.onFlipMemories.bind(this),i.onEraseDisplayMemory.bind(this),i.onLinebreak.bind(this))),i.fL=t,i.vL=i.lL[t]},i.prototype.getChannel=function(t){return this.lL[t]},i.prototype.translate608RowToVTTLine=function(t){var i=[10,15.33,20.66,26,31.33,36.66,42,47.33,52.66,58,63.33,68.66,74,79.33,84.66];return t<1||t>i.length?i[0]:i[t-1]},i.prototype.translate608ColumnToVTTPosition=function(t){var i=0;return t<=4?i=10:t>=5&&t<=8?i=20:t>=9&&t<=12?i=30:t>=13&&t<=16?i=40:t>=17&&t<=20?i=50:t>=21&&t<=24?i=60:t>=25&&t<=29?i=70:t>=29&&(i=80),i},i.prototype.onFlipMemories=function(t){var i=this;i._L&&i.onEraseDisplayMemory(t);var e=i.getChannel(t);if(e.getMode()===n.POP_ON_MODE){if(i.gL=i.wL,t===i.mL){var r=i.bL;i.bL=e.getCaptionRows(),e.setCaptionRows(r);for(var s=0;s<i.bL.length;s++)i.bL[s]&&i.bL[s].hasCaptionData()&&(i._L=!0)}e.eraseNondisplayMemory()}},i.prototype.CL=function(t,i){var n=[];n.push("snapToLines:false"),n.push("align:start");var e="line:"+this.translate608RowToVTTLine(i)+"%";n.push(e);var r="position:"+this.translate608ColumnToVTTPosition(t)+"%";return n.push(r),n},i.prototype.PL=function(t,i,n){for(var e=i[t].toString();t<i.length-1;){var r=i[t+1];if(r&&r.hasCaptionData()){var s=r.toString();s.length>0&&(e+="\n"+s),n&&r.reset(),t++}else t++}return{rowIdx:t,rowText:e}},i.prototype.onEraseDisplayMemory=function(t){var i=this,e=i.getChannel(t),r=e.getMode();if(t===i.mL){if(r===n.POP_ON_MODE){i.yL=i.wL;for(var s=0;s<i.bL.length;s++){var o=i.bL[s];if(o&&o.hasCaptionData()){var u=o.getStartPosition(),h=i.CL(u,s+1),a=i.PL(s,i.bL,!0);s=a.rowIdx;var c=a.rowText;i.yL-i.gL>i.EL&&(i.yL=i.gL+i.EL),i.xL(c,h),i.gL+=.001,o.reset()}}}else r===n.ROLL_UP_MODE||r===n.PAINT_ON_MODE?(-1!==i.gL&&0!==i.gL||(i.gL=i.wL),i.yL>i.gL&&(i.gL=i.yL),i.UL(t),e.eraseNondisplayMemory()):r&&e.eraseNondisplayMemory();i._L=!1}else e.eraseNondisplayMemory()},i.prototype.onLinebreak=function(t){var i=this;if(t===i.mL){var e=i.getChannel(t).getMode();e!==n.ROLL_UP_MODE&&e!==n.PAINT_ON_MODE||(-1!==i.gL&&0!==i.gL||(i.gL=i.wL),i.yL>i.gL&&(i.gL=i.yL),i.UL(t))}},i.prototype.UL=function(t){for(var i=this,n=i.getChannel(t).getCaptionRows(),e=0;e<n.length;e++){var r=n[e];if(r&&r.hasCaptionData()){var s=i.CL(12,e),o=i.PL(e,n,!1);e=o.rowIdx;var u=o.rowText;i.yL=i.gL+1.5,i.xL(u,s),i.gL+=.001}}i.gL=-1},i.prototype.xL=function(t,i){var n=this,e="WEBVTT\nX-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:0\n\n";e+=n.VL(n.gL),e+=" --\x3e ",e+=n.VL(n.yL);for(var r=0;r<i.length;r++)e+=" "+i[r];if(e+="\n",e+=t+"\n",n.aL){var s={discontinuity:n.a_.discontinuity,sequenceNum:n.a_.seqNum,startTime:n.a_.startTime,programDateTime:n.a_.programDateTime,url:n.a_.url,duration:n.a_.duration,clockReference:0,localCueTime:0,mpegTSTime:0,data:e,offset:0,adjustedTime:0};n.aL(s)}},i.prototype.VL=function(t){var i=this,n=Math.floor(t/60/60);n=i.FL(n);var e=Math.floor(t/60%60);e=i.FL(e);var r=(t%60).toFixed(3);return n+":"+e+":"+(r=i.FL(r))},i.prototype.FL=function(t){return t<10&&(t="0"+t),t};var n={POP_ON_MODE:0,ROLL_UP_MODE:1,PAINT_ON_MODE:3};function e(t,i,n,e){var r=this;r.BL=t,r.zL=0,r.GL=[],r.HL=null,r.YL=null,r.qL=null,r.WL=i,r.QL=n,r.ZL=e}function r(){var t=this;t.XL=32,t.$L=-1,t.JL=!1,t.KL=!1,t.eD=0,t.cD=[],t.MAX_CHARS=32}function s(){var t=this;t.character="",t.isUnderlined=!1,t.isItalic=!1}e.prototype.setMode=function(t,i){this.qL=t,i<2?i=2:i>4&&(i=4),this.zL=i},e.prototype.getMode=function(){return this.qL},e.prototype._D=function(t){var i=this;if(!(t<1||t>15)){(t<i.zL||null===i.HL)&&(i.HL=i.zL);for(var n=i.GL[0],e=0;e<i.GL.length;e++)e<i.GL.length-1?i.GL[e]=i.GL[e+1]:i.GL[e]=n,(e>i.HL||i.HL-i.zL>0&&e<i.HL-i.zL)&&i.GL[e]&&i.GL[e].reset()}},e.prototype.SD=function(){var t=this;t.ZL&&t.ZL(t.BL)},e.prototype.startNewRow=function(t){if(!(t<1||t>15)){var i=this;i.qL===n.ROLL_UP_MODE?i._D(t):i.qL===n.PAINT_ON_MODE&&i.SD(),i.HL=t,i.YL=i.getCaptionRow(t),i.YL.reset()}},e.prototype.getCaptionRows=function(){return this.GL},e.prototype.setCaptionRows=function(t){this.GL=t},e.prototype.setIndent=function(t){this.YL&&this.YL.tabIndex(t)},e.prototype.setColumn=function(t){this.YL&&this.YL.columnIndex(t)},e.prototype.setItalic=function(){this.YL&&this.YL.setIsItalic(!0)},e.prototype.setUnderlined=function(){this.YL&&this.YL.setIsUnderlined(!0)},e.prototype.appendChar=function(t){this.YL&&this.YL.writeChar(t)},e.prototype.linebreak=function(){var t=this;t.ZL&&t.ZL(t.BL)},e.prototype.eraseNondisplayMemory=function(){for(var t=this,i=0;i<t.GL.length;i++)t.GL[i]&&t.GL[i].reset()},e.prototype.clearEndOfRow=function(){this.YL&&this.YL.clearToEnd()},e.prototype.backspace=function(){this.YL&&this.YL.backspace()},e.prototype.eraseDisplayMemory=function(){this.QL(this.BL)},e.prototype.endOfCaption=function(){this.WL(this.BL)},e.prototype.getCaptionRow=function(t){var i=this;if(t<1||t>15)return null;var n=t-1;return i.GL[n]||(i.GL[n]=new r),i.GL[n]},r.prototype.reset=function(){var t=this;t.KL=!1,t.JL=!1;for(var i=0;i<t.cD.length;i++)t.cD[i]&&t.cD[i].reset();t.eD=0,t.XL=32,t.$L=-1},r.prototype.clearToEnd=function(){for(var t=this,i=t.eD;i<t.cD.length;i++)t.cD[i]&&t.cD[i].reset()},r.prototype.columnIndex=function(t){t<0||t>=this.MAX_CHARS||(this.eD=t)},r.prototype.tabIndex=function(t){this.TD(t)},r.prototype.writeChar=function(t){var i=this,n=i.cD[i.eD];n||(i.cD[i.eD]=new s,n=i.cD[i.eD]),n.setValue(t,i.KL,i.JL),i.eD<i.XL&&(i.XL=i.eD),i.eD>i.$L&&(i.$L=i.eD),i.TD(1)},r.prototype.backspace=function(){var t=this;t.eD>0&&(t.cD[t.eD].reset(),t.eD--)},r.prototype.TD=function(t){var i=this;i.eD+t<i.MAX_CHARS?i.eD+=t:i.eD=i.MAX_CHARS-1},r.prototype.setIsItalic=function(t){this.KL=t},r.prototype.setIsUnderlined=function(t){this.JL=t},r.prototype.hasCaptionData=function(){return 32!==this.XL||-1!==this.$L},r.prototype.getCharacterAt=function(t){return t<0||t>=this.MAX_CHARS?null:this.cD[t]},r.prototype.getStartPosition=function(){return this.XL},r.prototype.getEndPosition=function(){return this.$L},r.prototype.toString=function(){var t=this,i="",n=!1,e=!1;if(t.hasCaptionData())for(var r=t.XL;r<=t.$L;r++){var s=t.getCharacterAt(r);s.isItalic&&!e?(i+="<i>",e=!0):e&&!s.isItalic&&(i+="</i>",e=!1),s.isUnderlined&&!n?(i+="<u>",n=!0):n&&!s.isUnderlined&&(i+="</u>",n=!1),"&"===s.character?i+="&amp;":"<"===s.character?i+="&lt;":">"===s.character?i+="&gt;":i+=s.character}return n&&(i+="</u>",n=!1),e&&(i+="</i>",e=!1),i},s.prototype.reset=function(){var t=this;t.character="",t.isItalic=!1,t.isUnderlined=!1},s.prototype.setValue=function(t,i,n){var e=this;e.character=t,e.isItalic=i,e.isUnderlined=n}},4939:function(t,i,n){"use strict";i.Loader=l,i.LoadRequest=function(t){var i=this;if(!t||e.isNullOrUndefined(t.maxRetries)||e.isNullOrUndefined(t.requestTimeout)||e.isNullOrUndefined(t.chunkedRequestTimeout))throw new Error("[LoadRequest] Invalid Arguments: Request details are not complete");i.method=t.method||"GET",i.chunked=t.isChunkedLoad||!1,i.useMSStream=t.useMSStream||!1,i.maxRetries=t.maxRetries,i.retryExclusion=t.retryExclusion,i.requestTimeout=1e3*t.requestTimeout,i.chunkedRequestTimeout=1e3*t.chunkedRequestTimeout,i.responseType=t.responseType||"text",i.headerFields=t.headerFields,i.minChunkSize=e.isNullOrUndefined(t.minChunkSize)?1e5:t.minChunkSize,i.stopStreamLoadOnError=t.stopStreamLoadOnError,i.url=t.url,i.withCredentials=t.withCredentials||!1,i.withResponseHeaders=t.withResponseHeaders||!1},i.Events={COMPLETE:"complete",ERROR:"error",PROGRESS:"progress",BYTES_LOADED:"bytesLoaded"};var e=n(6837),r=n(2990),s=n(2999),o=n(7572),u=n(902),h=0,a=3,c=4,f=1;function l(t,i,n){var e=this;if(!t)throw new Error("[Loader] Invalid Arguments: Loader created without a load request");s.call(e,"Loader"),e.request=t,e.mS=n,e.window=e.mS?null:i||window,e.UD=null,e.VD={},e.YD=[1e3,1e3,2e3,2e3,3e3,3e3,5e3],e.WD=5e3,e.ZD=new u(1e3,1),e.ZD.addEventListener(e.load,e),e.MIN_TIMEOUT=2e3,e.MAX_TIMEOUT=15e3,e.XD=0,e.i_=t.maxRetries,e.$D=new u(e._C(),1),e.$D.addEventListener(e.tP,e)}function v(t,i,n){l.call(this,t,i,n)}function d(t,i,n){v.call(this,t,i,n)}i.getLoader=function(t,i,n){if(!t)throw new Error("[LoaderFactory] Invalid Arguments: Loader created without a load request");return t.chunked?t.useMSStream?new d(t,i,n):new v(t,i,n):new l(t,i,n)},r.inherits(l,s),r.inherits(v,l),r.inherits(d,v),l.prototype.load=function(t,n){var e=this;if(!e.request)throw new Error("[Loader] InvalidStateError: load called without a request");if(e.url=t||e.request.url,!e.url)return e.publish(i.Events.ERROR,new o.Error(o.ERR_XHR_LOAD));e.iP(),e.UD=e.mS?new XMLHttpRequest:new e.window.XMLHttpRequest,e.UD.nP=0,e.UD.eP=!1,e.rP(),e.UD.withCredentials=e.request.withCredentials,e.UD.open(e.request.method,e.url,!0),e.sP=e.request.headerFields,e.sP&&Object.keys(e.sP).forEach((function(t){e.UD.setRequestHeader(t,e.sP[t])})),e.oP(),e.$D.reset(),e.$D.start(),e.UD.send(n)},l.prototype.oP=function(){this.UD.responseType=this.request.responseType},l.prototype.rP=function(){var t=this;t.UD.onerror=t.GI.bind(t),t.UD.onreadystatechange=function(){if(t.UD&&t.UD.readyState===c&&!t.UD.eP){if(!t.uP(t.UD.status))return t.$D.stop(),t.GI();t.UD.eP=!0;var n={data:t.UD.response};if(t.request.withResponseHeaders){var e=t.UD.getAllResponseHeaders();if(e){var r=e.trim().split(/[\r\n]+/),s=[];r.forEach((function(t){var i=t.split(": "),n=i.shift(),e=i.join(": ");s.push({name:n,value:e})})),n.headers=s}}t.publish(i.Events.COMPLETE,n),t.$D.stop()}}},l.prototype.hP=function(t){var i=new RegExp(t+": (.*)","ig"),n=this.UD.getAllResponseHeaders(),e=i.exec(n);return e&&e.length>1?e[1]:""},l.prototype.uP=function(t){return t>=200&&t<300},l.prototype.aP=function(){Date.now(),this.cP;this.$D.stop()},l.prototype.tP=function(){this.aP(),this.GI()},l.prototype.fP=function(){this.reset(),this.lP(o.ERR_PARTIAL_LOAD)},l.prototype.vP=function(){var t=this,i=t.YD.length,n=t.XD;return n<i?t.YD[n]:t.YD[i-1]+t.WD*(n-i+1)},l.prototype.GI=function(){var t=this;t.iP(),t.XD<t.i_&&(!t.request.retryExclusion||-1===t.request.retryExclusion.indexOf(t.UD.status))?(t.XD++,t.ZD.delay=t.vP(),t.ZD.reset(),t.ZD.start(),t.request.headerFields&&t.UD.readyState===c&&0===t.UD.status&&(t.request.headerFields=null)):t.request.stopStreamLoadOnError?t.lP(o.ERR_XHR_LOAD_LIVE_PAUSE):403===t.UD.status?t.lP(o.ERR_XHR_LOAD_FORBIDDEN):t.lP(o.ERR_XHR_LOAD)},l.prototype.lP=function(t){this.publish(i.Events.ERROR,new o.Error(t))},l.prototype.iP=function(){var t=this;t.UD&&t.UD.readyState!==c&&t.UD.readyState!==h&&(t.UD.eP=!0,t.UD.abort()),t.ZD.stop(),t.$D.stop()},l.prototype._C=function(){var t=this,i=t.request,n=i.chunked?i.chunkedRequestTimeout:i.requestTimeout;return isNaN(n)||n<t.MIN_TIMEOUT||n>t.MAX_TIMEOUT?t.MAX_TIMEOUT:n},l.prototype.reset=function(){var t=this;t.iP(),t.UD=null,t.request=null},l.prototype.destroy=function(){var t=this;t.reset(),t.ZD.destroy(),t.$D.destroy(),s.prototype.destroy.call(t)},v.prototype.destroy=function(){l.prototype.destroy.call(this)},v.prototype.rP=function(){var t=this,n=function(){if(t.UD&&!t.UD.eP&&(t.UD.readyState===c||t.UD.readyState===a)){if(!t.uP(t.UD.status))return t.$D.stop(),0===t.UD.nP?t.GI():void t.fP();var n=t.UD.responseText,e=n.length-t.UD.nP;if(e>0&&(t.$D.stop(),t.VD.atlasMarker=t.hP("X-ATLAS-MARKERS"),t.publish(i.Events.BYTES_LOADED,n.length,t.VD)),e>t.request.minChunkSize||t.UD.readyState===c){for(var r=new Uint8Array(e),s=0;s<e;s++)r[s]=255&n.charCodeAt(s+t.UD.nP);t.UD.nP=n.length,t.publish(i.Events.PROGRESS,r,n.length)}t.$D.start(),t.UD.readyState===c&&(t.UD.eP=!0,t.publish(i.Events.COMPLETE),t.$D.stop())}};t.UD.onreadystatechange=n,t.UD.onprogress=n},v.prototype.tP=function(){var t=this;t.aP(),t.UD.nP>0&&t.UD.readyState===a?t.fP():t.GI()},v.prototype.oP=function(){this.UD.overrideMimeType("text/plain; charset=x-user-defined")},d.prototype.destroy=function(){v.prototype.destroy.call(this)},d.prototype.rP=function(){var t=this;t.UD.onreadystatechange=function(){if(t.UD.readyState===a){if(!t.uP(t.UD.status))return t.$D.stop(),t.GI();var n=t.UD.response;if(t.dP||(t.dP=t.mS?new MSStreamReader:new t.window.MSStreamReader),t.dP.readyState===f)return;t.dP.readAsArrayBuffer(n),t.dP.onprogress=function(){t.$D.stop();var n=t.dP.result;n.byteLength>0&&(t.VD.atlasMarker=t.hP("X-ATLAS-MARKERS"),t.publish(i.Events.BYTES_LOADED,n.byteLength,t.VD));var e=new Uint8Array(n.slice(t.UD.nP,n.byteLength));t.UD.nP=n.byteLength,t.publish(i.Events.PROGRESS,e,n.byteLength),t.$D.start()},t.dP.onload=function(){t.$D.stop(),t.publish(i.Events.COMPLETE)},t.dP.onerror=function(){t.$D.stop()}}}},d.prototype.oP=function(){this.UD.responseType="ms-stream"},d.prototype.reset=function(){var t=this;l.prototype.reset.call(t),t.dP&&t.dP.abort()}},1788:function(t,i,n){"use strict";t.exports=y;var e=n(574),r=e.MetadataTypes,s=e.StreamingMode,o=n(2503).StreamTypes,u="#EXT-X-STREAM-INF:",h="#EXT-X-MEDIA:TYPE=SUBTITLES,",a="#EXT-X-MEDIA:",c="#EXTINF:",f="#EXT-X-MEDIA-SEQUENCE:",l="#EXT-X-DISCONTINUITY-SEQUENCE:",v="#EXT-X-TARGETDURATION:",d="#EXT-X-PROGRAM-DATE-TIME:",p="#EXT-X-DATERANGE:",m="#EXT-X-BYTERANGE:",b="#EXT-X-MAP",g="#EXT-X-KEY";function y(){this.pP=[],this.ERRORS={INVALID_M3U8:1,EMPTY_DATA:2,NO_SEGMENTS:3}}y.prototype.parse=function(t){if(!t)return null;return t.type===r.STRUCTURED?this.parseStructuredMetadata(t):this.mP(t)},y.prototype.mP=function(t){var i=this,n={},e=t.rawData;if(""===e||!e)return n.error=i.ERRORS.EMPTY_DATA,n;var r=e.split("\n");return 0!==r[0].indexOf("#EXTM3U")?(n.error=i.ERRORS.INVALID_M3U8,n):e.indexOf(c)>0?i.bP(r,t):e.indexOf(u)>0?i.gP(r,t):(n.error=i.ERRORS.INVALID_M3U8,n)},y.prototype.parseStructuredMetadata=function(t){var i=this,n={};return n.streamInfoList=i.parseStreamInfo(t.streams),t.hasStreamMetadata&&n.streamInfoList.forEach((function(t){t.segmentInfoList=i.parseSegmentInfo(t.hlsInfo,t.initSegment,t.index),t.duration=0,t.segmentInfoList.forEach((function(i){t.duration+=i.duration})),t.hasEndList=!0,t.targetDuration=t.hlsInfo.segment_duration})),t.hasAltStreamMetadata&&(n.renditionGroups={},t.altStreams.forEach((function(t){var e,r=t.manifestContent;r&&0===r.indexOf(h)?((e=i.yP(r,t.host)).type=o.SUBTITLES,e.containerFormat="vtt"):(e=i.parseStreamInfo([t])[0]).hlsInfo&&(e.segmentInfoList=i.parseSegmentInfo(e.hlsInfo,e.initSegment)),i.wP(n.renditionGroups,e)}))),n},y.prototype.gP=function(t,i){for(var n=this,e=[],r={},s=i.url,o=i.cdn,h=0;h<t.length;h++){var c=null,f=t[h].trim();if(0===f.indexOf(u)){c=n._P(n.EP(f.substr(u.length)));do{f=t[++h]}while(f.match(/^\s*$/));c.url=n.OP(f,s),c.cdn=o,e.push(c)}else 0===f.indexOf(a)&&(f=f.replace(/"/g,""),c=n.AP(n.EP(f.substr(a.length)),s),n.wP(r,c))}return{streamInfoList:e,renditionGroups:r}},y.prototype.wP=function(t,i){if(i.type&&i.groupId){var n=t[i.type];n||(n=t[i.type]={});var e=n[i.groupId];e&&e.length?e.push(i):n[i.groupId]=[i]}},y.prototype.EP=function(t){for(var i={},n=t.indexOf("=");-1!==n;){var e=t.substr(0,n),r=0;'"'===(t=t.substr(n+1)).charAt(0)?(r=t.substr(1).indexOf('"'),i[e]=t.substr(1,r),t=t.substr(r+3)):(r=-1===(r=t.indexOf(","))?t.length:r,i[e]=t.substr(0,r),t=t.substr(r+1)),n=t.indexOf("=")}return i},y.prototype.bP=function(t,i){var n=this,e={},r={},u=[],h=[],a={streamInfoList:[],renditionGroups:{}};if(!t||!t.length)return a;var y=i.url,w=i.index;r.discontinuity=!1,r.sequenceNum=0,r.startTime=0,r.programDateTime=0,r.brStartOffset=-1,r.brEndOffset=-1,r.levelIndex=w,e.discontinuitySeqNum=0,e.index=w,e.targetDuration=0,e.hasEndList=!1,e.url=y,e.duration=0,e.containerFormat="",e.streamingMode=s.HLS,e.dateRanges=[];for(var _=0;_<t.length;_++){var E=t[_].trim();if(!E.match(/^\s*$/)){if(0===E.indexOf(f)&&(e.seqNum=parseInt(E.substr(f.length)),r.sequenceNum=e.seqNum),0===E.indexOf(l))e.discontinuitySeqNum=parseInt(E.substr(l.length));else if(0===E.indexOf("#EXT-X-DISCONTINUITY"))r.discontinuity=!0;else if(0===E.indexOf(v))e.targetDuration=parseFloat(E.substr(v.length));else if(0===E.indexOf(b)){var O=n.SP(E,y);r.initSegment=O}else if(0===E.indexOf(g))r.encryptionData=n.TP(E,y);else if(0===E.indexOf(d))r.programDateTime=n.IP(E);else if(0===E.indexOf(p)){var A=n.jP(E);A&&e.dateRanges.push(A)}else if(0===E.indexOf(c)){var S=E.indexOf(",");r.duration=-1===S?parseFloat(E.substr(c.length)):parseFloat(E.substr(c.length,S-c.length)),e.duration+=r.duration;do{E=t[++_].trim()}while(E.match(/^\s*$/));if(0===E.indexOf(m)){var T=E.substr(m.length,E.length-m.length),I=T.indexOf("@");r.brStartOffset=parseInt(T.substr(I+1,T.length-I-1)),r.brEndOffset=r.brStartOffset+parseInt(T.substr(0,I))-1;do{E=t[++_].trim()}while(E.match(/^\s*$/))}r.url=n.OP(E,y),r.containerFormat=n.MP(r.url),e.containerFormat=r.containerFormat,u.push(n.NP(r)),r.startTime+=r.duration,r.sequenceNum++,r.programDateTime=0,r.brStartOffset=-1,r.brEndOffset=-1,r.encryptionData&&(r.encryptionData.initVector=null)}else 0===E.indexOf("#EXT-X-ENDLIST")&&(e.hasEndList=!0);if(E.indexOf("#EXT-X-CUE-OUT:")>=0){var j=n.kP(r.sequenceNum,E);h.push(j)}}}if(u.length&&(e.segmentInfoList=u,e.initSegment=u[0].initSegment),h.length&&(e.cuepointList=h),i.streamType&&i.streamType!==o.MAIN){var M=a.renditionGroups;e.type=i.streamType,e.groupId=i.groupId,e.name=i.name,n.wP(M,e)}else a.streamInfoList.push(e);return a},y.prototype._P=function(t){if(!t)return null;var i={streamingMode:s.HLS};return Object.keys(t).forEach((function(n){var e=t[n];switch(n){case"BANDWIDTH":i.bitrate=1*e;break;case"AVERAGE-BANDWIDTH":i.avgBitrate=1*e;break;case"RESOLUTION":var r=e.split("x");i.width=parseInt(r[0]),i.height=parseInt(r[1]);break;case"CODECS":i.codecs=e.split(","),i.hasAudio=-1!==e.indexOf("mp4a");break;case"AUDIO":i.audioGroupId=e.replace(/"/g,"");break;case"VIDEO":i.videoGroupId=e.replace(/"/g,"");break;case"SUBTITLES":i.subtitlesGroupId=e.replace(/"/g,"");break;case"CLOSED-CAPTIONS":i.ccGroupId=e.replace(/"/g,"")}})),i},y.prototype.MP=function(t,i){var n=null;return t&&t.length?t.indexOf(".ts")>-1?n="ts":t.indexOf(".mp4")>-1||t.indexOf(".m4s")>-1?n="mp4":t.indexOf(".aac")>-1?n="aac":t.indexOf(".vtt")>-1&&(n="vtt"):i&&(i.indexOf("mp2t")>-1?n="ts":i.indexOf("mp4")>-1?n="mp4":i.indexOf("aac")>-1?n="aac":i.indexOf("vtt")>-1&&(n="vtt")),n},y.prototype.OP=function(t,i){var n=null;return"http://"===t.substr(0,7)||"https://"===t.substr(0,8)?t:(i.indexOf("?")>-1&&(i=i.substr(0,i.indexOf("?"))),"/"===t.substr(0,1)?i.substr(0,i.indexOf("//")+2)+(n=i.substr(i.indexOf("//")+2)).substr(0,n.indexOf("/"))+t:i.substr(0,i.lastIndexOf("/")+1)+t)},y.prototype.yP=function(t,i){var n=(t=t.replace(/"/g,"")).substr(h.length).split(",");return this.RP(n,t,i)},y.prototype.RP=function(t,i,n){var e=this,r={};return t&&t.length&&(t.forEach((function(t){t.indexOf("GROUP-ID")>-1?r.groupId=t.split("=")[1]:t.indexOf("LANGUAGE")>-1?r.language=t.split("=")[1]:t.indexOf("NAME")>-1?r.name=t.split("=")[1]:t.indexOf("AUTOSELECT")>-1?r.autoSelect="YES"===t.split("=")[1]:t.indexOf("DEFAULT")>-1?r.default="YES"===t.split("=")[1]:t.indexOf("URI")>-1?r.url=e.OP(t.substr(4),n):t.indexOf("FORCED")>-1&&(r.forced="YES"===t.split("=")[1])})),r.streamingMode=s.HLS),r},y.prototype.AP=function(t,i){var n=this;if(!t)return null;var e={streamingMode:s.HLS};return Object.keys(t).forEach((function(r){var s=t[r];switch(r){case"TYPE":e.type=s,e.type===o.SUBTITLES&&(e.containerFormat="vtt");break;case"GROUP-ID":e.groupId=s;break;case"LANGUAGE":e.language=s;break;case"NAME":e.name=s;break;case"AUTOSELECT":e.autoSelect="YES"===s;break;case"DEFAULT":e.default="YES"===s;break;case"FORCED":e.forced="YES"===s;break;case"URI":e.url=n.OP(s,i)}})),e},y.prototype.LP=function(t){var i={};return i.discontinuity=t.discontinuity,i.sequenceNum=t.sequenceNum,i.startTime=t.startTime,i.programDateTime=t.programDateTime,i.url=t.url,i.duration=t.duration,i},y.prototype.SP=function(t,i){if(!t)return null;for(var n={},e=t.substr(b.length+1).split(","),r=0;r<e.length;r++){var s=e[r].split("=");if(0===s[0].indexOf("URI"))n.url=this.OP(e[r].substr(5,e[r].length-6),i);else if(0===s[0].indexOf("BYTERANGE")){var o=s[1].indexOf("@");n.range={start:parseInt(s[1].substr(o+1,s[1].length-o-2)),end:parseInt(s[1].substr(1,o-1)-1)}}}return n},y.prototype.TP=function(t,i){if(!t)return null;for(var n={},e=t.substr(g.length+1).split(","),r=0;r<e.length;r++){var s=e[r].split("=");0===s[0].indexOf("URI")?n.keyUri=this.OP(e[r].substr(5,e[r].length-6),i):0===s[0].indexOf("METHOD")?n.method=s[1]:0===s[0].indexOf("IV")&&(n.initVector=s[1])}return n},y.prototype.IP=function(t){return t?this.DP(t.substr(d.length)):0},y.prototype.DP=function(t){if(!t)return 0;var i,n,e=t.split("T"),r=e[0].split("-"),s=parseInt(r[0]),o=parseInt(r[1])-1,u=parseInt(r[2]),h=e[1],a=0;if(h.indexOf("Z")>=0)i=h.substr(0,h.indexOf("Z")).split(":");else if(h.indexOf("+")>=0){var c=h.split("+");i=c[0].split(":"),n=c[1].split(":"),a=-1}else if(h.indexOf("-")>=0){var f=h.split("-");i=f[0].split(":"),n=f[1].split(":"),a=1}else h.indexOf(".")>=0&&(i=h.split(":"));var l=0,v=0,d=0;(i&&(l=parseInt(i[0]),v=parseInt(i[1]),d=parseFloat(i[2])),n)&&(l=(24+l+a*parseInt(n[0]))%24,(v+=a*parseInt(n[1]))>=60?(l++,v-=60):v<0&&(l--,v+=60));return new Date(Date.UTC(s,o,u,l,v,d)).getTime()},y.prototype.jP=function(t){var i=this;if(!t)return null;var n=(t=t.replace(/"/g,"")).substr(p.length).split(","),e={};return n&&n.length&&n.forEach((function(t){var n=t.split("=")[1];t.indexOf("ID")>-1?e.id=n:t.indexOf("START-DATE")>-1?e.startDate=i.DP(n):t.indexOf("DURATION")>-1?e.duration=parseInt(n):t.indexOf("END-DATE")>-1?e.endDate=i.DP(n):t.indexOf("CLASS")>-1?e.className=n:t.indexOf("X-DATA")>-1&&(e.rawData=atob(n))})),"urn:uplynk:content-data:watchtogether"===e.className&&e.rawData&&e.rawData.length&&(e.jsonData=JSON.parse(e.rawData)),e},y.prototype.NP=function(t){var i={};i.discontinuity=t.discontinuity,i.sequenceNum=t.sequenceNum,i.startTime=t.startTime,i.programDateTime=t.programDateTime,i.brStartOffset=t.brStartOffset,i.brEndOffset=t.brEndOffset,i.containerFormat=t.containerFormat,i.levelIndex=t.levelIndex,i.url=t.url,i.duration=t.duration;var n=t.encryptionData;n&&(i.encryptionData={keyUri:n.keyUri,method:n.method,initVector:n.initVector});var e=t.initSegment;return e&&(i.initSegment={url:e.url},e.range&&(i.initSegment.range={start:e.range.start,end:e.range.end})),i},y.prototype.parseStreamInfo=function(t){var i=this;if(!t)return null;var n=[];return t.forEach((function(t,e){var r=t.host;t.path&&""!==t.path?r+=t.path:t.url&&(r=t.url);var u={streamingMode:s.HLS,bitrate:1e3*t.bitrate,avgBitrate:t.avgBitrate?1e3*t.avgBitrate:0,channels:t.channels,height:t.height,width:t.width,url:r,index:e,hlsInfo:t.hls_info,cdn:t.cdn,rcMode:t.rcMode||"cbr",format:t.format,audioCodec:t.acodec,videoCodec:t.vcodec,autoSelect:t.auto_select,default:t.default,type:(t.type||o.MAIN).toUpperCase(),name:t.name,groupId:t.group_id,language:t.language,forced:t.forced};if(t.alt_renditions&&(u.audioGroupId=t.alt_renditions.audio_group_id,u.videoGroupId=t.alt_renditions.video_group_id,u.subtitlesGroupId=t.alt_renditions.subtitle_group_id,u.ccGroupId=t.alt_renditions.cc_group_id),u.hlsInfo&&u.hlsInfo.mp4_url){var h=u.hlsInfo;u.initSegment={url:h.mp4_url},h.init_segment_offset>=0&&h.init_segment_length>=0&&(u.initSegment.range={start:h.init_segment_offset,end:h.init_segment_offset+h.init_segment_length-1}),u.sidxOffset=h.sidx_offset,u.sidxLength=h.sidx_length,u.firstSegOffset=h.first_segment_offset,u.firstSegLength=h.first_segment_length}if(t.manifestContent&&t.manifestContent.indexOf("SUBTITLES")>-1){var a=t.manifestContent.split('SUBTITLES="')[1];u.subtitlesGroupId=a.substr(0,a.indexOf('"'))}if(u.hlsInfo){var c=u.hlsInfo.ts_url||u.hlsInfo.mp4_url;u.containerFormat=i.MP(c,u.hlsInfo.mime_type)}n.push(u)})),n},y.prototype.parseSegmentInfo=function(t,i,n){if(!t)return null;var e=[],r={brStartOffset:-1,brEndOffset:-1,programDateTime:0,discontinuity:!1};r.sequenceNum=t.start_index,r.startTime=0,r.initSegment=i;var s="",o="_xx.ts";t.ts_url&&(s=t.ts_url.indexOf("?")>=0?"&":"?");for(var u=0;u<t.segments_count;u++){if(t.ts_url)if(t.ts_url.indexOf(o)>=0){var h="_"+r.sequenceNum.toString()+".ts";r.url=t.ts_url.replace(o,h),r.url=r.url+s+"yh=1"}else r.url=t.ts_url+s+"num="+r.sequenceNum.toString();else r.url=t.mp4_url,0===u&&(r.brStartOffset=t.first_segment_offset,r.brEndOffset=r.brStartOffset+t.first_segment_length-1);r.levelIndex=n,r.duration=t.segment_duration,u===t.segments_count-1&&(r.duration=t.last_segment_duration),r.containerFormat=this.MP(r.url,t.mime_type),e.push(this.NP(r)),r.sequenceNum++,r.startTime+=r.duration,r.brStartOffset=-1,r.brEndOffset=-1}return e},y.prototype.CP=function(t){var i=t.split(":"),n=0;return i.length>1&&(n=1e3*parseFloat(i[1])),n},y.prototype.kP=function(t,i){var n=t;if(!(n<0)){var e=this.CP(i),r={};return r.startSeqNum=n,r.startTime=NaN,r.cuepointDuration=e,r}}},7580:function(t,i,n){"use strict";t.exports=h;var e=n(574).StreamingMode,r=n(2503).StreamTypes,s=n(2990),o="BaseURL",u="$RepresentationID$";function h(){var t=this;t.pP=[],t.PP=null,t.xP="blah",t.VP=null,t.FP=null,t.ERRORS={INVALID_MPD:1,EMPTY_DATA:2,NO_SEGMENTS:3}}h.prototype.destroy=function(){},h.prototype.BP=function(t){return t?Date.parse(t):0},h.prototype.zP=function(t){var i=0;if(t&&"P"===t.charAt(0)){t.match(/[\d|.|\+]+[A-Z]/g).forEach((function(t){var n=t.charAt(t.length-1),e=parseFloat(t,10);"S"===n?e*=1e3:"M"===n?e*=6e4:"H"===n&&(e*=36e5),i+=e}))}else t&&!isNaN(t)&&(i=parseFloat(t,10));return i},h.prototype.GP=function(t,i){if(void 0===t||void 0===i)return"";if("08d"===t){for(var n=i.toString();n.length<8;)n="0"+n;return n}return i},h.prototype.HP=function(t,i,n,e,r,s){var o=this,u={brEndOffset:-1,brStartOffset:-1,containerFormat:"mp4",discontinuity:0,duration:t/1e3,levelIndex:0,periodId:i,sequenceNum:n,startTime:e/1e3,url:r,initSegment:{url:s}};return null===o.FP?(o.FP=u.startTime,u.startTime=0):(u.startTime-=o.FP,u.startTime=Math.round(1e3*u.startTime)/1e3),u},h.prototype.YP=function(t,i,n,s,o,u,h,a){var c=this,f=c.qP(i),l=c.WP(n),v=c.QP(n),d=o>v?o/l:v/l,p={groupId:n.id,bitrate:parseInt(n.bandwidth),codecs:[n.codecs],containerFormat:"mp4",drmInfo:[],duration:s/1e3,hasAudio:f===r.AUDIO,hasEndList:!o&&s>0,height:f===r.VIDEO?n.height:0,segmentInfoList:[],type:f,width:f===r.VIDEO?n.width:0,streamingMode:e.DASH,initSegment:{url:a},url:h,targetDuration:d};if(f===r.AUDIO?(p.audioCodec=n.codecs,p.language=i.lang,p.autoSelect=!1,p.default=!1,p.groupId=n.id,p.channels=n.audioChannnelConfiguration?n.audioChannnelConfiguration.value:0):f===r.VIDEO?(p.audioGroupId="audio",p.subtitlesGroupId="subs",p.videoCodec=n.codecs):f===r.SUBTITLES&&(p.language=i.lang,p.groupId=n.id,p.codec=n.codecs,p.autoSelect=!1,p.subtitlesCodec=n.codecs),i.drm.length>0){for(var m={},b=0;b<i.drm.length;b++){var g=i.drm[b];m.periodId=t.id;var y={prefix:null!==c.VP?c.VP:"",pssh:g.pssh};"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===g.schemeIdUri?(y.type="wv",m.widevine=y):"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95"===g.schemeIdUri&&(y.type="pr",y.pro=g.pro,m.playready=y)}p.drmInfo.push(m)}return p},h.prototype.WP=function(t){return t.segmentList?parseInt(t.segmentList.timescale,10):t.segmentTemplate?parseInt(t.segmentTemplate.timescale,10):1e3},h.prototype.QP=function(t){var i=this.WP(t);if(t.segmentList)return 1e3*parseInt(t.segmentList.duration,10)/i;if(t.segmentTemplate){var n=t.segmentTemplate;if(n.duration)return 1e3*parseInt(n.duration,10)/i;if(n.segmentTimeline){var e=0;return n.segmentTimeline.sElements.forEach((function(t){t.r&&t.r>0&&(e=1e3*parseInt(t.d,10)/i)})),e}}return 0},h.prototype.ZP=function(t,i,n,e,r,o,h,a){var c=this,f=new RegExp(/\$Number%([\d|.|\+]*[a-zA-Z])\$/),l=t.startMS,v=t.durationMS,d=c.QP(i),p=[],m="";if(i.segmentList)for(var b=0;b<i.segmentList.segments.length;b++){var g=i.segmentList.segments[b],y=Math.min(d,v);v-=y,m=n&&!s.isAbsoluteUrl(g)?n+g:g,p.push(c.HP(y,t.id,b,l,m,e)),l+=y}else if(i.segmentTemplate){var w=i.segmentTemplate,_=parseInt(w.startNumber,10),E=0,O=Math.ceil(t.durationMS/d),A=0,S=0,T=0;if("dynamic"===a?(A=Math.min(Math.floor((o-t.startMS)/d),O),S=Math.max(Math.floor((o-t.startMS-h)/d),1)):(A=O,S=1),A<=0||S>A)E=0;else{var I=S-1;_+=I,E=A===S?1:A-S+1,T=t.startMS+I*d,v-=I*d,E<0&&(E=0)}for(var j=w.media.replace(u,i.id),M=f.test(j)?j.match(f)[1]:"",N=_;N<E+_;N++){var k=j.replace(f,c.GP(M,N)),R=Math.min(d,v);v-=R,m=n&&!s.isAbsoluteUrl(k)?n+k:k;var L=c.HP(R,t.id,N-_,T,m,e);p.push(L),T+=R}}return p},h.prototype.XP=function(t,i){var n=null;return t.segmentList?n=t.segmentList.initialization.sourceURL:t.segmentTemplate&&(n=t.segmentTemplate.initialization.replace(u,t.id)),i&&!s.isAbsoluteUrl(n)?i+n:n},h.prototype.$P=function(t){return(new DOMParser).parseFromString(t,"application/xml")},h.prototype.parse=function(t){var i=this,n={};if(!t)return null;var s=i.$P(t.rawData);if(null===s||null===s.documentElement||void 0===s.documentElement)return n.error=i.ERRORS.INVALID_MPD,n;if("MPD"!==s.documentElement.nodeName)return n.error=i.ERRORS.INVALID_MPD,n;t.headers&&t.headers.length>0&&t.headers.forEach((function(t){"x-uplynk-prefix"===t.name&&(i.VP=t.value)})),i.PP=s,i.JP(s.documentElement,n);var o=i.BP(n.publishTime),u=i.KP(o);n.streamingMode=e.DASH,n.drm=!1,n.reloadUrl=t.url;for(var h=[],a=s.documentElement.childNodes,c=0;c<a.length;c++){var f=a[c];if(1===f.nodeType)if("Period"===f.nodeName){var l=i._x(f);null!==l&&h.push(l)}else"Location"===f.nodeName&&(n.reloadUrl=f.childNodes[0].nodeValue)}for(var v=[],d=[],p=[],m=i.zP(n.mediaPresentationDuration),b=i.zP(n.minimumUpdatePeriod),g=i.zP(n.suggestedPresentationDelay),y=i.BP(n.availabilityStartTime),w=0,_=-1,E=0;E<h.length;E++){var O=h[E];O.startMS=i.tU(O,y,w),-1===_&&(_=O.startMS);var A=E+1<h.length?h[E+1]:null;O.endMS=i.iU(O,O.startMS,y,A,_,m,b,u),O.durationMS=O.endMS-O.startMS;for(var S=0;S<O.adaptationSets.length;S++)for(var T=O.adaptationSets[S],I=i.qP(T),j=0;j<T.representations.length;j++){var M=T.representations[j],N=M.baseURL?M.baseURL:T.baseURL,k=i.XP(M,N),R=i.YP(O,T,M,m,b,n.type,n.reloadUrl,k),L=i.ZP(O,M,N,k,_,u,g,n.type);L.length>0&&(Array.prototype.push.apply(R.segmentInfoList,L),I===r.VIDEO?i.nU(v,R):I===r.AUDIO?i.nU(d,R):I===r.SUBTITLES&&i.nU(p,R)),T.drm.length>0&&(n.drm=!0)}w+=O.durationMS}this.eU(d),this.eU(p);var D={AUDIO:{audio:d},SUBTITLES:{subs:p}};return n.streamInfoList=v,n.renditionGroups=D,n},h.prototype.eU=function(t){t&&t.length>0&&(t[0].autoSelect=!0,t[0].default=!0)},h.prototype.nU=function(t,i){for(var n=0;n<t.length;n++)if(t[n].groupId===i.groupId)return void this.rU(t[n],i);i.index=t.length,t.push(i)},h.prototype.qP=function(t){return"video/mp4"===t.mimeType?r.VIDEO:"audio/mp4"===t.mimeType?r.AUDIO:"application/mp4"===t.mimeType&&"text"===t.contentType?r.SUBTITLES:r.VIDEO},h.prototype.rU=function(t,i){for(var n=t.segmentInfoList[t.segmentInfoList.length-1].sequenceNum+1,e=0;e<i.segmentInfoList.length;e++){var r=i.segmentInfoList[e];r.sequenceNum=n+e,t.segmentInfoList.push(r)}for(var s=0;s<i.drmInfo.length;s++)t.drmInfo.push(i.drmInfo[s]);i.bitrate>t.bitrate&&(t.bitrate=i.bitrate)},h.prototype.JP=function(t,i){for(var n=t.attributes,e=0;e<n.length;e++)i[n[e].nodeName]=n[e].nodeValue;return n.length},h.prototype._x=function(t){var i=this,n={adaptationSets:[]};i.JP(t,n);for(var e=0;e<t.childNodes.length;e++){var r=t.childNodes[e];if(1===r.nodeType)if("AssetIdentifier"===r.nodeName){var s={};i.JP(r,s),n.assetIdentifier=s}else if("AdaptationSet"===r.nodeName){var o=i.sU(r);null!==o&&n.adaptationSets.push(o)}}return n},h.prototype.sU=function(t){var i=this,n={representations:[],drm:[]};i.JP(t,n);for(var e=0;e<t.childNodes.length;e++){var r=t.childNodes[e];if(1===r.nodeType)if("Role"===r.nodeName){var s={};i.JP(r,s),n.role=s}else if(r.nodeName===o)n.baseURL=r.childNodes[0].nodeValue;else if("ContentProtection"===r.nodeName){var u=i.oU(r);null!==u&&n.drm.push(u)}else if("Representation"===r.nodeName){var h=i.uU(r);null!==h&&n.representations.push(h)}else r.nodeName}return n},h.prototype.oU=function(t){var i={};this.JP(t,i);for(var n=0;n<t.childNodes.length;n++){var e=t.childNodes[n];if(1===e.nodeType)if(-1!==e.nodeName.indexOf("pssh"))i.pssh=e.childNodes[0].nodeValue;else if("mspr:pro"===e.nodeName)i.pro=e.childNodes[0].nodeValue;else if("ms:laurl"===e.nodeName){var r={};this.JP(e,r),i.laurl=r}}return i},h.prototype.uU=function(t){var i=this,n={};i.JP(t,n);for(var e=0;e<t.childNodes.length;e++){var r=t.childNodes[e];if(1===r.nodeType)if("AudioChannelConfiguration"===r.nodeName){var s={};i.JP(r,s),n.audioChannnelConfiguration=s}else if(r.nodeName===o)n.baseURL=r.childNodes[0].nodeValue;else if("SegmentTemplate"===r.nodeName){var u=i.hU(r);n.segmentTemplate=u}else if("SegmentList"===r.nodeName){var h=i.cU(r);null!==h&&(n.segmentList=h)}}return n},h.prototype.hU=function(t){var i={};this.JP(t,i);for(var n=0;n<t.childNodes.length;n++){var e=t.childNodes[n];if(1===e.nodeType&&"SegmentTimeline"===e.nodeName){var r=this.fU(e);i.segmentTimeline=r}}return i},h.prototype.fU=function(t){var i={sElements:[]};this.JP(t,i);for(var n=0;n<t.childNodes.length;n++){var e=t.childNodes[n];if(1===e.nodeType&&"S"===e.nodeName){var r={};this.JP(e,r),i.sElements.push(r)}}return i},h.prototype.cU=function(t){var i={segments:[]};this.JP(t,i);for(var n=0;n<t.childNodes.length;n++){var e=t.childNodes[n];if(1===e.nodeType)if("Initialization"===e.nodeName){var r={};this.JP(e,r),i.initialization=r}else if("SegmentURL"===e.nodeName){var s=e.getAttribute("media");null!==s&&i.segments.push(s)}}return i},h.prototype.tU=function(t,i,n){return t.start?i+this.zP(t.start):n},h.prototype.iU=function(t,i,n,e,r,s,o,u){return t.duration?i+this.zP(t.duration):e&&e.start?n+this.zP(e.start):s?n+r+s:o+u},h.prototype.KP=function(t){var i=this,n=Date.now();return i.lU||(i.lU=n-t),n-i.lU}},9719:function(t,i,n){"use strict";t.exports=s;var e=n(7650).HLSEvent,r=n(902);function s(){var t=this;t._m=t.X_.appModel,t._node=t.X_.node,t.vU={currentStreamBitrate:0,frameDrop:0,frameRateSum:0,frameRateSampleCount:0,currentKbps:0,deliveryProtocol:t.dU(),bufferingCount:0,totalBufferingTime:0,streamingMode:t._m.streamingMode},t.FRAMERATE_SAMPLE_SIZE=4,t.pU={prevTotalFrames:0,prevTotalDroppedFrames:0,prevFrameRateMeasuredTime:0,frameRateSampleCollector:[],currentFrameRate:0},t.aT=new r(1e3),t.aT.addEventListener(t.mU,t)}s.prototype.destroy=function(){this.vU=null,this.aT.destroy()},s.prototype.onPlay=function(){this.aT.start()},s.prototype.onPlaying=function(){this.mU()},s.prototype.onPause=function(){this.aT.stop()},s.prototype.updateBufferingInfo=function(t){t&&(t.value||t.bufferInit||(this.vU.bufferingCount++,this.vU.totalBufferingTime+=t.waitTime))},s.prototype.mU=function(){var t=this,i=t._m.streams,n=t.vU,r=t._m.getCurrentPlayingStream(),s=t.getFpsStats();r&&(n.currentStreamIndex=t._m.currentPlayingStreamIndex,n.currentStreamBitrate=r.bitrate/1e3,n.mediaWidth=r.width,n.mediaHeight=r.height),i.length&&(n.qualityLevels=i.length,n.minBitRate=i[0].bitrate,n.maxBitRate=i[n.qualityLevels-1].bitrate),n.bufferLength=t._m.getBufferLength().toFixed(2),n.bufferLength<=5&&t._node.buffered.length,n.frameRate=s.frameRate.toFixed(2),n.droppedFrames=s.droppedFrames,n.currentKbps=(1e3*t._m.currentKbps).toFixed(0),n.streamingMode=t._m.streamingMode,n.drm=t._m.drmRequired,n.drmsys=t._m.licenseType,t._m.infoUpdateSent=!0,t.X_.sendEvent(e.INFO_UPDATE,{mediaInfo:t.vU})},s.prototype.getWindow=function(){return window},s.prototype.dU=function(){var t=this.getWindow();return t&&t.location&&t.location.protocol?t.location.protocol.slice(0,-1):"http"},s.prototype.getFpsStats=function(){var t,i,n=this,e=n._node,r=0,s=n.pU,o=e.currentTime-s.prevFrameRateMeasuredTime,u=n.bU(),h=0;return(u.isWebKitFpsAvailable||u.isNonWebKitFpsAvailable)&&(t=u.isWebKitFpsAvailable?e:e.getVideoPlaybackQuality(),i=u.isWebKitFpsAvailable?t.webkitDecodedFrameCount:t.totalVideoFrames,h=u.isWebKitFpsAvailable?t.webkitDroppedFrameCount:t.droppedVideoFrames,(r=s.prevFrameRateMeasuredTime>0&&0!==o?(i-s.prevTotalFrames-(h-s.prevTotalDroppedFrames))/o:s.currentFrameRate)&&s.frameRateSampleCollector.push(r),n.gU(),s.prevTotalFrames=i,s.prevTotalDroppedFrames=h,s.prevFrameRateMeasuredTime=e.currentTime),{frameRate:s.currentFrameRate,droppedFrames:h}},s.prototype.bU=function(){var t=this._node;return{isWebKitFpsAvailable:void 0!==t.webkitDecodedFrameCount,isNonWebKitFpsAvailable:"function"==typeof t.getVideoPlaybackQuality}},s.prototype.gU=function(){var t=this,i=t.pU.frameRateSampleCollector;if(i.length>=t.FRAMERATE_SAMPLE_SIZE){var n=i.reduce((function(t,i){return t+i}));t.pU.currentFrameRate=n/i.length,i.splice(0,i.length)}}},2175:function(t,i,n){"use strict";t.exports=u;var e=n(574).StreamingMode,r=n(574).MetadataTypes,s=n(7580),o=n(1788);function u(){this.ERRORS={INVALID_M3U8:1,EMPTY_DATA:2,NO_SEGMENTS:3},this.mpdParser=new s}u.prototype.destroy=function(){this.mpdParser.destroy()},u.prototype.parse=function(t){if(!t)return null;return t.type===r.STRUCTURED?(new o).parseStructuredMetadata(t):this.mP(t)},u.prototype.mP=function(t){var i=this,n={},r=t.rawData;return""!==r&&r?-1!==r.indexOf("<MPD")?(t.streamingMode=e.DASH,i.mpdParser.parse(t)):-1!==r.indexOf("#EXTM3U")?(t.streamingMode=e.HLS,(new o).parse(t)):(n.error=i.ERRORS.INVALID_M3U8,n):(n.error=i.ERRORS.EMPTY_DATA,n)}},5409:function(t,i,n){"use strict";t.exports=r;var e=n(7650).HLSEvent;function r(){var t=this;t._m=t.__controller.model,t.yU=!1,t.qO=!1,t.wU=[],t._U=[],t.EU=null,t.OU=null,t._h={},t.AU=NaN,t.SU(),t.TU=0,t.IU=0,t.jU=0,t.MU=!0,t.currentDateranges=[]}function s(){var t=this;t.programDateTime=NaN,t.seqNum=-1,t.beginTime=NaN,t.endTime=NaN,t.bitrateIndex=-1,t.switchReason="none",t.bufferCount=0,t.bufferTime=0,t.timeToFirstByte=0,t.timeToDownload=0,t.timeToRequest=0,t.observedBitrate=0,t.actualBitrate=0,t.frameDrop=0,t.frameRateSum=0,t.frameRateSampleCount=0,t.frameRate=30}r.prototype.destroy=function(){var t=this;t.wU=[],t._U=[],t.OU=null,t.EU=null,t.NU()},r.prototype.SU=function(){var t=this;t._h[e.WAITING]=t.__controller.addEventListener(e.WAITING,t.kU,t)},r.prototype.NU=function(){this.__controller.removeEventListeners(this._h)},r.prototype.onComplete=function(){this.segmentRenderNext()},r.prototype.onTimeUpdate=function(t){var i=this,n=i._m.getCurrentPlayingStream();if(i.TU=t,i.updateRenderState(i.OU,i.TU),i._m.live&&n&&n.cuepoints.length>0&&i.cuepointEventDispatcher(i.TU,n.cuepoints),n&&i.RU(n,i.TU),t>0&&i.OU){var r=i.LU();r&&i.__controller.sendEvent(e.TIMED_METADATA_READY,r.payload)}},r.prototype.RU=function(t,i){var n=this,e=Object.values(t.dateRanges);n.OU&&e.length&&n.DU(n.OU,e,i)},r.prototype.DU=function(t,i,n){for(var r=this,s=t.programDateTime+1e3*(n-t.beginTime),o=0;o<i.length;o++){var u=i[o],h=null;!u.endDate&&u.duration?h=u.startDate+1e3*u.duration:u.endDate&&(h=u.endDate);var a=r.currentDateranges.indexOf(u.id),c=a>-1;!c&&u.startDate&&s>=u.startDate&&(!h||s<h)?(r.__controller.sendEvent(e.DATE_RANGE_STARTED,u),r.currentDateranges.push(u.id)):c&&h&&s>h&&(r.__controller.sendEvent(e.DATE_RANGE_ENDED,u),r.currentDateranges.splice(a,1))}},r.prototype.LU=function(){var t=this,i=t.OU.seqNum,n=t._m.timedMetadataStore[i],e=t.TU;if(!n||!n.length)return null;t._m.live&&Object.keys(t._m.timedMetadataStore).forEach((function(n){n>i||t._m.timedMetadataStore[n].every((function(i){return e-i.timestamp>=t._m.config.pastBufferLengthLimit.live}))&&delete t._m.timedMetadataStore[n]}));if(e<n[0].timestamp||e>n[n.length-1].timestamp+.6)return null;for(var r=null,s=n.length-1;s>=0;s--){var o=n[s],u=(1e4*e-1e4*o.timestamp)/1e4;if(u>=0&&u<=.6){if(o.recent)continue;r=o;break}}return r&&(r.recent=!0,setTimeout((function(){delete r.recent}),600)),r},r.prototype.kU=function(t){t&&(t.bufferInit||(t.value?this.CU():this.PU(t.waitTime)))},r.prototype.segmentLoadBegin=function(t,i){if(i){var n=this,r=new s;if(r.seqNum=t,r.beginTime=i.beginTime,r.timeToFirstByte=i.timeToFirstByte,r.bitrateIndex=Math.max(0,i.bitrateIndex),r.switchReason=i.switchReason,r.frameRate=i.frameRate,r.observedBitrate=1e3*i.observedBitrate,r.endTime=i.endTime,r.perfInfo={},r.actualBitrate=i.endTime!==i.beginTime?.008*i.bytesTotal/(i.endTime-i.beginTime):0,r.programDateTime=i.programDateTime,n.EU&&n.wU.push(n.EU),n.EU=r,n.OU&&t===n.OU.seqNum||!n.OU){if(n.OU&&r.bitrateIndex!==n.OU.bitrateIndex){var o=n._m.streams,u={bitrate:Math.round(o[r.bitrateIndex].bitrate/1e3),reason:"fast-up",oldFrameRate:n.OU.frameRate,newFrameRate:r.frameRate};n.__controller.sendEvent(e.STREAM_SWITCHED,u)}n.segmentRenderNext(r)}}},r.prototype.segmentLoadEnd=function(t,i){var n=this,e=n.EU;e&&e.seqNum===t&&(i&&(e.timeToDownload=i.timeToDownload,e.perfInfo=i.perfInfo,e.segmentInWorker=i.segmentInWorker,e.actualBitrate=e.endTime!==e.beginTime?.008*i.bytesTotal/(e.endTime-e.beginTime):0),n.wU.push(e),n.EU=null)},r.prototype.segmentRenderNext=function(t){var i=this;i.OU&&(i._U.push(i.OU),i.OU=null,i.__controller.sendEvent(e.SEGMENT_RENDERED)),t&&(i.OU=t,i._m.setCurrentPlayingStream(t.bitrateIndex))},r.prototype.updateRenderState=function(t,i){var n=this;if(!(isNaN(i)||i<=0)&&(t||(t=n.xU(i))&&n.segmentRenderNext(t),t&&(n.UU&&(t.frameDrop=n.UU.frameDrop,t.frameRateSum+=Number(n.UU.frameRate.toFixed(2)),t.frameRateSampleCount++),!(i>=t.beginTime&&i<t.endTime)))){var r=n.xU(i);if(r&&(n.segmentRenderNext(r),r.bitrateIndex!==t.bitrateIndex)){var s=n._m.streams,o={bitrate:Math.round(s[r.bitrateIndex].bitrate/1e3),reason:r.switchReason,oldFrameRate:t.frameRate,newFrameRate:r.frameRate};n.__controller.sendEvent(e.STREAM_SWITCHED,o)}}},r.prototype.updateFrameStats=function(t){t&&(this.UU=t)},r.prototype.xU=function(t){var i=this;if(i.EU&&t>=i.EU.beginTime&&t<i.EU.endTime)return i.EU;if(i.wU.length)for(var n=i.wU.length-1;n>=0;n--)if(t>=i.wU[n].beginTime&&t<i.wU[n].endTime)return i.wU[n];return null},r.prototype.CU=function(){var t=this;t.qO||(t.qO=!0,t.OU,t.EU)},r.prototype.PU=function(t){var i=this;if(i.qO){i.VU=NaN,i.qO=!1;var n=i.OU,e=n&&!isNaN(t)&&t>0;n&&(n.bufferTime+=e?t:0,n.bufferCount+=e?1:0)}},r.prototype.getMetrics=function(){var t=this,i=t.OU,n=[];if(t._U.length){for(var e=0;e<t._U.length;e++)n.push(t.KS(t._U[e]));t._U=[]}return i&&(n.push(t.KS(i)),i.bufferCount=0,i.bufferTime=0,i.timeToFirstByte=NaN,i.timeToDownload&&(i.timeToDownload=NaN)),n},r.prototype.KS=function(t){if(!t)return null;var i=this._m.streams;t.bitrateIndex=i.length>0?Math.min(t.bitrateIndex,i.length-1):0;var n=i[t.bitrateIndex].bitrate/1e3,e=i[t.bitrateIndex].avgBitrate/1e3;return t.bufferTime>0&&!t.bufferCount?t.bufferCount=1:!t.bufferTime&&t.bufferCount>0&&(t.bufferCount=0),{seq_num:t.seqNum,max_b:n,avg_b:e,ib:n,ob:t.observedBitrate.toFixed(2),ab:Math.round(t.actualBitrate),num_buf:t.bufferCount,buf_dur:t.bufferTime,req_t:t.timeToRequest,fb_dl_t:t.timeToFirstByte,req_dl_t:t.timeToDownload,drop_f:t.frameDrop,avg_fr:(t.frameRateSum/t.frameRateSampleCount).toFixed(2)}},r.prototype.getMetricsBandwidthInfo=function(){var t=this,i=t.__controller.services.bandwidthEstimator,n=i.averageBandwidth===t.AU?0:i.averageBandwidth;return t.AU!==i.averageBandwidth&&(t.AU=i.averageBandwidth),n},r.prototype.cuepointEventDispatcher=function(t,i){var n,r=this,s=i.length,o=s-1;if(s>0){if(r.shouldFireCueDetectedEvent(t,i[o]))return i[o].setCueOutDetectedState(!0),n={cuepointDuration:i[o].cuepointDuration,timeGapBeforeCUEOUT:i[o].startTime-t},void r.__controller.sendEvent(e.CUEPOINT_DETECTED,n);if(r.shouldFireCueOutEvent(t,i[o]))return i[o].setCueOutFiredState(!0),n={cuepointDuration:i[o].cuepointDuration,cuepointPlayedTime:t-i[o].startTime},void r.__controller.sendEvent(e.CUEPOINT_STARTED,n)}},r.prototype.shouldFireCueDetectedEvent=function(t,i){return!!i.startTime&&(!i.isCueOutDetectedFired&&i.startTime>t)},r.prototype.shouldFireCueOutEvent=function(t,i){if(!i.startTime)return!1;var n=this.FU(t);return!i.isCueOutFired&&n===i.startSeqNum&&t>i.startTime},r.prototype.FU=function(t){var i=this._m.getCurrentPlayingStream(),n=i?i.segments:null;if(n){if(1===n.length)return n[0].seqNum;for(var e=n.length-1;e>=0;e--)if(t>=n[e].startTime)return n[e].seqNum}return null}},5212:function(t,i,n){"use strict";t.exports=a;var e=n(2175),r=n(2835),s=n(3799),o=n(5409),u=n(4939),h=n(2990);function a(){var t=this;t._m=t.__controller.model,t.BU={},t.bandwidthEstimator=new s(t._m.bwHistory),t.segmentMetrics=t.__controller.create(o),t.metadataParser=t.__controller.create(e),t.mp4BoxParser=new r}a.prototype.destroy=function(){var t=this;t.bandwidthEstimator.destroy(),t.segmentMetrics.destroy(),t.metadataParser.destroy(),t.BU&&Object.keys(t.BU).forEach((function(i){t.BU[i].terminate()}))},a.prototype.getNewLoader=function(t,i){var n=this._m,e=n.config,r=n.userAgent,s=n.inWorkerScope;(t=t||{}).maxRetries=t.maxRetries||e.maxRetries,t.requestTimeout=t.requestTimeout||e.requestTimeout,t.chunkedRequestTimeout=t.chunkedRequestTimeout||e.chunkedRequestTimeout,t.useMSStream=!!r&&(r.ie||r.edge),t.stopStreamLoadOnError=t.stopStreamLoadOnError||e.stopStreamLoadOnError,t.withCredentials=h.isWithCreds(i||t.url)||!1;var o=null;try{o=u.getLoader(new u.LoadRequest(t),t.window,s)}catch(t){o=null}return o},a.prototype.getWorker=function(){return null}},7279:function(t,i,n){"use strict";t.exports.AACStream=u,t.exports.AVCStream=h;var e=n(1849),r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],s=["Null","Main","LC","SSR","LTP"],o=t.exports.NAL_UNIT_TYPES={NON_IDR:1,IDR:5,AD_INFO_SEI:6,SPS:7,PPS:8,AUD:9};function u(t){var i=this;i.zU=[],i.GU=t||{},i.yR={},i.ready=!1,i.HU=0}function h(t){var i=this;i.zU=[],i.GU=t||{},i.yR={},i.YU=0,i.ready=!1,i.qU=0,i.HU=2970,i.HR=new e}u.prototype.destroy=function(){this.zU=[]},u.prototype.readFrames=function(t){t&&t.packetInfo&&this.readFramesFromBitstream(t.packetInfo.streamData,t.packetInfo.pts)},u.prototype.readFramesFromBitstream=function(t,i){var n=this;if(!t||t.length<6)return 0;for(var e=0,r=0,s=0;e<t.length;){var o=0,u=(t[e++]<<8)+t[e++],h=1&u;if(65520==(65520&u)&&0===(6&u)){n.WU(t.subarray(e,e+2)),n.yR.codec="mp4a.40.2",e++;var a=(t[e++]<<16)+(t[e++]<<8)+t[e++];for(a=(262112&a)>>>5,r=1+(3&t[e++]),h?a-=7:(a-=9,e+=2);o<r&&e<t.length;){var c=i+s*n.HU;n.zU.push({data:t.subarray(e,e+a),dts:c,pts:c,keyframe:!1,flags:{isLeading:!1,dependsOn:!0,isDependedOn:!1,hasRedundancy:!1,paddingValue:!1,isNonSyncSample:!1,degradationPriority:1}}),e+=a,o++,s++}}else e--}return n.ready=n.QU(),e},u.prototype.WU=function(t){var i=this;if(t&&!(t.length<2)){var n=1+((192&t[0])>>>6);n=n>4?4:n,i.yR.audioObjectTypeIndex=n,i.yR.audioObjectType=s[n],n=(n=(60&t[0])>>>2)<13?n:0,i.yR.samplingFreqIndex=n,i.yR.samplingFreq=r[n],i.yR.channels=(1&t[0])<<2|(192&t[1])>>>6,i.yR.sampleSize=16,i.HU=9216e4/i.yR.samplingFreq}},u.prototype.QU=function(){var t=this,i=t.zU.length;return(i>0?t.zU[i-1].pts-t.zU[0].pts+t.HU:0)>=9e3},u.prototype.getFrames=function(){var t=this;return t.ready=!1,t.zU.splice(0,t.zU.length)},u.prototype.getConfig=function(){return this.yR},u.prototype.getLastFrameDetails=function(){var t=this;return t.zU.length?{timestamp:t.zU[t.zU.length-1].dts,duration:t.HU}:null},h.prototype.destroy=function(){this.zU=[],this.HR.destroy()},h.prototype.readFrames=function(t){var i=this;if(t&&t.packetInfo){var n=t.packetInfo.streamData;if(n&&!(n.length<4)){for(var e,r,s=0,u=0,h=0,a=s,c={nalUnits:[],nalUnitSize:0,dts:t.packetInfo.dts,pts:t.packetInfo.pts,keyframe:!1,data:n,cea608Data:[],flags:{isLeading:0,dependsOn:0,isDependedOn:0,hasRedundancy:0,paddingValue:0,isNonSyncSample:!1,degradationPriority:0}},f=4294967295,l=!1;s<n.length;){if(r=NaN,1===(f=f<<8|n[s++])&&(r=4),1===(16777215&f)){if(!l&&s>r&&i.zU&&i.zU.length){var v=i.zU[i.zU.length-1],d=v.nalUnits,p=d[d.length-1];if(p){var m,b=s-r;v.nalUnitSize+=b,p.data?((m=new Uint8Array(p.data.byteLength+b)).set(p.data,0),m.set(n.subarray(0,b),p.data.byteLength)):(m=new Uint8Array(b)).set(n.subarray(0,b),0),p.data=m,(m=new Uint8Array(v.data.byteLength+b)).set(v.data,0),m.set(n.subarray(0,b),v.data.byteLength),v.data=m}}if(l=!0,f=4294967295,r=r||3,(u=c.nalUnits.length)>=1&&null===c.nalUnits[u-1].data)switch(h=s-a-r,e=n.subarray(a,a+h),c.nalUnitSize+=h,c.nalUnits[u-1].data=e,c.nalUnits[u-1].type){case o.SPS:i.yR.profileIndication=e[1],i.yR.profileCompatibility=e[2],i.yR.levelIndication=e[3],i.yR.numOfSPS=1,i.yR.spsLength=e.length,i.yR.sps=e;break;case o.PPS:i.yR.numOfPPS=1,i.yR.ppsLength=e.length,i.yR.pps=e}a=s,h=0;var g=31&n[s++];if(g<o.AUD&&c.nalUnits.push({data:null,type:g}),g===o.IDR)i.YU=i.zU.length,c.keyframe=!0,c.flags.dependsOn=2,i.qU++;else if(g===o.NON_IDR)c.keyframe=!1,c.flags.dependsOn=1,c.flags.isNonSyncSample=!0;else if(g===o.AD_INFO_SEI)for(var y=i.HR.parse(n,s),w=0;w<y.length;w++)c.cea608Data.push(y[w])}}(u=c.nalUnits.length)>=1&&null===c.nalUnits[u-1].data&&a<n.length&&(h=s-a,c.nalUnits[u-1].data=n.subarray(a,a+h),c.nalUnitSize+=h),i.yR.codec=i.ZU(i.yR),c.nalUnitSize>0&&i.zU.push(c),i.ready=i.QU()}}},h.prototype.QU=function(){var t=this,i=t.zU.length,n=i>0?t.zU[i-1].pts-t.zU[0].pts+t.HU:0;return t.GU.startChunkWithKeyFrame?t.qU>=2:i>1&&n>=9e3},h.prototype.getFrames=function(t){var i=this,n=i.GU.startChunkWithKeyFrame&&t&&t.keyFrameBoundary,e=t.keyFrameBoundary?i.zU.length-1:i.zU.length;n&&(e=i.YU,i.qU=1,i.ready=!1);var r=i.zU.splice(0,e);return i.YU=0,r},h.prototype.getConfig=function(){return this.yR},h.prototype.ZU=function(t){var i=t&&t.profileIndication||66;return"avc1."+((i=Math.max(i,66))<<16|(t&&t.profileCompatibility||0)<<8|(t&&t.levelIndication||10)).toString(16)}},2887:function(t,i,n){"use strict";t.exports=h;var e=n(7279),r=n(3661),s=n(6473),o=e.AACStream,u=e.AVCStream;function h(t,i,n){var e=this;e.streamType=t,e.streamId=i,e.XU=[],e.ER=!1,e.GU=n,e.$U=null,e.JU=new s,"audio"===t?e.s_=new o(e.GU):"video"===t&&(e.s_=new u(e.GU))}function a(t){this._=new r(Uint8Array,t),this.complete=!1}h.prototype.destroy=function(){var t=this;t.XU=[],t.s_&&(t.s_.destroy(),t.s_=null)},h.prototype.isReady=function(){var t=this,i=!!t.s_&&t.s_.ready;return t.ER||i},h.prototype.addPacket=function(t){var i=this;i.XU.length&&i.KU(),i.XU.push(new a(t))},h.prototype.append=function(t){var i=this.XU.length;t&&i&&this.XU[i-1].append(t)},h.prototype.endOfSegment=function(){this.ER=!0,this.KU()},h.prototype.getFrames=function(t){return this.s_?this.s_.getFrames(t):null},h.prototype.getTimedMetadata=function(){return this.$U?this.$U:null},h.prototype.getConfig=function(){return this.s_?this.s_.getConfig():null},h.prototype.KU=function(){var t=this,i=t.XU.length;if(i){var n=t.XU[i-1];n.complete=!0,0===n.parse()&&("id3"===t.streamType?t.$U={payload:t.JU.getID3Payload(n.packetInfo.streamData),pts:t.XU.length&&t.XU[0].packetInfo.pts}:t.s_&&t.s_.readFrames(n),t.XU.pop())}},a.prototype.append=function(t){this._&&this._.set(t)},a.prototype.parse=function(){var t=this;if(t.packetInfo={},!t.complete||!t._||!t._.length)return t.packetInfo.result=-1,-1;if(t._.length<6)return t.packetInfo.result=-2,-2;var i=0;if(1!==(t._.get(i++)<<16)+(t._.get(i++)<<8)+t._.get(i++))return t.packetInfo.result=-3,-3;t.packetInfo.streamId=t._.get(i++),i+=2,i++;var n=(192&t._.get(i++))>>6,e=t._.get(i++);return 2!==n&&3!==n||(t.packetInfo.pts=t.tV(t._.subArray(i,i+5)),t.packetInfo.dts=t.packetInfo.pts,i+=5,e-=5,3===n&&(t.packetInfo.dts=t.tV(t._.subArray(i,i+5)),i+=5,e-=5)),i+=e,t.packetInfo.streamData=t._.subArray(i),t.packetInfo.result=0,0},a.prototype.tV=function(t){if(!t||!t.length)return 0;var i=0,n=(14&t[i++])>>>1,e=(t[i++]<<8)+(254&t[i++])>>>1,r=(4&n)>>2,s=2*((n&=3)<<29)+(e<<=15)+((t[i++]<<8)+t[i++]>>>1);return r?-1*Math.pow(2,32)+s:s}},1849:function(t){"use strict";function i(){}t.exports=i,i.prototype.destroy=function(){},i.prototype.parse=function(t,i){for(var n=[],e=0;255===t[i];)e+=255,i++;if(e+=t[i],!(++i>=t.length)){for(var r=0;255===t[i];)r+=255,i++;if(r+=t[i],i++,4===e){var s=t[i],o=t[i+1]<<8|t[i+2],u=t[i+3]<<24|t[i+4]<<16|t[i+5]<<8|t[i+6],h=t[i+7];if(181===s&&49===o&&1195456820===u&&3===h){var a=31&t[i+8];i+=9;var c,f,l=0;for(i++;l<a;){if(c=(4&t[i])>>2,f=3&t[i],c&&(0===f||1===f)){var v={fieldType:f,data1:t[i+1],data2:t[i+2]};n.push(v)}i+=3,l++}}}return i+=r,n}}},8457:function(t,i,n){"use strict";t.exports=o;var e=n(2887),r=n(7572),s=188;function o(t,i){var n=this;n._=null,n.GU=t||{},n.iV=i,n.nV=0,n.eV=NaN,n.rV={},n.sV={},n.oV=[],n.VO="initial",n.wR="start",n.ER=!1}o.prototype.destroy=function(){var t=this;t._=null,t.oV=[],t.VO="initial",t.wR="start";var i=t.sV;for(var n in i)i.hasOwnProperty(n)&&i[n].destroy();t.sV={}},o.prototype.append=function(t){var i=this;if(t){var n=t.length;if(n){var e=null,s=0;i._&&(s=(e=i._).length);var o=s+n;return i._=new Uint8Array(o),e&&i._.set(e),i._.set(t,s),-2===i.Z_()?{error:r.ERR_SEGMENT_PARSE}:void 0}}},o.prototype.endOfSegment=function(){var t=this;t.ER=!0,t._&&t._.length<s&&t.uV()},o.prototype.Z_=function(){var t=this;if(!t._)return-1;for(var i=0;t._.length;){var n=t.KU(t._.subarray(0,s));if(0===n)i++,t._=t._.subarray(s),i>=500&&(t.hV(),i=0);else{if(-2!==n)break;var e=t.aV(t._);if(!(e>=0))break;t._=t._.subarray(e)}}return t.ER&&0===t._.length?t.uV():t.hV(),0},o.prototype.KU=function(t){var i=this;if(!t||t.length<1)return-1;var n=0,e={};if(71!==t[n++])return-2;if(!t||t.length<s)return-1;var r=t[n++];(e.startIndicator=(64&r)>>6,e.pid=((31&r)<<8)+t[n++],r=t[n++],e.adaptationFieldExists=(32&r)>>5,e.payloadExists=(16&r)>>4,e.adaptationFieldLength=0,e.adaptationFieldExists)&&(e.adaptationFieldLength=t[n++],16&t[n++]&&e.pid===i.nV&&e.adaptationFieldLength>=7&&i.cV(t.subarray(n,n+6)),n+=e.adaptationFieldLength-1);return!e.payloadExists||e.adaptationFieldLength>=183||i.fV(t.subarray(n),e),0},o.prototype.cV=function(t){if(t&&!(t.length<6)){var i=0,n=t[i++],e=(128&n)>>>7;n=((n&=127)<<24)+(t[i++]<<16)+(t[i++]<<8)+t[i++];var r=t[i++];i++;var s=2*n+((128&r)>>>7),o=e?-1*Math.pow(2,32)+s:s;this.lV||(this.lV=o)}},o.prototype.fV=function(t,i){var n,e,r,s=this;if(t&&i&&!isNaN(i.pid)&&(s.rV.aac&&(n=s.rV.aac),s.rV.avc&&(e=s.rV.avc),s.rV.id3&&(r=s.rV.id3),!(i.pid>=1&&i.pid<=15||8191===i.pid)))switch(i.pid){case 0:s.vV(t,i);break;case s.eV:s.dV(t,i);break;case n:s.pV("audio",n,t,i);break;case e:s.pV("video",e,t,i);break;case r:s.pV("id3",r,t,i),s.mV();break;default:s.bV(t,i)}},o.prototype.vV=function(t,i){if(t){var n=0;if(i.startIndicator){var e=t[n++];n+=e}t[n++];n+=4,n+=3,(t[n++]<<8)+t[n++]>0&&(this.eV=((31&t[n++])<<8)+t[n++]),this.VO="patParsed"}},o.prototype.dV=function(t,i){var n=this;if(t){var e=0;if(i&&i.startIndicator){var r=t[e++];e+=r}t[e++];var s=((15&t[e++])<<8)+t[e++],o=e;e+=2,e+=3,n.nV=((31&t[e++])<<8)+t[e++];var u=((15&t[e++])<<8)+t[e++];e+=u;for(var h=null,a=null,c=0;e-o<s-4;)switch(h=t[e++],a=((31&t[e++])<<8)+t[e++],c=((15&t[e++])<<8)+t[e++],e+=c,h){case 3:case 4:n.rV.mp3=a;break;case 15:n.rV.aac=a;break;case 27:n.rV.avc=a;break;case 21:n.rV.id3=a}n.VO="pmtParsed"}},o.prototype.pV=function(t,i,n,r){if(n){var s=this.sV,o=s[i];r.startIndicator?(o||(s[i]=new e(t,i,this.GU),o=s[i]),o.addPacket(n)):o&&o.append(n)}},o.prototype.bV=function(t,i){var n=this;if(t&&!(t.length<4)&&i.startIndicator){var e=0,r=(t[0]<<16)+(t[1]<<8)+t[2],s=t[e++];e+=s;var o=t.length>e?t[e]:NaN;if(1===r){var u=t[3]>>>4;14===u?(n.rV.avc=i.pid,n.pV("video",n.rV.avc,t,i)):12!==u&&13!==u||(n.rV.aac=i.pid,n.pV("audio",n.rV.aac,t,i))}else 2===o&&n.dV(t,i)}},o.prototype.gV=function(){var t=this,i=!0;for(var n in t.rV)if("id3"!==n&&t.rV.hasOwnProperty(n)){var e=t.rV[n];t.sV[e]&&(i=i&&t.sV[e].isReady())}return i},o.prototype.hV=function(){var t=this;if(t.gV()){var i={},n=!1,e=!1,r=t.sV,s=Number.POSITIVE_INFINITY;for(var o in r)if(r.hasOwnProperty(o)){var u=r[o];if(u){var h={frames:u.getFrames({keyFrameBoundary:"end"!==t.wR}),config:u.getConfig(),streamId:u.streamId};"audio"===u.streamType&&o===t.rV.aac.toString()?(i.audio=h,n=i.audio.frames&&i.audio.frames.length):"video"===u.streamType&&o===t.rV.avc.toString()&&(i.video=h,e=i.video.frames&&i.video.frames.length)}}n&&(s=Math.min(s,i.audio.frames[0].dts)),e&&(s=Math.min(s,i.video.frames[0].dts)),s!==Number.POSITIVE_INFINITY&&(i.pcr=s),("end"===t.wR||n||e)&&(t.iV&&t.iV({pos:t.wR,avData:i}),"start"===t.wR&&(t.wR="middle"))}},o.prototype.mV=function(){var t=this,i=t.sV,n=null;Object.keys(i).forEach((function(e){var r=i[e];r&&"id3"===r.streamType&&e===t.rV.id3.toString()&&(n=r.getTimedMetadata())})),n&&t.iV&&t.iV({pos:"timedMetadata",timedMetadata:n})},o.prototype.aV=function(t){if(!t)return-1;for(var i=0;i<t.length;i++)if(71===t[i])return i;return-1},o.prototype.uV=function(){var t=this;t.wR="end";var i=t.sV;for(var n in i)i.hasOwnProperty(n)&&(i[n].endOfSegment(),"id3"===i[n].streamType&&t.mV());t.hV()}},3789:function(t){"use strict";function i(t){var i=this;t&&(i.type=t.type,i.id=t.id,i.moduleName=t.moduleName,i.instanceId=t.instanceId,i.funcName=t.funcName,i.timestamp=t.timestamp||Date.now(),i.args=t.args||[],i.argNames=t.argNames||[],i.transferables=t.transferables)}t.exports=i,i.prototype.putParam=function(t,i){i&&(this.args.push(i),this.argNames.push(t||""))},i.prototype.getParam=function(t){if(!t)return null;var i=this.argNames.indexOf(t);return i>=0?this.args[i]:null},i.prototype.dto=function(){var t=this,i={};return Object.keys(t).forEach((function(n){"__controller"!==n&&(i[n]=t[n])})),i},i.prototype.addMedia=function(){var t,i=this;return i.__controller&&(t=i.__controller.model.getMediaDto(),i.putParam("media",t)),t}},5557:function(t,i,n){"use strict";t.exports.WorkerDefs={HlsTransformer:n(4892),Controller:n(6769)},t.exports.MessageTypes={EVENT:"event",MESSAGE:"message"},t.exports.MessageIds={CREATE:"create",DESTROY:"destroy",CALL_METHOD:"callMethod",EVENT:"eventPublish",CREATE_SRC_BUFFER:"createSrcBuffer",APPEND_SRC_BUFFER:"appendSrcBuffer",TIMED_METADATA:"timedMetadata",CLEAR_SRC_BUFFER:"clearSrcBuffer",END_OF_STREAM:"endOfStream",SAVE_AVG_BANDWIDTH:"saveAvgBandwidth",PLAY_AFTER_STREAM_CHANGE:"playAfterStreamChange",PAUSE_BEFORE_STREAM_CHANGE:"pauseBeforeStreamChange",DRM_INIT:"drmInit",DRM_LICENSE_INFO:"drmLicenseInfo",SKIP_GAP:"skipGap"}},5109:function(t,i,n){"use strict";var e=this&&this.__spreadArrays||function(){for(var t=0,i=0,n=arguments.length;i<n;i++)t+=arguments[i].length;var e=Array(t),r=0;for(i=0;i<n;i++)for(var s=arguments[i],o=0,u=s.length;o<u;o++,r++)e[r]=s[o];return e};Object.defineProperty(i,"__esModule",{value:!0});var r=n(7403),s=n(2542),o=n(3755),u=n(6342),h=n(514),a=n(1279),c=n(1954),f=n(2974);function l(t){return u.default.classList(t)}var v=function(){function t(){this.version="0.3.10",this.mimetype=t.mimetype,this.type=a.PluginType.AD,this.yV=!1,this.wV=new r.default("DefaultAdPlugin"),this.EV={}}return t.prototype.prepare=function(){},t.prototype.destroy=function(){this.OV=null,this.AV=null,this.SV=null,this.TV=null,this.IV&&this.IV.destroy(),this.EV=null,this.yV=!1,this.wV.destroy()},t.prototype.canRenderUI=function(t){return!0},t.prototype.renderUI=function(t,i){var n=i.position,e=void 0===n?0:n,r=i.adBreakItems,s=this.jV();if(this.yV=!0,t.interactionConfig&&t.interactionConfig.clickUrl?(this.OV=t.interactionConfig.clickUrl,l(this.AV).remove("vp-hidden")):(this.OV=null,l(this.AV).add("vp-hidden")),l(this.SV.parentElement).add("vp-hidden"),t.type===o.AdBreakItemType.BUMPER)return this.MV=t.duration,s;var h=this.NV(r,e),a=h.position,f=h.totalAds,v=h.duration;if(this.MV=v,this.kV=u.default.strSubstitute(1===f?c.default.ADV_SHORT:c.default.ADV_MULT_SHORT,{position:a+1,total:f}),this.RV=u.default.strSubstitute(1===f?c.default.ADV_LONG:c.default.ADV_MULT_LONG,{position:a+1,total:f}),0===a){var d=this.kV.split("{")[0];this.SV.innerText=d}return s},t.prototype.unrenderUI=function(){this.yV=!1,this.LV()},t.prototype.onPlayerEvent=function(t){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];if(t===a.PluginPlayerEvent.AD_PLAYBACK_STARTED&&this.yV){var e=i[0];e.type!==o.AdBreakItemType.BUMPER&&l(this.SV.parentElement).remove("vp-hidden")}if(t===a.PluginPlayerEvent.AD_PLAYBACK_PROGRESS&&this.yV){var r=i[0];this.DV(r)}},t.prototype.addEventListener=function(t,i){var n=this.wV.addEventListener(t,i,null);this.EV[t]=this.EV[t]||[],this.EV[t].push([i,n])},t.prototype.removeEventListener=function(t,i){this.EV[t]=this.EV[t]||[];for(var n=0,e=this.EV[t];n<e.length;n++){var r=e[n],s=r[0],o=r[1];if(s===i)return void this.wV.removeEventListener(t,o)}},t.prototype.LV=function(){this.OV=null,this.SV&&(this.SV.innerText="")},t.prototype.DV=function(t){if(this.SV){var i=t.currentTime,n=t.duration;if(n){var e=Math.round(n-i);this.SV.innerText=u.default.strSubstitute(this.kV,{remaining:e})}}},t.prototype.NV=function(t,i){if(i<0||i>t.length-1)return{position:0,totalAds:0,duration:0};if(t[i].type===o.AdBreakItemType.BUMPER)return{position:0,totalAds:1,duration:t[i].duration};for(var n=-1,e=i-1;e>=0;e--){if((h=t[e]).type===o.AdBreakItemType.BUMPER){n=e;break}}var r=n+1,s=0,u=0;for(e=r;e<t.length;e++){var h;if((h=t[e]).type===o.AdBreakItemType.BUMPER)break;s++,u+=h.duration}return{position:i-r,totalAds:s,duration:u}},t.prototype.CV=function(t){for(var i,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(i=this.wV).publish.apply(i,e([t],n))},t.prototype.jV=function(){var t=this;return this.TV?(this.LV(),this.TV):(this.TV=u.default.render(f,c.default),this.SV=this.TV.querySelector(".vp-adbreak-progress span"),this.AV=this.TV.querySelector(".vp-adbreakitem-cta"),this.IV=new h.default(this.AV,(function(i){t.OV&&(window.open(t.OV,"_blank"),t.CV(s.AdPluginUIEvent.CTA_TRIGGERED))})),this.LV(),this.TV)},t.mimetype="adplugin/default-ad-view",t}();i.default=v},3840:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(3072),r=n(954),s=n(6342),o=n(742),u="",h="";if("0.3.10".indexOf("local")>-1)h="https://assets.video.yahoo.net/builds/0.2.174/nielsen-iframe.html";else{h=(u="https://assets.video.yahoo.net")+"/builds/0.3.10/nielsen-iframe.html"}var a,c,f,l="vp-nielsen-iframe";i.NIELSEN_IAB_VENDOR_ID=373,function(t){t.linear="1",t.dynamic="2"}(a=i.NielsenAdType||(i.NielsenAdType={})),function(t){t.LOAD_METADATA="loadMetadata",t.SEND_ID3="sendID3",t.END="end"}(c=i.NielsenEvents||(i.NielsenEvents={})),function(t){t.INITIALIZE="initialize",t.SEND_BEACON="sendBeacon"}(f=i.IframeMessageType||(i.IframeMessageType={}));var v=function(){function t(t,i){this.PV=t,this.xV=null,this.UV="",this.VV=!1,this.FV=!1,this.BV=!1,this.zV=[],this.GV=!1,this.HV="",this.YV=!1,this.qV=[{evt:e.ExternalEvt.PLAYBACK_START,cb:this.WV.bind(this)},{evt:e.ExternalEvt.TIMED_METADATA_RECEIVED,cb:this.QV.bind(this)},{evt:e.ExternalEvt.PLAYBACK_COMPLETE,cb:this.ZV.bind(this)},{evt:e.ExternalEvt.PLAYBACK_STOPPED,cb:this.ZV.bind(this)},{evt:e.ExternalEvt.MEDIA_ITEM_ERROR,cb:this.ZV.bind(this)}],this.XV="P77FED7E1-92A2-4B10-A9AA-16756377EB20",t&&(o.Privacy.initIframeForGDPR(),this.$V(),this.UV="vp-player-"+Math.floor(1e4*Math.random()),i&&i.length&&(this.XV=i),this.JV(),this.KV={},this.tF(),this.iF(),this.HV=this.PV.addEventListener(e.ExternalEvt.NIELSEN_REQUIRED,this.iF.bind(this),this))}return t.prototype.destroy=function(){this.xV&&(this.PV.removeEventListeners(this.KV),window.removeEventListener("message",this.nF),this.xV=null,this.zV=null,this.KV={},this.PV.removeEventListener(e.ExternalEvt.NIELSEN_REQUIRED,this.HV))},t.prototype.iF=function(){this.BV||(this.eF(),this.FV=!1,this.VV=!1,this.BV=!0)},t.prototype.rF=function(){this.BV&&(this.PV.removeEventListeners(this.KV),window.removeEventListener("beforeunload",this.ZV.bind(this)),this.FV=!0,this.BV=!1)},t.prototype.JV=function(){var t=this;this.xV=document.getElementById(l),this.xV?(this.sF(),this.GV=!0):(this.xV=document.createElement("iframe"),this.xV.id=l,this.xV.style.display="none",this.xV.onload=function(){t.sF(),t.GV=!0,t.YV&&t.oF()},this.xV.src=h,document.body.appendChild(this.xV))},t.prototype.sF=function(){this.uF(f.INITIALIZE,null,{appid:this.XV})},t.prototype.uF=function(t,i,n){if(this.xV&&this.xV.contentWindow){var e={messageType:t,nielsenEvent:i,payload:n,playerid:this.UV};this.xV.contentWindow.postMessage(e,u)}},t.prototype.eF=function(){var t=this;window.addEventListener("beforeunload",this.ZV.bind(this)),this.qV.forEach((function(i){t.KV[i.evt]=t.PV.addEventListener(i.evt,i.cb,t)}))},t.prototype.tF=function(){window.addEventListener&&window.addEventListener("message",this.nF.bind(this))},t.prototype.nF=function(t){if(t.origin===u){var i=t.data&&t.data.messageType,n=t.data&&t.data.success||!1;if(i&&!n)return;i===f.SEND_BEACON&&n&&(this.VV=!0)}},t.prototype.hF=function(t,i){var n=this;this.zV.push((function(){n.uF(f.SEND_BEACON,t,i)})),this.xV&&this.GV&&this.YV&&this.oF()},t.prototype.oF=function(){this.zV.forEach((function(t){t()})),this.zV=[]},t.prototype.WV=function(t){var i=this.PV.getCurrentMediaItem(),n=i&&i.id,e={type:"content",channelName:t&&t.brandingData&&t.brandingData.branding&&t.brandingData.branding.providerId?n+";"+t.brandingData.branding.providerId:n,adModel:a.linear};this.hF(c.LOAD_METADATA,e)},t.prototype.ZV=function(){if(this.VV&&!this.FV){var t=Date.now()/1e3;this.hF(c.END,t),this.VV=!1,this.rF()}},t.prototype.QV=function(t){var i=s.default.detectRegexPattern(r.ID3_MATCH_PATTERN.NIELSEN,t);i&&this.VV&&this.hF(c.SEND_ID3,i)},t.prototype.$V=function(){var t=this;o.Privacy.getVendorConsent(i.NIELSEN_IAB_VENDOR_ID,(function(i,n){var e,r;if(n){var s=null===(e=i)||void 0===e?void 0:e.gdprApplies;t.YV=!s||!!(null===(r=i)||void 0===r?void 0:r.hasConsent),t.YV||t.rF()}else t.rF()}))},t}();i.default=v},9154:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.MAX_SEG_INFO_ENTRIES_PER_BEACON=15,function(t){t.HERO="hero",t.NONE="none"}(i.PLAYLIST_POSITION||(i.PLAYLIST_POSITION={})),i.BEACONS={VIDEO_REQUEST:{evt:"v_request",type:"pb",payloadParams:["prefetch"],params:[{key:"es",value:"endscreen"}]},PLAYBACK_RESUMED:{evt:"p_resm",type:"pb"},PLAYBACK_STALLED:{evt:"v_stall",type:"pb",payloadParams:["value"]},PLAYBACK_BLOCKED:{evt:"v_play_blocked",type:"pb"},BITRATE_CHANGE:{evt:"v_btrt",type:"pb"},PLAYER_INFO:{evt:"info",type:"pb"},CMS_API_CALLED:{evt:"v_api",type:"pb"},RENDERER_READY:{evt:"renderer_ready",type:"pb",payloadParams:["rtype","shouldplay"]},PLAYER_ERROR:{evt:"error",type:"pb"},PLAYER_WARNING:{evt:"warn",type:"pb"},PLAYBACK_START:{evt:"v_start",type:"pb"},PLAYBACK_STREAM_START:{evt:"v_strm_view",type:"pb"},PLAYBACK_PROGRESS:{evt:"v_prog",type:"pb"},PLAYBACK_COMPLETE:{evt:"v_comp",type:"pb"},STREAM_SYNCH_STRATEGY_APPLIED:{evt:"v_sync",type:"pb"},STREAM_SYNCH_DATERANGE_ENDED:{evt:"v_syncp",type:"pb"},STREAM_SYNCH_COMPLETE:{evt:"v_sync_comp",type:"pb"},STREAM_SYNCH_INVALID_OFFSET:{evt:"v_sync_io",type:"pb"},INCOMPLETE_EXIT:{evt:"v_ncomp",type:"pb",payloadParams:["ext_resn"]},CTRL_SEEK:{evt:"ui_seek",type:"ctrl",payloadParams:["value_e"],params:[{key:"value",value:"lastKnownPlaybackTime"}]},CTRL_PLAYPAUSE:{evt:"ui_pp",type:"ctrl",payloadParams:["value"],params:[{key:"req_type",value:"requestType"},{key:"req_action",value:"requestAction"}]},CTRL_VOLUME:{evt:"ui_cv",type:"ctrl",payloadParams:["value"],params:[{key:"value_e",value:"volume"}]},CTRL_REPLAY:{evt:"ui_esrpl",type:"ctrl"},CTRL_PLAYREQUEST:{evt:"ui_pb_req",type:"ctrl",payloadParams:["req_type"]},CTRL_SETTINGS:{evt:"ui_stgs",type:"ctrl"},CTRL_CUSTOM_ELEMENT:{evt:"ui_ce",type:"ctrl",payloadParams:["cust_ctrl_data"]},CONTROLS_AUDIO_CHANGE:{evt:"ui_aslng",type:"ctrl",payloadParams:["value","value_e"]},THREE_SIXTY_INTERACT:{evt:"ui_360_interact",type:"ctrl"},THREE_SIXTY_PIE_INTERACT:{evt:"ui_360_pie_interact",type:"ctrl"},AIRPLAY_CONNECTION_STATE_CHANGE:{evt:"ui_airp",type:"ctrl"},UI_INTERACT:{evt:"none",type:"ctrl"},CC_TOGGLE:{evt:"ui_cctog",type:"ctrl"},CC_LANGUAGE_CHANGE:{evt:"ui_cclng",type:"ctrl",payloadParams:["value"]},CC_UPDATE_STYLE:{evt:"ui_ccstl",type:"ctrl",payloadParams:["value"]},CC_SETTINGS:{evt:"ui_ccstg",type:"ctrl"},FULLSCREEN_CHANGE:{evt:"ui_fs",type:"ctrl"}},i.PROGRESS_BEACON_INTERVALS=[{time:3,beacon:i.BEACONS.PLAYBACK_STREAM_START,key:"vstrm-view"},{time:10,beacon:i.BEACONS.PLAYBACK_PROGRESS,key:"vprog--initial"},{time:30,beacon:i.BEACONS.PLAYBACK_PROGRESS,recurring:!0,key:"vprog--recurring"}],i.PARAMS=["_V","type","ss","vid","pstaid","prt","cprt","vs","vlng","pver","host","_w","_R","pls","pltype","auto","snd","deos","deom","play_pos","psz","ccav","cdn","smpl","cont","replay","focus","view","expm","bit","drm","drmsys","_sqno","ts","pbst","pbstd","pl_type","viewd","soe","siteadspref"]},6243:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(954),r=n(8103),s=n(6120),o=n(4685),u=n(4986),h=n(6342),a=n(9154),c=function(){function t(t){this.PV=t,this.viewability={value:0,timestamp:0,rect:{top:null,bottom:null,height:null},windowHeight:null,isVisible:0,invisibleElement:""},this.progressBeaconsInfo={timeLastSent:{}},this.SKIP_PARAM_IN_BEACON="___skip_param_in_beacon___",this.expm="na",this.pltype="vdms",this.pl_type="",this.aF=0,this._V="V",this.type="",this.ss="",this.vid="",this.pstaid="",this.prt="none",this.cprt="none",this.vs="",this.vlng="none",this.pver="",this.host=document.location.host,this._w=document.location.href,this._R=document.referrer,this.pls="",this.auto="",this.snd="",this.deos="",this.deom="",this.psz="",this.ccav="",this.cdn="uncalculated",this.smpl="",this.cont=1,this.replay=0,this.focus="",this.bit=0,this.endscreen=0,this.drmsys="none",this.drm=!1,this._sqno=0,this.ts=0,this.pbst="",this.pbstd="",this.soe="",this.siteadspref=0,this.UE={},this.apiPlay=!1,this.resetProgressBeaconsState()}return t.getStreamType=function(i,n,e){return Object.values(r.AdBreakType).includes(n)?t.getAdType(n):Object.values(s.MediaItemType).includes(n)?t.getContentType(n,n,e):i===o.PlaybackMode.AD?"ad":n},t.getContentType=function(i,n,e){if(i===r.AdBreakType.NATIVE)return"ad native";switch(n){case s.MediaItemType.VOD:return 0===e?"":e>t.LONG_VOD_DURATION?"vod long":"vod short";case s.MediaItemType.LIVE_EVENT:case s.MediaItemType.LIVE_CHANNEL:return"live";case s.MediaItemType.CONTAINER:return"streamurl"}return""},t.getAdType=function(t){switch(t){case r.AdBreakType.PREROLL:return"ad pre-roll";case r.AdBreakType.MIDROLL:return"ad mid-roll";case r.AdBreakType.POSTROLL:return"ad post-roll";case r.AdBreakType.TRIGGER:return"ad trigger";case r.AdBreakType.NON_LINEAR:return"ad non-linear";case r.AdBreakType.NATIVE:return"ad native"}return""},t.prototype.destroy=function(){this.pls="",this._sqno=0},t.prototype.update=function(i){this.requestType=i.requestType||"",this.requestAction=i.requestAction||"none",this.audioLanguage=i.audioLanguage||"",this.cF=i.playerRootElement||this.cF,this.playbackMode=i.playbackMode,this.adParams=this.playbackMode!==o.PlaybackMode.AD?null:this.adParams,this.type=t.getContentType(i.currentMediaType,i.contentType,i.videoLength)||"",this.pls=this.PV.guid,this.ss=this.fF(i.currentMediaType)||this.ss,this.vid=i.videoId||this.vid,this.pstaid=i.videoId||this.pstaid,this.prt=this.lF(i.rendererType)||this.prt,this.cprt=this.lF(i.mediaItemRendererType)||this.cprt,this.vs=i.sessionId||this.vs,this.vlng=i.videoLength&&parseFloat(parseFloat(i.videoLength).toFixed(2)).toString()||this.vlng,this.pver="0.3.10"===i.playerVersion?"local":i.playerVersion,this.auto=this.apiPlay?"vm":!0===i.autoPlay?"true":"false",this.apiPlay||(this.apiPlay=this.requestAction===e.REQUEST_TYPES.PLAY&&this.requestType===e.REQUEST_TYPES.API),this.snd=!0===i.mute?"m":"um",this.deos=i.docking&&!0===i.docking.enableOnScrollDown?"1":"0",this.deom=i.docking&&!0===i.docking.enableOnMuted?"1":"0",this.psz=i.uiState&&i.uiState.width&&i.uiState.height?i.uiState.width+"x"+i.uiState.height:this.psz,this.ccav=!0===i.isCCAvailable?"1":"0",this.cdn=i.cdn||this.cdn,this.smpl=u.isNullOrUndefined(i.samplingId)?this.smpl:i.samplingId.toString(),this.focus=h.default.isPlayerInBackground()?"0":"1",this.expm=(i.uiState&&!0===i.uiState.isFullScreen?"fullscreen":i.uiState&&!0===i.uiState.isDocked&&"docked")||"na",this.endscreen=i.showEndScreen?1:0,this.drmsys=i.drmsys,this.drm=i.drm,this.ts=i.currentTs-this.PV.getInitTime(),this.pbst=i.pbst,this.pbstd=i.pbstd,this.pl_type=this.vF(),this.soe=i.soe,this.siteadspref=i.firstItemAdsSitePrefetched?1:0},t.prototype.updateSynchState=function(t){var i=this;Object.keys(t).forEach((function(n){i.UE[n]=t[n]||i.UE[n]}))},t.prototype.updateTs=function(t){this.ts=t-this.PV.getInitTime()},t.prototype.getCommonParams=function(){var t=this,i={t:Math.random()};return a.PARAMS.forEach((function(n){i[n]=t[n]})),i},t.prototype.onVideoRequest=function(t,i){this.dF&&(i.videoId===this.dF?this.replay++:this.cont++),this.dF=i.videoId,this.bitrate=0},t.prototype.onBeaconSent=function(){this._sqno++},t.prototype.resetProgressBeaconsState=function(){this.progressBeaconsInfo.timeLastSent=a.PROGRESS_BEACON_INTERVALS.reduce((function(t,i){return t[i.key]=-1,t}),{})},Object.defineProperty(t.prototype,"synchState",{get:function(){return this.UE},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.PV.getCurrentTime()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"volume",{get:function(){var t=this.PV.volume;return t&&t>0&&t.toString()||"0"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bitrate",{get:function(){return this.aF},set:function(t){this.aF=Math.round(t),this.bit=Math.round(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"programDateTimeLatency",{get:function(){var t=this.PV.getCurrentDate(),i=(new Date).getTime();return t>0?(i-t).toString():""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"play_pos",{get:function(){return parseFloat(this.currentTime.toFixed(2)).toString()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"view",{get:function(){return this.pF(this.cF).toString()+"%"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"viewd",{get:function(){var t=this.viewability;return JSON.stringify({ts:this.viewability.timestamp,t:u.isNullOrUndefined(t.rect.top)?"":t.rect.top,b:u.isNullOrUndefined(t.rect.bottom)?"":t.rect.bottom,h:u.isNullOrUndefined(t.rect.height)?"":t.rect.height,wh:this.viewability.windowHeight||"",v:this.viewability.isVisible,i:this.viewability.invisibleElement})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"jsdt",{get:function(){return f},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cssdt",{get:function(){return l},enumerable:!0,configurable:!0}),t.prototype.lF=function(t){if(!t)return"";switch(t){case o.RendererType.HTML5_HLS:return"html5-hls";case o.RendererType.HTML5_HLS_360:return"html5-hls-360";case o.RendererType.HTML5_RAW_360:return"html-360";case o.RendererType.EXTERNAL:case o.RendererType.HTML5_RAW:case o.RendererType.HTML5_TV:case o.RendererType.HTML5_TV_TIZEN:case o.RendererType.HTML5_TV_ORSAY:default:return"html"}},t.prototype.fF=function(t){return t===s.MediaItemType.LIVE_EVENT||t===s.MediaItemType.LIVE_CHANNEL?"live":"vod"},t.prototype.pF=function(t){var i=(new Date).getTime();if(t&&i-this.viewability.timestamp>1e3){var n=t&&void 0!==t.getElementsByClassName?t.getElementsByClassName(e.VIDEO_MAIN_ELEMENT_CLASS):null;n&&n.length&&(this.viewability.value=h.default.getElementViewability(n[0]),this.viewability.timestamp=i,this.viewability.rect=n[0].getBoundingClientRect(),this.viewability.windowHeight=window.innerHeight,this.viewability.isVisible=null!==n[0].offsetParent?1:0,this.viewability.invisibleElement=this.viewability.isVisible?"":this.mF(n[0]))}return this.viewability.value},t.prototype.mF=function(t){return t?t.parentElement&&"none"!==t.style.display?this.mF(t.parentElement):JSON.stringify({n:t.nodeName,i:t.id,cl:t.classList}):""},t.prototype.vF=function(){var t,i,n,r,s,o,u,h,c,f=this.PV.config,l=!0===(null===(n=null===(i=null===(t=f)||void 0===t?void 0:t.ui)||void 0===i?void 0:i.playlist)||void 0===n?void 0:n.show)&&(null===(o=null===(s=null===(r=f)||void 0===r?void 0:r.ui)||void 0===s?void 0:s.playlist)||void 0===o?void 0:o.position);return l!==e.PLAYLIST_POS.RIGHT||(null===(c=null===(h=null===(u=f)||void 0===u?void 0:u.ui)||void 0===h?void 0:h.playlist)||void 0===c?void 0:c.inStream)?l||a.PLAYLIST_POSITION.NONE:a.PLAYLIST_POSITION.HERO},t.LONG_VOD_DURATION=600,t}();i.default=c;var f=h.default.getResourceLoadTime(/vdms-player\.js/);f=u.isNumber(f)?Math.round(f).toString():"na";var l=h.default.getResourceLoadTime(/video-player\.css/);l=u.isNumber(l)?Math.round(l).toString():"na"},4299:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s,o=n(7403),u=n(3072),h=n(4685),a=n(4986),c=n(9154);!function(t){t.VIDEO_PROGRESS="video-progress"}(s=i.ProgressEvent||(i.ProgressEvent={}));var f=function(t){function i(i,n){var e=t.call(this,"AnalyticsProgressManager")||this;return e.PV=i,e._m=n,e.bF=0,e.KV={},e.gF=[],e.JO=!1,e.yF=0,e.wF=!1,e._F="",e.aS=null,e.EF=0,[{evt:u.ExternalEvt.VIDEO_REQUEST,cb:e.OF},{evt:u.ExternalEvt.PLAYBACK_PAUSE,cb:e.qE},{evt:u.ExternalEvt.SEG_INFO_AVAILABLE,cb:e.AF},{evt:u.ExternalEvt.PLAYBACK_TIME_UPDATE,cb:e.$E},{evt:u.ExternalEvt.PLAYBACK_SEEKING,cb:e.WE},{evt:u.ExternalEvt.PLAYBACK_SEEK_COMPLETE,cb:e.SF},{evt:u.ExternalEvt.RECOVERY_METADATA_READY,cb:e.TF}].forEach((function(t){e.KV[t.evt]=e.PV.addEventListener(t.evt,t.cb,e)})),e}return r(i,t),i.prototype.destroy=function(){this.PV.removeEventListeners(this.KV),this.IF()},i.prototype.updatePlaybackStats=function(t){var i=this.jF();t.dur=Math.floor(this.bF)||"",t.dur_d=Math.floor(this.bF)-Math.floor(this.yF)||0,t.buff_info=i.segInfo||"",t.buf_dur=i.bufDur||0,this._F&&(t.rcvr_status=this._F)},Object.defineProperty(i.prototype,"totalWatchTime",{get:function(){return this.bF},enumerable:!0,configurable:!0}),i.prototype.OF=function(t,i){this.IF()},i.prototype.qE=function(t){t.playbackMode!==h.PlaybackMode.AD&&this.MF(c.BEACONS.PLAYBACK_PROGRESS),this.PU()},i.prototype.WE=function(t){this.JO=!0,this.PU()},i.prototype.SF=function(){this.JO=!1,this._m.lastKnownPlaybackTime=this._m.currentTime},i.prototype.AF=function(t){this.gF=this.gF.concat(t.val),this.gF=this.NF()},i.prototype.NF=function(){if(this.gF.length<=0)return this.gF;for(var t=[this.gF[0]],i=1;i<this.gF.length;i++){var n=this.gF[i];1===Object.keys(n).length&&void 0!==n.buf_dur?t[t.length-1].buf_dur+=n.buf_dur:t.push(n)}return t},i.prototype.$E=function(t,i){if(!(this.JO||a.isNullOrUndefined(t)||t<0||i.playbackMode===h.PlaybackMode.AD))if(a.isNullOrUndefined(this._m.lastKnownPlaybackTime))this._m.lastKnownPlaybackTime=t;else if(t>0&&(this.PU(),this.wF))this.kF();else{var n=t-this._m.lastKnownPlaybackTime;this._m.lastKnownPlaybackTime=t,n>0&&(this.bF+=n),this.RF()}},i.prototype.RF=function(){var t=this;c.PROGRESS_BEACON_INTERVALS.forEach((function(i){var n=t.bF,e=t._m.progressBeaconsInfo.timeLastSent[i.key],r=-1===e?0:e;(i.recurring&&n>r+i.time||!i.recurring&&-1===e&&n>i.time)&&(t._m.progressBeaconsInfo.timeLastSent[i.key]=Math.floor(n),t.MF(i.beacon))}))},i.prototype.MF=function(t){this.publish(s.VIDEO_PROGRESS,t),this.yF=Math.floor(this.bF)},i.prototype.IF=function(){this.gF=[],this.bF=0,this.yF=0,this._m.lastKnownPlaybackTime=null,this._m.resetProgressBeaconsState(),this.aS=null,this.wF=!1,this.EF=0},i.prototype.jF=function(){var t;return this.wF?(this.LF(),t=[{buf_dur:this.EF}],this.EF=0):t=this.gF.splice(0,Math.min(c.MAX_SEG_INFO_ENTRIES_PER_BEACON,this.gF.length)),{segInfo:JSON.stringify({seg:t}),bufDur:t.reduce((function(t,i){return i.buf_dur+t}),0)}},i.prototype.PU=function(){this.LF(),this.aS=null},i.prototype.LF=function(){this.aS&&(this.EF+=Date.now()-this.aS,this.aS=Date.now())},i.prototype.TF=function(){this.MF(c.BEACONS.PLAYBACK_PROGRESS),this.aS=Date.now(),this.wF=!0,this._F="recovering",this.MF(c.BEACONS.PLAYBACK_PROGRESS)},i.prototype.kF=function(){this._F="recovered",this.MF(c.BEACONS.PLAYBACK_PROGRESS),this.wF=!1,this._F="",this.aS=null},i}(o.default);i.default=f},7262:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(1750),r=n(101),s=function(){function t(t){if(this.KV={},!t)throw Error("[InStreamAdAnalytics] Cannot initialize InStreamAdAnalytics. Bad instreamAdManager instance!");this.DF=t,this.eF()}return t.prototype.destroy=function(){this.DF.destroy(),this.KV={}},t.prototype.eF=function(){var t=this;Object.keys(r.InstreamAdManagerEvent).forEach((function(i){t.KV[r.InstreamAdManagerEvent[i]]=t.DF.on(r.InstreamAdManagerEvent[i],t.CF,t)}))},t.prototype.CF=function(t){t&&t.forEach((function(t){return e.default.sendImageBeacon(t)}))},t}();i.default=s},1750:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(6342),r=function(){function t(){}return t.sendImageBeacon=function(t){t=e.default.fixProtocol(t);var i=new Image;i.onload=i.onabort=i.onerror=function(){i.onload=i.onabort=i.onerror=null,i=null},i.src=t},t.sendUnloadBeacon=function(i){return i=e.default.fixProtocol(i),navigator&&navigator.sendBeacon?navigator.sendBeacon(i,null):t.sendImageBeacon(i),!0},t.sendIframeBeacon=function(i){i=e.default.fixProtocol(i);var n=Math.random(),r="vp-beacons",s=document.querySelector("#vp-beacons"),o="vp-beacons-"+n;s||(s=t.createBeaconsIframe(document,r),document.body.appendChild(s));var u=t.createBeaconsIframe(s.contentDocument,o);return u.src=i,"complete"===s.contentDocument.readyState?s.contentDocument.body.appendChild(u):s.contentDocument.body.onload=function(){s.contentDocument.body.appendChild(u)},!0},t.createBeaconsIframe=function(t,i){var n=t.createElement("iframe");return n.frameBorder=0,n.width=0,n.height=0,n.marginwidth=0,n.marginheight=0,n.hspace=0,n.vspace=0,n.frameborder=0,n.scrolling="no",n.id=i,n.style.display="none",n.title="",n},t.prepareApiInfo=function(t,i){(i=i||{}).url=t,i.instrument=i.instrument||"none",i.perfInfo="na",i.perfStack="na",i.source="player";var n=i.resourceTiming,e=i.resourceTimingEntries;if(n){var r={};["connectEnd","connectStart","domainLookupEnd","domainLookupStart","duration","fetchStart","redirectEnd","redirectStart","requestStart","responseEnd","responseStart","startTime"].forEach((function(t){r[t]=n[t].toFixed(2)})),i.latency=r&&r.duration||"",i.perfInfo=JSON.stringify(r);var s=[];i.resourceTimingEntries&&n.requestStart-n.connectStart>500&&e.forEach((function(t){t.startTime<n.startTime&&s.push({url:t.name,st:t.startTime.toFixed(2),du:(t.responseEnd-t.startTime).toFixed(2)})})),i.perfStack=0===s.length?"na":JSON.stringify(s)}return i},t}();i.default=r},1880:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(2694),r=n(3072),s=n(4685),o=n(4986),u=n(6342),h=n(9154),a=n(6243),c=n(4299),f=n(1750),l=["ad_play","ad_play_complete","ad_iframe_load","ad_iframe_loaded","ad_play_plg","ad_prepare_pb_plg","ad_fetch_plg","ad_eng_load_plg","ad_non_vpaid_emptied_plg","ad_media_loaded_plg","ad_media_resolved_plg","ad_non_vpaid_play_plg","ad_non_vpaid_load_plg","ad_stop_player_plg","ad_non_vpaid_loaded_plg","ad_non_vpaid_start_plbck_plg","ad_non_vpaid_video_load_plg","ad_non_vpaid_load_data_plg","ad_comp_plg","ad_non_vpaid_suspended_plg","ad_pause_player_plg","ad_stop_by_error_plg","ad_vpaid_stop_plg","ad_vpaid_init_plg","vpaid_initialising_plg","ad_vpaid_err_plg","ad_vpaid_start_playback_plg","ad_paused_plg","ad_fetch","ad_fetched","s_load","renderer_playing","renderer_ready","v_play_apr","v_play_rdr","v_plcomp","v_plprog","v_plstart"],v=function(){function t(t){this.PV=t,this.PF=!1,this.xF=!1,this.qV=[{evt:r.ExternalEvt.VIDEO_REQUEST,cb:this.UF.bind(this,"VIDEO_REQUEST")},{evt:r.ExternalEvt.PLAYBACK_RESUMED,cb:this.UF.bind(this,"PLAYBACK_RESUMED")},{evt:r.ExternalEvt.PLAYBACK_STALLED,cb:this.UF.bind(this,"PLAYBACK_STALLED")},{evt:r.ExternalEvt.PLAYBACK_BLOCKED,cb:this.UF.bind(this,"PLAYBACK_BLOCKED")},{evt:r.ExternalEvt.CTRL_SEEK,cb:this.UF.bind(this,"CTRL_SEEK")},{evt:r.ExternalEvt.CTRL_VOLUME,cb:this.UF.bind(this,"CTRL_VOLUME")},{evt:r.ExternalEvt.CTRL_PLAYPAUSE,cb:this.UF.bind(this,"CTRL_PLAYPAUSE")},{evt:r.ExternalEvt.CTRL_REPLAY,cb:this.UF.bind(this,"CTRL_REPLAY")},{evt:r.ExternalEvt.CTRL_PLAYREQUEST,cb:this.UF.bind(this,"CTRL_PLAYREQUEST")},{evt:r.ExternalEvt.CTRL_SETTINGS,cb:this.UF.bind(this,"CTRL_SETTINGS")},{evt:r.ExternalEvt.CTRL_CUSTOM_ELEMENT,cb:this.UF.bind(this,"CTRL_CUSTOM_ELEMENT")},{evt:r.ExternalEvt.CONTROLS_AUDIO_CHANGE,cb:this.UF.bind(this,"CONTROLS_AUDIO_CHANGE")},{evt:r.ExternalEvt.THREE_SIXTY_INTERACT,cb:this.UF.bind(this,"THREE_SIXTY_INTERACT")},{evt:r.ExternalEvt.RENDERER_READY,cb:this.UF.bind(this,"RENDERER_READY")},{evt:r.ExternalEvt.THREE_SIXTY_PIE_INTERACT,cb:this.UF.bind(this,"THREE_SIXTY_PIE_INTERACT")},{evt:r.ExternalEvt.CC_LANGUAGE_CHANGE,cb:this.UF.bind(this,"CC_LANGUAGE_CHANGE")},{evt:r.ExternalEvt.CC_UPDATE_STYLE,cb:this.UF.bind(this,"CC_UPDATE_STYLE")},{evt:r.ExternalEvt.CC_SETTINGS,cb:this.UF.bind(this,"CC_SETTINGS")},{evt:r.ExternalEvt.AIRPLAY_CONNECTION_STATE_CHANGE,cb:this.VF},{evt:r.ExternalEvt.BITRATE_CHANGE,cb:this.FF},{evt:r.ExternalEvt.UI_INTERACT,cb:this.BF},{evt:r.ExternalEvt.CC_UI_TOGGLE,cb:this.zF},{evt:r.ExternalEvt.PLAYER_FULLSCREEN_CHANGE,cb:this.GF},{evt:r.ExternalEvt.PLAYER_INFO,cb:this.HF},{evt:r.ExternalEvt.CMS_API_CALLED,cb:this.YF},{evt:r.ExternalEvt.PLAYER_ERROR,cb:this.XE},{evt:r.ExternalEvt.PLAYER_WARNING,cb:this.qF},{evt:r.ExternalEvt.PLAYBACK_START,cb:this.WF},{evt:r.ExternalEvt.PLAYBACK_COMPLETE,cb:this.QF},{evt:r.ExternalEvt.AD_METRICS,cb:this.ZF},{evt:r.ExternalEvt.STREAM_SYNCH_STRATEGY_APPLIED,cb:this.XF},{evt:r.ExternalEvt.STREAM_SYNCH_COMPLETE,cb:this.$F},{evt:r.ExternalEvt.DATERANGE_ENDED,cb:this.JF},{evt:r.ExternalEvt.INVALID_SYNC_OFFSET,cb:this.KF}],this.PV&&(this._m=this._B(this.PV),this.tz=new c.default(this.PV,this._m),this.KV={},this.eF())}return t.prototype.destroy=function(){this._z("destroy"),this.PV.removeEventListeners(this.KV),this.tz.destroy(),this._m.destroy(),this.KV={}},t.prototype.WF=function(t){var i=this.PV.getPlaybackStartDto();t.ad=this.PF?1:0,t.rsm=i.isResume||"",t.pdtl=this._m.programDateTimeLatency,this.tG(t,i),this.iG(t,h.BEACONS.PLAYBACK_START),this.CF(t)},t.prototype._B=function(t){return new a.default(t)},t.prototype.ZF=function(t,i){if(t&&t.evt){t.evt=t.evt.toLowerCase(),"ad_dlv"===t.evt&&(this.PF=!0,this.tG(i,this.PV.getPlaybackStartDto())),this._m.adParams=t;for(var n=["string","number","boolean","undefined"],e=0,r=Object.getOwnPropertyNames(t);e<r.length;e++){var s=r[e];(n.indexOf(typeof t[s])>=0||null===t[s])&&o.isNullOrUndefined(i[s])&&(i[s]=t[s])}var u=t.adReplay;u&&+u>0&&(i.replay=u),i.V_sec="pb",this.CF(i),"ad_comp"===t.evt&&(this._m.adParams=null)}},t.prototype.eF=function(){var t=this;window.addEventListener("unload",this.nG.bind(this)),this.PV.addEventListener(r.ExternalEvt.VIDEO_REQUEST,this.OF,this),this.tz.addEventListener(c.ProgressEvent.VIDEO_PROGRESS,this.eG,this),this.qV.forEach((function(i){t.KV[i.evt]=t.PV.addEventListener(i.evt,t.rG.bind(t,i),t)}))},t.prototype.rG=function(t){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];var e=i.length-1,r=i[e]||{};this._m.update(r);var s=this._m.getCommonParams(),u=o.isObject(i[e])?Array.prototype.slice.call(i,0,e):i;t.cb.apply(this,u.concat([s]))},t.prototype.UF=function(t){for(var i=this,n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];var r=t&&h.BEACONS[t]||null,s=n[n.length-1];if(r){var o=Array.prototype.slice.call(n,0,n.length-1),u=r.payloadParams;if(o.length&&u&&u.length===o.length)for(var a=0;a<o.length;a++)s[u[a]]=o[a].toString();else if(u&&u.length)return;r.params&&r.params.forEach((function(t){s[t.key]=i._m[t.value]})),this.iG(s,r),this.CF(s)}},t.prototype.CF=function(t){this.sG(t);var i="https://bats.video.yahoo.com/p?"+u.default.querystring(this.oG(t),"&","=",(function(t){return encodeURIComponent(t).replace(/[!'()]/g,escape).replace(/\*/g,"%2A")}));f.default.sendImageBeacon(i),this._m.onBeaconSent()},t.prototype.oG=function(t){var i=t;return l.includes(t.evt)&&(i._V="test"),i},t.prototype.sG=function(t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&t[i]===this._m.SKIP_PARAM_IN_BEACON&&delete t[i]},t.prototype.OF=function(t,i){this.PF=!1,this.xF=!1,this._m.onVideoRequest(t,i)},t.prototype.FF=function(t,i,n){this.iG(n,h.BEACONS.BITRATE_CHANGE),n.value=t.toString(),n.value_e=this._m.bitrate,n.reason=i.reason||"",n.fr=i.newFrameRate||"",n.fr_old=i.oldFrameRate||"",this.CF(n),this._m.bitrate=t},t.prototype.VF=function(t,i){t.isInitialEvt||(this.iG(i,h.BEACONS.AIRPLAY_CONNECTION_STATE_CHANGE),i.value=t.connected?"1":"0",this.CF(i))},t.prototype.BF=function(t,i){this.iG(i,h.BEACONS.UI_INTERACT),i.evt=["ui_pl_nxt_clk","ui_pl_nxt_hvr","ui_pl_scrl","ui_pl_thmb_clk"].indexOf(t.srcElement)>-1?"ui_pl":i.evt,i.V_slk=t.srcElement,this.CF(i)},t.prototype.zF=function(t,i,n){this.iG(n,h.BEACONS.CC_TOGGLE),n.value=t?"1":"0",this.CF(n)},t.prototype.GF=function(t,i){this.iG(i,h.BEACONS.FULLSCREEN_CHANGE),i.value=t?"ON":"OFF",this.CF(i)},t.prototype.HF=function(t,i){this.iG(i,h.BEACONS.PLAYER_INFO),i.ecode=t.rep||"",i.estring=t.debugMessage||t.message||"",this.CF(i)},t.prototype.YF=function(t,i){var n=f.default.prepareApiInfo(t.url,t.perfObj);this.iG(i,h.BEACONS.CMS_API_CALLED),i.source=n.source||"na",i.url=n.url||"",i.latency=n.latency||"",i.http_code=n.http_code||"na",i.resp_len=n.resp_len||"na",i.instrument=n.instrument||"",i.perf_info=n.perfInfo||"",i.perf_stack=n.perfStack||"",this.CF(i)},t.prototype.XE=function(t,i){t.isRecoverable||(this.iG(i,h.BEACONS.PLAYER_ERROR),i.ecode=t.rep||"",i.estring=t.debugMessage||t.message||"",i.dur=Math.round(this.tz.totalWatchTime)||"",this.CF(i),this._z("error"))},t.prototype.qF=function(t,i){this.iG(i,h.BEACONS.PLAYER_WARNING),i&&(i.ecode=t.rep||"",i.estring=t.debugMessage||t.message||""),this.CF(i)},t.prototype.QF=function(t,i){this.uG(h.BEACONS.PLAYBACK_COMPLETE,i)},t.prototype.nG=function(){this._z("unload")},t.prototype._z=function(t){this._m.updateTs(Date.now());var i=this._m.getCommonParams();i&&(i.ext_resn=t||"na"),this.uG(h.BEACONS.INCOMPLETE_EXIT,i)},t.prototype.uG=function(t,i){this.xF||(this.xF=!0,this.iG(i,t),i.pdtl=this._m.programDateTimeLatency,i.alang=this._m.audioLanguage,this._m.playbackMode===s.PlaybackMode.AD?this.hG(i):this.tz.updatePlaybackStats(i),this.CF(i))},t.prototype.eG=function(t){var i=this._m.getCommonParams();this.iG(i,t),this.tz.updatePlaybackStats(i),this.CF(i)},t.prototype.XF=function(t,i){this.aG(i,t,h.BEACONS.STREAM_SYNCH_STRATEGY_APPLIED),this.CF(i)},t.prototype.$F=function(t,i){this.cG(i,t,h.BEACONS.STREAM_SYNCH_COMPLETE),this.CF(i)},t.prototype.JF=function(t,i){if(t.className.indexOf("content-data:watchtogether")>-1){var n={};n.startDate=t.startDate,n.contentDate=e.default.getData(t).latency_ts||"",this.aG(i,n,h.BEACONS.STREAM_SYNCH_DATERANGE_ENDED),this.CF(i)}},t.prototype.KF=function(t){this.iG(t,h.BEACONS.STREAM_SYNCH_INVALID_OFFSET),this.CF(t)},t.prototype.fG=function(t){return t&&o.isNumber(t.timeDiff)&&t.timeDiff.toString()||""},t.prototype.lG=function(t,i){return t&&t.startTime&&i&&(i+t.startTime).toString()||""},t.prototype.vG=function(t,i){return t&&o.isNumber(t.timeDiff)&&i&&o.isNumber(i.timeDiff)?(t.timeDiff-i.timeDiff).toString():this.fG(t)},t.prototype.iG=function(t,i){t&&i&&(t.evt=i.evt,t.V_sec=i.type)},t.prototype.aG=function(t,i,n){if(t&&i){i.playbackRate=o.isNumber(i.playbackRate)&&i.playbackRate.toString(),i.bufferLength=o.isNumber(i.bufferLength)&&i.bufferLength.toString();var e=this._m.synchState;t.evt=n.evt,t.V_sec=n.type,t._V="test",t.syn_mode=i.syncMode||e.syncMode,t.syn_src=i.syncSource||e.syncSource,t.syn_st=i.strategy&&("rateChange"===i.strategy?"pr":i.strategy)||e.strategy,t.syn_t=i.syncDuration||e.syncDuration,t.syn_ps=i.playbackRate||e.playbackRate,t.syn_tl=i.targetLatency||e.targetLatency,t.syn_ll=i.liveLatency||e.liveLatency,t.buf_len=i.bufferLength||e.bufferLength,t.syn_os=i.synchOffset||e.synchOffset,t.ntp_t=Date.now(),t.sys_t=Date.now(),t.syn_pdt=this.PV.getCurrentDate(),i.startDate&&(t.dr_start=i.startDate),i.contentDate&&(t.dr_ct=i.contentDate),this._m.updateSynchState(i)}},t.prototype.cG=function(t,i,n){t&&i&&(t.evt=n.evt,t.V_sec=n.type,t._V="test",t.syn_mode=i.syncMode,t.syn_src=i.syncSource,t.syn_sts=JSON.stringify(i.strategies),t.syn_t=i.syncDuration,t.comp_cause=i.cause)},t.prototype.hG=function(t){var i=this.PV.getCurrentTime(),n=this._m.adParams&&this._m.adParams.pos,e=this._m.adParams&&this._m.adParams.dur||null;t.pos=n||"ad",t.dur=i>0?Math.floor(i):0,t.dur_d=o.isNumber(e)&&i>e&&Math.floor(i-e)||0,t.buff_info="",t.buf_dur=0},t.prototype.tG=function(t,i){t.apallwd=i.autoPlayAllowed||"",t.jsdt=this._m.jsdt,t.cssdt=this._m.cssdt,t.req_type=this._m.requestType||"",t.req_action=this._m.requestAction||"",t.apl=this.vG(i.autoPlayLatency,i.deferringPlaybackLatency),t.bgl=this.fG(i.deferringPlaybackLatency),t.s_apl=this.lG(i.autoPlayLatency,i.initTime),t.ucl=this.fG(i.clickToPlayLatency),t.tpb=this.fG(i.playbackStartLatency),t.s_tpb=this.lG(i.playbackStartLatency,i.initTime),t.tmeta_call=this.fG(i.cmsLatency),t.s_tsapic=this.lG(i.cmsLatency,i.initTime),t.tsrc_call=this.fG(i.cmsSourceLatency),t.s_tssrcapic=this.lG(i.cmsSourceLatency,i.initTime),t.tadp=this.fG(i.adPluginLatency),t.s_tadpc=this.lG(i.adPluginLatency,i.initTime),t.strml=this.fG(i.streamReqToRenderLatency),t.s_strml=this.lG(i.streamReqToRenderLatency,i.initTime)},t}();i.default=v},655:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(6120),r=n(1279),s=function(){function t(){this.version="0.3.10",this.mimetype=e.MediaItemMimeType.CONTAINER,this.type=r.PluginType.METADATA}return t.prototype.prepare=function(){},t.prototype.destroy=function(){},t.prototype.resolve=function(t,i,n){var r=t.map((function(t){return t.metadata=t.metadata||{},t.metadata.type=e.MediaItemType.CONTAINER,t}));n.onComplete(r)},t.prototype.recover=function(t,i,n){},t.prototype.cancel=function(){},t}();i.default=s},9939:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s=n(6120),o=n(1279),u=function(t){function i(){var i=t.call(this)||this;return i.mimetype=s.MediaItemMimeType.CONTAINER,i.type=o.PluginType.SOURCE_METADATA,i}return r(i,t),i}(n(655).default);i.default=u},830:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(742),r=n(6120),s=n(1279),o="content.uplynk.com",u={title:"",description:"",posterUrl:"",thumbnail:"",duration:0,type:r.MediaItemType.VOD},h=function(){function t(){this.version="0.3.10",this.mimetype=r.MediaItemMimeType.UPLYNK,this.type=s.PluginType.METADATA,this.dG=[],this.pG={},e.Loader.preconnect("preconnect-uplynk","//"+o)}return t.prototype.prepare=function(){},t.prototype.resolve=function(t,i,n){var e=this;if(Array.isArray(t)&&0!==t.length){var r=t.map((function(t){return new Promise((function(i,r){e.mG(t,i,r,n)}))}));this.bG=!1;var s=function(){e.bG=!0};this.dG.push(s),Promise.all(r).then((function(t){e.bG||(e.gG(s),n.onComplete(t))})).catch((function(t){if(!e.bG){e.gG(s);var i={code:"1",message:t.toString()};n.onError(i)}}))}},t.prototype.recover=function(t,i,n){},t.prototype.cancel=function(){this.dG.forEach((function(t){t()})),this.dG=[]},t.prototype.destroy=function(){this.cancel()},t.prototype.mG=function(t,i,n,e){var s=this,o=t.id,h=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var r=t&&t.length?t[0]:null,o=t.length?t[4]:null,u=t.length?t[5]:null;s.bG||e.onApiCallInfo({url:u&&u.url||null,perfObj:o}),n(r)},a=function(n,r,h,a){t.metadata=t.metadata||{},t.metadata.title=n.meta&&n.meta.title||n.desc||u.title,t.metadata.description=n.desc||u.description,t.metadata.posterUrl=n.poster_url||u.posterUrl,t.metadata.thumbnail=n.poster_url||u.thumbnail,t.metadata.duration=n.duration||u.duration,t.visualSeekData=t.visualSeekData||{mimetype:"visualseek/uplynk"},t.visualSeekData.assetInfo={maxSlice:n.max_slice,sliceDuration:n.slice_dur,thumbPrefix:n.thumb_prefix,thumbs:n.thumbs},s.pG[o]=!0,s.bG||e.onApiCallInfo({url:a&&a.url||null,perfObj:h}),i(t)};!function(){var n=t.metadata;if(!n||n.type!==r.MediaItemType.LIVE_CHANNEL&&n.type!==r.MediaItemType.LIVE_EVENT||s.yG(t),s.wG(t)||s.pG[o])return i(t);s._G(t,a,h)}()},t.prototype._G=function(t,i,n){var e=t.customConfig&&t.customConfig.sid,r="https://"+o+"/player/assetinfo/{assetid}.json".replace("{assetid}",t.id)+(e?"?pbs="+e:"");this.EG(r,i,n)},t.prototype.EG=function(t,i,n){var r=this,s=e.Loader.ajax(t,{context:this,successHandler:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];r.gG(s),i.apply(void 0,t)},failureHandler:function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];r.gG(s),n.apply(void 0,t)},withCookie:!1,responseTypeJson:!0,collectPerfData:!0});this.dG.push(s)},t.prototype.gG=function(t){if(t){var i=this.dG.indexOf(t);i>=0&&this.dG.splice(i,1)}},t.prototype.yG=function(t){for(var i in t.metadata=t.metadata||{},u)void 0===t.metadata[i]&&(t.metadata[i]=u[i])},t.prototype.wG=function(t){return!(!t||!t.metadata||void 0===t.metadata.title||void 0===t.metadata.description||void 0===t.metadata.thumbnail||void 0===t.metadata.posterUrl||void 0===t.metadata.duration)},t}();i.default=h},1032:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(660),r=n(742),s=n(8103),o=n(3755),u=n(6120),h=n(1279),a=n(4986),c="content.uplynk.com",f={$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{playURL:{type:"string"}},required:["playURL"]},l=function(){function t(){this.version="0.3.10",this.mimetype=u.MediaItemMimeType.UPLYNK,this.type=h.PluginType.SOURCE_METADATA,this.dG=[],this.OG={},this.wF=!1,this.bG=!1,r.Loader.preconnect("preconnect-uplynk","//"+c)}return t.prototype.prepare=function(){},t.prototype.resolve=function(t,i,n){var e=this;if(Array.isArray(t)&&0!==t.length){this.OG=this.AG(i.privacyConsent);var r=t.map((function(t){return new Promise((function(i,r){e.mG(t,i,r,n)}))}));this.bG=!1;var s=function(){e.bG=!0};this.dG.push(s),Promise.all(r).then((function(t){e.bG||(e.gG(s),n.onComplete(t))})).catch((function(t){if(!e.bG){e.gG(s);var i={code:"1",message:t.toString()};n.onError(i)}})),this.wF=!1}},t.prototype.recover=function(t,i,n){t&&(this.wF=!0,this.resolve([t],i,n))},t.prototype.cancel=function(){this.dG.forEach((function(t){t()})),this.dG=[]},t.prototype.destroy=function(){this.cancel()},t.prototype.mG=function(t,i,n,r){var s=this;this.SG(t)&&!this.wF?i(t):this.TG(t,(function(o,h,a,c){var l=o&&e.validate(o,f);if(!l||!l.valid)return n("Invalid preplay response");var v=o.sid,d=t.metadata,p=d&&(d.type===u.MediaItemType.LIVE_EVENT||d.type===u.MediaItemType.LIVE_CHANNEL);t.source={streams:[{url:o.playURL,live:p}]},t.customConfig=t.customConfig||{},t.customConfig.sid=v,t.customConfig.prefix=o.prefix,o.ads&&o.ads.breaks&&o.ads.breaks.length>0&&(t.adBreaks=s.IG(o.ads.breaks,o.ads.breakOffsets),t.visualSeekData=t.visualSeekData||{mimetype:"visualseek/uplynk"},t.visualSeekData.adBreaks=t.adBreaks),s.bG||r.onApiCallInfo({url:c&&c.url||null,perfObj:a}),i(t)}),(function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var e=t&&t.length?t[0]:null,o=t.length?t[4]:null,u=t.length?t[5]:null;s.bG||r.onApiCallInfo({url:u&&u.url||null,perfObj:o}),n(e)}))},t.prototype.TG=function(t,i,n){var e="/api/v3/preplay/{assetid}.json",r=t.metadata;r&&r.type===u.MediaItemType.LIVE_CHANNEL?e="/api/v3/preplay/channel/{assetid}.json":r&&r.type===u.MediaItemType.LIVE_EVENT&&(e="/api/v3/preplay/event/{assetid}.json");var s=t.customConfig||{},o="https://"+c+e.replace("{assetid}",t.id)+(s.preplay&&s.preplay.qs?"?"+s.preplay.qs:"");this.EG(o,i,n)},t.prototype.EG=function(t,i,n){var e=this,s=r.Loader.ajax(t,{context:this,successHandler:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];e.gG(s),i.apply(void 0,t)},failureHandler:function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];e.gG(s),n.apply(void 0,t)},withCookie:!1,responseTypeJson:!0,collectPerfData:!0});this.dG.push(s)},t.prototype.gG=function(t){if(t){var i=this.dG.indexOf(t);i>=0&&this.dG.splice(i,1)}},t.prototype.SG=function(t){return!!(t.source&&t.source.streams&&t.source.streams.length)},t.prototype.IG=function(t,i){var n=this;return t.map((function(t){var e=i&&i.find((function(i){if(i&&i.timeOffset===t.timeOffset)return!0}))||{};return{adBreakId:t.breakId||"",duration:t.duration||0,startOffset:t.timeOffset||0,type:n.jG(t.position),adBreakItems:n.MG(t.ads),customInfo:{index:e.index}}}))},t.prototype.MG=function(t){return t.map((function(t){return{adBreakItemId:t.creative||"",duration:t.duration||0,type:o.AdBreakItemType.AD,instream:!0,resolvedState:o.ResolvedState.RESOLVED,interactionConfig:{allowSeek:!1,allowSkipOffset:0,chromeless:!1},customInfo:{}}}))},t.prototype.jG=function(t){return"preroll"===t?s.AdBreakType.PREROLL:"midroll"===t?s.AdBreakType.MIDROLL:"postroll"===t?s.AdBreakType.POSTROLL:null},t.prototype.AG=function(t){return{gdpr:t&&!a.isNullOrUndefined(t.gdprApplies)?t.gdprApplies:"",euconsent:t&&t.gdprConsentData||""}},t}();i.default=l},4354:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(9847),r=n(954),s=n(1279),o=n(4986),u=n(6342),h=n(4180),a=function(){function t(){this.version="0.3.10",this.mimetype="playlist/simple",this.type=s.PluginType.PLAYLIST}return t.prototype.prepare=function(){},t.prototype.destroy=function(){},t.prototype.create=function(t,i,n){var e=this.NG(t,i),r=document.createElement("div");return r.innerHTML=h.render({items:e,strings:n}),Array.prototype.slice.call(r.children)},t.prototype.kG=function(t){return t&&o.isNumber(t)?u.default.formatTime(t):""},t.prototype.LG=function(t){var i=e.userAgent.chrome>43;return t?t.length>40&&!i?t.substring(0,40)+"...":t:""},t.prototype.DG=function(t,i){return t===r.PLAYLIST_POS.RIGHT&&i&&i.branding&&i.branding.providerName?i.branding.providerName:""},t.prototype.NG=function(t,i){var n=this,e=[];return i.forEach((function(i){i&&i.metadata&&i.metadata.thumbnail&&e.push({id:i.id,title:n.LG(i.metadata.title),thumbnail:i.metadata.thumbnail,duration:n.kG(i.metadata.duration),provider:n.DG(t,i.brandingData)})})),e},t}();i.default=a},4180:function(t,i,n){var e=n(5485);t.exports=new e.Template({code:function(t,i,n){var e=this;return e.b(n=n||""),e.s(e.f("items",t,i,1),t,i,0,10,562,"{{ }}")&&(e.rs(t,i,(function(t,i,e){e.b("<li class='vp-playlist-item' data-id='"),e.b(e.v(e.f("id",t,i,0))),e.b("'>"),e.b("\n"+n),e.b("    <img class='vp-playlist-item-image' src='"),e.b(e.v(e.f("thumbnail",t,i,0))),e.b("'/>"),e.b("\n"+n),e.b("    <div class='vp-playlist-border'></div>"),e.b("\n"+n),e.b("    <div class='vp-playlist-item-gradient'>"),e.b("\n"+n),e.b("        <div class='vp-pl-meta'>"),e.b("\n"+n),e.b("            <span class='vp-pl-title'>"),e.b(e.v(e.f("title",t,i,0))),e.b("</span>"),e.b("\n"+n),e.b("            <span class='vp-now-playing'>"),e.b(e.v(e.d("strings.NOW_PLAYING",t,i,0))),e.b("</span>"),e.b("\n"+n),e.s(e.f("provider",t,i,1),t,i,0,392,470,"{{ }}")&&(e.rs(t,i,(function(t,i,e){e.b("                <span class='vp-pl-provider'>"),e.b(e.v(e.f("provider",t,i,0))),e.b("</span>"),e.b("\n"+n)})),t.pop()),e.b("        </div>"),e.b("\n"+n),e.b("    </div>"),e.b("\n"+n),e.b("    <div class='vp-pl-dur'>"),e.b(e.v(e.f("duration",t,i,0))),e.b("</div>"),e.b("\n"+n),e.b("</li>"),e.b("\n"+n)})),t.pop()),e.fl()},partials:{},subs:{}})},649:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(1279),r=n(4986),s=n(6342),o=function(){function t(){this.version="0.3.10",this.type=e.PluginType.VISUAL_SEEK,this.mimetype="visualseek/uplynk",this.CG={}}return t.prototype.prepare=function(){},t.prototype.destroy=function(){this.CG={}},t.prototype.canSeek=function(t){return t&&!!this.CG[t]},t.prototype.update=function(t,i){var n=this.CG[t]||{};n.assetInfo=i&&i.assetInfo||n.assetInfo,n.adBreaks=i&&i.adBreaks||n.adBreaks,this.CG[t]=n},t.prototype.getThumbnailData=function(t,i,n){if(!r.isString(t)||!r.isNumber(i))return null;var e=this.CG[t].assetInfo;if(!(e&&e.thumbs&&e.thumbPrefix&&e.sliceDuration&&e.maxSlice))return null;var s=this.getUrl(t,i,n);return{isAd:"AD"===s,url:s,width:this.getWidth(t,n),height:this.getHeight(t,n)}},t.prototype.getUrl=function(t,i,n){var e=this.CG[t],r=e.assetInfo,o=r.thumbPrefix,u=this.getThumbInfo(t,n),h=i,a=0,c=!1,f=null,l=0;if(e.adBreaks&&e.adBreaks.length){if(e.adBreaks.some((function(t){if(t.startOffset<i&&t.startOffset+t.duration>i)return c=!0,!0;if(t.startOffset<=i)a+=t.duration,f=t;else if(t.startOffset>i)return!0;return!1})),c)return"AD";l=f&&f.customInfo&&f.customInfo.index||0,h=Math.max(0,h-a)}var v=Math.floor(h/r.sliceDuration)+l;v=Math.min(v,r.maxSlice);var d=s.default.decimalToHexString(v,8,"0");return o+u.prefix+d+".jpg"},t.prototype.getWidth=function(t,i){return this.getThumbInfo(t).width},t.prototype.getHeight=function(t,i){return this.getThumbInfo(t).height},t.prototype.getThumbInfo=function(t,i){void 0===i&&(i=128);var n=this.CG[t].assetInfo.thumbs;return n&&n.length?1===n.length?n[0]:n.find((function(t){return t.width===i}))||n[0]:{width:0,height:0,prefix:""}},t}();i.default=o},460:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(6243),r=n(1880),s=n(3072);i.Events=s.ExternalEvt;var o=n(2079);i.Playlist=o.default;var u=n(2542),h=n(6120);i.MediaItemInterfaces=h;var a=n(1279);i.Plugin=a;var c=n(4685);i.RendererType=c.RendererType;var f=n(8795);i.Player=f.default;n.g.replaceVdmsPlayerSrc=function(t){var i=t.substring(t.lastIndexOf("/")+1),n=i.substring(0,i.indexOf("."));if(!t.includes("assets.video.yahoo.net"))return"/"+i;switch(n){case"vendors~three":return"https://assets.video.yahoo.net/three/THREE_VERSION/"+i;default:return t}},a.AdPluginEvent=u.AdPluginEvent,a.AdPluginPlaybackCapability=u.AdPluginPlaybackCapability,window.VDMS=window.VDMS||{},window.VDMS.Player=f.default,window.VDMS.Plugin=a,window.VDMS.Events=s.ExternalEvt;var l={VdmsAnalytics:r.default,VdmsAnalyticsModel:e.default};i.Analytics=l},9987:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(4685),r=n(6342),s=function(){function t(t){this.LE=t}return t.prototype.getCurrentAdBreak=function(){var t=this.getCurrentAdBreakItem();return t?t.adBreak:null},t.prototype.getCurrentAdBreakItem=function(){var t=this.LE.getPlayingItem();return r.default.getPlaybackMode(t)===e.PlaybackMode.AD?t:null},t}();i.default=s},4141:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(954),r=n(5244),s=n(6342),o=function(){function t(t){this.LE=t}return t.prototype.play=function(t,i){void 0===t&&(t=0),this.LE.getPlaybackState()===r.States.INIT&&t>0&&t<this.getDuration()&&(this.LE.startTime=t),this.LE.play(this.PG(i,e.REQUEST_TYPES.PLAY))},t.prototype.pause=function(t){this.LE.pause(this.PG(t,e.REQUEST_TYPES.PAUSE))},t.prototype.preload=function(){this.LE.preload()},t.prototype.seek=function(t){this.LE.seek(t)},t.prototype.disableControls=function(){this.LE.disableControls()},t.prototype.enableControls=function(){this.LE.enableControls()},t.prototype.enableCC=function(t){this.LE.enableCC(t)},t.prototype.disableCC=function(){this.LE.disableCC()},t.prototype.isPlayMode=function(){return this.LE.isPlayMode()},t.prototype.getPlaybackState=function(){return this.LE.getPlaybackState()},t.prototype.isLoading=function(){return this.LE.isLoading()},t.prototype.getDuration=function(){return this.LE.duration},t.prototype.getRawDuration=function(){return this.LE.rawDuration},t.prototype.getCurrentTime=function(){return this.LE.currentTime},t.prototype.getRawCurrentTime=function(){return this.LE.rawCurrentTime},t.prototype.getTimeRemaining=function(){return this.getDuration()-this.getCurrentTime()},t.prototype.setFullscreen=function(t){this.LE.fullscreen=t},t.prototype.getFullscreen=function(){return this.LE.fullscreen},t.prototype.setVolume=function(t,i){void 0===i&&(i=!1),t=(t=t<0?0:t)>1?1:t,this.LE.setVolume(t,i)},t.prototype.getVolume=function(){return this.LE.volume},t.prototype.setMute=function(t){this.LE.mute=t},t.prototype.getMute=function(){return this.LE.mute},t.prototype.setLoop=function(t){this.LE.loop=t},t.prototype.setContinuousPlay=function(t){this.LE.continuousPlay=t},t.prototype.resumeContinuousPlay=function(){this.LE.resumeContinuousPlay(this.PG(null,e.REQUEST_TYPES.CONTINUOUS))},t.prototype.getCurrentDate=function(){return this.LE.currentDate},t.prototype.setAudioLanguage=function(t){},t.prototype.PG=function(t,i){(t=t||{}).requestAction=t.requestAction||i;var n=t&&s.default.isValidRequestAction(t.requestAction);return{type:e.REQUEST_TYPES.API,action:n?t.requestAction:null}},t}();i.default=o},3072:function(t,i,n){"use strict";var e,r=this&&this.__spreadArrays||function(){for(var t=0,i=0,n=arguments.length;i<n;i++)t+=arguments[i].length;var e=Array(t),r=0;for(i=0;i<n;i++)for(var s=arguments[i],o=0,u=s.length;o<u;o++,r++)e[r]=s[o];return e};Object.defineProperty(i,"__esModule",{value:!0});var s,o=n(1962),u=n(1962);!function(t){t.AD_BREAK_ENDED="adBreakEnded",t.AD_BREAK_ITEM_CURRENT="adBreakItemCurrent",t.AD_BREAK_ITEM_PLAYBACK_STARTED="adBreakItemPlaybackStarted",t.AD_BREAK_ITEM_ENDED="adBreakItemEnded",t.AD_BREAK_ITEM_ERROR="adBreakItemError",t.AD_BREAK_ITEM_SKIPPED="adBreakItemSkipped",t.AD_BREAK_ITEM_CLICKED="adBreakItemClicked",t.AD_BREAK_STARTED="adBreakStarted",t.AD_METRICS="adMetrics",t.AIRPLAY_AVAILABILITY_CHANGE="airplayAvailabilityChange",t.AIRPLAY_CONNECTION_STATE_CHANGE="airplayConnectionStateChange",t.BEACON_SEND="beaconSend",t.BITRATE_CHANGE="bitrateChange",t.BUFFERING_START="bufferingStart",t.BUFFERING_END="bufferingEnd",t.CAST_AVAILABILITY_CHANGE="castAvailabilityChange",t.CAST_CONNECTED_STATE_CHANGE="castConnectedStateChange",t.CC_AVAILABLE="mediaItemCcAvailable",t.CC_UI_TOGGLE="ccUiToggle",t.CC_LANGUAGE_CHANGE="ccLanguageChange",t.CC_UPDATE_STYLE="ccUpdateStyle",t.CC_SETTINGS="ccSettings",t.CMS_API_CALLED="cmsApiCalled",t.CONTROLS_AUDIO_CHANGE="controlsAudioChange",t.CTRL_PLAYPAUSE="ctrlPlayPause",t.CTRL_SEEK="ctrlSeek",t.CTRL_VOLUME="ctrlVolume",t.CTRL_SETTINGS="ctrlSettings",t.CTRL_CUSTOM_ELEMENT="ctrlCustomElem",t.CTRL_PLAYREQUEST="ctrlPlayRequest",t.CTRL_REPLAY="ctrlReplay",t.CUEPOINT_STARTED="cuepointStarted",t.CUEPOINT_STOPPED="cuepointStopped",t.CUEPOINT_DETECTED="cuepointDetected",t.DURATION_CHANGE="durationChange",t.KEY_CHANGE_VOLUME="keyChangeVolume",t.LOADING_BEGIN="loadingBegin",t.LOADING_END="loadingEnd",t.MARKERS_RECEIVED="markersReceived",t.MEDIA_ITEM_ADDED="mediaItemAdded",t.MEDIA_ITEM_CURRENT="mediaItemCurrent",t.MEDIA_ITEM_COMPLETE="mediaItemComplete",t.MEDIA_ITEM_ERROR="mediaItemError",t.MEDIA_ITEM_METADATA="mediaItemMetadata",t.MEDIA_ITEM_NEED_SOURCE="mediaItemNeedSource",t.MEDIA_ITEM_REMOVED="mediaItemRemoved",t.METADATA_READY="metadataReady",t.MULTI_AUDIO_AVAILABLE="multiAudioAvailable",t.NIELSEN_REQUIRED="nielsenRequired",t.PLAYBACK_COMPLETE="playbackComplete",t.PLAYBACK_STOPPED="playbackStopped",t.PLAYBACK_ERROR="playbackError",t.PLAYBACK_PAUSE="playbackPause",t.PLAYBACK_BLOCKED="playbackBlocked",t.PLAYBACK_PROGRESS="playbackProgress",t.PLAYBACK_READY="playbackReady",t.PLAYBACK_REQUEST="playbackRequest",t.PLAYBACK_RESUMED="playbackResumed",t.PLAYBACK_SEEK_COMPLETE="playbackSeek",t.PLAYBACK_SEEKING="playbackSeeking",t.PLAYBACK_START="playbackStart",t.PLAYBACK_STALLED="playbackStalled",t.PLAYBACK_TIME_UPDATE="playbackTimeUpdate",t.PLAYBACK_TIMEOUT="playbackTimeout",t.PLAYER_DOCKED_CHANGE="playerDockedChange",t.PLAYER_DIMENSION_CHANGE="playerDimensionChange",t.PLAYER_ERROR="playerError",t.PLAYER_FULLSCREEN_CHANGE="fullscreenChange",t.PLAYER_INFO="playerInfo",t.PLAYER_MUTE_CHANGE="muteChange",t.PLAYER_READY="playerReady",t.PLAYER_RENDERED="render",t.PLAYER_VIEWPORT_CHANGE="playerViewportChange",t.PLAYER_VOLUME_CHANGE="volumeChange",t.PLAYER_WARNING="playerWarning",t.PLAYLIST_POSITION_CHANGE="playlistPositionChange",t.PLAYLIST_COMPLETE="playlistComplete",t.RECOVERY_METADATA_READY="recoveryMetadataReady",t.START_SCREEN_RENDERED="startScreenRenderered",t.UI_INTERACT="uiInteract",t.VIDEO_STARTED="video-started",t.VIDEO_REQUEST="videoRequest",t.SEG_INFO_AVAILABLE="segInfoAvailable",t.SEGMENT_FIRST_BYTE_LOADED="segmentFirstByteLoaded",t.THREE_SIXTY_INTERACT="threeSixtyInteract",t.THREE_SIXTY_PIE_INTERACT="threeSixtyPieInteract",t.TIMED_METADATA_RECEIVED="timedMetadataReceived",t.RENDERER_READY="rendererReady",t.STREAM_SYNCH_COMPLETE="streamsynchComplete",t.STREAM_SYNCH_STRATEGY_APPLIED="streamsynchStrategyApplied",t.DATERANGE_STARTED="daterangestarted",t.DATERANGE_ENDED="daterangeended",t.INVALID_SYNC_OFFSET="invalidSyncOffset"}(s=i.ExternalEvt||(i.ExternalEvt={}));var h=((e={})[s.AD_BREAK_ENDED]=o.AD_BREAK_ENDED,e[s.AD_BREAK_ITEM_CLICKED]=o.AD_BREAK_ITEM_CLICKED,e[s.AD_BREAK_ITEM_CURRENT]=o.AD_BREAK_ITEM_CURRENT,e[s.AD_BREAK_ITEM_PLAYBACK_STARTED]=o.AD_BREAK_ITEM_PLAYBACK_STARTED,e[s.AD_BREAK_ITEM_ENDED]=o.AD_BREAK_ITEM_ENDED,e[s.AD_BREAK_ITEM_ERROR]=o.AD_BREAK_ITEM_ERROR,e[s.AD_BREAK_ITEM_SKIPPED]=o.AD_BREAK_ITEM_SKIPPED,e[s.AD_BREAK_STARTED]=o.AD_BREAK_STARTED,e[s.AD_METRICS]=o.AD_METRICS,e[s.CC_LANGUAGE_CHANGE]=o.CCEvent.LANGUAGE_CHANGE,e[s.CC_SETTINGS]=o.CCEvent.SETTINGS,e[s.CC_UI_TOGGLE]=o.CCEvent.UI_TOGGLE,e[s.CC_UPDATE_STYLE]=o.CCEvent.UPDATE_STYLE,e[s.CMS_API_CALLED]=o.API_CALLED,e[s.CONTROLS_AUDIO_CHANGE]=o.CONTROLS_AUDIO_CHANGE,e[s.CTRL_PLAYPAUSE]=o.CTRL_PLAYPAUSE,e[s.CTRL_PLAYREQUEST]=o.CTRL_PLAYREQUEST,e[s.CTRL_REPLAY]=o.CTRL_REPLAY,e[s.CTRL_SEEK]=o.CTRL_SEEK,e[s.CTRL_SETTINGS]=o.CTRL_SETTINGS,e[s.CTRL_VOLUME]=o.CTRL_VOLUME,e[s.MEDIA_ITEM_ADDED]=o.MEDIA_ITEM_ADDED,e[s.MEDIA_ITEM_CURRENT]=o.MEDIA_ITEM_CURRENT,e[s.MEDIA_ITEM_COMPLETE]=o.MEDIA_ITEM_COMPLETE,e[s.MEDIA_ITEM_ERROR]=o.MEDIA_ITEM_ERROR,e[s.MEDIA_ITEM_METADATA]=o.MEDIA_ITEM_METADATA,e[s.MEDIA_ITEM_NEED_SOURCE]=o.MEDIA_ITEM_NEED_SOURCE,e[s.MEDIA_ITEM_REMOVED]=o.MEDIA_ITEM_REMOVED,e[s.METADATA_READY]=o.METADATA_AVAILABLE,e[s.MULTI_AUDIO_AVAILABLE]=o.MULTI_LANGUAGES_AVAILABLE,e[s.PLAYBACK_COMPLETE]=o.PLAYBACK_COMPLETE,e[s.PLAYBACK_STOPPED]=o.PLAYBACK_STOPPED,e[s.PLAYBACK_PAUSE]=u.VideoEvent.PAUSE,e[s.PLAYBACK_BLOCKED]=u.VideoEvent.BLOCKED,e[s.PLAYBACK_PROGRESS]=o.PLAYBACK_PROGRESS,e[s.PLAYBACK_REQUEST]=o.PLAYBACK_REQUEST,e[s.PLAYBACK_RESUMED]=o.PLAYBACK_RESUMED,e[s.PLAYBACK_SEEKING]=u.VideoEvent.SEEKING,e[s.PLAYBACK_START]=o.PLAYBACK_STARTED,e[s.PLAYBACK_STALLED]=o.PLAYBACK_STALLED,e[s.PLAYBACK_TIME_UPDATE]=u.VideoEvent.TIMEUPDATE,e[s.PLAYER_DIMENSION_CHANGE]=o.PLAYER_DIMENSION_CHANGE,e[s.PLAYER_ERROR]=o.INTERNAL_ERROR,e[s.PLAYER_FULLSCREEN_CHANGE]=o.FULLSCREEN_CHANGE,e[s.PLAYER_INFO]=o.INTERNAL_INFO,e[s.PLAYER_WARNING]=o.WARNING,e[s.RECOVERY_METADATA_READY]=o.RECOVERY_METADATA_READY,e[s.SEG_INFO_AVAILABLE]=o.SEG_INFO_AVAILABLE,e[s.SEGMENT_FIRST_BYTE_LOADED]=o.SEGMENT_FIRST_BYTE_LOADED,e[s.START_SCREEN_RENDERED]=o.START_SCREEN_RENDERED,e[s.THREE_SIXTY_INTERACT]=o.THREE_SIXTY_INTERACT,e[s.THREE_SIXTY_PIE_INTERACT]=o.THREE_SIXTY_PIE_INTERACT,e[s.TIMED_METADATA_RECEIVED]=o.TIMED_METADATA_RECEIVED,e[s.VIDEO_REQUEST]=o.VIDEO_REQUEST,e[s.DATERANGE_STARTED]=o.DATERANGE_STARTED,e[s.DATERANGE_ENDED]=o.DATERANGE_ENDED,e[s.INVALID_SYNC_OFFSET]=o.INVALID_SYNC_OFFSET,e[o.OPSS_VISIBILITY_CHANGED]=o.OPSS_VISIBILITY_CHANGED,e[o.PLAYLIST_BOTTOM_HEIGHT_CHANGE]=o.PLAYLIST_BOTTOM_HEIGHT_CHANGE,e),a=function(){function t(t,i,n){this.PV=t,this.LE=i,this.wV=n,Object.keys(s).forEach((function(t){var i=s[t];h[i]||(h[i]=i)}))}return t.prototype.enablePublish=function(){var t=this;Object.keys(h).forEach((function(i){var n=h[i];t.wV.addEventListener(n,(function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var s=Array.prototype.slice.call(n,0),o=t.LE&&t.LE.getEventsDto()||{};s.push(o),setTimeout((function(){var n;(n=t.PV).publish.apply(n,r([i],s))}))}),t)}))},t.prototype.getAllExternalEvtNames=function(){return Object.keys(h)},t}();i.ExternalEvtAPI=a},726:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(){function t(t){this.LE=t,this.xG=this.LE.getPlaylist()}return t.prototype.getMediaItems=function(){return this.xG.getItems()},t.prototype.removeAllMediaItems=function(){var t=this.xG.size;this.xG.removeItems(0,t)},t.prototype.removeMediaItems=function(t){var i=this;t.forEach((function(t){var n=i.xG.getItemPosition(t.id);i.xG.removeItems(n,1)}))},t.prototype.insertMediaItems=function(t,i){if(Array.isArray(t)){for(var n=this.UG(t),e=i,r=0,s=t;r<s.length;r++){var o=s[r];this.xG.addItemAtIndex(o,e),e++}n&&this.LE.fetchMetadata()}},t.prototype.appendMediaItems=function(t){if(Array.isArray(t)){var i=this.UG(t);this.xG.addItems(t),i&&this.LE.fetchMetadata()}},t.prototype.getCurrentMediaItem=function(){return this.xG.getCurrentItem()},t.prototype.getMediaItemMarkers=function(t){var i=this.LE.mediaStore.getById(t);return i&&i.getMarkers()},t.prototype.setCurrentMediaItem=function(t){if(this.LE.mediaStore.get(t.id)){var i=this.xG.getItemPosition(t.id);this.xG.setPosition(i)}else this.xG.addItems([t]),this.LE.fetchMetadata(),this.xG.setPosition(this.xG.size-1)},t.prototype.setMediaItemTitle=function(t,i){var n=this.xG.getMediaItemById(t);n&&(n.title=i)},t.prototype.UG=function(t){var i=this.LE.mediaStore;return t.filter((function(t){var n=t.id;return null===i.get(n)})).length>0},t}();i.default=n},2079:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(954),r=function(){function t(t){this.LE=t}return t.prototype.getSize=function(){return this.VG().length},t.prototype.getPosition=function(){var t=this.LE.getPlaylist();return t?t.position:null},t.prototype.sendPrefetchInfo=function(t){return this.LE.sendPrefetchInfo(t)},t.prototype.setPosition=function(t){this.FG(t,"setPosition");var i=this.LE.autoplay,n=i?{type:e.REQUEST_TYPES.API,action:e.REQUEST_TYPES.AUTOPLAY}:null;this.LE.setPlaylistPosition(t,i,n)},t.prototype.setPositionById=function(t){var i=this.BG(t,"setPositionById"),n=this.LE.autoplay,r=n?{type:e.REQUEST_TYPES.API,action:e.REQUEST_TYPES.AUTOPLAY}:null;this.LE.setPlaylistPosition(i,n,r)},t.prototype.addItem=function(t){this.addItems([t])},t.prototype.addItems=function(t,i){if(Array.isArray(t)){var n=this.LE.getPlaylist();i&&n.removeItems(0,n.size),n.addItems(t);var e=t.map((function(t){var i=t.id;return n.getMediaItemById(i)}));e.length>0&&this.LE.fetchMetadata(e)}},t.prototype.setItems=function(t){this.addItems(t,!0)},t.prototype.getItems=function(){return this.zG()?this.zG().slice(0):null},t.prototype.getItemId=function(t){return this.FG(t,"getItemId"),this.zG()[t]},t.prototype.getCurrentItemId=function(){var t=this.LE.getCurrentMediaItem();return t?t.id:null},t.prototype.getCurrentItem=function(){var t=this.LE.getCurrentMediaItem();return t?this.getItemById(t.id):null},t.prototype.getCurrentItemTitle=function(){var t=this.getCurrentItem();return t?t.title:null},t.prototype.getCurrentItemLiveStatus=function(){var t=this.getCurrentItem();return t?t.isLive:null},t.prototype.getCurrentItemDescription=function(){var t=this.getCurrentItem();return t?t.description:null},t.prototype.getCurrentItemProviderName=function(){var t=this.getCurrentItem();return t&&t.provider?t.provider.name:null},t.prototype.getCurrentItemMarkers=function(){var t=this.LE.getCurrentMediaItem();return t&&t.videoMarkers||null},t.prototype.getItem=function(t){return this.FG(t,"getItem"),this.getItemById(this.zG()[t])},t.prototype.getItemById=function(t){var i=this,n=this.LE.mediaStore;if(!n)return null;var e=n.getById(t);return e?{id:e.id,mimetype:e.mimetype,title:e.title,description:e.description,duration:e.duration,publishTime:e.publishTime,provider:e.provider,credits:e.credits,shareUrl:e.shareUrl,setShareUrl:function(t){i.shareUrl=t,e.shareUrl=t},thumbnail:e.thumbnail,visualSeek:e.visualSeek,isLive:e.isLive(),closedCaptions:e.closedCaptions,streams:e.streams,videoMarkers:e.videoMarkers,viewCount:e.viewCount,languages:e.getMultiLanguages(),license:e.license}:null},t.prototype.getIndexForId=function(t){return this.zG().indexOf(t)},t.prototype.removeItem=function(t){this.FG(t,"removeItem"),this.LE.removePlaylistItems(t,1)},t.prototype.removeItems=function(t,i){var n=this.VG();if(!(t in n)||!(t+i-1 in n))throw new Error("removeItems called with invalid position/count");this.LE.removePlaylistItems(t,i)},t.prototype.removeItemById=function(t){var i=this.BG(t,"removeItemById");this.LE.removePlaylistItems(i,1)},t.prototype.removeItemsById=function(t){var i=this;t.forEach((function(t){i.removeItemById(t)}))},t.prototype.clear=function(){this.LE.removePlaylistItems(0,this.VG().length)},t.prototype.VG=function(){return this.LE.getPlaylistItems()},t.prototype.zG=function(){return this.LE.getPlaylistItemIds()},t.prototype.FG=function(t,i){if(!(t in this.VG()))throw new Error(i+" called with invalid position")},t.prototype.BG=function(t,i){var n=this.zG().indexOf(t);if(-1===n)throw new Error(i+" called with id not in playlist");return n},t}();i.default=r},3454:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s,o=n(7403),u=n(9847),h=n(3072),a=n(1962),c=n(4685),f=n(742),l=n(4986),v=n(6342),d=n(7207),p="en-us";i.CC_LOCAL_STORAGE="yvpCC",function(t){t.srt="srt",t.vtt="vtt"}(s||(s={}));var m,b={none:"",dropshadow:"2px 1px 1px rgba(0, 0, 0, 1)",raised:"3px 3px 4px rgba(0, 0, 0, 0.75)",depressed:"0px -4px 4px rgba(0, 0, 0, 0.54)",uniform:"-2px -2px 0 #000, -2px 2px 0 #000, -2px 0 0 #000, 2px -2px 0 #000, 2px 2px 0 #000, 2px 0 0 #000, 0 -2px 0 #000, 0 2px 0 #000"},g=Math.floor((Math.pow(2,33)-1)/90);!function(t){t.CC_AVAILABILITY_UPDATE="ccAvailabilityUpdate",t.CC_LIST_FETCHED="ccListFetched",t.CC_LIST_FETCHED_MOBILE="ccListFetchedMobile",t.TOGGLE_SIMPLE_CC_CONTROLS="ccToggleSimpleCcControls"}(m=i.CCControllerEvent||(i.CCControllerEvent={}));var y=function(t){function n(i,n,e){var r=t.call(this,"CC Controller")||this;r.GG=null,r.wV=i,r._m=n,r.HG=e,r.YG=r._m.ccUserPreferences||{},r.qG(),r.wV.addEventListener(a.VideoEvent.PLAYING,r.onMediaItemPlaybackStarted,r),u.userAgent.tv||r.wV.addEventListener(a.AD_BREAK_ENDED,r.onAdBreakEnded,r),r.wV.addEventListener(a.PLAYBACK_PROGRESS,r.DV,r),r.wV.addEventListener(a.FULLSCREEN_CHANGE,r.WG,r),r.wV.addEventListener(h.ExternalEvt.PLAYER_VIEWPORT_CHANGE,r.WG,r),r.wV.addEventListener(a.VTT_SEGMENT_LOADED,r.QG,r),r.wV.addEventListener(a.CCEvent.LANGUAGE_CHANGE,r.onLanguageChange,r),r.wV.addEventListener(a.CCEvent.UPDATE_STYLE,r.updateCCStyle,r),r.wV.addEventListener(a.CCEvent.POSITION_CHANGE,r.ZG,r),r.wV.addEventListener(a.CCEvent.POSITION_FLOAT,r.XG,r),r.wV.addEventListener(a.CCEvent.USER_STYLE_PREFERENCES_CHANGE,r.$G,r),r.wV.addEventListener(a.SUBTITLE_TRACK_RECEIVED,r.JG,r),r.wV.addEventListener(a.AD_SUBTITLE_TRACK_ADDED,r.KG,r),r.tH=[],r.iH=null,r.nH=null,r.eH=p,r.rH={},r.sH=document.createElement("div"),v.default.classList(r.sH).add("vp-cc-element"),r.oH=document.createElement("span"),r.sH.appendChild(r.oH),r.uH=r.YG.fontSize,r.updateCCStyle();var s=r.HG.getMainElement();return s&&s.appendChild(r.sH),u.userAgent.tv&&(r.hH=new d.default(r.wV,r._m)),r.aH=!1,r._m.ccOnMute&&r._m.mute&&(r.aH=!0),r.cH="",r}return r(n,t),n.saveCCSettingsToLocalStorage=function(t){var n=f.LocalStorage.get(i.CC_LOCAL_STORAGE)||{};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);f.LocalStorage.put(i.CC_LOCAL_STORAGE,n)},n.getLanguageForCode=function(t){(t=t.toLowerCase().split("-")).length>1&&(t.pop(),t=t.join("-"));return{id:"Bahasa Indonesia",ms:"Bahasa Melayu",cs:"čeština",da:"dansk",de:"Deutsch",et:"eesti",en:"English",es:"español",fil:"Filipino",fr:"français",hr:"hrvatski",it:"italiano",lv:"latviešu",lt:"lietuvių",hu:"magyar",nl:"Nederlands",nb:"norsk bokmål",pl:"polski",pt:"português",ro:"română",sk:"slovenčina",sl:"slovenščina",fi:"suomi",sv:"svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",bg:"български",ru:"русский","sr-cyrl":"Српски",uk:"українська",he:"‎עברית‏‎",ar:"‎العربية‏‎",mr:"मराठी",hi:"हिन्दी",bn:"বাংলা",gu:"ગુજરાતી",ta:"தமிழ்",te:"తెలుగు",kn:"ಕನ್ನಡ",ml:"മലയാളം",th:"ไทย",ur:"اردو زبان",ko:"한국어","zh-hans":"简体中文","zh-hant":"繁體中文",ja:"日本人"}[t]},n.prototype.onMediaItemLoaded=function(t){if(t){if(this.iH&&this.iH.id!==t.id&&delete this.rH[this.iH.id],this.iH=t,this.fH=t.isLive(),!this.rH[t.id]){var i={ccAvailable:!1,vttPresent:!1,parsedCaptions:null};this.rH[t.id]=i,this.lH(t)?(i.vttPresent=!0,this.vH(!0)):(i.ccAvailable=!0,i.vttPresent=!1,this.dH=null,this.publish(m.CC_AVAILABILITY_UPDATE,!0),this.pH(t.closedCaptions))}this.hH&&this.hH.onMediaItemLoaded(t)}},n.prototype.destroy=function(){this.rH=null},n.prototype.enableAndPersist=function(t){this.mH(!0,t)},n.prototype.disable=function(){this.bH(!1)},n.prototype.disableAndPersist=function(){this.bH(!0)},n.prototype.enable=function(t){this.mH(!1,t)},n.prototype.toggleFromUI=function(t,i){!1===i?t?this.enable():this.disable():t?this.enableAndPersist():this.disableAndPersist()},n.prototype.onAdPlaybackStarted=function(t){var i=this;u.userAgent.tv||window.setTimeout((function(){i.nH=t}),0)},n.prototype.onAdPlaybackProgress=function(t){var i=t.currentTime,n=t.duration;if(this.nH){var e=this.nH.adId||this.nH.id||null;e&&this.gH(e,i,n)}},n.prototype.onAdBreakEnded=function(){this.yH()||this.vH(!0),this.resetCC()},n.prototype.resetCC=function(){this.nH=null,this.yH()&&this.wH()},n.prototype.onMediaItemPlaybackStarted=function(){this.resetCC()},n.prototype.onMediaItemPlaybackEnded=function(){this.disable()},n.prototype.onLanguageChange=function(t){this.enableAndPersist(t)},n.prototype.updateCCStyle=function(){if(this.sH){var t=v.default.cssHexToRgb(this.YG.bgColor)||{r:0,g:0,b:0},i=0===this.YG.bgOpacity?"transparent":"rgba("+t.r+","+t.g+","+t.b+","+this.YG.bgOpacity+")",n=b[this.YG.fontEffect];this.sH.style.fontFamily=this.YG.fontName,this.WG(),this.sH.style.color=this.YG.fontColor,this.oH.style.backgroundColor=i,this.sH.style.textShadow=n,this.ZG("top"===this.YG.ccPos),u.userAgent.tv&&(u.userAgent.samsung&&this._H(),Object.assign(this.sH.style,{position:"absolute",width:"100%",textAlign:"center",bottom:"14%",zIndex:"30"}))}},n.prototype.qG=function(){var t=f.LocalStorage.get(i.CC_LOCAL_STORAGE),n=t&&t.ccSettings;if(n)for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&!l.isNullOrUndefined(n[e])&&(this.YG[e]=n[e])},n.prototype.wH=function(){var t,i,n=[p],e=this.EH(),r=e?this.rH[e]:null;if(this.tH&&this.tH.length&&(n=this.tH.map((function(t){return t.lang}))),i=this.dH&&this.dH.lang||this.YG.lang,this.OH(!1),r&&!r.hasNonNativeCC){var s=r&&r.tracks||null;s&&s.length&&(n=s.map((function(t){return t.language})),i=this.AH&&this.AH.language||this.YG.lang,this.OH(!0))}this.publish(m.CC_LIST_FETCHED,{langList:n,selectedLang:i});var o=this.YG.show||this.aH;null===(t=this.HG.controls)||void 0===t||t.updateClosedCaptionButtonState(o),this.publish(m.CC_AVAILABILITY_UPDATE,!0),(this.YG.show||this.aH)&&this.enable()},n.prototype.EH=function(){var t,i,n=this._m.playbackState;return n&&n.playingItem&&n.playingItem.adBreakItemId?t=n.playingItem.adBreakItemId:(i=this._m.playlist.getCurrentItem())&&(t=i&&i.id),t},n.prototype.OH=function(t){this.publish(m.TOGGLE_SIMPLE_CC_CONTROLS,t)},n.prototype.mH=function(t,i){var n=this,e=this.EH(),r=e?this.rH[e]:null;if(!r||!r.ccAvailable)return!1;var s=function(){var e=r.tracks||[];return!(!e||e.length<1)&&(n.AH=n.SH(r,i),!!n.AH&&(e.forEach((function(t){t===n.AH?t.mode="showing":t.mode="hidden"})),n.TH({show:!0,lang:n.AH.language},t),!0))};if(r.vttPresent||u.userAgent.ios){if(v.default.classList(this.sH).remove("vp-hide"),v.default.classList(this.sH).add("vp-show"),this.fH&&v.default.classList(this.sH).add("vp-live-cc"),r&&r.hasNonNativeCC)return this.TH({show:!0,lang:p},t),!0;var o=s();return o||this.publish(m.CC_AVAILABILITY_UPDATE,!1),o}return this.dH=this.IH(i),this.dH||(this.dH=this.IH(this.YG.lang)||this.tH[0]),!!(u.userAgent.desktop||u.userAgent.tv||u.userAgent.android)&&(this.jH(this.dH,(function(i){i?(r.parsedCaptions=n.dH.parsedCC,v.default.classList(n.sH).remove("vp-hide"),v.default.classList(n.sH).add("vp-show"),n.TH({show:!0,lang:n.dH.lang},t)):s()})),!0)},n.prototype.IH=function(t){for(var i,n=0,e=this.tH;n<e.length;n++){var r=e[n];if(t&&r&&r.lang&&r.lang.toLowerCase()===t.toLowerCase().replace("_","-"))return r;r.lang===p&&(i=r)}return i},n.prototype.jH=function(t,i){var n=this;if(t){var e=this.EH(),r=e?this.rH[e]:null,o=t.format||s.vtt;if(r&&t){var h={url:t.url};if(u.userAgent.ie&&u.userAgent.ie<10&&(h.cors=!0),t.parsedCC)return i&&i(!0);f.Loader.ajax(t.url,{context:this,failureHandler:function(t){n.vH(),i&&i(!1)},successHandler:function(e){o===s.srt?r.parsedCaptions=t.parsedCC=n.MH(e):o===s.vtt&&(r.parsedCaptions=t.parsedCC=n.NH(e||"",0,!1)),r.parsedCaptions&&(r.hasNonNativeCC=!0,n.iH&&n.iH.setCCAvailability(!0),i&&i(!0)),i&&i(!1)}})}else i&&i(!1)}else i&&i(!1)},n.prototype.vH=function(t){if(this.publish(m.CC_AVAILABILITY_UPDATE,!1),this.dH=null,this.AH=null,this.disable(),t){var i=this.EH(),n=i?this.rH[i]:null;n&&(n.ccAvailable=!1),this.tH=[]}},n.prototype.bH=function(t){var i=this.EH(),n=i?this.rH[i]:null;return this.TH({show:!1},t),this.fH&&!this._m.playbackState.ad||!n||n.vttPresent||(n.parsedCaptions=null),n&&n.tracks&&n.tracks.forEach((function(t){t.mode="hidden"})),v.default.classList(this.sH).remove("vp-show"),v.default.classList(this.sH).add("vp-hide"),!0},n.prototype.TH=function(t,i){t||(t={});var e=t&&t.show,r=t&&t.lang;this.wV.publish(a.CCEvent.TOGGLE,e),i&&(l.isBoolean(e)&&(this.YG.show=e,this.aH=e),r&&l.isString(r)&&(this.YG.lang=r),n.saveCCSettingsToLocalStorage({ccSettings:this.YG}))},n.prototype.DV=function(t,i,n){var e=this.iH&&this.iH.id||null;e&&!this.nH&&(this.fH?this.kH(e,i):this.gH(e,i,n))},n.prototype.kH=function(t,i){var n=this;if(t){var e=this.rH[t];if(e&&e.hasNonNativeCC&&this.RH(e),e&&e.parsedCaptions&&e.parsedCaptions.length){for(var r=0;r<e.parsedCaptions.length&&e.parsedCaptions[r].end<i;)r++;if(r>0&&(setTimeout((function(){e.parsedCaptions.splice(0,r)}),100),r>=e.parsedCaptions.length))return;var s=!1;if(e.parsedCaptions[r]&&(s=i>=e.parsedCaptions[r].begin&&i<=e.parsedCaptions[r].end),s){var o=e.parsedCaptions[r].text||"";this.LH(o,e.parsedCaptions[r].settings)}else this.DH||(this.DH=setTimeout((function(){n.LH(""),clearTimeout(n.DH),n.DH=null}),1e3))}else""!==this.oH.innerHTML&&this.LH("")}},n.prototype.gH=function(t,i,n){if(t){var e=this.rH[t];if(e&&e.hasNonNativeCC&&this.RH(e),e&&e.ccAvailable&&e.parsedCaptions&&e.parsedCaptions.length){for(var r=i/n,s=e.parsedCaptions.length,o=Math.floor(r*s);o>0&&o<s&&i<e.parsedCaptions[o].begin;)o--;for(;o<s&&i>e.parsedCaptions[o].end;)o++;var u=o>=0&&o<s;if(u=u&&e.parsedCaptions[o].begin<=i&&i<=e.parsedCaptions[o].end&&!!e.parsedCaptions[o].text){var h=e.parsedCaptions[o].text||"";this.LH(h,e.parsedCaptions[o].settings)}else this.LH("")}else this.LH("")}},n.prototype.LH=function(t,i){if(t!==this.cH)if(this.cH=t,t){if(this.oH.innerHTML=u.userAgent.tv?t:this.CH(t),i)for(var n=0,e=i;n<e.length;n++){var r=e[n].split(":"),s=r[0],o=r[1];"align"===s&&"start"===o?this.sH.style.textAlign="left":"line"!==s||this.YG.ccPos?"position"===s&&(this.sH.style.left=o,this.PH(),this.sH.style.right=""):this.sH.style.top=o}}else this.oH.innerHTML=""},n.prototype.PH=function(){var t=parseInt(getComputedStyle(this.sH).left,10),i=this._m.uiState.videoWidth-t-10+"px";this.sH.style.width=i},n.prototype.JG=function(t){if(t&&t.itemId){var i=t.itemId,n=this.rH[i];n||(n={ccAvailable:!1,vttPresent:!1,parsedCaptions:null,tracks:[]},this.rH[i]=n);var e=t.track;e&&(e.mode="hidden",n.ccAvailable=!0,n.tracks||(n.tracks=[]),n.tracks.push(e));var r=this.EH();r&&r===i&&this.wH()}},n.prototype.KG=function(t){var i=this;this.rH[t.itemId]={ccAvailable:!1,vttPresent:!1,parsedCaptions:null},this.tH.push(t.track),this.publish(m.CC_AVAILABILITY_UPDATE,!0),this.publish(m.CC_LIST_FETCHED,{langList:[t.track.lang],selectedLang:t.track.lang}),this.jH(t.track,(function(n){i.dH=i.IH(t.track.lang),i.dH.ccAvailable=!0,v.default.classList(i.sH).remove("vp-hide"),v.default.classList(i.sH).add("vp-show"),i.rH[t.itemId]=i.dH,i.wH(),i.TH({show:!0,lang:i.dH.lang},!1),i.mH(!1,t.track.lang)}))},n.prototype.CH=function(t){var i;if(t){var n=t.split("<br/>");if(n.length>1){for(i=0;i<n.length;i++)n[i].trim()&&(n[i]="&nbsp;"+n[i]+"&nbsp;",i<n.length-1&&(n[i]+="<br/>"));return n.join("")}t=t.trim(),this.oH.innerHTML=t;var e=Math.floor(this.oH.offsetHeight/(this.uH+2)),r=[],s=0,o=void 0,u=void 0;for(i=0;i<e;i++)(o=i===e-1)?u=t.length:(u=Math.floor(t.length/e*(i+1)),/\s/.test(t.charAt(u))||(u=t.indexOf(" ",t.lastIndexOf(" ",u)))),u>s&&r.push("&nbsp;"+t.substring(s,u)+"&nbsp;"+(o?"":"<br/>")),s=u+1;return r.join("")}return t},n.prototype.RH=function(t){(t&&t.tracks||[]).forEach((function(t){t.mode="hidden"}))},n.prototype.$G=function(){this.updateCCStyle()},n.prototype.WG=function(t){var i,n=this,e=0,r=this.HG.getMainElement();r&&(e=r.offsetWidth);var s=Math.ceil(this.YG.fontSize*(e/640));if(e>640?s=Math.ceil(.8*s):e<640?s<10&&(s=10):s=this.YG.fontSize,this.uH=s,this.sH.style.fontSize=this.uH+"px",u.userAgent.ios){var o=this.EH(),h=null===(i=o?this.rH[o]:null)||void 0===i?void 0:i.tracks;if(!0===t){if(!h||0===h.length)return;this.GG=null,this.GG=setInterval((function(){var t,i=!1;h.forEach((function(t){i="showing"===t.mode})),null===(t=n.HG.controls)||void 0===t||t.updateClosedCaptionButtonState(i)}),1e3)}else!1===t&&(this.GG&&window.clearInterval(this.GG),this.GG=null)}},n.prototype.QG=function(t,i){if(t){var n=t.itemId;if(n){var e=this.rH[n];if(e||(e={ccAvailable:!1,vttPresent:!1,parsedCaptions:null},this.rH[n]=e),e.hasNonNativeCC=!0,!e.parsedCaptions||!e.ccAvailable){e.parsedCaptions=e.parsedCaptions||[],e.vttPresent=!0,e.ccAvailable=!0;var r=this._m.playlist.getMediaItemById(n);r&&r.setCCAvailability(!0);var s=this.EH();s&&s===n&&this.wH()}if(e.vttPresent){var o=t.adjustedTime?t.adjustedTime:0,u=this.NH(t.data||"",o,i);e.parsedCaptions=this.xH(e.parsedCaptions,u)}}}},n.prototype.xH=function(t,i){if(t&&i){if(!t.length)return i;for(var n=0;n<i.length;){for(var e=t.length-1;e>=0;){if(t[e].begin===i[n].begin){t.splice(e,1,i[n]);break}if(!(t[e].begin>i[n].begin)){t.splice(e+1,0,i[n]);break}e--}-1===e&&t[0].begin>i[n].begin&&t.unshift(i[n]),n++}return t}},n.prototype.lH=function(t){if(!t)return!1;if(this.fH||!this.fH&&t.rendererType===c.RendererType.HTML5_HLS){var i=t.getSubtitleStreams();if(i&&i.length>0)return!0}return!t.closedCaptions||!t.closedCaptions.length},n.prototype.pH=function(t){var i=this;this.UH((function(t){i.tH=t,i.tH.length>0?(u.userAgent.mobile?i.publish(m.CC_LIST_FETCHED_MOBILE,{langList:i.tH,selectedLang:i.YG.lang}):(i.publish(m.CC_LIST_FETCHED,{langList:i.tH.map((function(t){return t.lang})),selectedLang:i.YG.lang}),i.iH&&i.iH.setCCAvailability(!0)),i.YG.show||i.aH?i.enable(i.YG.lang):i.disable()):i.vH(!0)}),t,u.userAgent.desktop||u.userAgent.tv)},n.prototype.UH=function(t,i,n){t(i.filter((function(t){return"text/vtt"===t.content_type})))},n.prototype.MH=function(t){var i=" --\x3e ",n=[],e=t.split(/\r\n|\r|\n/),r=function(t){var i=null,n=(t=t.replace(",",".")).split(":");try{i=3600*Number(n[0])+60*Number(n[1])+Number(n[2])}catch(t){return null}return i};try{if(e.length<=1)throw new Error("Invalid SRT document: no data found");var s=void 0,o=void 0,u=void 0,h=void 0,a=0;for(s=0;s<e.length;s++){var c={},f=h=+(o=e[s]);if(""!==o)if(!isNaN(f)&&a<f)if(-1!==(o=e[++s]).indexOf(i)){if(u=o.split(i),c.begin=u[0].trim(),c.end=u[1].trim(),(o=e[++s])&&""!==o){c.text=o,e[s+1]&&""!==e[s+1]&&(c.text+="<br />"+e[s+1],s++);var l=c.begin,v=void 0;for(c.end?v=c.end:c.dur&&(v=l+c.dur),n.push({begin:r(l),end:r(v),text:c.text});""!==e[s]&&s<e.length;)s++;a=h}}else for(;""!==e[s]&&s<e.length;)s++;else for(;""!==e[s]&&s<e.length;)s++}}catch(t){}return n},n.prototype.NH=function(t,i,n){for(var e,r,s,o,h=t.split(/\r\n|\r|\n/),a=h.length,c=/((?:\d{2,}:)?\d{2}:\d{2}\.\d{2,3})\s+.+\s+((?:\d{2,}:)?\d{2}:\d{2}\.\d{2,3})/,f=[],l=0,v=0,d=0;d<a;d++)if(c.test(h[d])){if(v>0){for(s=h[r=d-1]&&h[r].trim(),o=h[r-1]&&h[r-1].trim(),""!==s&&""===o&&r--,e=v;e<=r;e++)f[l].text+=h[e]+(e+1<=r?"<br/>":"");l++}var p=h[d].match(c);if(!p)continue;!n||this.VH||u.userAgent.tizen||(this.VH=1e3*this.FH(p[1]));var m=1e3*this.FH(p[1]),b=1e3*this.FH(p[2]);n&&!u.userAgent.tizen?(m-=this.VH,b-=this.VH):(m=m%g+i,b=b%g+i),f[l]={begin:m/1e3,end:b/1e3,text:""},v=d+1;for(var y=[],w=h[d].split(/\s+/).filter((function(t){return t.length>0})),_=3;_<w.length;_++)y.push(w[_]);y.length>0&&(f[l].settings=y)}if(v>0&&v<a)for(e=v;e<a;e++)f[l].text+=h[e]+(e+2<a?"<br/>":"");return f},n.prototype.FH=function(t){var i,n,e=0;if(t)for(var r=(n=(i=t.split(":")).length)-1;r>=0;r--)e+=i[n-1-r]*Math.pow(60,r);return e},n.prototype.SH=function(t,i){var n,e=t&&t.tracks||[],r=function(t){e.some((function(i){var e=i.language;return!(!e||!t||e.toLowerCase()!==t.toLowerCase())&&(n=i,!0)}))};return r(i=i||this.YG.lang||p),!n&&this.YG.lang&&r(this.YG.lang),!n&&e[0]&&(n=e[0]),n},n.prototype.XG=function(t){var i=this.sH,n=this.EH(),e=n?this.rH[n]:null;e&&e.ccAvailable&&!v.default.classList(i).contains("vp-hide")&&("bottom"===this.YG.ccPos&&(t?(v.default.classList(i).remove("float"),v.default.classList(i).remove("bottom")):(v.default.classList(i).add("float"),v.default.classList(i).add("bottom"))))},n.prototype.yH=function(){var t=this.iH?this.rH[this.iH.id]:null;return t&&t.ccAvailable||!1},n.prototype.ZG=function(t){var i=this.sH;t?(v.default.classList(i).remove("bottom"),v.default.classList(i).add("top")):(v.default.classList(i).add("bottom"),v.default.classList(i).remove("top"))},n.prototype._H=function(){var t=b[this.YG.fontEffect],i=this.YG.windowBgColor&&v.default.cssHexToRgb(this.YG.windowBgColor)||{r:0,g:0,b:0},n=0===this.YG.windowBgOpacity?"transparent":"rgba("+i.r+","+i.g+","+i.b+","+this.YG.windowBgOpacity+")";this.sH.style.backgroundColor=n;var e=this.YG.fontColor&&v.default.cssHexToRgb(this.YG.fontColor)||{r:255,g:255,b:255},r=0===this.YG.fontOpacity?"transparent":"rgba("+e.r+","+e.g+","+e.b+","+this.YG.fontOpacity+")";this.oH.style.color=r;var s=this.YG.fontEdgeColor&&v.default.cssHexToRgb(this.YG.fontEdgeColor)||{r:255,g:255,b:255};switch(this.YG.fontEffect){case"dropshadow":case"raised":case"depressed":t=t.replace("rgba(0, 0, 0","rgba("+s.r+", "+s.g+", "+s.b);break;case"uniform":t=t.replace(/#000/g,this.YG.fontEdgeColor)}this.sH.style["text-shadow"]=t},n}(o.default);i.CCController=y},6618:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(3493);i.Command=e.default;var r=n(8619);i.MetadataLoadCommand=r.default;var s=n(4033);i.MoreItemsLoadCommand=s.default;var o,u,h=n(7196);i.SourceMetadataLoadCommand=h.default,function(t){t.CMD_SOURCE_METADATA_LOAD="SourceMetadataLoad",t.CMD_METADATA_LOAD="MetadataLoad",t.CMD_MORE_ITEMS_LOAD="MoreItemsLoad"}(o||(o={})),i.CmdName=o,function(t){t.CMD_COMPLETE="Complete",t.CMD_PROGRESS="Progress",t.CMD_ERROR="Error",t.CMD_INFO="Info"}(u||(u={})),i.CmdEvent=u},4802:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(6618);i.create=function(t,i,n){var r=e[t+"Command"];return r?new r(i,n):null}},4138:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(6342),r=n(6618),s=n(4802),o=function(){function t(t){for(var i in this.BH=t,this._p={},this._h={},r.CmdName)if(Object.prototype.hasOwnProperty.call(r.CmdName,i)){var n=r.CmdName[i];this._p[n]={}}}return t.prototype.destroy=function(){this.removeAllCommands(),this._p={}},t.prototype.executeCommand=function(t,i,n){var e=this.createCommand(t,i,n);return e&&e.execute(),e},t.prototype.createCommand=function(t,i,n){var o;try{(o=s.create(t,i,n))&&(o.pluginManager=this.BH)}catch(t){o=null}if(!o)return null;for(var u in o.key=e.default.guid(),r.CmdEvent)if(Object.prototype.hasOwnProperty.call(r.CmdEvent,u)){var h=r.CmdEvent[u],a="on"+t+h;n[a]&&(this._h[h+t+o.key]=o.addEventListener(h,n[a],n))}return this._p[t][o.key]=o,o},t.prototype.removeCommand=function(t){if(t){var i=this._p[t.cmdName];if(i[t.key]===t){if(delete i[t.key],t.client)for(var n in r.CmdEvent)if(Object.prototype.hasOwnProperty.call(r.CmdEvent,n)){var e=r.CmdEvent[n],s="on"+t.cmdName+e;t.client[s]&&(t.removeEventListener(e,this._h[e+t.cmdName+t.key]),delete this._h[e+t.cmdName+t.key])}t.destroy()}}},t.prototype.removeRelatedCommands=function(t){if(Object.prototype.hasOwnProperty.call(this._p,t)){var i=this._p[t];for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var e=i[n];e&&this.removeCommand(e)}}},t.prototype.removeAllCommands=function(){for(var t in this._p)Object.prototype.hasOwnProperty.call(this._p,t)&&this.removeRelatedCommands(t)},t.prototype.getCommand=function(t){var i=this._p[t];if(!i)return null;var n=Object.keys(i);return n.length<1?null:i[n[n.length-1]]},t}();i.default=o},3493:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s=function(t){function i(i,n){var e=t.call(this,"Command")||this;return e.cmdName="Command",e.data=i,e.client=n,e}return r(i,t),i.prototype.destroy=function(){t.prototype.destroy.call(this),this.data=null},Object.defineProperty(i.prototype,"pluginManager",{set:function(t){this.BH=t},enumerable:!0,configurable:!0}),i}(n(7403).default);i.default=s},8619:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s=n(6389),o=n(6120),u=n(1279),h=n(6342),a=n(3493),c=n(6618),f=function(t){function i(i,n){var e=t.call(this,i,n)||this;return e.cmdName=c.CmdName.CMD_METADATA_LOAD,e.N_=!1,e.pO=!1,e}return r(i,t),i.prototype.destroy=function(){this.pO=!0,this.cancel(),t.prototype.destroy.call(this)},i.prototype.execute=function(){if(!this.N_&&!this.pO){var t=this.data,i=t.autoplay,n=t.failoverCount,e=t.privacyConsent,r=t.mimetype,a=t.mediaItemDataArr,f=t.rendererCapabilities,l=t.rendererTypes,v=t.sessionId,d=t.thumbnailDimensions,p=t.tryCount,m=this.BH.getPlugin(u.PluginType.METADATA,r),b={autoplay:i,failoverCount:n,privacyConsent:e,rendererCapabilities:f,rendererTypes:l,sessionId:v,thumbnailDimensions:d,tryCount:p};if(m)this.zH=m,this.N_=!0,this.publish(c.CmdEvent.CMD_PROGRESS,this,a,o.ItemState.FETCHING),m.resolve(a,b,this);else{var g="No metadata plugin found for mimetype = "+r,y=h.default.createErr(s.ErrorGroup.Service,null,s.E_PLAYER,s.PLAYER_CODES.E_NO_PLUGIN_FOUND,g);this.publish(c.CmdEvent.CMD_ERROR,this,y)}}},i.prototype.cancel=function(){this.zH&&this.N_&&(this.zH.cancel(),this.N_=!1)},i.prototype.onProgress=function(t){this.N_&&!this.pO&&this.publish(c.CmdEvent.CMD_PROGRESS,this,t)},i.prototype.onComplete=function(t){this.N_&&!this.pO&&(this.N_=!1,this.publish(c.CmdEvent.CMD_COMPLETE,this,t))},i.prototype.onError=function(t){if(this.N_&&!this.pO&&(this.N_=!1,t.code&&t.code.length)){var i=h.default.createErr(t.group||s.ErrorGroup.Service,null,t.category||s.E_PLAYER,t.code||s.PLAYER_CODES.E_CMS_XHR_RESPONSE_ABSENT,t.message);this.publish(c.CmdEvent.CMD_ERROR,this,i)}},i.prototype.onApiCallInfo=function(t){t&&this.publish(c.CmdEvent.CMD_INFO,this,t)},i}(a.default);i.default=f},4033:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s=n(6389),o=n(1279),u=n(6342),h=n(3493),a=n(6618),c=function(t){function i(i,n){var e=t.call(this,i,n)||this;return e.cmdName=a.CmdName.CMD_MORE_ITEMS_LOAD,e.GH=null,e.N_=!1,e.pO=!1,e}return r(i,t),i.prototype.destroy=function(){this.pO=!0,this.cancel(),t.prototype.destroy.call(this)},i.prototype.execute=function(){if(!this.N_&&!this.pO){var t=this.data,i=t.cb,n=t.mimetype,e=t.reason,r=t.start,s=this.BH.getPlugin(o.PluginType.MORE_ITEMS,n);this.GH=i;var u={mimetype:n,reason:e,start:r};s&&(this.zH=s,this.N_=!0,s.resolve(u,this))}},i.prototype.cancel=function(){this.zH&&this.N_&&(this.zH.cancel(),this.N_=!1)},i.prototype.onComplete=function(t){this.N_&&!this.pO&&(this.N_=!1,this.publish(a.CmdEvent.CMD_COMPLETE,this,t))},i.prototype.onError=function(t){if(this.N_&&!this.pO&&(this.N_=!1,t&&t.code&&t.code.length)){var i=u.default.createErr(t.group||s.ErrorGroup.Service,null,t.category||s.E_PLAYER,t.code,t.message,"more items load failed");this.publish(a.CmdEvent.CMD_ERROR,this,i)}},i.prototype.onApiCallInfo=function(t){t&&this.publish(a.CmdEvent.CMD_INFO,this,t)},i.prototype.onPromisesResolved=function(t){this.GH&&this.GH(t)},i}(h.default);i.default=c},7196:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s=n(6389),o=n(6120),u=n(1279),h=n(6342),a=n(3493),c=n(6618),f=function(t){function i(i,n){var e=t.call(this,i,n)||this;return e.cmdName=c.CmdName.CMD_SOURCE_METADATA_LOAD,e.N_=!1,e.pO=!1,e}return r(i,t),i.prototype.destroy=function(){this.pO=!0,this.cancel(),t.prototype.destroy.call(this)},i.prototype.execute=function(){if(!this.N_&&!this.pO){var t=this.data,i=t.autoplay,n=t.failoverCount,e=t.privacyConsent,r=t.mimetype,a=t.mediaItemDataArr,f=t.rendererCapabilities,l=t.rendererTypes,v=t.sessionId,d=t.recovering,p=t.thumbnailDimensions,m=t.tryCount,b=t.playlistPosition,g=this.BH.getPlugin(u.PluginType.SOURCE_METADATA,r),y={autoplay:i,failoverCount:n,privacyConsent:e,rendererCapabilities:f,rendererTypes:l,sessionId:v,thumbnailDimensions:p,tryCount:m,playlistPosition:b};if(g)this.zH=g,this.N_=!0,this.publish(c.CmdEvent.CMD_PROGRESS,this,a,o.SourceState.FETCHING),!0===d?g.recover(a[0],y,this):g.resolve(a,y,this);else{var w="No source metadata plugin found for mimetype = "+r,_=h.default.createErr(s.ErrorGroup.Service,null,s.E_PLAYER,s.PLAYER_CODES.E_NO_PLUGIN_FOUND,w);this.publish(c.CmdEvent.CMD_ERROR,this,_)}}},i.prototype.cancel=function(){this.zH&&this.N_&&(this.zH.cancel(),this.N_=!1)},i.prototype.onProgress=function(t){this.N_&&!this.pO&&this.publish(c.CmdEvent.CMD_PROGRESS,this,t)},i.prototype.onComplete=function(t){this.N_&&!this.pO&&(this.N_=!1,this.publish(c.CmdEvent.CMD_COMPLETE,this,t))},i.prototype.onError=function(t){if(this.N_&&!this.pO&&(this.N_=!1,t.code&&t.code.length)){var i=h.default.createErr(t.group||s.ErrorGroup.Service,null,t.category||s.E_PLAYER,t.code,t.message);this.publish(c.CmdEvent.CMD_ERROR,this,this.data.mediaItemDataArr,i)}},i.prototype.onApiCallInfo=function(t){t&&this.publish(c.CmdEvent.CMD_INFO,this,t)},i}(a.default);i.default=f},954:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.CHROMECAST_RECEIVER_ID="84BB6CBA",function(t){t.CLICK="click",t.AUTOPLAY="autoplay",t.API="api",t.CONTINUOUS="continuous",t.HOVER="hover",t.PLAY="play",t.PAUSE="pause",t.SCROLL="scroll",t.SWIPE="swipe",t.BACKGROUND="background"}(i.REQUEST_TYPES||(i.REQUEST_TYPES={})),function(t){t.VOLUME="yvpVolume"}(i.LocalStorageKey||(i.LocalStorageKey={})),i.ID3_MATCH_PATTERN={JSON:/\{([\S\s]*)\}/,NIELSEN:/\bwww.nielsen.com.*(\/\d+){3}/},function(t){t.BOTTOM="bottom",t.RIGHT="right",t.HIDDEN="hidden"}(i.PLAYLIST_POS||(i.PLAYLIST_POS={})),function(t){t[t.WIDTH=604]="WIDTH",t[t.HEIGHT=340]="HEIGHT"}(i.HideBreakpointDimensions||(i.HideBreakpointDimensions={})),i.VIDEO_MAIN_ELEMENT_CLASS="vp-main"},3194:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s,o=n(7403),u=n(742),h=n(1962),a=n(2542),c=n(3277),f=n(8103),l=n(440),v=n(1279),d=n(4986);!function(t){t.AD_BREAK_NEED_RESOLVE="adBreakNeedResolve",t.AD_BREAK_ITEM_NEED_SOURCE="adBreakItemNeedSource",t.AD_BREAK_ITEM_PLAY="adBreakItemPlay",t.AD_BREAK_ITEM_PLAYING="adBreakItemPlaying",t.AD_BREAK_STARTED="adBreakStarted",t.AD_BREAK_ENDED="adBreakEnded",t.AD_BREAK_ITEM_STARTED="adBreakItemStarted",t.AD_BREAK_ITEM_ENDED="adBreakItemEnded",t.AD_BREAK_SKIP="adBreakSkip",t.AD_BREAK_FORCE_PLAY_MIDROLL="adBreakForcePlayMidroll",t.AD_CLIENT_COMPLETED="adClientCompleted",t.AD_CLIENT_TIMEOUT="adClientTimeout",t.CREATE_OVERLAY_CONTAINER="createOverlayContainer",t.AD_METRICS="adMetrics",t.AD_DIAGNOSTICS="adDiagnostics"}(s=i.AdPlaybackControllerEvent||(i.AdPlaybackControllerEvent={}));var p=function(t){function i(i,n){var e=t.call(this,"AdPlaybackController")||this;e._m=i,e.HH=n,e.YH=null,e.qH={},e.WH={},e.QH={},e.ZH={},e.XH={},e.$H={},e.JH={};var r=e._m.config.ads.timeout,s=r.load+r.start;return e.KH={},e.tY=new u.Timer(1e3*s,e.iY,e,1),e}return r(i,t),i.prototype.prepareAdsForItem=function(t){var i=t.refPlaybackId;if(t.adConfig&&t.adConfig.mimetype){var n=this.HH.getPlugin(v.PluginType.AD,t.adConfig.mimetype),e=this.nY(i,n);if(n&&e&&d.isAdResolverAdPlugin(n)){this.KH[i]={item:t,beginTS:Date.now()},this.eY({evt:"ad_fetch"},t);var r=this._m.playlist.position;n.fetchAdBreaks({refId:i,config:t.adConfig.value,pos:r})}}else this.nY(i,null)},i.prototype.startTracking=function(t){var i=this,n=t.refPlaybackId;n!==this.rY&&(this.sY(),this.oY(t),this.qH[n]={},this.WH[n]={},this.XH[n]=[],this.QH={},this.ZH={},this.uY=[],this.hY=null,this.aY=!1,this.YH=null,this.cY=null,this.fY=null,this.lY.adBreaks&&(this.tY.reset(),this.lY.adBreaks.forEach((function(n){i.vY(t,n)}))))},i.prototype.resolveAdBreaks=function(t,i){var n=this,e=t.refPlaybackId,r=this.qH[e]&&this.qH[e][i],s=this.$H[e];d.isAdResolverAdPlugin(s)&&r&&0!==r.length&&r.forEach((function(t){t.hasResolved()||t.error||n.QH[t.adBreakId]||n.ZH[t.adBreakId]||(n.QH[t.adBreakId]=t.mediaItem,s.resolveAdBreak(t.rawItemData))}))},i.prototype.getPlayingInstreamAd=function(){return this.YH||null},i.prototype.updatePlaybackProgress=function(t){var i=t.currentTime;if(t.playingItem===this.lY){var n=this.dY(i);if(n!==this.YH){var e=this.YH;this.YH=n,this.pY(e,n)}}},i.prototype.onMediaItemPlaybackEnded=function(t){},i.prototype.handleMediaItemSeeked=function(t,i,n){if(t===this.lY&&(n=d.isNumber(n)?n:0,t instanceof l.default&&!t.isLive()&&t.adBreaks.length)){for(var e=void 0,r=0,o=t.adBreaks;r<o.length;r++){var u=o[r];u.startOffset<=i&&u.type===f.AdBreakType.MIDROLL&&(e=u)}if(e&&e.active){var h=e.startOffset;h>=n&&h<i&&this.publish(s.AD_BREAK_FORCE_PLAY_MIDROLL,e)}}},i.prototype.playClientAdBreaks=function(t,i){var n=this;if(this.lY===t){this._m.playbackState.currentMediaType=i;var e=Object.keys(this.KH).map((function(t){return n.KH[t].item})).some((function(t){return t===n.lY}));if(this.mY(i,t),!e){var r=t.refPlaybackId,o=this.qH[r]&&this.qH[r][i]||[],u=this.WH[r]&&this.WH[r][i]||[];if(0===o.length&&0===u.length)return this.sY(),void this.publish(s.AD_CLIENT_COMPLETED,i,t);this.resolveAdBreaks(t,i),this.bY(t,i)}}},i.prototype.pauseClientAdStartTimer=function(){this.tY&&this.tY.stop()},i.prototype.resumeClientAdStartTimer=function(){var t=this.gY(),i=this.tY;t&&i&&!i.running&&i.start()},i.prototype.handleAdBreakResolved=function(t,i){t&&i&&(delete this.QH[i.adBreakId],this.vY(t,i),this.yY(t,[i])&&this.bY(t,i.type))},i.prototype.handleAdBreakItemPlaybackStarted=function(t){t.instream||(this.wY(),this.publish(s.AD_BREAK_ITEM_STARTED,t))},i.prototype.handleAdBreakItemEnded=function(t){this._Y(t,!1,!1)},i.prototype.handleAdBreakItemError=function(t){this._Y(t,!0,!1)},i.prototype.stopCurrentPlayback=function(t){this.publish(s.AD_BREAK_ENDED,t&&t.adBreak||null)},i.prototype.destroy=function(){var i=this;t.prototype.destroy.call(this),this.tY.destroy(),this.tY=null,Object.keys(this.JH).forEach((function(t){i.JH[t]()})),this.KH=null},i.prototype._Y=function(t,i,n){if(!t.instream){this.publish(s.AD_BREAK_ITEM_ENDED,t),this.hY=null;var e=t.adBreak,r=e.mediaItem;!i&&this._m.loop&&e.type===f.AdBreakType.NATIVE||(n||t===e.adBreakItems[e.adBreakItems.length-1])&&this.publish(s.AD_BREAK_ENDED,e),n||(this.aY=!1,this.bY(r,e.type))}},i.prototype.dY=function(t){for(var i=0,n=this.uY.length-1;i<=n;){var e=i+Math.floor((n-i)/2),r=this.uY[e];if(t>=r.startOffset&&t<r.endOffset)return r.adBreakItem;t>r.endOffset?i=e+1:n=e-1}return null},i.prototype.pY=function(t,i){if(i&&!t){if(i===i.adBreak.adBreakItems[0]){if(!i.adBreak.active)return this.YH=null,void this.publish(s.AD_BREAK_SKIP,i.adBreak,!0);this.publish(s.AD_BREAK_STARTED,i.adBreak)}this.publish(s.AD_BREAK_ITEM_STARTED,i)}!i&&t&&(this.publish(s.AD_BREAK_ITEM_ENDED,t),t===t.adBreak.adBreakItems[t.adBreak.adBreakItems.length-1]&&this.publish(s.AD_BREAK_ENDED,t.adBreak)),i&&t&&(this.publish(s.AD_BREAK_ITEM_ENDED,t),this.publish(s.AD_BREAK_ITEM_STARTED,i))},i.prototype.vY=function(t,i){var n=this,e=i.type,r=t.refPlaybackId;this.qH[r]=this.qH[r]||{},this.qH[r][e]=this.qH[r][e]||[],this.WH[r]=this.WH[r]||{},this.WH[r][e]=this.WH[r][e]||[],i.hasResolved()||i.error?i.adBreakItems.forEach((function(t,s){if(t.instream){var o=0===s?i.startOffset:n.uY[n.uY.length-1].endOffset;n.uY.push({adBreakItem:t,startOffset:o,endOffset:o+t.duration})}else n.WH[r][e].push(t)})):this.qH[r][e].push(i)},i.prototype.sY=function(){if(this.wY(),this.lY){var t=this.rY;this.KH&&this.KH[t]&&delete this.KH[t]}this.aY=!1,this.QH={},this.ZH={}},i.prototype.bY=function(t,i){var n=this;if(!this.aY){var e,r=t.refPlaybackId,o=this.WH[r]&&this.WH[r][i]||[],u=o.filter((function(t){return-1===(n.XH[r]||[]).indexOf(t.adBreakItemId)}));if(!(e=i===f.AdBreakType.NATIVE&&this._m.loop?o[0]:u[0]))return Object.keys(this.QH).length>0?void 0:(this.sY(),void this.publish(s.AD_CLIENT_COMPLETED,i,this.lY));this.aY=!0,this.XH[r]=this.XH[r]||[],this.XH[r].push(e.adBreakItemId),e===e.adBreak.adBreakItems[0]&&this.publish(s.AD_BREAK_STARTED,e.adBreak),this.eY({evt:"ad_play"},t),this.hY=e,this.publish(s.AD_BREAK_ITEM_PLAY,e)}},i.prototype.mY=function(t,i){this.wY(),this.cY=t,this.fY=i,this.tY.start()},i.prototype.iY=function(){var t=this.cY,i=this.fY;this.hY&&this._Y(this.hY,!0,!0),this.sY(),this.publish(s.AD_CLIENT_TIMEOUT,t,i)},i.prototype.wY=function(){this.tY.reset(),this.cY=null,this.fY=null},i.prototype.yY=function(t,i){var n=this;return!(t!==this.lY||t!==this.fY||!this.tY)&&i.some((function(t){return t.type===n.cY}))},i.prototype.EY=function(t,i){return!(t!==this.lY||t!==this.fY||!this.tY)},i.prototype.gY=function(){return!!this.cY},i.prototype.OY=function(t,i){for(var n,e,r=this,o=[],u=2;u<arguments.length;u++)o[u-2]=arguments[u];switch(i){case a.AdPluginEvent.AD_BREAK_RESOLVED:case a.AdPluginEvent.AD_BREAK_RESOLVE_ERROR:if(n=o[0],!(e=this.QH[n.adBreakId]))return;this.ZH[n.adBreakId]=e;var c=null;i===a.AdPluginEvent.AD_BREAK_RESOLVE_ERROR&&(c=new Error("Ad Plugin Resolve Error"));var l=e.updateAdBreak(n,this._m.adsRendererTypes,this._m.capabilities,c);this.handleAdBreakResolved(e,l);break;case a.AdPluginEvent.AD_SUBTITLES_FOUND:this.publish(h.AD_SUBTITLE_TRACK_ADDED,o[0]);break;case a.AdPluginEvent.AD_BREAK_PLAYING:this.publish(s.AD_BREAK_ITEM_PLAYING);break;case a.AdPluginEvent.AD_BREAKS_AVAILABLE:var v=o[0],p=this.KH[v.refId];if(delete this.KH[v.refId],p&&(e=p.item,this.eY({evt:"ad_fetched",latency:Date.now()-p.beginTS},e)),!p||!e||!v.refId)return;var m=v.adBreaks;m||(m=[]);var b=e.addAdBreaks(v.adBreaks);b.forEach((function(t){r.vY(e,t)})),e.adBreaks.some((function(t){return t.type===f.AdBreakType.NON_LINEAR}))&&d.isAdOverlayRendererAdPlugin(t)&&this.publish(s.CREATE_OVERLAY_CONTAINER,(function(i){i&&t.setNonlinearAdContainer(i)})),this.EY(e,b)?this.playClientAdBreaks(e,this.cY):this.resolveAdBreaks(e,f.AdBreakType.PREROLL);break;case a.AdPluginEvent.DIAGNOSTICS:var g=o[0];this.publish(s.AD_DIAGNOSTICS,g);break;case a.AdPluginEvent.METRICS:var y=o&&o[0],w=y&&y.evt;if("string"==typeof w){var _="object"==typeof y?Object.assign({},y):{evt:w};this.eY(_,this.lY)}}},i.prototype.nY=function(t,i){return!this.$H[t]&&(this.$H[t]=i,i&&(this.JH[i.mimetype]||(this.JH[i.mimetype]=c.listenEventDispatcherEvts(i,Object.keys(a.AdPluginEvent).map((function(t){return a.AdPluginEvent[t]})),this.OY.bind(this)))),!0)},i.prototype.oY=function(t){this.lY=t,this.rY=t.refPlaybackId},i.prototype.eY=function(t,i){void 0===t&&(t={}),i&&(t.prefetch=i.adConfigPrefetched?1:0),this.publish(s.AD_METRICS,t)},i}(o.default);i.AdPlaybackController=p},1372:function(t,i,n){"use strict";var e=this&&this.__spreadArrays||function(){for(var t=0,i=0,n=arguments.length;i<n;i++)t+=arguments[i].length;var e=Array(t),r=0;for(i=0;i<n;i++)for(var s=arguments[i],o=0,u=s.length;o<u;o++,r++)e[r]=s[o];return e};Object.defineProperty(i,"__esModule",{value:!0});var r=n(7231),s=n(9847),o=n(3072),u=n(3454),h=n(4138),a=n(954),c=n(6389),f=n(1962),l=n(1960),v=n(440),d=n(6120),p=n(2341),m=n(2334),b=n(4536),g=n(1279),y=n(4685),w=n(5244),_=n(742),E=n(2912),O=n(1204),A=n(4986),S=n(6342),T=n(9241),I=n(8103),j=n(4046),M=n(8903),N=n(7549),k=n(83),R=n(5109),L=n(4797),D=n(655),C=n(9939),P=n(2559),x=n(7343),U=n(830),V=n(1032),F=n(4354),B=n(649),z=function(){function t(t,i,n,e,r){this.AY=[],this.yR=t,this.SY=r,this.wV=e,this.wV.publish(f.PROFILE_START,[f.METRICS.VP_CONSTRUCTOR]),this._m=new m.default(t,i,n),this.TY=this._m.mediaStore,this.IY(),this.jY=[],this.BH=new b.default,this.vS=new h.default(this.BH),this.MY=new N.default(this.wV),this.NY(),this.kY(),this.RY=new M.PlaybackController(this._m,this.wV,this.BH,this.LY),this.DY(),this._m.autoplay&&this.wV.publish(f.PROFILE_START,f.METRICS.INIT_TO_START),this.eF(),this.wV.publish(f.PROFILE_END,f.METRICS.VP_CONSTRUCTOR),this.wV.publish(f.PROFILE_START,f.METRICS.INIT_RENDER_GAP),this.CY()}return t.prototype.initialize=function(){this.PY||(this.PY=new j.MetadataController(this.vS,this._m),this.xY(),this.fetchMetadata())},t.prototype.fetchMetadata=function(t){this.PY&&this.PY.loadMetadata(t)},t.prototype.destroy=function(){this.HG&&this.HG.destroy(),this.UY(),this.wV&&this.wV.destroy(),this.VY&&this.VY.destroy(),this._m&&this._m.destroy(),this.PY&&this.PY.destroy(),this.RY&&this.RY.destroy(),this.FY(),this.BH.destroy(),this.vS.destroy()},t.prototype.render=function(t){this.wV.publish(f.PROFILE_END,f.METRICS.INIT_RENDER_GAP),this.wV.publish(f.PROFILE_START,f.METRICS.CREATE_RENDERER);var i=A.isString(t)?document.querySelector(t):t;if(null===i&&this.wV.publish(f.ERROR,this.BY(c.PLAYER_CODES.E_INVALID_CONFIG,!1,"Invalid DOM node or CSS selector specified. Cannot render player.")),this.HG=new T.default(i,this._m,this.wV,this.SY,this.BH,this.RY),this.zY(),this._m.playerRootElement=i,this.HG.render(),this.GY=this.HG.getPlaylistController(),A.isFunction(u.CCController)&&(this.VY=new u.CCController(this.wV,this._m,this.HG),this.HY()),this._m.firstCriticalError)this.XE(this._m.firstCriticalError);else{if(this.YY=!1,this.HG.syncViewState(),this._m.autoplay){var n={type:a.REQUEST_TYPES.AUTOPLAY,action:a.REQUEST_TYPES.AUTOPLAY};this.play(n)}else{var e=this.getCurrentMediaItem();this.MY.setPreloadItem(e),this.MY.startPreload()}this.wV.publish(o.ExternalEvt.PLAYER_RENDERED),this.wV.publish(f.PROFILE_END,f.METRICS.CREATE_RENDERER),this.HG.setTheme(this.yR.cssTheme),this.qY(g.PluginPlayerEvent.PLAYER_RENDERED,{rootElem:i})}},Object.defineProperty(t.prototype,"model",{get:function(){return this._m},enumerable:!0,configurable:!0}),t.prototype.registerPlugin=function(t){var i=this._m.config,n=i.pluginConfigs&&i.pluginConfigs[t.type]&&i.pluginConfigs[t.type][t.mimetype];switch(t.type){case g.PluginType.AD:var e=this._m.privacyConsent;n=Object.assign({autoplay:i.autoplay,playerGuid:this._m.guid,timeout:{hard:i.ads.timeout.load,start:i.ads.timeout.start,maxAdSearch:i.ads.timeout.maxAdSearch||604800},privacyConsent:{gdprApplies:e.gdprApplies,gdprConsentData:e.gdprConsentData,uspString:e.uspString}},n),"adplugin/vrm"===t.mimetype&&(n.disableFailoverOnDlvFailure=!1,n.disableVIPAdCallRetry=!1,n.adCallWithCredentialsAlways=!1),n.playerName=n.playerName||"VDMSPlayer";break;case g.PluginType.MORE_ITEMS:this.WY=t.mimetype}this.BH.register(t,n),A.isPlayerPluginEventListener(t)&&this.jY.push(t)},Object.defineProperty(t.prototype,"rootElement",{get:function(){return this._m.rendered?this.HG.getRootElement():null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"videoElement",{get:function(){return this._m.rendered?this.HG.getVideoElement():null},enumerable:!0,configurable:!0}),t.prototype.supportSendBeacon=function(){return!(s.userAgent.ie||s.userAgent.safari||s.userAgent.ios)},t.prototype.play=function(t){void 0===t&&(t=null),this.RY.startPlayback(t),this.wV.publish(f.CTRL_PLAYPAUSE,"play")},t.prototype.pause=function(t){!this._m.isPaused()&&this.QY.shouldPlay&&(this.RY.pause(t),this.LY.onPause(),this.wV.publish(f.CTRL_PLAYPAUSE,"pause"))},t.prototype.seek=function(t){this.RY.seek(t)},t.prototype.recover=function(){this.LY&&this.LY.recover()},t.prototype.preload=function(){this.MY.startPreload()},t.prototype.stopPreload=function(){this.MY.stopPreload()},t.prototype.disableControls=function(){this._m.rendered&&this.HG.disableControls()},t.prototype.enableControls=function(){this._m.rendered&&this.HG.enableControls()},t.prototype.enableCC=function(t){this.VY&&this.VY.enable(t)},t.prototype.disableCC=function(){this.VY&&this.VY.disable()},t.prototype.isPlayMode=function(){var t=this._m.getState();return(t===w.default.VIDEO||t===w.default.WAITING)&&!this._m.isPaused()},t.prototype.isLoading=function(){return this.QY.videoLoading()},t.prototype.setCustomError=function(t,i,n,e,r){if(/^player-/.test(t)||(t="player-"+t),-1===[f.ERROR,f.WARNING,f.INFO].indexOf(t))throw new Error("invalid error level");if(-1===Object.keys(c.ErrorGroup).map((function(t){return c.ErrorGroup[t]})).indexOf(i))throw new Error("invalid error group");this.wV.publish(t,S.default.createErr(i,this.QY,n,e,r))},Object.defineProperty(t.prototype,"fullscreen",{get:function(){return!!this._m.rendered&&this.HG.getFullscreen()},set:function(t){this._m.rendered&&this.HG.setFullscreen(t)},enumerable:!0,configurable:!0}),t.prototype.setVolume=function(t,i){void 0===i&&(i=!1),i||(t>0&&!this._m.muteMode&&(this._m.mute=!1),_.LocalStorage.put(a.LocalStorageKey.VOLUME,{volume:t,mute:this._m.mute})),this._m.rendered&&this.RY.setVolume(t,i),this.HG.updateVolumeUI(t,null,i)},Object.defineProperty(t.prototype,"volume",{get:function(){return this._m.volume},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){return this._m.rendered?this.RY.getCurrentTime():0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rawCurrentTime",{get:function(){return this._m.rendered?this.RY.getRawCurrentTime():0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mute",{get:function(){return this._m.mute},set:function(t){this._m.muteMode&&this._m.mute||(_.LocalStorage.put(a.LocalStorageKey.VOLUME,{volume:this._m.volume,mute:t}),this._m.rendered&&this.RY.setMute(t),this.HG.updateVolumeUI(this._m.volume,t))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"loop",{set:function(t){this._m.loop=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"continuousPlay",{get:function(){return this._m.continuousPlay},set:function(t){this._m.continuousPlay=t},enumerable:!0,configurable:!0}),t.prototype.resumeContinuousPlay=function(t){this.RY.resumeContinuousPlay(t)},Object.defineProperty(t.prototype,"autoplay",{get:function(){return this._m.autoplay},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mediaStore",{get:function(){return this._m.mediaStore},enumerable:!0,configurable:!0}),t.prototype.getPlaybackState=function(){return this._m.getState()},t.prototype.getCurrentMediaItem=function(){return this.xG.getCurrentItem()},t.prototype.getPlaylistItems=function(){return this.xG.getItems().map((function(t){return{id:t.id,mimetype:t.mimetype}}))},t.prototype.getPlaylistItemIds=function(){return this.xG.getItemIds()},t.prototype.getPlaylist=function(){return this.xG},Object.defineProperty(t.prototype,"rendered",{get:function(){return this._m.rendered},enumerable:!0,configurable:!0}),t.prototype.updateCurrentItemTitle=function(t){this.HG.updateCurrentItemTitle(t)},t.prototype.addCustomControlElement=function(t){return this.HG.addCustomControlElement(t)},t.prototype.setPlaylistPosition=function(t,i,n){this.RY.setPlaylistPosition(t,i,n)},t.prototype.sendPrefetchInfo=function(t){var i={url:t.url,source:t.source,latency:t.latency||"na",http_code:t.http_code||"na",resp_len:t.resp_len||"na",instrument:t.instrument||"na",perfInfo:t.perfInfo||"na",perfStack:t.perfStack||"na"};return!(!i.source||!i.url)&&(this.wV.publish(f.API_CALLED,i),!0)},t.prototype.removePlaylistItems=function(t,i){this.xG.removeItems(t,i)},t.prototype.error=function(t){t&&this.wV.publish(f.ERROR,this.BY(t.code,!1,t.msg))},Object.defineProperty(t.prototype,"docked",{get:function(){return!!this._m.rendered&&this.HG.isDocked()},enumerable:!0,configurable:!0}),t.prototype.updateDockingConfig=function(t,i,n,e,r,s){this._m.rendered&&this.HG.updateDockingConfig(t,i,n,e,r,s)},t.prototype.dockVideoPlayer=function(){this._m.rendered&&this.HG.dockVideoPlayer()},t.prototype.undockVideoPlayer=function(t){this._m.rendered&&this.HG.undockVideoPlayer(t)},t.prototype.initNewPlayback=function(){var t=this.getCurrentMediaItem();this.RY.initNewPlayback(t)},Object.defineProperty(t.prototype,"startTime",{set:function(t){this._m.startTime=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentDate",{get:function(){return this._m.rendered?this.RY.getCurrentDate():0},enumerable:!0,configurable:!0}),t.prototype.getEventsDto=function(){return this._m.getEventsDto()},t.prototype.getPlayingItem=function(){return this.RY.getPlayingItem()},t.prototype.getSyncOffset=function(){return this.RY.getSyncOffset()},t.prototype.startSync=function(){this.RY.startSync()},t.prototype.stopSync=function(){this.RY.stopSync()},Object.defineProperty(t.prototype,"duration",{get:function(){return this.RY.getDuration()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rawDuration",{get:function(){return this.RY.getRawDuration()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"xG",{get:function(){return this._m.playlist},enumerable:!0,configurable:!0}),t.prototype.eF=function(){var t=this;this.wV.addEventListener(f.ERROR,this.XE,this),this.wV.addEventListener(f.INFO,this.XE,this),this.wV.addEventListener(f.WARNING,this.qF,this),this.wV.addEventListener(f.RELATED_ITEM_CLICK,this.ZY,this),this.wV.addEventListener(f.TOGGLE_PLAY_PAUSE,this.XY,this),this.wV.addEventListener(f.CONTROLS_SEEK_START,this.$Y,this),this.wV.addEventListener(f.CONTROLS_SEEK_END,this.JY,this),this.wV.addEventListener(f.CONTROLS_SEEKING,this.KY,this),this.wV.addEventListener(f.PLAYBACK_REQUEST,this.dq,this),this.wV.addEventListener(f.PLAYER_DIMENSION_CHANGE,this._q,this),this.wV.addEventListener(o.ExternalEvt.BITRATE_CHANGE,this.FF,this),this.wV.addEventListener(o.ExternalEvt.PLAYBACK_TIMEOUT,this.tW,this),this.wV.addEventListener(f.KEYDOWN,this.iW,this),this.wV.addEventListener(f.ER_READY,this.nW,this),this.wV.addEventListener(f.CONTENT_LOAD_FINISHED,this.eW,this),this.wV.addEventListener(f.LIVE_RELOAD_MEDIA,this.rW,this),this.wV.addEventListener(f.STREAM_SYNCH_STRATEGY_APPLIED,this.sW,this),this.wV.addEventListener(f.STREAM_SYNCH_COMPLETE,this.$F,this),this._m.waitingForUserTap&&this.wV.once(f.TOUCH_TO_PLAY_RESTRICTION_REMOVED,(function(){t._m.waitingForUserTap=!1}),this)},t.prototype.CY=function(){var t=this;this.AY.push(new V.default),this.AY.push(new U.default),this.AY.push(new B.default),this.AY.push(new R.default),this.AY.push(new D.default),this.AY.push(new C.default),this.AY.push(new r.VrmAdPlugin),this.AY.push(new F.default),this._m.isLocal()&&(this.AY.push(new L.default),this.AY.push(new P.default),this.AY.push(new x.default)),this.AY.forEach((function(i){t.registerPlugin(i)})),this.BH.defaultPlugins=this.AY},t.prototype.FY=function(){this.AY.forEach((function(t){t.destroy()})),this.AY=[]},t.prototype.qY=function(t){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];for(var r=function(n){setTimeout((function(){try{n.onPlayerEvent.apply(n,e([t],i))}catch(t){}}),0)},s=0,o=this.jY;s<o.length;s++){var u=o[s];r(u)}},t.prototype.kY=function(){this.LY||(this.LY=new k.default(this._m),this.oW())},t.prototype.uW=function(){this.hW||(this.wV.publish(f.PROFILE_END,[f.METRICS.INIT_TO_START,f.METRICS.CLICK_TO_START]),this.wV.publish(o.ExternalEvt.VIDEO_STARTED),this.hW=!0),this.aW()},t.prototype.XY=function(){this._m.castState&&this._m.castState.connected||this._m.getState()===w.default.VIDEO&&(this._m.isPaused()?(this.RY.startPlayback({type:a.REQUEST_TYPES.CLICK,action:a.REQUEST_TYPES.PLAY}),this.wV.publish(f.CTRL_PLAYPAUSE,"play")):(this.RY.pause({type:a.REQUEST_TYPES.CLICK,action:a.REQUEST_TYPES.PAUSE}),this.wV.publish(f.CTRL_PLAYPAUSE,"pause")))},t.prototype.iW=function(t){var i=t.keyCode,n="key-"+i;32!==i&&38!==i&&40!==i||(t.preventDefault(),this.wV.publish(o.ExternalEvt.UI_INTERACT,{srcElement:n}))},t.prototype.dq=function(){this.cW(),this.fW()},t.prototype.cW=function(){var t=this,i=this.getCurrentMediaItem();!this.lW&&i&&i.state!==d.ItemState.ERROR&&(this.lW=window.setTimeout((function(){t.wV.publish(o.ExternalEvt.PLAYBACK_TIMEOUT,t.vW(c.WARNING_CODES.E_PLAYBACK_TIMEOUT,!0,"No playback after 10 seconds of requesting to play on player"))}),1e4))},t.prototype.fW=function(){var t=this.getCurrentMediaItem();t&&t.rendererType===y.RendererType.HTML5_HLS&&this.wV.publish(f.CONVIVA_READY_FOR_SESSION_CREATION,t)},t.prototype.aW=function(){this.lW&&clearTimeout(this.lW)},t.prototype._q=function(t){var i,n;this._m.uiState.width=t.width,this._m.uiState.height=t.height,this._m.uiState.videoWidth=t.videoWidth,this._m.uiState.videoHeight=t.videoHeight,null===(n=null===(i=this.HG)||void 0===i?void 0:i.controls)||void 0===n||n.onPlayerResize(t)},t.prototype.dW=function(){s.userAgent.mobile&&O.default.autoplaySupported&&this.QY.mute&&!this._m.muteMode&&!this._m.config.mute&&(this.mute=!1),this.wV.publish(f.CTRL_PLAYREQUEST,"ctp");var t={type:a.REQUEST_TYPES.CLICK,action:a.REQUEST_TYPES.CLICK};this.RY.startPlayback(t),this.HG.getContentNode().focus(),O.default.hasLoadRestriction&&this._m.autoplay&&E.default&&(this._m.waitingForUserTap=!1)},t.prototype.ZY=function(t,i,n){var e=this.xG,r={srcElement:"next-vid-"+i},s=-1===i?f.CTRL_REPLAY:f.CTRL_ENDSCREEN_VID;-1===i&&(r.srcElement="es-rpl"),i>-2&&this.wV.publish(o.ExternalEvt.UI_INTERACT,r),this.wV.publish(s,{vid:t,vindex:i});var u={type:a.REQUEST_TYPES.CONTINUOUS,action:n?a.REQUEST_TYPES.AUTOPLAY:a.REQUEST_TYPES.CLICK},h=e.getItemPosition(t);this.setPlaylistPosition(h,!0,u)},t.prototype.XE=function(t){var i=this;if(this.LY.onError(t),!this.LY||!t.isRecoverable){t.category&&t.category===c.E_INFO?this.wV.publish(f.INTERNAL_INFO,t):this.wV.publish(f.INTERNAL_ERROR,t);try{throw new Error("Stack Trace")}catch(t){}this._m.errors.push(t),this.pW((function(){var t=i._m.firstCriticalError;t&&(i.LY.stopTimers(),i.RY.handleCriticalError(t),i.mW(t),i.disableCC(),i.HG&&i.HG.syncViewState())}))}},t.prototype.qF=function(t,i){i&&this.XE(t)},t.prototype.mW=function(t){var i=c.PLAYER_CODES,n=function(){s.userAgent.desktop&&(t.category=c.E_PLAYER,t.subcategory=i.E_PLAYER_NOT_ENABLED)};switch(t.category){case c.E_SAPI_ABSTRACT:case c.E_SAPI_STREAM:case c.E_SAPI_PLAYLIST:case c.E_SAPI_RELATED:case c.E_SAPI_POPULAR:var e=c.INFO_CODES;switch(t.subcategory){case e.E_SAPI_UNSUPPORTED_LIVE_ON_HTML:s.userAgent.android?(t.category=c.E_INFO,t.subcategory=e.E_PLAYER_ANDROID_CHROME_REQUIRED):n();break;case c.SAPI_CODES.E_DRM_RESTRICTED:s.userAgent.desktop&&n()}break;case c.E_PLAYER:switch(t.subcategory){case i.E_NATIVE_ENCRYPT_MEDIA:n()}}},t.prototype.$Y=function(){this._m.isSeeking()||(this._m.setSeeking(!0),this.HG.syncViewState())},t.prototype.JY=function(){this._m.isSeeking()&&(this._m.isPaused()||this.RY.playCurrent(),this._m.setSeeking(!1),this.HG.syncViewState())},t.prototype.KY=function(t){this._m.castState&&this._m.castState.connected||this.RY.seekCurrent(t)},t.prototype.FF=function(t){this._m.bitrate=t},t.prototype.tW=function(t){this.wV.publish(f.WARNING,t)},t.prototype.TF=function(){this._m.isLoading()||(this._m.setLoading(!0),this.HG.syncViewState());var t=this.getCurrentMediaItem();t&&this.PY.recover(t)},t.prototype.bW=function(t){if(this.LY.recovering){var i=this._m.getState();this.RY.getCurrentTime()>0&&(this._m.startTime=this.RY.getCurrentTime()),this.LY.onRecoveryMetadataReady(),this.RY.handleSourceAvailable(t),this.LY.setItemRecoveryStatus(t,d.ItemRecoveryStatus.RECOVERED),i===w.default.VIDEO&&this.RY.playCurrent(this._m.startTime)}else this.LY.setItemRecoveryStatus(t,d.ItemRecoveryStatus.NOT_RECOVERING)},t.prototype.nW=function(t){},t.prototype.UY=function(){this.LY&&(this.LY.destroy(),this.LY=null)},t.prototype.pW=function(t){var i=this,n=this._m&&this.xG&&this.getCurrentMediaItem();switch(n&&n.is360Video()&&(this._m.skipOnError=l.SkipOnError.TIMEBASED),this._m.skipOnError){case l.SkipOnError.ALWAYS:this.gW(t);break;case l.SkipOnError.TIMEBASED:t(),window.setTimeout((function(){i.gW()}),1e4);break;case l.SkipOnError.NEVER:default:t()}},t.prototype.gW=function(t){var i=this.xG.getNextPosition(!0,this._m.loop),n=this.xG.position,e=this._m.autoplay||this._m.continuousPlay&&this.QY.hasStartedPlayback;-1!==i&&i!==n?(this.setPlaylistPosition(i,e),this.HG&&this.HG.syncViewState()):-1===i&&this.yW(g.MoreItemsReason.PLAYLIST_COMPLETE_ON_ERROR)},t.prototype.yW=function(t){var i=this;this.PY.loadMoreItems(t,(function(t){var n=i.xG.getNextPosition(!0,i._m.loop),e=i.wW();i.continuousPlay&&(i._m.autoplay=!0);var r=i._m.autoplay||i.continuousPlay&&i.QY.hasStartedPlayback||e;t||-1===n?(i._m.setState(w.default.END),i.QY.criticalError=i._m.firstCriticalError,i.HG&&i.HG.syncViewState()):i.setPlaylistPosition(n,r)}),this.WY)},t.prototype.eW=function(t){var i=this;t&&this.PY.loadMoreItems(g.MoreItemsReason.CONTENT_LOAD_FINISHED,(function(){var t,n=i.xG,e=n.getCurrentPosition(),r=n.getNextPosition(true,i._m.loop);-1!==r&&r!==e&&(t=n.getMediaItemAt(r))&&(t.mayUpdateVideoSession(),i.MY.setPreloadItem(t),i.MY.startPreload())}),this.WY)},t.prototype.rW=function(){this.LY.recover(4)},t.prototype.sW=function(t){var i;this.HG.updateStreamSyncUI(!0,(null===(i=t)||void 0===i?void 0:i.strategy)||"")},t.prototype.$F=function(){this.HG.updateStreamSyncUI(!1)},t.prototype.vW=function(t,i,n,e){return S.default.createErr(c.ErrorGroup.Streaming,this.QY,i?c.E_WARNING:c.E_PLAYER,t,n,e)},t.prototype.BY=function(t,i,n,e){return S.default.createErr(c.ErrorGroup.Configuration,this.QY,i?c.E_WARNING:c.E_PLAYER,t,n,e)},t.prototype.IY=function(){var t=this,i=this.TY;i.on(p.MediaStoreEvent.MEDIA_ITEM_ADDED,(function(i){t.wV.publish(f.MEDIA_ITEM_ADDED,i)}),this),i.on(p.MediaStoreEvent.MEDIA_ITEM_REMOVED,(function(i){t.wV.publish(f.MEDIA_ITEM_REMOVED,i)}),this)},t.prototype._W=function(t){return t?{id:t.id,duration:t.duration}:null},t.prototype.DY=function(){var t=this,i=this.RY;i.on(M.PlaybackEvent.PLAY_CAST,(function(){}),this),i.on(M.PlaybackEvent.PAUSE_CAST,(function(){}),this),i.on(M.PlaybackEvent.SEEK_CAST,(function(){}),this),i.on(M.PlaybackEvent.PLAYBACK_REQUEST,(function(){t.wV.publish(f.PLAYBACK_REQUEST)}),this),i.on(M.PlaybackEvent.PLAYBACK_ERROR_BEFORE_METADATA_READY,(function(){t.wV.publish(f.INFO,t.BY(c.PLAYER_CODES.E_NATIVE_PREMATURE_PLAY,!0,"Cannot play before metadata is available"))}),this),i.on(M.PlaybackEvent.PLAYLIST_NO_MORE_ITEM_TO_PLAY,(function(){t.UY()}),this),i.on(M.PlaybackEvent.PLAYLIST_COMPLETE,(function(){t.yW(g.MoreItemsReason.PLAYLIST_COMPLETE),t.wV.publish(o.ExternalEvt.PLAYLIST_COMPLETE)}),this),i.on(M.PlaybackEvent.PLAYBACK_LOADING,(function(i){t.HG.syncViewState(),t._m.fullscreen&&t.HG.setFullscreen(!0)}),this),i.on(M.PlaybackEvent.PLAYBACK_PAUSING,(function(){t.HG.syncViewState()}),this),i.on(M.PlaybackEvent.AD_BREAK_STARTED,(function(i){t.HG.onAdBreakStarted(i),t.HG.syncViewState(),t.GY.onAdBreakStarted(),t.wV.publish(f.AD_BREAK_STARTED,i)}),this),i.on(M.PlaybackEvent.AD_BREAK_ENDED,(function(i){var n,e;t.HG.onAdBreakEnded(i),t.HG.syncViewState(),t.GY.onAdBreakEnded(),t.wV.publish(f.AD_BREAK_ENDED,i),i.type===I.AdBreakType.PREROLL&&t.wV.publish(f.PROFILE_START,f.METRICS.PLAYBACK_START),null===(e=null===(n=i)||void 0===n?void 0:n.mediaItem)||void 0===e||e.updateCompletedAdBreak(i)}),this),i.on(M.PlaybackEvent.AD_BREAK_ITEM_CURRENT,(function(i){t.HG.onAdBreakItemCurrent(i),t.wV.publish(f.AD_BREAK_ITEM_CURRENT,i)}),this),i.on(M.PlaybackEvent.AD_BREAK_ITEM_PLAYBACK_STARTED,(function(i){t.uW(),t.HG.syncViewState(),t.HG.onAdBreakItemStarted(i),t.VY.onAdPlaybackStarted(i),t.qY(g.PluginPlayerEvent.AD_PLAYBACK_STARTED,i);var n=i.adBreak;t.MY.setPreloadItem(n.mediaItem),t.MY.startPreload(),t.wV.publish(f.AD_BREAK_ITEM_PLAYBACK_STARTED,i)}),this),i.on(M.PlaybackEvent.AD_BREAK_ITEM_PLAYBACK_SKIPPED,(function(i){t.wV.publish(f.AD_BREAK_ITEM_SKIPPED,i)}),this),i.on(M.PlaybackEvent.AD_BREAK_ITEM_LOADED,(function(i){t.wV.publish(f.CONTENT_LOAD_FINISHED,i)}),this),i.on(M.PlaybackEvent.AD_BREAK_ITEM_PLAYBACK_RESUMED,(function(i){t.wV.publish(f.PLAYBACK_RESUMED,i?i.id:null)}),this),i.on(M.PlaybackEvent.AD_BREAK_ITEM_PLAYBACK_ENDED,(function(i){t.HG.onAdBreakItemEnded(i),t.wV.publish(f.AD_BREAK_ITEM_ENDED,i)}),this),i.on(M.PlaybackEvent.AD_BREAK_ITEM_PLAYBACK_STOPPED,(function(t){}),this),i.on(M.PlaybackEvent.AD_BREAK_ITEM_PLAYBACK_PROGRESS,(function(i){t.HG.onAdPlaybackProgress(i);var n=t.QY;t.qY(g.PluginPlayerEvent.AD_PLAYBACK_PROGRESS,{currentTime:n.currentTime,duration:n.duration}),t.VY.onAdPlaybackProgress(i)}),this),i.on(M.PlaybackEvent.AD_BREAK_ITEM_ERROR,(function(i){t.wV.publish(f.AD_BREAK_ITEM_ERROR,i)}),this),i.on(f.AD_SUBTITLE_TRACK_ADDED,(function(i){t.wV.publish(f.AD_SUBTITLE_TRACK_ADDED,i)}),this),i.on(M.PlaybackEvent.MEDIA_ITEM_CURRENT,(function(i){t.HG&&t.HG.onMediaItemCurrent(i),t.VY&&t.VY.onMediaItemLoaded(i),t.GY&&t.GY.onMediaItemCurrent(i),t.wV.publish(f.MEDIA_ITEM_CURRENT,i)}),this),i.on(M.PlaybackEvent.MEDIA_ITEM_PLAYBACK_STARTED,(function(i){t.uW(),t.wV.publish(f.PROFILE_END,f.METRICS.PLAYBACK_START),t.HG.onMediaItemPlaybackStarted(i),t.VY.onMediaItemPlaybackStarted(),t.qY(g.PluginPlayerEvent.MEDIA_ITEM_PLAYBACK_STARTED,t._W(i)),t.wV.publish(f.PLAYBACK_STARTED),t.PY.loadMoreItems(g.MoreItemsReason.PLAYBACK_STARTED)}),this),i.on(M.PlaybackEvent.MEDIA_ITEM_PLAYBACK_RESUMED,(function(i){t.wV.publish(f.PLAYBACK_RESUMED,i?i.id:null)}),this),i.on(M.PlaybackEvent.MEDIA_ITEM_PLAYBACK_PROGRESS,(function(i){t.HG.syncViewState(),t.HG.onMediaItemPlaybackProgress(i),i&&i.currentTime&&t.qY(g.PluginPlayerEvent.MEDIA_ITEM_PLAYBACK_PROGRESS,i.currentTime,t._W(i.playingItem))}),this),i.on(M.PlaybackEvent.PLAYBACK_RESUME,(function(i){t.wV.publish(f.PLAYBACK_RESUMED,i?i.id:null),t.HG.syncViewState()}),this),i.on(M.PlaybackEvent.PLAYBACK_ERROR,(function(i){t.wV.publish(f.PLAYBACK_ERROR,i)}),this),i.on(M.PlaybackEvent.PLAYBACK_INFO,(function(i){t.wV.publish(f.INFO,i)}),this),i.on(M.PlaybackEvent.MEDIA_ITEM_ERROR,(function(i,n){t.wV.publish(f.MEDIA_ITEM_ERROR,i),t.wV.publish(f.ERROR,n)}),this),i.on(M.PlaybackEvent.WAITING,(function(i){if(i){if(t.LY&&t.LY.toggleRecoverer(i),i.value&&!i.ignoreBuffering)t.wV.publish(f.PROFILE_START,f.METRICS.PLAYBACK_STALLED);else if(!i.ignoreBuffering){t.wV.publish(f.PROFILE_END,f.METRICS.PLAYBACK_STALLED);var n=t.SY.getItem(f.METRICS.PLAYBACK_STALLED);n&&t.wV.publish(f.PLAYBACK_STALLED,n.timeDiff?n.timeDiff/1e3:"")}var e=!0===i.value?o.ExternalEvt.BUFFERING_START:o.ExternalEvt.BUFFERING_END;t.wV.publish(e)}}),this),i.on(M.PlaybackEvent.END_FULLSCREEN,(function(){t.HG.setFullscreen(!1),t.HG.handleFullscreenChange(!1)}),this),i.on(M.PlaybackEvent.ENTER_FULLSCREEN,(function(){t.HG.setFullscreen(!0),t.HG.handleFullscreenChange(!0)}),this),i.on(M.PlaybackEvent.PLAYBACK_ERROR_NO_VALID_STREAM,(function(){t.wV.publish(f.ERROR,S.default.createErr(c.ErrorGroup.Service,t.QY,c.E_SAPI_STREAM,c.SAPI_CODES.E_NO_PLAYABLE_STREAMS))}),this),i.on(M.PlaybackEvent.PLAYBACK_ERROR_NO_RENDERER,(function(i){t.wV.publish(f.ERROR,i)}),this),i.on(M.PlaybackEvent.PLAYBACK_ERROR_FLASH_NOT_SUPPORTED,(function(i){t.wV.publish(f.INFO,i)}),this),i.on(M.PlaybackEvent.PLAYBACK_SYNC_VIEW,(function(){t.HG&&t.HG.syncViewState()}),this),i.on(M.PlaybackEvent.MUTE_CHANGED,(function(i){t._m.mute=i,t.HG.updateVolumeUI(t._m.volume,t._m.mute)}),this),i.on(M.PlaybackEvent.VOLUME_CHANGED,(function(i){t._m.volume=i,t.HG.updateVolumeUI(t._m.volume,t._m.mute),t.wV.publish(f.VideoEvent.VOLUMECHANGE)}),this),i.on(M.PlaybackEvent.PLAYBACK_START_BLOCKED,(function(){t.QY.paused=!0,t.QY.loading=!1,t.HG.syncViewState(),t.wV.publish(f.VideoEvent.BLOCKED),t.wV.publish(f.VideoEvent.PAUSE),t.LY.onPlaybackStartBlocked()}),this),i.on(M.PlaybackEvent.PLAYBACK_START_NOT_BLOCKED,(function(){t.LY.onPlaybackStartNotBlocked()}),this),i.on(M.PlaybackEvent.RENDERER_SWITCH,(function(i,n){s.userAgent.mobile&&t.HG.getFullscreen()&&i!==n&&n&&n.exitFullScreen&&n.exitFullScreen(),t.HG.onRendererSwitch(i,n)}),this),i.on(M.PlaybackEvent.RENDERER_TIMEOUT,(function(){t.HG.syncViewState()}),this),i.on(M.PlaybackEvent.RENDERER_CREATED,(function(i){t.HG.addRendererNode(i.create())}),this),i.on(M.PlaybackEvent.MEDIA_ITEM_PLAYBACK_STOPPED,(function(i){t.LY&&t.LY.stopTimers(),t.HG.syncViewState(),t._m.continuousPlay||t.HG.setFullscreen(!1),t.wV.publish(f.PLAYBACK_STOPPED,i)}),this),i.on(M.PlaybackEvent.PLAYLIST_POSITION_HAS_CHANGED,(function(i){i&&(t.HG.resetState(),t.wV.publish(o.ExternalEvt.PLAYLIST_POSITION_CHANGE,t.xG.position))}),this),i.on(M.PlaybackEvent.PLAYBACK_ERROR_INCONSISTENT_METADATA,(function(){t.wV.publish(f.WARNING,t.vW(c.WARNING_CODES.E_LIVE_PLAYBACK_COMPLETE,!0),!0)}),this),i.on(M.PlaybackEvent.MEDIA_ITEM_IS_LOADED,(function(i){t.kY(),t.HG.onMediaItemLoaded(i),t.VY&&t.VY.onMediaItemLoaded(i);var n=i.customConfig,e=t.yR.nielsenConfig;(n&&n.nielsenRequired||e&&e.enableNielsen)&&t.wV.publish(o.ExternalEvt.NIELSEN_REQUIRED),t.wV.publish(f.MEDIA_ITEM_METADATA,i)}),this),i.on(M.PlaybackEvent.SEEKING,(function(){var i=f.VideoEvent.SEEKING;t.HG.onVideoEvent(i),t.wV.publish(i)}),this),i.on(M.PlaybackEvent.SEEKED,(function(){t.HG.onVideoEvent(f.VideoEvent.SEEKED),t.wV.publish(o.ExternalEvt.PLAYBACK_SEEK_COMPLETE)}),this),i.on(M.PlaybackEvent.MEDIA_ITEM_PLAYBACK_ENDED,(function(i,n){t.HG.destroyAdsOverlay(),t.VY.onMediaItemPlaybackEnded(),t.wV.publish(f.PLAYBACK_COMPLETE,i),t.wV.publish(f.MEDIA_ITEM_COMPLETE,i),t.qY(g.PluginPlayerEvent.MEDIA_ITEM_PLAYBACK_ENDED,t._W(i))}),this),i.on(M.PlaybackEvent.STALLED,(function(){t.wV.publish(f.VideoEvent.STALLED)}),this),i.on(M.PlaybackEvent.LOADSTART,(function(){t.wV.publish(f.VideoEvent.LOADSTART)}),this),i.on(M.PlaybackEvent.LOADEDDATA,(function(){t.wV.publish(f.VideoEvent.LOADEDDATA)}),this),i.on(M.PlaybackEvent.LOADEDMETADATA,(function(){t.wV.publish(f.VideoEvent.LOADEDMETADATA)}),this),i.on(M.PlaybackEvent.PLAY,(function(){t.wV.publish(f.VideoEvent.PLAY)}),this),i.on(M.PlaybackEvent.PLAYING,(function(i){var n=f.VideoEvent.PLAYING;t.HG.onVideoEvent(n,i),t.wV.publish(n)}),this),i.on(M.PlaybackEvent.PAUSE,(function(){var i=f.VideoEvent.PAUSE;t.HG.onVideoEvent(i),t.wV.publish(i)}),this),i.on(M.PlaybackEvent.SRC_SWITCHING,(function(){t.wV.publish(f.VideoEvent.SRC_SWITCHING)}),this),i.on(M.PlaybackEvent.SRC_SWITCHED,(function(){t.wV.publish(f.VideoEvent.SRC_SWITCHED)}),this),i.on(M.PlaybackEvent.TIMEUPDATE,(function(i){t.wV.publish(f.VideoEvent.TIMEUPDATE,i&&i.currentTime),t.HG.onPlaybackTimeUpdate()}),this),i.on(M.PlaybackEvent.CLICK,(function(){var i;t.wV.publish(o.ExternalEvt.UI_INTERACT,{srcElement:"video-click"}),s.userAgent.desktop&&(null===(i=t.HG)||void 0===i?void 0:i.controls)&&t.XY()}),this),i.on(M.PlaybackEvent.PLAYBACK_PROGRESS,(function(i){var n=i.currentItem,e=i.currentTime,r=i.duration,s=i.buffered,o=t.HG.getPlayerDimensions();S.default.areDimensionsEqual(o,t._m.uiState)||t.wV.publish(f.PLAYER_DIMENSION_CHANGE,o),t.wV.publish(f.PLAYBACK_PROGRESS,n.id,e,r,s)}),this),i.on(M.PlaybackEvent.PLAYBACK_NEED_MEDIA_ITEM_METADATA,(function(i){t.PY.loadItem(i)}),this),i.on(M.PlaybackEvent.PLAYBACK_NEED_MEDIA_ITEM_SOURCE,(function(i){t.PY.loadSource(i),t.wV.publish(f.MEDIA_ITEM_NEED_SOURCE,i)}),this),i.on(M.PlaybackEvent.AD_BREAK_NEED_RESOLVE,(function(t,i){}),this),i.on(M.PlaybackEvent.AD_METRICS,(function(i){t.wV.publish(f.AD_METRICS,i)}),this),i.on(M.PlaybackEvent.CREATE_OVERLAY_CONTAINER,(function(i){i(t.HG.createAdsOverlay())}),this),this.EW(i)},t.prototype.zY=function(){var t=this,i=this.HG;i.on(T.ViewEvent.SKIP_AD_REQUESTED,(function(){var i=t.getPlayingItem();i&&S.default.getPlaybackMode(i)===y.PlaybackMode.AD&&t.RY.skipAd()}),this),i.on(T.ViewEvent.SYNC_PLAYBACK_STATE,(function(){t.RY.syncPlaybackState()}),this),i.on(T.ViewEvent.SYNC_SHOW_AIRPLAY_TARGET_MENU,(function(){t.RY.showAirplayTargetMenu()}),this),i.on(T.ViewEvent.SEEK,(function(i){t.RY.seekCurrent(i)}),this),i.on(T.ViewEvent.SET_VOLUME,(function(i){t.setVolume(i)}),this),i.on(T.ViewEvent.SET_MUTE,(function(i){t.mute=i}),this),i.on(T.ViewEvent.TOGGLE_CC,(function(i,n){t.wV.publish(f.CCEvent.UI_TOGGLE,i,n),t.VY.toggleFromUI(i,n)}),this),i.on(T.ViewEvent.SET_AUDIO_LANGUAGE,(function(i,n){t.wV.publish(f.CONTROLS_AUDIO_CHANGE,i,n);var e=t.getCurrentMediaItem();e&&e.setCurrLanguage(i),t.RY.setAudioLanguage(i)}),this),i.on(T.ViewEvent.UI_INTERACT,(function(i){t.wV.publish(o.ExternalEvt.UI_INTERACT,i)}),this),i.on(T.ViewEvent.SCROLLED_TO_END,(function(){t.PY.loadMoreItems(g.MoreItemsReason.SCROLLED_TO_END)}),this),i.on(T.ViewEvent.PLAYLIST_BOTTOM_HEIGHT_CHANGE,(function(i){t.wV.publish(f.PLAYLIST_BOTTOM_HEIGHT_CHANGE,i)}),this),i.on(T.ViewEvent.TOGGLE_PLAY_PAUSE,(function(){t.XY()}),this),i.on(T.ViewEvent.START_SCREEN_CLICK,(function(){t.dW()}),this),i.on(T.ViewEvent.AD_CLICKED,(function(){t.wV.publish(f.AD_BREAK_ITEM_CLICKED)}),this),i.on(T.ViewEvent.CC_LANGUAGE_CHANGE,(function(i){t.VY.onLanguageChange(i)}),this),i.on(T.ViewEvent.CC_STYLE_CHANGE,(function(i){t.VY.updateCCStyle(),i&&t.wV.publish(f.CCEvent.UPDATE_STYLE,i)}),this),i.on(T.ViewEvent.OPSS_VISIBILITY_CHANGED,(function(i,n){t.wV.publish(f.OPSS_VISIBILITY_CHANGED,i,n)}),this),i.on(T.ViewEvent.FORWARD_SEEK,(function(){var i=t.RY.getCurrentTime(),n=Math.min(i+t._m.seekControls.offset,t.duration-1);t.RY.seekCurrent(n)}),this),i.on(T.ViewEvent.BACKWARD_SEEK,(function(){var i=t.RY.getCurrentTime()-t._m.seekControls.offset;t.RY.seekCurrent(i)}),this),i.on(T.ViewEvent.CUSTOM_ELEMENT,(function(i,n){var e={action:i,label:n};t.wV.publish(o.ExternalEvt.CTRL_CUSTOM_ELEMENT,JSON.stringify(e))}),this),i.on(T.ViewEvent.KEY_CHANGE_VOLUME,(function(i){t.wV.publish(o.ExternalEvt.KEY_CHANGE_VOLUME,i)}),this)},t.prototype.oW=function(){var t=this,i=this.LY;i.on(f.ERROR,(function(i){t.wV.publish(f.ERROR,i)}),this),i.on(f.WARNING,(function(i){t.wV.publish(f.WARNING,i)}),this),i.on(k.RecovererEvent.RECOVERY_START,this.TF,this),i.on(k.RecovererEvent.RECOVERY_METADATA_READY,(function(){t.wV.publish(f.RECOVERY_METADATA_READY)}),this)},t.prototype.HY=function(){var t=this,i=this.VY;i.on(u.CCControllerEvent.CC_AVAILABILITY_UPDATE,(function(i){t.HG.updateClosedCaptionUI(i)}),this),i.on(u.CCControllerEvent.CC_LIST_FETCHED,(function(i){var n,e;null===(e=null===(n=t.HG)||void 0===n?void 0:n.controls)||void 0===e||e.updateAvailableLanguages(i)}),this),i.on(u.CCControllerEvent.CC_LIST_FETCHED_MOBILE,(function(i){t.RY.enableMobileNativeCC(i)}),this),i.on(u.CCControllerEvent.TOGGLE_SIMPLE_CC_CONTROLS,(function(t){}),this)},t.prototype.xY=function(){var t=this,i=this.PY;i.on(f.ERROR,(function(i){t.wV.publish(f.ERROR,i)}),this),i.on(f.WARNING,(function(i){t.wV.publish(f.WARNING,i)}),this),i.on(j.MetadataEvent.METADATA_AVAILABLE,(function(i){t.getCurrentMediaItem().equals(i)&&t.HG&&t.HG.syncViewState(),t.wV.publish(f.METADATA_AVAILABLE,i.id),t.YY||(t.YY=!0,t.wV.publish(o.ExternalEvt.PLAYER_READY)),t.GY&&t.GY.onMediaItemLoaded()}),this),i.on(j.MetadataEvent.SOURCE_AVAILABLE,(function(i){t.PY.loadMoreItems(g.MoreItemsReason.SOURCE_LOAD_COMPLETE),t.OW(i)}),this),i.on(j.MetadataEvent.SOURCE_LOAD_FAILED,(function(i,n){var e=t.getCurrentMediaItem();e&&e.key===v.default.createKey(i.id,i.mimetype)&&(t.AW(e)&&(t.LY.setItemRecoveryStatus(e,d.ItemRecoveryStatus.NOT_RECOVERING),t.LY.onMetadataLoadFailed()),t.wV.publish(f.ERROR,n))}),this),i.on(j.MetadataEvent.API_INFO_AVAILABLE,(function(i){t.wV.publish(f.API_CALLED,i)}),this),this.EW(this.PY)},t.prototype.EW=function(t){var i=this;[f.PROFILE_START,f.PROFILE_END].forEach((function(n){t.addEventListener(n,(function(t){i.wV.publish(n,t)}),i)}))},t.prototype.NY=function(){var t=this,i=this.MY;i.on(N.PreloadEvent.START_PRELOAD,(function(i){t.PY.loadSource(i)}),this),i.on(N.PreloadEvent.PLAYER_IDLE,(function(){}),this)},t.prototype.OW=function(t){this.SW(t),this.AW(t)?this.bW(t):this.RY.handleSourceAvailable(t)},t.prototype.AW=function(t){var i=this.getCurrentMediaItem();return t.isRecovering()&&i&&i.equals(t)},t.prototype.SW=function(t){!(!(t&&t.customConfig&&t.customConfig.meta)||t.customConfig.meta.castable)&&s.userAgent.android&&"dash"===t.streams[0].getType()&&this.wV.publish(f.INFO,S.default.createErr(c.ErrorGroup.Configuration,this.QY,c.E_INFO,c.INFO_CODES.E_DRM_UNSUPPORTED_OS,null,"not castable stream on android"))},t.prototype.wW=function(){var t,i=this._m.config;return"media/container"===i.mediaItems[0].mimetype&&(null===(t=i.playlist)||void 0===t?void 0:t.id)&&!i.autoplay},Object.defineProperty(t.prototype,"QY",{get:function(){return this._m.playbackState},enumerable:!0,configurable:!0}),t}();i.default=z},101:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s,o=n(7403),u=n(4986),h=n(2007),a=n(7262);!function(t){t.AD_VIDEO_START="AdVideoStart",t.AD_VIDEO_FIRST_QUARTILE="AdVideoFirstQuartile",t.AD_VIDEO_MIDPOINT="AdVideoMidPoint",t.AD_VIDEO_THIRD_QUARTILE="AdVideoThirdQuartile",t.AD_VIDEO_COMPLETE="AdVideoComplete"}(s=i.InstreamAdManagerEvent||(i.InstreamAdManagerEvent={}));var c=[s.AD_VIDEO_FIRST_QUARTILE,s.AD_VIDEO_MIDPOINT,s.AD_VIDEO_THIRD_QUARTILE],f=function(t){function i(){var i=t.call(this,"InstreamAdManager")||this;return i.TW={},i.IW="",i.jW=null,i.jW=new a.default(i),i}return r(i,t),i.prototype.adStarted=function(t,i){var n=t&&t.adID;if(n){this.IW=n;var e=new h.default(t,i);this.TW[n]=e;var r=e.events.impressions;e.status.impressions=!0,this.publish(s.AD_VIDEO_START,r)}},i.prototype.adEnded=function(t,i){var n=t&&t.adID;if(n){var e=this.TW[n];if(e&&!e.status.completes){var r=e.events.completes||[];e.status.completes=!0,e.endTime=i,this.publish(s.AD_VIDEO_COMPLETE,r)}}},i.prototype.onActiveRendererTimeupdate=function(t){var i=this.TW[this.IW];if(i&&!i.status.completes){var n=i.duration,e=i.startTime;if(u.isNumber(t)&&u.isNumber(e)&&u.isNumber(n)){var r=t-e,s=Math.round(r/n*100)/100;this.MW("firstquartiles",1,s,i),this.MW("midpoints",2,s,i),this.MW("thirdquartiles",3,s,i)}}},i.prototype.destroy=function(){t.prototype.destroy.call(this),this.TW={}},i.prototype.MW=function(t,i,n,e){var r,s=null===(r=this.TW[this.IW])||void 0===r?void 0:r.status;s&&!s[t]&&n>=.25*i&&(s[t]=!0,this.publish(c[Math.min(i,3)-1],e.events[t]))},i}(o.default);i.default=f},4046:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}),s=this&&this.__assign||function(){return(s=Object.assign||function(t){for(var i,n=1,e=arguments.length;n<e;n++)for(var r in i=arguments[n])Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r]);return t}).apply(this,arguments)};Object.defineProperty(i,"__esModule",{value:!0});var o,u=n(7403),h=n(6618),a=n(6389),c=n(1962),f=n(6120),l=n(4986),v=n(6342);!function(t){t.METADATA_AVAILABLE="metadata-available",t.SOURCE_AVAILABLE="metadata-source-available",t.SOURCE_LOAD_FAILED="metadata-source-load-failed",t.API_INFO_AVAILABLE="api-info-available",t.MORE_ITEMS_LOADED="more-items-loaded"}(o=i.MetadataEvent||(i.MetadataEvent={}));var d=function(t){function i(i,n){var e=t.call(this,"MetadataController")||this;return e.vS=i,e._m=n,e.TY=n.mediaStore,e}return r(i,t),i.prototype.destroy=function(){this.vS.removeRelatedCommands(h.CmdName.CMD_METADATA_LOAD),this.vS.removeRelatedCommands(h.CmdName.CMD_SOURCE_METADATA_LOAD),t.prototype.destroy.call(this)},i.prototype.loadItem=function(t){var i=t.rawItemData;this.vS.executeCommand(h.CmdName.CMD_METADATA_LOAD,s({mimetype:t.mimetype,mediaItemDataArr:[i]},this.NW()),this)},i.prototype.loadSource=function(t){var i=t.rawItemData;if(t.sourceState!==f.SourceState.FETCHING&&!t.isContainer())if(t.hasSource())this.publish(o.SOURCE_AVAILABLE,t);else{var n=this.xG.getItemPosition(t.id)+1;this.publish(c.PROFILE_START,c.METRICS.CMS_SOURCE_REQUEST),this.vS.executeCommand(h.CmdName.CMD_SOURCE_METADATA_LOAD,s({mimetype:t.mimetype,mediaItemDataArr:[i],playlistPosition:n},this.NW()),this)}},i.prototype.recover=function(t){var i=t.rawItemData;this.vS.executeCommand(h.CmdName.CMD_SOURCE_METADATA_LOAD,s({mimetype:t.mimetype,mediaItemDataArr:[i],recovering:!0},this.NW()),this)},i.prototype.loadMetadata=function(t){var i,n=this;if((i=t&&t.length?t:this.xG.getItems())&&i.length){var e=[];i.forEach((function(t){e.push(t.rawItemData)}));var r={};e.forEach((function(t){var i=t.mimetype;r[i]||(r[i]=[]),r[i].push(t)})),this.kW(e)&&this.publish(c.PROFILE_START,c.METRICS.CMS_REQUEST),Object.keys(r).forEach((function(t){n.vS.executeCommand(h.CmdName.CMD_METADATA_LOAD,s({mimetype:t,mediaItemDataArr:r[t]},n.NW()),n)}))}},i.prototype.loadMoreItems=function(t,i,n){var e=this.xG.getItems();e&&e.length&&(this.publish(c.PROFILE_START,c.METRICS.CMS_MORE_ITEMS_REQUEST),this.vS.executeCommand(h.CmdName.CMD_MORE_ITEMS_LOAD,{cb:i,mimetype:n||e[0].mimetype,reason:t,start:this.xG.playlistFetchIndex},this))},i.prototype.onSourceMetadataLoadComplete=function(t,i){var n=this;this.publish(c.PROFILE_END,c.METRICS.CMS_SOURCE_REQUEST),this.vS.removeCommand(t),this.xG.update(i).forEach((function(t){t.setSourceState(f.SourceState.HAS_DATA),n.publish(o.SOURCE_AVAILABLE,t)}))},i.prototype.onSourceMetadataLoadProgress=function(t,i,n){n&&this.xG.updateMediaItemsSourceState(i,n)},i.prototype.onSourceMetadataLoadInfo=function(t,i){i&&this.publish(o.API_INFO_AVAILABLE,i)},i.prototype.onSourceMetadataLoadError=function(t,i,n){var e=this;this.vS.removeCommand(t);var r=v.default.createErr(n.group,this._m.playbackState,n.category,n.subcategory,n.message);i.forEach((function(t){e.publish(o.SOURCE_LOAD_FAILED,t,r)}))},i.prototype.onMetadataLoadComplete=function(t,i){var n=this;this.vS.removeCommand(t),this.RW(i),this.kW(i)&&this.publish(c.PROFILE_END,c.METRICS.CMS_REQUEST),this.xG.update(i).forEach((function(t){t.setState(f.ItemState.HAS_DATA),n.publish(o.METADATA_AVAILABLE,t)}))},i.prototype.onMetadataLoadProgress=function(t,i,n){n&&this.xG.updateMediaItemsState(i,n)},i.prototype.onMetadataLoadInfo=function(t,i){i&&this.publish(o.API_INFO_AVAILABLE,i)},i.prototype.onMetadataLoadError=function(t,i){this.vS.removeCommand(t);var n=v.default.createErr(a.ErrorGroup.Configuration,this._m.playbackState,a.E_WARNING,i.subcategory,i.message);this.publish(c.WARNING,n)},i.prototype.onMoreItemsLoadComplete=function(t,i){this.vS.removeCommand(t),this.publish(c.PROFILE_END,c.METRICS.CMS_MORE_ITEMS_REQUEST);var n=this.xG;n.playlistFetchIndex+=i.length,n.addItems(i);var e=i.map((function(t){var i=t.id;return n.getMediaItemById(i)}));e.length>0&&this.loadMetadata(e)},i.prototype.onMoreItemsLoadInfo=function(t,i){i&&this.publish(o.API_INFO_AVAILABLE,i)},i.prototype.onMoreItemsLoadError=function(t,i){this.vS.removeCommand(t);var n=v.default.createErr(a.ErrorGroup.Configuration,this._m.playbackState,i.category,i.subcategory,null,i.debugMessage);this.publish(c.INFO,n)},i.prototype.kW=function(t){var i=this.xG.getCurrentItem();return i&&t&&t.length&&t.some((function(t){return t.id===i.id}))},i.prototype.NW=function(){var t=this._m,i={autoplay:t.autoplay,privacyConsent:t.consent,rendererCapabilities:t.capabilities,rendererTypes:t.rendererTypes,thumbnailDimensions:t.thumbnailDimensions},n=this.xG.getCurrentItem();return n&&(n.videoSession&&(i.sessionId=n.videoSession),l.isNumber(n.tryCount)&&(i.tryCount=n.tryCount),l.isNumber(n.failoverCount)&&(i.failoverCount=n.failoverCount)),i},i.prototype.RW=function(t){t&&t.forEach((function(t){t.metadata&&(t.metadata.title=v.default.sanitizeAndUnescape(t.metadata.title),t.metadata.description=v.default.sanitizeAndUnescape(t.metadata.description))}))},Object.defineProperty(i.prototype,"xG",{get:function(){return this._m.playlist},enumerable:!0,configurable:!0}),i}(u.default);i.MetadataController=d},2657:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s,o=n(7403),u=n(9847),h=n(742),a=n(954),c=n(2334),f=5e3,l=2e4;!function(t){t.SUSPEND_STREAMING="suspendStreaming",t.RESUME_STREAMING="resumeStreaming",t.CTRL_PLAYPAUSE="ctrlPlayPause"}(s=i.PauseHandlerEvents||(i.PauseHandlerEvents={}));var v=function(t){function i(i,n){var e=t.call(this,"pauseHandler")||this;if(e.LE=i,e._m=n,e.LW=!1,!e.LE||!e._m)throw new Error("[PauseHandler] Invalid arguments");var r=e.DW=Object.assign({},e._m.backgroundPause);return e.DW.timeToPause=r.timeToPause?1e3*r.timeToPause:f,e.PW=r.onMute||r.onUnmute,e.DW.suspendStreamingTime=r.suspendStreamingTime?1e3*r.suspendStreamingTime:l,e.DW.backgroundSuspendStreaming=!0,e.xW=new h.Timer(r.timeToPause,e.UW,e,1),e.VW=new h.Timer(r.suspendStreamingTime,e.FW,e,1),e.BW=!1,e}return r(i,t),i.prototype.destroy=function(){this.xW.destroy(),this.VW.destroy()},i.prototype.onPlaybackStart=function(){this.LW=!0},i.prototype.onPlaybackPlaying=function(t){if(this.LW&&!t&&this.zW())return this.LW=!1,void this.GW();this.LW=!1,this._m.getPauseReason()===c.PauseReason.BACKGROUND&&u.userAgent.chrome&&this.LE.seek(this.LE.getCurrentTime())},i.prototype.onVisibilityChange=function(t){t?(this.xW.reset(),this.VW.reset(),this.HW()):this.zW()&&(this._m.isAd()?this.GW():this.YW())},i.prototype.suspendStreaming=function(){this.fH()&&(this.BW=!0,this.publish(s.SUSPEND_STREAMING))},i.prototype.resumeStreaming=function(){this.VW.reset(),this.fH()&&this.BW&&(this.publish(s.RESUME_STREAMING),this.BW=!1)},i.prototype.scheduleSuspend=function(){this.DW.backgroundSuspendStreaming&&this.VW.start()},i.prototype.FW=function(){this.VW.reset(),this.suspendStreaming()},i.prototype.zW=function(){if(!this.PW)return!1;if(!this._m.isMediaPlaying())return!1;var t=this._m.mute;return!(t&&!this.DW.onMute||!t&&!this.DW.onUnmute)},i.prototype.qW=function(){return!(!this.PW||this._m.isMediaPlaying())&&this._m.getPauseReason()===c.PauseReason.BACKGROUND},i.prototype.YW=function(){this.xW.start()},i.prototype.UW=function(){this.xW.reset(),this.GW()},i.prototype.GW=function(){this.LE.pause({type:a.REQUEST_TYPES.API,action:a.REQUEST_TYPES.BACKGROUND}),this.publish(s.CTRL_PLAYPAUSE,"pause")},i.prototype.HW=function(){this.qW()&&(this.resumeStreaming(),this.LE.startPlayback({type:a.REQUEST_TYPES.API,action:a.REQUEST_TYPES.BACKGROUND}),this.publish(s.CTRL_PLAYPAUSE,"play"))},i.prototype.fH=function(){var t=this._m.playlist.getCurrentItem();return!!t&&t.isLive()},i}(o.default);i.default=v},8903:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}),s=this&&this.__assign||function(){return(s=Object.assign||function(t){for(var i,n=1,e=arguments.length;n<e;n++)for(var r in i=arguments[n])Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r]);return t}).apply(this,arguments)};Object.defineProperty(i,"__esModule",{value:!0});var o,u=n(7403),h=n(9847),a=n(3194),c=n(9489),f=n(3072),l=n(954),v=n(1962),d=n(8103),p=n(9134),m=n(440),b=n(3353),g=n(101),y=n(5244),w=n(727),_=n(2694),E=n(1204),O=n(2878),A=n(4986),S=n(6342),T=n(2657),I=n(4411);!function(t){t.PLAY_CAST="playCast",t.PAUSE_CAST="pauseCast",t.SEEK_CAST="seekCast",t.SRC_SWITCHING="pbcSrcSwitching",t.SRC_SWITCHED="pbcSrcSwitched",t.CLICK="pbcVideoClick",t.PAUSE="pbcPaused",t.PLAYBACK_ERROR="pbcError",t.PLAYBACK_INFO="pbcInfo",t.LOADEDMETADATA="pbcLoadedMetadata",t.LOADEDDATA="pbcLoadedData",t.STALLED="pbcStalled",t.LOADSTART="pbcLoadstart",t.PLAY="pbcPlay",t.PLAYING="pbcPlaying",t.SEEKING="pbcSeeking",t.SEEKED="pbcSeeked",t.WAITING="pbcWaiting",t.TIMEUPDATE="pbcTimeUpdate",t.MUTE_CHANGED="pbcMuteChanged",t.VOLUME_CHANGED="pbcVolumeChanged",t.END_FULLSCREEN="pbcEndFullscreen",t.ENTER_FULLSCREEN="pbcEnterFullscreen",t.PLAYBACK_START_NOT_ALLOWED="pbcStartNotAllowed",t.PLAYBACK_START_BLOCKED="pbcPlayBlocked",t.PLAYBACK_START_NOT_BLOCKED="pbcPlayNotBlocked",t.PLAYBACK_RESUME="pbcResume",t.PLAYBACK_NEW_ATTEMPT="pbcNewAttempt",t.PLAYBACK_REQUEST="pbcRequest",t.PLAYBACK_LOADING="pbcLoading",t.PLAYBACK_PAUSING="pbcPausing",t.PLAYBACK_STARTED="pbcStarted",t.PLAYBACK_ERROR_NO_VALID_STREAM="pbcErrorNoValidStream",t.PLAYBACK_ERROR_BEFORE_METADATA_READY="pbcErrorBeforeMetadataReady",t.PLAYBACK_ERROR_INCONSISTENT_METADATA="pbcErrorInconsistentMetadata",t.PLAYBACK_ERROR_NO_RENDERER="pbcErrorNoRenderer",t.PLAYBACK_ERROR_FLASH_NOT_SUPPORTED="pbcErrorFlashNotSupported",t.PLAYBACK_SYNC_VIEW="pbcSyncView",t.PLAYBACK_PROGRESS="pbcProgress",t.PLAYBACK_NEED_MEDIA_ITEM_METADATA="pbcNeedMediaItemMetadata",t.PLAYBACK_NEED_MEDIA_ITEM_SOURCE="pbcNeedMediaItemSource",t.MODE_CHANGE="pbcModeChange",t.RENDERER_SWITCH="pbcRendererSwitch",t.RENDERER_TIMEOUT="pbcRendererTimeout",t.RENDERER_CREATED="pbcRendererCreated",t.SET_PLAYLIST_POSITION_BEFORE="pbcSetPlaylistPositionBefore",t.STOP_CURRENT_PLAYBACK="pbcStopCurrentPlayback",t.MEDIA_ITEM_IS_LOADED="pbcMediaItemIsLoaded",t.MEDIA_ITEM_CURRENT="pbcMediaItemCurrent",t.MEDIA_ITEM_PLAYBACK_STARTED="pbcMediaItemStarted",t.MEDIA_ITEM_PLAYBACK_RESUMED="pbcMediaItemResumed",t.MEDIA_ITEM_PLAYBACK_PROGRESS="pbcMediaItemProgress",t.MEDIA_ITEM_PLAYBACK_ENDED="pbcMediaItemEnded",t.MEDIA_ITEM_PLAYBACK_STOPPED="pbcMediaItemStopped",t.MEDIA_ITEM_ERROR="pbcMediaItemError",t.PLAYLIST_POSITION_HAS_CHANGED="pbcPlaylistPositionChanged",t.PLAYLIST_NO_MORE_ITEM_TO_PLAY="pbcPlaylistNoMoreItemToPlay",t.PLAYLIST_COMPLETE="pbcPlaylistComplete",t.AD_BREAK_STARTED="pbcAdBreakStarted",t.AD_BREAK_ENDED="pbcAdBreakEnded",t.AD_BREAK_NEED_RESOLVE="pbcAdBreakNeedResolve",t.AD_BREAK_ITEM_CURRENT="pbcAdBreakItemCurrent",t.AD_BREAK_ITEM_PLAYBACK_STARTED="pbcAdBreakItemStarted",t.AD_BREAK_ITEM_PLAYBACK_SKIPPED="pbcAdBreakItemSkipped",t.AD_BREAK_ITEM_PLAYBACK_RESUMED="pbcAdBreakItemResumed",t.AD_BREAK_ITEM_PLAYBACK_PROGRESS="pbcAdBreakItemProgress",t.AD_BREAK_ITEM_LOADED="pbcAdBreakItemLoaded",t.AD_BREAK_ITEM_PLAYBACK_ENDED="pbcAdBreakItemEnded",t.AD_BREAK_ITEM_PLAYBACK_STOPPED="pbcAdBreakItemStopped",t.AD_BREAK_ITEM_ERROR="pbcAdBreakItemError",t.CREATE_OVERLAY_CONTAINER="pbcCreateOverlayContainer",t.AD_METRICS="adMetrics"}(o=i.PlaybackEvent||(i.PlaybackEvent={}));var j=function(t){function i(i,n,e,r){var s=t.call(this,"PlaybackController")||this;return s.WW=!1,s.QW=!0,s.ZW=!1,s.XW=!1,s.$W=!1,s.JW=!1,s.KW=!1,s.tQ=null,s.iQ=null,s.nQ=!1,s._m=i,s.wV=n,s.eQ={},s.rQ=new c.RendererController(i,n,e,r),s.sQ(),s.QY=new b.default,s._m.setPlaybackState(s.QY),s.oQ=new a.AdPlaybackController(i,e),s.uQ(),s.hQ=new T.default(s,s._m),s.aQ(),s.cQ=new I.default(s._m),s.fQ(),s.SE=new w.default(s),s}return r(i,t),Object.defineProperty(i.prototype,"xG",{get:function(){return this._m.playlist},enumerable:!0,configurable:!0}),i.prototype.startPlayback=function(t){var i=this;if(void 0===t&&(t=null),!this.QY.criticalError){if(!this.cQ.isPlayerVisible())return this.wV.publish(v.PROFILE_START,v.METRICS.DEFERRING_PLAYBACK),this.SE.enQueue(this.startPlayback,t),void(this.QY.shouldPlay=!1);if(this.QY.shouldPlay=!0,this.hQ.resumeStreaming(),this._m.getState()===y.default.VIDEO)return this.getPlayingItem()instanceof p.default&&!this.QY.hasCurrentItemPlayed&&this.oQ.resumeClientAdStartTimer(),void this.lQ(0);var n=this.vQ();if(n&&this._m.rendered&&!this.QY.attemptingPlayback())if(this._m.autoplay||this.WW||(this.WW=!0,this.publish(v.PROFILE_START,v.METRICS.CLICK_TO_START)),this._m.castState&&this._m.castState.connected)this.publish(o.PLAY_CAST);else{if(t&&(this._m.requestType=t.type,t.action&&S.default.isValidRequestAction(t.action)&&(this._m.requestAction=t.action)),!this.dQ())return this._m.showStartScreen=!0,this._m.autoplay=!1,void this.enterInitState();this._m.waitingForUserTap?this.JW||(this.JW=!0,this.pQ=this.once(v.TOUCH_TO_PLAY_RESTRICTION_REMOVED,(function(){i.JW=!1,i.startPlayback(t)}),this)):(this.mQ=null,this._m.isPaused()?this.playCurrent():E.default.autoplaySupported||n.fetchFinished()?this.bQ(n):this.publish(o.PLAYBACK_ERROR_BEFORE_METADATA_READY))}}},i.prototype.playCurrent=function(t){this._m.setState(y.default.VIDEO),this.rQ.play(t)},i.prototype.handleSourceAvailable=function(t){var i=this.vQ();i&&t&&(i.equals(t)?this.QY.playingItem instanceof p.default?this.rQ.handleAdvancePreparePreloadNextRenderer(t):(this.oQ.prepareAdsForItem(t),this.gQ(t)):this.rQ.handleAdvancePreparePreloadNextRenderer(t))},i.prototype.handleAdBreakResolved=function(t,i){this.oQ.handleAdBreakResolved(t,i)},i.prototype.getRendererController=function(){return this.rQ},i.prototype.skipAd=function(){this.rQ.skip()},i.prototype.handleCriticalError=function(t){this.aW(),this.QY.criticalError=t,this.yQ(),this.rQ.endVideo(),this.rQ.stopMedia()},i.prototype.pause=function(t){if(this.QY.shouldPlay=!1,this.QY.hasRendererPlayCalled&&this._m.rendered){var i=this._m.castState;if(i&&i.connected&&!i.paused)this.publish(o.PAUSE_CAST);else{if(this.pQ)return this.removeEventListener(v.TOUCH_TO_PLAY_RESTRICTION_REMOVED,this.pQ),void delete this.pQ;if(this._m.setRequestInfo(t),this.QY.attemptingPlayback())this.getPlayingItem()instanceof p.default&&!this.QY.hasCurrentItemPlayed&&this.oQ.pauseClientAdStartTimer(),this.pauseCurrent(),this.aW(),this.hQ.scheduleSuspend()}}},i.prototype.pauseCurrent=function(){this.rQ.pause()},i.prototype.seek=function(t){this._m.rendered&&(this._m.castState&&this._m.castState.connected?this.publish(o.SEEK_CAST,t):this._m.getState()===y.default.VIDEO&&this.rQ.seek(t))},i.prototype.seekCurrent=function(t){if(this._m.rendered&&this._m.getState()===y.default.VIDEO){var i=this.wQ(t);this.seek(i)}},i.prototype.syncPlaybackState=function(){this.rQ.syncPlaybackState()},i.prototype.getRawCurrentTime=function(){return this.rQ.getCurrentTime()},i.prototype.getCurrentTime=function(){return this._Q||0},i.prototype.getCurrentDate=function(){return this.rQ.getCurrentDate()},i.prototype.rewindAfterEnd=function(t){this.rQ.rewindAfterEnd(t)},i.prototype.getRawDuration=function(){return this.rQ.getDuration()},i.prototype.getDuration=function(){var t=this.getPlayingItem();if(!t){var i=this.vQ();return i?i.duration:NaN}if(t instanceof m.default)return t.duration;if(t instanceof p.default){if(t.instream)return t.duration;var n=this.getRawDuration();return isNaN(n)?t.duration:n}return NaN},i.prototype.showAirplayTargetMenu=function(){this.rQ.showAirplayTargetMenu()},i.prototype.setQuality=function(t){this.rQ.setQuality(t)},i.prototype.setVolume=function(t,i){if(void 0===i&&(i=!1),i)this.rQ.setVolume(t);else{var n=this._m.volume;this._m.volume=t,this.rQ.setVolume(t),this.wV.publish(v.CTRL_VOLUME,n),this.wV.publish(f.ExternalEvt.PLAYER_VOLUME_CHANGE,t)}},i.prototype.setMute=function(t){this._m.mute=t,this.rQ.setMute(t),this.wV.publish(f.ExternalEvt.PLAYER_MUTE_CHANGE,t)},i.prototype.setAudioLanguage=function(t){this.rQ.setAudioLanguage(t)},i.prototype.stopMedia=function(){this.rQ.stopMedia()},i.prototype.enableMobileNativeCC=function(t){this.rQ.enableMobileNativeCC(t)},i.prototype.resumeContinuousPlay=function(t){this._m.continuousPlay=!0;var i={skipWatchedVideos:this._m.skipWatchedVideos};if(this._m.getState()===y.default.END){var n=this.xG.getNextPosition(this._m.continuousPlay,this._m.loop,i);-1!==n&&this.setPlaylistPosition(n,!0,t)}},i.prototype.setPlaylistPosition=function(t,i,n){if(this._m.rendered){var e=this.xG,r=this.vQ(),s=e.getMediaItemAt(t);if(!(r&&r.equals(s)&&this.QY.isInitializing())){this.stopCurrentPlayback(n),this._m.errors=[],this.QY.criticalError=null,e.position=t;var u=this.vQ();u?(this.initNewPlayback(u),i&&this.startPlayback(n),this.publish(o.PLAYLIST_POSITION_HAS_CHANGED,u)):this.publish(o.PLAYLIST_NO_MORE_ITEM_TO_PLAY),this.publish(o.PLAYBACK_SYNC_VIEW)}}},i.prototype.initNewPlayback=function(t){this.enterInitState(),this.EQ(t)},i.prototype.enterInitState=function(){this._m.setState(y.default.INIT),this._m.resetPlaybackStates(),this.publish(o.PLAYBACK_SYNC_VIEW)},i.prototype.getPlayingItem=function(){var t=this.OQ();return t instanceof m.default&&this.oQ.getPlayingInstreamAd()||t},i.prototype.stopCurrentPlayback=function(t){var i,n,e,r=this.getPlayingItem(),s=null===(n=null===(i=r)||void 0===i?void 0:i.adBreak)||void 0===n?void 0:n.mediaItem;r instanceof p.default&&"media/container"!==(null===(e=s)||void 0===e?void 0:e.mimetype)?(this.publish(o.AD_BREAK_ITEM_PLAYBACK_STOPPED,r),this.oQ.handleAdBreakItemEnded(r)):r instanceof m.default&&(!t||t.type===l.REQUEST_TYPES.CONTINUOUS&&t.action!==l.REQUEST_TYPES.CLICK||this.publish(o.MEDIA_ITEM_PLAYBACK_STOPPED,r),r.position=0,this.QY.looped=!1,this._m.startTime=NaN,this.yQ(r)),this.QY.playingItem=null;var u=this.vQ(),h=u&&u.getStreamType()||null;this.AQ(h),this.SQ(),this.rQ.endVideo(),this.rQ.stopMedia()},i.prototype.getActiveRenderer=function(){return this.rQ.getActiveRenderer()},i.prototype.suspendStreaming=function(){this.rQ&&this.rQ.suspendStreaming()},i.prototype.resumeStreaming=function(){this.rQ&&this.rQ.resumeStreaming()},i.prototype.handleVisibilityChange=function(t){this.wV.publish(v.PROFILE_END,v.METRICS.DEFERRING_PLAYBACK),this.SE.deQueue(this.startPlayback,!0),this.hQ.onVisibilityChange(t)},i.prototype.destroy=function(){t.prototype.destroy.call(this),this.oQ.destroy(),this.hQ.destroy(),this.rQ&&this.rQ.destroy(),this.cQ&&this.cQ.destroy(),this.DF&&this.DF.destroy()},i.prototype.onActiveRendererClick=function(){this.publish(o.CLICK)},i.prototype.onActiveRendererPlaying=function(){this.publish(v.PROFILE_END,v.METRICS.AD_PLUGIN),this.QY.hasCurrentItemPlayed=!0;var t=this.getPlayingItem();this.QY.playingItem=t,this.iQ=null,this.QY.videoLoading()&&(h.userAgent.android||(this._m.setLoading(!1),this.publish(o.PLAYBACK_SYNC_VIEW))),this._m.isPaused()&&(this._m.setPaused(!1),this.TQ&&clearTimeout(this.TQ),t instanceof m.default?this.publish(o.MEDIA_ITEM_PLAYBACK_RESUMED,t):t instanceof p.default&&(this.QY.shouldPlay=!0,this.publish(o.AD_BREAK_ITEM_PLAYBACK_RESUMED,t))),t&&!this.eQ[t.id]&&this.IQ(t),this.hQ.onPlaybackPlaying(this.cQ.isPlayerVisible()),this.publish(o.PLAYING,t)},i.prototype.onActiveRendererTimeupdate=function(t){var i=t.currentTime,n=t.duration,e=t.buffered;h.userAgent.android&&!this.XW&&(this._m.setLoading(!1),this.publish(o.PLAYBACK_SYNC_VIEW),this.XW=!0),this.oQ.updatePlaybackProgress({currentTime:i,playingItem:this.OQ()});var r=this.getPlayingItem();if(this.QY.playingItem=r,this.QY.currentRawTime=i,r&&(this.jQ(r,i),r instanceof m.default&&(r.position=i),A.isNumber(i)&&A.isNumber(n)&&!(i>n+1))){if(r.getDuration()||r.isLive()||r.setDuration(n),this.QY.duration=this.getDuration(),this._m.isLoading()&&(!h.userAgent.safari||h.userAgent.safari<6)){this.mQ?i-this.mQ>=1.5&&(this.mQ=null,this._m.setLoading(!1),this.publish(o.PLAYBACK_SYNC_VIEW)):this.mQ=i}else this.mQ=null;var s={playingItem:r,currentTime:i,duration:n,buffered:e};r instanceof m.default?(this.publish(o.MEDIA_ITEM_PLAYBACK_PROGRESS,s),this.DF&&this.DF.onActiveRendererTimeupdate(this._Q)):r instanceof p.default&&this.publish(o.AD_BREAK_ITEM_PLAYBACK_PROGRESS,s),isNaN(this.getSyncOffset())&&-1!==this.getSyncState()&&this.nQ&&this.wV.publish(v.INVALID_SYNC_OFFSET),this.publish(o.PLAYBACK_PROGRESS,{currentItem:r,currentTime:i,duration:n,buffered:e}),this.publish(o.TIMEUPDATE,t)}},i.prototype.onActiveRendererSeeking=function(t){null===this.iQ&&(this.iQ=this.QY.currentRawTime),this._m.setLoading(!0),this.publish(o.SEEKING,t)},i.prototype.onActiveRendererSeeked=function(t){this._m.setLoading(!1),this.mQ=null;var i=this.iQ;this.iQ=null,this.oQ.handleMediaItemSeeked(this.getPlayingItem(),t.currentTime,i),this.tQ||this.publish(o.SEEKED,t)},i.prototype.onActiveRendererEnded=function(){this.QY.playingItem=null;var t=this.getPlayingItem();t instanceof m.default?this.MQ(t):t instanceof p.default&&this.oQ.handleAdBreakItemEnded(t)},i.prototype.onActiveRendererPause=function(){this._m.onRendererPause()&&this.publish(o.PAUSE)},i.prototype.onActiveRendererPlayComplete=function(t){this.publish(o.AD_METRICS,t)},i.prototype.onActiveRendererError=function(t){var i=this.getPlayingItem();i instanceof m.default?this.publish(o.MEDIA_ITEM_ERROR,i,t):i instanceof p.default&&this.NQ(i,t)},i.prototype.onActiveRendererInfo=function(t){this.publish(o.PLAYBACK_INFO,t)},i.prototype.onActiveRendererWaiting=function(t){if(t){if(!h.userAgent.tv){var i=t.value;this._m.setLoading(i),this.publish(o.PLAYBACK_SYNC_VIEW)}this.publish(o.WAITING,t)}},i.prototype.onActiveRendererStalled=function(){this.publish(o.STALLED)},i.prototype.onActiveRendererLoadStart=function(){this.publish(o.LOADSTART)},i.prototype.onActiveRendererPlay=function(){this.publish(o.PLAY)},i.prototype.onActiveRendererVolumeChange=function(t){var i=this.rQ,n=t&&A.isBoolean(t.mute)?t.mute:i.getMuted(),e=t&&A.isNumber(t.volume)?t.volume:i.getVolume();n!==this._m.mute&&this.publish(o.MUTE_CHANGED,n),e!==this._m.volume&&this.publish(o.VOLUME_CHANGED,e)},i.prototype.onActiveRendererLoadedData=function(){this.publish(o.LOADEDDATA)},i.prototype.onActiveRendererLoadedMetadata=function(){this.publish(o.LOADEDMETADATA)},i.prototype.onActiveRendererSrcSwitching=function(){this.publish(o.SRC_SWITCHING)},i.prototype.onActiveRendererSrcSwitched=function(){this.publish(o.SRC_SWITCHED)},i.prototype.onActiveRendererPlayBlocked=function(){this.publish(o.PLAYBACK_START_BLOCKED)},i.prototype.onActiveRendererPlayNotBlocked=function(){this.publish(o.PLAYBACK_START_NOT_BLOCKED)},i.prototype.onActiveRendererSkipped=function(){var t=this.getPlayingItem();t instanceof p.default&&this.publish(o.AD_BREAK_ITEM_PLAYBACK_SKIPPED,t)},i.prototype.onActiveRendererEndFullscreen=function(){this.publish(o.END_FULLSCREEN)},i.prototype.onActiveRendererEnterFullscreen=function(){this.publish(o.ENTER_FULLSCREEN)},i.prototype.onActiveRendererDaterangeStarted=function(t){this.wV.publish(v.DATERANGE_STARTED,t),this.nQ=t.className.indexOf("content-data:watchtogether")>-1;var i=_.default.getAdData(t);i&&(this.DF||(this.DF=new g.default),this.DF.adStarted(i,this._Q))},i.prototype.onActiveRendererDaterangeEnded=function(t){this.wV.publish(v.DATERANGE_ENDED,t),this.nQ=!1;var i=_.default.getAdData(t);i&&this.DF&&this.DF.adEnded(i,this._Q)},i.prototype.getSyncOffset=function(){return this.rQ.getSyncOffset()},i.prototype.getSyncState=function(){return this.rQ.getSyncState()},i.prototype.startSync=function(){this.rQ.startSync()},i.prototype.stopSync=function(){this.rQ.stopSync()},i.prototype.kQ=function(t){this._m.resetPlaybackStates(),this._m.setState(y.default.VIDEO),this._m.setLoading(!0),this.publish(o.PLAYBACK_LOADING,t)},i.prototype.RQ=function(){this._m.setPaused(!0),this.publish(o.PLAYBACK_PAUSING)},i.prototype.bQ=function(t){if(this.iH=t,this.LQ(),this._m.resetPlaybackStates(),this.publish(v.PROFILE_START,v.METRICS.PLAYBACK_START),this.hQ.onPlaybackStart(),t.isContainer()){if(this.oQ.startTracking(t),t.adBreaks&&t.adBreaks.length||!t.adConfig)t.hasNativeAd()?this.oQ.playClientAdBreaks(t,d.AdBreakType.NATIVE):t.hasStreams()&&this.iO(t);else{var i=t.hasStreams()?d.AdBreakType.PREROLL:d.AdBreakType.NATIVE;this.oQ.prepareAdsForItem(t),this.oQ.playClientAdBreaks(t,i)}this.publish(o.PLAYBACK_SYNC_VIEW)}else{if(t.hasSource())return this.iO(t),void this.publish(o.PLAYBACK_SYNC_VIEW);this._m.setState(y.default.WAITING),this._m.setLoading(!0),this.$W=!0,this.publish(o.PLAYBACK_NEED_MEDIA_ITEM_SOURCE,t),this.publish(o.PLAYBACK_SYNC_VIEW)}},i.prototype.OQ=function(){var t=this.rQ.getActiveRenderer();return t?t.getPlayableItem():null},i.prototype.gQ=function(t){var i,n=this;if(t.hasLiveStreams()&&t.hasLiveStateForVod())this.publish(o.PLAYBACK_ERROR_INCONSISTENT_METADATA);else{if(this.QY.loadedItem=t,t.customConfig&&t.customConfig.meta&&t.customConfig.meta.videoMarkers){var e=t.customConfig.meta.videoMarkers.markers;e&&e.length>0&&this.wV.publish(f.ExternalEvt.MARKERS_RECEIVED,((i={})[t.id]=e,i))}if(t.hasMetadata())this.QY.attemptingPlayback()||this.KW||this._m.firstCriticalError||this.enterInitState();else if(!(this._m&&this.xG&&this.vQ()).equals(t))return;var r=t.position||this._m.startTime;this.rQ.prepareNextRenderer(t,(function(i){if(i)return n.aW(),void(O.default.isHtml5MseAvailable()?n.publish(o.PLAYBACK_ERROR_NO_RENDERER,i):n.publish(o.PLAYBACK_ERROR_FLASH_NOT_SUPPORTED,i));if(n.ZW=!1,n.rQ.setItemNextRenderer(t,r))if(n.$W){if(n.$W=!1,!n.dQ())return void n.publish(o.PLAYBACK_START_NOT_ALLOWED);n.iO(t)}else n.rQ.preloadNextRenderer();else n.publish(o.PLAYBACK_ERROR_NO_VALID_STREAM)})),this.publish(o.MEDIA_ITEM_IS_LOADED,t),this.KW=!1}},i.prototype.iO=function(t){t===this.vQ()&&(this.DQ()||(this._m.setState(y.default.VIDEO),this._m.setLoading(!0),this.publish(o.PLAYBACK_REQUEST,t.id),this.QY.hasStartedPlayback=!0,this.QW=!1,this.oQ.prepareAdsForItem(t),this.oQ.startTracking(t),this.publish(v.PROFILE_START,v.METRICS.AD_PLUGIN),this.oQ.playClientAdBreaks(t,d.AdBreakType.PREROLL),this.publish(o.PLAYBACK_SYNC_VIEW)))},i.prototype.CQ=function(t){var i=this;if(this.LQ(),t===this.vQ()){this.AQ(t.getStreamType()),this.publish(v.PROFILE_END,v.METRICS.AD_PLUGIN),t.restartIfNeeded();var n=this._m.startTime||0;t.isLongForm()&&isNaN(this._m.startTime)&&t.position>0&&(this._m.isResumingFromSavedPosition=!0,n=t.position),this.rQ.prepareNextRenderer(t,(function(e){e?i.aW():i.rQ.setItemNextRenderer(t,n)?i.rQ.switchAndPlayNextRenderer(n):i.publish(o.PLAYBACK_ERROR_NO_VALID_STREAM)}))}},i.prototype.PQ=function(t){var i=this;this.publish(o.AD_BREAK_ITEM_CURRENT,t),t.streams&&0!==t.streams.length?this.rQ.prepareNextRenderer(t,(function(n){i.rQ.setItemNextRenderer(t)?i.rQ.switchAndPlayNextRenderer():i.NQ(t)})):this.NQ(t,new Error("No valid streams found"))},i.prototype.lQ=function(t){this.playCurrent(t),this.rQ.setPIPMode(this.iH.pip),this.QY.hasCurrentItemPlayed||this.QY.state===y.default.END||this.kQ(t),this.QY.hasRendererPlayCalled=!0},i.prototype.dQ=function(){if(!this.QW)return!0;var t=this.vQ();return!(this._m.requestType===l.REQUEST_TYPES.AUTOPLAY&&this._m.autoplay&&t&&t.blockAutoplay)&&(!h.userAgent.mobile||this.xQ())},i.prototype.xQ=function(t){return void 0===t&&(t={}),!(this._m.requestType!==l.REQUEST_TYPES.CLICK&&!this._m.isAutoplayAllowed())},i.prototype.LQ=function(){var t=this.QY;t.hasCurrentItemPlayed=!1,t.hasRendererPlayCalled=!1},i.prototype.DQ=function(){for(var t=0,i=this._m.errors;t<i.length;t++){var n=i[t];if(n.category||n.subcategory)return n}return null},i.prototype.aW=function(){this.lW&&clearTimeout(this.lW)},i.prototype.aQ=function(){var t=this;this.hQ&&(this.hQ.on(T.PauseHandlerEvents.RESUME_STREAMING,(function(){t.resumeStreaming()}),this),this.hQ.on(T.PauseHandlerEvents.SUSPEND_STREAMING,(function(){t.suspendStreaming()}),this),this.hQ.on(T.PauseHandlerEvents.CTRL_PLAYPAUSE,(function(i){t.wV.publish(v.CTRL_PLAYPAUSE,i)}),this))},i.prototype.sQ=function(){var t=this;this.rQ.on(c.RendererControllerEvent.RENDERER_SWITCH,(function(i,n){t.publish(o.RENDERER_SWITCH,i,n)}),this),this.rQ.on(c.RendererControllerEvent.RENDERER_TIMEOUT,(function(){t.publish(o.RENDERER_TIMEOUT)}),this),this.rQ.on(c.RendererControllerEvent.RENDERER_CREATED,(function(i){t.publish(o.RENDERER_CREATED,i)}),this),this.rQ.on(c.RendererControllerEvent.RENDERER_READY_TO_PLAY,(function(i){t.wV.publish(f.ExternalEvt.RENDERER_READY,t.rQ.activeRendererType,t.QY.shouldPlay),t.QY.shouldPlay?t.lQ(i):(t.RQ(),t.oQ.pauseClientAdStartTimer())}),this),this.UQ(),this.VQ()},i.prototype.SQ=function(){this.eQ={}},i.prototype.EQ=function(t){t&&(t.mayUpdateVideoSession(),t.useVideoSession(),this.wV.publish(v.VIDEO_REQUEST,!1),this.publish(o.MEDIA_ITEM_CURRENT,t))},i.prototype.yQ=function(t){t&&(t.position=0,this.QY.previousItem=t,this.rewindAfterEnd(t.isLive())),this._m.setState(y.default.END),this._m.endVideo(),this._m.resetPlaybackStates()},i.prototype.IQ=function(t){this.XW=!1,this.eQ[t.id]=!0;var i=!1;if(this.QY.duration=this.getDuration(),t instanceof m.default){this.tQ=null,this._m.startTime=NaN;var n=this.getRawDuration();t.setRawDuration(n);var e=t.adBreaks;if(e&&e.length&&e[0].type===d.AdBreakType.PREROLL){var r=e[0];r&&r.adBreakItems&&r.adBreakItems[0].instream&&(i=!0)}i||this.publish(o.MEDIA_ITEM_PLAYBACK_STARTED,t,this.getCurrentTime())}else t instanceof p.default&&this.oQ.handleAdBreakItemPlaybackStarted(t)},i.prototype.NQ=function(t,i){this.publish(o.AD_BREAK_ITEM_ERROR,t,i),this.oQ.handleAdBreakItemError(t)},i.prototype.jQ=function(t,i){var n;t instanceof m.default&&(n=this.FQ(t,i)),t instanceof p.default&&(n=this.BQ(t,i)),this._Q=n,this.QY.currentTime=n},i.prototype.FQ=function(t,i){for(var n=i,e=t.adBreaks,r=e&&e.length||0,s=0;s<r;s++){var o=e[s];if(!(i>=o.startOffset))break;o.adBreakItems.forEach((function(t){t.instream&&(n-=t.duration)}))}return n},i.prototype.BQ=function(t,i){var n=i,e=t.adBreak;if(t.instream){n=i-e.startOffset;for(var r=e.adBreakItems,s=0,o=r.length;s<o;s++){var u=r[s];if(t.adBreakItemId===u.adBreakItemId)break;u.instream&&(n-=u.duration)}}return n},i.prototype.wQ=function(t){var i=this.OQ(),n=t;if(i instanceof m.default)for(var e=i.adBreaks,r=e&&e.length||0,s=0;s<r;s++){var o=e[s];if(!(o.startOffset<=n))break;o.adBreakItems.forEach((function(t){t.instream&&(n+=t.duration)}))}return n},i.prototype.MQ=function(t){this.SQ(),this.tQ=null;var i=this.xG,n=this.vQ();if(n&&n===t){this.oQ.onMediaItemPlaybackEnded(t);var e=this._m.continuousPlay,r=this._m.loop,s={playlistLoop:this._m.playlistLoop,skipWatchedVideos:this._m.skipWatchedVideos,looped:!1,ended:!1},u=i.getNextPosition(e,r,s);if(this.publish(o.MEDIA_ITEM_PLAYBACK_ENDED,t,s),this._m.stopAtLastFrame)return this.pauseCurrent(),void this.onActiveRendererPause();if(this.yQ(n),-1!==u){var h=void 0;(e||r)&&(h={type:l.REQUEST_TYPES.CONTINUOUS,action:l.REQUEST_TYPES.AUTOPLAY}),this.setPlaylistPosition(u,e||r,h),this.QY.looped=s.looped}else this.publish(o.PLAYLIST_COMPLETE);this.publish(o.PLAYBACK_SYNC_VIEW)}},i.prototype.UQ=function(){for(var t=0,i=Object.values(c.ActiveRendererEvent);t<i.length;t++){var n=i[t],e="on"+n;this.rQ.on(n,this[e],this)}},i.prototype.VQ=function(){var t=this.rQ;t.on(c.NextRendererEvent.ERROR,this.zQ,this),t.on(c.NextRendererEvent.INFO,this.GQ,this)},i.prototype.zQ=function(t){this.rQ.stopNextRenderer(t)},i.prototype.GQ=function(t){this.rQ.stopNextRenderer(t)},i.prototype.uQ=function(){var t=this,i=this.oQ;i.on(a.AdPlaybackControllerEvent.AD_BREAK_NEED_RESOLVE,(function(i,n){t.publish(o.AD_BREAK_NEED_RESOLVE,i,n)}),this),i.on(a.AdPlaybackControllerEvent.AD_BREAK_ITEM_PLAY,(function(i){t.PQ(i)}),this),i.on(a.AdPlaybackControllerEvent.AD_CLIENT_COMPLETED,(function(i,n){switch(i){case d.AdBreakType.PREROLL:t.CQ(n);break;case d.AdBreakType.NATIVE:}}),this),i.on(v.AD_SUBTITLE_TRACK_ADDED,(function(i){t.publish(v.AD_SUBTITLE_TRACK_ADDED,s(s({},i),{itemId:t.getPlayingItem().adBreakItemId}))}),this),i.on(a.AdPlaybackControllerEvent.AD_CLIENT_TIMEOUT,(function(i,n){switch(i){case d.AdBreakType.PREROLL:t.CQ(n)}}),this),i.on(a.AdPlaybackControllerEvent.AD_BREAK_STARTED,(function(i){t.publish(o.AD_BREAK_STARTED,i)}),this),i.on(a.AdPlaybackControllerEvent.AD_BREAK_ENDED,(function(i){var n=i.type;switch(i.setActive(!1),n){case d.AdBreakType.PREROLL:i.adBreakItems[i.adBreakItems.length-1].instream&&t.publish(o.MEDIA_ITEM_PLAYBACK_STARTED,i.mediaItem);break;case d.AdBreakType.NATIVE:t.MQ(i.mediaItem)}t.publish(o.AD_BREAK_ENDED,i),t.tQ&&(t.seek(t.tQ.deferredSeekTime),t.tQ=null)}),this),i.on(a.AdPlaybackControllerEvent.AD_BREAK_FORCE_PLAY_MIDROLL,(function(i){var n=t.getRawCurrentTime();i.type!==d.AdBreakType.MIDROLL||!i.active||i.startOffset>n||i.adBreakItems.length&&i.adBreakItems[0].instream&&(t.tQ={adBreak:i,deferredSeekTime:n},t.seek(i.startOffset))}),this),i.on(a.AdPlaybackControllerEvent.AD_BREAK_ITEM_STARTED,(function(i){t.QY.playingItem=i,i.instream&&t.publish(o.AD_BREAK_ITEM_CURRENT,i),t.publish(o.AD_BREAK_ITEM_PLAYBACK_STARTED,i)}),this),i.on(a.AdPlaybackControllerEvent.AD_BREAK_ITEM_ENDED,(function(i){t.publish(o.AD_BREAK_ITEM_PLAYBACK_ENDED,i)}),this),i.on(a.AdPlaybackControllerEvent.AD_BREAK_SKIP,(function(i,n){if(n){var e=i.startOffset+i.duration;e=(1e4*e+11)/1e4,t.seek(e)}}),this),i.on(a.AdPlaybackControllerEvent.AD_METRICS,(function(i){t.publish(o.AD_METRICS,i)}),this),i.on(a.AdPlaybackControllerEvent.CREATE_OVERLAY_CONTAINER,(function(i){t.publish(o.CREATE_OVERLAY_CONTAINER,i)}),this),i.on(a.AdPlaybackControllerEvent.AD_BREAK_ITEM_PLAYING,(function(){t.publish(o.AD_BREAK_ITEM_LOADED)}),this)},i.prototype.fQ=function(){var t=this;this.cQ.on(I.VisibilityEvent.PAGE_VISIBILITY_CHANGED,(function(i){t.handleVisibilityChange(i)}),this)},i.prototype.AQ=function(t){this.QY.currentMediaType=t},i.prototype.vQ=function(){return this.xG.getCurrentItem()},i}(u.default);i.PlaybackController=j},6589:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s,o=n(7403),u=n(9847),h=n(954),a=n(1962),c=n(1962),f=n(6342),l=n(9554),v=n(514),d=h.PLAYLIST_POS.BOTTOM,p=h.PLAYLIST_POS.RIGHT,m=h.PLAYLIST_POS.HIDDEN,b={hidden:200,bottom:540,right:627};function g(t){return f.default.classList(t)}!function(t){t.UI_INTERACT="playlistUiInteract",t.SCROLLED_TO_END="playlistScrolledToEnd",t.BOTTOM_HEIGHT_CHANGE="bottomHeightChange"}(s=i.PlaylistEvent||(i.PlaylistEvent={}));var y=function(t){function i(i,n){var e=t.call(this,"PlaylistController")||this;return e.HG=i,e.BH=n,e.HQ=i.getRootElement(),e.YQ=i.getMainElement(),e.qQ=i.getContentNode(),e._m=i.getModel(),e.wV=i.getEventBus(),e.WQ={},e._y(),e.QQ(),e.ZQ(),e}return r(i,t),i.prototype.destroy=function(){this.XQ&&(window.removeEventListener("resize",this.XQ),this.XQ=null),this.$Q&&(this.$Q.destroy(),this.$Q=null),this.JQ(),this.WQ&&(this.wV.removeEventListeners(this.WQ),this.WQ={})},i.prototype.attachUpNextMouseEvents=function(){var t=this;this.KQ&&this.KQ.addEventListener("mouseover",(function(){g(t.tZ).contains("vp-bottom-upnext")||(g(t.tZ).add("vp-bottom-upnext"),t.iZ.style.top=t.nZ()+"px",t.publish(s.UI_INTERACT,{srcElement:"ctrl-next-hover"}),t.publish(s.UI_INTERACT,{srcElement:"ui_pl_nxt_hvr"}))})),this.KQ&&this.KQ.addEventListener("mouseout",(function(){window.setTimeout((function(){parseInt(window.getComputedStyle(t.eZ).zIndex,10)<0&&(g(t.tZ).remove("vp-bottom-upnext"),t.iZ&&t.iZ.removeAttribute("style"))}),100)}))},i.prototype.detachUpNextMouseEvents=function(){var t=this;this.KQ&&this.KQ.addEventListener("mouseover",(function(){g(t.tZ).remove("vp-bottom-upnext"),t.iZ&&t.iZ.removeAttribute("style")}))},i.prototype.togglePlaylistUI=function(t){if(!this.HG.getFullscreen()&&this.rZ&&this.sZ!==m){var i=".vp-playlist-mode-"+this.sZ,n=this.qQ&&this.qQ.querySelector(i);switch(t?g(n).add("vp-hide-playlist"):this.qQ.clientWidth>b[this.sZ]&&g(n).remove("vp-hide-playlist"),this.sZ){case p:!0===t?this.YQ&&this.YQ.removeAttribute("style"):this.oZ();break;case d:!0===t?this.qQ&&(this.qQ.style.height=this.uZ.rootElem.height+"px"):(this.qQ&&(this.qQ.style.height=this.uZ.contentElem.height+"px"),this.HQ&&(this.HQ.style.height=this.uZ.rootElem.height+"px"))}}},i.prototype.getPlaylistRootElement=function(){return this.hZ},i.prototype.getPlaylistUIPosition=function(){return this.sZ},i.prototype.isPlaylistInStream=function(){return this.aZ},i.prototype.isPlaylistShown=function(){return this.rZ},i.prototype.onMediaItemLoaded=function(){this.rZ&&(this.cZ?this.fZ.syncView():this.lZ())},i.prototype.onMediaItemCurrent=function(t){this.rZ&&(this.vZ(),this.fZ&&this.fZ.onMediaItemCurrent())},i.prototype.onAdBreakStarted=function(){this.rZ&&this.dZ(!1)},i.prototype.onAdBreakEnded=function(){this.vZ()},i.prototype.QQ=function(){this.rZ&&(this._m.continuousPlay=!0,this.pZ(),this.WQ[a.FULLSCREEN_CHANGE]=this.wV.addEventListener(a.FULLSCREEN_CHANGE,this.mZ,this),this.WQ[c.VideoEvent.ENDED]=this.wV.addEventListener(c.VideoEvent.ENDED,this.bZ,this)),this.gZ&&(this.$Q=new v.default(this.gZ,this.yZ.bind(this)))},i.prototype.bZ=function(){this.dZ(!1)},i.prototype.vZ=function(){this.rZ&&(this.xG.isEndOfPlaylist()?this.dZ(!1):this.dZ(!0))},i.prototype.dZ=function(t){if(this.rZ&&this.wZ!==t&&this.KQ){var i=this.xG,n=i?i.getCurrentItem():null;t&&n&&!n.isLive()?g(this.KQ).remove("disabled"):g(this.KQ).add("disabled"),this.wZ=t}},i.prototype.yZ=function(){if(u.userAgent.mobile&&this._Z)return this._Z.style.display="block",void(g(this._Z).contains("open")?(g(this.tZ).remove("vp-bottom-upnext"),g(this._Z).remove("open"),this.iZ&&this.iZ.removeAttribute("style")):(g(this._Z).add("open"),this.iZ&&(this.iZ.style.top=this.nZ()+"px"),g(this.tZ).add("vp-bottom-upnext")));this.fZ.upNextBtnTapHandler()},i.prototype.EZ=function(){var t=this.HG.controls;return!!t&&(this.tZ=t&&t.getBottomBar(),this.iZ=this.tZ.querySelector(".vp-bottom-container"),this.gZ=this.tZ.querySelector(".vp-upnext-btn"),this._Z=this.tZ.querySelector(".vp-upnext-playlist"),this.KQ=this.tZ.querySelector(".vp-upnext-container"),!0)},i.prototype._y=function(){var t,i=this._m.playlistUIConfig;if(this.cZ=!1,this.sZ=null,this.aZ=!1,this.rZ=!1,i&&!0===i.show&&(this.sZ=i.position,!0===i.inStream&&this.sZ===p&&(this.aZ=!0),!u.userAgent.mobile)){t=this.HQ&&this.HQ.clientWidth;var n=b[this.sZ];t&&t>=n&&(this.rZ=!0)}this.rZ&&(this.EZ()||(this.rZ=!1))},i.prototype.pZ=function(){var t,i,n,e=this;if(this.rZ&&this.sZ!==m){switch(this.uZ={rootElem:{height:null,width:null},contentElem:{height:null,width:null},mainElem:{height:null,width:null}},this.sZ){case d:t=this.HQ?this.HQ.clientHeight:0,i=t+83,this.HQ&&(this.HQ.style.height=i+"px"),this.qQ&&(this.qQ.style.height=t+"px"),this.OZ=t+"px",this.uZ.rootElem.height=i,this.uZ.rootElem.width=this.HQ?this.HQ.clientWidth:0,this.uZ.contentElem.height=this.qQ?this.qQ.clientHeight:0,setTimeout((function(){e.publish(s.BOTTOM_HEIGHT_CHANGE,{height:i})}));break;case p:n=(this.qQ?this.qQ.clientWidth:0)-(this.aZ?276:318),this.YQ&&(this.YQ.style.width=n+"px"),this.uZ.rootElem.width=this.HQ?this.HQ.clientWidth:0,this.uZ.mainElem.width=n}this.wV.publish(a.PLAYER_DIMENSION_CHANGE,this.HG.getPlayerDimensions())}},i.prototype.JQ=function(){var t;if(this.rZ)switch(this.sZ){case d:t=(this.HQ?this.HQ.clientHeight:0)-83,this.HQ&&(this.HQ.style.height=t+"px"),this.uZ.rootElem.height=t,this.publish(s.BOTTOM_HEIGHT_CHANGE,{height:t})}},i.prototype.nZ=function(){return(this.qQ?this.qQ.clientHeight:0)-(this.iZ?this.iZ.clientHeight:0)},i.prototype.lZ=function(){if(!u.userAgent.mobile||this.sZ===m){switch(this.fZ=new l.default(this.wV,this.HG,this._m,this.BH),this.AZ(),this.sZ){case m:this.hZ=this.fZ.create(m),this.eZ=this.hZ,this._Z&&this._Z.appendChild(this.eZ),g(this.KQ).remove("hide"),u.userAgent.mobile||this.attachUpNextMouseEvents();break;case d:this.eZ=this.fZ.create(m),this.hZ=this.fZ.create(d),this._Z&&this._Z.appendChild(this.eZ),this.qQ&&this.qQ.appendChild(this.hZ),g(this.KQ).remove("hide"),g(this._Z).add("hide");break;case p:this.eZ=this.fZ.create(m),this.hZ=this.fZ.create(p),this._Z&&this._Z.appendChild(this.eZ),this.qQ&&this.qQ.appendChild(this.hZ),g(this.KQ).remove("hide"),g(this._Z).add("hide")}this.fZ.setPlaylistViewSize(),this.cZ=!0}},i.prototype.mZ=function(){this.HG.isDocked()||this.sZ!==m&&(!0===this.HG.getFullscreen()?this.sZ===d?this.qQ&&(this.qQ.style.height="100%"):this.sZ===p&&this.YQ&&this.YQ.style&&(this.YQ&&(this.YQ.style.width="100%"),this.YQ&&(this.YQ.style.zIndex="1")):this.sZ===d?this.qQ&&(this.qQ.style.height=this.OZ):this.sZ===p&&(this.YQ&&(this.YQ.style.width=this.uZ.mainElem.width),this.YQ&&(this.YQ.style.zIndex="auto")))},i.prototype.oZ=function(){if(!this.HG.getFullscreen())if(this.cZ){var t=this.qQ?this.qQ.clientWidth:0,i=b[this.sZ];switch(this.sZ){case p:var n=t-(this.aZ?276:318);t>=i?(this.YQ.style.width=n+"px",this.uZ.mainElem.width=n,g(this.hZ).remove("vp-hide-playlist")):(this.YQ.style.width=t+"px",this.uZ.mainElem.width=t,g(this.hZ).add("vp-hide-playlist"));break;case d:this.fZ&&this.fZ.syncPgBtns(),t>=i?g(this.hZ).remove("vp-hide-playlist"):g(this.hZ).add("vp-hide-playlist")}var e=this.HG.getPlayerDimensions();f.default.areDimensionsEqual(e,this._m.uiState)||this.wV.publish(a.PLAYER_DIMENSION_CHANGE,e)}else this._y(),this.QQ(),this.rZ&&this.lZ()},i.prototype.AZ=function(){var t=this;this.fZ.on(l.PlaylistViewEvent.UI_INTERACT,(function(i){t.publish(s.UI_INTERACT,i)}),this),this.fZ.on(l.PlaylistViewEvent.SCROLLED_TO_END,(function(){t.publish(s.SCROLLED_TO_END)}),this)},i.prototype.ZQ=function(){this.XQ=this.oZ.bind(this),window.addEventListener("resize",this.XQ)},Object.defineProperty(i.prototype,"xG",{get:function(){return this._m.playlist},enumerable:!0,configurable:!0}),i}(o.default);i.PlaylistController=y},7549:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s,o,u=n(7403),h=n(1962);!function(t){t.PRELOADING="preloading",t.IDLE="idle"}(s||(s={})),function(t){t.START_PRELOAD="startPreload",t.PLAYER_IDLE="playerIdle"}(o=i.PreloadEvent||(i.PreloadEvent={}));var a=function(t){function i(i){var n=t.call(this,"PreloadManager")||this;return n.wV=i,n.SZ=s.IDLE,n.TZ=null,n.wV.addEventListener(h.PRELOAD_START,n.IZ,n),n.wV.addEventListener(h.PRELOAD_COMPLETE,n.TS,n),n}return r(i,t),i.prototype.destroy=function(){this.TZ=null,this.SZ=s.IDLE},i.prototype.startPreload=function(){if(this.SZ===s.IDLE){var t=this.jZ();this.publish(o.START_PRELOAD,t)}},i.prototype.stopPreload=function(){},i.prototype.setPreloadItem=function(t){this.TZ=t},i.prototype.jZ=function(){return this.TZ},i.prototype.IZ=function(){this.SZ=s.PRELOADING},i.prototype.TS=function(){this.SZ=s.IDLE,this.publish(o.PLAYER_IDLE)},i}(u.default);i.default=a},83:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s,o=n(7403),u=n(742),h=n(6389),a=n(1962),c=n(6120),f=n(5244),l=n(4986),v=n(6342),d=h.WARNING_CODES,p=h.PLAYER_CODES,m=["200","400","501","430","410"],b=["7","57","304","307"],g=["700","701","710","711","720","721","722","730","731","732","740","750","760"],y=["103","500","502","503","550","403","404","504"],w=["11","12","13","14","27"],_=[h.PLAYER_DRM_CODES.E_LICENSE_REQUEST];!function(t){t.RECOVERY_START="recoveryStart",t.RECOVERY_METADATA_READY="recoveryMetadataReady"}(s=i.RecovererEvent||(i.RecovererEvent={}));var E=function(t){function i(i){var n=t.call(this,"Recoverer")||this;return n._m=i,n.wF=!1,n.MZ=0,n.NZ=null,n.kZ=!1,n.RZ(),n.LZ=0,n}return r(i,t),i.prototype.recover=function(t){var i,n,e=this.QY;if(!e.ad&&!v.default.isAdBreakType(e.currentMediaType)&&!(this.wF&&this.LZ!==t||this.kZ)){if(this.DZ(this.CZ),this.CZ=null,!this.wF){this.wF=!0;var r="recovering;"+(this.NZ?(null===(i=this.NZ)||void 0===i?void 0:i.rep)+";"+(null===(n=this.NZ)||void 0===n?void 0:n.message):"");this.publish(a.WARNING,v.default.createErr(h.ErrorGroup.Streaming,e,h.E_WARNING,d.E_RECOVERY_STATUS,null,r))}4===t&&this.publish(a.WARNING,v.default.createErr(h.ErrorGroup.Streaming,e,h.E_WARNING,d.E_RECOVER_LONG_PAUSE,null,"Recovering from long pause on live")),this.LZ=t||3,2!==this.LZ&&(this.NZ=null);var o=this.vQ();o&&(o.failoverCount++,o.recoveryStatus=c.ItemRecoveryStatus.RECOVERING),this.publish(s.RECOVERY_START)}},i.prototype.destroy=function(){this.PZ()},i.prototype.stopTimers=function(){this.DZ(this.CZ),this.CZ=null,this.DZ(this.xZ),this.xZ=null,this.DZ(this.UZ),this.UZ=null},i.prototype.toggleRecoverer=function(t){t&&t.value?this.VZ(1):(this.wF&&this.publish(a.WARNING,v.default.createErr(h.ErrorGroup.Streaming,this.QY,h.E_WARNING,d.E_RECOVERY_STATUS,null,"recovered")),this.PZ())},i.prototype.onRecoveryMetadataReady=function(){if(this.LZ)this.publish(a.WARNING,v.default.createErr(h.ErrorGroup.Streaming,this.QY,h.E_WARNING,d.E_PLAYBACK_FROZEN_DETECTED,null,this.FZ())),this._m.getState()!==f.default.VIDEO?this.PZ():this.RZ(),this.publish(s.RECOVERY_METADATA_READY);else{var t=this.vQ();t&&t.failoverCount--}},i.prototype.onMetadataLoadFailed=function(){this.wF&&1===this.LZ&&this.BZ(),this.wF=!1},i.prototype.onPause=function(){this.wF&&this._m.getState()===f.default.VIDEO&&this.PZ()},i.prototype.onPlaybackStartBlocked=function(){this.kZ=!0,this.PZ()},i.prototype.onPlaybackStartNotBlocked=function(){this.kZ=!1},i.prototype.setItemRecoveryStatus=function(t,i){t.recoveryStatus=i},Object.defineProperty(i.prototype,"recovering",{get:function(){return this.wF},enumerable:!0,configurable:!0}),i.prototype.onError=function(t){var i=this,n=2;if(t&&(t.isRecoverable=!this.zZ(t),t.isRecoverable))if(this.MZ>20)this.GZ();else{y.indexOf(t.subcategory.toString())>0?n=9:t.subcategory.toString()!==p.E_NATIVE_SRC_NOT_SUPPORTED&&t.subcategory.toString()!==p.E_NATIVE_ABORTED||(n=5);var e=h.DRM_DEBUG_CODES;switch(t.debugMessage){case e.KEY_SESSION_FAILED:n=6;break;case e.LICENSE_REQUEST_FAILED:n=7;break;case e.CERT_LOAD_FAILED:n=8}if(this.MZ++,this.NZ=t,"400"===t.category.toString()&&"7"===t.subcategory.toString())return this.DZ(this.xZ),this.xZ=new u.Timer(1e4*Math.random(),(function(){i.VZ(n)}),this,1),void this.xZ.start();this.VZ(n)}},i.prototype.zZ=function(t){var i=t.category.toString(),n=m.indexOf(i);if(n<0)return!0;var e=t.subcategory.toString();switch(m[n]){case h.E_WARNING:return b.indexOf(e)<0;case h.E_PLAYER:return b.indexOf(e)<0&&g.indexOf(e)<0;case h.E_SAPI_STREAM:return y.indexOf(e)<0;case h.E_PLAYER_JS_HLS:return w.indexOf(e)<0;case h.E_PLAYER_DRM:return _.indexOf(e)<0}return!0},i.prototype.RZ=function(){this.HZ=1e4*Math.random()+1e4,this.YZ=2e3,this.DZ(this.CZ),this.CZ=null},i.prototype.vQ=function(){return this._m.playlist?this._m.playlist.getCurrentItem():null},i.prototype.VZ=function(t){this.qZ(),1!==t?this.recover(t):this.WZ(this.HZ)},i.prototype.PZ=function(){this.RZ(),this.stopTimers(),this.wF=!1,this.LZ=0,this.NZ=null,this.MZ=0},i.prototype.WZ=function(t){var i=this;this.DZ(this.CZ),this.CZ=new u.Timer(t,(function(){i.recover(i.LZ?i.LZ:1)}),this,1),this.CZ.start()},i.prototype.BZ=function(t){(t=!!l.isNullOrUndefined(t)||t)&&(this.HZ+=this.YZ,this.YZ*=2),this.WZ(this.HZ)},i.prototype.qZ=function(){var t=this;this.UZ||(this.UZ=new u.Timer(1e3*this._m.recoveryFailureTimeout,(function(){t.GZ()}),this,1),this.UZ.start())},i.prototype.GZ=function(){var t=v.default.createErr(h.ErrorGroup.Streaming,this.QY,h.E_PLAYER,p.E_RECOVERY_FAILURE,null,this.FZ());this.publish(a.ERROR,t),this.PZ()},i.prototype.DZ=function(t){t&&t.destroy(),t=null},i.prototype.FZ=function(){var t=this.NZ,i=this.LZ;return 2===i?i+"-"+t.category+"-"+t.subcategory+"-"+t.message:i.toString()},Object.defineProperty(i.prototype,"QY",{get:function(){return this._m.playbackState},enumerable:!0,configurable:!0}),i}(o.default);i.default=E},9489:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s,o,u,h=n(7403),a=n(9847),c=n(9134),f=n(440),l=n(1204),v=n(2878),d=n(4986),p=n(6342),m=n(6389),b=n(1279),g=n(8087),y=n(3891),w=n(8259),_=n(8696),E=n(6125),O=n(2758),A=n(1600),S=n(4685),T=n(6103);!function(t){t.RENDERER_SWITCH="rendererSwitch",t.RENDERER_CREATED="rendererCreated",t.RENDERER_TIMEOUT="errorTimeout",t.RENDERER_READY_TO_PLAY="rendererReadyToPlay",t.PLAY_CALLED="playCalled"}(s=i.RendererControllerEvent||(i.RendererControllerEvent={})),function(t){t.CLICK="ActiveRendererClick",t.SRC_SWITCHING="ActiveRendererSrcSwitching",t.SRC_SWITCHED="ActiveRendererSrcSwitched",t.PLAYBACK_START_BLOCKED="ActiveRendererPlayBlocked",t.PLAYBACK_START_NOT_BLOCKED="ActiveRendererPlayNotBlocked",t.SKIPPED="ActiveRendererSkipped",t.PAUSE="ActiveRendererPause",t.ENDED="ActiveRendererEnded",t.ERROR="ActiveRendererError",t.INFO="ActiveRendererInfo",t.LOADEDMETADATA="ActiveRendererLoadedMetadata",t.LOADEDDATA="ActiveRendererLoadedData",t.STALLED="ActiveRendererStalled",t.LOADSTART="ActiveRendererLoadStart",t.PLAY="ActiveRendererPlay",t.PLAYING="ActiveRendererPlaying",t.SEEKING="ActiveRendererSeeking",t.SEEKED="ActiveRendererSeeked",t.TIMEUPDATE="ActiveRendererTimeupdate",t.VOLUMECHANGE="ActiveRendererVolumechange",t.WAITING="ActiveRendererWaiting",t.END_FULLSCREEN="ActiveRendererEndFullscreen",t.ENTER_FULLSCREEN="ActiveRendererEnterFullscreen",t.PLAY_COMPLETE="ActiveRendererPlayComplete",t.DATERANGE_STARTED="ActiveRendererDaterangeStarted",t.DATERANGE_ENDED="ActiveRendererDaterangeEnded"}(o=i.ActiveRendererEvent||(i.ActiveRendererEvent={})),function(t){t.SRC_SWITCHING="NextRendererSrcSwitching",t.SRC_SWITCHED="NextRendererSrcSwitched",t.PAUSE="NextRendererPaused",t.ENDED="NextRendererEnded",t.ERROR="NextRendererVideoError",t.INFO="NextRendererVideoInfo",t.LOADEDMETADATA="NextRendererLoadedMetadata",t.LOADEDDATA="NextRendererLoadedData",t.STALLED="NextRendererStalled",t.LOADSTART="NextRendererLoadStart",t.PLAY="NextRendererPlay",t.PLAYING="NextRendererPlaying",t.SEEKING="NextRendererSeeking",t.SEEKED="NextRendererSeeked",t.TIMEUPDATE="NextRendererTimeupdate",t.VOLUMECHANGE="NextRendererVolumechange",t.WAITING="NextRendererWaiting"}(u=i.NextRendererEvent||(i.NextRendererEvent={}));var I=function(t){function i(i,n,e,r){var s=t.call(this,"RendererController")||this;return s.BH=e,s._m=i,s.wV=n,s.LY=r,s.QZ=null,s.ZZ=null,s.XZ=null,s.$Z=null,s.JZ={},s.KZ={},s.tX={},s.iX=s.nX(),s.eX=!1,s}return r(i,t),Object.defineProperty(i.prototype,"activeRendererType",{get:function(){var t,i;return(null===(i=null===(t=this.QZ)||void 0===t?void 0:t.type)||void 0===i?void 0:i.toLowerCase())||""},enumerable:!0,configurable:!0}),i.prototype.prepareNextRenderer=function(t,i){var n=this;if(i||(i=function(){}),t){var e=this.rX(t),r=e?S.RendererType.EXTERNAL:t.rendererType;if(a.userAgent.safari&&t instanceof f.default&&(!t.isLive()||t.license.isDrm)&&(r=S.RendererType.HTML5_RAW),!r){var o=void 0,u=void 0,h=void 0;return v.default.isHtml5MseAvailable()?(o=m.PLAYER_CODES.E_NO_RENDERER_FOUND,u="no renderer type is applicable for the playable item",h=p.default.createErr(m.ErrorGroup.Configuration,this._m.playbackState,m.E_PLAYER,o,"",u)):(o=m.INFO_CODES.E_FLASH_RENDERER_NOT_SUPPORTED,u="flash renderer is not supported for the playable item",h=p.default.createErr(m.ErrorGroup.Restriction,this._m.playbackState,m.E_INFO,o,"",u)),void i(h)}var c=this.sX(t);if(this.XZ!==c)!this.iX&&this.QZ&&this.QZ.type===r&&this.QZ.type!==S.RendererType.EXTERNAL||t.isRecovering()&&this.QZ?this.ZZ=this.QZ:(this.ZZ=r===S.RendererType.EXTERNAL?this.oX(e):this.uX(r),this.hX(this.ZZ)),this.XZ=c,this.eX=!0,this.ZZ.waitForReady((function(t){n.eX=!1,t&&(n.publish(s.RENDERER_TIMEOUT),n.ZZ&&n.aX(n.ZZ)),i(t)}));else{if(this.eX)return;i()}}else i(new Error("no playable item to be rendered"))},i.prototype.setItemNextRenderer=function(t,i){var n=this;if(void 0===i&&(i=0),!t)return!1;var e=this.sX(t);if(this.XZ!==e)return this.prepareNextRenderer(t,(function(){n.setItemNextRenderer(t,i)})),!0;var r=this.sX(t,i);if(this.$Z===r)return!0;if(this.ZZ){this.$Z=r;var s=this.ZZ.getSyncState(),o=this.ZZ.setPlayableItem(t,i,this.LY.recovering);return-1!==s&&this.LY.recovering&&this.ZZ.startSync(),o}return!1},i.prototype.preloadNextRenderer=function(t){if(this.ZZ&&this.ZZ.preload){var i=this.ZZ.getPlayableItem();if(i&&(this._m.preload||t)&&this.ZZ.type===S.RendererType.HTML5_HLS){var n={startOffset:i.customConfig&&i.customConfig.playbackStart||NaN,bufferLimit:this._m.preloadBufferSize||30};this.ZZ.preload(n)}}},i.prototype.switchAndPlayNextRenderer=function(t,i){void 0===i&&(i=!1),this.switchToNextRenderer(i),this.publish(s.RENDERER_READY_TO_PLAY,t)},i.prototype.switchToNextRenderer=function(t){void 0===t&&(t=!1),this.ZZ&&(delete this.JZ[this.ZZ.type],this.cX(this.ZZ),this.switchToRenderer(this.ZZ,t),this.XZ=null,this.$Z=null)},i.prototype.didRendererTimeOut=function(){return!(!this.QZ||!this.QZ.timedOut)},i.prototype.getActiveRenderer=function(){return this.QZ},i.prototype.getNextRendererNode=function(){return this.ZZ&&this.ZZ.node||null},i.prototype.syncPlaybackState=function(){this.QZ&&(this.QZ.paused=this._m.isPaused(),this.QZ.seeking=this._m.isSeeking())},i.prototype.rewindAfterEnd=function(t){if(this.QZ)if(t)switch(this.QZ.type){case S.RendererType.HTML5_RAW:case S.RendererType.HTML5_HLS:this.QZ.node&&(this.QZ.node.src="")}else this.QZ.seek(0)},i.prototype.play=function(t){this.publish(s.PLAY_CALLED),this.QZ&&this.QZ.play(t)},i.prototype.pause=function(){this.QZ&&(this.QZ.type===S.RendererType.HTML5_TV_TIZEN||this.QZ.type===S.RendererType.HTML5_TV_ORSAY||(d.isFunction(this.QZ.pause)?this.QZ.pause():this.QZ.node&&this.QZ.node.pause()))},i.prototype.getCurrentDate=function(){return this.QZ&&this.QZ.getCurrentDate()||0},i.prototype.endVideo=function(){var t=this.QZ;t&&!t.ended&&(t.ended=!0,t.type===S.RendererType.HTML5_TV_TIZEN||t.type===S.RendererType.HTML5_TV_ORSAY||(d.isFunction(t.stop)?t.stop():t.node&&t.node.pause()))},i.prototype.seek=function(t){this.QZ&&this.QZ.seek(t)},i.prototype.getCurrentTime=function(){return this.QZ?this.QZ.getCurrentTime():0},i.prototype.getDuration=function(){return this.QZ?this.QZ.getDuration():NaN},i.prototype.getMuted=function(){if(this.QZ)return this.QZ.getMuted()},i.prototype.getVolume=function(){return this.QZ?this.QZ.getVolume():NaN},i.prototype.setQuality=function(t){this.QZ&&this.QZ.setQuality(t)},i.prototype.showAirplayTargetMenu=function(){this.QZ&&this.QZ.showAirplayTargetMenu&&this.QZ.showAirplayTargetMenu()},i.prototype.setPIPMode=function(t){var i;null===(i=this.QZ)||void 0===i||i.setPIPMode(t)},i.prototype.setVolume=function(t){this.QZ&&this.QZ.setVolume(t)},i.prototype.setMute=function(t){this.QZ&&this.QZ.setMute(!!t)},i.prototype.setAudioLanguage=function(t){this.QZ&&this.QZ.setAudioLanguage&&this.QZ.setAudioLanguage(t)},i.prototype.stopMedia=function(){if(this.QZ)return this.QZ.detachNode(),this.QZ.stopMedia()},i.prototype.stopNextRenderer=function(t){if(this.ZZ)return this.ZZ.setError(t),this.ZZ.detachNode(),this.ZZ.stopMedia()},i.prototype.skip=function(){this.QZ&&d.isFunction(this.QZ.skip)&&this.QZ.skip()},i.prototype.switchToRenderer=function(t,i){this.fX(this.QZ);var n=this.QZ,e=n&&n!==t;e&&a.userAgent.mobile&&v.default.exitFullscreen(n.node),this.lX(t),this._m.playbackState.rendererType=t.type,this.setVolume(this._m.volume),this.setMute(this._m.mute),this.vX(this.QZ),e&&(n.type===S.RendererType.HTML5_HLS_360||n.type===S.RendererType.HTML5_RAW_360||n.type===S.RendererType.EXTERNAL?p.default.classList(n.container).remove("vp-renderer-active"):n.node&&p.default.classList(n.node).remove("vp-renderer-active"),i?this.aX(n):this.dX(n)),this.pX(t,!0),t.type===S.RendererType.HTML5_HLS_360||t.type===S.RendererType.HTML5_RAW_360||t.type===S.RendererType.EXTERNAL?p.default.classList(t.container).add("vp-renderer-active"):t.node&&p.default.classList(t.node).add("vp-renderer-active"),this.publish(s.RENDERER_SWITCH,n,t)},i.prototype.enableMobileNativeCC=function(t){this.QZ&&this.QZ.enableMobileNativeCC&&this.QZ.enableMobileNativeCC(t)},i.prototype.handleAdvancePreparePreloadNextRenderer=function(t){var i=this;t&&t.rendererType===S.RendererType.HTML5_HLS&&this.prepareNextRenderer(t,(function(n){n||i.ZZ===i.QZ||t.isLive()||(i.setItemNextRenderer(t,0),i.preloadNextRenderer(!0))}))},i.prototype.suspendStreaming=function(){this.QZ&&this.QZ.suspendStreaming()},i.prototype.resumeStreaming=function(){this.QZ&&this.QZ.resumeStreaming()},i.prototype.getSyncOffset=function(){return this.QZ?this.QZ.getSyncOffset():NaN},i.prototype.getSyncState=function(){return this.QZ?this.QZ.getSyncState():-1},i.prototype.startSync=function(){var t;null===(t=this.QZ)||void 0===t||t.startSync()},i.prototype.stopSync=function(){var t;null===(t=this.QZ)||void 0===t||t.stopSync()},i.prototype.destroy=function(){this.QZ&&this.QZ.destroy(),this.ZZ&&this.ZZ.destroy()},i.prototype.vX=function(t){t&&(this.mX(t,S.CustomRendererEvent,o,this.KZ),this.mX(t,S.RendererEvent,o,this.KZ))},i.prototype.fX=function(t){t&&(t.removeEventListeners(this.KZ),this.KZ={})},i.prototype.hX=function(t){t&&t!==this.QZ&&this.mX(t,S.RendererEvent,u,this.tX)},i.prototype.cX=function(t){t&&(t.removeEventListeners(this.tX),this.tX={})},i.prototype.mX=function(t,i,n,e){var r=this;if(e)for(var s=function(s){if(i[s]){var u=i[s];e[u]=t.on(u,(function(t){n[s]&&r.publish.call(r,n[s],t)}),o)}},o=this,u=0,h=Object.keys(i);u<h.length;u++){s(h[u])}},i.prototype.bX=function(t){var i=this._m,n=this.wV,e=this.JZ[t];if(e)return e.bindCustomEvents(),e;switch(t){case S.RendererType.HTML5_HLS:e=new y.default(n,i);break;case S.RendererType.HTML5_RAW_360:e=new E.default(n,i);break;case S.RendererType.HTML5_HLS_360:e=new w.default(n,i);break;case S.RendererType.EXTERNAL:e=new g.default;break;case S.RendererType.HTML5_TV:e=new O.default(n,i);break;case S.RendererType.HTML5_TV_ORSAY:e=new A.default(n,i);break;case S.RendererType.HTML5_TV_TIZEN:e=new T.default(n,i);break;case S.RendererType.HTML5_RAW:default:e=new _.default(n,i)}return this.publish(s.RENDERER_CREATED,e),this.gX(e,t),e},i.prototype.uX=function(t){return this.bX(t)},i.prototype.oX=function(t){if(this.QZ&&this.QZ.type===S.RendererType.EXTERNAL&&this.QZ.getExternalPlayer()===t)return this.QZ;var i=this.uX(S.RendererType.EXTERNAL);return i.setExternalPlayer(t),i},i.prototype.dX=function(t){var i=[S.RendererType.HTML5_RAW_360,S.RendererType.HTML5_HLS_360,S.RendererType.EXTERNAL];if(t){var n=t.type;this.pX(t,!1),this.JZ[n]||-1!==i.indexOf(n)?t.destroy():this.gX(t,n)}},i.prototype.pX=function(t,i){t&&(i?(t.detachNode&&t.detachNode(),t.reattachNode&&t.reattachNode()):(t.detachNode&&t.detachNode(),t.stopMedia&&t.stopMedia()))},i.prototype.rX=function(t){if(!(t instanceof c.default&&t.adPluginMimeType))return null;if(!this._m.config.ads.preferExternalPlayback)return null;var i,n=this.BH.getPlugin(b.PluginType.AD,t.adPluginMimeType);if(!n||!d.isExternalPlayer(n))return null;var e=(i=n).getCapabilities(),r=!1,s=!1;return t.streams.forEach((function(t){/\.m3u8/i.test(t.url)?r=!0:/\.(?:mp4|webm)/i.test(t.url)&&(s=!0)})),r&&e.indexOf(S.ExternalPlayerCapability.RENDER_HLS)>-1||s&&e.indexOf(S.ExternalPlayerCapability.RENDER_PDL)>-1?i:null},i.prototype.sX=function(t,i){var n,e=[];if(i||(i=0),e.push(t.rendererType),e.push(i),t instanceof c.default){e.push("ad"),e.push(t.adBreakItemId),t.adPluginMimeType&&e.push(t.adPluginMimeType),(n=t.streams)&&n.length>0&&e.push(n[0].url);var r=t.adBreak;r&&(e.push(r.adBreakId),e.push(r.adBreakItems.length))}else t instanceof f.default&&(e.push("mediaItem"),e.push(t.id),(n=t.streams)&&n.length>0&&e.push(n[0].url));return e.join("|")},i.prototype.nX=function(){var t=a.userAgent.mobile&&!l.default.hasNativeAutoplaySupport;return!(a.userAgent.tv||a.userAgent.ios||t)},i.prototype.aX=function(t){return delete this.JZ[t.type],t.destroy()},i.prototype.lX=function(t){t&&(this.QZ=t,t.setActive(!0))},i.prototype.gX=function(t,i){t&&(this.JZ[i]=t,t.setActive(!1))},i}(h.default);i.RendererController=I},4411:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s,o=n(7403),u=n(954);!function(t){t.PAGE_VISIBILITY_CHANGED="pageVisibilityChanged"}(s=i.VisibilityEvent||(i.VisibilityEvent={}));var h=[{prop:"hidden",name:"visibilitychange"},{prop:"mozHidden",name:"mozvisibilitychange"},{prop:"webkitHidden",name:"webkitvisibilitychange"},{prop:"msHidden",name:"msvisibilitychange"}],a=function(t){function i(i){var n=t.call(this,"VisibilityManager")||this;return n._m=i,n.yX=null,n.wX="hidden",n._X=null,n.yX=n.EX(),n.yX&&(n.OX=n.OX.bind(n),document.addEventListener(n.yX,n.OX,!1)),n}return r(i,t),i.prototype.destroy=function(){this.yX&&(document.removeEventListener(this.yX,this.OX,!1),this.yX=null)},i.prototype.isPlayerVisible=function(){var t=this.AX();return!(document[this.wX]||t&&null===t.offsetParent||!1)},i.prototype.EX=function(){var t=h.filter((function(t){return t.prop in document})),i=t&&t[0];return i?(this.wX=i.prop,i.name):null},i.prototype.AX=function(){if(this._X)return this._X;var t=this._m.playerRootElement,i=t&&void 0!==t.getElementsByClassName&&t.getElementsByClassName(u.VIDEO_MAIN_ELEMENT_CLASS);return this._X=i&&i.length&&i[0]||null,this._X},i.prototype.OX=function(){this.publish(s.PAGE_VISIBILITY_CHANGED,this.isPlayerVisible())},i}(o.default);i.default=a},8110:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.CERT_DATA=new Uint8Array([48,130,4,203,48,130,3,179,160,3,2,1,2,2,8,13,86,142,88,131,182,234,139,48,13,6,9,42,134,72,134,247,13,1,1,5,5,0,48,127,49,11,48,9,6,3,85,4,6,19,2,85,83,49,19,48,17,6,3,85,4,10,12,10,65,112,112,108,101,32,73,110,99,46,49,38,48,36,6,3,85,4,11,12,29,65,112,112,108,101,32,67,101,114,116,105,102,105,99,97,116,105,111,110,32,65,117,116,104,111,114,105,116,121,49,51,48,49,6,3,85,4,3,12,42,65,112,112,108,101,32,75,101,121,32,83,101,114,118,105,99,101,115,32,67,101,114,116,105,102,105,99,97,116,105,111,110,32,65,117,116,104,111,114,105,116,121,48,30,23,13,49,56,48,51,50,57,49,57,51,57,49,53,90,23,13,50,48,48,51,50,57,49,57,51,57,49,53,90,48,98,49,11,48,9,6,3,85,4,6,19,2,85,83,49,20,48,18,6,3,85,4,10,12,11,89,97,104,111,111,47,32,73,110,99,46,49,19,48,17,6,3,85,4,11,12,10,50,65,82,78,74,89,51,56,70,87,49,40,48,38,6,3,85,4,3,12,31,70,97,105,114,80,108,97,121,32,83,116,114,101,97,109,105,110,103,58,32,89,97,104,111,111,47,32,73,110,99,46,48,129,159,48,13,6,9,42,134,72,134,247,13,1,1,1,5,0,3,129,141,0,48,129,137,2,129,129,0,188,20,145,11,182,224,114,206,51,252,37,198,52,3,54,245,37,134,121,169,73,236,52,112,24,241,70,22,210,115,167,90,251,200,152,188,188,122,248,143,243,225,173,191,185,30,115,239,103,231,218,198,227,19,127,170,241,201,173,213,94,209,56,9,94,211,3,7,194,64,210,84,119,83,195,185,15,252,8,33,33,15,107,215,254,95,9,86,83,212,175,88,26,254,114,126,151,63,228,22,210,127,45,230,42,171,74,61,159,64,71,40,184,184,17,128,230,57,139,130,231,123,92,174,174,146,237,49,2,3,1,0,1,163,130,1,234,48,130,1,230,48,29,6,3,85,29,14,4,22,4,20,127,187,42,2,137,89,223,166,117,128,127,189,93,223,97,53,42,199,159,128,48,12,6,3,85,29,19,1,1,255,4,2,48,0,48,31,6,3,85,29,35,4,24,48,22,128,20,99,228,71,84,203,133,113,89,70,44,131,172,204,68,49,100,103,3,44,190,48,129,226,6,3,85,29,32,4,129,218,48,129,215,48,129,212,6,9,42,134,72,134,247,99,100,5,1,48,129,198,48,129,195,6,8,43,6,1,5,5,7,2,2,48,129,182,12,129,179,82,101,108,105,97,110,99,101,32,111,110,32,116,104,105,115,32,99,101,114,116,105,102,105,99,97,116,101,32,98,121,32,97,110,121,32,112,97,114,116,121,32,97,115,115,117,109,101,115,32,97,99,99,101,112,116,97,110,99,101,32,111,102,32,116,104,101,32,116,104,101,110,32,97,112,112,108,105,99,97,98,108,101,32,115,116,97,110,100,97,114,100,32,116,101,114,109,115,32,97,110,100,32,99,111,110,100,105,116,105,111,110,115,32,111,102,32,117,115,101,44,32,99,101,114,116,105,102,105,99,97,116,101,32,112,111,108,105,99,121,32,97,110,100,32,99,101,114,116,105,102,105,99,97,116,105,111,110,32,112,114,97,99,116,105,99,101,32,115,116,97,116,101,109,101,110,116,115,46,48,53,6,3,85,29,31,4,46,48,44,48,42,160,40,160,38,134,36,104,116,116,112,58,47,47,99,114,108,46,97,112,112,108,101,46,99,111,109,47,107,101,121,115,101,114,118,105,99,101,115,46,99,114,108,48,14,6,3,85,29,15,1,1,255,4,4,3,2,5,32,48,49,6,11,42,134,72,134,247,99,100,6,13,1,3,1,1,255,4,31,1,112,116,53,108,106,117,104,50,102,111,115,108,106,116,102,103,109,114,122,117,100,104,103,116,112,122,121,51,117,116,48,55,6,11,42,134,72,134,247,99,100,6,13,1,4,1,1,255,4,37,1,97,100,110,104,120,103,103,98,117,98,103,100,105,120,122,115,105,51,122,103,98,48,116,104,112,120,49,117,101,120,105,102,49,120,102,56,48,13,6,9,42,134,72,134,247,13,1,1,5,5,0,3,130,1,1,0,155,63,179,107,215,161,134,119,228,77,138,78,87,241,189,105,187,60,231,127,57,73,95,133,174,62,237,222,209,0,87,24,52,128,67,149,102,150,113,197,14,188,171,149,139,249,109,9,94,21,47,226,21,186,199,199,183,95,27,14,202,148,181,196,237,147,238,206,58,104,48,21,239,155,201,207,146,89,111,98,114,120,193,63,127,204,58,30,122,74,170,83,58,218,54,92,98,255,74,171,27,195,3,239,143,161,92,75,81,98,37,58,220,215,222,215,65,8,159,71,5,63,30,149,177,185,23,77,219,37,13,43,28,51,163,18,29,63,243,65,129,133,169,25,169,114,68,171,130,246,187,8,133,177,113,25,188,2,220,47,116,87,59,255,169,121,192,200,89,36,15,30,160,154,5,20,196,147,241,130,22,197,154,202,213,75,142,195,70,202,227,211,81,54,249,97,142,239,1,169,235,126,188,40,24,173,192,157,190,90,231,88,101,46,186,209,207,188,109,86,204,175,64,171,101,210,40,93,76,13,4,161,110,242,65,13,0,202,238,19,197,227,71,30,11,210,211,158,62,49,218,231,185,172,166,120])},4593:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(742),r=n(6389),s=n(6342),o=n(8110),u="https://assets.video.yahoo.net/fairplay.cer",h=r.PLAYER_DRM_CODES,a=r.INFO_CODES,c=r.ErrorGroup.Configuration,f=function(){function t(t,i,n,e){this.SX=null,this.rT=t,this.TX=i||u,this.SX=this.TX===u?o.CERT_DATA:null,this.IX=n,this.jX=e,this.MX=this.NX.bind(this),this.kX=this.RX.bind(this),this.LX=this.DX.bind(this),this.init()}return t.prototype.destroy=function(){this.rT.removeEventListener("webkitneedkey",this.MX),this.CX&&(this.PX(),this.CX=null)},t.prototype.init=function(){this.rT.addEventListener("webkitneedkey",this.MX)},t.prototype.PX=function(){this.CX.removeEventListener("webkitkeymessage",this.kX),this.CX.removeEventListener("webkitkeyerror",this.LX)},t.prototype.xX=function(){var t=this;null!==this.TX&&""!==this.TX?void 0!==window.WebKitMediaKeys?this.SX?this.UX():e.Loader.ajax(this.TX,{method:"GET",context:this,headers:{Pragma:"Cache-Control: no-cache","Cache-Control":"max-age=0"},responseType:"arraybuffer",successHandler:function(i){t.SX=new Uint8Array(i),null!==t.SX?t.UX():t.VX(h.E_CERT_NO_DATA)},failureHandler:function(i){t.VX(h.E_CERT_LOAD_FAILED,r.ErrorGroup.Streaming,i.toString())},timeout:1e4}):this.VX(a.E_DRM_UNSUPPORTED_BROWSER,c):this.VX(h.E_CERTPATH_MISSING,c)},t.prototype.UX=function(){var t=this.FX(this.BX),i=this.zX(t),n=this.GX(this.BX,i,this.SX);if(!this.rT.webkitKeys){var e=this.HX();this.rT.webkitSetMediaKeys(new WebKitMediaKeys(e))}this.rT.webkitKeys||this.VX(h.E_KEY_CREATION_FAILED),this.CX&&(this.PX(),this.CX.close()),this.CX=this.rT.webkitKeys.createSession("video/mp4",n),this.CX?(this.CX.contentId=i,this.CX.destinationURL=t,this.CX.addEventListener("webkitkeymessage",this.kX),this.CX.addEventListener("webkitkeyadded",(function(t){})),this.CX.addEventListener("webkitkeyerror",this.LX)):this.VX(h.E_KEY_SESSION_FAILED)},t.prototype.NX=function(t){this.IX(),null!==t.initData?(this.BX=t.initData,this.xX()):this.VX(h.E_INIT)},t.prototype.RX=function(t){this.YX(t.target,t.message)},t.prototype.DX=function(t){this.VX(h.E_KEY_ERROR,r.ErrorGroup.Streaming,t.currentTarget.error.code+"-"+t.currentTarget.error.systemCode)},t.prototype.zX=function(t){var i=document.createElement("a");i.href=t;var n=i.search.substr(1).split("&").filter((function(t){return t.length>2&&"b"===t[0]&&"="===t[1]}));return n.length?n[0].split("=")[1]:""},t.prototype.FX=function(t){var i=s.default.array16ToString(t).replace("skd://","https://");return i=i.substring(1,i.length)},t.prototype.GX=function(t,i,n){"string"==typeof i&&(i=s.default.stringToArray16(i));var e=0,r=new ArrayBuffer(t.byteLength+4+i.byteLength+4+n.byteLength),o=new DataView(r);new Uint8Array(r,e,t.byteLength).set(t),e+=t.byteLength,o.setUint32(e,i.byteLength,!0),e+=4;var u=new Uint8Array(r,e,i.byteLength);return u.set(i),e+=u.byteLength,o.setUint32(e,n.byteLength,!0),e+=4,new Uint8Array(r,e,n.byteLength).set(n),new Uint8Array(r,0,r.byteLength)},t.prototype.HX=function(){return WebKitMediaKeys.isTypeSupported("com.apple.fps.1_0","video/mp4")?"com.apple.fps.1_0":(this.VX(h.E_NO_KEY_SYSTEM),null)},t.prototype.YX=function(t,i){var n=this,r={spc:s.default.base64EncodeUint8Array(i),assetId:t.contentId};e.Loader.ajax(t.destinationURL,{method:"POST",body:JSON.stringify(r),context:this,responseTypeJson:!0,beforeSend:function(i){i.session=t},successHandler:function(t,i,e,r){n.qX(t,r.session)},failureHandler:function(t,i,e){var r=403===e?a.E_DRM_FORBIDDEN_LICENSE:h.E_LICENSE_REQUEST;n.VX(r)},timeout:1e4})},t.prototype.qX=function(t,i){i.update(s.default.base64DecodeUint8Array(t.ckc))},t.prototype.VX=function(t,i,n){var e,s;void 0===i&&(i=r.ErrorGroup.Streaming),r.isInfoCode(t)?(e=r.E_INFO,s=a):(e=r.E_PLAYER_DRM,s=h);Object.keys(s)[parseInt(t,10)-1];this.jX(i,e,t,"",n),this.destroy()},t}();i.default=f},6389:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(5244),r=n(1954),s=n(742).errorCodes,o=["305","306","307"];i.E_INFO=s.E_INFO,i.E_WARNING=s.E_WARNING,i.E_YVAP=s.E_YVAP,i.E_SAPI_STREAM=s.E_SAPI_STREAM,i.E_SAPI_PLAYLIST=s.E_SAPI_PLAYLIST,i.E_SAPI_RELATED=s.E_SAPI_RELATED,i.E_SAPI_POPULAR=s.E_SAPI_POPULAR,i.E_CAST=s.E_CAST,i.E_PLAYER=s.E_PLAYER,i.E_PLAYER_FAILOVER=s.E_PLAYER_FAILOVER,i.E_PLAYER_DRM=s.E_PLAYER_DRM,i.E_PLAYER_JS_HLS=s.E_PLAYER_JS_HLS,i.E_SAPI_ABSTRACT=s.E_SAPI_ABSTRACT,i.E_SAPI_CLOSEDCAPTION=s.E_SAPI_CLOSEDCAPTION;var u=i.E_PLAYER,h=i.E_PLAYER_FAILOVER,a=i.E_PLAYER_JS_HLS,c=i.E_SAPI_ABSTRACT,f=i.E_SAPI_CLOSEDCAPTION;function l(t){return t.group+t.phase+"-"+t.category+"-"+t.subcategory}function v(t){var i=[];if(t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&i.push(t[n]);return i}function d(t,i,n){i.forEach((function(i){t[i]=n}))}i.INFO_CODES=s.INFO_CODES,i.WARNING_CODES=s.WARNING_CODES,i.PLAYER_CODES=s.PLAYER_CODES,i.PLAYER_DRM_CODES=s.PLAYER_DRM_CODES,i.PLAYER_JS_HLS_CODES=s.PLAYER_JS_HLS_CODES,i.SAPI_CODES=s.SAPI_CODES,i.CAST_CODES=s.CAST_CODES,i.rep=l,i.isInfoCode=function(t){for(var n in i.INFO_CODES)if(Object.prototype.hasOwnProperty.call(i.INFO_CODES,n)&&i.INFO_CODES[n]===t)return!0;return!1},function(t){t.Streaming="P",t.Service="S",t.Configuration="C",t.Restriction="R"}(i.ErrorGroup||(i.ErrorGroup={})),function(t){t.KEY_SESSION_FAILED="1",t.LICENSE_REQUEST_FAILED="2",t.CERT_LOAD_FAILED="3"}(i.DRM_DEBUG_CODES||(i.DRM_DEBUG_CODES={}));var p={};p[i.INFO_CODES.E_PLAYER_360_IS_NOT_SUPPORTED]=r.default.ERR_TITLE_CANNOT_PLAY_360_VIDEO,p[i.INFO_CODES.E_SAPI_RESTRICTED_NETWORK_TYPE]=r.default.ERR_TITLE_CANNOT_PLAY_VIDEO,p[i.INFO_CODES.E_FLASH_RENDERER_NOT_SUPPORTED]=r.default.ERR_TITLE_CANNOT_PLAY_VIDEO,d(p,[i.INFO_CODES.E_SAPI_LICENSE_ERROR,i.INFO_CODES.E_SAPI_UNAVAILABLE_TEMP,i.INFO_CODES.E_SAPI_GEO,i.INFO_CODES.E_SAPI_BLACKOUT],r.default.ERR_TITLE_VIDEO_NOT_AVAILABLE),v(i.INFO_CODES).forEach((function(t){p[t]||(p[t]=r.default.ERR_TITLE_CANNOT_PLAY_VIDEO)}));var m={};m[i.INFO_CODES.E_SAPI_UNAVAILABLE_TEMP]=r.default.ERR_UNAVAILABLE,m[i.INFO_CODES.E_SAPI_LICENSE_ERROR]=r.default.ERR_UNAVAILABLE,m[i.INFO_CODES.E_SAPI_GEO]=r.default.ERR_GEO,m[i.INFO_CODES.E_SAPI_BLACKOUT]=r.default.ERR_BLACKOUT,m[i.INFO_CODES.E_SAPI_DEVICE]=r.default.ERR_DEVICE,m[i.INFO_CODES.E_SAPI_EMBED]=r.default.ERR_EMBED,m[i.INFO_CODES.E_PLAYER_ANDROID_CHROME_REQUIRED]=r.default.ERR_ANDROID_LIVE_CHROME_REQUIRED,m[i.INFO_CODES.E_PLAYER_NO_COMPATIBLE_FORMAT]=r.default.ERR_BROWSER_UNSUPPORTED,m[i.INFO_CODES.E_PLAYER_360_IS_NOT_SUPPORTED]=r.default.ERR_BROWSER_UNSUPPORTED_SKIP_IN_10,m[i.INFO_CODES.E_FLASH_RENDERER_NOT_SUPPORTED]=r.default.ERR_BROWSER_UNSUPPORTED,m[i.INFO_CODES.E_DRM_UNSUPPORTED_OS]=function(t){return t.ios?r.default.ERR_DRM_IOS_UNSUPPORTED_OS_VER:null},m[i.INFO_CODES.E_DRM_UNSUPPORTED_BROWSER]=function(t){return t.android?r.default.ERR_DRM_ANDROID_UNSUPPORTED_BROWSER:t.ios?r.default.ERR_DRM_IOS_UNSUPPORTED_BROWSER:null};var b={};b[i.PLAYER_CODES.E_NATIVE_SRC_NOT_SUPPORTED]=r.default.ERR_TITLE_VIDEO_NOT_AVAILABLE,b[i.INFO_CODES.E_SAPI_RESTRICTED_NETWORK_TYPE]=r.default.ERR_TITLE_CANNOT_PLAY_VIDEO,d(b,[i.PLAYER_CODES.E_NATIVE_ABORTED],r.default.ERR_TITLE_CANNOT_PLAY_VIDEO),v(i.PLAYER_CODES).forEach((function(t){b[t]||(b[t]=r.default.ERR_TITLE_SOMETHING_WENT_WRONG)}));var g={};g[i.PLAYER_CODES.E_NATIVE_NETWORK_FAILURE]=r.default.ERR_NETWORK_ISSUE,i.PLAYER_CODES.E_NO_PLUGIN_FOUND="603",v(i.PLAYER_CODES).forEach((function(t){g[t]||(g[t]=r.default.ERR_GENERAL_ERROR)}));var y={};v(i.PLAYER_JS_HLS_CODES).forEach((function(t){y[t]=r.default.ERR_TITLE_SOMETHING_WENT_WRONG}));var w={};v(i.PLAYER_JS_HLS_CODES).forEach((function(t){w[t]=r.default.ERR_GENERAL_ERROR}));var _={};d(_,[i.SAPI_CODES.E_INCOMPATIBLE_FORMAT,i.SAPI_CODES.E_NO_STREAMS],r.default.ERR_TITLE_SOMETHING_WENT_WRONG),d(_,[i.SAPI_CODES.E_UNAUTHORIZED_USER,i.SAPI_CODES.E_DRM_RESTRICTED],r.default.ERR_TITLE_CANNOT_PLAY_VIDEO),v(i.SAPI_CODES).forEach((function(t){_[t]||(_[t]=r.default.ERR_TITLE_VIDEO_NOT_AVAILABLE)}));var E={};E[i.SAPI_CODES.E_UNAUTHORIZED_USER]=r.default.ERR_TITLE_VIDEO_NOT_AVAILABLE,E[i.SAPI_CODES.E_RESTRICTED_TO_INTERNAL]=r.default.ERR_UNAVAILABLE,d(E,[i.SAPI_CODES.E_INCOMPATIBLE_FORMAT,i.SAPI_CODES.E_NO_STREAMS],r.default.ERR_GENERAL_ERROR),v(i.SAPI_CODES).forEach((function(t){E[t]||(E[t]=r.default.ERR_MISSING_OR_DAMAGED)}));var O={};v(i.WARNING_CODES).forEach((function(t){t!==i.WARNING_CODES.E_LIVE_PLAYBACK_COMPLETE&&(O[t]=r.default.ERR_TITLE_SOMETHING_WENT_WRONG)})),O[i.WARNING_CODES.E_LIVE_PLAYBACK_COMPLETE]=r.default.ERR_TITLE_VIDEO_NOT_AVAILABLE;var A={};A[i.WARNING_CODES.E_LIVE_PLAYBACK_COMPLETE]=r.default.ERR_LIVE_PLAYBACK_COMPLETE,v(i.WARNING_CODES).forEach((function(t){t!==i.WARNING_CODES.E_LIVE_PLAYBACK_COMPLETE&&(A[t]=r.default.ERR_GENERAL_ERROR)}));var S={};S[i.PLAYER_DRM_CODES.ERR_DRM_UNSUPPORTED_NETWORK_TYPE_WIFI]=r.default.ERR_DRM_UNSUPPORTED_NETWORK_WIFI,d(S,[i.PLAYER_DRM_CODES.E_CERTPATH_MISSING],r.default.ERR_GENERAL_ERROR);var T={};d(T,[i.PLAYER_DRM_CODES.ERR_DRM_UNSUPPORTED_NETWORK_TYPE,i.PLAYER_DRM_CODES.E_CERTPATH_MISSING],r.default.ERR_TITLE_CANNOT_PLAY_VIDEO);var I=function(){function t(t,i,n,e,r){if(!t||!i||!n)throw new Error("Error must be created with a group, category, and subcategory!");this.errorInfo=e,this.JI=r,this.group=t,this.phase=this.WX(e),this.category=i,this.subcategory=n,this.QX=e?e.msg:null,this.debugMessage=e?e.debugMsg:null,this.prefetch=!(!e||void 0===e.prefetch)&&e.prefetch,this.isRecoverable=!1}return Object.defineProperty(t.prototype,"rep",{get:function(){return l(this)},enumerable:!0,configurable:!0}),t.prototype.isSAPIError=function(){return this.category>=c&&this.category<=f},t.prototype.WX=function(t){var i="S";return t&&t.playbackState&&(t.playbackState.state===e.States.VIDEO||t.playbackState.state===e.States.END)&&(i="P"),i},Object.defineProperty(t.prototype,"title",{get:function(){var t=null,n=this.errorInfo.playbackState&&this.errorInfo.playbackState.loadedItem&&this.errorInfo.playbackState.loadedItem.isLive();if(this.isSAPIError())t=_;else{if(this.category===u&&-1!==o.indexOf(this.subcategory)&&n&&this.JI&&(this.JI.android||this.JI.ios))return r.default.ERR_TITLE_SOMETHING_WENT_WRONG;this.category===u||this.category===h?t=b:this.category===i.E_WARNING?t=O:this.category===i.E_INFO?t=p:this.category===i.E_PLAYER_DRM?t=T:this.category===a&&(t=y)}return t&&t[this.subcategory]||r.default.ERR_TITLE_SOMETHING_WENT_WRONG},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){var t=null,n=this.errorInfo.playbackState&&this.errorInfo.playbackState.loadedItem&&this.errorInfo.playbackState.loadedItem.isLive();if(this.isSAPIError())t=E;else{if(this.category===u&&-1!==o.indexOf(this.subcategory)&&n&&this.JI&&(this.JI.android||this.JI.ios))return r.default.ERR_LIVE_IOS_PLAYBACK;this.category===u||this.category===h?t=g:this.category===i.E_PLAYER_DRM?t=S:this.category===i.E_WARNING?t=A:this.category===i.E_INFO?t=m:this.category===a&&(t=w)}var e=t&&t[this.subcategory];return e="function"==typeof e?e(this.JI):e,this.QX||e||r.default.ERR_TECH_DIFFICULTIES},enumerable:!0,configurable:!0}),t}();i.default=I},1962:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.STREAM_SYNCH_COMPLETE="streamsynchComplete",i.STREAM_SYNCH_STRATEGY_APPLIED="streamsynchStrategyApplied",i.MEDIA_ITEM_NEED_SOURCE="mediaItemNeedSource",i.MEDIA_ITEM_ERROR="mediaItemError",i.MEDIA_ITEM_METADATA="mediaItemMetadata",i.MEDIA_ITEM_ADDED="mediaItemAdded",i.MEDIA_ITEM_REMOVED="mediaItemRemoved",i.MEDIA_ITEM_CURRENT="mediaItemCurrent",i.MEDIA_ITEM_COMPLETE="mediaItemComplete",i.AD_BREAK_STARTED="adBreakStarted",i.AD_BREAK_ENDED="adBreakEnded",i.AD_BREAK_ITEM_CURRENT="adBreakItemCurrent",i.AD_BREAK_ITEM_PLAYBACK_STARTED="adPlaybackStarted",i.AD_BREAK_ITEM_ENDED="adBreakItemEnded",i.AD_BREAK_ITEM_ERROR="adBreakItemError",i.AD_BREAK_ITEM_SKIPPED="adBreakItemSkipped",i.AD_BREAK_ITEM_CLICKED="adBreakItemClicked",i.AD_METRICS="adMetrics",i.OPSS_VISIBILITY_CHANGED="opssVisibilityChanged",i.TIMED_METADATA_RECEIVED="timedMetadataReceived",i.ERROR="player-error",i.WARNING="player-warning",i.INFO="player-info",i.INTERNAL_INFO="playerInternalInfo",i.INTERNAL_ERROR="playerInternalError",i.KEYDOWN="keydown",i.WINDOW_ON_FOCUS="focus",i.WINDOW_ON_BLUR="blur",i.START_SCREEN_RENDERED="startScreenRendered",i.START_SCREEN_CLICK="startScreenClick",i.END_SCREEN_RENDERED="endScreenRendered",i.CTRL_ENDSCREEN_VID="selectedEndscreenVideo",i.RELATED_ITEM_CLICK="relatedItemClick",i.UP_NEXT_PG_CLICK="upNextPgClick",i.SEEK_BAR_MOUSEOVER="seekBarMouseover",i.SEEK_BAR_MOUSEOUT="seekBarMouseout",i.TOGGLE_PLAY_PAUSE="togglePlayPause",i.CONTROLS_SEEK_START="controlsSeekStart",i.CONTROLS_SEEK_END="controlsSeekEnd",i.CONTROLS_SEEKING="controlsSeeking",i.CONTROLS_SET_VOLUME="controlsSetVolume",i.CONTROLS_SET_MUTE="controlsSetMute",i.FULLSCREEN_CHANGE="fullscreenChange",i.PLAYER_DIMENSION_CHANGE="playerDimensionChange",i.PLAYLIST_BOTTOM_HEIGHT_CHANGE="playlistBottomHeightChange",i.METADATA_AVAILABLE="metadataAvailable",i.MORE_ITEMS_LOADED="moreItemsLoaded",i.RENDERER_SWITCHED="rendererSwitched",i.TOUCH_TO_PLAY_RESTRICTION_REMOVED="mobileTouchPlayRestrictionRemoved",i.RENDER_PLAYLIST_FIRST_BATCH="renderPlaylistFirstBatch",function(t){t.TOGGLE_PLAYING="cTogglePlaying",t.BUFFERING="cBuffering",t.MEDIA_CHANGED="cMediaChanged",t.PLAYBACK_PROGRESS="cPlaybackProgress",t.VIDEO_ENDED="cVideoEnded",t.PLAYLIST_ENDED="cPlaylistEnded",t.CONNECTION_STATUS_CHANGED="cConnChanged",t.VOLUME_CHANGED="cReceiverVolumeChanged",t.MUTE_CHANGED="cReceiverMuteChanged",t.CAPTION_AVAILABILITY_CHANGED="cCaptionsAvailabilityChanged"}(i.CAST||(i.CAST={})),i.CONTROLS_AUDIO_CHANGE="controlsAudioChange",i.MULTI_LANGUAGES_AVAILABLE="multiLanguagesAvailable",i.THREE_SIXTY_READY="360Ready",i.THREE_SIXTY_INTERACT="360Interact",i.THREE_SIXTY_PIE_INTERACT="360PieInteract",i.PLAYER_RESIZE="playerResize",i.VTT_SEGMENT_LOADED="vttSegmentLoaded",i.SEGMENT_FIRST_BYTE_LOADED="segmentFirstByteLoaded",i.MEDIA_PLAYLIST_UPDATED="mediaPlaylistUpdated",i.SUBTITLE_PLAYLIST_UPDATED="subtitlePlaylistUpdated",i.LIVE_LOADING_LATE="liveLoadingLate",i.RECOVERY_START="recoveryStart",i.RECOVERY_METADATA_READY="recoveryMetadataReady",i.ER_READY="erReady",i.ER_ERROR="erError",i.CONVIVA_READY_FOR_SESSION_CREATION="convivaReadyForSessionCreation",i.PLAYBACK_INFO="playbackInfo",i.SUBTITLE_TRACK_RECEIVED="subtitleTrackReceived",i.AD_SUBTITLE_TRACK_ADDED="adSubtitleTrackAdded",i.PAGE_VISIBILITY_CHANGED="pageVisibilityChanged",i.LIVE_RELOAD_MEDIA="reloadMedia",i.DATERANGE_STARTED="daterangeStarted",i.DATERANGE_ENDED="daterangeEnded",i.INVALID_SYNC_OFFSET="invalidSyncOffset",function(t){t.INFO_UPDATE="infoUpdate",t.SEGMENT_FIRST_BYTE_LOADED="segmentFirstByteLoaded",t.SEGMENT_RENDERED="segmentRendered",t.VTT_SEGMENT_LOADED="vttSegmentLoaded",t.STREAM_SWITCHED="streamSwitched",t.LIVE_LOADING_LATE="liveLoadingLate",t.STREAM_UPDATED="streamUpdated",t.HLS_WAITING="hlsWaiting",t.CUEPOINT_DETECTED="cuepointDetected",t.CUEPOINT_STARTED="cuepointStarted",t.SUBTITLE_STREAM_UPDATED="subtitleStreamUpdated",t.PRELOAD_PROGRESS="preloadProgress",t.SEGINFO_METRICS_AVAILABLE="segInfoMetricsAvailable",t.CONTENT_LOAD_FINISHED="contentLoadFinished",t.PRELOAD_START="preloadStart",t.PRELOAD_COMPLETE="preloadComplete",t.BUFFER_GROWTH_DETECTED="bufferGrowthDetected",t.BUFFER_GAP_DETECTED="bufferGapDetected",t.CC_VTT_AVAILABLE="ccVttAvailable",t.MULTI_LANGUAGES_AVAILABLE="multiLanguagesAvailable",t.TIMED_METADATA_READY="timedMetadataReady",t.MEDIA_METADATA_LOADED="mediaMetadataLoaded",t.DATERANGE_STARTED="daterangeStarted",t.DATERANGE_ENDED="daterangeEnded",t.INVALID_SYNC_OFFSET="invalidSyncOffset",t.STREAM_SYNCH_COMPLETE="streamsynchComplete",t.STREAM_SYNCH_STRATEGY_APPLIED="streamsynchStrategyApplied"}(i.HLSVideoEvent||(i.HLSVideoEvent={})),i.SEG_INFO_AVAILABLE="segInfoAvailable",i.CONTENT_LOAD_FINISHED="contentLoadFinished",i.PRELOAD_START="preloadStart",i.PRELOAD_PROGRESS="preloadProgress",i.PRELOAD_COMPLETE="preloadComplete",i.BUFFER_GROWTH_DETECTED="bufferGrowthDetected",function(t){t.SRC_SWITCHING="videoSrcSwitching",t.SRC_SWITCHED="videoSrcSwitched",t.CLICK="videoClick",t.PAUSE="pause",t.ENDED="ended",t.ERROR="error",t.LOADEDMETADATA="loadedmetadata",t.LOADEDDATA="loadeddata",t.STALLED="stalled",t.LOADSTART="loadstart",t.PLAY="play",t.PLAYING="playing",t.SEEKING="seeking",t.SEEKED="seeked",t.TIMEUPDATE="timeupdate",t.VOLUMECHANGE="volumechange",t.WAITING="waiting",t.BLOCKED="blocked"}(i.VideoEvent||(i.VideoEvent={})),i.VIDEO_REQUEST="videoRequest",i.PLAYBACK_REQUEST="playbackRequest",i.PLAYBACK_STARTED="playbackStarted",i.PLAYBACK_RESUMED="playbackResumed",i.PLAYBACK_PROGRESS="playbackProgress",i.PLAYBACK_STALLED="playbackStalled",i.PLAYBACK_COMPLETE="playbackComplete",i.PLAYBACK_STOPPED="playbackStopped",i.PLAYBACK_ERROR="playbackError",i.API_CALLED="apiCalled",i.CTRL_PLAYPAUSE="ctrlPlayPause",i.CTRL_SEEK="ctrlSeek",i.CTRL_VOLUME="ctrlVolume",i.CTRL_FULLSCREEN="ctrlFullscreen",i.CTRL_SETTINGS="ctrlSettings",i.CTRL_REPLAY="ctrlReplay",i.CTRL_PLAYREQUEST="ctrlPlayRequest",function(t){t.SETTINGS="ccSettings",t.TOGGLE="ccToggle",t.UI_TOGGLE="ccUiToggle",t.REQUEST_UI_DATA_FOR_MEDIA_ITEM="ccRequestUiDataForMediaItem",t.REMOVED="ccDestroy",t.SHOW_CONTROLS="ccShowControls",t.LANGUAGE_CHANGE="ccLangChange",t.CC_OPTIONS_LANGUAGE_CHANGE="ccOptionsLangChange",t.FONT_SIZE_CHANGE="ccFontSizeChange",t.FONT_FACE_CHANGE="ccFontFaceChange",t.BG_OPACITY_CHANGE="ccBgOpacityChange",t.USER_STYLE_PREFERENCES_CHANGE="ccUserStylePrefChange",t.UPDATE_STYLE="ccUpdateStyle",t.POSITION_CHANGE="ccPosChange",t.POSITION_FLOAT="ccPosFloat"}(i.CCEvent||(i.CCEvent={})),function(t){t.GET_BITRATE_FOR_OPSS="ctvGetBitrateForOpss"}(i.CTV||(i.CTV={})),i.BEFORE_PROGRESS_BEACON="beforeProgressBeacon",i.BEFORE_INCOMPLETE_EXIT="beforeIncompleteExit",i.METRICS={INIT_TO_STARTSCREEN:{type:"titssc"},CLICK_TO_START:{type:"ttsapf"},INIT_TO_START:{type:"ttsapt"},PLAYBACK_START:{type:"tpb"},INIT_CONT_PLAY_START:{type:"tcps"},PLAYBACK_STALLED:{type:"tps"},LOAD_TO_LOADED_DATA:{type:"tltld"},CMS_REQUEST:{type:"tsapic"},CMS_SOURCE_REQUEST:{type:"tssrcapic"},CMS_MORE_ITEMS_REQUEST:{type:"tsmiapic"},INIT_RENDER_GAP:{type:"tirg"},SET_WATCH_HISTORY:{type:"tsetwh"},VP_CONSTRUCTOR:{type:"tcons"},GET_USER_PREFS:{type:"tgetcc"},CREATE_RENDERER:{type:"trcreate"},STREAM_REQUEST_TO_RENDER:{type:"treqtr"},STREAM_PLAY_TO_RENDER:{type:"tsltps"},AD_PLUGIN:{type:"tadp"},DEFERRING_PLAYBACK:{type:"tdpb"}},function(t){t.ORIENTATION_CHANGE="deviceOrientationChange"}(i.Device||(i.Device={})),i.PROFILE_START="profileStart",i.PROFILE_END="profileEnd"},8103:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),function(t){t.PREROLL="preroll",t.POSTROLL="postroll",t.MIDROLL="midroll",t.TRIGGER="trigger",t.NON_LINEAR="nonlinear",t.NATIVE="native"}(i.AdBreakType||(i.AdBreakType={})),function(t){t.DUMMY="ad/dummy"}(i.AdBreakMimeType||(i.AdBreakMimeType={}))},3755:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),function(t){t.NOT_RESOLVED="notResolved",t.RESOLVING="resolving",t.RESOLVED="resolved",t.RESOLVED_ERROR="resolvedError"}(i.ResolvedState||(i.ResolvedState={})),function(t){t.AD="ad",t.BLACKOUT="blackout",t.BUMPER="bumper"}(i.AdBreakItemType||(i.AdBreakItemType={}))},2542:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(4685);i.AdPluginPlaybackCapability=e.ExternalPlayerCapability,i.AdPlayerEvent=e.ExternalPlayerEvent;var r,s,o,u,h=n(6342).default.mergeStringEnums;!function(t){t.METRICS="ad-plugin--metrics",t.DIAGNOSTICS="ad-plugin--diagnostics"}(r=i.AdPluginMetricsEvent||(i.AdPluginMetricsEvent={})),function(t){t.AD_BREAKS_AVAILABLE="ad-plugin--breaks-available",t.AD_BREAK_PLAYING="ad-plugin--break-playing",t.AD_BREAK_RESOLVED="ad-plugin--break-resolved",t.AD_BREAK_RESOLVE_ERROR="ad-plugin--break-resolve-error",t.AD_SUBTITLES_FOUND="ad-plugin--subtitles-found"}(s=i.AdPluginMetadataEvent||(i.AdPluginMetadataEvent={})),function(t){t.CTA_TRIGGERED="ad-plugin-ui-cta-triggered",t.SKIP_AD="ad-plugin-ui-skip-ad",t.CLICKED="ad-plugin-ui-clicked"}(o=i.AdPluginUIEvent||(i.AdPluginUIEvent={})),function(t){t.NONLINEAR_AD_RENDERED="ad-plugin-nonlinear-ad-rendered",t.NONLINEAR_AD_CLEARED="ad-plugin-nonlinear-ad-cleared",t.NONLINEAR_AD_DISMISSED="ad-plugin-nonlinear-ad-dismissed",t.NONLINEAR_AD_CLICKED="ad-plugin-nonlinear-ad-clicked"}(u=i.AdPluginOverlayAdEvent||(i.AdPluginOverlayAdEvent={})),i.AdPluginEvent=h(s,h(r,h(u,h(o,e.ExternalPlayerEvent))))},3277:function(t,i){"use strict";var n=this&&this.__spreadArrays||function(){for(var t=0,i=0,n=arguments.length;i<n;i++)t+=arguments[i].length;var e=Array(t),r=0;for(i=0;i<n;i++)for(var s=arguments[i],o=0,u=s.length;o<u;o++,r++)e[r]=s[o];return e};Object.defineProperty(i,"__esModule",{value:!0}),i.listenEventDispatcherEvts=function(t,i,e){var r={},s=Array.isArray(i)?i:[i];return s.forEach((function(i){var s=function(i){return function(){for(var r=[],s=0;s<arguments.length;s++)r[s]=arguments[s];e.apply(void 0,n([t,i],r))}}(i);t.addEventListener(i,s),r[i]=s})),function(){r&&(s.forEach((function(i){var n=r[i];t.removeEventListener(i,n)})),s=r=null)}}},6120:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),function(t){t.THREE_SIXTY="360"}(i.VIDEO_TYPE||(i.VIDEO_TYPE={})),function(t){t.VOD="vod",t.LIVE_EVENT="liveEvent",t.LIVE_CHANNEL="liveChannel",t.CONTAINER="container"}(i.MediaItemType||(i.MediaItemType={})),function(t){t.NO_DATA="no-data",t.FETCHING="fetching",t.HAS_DATA="has-data",t.ERROR="error"}(i.ItemState||(i.ItemState={})),function(t){t.NO_DATA="noSourceData",t.FETCHING="fetchingSource",t.HAS_DATA="hasSourceData",t.ERROR="sourceError"}(i.SourceState||(i.SourceState={})),function(t){t.NOT_RECOVERING="notRecovering",t.RECOVERING="recovering",t.RECOVERED="recovered"}(i.ItemRecoveryStatus||(i.ItemRecoveryStatus={})),function(t){t.UPLYNK="media/uplynk",t.SAPI="media/sapi",t.CONTAINER="media/container"}(i.MediaItemMimeType||(i.MediaItemMimeType={}))},1279:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),function(t){t.BASE="plugin",t.METADATA="metadata-plugin",t.SOURCE_METADATA="source-metadata-plugin",t.MORE_ITEMS="more-items",t.AD="ad-plugin",t.VISUAL_SEEK="visual-seek",t.BRANDING="branding",t.PLAYLIST="playlist"}(i.PluginType||(i.PluginType={})),function(t){t.MEDIA_ITEM_PLAYBACK_STARTED="media-item-playback-started",t.MEDIA_ITEM_PLAYBACK_ENDED="media-item-playback-ended",t.MEDIA_ITEM_PLAYBACK_PROGRESS="media-item-playback-progress",t.AD_PLAYBACK_PROGRESS="ad-playback-progress",t.AD_PLAYBACK_STARTED="ad-playback-started",t.PLAYER_RENDERED="player-rendered"}(i.PluginPlayerEvent||(i.PluginPlayerEvent={})),function(t){t.PLAYBACK_STARTED="playbackStarted",t.PLAYLIST_COMPLETE="playlistComplete",t.PLAYLIST_COMPLETE_ON_ERROR="playlistCompleteOnError",t.SCROLLED_TO_END="scrolledToEnd",t.PLAYLISTID_NEED_RESOLVE="playlistNeedResolve",t.SOURCE_LOAD_COMPLETE="sourceLoadComplete",t.CONTENT_LOAD_FINISHED="ContentLoadFinished"}(i.MoreItemsReason||(i.MoreItemsReason={})),function(t){t.IMAGE="image",t.SPRITE="sprite"}(i.VisualSeekType||(i.VisualSeekType={}))},9134:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s=n(2394),o=n(6342),u=n(3529),h=n(4339),a=function(t){function i(i,n,e,r){var s=t.call(this)||this;return s.EM=[],s.ZX=i,s.XX=n,s.id=n.adBreakItemId,s.adBreakItemId=n.adBreakItemId,s.adPluginMimeType=n.adPluginMimeType,s.customConfig=n.customInfo||null,s.duration=n.duration||NaN,s.instream=n.instream,s.interactionConfig=n.interactionConfig,s.type=n.type,s.resolvedState=n.resolvedState,s.videoSession=s.$X(),n.source&&n.source.streams&&s.$M(n.source.streams,e,r),s}return r(i,t),i.prototype.hasStreams=function(){return this.streams.length>1},i.prototype.equals=function(t){return!!t&&(t.id===this.id&&this.adBreakItemId===t.adBreakItemId)},i.prototype.getPlayableItemType=function(){return u.PlayableItemType.AD_BREAK_ITEM},i.prototype.setDuration=function(t){this.duration=t},i.prototype.getDuration=function(){return this.duration},i.prototype.getStreamType=function(){return this.ZX&&this.ZX.type||""},Object.defineProperty(i.prototype,"adBreak",{get:function(){return this.ZX},enumerable:!0,configurable:!0}),i.prototype.skip=function(){},Object.defineProperty(i.prototype,"rawItemData",{get:function(){return o.default.deepCopy(this.XX)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"streams",{get:function(){return this.EM},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"streamProfiles",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"altStreams",{get:function(){return[]},set:function(t){},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"syncPoint",{get:function(){return NaN},enumerable:!0,configurable:!0}),i.prototype.getCurrLanguage=function(){return null},i.prototype.$X=function(){for(var t=[],i="abcdefghijklmnopqrstuvwxyz123456789",n=0;n<8;n++)t.push(i.charAt(Math.floor(Math.random()*i.length)));return t.join("")},i.prototype.$M=function(t,i,n){if(t&&t.length&&0===this.EM.length){for(var e=t.map((function(t){return new h.default(t)})),r=0,o=i;r<o.length;r++){var u=o[r],a=n[u],c=s.default.findAcceptedStreams(e,a);if(0!==c.length){this.rendererType=u,this.EM=c;break}}this.EM.length>0&&this.EM.sort((function(t,i){return t.videoMetadata.bitrate-i.videoMetadata.bitrate}))}},i}(u.PlayableItem);i.default=a},595:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(4986),r=n(6342),s=n(9134),o=function(){function t(t,i,n,e){var o=this;this.iE=null,this.lY=t,i.adBreakId=i.adBreakId||r.default.generateGuid(),this.JX=r.default.deepCopy(i),this.KX=n,this.t$=e,this.adBreakId=i.adBreakId,Array.isArray(i.adBreakItems)&&(this.adBreakItems=i.adBreakItems.map((function(t){return new s.default(o,t,n,e)}))),this.i$=i.duration||0,0===this.i$&&this.adBreakItems&&this.adBreakItems.forEach((function(t){o.i$+=t.duration||0})),this.customInfo=i.customInfo,this.startOffset=i.startOffset,this.type=i.type,this.mimetype=i.mimetype||"",this.backToLiveDuration=i.backToLiveDuration||0,this.startTime=i.startTime||0,this.active=i.active||!0}return Object.defineProperty(t.prototype,"mediaItem",{get:function(){return this.lY},enumerable:!0,configurable:!0}),t.prototype.appendAdBreakItems=function(t){var i=this;t.forEach((function(t){if(!i.n$(t.adBreakItemId)){var n=new s.default(i,t,i.KX,i.t$);i.adBreakItems.push(n),i.i$+=n.duration||0}}))},t.prototype.insertAdBreakItems=function(t,i){var n=this,e=i;t.forEach((function(t){if(!n.n$(t.adBreakItemId)){var i=new s.default(n,t,n.KX,n.t$);n.adBreakItems.splice(e,0,i),n.i$+=i.duration||0,e++}}))},t.prototype.removeAdBreakItems=function(t){var i,n=this,e=this.adBreakItems.length;t.forEach((function(t){n.n$(t.adBreakItemId)&&function(t){for(i=0;i<e;i++)if(n.adBreakItems[i].adBreakItemId===t.adBreakItemId){n.i$-=t.duration||0,n.i$<0&&(n.i$=0),n.adBreakItems.splice(i,1);break}}(t)}))},t.prototype.setActive=function(t){e.isBoolean(t)&&(this.active=t)},t.prototype.backToLive=function(){},t.prototype.breakNow=function(){},Object.defineProperty(t.prototype,"rawItemData",{get:function(){return r.default.deepCopy(this.JX)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"duration",{get:function(){return this.i$},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"error",{get:function(){return this.iE},set:function(t){this.iE=t},enumerable:!0,configurable:!0}),t.prototype.hasResolved=function(){return!(!this.adBreakItems||0===this.adBreakItems.length)},t.prototype.n$=function(t){return this.adBreakItems.some((function(i){return i.adBreakItemId===t}))},t}();i.default=o},1960:function(t,i){"use strict";var n;Object.defineProperty(i,"__esModule",{value:!0}),function(t){t.ALWAYS="always",t.TIMEBASED="timebased",t.NEVER="never"}(n=i.SkipOnError||(i.SkipOnError={})),i.defaultConfigs={adPlaybackOnly:!1,analytics:!0,autoplay:!1,casting:!0,continuousPlay:!1,enableRecovery:!0,fullscreen:!1,height:0,lang:"",loop:!1,mute:!1,preload:!0,region:"",site:"",skipOnError:n.NEVER,stopAtLastFrame:!1,stopBufferingOnPause:!1,liveUnloadOnPause:!0,enableDash:!1,ads:{timeout:{load:3,start:10},preferExternalPlayback:!0},ui:{ccOnMute:!1,chromeless:!1,docking:{enableOnMuted:!0,enableOnScrollDown:!1,enableOnScrollUp:!1,fadeInAnimation:!0,closeButtonFadeIn:!1,height:180,position:{bottom:20,left:-1,right:20,top:-1},showInfoCard:!0,threshold:50,width:320},endScreen:{show:!1},logos:{network:null,provider:null,rating:null},playlist:{inStream:!1,show:!1,position:"hidden",theme:"dark",mimetype:"playlist/simple",numberOfItems:12},seekControls:{show:!1,offset:10},showControls:!0,showFullscreenButton:!0,showPlayButton:!0,sliderColor:"",startScreen:{show:!0,showButton:!0,showDescription:!0,showProvider:!0,showTitle:!0,showThumbnail:!0},title:{showOnHover:!0,showOnStart:""}},backgroundPause:{onMute:!0,onUnmute:!1,timeToPause:5,suspendStreamingTime:20,backgroundSuspendStreaming:!0},streamSynch:{synchronize:!1},volume:1,width:0,iframeRender:!1,pauseLiveVideo:!1,pauseVODVideo:!1,preloadBufferSize:32}},2007:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(t,i){var n=this;this.events={completes:[],firstquartiles:[],impressions:[],midpoints:[],thirdquartiles:[]},this.adID=t.adID||"",this.duration=t.duration||-1;var e=t.events;Object.keys(e).forEach((function(t){n.events[t]=e[t]||[]})),this.startTime=i,this.endTime=-1,this.status={impressions:!1,firstquartiles:!1,midpoints:!1,thirdquartiles:!1,completes:!1}};i.default=n},440:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s=n(2394),o=n(4986),u=n(6342),h=n(595),a=n(8103),c=n(6120),f=n(3529),l=n(2759),v=n(2663),d=n(5125),p=n(4339),m=n(660).Validator,b={id:"",mimetype:c.MediaItemMimeType.UPLYNK,metadata:{description:"",duration:0,title:"",thumbnail:"",type:c.MediaItemType.VOD,videoTypes:[],pip:!0,syncPoint:NaN},source:{},customConfig:null,adConfig:null,useVrmAds:!1},g=function(t){function i(i,n,e,r){var s=t.call(this)||this;return s.adConfigPrefetched=!1,s.skt="",s.state=c.ItemState.NO_DATA,s.sourceState=c.SourceState.NO_DATA,s.recoveryStatus=c.ItemRecoveryStatus.NOT_RECOVERING,s.tryCount=1,s.failoverCount=0,s.isCCAvailable=!1,s.languages=[],s.altStreams=[],s.streamProfiles=[],s.blockAutoplay=!1,s.adBreaks=[],s.useVrmAds=!1,s.wR=0,s.EM=[],s.e$=NaN,s.r$={},s.s$=u.default.deepCopy(i),s.build(i,n,e,r),s}return r(i,t),i.createKey=function(t,i){return t+"#"+i},i.normalizeKey=function(t){t.id||(t.id=u.default.generateGuid()),t.mimetype||(t.mimetype=c.MediaItemMimeType.CONTAINER)},Object.defineProperty(i.prototype,"key",{get:function(){return this.kR},enumerable:!0,configurable:!0}),i.prototype.hasStreams=function(){return 0!==this.EM.length},i.prototype.equals=function(t){return!!t&&this.key===t.key},i.prototype.getPlayableItemType=function(){return f.PlayableItemType.MEDIA_ITEM},i.prototype.getDuration=function(){return this.duration},i.prototype.setDuration=function(t){this.duration=t},i.prototype.isRecovering=function(){return this.recoveryStatus===c.ItemRecoveryStatus.RECOVERING},i.prototype.isConsistentMetadata=function(){return!this.hasLiveStreams()||!this.hasLiveStateForVod()},i.prototype.getStreamType=function(){return this.metadata&&this.metadata.type||c.MediaItemType.VOD},i.prototype.getMarkers=function(){return this.customConfig&&this.customConfig.meta&&this.customConfig.meta.videoMarkers?this.customConfig.meta.videoMarkers.markers:null},Object.defineProperty(i.prototype,"liveLabel",{get:function(){return this.metadata.liveLabel},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pip",{get:function(){return void 0===this.metadata.pip||this.metadata.pip},enumerable:!0,configurable:!0}),i.prototype.isLive=function(){return!!this.hasLiveStreams()},i.prototype.is360Video=function(){var t=this.metadata?this.metadata.videoTypes:null;return!(!t||!t.length)&&-1!==t.indexOf(c.VIDEO_TYPE.THREE_SIXTY)},i.prototype.build=function(t,i,n,e){t&&(this.KX=n,this.t$=e,this.o$=u.default.deepCopy(t),this.u$(t),t.source&&t.source.streams&&this.$M(t.source.streams,i,e),t.adBreaks&&this.h$(t.adBreaks,n,e))},i.prototype.hasNativeAd=function(){return!!this.isContainer()&&!(!this.adBreaks||!this.adBreaks.length||this.adBreaks[0].type!==a.AdBreakType.NATIVE)},i.prototype.isContainer=function(){return this.metadata&&this.metadata.type===c.MediaItemType.CONTAINER},i.prototype.getRawDuration=function(){return this.e$},i.prototype.setRawDuration=function(t){this.e$=t},Object.defineProperty(i.prototype,"rawItemData",{get:function(){return this.o$},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"description",{get:function(){return this.metadata?this.metadata.description:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"liveState",{get:function(){return this.metadata.liveState},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"duration",{get:function(){return this.metadata&&o.isNumber(this.metadata.duration)?this.metadata.duration:NaN},set:function(t){this.metadata&&(this.metadata.duration=t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"shareUrl",{get:function(){return this.metadata&&o.isString(this.metadata.shareUrl)?this.metadata.shareUrl:""},set:function(t){this.metadata&&(this.metadata.shareUrl=t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"title",{get:function(){return this.metadata?this.metadata.title:void 0},set:function(t){this.metadata&&(this.metadata.title=t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"posterUrl",{get:function(){return this.metadata?this.metadata.posterUrl:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"thumbnail",{get:function(){return this.metadata?this.metadata.thumbnail:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"position",{get:function(){return this.wR},set:function(t){this.wR=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"refPlaybackId",{get:function(){return this.kR+"#"+this.videoSession},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"samplingId",{get:function(){return this.a$},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"streams",{get:function(){return this.EM},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"visualSeekData",{get:function(){return this.c$},set:function(t){this.c$=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"brandingData",{get:function(){return this.f$},set:function(t){this.f$=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"viewCount",{get:function(){return this.metadata&&!isNaN(this.metadata.viewCount)?this.metadata.viewCount:NaN},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"syncPoint",{get:function(){return this.metadata.syncPoint||b.metadata.syncPoint},enumerable:!0,configurable:!0}),i.prototype.updateAdBreak=function(t,i,n,e){var r=this;void 0===e&&(e=null);var s=null;return t?(this.adBreaks.forEach((function(o,u){t.adBreakId===o.adBreakId&&(s=new h.default(r,t,i,n),e&&(s.error=e),r.adBreaks[u]=s)})),s):null},i.prototype.removeAdBreaks=function(t){var i=this;if(Array.isArray(t)){t.forEach((function(t){var n,e,r=(n=t.adBreakId,i.adBreaks.some((function(t,i){return t.adBreakId===n?(e=i,!0):(e=-1,!1)})),e);-1!==r&&i.adBreaks.splice(r,1)}))}},i.prototype.addAdBreaks=function(t){var i=this,n=[];if(!Array.isArray(t))return n;return t.forEach((function(t){if(r=t.adBreakId,!i.adBreaks.some((function(t){return t.adBreakId===r}))){var e=new h.default(i,t,i.KX,i.t$);i.adBreaks.push(e),n.push(e)}var r})),n},i.prototype.getRecoveryStatusForBeacon=function(){var t=this.recoveryStatus===c.ItemRecoveryStatus.RECOVERED;return t&&(this.recoveryStatus=c.ItemRecoveryStatus.NOT_RECOVERING),t},i.prototype.fetchFinished=function(){return this.state===c.ItemState.HAS_DATA||this.state===c.ItemState.ERROR},i.prototype.isLongForm=function(){return!(!this.metadata||!this.metadata.duration)&&this.metadata.duration>600},i.prototype.restartIfNeeded=function(){this.position+10>this.duration&&(this.position=0)},i.prototype.getCDN=function(){return this.EM.length>0?this.EM[0].cdn:null},i.prototype.hasLiveStreams=function(){for(var t=0,i=this.EM;t<i.length;t++){if(i[t].live)return!0}return!1},i.prototype.hasLiveStateForVod=function(){return!1},i.prototype.hasThumbnail=function(){var t=this.metadata&&this.metadata.thumbnail;return void 0!==t&&t.length>0},i.prototype.generateVSid=function(){for(var t=[],i="abcdefghijklmnopqrstuvwxyz123456789",n=0;n<8;n++)t.push(i.charAt(Math.floor(Math.random()*i.length)));return t.join("")},i.prototype.generateSamplingId=function(){return Math.floor(10*Math.random())},i.prototype.getType=function(){return this.hasStreams()?this.EM[0].getType():"none"},i.prototype.getStreamProtocol=function(){return this.hasStreams()?this.EM[0].streamProtocol:"none"},i.prototype.getSubtitleStreams=function(){return this.altStreams.filter((function(t){return"SUBTITLES"===t.type}))},i.prototype.mayUpdateVideoSession=function(){this.l$||this.v$()},i.prototype.useVideoSession=function(){this.l$=!1},i.prototype.setCCAvailability=function(t){o.isBoolean(t)&&(this.isCCAvailable=t)},i.prototype.setMultiLanguages=function(t){this.languages=t},i.prototype.getMultiLanguages=function(){return this.languages},i.prototype.setCurrLanguage=function(t){if(this.languages&&this.languages.length)for(var i=0,n=this.languages;i<n.length;i++){var e=n[i];e.name===t?(this.d$=e,e.selected=!0):e.selected=!1}},i.prototype.getCurrLanguage=function(){return this.d$},i.prototype.getCurrentAudioLanguage=function(){if(!this.isMultiAudioAvailable())return null;var t=this.languages||[];return(t=t.filter((function(t){return!!t.selected}))).length?t[0].name:null},i.prototype.isMultiAudioAvailable=function(){return Array.isArray(this.languages)&&this.languages.length>=2},i.prototype.updateVideoSession=function(){this.videoSession=this.generateVSid(),this.l$=!0,this.a$=this.generateSamplingId()},i.prototype.getAspectRatio=function(){return this.EM.length>0?this.EM[0].aspectRatio:null},i.prototype.updateCompletedAdBreak=function(t){t&&(this.removeAdBreaks([t]),this.r$[this.videoSession]=this.r$[this.videoSession]||[],this.r$[this.videoSession].push(t))},i.prototype.h$=function(t,i,n){var e=this;this.adBreaks=t.map((function(t){return new h.default(e,t,i,n)}))},i.prototype.u$=function(t){this.p$(t);var n=u.default.deepCopy(t);n=u.default.mergeObjects(n,b),u.default.mergeObjects(this,n,!0),u.default.mergeObjects(this,this.s$,!0),this.kR=i.createKey(this.id,this.mimetype)},i.prototype.p$=function(t){try{var i=new m;i.addSchema(d.streamSchema,"/streamSchema"),i.addSchema(v.sourceSchema,"/sourceSchema"),i.validate(t,l.mediaItemSchema,{throwError:!0})}catch(t){var n="Invalid media item config: "+t.property+" "+t.message;throw new Error(n)}},i.prototype.$M=function(t,i,n){var e=this;if(t&&t.length){this.EM=[];for(var r=t.map((function(t){return Object.prototype.hasOwnProperty.call(t,"live")||(t.live=e.metadata&&(e.metadata.type===c.MediaItemType.LIVE_CHANNEL||e.metadata.type===c.MediaItemType.LIVE_EVENT)),new p.default(t)})),o=0,u=i;o<u.length;o++){var h=u[o],a=n[h];if(!(this.is360Video()&&!a.is360Renderer||!this.is360Video()&&a.is360Renderer)){var f=s.default.findAcceptedStreams(r,a);if(0!==f.length){this.rendererType=h,this.EM=f;break}}}this.EM.length>0&&this.EM.sort((function(t,i){return t.videoMetadata.bitrate-i.videoMetadata.bitrate}))}},i.prototype.v$=function(){this.updateVideoSession(),this.m$()},i.prototype.m$=function(){this.setSourceState(c.SourceState.NO_DATA)},i}(f.PlayableItem);i.default=g},2341:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s=n(7403),o=n(440);!function(t){t.METADATA_AVAILABLE="mstMetadataAvailable",t.SOURCE_AVAILABLE="mstSourceAvailable",t.MEDIA_ITEM_ADDED="mstMediaItemAdded",t.MEDIA_ITEM_REMOVED="mstMediaItemRemoved"}(i.MediaStoreEvent||(i.MediaStoreEvent={}));var u=function(t){function i(i,n,e){var r=t.call(this,"MediaStore")||this;return r.b$={},r.g$=i,r.KX=n,r.t$=e,r}return r(i,t),i.prototype.destroy=function(){t.prototype.destroy.call(this)},i.prototype.addItems=function(t){for(var i=0,n=t;i<n.length;i++){var e=n[i];this.addItem(e)}},i.prototype.addItem=function(t){o.default.normalizeKey(t);var i=o.default.createKey(t.id,t.mimetype);if(this.b$[i])return i;var n=new o.default(t,this.g$,this.KX,this.t$);return this.b$[n.key]=n,n.key},i.prototype.updateItem=function(t){if(!t||!t.id||!t.mimetype)return null;var i=o.default.createKey(t.id,t.mimetype),n=this.b$[i];return n?n.build(t,this.g$,this.KX,this.t$):(n=new o.default(t,this.g$,this.KX,this.t$)).updateVideoSession(),this.b$[n.key]=n,n},i.prototype.updateItemState=function(t,i){if(t){var n=this.getByData(t);n&&n.state!==i&&n.setState(i)}},i.prototype.updateItemSourceState=function(t,i){if(t){var n=this.getByData(t);n&&n.sourceState!==i&&n.setSourceState(i)}},i.prototype.get=function(t){return t&&this.b$[t]||null},i.prototype.getById=function(t){if(!t)return null;for(var i in this.b$)if(0===i.indexOf(t))return this.b$[i];return null},i.prototype.getByData=function(t){if(!t)return null;var i=o.default.createKey(t.id,t.mimetype);return this.b$[i]||null},i.prototype.getBySessionId=function(t){if(!t)return null;for(var i=0,n=Object.keys(this.b$);i<n.length;i++){var e=n[i],r=this.b$[e];if(r&&r.videoSession===t)return r}return null},i}(s.default);i.default=u},2334:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e,r,s=n(9847),o=n(954),u=n(5727),h=n(4685),a=n(6669),c=n(5244),f=n(742),l=n(1204),v=n(4986),d=n(6342),p=n(1960),m=n(2341),b=n(7189),g=n(4926);!function(t){t[t.NONE=0]="NONE",t[t.CONTROL=1]="CONTROL",t[t.API=2]="API",t[t.BACKGROUND=3]="BACKGROUND"}(e=i.PauseReason||(i.PauseReason={})),function(t){t.ID="playlist_id",t.ID_AND_ITEMS="playlist_id_and_mediaItems",t.ONLY_ITEMS="mediaItems"}(r||(r={}));var y=function(){function t(i,n,r){this.consent={gdprApplies:null,gdprConsentData:null,uspString:null},this.y$="0.3.10",this.w$="1.2.4",this._$=!1,this.E$="none",this.O$=!1,this.A$=e.NONE,this.S$=new g.default,this.S$.width=i&&i.width||this.S$.width,this.S$.height=i&&i.height||this.S$.height,this.S$.videoWidth=this.S$.width,this.S$.videoHeight=this.S$.height,this.T$={desiredBitrate:t.DESIRED_BITRATE,mp4Abr:!1,bitrate:0,bitrates:[],heights:[],startTime:NaN,preconnect:!0,skipFormats:[],isResumingFromSavedPosition:!1,requestType:null,requestAction:null,playlistLoop:!1},this.I$=r,this.j$=[],this.yR=i,this.M$=this.u$(i),this.N$(),this.k$(),this.R$(),this.L$(n),this.D$(),this.C$(),this.M$.mediaItems&&this.M$.mediaItems.length&&(this.firstItemAdsSitePrefetched=!!this.M$.mediaItems[0].adConfig),this.playlist=new b.default(this.TY),this.M$.mediaItems&&this.M$.mediaItems.forEach((function(t){t.adConfigPrefetched=!!t.adConfig})),this.playlist.addItems(this.M$.mediaItems),this.ccUserPreferences={show:!1,lang:"en-US",fontSize:24,fontName:"Arial, Helvetica, sans-serif",fontColor:"#ffffff",fontOpacity:1,fontEffect:"none",bgColor:"#000000",bgOpacity:.75,ccPos:"bottom",isAvailable:!1},this.rendered=!1}return t.prototype.destroy=function(){this.playlist.destroy(),this.rendererTypes=[],this.adsRendererTypes=[]},Object.defineProperty(t.prototype,"config",{get:function(){return this.M$},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"site",{get:function(){return this.M$.site||""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"region",{get:function(){return this.M$.region||""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lang",{get:function(){return this.M$.lang||""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"recoveryFailureTimeout",{get:function(){return t.RECOVERY_FAILURE_TIMEOUT},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ccOnMute",{get:function(){var t=this.M$.ui,i=p.defaultConfigs.ui.ccOnMute;return t&&void 0!==t.ccOnMute?t.ccOnMute:i},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"chromeless",{get:function(){var t=this.M$.ui,i=p.defaultConfigs.ui.chromeless;return t&&void 0!==t.chromeless?t.chromeless:i},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"docking",{get:function(){var t=this.M$.ui;return t?t.docking:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"logos",{get:function(){var t=this.M$.ui,i=p.defaultConfigs.ui.logos;return t?t.logos:i},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showControls",{get:function(){var t=this.M$.ui,i=p.defaultConfigs.ui.showControls;return t&&void 0!==t.showControls?t.showControls:i},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"startScreenConfig",{get:function(){var t=this.M$.ui,i=p.defaultConfigs.ui.startScreen;return t?t.startScreen:i},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showTitleOnStart",{get:function(){var t=this.M$.ui,i=p.defaultConfigs.ui.title.showOnStart;return t&&t.title?t.title.showOnStart:i},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showTitleOnHover",{get:function(){var t=this.M$.ui,i=p.defaultConfigs.ui.title.showOnHover;return t&&t.title&&void 0!==t.title.showOnHover?t.title.showOnHover:i},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showStartScreen",{get:function(){var t=this.M$.ui,i=p.defaultConfigs.ui.startScreen.show;return t&&t.startScreen&&void 0!==t.startScreen.show?t.startScreen.show:i},set:function(t){var i=this.M$.ui;i&&i.startScreen&&(i.startScreen.show=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showFullscreenButton",{get:function(){var t=this.M$.ui,i=p.defaultConfigs.ui.showFullscreenButton;return t&&void 0!==t.showFullscreenButton?t.showFullscreenButton:i},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sliderColor",{get:function(){var t=this.M$.ui,i=p.defaultConfigs.ui.sliderColor;return t&&void 0!==t.sliderColor?t.sliderColor:i},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showEndScreen",{get:function(){var t=this.M$.ui,i=p.defaultConfigs.ui.endScreen.show;return!t||!t.endScreen&&void 0===t.endScreen.show?i:t.endScreen.show},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"stopAtLastFrame",{get:function(){var t=this.M$.stopAtLastFrame;return void 0===t?p.defaultConfigs.stopAtLastFrame:t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"thumbnailDimensions",{get:function(){return{width:this.uiState.videoWidth,height:this.uiState.videoHeight}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"vttIndex",{get:function(){return-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"playlistUIConfig",{get:function(){var t=p.defaultConfigs.ui.playlist,i=this.M$.ui;return i?i.playlist:t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"continuousPlay",{get:function(){var t=this.M$.continuousPlay;return void 0===t?p.defaultConfigs.continuousPlay:t},set:function(t){this.M$.continuousPlay=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"adPlaybackOnly",{get:function(){var t=this.M$.adPlaybackOnly;return void 0===t?p.defaultConfigs.adPlaybackOnly:t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"autoplay",{get:function(){var t=this.M$.autoplay;return void 0===t?p.defaultConfigs.autoplay:t},set:function(t){this.M$.autoplay=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"stopBufferingOnPause",{get:function(){var t=this.M$.stopBufferingOnPause;return void 0===t?p.defaultConfigs.stopBufferingOnPause:t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"preload",{get:function(){var t=this.M$.preload;return void 0===t?p.defaultConfigs.preload:t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fullscreen",{get:function(){var t=this.M$.fullscreen;return void 0===t?p.defaultConfigs.fullscreen:t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"skipWatchedVideos",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bitrate",{get:function(){return this.T$.bitrate},set:function(t){this.T$.bitrate=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"quality",{get:function(){return"auto"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bitrates",{get:function(){return this.T$.bitrates},set:function(t){this.T$.bitrates=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"heights",{get:function(){return this.T$.heights},set:function(t){this.T$.heights=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mp4Abr",{get:function(){return this.T$.mp4Abr},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"startTime",{get:function(){return this.T$.startTime},set:function(t){this.T$.startTime=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"preconnect",{get:function(){return this.T$.preconnect},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isResumingFromSavedPosition",{set:function(t){this.T$.isResumingFromSavedPosition=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"requestType",{get:function(){return this.T$.requestType},set:function(t){this.T$.requestType=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"requestAction",{get:function(){return this.T$.requestAction},set:function(t){this.T$.requestAction=t},enumerable:!0,configurable:!0}),t.prototype.setRequestInfo=function(t){if(t&&(this.requestType=t.type,d.default.isValidRequestAction(t.action))){if(this.requestAction=t.action,t.action===o.REQUEST_TYPES.PAUSE)switch(t.type){case o.REQUEST_TYPES.CLICK:this.A$=e.CONTROL;break;case o.REQUEST_TYPES.API:this.A$=e.API}t.action===o.REQUEST_TYPES.BACKGROUND&&t.type===o.REQUEST_TYPES.API&&(this.A$=e.BACKGROUND)}},Object.defineProperty(t.prototype,"playlistLoop",{get:function(){return this.T$.playlistLoop},set:function(t){this.T$.playlistLoop=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"desiredBitrate",{get:function(){return this.T$.desiredBitrate},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"uiState",{get:function(){return this.S$},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"playbackState",{get:function(){return this.QY},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"waitingForUserTap",{get:function(){return this._$},set:function(t){this._$=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"preloadBufferSize",{get:function(){var t=this.M$.preloadBufferSize;return void 0===t?p.defaultConfigs.preloadBufferSize:t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"userPreferences",{get:function(){return{closedCaptions:{show:!1,lang:"en-US",fontSize:24,fontName:"Arial, Helvetica, sans-serif",fontColor:"#ffffff",fontOpacity:1,fontEffect:"none",bgColor:"#000000",bgOpacity:.75,ccPos:"bottom",isAvailable:!1},isAdult:null,isAuthenticated:!0}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"skipOnError",{get:function(){return this.M$.skipOnError||p.SkipOnError.NEVER},set:function(t){this.M$.skipOnError=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"liveUnloadOnPause",{get:function(){return this.M$.liveUnloadOnPause||!0},set:function(t){this.M$.liveUnloadOnPause=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDrmAvailable",{set:function(t){this.O$=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"drmSystem",{set:function(t){t&&(this.E$=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"muteMode",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this.y$},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"jshlsVersion",{get:function(){return this.w$},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"casting",{get:function(){return void 0===this.M$.casting||this.M$.casting},enumerable:!0,configurable:!0}),t.prototype.setShowStartScreen=function(){(!this.autoplay||this.playbackState&&this.waitingForUserTap)&&!this.chromeless&&(this.showStartScreen=!0)},Object.defineProperty(t.prototype,"guid",{get:function(){return this.I$},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputConfig",{get:function(){return this.yR},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"errors",{get:function(){return this.j$},set:function(t){this.j$=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstCriticalError",{get:function(){for(var t=0,i=this.errors;t<i.length;t++){var n=i[t];if(n.category||n.subcategory)return n}return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"privacyConsent",{get:function(){return this.consent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showPlayButton",{get:function(){var t=this.M$.ui,i=p.defaultConfigs.ui.showPlayButton;return t&&void 0!==t.showPlayButton?t.showPlayButton:i},enumerable:!0,configurable:!0}),t.prototype.setPlaybackState=function(t){if(this.QY)throw new Error("playbackState is already set");this.QY=t,this.P$(),this.x$()},t.prototype.isPlaylistStructured=function(){return!1},t.prototype.isLocal=function(){return this.y$.indexOf("local")>-1},t.prototype.isMobileStrmInlineExpr=function(){return(s.userAgent.ios||s.userAgent.android)&&l.default.canPlayInline},t.prototype.isAutoplayAllowed=function(){var t=!0!==l.default.network.mobile;return!s.userAgent.mobile||l.default.autoplaySupported&&t},t.prototype.isMobileWebAutoplayCase=function(){return s.userAgent.mobile&&(this.autoplay||this.isMobileStrmInlineExpr())},t.prototype.isMediaPlaying=function(){var t=this.playbackState;return!!t&&(t.state===c.States.VIDEO&&!t.paused&&!t.loading)},t.prototype.isAd=function(){return d.default.isAdBreakType(this.playbackState.currentMediaType)},t.prototype.endVideo=function(){this.T$.bitrate=0},Object.defineProperty(t.prototype,"loop",{get:function(){var t=this.M$.loop;return void 0===t&&(t=p.defaultConfigs.loop),(this.getPlaylistRenderingType()===r.ONLY_ITEMS||!(!this.playlist.isEndOfPlaylist()&&t))&&t},set:function(t){v.isBoolean(t)&&(this.M$.loop=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mute",{get:function(){return this.QY&&this.QY.mute},set:function(t){this.QY&&v.isBoolean(t)&&(this.QY.mute=t)},enumerable:!0,configurable:!0}),t.prototype.getState=function(){return this.playbackState.state},t.prototype.setState=function(t){this.QY&&(Object.keys(c.States).indexOf(t.toUpperCase())>-1&&(this.playbackState.state=t))},Object.defineProperty(t.prototype,"volume",{get:function(){return this.QY&&this.QY.volume},set:function(t){this.QY&&v.isNumber(t)&&t>=0&&t<=1&&(this.QY.volume=t)},enumerable:!0,configurable:!0}),t.prototype.isPaused=function(){return this.playbackState&&this.playbackState.paused},t.prototype.setPaused=function(t){this.playbackState&&v.isBoolean(t)&&(this.playbackState.paused=t,t?this.setLoading(!1):this.A$=e.NONE)},t.prototype.onRendererPause=function(){var t=this.getState();return t!==c.States.INIT&&t!==c.States.END&&(this.setPaused(!0),!0)},t.prototype.isSeeking=function(){return this.playbackState&&this.playbackState.seeking},t.prototype.setSeeking=function(t){this.playbackState&&v.isBoolean(t)&&(this.playbackState.seeking=t)},t.prototype.isLoading=function(){return this.playbackState&&this.playbackState.loading},t.prototype.setLoading=function(t){this.playbackState&&v.isBoolean(t)&&(this.playbackState.loading=t)},t.prototype.resetPlaybackStates=function(){this.setPaused(!1),this.setSeeking(!1),this.setLoading(!1)},t.prototype.getPauseReason=function(){return this.A$},t.prototype.getPlaylistRenderingType=function(){var t=this.playlist&&this.playlist.playlistId,i=this.yR&&this.yR.playlist,n=i&&i.mediaItems||[];return t?0===n.length?r.ID:r.ID_AND_ITEMS:r.ONLY_ITEMS},Object.defineProperty(t.prototype,"mediaStore",{get:function(){return this.TY},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"seekControls",{get:function(){return this.M$.ui&&this.M$.ui.seekControls||null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"backgroundPause",{get:function(){return this.M$.backgroundPause?this.M$.backgroundPause:p.defaultConfigs.backgroundPause},enumerable:!0,configurable:!0}),t.prototype.getEventsDto=function(){var t={rendererType:this.playbackState&&this.playbackState.rendererType,playerVersion:this.y$,autoPlay:this.autoplay,mute:this.mute,paused:this.isPaused(),docking:this.docking,requestType:this.requestType,requestAction:this.requestAction,playerRootElement:this.playerRootElement,uiState:{width:this.uiState.width,height:this.uiState.height,isFullScreen:this.uiState.isFullscreen,isDocked:this.uiState.isDocked},showEndScreen:this.showEndScreen,firstItemAdsSitePrefetched:this.firstItemAdsSitePrefetched,drmsys:this.E$,drm:this.O$,playbackMode:this.playbackState&&this.playbackState.playbackMode,currentMediaType:this.playbackState&&this.playbackState.currentMediaType,currentTs:Date.now(),pbst:this.getState(),pbstd:this.U$(),soe:this.skipOnError},i=this.playlist.getCurrentItem();return i?d.default.extend(t,{videoId:i.id,sessionId:i.videoSession,videoLength:i.duration,isLive:i.isLive(),isCCAvailable:i.isCCAvailable,cdn:i.getCDN(),samplingId:i.samplingId,audioLanguage:i.getCurrentAudioLanguage(),mediaItemRendererType:i.rendererType,customConfig:i.customConfig,brandingData:i.brandingData,streamProtocol:i.getStreamProtocol(),license:i.license,title:i.title,contentType:i.getStreamType(),description:i.description,aspectRatio:this.getAspectRatio()}):t},t.prototype.getAspectRatio=function(){var t=null;if(this.S$.videoWidth&&this.S$.videoHeight){var i=this.S$.videoWidth/this.S$.videoHeight;t=isNaN(i)?null:i.toFixed(2)}else{var n=this.playlist.getCurrentItem();n&&(t=n.getAspectRatio())}return t||null},t.prototype.u$=function(t){var i=d.default.deepCopy(t);return i=d.default.mergeObjects(i,p.defaultConfigs),i=this.V$(i)},t.prototype.U$=function(){var t="init",i=this.playbackState.currentMediaType;return this.playbackState.state!==c.States.INIT&&i&&(t=i+"_",t+=this.playbackState.videoLoading()?"load":this.isPaused()?"pause":"play"),t},t.prototype.V$=function(t){if(!t)return t;var i=t.ui;i&&i.chromeless&&(i.startScreen&&(i.startScreen.show=!1),i.endScreen&&(i.endScreen.show=!1),i.showControls=!1);var n=t.connectionType;return n&&n.raw&&"boolean"==typeof n.mobile&&l.default.updateNetwork(n.mobile,n.raw),t},t.prototype.N$=function(){!f.LocalStorage.get("vp-dont-autoplay")&&this.isAutoplayAllowed()||(this.autoplay=!1)},t.prototype.x$=function(){if(this.muteMode)this.mute=!0;else if(s.userAgent.desktop&&this.autoplay){var t=l.default.needsGestureToPlayUnmuted&&(s.userAgent.firefox>=66||s.userAgent.chrome>=66||s.userAgent.edge>=17);(s.userAgent.safari>=11||t)&&(this.mute=!0)}},t.prototype.P$=function(){if(s.userAgent.mobile&&l.default.autoplaySupported)return this.volume=1,void(this.mute=!0);var t=p.defaultConfigs.volume,i=p.defaultConfigs.mute,n=f.LocalStorage.get(o.LocalStorageKey.VOLUME);n&&(t=n.volume,i=n.mute);var e=this.yR.volume;v.isNumber(e)&&e>=0&&e<=1&&(t=e),v.isBoolean(this.yR.mute)&&(i=this.M$.mute),this.volume=t,this.mute=i},t.prototype.R$=function(){(!this.autoplay||this.playbackState&&this.waitingForUserTap)&&!this.chromeless&&(this.showStartScreen=!0)},t.prototype.F$=function(){this.rendererTypes=a.default.getRendererTypes(),this.adsRendererTypes=a.default.getAdRendererTypes();var t=this.rendererTypes.slice(0);this.adsRendererTypes.forEach((function(i){-1!==t.indexOf(i)&&t.push(i)})),this.capabilities=this.B$(t)},t.prototype.B$=function(t){var i=this,n={};return t?(t.forEach((function(t){var e=u.default.get(t);e&&(n[t]=e,!i.config.enableDash||s.userAgent.safari||t!==h.RendererType.HTML5_HLS&&t!==h.RendererType.HTML5_HLS_360||(n[t].preferredFormats.unshift("mpd"),n[t].acceptedFormats.unshift("mpd")),i.T$.skipFormats.length>0&&(n[t].preferredFormats=n[t].preferredFormats.filter((function(t){return-1===i.T$.skipFormats.indexOf(t)}))))})),n):n},t.prototype.L$=function(t){this.F$(),this.TY=t||new m.default(this.rendererTypes,this.adsRendererTypes,this.capabilities)},t.prototype.D$=function(){var t={},i=d.default.getSingleton("PlayerHosting");i&&i.ver&&i.ver===this.version&&(t.bucket=i.bucket,t.env=i.env,t.colo=i.colo,t.config=i.config&&"object"==typeof i.config?i.config:null,t.log=i.req&&i.req.usm&&i.req.usm.config&&i.req.usm.config.log||""),this.playerHostingConfig=t},t.prototype.k$=function(){l.default.canPlayInline&&l.default.autoplayByUIEvtOnly&&this.autoplay&&(this.waitingForUserTap=!0)},t.prototype.C$=function(){var t=this;f.Privacy.getGDPRConsentData((function(i,n){var e,r;n&&(t.consent.gdprApplies=null===(e=i)||void 0===e?void 0:e.gdprApplies,t.consent.gdprConsentData=null===(r=i)||void 0===r?void 0:r.gdprConsentData)})),f.Privacy.getUSPrivacyConsent((function(i,n){var e;n&&(t.consent.uspString=null===(e=i)||void 0===e?void 0:e.uspString)}))},t.DESIRED_BITRATE=900,t.RECOVERY_FAILURE_TIMEOUT=120,t}();i.default=y},3529:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(6120);!function(t){t.MEDIA_ITEM="media-item",t.AD_BREAK_ITEM="ad-break-item"}(i.PlayableItemType||(i.PlayableItemType={}));var r=function(){function t(){this.state=e.ItemState.NO_DATA,this.sourceState=e.SourceState.NO_DATA}return t.prototype.setState=function(t){this.state=t},t.prototype.setSourceState=function(t){this.sourceState=t},t.prototype.hasError=function(){return this.state===e.ItemState.ERROR},t.prototype.hasMetadata=function(){return this.state===e.ItemState.HAS_DATA},t.prototype.hasNoMetadata=function(){return this.state===e.ItemState.NO_DATA},t.prototype.hasExpiredMetadata=function(){return!1},t.prototype.isConsistentMetadata=function(){return!0},t.prototype.hasStreams=function(){return!1},t.prototype.hasSource=function(){return this.sourceState===e.SourceState.HAS_DATA},t.prototype.equals=function(t){return t&&t.id===this.id},t.prototype.getPlayableItemType=function(){return null},t.prototype.setDuration=function(t){},t.prototype.getDuration=function(){return NaN},t.prototype.isRecovering=function(){return!1},t.prototype.getStreamType=function(){return null},t.prototype.isReadyToPlay=function(){return this.hasMetadata()&&this.hasSource()&&this.hasStreams()&&!this.hasError()},t.prototype.isLive=function(){return!1},t.prototype.is360Video=function(){return!1},t}();i.PlayableItem=r},3353:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(5244),r=n(6342),s=function(){function t(){this.mute=!1,this.volume=.5,this.ad=null,this.state=e.States.INIT,this.paused=!1,this.seeking=!1,this.loading=!0,this.criticalError=null,this.previousItem=null,this.looped=!1,this.loadedItem=null,this.loadedAdBreakItem=null,this.rendererType=null,this.hasStartedPlayback=!1,this.hasCurrentItemPlayed=!1,this.hasRendererPlayCalled=!1,this.z$=null,this.shouldPlay=!0}return Object.defineProperty(t.prototype,"playingItem",{get:function(){return this.G$},set:function(t){this.G$=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){return this._Q},set:function(t){this._Q=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentRawTime",{get:function(){return this.H$},set:function(t){this.H$=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"duration",{get:function(){return this.i$},set:function(t){this.i$=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"playbackMode",{get:function(){return r.default.getPlaybackMode(this.G$)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentMediaType",{get:function(){return this.z$},set:function(t){this.z$=t},enumerable:!0,configurable:!0}),t.prototype.attemptingPlayback=function(){return this.isVideoPlaying()||this.state===e.States.WAITING},t.prototype.isVideoPlaying=function(){return this.videoSet()&&!this.paused},t.prototype.videoSet=function(){return this.state===e.States.VIDEO},t.prototype.isOnCriticalError=function(){return!(this.state!==e.States.END||!this.criticalError)},t.prototype.isInitializing=function(){return this.state===e.States.INIT||this.state===e.States.WAITING},t.prototype.videoLoading=function(){return this.videoSet()&&this.loading},t.prototype.isAdPlaying=function(){return!(!this.videoSet()||!this.ad)},t}();i.default=s},7189:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(4986),r=n(2341),s=function(){function t(t){this.position=-1,this.Y$=[],this.q$=0,this.TY=t}return t.prototype.destroy=function(){this.Y$=[],this.position=-1},t.prototype.addItems=function(t){if(t&&t.length){for(var i=0,n=t;i<n.length;i++){var e=n[i],s=this.TY.addItem(e);this.contains(s)||(this.Y$.push(s),this.TY.publish(r.MediaStoreEvent.MEDIA_ITEM_ADDED,s))}this.Y$.length&&-1===this.position&&(this.position=0)}},t.prototype.addItemAtIndex=function(t,i){if(t&&void 0!==i&&!(i<0)){var n=this.TY.addItem(t);this.contains(n)||(this.Y$.splice(i,0,n),this.TY.publish(r.MediaStoreEvent.MEDIA_ITEM_ADDED,n)),this.Y$.length&&-1===this.position&&(this.position=0)}},t.prototype.removeItems=function(t,i){var n=this;this.Y$.slice(t,t+i).forEach((function(t){return n.TY.publish(r.MediaStoreEvent.MEDIA_ITEM_REMOVED,t)})),this.Y$.splice(t,i),this.position>=t+i?this.position-=i:t<=this.position&&this.position<t+i&&(this.position=-1)},t.prototype.update=function(t){var i=this,n=[];return t&&t.length?(t.forEach((function(t){i.TY.getByData(t)&&n.push(i.TY.updateItem(t))})),n):n},t.prototype.updateMediaItemsState=function(t,i){var n=this;t&&t.forEach((function(t){n.TY.updateItemState(t,i)}))},t.prototype.updateMediaItemsSourceState=function(t,i){var n=this;t&&t.forEach((function(t){n.TY.updateItemSourceState(t,i)}))},t.prototype.contains=function(t){return this.Y$.indexOf(t)>=0},t.prototype.getMediaItemAt=function(t){return t<0||t>=this.Y$.length?null:this.TY.get(this.Y$[t])},t.prototype.getMediaItemById=function(t){return t?this.TY.getById(t):null},t.prototype.getMediaItemBySessionId=function(t){return t?this.TY.getBySessionId(t):null},t.prototype.getCurrentItem=function(){return this.getMediaItemAt(this.position)},t.prototype.appendItem=function(t){if(t){var i=this.Y$.length;return this.Y$.push(t.key),i}return-1},t.prototype.getItems=function(){for(var t=[],i=0;i<this.Y$.length;i++){var n=this.getMediaItemAt(i);n&&t.push(n)}return t},t.prototype.getItemIds=function(){for(var t=[],i=0;i<this.Y$.length;i++){var n=this.getMediaItemAt(i);n&&t.push(n.id)}return t},t.prototype.getItemPosition=function(t){for(var i=0,n=0,e=this.Y$;n<e.length;n++){if(0===e[n].indexOf(t))return i;i++}return-1},Object.defineProperty(t.prototype,"size",{get:function(){return this.Y$.length},enumerable:!0,configurable:!0}),t.prototype.setPosition=function(t){e.isNumber(t)&&(this.position=t)},t.prototype.getNextPosition=function(t,i,n){if((n=n||{}).looped=!1,n.ended=!1,-1===this.position)return-1;if(!this.Y$.length)return-1;var e=this.position+1;if(n.playlistLoop&&e===this.Y$.length)return n.looped=!0,0;if(t){if(e<this.Y$.length)return e;if(i&&e===this.Y$.length)return n.looped=!0,0}return!t&&i?(n.looped=!0,this.position):(n.ended=!0,-1)},t.prototype.getCurrentPosition=function(){return this.position},t.prototype.isEndOfPlaylist=function(){return this.position===this.Y$.length-1},Object.defineProperty(t.prototype,"playlistId",{get:function(){return this.W$},set:function(t){this.W$=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"playlistFetchIndex",{get:function(){return this.q$},set:function(t){this.q$=t},enumerable:!0,configurable:!0}),t.prototype.Q$=function(t,i){var n=new Error(t);if(!i)throw n;i.push(n)},t}();i.default=s},7029:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.configSchema={$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{adPlaybackOnly:{type:"boolean"},analytics:{type:"boolean"},autoplay:{type:"boolean"},casting:{type:"boolean"},continuousPlay:{type:"boolean"},enableRecovery:{type:"boolean"},fullscreen:{type:"boolean"},height:{type:"number"},lang:{type:"string"},loop:{type:"boolean"},mediaItems:{type:"array",items:[{$ref:"/mediaItemSchema"}],minItems:1},mute:{type:"boolean"},playerId:{type:["string","null"]},preload:{type:"boolean"},region:{type:"string"},site:{type:"string"},skipOnError:{type:"string",enum:["always","timebased","never"]},stopAtLastFrame:{type:"boolean"},stopBufferingOnPause:{type:"boolean"},ui:{$ref:"/uiSchema"},width:{type:"number"},backgroundPause:{type:"object",properties:{onMute:{type:"boolean",default:!0},onUnmute:{type:"boolean",default:!1},timeToPause:{type:"number",default:5},suspendStreamingTime:{type:"number",default:20},backgroundSuspendStreaming:{type:"boolean",default:!0}}},ads:{type:"object",properties:{timeout:{type:"object",properties:{load:{type:"number",minimum:1},start:{type:"number",minimum:1}}}}},vrmConfig:{$ref:"/vrmSchema"},streamSynch:{$ref:"/streamSynchSchema"}},required:["mediaItems"]}},2759:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(6120);i.mediaItemSchema={$schema:"http://json-schema.org/draft-07/schema#",id:"/mediaItemSchema",type:"object",properties:{adConfig:{type:"object",properties:{mimetype:{type:"string"},value:{type:{}}},required:["mimetype","value"]},customConfig:{type:"object"},id:{type:"string"},metadata:{type:"object",properties:{description:{type:"string"},duration:{type:"number"},title:{type:"string"},thumbnail:{type:"string"},posterUrl:{type:"string"},type:{type:"string",enum:Object.keys(e.MediaItemType).map((function(t){return e.MediaItemType[t]}))},videoTypes:{type:"array"}}},mimetype:{type:"string"},source:{$ref:"/sourceSchema"}},dependencies:{mimetype:["id"]}}},2663:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.sourceSchema={$schema:"http://json-schema.org/draft-07/schema#",id:"/sourceSchema",type:"object",properties:{streams:{type:"array",items:{$ref:"/streamSchema"},minItems:0}}}},5125:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.streamSchema={$schema:"http://json-schema.org/draft-07/schema#",id:"/streamSchema",type:"object",properties:{audioMetadata:{type:"object",properties:{autoSelect:{type:"boolean"},bitrate:{type:"number"},channels:{type:"number"},default:{type:"boolean"},forced:{type:"boolean"},samplingRate:{type:"number"}}},cdn:{type:"string"},fairplayCertificatePath:{type:"string"},live:{type:"boolean"},manifest:{type:"string"},mimeType:{type:"string"},rcMode:{type:"string"},type:{type:"string"},url:{type:"string"},videoMetadata:{type:"object",properties:{avgBitrate:{type:"number"},bitrate:{type:"number"},framerate:{type:"number"},height:{type:"number"},profile:{type:"string"},width:{type:"number"}}}},required:["url"]}},1080:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.streamSynchSchema={$schema:"http://json-schema.org/draft-07/schema#",id:"/streamSynchSchema",type:"object",properties:{synchronize:{type:"boolean",default:!1},synchConfig:{type:"object",properties:{behindLiveEdgeMs:{type:"number"},pauseOnAhead:{type:"boolean"},pauseToPullbackThresholdMs:{type:"number"},syncAccuracyMs:{type:"number"},variableRateChange:{type:"boolean"}}}},required:["synchronize"]}},5549:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.uiSchema={$schema:"http://json-schema.org/draft-07/schema#",id:"/uiSchema",type:"object",properties:{ccOnMute:{type:"boolean"},chromeless:{type:"boolean"},docking:{type:"object",properties:{enableOnMuted:{type:"boolean"},enableOnScrollDown:{type:"boolean"},enableOnScrollUp:{type:"boolean"},fadeInAnimation:{type:"boolean"},closeButtonFadeIn:{type:"boolean"},height:{type:"number"},position:{type:"object",properties:{bottom:{type:"number"},left:{type:"number"},right:{type:"number"},top:{type:"number"}}},showInfoCard:{type:"boolean"},threshold:{type:"number"},width:{type:"number"}}},endScreen:{type:"object",properties:{show:{type:"boolean"}}},playlist:{type:"object",properties:{inStream:{type:"boolean"},show:{type:"boolean"},position:{type:"string",enum:["right","bottom","hidden"]},theme:{type:"string",enum:["dark","light"]}}},showControls:{type:"boolean"},showFullscreenButton:{type:"boolean"},showPlayButton:{type:"boolean"},startScreen:{type:"object",properties:{show:{type:"boolean"},showButton:{type:"boolean"},showDescription:{type:"boolean"},showProvider:{type:"boolean"},showTitle:{type:"boolean"},showThumbnail:{type:"boolean"}}},seekControls:{type:"object",properties:{show:{type:"boolean"},offset:{type:"number",maximum:99,minimum:0}}},sliderColor:{type:"string"},title:{type:"object",properties:{showOnHover:{type:"boolean"},showOnStart:{type:"string"}}}}}},9740:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.vrmSchema={$schema:"http://json-schema.org/draft-07/schema#",id:"/vrmSchema",type:"object",properties:{companyId:{type:"string"},playerId:{type:"string"}}}},4339:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(4986),r=n(6342),s=n(5125),o=n(660).Validator,u={audioMetadata:{bitrate:0,channels:1},videoMetadata:{avgBitrate:0,bitrate:0,framerate:0,height:0,width:0},live:!1,manifest:"",url:"",aspectRatio:""},h=function(){function t(t){this.u$(t),"subtitle"===this.type&&(this.type="SUBTITLES")}return t.prototype.isRTMP=function(){var t=/^rtmp(?:e|t|te|s)?:\/\//;return t.test(this.host)||t.test(this.url)},t.prototype.isRTX=function(){return this.url.indexOf("/rtx/")>-1},t.prototype.isAtlas=function(){var t=this.host;return this.hlsInfo&&(t=this.hlsInfo.ts_url),/atlas\.cdn\.yimg\.com/.test(t)},t.prototype.isUplynk=function(){if(this.url&&this.url.length){var t=this.url.toLowerCase();return t.indexOf("uplynk.com")>-1||t.indexOf("downlynk.com")>-1||t.indexOf("uplynk.localhost")>-1||t.indexOf("downlynk.localhost")>-1}return!1},t.prototype.getType=function(){var t="unknown",i=this.url,n=this.Z$();return"m3u8:fmp4"===this.format?t="hls-fmp4":i&&(n&&(n.indexOf("rtmp")>-1||n.indexOf("rtsp")>-1)?t=n:/\/*\.f4m/i.test(i)?t=this.isRTX()?"rtx-hds":"hds":/\/*\.m3u8/i.test(i)||i.length>0&&i.indexOf("content=hls")>-1?t=this.isRTX()?"rtx-hls":"hls":/\/*\.mp4/i.test(i)?t="mp4":/\/*\.webm/i.test(i)?t="webm":/\/*\.mpd/i.test(i)&&(t="dash")),t},Object.defineProperty(t.prototype,"bitrate",{get:function(){return this.videoMetadata?this.videoMetadata.bitrate||0:this.audioMetadata&&this.audioMetadata.bitrate||0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"avgBitrate",{get:function(){return this.videoMetadata&&this.videoMetadata.avgBitrate||0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.videoMetadata&&this.videoMetadata.width||0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.videoMetadata&&this.videoMetadata.height||0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"framerate",{get:function(){return this.videoMetadata&&this.videoMetadata.framerate||0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"profile",{get:function(){return this.videoMetadata&&this.videoMetadata.profile||null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"channels",{get:function(){return this.audioMetadata&&this.audioMetadata.channels>=0?this.audioMetadata.channels:0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"forced",{get:function(){return this.audioMetadata&&this.audioMetadata.forced},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"default",{get:function(){return this.audioMetadata&&this.audioMetadata.default},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"autoSelect",{get:function(){return this.audioMetadata&&this.audioMetadata.autoSelect},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"streamProtocol",{get:function(){return this.Z$()},enumerable:!0,configurable:!0}),t.prototype.u$=function(t){this.p$(t);var i=r.default.deepCopy(t);if(i=r.default.mergeObjects(i,u),r.default.mergeObjects(this,i,!0),e.isString(this.url)&&0!==this.url.length||this.host&&this.path&&(this.url=this.host+this.path),this.type&&(this.format=this.type),this.format||(this.format=r.default.getFormat(this.url)),!this.host&&e.isString(this.url)&&this.url.length>0){this.host=this.Z$()+"://"+r.default.getHostname(this.url);var n=this.url.split(this.host);n.length>=2&&(this.path=n[1])}this.cdn&&this.cdn.length||(this.cdn=this.X$(this.url))},t.prototype.p$=function(t){try{(new o).validate(t,s.streamSchema,{throwError:!0})}catch(t){var i="Invalid stream config: "+t.property+" "+t.message;throw new Error(i)}},t.prototype.Z$=function(){var t="http",i=this.url.split(":");return i.length>1&&(t=i[0]),t},t.prototype.X$=function(t){var i="unknown";return t&&t.length>0&&(i=t.indexOf("akamai")>-1?"akamai":t.indexOf("yahoo.com")>-1||t.indexOf("yimg.com")>-1?"atlas":t.indexOf("llnwd.net")>-1?"limelight":t.indexOf("fastly.com")>-1?"fastly":t.indexOf("edgecast.com")>-1?"edgecast":r.default.parseRootHost(t)),i},t}();i.default=h},4926:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(){this.width=640,this.height=360,this.startScreenRendered=!1,this.isDocked=!1,this.isCSSLoaded=!1,this.deviceOrientation=null,this.isFullscreen=!1};i.default=n},4536:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=n(1279),r=n(4986),s=function(){function t(){this.$$={},this.AY=[]}return t.prototype.destroy=function(){this.$$={},this.AY=[]},t.prototype.register=function(t,i){if(r.isNullOrUndefined(t))throw new Error("Plugin instance is null");if(!this.J$(t))throw new Error("Plugin interface is invalid or incomplete");if(this.getPlugin(t.type,t.mimetype))throw new Error("Plugin with same type and mimetype exists");this.$$[t.type]||(this.$$[t.type]=[]),this.$$[t.type].push(t);try{t.prepare(i)}catch(t){}},Object.defineProperty(t.prototype,"defaultPlugins",{get:function(){return this.AY},set:function(t){this.AY=t},enumerable:!0,configurable:!0}),t.prototype.getExternalPlugins=function(){var t=this,i={},n=function(n){if(Object.prototype.hasOwnProperty.call(e.$$,n)){var r=e.$$[n].filter((function(i){return!function(i){return t.AY.some((function(t){return i.mimetype===t.mimetype&&i.type===t.type}))}(i)}));i[n]||(i[n]=[]),r.forEach((function(t){i[n].push(t)}))}},e=this;for(var r in this.$$)n(r);return i},t.prototype.getPlugin=function(t,i){var n=this.$$[t];if(!n)return null;for(var e=0,r=n;e<r.length;e++){var s=r[e];if(s&&s.mimetype===i)return s}return null},t.prototype.J$=function(t){if(!t||r.isNullOrUndefined(t.mimetype)||!r.isString(t.mimetype)||r.isNullOrUndefined(t.type)||!this.K$(t.type)||r.isNullOrUndefined(t.prepare)||!r.isFunction(t.prepare)||r.isNullOrUndefined(t.destroy)||!r.isFunction(t.destroy))return!1;switch(t.type){case e.PluginType.METADATA:return this.tJ(t);case e.PluginType.SOURCE_METADATA:return this.iJ(t);case e.PluginType.MORE_ITEMS:return this.nJ(t);case e.PluginType.AD:return r.isAdPlugin(t);case e.PluginType.VISUAL_SEEK:return this.eJ(t);case e.PluginType.BRANDING:return this.rJ(t);case e.PluginType.PLAYLIST:return this.sJ(t)}return!1},t.prototype.K$=function(t){return t===e.PluginType.METADATA||t===e.PluginType.SOURCE_METADATA||t===e.PluginType.MORE_ITEMS||t===e.PluginType.AD||t===e.PluginType.VISUAL_SEEK||t===e.PluginType.BRANDING||t===e.PluginType.PLAYLIST},t.prototype.tJ=function(t){return!(!t||r.isNullOrUndefined(t.resolve)||!r.isFunction(t.resolve)||r.isNullOrUndefined(t.recover)||!r.isFunction(t.recover)||r.isNullOrUndefined(t.cancel)||!r.isFunction(t.cancel))},t.prototype.iJ=function(t){return!(!t||r.isNullOrUndefined(t.resolve)||!r.isFunction(t.resolve)||r.isNullOrUndefined(t.recover)||!r.isFunction(t.recover)||r.isNullOrUndefined(t.cancel)||!r.isFunction(t.cancel))},t.prototype.nJ=function(t){return!(!t||r.isNullOrUndefined(t.resolve)||!r.isFunction(t.resolve)||r.isNullOrUndefined(t.cancel)||!r.isFunction(t.cancel))},t.prototype.eJ=function(t){return!(!t||r.isNullOrUndefined(t.getThumbnailData)||r.isNullOrUndefined(t.update)||!r.isFunction(t.getThumbnailData)||!r.isFunction(t.update))},t.prototype.rJ=function(t){return!(!t||r.isNullOrUndefined(t.create)||!r.isFunction(t.create))},t.prototype.sJ=function(t){return!(!t||!r.isFunction(t.create))},t}();i.default=s},8087:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});this&&this.__spreadArrays;Object.defineProperty(i,"__esModule",{value:!0});var s,o=n(9847),u=n(3277),h=n(5658),a=n(1204),c=n(6342),f=n(4685);o.userAgent.mobile&&a.default.hasNativeAutoplaySupport&&(s=h.default.getPool());var l=0,v=function(t){function i(){var n=t.call(this,"external-renderer")||this;return n.type=i.type,n.timedOut=!1,n.oJ=c.default.noop,n}return r(i,t),i.canUse=function(){return!0},Object.defineProperty(i.prototype,"mimetype",{get:function(){return this.PV?this.PV.mimetype:void 0},enumerable:!0,configurable:!0}),i.prototype.create=function(t){this.node=t instanceof HTMLVideoElement?t:s?s.get():c.default.createVideoNode();var i=this.node;i.setAttribute("id","vp-ext-rndr-"+ ++l),c.default.classList(i).add("vp-html5-video");var n=this.container=document.createElement("div");return n.setAttribute("id",c.default.generateGuid()),c.default.classList(n).add("vp-external-video"),n.appendChild(i),n},i.prototype.getExternalPlayer=function(){return this.PV},i.prototype.setExternalPlayer=function(t){this.PV&&this.PV!==t&&this.uJ(),this.PV=t,this.hJ()},i.prototype.play=function(t){this.PV&&this.aJ&&this.PV.play(this.aJ.rawItemData)},i.prototype.preload=function(t){},i.prototype.setPlayableItem=function(t,i,n){return void 0===i&&(i=0),void 0===n&&(n=!1),!(!t||!this.PV)&&(this.cJ=null,this.PV.preparePlayback(t.rawItemData,this.node,this.container),!this.cJ&&(this.aJ=t,!0))},i.prototype.waitForReady=function(t){t&&t()},i.prototype.seek=function(t){this.PV&&this.PV.seek(t)},i.prototype.pause=function(){this.PV&&this.PV.pause()},i.prototype.skip=function(){this.PV&&this.PV.skip()},i.prototype.getCurrentDate=function(){return null},i.prototype.getCurrentTime=function(){return this.PV?this.PV.getCurrentTime():0},i.prototype.getDuration=function(){return this.PV?this.PV.getDuration():0},i.prototype.getMuted=function(){return!(!this.PV||!this.PV.isMuted())},i.prototype.getVolume=function(){return this.PV?this.PV.getVolume():NaN},i.prototype.setQuality=function(t){},i.prototype.setError=function(t){},i.prototype.setVolume=function(t){this.PV&&this.PV.setVolume(t)},i.prototype.setMute=function(t){this.PV&&this.PV.mute(t)},i.prototype.setAudioLanguage=function(t){},i.prototype.stopMedia=function(){return!!this.PV&&(this.PV.stop(),!0)},i.prototype.bindCustomEvents=function(){},i.prototype.destroy=function(){var t=this.container;t&&t.parentNode&&t.parentNode.removeChild(t),this.PV&&(this.PV.unload(),this.uJ(),this.PV=null)},i.prototype.detachNode=function(){this.node&&this.node.pause()},i.prototype.reattachNode=function(){},i.prototype.setActive=function(t){this.fJ=t},i.prototype.showAirplayTargetMenu=function(){},i.prototype.setPIPMode=function(t){},i.prototype.suspendStreaming=function(){},i.prototype.resumeStreaming=function(){},i.prototype.getSyncOffset=function(){return NaN},i.prototype.startSync=function(){},i.prototype.stopSync=function(){},i.prototype.getSyncState=function(){return-1},i.prototype.hJ=function(){this.PV&&(this.oJ=u.listenEventDispatcherEvts(this.PV,Object.keys(f.ExternalPlayerEvent).map((function(t){return f.ExternalPlayerEvent[t]})),this.lJ.bind(this)))},i.prototype.uJ=function(){this.oJ(),this.oJ=c.default.noop},i.prototype.lJ=function(t,i){for(var n=[],e=2;e<arguments.length;e++)n[e-2]=arguments[e];f.ExternalPlayerEvent.TIME_UPDATE;var r=this.PV;switch(i){case f.ExternalPlayerEvent.TIME_UPDATE:this.publish(f.RendererEvent.TIMEUPDATE,{currentTime:r.getCurrentTime(),duration:r.getDuration(),buffered:this.node.buffered});break;case f.ExternalPlayerEvent.PLAYBACK_ERROR:var s=n[0]||this.node.error;this.cJ=s||{},this.publish(f.RendererEvent.ERROR,s);break;case f.ExternalPlayerEvent.ITEM_LOADED:this.publish(f.RendererEvent.LOADSTART);break;case f.ExternalPlayerEvent.MUTE_CHANGED:case f.ExternalPlayerEvent.VOLUME_CHANGED:this.publish(f.RendererEvent.VOLUMECHANGE,{volume:r.getVolume(),mute:r.isMuted()});break;case f.ExternalPlayerEvent.PLAY_REQUESTED:this.ended=!1;break;case f.ExternalPlayerEvent.PLAYING:this.paused=!1,this.ended=!1,this.publish(f.RendererEvent.PLAYING);break;case f.ExternalPlayerEvent.PAUSED:this.paused=!0,this.publish(f.RendererEvent.PAUSE);break;case f.ExternalPlayerEvent.PLAY_COMPLETE:this.ended=!0,this.publish(f.CustomRendererEvent.PLAY_COMPLETE,{evt:"ad_play_complete"}),this.publish(f.RendererEvent.ENDED);break;case f.ExternalPlayerEvent.SKIPPED:this.publish(f.CustomRendererEvent.SKIPPED)}},i.type=f.RendererType.EXTERNAL,i}(f.Renderer);i.default=v},5132:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s,o,u=n(9847),h=n(3072),a=n(6389),c=n(1962),f=n(5658),l=n(2912),v=n(1204),d=n(6342),p=n(514),m=n(4685);v.default.hasTouchRestrictions&&(s=f.default.getPool()),function(t){t.INLINE="inline",t.PIP="picture-in-picture",t.FULLSCREEN="fullscreen"}(o||(o={}));var b=function(t){function i(n,e){var r=t.call(this,"html-renderer")||this;return r.type=i.type,r.vJ=!1,r.wV=n,r._m=e,r}return r(i,t),i.canUse=function(){return!0},i.prototype.create=function(t){var i=this;return this.node=t instanceof HTMLVideoElement?t:s?s.get():d.default.createVideoNode(),this.node||(this.node=d.default.createVideoNode()),this._m.preload||this.node.setAttribute("preload","metadata"),this.dJ()&&(this.node.controls=!0),this.node.setAttribute("id",d.default.generateGuid()),d.default.classList(this.node).add("vp-html5-video"),this.eF(),this.pJ(this.node),u.userAgent.mobile&&v.default.autoplayByUIEvtOnly&&this._m.autoplay&&l.default&&(this.mJ=l.default.setupTouchToPlayRestrictionRemoval(this.node,(function(){i.mJ=null,i.wV.publish(c.TOUCH_TO_PLAY_RESTRICTION_REMOVED)}))),this.fJ=!1,this.node},i.prototype.destroy=function(){this.bJ(),this.node&&(s&&s.discard(this.node),this.node.pause(),this.node.src="",this.node.load(),this.node.parentNode&&this.node.parentNode.removeChild(this.node),delete this.node),this.mJ&&(this.mJ(),this.mJ=null),this.iE=null},i.prototype.detachNode=function(){this.bJ(),this.node&&this.node.pause&&this.node.pause()},i.prototype.getCurrentDate=function(){return null},i.prototype.getCurrentTime=function(){return this.node?this.node.currentTime:0},i.prototype.getDuration=function(){return this.node?this.node.duration:0},i.prototype.getMuted=function(){return!!this.node&&this.node.muted},i.prototype.getVolume=function(){return this.node?this.node.volume:NaN},i.prototype.isAirplaying=function(){return!(!this.node||!this.node.webkitCurrentPlaybackTargetIsWireless)},i.prototype.reattachNode=function(){this.eF()},i.prototype.seek=function(t){var i=this;if(this.node)try{this.node.currentTime=t}catch(e){if("InvalidStateError"===e.name)var n=this.on(m.RendererEvent.LOADEDMETADATA,(function(){i.node&&(i.node.currentTime=t,i.removeEventListener(m.RendererEvent.LOADEDMETADATA,n))}),this)}},i.prototype.setActive=function(t){this.fJ=t},i.prototype.setMute=function(t){this.node&&"boolean"==typeof t&&(u.userAgent.mobile&&v.default.autoplaySupported&&l.default?l.default.setMuteSafe(this.node,t):this.node.muted=t)},i.prototype.setVolume=function(t){this.node&&this.node.volume!==t&&(this.node.volume=t)},i.prototype.setError=function(t){this.iE=t},i.prototype.showAirplayTargetMenu=function(){this.node&&"function"==typeof this.node.webkitShowPlaybackTargetPicker&&this.node.webkitShowPlaybackTargetPicker()},i.prototype.waitForReady=function(t){t()},i.prototype.reportError=function(t,i,n,e,r){var s=d.default.createErr(t,this.QY,i,n,e,r),o=i===a.E_INFO?m.RendererEvent.INFO:m.RendererEvent.ERROR;this.publish(o,s)},i.prototype.enableMobileNativeCC=function(t){if(this.node){var i=document.createDocumentFragment();this.gJ(),t.langList.forEach((function(n){var e=document.createElement("track");e.setAttribute("label","English"),e.setAttribute("srclang",n.lang),e.setAttribute("kind","subtitles"),e.setAttribute("type","text/vtt"),n.lang===t.selectedLang&&e.setAttribute("default","true"),e.src=n.url,e.track&&(e.track.mode="hidden"),i.appendChild(e)})),this.node.appendChild(i)}},i.prototype.setPIPMode=function(t){var i=this.node;u.userAgent.safari&&i.webkitSupportsPresentationMode&&(i.onwebkitpresentationmodechanged=t?d.default.noop:function(){i.webkitPresentationMode===o.PIP&&setTimeout((function(){i.webkitSetPresentationMode(o.INLINE)}),250)})},i.prototype.eF=function(){var t=this;if(this.node){this.yJ=function(i){if(!t.ended){var n=i.type,e=m.RendererEvent[n.toUpperCase()];n===m.NativeVideoEvent.PLAYING&&t.node.paused||(n===m.NativeVideoEvent.VOLUMECHANGE&&t.publish(m.RendererEvent.VOLUMECHANGE,{volume:t.node.volume,mute:t.node.muted}),u.userAgent.iosWebView&&n===m.NativeVideoEvent.PAUSE&&t.wJ(),t.rG(n,e))}}.bind(this),Object.keys(m.NativeVideoEvent).forEach((function(i){t.node.addEventListener(m.NativeVideoEvent[i],t.yJ)})),u.userAgent.iphone&&!v.default.canPlayInline||(this._J=new p.default(this.node,(function(){t.publish(m.CustomRendererEvent.CLICK)}))),u.userAgent.safari>=8&&this.EJ(),u.userAgent.ios&&this.OJ(),v.default.airplaySupported&&this._m.casting&&this.AJ(),this._h={},this._h[c.FULLSCREEN_CHANGE]=this.wV.addEventListener(c.FULLSCREEN_CHANGE,(function(){t.node&&t.wV.publish(c.PLAYER_RESIZE,t.node.clientWidth,t.node.clientHeight)}),this)}},i.prototype.SJ=function(){var t=this;if(this.node){var i=this.node.play();return i&&"function"==typeof i.catch&&i.catch((function(i){t.node.paused})),i}},i.prototype.gJ=function(){if(this.node)for(var t=this.node.querySelectorAll("track"),i=0;i<t.length;i++)this.node.removeChild(t[i])},i.prototype.TJ=function(t){var i=a.PLAYER_CODES.E_NATIVE_ERROR;if(!(t&&t instanceof MediaError))return i;switch(t.code){case MediaError.MEDIA_ERR_ABORTED:return a.PLAYER_CODES.E_NATIVE_ABORTED;case MediaError.MEDIA_ERR_NETWORK:return a.PLAYER_CODES.E_NATIVE_NETWORK_FAILURE;case MediaError.MEDIA_ERR_DECODE:return a.PLAYER_CODES.E_NATIVE_DECODE_ERROR;case MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:return a.PLAYER_CODES.E_NATIVE_SRC_NOT_SUPPORTED}return i},i.prototype.AJ=function(){var t=this;if(v.default.airplaySupported&&this.node){var i=function(i){t.wV.publish(h.ExternalEvt.AIRPLAY_AVAILABILITY_CHANGE,"available"===i.availability)},n=function(){t.wV.publish(h.ExternalEvt.AIRPLAY_CONNECTION_STATE_CHANGE,{connected:t.isAirplaying(),isInitialEvt:!t.IJ}),t.IJ||(t.IJ=!0)};this.node.addEventListener("webkitplaybacktargetavailabilitychanged",i),this.node.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",n),this.jJ=function(){t.node&&(t.node.removeEventListener("webkitplaybacktargetavailabilitychanged",i),t.node.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged",n))}}},i.prototype.EJ=function(){var t=this;if(this.node&&this.node.textTracks){var i=function(i){var n=i.track;n&&("metadata"===n.kind?(n.mode="hidden",n.addEventListener("cuechange",(function(i){var n=i.target,e=n&&n.activeCues[0],r=e&&e.value&&e.value.data,s=e&&e.value&&e.value.info;if(s)r=s;else if("string"==typeof r)try{r=JSON.parse(r)}catch(t){}else r=r instanceof ArrayBuffer?String.fromCharCode.apply(null,new Uint8Array(r)):{};t.wV.publish(c.TIMED_METADATA_RECEIVED,r)}))):"subtitles"!==n.kind&&"captions"!==n.kind||t.vJ&&t.wV.publish(c.SUBTITLE_TRACK_RECEIVED,{itemId:t.aJ.id,track:n}))},n=function(t){for(var i=0,n=t&&t.srcElement;i<n.length;i++){var e=n[i];"metadata"===e.kind&&"disabled"===e.mode&&(e.mode="hidden")}};this.node.textTracks.addEventListener("addtrack",i),this.node.textTracks.addEventListener("change",n),this.MJ=function(){t.node&&t.node.textTracks&&(t.node.textTracks.removeEventListener("addtrack",i),t.node.textTracks.removeEventListener("change",n))}}},i.prototype.OJ=function(){var t=this;if(this.node){var i=function(){t.publish(m.CustomRendererEvent.END_FULLSCREEN)};this.node.addEventListener("webkitendfullscreen",i),this.NJ=function(){t.NJ=null,t.node.removeEventListener("webkitendfullscreen",i)};var n=function(){t.publish(m.CustomRendererEvent.ENTER_FULLSCREEN)};this.node.addEventListener("webkitbeginfullscreen",n),this.kJ=function(){t.kJ=null,t.node.removeEventListener("webkitbeginfullscreen",n)}}},i.prototype.bJ=function(){var t=this;this.MJ&&this.MJ(),this.NJ&&this.NJ(),this.kJ&&this.kJ(),this.jJ&&this.jJ(),Object.keys(m.NativeVideoEvent).forEach((function(i){t.node&&t.node.removeEventListener(m.NativeVideoEvent[i],t.yJ)})),this._J&&(this._J.destroy(),this._J=null),this.wV.removeEventListeners(this._h)},Object.defineProperty(i.prototype,"xG",{get:function(){return this._m.playlist},enumerable:!0,configurable:!0}),i.prototype.vQ=function(){return this.xG.getCurrentItem()},Object.defineProperty(i.prototype,"QY",{get:function(){return this._m.playbackState},enumerable:!0,configurable:!0}),i.prototype.pJ=function(t){var i=this;t.__play||(t.__play=t.play.bind(t),t.play=function(){var n=t.__play();return n&&"function"==typeof n.then&&n.then((function(t){i.publish(m.CustomRendererEvent.PLAYBACK_START_NOT_BLOCKED)}),(function(n){t.paused&&i.publish(m.CustomRendererEvent.PLAYBACK_START_BLOCKED)})),n})},i.prototype.wJ=function(){if(this.node){var t=this.node;!this.dJ()&&t.controls&&(t.controls=!1)}},i.prototype.dJ=function(){return this._m.showControls&&!v.default.canPlayInline},i.type=m.RendererType.HTML5_RAW,i}(m.Renderer);i.default=b},8259:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s,o=n(9847),u=n(1962),h=n(4685),a=n(2878),c=n(6342),f=n(43),l=n(3891),v=16/9,d=function(t){function i(n,e){var r=t.call(this,n,e)||this;return r.type=i.type,r}return r(i,t),i.canUse=function(){return!o.userAgent.tv&&(a.default.is360Supported()&&t.canUse.call(this))},i.prototype.create=function(i){return t.prototype.create.call(this,i),this.RJ(),this.container},i.prototype.destroy=function(){this.LJ(),t.prototype.destroy.call(this)},i.prototype.waitForReady=function(t){var i=this;this.gV?(this.DJ(),t()):this.CJ=this.wV.addEventListener(u.THREE_SIXTY_READY,(function(){i.DJ(),t()}),this)},i.prototype.RJ=function(){var t=this;this.gV=!1,this.node&&(this.node.setAttribute("crossorigin","anonymous"),this.node.style.visibility="hidden",this.PJ=document.createElement("div"),this.PJ.classList.add("vp-360-node"),this.PJ.style.position="absolute",this.container=document.createElement("div"),this.container.setAttribute("id",c.default.generateGuid()),this.container.classList.add("vp-360-video"),this.container.appendChild(this.node),this.container.appendChild(this.PJ),this.xJ().then((function(){t.UJ()})).catch((function(t){})))},i.prototype.xJ=function(){return new Promise((function(t,i){n.e(212).then(function(){s=n(2212),t(s)}.bind(null,n)).catch((function(t){i(t)}))}))},i.prototype.UJ=function(){this.VJ=new s.PerspectiveCamera(70,v,.01,1e3),this.VJ.target=new s.Vector3(0,0,0);var t=new s.SphereBufferGeometry(500,64,32);t.scale(-1,1,1);var i=new s.VideoTexture(this.node);i.minFilter=s.NearestFilter;var n=new s.MeshBasicMaterial({map:i}),e=new s.Mesh(t,n);this.FJ=new s.Scene,this.FJ.add(e),this.BJ=new s.WebGLRenderer,this.BJ.setPixelRatio(window.devicePixelRatio),this.PJ&&this.PJ.appendChild(this.BJ.domElement),this.zJ=new f.default(this.container),this.GJ=0,this.HJ=0,this.YJ=!0,this.qJ(),this.gV=!0,this.wV.publish(u.THREE_SIXTY_READY)},i.prototype.qJ=function(){var t=this;this.WJ=this.QJ.bind(this),this.ZJ=this.XJ.bind(this),this.$J=this.JJ.bind(this),this.KJ=this.tK.bind(this),this.iK=this.nK.bind(this),this.XQ=this.JE.bind(this),this.container&&(this.container.addEventListener("mousedown",this.WJ,!1),this.container.addEventListener("mousemove",this.ZJ,!1),this.container.addEventListener("mouseup",this.$J,!1),this.container.addEventListener("mouseover",this.KJ,!1),this.container.addEventListener("mouseout",this.iK,!1),this.container.addEventListener("resize",this.XQ,!1)),this.UW=this.qE.bind(this),this.eK=this.YE.bind(this),this.rK=this.QE.bind(this),this.node&&(this.node.addEventListener("pause",this.UW),this.node.addEventListener("playing",this.eK),this.node.addEventListener("seeked",this.rK)),this.zJ&&this.zJ.addClickListener(this.sK.bind(this)),this.oK={},this.oK[u.PLAYER_RESIZE]=this.wV.addEventListener(u.PLAYER_RESIZE,(function(i,n){window.setTimeout((function(){t.uK&&(i=window.screen.width,n=window.screen.height),t.hK(i,n)}),1)}),this),this.oK[u.FULLSCREEN_CHANGE]=this.wV.addEventListener(u.FULLSCREEN_CHANGE,(function(i){t.uK=!!i}),this),this.oK[u.PLAYER_DIMENSION_CHANGE]=this.wV.addEventListener(u.PLAYER_DIMENSION_CHANGE,(function(){var i,n,e;t.node&&t.node.parentNode&&((i=window.getComputedStyle(t.node.parentNode))&&(n=parseInt(i.getPropertyValue("width"),10),e=parseInt(i.getPropertyValue("height"),10)),n&&!isNaN(n)&&e&&!isNaN(e)&&t.hK(n,e))}),this)},i.prototype.sK=function(){this.GJ=0,this.HJ=0,this._E(),this.zJ&&this.zJ.update(this.GJ),this.wV.publish(u.THREE_SIXTY_PIE_INTERACT)},i.prototype.aK=function(){var t=this;this.oK&&Object.keys(this.oK).forEach((function(i){t.wV.removeEventListener(i,t.oK[i])})),this.WJ&&(this.container&&this.container.removeEventListener("mousedown",this.WJ,!1),this.WJ=null),this.ZJ&&(this.container&&this.container.removeEventListener("mousemove",this.ZJ,!1),this.ZJ=null),this.$J&&(this.container&&this.container.removeEventListener("mouseup",this.$J,!1),this.$J=null),this.KJ&&(this.container&&this.container.removeEventListener("mouseover",this.KJ,!1),this.KJ=null),this.XQ&&(this.container&&this.container.removeEventListener("resize",this.XQ,!1),this.XQ=null),this.KJ&&(this.container&&this.container.removeEventListener("mouseover",this.KJ,!1),this.KJ=null),this.UW&&(this.node&&this.node.removeEventListener("pause",this.UW),this.UW=null),this.eK&&(this.node&&this.node.removeEventListener("playing",this.eK),this.eK=null),this.rK&&(this.node&&this.node.removeEventListener("seeked",this.rK),this.rK=null),this.CJ&&(this.wV.removeEventListener(u.THREE_SIXTY_READY,this.CJ),this.CJ=null)},i.prototype.cK=function(){this.fK=!1,this.container&&(this.container.classList.remove("grabbing-360"),this.container.classList.add("over-360")),this.lK&&(this.lK=!1,this.YJ=!0)},i.prototype.hK=function(t,i){var n=t,e=i;i*v>t&&(e=t/v),this.VJ&&(this.VJ.setViewOffset(t,i,t-n,i-e,n,e),this.VJ.updateProjectionMatrix()),this.BJ&&this.BJ.setSize(t,i)},i.prototype.vK=function(){var t=this.vK.bind(this);if(this.YJ&&this.dK)return window.cancelAnimationFrame(this.dK),void(this.dK=null);this.dK=window.requestAnimationFrame(t),this._E()},i.prototype._E=function(){this.HJ=Math.max(-85,Math.min(85,this.HJ));var t=s.Math.degToRad(90+this.HJ),i=s.Math.degToRad(this.GJ);this.VJ&&(this.VJ.position.x=500*Math.sin(t)*Math.cos(i),this.VJ.position.y=500*Math.cos(t),this.VJ.position.z=500*Math.sin(t)*Math.sin(i),this.VJ.lookAt(this.VJ.target),this.VJ.position.copy(this.VJ.target).negate(),this.FJ&&this.BJ&&this.BJ.render(this.FJ,this.VJ))},i.prototype.LJ=function(){this.dK&&window.cancelAnimationFrame(this.dK),this.YJ=!0,this.aK(),this.zJ&&(this.zJ.destroy(),this.zJ=null),this.PJ&&(this.PJ.parentNode&&this.PJ.parentNode.removeChild(this.PJ),this.PJ=null),this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container),this.VJ=null,this.FJ=null,this.BJ=null},i.prototype.qE=function(){this.pK=!0,this.YJ=!0},i.prototype.YE=function(){this.pK=!1,this.YJ=!1,this.vK()},i.prototype.QE=function(){this._E()},i.prototype.tK=function(){this.container&&this.container.classList.add("over-360")},i.prototype.QJ=function(t){this.mK=!1,this.container&&(this.container.classList.remove("over-360"),this.container.classList.add("grabbing-360")),this.fK=!0,this.bK=t.clientX,this.gK=t.clientY,this.yK=this.GJ,this.wK=this.HJ},i.prototype.XJ=function(t){this.fK&&(this.pK&&!this.lK&&(this.lK=!0,this.YJ=!1,this.vK()),this.mK=!0,this.GJ=.1*(this.bK-t.clientX)+this.yK,this.HJ=.1*(t.clientY-this.gK)+this.wK,this.zJ&&this.zJ.update(this.GJ))},i.prototype.JJ=function(){this.fK&&(this.cK(),this.mK?this.wV.publish(u.THREE_SIXTY_INTERACT):this.wV.publish(u.TOGGLE_PLAY_PAUSE)),this.mK=!1},i.prototype.nK=function(){this.cK()},i.prototype.JE=function(){this.container&&this.hK(this.container.offsetWidth,this.container.offsetHeight)},i.prototype.DJ=function(){this.CJ&&(this.wV.removeEventListener(u.THREE_SIXTY_READY,this.CJ),this.CJ=null),!this._K&&this.BJ&&this.container&&(this.BJ.setSize(this.container.offsetWidth,this.container.offsetHeight),this._K=!0)},i.type=h.RendererType.HTML5_HLS_360,i}(l.default);i.default=d},3891:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s=n(1842),o=n(9847),u=n(3072),h=n(954),a=n(6389),c=n(1962),f=n(1962),l=n(440),v=n(4685),d=n(2878),p=n(4986),m=n(6342),b=function(t){function i(n,e){var r=t.call(this,n,e)||this;return r.type=i.type,r.EK(),r}return r(i,t),i.canUse=function(){return d.default.useHtml5MseDefault()&&d.default.isHtml5MseAvailable()},i.prototype.create=function(i){this.node=t.prototype.create.call(this,i);var n=this.AK();return this.SK=new s(this.node,n),this.node},i.prototype.play=function(t){void 0===t&&(t=0),this.ended=!1,this.seeking=!1,this.wV.publish(c.PROFILE_START,f.METRICS.STREAM_PLAY_TO_RENDER),this.SK.play(t)},i.prototype.pause=function(){this.SK.pause()},i.prototype.preload=function(t){!t||p.isNumber(t.startOffset)&&t.startOffset>0||this.SK.preload(t.bufferLimit)},i.prototype.setPlayableItem=function(t,i,n){var e=this;if(void 0===i&&(i=0),void 0===n&&(n=!1),!t)return!1;this.EK(),this.qL=m.default.getPlaybackMode(t);var r,s=t.isLive(),u=t.streamProfiles;if(u&&u.length||(u=t.streams),!u)return!1;var h=[];if(u.forEach((function(t){t&&t.format&&t.format.indexOf("m3u8")>=0?(t.hls_info=t.hlsInfo,h.push(t),e.TK="hls"):t&&t.format&&t.format.indexOf("mpd")>=0&&(r=t.url,e.TK="dash")})),"hls"===this.TK){var d=[];if(t.altStreams&&(t.altStreams=this.IK(t.altStreams),t.altStreams.forEach((function(t){d.push(t)}))),this.wV.publish(c.PROFILE_START,f.METRICS.STREAM_REQUEST_TO_RENDER),this.qL===v.PlaybackMode.VIDEO&&this.wV.publish(c.PROFILE_START,f.METRICS.LOAD_TO_LOADED_DATA),h.length>0)return this.SK.setSrc({streams:h,altStreams:d,sessionId:t.videoSession,currLang:t&&t.getCurrLanguage(),is360:t.is360Video(),live:s,skt:t instanceof l.default?t.skt:"",syncPoint:t.syncPoint}),this.aJ=t,!0}else if("dash"===this.TK){if(59===o.userAgent.firefox){var p=m.default.createErr(a.ErrorGroup.Streaming,this.QY,a.E_PLAYER_JS_HLS,a.PLAYER_JS_HLS_CODES.MEDIA_ERR_DECODE);return this.publish(v.RendererEvent.ERROR,p),!1}if(null!==r)return this.SK.setSrc({url:r,sessionId:t.videoSession,currLang:t&&t.getCurrLanguage(),is360:t.is360Video(),live:s}),this.aJ=t,!0}return!1},i.prototype.waitForReady=function(t){t()},i.prototype.getCurrentDate=function(){return this.SK.getCurrentDate()},i.prototype.setQuality=function(t){this.SK.setQuality(t)},i.prototype.setAudioLanguage=function(t){this.SK.setAudioLanguage(t)},i.prototype.stopMedia=function(){this.SK.unload()},i.prototype.bindCustomEvents=function(){var t=this;if(this.node){this.unbindCustomEvents();this.jK=function(i){var n=i.type;t.MK(n,i)}.bind(this),Object.keys(f.HLSVideoEvent).forEach((function(i){t.node&&t.node.addEventListener(f.HLSVideoEvent[i],t.jK)}))}},i.prototype.unbindCustomEvents=function(){var t=this;this.node&&Object.keys(f.HLSVideoEvent).forEach((function(i){t.node&&t.node.removeEventListener(f.HLSVideoEvent[i],t.jK)}))},i.prototype.bindPlaybackEvents=function(){},i.prototype.unbindPlaybackEvents=function(){},i.prototype.suspendStreaming=function(){this.SK&&this.SK.suspendStreaming()},i.prototype.resumeStreaming=function(){this.SK&&this.SK.resumeStreaming()},i.prototype.getSyncOffset=function(){return this.SK?this.SK.getSyncOffset():NaN},i.prototype.startSync=function(){var t;null===(t=this.SK)||void 0===t||t.startSync()},i.prototype.stopSync=function(){var t;null===(t=this.SK)||void 0===t||t.stopSync()},i.prototype.getSyncState=function(){return this.SK?this.SK.getSyncState():-1},i.prototype.destroy=function(){t.prototype.destroy.call(this),this.SK&&this.SK.destroy()},i.prototype.eF=function(){t.prototype.eF.call(this),this.bindCustomEvents()},i.prototype.bJ=function(){t.prototype.bJ.call(this),this.unbindCustomEvents()},i.prototype.rG=function(t,i){switch(t===v.NativeVideoEvent.PLAYING&&this.wV.publish(c.PROFILE_END,[f.METRICS.STREAM_PLAY_TO_RENDER,f.METRICS.STREAM_REQUEST_TO_RENDER]),t){case v.NativeVideoEvent.SEEKING:case v.NativeVideoEvent.SEEKED:this.node&&this.publish(i,{currentTime:this.node.currentTime,duration:this.node.duration,buffered:this.node.buffered});break;case v.NativeVideoEvent.ERROR:if(!this.node)return;var n=this.node.error,e=this.SK.error||{},r=void 0,s=void 0;p.isNumber(e.code)?(r=e.code.toString(),s=e.message):(r=n.code.toString(),s=n.message);var o=m.default.createErr(a.ErrorGroup.Streaming,this.QY,a.E_PLAYER_JS_HLS,r,null,s);this.NK(o),this.publish(v.RendererEvent.ERROR,o);break;case v.NativeVideoEvent.ENDED:this.ended=!0;var u=this.vQ();if(!u)return;u.isLive()&&this.wV.publish(c.WARNING,m.default.createErr(a.ErrorGroup.Streaming,this.QY,a.E_WARNING,a.WARNING_CODES.E_LIVE_PLAYBACK_COMPLETE),!0),this.publish(i);break;case v.NativeVideoEvent.PAUSE:if(this.ended)break;if(this.seeking)break;this.publish(i);break;case v.NativeVideoEvent.PLAY:this.kK=!1,this.publish(i);break;case v.NativeVideoEvent.PLAYING:this.kK=!0,this.publish(i);break;case v.NativeVideoEvent.TIMEUPDATE:if(!this.node)return;this.publish(i,{currentTime:this.node.currentTime,duration:this.node.duration,buffered:this.node.buffered}),this.kK||(this.kK=!0,this.publish(v.RendererEvent.PLAYING));break;case v.NativeVideoEvent.LOADEDDATA:this.wV.publish(c.PROFILE_END,f.METRICS.LOAD_TO_LOADED_DATA),this.publish(i);break;case v.NativeVideoEvent.WAITING:case v.NativeVideoEvent.VOLUMECHANGE:break;default:this.publish(i)}},i.prototype.MK=function(t,i){var n;switch(t){case f.HLSVideoEvent.INFO_UPDATE:if(this.fJ){var e=i.detail.mediaInfo,r=e.currentStreamBitrate;0===this._m.bitrate&&r>0&&this.wV.publish(u.ExternalEvt.BITRATE_CHANGE,r,{}),e.drmsys&&e.drm&&(this._m.isDrmAvailable=e.drm,this._m.drmSystem=e.drmsys),this.wV.publish(c.PLAYBACK_INFO,e)}break;case f.HLSVideoEvent.STREAM_SWITCHED:var s=i.detail.bitrate,o={reason:i.detail.reason,oldFrameRate:i.detail.oldFrameRate,newFrameRate:i.detail.newFrameRate};this.wV.publish(u.ExternalEvt.BITRATE_CHANGE,s,o);break;case f.HLSVideoEvent.HLS_WAITING:i&&i.detail&&!p.isNullOrUndefined(i.detail.bufferInit)&&this.publish(v.RendererEvent.WAITING,{value:i.detail.value,ignoreBuffering:i.detail.bufferInit});break;case f.HLSVideoEvent.SEGMENT_FIRST_BYTE_LOADED:this.wV.publish(c.SEGMENT_FIRST_BYTE_LOADED,i.detail);break;case f.HLSVideoEvent.SEGMENT_RENDERED:var l=this.SK.getSegInfo();l&&l.segInfo&&this.RK(l);break;case f.HLSVideoEvent.VTT_SEGMENT_LOADED:var d=this._m?this.xG:null;if(i.detail&&d){var b=void 0;if(this.QY.ad)b=this.aJ.id;else{var g=d.getMediaItemBySessionId(i.detail.sessionId);b=g?g.id:null}i.detail.itemId=b}this.wV.publish(c.VTT_SEGMENT_LOADED,i.detail);break;case f.HLSVideoEvent.LIVE_LOADING_LATE:this.wV.publish(c.LIVE_LOADING_LATE);break;case f.HLSVideoEvent.STREAM_UPDATED:this.wV.publish(c.MEDIA_PLAYLIST_UPDATED);break;case f.HLSVideoEvent.CUEPOINT_DETECTED:this.wV.publish(u.ExternalEvt.CUEPOINT_DETECTED,i.detail.cuepointDuration,i.detail.timeGapBeforeCUEOUT);break;case f.HLSVideoEvent.CUEPOINT_STARTED:this.wV.publish(u.ExternalEvt.CUEPOINT_STARTED,i.detail.cuepointDuration,i.detail.cuepointPlayedTime);break;case f.HLSVideoEvent.SUBTITLE_STREAM_UPDATED:this.wV.publish(c.SUBTITLE_PLAYLIST_UPDATED);break;case f.HLSVideoEvent.PRELOAD_PROGRESS:this.wV.publish(c.PROFILE_END,f.METRICS.STREAM_REQUEST_TO_RENDER),this.wV.publish(c.PRELOAD_PROGRESS);break;case f.HLSVideoEvent.SEGINFO_METRICS_AVAILABLE:this.RK(i.detail);break;case f.HLSVideoEvent.CONTENT_LOAD_FINISHED:this.wV.publish(c.CONTENT_LOAD_FINISHED,i.detail);break;case f.HLSVideoEvent.PRELOAD_START:this.wV.publish(c.PRELOAD_START);break;case f.HLSVideoEvent.PRELOAD_COMPLETE:this.wV.publish(c.PRELOAD_COMPLETE);break;case f.HLSVideoEvent.BUFFER_GROWTH_DETECTED:this.wV.publish(c.BUFFER_GROWTH_DETECTED,i.detail);break;case f.HLSVideoEvent.CC_VTT_AVAILABLE:(n=this.xG.getMediaItemBySessionId(i.detail.sessionId))&&n.setCCAvailability(!0);break;case f.HLSVideoEvent.MULTI_LANGUAGES_AVAILABLE:(n=this.xG.getMediaItemBySessionId(i.detail.sessionId))&&n.setMultiLanguages(i.detail.languages),this.wV.publish(c.MULTI_LANGUAGES_AVAILABLE);break;case f.HLSVideoEvent.MEDIA_METADATA_LOADED:var y=this._m.bitrates,w=this._m.heights;this._m.bitrates=y&&y.length?y:i.detail.map((function(t){return t.bitrate/1e3})),this._m.heights=w&&w.length?w:i.detail.map((function(t){return t.height}));break;case f.HLSVideoEvent.TIMED_METADATA_READY:var _=m.default.extractID3Data(i.detail.data);if(_){var E=m.default.detectRegexPattern(h.ID3_MATCH_PATTERN.JSON,_);if(E)try{_=JSON.parse(E)}catch(t){}this.wV.publish(c.TIMED_METADATA_RECEIVED,_)}break;case f.HLSVideoEvent.BUFFER_GAP_DETECTED:var O=m.default.createErr(a.ErrorGroup.Streaming,this.QY,a.E_WARNING,a.WARNING_CODES.E_BUFFER_GAP);this.wV.publish(c.WARNING,O);break;case f.HLSVideoEvent.DATERANGE_STARTED:this.publish(v.RendererEvent.DATERANGE_STARTED,i.detail);break;case f.HLSVideoEvent.DATERANGE_ENDED:this.publish(v.RendererEvent.DATERANGE_ENDED,i.detail);break;case f.HLSVideoEvent.STREAM_SYNCH_STRATEGY_APPLIED:this.wV.publish(c.STREAM_SYNCH_STRATEGY_APPLIED,i.detail);break;case f.HLSVideoEvent.STREAM_SYNCH_COMPLETE:this.wV.publish(c.STREAM_SYNCH_COMPLETE,i.detail)}},i.prototype.NK=function(t){switch(t.subcategory){case a.PLAYER_JS_HLS_CODES.ERR_DRM_EME_MISSING:t.category=a.E_PLAYER_DRM,t.subcategory=a.PLAYER_DRM_CODES.E_EME_MISSING;break;case a.PLAYER_JS_HLS_CODES.ERR_DRM_INIT:t.category=a.E_PLAYER_DRM,t.subcategory=a.PLAYER_DRM_CODES.E_INIT;break;case a.PLAYER_JS_HLS_CODES.ERR_DRM_CONFIG:t.category=a.E_PLAYER_DRM,t.subcategory=a.PLAYER_DRM_CODES.E_CONFIG;break;case a.PLAYER_JS_HLS_CODES.ERR_DRM_LICENSE_REQUEST:t.category=a.E_PLAYER_DRM,t.subcategory=a.PLAYER_DRM_CODES.E_LICENSE_REQUEST}},i.prototype.AK=function(){return this.LK=!1,{useWorker:!0,sendAbrAnalytics:this.LK,stopBufferingOnPause:this._m.stopBufferingOnPause,dimensions:{width:this._m.uiState.width,height:this._m.uiState.height},streamSynch:this._m.config.streamSynch}},i.prototype.DK=function(){var t=document.getElementsByClassName(h.VIDEO_MAIN_ELEMENT_CLASS);return!m.default.isPlayerInBackground()&&t&&t.length>0&&0!==m.default.getElementViewability(t[0])},i.prototype.IK=function(t){if(!t)return t;var i={};return t.filter((function(t){var n=t.type+"_"+t.host+t.path;return!i[n]&&(i[n]=1,!0)}))},i.prototype.RK=function(t){var i=t.segInfo,n=t.sessionId,e=this.DK();i.forEach((function(t){t.vis=e})),this.wV.publish(c.SEG_INFO_AVAILABLE,{val:i,session:n,bufferLen:t.bufferLen})},i.prototype.EK=function(){this.aJ=null,this.TK=null,this.qL=v.PlaybackMode.VIDEO,this.kK=!0,this.seeking=!1,this.ended=!1},i.type=v.RendererType.HTML5_HLS,i}(n(5132).default);i.default=b},6125:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s,o=n(9847),u=n(1962),h=n(4685),a=n(2878),c=n(6342),f=n(43),l=n(8696),v=16/9,d=function(t){function i(n,e){var r=t.call(this,n,e)||this;return r.type=i.type,r.t$=e.capabilities[h.RendererType.HTML5_RAW_360],r}return r(i,t),i.canUse=function(){return!o.userAgent.tv&&(a.default.is360Supported()&&t.canUse.call(this))},i.prototype.create=function(i){return t.prototype.create.call(this,i),this.RJ(),this.container},i.prototype.destroy=function(){this.LJ(),t.prototype.destroy.call(this)},i.prototype.waitForReady=function(t){var i=this;this.gV?(this.DJ(),t()):this.CJ=this.wV.addEventListener(u.THREE_SIXTY_READY,(function(){i.DJ(),t()}),this)},i.prototype.RJ=function(){var t=this;this.gV=!1,this.node&&(this.node.setAttribute("crossorigin","anonymous"),this.node.style.visibility="hidden",this.PJ=document.createElement("div"),this.PJ.classList.add("vp-360-node"),this.PJ.style.position="absolute",this.container=document.createElement("div"),this.container.setAttribute("id",c.default.generateGuid()),this.container.classList.add("vp-360-video"),this.container.appendChild(this.node),this.container.appendChild(this.PJ),this.xJ().then((function(){t.UJ()})).catch((function(t){})))},i.prototype.xJ=function(){return new Promise((function(t,i){n.e(212).then(function(){s=n(2212),t(s)}.bind(null,n)).catch((function(t){i(t)}))}))},i.prototype.UJ=function(){this.VJ=new s.PerspectiveCamera(70,v,.01,1e3),this.VJ.target=new s.Vector3(0,0,0);var t=new s.SphereBufferGeometry(500,64,32);t.scale(-1,1,1);var i=new s.VideoTexture(this.node);i.minFilter=s.NearestFilter;var n=new s.MeshBasicMaterial({map:i}),e=new s.Mesh(t,n);this.FJ=new s.Scene,this.FJ.add(e),this.BJ=new s.WebGLRenderer,this.BJ.setPixelRatio(window.devicePixelRatio),this.PJ&&this.PJ.appendChild(this.BJ.domElement),this.zJ=new f.default(this.container),this.GJ=0,this.HJ=0,this.YJ=!0,this.qJ(),this.gV=!0,this.wV.publish(u.THREE_SIXTY_READY)},i.prototype.qJ=function(){var t=this;this.WJ=this.QJ.bind(this),this.ZJ=this.XJ.bind(this),this.$J=this.JJ.bind(this),this.KJ=this.tK.bind(this),this.iK=this.nK.bind(this),this.XQ=this.JE.bind(this),this.container&&(this.container.addEventListener("mousedown",this.WJ,!1),this.container.addEventListener("mousemove",this.ZJ,!1),this.container.addEventListener("mouseup",this.$J,!1),this.container.addEventListener("mouseover",this.KJ,!1),this.container.addEventListener("mouseout",this.iK,!1),this.container.addEventListener("resize",this.XQ,!1)),this.UW=this.qE.bind(this),this.eK=this.YE.bind(this),this.rK=this.QE.bind(this),this.node&&(this.node.addEventListener("pause",this.UW),this.node.addEventListener("playing",this.eK),this.node.addEventListener("seeked",this.rK)),this.zJ&&this.zJ.addClickListener(this.sK.bind(this)),this.oK={},this.oK[u.PLAYER_RESIZE]=this.wV.addEventListener(u.PLAYER_RESIZE,(function(i,n){window.setTimeout((function(){t.uK&&(i=window.screen.width,n=window.screen.height),t.hK(i,n)}),1)}),this),this.oK[u.FULLSCREEN_CHANGE]=this.wV.addEventListener(u.FULLSCREEN_CHANGE,(function(i){t.uK=!!i}),this),this.oK[u.PLAYER_DIMENSION_CHANGE]=this.wV.addEventListener(u.PLAYER_DIMENSION_CHANGE,(function(){var i,n,e;t.node&&t.node.parentNode&&((i=window.getComputedStyle(t.node.parentNode))&&(n=parseInt(i.getPropertyValue("width"),10),e=parseInt(i.getPropertyValue("height"),10)),n&&!isNaN(n)&&e&&!isNaN(e)&&t.hK(n,e))}),this)},i.prototype.sK=function(){this.GJ=0,this.HJ=0,this._E(),this.zJ&&this.zJ.update(this.GJ),this.wV.publish(u.THREE_SIXTY_PIE_INTERACT)},i.prototype.aK=function(){var t=this;this.oK&&Object.keys(this.oK).forEach((function(i){t.wV.removeEventListener(i,t.oK[i])})),this.WJ&&(this.container&&this.container.removeEventListener("mousedown",this.WJ,!1),this.WJ=null),this.ZJ&&(this.container&&this.container.removeEventListener("mousemove",this.ZJ,!1),this.ZJ=null),this.$J&&(this.container&&this.container.removeEventListener("mouseup",this.$J,!1),this.$J=null),this.KJ&&(this.container&&this.container.removeEventListener("mouseover",this.KJ,!1),this.KJ=null),this.XQ&&(this.container&&this.container.removeEventListener("resize",this.XQ,!1),this.XQ=null),this.KJ&&(this.container&&this.container.removeEventListener("mouseover",this.KJ,!1),this.KJ=null),this.UW&&(this.node&&this.node.removeEventListener("pause",this.UW),this.UW=null),this.eK&&(this.node&&this.node.removeEventListener("playing",this.eK),this.eK=null),this.rK&&(this.node&&this.node.removeEventListener("seeked",this.rK),this.rK=null),this.CJ&&(this.wV.removeEventListener(u.THREE_SIXTY_READY,this.CJ),this.CJ=null)},i.prototype.cK=function(){this.fK=!1,this.container&&(this.container.classList.remove("grabbing-360"),this.container.classList.add("over-360")),this.lK&&(this.lK=!1,this.YJ=!0)},i.prototype.hK=function(t,i){var n=t,e=i;i*v>t&&(e=t/v),this.VJ&&(this.VJ.setViewOffset(t,i,t-n,i-e,n,e),this.VJ.updateProjectionMatrix()),this.BJ&&this.BJ.setSize(t,i)},i.prototype.vK=function(){var t=this.vK.bind(this);if(this.YJ&&this.dK)return window.cancelAnimationFrame(this.dK),void(this.dK=null);this.dK=window.requestAnimationFrame(t),this._E()},i.prototype._E=function(){this.HJ=Math.max(-85,Math.min(85,this.HJ));var t=s.Math.degToRad(90+this.HJ),i=s.Math.degToRad(this.GJ);this.VJ&&(this.VJ.position.x=500*Math.sin(t)*Math.cos(i),this.VJ.position.y=500*Math.cos(t),this.VJ.position.z=500*Math.sin(t)*Math.sin(i),this.VJ.lookAt(this.VJ.target),this.VJ.position.copy(this.VJ.target).negate(),this.FJ&&this.BJ&&this.BJ.render(this.FJ,this.VJ))},i.prototype.LJ=function(){this.dK&&window.cancelAnimationFrame(this.dK),this.YJ=!0,this.aK(),this.zJ&&(this.zJ.destroy(),this.zJ=null),this.PJ&&(this.PJ.parentNode&&this.PJ.parentNode.removeChild(this.PJ),this.PJ=null),this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container),this.VJ=null,this.FJ=null,this.BJ=null},i.prototype.qE=function(){this.pK=!0,this.YJ=!0},i.prototype.YE=function(){this.pK=!1,this.YJ=!1,this.vK()},i.prototype.QE=function(){this._E()},i.prototype.tK=function(){this.container&&this.container.classList.add("over-360")},i.prototype.QJ=function(t){this.mK=!1,this.container&&(this.container.classList.remove("over-360"),this.container.classList.add("grabbing-360")),this.fK=!0,this.bK=t.clientX,this.gK=t.clientY,this.yK=this.GJ,this.wK=this.HJ},i.prototype.XJ=function(t){this.fK&&(this.pK&&!this.lK&&(this.lK=!0,this.YJ=!1,this.vK()),this.mK=!0,this.GJ=.1*(this.bK-t.clientX)+this.yK,this.HJ=.1*(t.clientY-this.gK)+this.wK,this.zJ&&this.zJ.update(this.GJ))},i.prototype.JJ=function(){this.fK&&(this.cK(),this.mK?this.wV.publish(u.THREE_SIXTY_INTERACT):this.wV.publish(u.TOGGLE_PLAY_PAUSE)),this.mK=!1},i.prototype.nK=function(){this.cK()},i.prototype.JE=function(){this.container&&this.hK(this.container.offsetWidth,this.container.offsetHeight)},i.prototype.DJ=function(){this.CJ&&(this.wV.removeEventListener(u.THREE_SIXTY_READY,this.CJ),this.CJ=null),!this._K&&this.BJ&&this.container&&(this.BJ.setSize(this.container.offsetWidth,this.container.offsetHeight),this._K=!0)},i.type=h.RendererType.HTML5_RAW_360,i}(l.default);i.default=d},268:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s,o,u=n(7403),h=n(9847),a=n(742);!function(t){t.WAITING="waiting",t.SEG_INFO_AVAILABLE="segInfoAvailable"}(s=i.RebufferingEvent||(i.RebufferingEvent={})),function(t){t[t.HAVE_NOTHING=0]="HAVE_NOTHING",t[t.HAVE_METADATA=1]="HAVE_METADATA",t[t.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",t[t.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",t[t.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA"}(o||(o={}));var c=function(t){function i(){var i=t.call(this,"Html5RawRebufferingManager")||this;return i.CK=null,i.PK=0,i.aS=null,i.xK=0,i.reset(),i}return r(i,t),i.prototype.destroy=function(){this.UK()},i.prototype.init=function(t,i){void 0===i&&(i=!1),t&&(this._node=t,i&&this.onRecoveryStart(),this.reset(),this.VK())},i.prototype.onSeeking=function(){this.FK()},i.prototype.onRecoveryStart=function(){this.BK(),this.RK()},i.prototype.onEnded=function(){this.UK()},i.prototype.reset=function(){this.yU=!0,this.playbackStuck=!1,this.WO=NaN,this.zK=0,this.eS=null,this.PK=0,this.xK=0,this.aS=null},i.prototype.publishWaitingEvent=function(t){if((!this.playbackStuck||!t)&&(this.playbackStuck||t)){var i={type:"waiting",value:t,ignoreBuffering:this.yU};this.publish(s.WAITING,i),this.playbackStuck=t,t?(this.WO=this._node&&this._node.currentTime||0,this.yU||(this.aS=Date.now())):(this.yU=!1,this.WO=NaN,this.BK())}},i.prototype.VK=function(){this.UK(),this.CK=new a.Timer(250,this.GK,this),this.CK.start()},i.prototype.BK=function(){this.aS&&(this.PK+=Date.now()-this.aS,this.aS=null)},i.prototype.GK=function(){this.FK(),this.HK()>5e3&&(this.RK(),this.xK=0)},i.prototype.FK=function(t){if(void 0===t&&(t=!1),this&&this._node){var i=this._A();if(t||!(i<150)){var n=this._node.currentTime,e=!1;if(h.userAgent.safari>=6){var r=0;this._node.buffered&&this._node.buffered.length>0&&(r=this._node.buffered.end(this._node.buffered.length-1)),e=this._node.readyState!==o.HAVE_ENOUGH_DATA||r>0&&r+1<this._node.duration&&r<n}n!==this.zK&&!e||this._node.paused?!isNaN(this.WO)&&n>this.WO&&this.publishWaitingEvent(!1):this.playbackStuck||(this.yU=n<=.02,this.publishWaitingEvent(!0)),this.zK=n,this.eS=Date.now()}}else this.UK()},i.prototype._A=function(){var t=Date.now();return this.eS=this.eS||t,t-this.eS},i.prototype.HK=function(){var t=Date.now();return this.xK=this.xK||t,t-this.xK},i.prototype.RK=function(){this.publish(s.SEG_INFO_AVAILABLE,{val:[{buf_dur:this.PK}]}),this.PK=0},i.prototype.UK=function(){this.CK&&(this.CK.destroy(),this.CK=null)},i}(u.default);i.default=c},8696:function(t,i,n){"use strict";var e,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(i,"__esModule",{value:!0});var s=n(9847),o=n(4593),u=n(6389),h=n(1962),a=n(1962),c=n(4685),f=n(5244),l=n(9452),v=n(1204),d=n(2878),p=n(2394),m=n(4986),b=n(6342),g=n(5132),y=n(268),w=[1,5],_=function(t){function i(n,e){var r=t.call(this,n,e)||this;return r.type=i.type,r.t$=e.capabilities[c.RendererType.HTML5_RAW],r.EK(),(s.userAgent.desktop||s.userAgent.mobile&&v.default.hasNativeAutoplaySupport)&&(r.vJ=!0),r.YK=new y.default,r.YK.on(y.RebufferingEvent.WAITING,r.kU,r),r.YK.on(y.RebufferingEvent.SEG_INFO_AVAILABLE,r.AF,r),r}return r(i,t),i.canUse=function(){return!s.userAgent.tv},i.prototype.destroy=function(){this.qK&&this.qK.destroy(),t.prototype.destroy.call(this)},i.prototype.play=function(t){if(void 0===t&&(t=0),this.ended=!1,this.node){if(this.iE)return this.publish(c.RendererEvent.ERROR,this.iE),void(this.iE=null);if(this.QW){if(!v.default.autoplaySupported){if(s.userAgent.ios){var i=this.node.src;this.node.src="",this.node.load(),this.node.src=i}s.userAgent.mobile&&this.node.load()}}else{var n=this.vQ(),e=isNaN(this.node.duration)?n&&n.duration:this.node.duration;e||(e=0),m.isNumber(t)&&t>0&&t<e&&(this.node.currentTime=t)}this.QW=!1,this.wV.publish(a.PROFILE_START,h.METRICS.STREAM_PLAY_TO_RENDER),this.SJ(),this.WK||(this.YK.publishWaitingEvent(!0),this.WK=!0)}},i.prototype.preload=function(t){},i.prototype.setPlayableItem=function(t,i,n){void 0===i&&(i=0),void 0===n&&(n=!1),this.EK(),this.qL=b.default.getPlaybackMode(t);var e=t.streams||[],r=!1,o=null;this.EM=e,this.QK=e.slice(0),this.YK.init(this.node,n),(s.userAgent.safari>=6||s.userAgent.tv)&&e.forEach((function(t){t.format&&t.format.indexOf("m3u8")>-1&&(t.isPrimary||t.is_primary||!o)&&(o=t,r=!0)}));var u=[];if(r){if(o)return this.ZK(o,i),this.aJ=t,!0}else{e.forEach((function(t){u.push(parseInt(t.videoMetadata.bitrate+"",10))})),u=u.sort(),this.XK=new l.default(this.node,u);var h=this.XK.getTargetBitrate();if(o=this.$K(h))return this.ZK(o,i),this.JK(o),this._m.mp4Abr&&u.length>1&&(this.KK=this.on(c.RendererEvent.TIMEUPDATE,this.DV,this),this.t0=0),this.aJ=t,!0}return!1},i.prototype.setQuality=function(t){this.i0(t.stream.url),this.JK(t.stream)},i.prototype.retryStreams=function(t){var i=this,n=this.zO;if(n&&this.n0<=2)window.setTimeout((function(){i.e0(n,t)}),1e3*w[this.n0-1]);else{this.n0=0;var e=this.QK.indexOf(n);if(this.QK.splice(e,1),0===this.QK.length)return n;var r=p.default.findStreamByProperty(this.QK,p.default.BITRATE,this.XK.getTargetBitrate(),this.t$);this.e0(r,t)}return null},i.prototype.stopMedia=function(){this.node.removeAttribute("src"),this.node.load()},i.prototype.bindCustomEvents=function(){},i.prototype.unbindCustomEvents=function(){},i.prototype.unbindPlaybackEvents=function(){},i.prototype.suspendStreaming=function(){this.stopMedia()},i.prototype.resumeStreaming=function(){this.wV.publish(a.LIVE_RELOAD_MEDIA)},i.prototype.getSyncOffset=function(){return NaN},i.prototype.startSync=function(){},i.prototype.stopSync=function(){},i.prototype.getSyncState=function(){return-1},i.prototype.setAudioLanguage=function(t){if(this.node&&this.node.audioTracks&&this.node.audioTracks.length){for(var i,n=-1,e=0;e<this.node.audioTracks.length;e++)(i=this.node.audioTracks[e]).enabled=!1,i.label===t&&-1===n&&(n=e);n>-1&&(this.node.audioTracks[n].enabled=!0)}},i.prototype.rG=function(t,i){var n=this;if(this.node)switch(t===c.NativeVideoEvent.PLAYING&&this.wV.publish(a.PROFILE_END,[h.METRICS.STREAM_PLAY_TO_RENDER,h.METRICS.STREAM_REQUEST_TO_RENDER]),t){case c.NativeVideoEvent.TIMEUPDATE:this.YK.playbackStuck||(this.r0||(this.r0=!0,this.publish(c.RendererEvent.PLAYING)),this.seeking&&(this.publish(c.RendererEvent.SEEKED,{currentTime:this.node.currentTime,duration:this.node.duration,buffered:this.node.buffered}),this.seeking=!1));var e=this.node.currentTime;if(s.userAgent.android){if(!this.s0&&s.userAgent.chrome<33&&e>1&&e<2)(d=this.vQ())&&d.isLive()?(this.node.pause(),this.SJ()):this.seek(0),this.s0=!0;!this.o0&&s.userAgent.androidVersion<=4.4&&this.node.addEventListener("webkitfullscreenchange",(function(){if(n.node){var t=n.node.currentTime;n.o0=!0,n.node.load();var i=n.on(c.RendererEvent.LOADEDMETADATA,(function(){if(n.node){n.SJ();var e=n.vQ();e&&e.isLive()&&(n.node.currentTime=parseInt(t+"",10)),n.removeEventListener(c.RendererEvent.LOADEDMETADATA,i)}}),n)}}),!1)}this.u0||this.YK.playbackStuck||this.publish(i,{currentTime:this.node.currentTime,duration:this.node.duration,buffered:this.node.buffered}),this.h0=this.node.currentTime;break;case c.NativeVideoEvent.SEEKING:this.seeking=!0,this.YK.onSeeking(),this.u0||this.YK.playbackStuck||this.publish(i,{currentTime:this.node.currentTime,duration:this.node.duration,buffered:this.node.buffered}),this.h0=this.node.currentTime;break;case c.NativeVideoEvent.SEEKED:this.u0?this.a0():this.YK.playbackStuck||(this.seeking=!1,this.publish(i,{currentTime:this.node.currentTime,duration:this.node.duration,buffered:this.node.buffered})),this.h0=this.node.currentTime;break;case c.NativeVideoEvent.ERROR:var r=this.node.error,o=this.TJ(r),f=this.QK.length<=1&&this.n0>=2,l=u.E_WARNING;f&&(l=u.E_PLAYER);var v=b.default.createErr(u.ErrorGroup.Streaming,this.QY,l,o,null,this.node.src);if(this.qL!==c.PlaybackMode.VIDEO){v.errorType=u.E_PLAYER,this.publish(c.RendererEvent.ERROR,v);break}if(parseInt(v.subcategory,10)>=303&&parseInt(v.subcategory,10)<=308){this.n0++,f||this.wV.publish(a.WARNING,v);var d,p=null;return(p=(d=this.vQ())&&!d.isLive()?this.retryStreams(this.h0):this.retryStreams(0))?void b.default.getUrlStatus(p.url,(function(t){var i,e=u.PLAYER_CODES;401===t?i=e.E_NATIVE_UNAUTHORIZED_URL:404===t&&(i=e.E_NATIVE_URL_NOT_FOUND),v.subcategory=i,v.errorType=u.E_PLAYER,n.publish(c.RendererEvent.ERROR,v)})):void 0}v.errorType=u.E_PLAYER,this.publish(c.RendererEvent.ERROR,v);break;case c.NativeVideoEvent.ENDED:this.ended=!0,this.s0=!1,this.YK.onEnded(),this.YK.playbackStuck&&this.YK.publishWaitingEvent(!1),this.publish(i);break;case c.NativeVideoEvent.LOADEDDATA:if(this.u0){this.c0();break}this.wV.publish(a.PROFILE_END,h.METRICS.LOAD_TO_LOADED_DATA),this.publish(i),this.node.audioTracks&&this.node.audioTracks.length>1&&this.f0();break;case c.NativeVideoEvent.PAUSE:if(this.ended||this.node.ended)break;if(this.seeking)break;if(!this.node.paused)break;this.YK.playbackStuck&&this.YK.publishWaitingEvent(!1),this.publish(i);break;case c.NativeVideoEvent.PLAY:case c.NativeVideoEvent.PLAYING:if(this.u0){t===c.NativeVideoEvent.PLAYING&&this.l0();break}this.YK.playbackStuck||(this.r0=t===c.NativeVideoEvent.PLAYING,this.publish(i));break;case c.NativeVideoEvent.WAITING:case c.NativeVideoEvent.VOLUMECHANGE:break;default:this.publish(i)}},i.prototype.v0=function(t,i){return t.indexOf(i)>-1},i.prototype.d0=function(t,i){return this.v0(t,"mp4")&&this.v0(i,"m3u8")||this.v0(t,"m3u8")&&this.v0(i,"mp4")},i.prototype.EK=function(){this.u0=!1,this.p0="",this.zO=null,this.n0=0,this.QK=[],this.m0=null,this.WK=!1,this.h0=0,this.r0=!1,this.aJ=null,this.qL=c.PlaybackMode.VIDEO,this.s0=!1,this.o0=!1,this.t0=0,this.KK&&(this.removeEventListener(c.RendererEvent.TIMEUPDATE,this.KK),this.KK=null),this.seeking=!1,this.ended=!1},i.prototype.b0=function(){var t=null;if(this.EM)for(var i=0,n=this.EM;i<n.length;i++){var e=n[i];if(e.isPrimary){t=e;break}}return t},i.prototype.$K=function(t){var i=this.b0();return i||(i=p.default.findStreamByProperty(this.EM,"bitrate",t,this.t$)),!i&&this.EM&&this.EM.length>0&&(i=this.EM[0]),i},i.prototype.DV=function(t){if(t-this.t0>10){this.t0=t;var i=this.$K(this.XK.getRecommendedBitrate());i&&(this.i0(i.url),this.JK(i))}},i.prototype.JK=function(t){this.XK&&(this.XK.currentBitrate=t.videoMetadata.bitrate),this.wV.publish(a.PLAYBACK_INFO,{currentStreamBitrate:t.videoMetadata.bitrate,qualityLevels:this.EM.length})},i.prototype.ZK=function(t,i,n){var e=this;if(this.node){var r=this.vQ();if(r.license&&r.license.isDrm&&!v.default.drmSupported){var l=void 0,p=u.INFO_CODES;return s.userAgent.ios&&s.userAgent.iosVersion<11.2||s.userAgent.android&&!s.userAgent.chrome?l=p.E_DRM_UNSUPPORTED_OS:s.userAgent.ios&&!s.userAgent.safari&&(l=p.E_DRM_UNSUPPORTED_BROWSER),void this.wV.publish(a.INFO,b.default.createErr(u.ErrorGroup.Streaming,this.QY,u.E_INFO,l,null,this.node.src))}if(s.userAgent.safari&&(this.qK?r.isRecovering()&&this.qK.init():this.qK=new o.default(this.node,t.fairplayCertificatePath,this.g0.bind(this),this.reportError.bind(this))),this.ended=!1,this.s0=!1,this.node.src!==t.url||n){if(s.userAgent.iphone&&Object.prototype.hasOwnProperty.call(this.node,"webkitDisplayingFullscreen")&&!this.node.webkitDisplayingFullscreen&&t.format&&this.d0(t.format,this.p0)){var m=this.node.parentNode;this.destroy(),m&&m.appendChild(this.create())}if(s.userAgent.android&&t.live&&(s.userAgent.chrome&&s.userAgent.chrome<30||!d.default.isAndroidVersionAbove4())){var g=b.default.createErr(u.ErrorGroup.Restriction,this.QY,u.E_INFO,u.INFO_CODES.E_PLAYER_ANDROID_CHROME_REQUIRED);return void this.wV.publish(a.INFO,g)}if(this.gJ(),this.wV.publish(a.PROFILE_START,h.METRICS.STREAM_REQUEST_TO_RENDER),this.node.src=t.url,i)var y=this.on(c.RendererEvent.LOADEDMETADATA,(function(){e.node&&(e.node.currentTime=i),e.removeEventListener(c.RendererEvent.LOADEDMETADATA,y)}),this);this.QW=!0,this.p0=t.format||"",this.zO=t,this.qL===c.PlaybackMode.VIDEO&&this.wV.publish(a.PROFILE_START,h.METRICS.LOAD_TO_LOADED_DATA),s.userAgent.mobile?v.default.hasNativeAutoplaySupport&&this.node.load():(this.node.load(),this._m.getState()===f.States.VIDEO&&this.play())}}},i.prototype.y0=function(){if(!this.node)return{};var t=this.node.videoWidth/this.node.videoHeight,i=this.node.clientWidth,n=this.node.clientHeight,e=0,r=0;return i/n>t?(r=parseInt(n.toFixed(2),10),e=parseInt((t*n).toFixed(2),10)):(e=parseInt(i.toFixed(2),10),r=parseInt((i/t).toFixed(2),10)),{width:e,height:r,left:Math.max((i-e)/2,0),top:Math.max((n-r)/2,0)}},i.prototype.c0=function(){this.seek(this._Q)},i.prototype.g0=function(){this._m.isDrmAvailable=!0,this._m.drmSystem="fairplay"},i.prototype.a0=function(){if(this.node){this.SJ();var t=this.w0.parentNode;t&&t.removeChild(this.w0)}},i.prototype.l0=function(){this.publish(c.CustomRendererEvent.SRC_SWITCHED),this.u0=!1},i.prototype.i0=function(t,i){if(this.node){var n=this.node.clientWidth,e=this.node.clientHeight;if(this.node.src===t)return this.publish(c.CustomRendererEvent.SRC_SWITCHING),void this.publish(c.CustomRendererEvent.SRC_SWITCHED);this.u0=!0,this.node.pause(),this._Q=this.node.currentTime;var r=document.createElement("canvas");this.w0=r,r.className="vp-switching-canvas",r.width=n,r.height=e;var s=this.y0();r.style.cssText="width:"+s.width+"px;height:"+s.height+"px;left:"+s.left+"px;top:"+s.top+"px";var o=this.node.parentNode;o&&o.appendChild(r);var u=r.getContext("2d");u&&u.drawImage(this.node,0,0,n,e),this.publish(c.CustomRendererEvent.SRC_SWITCHING),this.node.src=t}},i.prototype.e0=function(t,i){this.ZK(t,i,!0),this.JK(t)},i.prototype.f0=function(){if(this.node&&this.node.audioTracks&&!(this.node.audioTracks.length<2)){var t=Array.prototype.slice.call(this.node.audioTracks).map((function(t){return{name:t.label,language:t.language,selected:t.enabled}})),i=this.vQ();i&&(i.setMultiLanguages(t),this.wV.publish(a.MULTI_LANGUAGES_AVAILABLE))}},i.prototype.kU=function(t){t.value&&(this.r0=!1),t.ignoreBuffering=t.ignoreBuffering||this.seeking,this.publish(c.RendererEvent.WAITING,t)},i.prototype.AF=function(t){this.wV.publish(a.SEG_INFO_AVAILABLE,t)},i.type=c.RendererType.HTML5_RAW,i}(g.default);i.default=_},5727:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e,r=n(9847),s=n(2878),o=n(4685),u=document.createElement("video"),h=function(){var t=!1;try{u.canPlayType&&!(t=s.default.canPlayType('application/vnd.apple.mpegURL; codecs="avc1.42E01E, mp4a.40.2"',u))&&r.userAgent.tv&&(t=s.default.canPlayType("application/vnd.apple.mpegurl",u))}catch(i){t=!1}return r.userAgent.tv&&(window.noHLS&&(t=!1),window.hls&&(t=!0)),t}(),a=function(){var t=!1;try{t=s.default.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"',u)}catch(i){t=!1}return t}(),c=function(){var t=!1;try{t=s.default.canPlayType('video/webm; codecs="vp8, vorbis"',u)}catch(i){t=!1}return r.userAgent.tv&&(t=!1),t}(),f=!r.userAgent.safari,l=(e=[],r.userAgent.android&&e.push("mp4b"),(h||r.userAgent.android&&s.default.isAndroidVersionAbove4())&&e.push("m3u8"),(f||r.userAgent.android&&s.default.isAndroidVersionAbove4())&&e.push("mpd"),a&&e.push("mp4"),c&&e.push("webm"),e),v=function(){var t=l.slice(),i=t.indexOf("mp4b");return i>-1&&t.splice(i+1,0,"mp4"),t.push(""),t}(),d=function(){function t(){}return t.get=function(t){var i=null;switch(t){case o.RendererType.HTML5_HLS:case o.RendererType.HTML5_HLS_360:(i={acceptedProtocols:["http"],preferredFormats:[],acceptedFormats:[],is360Renderer:t===o.RendererType.HTML5_HLS_360,canDecryptAES:!0}).preferredFormats=["m3u8"],i.acceptedFormats=["m3u8","m3u8_playlist","m3u8:fmp4"];break;case o.RendererType.HTML5_RAW:case o.RendererType.HTML5_RAW_360:(i={acceptedProtocols:["http"],preferredFormats:l,acceptedFormats:v,is360Renderer:t===o.RendererType.HTML5_RAW_360,canDecryptAES:!0}).preferredFormats=i.preferredFormats.filter((function(t){return"mpd"!==t})),i.acceptedFormats=i.acceptedFormats.filter((function(t){return"mpd"!==t}));break;case o.RendererType.HTML5_TV:case o.RendererType.HTML5_TV_TIZEN:case o.RendererType.HTML5_TV_ORSAY:i={acceptedProtocol