/*******************************************************************************
 * This source code is the proprietary property of Bitmovin, Inc. Unauthorized
 * copying, distribution, or use of this code, or any portion thereof, is
 * strictly prohibited. © 2026 Bitmovin, Inc. All rights reserved. This
 * source code is subject to the terms and conditions of the accompanying
 * license agreement.
 *
 * Bitmovin Player X Version 10.2.0-beta.12
 *******************************************************************************/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.tv=t():(e.bitmovin=e.bitmovin||{},e.bitmovin.playerx=e.bitmovin.playerx||{},e.bitmovin.playerx.tv=t())}(self,(()=>(()=>{"use strict";var e={97085:(e,t)=>{function r(e,t,r){const o=t;return o._name=e,{onAdd:o,dependencies:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.createPackage=void 0,t.createPackage=r},91270:(e,t)=>{function r(e,t){const r=t;return r._name=e,r}function o(e){return(...t)=>{const[o,n]=e(...t);return r(o,n)}}function n(e){var t;return null!==(t=e._name)&&void 0!==t?t:e.name}Object.defineProperty(t,"__esModule",{value:!0}),t.getTaskName=t.createTaskClosure=t.createTask=void 0,t.createTask=r,t.createTaskClosure=o,t.getTaskName=n},14809:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CoreExportNames=void 0,function(e){e.Utils="utils",e.Constants="constants",e.CoreEffects="core-effects",e.CoreStateAtoms="core-state-atoms"}(t.CoreExportNames||(t.CoreExportNames={}))},7269:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SourceExportNames=void 0,function(e){e.CreateSourceStateAtom="create-source-state-atom",e.CreateSourceReference="create-source-reference",e.SourceReferences="source-references",e.SourceState="source-state-atom"}(t.SourceExportNames||(t.SourceExportNames={}))},33621:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TvPackage=t.TvPackageThreadName=void 0;const o=r(97085),n=r(14809),a=r(7269),s=r(6250);t.TvPackageThreadName="tv-package-thread",t.TvPackage=(0,o.createPackage)("tv-package",((e,{registry:t,using:r,effects:o})=>{const{StateEffectFactory:a,EventListenerEffectFactory:c}=t.get(n.CoreExportNames.CoreEffects);return o.logger.log("Using TV package"),r(a).using(c).fork(s.VideoElementQuirksTask,void 0)}),[a.SourceExportNames.SourceState,n.CoreExportNames.CoreEffects]),t.default=t.TvPackage},6250:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VideoElementQuirksTask=void 0;const o=r(91270),n=r(7269),a=r(33621);function s(e,t){const r=t.currentTime;let o=!1;for(let e=0;e<t.buffered.length;e++){const n=t.buffered.start(e),a=t.buffered.end(e);if(n<=r&&r<=a){o=!0;break}}e.currentSeekTarget=o?void 0:r}function c(e,t,r){const o=e.currentSeekTarget;void 0!==o&&t.currentTime<o&&(r.stopPropagation(),r.preventDefault(),e.logger.log(`Fixing incorrect seek target: ${t.currentTime} -> ${o}`),t.currentTime=o),e.currentSeekTarget=void 0}function i(e,t){const r=s.bind(void 0,t,e),o=c.bind(void 0,t,e);return e.addEventListener("seeking",r),e.addEventListener("seeked",o,!0),()=>{e.removeEventListener("seeking",r),e.removeEventListener("seeked",o,!0)}}const u="video-element-listener-thread",d=(0,o.createTaskClosure)((e=>[u,(t,r)=>{t.video.element?e.detachEventListeners=i(t.video.element,e):e.detachEventListeners()}]));t.VideoElementQuirksTask=(0,o.createTask)(a.TvPackageThreadName,(function(e,t){const r=t.registry.get(n.SourceExportNames.SourceState),o={logger:t.effects.logger,currentSeekTarget:void 0,detachEventListeners:()=>{}},a=d(o),s=()=>(o.detachEventListeners(),!1);return t.effects.state.subscribe(t,r,a,s),t.effects.loop(t.abortSignal)}))}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,r),a.exports}return r(33621)})()));