@halibegic/react-video-player 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/components/icons/start-over-icon.d.ts +2 -0
  2. package/dist/components/{player/live-player → live-player}/live-player-go-live.d.ts +1 -1
  3. package/dist/components/live-player/live-player-start-over.d.ts +2 -0
  4. package/dist/react-video-player.es.js +409 -393
  5. package/dist/react-video-player.es.js.map +1 -1
  6. package/dist/react-video-player.umd.js +51 -47
  7. package/dist/react-video-player.umd.js.map +1 -1
  8. package/dist/stores/player-store.d.ts +1 -8
  9. package/dist/utils/player.d.ts +1 -1
  10. package/package.json +1 -1
  11. /package/dist/components/{player/ui/icons → icons}/arrow-right-icon.d.ts +0 -0
  12. /package/dist/components/{player/ui/icons → icons}/check-icon.d.ts +0 -0
  13. /package/dist/components/{player/ui/icons → icons}/fullscreen-enter-icon.d.ts +0 -0
  14. /package/dist/components/{player/ui/icons → icons}/fullscreen-exit-icon.d.ts +0 -0
  15. /package/dist/components/{player/ui/icons → icons}/hd-icon.d.ts +0 -0
  16. /package/dist/components/{player/ui/icons → icons}/pause-icon.d.ts +0 -0
  17. /package/dist/components/{player/ui/icons → icons}/play-icon.d.ts +0 -0
  18. /package/dist/components/{player/ui/icons → icons}/volume-max-icon.d.ts +0 -0
  19. /package/dist/components/{player/ui/icons → icons}/volume-min-icon.d.ts +0 -0
  20. /package/dist/components/{player/ui/icons → icons}/volume-mute-icon.d.ts +0 -0
  21. /package/dist/components/{player/live-player → live-player}/live-player-event-check.d.ts +0 -0
  22. /package/dist/components/{player/live-player → live-player}/live-player-playback-indicator.d.ts +0 -0
  23. /package/dist/components/{player/live-player → live-player}/live-player-playback.d.ts +0 -0
  24. /package/dist/components/{player/live-player → live-player}/live-player-progress.d.ts +0 -0
  25. /package/dist/components/{player/live-player → live-player}/live-player-provider.d.ts +0 -0
  26. /package/dist/components/{player/live-player → live-player}/live-player-remaining-time.d.ts +0 -0
  27. /package/dist/components/{player/live-player → live-player}/live-player-tech.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- (function(O,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react"),require("zustand"),require("styled-components"),require("@radix-ui/react-slider"),require("hls.js"),require("@radix-ui/react-dropdown-menu")):typeof define=="function"&&define.amd?define(["exports","react","zustand","styled-components","@radix-ui/react-slider","hls.js","@radix-ui/react-dropdown-menu"],c):(O=typeof globalThis<"u"?globalThis:O||self,c(O.ReactVideoPlayer={},O.React,O.zustand,O.styled,O.RadixUISlider,O.Hls,O.RadixUIDropdownMenu))})(this,(function(O,c,le,w,Ot,Z,Ht){"use strict";function ke(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const ce=ke(Ot),re=ke(Ht);var ue={exports:{}},oe={};/**
1
+ (function(O,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react"),require("zustand"),require("styled-components"),require("@radix-ui/react-slider"),require("hls.js"),require("@radix-ui/react-dropdown-menu")):typeof define=="function"&&define.amd?define(["exports","react","zustand","styled-components","@radix-ui/react-slider","hls.js","@radix-ui/react-dropdown-menu"],c):(O=typeof globalThis<"u"?globalThis:O||self,c(O.ReactVideoPlayer={},O.React,O.zustand,O.styled,O.RadixUISlider,O.Hls,O.RadixUIDropdownMenu))})(this,(function(O,c,le,b,Ht,J,At){"use strict";function ke(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const ce=ke(Ht),re=ke(At);var ue={exports:{}},oe={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Le;function At(){if(Le)return oe;Le=1;var e=c,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,l=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,m={key:!0,ref:!0,__self:!0,__source:!0};function p(h,a,f){var v,x={},L=null,R=null;f!==void 0&&(L=""+f),a.key!==void 0&&(L=""+a.key),a.ref!==void 0&&(R=a.ref);for(v in a)i.call(a,v)&&!m.hasOwnProperty(v)&&(x[v]=a[v]);if(h&&h.defaultProps)for(v in a=h.defaultProps,a)x[v]===void 0&&(x[v]=a[v]);return{$$typeof:n,type:h,key:L,ref:R,props:x,_owner:l.current}}return oe.Fragment=r,oe.jsx=p,oe.jsxs=p,oe}var ie={};/**
9
+ */var Le;function Ut(){if(Le)return oe;Le=1;var e=c,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,l=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,m={key:!0,ref:!0,__self:!0,__source:!0};function p(h,a,f){var v,x={},L=null,j=null;f!==void 0&&(L=""+f),a.key!==void 0&&(L=""+a.key),a.ref!==void 0&&(j=a.ref);for(v in a)i.call(a,v)&&!m.hasOwnProperty(v)&&(x[v]=a[v]);if(h&&h.defaultProps)for(v in a=h.defaultProps,a)x[v]===void 0&&(x[v]=a[v]);return{$$typeof:n,type:h,key:L,ref:j,props:x,_owner:l.current}}return oe.Fragment=r,oe.jsx=p,oe.jsxs=p,oe}var ie={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,20 +14,20 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var _e;function Ut(){return _e||(_e=1,process.env.NODE_ENV!=="production"&&(function(){var e=c,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),h=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),M=Symbol.iterator,_="@@iterator";function U(t){if(t===null||typeof t!="object")return null;var s=M&&t[M]||t[_];return typeof s=="function"?s:null}var F=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function P(t){{for(var s=arguments.length,d=new Array(s>1?s-1:0),y=1;y<s;y++)d[y-1]=arguments[y];g("error",t,d)}}function g(t,s,d){{var y=F.ReactDebugCurrentFrame,S=y.getStackAddendum();S!==""&&(s+="%s",d=d.concat([S]));var j=d.map(function(T){return String(T)});j.unshift("Warning: "+s),Function.prototype.apply.call(console[t],console,j)}}var W=!1,z=!1,X=!1,ee=!1,K=!1,G;G=Symbol.for("react.module.reference");function C(t){return!!(typeof t=="string"||typeof t=="function"||t===i||t===m||K||t===l||t===f||t===v||ee||t===R||W||z||X||typeof t=="object"&&t!==null&&(t.$$typeof===L||t.$$typeof===x||t.$$typeof===p||t.$$typeof===h||t.$$typeof===a||t.$$typeof===G||t.getModuleId!==void 0))}function me(t,s,d){var y=t.displayName;if(y)return y;var S=s.displayName||s.name||"";return S!==""?d+"("+S+")":d}function Q(t){return t.displayName||"Context"}function H(t){if(t==null)return null;if(typeof t.tag=="number"&&P("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case i:return"Fragment";case r:return"Portal";case m:return"Profiler";case l:return"StrictMode";case f:return"Suspense";case v:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case h:var s=t;return Q(s)+".Consumer";case p:var d=t;return Q(d._context)+".Provider";case a:return me(t,t.render,"ForwardRef");case x:var y=t.displayName||null;return y!==null?y:H(t.type)||"Memo";case L:{var S=t,j=S._payload,T=S._init;try{return H(T(j))}catch{return null}}}return null}var N=Object.assign,Y=0,se,B,vt,gt,yt,xt,bt;function wt(){}wt.__reactDisabledLog=!0;function lr(){{if(Y===0){se=console.log,B=console.info,vt=console.warn,gt=console.error,yt=console.group,xt=console.groupCollapsed,bt=console.groupEnd;var t={configurable:!0,enumerable:!0,value:wt,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}Y++}}function cr(){{if(Y--,Y===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},t,{value:se}),info:N({},t,{value:B}),warn:N({},t,{value:vt}),error:N({},t,{value:gt}),group:N({},t,{value:yt}),groupCollapsed:N({},t,{value:xt}),groupEnd:N({},t,{value:bt})})}Y<0&&P("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var we=F.ReactCurrentDispatcher,Te;function pe(t,s,d){{if(Te===void 0)try{throw Error()}catch(S){var y=S.stack.trim().match(/\n( *(at )?)/);Te=y&&y[1]||""}return`
18
- `+Te+t}}var Ce=!1,ve;{var ur=typeof WeakMap=="function"?WeakMap:Map;ve=new ur}function Tt(t,s){if(!t||Ce)return"";{var d=ve.get(t);if(d!==void 0)return d}var y;Ce=!0;var S=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var j;j=we.current,we.current=null,lr();try{if(s){var T=function(){throw Error()};if(Object.defineProperty(T.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(T,[])}catch(V){y=V}Reflect.construct(t,[],T)}else{try{T.call()}catch(V){y=V}t.call(T.prototype)}}else{try{throw Error()}catch(V){y=V}t()}}catch(V){if(V&&y&&typeof V.stack=="string"){for(var b=V.stack.split(`
17
+ */var _e;function Nt(){return _e||(_e=1,process.env.NODE_ENV!=="production"&&(function(){var e=c,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),h=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),j=Symbol.for("react.offscreen"),M=Symbol.iterator,_="@@iterator";function U(t){if(t===null||typeof t!="object")return null;var s=M&&t[M]||t[_];return typeof s=="function"?s:null}var D=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function P(t){{for(var s=arguments.length,d=new Array(s>1?s-1:0),y=1;y<s;y++)d[y-1]=arguments[y];g("error",t,d)}}function g(t,s,d){{var y=D.ReactDebugCurrentFrame,S=y.getStackAddendum();S!==""&&(s+="%s",d=d.concat([S]));var R=d.map(function(C){return String(C)});R.unshift("Warning: "+s),Function.prototype.apply.call(console[t],console,R)}}var z=!1,Z=!1,X=!1,ee=!1,K=!1,G;G=Symbol.for("react.module.reference");function T(t){return!!(typeof t=="string"||typeof t=="function"||t===i||t===m||K||t===l||t===f||t===v||ee||t===j||z||Z||X||typeof t=="object"&&t!==null&&(t.$$typeof===L||t.$$typeof===x||t.$$typeof===p||t.$$typeof===h||t.$$typeof===a||t.$$typeof===G||t.getModuleId!==void 0))}function me(t,s,d){var y=t.displayName;if(y)return y;var S=s.displayName||s.name||"";return S!==""?d+"("+S+")":d}function Q(t){return t.displayName||"Context"}function H(t){if(t==null)return null;if(typeof t.tag=="number"&&P("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case i:return"Fragment";case r:return"Portal";case m:return"Profiler";case l:return"StrictMode";case f:return"Suspense";case v:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case h:var s=t;return Q(s)+".Consumer";case p:var d=t;return Q(d._context)+".Provider";case a:return me(t,t.render,"ForwardRef");case x:var y=t.displayName||null;return y!==null?y:H(t.type)||"Memo";case L:{var S=t,R=S._payload,C=S._init;try{return H(C(R))}catch{return null}}}return null}var N=Object.assign,Y=0,se,B,gt,yt,xt,wt,bt;function Ct(){}Ct.__reactDisabledLog=!0;function cr(){{if(Y===0){se=console.log,B=console.info,gt=console.warn,yt=console.error,xt=console.group,wt=console.groupCollapsed,bt=console.groupEnd;var t={configurable:!0,enumerable:!0,value:Ct,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}Y++}}function ur(){{if(Y--,Y===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},t,{value:se}),info:N({},t,{value:B}),warn:N({},t,{value:gt}),error:N({},t,{value:yt}),group:N({},t,{value:xt}),groupCollapsed:N({},t,{value:wt}),groupEnd:N({},t,{value:bt})})}Y<0&&P("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var be=D.ReactCurrentDispatcher,Ce;function pe(t,s,d){{if(Ce===void 0)try{throw Error()}catch(S){var y=S.stack.trim().match(/\n( *(at )?)/);Ce=y&&y[1]||""}return`
18
+ `+Ce+t}}var Te=!1,ve;{var dr=typeof WeakMap=="function"?WeakMap:Map;ve=new dr}function Tt(t,s){if(!t||Te)return"";{var d=ve.get(t);if(d!==void 0)return d}var y;Te=!0;var S=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var R;R=be.current,be.current=null,cr();try{if(s){var C=function(){throw Error()};if(Object.defineProperty(C.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(C,[])}catch(V){y=V}Reflect.construct(t,[],C)}else{try{C.call()}catch(V){y=V}t.call(C.prototype)}}else{try{throw Error()}catch(V){y=V}t()}}catch(V){if(V&&y&&typeof V.stack=="string"){for(var w=V.stack.split(`
19
19
  `),I=y.stack.split(`
20
- `),E=b.length-1,k=I.length-1;E>=1&&k>=0&&b[E]!==I[k];)k--;for(;E>=1&&k>=0;E--,k--)if(b[E]!==I[k]){if(E!==1||k!==1)do if(E--,k--,k<0||b[E]!==I[k]){var A=`
21
- `+b[E].replace(" at new "," at ");return t.displayName&&A.includes("<anonymous>")&&(A=A.replace("<anonymous>",t.displayName)),typeof t=="function"&&ve.set(t,A),A}while(E>=1&&k>=0);break}}}finally{Ce=!1,we.current=j,cr(),Error.prepareStackTrace=S}var ne=t?t.displayName||t.name:"",q=ne?pe(ne):"";return typeof t=="function"&&ve.set(t,q),q}function dr(t,s,d){return Tt(t,!1)}function fr(t){var s=t.prototype;return!!(s&&s.isReactComponent)}function ge(t,s,d){if(t==null)return"";if(typeof t=="function")return Tt(t,fr(t));if(typeof t=="string")return pe(t);switch(t){case f:return pe("Suspense");case v:return pe("SuspenseList")}if(typeof t=="object")switch(t.$$typeof){case a:return dr(t.render);case x:return ge(t.type,s,d);case L:{var y=t,S=y._payload,j=y._init;try{return ge(j(S),s,d)}catch{}}}return""}var ae=Object.prototype.hasOwnProperty,Ct={},St=F.ReactDebugCurrentFrame;function ye(t){if(t){var s=t._owner,d=ge(t.type,t._source,s?s.type:null);St.setExtraStackFrame(d)}else St.setExtraStackFrame(null)}function hr(t,s,d,y,S){{var j=Function.call.bind(ae);for(var T in t)if(j(t,T)){var b=void 0;try{if(typeof t[T]!="function"){var I=Error((y||"React class")+": "+d+" type `"+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[T]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw I.name="Invariant Violation",I}b=t[T](s,T,y,d,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(E){b=E}b&&!(b instanceof Error)&&(ye(S),P("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",y||"React class",d,T,typeof b),ye(null)),b instanceof Error&&!(b.message in Ct)&&(Ct[b.message]=!0,ye(S),P("Failed %s type: %s",d,b.message),ye(null))}}}var mr=Array.isArray;function Se(t){return mr(t)}function pr(t){{var s=typeof Symbol=="function"&&Symbol.toStringTag,d=s&&t[Symbol.toStringTag]||t.constructor.name||"Object";return d}}function vr(t){try{return Rt(t),!1}catch{return!0}}function Rt(t){return""+t}function jt(t){if(vr(t))return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",pr(t)),Rt(t)}var Pt=F.ReactCurrentOwner,gr={key:!0,ref:!0,__self:!0,__source:!0},Et,kt;function yr(t){if(ae.call(t,"ref")){var s=Object.getOwnPropertyDescriptor(t,"ref").get;if(s&&s.isReactWarning)return!1}return t.ref!==void 0}function xr(t){if(ae.call(t,"key")){var s=Object.getOwnPropertyDescriptor(t,"key").get;if(s&&s.isReactWarning)return!1}return t.key!==void 0}function br(t,s){typeof t.ref=="string"&&Pt.current}function wr(t,s){{var d=function(){Et||(Et=!0,P("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",s))};d.isReactWarning=!0,Object.defineProperty(t,"key",{get:d,configurable:!0})}}function Tr(t,s){{var d=function(){kt||(kt=!0,P("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",s))};d.isReactWarning=!0,Object.defineProperty(t,"ref",{get:d,configurable:!0})}}var Cr=function(t,s,d,y,S,j,T){var b={$$typeof:n,type:t,key:s,ref:d,props:T,_owner:j};return b._store={},Object.defineProperty(b._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(b,"_self",{configurable:!1,enumerable:!1,writable:!1,value:y}),Object.defineProperty(b,"_source",{configurable:!1,enumerable:!1,writable:!1,value:S}),Object.freeze&&(Object.freeze(b.props),Object.freeze(b)),b};function Sr(t,s,d,y,S){{var j,T={},b=null,I=null;d!==void 0&&(jt(d),b=""+d),xr(s)&&(jt(s.key),b=""+s.key),yr(s)&&(I=s.ref,br(s,S));for(j in s)ae.call(s,j)&&!gr.hasOwnProperty(j)&&(T[j]=s[j]);if(t&&t.defaultProps){var E=t.defaultProps;for(j in E)T[j]===void 0&&(T[j]=E[j])}if(b||I){var k=typeof t=="function"?t.displayName||t.name||"Unknown":t;b&&wr(T,k),I&&Tr(T,k)}return Cr(t,b,I,S,y,Pt.current,T)}}var Re=F.ReactCurrentOwner,Lt=F.ReactDebugCurrentFrame;function te(t){if(t){var s=t._owner,d=ge(t.type,t._source,s?s.type:null);Lt.setExtraStackFrame(d)}else Lt.setExtraStackFrame(null)}var je;je=!1;function Pe(t){return typeof t=="object"&&t!==null&&t.$$typeof===n}function _t(){{if(Re.current){var t=H(Re.current.type);if(t)return`
20
+ `),E=w.length-1,k=I.length-1;E>=1&&k>=0&&w[E]!==I[k];)k--;for(;E>=1&&k>=0;E--,k--)if(w[E]!==I[k]){if(E!==1||k!==1)do if(E--,k--,k<0||w[E]!==I[k]){var A=`
21
+ `+w[E].replace(" at new "," at ");return t.displayName&&A.includes("<anonymous>")&&(A=A.replace("<anonymous>",t.displayName)),typeof t=="function"&&ve.set(t,A),A}while(E>=1&&k>=0);break}}}finally{Te=!1,be.current=R,ur(),Error.prepareStackTrace=S}var ne=t?t.displayName||t.name:"",q=ne?pe(ne):"";return typeof t=="function"&&ve.set(t,q),q}function fr(t,s,d){return Tt(t,!1)}function hr(t){var s=t.prototype;return!!(s&&s.isReactComponent)}function ge(t,s,d){if(t==null)return"";if(typeof t=="function")return Tt(t,hr(t));if(typeof t=="string")return pe(t);switch(t){case f:return pe("Suspense");case v:return pe("SuspenseList")}if(typeof t=="object")switch(t.$$typeof){case a:return fr(t.render);case x:return ge(t.type,s,d);case L:{var y=t,S=y._payload,R=y._init;try{return ge(R(S),s,d)}catch{}}}return""}var ae=Object.prototype.hasOwnProperty,St={},jt=D.ReactDebugCurrentFrame;function ye(t){if(t){var s=t._owner,d=ge(t.type,t._source,s?s.type:null);jt.setExtraStackFrame(d)}else jt.setExtraStackFrame(null)}function mr(t,s,d,y,S){{var R=Function.call.bind(ae);for(var C in t)if(R(t,C)){var w=void 0;try{if(typeof t[C]!="function"){var I=Error((y||"React class")+": "+d+" type `"+C+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[C]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw I.name="Invariant Violation",I}w=t[C](s,C,y,d,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(E){w=E}w&&!(w instanceof Error)&&(ye(S),P("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",y||"React class",d,C,typeof w),ye(null)),w instanceof Error&&!(w.message in St)&&(St[w.message]=!0,ye(S),P("Failed %s type: %s",d,w.message),ye(null))}}}var pr=Array.isArray;function Se(t){return pr(t)}function vr(t){{var s=typeof Symbol=="function"&&Symbol.toStringTag,d=s&&t[Symbol.toStringTag]||t.constructor.name||"Object";return d}}function gr(t){try{return Rt(t),!1}catch{return!0}}function Rt(t){return""+t}function Pt(t){if(gr(t))return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",vr(t)),Rt(t)}var Et=D.ReactCurrentOwner,yr={key:!0,ref:!0,__self:!0,__source:!0},kt,Lt;function xr(t){if(ae.call(t,"ref")){var s=Object.getOwnPropertyDescriptor(t,"ref").get;if(s&&s.isReactWarning)return!1}return t.ref!==void 0}function wr(t){if(ae.call(t,"key")){var s=Object.getOwnPropertyDescriptor(t,"key").get;if(s&&s.isReactWarning)return!1}return t.key!==void 0}function br(t,s){typeof t.ref=="string"&&Et.current}function Cr(t,s){{var d=function(){kt||(kt=!0,P("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",s))};d.isReactWarning=!0,Object.defineProperty(t,"key",{get:d,configurable:!0})}}function Tr(t,s){{var d=function(){Lt||(Lt=!0,P("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",s))};d.isReactWarning=!0,Object.defineProperty(t,"ref",{get:d,configurable:!0})}}var Sr=function(t,s,d,y,S,R,C){var w={$$typeof:n,type:t,key:s,ref:d,props:C,_owner:R};return w._store={},Object.defineProperty(w._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(w,"_self",{configurable:!1,enumerable:!1,writable:!1,value:y}),Object.defineProperty(w,"_source",{configurable:!1,enumerable:!1,writable:!1,value:S}),Object.freeze&&(Object.freeze(w.props),Object.freeze(w)),w};function jr(t,s,d,y,S){{var R,C={},w=null,I=null;d!==void 0&&(Pt(d),w=""+d),wr(s)&&(Pt(s.key),w=""+s.key),xr(s)&&(I=s.ref,br(s,S));for(R in s)ae.call(s,R)&&!yr.hasOwnProperty(R)&&(C[R]=s[R]);if(t&&t.defaultProps){var E=t.defaultProps;for(R in E)C[R]===void 0&&(C[R]=E[R])}if(w||I){var k=typeof t=="function"?t.displayName||t.name||"Unknown":t;w&&Cr(C,k),I&&Tr(C,k)}return Sr(t,w,I,S,y,Et.current,C)}}var je=D.ReactCurrentOwner,_t=D.ReactDebugCurrentFrame;function te(t){if(t){var s=t._owner,d=ge(t.type,t._source,s?s.type:null);_t.setExtraStackFrame(d)}else _t.setExtraStackFrame(null)}var Re;Re=!1;function Pe(t){return typeof t=="object"&&t!==null&&t.$$typeof===n}function Ft(){{if(je.current){var t=H(je.current.type);if(t)return`
22
22
 
23
- Check the render method of \``+t+"`."}return""}}function Rr(t){return""}var Ft={};function jr(t){{var s=_t();if(!s){var d=typeof t=="string"?t:t.displayName||t.name;d&&(s=`
23
+ Check the render method of \``+t+"`."}return""}}function Rr(t){return""}var Dt={};function Pr(t){{var s=Ft();if(!s){var d=typeof t=="string"?t:t.displayName||t.name;d&&(s=`
24
24
 
25
- Check the top-level render call using <`+d+">.")}return s}}function It(t,s){{if(!t._store||t._store.validated||t.key!=null)return;t._store.validated=!0;var d=jr(s);if(Ft[d])return;Ft[d]=!0;var y="";t&&t._owner&&t._owner!==Re.current&&(y=" It was passed a child from "+H(t._owner.type)+"."),te(t),P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',d,y),te(null)}}function Dt(t,s){{if(typeof t!="object")return;if(Se(t))for(var d=0;d<t.length;d++){var y=t[d];Pe(y)&&It(y,s)}else if(Pe(t))t._store&&(t._store.validated=!0);else if(t){var S=U(t);if(typeof S=="function"&&S!==t.entries)for(var j=S.call(t),T;!(T=j.next()).done;)Pe(T.value)&&It(T.value,s)}}}function Pr(t){{var s=t.type;if(s==null||typeof s=="string")return;var d;if(typeof s=="function")d=s.propTypes;else if(typeof s=="object"&&(s.$$typeof===a||s.$$typeof===x))d=s.propTypes;else return;if(d){var y=H(s);hr(d,t.props,"prop",y,t)}else if(s.PropTypes!==void 0&&!je){je=!0;var S=H(s);P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",S||"Unknown")}typeof s.getDefaultProps=="function"&&!s.getDefaultProps.isReactClassApproved&&P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Er(t){{for(var s=Object.keys(t.props),d=0;d<s.length;d++){var y=s[d];if(y!=="children"&&y!=="key"){te(t),P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",y),te(null);break}}t.ref!==null&&(te(t),P("Invalid attribute `ref` supplied to `React.Fragment`."),te(null))}}var Mt={};function Vt(t,s,d,y,S,j){{var T=C(t);if(!T){var b="";(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(b+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var I=Rr();I?b+=I:b+=_t();var E;t===null?E="null":Se(t)?E="array":t!==void 0&&t.$$typeof===n?(E="<"+(H(t.type)||"Unknown")+" />",b=" Did you accidentally export a JSX literal instead of a component?"):E=typeof t,P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",E,b)}var k=Sr(t,s,d,S,j);if(k==null)return k;if(T){var A=s.children;if(A!==void 0)if(y)if(Se(A)){for(var ne=0;ne<A.length;ne++)Dt(A[ne],t);Object.freeze&&Object.freeze(A)}else P("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Dt(A,t)}if(ae.call(s,"key")){var q=H(t),V=Object.keys(s).filter(function(Dr){return Dr!=="key"}),Ee=V.length>0?"{key: someKey, "+V.join(": ..., ")+": ...}":"{key: someKey}";if(!Mt[q+Ee]){var Ir=V.length>0?"{"+V.join(": ..., ")+": ...}":"{}";P(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+d+">.")}return s}}function It(t,s){{if(!t._store||t._store.validated||t.key!=null)return;t._store.validated=!0;var d=Pr(s);if(Dt[d])return;Dt[d]=!0;var y="";t&&t._owner&&t._owner!==je.current&&(y=" It was passed a child from "+H(t._owner.type)+"."),te(t),P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',d,y),te(null)}}function Mt(t,s){{if(typeof t!="object")return;if(Se(t))for(var d=0;d<t.length;d++){var y=t[d];Pe(y)&&It(y,s)}else if(Pe(t))t._store&&(t._store.validated=!0);else if(t){var S=U(t);if(typeof S=="function"&&S!==t.entries)for(var R=S.call(t),C;!(C=R.next()).done;)Pe(C.value)&&It(C.value,s)}}}function Er(t){{var s=t.type;if(s==null||typeof s=="string")return;var d;if(typeof s=="function")d=s.propTypes;else if(typeof s=="object"&&(s.$$typeof===a||s.$$typeof===x))d=s.propTypes;else return;if(d){var y=H(s);mr(d,t.props,"prop",y,t)}else if(s.PropTypes!==void 0&&!Re){Re=!0;var S=H(s);P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",S||"Unknown")}typeof s.getDefaultProps=="function"&&!s.getDefaultProps.isReactClassApproved&&P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function kr(t){{for(var s=Object.keys(t.props),d=0;d<s.length;d++){var y=s[d];if(y!=="children"&&y!=="key"){te(t),P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",y),te(null);break}}t.ref!==null&&(te(t),P("Invalid attribute `ref` supplied to `React.Fragment`."),te(null))}}var Vt={};function Ot(t,s,d,y,S,R){{var C=T(t);if(!C){var w="";(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(w+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var I=Rr();I?w+=I:w+=Ft();var E;t===null?E="null":Se(t)?E="array":t!==void 0&&t.$$typeof===n?(E="<"+(H(t.type)||"Unknown")+" />",w=" Did you accidentally export a JSX literal instead of a component?"):E=typeof t,P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",E,w)}var k=jr(t,s,d,S,R);if(k==null)return k;if(C){var A=s.children;if(A!==void 0)if(y)if(Se(A)){for(var ne=0;ne<A.length;ne++)Mt(A[ne],t);Object.freeze&&Object.freeze(A)}else P("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Mt(A,t)}if(ae.call(s,"key")){var q=H(t),V=Object.keys(s).filter(function(Mr){return Mr!=="key"}),Ee=V.length>0?"{key: someKey, "+V.join(": ..., ")+": ...}":"{key: someKey}";if(!Vt[q+Ee]){var Ir=V.length>0?"{"+V.join(": ..., ")+": ...}":"{}";P(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,Ee,q,Ir,q),Mt[q+Ee]=!0}}return t===i?Er(k):Pr(k),k}}function kr(t,s,d){return Vt(t,s,d,!0)}function Lr(t,s,d){return Vt(t,s,d,!1)}var _r=Lr,Fr=kr;ie.Fragment=i,ie.jsx=_r,ie.jsxs=Fr})()),ie}var Fe;function Nt(){return Fe||(Fe=1,process.env.NODE_ENV==="production"?ue.exports=At():ue.exports=Ut()),ue.exports}var o=Nt();const Bt=typeof window<"u"?c.useLayoutEffect:c.useEffect;function de(e,n){const r=c.useRef(e);Bt(()=>{r.current=e},[e]),c.useEffect(()=>{if(n===null)return;const i=setInterval(()=>{r.current()},n);return()=>{clearInterval(i)}},[n])}function Wt(e){const[,n]=c.useState(0);de(()=>n(r=>r+1),e)}const zt=(e,n)=>le.create(r=>({delay:0,startDate:e,endDate:n,startTime:e.getTime(),endTime:n.getTime(),setDelay:i=>r({delay:i}),setStartDate:i=>r({startDate:i}),setEndDate:i=>r({endDate:i})})),Ie=c.createContext(null),Yt=({children:e,startDate:n,endDate:r})=>{const i=c.useRef(null);return i.current||(i.current=zt(n,r)),o.jsx(Ie.Provider,{value:i.current,children:e})},D=e=>{const n=c.useContext(Ie);if(!n)throw new Error("usePlayerStore must be used within PlayerStoreProvider");return le.useStore(n,e)};function Zt({children:e,eventFinishedMessage:n,eventNotStartedMessage:r,eventStartingSoonMessage:i}){const l=D(f=>f.startDate),m=D(f=>f.endDate),p=Date.now(),h=p<l.getTime(),a=p>m.getTime();return Wt(5e3),h?o.jsx(Jt,{startDate:l,title:r||"Event has not started yet.",message:i||"Starting in few seconds..."}):a?o.jsx(Xt,{title:n||"Event has finished."}):o.jsx(o.Fragment,{children:e})}function Jt({startDate:e,title:n,message:r}){const i=e.getTime()-Date.now(),l=Math.floor(i/(1e3*60*60)),m=Math.floor(i%(1e3*60*60)/(1e3*60));return l||m?o.jsxs(xe,{children:[o.jsx(be,{children:n}),o.jsxs(Kt,{children:["(",l>0?`${l}h ${m}m`:`${m}m`,")"]})]}):o.jsx(xe,{children:o.jsx(be,{children:r})})}function Xt({title:e}){return o.jsx(xe,{children:o.jsx(be,{children:e})})}const xe=w.div`
30
+ <%s key={someKey} {...props} />`,Ee,q,Ir,q),Vt[q+Ee]=!0}}return t===i?kr(k):Er(k),k}}function Lr(t,s,d){return Ot(t,s,d,!0)}function _r(t,s,d){return Ot(t,s,d,!1)}var Fr=_r,Dr=Lr;ie.Fragment=i,ie.jsx=Fr,ie.jsxs=Dr})()),ie}var Fe;function Bt(){return Fe||(Fe=1,process.env.NODE_ENV==="production"?ue.exports=Ut():ue.exports=Nt()),ue.exports}var o=Bt();const Wt=typeof window<"u"?c.useLayoutEffect:c.useEffect;function de(e,n){const r=c.useRef(e);Wt(()=>{r.current=e},[e]),c.useEffect(()=>{if(n===null)return;const i=setInterval(()=>{r.current()},n);return()=>{clearInterval(i)}},[n])}function zt(e){const[,n]=c.useState(0);de(()=>n(r=>r+1),e)}const Zt=(e,n)=>le.create(r=>({delay:0,startDate:e,endDate:n,startTime:e.getTime(),endTime:n.getTime(),setDelay:i=>r({delay:i}),setStartDate:i=>r({startDate:i}),setEndDate:i=>r({endDate:i})})),De=c.createContext(null),Yt=({children:e,startDate:n,endDate:r})=>{const i=c.useRef(null);return i.current||(i.current=Zt(n,r)),o.jsx(De.Provider,{value:i.current,children:e})},F=e=>{const n=c.useContext(De);if(!n)throw new Error("usePlayerStore must be used within PlayerStoreProvider");return le.useStore(n,e)};function Jt({children:e,eventFinishedMessage:n,eventNotStartedMessage:r,eventStartingSoonMessage:i}){const l=F(f=>f.startDate),m=F(f=>f.endDate),p=Date.now(),h=p<l.getTime(),a=p>m.getTime();return zt(5e3),h?o.jsx(Xt,{startDate:l,title:r||"Event has not started yet.",message:i||"Starting in few seconds..."}):a?o.jsx(Kt,{title:n||"Event has finished."}):o.jsx(o.Fragment,{children:e})}function Xt({startDate:e,title:n,message:r}){const i=e.getTime()-Date.now(),l=Math.floor(i/(1e3*60*60)),m=Math.floor(i%(1e3*60*60)/(1e3*60));return l||m?o.jsxs(xe,{children:[o.jsx(we,{children:n}),o.jsxs(Gt,{children:["(",l>0?`${l}h ${m}m`:`${m}m`,")"]})]}):o.jsx(xe,{children:o.jsx(we,{children:r})})}function Kt({title:e}){return o.jsx(xe,{children:o.jsx(we,{children:e})})}const xe=b.div`
31
31
  position: absolute;
32
32
  top: 0;
33
33
  left: 0;
@@ -40,21 +40,21 @@ React keys must be passed directly to JSX without using spread:
40
40
  justify-content: center;
41
41
  color: black;
42
42
  background: #f7e406;
43
- `,be=w.h3`
43
+ `,we=b.h3`
44
44
  margin: 0;
45
45
  padding: 0.5rem 0;
46
46
  font-size: 1.5rem;
47
47
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
48
48
  "Helvetica Neue", Arial, sans-serif;
49
49
  font-weight: 500;
50
- `,Kt=w.p`
50
+ `,Gt=b.p`
51
51
  margin: 0;
52
52
  height: 1.25rem;
53
53
  font-size: 1rem;
54
54
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
55
55
  "Helvetica Neue", Arial, sans-serif;
56
56
  font-weight: 500;
57
- `;function Gt(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("path",{d:"M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z"})})}const J=c.forwardRef(({shape:e="circle",...n},r)=>o.jsx(Qt,{ref:r,$shape:e,...n}));J.displayName="PlayerButton";const Qt=w.button`
57
+ `;function Qt(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("path",{d:"M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z"})})}const W=c.forwardRef(({shape:e="circle",...n},r)=>o.jsx(qt,{ref:r,$shape:e,...n}));W.displayName="PlayerButton";const qt=b.button`
58
58
  margin: 0;
59
59
  display: flex;
60
60
  align-items: center;
@@ -92,16 +92,16 @@ React keys must be passed directly to JSX without using spread:
92
92
  cursor: not-allowed;
93
93
  }
94
94
 
95
- ${({$shape:e})=>e==="circle"&&w.css`
95
+ ${({$shape:e})=>e==="circle"&&b.css`
96
96
  padding: 0;
97
97
  width: 2rem;
98
98
  height: 2rem;
99
99
  `}
