{"version":3,"sources":["../src/index.ts","#style-inject:#style-inject","../src/index.css","../src/Player.tsx","../src/hooks/useShakePlayer.ts","../src/hooks/useQualityControl.ts","../src/hooks/useSkipControls.ts","../src/hooks/useMuxAnalytics.ts","../package.json","../src/hooks/useShakaUI.ts","../src/icons/SkipBackIcon.tsx","../src/icons/SkipForwardIcon.tsx","../src/icons/BigPlayIcon.tsx","../src/utils/renderIcon.ts","../src/hooks/useEventHandlers.ts","../src/hooks/useLiveBadge.ts","../src/hooks/usePosterFallback.ts","../src/hooks/useLiveIndicator.ts","../src/hooks/useKeyboardControls.ts","../src/components/Loading.tsx","../src/components/ErrorScreen.tsx","../src/components/Title.tsx","../src/components/LiveBadge.tsx","../src/styles.css","../src/Video.tsx","../src/api/video.ts","../src/api/event.ts","../src/api/creative-work.ts","../src/helper.ts","../src/messages/useMessages.tsx","../src/messages/en.json","../src/messages/es.json","../src/messages/ar.json","../src/messages/de.json","../src/messages/fr.json","../src/messages/it.json","../src/messages/ja.json","../src/messages/ko.json","../src/messages/pt.json","../src/messages/ru.json","../src/messages/zh.json","../src/messages/nl.json","../src/messages/fa.json","../src/Event.tsx","../src/CreativeWork.tsx","../src/QueryProvider.tsx"],"sourcesContent":["// Import Shaka Player default control styles to ensure proper styling without needing external CDN links\nimport 'shaka-player/dist/controls.css';\n// Import library specific (Tailwind-based) overrides after the base Shaka styles so that our custom\n// styles take precedence.\nimport './index.css';\nexport { Player } from './Player';\nexport { Video } from './Video';\nexport { Event } from './Event';\nexport { CreativeWork } from './CreativeWork';\nexport { QueryProvider, queryClient } from './QueryProvider';\nexport { SkipBackIcon, SkipForwardIcon, BigPlayIcon } from './icons';\nexport type { PlayerProps, PlayerEvents, IconSizes } from './types';\nexport type { VideoProps } from './Video';\nexport type { EventProps } from './Event';\nexport type { CreativeWorkProps } from './CreativeWork';\nexport type { VideoData, VideoListItem } from './api/video';\nexport type { EventData, EventsSortDirection } from './api/event';\nexport type { CreativeWorkData, CreativeWorksSortDirection } from './api/creative-work'; ","\n          export default function styleInject(css, { insertAt } = {}) {\n            if (!css || typeof document === 'undefined') return\n          \n            const head = document.head || document.getElementsByTagName('head')[0]\n            const style = document.createElement('style')\n            style.type = 'text/css'\n          \n            if (insertAt === 'top') {\n              if (head.firstChild) {\n                head.insertBefore(style, head.firstChild)\n              } else {\n                head.appendChild(style)\n              }\n            } else {\n              head.appendChild(style)\n            }\n          \n            if (style.styleSheet) {\n              style.styleSheet.cssText = css\n            } else {\n              style.appendChild(document.createTextNode(css))\n            }\n          }\n          ","import styleInject from '#style-inject';styleInject(\"/*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */\\n@layer properties;\\n@layer theme, base, components, utilities;\\n@layer theme {\\n  :root,\\n  :host {\\n    --font-sans:\\n      ui-sans-serif,\\n      system-ui,\\n      sans-serif,\\n      \\\"Apple Color Emoji\\\",\\n      \\\"Segoe UI Emoji\\\",\\n      \\\"Segoe UI Symbol\\\",\\n      \\\"Noto Color Emoji\\\";\\n    --font-mono:\\n      ui-monospace,\\n      SFMono-Regular,\\n      Menlo,\\n      Monaco,\\n      Consolas,\\n      \\\"Liberation Mono\\\",\\n      \\\"Courier New\\\",\\n      monospace;\\n    --color-red-600: oklch(57.7% 0.245 27.325);\\n    --color-black: #000;\\n    --color-white: #fff;\\n    --spacing: 0.25rem;\\n    --text-xs: 0.75rem;\\n    --text-xs--line-height: calc(1 / 0.75);\\n    --text-sm: 0.875rem;\\n    --text-sm--line-height: calc(1.25 / 0.875);\\n    --text-base: 1rem;\\n    --text-base--line-height: calc(1.5 / 1);\\n    --text-lg: 1.125rem;\\n    --text-lg--line-height: calc(1.75 / 1.125);\\n    --text-xl: 1.25rem;\\n    --text-xl--line-height: calc(1.75 / 1.25);\\n    --text-2xl: 1.5rem;\\n    --text-2xl--line-height: calc(2 / 1.5);\\n    --text-5xl: 3rem;\\n    --text-5xl--line-height: 1;\\n    --font-weight-medium: 500;\\n    --font-weight-semibold: 600;\\n    --font-weight-bold: 700;\\n    --tracking-wide: 0.025em;\\n    --tracking-widest: 0.1em;\\n    --radius-md: 0.375rem;\\n    --radius-2xl: 1rem;\\n    --animate-spin: spin 1s linear infinite;\\n    --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\\n    --aspect-video: 16 / 9;\\n    --default-transition-duration: 150ms;\\n    --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\\n    --default-font-family: var(--font-sans);\\n    --default-mono-font-family: var(--font-mono);\\n  }\\n}\\n@layer base {\\n  *,\\n  ::after,\\n  ::before,\\n  ::backdrop,\\n  ::file-selector-button {\\n    box-sizing: border-box;\\n    margin: 0;\\n    padding: 0;\\n    border: 0 solid;\\n  }\\n  html,\\n  :host {\\n    line-height: 1.5;\\n    -webkit-text-size-adjust: 100%;\\n    tab-size: 4;\\n    font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, \\\"Apple Color Emoji\\\", \\\"Segoe UI Emoji\\\", \\\"Segoe UI Symbol\\\", \\\"Noto Color Emoji\\\");\\n    font-feature-settings: var(--default-font-feature-settings, normal);\\n    font-variation-settings: var(--default-font-variation-settings, normal);\\n    -webkit-tap-highlight-color: transparent;\\n  }\\n  hr {\\n    height: 0;\\n    color: inherit;\\n    border-top-width: 1px;\\n  }\\n  abbr:where([title]) {\\n    -webkit-text-decoration: underline dotted;\\n    text-decoration: underline dotted;\\n  }\\n  h1,\\n  h2,\\n  h3,\\n  h4,\\n  h5,\\n  h6 {\\n    font-size: inherit;\\n    font-weight: inherit;\\n  }\\n  a {\\n    color: inherit;\\n    -webkit-text-decoration: inherit;\\n    text-decoration: inherit;\\n  }\\n  b,\\n  strong {\\n    font-weight: bolder;\\n  }\\n  code,\\n  kbd,\\n  samp,\\n  pre {\\n    font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\\"Liberation Mono\\\", \\\"Courier New\\\", monospace);\\n    font-feature-settings: var(--default-mono-font-feature-settings, normal);\\n    font-variation-settings: var(--default-mono-font-variation-settings, normal);\\n    font-size: 1em;\\n  }\\n  small {\\n    font-size: 80%;\\n  }\\n  sub,\\n  sup {\\n    font-size: 75%;\\n    line-height: 0;\\n    position: relative;\\n    vertical-align: baseline;\\n  }\\n  sub {\\n    bottom: -0.25em;\\n  }\\n  sup {\\n    top: -0.5em;\\n  }\\n  table {\\n    text-indent: 0;\\n    border-color: inherit;\\n    border-collapse: collapse;\\n  }\\n  :-moz-focusring {\\n    outline: auto;\\n  }\\n  progress {\\n    vertical-align: baseline;\\n  }\\n  summary {\\n    display: list-item;\\n  }\\n  ol,\\n  ul,\\n  menu {\\n    list-style: none;\\n  }\\n  img,\\n  svg,\\n  video,\\n  canvas,\\n  audio,\\n  iframe,\\n  embed,\\n  object {\\n    display: block;\\n    vertical-align: middle;\\n  }\\n  img,\\n  video {\\n    max-width: 100%;\\n    height: auto;\\n  }\\n  button,\\n  input,\\n  select,\\n  optgroup,\\n  textarea,\\n  ::file-selector-button {\\n    font: inherit;\\n    font-feature-settings: inherit;\\n    font-variation-settings: inherit;\\n    letter-spacing: inherit;\\n    color: inherit;\\n    border-radius: 0;\\n    background-color: transparent;\\n    opacity: 1;\\n  }\\n  :where(select:is([multiple], [size])) optgroup {\\n    font-weight: bolder;\\n  }\\n  :where(select:is([multiple], [size])) optgroup option {\\n    padding-inline-start: 20px;\\n  }\\n  ::file-selector-button {\\n    margin-inline-end: 4px;\\n  }\\n  ::placeholder {\\n    opacity: 1;\\n  }\\n  @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\\n    ::placeholder {\\n      color: currentcolor;\\n      @supports (color: color-mix(in lab, red, red)) {\\n        color: color-mix(in oklab, currentcolor 50%, transparent);\\n      }\\n    }\\n  }\\n  textarea {\\n    resize: vertical;\\n  }\\n  ::-webkit-search-decoration {\\n    -webkit-appearance: none;\\n  }\\n  ::-webkit-date-and-time-value {\\n    min-height: 1lh;\\n    text-align: inherit;\\n  }\\n  ::-webkit-datetime-edit {\\n    display: inline-flex;\\n  }\\n  ::-webkit-datetime-edit-fields-wrapper {\\n    padding: 0;\\n  }\\n  ::-webkit-datetime-edit,\\n  ::-webkit-datetime-edit-year-field,\\n  ::-webkit-datetime-edit-month-field,\\n  ::-webkit-datetime-edit-day-field,\\n  ::-webkit-datetime-edit-hour-field,\\n  ::-webkit-datetime-edit-minute-field,\\n  ::-webkit-datetime-edit-second-field,\\n  ::-webkit-datetime-edit-millisecond-field,\\n  ::-webkit-datetime-edit-meridiem-field {\\n    padding-block: 0;\\n  }\\n  :-moz-ui-invalid {\\n    box-shadow: none;\\n  }\\n  button,\\n  input:where([type=button], [type=reset], [type=submit]),\\n  ::file-selector-button {\\n    appearance: button;\\n  }\\n  ::-webkit-inner-spin-button,\\n  ::-webkit-outer-spin-button {\\n    height: auto;\\n  }\\n  [hidden]:where(:not([hidden=until-found])) {\\n    display: none !important;\\n  }\\n}\\n@layer utilities {\\n  .pointer-events-auto {\\n    pointer-events: auto;\\n  }\\n  .pointer-events-none {\\n    pointer-events: none;\\n  }\\n  .visible {\\n    visibility: visible;\\n  }\\n  .sr-only {\\n    position: absolute;\\n    width: 1px;\\n    height: 1px;\\n    padding: 0;\\n    margin: -1px;\\n    overflow: hidden;\\n    clip: rect(0, 0, 0, 0);\\n    white-space: nowrap;\\n    border-width: 0;\\n  }\\n  .absolute {\\n    position: absolute;\\n  }\\n  .fixed {\\n    position: fixed;\\n  }\\n  .relative {\\n    position: relative;\\n  }\\n  .static {\\n    position: static;\\n  }\\n  .inset-0 {\\n    inset: calc(var(--spacing) * 0);\\n  }\\n  .top-0 {\\n    top: calc(var(--spacing) * 0);\\n  }\\n  .top-4 {\\n    top: calc(var(--spacing) * 4);\\n  }\\n  .right-0 {\\n    right: calc(var(--spacing) * 0);\\n  }\\n  .right-4 {\\n    right: calc(var(--spacing) * 4);\\n  }\\n  .bottom-0 {\\n    bottom: calc(var(--spacing) * 0);\\n  }\\n  .bottom-4 {\\n    bottom: calc(var(--spacing) * 4);\\n  }\\n  .left-0 {\\n    left: calc(var(--spacing) * 0);\\n  }\\n  .left-4 {\\n    left: calc(var(--spacing) * 4);\\n  }\\n  .z-10 {\\n    z-index: 10;\\n  }\\n  .z-50 {\\n    z-index: 50;\\n  }\\n  .container {\\n    width: 100%;\\n    @media (width >= 40rem) {\\n      max-width: 40rem;\\n    }\\n    @media (width >= 48rem) {\\n      max-width: 48rem;\\n    }\\n    @media (width >= 64rem) {\\n      max-width: 64rem;\\n    }\\n    @media (width >= 80rem) {\\n      max-width: 80rem;\\n    }\\n    @media (width >= 96rem) {\\n      max-width: 96rem;\\n    }\\n  }\\n  .m-6 {\\n    margin: calc(var(--spacing) * 6);\\n  }\\n  .mt-1 {\\n    margin-top: calc(var(--spacing) * 1);\\n  }\\n  .mt-3 {\\n    margin-top: calc(var(--spacing) * 3);\\n  }\\n  .mb-2 {\\n    margin-bottom: calc(var(--spacing) * 2);\\n  }\\n  .mb-6 {\\n    margin-bottom: calc(var(--spacing) * 6);\\n  }\\n  .flex {\\n    display: flex;\\n  }\\n  .grid {\\n    display: grid;\\n  }\\n  .aspect-video {\\n    aspect-ratio: var(--aspect-video);\\n  }\\n  .h-2 {\\n    height: calc(var(--spacing) * 2);\\n  }\\n  .h-12 {\\n    height: calc(var(--spacing) * 12);\\n  }\\n  .h-24 {\\n    height: calc(var(--spacing) * 24);\\n  }\\n  .h-full {\\n    height: 100%;\\n  }\\n  .w-2 {\\n    width: calc(var(--spacing) * 2);\\n  }\\n  .w-12 {\\n    width: calc(var(--spacing) * 12);\\n  }\\n  .w-24 {\\n    width: calc(var(--spacing) * 24);\\n  }\\n  .w-full {\\n    width: 100%;\\n  }\\n  .animate-pulse {\\n    animation: var(--animate-pulse);\\n  }\\n  .animate-spin {\\n    animation: var(--animate-spin);\\n  }\\n  .auto-cols-max {\\n    grid-auto-columns: max-content;\\n  }\\n  .grid-flow-col {\\n    grid-auto-flow: column;\\n  }\\n  .flex-col {\\n    flex-direction: column;\\n  }\\n  .items-center {\\n    align-items: center;\\n  }\\n  .justify-center {\\n    justify-content: center;\\n  }\\n  .justify-stretch {\\n    justify-content: stretch;\\n  }\\n  .gap-1 {\\n    gap: calc(var(--spacing) * 1);\\n  }\\n  .gap-5 {\\n    gap: calc(var(--spacing) * 5);\\n  }\\n  .overflow-hidden {\\n    overflow: hidden;\\n  }\\n  .rounded-full {\\n    border-radius: calc(infinity * 1px);\\n  }\\n  .rounded-md {\\n    border-radius: var(--radius-md);\\n  }\\n  .bg-\\\\[\\\\#151515\\\\] {\\n    background-color: #151515;\\n  }\\n  .bg-black {\\n    background-color: var(--color-black);\\n  }\\n  .bg-red-600 {\\n    background-color: var(--color-red-600);\\n  }\\n  .bg-white {\\n    background-color: var(--color-white);\\n  }\\n  .bg-gradient-to-t {\\n    --tw-gradient-position: to top in oklab;\\n    background-image: linear-gradient(var(--tw-gradient-stops));\\n  }\\n  .from-black\\\\/70 {\\n    --tw-gradient-from: color-mix(in srgb, #000 70%, transparent);\\n    @supports (color: color-mix(in lab, red, red)) {\\n      --tw-gradient-from: color-mix(in oklab, var(--color-black) 70%, transparent);\\n    }\\n    --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));\\n  }\\n  .to-transparent {\\n    --tw-gradient-to: transparent;\\n    --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));\\n  }\\n  .bg-cover {\\n    background-size: cover;\\n  }\\n  .bg-center {\\n    background-position: center;\\n  }\\n  .bg-no-repeat {\\n    background-repeat: no-repeat;\\n  }\\n  .p-2 {\\n    padding: calc(var(--spacing) * 2);\\n  }\\n  .p-4 {\\n    padding: calc(var(--spacing) * 4);\\n  }\\n  .px-2 {\\n    padding-inline: calc(var(--spacing) * 2);\\n  }\\n  .px-4 {\\n    padding-inline: calc(var(--spacing) * 4);\\n  }\\n  .py-1 {\\n    padding-block: calc(var(--spacing) * 1);\\n  }\\n  .text-center {\\n    text-align: center;\\n  }\\n  .text-left {\\n    text-align: left;\\n  }\\n  .font-mono {\\n    font-family: var(--font-mono);\\n  }\\n  .text-2xl {\\n    font-size: var(--text-2xl);\\n    line-height: var(--tw-leading, var(--text-2xl--line-height));\\n  }\\n  .text-5xl {\\n    font-size: var(--text-5xl);\\n    line-height: var(--tw-leading, var(--text-5xl--line-height));\\n  }\\n  .text-base {\\n    font-size: var(--text-base);\\n    line-height: var(--tw-leading, var(--text-base--line-height));\\n  }\\n  .text-lg {\\n    font-size: var(--text-lg);\\n    line-height: var(--tw-leading, var(--text-lg--line-height));\\n  }\\n  .text-sm {\\n    font-size: var(--text-sm);\\n    line-height: var(--tw-leading, var(--text-sm--line-height));\\n  }\\n  .text-xl {\\n    font-size: var(--text-xl);\\n    line-height: var(--tw-leading, var(--text-xl--line-height));\\n  }\\n  .text-xs {\\n    font-size: var(--text-xs);\\n    line-height: var(--tw-leading, var(--text-xs--line-height));\\n  }\\n  .text-\\\\[10px\\\\] {\\n    font-size: 10px;\\n  }\\n  .font-bold {\\n    --tw-font-weight: var(--font-weight-bold);\\n    font-weight: var(--font-weight-bold);\\n  }\\n  .font-medium {\\n    --tw-font-weight: var(--font-weight-medium);\\n    font-weight: var(--font-weight-medium);\\n  }\\n  .font-semibold {\\n    --tw-font-weight: var(--font-weight-semibold);\\n    font-weight: var(--font-weight-semibold);\\n  }\\n  .tracking-wide {\\n    --tw-tracking: var(--tracking-wide);\\n    letter-spacing: var(--tracking-wide);\\n  }\\n  .tracking-widest {\\n    --tw-tracking: var(--tracking-widest);\\n    letter-spacing: var(--tracking-widest);\\n  }\\n  .text-white {\\n    color: var(--color-white);\\n  }\\n  .uppercase {\\n    text-transform: uppercase;\\n  }\\n  .shadow-lg {\\n    --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\\n    box-shadow:\\n      var(--tw-inset-shadow),\\n      var(--tw-inset-ring-shadow),\\n      var(--tw-ring-offset-shadow),\\n      var(--tw-ring-shadow),\\n      var(--tw-shadow);\\n  }\\n  .filter {\\n    filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);\\n  }\\n  .md\\\\:rounded-2xl {\\n    @media (width >= 48rem) {\\n      border-radius: var(--radius-2xl);\\n    }\\n  }\\n  .md\\\\:rounded-2xl\\\\! {\\n    @media (width >= 48rem) {\\n      border-radius: var(--radius-2xl) !important;\\n    }\\n  }\\n  .md\\\\:text-base {\\n    @media (width >= 48rem) {\\n      font-size: var(--text-base);\\n      line-height: var(--tw-leading, var(--text-base--line-height));\\n    }\\n  }\\n  .md\\\\:text-sm {\\n    @media (width >= 48rem) {\\n      font-size: var(--text-sm);\\n      line-height: var(--tw-leading, var(--text-sm--line-height));\\n    }\\n  }\\n  .md\\\\:text-xl {\\n    @media (width >= 48rem) {\\n      font-size: var(--text-xl);\\n      line-height: var(--tw-leading, var(--text-xl--line-height));\\n    }\\n  }\\n}\\n@layer components {\\n  video::-webkit-media-controls {\\n    display: none !important;\\n  }\\n  video::-webkit-media-controls-panel {\\n    display: none !important;\\n  }\\n  video::-webkit-media-controls-play-button {\\n    display: none !important;\\n  }\\n  video::-webkit-media-controls-timeline {\\n    display: none !important;\\n  }\\n  video::-webkit-media-controls-current-time-display {\\n    display: none !important;\\n  }\\n  video::-webkit-media-controls-time-remaining-display {\\n    display: none !important;\\n  }\\n  video::-webkit-media-controls-mute-button {\\n    display: none !important;\\n  }\\n  video::-webkit-media-controls-volume-slider {\\n    display: none !important;\\n  }\\n  video::-webkit-media-controls-fullscreen-button {\\n    display: none !important;\\n  }\\n  video::-webkit-media-controls-overlay-play-button {\\n    display: none !important;\\n  }\\n  video::-moz-media-controls {\\n    display: none !important;\\n  }\\n  video {\\n    outline: none !important;\\n  }\\n  video[controls] {\\n    -webkit-appearance: none !important;\\n    appearance: none !important;\\n  }\\n  video::-webkit-media-controls-enclosure {\\n    display: none !important;\\n  }\\n  video::-webkit-media-controls-start-playback-button {\\n    display: none !important;\\n  }\\n  video[controls]::-webkit-media-controls,\\n  video[controls]::-webkit-media-controls-panel,\\n  video[controls]::-webkit-media-controls-play-button,\\n  video[controls]::-webkit-media-controls-timeline,\\n  video[controls]::-webkit-media-controls-current-time-display,\\n  video[controls]::-webkit-media-controls-time-remaining-display,\\n  video[controls]::-webkit-media-controls-mute-button,\\n  video[controls]::-webkit-media-controls-volume-slider,\\n  video[controls]::-webkit-media-controls-fullscreen-button,\\n  video[controls]::-webkit-media-controls-overlay-play-button,\\n  video[controls]::-webkit-media-controls-enclosure,\\n  video[controls]::-webkit-media-controls-start-playback-button {\\n    display: none !important;\\n    visibility: hidden !important;\\n    opacity: 0 !important;\\n    pointer-events: none !important;\\n  }\\n  video[controls]::-moz-media-controls {\\n    display: none !important;\\n    visibility: hidden !important;\\n    opacity: 0 !important;\\n  }\\n  .motto-video-container {\\n    position: relative;\\n    width: 100%;\\n    min-height: 300px;\\n  }\\n  @supports (aspect-ratio: 16/9) {\\n    .motto-video-container {\\n      min-height: auto;\\n    }\\n  }\\n  .motto-video-responsive {\\n    position: absolute;\\n    top: calc(var(--spacing) * 0);\\n    left: calc(var(--spacing) * 0);\\n    height: 100%;\\n    width: 100%;\\n  }\\n  .motto-skip-button {\\n    position: absolute;\\n    top: calc(1/2 * 100%);\\n    z-index: 10;\\n    display: flex;\\n    height: calc(var(--spacing) * 16);\\n    width: calc(var(--spacing) * 16);\\n    --tw-translate-y: calc(calc(1/2 * 100%) * -1);\\n    translate: var(--tw-translate-x) var(--tw-translate-y);\\n    cursor: pointer;\\n    align-items: center;\\n    justify-content: center;\\n    border-radius: calc(infinity * 1px);\\n    border-style: var(--tw-border-style);\\n    border-width: 0px;\\n    background-color: color-mix(in srgb, #000 70%, transparent);\\n    @supports (color: color-mix(in lab, red, red)) {\\n      background-color: color-mix(in oklab, var(--color-black) 70%, transparent);\\n    }\\n    font-size: var(--text-2xl);\\n    line-height: var(--tw-leading, var(--text-2xl--line-height));\\n    color: var(--color-white);\\n    opacity: 80%;\\n    transition-property: all;\\n    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\\n    transition-duration: var(--tw-duration, var(--default-transition-duration));\\n    --tw-duration: 200ms;\\n    transition-duration: 200ms;\\n    &:hover {\\n      @media (hover: hover) {\\n        --tw-scale-x: 110%;\\n        --tw-scale-y: 110%;\\n        --tw-scale-z: 110%;\\n        scale: var(--tw-scale-x) var(--tw-scale-y);\\n      }\\n    }\\n    &:hover {\\n      @media (hover: hover) {\\n        opacity: 100%;\\n      }\\n    }\\n    &:active {\\n      --tw-scale-x: 95%;\\n      --tw-scale-y: 95%;\\n      --tw-scale-z: 95%;\\n      scale: var(--tw-scale-x) var(--tw-scale-y);\\n    }\\n  }\\n  .motto-skip-button-back {\\n    left: calc(var(--spacing) * 5);\\n  }\\n  .motto-skip-button-forward {\\n    right: calc(var(--spacing) * 5);\\n  }\\n}\\n.shaka-seek-bar-container {\\n  height: 6px !important;\\n  width: 100% !important;\\n  margin: 8px 0 !important;\\n  border-radius: 4px !important;\\n  position: relative !important;\\n  border-top: none !important;\\n  border-bottom: none !important;\\n  box-shadow: none !important;\\n}\\n.shaka-seek-bar {\\n  height: 6px !important;\\n  width: 100% !important;\\n  -webkit-appearance: none !important;\\n  appearance: none !important;\\n  background: transparent !important;\\n  cursor: pointer !important;\\n  border: none !important;\\n  outline: none !important;\\n  position: absolute !important;\\n  top: 0 !important;\\n  left: 0 !important;\\n  border-radius: 4px !important;\\n}\\n.shaka-seek-bar::-webkit-slider-runnable-track {\\n  height: 6px !important;\\n  background: transparent !important;\\n  border-radius: 4px !important;\\n  border: none !important;\\n}\\n.shaka-seek-bar::-moz-range-track {\\n  height: 6px !important;\\n  background: transparent !important;\\n  border-radius: 4px !important;\\n  border: none !important;\\n}\\n.shaka-seek-bar::-webkit-slider-thumb {\\n  -webkit-appearance: none !important;\\n  appearance: none !important;\\n  width: 16px !important;\\n  height: 16px !important;\\n  border-radius: 50% !important;\\n  background: #ffffff !important;\\n  cursor: pointer !important;\\n  border: 2px solid #ffffff !important;\\n  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;\\n  margin-top: -4px !important;\\n}\\n.shaka-seek-bar::-moz-range-thumb {\\n  width: 16px !important;\\n  height: 16px !important;\\n  border-radius: 50% !important;\\n  background: #ffffff !important;\\n  cursor: pointer !important;\\n  border: 2px solid #ffffff !important;\\n  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;\\n  margin-top: -4px !important;\\n}\\n.motto-skip-back-button,\\n.motto-skip-forward-button,\\n.motto-native-skip-button {\\n  background: transparent !important;\\n  border: none !important;\\n  padding: 4px !important;\\n  margin: 0px !important;\\n  cursor: pointer !important;\\n  color: #ffffff !important;\\n  transition: all 0.2s ease !important;\\n  min-width: 32px !important;\\n  height: 32px !important;\\n  display: flex !important;\\n  align-items: center !important;\\n  justify-content: center !important;\\n  border-radius: 4px !important;\\n  width: 25px;\\n}\\n.motto-skip-back-button:hover,\\n.motto-skip-forward-button:hover,\\n.motto-native-skip-button:hover {\\n  opacity: 0.8 !important;\\n  background: transparent !important;\\n  transform: scale(1.05) !important;\\n}\\n.motto-skip-back-button:active,\\n.motto-skip-forward-button:active,\\n.motto-native-skip-button:active {\\n  transform: scale(0.95) !important;\\n}\\n.motto-skip-back-button svg,\\n.motto-skip-forward-button svg,\\n.motto-native-skip-button svg {\\n  width: 24px !important;\\n  height: 24px !important;\\n}\\n.shaka-spinner-svg {\\n  color: white !important;\\n  fill: white !important;\\n}\\n.shaka-spinner-path {\\n  stroke: white !important;\\n  fill: none !important;\\n}\\n.shaka-spinner-container {\\n  color: white !important;\\n}\\n.shaka-buffering-spinner {\\n  color: white !important;\\n  fill: white !important;\\n}\\n.shaka-buffering-spinner svg {\\n  color: white !important;\\n  fill: white !important;\\n}\\n.shaka-buffering-spinner path {\\n  stroke: white !important;\\n  fill: none !important;\\n}\\n[data-shaka-player-container] .shaka-spinner,\\n[data-shaka-player-container] .spinner {\\n  color: white !important;\\n  border-color: white !important;\\n}\\n.material-icons.shaka-spinner {\\n  color: white !important;\\n}\\n.shaka-controls-container .shaka-spinner,\\n.shaka-video-container .shaka-spinner {\\n  color: white !important;\\n  fill: white !important;\\n}\\n.shaka-controls-container .shaka-spinner svg,\\n.shaka-video-container .shaka-spinner svg {\\n  color: white !important;\\n  fill: white !important;\\n}\\n.shaka-controls-container .shaka-spinner path,\\n.shaka-video-container .shaka-spinner path {\\n  stroke: white !important;\\n}\\n.motto-video-loading-overlay {\\n  position: absolute;\\n  top: 0;\\n  left: 0;\\n  width: 100%;\\n  height: 100%;\\n  background:\\n    linear-gradient(\\n      135deg,\\n      #1a1a1a 0%,\\n      #2d2d2d 100%);\\n  display: flex;\\n  flex-direction: column;\\n  align-items: center;\\n  justify-content: center;\\n  z-index: 10;\\n  transition: opacity 0.3s ease;\\n}\\n.motto-video-loading-overlay.hidden {\\n  opacity: 0;\\n  pointer-events: none;\\n}\\n.motto-video-loading-content {\\n  text-align: center;\\n  color: white;\\n}\\n.motto-video-loading-icon {\\n  width: 64px;\\n  height: 64px;\\n  margin-bottom: 16px;\\n  opacity: 0.7;\\n}\\n.motto-video-loading-text {\\n  font-size: 16px;\\n  font-weight: 500;\\n  margin-bottom: 8px;\\n}\\n.motto-video-loading-subtext {\\n  font-size: 14px;\\n  opacity: 0.7;\\n}\\n@keyframes pulse-live {\\n  0% {\\n    opacity: 1;\\n    transform: scale(1);\\n  }\\n  50% {\\n    opacity: 0.7;\\n    transform: scale(1.1);\\n  }\\n  100% {\\n    opacity: 1;\\n    transform: scale(1);\\n  }\\n}\\n.shaka-play-button {\\n  background: rgba(255, 255, 255, 0.1) !important;\\n  border: none !important;\\n  color: white !important;\\n  padding: 10px !important;\\n  border-radius: 100% !important;\\n  transition: all 0.2s ease !important;\\n  display: flex !important;\\n  align-items: center !important;\\n  justify-content: center !important;\\n  min-width: 55px !important;\\n  height: 55px !important;\\n}\\n.shaka-play-button-container {\\n  background: transparent;\\n  transition: all 0.2s ease !important;\\n}\\n.motto-video-container:not(.no-cursor) .shaka-play-button-container {\\n  background: rgba(0, 0, 0, 0.3);\\n  transition: all 0.s ease !important;\\n}\\n.shaka-play-button:hover {\\n  background: rgba(255, 255, 255, 0.2) !important;\\n  transform: scale(1.05) !important;\\n}\\n.shaka-play-button:active {\\n  transform: scale(0.95) !important;\\n}\\n.shaka-play-button > * {\\n  display: none !important;\\n}\\n.shaka-play-button::after {\\n  content: \\\"\\\" !important;\\n  width: 35px !important;\\n  height: 35px !important;\\n  background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"white\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M4.5 5.653c0-1.427 1.529-2.33 2.779-1.643l11.54 6.347c1.295.712 1.295 2.573 0 3.286L7.28 19.99c-1.25.687-2.779-.217-2.779-1.643V5.653Z\\\" clip-rule=\\\"evenodd\\\" /></svg>') !important;\\n  background-repeat: no-repeat !important;\\n  background-size: contain !important;\\n  background-position: center !important;\\n  display: block !important;\\n}\\n.shaka-play-button[aria-label*=Play]::after {\\n  background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"white\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M4.5 5.653c0-1.427 1.529-2.33 2.779-1.643l11.54 6.347c1.295.712 1.295 2.573 0 3.286L7.28 19.99c-1.25.687-2.779-.217-2.779-1.643V5.653Z\\\" clip-rule=\\\"evenodd\\\" /></svg>') !important;\\n}\\n.shaka-play-button[aria-label*=Pause]::after {\\n  background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"white\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M6.75 5.25a.75.75 0 0 1 .75-.75H9a.75.75 0 0 1 .75.75v13.5a.75.75 0 0 1-.75.75H7.5a.75.75 0 0 1-.75-.75V5.25Zm7.5 0A.75.75 0 0 1 15 4.5h1.5a.75.75 0 0 1 .75.75v13.5a.75.75 0 0 1-.75.75H15a.75.75 0 0 1-.75-.75V5.25Z\\\" clip-rule=\\\"evenodd\\\" /></svg>') !important;\\n}\\n.motto-video-container {\\n  background: black;\\n}\\n.motto-video-container video {\\n  width: 100% !important;\\n  height: 100% !important;\\n  margin-left: auto !important;\\n  margin-right: auto !important;\\n}\\n@property --tw-gradient-position { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-gradient-from { syntax: \\\"<color>\\\"; inherits: false; initial-value: #0000; }\\n@property --tw-gradient-via { syntax: \\\"<color>\\\"; inherits: false; initial-value: #0000; }\\n@property --tw-gradient-to { syntax: \\\"<color>\\\"; inherits: false; initial-value: #0000; }\\n@property --tw-gradient-stops { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-gradient-via-stops { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-gradient-from-position { syntax: \\\"<length-percentage>\\\"; inherits: false; initial-value: 0%; }\\n@property --tw-gradient-via-position { syntax: \\\"<length-percentage>\\\"; inherits: false; initial-value: 50%; }\\n@property --tw-gradient-to-position { syntax: \\\"<length-percentage>\\\"; inherits: false; initial-value: 100%; }\\n@property --tw-font-weight { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-tracking { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-shadow { syntax: \\\"*\\\"; inherits: false; initial-value: 0 0 #0000; }\\n@property --tw-shadow-color { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-shadow-alpha { syntax: \\\"<percentage>\\\"; inherits: false; initial-value: 100%; }\\n@property --tw-inset-shadow { syntax: \\\"*\\\"; inherits: false; initial-value: 0 0 #0000; }\\n@property --tw-inset-shadow-color { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-inset-shadow-alpha { syntax: \\\"<percentage>\\\"; inherits: false; initial-value: 100%; }\\n@property --tw-ring-color { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-ring-shadow { syntax: \\\"*\\\"; inherits: false; initial-value: 0 0 #0000; }\\n@property --tw-inset-ring-color { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-inset-ring-shadow { syntax: \\\"*\\\"; inherits: false; initial-value: 0 0 #0000; }\\n@property --tw-ring-inset { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-ring-offset-width { syntax: \\\"<length>\\\"; inherits: false; initial-value: 0px; }\\n@property --tw-ring-offset-color { syntax: \\\"*\\\"; inherits: false; initial-value: #fff; }\\n@property --tw-ring-offset-shadow { syntax: \\\"*\\\"; inherits: false; initial-value: 0 0 #0000; }\\n@property --tw-blur { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-brightness { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-contrast { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-grayscale { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-hue-rotate { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-invert { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-opacity { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-saturate { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-sepia { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-drop-shadow { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-drop-shadow-color { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-drop-shadow-alpha { syntax: \\\"<percentage>\\\"; inherits: false; initial-value: 100%; }\\n@property --tw-drop-shadow-size { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-translate-x { syntax: \\\"*\\\"; inherits: false; initial-value: 0; }\\n@property --tw-translate-y { syntax: \\\"*\\\"; inherits: false; initial-value: 0; }\\n@property --tw-translate-z { syntax: \\\"*\\\"; inherits: false; initial-value: 0; }\\n@property --tw-border-style { syntax: \\\"*\\\"; inherits: false; initial-value: solid; }\\n@property --tw-duration { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-scale-x { syntax: \\\"*\\\"; inherits: false; initial-value: 1; }\\n@property --tw-scale-y { syntax: \\\"*\\\"; inherits: false; initial-value: 1; }\\n@property --tw-scale-z { syntax: \\\"*\\\"; inherits: false; initial-value: 1; }\\n@keyframes spin {\\n  to {\\n    transform: rotate(360deg);\\n  }\\n}\\n@keyframes pulse {\\n  50% {\\n    opacity: 0.5;\\n  }\\n}\\n@layer properties {\\n  @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\\n    *,\\n    ::before,\\n    ::after,\\n    ::backdrop {\\n      --tw-gradient-position: initial;\\n      --tw-gradient-from: #0000;\\n      --tw-gradient-via: #0000;\\n      --tw-gradient-to: #0000;\\n      --tw-gradient-stops: initial;\\n      --tw-gradient-via-stops: initial;\\n      --tw-gradient-from-position: 0%;\\n      --tw-gradient-via-position: 50%;\\n      --tw-gradient-to-position: 100%;\\n      --tw-font-weight: initial;\\n      --tw-tracking: initial;\\n      --tw-shadow: 0 0 #0000;\\n      --tw-shadow-color: initial;\\n      --tw-shadow-alpha: 100%;\\n      --tw-inset-shadow: 0 0 #0000;\\n      --tw-inset-shadow-color: initial;\\n      --tw-inset-shadow-alpha: 100%;\\n      --tw-ring-color: initial;\\n      --tw-ring-shadow: 0 0 #0000;\\n      --tw-inset-ring-color: initial;\\n      --tw-inset-ring-shadow: 0 0 #0000;\\n      --tw-ring-inset: initial;\\n      --tw-ring-offset-width: 0px;\\n      --tw-ring-offset-color: #fff;\\n      --tw-ring-offset-shadow: 0 0 #0000;\\n      --tw-blur: initial;\\n      --tw-brightness: initial;\\n      --tw-contrast: initial;\\n      --tw-grayscale: initial;\\n      --tw-hue-rotate: initial;\\n      --tw-invert: initial;\\n      --tw-opacity: initial;\\n      --tw-saturate: initial;\\n      --tw-sepia: initial;\\n      --tw-drop-shadow: initial;\\n      --tw-drop-shadow-color: initial;\\n      --tw-drop-shadow-alpha: 100%;\\n      --tw-drop-shadow-size: initial;\\n      --tw-translate-x: 0;\\n      --tw-translate-y: 0;\\n      --tw-translate-z: 0;\\n      --tw-border-style: solid;\\n      --tw-duration: initial;\\n      --tw-scale-x: 1;\\n      --tw-scale-y: 1;\\n      --tw-scale-z: 1;\\n    }\\n  }\\n}\\n\")","import React, { forwardRef, useEffect, useRef, useImperativeHandle } from 'react';\nimport shaka from 'shaka-player/dist/shaka-player.ui';\nimport { PlayerProps } from './types';\nimport { \n  useShakePlayer, \n  useQualityControl, \n  useSkipControls, \n  useMuxAnalytics, \n  useShakaUI,\n  useEventHandlers,\n  useLiveBadge,\n  useLiveIndicator,\n  useKeyboardControls\n} from './hooks';\nimport { LiveBadge } from './components';\nimport './styles.css';\nimport { twMerge } from 'tailwind-merge';\n\nexport const Player = forwardRef<HTMLVideoElement, PlayerProps>(\n  ({ \n    src, \n    autoPlay = false, \n    loop = false, \n    muted = false, \n    controls = true,\n    poster,\n    width,\n    height,\n    aspectRatio = 16/9,\n    shakaConfig,\n    drmConfig,\n    muxConfig,\n    imaConfig,\n    chromecastConfig,\n    qualityConfig,\n    seekbarConfig,\n    iconSizes,\n    events,\n    containerClassName,\n    ...videoProps \n  }, ref) => {\n    const videoRef = useRef<HTMLVideoElement>(null);\n    const containerRef = useRef<HTMLDivElement>(null);\n    const adContainerRef = useRef<HTMLDivElement>(null);\n\n    // Assign the ref early so parent components can access the video element\n    useImperativeHandle(ref, () => videoRef.current!, []);\n\n    // Initialize custom hooks\n    const { playerRef, initializePlayer, destroyPlayer } = useShakePlayer({\n      src,\n      shakaConfig,\n      drmConfig,\n      onError: events?.onError,\n      onPlayerReady: events?.onPlayerReady\n    });\n\n    const { \n      getAvailableQualities, \n      setQuality, \n      setupQualityTracking, \n      configureQuality \n    } = useQualityControl(playerRef, qualityConfig, events?.onQualityChange);\n\n    const { \n      skipBack, \n      skipForward, \n      skipDuration, \n      shouldShowSkipControls \n    } = useSkipControls(videoRef, events?.onSkipBack, events?.onSkipForward);\n\n    // Keyboard controls for desktop (arrow keys + spacebar)\n    useKeyboardControls(videoRef, {\n      skipBack,\n      skipForward,\n      enabled: true\n    });\n\n    const { \n      initializeMux, \n      updateMuxData, \n      handleMuxError, \n      destroyMux \n    } = useMuxAnalytics(playerRef, muxConfig, events?.onMuxReady, events?.onMuxDataUpdate);\n\n    const { setupEventListeners, cleanupEventListeners } = useEventHandlers(videoRef, {\n      onPlay: events?.onPlay,\n      onPause: events?.onPause,\n      onEnded: events?.onEnded,\n      onLoadStart: events?.onLoadStart,\n      onCanPlay: events?.onCanPlay\n    });\n\n    const { uiRef, initializeUI, destroyUI } = useShakaUI(\n      playerRef,\n      containerRef,\n      videoRef,\n      controls,\n      chromecastConfig,\n      seekbarConfig,\n      events?.onSkipBack,\n      events?.onSkipForward,\n      iconSizes\n    );\n\n    // Live badge hook\n    const { isLive, isVisible: isLiveBadgeVisible } = useLiveBadge(playerRef, {\n      enabled: true,\n      liveThresholdSeconds: 15,\n      onLiveStateChange: (isLive) => {\n        events?.onLiveStateChange?.(isLive);\n      }\n    });\n\n    // Live indicator hook\n    useLiveIndicator(containerRef, playerRef, {\n      enabled: true,\n      indicatorColor: '#ff0000',\n      indicatorSize: 8,\n      showPulseAnimation: true,\n      liveThresholdSeconds: 15\n    });\n\n    // Initialize ads (simplified - would normally be in a separate hook)\n    const initializeAds = () => {\n      if (!imaConfig || !playerRef.current || !videoRef.current) return;\n\n      const adManager = playerRef.current.getAdManager();\n      if (!adManager) return;\n\n      // Set up ad event listeners\n      adManager.addEventListener((shaka as any).ads?.Utils?.AD_STARTED, () => {\n        events?.onAdStart?.();\n      });\n\n      adManager.addEventListener((shaka as any).ads?.Utils?.AD_COMPLETE, () => {\n        events?.onAdComplete?.();\n      });\n\n      adManager.addEventListener((shaka as any).ads?.Utils?.AD_ERROR, (event: any) => {\n        events?.onAdError?.(event.detail);\n      });\n\n      // Initialize client-side ads if ad tag URL is provided\n      if (imaConfig.adTagUrl) {\n        const adContainer = adContainerRef.current;\n        if (adContainer) {\n          adManager.initClientSide(adContainer, videoRef.current, imaConfig.adsRenderingSettings);\n          \n          const adsRequest = {\n            adTagUrl: imaConfig.adTagUrl,\n            linearAdSlotWidth: imaConfig.linearAdSlotWidth || width as number || 640,\n            linearAdSlotHeight: imaConfig.linearAdSlotHeight || height as number || 360,\n            nonLinearAdSlotWidth: imaConfig.nonLinearAdSlotWidth || width as number || 640,\n            nonLinearAdSlotHeight: imaConfig.nonLinearAdSlotHeight || 150\n          };\n          \n          adManager.requestClientSideAds(adsRequest as any);\n        }\n      }\n    };\n\n    // Initialize chromecast (simplified - would normally be in a separate hook)\n    const initializeChromecast = () => {\n      if (!chromecastConfig?.enabled) {\n        return;\n      }\n\n      try {\n        if (events?.onCastStateChange) {\n          setTimeout(() => events.onCastStateChange!(false), 100);\n        }\n      } catch (error) {\n        console.warn('Chromecast initialization failed:', error);\n      }\n    };\n\n    // Main initialization\n    useEffect(() => {\n      const video = videoRef.current;\n      if (!video) return;\n\n      const initialize = async () => {\n        try {\n          // Initialize player\n          await initializePlayer(video);\n          \n          // Setup event listeners\n          setupEventListeners();\n          \n          // Setup quality tracking\n          const cleanupQuality = setupQualityTracking();\n          \n          // Configure quality settings\n          configureQuality();\n          \n          // Initialize UI (seekbar colors are now configured directly in initializeUI)\n          await initializeUI();\n          \n          // Initialize other features\n          initializeMux();\n          initializeAds();\n          initializeChromecast();\n\n        } catch (error) {\n          console.error('Error during player initialization:', error);\n          handleMuxError(error);\n        }\n      };\n\n      initialize();\n\n      // Cleanup function\n      return () => {\n        cleanupEventListeners();\n        destroyUI();\n        destroyMux();\n        destroyPlayer();\n      };\n    }, [src]);\n\n    // Update video properties when they change\n    useEffect(() => {\n      const video = videoRef.current;\n      if (!video) return;\n\n      video.autoplay = autoPlay;\n      video.loop = loop;\n      video.muted = muted;\n      video.controls = false; // Always disable native controls since we use Shaka UI\n      if (poster) video.poster = poster;\n    }, [autoPlay, loop, muted, poster]);\n\n    // Additional safeguard to ensure native controls are always disabled\n    useEffect(() => {\n      const video = videoRef.current;\n      if (!video) return;\n      \n      // Aggressively disable native controls to prevent overlapping with Shaka UI\n      video.controls = false;\n      video.setAttribute('controls', 'false');\n      \n      // Remove the controls attribute completely\n      video.removeAttribute('controls');\n      \n      // Set up a MutationObserver to watch for the controls attribute being added back\n      const observer = new MutationObserver((mutations) => {\n        mutations.forEach((mutation) => {\n          if (mutation.type === 'attributes' && mutation.attributeName === 'controls') {\n            // If controls attribute is added back, immediately remove it\n            if (video.hasAttribute('controls')) {\n              video.removeAttribute('controls');\n              video.controls = false;\n            }\n          }\n        });\n      });\n      \n      // Start observing\n      observer.observe(video, {\n        attributes: true,\n        attributeFilter: ['controls']\n      });\n      \n      // Cleanup function\n      return () => {\n        observer.disconnect();\n      };\n    }, []);\n\n    // Expose methods via ref\n    useImperativeHandle(ref, () => ({\n      ...videoRef.current!,\n      // Custom methods for quality control\n      getAvailableQualities,\n      setQuality,\n      // Skip methods\n      skipBack,\n      skipForward,\n      // Mux methods\n      updateMuxData,\n      // Access to underlying instances\n      getPlayer: () => playerRef.current,\n      getMuxMonitor: () => null\n    }), [getAvailableQualities, setQuality, skipBack, skipForward, updateMuxData]);\n\n    // Determine if we're using responsive sizing\n    const isResponsive = !width && !height;\n    \n    // Container classes for responsive or fixed sizing\n    const containerClasses = twMerge(containerClassName, 'motto-video-container bg-black');\n      \n    // Container styles - handle both responsive and fixed sizing\n    const containerStyle: React.CSSProperties = isResponsive \n      ? { \n          aspectRatio: aspectRatio.toString(),\n        }\n      : { width, height };\n\n    // Video classes for responsive or fixed sizing  \n    const videoClasses = isResponsive\n      ? 'motto-video-responsive w-full'\n      : 'w-full h-full ';\n      \n    // Video styles for fixed sizing\n    const videoStyle: React.CSSProperties = isResponsive\n      ? {}\n      : { width, height };\n\n    // Filter out controls prop to prevent conflicts with native HTML5 controls\n    const filteredVideoProps = { ...videoProps };\n    delete (filteredVideoProps as any).controls;\n\n    return (\n      <div \n        ref={containerRef}\n        className={containerClasses}\n        style={containerStyle}\n        data-shaka-player-container\n        data-shaka-player-cast-receiver-id={chromecastConfig?.receiverApplicationId}\n      >\n        <video\n          ref={videoRef}\n          className={videoClasses}\n          width={isResponsive ? undefined : width}\n          height={isResponsive ? undefined : height}\n          style={videoStyle}\n          controls={false}\n          playsInline={true}\n          {...filteredVideoProps}\n        />\n        \n        {/* Live Badge */}\n        <LiveBadge isVisible={isLiveBadgeVisible} />\n        {/* <LiveBadge isVisible={true} /> */}\n        \n        {/* Ad container for IMA */}\n        {imaConfig && (\n          <div\n            ref={adContainerRef}\n            className=\"absolute top-0 left-0 w-full h-full pointer-events-auto\"\n          />\n        )}\n      </div>\n    );\n  }\n);\n\nPlayer.displayName = 'Player'; ","import { useRef, useCallback } from 'react';\nimport { Player as ShakaPlayer, polyfill } from 'shaka-player/dist/shaka-player.ui';\n\ninterface DRMConfig {\n  clearKeys?: { [keyId: string]: string };\n  servers?: { [keySystem: string]: string };\n}\n\ninterface UseShakePlayerProps {\n  src: string;\n  shakaConfig?: any;\n  drmConfig?: DRMConfig;\n  onError?: (error: Error) => void;\n  onPlayerReady?: (player: any) => void;\n}\n\nexport const useShakePlayer = ({\n  src,\n  shakaConfig,\n  drmConfig,\n  onError,\n  onPlayerReady\n}: UseShakePlayerProps) => {\n  const playerRef = useRef<any>(null);\n\n  const initializePlayer = useCallback(async (video: HTMLVideoElement) => {\n    try {\n      // Install polyfills\n      polyfill.installAll();\n\n      // Check for browser support\n      if (!ShakaPlayer.isBrowserSupported()) {\n        throw new Error('Browser not supported by Shaka Player');\n      }\n      \n      // Create player instance first, then attach the video element.\n      // Passing the video element to the constructor **and** calling `attach` afterwards\n      // results in a double-attachment which can trigger MediaSource errors on subsequent\n      // re‐initialisations (e.g. when the page is resized and the component remounts).\n      const player = new (ShakaPlayer as any)();\n      playerRef.current = player;\n\n      // Attach to the video element (recommended approach since Shaka v4).\n      await (player as any).attach(video);\n\n      // Configure player\n      if (shakaConfig) {\n        player.configure(shakaConfig);\n      }\n\n      // Configure DRM\n      if (drmConfig) {\n        if (drmConfig.clearKeys) {\n          player.configure({ 'drm.clearKeys': drmConfig.clearKeys } as any);\n        }\n        \n        if (drmConfig.servers) {\n          player.configure({ 'drm.servers': drmConfig.servers } as any);\n        }\n      }\n\n      // Set up error handling\n      player.addEventListener('error', (event: any) => {\n        const error = event.detail;\n\n        // Ignore Shaka's LOAD_INTERRUPTED (code 7000) since it indicates a\n        // benign race between load/unload calls when the source changes.\n        if (error?.code === 7000) {\n          return;\n        }\n\n        console.error('Shaka Player Error:', error);\n        onError?.(new Error(`Shaka Player Error: ${error.message || 'Unknown error'}`));\n      });\n\n      // Load the manifest\n      await player.load(src);\n      onPlayerReady?.(player);\n\n      return player;\n    } catch (error) {\n      // Filter out benign load interruptions that occur when the component\n      // switches source before the previous load completes.\n      if ((error as any)?.code === 7000) {\n        return;\n      }\n\n      console.error('Error initializing Shaka Player:', error);\n      onError?.(error as Error);\n      throw error;\n    }\n  }, [shakaConfig, drmConfig, src, onError, onPlayerReady]);\n\n  const destroyPlayer = useCallback(async () => {\n    if (playerRef.current) {\n      try {\n        await playerRef.current.destroy();\n      } catch (error) {\n        console.warn('Error destroying Shaka Player:', error);\n      } finally {\n        playerRef.current = null;\n      }\n    }\n  }, []);\n\n  return {\n    playerRef,\n    initializePlayer,\n    destroyPlayer\n  };\n}; ","import { useCallback, useRef } from 'react';\n\ninterface QualityConfig {\n  enableAdaptation?: boolean;\n  selectedQuality?: number;\n  availableQualities?: Array<{\n    height: number;\n    bandwidth: number;\n    label: string;\n  }>;\n}\n\ninterface Quality {\n  height: number;\n  bandwidth: number;\n  label: string;\n}\n\nexport const useQualityControl = (\n  playerRef: React.RefObject<any>,\n  qualityConfig?: QualityConfig,\n  onQualityChange?: (quality: { height: number; bandwidth: number }) => void\n) => {\n  const getAvailableQualities = useCallback((): Quality[] => {\n    if (!playerRef.current) return [];\n    \n    const tracks = playerRef.current.getVariantTracks();\n    const qualities = tracks\n      .filter((track: any, index: any, self: any) => \n        index === self.findIndex((t: any) => t.height === track.height)\n      )\n      .map((track: any) => ({\n        height: track.height || 0,\n        bandwidth: track.bandwidth || 0,\n        label: `${track.height}p`\n      }))\n      .sort((a: any, b: any) => b.height - a.height);\n    \n    return qualities;\n  }, [playerRef]);\n\n  const setQuality = useCallback((height: number) => {\n    if (!playerRef.current) return;\n    \n    if (height === 0) {\n      // Enable adaptive streaming\n      playerRef.current.configure({\n        abr: { enabled: true, \n          switchInterval: 2,     // quicker re-checks\n          clearBufferSwitch: true,\n          safeMarginSwitch: 10   // leave ~10 s in front of the playhead }\n        }\n      })\n    } else {\n      // Disable adaptive streaming and select specific quality\n      playerRef.current.configure({\n        abr: { enabled: false,\n          switchInterval: 2,     // quicker re-checks\n          clearBufferSwitch: true,\n          safeMarginSwitch: 10   // leave ~10 s in front of the playhead }  \n        }\n      });\n      \n      const tracks = playerRef.current.getVariantTracks();\n      const targetTrack = tracks.find((track: any) => track.height === height);\n      if (targetTrack) {\n        playerRef.current.selectVariantTrack(targetTrack, /* clearBuffer= */ true);\n      }\n    }\n  }, [playerRef]);\n\n  const setupQualityTracking = useCallback(() => {\n    if (!playerRef.current || !onQualityChange) return;\n\n    const handleQualityChange = () => {\n      const activeTrack = playerRef.current.getVariantTracks().find((track: any) => track.active);\n      if (activeTrack) {\n        onQualityChange({\n          height: activeTrack.height || 0,\n          bandwidth: activeTrack.bandwidth || 0\n        });\n      }\n    };\n\n    playerRef.current.addEventListener('variantchanged', handleQualityChange);\n    \n    return () => {\n      playerRef.current?.removeEventListener('variantchanged', handleQualityChange);\n    };\n  }, [playerRef, onQualityChange]);\n\n  const configureQuality = useCallback(() => {\n    if (!playerRef.current || !qualityConfig) return;\n\n    if (qualityConfig.enableAdaptation !== undefined) {\n      playerRef.current.configure({\n        abr: { enabled: qualityConfig.enableAdaptation }\n      });\n    }\n\n    if (qualityConfig.selectedQuality !== undefined) {\n      setQuality(qualityConfig.selectedQuality);\n    }\n  }, [playerRef, qualityConfig, setQuality]);\n\n  return {\n    getAvailableQualities,\n    setQuality,\n    setupQualityTracking,\n    configureQuality\n  };\n}; ","import { useCallback } from 'react';\n\nexport const useSkipControls = (\n  videoRef: React.RefObject<HTMLVideoElement>,\n  onSkipBack?: (newTime: number) => void,\n  onSkipForward?: (newTime: number) => void\n) => {\n  // Hardcoded skip duration of 15 seconds\n  const skipDuration = 15;\n\n  const skipBack = useCallback(() => {\n    const video = videoRef.current;\n    if (!video) return;\n    \n    const newTime = Math.max(0, video.currentTime - skipDuration);\n    video.currentTime = newTime;\n    onSkipBack?.(newTime);\n  }, [videoRef, onSkipBack]);\n\n  const skipForward = useCallback(() => {\n    const video = videoRef.current;\n    if (!video) return;\n    \n    const newTime = Math.min(video.duration || 0, video.currentTime + skipDuration);\n    video.currentTime = newTime;\n    onSkipForward?.(newTime);\n  }, [videoRef, onSkipForward]);\n\n  // Always show skip controls\n  const shouldShowSkipControls = useCallback(() => {\n    return true;\n  }, []);\n\n  return {\n    skipBack,\n    skipForward,\n    skipDuration,\n    shouldShowSkipControls\n  };\n}; ","import { useCallback, useRef } from 'react';\nimport initShakaPlayerMux from '@mux/mux-data-shakaplayer';\nimport shaka from 'shaka-player/dist/shaka-player.ui';\nimport { MuxAnalyticsConfig } from '../types';\nimport { version } from '../../package.json';\n\nexport const useMuxAnalytics = (\n  playerRef: React.RefObject<any>,\n  muxConfig?: MuxAnalyticsConfig,\n  onMuxReady?: () => void,\n  onMuxDataUpdate?: (data: any) => void,\n) => {\n  const shakaPlayerMuxRef = useRef<any>(null);\n\n  const initializeMux = useCallback(() => {\n    if (!muxConfig || !playerRef.current) return;\n\n    try {\n      const playerInitTime = initShakaPlayerMux.utils.now();\n      \n      // Prepare Mux options\n      const muxOptions = {\n        debug: muxConfig.debug || false,\n        disableCookies: muxConfig.disableCookies || false,\n        respectDoNotTrack: muxConfig.respectDoNotTrack || false,\n        automaticErrorTracking: muxConfig.automaticErrorTracking !== false,\n        ...(muxConfig.beaconCollectionDomain && { beaconCollectionDomain: muxConfig.beaconCollectionDomain }),\n        ...(muxConfig.errorTranslator && { errorTranslator: muxConfig.errorTranslator }),\n        data: {\n          env_key: muxConfig.envKey,\n          player_name: muxConfig?.metadata?.player_name,\n          player_version: version,\n          player_init_time: playerInitTime,\n          video_title: muxConfig?.metadata?.video_title ?? \"\",\n          video_id: muxConfig?.metadata?.video_id ?? \"\",\n          viewer_user_id: muxConfig?.metadata?.viewer_user_id ?? \"\",\n          ...muxConfig.metadata,\n        }\n      };\n\n      // Initialize Mux monitoring\n      shakaPlayerMuxRef.current = initShakaPlayerMux(playerRef.current, muxOptions, shaka);\n      \n      onMuxReady?.();\n    } catch (error) {\n      console.error('Failed to initialize Mux Analytics:', error);\n    }\n  }, [muxConfig, onMuxReady, playerRef]);\n\n  const updateMuxData = useCallback((data: any) => {\n    if ((playerRef.current as any)?.mux?.updateData) {\n      try {\n        (playerRef.current as any).mux.updateData(data);\n        onMuxDataUpdate?.(data);\n      } catch (error) {\n        console.error('Failed to update Mux data:', error);\n      }\n    }\n  }, [onMuxDataUpdate, playerRef]);\n\n  const handleMuxError = useCallback((error: any) => {\n    if (shakaPlayerMuxRef.current?.loadErrorHandler) {\n      shakaPlayerMuxRef.current.loadErrorHandler(error);\n    }\n  }, []);\n\n  const destroyMux = useCallback(() => {\n    // Clean up Mux monitoring\n    if ((playerRef.current as any)?.mux?.destroy) {\n      try {\n        (playerRef.current as any).mux.destroy();\n      } catch (error) {\n        console.error('Error destroying Mux:', error);\n      }\n    }\n    \n    if (shakaPlayerMuxRef.current) {\n      shakaPlayerMuxRef.current = null;\n    }\n  }, [playerRef]);\n\n  return {\n    initializeMux,\n    updateMuxData,\n    handleMuxError,\n    destroyMux,\n    shakaPlayerMuxRef\n  };\n}; ","{\n  \"name\": \"@mottosports/motto-video-player\",\n  \"version\": \"1.0.1-rc.22\",\n  \"description\": \"React video player component for the Motto platform, powered by Shaka Player\",\n  \"main\": \"dist/index.js\",\n  \"module\": \"dist/index.mjs\",\n  \"types\": \"dist/index.d.ts\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/index.d.ts\",\n      \"import\": \"./dist/index.mjs\",\n      \"require\": \"./dist/index.js\"\n    }\n  },\n  \"files\": [\n    \"dist\",\n    \"README.md\"\n  ],\n  \"scripts\": {\n    \"build\": \"tsup\",\n    \"dev\": \"NODE_ENV=development tsup --watch\",\n    \"dev:hot\": \"NODE_ENV=development tsup --watch --onSuccess \\\"echo 'Hot reload ready! Package rebuilt successfully.'\\\"\",\n    \"clean\": \"rm -rf dist\",\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\",\n    \"prepublishOnly\": \"npm run build\"\n  },\n  \"keywords\": [\n    \"video\",\n    \"player\",\n    \"react\",\n    \"component\",\n    \"motto\",\n    \"shaka\",\n    \"adaptive-streaming\",\n    \"dash\",\n    \"hls\",\n    \"drm\"\n  ],\n  \"author\": \"Motto UI Components\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"@mux/mux-data-shakaplayer\": \"^5.14.7\",\n    \"@tanstack/react-query\": \"^5.80.3\",\n    \"shaka-player\": \"^4.15.3\",\n    \"tailwind-merge\": \"^3.3.0\"\n  },\n  \"devDependencies\": {\n    \"@tailwindcss/postcss\": \"^4.1.8\",\n    \"@types/node\": \"^22.15.29\",\n    \"@types/react\": \"^18.2.79\",\n    \"@types/react-dom\": \"^19.1.5\",\n    \"postcss\": \"^8.5.4\",\n    \"tailwindcss\": \"^4.1.8\",\n    \"tsup\": \"^8.5.0\",\n    \"typescript\": \"^5.8.3\"\n  },\n  \"peerDependencies\": {\n    \"react\": \">=16.8.0\",\n    \"react-dom\": \">=16.8.0\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/motto-ui-components/motto-players.git\",\n    \"directory\": \"packages/motto-video-player\"\n  },\n  \"homepage\": \"https://github.com/motto-ui-components/motto-players#readme\",\n  \"bugs\": {\n    \"url\": \"https://github.com/motto-ui-components/motto-players/issues\"\n  },\n  \"publishConfig\": {\n    \"access\": \"public\"\n  }\n}\n","import { useCallback, useRef } from 'react';\nimport { ui as ShakaUI } from 'shaka-player/dist/shaka-player.ui';\nimport { SkipBackIcon, SkipForwardIcon, BigPlayIcon } from '../icons';\nimport { renderIcon } from '../utils/renderIcon';\n\ninterface ChromecastConfig {\n  enabled?: boolean;\n  receiverApplicationId?: string;\n}\n\ninterface IconSizes {\n  skipButtons?: number;\n  bigPlayButton?: number;\n}\n\n// Custom Skip Back Button Element\nclass SkipBackButton {\n  private button_: HTMLButtonElement;\n  private parent: HTMLElement;\n  private controls: any;\n  private eventManager: any;\n\n  constructor(parent: HTMLElement, controls: any, onSkipBack?: (newTime: number) => void, iconSize = 24) {\n    this.parent = parent;\n    this.controls = controls;\n    this.eventManager = { listen: (element: HTMLElement, event: string, handler: () => void) => {\n      element.addEventListener(event, handler);\n    }};\n\n    this.button_ = document.createElement('button');\n    this.button_.className = 'shaka-button motto-native-skip-button';\n    this.button_.innerHTML = renderIcon(SkipBackIcon, { size: iconSize });\n    this.button_.title = 'Skip back 15 seconds';\n    this.button_.setAttribute('aria-label', 'Skip back 15 seconds');\n    \n    this.parent.appendChild(this.button_);\n\n    this.eventManager.listen(this.button_, 'click', () => {\n      const video = this.controls.getVideo();\n      if (video) {\n        const newTime = Math.max(0, video.currentTime - 15);\n        video.currentTime = newTime;\n        onSkipBack?.(newTime);\n      }\n    });\n  }\n\n  // Shaka UI will call `release` when the controls are destroyed.\n  // Provide a no-op implementation to avoid TypeErrors.\n  public release() {\n    /* Optionally detach listeners / clean up DOM here */\n  }\n}\n\n// Custom Skip Forward Button Element  \nclass SkipForwardButton {\n  private button_: HTMLButtonElement;\n  private parent: HTMLElement;\n  private controls: any;\n  private eventManager: any;\n\n  constructor(parent: HTMLElement, controls: any, onSkipForward?: (newTime: number) => void, iconSize = 24) {\n    this.parent = parent;\n    this.controls = controls;\n    this.eventManager = { listen: (element: HTMLElement, event: string, handler: () => void) => {\n      element.addEventListener(event, handler);\n    }};\n\n    this.button_ = document.createElement('button');\n    this.button_.className = 'shaka-button motto-native-skip-button';\n    this.button_.innerHTML = renderIcon(SkipForwardIcon, { size: iconSize });\n    this.button_.title = 'Skip forward 15 seconds';\n    this.button_.setAttribute('aria-label', 'Skip forward 15 seconds');\n    \n    this.parent.appendChild(this.button_);\n\n    this.eventManager.listen(this.button_, 'click', () => {\n      const video = this.controls.getVideo();\n      if (video) {\n        const newTime = Math.min(video.duration || 0, video.currentTime + 15);\n        video.currentTime = newTime;\n        onSkipForward?.(newTime);\n      }\n    });\n  }\n\n  public release() {\n    /* Clean-up logic if needed */\n  }\n}\n\n// Factory classes for the custom elements\nclass SkipBackButtonFactory {\n  constructor(private onSkipBack?: (newTime: number) => void, private iconSize?: number) {}\n  \n  create(rootElement: HTMLElement, controls: any) {\n    return new SkipBackButton(rootElement, controls, this.onSkipBack, this.iconSize);\n  }\n}\n\nclass SkipForwardButtonFactory {\n  constructor(private onSkipForward?: (newTime: number) => void, private iconSize?: number) {}\n  \n  create(rootElement: HTMLElement, controls: any) {\n    return new SkipForwardButton(rootElement, controls, this.onSkipForward, this.iconSize);\n  }\n}\n\ninterface SeekbarColors {\n  base?: string;\n  buffered?: string;\n  played?: string;\n}\n\nexport const useShakaUI = (\n  playerRef: React.RefObject<any>,\n  containerRef: React.RefObject<HTMLDivElement>,\n  videoRef: React.RefObject<HTMLVideoElement>,\n  controls: boolean,\n  chromecastConfig?: ChromecastConfig,\n  seekbarColors?: SeekbarColors,\n  onSkipBack?: (newTime: number) => void,\n  onSkipForward?: (newTime: number) => void,\n  iconSizes?: IconSizes\n) => {\n  const uiRef = useRef<any>(null);\n  const registeredElements = useRef<Set<string>>(new Set());\n\n  const initializeUI = useCallback(async () => {\n    if (!controls || !containerRef.current || !playerRef.current || !videoRef.current) {\n      return null;\n    }\n\n    // Register custom elements if not already registered\n    if (!registeredElements.current.has('skip_back_button')) {\n      ShakaUI.Controls.registerElement('skip_back_button', new SkipBackButtonFactory(onSkipBack, iconSizes?.skipButtons));\n      registeredElements.current.add('skip_back_button');\n    }\n    \n    if (!registeredElements.current.has('skip_forward_button')) {\n      ShakaUI.Controls.registerElement('skip_forward_button', new SkipForwardButtonFactory(onSkipForward, iconSizes?.skipButtons));\n      registeredElements.current.add('skip_forward_button');\n    }\n\n    // Create UI with Shaka Player controls using default configuration\n    const ui = new ShakaUI.Overlay(playerRef.current, containerRef.current, videoRef.current);\n    uiRef.current = ui;\n\n    // Detect mobile to conditionally include volume control\n    const isMobile = window.innerWidth <= 767;\n    \n    const controlPanelElements = [\n      ...(isMobile ? [] : ['skip_back_button']), \n      ...(isMobile ? [] : ['play_pause']), \n      ...(isMobile ? [] : ['skip_forward_button']), \n      'mute',\n      ...(isMobile ? [] : ['volume']), // Only include volume on desktop\n      'time_and_duration',\n      'spacer',\n      'fullscreen',\n      'cast',\n      'overflow_menu',\n    ];\n\n    // Configure UI settings with custom control panel layout\n    const uiConfig: any = {\n      seekBarColors: {\n        base: seekbarColors?.base || 'rgba(255, 255, 255, 0.3)',     // Unbuffered track\n        buffered: seekbarColors?.buffered || 'rgba(255, 255, 255, 0.5)', // Buffered but not played\n        played: seekbarColors?.played || '#ffffff',                     // Progress/played portion (white)\n      },\n      controlPanelElements: controlPanelElements,\n      addBigPlayButton: isMobile,\n      ...(chromecastConfig?.receiverApplicationId && {\n        'castReceiverAppId': chromecastConfig.receiverApplicationId,\n        'castAndroidReceiverCompatible': false\n      }),\n      overflowMenuButtons: [\n        'quality',\n        'picture_in_picture',\n        'playback_rate'\n      ]\n    };\n\n    // Add chromecast config if needed\n    if (chromecastConfig?.receiverApplicationId) {\n      uiConfig.castReceiverAppId = chromecastConfig.receiverApplicationId;\n      uiConfig.castAndroidReceiverCompatible = false;\n    }\n\n    ui.configure(uiConfig);\n\n    // Custom SVG replacement for big play button on mobile\n    if (isMobile) {\n      const customizeBigPlayButton = () => {\n        const bigPlayButton = containerRef.current?.querySelector('.shaka-big-play-button');\n        if (bigPlayButton && !bigPlayButton.hasAttribute('data-customized')) {\n          // Use custom size if provided, otherwise use default\n          const buttonSize = iconSizes?.bigPlayButton || 40;\n          \n          // Clear existing content and add custom SVG\n          bigPlayButton.innerHTML = renderIcon(BigPlayIcon, { size: buttonSize });\n          \n          // Mark as customized to avoid re-processing\n          bigPlayButton.setAttribute('data-customized', 'true');\n          \n          // Ensure the button is properly styled\n          const buttonElement = bigPlayButton as HTMLElement;\n          buttonElement.style.display = 'flex';\n          buttonElement.style.alignItems = 'center';\n          buttonElement.style.justifyContent = 'center';\n        }\n      };\n\n      // Apply customization\n      setTimeout(customizeBigPlayButton, 100);\n\n      // Watch for changes and reapply customization\n      const observer = new MutationObserver(() => {\n        customizeBigPlayButton();\n      });\n\n      if (containerRef.current) {\n        observer.observe(containerRef.current, {\n          childList: true,\n          subtree: true,\n          attributes: false\n        });\n      }\n    }\n\n    // Seekbar styling is now handled by CSS with proper background\n\n    return ui;\n  }, [controls, containerRef, playerRef, videoRef, chromecastConfig, seekbarColors, onSkipBack, onSkipForward, iconSizes]);\n\n  const destroyUI = useCallback(() => {\n    if (uiRef.current) {\n      try {\n        uiRef.current.destroy();\n      } catch (error) {\n        console.error('Error destroying UI:', error);\n      }\n      uiRef.current = null;\n    }\n\n  }, []);\n\n  return {\n    uiRef,\n    initializeUI,\n    destroyUI\n  };\n}; ","import React from 'react';\n\ninterface SkipBackIconProps {\n  size?: number;\n  className?: string;\n}\n\nexport const SkipBackIcon: React.FC<SkipBackIconProps> = ({ size = 24, className = '' }) => {\n  return (\n    <svg \n      width={size} \n      height={size} \n      strokeWidth=\"2\" \n      viewBox=\"0 0 24 24\" \n      fill=\"none\" \n      xmlns=\"http://www.w3.org/2000/svg\"\n      className={className}\n    >\n      <path \n        d=\"M3 13C3 17.9706 7.02944 22 12 22C16.9706 22 21 17.9706 21 13C21 8.02944 16.9706 4 12 4\" \n        stroke=\"currentColor\" \n        strokeWidth=\"2\" \n        strokeLinecap=\"round\" \n        strokeLinejoin=\"round\"\n      />\n      <path \n        d=\"M9 9L9 16\" \n        stroke=\"currentColor\" \n        strokeWidth=\"2\" \n        strokeLinecap=\"round\" \n        strokeLinejoin=\"round\"\n      />\n      <path \n        d=\"M15 9L13 9C12.4477 9 12 9.44772 12 10L12 11.5C12 12.0523 12.4477 12.5 13 12.5L14 12.5C14.5523 12.5 15 12.9477 15 13.5L15 15C15 15.5523 14.5523 16 14 16L12 16\" \n        stroke=\"currentColor\" \n        strokeWidth=\"2\" \n        strokeLinecap=\"round\" \n        strokeLinejoin=\"round\"\n      />\n      <path \n        d=\"M12 4L4.5 4M4.5 4L6.5 2M4.5 4L6.5 6\" \n        stroke=\"currentColor\" \n        strokeWidth=\"2\" \n        strokeLinecap=\"round\" \n        strokeLinejoin=\"round\"\n      />\n    </svg>\n  );\n}; ","import React from 'react';\n\ninterface SkipForwardIconProps {\n  size?: number;\n  className?: string;\n}\n\nexport const SkipForwardIcon: React.FC<SkipForwardIconProps> = ({ size = 24, className = '' }) => {\n  return (\n    <svg \n      width={size} \n      height={size} \n      strokeWidth=\"2\" \n      viewBox=\"0 0 24 24\" \n      fill=\"none\" \n      xmlns=\"http://www.w3.org/2000/svg\"\n      className={className}\n    >\n      <path \n        d=\"M21 13C21 17.9706 16.9706 22 12 22C7.02944 22 3 17.9706 3 13C3 8.02944 7.02944 4 12 4\" \n        stroke=\"currentColor\" \n        strokeLinecap=\"round\" \n        strokeLinejoin=\"round\"\n      />\n      <path \n        d=\"M12 4H19.5M19.5 4L17.5 2M19.5 4L17.5 6\" \n        stroke=\"currentColor\" \n        strokeLinecap=\"round\" \n        strokeLinejoin=\"round\"\n      />\n      <path \n        d=\"M9 9L9 16\" \n        stroke=\"currentColor\" \n        strokeLinecap=\"round\" \n        strokeLinejoin=\"round\"\n      />\n      <path \n        d=\"M15 9L13 9C12.4477 9 12 9.44772 12 10L12 11.5C12 12.0523 12.4477 12.5 13 12.5L14 12.5C14.5523 12.5 15 12.9477 15 13.5L15 15C15 15.5523 14.5523 16 14 16L12 16\" \n        stroke=\"currentColor\" \n        strokeLinecap=\"round\" \n        strokeLinejoin=\"round\"\n      />\n    </svg>\n  );\n}; ","import React from 'react';\n\ninterface BigPlayIconProps {\n  size?: number;\n  className?: string;\n}\n\nexport const BigPlayIcon: React.FC<BigPlayIconProps> = ({ size = 40, className = '' }) => {\n  return (\n    <svg \n      width={size} \n      height={size} \n      viewBox=\"0 0 24 24\" \n      fill=\"currentColor\" \n      xmlns=\"http://www.w3.org/2000/svg\"\n      className={className}\n    >\n      <path \n        fillRule=\"evenodd\" \n        d=\"M4.5 5.653c0-1.427 1.529-2.33 2.779-1.643l11.54 6.347c1.295.712 1.295 2.573 0 3.286L7.28 19.99c-1.25.687-2.779-.217-2.779-1.643V5.653Z\" \n        clipRule=\"evenodd\" \n      />\n    </svg>\n  );\n}; ","import { renderToStaticMarkup } from 'react-dom/server';\nimport { createElement } from 'react';\n\n/**\n * Renders a React component to an HTML string for use in Shaka UI buttons\n */\nexport const renderIcon = (Component: React.ComponentType<any>, props: any = {}) => {\n  return renderToStaticMarkup(createElement(Component, props));\n}; ","import { useCallback } from 'react';\n\ninterface EventHandlers {\n  onPlay?: () => void;\n  onPause?: () => void;\n  onEnded?: () => void;\n  onLoadStart?: () => void;\n  onCanPlay?: () => void;\n}\n\nexport const useEventHandlers = (\n  videoRef: React.RefObject<HTMLVideoElement>,\n  handlers: EventHandlers\n) => {\n  const setupEventListeners = useCallback(() => {\n    const video = videoRef.current;\n    if (!video) return;\n\n    const { onPlay, onPause, onEnded, onLoadStart, onCanPlay } = handlers;\n\n    if (onPlay) video.addEventListener('play', onPlay);\n    if (onPause) video.addEventListener('pause', onPause);\n    if (onEnded) video.addEventListener('ended', onEnded);\n    if (onLoadStart) video.addEventListener('loadstart', onLoadStart);\n    if (onCanPlay) video.addEventListener('canplay', onCanPlay);\n  }, [videoRef, handlers]);\n\n  const cleanupEventListeners = useCallback(() => {\n    const video = videoRef.current;\n    if (!video) return;\n\n    const { onPlay, onPause, onEnded, onLoadStart, onCanPlay } = handlers;\n\n    if (onPlay) video.removeEventListener('play', onPlay);\n    if (onPause) video.removeEventListener('pause', onPause);\n    if (onEnded) video.removeEventListener('ended', onEnded);\n    if (onLoadStart) video.removeEventListener('loadstart', onLoadStart);\n    if (onCanPlay) video.removeEventListener('canplay', onCanPlay);\n  }, [videoRef, handlers]);\n\n  return {\n    setupEventListeners,\n    cleanupEventListeners\n  };\n}; ","import { useEffect, useState, useRef } from 'react';\n\ninterface UseLiveBadgeOptions {\n  enabled?: boolean;\n  onLiveStateChange?: (isLive: boolean) => void;\n  liveThresholdSeconds?: number;\n}\n\nexport const useLiveBadge = (\n  playerRef: React.RefObject<any>,\n  options: UseLiveBadgeOptions = {}\n) => {\n  const [isLive, setIsLive] = useState(false);\n  const [isVisible, setIsVisible] = useState(false);\n  const [isNearLiveEdge, setIsNearLiveEdge] = useState(false);\n  const intervalRef = useRef<NodeJS.Timeout | null>(null);\n  const { enabled = true, onLiveStateChange, liveThresholdSeconds = 15 } = options;\n\n  const checkLiveStatus = () => {\n    if (!playerRef.current || !enabled) {\n      return;\n    }\n\n    try {\n      // Check if player has loaded content and is ready\n      const player = playerRef.current;\n      \n      // Multiple checks to ensure player is ready\n      if (!player.getManifest || \n          !player.getPresentationTimeline || \n          typeof player.getPresentationTimeline !== 'function') {\n        return;\n      }\n\n      const manifest = player.getManifest();\n      if (!manifest) {\n        return;\n      }\n\n      // Now safely get the presentation timeline\n      const timeline = player.getPresentationTimeline();\n      if (!timeline || typeof timeline.isLive !== 'function') {\n        return;\n      }\n\n      const liveStatus = timeline.isLive();\n      \n      // Check if we're near the live edge (within threshold)\n      let nearLiveEdge = false;\n      if (liveStatus) {\n        try {\n          // Get the seek range to find the live edge\n          const seekRange = player.getSeekRange();\n          const videoElement = player.getMediaElement();\n          \n          if (seekRange && videoElement) {\n            const liveEdge = seekRange.end;\n            const currentTime = videoElement.currentTime;\n            const timeBehindLive = liveEdge - currentTime;\n            \n            // Consider \"near live edge\" if within the threshold\n            nearLiveEdge = timeBehindLive <= liveThresholdSeconds;\n          }\n        } catch (error) {\n          console.error('Error checking live edge position:', error);\n          // Fallback to showing live indicator if we can't determine position\n          nearLiveEdge = liveStatus;\n        }\n      }\n      \n      if (liveStatus !== isLive) {\n        setIsLive(liveStatus);\n        onLiveStateChange?.(liveStatus);\n      }\n      \n      // Update visibility based on near live edge status\n      if (nearLiveEdge !== isNearLiveEdge) {\n        setIsNearLiveEdge(nearLiveEdge);\n        setIsVisible(nearLiveEdge);\n      }\n    } catch (error) {\n      // Only log errors that aren't related to player not being ready\n      if (error instanceof Error && !error.message.includes('not a function')) {\n        console.error('Error checking live status:', error);\n      }\n    }\n  };\n\n  useEffect(() => {\n    if (!enabled) {\n      setIsLive(false);\n      setIsVisible(false);\n      setIsNearLiveEdge(false);\n      return;\n    }\n\n    // Check immediately\n    checkLiveStatus();\n\n    // Set up interval to check periodically (more frequent for better responsiveness)\n    intervalRef.current = setInterval(checkLiveStatus, 1000);\n\n    return () => {\n      if (intervalRef.current) {\n        clearInterval(intervalRef.current);\n        intervalRef.current = null;\n      }\n    };\n  }, [enabled, playerRef.current, liveThresholdSeconds]);\n\n  // Clean up on unmount\n  useEffect(() => {\n    return () => {\n      if (intervalRef.current) {\n        clearInterval(intervalRef.current);\n      }\n    };\n  }, []);\n\n  const hideBadge = () => setIsVisible(false);\n  const showBadge = () => setIsVisible(true);\n\n  return {\n    isLive,\n    isVisible,\n    isNearLiveEdge,\n    hideBadge,\n    showBadge,\n    checkLiveStatus\n  };\n}; ","import { useEffect, useState, useRef } from 'react';\n\ninterface UsePosterFallbackOptions {\n  enabled?: boolean;\n  fallbackPoster?: string;\n  showLoadingOverlay?: boolean;\n}\n\nexport const usePosterFallback = (\n  playerRef: React.RefObject<any>,\n  options: UsePosterFallbackOptions = {}\n) => {\n  const [isLoading, setIsLoading] = useState(true);\n  const [showOverlay, setShowOverlay] = useState(true);\n  const [hasStartedPlaying, setHasStartedPlaying] = useState(false);\n  const { enabled = true, fallbackPoster, showLoadingOverlay = true } = options;\n\n  useEffect(() => {\n    if (!playerRef.current || !enabled) {\n      return;\n    }\n\n    const handleLoadStart = () => {\n      setIsLoading(true);\n      setShowOverlay(true);\n    };\n\n    const handleCanPlay = () => {\n      setIsLoading(false);\n      // Keep overlay visible until user interaction or autoplay starts\n      if (!hasStartedPlaying) {\n        setShowOverlay(true);\n      }\n    };\n\n    const handlePlay = () => {\n      setHasStartedPlaying(true);\n      setShowOverlay(false);\n    };\n\n    const handleLoadedMetadata = () => {\n      setIsLoading(false);\n    };\n\n    // Add event listeners\n    const video = playerRef.current;\n    if (video) {\n      video.addEventListener('loadstart', handleLoadStart);\n      video.addEventListener('canplay', handleCanPlay);\n      video.addEventListener('play', handlePlay);\n      video.addEventListener('loadedmetadata', handleLoadedMetadata);\n\n      return () => {\n        video.removeEventListener('loadstart', handleLoadStart);\n        video.removeEventListener('canplay', handleCanPlay);\n        video.removeEventListener('play', handlePlay);\n        video.removeEventListener('loadedmetadata', handleLoadedMetadata);\n      };\n    }\n  }, [playerRef, enabled, hasStartedPlaying]);\n\n  const hideOverlay = () => {\n    setShowOverlay(false);\n  };\n\n  return {\n    isLoading,\n    showOverlay: showLoadingOverlay && showOverlay,\n    hideOverlay,\n    hasStartedPlaying\n  };\n}; ","import { useEffect, useRef } from 'react';\n\ninterface UseLiveIndicatorOptions {\n  enabled?: boolean;\n  indicatorColor?: string;\n  indicatorSize?: number;\n  showPulseAnimation?: boolean;\n  liveThresholdSeconds?: number;\n}\n\nexport const useLiveIndicator = (\n  containerRef: React.RefObject<HTMLElement>,\n  playerRef: React.RefObject<any>,\n  options: UseLiveIndicatorOptions = {}\n) => {\n  const observerRef = useRef<MutationObserver | null>(null);\n  const intervalRef = useRef<NodeJS.Timeout | null>(null);\n  const { \n    enabled = true, \n    indicatorColor = '#ff0000',\n    indicatorSize = 8,\n    showPulseAnimation = true,\n    liveThresholdSeconds = 15\n  } = options;\n\n  const isNearLiveEdge = (player: any): boolean => {\n    if (!player) return false;\n\n    try {\n      // Multiple checks to ensure player is ready\n      if (!player.getManifest || \n          !player.getPresentationTimeline || \n          typeof player.getPresentationTimeline !== 'function') {\n        return false;\n      }\n\n      const manifest = player.getManifest();\n      if (!manifest) {\n        return false;\n      }\n\n      // Now safely get the presentation timeline\n      const timeline = player.getPresentationTimeline();\n      if (!timeline || typeof timeline.isLive !== 'function') {\n        return false;\n      }\n\n      const liveStatus = timeline.isLive();\n      if (!liveStatus) return false;\n\n      // Get the seek range to find the live edge\n      const seekRange = player.getSeekRange();\n      const videoElement = player.getMediaElement();\n      \n      if (seekRange && videoElement) {\n        const liveEdge = seekRange.end;\n        const currentTime = videoElement.currentTime;\n        const timeBehindLive = liveEdge - currentTime;\n        \n        // Consider \"near live edge\" if within the threshold\n        return timeBehindLive <= liveThresholdSeconds;\n      }\n\n      return false;\n    } catch (error) {\n      console.error('Error checking live edge position in indicator:', error);\n      return false;\n    }\n  };\n\n  useEffect(() => {\n    if (!containerRef.current || !playerRef.current || !enabled) {\n      return;\n    }\n\n    const addLiveIndicator = (currentTimeElement: Element) => {\n      // Check if indicator already exists\n      if (currentTimeElement.querySelector('.live-indicator-dot')) {\n        return;\n      }\n\n      // Create the red circle indicator\n      const indicator = document.createElement('span');\n      indicator.className = 'live-indicator-dot';\n      indicator.style.cssText = `\n        display: inline-block;\n        width: ${indicatorSize}px;\n        height: ${indicatorSize}px;\n        background-color: ${indicatorColor};\n        border-radius: 50%;\n        margin-right: 6px;\n        vertical-align: middle;\n        ${showPulseAnimation ? 'animation: pulse-live 2s infinite;' : ''}\n      `;\n\n      // Insert the indicator at the beginning of the current time element\n      currentTimeElement.insertBefore(indicator, currentTimeElement.firstChild);\n    };\n\n    const removeLiveIndicator = (currentTimeElement: Element) => {\n      const indicator = currentTimeElement.querySelector('.live-indicator-dot');\n      if (indicator) {\n        indicator.remove();\n      }\n    };\n\n    const checkForLiveContent = () => {\n      const currentTimeElements = containerRef.current?.querySelectorAll('.shaka-current-time');\n      \n      currentTimeElements?.forEach((element) => {\n        const textContent = element.textContent?.trim() || '';\n        \n        // Check if this is a live stream and if we're near the live edge\n        if (textContent.toLowerCase().includes('live') && isNearLiveEdge(playerRef.current)) {\n          addLiveIndicator(element);\n        } else {\n          removeLiveIndicator(element);\n        }\n      });\n    };\n\n    // Initial check\n    checkForLiveContent();\n\n    // Set up interval to check periodically (since we need to check live edge position)\n    intervalRef.current = setInterval(checkForLiveContent, 1000);\n\n    // Set up mutation observer to watch for changes in the DOM\n    observerRef.current = new MutationObserver((mutations) => {\n      let shouldCheck = false;\n      \n      mutations.forEach((mutation) => {\n        // Check if any nodes were added or text content changed\n        if (mutation.type === 'childList' || mutation.type === 'characterData') {\n          shouldCheck = true;\n        }\n        \n        // Check if any of the added nodes contain current time elements\n        mutation.addedNodes.forEach((node) => {\n          if (node.nodeType === Node.ELEMENT_NODE) {\n            const element = node as Element;\n            if (element.classList?.contains('shaka-current-time') || \n                element.querySelector?.('.shaka-current-time')) {\n              shouldCheck = true;\n            }\n          }\n        });\n      });\n      \n      if (shouldCheck) {\n        // Debounce the check to avoid excessive calls\n        setTimeout(checkForLiveContent, 100);\n      }\n    });\n\n    // Start observing\n    observerRef.current.observe(containerRef.current, {\n      childList: true,\n      subtree: true,\n      characterData: true,\n      characterDataOldValue: true\n    });\n\n    return () => {\n      if (observerRef.current) {\n        observerRef.current.disconnect();\n      }\n      if (intervalRef.current) {\n        clearInterval(intervalRef.current);\n      }\n    };\n  }, [containerRef, playerRef, enabled, indicatorColor, indicatorSize, showPulseAnimation, liveThresholdSeconds]);\n\n  return {\n    // Expose method to manually trigger check if needed\n    checkForLiveContent: () => {\n      const currentTimeElements = containerRef.current?.querySelectorAll('.shaka-current-time');\n      currentTimeElements?.forEach((element) => {\n        const textContent = element.textContent?.trim() || '';\n        if (textContent.toLowerCase().includes('live') && isNearLiveEdge(playerRef.current)) {\n          // Add indicator logic here if needed\n        }\n      });\n    }\n  };\n}; ","import { useCallback, useEffect } from 'react';\n\ninterface UseKeyboardControlsOptions {\n  skipBack?: () => void;\n  skipForward?: () => void;\n  enabled?: boolean;\n}\n\nexport const useKeyboardControls = (\n  videoRef: React.RefObject<HTMLVideoElement>,\n  options: UseKeyboardControlsOptions = {}\n) => {\n  const { skipBack, skipForward, enabled = true } = options;\n\n  // Detect if we're on desktop (not mobile)\n  const isDesktop = useCallback(() => {\n    return window.innerWidth > 767 && !/Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n  }, []);\n\n  const handleKeydown = useCallback((event: KeyboardEvent) => {\n    if (!enabled || !isDesktop() || !videoRef.current) return;\n\n    // Don't handle keyboard events if user is typing in an input\n    const activeElement = document.activeElement;\n    if (activeElement && (\n      activeElement.tagName === 'INPUT' ||\n      activeElement.tagName === 'TEXTAREA' ||\n      (activeElement as HTMLElement).isContentEditable\n    )) {\n      return;\n    }\n\n    switch (event.key) {\n      case 'ArrowLeft':\n        event.preventDefault();\n        skipBack?.();\n        break;\n      \n      case 'ArrowRight':\n        event.preventDefault();\n        skipForward?.();\n        break;\n      \n      case ' ':\n      case 'Space':\n        event.preventDefault();\n        if (videoRef.current.paused) {\n          videoRef.current.play();\n        } else {\n          videoRef.current.pause();\n        }\n        break;\n    }\n  }, [enabled, videoRef, skipBack, skipForward, isDesktop]);\n\n  useEffect(() => {\n    if (!enabled || !isDesktop()) return;\n\n    // Add event listener to document to catch keyboard events globally\n    document.addEventListener('keydown', handleKeydown);\n\n    return () => {\n      document.removeEventListener('keydown', handleKeydown);\n    };\n  }, [handleKeydown, enabled, isDesktop]);\n\n  return {\n    isDesktop: isDesktop()\n  };\n}; ","import React from 'react';\nimport { twMerge } from 'tailwind-merge';\n\ninterface LoadingProps {\n  className?: string;\n}\n\nexport const Loading: React.FC<LoadingProps> = ({ className }) => (\n  <div\n    className={twMerge(\n      \"relative bg-[#151515] md:rounded-2xl! overflow-hidden aspect-video text-white w-full h-full flex justify-center items-center text-[10px]\",\n      className\n    )}\n    role=\"status\"\n  >\n    {/* Spinner inspired by Shaka Player's buffering indicator */}\n    <div className=\"shaka-spinner-container flex justify-center items-center\">\n      <svg\n        className=\"shaka-spinner-svg animate-spin h-12 w-12\"\n        viewBox=\"0 0 64 64\"\n        xmlns=\"http://www.w3.org/2000/svg\"\n      >\n        <circle\n          className=\"shaka-spinner-path\"\n          cx=\"32\"\n          cy=\"32\"\n          r=\"28\"\n          strokeWidth=\"4\"\n          strokeLinecap=\"round\"\n        />\n      </svg>\n    </div>\n    <span className=\"sr-only\">Loading...</span>\n  </div>\n); ","import React from 'react';\n\ninterface ErrorScreenProps {\n  title?: string;\n  description?: string;\n}\n\nexport const ErrorScreen: React.FC<ErrorScreenProps> = ({ title, description }) => (\n  <div className=\"w-full h-full md:rounded-2xl! aspect-video bg-black\">\n    <div className=\"bg-[#151515] text-white w-full h-full flex justify-stretch items-center\">\n      <svg\n        className=\"w-24 h-24 m-6\"\n        fill=\"none\"\n        stroke=\"currentColor\"\n        strokeWidth=\"2\"\n        style={{ width: 96 }}\n        viewBox=\"0 0 24 24\"\n        xmlns=\"http://www.w3.org/2000/svg\"\n      >\n        <path\n          d=\"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z\"\n          strokeLinecap=\"round\"\n          strokeLinejoin=\"round\"\n        />\n      </svg>\n      <div>\n        <h3 className=\"text-2xl mb-2\">{title || \"Playback Error\"}</h3>\n        <div className=\"text-lg\">{description || \"Unable to play the video. Please try again later.\"}</div>\n      </div>\n    </div>\n  </div>\n); ","import React from 'react';\n\ninterface TitleProps {\n  title: string;\n}\n\nexport const Title: React.FC<TitleProps> = ({ title }) => (\n  <div className=\"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-4\">\n    <h2 className=\"text-white text-xl font-semibold\">{title}</h2>\n  </div>\n); ","import React from 'react';\n\ninterface LiveBadgeProps {\n  isVisible: boolean;\n  position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';\n  className?: string;\n  style?: React.CSSProperties;\n  text?: string;\n}\n\nexport const LiveBadge: React.FC<LiveBadgeProps> = ({\n  isVisible,\n  position = 'top-right',\n  className = '',\n  style = {},\n  text = 'LIVE'\n}) => {\n  if (!isVisible) return null;\n\n  const positionClasses = {\n    'top-left': 'top-4 left-4',\n    'top-right': 'top-4 right-4',\n    'bottom-left': 'bottom-4 left-4',\n    'bottom-right': 'bottom-4 right-4'\n  };\n\n  return (\n    <div\n      className={`\n        absolute z-50 \n        ${positionClasses[position]}\n        bg-red-600 text-white \n        px-2 py-1 \n        rounded-md \n        text-xs font-bold \n        uppercase tracking-wide\n        shadow-lg\n        animate-pulse\n        pointer-events-none\n        ${className}\n      `}\n      style={style}\n    >\n      <span className=\"flex items-center gap-1\">\n        <span className=\"w-2 h-2 bg-white rounded-full animate-pulse\"></span>\n        {text}\n      </span>\n    </div>\n  );\n}; ","import styleInject from '#style-inject';styleInject(\"/*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */\\n@layer properties;\\n@layer theme, base, components, utilities;\\n@layer theme {\\n  :root,\\n  :host {\\n    --font-sans:\\n      ui-sans-serif,\\n      system-ui,\\n      sans-serif,\\n      \\\"Apple Color Emoji\\\",\\n      \\\"Segoe UI Emoji\\\",\\n      \\\"Segoe UI Symbol\\\",\\n      \\\"Noto Color Emoji\\\";\\n    --font-mono:\\n      ui-monospace,\\n      SFMono-Regular,\\n      Menlo,\\n      Monaco,\\n      Consolas,\\n      \\\"Liberation Mono\\\",\\n      \\\"Courier New\\\",\\n      monospace;\\n    --color-red-600: oklch(57.7% 0.245 27.325);\\n    --color-black: #000;\\n    --color-white: #fff;\\n    --spacing: 0.25rem;\\n    --text-xs: 0.75rem;\\n    --text-xs--line-height: calc(1 / 0.75);\\n    --text-sm: 0.875rem;\\n    --text-sm--line-height: calc(1.25 / 0.875);\\n    --text-base: 1rem;\\n    --text-base--line-height: calc(1.5 / 1);\\n    --text-lg: 1.125rem;\\n    --text-lg--line-height: calc(1.75 / 1.125);\\n    --text-xl: 1.25rem;\\n    --text-xl--line-height: calc(1.75 / 1.25);\\n    --text-2xl: 1.5rem;\\n    --text-2xl--line-height: calc(2 / 1.5);\\n    --text-5xl: 3rem;\\n    --text-5xl--line-height: 1;\\n    --font-weight-medium: 500;\\n    --font-weight-semibold: 600;\\n    --font-weight-bold: 700;\\n    --tracking-wide: 0.025em;\\n    --tracking-widest: 0.1em;\\n    --radius-md: 0.375rem;\\n    --radius-2xl: 1rem;\\n    --animate-spin: spin 1s linear infinite;\\n    --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\\n    --aspect-video: 16 / 9;\\n    --default-transition-duration: 150ms;\\n    --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\\n    --default-font-family: var(--font-sans);\\n    --default-mono-font-family: var(--font-mono);\\n  }\\n}\\n@layer base {\\n  *,\\n  ::after,\\n  ::before,\\n  ::backdrop,\\n  ::file-selector-button {\\n    box-sizing: border-box;\\n    margin: 0;\\n    padding: 0;\\n    border: 0 solid;\\n  }\\n  html,\\n  :host {\\n    line-height: 1.5;\\n    -webkit-text-size-adjust: 100%;\\n    tab-size: 4;\\n    font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, \\\"Apple Color Emoji\\\", \\\"Segoe UI Emoji\\\", \\\"Segoe UI Symbol\\\", \\\"Noto Color Emoji\\\");\\n    font-feature-settings: var(--default-font-feature-settings, normal);\\n    font-variation-settings: var(--default-font-variation-settings, normal);\\n    -webkit-tap-highlight-color: transparent;\\n  }\\n  hr {\\n    height: 0;\\n    color: inherit;\\n    border-top-width: 1px;\\n  }\\n  abbr:where([title]) {\\n    -webkit-text-decoration: underline dotted;\\n    text-decoration: underline dotted;\\n  }\\n  h1,\\n  h2,\\n  h3,\\n  h4,\\n  h5,\\n  h6 {\\n    font-size: inherit;\\n    font-weight: inherit;\\n  }\\n  a {\\n    color: inherit;\\n    -webkit-text-decoration: inherit;\\n    text-decoration: inherit;\\n  }\\n  b,\\n  strong {\\n    font-weight: bolder;\\n  }\\n  code,\\n  kbd,\\n  samp,\\n  pre {\\n    font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\\"Liberation Mono\\\", \\\"Courier New\\\", monospace);\\n    font-feature-settings: var(--default-mono-font-feature-settings, normal);\\n    font-variation-settings: var(--default-mono-font-variation-settings, normal);\\n    font-size: 1em;\\n  }\\n  small {\\n    font-size: 80%;\\n  }\\n  sub,\\n  sup {\\n    font-size: 75%;\\n    line-height: 0;\\n    position: relative;\\n    vertical-align: baseline;\\n  }\\n  sub {\\n    bottom: -0.25em;\\n  }\\n  sup {\\n    top: -0.5em;\\n  }\\n  table {\\n    text-indent: 0;\\n    border-color: inherit;\\n    border-collapse: collapse;\\n  }\\n  :-moz-focusring {\\n    outline: auto;\\n  }\\n  progress {\\n    vertical-align: baseline;\\n  }\\n  summary {\\n    display: list-item;\\n  }\\n  ol,\\n  ul,\\n  menu {\\n    list-style: none;\\n  }\\n  img,\\n  svg,\\n  video,\\n  canvas,\\n  audio,\\n  iframe,\\n  embed,\\n  object {\\n    display: block;\\n    vertical-align: middle;\\n  }\\n  img,\\n  video {\\n    max-width: 100%;\\n    height: auto;\\n  }\\n  button,\\n  input,\\n  select,\\n  optgroup,\\n  textarea,\\n  ::file-selector-button {\\n    font: inherit;\\n    font-feature-settings: inherit;\\n    font-variation-settings: inherit;\\n    letter-spacing: inherit;\\n    color: inherit;\\n    border-radius: 0;\\n    background-color: transparent;\\n    opacity: 1;\\n  }\\n  :where(select:is([multiple], [size])) optgroup {\\n    font-weight: bolder;\\n  }\\n  :where(select:is([multiple], [size])) optgroup option {\\n    padding-inline-start: 20px;\\n  }\\n  ::file-selector-button {\\n    margin-inline-end: 4px;\\n  }\\n  ::placeholder {\\n    opacity: 1;\\n  }\\n  @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\\n    ::placeholder {\\n      color: currentcolor;\\n      @supports (color: color-mix(in lab, red, red)) {\\n        color: color-mix(in oklab, currentcolor 50%, transparent);\\n      }\\n    }\\n  }\\n  textarea {\\n    resize: vertical;\\n  }\\n  ::-webkit-search-decoration {\\n    -webkit-appearance: none;\\n  }\\n  ::-webkit-date-and-time-value {\\n    min-height: 1lh;\\n    text-align: inherit;\\n  }\\n  ::-webkit-datetime-edit {\\n    display: inline-flex;\\n  }\\n  ::-webkit-datetime-edit-fields-wrapper {\\n    padding: 0;\\n  }\\n  ::-webkit-datetime-edit,\\n  ::-webkit-datetime-edit-year-field,\\n  ::-webkit-datetime-edit-month-field,\\n  ::-webkit-datetime-edit-day-field,\\n  ::-webkit-datetime-edit-hour-field,\\n  ::-webkit-datetime-edit-minute-field,\\n  ::-webkit-datetime-edit-second-field,\\n  ::-webkit-datetime-edit-millisecond-field,\\n  ::-webkit-datetime-edit-meridiem-field {\\n    padding-block: 0;\\n  }\\n  :-moz-ui-invalid {\\n    box-shadow: none;\\n  }\\n  button,\\n  input:where([type=button], [type=reset], [type=submit]),\\n  ::file-selector-button {\\n    appearance: button;\\n  }\\n  ::-webkit-inner-spin-button,\\n  ::-webkit-outer-spin-button {\\n    height: auto;\\n  }\\n  [hidden]:where(:not([hidden=until-found])) {\\n    display: none !important;\\n  }\\n}\\n@layer utilities {\\n  .pointer-events-auto {\\n    pointer-events: auto;\\n  }\\n  .pointer-events-none {\\n    pointer-events: none;\\n  }\\n  .visible {\\n    visibility: visible;\\n  }\\n  .sr-only {\\n    position: absolute;\\n    width: 1px;\\n    height: 1px;\\n    padding: 0;\\n    margin: -1px;\\n    overflow: hidden;\\n    clip: rect(0, 0, 0, 0);\\n    white-space: nowrap;\\n    border-width: 0;\\n  }\\n  .absolute {\\n    position: absolute;\\n  }\\n  .fixed {\\n    position: fixed;\\n  }\\n  .relative {\\n    position: relative;\\n  }\\n  .static {\\n    position: static;\\n  }\\n  .inset-0 {\\n    inset: calc(var(--spacing) * 0);\\n  }\\n  .top-0 {\\n    top: calc(var(--spacing) * 0);\\n  }\\n  .top-4 {\\n    top: calc(var(--spacing) * 4);\\n  }\\n  .right-0 {\\n    right: calc(var(--spacing) * 0);\\n  }\\n  .right-4 {\\n    right: calc(var(--spacing) * 4);\\n  }\\n  .bottom-0 {\\n    bottom: calc(var(--spacing) * 0);\\n  }\\n  .bottom-4 {\\n    bottom: calc(var(--spacing) * 4);\\n  }\\n  .left-0 {\\n    left: calc(var(--spacing) * 0);\\n  }\\n  .left-4 {\\n    left: calc(var(--spacing) * 4);\\n  }\\n  .z-10 {\\n    z-index: 10;\\n  }\\n  .z-50 {\\n    z-index: 50;\\n  }\\n  .container {\\n    width: 100%;\\n    @media (width >= 40rem) {\\n      max-width: 40rem;\\n    }\\n    @media (width >= 48rem) {\\n      max-width: 48rem;\\n    }\\n    @media (width >= 64rem) {\\n      max-width: 64rem;\\n    }\\n    @media (width >= 80rem) {\\n      max-width: 80rem;\\n    }\\n    @media (width >= 96rem) {\\n      max-width: 96rem;\\n    }\\n  }\\n  .m-6 {\\n    margin: calc(var(--spacing) * 6);\\n  }\\n  .mt-1 {\\n    margin-top: calc(var(--spacing) * 1);\\n  }\\n  .mt-3 {\\n    margin-top: calc(var(--spacing) * 3);\\n  }\\n  .mb-2 {\\n    margin-bottom: calc(var(--spacing) * 2);\\n  }\\n  .mb-6 {\\n    margin-bottom: calc(var(--spacing) * 6);\\n  }\\n  .flex {\\n    display: flex;\\n  }\\n  .grid {\\n    display: grid;\\n  }\\n  .aspect-video {\\n    aspect-ratio: var(--aspect-video);\\n  }\\n  .h-2 {\\n    height: calc(var(--spacing) * 2);\\n  }\\n  .h-12 {\\n    height: calc(var(--spacing) * 12);\\n  }\\n  .h-24 {\\n    height: calc(var(--spacing) * 24);\\n  }\\n  .h-full {\\n    height: 100%;\\n  }\\n  .w-2 {\\n    width: calc(var(--spacing) * 2);\\n  }\\n  .w-12 {\\n    width: calc(var(--spacing) * 12);\\n  }\\n  .w-24 {\\n    width: calc(var(--spacing) * 24);\\n  }\\n  .w-full {\\n    width: 100%;\\n  }\\n  .animate-pulse {\\n    animation: var(--animate-pulse);\\n  }\\n  .animate-spin {\\n    animation: var(--animate-spin);\\n  }\\n  .auto-cols-max {\\n    grid-auto-columns: max-content;\\n  }\\n  .grid-flow-col {\\n    grid-auto-flow: column;\\n  }\\n  .flex-col {\\n    flex-direction: column;\\n  }\\n  .items-center {\\n    align-items: center;\\n  }\\n  .justify-center {\\n    justify-content: center;\\n  }\\n  .justify-stretch {\\n    justify-content: stretch;\\n  }\\n  .gap-1 {\\n    gap: calc(var(--spacing) * 1);\\n  }\\n  .gap-5 {\\n    gap: calc(var(--spacing) * 5);\\n  }\\n  .overflow-hidden {\\n    overflow: hidden;\\n  }\\n  .rounded-full {\\n    border-radius: calc(infinity * 1px);\\n  }\\n  .rounded-md {\\n    border-radius: var(--radius-md);\\n  }\\n  .bg-\\\\[\\\\#151515\\\\] {\\n    background-color: #151515;\\n  }\\n  .bg-black {\\n    background-color: var(--color-black);\\n  }\\n  .bg-red-600 {\\n    background-color: var(--color-red-600);\\n  }\\n  .bg-white {\\n    background-color: var(--color-white);\\n  }\\n  .bg-gradient-to-t {\\n    --tw-gradient-position: to top in oklab;\\n    background-image: linear-gradient(var(--tw-gradient-stops));\\n  }\\n  .from-black\\\\/70 {\\n    --tw-gradient-from: color-mix(in srgb, #000 70%, transparent);\\n    @supports (color: color-mix(in lab, red, red)) {\\n      --tw-gradient-from: color-mix(in oklab, var(--color-black) 70%, transparent);\\n    }\\n    --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));\\n  }\\n  .to-transparent {\\n    --tw-gradient-to: transparent;\\n    --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));\\n  }\\n  .bg-cover {\\n    background-size: cover;\\n  }\\n  .bg-center {\\n    background-position: center;\\n  }\\n  .bg-no-repeat {\\n    background-repeat: no-repeat;\\n  }\\n  .p-2 {\\n    padding: calc(var(--spacing) * 2);\\n  }\\n  .p-4 {\\n    padding: calc(var(--spacing) * 4);\\n  }\\n  .px-2 {\\n    padding-inline: calc(var(--spacing) * 2);\\n  }\\n  .px-4 {\\n    padding-inline: calc(var(--spacing) * 4);\\n  }\\n  .py-1 {\\n    padding-block: calc(var(--spacing) * 1);\\n  }\\n  .text-center {\\n    text-align: center;\\n  }\\n  .text-left {\\n    text-align: left;\\n  }\\n  .font-mono {\\n    font-family: var(--font-mono);\\n  }\\n  .text-2xl {\\n    font-size: var(--text-2xl);\\n    line-height: var(--tw-leading, var(--text-2xl--line-height));\\n  }\\n  .text-5xl {\\n    font-size: var(--text-5xl);\\n    line-height: var(--tw-leading, var(--text-5xl--line-height));\\n  }\\n  .text-base {\\n    font-size: var(--text-base);\\n    line-height: var(--tw-leading, var(--text-base--line-height));\\n  }\\n  .text-lg {\\n    font-size: var(--text-lg);\\n    line-height: var(--tw-leading, var(--text-lg--line-height));\\n  }\\n  .text-sm {\\n    font-size: var(--text-sm);\\n    line-height: var(--tw-leading, var(--text-sm--line-height));\\n  }\\n  .text-xl {\\n    font-size: var(--text-xl);\\n    line-height: var(--tw-leading, var(--text-xl--line-height));\\n  }\\n  .text-xs {\\n    font-size: var(--text-xs);\\n    line-height: var(--tw-leading, var(--text-xs--line-height));\\n  }\\n  .text-\\\\[10px\\\\] {\\n    font-size: 10px;\\n  }\\n  .font-bold {\\n    --tw-font-weight: var(--font-weight-bold);\\n    font-weight: var(--font-weight-bold);\\n  }\\n  .font-medium {\\n    --tw-font-weight: var(--font-weight-medium);\\n    font-weight: var(--font-weight-medium);\\n  }\\n  .font-semibold {\\n    --tw-font-weight: var(--font-weight-semibold);\\n    font-weight: var(--font-weight-semibold);\\n  }\\n  .tracking-wide {\\n    --tw-tracking: var(--tracking-wide);\\n    letter-spacing: var(--tracking-wide);\\n  }\\n  .tracking-widest {\\n    --tw-tracking: var(--tracking-widest);\\n    letter-spacing: var(--tracking-widest);\\n  }\\n  .text-white {\\n    color: var(--color-white);\\n  }\\n  .uppercase {\\n    text-transform: uppercase;\\n  }\\n  .shadow-lg {\\n    --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\\n    box-shadow:\\n      var(--tw-inset-shadow),\\n      var(--tw-inset-ring-shadow),\\n      var(--tw-ring-offset-shadow),\\n      var(--tw-ring-shadow),\\n      var(--tw-shadow);\\n  }\\n  .filter {\\n    filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);\\n  }\\n  .md\\\\:rounded-2xl {\\n    @media (width >= 48rem) {\\n      border-radius: var(--radius-2xl);\\n    }\\n  }\\n  .md\\\\:rounded-2xl\\\\! {\\n    @media (width >= 48rem) {\\n      border-radius: var(--radius-2xl) !important;\\n    }\\n  }\\n  .md\\\\:text-base {\\n    @media (width >= 48rem) {\\n      font-size: var(--text-base);\\n      line-height: var(--tw-leading, var(--text-base--line-height));\\n    }\\n  }\\n  .md\\\\:text-sm {\\n    @media (width >= 48rem) {\\n      font-size: var(--text-sm);\\n      line-height: var(--tw-leading, var(--text-sm--line-height));\\n    }\\n  }\\n  .md\\\\:text-xl {\\n    @media (width >= 48rem) {\\n      font-size: var(--text-xl);\\n      line-height: var(--tw-leading, var(--text-xl--line-height));\\n    }\\n  }\\n}\\n@layer components {\\n  video::-webkit-media-controls {\\n    display: none !important;\\n  }\\n  video::-webkit-media-controls-panel {\\n    display: none !important;\\n  }\\n  video::-webkit-media-controls-play-button {\\n    display: none !important;\\n  }\\n  video::-webkit-media-controls-timeline {\\n    display: none !important;\\n  }\\n  video::-webkit-media-controls-current-time-display {\\n    display: none !important;\\n  }\\n  video::-webkit-media-controls-time-remaining-display {\\n    display: none !important;\\n  }\\n  video::-webkit-media-controls-mute-button {\\n    display: none !important;\\n  }\\n  video::-webkit-media-controls-volume-slider {\\n    display: none !important;\\n  }\\n  video::-webkit-media-controls-fullscreen-button {\\n    display: none !important;\\n  }\\n  video::-webkit-media-controls-overlay-play-button {\\n    display: none !important;\\n  }\\n  video::-moz-media-controls {\\n    display: none !important;\\n  }\\n  video {\\n    outline: none !important;\\n  }\\n  video[controls] {\\n    -webkit-appearance: none !important;\\n    appearance: none !important;\\n  }\\n  video::-webkit-media-controls-enclosure {\\n    display: none !important;\\n  }\\n  video::-webkit-media-controls-start-playback-button {\\n    display: none !important;\\n  }\\n  video[controls]::-webkit-media-controls,\\n  video[controls]::-webkit-media-controls-panel,\\n  video[controls]::-webkit-media-controls-play-button,\\n  video[controls]::-webkit-media-controls-timeline,\\n  video[controls]::-webkit-media-controls-current-time-display,\\n  video[controls]::-webkit-media-controls-time-remaining-display,\\n  video[controls]::-webkit-media-controls-mute-button,\\n  video[controls]::-webkit-media-controls-volume-slider,\\n  video[controls]::-webkit-media-controls-fullscreen-button,\\n  video[controls]::-webkit-media-controls-overlay-play-button,\\n  video[controls]::-webkit-media-controls-enclosure,\\n  video[controls]::-webkit-media-controls-start-playback-button {\\n    display: none !important;\\n    visibility: hidden !important;\\n    opacity: 0 !important;\\n    pointer-events: none !important;\\n  }\\n  video[controls]::-moz-media-controls {\\n    display: none !important;\\n    visibility: hidden !important;\\n    opacity: 0 !important;\\n  }\\n  .motto-video-container {\\n    position: relative;\\n    width: 100%;\\n    min-height: 300px;\\n  }\\n  @supports (aspect-ratio: 16/9) {\\n    .motto-video-container {\\n      min-height: auto;\\n    }\\n  }\\n  .motto-video-responsive {\\n    position: absolute;\\n    top: calc(var(--spacing) * 0);\\n    left: calc(var(--spacing) * 0);\\n    height: 100%;\\n    width: 100%;\\n  }\\n  .motto-skip-button {\\n    position: absolute;\\n    top: calc(1/2 * 100%);\\n    z-index: 10;\\n    display: flex;\\n    height: calc(var(--spacing) * 16);\\n    width: calc(var(--spacing) * 16);\\n    --tw-translate-y: calc(calc(1/2 * 100%) * -1);\\n    translate: var(--tw-translate-x) var(--tw-translate-y);\\n    cursor: pointer;\\n    align-items: center;\\n    justify-content: center;\\n    border-radius: calc(infinity * 1px);\\n    border-style: var(--tw-border-style);\\n    border-width: 0px;\\n    background-color: color-mix(in srgb, #000 70%, transparent);\\n    @supports (color: color-mix(in lab, red, red)) {\\n      background-color: color-mix(in oklab, var(--color-black) 70%, transparent);\\n    }\\n    font-size: var(--text-2xl);\\n    line-height: var(--tw-leading, var(--text-2xl--line-height));\\n    color: var(--color-white);\\n    opacity: 80%;\\n    transition-property: all;\\n    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\\n    transition-duration: var(--tw-duration, var(--default-transition-duration));\\n    --tw-duration: 200ms;\\n    transition-duration: 200ms;\\n    &:hover {\\n      @media (hover: hover) {\\n        --tw-scale-x: 110%;\\n        --tw-scale-y: 110%;\\n        --tw-scale-z: 110%;\\n        scale: var(--tw-scale-x) var(--tw-scale-y);\\n      }\\n    }\\n    &:hover {\\n      @media (hover: hover) {\\n        opacity: 100%;\\n      }\\n    }\\n    &:active {\\n      --tw-scale-x: 95%;\\n      --tw-scale-y: 95%;\\n      --tw-scale-z: 95%;\\n      scale: var(--tw-scale-x) var(--tw-scale-y);\\n    }\\n  }\\n  .motto-skip-button-back {\\n    left: calc(var(--spacing) * 5);\\n  }\\n  .motto-skip-button-forward {\\n    right: calc(var(--spacing) * 5);\\n  }\\n}\\n.shaka-seek-bar-container {\\n  height: 6px !important;\\n  width: 100% !important;\\n  margin: 8px 0 !important;\\n  border-radius: 4px !important;\\n  position: relative !important;\\n  border-top: none !important;\\n  border-bottom: none !important;\\n  box-shadow: none !important;\\n}\\n.shaka-seek-bar {\\n  height: 6px !important;\\n  width: 100% !important;\\n  -webkit-appearance: none !important;\\n  appearance: none !important;\\n  background: transparent !important;\\n  cursor: pointer !important;\\n  border: none !important;\\n  outline: none !important;\\n  position: absolute !important;\\n  top: 0 !important;\\n  left: 0 !important;\\n  border-radius: 4px !important;\\n}\\n.shaka-seek-bar::-webkit-slider-runnable-track {\\n  height: 6px !important;\\n  background: transparent !important;\\n  border-radius: 4px !important;\\n  border: none !important;\\n}\\n.shaka-seek-bar::-moz-range-track {\\n  height: 6px !important;\\n  background: transparent !important;\\n  border-radius: 4px !important;\\n  border: none !important;\\n}\\n.shaka-seek-bar::-webkit-slider-thumb {\\n  -webkit-appearance: none !important;\\n  appearance: none !important;\\n  width: 16px !important;\\n  height: 16px !important;\\n  border-radius: 50% !important;\\n  background: #ffffff !important;\\n  cursor: pointer !important;\\n  border: 2px solid #ffffff !important;\\n  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;\\n  margin-top: -4px !important;\\n}\\n.shaka-seek-bar::-moz-range-thumb {\\n  width: 16px !important;\\n  height: 16px !important;\\n  border-radius: 50% !important;\\n  background: #ffffff !important;\\n  cursor: pointer !important;\\n  border: 2px solid #ffffff !important;\\n  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;\\n  margin-top: -4px !important;\\n}\\n.motto-skip-back-button,\\n.motto-skip-forward-button,\\n.motto-native-skip-button {\\n  background: transparent !important;\\n  border: none !important;\\n  padding: 4px !important;\\n  margin: 0px !important;\\n  cursor: pointer !important;\\n  color: #ffffff !important;\\n  transition: all 0.2s ease !important;\\n  min-width: 32px !important;\\n  height: 32px !important;\\n  display: flex !important;\\n  align-items: center !important;\\n  justify-content: center !important;\\n  border-radius: 4px !important;\\n  width: 25px;\\n}\\n.motto-skip-back-button:hover,\\n.motto-skip-forward-button:hover,\\n.motto-native-skip-button:hover {\\n  opacity: 0.8 !important;\\n  background: transparent !important;\\n  transform: scale(1.05) !important;\\n}\\n.motto-skip-back-button:active,\\n.motto-skip-forward-button:active,\\n.motto-native-skip-button:active {\\n  transform: scale(0.95) !important;\\n}\\n.motto-skip-back-button svg,\\n.motto-skip-forward-button svg,\\n.motto-native-skip-button svg {\\n  width: 24px !important;\\n  height: 24px !important;\\n}\\n.shaka-spinner-svg {\\n  color: white !important;\\n  fill: white !important;\\n}\\n.shaka-spinner-path {\\n  stroke: white !important;\\n  fill: none !important;\\n}\\n.shaka-spinner-container {\\n  color: white !important;\\n}\\n.shaka-buffering-spinner {\\n  color: white !important;\\n  fill: white !important;\\n}\\n.shaka-buffering-spinner svg {\\n  color: white !important;\\n  fill: white !important;\\n}\\n.shaka-buffering-spinner path {\\n  stroke: white !important;\\n  fill: none !important;\\n}\\n[data-shaka-player-container] .shaka-spinner,\\n[data-shaka-player-container] .spinner {\\n  color: white !important;\\n  border-color: white !important;\\n}\\n.material-icons.shaka-spinner {\\n  color: white !important;\\n}\\n.shaka-controls-container .shaka-spinner,\\n.shaka-video-container .shaka-spinner {\\n  color: white !important;\\n  fill: white !important;\\n}\\n.shaka-controls-container .shaka-spinner svg,\\n.shaka-video-container .shaka-spinner svg {\\n  color: white !important;\\n  fill: white !important;\\n}\\n.shaka-controls-container .shaka-spinner path,\\n.shaka-video-container .shaka-spinner path {\\n  stroke: white !important;\\n}\\n.motto-video-loading-overlay {\\n  position: absolute;\\n  top: 0;\\n  left: 0;\\n  width: 100%;\\n  height: 100%;\\n  background:\\n    linear-gradient(\\n      135deg,\\n      #1a1a1a 0%,\\n      #2d2d2d 100%);\\n  display: flex;\\n  flex-direction: column;\\n  align-items: center;\\n  justify-content: center;\\n  z-index: 10;\\n  transition: opacity 0.3s ease;\\n}\\n.motto-video-loading-overlay.hidden {\\n  opacity: 0;\\n  pointer-events: none;\\n}\\n.motto-video-loading-content {\\n  text-align: center;\\n  color: white;\\n}\\n.motto-video-loading-icon {\\n  width: 64px;\\n  height: 64px;\\n  margin-bottom: 16px;\\n  opacity: 0.7;\\n}\\n.motto-video-loading-text {\\n  font-size: 16px;\\n  font-weight: 500;\\n  margin-bottom: 8px;\\n}\\n.motto-video-loading-subtext {\\n  font-size: 14px;\\n  opacity: 0.7;\\n}\\n@keyframes pulse-live {\\n  0% {\\n    opacity: 1;\\n    transform: scale(1);\\n  }\\n  50% {\\n    opacity: 0.7;\\n    transform: scale(1.1);\\n  }\\n  100% {\\n    opacity: 1;\\n    transform: scale(1);\\n  }\\n}\\n.shaka-play-button {\\n  background: rgba(255, 255, 255, 0.1) !important;\\n  border: none !important;\\n  color: white !important;\\n  padding: 10px !important;\\n  border-radius: 100% !important;\\n  transition: all 0.2s ease !important;\\n  display: flex !important;\\n  align-items: center !important;\\n  justify-content: center !important;\\n  min-width: 55px !important;\\n  height: 55px !important;\\n}\\n.shaka-play-button-container {\\n  background: transparent;\\n  transition: all 0.2s ease !important;\\n}\\n.motto-video-container:not(.no-cursor) .shaka-play-button-container {\\n  background: rgba(0, 0, 0, 0.3);\\n  transition: all 0.s ease !important;\\n}\\n.shaka-play-button:hover {\\n  background: rgba(255, 255, 255, 0.2) !important;\\n  transform: scale(1.05) !important;\\n}\\n.shaka-play-button:active {\\n  transform: scale(0.95) !important;\\n}\\n.shaka-play-button > * {\\n  display: none !important;\\n}\\n.shaka-play-button::after {\\n  content: \\\"\\\" !important;\\n  width: 35px !important;\\n  height: 35px !important;\\n  background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"white\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M4.5 5.653c0-1.427 1.529-2.33 2.779-1.643l11.54 6.347c1.295.712 1.295 2.573 0 3.286L7.28 19.99c-1.25.687-2.779-.217-2.779-1.643V5.653Z\\\" clip-rule=\\\"evenodd\\\" /></svg>') !important;\\n  background-repeat: no-repeat !important;\\n  background-size: contain !important;\\n  background-position: center !important;\\n  display: block !important;\\n}\\n.shaka-play-button[aria-label*=Play]::after {\\n  background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"white\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M4.5 5.653c0-1.427 1.529-2.33 2.779-1.643l11.54 6.347c1.295.712 1.295 2.573 0 3.286L7.28 19.99c-1.25.687-2.779-.217-2.779-1.643V5.653Z\\\" clip-rule=\\\"evenodd\\\" /></svg>') !important;\\n}\\n.shaka-play-button[aria-label*=Pause]::after {\\n  background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"white\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M6.75 5.25a.75.75 0 0 1 .75-.75H9a.75.75 0 0 1 .75.75v13.5a.75.75 0 0 1-.75.75H7.5a.75.75 0 0 1-.75-.75V5.25Zm7.5 0A.75.75 0 0 1 15 4.5h1.5a.75.75 0 0 1 .75.75v13.5a.75.75 0 0 1-.75.75H15a.75.75 0 0 1-.75-.75V5.25Z\\\" clip-rule=\\\"evenodd\\\" /></svg>') !important;\\n}\\n.motto-video-container {\\n  background: black;\\n}\\n.motto-video-container video {\\n  width: 100% !important;\\n  height: 100% !important;\\n  margin-left: auto !important;\\n  margin-right: auto !important;\\n}\\n@property --tw-gradient-position { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-gradient-from { syntax: \\\"<color>\\\"; inherits: false; initial-value: #0000; }\\n@property --tw-gradient-via { syntax: \\\"<color>\\\"; inherits: false; initial-value: #0000; }\\n@property --tw-gradient-to { syntax: \\\"<color>\\\"; inherits: false; initial-value: #0000; }\\n@property --tw-gradient-stops { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-gradient-via-stops { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-gradient-from-position { syntax: \\\"<length-percentage>\\\"; inherits: false; initial-value: 0%; }\\n@property --tw-gradient-via-position { syntax: \\\"<length-percentage>\\\"; inherits: false; initial-value: 50%; }\\n@property --tw-gradient-to-position { syntax: \\\"<length-percentage>\\\"; inherits: false; initial-value: 100%; }\\n@property --tw-font-weight { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-tracking { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-shadow { syntax: \\\"*\\\"; inherits: false; initial-value: 0 0 #0000; }\\n@property --tw-shadow-color { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-shadow-alpha { syntax: \\\"<percentage>\\\"; inherits: false; initial-value: 100%; }\\n@property --tw-inset-shadow { syntax: \\\"*\\\"; inherits: false; initial-value: 0 0 #0000; }\\n@property --tw-inset-shadow-color { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-inset-shadow-alpha { syntax: \\\"<percentage>\\\"; inherits: false; initial-value: 100%; }\\n@property --tw-ring-color { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-ring-shadow { syntax: \\\"*\\\"; inherits: false; initial-value: 0 0 #0000; }\\n@property --tw-inset-ring-color { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-inset-ring-shadow { syntax: \\\"*\\\"; inherits: false; initial-value: 0 0 #0000; }\\n@property --tw-ring-inset { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-ring-offset-width { syntax: \\\"<length>\\\"; inherits: false; initial-value: 0px; }\\n@property --tw-ring-offset-color { syntax: \\\"*\\\"; inherits: false; initial-value: #fff; }\\n@property --tw-ring-offset-shadow { syntax: \\\"*\\\"; inherits: false; initial-value: 0 0 #0000; }\\n@property --tw-blur { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-brightness { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-contrast { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-grayscale { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-hue-rotate { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-invert { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-opacity { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-saturate { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-sepia { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-drop-shadow { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-drop-shadow-color { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-drop-shadow-alpha { syntax: \\\"<percentage>\\\"; inherits: false; initial-value: 100%; }\\n@property --tw-drop-shadow-size { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-translate-x { syntax: \\\"*\\\"; inherits: false; initial-value: 0; }\\n@property --tw-translate-y { syntax: \\\"*\\\"; inherits: false; initial-value: 0; }\\n@property --tw-translate-z { syntax: \\\"*\\\"; inherits: false; initial-value: 0; }\\n@property --tw-border-style { syntax: \\\"*\\\"; inherits: false; initial-value: solid; }\\n@property --tw-duration { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-scale-x { syntax: \\\"*\\\"; inherits: false; initial-value: 1; }\\n@property --tw-scale-y { syntax: \\\"*\\\"; inherits: false; initial-value: 1; }\\n@property --tw-scale-z { syntax: \\\"*\\\"; inherits: false; initial-value: 1; }\\n@keyframes spin {\\n  to {\\n    transform: rotate(360deg);\\n  }\\n}\\n@keyframes pulse {\\n  50% {\\n    opacity: 0.5;\\n  }\\n}\\n@layer properties {\\n  @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\\n    *,\\n    ::before,\\n    ::after,\\n    ::backdrop {\\n      --tw-gradient-position: initial;\\n      --tw-gradient-from: #0000;\\n      --tw-gradient-via: #0000;\\n      --tw-gradient-to: #0000;\\n      --tw-gradient-stops: initial;\\n      --tw-gradient-via-stops: initial;\\n      --tw-gradient-from-position: 0%;\\n      --tw-gradient-via-position: 50%;\\n      --tw-gradient-to-position: 100%;\\n      --tw-font-weight: initial;\\n      --tw-tracking: initial;\\n      --tw-shadow: 0 0 #0000;\\n      --tw-shadow-color: initial;\\n      --tw-shadow-alpha: 100%;\\n      --tw-inset-shadow: 0 0 #0000;\\n      --tw-inset-shadow-color: initial;\\n      --tw-inset-shadow-alpha: 100%;\\n      --tw-ring-color: initial;\\n      --tw-ring-shadow: 0 0 #0000;\\n      --tw-inset-ring-color: initial;\\n      --tw-inset-ring-shadow: 0 0 #0000;\\n      --tw-ring-inset: initial;\\n      --tw-ring-offset-width: 0px;\\n      --tw-ring-offset-color: #fff;\\n      --tw-ring-offset-shadow: 0 0 #0000;\\n      --tw-blur: initial;\\n      --tw-brightness: initial;\\n      --tw-contrast: initial;\\n      --tw-grayscale: initial;\\n      --tw-hue-rotate: initial;\\n      --tw-invert: initial;\\n      --tw-opacity: initial;\\n      --tw-saturate: initial;\\n      --tw-sepia: initial;\\n      --tw-drop-shadow: initial;\\n      --tw-drop-shadow-color: initial;\\n      --tw-drop-shadow-alpha: 100%;\\n      --tw-drop-shadow-size: initial;\\n      --tw-translate-x: 0;\\n      --tw-translate-y: 0;\\n      --tw-translate-z: 0;\\n      --tw-border-style: solid;\\n      --tw-duration: initial;\\n      --tw-scale-x: 1;\\n      --tw-scale-y: 1;\\n      --tw-scale-z: 1;\\n    }\\n  }\\n}\\n\")","import React, { useEffect } from 'react';\nimport { twMerge } from 'tailwind-merge';\nimport { useQuery } from '@tanstack/react-query';\nimport { Player } from './Player';\nimport type { PlayerProps } from './types';\nimport { fetchVideoData, type VideoData } from './api';\nimport { Loading, ErrorScreen, Title } from './components';\n\n// Import helper functions\nimport { errorTypes, findHLSPlaylist, getErrorType } from './helper';\nimport useMessages, { type Translations } from './messages/useMessages';\n\nexport interface VideoProps extends Omit<PlayerProps, 'src'> {\n  videoId?: string;\n  publicKey?: string;\n  videoData?: VideoData;\n  refetchInterval?: number;\n  playerName?: string;\n  locale?: string;\n  events?: {\n    onVideoData?: (video: VideoData) => void;\n    onEmptyPlaylists?: () => void;\n    onError?: (error: Error) => void;\n    onPlay?: () => void;\n    onPause?: () => void;\n    onEnded?: () => void;\n    onLoadStart?: () => void;\n    onCanPlay?: () => void;\n    onPlayerReady?: () => void;\n  };\n  children?: React.ReactNode;\n  className?: string;\n  auth?: {\n    mottoToken?: string;\n    userId?: string;\n  };\n  settings?: {\n    backgroundImageUrl?: string;\n  };\n  // TanStack Query options\n  queryOptions?: {\n    enabled?: boolean;\n    staleTime?: number;\n    cacheTime?: number;\n    retry?: number;\n    retryDelay?: number;\n  };\n}\n\nexport const Video: React.FC<VideoProps> = ({\n  videoId,\n  publicKey,\n  videoData: providedVideoData,\n  refetchInterval = 0,\n  playerName,\n  locale = 'en',\n  events,\n  children,\n  className,\n  auth,\n  settings,\n  queryOptions = {},\n  ...props\n}) => {\n  // Use TanStack Query for data fetching\n  const {\n    data,\n    isLoading,\n    error,\n    refetch\n  } = useQuery<VideoData>({\n    queryKey: ['video', videoId, publicKey, auth?.mottoToken],\n    queryFn: () => fetchVideoData(videoId!, publicKey!, auth?.mottoToken),\n    enabled: !!videoId && !!publicKey && !providedVideoData,\n    refetchInterval: refetchInterval > 0 ? refetchInterval : false,\n    staleTime: queryOptions.staleTime ?? 5 * 60 * 1000, // 5 minutes\n    gcTime: queryOptions.cacheTime ?? 10 * 60 * 1000, // 10 minutes (was cacheTime in v4)\n    retry: queryOptions.retry ?? 3,\n    retryDelay: queryOptions.retryDelay ?? ((attemptIndex: number) => Math.min(1000 * 2 ** attemptIndex, 30000))\n  });\n\n  const video = providedVideoData || data;\n  const { t } = useMessages(locale);\n  \n  // Find HLS playlist using helper function\n  const activePlaylist = findHLSPlaylist(video);\n  const hlsUrl = activePlaylist?.url;\n\n  // Notify parent of video data\n  useEffect(() => {\n    if (events?.onVideoData && video) {\n      events.onVideoData(video);\n    }\n  }, [video, events]);\n\n  // Loading state\n  if (isLoading || (!providedVideoData && !video)) {\n    return (\n      <div className={twMerge(\"md:rounded-2xl overflow-hidden aspect-video\", className)}>\n        <div className=\"relative w-full h-full bg-[#151515]\">\n          <Loading />\n        </div>\n      </div>\n    );\n  }\n\n  // Handle empty playlists\n  if (!isLoading && video && !hlsUrl && events?.onEmptyPlaylists) {\n    events.onEmptyPlaylists();\n  }\n\n  // Error state\n  if (error || video?.error) {\n    const errorKey = video?.error ? getErrorType(undefined, video) : 'API_ERROR';\n    const errorObj = error || new Error(video?.error || 'Unknown error');\n    \n    if (events?.onError) {\n      events.onError(errorObj);\n    }\n\n    // Use localized error messages\n    const title = t(errorKey as keyof Translations) || t('DEFAULT_ERROR');\n    const description = t(`${errorKey}_DESCRIPTION` as keyof Translations) || t('DEFAULT_ERROR_DESCRIPTION');\n\n    return (\n      <div className={twMerge(\"md:rounded-2xl overflow-hidden aspect-video\", className)}>\n        <div className=\"relative w-full h-full\">\n          <ErrorScreen\n            title={title}\n            description={description}\n          />\n          {children}\n        </div>\n      </div>\n    );\n  }\n\n  // No playable source\n  if (!hlsUrl) {\n    return (\n      <div className={twMerge(\"md:rounded-2xl overflow-hidden aspect-video\", className)}>\n        <div className=\"relative w-full h-full bg-[#151515]\">\n          <Title title={video?.name || \"\"} />\n          {children}\n        </div>\n      </div>\n    );\n  }\n\n  // Render video player with source\n  return (\n    <div className={twMerge(\"md:rounded-2xl overflow-hidden aspect-video\", className)}>\n      <div className=\"relative w-full h-full\">\n        <Player\n          {...props}\n          src={hlsUrl}\n          className={twMerge(\"video-player-container\", className)}\n          events={events}\n          containerClassName=\"w-full h-full\"\n        >\n          {children}\n        </Player>\n      </div>\n    </div>\n  );\n}; ","export interface VideoData {\n  id: string;\n  name?: string;\n  description?: string;\n  playlists?: Array<{\n    url: string;\n    format: string;\n  }>;\n  error?: string;\n}\n\nexport interface VideoListItem {\n  id: string;\n  name?: string;\n  description?: string;\n  playlists?: Array<{\n    url: string;\n    format: string;\n  }>;\n  error?: string;\n}\n\n/**\n * Fetches video data from the Motto Streaming API\n * @param videoId - The ID of the video to fetch\n * @param publicKey - The public key for authentication\n * @param mottoToken - Optional motto token for authenticated requests\n * @returns Promise<VideoData> - The video data\n */\nexport const fetchVideoData = async (\n  videoId: string, \n  publicKey: string, \n  mottoToken?: string\n): Promise<VideoData> => {\n  const endpoint = \"https://cda.mottostreaming.com/motto.cda.streaming.video.v1.VideoService/GetVideo\";\n  const url = new URL(endpoint);\n  url.searchParams.set(\"encoding\", \"json\");\n  url.searchParams.set(\"message\", JSON.stringify({ videoId }));\n\n  const response = await fetch(url, {\n    method: \"GET\",\n    headers: {\n      Authorization: `Bearer ${publicKey}`,\n      ...(Boolean(mottoToken) && { 'x-motto-token': mottoToken })\n    },\n  });\n\n  if (!response.ok) {\n    throw new Error(`Failed to fetch video: ${response.statusText}`);\n  }\n\n  const data = await response.json() as { video: VideoData };\n  return data.video;\n};\n\n/**\n * Fetches multiple videos data from the Motto Streaming API\n * @param publicKey - The public key for authentication\n * @param videoIds - Array of video IDs to fetch\n * @param mottoToken - Optional motto token for authenticated requests\n * @returns Promise<VideoListItem[]> - Array of video data\n */\nexport async function fetchVideosList(\n  publicKey: string,\n  videoIds: string[],\n  mottoToken?: string,\n  skip: number = 0,\n  limit: number = 0\n): Promise<VideoListItem[]> {\n  if (!videoIds || videoIds.length === 0) {\n    return [];\n  }\n\n  const endpoint = \"https://cda.mottostreaming.com/motto.cda.streaming.video.v1.VideoService/BatchGetVideos\";\n  const url = new URL(endpoint);\n  url.searchParams.set(\"encoding\", \"json\");\n  url.searchParams.set(\"message\", JSON.stringify({ videoIds }));\n\n  const response = await fetch(url.toString(), {\n    method: \"GET\",\n    headers: {\n      Authorization: `Bearer ${publicKey}`,\n      ...(Boolean(mottoToken) && { 'x-motto-token': mottoToken })\n    },\n  }).catch((err) => {\n    throw new Error(`Failed to fetch videos: ${err}`);\n  });\n\n  if (!response.ok) {\n    throw new Error(`Failed to fetch videos list: ${response.status}`);\n  }\n\n  const data = (await response.json()) as { videos: VideoListItem[] };\n  return data.videos;\n} ","export interface EventData {\n  id: string;\n  title: string;\n  description?: string;\n  startTime: string;\n  endTime?: string;\n  posterUrl?: string;\n  videoIds?: string[];\n  error?: string;\n}\n\n\n\nexport enum EventsSortDirection {\n  ASC = 'asc',\n  DESC = 'desc'\n}\n\nexport async function fetchEventData(\n  publicKey: string,\n  eventId: string,\n  unused?: any,\n  filter?: string,\n  order?: EventsSortDirection,\n  locale?: string\n): Promise<EventData> {\n  const endpoint = \"https://cda.mottostreaming.com/motto.cda.cms.event.v1.EventService/GetEvent\";\n  const url = new URL(endpoint);\n  \n  // Build the message object\n  const message: any = { eventId };\n  if (locale?.length) message.locale = locale;\n  if (filter) message.filter = filter;\n  if (order) message.order = order;\n  \n  url.searchParams.set(\"encoding\", \"json\");\n  url.searchParams.set(\"message\", JSON.stringify(message));\n\n  const response = await fetch(url.toString(), {\n    method: \"GET\",\n    headers: {\n      Authorization: `Bearer ${publicKey}`,\n    },\n  }).catch((err) => {\n    throw new Error(`Failed to fetch event: ${err}`);\n  });\n\n  if (!response.ok) {\n    throw new Error(`Failed to fetch event data: ${response.status}`);\n  }\n\n  const data = (await response.json()) as { event: EventData };\n  return data.event;\n}\n\n ","export interface CreativeWorkData {\n  id: string;\n  title: string;\n  description?: string;\n  releaseTime: string;\n  endTime?: string;\n  posterUrl?: string;\n  videoIds?: string[];\n  error?: string;\n}\n\nexport enum CreativeWorksSortDirection {\n  ASC = 'asc',\n  DESC = 'desc'\n}\n\nexport async function fetchCreativeWorkData(\n  publicKey: string,\n  creativeWorkId: string,\n  unused?: any,\n  filter?: string,\n  order?: CreativeWorksSortDirection,\n  locale?: string\n): Promise<CreativeWorkData> {\n  const endpoint = \"https://cda.mottostreaming.com/motto.cda.cms.creative_work.v1.CreativeWorkService/GetCreativeWork\";\n  const url = new URL(endpoint);\n  \n  // Build the message object\n  const message: any = { creativeWorkId };\n  if (locale?.length) message.locale = locale;\n  if (filter) message.filter = filter;\n  if (order) message.order = order;\n  \n  url.searchParams.set(\"encoding\", \"json\");\n  url.searchParams.set(\"message\", JSON.stringify(message));\n\n  const response = await fetch(url.toString(), {\n    method: \"GET\",\n    headers: {\n      Authorization: `Bearer ${publicKey}`,\n    },\n  }).catch((err) => {\n    throw new Error(`Failed to fetch creative work: ${err}`);\n  });\n\n  if (!response.ok) {\n    throw new Error(`Failed to fetch creative work data: ${response.status}`);\n  }\n\n  const data = (await response.json()) as { creativeWork: CreativeWorkData };\n  return data.creativeWork;\n} ","import type { VideoData } from './api';\n\nconst defaultError = {\n  title: \"Playback Error\",\n  description: \"Unable to play the video. Please try again later.\",\n};\n\nexport const errorTypes: Record<\n  \"api\" | \"default\" | string,\n  {\n    title: string;\n    description: string;\n  }\n> = {\n  api: {\n    title: \"Failed to Retrieve Video Info\",\n    description:\n      \"Error fetching video details. Check your videoId and internet connection and try again.\",\n  },\n  ERROR_CODE_NOT_AUTHENTICATED: {\n    title: \"Authorisation\",\n    description: \"You don't have permission to play this video. \",\n  },\n  ERROR_CODE_GEO_BLOCKED: {\n    title: \"Geoblocking Restriction\",\n    description:\n      \"Sorry, this video is not available in your region due to geoblocking restrictions.\",\n  },\n  ERROR_CODE_NOT_ENTITLED: {\n    title: \"Not entitled\",\n    description: \"Sorry, you are not entitled to play this video.\",\n  },\n  ERROR_CODE_VPN_BLOCKED: {\n    title: \"VPN BLOCKED\",\n    description: \"This video is not available due to the use of a VPN.\",\n  },\n  ERROR_CODE_UNSPECIFIED: defaultError,\n  ERROR_CODE_SIGNATURE_MISMATCH: defaultError,\n  ERROR_CODE_INVALID_DOMAIN: defaultError,\n  default: defaultError,\n};\n\nexport const getMediaTypeFromSource = (\n  source: string\n): \"video/mp4\" | \"application/vnd.apple.mpegurl\" | \"video/x-flv\" => {\n  if (source.includes(\".mp4\")) {\n    return \"video/mp4\";\n  }\n  if (source.includes(\".m3u8\")) {\n    return \"application/vnd.apple.mpegurl\";\n  }\n  return \"video/x-flv\"; // Default return\n};\n\nexport const getSourceObject = ({\n  source,\n}: {\n  source: string;\n}): {\n  src: string;\n  type: string;\n  withCredentials: boolean;\n} => {\n  const mediaType = getMediaTypeFromSource(source);\n\n  return {\n    src: source,\n    type: mediaType,\n    withCredentials: false, // Set to false as per the original comment about CORS issues\n  };\n};\n\nexport const formatTime = (seconds = 0): string => {\n  const ss = seconds < 0 ? 0 : seconds;\n  let s: number | string = Math.floor(ss % 60);\n  let m: number | string = Math.floor((ss / 60) % 60);\n  let h: number | string = Math.floor(ss / 3600);\n\n  if (isNaN(ss) || ss === Infinity) {\n    s = \"-\";\n    m = \"-\";\n    h = \"-\";\n  }\n\n  h = Number(h) > 0 ? `${h}:` : \"\";\n  m = `${Number(m) < 10 ? `0${m}` : m}:`;\n  s = Number(s) < 10 ? `0${s}` : s;\n\n  return h + m + s;\n};\n\nexport const findHLSPlaylist = (video?: VideoData) => {\n  return video?.playlists?.find((playlist) => {\n    return playlist.format === 'HLS' || \n           playlist.format === 'hls' || \n           playlist.format === 'PLAYLIST_FORMAT_HLS';\n  });\n};\n\nexport const getErrorType = (error?: string | Error, video?: VideoData) => {\n  if (video?.error && errorTypes[video.error]) {\n    return video.error;\n  }\n  return 'DEFAULT_ERROR';\n};\n","import { useState, useEffect } from 'react';\n\n// Import JSON files as modules\nimport en from './en.json';\nimport es from './es.json';\nimport ar from './ar.json';\nimport de from './de.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport pt from './pt.json';\nimport ru from './ru.json';\nimport zh from './zh.json';\nimport nl from './nl.json';\nimport fa from './fa.json';\n\n// Define the available languages\nconst availableLanguages = {\n    en,\n    es,\n    ar,\n    de,\n    fr,\n    it,\n    ja,\n    ko,\n    pt,\n    ru,\n    zh,\n    nl,\n    fa\n};\n\ntype Language = keyof typeof availableLanguages;\n\n// Base translations type - this represents all possible keys that can exist\nexport type Translations = {\n  \"DAYS\": string\n  \"HOURS\": string\n  \"MINUTES\": string\n  \"SECONDS\": string\n  \"STARTING_SOON\": string\n  \"EVENT_NOT_STARTED\": string\n  \"DEFAULT_ERROR\": string\n  \"DEFAULT_ERROR_DESCRIPTION\": string\n  \"API_ERROR\": string\n  \"API_ERROR_DESCRIPTION\": string\n  \"ERROR_CODE_NOT_AUTHENTICATED\": string\n  \"ERROR_CODE_NOT_AUTHENTICATED_DESCRIPTION\": string\n  \"ERROR_CODE_GEO_BLOCKED\": string\n  \"ERROR_CODE_GEO_BLOCKED_DESCRIPTION\": string\n  \"ERROR_CODE_NOT_ENTITLED\": string\n  \"ERROR_CODE_NOT_ENTITLED_DESCRIPTION\": string\n  \"ERROR_CODE_VPN_BLOCKED\": string\n  \"ERROR_CODE_VPN_BLOCKED_DESCRIPTION\": string\n}\n\n// Partial translations type for individual language files (allows missing keys)\ntype PartialTranslations = Partial<Translations>;\n\n// Function to get the browser's language setting\nconst getBrowserLanguage = (): Language => {\n  const language = navigator.language.split('-')[0] as Language;\n  return availableLanguages[language] ? language : 'en';\n};\n\nconst useMessages = (locale: string) => {\n  const [language, setLanguage] = useState<Language>('en');\n  const [translations, setTranslations] = useState<PartialTranslations>(availableLanguages.en);\n\n  useEffect(() => {\n    const lang = !!availableLanguages?.[locale as Language] ? locale as Language :  getBrowserLanguage();;\n    setLanguage(lang);\n    setTranslations(availableLanguages[lang] as PartialTranslations);\n  }, [locale]);\n\n  // Translation function with English fallback\n  const t = (key: keyof Translations): string => {\n    // Try current language first\n    if (translations[key]) {\n      return translations[key];\n    }\n    \n    // Fallback to English if key not found in current language\n    if (language !== 'en' && availableLanguages.en[key]) {\n      return availableLanguages.en[key];\n    }\n    \n    // Return empty string if not found in either current language or English\n    return '';\n  };\n\n  // Function to change the language manually\n  const changeLanguage = (lng: Language) => {\n    if (availableLanguages[lng]) {\n      setLanguage(lng);\n      setTranslations(availableLanguages[lng] as PartialTranslations);\n    }\n  };\n\n  return { t, language, changeLanguage };\n};\n\nexport default useMessages;\n","{\n    \"DAYS\": \"days\",\n    \"HOURS\": \"hours\",\n    \"MINUTES\": \"min\",\n    \"SECONDS\": \"sec\",\n    \"STARTING_SOON\": \"Starting soon...\",\n    \"EVENT_NOT_STARTED\": \"This event has not started...\",\n    \"DEFAULT_ERROR\": \"Playback Error\",\n    \"DEFAULT_ERROR_DESCRIPTION\": \"Unable to play the video. Please try again later.\",\n    \"API_ERROR\": \"Failed to Retrieve Video Info\",\n    \"API_ERROR_DESCRIPTION\": \"Error fetching video details. Check your videoId and internet connection and try again.\",\n    \"ERROR_CODE_NOT_AUTHENTICATED\": \"Authorisation\",\n    \"ERROR_CODE_NOT_AUTHENTICATED_DESCRIPTION\": \"You don't have permission to play this video.\",\n    \"ERROR_CODE_GEO_BLOCKED\": \"Geoblocking Restriction\",\n    \"ERROR_CODE_GEO_BLOCKED_DESCRIPTION\": \"Sorry, this video is not available in your region due to geoblocking restrictions.\",\n    \"ERROR_CODE_NOT_ENTITLED\": \"Not entitled\",\n    \"ERROR_CODE_NOT_ENTITLED_DESCRIPTION\": \"Sorry, you are not entitled to play this video.\",\n    \"ERROR_CODE_VPN_BLOCKED\": \"VPN BLOCKED\",\n    \"ERROR_CODE_VPN_BLOCKED_DESCRIPTION\": \"This video is not available due to the use of a VPN.\"\n}\n","{\n    \"DAYS\": \"días\",\n    \"HOURS\": \"horas\",\n    \"MINUTES\": \"min\",\n    \"SECONDS\": \"seg\",\n    \"STARTING_SOON\": \"En instantes...\",\n    \"EVENT_NOT_STARTED\": \"Este evento aún no ha comenzado...\",\n    \"DEFAULT_ERROR\": \"Error de reproducción\",\n    \"DEFAULT_ERROR_DESCRIPTION\": \"No se puede reproducir el video. Por favor, inténtelo de nuevo más tarde.\",\n    \"API_ERROR\": \"Error al recuperar información del video\",\n    \"API_ERROR_DESCRIPTION\": \"Error al obtener detalles del video. Verifique su videoId y conexión a internet e inténtelo de nuevo.\",\n    \"ERROR_CODE_NOT_AUTHENTICATED\": \"Autorización\",\n    \"ERROR_CODE_NOT_AUTHENTICATED_DESCRIPTION\": \"No tienes permiso para reproducir este video.\",\n    \"ERROR_CODE_GEO_BLOCKED\": \"Restricción geográfica\",\n    \"ERROR_CODE_GEO_BLOCKED_DESCRIPTION\": \"Lo siento, este video no está disponible en tu región debido a restricciones geográficas.\",\n    \"ERROR_CODE_NOT_ENTITLED\": \"No autorizado\",\n    \"ERROR_CODE_NOT_ENTITLED_DESCRIPTION\": \"Lo siento, no estás autorizado para reproducir este video.\",\n    \"ERROR_CODE_VPN_BLOCKED\": \"VPN BLOQUEADO\",\n    \"ERROR_CODE_VPN_BLOCKED_DESCRIPTION\": \"Este video no está disponible debido al uso de una VPN.\"\n}\n  ","{\n    \"DAYS\": \"أيام\",\n    \"HOURS\": \"ساعات\",\n    \"MINUTES\": \"دقائق\",\n    \"SECONDS\": \"ثواني\",\n    \"STARTING_SOON\": \"يبدأ قريبا...\",\n    \"EVENT_NOT_STARTED\": \"هذا الحدث لم يبدأ بعد...\",\n    \"DEFAULT_ERROR\": \"خطأ في التشغيل\",\n    \"DEFAULT_ERROR_DESCRIPTION\": \"غير قادر على تشغيل الفيديو. يرجى المحاولة مرة أخرى لاحقًا.\",\n    \"API_ERROR\": \"فشل في استرجاع معلومات الفيديو\",\n    \"API_ERROR_DESCRIPTION\": \"خطأ في جلب تفاصيل الفيديو. تحقق من معرف الفيديو واتصال الإنترنت وحاول مرة أخرى.\",\n    \"ERROR_CODE_NOT_AUTHENTICATED\": \"تفويض\",\n    \"ERROR_CODE_NOT_AUTHENTICATED_DESCRIPTION\": \"ليس لديك إذن لتشغيل هذا الفيديو.\",\n    \"ERROR_CODE_GEO_BLOCKED\": \"قيود الجغرافيا\",\n    \"ERROR_CODE_GEO_BLOCKED_DESCRIPTION\": \"عذرًا، هذا الفيديو غير متاح في منطقتك بسبب قيود الجغرافيا.\",\n    \"ERROR_CODE_NOT_ENTITLED\": \"غير مخول\",\n    \"ERROR_CODE_NOT_ENTITLED_DESCRIPTION\": \"عذرًا، ليس لديك الحق في تشغيل هذا الفيديو.\",\n    \"ERROR_CODE_VPN_BLOCKED\": \"تم حظر VPN\",\n    \"ERROR_CODE_VPN_BLOCKED_DESCRIPTION\": \"هذا الفيديو غير متاح بسبب استخدام VPN.\"\n}","{\n    \"DAYS\": \"Tage\",\n    \"HOURS\": \"Stunden\",\n    \"MINUTES\": \"Min\",\n    \"SECONDS\": \"Sek\",\n    \"STARTING_SOON\": \"Beginnt bald...\",\n    \"DEFAULT_ERROR\": \"Wiedergabefehler\",\n    \"DEFAULT_ERROR_DESCRIPTION\": \"Das Video kann nicht abgespielt werden. Bitte versuchen Sie es später erneut.\",\n    \"API_ERROR\": \"Fehler beim Abrufen der Videoinformationen\",\n    \"API_ERROR_DESCRIPTION\": \"Fehler beim Abrufen der Videodetails. Überprüfen Sie Ihre videoId und Internetverbindung und versuchen Sie es erneut.\",\n    \"ERROR_CODE_NOT_AUTHENTICATED\": \"Autorisierung\",\n    \"ERROR_CODE_NOT_AUTHENTICATED_DESCRIPTION\": \"Sie haben keine Berechtigung, dieses Video abzuspielen.\",\n    \"ERROR_CODE_GEO_BLOCKED\": \"Geoblocking-Beschränkung\",\n    \"ERROR_CODE_GEO_BLOCKED_DESCRIPTION\": \"Entschuldigung, dieses Video ist in Ihrer Region aufgrund von Geoblocking-Beschränkungen nicht verfügbar.\",\n    \"ERROR_CODE_NOT_ENTITLED\": \"Nicht berechtigt\",\n    \"ERROR_CODE_NOT_ENTITLED_DESCRIPTION\": \"Entschuldigung, Sie sind nicht berechtigt, dieses Video abzuspielen.\",\n    \"ERROR_CODE_VPN_BLOCKED\": \"VPN BLOCKIERT\",\n    \"ERROR_CODE_VPN_BLOCKED_DESCRIPTION\": \"Dieses Video ist aufgrund der Verwendung eines VPN nicht verfügbar.\"\n}\n  ","{\n    \"DAYS\": \"jours\",\n    \"HOURS\": \"heures\",\n    \"MINUTES\": \"minutes\",\n    \"SECONDS\": \"secondes\",\n    \"STARTING_SOON\": \"Commence bientôt...\",\n    \"EVENT_NOT_STARTED\": \"Cet événement n'a pas commencé...\",\n    \"DEFAULT_ERROR\": \"Erreur de lecture\",\n    \"DEFAULT_ERROR_DESCRIPTION\": \"Impossible de lire la vidéo. Veuillez réessayer plus tard.\",\n    \"API_ERROR\": \"Échec de la récupération des informations vidéo\",\n    \"API_ERROR_DESCRIPTION\": \"Erreur lors de la récupération des détails de la vidéo. Vérifiez votre videoId et votre connexion Internet, puis réessayez.\",\n    \"ERROR_CODE_NOT_AUTHENTICATED\": \"Autorisation\",\n    \"ERROR_CODE_NOT_AUTHENTICATED_DESCRIPTION\": \"Vous n'avez pas la permission de lire cette vidéo.\",\n    \"ERROR_CODE_GEO_BLOCKED\": \"Restriction de géoblocage\",\n    \"ERROR_CODE_GEO_BLOCKED_DESCRIPTION\": \"Désolé, cette vidéo n'est pas disponible dans votre région en raison de restrictions de géoblocage.\",\n    \"ERROR_CODE_NOT_ENTITLED\": \"Non autorisé\",\n    \"ERROR_CODE_NOT_ENTITLED_DESCRIPTION\": \"Désolé, vous n'êtes pas autorisé à lire cette vidéo.\",\n    \"ERROR_CODE_VPN_BLOCKED\": \"VPN BLOQUÉ\",\n    \"ERROR_CODE_VPN_BLOCKED_DESCRIPTION\": \"Cette vidéo n'est pas disponible en raison de l'utilisation d'un VPN.\"\n}","{\n    \"DAYS\": \"giorni\",\n    \"HOURS\": \"ore\",\n    \"MINUTES\": \"minuti\",\n    \"SECONDS\": \"secondi\",\n    \"STARTING_SOON\": \"Inizia presto...\",\n    \"DEFAULT_ERROR\": \"Errore di riproduzione\",\n    \"DEFAULT_ERROR_DESCRIPTION\": \"Impossibile riprodurre il video. Per favore riprova più tardi.\",\n    \"API_ERROR\": \"Errore nel recupero delle informazioni video\",\n    \"API_ERROR_DESCRIPTION\": \"Errore nel recupero dei dettagli del video. Controlla il tuo videoId e la connessione internet e riprova.\",\n    \"ERROR_CODE_NOT_AUTHENTICATED\": \"Autorizzazione\",\n    \"ERROR_CODE_NOT_AUTHENTICATED_DESCRIPTION\": \"Non hai il permesso di riprodurre questo video.\",\n    \"ERROR_CODE_GEO_BLOCKED\": \"Restrizione geoblocking\",\n    \"ERROR_CODE_GEO_BLOCKED_DESCRIPTION\": \"Spiacenti, questo video non è disponibile nella tua regione a causa di restrizioni geografiche.\",\n    \"ERROR_CODE_NOT_ENTITLED\": \"Non autorizzato\",\n    \"ERROR_CODE_NOT_ENTITLED_DESCRIPTION\": \"Spiacenti, non sei autorizzato a riprodurre questo video.\",\n    \"ERROR_CODE_VPN_BLOCKED\": \"VPN BLOCCATA\",\n    \"ERROR_CODE_VPN_BLOCKED_DESCRIPTION\": \"Questo video non è disponibile a causa dell'uso di una VPN.\"\n}\n","{\n    \"DAYS\": \"日\",\n    \"HOURS\": \"時間\",\n    \"MINUTES\": \"分\",\n    \"SECONDS\": \"秒\",\n    \"STARTING_SOON\": \"まもなく開始...\",\n    \"DEFAULT_ERROR\": \"再生エラー\",\n    \"DEFAULT_ERROR_DESCRIPTION\": \"ビデオを再生できません。後でもう一度お試しください。\",\n    \"API_ERROR\": \"ビデオ情報の取得に失敗しました\",\n    \"API_ERROR_DESCRIPTION\": \"ビデオの詳細を取得中にエラーが発生しました。videoIdとインターネット接続を確認して、もう一度お試しください。\",\n    \"ERROR_CODE_NOT_AUTHENTICATED\": \"認証\",\n    \"ERROR_CODE_NOT_AUTHENTICATED_DESCRIPTION\": \"このビデオを再生する権限がありません。\",\n    \"ERROR_CODE_GEO_BLOCKED\": \"地域制限\",\n    \"ERROR_CODE_GEO_BLOCKED_DESCRIPTION\": \"申し訳ありませんが、地域制限のためこのビデオはご利用いただけません。\",\n    \"ERROR_CODE_NOT_ENTITLED\": \"権利なし\",\n    \"ERROR_CODE_NOT_ENTITLED_DESCRIPTION\": \"申し訳ありませんが、このビデオを再生する権利がありません。\",\n    \"ERROR_CODE_VPN_BLOCKED\": \"VPNブロック\",\n    \"ERROR_CODE_VPN_BLOCKED_DESCRIPTION\": \"VPNの使用により、このビデオはご利用いただけません。\"\n}","{\n    \"DAYS\": \"일\",\n    \"HOURS\": \"시간\",\n    \"MINUTES\": \"분\",\n    \"SECONDS\": \"초\",\n    \"STARTING_SOON\": \"곧 시작...\",\n    \"DEFAULT_ERROR\": \"재생 오류\",\n    \"DEFAULT_ERROR_DESCRIPTION\": \"비디오를 재생할 수 없습니다. 나중에 다시 시도해 주세요.\",\n    \"API_ERROR\": \"비디오 정보 가져오기 실패\",\n    \"API_ERROR_DESCRIPTION\": \"비디오 세부 정보를 가져오는 중 오류가 발생했습니다. videoId와 인터넷 연결을 확인하고 다시 시도해 주세요.\",\n    \"ERROR_CODE_NOT_AUTHENTICATED\": \"인증\",\n    \"ERROR_CODE_NOT_AUTHENTICATED_DESCRIPTION\": \"이 비디오를 재생할 권한이 없습니다.\",\n    \"ERROR_CODE_GEO_BLOCKED\": \"지역 제한\",\n    \"ERROR_CODE_GEO_BLOCKED_DESCRIPTION\": \"죄송합니다. 이 비디오는 지역 제한으로 인해 귀하의 지역에서 사용할 수 없습니다.\",\n    \"ERROR_CODE_NOT_ENTITLED\": \"권한 없음\",\n    \"ERROR_CODE_NOT_ENTITLED_DESCRIPTION\": \"죄송합니다. 이 비디오를 재생할 권한이 없습니다.\",\n    \"ERROR_CODE_VPN_BLOCKED\": \"VPN 차단됨\",\n    \"ERROR_CODE_VPN_BLOCKED_DESCRIPTION\": \"VPN 사용으로 인해 이 비디오를 사용할 수 없습니다.\"\n}","{\n    \"DAYS\": \"dias\",\n    \"HOURS\": \"horas\",\n    \"MINUTES\": \"minutos\",\n    \"SECONDS\": \"segundos\",\n    \"STARTING_SOON\": \"Começando em breve...\",\n    \"DEFAULT_ERROR\": \"Playback Error\",\n    \"DEFAULT_ERROR_DESCRIPTION\": \"Não foi possível reproduzir o vídeo. Por favor, tente novamente mais tarde.\",\n    \"API_ERROR\": \"Falha ao Recuperar Informações do Vídeo\",\n    \"API_ERROR_DESCRIPTION\": \"Erro ao buscar detalhes do vídeo. Verifique seu videoId e conexão com a internet e tente novamente.\",\n    \"ERROR_CODE_NOT_AUTHENTICATED\": \"Autorização\",\n    \"ERROR_CODE_NOT_AUTHENTICATED_DESCRIPTION\": \"Você não tem permissão para reproduzir este vídeo.\",\n    \"ERROR_CODE_GEO_BLOCKED\": \"Restrição de Geoblocking\",\n    \"ERROR_CODE_GEO_BLOCKED_DESCRIPTION\": \"Desculpe, este vídeo não está disponível em sua região devido a restrições de geoblocking.\",\n    \"ERROR_CODE_NOT_ENTITLED\": \"Não autorizado\",\n    \"ERROR_CODE_NOT_ENTITLED_DESCRIPTION\": \"Desculpe, você não está autorizado a reproduzir este vídeo.\",\n    \"ERROR_CODE_VPN_BLOCKED\": \"VPN BLOQUEADO\",\n    \"ERROR_CODE_VPN_BLOCKED_DESCRIPTION\": \"Este vídeo não está disponível devido ao uso de uma VPN.\"\n}","{\n    \"DAYS\": \"дней\",\n    \"HOURS\": \"часов\",\n    \"MINUTES\": \"мин\",\n    \"SECONDS\": \"сек\",\n    \"STARTING_SOON\": \"Скоро начнется...\",\n    \"DEFAULT_ERROR\": \"Ошибка воспроизведения\",\n    \"DEFAULT_ERROR_DESCRIPTION\": \"Не удалось воспроизвести видео. Пожалуйста, попробуйте позже.\",\n    \"API_ERROR\": \"Не удалось получить информацию о видео\",\n    \"API_ERROR_DESCRIPTION\": \"Ошибка при получении деталей видео. Проверьте ваш videoId и подключение к интернету, затем попробуйте снова.\",\n    \"ERROR_CODE_NOT_AUTHENTICATED\": \"Авторизация\",\n    \"ERROR_CODE_NOT_AUTHENTICATED_DESCRIPTION\": \"У вас нет разрешения на воспроизведение этого видео.\",\n    \"ERROR_CODE_GEO_BLOCKED\": \"Географическое ограничение\",\n    \"ERROR_CODE_GEO_BLOCKED_DESCRIPTION\": \"Извините, это видео недоступно в вашем регионе из-за географических ограничений.\",\n    \"ERROR_CODE_NOT_ENTITLED\": \"Нет прав\",\n    \"ERROR_CODE_NOT_ENTITLED_DESCRIPTION\": \"Извините, у вас нет прав на воспроизведение этого видео.\",\n    \"ERROR_CODE_VPN_BLOCKED\": \"VPN заблокирован\",\n    \"ERROR_CODE_VPN_BLOCKED_DESCRIPTION\": \"Это видео недоступно из-за использования VPN.\"\n}","{\n    \"DAYS\": \"天\",\n    \"HOURS\": \"小时\",\n    \"MINUTES\": \"分钟\",\n    \"SECONDS\": \"秒\",\n    \"STARTING_SOON\": \"即将开始...\",\n    \"DEFAULT_ERROR\": \"播放错误\",\n    \"DEFAULT_ERROR_DESCRIPTION\": \"无法播放视频。请稍后再试。\",\n    \"API_ERROR\": \"获取视频信息失败\",\n    \"API_ERROR_DESCRIPTION\": \"获取视频详情时出错。请检查您的视频ID和互联网连接，然后重试。\",\n    \"ERROR_CODE_NOT_AUTHENTICATED\": \"授权\",\n    \"ERROR_CODE_NOT_AUTHENTICATED_DESCRIPTION\": \"您没有权限播放此视频。\",\n    \"ERROR_CODE_GEO_BLOCKED\": \"地理封锁限制\",\n    \"ERROR_CODE_GEO_BLOCKED_DESCRIPTION\": \"抱歉，由于地理封锁限制，此视频在您的地区不可用。\",\n    \"ERROR_CODE_NOT_ENTITLED\": \"无权播放\",\n    \"ERROR_CODE_NOT_ENTITLED_DESCRIPTION\": \"抱歉，您无权播放此视频。\",\n    \"ERROR_CODE_VPN_BLOCKED\": \"VPN被封锁\",\n    \"ERROR_CODE_VPN_BLOCKED_DESCRIPTION\": \"由于使用VPN，此视频不可用。\"\n}\n  ","{\n    \"DAYS\": \"dagen\",\n    \"HOURS\": \"uren\",\n    \"MINUTES\": \"min\",\n    \"SECONDS\": \"sec\",\n    \"STARTING_SOON\": \"Begint binnenkort...\",\n    \"EVENT_NOT_STARTED\": \"Dit evenement is nog niet begonnen...\",\n    \"DEFAULT_ERROR\": \"Afspelfout\",\n    \"DEFAULT_ERROR_DESCRIPTION\": \"Kan de video niet afspelen. Probeer het later opnieuw.\",\n    \"API_ERROR\": \"Kan videogegevens niet ophalen\",\n    \"API_ERROR_DESCRIPTION\": \"Fout bij het ophalen van videogegevens. Controleer uw video-ID en internetverbinding en probeer het opnieuw.\",\n    \"ERROR_CODE_NOT_AUTHENTICATED\": \"Autorisatie\",\n    \"ERROR_CODE_NOT_AUTHENTICATED_DESCRIPTION\": \"U heeft geen toestemming om deze video af te spelen.\",\n    \"ERROR_CODE_GEO_BLOCKED\": \"Geoblocking Beperking\",\n    \"ERROR_CODE_GEO_BLOCKED_DESCRIPTION\": \"Sorry, deze video is niet beschikbaar in uw regio vanwege geoblocking beperkingen.\",\n    \"ERROR_CODE_NOT_ENTITLED\": \"Geen recht\",\n    \"ERROR_CODE_NOT_ENTITLED_DESCRIPTION\": \"Sorry, u heeft geen recht om deze video af te spelen.\",\n    \"ERROR_CODE_VPN_BLOCKED\": \"VPN GEBLOKKEERD\",\n    \"ERROR_CODE_VPN_BLOCKED_DESCRIPTION\": \"Deze video is niet beschikbaar vanwege het gebruik van een VPN.\"\n}\n","{\n    \"DAYS\": \"روزها\",\n    \"HOURS\": \"ساعت‌ها\",\n    \"MINUTES\": \"دقیقه‌ها\",\n    \"SECONDS\": \"ثانیه‌ها\",\n    \"STARTING_SOON\": \"به زودی شروع می‌شود...\",\n    \"EVENT_NOT_STARTED\": \"این رویداد هنوز شروع نشده است...\",\n    \"DEFAULT_ERROR\": \"خطای پخش\",\n    \"DEFAULT_ERROR_DESCRIPTION\": \"امکان پخش ویدیو وجود ندارد. لطفاً بعداً دوباره تلاش کنید.\",\n    \"API_ERROR\": \"خطا در بازیابی اطلاعات ویدیو\",\n    \"API_ERROR_DESCRIPTION\": \"خطا در دریافت جزئیات ویدیو. ویدیوId و اتصال اینترنت خود را بررسی کرده و دوباره تلاش کنید.\",\n    \"ERROR_CODE_NOT_AUTHENTICATED\": \"مجوز\",\n    \"ERROR_CODE_NOT_AUTHENTICATED_DESCRIPTION\": \"شما اجازه پخش این ویدیو را ندارید.\",\n    \"ERROR_CODE_GEO_BLOCKED\": \"محدودیت جغرافیایی\",\n    \"ERROR_CODE_GEO_BLOCKED_DESCRIPTION\": \"متاسفیم، این ویدیو به دلیل محدودیت‌های جغرافیایی در منطقه شما در دسترس نیست.\",\n    \"ERROR_CODE_NOT_ENTITLED\": \"عدم دسترسی\",\n    \"ERROR_CODE_NOT_ENTITLED_DESCRIPTION\": \"متاسفیم، شما اجازه پخش این ویدیو را ندارید.\",\n    \"ERROR_CODE_VPN_BLOCKED\": \"مسدود شدن VPN\",\n    \"ERROR_CODE_VPN_BLOCKED_DESCRIPTION\": \"این ویدیو به دلیل استفاده از VPN در دسترس نیست.\"\n}","import React, { CSSProperties, useCallback, useEffect, useState } from 'react';\nimport { twMerge } from 'tailwind-merge';\nimport { useQuery } from '@tanstack/react-query';\nimport { Player } from './Player';\nimport type { PlayerProps } from './types';\nimport { fetchEventData, type EventData, EventsSortDirection } from './api/event';\nimport { fetchVideosList, type VideoListItem } from './api/video';\nimport { Loading, ErrorScreen, Title } from './components';\nimport { errorTypes, findHLSPlaylist } from './helper';\nimport useMessages, { type Translations } from './messages/useMessages';\n\nexport interface EventProps extends Omit<PlayerProps, 'src'> {\n  publicKey: string;\n  eventId: string;\n  hideTitle?: boolean;\n  locale?: string;\n  filter?: string;\n  order?: EventsSortDirection;\n  events?: {\n    onEventData?: (event: EventData) => void;\n    onVideoData?: (video: VideoListItem) => void;\n    onEmptyPlaylists?: () => void;\n    onError?: (error: Error) => void;\n    onPlay?: () => void;\n    onPause?: () => void;\n    onEnded?: () => void;\n    onLoadStart?: () => void;\n    onCanPlay?: () => void;\n    onPlayerReady?: () => void;\n  };\n  className?: string;\n  settings?: {\n    backgroundImageUrl?: string;\n    showCountdownAnimation?: boolean;\n  };\n  auth?: {\n    mottoToken?: string;\n    userId?: string;\n  };\n  // TanStack Query options\n  queryOptions?: {\n    enabled?: boolean;\n    staleTime?: number;\n    cacheTime?: number;\n    retry?: number;\n    retryDelay?: number;\n  };\n}\n\nexport const Event: React.FC<EventProps> = ({\n  publicKey,\n  eventId,\n  events,\n  hideTitle,\n  locale = 'en',\n  order,\n  filter,\n  className,\n  settings,\n  auth,\n  queryOptions = {},\n  ...props\n}) => {\n  // Event data fetching\n  const {\n    data: eventData,\n    isLoading: isEventLoading,\n    error: eventError\n  } = useQuery<EventData>({\n    queryKey: ['event', publicKey, eventId, filter, order, locale],\n    queryFn: () => fetchEventData(publicKey, eventId, undefined, filter, order, locale),\n    enabled: !!publicKey && !!eventId,\n    staleTime: queryOptions.staleTime ?? 5 * 60 * 1000, // 5 minutes\n    gcTime: queryOptions.cacheTime ?? 10 * 60 * 1000, // 10 minutes\n    retry: queryOptions.retry ?? 3,\n    retryDelay: queryOptions.retryDelay ?? ((attemptIndex: number) => Math.min(1000 * 2 ** attemptIndex, 30000))\n  });\n\n  const [activePlaylist, setActivePlaylist] = useState<string | null>();\n  const [activeVideoId, setActiveVideoId] = useState<string | null>();\n  const videoIds = eventData?.videoIds ?? [];\n\n  // Videos list fetching\n  const {\n    data: videosData,\n    isLoading: videosIsLoading,\n    error: videosError,    \n  } = useQuery<VideoListItem[]>({\n    queryKey: ['videos-list', publicKey, videoIds, auth?.mottoToken],\n    queryFn: () => fetchVideosList(publicKey, videoIds, auth?.mottoToken, 0, 0),\n    enabled: !!publicKey && videoIds.length > 0,\n    refetchInterval: activePlaylist === null ? 30000 : false,\n    staleTime: queryOptions.staleTime ?? 5 * 60 * 1000,\n    gcTime: queryOptions.cacheTime ?? 10 * 60 * 1000,\n    retry: queryOptions.retry ?? 3,\n    retryDelay: queryOptions.retryDelay ?? ((attemptIndex: number) => Math.min(1000 * 2 ** attemptIndex, 30000))\n  });\n\n  const [loadingApisState, setLoadingApisState] = useState(true);\n\n  // Process videos data to find active playlist\n  useEffect(() => {\n    if (videosData !== undefined) {\n      setLoadingApisState(false);\n\n      const videosWithPlaylists = videosData.filter(\n        (video) => video.playlists && video.playlists.length > 0\n      );\n\n      if (videosWithPlaylists.length > 0) {\n        let hlsPlaylistFound = false;\n        // Iterate to find the first HLS playlist\n        for (const video of videosWithPlaylists) {\n          const hlsPlaylist = findHLSPlaylist(video);\n          if (hlsPlaylist?.url) {\n            setActivePlaylist(hlsPlaylist.url);\n            setActiveVideoId(video.id);\n            hlsPlaylistFound = true;\n            break;\n          }\n        }\n        if (!hlsPlaylistFound) {\n          setActivePlaylist(null);\n          setActiveVideoId(null);\n        }\n      } else {\n        setActivePlaylist(null);\n        setActiveVideoId(null);\n      }\n    } else if (eventData && (!eventData.videoIds || eventData.videoIds.length === 0)) {\n      setLoadingApisState(false);\n      setActivePlaylist(null);\n      setActiveVideoId(null);\n    }\n  }, [videosData, eventData]);\n  \n  const { t } = useMessages(locale);\n\n  // Notify parent of event data\n  useEffect(() => {\n    if (events?.onEventData && eventData) {\n      events.onEventData(eventData);\n    }\n  }, [eventData, events]);\n\n  // Notify parent of video data\n  useEffect(() => {\n    if (events?.onVideoData && activeVideoId && videosData) {\n      const activeVideo = videosData.find((video) => video.id === activeVideoId);\n      if (activeVideo) {\n        events.onVideoData(activeVideo);\n      }\n    }\n  }, [activeVideoId, videosData, events]);\n\n  // All state and hooks must be defined before any conditional returns\n  const [error, setError] = useState<Error | null>(null);\n  const [loadingPlaylist, setLoadingPlaylist] = useState(true);\n  const videosDataError = videosData?.some((video) => !!video.error);\n\n  // Error handling\n  useEffect(() => {\n    if (eventError || videosError || videosDataError) {\n      const errorObj = eventError || videosError || \n        (videosData?.find((video) => !!video.error)?.error && \n         new Error(videosData?.find((video) => !!video.error)?.error)) || \n        new Error('default');\n      \n      setError(errorObj);\n      if (events?.onError) {\n        events.onError(errorObj);\n      }\n    } else {\n      setError(null);\n    }\n  }, [eventError, videosError, videosDataError, videosData, events]);\n  \n  // Loading state management\n  useEffect(() => {\n    const eventLoadedWithNoVideos =\n      !isEventLoading &&\n      eventData &&\n      eventData.videoIds &&\n      (!eventData.videoIds || eventData?.videoIds?.length === 0) &&\n      !loadingApisState;\n\n    const allApisLoadedWithPotentialVideos =\n      !isEventLoading &&\n      !videosIsLoading &&\n      eventData &&\n      !loadingApisState;\n\n    if (eventLoadedWithNoVideos || allApisLoadedWithPotentialVideos) {\n      setLoadingPlaylist(false);\n    }\n  }, [isEventLoading, videosIsLoading, eventData, loadingApisState]);\n\n  // Error state\n  if (error) {\n    const title = t(error.message as keyof Translations)?.length ? \n      t(error.message as keyof Translations) : t(\"DEFAULT_ERROR\"); \n    const description = t(`${error.message}_DESCRIPTION` as keyof Translations)?.length ?  \n      t(`${error.message}_DESCRIPTION` as keyof Translations) : t(\"DEFAULT_ERROR_DESCRIPTION\");\n    \n    return (\n      <div className={twMerge(\"md:rounded-2xl overflow-hidden aspect-video\", className)}>\n        <div className=\"relative w-full h-full\">\n          <ErrorScreen\n            title={title}\n            description={description}\n          />\n        </div>\n      </div>\n    );\n  }\n  \n  // Handle empty playlists\n  if (!loadingPlaylist && eventData && !activePlaylist && events?.onEmptyPlaylists) {\n    events.onEmptyPlaylists();\n  }\n\n  // Loading state\n  if (loadingPlaylist) {\n    return (\n      <div className={twMerge(\"md:rounded-2xl overflow-hidden aspect-video\", className)}>\n        <div className=\"relative w-full h-full bg-[#151515]\">\n          <Loading />\n        </div>\n      </div>\n    );\n  }\n\n  // Active video player\n  if (activePlaylist && activeVideoId && videosData) {\n    const activeVideo = videosData.find((video) => video.id === activeVideoId);\n    \n    return (\n      <div className={twMerge(\"md:rounded-2xl overflow-hidden aspect-video\", className)}>\n        <div className=\"relative w-full h-full\">\n          <Player\n            {...props}\n            src={activePlaylist}\n            className={twMerge(className, \"peer\")}\n            events={events}\n            containerClassName=\"w-full h-full\"\n          />\n        </div>\n          {!hideTitle && eventData && (\n            <TitleAndDescription \n              title={eventData.title} \n              description={eventData.description || ''} \n              startTime={eventData.startTime} \n              locale={locale} \n            />\n          )}\n      </div>\n    );\n  }\n\n  // Pre-event countdown\n  if (eventData) {\n    return (\n      <div className={twMerge(\"md:rounded-2xl overflow-hidden aspect-video\", className)}>\n        <div className=\"relative w-full h-full\">\n          <PreEvent \n            event={eventData} \n            hideTitle={hideTitle} \n            locale={locale} \n            backgroundImageUrl={settings?.backgroundImageUrl} \n            showAnimation={settings?.showCountdownAnimation} \n          />\n        </div>\n      </div>\n    );\n  }\n\n  return null;\n};\n\n// Pre-event countdown component\nfunction PreEvent({ \n  event, \n  locale = 'en', \n  hideTitle, \n  backgroundImageUrl, \n  showAnimation = true \n}: { \n  event: EventData; \n  locale?: string; \n  hideTitle?: boolean; \n  backgroundImageUrl?: string; \n  showAnimation?: boolean;\n}): JSX.Element {\n  const date = new Date(event.startTime);\n  const now = new Date();\n  const [remainingTime, setRemainingTime] = useState(\n    date.getTime() - now.getTime()\n  );\n  const shouldBeStarted = remainingTime < 0;\n  const { t } = useMessages(locale);\n  useEffect(() => {\n    const interval = setInterval(() => {\n      if (remainingTime < 0) {\n        clearInterval(interval);\n      } else {\n        setRemainingTime(date.getTime() - new Date().getTime());\n      }\n    }, 1000);\n\n    return () => clearInterval(interval);\n  }, [date, remainingTime]);\n\n  const renderCountdown = useCallback(() => {\n    if (shouldBeStarted) {\n      return <span className=\"text-base-content text-xl\">{t(\"EVENT_NOT_STARTED\")}</span>;\n    }\n\n    const seconds = Math.floor(remainingTime / 1000) % 60;\n    const minutes = Math.floor(remainingTime / 1000 / 60) % 60;\n    const hours = Math.floor(remainingTime / 1000 / 60 / 60) % 24;\n    const days = Math.floor(remainingTime / 1000 / 60 / 60 / 24);\n\n    return (\n      <div className=\"grid grid-flow-col gap-5 text-center auto-cols-max\">\n        <div className=\"flex flex-col p-2 bg-neutral rounded-box text-neutral-content\">\n          <span className=\"countdown font-mono text-5xl\">\n            <span \n              style={{ \"--value\": days } as CSSProperties} \n              aria-live=\"polite\" \n              aria-label={days.toString()}\n            >\n              {days?.toString()?.padStart(2, '0')}\n            </span>\n          </span>\n          <span className=\"text-sm uppercase tracking-widest mt-1\">{t(\"DAYS\")}</span>\n        </div>\n        <div className=\"flex flex-col p-2 bg-neutral rounded-box text-neutral-content\">\n          <span className=\"countdown font-mono text-5xl\">\n            <span \n              style={{ \"--value\": hours } as CSSProperties} \n              aria-live=\"polite\" \n              aria-label={hours.toString()}\n            >\n              {hours?.toString()?.padStart(2, '0')}\n            </span>\n          </span>\n          <span className=\"text-sm uppercase tracking-widest mt-1\">{t(\"HOURS\")}</span>\n        </div>\n        <div className=\"flex flex-col p-2 bg-neutral rounded-box text-neutral-content\">\n          <span className=\"countdown font-mono text-5xl\">\n            <span \n              style={{ \"--value\": minutes } as CSSProperties} \n              aria-live=\"polite\" \n              aria-label={minutes.toString()}\n            >\n              {minutes?.toString()?.padStart(2, '0')}\n            </span>\n          </span>\n          <span className=\"text-sm uppercase tracking-widest mt-1\">{t(\"MINUTES\")}</span>\n        </div>\n        <div className=\"flex flex-col p-2 bg-neutral rounded-box text-neutral-content\">\n          <span className=\"countdown font-mono text-5xl\">\n            <span \n              style={{ \"--value\": seconds } as CSSProperties} \n              aria-live=\"polite\" \n              aria-label={seconds.toString()}\n            >\n              {seconds?.toString()?.padStart(2, '0')}\n            </span>\n          </span>\n          <span className=\"text-sm uppercase tracking-widest mt-1\">{t(\"SECONDS\")}</span>\n        </div>\n      </div>\n    );\n  }, [remainingTime, shouldBeStarted, t]);\n\n  return (\n    <>\n      {event?.posterUrl ? (\n        <>\n          <div \n            className=\"relative overflow-hidden bg-base-200 aspect-video text-base-content w-full h-full flex justify-center items-center flex-col bg-no-repeat bg-cover md:rounded-2xl\" \n            style={{ \n              backgroundImage: `url(${event.posterUrl})`, \n              backgroundRepeat: 'no-repeat', \n              backgroundSize: 'cover' \n            }}\n          >\n            {/* <div className=\"absolute inset-0 bg-black bg-opacity-40\"></div> */}\n            <div className=\"relative z-10\">\n              {renderCountdown()}\n            </div>\n          </div>\n          {!hideTitle && (\n            <TitleAndDescription \n              title={event.title} \n              description={event.description || ''} \n              startTime={event.startTime} \n              locale={locale} \n            />\n          )}\n        </>\n      ) : (\n        <>\n          <div \n            className=\"relative overflow-hidden md:rounded-2xl bg-base-200 aspect-video text-base-content flex flex-col justify-center items-center w-full h-full bg-cover bg-center bg-no-repeat\" \n            style={{\n              backgroundImage: backgroundImageUrl ? `url(${backgroundImageUrl})` : '',\n            }}\n          >\n            {/* {backgroundImageUrl && <div className=\"absolute inset-0 bg-black bg-opacity-40\"></div>} */}\n            <div className=\"relative z-10\">\n              {renderCountdown()}\n            </div>\n          </div>\n          {!hideTitle && (\n            <TitleAndDescription \n              title={event.title} \n              description={event.description || ''} \n              startTime={event.startTime} \n              locale={locale} \n            />\n          )}\n        </>\n      )}\n    </>\n  );\n}\n\n// Title and description component\nconst TitleAndDescription = ({ \n  title, \n  description, \n  startTime, \n  locale = 'en', \n  className \n}: { \n  title: string; \n  description: string; \n  startTime: string; \n  locale?: string; \n  className?: string;\n}) => {\n  return (\n    <div className={twMerge(\"mt-3 mb-6 m-event-details-ctn px-4 text-left w-full\", className)}>\n      <div className=\"text-base md:text-xl m-event-title text-base-content font-medium\">{title}</div>\n      {startTime ? (\n        <div className=\"text-sm md:text-base text-base-content/70 m-event-start-time\">\n          {new Date(startTime || \"\").toLocaleDateString(locale || \"default\", {\n            month: \"long\",\n            year: \"numeric\",\n            day: \"numeric\",\n          })}{\" \"}\n          - {new Date(startTime || \"\").toLocaleTimeString(locale || \"default\", {\n            hour: \"2-digit\",\n            minute: \"2-digit\",\n          })}\n        </div>\n      ) : null}\n      {description && (\n        <div className=\"text-xs md:text-sm text-base-content/60 uppercase\">{description}</div>\n      )}\n    </div>\n  );\n}; ","import React, { CSSProperties, useEffect, useState } from 'react';\nimport { twMerge } from 'tailwind-merge';\nimport { useQuery } from '@tanstack/react-query';\nimport { Player } from './Player';\nimport type { PlayerProps } from './types';\nimport { fetchCreativeWorkData, type CreativeWorkData, CreativeWorksSortDirection } from './api/creative-work';\nimport { fetchVideosList, type VideoListItem } from './api/video';\nimport { Loading, ErrorScreen, Title } from './components';\nimport { errorTypes, findHLSPlaylist } from './helper';\nimport useMessages, { type Translations } from './messages/useMessages';\n\nexport interface CreativeWorkProps extends Omit<PlayerProps, 'src'> {\n  publicKey: string;\n  creativeWorkId: string;\n  hideTitle?: boolean;\n  locale?: string;\n  filter?: string;\n  order?: CreativeWorksSortDirection;\n  events?: {\n    onCreativeWorkData?: (creativeWork: CreativeWorkData) => void;\n    onVideoData?: (video: VideoListItem) => void;\n    onEmptyPlaylists?: () => void;\n    onError?: (error: Error) => void;\n    onPlay?: () => void;\n    onPause?: () => void;\n    onEnded?: () => void;\n    onLoadStart?: () => void;\n    onCanPlay?: () => void;\n    onPlayerReady?: () => void;\n  };\n  className?: string;\n  settings?: {\n    backgroundImageUrl?: string;\n    showCountdownAnimation?: boolean;\n  };\n  auth?: {\n    mottoToken?: string;\n    userId?: string;\n  };\n  // TanStack Query options\n  queryOptions?: {\n    enabled?: boolean;\n    staleTime?: number;\n    cacheTime?: number;\n    retry?: number;\n    retryDelay?: number;\n  };\n}\n\nexport const CreativeWork: React.FC<CreativeWorkProps> = ({\n  publicKey,\n  creativeWorkId,\n  events,\n  hideTitle,\n  locale = 'en',\n  order,\n  filter,\n  className,\n  settings,\n  auth,\n  queryOptions = {},\n  ...props\n}) => {\n  // CreativeWork data fetching\n  const {\n    data: creativeWorkData,\n    isLoading: isCreativeWorkLoading,\n    error: creativeWorkError\n  } = useQuery<CreativeWorkData>({\n    queryKey: ['creative-work', publicKey, creativeWorkId, filter, order, locale],\n    queryFn: () => fetchCreativeWorkData(publicKey, creativeWorkId, undefined, filter, order, locale),\n    enabled: !!publicKey && !!creativeWorkId,\n    staleTime: queryOptions.staleTime ?? 5 * 60 * 1000, // 5 minutes\n    gcTime: queryOptions.cacheTime ?? 10 * 60 * 1000, // 10 minutes\n    retry: queryOptions.retry ?? 3,\n    retryDelay: queryOptions.retryDelay ?? ((attemptIndex: number) => Math.min(1000 * 2 ** attemptIndex, 30000))\n  });\n\n  const [activePlaylist, setActivePlaylist] = useState<string | null>();\n  const [activeVideoId, setActiveVideoId] = useState<string | null>();\n  const [showCountDown, setShowCountDown] = useState(false);\n  const videoIds = creativeWorkData?.videoIds ?? [];\n\n  // Videos list fetching\n  const {\n    data: videosData,\n    isLoading: videosIsLoading,\n    error: videosError,    \n  } = useQuery<VideoListItem[]>({\n    queryKey: ['videos-list', publicKey, videoIds, auth?.mottoToken],\n    queryFn: () => fetchVideosList(publicKey, videoIds, auth?.mottoToken, 0, 0),\n    enabled: !!publicKey && videoIds.length > 0,\n    refetchInterval: activePlaylist === null ? 30000 : false,\n    staleTime: queryOptions.staleTime ?? 5 * 60 * 1000,\n    gcTime: queryOptions.cacheTime ?? 10 * 60 * 1000,\n    retry: queryOptions.retry ?? 3,\n    retryDelay: queryOptions.retryDelay ?? ((attemptIndex: number) => Math.min(1000 * 2 ** attemptIndex, 30000))\n  });\n\n  const [loadingApisState, setLoadingApisState] = useState(true);\n\n  // Process videos data to find active playlist\n  useEffect(() => {\n    if (videosData !== undefined) {\n      setLoadingApisState(false);\n\n      const videosWithPlaylists = videosData.filter(\n        (video) => video.playlists && video.playlists.length > 0\n      );\n\n      if (videosWithPlaylists.length > 0) {\n        let hlsPlaylistFound = false;\n        // Iterate to find the first HLS playlist\n        for (const video of videosWithPlaylists) {\n          const hlsPlaylist = findHLSPlaylist(video);\n          if (hlsPlaylist?.url) {\n            setActivePlaylist(hlsPlaylist.url);\n            setActiveVideoId(video.id);\n            hlsPlaylistFound = true;\n            break;\n          }\n        }\n        if (!hlsPlaylistFound) {\n          setActivePlaylist(null);\n          setActiveVideoId(null);\n        }\n      } else {\n        setActivePlaylist(null);\n        setActiveVideoId(null);\n      }\n    } else if (creativeWorkData && (!creativeWorkData.videoIds || creativeWorkData.videoIds.length === 0)) {\n      setLoadingApisState(false);\n      setActivePlaylist(null);\n      setActiveVideoId(null);\n    }\n  }, [videosData, creativeWorkData]);\n  \n  const { t } = useMessages(locale);\n\n  // Notify parent of creative work data\n  useEffect(() => {\n    if (events?.onCreativeWorkData && creativeWorkData) {\n      events.onCreativeWorkData(creativeWorkData);\n    }\n    if (creativeWorkData && !creativeWorkData?.videoIds?.length) {\n      setShowCountDown(true);\n    }\n  }, [creativeWorkData, events]);\n\n  // Notify parent of video data\n  useEffect(() => {\n    if (events?.onVideoData && activeVideoId && videosData) {\n      const activeVideo = videosData.find((video) => video.id === activeVideoId);\n      if (activeVideo) {\n        events.onVideoData(activeVideo);\n      }\n    }\n  }, [activeVideoId, videosData, events]);\n\n  const [error, setError] = useState<Error | null>(null);\n  const videosDataError = videosData?.some((video) => !!video.error);\n\n  // Error handling\n  useEffect(() => {\n    if (creativeWorkError || videosError || videosDataError) {\n      const errorObj = creativeWorkError || videosError || \n        (videosData?.find((video) => !!video.error)?.error && \n         new Error(videosData?.find((video) => !!video.error)?.error)) || \n        new Error('default');\n      \n      setError(errorObj);\n      if (events?.onError) {\n        events.onError(errorObj);\n      }\n    } else {\n      setError(null);\n    }\n  }, [creativeWorkError, videosError, videosDataError, videosData, events]);\n\n  // Error state\n  if (error) {\n    const title = t(error.message as keyof Translations)?.length ? \n      t(error.message as keyof Translations) : t(\"DEFAULT_ERROR\"); \n    const description = t(`${error.message}_DESCRIPTION` as keyof Translations)?.length ?  \n      t(`${error.message}_DESCRIPTION` as keyof Translations) : t(\"DEFAULT_ERROR_DESCRIPTION\");\n    \n    return (\n      <div className={twMerge(\"md:rounded-2xl overflow-hidden aspect-video\", className)}>\n        <div className=\"relative w-full h-full\">\n          <ErrorScreen\n            title={title}\n            description={description}\n          />\n        </div>\n      </div>\n    );\n  }\n\n  const [loadingPlaylist, setLoadingPlaylist] = useState(true);\n  \n  // Loading state management\n  useEffect(() => {\n    const creativeWorkLoadedWithNoVideos =\n      !isCreativeWorkLoading &&\n      creativeWorkData &&\n      creativeWorkData.videoIds &&\n      creativeWorkData.videoIds.length === 0;\n\n    const creativeWorkLoadedWithNoData =\n      !isCreativeWorkLoading && creativeWorkData && !creativeWorkData.videoIds;\n\n    const isEventsFinished =\n      !videosIsLoading &&\n      videosData &&\n      videosData.length > 0 &&\n      videosData.every((video) => video.playlists && video.playlists.length === 0);\n\n    if (\n      creativeWorkLoadedWithNoVideos ||\n      creativeWorkLoadedWithNoData ||\n      isEventsFinished\n    ) {\n      setLoadingPlaylist(false);\n      if (events?.onEmptyPlaylists) {\n        events.onEmptyPlaylists();\n      }\n    } else if (activePlaylist) {\n      setLoadingPlaylist(false);\n    }\n  }, [\n    isCreativeWorkLoading,\n    creativeWorkData,\n    videosIsLoading,\n    videosData,\n    activePlaylist,\n    events,\n  ]);\n\n  // Loading state\n  if (isCreativeWorkLoading || videosIsLoading || loadingApisState) {\n    return (\n      <div className={twMerge(\"md:rounded-2xl overflow-hidden aspect-video\", className)}>\n        <div className=\"relative w-full h-full\">\n          <Loading />\n        </div>\n      </div>\n    );\n  }\n\n  // Show countdown if creative work hasn't started yet\n  if (showCountDown && creativeWorkData) {\n    return (\n      <div className={twMerge(\"md:rounded-2xl overflow-hidden aspect-video\", className)}>\n        <div className=\"relative w-full h-full bg-base-200 text-base-content flex justify-center items-center flex-col\">\n          <PreCreativeWork \n            creativeWork={creativeWorkData} \n            locale={locale} \n            hideTitle={hideTitle}\n            backgroundImageUrl={settings?.backgroundImageUrl} \n            showAnimation={settings?.showCountdownAnimation} \n          />\n        </div>\n      </div>\n    );\n  }\n\n  // Show player if we have an active playlist\n  if (activeVideoId && activePlaylist && !loadingPlaylist) {\n    const activeVideo = videosData?.find((video) => video.id === activeVideoId);\n    \n    return (\n      <div className={twMerge(\"md:rounded-2xl overflow-hidden aspect-video\", className)}>\n        <div className=\"relative w-full h-full\">\n          <Player\n            {...props}\n            className={twMerge(className, \"peer\")}\n            events={{\n              ...events,\n            }}\n            src={activePlaylist}\n            containerClassName=\"w-full h-full\"\n          />\n          {!hideTitle && (\n            <TitleAndDescription\n              title={creativeWorkData?.title || ''}\n              description={creativeWorkData?.description || ''}\n              releaseTime={creativeWorkData?.releaseTime || ''}\n              locale={locale}\n              className=\"mt-3 mb-6 m-event-details-ctn px-4\"\n            />\n          )}\n        </div>\n      </div>\n    );\n  }\n\n  // Loading state for playlist\n  if (loadingPlaylist) {\n    return <Loading />;\n  }\n\n  // Empty state\n  return null;\n};\n\nfunction PreCreativeWork({ \n  creativeWork, \n  locale = 'en', \n  hideTitle, \n  backgroundImageUrl, \n  showAnimation = true \n}: { \n  creativeWork: CreativeWorkData; \n  locale?: string; \n  hideTitle?: boolean; \n  backgroundImageUrl?: string; \n  showAnimation?: boolean;\n}): JSX.Element {\n  const date = new Date(creativeWork.releaseTime);\n  const now = new Date();\n  const [remainingTime, setRemainingTime] = useState(\n    date.getTime() - now.getTime()\n  );\n  const shouldBeStarted = remainingTime < 0;\n  const { t } = useMessages(locale);\n\n  useEffect(() => {\n    const interval = setInterval(() => {\n      if (remainingTime < 0) {\n        clearInterval(interval);\n      } else {\n        setRemainingTime(date.getTime() - new Date().getTime());\n      }\n    }, 1000);\n\n    return () => { clearInterval(interval); };\n  }, [date, remainingTime]);\n\n  const renderCountdown = () => {\n    if (shouldBeStarted) {\n      return <span className=\"text-base-content text-xl\">{t(\"EVENT_NOT_STARTED\")}</span>;\n    }\n\n    const seconds = Math.floor(remainingTime / 1000) % 60;\n    const minutes = Math.floor(remainingTime / 1000 / 60) % 60;\n    const hours = Math.floor(remainingTime / 1000 / 60 / 60) % 24;\n    const days = Math.floor(remainingTime / 1000 / 60 / 60 / 24);\n\n    return (\n      <div className=\"grid grid-flow-col gap-5 text-center auto-cols-max\">\n        <div className=\"flex flex-col p-2 bg-neutral rounded-box text-neutral-content\">\n          <span className=\"countdown font-mono text-5xl\">\n            <span \n              style={{ \"--value\": days } as CSSProperties} \n              aria-live=\"polite\" \n              aria-label={days.toString()}\n            >\n              {days?.toString()?.padStart(2, '0')}\n            </span>\n          </span>\n          <span className=\"text-sm uppercase tracking-widest mt-1\">{t(\"DAYS\")}</span>\n        </div>\n        <div className=\"flex flex-col p-2 bg-neutral rounded-box text-neutral-content\">\n          <span className=\"countdown font-mono text-5xl\">\n            <span \n              style={{ \"--value\": hours } as CSSProperties} \n              aria-live=\"polite\" \n              aria-label={hours.toString()}\n            >\n              {hours?.toString()?.padStart(2, '0')}\n            </span>\n          </span>\n          <span className=\"text-sm uppercase tracking-widest mt-1\">{t(\"HOURS\")}</span>\n        </div>\n        <div className=\"flex flex-col p-2 bg-neutral rounded-box text-neutral-content\">\n          <span className=\"countdown font-mono text-5xl\">\n            <span \n              style={{ \"--value\": minutes } as CSSProperties} \n              aria-live=\"polite\" \n              aria-label={minutes.toString()}\n            >\n              {minutes?.toString()?.padStart(2, '0')}\n            </span>\n          </span>\n          <span className=\"text-sm uppercase tracking-widest mt-1\">{t(\"MINUTES\")}</span>\n        </div>\n        <div className=\"flex flex-col p-2 bg-neutral rounded-box text-neutral-content\">\n          <span className=\"countdown font-mono text-5xl\">\n            <span \n              style={{ \"--value\": seconds } as CSSProperties} \n              aria-live=\"polite\" \n              aria-label={seconds.toString()}\n            >\n              {seconds?.toString()?.padStart(2, '0')}\n            </span>\n          </span>\n          <span className=\"text-sm uppercase tracking-widest mt-1\">{t(\"SECONDS\")}</span>\n        </div>\n      </div>\n    );\n  };\n\n  return (\n    <>\n      <div \n        className=\"relative overflow-hidden md:rounded-2xl bg-base-200 aspect-video text-base-content flex flex-col justify-center items-center w-full h-full bg-cover bg-center bg-no-repeat\" \n        style={{\n          backgroundImage: backgroundImageUrl ? `url(${backgroundImageUrl})` : '',\n        }}\n      >\n        {backgroundImageUrl && <div className=\"absolute inset-0 bg-black bg-opacity-40\"></div>}\n        <div className=\"relative z-10\">\n          {renderCountdown()}\n        </div>\n      </div>\n      {!hideTitle && (\n        <TitleAndDescription\n          title={creativeWork.title}\n          description={creativeWork.description || ''}\n          releaseTime={creativeWork.releaseTime}\n          locale={locale}\n        />\n      )}\n    </>\n  );\n}\n\nconst TitleAndDescription = ({ \n  title, \n  description, \n  releaseTime, \n  locale = 'en', \n  className \n}: { \n  title: string; \n  description: string; \n  releaseTime: string; \n  locale?: string; \n  className?: string;\n}) => {\n  return (\n    <div className={twMerge(\"mt-3 mb-6 m-event-details-ctn px-4 text-left w-full\", className)}>\n      <div className=\"text-base md:text-xl m-event-title text-base-content font-medium\">{title}</div>\n      {releaseTime ? (\n        <div className=\"text-sm md:text-base text-base-content/70 m-event-start-time\">\n          {new Date(releaseTime || \"\").toLocaleDateString(locale || \"default\", {\n            month: \"long\",\n            year: \"numeric\",\n            day: \"numeric\",\n          })}{\" \"}\n          - {new Date(releaseTime || \"\").toLocaleTimeString(locale || \"default\", {\n            hour: \"2-digit\",\n            minute: \"2-digit\",\n          })}\n        </div>\n      ) : null}\n      {description && (\n        <div className=\"text-xs md:text-sm text-base-content/60 uppercase\">{description}</div>\n      )}\n    </div>\n  );\n}; ","import React from 'react';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\n\n// Create a client\nconst queryClient = new QueryClient({\n  defaultOptions: {\n    queries: {\n      staleTime: 5 * 60 * 1000, // 5 minutes\n      gcTime: 10 * 60 * 1000, // 10 minutes\n      retry: 3,\n      refetchOnWindowFocus: false,\n    },\n  },\n});\n\ninterface QueryProviderProps {\n  children: React.ReactNode;\n}\n\nexport const QueryProvider: React.FC<QueryProviderProps> = ({ children }) => {\n  return (\n    <QueryClientProvider client={queryClient}>\n      {children}\n    </QueryClientProvider>\n  );\n};\n\nexport { queryClient }; "],"mappings":";;;AACA,OAAO;;;ACAkB,SAAR,YAA6B,KAAK,EAAE,SAAS,IAAI,CAAC,GAAG;AAC1D,MAAI,CAAC,OAAO,OAAO,aAAa,YAAa;AAE7C,QAAM,OAAO,SAAS,QAAQ,SAAS,qBAAqB,MAAM,EAAE,CAAC;AACrE,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,OAAO;AAEb,MAAI,aAAa,OAAO;AACtB,QAAI,KAAK,YAAY;AACnB,WAAK,aAAa,OAAO,KAAK,UAAU;AAAA,IAC1C,OAAO;AACL,WAAK,YAAY,KAAK;AAAA,IACxB;AAAA,EACF,OAAO;AACL,SAAK,YAAY,KAAK;AAAA,EACxB;AAEA,MAAI,MAAM,YAAY;AACpB,UAAM,WAAW,UAAU;AAAA,EAC7B,OAAO;AACL,UAAM,YAAY,SAAS,eAAe,GAAG,CAAC;AAAA,EAChD;AACF;;;ACvB8B,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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qD,uBAAY;AAAA,KAEpF;AAEJ;;;AC5cA,SAAS,aAAa,2BAA2B;AAoB7C,gBAAAO,aAAA;AAjBJ,IAAM,cAAc,IAAI,YAAY;AAAA,EAClC,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,WAAW,IAAI,KAAK;AAAA;AAAA,MACpB,QAAQ,KAAK,KAAK;AAAA;AAAA,MAClB,OAAO;AAAA,MACP,sBAAsB;AAAA,IACxB;AAAA,EACF;AACF,CAAC;AAMM,IAAM,gBAA8C,CAAC,EAAE,SAAS,MAAM;AAC3E,SACE,gBAAAA,MAAC,uBAAoB,QAAQ,aAC1B,UACH;AAEJ;","names":["useEffect","useRef","shaka","useCallback","useCallback","useCallback","useRef","useRef","useCallback","useCallback","useRef","jsx","jsxs","jsx","useRef","useCallback","useCallback","useRef","useEffect","useState","useEffect","useRef","useCallback","useEffect","jsx","jsxs","jsx","jsxs","jsx","jsx","jsxs","twMerge","jsx","jsxs","useRef","isLive","shaka","useEffect","useEffect","twMerge","useState","useEffect","useState","useEffect","jsx","jsxs","useEffect","twMerge","useCallback","useEffect","useState","twMerge","useQuery","jsx","jsxs","useQuery","useState","useEffect","twMerge","useCallback","useEffect","useState","twMerge","useQuery","Fragment","jsx","jsxs","useQuery","useState","useEffect","twMerge","TitleAndDescription","jsx"]}