@hopeplayer/core 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/HopePlayerElement.d.ts +14 -0
  2. package/dist/HopePlayerElement.d.ts.map +1 -1
  3. package/dist/chunks/index-BvFMYXAE.js +2007 -0
  4. package/dist/chunks/index-BvFMYXAE.js.map +1 -0
  5. package/dist/chunks/{index-lrAXde76.js → index-C6xzBfNn.js} +2 -2
  6. package/dist/chunks/{index-lrAXde76.js.map → index-C6xzBfNn.js.map} +1 -1
  7. package/dist/chunks/index-CaMVTgh0.js +144 -0
  8. package/dist/chunks/index-CaMVTgh0.js.map +1 -0
  9. package/dist/chunks/{index-DadIEuQc.js → index-CgkX9qaH.js} +2 -2
  10. package/dist/chunks/{index-DadIEuQc.js.map → index-CgkX9qaH.js.map} +1 -1
  11. package/dist/chunks/{index-CZK3TwzR.js → index-IcJCsJYH.js} +2 -2
  12. package/dist/chunks/{index-CZK3TwzR.js.map → index-IcJCsJYH.js.map} +1 -1
  13. package/dist/chunks/{index-BR31cEYA.js → index-TQsycon_.js} +2 -2
  14. package/dist/chunks/{index-BR31cEYA.js.map → index-TQsycon_.js.map} +1 -1
  15. package/dist/chunks/{index-CEmsL1uT.js → index-Xf3PnlMU.js} +2 -2
  16. package/dist/chunks/{index-CEmsL1uT.js.map → index-Xf3PnlMU.js.map} +1 -1
  17. package/dist/controls/ControlBar.d.ts +2 -1
  18. package/dist/controls/ControlBar.d.ts.map +1 -1
  19. package/dist/controls/SettingsMenu.d.ts +11 -1
  20. package/dist/controls/SettingsMenu.d.ts.map +1 -1
  21. package/dist/hls/SourceManager.d.ts +23 -0
  22. package/dist/hls/SourceManager.d.ts.map +1 -1
  23. package/dist/hope-player.js +1 -1
  24. package/dist/i18n/locales/en.d.ts.map +1 -1
  25. package/dist/i18n/locales/tr.d.ts.map +1 -1
  26. package/dist/i18n/types.d.ts +5 -0
  27. package/dist/i18n/types.d.ts.map +1 -1
  28. package/dist/index.d.ts +2 -1
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/keyboard/KeyboardController.d.ts.map +1 -1
  31. package/dist/plugins/pause-ad/PauseAd.d.ts +52 -0
  32. package/dist/plugins/pause-ad/PauseAd.d.ts.map +1 -0
  33. package/dist/plugins/pause-ad/index.d.ts +6 -0
  34. package/dist/plugins/pause-ad/index.d.ts.map +1 -0
  35. package/dist/plugins/pause-ad/loadGpt.d.ts +35 -0
  36. package/dist/plugins/pause-ad/loadGpt.d.ts.map +1 -0
  37. package/dist/screens/ErrorScreen.d.ts +11 -1
  38. package/dist/screens/ErrorScreen.d.ts.map +1 -1
  39. package/dist/subtitles/attachTracks.d.ts +17 -1
  40. package/dist/subtitles/attachTracks.d.ts.map +1 -1
  41. package/dist/types/index.d.ts +32 -0
  42. package/dist/types/index.d.ts.map +1 -1
  43. package/package.json +1 -1
  44. package/dist/chunks/index-BjmWoP4E.js +0 -1786
  45. package/dist/chunks/index-BjmWoP4E.js.map +0 -1