100
100
 
101
- ${({$shape:e})=>e==="square"&&w.css`
101
+ ${({$shape:e})=>e==="square"&&b.css`
102
102
  padding: 0.25rem 0.5rem;
103
103
  `}
104
- `;function qt({message:e,...n}){const r=D(m=>m.delay),i=D(m=>m.setDelay),l=()=>i(0);return r?o.jsxs(J,{onClick:l,shape:"square",...n,children:[o.jsx("span",{children:e||"Live"}),o.jsx(Gt,{})]}):null}function De(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("path",{d:"M6 5H8V19H6V5ZM16 5H18V19H16V5Z"})})}function Me(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("path",{d:"M19.376 12.4161L8.77735 19.4818C8.54759 19.635 8.23715 19.5729 8.08397 19.3432C8.02922 19.261 8 19.1645 8 19.0658V4.93433C8 4.65818 8.22386 4.43433 8.5 4.43433C8.59871 4.43433 8.69522 4.46355 8.77735 4.5183L19.376 11.584C19.6057 11.7372 19.6678 12.0477 19.5146 12.2774C19.478 12.3323 19.4309 12.3795 19.376 12.4161Z"})})}function $t(e,n,r){const i={days:86400,hours:3600,minutes:60,seconds:1,milliseconds:.001};return e*(i[n]/i[r])}function en(e){return $t(e,"milliseconds","seconds")}const $=e=>{const n=Math.floor(e/60),r=Math.floor(e%60);return`${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`};function tn(e){const n=typeof window<"u"&&window.navigator?.userAgent||"";return e.test(n)}const Ve=tn(/iPhone|iPad|iPod/i);function nn(){const e=document;return!!(e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||e.msFullscreenElement)}function rn(e){e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.webkitEnterFullScreen?e.webkitEnterFullScreen():e.mozRequestFullScreen&&e.mozRequestFullScreen()}function on(e){e.exitFullscreen?e.exitFullscreen():e.msExitFullscreen?e.msExitFullscreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen&&e.mozCancelFullScreen()}function sn(e,n){return e.addEventListener("fullscreenchange",n),e.addEventListener("webkitfullscreenchange",n),e.addEventListener("mozfullscreenchange",n),e.addEventListener("MSFullscreenChange",n),()=>{e.removeEventListener("fullscreenchange",n),e.removeEventListener("webkitfullscreenchange",n),e.removeEventListener("mozfullscreenchange",n),e.removeEventListener("MSFullscreenChange",n)}}const an=(e,n)=>({currentTime:0,duration:0,isEnded:!1,isLoading:!1,isLoop:!1,isMetaLoaded:!1,isPlaying:!1,isReady:!1,isStarted:!1,pauseTime:0,seekTime:-1,startTime:-1,volume:100,destroy:()=>{},handleDurationChange:()=>{const r=n().techRef.current;r&&e({duration:r.duration})},handleEnd:()=>{n().techRef.current&&e({isEnded:!0,isLoading:!1,isMetaLoaded:!1,isPlaying:!1})},handleLoadedMetadata:()=>{const r=n().techRef.current;r&&(r.loop=n().isLoop,r.volume=r.muted?0:1,n().startTime!==-1&&(r.currentTime=n().startTime),e({currentTime:n().startTime!==-1?n().startTime:r.currentTime,duration:r.duration,startTime:-1,isMetaLoaded:!0,volume:r.muted?0:100}))},handleLoadStart:()=>{const r=n().techRef.current;r&&(e({isReady:!0}),r.play().then(()=>{e({isEnded:!1,isLoading:!1,isPlaying:!0,isStarted:!0,pauseTime:0})}).catch(i=>e(()=>(console.info("Player failed to autoplay",i),{isStarted:!1,isEnded:!1,isLoading:!1,isPlaying:!1}))))},handlePause:()=>e({isPlaying:!1,pauseTime:Date.now()}),handlePlay:()=>e({isPlaying:!0,pauseTime:0}),handlePlaying:()=>e({isLoading:!1}),handleSeeked:()=>e({isLoading:!1}),handleSeeking:()=>e({isLoading:!0}),handleTimeUpdate:()=>{const r=n().techRef.current;r&&e({currentTime:r.currentTime})},handleWaiting:()=>e({isLoading:!0}),pause:()=>{const r=n().techRef.current;r&&(r.pause(),e({isEnded:!1,isPlaying:!1,pauseTime:Date.now()}))},pauseTimeDiff:()=>en(Date.now()-n().pauseTime),play:()=>{const r=n().techRef.current;r&&(r.play(),e({isEnded:!1,isPlaying:!0,isStarted:!0,pauseTime:0}))},seek:r=>{const i=n().techRef.current;i&&(i.currentTime=r,(i.paused||i.ended)&&i.play(),e({seekTime:-1,currentTime:r,isStarted:!0,isEnded:!1,isPlaying:!0}))},setIsLoading:r=>e({isLoading:r}),setIsLoop:r=>{const i=n().techRef.current;i&&(i.loop=r,e({isLoop:r}))},setStartTime:r=>e({startTime:r}),setVolume:r=>{const i=n().techRef.current;i&&(i.muted=r===0,i.volume=r/100,e({volume:r}))},stop:()=>{n().techRef.current&&e({isPlaying:!1,isLoading:!1})}}),ln=e=>({idleLocks:new Set,addIdleLock:n=>e(r=>({idleLocks:new Set(r.idleLocks).add(n)})),removeIdleLock:n=>e(r=>{const i=new Set(r.idleLocks);return i.delete(n),{idleLocks:i}})}),cn=e=>({level:null,levels:null,setLevels:n=>e({levels:n}),setLevel:n=>e({level:n})}),un=(e,n)=>({isFullscreen:!1,isFullscreenReady:!1,exitFullscreen:()=>{on(document),e({isFullscreen:!1})},requestFullscreen:()=>{const r=n().techRef.current,i=n().containerRef.current;if(!r||!i)return;const l=Ve?r:i;l&&rn(l),e({isFullscreen:!0})},setIsFullscreen:r=>e({isFullscreen:r}),setIsFullscreenReady:r=>e({isFullscreenReady:r})}),dn=e=>({url:"",setURL:n=>e({url:n})}),fn=e=>()=>({...e}),hn=(e,n)=>le.create()((...r)=>({...an(...r),...ln(...r),...un(...r),...cn(...r),...dn(...r),...fn({techRef:e,containerRef:n})(...r)})),Oe=c.createContext(null);function mn({children:e}){const n=c.useRef(null),r=c.useRef(null),i=c.useRef(null);return n.current||(n.current=hn(r,i)),o.jsx(Oe.Provider,{value:n.current,children:e})}const u=e=>{const n=c.useContext(Oe);if(!n)throw new Error("usePlayerStore must be used within PlayerStoreProvider");return le.useStore(n,e)};function pn(){const e=u(a=>a.isPlaying),n=u(a=>a.pause),r=u(a=>a.pauseTime),i=u(a=>a.pauseTimeDiff),l=u(a=>a.play),m=D(a=>a.delay),p=D(a=>a.setDelay),h=()=>{e?n():(r&&p(m+i()),l())};return o.jsx(J,{onClick:h,children:e?o.jsx(De,{}):o.jsx(Me,{})})}function He({className:e,onClick:n,...r}){const i=c.useRef(null),l=u(x=>x.exitFullscreen),m=u(x=>x.isFullscreen),p=u(x=>x.requestFullscreen),h=x=>{v()?(f(),m?l():p()):a(x)},a=x=>{i.current=window.setTimeout(()=>{n?.(x),f()},200)},f=()=>{i.current!==null&&(window.clearTimeout(i.current),i.current=null)},v=()=>i.current!==null;return c.useEffect(()=>()=>{f()},[]),o.jsx(vn,{onClick:h,className:e,"aria-label":"Player playback indicator",...r})}const vn=w.button`
104
+ `;function $t({message:e,...n}){const r=F(m=>m.delay),i=F(m=>m.setDelay),l=()=>i(0);return r?o.jsxs(W,{onClick:l,shape:"square",...n,children:[o.jsx("span",{children:e||"Live"}),o.jsx(Qt,{})]}):null}function Ie(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("path",{d:"M6 5H8V19H6V5ZM16 5H18V19H16V5Z"})})}function Me(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("path",{d:"M19.376 12.4161L8.77735 19.4818C8.54759 19.635 8.23715 19.5729 8.08397 19.3432C8.02922 19.261 8 19.1645 8 19.0658V4.93433C8 4.65818 8.22386 4.43433 8.5 4.43433C8.59871 4.43433 8.69522 4.46355 8.77735 4.5183L19.376 11.584C19.6057 11.7372 19.6678 12.0477 19.5146 12.2774C19.478 12.3323 19.4309 12.3795 19.376 12.4161Z"})})}function en(e,n,r){const i={days:86400,hours:3600,minutes:60,seconds:1,milliseconds:.001};return e*(i[n]/i[r])}function tn(e){return en(e,"milliseconds","seconds")}const $=e=>{const n=Math.floor(e/60),r=Math.floor(e%60);return`${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`};function nn(e){const n=typeof window<"u"&&window.navigator?.userAgent||"";return e.test(n)}const Ve=nn(/iPhone|iPad|iPod/i);function rn(){const e=document;return!!(e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||e.msFullscreenElement)}function on(e){e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.webkitEnterFullScreen?e.webkitEnterFullScreen():e.mozRequestFullScreen&&e.mozRequestFullScreen()}function sn(e){e.exitFullscreen?e.exitFullscreen():e.msExitFullscreen?e.msExitFullscreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen&&e.mozCancelFullScreen()}function an(e,n){return e.addEventListener("fullscreenchange",n),e.addEventListener("webkitfullscreenchange",n),e.addEventListener("mozfullscreenchange",n),e.addEventListener("MSFullscreenChange",n),()=>{e.removeEventListener("fullscreenchange",n),e.removeEventListener("webkitfullscreenchange",n),e.removeEventListener("mozfullscreenchange",n),e.removeEventListener("MSFullscreenChange",n)}}const ln=(e,n)=>({currentTime:0,duration:0,isEnded:!1,isLoading:!1,isLoop:!1,isMetaLoaded:!1,isPlaying:!1,isReady:!1,isStarted:!1,pauseTime:0,seekTime:-1,startTime:-1,volume:100,destroy:()=>{},handleDurationChange:()=>{const r=n().techRef.current;r&&e({duration:r.duration})},handleEnd:()=>{n().techRef.current&&e({isEnded:!0,isLoading:!1,isMetaLoaded:!1,isPlaying:!1})},handleLoadedMetadata:()=>{const r=n().techRef.current;r&&(r.loop=n().isLoop,r.volume=r.muted?0:1,n().startTime!==-1&&(r.currentTime=n().startTime),e({currentTime:n().startTime!==-1?n().startTime:r.currentTime,duration:r.duration,startTime:-1,isMetaLoaded:!0,volume:r.muted?0:100}))},handleLoadStart:()=>{const r=n().techRef.current;r&&(e({isReady:!0}),r.play().then(()=>{e({isEnded:!1,isLoading:!1,isPlaying:!0,isStarted:!0,pauseTime:0})}).catch(i=>e(()=>(console.info("Player failed to autoplay",i),{isStarted:!1,isEnded:!1,isLoading:!1,isPlaying:!1}))))},handlePause:()=>e({isPlaying:!1,pauseTime:Date.now()}),handlePlay:()=>e({isPlaying:!0,pauseTime:0}),handlePlaying:()=>e({isLoading:!1}),handleSeeked:()=>e({isLoading:!1}),handleSeeking:()=>e({isLoading:!0}),handleTimeUpdate:()=>{const r=n().techRef.current;r&&e({currentTime:r.currentTime})},handleWaiting:()=>e({isLoading:!0}),pause:()=>{const r=n().techRef.current;r&&(r.pause(),e({isEnded:!1,isPlaying:!1,pauseTime:Date.now()}))},pauseTimeDiff:()=>tn(Date.now()-n().pauseTime),play:()=>{const r=n().techRef.current;r&&(r.play(),e({isEnded:!1,isPlaying:!0,isStarted:!0,pauseTime:0}))},seek:r=>{const i=n().techRef.current;i&&(i.currentTime=r,(i.paused||i.ended)&&i.play(),e({seekTime:-1,currentTime:r,isStarted:!0,isEnded:!1,isPlaying:!0}))},setIsLoading:r=>e({isLoading:r}),setIsLoop:r=>{const i=n().techRef.current;i&&(i.loop=r,e({isLoop:r}))},setStartTime:r=>e({startTime:r}),setVolume:r=>{const i=n().techRef.current;i&&(i.muted=r===0,i.volume=r/100,e({volume:r}))},stop:()=>{n().techRef.current&&e({isPlaying:!1,isLoading:!1})}}),cn=e=>({idleLocks:new Set,addIdleLock:n=>e(r=>({idleLocks:new Set(r.idleLocks).add(n)})),removeIdleLock:n=>e(r=>{const i=new Set(r.idleLocks);return i.delete(n),{idleLocks:i}})}),un=e=>({level:null,levels:null,setLevels:n=>e({levels:n}),setLevel:n=>e({level:n})}),dn=(e,n)=>({isFullscreen:!1,isFullscreenReady:!1,exitFullscreen:()=>{sn(document),e({isFullscreen:!1})},requestFullscreen:()=>{const r=n().techRef.current,i=n().containerRef.current;if(!r||!i)return;const l=Ve?r:i;l&&on(l),e({isFullscreen:!0})},setIsFullscreen:r=>e({isFullscreen:r}),setIsFullscreenReady:r=>e({isFullscreenReady:r})}),fn=e=>()=>({...e}),hn=(e,n)=>le.create()((...r)=>({...ln(...r),...cn(...r),...dn(...r),...un(...r),...fn({techRef:e,containerRef:n})(...r)})),Oe=c.createContext(null);function mn({children:e}){const n=c.useRef(null),r=c.useRef(null),i=c.useRef(null);return n.current||(n.current=hn(r,i)),o.jsx(Oe.Provider,{value:n.current,children:e})}const u=e=>{const n=c.useContext(Oe);if(!n)throw new Error("usePlayerStore must be used within PlayerStoreProvider");return le.useStore(n,e)};function pn(){const e=u(a=>a.isPlaying),n=u(a=>a.pause),r=u(a=>a.pauseTime),i=u(a=>a.pauseTimeDiff),l=u(a=>a.play),m=F(a=>a.delay),p=F(a=>a.setDelay),h=()=>{e?n():(r&&p(m+i()),l())};return o.jsx(W,{onClick:h,children:e?o.jsx(Ie,{}):o.jsx(Me,{})})}function He({className:e,onClick:n,...r}){const i=c.useRef(null),l=u(x=>x.exitFullscreen),m=u(x=>x.isFullscreen),p=u(x=>x.requestFullscreen),h=x=>{v()?(f(),m?l():p()):a(x)},a=x=>{i.current=window.setTimeout(()=>{n?.(x),f()},200)},f=()=>{i.current!==null&&(window.clearTimeout(i.current),i.current=null)},v=()=>i.current!==null;return c.useEffect(()=>()=>{f()},[]),o.jsx(vn,{onClick:h,className:e,"aria-label":"Player playback indicator",...r})}const vn=b.button`
105
105
  position: absolute;
106
106
  top: 0;
107
107
  left: 0;
@@ -119,11 +119,11 @@ React keys must be passed directly to JSX without using spread:
119
119
  &:focus {
120
120
  outline: none;
121
121
  }
122
- `;function gn(){const e=u(i=>i.isPlaying),n=u(i=>i.play),r=()=>{e||n()};return o.jsx(He,{onClick:r})}const Ae=w.div`
122
+ `;function gn(){const e=u(i=>i.isPlaying),n=u(i=>i.play),r=()=>{e||n()};return o.jsx(He,{onClick:r})}const Ae=b.div`
123
123
  position: relative;
124
124
  width: 100%;
125
125
  margin-bottom: -0.25rem;
126
- `,Ue=w.div`
126
+ `,Ue=b.div`
127
127
  position: absolute;
128
128
  bottom: 1.75rem;
129
129
  left: 0;
@@ -134,7 +134,7 @@ React keys must be passed directly to JSX without using spread:
134
134
  opacity: ${({$isVisible:e})=>e?1:0};
135
135
  transform: ${({$isVisible:e})=>e?"translateY(0)":"translateY(-0.5rem)"};
136
136
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
137
- `,Ne=w.p`
137
+ `,Ne=b.p`
138
138
  margin: 0;
139
139
  padding: 0.25rem;
140
140
  font-variant-numeric: tabular-nums;
@@ -146,7 +146,7 @@ React keys must be passed directly to JSX without using spread:
146
146
  color: white;
147
147
  background: rgba(0, 0, 0, 0.8);
148
148
  border-radius: 1rem;
149
- `,fe=c.forwardRef(({max:e=100,min:n=0,...r},i)=>o.jsxs(yn,{ref:i,min:n,max:e,"aria-label":"Player progress",onKeyDown:l=>l.preventDefault(),...r,children:[o.jsx(xn,{children:o.jsx(bn,{})}),o.jsx(wn,{})]}));fe.displayName="PlayerSlider";const yn=w(ce.Root)`
149
+ `,fe=c.forwardRef(({max:e=100,min:n=0,...r},i)=>o.jsxs(yn,{ref:i,min:n,max:e,"aria-label":"Player progress",onKeyDown:l=>l.preventDefault(),...r,children:[o.jsx(xn,{children:o.jsx(wn,{})}),o.jsx(bn,{})]}));fe.displayName="PlayerSlider";const yn=b(ce.Root)`
150
150
  position: relative;
151
151
  display: flex;
152
152
  align-items: center;
@@ -160,20 +160,20 @@ React keys must be passed directly to JSX without using spread:
160
160
  cursor: not-allowed;
161
161
  opacity: 0.5;
162
162
  }
163
- `,xn=w(ce.Track)`
163
+ `,xn=b(ce.Track)`
164
164
  position: relative;
165
165
  height: 0.25rem;
166
166
  flex-grow: 1;
167
167
  background: rgba(255, 255, 255, 0.2);
168
168
  border-radius: 1rem;
169
169
  overflow: hidden;
170
- `,bn=w(ce.Range)`
170
+ `,wn=b(ce.Range)`
171
171
  position: absolute;
172
172
  height: 100%;
173
173
  background: #f7e406;
174
174
  transition: width 0.2s ease-in-out;
175
175
  border-radius: 1rem;
176
- `,wn=w(ce.Thumb)`
176
+ `,bn=b(ce.Thumb)`
177
177
  display: block;
178
178
  width: 0.875rem;
179
179
  height: 0.875rem;
@@ -196,10 +196,10 @@ React keys must be passed directly to JSX without using spread:
196
196
  cursor: not-allowed;
197
197
  opacity: 0.5;
198
198
  }
199
- `;function he(e){const n=e.getBoundingClientRect();return e.offsetWidth/e.offsetHeight>e.clientWidth/e.clientHeight?{left:n.left*100,right:n.right*100,top:n.top*100,bottom:n.bottom*100,width:n.width*100,height:n.height*100}:n}const Tn=(e,n)=>parseInt(Math.max(0,(Date.now()-(e+n*1e3))/1e3).toFixed(0)),Be=(e,n)=>Math.max(0,(Date.now()-e-n*1e3)/1e3),We=(e,n)=>Math.max(0,(n-e)/1e3),Cn=(e,n=0)=>{const i=n<0?0:n,l=["bytes","kb","mb","gb","tb","pb","eb","zb","yb"],m=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,m)).toFixed(i))}${l[m]}`};function Sn({isAuto:e,level:n,levels:r}){const i=r.length,l=[];return i>1&&l.push({sid:"quality-level-auto",label:"Auto",value:-1,selected:e||n===-1}),r.sort(function(m,p){const h=m.height||m.bitrate||0,a=p.height||p.bitrate||0;return h===a?0:h>a?1:-1}),r.map(m=>{const{bitrate:p,height:h,index:a}=m;l.push({sid:`quality-level-${a}`,label:h?`${h}p`:Cn(p),value:a,selected:i===1||!e&&a===n})}),l}const ze="vod-player-progress-bar";function Rn(){const e=c.useRef(null),n=c.useRef(null),[r,i]=c.useState(0),[l,m]=c.useState(0),[p,h]=c.useState(!1),[a,f]=c.useState(-1),[v,x]=c.useState(-1),L=D(C=>C.delay),R=D(C=>C.startTime),M=D(C=>C.endTime),_=D(C=>C.setDelay),U=u(C=>C.isPlaying),F=u(C=>C.addIdleLock),P=u(C=>C.removeIdleLock),g=c.useCallback(()=>{i(Be(R,L)),m(We(R,M))},[L,M,R]),W=parseFloat((l?(v!==-1?v:r)/l*100:0).toFixed(1)),z=C=>{x(l*(C[0]/100)),F(ze)},X=()=>{if(v!==-1){const C=Tn(R,v);_(C),x(-1),P(ze)}},ee=()=>h(!0),K=()=>h(!1),G=c.useCallback(C=>{const me=e.current,Q=n.current;if(me&&Q){const H=he(me),N=he(Q),Y=(C.pageX||C.clientX)-H.left,se=Y/H.width;if(se<0)return;let B=Y-N.width/2;B<0&&(B=0),B>H.width-N.width&&(B=-1),Q.style.left=B>-1?`${B}px`:"auto",Q.style.right=B>-1?"auto":"0px",f(se*l)}ee()},[l]);return de(()=>g(),U?1e3:null),c.useEffect(()=>{g()},[g]),o.jsxs(Ae,{children:[o.jsx(fe,{ref:e,value:[W],onPointerLeave:K,onPointerDown:K,onPointerMove:G,onValueChange:z,onValueCommit:X,step:.1}),o.jsx(Ue,{ref:n,$isVisible:p,children:o.jsx(Ne,{children:$(a)})})]})}function Ye({children:e}){return o.jsx(mn,{children:e})}function jn({children:e,startDate:n,endDate:r}){return o.jsx(Yt,{startDate:n,endDate:r,children:o.jsx(Ye,{children:e})})}const Ze=w.div`
199
+ `;function he(e){const n=e.getBoundingClientRect();return e.offsetWidth/e.offsetHeight>e.clientWidth/e.clientHeight?{left:n.left*100,right:n.right*100,top:n.top*100,bottom:n.bottom*100,width:n.width*100,height:n.height*100}:n}const Be=(e,n=0)=>parseInt(Math.max(0,(Date.now()-(e+n*1e3))/1e3).toFixed(0)),We=(e,n)=>Math.max(0,(Date.now()-e-n*1e3)/1e3),ze=(e,n)=>Math.max(0,(n-e)/1e3),Cn=(e,n=0)=>{const i=n<0?0:n,l=["bytes","kb","mb","gb","tb","pb","eb","zb","yb"],m=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,m)).toFixed(i))}${l[m]}`};function Tn({isAuto:e,level:n,levels:r}){const i=r.length,l=[];return i>1&&l.push({sid:"quality-level-auto",label:"Auto",value:-1,selected:e||n===-1}),r.sort(function(m,p){const h=m.height||m.bitrate||0,a=p.height||p.bitrate||0;return h===a?0:h>a?1:-1}),r.map(m=>{const{bitrate:p,height:h,index:a}=m;l.push({sid:`quality-level-${a}`,label:h?`${h}p`:Cn(p),value:a,selected:i===1||!e&&a===n})}),l}const Ze="vod-player-progress-bar";function Sn(){const e=c.useRef(null),n=c.useRef(null),[r,i]=c.useState(0),[l,m]=c.useState(0),[p,h]=c.useState(!1),[a,f]=c.useState(-1),[v,x]=c.useState(-1),L=F(T=>T.delay),j=F(T=>T.startTime),M=F(T=>T.endTime),_=F(T=>T.setDelay),U=u(T=>T.isPlaying),D=u(T=>T.addIdleLock),P=u(T=>T.removeIdleLock),g=c.useCallback(()=>{i(We(j,L)),m(ze(j,M))},[L,M,j]),z=parseFloat((l?(v!==-1?v:r)/l*100:0).toFixed(1)),Z=T=>{x(l*(T[0]/100)),D(Ze)},X=()=>{if(v!==-1){const T=Be(j,v);_(T),x(-1),P(Ze)}},ee=()=>h(!0),K=()=>h(!1),G=c.useCallback(T=>{const me=e.current,Q=n.current;if(me&&Q){const H=he(me),N=he(Q),Y=(T.pageX||T.clientX)-H.left,se=Y/H.width;if(se<0)return;let B=Y-N.width/2;B<0&&(B=0),B>H.width-N.width&&(B=-1),Q.style.left=B>-1?`${B}px`:"auto",Q.style.right=B>-1?"auto":"0px",f(se*l)}ee()},[l]);return de(()=>g(),U?1e3:null),c.useEffect(()=>{g()},[g]),o.jsxs(Ae,{children:[o.jsx(fe,{ref:e,value:[z],onPointerLeave:K,onPointerDown:K,onPointerMove:G,onValueChange:Z,onValueCommit:X,step:.1}),o.jsx(Ue,{ref:n,$isVisible:p,children:o.jsx(Ne,{children:$(a)})})]})}function Ye({children:e}){return o.jsx(mn,{children:e})}function jn({children:e,startDate:n,endDate:r}){return o.jsx(Yt,{startDate:n,endDate:r,children:o.jsx(Ye,{children:e})})}const Je=b.div`
200
200
  display: flex;
201
201
  align-items: center;
202
- `,Je=w.p`
202
+ `,Xe=b.p`
203
203
  margin: 0;
204
204
  padding: 0;
205
205
  font-variant-numeric: tabular-nums;
@@ -207,11 +207,11 @@ React keys must be passed directly to JSX without using spread:
207
207
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
208
208
  "Helvetica Neue", Arial, sans-serif;
209
209
  font-weight: 500;
210
- `,Xe=w(Je)`
210
+ `,Ke=b(Xe)`
211
211
  margin-right: 0.5rem;
212
- `,Ke=w(Je)`
212
+ `,Ge=b(Xe)`
213
213
  margin-left: 0.5rem;
214
- `,Ge=w.p`
214
+ `,Qe=b.p`
215
215
  margin: 0;
216
216
  padding: 0;
217
217
  font-size: 0.8125rem;
@@ -222,7 +222,7 @@ React keys must be passed directly to JSX without using spread:
222
222
  &::before {
223
223
  content: "/";
224
224
  }
225
- `;function Pn(){const[e,n]=c.useState(0),[r,i]=c.useState(0),l=u(f=>f.isPlaying),m=D(f=>f.delay),p=D(f=>f.startTime),h=D(f=>f.endTime),a=c.useCallback(()=>{n(Be(p,m)),i(We(p,h))},[m,h,p]);return de(()=>a(),l?1e3:null),c.useEffect(()=>{a()},[a]),m?o.jsxs(Ze,{children:[o.jsx(Xe,{children:$(e)}),o.jsx(Ge,{}),o.jsx(Ke,{children:$(r)})]}):null}function En({url:e,isLive:n}){const r=c.useRef(null),i=u(R=>R.level),l=u(R=>R.levels),m=u(R=>R.setLevel),p=u(R=>R.setLevels),h=u(R=>R.techRef),a=c.useCallback(R=>{if(r.current&&(r.current.nextLevel=R,m(null),l)){const M=l.map(_=>({..._,selected:_.value===R}));p(M)}},[l,m,p,r]),f=c.useCallback(()=>{r.current&&(console.log("[Player][Event]","MEDIA_ATTACHED"),r.current.loadSource(e))},[e]),v=c.useCallback(()=>{if(!r.current)return;console.log("[Player][Event]","MANIFEST_LOADED");const R=r.current.levels,M=r.current.currentLevel,_=r.current.autoLevelEnabled;p(Sn({levels:R.map((U,F)=>{const{bitrate:P,height:g,width:W}=U;return{bitrate:P,height:g,index:F,width:W}}),level:M,isAuto:_}))},[p]),x=c.useCallback(()=>{if(!h.current)return;const _=n?{backBufferLength:10,startLevel:-1}:{backBufferLength:60,startLevel:-1};try{console.log("[Player] URL",e),console.log("[Player] Config",JSON.stringify(_)),console.log("[Player] Version",Z.version),r.current=new Z(_),r.current.attachMedia(h.current),r.current.on(Z.Events.MEDIA_ATTACHED,f),r.current.on(Z.Events.MANIFEST_LOADED,v)}catch(U){throw new Error(`Error initializing Hls: ${U}`)}},[v,f,n,h,e]),L=c.useCallback(()=>{r.current&&(r.current.off(Z.Events.MEDIA_ATTACHED,f),r.current.off(Z.Events.MANIFEST_LOADED,v),r.current.destroy(),r.current=null)},[v,f]);return c.useEffect(()=>{i!==null&&a(i)},[i,a]),c.useEffect(()=>(Z.isSupported()&&x(),L),[L,x]),null}function Qe({url:e,isLive:n,isMuted:r=!1}){const i=u(g=>g.handleDurationChange),l=u(g=>g.handleEnd),m=u(g=>g.handleLoadedMetadata),p=u(g=>g.handleLoadStart),h=u(g=>g.handlePause),a=u(g=>g.handlePlay),f=u(g=>g.handlePlaying),v=u(g=>g.handleSeeked),x=u(g=>g.handleSeeking),L=u(g=>g.handleTimeUpdate),R=u(g=>g.handleWaiting),M=u(g=>g.techRef),_=c.useRef(null),U=()=>n?{}:{onDurationChange:i,onSeeked:v,onSeeking:x,onTimeUpdate:F},F=()=>{(!_.current||Date.now()-_.current>=1e3)&&(L(),_.current=Date.now())},P=U();return o.jsxs(o.Fragment,{children:[o.jsx(En,{isLive:n,url:e}),o.jsx(kn,{ref:M,playsInline:!0,autoPlay:!0,controls:!1,muted:r,preload:"auto",crossOrigin:"anonymous",onEnded:l,onLoadedMetadata:m,onLoadStart:p,onPause:h,onPlay:a,onPlaying:f,onWaiting:R,tabIndex:-1,...P})]})}const kn=w.video`
225
+ `;function Rn(){const[e,n]=c.useState(0),[r,i]=c.useState(0),l=u(f=>f.isPlaying),m=F(f=>f.delay),p=F(f=>f.startTime),h=F(f=>f.endTime),a=c.useCallback(()=>{n(We(p,m)),i(ze(p,h))},[m,h,p]);return de(()=>a(),l?1e3:null),c.useEffect(()=>{a()},[a]),m?o.jsxs(Je,{children:[o.jsx(Ke,{children:$(e)}),o.jsx(Qe,{}),o.jsx(Ge,{children:$(r)})]}):null}function Pn(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("path",{d:"M22 12C22 17.5228 17.5229 22 12 22C6.4772 22 2 17.5228 2 12C2 6.47715 6.4772 2 12 2V4C7.5817 4 4 7.58172 4 12C4 16.4183 7.5817 20 12 20C16.4183 20 20 16.4183 20 12C20 9.53614 18.8862 7.33243 17.1346 5.86492L15 8V2L21 2L18.5535 4.44656C20.6649 6.28002 22 8.9841 22 12Z"})})}function En(){const e=F(i=>i.startTime),n=F(i=>i.setDelay),r=()=>n(Be(e));return o.jsx(W,{onClick:r,children:o.jsx(Pn,{})})}function kn({url:e,isLive:n}){const r=c.useRef(null),i=u(j=>j.level),l=u(j=>j.levels),m=u(j=>j.setLevel),p=u(j=>j.setLevels),h=u(j=>j.techRef),a=c.useCallback(j=>{if(r.current&&(r.current.nextLevel=j,m(null),l)){const M=l.map(_=>({..._,selected:_.value===j}));p(M)}},[l,m,p,r]),f=c.useCallback(()=>{r.current&&(console.log("[Player][Event]","MEDIA_ATTACHED"),r.current.loadSource(e))},[e]),v=c.useCallback(()=>{if(!r.current)return;console.log("[Player][Event]","MANIFEST_LOADED");const j=r.current.levels,M=r.current.currentLevel,_=r.current.autoLevelEnabled;p(Tn({levels:j.map((U,D)=>{const{bitrate:P,height:g,width:z}=U;return{bitrate:P,height:g,index:D,width:z}}),level:M,isAuto:_}))},[p]),x=c.useCallback(()=>{if(!h.current)return;const _=n?{backBufferLength:10,startLevel:-1}:{backBufferLength:60,startLevel:-1};try{console.log("[Player] URL",e),console.log("[Player] Config",JSON.stringify(_)),console.log("[Player] Version",J.version),r.current=new J(_),r.current.attachMedia(h.current),r.current.on(J.Events.MEDIA_ATTACHED,f),r.current.on(J.Events.MANIFEST_LOADED,v)}catch(U){throw new Error(`Error initializing Hls: ${U}`)}},[v,f,n,h,e]),L=c.useCallback(()=>{r.current&&(r.current.off(J.Events.MEDIA_ATTACHED,f),r.current.off(J.Events.MANIFEST_LOADED,v),r.current.destroy(),r.current=null)},[v,f]);return c.useEffect(()=>{i!==null&&a(i)},[i,a]),c.useEffect(()=>(J.isSupported()&&x(),L),[L,x]),null}function qe({url:e,isLive:n,isMuted:r=!1}){const i=u(g=>g.handleDurationChange),l=u(g=>g.handleEnd),m=u(g=>g.handleLoadedMetadata),p=u(g=>g.handleLoadStart),h=u(g=>g.handlePause),a=u(g=>g.handlePlay),f=u(g=>g.handlePlaying),v=u(g=>g.handleSeeked),x=u(g=>g.handleSeeking),L=u(g=>g.handleTimeUpdate),j=u(g=>g.handleWaiting),M=u(g=>g.techRef),_=c.useRef(null),U=()=>n?{}:{onDurationChange:i,onSeeked:v,onSeeking:x,onTimeUpdate:D},D=()=>{(!_.current||Date.now()-_.current>=1e3)&&(L(),_.current=Date.now())},P=U();return o.jsxs(o.Fragment,{children:[o.jsx(kn,{isLive:n,url:e}),o.jsx(Ln,{ref:M,playsInline:!0,autoPlay:!0,controls:!1,muted:r,preload:"auto",crossOrigin:"anonymous",onEnded:l,onLoadedMetadata:m,onLoadStart:p,onPause:h,onPlay:a,onPlaying:f,onWaiting:j,tabIndex:-1,...P})]})}const Ln=b.video`
226
226
  position: relative;
227
227
  width: 100%;
228
228
  height: 100%;
@@ -230,7 +230,7 @@ React keys must be passed directly to JSX without using spread:
230
230
  @media (min-width: 768px) {
231
231
  pointer-events: none;
232
232
  }
233
- `;function Ln({url:e}){const[n,r]=c.useState(null),i=D(m=>m.delay),l=c.useCallback(async()=>{r(i?e.replace("playlist.m3u8",`playlist_fmp4_dvr_timeshift-${i}.m3u8`):e)},[i,e]);return c.useEffect(()=>{l()},[l]),n?o.jsx(Qe,{url:n,isLive:!0}):null}const qe=w.div`
233
+ `;function _n({url:e}){const[n,r]=c.useState(null),i=F(m=>m.delay),l=c.useCallback(async()=>{r(i?e.replace("playlist.m3u8",`playlist_fmp4_dvr_timeshift-${i}.m3u8`):e)},[i,e]);return c.useEffect(()=>{l()},[l]),n?o.jsx(qe,{url:n,isLive:!0}):null}const $e=b.div`
234
234
  position: absolute;
235
235
  top: 0;
236
236
  left: 0;
@@ -239,7 +239,7 @@ React keys must be passed directly to JSX without using spread:
239
239
  color: white;
240
240
  background: black;
241
241
  overflow: hidden;
242
- `,$e=w.div`
242
+ `,et=b.div`
243
243
  position: absolute;
244
244
  left: 0;
245
245
  width: 100%;
@@ -251,7 +251,7 @@ React keys must be passed directly to JSX without using spread:
251
251
  @media (min-width: 768px) {
252
252
  padding-top: 2rem;
253
253
  }
254
- `,et=w.div`
254
+ `,tt=b.div`
255
255
  display: flex;
256
256
  flex-direction: column;
257
257
  padding-left: 0.5rem;
@@ -263,21 +263,21 @@ React keys must be passed directly to JSX without using spread:
263
263
  padding-left: 1rem;
264
264
  padding-right: 1rem;
265
265
  }
266
- `,tt=w.div`
266
+ `,nt=b.div`
267
267
  display: flex;
268
268
  padding: 0.5rem 0;
269
269
  width: 100%;
270
270
  align-items: center;
271
- `,nt=w.div`
271
+ `,rt=b.div`
272
272
  display: flex;
273
273
  flex: 1;
274
274
  align-items: center;
275
275
  gap: 0.5rem;
276
- `,rt=w(nt)`
276
+ `,ot=b(rt)`
277
277
  justify-content: flex-start;
278
- `,ot=w(nt)`
278
+ `,it=b(rt)`
279
279
  justify-content: flex-end;
280
- `;function _n(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("path",{d:"M16 3H22V9H20V5H16V3ZM2 3H8V5H4V9H2V3ZM20 19V15H22V21H16V19H20ZM4 19H8V21H2V15H4V19Z"})})}function Fn(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("path",{d:"M18 7H22V9H16V3H18V7ZM8 9H2V7H6V3H8V9ZM18 17V21H16V15H22V17H18ZM8 15V21H6V17H2V15H8Z"})})}function it(){const e=u(f=>f.containerRef),n=u(f=>f.exitFullscreen),r=u(f=>f.isFullscreen),i=u(f=>f.requestFullscreen),l=u(f=>f.setIsFullscreen),m=u(f=>f.setIsFullscreenReady),p=u(f=>f.techRef),h=c.useCallback(f=>{f.stopPropagation(),l(nn())},[l]),a=()=>{r?n():i()};return c.useEffect(()=>{const f=Ve?p.current:e.current;if(f)return sn(f,h)},[e,h,p]),c.useEffect(()=>{m(!0)},[m]),o.jsx(J,{onClick:a,children:r?o.jsx(Fn,{}):o.jsx(_n,{})})}const In=5*1e3;function st({children:e}){const n=c.useRef(null),[r,i]=c.useState(!1),l=c.useRef(null),p=u(f=>f.idleLocks).size,h=c.useCallback(()=>{l.current!==null&&(window.clearTimeout(l.current),l.current=null)},[]),a=c.useCallback(()=>{h(),l.current=window.setTimeout(()=>i(!0),In)},[h]);return c.useEffect(()=>(i(!1),a(),()=>{h()}),[h,a]),c.useEffect(()=>{const f=n.current;if(!f)return;const v=L=>{r&&(L.stopPropagation(),i(!1),a())},x=()=>{r&&i(!1),a()};return f.addEventListener("click",v),f.addEventListener("mousemove",x),()=>{f.removeEventListener("click",v),f.removeEventListener("mousemove",x)}},[n,r,i,a]),o.jsx(Dn,{ref:n,$isIdle:r&&!p,children:e})}const Dn=w.div`
280
+ `;function Fn(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("path",{d:"M16 3H22V9H20V5H16V3ZM2 3H8V5H4V9H2V3ZM20 19V15H22V21H16V19H20ZM4 19H8V21H2V15H4V19Z"})})}function Dn(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("path",{d:"M18 7H22V9H16V3H18V7ZM8 9H2V7H6V3H8V9ZM18 17V21H16V15H22V17H18ZM8 15V21H6V17H2V15H8Z"})})}function st(){const e=u(f=>f.containerRef),n=u(f=>f.exitFullscreen),r=u(f=>f.isFullscreen),i=u(f=>f.requestFullscreen),l=u(f=>f.setIsFullscreen),m=u(f=>f.setIsFullscreenReady),p=u(f=>f.techRef),h=c.useCallback(f=>{f.stopPropagation(),l(rn())},[l]),a=()=>{r?n():i()};return c.useEffect(()=>{const f=Ve?p.current:e.current;if(f)return an(f,h)},[e,h,p]),c.useEffect(()=>{m(!0)},[m]),o.jsx(W,{onClick:a,children:r?o.jsx(Dn,{}):o.jsx(Fn,{})})}const In=5*1e3;function at({children:e}){const n=c.useRef(null),[r,i]=c.useState(!1),l=c.useRef(null),p=u(f=>f.idleLocks).size,h=c.useCallback(()=>{l.current!==null&&(window.clearTimeout(l.current),l.current=null)},[]),a=c.useCallback(()=>{h(),l.current=window.setTimeout(()=>i(!0),In)},[h]);return c.useEffect(()=>(i(!1),a(),()=>{h()}),[h,a]),c.useEffect(()=>{const f=n.current;if(!f)return;const v=L=>{r&&(L.stopPropagation(),i(!1),a())},x=()=>{r&&i(!1),a()};return f.addEventListener("click",v),f.addEventListener("mousemove",x),()=>{f.removeEventListener("click",v),f.removeEventListener("mousemove",x)}},[n,r,i,a]),o.jsx(Mn,{ref:n,$isIdle:r&&!p,children:e})}const Mn=b.div`
281
281
  position: absolute;
282
282
  top: 0;
283
283
  left: 0;
@@ -286,21 +286,21 @@ React keys must be passed directly to JSX without using spread:
286
286
  transition: opacity 0.2s ease-in-out;
287
287
  cursor: ${({$isIdle:e})=>e?"none":"auto"};
288
288
  opacity: ${({$isIdle:e})=>e?0:1};
289
- `;function Mn(e){return o.jsx(On,{...e})}const Vn=w.keyframes`
289
+ `;function Vn(e){return o.jsx(Hn,{...e})}const On=b.keyframes`
290
290
  from {
291
291
  transform: rotate(0deg);
292
292
  }
293
293
  to {
294
294
  transform: rotate(360deg);
295
295
  }
296
- `,On=w.div`
296
+ `,Hn=b.div`
297
297
  width: 1.5rem;
298
298
  height: 1.5rem;
299
299
  border: 2px solid white;
300
300
  border-bottom-color: transparent;
301
301
  border-radius: 50%;
302
- animation: ${Vn} 1s linear infinite;
303
- `;function Hn(e,n=500){const[r,i]=c.useState(e);return c.useEffect(()=>{const l=window.setTimeout(()=>i(e),n);return()=>{window.clearTimeout(l)}},[e,n]),r}function at({style:e,...n}){const r=u(l=>l.isLoading);return Hn(r,100)?o.jsx(An,{style:e,...n,children:o.jsx(Mn,{})}):null}const An=w.div`
302
+ animation: ${On} 1s linear infinite;
303
+ `;function An(e,n=500){const[r,i]=c.useState(e);return c.useEffect(()=>{const l=window.setTimeout(()=>i(e),n);return()=>{window.clearTimeout(l)}},[e,n]),r}function lt({style:e,...n}){const r=u(l=>l.isLoading);return An(r,100)?o.jsx(Un,{style:e,...n,children:o.jsx(Vn,{})}):null}const Un=b.div`
304
304
  pointer-events: none;
305
305
  position: absolute;
306
306
  top: 0;
@@ -312,10 +312,10 @@ React keys must be passed directly to JSX without using spread:
312
312
  height: 100%;
313
313
  align-items: center;
314
314
  justify-content: center;
315
- `;function Un(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("path",{d:"M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z"})})}function Nn(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("path",{d:"M4 5V19H20V5H4ZM3 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3ZM7.5 11.25H9.5V9H11V15H9.5V12.75H7.5V15H6V9H7.5V11.25ZM14.5 10.5V13.5H16C16.2761 13.5 16.5 13.2761 16.5 13V11C16.5 10.7239 16.2761 10.5 16 10.5H14.5ZM13 9H16C17.1046 9 18 9.89543 18 11V13C18 14.1046 17.1046 15 16 15H13V9Z"})})}const Bn=re.Root,Wn=re.Trigger,zn=re.Portal,lt=c.forwardRef(({sideOffset:e=4,...n},r)=>o.jsx(Yn,{ref:r,sideOffset:e,onCloseAutoFocus:i=>{i.preventDefault()},...n}));lt.displayName="PlayerDropdownMenuContent";const ct=c.forwardRef((e,n)=>o.jsx(Zn,{ref:n,...e}));ct.displayName="PlayerDropdownMenuItem";const Yn=w(re.Content).withConfig({shouldForwardProp:e=>e!=="ref"})`
315
+ `;function Nn(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("path",{d:"M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z"})})}function Bn(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("path",{d:"M4 5V19H20V5H4ZM3 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3ZM7.5 11.25H9.5V9H11V15H9.5V12.75H7.5V15H6V9H7.5V11.25ZM14.5 10.5V13.5H16C16.2761 13.5 16.5 13.2761 16.5 13V11C16.5 10.7239 16.2761 10.5 16 10.5H14.5ZM13 9H16C17.1046 9 18 9.89543 18 11V13C18 14.1046 17.1046 15 16 15H13V9Z"})})}const Wn=re.Root,zn=re.Trigger,Zn=re.Portal,ct=c.forwardRef(({sideOffset:e=4,...n},r)=>o.jsx(Yn,{ref:r,sideOffset:e,onCloseAutoFocus:i=>{i.preventDefault()},...n}));ct.displayName="PlayerDropdownMenuContent";const ut=c.forwardRef((e,n)=>o.jsx(Jn,{ref:n,...e}));ut.displayName="PlayerDropdownMenuItem";const Yn=b(re.Content).withConfig({shouldForwardProp:e=>e!=="ref"})`
316
316
  padding: 0.25rem;
317
317
  min-width: 8rem;
318
- max-height: 12rem;
318
+ max-height: 8rem;
319
319
  overflow-y: auto;
320
320
  border-radius: 0.75rem;
321
321
  background: rgba(0, 0, 0, 0.8);
@@ -324,6 +324,10 @@ React keys must be passed directly to JSX without using spread:
324
324
  will-change: transform, opacity;
325
325
  z-index: 1000;
326
326
 
327
+ @media (min-width: 768px) {
328
+ max-height: 12rem;
329
+ }
330
+
327
331
  &[data-state="open"][data-side="top"] {
328
332
  animation-name: slideDownAndFade;
329
333
  }
@@ -383,7 +387,7 @@ React keys must be passed directly to JSX without using spread:
383
387
  transform: translateX(0);
384
388
  }
385
389
  }
386
- `,Zn=w(re.Item)`
390
+ `,Jn=b(re.Item)`
387
391
  position: relative;
388
392
  display: flex;
389
393
  align-items: center;
@@ -420,11 +424,11 @@ React keys must be passed directly to JSX without using spread:
420
424
  color: rgba(255, 255, 255, 0.5);
421
425
  pointer-events: none;
422
426
  }
423
- `,ut="settings";function dt(){const[e,n]=c.useState(!1),r=u(a=>a.containerRef),i=u(a=>a.addIdleLock),l=u(a=>a.removeIdleLock),m=u(a=>a.levels),p=u(a=>a.setLevel),h=c.useCallback(a=>{n(a),a?i(ut):l(ut)},[i,l]);return o.jsxs(Bn,{open:e,onOpenChange:h,children:[o.jsx(Wn,{asChild:!0,children:o.jsx(J,{children:o.jsx(Nn,{})})}),o.jsx(zn,{container:r.current,children:o.jsx(lt,{side:"top",align:"end",children:m?.map(a=>o.jsxs(ct,{onClick:()=>p(a.value),children:[a.label,a.selected&&o.jsx(Un,{})]},a.sid))})})]})}function Jn(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("path",{d:"M6.60282 10.0001L10 7.22056V16.7796L6.60282 14.0001H3V10.0001H6.60282ZM2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"})})}function Xn(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("path",{d:"M13 7.22056L9.60282 10.0001H6V14.0001H9.60282L13 16.7796V7.22056ZM8.88889 16.0001H5C4.44772 16.0001 4 15.5524 4 15.0001V9.00007C4 8.44778 4.44772 8.00007 5 8.00007H8.88889L14.1834 3.66821C14.3971 3.49335 14.7121 3.52485 14.887 3.73857C14.9601 3.8279 15 3.93977 15 4.05519V19.9449C15 20.2211 14.7761 20.4449 14.5 20.4449C14.3846 20.4449 14.2727 20.405 14.1834 20.3319L8.88889 16.0001ZM18.8631 16.5911L17.4411 15.1691C18.3892 14.4376 19 13.2902 19 12.0001C19 10.5697 18.2493 9.31476 17.1203 8.60766L18.5589 7.16906C20.0396 8.26166 21 10.0187 21 12.0001C21 13.8422 20.1698 15.4905 18.8631 16.5911Z"})})}function Kn(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("path",{d:"M10 7.22056L6.60282 10.0001H3V14.0001H6.60282L10 16.7796V7.22056ZM5.88889 16.0001H2C1.44772 16.0001 1 15.5524 1 15.0001V9.00007C1 8.44778 1.44772 8.00007 2 8.00007H5.88889L11.1834 3.66821C11.3971 3.49335 11.7121 3.52485 11.887 3.73857C11.9601 3.8279 12 3.93977 12 4.05519V19.9449C12 20.2211 11.7761 20.4449 11.5 20.4449C11.3846 20.4449 11.2727 20.405 11.1834 20.3319L5.88889 16.0001ZM20.4142 12.0001L23.9497 15.5356L22.5355 16.9498L19 13.4143L15.4645 16.9498L14.0503 15.5356L17.5858 12.0001L14.0503 8.46454L15.4645 7.05032L19 10.5859L22.5355 7.05032L23.9497 8.46454L20.4142 12.0001Z"})})}const ft="volume";function ht(){u(h=>h.containerRef);const e=u(h=>h.setVolume),n=u(h=>h.volume),r=u(h=>h.addIdleLock),i=u(h=>h.removeIdleLock),l=h=>{e(h[0]),r(ft)},m=()=>{i(ft)},p=()=>e(n?0:100);return o.jsxs(Gn,{children:[o.jsx(J,{onClick:p,className:"shrink-0",children:n?n>50?o.jsx(Jn,{}):o.jsx(Xn,{}):o.jsx(Kn,{})}),o.jsx(mt,{children:o.jsx(fe,{value:[n],onValueChange:l,onValueCommit:m})})]})}const mt=w.div`
427
+ `,dt="settings";function ft(){const[e,n]=c.useState(!1),r=u(a=>a.containerRef),i=u(a=>a.addIdleLock),l=u(a=>a.removeIdleLock),m=u(a=>a.levels),p=u(a=>a.setLevel),h=c.useCallback(a=>{n(a),a?i(dt):l(dt)},[i,l]);return o.jsxs(Wn,{open:e,onOpenChange:h,children:[o.jsx(zn,{asChild:!0,children:o.jsx(W,{children:o.jsx(Bn,{})})}),o.jsx(Zn,{container:r.current,children:o.jsx(ct,{side:"top",align:"end",children:m?.map(a=>o.jsxs(ut,{onClick:()=>p(a.value),children:[a.label,a.selected&&o.jsx(Nn,{})]},a.sid))})})]})}function Xn(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("path",{d:"M6.60282 10.0001L10 7.22056V16.7796L6.60282 14.0001H3V10.0001H6.60282ZM2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"})})}function Kn(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("path",{d:"M13 7.22056L9.60282 10.0001H6V14.0001H9.60282L13 16.7796V7.22056ZM8.88889 16.0001H5C4.44772 16.0001 4 15.5524 4 15.0001V9.00007C4 8.44778 4.44772 8.00007 5 8.00007H8.88889L14.1834 3.66821C14.3971 3.49335 14.7121 3.52485 14.887 3.73857C14.9601 3.8279 15 3.93977 15 4.05519V19.9449C15 20.2211 14.7761 20.4449 14.5 20.4449C14.3846 20.4449 14.2727 20.405 14.1834 20.3319L8.88889 16.0001ZM18.8631 16.5911L17.4411 15.1691C18.3892 14.4376 19 13.2902 19 12.0001C19 10.5697 18.2493 9.31476 17.1203 8.60766L18.5589 7.16906C20.0396 8.26166 21 10.0187 21 12.0001C21 13.8422 20.1698 15.4905 18.8631 16.5911Z"})})}function Gn(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("path",{d:"M10 7.22056L6.60282 10.0001H3V14.0001H6.60282L10 16.7796V7.22056ZM5.88889 16.0001H2C1.44772 16.0001 1 15.5524 1 15.0001V9.00007C1 8.44778 1.44772 8.00007 2 8.00007H5.88889L11.1834 3.66821C11.3971 3.49335 11.7121 3.52485 11.887 3.73857C11.9601 3.8279 12 3.93977 12 4.05519V19.9449C12 20.2211 11.7761 20.4449 11.5 20.4449C11.3846 20.4449 11.2727 20.405 11.1834 20.3319L5.88889 16.0001ZM20.4142 12.0001L23.9497 15.5356L22.5355 16.9498L19 13.4143L15.4645 16.9498L14.0503 15.5356L17.5858 12.0001L14.0503 8.46454L15.4645 7.05032L19 10.5859L22.5355 7.05032L23.9497 8.46454L20.4142 12.0001Z"})})}const ht="volume";function mt(){u(h=>h.containerRef);const e=u(h=>h.setVolume),n=u(h=>h.volume),r=u(h=>h.addIdleLock),i=u(h=>h.removeIdleLock),l=h=>{e(h[0]),r(ht)},m=()=>{i(ht)},p=()=>e(n?0:100);return o.jsxs(Qn,{children:[o.jsx(W,{onClick:p,className:"shrink-0",children:n?n>50?o.jsx(Xn,{}):o.jsx(Kn,{}):o.jsx(Gn,{})}),o.jsx(pt,{children:o.jsx(fe,{value:[n],onValueChange:l,onValueCommit:m})})]})}const pt=b.div`
424
428
  width: 0;
425
429
  opacity: 0;
426
430
  transition: all 0.2s ease-in-out;
427
- `,Gn=w.div`
431
+ `,Qn=b.div`
428
432
  display: flex;
429
433
  align-items: center;
430
434
  gap: 0.25rem;
@@ -435,11 +439,11 @@ React keys must be passed directly to JSX without using spread:
435
439
  &:hover {
436
440
  width: 6rem;
437
441
 
438
- ${mt} {
442
+ ${pt} {
439
443
  width: 100%;
440
444
  opacity: 1;
441
445
  }
442
446
  }
443
447
  }
444
- `;function Qn({url:e,startDate:n,endDate:r,messages:i}){return o.jsx(jn,{startDate:new Date(n),endDate:new Date(r),children:o.jsx(qn,{url:e,messages:i})})}function qn({url:e,messages:n}){const r=u(i=>i.containerRef);return o.jsx(qe,{ref:r,children:o.jsxs(Zt,{eventFinishedMessage:n?.eventFinished,eventNotStartedMessage:n?.eventNotStarted,eventStartingSoonMessage:n?.eventStartingSoon,children:[o.jsx(Ln,{url:e}),o.jsx(at,{}),o.jsxs(st,{children:[o.jsx(gn,{}),o.jsx($e,{children:o.jsxs(et,{children:[o.jsx(Rn,{}),o.jsxs(tt,{children:[o.jsxs(rt,{children:[o.jsx(pn,{}),o.jsx(ht,{}),o.jsx(Pn,{})]}),o.jsxs(ot,{children:[o.jsx(qt,{message:n?.live}),o.jsx(dt,{}),o.jsx(it,{})]})]})]})})]})]})})}function $n(){const e=u(l=>l.isPlaying),n=u(l=>l.pause),r=u(l=>l.play),i=()=>{e?n():r()};return o.jsx(J,{onClick:i,children:e?o.jsx(De,{}):o.jsx(Me,{})})}function er(){const e=u(l=>l.isPlaying),n=u(l=>l.pause),r=u(l=>l.play),i=()=>{e?n():r()};return o.jsx(He,{onClick:i})}const pt="vod-player-progress-bar";function tr(){const e=c.useRef(null),n=c.useRef(null),[r,i]=c.useState(!1),[l,m]=c.useState(-1),[p,h]=c.useState(-1),a=u(g=>g.currentTime),f=u(g=>g.duration),v=u(g=>g.seek),x=u(g=>g.addIdleLock),L=u(g=>g.removeIdleLock),R=parseFloat((f?(p!==-1?p:a)/f*100:0).toFixed(1)),M=g=>{h(f*(g[0]/100)),x(pt)},_=()=>{p!==-1&&(v(p),h(-1),L(pt))},U=()=>i(!0),F=()=>i(!1),P=c.useCallback(g=>{const W=e.current,z=n.current;if(W&&z){const X=he(W),ee=he(z),K=(g.pageX||g.clientX)-X.left,G=K/X.width;if(G<0)return;let C=K-ee.width/2;C<0&&(C=0),C>X.width-ee.width&&(C=-1),z.style.left=C>-1?`${C}px`:"auto",z.style.right=C>-1?"auto":"0px",m(G*f)}U()},[f]);return o.jsxs(Ae,{children:[o.jsx(fe,{ref:e,value:[R],onPointerLeave:F,onPointerDown:F,onPointerMove:P,onValueChange:M,onValueCommit:_,step:.1}),o.jsx(Ue,{ref:n,$isVisible:r,children:o.jsx(Ne,{children:$(l)})})]})}function nr(){const e=u(r=>r.currentTime),n=u(r=>r.duration);return o.jsxs(Ze,{children:[o.jsx(Xe,{children:$(e)}),o.jsx(Ge,{}),o.jsx(Ke,{children:$(n)})]})}const rr=60,or=95;function ir({storageKey:e}){const n=u(v=>v.currentTime),r=u(v=>v.duration),i=u(v=>v.isPlaying),l=u(v=>v.setStartTime),m=c.useRef(!1),p=c.useCallback(()=>{window.localStorage.setItem(e,JSON.stringify({currentTime:n,duration:r}))},[n,r,e]),h=c.useCallback(()=>{const v=window.localStorage.getItem(e);if(v){const x=JSON.parse(v);return{startTime:x.currentTime,progress:x.currentTime/x.duration*100}}return{startTime:null,progress:null}},[e]),a=c.useCallback(()=>{n<rr||p()},[n,p]),f=c.useCallback(()=>{if(m.current)return;const{progress:v,startTime:x}=h();x&&v&&v<or&&(l(x),m.current=!0)},[h,l]);return de(()=>a(),i?1e3:null),c.useEffect(()=>{f()},[f]),null}function sr({url:e,watchHistory:n}){return o.jsxs(Ye,{children:[o.jsx(ar,{url:e}),n?.enabled&&o.jsx(ir,{storageKey:n.storageKey})]})}function ar({url:e}){const n=u(r=>r.containerRef);return o.jsxs(qe,{ref:n,children:[o.jsx(Qe,{url:e,isLive:!1}),o.jsx(at,{}),o.jsxs(st,{children:[o.jsx(er,{}),o.jsx($e,{children:o.jsxs(et,{children:[o.jsx(tr,{}),o.jsxs(tt,{children:[o.jsxs(rt,{children:[o.jsx($n,{}),o.jsx(ht,{}),o.jsx(nr,{})]}),o.jsxs(ot,{children:[o.jsx(dt,{}),o.jsx(it,{})]})]})]})})]})]})}O.LivePlayer=Qn,O.VodPlayer=sr,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})}));
448
+ `;function qn({url:e,startDate:n,endDate:r,messages:i}){return o.jsx(jn,{startDate:new Date(n),endDate:new Date(r),children:o.jsx($n,{url:e,messages:i})})}function $n({url:e,messages:n}){const r=u(i=>i.containerRef);return o.jsx($e,{ref:r,children:o.jsxs(Jt,{eventFinishedMessage:n?.eventFinished,eventNotStartedMessage:n?.eventNotStarted,eventStartingSoonMessage:n?.eventStartingSoon,children:[o.jsx(_n,{url:e}),o.jsx(lt,{}),o.jsxs(at,{children:[o.jsx(gn,{}),o.jsx(et,{children:o.jsxs(tt,{children:[o.jsx(Sn,{}),o.jsxs(nt,{children:[o.jsxs(ot,{children:[o.jsx(pn,{}),o.jsx(En,{}),o.jsx(mt,{}),o.jsx(Rn,{})]}),o.jsxs(it,{children:[o.jsx($t,{message:n?.live}),o.jsx(ft,{}),o.jsx(st,{})]})]})]})})]})]})})}function er(){const e=u(l=>l.isPlaying),n=u(l=>l.pause),r=u(l=>l.play),i=()=>{e?n():r()};return o.jsx(W,{onClick:i,children:e?o.jsx(Ie,{}):o.jsx(Me,{})})}function tr(){const e=u(l=>l.isPlaying),n=u(l=>l.pause),r=u(l=>l.play),i=()=>{e?n():r()};return o.jsx(He,{onClick:i})}const vt="vod-player-progress-bar";function nr(){const e=c.useRef(null),n=c.useRef(null),[r,i]=c.useState(!1),[l,m]=c.useState(-1),[p,h]=c.useState(-1),a=u(g=>g.currentTime),f=u(g=>g.duration),v=u(g=>g.seek),x=u(g=>g.addIdleLock),L=u(g=>g.removeIdleLock),j=parseFloat((f?(p!==-1?p:a)/f*100:0).toFixed(1)),M=g=>{h(f*(g[0]/100)),x(vt)},_=()=>{p!==-1&&(v(p),h(-1),L(vt))},U=()=>i(!0),D=()=>i(!1),P=c.useCallback(g=>{const z=e.current,Z=n.current;if(z&&Z){const X=he(z),ee=he(Z),K=(g.pageX||g.clientX)-X.left,G=K/X.width;if(G<0)return;let T=K-ee.width/2;T<0&&(T=0),T>X.width-ee.width&&(T=-1),Z.style.left=T>-1?`${T}px`:"auto",Z.style.right=T>-1?"auto":"0px",m(G*f)}U()},[f]);return o.jsxs(Ae,{children:[o.jsx(fe,{ref:e,value:[j],onPointerLeave:D,onPointerDown:D,onPointerMove:P,onValueChange:M,onValueCommit:_,step:.1}),o.jsx(Ue,{ref:n,$isVisible:r,children:o.jsx(Ne,{children:$(l)})})]})}function rr(){const e=u(r=>r.currentTime),n=u(r=>r.duration);return o.jsxs(Je,{children:[o.jsx(Ke,{children:$(e)}),o.jsx(Qe,{}),o.jsx(Ge,{children:$(n)})]})}const or=60,ir=95;function sr({storageKey:e}){const n=u(v=>v.currentTime),r=u(v=>v.duration),i=u(v=>v.isPlaying),l=u(v=>v.setStartTime),m=c.useRef(!1),p=c.useCallback(()=>{window.localStorage.setItem(e,JSON.stringify({currentTime:n,duration:r}))},[n,r,e]),h=c.useCallback(()=>{const v=window.localStorage.getItem(e);if(v){const x=JSON.parse(v);return{startTime:x.currentTime,progress:x.currentTime/x.duration*100}}return{startTime:null,progress:null}},[e]),a=c.useCallback(()=>{n<or||p()},[n,p]),f=c.useCallback(()=>{if(m.current)return;const{progress:v,startTime:x}=h();x&&v&&v<ir&&(l(x),m.current=!0)},[h,l]);return de(()=>a(),i?1e3:null),c.useEffect(()=>{f()},[f]),null}function ar({url:e,watchHistory:n}){return o.jsxs(Ye,{children:[o.jsx(lr,{url:e}),n?.enabled&&o.jsx(sr,{storageKey:n.storageKey})]})}function lr({url:e}){const n=u(r=>r.containerRef);return o.jsxs($e,{ref:n,children:[o.jsx(qe,{url:e,isLive:!1}),o.jsx(lt,{}),o.jsxs(at,{children:[o.jsx(tr,{}),o.jsx(et,{children:o.jsxs(tt,{children:[o.jsx(nr,{}),o.jsxs(nt,{children:[o.jsxs(ot,{children:[o.jsx(er,{}),o.jsx(mt,{}),o.jsx(rr,{})]}),o.jsxs(it,{children:[o.jsx(ft,{}),o.jsx(st,{})]})]})]})})]})]})}O.LivePlayer=qn,O.VodPlayer=ar,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})}));
445
449
  //# sourceMappingURL=react-video-player.umd.js.map