;/*FB_PKG_DELIM*/ __d("oz-player/shims/ozReportUnexpectedError",["oz-player/shims/www/ozReportUnexpectedErrorWWW"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("oz-player/shims/www/ozReportUnexpectedErrorWWW")}),98); __d("oz-player/loggings/OzLoggingUtils",["oz-player/shims/ozReportUnexpectedError"],(function(a,b,c,d,e,f,g){"use strict";function a(a,b,c){a=a.getOperationLogger(b).start();try{return c(a)}catch(b){a.setError(b);throw b}finally{a.log()}}function b(a,b,d,e,f){e===void 0&&(e=function(){});f===void 0&&(f=function(){});var g=b.getOperationLogger(d).start();e(g);a.then(function(a){f(g),g.log()},function(a){f(g),g.setError(a),g.log()})["catch"](function(a){c("oz-player/shims/ozReportUnexpectedError")(a,d+" logger")})}g.executeOperationAndLog=a;g.monitorPromiseAndLogOperation=b}),98); __d("oz-player/loggings/OzOperationLoggerBase",[],(function(a,b,c,d,e,f){"use strict";a=function(){function a(a){this.$52=new Map(),this.$1=a}var b=a.prototype;b.start=function(){var a=Date.now();this.setClientTimeBegin(a);this.setClientTimeEnd(null);this.setClientTimeDuration(null);return this};b.log=function(){var a=Date.now(),b=this.getClientTimeBegin(),c=this.getClientTimeEnd();(b==null||b===0)&&(b=a,this.setClientTimeBegin(b));(c==null||c===0)&&(c=a,this.setClientTimeEnd(c));this.setClientTimeDuration(c-b)};b.setError=function(a){this.$2=a;return this};b.setPerSessionSampleRate=function(a){this.$3=a;return this};b.setAppendTarget=function(a){this.$47=a;return this};b.setOneObserved=function(a){this.$44=a;return this};b.setOneReqWave=function(a){this.$45=a;return this};b.setOneResWave=function(a){this.$46=a;return this};b.setIsP2pPlayback=function(a){this.$43=a;return this};b.setResult=function(a){this.$4=a;return this};b.setType=function(a){this.$5=a;return this};b.setClientTimeBegin=function(a){this.$6=a;return this};b.setClientTimeDuration=function(a){this.$7=a;return this};b.setClientTimeEnd=function(a){this.$8=a;return this};b.setSegmentCount=function(a){this.$15=a;return this};b.setTimeToFirstByte=function(a){this.$9=a;return this};b.setTimeToLastByte=function(a){this.$10=a;return this};b.setTimeToRequestStart=function(a){this.$11=a;return this};b.setTimeToRequestSent=function(a){this.$12=a;return this};b.setReason=function(a){this.$13=a;return this};b.setResource=function(a){this.$14=a;return this};b.setSegmentStartTime=function(a){this.$16=a;return this};b.setSegmentEndTime=function(a){this.$17=a;return this};b.setLength=function(a){this.$18=a;return this};b.setLiveheadPosition=function(a){this.$19=a;return this};b.setLiveheadSeqNumHeader=function(a){this.$20=a;return this};b.setLiveheadSeqNumMpd=function(a){this.$21=a;return this};b.setManifestType=function(a){this.$22=a;return this};b.setMediaSourceNewDuration=function(a){this.$23=a;return this};b.setMediaSourcePreviousDuration=function(a){this.$24=a;return this};b.setPriorityFloat=function(a){this.$25=a;return this};b.setAppendedBufferMs=function(a){this.$26=a;return this};b.setInitiator=function(a){this.$27=a;return this};b.setPreloadTime=function(a){this.$28=a;return this};b.setConcluder=function(a){this.$29=a;return this};b.setPreviousRepresentationID=function(a){this.$30=a;return this};b.setRepresentationID=function(a){this.$31=a;return this};b.setStreamSwitchReason=function(a){this.$32=a;return this};b.setState=function(a){this.$33=a;return this};b.setContentLengthHeader=function(a){this.$34=a;return this};b.setOriginHitHeader=function(a){this.$36=a;return this};b.setEdgeHitHeader=function(a){this.$37=a;return this};b.setFNAHitHeader=function(a){this.$38=a;return this};b.setCode=function(a){this.$35=a;return this};b.setResponseTimeMsHeader=function(a){this.$39=a;return this};b.setIsTemplatedManifest=function(a){this.$40=a;return this};b.setIsLatencyCachupEnabled=function(a){this.$41=a;return this};b.setPlayerFormat=function(a){this.$42=a;return this};b.setIsRingBufferSample=function(a){this.$48=a;return this};b.setIsOnline=function(a){this.$49=a;return this};b.setProxyStatusHeader=function(a){this.$50=a;return this};b.setPlaybackFbmsParam=function(a){return this};b.setPreferredEdgeLatency=function(a){this.$51=a;return this};b.setUserInfo=function(a){return this};b.setDynamicStatusHeader=function(a){return this};b.setIsMixedCodecManifest=function(a){this.$53=a;return this};b.getPerSessionSampleRate=function(){return this.$3};b.setMediaSourceSourceBuffer=function(a,b){this.$52.set(a,b);return this};b.unsetMediaSourceSourceBuffers=function(){this.$52.clear();return this};b.getError=function(){return this.$2};b.getResult=function(){return this.$4};b.getType=function(){return this.$5};b.getClientTimeBegin=function(){return this.$6};b.getClientTimeEnd=function(){return this.$7!=null?this.$6!=null?this.$6+this.$7:null:this.$8};b.getTimeToRequestStart=function(){return this.$11};b.getTimeToRequestSent=function(){return this.$12};b.getReason=function(){return this.$13};b.getResource=function(){return this.$14};b.getOperationName=function(){return this.$1};b.getSegmentStartTime=function(){return this.$16};b.getSegmentEndTime=function(){return this.$17};b.getLength=function(){return this.$18};b.getLiveheadPosition=function(){return this.$19};b.getManifestType=function(){return this.$22};b.getIsMixedCodecManifest=function(){return this.$53};b.getPriorityFloat=function(){return this.$25};b.getAppendedBufferMs=function(){return this.$26};b.getInitiator=function(){return this.$27};b.getPreloadTime=function(){return this.$28};b.getConcluder=function(){return this.$29};b.getContentLengthHeader=function(){return this.$34};b.getOriginHitHeader=function(){return this.$36};b.getEdgeHitHeader=function(){return this.$37};b.getFNAHitHeader=function(){return this.$38};b.getCode=function(){return this.$35};b.getResponseTimeMsHeader=function(){return this.$39};b.getIsTemplatedManifest=function(){return this.$40};b.getOneObserved=function(){return this.$44};b.getOneReqWave=function(){return this.$45};b.getOneResWave=function(){return this.$46};b.getAppendTarget=function(){return this.$47};b.getIsRingBufferSample=function(){return this.$48};b.getIsOnline=function(){return this.$49};b.getProxyStatusHeader=function(){return this.$50};b.getMediaSourceSourceBuffers=function(){return this.$52};return a}();f["default"]=a}),66); __d("oz-player/shims/www/OzMaybeNativePromiseWWW",["cr:3014"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=b("cr:3014")}),98); __d("oz-player/shims/OzMaybeNativePromise",["oz-player/shims/www/OzMaybeNativePromiseWWW"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("oz-player/shims/www/OzMaybeNativePromiseWWW")}),98); __d("oz-player/utils/OzErrorEmitter",["oz-player/shims/OzEventEmitter","oz-player/shims/ozvariant"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){function b(b){var d;b===void 0&&(b=!1);d=a.call(this)||this;d.$OzErrorEmitter$p_1=!1;d.$OzErrorEmitter$p_2=!1;d.$OzErrorEmitter$p_3=[];d.emitError=function(a){!d.$OzErrorEmitter$p_1?d.$OzErrorEmitter$p_2?d.$OzErrorEmitter$p_3.push(a):d.$OzErrorEmitter$p_1||c("oz-player/shims/ozvariant")(0,14038):d.emit("error",a)};d.$OzErrorEmitter$p_2=b;return d}babelHelpers.inheritsLoose(b,a);var d=b.prototype;d.onError=function(a){this.$OzErrorEmitter$p_1=!0;a=this.addListener("error",a);this.$OzErrorEmitter$p_2&&this.$OzErrorEmitter$p_3.length>0&&this.$OzErrorEmitter$p_3.forEach(this.emitError);return a};return b}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player/drm/OzDrmManager",["oz-player/drm/OzDrmUtils","oz-player/loggings/OzLoggingUtils","oz-player/loggings/OzOperationLoggerBase","oz-player/shims/OzDOMEventListener","oz-player/shims/OzMaybeNativePromise","oz-player/shims/OzSubscriptionsHandler","oz-player/utils/OzErrorEmitter","oz-player/utils/OzErrorUtils"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b,e){var f=this;e===void 0&&(e=null);this.$1=null;this.$2=new Map();this.$4=!1;this.$6=new(c("oz-player/shims/OzSubscriptionsHandler"))();this.$7=new(c("oz-player/utils/OzErrorEmitter"))();this.$8=!1;this.$9=null;this.$10=0;this.$11=[];this.$12=[];this.$22=function(a,b){a instanceof c("oz-player/loggings/OzOperationLoggerBase")&&a.getError()&&a.setResult("failed"),b!=null&&a.setReason(b)};this.$19=function(a){if(f.$4)return c("oz-player/shims/OzMaybeNativePromise").reject(d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_DRM_MANAGER",description:"OzDrmManager destroyed before call to mediaKeySystemAccess.createMediaKeys()."}));var b=f.$5.mediaKeys!=null?c("oz-player/shims/OzMaybeNativePromise").resolve(f.$5.mediaKeys):a.createMediaKeys();b=b.then(function(b){return{mediaKeySystemAccess:a,mediaKeys:b}});d("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(b,f.$3,"drm_create_media_keys",function(){},f.$22);return b};this.$20=function(a){if(f.$4)return c("oz-player/shims/OzMaybeNativePromise").reject(d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_DRM_MANAGER",description:"OzDrmManager destroyed before call to setMediaKeys()"}));var b=a.mediaKeySystemAccess,e=a.mediaKeys;if(!e)throw d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_DRM_MANAGER",description:"No mediaKeys for mediaKeySystemAccess"});a=f.$5.setMediaKeys(e).then(function(){if(f.$4)return c("oz-player/shims/OzMaybeNativePromise").reject(d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_DRM_MANAGER",description:"OzDrmManager destroyed after setMediaKeys() called."}));var a=Array.from(f.$2.values()).find(function(a){return a.getKeySystem()===b.keySystem});if(!a)throw d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_DRM_MANAGER",description:"Can't find OzDrmProvider for keySystem "+b.keySystem});var g=a.getServerCertificate();return g?e.setServerCertificate(g).then(function(){return{mediaKeys:e,provider:a}}):{mediaKeys:e,provider:a}});d("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(a,f.$3,"drm_set_media_keys",function(){},f.$22);return a};this.$21=function(a){var b=a.mediaKeys,e=a.provider;a=e.getInitDatas();if(a.length===0){f.$6.addSubscriptions(c("oz-player/shims/OzDOMEventListener").listenDOMEvent(f.$5,"encrypted",function(a){f.$23(b,e,a)["catch"](function(a){f.$14(d("oz-player/utils/OzErrorUtils").convertPromiseRejectionReasonToOzError(a,{type:"OZ_DRM_MANAGER",description:"DRM encrypted rejection"}))})}));return c("oz-player/shims/OzMaybeNativePromise").resolve([])}a=a.map(function(a){return f.$23(b,e,{initData:a.data,initDataType:a.type})});a=c("oz-player/shims/OzMaybeNativePromise").all(a);d("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(a,f.$3,"drm_request_license",function(){},f.$22);return a};this.$5=b;this.$1=e;this.$3=a.cloneContext().setType("drm_manager")}var b=a.prototype;b.hasContentProtections=function(){return this.$9};b.onError=function(a){return this.$7.onError(a)};b.$13=function(a){this.$7.emitError(a)};b.$14=function(a){var b;b=(b=(b=this.$1)==null?void 0:b.maxStartEMEAttempts)!=null?b:-1;this.$10=0?parseFloat((a[c].endTime-b).toFixed(3)):0;a=c>=0?a.length-1-c:-1;return{bufferAheadSec:b,bufferedOffset:a}}function i(a,b,c){var e=a.map(function(a){return{rangeStart:a.startTime,rangeEnd:a.endTime}});c=d("oz-player/utils/OzNumericalRangeUtil").findCurrentRangeIndex(c,b,e);e=parseFloat(e.reduce(function(a,c){var e=c.rangeEnd;return e==null?a:a+(d("oz-player/utils/OzNumericalRangeUtil").isWithin(b,c)?e-b:d("oz-player/utils/OzNumericalRangeUtil").isLargerThan(c.rangeStart,b)?e-c.rangeStart:0)},0).toFixed(3));a=c>=0?a.length-1-c:-1;return{bufferAheadSec:e,bufferedOffset:a}}g.getTotalBufferedTime=a;g.getTotalInBufferedRanges=b;g.getStartBufferedTime=c;g.getEndBufferedTime=e;g.convertToBufferedTimeRangeArray=f;g.getBufferAheadInBufferedRanges=h;g.getTotalBufferAheadOfPosition=i}),98); __d("oz-player/media_source/SourceBufferManagerUtils",["oz-player/utils/OzSourceBufferUtil"],(function(a,b,c,d,e,f,g){"use strict";function a(a,b,c){var e=d("oz-player/utils/OzSourceBufferUtil").getEndBufferedTime(b);return function(){var a=d("oz-player/utils/OzSourceBufferUtil").getEndBufferedTime(b);return{startTime:e,endTime:a}}}g.startMeasuringAppendedBuffer=a}),98); __d("oz-player/shims/www/OzDeferredWWW",["Deferred"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("Deferred")}),98); __d("oz-player/shims/OzDeferred",["oz-player/shims/www/OzDeferredWWW"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("oz-player/shims/www/OzDeferredWWW")}),98); __d("oz-player/utils/OzFakeEventTarget",[],(function(a,b,c,d,e,f){"use strict";a=function(){function a(){this.$1={}}var b=a.prototype;b.dispatchEvent=function(a){if(this.$1[a]==null)return;this.$1[a].forEach(function(a){return a()})};b.addEventListener=function(a,b){var c=this;this.$1[a]===void 0&&(this.$1[a]=new Set());this.$1[a].add(b);return{remove:function(){c.removeEventListener(a,b)}}};b.removeEventListener=function(a,b){if(!this.$1[a])return;this.$1[a]["delete"](b)};b.destroy=function(){this.$1={}};return a}();f["default"]=a}),66); __d("oz-player/states/OzObservedSourceBufferState",["oz-player/shims/OzSubscriptionsHandler","oz-player/utils/OzFakeEventTarget"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){function b(b,d){var e;e=a.call(this)||this;e.$OzObservedSourceBufferState$p_2=new(c("oz-player/shims/OzSubscriptionsHandler"))();e.$OzObservedSourceBufferState$p_3=[];e.$OzObservedSourceBufferState$p_6=function(){var a;try{a=e.$OzObservedSourceBufferState$p_1.getBuffered()}catch(a){if(a.name==="InvalidStateError"){e.$OzObservedSourceBufferState$p_3=[];return}else throw a}var b=[];for(var c=0;c0&&b>a&&this.$3.remove(a,b)};e.$21=function(a,b){a=Math.max(a,0);if(b>0&&b>a){var d=this.$22();this.$20(a,b);return d}return c("oz-player/shims/OzMaybeNativePromise").resolve()};e.clearRangeWithWait=function(a){var c=this;this.cancelOperationAndCleanQueue();return a.reduce(function(a,b){var d=b.fromTime,e=b.toTime;return a.then(function(){return c.$21(d,e)})},(h||(h=b("Promise"))).resolve())};e.$22=function(a){var b=this.$4=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise"));b=b.getPromise();a&&d("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(b,a,"wait_for_source_buffer");return b};e.$23=function(a,b,e,f){var g=this,h=function(){var h=g.$4=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise")),i=!1,j=!0;try{j=!!g.$3.getBuffered()}catch(a){j=!1}try{i=g.$3.getIsUpdating();if(j)g.$3.appendBuffer(a,b);else{h.resolve();return h.getPromise()}}catch(a){j=a;var k=c("oz-player/utils/OzCustomErrorCode").APPEND_BUFFER_UNKNOWN_ERROR,l=j.name,m=j.message;l==="QuotaExceededError"?k=c("oz-player/utils/OzCustomErrorCode").APPEND_BUFFER_QUOTA_EXCEEDED_ERROR:g.$10.hasError()?k=c("oz-player/utils/OzCustomErrorCode").APPEND_BUFFER_MEDIA_ERROR_ATTRIBUTE_NOT_NULL:i?k=c("oz-player/utils/OzCustomErrorCode").APPEND_BUFFER_SOURCE_BUFFER_UPDATING_ATTRIBUTE_IS_TRUE:l==="InvalidStateError"&&typeof m==="string"&&/SourceBuffer has been removed/.test(m)?k=c("oz-player/utils/OzCustomErrorCode").APPEND_BUFFER_INVALID_STATE_ERROR_SOURCE_BUFFER_HAS_BEEN_REMOVED:l==="InvalidStateError"&&(k=c("oz-player/utils/OzCustomErrorCode").APPEND_BUFFER_INVALID_STATE_ERROR);i=d("oz-player/utils/OzErrorUtils").createOzError({type:d("oz-player/utils/OzErrorUtils").isOzError(j)?j.getType():l==="QuotaExceededError"?"OZ_SOURCE_BUFFER_QUOTA_EXCEEDED":l==="OZ_SOURCE_BUFFER_CHANGE_TYPE"?"OZ_SOURCE_BUFFER_CHANGE_TYPE":"OZ_SOURCE_BUFFER",description:"SBM#"+g.$1+" appendBuffer("+b+") failed: "+String(m),extra:d("oz-player/utils/OzErrorUtils").isOzError(j)?j.getExtra():{originalError:j,code:k}});g.$4=null;h.reject(i)}l=h.getPromise();e&&d("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(l,e,"append",function(b){var c;b.setLength(a.byteLength);c=(c=f==null?void 0:f.appendTarget)!=null?c:null;b.setAppendTarget(c)});return l};if(this.$3.getIsUpdating())return this.$22(e).then(h)["catch"](function(a){throw a});this.$14+=a.byteLength;return h()};e.$19=function(){var a=this;if(this.$7)return c("oz-player/shims/OzMaybeNativePromise").reject(this.$24("Another unit of queued data is being appended."));var b=this.$8.shift();if(!b){this.$7=!1;return c("oz-player/shims/OzMaybeNativePromise").resolve()}var e=b.data,f=b.mimeCodecs,g=b.deferred,h=b.loggerProvider,i=b.appendTarget,j=b.clearSourceBufferRange;this.$7=!0;var k;b=function(){return e instanceof d("oz-player/shims/OzStreams").OzReadableStream?a.$25(e,f,h,i):a.$23(e,f,h,{appendTarget:i})};j?(k=this.$3.getIsUpdating()?this.$22(h):c("oz-player/shims/OzMaybeNativePromise").resolve(),k=k.then(function(){return a.clearRangeWithWait([{fromTime:j[0],toTime:j[1]}])}).then(b)):k=b();var l=d("oz-player/media_source/SourceBufferManagerUtils").startMeasuringAppendedBuffer(this.$11,this.$3,this.$9);return k["catch"](function(a){g.reject(a)}).then(function(){var b=l(),c=b.startTime;b=b.endTime;g.resolve({startTime_UNSAFE:c,endTime_UNSAFE:b,appendedSec:b-c});a.$7=!1;a.$19()["catch"](function(a){})})};e.$25=function(a,b,e,f){var g=this,h=[],i=0,j=a.getReader(),k=function(){var a=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise"));g.$6=a;j.read().then(function(b){a.resolve(b),g.$6=null})["catch"](function(b){a.reject(b),g.$6=null});return a.getPromise().then(function(a){if(a.done){var d=c("oz-player/utils/ozConcatUint8Arrays")(h);d=d.buffer;h.length=0;i=0;return d.byteLength>0?g.$23(d,b,e,{appendTarget:f}):c("oz-player/shims/OzMaybeNativePromise").resolve()}d=a.value;a=d;if(f>0){d=d instanceof Uint8Array?d:new Uint8Array(d);h.push(d);i+=d.byteLength;if(i>=f){d=c("oz-player/utils/ozConcatUint8Arrays")(h);d=d.buffer;h.length=0;i=0;a=d}}return a&&a.byteLength>=f?g.$23(a,b,e,{appendTarget:f}).then(function(){return k()}):k()},function(a){if(g.$11.getBool("enable_alternative_audio_tracks"))try{g.$15()==="open"&&(g.$10.hasError()||g.$3.abort())}catch(a){a}else try{g.$3.abort()}catch(a){a}if(typeof a==="object"&&d("oz-player/utils/OzErrorUtils").isOzError(a))return c("oz-player/shims/OzMaybeNativePromise").reject(a);if(typeof a==="object"&&a!=null&&typeof a.name==="string"&&a.name==="TypeError"&&typeof a.message==="string"&&a.message.includes("network error")){var e=d("oz-player/utils/OzErrorUtils").convertPromiseRejectionReasonToOzError(a,{description:"SBM#"+g.$1+" appendReadableStream("+b+") failed: Stream read is interrupted (previously TypeError network error)}",extra:{originalError:a},type:"OZ_NETWORK"});return c("oz-player/shims/OzMaybeNativePromise").reject(e)}e=d("oz-player/utils/OzErrorUtils").convertPromiseRejectionReasonToOzError(a,{description:"SBM#"+g.$1+" appendReadableStream("+b+") failed: Unexpected error while reading from stream: "+String(a),extra:{originalError:a},type:"OZ_NETWORK"});return c("oz-player/shims/OzMaybeNativePromise").reject(e)})};return k()};e.$24=function(a){var b=this.$2;b!=null&&b.getOperationLogger("source_buffer_invariant").setError(a).setResult("failed").log();return d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SOURCE_BUFFER",description:"SBM invariant: "+a})};e.destroy=function(){var a=this,b=this.$2;b&&b.cloneContext().getOperationLogger("source_buffer_destroy").log();b=this.$4;b&&(!this.$13?(b.reject(d("oz-player/utils/OzErrorUtils").createOzCancelledError("SBM destroyed")),this.$4=null,this.$5.release(),this.$5=new(c("oz-player/shims/OzSubscriptionsHandler"))()):b.getPromise()["catch"](function(){a.$4=null,a.$5.release(),a.$5=new(c("oz-player/shims/OzSubscriptionsHandler"))()}));this.$9.destroy()};e.getDebug=function(){return{SourceBuffer:this.$3}};return a}();g["default"]=a}),98); __d("oz-player/shims/www/getOzVTTSourceBufferImplLazyWWW",["JSResourceForInteraction"],(function(a,b,c,d,e,f,g){"use strict";var h=c("JSResourceForInteraction")("OzVTTSourceBufferImpl").__setRef("oz-player/shims/www/getOzVTTSourceBufferImplLazyWWW");function a(){return h.load()}g["default"]=a}),98); __d("oz-player/shims/www/getOzVTTSourceBufferImplWWW",["oz-player/shims/www/getOzVTTSourceBufferImplLazyWWW"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("oz-player/shims/www/getOzVTTSourceBufferImplLazyWWW")}),98); __d("oz-player/shims/getOzVTTSourceBufferImpl",["oz-player/shims/www/getOzVTTSourceBufferImplWWW"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("oz-player/shims/www/getOzVTTSourceBufferImplWWW")}),98); __d("oz-player/shims/www/ozClearTimeoutWWW",["clearTimeout"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("clearTimeout")}),98); __d("oz-player/shims/ozClearTimeout",["oz-player/shims/www/ozClearTimeoutWWW"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("oz-player/shims/www/ozClearTimeoutWWW")}),98); __d("oz-player/shims/www/ozSetTimeoutAcrossTransitionsWWW",["setTimeoutAcrossTransitions"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("setTimeoutAcrossTransitions")}),98); __d("oz-player/shims/ozSetTimeoutAcrossTransitions",["oz-player/shims/www/ozSetTimeoutAcrossTransitionsWWW"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("oz-player/shims/www/ozSetTimeoutAcrossTransitionsWWW")}),98); __d("oz-player/utils/ozGetErrorNameFromMediaErrorCode",[],(function(a,b,c,d,e,f){"use strict";function a(a){switch(a){case 1:return"MEDIA_ERR_ABORTED";case 2:return"MEDIA_ERR_NETWORK";case 3:return"MEDIA_ERR_DECODE";case 4:return"MEDIA_ERR_SRC_NOT_SUPPORTED";default:}return"MEDIA_ERR_UNKNOWN"}f["default"]=a}),66); __d("oz-player/media_source/MediaSourceManager",["oz-player/loggings/OzMultiDestinationPerfLogger","oz-player/media_source/OzMSESourceBufferImpl","oz-player/media_source/OzMediaErrorProvider","oz-player/media_source/SourceBufferManager","oz-player/shims/OzDOMEventListener","oz-player/shims/OzDeferred","oz-player/shims/OzMaybeNativePromise","oz-player/shims/OzSubscriptionsHandler","oz-player/shims/getOzVTTSourceBufferImpl","oz-player/shims/ozClearTimeout","oz-player/shims/ozReportUnexpectedError","oz-player/shims/ozSetTimeoutAcrossTransitions","oz-player/shims/ozThrottle","oz-player/utils/OzCustomErrorCode","oz-player/utils/OzErrorEmitter","oz-player/utils/OzErrorUtils","oz-player/utils/OzMimeUtil","oz-player/utils/ozGetErrorNameFromMediaErrorCode"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a){var b=this,e=a.videoNode,f=a.config,g=a.perfLoggerProvider;g=g===void 0?new(d("oz-player/loggings/OzMultiDestinationPerfLogger").OzMultiDestinationPerfLoggerProvider)([]):g;var h=a.isChangeTypeSupported,i=a.useManagedMediaSource,j=a.handleVttCaptionsUpdated,k=a.onClearVideoNodeError;a=a.onRetryVideoElementError;this.$3=new(c("oz-player/shims/OzSubscriptionsHandler"))();this.$4=new(c("oz-player/shims/OzSubscriptionsHandler"))();this.$6=[];this.$7=new Map();this.$8=[];this.$10=!1;this.$12=!1;this.$13=!1;this.$14=!1;this.$15=!1;this.$18=null;this.$19=null;this.$20=new(c("oz-player/utils/OzErrorEmitter"))();this.$22="undetected";this.$23=!1;this.$24=!1;this.$31=function(){b.$34()||(b.$10=!1);if(!b.$35())return;var a=b.$8.shift();a&&(a(b.$2),b.$10=!0)};this.$5=g;this.$11=f;this.$1=e;this.$21=j;this.$16=k;this.$17=a;this.$23=h;this.$24=i;this.$9=new(c("oz-player/media_source/OzMediaErrorProvider"))(this.$1);this.$3.addSubscriptions(c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$1,"error",function(){var a;b.$5.getOperationLogger("media_element_error").setError((a=b.$9.getMediaErrorName())!=null?a:void 0).setCode(b.$9.getErrorCode()).setResult("failed").setUserInfo({av1HardwareSupport:b.$22}).log();b.$8=[];b.$6=[];b.$4.release();b.$4=new(c("oz-player/shims/OzSubscriptionsHandler"))();b.$15=b.$15||b.$14||b.$13;a=b.$1.error;var e=(a==null?void 0:a.code)||0,f=!a&&b.$1.poster!=null&&b.$1.poster!=="",g=d("oz-player/utils/OzErrorUtils").createOzError({type:f?"OZ_POSSIBLE_POSTER_LOAD_FAILURE":c("oz-player/utils/ozGetErrorNameFromMediaErrorCode")(e),description:(a==null?void 0:a.message)!=null?a.message:"",extra:{originalError:a,code:String(e)}});if(b.$19!=null){b.$5.getOperationLogger("media_element_error").setError(a).setCode(e).setReason("mitigation_failed").setResult("failed").setUserInfo({av1HardwareSupport:b.$22}).log();b.$20.emitError(g);return}b.$19=b.$1.currentTime;b.$18==null&&(b.$18=c("oz-player/shims/ozSetTimeoutAcrossTransitions")(function(){b.$18=null,b.$11.getBool("retry_video_element_error")&&(b.$17!=null&&b.$17(g),b.$25())},0))}),c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$1,"play",function(){b.$14=!0}),c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$1,"playing",function(){b.$14=!1,b.$15=!1,b.$19=null,b.$13=!0}),c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$1,"pause",function(){b.$14=!1,b.$13=!1,b.$15=!!b.$1.error}),c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$1,"ended",function(){b.$14=!1,b.$13=!1}));this.$2=this.$26();this.$5.getOperationLogger("media_source_new").log();this.$3.addSubscriptions(c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$2,"sourceopen",function(){b.$5.getOperationLogger("media_source_open").log()}),c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$2,"sourceended",function(){b.$5.getOperationLogger("media_source_ended").log()}),c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$2,"sourceclose",function(){b.$5.getOperationLogger("media_source_close").log()}));this.$27(this.$2)}var b=a.prototype;b.$26=function(){return this.$24?new ManagedMediaSource():new MediaSource()};b.$27=function(a){var b=this.$1,c=b.src;c!==""&&URL.revokeObjectURL(c);a?(this.$24&&(b.disableRemotePlayback=!0),b.src=URL.createObjectURL(a)):(b.removeAttribute("src"),b.removeAttribute("srcObject"))};b.$25=function(){var a=this;this.$7.forEach(function(a){a.cancelOperationAndCleanQueue()});this.$2=this.$26();this.$27(this.$2);this.$7.forEach(function(a,b){a.setSourceBuffer(null)});var b=this.$28().then(function(){var b=[];a.$7.forEach(function(c,d){var e=a.$29(d).then(function(b){c.setSourceBuffer(b),a.$30(b,d)});b.push(e)});return c("oz-player/shims/OzMaybeNativePromise").all(b)});b.then(function(){a.$16&&a.$16();a.$19!=null&&(a.$1.currentTime=a.$19);if(a.$15){var b=a.$1.play();return b==null?void 0:b["catch"](function(){})}})["catch"](function(b){a.$20.emitError(b)})};b.$28=function(){var a=this;if(this.$11.getBool("msm_refactor_wait_for_sourceopen")){if(this.$2.readyState==="open")return c("oz-player/shims/OzMaybeNativePromise").resolve();var b=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise")),d=c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$2,"sourceopen",function(){d.remove(),b.resolve(),a.$31()});this.$3.addSubscriptions(d);return b.getPromise()}else{if(this.$2.readyState==="open")return c("oz-player/shims/OzMaybeNativePromise").resolve();var e=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise"));this.$3.addSubscriptions(c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$2,"sourceopen",function(){e.resolve(),a.$31()}));return e.getPromise()}};b.$29=function(a){var b=this;if(this.$11.getBool("msm_refactor_wait_for_sourceopen"))return c("oz-player/shims/OzMaybeNativePromise").resolve().then(function(){return b.$32(a)})["catch"](function(b){b=d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SOURCE_BUFFER",description:'Failed to addSourceBuffer("'+a+'"): '+String(b),extra:{originalError:b,code:c("oz-player/utils/OzCustomErrorCode").SOURCE_BUFFER_MANAGER_ADD_SOURCE_BUFFER_ERROR.toString()}});throw b});else try{return this.$32(a)}catch(b){var e=d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SOURCE_BUFFER",description:'Failed to addSourceBuffer("'+a+'"): '+(b.message||String(b)),extra:{originalError:b,code:c("oz-player/utils/OzCustomErrorCode").SOURCE_BUFFER_MANAGER_ADD_SOURCE_BUFFER_ERROR.toString()}});throw e}};b.$32=function(a){var b=this,e;a.includes("vtt")?e=this.$33(a):e=this.$28().then(function(){return new(c("oz-player/media_source/OzMSESourceBufferImpl"))(b.$2.addSourceBuffer(a),a,b.$11,b.$23)});return e.then(function(c){b.$6.push(c);c.registerOnUpdateListener(function(){b.$5.cloneContext().getOperationLogger("source_buffer_update_start").setType(d("oz-player/utils/OzMimeUtil").getMimeType(a)).setMediaSourceSourceBuffer(d("oz-player/utils/OzMimeUtil").getMimeType(a),c).setType(d("oz-player/utils/OzMimeUtil").getMimeType(a)).log()});b.$5.getOperationLogger("add_source_buffer").setMediaSourceSourceBuffer(d("oz-player/utils/OzMimeUtil").getMimeType(a),c).log();return c})};b.$30=function(a,b){var c=this;this.$4.addSubscriptions(a.registerOnUpdateEndListener(function(){c.$31()}))};b.$33=function(a){var b=this;return c("oz-player/shims/getOzVTTSourceBufferImpl")().then(function(e){if(b.$21!=null){var f=new e({onCaptionsChanged:b.$21,config:b.$11}),g=c("oz-player/shims/ozThrottle")(function(){f.setCurrentVideoTime(b.$1.currentTime)},200);b.$3.addSubscriptions(c("oz-player/shims/OzDOMEventListener").listenDOMEvent(b.$1,"timeupdate",function(){g()}),{remove:function(){g=function(){}}});return f}else throw d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SOURCE_BUFFER",description:'Failed to addSourceBuffer("'+a+'"): No handleVttCaptionsUpdated callback provided',extra:{code:c("oz-player/utils/OzCustomErrorCode").SOURCE_BUFFER_MANAGER_ADD_SOURCE_BUFFER_ERROR.toString()}})})};b.createSourceBufferManager=function(a,b,e,f){var g=this;return(this.$11.getBool("msm_refactor_wait_for_sourceopen")?this.$29(b).then(function(a){return[void 0,a]}):c("oz-player/shims/OzMaybeNativePromise").all([this.$28(),this.$29(b)])).then(function(e){e[0];e=e[1];var f=new(c("oz-player/media_source/SourceBufferManager"))(a,e,g.$11,g.$9,function(){return g.$2.readyState},g.$5.cloneContext().setType(d("oz-player/utils/OzMimeUtil").getMimeType(b)));g.$30(e,b);g.$7.set(b,f);return f})["catch"](function(b){var e=d("oz-player/utils/OzErrorUtils").isOzError(b)?b.getExtra():void 0,f=e==null?void 0:e.code;f=d("oz-player/utils/OzErrorUtils").isOzError(b)?""+b.getType()+(f!=null?"#"+f:"")+": "+b.getDescription():String(b);f=d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SOURCE_BUFFER",description:"Failed to create SBM#"+a+": "+f+", support AAC-LC="+(g.$2.constructor.isTypeSupported("audio/mp4; codecs=mp4a.40.2")?"true":"false")+", readyState="+g.$2.readyState,extra:babelHelpers["extends"]({},e,{originalError:b,code:c("oz-player/utils/OzCustomErrorCode").SOURCE_BUFFER_MANAGER_CREATE_ERROR.toString()})});throw f})};b.getReadyState=function(){return this.$2.readyState};b.getMediaSource=function(){return this.$2};b.notifyEndOfStream=function(a,b){var d=this,e=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise"));this.$3.addSubscriptions(c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$2,"sourceended",function(){e.resolve()}));this.$8.push(function(c){if(c.readyState==="open"){var e=d.$5.getOperationLogger("end_of_stream");e.setInitiator(a).setReason(b);e.log();c.endOfStream()}});this.$31();return e.getPromise()};b.updateDuration=function(a,b){var e=this,f=this.$2.duration;if(Number.isFinite(f)&&(!b||f>=a))return;this.$8.push(function(b){b.duration!==f&&!(isNaN(b.duration)&&isNaN(f))&&c("oz-player/shims/ozReportUnexpectedError")(d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SOURCE_BUFFER",description:"mediaSource duration discrepancy: "+b.duration+" != "+f}),"MediaSourceManager updateDuration","warn");var g=e.$11.getBool("msm_refactor_wait_for_sourceopen")?b.duration!==Infinity&&a0){var i=typeof e==="function"?e(d-b):e;c("oz-player/shims/ozSetTimeoutAcrossTransitions")(function(){h(b-1)},i)}else g(a)}});return i.apply(this,arguments)}h(d)})}g["default"]=a}),98); __d("oz-player/networks/OzFetchWithCache",["oz-player/networks/OzFetchRequestImplementation","oz-player/networks/withRetries","oz-player/shims/OzMaybeNativePromise","oz-player/utils/OzErrorUtils","oz-player/utils/arrayBuffer2OzReadableStream","oz-player/utils/processFetchResponse"],(function(a,b,c,d,e,f,g){"use strict";function a(a){var b=a.config,e=a.url,f=a.http,g=a.overrideOzRequestImplementation,h=a.options,i=a.prefetchCache,j=a.mediaStreamType,k=a.onPerfEntryAvailable,l=a.dataAppendedCallback,m=a.dataAppendedErrorCallback,n=g!=null?function(){return g.apply(void 0,arguments)}:c("oz-player/networks/OzFetchRequestImplementation");a=i?i.getCacheValue(e):null;i=a;a=!1;if(i)a=!0,i=i.then(function(a){if(a.initiator==="FETCH"){var b=a.response,e=b.ok,f=b.status,g=b.headers;return!e&&typeof a.response.text==="function"?a.response.text().then(function(b){return{ok:!1,status:f,headers:g,body:b,arrayBuffer:function(){return a.response.arrayBuffer()}}}):c("oz-player/utils/processFetchResponse")(a.response)}else if(a.initiator==="XHR_REQUEST"){b=c("oz-player/utils/arrayBuffer2OzReadableStream")(a.response);return{body:b,status:200,headers:null,ok:!0,arrayBuffer:function(){return c("oz-player/shims/OzMaybeNativePromise").resolve(a.response)}}}else throw d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_UNEXPECTED_CACHE_INITIATOR",description:"Unable to handle request initiator: "+a.initiator})})["catch"](function(a){return n(e,f,null,null,j,k,l,m)});else{var o;o=(o=h==null?void 0:h.retryAttempts_SIDX_USE_ONLY)!=null?o:0;if(o>0){var p;p=(p=h==null?void 0:h.retryTimeoutMs_SIDX_USE_ONLY)!=null?p:100;i=c("oz-player/networks/withRetries")(function(){return n(e,f,h,b,j,k,l,m)},o,p)}else i=n(e,f,h,b,j,k,l,m)}return{promise:i,retrievedFromCache:a}}g["default"]=a}),98); __d("oz-player/utils/OzVideoUrlUtils",[],(function(a,b,c,d,e,f){"use strict";c=1<<31;var g=~c,h=c+1;function i(a){a=a|0;return Math.max(h,Math.min(a,g))}function j(a){a=Number.parseInt(a,16);return Number.isFinite(a)?new Date(i(a)*1e3):null}function k(){return i(Date.now()/1e3)}var l={OE:"oe",OE2:"oe2",ODM:"odm",USS:"uss"};function m(a){a=a instanceof URL?a.searchParams:new URL(a).searchParams;a=a.get(l.OE);a=a==null?void 0:j(a);return{expirationDate:a}}function a(a){a=a instanceof URL?a.searchParams:new URL(a).searchParams;return a.get(l.OE2)!==null||a.get(l.ODM)!==null||a.get(l.USS)!==null}function b(a){a=m(a);a=a.expirationDate;return a!=null&&a<=new Date(k()*1e3)}f.DEFAULT_UNIXTIME=c;f.MAX_INT=g;f.parseCdnUrlParams=m;f.isShortenedExpiryTimestampCdnUrl=a;f.isCdnUrlExpired=b}),66); __d("oz-player/networks/OzNetworkRequestStream",["Promise","oz-player/networks/OzCreateErrorStream","oz-player/networks/OzFetchWithCache","oz-player/shims/OzURI","oz-player/shims/ozvariant","oz-player/utils/OzCustomErrorCode","oz-player/utils/OzErrorUtils","oz-player/utils/OzResourceTimingUtils","oz-player/utils/OzVideoUrlUtils"],(function(a,b,c,d,e,f,g){"use strict";var h;a=function(){function a(a){this.$8=!1;this.$10="auto";var b=a.debugName,c=a.config,d=a.baseUri,e=a.baseUriDecisionTime,f=a.options,g=a.requestParamCreator,h=a.networkRequestStreamHandlers,i=a.overrideOzRequestImplementation,j=a.prefetchCache,k=a.networkRequestFetchPriority,l=a.networkRequestStreamRetryHandler,m=a.networkRequestUrlRefreshHandler,n=a.dynamicVideoLibrary,o=a.mediaStreamType,p=a.dataAppendedCallback;a=a.dataAppendedErrorCallback;this.$1=b;this.$2=d;this.$3=f;this.$4=g;this.$11=h!=null?h:[];this.$10=k;this.$12=l;this.$13=m;this.$9=i;this.$14=j;this.$15=c;this.$16=n;this.$17=e;this.$18=o;this.$19=p;this.$20=a}var e=a.prototype;e.$21=function(a){var b=this;a=this.$4.createRequestParam(this.$2,a,this.$10);var d=a.uri;a=a.http;d=d.toString();this.$5=d;a=c("oz-player/networks/OzFetchWithCache")({config:this.$15,url:d,http:a,overrideOzRequestImplementation:this.$9,options:this.$3,prefetchCache:this.$14,mediaStreamType:this.$18,onPerfEntryAvailable:function(a){b.$22(a)},dataAppendedCallback:this.$19,dataAppendedErrorCallback:this.$20});var e=a.promise;a=a.retrievedFromCache;this.$8=a;return{requestPromise:e,requestUrl:d}};e.startStream=function(a){var b=this;return this.$23().then(function(){if(b.$15.getBool("video_cdn_url_refresh")&&!d("oz-player/utils/OzVideoUrlUtils").isShortenedExpiryTimestampCdnUrl(b.$2.toString())&&d("oz-player/utils/OzVideoUrlUtils").isCdnUrlExpired(b.$2.toString()))return c("oz-player/networks/OzCreateErrorStream")(d("oz-player/utils/OzErrorUtils").createOzNetworkError({description:"OzNetworkRequestStream("+b.$1+") CDN URL expired.",responseStatus:0,responseHeaders:null,requestUrl:b.$2.toString()}));var e=b.$21(a),f=e.requestPromise,g=e.requestUrl,h=g,i=Date.now();return f.then(function(e){var f;(f=b.$16)==null||f.updateWithResponse(g,i,b.$17,e);b.$7=e;if(b.$12!=null&&e.ok===!1)return b.$12(e,function(){var d=b.$21(a),c=d.requestPromise;d=d.requestUrl;h=d;return c},h)["catch"](function(a){throw d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_NETWORK_REQUEST_STREAM_RETRY_HANDLER_ERROR",description:String(a),extra:{originalError:a,code:c("oz-player/utils/OzCustomErrorCode").NETWORK_REQUEST_STREAM_RETRY_HANDLER_ERROR,url:h}})});else return e}).then(function(a){var e=[];for(var f=0;f=a.startByte}function d(a,b){a=a;b=b;if(b.startBytea.endByte+1)return null;c=b.endByte==null||b.endByte>a.endByte?b.endByte:a.endByte;return{startByte:a.startByte,endByte:c}}function e(a,b){if(b.endByte==null)return null;if(a.startByte>b.endByte)return{startByte:a.startByte,endByte:a.endByte};return a.endByte!=null&&a.endByte<=b.endByte?null:{startByte:b.endByte+1,endByte:a.endByte}}function g(a){return a.endByte==null?null:a.endByte-a.startByte+1}f.startsAtSame=a;f.startsImmediateAfter=b;f.startsDuring=c;f.union=d;f.disjoinAfter=e;f.getLength=g}),66); __d("oz-player/networks/OzProducerInterruptedError",[],(function(a,b,c,d,e,f){"use strict";a=function(a){function b(){return a.apply(this,arguments)||this}babelHelpers.inheritsLoose(b,a);return b}(babelHelpers.wrapNativeSuper(Error));f["default"]=a}),66); __d("oz-player/networks/OzDeferredBuffer",["oz-player/networks/OzProducerInterruptedError","oz-player/shims/OzDeferred","oz-player/shims/OzMaybeNativePromise","oz-player/utils/OzErrorUtils"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a){a===void 0&&(a={});this.$2=[];this.$3=!1;this.$5=0;a=a;a=a.disableArrayShift;this.$1=!!a}var b=a.prototype;b.produce=function(a){this.$6(a)};b.signalProducerInterruption=function(){this.$6(new(c("oz-player/networks/OzProducerInterruptedError"))("producer interrupted"))};b.consume=function(a){var b=this;if(this.$3)throw d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_DEFERRED_BUFFER",description:"A buffer can only be consumed by one client at a time"});this.$3=!0;var e=c("oz-player/shims/OzMaybeNativePromise").resolve();this.isEmpty()&&(this.$4=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise")),e=this.$4.getPromise());return e.then(function(){if(b.$1){if(b.$2[b.$5]===void 0)throw d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_DEFERRED_BUFFER",description:"buffer has no value at position "+b.$5})}else if(b.$2.length===0)throw d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_DEFERRED_BUFFER",description:"buffer length must not be 0"});b.$4=null;b.$3=!1;var c=b.$1?b.$7(a):b.$8(a);if(c instanceof Uint8Array)return c;throw c})};b.$6=function(a){this.$2.push(a),this.$4&&this.$4.resolve()};b.$7=function(a){var b=this.$2[this.$5];if(b===void 0)return new Uint8Array([]);b=b;if(!(b instanceof Uint8Array)){this.$2[this.$5]=void 0;this.$5++;return b}if(a!==void 0&&b.length>a){var c=b.slice(a);b=b.slice(0,a);this.$2[this.$5]=c}else this.$2[this.$5]=void 0,this.$5++;return b};b.$8=function(a){if(this.$2.length===0)return new Uint8Array([]);var b=this.$2[0];if(!(b instanceof Uint8Array)){this.$2.shift();return b}if(a!==void 0&&b.length>a){var c=b.slice(a);b=b.slice(0,a);this.$2[0]=c}else this.$2.shift();return b};b.isEmpty=function(){return this.$1?this.$2[this.$5]===void 0:this.$2.length===0};return a}();g["default"]=a}),98); __d("oz-player/utils/ozPipeErrorTo",[],(function(a,b,c,d,e,f){"use strict";function a(a,b){try{a==null||a.error(b)}catch(a){}}f["default"]=a}),66); __d("oz-player/networks/OzPausableRangeStream",["oz-player/manifests/OzByteRange","oz-player/networks/OzDeferredBuffer","oz-player/shims/OzDeferred","oz-player/shims/OzMaybeNativePromise","oz-player/utils/OzErrorUtils","oz-player/utils/ozPipeErrorTo"],(function(a,b,c,d,e,f,g){"use strict";function h(){return d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_STREAM",description:"Upstream has an inconsistent range"})}var i=function(){function a(){this.$1=0}var b=a.prototype;b.setBytesToSkip=function(a){this.$1=a};b.setBytesSkipped=function(a){this.$1-=a};b.getBytesToSkip=function(){return this.$1};b.hasMoreBytesToSkip=function(){return this.$1>0};return a}();a=function(){function a(b,d,e,f,g){var j=this;this.$5=!1;this.$7=0;this.$8=0;this.$13=!1;this.$14=new i();this.$15=!1;this.$16=!1;this.$17=!1;this.startStream=function(){j.$13=!0;var b={startByte:j.$1.startByte,endByte:j.$1.endByte};!j.$15?b.startByte+=j.$8:j.$8&&(j.$3.produce("skip_buffered_bytes"),j.$8=0);var d=j.$4;return j.$2.startStream(b).then(function(b){b.pipeTo(j.$16?d:j.$4).then(function(){j.$12&&j.$12.resolve("stream_done")})["catch"](function(b){j.$12&&!j.$12.isSettled()&&(j.$16&&b===a.STREAM_PAUSED?j.$12.resolve("stream_paused"):j.$12.reject(b))});j.$12=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise"));return{statusPromise:j.$12.getPromise()}})};this.$18=b;this.$19=d;this.$1=e;this.$2=f;b=g||{};d=b.fixStreamingUndefinedEndByte;e=b.disableDeferredBufferArrayShift;f=b.enablePausableStreamResumeFromStartDangerously;g=b.fixPausePreReadableStream;b=b.throwErrorWhenAborted;this.$11=!!d;this.$15=!!f;this.$16=!!g;this.$17=!!b;this.$3=new(c("oz-player/networks/OzDeferredBuffer"))({disableArrayShift:!!e});this.$6=new this.$18({start:function(a){j.$10=a},pull:function(a){if((j.$11&&j.$1.endByte===null&&j.$5||j.$7===j.$20())&&j.$3.isEmpty()){a.close();return c("oz-player/shims/OzMaybeNativePromise").resolve()}var b=function(){var d=j.$14.hasMoreBytesToSkip()?j.$14.getBytesToSkip():void 0;return j.$3.consume(d).then(function(d){if(j.$14.hasMoreBytesToSkip()){j.$14.setBytesSkipped(d.length);return b()}j.$7+=d.length;var e=j.$20();e!==null&&j.$7>(e||0)&&c("oz-player/utils/ozPipeErrorTo")(j.$10,h());a.enqueue(d)})["catch"](function(a){if(a==="skip_buffered_bytes"){j.$14.setBytesToSkip(j.$7);return b()}throw a})};return b()},cancel:function(a){j.$12&&j.$12.resolve("stream_cancelled"),c("oz-player/utils/ozPipeErrorTo")(j.$9,a)}});this.$4=this.$21()}var b=a.prototype;b.$20=function(){var a=this.$1,b=a.startByte;a=a.endByte;return a!=null?a-b+1:null};b.$21=function(){var a=this;return new this.$19({start:function(b){a.$9=b},write:function(b){a.$3.produce(b),a.$8+=b.length},close:function(){a.$5=!0;var b=a.$1,d=b.endByte;b=b.startByte;a.$11&&d===null&&a.$3.produce(new Uint8Array([]));d!==null&&a.$8!==(d||0)-b+1&&c("oz-player/utils/ozPipeErrorTo")(a.$10,h())},abort:function(b){a.$12&&(a.$17?a.$12.reject(b):a.$12.resolve("stream_aborted")),c("oz-player/utils/ozPipeErrorTo")(a.$10,b)}})};b.getStream=function(){return this.$6};b.pauseStream=function(){c("oz-player/utils/ozPipeErrorTo")(this.$9,a.STREAM_PAUSED),this.$12&&this.$12.resolve("stream_paused"),this.$4=this.$21()};b.getByteRange=function(){return this.$1};b.getBytesStreamed=function(){return this.$7};b.tryConcatByteRange=function(a){if(this.$13||!d("oz-player/manifests/OzByteRange").startsImmediateAfter(a,this.$1))return!1;this.$1={startByte:this.$1.startByte,endByte:a.endByte};return!0};return a}();a.STREAM_PAUSED="streamPaused";g["default"]=a}),98); __d("oz-player/networks/RequestParamCreator",["oz-player/shims/OzURI"],(function(a,b,c,d,e,f,g){"use strict";a=function(a,b){var d=this;this.createRequestParam=function(a,b,e){var f=new(c("oz-player/shims/OzURI"))(a.toString());if(b){a=b.startByte;var g=b.endByte;a===0&&g==null||(f.addQueryData({bytestart:b.startByte}),g!=null&&f.addQueryData({byteend:g}))}if(d.$2){var h=d.$2(f);h&&Object.keys(h).forEach(function(a){var b=h[a];f.addQueryData(a,b)})}a=d.$1&&d.$1(f)?"include":"same-origin";return{uri:f,http:{credentials:a,priority:e}}};this.$1=a;this.$2=b};g["default"]=a}),98); __d("oz-player/networks/getOzSegmentStreamableRange",[],(function(a,b,c,d,e,f){"use strict";function a(a){if(!a.length)return null;var b=a[0].getURI().toString(),c=a[0].getByteRange();if(!c)return null;var d=c;for(var e=1;e0?{chunkSize:String(i)}:null)};g.setPerformanceLoggingAttributes=m;g.setFetchStreamLoggingAttributes=a;g.setBandwidthSampledLoggingAttributes=b}),98); __d("oz-player/networks/OzNetworkManager",["oz-player/loggings/OzLoggingUtils","oz-player/networks/OzNetworkRequestStream","oz-player/networks/OzPausableRangeStream","oz-player/networks/RequestParamCreator","oz-player/networks/getOzSegmentStreamableRange","oz-player/shims/OzStreams","oz-player/shims/OzURI","oz-player/shims/ozvariant","oz-player/utils/OzNetworkRequestLoggingUtils"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a){this.$10=null;this.$15="auto";var b=a.config,d=a.prefetchCache,e=a.networkRequestStreamHandlers,f=a.getOverrideOzRequestImplementation,g=a.getShouldIncludeCredentials,h=a.getCustomRequestParametersForURI,i=a.networkRequestFetchPriority;i=i===void 0?"auto":i;var j=a.networkRequestStreamRetryHandler,k=a.networkRequestUrlRefreshHandler,l=a.setCustomFetchStreamLoggingAttributes,m=a.dynamicVideoLibrary,n=a.configureCustomRequestParametersForSegment,o=a.onResourceTimingBufferFull;a=a.bandwidthEstimator;this.$2=b;this.$8=g;this.$9=h;this.$1=new(c("oz-player/networks/RequestParamCreator"))(this.$8,this.$9);this.$3=d;this.$4=e;this.$5=j;this.$6=k;this.$7=f;this.$10=l;this.$11=m;this.$12=n;this.$13=o;this.$14=a;this.$15=i}var b=a.prototype;b.destroy=function(){};b.request=function(a){var b=a.debugName,d=a.segments,e=a.pipeThroughRangeStreamProviders,f=a.loggerProvider,g=a.requestOptions,h=a.mediaStreamType,i=a.dataAppendedCallback;a=a.dataAppendedErrorCallback;d.length>0||c("oz-player/shims/ozvariant")(0,212);var j=c("oz-player/networks/getOzSegmentStreamableRange")(d)||{startByte:0,endByte:null},k=this.$7?this.$7():null,l=this.$16(d[0]);b=new(c("oz-player/networks/OzNetworkRequestStream"))({debugName:b,config:this.$2,baseUri:l,baseUriDecisionTime:null,options:g,requestParamCreator:this.$1,networkRequestFetchPriority:this.$15,networkRequestStreamHandlers:this.$4,networkRequestUrlRefreshHandler:this.$6,overrideOzRequestImplementation:k,prefetchCache:this.$3,networkRequestStreamRetryHandler:this.$5,mediaStreamType:h,dataAppendedCallback:i,dataAppendedErrorCallback:a});return this.$17(j,b,e,f,d)};b.createPausableStream=function(a){var b=a.debugName,d=a.segments,e=a.pipeThroughRangeStreamProviders,f=a.loggerProvider,g=a.mediaStreamType,h=a.dataAppendedCallback;a=a.dataAppendedErrorCallback;d.length>0||c("oz-player/shims/ozvariant")(0,212);var i=c("oz-player/networks/getOzSegmentStreamableRange")(d)||{startByte:0,endByte:null},j=null,k=this.$2.getNumber("network_seg_timeout_ms");k>0&&(j={networkTimeoutMs:k});k=this.$7?this.$7():null;var l=new(c("oz-player/networks/OzNetworkRequestStream"))({debugName:b,config:this.$2,baseUri:this.$16(d[0]),baseUriDecisionTime:d[0].getOptions().getSegmentNumDecisionTime(),options:j,requestParamCreator:this.$1,networkRequestFetchPriority:this.$15,networkRequestStreamHandlers:this.$4,networkRequestUrlRefreshHandler:this.$6,overrideOzRequestImplementation:k,prefetchCache:this.$3,networkRequestStreamRetryHandler:this.$5,dynamicVideoLibrary:this.$11,mediaStreamType:g,dataAppendedCallback:h,dataAppendedErrorCallback:a});return{pausableStream:this.$18(i,l,e||null,f),loggingPayloads:{getRequestUrl:function(){return l.getLastRequestUrl()||null},segments:d,getResponse:function(){return l.getLastResponse()}}}};b.requestRawUrl=function(a){var b=a.debugName,d=a.url,e=a.options;a=a.loggerProvider;var f=this.$7?this.$7():null;b=new(c("oz-player/networks/OzNetworkRequestStream"))({debugName:b,config:this.$2,baseUri:new(c("oz-player/shims/OzURI"))(d),baseUriDecisionTime:null,options:e,networkRequestFetchPriority:this.$15,requestParamCreator:this.$1,networkRequestStreamHandlers:this.$4,networkRequestUrlRefreshHandler:this.$6,overrideOzRequestImplementation:f,prefetchCache:this.$3,networkRequestStreamRetryHandler:this.$5,dynamicVideoLibrary:this.$11,mediaStreamType:null,dataAppendedCallback:null,dataAppendedErrorCallback:null});d={startByte:0,endByte:null};return this.$17(d,b,[],a)};b.$18=function(a,b,e,f){b=b;if(e!=null)for(var g=0;g0)return;var b=Date.now()-d.$8,c=d.$1.getLastPerformanceEntry();c&&d.$13(c.responseStart-c.requestStart,c.responseEnd-c.requestStart,d.$11);!c&&a.__isresourcetimingbufferfull&&d.$15&&d.$15();d.$3>0&&b>0&&d.$10===0&&d.$11>=d.$3&&d.$28(d.$11,b)};var e=b.stream,f=b.loggerProvider,g=b.byteCountPerSample,h=b.minimumBytesToSampleOnClose,i=b.minimumSampleDuration,j=b.maximumSampleBandwidth,k=b.useResponseTimeMs,l=b.responseTimeHandicapMs,m=b.ignoreOnStreamWriteSamples;b=b.onResourceTimingBufferFull;this.$1=e;this.$17=f;this.$2=g;this.$3=h;this.$4=i;this.$5=j;this.$6=k;this.$7=l;this.$18=m;this.$16.addListener("writableWrite",this.$22);this.$16.addListener("writableClose",this.$23);this.$15=b}var e=b.prototype;e.getTransformStream=function(){return this.$16};e.onBandwidthSample=function(a){this.$12=a};e.onNavigationTimingSample=function(a){this.$13=a};e.onEstimateFromHeaders=function(a){this.$14=a};e.$24=function(a,b,c){b=b-c;c=this.$17?this.$17.getOperationLogger("bandwidth_sampled"):null;if(c){var e=Date.now(),f=e-b;d("oz-player/utils/OzNetworkRequestLoggingUtils").setBandwidthSampledLoggingAttributes(c,this.$1.getLastRequestUrl(),a,this.$1.getLastResponse(),f,e,this.$21);c.log()}this.$12(a,b)};e.$29=function(a,b,c){if(b-c<=0)return!0;c=a*8/(b/1e3);return bthis.$5};e.$28=function(a,b){var d=this.$1.getLastResponse();d=this.$6?c("oz-player/shims/OzNetworkDiagnostics").getResponseTimeMs(d==null?void 0:d.headers)||0:0;this.$29(a,b,d)||this.$24(a,b,Math.max(d-this.$7,0))};e.$25=function(){var a;a=(a=this.$1.getLastResponse())==null?void 0:a.headers;if(this.$20||a==null)return;this.$20=!0;a=c("oz-player/shims/OzNetworkDiagnostics").getBandwidthMeanEstimate(a);a!=null&&this.$14(a)};e.$26=function(){if(this.$19)return;if(this.$21==null){var a=this.$1.getLastResponse();this.$21=c("oz-player/shims/OzNetworkDiagnostics").getUsableResponseSizeForBandwidthEstimation(a==null?void 0:a.headers)||0}this.$21!=null&&this.$21>0&&this.$11>=this.$21&&(this.$19=!0,this.$28(this.$11,Date.now()-this.$9))};e.$27=function(){var a=Date.now(),b=a-this.$8;this.$2>0&&this.$11>=this.$10+this.$2&&!this.$29(this.$11,b,0)&&(this.$24(this.$11-this.$10,b,0),this.$8=a,this.$10=this.$11)};return b}();g["default"]=b}),98); __d("oz-player/networks/bandwidth/pipeStreamThroughBandwidthEstimator",["oz-player/networks/OzNetworkRequestStreamBandwidthReporter"],(function(a,b,c,d,e,f,g){"use strict";var h=2e5;function a(a,b,d,e,f){return{startStream:function(g){var i=new(c("oz-player/networks/OzNetworkRequestStreamBandwidthReporter"))({stream:b,loggerProvider:d,byteCountPerSample:a.getNumber("byte_count_per_sample",h),minimumBytesToSampleOnClose:a.getNumber("minimum_bytes_to_sample_on_close",25e3),minimumSampleDuration:a.getNumber("minimum_bandwidth_sample_duration",10),maximumSampleBandwidth:a.getNumber("maximum_bandwidth_sample_bandwidth",1e8),useResponseTimeMs:a.getBool("bandwidth_use_response_time_adjustment",!1),responseTimeHandicapMs:a.getNumber("bandwidth_response_time_handicap",0),ignoreOnStreamWriteSamples:a.getBool("bandwidth_ignore_on_stream_write_samples",!1),onResourceTimingBufferFull:f});i.onBandwidthSample(function(a,b){e.addBandwidthSample(a,b)});i.onNavigationTimingSample(function(b,c,d){var f=a.getNumber("time_to_first_byte_ignore_above_threshold_ms",0);(f===0||b<=f)&&e.addNavigationTimingSample(b,c,d)});i.onEstimateFromHeaders(function(a){e.setBandwidthEstimateFromHeaders({meanEstimate:a})});return b.startStream(g).then(function(a){return b.retrievedFromCache()?a:a.pipeThrough(i.getTransformStream())})}}}g.pipeStreamThroughBandwidthEstimator=a}),98); __d("oz-player/networks/getOzBandwidthEstimatorPipeThroughReporter",["oz-player/networks/OzNetworkRequestStream","oz-player/networks/bandwidth/pipeStreamThroughBandwidthEstimator"],(function(a,b,c,d,e,f,g){"use strict";function a(a,b){return function(e,f,g,h){var i=a==="video";return f instanceof c("oz-player/networks/OzNetworkRequestStream")&&i?d("oz-player/networks/bandwidth/pipeStreamThroughBandwidthEstimator").pipeStreamThroughBandwidthEstimator(e.getLegacyConfig(),f,g,b,h):f}}g["default"]=a}),98); __d("oz-player/manifests/OzDataSegment",["oz-player/manifests/OzSegmentOptions"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b,d,e,f){this.$6=new(c("oz-player/manifests/OzSegmentOptions"))(),this.$1=a,this.$2=b,this.$3=d,this.$4=e,this.$5=f}var b=a.prototype;b.getData=function(){return null};b.getURI=function(){return this.$1};b.getTimeRange=function(){return{startTime:this.$2,endTime:this.$3}};b.getByteRange=function(){return{startByte:this.$4,endByte:this.$5}};b.getSequenceNumber=function(){return null};b.getOptions=function(){return this.$6};return a}();g["default"]=a}),98); __d("oz-player/shims/www/OzDataViewReaderWWW",["DataViewReader"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("DataViewReader")}),98); __d("oz-player/shims/OzDataViewReader",["oz-player/shims/www/OzDataViewReaderWWW"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("oz-player/shims/www/OzDataViewReaderWWW")}),98); /** * License: https://www.facebook.com/legal/license/k5cmJzUOK4Y/ */ __d("oz-player/parsers/OzMp4SidxParser",["oz-player/manifests/OzDataSegment","oz-player/manifests/OzSegmentOptions","oz-player/shims/OzDataViewReader","oz-player/utils/OzErrorUtils"],(function(a,b,c,d,e,f,g){"use strict";var h=1936286840;function a(a,b,e,f){var g=new(c("oz-player/shims/OzDataViewReader"))(new DataView(f.buffer));f=g.readUint32();var i=g.readUint32();if(i!==h)throw d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SIDX_PARSER",description:'Invalid box type, expected "sidx".'});f==1&&(f=g.readUint64());i=g.readUint8();g.skip(3);g.skip(4);var j=g.readUint32();if(!j)throw d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SIDX_PARSER",description:"Invalid timescale."});var k;i==0?(i=g.readUint32(),k=g.readUint32()):(i=g.readUint64(),k=g.readUint64());g.skip(2);var l=g.readUint16(),m=i,n=e+f+k,o=0,p=a.getBool("sidx_parser_memory_optimization"),q=[];i=function(){var a=g.readUint32(),e=(a&2147483648)>>>31;a=a&2147483647;var f=g.readUint32();g.readUint32();if(e==1)throw d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SIDX_PARSER",description:"Heirarchical SIDXs are not supported."});var h=m/j,i=(m+f)/j;r===0&&(o=h);var k=n,l=k+a-1,s=new(c("oz-player/manifests/OzSegmentOptions"))();q.push(p?new(c("oz-player/manifests/OzDataSegment"))(b,h-o,i-o,k,l):{getData:function(){return null},getURI:function(){return b},getTimeRange:function(){return{startTime:h-o,endTime:i-o}},getByteRange:function(){return{startByte:k,endByte:l}},getSequenceNumber:function(){return null},getOptions:function(){return s}});m+=f;n+=a};for(var r=0;ra)return d}return null};b.getSegmentAfter=function(a){var b=this.$1(),c=b.findIndex(function(b){return b.getTimeRange().startTime===a.getTimeRange().startTime&&b.getTimeRange().endTime===a.getTimeRange().endTime});return c>=0&&c+10?a[a.length-1]:null};b.getMaxGopSec=function(){return null};return a}();g["default"]=a}),98); /** * License: https://www.facebook.com/legal/license/k5cmJzUOK4Y/ */ __d("oz-player/parsers/OzWebmSidxParser",["oz-player/manifests/OzDataSegment","oz-player/shims/OzDataViewReader","oz-player/shims/ozvariant"],(function(a,b,c,d,e,f,g){"use strict";var h=440786851,i=408125543,j=357149030,k=2807729,l=17545,m=475249515,n=187,o=179,p=183,q=241,r=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])];function s(a,b){if(!a&&!b)return!0;if(!a||!b)return!1;if(a.length!=b.length)return!1;for(var c=0;c8)throw new RangeError("EbmlElement: Unsigned integer has too many bytes.");if(this.$1.byteLength==8&&this.$1.getUint8(0)&224)throw new RangeError("EbmlParser: Unsigned integer must be at most 53 bits.");var a=0;for(var b=0;b7)throw new RangeError("EbmlParser: EBML ID must be at most 7 bytes.");var b=0;for(var c=0;c8)throw new RangeError("EbmlParser: Variable sized integer must fit within 8 bytes.");c=new Uint8Array(b);c[0]=a;for(a=1;a=0&&(i>=0||c("oz-player/shims/ozvariant")(0,4010),a.push(new(c("oz-player/manifests/OzDataSegment"))(g,h,k,i,j-1)));h=k;i=j}if(h>=0){i>=0||c("oz-player/shims/ozvariant")(0,4010);k=f;a.push(new(c("oz-player/manifests/OzDataSegment"))(g,h,k,i,null))}return a}function x(a){a=a.createParser();var b=a.parseElement();if(b.id!=o)return null;b=b.getUint();a=a.parseElement();if(a.id!=p)return null;a=a.createParser();var c=0;while(a.hasMoreData()){var d=a.parseElement();if(d.id!=q)continue;c=d.getUint();break}return{unscaledTime:b,relativeOffset:c}}function y(a){a=a.createParser();var b=null;while(a.hasMoreData()){var c=a.parseElement();if(c.id!=j)continue;b=c;break}return!b?null:v(b)}function z(a){a=new u(a);var b=a.parseElement();if(b.id!=h)return null;b=a.parseElement();if(b.id!=i)return null;a=b.getOffset();b=y(b);return!b?null:{segmentOffset:a,timecodeScale:b.timecodeScale,duration:b.duration}}function a(a,b,c,d){d=new DataView(d.buffer);c=new DataView(c.buffer);d=z(d);if(!d)return[];c=new u(c);c=c.parseElement();return c.id!=m?[]:w(a,c,d.segmentOffset,d.timecodeScale,d.duration,b)}g.parse=a}),98); __d("oz-player/parsers/OzSidxSegmentsParser",["oz-player/loggings/OzLoggingUtils","oz-player/manifests/OzSegmentOptions","oz-player/manifests/OzZeroTimeRangeSegment","oz-player/networks/getOzBandwidthEstimatorPipeThroughReporter","oz-player/parsers/OzMp4SidxParser","oz-player/parsers/OzSidxSegmentsContainer","oz-player/parsers/OzWebmSidxParser","oz-player/shims/OzEventEmitter","oz-player/shims/OzMaybeNativePromise","oz-player/shims/OzURI","oz-player/utils/OzErrorEmitter","oz-player/utils/OzReadableStreamUtils"],(function(a,b,c,d,e,f,g){"use strict";function h(a){a=a.split("-");return{startByte:Number.parseInt(a[0],10),endByte:Number.parseInt(a[1],10)}}a=function(){function a(a,b,d,e,f,g,h){this.$6=new(c("oz-player/utils/OzErrorEmitter"))(),this.$7=[],this.$9=new(c("oz-player/shims/OzEventEmitter"))(),this.$1=b,this.$2=new(c("oz-player/shims/OzURI"))(d),this.$3=e,this.$5=f,this.$4=g,this.$8=h.cloneContext().setType(f==="video"||f==="audio"?f+";sidx":"sidx"),this.$10=a}var b=a.prototype;b.onError=function(a){return this.$6.onError(a)};b.parseInitializationSegment=function(){var a=this,b=this.$1.Initialization[0].$.range,d=h(b),e=new(c("oz-player/manifests/OzSegmentOptions"))();return this.$10.getBool("sidx_parser_memory_optimization")?new(c("oz-player/manifests/OzZeroTimeRangeSegment"))(this.$2,d.startByte,d.endByte):{getData:function(){return null},getURI:function(){return a.$2},getTimeRange:function(){return{startTime:0,endTime:0}},getByteRange:function(){return d},getSequenceNumber:function(){return null},getOptions:function(){return e}}};b.parseSegmentsContainer=function(){var a=this,b=this.$11();d("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(b,this.$8,"process_sidx");b["catch"](function(b){a.$6.emitError(b)});return new(c("oz-player/parsers/OzSidxSegmentsContainer"))(function(){return a.$7},this.$9)};b.$12=function(a,b,e){a=new(c("oz-player/manifests/OzZeroTimeRangeSegment"))(a,b.startByte,b.endByte);b=this.$5+";sidx";a=this.$4.request({debugName:"OzSidxSegmentsParser/sidx/"+this.$5,segments:[a],pipeThroughRangeStreamProviders:[c("oz-player/networks/getOzBandwidthEstimatorPipeThroughReporter")(b,this.$4.getBandwidthEstimator())],loggerProvider:this.$8,requestOptions:{networkTimeoutMs:null,retryAttempts_SIDX_USE_ONLY:this.$10.getNumber("sidx_segment_retry_attempts"),retryTimeoutMs_SIDX_USE_ONLY:this.$10.getNumber("sidx_segment_retry_interval_ms")},mediaStreamType:e});b=a.getStream().getReader();return d("oz-player/utils/OzReadableStreamUtils").pumpAllData(b)};b.$11=function(){var a=this,b=this.$1.$.indexRange,e=h(b);b=[this.$12(this.$2,e,null)];if(this.$3==="webm"){var f=h(this.$1.Initialization[0].$.range);b.push(this.$12(this.$2,f,null));f=c("oz-player/shims/OzMaybeNativePromise").all(b).then(function(b){var c=b[0];b=b[1];a.$7=d("oz-player/parsers/OzWebmSidxParser").parse(a.$10,a.$2,c,b)})}else f=b[0].then(function(b){a.$7=d("oz-player/parsers/OzMp4SidxParser").parse(a.$10,a.$2,e.startByte,b)});return f.then(function(){a.$9.emit("segment_updated")})};return a}();g["default"]=a}),98); __d("oz-player/parsers/OzVideoContainerType",[],(function(a,b,c,d,e,f){"use strict";function a(a){return(a.split("/")[1]||"").trim()}f.parse=a}),66); __d("oz-player/parsers/OzRepresentationParserBase",["oz-player/manifests/OzRepresentationBase","oz-player/parsers/OzSegmentTemplateParser","oz-player/parsers/OzSidxSegmentsParser","oz-player/parsers/OzVideoContainerType","oz-player/utils/OzErrorEmitter","oz-player/utils/OzErrorUtils","oz-player/utils/OzMimeUtil"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b,d,e,f,g,h,i,j,k,l,m,n,o,p){this.$9=new(c("oz-player/utils/OzErrorEmitter"))();this.$1=b;this.$2=d;this.$10=f;this.$11=g;this.$13=e;this.$14=a;this.$15=h;this.$3=i;this.$4=j;this.$5=k;this.$6=l!=null?l:null;this.$7=m!=null?m:null;this.$8=n!=null?n:null;this.$16=o;this.$17=p;try{this.$11=this.$11.cloneContext().setRepresentationID(this.parseID())}catch(a){}}var b=a.prototype;b.$18=function(){var a=this,b=this.$12;if(b)return b;if(this.$1.SegmentBase){var e=this.$1.SegmentBase[0],f=this.$1.BaseURL[0]._;if(typeof f!=="string")throw d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_REPRESENTATION_PARSER",description:"Missing representation BaseURL",extra:{code:"OZ_RP-9"}});b=new(c("oz-player/parsers/OzSidxSegmentsParser"))(this.$14,e,f,d("oz-player/parsers/OzVideoContainerType").parse(this.$1.$.mimeType),d("oz-player/utils/OzMimeUtil").getMimeType(this.$1.$.mimeType),this.$10,this.$11);b.onError(function(b){var c;if((c=a.$17)!=null&&c.handleError(a.parseID(),b))return;return a.$9.emitError(b)})}else if(this.$1.SegmentTemplate)b=this.$19(this.$1.SegmentTemplate[0],{isShared:!1});else if(this.$3)b=this.$19(this.$3[0],{isShared:!0});else throw d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_REPRESENTATION_PARSER",description:"Unrecognized representation type",extra:{code:"OZ_RP-7"}});this.$12=b;return b};b.$19=function(a,b){var e;a=a;b.isShared&&(a=babelHelpers["extends"]({},a,{$:babelHelpers["extends"]({},a.$,{initialization:a.$.initialization.replace("$RepresentationID$",this.$1.$.id),media:a.$.media.replace("$RepresentationID$",this.$1.$.id)})}));b=this.$13.mpdUrl;var f=this.$1.BaseURL&&this.$1.BaseURL[0]?this.$1.BaseURL[0]._:null;f=f!=null?f:b;if(f==null)throw d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_REPRESENTATION_PARSER",description:"Missing mpd url for template manifest",extra:{code:"OZ_RP-6"}});var g=this.$13.customSegmentTimelineParser;e=(e=this.$13.customRepresentationParsers)==null?void 0:e.initializationBinary;e=e?e(this.$1):null;return new(c("oz-player/parsers/OzSegmentTemplateParser"))(this.$14,a,{baseUrl:f,mpdUrl:b,isStaticMpd:this.$15.manifestType==="static",isTemplatedMpd:this.$15.manifestIsTemplated},g,e)};b.onError=function(a){return this.$9.onError(a)};b.parseInitSegment=function(){return this.$18().parseInitializationSegment()};b.parseBandwidth=function(){return Number(this.$1.$.bandwidth)};b.parseMimeType=function(){var a;return(a=(a=this.$1.$.mimeType)!=null?a:this.$4)!=null?a:""};b.parseCodecs=function(){var a;return(a=(a=this.$1.$.codecs)!=null?a:this.$5)!=null?a:""};b.parseVariantKey=function(){return this.$6};b.parseLang=function(){return this.$7};b.parseRole=function(){return this.$8};b.parseSegmentsContainer=function(){return this.$18().parseSegmentsContainer()};b.parseID=function(){return""+this.$1.$.id};b.parseCustomFieldFirstSegment=function(){var a=this.$13.customRepresentationParsers?this.$13.customRepresentationParsers.firstSegmentParser:null;return a?a(this.$1):null};b.parse=function(){return new(c("oz-player/manifests/OzRepresentationBase"))(this.$1,this.$2,this.parseID(),this.parseMimeType(),this.parseCodecs(),this.parseVariantKey(),this.parseLang(),this.parseRole(),this.parseInitSegment(),this.parseSegmentsContainer(),this.parseBandwidth(),this.parseCustomFieldFirstSegment(),this.$13.customRepresentationParsers)};return a}();g["default"]=a}),98); __d("oz-player/parsers/OzApplicationRepresentationParser",["oz-player/manifests/OzApplicationRepresentation","oz-player/parsers/OzRepresentationParserBase"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){function b(b,c,d,e,f,g,h,i,j,k,l,m,n,o){b=a.call(this,b,c,d,e,f,g,h,i,j,k,l,m,n,o)||this;b.$OzApplicationRepresentationParser$p_1=c;b.$OzApplicationRepresentationParser$p_3=e;return b}babelHelpers.inheritsLoose(b,a);var d=b.prototype;d.parse=function(){var a=this.$OzApplicationRepresentationParser$p_3.customRepresentationParsers;return new(c("oz-player/manifests/OzApplicationRepresentation"))(this.$OzApplicationRepresentationParser$p_1,this.$OzApplicationRepresentationParser$p_2,this.parseID(),this.parseMimeType(),this.parseCodecs(),this.parseVariantKey(),this.parseLang(),this.parseRole(),this.parseInitSegment(),this.parseSegmentsContainer(),this.parseBandwidth(),this.parseCustomFieldFirstSegment(),a)};return b}(c("oz-player/parsers/OzRepresentationParserBase"));g["default"]=a}),98); __d("oz-player/manifests/OzAudioRepresentation",["oz-player/manifests/OzRepresentationBase"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){function b(b,c,d,e,f,g,h,i,j,k,l,m,n){b=a.call(this,b,c,d,e,f,g,h,i,j,k,l,m,n)||this;b.$OzAudioRepresentation$p_1=d;b.$OzAudioRepresentation$p_2=l;b.$OzAudioRepresentation$p_3={id:d,displayLabel:b.getDisplayLabel(),mimeCodecs:b.getMimeCodecs(),variantKey:g,lang:h,role:i};return b}babelHelpers.inheritsLoose(b,a);var c=b.prototype;c.getBitrateKbps=function(){var a=1024;return(this.$OzAudioRepresentation$p_2/a).toFixed(1)+"Kbps"};c.getDisplayLabel=function(){var b=a.prototype.getLang.call(this),c=a.prototype.getRole.call(this);b=b==null?"Default":b;return c==null?b:b+" - "+c};c.getAudioTrack=function(){return this.$OzAudioRepresentation$p_3};return b}(c("oz-player/manifests/OzRepresentationBase"));g["default"]=a}),98); __d("oz-player/parsers/OzAudioRepresentationParser",["oz-player/manifests/OzAudioRepresentation","oz-player/parsers/OzRepresentationParserBase"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){function b(b,c,d,e,f,g,h,i,j,k,l,m,n,o){b=a.call(this,b,c,d,e,f,g,h,i,j,k,l,m,n,o)||this;b.$OzAudioRepresentationParser$p_1=c;b.$OzAudioRepresentationParser$p_3=e;return b}babelHelpers.inheritsLoose(b,a);var d=b.prototype;d.parse=function(){var a=this.$OzAudioRepresentationParser$p_3.customRepresentationParsers;return new(c("oz-player/manifests/OzAudioRepresentation"))(this.$OzAudioRepresentationParser$p_1,this.$OzAudioRepresentationParser$p_2,this.parseID(),this.parseMimeType(),this.parseCodecs(),this.parseVariantKey(),this.parseLang(),this.parseRole(),this.parseInitSegment(),this.parseSegmentsContainer(),this.parseBandwidth(),this.parseCustomFieldFirstSegment(),a)};return b}(c("oz-player/parsers/OzRepresentationParserBase"));g["default"]=a}),98); __d("oz-player/parsers/OzVideoRepresentationParser",["oz-player/manifests/OzVideoRepresentation","oz-player/parsers/OzRepresentationParserBase"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){function b(b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){b=a.call(this,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p)||this;b.$OzVideoRepresentationParser$p_1=c;b.$OzVideoRepresentationParser$p_2=d;b.$OzVideoRepresentationParser$p_3=e;return b}babelHelpers.inheritsLoose(b,a);var d=b.prototype;d.parse=function(){var a=Number.parseInt(this.$OzVideoRepresentationParser$p_1.$.height,10),b=Number.parseInt(this.$OzVideoRepresentationParser$p_1.$.width,10),d=this.$OzVideoRepresentationParser$p_3.customRepresentationParsers;return new(c("oz-player/manifests/OzVideoRepresentation"))(this.$OzVideoRepresentationParser$p_1,this.$OzVideoRepresentationParser$p_2,this.parseID(),this.parseMimeType(),this.parseCodecs(),this.parseVariantKey(),this.parseLang(),this.parseRole(),this.parseInitSegment(),this.parseSegmentsContainer(),this.parseBandwidth(),this.parseCustomFieldFirstSegment(),d,b,a)};return b}(c("oz-player/parsers/OzRepresentationParserBase"));g["default"]=a}),98); __d("oz-player/utils/OzIbrUtils",["oz-player/networks/OzBandwidthEstimator"],(function(a,b,c,d,e,f,g){"use strict";a=function(a,b,d){var e=c("oz-player/networks/OzBandwidthEstimator").getAdjustedBandwidth(b.getLegacyConfig());a=a.slice(0);a.sort(function(a,b){return a.getBandwidth()-b.getBandwidth()});b=b.getNumber("live_audio_ibr_bandwidth_percentage");b=e*b;for(var f=a.length-1;f>=0;f--)if(a[f].getBandwidth()<=b){d.getOperationLogger("audio_ibr_success").setRepresentationID(a[f].getID()).setReason(e.toString()).log();return a[f]}d.getOperationLogger("audio_ibr_no_op").setReason(e.toString()).log();return null};g.getInitialAudioRepresentation=a}),98); __d("oz-player/parsers/OzMpdParser",["oz-player/manifests/Mpd","oz-player/parsers/OzApplicationRepresentationParser","oz-player/parsers/OzAudioRepresentationParser","oz-player/parsers/OzVideoRepresentationParser","oz-player/utils/OzErrorEmitter","oz-player/utils/OzErrorUtils","oz-player/utils/OzIbrUtils"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a){var b=a.blockedRepresentationsManager,d=a.config,e=a.drmManager,f=a.enableAlternativeAudioTracks,g=a.initialRepresentationIDs,h=a.networkManager,i=a.ozParserContext,j=a.perfLoggerProvider;a=a.useManagedMediaSource;this.$2=new(c("oz-player/utils/OzErrorEmitter"))();this.$5=d;this.$1=h;this.$3=j;this.$4=i;this.$6=e;this.$7=g!=null?g:[];this.$8=b!=null?b:null;this.$9=f;this.$10=a!=null?a:!1;this.$11=!0}var b=a.prototype;b.onError=function(a){return this.$2.onError(a)};b.parse=function(a){var b=this,e=[];a=a;var f=this.$4.createXmlParser().parse(a);f=f.MPD&&f.MPD.length>0?f.MPD[0]:null;if(!f){var g=2e3;throw d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_MPD_PARSER",description:"parsed manifest XML missing MPD node; truncated xml ("+Math.min(g,a.length)+"/"+a.length+"): "+a.substring(0,g)})}g=f.Period&&f.Period.length>0?f.Period[0]:null;if(!g){var h=2e3;throw d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_MPD_PARSER",description:"parsed manifest XML missing Period node; truncated xml ("+Math.min(h,a.length)+"/"+a.length+"): "+a.substring(0,h)})}a=g.AdaptationSet||[];h=this.$12(f);this.$11=h==="static";g=this.$13(f);var i=this.$14(this.$15(a,"video"),{manifestType:h,manifestIsTemplated:g},e),j;this.$9?j=this.$16(this.$15(a,"audio"),{manifestType:h,manifestIsTemplated:g},e).sort(function(a,b){return a.getBandwidth()-b.getBandwidth()}):j=this.$17(this.$18(a,"audio"),c("oz-player/parsers/OzAudioRepresentationParser"),{manifestType:h,manifestIsTemplated:g},e).sort(function(a,b){return a.getBandwidth()-b.getBandwidth()});var k=[];if(this.$5.getBool("vtt_caption_representation")){a=this.$15(a,"application");k=this.$17(a[0],c("oz-player/parsers/OzApplicationRepresentationParser"),{manifestType:h,manifestIsTemplated:g},e)}a=this.$4.mpdUrl;h=new(c("oz-player/manifests/Mpd"))(f,i,j,k,a,this.$19(f),this.$4.customParsers||new Map(),this.$11);if(this.$6){g=this.$6;g.startEME(i,j)}e.forEach(function(a){a.onError(b.$2.emitError)});return h};b.$19=function(a){a=a.$.minimumUpdatePeriod||"";a=/\d+/g.exec(a);if(a&&a.length){a=a[0];return a?Number.parseInt(a,10):null}return null};b.$12=function(a){return a.$.type||"static"};b.$13=function(a){var b;b=(b=this.$4.customParsers)==null?void 0:b.get("isLiveTemplated");if(!b)return!1;b=b(a);return typeof b==="boolean"&&b};b.$18=function(a,b){return a.find(this.$20(b))};b.$15=function(a,b){return a.filter(this.$20(b))};b.$20=function(a){return function(b){if(b.$.mimeType!=null)return b.$.mimeType.indexOf(a)!==-1;b=b.Representation;return b&&b.length>0&&b[0].$.mimeType.indexOf(a)!==-1}};b.$17=function(a,b,c,d){var e=this;if(!a)return[];var f=a.Role;f=f!=null?f:[];f=f[0];var g=f?f.$.value:null;f=a.$.lang;var h=f==="und"?null:f;f=a.$.FBVariantKey;var i=f==="und"?null:f!=null?f:null;return a.Representation.map(function(f){f=new b(e.$5,f,(f=f.ContentProtection)!=null?f:a.ContentProtection,e.$4,e.$1,e.$3,c,a.SegmentTemplate,a.$.mimeType,a.$.codecs,i,h,g,e.$7,e.$8);var j=f.parse();d.push(f);return j})};b.$21=function(a){return this.$10?ManagedMediaSource.isTypeSupported(a):MediaSource.isTypeSupported(a)};b.$14=function(a,b,d){var e=this,f=[],g=new Set();a.filter(Boolean).forEach(function(a,h,i){h=h===i.length-1;for(i of a.Representation){var j,k;if((j=i.$.FBAbrPolicyTags)!=null&&j.includes("avoid_on_abr")&&!h)continue;j=a.Role;j=j!=null?j:[];j=j[0];j=j?j.$.value:null;var l=a.$.lang;l=l==="und"?null:l;var m=a.$.FBVariantKey;m=m==="und"?null:m!=null?m:null;k=new(c("oz-player/parsers/OzVideoRepresentationParser"))(e.$5,i,(k=i.ContentProtection)!=null?k:a.ContentProtection,e.$4,e.$1,e.$3,b,a.SegmentTemplate,a.$.mimeType,a.$.codecs,m,l,j,e.$7,e.$8);m=k.parse();d.push(k);if(!e.$21(m.getMimeCodecs())){g.add(m.getMimeCodecs());continue}f.push(m)}});return f.filter(Boolean)};b.$16=function(a,b,e){var f=this,g=[],h=new Set();a=a.filter(Boolean).map(function(a){var d=a.Role;d=d!=null?d:[];d=d[0];d=d?d.$.value:null;var g=a.$.lang;g=g==="und"?null:g;var i=a.$.FBVariantKey;i=i==="und"?null:i!=null?i:null;var j=[];for(var k of a.Representation){var l;l=new(c("oz-player/parsers/OzAudioRepresentationParser"))(f.$5,k,(l=k.ContentProtection)!=null?l:a.ContentProtection,f.$4,f.$1,f.$3,b,a.SegmentTemplate,a.$.mimeType,a.$.codecs,i,g,d,f.$7);var m=l.parse();e.push(l);if(!f.$21(m.getMimeCodecs())){h.add(m.getMimeCodecs());continue}j.push(m)}return j});a.forEach(function(a){if(a.length>1){var b=d("oz-player/utils/OzIbrUtils").getInitialAudioRepresentation(a,f.$5,f.$3);g.push(b!=null?b:a[0])}else g.push.apply(g,a)});return g.filter(Boolean)};return a}();g["default"]=a}),98); __d("oz-player/utils/OzMpdUtils",[],(function(a,b,c,d,e,f){"use strict";function g(a){var b=null;a.forEach(function(a){if(a){var c=a.endTime;c<((c=(c=b)==null?void 0:c.endTime)!=null?c:Infinity)&&(b=a)}});return b}function a(a,b){b=[];b.push.apply(b,a.getVideoRepresentations().concat(a.getAudioRepresentations()));if(b.length){a=b.map(function(a){a=a.getEndingSegment();return a?a.getTimeRange():null});return g(a)}return null}function b(a){var b=[];b.push.apply(b,a.getVideoRepresentations().concat(a.getAudioRepresentations()));if(b.length){a=b[0].getEndingSegment();if(a)return a.getSequenceNumber()}return null}f.getLeastEndTimeTimeRange=g;f.getMpdLastTimeRange=a;f.getMpdLastSequenceNumber=b}),66); __d("oz-player/utils/OzStreamInterruptChecker",["oz-player/shims/OzEventEmitter","oz-player/utils/OzMpdUtils"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){function b(b,c){var d;d=a.call(this)||this;d.$OzStreamInterruptChecker$p_4=0;d.$OzStreamInterruptChecker$p_5=null;d.$OzStreamInterruptChecker$p_6=!1;d.$OzStreamInterruptChecker$p_2=b;d.$OzStreamInterruptChecker$p_3=c;d.$OzStreamInterruptChecker$p_1=d.$OzStreamInterruptChecker$p_3.getNumber("live_numerical_error_epsilon");return d}babelHelpers.inheritsLoose(b,a);var c=b.prototype;c.notifyMpdUpdated=function(){var a=d("oz-player/utils/OzMpdUtils").getMpdLastTimeRange(this.$OzStreamInterruptChecker$p_2,this.$OzStreamInterruptChecker$p_3),b=a?a.endTime:null,c=!1;b!==null&&(c=b===this.$OzStreamInterruptChecker$p_5);c?this.$OzStreamInterruptChecker$p_4++:(this.$OzStreamInterruptChecker$p_4=0,this.$OzStreamInterruptChecker$p_6&&this.$OzStreamInterruptChecker$p_5!==null&&this.$OzStreamInterruptChecker$p_5!==void 0&&a!==null&&a!==void 0&&this.emit("streamResumedAt",a.startTime),this.$OzStreamInterruptChecker$p_6=!1);c=this.$OzStreamInterruptChecker$p_3.getNumber("stream_interrupt_check_mpd_stale_count_threshold");!this.$OzStreamInterruptChecker$p_6&&c>0&&this.$OzStreamInterruptChecker$p_4>=c&&b!==null&&b!==void 0&&(this.emit("streamInterruptAt",b),this.$OzStreamInterruptChecker$p_6=!0);this.$OzStreamInterruptChecker$p_5=b};return b}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player/parsers/OzMpdUpdater",["oz-player/parsers/OzMpdParser","oz-player/shims/OzEventEmitter","oz-player/shims/OzSubscriptionsHandler","oz-player/shims/OzURI","oz-player/shims/ozClearTimeout","oz-player/shims/ozSetTimeoutAcrossTransitions","oz-player/utils/OzErrorEmitter","oz-player/utils/OzErrorUtils","oz-player/utils/OzMpdUtils","oz-player/utils/OzReadableStreamUtils","oz-player/utils/OzStreamInterruptChecker"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){function b(b,e,f,g,h,i,j,k,l){var m;m=a.call(this)||this;m.$OzMpdUpdater$p_8=new(c("oz-player/utils/OzErrorEmitter"))();m.$OzMpdUpdater$p_10=new(c("oz-player/shims/OzSubscriptionsHandler"))();m.$OzMpdUpdater$p_11=!1;m.$OzMpdUpdater$p_16=0;m.$OzMpdUpdater$p_18=0;m.$OzMpdUpdater$p_19=null;m.$OzMpdUpdater$p_21=!0;m.$OzMpdUpdater$p_22=0;m.$OzMpdUpdater$p_26=function(){var a,b=m.$OzMpdUpdater$p_2.getLocation();m.$OzMpdUpdater$p_21=!1;if(b==null||b==="")return;var e=new(c("oz-player/shims/OzURI"))(b),f=String((a=(a=e.getQueryData().ms)!=null?a:e.getQueryData().msdev)!=null?a:e.getQueryData().mstest);if(!m.$OzMpdUpdater$p_12.isPlaying()){m.setupUpdateLoop();return}var g=m.$OzMpdUpdater$p_5.getOperationLogger("update_manifest").start();m.$OzMpdUpdater$p_28(b).then(function(a){var e,h;m.$OzMpdUpdater$p_18=0;m.$OzMpdUpdater$p_29();m.$OzMpdUpdater$p_7=0;if(m.$OzMpdUpdater$p_21)return;var i=babelHelpers["extends"]({},m.$OzMpdUpdater$p_13,{mpdUrl:b});i=new(c("oz-player/parsers/OzMpdParser"))({config:m.$OzMpdUpdater$p_6,ozParserContext:i,networkManager:m.$OzMpdUpdater$p_1,perfLoggerProvider:m.$OzMpdUpdater$p_5,drmManager:m.$OzMpdUpdater$p_14,initialRepresentationIDs:[],blockedRepresentationsManager:null,enableAlternativeAudioTracks:!1,useManagedMediaSource:m.$OzMpdUpdater$p_23});i.onError(function(a){m.$OzMpdUpdater$p_8.emitError(a),g.setError(a).log()});i=i.parse(a);a=m.$OzMpdUpdater$p_2.isStaticMpd();m.$OzMpdUpdater$p_2.updateWith(i);m.$OzMpdUpdater$p_2.markRefreshed();i.isStaticMpd()&&!a&&m.emit("streamTransitionToStatic");i=d("oz-player/utils/OzMpdUtils").getMpdLastTimeRange(m.$OzMpdUpdater$p_2,m.$OzMpdUpdater$p_6);a=i&&i.endTime!=0?i.endTime:null;i=String((i=(i=m.$OzMpdUpdater$p_2)==null?void 0:i.getCustomField("currentServerTimeMs"))!=null?i:"");e=String((e=(e=m.$OzMpdUpdater$p_2)==null?void 0:e.getCustomField("lastVideoFrameTs"))!=null?e:"");i={currentServerTimeMs:i,ingestLastVideoFrameTs:e,nowMs:String(Date.now())};e=new Set(((e=(e=m.$OzMpdUpdater$p_2)==null?void 0:e.getVideoRepresentations())!=null?e:[]).map(function(a){return a.getCodecs()})).size>1;h=new Set(((h=(h=m.$OzMpdUpdater$p_2)==null?void 0:h.getAudioRepresentations())!=null?h:[]).map(function(a){return a.getCodecs()})).size>1;g.setLiveheadPosition(a).setLiveheadSeqNumMpd(d("oz-player/utils/OzMpdUtils").getMpdLastSequenceNumber(m.$OzMpdUpdater$p_2)).setManifestType(m.$OzMpdUpdater$p_2.isStaticMpd()?"static":"dynamic").setIsMixedCodecManifest(e||h).setIsTemplatedManifest(Boolean(m.$OzMpdUpdater$p_2.getCustomField("isLiveTemplated"))).setPlaybackFbmsParam(f).setUserInfo(i).log();m.$OzMpdUpdater$p_9.notifyMpdUpdated();m.setupUpdateLoop()})["catch"](function(a){m.$OzMpdUpdater$p_29();g.setError(a).log();var c=null;if(d("oz-player/utils/OzErrorUtils").isOzError(a))c=a;else{var e,f=null,h="Caught an unknown error when fetching the manifest.";if(a!=null)if(m.$OzMpdUpdater$p_6.getBool("normalize_mpd_fetch_errors")){var i=d("oz-player/utils/OzErrorUtils").getNormalizedErrorAndCode(a),j=i[0];i[1];c=j}else e=a,f=e.code!=null?String(e.code):null,h=e.name+"; "+e.message+"; "+e.description+";";if(c==null){i={originalError:e,url:b};f!==null&&(i.code=f);c=d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_NETWORK",description:h,extra:i})}}m.$OzMpdUpdater$p_27(c,b)})};var n=e.getMinimumUpdatePeriod();m.$OzMpdUpdater$p_7=0;m.$OzMpdUpdater$p_1=f;m.$OzMpdUpdater$p_2=e;m.$OzMpdUpdater$p_12=g;m.$OzMpdUpdater$p_3=n;m.$OzMpdUpdater$p_5=h.cloneContext().setType("manifest");m.$OzMpdUpdater$p_6=b;m.$OzMpdUpdater$p_13=i;m.$OzMpdUpdater$p_14=j;m.$OzMpdUpdater$p_15=k;m.$OzMpdUpdater$p_23=l;m.$OzMpdUpdater$p_2.addListener("locationUpdated",function(){m.$OzMpdUpdater$p_24(),m.setupUpdateLoop()});m.$OzMpdUpdater$p_9=new(c("oz-player/utils/OzStreamInterruptChecker"))(m.$OzMpdUpdater$p_2,m.$OzMpdUpdater$p_6);m.$OzMpdUpdater$p_10.addSubscriptions(m.$OzMpdUpdater$p_9.addListener("streamResumedAt",function(a){m.emit("streamResumedAt",a)}),m.$OzMpdUpdater$p_9.addListener("streamInterruptAt",function(a){m.emit("streamInterruptAt",a)}));return m}babelHelpers.inheritsLoose(b,a);var e=b.prototype;e.$OzMpdUpdater$p_24=function(){c("oz-player/shims/ozClearTimeout")(this.$OzMpdUpdater$p_4),this.$OzMpdUpdater$p_4=null,this.$OzMpdUpdater$p_25(),this.$OzMpdUpdater$p_21=!0};e.setupUpdateLoop=function(){var a,b=!this.$OzMpdUpdater$p_11;b&&(b=!this.$OzMpdUpdater$p_2.isStaticMpd(),this.$OzMpdUpdater$p_3=this.$OzMpdUpdater$p_2.getMinimumUpdatePeriod());a=this.$OzMpdUpdater$p_17==null&&this.$OzMpdUpdater$p_6.getNumber("manifest_initial_update_delay_ms")>0?this.$OzMpdUpdater$p_6.getNumber("manifest_initial_update_delay_ms"):this.$OzMpdUpdater$p_6.getNumber("manifest_update_frequency_ms")||((a=this.$OzMpdUpdater$p_3)!=null?a:0)*1e3;b&&a&&this.$OzMpdUpdater$p_2.getLocation()&&(this.$OzMpdUpdater$p_4=c("oz-player/shims/ozSetTimeoutAcrossTransitions")(this.$OzMpdUpdater$p_26,a))};e.onError=function(a){return this.$OzMpdUpdater$p_8.onError(a)};e.$OzMpdUpdater$p_27=function(a,b){var c=this;b=!0;var d=this.$OzMpdUpdater$p_18-1,e=a.getExtra().code;this.$OzMpdUpdater$p_19!==e?(this.$OzMpdUpdater$p_19=e,this.$OzMpdUpdater$p_16=1):this.$OzMpdUpdater$p_16++;var f=function(){b=!1};e={endStream:function(){f(),c.$OzMpdUpdater$p_11=!0,c.emit("streamGone")},consecutiveFailuresForErrorCode:this.$OzMpdUpdater$p_16,error:a,isInitialRequest:!1,retry:function(b){c.emit("manifestFetchErrorRetry",a),f(),c.setupUpdateLoop()},retryAttemptCount:d};this.emit("manifestFetchError",e);b&&this.$OzMpdUpdater$p_8.emitError(a)};e.$OzMpdUpdater$p_30=function(a,b){a=new(c("oz-player/shims/OzURI"))(a);a.addQueryData("_nc_expid",b);return a.toString()};e.$OzMpdUpdater$p_31=function(a){if(!this.$OzMpdUpdater$p_15)return a;a=new(c("oz-player/shims/OzURI"))(a);a.addQueryData("_nc_tsid","mpd-"+this.$OzMpdUpdater$p_22++);return a.toString()};e.$OzMpdUpdater$p_28=function(a){this.$OzMpdUpdater$p_25();this.$OzMpdUpdater$p_18++;var b=this.$OzMpdUpdater$p_6.getString("cdn_experiment_id");a=b.length===0?a:this.$OzMpdUpdater$p_30(a,b);a=this.$OzMpdUpdater$p_31(a);b=this.$OzMpdUpdater$p_1.requestRawUrl({debugName:"OzMpdUpdater/requestMpd/mpd",url:a,options:{networkTimeoutMs:this.$OzMpdUpdater$p_6.getNumber("mpd_updater_network_request_timeout_ms")},loggerProvider:this.$OzMpdUpdater$p_5});this.$OzMpdUpdater$p_17=Date.now();this.$OzMpdUpdater$p_20=b;a=b.getStream().getReader();return d("oz-player/utils/OzReadableStreamUtils").pumpString(a)};e.$OzMpdUpdater$p_25=function(){this.$OzMpdUpdater$p_20&&(this.$OzMpdUpdater$p_20.cancel(),this.$OzMpdUpdater$p_18=0),this.$OzMpdUpdater$p_29()};e.$OzMpdUpdater$p_29=function(){this.$OzMpdUpdater$p_20=null};e.destroy=function(){this.$OzMpdUpdater$p_4&&c("oz-player/shims/ozClearTimeout")(this.$OzMpdUpdater$p_4),this.$OzMpdUpdater$p_10.release()};return b}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player/shims/OzXmlParserTrustedTypesHTMLPolicy",["oz-player/shims/www/OzXmlParserTrustedTypesHTMLPolicyWWW"],(function(a,b,c,d,e,f,g){"use strict";g.createTrustedHTMLForDOMParser=d("oz-player/shims/www/OzXmlParserTrustedTypesHTMLPolicyWWW").createTrustedHTMLForDOMParser}),98); __d("oz-player/parsers/OzXmlParserImplDOMParser",["oz-player/shims/OzXmlParserTrustedTypesHTMLPolicy","oz-player/utils/OzErrorUtils"],(function(a,b,c,d,e,f,g){function h(){return{$:{}}}function i(a){var b=h();for(var c=a.attributes,d=0;d0?this.$9[0]:null,f=this.$2.getNumber("clear_buffer_on_seek_epsilon_s");if(e){var g=e.t;e=this.$1.buffered;var h=e.length,i=e.length<=0,j=-1,k=!1;for(var l=0;j<0&&l=e.start(l)&&g+f-1;var m=this.$2.getNumber("clear_buffer_on_seek_nudge_s");l&&j>=0&&j0&&(g=Math.min(g,e.end(j)-m),g=Math.max(g,e.start(j)+m));if(i||l||!k)this.$11&&this.$11.getOperationLogger("seek_to_next_time").setLength(Math.round(g*1e3)).setInitiator("no_clear").log(),a.call(this.$1,g),this.$9.shift(),this.$14(a);else{var n=null;this.$11&&(n=this.$11.getOperationLogger("clear_buffer_before_seek").setLength(Math.round(g*1e3)).setUserInfo({bufferRangesLength:String(h),nudgeSec:String(m)}).start());j=this.$16(Math.max(g-f,0),e.end(h-1)+f);j.then(function(){n&&n.log(),b.$11&&b.$11.getOperationLogger("seek_to_next_time").setLength(Math.round(g*1e3)).setInitiator("after_clear").log(),a.call(b.$1,g),b.$9.shift(),b.$14(a)})["catch"](function(a){n&&n.setError(a).log(),b.$3.emitError(d("oz-player/utils/OzErrorUtils").isOzError(a)?a:d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SOURCE_BUFFER",description:a?a.name+": "+a.message:"Unknown error while clearing the buffer.",extra:{code:c("oz-player/utils/OzCustomErrorCode").SOURCE_BUFFER_MANAGER_CLEAR_RANGE_FAILED,originalError:a}}))})}}else this.$8=null};b.maybeOverwriteVideoCurrentTimeProperty=function(){var a=this,b=Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(this.$1,"currentTime");b=b!=null?b:Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"currentTime");var c=Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(this.$1,"seeking");c=c!=null?c:Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"seeking");var d=b&&typeof b.get==="function"?b.get:null,e=b&&typeof b.set==="function"?b.set:null,f=c&&typeof c.get==="function"?c.get:null;if(d&&e&&f&&Object.defineProperty){try{Object.defineProperty(this.$1,"currentTime",{get:function(){return a.$12(d)},set:function(b){a.$13(e,b)},configurable:!0,enumerable:!0});Object.defineProperty(this.$1,"seeking",{get:function(){return a.$15(f)},configurable:!0,enumerable:!0});b=this.$1.currentTime;this.$1.currentTime=b;this.$1.seeking}catch(a){}this.$17(function(){a.getCurrentTimePropertyOverwriteSuccess()&&Object.defineProperty(a.$1,"currentTime",{get:d,set:e,configurable:!0,enumerable:!0}),a.getSeekingPropertyOverwriteSuccess()&&Object.defineProperty(a.$1,"seeking",{get:f,configurable:!0,enumerable:!0})})}};b.getCurrentTimePropertyOverwriteSuccess=function(){return this.$5&&this.$6};b.getSeekingPropertyOverwriteSuccess=function(){return this.$7};b.$17=function(a){this.$10=a};b.onError=function(a){return this.$3.onError(a)};b.destroy=function(){try{this.$10&&this.$10()}catch(a){}};return a}();g["default"]=a}),98); __d("oz-player/playback_controls/OzSteadyStateManager",["oz-player/shims/ozvariant"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b){this.$1=[],this.$2=a,this.$3=b}var b=a.prototype;b.addSample=function(a){var b,c=Math.floor(Date.now()/(1e3*this.$3)),d=c%this.$2;((b=this.$1[d])==null?void 0:b.bucketNumber)!=c&&(this.$1[d]={bucketNumber:0,val:null});this.$1[d]={bucketNumber:c,val:Math.min(a,(b=this.$1[d].val)!=null?b:a)}};b.min=function(){var a=this,b=Date.now(),d=this.$1.filter(function(c){return c!=null&&c.val!=null&&b-a.$2*1e3*a.$30&&(this.$7=new(c("oz-player/playback_controls/OzSteadyStateManager"))(this.$1.getNumber("steadystate_minbuffer_buckets"),this.$1.getNumber("steadystate_minbuffer_buckets_sec")));g!=null&&(this.$8.addSubscriptions(g.addListener("enterBuffering",function(a){if(a==="in_play"){b.$9=0;(a=b.$7)==null||a.reset()}b.$10=!1;(a=b.$6)==null||a.log();b.$6=null})),this.$8.addSubscriptions(g.addListener("leaveBuffering",function(){b.$9===0&&(b.$9=Date.now()),b.$10=!1})));this.$4=h;this.$5=i;if(this.$16()){this.$8.addSubscriptions((e=c("oz-player/shims/OzDOMEventListener")).listenDOMEvent(this.$4,"timeupdate",c("oz-player/shims/ozThrottle")(function(){b.$17(),b.$18()},this.$1.getNumber("playhead_manager_timeupdate_throttle_ms"))),e.listenDOMEvent(this.$4,"waiting",function(){b.$17()}),e.listenDOMEvent(this.$4,"durationchange",function(){b.$17()}),e.listenDOMEvent(this.$4,"seeking",function(){var a;b.$13=Date.now();b.$11=null;(a=b.$7)==null||a.reset()}),e.listenDOMEvent(this.$4,"playing",function(){b.$13=Date.now(),b.$11=null}),e.listenDOMEvent(h,"pause",function(){var a;return(a=b.$7)==null?void 0:a.reset()}))}}var b=a.prototype;b.enabled=function(){var a=this.$1.getNumber("catchup_timeout_after_buffering_sec");return a===0||this.$9==null||this.$9!==0&&this.$9+a*1e3<=Date.now()};b.isBehindPreferredLiveHeadLatencyWithTolerance=function(){return this.$3.getCurrentTime()this.$1.getNumber("steadystate_minbuffer_sec")};b.getInitialPlayHeadPosition=function(){return this.getLiveHeadTimeSec()-this.getPreferredLiveHeadLatencySec()};b.getLiveHeadTimeSec=function(){var a,b=this.$22();return(b==null||(a=b.getEndingSegment())==null?void 0:a.getTimeRange().endTime)||0};b.$21=function(){return this.$9!=null&&this.$1.getBool("latencymanager_stalled_edgelatency_sec_on")};b.getPreferredLiveHeadLatencySec=function(){var a=this.$21()?this.$1.getNumber("latencymanager_stalled_edgelatency_sec"):this.$1.getNumber("pdash_download_cursor_catchup_threshold_sec");a=this.$23(a);this.$5.getOperationLogger("latency_manager").setPreferredEdgeLatency(a*1e3);return a};b.getPreferredLiveHeadLatencyToleranceSec=function(){return this.$1.getNumber("pdash_download_cursor_catchup_tolerance_sec")};b.shouldEnableManifestTimeRangeCatchup=function(){return!this.$1.getNumber("pdash_download_cursor_catchup_threshold_sec")};b.shouldEnableCursorBasedCatchup=function(){var a=this.$2.getVideoRepresentations()[0];a=a&&a.canPredict();return a&&this.$1.getNumber("pdash_download_cursor_catchup_threshold_sec")>0};b.setEnableCatchup=function(a){var b=this.$14;!this.$14&&a===!0&&(this.$9=null);this.$14=a;this.$1.getBool("fix_live_rewind_user_selected_playback_speed")&&a!==b&&this.$18()};b.$24=function(a,b,c){var d=this.$1.getNumber("playback_speed_min_sharpness_factor");c=a*2/(1+Math.pow(Math.E,-(c-b)*d));return 1-a+c};b.$16=function(){return!this.$1.getBool("playback_speed_latency_adjustment_disabled")&&(this.$1.getNumber("playback_speed_latency_adjustment_rate")>0||this.$1.getNumber("playback_speed_latency_slowdown_adjustment_rate")>0||this.$1.getNumber("playback_speed_latency_speedup_adjustment_rate")>0)};b.$17=function(){var a,b=d("oz-player/utils/OzSourceBufferUtil").getBufferAheadInBufferedRanges(d("oz-player/utils/OzSourceBufferUtil").convertToBufferedTimeRangeArray(this.$4.buffered),this.$3.getCurrentTime(),this.$1).bufferAheadSec;(a=this.$7)==null||a.addSample(b)};b.$18=function(){var a=d("oz-player/utils/OzSourceBufferUtil").getBufferAheadInBufferedRanges(d("oz-player/utils/OzSourceBufferUtil").convertToBufferedTimeRangeArray(this.$4.buffered),this.$3.getCurrentTime(),this.$1),b=a.bufferAheadSec;a=a.bufferedOffset;this.$25(b,a)};b.$25=function(a,b){var c=this.$1.getNumber("playback_speed_enabled_delay_sec"),d=this.$1.getNumber("playback_speed_min_buffer_sec");a>d&&(this.$10=!0);var e=this.$1.getNumber("playback_speed_min_duration_sec"),f=this.$1.getNumber("playback_speed_restore_min_duration_sec"),g=this.$1.getNumber("playback_speed_latency_adjustment_rate"),h=this.$1.getNumber("playback_speed_latency_slowdown_adjustment_rate"),i=this.$1.getNumber("playback_speed_latency_speedup_adjustment_rate");if(this.$4.playbackRate===0){var j;(j=this.$6)==null||j.log();this.$6=null}else if(this.$14&&this.$10&&a0||h>0)&&b===0&&(c===0||this.$13!=null&&this.$13+c*1e30?1-h:this.$24(g,d,a);this.$6==null&&(this.$6=this.$5.getOperationLogger("latency_manager").start().setInitiator("speed_adjustment").setReason("slow").setUserInfo({newPlaybackRate:String(j),oldPlaybackRate:String(this.$4.playbackRate)}));this.$26(j)}else if(this.$14&&this.$10&&(this.$19()||this.$20())&&i>0&&b===0&&(this.$12==null||this.$12+f*1e3(((c=b.getEndingSegment())==null?void 0:c.getTimeRange().endTime)||0)?a:b})};b.$23=function(a){var b,c;if(a<=0)return a;var d=this.$22(),e=d==null||(b=d.getEndingSegment())==null?void 0:b.getTimeRange();if(!e)return a;d=d==null||(c=d.getSegmentByTime((e==null?void 0:e.endTime)-a))==null?void 0:c.getTimeRange();return!d?a:(e==null?void 0:e.endTime)-(d==null?void 0:d.startTime)};b.destroy=function(){this.$8.release()};return a}();g["default"]=a}),98); __d("oz-player/playback_controls/OzPlaybackTimeRangeManager",["oz-player/shims/OzSubscriptionsHandler","oz-player/utils/OzBufferingUtils"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a){var b=this;this.$4=null;this.$5=0;this.$6=0;this.$7=!0;this.$8=0;this.$9=0;this.$10=!1;this.$12=0;this.$13=0;this.$15=new(c("oz-player/shims/OzSubscriptionsHandler"))();this.$17=function(){b.$10!=b.$14.isPlaying()&&(b.$14.isPlaying()&&(b.$11=Date.now()),b.$10=b.$14.isPlaying())};var d=a.video,e=a.config,f=a.mpd,g=a.liveheadFallBehindBlockThreshold,h=a.liveheadFallBehindBlockMargin,i=a.playbackState;a=a.perfLoggerProvider;this.$1=e;this.$2=d;this.$3=f;this.$8=g;this.$9=h;this.$14=i;this.$16=a;this.$1.getNumber("catchup_timeout_after_play_sec")!==0&&this.$15.addSubscriptions(this.$14.addEventListener("play",this.$17),this.$14.addEventListener("pause",this.$17))}var b=a.prototype;b.setTimelineBlockingEnabled=function(a){this.$7=a,this.$7||this.$3.unblockTimeRange()};b.setTimeRangeProvider=function(a){var b=this;this.$4!=null&&this.$4.remove();this.$4=a.addUpdateListener(function(){var c=a.getTimeRanges(),d=0;if(c.length!==0){c=c[c.length-1];d=c.endTime}b.$18(d)})};b.$18=function(a){var b;if(!this.$7)return;if(this.$5===a)return;this.$5=a;if(this.$2.currentTime<=this.$6)return;a=this.$1.getBool("catchup_use_timeline_range_end_time_as_end")?a:this.$2.duration;var c=this.$1.getNumber("overwrite_livehead_fall_behind_block_threshold")!==0?this.$1.getNumber("overwrite_livehead_fall_behind_block_threshold"):this.$8,e=this.$1.getNumber("overwrite_live_time_range_block_margin")!==0?this.$1.getNumber("overwrite_live_time_range_block_margin"):this.$9;this.$17();this.$1.getBool("reset_catchup_timeout_after_play_sec_on_overwrite")&&(this.$13!=e||this.$12!=c)&&(this.$13=e,this.$12=c,this.$11=Date.now());b=this.$1.getNumber("catchup_timeout_after_play_sec")===0||Date.now()-((b=this.$11)!=null?b:0)c){b=[];for(c=0;c0?b-a+g:0}f.computeSeekAhead=a}),66); __d("oz-player/utils/OzTimelineGapUtil",["oz-player/utils/OzNumericalHelper","oz-player/utils/OzNumericalRangeUtil"],(function(a,b,c,d,e,f,g){"use strict";var h=1.5;function a(a,b,c,e){b=b.map(function(a){return{rangeStart:a.startTime,rangeEnd:a.endTime}});return d("oz-player/utils/OzNumericalRangeUtil").findCurrentRangeIndex(c,a,b,e)===-1}function b(a,b,c,e,f){f===void 0&&(f=h);var g=b.map(function(a){return{rangeStart:a.startTime,rangeEnd:a.endTime}});c=d("oz-player/utils/OzNumericalRangeUtil").findCurrentRangeIndex(c,a,g,e);if(c!==-1){g=b[c];return d("oz-player/utils/OzNumericalHelper").lessThanOrEqual(a,g.endTime)&&g.endTime-athis.$3)&&(this.$4=Date.now(),this.$3=this.$2.currentTime,this.$5=!1,this.$6={});this.$6[a]=this.$6[a]==null?1:this.$6[a]+1;var d=this.$4;if(!this.$5&&!this.$2.paused&&d!=null&&d+1e40&&this.$OzPlayheadManager$p_10.add(a);a=this.$OzPlayheadManager$p_1.currentTime;a=d("oz-player/strategies/LiveheadSeekaheadStrategy").computeSeekAhead(a,c);var e=this.$OzPlayheadManager$p_6.getNumber("timeline_offset_threshold");a>0&&(e===0||a0?this.$OzPlayheadManager$p_13:b+this.$OzPlayheadManager$p_13;if(this.$OzPlayheadManager$p_20!=null){var c;b=(c=this.$OzPlayheadManager$p_20)==null?void 0:c.getInitialPlayHeadPosition()}this.$OzPlayheadManager$p_15=!0;if(this.$OzPlayheadManager$p_6.getBool("playhead_manager_clamp_initial_playback_position")){c=(c=this.$OzPlayheadManager$p_5)==null?void 0:c.getTimeRanges();c!=null&&c.length>0&&c[0].startTime>b&&(b=c[0].startTime)}this.$OzPlayheadManager$p_27(b,"initial_playback_position",a);this.emit("initialPlaybackPositionSet",b)}};e.$OzPlayheadManager$p_24=function(a){var b,c,e=this;if(!this.$OzPlayheadManager$p_6.getBool("skip_videobuffer_gaps"))return;if(!this.$OzPlayheadManager$p_17)return;var f=this.$OzPlayheadManager$p_6.getNumber("playhead_manager_buffered_auto_seek_playhead_slack");if(f===0)return;var g=this.$OzPlayheadManager$p_7.getCurrentTime(),h=[];for(var i=0;i=0?i[c]:null,r=function(b){var c=e.$OzPlayheadManager$p_22==null||p==null||e.$OzPlayheadManager$p_22o){this.$OzPlayheadManager$p_27(o,"reverse_jump_over_buffer_gap",a,null,{lastSegmentStartPTS:String(b),last200RequestedUrlDecisionMinTime:String(p),lastSeekTime:String(this.$OzPlayheadManager$p_22)});return}if(q!=null&&c!=k){this.$OzPlayheadManager$p_27(q.rangeStart,"jump_over_buffer_gap_last_dl_range",a,null,{lastSegmentStartPTS:String(b),last200RequestedUrlDecisionMinTime:String(p),lastSeekTime:String(this.$OzPlayheadManager$p_22)});return}}if((d("oz-player/utils/OzTimelineGapUtil").isNearGap(g,h,this.$OzPlayheadManager$p_6,n,m)||d("oz-player/utils/OzTimelineGapUtil").isInGap(g,h,this.$OzPlayheadManager$p_6,n))&&j!==-1&&(l===0||i[j].rangeStart-g0&&Math.abs(f)<=g)return;this.$OzPlayheadManager$p_11.getOperationLogger("playhead_adjustment").setLength(Math.round(a*1e3)).setReason(b).setInitiator(c).setType(d).setUserInfo(babelHelpers["extends"]({},e,{seekAdjustment:String(Math.round(f*1e3))})).log();this.$OzPlayheadManager$p_12(a);b==="initial_playback_position"&&(this.$OzPlayheadManager$p_14=!0)};return b}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player/shims/www/OzUuidWWW",["uuidv4"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("uuidv4")}),98); __d("oz-player/shims/OzUuid",["oz-player/shims/www/OzUuidWWW"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("oz-player/shims/www/OzUuidWWW")}),98); __d("oz-player/states/OzObservedPlaybackState",["oz-player/loggings/OzMultiDestinationPerfLogger","oz-player/shims/OzDOMEventListener","oz-player/shims/OzSubscriptionsHandler"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b,e){var f=this;e===void 0&&(e=new(d("oz-player/loggings/OzMultiDestinationPerfLogger").OzMultiDestinationPerfLoggerProvider)([]));this.$2=new(c("oz-player/shims/OzSubscriptionsHandler"))();this.$4=function(){f.$3.getOperationLogger("pause").setState("paused").log()};this.$5=function(){f.$3.getOperationLogger("playing").setState("playing").log()};this.$1=b;this.$3=e;this.$2.addSubscriptions(c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$1,"pause",this.$4),c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$1,"playing",this.$5))}var b=a.prototype;b.isPlaying=function(){return!this.$1.paused};b.getCurrentTime=function(){return this.$1.currentTime};b.getCurrentTimeUpdateTime=function(){return Date.now()};b.getDuration=function(){return this.$1.duration};b.addEventListener=function(a,b){return c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$1,a,b)};b.destroy=function(){this.$2.release()};return a}();g["default"]=a}),98); __d("oz-player/utils/OzPositionToViewportUtils",[],(function(a,b,c,d,e,f){"use strict";function a(a,b,c){b=b.filter(function(a){a=a.position;if(a==null)return!1;var b=a.y-window.scrollY;return b>=0||(a.height+b)/a.height>c}).sort(function(a,b){return a.position==null||b.position==null?0:a.position.y-b.position.y});return b.findIndex(function(b){return b.video===a})}function b(a){return a.isIntersecting!=null?a.isIntersecting:a.intersectionRatio>0||a.intersectionRect&&(a.intersectionRect.height>0||a.intersectionRect.width>0)}f.determinePositionIndexOfVideoFromViewportVertically=a;f.intersectionObserverEntryIsIntersecting=b}),66); __d("oz-player/states/OzPositionToViewportTracker",["oz-player/shims/OzEventEmitter","oz-player/utils/OzPositionToViewportUtils"],(function(a,b,c,d,e,f,g){"use strict";var h=null,i=.5;a=function(a){function b(b){var c;c=a.call(this)||this;c.$OzPositionToViewportTracker$p_1=[];c.$OzPositionToViewportTracker$p_5=function(a){a.forEach(function(a){var b=c.$OzPositionToViewportTracker$p_1.find(function(b){return a.target===b.video});b!=null&&(d("oz-player/utils/OzPositionToViewportUtils").intersectionObserverEntryIsIntersecting(a)?b.position=c.$OzPositionToViewportTracker$p_7(a):c.$OzPositionToViewportTracker$p_1.map(function(b){a.target===b.video&&(b.position=null)}));c.$OzPositionToViewportTracker$p_1.forEach(function(a){a.positionIndexToViewportVertically=c.$OzPositionToViewportTracker$p_6(a.video)})}),c.emit("state_changed")};c.$OzPositionToViewportTracker$p_2=b;return c}babelHelpers.inheritsLoose(b,a);var c=b.prototype;c.$OzPositionToViewportTracker$p_4=function(){if(this.$OzPositionToViewportTracker$p_3!=null)return;this.$OzPositionToViewportTracker$p_3=new IntersectionObserver(this.$OzPositionToViewportTracker$p_5,{rootMargin:this.$OzPositionToViewportTracker$p_2.getNumber("pixels_above_viewport_to_observe")+"px 0px "+this.$OzPositionToViewportTracker$p_2.getNumber("pixels_below_viewport_to_observe")+"px 0px",threshold:0})};c.registerVideo=function(a){this.$OzPositionToViewportTracker$p_1.push({video:a,position:null,positionIndexToViewportVertically:-1}),this.$OzPositionToViewportTracker$p_4(),this.$OzPositionToViewportTracker$p_3!=null&&this.$OzPositionToViewportTracker$p_3.observe(a)};c.getPositionIndexOfVideoFromViewportVertically=function(a){var b=this.$OzPositionToViewportTracker$p_1.find(function(b){return b.video===a});return b!=null?b.positionIndexToViewportVertically:-1};c.$OzPositionToViewportTracker$p_6=function(a){return d("oz-player/utils/OzPositionToViewportUtils").determinePositionIndexOfVideoFromViewportVertically(a,this.$OzPositionToViewportTracker$p_1,i)};c.$OzPositionToViewportTracker$p_7=function(a){a=a.boundingClientRect;return{x:a.x+window.scrollX,y:a.y+window.scrollY,width:a.width,height:a.height}};b.getInstance=function(a){h==null&&(h=new b(a));return h};c.unregisterVideo=function(a){var b=this,c=[];this.$OzPositionToViewportTracker$p_1.forEach(function(d){d.video===a&&b.$OzPositionToViewportTracker$p_3!=null?b.$OzPositionToViewportTracker$p_3.unobserve(a):c.push(d)});this.$OzPositionToViewportTracker$p_1=c;this.$OzPositionToViewportTracker$p_1.length===0&&this.$OzPositionToViewportTracker$p_3!=null&&(this.$OzPositionToViewportTracker$p_3.disconnect(),this.$OzPositionToViewportTracker$p_3=null)};return b}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player/states/OzPositionToViewport",["oz-player/shims/OzEventEmitter","oz-player/shims/OzSubscriptionsHandler","oz-player/states/OzPositionToViewportTracker"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){function b(b,d){var e;e=a.call(this)||this;e.$OzPositionToViewport$p_1=new(c("oz-player/shims/OzSubscriptionsHandler"))();e.$OzPositionToViewport$p_3=b;e.$OzPositionToViewport$p_2=c("oz-player/states/OzPositionToViewportTracker").getInstance(d);e.$OzPositionToViewport$p_2.registerVideo(b);e.$OzPositionToViewport$p_1.addSubscriptions(e.$OzPositionToViewport$p_2.addListener("state_changed",function(){e.emit("state_changed")}));return e}babelHelpers.inheritsLoose(b,a);var d=b.prototype;d.getPositionIndexOfVideoFromViewportVertically=function(){return this.$OzPositionToViewport$p_3!=null?this.$OzPositionToViewport$p_2.getPositionIndexOfVideoFromViewportVertically(this.$OzPositionToViewport$p_3):-1};d.destroy=function(){this.$OzPositionToViewport$p_3!=null&&this.$OzPositionToViewport$p_2.unregisterVideo(this.$OzPositionToViewport$p_3),this.$OzPositionToViewport$p_3=null};return b}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player/strategies/OzPlaybackConfidenceUtils",[],(function(a,b,c,d,e,f){"use strict";var g=.8;function a(a,b,c,d,e,f){f=Math.min(1,c/d);c=1+(1-f)*e;d=a.getBandwidth()*c;return d>b?g*(b/d):1-(1-g)*d/b}f.getPlaybackConfidence=a}),66); __d("oz-player/strategies/OzAbrManager",["oz-player/networks/OzBandwidthEstimator","oz-player/strategies/OzPlaybackConfidenceUtils","oz-player/utils/OzAbrUtils","oz-player/utils/OzBufferingUtils","oz-player/utils/OzPlaybackRestrictionsUtils"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b,c,d,e,f,g,h,i){this.$2=0,this.$3=Date.now(),this.$4=!1,this.$10=null,this.$1=a,this.$5=b,this.$6=this.$15(b,c),this.$7=d,this.$8=e,this.$11=f,this.$12=g,this.$13=h,this.$14=i,this.$1.getBool("enable_abr_logging")&&this.$14.getOperationLogger("abr_initialized").setResult("success").setUserInfo({newRepresentationIds:c.map(function(a){return a.getID()}).join(","),newCodecs:c.map(function(a){return a.getCodecs()}).join("|"),newDisplayLabels:c.map(function(a){return a.getDisplayLabel()}).join(",")}).setRepresentationID(b.getID()).setType("video").setInitiator("OzAbrManager").log()}var b=a.prototype;b.setSourceBuffer=function(a){this.$9=a};b.$15=function(a,b){var c=this.$1.getNumber("abr_restrict_from_index"),d=this.$1.getNumber("abr_restrict_to_index");if(d===0&&c===0)return b;var e=b.findIndex(function(b){return a.getID()===b.getID()});return e===-1?b:b.filter(function(a,b){return b-e>=c&&b-e<=d})};b.$16=function(a){a=d("oz-player/utils/OzAbrUtils").excludeLargeRepresentations(a,this.$12(),this.$11,{resolutionConstraintFactor:this.$1.getNumber("resolution_constraint_factor")});a=d("oz-player/utils/OzPlaybackRestrictionsUtils").applyVideoPlaybackRestrictions(this.$7,this.$12(),a);return a};b.getBestRepresentation=function(a){var b;a=(a=a==null?void 0:a.length)!=null?a:null;b=(b=(b=this.$9)==null?void 0:b.getSourceBufferState().getBufferedRanges())!=null?b:null;var e=this.$8.getCurrentTime();e=d("oz-player/utils/OzBufferingUtils").getBufferAheadFromCurrentTime(e,b);b=d("oz-player/utils/OzAbrUtils").getReasonToPreventEvaluation(this.$1,this.$4,e,c("oz-player/networks/OzBandwidthEstimator").getSampleCount(),this.$2,this.$3);if(b!=null){this.$10=b;this.$1.getBool("enable_abr_logging")&&this.$14.getOperationLogger("abr_best_representation_selected").setResult("failed").setReason(this.$10).setType("video").setInitiator("OzAbrManager").log();return this.$5}b=Date.now();this.$2=b;var f=c("oz-player/networks/OzBandwidthEstimator").getAdjustedBandwidth(this.$1.getLegacyConfig()),g=this.$16(this.$6);f=this.$17(g,f,e,a);a=g[0];f=f||a;if(this.$18(e,f)){this.$10="high_buffer";this.$1.getBool("enable_abr_logging")&&this.$14.getOperationLogger("abr_best_representation_selected").setResult("failed").setUserInfo({filteredRepresentationIds:g.map(function(a){return a.getID()}).join(",")}).setPreviousRepresentationID(this.$5.getID()).setReason(this.$10).setType("video").setInitiator("OzAbrManager").log();return this.$5}a=this.$5;a!==f&&(this.$4=!0,this.$3=b,this.$5=f);this.$10="bandwidth";this.$1.getBool("enable_abr_logging")&&this.$14.getOperationLogger("abr_best_representation_selected").setResult("success").setUserInfo({filteredRepresentationIds:g.map(function(a){return a.getID()}).join(",")}).setRepresentationID(f.getID()).setPreviousRepresentationID(a==null?void 0:a.getID()).setReason(this.$10).setType("video").setInitiator("OzAbrManager").log();return f};b.$17=function(a,b,c,e){e===void 0&&(e=null);var f=null;for(var g=0;gthis.$1.getNumber("abr_confidence_threshold")&&(!f||f.getBandwidth()0&&a>=c&&this.$5.getBandwidth()>b.getBandwidth()?!0:!1};b.getLastEvaluationReason=function(){return this.$10};b.updateRepresentations=function(a){var b=this,c=this.$6;this.$6=a;var d=this.$6.find(function(a){return a.getDisplayLabel()===b.$5.getDisplayLabel()}),e=this.$5;this.$5=d!=null?d:this.$6[0];this.$1.getBool("enable_abr_logging")&&this.$14.getOperationLogger("abr_representations_updated").setResult("success").setUserInfo({previousRepresentationIds:c.map(function(a){return a.getID()}).join(","),newRepresentationIds:a.map(function(a){return a.getID()}).join(","),newCodecs:a.map(function(a){return a.getCodecs()}).join("|"),newDisplayLabels:a.map(function(a){return a.getDisplayLabel()}).join(",")}).setRepresentationID(this.$5.getID()).setPreviousRepresentationID(e==null?void 0:e.getID()).setReason(this.$10).setType("video").setInitiator("OzAbrManager").log()};return a}();g["default"]=a}),98); __d("oz-player/strategies/getSegmentsCount",[],(function(a,b,c,d,e,f){"use strict";function a(a,b,c,d){var e=0,f=a.getTimeRange().startTime;a=a;var g=a.getTimeRange().startTime;while(a!==null&&g0&&(e=c("oz-player/strategies/getSegmentsCount")(b,d,a,e));return e};return a}();g["default"]=a}),98); __d("oz-player/strategies/OzBandwidthBoundaryStreamSegmentsCountStrategy",["oz-player/networks/OzBandwidthEstimator","oz-player/strategies/OzStaticStreamSegmentsStrategy","oz-player/strategies/getSegmentsCount"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b){this.$1=a,this.$2=b,this.$3=new(c("oz-player/strategies/OzStaticStreamSegmentsStrategy"))(a)}var b=a.prototype;b.isActive=function(a){return!0};b.getSegmentsCount=function(a,b,d){var e=c("oz-player/networks/OzBandwidthEstimator").getBandwidth(this.$1.getLegacyConfig()),f=c("oz-player/networks/OzBandwidthEstimator").getStandardDeviationOfBandwidth(),g=this.$1.getNumber("bandwidth_boundary_standard_deviation_factor"),h=this.$2.some(function(a){a=a.getBandwidth();return Math.abs(a-e)0&&(e=c("oz-player/strategies/getSegmentsCount")(b,d,a,e));return e};b.$5=function(a,b){var c=Infinity;a=a.getByteRange();if(a){var d=a.endByte;if(d!=null){var e=this.$1.getNumber("per_stream_duration_target");d=d-a.startByte;e>1e-5&&d!==0&&(c=Math.ceil(e*b/(d*8)))}}return c};return a}();g["default"]=a}),98); __d("oz-player/strategies/OzBlockedRepresentationsManager",["oz-player/shims/OzEventEmitter","oz-player/shims/ozClearTimeout","oz-player/shims/ozSetTimeoutAcrossTransitions","oz-player/utils/OzErrorUtils"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b){this.$2=new Map(),this.$3=new Set(),this.$4=new Set(),this.$5=new(c("oz-player/shims/OzEventEmitter"))(),this.$6=b===!0,this.$7(a),this.$8(a)}var b=a.prototype;b.isBlocked=function(a){return this.$3.has(a)};b.handleError=function(a,b){if(this.$1!=null&&this.$3.size===this.$1-1)return!1;if(d("oz-player/utils/OzErrorUtils").isOzError(b)&&b.getType()==="OZ_NETWORK"){b=Number(b.getExtra().code);if(!isNaN(b)&&this.$2.has(b)){this.$3.has(a)||this.$9(a,b);return!0}}return!1};b.$9=function(a,b){var d,e=this;this.$3.add(a);(d=this.$5)==null||d.emit("representation_blocked",a);d=this.$2.get(b)||0;if(d>0){var f=c("oz-player/shims/ozSetTimeoutAcrossTransitions")(function(){e.$3["delete"](a),e.$4["delete"](f)},d);this.$4.add(f)}};b.applyRestriction=function(a){var b=this;return a.filter(function(a){return!b.$3.has(a.getID())})};b.onRepresentationBlocked=function(a){return this.$5?this.$5.addListener("representation_blocked",a):{remove:function(){}}};b.setAvailableRepresentationsCount=function(a){this.$1=a};b.destroy=function(){var a;(a=this.$5)==null||a.removeAllListeners();this.$5=null;for(a of this.$4)c("oz-player/shims/ozClearTimeout")(a);this.$4.clear()};b.$7=function(a){var b=this;try{a=JSON.parse(a.getString("block_representation_status_codes_json"));if(Array.isArray(a)){a.forEach(function(a){a=parseInt(a,10);isNaN(a)||b.$2.set(a,-1)});if(this.$6)for(a=500;a<=599;a++)this.$2.set(a,-1)}}catch(a){}};b.$8=function(a){var b=this;try{a=JSON.parse(a.getString("block_representation_status_codes_temporarily_json"));Object.entries(a).forEach(function(a){var c=a[0];a=a[1];c=parseInt(c,10);a=parseInt(a,10);!isNaN(c)&&!isNaN(a)&&b.$2.set(c,a)})}catch(a){}};return a}();g["default"]=a}),98); __d("oz-player/strategies/OzBufferAheadPriorityStrategy",["oz-player/shims/OzEventEmitter","oz-player/shims/OzSubscriptionsHandler","oz-player/shims/ozThrottle","oz-player/utils/OzBufferingUtils"],(function(a,b,c,d,e,f,g){"use strict";var h=6,i=1e3;a=function(a){function b(b,d){var e;e=a.call(this)||this;e.$OzBufferAheadPriorityStrategy$p_3=new(c("oz-player/shims/OzSubscriptionsHandler"))();e.$OzBufferAheadPriorityStrategy$p_5=function(){e.emit("state_changed")};e.$OzBufferAheadPriorityStrategy$p_4=b;e.$OzBufferAheadPriorityStrategy$p_1=d;e.$OzBufferAheadPriorityStrategy$p_3.addSubscriptions(e.$OzBufferAheadPriorityStrategy$p_1.addEventListener("progress",c("oz-player/shims/ozThrottle")(e.$OzBufferAheadPriorityStrategy$p_5,i)),e.$OzBufferAheadPriorityStrategy$p_1.addEventListener("timeupdate",c("oz-player/shims/ozThrottle")(e.$OzBufferAheadPriorityStrategy$p_5,i)));return e}babelHelpers.inheritsLoose(b,a);var e=b.prototype;e.getName=function(){return"buffer_ahead"};e.setSourceBufferState=function(a){if(this.$OzBufferAheadPriorityStrategy$p_2)return;this.$OzBufferAheadPriorityStrategy$p_2=a;this.$OzBufferAheadPriorityStrategy$p_3.addSubscriptions(a.addEventListener("buffer_updated",c("oz-player/shims/ozThrottle")(this.$OzBufferAheadPriorityStrategy$p_5,i)))};e.isActive=function(){return!0};e.getPriority=function(){var a=this.$OzBufferAheadPriorityStrategy$p_2;if(!a)return 1;var b=this.$OzBufferAheadPriorityStrategy$p_1.getCurrentTime();a=a.getBufferedRanges();b=d("oz-player/utils/OzBufferingUtils").getBufferAheadFromCurrentTime(b,a);return b>=h?0:1};e.destroy=function(){this.$OzBufferAheadPriorityStrategy$p_3.release()};return b}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player/strategies/OzBufferAheadTargetStrategy",[],(function(a,b,c,d,e,f){"use strict";a=function(){function a(a){this.$1=a}var b=a.prototype;b.isActive=function(){return!0};b.getBufferTarget=function(){return this.$1.getNumber("buffer_ahead_target")};return a}();f["default"]=a}),66); __d("oz-player/strategies/OzBufferEndLimitStrategy",[],(function(a,b,c,d,e,f){"use strict";a=function(){function a(a,b){this.$1=a,this.$2=b}var b=a.prototype;b.isActive=function(){return!0};b.getBufferTarget=function(){var a=this.$3();return this.$2>=a?this.$2-a:0};b.$3=function(){return this.$1.buffered.length===0?0:this.$1.buffered.end(0)};return a}();f["default"]=a}),66); __d("oz-player/strategies/OzBufferTargetBoundedStreamSegmentsCountStrategy",[],(function(a,b,c,d,e,f){"use strict";a=function(){function a(a,b){this.$1=a,this.$2=b}var b=a.prototype;b.isActive=function(a){return!a.isPlaying()};b.getSegmentsCount=function(a,b,c){a=a.getCurrentTime();var d=this.$1.computeBufferTarget(),e=1,f=b;b=b.getTimeRange().startTime;while(f!==null&&b0?b===-1?a*-1:0:b===-1?-Infinity:-1*b};d.destroy=function(){this.$OzPositionToViewportPriorityStrategy$p_3.release()};return b}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player/strategies/OzPriorityCalculator",["oz-player/shims/OzEventEmitter","oz-player/shims/OzSubscriptionsHandler"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){function b(b){var d;d=a.call(this)||this;d.$OzPriorityCalculator$p_2=new(c("oz-player/shims/OzSubscriptionsHandler"))();d.$OzPriorityCalculator$p_1=b;(b=d.$OzPriorityCalculator$p_2).addSubscriptions.apply(b,d.$OzPriorityCalculator$p_1.map(function(a){return a.addListener("state_changed",function(){d.emit("state_changed",d.compute(),a.getName())})}));return d}babelHelpers.inheritsLoose(b,a);var d=b.prototype;d.setSourceBufferState=function(a){this.$OzPriorityCalculator$p_1.forEach(function(b){return b.setSourceBufferState(a)}),this.emit("state_changed",this.compute(),"source_buffer")};d.compute=function(){var a=this.$OzPriorityCalculator$p_1.reduce(function(a,b){b=b.isActive()?b.getPriority():0;return a+b},0);return Math.max(a,0)};d.destroy=function(){this.$OzPriorityCalculator$p_2.release()};return b}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player/strategies/OzSingleCodecRestriction",[],(function(a,b,c,d,e,f){"use strict";a=function(){function a(){}var b=a.prototype;b.applyRestriction=function(a){if(a.length<=0)return a.slice();var b=new Set(a.map(function(a){return g(a)})),c="av01",d=b.has(c)?c:b.values().next().value;return d==null?a.slice():a.filter(function(a){return g(a)===d})};return a}();function g(a){return a.getMimeCodecs().replace(/\..*$/,"")}f["default"]=a}),66); __d("oz-player/strategies/OzStaleManifestBufferTargetStrategy",[],(function(a,b,c,d,e,f){"use strict";a=function(){function a(a,b){this.$1=b,this.$2=a}var b=a.prototype;b.isActive=function(){return this.$2.getRefreshDate()==null&&this.$1.getNumber("stale_mpd_buffer_ahead_target")>0};b.getBufferTarget=function(){return this.$1.getNumber("stale_mpd_buffer_ahead_target")};return a}();f["default"]=a}),66); __d("oz-player/strategies/OzStartupBufferTargetStrategy",[],(function(a,b,c,d,e,f){"use strict";a=function(){function a(a,b){this.$1=a,this.$3=b}var b=a.prototype;b.isActive=function(){var a=this.$1.isPlaying();a&&(this.$2=!0);return!this.$2};b.getBufferTarget=function(){return this.$3.getNumber("pre_start_buffer_ahead_target")};return a}();f["default"]=a}),66); __d("oz-player/strategies/OzStreamSegmentsCountCalculator",[],(function(a,b,c,d,e,f){"use strict";var g=1;a=function(){function a(a){this.$1=a}var b=a.prototype;b.computeMin=function(a,b,c){var d=Number.MAX_VALUE;for(var e of this.$1)e.isActive(a)&&(d=Math.min(d,e.getSegmentsCount(a,b,c)));return d===Number.MAX_VALUE?g:Math.max(d,g)};return a}();f["default"]=a}),66); __d("oz-player/strategies/OzSupportedMimeCodecsRestriction",[],(function(a,b,c,d,e,f){"use strict";a=function(){function a(a){this.$1=a}var b=a.prototype;b.applyRestriction=function(a){var b=this;return a.filter(function(a){a=b.$1?ManagedMediaSource.isTypeSupported(a.getMimeCodecs()):MediaSource.isTypeSupported(a.getMimeCodecs());return!!a})};return a}();f["default"]=a}),66); __d("oz-player/streams/OzEndOfStreamWatcher",["oz-player/shims/OzEventEmitter","oz-player/shims/ozvariant"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){function b(b,c){var d;d=a.call(this)||this;d.$OzEndOfStreamWatcher$p_1=new Map();d.$OzEndOfStreamWatcher$p_4=!1;d.$OzEndOfStreamWatcher$p_2=b;d.$OzEndOfStreamWatcher$p_3=c;return d}babelHelpers.inheritsLoose(b,a);var d=b.prototype;d.registerMediaStream=function(a){this.$OzEndOfStreamWatcher$p_1.has(a)&&c("oz-player/shims/ozvariant")(0,5191),this.$OzEndOfStreamWatcher$p_1.set(a,!1)};d.notifyRepresentationSwitched=function(a){this.$OzEndOfStreamWatcher$p_1.has(a)||c("oz-player/shims/ozvariant")(0,5192),this.$OzEndOfStreamWatcher$p_1.get(a)===!0&&this.$OzEndOfStreamWatcher$p_1.set(a,!1),this.$OzEndOfStreamWatcher$p_5("end_of_stream_watcher","representation_switched")};d.notifyMediaStreamEnded=function(a,b){this.$OzEndOfStreamWatcher$p_1.has(a)||c("oz-player/shims/ozvariant")(0,5192),this.$OzEndOfStreamWatcher$p_1.set(a,!0),this.$OzEndOfStreamWatcher$p_5("end_of_stream_watcher","media_stream_ended:"+b)};d.$OzEndOfStreamWatcher$p_5=function(a,b){var c=this;if(this.$OzEndOfStreamWatcher$p_3.getBool("do_not_end_stream")){!this.$OzEndOfStreamWatcher$p_4&&this.$OzEndOfStreamWatcher$p_6()&&(this.$OzEndOfStreamWatcher$p_4=!0,this.emit("streamEnd"));return}var d=this.$OzEndOfStreamWatcher$p_2.getReadyState();d==="open"&&this.$OzEndOfStreamWatcher$p_6()&&this.$OzEndOfStreamWatcher$p_2.notifyEndOfStream(a,b).then(function(){c.emit("streamEnd")})["catch"](function(){c.emit("streamEnd")})};d.$OzEndOfStreamWatcher$p_6=function(){if(this.$OzEndOfStreamWatcher$p_1.size===0)return!1;for(var a of this.$OzEndOfStreamWatcher$p_1.values())if(!a)return!1;return!0};d.destroy=function(){this.$OzEndOfStreamWatcher$p_1.clear()};return b}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player/streams/OzHandleUserRepresentationSwitch",["oz-player/shims/OzSubscriptionsHandler","oz-player/shims/ozReportUnexpectedError","oz-player/utils/OzErrorEmitter"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b,d,e,f,g){var h=this;this.$2=new(c("oz-player/utils/OzErrorEmitter"))();this.$5=null;this.$6=new(c("oz-player/shims/OzSubscriptionsHandler"))();this.$1=a;this.$3=b;this.$4=d;this.$7=e;this.$8=g;f.then(function(a){h.$5=a},function(){})["catch"](function(a){c("oz-player/shims/ozReportUnexpectedError")(a,"OzHandleUserRepresentationSwitch SBM promise then - create")});this.$6.addSubscriptions(e.addListener("switchRepresentation",function(a,b){h.$9(a,b)}))}var b=a.prototype;b.destroy=function(){this.$6.release(),this.$6.engage()};b.onError=function(a){return this.$2.onError(a)};b.$9=function(a,b){if(a!=="user")return;a=this.$5;if(a==null)return;var d=this.$7.getRepresentationIDAtTime(this.$3.getCurrentTime()),e;for(var f=0;f=((b==null?void 0:b.getSequenceNumber())||0)}f.isSequenceNumberEqual=a;f.isSequenceNumberGreaterOrEqual=b}),66); __d("oz-player/networks/OzReadableStreamDataReader",["oz-player/networks/OzTransformStream","oz-player/utils/ozConcatUint8Arrays"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){function b(b,c){var d;c===void 0&&(c=null);d=a.call(this)||this;d.$OzReadableStreamDataReader$p_1=[];d.$OzReadableStreamDataReader$p_3=Infinity;d.$OzReadableStreamDataReader$p_4=0;d.$OzReadableStreamDataReader$p_2=b;if(c!=null){b=c.getNumber("stream_reader_max_buffer_len");d.$OzReadableStreamDataReader$p_3=b>0?b:Infinity}return d}babelHelpers.inheritsLoose(b,a);var d=b.prototype;d.onDataWritten=function(a){if(this.$OzReadableStreamDataReader$p_4+a.byteLength>=this.$OzReadableStreamDataReader$p_3){var b=c("oz-player/utils/ozConcatUint8Arrays")(this.$OzReadableStreamDataReader$p_1);b=b.buffer;this.$OzReadableStreamDataReader$p_2(b);this.$OzReadableStreamDataReader$p_1.length=0;this.$OzReadableStreamDataReader$p_4=0}this.$OzReadableStreamDataReader$p_1.push(a);this.$OzReadableStreamDataReader$p_4+=a.byteLength};d.onClose=function(){var a=this.$OzReadableStreamDataReader$p_1,b=c("oz-player/utils/ozConcatUint8Arrays")(a);b=b.buffer;a.length=0;this.$OzReadableStreamDataReader$p_4=0;this.$OzReadableStreamDataReader$p_2(b)};return b}(c("oz-player/networks/OzTransformStream"));g["default"]=a}),98); __d("oz-player/networks/OzStreamingTask",["oz-player/loggings/OzLoggingUtils","oz-player/shims/OzDeferred","oz-player/shims/OzMaybeNativePromise","oz-player/shims/OzPerformance","oz-player/utils/OzErrorUtils","oz-player/utils/OzNetworkRequestLoggingUtils"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b,d){this.$3=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise")),this.$5=!1,this.$9=null,this.$1=this.$2=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise")),this.$6=c("oz-player/shims/OzPerformance").now(),this.$7=b,this.$8=a,this.$9=d}var b=a.prototype;b.run=function(){var a=this.$3.getPromise(),b=this.$7;if(b){var e=c("oz-player/shims/OzPerformance").now()-this.$6;d("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(a,b,"streaming_task",function(){},function(a){a.setTimeToRequestSent(Math.floor(e))})}this.$2.resolve();return a};b.getPromise=function(){return this.$3.getPromise()};b.cancel=function(){this.$3.getPromise()["catch"](function(){}),this.$3.reject(d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_STREAMING_TASK",description:"task cancelled",extra:{code:"OZ_ST-1"}})),this.$5=!0};b.finish=function(){this.$3.resolve()};b.isCancelled=function(){return this.$5};b.addStreamDeferred=function(a,b){var d=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise")),e=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise"));this.$10({createStreamResult:a,changeStatusDeferred:d,createStreamDeferred:e,loggerProviderWithStreamContext:b});b=function(){return e.getPromise()};return{genStream:b,cancel:function(){if(a){var b=a.pausableStream;return b.pauseStream()}},getStatusChangePromise:function(){return d.getPromise()}}};b.$10=function(a){var b=this,e=a.createStreamResult,f=a.changeStatusDeferred,g=a.createStreamDeferred,h=a.loggerProviderWithStreamContext,i=a.loggingPayloads;a=this.$1.getPromise();var j=c("oz-player/shims/OzPerformance").now(),k=this.$1=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise"));k.getPromise()["catch"](function(){});a.then(function(){if(e){var a=e.pausableStream;e.loggingPayloads&&(i=e.loggingPayloads);g.resolve(a.getStream());b.$4=a;var f=c("oz-player/shims/OzPerformance").now(),k=b.$11(a.startStream());if(h){var l=function(c){var e=i;if(e){d("oz-player/utils/OzNetworkRequestLoggingUtils").setFetchStreamLoggingAttributes(c,e.getRequestUrl(),e.segments,f-j,a.getBytesStreamed(),e.getResponse());var g=b.$9;g&&g(c,e.getRequestUrl(),e.getResponse())}};d("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(k,h,"fetch_stream",l,l)}return k}return null}).then(function(a){b.$4=null,k.resolve(),f.resolve(a||"cancelled")})["catch"](function(a){b.$4=null,b.$3.reject(a),k.reject(a),f.reject(a)})};b.$11=function(a){return a.then(function(a){a=a.statusPromise;return a.then(function(a){return a==="stream_done"?"done":"error"})})};return a}();g["default"]=a}),98); __d("oz-player/scheduling/OzRoundRobinPriorityTaskQueue",["oz-player/shims/ozReportUnexpectedError"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b){b===void 0&&(b=-1),this.$3=function(){},this.$4=[],this.$5=new Map(),this.$1=a,this.$2=b}var b=a.prototype;b.getHighestPriority=function(){return Math.max.apply(Math,this.$4.map(function(a){return a.queue.length?a.priority:-Infinity}))};b.enqueue=function(a,b){var d=this;b=b;b=this.$6(b);var e=this.$5.get(a);if(e===b)return;this.$5.has(a)&&this.remove(a);e=this.$7(b);var f=this.$4[e];f&&f.priority===b||(f={priority:b,queue:[]},this.$4.splice(e,0,f));this.$5.set(a,b);f.queue.push(a);a.getPromise().then(function(){d.remove(a)},function(){d.remove(a)})["catch"](function(a){c("oz-player/shims/ozReportUnexpectedError")(a,"OzRoundRobinPriorityTaskQueue remove after task run")});this.$3(a,b>=this.$1?"immediate":"normal")};b.updatePriority=function(a,b){if(!this.$5.has(a))return;this.enqueue(a,b)};b.dequeue=function(){for(var a=0;a-1&&b.queue.splice(c,1)}this.$5["delete"](a)}};b.setOnTaskUpdated=function(a){this.$3=a};b.clearOnTaskUpdated=function(){this.setOnTaskUpdated(function(){})};b.getLength=function(){return this.$5.size};b.test_isEmpty=function(){return this.$5.size===0&&this.$4.every(function(a){return a.queue.length===0})};b.$7=function(a){a=a;a=this.$6(a);var b;for(b=0;b=this.$4[b].priority)return b;return b};b.$6=function(a){a=a;this.$2>=0&&(a=Number.parseFloat(a.toFixed(this.$2)));return a};return a}();g["default"]=a}),98); __d("oz-player/scheduling/OzSequentialTaskScheduler",["oz-player/shims/OzMaybeNativePromise","oz-player/shims/ozReportUnexpectedError","oz-player/shims/ozSetTimeoutAcrossTransitions"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b){this.$3=0;this.$1=a;a=b||{};b=a.taskTimeout;this.$4=b||0}var b=a.prototype;b.start=function(){this.$1.setOnTaskUpdated(this.$5.bind(this));var a=this.$1.dequeue();a&&this.$6(a,"immediate")};b.destroy=function(){this.$2&&this.$2.cancel(),this.$1.clearOnTaskUpdated()};b.$5=function(a,b){b=this.$6(a,b);b&&this.$1.remove(a)};b.$6=function(a,b){var d=this;if(this.$2&&b!=="immediate")return!1;this.$2&&this.$2.cancel();b=a.run()["catch"](function(a){});this.$4>0&&(b=c("oz-player/shims/OzMaybeNativePromise").race([b,new(c("oz-player/shims/OzMaybeNativePromise"))(function(a,b){c("oz-player/shims/ozSetTimeoutAcrossTransitions")(a,d.$4)})]));this.$3++;this.$2=a;b=b.then(function(){d.$3--;d.$2===a&&(d.$2=null);if(d.$3===0){var b=d.$1.dequeue();b&&d.$6(b,"immediate")}});b["catch"](function(a){c("oz-player/shims/ozReportUnexpectedError")(a,"OzSequentialTaskScheduler task complete")});return!0};return a}();g["default"]=a}),98); __d("oz-player/networks/OzStreamingTaskQueueProvider",["oz-player/scheduling/OzRoundRobinPriorityTaskQueue","oz-player/scheduling/OzSequentialTaskScheduler"],(function(a,b,c,d,e,f,g){"use strict";var h=new Map(),i=new Map(),j=2,k=2,l=6e4;function a(a){var b=h.get(a);if(!b){b=new(c("oz-player/scheduling/OzRoundRobinPriorityTaskQueue"))(j,k);var d=new(c("oz-player/scheduling/OzSequentialTaskScheduler"))(b,{taskTimeout:l});h.set(a,b);i.set(a,d);d.start()}return b}g.OZ_QUEUE_MAX_PRIORITY=j;g.getQueue=a}),98); __d("oz-player/networks/OzStreamingTaskStateManager",["Promise","oz-player/networks/OzStreamingTask","oz-player/networks/OzStreamingTaskQueueProvider","oz-player/networks/getOzBandwidthEstimatorPipeThroughReporter","oz-player/shims/OzSubscriptionsHandler"],(function(a,b,c,d,e,f,g){"use strict";var h;a=function(){function a(a){var b=this;this.$3=new(c("oz-player/shims/OzSubscriptionsHandler"))();this.$4=0;this.$9=!1;this.$10=null;var e=a.mimeType,f=a.priorityCalculator,g=a.loggerProvider,h=a.setCustomFetchStreamLoggingAttributes,i=a.config;a=a.bandwidthEstimator;this.$5=e;this.$1=f;this.$6=d("oz-player/networks/OzStreamingTaskQueueProvider").getQueue(this.$5);this.$7=g;this.$8=i;this.$11=a!=null?a:null;this.$10=h;this.$3.addSubscriptions(this.$1.addListener("state_changed",function(a,c){b.$12(a,c),b.$2&&b.$6.updatePriority(b.$2,b.$4)}))}var e=a.prototype;e.$13=function(){var a=[];a.push(c("oz-player/networks/getOzBandwidthEstimatorPipeThroughReporter")(this.$5,this.$11));return a};e.startStreamDeferred=function(a){var b=a.debugName,c=a.segments,d=a.networkManager,e=a.segmentsLoggerProvider,f=a.mediaStreamType,g=a.dataAppendedCallback;a=a.dataAppendedErrorCallback;var h=this.$14(e),i=this.$13();c.length>0?d=d.createPausableStream({debugName:b,segments:c,pipeThroughRangeStreamProviders:i,loggerProvider:e,mediaStreamType:f,dataAppendedCallback:g,dataAppendedErrorCallback:a}):d=null;this.$9=!0;b=h.addStreamDeferred(d,e);return{genStream:b.genStream,cancel:b.cancel,getStatusChangePromise:this.$15(b.getStatusChangePromise)}};e.$14=function(a){var b=this.$2;this.$12(this.$1.compute(),"start_stream");!b||b.isCancelled()?(b=this.$2=new(c("oz-player/networks/OzStreamingTask"))(this.$8,a,this.$10),this.$6.enqueue(b,this.$4)):this.$6.updatePriority(b,this.$4);return b};e.$15=function(a){var c=this;return function(){return a().then(function(a){c.$16();return a})["catch"](function(a){c.$16();return(h||(h=b("Promise"))).reject(a)})}};e.finishTaskIfNoOngoingStream=function(){this.$9||this.$17()};e.destroy=function(){this.$3.release();var a=this.$2;this.$2=null;a&&this.$6.remove(a)};e.$16=function(){this.$9=!1,this.$12(this.$1.compute(),"end_stream"),this.$40&&d.getCurrentTime()=a});return b!=null&&b.length>0?b[0]:null}f.getRangeForTime=a}),66); __d("oz-player/streams/OzSegmentLocator",["oz-player/utils/OzNumericalRangeUtil","oz-player/utils/OzRangeUtils"],(function(a,b,c,d,e,f,g){"use strict";function a(a){a=a.getEndingSegment();return a!=null&&a.getSequenceNumber()!=null?a.getSequenceNumber():0}var h=function(a,b){a=a.getCurrentTime();return b?d("oz-player/utils/OzRangeUtils").getRangeForTime(a,b.getBufferedRanges()):null},i=function(a,b,c){b=h(a,b);c=c?c.getTimeRange().endTime:0;a=a.getCurrentTime()||0;c?a=c:b&&(a=b.endTime);return a};b=function(a,b,c,e,f,g,h,j){h=a.getPredictedSegmentAfter(g);if(h&&b.isPlaying())return h;j=i(b,e,g);h=f.getTimeRanges();e=d("oz-player/utils/OzNumericalRangeUtil").findDiffCoveredByRanges(b.getCurrentTime(),j,h.map(function(a){return{rangeStart:a.startTime,rangeEnd:a.endTime}}));if(e>c)return null;g=a.getSegment(0);g&&g.getTimeRange().startTime>j&&(j=g.getTimeRange().startTime);return a.getSegmentByTime(j)};g.getEndingSequenceNumber=a;g.getTimeToQuery=i;g.getSegment=b}),98); __d("oz-player/streams/OzSegmentUtils",["oz-player/manifests/OzSegmentOptions","oz-player/shims/OzURI"],(function(a,b,c,d,e,f,g){"use strict";function a(a){return a.reduce(function(a,b){var c;return((c=b==null?void 0:b.getSequenceNumber())!=null?c:0)>((c=a==null?void 0:a.getSequenceNumber())!=null?c:0)?b:a})}function b(a,b){var d=new(c("oz-player/manifests/OzSegmentOptions"))();return a.getPredictedSegmentAfter({getData:function(){return null},getByteRange:function(){return null},getSequenceNumber:function(){return b-1},getTimeRange:function(){return{endTime:0,startTime:0}},getURI:function(){return new(c("oz-player/shims/OzURI"))("")},getOptions:function(){return d}})}function d(a){a.getOptions().setSegmentNumDecisionTime(Date.now());return a}g.getMaxSegment=a;g.getSegmentForSequenceNumber=b;g.markSegmentCreateTime=d}),98); __d("oz-player/utils/OzTaggedTimeRanges",[],(function(a,b,c,d,e,f){a=function(){function a(a){this.$1=[],this.$2=0,this.$3=0,this.$4=a?a:function(a,b){return a===b}}var b=a.prototype;b.add=function(a,b,c){if(b=this.$1[f].startTime&&(d=f+1);b<=this.$1[f].endTime&&(e=f);if(b=b.startTime&&(this.$1.splice(a-1,2,{startTime:c.startTime,endTime:Math.max(b.endTime,c.endTime),tag:b.tag}),a--):(c.endTime>b.startTime&&c.startTime===b.startTime?(this.$1.splice(a-1,1),a--):c.endTime>b.startTime&&this.$1.splice(a-1,1,{startTime:c.startTime,endTime:b.startTime,tag:c.tag}),c.endTime>b.endTime&&this.$1.splice(a+1,0,{startTime:b.endTime,endTime:c.endTime,tag:c.tag})));c=null;a!==this.$1.length-1&&(c=this.$1[a+1]);c&&(this.$4(c.tag,b.tag)?c.startTime<=b.endTime&&this.$1.splice(a,2,{startTime:b.startTime,endTime:Math.max(c.endTime,b.endTime),tag:b.tag}):c.startTime<=b.endTime&&(c.endTime=this.$3?this.$2:0,c=null;for(b=b;b0:!1)?b="no_reset_anchor":(b="reset_anchor",e.$OzMediaStream$p_41=Date.now(),e.$OzMediaStream$p_9!=null&&(e.$OzMediaStream$p_48(),e.$OzMediaStream$p_31=!1,e.$OzMediaStream$p_24&&e.$OzMediaStream$p_24.resolve()));e.$OzMediaStream$p_18.cloneContext().getOperationLogger("media_element_event").setInitiator("seeking").setLength(a*1e3).setReason(b).setUserInfo({streamAnchorSegmentNumber:String((a=e.$OzMediaStream$p_9)==null?void 0:a.getSequenceNumber())}).log()}));e.$OzMediaStream$p_40!=null&&e.$OzMediaStream$p_17.addSubscriptions(e.$OzMediaStream$p_40.onRepresentationBlocked(function(a){return e.$OzMediaStream$p_49(a)}));e.$OzMediaStream$p_21=d("oz-player/utils/OzMimeUtil").getMimeType(o.getMimeCodecs());e.$OzMediaStream$p_30=new(c("oz-player/networks/OzStreamingTaskStateManager"))({mimeType:e.$OzMediaStream$p_21,priorityCalculator:e.$OzMediaStream$p_27,loggerProvider:e.$OzMediaStream$p_18,setCustomFetchStreamLoggingAttributes:e.$OzMediaStream$p_39,config:e.$OzMediaStream$p_1,bandwidthEstimator:e.$OzMediaStream$p_12.getBandwidthEstimator()});e.$OzMediaStream$p_23=new(c("oz-player/streams/OzMediaStreamLoopDriver"))(e,e.$OzMediaStream$p_18);e.$OzMediaStream$p_50(o);return e}babelHelpers.inheritsLoose(b,a);var e=b.prototype;e.start=function(){this.$OzMediaStream$p_23.start()};e.getCurrentRepresentation=function(){return this.$OzMediaStream$p_8};e.switchRepresentation=function(a,b){b===void 0&&(b=null),this.$OzMediaStream$p_50(a,"user",b)};e.onError=function(a){return this.$OzMediaStream$p_33.onError(a)};e.updateRunTimeConfigs=function(a){var b=a.streamDataHandler;a=a.resetStreamAnchor;b!==void 0&&(this.$OzMediaStream$p_34=b);a===!0&&this.$OzMediaStream$p_8.canApproximateId()&&(this.$OzMediaStream$p_48(),this.$OzMediaStream$p_10=null)};e.$OzMediaStream$p_50=function(a,b,e){var f=this;b===void 0&&(b="internal");e===void 0&&(e=null);if(a==null){if(this.$OzMediaStream$p_1.getBool("no_rep_to_switch_fallback_progressive")){var g=d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_NO_AVAILABLE_REP_TO_SWITCH",description:"No available representation to switch to because all are blocked"});this.$OzMediaStream$p_33.emitError(g)}return}b==="user"&&this.$OzMediaStream$p_48();(g=this.$OzMediaStream$p_20)==null||g.remove();this.$OzMediaStream$p_20=null;g=this.$OzMediaStream$p_18.cloneContext().setType(this.$OzMediaStream$p_21+";init");var h=g.cloneContext().setRepresentationID(a.getID()),i=a.getInitSegment(),j=i.getData(),k=g.getOperationLogger("stream_switch").setPreviousRepresentationID(this.$OzMediaStream$p_8?this.$OzMediaStream$p_8.getID():null).setInitiator(b).setRepresentationID(a.getID()).setReason(b==="internal"?this.$OzMediaStream$p_16&&this.$OzMediaStream$p_16.getLastEvaluationReason():b).start();this.$OzMediaStream$p_8=a;g=function(){var a;k.log();f.$OzMediaStream$p_26.handleEvent("append_succeeded");f.emit("initAppended");(a=f.$OzMediaStream$p_14)==null||a.notifyRepresentationSwitched(f)};var l=function(b){var c;k.setError(b).log();f.$OzMediaStream$p_51(b);(c=f.$OzMediaStream$p_40)==null||c.handleError(a.getID(),b);if(a.getID()!==f.$OzMediaStream$p_8.getID()){(c=f.$OzMediaStream$p_24)==null||c.resolve()}};if(j==null){i=this.$OzMediaStream$p_12.request({debugName:"OzMediaStream/init/"+this.$OzMediaStream$p_44,segments:[i],pipeThroughRangeStreamProviders:[c("oz-player/networks/getOzBandwidthEstimatorPipeThroughReporter")(this.$OzMediaStream$p_21,this.$OzMediaStream$p_12.getBandwidthEstimator())],loggerProvider:h,requestOptions:null,mediaStreamType:this.$OzMediaStream$p_44,dataAppendedCallback:g,dataAppendedErrorCallback:l});j=i.getStream()}this.emit("switchRepresentation",b,a);this.$OzMediaStream$p_52({data:j,mimeCodecs:a.getMimeCodecs(),clearSourceBufferRange:e,dataAppendedCallback:g,dataAppendedErrorCallback:l,loggerProvider:h.cloneContext(),appendTarget:0});if(e){i=a.getSegmentByTime(e[0]);if(i){b=this.$OzMediaStream$p_12.request({debugName:"OzMediaStream/startingSegment/"+this.$OzMediaStream$p_44,segments:[i],pipeThroughRangeStreamProviders:[c("oz-player/networks/getOzBandwidthEstimatorPipeThroughReporter")(this.$OzMediaStream$p_21,this.$OzMediaStream$p_12.getBandwidthEstimator())],loggerProvider:h,requestOptions:null,mediaStreamType:this.$OzMediaStream$p_44,dataAppendedCallback:g,dataAppendedErrorCallback:l});j=b.getStream();this.$OzMediaStream$p_52({data:j,mimeCodecs:a.getMimeCodecs(),clearSourceBufferRange:null,dataAppendedCallback:g,dataAppendedErrorCallback:l,loggerProvider:h.cloneContext(),appendTarget:1})}}};e.getLoopInterval=function(){return this.$OzMediaStream$p_22};e.execute=function(){var a=this.$OzMediaStream$p_53();if(a){var b=this.$OzMediaStream$p_24=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise"));a.then(function(){return b.resolve()})["catch"](function(a){return b.reject(a)});return b.getPromise()}return null};e.$OzMediaStream$p_54=function(a){if(this.$OzMediaStream$p_16&&this.$OzMediaStream$p_29&&this.$OzMediaStream$p_15){a=this.$OzMediaStream$p_16.getBestRepresentation(a);if(this.$OzMediaStream$p_8!==a)return a}return null};e.$OzMediaStream$p_55=function(a){var b=this.$OzMediaStream$p_6?this.$OzMediaStream$p_6.getSourceBufferState():null,c=this.$OzMediaStream$p_26.computeBufferTarget();if(c<=0)return null;var e=null;a&&(e=this.$OzMediaStream$p_8.getCustomFieldFirstSegment());if(!e&&this.$OzMediaStream$p_8.canPredict()&&this.$OzMediaStream$p_36!=null){a=this.$OzMediaStream$p_35&&this.$OzMediaStream$p_7.isPlaying();return this.$OzMediaStream$p_36.getSegment(this.$OzMediaStream$p_8,this.$OzMediaStream$p_7,c,b,this.$OzMediaStream$p_9,this.$OzMediaStream$p_10,this.$OzMediaStream$p_1,a,this.$OzMediaStream$p_21)}else{e||(e=d("oz-player/streams/OzSegmentLocator").getSegment(this.$OzMediaStream$p_8,this.$OzMediaStream$p_7,c,b,this.$OzMediaStream$p_8,this.$OzMediaStream$p_9,this.$OzMediaStream$p_1,this.$OzMediaStream$p_32));if(this.$OzMediaStream$p_8.canPredict()){a=this.$OzMediaStream$p_10&&this.$OzMediaStream$p_10.getSequenceNumber()||0;c=e&&e.getSequenceNumber()||0;if(e&&this.$OzMediaStream$p_10&&a>=c){c=d("oz-player/streams/OzSegmentLocator").getEndingSequenceNumber(this.$OzMediaStream$p_8);return(c||0)>=a?this.$OzMediaStream$p_10:null}}}if(!e&&!this.$OzMediaStream$p_56()){c=this.$OzMediaStream$p_8.getEndingSegment();if(c&&this.$OzMediaStream$p_8.isEndingSegment(c)){a=c.getTimeRange().endTime;b=d("oz-player/streams/OzSegmentLocator").getTimeToQuery(this.$OzMediaStream$p_7,b,this.$OzMediaStream$p_9);b>=a&&!this.$OzMediaStream$p_56()&&(e=c)}}return e};e.$OzMediaStream$p_57=function(){return!this.$OzMediaStream$p_15};e.$OzMediaStream$p_58=function(a,b){var e;e=(e=b.fetchSingleSegment)!=null?e:!1;b=(b=b.preventRepresentationSwitch)!=null?b:!1;var f=[];if(e)f=[a];else{e=this.$OzMediaStream$p_28.computeMin(this.$OzMediaStream$p_7,a,this.$OzMediaStream$p_8);f=d("oz-player/strategies/OzStreamLengthStrategy").getStreamingSegments(this.$OzMediaStream$p_1,e,this.$OzMediaStream$p_8,this.$OzMediaStream$p_7,a);f=c("oz-player/networks/OzNetworkManager").getStreamableSegmentsRange(f);if(!b){e=this.$OzMediaStream$p_54(f);if(e){this.$OzMediaStream$p_50(e);a=this.$OzMediaStream$p_55(!1);if(!a)return[];else return this.$OzMediaStream$p_58(a,{fetchSingleSegment:!1,preventRepresentationSwitch:!0})}}}return f};e.$OzMediaStream$p_59=function(){var a=this,b=function(b){b==null||b.remove(),a.$OzMediaStream$p_20===b&&(a.$OzMediaStream$p_20=null)};b(this.$OzMediaStream$p_20);var d=null;return new(c("oz-player/shims/OzMaybeNativePromise"))(function(c,e){d=a.getCurrentRepresentation().addUpdateListener(function(){b(d),c()}),a.$OzMediaStream$p_20=d})["catch"](function(a){b(d);throw a})};e.$OzMediaStream$p_53=function(){var a=this,b=this.$OzMediaStream$p_6?this.$OzMediaStream$p_6.getSourceBufferState():null;if(this.$OzMediaStream$p_8.canPredict()&&this.$OzMediaStream$p_10&&this.$OzMediaStream$p_8.isEndingSegment(this.$OzMediaStream$p_10)){this.endStream("pdash_ending_segment_had_error");this.$OzMediaStream$p_18.cloneContext().getOperationLogger("media_loop_end").setInitiator("end1").setRepresentationID(this.$OzMediaStream$p_8.getID()).log();return}if(this.$OzMediaStream$p_8.canPredict()&&this.$OzMediaStream$p_9&&this.$OzMediaStream$p_8.isEndingSegment(this.$OzMediaStream$p_9)){this.endStream("pdash_anchor_segment_is_ending_segment");this.$OzMediaStream$p_18.cloneContext().getOperationLogger("media_loop_end").setInitiator("end2").setRepresentationID(this.$OzMediaStream$p_8.getID()).log();return}var e=this.$OzMediaStream$p_57(),f=this.$OzMediaStream$p_55(e);if(this.$OzMediaStream$p_8.canPredict()&&this.$OzMediaStream$p_11!=null&&d("oz-player/manifests/IOzSegment").isSequenceNumberGreaterOrEqual(f,this.$OzMediaStream$p_11)){this.$OzMediaStream$p_18.cloneContext().getOperationLogger("media_loop_end").setInitiator("segment_end").setRepresentationID(this.$OzMediaStream$p_8.getID()).log();return}d("oz-player/manifests/IOzSegment").isSequenceNumberEqual(f,this.$OzMediaStream$p_37)?this.$OzMediaStream$p_38++:this.$OzMediaStream$p_38=0;this.$OzMediaStream$p_37=f;this.$OzMediaStream$p_7.isPlaying()&&this.$OzMediaStream$p_38>0&&this.$OzMediaStream$p_18.cloneContext().getOperationLogger("get_segment_to_stream_same_segment").setReason((f==null?void 0:f.getSequenceNumber())!=null?String(f==null?void 0:f.getSequenceNumber()):null).setLength(this.$OzMediaStream$p_38).setRepresentationID(this.$OzMediaStream$p_8.getID()).setSegmentStartTime(f==null?void 0:f.getTimeRange().startTime).setSegmentEndTime(f==null?void 0:f.getTimeRange().endTime).log();if(this.$OzMediaStream$p_31){var g;this.$OzMediaStream$p_22=h;this.$OzMediaStream$p_18.cloneContext().getOperationLogger("media_loop_end").setInitiator("ongoing_stream").setReason(((g=this.$OzMediaStream$p_9)==null?void 0:g.getSequenceNumber())!=null?String((g=this.$OzMediaStream$p_9)==null?void 0:g.getSequenceNumber()):null).setRepresentationID(this.$OzMediaStream$p_8.getID()).log();return null}if(!f||this.$OzMediaStream$p_31){if(this.$OzMediaStream$p_8.canPredict()&&this.$OzMediaStream$p_1.getBool("ms_promise_for_null")){var i=this.$OzMediaStream$p_1.getNumber("ms_promise_for_null_ms");return new(c("oz-player/shims/OzMaybeNativePromise"))(function(b,d){var e=c("oz-player/shims/ozSetTimeoutAcrossTransitions")(function(){c("oz-player/shims/ozClearTimeout")(e),b()},i?i:(a.$OzMediaStream$p_8.getMaxGopSec()||1)*1e3)})}this.$OzMediaStream$p_22=h;this.$OzMediaStream$p_31||this.$OzMediaStream$p_30.finishTaskIfNoOngoingStream();return this.$OzMediaStream$p_59()}this.$OzMediaStream$p_22=0;var j=this.$OzMediaStream$p_58(f,{fetchSingleSegment:e});if(j.length===0){this.$OzMediaStream$p_18.cloneContext().getOperationLogger("media_loop_end").setInitiator("no_stream_segments").setReason(((g=this.$OzMediaStream$p_9)==null?void 0:g.getSequenceNumber())!=null?String((f=this.$OzMediaStream$p_9)==null?void 0:f.getSequenceNumber()):null).setRepresentationID(this.$OzMediaStream$p_8.getID()).log();return this.$OzMediaStream$p_59()}this.$OzMediaStream$p_15=!0;var k=j[j.length-1]||null,l=this.$OzMediaStream$p_8,m=function(){return l.isEndingSegment(k)};j.length!==0||c("oz-player/shims/ozvariant")(0,23148);g=j[0];f=g.getTimeRange().startTime;var n=k.getTimeRange().endTime,o={startTime:f,endTime:n,tag:{id:this.$OzMediaStream$p_8.getID()}},p=function(b){v.setAppendedBufferMs(Math.round(b.appendedSec*1e3)),v.log(),a.$OzMediaStream$p_26.handleEvent("append_succeeded"),j.forEach(function(b){a.emit("SegmentAppended",a.$OzMediaStream$p_60(b,o))}),m()&&a.endStream("appended_ending_segment"),a.$OzMediaStream$p_61(o,b)},q=function(b){v.setError(b).log();var c=t||s;c&&c.cancel();a.$OzMediaStream$p_51(b)},r=this.$OzMediaStream$p_18.cloneContext();r.setRepresentationID(this.$OzMediaStream$p_8.getID());r.setSegmentStartTime(f).setSegmentEndTime(n);var s,t;!e?(t=this.$OzMediaStream$p_30.startStreamDeferred({debugName:"OzMediaStream/streamableSegments/"+this.$OzMediaStream$p_44,segments:j,networkManager:this.$OzMediaStream$p_12,sourceBufferState:b,playbackState:this.$OzMediaStream$p_7,segmentsLoggerProvider:r.cloneContext(),mediaStreamType:this.$OzMediaStream$p_44,dataAppendedCallback:p,dataAppendedErrorCallback:q}),this.$OzMediaStream$p_13=s):(s=this.$OzMediaStream$p_12.request({debugName:"OzMediaStream/streamableSegments/"+this.$OzMediaStream$p_44+"/prefetch",segments:j,pipeThroughRangeStreamProviders:[c("oz-player/networks/getOzBandwidthEstimatorPipeThroughReporter")(this.$OzMediaStream$p_21,this.$OzMediaStream$p_12.getBandwidthEstimator())],loggerProvider:r.cloneContext(),requestOptions:null,mediaStreamType:this.$OzMediaStream$p_44,dataAppendedCallback:p,dataAppendedErrorCallback:q}),this.$OzMediaStream$p_13=s);this.$OzMediaStream$p_31=!0;var u=this.$OzMediaStream$p_62(g,k,j.length),v=r.getOperationLogger("queued_append");v.start().setReason(this.$OzMediaStream$p_16&&this.$OzMediaStream$p_16.getLastEvaluationReason());var w=function(c,b){a.$OzMediaStream$p_52({data:c,mimeCodecs:b,clearSourceBufferRange:null,dataAppendedCallback:p,dataAppendedErrorCallback:q,loggerProvider:r.cloneContext(),appendTarget:u})},x;!!t||!!s||c("oz-player/shims/ozvariant")(0,23147);var y=this.$OzMediaStream$p_8.getMimeCodecs();t?(t.genStream().then(function(a){return w(a,y)})["catch"](function(b){return a.$OzMediaStream$p_33.emitError(b)}),x=t.getStatusChangePromise()):s&&(w(s.getStream(),y),x=s.getStatusChangePromise());!x&&c("oz-player/shims/ozvariant")(0,51928);f=x.then(function(b){a.$OzMediaStream$p_63(b,k);return a.$OzMediaStream$p_64()}).then(function(){a.$OzMediaStream$p_2=0});return f["catch"](function(b){var c,d=a.$OzMediaStream$p_9;a.$OzMediaStream$p_65(k);(c=a.$OzMediaStream$p_40)==null||c.handleError(l.getID(),b);return a.$OzMediaStream$p_66(b,k,d)})};e.handleError=function(a){var b=this.$OzMediaStream$p_18.getOperationLogger("media_stream_loop_error");b.setError(a).setResult("failed").log();return this.$OzMediaStream$p_1.getNumber("loop_body_handle_error_interval_ms")};e.$OzMediaStream$p_66=function(a,b,e){var f=this;this.$OzMediaStream$p_31=!1;var g=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise")),h=d("oz-player/utils/OzErrorUtils").getNormalizedErrorAndCode(a),i=h[0],j=h[1],k=d("oz-player/utils/OzErrorUtils").getOzErrorWithMIMEType(i,this.$OzMediaStream$p_21),l=function(b){f.$OzMediaStream$p_2++;f.$OzMediaStream$p_18.getOperationLogger("media_stream").setInitiator("fetch_stream_"+(b.behavior!=null?b.behavior:"default")).setLength(b.timeoutMs).setReason(""+k.getDescription()).setError(k).setCode(j.length>0?Number.parseInt(j,10):null).setType(f.$OzMediaStream$p_21).log();if(b.behavior==="retry_failed_request")f.$OzMediaStream$p_9=e;else if(b.behavior==="recover_failed_request"&&d("oz-player/utils/OzErrorUtils").isOzError(a)){var h;h=(h=a.getExtra())==null?void 0:h.headers;h=c("oz-player/shims/OzNetworkDiagnostics").getNextValidSegmentId(h);h!=null&&(f.$OzMediaStream$p_9=d("oz-player/streams/OzSegmentUtils").getSegmentForSequenceNumber(f.$OzMediaStream$p_8,h-1))}c("oz-player/shims/ozSetTimeoutAcrossTransitions")(function(){f.emit("streamErrorRetry",k);return g.resolve()},b.timeoutMs)};this.$OzMediaStream$p_4!==j?(this.$OzMediaStream$p_4=j,this.$OzMediaStream$p_3=1):this.$OzMediaStream$p_3++;h=!0;var m=function(){h=!1};i={consecutiveFailuresForErrorCode:this.$OzMediaStream$p_3,endStream:function(){m(),f.$OzMediaStream$p_10=b,f.$OzMediaStream$p_11=b,f.endStream("streamError_event_object"),g.resolve()},error:k,isInitialRequest:!1,retry:function(a){var b;m();l({timeoutMs:(b=a==null?void 0:a.waitMs)!=null?b:0,behavior:a==null?void 0:a.behavior})},retryAttemptCount:this.$OzMediaStream$p_2};this.emit("streamError",i);h&&(this.$OzMediaStream$p_33.emitError(k),this.$OzMediaStream$p_2=0,g.resolve());return g.getPromise()};e.$OzMediaStream$p_65=function(a){this.$OzMediaStream$p_48();this.$OzMediaStream$p_10=a;this.$OzMediaStream$p_30.finishTaskIfNoOngoingStream();a=this.$OzMediaStream$p_6;a&&a.cancelOperationAndCleanQueue(this.$OzMediaStream$p_18)};e.$OzMediaStream$p_63=function(a,b){a==="done"&&(this.$OzMediaStream$p_9=b)};e.$OzMediaStream$p_64=function(){this.$OzMediaStream$p_31=!1};e.$OzMediaStream$p_52=function(a){this.$OzMediaStream$p_19.push(a),this.$OzMediaStream$p_6&&this.$OzMediaStream$p_47()};e.$OzMediaStream$p_61=function(a,b){if(a==null)return;this.$OzMediaStream$p_8.canPredict()&&b.startTime_UNSAFE&&b.endTime_UNSAFE?this.$OzMediaStream$p_25.add(b.startTime_UNSAFE,b.endTime_UNSAFE,a.tag):this.$OzMediaStream$p_25.add(a.startTime,a.endTime,a.tag)};e.$OzMediaStream$p_47=function(){var a=this;this.$OzMediaStream$p_19.forEach(function(b){var d=b.data,e=b.mimeCodecs,f=b.clearSourceBufferRange,g=b.dataAppendedCallback,h=b.dataAppendedErrorCallback,i=b.loggerProvider;b=b.appendTarget;d=d instanceof Uint8Array||a.$OzMediaStream$p_34==null?d:d.pipeThrough(new(c("oz-player/networks/OzReadableStreamDataReader"))(a.$OzMediaStream$p_34.bind(a,a.$OzMediaStream$p_8),a.$OzMediaStream$p_1));a.$OzMediaStream$p_6&&a.$OzMediaStream$p_6.queueData(d,e,f,i,b).then(function(a){if(!a)return;g(a)})["catch"](function(a){h(a)})});this.$OzMediaStream$p_19=[]};e.$OzMediaStream$p_67=function(){var a=this.$OzMediaStream$p_6;if(!a)return c("oz-player/shims/OzMaybeNativePromise").resolve();var b=this.$OzMediaStream$p_7.getCurrentTime(),d=[{fromTime:0,toTime:b}],e=this.$OzMediaStream$p_1.getNumber("clear_buffer_around_playhead_boundary_ms");if(e>0){e=e/1e3;var f=a.getSourceBufferState();f=f.getBufferedRanges();f=f.length>=1?f[f.length-1].endTime:b;d=[{fromTime:0,toTime:Math.max(0,b-e)}];b+e0){a=a.getByteRange();b=b.getByteRange();a&&b&&b.endByte!=null&&(d=Math.ceil((b.endByte-a.startByte+1)/(c*e)))}d===0&&(d=this.$OzMediaStream$p_1.getNumber("append_byte_target_without_range"));return d};e.getIsAdaptationEnabled=function(){return this.$OzMediaStream$p_29};e.enableAdaptation=function(){this.$OzMediaStream$p_29=!0};e.disableAdaptation=function(){this.$OzMediaStream$p_29=!1};e.destroy=function(){this.$OzMediaStream$p_23.stop(),this.$OzMediaStream$p_5.then(function(a){a.destroy()},function(){})["catch"](function(a){c("oz-player/shims/ozReportUnexpectedError")(a,"OzMediaStream SBM promise then - destroy")}),this.$OzMediaStream$p_30.destroy(),this.$OzMediaStream$p_17.release(),this.$OzMediaStream$p_17.engage(),this.removeAllListeners(),this.$OzMediaStream$p_20&&(this.$OzMediaStream$p_20.remove(),this.$OzMediaStream$p_20=null)};e.getRepresentationIDAtTime=function(a){var b=this.$OzMediaStream$p_25.get(a);if(!b){var c=this.$OzMediaStream$p_8.getTimeRanges();c=c[c.length-1];var d=.001;c&&a>=c.endTime&&a<=this.$OzMediaStream$p_7.getDuration()+d&&(b=this.$OzMediaStream$p_25.get(c.endTime-d))}return b?b.id:null};e.endStream=function(a){var b;(b=this.$OzMediaStream$p_14)==null||b.notifyMediaStreamEnded(this,a);this.$OzMediaStream$p_69()};e.endStreamIfBufferedToEndTime=function(){var a=this.$OzMediaStream$p_8.getTimeRanges();if(a.length>0){a=a[a.length-1].endTime;if(this.$OzMediaStream$p_6){var b=this.$OzMediaStream$p_6.getSourceBufferState().getBufferedRanges();b.length>0&&(Math.abs(b[b.length-1].endTime-a)0&&(this.$OzMediaStream$p_32=a[a.length-1].endTime)}};e.$OzMediaStream$p_56=function(){return this.$OzMediaStream$p_32!==null};e.$OzMediaStream$p_49=function(a){this.$OzMediaStream$p_8.getID()===a&&this.$OzMediaStream$p_16!=null&&this.$OzMediaStream$p_50(this.$OzMediaStream$p_16.getBestRepresentation())};e.setEnableLiveheadCatchup=function(a){this.$OzMediaStream$p_35=a};e.clearSourceBufferRange=function(a,b){var d=this.$OzMediaStream$p_6;return d?d.clearRangeWithWait([{fromTime:a,toTime:b}]):c("oz-player/shims/OzMaybeNativePromise").resolve()};e.getDebug=function(){return{SourceBufferManager:this.$OzMediaStream$p_6,MediaStreamAbrManager:this.$OzMediaStream$p_16}};return b}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player/streams/OzPredictedSegmentLocator",["oz-player/streams/OzSegmentLocator","oz-player/streams/OzSegmentUtils","oz-player/utils/OzSourceBufferUtil"],(function(a,b,c,d,e,f,g){"use strict";function h(a,b){var c=0;for(var d in a){var e;if(d===b)continue;c=Math.max(c,(e=a[d].lastSkippedToSegmentNumber)!=null?e:0)}return c}function i(a,b){var c=null;for(var d in a){if(d===b)continue;a[d].inBufferAheadTimeSince!=null&&(c=c!=null?Math.min(c,a[d].inBufferAheadTimeSince):a[d].inBufferAheadTimeSince)}return c}a=function(){function a(a){this.$5={};var b=a.videoNode,c=a.liveLatencyManager,d=a.loggerProvider;a=a.dynamicVideoLibrary;this.$1=b;this.$2=c;this.$3=d;this.$4=a}var b=a.prototype;b.getSegment=function(a,b,c,d,e,f,g,h,i){var j;this.$5[i]==null&&(this.$5[i]={lastSkippedToSegmentNumber:null,inBufferAheadTimeSince:null});(j=this.$2)==null||j.setEnableCatchup(h);j=this.$6(a,b,c,d,e,f,g,h,i);(a=j.segment)==null||a.getOptions().setSegmentNumDecisionTime(Date.now());j.segment===null&&this.$3.getOperationLogger("segment_locator").setInitiator(j.initiator).setReason(j.reason).setType(i).setUserInfo(j.userInfo).log();b=this.$4;if(j.segment&&b!=null){c=j.segment.getOptions();c.setIsDVLEnabled(b.shouldRequestDynamicInfo(i))}return j.segment};b.$6=function(a,b,c,e,f,g,j,k,l){var m,n,o=b.getCurrentTime(),p=this.$2==null?!1:this.$2.shouldEnableCursorBasedCatchup(),q=e!=null?d("oz-player/utils/OzSourceBufferUtil").getTotalBufferAheadOfPosition(e.getBufferedRanges(),b.getCurrentTime(),j):{bufferAheadSec:0,bufferedOffset:0},r=q.bufferAheadSec;q=q.bufferedOffset;var s=null,t=null,u=this.$2?this.$2.enabled():!0,v=a.getPredictedSegmentAfter(f),w=d("oz-player/streams/OzSegmentUtils").getSegmentForSequenceNumber(a,j.getNumber("pdash_download_cursor_between_catchups_seg")>0?h(this.$5):h(this.$5,l)),x=!0,y=null;if(p&&k&&((m=v)==null?void 0:m.getSequenceNumber())!=null&&((m=(m=v)==null?void 0:m.getSequenceNumber())!=null?m:0)<=((m=w==null?void 0:w.getSequenceNumber())!=null?m:0)){v=w;s="paired_catchup";this.$3.getOperationLogger("segment_locator").setInitiator(s).setUserInfo({bufferAheadSec:String(r),bufferedOffset:String(q)}).setLength(((m=w==null?void 0:w.getSequenceNumber())!=null?m:0)-((m=(m=v)==null?void 0:m.getSequenceNumber())!=null?m:0)).setType(l).log();x=!1;y=s}else if(p&&k&&u&&v!=null&&(n=this.$2)!=null&&n.isBehindPreferredLiveHeadLatencyWithTolerance()){if(this.$2&&r>this.$2.getPreferredLiveHeadLatencySec()&&q==0)return{segment:null,initiator:"catchup_pause",userInfo:{bufferAheadSec:String(r),bufferedOffset:String(q)}};m=a.getEndingSegment();p=d("oz-player/streams/OzSegmentUtils").getMaxSegment([m,v]);k=j.getNumber("pdash_download_cursor_between_catchups_seg")===0||((k=w==null?void 0:w.getSequenceNumber())!=null?k:0)+j.getNumber("pdash_download_cursor_between_catchups_seg")<((w=m==null?void 0:m.getSequenceNumber())!=null?w:0);if(k){if(((m=p==null?void 0:p.getSequenceNumber())!=null?m:0)>((k=(w=v)==null?void 0:w.getSequenceNumber())!=null?k:0)){this.$5[l].lastSkippedToSegmentNumber=(m=p==null?void 0:p.getSequenceNumber())!=null?m:0;this.$3.getOperationLogger("segment_locator").setInitiator("catchup").setUserInfo({bufferAheadSec:String(r),bufferedOffset:String(q)}).setLength(((w=p==null?void 0:p.getSequenceNumber())!=null?w:0)-((m=(k=v)==null?void 0:k.getSequenceNumber())!=null?m:0)).setType(l).log()}v=p;s="catchup";x=!1;y=s}}else if(f==null){v=a.getSegmentByTime(o);s="1st_run";w=a.getTimeRanges();t={approx:String(a.canApproximateId()),ranges:String(w.length),mpdStartTime:w.length>0?String(w[w.length-1].startTime):null,mpdEndTime:w.length>0?String(w[w.length-1].endTime):null};this.$5[l].lastSkippedToSegmentNumber=(m=(k=v)==null?void 0:k.getSequenceNumber())!=null?m:0}x&&(x=u,y="stream_state");if(x&&r>c){this.$5[l].inBufferAheadTimeSince==null&&(this.$5[l].inBufferAheadTimeSince=Date.now());return{segment:null,initiator:"buffer_ahead_rule",userInfo:{bufferAheadSec:String(r),bufferedOffset:String(q),lastMaxSegNum:String(h(this.$5,l)),segment:v?String(v.getSequenceNumber()):null,computedBufferAheadTarget:String(c)}}}else!x&&r>c&&this.$3.getOperationLogger("segment_locator").setUserInfo({bufferAheadSec:String(r),bufferedOffset:String(q),computedBufferAheadTarget:String(c)}).setReason("disabled_buffer_ahead_rule:"+(y||"")).setType(l).log();p=g&&g.getSequenceNumber()||0;f=v&&v.getSequenceNumber()||0;if(v&&g&&p>=f){o=d("oz-player/streams/OzSegmentLocator").getEndingSequenceNumber(a);return(o||0)>=p?{segment:g}:{segment:null,initiator:"mpd_refresh",userInfo:{leSegNum:String(p)}}}w=e?d("oz-player/utils/OzSourceBufferUtil").getTotalInBufferedRanges(e.getBufferedRanges()):0;k=e?d("oz-player/utils/OzSourceBufferUtil").getTotalBufferAheadOfPosition(e.getBufferedRanges(),b.getCurrentTime(),j).bufferAheadSec:0;m=i(this.$5,l);u=Date.now();if(j.getNumber("download_cursor_total_buffer_max_sec")!=0&&j.getNumber("download_cursor_total_buffer_max_sec")0&&(e.$Player$p_61=new(c("oz-player/states/OzPositionToViewport"))(e.$Player$p_3,e.$Player$p_4));e.$Player$p_72=b;e.$Player$p_73=null;e.$Player$p_74={lang:null,role:null};return e}babelHelpers.inheritsLoose(e,a);var f=e.prototype;f.$Player$p_81=function(){if(this.$Player$p_70)return;c("oz-player/shims/ozReportUnexpectedError")(d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_JAVASCRIPT_NATIVE",description:"ResourceTiming buffer is full"}),"ResourceTiming buffer is full","warn");this.$Player$p_70=!0};f.$Player$p_83=function(a){var b=this;this.$Player$p_84();var c=d("oz-player/loggings/OzLoggingUtils").executeOperationAndLog(this.$Player$p_16.cloneContext().setInitiator(this.$Player$p_49),"parse_manifest",function(e){var f,g,c=b.$Player$p_85(a);f=String((f=c.getCustomField("currentServerTimeMs"))!=null?f:"");g=String((g=c.getCustomField("lastVideoFrameTs"))!=null?g:"");f={currentServerTimeMs:f,ingestLastVideoFrameTs:g,nowMs:String(Date.now())};g=d("oz-player/utils/OzMpdUtils").getMpdLastTimeRange(c,b.$Player$p_4);g=g&&g.endTime!=0?g.endTime:null;e.setLiveheadPosition(g).setLiveheadSeqNumMpd(d("oz-player/utils/OzMpdUtils").getMpdLastSequenceNumber(c)).setManifestType(c.isStaticMpd()?"static":"dynamic").setIsMixedCodecManifest(b.$Player$p_76).setIsTemplatedManifest(Boolean(c.getCustomField("isLiveTemplated"))).setUserInfo(f);return c});this.$Player$p_86(c)};f.$Player$p_86=function(a){var b=this;this.$Player$p_9=i(a);this.$Player$p_4.getBool("player_emit_mpdparsed_early")&&this.emit("mpdParsed",a);this.$Player$p_26=this.$Player$p_87();this.$Player$p_27=this.$Player$p_88();this.$Player$p_67.setAvailableRepresentationsCount(a.getVideoRepresentations().length);if(this.$Player$p_18!=null){var e=new(c("oz-player/parsers/OzMpdUpdater"))(this.$Player$p_4,a,this.$Player$p_13,this.$Player$p_14,this.$Player$p_16,{mpdUrl:null,createXmlParser:this.$Player$p_89,customParsers:this.$Player$p_28,customRepresentationParsers:this.$Player$p_29,customSegmentTimelineParser:this.$Player$p_30},this.$Player$p_48,this.$Player$p_69,this.$Player$p_78);this.$Player$p_90(e);this.$Player$p_10.addSubscriptions(e.onError(this.$Player$p_11.emitError),e.addListener("manifestFetchError",function(a){return b.emit("manifestFetchError",a)}),e.addListener("manifestFetchErrorRetry",function(a){return b.emit("manifestFetchErrorRetry",a)}),e.addListener("streamTransitionToStatic",this.$Player$p_91),e.addListener("streamGone",this.$Player$p_92));e.setupUpdateLoop();this.$Player$p_21=e}this.$Player$p_4.getBool("use_live_latency_manager")?!a.isStaticMpd()?(this.$Player$p_40=new(c("oz-player/playback_controls/OzLiveLatencyManager"))({config:this.$Player$p_4,mpd:a,playbackState:this.$Player$p_14,bufferingDetector:this.$Player$p_50,video:this.$Player$p_3,loggerProvider:this.$Player$p_16,getUserSelectedPlaybackRate:this.$Player$p_41}),this.$Player$p_37=this.$Player$p_40.getPreferredLiveHeadLatencySec()*-1):this.$Player$p_37=this.$Player$p_37:this.$Player$p_37=a.isStaticMpd()?this.$Player$p_37:this.$Player$p_93(a);this.$Player$p_19=new(c("oz-player/playback_controls/OzPlayheadManager"))({video:this.$Player$p_3,mpd:a,dynamicVideoLibrary:this.$Player$p_65,playheadCatchup:this.$Player$p_34,playbackState:this.$Player$p_14,config:this.$Player$p_4,perfLoggerProvider:this.$Player$p_16,seekHandler:this.$Player$p_36,initialPlaybackPosition:this.$Player$p_37,canSupportSkipVideobufferGaps:(e=(e=this.$Player$p_64)==null?void 0:e.getCurrentTimePropertyOverwriteSuccess())!=null?e:!1,liveLatencyManager:this.$Player$p_40});this.$Player$p_20=new(c("oz-player/playback_controls/OzPlaybackTimeRangeManager"))({config:this.$Player$p_4,video:this.$Player$p_3,mpd:a,liveheadFallBehindBlockThreshold:this.$Player$p_39,liveheadFallBehindBlockMargin:this.$Player$p_42,playbackState:this.$Player$p_14,perfLoggerProvider:this.$Player$p_16});this.$Player$p_94()["catch"](function(a){var e=d("oz-player/utils/OzErrorUtils").isOzError(a)?a:null;b.$Player$p_11.emitError(d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_INITIALIZATION",description:"Failed to setup streams: "+String(a),extra:babelHelpers["extends"]({},e==null?void 0:e.getExtra(),{originalError:a,code:c("oz-player/utils/OzCustomErrorCode").SETUP_STREAMS_PROMISE_REJECTION.toString()})}))});this.emit("mpdReady",a)};f.load=function(a){var b=this;this.$Player$p_18=a;try{var c=this.$Player$p_8;c!=null?this.$Player$p_83(c):a!=null?this.$Player$p_95(a).then(function(a){if(b.$Player$p_60){b.$Player$p_60=!1;b.load(b.$Player$p_18);return}b.$Player$p_8=a;b.$Player$p_54=0;b.$Player$p_83(a)})["catch"](function(c){if(b.$Player$p_60){b.$Player$p_60=!1;b.load(b.$Player$p_18);return}var e=d("oz-player/utils/OzErrorUtils").isOzError(c)?c:null;e=d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_INITIALIZATION",description:"Failed to setup player with fetched MPD: "+String(c),extra:babelHelpers["extends"]({},e==null?void 0:e.getExtra(),{originalError:c,url:a})});b.$Player$p_96(e,a)}):this.$Player$p_11.emitError(d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_INITIALIZATION",description:"Cannot start Oz without a raw mpd xml or mpd url"}))}catch(a){c=d("oz-player/utils/OzErrorUtils").isOzError(a)?a:null;this.$Player$p_11.emitError(d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_INITIALIZATION",description:"Failed to setup player: "+String(a),extra:babelHelpers["extends"]({},c==null?void 0:c.getExtra(),{originalError:a})}))}};f.$Player$p_93=function(a){var b;b=(b=a.getVideoRepresentations()[0].getMaxGopSec())!=null?b:0;a=(a=a.getVideoRepresentations()[0].getEndingSegment())==null?void 0:a.getTimeRange();a=a!=null?a.endTime-a.startTime:0;a>0&&(b=a);return Math.min(this.$Player$p_38+this.$Player$p_4.getNumber("dynamic_mpd_initial_playback_position_offset_modifier"),-1*b*this.$Player$p_4.getNumber("pdash_download_cursor_catchup_threshold_gop_multiplier"))};f.$Player$p_95=function(a){this.$Player$p_54++;a=this.$Player$p_13.requestRawUrl({debugName:"OzPlayer/fetchMpdXml/mpd",url:a,options:null,loggerProvider:this.$Player$p_16});a=a.getStream().getReader();return d("oz-player/utils/OzReadableStreamUtils").pumpString(a)};f.$Player$p_97=function(){this.$Player$p_55!=null&&(c("oz-player/shims/ozClearTimeout")(this.$Player$p_55),this.$Player$p_55=null)};f.$Player$p_96=function(a,b){var d=this,e=!0,f=this.$Player$p_54-1,g=a.getExtra().code;this.$Player$p_56!==g?(this.$Player$p_56=g,this.$Player$p_57=1):this.$Player$p_57++;var h=function(){e=!1};g={endStream:function(){h(),d.$Player$p_51=!0,d.emit("streamGoneBeforeStart")},consecutiveFailuresForErrorCode:this.$Player$p_57,error:a,isInitialRequest:!0,retry:function(a){h(),d.$Player$p_97(),d.$Player$p_55=c("oz-player/shims/ozSetTimeoutAcrossTransitions")(function(){d.$Player$p_97(),d.load(b)},(a==null?void 0:a.waitMs)!=null?a==null?void 0:a.waitMs:1e3)},retryAttemptCount:f};this.$Player$p_4.getNumber("initial_manifest_request_retry_count")>0&&this.emit("manifestFetchError",g);e&&this.$Player$p_11.emitError(a)};f.updatePlayerRunTimeConfig=function(a){var b=a.manifestUrl,c=a.audioStreamDataHandler,d=a.videoStreamDataHandler,e=a.applicationStreamDataHandler;a=a.resetStreamAnchor;if(d!==void 0){var f=this.$Player$p_5.get("video");f&&f.updateRunTimeConfigs({streamDataHandler:d})}if(a!==void 0){f=this.$Player$p_5.get("video");f&&f.updateRunTimeConfigs({resetStreamAnchor:a});d=this.$Player$p_5.get("audio");d&&d.updateRunTimeConfigs({resetStreamAnchor:a});(f=this.$Player$p_19)==null||f.resetCurrentTime()}if(c!==void 0){d=this.$Player$p_5.get("audio");d&&d.updateRunTimeConfigs({streamDataHandler:c})}if(e!==void 0){f=this.$Player$p_5.get("caption");f&&f.updateRunTimeConfigs({streamDataHandler:e,resetStreamAnchor:a})}b!=null&&b!==""&&this.$Player$p_98(b)};f.$Player$p_99=function(a,b){var c=this,e=a.getMimeCodecs();e=this.$Player$p_7.createSourceBufferManager(b+"/"+a.getMimeType()+"/"+a.getCodecs(),e,b,a.getInitSegment().getData());this.$Player$p_100(e,b,a);a=e.then(function(a){c.$Player$p_50&&b!=="caption"&&c.$Player$p_50.setSourceBufferState(b,a.getSourceBufferState());return a});d("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(a,this.$Player$p_16,"source_attach",function(a){a.setType(b)});return a.then(function(a){if(b!=="caption"){var d;(d=c.$Player$p_19)==null||d.observeSourceBufferState(a.getSourceBufferState(),b)}})};f.isDrm=function(){var a=this.$Player$p_48;if(a!=null){a=a.hasContentProtections();return a!=null?a:!1}return!1};f.$Player$p_84=function(){var a=this.$Player$p_47;if(a.length>0){var b=this.$Player$p_48=new(d("oz-player/drm/OzDrmManager").OzDrmManager)(this.$Player$p_16,this.$Player$p_3,{maxStartEMEAttempts:this.$Player$p_4.getNumber("max_start_eme_attempts"),throwNoLicenseError:!0});a.forEach(function(a){b.addProvider(a)});this.$Player$p_10.addSubscriptions(b.onError(this.$Player$p_11.emitError))}};f.$Player$p_101=function(a){var b=this,d=i(this.$Player$p_9);a=[this.$Player$p_4,a,this.$Player$p_102(),this.$Player$p_31,this.$Player$p_14,window.devicePixelRatio||1,function(){return b.$Player$p_103()},d.isStaticMpd()?"static":"dynamic",this.$Player$p_16];d=this.$Player$p_35&&this.$Player$p_35.apply(this,a);return d!=null?d:babelHelpers.construct(c("oz-player/strategies/OzAbrManager"),a)};f.$Player$p_104=function(a){return a==="caption"?!0:!1};f.$Player$p_100=function(a,b,e){var f=this,g=i(this.$Player$p_9),h=this.$Player$p_6.get(b),j=new(c("oz-player/streams/OzMediaStream"))({config:this.$Player$p_4,sourceBufferManagerPromise:a,networkManager:this.$Player$p_13,playbackState:this.$Player$p_14,endOfStreamWatcher:b!=="caption"?this.$Player$p_15:null,bufferTargetCalculator:this.$Player$p_105(b),priorityCalculator:this.$Player$p_106(),streamSegmentsCountCalculator:this.$Player$p_107(b),abrManager:h,representation:e,loggerProvider:this.$Player$p_16.cloneContext().setType(b),segmentLocator:this.$Player$p_62,setCustomFetchStreamLoggingAttributes:this.$Player$p_63,blockedRepresentationsManager:this.$Player$p_67,dynamicVideoLibrary:this.$Player$p_65,shouldAppendOncePerStream:this.$Player$p_104(b),mediaStreamType:b,warningEmitter:this.$Player$p_12,mpd:g});this.$Player$p_37===0?j.start():(i(this.$Player$p_9),this.$Player$p_19&&this.$Player$p_10.addSubscriptions(this.$Player$p_19.addListener("initialPlaybackPositionSet",function(){j.start()})));this.$Player$p_10.addSubscriptions(j.onError(this.$Player$p_11.emitError));this.$Player$p_23&&this.$Player$p_10.addSubscriptions(this.$Player$p_23.listenToMediaStreamInitAppended(j));b==="video"&&(this.$Player$p_33=new(c("oz-player/streams/OzHandleUserRepresentationSwitch"))(this.$Player$p_4,this.$Player$p_14,d("oz-player/utils/OzPlaybackRestrictionsUtils").applyVideoPlaybackRestrictions(this.$Player$p_31,this.$Player$p_103(),this.$Player$p_102()),j,a,this.$Player$p_71),this.$Player$p_10.addSubscriptions(this.$Player$p_33.onError(this.$Player$p_11.emitError)));this.$Player$p_5.set(b,j);this.$Player$p_10.addSubscriptions(j.addListener("switchRepresentation",function(){var c,a=j.getCurrentRepresentation();(c=f.$Player$p_23)==null||c.setTimeRangeProvider(a);(c=f.$Player$p_19)==null||c.setTimeRangeProvider(a);(c=f.$Player$p_20)==null||c.setTimeRangeProvider(a);b==="video"&&f.emit("switchVideoRepresentation")}),j.addListener("SegmentAppended",function(a){f.$Player$p_108("SegmentAppended",a)}),j.addListener("streamError",function(a){f.emit("streamError",a)}),j.addListener("streamErrorRetry",function(a){f.emit("streamErrorRetry",a)}))};f.$Player$p_109=function(){if(this.$Player$p_66!=null)return[new(c("oz-player/strategies/OzBufferEndLimitStrategy"))(this.$Player$p_3,this.$Player$p_66)];else return[new(c("oz-player/strategies/OzStaleManifestBufferTargetStrategy"))(i(this.$Player$p_9),this.$Player$p_4),new(c("oz-player/strategies/OzStartupBufferTargetStrategy"))(this.$Player$p_14,this.$Player$p_4),new(c("oz-player/strategies/OzBufferAheadTargetStrategy"))(this.$Player$p_4)]};f.$Player$p_110=function(){return this.$Player$p_66==null?[new(c("oz-player/strategies/OzBufferTargetCalculatorQuotaExceededConstraint"))({config:this.$Player$p_4,minimumBufferTargetSec:this.$Player$p_4.getNumber("buffer_target_constraint_minimum_sec")})]:[]};f.$Player$p_111=function(){return this.$Player$p_66==null?[new(c("oz-player/strategies/OzBufferTargetCalculatorQuotaExceededConstraint"))({config:this.$Player$p_4,minimumBufferTargetSec:0})]:[]};f.$Player$p_87=function(){return new(c("oz-player/strategies/OzBufferTargetCalculator"))(this.$Player$p_109(),this.$Player$p_110())};f.$Player$p_88=function(){return this.$Player$p_1!=null?new(c("oz-player/strategies/OzBufferTargetCalculator"))([].concat(this.$Player$p_1,this.$Player$p_109()),this.$Player$p_111()):this.$Player$p_87()};f.$Player$p_105=function(a){var b=a==="caption"?this.$Player$p_27:this.$Player$p_26;b||c("oz-player/shims/ozvariant")(0,76764,a);return b};f.$Player$p_90=function(a){var b=this;if(this.$Player$p_4.getNumber("stream_interrupt_check_mpd_stale_count_threshold")>0){var d=this.$Player$p_50,e=new(c("oz-player/strategies/OzPlayheadAtInterruptionDetector"))(this.$Player$p_3,d);this.$Player$p_10.addSubscriptions(e.addListener("playheadAtInterruption",function(a){b.$Player$p_16.getOperationLogger("stream_interrupted").log(),b.emit("streamInterruptAt",a)}),a.addListener("streamInterruptAt",function(a){var c;(c=b.$Player$p_50)==null||c.notifyStreamInterrupted();e.notifyStreamInterrupted(a)}),a.addListener("streamResumedAt",function(a){var c;b.$Player$p_16.getOperationLogger("stream_resumed").log();(c=b.$Player$p_50)==null||c.notifyStreamResumed();e.notifyStreamResumed();b.emit("streamResumedAt",a)}));this.$Player$p_32=e}};f.$Player$p_106=function(){var a=[new(c("oz-player/strategies/OzPlayingStatePriorityStrategy"))(this.$Player$p_14),new(c("oz-player/strategies/OzBufferAheadPriorityStrategy"))(this.$Player$p_4,this.$Player$p_14)].concat(this.$Player$p_4.getNumber("pixels_below_viewport_to_observe")>0&&this.$Player$p_61!=null?new(c("oz-player/strategies/OzPositionToViewportPriorityStrategy"))(this.$Player$p_61,this.$Player$p_4):[]);return new(c("oz-player/strategies/OzPriorityCalculator"))(a)};f.$Player$p_107=function(a){var b=[new(c("oz-player/strategies/OzStaticStreamSegmentsStrategy"))(this.$Player$p_4),new(c("oz-player/strategies/OzBufferTargetBoundedStreamSegmentsCountStrategy"))(this.$Player$p_105(a),this.$Player$p_4)];this.$Player$p_4.getNumber("paused_stream_segments_count")!==0&&b.push(new(c("oz-player/strategies/OzPausedStreamSegmentsCountStrategy"))(this.$Player$p_14,this.$Player$p_4));a==="video"&&b.push(new(c("oz-player/strategies/OzBandwidthBoundaryStreamSegmentsCountStrategy"))(this.$Player$p_4,this.$Player$p_102()));return new(c("oz-player/strategies/OzStreamSegmentsCountCalculator"))(b)};f.onError=function(a){return this.$Player$p_11.onError(a)};f.onWarning=function(a){return this.$Player$p_12.onError(a)};f.getSelectedVideoQuality=function(){var a=this.$Player$p_9;if(!a||this.$Player$p_2)return null;a=this.$Player$p_5.get("video");a=a&&a.getCurrentRepresentation();if(a instanceof c("oz-player/manifests/OzVideoRepresentation"))return a.getDisplayLabel();a=this.$Player$p_102();a=a[0];return a?a.getDisplayLabel():null};f.getTargetAudioTrack=function(){var a=this.$Player$p_9;if(!a)return null;a=this.$Player$p_5.get("audio");a=a&&a.getCurrentRepresentation();if(a){var b;return{id:a.getID(),displayLabel:a.getDisplayLabel(),lang:(b=a.getLang())!=null?b:null,role:a.getRole(),mimeCodecs:a.getMimeCodecs(),variantKey:a.getVariantKey()}}b=this.$Player$p_112();a=b[0];return a?a.getAudioTrack():null};f.getCurrentPlayingVideoVariant=function(){return this.$Player$p_73};f.getTargetVideoVariant=function(){return this.$Player$p_74};f.switchToVideoQuality=function(a){var b=this.$Player$p_102().find(function(b){return b.getDisplayLabel()===a});if(b){var c=this.$Player$p_5.get("video");c&&(c.switchRepresentation(b),c.disableAdaptation())}};f.switchToVideoVariant=function(a){this.$Player$p_74=a===null?{lang:null,role:null}:a;if(this.$Player$p_74.lang===((a=(a=this.$Player$p_73)==null?void 0:a.lang)!=null?a:null)&&this.$Player$p_74.role===((a=(a=this.$Player$p_73)==null?void 0:a.role)!=null?a:null)){c("oz-player/shims/ozReportUnexpectedError")(d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SWITCH_VARIANT",description:"switchToVideoVariant switch to the same lang: "+((a=this.$Player$p_74.lang)!=null?a:"default lang")+", same role: "+((a=this.$Player$p_74.role)!=null?a:"default role")}),"switchToVideoVariant switch to the same lang: "+((a=this.$Player$p_74.lang)!=null?a:"default lang")+", same role: "+((a=this.$Player$p_74.role)!=null?a:"default role"),"warn");return}else if(!this.$Player$p_9){c("oz-player/shims/ozReportUnexpectedError")(d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SWITCH_VARIANT",description:"switchToVideoVariant mpd is void"}),"switchToVideoVariant mpd is void","warn");return}else if(!this.$Player$p_113(this.$Player$p_74.lang)){c("oz-player/shims/ozReportUnexpectedError")(d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SWITCH_VARIANT",description:"switchToVideoVariant lang not exist in mpd: "+((a=this.$Player$p_74.lang)!=null?a:"default lang")+", same role: "+((a=this.$Player$p_74.role)!=null?a:"default role")}),"switchToVideoVariant lang not exist in mpd: "+((a=this.$Player$p_74.lang)!=null?a:"default lang")+", same role: "+((a=this.$Player$p_74.role)!=null?a:"default role"),"warn");return}this.$Player$p_114();this.$Player$p_4.getBool("enable_lip_sync_abr_select_quality")&&this.$Player$p_4.getBool("enable_alternative_audio_tracks")&&this.$Player$p_75&&this.$Player$p_115();this.$Player$p_73=this.$Player$p_74};f.$Player$p_114=function(){var a=this.$Player$p_112()[0];if(a){var b=this.$Player$p_5.get("audio");b&&(b.switchRepresentation(a,[0,this.$Player$p_14.getDuration()]),b.disableAdaptation())}};f.$Player$p_115=function(){var a=this.$Player$p_5.get("video");if(!a)return;var b=a.getCurrentRepresentation();if(b.getLang()===this.$Player$p_74.lang&&b.getRole()===this.$Player$p_74.role)return;b=this.$Player$p_102();if(b.length===0){c("oz-player/shims/ozReportUnexpectedError")(d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SWITCH_VARIANT",description:"switchVideoByTargetVariant no representations with target variant: "+JSON.stringify(this.$Player$p_74)}),"switchVideoByTargetVariant no representations with target variant: "+JSON.stringify(this.$Player$p_74),"warn");return}var e=this.$Player$p_6.get("video");e?(e.updateRepresentations(b),e=e.getBestRepresentation()):e=b[0];if(!e){c("oz-player/shims/ozReportUnexpectedError")(d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SWITCH_VARIANT",description:"switchVideoByTargetVariant unable to update representations given target variant: "+JSON.stringify(this.$Player$p_74)}),"switchVideoByTargetVariant unable to update representations given target variant: "+JSON.stringify(this.$Player$p_74));return}a.switchRepresentation(e,[0,this.$Player$p_14.getDuration()]);return};f.getIsVideoQualityAdaptationEnabled=function(){var a=this.$Player$p_5.get("video");return a?a.getIsAdaptationEnabled():!1};f.enableVideoQualityAdaptation=function(){var a=this.$Player$p_5.get("video");a&&a.enableAdaptation()};f.getVideoQualities=function(){var a=this,b=this.$Player$p_9;if(!b)return[];b=this.$Player$p_102().filter(function(b){var c;return!((c=a.$Player$p_67)!=null&&c.isBlocked(b.getID()))});var c=b.some(function(a){return d("oz-player/utils/OzMimeUtil").getParsedCodecFamily(a.getCodecs())===j}),e=b.some(function(a){return d("oz-player/utils/OzMimeUtil").getParsedCodecFamily(a.getCodecs())===k});c=c?b.filter(function(a){return d("oz-player/utils/OzMimeUtil").getParsedCodecFamily(a.getCodecs())===j}):e?b.filter(function(a){return d("oz-player/utils/OzMimeUtil").getParsedCodecFamily(a.getCodecs())===k}):b.filter(function(a){return d("oz-player/utils/OzMimeUtil").getParsedCodecFamily(a.getCodecs())===l});return c.sort(function(a,b){return a.getBandwidth()-b.getBandwidth()}).map(function(a){return a.getDisplayLabel()})};f.getVideoTracks=function(){var a=this,b=this.$Player$p_9;return!b?[]:this.$Player$p_102().filter(function(b){var c;return!((c=a.$Player$p_67)!=null&&c.isBlocked(b.getID()))}).map(function(a){return{mimeCodecs:a.getMimeCodecs(),codec:a.getCodecs(),codecFamily:d("oz-player/utils/OzMimeUtil").getParsedCodecFamily(a.getMimeCodecs()),displayLabel:a.getDisplayLabel(),qualityLabel:a.getDisplayLabel(),height:a.getHeight(),id:a.getID(),qualityScoreCurveString:a.getQualityScoreCurveString("csvqm"),width:a.getWidth(),lang:a.getLang(),role:a.getRole(),variantKey:a.getVariantKey()}})};f.getAudioTracks=function(){var a=this,b=this.$Player$p_9;return!b?[]:b.getAudioRepresentations().filter(function(b){var c;return!((c=a.$Player$p_67)!=null&&c.isBlocked(b.getID()))}).map(function(a){return a.getAudioTrack()})};f.setEnableLiveheadCatchup=function(a){if(this.$Player$p_20){var b;a?this.$Player$p_16.getOperationLogger("live_catchup_enabled").setIsLatencyCachupEnabled(!0).log():this.$Player$p_16.getOperationLogger("live_catchup_disabled").setIsLatencyCachupEnabled(!1).log();(b=this.$Player$p_20)==null||b.setTimelineBlockingEnabled(a)}this.$Player$p_5.forEach(function(b){b.setEnableLiveheadCatchup(a)});(b=this.$Player$p_19)==null||b.setEnableLiveheadCatchup(a)};f.$Player$p_94=function(){var a=this;if(this.$Player$p_4.getBool("enable_alternative_audio_tracks")&&this.$Player$p_113(this.$Player$p_72)){var c;this.$Player$p_74=babelHelpers["extends"]({},this.$Player$p_74,{lang:(c=this.$Player$p_72)!=null?c:null,role:this.$Player$p_72!=null?"dub":null})}c=this.$Player$p_102()[0];this.$Player$p_62=c&&c.canPredict()&&this.$Player$p_4.getBool("pdash_use_pdash_segmentlocator")||c&&c.canApproximateId()?new(d("oz-player/streams/OzPredictedSegmentLocator").OzPredictedSegmentLocator)({videoNode:this.$Player$p_3,liveLatencyManager:this.$Player$p_40,loggerProvider:this.$Player$p_16,dynamicVideoLibrary:this.$Player$p_65}):null;c=this.$Player$p_2?[this.$Player$p_116({liveConfigsFromAudioStream:!0}),this.$Player$p_117()]:[this.$Player$p_118(),this.$Player$p_116({liveConfigsFromAudioStream:!1}),this.$Player$p_117()];var e=[];return(h||(h=b("Promise"))).all(c).then(function(){var b=a.$Player$p_5.get("video"),c=a.$Player$p_5.get("audio"),d=a.$Player$p_5.get("caption");b&&e.push(b.getCurrentRepresentation());c&&e.push(c.getCurrentRepresentation());d&&e.push(d.getCurrentRepresentation());e.forEach(function(b){a.$Player$p_10.addSubscriptions(b.addUpdateListener(function(){a.$Player$p_108("SegmentIndexesUpdated",e)}))});a.$Player$p_108("InitialSegmentIndexes",e);a.$Player$p_3&&a.$Player$p_3.style&&(a.$Player$p_3.style.display=a.$Player$p_2?"none":"block");a.$Player$p_73=a.$Player$p_74;a.emit("initialized")})};f.$Player$p_119=function(a){if(!a.getTimeRanges().length){this.$Player$p_16.getOperationLogger("playhead_adjustment").setInitiator("setup_initial_duration").setResult("failed").log();return}a=a.getTimeRanges()[a.getTimeRanges().length-1].endTime;this.$Player$p_7.updateDuration(a,!0)};f.$Player$p_120=function(a){var b;this.$Player$p_23=new(c("oz-player/media_source/OzMediaSeekableRangeManager"))(this.$Player$p_7,this.$Player$p_4);this.$Player$p_119(a);(b=this.$Player$p_23)==null||b.setTimeRangeProvider(a);(b=this.$Player$p_19)==null||b.setTimeRangeProvider(a);(b=this.$Player$p_20)==null||b.setTimeRangeProvider(a)};f.$Player$p_118=function(){var a=this.$Player$p_102();if(!a.length)return c("oz-player/shims/OzMaybeNativePromise").reject(d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_INITIALIZATION",description:"No video representations in the manifest",extra:{code:c("oz-player/utils/OzCustomErrorCode").SETUP_STREAMS_PROMISE_REJECTION.toString()}}));var b=d("oz-player/utils/OzPlaybackRestrictionsUtils").applyVideoPlaybackRestrictions(this.$Player$p_31,this.$Player$p_103(),a);if(!b.length){a=a.map(function(a){return a.getDisplayLabel()+"@"+a.getWidth()+"x"+a.getHeight()+"("+a.getMimeCodecs()+")"});return c("oz-player/shims/OzMaybeNativePromise").reject(d("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_INITIALIZATION",description:"Restricted all video representations: "+a.join(", "),extra:{code:c("oz-player/utils/OzCustomErrorCode").SETUP_STREAMS_PROMISE_REJECTION.toString()}}))}this.$Player$p_120(b[0]);a=this.$Player$p_121(b);a&&this.$Player$p_4.getBool("enable_abr_logging")&&this.$Player$p_16.getOperationLogger("video_stream_setup_initial_representation_from_prefetch").setResult("success").setReason("player_initialized").setRepresentationID(a.getID()).setPreviousRepresentationID(null).setUserInfo({initialRepresentationIDs:JSON.stringify(this.$Player$p_25)}).setType("video").setInitiator("Player").log();var e=this.$Player$p_101(a||b[0]);this.$Player$p_6.set("video",e);a||(a=e.getBestRepresentation());return this.$Player$p_99(a||b[0],"video")};f.$Player$p_102=function(){var a=this.$Player$p_9;if(!a)return[];var b=a.getVideoRepresentations();if(this.$Player$p_4.getBool("enable_lip_sync_abr_select_quality")&&this.$Player$p_4.getBool("enable_alternative_audio_tracks")&&this.$Player$p_75){var c=a.getVideoRepresentationsByVariant(this.$Player$p_74);b=c.length>0?c:a.getVideoRepresentationsByVariant({lang:null,role:null})}var e=d("oz-player/utils/OzPlaybackRestrictionsUtils").applyVideoPlaybackRestrictions(this.$Player$p_31,this.$Player$p_103(),b);return b.filter(function(a){return e.includes(a)})};f.$Player$p_112=function(){var a=this.$Player$p_9;if(!a)return[];return this.$Player$p_4.getBool("enable_alternative_audio_tracks")?a.getAudioRepresentationsByVariant(this.$Player$p_74):a.getAudioRepresentations()};f.$Player$p_113=function(a){var b=this.$Player$p_9;if(!b)return!1;var c=b.getAudioRepresentations();if(a==null)return!0;if(this.$Player$p_4.getBool("enable_alternative_audio_tracks")&&b.isStaticMpd()){b=c.findIndex(function(b){return b.getLang()===a});return b>-1}return!1};f.$Player$p_116=function(a){var b=this;a=a.liveConfigsFromAudioStream;a=a===void 0?!1:a;var d=i(this.$Player$p_9),e=d.getAudioRepresentations();a&&this.$Player$p_120(e[0]);a=-1;this.$Player$p_4.getBool("enable_alternative_audio_tracks")&&e.length>1&&d.isStaticMpd()&&(this.$Player$p_72!=null&&(a=e.findIndex(function(a){return a.getLang()===b.$Player$p_72})));if(e.length){d=a>-1?a:e.findIndex(function(a){return a.getLang()==null&&a.getRole()==null});d=d>-1?d:0;return this.$Player$p_99(a>=0&&a1&&(f=d("oz-player/utils/OzIbrUtils").getInitialAudioRepresentation(a,this.$Player$p_4,this.$Player$p_16));return f||null};f.$Player$p_123=function(a){return null};f.$Player$p_85=function(a){var b=new(c("oz-player/parsers/OzMpdParser"))({config:this.$Player$p_4,ozParserContext:{mpdUrl:this.$Player$p_18,createXmlParser:this.$Player$p_89,customParsers:this.$Player$p_28,customRepresentationParsers:this.$Player$p_29,customSegmentTimelineParser:this.$Player$p_30},networkManager:this.$Player$p_13,perfLoggerProvider:this.$Player$p_16,drmManager:this.$Player$p_48,initialRepresentationIDs:this.$Player$p_25,blockedRepresentationsManager:this.$Player$p_67,enableAlternativeAudioTracks:this.$Player$p_4.getBool("enable_alternative_audio_tracks"),useManagedMediaSource:this.$Player$p_78});a=b.parse(a);this.$Player$p_10.addSubscriptions(b.onError(this.$Player$p_11.emitError));b=d("oz-player/utils/OzPlaybackRestrictionsUtils").applyVideoPlaybackRestrictions(this.$Player$p_31,this.$Player$p_103(),a.getVideoRepresentations());if(b.length>1){var e=d("oz-player/utils/OzMimeUtil").getParsedCodecFamily(b[0].getMimeCodecs());this.$Player$p_76=!b.reduce(function(a,b){return a&&d("oz-player/utils/OzMimeUtil").getParsedCodecFamily(b.getMimeCodecs())===e},!0)}return a};f.$Player$p_79=function(){var a=[];this.$Player$p_17&&a.push(new(d("oz-player/loggings/OzDevConsolePerfLogger").OzDevConsolePerfLoggerProvider)());return a};f.$Player$p_124=function(a,b){b=this.$Player$p_5.get(b);return b?b.getRepresentationIDAtTime(a):null};f.getAudioRepresentationIDAtTime=function(a){return this.$Player$p_124(a,"audio")};f.getVideoRepresentationIDAtTime=function(a){return this.$Player$p_124(a,"video")};f.getCurrentVideoRepresentation=function(){return this.$Player$p_125("video")};f.getCurrentAudioRepresentation=function(){return this.$Player$p_125("audio")};f.getCurrentPlayingAudioTrackID=function(){var a=this.getCurrentAudioRepresentation();return a==null?void 0:a.getID()};f.$Player$p_125=function(a){var b=this.$Player$p_124(this.$Player$p_14.getCurrentTime(),a),c=this.$Player$p_9;if(!c)return null;c=[];a==="audio"?c=this.$Player$p_112():a==="video"&&(c=this.$Player$p_102());return(a=c.find(function(a){return a.getID()===b}))!=null?a:null};f.getSelectedVideoRepresentation=function(){var a=this.$Player$p_5.get("video");return a!=null?a.getCurrentRepresentation():null};f.getSelectedAudioRepresentation=function(){var a=this.$Player$p_5.get("audio");return a!=null?a.getCurrentRepresentation():null};f.getDebug=function(){var a=this,b=this.$Player$p_5.get("video"),c=this.$Player$p_5.get("audio"),d=this.$Player$p_5.get("caption"),e,f,g,h,j,k,l;if(b){var m;e=(m=b.getDebug())==null?void 0:m.MediaStreamAbrManager;f=(m=b.getDebug())==null?void 0:m.SourceBufferManager;if(f){g=(m=f.getDebug())==null?void 0:m.SourceBuffer}}if(c){h=(m=c.getDebug())==null?void 0:m.SourceBufferManager;if(h){j=(m=h.getDebug())==null?void 0:m.SourceBuffer}}if(d){k=(m=d.getDebug())==null?void 0:m.SourceBufferManager;if(k){l=(m=k.getDebug())==null?void 0:m.SourceBuffer}}return{getManifest:function(){return i(a.$Player$p_9)},DashManifestParsed:this.$Player$p_9,VideoSourceStream:b,VideoAbrManager:e,VideoBufferManager:f,VideoSourceBuffer:g,AudioSourceStream:c,AudioBufferManager:h,AudioSourceBuffer:j,CaptionSourceStream:d,CaptionBufferManager:k,CaptionSourceBuffer:l}};f.injectExternalDebugEvent=function(a,b){this.$Player$p_108(a,b)};f.$Player$p_108=function(a,b){this.emit("debug/dashPlayerEvent",{detail:{type:a,event:b}})};f.$Player$p_82=function(){var a=this,b=new(c("oz-player/strategies/OzBufferingDetector"))(this.$Player$p_3,this.$Player$p_4.getLegacyConfig(),function(){return a.$Player$p_51?a.$Player$p_3.duration:Infinity});b.attachPerfLoggerProvider(this.$Player$p_16);this.$Player$p_10.addSubscriptions(b.addListener("enterBuffering",function(b){a.emit("enterBuffering",b)}),b.addListener("leaveBuffering",function(b){a.emit("leaveBuffering",b)}));return b};f.$Player$p_103=function(){var a=this.$Player$p_52?this.$Player$p_52():{width:this.$Player$p_3.offsetWidth,height:this.$Player$p_3.offsetHeight};return a};f.getMpdUrl=function(){return this.$Player$p_18};f.$Player$p_98=function(a){var b=this;this.$Player$p_18=a;var c=this.$Player$p_9;if(!c){this.$Player$p_60=!0;return}else{c.updateLocation(a);this.$Player$p_43&&(this.$Player$p_10.releaseOne(this.$Player$p_43),this.$Player$p_43=null);a=function(){b.$Player$p_43&&(b.$Player$p_10.releaseOne(b.$Player$p_43),b.$Player$p_43=null),b.$Player$p_5.forEach(function(a,d){var e=a.getCurrentRepresentation(),f=e.getDisplayLabel();e=(d==="video"?b.$Player$p_102():c.getAudioRepresentations()).slice();if(d==="video"){d=b.$Player$p_6.get(d);d&&d.updateRepresentations(b.$Player$p_102())}d=e[0];e.forEach(function(a){var b=a.getDisplayLabel();b===f&&(d=a)});a.switchRepresentation(d);a.restartLoopBody()})};this.$Player$p_43=c.addListener("updated",a);this.$Player$p_10.addSubscriptions(this.$Player$p_43)}};f.getPerfLoggerProvider=function(){return this.$Player$p_16};f.getApproximateFBLSToPlayerDisplayLatency=function(){var a,b;a=Number((a=(a=this.$Player$p_9)==null?void 0:a.getCustomField("lastVideoFrameTs"))!=null?a:void 0);b=Number((b=(b=this.$Player$p_9)==null?void 0:b.getCustomField("currentServerTimeMs"))!=null?b:void 0);var c=this.$Player$p_126(a,b);a=this.$Player$p_127(a,b);return{latencyFromClockSync:a,latencyFromMpdUpdate:c}};f.$Player$p_126=function(a,b){if(!this.$Player$p_14.getCurrentTime()||isNaN(a)||isNaN(b))return null;b=0;this.$Player$p_58===a?b=(c("oz-player/shims/OzPerformance").now()-Number(this.$Player$p_59))/1e3:(this.$Player$p_59=c("oz-player/shims/OzPerformance").now(),this.$Player$p_58=a);a=a/1e3+b-this.$Player$p_14.getCurrentTime();return a};f.$Player$p_127=function(a,b){var d;if(!this.$Player$p_14.getCurrentTime()||isNaN(a)||isNaN(b)||c("oz-player/networks/OzClientClock").getClientClockOffsetMs()==null||!c("oz-player/networks/OzClientClock").getClientClockOffsetMs())return null;d=this.$Player$p_14.getCurrentTimeUpdateTime()+((d=c("oz-player/networks/OzClientClock").getClientClockOffsetMs())!=null?d:0);b=b;var e=this.$Player$p_14.getCurrentTime()*1e3;a=a;d=(d-b-(e-a))/1e3;return d};f.$Player$p_80=function(){this.$Player$p_5.forEach(function(a){a.restartLoopBody();var b=a.getCurrentRepresentation();a.switchRepresentation(b)})};return e}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player",["oz-player/Player"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("oz-player/Player")}),98);