@@ -1,1786 +0,0 @@
1
- var _ = Object.defineProperty;
2
- var G = (a, e, t) => e in a ? _(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
3
- var i = (a, e, t) => G(a, typeof e != "symbol" ? e + "" : e, t);
4
- const X = '/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial}}}@layer theme{:root,:host{--hp-font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--hp-font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--hp-color-black:#000;--hp-color-white:#fff;--hp-spacing:.25rem;--hp-container-xs:20rem;--hp-text-xs:.75rem;--hp-text-xs--line-height:calc(1 / .75);--hp-text-sm:.875rem;--hp-text-sm--line-height:calc(1.25 / .875);--hp-text-base:1rem;--hp-text-base--line-height: 1.5 ;--hp-text-lg:1.125rem;--hp-text-lg--line-height:calc(1.75 / 1.125);--hp-text-xl:1.25rem;--hp-text-xl--line-height:calc(1.75 / 1.25);--hp-text-2xl:1.5rem;--hp-text-2xl--line-height:calc(2 / 1.5);--hp-text-3xl:1.875rem;--hp-text-3xl--line-height: 1.2 ;--hp-font-weight-medium:500;--hp-font-weight-semibold:600;--hp-radius-md:.375rem;--hp-radius-lg:.5rem;--hp-animate-spin:spin 1s linear infinite;--hp-aspect-video:16 / 9;--hp-default-transition-duration:.15s;--hp-default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--hp-default-font-family:var(--hp-font-sans);--hp-default-mono-font-family:var(--hp-font-mono);--hp-color-accent:#fff;--hp-color-on-accent:#0a0a0a;--hp-color-surface:#0a0a0a;--hp-color-surface-elev:#1a1a1a;--hp-color-on-surface:#fff;--hp-color-on-surface-muted:#a3a3a3}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--hp-default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--hp-default-font-feature-settings,normal);font-variation-settings:var(--hp-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--hp-default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--hp-default-mono-font-feature-settings,normal);font-variation-settings:var(--hp-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.hp\\:pointer-events-auto{pointer-events:auto}.hp\\:pointer-events-none{pointer-events:none}.hp\\:absolute{position:absolute}.hp\\:relative{position:relative}.hp\\:sticky{position:sticky}.hp\\:inset-0{top:0;right:0;bottom:0;left:0}.hp\\:inset-x-0{inset-inline:0}.hp\\:inset-y-0{inset-block:0}.hp\\:top-0{top:0}.hp\\:top-1{top:var(--hp-spacing)}.hp\\:top-1\\/2{top:50%}.hp\\:top-2{top:calc(var(--hp-spacing) * 2)}.hp\\:right-0{right:0}.hp\\:right-1{right:var(--hp-spacing)}.hp\\:right-2{right:calc(var(--hp-spacing) * 2)}.hp\\:bottom-0{bottom:0}.hp\\:bottom-full{bottom:100%}.hp\\:left-1\\/2{left:50%}.hp\\:z-10{z-index:10}.hp\\:z-20{z-index:20}.hp\\:z-30{z-index:30}.hp\\:z-40{z-index:40}.hp\\:m-0{margin:0}.hp\\:mt-0\\.5{margin-top:calc(var(--hp-spacing) * .5)}.hp\\:mt-1{margin-top:var(--hp-spacing)}.hp\\:mt-2{margin-top:calc(var(--hp-spacing) * 2)}.hp\\:mt-8{margin-top:calc(var(--hp-spacing) * 8)}.hp\\:mb-1{margin-bottom:var(--hp-spacing)}.hp\\:mb-2{margin-bottom:calc(var(--hp-spacing) * 2)}.hp\\:mb-16{margin-bottom:calc(var(--hp-spacing) * 16)}.hp\\:ml-1{margin-left:var(--hp-spacing)}.hp\\:block{display:block}.hp\\:flex{display:flex}.hp\\:grid{display:grid}.hp\\:hidden{display:none}.hp\\:aspect-\\[9\\/16\\]{aspect-ratio:9/16}.hp\\:aspect-video{aspect-ratio:var(--hp-aspect-video)}.hp\\:h-0\\.5{height:calc(var(--hp-spacing) * .5)}.hp\\:h-1{height:var(--hp-spacing)}.hp\\:h-1\\/3{height:33.3333%}.hp\\:h-6{height:calc(var(--hp-spacing) * 6)}.hp\\:h-7{height:calc(var(--hp-spacing) * 7)}.hp\\:h-8{height:calc(var(--hp-spacing) * 8)}.hp\\:h-10{height:calc(var(--hp-spacing) * 10)}.hp\\:h-16{height:calc(var(--hp-spacing) * 16)}.hp\\:h-20{height:calc(var(--hp-spacing) * 20)}.hp\\:h-\\[var\\(--hp-ctrl-btn-size\\)\\]{height:var(--hp-ctrl-btn-size)}.hp\\:h-\\[var\\(--hp-seek-hit-h\\)\\]{height:var(--hp-seek-hit-h)}.hp\\:h-\\[var\\(--hp-seek-track-h\\)\\]{height:var(--hp-seek-track-h)}.hp\\:h-full{height:100%}.hp\\:max-h-64{max-height:calc(var(--hp-spacing) * 64)}.hp\\:max-h-80{max-height:calc(var(--hp-spacing) * 80)}.hp\\:w-0{width:0}.hp\\:w-0\\.5{width:calc(var(--hp-spacing) * .5)}.hp\\:w-1{width:var(--hp-spacing)}.hp\\:w-1\\.5{width:calc(var(--hp-spacing) * 1.5)}.hp\\:w-6{width:calc(var(--hp-spacing) * 6)}.hp\\:w-7{width:calc(var(--hp-spacing) * 7)}.hp\\:w-8{width:calc(var(--hp-spacing) * 8)}.hp\\:w-10{width:calc(var(--hp-spacing) * 10)}.hp\\:w-14{width:calc(var(--hp-spacing) * 14)}.hp\\:w-16{width:calc(var(--hp-spacing) * 16)}.hp\\:w-48{width:calc(var(--hp-spacing) * 48)}.hp\\:w-72{width:calc(var(--hp-spacing) * 72)}.hp\\:w-\\[var\\(--hp-ctrl-btn-size\\)\\]{width:var(--hp-ctrl-btn-size)}.hp\\:w-full{width:100%}.hp\\:max-w-\\[50\\%\\]{max-width:50%}.hp\\:max-w-\\[80\\%\\]{max-width:80%}.hp\\:max-w-\\[85\\%\\]{max-width:85%}.hp\\:max-w-full{max-width:100%}.hp\\:max-w-xs{max-width:var(--hp-container-xs)}.hp\\:min-w-0{min-width:0}.hp\\:flex-1{flex:1}.hp\\:flex-shrink-0,.hp\\:shrink-0{flex-shrink:0}.hp\\:animate-spin{animation:var(--hp-animate-spin)}.hp\\:cursor-pointer{cursor:pointer}.hp\\:touch-none{touch-action:none}.hp\\:list-none{list-style-type:none}.hp\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.hp\\:flex-col{flex-direction:column}.hp\\:flex-wrap{flex-wrap:wrap}.hp\\:items-center{align-items:center}.hp\\:items-end{align-items:flex-end}.hp\\:justify-between{justify-content:space-between}.hp\\:justify-center{justify-content:center}.hp\\:gap-0\\.5{gap:calc(var(--hp-spacing) * .5)}.hp\\:gap-1{gap:var(--hp-spacing)}.hp\\:gap-1\\.5{gap:calc(var(--hp-spacing) * 1.5)}.hp\\:gap-2{gap:calc(var(--hp-spacing) * 2)}.hp\\:gap-3{gap:calc(var(--hp-spacing) * 3)}.hp\\:self-end{align-self:flex-end}.hp\\:truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.hp\\:overflow-hidden{overflow:hidden}.hp\\:overflow-y-auto{overflow-y:auto}.hp\\:rounded{border-radius:.25rem}.hp\\:rounded-full{border-radius:3.40282e38px}.hp\\:rounded-lg{border-radius:var(--hp-radius-lg)}.hp\\:rounded-md{border-radius:var(--hp-radius-md)}.hp\\:border{border-style:var(--tw-border-style);border-width:1px}.hp\\:border-0{border-style:var(--tw-border-style);border-width:0}.hp\\:border-2{border-style:var(--tw-border-style);border-width:2px}.hp\\:border-\\[3px\\]{border-style:var(--tw-border-style);border-width:3px}.hp\\:border-on-surface\\/20{border-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:border-on-surface\\/20{border-color:color-mix(in oklab,var(--hp-color-on-surface) 20%,transparent)}}.hp\\:border-on-surface\\/30{border-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:border-on-surface\\/30{border-color:color-mix(in oklab,var(--hp-color-on-surface) 30%,transparent)}}.hp\\:border-t-accent{border-top-color:var(--hp-color-accent)}.hp\\:bg-accent,.hp\\:bg-accent\\/15{background-color:var(--hp-color-accent)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-accent\\/15{background-color:color-mix(in oklab,var(--hp-color-accent) 15%,transparent)}}.hp\\:bg-black,.hp\\:bg-black\\/30{background-color:var(--hp-color-black)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-black\\/30{background-color:color-mix(in oklab,var(--hp-color-black) 30%,transparent)}}.hp\\:bg-black\\/40{background-color:var(--hp-color-black)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-black\\/40{background-color:color-mix(in oklab,var(--hp-color-black) 40%,transparent)}}.hp\\:bg-black\\/60{background-color:var(--hp-color-black)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-black\\/60{background-color:color-mix(in oklab,var(--hp-color-black) 60%,transparent)}}.hp\\:bg-black\\/70{background-color:var(--hp-color-black)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-black\\/70{background-color:color-mix(in oklab,var(--hp-color-black) 70%,transparent)}}.hp\\:bg-black\\/85{background-color:var(--hp-color-black)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-black\\/85{background-color:color-mix(in oklab,var(--hp-color-black) 85%,transparent)}}.hp\\:bg-on-surface,.hp\\:bg-on-surface\\/20{background-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-on-surface\\/20{background-color:color-mix(in oklab,var(--hp-color-on-surface) 20%,transparent)}}.hp\\:bg-on-surface\\/25{background-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-on-surface\\/25{background-color:color-mix(in oklab,var(--hp-color-on-surface) 25%,transparent)}}.hp\\:bg-on-surface\\/40{background-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-on-surface\\/40{background-color:color-mix(in oklab,var(--hp-color-on-surface) 40%,transparent)}}.hp\\:bg-surface{background-color:var(--hp-color-surface)}.hp\\:bg-surface-elev{background-color:var(--hp-color-surface-elev)}.hp\\:bg-surface\\/95{background-color:var(--hp-color-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-surface\\/95{background-color:color-mix(in oklab,var(--hp-color-surface) 95%,transparent)}}.hp\\:bg-transparent{background-color:#0000}.hp\\:bg-white,.hp\\:bg-white\\/15{background-color:var(--hp-color-white)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-white\\/15{background-color:color-mix(in oklab,var(--hp-color-white) 15%,transparent)}}.hp\\:bg-white\\/30{background-color:var(--hp-color-white)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-white\\/30{background-color:color-mix(in oklab,var(--hp-color-white) 30%,transparent)}}.hp\\:bg-white\\/40{background-color:var(--hp-color-white)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-white\\/40{background-color:color-mix(in oklab,var(--hp-color-white) 40%,transparent)}}.hp\\:bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.hp\\:from-black\\/80{--tw-gradient-from:var(--hp-color-black)}@supports (color:color-mix(in lab,red,red)){.hp\\:from-black\\/80{--tw-gradient-from:color-mix(in oklab, var(--hp-color-black) 80%, transparent)}}.hp\\:from-black\\/80{--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))}.hp\\:to-transparent{--tw-gradient-to:transparent;--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))}.hp\\:bg-cover{background-size:cover}.hp\\:bg-center{background-position:50%}.hp\\:object-cover{object-fit:cover}.hp\\:p-0{padding:0}.hp\\:p-1\\.5{padding:calc(var(--hp-spacing) * 1.5)}.hp\\:p-2{padding:calc(var(--hp-spacing) * 2)}.hp\\:p-3{padding:calc(var(--hp-spacing) * 3)}.hp\\:p-4{padding:calc(var(--hp-spacing) * 4)}.hp\\:px-1{padding-inline:var(--hp-spacing)}.hp\\:px-1\\.5{padding-inline:calc(var(--hp-spacing) * 1.5)}.hp\\:px-2{padding-inline:calc(var(--hp-spacing) * 2)}.hp\\:px-3{padding-inline:calc(var(--hp-spacing) * 3)}.hp\\:px-4{padding-inline:calc(var(--hp-spacing) * 4)}.hp\\:px-6{padding-inline:calc(var(--hp-spacing) * 6)}.hp\\:py-1{padding-block:var(--hp-spacing)}.hp\\:py-1\\.5{padding-block:calc(var(--hp-spacing) * 1.5)}.hp\\:py-2{padding-block:calc(var(--hp-spacing) * 2)}.hp\\:pt-6{padding-top:calc(var(--hp-spacing) * 6)}.hp\\:pb-2{padding-bottom:calc(var(--hp-spacing) * 2)}.hp\\:text-center{text-align:center}.hp\\:text-left{text-align:left}.hp\\:font-mono{font-family:var(--hp-font-mono)}.hp\\:text-2xl{font-size:var(--hp-text-2xl);line-height:var(--tw-leading,var(--hp-text-2xl--line-height))}.hp\\:text-3xl{font-size:var(--hp-text-3xl);line-height:var(--tw-leading,var(--hp-text-3xl--line-height))}.hp\\:text-base{font-size:var(--hp-text-base);line-height:var(--tw-leading,var(--hp-text-base--line-height))}.hp\\:text-lg{font-size:var(--hp-text-lg);line-height:var(--tw-leading,var(--hp-text-lg--line-height))}.hp\\:text-sm{font-size:var(--hp-text-sm);line-height:var(--tw-leading,var(--hp-text-sm--line-height))}.hp\\:text-xl{font-size:var(--hp-text-xl);line-height:var(--tw-leading,var(--hp-text-xl--line-height))}.hp\\:text-xs{font-size:var(--hp-text-xs);line-height:var(--tw-leading,var(--hp-text-xs--line-height))}.hp\\:text-\\[length\\:var\\(--hp-ctrl-icon-size\\)\\]{font-size:var(--hp-ctrl-icon-size)}.hp\\:leading-none{--tw-leading:1;line-height:1}.hp\\:font-medium{--tw-font-weight:var(--hp-font-weight-medium);font-weight:var(--hp-font-weight-medium)}.hp\\:font-semibold{--tw-font-weight:var(--hp-font-weight-semibold);font-weight:var(--hp-font-weight-semibold)}.hp\\:whitespace-nowrap{white-space:nowrap}.hp\\:text-accent{color:var(--hp-color-accent)}.hp\\:text-on-accent{color:var(--hp-color-on-accent)}.hp\\:text-on-surface{color:var(--hp-color-on-surface)}.hp\\:text-on-surface-muted{color:var(--hp-color-on-surface-muted)}.hp\\:text-white{color:var(--hp-color-white)}.hp\\:tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.hp\\:no-underline{text-decoration-line:none}.hp\\:underline{text-decoration-line:underline}.hp\\:opacity-0{opacity:0}.hp\\:opacity-60{opacity:.6}.hp\\:opacity-70{opacity:.7}.hp\\:opacity-80{opacity:.8}.hp\\:opacity-90{opacity:.9}.hp\\:shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hp\\:shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hp\\:drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a)) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);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,)}.hp\\:transition-\\[height\\]{transition-property:height;transition-timing-function:var(--tw-ease,var(--hp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--hp-default-transition-duration))}.hp\\:transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--hp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--hp-default-transition-duration))}.hp\\:transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--hp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--hp-default-transition-duration))}.hp\\:duration-100{--tw-duration:.1s;transition-duration:.1s}.hp\\:duration-150{--tw-duration:.15s;transition-duration:.15s}.hp\\:duration-200{--tw-duration:.2s;transition-duration:.2s}.hp\\:duration-300{--tw-duration:.3s;transition-duration:.3s}.hp\\:will-change-\\[opacity\\]{will-change:opacity}.hp\\:select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.hp\\:group-hover\\:h-\\[var\\(--hp-seek-track-h-hover\\)\\]:is(:where(.hp\\:group):hover *){height:var(--hp-seek-track-h-hover)}.hp\\:hover\\:bg-on-surface\\/5:hover{background-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:hover\\:bg-on-surface\\/5:hover{background-color:color-mix(in oklab,var(--hp-color-on-surface) 5%,transparent)}}.hp\\:hover\\:bg-on-surface\\/10:hover{background-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:hover\\:bg-on-surface\\/10:hover{background-color:color-mix(in oklab,var(--hp-color-on-surface) 10%,transparent)}}.hp\\:hover\\:opacity-80:hover{opacity:.8}}.hp\\:focus-visible\\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hp\\:focus-visible\\:ring-accent:focus-visible{--tw-ring-color:var(--hp-color-accent)}.hp\\:focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.hp\\:data-\\[active\\=true\\]\\:bg-accent\\/15[data-active=true]{background-color:var(--hp-color-accent)}@supports (color:color-mix(in lab,red,red)){.hp\\:data-\\[active\\=true\\]\\:bg-accent\\/15[data-active=true]{background-color:color-mix(in oklab,var(--hp-color-accent) 15%,transparent)}}.hp\\:data-\\[active\\=true\\]\\:text-on-surface[data-active=true]{color:var(--hp-color-on-surface)}}.hp-icon{font-variant:normal;text-transform:none;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:hope-icons;font-style:normal;font-weight:400;line-height:1}.hp-icon-check:before{content:""}.hp-icon-chevron-left:before{content:""}.hp-icon-close:before{content:""}.hp-icon-fullscreen-enter:before{content:""}.hp-icon-fullscreen-exit:before{content:""}.hp-icon-loop:before{content:""}.hp-icon-pause:before{content:""}.hp-icon-pip:before{content:""}.hp-icon-play:before{content:""}.hp-icon-settings:before{content:""}.hp-icon-volume-high:before{content:""}.hp-icon-volume-low:before{content:""}.hp-icon-volume-muted:before{content:""}.hp-icon-warning:before{content:""}:host{--hp-radius:8px;--hp-chip-bg:#ffffff14;--hp-chip-bg-hover:#ffffff2e;--hp-chip-bg-active:#ffffff42;--hp-chip-border:#ffffff29;--hp-chip-border-hover:#ffffff4d;--hp-chip-blur:14px;--hp-chip-shadow:0 4px 18px #00000047, inset 0 1px 0 #ffffff12;--hp-chip-radius:10px;--hp-chip-text:var(--hp-color-on-surface,#fff);--hp-panel-bg:#ffffffb8;--hp-panel-blur:26px;--hp-panel-border:#0f11171a;--hp-panel-text:#15171c;--hp-panel-text-muted:#5b6270;--hp-panel-text-shadow:none;--hp-ctrl-btn-size:32px;--hp-ctrl-icon-size:16px;--hp-seek-hit-h:16px;--hp-seek-track-h:4px;--hp-seek-track-h-hover:6px;--hp-seek-thumb-size:12px;--hp-tooltip-bg:#ffffffe6;--hp-tooltip-text:#15171c;--hp-tooltip-key-bg:#0f11171a;--hp-tooltip-key-text:#15171c;--hp-caption-font-size:16px;--hp-caption-bg:#000000bf;--hp-caption-text:#fff;--hp-caption-radius:4px;background:var(--hp-color-surface,#0a0a0a);width:100%;color:var(--hp-color-on-surface,#fff);border-radius:var(--hp-radius);font-family:system-ui,-apple-system,sans-serif;line-height:1;display:block}.hp-chip{background:var(--hp-chip-bg);border:1px solid var(--hp-chip-border);border-radius:var(--hp-chip-radius);-webkit-backdrop-filter:blur(var(--hp-chip-blur)) saturate(160%);box-shadow:var(--hp-chip-shadow);color:var(--hp-chip-text);transition:background-color .16s,border-color .16s,box-shadow .16s,transform .12s}.hp-chip:hover{background:var(--hp-chip-bg-hover);border-color:var(--hp-chip-border-hover)}button.hp-chip:active{background:var(--hp-chip-bg-active);transform:scale(.94)}.hp-chip:focus-visible{outline:2px solid var(--hp-color-accent,#fff);outline-offset:2px}.hp-chip-panel,.hp-chip-panel:hover{background:var(--hp-panel-bg);border-color:var(--hp-panel-border);-webkit-backdrop-filter:blur(var(--hp-panel-blur)) saturate(160%);text-shadow:var(--hp-panel-text-shadow,none)}.hp-chip-panel{--hp-color-on-surface:var(--hp-panel-text);--hp-color-on-surface-muted:var(--hp-panel-text-muted);color:var(--hp-panel-text)}.hp-tooltip{background:var(--hp-tooltip-bg);color:var(--hp-tooltip-text);border-radius:calc(var(--hp-radius) * .75);-webkit-backdrop-filter:blur(12px)saturate(160%);font-weight:500;box-shadow:0 4px 14px #00000059}.hp-tooltip-key{background:var(--hp-tooltip-key-bg);min-width:16px;height:16px;color:var(--hp-tooltip-key-text);text-transform:uppercase;border-radius:4px;justify-content:center;align-items:center;padding:0 4px;font-size:10px;font-weight:700;line-height:16px;display:inline-flex}.hp-group{background:var(--hp-chip-bg);border:1px solid var(--hp-chip-border);-webkit-backdrop-filter:blur(var(--hp-chip-blur)) saturate(160%);box-shadow:var(--hp-chip-shadow);border-radius:9999px}.hp-group button.hp-chip{box-shadow:none;-webkit-backdrop-filter:none;background:0 0;border-color:#0000}.hp-group button.hp-chip:hover{background:var(--hp-chip-bg-hover)}.hp-group button.hp-chip:active{background:var(--hp-chip-bg-active)}:host([data-theme=glass-dark]),:host([data-theme=neo-dark]),:host([data-theme=mono]){--hp-panel-bg:#0a0a0e8c;--hp-panel-border:#ffffff1a;--hp-panel-text:#fff;--hp-panel-text-muted:#a3a3a3;--hp-panel-text-shadow:0 1px 3px #000000a6;--hp-tooltip-bg:#0a0a0aeb;--hp-tooltip-text:#fff;--hp-tooltip-key-bg:#ffffff2e;--hp-tooltip-key-text:#fff}:host([data-theme=glass-dark]){--hp-chip-bg:#0a0a0e73;--hp-chip-bg-hover:#0a0a0e9e;--hp-chip-bg-active:#0a0a0ebf;--hp-chip-border:#ffffff14;--hp-chip-border-hover:#ffffff29;--hp-chip-shadow:0 4px 18px #0006, inset 0 1px 0 #ffffff0a;--hp-panel-bg:#08080cb8}:host([data-theme=neo-dark]){--hp-chip-bg:#24242a;--hp-chip-bg-hover:#2a2a31;--hp-chip-bg-active:#1e1e23;--hp-chip-border:transparent;--hp-chip-border-hover:transparent;--hp-chip-blur:0px;--hp-chip-shadow:5px 5px 10px #00000080, -4px -4px 9px #ffffff09;--hp-chip-radius:12px;--hp-color-surface:#1b1b20;--hp-panel-bg:#1e1e23;--hp-panel-text-shadow:none}:host([data-theme=neo-dark]) button.hp-chip:active{box-shadow:inset 3px 3px 6px #00000080,inset -2px -2px 5px #ffffff08}:host([data-theme=mono]){--hp-chip-bg:#ffffff0a;--hp-chip-bg-hover:#ffffff1a;--hp-chip-border:#ffffff14;--hp-chip-border-hover:#ffffff24;--hp-chip-blur:0px;--hp-chip-shadow:none;--hp-panel-bg:#0a0a0aeb;--hp-panel-text-shadow:none}@media(pointer:coarse){:host{--hp-ctrl-btn-size:40px;--hp-ctrl-icon-size:18px;--hp-seek-hit-h:22px;--hp-seek-track-h:5px;--hp-seek-track-h-hover:7px;--hp-seek-thumb-size:14px;--hp-caption-font-size:19px}}:host(:fullscreen),:host(:-webkit-full-screen){--hp-ctrl-btn-size:44px;--hp-ctrl-icon-size:20px;--hp-seek-hit-h:26px;--hp-seek-track-h:6px;--hp-seek-track-h-hover:8px;--hp-seek-thumb-size:18px;--hp-caption-font-size:22px}:host(:fullscreen) [part=control-bar],:host(:-webkit-full-screen) [part=control-bar]{padding:28px 20px 18px}.video-area{aspect-ratio:16/9;border-radius:var(--hp-radius);background:var(--hp-color-surface,#0a0a0a);width:100%;position:relative;overflow:hidden}.video-area[data-compact]{--hp-caption-font-size:13px}.video-area[data-story]{aspect-ratio:9/16;max-width:49.5vh;max-height:88vh;margin:0 auto}.media-layer{position:absolute;top:0;right:0;bottom:0;left:0}.media-layer video{object-fit:contain;background:#000;width:100%;height:100%}.hp-center-x{transform:translate(-50%)}.hp-center-y{transform:translateY(-50%)}.hp-top-bar{pointer-events:none;display:flex;position:absolute;top:8px;right:8px}.hp-top-bar>*{pointer-events:auto}.hp-unmute-badge{z-index:25;background:var(--hp-tooltip-bg);color:var(--hp-tooltip-text);-webkit-backdrop-filter:blur(12px)saturate(160%);font:inherit;cursor:pointer;border:0;border-radius:9999px;align-items:center;gap:6px;padding:6px 12px 6px 10px;font-size:13px;font-weight:600;display:none;position:absolute;top:10px;left:10px;box-shadow:0 4px 14px #00000059}@media(hover:none)and (pointer:coarse){.hp-volume{display:none!important}.hp-unmute-badge[data-visible]{display:inline-flex}}.hp-seek-thumb{width:var(--hp-seek-thumb-size);height:var(--hp-seek-thumb-size);background:var(--hp-color-accent);will-change:translate,scale;pointer-events:none;z-index:2;border-radius:9999px;transition:scale .15s;position:absolute;left:0;scale:.5}.hp-seekbar:hover .hp-seek-thumb,.hp-seekbar:active .hp-seek-thumb,.hp-seekbar:focus-visible .hp-seek-thumb{scale:1}.hp-seekbar[data-no-duration] .hp-seek-thumb{display:none}.hp-seek-hover-dot{width:var(--hp-seek-track-h-hover);height:var(--hp-seek-track-h-hover);background:var(--hp-color-on-surface);opacity:0;pointer-events:none;z-index:1;border-radius:9999px;transition:opacity .12s;position:absolute;top:50%;left:0;box-shadow:0 0 0 1px #00000073}.hp-seek-hover-dot[data-visible]{opacity:.9}.hp-mini-progress{z-index:6;pointer-events:none;background:var(--hp-color-on-surface);height:1px;position:absolute;bottom:0;left:0;right:0}@supports (color:color-mix(in lab,red,red)){.hp-mini-progress{background:color-mix(in srgb,var(--hp-color-on-surface) 25%,transparent)}}.hp-mini-progress{opacity:0;transition:opacity .2s}.hp-mini-progress[data-visible]:not([data-disabled]){opacity:1}.hp-mini-progress-fill{transform-origin:0;will-change:transform;position:absolute;top:0;right:0;bottom:0;left:0;transform:scaleX(0)}.hp-mini-progress-buffered{background:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp-mini-progress-buffered{background:color-mix(in srgb,var(--hp-color-on-surface) 40%,transparent)}}.hp-mini-progress-played{background:var(--hp-color-accent)}.hp-seek-time{border-radius:calc(var(--hp-radius) * .75);background:var(--hp-tooltip-bg);color:var(--hp-tooltip-text);-webkit-backdrop-filter:blur(12px)saturate(160%);font-variant-numeric:tabular-nums;white-space:nowrap;pointer-events:none;visibility:hidden;z-index:20;padding:3px 7px;font-size:12px;font-weight:500;position:absolute;bottom:calc(100% + 8px);left:0;box-shadow:0 4px 14px #00000059}.hp-seek-time[data-visible]{visibility:visible}.hp-sprite-tooltip{pointer-events:none;visibility:hidden;z-index:20;flex-direction:column;align-items:center;gap:4px;display:flex;position:absolute;bottom:calc(100% + 8px);left:0}.hp-sprite-tooltip[data-visible]{visibility:visible}.hp-sprite-image{border-radius:calc(var(--hp-radius) * .75);border:2px solid var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp-sprite-image{border:2px solid color-mix(in srgb,var(--hp-color-on-surface) 85%,transparent)}}.hp-sprite-image{background-color:#000;background-repeat:no-repeat;box-shadow:0 4px 14px #00000059}.hp-sprite-time{background:var(--hp-tooltip-bg);color:var(--hp-tooltip-text);font-variant-numeric:tabular-nums;white-space:nowrap;border-radius:4px;padding:2px 6px;font-size:12px}.hp-live-badge{height:var(--hp-ctrl-btn-size);color:var(--hp-color-on-surface);font:inherit;letter-spacing:.04em;white-space:nowrap;cursor:pointer;background:0 0;border:0;border-radius:9999px;align-items:center;gap:6px;padding:0 8px;font-size:12px;font-weight:600;display:inline-flex}.hp-live-badge:hover{background:var(--hp-chip-bg-hover)}.hp-live-badge:focus-visible{outline:2px solid var(--hp-color-accent);outline-offset:2px}.hp-live-dot{background:var(--hp-live-color,red);border-radius:50%;width:8px;height:8px;transition:background-color .16s}.hp-live-badge[data-behind]{color:var(--hp-color-on-surface-muted)}.hp-live-badge[data-behind] .hp-live-dot{background:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp-live-badge[data-behind] .hp-live-dot{background:color-mix(in srgb,var(--hp-color-on-surface) 45%,transparent)}}.hp-chapters{pointer-events:none;inset-inline:0;align-items:center;gap:2px;display:flex;position:absolute;top:0;bottom:0}.hp-chapter{min-width:1px;height:var(--hp-seek-track-h);background:var(--hp-color-on-surface);border-radius:1px;position:relative;overflow:hidden}@supports (color:color-mix(in lab,red,red)){.hp-chapter{background:color-mix(in srgb,var(--hp-color-on-surface) 25%,transparent)}}.hp-chapter{transition:height .15s}.hp-seekbar:hover .hp-chapter{height:var(--hp-seek-track-h-hover)}.hp-seekbar .hp-chapter[data-hover]{height:calc(var(--hp-seek-track-h-hover) * 1.6)}.hp-chapter-fill{transform-origin:0;will-change:transform;position:absolute;top:0;right:0;bottom:0;left:0;transform:scaleX(0)}.hp-chapter-buffered{background:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp-chapter-buffered{background:color-mix(in srgb,var(--hp-color-on-surface) 40%,transparent)}}.hp-chapter-played{background:var(--hp-color-accent)}.hp-chapter-tooltip{background:var(--hp-tooltip-bg);max-width:240px;color:var(--hp-tooltip-text);border-radius:calc(var(--hp-radius) * .75);-webkit-backdrop-filter:blur(12px)saturate(160%);text-align:center;pointer-events:none;white-space:nowrap;visibility:hidden;z-index:40;flex-direction:column;align-items:center;gap:2px;padding:4px 8px;font-size:12px;line-height:1.3;display:flex;position:absolute;bottom:calc(100% + 6px);left:0;box-shadow:0 4px 14px #00000059}.hp-chapter-tooltip[data-visible]{visibility:visible}.hp-chapter-tooltip-title{text-overflow:ellipsis;max-width:100%;font-weight:600;overflow:hidden}.hp-chapter-tooltip-time{opacity:.75;font-variant-numeric:tabular-nums}:host([data-sticky]){z-index:2147483000;border-radius:var(--hp-radius);box-shadow:0 8px 28px #00000073;aspect-ratio:16/9!important;width:min(360px,92vw)!important;position:fixed!important}:host([data-sticky][data-sticky-corner=br]){inset:auto 16px 16px auto}:host([data-sticky][data-sticky-corner=bl]){inset:auto auto 16px 16px}:host([data-sticky][data-sticky-corner=tr]){inset:16px 16px auto auto}:host([data-sticky][data-sticky-corner=tl]){inset:16px auto auto 16px}.hp-caption-layer{z-index:5;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0}.hp-caption-bubble{background:var(--hp-caption-bg);width:max-content;max-width:86%;color:var(--hp-caption-text);border-radius:var(--hp-caption-radius);font-size:calc(var(--hp-caption-font-size) * var(--hp-caption-size-multiplier,1));text-align:center;white-space:pre-line;cursor:grab;pointer-events:auto;touch-action:none;-webkit-user-select:none;user-select:none;padding:.3em .6em;line-height:1.4;transition:transform .18s;display:none;position:absolute;bottom:0;left:50%;transform:translate(-50%)}.hp-caption-bubble.hp-caption-visible{display:inline-block}.hp-caption-bubble.hp-caption-dragging,.hp-caption-bubble.hp-caption-no-transition{transition:none}.hp-caption-bubble.hp-caption-dragging{cursor:grabbing}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}';
5
- function U(a, e) {
6
- var r;
7
- const t = (r = e == null ? void 0 : e.split(";")[0]) == null ? void 0 : r.trim().toLowerCase();
8
- return t === "application/vnd.apple.mpegurl" || t === "application/x-mpegurl" || /\.m3u8(?:$|[?#])/i.test(a) ? "hls" : t === "video/mp4" || /\.mp4(?:$|[?#])/i.test(a) ? "mp4" : "unknown";
9
- }
10
- class W {
11
- constructor(e, t) {
12
- i(this, "hls", null);
13
- i(this, "video");
14
- i(this, "onLevelsChanged");
15
- this.video = e, this.onLevelsChanged = t;
16
- }
17
- async load(e, t) {
18
- if (this.destroy(), this.video.pause(), this.video.removeAttribute("src"), this.video.load(), U(e, t) !== "hls") {
19
- this.video.src = e, this.video.load();
20
- return;
21
- }
22
- if (this.video.canPlayType("application/vnd.apple.mpegurl") !== "") {
23
- this.video.src = e, this.video.load();
24
- return;
25
- }
26
- const { default: s } = await import("./hls-CfP6MPo0.js");
27
- if (!s.isSupported()) {
28
- this.video.src = e, this.video.load();
29
- return;
30
- }
31
- const o = new s({
32
- enableWorker: !0
33
- });
34
- this.hls = o, o.on(s.Events.MANIFEST_PARSED, () => {
35
- const l = o.levels.map(
36
- (c, n) => ({
37
- index: n,
38
- height: c.height,
39
- bitrate: c.bitrate
40
- })
41
- );
42
- this.onLevelsChanged(l, o.currentLevel);
43
- }), o.on(s.Events.LEVEL_SWITCHED, (l, c) => {
44
- const n = o.levels.map(
45
- (h, p) => ({
46
- index: p,
47
- height: h.height,
48
- bitrate: h.bitrate
49
- })
50
- );
51
- this.onLevelsChanged(n, c.level);
52
- }), o.attachMedia(this.video), o.loadSource(e);
53
- }
54
- /** -1 = otomatik kalite (ABR). */
55
- setLevel(e) {
56
- this.hls && (this.hls.currentLevel = e);
57
- }
58
- destroy() {
59
- this.hls && (this.hls.destroy(), this.hls = null);
60
- }
61
- }
62
- function y(a) {
63
- if (!Number.isFinite(a) || a < 0) return "0:00";
64
- const e = Math.floor(a), t = Math.floor(e / 3600), r = Math.floor(e % 3600 / 60), s = e % 60, o = t > 0 ? String(r).padStart(2, "0") : String(r), l = String(s).padStart(2, "0");
65
- return t > 0 ? `${t}:${o}:${l}` : `${o}:${l}`;
66
- }
67
- class Y {
68
- constructor(e, t) {
69
- i(this, "el");
70
- i(this, "trackEl");
71
- i(this, "chaptersEl", null);
72
- i(this, "chapters", []);
73
- /** İmlecin üstündeki zaman (varsayılan, plugin gerektirmez) — kendi zamanını gösteren plugin'ler `suppressHoverTime` ile gizler. */
74
- i(this, "hoverTimeEl");
75
- i(this, "hoverTimeSuppressors", /* @__PURE__ */ new Set());
76
- i(this, "playedEl");
77
- i(this, "bufferedEl");
78
- i(this, "thumbEl");
79
- i(this, "hoverDotEl");
80
- i(this, "video");
81
- i(this, "labels");
82
- i(this, "dragging", !1);
83
- i(this, "markerEls", []);
84
- i(this, "trackWidth", 0);
85
- i(this, "resizeObserver");
86
- i(this, "rafId", null);
87
- i(this, "onHoverMove", (e) => {
88
- const t = this.video.duration, r = Number.isFinite(t) && t > 0, s = this.ratioAtClientX(e.clientX);
89
- if (r && !this.dragging ? (this.hoverDotEl.style.transform = `translate(${this.xAtRatio(s)}px, -50%) translateX(-50%)`, this.hoverDotEl.setAttribute("data-visible", "")) : this.hoverDotEl.removeAttribute("data-visible"), this.hoverTimeSuppressors.size || !r) {
90
- this.hoverTimeEl.removeAttribute("data-visible");
91
- return;
92
- }
93
- this.hoverTimeEl.textContent = y(s * t), this.hoverTimeEl.setAttribute("data-visible", "");
94
- const o = this.el.getBoundingClientRect(), l = this.hoverTimeEl.offsetWidth, c = Math.min(Math.max(e.clientX - o.left - l / 2, 0), Math.max(o.width - l, 0));
95
- this.hoverTimeEl.style.transform = `translateX(${c}px)`;
96
- });
97
- i(this, "onHoverLeave", () => {
98
- this.hoverTimeEl.removeAttribute("data-visible"), this.hoverDotEl.removeAttribute("data-visible");
99
- });
100
- i(this, "onPointerDown", (e) => {
101
- this.dragging = !0, this.hoverDotEl.removeAttribute("data-visible"), this.el.setPointerCapture(e.pointerId), this.seekToRatio(this.ratioFromEvent(e)), this.el.addEventListener("pointermove", this.onPointerMove), this.el.addEventListener("pointerup", this.onPointerUp);
102
- });
103
- i(this, "onPointerMove", (e) => {
104
- this.dragging && this.seekToRatio(this.ratioFromEvent(e));
105
- });
106
- i(this, "onPointerUp", (e) => {
107
- this.dragging = !1, this.el.releasePointerCapture(e.pointerId), this.el.removeEventListener("pointermove", this.onPointerMove), this.el.removeEventListener("pointerup", this.onPointerUp);
108
- });
109
- i(this, "onKeyDown", (e) => {
110
- const t = this.video.duration || 0;
111
- !Number.isFinite(t) || t <= 0 || (e.key === "ArrowRight" ? (this.video.currentTime = Math.min(t, this.video.currentTime + 5), e.preventDefault()) : e.key === "ArrowLeft" && (this.video.currentTime = Math.max(0, this.video.currentTime - 5), e.preventDefault()));
112
- });
113
- i(this, "startLoop", () => {
114
- if (this.rafId !== null) return;
115
- const e = () => {
116
- this.render(), this.rafId = requestAnimationFrame(e);
117
- };
118
- this.rafId = requestAnimationFrame(e);
119
- });
120
- i(this, "stopLoop", () => {
121
- this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null), this.render();
122
- });
123
- i(this, "render", () => {
124
- const e = this.video.duration;
125
- if (this.el.toggleAttribute("data-no-duration", !Number.isFinite(e) || e <= 0), !Number.isFinite(e) || e <= 0) {
126
- this.playedEl.style.transform = "scaleX(0)", this.thumbEl.style.translate = "-50% 0", this.bufferedEl.style.transform = "scaleX(0)";
127
- return;
128
- }
129
- const t = this.video.currentTime / e;
130
- this.thumbEl.style.translate = `calc(${this.xAtRatio(t)}px - 50%) 0`;
131
- let r = 0;
132
- for (let o = 0; o < this.video.buffered.length; o++)
133
- this.video.buffered.start(o) <= this.video.currentTime && (r = Math.max(r, this.video.buffered.end(o)));
134
- const s = r / e;
135
- if (this.chapters.length)
136
- for (const o of this.chapters) {
137
- const l = o.end - o.start, c = (n) => l > 0 ? Math.min(1, Math.max(0, (n - o.start) / l)) : 0;
138
- o.playedEl.style.transform = `scaleX(${c(t)})`, o.bufferedEl.style.transform = `scaleX(${c(s)})`;
139
- }
140
- else
141
- this.playedEl.style.transform = `scaleX(${t})`, this.bufferedEl.style.transform = `scaleX(${s})`;
142
- this.el.setAttribute("aria-valuemax", String(Math.floor(e))), this.el.setAttribute("aria-valuenow", String(Math.floor(this.video.currentTime)));
143
- });
144
- this.video = e, this.labels = t, this.el = document.createElement("div"), this.el.setAttribute("part", "seek-bar"), this.el.className = "hp-seekbar hp:relative hp:h-[var(--hp-seek-hit-h)] hp:flex hp:items-center hp:cursor-pointer hp:group hp:touch-none", this.el.setAttribute("role", "slider"), this.el.setAttribute("tabindex", "0"), this.el.setAttribute("aria-label", t.seekBar), this.el.setAttribute("aria-valuemin", "0");
145
- const r = document.createElement("div");
146
- r.className = "hp:absolute hp:inset-x-0 hp:h-[var(--hp-seek-track-h)] hp:rounded-full hp:bg-on-surface/25 hp:group-hover:h-[var(--hp-seek-track-h-hover)] hp:transition-[height] hp:duration-150", this.el.appendChild(r), this.trackEl = r, this.bufferedEl = document.createElement("div"), this.bufferedEl.className = "hp:absolute hp:inset-0 hp:rounded-full hp:bg-on-surface/40", this.bufferedEl.style.transformOrigin = "left", this.bufferedEl.style.willChange = "transform", r.appendChild(this.bufferedEl), this.playedEl = document.createElement("div"), this.playedEl.className = "hp:absolute hp:inset-0 hp:rounded-full hp:bg-accent", this.playedEl.style.transformOrigin = "left", this.playedEl.style.willChange = "transform", r.appendChild(this.playedEl), this.thumbEl = document.createElement("div"), this.thumbEl.className = "hp-seek-thumb", this.thumbEl.setAttribute("part", "seek-thumb"), this.el.appendChild(this.thumbEl), this.hoverDotEl = document.createElement("div"), this.hoverDotEl.className = "hp-seek-hover-dot", this.hoverDotEl.setAttribute("part", "seek-hover-dot"), this.el.appendChild(this.hoverDotEl), this.hoverTimeEl = document.createElement("div"), this.hoverTimeEl.className = "hp-seek-time", this.hoverTimeEl.setAttribute("part", "seek-time"), this.el.appendChild(this.hoverTimeEl), this.el.addEventListener("pointerdown", this.onPointerDown), this.el.addEventListener("pointermove", this.onHoverMove), this.el.addEventListener("pointerleave", this.onHoverLeave), this.el.addEventListener("keydown", this.onKeyDown), e.addEventListener("play", this.startLoop), e.addEventListener("pause", this.stopLoop), e.addEventListener("ended", this.stopLoop), e.addEventListener("timeupdate", this.render), e.addEventListener("progress", this.render), e.addEventListener("loadedmetadata", this.render), e.paused || this.startLoop(), this.resizeObserver = new ResizeObserver(() => {
147
- this.trackWidth = this.el.getBoundingClientRect().width, this.measureChapters(), this.render();
148
- }), this.resizeObserver.observe(this.el), this.trackWidth = this.el.getBoundingClientRect().width;
149
- }
150
- /** Kendi zamanını gösteren plugin'ler (sprite/segments) varsayılan hover zamanını gizler — keyed set. */
151
- suppressHoverTime(e, t) {
152
- t ? this.hoverTimeSuppressors.add(e) : this.hoverTimeSuppressors.delete(e), t && this.hoverTimeEl.removeAttribute("data-visible");
153
- }
154
- ratioFromEvent(e) {
155
- return this.ratioAtClientX(e.clientX);
156
- }
157
- /** Ekran x koordinatını 0–1 zaman oranına çevirir — chapter modunda parça boşluklarını hesaba katar (segments plugin'inin hover popup'ı da bunu kullanıyor). */
158
- ratioAtClientX(e) {
159
- const t = this.el.getBoundingClientRect(), r = e - t.left;
160
- if (!this.chapters.length) return Math.min(1, Math.max(0, r / t.width));
161
- for (let s = 0; s < this.chapters.length; s++) {
162
- const o = this.chapters[s], l = this.chapters[s + 1], c = l ? l.left : 1 / 0;
163
- if (r < c || !l) {
164
- const n = o.width > 0 ? Math.min(1, Math.max(0, (r - o.left) / o.width)) : 0;
165
- return o.start + n * (o.end - o.start);
166
- }
167
- }
168
- return 1;
169
- }
170
- /** 0–1 zaman oranının seek bar üzerindeki px konumu (thumb için). */
171
- xAtRatio(e) {
172
- if (!this.chapters.length) return e * this.trackWidth;
173
- const t = this.chapters.find((o) => e < o.end) ?? this.chapters[this.chapters.length - 1], r = t.end - t.start, s = r > 0 ? Math.min(1, Math.max(0, (e - t.start) / r)) : 0;
174
- return t.left + s * t.width;
175
- }
176
- /** Track'i sıralı, 0→1'i kesintisiz kapsayan oran aralıklarına göre ayrı parçalara böler. */
177
- setChapters(e) {
178
- if (this.clearChapters(), !e.length) return [];
179
- const t = document.createElement("div");
180
- return t.className = "hp-chapters", this.chapters = e.map((r) => {
181
- const s = document.createElement("div");
182
- s.className = "hp-chapter", s.setAttribute("part", "segment-band"), s.style.flex = `${Math.max(r.end - r.start, 0)} 1 0px`;
183
- const o = document.createElement("div");
184
- o.className = "hp-chapter-fill hp-chapter-buffered";
185
- const l = document.createElement("div");
186
- return l.className = "hp-chapter-fill hp-chapter-played", r.color && (l.style.background = r.color), s.append(o, l), t.appendChild(s), { ...r, el: s, bufferedEl: o, playedEl: l, left: 0, width: 0 };
187
- }), this.trackEl.style.display = "none", this.trackEl.after(t), this.chaptersEl = t, this.measureChapters(), this.render(), this.chapters.map((r) => r.el);
188
- }
189
- clearChapters() {
190
- var e;
191
- (e = this.chaptersEl) == null || e.remove(), this.chaptersEl = null, this.chapters = [], this.trackEl.style.display = "", this.render();
192
- }
193
- measureChapters() {
194
- if (!this.chapters.length) return;
195
- const e = this.el.getBoundingClientRect().left;
196
- for (const t of this.chapters) {
197
- const r = t.el.getBoundingClientRect();
198
- t.left = r.left - e, t.width = r.width;
199
- }
200
- }
201
- seekToRatio(e) {
202
- const t = this.video.duration;
203
- !Number.isFinite(t) || t <= 0 || (this.video.currentTime = e * t, this.render());
204
- }
205
- /** 0–1 arası oranda, seek bar üzerine ince bir işaret çizgisi ekler (ör. loop A/B noktaları). */
206
- addMarker(e, t = "") {
207
- const r = document.createElement("div");
208
- return r.className = `hp:absolute hp:top-0 hp:bottom-0 hp:w-0.5 hp:bg-on-surface hp:pointer-events-none ${t}`, r.style.left = `${Math.min(1, Math.max(0, e)) * 100}%`, this.el.appendChild(r), this.markerEls.push(r), r;
209
- }
210
- clearMarkers() {
211
- this.markerEls.forEach((e) => e.remove()), this.markerEls.length = 0;
212
- }
213
- refreshLabels() {
214
- this.el.setAttribute("aria-label", this.labels.seekBar);
215
- }
216
- destroy() {
217
- var e;
218
- this.rafId !== null && cancelAnimationFrame(this.rafId), this.resizeObserver.disconnect(), this.el.removeEventListener("pointermove", this.onHoverMove), this.el.removeEventListener("pointerleave", this.onHoverLeave), this.video.removeEventListener("play", this.startLoop), this.video.removeEventListener("pause", this.stopLoop), this.video.removeEventListener("ended", this.stopLoop), this.video.removeEventListener("timeupdate", this.render), this.video.removeEventListener("progress", this.render), this.video.removeEventListener("loadedmetadata", this.render), this.clearMarkers(), (e = this.chaptersEl) == null || e.remove();
219
- }
220
- }
221
- function v(a, e = "") {
222
- const t = document.createElement("i");
223
- return t.className = `hp-icon hp-icon-${a}${e ? ` ${e}` : ""}`, t.setAttribute("aria-hidden", "true"), t;
224
- }
225
- function x(a, e) {
226
- a.className = a.className.replace(/hp-icon-[\w-]+/, `hp-icon-${e}`);
227
- }
228
- const E = 0.05, Q = 150;
229
- class j {
230
- constructor(e, t, r) {
231
- i(this, "el");
232
- /** Dokunmatikte ses butonu gizli; sessiz oynarken görünen "Sesi aç" rozeti (chrome dışında monte edilir, otomatik gizlenmez). */
233
- i(this, "unmuteBadge");
234
- i(this, "unmuteText");
235
- i(this, "button");
236
- i(this, "iconEl");
237
- i(this, "slider");
238
- i(this, "sliderFill");
239
- i(this, "video");
240
- i(this, "labels");
241
- i(this, "adHooks");
242
- i(this, "dragging", !1);
243
- i(this, "hideTimer", null);
244
- i(this, "openNow", () => {
245
- this.hideTimer && (clearTimeout(this.hideTimer), this.hideTimer = null), this.slider.style.opacity = "1", this.slider.style.pointerEvents = "auto";
246
- });
247
- i(this, "scheduleHide", () => {
248
- this.hideTimer && clearTimeout(this.hideTimer), this.hideTimer = setTimeout(() => {
249
- this.hideTimer = null, this.slider.style.opacity = "0", this.slider.style.pointerEvents = "none";
250
- }, Q);
251
- });
252
- i(this, "onWheel", (e) => {
253
- if (e.preventDefault(), this.adHooks.isAdActive()) {
254
- const s = this.adHooks.getVolume();
255
- this.adHooks.setVolume(Math.min(1, Math.max(0, s + (e.deltaY < 0 ? E : -E)))), this.render();
256
- return;
257
- }
258
- const t = this.video.muted ? 0 : this.video.volume, r = Math.min(1, Math.max(0, t + (e.deltaY < 0 ? E : -E)));
259
- this.video.volume = r, this.video.muted = r === 0;
260
- });
261
- i(this, "onToggleMute", () => {
262
- if (this.adHooks.isAdActive()) {
263
- this.adHooks.toggleMute(), this.render();
264
- return;
265
- }
266
- this.video.muted = !this.video.muted, !this.video.muted && this.video.volume === 0 && (this.video.volume = 0.5);
267
- });
268
- i(this, "onSliderPointerDown", (e) => {
269
- this.dragging = !0, this.slider.setPointerCapture(e.pointerId), this.setFromClientY(e.clientY), this.slider.addEventListener("pointermove", this.onSliderPointerMove), this.slider.addEventListener("pointerup", this.onSliderPointerUp);
270
- });
271
- i(this, "onSliderPointerMove", (e) => {
272
- this.dragging && this.setFromClientY(e.clientY);
273
- });
274
- i(this, "onSliderPointerUp", (e) => {
275
- this.dragging = !1, this.slider.releasePointerCapture(e.pointerId), this.slider.removeEventListener("pointermove", this.onSliderPointerMove), this.slider.removeEventListener("pointerup", this.onSliderPointerUp);
276
- });
277
- i(this, "onSliderKeyDown", (e) => {
278
- if (this.adHooks.isAdActive()) {
279
- if (e.key === "ArrowUp")
280
- this.adHooks.setVolume(Math.min(1, this.adHooks.getVolume() + 0.1)), e.preventDefault();
281
- else if (e.key === "ArrowDown")
282
- this.adHooks.setVolume(Math.max(0, this.adHooks.getVolume() - 0.1)), e.preventDefault();
283
- else
284
- return;
285
- this.render();
286
- return;
287
- }
288
- e.key === "ArrowUp" ? (this.video.volume = Math.min(1, this.video.volume + 0.1), this.video.muted = !1, e.preventDefault()) : e.key === "ArrowDown" && (this.video.volume = Math.max(0, this.video.volume - 0.1), e.preventDefault());
289
- });
290
- i(this, "render", () => {
291
- const e = this.adHooks.isAdActive() ? this.adHooks.getVolume() : this.video.muted ? 0 : this.video.volume;
292
- this.sliderFill.style.height = `${e * 100}%`, this.slider.setAttribute("aria-valuenow", String(Math.round(e * 100)));
293
- const t = e === 0 ? this.labels.unmute : this.labels.mute;
294
- this.button.setAttribute("aria-label", t);
295
- const r = this.adHooks.isAdActive() || !this.video.paused;
296
- this.unmuteBadge.toggleAttribute("data-visible", e === 0 && r), this.unmuteText.textContent = this.labels.unmute, e === 0 ? x(this.iconEl, "volume-muted") : e < 0.5 ? x(this.iconEl, "volume-low") : x(this.iconEl, "volume-high");
297
- });
298
- this.video = e, this.labels = t, this.adHooks = r, this.el = document.createElement("div"), this.el.className = "hp-volume hp:relative hp:flex hp:items-center", this.unmuteBadge = document.createElement("button"), this.unmuteBadge.type = "button", this.unmuteBadge.className = "hp-unmute-badge", this.unmuteBadge.setAttribute("part", "unmute-badge"), this.unmuteBadge.appendChild(v("volume-muted", "hp:text-base")), this.unmuteText = document.createElement("span"), this.unmuteText.textContent = t.unmute, this.unmuteBadge.appendChild(this.unmuteText), this.unmuteBadge.addEventListener("pointerdown", (o) => o.stopPropagation()), this.unmuteBadge.addEventListener("click", (o) => {
299
- o.stopPropagation(), this.unmute();
300
- }), this.button = document.createElement("button"), this.button.type = "button", this.button.setAttribute("part", "volume-button"), this.button.className = "hp-chip hp:flex hp:items-center hp:justify-center hp:w-[var(--hp-ctrl-btn-size)] hp:h-[var(--hp-ctrl-btn-size)] hp:cursor-pointer", this.button.setAttribute("aria-label", t.mute), this.button.dataset.shortcut = "M", this.iconEl = v("volume-high", "hp:text-[length:var(--hp-ctrl-icon-size)]"), this.button.appendChild(this.iconEl), this.el.appendChild(this.button), this.slider = document.createElement("div"), this.slider.setAttribute("part", "volume-slider"), this.slider.className = "hp-chip hp:absolute hp:bottom-full hp:left-1/2 hp-center-x hp:mb-2 hp:w-7 hp:h-20 hp:rounded-full hp:cursor-pointer hp:flex hp:items-end hp:justify-center hp:p-1.5 hp:pointer-events-none hp:transition-opacity hp:duration-150 hp:will-change-[opacity]", this.slider.style.opacity = "0", this.slider.style.borderRadius = "9999px", this.slider.setAttribute("role", "slider"), this.slider.setAttribute("tabindex", "0"), this.slider.setAttribute("aria-label", t.volume), this.slider.setAttribute("aria-orientation", "vertical"), this.slider.setAttribute("aria-valuemin", "0"), this.slider.setAttribute("aria-valuemax", "100");
301
- const s = document.createElement("div");
302
- s.className = "hp:relative hp:w-1.5 hp:h-full hp:rounded-full hp:bg-on-surface/25 hp:overflow-hidden", this.slider.appendChild(s), this.sliderFill = document.createElement("div"), this.sliderFill.className = "hp:absolute hp:inset-x-0 hp:bottom-0 hp:bg-accent", s.appendChild(this.sliderFill), this.el.appendChild(this.slider), this.button.addEventListener("click", this.onToggleMute), this.slider.addEventListener("pointerdown", this.onSliderPointerDown), this.slider.addEventListener("keydown", this.onSliderKeyDown), this.el.addEventListener("mouseenter", this.openNow), this.el.addEventListener("mouseleave", this.scheduleHide), this.el.addEventListener("focusin", this.openNow), this.el.addEventListener("focusout", this.scheduleHide), this.el.addEventListener("wheel", this.onWheel, { passive: !1 }), e.addEventListener("volumechange", this.render), e.addEventListener("play", this.render), e.addEventListener("pause", this.render), this.render();
303
- }
304
- /** "Sesi aç" rozeti: yalnızca AÇAR (toggle değil) — reklam sırasında reklamın sesini. */
305
- unmute() {
306
- if (this.adHooks.isAdActive()) {
307
- this.adHooks.getVolume() === 0 && this.adHooks.toggleMute(), this.render();
308
- return;
309
- }
310
- this.video.muted = !1, this.video.volume === 0 && (this.video.volume = 0.5);
311
- }
312
- /** Dikey çubukta: üst = tam ses (1), alt = sessiz (0) — Y ekseni ters çevrilir. */
313
- setFromClientY(e) {
314
- const t = this.slider.getBoundingClientRect(), r = t.height > 0 ? 1 - Math.min(1, Math.max(0, (e - t.top) / t.height)) : 0;
315
- if (this.adHooks.isAdActive()) {
316
- this.adHooks.setVolume(r), this.render();
317
- return;
318
- }
319
- this.video.volume = r, this.video.muted = r === 0;
320
- }
321
- refreshLabels() {
322
- this.slider.setAttribute("aria-label", this.labels.volume), this.render();
323
- }
324
- /** Reklam modu açılıp/kapanınca (`ControlBar.setAdMode`) görüntüyü hemen ad/içerik ses kaynağına göre tazeler — `volumechange` event'i beklemeden. */
325
- refreshForAdMode() {
326
- this.render();
327
- }
328
- setIconColor(e) {
329
- this.iconEl.style.color = e;
330
- }
331
- setSliderFillColor(e) {
332
- this.sliderFill.style.background = e;
333
- }
334
- destroy() {
335
- this.hideTimer && clearTimeout(this.hideTimer), this.el.removeEventListener("mouseenter", this.openNow), this.el.removeEventListener("mouseleave", this.scheduleHide), this.el.removeEventListener("focusin", this.openNow), this.el.removeEventListener("focusout", this.scheduleHide), this.el.removeEventListener("wheel", this.onWheel), this.video.removeEventListener("volumechange", this.render), this.video.removeEventListener("play", this.render), this.video.removeEventListener("pause", this.render), this.unmuteBadge.remove();
336
- }
337
- }
338
- class K {
339
- constructor(e, t, r) {
340
- i(this, "el");
341
- i(this, "button");
342
- i(this, "panel");
343
- i(this, "video");
344
- i(this, "playbackRates");
345
- i(this, "labels");
346
- i(this, "qualities", []);
347
- i(this, "activeQualityLabel");
348
- i(this, "captions", []);
349
- i(this, "activeCaptionLabel");
350
- i(this, "captionAppearance", null);
351
- i(this, "qrResumeToggle", null);
352
- i(this, "open", !1);
353
- i(this, "currentPanel", "main");
354
- i(this, "submenus", []);
355
- i(this, "onDocumentClick", (e) => {
356
- this.open && !e.composedPath().includes(this.el) && this.close();
357
- });
358
- this.video = e, this.playbackRates = t, this.labels = r, this.activeQualityLabel = r.autoQuality, this.activeCaptionLabel = r.captionsOff, this.el = document.createElement("div"), this.el.className = "hp:relative", this.button = document.createElement("button"), this.button.type = "button", this.button.setAttribute("aria-label", r.settings), this.button.className = "hp-chip hp:flex hp:items-center hp:justify-center hp:w-[var(--hp-ctrl-btn-size)] hp:h-[var(--hp-ctrl-btn-size)] hp:cursor-pointer", this.button.appendChild(v("settings", "hp:text-[length:var(--hp-ctrl-icon-size)]")), this.panel = document.createElement("div"), this.panel.className = "hp-chip hp-chip-panel hp:hidden hp:absolute hp:bottom-full hp:right-0 hp:mb-2 hp:w-48 hp:max-h-64 hp:overflow-y-auto hp:text-sm hp:py-1", this.el.appendChild(this.button), this.el.appendChild(this.panel), this.button.addEventListener("click", (s) => {
359
- s.stopPropagation(), this.toggle();
360
- }), document.addEventListener("click", this.onDocumentClick, !0), this.renderMain();
361
- }
362
- setQualities(e, t) {
363
- this.qualities = e, this.activeQualityLabel = t, (this.currentPanel === "main" || this.currentPanel === "quality") && this.render();
364
- }
365
- setCaptions(e, t) {
366
- this.captions = e, this.activeCaptionLabel = t, (this.currentPanel === "main" || this.currentPanel === "captions") && this.render();
367
- }
368
- /** Altyazı AÇIKKEN "Altyazı" alt menüsüne eklenecek Boyut/Renk/Konum satırları — `null` kaldırır. */
369
- setCaptionAppearance(e) {
370
- this.captionAppearance = e, (this.currentPanel === "captions" || this.currentPanel === "captions-size" || this.currentPanel === "captions-bg" || this.currentPanel === "captions-text") && this.render();
371
- }
372
- /** Ana menüye tek aç/kapa satırı ekler (ör. QrResume). */
373
- setQrResumeToggle(e) {
374
- this.qrResumeToggle = e, this.currentPanel === "main" && this.renderMain();
375
- }
376
- /** Plugin'lerin (ör. dubbing) ana menüye kendi satır + alt menüsünü eklemesi için. */
377
- registerSubmenu(e) {
378
- this.submenus = this.submenus.filter((t) => t.key !== e.key), this.submenus.push(e), this.currentPanel === "main" && this.renderMain();
379
- }
380
- unregisterSubmenu(e) {
381
- this.submenus = this.submenus.filter((t) => t.key !== e), this.currentPanel === "main" ? this.renderMain() : this.currentPanel === `custom:${e}` && this.renderMain();
382
- }
383
- toggle() {
384
- this.open ? this.close() : this.openMenu();
385
- }
386
- openMenu() {
387
- this.open = !0, this.currentPanel = "main", this.panel.classList.remove("hp:hidden"), this.renderMain();
388
- }
389
- close() {
390
- this.open = !1, this.panel.classList.add("hp:hidden");
391
- }
392
- row(e, t, r) {
393
- const s = document.createElement("button");
394
- return s.type = "button", s.className = "hp:flex hp:items-center hp:justify-between hp:w-full hp:px-3 hp:py-2 hp:text-left hp:bg-transparent hp:border-0 hp:cursor-pointer hp:text-on-surface hp:hover:bg-on-surface/10", s.innerHTML = `<span>${e}</span><span class="hp:text-on-surface-muted hp:text-xs hp:flex hp:items-center hp:gap-1">${t}</span>`, s.addEventListener("click", r), s;
395
- }
396
- backRow(e, t) {
397
- const r = document.createElement("button");
398
- r.type = "button", r.className = "hp:flex hp:items-center hp:gap-2 hp:w-full hp:px-3 hp:py-2 hp:text-left hp:bg-transparent hp:border-0 hp:cursor-pointer hp:text-on-surface hp:font-medium hp:hover:bg-on-surface/10", r.appendChild(v("chevron-left", "hp:text-sm"));
399
- const s = document.createElement("span");
400
- return s.textContent = e, r.appendChild(s), r.addEventListener("click", t), r;
401
- }
402
- render() {
403
- if (this.currentPanel === "main") this.renderMain();
404
- else if (this.currentPanel === "speed") this.renderSpeed();
405
- else if (this.currentPanel === "quality") this.renderQuality();
406
- else if (this.currentPanel === "captions") this.renderCaptions();
407
- else if (this.currentPanel === "captions-size") this.renderCaptionsSize();
408
- else if (this.currentPanel === "captions-bg") this.renderCaptionColorPanel("bg");
409
- else if (this.currentPanel === "captions-text") this.renderCaptionColorPanel("text");
410
- else {
411
- const e = this.currentPanel.slice(7), t = this.submenus.find((r) => r.key === e);
412
- t ? this.renderSubmenu(t) : this.renderMain();
413
- }
414
- }
415
- renderMain() {
416
- this.currentPanel = "main", this.panel.innerHTML = "", this.panel.appendChild(
417
- this.row(this.labels.playbackSpeed, this.video.playbackRate === 1 ? this.labels.normal : `${this.video.playbackRate}x`, () => {
418
- this.currentPanel = "speed", this.renderSpeed();
419
- })
420
- ), this.qualities.length > 0 && this.panel.appendChild(
421
- this.row(this.labels.quality, this.activeQualityLabel, () => {
422
- this.currentPanel = "quality", this.renderQuality();
423
- })
424
- ), this.captions.length > 0 && this.panel.appendChild(
425
- this.row(this.labels.captions, this.activeCaptionLabel, () => {
426
- this.currentPanel = "captions", this.renderCaptions();
427
- })
428
- );
429
- for (const e of this.submenus)
430
- this.panel.appendChild(
431
- this.row(e.title, e.getValueLabel(), () => {
432
- this.currentPanel = `custom:${e.key}`, this.renderSubmenu(e);
433
- })
434
- );
435
- if (this.qrResumeToggle) {
436
- const e = this.qrResumeToggle;
437
- this.panel.appendChild(
438
- this.row(e.label, e.getValueLabel(), () => {
439
- e.onToggle(), this.renderMain();
440
- })
441
- );
442
- }
443
- }
444
- renderSubmenu(e) {
445
- this.panel.innerHTML = "", this.panel.appendChild(this.backRow(e.title, () => this.renderMain()));
446
- for (const t of e.getItems())
447
- this.panel.appendChild(
448
- this.row(t.label, t.active ? '<i class="hp-icon hp-icon-check"></i>' : "", () => {
449
- t.onSelect(), this.close();
450
- })
451
- );
452
- }
453
- renderSpeed() {
454
- this.panel.innerHTML = "", this.panel.appendChild(this.backRow(this.labels.playbackSpeed, () => this.renderMain()));
455
- for (const e of this.playbackRates) {
456
- const t = this.video.playbackRate === e, r = this.row(e === 1 ? this.labels.normal : `${e}x`, t ? '<i class="hp-icon hp-icon-check"></i>' : "", () => {
457
- this.video.playbackRate = e, this.close();
458
- });
459
- this.panel.appendChild(r);
460
- }
461
- }
462
- renderQuality() {
463
- this.panel.innerHTML = "", this.panel.appendChild(this.backRow(this.labels.quality, () => this.renderMain()));
464
- for (const e of this.qualities) {
465
- const t = e.label === this.activeQualityLabel;
466
- this.panel.appendChild(
467
- this.row(e.label, t ? '<i class="hp-icon hp-icon-check"></i>' : "", () => {
468
- e.onSelect(), this.close();
469
- })
470
- );
471
- }
472
- }
473
- renderCaptions() {
474
- this.panel.innerHTML = "", this.panel.appendChild(this.backRow(this.labels.captions, () => this.renderMain()));
475
- for (const e of this.captions) {
476
- const t = e.label === this.activeCaptionLabel;
477
- this.panel.appendChild(
478
- this.row(e.label, t ? '<i class="hp-icon hp-icon-check"></i>' : "", () => {
479
- e.onSelect(), this.close();
480
- })
481
- );
482
- }
483
- if (this.captionAppearance && this.activeCaptionLabel !== this.labels.captionsOff) {
484
- const e = this.captionAppearance;
485
- this.panel.appendChild(
486
- this.row(e.sizeLabel, "", () => {
487
- this.currentPanel = "captions-size", this.renderCaptionsSize();
488
- })
489
- ), this.panel.appendChild(
490
- this.row(e.bgColorLabel, "", () => {
491
- this.currentPanel = "captions-bg", this.renderCaptionColorPanel("bg");
492
- })
493
- ), this.panel.appendChild(
494
- this.row(e.textColorLabel, "", () => {
495
- this.currentPanel = "captions-text", this.renderCaptionColorPanel("text");
496
- })
497
- ), this.panel.appendChild(
498
- this.row(e.resetPositionLabel, "", () => {
499
- e.onResetPosition(), this.close();
500
- })
501
- );
502
- }
503
- }
504
- renderCaptionsSize() {
505
- this.panel.innerHTML = "";
506
- const e = this.captionAppearance;
507
- if (this.panel.appendChild(this.backRow((e == null ? void 0 : e.sizeLabel) ?? this.labels.captionSize, () => this.renderCaptions())), !!e)
508
- for (const t of e.getSizeOptions())
509
- this.panel.appendChild(
510
- this.row(t.label, t.active ? '<i class="hp-icon hp-icon-check"></i>' : "", () => {
511
- t.onSelect(), this.close();
512
- })
513
- );
514
- }
515
- /** "Arka Plan Rengi" / "Yazı Rengi" — düz metin satırları yerine renkli swatch grid'i (YouTube'un kendi altyazı renk seçici deseni). */
516
- renderCaptionColorPanel(e) {
517
- this.panel.innerHTML = "";
518
- const t = this.captionAppearance, r = e === "bg" ? (t == null ? void 0 : t.bgColorLabel) ?? this.labels.captionBgColor : (t == null ? void 0 : t.textColorLabel) ?? this.labels.captionTextColor;
519
- if (this.panel.appendChild(this.backRow(r, () => this.renderCaptions())), !t) return;
520
- const s = document.createElement("div");
521
- s.className = "hp:flex hp:flex-wrap hp:gap-2 hp:px-3 hp:py-2";
522
- const o = e === "bg" ? t.getBgColorOptions() : t.getTextColorOptions();
523
- for (const l of o) {
524
- const c = document.createElement("button");
525
- c.type = "button", c.setAttribute("aria-label", l.ariaLabel), c.className = "hp:w-7 hp:h-7 hp:rounded-full hp:cursor-pointer hp:flex-shrink-0 hp:border hp:border-on-surface/20", c.style.background = l.value, c.style.outline = l.active ? "2px solid currentColor" : "2px solid transparent", c.style.outlineOffset = "2px", c.addEventListener("click", () => {
526
- l.onSelect(), this.render();
527
- }), s.appendChild(c);
528
- }
529
- this.panel.appendChild(s);
530
- }
531
- /** Dil sonradan değişince statik buton etiketini tazeler + mevcut panel zaten güncel `this.labels`'ı okuyarak yeniden render edilir. */
532
- refreshLabels() {
533
- this.button.setAttribute("aria-label", this.labels.settings), this.render();
534
- }
535
- destroy() {
536
- document.removeEventListener("click", this.onDocumentClick, !0);
537
- }
538
- }
539
- const $ = 15, Z = 480;
540
- function w(a, e) {
541
- a.setAttribute("aria-label", e);
542
- }
543
- function C(a, e, t) {
544
- const r = document.createElement("button");
545
- r.type = "button", w(r, a), t && (r.dataset.shortcut = t), r.className = "hp-chip hp:flex hp:items-center hp:justify-center hp:w-[var(--hp-ctrl-btn-size)] hp:h-[var(--hp-ctrl-btn-size)] hp:cursor-pointer hp:shrink-0";
546
- const s = v(e, "hp:text-[length:var(--hp-ctrl-icon-size)]");
547
- return r.appendChild(s), { btn: r, icon: s };
548
- }
549
- class J {
550
- constructor(e, t, r, s) {
551
- i(this, "el");
552
- i(this, "seekBar");
553
- i(this, "volumePanel");
554
- i(this, "settingsMenu");
555
- i(this, "video");
556
- i(this, "labels");
557
- i(this, "playButton");
558
- i(this, "playIcon");
559
- i(this, "pipButton");
560
- i(this, "fullscreenButton");
561
- i(this, "fullscreenIcon");
562
- i(this, "timeLabel");
563
- i(this, "showRemaining", !1);
564
- /** Kompakt düzende (player < 480px) sağ grubun taşındığı üst bar; tam ekran altta kalır. */
565
- i(this, "topEl");
566
- i(this, "bottomRow");
567
- i(this, "rightGroup");
568
- i(this, "fullscreenSlot");
569
- i(this, "compact", !1);
570
- i(this, "resizeObserver");
571
- i(this, "liveBadge");
572
- i(this, "liveText");
573
- i(this, "adMode", !1);
574
- i(this, "callbacks");
575
- i(this, "row");
576
- i(this, "extraButtonAnchor");
577
- /** Plugin'lerin (live-wall-clock vb.) kontrol çubuğuna buton olmayan bir element (ör. saat göstergesi) eklemesi için. */
578
- i(this, "onTimeClick", (e) => {
579
- e.stopPropagation(), this.toggleTimeMode();
580
- });
581
- i(this, "renderPlayState", () => {
582
- const e = this.callbacks.isAdActive() ? this.callbacks.adIsPaused() : this.video.paused;
583
- x(this.playIcon, e ? "play" : "pause"), w(this.playButton, e ? this.labels.play : this.labels.pause);
584
- });
585
- i(this, "renderTime", () => {
586
- const e = this.video.duration === 1 / 0;
587
- if (this.timeLabel.style.display = this.adMode || e ? "none" : "", this.liveBadge.style.display = !this.adMode && e ? "" : "none", !e) {
588
- const s = this.video.duration, o = this.video.currentTime;
589
- if (this.showRemaining) {
590
- const l = Math.max(0, (Number.isFinite(s) ? s : 0) - o);
591
- this.timeLabel.textContent = `-${y(l)} / ${y(s)}`;
592
- } else
593
- this.timeLabel.textContent = `${y(o)} / ${y(s)}`;
594
- return;
595
- }
596
- const t = this.liveEdge(), r = t !== null && t - this.video.currentTime > $;
597
- this.liveBadge.toggleAttribute("data-behind", r);
598
- });
599
- i(this, "goToLive", () => {
600
- const e = this.liveEdge();
601
- e !== null && (this.video.currentTime = Math.max(0, e - 1), this.video.paused && this.video.play().catch(() => {
602
- }), this.renderTime());
603
- });
604
- this.video = e, this.callbacks = r, this.labels = s, this.el = document.createElement("div"), this.el.setAttribute("part", "control-bar"), this.el.className = "hp:absolute hp:inset-x-0 hp:bottom-0 hp:flex hp:flex-col hp:gap-1 hp:px-3 hp:pb-2 hp:pt-6 hp:pointer-events-none hp:transition-opacity hp:duration-200", this.seekBar = new Y(e, s), this.seekBar.el.classList.add("hp:pointer-events-auto"), this.el.appendChild(this.seekBar.el);
605
- const o = document.createElement("div");
606
- o.className = "hp:flex hp:items-center hp:gap-2", this.el.appendChild(o), this.bottomRow = o;
607
- const l = document.createElement("div");
608
- l.className = "hp-group hp:flex hp:items-center hp:gap-1 hp:px-1.5 hp:py-1 hp:shrink-0 hp:pointer-events-auto", o.appendChild(l);
609
- const c = C(s.play, "play", "K");
610
- this.playButton = c.btn, this.playIcon = c.icon, this.playButton.setAttribute("part", "play-pause-button"), this.playButton.addEventListener("click", () => this.togglePlay()), l.appendChild(this.playButton), this.volumePanel = new j(e, s, r.adVolume), l.appendChild(this.volumePanel.el), this.timeLabel = document.createElement("button"), this.timeLabel.type = "button", this.timeLabel.setAttribute("part", "time-display"), this.timeLabel.className = "hp:text-xs hp:text-on-surface hp:tabular-nums hp:whitespace-nowrap hp:px-1 hp:bg-transparent hp:border-0 hp:cursor-pointer hp:select-none hp:p-0 hp:hover:opacity-80 hp:transition-opacity hp:focus-visible:outline-none hp:focus-visible:ring-1 hp:focus-visible:ring-accent hp:rounded", this.timeLabel.textContent = "0:00 / 0:00", this.timeLabel.addEventListener("click", this.onTimeClick), l.appendChild(this.timeLabel), this.liveBadge = document.createElement("button"), this.liveBadge.type = "button", this.liveBadge.className = "hp-live-badge", this.liveBadge.setAttribute("part", "live-badge"), this.liveBadge.setAttribute("aria-label", s.goToLive);
611
- const n = document.createElement("span");
612
- n.className = "hp-live-dot", this.liveText = document.createElement("span"), this.liveText.textContent = s.live, this.liveBadge.append(n, this.liveText), this.liveBadge.style.display = "none", this.liveBadge.addEventListener("click", this.goToLive), l.appendChild(this.liveBadge);
613
- const h = document.createElement("div");
614
- h.className = "hp:flex-1", o.appendChild(h);
615
- const p = document.createElement("div");
616
- p.className = "hp-group hp:flex hp:items-center hp:gap-1 hp:px-1.5 hp:py-1 hp:shrink-0 hp:pointer-events-auto", o.appendChild(p), this.rightGroup = p, this.settingsMenu = new K(e, t, s), p.appendChild(this.settingsMenu.el), this.extraButtonAnchor = this.settingsMenu.el, this.row = p;
617
- const d = C(s.pip, "pip");
618
- this.pipButton = d.btn, this.pipButton.addEventListener("click", () => this.togglePip()), document.pictureInPictureEnabled || (this.pipButton.style.display = "none"), p.appendChild(this.pipButton);
619
- const u = C(s.fullscreenEnter, "fullscreen-enter", "F");
620
- this.fullscreenButton = u.btn, this.fullscreenIcon = u.icon, this.fullscreenButton.addEventListener("click", () => this.toggleFullscreen()), p.appendChild(this.fullscreenButton), this.topEl = document.createElement("div"), this.topEl.className = "hp-top-bar", this.topEl.setAttribute("part", "top-bar"), this.fullscreenSlot = document.createElement("div"), this.fullscreenSlot.className = "hp-group hp:items-center hp:px-1.5 hp:py-1 hp:shrink-0 hp:pointer-events-auto", this.fullscreenSlot.style.display = "none", o.appendChild(this.fullscreenSlot), this.resizeObserver = new ResizeObserver(() => this.updateLayout()), this.resizeObserver.observe(this.el), e.addEventListener("play", this.renderPlayState), e.addEventListener("pause", this.renderPlayState), e.addEventListener("timeupdate", this.renderTime), e.addEventListener("loadedmetadata", this.renderTime), e.addEventListener("durationchange", this.renderTime), e.addEventListener("progress", this.renderTime), this.renderPlayState(), this.renderTime();
621
- }
622
- /** Player genişliğine göre normal / kompakt (mobil) düzen arasında geçiş — yalnızca eşik geçilince DOM taşınır. */
623
- updateLayout() {
624
- var r;
625
- const e = this.el.getBoundingClientRect().width;
626
- if (e === 0) return;
627
- const t = e < Z;
628
- t !== this.compact && (this.compact = t, this.el.toggleAttribute("data-compact", t), (r = this.el.closest(".video-area")) == null || r.toggleAttribute("data-compact", t), t ? (this.fullscreenSlot.appendChild(this.fullscreenButton), this.fullscreenSlot.style.display = this.adMode ? "none" : "flex", this.topEl.appendChild(this.rightGroup)) : (this.rightGroup.appendChild(this.fullscreenButton), this.bottomRow.insertBefore(this.rightGroup, this.fullscreenSlot), this.fullscreenSlot.style.display = "none"));
629
- }
630
- setFullscreenState(e) {
631
- x(this.fullscreenIcon, e ? "fullscreen-exit" : "fullscreen-enter"), w(this.fullscreenButton, e ? this.labels.fullscreenExit : this.labels.fullscreenEnter);
632
- }
633
- /** Dil sonradan değişince (`options.locale`/`labels`) statik (reaktif olarak yeniden render edilmeyen) etiketleri tazeler. */
634
- refreshLabels() {
635
- this.renderPlayState(), w(this.pipButton, this.labels.pip), w(this.liveBadge, this.labels.goToLive), this.liveText.textContent = this.labels.live, this.setFullscreenState(this.callbacks.isFullscreen()), this.seekBar.refreshLabels(), this.volumePanel.refreshLabels(), this.settingsMenu.refreshLabels();
636
- }
637
- /** Reklam modu: seek bar, süre ve sağ grup gizlenir; oynat/duraklat + ses kalır. */
638
- setAdMode(e) {
639
- const t = e ? "none" : "";
640
- this.adMode = e, this.seekBar.el.style.display = t, this.row.style.display = t, this.compact && (this.fullscreenSlot.style.display = e ? "none" : "flex"), this.renderTime();
641
- const r = e ? "#202020" : "";
642
- this.playIcon.style.color = r, this.volumePanel.setIconColor(r), this.volumePanel.setSliderFillColor(r), this.renderPlayState(), this.volumePanel.refreshForAdMode();
643
- }
644
- /** `AdsController`'ın IMA'nın KENDİ UI'ı üzerinden (ör. reklam video'suna tıklama) gelen PAUSED/RESUMED event'leri için — oynat/duraklat ikonunu tazeler. */
645
- refreshAdPlayState() {
646
- this.renderPlayState();
647
- }
648
- setQualities(e, t) {
649
- this.settingsMenu.setQualities(e, t);
650
- }
651
- setCaptions(e, t) {
652
- this.settingsMenu.setCaptions(e, t);
653
- }
654
- /** Plugin'lerin (loop-section vb.) kontrol çubuğuna kendi butonlarını eklemesi için — ayarlar menüsünden önce yerleştirilir. */
655
- addButton(e, t, r) {
656
- const { btn: s, icon: o } = C(e, t);
657
- return s.addEventListener("click", r), this.row.insertBefore(s, this.extraButtonAnchor), { btn: s, icon: o };
658
- }
659
- toggleTimeMode() {
660
- this.showRemaining = !this.showRemaining, this.renderTime();
661
- }
662
- setShowRemaining(e) {
663
- this.showRemaining !== e && (this.showRemaining = e, this.renderTime());
664
- }
665
- getShowRemaining() {
666
- return this.showRemaining;
667
- }
668
- addElement(e) {
669
- this.row.insertBefore(e, this.extraButtonAnchor);
670
- }
671
- togglePlay() {
672
- if (this.callbacks.isAdActive()) {
673
- this.callbacks.adTogglePlay(), this.renderPlayState();
674
- return;
675
- }
676
- this.video.paused ? this.video.play() : this.video.pause();
677
- }
678
- async togglePip() {
679
- try {
680
- document.pictureInPictureElement ? await document.exitPictureInPicture() : await this.video.requestPictureInPicture();
681
- } catch {
682
- }
683
- }
684
- toggleFullscreen() {
685
- this.callbacks.isFullscreen() ? this.callbacks.onExitFullscreen() : this.callbacks.onRequestFullscreen();
686
- }
687
- /** Canlı uç (media-time) — seekable sonu; native HLS'te DVR'sız canlıda seekable boş kalabildiği için buffered sonu (bkz. LiveWallClock.isLive notu). */
688
- liveEdge() {
689
- const { seekable: e, buffered: t } = this.video;
690
- return e.length ? e.end(e.length - 1) : t.length ? t.end(t.length - 1) : null;
691
- }
692
- destroy() {
693
- this.timeLabel.removeEventListener("click", this.onTimeClick), this.video.removeEventListener("play", this.renderPlayState), this.video.removeEventListener("pause", this.renderPlayState), this.video.removeEventListener("timeupdate", this.renderTime), this.video.removeEventListener("loadedmetadata", this.renderTime), this.video.removeEventListener("durationchange", this.renderTime), this.video.removeEventListener("progress", this.renderTime), this.resizeObserver.disconnect(), this.topEl.remove(), this.seekBar.destroy(), this.settingsMenu.destroy();
694
- }
695
- }
696
- const ee = 450, te = 60, B = 8, L = 6, ie = /* @__PURE__ */ new Set(["seek-bar", "time-display"]);
697
- function re() {
698
- return typeof window.matchMedia != "function" || window.matchMedia("(hover: hover)").matches;
699
- }
700
- class se {
701
- constructor(e) {
702
- i(this, "el");
703
- i(this, "labelEl");
704
- i(this, "keyEl");
705
- i(this, "showTimer", null);
706
- i(this, "hideTimer", null);
707
- i(this, "currentTarget", null);
708
- /** Gösterim gecikmesi (SHOW_DELAY_MS) içinde bekleyen hedef — `currentTarget` yalnızca gerçekten gösterilince set ediliyor. */
709
- i(this, "pendingTarget", null);
710
- i(this, "onMouseOver", (e) => {
711
- const t = this.matchTarget(e.target);
712
- !t || t === this.currentTarget || this.scheduleShow(t);
713
- });
714
- i(this, "onMouseOut", (e) => {
715
- const t = this.matchTarget(e.target);
716
- if (!t || t !== this.currentTarget && t !== this.pendingTarget) return;
717
- const r = e.relatedTarget;
718
- r && t.contains(r) || this.scheduleHide();
719
- });
720
- i(this, "onFocusIn", (e) => {
721
- const t = this.matchTarget(e.target);
722
- t && this.show(t);
723
- });
724
- i(this, "onFocusOut", (e) => {
725
- const t = this.matchTarget(e.target);
726
- !t || t !== this.currentTarget || this.hideNow();
727
- });
728
- i(this, "hideNow", () => {
729
- this.showTimer && (clearTimeout(this.showTimer), this.showTimer = null), this.pendingTarget = null, this.hideTimer && (clearTimeout(this.hideTimer), this.hideTimer = null), this.currentTarget && (this.currentTarget = null, this.el.style.opacity = "0", this.el.style.visibility = "hidden");
730
- });
731
- this.mountEl = e, this.el = document.createElement("div"), this.el.setAttribute("part", "tooltip"), this.el.setAttribute("role", "tooltip"), this.el.className = "hp-tooltip hp:absolute hp:z-40 hp:flex hp:items-center hp:gap-1.5 hp:px-2 hp:py-1 hp:rounded hp:text-xs hp:whitespace-nowrap hp:pointer-events-none hp:opacity-0 hp:transition-opacity hp:duration-100", this.el.style.visibility = "hidden", this.labelEl = document.createElement("span"), this.el.appendChild(this.labelEl), this.keyEl = document.createElement("span"), this.keyEl.className = "hp-tooltip-key", this.el.appendChild(this.keyEl), e.appendChild(this.el), e.addEventListener("mouseover", this.onMouseOver), e.addEventListener("mouseout", this.onMouseOut), e.addEventListener("focusin", this.onFocusIn), e.addEventListener("focusout", this.onFocusOut), e.addEventListener("pointerdown", this.hideNow);
732
- }
733
- destroy() {
734
- this.showTimer && clearTimeout(this.showTimer), this.hideTimer && clearTimeout(this.hideTimer), this.mountEl.removeEventListener("mouseover", this.onMouseOver), this.mountEl.removeEventListener("mouseout", this.onMouseOut), this.mountEl.removeEventListener("focusin", this.onFocusIn), this.mountEl.removeEventListener("focusout", this.onFocusOut), this.mountEl.removeEventListener("pointerdown", this.hideNow), this.el.remove();
735
- }
736
- matchTarget(e) {
737
- var o;
738
- const t = e, r = (o = t == null ? void 0 : t.closest) == null ? void 0 : o.call(t, 'button[aria-label], [role="slider"][aria-label]');
739
- if (!r) return null;
740
- const s = r.getAttribute("part");
741
- return s && ie.has(s) || r.offsetParent === null && r !== document.activeElement ? null : r;
742
- }
743
- scheduleShow(e) {
744
- this.hideTimer && (clearTimeout(this.hideTimer), this.hideTimer = null), this.showTimer && clearTimeout(this.showTimer), this.pendingTarget = e, this.showTimer = setTimeout(() => {
745
- this.showTimer = null, this.pendingTarget = null, this.show(e);
746
- }, ee);
747
- }
748
- scheduleHide() {
749
- this.showTimer && (clearTimeout(this.showTimer), this.showTimer = null), this.pendingTarget = null, this.hideTimer && clearTimeout(this.hideTimer), this.hideTimer = setTimeout(() => this.hideNow(), te);
750
- }
751
- show(e) {
752
- if (!re()) return;
753
- const t = e.getAttribute("aria-label");
754
- if (!t) return;
755
- this.currentTarget = e, this.labelEl.textContent = t;
756
- const r = e.dataset.shortcut;
757
- r ? (this.keyEl.textContent = r, this.keyEl.style.display = "") : (this.keyEl.textContent = "", this.keyEl.style.display = "none"), this.el.style.visibility = "hidden", this.el.style.opacity = "0", this.el.style.left = "0px", this.el.style.top = "0px", requestAnimationFrame(() => {
758
- this.currentTarget === e && (this.position(e), this.el.style.visibility = "visible", this.el.style.opacity = "1");
759
- });
760
- }
761
- position(e) {
762
- const t = this.mountEl.getBoundingClientRect(), r = e.getBoundingClientRect(), s = this.el.getBoundingClientRect();
763
- let o = r.top - t.top - s.height - B;
764
- o < L && (o = r.bottom - t.top + B);
765
- let l = r.left - t.left + r.width / 2 - s.width / 2;
766
- const c = t.width - s.width - L;
767
- l = Math.max(L, Math.min(l, c)), this.el.style.top = `${o}px`, this.el.style.left = `${l}px`;
768
- }
769
- }
770
- class oe {
771
- constructor(e, t, r) {
772
- i(this, "host");
773
- i(this, "video");
774
- i(this, "toggleFullscreen");
775
- i(this, "onKeyDown", (e) => {
776
- if (e.defaultPrevented) return;
777
- const t = this.video.duration;
778
- switch (e.key) {
779
- case " ":
780
- case "k":
781
- this.video.paused ? this.video.play() : this.video.pause(), e.preventDefault();
782
- break;
783
- case "ArrowRight":
784
- case "l":
785
- Number.isFinite(t) && (this.video.currentTime = Math.min(t, this.video.currentTime + 5)), e.preventDefault();
786
- break;
787
- case "ArrowLeft":
788
- case "j":
789
- this.video.currentTime = Math.max(0, this.video.currentTime - 5), e.preventDefault();
790
- break;
791
- case "ArrowUp":
792
- this.video.volume = Math.min(1, this.video.volume + 0.1), this.video.muted = !1, e.preventDefault();
793
- break;
794
- case "ArrowDown":
795
- this.video.volume = Math.max(0, this.video.volume - 0.1), e.preventDefault();
796
- break;
797
- case "m":
798
- this.video.muted = !this.video.muted, e.preventDefault();
799
- break;
800
- case "f":
801
- this.toggleFullscreen(), e.preventDefault();
802
- break;
803
- }
804
- });
805
- this.host = e, this.video = t, this.toggleFullscreen = r, this.host.addEventListener("keydown", this.onKeyDown);
806
- }
807
- destroy() {
808
- this.host.removeEventListener("keydown", this.onKeyDown);
809
- }
810
- }
811
- class ne {
812
- constructor(e) {
813
- i(this, "el");
814
- i(this, "video");
815
- i(this, "show", () => this.el.classList.remove("hp:hidden"));
816
- i(this, "hide", () => this.el.classList.add("hp:hidden"));
817
- this.video = e, this.el = document.createElement("div"), this.el.className = "hp:absolute hp:inset-0 hp:flex hp:items-center hp:justify-center hp:pointer-events-none hp:hidden", this.el.innerHTML = '<div class="hp:w-10 hp:h-10 hp:border-[3px] hp:border-on-surface/30 hp:border-t-accent hp:rounded-full hp:animate-spin"></div>', e.addEventListener("waiting", this.show), e.addEventListener("playing", this.hide), e.addEventListener("canplay", this.hide), e.addEventListener("pause", this.hide);
818
- }
819
- destroy() {
820
- this.video.removeEventListener("waiting", this.show), this.video.removeEventListener("playing", this.hide), this.video.removeEventListener("canplay", this.hide), this.video.removeEventListener("pause", this.hide);
821
- }
822
- }
823
- class ae {
824
- constructor(e, t) {
825
- i(this, "el");
826
- i(this, "video");
827
- i(this, "labels");
828
- i(this, "messageEl");
829
- i(this, "retryBtn");
830
- i(this, "onRetry", null);
831
- i(this, "show", () => {
832
- var r;
833
- const e = ((r = this.video.error) == null ? void 0 : r.code) ?? 0, t = {
834
- 1: this.labels.errorAborted,
835
- 2: this.labels.errorNetwork,
836
- 3: this.labels.errorDecode,
837
- 4: this.labels.errorSrcNotSupported
838
- };
839
- this.messageEl.textContent = t[e] ?? this.labels.errorGeneric, this.el.classList.remove("hp:hidden"), this.el.classList.add("hp:flex");
840
- });
841
- this.video = e, this.labels = t, this.el = document.createElement("div"), this.el.className = "hp:absolute hp:inset-0 hp:hidden hp:flex-col hp:items-center hp:justify-center hp:gap-3 hp:bg-surface/95 hp:text-on-surface hp:text-sm hp:text-center hp:px-6", this.el.appendChild(v("warning", "hp:text-3xl hp:text-accent")), this.messageEl = document.createElement("p"), this.el.appendChild(this.messageEl), this.retryBtn = document.createElement("button"), this.retryBtn.type = "button", this.retryBtn.textContent = t.retry, this.retryBtn.className = "hp:px-4 hp:py-1.5 hp:rounded-md hp:bg-accent hp:text-on-accent hp:text-xs hp:font-medium hp:border-0 hp:cursor-pointer", this.retryBtn.addEventListener("click", () => {
842
- var r;
843
- this.hide(), (r = this.onRetry) == null || r.call(this);
844
- }), this.el.appendChild(this.retryBtn), e.addEventListener("error", this.show);
845
- }
846
- setOnRetry(e) {
847
- this.onRetry = e;
848
- }
849
- refreshLabels() {
850
- this.retryBtn.textContent = this.labels.retry, this.el.classList.contains("hp:hidden") || this.show();
851
- }
852
- hide() {
853
- this.el.classList.add("hp:hidden"), this.el.classList.remove("hp:flex");
854
- }
855
- destroy() {
856
- this.video.removeEventListener("error", this.show);
857
- }
858
- }
859
- function le(a, e) {
860
- a.querySelectorAll("track").forEach((r) => r.remove());
861
- const t = [];
862
- for (const r of e) {
863
- const s = document.createElement("track");
864
- s.kind = "subtitles", s.src = r.src, s.srclang = r.srclang, s.label = r.label, a.appendChild(s), s.track && (s.track.mode = r.default ? "hidden" : "disabled", t.push({ label: r.label, track: s.track }));
865
- }
866
- return t;
867
- }
868
- function he(a, e) {
869
- let t = null;
870
- for (const { label: r, track: s } of a) {
871
- const o = r === e;
872
- s.mode = o ? "hidden" : "disabled", o && (t = s);
873
- }
874
- return t;
875
- }
876
- const A = 6, pe = 20, ce = 14, de = 6, ue = 10, me = 3, D = "hope-caption-row", H = "hope-caption-font-size", M = "hope-caption-bg-color", R = "hope-caption-text-color", be = {
877
- small: 0.78,
878
- normal: 1,
879
- large: 1.35
880
- }, z = [
881
- "rgba(0, 0, 0, 0.75)",
882
- "rgba(0, 0, 0, 0)",
883
- "rgba(255, 255, 255, 0.85)",
884
- "rgba(183, 28, 28, 0.8)",
885
- "rgba(13, 71, 161, 0.8)",
886
- "rgba(27, 94, 32, 0.8)"
887
- ], F = ["#ffffff", "#000000", "#ffeb3b", "#ff5252", "#18ffff", "#69f0ae"];
888
- function ve() {
889
- try {
890
- const a = window.localStorage.getItem(D), e = a === null ? 0 : Number(a);
891
- return Number.isFinite(e) && e >= 0 && e < A ? e : 0;
892
- } catch {
893
- return 0;
894
- }
895
- }
896
- function ge() {
897
- try {
898
- const a = window.localStorage.getItem(H);
899
- return a === "small" || a === "normal" || a === "large" ? a : "normal";
900
- } catch {
901
- return "normal";
902
- }
903
- }
904
- function I(a, e) {
905
- const t = e[0] ?? "";
906
- try {
907
- const r = window.localStorage.getItem(a);
908
- return r !== null && e.includes(r) ? r : t;
909
- } catch {
910
- return t;
911
- }
912
- }
913
- class k {
914
- constructor(e, t, r, s) {
915
- i(this, "layerEl");
916
- i(this, "bubbleEl");
917
- i(this, "videoArea");
918
- i(this, "seekBarEl");
919
- i(this, "labels");
920
- i(this, "activeTrack", null);
921
- i(this, "fontSize", ge());
922
- i(this, "bgColor", I(M, z));
923
- i(this, "textColor", I(R, F));
924
- i(this, "rowIndex", ve());
925
- i(this, "dragging", !1);
926
- /** Kontrol çubuğu görünür mü — görünürken altyazı seek bar'ın üstünde, değilken en altta. */
927
- i(this, "chromeVisible", !0);
928
- i(this, "dragStartClientY", 0);
929
- i(this, "dragStartBottomPx", 0);
930
- i(this, "dragMoved", !1);
931
- i(this, "rafId", null);
932
- i(this, "pendingDeltaPx", 0);
933
- i(this, "resizeObserver");
934
- i(this, "onCueChange", () => {
935
- var t;
936
- const e = (t = this.activeTrack) == null ? void 0 : t.activeCues;
937
- if (!this.activeTrack || !e || e.length === 0) {
938
- this.bubbleEl.classList.remove("hp-caption-visible"), this.bubbleEl.textContent = "";
939
- return;
940
- }
941
- this.bubbleEl.textContent = "";
942
- for (let r = 0; r < e.length; r++) {
943
- r > 0 && this.bubbleEl.appendChild(document.createElement("br"));
944
- const s = e[r];
945
- typeof s.getCueAsHTML == "function" ? this.bubbleEl.appendChild(s.getCueAsHTML()) : this.bubbleEl.appendChild(document.createTextNode(s.text ?? ""));
946
- }
947
- this.bubbleEl.classList.add("hp-caption-visible");
948
- });
949
- i(this, "onPointerDown", (e) => {
950
- e.button !== 0 && e.pointerType === "mouse" || (e.preventDefault(), this.dragging = !0, this.dragMoved = !1, this.dragStartClientY = e.clientY, this.dragStartBottomPx = this.pxForRow(this.rowIndex), this.bubbleEl.setPointerCapture(e.pointerId), this.bubbleEl.classList.add("hp-caption-dragging"), this.bubbleEl.addEventListener("pointermove", this.onPointerMove), this.bubbleEl.addEventListener("pointerup", this.onPointerUp), this.bubbleEl.addEventListener("pointercancel", this.onPointerUp));
951
- });
952
- i(this, "onPointerMove", (e) => {
953
- this.dragging && (this.pendingDeltaPx = e.clientY - this.dragStartClientY, Math.abs(this.pendingDeltaPx) > me && (this.dragMoved = !0), this.rafId === null && (this.rafId = requestAnimationFrame(this.applyPendingDrag)));
954
- });
955
- i(this, "applyPendingDrag", () => {
956
- if (this.rafId = null, !this.dragging) return;
957
- const { min: e, max: t } = this.bounds(), r = Math.min(t, Math.max(e, this.dragStartBottomPx - this.pendingDeltaPx)), s = this.dragStartBottomPx - r;
958
- this.bubbleEl.style.transform = `translateX(-50%) translateY(${s}px)`;
959
- });
960
- i(this, "onPointerUp", (e) => {
961
- if (!this.dragging || (this.dragging = !1, this.bubbleEl.releasePointerCapture(e.pointerId), this.bubbleEl.removeEventListener("pointermove", this.onPointerMove), this.bubbleEl.removeEventListener("pointerup", this.onPointerUp), this.bubbleEl.removeEventListener("pointercancel", this.onPointerUp), this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null), this.bubbleEl.classList.remove("hp-caption-dragging"), !this.dragMoved)) return;
962
- const { min: t, max: r } = this.bounds(), s = Math.min(r, Math.max(t, this.dragStartBottomPx - this.pendingDeltaPx)), o = r > t ? (s - t) / (r - t) : 0, l = Math.round(o * (A - 1));
963
- this.setRowIndex(l, !0, s);
964
- });
965
- this.videoArea = t, this.seekBarEl = r, this.labels = s, this.layerEl = document.createElement("div"), this.layerEl.className = "hp-caption-layer", this.layerEl.setAttribute("part", "caption-layer"), this.bubbleEl = document.createElement("div"), this.bubbleEl.className = "hp-caption-bubble", this.bubbleEl.setAttribute("part", "caption-bubble"), this.bubbleEl.setAttribute("role", "note"), this.bubbleEl.setAttribute("aria-label", s.captionDragHandle), this.bubbleEl.tabIndex = -1, this.applyFontSizeVar(), this.bubbleEl.style.setProperty("--hp-caption-bg", this.bgColor), this.bubbleEl.style.setProperty("--hp-caption-text", this.textColor), this.layerEl.appendChild(this.bubbleEl), this.bubbleEl.addEventListener("pointerdown", this.onPointerDown), this.resizeObserver = new ResizeObserver(() => this.recomputePosition()), this.resizeObserver.observe(this.videoArea), this.recomputePosition();
966
- }
967
- /** `applyOptions()`'tan — hangi track aktif (ya da null = kapalı). */
968
- setActiveTrack(e) {
969
- this.activeTrack && this.activeTrack.removeEventListener("cuechange", this.onCueChange), this.activeTrack = e, this.activeTrack && this.activeTrack.addEventListener("cuechange", this.onCueChange), this.onCueChange();
970
- }
971
- getFontSize() {
972
- return this.fontSize;
973
- }
974
- setFontSize(e) {
975
- this.fontSize = e, this.applyFontSizeVar(), this.recomputePosition();
976
- try {
977
- window.localStorage.setItem(H, e);
978
- } catch {
979
- }
980
- }
981
- getBgColor() {
982
- return this.bgColor;
983
- }
984
- setBgColor(e) {
985
- this.bgColor = e, this.bubbleEl.style.setProperty("--hp-caption-bg", e);
986
- try {
987
- window.localStorage.setItem(M, e);
988
- } catch {
989
- }
990
- }
991
- getTextColor() {
992
- return this.textColor;
993
- }
994
- setTextColor(e) {
995
- this.textColor = e, this.bubbleEl.style.setProperty("--hp-caption-text", e);
996
- try {
997
- window.localStorage.setItem(R, e);
998
- } catch {
999
- }
1000
- }
1001
- /** Ayarlar menüsündeki "Konumu sıfırla". */
1002
- resetPosition() {
1003
- this.setRowIndex(0, !0);
1004
- }
1005
- /** Dil sonradan değişince aria-label'ı tazeler. */
1006
- refreshLabels(e) {
1007
- this.labels = e, this.bubbleEl.setAttribute("aria-label", e.captionDragHandle);
1008
- }
1009
- applyFontSizeVar() {
1010
- this.bubbleEl.style.setProperty("--hp-caption-size-multiplier", String(be[this.fontSize]));
1011
- }
1012
- bounds() {
1013
- const e = this.videoArea.getBoundingClientRect(), t = this.seekBarEl.getBoundingClientRect(), s = (this.bubbleEl.getBoundingClientRect().height || 32) + pe, o = Math.max(ue, Math.round(e.height * 0.04)), l = this.chromeVisible && t.height > 0 ? Math.max(0, Math.round(e.bottom - t.top + (this.videoArea.hasAttribute("data-compact") ? de : ce))) : o, c = Math.max(l, Math.round(e.height - s));
1014
- return { min: l, max: c };
1015
- }
1016
- pxForRow(e) {
1017
- const { min: t, max: r } = this.bounds(), s = e / (A - 1);
1018
- return Math.round(t + s * (r - t));
1019
- }
1020
- /** FLIP: bottom anında yazılır, yalnızca transform animasyonlanır — bottom'u animasyonlamak bırakınca zıplatıyordu. */
1021
- setRowIndex(e, t, r) {
1022
- this.rowIndex = Math.min(A - 1, Math.max(0, e));
1023
- const s = this.pxForRow(this.rowIndex), o = r ?? parseFloat(this.bubbleEl.style.bottom || `${s}`);
1024
- t && o !== s ? (this.bubbleEl.classList.add("hp-caption-no-transition"), this.bubbleEl.style.bottom = `${s}px`, this.bubbleEl.style.transform = `translateX(-50%) translateY(${o - s}px)`, this.bubbleEl.offsetHeight, this.bubbleEl.classList.remove("hp-caption-no-transition"), this.bubbleEl.style.transform = "translateX(-50%)") : (this.bubbleEl.style.transform = "translateX(-50%)", this.bubbleEl.style.bottom = `${s}px`);
1025
- try {
1026
- window.localStorage.setItem(D, String(this.rowIndex));
1027
- } catch {
1028
- }
1029
- }
1030
- /** Boyut değişimi (ör. fullscreen'e giriş) sonrası AYNI satıra, YENİ sınırlara göre yeniden konumlan — animasyonsuz (boyut değişimi anlık olmalı). */
1031
- /** HopePlayerElement.setChromeOpacity'den — kontroller açılıp kapanınca balon yumuşakça yukarı/aşağı kayar (satır korunur). */
1032
- setChromeVisible(e) {
1033
- e !== this.chromeVisible && (this.chromeVisible = e, this.dragging || this.setRowIndex(this.rowIndex, !0));
1034
- }
1035
- recomputePosition() {
1036
- this.dragging || this.setRowIndex(this.rowIndex, !1);
1037
- }
1038
- destroy() {
1039
- this.activeTrack && this.activeTrack.removeEventListener("cuechange", this.onCueChange), this.resizeObserver.disconnect(), this.rafId !== null && cancelAnimationFrame(this.rafId), this.bubbleEl.removeEventListener("pointerdown", this.onPointerDown);
1040
- }
1041
- }
1042
- i(k, "BG_COLOR_PRESETS", z), i(k, "TEXT_COLOR_PRESETS", F);
1043
- class fe {
1044
- constructor(e) {
1045
- i(this, "el");
1046
- i(this, "bufferedEl");
1047
- i(this, "playedEl");
1048
- i(this, "visible", !1);
1049
- i(this, "rafId", null);
1050
- i(this, "sync", () => {
1051
- this.render(), this.visible && !this.video.paused ? this.start() : this.stop();
1052
- });
1053
- i(this, "render", () => {
1054
- const e = this.video.duration, t = Number.isFinite(e) && e > 0;
1055
- if (this.el.toggleAttribute("data-disabled", !t), !this.visible || !t) return;
1056
- this.playedEl.style.transform = `scaleX(${Math.min(1, this.video.currentTime / e)})`;
1057
- const { buffered: r } = this.video;
1058
- let s = 0;
1059
- for (let o = 0; o < r.length; o++)
1060
- r.start(o) <= this.video.currentTime && (s = Math.max(s, r.end(o)));
1061
- this.bufferedEl.style.transform = `scaleX(${Math.min(1, s / e)})`;
1062
- });
1063
- this.video = e, this.el = document.createElement("div"), this.el.className = "hp-mini-progress", this.el.setAttribute("part", "mini-progress"), this.el.setAttribute("aria-hidden", "true"), this.bufferedEl = document.createElement("div"), this.bufferedEl.className = "hp-mini-progress-fill hp-mini-progress-buffered", this.playedEl = document.createElement("div"), this.playedEl.className = "hp-mini-progress-fill hp-mini-progress-played", this.el.append(this.bufferedEl, this.playedEl), e.addEventListener("play", this.sync), e.addEventListener("pause", this.sync), e.addEventListener("timeupdate", this.render), e.addEventListener("progress", this.render), e.addEventListener("durationchange", this.render);
1064
- }
1065
- setVisible(e) {
1066
- e !== this.visible && (this.visible = e, this.el.toggleAttribute("data-visible", e), this.sync());
1067
- }
1068
- destroy() {
1069
- this.stop(), this.video.removeEventListener("play", this.sync), this.video.removeEventListener("pause", this.sync), this.video.removeEventListener("timeupdate", this.render), this.video.removeEventListener("progress", this.render), this.video.removeEventListener("durationchange", this.render), this.el.remove();
1070
- }
1071
- start() {
1072
- if (this.rafId !== null) return;
1073
- const e = () => {
1074
- this.render(), this.rafId = requestAnimationFrame(e);
1075
- };
1076
- this.rafId = requestAnimationFrame(e);
1077
- }
1078
- stop() {
1079
- this.rafId !== null && cancelAnimationFrame(this.rafId), this.rafId = null;
1080
- }
1081
- }
1082
- const ye = '@font-face{font-family:hope-icons;src:url(data:font/woff2;base64,d09GMgABAAAAAAW0AAsAAAAAC6wAAAVnAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACEJgqIRIceATYCJAM8CyAABCAFhC4HgUYbIQrIHpIkJYocsIBQ9WweX9nB87GWvr90l90AkyqDCiHd2RBWKCAa38q6xm8JbPP/1+nfQp405aQCZpKerqIX6I37IdS7L3EF5uy/tCsaIMD6v0FrLb8JUNIg3uOJ7x3m2sQalEwoZh66hXKho6V1FvEckU7AcRwEMMlVw/XMuS4KArsbBAfEcgdGC/h1pbvDqAFvNhotp67gRDDKrii7raKDnJFWgPP2h/8TYw2goKvAjvJbm/Vw2+azl7z9Wzn9UNdeB3x6BdABFcgcWaz05ie34+YWZ3LDTEt25wiRqSG0WWXvgI3JjnsiEBRUNHT2XzwHTjwwsfDEC28QAyCeuOVpiTfY6EDABgrYQAUbaGADHWxggA0cYAMn2MADbGCCDSywgSfYwAvsaLxx4sMsEw2IBXIQQFYA9zBEkEEzKdxZaK2goRqGp0FchF+Iu3uou9sZT8PhbegOL183N00rK82gVaSRpGiF0kgFEqlMFTOBSuWLJWapJaZaIkbiZyllhmrmmCqiyoR+iCopLnFZeH+HFdGZp8T98U35pg93xR1BHsf1+rVFWanKTzUtxVLbPOevguuIVS9RvKDPb+GGiPt6sR9mlVLWNOEOrp3YCVaObwe2jScnr9w2zfnNQGJ/YMe4tS5qdCuoetQVVDW6GUSPbYV0jiXJsAexrIWdEPmhkPaxENXEdnANten5bfedF9bCK9fLMvArUYtLVt5OhkOnSuHC6xWviuDS27fD65is6Ixq/TvnV4Rmj1zeVyhKmzHpjZRIydVEuFRZrRiuqvYLqKzwFZbCF3rTOjTklKT5O7XFOZeDX6dGA2ub1yqfjITdteuQsuuOw+ZousVC1mWO6VIdnjT/umB07S0qCSydVrKldnmKa3mmmkkUwjxVR8Fh6uR7w5NlX35cLcjJ7u7Jzs6U7wmXE19+XsvPlZWcAgU0LE+nkXzMaASjJBm6wX+FXolW0CvSV5hc+A9c3rrhusF1ivw8CjvHwsJjzsR5hWa0hGnyUmaiRPdmtVArVkdCZlLyNGHpLaFesjP5Tk7m5VacyLVmUOvN33NpX7i8IKNAHp507dg1jn8FbbEotfme1sa9XHx86kXRmyxnZY8eC+XMmjpdnNY9TFldFkmk7g0+SW6hZ3PU0Z8VudmKMlWnSvnW6816VG4DOyqH1eszp45cu/4m7/lzIvblLCSQChICKElY/p8G8raLAJg6yAlgb7YDch4A2ZZSe8a9292QbQBxpY18V0Ze6Z+etoybplPrpStscqV+afvLoQ/rsw+86nyO/Pf2UwCYTjrtsul+mHI54CQrWeCrIAR7+iLzt30wFD0aqa3lf+0YsY2JCewBpPp62B+RVM5PVHCwHC6rruaHGzRLBHQskojxveVwmGSoWNkiAMIN0TwQAi3AoODNIlQCTRs0y0noBLsLg0DvYFLKN50skmtoxwzKNuuwgx9ARtGm4SId3NcoEcebsYPIz8lLeIlW5ECcRkB6QruQ4CVjgSAYCAOH7UQLdgjIZsMEw2EL0gk5JkFgKnJzDfwnnaPDdjCBYUBkM6MD44BnAIQRERsauNxu45WVIDh4hmHGTsiXI6+UoZU4SvrVIIDQL6RlIQQeCSMFBCQbyKkMcGDsEFrqMaRsI2UsESa90AJCRybnMNUoZKiQi3oylCU5PWv2A8r9qXQLi/uIIqpoooshDnGKx8O4AfEUL/EWH/EFj6Z2pLP6mweSOOzItiGD4NHUjXkUbBBtNl7HIeTIRos7jAuK3OwCs+De3YcZj/4GkUdu/R2Me3+3ZqH3UIsgmB1G3m+0zybaUbbJbDT5+rk2POJPRdrFzS30GmvgHAWjAAA=) format("woff2");font-weight:400;font-style:normal;font-display:block}', N = "hope-player-icon-font";
1083
- function we() {
1084
- if (typeof document > "u" || document.getElementById(N)) return;
1085
- const a = document.createElement("style");
1086
- a.id = N, a.textContent = ye, document.head.appendChild(a);
1087
- }
1088
- const V = {
1089
- play: "Oynat",
1090
- pause: "Duraklat",
1091
- mute: "Sessize al",
1092
- unmute: "Sesi aç",
1093
- volume: "Ses seviyesi",
1094
- seekBar: "Video konumu",
1095
- settings: "Ayarlar",
1096
- pip: "Resim içinde resim",
1097
- fullscreenEnter: "Tam ekran",
1098
- fullscreenExit: "Tam ekrandan çık",
1099
- playbackSpeed: "Oynatma Hızı",
1100
- normal: "Normal",
1101
- quality: "Kalite",
1102
- captions: "Altyazı",
1103
- captionsOff: "Kapalı",
1104
- captionSize: "Yazı Boyutu",
1105
- captionSizeSmall: "Küçük",
1106
- captionSizeNormal: "Normal",
1107
- captionSizeLarge: "Büyük",
1108
- captionResetPosition: "Konumu sıfırla",
1109
- captionBgColor: "Arka Plan Rengi",
1110
- captionTextColor: "Yazı Rengi",
1111
- captionDragHandle: "Altyazı konumu — tutup sürükleyin",
1112
- autoQuality: "Oto",
1113
- loop: "Döngü",
1114
- close: "Kapat",
1115
- retry: "Tekrar Dene",
1116
- errorAborted: "Video yüklemesi iptal edildi.",
1117
- errorNetwork: "Ağ hatası — video yüklenemedi.",
1118
- errorDecode: "Video kodu çözülemedi.",
1119
- errorSrcNotSupported: "Bu video kaynağı desteklenmiyor.",
1120
- errorGeneric: "Video oynatılırken bir hata oluştu.",
1121
- countdownRemaining: "Kalan süre",
1122
- geoDefaultWarning: "Erişim engellendi.",
1123
- geoUnknownCountry: "Ülke bilgisi bulunamadı.",
1124
- redirectCancel: "İptal",
1125
- redirectPlayNow: "Şimdi Oynat",
1126
- redirectCountdown: (a) => `Sıradaki video ${a} saniye içinde oynatılacak.`,
1127
- redirectNowPlaying: "Video oynatılıyor...",
1128
- qrResumeTitle: "Devam etmek için kodu telefonunuzla okutun",
1129
- qrResumeDontShowAgain: "Bir daha gösterme",
1130
- qrResumeContinue: "Devam Et",
1131
- qrResumeMenuLabel: "QR ile Devam Et",
1132
- qrResumeOn: "Açık",
1133
- qrResumeOff: "Kapalı",
1134
- markerLearnMore: "Daha fazla bilgi",
1135
- markerContinue: "Devam et",
1136
- playlistTitle: "Oynatma Listesi",
1137
- playlistPrev: "Önceki",
1138
- playlistNext: "Sonraki",
1139
- videoFallbackTitle: (a) => `Video ${a + 1}`,
1140
- storyPrev: "Önceki video",
1141
- storyNext: "Sonraki video",
1142
- storyAllVideos: "Tüm videolar",
1143
- dubbingTitle: "Ses / Dil",
1144
- liveClock: "Canlı saat",
1145
- live: "CANLI",
1146
- goToLive: "Canlıya git"
1147
- }, xe = {
1148
- play: "Play",
1149
- pause: "Pause",
1150
- mute: "Mute",
1151
- unmute: "Unmute",
1152
- volume: "Volume",
1153
- seekBar: "Seek",
1154
- settings: "Settings",
1155
- pip: "Picture-in-picture",
1156
- fullscreenEnter: "Fullscreen",
1157
- fullscreenExit: "Exit fullscreen",
1158
- playbackSpeed: "Playback speed",
1159
- normal: "Normal",
1160
- quality: "Quality",
1161
- captions: "Captions",
1162
- captionsOff: "Off",
1163
- captionSize: "Font Size",
1164
- captionSizeSmall: "Small",
1165
- captionSizeNormal: "Normal",
1166
- captionSizeLarge: "Large",
1167
- captionResetPosition: "Reset position",
1168
- captionBgColor: "Background Color",
1169
- captionTextColor: "Text Color",
1170
- captionDragHandle: "Caption position — drag to move",
1171
- autoQuality: "Auto",
1172
- loop: "Loop",
1173
- close: "Close",
1174
- retry: "Retry",
1175
- errorAborted: "Video loading was aborted.",
1176
- errorNetwork: "Network error — the video could not load.",
1177
- errorDecode: "The video could not be decoded.",
1178
- errorSrcNotSupported: "This video source is not supported.",
1179
- errorGeneric: "An error occurred while playing the video.",
1180
- countdownRemaining: "Time remaining",
1181
- geoDefaultWarning: "Access denied.",
1182
- geoUnknownCountry: "No country information found.",
1183
- redirectCancel: "Cancel",
1184
- redirectPlayNow: "Play now",
1185
- redirectCountdown: (a) => `Next video will play in ${a} seconds.`,
1186
- redirectNowPlaying: "Now playing...",
1187
- qrResumeTitle: "Scan to continue watching on your phone",
1188
- qrResumeDontShowAgain: "Don't show again",
1189
- qrResumeContinue: "Continue",
1190
- qrResumeMenuLabel: "Continue via QR",
1191
- qrResumeOn: "On",
1192
- qrResumeOff: "Off",
1193
- markerLearnMore: "Learn more",
1194
- markerContinue: "Continue",
1195
- playlistTitle: "Playlist",
1196
- playlistPrev: "Previous",
1197
- playlistNext: "Next",
1198
- videoFallbackTitle: (a) => `Video ${a + 1}`,
1199
- storyPrev: "Previous video",
1200
- storyNext: "Next video",
1201
- storyAllVideos: "All videos",
1202
- dubbingTitle: "Audio / Language",
1203
- liveClock: "Live clock",
1204
- live: "LIVE",
1205
- goToLive: "Go to live"
1206
- }, ke = { tr: V, en: xe };
1207
- function q(a, e) {
1208
- return { ...ke[a ?? "tr"] ?? V, ...e };
1209
- }
1210
- function Ee(a, e, t) {
1211
- Object.assign(a, q(e, t));
1212
- }
1213
- const Ce = [0.5, 0.75, 1, 1.25, 1.5, 2], O = 1200, Ae = 10, Le = (
1214
- /* html */
1215
- `
1216
- <div class="video-area">
1217
- <div class="media-layer">
1218
- <video part="video" playsinline></video>
1219
- <div part="ad-layer" class="hp:absolute hp:inset-0 hp:z-10 hp:hidden"></div>
1220
- </div>
1221
- </div>
1222
- `
1223
- );
1224
- class Se extends HTMLElement {
1225
- constructor() {
1226
- super();
1227
- i(this, "root");
1228
- i(this, "videoArea");
1229
- i(this, "videoEl");
1230
- i(this, "adLayerEl");
1231
- i(this, "chromeEl");
1232
- i(this, "centerPlayButton");
1233
- i(this, "captionRenderer");
1234
- /** options.miniProgress açıkken kurulur. */
1235
- i(this, "miniProgress", null);
1236
- i(this, "chromeVisible", !0);
1237
- i(this, "sourceManager");
1238
- i(this, "controlBar");
1239
- i(this, "tooltip");
1240
- i(this, "keyboard");
1241
- i(this, "loadingSpinner");
1242
- i(this, "errorScreen");
1243
- i(this, "adsController", null);
1244
- i(this, "gestureControls", null);
1245
- i(this, "loopSection", null);
1246
- i(this, "inViewAutoplay", null);
1247
- i(this, "unregisterSticky", null);
1248
- i(this, "playlistRunner", null);
1249
- i(this, "hopeStory", null);
1250
- i(this, "markProgress", null);
1251
- i(this, "segments", null);
1252
- i(this, "spriteThumbnails", null);
1253
- i(this, "countdownScreen", null);
1254
- i(this, "geoChecker", null);
1255
- i(this, "redirectScreen", null);
1256
- i(this, "qrResume", null);
1257
- i(this, "dubbing", null);
1258
- i(this, "liveWallClock", null);
1259
- i(this, "daiController", null);
1260
- i(this, "instanceKey");
1261
- i(this, "subtitleTracks", []);
1262
- /** `applyOptions()`'ta aktif bir altyazı track'i seçiliyken `true` — dil değişince Boyut/Konum görünümünü tazelemek için. */
1263
- i(this, "captionTrackActive", !1);
1264
- /**
1265
- * countdownScreen varken gerçek init (kaynak + içerik plugin'leri) ertelenir; en güncel options snapshot'ı.
1266
- * onComplete kaydı tek sefer yapılır (bkz. playbackInitRegistered) — init birden fazla kez tetiklenmesin.
1267
- */
1268
- i(this, "pendingPlaybackOptions", null);
1269
- i(this, "playbackInitRegistered", !1);
1270
- /**
1271
- * countdownScreen gibi alanlar yalnızca .options ile gelir. connectedCallback'teki ilk (options'suz) geçiş chrome'u
1272
- * bir an açıp player'ı gösteriyordu; 'boot' bloklayıcısı gerçek options gelene kadar bekletir.
1273
- */
1274
- i(this, "bootResolved", !1);
1275
- i(this, "bootGraceTimer", null);
1276
- i(this, "_options", {});
1277
- i(this, "hideTimer", null);
1278
- i(this, "autoHideDelayMs", O);
1279
- i(this, "tapCandidate", !1);
1280
- i(this, "tapStartX", 0);
1281
- i(this, "tapStartY", 0);
1282
- /** Tüm UI'ın paylaştığı tek, mutable sözlük — dil değişince referans değil alanlar güncellenir. */
1283
- i(this, "i18n", q("tr"));
1284
- /** IMA SDK'nın kendi ad-UI dili (skip butonu/sayaç metni) de aynı dili takip etsin diye — bkz. plugins/ads/AdsController. */
1285
- i(this, "localeCode", "tr");
1286
- /** Playlist panelinin monte edileceği, .video-area'nın ALTINDAKİ (shadow root içi) kapsayıcı — ilk ihtiyaçta oluşturulur. */
1287
- i(this, "panelContainer", null);
1288
- i(this, "onHlsLevelsChanged", (t, r) => {
1289
- if (t.length <= 1) return;
1290
- const s = (o) => `${o.height}p`;
1291
- this.controlBar.setQualities(
1292
- [
1293
- { label: this.i18n.autoQuality, onSelect: () => this.sourceManager.setLevel(-1) },
1294
- ...t.map((o) => ({ label: s(o), onSelect: () => this.sourceManager.setLevel(o.index) }))
1295
- ],
1296
- r === -1 ? this.i18n.autoQuality : s(t[r])
1297
- );
1298
- });
1299
- i(this, "onFullscreenChange", () => {
1300
- this.controlBar.setFullscreenState(this.isFullscreenActive());
1301
- });
1302
- // ── Oynatma durumuna göre merkez buton + otomatik gizlenme ──
1303
- // Değer: 'hidden' (tamamen gizle — countdown/geo) ya da 'reduced' (yalnızca oynat/duraklat + ses — ads).
1304
- i(this, "chromeBlockers", /* @__PURE__ */ new Map());
1305
- i(this, "onPlay", () => {
1306
- this.isChromeBlocked || (this.centerPlayButton.style.opacity = "0", this.centerPlayButton.style.pointerEvents = "none", this.scheduleAutoHide()), this.dispatchEvent(new CustomEvent("hp:play"));
1307
- });
1308
- i(this, "onPause", () => {
1309
- this.isChromeBlocked || (this.centerPlayButton.style.opacity = "1", this.centerPlayButton.style.pointerEvents = "auto", this.showChrome()), this.dispatchEvent(new CustomEvent("hp:pause"));
1310
- });
1311
- i(this, "onPointerDownFocus", () => {
1312
- var t;
1313
- this.focus(), (t = this.adsController) == null || t.initializeDisplayContainerOnce();
1314
- });
1315
- i(this, "onVideoPressStart", (t) => {
1316
- this.tapCandidate = !0;
1317
- const r = "touches" in t ? t.touches[0] : t;
1318
- r && (this.tapStartX = r.clientX, this.tapStartY = r.clientY);
1319
- });
1320
- i(this, "onVideoPressEnd", (t) => {
1321
- var s;
1322
- if (!this.tapCandidate || (this.tapCandidate = !1, this.isChromeBlocked) || (s = this.gestureControls) != null && s.isCurrentlyHolding()) return;
1323
- const r = "changedTouches" in t ? t.changedTouches[0] : t;
1324
- r && Math.hypot(r.clientX - this.tapStartX, r.clientY - this.tapStartY) > Ae || (this.videoEl.paused ? this.videoEl.play().catch(() => {
1325
- }) : this.videoEl.pause());
1326
- });
1327
- i(this, "onVideoPressCancel", () => {
1328
- this.tapCandidate = !1;
1329
- });
1330
- i(this, "scheduleAutoHide", () => {
1331
- this.showChrome(), this.hideTimer && clearTimeout(this.hideTimer), !this.videoEl.paused && (this.hideTimer = setTimeout(() => {
1332
- this.setChromeOpacity("0");
1333
- }, this.autoHideDelayMs));
1334
- });
1335
- we(), this.root = this.attachShadow({ mode: "open" });
1336
- const t = document.createElement("style");
1337
- t.textContent = X, this.root.appendChild(t);
1338
- const r = document.createElement("div");
1339
- r.innerHTML = Le, this.root.appendChild(r), this.videoArea = this.root.querySelector(".video-area"), this.videoEl = this.root.querySelector("video"), this.adLayerEl = this.root.querySelector('[part="ad-layer"]'), this.instanceKey = `hp-${Math.random().toString(36).slice(2, 10)}`, this.loadingSpinner = new ne(this.videoEl), this.root.querySelector(".media-layer").appendChild(this.loadingSpinner.el), this.errorScreen = new ae(this.videoEl, this.i18n), this.errorScreen.setOnRetry(() => this.videoEl.load()), this.root.querySelector(".media-layer").appendChild(this.errorScreen.el), this.centerPlayButton = document.createElement("button"), this.centerPlayButton.type = "button", this.centerPlayButton.setAttribute("part", "center-play-button"), this.centerPlayButton.setAttribute("aria-label", this.i18n.play), this.centerPlayButton.className = "hp:absolute hp:inset-0 hp:flex hp:items-center hp:justify-center hp:bg-transparent hp:border-0 hp:cursor-pointer hp:text-on-surface hp:transition-opacity";
1340
- const s = document.createElement("span");
1341
- s.className = "hp-chip hp:flex hp:items-center hp:justify-center hp:w-16 hp:h-16", s.style.borderRadius = "9999px", s.appendChild(v("play", "hp:text-2xl")), this.centerPlayButton.appendChild(s), this.centerPlayButton.addEventListener("click", () => {
1342
- this.videoEl.paused && this.videoEl.play();
1343
- }), this.videoArea.appendChild(this.centerPlayButton), this.chromeEl = document.createElement("div"), this.chromeEl.className = "hp:absolute hp:inset-0 hp:z-20 hp:pointer-events-none", this.videoArea.appendChild(this.chromeEl), this.sourceManager = new W(this.videoEl, this.onHlsLevelsChanged), this.controlBar = new J(
1344
- this.videoEl,
1345
- Ce,
1346
- {
1347
- onRequestFullscreen: () => this.requestFullscreenCompat(),
1348
- onExitFullscreen: () => this.exitFullscreenCompat(),
1349
- isFullscreen: () => this.isFullscreenActive(),
1350
- // adsController sonradan kurulur — closure'lar her çağrıda güncel this.adsController'ı okur.
1351
- isAdActive: () => this.isAdPlaying(),
1352
- adTogglePlay: () => {
1353
- var o;
1354
- return (o = this.adsController) == null ? void 0 : o.toggleAdPlayPause();
1355
- },
1356
- adIsPaused: () => {
1357
- var o;
1358
- return ((o = this.adsController) == null ? void 0 : o.isAdPaused()) ?? !0;
1359
- },
1360
- adVolume: {
1361
- isAdActive: () => this.isAdPlaying(),
1362
- getVolume: () => {
1363
- var o;
1364
- return ((o = this.adsController) == null ? void 0 : o.getAdVolume()) ?? 1;
1365
- },
1366
- setVolume: (o) => {
1367
- var l;
1368
- return (l = this.adsController) == null ? void 0 : l.setAdVolume(o);
1369
- },
1370
- toggleMute: () => {
1371
- var o;
1372
- return (o = this.adsController) == null ? void 0 : o.toggleAdMute();
1373
- }
1374
- }
1375
- },
1376
- this.i18n
1377
- ), this.chromeEl.appendChild(this.controlBar.el), this.chromeEl.appendChild(this.controlBar.topEl), this.videoArea.appendChild(this.controlBar.volumePanel.unmuteBadge), this.captionRenderer = new k(this.videoEl, this.videoArea, this.controlBar.seekBar.el, this.i18n), this.videoArea.appendChild(this.captionRenderer.layerEl), this.keyboard = new oe(
1378
- this,
1379
- this.videoEl,
1380
- () => this.isFullscreenActive() ? this.exitFullscreenCompat() : this.requestFullscreenCompat()
1381
- ), this.tooltip = new se(this.videoArea), this.blockChrome("boot");
1382
- }
1383
- static get observedAttributes() {
1384
- return ["src", "poster", "autoplay", "muted", "loop", "theme", "locale"];
1385
- }
1386
- connectedCallback() {
1387
- this.tabIndex = this.tabIndex || 0, this.syncFromAttributes(), this.bootResolved || (this.bootGraceTimer = setTimeout(() => {
1388
- this.bootGraceTimer = null, this.bootResolved || (this.bootResolved = !0, this.syncFromAttributes());
1389
- }, 80)), this.videoEl.addEventListener("play", this.onPlay), this.videoEl.addEventListener("pause", this.onPause), this.addEventListener("pointermove", this.scheduleAutoHide), this.addEventListener("pointerdown", this.onPointerDownFocus), document.addEventListener("fullscreenchange", this.onFullscreenChange), this.videoEl.addEventListener("mousedown", this.onVideoPressStart), this.videoEl.addEventListener("mouseup", this.onVideoPressEnd), this.videoEl.addEventListener("mouseleave", this.onVideoPressCancel), this.videoEl.addEventListener("touchstart", this.onVideoPressStart, { passive: !0 }), this.videoEl.addEventListener("touchend", this.onVideoPressEnd), this.videoEl.addEventListener("touchcancel", this.onVideoPressCancel), this.dispatchEvent(new CustomEvent("hp:ready"));
1390
- }
1391
- disconnectedCallback() {
1392
- var t, r, s, o, l, c, n, h, p, d, u, g, b, f, m, S, T, P;
1393
- (t = this.miniProgress) == null || t.destroy(), this.miniProgress = null, this.videoEl.removeEventListener("play", this.onPlay), this.videoEl.removeEventListener("pause", this.onPause), this.removeEventListener("pointermove", this.scheduleAutoHide), this.removeEventListener("pointerdown", this.onPointerDownFocus), document.removeEventListener("fullscreenchange", this.onFullscreenChange), this.videoEl.removeEventListener("mousedown", this.onVideoPressStart), this.videoEl.removeEventListener("mouseup", this.onVideoPressEnd), this.videoEl.removeEventListener("mouseleave", this.onVideoPressCancel), this.videoEl.removeEventListener("touchstart", this.onVideoPressStart), this.videoEl.removeEventListener("touchend", this.onVideoPressEnd), this.videoEl.removeEventListener("touchcancel", this.onVideoPressCancel), this.controlBar.destroy(), this.captionRenderer.destroy(), this.keyboard.destroy(), this.tooltip.destroy(), this.loadingSpinner.destroy(), this.errorScreen.destroy(), this.sourceManager.destroy(), (r = this.adsController) == null || r.destroy(), (s = this.gestureControls) == null || s.destroy(), (o = this.loopSection) == null || o.destroy(), (l = this.inViewAutoplay) == null || l.destroy(), (c = this.unregisterSticky) == null || c.call(this), (n = this.playlistRunner) == null || n.destroy(), (h = this.hopeStory) == null || h.destroy(), (p = this.markProgress) == null || p.destroy(), (d = this.segments) == null || d.destroy(), (u = this.spriteThumbnails) == null || u.destroy(), (g = this.countdownScreen) == null || g.destroy(), (b = this.geoChecker) == null || b.destroy(), (f = this.redirectScreen) == null || f.destroy(), (m = this.qrResume) == null || m.destroy(), (S = this.dubbing) == null || S.destroy(), (T = this.liveWallClock) == null || T.destroy(), (P = this.daiController) == null || P.destroy(), this.hideTimer && clearTimeout(this.hideTimer), this.bootGraceTimer && clearTimeout(this.bootGraceTimer);
1394
- }
1395
- /** Reklam/consent-farkında plugin'lerin (gesture/sticky/in-view-autoplay) ortak sorgusu. */
1396
- isAdPlaying() {
1397
- return this.chromeBlockers.has("ads");
1398
- }
1399
- attributeChangedCallback() {
1400
- this.syncFromAttributes();
1401
- }
1402
- get options() {
1403
- return this._options;
1404
- }
1405
- set options(t) {
1406
- this._options = t ?? {}, this.bootGraceTimer && (clearTimeout(this.bootGraceTimer), this.bootGraceTimer = null), this.bootResolved = !0, this.syncFromAttributes();
1407
- }
1408
- play() {
1409
- return this.videoEl.play();
1410
- }
1411
- pause() {
1412
- this.videoEl.pause();
1413
- }
1414
- /** `options.qrResume` kuruluysa "telefonundan devam et" QR ekranını manuel göster (ör. entegratörün kendi "telefona gönder" butonu) — otomatik gösterim kuralları (minElapsed/minRemaining) burada uygulanmaz. */
1415
- showQrResume() {
1416
- var t;
1417
- (t = this.qrResume) == null || t.show();
1418
- }
1419
- get showRemainingTime() {
1420
- return this.controlBar.getShowRemaining();
1421
- }
1422
- set showRemainingTime(t) {
1423
- this.controlBar.setShowRemaining(t);
1424
- }
1425
- toggleTimeDisplay() {
1426
- this.controlBar.toggleTimeMode();
1427
- }
1428
- syncFromAttributes() {
1429
- const t = {
1430
- src: this.getAttribute("src") ?? void 0,
1431
- poster: this.getAttribute("poster") ?? void 0,
1432
- autoplay: this.hasAttribute("autoplay"),
1433
- muted: this.hasAttribute("muted"),
1434
- loop: this.hasAttribute("loop"),
1435
- theme: this.getAttribute("theme") ?? void 0,
1436
- locale: this.getAttribute("locale") ?? void 0
1437
- };
1438
- this.applyOptions({ ...t, ...this._options });
1439
- }
1440
- async applyOptions(t) {
1441
- var s, o, l, c, n, h, p, d, u, g, b, f;
1442
- if (t.poster && (this.videoEl.poster = t.poster), this.videoEl.autoplay = !!t.autoplay, this.videoEl.muted = !!t.muted, this.videoEl.loop = !!t.loop, this.autoHideDelayMs = t.autoHideDelayMs ?? O, t.miniProgress && !this.miniProgress ? (this.miniProgress = new fe(this.videoEl), this.videoArea.appendChild(this.miniProgress.el), this.updateMiniProgress()) : !t.miniProgress && this.miniProgress && (this.miniProgress.destroy(), this.miniProgress = null), t.showRemainingTime !== void 0 && this.controlBar.setShowRemaining(t.showRemainingTime), t.theme ? this.setAttribute("data-theme", t.theme) : this.removeAttribute("data-theme"), this.localeCode = t.locale ?? "tr", Ee(this.i18n, t.locale, t.labels), this.centerPlayButton.setAttribute("aria-label", this.i18n.play), this.controlBar.refreshLabels(), this.captionRenderer.refreshLabels(this.i18n), this.captionTrackActive && this.controlBar.settingsMenu.setCaptionAppearance(this.buildCaptionAppearance()), this.errorScreen.refreshLabels(), (s = this.playlistRunner) == null || s.refreshLabels(), (o = this.hopeStory) == null || o.refreshLabels(), (l = this.countdownScreen) == null || l.refreshLabels(), (c = this.geoChecker) == null || c.refreshLabels(), (n = this.redirectScreen) == null || n.refreshLabels(), (h = this.qrResume) == null || h.refreshLabels(), (p = this.dubbing) == null || p.refreshLabels(), (d = this.liveWallClock) == null || d.refreshLabels(), (u = this.loopSection) == null || u.refreshLabels(), (g = this.markProgress) == null || g.refreshLabels(), (f = (b = this.unregisterSticky) == null ? void 0 : b.refreshLabels) == null || f.call(b), !this.bootResolved)
1443
- return;
1444
- const r = () => ({
1445
- videoEl: this.videoEl,
1446
- overlayContainerEl: this.videoArea,
1447
- blockChrome: () => this.blockChrome("countdown-geo"),
1448
- unblockChrome: () => this.unblockChrome("countdown-geo"),
1449
- i18n: this.i18n
1450
- });
1451
- if (t.countdownScreen && !this.countdownScreen) {
1452
- const { installCountdownScreen: m } = await import("./index-rENB3n9O.js");
1453
- this.countdownScreen = m(r(), t.countdownScreen);
1454
- }
1455
- if (t.geoChecker && !this.geoChecker) {
1456
- const { installGeoChecker: m } = await import("./index-BBmuCtKu.js");
1457
- this.geoChecker = m(r(), t.geoChecker);
1458
- }
1459
- this.unblockChrome("boot"), this.countdownScreen && !this.countdownScreen.isComplete() ? (this.pendingPlaybackOptions = t, this.playbackInitRegistered || (this.playbackInitRegistered = !0, this.countdownScreen.onComplete(() => {
1460
- const m = this.pendingPlaybackOptions;
1461
- this.pendingPlaybackOptions = null, m && this.initPlayback(m);
1462
- }))) : await this.initPlayback(t);
1463
- }
1464
- async initPlayback(t) {
1465
- var s, o, l, c;
1466
- const r = (s = t.sources) != null && s.length ? t.sources : t.src ? [{ src: t.src, label: this.i18n.autoQuality }] : [];
1467
- if (r.length > 0) {
1468
- const n = r.find((h) => h.selected) ?? r[0];
1469
- await this.sourceManager.load(n.src, n.type), t.autoplay && this.videoEl.play().catch(() => {
1470
- });
1471
- }
1472
- if (r.length > 1 && this.controlBar.setQualities(
1473
- r.map((n) => ({
1474
- label: n.label,
1475
- onSelect: () => void this.switchQualitySource(n)
1476
- })),
1477
- ((o = r.find((n) => n.selected)) == null ? void 0 : o.label) ?? r[0].label
1478
- ), t.ads && !this.adsController) {
1479
- const n = t.ads === !0 ? {} : t.ads, { installAds: h } = await import("./index-glxDu2eJ.js");
1480
- this.adsController = await h(
1481
- {
1482
- videoEl: this.videoEl,
1483
- hostEl: this,
1484
- adLayerEl: this.adLayerEl,
1485
- hideChrome: () => this.blockChrome("ads", "reduced"),
1486
- showChrome: () => this.unblockChrome("ads"),
1487
- // IMA'nın KENDİ UI'ı üzerinden (ör. reklam video'suna
1488
- // tıklama) duraklatılır/devam ettirilirse toolbar'ımızın
1489
- // ikonu da senkron kalsın diye.
1490
- onAdPlayStateChange: () => this.controlBar.refreshAdPlayState(),
1491
- locale: this.localeCode
1492
- },
1493
- n
1494
- );
1495
- }
1496
- if (t.gesture && !this.gestureControls) {
1497
- const n = t.gesture === !0 ? {} : t.gesture, { installGesture: h } = await import("./index-Ca8hocby.js");
1498
- this.gestureControls = h(
1499
- { videoEl: this.videoEl, overlayContainerEl: this.videoArea, isAdActive: () => this.isAdPlaying() },
1500
- n
1501
- );
1502
- }
1503
- if (t.loopSection && !this.loopSection) {
1504
- const n = t.loopSection === !0 ? {} : t.loopSection, { installLoopSection: h } = await import("./index-f0vSgRIK.js");
1505
- this.loopSection = h(
1506
- {
1507
- videoEl: this.videoEl,
1508
- seekBarEl: this.controlBar.seekBar.el,
1509
- markers: this.controlBar.seekBar,
1510
- addControlButton: (p, d, u) => this.controlBar.addButton(p, d, u),
1511
- i18n: this.i18n
1512
- },
1513
- n
1514
- );
1515
- }
1516
- if (t.inViewAutoplay && !this.inViewAutoplay) {
1517
- const n = t.inViewAutoplay === !0 ? {} : t.inViewAutoplay, { installInViewAutoplay: h } = await import("./index-3QALpwsf.js");
1518
- this.inViewAutoplay = h(
1519
- { videoEl: this.videoEl, observeEl: this, isAdActive: () => this.isAdPlaying() },
1520
- n
1521
- );
1522
- }
1523
- if (t.sticky && !this.unregisterSticky) {
1524
- const n = t.sticky === !0 ? {} : t.sticky, { installSticky: h } = await import("./index-CDDke5rz.js");
1525
- this.unregisterSticky = h(
1526
- {
1527
- key: this.instanceKey,
1528
- videoEl: this.videoEl,
1529
- hostEl: this,
1530
- wrapperEl: this,
1531
- closeButtonMountEl: this.videoArea,
1532
- isAdActive: () => this.isAdPlaying(),
1533
- i18n: this.i18n
1534
- },
1535
- n
1536
- );
1537
- }
1538
- if (t.playlist && !this.playlistRunner) {
1539
- const { installPlaylist: n } = await import("./index-CEmsL1uT.js");
1540
- this.playlistRunner = n(
1541
- {
1542
- videoEl: this.videoEl,
1543
- hostEl: this,
1544
- panelEl: this.getOrCreatePanelContainer(),
1545
- loadSource: (h, p) => this.sourceManager.load(h, p),
1546
- setPoster: (h) => {
1547
- this.videoEl.poster = h;
1548
- },
1549
- requestFreshAd: (h) => {
1550
- var p;
1551
- return (p = this.adsController) == null ? void 0 : p.resetForNewItem(h);
1552
- },
1553
- i18n: this.i18n
1554
- },
1555
- t.playlist
1556
- );
1557
- }
1558
- if (t.story && !this.hopeStory) {
1559
- const { installStory: n } = await import("./index-DadIEuQc.js");
1560
- this.hopeStory = n(
1561
- {
1562
- videoEl: this.videoEl,
1563
- hostEl: this,
1564
- videoAreaEl: this.videoArea,
1565
- playerBodyEls: [this.root.querySelector(".media-layer"), this.chromeEl, this.centerPlayButton],
1566
- loadSource: (h, p) => this.sourceManager.load(h, p),
1567
- setPoster: (h) => {
1568
- this.videoEl.poster = h;
1569
- },
1570
- requestFreshAd: (h) => {
1571
- var p;
1572
- return (p = this.adsController) == null ? void 0 : p.resetForNewItem(h);
1573
- },
1574
- i18n: this.i18n
1575
- },
1576
- t.story
1577
- );
1578
- }
1579
- if (t.markers && !this.markProgress) {
1580
- const { installMarkers: n } = await import("./index-lrAXde76.js");
1581
- this.markProgress = n(
1582
- {
1583
- videoEl: this.videoEl,
1584
- overlayContainerEl: this.videoArea,
1585
- addSeekBarMarker: (h, p) => this.controlBar.seekBar.addMarker(h, p),
1586
- i18n: this.i18n
1587
- },
1588
- t.markers
1589
- );
1590
- }
1591
- if ((l = t.segments) != null && l.length && !this.segments) {
1592
- const { installSegments: n } = await import("./index-CZK3TwzR.js");
1593
- this.segments = n({ videoEl: this.videoEl, seekBar: this.controlBar.seekBar }, t.segments);
1594
- }
1595
- if (t.spriteThumbnails && !this.spriteThumbnails) {
1596
- const { installSpriteThumbnails: n } = await import("./index-BR31cEYA.js");
1597
- this.spriteThumbnails = n(
1598
- {
1599
- videoEl: this.videoEl,
1600
- seekBar: this.controlBar.seekBar,
1601
- playerWidth: () => this.videoArea.clientWidth
1602
- },
1603
- t.spriteThumbnails
1604
- );
1605
- }
1606
- if (t.redirectScreen && !this.redirectScreen) {
1607
- const { installRedirectScreen: n } = await import("./index-D6r-BGAV.js");
1608
- this.redirectScreen = n(
1609
- { videoEl: this.videoEl, overlayContainerEl: this.videoArea, isAdActive: () => this.isAdPlaying(), i18n: this.i18n },
1610
- t.redirectScreen
1611
- );
1612
- }
1613
- if (t.qrResume && !this.qrResume) {
1614
- const { installQrResume: n } = await import("./index-DT8-oMPm.js");
1615
- this.qrResume = n({ videoEl: this.videoEl, overlayContainerEl: this.videoArea, i18n: this.i18n }, t.qrResume);
1616
- }
1617
- if (this.qrResume) {
1618
- const n = this.qrResume;
1619
- this.controlBar.settingsMenu.setQrResumeToggle({
1620
- label: this.i18n.qrResumeMenuLabel,
1621
- getValueLabel: () => n.isEnabled() ? this.i18n.qrResumeOn : this.i18n.qrResumeOff,
1622
- onToggle: () => n.setEnabled(!n.isEnabled())
1623
- });
1624
- }
1625
- if (t.dubbing && !this.dubbing) {
1626
- const { installDubbing: n } = await import("./index-DXWK4EFa.js");
1627
- this.dubbing = n(
1628
- {
1629
- videoEl: this.videoEl,
1630
- loadSource: (h, p) => this.sourceManager.load(h, p),
1631
- registerSubmenu: (h) => this.controlBar.settingsMenu.registerSubmenu(h),
1632
- unregisterSubmenu: (h) => this.controlBar.settingsMenu.unregisterSubmenu(h),
1633
- i18n: this.i18n
1634
- },
1635
- t.dubbing
1636
- );
1637
- }
1638
- if (t.liveWallClock && !this.liveWallClock) {
1639
- const n = t.liveWallClock === !0 ? {} : t.liveWallClock, { installLiveWallClock: h } = await import("./index-Z7Jmls0c.js");
1640
- this.liveWallClock = h(
1641
- {
1642
- videoEl: this.videoEl,
1643
- seekBarEl: this.controlBar.seekBar.el,
1644
- addControlElement: (p) => this.controlBar.addElement(p),
1645
- i18n: this.i18n
1646
- },
1647
- n
1648
- );
1649
- }
1650
- if (t.dai && !this.daiController) {
1651
- const { installDai: n } = await import("./index-Q8FMOHj0.js");
1652
- this.daiController = await n(
1653
- {
1654
- videoEl: this.videoEl,
1655
- hostEl: this,
1656
- adUiEl: this.adLayerEl,
1657
- loadStreamUrl: (h) => this.sourceManager.load(h),
1658
- disableSeeking: () => this.disableSeeking(),
1659
- enableSeeking: () => this.enableSeeking()
1660
- },
1661
- t.dai
1662
- );
1663
- }
1664
- if ((c = t.subtitles) != null && c.length) {
1665
- this.subtitleTracks = le(this.videoEl, t.subtitles);
1666
- const n = t.subtitles.find((p) => p.default), h = (p) => {
1667
- const d = he(this.subtitleTracks, p);
1668
- this.captionRenderer.setActiveTrack(d), this.captionTrackActive = d !== null, this.controlBar.settingsMenu.setCaptionAppearance(d !== null ? this.buildCaptionAppearance() : null);
1669
- };
1670
- this.controlBar.setCaptions(
1671
- [
1672
- { label: this.i18n.captionsOff, onSelect: () => h(null) },
1673
- ...this.subtitleTracks.map(({ label: p }) => ({
1674
- label: p,
1675
- onSelect: () => h(p)
1676
- }))
1677
- ],
1678
- (n == null ? void 0 : n.label) ?? this.i18n.captionsOff
1679
- ), h((n == null ? void 0 : n.label) ?? null);
1680
- } else
1681
- this.captionRenderer.setActiveTrack(null), this.captionTrackActive = !1, this.controlBar.settingsMenu.setCaptionAppearance(null);
1682
- }
1683
- /** Ayarlar menüsünün "Altyazı" alt menüsüne eklenen Boyut/Renk/Konum satırları — her zaman GÜNCEL `this.i18n`'i okur (dil sonradan değişse bile). */
1684
- buildCaptionAppearance() {
1685
- const t = ["small", "normal", "large"], r = (s, o, l, c) => s.map((n, h) => ({
1686
- value: n,
1687
- active: o() === n,
1688
- ariaLabel: `${c} ${h + 1}`,
1689
- onSelect: () => l(n)
1690
- }));
1691
- return {
1692
- sizeLabel: this.i18n.captionSize,
1693
- getSizeOptions: () => t.map((s) => ({
1694
- label: s === "small" ? this.i18n.captionSizeSmall : s === "large" ? this.i18n.captionSizeLarge : this.i18n.captionSizeNormal,
1695
- active: this.captionRenderer.getFontSize() === s,
1696
- onSelect: () => this.captionRenderer.setFontSize(s)
1697
- })),
1698
- bgColorLabel: this.i18n.captionBgColor,
1699
- getBgColorOptions: () => r(
1700
- k.BG_COLOR_PRESETS,
1701
- () => this.captionRenderer.getBgColor(),
1702
- (s) => this.captionRenderer.setBgColor(s),
1703
- this.i18n.captionBgColor
1704
- ),
1705
- textColorLabel: this.i18n.captionTextColor,
1706
- getTextColorOptions: () => r(
1707
- k.TEXT_COLOR_PRESETS,
1708
- () => this.captionRenderer.getTextColor(),
1709
- (s) => this.captionRenderer.setTextColor(s),
1710
- this.i18n.captionTextColor
1711
- ),
1712
- resetPositionLabel: this.i18n.captionResetPosition,
1713
- onResetPosition: () => this.captionRenderer.resetPosition()
1714
- };
1715
- }
1716
- getOrCreatePanelContainer() {
1717
- return this.panelContainer || (this.panelContainer = document.createElement("div"), this.root.appendChild(this.panelContainer)), this.panelContainer;
1718
- }
1719
- /** Kalite değişirken oynatma konumunu ve play/pause durumunu korur. */
1720
- async switchQualitySource(t) {
1721
- const r = this.videoEl.currentTime, s = !this.videoEl.paused;
1722
- await this.sourceManager.load(t.src, t.type), this.videoEl.currentTime = r, s && this.videoEl.play().catch(() => {
1723
- }), this.dispatchEvent(new CustomEvent("hp:qualitychange", { detail: { label: t.label } }));
1724
- }
1725
- // ── Fullscreen (vendor-prefix uyumlu) ───────────────────────────────
1726
- requestFullscreenCompat() {
1727
- const t = this;
1728
- t.requestFullscreen ? t.requestFullscreen() : t.webkitRequestFullscreen && t.webkitRequestFullscreen();
1729
- }
1730
- exitFullscreenCompat() {
1731
- const t = document;
1732
- document.exitFullscreen ? document.exitFullscreen() : t.webkitExitFullscreen && t.webkitExitFullscreen();
1733
- }
1734
- isFullscreenActive() {
1735
- return document.fullscreenElement === this;
1736
- }
1737
- get isChromeBlocked() {
1738
- return this.chromeBlockers.size > 0;
1739
- }
1740
- get isChromeFullyHidden() {
1741
- for (const t of this.chromeBlockers.values()) if (t === "hidden") return !0;
1742
- return !1;
1743
- }
1744
- showChrome() {
1745
- this.setChromeOpacity("1");
1746
- }
1747
- /** Chrome görünürlüğünün tek giriş noktası — altyazı da haberdar olur (kontroller gizlenince en alta iner). */
1748
- setChromeOpacity(t) {
1749
- var r;
1750
- this.chromeEl.style.opacity = t, this.chromeVisible = t === "1", (r = this.captionRenderer) == null || r.setChromeVisible(this.chromeVisible), this.updateMiniProgress();
1751
- }
1752
- /** İnce ilerleme çizgisi: yalnızca kontroller gizliyken; reklam/giriş ekranı (chrome bloklu) sırasında değil. */
1753
- updateMiniProgress() {
1754
- var t;
1755
- (t = this.miniProgress) == null || t.setVisible(!this.chromeVisible && !this.isChromeBlocked);
1756
- }
1757
- /**
1758
- * Plugin (ads/countdown/geo) chrome'u kendi key'iyle gizler; unblockChrome aynı key'le açar.
1759
- * 'reduced' (ads): yalnızca oynat/duraklat + ses kalır. Merkez buton her modda gizli.
1760
- */
1761
- blockChrome(t, r = "hidden") {
1762
- this.chromeBlockers.set(t, r), this.updateMiniProgress(), this.hideTimer && clearTimeout(this.hideTimer), this.centerPlayButton.style.opacity = "0", this.centerPlayButton.style.pointerEvents = "none", this.isChromeFullyHidden ? (this.setChromeOpacity("0"), this.chromeEl.style.pointerEvents = "none") : this.setChromeOpacity("1"), this.controlBar.setAdMode(this.chromeBlockers.get("ads") === "reduced");
1763
- }
1764
- /** Bloklayan plugin işini bitirince çağırır — başka bir blocker hâlâ aktifse chrome açılmaz. */
1765
- unblockChrome(t) {
1766
- if (this.chromeBlockers.delete(t), this.updateMiniProgress(), this.controlBar.setAdMode(this.chromeBlockers.get("ads") === "reduced"), this.isChromeBlocked) {
1767
- this.isChromeFullyHidden ? (this.setChromeOpacity("0"), this.chromeEl.style.pointerEvents = "none") : (this.setChromeOpacity("1"), this.chromeEl.style.pointerEvents = "");
1768
- return;
1769
- }
1770
- this.chromeEl.style.pointerEvents = "", this.videoEl.paused ? (this.centerPlayButton.style.opacity = "1", this.centerPlayButton.style.pointerEvents = "auto", this.showChrome()) : this.scheduleAutoHide();
1771
- }
1772
- /** DAI reklam arası boyunca kullanıcı reklamın İÇİNE seek edemesin diye (sunucu taraflı eklenen reklamlar seekable aralığın parçası). */
1773
- disableSeeking() {
1774
- this.controlBar.seekBar.el.style.pointerEvents = "none", this.controlBar.seekBar.el.style.opacity = "0.5";
1775
- }
1776
- enableSeeking() {
1777
- this.controlBar.seekBar.el.style.pointerEvents = "", this.controlBar.seekBar.el.style.opacity = "";
1778
- }
1779
- }
1780
- typeof window < "u" && !customElements.get("hope-player") && customElements.define("hope-player", Se);
1781
- export {
1782
- Se as H,
1783
- v as c,
1784
- y as f
1785
- };
1786
- //# sourceMappingURL=index-BjmWoP4E.js.map