@livepeer-frameworks/player-react 0.1.0 → 0.1.2
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.
- package/README.md +7 -9
- package/dist/cjs/_virtual/_rollupPluginBabelHelpers.js +359 -0
- package/dist/cjs/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
- package/dist/cjs/assets/logomark.svg.js +8 -0
- package/dist/cjs/assets/logomark.svg.js.map +1 -0
- package/dist/cjs/components/DevModePanel.js +826 -0
- package/dist/cjs/components/DevModePanel.js.map +1 -0
- package/dist/cjs/components/DvdLogo.js +200 -0
- package/dist/cjs/components/DvdLogo.js.map +1 -0
- package/dist/cjs/components/Icons.js +439 -0
- package/dist/cjs/components/Icons.js.map +1 -0
- package/dist/cjs/components/IdleScreen.js +587 -0
- package/dist/cjs/components/IdleScreen.js.map +1 -0
- package/dist/cjs/components/LoadingScreen.js +523 -0
- package/dist/cjs/components/LoadingScreen.js.map +1 -0
- package/dist/cjs/components/Player.js +420 -0
- package/dist/cjs/components/Player.js.map +1 -0
- package/dist/cjs/components/PlayerControls.js +798 -0
- package/dist/cjs/components/PlayerControls.js.map +1 -0
- package/dist/cjs/components/PlayerErrorBoundary.js +80 -0
- package/dist/cjs/components/PlayerErrorBoundary.js.map +1 -0
- package/dist/cjs/components/SeekBar.js +253 -0
- package/dist/cjs/components/SeekBar.js.map +1 -0
- package/dist/cjs/components/SkipIndicator.js +92 -0
- package/dist/cjs/components/SkipIndicator.js.map +1 -0
- package/dist/cjs/components/SpeedIndicator.js +43 -0
- package/dist/cjs/components/SpeedIndicator.js.map +1 -0
- package/dist/cjs/components/StatsPanel.js +202 -0
- package/dist/cjs/components/StatsPanel.js.map +1 -0
- package/dist/cjs/components/StreamStateOverlay.js +229 -0
- package/dist/cjs/components/StreamStateOverlay.js.map +1 -0
- package/dist/cjs/components/ThumbnailOverlay.js +86 -0
- package/dist/cjs/components/ThumbnailOverlay.js.map +1 -0
- package/dist/cjs/components/TitleOverlay.js +32 -0
- package/dist/cjs/components/TitleOverlay.js.map +1 -0
- package/dist/cjs/context/PlayerContext.js +46 -0
- package/dist/cjs/context/PlayerContext.js.map +1 -0
- package/dist/cjs/hooks/useMetaTrack.js +165 -0
- package/dist/cjs/hooks/useMetaTrack.js.map +1 -0
- package/dist/cjs/hooks/usePlaybackQuality.js +131 -0
- package/dist/cjs/hooks/usePlaybackQuality.js.map +1 -0
- package/dist/cjs/hooks/usePlayerController.js +518 -0
- package/dist/cjs/hooks/usePlayerController.js.map +1 -0
- package/dist/cjs/hooks/usePlayerSelection.js +90 -0
- package/dist/cjs/hooks/usePlayerSelection.js.map +1 -0
- package/dist/cjs/hooks/useStreamState.js +360 -0
- package/dist/cjs/hooks/useStreamState.js.map +1 -0
- package/dist/cjs/hooks/useTelemetry.js +120 -0
- package/dist/cjs/hooks/useTelemetry.js.map +1 -0
- package/dist/cjs/hooks/useViewerEndpoints.js +222 -0
- package/dist/cjs/hooks/useViewerEndpoints.js.map +1 -0
- package/dist/cjs/index.js +97 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/ui/badge.js +34 -0
- package/dist/cjs/ui/badge.js.map +1 -0
- package/dist/cjs/ui/button.js +74 -0
- package/dist/cjs/ui/button.js.map +1 -0
- package/dist/cjs/ui/context-menu.js +163 -0
- package/dist/cjs/ui/context-menu.js.map +1 -0
- package/dist/cjs/ui/slider.js +60 -0
- package/dist/cjs/ui/slider.js.map +1 -0
- package/dist/esm/_virtual/_rollupPluginBabelHelpers.js +329 -0
- package/dist/esm/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
- package/dist/esm/assets/logomark.svg.js +4 -0
- package/dist/esm/assets/logomark.svg.js.map +1 -0
- package/dist/esm/components/DevModePanel.js +822 -0
- package/dist/esm/components/DevModePanel.js.map +1 -0
- package/dist/esm/components/DvdLogo.js +196 -0
- package/dist/esm/components/DvdLogo.js.map +1 -0
- package/dist/esm/components/Icons.js +421 -0
- package/dist/esm/components/Icons.js.map +1 -0
- package/dist/esm/components/IdleScreen.js +582 -0
- package/dist/esm/components/IdleScreen.js.map +1 -0
- package/dist/esm/components/LoadingScreen.js +519 -0
- package/dist/esm/components/LoadingScreen.js.map +1 -0
- package/dist/esm/components/Player.js +416 -0
- package/dist/esm/components/Player.js.map +1 -0
- package/dist/esm/components/PlayerControls.js +794 -0
- package/dist/esm/components/PlayerControls.js.map +1 -0
- package/dist/esm/components/PlayerErrorBoundary.js +76 -0
- package/dist/esm/components/PlayerErrorBoundary.js.map +1 -0
- package/dist/esm/components/SeekBar.js +249 -0
- package/dist/esm/components/SeekBar.js.map +1 -0
- package/dist/esm/components/SkipIndicator.js +88 -0
- package/dist/esm/components/SkipIndicator.js.map +1 -0
- package/dist/esm/components/SpeedIndicator.js +39 -0
- package/dist/esm/components/SpeedIndicator.js.map +1 -0
- package/dist/esm/components/StatsPanel.js +198 -0
- package/dist/esm/components/StatsPanel.js.map +1 -0
- package/dist/esm/components/StreamStateOverlay.js +224 -0
- package/dist/esm/components/StreamStateOverlay.js.map +1 -0
- package/dist/esm/components/ThumbnailOverlay.js +82 -0
- package/dist/esm/components/ThumbnailOverlay.js.map +1 -0
- package/dist/esm/components/TitleOverlay.js +28 -0
- package/dist/esm/components/TitleOverlay.js.map +1 -0
- package/dist/esm/context/PlayerContext.js +41 -0
- package/dist/esm/context/PlayerContext.js.map +1 -0
- package/dist/esm/hooks/useMetaTrack.js +163 -0
- package/dist/esm/hooks/useMetaTrack.js.map +1 -0
- package/dist/esm/hooks/usePlaybackQuality.js +129 -0
- package/dist/esm/hooks/usePlaybackQuality.js.map +1 -0
- package/dist/esm/hooks/usePlayerController.js +516 -0
- package/dist/esm/hooks/usePlayerController.js.map +1 -0
- package/dist/esm/hooks/usePlayerSelection.js +88 -0
- package/dist/esm/hooks/usePlayerSelection.js.map +1 -0
- package/dist/esm/hooks/useStreamState.js +358 -0
- package/dist/esm/hooks/useStreamState.js.map +1 -0
- package/dist/esm/hooks/useTelemetry.js +118 -0
- package/dist/esm/hooks/useTelemetry.js.map +1 -0
- package/dist/esm/hooks/useViewerEndpoints.js +220 -0
- package/dist/esm/hooks/useViewerEndpoints.js.map +1 -0
- package/dist/esm/index.js +23 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/ui/badge.js +31 -0
- package/dist/esm/ui/badge.js.map +1 -0
- package/dist/esm/ui/button.js +52 -0
- package/dist/esm/ui/button.js.map +1 -0
- package/dist/esm/ui/context-menu.js +132 -0
- package/dist/esm/ui/context-menu.js.map +1 -0
- package/dist/esm/ui/slider.js +38 -0
- package/dist/esm/ui/slider.js.map +1 -0
- package/dist/types/components/DvdLogo.d.ts +1 -1
- package/dist/types/components/Icons.d.ts +1 -1
- package/dist/types/components/Player.d.ts +1 -1
- package/dist/types/components/PlayerErrorBoundary.d.ts +2 -1
- package/dist/types/components/StreamStateOverlay.d.ts +2 -2
- package/dist/types/components/SubtitleRenderer.d.ts +2 -2
- package/dist/types/context/PlayerContext.d.ts +2 -2
- package/dist/types/context/index.d.ts +2 -2
- package/dist/types/hooks/useMetaTrack.d.ts +3 -3
- package/dist/types/hooks/usePlaybackQuality.d.ts +2 -2
- package/dist/types/hooks/usePlayerController.d.ts +26 -3
- package/dist/types/hooks/usePlayerSelection.d.ts +1 -1
- package/dist/types/hooks/useStreamState.d.ts +1 -1
- package/dist/types/hooks/useTelemetry.d.ts +1 -1
- package/dist/types/hooks/useViewerEndpoints.d.ts +3 -3
- package/dist/types/index.d.ts +28 -28
- package/dist/types/types.d.ts +3 -3
- package/dist/types/ui/select.d.ts +1 -1
- package/package.json +22 -14
- package/src/components/DevModePanel.tsx +244 -143
- package/src/components/DvdLogo.tsx +1 -1
- package/src/components/Icons.tsx +105 -25
- package/src/components/IdleScreen.tsx +262 -128
- package/src/components/LoadingScreen.tsx +169 -151
- package/src/components/LogoOverlay.tsx +3 -6
- package/src/components/Player.tsx +126 -59
- package/src/components/PlayerControls.tsx +384 -272
- package/src/components/PlayerErrorBoundary.tsx +7 -13
- package/src/components/SeekBar.tsx +96 -88
- package/src/components/SkipIndicator.tsx +2 -12
- package/src/components/SpeedIndicator.tsx +2 -11
- package/src/components/StatsPanel.tsx +31 -22
- package/src/components/StreamStateOverlay.tsx +105 -49
- package/src/components/SubtitleRenderer.tsx +29 -29
- package/src/components/ThumbnailOverlay.tsx +5 -6
- package/src/components/TitleOverlay.tsx +2 -8
- package/src/context/PlayerContext.tsx +4 -8
- package/src/context/index.ts +3 -3
- package/src/hooks/useMetaTrack.ts +27 -27
- package/src/hooks/usePlaybackQuality.ts +3 -3
- package/src/hooks/usePlayerController.ts +246 -138
- package/src/hooks/usePlayerSelection.ts +6 -6
- package/src/hooks/useStreamState.ts +51 -56
- package/src/hooks/useTelemetry.ts +18 -3
- package/src/hooks/useViewerEndpoints.ts +34 -23
- package/src/index.tsx +36 -28
- package/src/types.ts +8 -8
- package/src/ui/badge.tsx +6 -5
- package/src/ui/button.tsx +9 -8
- package/src/ui/context-menu.tsx +42 -61
- package/src/ui/select.tsx +13 -7
- package/src/ui/slider.tsx +18 -29
- package/dist/types/components/players/DashJsPlayer.d.ts +0 -18
- package/dist/types/components/players/HlsJsPlayer.d.ts +0 -18
- package/dist/types/components/players/MewsWsPlayer/index.d.ts +0 -18
- package/dist/types/components/players/MistPlayer.d.ts +0 -20
- package/dist/types/components/players/MistWebRTCPlayer/index.d.ts +0 -20
- package/dist/types/components/players/NativePlayer.d.ts +0 -19
- package/dist/types/components/players/VideoJsPlayer.d.ts +0 -18
- package/src/components/players/DashJsPlayer.tsx +0 -56
- package/src/components/players/HlsJsPlayer.tsx +0 -56
- package/src/components/players/MewsWsPlayer/index.tsx +0 -56
- package/src/components/players/MistPlayer.tsx +0 -60
- package/src/components/players/MistWebRTCPlayer/index.tsx +0 -59
- package/src/components/players/NativePlayer.tsx +0 -58
- package/src/components/players/VideoJsPlayer.tsx +0 -56
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,24 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from"react";import a,{useState as o,useRef as i,useEffect as l,useCallback as s,createContext as c,useContext as u,useMemo as d,Component as f}from"react";import{cn as v,PlayerController as m,isLiveContent as h,isMediaStreamSource as p,supportsPlaybackRate as C,calculateSeekableRange as g,calculateLiveThresholds as b,canSeekStream as w,calculateIsNearLive as y,formatTimeDisplay as A,SPEED_PRESETS as N,QualityMonitor as k,globalPlayerManager as x,MetaTrackManager as S,TelemetryReporter as L}from"@livepeer-frameworks/player-core";export{GatewayClient,PlayerController,PlayerManager,QualityMonitor,StreamStateClient,cn,globalPlayerManager}from"@livepeer-frameworks/player-core";import*as E from"@radix-ui/react-slider";import*as M from"@radix-ui/react-context-menu";import{ChevronRight as T,Check as I,Circle as q}from"lucide-react";import{Slot as B}from"@radix-ui/react-slot";import{cva as F}from"class-variance-authority";function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function D(e,t,n,r,a,o,i){try{var l=e[o](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,a)}function P(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){D(o,r,a,i,l,"next",e)}function l(e){D(o,r,a,i,l,"throw",e)}i(void 0)})}}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,K(r.key),r)}}function z(e,t,n){return(t=K(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function W(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(W=function(){return!!e})()}function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(Object(n),!0).forEach(function(t){z(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Q(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Y(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function o(n,r,a,o){var s=r&&r.prototype instanceof l?r:l,c=Object.create(s.prototype);return J(c,"_invoke",function(n,r,a){var o,l,s,c=0,u=a||[],d=!1,f={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(t,n){return o=t,l=0,s=e,f.n=n,i}};function v(n,r){for(l=n,s=r,t=0;!d&&c&&!a&&t<u.length;t++){var a,o=u[t],v=f.p,m=o[2];n>3?(a=m===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=e):o[0]<=v&&((a=n<2&&v<o[1])?(l=0,f.v=r,f.n=o[1]):v<m&&(a=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,l=0))}if(a||n>1)return i;throw d=!0,r}return function(a,u,m){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&v(u,m),l=u,s=m;(t=l<2?e:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),v(l,s)):f.n=s:f.v=s);try{if(c=2,o){if(l||(a="next"),t=o[a]){if(!(t=t.call(o,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=o.return)&&t.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+a+"' method"),l=1);o=e}else if((t=(d=f.n<0)?s:n.call(r,f))!==i)break}catch(t){o=e,l=1,s=t}finally{c=1}}return{value:t,done:d}}}(n,a,o),!0),c}var i={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(J(t={},r,function(){return this}),t),d=c.prototype=l.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,J(e,a,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=c,J(d,"constructor",c),J(c,"constructor",s),s.displayName="GeneratorFunction",J(c,a,"GeneratorFunction"),J(d),J(d,a,"Generator"),J(d,r,function(){return this}),J(d,"toString",function(){return"[object Generator]"}),(Y=function(){return{w:o,m:f}})()}function J(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}J=function(e,t,n,r){function o(t,n){J(e,t,function(e){return this._invoke(t,n,e)})}t?a?a(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},J(e,t,n,r)}function G(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(typeof e+" is not iterable")}function H(e,t){return H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},H(e,t)}function Z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,l=[],s=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,a=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw a}}return l}}(e,t)||_(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function X(e){return function(e){if(Array.isArray(e))return R(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function K(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function _(e,t){if(e){if("string"==typeof e)return R(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}var $=153/69,ee=["#7aa2f7","#bb9af7","#9ece6a","#73daca","#7dcfff","#f7768e","#e0af68","#2ac3de"],te=function(e){if(0===ee.length)return null!=e?e:"#ffffff";if(1===ee.length)return ee[0];var t;do{t=ee[Math.floor(Math.random()*ee.length)]}while(t===e);return t},ne=function(t){var n=t.parentRef,r=t.scale,s=void 0===r?.15:r,c=Z(o({top:0,left:0}),2),u=c[0],d=c[1],f=i(u);l(function(){f.current=u},[u]);var v=Z(o({width:153,height:69}),2),m=v[0],h=v[1],p=i(m);l(function(){p.current=m},[m]);var C=i({x:1.8,y:1.6}),g=Z(o(te()),2),b=g[0],w=g[1],y=a.useCallback(function(){var e=n.current;if(e){var t=e.clientWidth,r=e.clientHeight;if(0!==t&&0!==r){var a=r*s,o=t*s,i=o/$;i>a&&(o=(i=a)*$);var l={width:Math.max(20,o),height:Math.max(20,i)};p.current=l,h(l);var c=Math.max(0,r-l.height),u=Math.max(0,t-l.width),v={top:Math.random()*c,left:Math.random()*u};f.current=v,d(v);var m=Math.max(1.2,Math.min(l.width,l.height)/70);C.current={x:m*(Math.random()>.5?1:-1),y:m*(Math.random()>.5?1:-1)}}}},[n,s]);return l(function(){if(n.current){if(y(),"undefined"!=typeof ResizeObserver){var e=new ResizeObserver(function(){return y()});return e.observe(n.current),function(){return e.disconnect()}}var t=function(){return y()};return window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}}},[n,y]),l(function(){var e,t=performance.now(),r=function(a){var o=n.current,i=p.current;if(o&&0!==i.width&&0!==i.height){var l=a-t;t=a;var s=Math.min(l/16,2),c=o.clientHeight-i.height,u=o.clientWidth-i.width,v=f.current,m=v.top,h=v.left,g=C.current,b=g.x,y=g.y,A=!1;h+=b*s,((m+=y*s)<=0||m>=c)&&(y=-y,m=Math.max(0,Math.min(c,m)),A=!0),(h<=0||h>=u)&&(b=-b,h=Math.max(0,Math.min(u,h)),A=!0),C.current={x:b,y:y};var N={top:m,left:h};f.current=N,d(N),A&&w(function(e){return te(e)}),e=requestAnimationFrame(r)}else e=requestAnimationFrame(r)};return e=requestAnimationFrame(r),function(){return cancelAnimationFrame(e)}},[n]),e("div",{className:"fw-player-dvd",style:{top:"".concat(u.top,"px"),left:"".concat(u.left,"px"),width:"".concat(m.width,"px"),height:"".concat(m.height,"px")},children:e("svg",{width:"100%",height:"100%",viewBox:"0 0 153 69",fill:b,className:"select-none",children:e("g",{children:e("path",{d:"M140.186,63.52h-1.695l-0.692,5.236h-0.847l0.77-5.236h-1.693l0.076-0.694h4.158L140.186,63.52L140.186,63.52z M146.346,68.756h-0.848v-4.545l0,0l-2.389,4.545l-1-4.545l0,0l-1.462,4.545h-0.771l1.924-5.931h0.695l0.924,4.006l2.078-4.006 h0.848V68.756L146.346,68.756z M126.027,0.063H95.352c0,0-8.129,9.592-9.654,11.434c-8.064,9.715-9.523,12.32-9.779,13.02 c0.063-0.699-0.256-3.304-3.686-13.148C71.282,8.7,68.359,0.062,68.359,0.062H57.881V0L32.35,0.063H13.169l-1.97,8.131 l14.543,0.062h3.365c9.336,0,15.055,3.747,13.467,10.354c-1.717,7.24-9.91,10.416-18.545,10.416h-3.24l4.191-17.783H10.502 L4.34,37.219h20.578c15.432,0,30.168-8.13,32.709-18.608c0.508-1.906,0.443-6.67-0.764-9.527c0-0.127-0.063-0.191-0.127-0.444 c-0.064-0.063-0.127-0.509,0.127-0.571c0.128-0.062,0.383,0.189,0.445,0.254c0.127,0.317,0.19,0.57,0.19,0.57l13.083,36.965 l33.344-37.6h14.1h3.365c9.337,0,15.055,3.747,13.528,10.354c-1.778,7.24-9.972,10.416-18.608,10.416h-3.238l4.191-17.783h-14.481 l-6.159,25.976h20.576c15.434,0,30.232-8.13,32.709-18.608C152.449,8.193,141.523,0.063,126.027,0.063L126.027,0.063z M71.091,45.981c-39.123,0-70.816,4.512-70.816,10.035c0,5.59,31.693,10.034,70.816,10.034c39.121,0,70.877-4.444,70.877-10.034 C141.968,50.493,110.212,45.981,71.091,45.981L71.091,45.981z M68.55,59.573c-8.956,0-16.196-1.523-16.196-3.365 c0-1.84,7.239-3.303,16.196-3.303c8.955,0,16.195,1.463,16.195,3.303C84.745,58.050,77.505,59.573,68.55,59.573L68.55,59.573z"})})})})},re="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2015806%2015806%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3Aserif%3D%22http%3A%2F%2Fwww.serif.com%2F%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%3B%22%3E%20%20%20%20%3Cg%20transform%3D%22matrix%285.55556%2C0%2C0%2C5.55556%2C0%2C0%29%22%3E%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%288.31462%2C0%2C0%2C8.31462%2C8.22267e-14%2C-6.49389e-14%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M488.82%2C596.09C489.36%2C595.2%20489.89%2C594.31%20490.41%2C593.41C490.5%2C593.25%20490.59%2C593.09%20490.68%2C592.93C499.43%2C577.56%20504.8%2C560.03%20505.8%2C541.33C505.82%2C541.05%20505.83%2C540.77%20505.85%2C540.49C505.88%2C539.79%20505.91%2C539.09%20505.93%2C538.38C505.96%2C537.46%20505.97%2C536.54%20505.98%2C535.61C505.98%2C535.41%20505.99%2C535.2%20505.99%2C535L505.99%2C534.72C505.99%2C469.43%20453.06%2C416.51%20387.78%2C416.51C322.5%2C416.51%20269.57%2C469.44%20269.57%2C534.72C269.57%2C582.95%20298.45%2C624.43%20339.86%2C642.81C342.17%2C641.83%20344.82%2C641.6%20347.6%2C642.5C347.71%2C642.48%20348.06%2C642.58%20348.8%2C642.93C349.87%2C642.59%20351.08%2C642.46%20352.17%2C642.22C354.63%2C641.68%20357.12%2C641.33%20359.58%2C640.81C365.15%2C639.64%20370.59%2C637.89%20376.16%2C636.73C382.32%2C635.45%20388.69%2C638.46%20390.44%2C644.84C391.16%2C647.46%20390.81%2C650.38%20389.65%2C652.91C430.42%2C652.28%20466.17%2C631.01%20486.93%2C599.09C487.1%2C598.83%20487.27%2C598.57%20487.44%2C598.31C487.91%2C597.57%20488.37%2C596.83%20488.83%2C596.09L488.82%2C596.09Z%22%20style%3D%22fill%3Argb%2826%2C26%2C26%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M398.87%2C484.2L399.88%2C505.89L410.28%2C509.55L395.52%2C509.55L394.43%2C479.48L415.2%2C479.48L398.87%2C484.2Z%22%20style%3D%22fill%3Argb%2877%2C77%2C77%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M407.52%2C632.43L407.52%2C632.37L405.83%2C567.81L405.91%2C560.75L420.81%2C555.3L399.31%2C556L402.95%2C630.22C404.49%2C630.89%20406.02%2C631.62%20407.53%2C632.42L407.52%2C632.43Z%22%20style%3D%22fill%3Argb%2877%2C77%2C77%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M315.75%2C435.86L315.75%2C445.19C315.75%2C445.19%20343.09%2C444.1%20343.09%2C467.32L343.09%2C491.12L366.17%2C476.2L467.27%2C476.2C473.14%2C476.2%20478.98%2C477.27%20484.41%2C479.5C489.4%2C481.55%20494.15%2C484.61%20494.15%2C488.82L494.15%2C442.41L406.24%2C442.41L406.24%2C435.92L315.75%2C435.86Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M384.52%2C549.53C383%2C549.84%20374.5%2C554.81%20372.41%2C555.99C361.06%2C562.39%20350.66%2C570.29%20340.56%2C578.47L343.55%2C511.3C357.29%2C499.76%20372.89%2C489.71%20389.69%2C483.46L391.34%2C511.85L380.41%2C515.68L465.05%2C515.68L465.05%2C549.54L384.51%2C549.54L384.52%2C549.53Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M384.62%2C620.15C386.3%2C618.47%20388.78%2C617.44%20391.15%2C617.44C392.32%2C617.44%20393.42%2C617.66%20394.43%2C618.05L391.53%2C561.24C376.44%2C568.54%20361.62%2C576.78%20348.45%2C587.23C346.53%2C588.75%20339.44%2C594.3%20338.53%2C595.88C338.16%2C596.53%20338.08%2C596.77%20337.99%2C597.52C336.15%2C611.29%20341.68%2C626.24%20327.48%2C635.06C325.4%2C636.35%20322.28%2C637.18%20320.41%2C638.36C319.72%2C638.79%20319.26%2C638.87%20319.46%2C639.87L357.68%2C640.77L357.68%2C621.03C357.68%2C620.82%20358.79%2C618.46%20359.07%2C618.05C362%2C613.76%20368.64%2C613.05%20372.45%2C616.63C373.18%2C617.32%20375.15%2C620.84%20375.15%2C621.57L375.15%2C626.68C376.32%2C626.01%20377.56%2C625.46%20378.87%2C625.04C380.03%2C624.43%20381.23%2C623.94%20382.45%2C623.58C382.94%2C622.27%20383.71%2C621.04%20384.62%2C620.14L384.62%2C620.15Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20x%3D%22336.59%22%20y%3D%22428.82%22%20width%3D%2255.13%22%20height%3D%228.66%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M370.43%2C405.41L381.28%2C405.41L381.28%2C428.82L347.02%2C428.82C347.02%2C415.9%20357.51%2C405.41%20370.43%2C405.41Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M375.15%2C621.59L375.15%2C646.4L399.31%2C643.32L393.82%2C606.12%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M434.95%2C641.77C427.45%2C636.79%20420.54%2C630.98%20414.13%2C624.68C378.86%2C650.1%20331.68%2C660.51%20289.92%2C645.24C276.7%2C656.38%20260.2%2C663.03%20243.21%2C666.13C245.28%2C668.42%20247.17%2C670.85%20249%2C673.36C259.11%2C673.75%20269.41%2C673.79%20279.47%2C672.94C316.6%2C669.77%20351.78%2C651.88%20389.38%2C653.26C420.31%2C654.4%20448.46%2C670.95%20479.26%2C673.24C493.74%2C674.31%20510.78%2C671.04%20524.28%2C665.72C524.6%2C665.6%20525.17%2C665.63%20525.1%2C665.2C493.55%2C667.12%20461.22%2C659.22%20434.94%2C641.78L434.95%2C641.77Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M431.64%2C681.28C431.71%2C681.82%20430.99%2C681.55%20430.67%2C681.5C428.7%2C681.19%20426.49%2C680.36%20424.48%2C679.92C400.81%2C674.72%20375.35%2C672.69%20351.2%2C675.65C341.11%2C676.89%20331.28%2C679.62%20321.24%2C681.22C300.45%2C684.53%20278.62%2C685.74%20257.83%2C682.01C273.85%2C682.14%20289.66%2C680.16%20305.21%2C676.54C319.99%2C673.09%20334.95%2C667.38%20350.01%2C665.52C377.55%2C662.11%20406.29%2C671.7%20431.64%2C681.28Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M376.31%2C636.41L367.67%2C639.94C342.05%2C648.2%20314.13%2C646.84%20288.76%2C638.37C280.1%2C644.46%20271.14%2C650.64%20260.82%2C653.56L267.06%2C649.22C276.19%2C642.22%20285.08%2C634.65%20291.47%2C624.98C294.79%2C626.43%20297.92%2C628.31%20301.23%2C629.78C323.76%2C639.82%20352.12%2C642.31%20376.31%2C636.41Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M496.44%2C679.79L493.62%2C680.99C455.11%2C696.09%20422.32%2C666.01%20385.12%2C661.7L374.61%2C660.13C397.05%2C658.33%20419.03%2C663.62%20440.24%2C670.18C445.86%2C671.92%20451.4%2C674.13%20457.03%2C675.77C469.67%2C679.46%20483.33%2C681.19%20496.45%2C679.8L496.44%2C679.79Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M502.72%2C658.04L499.89%2C658.33C480.42%2C655.87%20461.58%2C649.56%20444.59%2C639.91C442.86%2C638.93%20440.96%2C637.83%20439.42%2C636.58C447.9%2C638.94%20456.77%2C635.92%20464.33%2C632.12C472.21%2C646.13%20487.36%2C654.62%20502.73%2C658.03L502.72%2C658.04Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M440%2C690.82C440.07%2C691.36%20439.35%2C691.09%20439.03%2C691.04C435.69%2C690.51%20432.35%2C689.64%20429.02%2C689.11C398.16%2C684.21%20366.77%2C684.02%20335.64%2C686.06C335.32%2C686.08%20334.23%2C686.27%20334.29%2C685.75C369.06%2C676.79%20406.04%2C680.41%20440%2C690.82Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M313.56%2C572.87L313.69%2C572.14L313.94%2C572.49L313.56%2C572.87Z%22%20style%3D%22fill%3Argb%282%2C38%2C43%29%3Bfill-opacity%3A0.6%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M539.06%2C620.51C542.62%2C613.83%20545.72%2C606.95%20548.35%2C599.91C560.45%2C567.54%20562.63%2C531.85%20554.01%2C497.83C553.56%2C496.03%20551.73%2C494.94%20549.93%2C495.4C548.14%2C495.85%20547.05%2C497.68%20547.5%2C499.47C555.79%2C532.17%20553.69%2C566.46%20542.08%2C597.56C539.98%2C603.18%20537.56%2C608.71%20534.84%2C614.1C532.63%2C618.48%20530.21%2C622.77%20527.59%2C626.96C527.3%2C627.44%20527%2C627.91%20526.69%2C628.38C525.42%2C630.39%20524.1%2C632.37%20522.71%2C634.32C522.05%2C635.28%20521.36%2C636.24%20520.66%2C637.19C519.76%2C638.42%20518.84%2C639.63%20517.89%2C640.84C512.56%2C647.71%20506.62%2C654.2%20500.09%2C660.26C498.25%2C661.96%20496.36%2C663.64%20494.43%2C665.27C490.48%2C668.61%20486.33%2C671.8%20482%2C674.81C478.57%2C677.19%20474.88%2C679.59%20471.13%2C681.77C467.82%2C683.69%20464.47%2C685.45%20461.2%2C686.92C461.06%2C686.99%20460.92%2C687.06%20460.79%2C687.14L460.76%2C687.16L460.74%2C687.16L460.58%2C687.29L460.43%2C687.41L460.37%2C687.45L460.3%2C687.51L460.11%2C687.7L460.07%2C687.75L460.05%2C687.77L460.03%2C687.8L460%2C687.83C459.77%2C688.11%20459.57%2C688.43%20459.44%2C688.79C459.3%2C689.15%20459.23%2C689.53%20459.22%2C689.9L459.22%2C690.26L459.25%2C690.42L459.29%2C690.67L459.35%2C690.9C459.39%2C691.06%20459.45%2C691.21%20459.51%2C691.36C459.58%2C691.5%20459.65%2C691.64%20459.73%2C691.77L459.75%2C691.79L459.77%2C691.82L459.88%2C691.98L460%2C692.13L460.04%2C692.19L460.34%2C692.49L460.36%2C692.49L460.42%2C692.56C460.7%2C692.79%20461.02%2C692.98%20461.38%2C693.12L483.09%2C701.39L504.75%2C709.65C504.94%2C709.72%20505.13%2C709.78%20505.34%2C709.82C506.31%2C710.21%20507.44%2C710.1%20508.32%2C709.48C508.49%2C709.37%20508.64%2C709.23%20508.79%2C709.08L556.35%2C659.8C557.38%2C658.73%20557.5%2C657.12%20556.75%2C655.92L539.06%2C620.51Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M427.7%2C697.67C395%2C705.96%20360.71%2C703.86%20329.62%2C692.24C313.96%2C686.39%20299.11%2C678.13%20285.67%2C667.54C283.67%2C665.98%20281.69%2C664.35%20279.75%2C662.67C272.21%2C656.14%20265.17%2C648.83%20258.77%2C640.77C257.46%2C639.14%20256.18%2C637.46%20254.94%2C635.76C254.57%2C635.27%20254.21%2C634.78%20253.85%2C634.28C253.35%2C633.58%20252.85%2C632.88%20252.36%2C632.17C249.98%2C628.73%20247.59%2C625.05%20245.4%2C621.29C243.51%2C618.05%20241.78%2C614.76%20240.33%2C611.54C240.3%2C611.48%20240.28%2C611.43%20240.25%2C611.37C240.25%2C611.35%20240.23%2C611.32%20240.22%2C611.3C240.16%2C611.18%20240.1%2C611.07%20240.03%2C610.96L240.01%2C610.93L240.01%2C610.9L239.89%2C610.74L239.77%2C610.6L239.72%2C610.54L239.66%2C610.47L239.56%2C610.36L239.47%2C610.28L239.43%2C610.24L239.4%2C610.22L239.38%2C610.19L239.34%2C610.17C239.29%2C610.13%20239.24%2C610.09%20239.19%2C610.05C238.95%2C609.87%20238.68%2C609.72%20238.39%2C609.61C238.02%2C609.47%20237.65%2C609.4%20237.28%2C609.39L236.91%2C609.39L236.75%2C609.42L236.51%2C609.46L236.27%2C609.52C236.12%2C609.56%20235.97%2C609.62%20235.81%2C609.68C235.67%2C609.75%20235.54%2C609.82%20235.41%2C609.9L235.35%2C609.94L235.19%2C610.05L234.99%2C610.21L234.92%2C610.27L234.73%2C610.46L234.69%2C610.51L234.61%2C610.59C234.38%2C610.87%20234.19%2C611.19%20234.05%2C611.55L225.78%2C633.25L217.53%2C654.92C217.45%2C655.11%20217.39%2C655.3%20217.35%2C655.51C216.96%2C656.48%20217.08%2C657.61%20217.69%2C658.49C217.8%2C658.66%20217.94%2C658.81%20218.09%2C658.96L267.38%2C706.52C268.44%2C707.55%20270.05%2C707.67%20271.25%2C706.92L306.67%2C689.23C313.34%2C692.79%20320.22%2C695.89%20327.26%2C698.52C359.63%2C710.62%20395.32%2C712.8%20429.34%2C704.18C431.14%2C703.72%20432.23%2C701.9%20431.78%2C700.1C431.32%2C698.31%20429.5%2C697.22%20427.7%2C697.67Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M222.39%2C582.08C222.84%2C583.87%20224.67%2C584.96%20226.46%2C584.51C228.26%2C584.05%20229.35%2C582.23%20228.89%2C580.43C220.61%2C547.74%20222.7%2C513.44%20234.32%2C482.35C240.43%2C466.01%20249.16%2C450.55%20260.42%2C436.66C266.85%2C428.7%20274.11%2C421.26%20282.17%2C414.47C286.06%2C411.19%20290.14%2C408.06%20294.4%2C405.1C297.83%2C402.71%20301.52%2C400.32%20305.27%2C398.13C308.57%2C396.21%20311.92%2C394.45%20315.2%2C392.98C315.34%2C392.92%20315.48%2C392.84%20315.61%2C392.76L315.63%2C392.74L315.66%2C392.74L315.82%2C392.62L315.97%2C392.5L316.03%2C392.45L316.09%2C392.39L316.2%2C392.29L316.28%2C392.2L316.33%2C392.16L316.35%2C392.13L316.37%2C392.11L316.4%2C392.07C316.63%2C391.79%20316.82%2C391.48%20316.96%2C391.12C317.1%2C390.75%20317.17%2C390.38%20317.18%2C390.01L317.18%2C389.78L317.17%2C389.64L317.15%2C389.48L317.11%2C389.24L317.05%2C389C317.01%2C388.85%20316.95%2C388.7%20316.88%2C388.55C316.82%2C388.4%20316.74%2C388.27%20316.66%2C388.14L316.64%2C388.11L316.64%2C388.08L316.52%2C387.92L316.4%2C387.77L316.35%2C387.72L316.29%2C387.65L316.06%2C387.42L316.03%2C387.4L316.01%2C387.37L315.97%2C387.35C315.69%2C387.11%20315.37%2C386.92%20315.02%2C386.79L293.31%2C378.51L271.65%2C370.26C271.46%2C370.18%20271.26%2C370.12%20271.06%2C370.08C270.08%2C369.7%20268.96%2C369.81%20268.08%2C370.42C267.91%2C370.54%20267.75%2C370.67%20267.61%2C370.82L220.05%2C420.11C219.02%2C421.18%20218.89%2C422.78%20219.65%2C423.98L237.33%2C459.4C233.77%2C466.07%20230.67%2C472.95%20228.04%2C480C215.95%2C512.36%20213.77%2C548.05%20222.39%2C582.08Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-217.125%2C-368.902%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M519.68%2C441.65C520.78%2C443.12%20521.85%2C444.61%20522.91%2C446.13C525.3%2C449.56%20527.69%2C453.25%20529.88%2C457C531.8%2C460.3%20533.56%2C463.65%20535.03%2C466.93C535.09%2C467.07%20535.17%2C467.21%20535.25%2C467.34L535.27%2C467.36L535.27%2C467.39L535.39%2C467.55L535.51%2C467.7L535.56%2C467.76L535.62%2C467.82L535.72%2C467.93L535.81%2C468.01L535.85%2C468.05L535.88%2C468.07L535.9%2C468.1L535.94%2C468.13C536.22%2C468.36%20536.54%2C468.55%20536.89%2C468.69C537.26%2C468.83%20537.63%2C468.89%20538%2C468.9L538.37%2C468.9L538.53%2C468.88L538.77%2C468.84L539.01%2C468.78C539.16%2C468.73%20539.31%2C468.68%20539.46%2C468.61C539.61%2C468.54%20539.74%2C468.47%20539.87%2C468.39L539.9%2C468.37L539.93%2C468.37L540.09%2C468.25L540.24%2C468.13L540.29%2C468.08L540.36%2C468.02L540.59%2C467.79L540.61%2C467.76L540.64%2C467.74L540.66%2C467.7C540.9%2C467.42%20541.09%2C467.1%20541.22%2C466.74L549.5%2C445.04L557.75%2C423.38C557.83%2C423.19%20557.89%2C422.99%20557.93%2C422.79C558.32%2C421.81%20558.2%2C420.69%20557.59%2C419.81C557.47%2C419.64%20557.34%2C419.48%20557.19%2C419.33L507.9%2C371.78C506.84%2C370.75%20505.23%2C370.62%20504.03%2C371.38L468.61%2C389.06C461.94%2C385.5%20455.06%2C382.4%20448.01%2C379.77C415.65%2C367.68%20379.96%2C365.5%20345.93%2C374.12C344.14%2C374.57%20343.05%2C376.4%20343.5%2C378.19C343.96%2C379.98%20345.78%2C381.08%20347.58%2C380.62C380.27%2C372.34%20414.57%2C374.43%20445.66%2C386.05C461.19%2C391.85%20475.94%2C400.04%20489.29%2C410.5C500.52%2C419.29%20510.77%2C429.7%20519.68%2C441.65Z%22%20style%3D%22fill%3Argb%28242%2C242%2C242%29%3Bfill-rule%3Anonzero%3B%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",ae=function(t){var n=t.index,r=Z(o({top:0,left:0}),2),a=r[0],i=r[1],s=Z(o(40),2),c=s[0],u=s[1],d=Z(o(0),2),f=d[0],v=d[1],m=function(){return{top:80*Math.random()+10,left:80*Math.random()+10}},h=function(){return 60*Math.random()+30};l(function(){i(m()),u(h());var e=function(){v(.15),setTimeout(function(){v(0),setTimeout(function(){i(m()),u(h()),setTimeout(function(){e()},200)},1500)},4e3+3e3*Math.random())},t=setTimeout(e,500*n);return function(){return clearTimeout(t)}},[n]);var p=["rgba(122, 162, 247, 0.2)","rgba(187, 154, 247, 0.2)","rgba(158, 206, 106, 0.2)","rgba(115, 218, 202, 0.2)","rgba(125, 207, 255, 0.2)","rgba(247, 118, 142, 0.2)","rgba(224, 175, 104, 0.2)","rgba(42, 195, 222, 0.2)"];return e("div",{style:{position:"absolute",top:"".concat(a.top,"%"),left:"".concat(a.left,"%"),width:"".concat(c,"px"),height:"".concat(c,"px"),borderRadius:"50%",background:p[n%p.length],opacity:f,transition:"opacity 1s ease-in-out",pointerEvents:"none",userSelect:"none"}})},oe=function(n){var r=n.containerRef,a=n.scale,i=void 0===a?.2:a,s=n.onHitmarker,c=Z(o(100),2),u=c[0],d=c[1],f=Z(o({x:0,y:0}),2),v=f[0],m=f[1],h=Z(o(!1),2),p=h[0],C=h[1];l(function(){if(r.current){var e=r.current.clientWidth,t=r.current.clientHeight,n=Math.min(e,t);d(n*i)}},[r,i]);var g=function(e){if(r.current){var t=r.current.getBoundingClientRect(),n=t.left+t.width/2,a=t.top+t.height/2,o=e.clientX-n,i=e.clientY-a,l=Math.sqrt(o*o+i*i),s=1.5*u;if(l<s&&l>0){var c=(s-l)/s*50;m({x:-o/l*c,y:-i/l*c}),C(!0)}else m({x:0,y:0}),C(!1)}},b=function(){m({x:0,y:0}),C(!1)};return l(function(){if(r.current){var e=r.current;return e.addEventListener("mousemove",g),e.addEventListener("mouseleave",b),function(){e.removeEventListener("mousemove",g),e.removeEventListener("mouseleave",b)}}},[u,r]),t("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%) translate(".concat(v.x,"px, ").concat(v.y,"px)"),display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,transition:"transform 0.3s ease-out",userSelect:"none"},children:[e("div",{style:{position:"absolute",width:"".concat(1.4*u,"px"),height:"".concat(1.4*u,"px"),borderRadius:"50%",background:"rgba(122, 162, 247, 0.15)",animation:p?"logoPulse 1s ease-in-out infinite":"logoPulse 3s ease-in-out infinite",transform:p?"scale(1.2)":"scale(1)",transition:"transform 0.3s ease-out",pointerEvents:"none"}}),e("img",{src:re,alt:"FrameWorks Logo",onClick:function(e){e.stopPropagation(),s&&s({clientX:e.clientX,clientY:e.clientY})},style:{width:"".concat(u,"px"),height:"".concat(u,"px"),position:"relative",zIndex:1,filter:p?"drop-shadow(0 6px 12px rgba(36, 40, 59, 0.4)) brightness(1.1)":"drop-shadow(0 4px 8px rgba(36, 40, 59, 0.3))",transform:p?"scale(1.1)":"scale(1)",transition:"all 0.3s ease-out",cursor:p?"pointer":"default",userSelect:"none",WebkitUserDrag:"none"}})]})};function ie(n){var r=n.status,a="w-5 h-5";return"INITIALIZING"!==r&&"BOOTING"!==r&&"WAITING_FOR_DATA"!==r&&r?"OFFLINE"===r?e("svg",{className:a,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{color:"hsl(var(--tn-red, 348 100% 72%))"},children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18.364 5.636a9 9 0 010 12.728m0 0l-2.829-2.829m2.829 2.829L21 21M15.536 8.464a5 5 0 010 7.072m0 0l-2.829-2.829m-4.243 2.829a4.978 4.978 0 01-1.414-2.83m-1.414 5.658a9 9 0 01-2.167-9.238m7.824 2.167a1 1 0 111.414 1.414m-1.414-1.414L3 3m8.293 8.293l1.414 1.414"})}):"ERROR"===r||"INVALID"===r?e("svg",{className:a,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{color:"hsl(var(--tn-red, 348 100% 72%))"},children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}):t("svg",{className:"".concat(a," animate-spin"),fill:"none",viewBox:"0 0 24 24",style:{color:"hsl(var(--tn-cyan, 193 100% 75%))"},children:[e("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):t("svg",{className:"".concat(a," animate-spin"),fill:"none",viewBox:"0 0 24 24",style:{color:"hsl(var(--tn-yellow, 40 95% 64%))"},children:[e("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}var le=function(n){var r=n.status,a=n.message,o=n.percentage,i=n.error,l=n.onRetry,s=("ERROR"===r||"INVALID"===r)&&l,c="INITIALIZING"===r&&void 0!==o,u=i||a;return t("div",{style:{position:"absolute",bottom:"16px",left:"50%",transform:"translateX(-50%)",zIndex:20,display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",maxWidth:"280px",textAlign:"center"},children:[t("div",{style:{display:"flex",alignItems:"center",gap:"8px",color:"#787c99",fontSize:"13px",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},children:[e(ie,{status:r}),e("span",{children:u})]}),c&&e("div",{style:{width:"160px",height:"4px",background:"rgba(65, 72, 104, 0.4)",borderRadius:"2px",overflow:"hidden"},children:e("div",{style:{width:"".concat(Math.min(100,o),"%"),height:"100%",background:"hsl(var(--tn-cyan, 193 100% 75%))",transition:"width 0.3s ease-out"}})}),s&&e("button",{type:"button",onClick:l,style:{padding:"6px 16px",background:"transparent",border:"1px solid rgba(122, 162, 247, 0.4)",borderRadius:"4px",color:"#7aa2f7",fontSize:"11px",fontWeight:500,cursor:"pointer",transition:"all 0.2s ease",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},onMouseEnter:function(e){e.currentTarget.style.background="rgba(122, 162, 247, 0.1)"},onMouseLeave:function(e){e.currentTarget.style.background="transparent"},children:"Retry"})]})},se=function(){try{var e=new(window.AudioContext||window.webkitAudioContext),t=e.createOscillator(),n=e.createOscillator(),r=e.createGain(),a=e.createGain(),o=e.createGain();t.connect(r),n.connect(a),r.connect(o),a.connect(o),o.connect(e.destination),t.frequency.setValueAtTime(1800,e.currentTime),t.frequency.exponentialRampToValueAtTime(900,e.currentTime+.08),n.frequency.setValueAtTime(3600,e.currentTime),n.frequency.exponentialRampToValueAtTime(1800,e.currentTime+.04),t.type="triangle",n.type="sine",r.gain.setValueAtTime(0,e.currentTime),r.gain.linearRampToValueAtTime(.4,e.currentTime+.002),r.gain.exponentialRampToValueAtTime(.001,e.currentTime+.12),a.gain.setValueAtTime(0,e.currentTime),a.gain.linearRampToValueAtTime(.3,e.currentTime+.001),a.gain.exponentialRampToValueAtTime(.001,e.currentTime+.06),o.gain.setValueAtTime(.5,e.currentTime);var i=e.currentTime,l=i+.15;t.start(i),n.start(i),t.stop(l),n.stop(l)}catch(e){}},ce=function(n){var r=n.status,a=n.message,s=void 0===a?"Waiting for stream...":a,c=n.percentage,u=n.error,d=n.onRetry,f=i(null),v=Z(o([]),2),m=v[0],h=v[1];return l(function(){var e="idle-screen-animations";if(!document.getElementById(e)){var t=document.createElement("style");t.id=e,t.textContent="\n @keyframes fadeInOut {\n 0%, 100% { opacity: 0.6; }\n 50% { opacity: 0.9; }\n }\n @keyframes logoPulse {\n 0%, 100% { opacity: 0.15; transform: scale(1); }\n 50% { opacity: 0.25; transform: scale(1.05); }\n }\n @keyframes floatUp {\n 0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }\n 10% { opacity: 0.6; }\n 90% { opacity: 0.6; }\n 100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }\n }\n @keyframes gradientShift {\n 0%, 100% { background-position: 0% 50%; }\n 50% { background-position: 100% 50%; }\n }\n @keyframes hitmarkerFade45 {\n 0% { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(0.5); }\n 20% { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1.2); }\n 100% { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(1); }\n }\n @keyframes hitmarkerFadeNeg45 {\n 0% { opacity: 1; transform: translate(-50%, -50%) rotate(-45deg) scale(0.5); }\n 20% { opacity: 1; transform: translate(-50%, -50%) rotate(-45deg) scale(1.2); }\n 100% { opacity: 0; transform: translate(-50%, -50%) rotate(-45deg) scale(1); }\n }\n ",document.head.appendChild(t)}},[]),t("div",{ref:f,className:"fw-player-root",style:{position:"absolute",inset:0,zIndex:5,background:"\n linear-gradient(135deg,\n hsl(var(--tn-bg-dark, 235 21% 11%)) 0%,\n hsl(var(--tn-bg, 233 23% 17%)) 25%,\n hsl(var(--tn-bg-dark, 235 21% 11%)) 50%,\n hsl(var(--tn-bg, 233 23% 17%)) 75%,\n hsl(var(--tn-bg-dark, 235 21% 11%)) 100%\n )\n ",backgroundSize:"400% 400%",animation:"gradientShift 16s ease-in-out infinite",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"0",userSelect:"none"},children:[m.map(function(n){return t("div",{style:{position:"absolute",left:"".concat(n.x,"px"),top:"".concat(n.y,"px"),transform:"translate(-50%, -50%)",pointerEvents:"none",zIndex:100,width:"40px",height:"40px"},children:[e("div",{style:{position:"absolute",top:"25%",left:"25%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(45deg)",animation:"hitmarkerFade45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}}),e("div",{style:{position:"absolute",top:"25%",left:"75%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(-45deg)",animation:"hitmarkerFadeNeg45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}}),e("div",{style:{position:"absolute",top:"75%",left:"25%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(-45deg)",animation:"hitmarkerFadeNeg45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}}),e("div",{style:{position:"absolute",top:"75%",left:"75%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(45deg)",animation:"hitmarkerFade45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}})]},n.id)}),X(Array(12)).map(function(t,n){return e("div",{style:{position:"absolute",left:"".concat(100*Math.random(),"%"),width:"".concat(4*Math.random()+2,"px"),height:"".concat(4*Math.random()+2,"px"),borderRadius:"50%",background:["#7aa2f7","#bb9af7","#9ece6a","#73daca","#7dcfff","#f7768e","#e0af68","#2ac3de"][n%8],opacity:0,animation:"floatUp ".concat(8+4*Math.random(),"s linear infinite"),animationDelay:"".concat(8*Math.random(),"s"),pointerEvents:"none"}},"particle-".concat(n))}),X(Array(8)).map(function(t,n){return e(ae,{index:n},n)}),e(oe,{containerRef:f,onHitmarker:function(e){if(f.current){var t=f.current.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,a={id:Date.now()+Math.random(),x:n,y:r};h(function(e){return[].concat(X(e),[a])}),function(){try{var e=new Audio("data:audio/mpeg;base64,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");e.volume=.3,e.play().catch(function(){return se()})}catch(e){se()}}(),setTimeout(function(){h(function(e){return e.filter(function(e){return e.id!==a.id})})},600)}}}),e(ne,{parentRef:f,scale:.08}),e(le,{status:r,message:s,percentage:c,error:u,onRetry:d}),e("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"\n radial-gradient(circle at 20% 80%, rgba(122, 162, 247, 0.03) 0%, transparent 50%),\n radial-gradient(circle at 80% 20%, rgba(187, 154, 247, 0.03) 0%, transparent 50%),\n radial-gradient(circle at 40% 40%, rgba(158, 206, 106, 0.02) 0%, transparent 50%)\n ",pointerEvents:"none"}})]})},ue=function(n){var r=n.title,a=n.description,o=n.isVisible,i=n.className;return r||a?t("div",{className:v("fw-title-overlay absolute inset-x-0 top-0 z-20 pointer-events-none","bg-gradient-to-b from-black/70 via-black/40 to-transparent","px-4 py-3 transition-opacity duration-300",o?"opacity-100":"opacity-0",i),children:[r&&e("h2",{className:"text-white text-sm font-medium truncate max-w-[80%]",children:r}),a&&e("p",{className:"text-white/70 text-xs mt-0.5 line-clamp-2 max-w-[70%]",children:a})]}):null},de=function(n){var r,a,o,i,l,s,c,u,d,f,m,h,p,C=n.isOpen,g=n.onClose,b=n.metadata,w=n.streamState,y=n.quality,A=n.videoElement,N=n.protocol,k=n.nodeId,x=n.geoDistance;if(!C)return null;var S,L,E=A,M=E?"".concat(E.videoWidth,"x").concat(E.videoHeight):"—",T=E&&E.buffered.length>0?(E.buffered.end(E.buffered.length-1)-E.currentTime).toFixed(1):"—",I=null!==(r=null==E||null===(a=E.playbackRate)||void 0===a?void 0:a.toFixed(2))&&void 0!==r?r:"1.00",q=null!==(o=null==y||null===(i=y.score)||void 0===i?void 0:i.toFixed(0))&&void 0!==o?o:"—",B=null!=y&&y.bitrate?"".concat((y.bitrate/1e3).toFixed(0)," kbps"):"—",F=null!==(l=null==y||null===(s=y.frameDropRate)||void 0===s?void 0:s.toFixed(1))&&void 0!==l?l:"—",R=null!==(c=null==y?void 0:y.stallCount)&&void 0!==c?c:0,D=null!=y&&y.latency?"".concat(Math.round(y.latency)," ms"):"—",P=null!==(u=null==b?void 0:b.viewers)&&void 0!==u?u:"—",O=null!==(d=null!==(f=null==w?void 0:w.status)&&void 0!==f?f:null==b?void 0:b.status)&&void 0!==d?d:"—",z=null!==(m=null==b?void 0:b.mist)&&void 0!==m?m:null==w?void 0:w.streamInfo,j=null!==(h=null==z?void 0:z.type)&&void 0!==h?h:"—",W=null==z||null===(p=z.meta)||void 0===p?void 0:p.buffer_window,U=null==z?void 0:z.lastms,V=null==z?void 0:z.unixoffset,Q=[{label:"Resolution",value:M},{label:"Buffer",value:"".concat(T,"s")},{label:"Latency",value:D},{label:"Bitrate",value:B},{label:"Quality Score",value:"".concat(q,"/100")},{label:"Frame Drop Rate",value:"".concat(F,"%")},{label:"Stalls",value:String(R)},{label:"Playback Rate",value:"".concat(I,"x")},{label:"Protocol",value:null!=N?N:"—"},{label:"Node",value:null!=k?k:"—"},{label:"Geo Distance",value:x?"".concat(x.toFixed(0)," km"):"—"},{label:"Viewers",value:String(P)},{label:"Status",value:O},{label:"Tracks",value:(L=null!==(S=null==b?void 0:b.tracks)&&void 0!==S?S:function(){var e,t=null==z||null===(e=z.meta)||void 0===e?void 0:e.tracks;if(t)return Object.values(t).map(function(e){return{type:e.type,codec:e.codec,width:e.width,height:e.height,bitrate:"number"==typeof e.bps?Math.round(e.bps):void 0,fps:"number"==typeof e.fpks?e.fpks/1e3:void 0,channels:e.channels,sampleRate:e.rate}})}(),null!=L&&L.length?L.map(function(e){var t;if("video"===e.type){var n,r=e.width&&e.height?"".concat(e.width,"x").concat(e.height):"?",a=e.bitrate?"".concat(Math.round(e.bitrate/1e3),"kbps"):"?";return"".concat(null!==(n=e.codec)&&void 0!==n?n:"?"," ").concat(r,"@").concat(a)}var o=e.channels?"".concat(e.channels,"ch"):"?";return"".concat(null!==(t=e.codec)&&void 0!==t?t:"?"," ").concat(o)}).join(", "):"—")},{label:"Mist Type",value:j},{label:"Mist Buffer Window",value:null!=W?String(W):"—"},{label:"Mist Lastms",value:null!=U?String(U):"—"},{label:"Mist Unixoffset",value:null!=V?String(V):"—"}];if(null!=b&&b.title&&Q.unshift({label:"Title",value:b.title}),null!=b&&b.durationSeconds){var Y=Math.floor(b.durationSeconds/60),J=b.durationSeconds%60;Q.push({label:"Duration",value:"".concat(Y,":").concat(String(J).padStart(2,"0"))})}if(null!=b&&b.recordingSizeBytes){var G=(b.recordingSizeBytes/1048576).toFixed(1);Q.push({label:"Size",value:"".concat(G," MB")})}return t("div",{className:v("fw-stats-panel absolute top-2 right-2 z-30","bg-black border border-white/10 rounded","text-white text-xs font-mono","max-w-[320px] max-h-[80%] overflow-auto","shadow-lg"),style:{backgroundColor:"#000000"},children:[t("div",{className:"flex items-center justify-between px-3 py-2 border-b border-white/10",children:[e("span",{className:"text-white/70 text-[10px] uppercase tracking-wider",children:"Stats Overlay"}),e("button",{type:"button",onClick:g,className:"text-white/50 hover:text-white transition-colors p-1 -mr-1","aria-label":"Close stats panel",children:e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:e("path",{d:"M2 2l8 8M10 2l-8 8"})})})]}),e("div",{className:"px-3 py-2 space-y-1",children:Q.map(function(n){var r=n.label,a=n.value;return t("div",{className:"flex justify-between gap-4",children:[e("span",{className:"text-white/50 shrink-0",children:r}),e("span",{className:"text-white/90 truncate text-right",children:a})]},r)})})]})},fe=["enabled","onStateChange","onStreamStateChange","onError","onReady"],ve={state:"booting",streamState:null,endpoints:null,metadata:null,videoElement:null,currentTime:0,duration:NaN,isPlaying:!1,isPaused:!0,isBuffering:!1,isMuted:!0,volume:1,error:null,isPassiveError:!1,hasPlaybackStarted:!1,isHoldingSpeed:!1,holdSpeed:2,isHovering:!1,shouldShowControls:!1,isLoopEnabled:!1,isFullscreen:!1,isPiPActive:!1,isEffectivelyLive:!1,shouldShowIdleScreen:!0,currentPlayerInfo:null,currentSourceInfo:null,playbackQuality:null,subtitlesEnabled:!1,qualities:[],textTracks:[],streamInfo:null};function me(e){var t=e.enabled,n=void 0===t||t,r=e.onStateChange,a=e.onStreamStateChange,c=e.onError,u=e.onReady,d=Q(e,fe),f=i(null),v=i(null),h=Z(o(ve),2),p=h[0],C=h[1],g=i(d);g.current=d,l(function(){if(n){var e=f.current;if(e){var t=new m({contentId:g.current.contentId,contentType:g.current.contentType,endpoints:g.current.endpoints,gatewayUrl:g.current.gatewayUrl,mistUrl:g.current.mistUrl,authToken:g.current.authToken,autoplay:g.current.autoplay,muted:g.current.muted,controls:g.current.controls,poster:g.current.poster,debug:g.current.debug});v.current=t;var o=[];return o.push(t.on("stateChange",function(e){var t=e.state;C(function(e){return V(V({},e),{},{state:t})}),null==r||r(t)})),o.push(t.on("streamStateChange",function(e){var n=e.state;C(function(e){return V(V({},e),{},{streamState:n,metadata:t.getMetadata(),isEffectivelyLive:t.isEffectivelyLive(),shouldShowIdleScreen:t.shouldShowIdleScreen()})}),null==a||a(n)})),o.push(t.on("timeUpdate",function(e){var t=e.currentTime,n=e.duration;C(function(e){return V(V({},e),{},{currentTime:t,duration:n})})})),o.push(t.on("error",function(e){var n=e.error;C(function(e){return V(V({},e),{},{error:n,isPassiveError:t.isPassiveError()})}),null==c||c(n)})),o.push(t.on("errorCleared",function(){C(function(e){return V(V({},e),{},{error:null,isPassiveError:!1})})})),o.push(t.on("ready",function(e){var n=e.videoElement;C(function(e){return V(V({},e),{},{videoElement:n,endpoints:t.getEndpoints(),metadata:t.getMetadata(),streamInfo:t.getStreamInfo(),isEffectivelyLive:t.isEffectivelyLive(),shouldShowIdleScreen:t.shouldShowIdleScreen(),currentPlayerInfo:t.getCurrentPlayerInfo(),currentSourceInfo:t.getCurrentSourceInfo(),qualities:t.getQualities()})}),null==u||u(n);var r=function(){var e,t;null!==(e=v.current)&&void 0!==e&&null!==(t=e.shouldSuppressVideoEvents)&&void 0!==t&&t.call(e)||function(){if(v.current){var e=v.current;C(function(t){return V(V({},t),{},{isPlaying:e.isPlaying(),isPaused:e.isPaused(),isBuffering:e.isBuffering(),isMuted:e.isMuted(),volume:e.getVolume(),hasPlaybackStarted:e.hasPlaybackStarted(),shouldShowControls:e.shouldShowControls(),shouldShowIdleScreen:e.shouldShowIdleScreen(),playbackQuality:e.getPlaybackQuality(),isLoopEnabled:e.isLoopEnabled(),subtitlesEnabled:e.isSubtitlesEnabled(),qualities:e.getQualities(),streamInfo:e.getStreamInfo()})})}}()};n.addEventListener("play",r),n.addEventListener("pause",r),n.addEventListener("waiting",r),n.addEventListener("playing",r),o.push(function(){n.removeEventListener("play",r),n.removeEventListener("pause",r),n.removeEventListener("waiting",r),n.removeEventListener("playing",r)})})),o.push(t.on("playerSelected",function(e){e.player;var n=e.source;C(function(e){return V(V({},e),{},{currentPlayerInfo:t.getCurrentPlayerInfo(),currentSourceInfo:{url:n.url,type:n.type},qualities:t.getQualities()})})})),o.push(t.on("volumeChange",function(e){var t=e.volume,n=e.muted;C(function(e){return V(V({},e),{},{volume:t,isMuted:n})})})),o.push(t.on("loopChange",function(e){var t=e.isLoopEnabled;C(function(e){return V(V({},e),{},{isLoopEnabled:t})})})),o.push(t.on("fullscreenChange",function(e){var t=e.isFullscreen;C(function(e){return V(V({},e),{},{isFullscreen:t})})})),o.push(t.on("pipChange",function(e){var t=e.isPiP;C(function(e){return V(V({},e),{},{isPiPActive:t})})})),o.push(t.on("holdSpeedStart",function(e){var t=e.speed;C(function(e){return V(V({},e),{},{isHoldingSpeed:!0,holdSpeed:t})})})),o.push(t.on("holdSpeedEnd",function(){C(function(e){return V(V({},e),{},{isHoldingSpeed:!1})})})),o.push(t.on("hoverStart",function(){C(function(e){return V(V({},e),{},{isHovering:!0,shouldShowControls:!0})})})),o.push(t.on("hoverEnd",function(){C(function(e){return V(V({},e),{},{isHovering:!1,shouldShowControls:t.shouldShowControls()})})})),o.push(t.on("captionsChange",function(e){var t=e.enabled;C(function(e){return V(V({},e),{},{subtitlesEnabled:t})})})),t.attach(e).catch(function(e){console.warn("[usePlayerController] Attach failed:",e)}),C(function(e){return V(V({},e),{},{isLoopEnabled:t.isLoopEnabled()})}),function(){o.forEach(function(e){return e()}),t.destroy(),v.current=null,C(ve)}}}},[n,e.contentId,e.contentType]);var b=s(P(Y().m(function e(){var t;return Y().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,null===(t=v.current)||void 0===t?void 0:t.play();case 1:return e.a(2)}},e)})),[]),w=s(function(){var e;null===(e=v.current)||void 0===e||e.pause()},[]),y=s(function(){var e;null===(e=v.current)||void 0===e||e.togglePlay()},[]),A=s(function(e){var t;null===(t=v.current)||void 0===t||t.seek(e)},[]),N=s(function(e){var t;null===(t=v.current)||void 0===t||t.seekBy(e)},[]),k=s(function(e){var t;null===(t=v.current)||void 0===t||t.setVolume(e)},[]),x=s(function(){var e;null===(e=v.current)||void 0===e||e.toggleMute()},[]),S=s(function(){var e;null===(e=v.current)||void 0===e||e.toggleLoop()},[]),L=s(P(Y().m(function e(){var t;return Y().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,null===(t=v.current)||void 0===t?void 0:t.toggleFullscreen();case 1:return e.a(2)}},e)})),[]),E=s(P(Y().m(function e(){var t;return Y().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,null===(t=v.current)||void 0===t?void 0:t.togglePictureInPicture();case 1:return e.a(2)}},e)})),[]),M=s(function(){var e;null===(e=v.current)||void 0===e||e.toggleSubtitles()},[]),T=s(function(){var e;null===(e=v.current)||void 0===e||e.clearError(),C(function(e){return V(V({},e),{},{error:null,isPassiveError:!1})})},[]),I=s(function(){var e;null===(e=v.current)||void 0===e||e.jumpToLive()},[]),q=s(P(Y().m(function e(){var t;return Y().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,null===(t=v.current)||void 0===t?void 0:t.retry();case 1:return e.a(2)}},e)})),[]),B=s(P(Y().m(function e(){var t;return Y().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,null===(t=v.current)||void 0===t?void 0:t.reload();case 1:return e.a(2)}},e)})),[]),F=s(function(){var e,t;return null!==(e=null===(t=v.current)||void 0===t?void 0:t.getQualities())&&void 0!==e?e:[]},[]),R=s(function(e){var t;null===(t=v.current)||void 0===t||t.selectQuality(e)},[]),D=s(function(){var e;null===(e=v.current)||void 0===e||e.handleMouseEnter()},[]),O=s(function(){var e;null===(e=v.current)||void 0===e||e.handleMouseLeave()},[]),z=s(function(){var e;null===(e=v.current)||void 0===e||e.handleMouseMove()},[]),j=s(function(){var e;null===(e=v.current)||void 0===e||e.handleTouchStart()},[]),W=s(function(){var e=P(Y().m(function e(t){var n;return Y().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,null===(n=v.current)||void 0===n?void 0:n.setDevModeOptions(t);case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),[]);return{containerRef:f,state:p,controller:v.current,play:b,pause:w,togglePlay:y,seek:A,seekBy:N,jumpToLive:I,setVolume:k,toggleMute:x,toggleLoop:S,toggleFullscreen:L,togglePiP:E,toggleSubtitles:M,clearError:T,retry:q,reload:B,getQualities:F,selectQuality:R,handleMouseEnter:D,handleMouseLeave:O,handleMouseMove:z,handleTouchStart:j,setDevModeOptions:W}}var he=c(null);function pe(t){var n=t.children,r=me(t.config);return e(he.Provider,{value:r,children:n})}function Ce(){var e=u(he);if(!e)throw new Error("usePlayerContext must be used within a PlayerProvider");return e}function ge(){return u(he)}var be=["className","trackClassName","thumbClassName","showTrack","hoverThumb","accentColor","orientation"],we=r.forwardRef(function(n,r){var a=n.className,o=n.trackClassName,i=n.thumbClassName,l=n.showTrack,s=void 0===l||l;n.hoverThumb;var c=n.accentColor,u=void 0!==c&&c,d=n.orientation,f=void 0===d?"horizontal":d,m=Q(n,be),h=u?"bg-[hsl(var(--tn-cyan,195_100%_50%))]":"bg-white/90",p=u?"bg-[hsl(var(--tn-cyan,195_100%_50%))]":"bg-white";return t(E.Root,V(V({ref:r,orientation:f,className:v("group relative flex touch-none select-none items-center cursor-pointer","horizontal"===f?"w-full h-5":"h-full flex-col w-5",a)},m),{},{children:[s&&e(E.Track,{className:v("absolute rounded-full bg-white/30 transition-all duration-150","horizontal"===f?"inset-x-0 h-1 group-hover:h-1.5":"inset-y-0 w-1 group-hover:w-1.5",o),children:e(E.Range,{className:v("absolute rounded-full transition-all duration-150","horizontal"===f?"h-full":"w-full bottom-0",h)})}),e(E.Thumb,{className:v("block rounded-full border-0 cursor-pointer shadow-md transition-all duration-150","w-2.5 h-2.5 group-hover:w-3.5 group-hover:h-3.5","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/50","disabled:pointer-events-none disabled:opacity-50",p,i)})]}))});we.displayName=E.Root.displayName;var ye=function(n){var r=n.currentTime,a=n.duration,l=n.buffered,c=n.disabled,u=void 0!==c&&c,f=n.onSeek,m=n.className,h=n.isLive,p=void 0!==h&&h,C=n.seekableStart,g=void 0===C?0:C,b=n.liveEdge,w=n.commitOnRelease,y=void 0!==w&&w,A=i(null),N=Z(o(!1),2),k=N[0],x=N[1],S=Z(o(!1),2),L=S[0],E=S[1],M=Z(o(null),2),T=M[0],I=M[1],q=i(null),B=Z(o(0),2),F=B[0],R=B[1],D=Z(o(0),2),P=D[0],O=D[1],z=null!=b?b:a,j=z-g,W=null!=T?T:r,U=d(function(){if(p&&j>0){var e=W-g;return Math.min(100,Math.max(0,e/j*100))}return!Number.isFinite(a)||a<=0?0:Math.min(100,Math.max(0,W/a*100))},[W,a,p,g,j]),V=d(function(){if(!l||0===l.length)return[];var e=p?g:0,t=(p?z:a)-e;if(!Number.isFinite(t)||t<=0)return[];for(var n=[],r=0;r<l.length;r++){var o=l.start(r)-e,i=l.end(r)-e;n.push({startPercent:Math.min(100,Math.max(0,o/t*100)),endPercent:Math.min(100,Math.max(0,i/t*100))})}return n},[l,a,p,g,z]),Q=s(function(e){if(!Number.isFinite(e)||e<0)return"0:00";var t=Math.floor(e),n=Math.floor(t/3600),r=Math.floor(t%3600/60),a=t%60;return n>0?"".concat(n,":").concat(String(r).padStart(2,"0"),":").concat(String(a).padStart(2,"0")):"".concat(r,":").concat(String(a).padStart(2,"0"))},[]),Y=s(function(e,t){var n=t-e;if(n<1)return"LIVE";var r=Math.floor(n),a=Math.floor(r/3600),o=Math.floor(r%3600/60),i=r%60;return a>0?"-".concat(a,":").concat(String(o).padStart(2,"0"),":").concat(String(i).padStart(2,"0")):"-".concat(o,":").concat(String(i).padStart(2,"0"))},[]),J=s(function(e){if(!A.current)return 0;var t=A.current.getBoundingClientRect(),n=e-t.left,o=Math.min(1,Math.max(0,n/t.width));if(p&&Number.isFinite(j)&&j>0)return g+o*j;if(Number.isFinite(a)&&a>0)return o*a;if(void 0!==b&&Number.isFinite(b)&&b>0){var i=Number.isFinite(g)?g:0,l=b-i;if(l>0)return i+o*l}return o*(r||1)},[a,p,g,j,b,r]),G=s(function(e){if(A.current&&!u){var t=A.current.getBoundingClientRect(),n=e.clientX-t.left,r=Math.min(1,Math.max(0,n/t.width));R(100*r),O(J(e.clientX))}},[u,J]),H=s(function(e){if(!u&&(p||Number.isFinite(a))){var t=J(e.clientX);null==f||f(t),I(null),q.current=null}},[u,a,p,J,f]),X=s(function(e){if(!u&&(p||Number.isFinite(a))){e.preventDefault(),E(!0);var t=function(e){var t=J(e.clientX);y?(I(t),q.current=t):null==f||f(t)},n=function(){E(!1),document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n);var e=q.current;y&&null!==e&&(null==f||f(e),I(null),q.current=null)};document.addEventListener("mousemove",t),document.addEventListener("mouseup",n);var r=J(e.clientX);y?(I(r),q.current=r):null==f||f(r)}},[u,a,p,J,f,y]),K=k||L,_=p?j>0:Number.isFinite(a);return t("div",{ref:A,className:v("group relative w-full h-6 flex items-center cursor-pointer",u&&"opacity-50 cursor-not-allowed",m),onMouseEnter:function(){return!u&&x(!0)},onMouseLeave:function(){x(!1),E(!1)},onMouseMove:G,onClick:H,onMouseDown:X,role:"slider","aria-label":"Seek","aria-valuemin":p?g:0,"aria-valuemax":p?z:a||100,"aria-valuenow":W,"aria-valuetext":p?Y(W,z):Q(W),tabIndex:u?-1:0,children:[t("div",{className:v("fw-seek-track",L&&"fw-seek-track--active"),children:[V.map(function(t,n){return e("div",{className:"fw-seek-buffered",style:{left:"".concat(t.startPercent,"%"),width:"".concat(t.endPercent-t.startPercent,"%")}},n)}),e("div",{className:"fw-seek-progress",style:{width:"".concat(U,"%")}})]}),e("div",{className:v("fw-seek-thumb",K?"fw-seek-thumb--active":"fw-seek-thumb--hidden"),style:{left:"".concat(U,"%")}}),k&&!L&&_&&e("div",{className:"fw-seek-tooltip",style:{left:"".concat(F,"%")},children:p?Y(P,z):Q(P)})]})},Ae=["isPlaying"],Ne=["isMuted"],ke=["isFullscreen"],xe=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,i=t.className;return e("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:void 0===i?"":i,"aria-hidden":"true",children:e("path",{d:"M8 5v14l11-7z",fill:o})})},Se=function(n){var r=n.size,a=void 0===r?16:r,o=n.color,i=void 0===o?"currentColor":o,l=n.className;return t("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none",className:void 0===l?"":l,"aria-hidden":"true",children:[e("rect",{x:"6",y:"4",width:"4",height:"16",fill:i}),e("rect",{x:"14",y:"4",width:"4",height:"16",fill:i})]})},Le=function(n){var r=n.size,a=void 0===r?16:r,o=n.color,i=void 0===o?"currentColor":o,l=n.className;return t("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none",className:void 0===l?"":l,"aria-hidden":"true",children:[e("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z",fill:i}),e("text",{x:"12",y:"15",fontSize:"7",fontWeight:"bold",fill:i,textAnchor:"middle",children:"10"})]})},Ee=function(n){var r=n.size,a=void 0===r?16:r,o=n.color,i=void 0===o?"currentColor":o,l=n.className;return t("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none",className:void 0===l?"":l,"aria-hidden":"true",children:[e("path",{d:"M12 5V1l5 5-5 5V7c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6h2c0 4.42-3.58 8-8 8s-8-3.58-8-8 3.58-8 8-8z",fill:i}),e("text",{x:"12",y:"15",fontSize:"7",fontWeight:"bold",fill:i,textAnchor:"middle",children:"10"})]})},Me=function(n){var r=n.size,a=void 0===r?16:r,o=n.color,i=void 0===o?"currentColor":o,l=n.className;return t("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none",className:void 0===l?"":l,"aria-hidden":"true",children:[e("polygon",{points:"11,5 6,9 2,9 2,15 6,15 11,19",fill:i}),e("path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07",stroke:i,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})},Te=function(n){var r=n.size,a=void 0===r?16:r,o=n.color,i=void 0===o?"currentColor":o,l=n.className;return t("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none",className:void 0===l?"":l,"aria-hidden":"true",children:[e("polygon",{points:"11,5 6,9 2,9 2,15 6,15 11,19",fill:i}),e("line",{x1:"23",y1:"9",x2:"17",y2:"15",stroke:i,strokeWidth:"2",strokeLinecap:"round"}),e("line",{x1:"17",y1:"9",x2:"23",y2:"15",stroke:i,strokeWidth:"2",strokeLinecap:"round"})]})},Ie=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,i=t.className;return e("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:void 0===i?"":i,"aria-hidden":"true",children:e("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3M3 16v3a2 2 0 0 0 2 2h3m8 0h3a2 2 0 0 0 2-2v-3",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})},qe=function(t){var n=t.size,r=void 0===n?16:n,a=t.color,o=void 0===a?"currentColor":a,i=t.className;return e("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",className:void 0===i?"":i,"aria-hidden":"true",children:e("path",{d:"M8 3v3a2 2 0 0 1-2 2H3M21 8h-3a2 2 0 0 1-2-2V3M3 16h3a2 2 0 0 1 2 2v3M16 21v-3a2 2 0 0 1 2-2h3",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})},Be=function(n){var r=n.size,a=void 0===r?16:r,o=n.color,i=void 0===o?"currentColor":o,l=n.className;return t("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none",className:void 0===l?"":l,"aria-hidden":"true",children:[e("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",ry:"2",stroke:i,strokeWidth:"2",fill:"none"}),e("rect",{x:"8",y:"10",width:"10",height:"6",rx:"1",ry:"1",fill:i})]})},Fe=function(n){var r=n.size,a=void 0===r?16:r,o=n.color,i=void 0===o?"currentColor":o,l=n.className;return t("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none",className:void 0===l?"":l,"aria-hidden":"true",children:[e("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",ry:"2",stroke:i,strokeWidth:"2",fill:"none"}),e("path",{d:"M8 10c0-.6.4-1 1-1h1c.6 0 1 .4 1 1v4c0 .6-.4 1-1 1H9c-.6 0-1-.4-1-1v-4zM14 10c0-.6.4-1 1-1h1c.6 0 1 .4 1 1v4c0 .6-.4 1-1 1h-1c-.6 0-1-.4-1-1v-4z",fill:i})]})},Re=function(n){var r=n.size,a=void 0===r?16:r,o=n.color,i=void 0===o?"currentColor":o,l=n.className;return t("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none",className:void 0===l?"":l,"aria-hidden":"true",children:[e("circle",{cx:"12",cy:"12",r:"3",fill:i}),e("path",{d:"M12 1v6M12 17v6M4.22 4.22l4.24 4.24M15.54 15.54l4.24 4.24M1 12h6M17 12h6M4.22 19.78l4.24-4.24M15.54 8.46l4.24-4.24",stroke:i,strokeWidth:"2",strokeLinecap:"round"})]})},De=function(n){var r=n.size,a=void 0===r?16:r,o=n.color,i=void 0===o?"currentColor":o,l=n.className;return t("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none",className:void 0===l?"":l,"aria-hidden":"true",children:[e("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",stroke:i,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1Z",stroke:i,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})},Pe=function(t){var n=t.isPlaying,r=Q(t,Ae);return e(n?Se:xe,V({},r))},Oe=function(t){var n=t.isMuted,r=Q(t,Ne);return e(n?Te:Me,V({},r))},ze=function(t){var n=t.isFullscreen,r=Q(t,ke);return e(n?qe:Ie,V({},r))},je=function(n){var r=n.size,a=void 0===r?16:r,o=n.color,i=void 0===o?"currentColor":o,l=n.className;return t("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none",className:void 0===l?"":l,"aria-hidden":"true",children:[e("rect",{x:"4",y:"13",width:"4",height:"7",fill:i}),e("rect",{x:"10",y:"9",width:"4",height:"11",fill:i}),e("rect",{x:"16",y:"4",width:"4",height:"16",fill:i})]})},We=function(n){var r=n.size,a=void 0===r?16:r,o=n.color,i=void 0===o?"currentColor":o,l=n.className;return t("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none",className:void 0===l?"":l,"aria-hidden":"true",children:[e("path",{d:"M5 5v14l11-7z",fill:i}),e("rect",{x:"17",y:"5",width:"3",height:"14",fill:i})]})},Ue=function(r){var a,c,u,f,m,k,x,S,L,E=r.currentTime,M=r.duration,T=r.isVisible,I=void 0===T||T;r._className;var q=r.onSeek,B=r.mistStreamInfo,F=r.disabled,R=void 0!==F&&F,D=r.playbackMode,P=void 0===D?"auto":D,O=r.onModeChange,z=r.sourceType,j=r.isContentLive,W=r.videoElement,U=r.qualities,V=void 0===U?[]:U,Q=r.onSelectQuality,Y=r.isMuted,J=r.volume,G=r.onVolumeChange,H=r.onToggleMute,K=r.isPlaying,_=r.onTogglePlay,$=r.onToggleFullscreen,ee=r.isFullscreen;r.isLoopEnabled,r.onToggleLoop;var te=r.onJumpToLive,ne=ge(),re=null==ne||null===(a=ne.state)||void 0===a?void 0:a.videoElement,ae=null==ne?void 0:ne.controller,oe=Z(o(null),2),ie=oe[0],le=oe[1],se=i(null),ce=s(function(){var e,t,n;return W||re||(null!=ae&&null!==(e=ae.getVideoElement)&&void 0!==e&&e.call(ae)?ae.getVideoElement():null!==(t=null!==(n=document.querySelector(".fw-player-video"))&&void 0!==n?n:document.querySelector('[data-player-container="true"] video'))&&void 0!==t?t:document.querySelector(".fw-player-container video"))},[W,re,ae]);l(function(){var e;return(e=ce())&&e!==ie&&le(e),ie||(se.current=setInterval(function(){var e=ce();e&&(le(e),se.current&&(clearInterval(se.current),se.current=null))},100),setTimeout(function(){se.current&&(clearInterval(se.current),se.current=null)},5e3)),function(){se.current&&(clearInterval(se.current),se.current=null)}},[re,ae,ce,ie]);var ue=null==B||null===(c=B.meta)||void 0===c?void 0:c.tracks,de=d(function(){var e;if(V&&V.length>0)return V;var t=null==ae||null===(e=ae.getQualities)||void 0===e?void 0:e.call(ae);return t&&t.length>0?t:ue?Object.entries(ue).filter(function(e){return"video"===Z(e,2)[1].type}).map(function(e){var t=Z(e,2),n=t[0],r=t[1];return{id:n,label:r.height?"".concat(r.height,"p"):r.codec,width:r.width,height:r.height,bitrate:r.bps}}).sort(function(e,t){return(t.height||0)-(e.height||0)}):[]},[V,ae,ue]),fe=null!==(u=null==ae||null===(f=ae.getTextTracks)||void 0===f?void 0:f.call(ae))&&void 0!==u?u:[],ve=Z(o(!1),2),me=ve[0],he=ve[1],pe=Z(o(!1),2),Ce=pe[0],be=pe[1],Ae=Z(o(!1),2),Ne=Ae[0],ke=Ae[1],xe=Z(o(!0),2),Se=xe[0],Me=xe[1],Te=Z(o(void 0),2),Ie=Te[0],qe=Te[1],Be=Z(o(function(){return ie?Math.round(100*ie.volume):100}),2),Fe=Be[0],Re=Be[1],je=Z(o(function(){var e;return null!==(e=null==ie?void 0:ie.playbackRate)&&void 0!==e?e:1}),2),Ue=je[0],Ve=je[1],Qe=null!=K?K:me,Ye=null!=Y?Y:Ce,Je=null!=ee?ee:Ne,Ge=void 0!==J?Math.round(100*J):Fe,He=Z(o("auto"),2),Ze=He[0],Xe=He[1],Ke=Z(o("none"),2),_e=Ke[0],$e=Ke[1],et=Z(o(!1),2),tt=et[0],nt=et[1],rt=Z(o(!0),2),at=rt[0],ot=rt[1];l(function(){if(tt){var e=function(e){var t=e.target;t&&!t.closest(".fw-settings-menu")&&nt(!1)},t=setTimeout(function(){window.addEventListener("click",e)},0);return function(){clearTimeout(t),window.removeEventListener("click",e)}}},[tt]);var it=s(function(e){if(e){var t=Object.values(e);if(0!==t.length){var n=t.map(function(e){return e.firstms}).filter(function(e){return void 0!==e}),r=t.map(function(e){return e.lastms}).filter(function(e){return void 0!==e});if(0!==n.length&&0!==r.length){var a=Math.max.apply(Math,X(n)),o=Math.min.apply(Math,X(r))-a;if(Number.isFinite(o)&&!(o<=0))return o}}}},[]),lt=null!==(m=null==B||null===(k=B.meta)||void 0===k?void 0:k.buffer_window)&&void 0!==m?m:it(null==B||null===(x=B.meta)||void 0===x?void 0:x.tracks),st=d(function(){return h(j,B,M)},[j,B,M]),ct=d(function(){return p(ie)},[ie]),ut=d(function(){return C(ie)},[ie]),dt=p(ie)&&void 0!==lt&<>0&&"whep"!==z&&"webrtc"!==z,ft=d(function(){return g({isLive:st,video:ie,mistStreamInfo:B,currentTime:E,duration:M,allowMediaStreamDvr:dt})},[st,ie,B,E,M,dt]),vt=ft.seekableStart,mt=ft.liveEdge,ht=null==ae||null===(S=ae.getSeekableStart)||void 0===S?void 0:S.call(ae),pt=null==ae||null===(L=ae.getLiveEdge)||void 0===L?void 0:L.call(ae),Ct=Number.isFinite(ht)&&Number.isFinite(pt)&&pt>=ht&&(pt>0||ht>0),gt=Ct?ht:vt,bt=Ct?pt:mt,wt=st&&Number.isFinite(bt)&&Number.isFinite(gt)&&bt>gt,yt=st,At=d(function(){return b(z,ct,lt)},[z,ct,lt]),Nt=d(function(){return ae&&"function"==typeof ae.canSeekStream?ae.canSeekStream():w({video:ie,isLive:st,duration:M,bufferWindowMs:lt})},[ie,st,M,lt,ae])&&(!st||wt);l(function(){if(st){var e=y(E,bt,At,at);e!==at&&ot(e)}else ot(!0)},[st,bt,E,At,at]);var kt=i(!1);l(function(){if(ie){var e=function(){return he(!ie.paused)},t=function(){var e=ie.muted||0===ie.volume;be(e),Re(Math.round(100*ie.volume))},n=function(){"undefined"!=typeof document&&ke(!!document.fullscreenElement)},r=function(){return Ve(ie.playbackRate)};return e(),t(),n(),r(),ie.addEventListener("play",e),ie.addEventListener("pause",e),ie.addEventListener("playing",e),ie.addEventListener("volumechange",t),ie.addEventListener("ratechange",r),"undefined"!=typeof document&&document.addEventListener("fullscreenchange",n),function(){ie.removeEventListener("play",e),ie.removeEventListener("pause",e),ie.removeEventListener("playing",e),ie.removeEventListener("volumechange",t),ie.removeEventListener("ratechange",r),"undefined"!=typeof document&&document.removeEventListener("fullscreenchange",n)}}},[ie,st]),l(function(){kt.current=!1},[ie]),l(function(){var e=fe.find(function(e){return e.active});$e(e?e.id:"none")},[fe]),l(function(){if(ie){var e=function(){var e,t,n=null!==(e=null==ae||null===(t=ae.getBufferedRanges)||void 0===t?void 0:t.call(ae))&&void 0!==e?e:ie.buffered;qe(n)};return e(),ie.addEventListener("progress",e),ie.addEventListener("loadeddata",e),function(){ie.removeEventListener("progress",e),ie.removeEventListener("loadeddata",e)}}},[ie]),l(function(){if(ie){var e=function(){if(ie.srcObject instanceof MediaStream){var e=ie.srcObject.getAudioTracks();Me(e.length>0)}else{var t=ie;t.audioTracks&&void 0!==t.audioTracks.length?Me(t.audioTracks.length>0):Me(!0)}};return e(),ie.addEventListener("loadedmetadata",e),function(){return ie.removeEventListener("loadedmetadata",e)}}Me(!0)},[ie]);var xt=function(){var e,t,n;if(!R)if(H)H();else{var r=null!=ie?ie:document.querySelector(".fw-player-video");if(r){var a=!(null!==(e=null==ae||null===(t=ae.isMuted)||void 0===t?void 0:t.call(ae))&&void 0!==e?e:r.muted);null==ae||null===(n=ae.setMuted)||void 0===n||n.call(ae,a),r.muted=a,be(a),Re(a?0:Math.round(100*r.volume))}}},St=function(e){var t;R||(Xe(e),Q?Q(e):null==ae||null===(t=ae.selectQuality)||void 0===t||t.call(ae,e))},Lt=function(e){var t,n;R||($e(e),"none"===e?null==ae||null===(t=ae.selectTextTrack)||void 0===t||t.call(ae,null):null==ae||null===(n=ae.selectTextTrack)||void 0===n||n.call(ae,e))},Et=d(function(){return A({isLive:st,currentTime:E,duration:M,liveEdge:bt,seekableStart:gt,unixoffset:null==B?void 0:B.unixoffset})},[st,E,M,bt,gt,null==B?void 0:B.unixoffset]),Mt=Z(o(!1),2),Tt=Mt[0],It=Mt[1],qt=Z(o(!1),2),Bt=qt[0],Ft=qt[1],Rt=Tt||Bt;return e("div",{className:v("fw-player-surface fw-controls-wrapper",I?"fw-controls-wrapper--visible":"fw-controls-wrapper--hidden"),children:t("div",{className:"fw-control-bar pointer-events-auto",onClick:function(e){return e.stopPropagation()},children:[Nt&&e("div",{className:"fw-seek-wrapper",children:e(ye,{currentTime:E,duration:M,buffered:Ie,disabled:R,isLive:st,seekableStart:gt,liveEdge:bt,commitOnRelease:yt,onSeek:function(e){q?q(e):ie&&(ie.currentTime=e)}})}),t("div",{className:"fw-controls-row",children:[t("div",{className:"fw-controls-left",children:[t("div",{className:"fw-control-group",children:[e("button",{type:"button",className:"fw-btn-flush","aria-label":Qe?"Pause":"Play",onClick:function(){var e,t,n;R||(_?_():(ie||ae)&&(null===(e=null!==(t=null==ae||null===(n=ae.isPaused)||void 0===n?void 0:n.call(ae))&&void 0!==t?t:null==ie?void 0:ie.paused)||void 0===e||e?null!=ae&&ae.play?ae.play().catch(function(){}):ie&&ie.play().catch(function(){}):null!=ae&&ae.pause?ae.pause():ie&&ie.pause()))},children:e(Pe,{isPlaying:Qe,size:18})}),Nt&&t(n,{children:[e("button",{type:"button",className:"fw-btn-flush hidden sm:flex","aria-label":"Skip back 10 seconds",onClick:function(){var e=Math.max(0,E-10);if(q)q(e);else{var t=ce();t&&(t.currentTime=e)}},children:e(Le,{size:16})}),e("button",{type:"button",className:"fw-btn-flush hidden sm:flex","aria-label":"Skip forward 10 seconds",onClick:function(){var e=Number.isFinite(M)?M:E+10,t=Math.min(e,E+10);if(q)q(t);else{var n=ce();n&&(n.currentTime=t)}},children:e(Ee,{size:16})})]})]}),t("div",{className:v("fw-volume-group",Rt&&"fw-volume-group--expanded",!Se&&"fw-volume-group--disabled"),onMouseEnter:function(){return Se&&It(!0)},onMouseLeave:function(){It(!1),Ft(!1)},onFocusCapture:function(){return Se&&Ft(!0)},onBlurCapture:function(e){e.currentTarget.contains(e.relatedTarget)||Ft(!1)},onClick:function(e){Se&&e.target===e.currentTarget&&xt()},children:[e("button",{type:"button",className:"fw-volume-btn","aria-label":Se?Ye?"Unmute":"Mute":"No audio",onClick:Se?xt:void 0,disabled:!Se,children:e(Oe,{isMuted:Ye||!Se,size:16})}),e("div",{className:v("fw-volume-slider-wrapper",Rt?"fw-volume-slider-wrapper--expanded":"fw-volume-slider-wrapper--collapsed"),children:e(we,{orientation:"horizontal","aria-label":"Volume",max:100,step:1,value:[Ge],onValueChange:function(e){var t;if(!R){var n=Math.max(0,Math.min(100,null!==(t=e[0])&&void 0!==t?t:0));if(G)G(n/100);else{var r=null!=ie?ie:document.querySelector(".fw-player-video");r&&(r.volume=n/100,r.muted=0===n,Re(n),be(0===n))}}},className:"w-full",disabled:!Se})})]}),e("div",{className:"fw-control-group",children:e("span",{className:"fw-time-display",children:Et})}),st&&e("div",{className:"fw-control-group",children:t("button",{type:"button",onClick:function(){var e;R||(te?te():null==ae||null===(e=ae.jumpToLive)||void 0===e||e.call(ae))},disabled:!wt||at,className:v("fw-live-badge",!wt||at?"fw-live-badge--active":"fw-live-badge--behind"),title:wt?at?"At live edge":"Jump to live":"Live only",children:["LIVE",!at&&wt&&e(We,{size:10})]})})]}),t("div",{className:"fw-controls-right",children:[t("div",{className:"fw-control-group relative",children:[e("button",{type:"button",className:v("fw-btn-flush group",tt&&"fw-btn-flush--active"),"aria-label":"Settings",title:"Settings",onClick:function(){return nt(!tt)},children:e(De,{size:16,className:"transition-transform group-hover:rotate-90"})}),tt&&t("div",{className:"fw-player-surface fw-settings-menu",children:[O&&!1!==j&&t("div",{className:"fw-settings-section",children:[e("div",{className:"fw-settings-label",children:"Mode"}),e("div",{className:"fw-settings-options",children:["auto","low-latency","quality"].map(function(t){return e("button",{className:v("fw-settings-btn",P===t&&"fw-settings-btn--active"),onClick:function(){O(t),nt(!1)},children:"low-latency"===t?"Fast":"quality"===t?"Stable":"Auto"},t)})})]}),ut&&t("div",{className:"fw-settings-section",children:[e("div",{className:"fw-settings-label",children:"Speed"}),e("div",{className:"fw-settings-options fw-settings-options--wrap",children:N.map(function(e){return t("button",{className:v("fw-settings-btn",Ue===e&&"fw-settings-btn--active"),onClick:function(){!function(e){if(!R){var t=Number(e);if(Ve(t),null!=ae&&ae.setPlaybackRate)ae.setPlaybackRate(t);else{var n=ce();n&&(n.playbackRate=t)}}}(String(e)),nt(!1)},children:[e,"x"]},e)})})]}),de.length>0&&t("div",{className:"fw-settings-section",children:[e("div",{className:"fw-settings-label",children:"Quality"}),t("div",{className:"fw-settings-list",children:[e("button",{className:v("fw-settings-list-item","auto"===Ze&&"fw-settings-list-item--active"),onClick:function(){St("auto"),nt(!1)},children:"Auto"}),de.map(function(t){return e("button",{className:v("fw-settings-list-item",Ze===t.id&&"fw-settings-list-item--active"),onClick:function(){St(t.id),nt(!1)},children:t.label},t.id)})]})]}),fe.length>0&&t("div",{className:"fw-settings-section",children:[e("div",{className:"fw-settings-label",children:"Captions"}),t("div",{className:"fw-settings-list",children:[e("button",{className:v("fw-settings-list-item","none"===_e&&"fw-settings-list-item--active"),onClick:function(){Lt("none"),nt(!1)},children:"Off"}),fe.map(function(t){return e("button",{className:v("fw-settings-list-item",_e===t.id&&"fw-settings-list-item--active"),onClick:function(){Lt(t.id),nt(!1)},children:t.label||t.id},t.id)})]})]})]})]}),e("div",{className:"fw-control-group",children:e("button",{type:"button",className:"fw-btn-flush","aria-label":"Toggle fullscreen",onClick:function(){if(!R)if($)$();else if("undefined"!=typeof document){var e=document.querySelector('[data-player-container="true"]');e&&(document.fullscreenElement?document.exitFullscreen().catch(function(){}):e.requestFullscreen().catch(function(){}))}},children:e(ze,{isFullscreen:Je,size:16})})})]})]})]})})},Ve={"html5/application/vnd.apple.mpegurl":"HLS","dash/video/mp4":"DASH","html5/video/mp4":"MP4","html5/video/webm":"WebM",whep:"WHEP","mist/html":"Mist","mist/legacy":"Auto","ws/video/mp4":"MEWS"},Qe=function(r){var a,c,u,f=r.onSettingsChange,m=r.playbackMode,h=void 0===m?"auto":m,p=r.onModeChange,C=r.onReload,g=r.streamInfo,b=r.mistStreamInfo,w=r.currentPlayer,y=r.currentSource,A=r.videoElement,N=r.protocol,S=r.nodeId;r.isVisible;var L=r.isOpen,E=r.onOpenChange,M=Z(o(!1),2),T=M[0],I=M[1],q=void 0!==L?L:T,B=s(function(e){E?E(e):I(e)},[E]),F=Z(o("config"),2),R=F[0],D=F[1],O=Z(o(0),2)[1],z=Z(o(null),2),j=z[0],W=z[1],U=Z(o(!1),2),V=U[0],Q=U[1],J=Z(o(!1),2),G=J[0],H=J[1],X=i(null),K=i(null),_=Z(o(1),2),$=_[0],ee=_[1],te=Z(o(100),2),ne=te[0],re=te[1],ae=Z(o(0),2),oe=ae[0],ie=ae[1],le=Z(o(0),2),se=le[0],ce=le[1],ue=Z(o(null),2),de=ue[0],fe=ue[1],ve=i(null);l(function(){return A&&q&&(K.current||(K.current=new k({sampleInterval:500,onSample:function(e){re(e.score),ie(e.stallCount),ce(e.frameDropRate),K.current&&ee(K.current.getPlaybackScore())}})),K.current.start(A)),function(){K.current&&K.current.stop()}},[A,q]),l(function(){if(q&&"stats"===R){var e=function(){var e=P(Y().m(function e(){var t,n;return Y().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!(t=x.getCurrentPlayer())||!t.getStats){e.n=2;break}return e.n=1,t.getStats();case 1:(n=e.v)&&fe(n);case 2:e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[0,3]])}));return function(){return e.apply(this,arguments)}}();return e(),ve.current=setInterval(e,500),function(){ve.current&&(clearInterval(ve.current),ve.current=null)}}},[q,R]);var me=d(function(){if(!g)return[];try{return x.getAllCombinations(g,h)}catch(e){return[]}},[g,h]),he=d(function(){return me.filter(function(e){return e.compatible})},[me]),pe=d(function(){return w&&y&&0!==me.length?me.findIndex(function(e){return e.player===w.shortname&&e.sourceType===y.type}):-1},[w,y,me]),Ce=d(function(){return w&&y&&0!==he.length?he.findIndex(function(e){return e.player===w.shortname&&e.sourceType===y.type}):-1},[w,y,he]),ge=s(function(){null==C||C()},[C]),be=s(function(){if(0!==he.length){var e=((Ce>=0?Ce:-1)+1)%he.length,t=he[e];O(e),f({forcePlayer:t.player,forceType:t.sourceType,forceSource:t.sourceIndex})}},[he,Ce,f]),we=s(function(e){var t=me[e];t&&(O(e),f({forcePlayer:t.player,forceType:t.sourceType,forceSource:t.sourceIndex}))},[me,f]),ye=Z(o(null),2),Ae=ye[0],Ne=ye[1];return l(function(){if(q&&"stats"===R){var e=function(){var e=x.getCurrentPlayer(),t=(null==e?void 0:e.getVideoElement())||A;Ne(t?{resolution:"".concat(t.videoWidth,"x").concat(t.videoHeight),buffered:t.buffered.length>0?(t.buffered.end(t.buffered.length-1)-t.currentTime).toFixed(1):"0",playbackRate:t.playbackRate.toFixed(2),currentTime:t.currentTime.toFixed(1),duration:isFinite(t.duration)?t.duration.toFixed(1):"live",readyState:t.readyState,networkState:t.networkState}:null)};e();var t=setInterval(e,500);return function(){return clearInterval(t)}}},[q,R,A]),q?t("div",{className:"fw-dev-panel",children:[t("div",{className:"fw-dev-header",children:[e("button",{type:"button",onClick:function(){return D("config")},className:v("fw-dev-tab","config"===R&&"fw-dev-tab--active"),children:"Config"}),e("button",{type:"button",onClick:function(){return D("stats")},className:v("fw-dev-tab","stats"===R&&"fw-dev-tab--active"),children:"Stats"}),e("div",{className:"fw-dev-spacer"}),e("button",{type:"button",onClick:function(){return B(!1)},className:"fw-dev-close","aria-label":"Close dev mode panel",children:e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:e("path",{d:"M2 2l8 8M10 2l-8 8"})})})]}),"config"===R&&t("div",{ref:X,className:"fw-dev-body",children:[t("div",{className:"fw-dev-section",children:[e("div",{className:"fw-dev-label",children:"Active"}),t("div",{className:"fw-dev-value",children:[(null==w?void 0:w.name)||"None"," ",e("span",{className:"fw-dev-value-arrow",children:"→"})," ",Ve[(null==y?void 0:y.type)||""]||(null==y?void 0:y.type)||"—"]}),S&&t("div",{className:"fw-dev-value-muted",children:["Node: ",S]})]}),t("div",{className:"fw-dev-section",children:[e("div",{className:"fw-dev-label",children:"Playback Mode"}),e("div",{className:"fw-dev-mode-group",children:["auto","low-latency","quality"].map(function(t){return e("button",{type:"button",onClick:function(){return null==p?void 0:p(t)},className:v("fw-dev-mode-btn",h===t&&"fw-dev-mode-btn--active"),children:"low-latency"===t?"Low Lat":t.charAt(0).toUpperCase()+t.slice(1)},t)})}),t("div",{className:"fw-dev-mode-desc",children:["auto"===h&&"Balanced: MP4/WS → WHEP → HLS","low-latency"===h&&"WHEP/WebRTC first (<1s delay)","quality"===h&&"MP4/WS first, HLS fallback"]})]}),t("div",{className:"fw-dev-actions",children:[e("button",{type:"button",onClick:ge,className:"fw-dev-action-btn",children:"Reload"}),e("button",{type:"button",onClick:be,className:"fw-dev-action-btn",children:"Next Option"})]}),t("div",{className:"fw-dev-section",style:{padding:0,borderBottom:0},children:[t("div",{className:"fw-dev-list-header",children:[t("span",{className:"fw-dev-list-title",children:["Player Options (",he.length,")"]}),me.length>he.length&&t("button",{type:"button",onClick:function(){return H(!G)},className:"fw-dev-list-toggle",children:[e("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:v("fw-dev-chevron",G&&"fw-dev-chevron--open"),children:e("path",{d:"M6 9l6 6 6-6"})}),G?"Hide":"Show"," disabled (",me.length-he.length,")"]})]}),0===me.length?e("div",{className:"fw-dev-list-empty",children:"No stream info available"}):e("div",{children:me.map(function(r,a){var o,i,l,s,c=!0===r.codecIncompatible;if(!r.compatible&&!c&&!G)return null;var u=pe===a,d=Ve[r.sourceType]||r.sourceType.split("/").pop();return t("div",{onMouseEnter:function(e){if(W(a),X.current){var t=X.current,n=e.currentTarget,r=t.getBoundingClientRect(),o=(n.getBoundingClientRect().top-r.top)/r.height;Q(o>.6)}},onMouseLeave:function(){return W(null)},className:"fw-dev-combo",children:[t("button",{type:"button",onClick:function(){return we(a)},className:v("fw-dev-combo-btn",u&&"fw-dev-combo-btn--active",!r.compatible&&!c&&"fw-dev-combo-btn--disabled",c&&"fw-dev-combo-btn--codec-warn"),children:[e("span",{className:v("fw-dev-combo-rank",u?"fw-dev-combo-rank--active":r.compatible||c?c?"fw-dev-combo-rank--warn":"":"fw-dev-combo-rank--disabled"),children:r.compatible?a+1:c?"⚠":"—"}),t("span",{className:"fw-dev-combo-name",children:[r.playerName," ",e("span",{className:"fw-dev-combo-arrow",children:"→"})," ",e("span",{className:v("fw-dev-combo-type",r.compatible||c?c?"fw-dev-combo-type--warn":"":"fw-dev-combo-type--disabled"),children:d})]}),e("span",{className:v("fw-dev-combo-score",r.compatible||c?c?"fw-dev-combo-score--low":r.score>=2?"fw-dev-combo-score--high":r.score>=1.5?"fw-dev-combo-score--mid":"fw-dev-combo-score--low":"fw-dev-combo-score--disabled"),children:r.score.toFixed(2)})]}),j===a&&t("div",{className:v("fw-dev-tooltip",V?"fw-dev-tooltip--above":"fw-dev-tooltip--below"),children:[t("div",{className:"fw-dev-tooltip-header",children:[e("div",{className:"fw-dev-tooltip-title",children:r.playerName}),e("div",{className:"fw-dev-tooltip-subtitle",children:r.sourceType}),(null===(o=r.scoreBreakdown)||void 0===o?void 0:o.trackTypes)&&r.scoreBreakdown.trackTypes.length>0&&t("div",{className:"fw-dev-tooltip-tracks",children:["Tracks: ",e("span",{className:"fw-dev-tooltip-value",children:r.scoreBreakdown.trackTypes.join(", ")})]})]}),r.compatible&&r.scoreBreakdown?t(n,{children:[t("div",{className:"fw-dev-tooltip-score",children:["Score: ",r.score.toFixed(2)]}),t("div",{className:"fw-dev-tooltip-row",children:["Tracks [",r.scoreBreakdown.trackTypes.join(", "),"]: ",e("span",{className:"fw-dev-tooltip-value",children:r.scoreBreakdown.trackScore.toFixed(2)})," ",t("span",{className:"fw-dev-tooltip-weight",children:["x",r.scoreBreakdown.weights.tracks]})]}),t("div",{className:"fw-dev-tooltip-row",children:["Priority: ",e("span",{className:"fw-dev-tooltip-value",children:r.scoreBreakdown.priorityScore.toFixed(2)})," ",t("span",{className:"fw-dev-tooltip-weight",children:["x",r.scoreBreakdown.weights.priority]})]}),t("div",{className:"fw-dev-tooltip-row",children:["Source: ",e("span",{className:"fw-dev-tooltip-value",children:r.scoreBreakdown.sourceScore.toFixed(2)})," ",t("span",{className:"fw-dev-tooltip-weight",children:["x",r.scoreBreakdown.weights.source]})]}),void 0!==r.scoreBreakdown.reliabilityScore&&t("div",{className:"fw-dev-tooltip-row",children:["Reliability: ",e("span",{className:"fw-dev-tooltip-value",children:r.scoreBreakdown.reliabilityScore.toFixed(2)})," ",t("span",{className:"fw-dev-tooltip-weight",children:["x",null!==(i=r.scoreBreakdown.weights.reliability)&&void 0!==i?i:0]})]}),void 0!==r.scoreBreakdown.modeBonus&&0!==r.scoreBreakdown.modeBonus&&t("div",{className:"fw-dev-tooltip-row",children:["Mode (",h,"): ",t("span",{className:"fw-dev-tooltip-bonus",children:["+",r.scoreBreakdown.modeBonus.toFixed(2)]})," ",t("span",{className:"fw-dev-tooltip-weight",children:["x",null!==(l=r.scoreBreakdown.weights.mode)&&void 0!==l?l:0]})]}),void 0!==r.scoreBreakdown.routingBonus&&0!==r.scoreBreakdown.routingBonus&&t("div",{className:"fw-dev-tooltip-row",children:["Routing: ",t("span",{className:r.scoreBreakdown.routingBonus>0?"fw-dev-tooltip-bonus":"fw-dev-tooltip-penalty",children:[r.scoreBreakdown.routingBonus>0?"+":"",r.scoreBreakdown.routingBonus.toFixed(2)]})," ",t("span",{className:"fw-dev-tooltip-weight",children:["x",null!==(s=r.scoreBreakdown.weights.routing)&&void 0!==s?s:0]})]})]}):e("div",{className:"fw-dev-tooltip-error",children:r.incompatibleReason||"Incompatible"})]})]},"".concat(r.player,"-").concat(r.sourceType))})})]})]}),"stats"===R&&t("div",{className:"fw-dev-body",children:[t("div",{className:"fw-dev-section",children:[e("div",{className:"fw-dev-label",children:"Playback Rate"}),t("div",{className:"fw-dev-rate",children:[t("div",{className:v("fw-dev-rate-value",$>=.95&&$<=1.05?"fw-dev-stat-value--good":$>1.05?"fw-dev-stat-value--accent":$>=.75?"fw-dev-stat-value--warn":"fw-dev-stat-value--bad"),children:[$.toFixed(2),"×"]}),e("div",{className:"fw-dev-rate-status",children:$>=.95&&$<=1.05?"realtime":$>1.05?"catching up":$>=.75?"slightly slow":"stalling"})]}),t("div",{className:"fw-dev-rate-stats",children:[t("span",{className:ne>=75?"fw-dev-stat-value--good":"fw-dev-stat-value--bad",children:["Quality: ",ne,"/100"]}),t("span",{className:0===oe?"fw-dev-stat-value--good":"fw-dev-stat-value--warn",children:["Stalls: ",oe]}),t("span",{className:se<1?"fw-dev-stat-value--good":"fw-dev-stat-value--bad",children:["Drops: ",se.toFixed(1),"%"]})]})]}),Ae?t("div",{children:[t("div",{className:"fw-dev-stat",children:[e("span",{className:"fw-dev-stat-label",children:"Resolution"}),e("span",{className:"fw-dev-stat-value",children:Ae.resolution})]}),t("div",{className:"fw-dev-stat",children:[e("span",{className:"fw-dev-stat-label",children:"Buffer"}),t("span",{className:"fw-dev-stat-value",children:[Ae.buffered,"s"]})]}),t("div",{className:"fw-dev-stat",children:[e("span",{className:"fw-dev-stat-label",children:"Playback Rate"}),t("span",{className:"fw-dev-stat-value",children:[Ae.playbackRate,"x"]})]}),t("div",{className:"fw-dev-stat",children:[e("span",{className:"fw-dev-stat-label",children:"Time"}),t("span",{className:"fw-dev-stat-value",children:[Ae.currentTime," / ",Ae.duration]})]}),t("div",{className:"fw-dev-stat",children:[e("span",{className:"fw-dev-stat-label",children:"Ready State"}),e("span",{className:"fw-dev-stat-value",children:Ae.readyState})]}),t("div",{className:"fw-dev-stat",children:[e("span",{className:"fw-dev-stat-label",children:"Network State"}),e("span",{className:"fw-dev-stat-value",children:Ae.networkState})]}),N&&t("div",{className:"fw-dev-stat",children:[e("span",{className:"fw-dev-stat-label",children:"Protocol"}),e("span",{className:"fw-dev-stat-value",children:N})]}),S&&t("div",{className:"fw-dev-stat",children:[e("span",{className:"fw-dev-stat-label",children:"Node ID"}),e("span",{className:"fw-dev-stat-value truncate",style:{maxWidth:"150px"},children:S})]})]}):e("div",{className:"fw-dev-list-empty",children:"No video element available"}),de&&t("div",{children:[e("div",{className:"fw-dev-list-header fw-dev-section-header",children:e("span",{className:"fw-dev-list-title",children:"hls"===de.type?"HLS.js Stats":"webrtc"===de.type?"WebRTC Stats":"Player Stats"})}),"hls"===de.type&&t(n,{children:[t("div",{className:"fw-dev-stat",children:[e("span",{className:"fw-dev-stat-label",children:"Bitrate"}),e("span",{className:"fw-dev-stat-value--accent",children:de.currentBitrate>0?"".concat(Math.round(de.currentBitrate/1e3)," kbps"):"N/A"})]}),t("div",{className:"fw-dev-stat",children:[e("span",{className:"fw-dev-stat-label",children:"Bandwidth Est."}),e("span",{className:"fw-dev-stat-value",children:de.bandwidthEstimate>0?"".concat(Math.round(de.bandwidthEstimate/1e3)," kbps"):"N/A"})]}),t("div",{className:"fw-dev-stat",children:[e("span",{className:"fw-dev-stat-label",children:"Level"}),t("span",{className:"fw-dev-stat-value",children:[de.currentLevel>=0?de.currentLevel:"Auto"," / ",(null===(a=de.levels)||void 0===a?void 0:a.length)||0]})]}),void 0!==de.latency&&t("div",{className:"fw-dev-stat",children:[e("span",{className:"fw-dev-stat-label",children:"Latency"}),t("span",{className:de.latency>5e3?"fw-dev-stat-value--warn":"fw-dev-stat-value",children:[Math.round(de.latency)," ms"]})]})]}),"webrtc"===de.type&&t(n,{children:[de.video&&t(n,{children:[t("div",{className:"fw-dev-stat",children:[e("span",{className:"fw-dev-stat-label",children:"Video Bitrate"}),e("span",{className:"fw-dev-stat-value--accent",children:de.video.bitrate>0?"".concat(Math.round(de.video.bitrate/1e3)," kbps"):"N/A"})]}),t("div",{className:"fw-dev-stat",children:[e("span",{className:"fw-dev-stat-label",children:"FPS"}),e("span",{className:"fw-dev-stat-value",children:Math.round(de.video.framesPerSecond||0)})]}),t("div",{className:"fw-dev-stat",children:[e("span",{className:"fw-dev-stat-label",children:"Frames"}),t("span",{className:"fw-dev-stat-value",children:[de.video.framesDecoded," decoded,"," ",t("span",{className:de.video.frameDropRate>1?"fw-dev-stat-value--bad":"fw-dev-stat-value--good",children:[de.video.framesDropped," dropped"]})]})]}),t("div",{className:"fw-dev-stat",children:[e("span",{className:"fw-dev-stat-label",children:"Packet Loss"}),t("span",{className:de.video.packetLossRate>1?"fw-dev-stat-value--bad":"fw-dev-stat-value--good",children:[de.video.packetLossRate.toFixed(2),"%"]})]}),t("div",{className:"fw-dev-stat",children:[e("span",{className:"fw-dev-stat-label",children:"Jitter"}),t("span",{className:de.video.jitter>30?"fw-dev-stat-value--warn":"fw-dev-stat-value",children:[de.video.jitter.toFixed(1)," ms"]})]}),t("div",{className:"fw-dev-stat",children:[e("span",{className:"fw-dev-stat-label",children:"Jitter Buffer"}),t("span",{className:"fw-dev-stat-value",children:[de.video.jitterBufferDelay.toFixed(1)," ms"]})]})]}),de.network&&t("div",{className:"fw-dev-stat",children:[e("span",{className:"fw-dev-stat-label",children:"RTT"}),t("span",{className:de.network.rtt>200?"fw-dev-stat-value--warn":"fw-dev-stat-value",children:[Math.round(de.network.rtt)," ms"]})]})]})]}),(null==b||null===(c=b.meta)||void 0===c?void 0:c.tracks)&&Object.keys(b.meta.tracks).length>0&&t("div",{children:[e("div",{className:"fw-dev-list-header fw-dev-section-header",children:t("span",{className:"fw-dev-list-title",children:["Tracks (",Object.keys(b.meta.tracks).length,")"]})}),Object.entries(b.meta.tracks).map(function(n){var r=Z(n,2),a=r[0],o=r[1];return t("div",{className:"fw-dev-track",children:[t("div",{className:"fw-dev-track-header",children:[e("span",{className:v("fw-dev-track-badge","video"===o.type?"fw-dev-track-badge--video":"audio"===o.type?"fw-dev-track-badge--audio":"fw-dev-track-badge--other"),children:o.type}),e("span",{className:"fw-dev-track-codec",children:o.codec}),t("span",{className:"fw-dev-track-id",children:["#",a]})]}),t("div",{className:"fw-dev-track-meta",children:["video"===o.type&&o.width&&o.height&&t("span",{children:[o.width,"×",o.height]}),o.bps&&t("span",{children:[Math.round(o.bps/1e3)," kbps"]}),o.fpks&&t("span",{children:[Math.round(o.fpks/1e3)," fps"]}),"audio"===o.type&&o.channels&&t("span",{children:[o.channels,"ch"]}),"audio"===o.type&&o.rate&&t("span",{children:[o.rate," Hz"]}),o.lang&&e("span",{children:o.lang})]})]},a)})]}),b&&(!(null!==(u=b.meta)&&void 0!==u&&u.tracks)||0===Object.keys(b.meta.tracks).length)&&e("div",{className:"fw-dev-no-tracks",children:t("span",{className:"fw-dev-no-tracks-text",children:["No track data available",b.type&&t("span",{className:"fw-dev-no-tracks-type",children:["(",b.type,")"]})]})})]})]}):null},Ye=function(n){var r=n.isVisible,a=n.speed,o=n.className;return e("div",{className:v("fw-speed-indicator absolute top-3 right-3 z-30 pointer-events-none","transition-opacity duration-150",r?"opacity-100":"opacity-0",o),children:t("div",{className:v("bg-black/60 text-white px-2.5 py-1 rounded-md","text-xs font-semibold tabular-nums","flex items-center gap-2","border border-white/15","transform transition-transform duration-150",r?"scale-100":"scale-90"),children:[e(Je,{className:"w-4 h-4"}),t("span",{children:[a,"x"]})]})})},Je=function(t){var n=t.className;return e("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:n,"aria-hidden":"true",children:e("path",{d:"M4 18l8.5-6L4 6v12zm9-12v12l8.5-6L13 6z"})})},Ge=function(r){var a=r.direction,i=r.seconds,s=void 0===i?10:i,c=r.className,u=r.onHide,d=Z(o(!1),2),f=d[0],m=d[1];if(l(function(){if(a){m(!0);var e=setTimeout(function(){m(!1),null==u||u()},600);return function(){return clearTimeout(e)}}},[a,u]),!a)return null;var h="back"===a;return t("div",{className:v("fw-skip-indicator absolute inset-0 z-30 pointer-events-none","flex items-center",h?"justify-start pl-8":"justify-end pr-8",c),children:[e("div",{className:v("absolute top-0 bottom-0 w-1/3",h?"left-0":"right-0","bg-white/10",f&&"animate-pulse")}),t("div",{className:v("relative flex flex-col items-center gap-1 text-white","transition-all duration-200",f?"opacity-100 scale-100":"opacity-0 scale-75"),children:[e("div",{className:"flex",children:t(n,h?{children:[e(He,{className:"w-8 h-8"}),e(He,{className:"w-8 h-8 -ml-4"})]}:{children:[e(Ze,{className:"w-8 h-8"}),e(Ze,{className:"w-8 h-8 -ml-4"})]})}),e("span",{className:"text-sm font-semibold tabular-nums",children:h?"-".concat(s,"s"):"+".concat(s,"s")})]})]})},He=function(t){var n=t.className;return e("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:n,"aria-hidden":"true",children:e("path",{d:"M11 18V6l-8.5 6 8.5 6zm.5-6l8.5 6V6l-8.5 6z"})})},Ze=function(t){var n=t.className;return e("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:n,"aria-hidden":"true",children:e("path",{d:"M4 18l8.5-6L4 6v12zm9-12v12l8.5-6L13 6z"})})},Xe=["className","inset","children"],Ke=["className"],_e=["className","style"],$e=["className","inset"],et=["className","children","checked"],tt=["className","children"],nt=["className","inset"],rt=["className"],at=M.Root,ot=M.Trigger;r.forwardRef(function(n,r){var a=n.className,o=n.inset,i=n.children,l=Q(n,Xe);return t(M.SubTrigger,V(V({ref:r,className:v("fw-context-menu-item",o&&"fw-context-menu-item--inset",a)},l),{},{children:[i,e(T,{className:"ml-auto h-4 w-4"})]}))}).displayName=M.SubTrigger.displayName,r.forwardRef(function(t,n){var r=t.className,a=Q(t,Ke);return e(M.SubContent,V({ref:n,className:v("fw-player-surface fw-context-menu",r)},a))}).displayName=M.SubContent.displayName;var it=r.forwardRef(function(t,n){var r=t.className,a=t.style,o=Q(t,_e);return e(M.Portal,{children:e(M.Content,V({ref:n,className:v("fw-player-surface fw-context-menu",r),style:V({backgroundColor:"hsl(235 19% 13%)",color:"hsl(229 35% 75%)",border:"1px solid rgba(90, 96, 127, 0.3)"},a)},o))})});it.displayName=M.Content.displayName;var lt=r.forwardRef(function(t,n){var r=t.className,a=t.inset,o=Q(t,$e);return e(M.Item,V({ref:n,className:v("fw-context-menu-item",a&&"fw-context-menu-item--inset",r)},o))});lt.displayName=M.Item.displayName,r.forwardRef(function(n,r){var a=n.className,o=n.children,i=n.checked,l=Q(n,et);return t(M.CheckboxItem,V(V({ref:r,className:v("fw-context-menu-checkbox",a),checked:i},l),{},{children:[e("span",{className:"fw-context-menu-indicator",children:e(M.ItemIndicator,{children:e(I,{className:"h-4 w-4"})})}),o]}))}).displayName=M.CheckboxItem.displayName,r.forwardRef(function(n,r){var a=n.className,o=n.children,i=Q(n,tt);return t(M.RadioItem,V(V({ref:r,className:v("fw-context-menu-checkbox",a)},i),{},{children:[e("span",{className:"fw-context-menu-indicator",children:e(M.ItemIndicator,{children:e(q,{className:"h-2 w-2 fill-current"})})}),o]}))}).displayName=M.RadioItem.displayName,r.forwardRef(function(t,n){var r=t.className,a=t.inset,o=Q(t,nt);return e(M.Label,V({ref:n,className:v("fw-context-menu-label",a&&"fw-context-menu-item--inset",r)},o))}).displayName=M.Label.displayName;var st=r.forwardRef(function(t,n){var r=t.className,a=Q(t,rt);return e(M.Separator,V({ref:n,className:v("fw-context-menu-separator",r)},a))});st.displayName=M.Separator.displayName;var ct=function(r){var a,i,l,c,u,d,f,m,h,p,C,g,b=r.contentId,w=r.contentType,y=r.thumbnailUrl,A=void 0===y?null:y,N=r.options,k=r.endpoints,x=r.onStateChange,S=Z(o(!1),2),L=S[0],E=S[1],M=Z(o(!1),2),T=M[0],I=M[1],q=Z(o(null),2),B=q[0],F=q[1],R=Z(o((null==N?void 0:N.playbackMode)||"auto"),2),D=R[0],P=R[1],O=me({contentId:b,contentType:w,endpoints:k,gatewayUrl:null==N?void 0:N.gatewayUrl,mistUrl:null==N?void 0:N.mistUrl,authToken:null==N?void 0:N.authToken,autoplay:!1!==(null==N?void 0:N.autoplay),muted:!1!==(null==N?void 0:N.muted),controls:!0===(null==N?void 0:N.stockControls),poster:A||void 0,debug:null==N?void 0:N.debug,onStateChange:function(e){null==x||x(e)},onError:function(e){console.warn("[Player] Error:",e)}}),z=O.containerRef,j=O.state,W=O.controller,U=O.togglePlay,V=O.toggleMute,Q=O.toggleLoop,Y=O.toggleFullscreen,J=O.togglePiP,G=O.setVolume,H=O.selectQuality,X=O.clearError,K=O.retry,_=O.reload,$=O.jumpToLive,ee=O.handleMouseEnter,te=O.handleMouseLeave,ne=O.handleMouseMove,re=O.setDevModeOptions,ae=s(function(e){re({forcePlayer:e.forcePlayer,forceType:e.forceType,forceSource:e.forceSource})},[re]),oe=s(function(e){P(e),re({playbackMode:e})},[re]),ie=s(function(){X(),_()},[X,_]),le=s(function(){E(function(e){return!e})},[]),se=s(function(){F(null)},[]),fe=null===(a=j.endpoints)||void 0===a?void 0:a.primary,ve="mist-legacy"===(null===(i=j.currentPlayerInfo)||void 0===i?void 0:i.shortname),he=!0===(null==N?void 0:N.stockControls)||ve,pe=(j.isHovering||j.isPaused)&&!j.shouldShowIdleScreen&&!j.isBuffering&&!j.error,Ce=!j.shouldShowIdleScreen&&j.isBuffering&&!j.error&&j.hasPlaybackStarted,ge=!(null!==(l=j.endpoints)&&void 0!==l&&l.primary)&&"booting"!==j.state,be=null!=N&&N.gatewayUrl&&"gateway_loading"===j.state?"Resolving viewing endpoint...":"Waiting for endpoint...";return t(at,{children:[e(ot,{asChild:!0,children:t("div",{className:v("fw-player-surface fw-player-root w-full h-full overflow-hidden",(null==N?void 0:N.devMode)&&"flex"),"data-player-container":"true",tabIndex:0,onMouseEnter:ee,onMouseLeave:te,onMouseMove:ne,children:[t("div",{className:v("relative",null!=N&&N.devMode?"flex-1 min-w-0":"w-full h-full"),children:[e("div",{ref:z,className:"fw-player-container"}),e(ue,{title:null===(c=j.metadata)||void 0===c?void 0:c.title,description:null===(u=j.metadata)||void 0===u?void 0:u.description,isVisible:pe}),e(de,{isOpen:L,onClose:le,metadata:j.metadata,streamState:j.streamState,quality:j.playbackQuality,videoElement:j.videoElement,protocol:null==fe?void 0:fe.protocol,nodeId:null==fe?void 0:fe.nodeId,geoDistance:null==fe?void 0:fe.geoDistance}),(null==N?void 0:N.devMode)&&!T&&e(Qe,{onSettingsChange:ae,playbackMode:D,onModeChange:oe,onReload:ie,streamInfo:j.streamInfo,mistStreamInfo:null===(d=j.streamState)||void 0===d?void 0:d.streamInfo,currentPlayer:j.currentPlayerInfo,currentSource:j.currentSourceInfo,videoElement:j.videoElement,protocol:null==fe?void 0:fe.protocol,nodeId:null==fe?void 0:fe.nodeId,isVisible:!1,isOpen:!1,onOpenChange:I}),j.isHoldingSpeed&&e(Ye,{isVisible:!0,speed:j.holdSpeed}),e(Ge,{direction:B,seconds:10,onHide:se}),ge&&e(ce,{status:"OFFLINE",message:be}),!ge&&j.shouldShowIdleScreen&&e(ce,{status:j.isEffectivelyLive?null===(f=j.streamState)||void 0===f?void 0:f.status:void 0,message:j.isEffectivelyLive?null===(m=j.streamState)||void 0===m?void 0:m.message:"Loading video...",percentage:j.isEffectivelyLive?null===(h=j.streamState)||void 0===h?void 0:h.percentage:void 0}),Ce&&e("div",{role:"status","aria-live":"polite",className:"fw-player-surface absolute inset-0 flex items-center justify-center bg-black/40 backdrop-blur-sm z-20",children:t("div",{className:"flex items-center gap-3 rounded-lg border border-white/10 bg-black/70 px-4 py-3 text-sm text-white shadow-lg",children:[e("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),e("span",{children:"Buffering..."})]})}),!j.shouldShowIdleScreen&&j.error&&e("div",{role:"alert","aria-live":"assertive",className:v("fw-error-overlay",j.isPassiveError?"fw-error-overlay--passive":"fw-error-overlay--fullscreen"),children:t("div",{className:v("fw-error-popup",j.isPassiveError?"fw-error-popup--passive":"fw-error-popup--fullscreen"),children:[t("div",{className:v("fw-error-header",j.isPassiveError?"fw-error-header--warning":"fw-error-header--error"),children:[e("span",{className:v("fw-error-title",j.isPassiveError?"fw-error-title--warning":"fw-error-title--error"),children:j.isPassiveError?"Warning":"Error"}),e("button",{type:"button",className:"fw-error-close",onClick:X,"aria-label":"Dismiss",children:e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:e("path",{d:"M9 3L3 9M3 3L9 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),e("div",{className:"fw-error-body",children:e("p",{className:"fw-error-message",children:"Playback issue"})}),e("div",{className:"fw-error-actions",children:e("button",{type:"button",className:"fw-error-btn","aria-label":"Retry playback",onClick:function(){X(),K()},children:"Retry"})})]})}),!he&&e(Ue,{currentTime:j.currentTime,duration:j.duration,isVisible:j.shouldShowControls,onSeek:function(e){return null==W?void 0:W.seek(e)},showStatsButton:!1,isStatsOpen:L,onStatsToggle:le,mistStreamInfo:null===(p=j.streamState)||void 0===p?void 0:p.streamInfo,disabled:!j.videoElement,playbackMode:D,onModeChange:oe,sourceType:null===(C=j.currentSourceInfo)||void 0===C?void 0:C.type,isContentLive:j.isEffectivelyLive,videoElement:j.videoElement,qualities:j.qualities,onSelectQuality:H,isMuted:j.isMuted,volume:j.volume,onVolumeChange:G,onToggleMute:V,isPlaying:j.isPlaying,onTogglePlay:U,onToggleFullscreen:Y,isFullscreen:j.isFullscreen,isLoopEnabled:j.isLoopEnabled,onToggleLoop:Q,onJumpToLive:$})]}),(null==N?void 0:N.devMode)&&T&&e(Qe,{onSettingsChange:ae,playbackMode:D,onModeChange:oe,onReload:ie,streamInfo:j.streamInfo,mistStreamInfo:null===(g=j.streamState)||void 0===g?void 0:g.streamInfo,currentPlayer:j.currentPlayerInfo,currentSource:j.currentSourceInfo,videoElement:j.videoElement,protocol:null==fe?void 0:fe.protocol,nodeId:null==fe?void 0:fe.nodeId,isVisible:!0,isOpen:!0,onOpenChange:I})]})}),t(it,{children:[t(lt,{onClick:le,className:"gap-2",children:[e(je,{size:14,className:"opacity-70 flex-shrink-0"}),e("span",{children:L?"Hide Stats":"Stats"})]}),(null==N?void 0:N.devMode)&&t(n,{children:[e(st,{}),t(lt,{onClick:function(){return I(!T)},className:"gap-2",children:[e(De,{size:14,className:"opacity-70 flex-shrink-0"}),e("span",{children:T?"Hide Settings":"Settings"})]})]}),e(st,{}),t(lt,{onClick:J,className:"gap-2",children:[e(Be,{size:14,className:"opacity-70 flex-shrink-0"}),e("span",{children:"Picture-in-Picture"})]}),t(lt,{onClick:Q,className:"gap-2",children:[t("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"opacity-70 flex-shrink-0",children:[e("polyline",{points:"17 1 21 5 17 9"}),e("path",{d:"M3 11V9a4 4 0 0 1 4-4h14"}),e("polyline",{points:"7 23 3 19 7 15"}),e("path",{d:"M21 13v2a4 4 0 0 1-4 4H3"})]}),e("span",{children:j.isLoopEnabled?"Disable Loop":"Enable Loop"})]})]})]})},ut=function(t){return e(ct,V({},t))},dt=function(t){var n=t.index,r=Z(o({top:0,left:0}),2),a=r[0],i=r[1],s=Z(o(40),2),c=s[0],u=s[1],d=Z(o(0),2),f=d[0],v=d[1],m=function(){return{top:80*Math.random()+10,left:80*Math.random()+10}},h=function(){return 60*Math.random()+30};l(function(){i(m()),u(h());var e=function(){v(.15),setTimeout(function(){v(0),setTimeout(function(){i(m()),u(h()),setTimeout(function(){e()},200)},1500)},4e3+3e3*Math.random())},t=setTimeout(e,500*n);return function(){clearTimeout(t)}},[n]);var p=["rgba(122, 162, 247, 0.2)","rgba(187, 154, 247, 0.2)","rgba(158, 206, 106, 0.2)","rgba(115, 218, 202, 0.2)","rgba(125, 207, 255, 0.2)","rgba(247, 118, 142, 0.2)","rgba(224, 175, 104, 0.2)","rgba(42, 195, 222, 0.2)"];return e("div",{style:{position:"absolute",top:"".concat(a.top,"%"),left:"".concat(a.left,"%"),width:"".concat(c,"px"),height:"".concat(c,"px"),borderRadius:"50%",background:p[n%p.length],opacity:f,transition:"opacity 1s ease-in-out",pointerEvents:"none",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"}})},ft=function(n){var r=n.containerRef,a=n.scale,i=void 0===a?.2:a,s=n.onHitmarker,c=Z(o(100),2),u=c[0],d=c[1],f=Z(o({x:0,y:0}),2),v=f[0],m=f[1],h=Z(o(!1),2),p=h[0],C=h[1];l(function(){if(r.current){var e=r.current.clientWidth,t=r.current.clientHeight,n=Math.min(e,t);d(n*i)}},[r,i]);var g=function(e){if(r.current){var t=r.current.getBoundingClientRect(),n=t.left+t.width/2,a=t.top+t.height/2,o=e.clientX-n,i=e.clientY-a,l=Math.sqrt(o*o+i*i),s=1.5*u;if(l<s&&l>0){var c=(s-l)/s*50;m({x:-o/l*c,y:-i/l*c}),C(!0)}else m({x:0,y:0}),C(!1)}},b=function(){m({x:0,y:0}),C(!1)};return l(function(){if(r.current){var e=r.current;return e.addEventListener("mousemove",g),e.addEventListener("mouseleave",b),function(){e.removeEventListener("mousemove",g),e.removeEventListener("mouseleave",b)}}},[u,r]),t("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%) translate(".concat(v.x,"px, ").concat(v.y,"px)"),display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,transition:"transform 0.3s ease-out",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},children:[e("div",{style:{position:"absolute",width:"".concat(1.4*u,"px"),height:"".concat(1.4*u,"px"),borderRadius:"50%",background:"rgba(122, 162, 247, 0.15)",animation:p?"logoPulse 1s ease-in-out infinite":"logoPulse 3s ease-in-out infinite",transform:p?"scale(1.2)":"scale(1)",transition:"transform 0.3s ease-out",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",pointerEvents:"none"}}),e("img",{src:re,alt:"FrameWorks Logo",onClick:function(e){e.stopPropagation(),s&&s({clientX:e.clientX,clientY:e.clientY})},style:{width:"".concat(u,"px"),height:"".concat(u,"px"),position:"relative",zIndex:1,filter:p?"drop-shadow(0 6px 12px rgba(36, 40, 59, 0.4)) brightness(1.1)":"drop-shadow(0 4px 8px rgba(36, 40, 59, 0.3))",transform:p?"scale(1.1)":"scale(1)",transition:"all 0.3s ease-out",cursor:p?"pointer":"default",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",WebkitUserDrag:"none",WebkitTouchCallout:"none"}})]})},vt=function(n){var r=n.message,a=void 0===r?"Waiting for source...":r,s=i(null),c=Z(o([]),2),u=c[0],d=c[1],f=function(){try{for(var e=new(window.AudioContext||window.webkitAudioContext),t=e.createOscillator(),n=e.createOscillator(),r=e.createBuffer(1,.1*e.sampleRate,e.sampleRate),a=e.createBufferSource(),o=r.getChannelData(0),i=0;i<o.length;i++)o[i]=2*Math.random()-1;a.buffer=r;var l=e.createGain(),s=e.createGain(),c=e.createGain(),u=e.createGain();t.connect(l),n.connect(s),a.connect(c),l.connect(u),s.connect(u),c.connect(u),u.connect(e.destination),t.frequency.setValueAtTime(1800,e.currentTime),t.frequency.exponentialRampToValueAtTime(900,e.currentTime+.08),n.frequency.setValueAtTime(3600,e.currentTime),n.frequency.exponentialRampToValueAtTime(1800,e.currentTime+.04),t.type="triangle",n.type="sine",l.gain.setValueAtTime(0,e.currentTime),l.gain.linearRampToValueAtTime(.4,e.currentTime+.002),l.gain.exponentialRampToValueAtTime(.001,e.currentTime+.12),s.gain.setValueAtTime(0,e.currentTime),s.gain.linearRampToValueAtTime(.3,e.currentTime+.001),s.gain.exponentialRampToValueAtTime(.001,e.currentTime+.06),c.gain.setValueAtTime(0,e.currentTime),c.gain.linearRampToValueAtTime(.2,e.currentTime+.001),c.gain.exponentialRampToValueAtTime(.001,e.currentTime+.01),u.gain.setValueAtTime(.5,e.currentTime);var d=e.currentTime,f=d+.15;t.start(d),n.start(d),a.start(d),t.stop(f),n.stop(f),a.stop(d+.02)}catch(e){console.log("Audio context not available")}};return l(function(){var e="loading-screen-animations";if(!document.getElementById(e)){var t=document.createElement("style");t.id=e,t.textContent="\n @keyframes fadeInOut {\n 0%, 100% {\n opacity: 0.6;\n }\n 50% {\n opacity: 0.9;\n }\n }\n\n @keyframes logoPulse {\n 0%, 100% {\n opacity: 0.15;\n transform: scale(1);\n }\n 50% {\n opacity: 0.25;\n transform: scale(1.05);\n }\n }\n\n @keyframes shimmer {\n 0% {\n background-position: -200px 0;\n }\n 100% {\n background-position: calc(200px + 100%) 0;\n }\n }\n\n @keyframes floatUp {\n 0% {\n transform: translateY(100vh) rotate(0deg);\n opacity: 0;\n }\n 10% {\n opacity: 0.6;\n }\n 90% {\n opacity: 0.6;\n }\n 100% {\n transform: translateY(-100px) rotate(360deg);\n opacity: 0;\n }\n }\n\n @keyframes gradientShift {\n 0%, 100% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n }\n\n @keyframes hitmarkerFade {\n 0% {\n opacity: 1;\n transform: scale(0.5);\n }\n 20% {\n opacity: 1;\n transform: scale(1.2);\n }\n 100% {\n opacity: 0;\n transform: scale(1);\n }\n }\n\n @keyframes hitmarkerFade45 {\n 0% {\n opacity: 1;\n transform: translate(-50%, -50%) rotate(45deg) scale(0.5);\n }\n 20% {\n opacity: 1;\n transform: translate(-50%, -50%) rotate(45deg) scale(1.2);\n }\n 100% {\n opacity: 0;\n transform: translate(-50%, -50%) rotate(45deg) scale(1);\n }\n }\n\n @keyframes hitmarkerFadeNeg45 {\n 0% {\n opacity: 1;\n transform: translate(-50%, -50%) rotate(-45deg) scale(0.5);\n }\n 20% {\n opacity: 1;\n transform: translate(-50%, -50%) rotate(-45deg) scale(1.2);\n }\n 100% {\n opacity: 0;\n transform: translate(-50%, -50%) rotate(-45deg) scale(1);\n }\n }\n ",document.head.appendChild(t)}},[]),t("div",{ref:s,className:"fw-player-root",style:{position:"relative",width:"100%",height:"100%",minHeight:"300px",background:"\n linear-gradient(135deg,\n hsl(var(--tn-bg-dark, 235 21% 11%)) 0%,\n hsl(var(--tn-bg, 233 23% 17%)) 25%,\n hsl(var(--tn-bg-dark, 235 21% 11%)) 50%,\n hsl(var(--tn-bg, 233 23% 17%)) 75%,\n hsl(var(--tn-bg-dark, 235 21% 11%)) 100%\n )\n ",backgroundSize:"400% 400%",animation:"gradientShift 16s ease-in-out infinite",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"0",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},children:[u.map(function(n){return t("div",{style:{position:"absolute",left:"".concat(n.x,"px"),top:"".concat(n.y,"px"),transform:"translate(-50%, -50%)",pointerEvents:"none",zIndex:100,width:"40px",height:"40px"},children:[e("div",{style:{position:"absolute",top:"25%",left:"25%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(45deg)",animation:"hitmarkerFade45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}}),e("div",{style:{position:"absolute",top:"25%",left:"75%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(-45deg)",animation:"hitmarkerFadeNeg45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}}),e("div",{style:{position:"absolute",top:"75%",left:"25%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(-45deg)",animation:"hitmarkerFadeNeg45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}}),e("div",{style:{position:"absolute",top:"75%",left:"75%",width:"12px",height:"3px",backgroundColor:"#ffffff",transform:"translate(-50%, -50%) rotate(45deg)",animation:"hitmarkerFade45 0.6s ease-out forwards",boxShadow:"0 0 8px rgba(255, 255, 255, 0.8)",borderRadius:"1px"}})]},n.id)}),X(Array(12)).map(function(t,n){return e("div",{style:{position:"absolute",left:"".concat(100*Math.random(),"%"),width:"".concat(4*Math.random()+2,"px"),height:"".concat(4*Math.random()+2,"px"),borderRadius:"50%",background:["#7aa2f7","#bb9af7","#9ece6a","#73daca","#7dcfff","#f7768e","#e0af68","#2ac3de"][n%8],opacity:0,animation:"floatUp ".concat(8+4*Math.random(),"s linear infinite"),animationDelay:"".concat(8*Math.random(),"s"),pointerEvents:"none",userSelect:"none"}},"particle-".concat(n))}),X(Array(8)).map(function(t,n){return e(dt,{index:n},n)}),e(ft,{containerRef:s,onHitmarker:function(e){if(s.current){var t=s.current.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,a={id:Date.now()+Math.random(),x:n,y:r};d(function(e){return[].concat(X(e),[a])}),function(){try{var e=new Audio("data:audio/mpeg;base64,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");e.volume=.3,e.play().catch(function(){f()})}catch(e){f()}}(),setTimeout(function(){d(function(e){return e.filter(function(e){return e.id!==a.id})})},600)}}}),e(ne,{parentRef:s,scale:.08}),e("div",{style:{position:"absolute",bottom:"20%",left:"50%",transform:"translateX(-50%)",color:"#a9b1d6",fontSize:"16px",fontWeight:"500",textAlign:"center",animation:"fadeInOut 2s ease-in-out infinite",textShadow:"0 2px 4px rgba(36, 40, 59, 0.5)",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",pointerEvents:"none"},children:a}),e("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"\n radial-gradient(circle at 20% 80%, rgba(122, 162, 247, 0.03) 0%, transparent 50%),\n radial-gradient(circle at 80% 20%, rgba(187, 154, 247, 0.03) 0%, transparent 50%),\n radial-gradient(circle at 40% 40%, rgba(158, 206, 106, 0.02) 0%, transparent 50%)\n ",pointerEvents:"none",userSelect:"none"}})]})},mt=["className","variant","size","asChild"],ht=F("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 ring-offset-background",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",outline:"border border-border bg-transparent hover:bg-accent hover:text-accent-foreground",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",subtle:"bg-muted text-muted-foreground hover:bg-muted/80",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),pt=r.forwardRef(function(t,n){var r=t.className,a=t.variant,o=t.size,i=t.asChild,l=void 0!==i&&i,s=Q(t,mt);return e(l?B:"button",V({className:v(ht({variant:a,size:o,className:r})),ref:n},s))});pt.displayName="Button";var Ct=function(r){var a=r.thumbnailUrl,o=r.onPlay,i=r.message,l=r.showUnmuteMessage,s=void 0!==l&&l,c=r.style,u=r.className,d=function(e){e.stopPropagation(),null==o||o()};return t("div",{role:"button",tabIndex:0,onClick:d,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),d(e))},style:c,className:v("fw-player-thumbnail relative flex h-full min-h-[280px] w-full cursor-pointer items-center justify-center overflow-hidden rounded-xl bg-slate-950 text-foreground outline-none transition focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background",u),children:[a&&e("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:"url(".concat(a,")")}}),e("div",{className:v("absolute inset-0 bg-slate-950/70",!a&&"bg-gradient-to-br from-slate-900 via-slate-950 to-slate-900")}),e("div",{className:"relative z-10 flex max-w-[320px] flex-col items-center gap-4 px-6 text-center text-sm sm:gap-6",children:s?t("div",{className:"w-full rounded-lg border border-white/15 bg-black/80 p-4 text-sm text-white shadow-lg backdrop-blur",children:[t("div",{className:"mb-1 flex items-center justify-center gap-2 text-base font-semibold text-primary",children:[e("span",{"aria-hidden":"true",children:"🔇"})," Click to unmute"]}),e("p",{className:"text-xs text-white/80",children:"Stream is playing muted — tap to enable sound."})]}):t(n,{children:[e(pt,{type:"button",size:"icon",variant:"secondary",className:"h-20 w-20 rounded-full bg-primary/90 text-primary-foreground shadow-lg shadow-primary/40 transition hover:bg-primary focus-visible:bg-primary","aria-label":"Play stream",children:e("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"ml-0.5 h-8 w-8","aria-hidden":"true",children:e("path",{d:"M8 5v14l11-7z"})})}),t("div",{className:"w-full rounded-lg border border-white/10 bg-black/70 p-5 text-white shadow-inner backdrop-blur",children:[e("p",{className:"text-base font-semibold text-primary",children:null!=i?i:"Click to play"}),e("p",{className:"mt-1 text-xs text-white/70",children:i?"Start streaming instantly":"Jump into the live feed"})]})]})})]})};function gt(n){var r="w-5 h-5";switch(n.status){case"ONLINE":return e("svg",{className:"".concat(r," fw-status-online"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})});case"OFFLINE":return e("svg",{className:"".concat(r," fw-status-offline"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18.364 5.636a9 9 0 010 12.728m0 0l-2.829-2.829m2.829 2.829L21 21M15.536 8.464a5 5 0 010 7.072m0 0l-2.829-2.829m-4.243 2.829a4.978 4.978 0 01-1.414-2.83m-1.414 5.658a9 9 0 01-2.167-9.238m7.824 2.167a1 1 0 111.414 1.414m-1.414-1.414L3 3m8.293 8.293l1.414 1.414"})});case"INITIALIZING":case"BOOTING":case"WAITING_FOR_DATA":return t("svg",{className:"".concat(r," fw-status-warning animate-spin"),fill:"none",viewBox:"0 0 24 24",children:[e("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]});case"SHUTTING_DOWN":return e("svg",{className:"".concat(r," fw-status-warning"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})});default:return e("svg",{className:"".concat(r," fw-status-offline"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}}function bt(e){switch(e){case"ONLINE":return"ONLINE";case"OFFLINE":return"OFFLINE";case"INITIALIZING":return"INITIALIZING";case"BOOTING":return"STARTING";case"WAITING_FOR_DATA":return"WAITING";case"SHUTTING_DOWN":return"ENDING";case"ERROR":return"ERROR";case"INVALID":return"INVALID";default:return"STATUS"}}var wt=function(n){var r=n.status,a=n.message,o=n.percentage,i=n.onRetry,l=n.visible,s=void 0===l||l,c=n.className;if(!s||"ONLINE"===r)return null;var u="ERROR"===r||"INVALID"===r||"OFFLINE"===r,d="INITIALIZING"===r&&void 0!==o;return e("div",{className:"absolute inset-0 z-20 flex items-center justify-center ".concat(void 0===c?"":c),style:{backgroundColor:"hsl(var(--tn-bg-dark) / 0.8)",backdropFilter:"blur(4px)"},role:"status","aria-live":"polite",children:t("div",{className:"fw-slab w-[280px] max-w-[90%]",style:{backgroundColor:"hsl(var(--tn-bg) / 0.95)"},children:[t("div",{className:"fw-slab-header flex items-center gap-2",children:[e(gt,{status:r}),e("span",{children:bt(r)})]}),t("div",{className:"fw-slab-body",children:[e("p",{className:"text-sm",style:{color:"hsl(var(--tn-fg))"},children:a}),d&&t("div",{className:"mt-3",children:[e("div",{className:"h-1.5 w-full overflow-hidden",style:{backgroundColor:"hsl(var(--tn-bg-visual))"},children:e("div",{className:"h-full transition-all duration-300",style:{width:"".concat(Math.min(100,o),"%"),backgroundColor:"hsl(var(--tn-yellow))"}})}),t("p",{className:"mt-1.5 text-xs font-mono",style:{color:"hsl(var(--tn-fg-dark))"},children:[Math.round(o),"%"]})]}),"OFFLINE"===r&&e("p",{className:"mt-2 text-xs",style:{color:"hsl(var(--tn-fg-dark))"},children:"The stream will start when the broadcaster goes live"}),("BOOTING"===r||"WAITING_FOR_DATA"===r)&&e("p",{className:"mt-2 text-xs",style:{color:"hsl(var(--tn-fg-dark))"},children:"Please wait while the stream prepares..."}),!u&&t("div",{className:"mt-3 flex items-center gap-2 text-xs",style:{color:"hsl(var(--tn-fg-dark))"},children:[e("span",{className:"h-1.5 w-1.5 animate-pulse",style:{backgroundColor:"hsl(var(--tn-cyan))"}}),e("span",{children:"Checking stream status..."})]})]}),u&&i&&e("div",{className:"fw-slab-actions",children:e("button",{type:"button",onClick:i,className:"fw-btn-flush py-2.5 text-xs font-medium uppercase tracking-wide",style:{color:"hsl(var(--tn-blue))"},"aria-label":"Retry connection",children:"Retry Connection"})})]})})},yt=function(){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(t=function(e,t,n){return t=j(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,W()?Reflect.construct(t,n||[],j(e).constructor):t.apply(e,n))}(this,n,[e])).handleRetry=function(){var e,n;t.setState({hasError:!1,error:null}),null===(e=(n=t.props).onRetry)||void 0===e||e.call(n)},t.state={hasError:!1,error:null},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&H(e,t)}(n,f),r=n,o=[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0,error:e}}}],(a=[{key:"componentDidCatch",value:function(e,t){var n,r;console.error("[PlayerErrorBoundary] Caught error:",e,t),null===(n=(r=this.props).onError)||void 0===n||n.call(r,e,t)}},{key:"render",value:function(){var n;return this.state.hasError?this.props.fallback?this.props.fallback:t("div",{className:"fw-player-error flex min-h-[280px] flex-col items-center justify-center gap-4 rounded-xl bg-slate-950 p-6 text-center text-white",children:[e("div",{className:"text-lg font-semibold text-red-400",children:"Playback Error"}),e("p",{className:"max-w-sm text-sm text-slate-400",children:(null===(n=this.state.error)||void 0===n?void 0:n.message)||"An unexpected error occurred while loading the player."}),e(pt,{type:"button",variant:"secondary",onClick:this.handleRetry,className:"mt-2",children:"Try Again"})]}):this.props.children}}])&&O(r.prototype,a),o&&O(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,a,o}(),At=["className","variant"],Nt=F("inline-flex items-center rounded-full border border-transparent px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 ring-offset-background",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",outline:"border-border text-foreground"}},defaultVariants:{variant:"default"}});function kt(t){var n=t.className,r=t.variant,a=Q(t,At);return e("div",V({className:v(Nt({variant:r}),n)},a))}var xt={status:"OFFLINE",isOnline:!1,message:"Connecting...",lastUpdate:0};function St(e){var t=e.mistBaseUrl,n=e.streamName,r=e.pollInterval,a=void 0===r?3e3:r,c=e.enabled,u=void 0===c||c,d=e.useWebSocket,f=void 0===d||d,v=e.debug,m=void 0!==v&&v,h=Z(o(xt),2),p=h[0],C=h[1],g=Z(o(!1),2),b=g[0],w=g[1],y=i(null),A=i(null),N=i(null),k=i(!0),x=s(function(e){var t;if(k.current)if(e.error){var n=(t=e.error.toLowerCase()).includes("offline")?"OFFLINE":t.includes("initializing")?"INITIALIZING":t.includes("booting")?"BOOTING":t.includes("waiting for data")?"WAITING_FOR_DATA":t.includes("shutting down")?"SHUTTING_DOWN":t.includes("invalid")?"INVALID":"ERROR",r=e.on_error||function(e,t){switch(e){case"ONLINE":return"Stream is online";case"OFFLINE":return"Stream is offline";case"INITIALIZING":return void 0!==t?"Initializing... ".concat(Math.round(10*t)/10,"%"):"Stream is initializing";case"BOOTING":return"Stream is starting up";case"WAITING_FOR_DATA":return"Waiting for stream data";case"SHUTTING_DOWN":return"Stream is shutting down";case"INVALID":return"Stream status is invalid";default:return"Stream error"}}(n,e.perc);C(function(t){return{status:n,isOnline:!1,message:r,percentage:e.perc,lastUpdate:Date.now(),error:e.error,streamInfo:t.streamInfo}})}else C(function(t){var n,r,a,o,i=V(V(V({},t.streamInfo),e),{},{source:e.source||(null===(n=t.streamInfo)||void 0===n?void 0:n.source),meta:V(V(V({},null===(r=t.streamInfo)||void 0===r?void 0:r.meta),e.meta),{},{tracks:(null===(a=e.meta)||void 0===a?void 0:a.tracks)||(null===(o=t.streamInfo)||void 0===o||null===(o=o.meta)||void 0===o?void 0:o.tracks)})});return{status:"ONLINE",isOnline:!0,message:"Stream is online",lastUpdate:Date.now(),streamInfo:i}})},[]),S=s(P(Y().m(function e(){var r,o,i,l,s,c,d;return Y().w(function(e){for(;;)switch(e.p=e.n){case 0:if(k.current&&u){e.n=1;break}return e.a(2);case 1:return e.p=1,r="".concat(t.replace(/\/$/,""),"/json_").concat(encodeURIComponent(n),".js"),o="".concat(r,"?metaeverywhere=1&inclzero=1"),e.n=2,fetch(o,{method:"GET",headers:{Accept:"application/json"}});case 2:if((i=e.v).ok){e.n=3;break}throw new Error("HTTP ".concat(i.status));case 3:return e.n=4,i.text();case 4:l=e.v,(s=l.match(/^[^(]+\(([\s\S]*)\);?$/))&&(l=s[1]),c=JSON.parse(l),x(c),e.n=7;break;case 5:if(e.p=5,d=e.v,k.current){e.n=6;break}return e.a(2);case 6:C(function(e){return V(V({},e),{},{status:"ERROR",isOnline:!1,message:d instanceof Error?d.message:"Connection failed",lastUpdate:Date.now(),error:d instanceof Error?d.message:"Unknown error"})});case 7:k.current&&u&&!f&&(A.current=setTimeout(S,a));case 8:return e.a(2)}},e,null,[[1,5]])})),[t,n,u,f,a,x]),L=s(function(){if(k.current&&u&&f){N.current&&(clearTimeout(N.current),N.current=null),y.current&&(y.current.close(),y.current=null);try{var e=t.replace(/^http:/,"ws:").replace(/^https:/,"wss:").replace(/\/$/,""),r="".concat(e,"/json_").concat(encodeURIComponent(n),".js?metaeverywhere=1&inclzero=1"),a=new WebSocket(r);y.current=a,N.current=setTimeout(function(){a.readyState<=WebSocket.OPEN&&(m&&console.debug("[useStreamState] WebSocket timeout (5s), falling back to HTTP polling"),a.close(),S())},5e3),a.onopen=function(){m&&console.debug("[useStreamState] WebSocket connected"),w(!0)},a.onmessage=function(e){N.current&&(clearTimeout(N.current),N.current=null);try{var t=JSON.parse(e.data);x(t)}catch(e){console.warn("[useStreamState] Failed to parse WebSocket message:",e)}},a.onerror=function(e){console.warn("[useStreamState] WebSocket error, falling back to HTTP polling"),N.current&&(clearTimeout(N.current),N.current=null),a.close()},a.onclose=function(){y.current=null,w(!1),k.current&&u&&(m&&console.debug("[useStreamState] WebSocket closed, starting HTTP polling"),S())}}catch(e){console.warn("[useStreamState] WebSocket connection failed:",e),S()}}},[t,n,u,f,m,x,S]),E=s(function(){var e;f&&(null===(e=y.current)||void 0===e?void 0:e.readyState)===WebSocket.OPEN||S()},[f,S]);return l(function(){if(k.current=!0,u&&t&&n){C(V(V({},xt),{},{message:"Connecting...",lastUpdate:Date.now()}));var e=function(){var e=P(Y().m(function e(){return Y().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,S();case 1:f&&k.current&&L();case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return e(),function(){k.current=!1,m&&console.debug("[useStreamState] cleanup starting, mountedRef set to false"),N.current&&(clearTimeout(N.current),N.current=null),y.current&&(y.current.onclose=null,y.current.onerror=null,y.current.onmessage=null,y.current.onopen=null,y.current.close(),y.current=null),A.current&&(clearTimeout(A.current),A.current=null)}}C(xt)},[u,t,n,f,m,L,S]),V(V({},p),{},{refetch:E,socketRef:y,socketReady:b})}function Lt(e){var t=e.videoElement,n=e.enabled,r=void 0===n||n,a=e.sampleInterval,c=void 0===a?500:a,u=e.thresholds,d=e.onQualityDegraded,f=Z(o(null),2),v=f[0],m=f[1],h=Z(o(!1),2),p=h[0],C=h[1],g=i(null);return l(function(){return g.current=new k({sampleInterval:c,thresholds:u,onQualityDegraded:d,onSample:m}),function(){var e;null===(e=g.current)||void 0===e||e.stop(),g.current=null}},[c,u,d]),l(function(){var e;return r&&t&&g.current?(g.current.start(t),C(!0),function(){var e;null===(e=g.current)||void 0===e||e.stop(),C(!1)}):(null===(e=g.current)||void 0===e||e.stop(),void C(!1))},[t,r]),{quality:v,isMonitoring:p,getCurrentQuality:s(function(){var e,t;return null!==(e=null===(t=g.current)||void 0===t?void 0:t.getCurrentQuality())&&void 0!==e?e:null},[]),getAverageQuality:s(function(){var e,t;return null!==(e=null===(t=g.current)||void 0===t?void 0:t.getAverageQuality())&&void 0!==e?e:null},[]),getHistory:s(function(){var e,t;return null!==(e=null===(t=g.current)||void 0===t?void 0:t.getHistory())&&void 0!==e?e:[]},[]),resetStallCounters:s(function(){var e;null===(e=g.current)||void 0===e||e.resetStallCounters()},[]),getTotalStallMs:s(function(){var e,t;return null!==(e=null===(t=g.current)||void 0===t?void 0:t.getTotalStallMs())&&void 0!==e?e:0},[])}}function Et(e,t){return Mt.apply(this,arguments)}function Mt(){return Mt=P(Y().m(function e(t,n){var r,a,o,i,l,s,c=arguments;return Y().w(function(e){for(;;)switch(e.n){case 0:r=c.length>2&&void 0!==c[2]?c[2]:3,a=c.length>3&&void 0!==c[3]?c[3]:500,o=null,i=Y().m(function e(){var i,l,c,u;return Y().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,fetch(t,n);case 1:return i=e.v,e.a(2,{v:i});case 2:if(e.p=2,u=e.v,o=u instanceof Error?u:new Error("Fetch failed"),null===(l=n.signal)||void 0===l||!l.aborted){e.n=3;break}throw o;case 3:if(!(s<r-1)){e.n=4;break}return c=a*Math.pow(2,s),console.warn("[useViewerEndpoints] Retry ".concat(s+1,"/").concat(r-1," after ").concat(c,"ms")),e.n=4,new Promise(function(e){return setTimeout(e,c)});case 4:return e.a(2)}},e,null,[[0,2]])}),s=0;case 1:if(!(s<r)){e.n=4;break}return e.d(G(i()),2);case 2:if(!(l=e.v)){e.n=3;break}return e.a(2,l.v);case 3:s++,e.n=1;break;case 4:throw null!=o?o:new Error("Gateway unreachable after retries");case 5:return e.a(2)}},e)})),Mt.apply(this,arguments)}function Tt(e){var t=e.gatewayUrl;e.contentType;var n=e.contentId,r=e.authToken,a=Z(o(null),2),s=a[0],c=a[1],u=Z(o("idle"),2),d=u[0],f=u[1],v=Z(o(null),2),m=v[0],h=v[1],p=i(null);return l(function(){var e;if(t&&n){f("loading"),h(null),null===(e=p.current)||void 0===e||e.abort();var a=new AbortController;return p.current=a,P(Y().m(function e(){var o,i,l,s,u,d,v,m,p,C,g;return Y().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,s=t.replace(/\/$/,""),e.n=1,Et(s,{method:"POST",headers:V({"Content-Type":"application/json"},r?{Authorization:"Bearer ".concat(r)}:{}),body:JSON.stringify({query:"\n query ResolveViewer($contentId: String!) {\n resolveViewerEndpoint(contentId: $contentId) {\n primary { nodeId baseUrl protocol url geoDistance loadScore outputs }\n fallbacks { nodeId baseUrl protocol url geoDistance loadScore outputs }\n metadata { contentType contentId title description durationSeconds status isLive viewers recordingSizeBytes clipSource createdAt }\n }\n }\n ",variables:{contentId:n}}),signal:a.signal});case 1:if((u=e.v).ok){e.n=2;break}throw new Error("Gateway GQL error ".concat(u.status));case 2:return e.n=3,u.json();case 3:if(d=e.v,null===(o=d.errors)||void 0===o||!o.length){e.n=4;break}throw new Error((null===(i=d.errors[0])||void 0===i?void 0:i.message)||"GraphQL error");case 4:if(v=null===(l=d.data)||void 0===l?void 0:l.resolveViewerEndpoint,m=null==v?void 0:v.primary,p=Array.isArray(null==v?void 0:v.fallbacks)?v.fallbacks:[],m){e.n=5;break}throw new Error("No endpoints");case 5:if(m.outputs&&"string"==typeof m.outputs)try{m.outputs=JSON.parse(m.outputs)}catch(e){}p&&p.forEach(function(e){if(e.outputs&&"string"==typeof e.outputs)try{e.outputs=JSON.parse(e.outputs)}catch(e){}}),c({primary:m,fallbacks:p,metadata:null==v?void 0:v.metadata}),f("ready"),e.n=8;break;case 6:if(e.p=6,g=e.v,!a.signal.aborted){e.n=7;break}return e.a(2);case 7:C=g instanceof Error?g.message:"Unknown gateway error",console.error("[useViewerEndpoints] Gateway resolution failed:",C),h(C),f("error");case 8:return e.a(2)}},e,null,[[0,6]])}))(),function(){return a.abort()}}},[t,n,r]),{endpoints:s,status:d,error:m}}function It(e){var t=e.mistBaseUrl,n=e.streamName,r=e.subscriptions,a=e.enabled,c=void 0===a||a,u=Z(o(!1),2),d=u[0],f=u[1],v=Z(o("disconnected"),2),m=v[0],h=v[1],p=Z(o([]),2),C=p[0],g=p[1],b=i(null);return l(function(){if(!c||!t||!n)return b.current&&(b.current.disconnect(),b.current=null),f(!1),void h("disconnected");b.current=new S({mistBaseUrl:t,streamName:n,subscriptions:r,debug:!1});var e=function(){if(b.current){var e=b.current.getState();h(e),f("connected"===e),g(b.current.getSubscribedTracks())}},a=setInterval(e,500);return b.current.connect(),e(),function(){clearInterval(a),b.current&&(b.current.disconnect(),b.current=null),f(!1),h("disconnected")}},[c,t,n,r]),{isConnected:d,connectionState:m,subscribedTracks:C,subscribe:s(function(e,t){if(!b.current)return function(){};var n=b.current.subscribe(e,t);return g(b.current.getSubscribedTracks()),function(){n(),b.current&&g(b.current.getSubscribedTracks())}},[]),unsubscribe:s(function(e,t){b.current&&(b.current.unsubscribe(e,t),g(b.current.getSubscribedTracks()))},[]),connect:s(function(){var e;null===(e=b.current)||void 0===e||e.connect()},[]),disconnect:s(function(){var e;null===(e=b.current)||void 0===e||e.disconnect()},[]),setPlaybackTime:s(function(e){var t;null===(t=b.current)||void 0===t||t.setPlaybackTime(e)},[]),onSeek:s(function(e){var t;null===(t=b.current)||void 0===t||t.onSeek(e)},[])}}function qt(e){var t,n,r=e.enabled,a=e.endpoint,o=e.interval,c=e.authToken,u=e.batchSize,d=e.videoElement,f=e.contentId,v=e.contentType,m=e.playerType,h=e.protocol,p=e.getQuality,C=i(null);l(function(){var e;return r&&a&&f?(C.current=new L({endpoint:a,authToken:c,interval:o,batchSize:u,contentId:f,contentType:v,playerType:m,protocol:h}),function(){var e;null===(e=C.current)||void 0===e||e.stop(),C.current=null}):(null===(e=C.current)||void 0===e||e.stop(),void(C.current=null))},[r,a,c,o,u,f,v,m,h]),l(function(){if(r&&d&&C.current)return C.current.start(d,p),function(){var e;null===(e=C.current)||void 0===e||e.stop()}},[r,d,p]);var g=s(function(e,t){var n;null===(n=C.current)||void 0===n||n.recordError(e,t)},[]),b=s(function(){var e,t;return null!==(e=null===(t=C.current)||void 0===t?void 0:t.getSessionId())&&void 0!==e?e:null},[]),w=s(function(){var e,t;return null!==(e=null===(t=C.current)||void 0===t?void 0:t.isActive())&&void 0!==e&&e},[]);return{sessionId:null!==(t=null===(n=C.current)||void 0===n?void 0:n.getSessionId())&&void 0!==t?t:null,recordError:g,getSessionId:b,isActive:w}}function Bt(e,t){var n=t.streamInfo,r=t.playbackMode,a=t.debug,i=Z(o(null),2),c=i[0],u=i[1],d=Z(o([]),2),f=d[0],v=d[1],m=Z(o(!1),2),h=m[0],p=m[1];return l(function(){var t=e.on("selection-changed",function(e){var t;a&&console.log("[usePlayerSelection] Selection changed:",null==e?void 0:e.player,null==e||null===(t=e.source)||void 0===t?void 0:t.type),u(e)}),n=e.on("combinations-updated",function(e){a&&console.log("[usePlayerSelection] Combinations updated:",e.length),v(e),p(!0)});return function(){t(),n()}},[e,a]),l(function(){if(!n)return u(null),v([]),void p(!1);e.getAllCombinations(n,r)},[e,n,r]),{selection:c,combinations:f,ready:h,refresh:s(function(){n&&(e.invalidateCache(),e.getAllCombinations(n,r))},[e,n,r])}}export{kt as Badge,pt as Button,Fe as ClosedCaptionsIcon,Qe as DevModePanel,qe as FullscreenExitIcon,Ie as FullscreenIcon,ze as FullscreenToggleIcon,ce as IdleScreen,Re as LiveIcon,vt as LoadingScreen,Se as PauseIcon,Be as PictureInPictureIcon,xe as PlayIcon,Pe as PlayPauseIcon,ut as Player,he as PlayerContext,Ue as PlayerControls,yt as PlayerErrorBoundary,pe as PlayerProvider,We as SeekToLiveIcon,De as SettingsIcon,Le as SkipBackIcon,Ee as SkipForwardIcon,we as Slider,je as StatsIcon,de as StatsPanel,wt as StreamStateOverlay,Ct as ThumbnailOverlay,ue as TitleOverlay,Oe as VolumeIcon,Te as VolumeOffIcon,Me as VolumeUpIcon,It as useMetaTrack,Lt as usePlaybackQuality,Ce as usePlayerContext,ge as usePlayerContextOptional,me as usePlayerController,Bt as usePlayerSelection,St as useStreamState,qt as useTelemetry,Tt as useViewerEndpoints};
|
|
1
|
+
export { default as Player } from './components/Player.js';
|
|
2
|
+
export { default as PlayerControls } from './components/PlayerControls.js';
|
|
3
|
+
export { default as LoadingScreen } from './components/LoadingScreen.js';
|
|
4
|
+
export { IdleScreen } from './components/IdleScreen.js';
|
|
5
|
+
export { default as ThumbnailOverlay } from './components/ThumbnailOverlay.js';
|
|
6
|
+
export { default as TitleOverlay } from './components/TitleOverlay.js';
|
|
7
|
+
export { StreamStateOverlay } from './components/StreamStateOverlay.js';
|
|
8
|
+
export { default as StatsPanel } from './components/StatsPanel.js';
|
|
9
|
+
export { default as DevModePanel } from './components/DevModePanel.js';
|
|
10
|
+
export { default as PlayerErrorBoundary } from './components/PlayerErrorBoundary.js';
|
|
11
|
+
export { ClosedCaptionsIcon, FullscreenExitIcon, FullscreenIcon, FullscreenToggleIcon, LiveIcon, PauseIcon, PictureInPictureIcon, PlayIcon, PlayPauseIcon, SeekToLiveIcon, SettingsIcon, SkipBackIcon, SkipForwardIcon, StatsIcon, VolumeIcon, VolumeOffIcon, VolumeUpIcon } from './components/Icons.js';
|
|
12
|
+
export { Button } from './ui/button.js';
|
|
13
|
+
export { Badge } from './ui/badge.js';
|
|
14
|
+
export { Slider } from './ui/slider.js';
|
|
15
|
+
export { PlayerContext, PlayerProvider, usePlayerContext, usePlayerContextOptional } from './context/PlayerContext.js';
|
|
16
|
+
export { useStreamState } from './hooks/useStreamState.js';
|
|
17
|
+
export { usePlaybackQuality } from './hooks/usePlaybackQuality.js';
|
|
18
|
+
export { useViewerEndpoints } from './hooks/useViewerEndpoints.js';
|
|
19
|
+
export { useMetaTrack } from './hooks/useMetaTrack.js';
|
|
20
|
+
export { useTelemetry } from './hooks/useTelemetry.js';
|
|
21
|
+
export { usePlayerSelection } from './hooks/usePlayerSelection.js';
|
|
22
|
+
export { usePlayerController } from './hooks/usePlayerController.js';
|
|
23
|
+
export { GatewayClient, PlayerController, PlayerManager, QualityMonitor, StreamStateClient, cn, globalPlayerManager } from '@livepeer-frameworks/player-core';
|
|
2
24
|
//# sourceMappingURL=index.js.map
|