@hopeplayer/core 1.0.1 → 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-DXf2Al1x.js → index-C6xzBfNn.js} +2 -2
  6. package/dist/chunks/{index-DXf2Al1x.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-BFgqg05L.js → index-CgkX9qaH.js} +2 -2
  10. package/dist/chunks/{index-BFgqg05L.js.map → index-CgkX9qaH.js.map} +1 -1
  11. package/dist/chunks/{index-CQqGn9as.js → index-IcJCsJYH.js} +2 -2
  12. package/dist/chunks/{index-CQqGn9as.js.map → index-IcJCsJYH.js.map} +1 -1
  13. package/dist/chunks/{index-q5DsrT-Q.js → index-TQsycon_.js} +2 -2
  14. package/dist/chunks/{index-q5DsrT-Q.js.map → index-TQsycon_.js.map} +1 -1
  15. package/dist/chunks/{index-B4ujPVcl.js → index-Xf3PnlMU.js} +2 -2
  16. package/dist/chunks/{index-B4ujPVcl.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 +28 -2
  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-DiCkShCE.js +0 -1776
  45. package/dist/chunks/index-DiCkShCE.js.map +0 -1
@@ -0,0 +1,2007 @@
1
+ var Z = Object.defineProperty;
2
+ var J = (n, e, t) => e in n ? Z(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var r = (n, e, t) => J(n, typeof e != "symbol" ? e + "" : e, t);
4
+ const ee = '/*! 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-font-weight-medium:500;--hp-font-weight-semibold:600;--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\\: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-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\\: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-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}:host(:fullscreen),:host(:-webkit-full-screen){background:#000;border-radius:0}:host(:fullscreen) .hp-root,:host(:-webkit-full-screen) .hp-root{height:100%}:host(:fullscreen) .video-area,:host(:-webkit-full-screen) .video-area{aspect-ratio:auto;background:#000;border-radius:0;width:100%;height:100%}:host(:fullscreen) .video-area[data-story],:host(:-webkit-full-screen) .video-area[data-story]{aspect-ratio:9/16;width:auto;max-width:100%;height:100%;max-height:none;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-chip-panel[data-drop]{margin-top:8px;margin-bottom:0;top:100%;bottom:auto}.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-error-screen{z-index:30;background:var(--hp-color-surface);justify-content:center;align-items:center;padding:12px;display:none;position:absolute;top:0;right:0;bottom:0;left:0}@supports (color:color-mix(in lab,red,red)){.hp-error-screen{background:color-mix(in srgb,var(--hp-color-surface) 94%,transparent)}}.hp-error-screen{-webkit-backdrop-filter:blur(16px)saturate(140%);color:var(--hp-color-on-surface);text-align:center;container-type:size}.hp-error-screen[data-visible]{animation:.22s hp-error-in;display:flex}@keyframes hp-error-in{0%{opacity:0}}.hp-error-card{flex-direction:column;align-items:center;gap:10px;max-width:340px;display:flex}.hp-error-icon{border:1px solid var(--hp-color-on-surface);border-radius:9999px;place-items:center;width:48px;height:48px;display:grid}@supports (color:color-mix(in lab,red,red)){.hp-error-icon{border:1px solid color-mix(in srgb,var(--hp-color-on-surface) 18%,transparent)}}.hp-error-icon{background:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp-error-icon{background:color-mix(in srgb,var(--hp-color-on-surface) 8%,transparent)}}.hp-error-icon{margin-bottom:2px;font-size:22px}.hp-error-message{margin:0;font-size:14px;font-weight:600;line-height:1.45}.hp-error-code{color:var(--hp-color-on-surface-muted);font-variant-numeric:tabular-nums;margin:-4px 0 0;font-size:12px}.hp-error-retry{border:1px solid var(--hp-chip-border);background:var(--hp-chip-bg);color:var(--hp-color-on-surface);font:inherit;cursor:pointer;border-radius:9999px;align-items:center;gap:6px;margin-top:6px;padding:7px 14px 7px 12px;font-size:13px;font-weight:600;transition:background-color .15s,border-color .15s;display:inline-flex}.hp-error-retry:hover{background:var(--hp-chip-bg-hover);border-color:var(--hp-chip-border-hover)}.hp-error-retry:focus-visible{outline:2px solid var(--hp-color-accent);outline-offset:2px}@container (max-height:240px){.hp-error-card{gap:6px}.hp-error-icon{width:36px;height:36px;margin-bottom:0;font-size:16px}.hp-error-message{font-size:13px}.hp-error-code{margin-top:-2px;font-size:11px}.hp-error-retry{margin-top:2px;padding:5px 12px 5px 10px;font-size:12px}}.video-area[data-pause-ad-ready]>:is(.media-layer,.hp-chrome,.hp-center-play,.hp-caption-layer,.hp-error-screen,.hp-mini-progress){right:var(--hp-pause-ad-w,0px);transition:right .38s cubic-bezier(.2,.8,.2,1),opacity .2s}.video-area[data-pause-ad] .media-layer video{object-fit:cover}.hp-pause-ad{z-index:25;width:var(--hp-pause-ad-panel-w,332px);box-sizing:border-box;background:var(--hp-color-surface,#0a0a0a);color:var(--hp-color-on-surface,#fff);visibility:hidden;flex-direction:column;justify-content:center;gap:10px;padding:12px 16px;transition:transform .38s cubic-bezier(.2,.8,.2,1),visibility 0s linear .38s;display:flex;position:absolute;top:0;bottom:0;right:0;transform:translate(100%)}.hp-pause-ad[data-open]{visibility:visible;transition:transform .38s cubic-bezier(.2,.8,.2,1);transform:none}.hp-pause-ad-header{justify-content:space-between;align-items:center;gap:8px;display:flex}.hp-pause-ad-label{color:var(--hp-color-on-surface-muted,#ffffffb3);font-size:13px;font-weight:600}.hp-pause-ad-close{width:28px;height:28px;color:var(--hp-color-on-surface,#fff);cursor:pointer;background:0 0;border:0;border-radius:9999px;justify-content:center;align-items:center;padding:0;transition:background-color .15s;display:inline-flex}.hp-pause-ad-close:hover{background:var(--hp-chip-bg-hover)}.hp-pause-ad-body{border-radius:8px;justify-content:center;display:flex;overflow:hidden}.hp-pause-ad-resume{border:1px solid var(--hp-chip-border);background:var(--hp-chip-bg);color:var(--hp-color-on-surface,#fff);font:inherit;cursor:pointer;border-radius:9999px;align-self:stretch;padding:9px 14px;font-size:13px;font-weight:600;transition:background-color .15s,border-color .15s}.hp-pause-ad-resume:hover{background:var(--hp-chip-bg-hover);border-color:var(--hp-chip-border-hover)}.hp-pause-ad-close:focus-visible,.hp-pause-ad-resume:focus-visible{outline:2px solid var(--hp-color-accent);outline-offset:2px}@media(prefers-reduced-motion:reduce){.video-area[data-pause-ad-ready]>:is(.media-layer,.hp-chrome,.hp-center-play,.hp-caption-layer,.hp-error-screen,.hp-mini-progress),.hp-pause-ad,.hp-pause-ad[data-open]{transition:none}}.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 I() {
6
+ if (typeof navigator > "u") return !1;
7
+ const n = navigator.userAgent, e = /iP(hone|od|ad)/.test(n) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1, t = /^((?!chrome|chromium|android|crios|fxios|edg|opr).)*safari/i.test(n);
8
+ return e || t;
9
+ }
10
+ function F() {
11
+ const n = window;
12
+ return typeof n.MediaSource < "u" || typeof n.ManagedMediaSource < "u";
13
+ }
14
+ function te(n, e) {
15
+ var i;
16
+ const t = (i = e == null ? void 0 : e.split(";")[0]) == null ? void 0 : i.trim().toLowerCase();
17
+ return t === "application/vnd.apple.mpegurl" || t === "application/x-mpegurl" || /\.m3u8(?:$|[?#])/i.test(n) ? "hls" : t === "video/mp4" || /\.mp4(?:$|[?#])/i.test(n) ? "mp4" : "unknown";
18
+ }
19
+ class ie {
20
+ constructor(e, t) {
21
+ r(this, "hls", null);
22
+ r(this, "video");
23
+ /** Son yüklenen kaynak — `reload()` (hata ekranındaki "Tekrar dene") için. */
24
+ r(this, "last", null);
25
+ /** Native HLS denemesi sürerken (ilk loadedmetadata'ya kadar) — başarısız olursa hls.js'e geçilir. */
26
+ r(this, "nativeHlsProbe", null);
27
+ r(this, "engineInfo", { engine: "native" });
28
+ r(this, "onLevelsChanged");
29
+ this.video = e, this.onLevelsChanged = t;
30
+ }
31
+ async load(e, t) {
32
+ this.last = { src: e, type: t }, this.destroy(), this.video.pause();
33
+ const i = te(e, t);
34
+ if (this.onLevelsChanged([], -1), i !== "hls") {
35
+ this.engineInfo = { engine: "native" }, this.video.src = e;
36
+ return;
37
+ }
38
+ if (this.video.canPlayType("application/vnd.apple.mpegurl") !== "" && (I() || !F())) {
39
+ this.loadNativeHls(e, I() ? "apple-native" : "no-mse");
40
+ return;
41
+ }
42
+ await this.attachHlsJs(e);
43
+ }
44
+ /** Şu anki oynatma yolu — docs demosu/entegratör teşhisi için (ör. CORS yüzünden native'e düşüldü mü). */
45
+ get engine() {
46
+ return this.engineInfo;
47
+ }
48
+ loadNativeHls(e, t) {
49
+ this.engineInfo = { engine: "native-hls", reason: t }, this.probeNativeHls(e), this.video.src = e;
50
+ }
51
+ /** Native HLS denemesi sürüyor mu — ErrorScreen bu sırada gelen hatayı göstermez (hls.js'e geçilecek). */
52
+ isRecovering() {
53
+ return this.nativeHlsProbe !== null;
54
+ }
55
+ /**
56
+ * Bazı ortamlar canPlayType'a "maybe" deyip HLS'i native oynatamıyor (bazı Android tarayıcıları/WebView'lar).
57
+ * İlk metadata'dan önce kod 4 gelirse ve MSE varsa hls.js'e geç.
58
+ */
59
+ probeNativeHls(e) {
60
+ if (!F() || this.engineInfo.reason === "hlsjs-failed") return;
61
+ const t = () => o(), i = () => {
62
+ var a;
63
+ const s = ((a = this.video.error) == null ? void 0 : a.code) === 4;
64
+ o(), s && this.attachHlsJs(e);
65
+ }, o = () => {
66
+ this.video.removeEventListener("loadedmetadata", t), this.video.removeEventListener("error", i), this.nativeHlsProbe = null;
67
+ };
68
+ this.video.addEventListener("loadedmetadata", t), this.video.addEventListener("error", i), this.nativeHlsProbe = o;
69
+ }
70
+ async attachHlsJs(e) {
71
+ var s;
72
+ const { default: t } = await import("./hls-CfP6MPo0.js");
73
+ if (((s = this.last) == null ? void 0 : s.src) !== e) return;
74
+ if (!t.isSupported()) {
75
+ this.engineInfo = { engine: "native-hls", reason: "no-mse" }, this.video.src = e;
76
+ return;
77
+ }
78
+ const i = new t({
79
+ enableWorker: !0
80
+ });
81
+ this.hls = i, this.engineInfo = { engine: "hls.js" };
82
+ let o = !1;
83
+ i.on(t.Events.ERROR, (a, h) => {
84
+ !h.fatal || o || this.hls !== i || ![t.ErrorDetails.MANIFEST_LOAD_ERROR, t.ErrorDetails.MANIFEST_LOAD_TIMEOUT].includes(h.details) || this.video.canPlayType("application/vnd.apple.mpegurl") !== "" && (i.destroy(), this.hls = null, this.loadNativeHls(e, "hlsjs-failed"));
85
+ }), i.on(t.Events.MANIFEST_PARSED, () => {
86
+ o = !0;
87
+ const a = i.levels.map(
88
+ (h, d) => ({
89
+ index: d,
90
+ height: h.height,
91
+ bitrate: h.bitrate
92
+ })
93
+ );
94
+ this.onLevelsChanged(a, i.currentLevel);
95
+ }), i.on(t.Events.LEVEL_SWITCHED, (a, h) => {
96
+ const d = i.levels.map(
97
+ (l, p) => ({
98
+ index: p,
99
+ height: l.height,
100
+ bitrate: l.bitrate
101
+ })
102
+ );
103
+ this.onLevelsChanged(d, i.autoLevelEnabled ? -1 : h.level);
104
+ }), i.attachMedia(this.video), i.loadSource(e);
105
+ }
106
+ /** Son kaynağı baştan yükler — hls.js ile oynayan kaynakta da çalışır (çıplak video.load() blob'u yeniden açamaz). */
107
+ reload() {
108
+ return this.last ? this.load(this.last.src, this.last.type) : Promise.resolve();
109
+ }
110
+ /** -1 = otomatik kalite (ABR). */
111
+ setLevel(e) {
112
+ this.hls && (this.hls.currentLevel = e);
113
+ }
114
+ destroy() {
115
+ var e;
116
+ (e = this.nativeHlsProbe) == null || e.call(this), this.hls && (this.hls.destroy(), this.hls = null);
117
+ }
118
+ }
119
+ function w(n) {
120
+ if (!Number.isFinite(n) || n < 0) return "0:00";
121
+ const e = Math.floor(n), t = Math.floor(e / 3600), i = Math.floor(e % 3600 / 60), o = e % 60, s = t > 0 ? String(i).padStart(2, "0") : String(i), a = String(o).padStart(2, "0");
122
+ return t > 0 ? `${t}:${s}:${a}` : `${s}:${a}`;
123
+ }
124
+ class re {
125
+ constructor(e, t) {
126
+ r(this, "el");
127
+ r(this, "trackEl");
128
+ r(this, "chaptersEl", null);
129
+ r(this, "chapters", []);
130
+ /** İmlecin üstündeki zaman (varsayılan, plugin gerektirmez) — kendi zamanını gösteren plugin'ler `suppressHoverTime` ile gizler. */
131
+ r(this, "hoverTimeEl");
132
+ r(this, "hoverTimeSuppressors", /* @__PURE__ */ new Set());
133
+ r(this, "playedEl");
134
+ r(this, "bufferedEl");
135
+ r(this, "thumbEl");
136
+ r(this, "hoverDotEl");
137
+ r(this, "video");
138
+ r(this, "labels");
139
+ r(this, "dragging", !1);
140
+ r(this, "markerEls", []);
141
+ r(this, "trackWidth", 0);
142
+ r(this, "resizeObserver");
143
+ r(this, "rafId", null);
144
+ r(this, "onHoverMove", (e) => {
145
+ const t = this.video.duration, i = Number.isFinite(t) && t > 0, o = this.ratioAtClientX(e.clientX);
146
+ if (i && !this.dragging ? (this.hoverDotEl.style.transform = `translate(${this.xAtRatio(o)}px, -50%) translateX(-50%)`, this.hoverDotEl.setAttribute("data-visible", "")) : this.hoverDotEl.removeAttribute("data-visible"), this.hoverTimeSuppressors.size || !i) {
147
+ this.hoverTimeEl.removeAttribute("data-visible");
148
+ return;
149
+ }
150
+ this.hoverTimeEl.textContent = w(o * t), this.hoverTimeEl.setAttribute("data-visible", "");
151
+ const s = this.el.getBoundingClientRect(), a = this.hoverTimeEl.offsetWidth, h = Math.min(Math.max(e.clientX - s.left - a / 2, 0), Math.max(s.width - a, 0));
152
+ this.hoverTimeEl.style.transform = `translateX(${h}px)`;
153
+ });
154
+ r(this, "onHoverLeave", () => {
155
+ this.hoverTimeEl.removeAttribute("data-visible"), this.hoverDotEl.removeAttribute("data-visible");
156
+ });
157
+ r(this, "onPointerDown", (e) => {
158
+ 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);
159
+ });
160
+ r(this, "onPointerMove", (e) => {
161
+ this.dragging && this.seekToRatio(this.ratioFromEvent(e));
162
+ });
163
+ r(this, "onPointerUp", (e) => {
164
+ this.dragging = !1, this.el.releasePointerCapture(e.pointerId), this.el.removeEventListener("pointermove", this.onPointerMove), this.el.removeEventListener("pointerup", this.onPointerUp);
165
+ });
166
+ r(this, "onKeyDown", (e) => {
167
+ const t = this.video.duration || 0;
168
+ !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()));
169
+ });
170
+ r(this, "startLoop", () => {
171
+ if (this.rafId !== null) return;
172
+ const e = () => {
173
+ this.render(), this.rafId = requestAnimationFrame(e);
174
+ };
175
+ this.rafId = requestAnimationFrame(e);
176
+ });
177
+ r(this, "stopLoop", () => {
178
+ this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null), this.render();
179
+ });
180
+ r(this, "render", () => {
181
+ const e = this.video.duration;
182
+ if (this.el.toggleAttribute("data-no-duration", !Number.isFinite(e) || e <= 0), !Number.isFinite(e) || e <= 0) {
183
+ this.playedEl.style.transform = "scaleX(0)", this.thumbEl.style.translate = "-50% 0", this.bufferedEl.style.transform = "scaleX(0)";
184
+ return;
185
+ }
186
+ const t = this.video.currentTime / e;
187
+ this.thumbEl.style.translate = `calc(${this.xAtRatio(t)}px - 50%) 0`;
188
+ let i = 0;
189
+ for (let s = 0; s < this.video.buffered.length; s++)
190
+ this.video.buffered.start(s) <= this.video.currentTime && (i = Math.max(i, this.video.buffered.end(s)));
191
+ const o = i / e;
192
+ if (this.chapters.length)
193
+ for (const s of this.chapters) {
194
+ const a = s.end - s.start, h = (d) => a > 0 ? Math.min(1, Math.max(0, (d - s.start) / a)) : 0;
195
+ s.playedEl.style.transform = `scaleX(${h(t)})`, s.bufferedEl.style.transform = `scaleX(${h(o)})`;
196
+ }
197
+ else
198
+ this.playedEl.style.transform = `scaleX(${t})`, this.bufferedEl.style.transform = `scaleX(${o})`;
199
+ this.el.setAttribute("aria-valuemax", String(Math.floor(e))), this.el.setAttribute("aria-valuenow", String(Math.floor(this.video.currentTime)));
200
+ });
201
+ 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");
202
+ const i = document.createElement("div");
203
+ i.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(i), this.trackEl = i, 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", i.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", i.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(() => {
204
+ this.trackWidth = this.el.getBoundingClientRect().width, this.measureChapters(), this.render();
205
+ }), this.resizeObserver.observe(this.el), this.trackWidth = this.el.getBoundingClientRect().width;
206
+ }
207
+ /** Kendi zamanını gösteren plugin'ler (sprite/segments) varsayılan hover zamanını gizler — keyed set. */
208
+ suppressHoverTime(e, t) {
209
+ t ? this.hoverTimeSuppressors.add(e) : this.hoverTimeSuppressors.delete(e), t && this.hoverTimeEl.removeAttribute("data-visible");
210
+ }
211
+ ratioFromEvent(e) {
212
+ return this.ratioAtClientX(e.clientX);
213
+ }
214
+ /** 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). */
215
+ ratioAtClientX(e) {
216
+ const t = this.el.getBoundingClientRect(), i = e - t.left;
217
+ if (!this.chapters.length) return Math.min(1, Math.max(0, i / t.width));
218
+ for (let o = 0; o < this.chapters.length; o++) {
219
+ const s = this.chapters[o], a = this.chapters[o + 1], h = a ? a.left : 1 / 0;
220
+ if (i < h || !a) {
221
+ const d = s.width > 0 ? Math.min(1, Math.max(0, (i - s.left) / s.width)) : 0;
222
+ return s.start + d * (s.end - s.start);
223
+ }
224
+ }
225
+ return 1;
226
+ }
227
+ /** 0–1 zaman oranının seek bar üzerindeki px konumu (thumb için). */
228
+ xAtRatio(e) {
229
+ if (!this.chapters.length) return e * this.trackWidth;
230
+ const t = this.chapters.find((s) => e < s.end) ?? this.chapters[this.chapters.length - 1], i = t.end - t.start, o = i > 0 ? Math.min(1, Math.max(0, (e - t.start) / i)) : 0;
231
+ return t.left + o * t.width;
232
+ }
233
+ /** Track'i sıralı, 0→1'i kesintisiz kapsayan oran aralıklarına göre ayrı parçalara böler. */
234
+ setChapters(e) {
235
+ if (this.clearChapters(), !e.length) return [];
236
+ const t = document.createElement("div");
237
+ return t.className = "hp-chapters", this.chapters = e.map((i) => {
238
+ const o = document.createElement("div");
239
+ o.className = "hp-chapter", o.setAttribute("part", "segment-band"), o.style.flex = `${Math.max(i.end - i.start, 0)} 1 0px`;
240
+ const s = document.createElement("div");
241
+ s.className = "hp-chapter-fill hp-chapter-buffered";
242
+ const a = document.createElement("div");
243
+ return a.className = "hp-chapter-fill hp-chapter-played", i.color && (a.style.background = i.color), o.append(s, a), t.appendChild(o), { ...i, el: o, bufferedEl: s, playedEl: a, left: 0, width: 0 };
244
+ }), this.trackEl.style.display = "none", this.trackEl.after(t), this.chaptersEl = t, this.measureChapters(), this.render(), this.chapters.map((i) => i.el);
245
+ }
246
+ clearChapters() {
247
+ var e;
248
+ (e = this.chaptersEl) == null || e.remove(), this.chaptersEl = null, this.chapters = [], this.trackEl.style.display = "", this.render();
249
+ }
250
+ measureChapters() {
251
+ if (!this.chapters.length) return;
252
+ const e = this.el.getBoundingClientRect().left;
253
+ for (const t of this.chapters) {
254
+ const i = t.el.getBoundingClientRect();
255
+ t.left = i.left - e, t.width = i.width;
256
+ }
257
+ }
258
+ seekToRatio(e) {
259
+ const t = this.video.duration;
260
+ !Number.isFinite(t) || t <= 0 || (this.video.currentTime = e * t, this.render());
261
+ }
262
+ /** 0–1 arası oranda, seek bar üzerine ince bir işaret çizgisi ekler (ör. loop A/B noktaları). */
263
+ addMarker(e, t = "") {
264
+ const i = document.createElement("div");
265
+ return i.className = `hp:absolute hp:top-0 hp:bottom-0 hp:w-0.5 hp:bg-on-surface hp:pointer-events-none ${t}`, i.style.left = `${Math.min(1, Math.max(0, e)) * 100}%`, this.el.appendChild(i), this.markerEls.push(i), i;
266
+ }
267
+ clearMarkers() {
268
+ this.markerEls.forEach((e) => e.remove()), this.markerEls.length = 0;
269
+ }
270
+ refreshLabels() {
271
+ this.el.setAttribute("aria-label", this.labels.seekBar);
272
+ }
273
+ destroy() {
274
+ var e;
275
+ 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();
276
+ }
277
+ }
278
+ function g(n, e = "") {
279
+ const t = document.createElement("i");
280
+ return t.className = `hp-icon hp-icon-${n}${e ? ` ${e}` : ""}`, t.setAttribute("aria-hidden", "true"), t;
281
+ }
282
+ function E(n, e) {
283
+ n.className = n.className.replace(/hp-icon-[\w-]+/, `hp-icon-${e}`);
284
+ }
285
+ const C = 0.05, oe = 150;
286
+ class se {
287
+ constructor(e, t, i) {
288
+ r(this, "el");
289
+ /** Dokunmatikte ses butonu gizli; sessiz oynarken görünen "Sesi aç" rozeti (chrome dışında monte edilir, otomatik gizlenmez). */
290
+ r(this, "unmuteBadge");
291
+ r(this, "unmuteText");
292
+ r(this, "button");
293
+ r(this, "iconEl");
294
+ r(this, "slider");
295
+ r(this, "sliderFill");
296
+ r(this, "video");
297
+ r(this, "labels");
298
+ r(this, "adHooks");
299
+ r(this, "dragging", !1);
300
+ r(this, "hideTimer", null);
301
+ r(this, "openNow", () => {
302
+ this.hideTimer && (clearTimeout(this.hideTimer), this.hideTimer = null), this.slider.style.opacity = "1", this.slider.style.pointerEvents = "auto";
303
+ });
304
+ r(this, "scheduleHide", () => {
305
+ this.hideTimer && clearTimeout(this.hideTimer), this.hideTimer = setTimeout(() => {
306
+ this.hideTimer = null, this.slider.style.opacity = "0", this.slider.style.pointerEvents = "none";
307
+ }, oe);
308
+ });
309
+ r(this, "onWheel", (e) => {
310
+ if (e.preventDefault(), this.adHooks.isAdActive()) {
311
+ const o = this.adHooks.getVolume();
312
+ this.adHooks.setVolume(Math.min(1, Math.max(0, o + (e.deltaY < 0 ? C : -C)))), this.render();
313
+ return;
314
+ }
315
+ const t = this.video.muted ? 0 : this.video.volume, i = Math.min(1, Math.max(0, t + (e.deltaY < 0 ? C : -C)));
316
+ this.video.volume = i, this.video.muted = i === 0;
317
+ });
318
+ r(this, "onToggleMute", () => {
319
+ if (this.adHooks.isAdActive()) {
320
+ this.adHooks.toggleMute(), this.render();
321
+ return;
322
+ }
323
+ this.video.muted = !this.video.muted, !this.video.muted && this.video.volume === 0 && (this.video.volume = 0.5);
324
+ });
325
+ r(this, "onSliderPointerDown", (e) => {
326
+ this.dragging = !0, this.slider.setPointerCapture(e.pointerId), this.setFromClientY(e.clientY), this.slider.addEventListener("pointermove", this.onSliderPointerMove), this.slider.addEventListener("pointerup", this.onSliderPointerUp);
327
+ });
328
+ r(this, "onSliderPointerMove", (e) => {
329
+ this.dragging && this.setFromClientY(e.clientY);
330
+ });
331
+ r(this, "onSliderPointerUp", (e) => {
332
+ this.dragging = !1, this.slider.releasePointerCapture(e.pointerId), this.slider.removeEventListener("pointermove", this.onSliderPointerMove), this.slider.removeEventListener("pointerup", this.onSliderPointerUp);
333
+ });
334
+ r(this, "onSliderKeyDown", (e) => {
335
+ if (this.adHooks.isAdActive()) {
336
+ if (e.key === "ArrowUp")
337
+ this.adHooks.setVolume(Math.min(1, this.adHooks.getVolume() + 0.1)), e.preventDefault();
338
+ else if (e.key === "ArrowDown")
339
+ this.adHooks.setVolume(Math.max(0, this.adHooks.getVolume() - 0.1)), e.preventDefault();
340
+ else
341
+ return;
342
+ this.render();
343
+ return;
344
+ }
345
+ 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());
346
+ });
347
+ r(this, "render", () => {
348
+ const e = this.adHooks.isAdActive() ? this.adHooks.getVolume() : this.video.muted ? 0 : this.video.volume;
349
+ this.sliderFill.style.height = `${e * 100}%`, this.slider.setAttribute("aria-valuenow", String(Math.round(e * 100)));
350
+ const t = e === 0 ? this.labels.unmute : this.labels.mute;
351
+ this.button.setAttribute("aria-label", t);
352
+ const i = this.adHooks.isAdActive() || !this.video.paused;
353
+ this.unmuteBadge.toggleAttribute("data-visible", e === 0 && i), this.unmuteText.textContent = this.labels.unmute, e === 0 ? E(this.iconEl, "volume-muted") : e < 0.5 ? E(this.iconEl, "volume-low") : E(this.iconEl, "volume-high");
354
+ });
355
+ this.video = e, this.labels = t, this.adHooks = i, 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(g("volume-muted", "hp:text-base")), this.unmuteText = document.createElement("span"), this.unmuteText.textContent = t.unmute, this.unmuteBadge.appendChild(this.unmuteText), this.unmuteBadge.addEventListener("pointerdown", (s) => s.stopPropagation()), this.unmuteBadge.addEventListener("click", (s) => {
356
+ s.stopPropagation(), this.unmute();
357
+ }), 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 = g("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");
358
+ const o = document.createElement("div");
359
+ o.className = "hp:relative hp:w-1.5 hp:h-full hp:rounded-full hp:bg-on-surface/25 hp:overflow-hidden", this.slider.appendChild(o), this.sliderFill = document.createElement("div"), this.sliderFill.className = "hp:absolute hp:inset-x-0 hp:bottom-0 hp:bg-accent", o.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();
360
+ }
361
+ /** "Sesi aç" rozeti: yalnızca AÇAR (toggle değil) — reklam sırasında reklamın sesini. */
362
+ unmute() {
363
+ if (this.adHooks.isAdActive()) {
364
+ this.adHooks.getVolume() === 0 && this.adHooks.toggleMute(), this.render();
365
+ return;
366
+ }
367
+ this.video.muted = !1, this.video.volume === 0 && (this.video.volume = 0.5);
368
+ }
369
+ /** Dikey çubukta: üst = tam ses (1), alt = sessiz (0) — Y ekseni ters çevrilir. */
370
+ setFromClientY(e) {
371
+ const t = this.slider.getBoundingClientRect(), i = t.height > 0 ? 1 - Math.min(1, Math.max(0, (e - t.top) / t.height)) : 0;
372
+ if (this.adHooks.isAdActive()) {
373
+ this.adHooks.setVolume(i), this.render();
374
+ return;
375
+ }
376
+ this.video.volume = i, this.video.muted = i === 0;
377
+ }
378
+ refreshLabels() {
379
+ this.slider.setAttribute("aria-label", this.labels.volume), this.render();
380
+ }
381
+ /** 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. */
382
+ refreshForAdMode() {
383
+ this.render();
384
+ }
385
+ setIconColor(e) {
386
+ this.iconEl.style.color = e;
387
+ }
388
+ setSliderFillColor(e) {
389
+ this.sliderFill.style.background = e;
390
+ }
391
+ destroy() {
392
+ 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();
393
+ }
394
+ }
395
+ const ne = 8, A = 8, ae = 100, N = 256;
396
+ class le {
397
+ constructor(e, t, i) {
398
+ r(this, "el");
399
+ r(this, "button");
400
+ r(this, "panel");
401
+ r(this, "video");
402
+ r(this, "playbackRates");
403
+ r(this, "labels");
404
+ r(this, "qualities", []);
405
+ r(this, "activeQualityLabel");
406
+ r(this, "captions", []);
407
+ r(this, "activeCaptionLabel");
408
+ r(this, "captionAppearance", null);
409
+ r(this, "qrResumeToggle", null);
410
+ r(this, "open", !1);
411
+ /** Menü açılıp kapanınca — HopePlayerElement açıkken kontrolleri otomatik gizlemez. */
412
+ r(this, "onOpenChange", null);
413
+ r(this, "panelObserver");
414
+ r(this, "currentPanel", "main");
415
+ r(this, "submenus", []);
416
+ /**
417
+ * Yön + yükseklik player'a göre: kompakt düzende (buton üst bardaysa) aşağı açılır; her iki yönde de
418
+ * yükseklik player içinde kalan alanla sınırlı — küçük player'da menü dışarı taşmaz, kendi içinde kayar.
419
+ */
420
+ r(this, "fitToPlayer", () => {
421
+ if (!this.open) return;
422
+ const e = this.el.closest(".video-area");
423
+ if (!e) return;
424
+ const t = e.getBoundingClientRect(), i = this.button.getBoundingClientRect(), o = this.el.getBoundingClientRect(), s = !!this.el.closest(".hp-top-bar");
425
+ this.panel.toggleAttribute("data-drop", s), Object.assign(this.panel.style, { top: "", bottom: "", marginTop: "", marginBottom: "" });
426
+ const a = this.panel.scrollHeight, h = (s ? t.bottom - i.bottom : i.top - t.top) - ne - A;
427
+ if (a <= h || h >= ae) {
428
+ this.panel.style.maxHeight = `${Math.min(N, h)}px`;
429
+ return;
430
+ }
431
+ this.panel.style.maxHeight = `${Math.min(N, t.height - 2 * A)}px`, s ? Object.assign(this.panel.style, { top: `${t.top + A - o.top}px`, marginTop: "0" }) : Object.assign(this.panel.style, { bottom: `${o.bottom - (t.bottom - A)}px`, marginBottom: "0" });
432
+ });
433
+ r(this, "onDocumentClick", (e) => {
434
+ this.open && !e.composedPath().includes(this.el) && this.close();
435
+ });
436
+ this.video = e, this.playbackRates = t, this.labels = i, this.activeQualityLabel = i.autoQuality, this.activeCaptionLabel = i.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", i.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(g("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.panelObserver = new MutationObserver(this.fitToPlayer), this.panelObserver.observe(this.panel, { childList: !0 }), this.el.appendChild(this.button), this.el.appendChild(this.panel), this.button.addEventListener("click", (o) => {
437
+ o.stopPropagation(), this.toggle();
438
+ }), document.addEventListener("click", this.onDocumentClick, !0), this.renderMain();
439
+ }
440
+ setQualities(e, t) {
441
+ this.qualities = e, this.activeQualityLabel = t, (this.currentPanel === "main" || this.currentPanel === "quality") && this.render();
442
+ }
443
+ setCaptions(e, t) {
444
+ this.captions = e, this.activeCaptionLabel = t, (this.currentPanel === "main" || this.currentPanel === "captions") && this.render();
445
+ }
446
+ /** Altyazı AÇIKKEN "Altyazı" alt menüsüne eklenecek Boyut/Renk/Konum satırları — `null` kaldırır. */
447
+ setCaptionAppearance(e) {
448
+ this.captionAppearance = e, (this.currentPanel === "captions" || this.currentPanel === "captions-size" || this.currentPanel === "captions-bg" || this.currentPanel === "captions-text") && this.render();
449
+ }
450
+ /** Ana menüye tek aç/kapa satırı ekler (ör. QrResume). */
451
+ setQrResumeToggle(e) {
452
+ this.qrResumeToggle = e, this.currentPanel === "main" && this.renderMain();
453
+ }
454
+ /** Plugin'lerin (ör. dubbing) ana menüye kendi satır + alt menüsünü eklemesi için. */
455
+ registerSubmenu(e) {
456
+ this.submenus = this.submenus.filter((t) => t.key !== e.key), this.submenus.push(e), this.currentPanel === "main" && this.renderMain();
457
+ }
458
+ unregisterSubmenu(e) {
459
+ this.submenus = this.submenus.filter((t) => t.key !== e), this.currentPanel === "main" ? this.renderMain() : this.currentPanel === `custom:${e}` && this.renderMain();
460
+ }
461
+ toggle() {
462
+ this.open ? this.close() : this.openMenu();
463
+ }
464
+ openMenu() {
465
+ var e;
466
+ this.open = !0, this.currentPanel = "main", this.panel.classList.remove("hp:hidden"), this.renderMain(), this.fitToPlayer(), (e = this.onOpenChange) == null || e.call(this, !0);
467
+ }
468
+ get isOpen() {
469
+ return this.open;
470
+ }
471
+ /** Düzen değişince (ör. kompakt ↔ normal) açık menüyü kapat — eski konumunda asılı kalmasın. */
472
+ closeMenu() {
473
+ this.open && this.close();
474
+ }
475
+ close() {
476
+ var e;
477
+ this.open = !1, this.panel.classList.add("hp:hidden"), (e = this.onOpenChange) == null || e.call(this, !1);
478
+ }
479
+ row(e, t, i) {
480
+ const o = document.createElement("button");
481
+ return o.type = "button", o.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", o.innerHTML = `<span>${e}</span><span class="hp:text-on-surface-muted hp:text-xs hp:flex hp:items-center hp:gap-1">${t}</span>`, o.addEventListener("click", i), o;
482
+ }
483
+ backRow(e, t) {
484
+ const i = document.createElement("button");
485
+ i.type = "button", i.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", i.appendChild(g("chevron-left", "hp:text-sm"));
486
+ const o = document.createElement("span");
487
+ return o.textContent = e, i.appendChild(o), i.addEventListener("click", t), i;
488
+ }
489
+ render() {
490
+ if (this.currentPanel === "main") this.renderMain();
491
+ else if (this.currentPanel === "speed") this.renderSpeed();
492
+ else if (this.currentPanel === "quality") this.renderQuality();
493
+ else if (this.currentPanel === "captions") this.renderCaptions();
494
+ else if (this.currentPanel === "captions-size") this.renderCaptionsSize();
495
+ else if (this.currentPanel === "captions-bg") this.renderCaptionColorPanel("bg");
496
+ else if (this.currentPanel === "captions-text") this.renderCaptionColorPanel("text");
497
+ else {
498
+ const e = this.currentPanel.slice(7), t = this.submenus.find((i) => i.key === e);
499
+ t ? this.renderSubmenu(t) : this.renderMain();
500
+ }
501
+ }
502
+ renderMain() {
503
+ this.currentPanel = "main", this.panel.innerHTML = "", this.panel.appendChild(
504
+ this.row(this.labels.playbackSpeed, this.video.playbackRate === 1 ? this.labels.normal : `${this.video.playbackRate}x`, () => {
505
+ this.currentPanel = "speed", this.renderSpeed();
506
+ })
507
+ ), this.qualities.length > 0 && this.panel.appendChild(
508
+ this.row(this.labels.quality, this.activeQualityLabel, () => {
509
+ this.currentPanel = "quality", this.renderQuality();
510
+ })
511
+ ), this.captions.length > 0 && this.panel.appendChild(
512
+ this.row(this.labels.captions, this.activeCaptionLabel, () => {
513
+ this.currentPanel = "captions", this.renderCaptions();
514
+ })
515
+ );
516
+ for (const e of this.submenus)
517
+ this.panel.appendChild(
518
+ this.row(e.title, e.getValueLabel(), () => {
519
+ this.currentPanel = `custom:${e.key}`, this.renderSubmenu(e);
520
+ })
521
+ );
522
+ if (this.qrResumeToggle) {
523
+ const e = this.qrResumeToggle;
524
+ this.panel.appendChild(
525
+ this.row(e.label, e.getValueLabel(), () => {
526
+ e.onToggle(), this.renderMain();
527
+ })
528
+ );
529
+ }
530
+ }
531
+ renderSubmenu(e) {
532
+ this.panel.innerHTML = "", this.panel.appendChild(this.backRow(e.title, () => this.renderMain()));
533
+ for (const t of e.getItems())
534
+ this.panel.appendChild(
535
+ this.row(t.label, t.active ? '<i class="hp-icon hp-icon-check"></i>' : "", () => {
536
+ t.onSelect(), this.close();
537
+ })
538
+ );
539
+ }
540
+ renderSpeed() {
541
+ this.panel.innerHTML = "", this.panel.appendChild(this.backRow(this.labels.playbackSpeed, () => this.renderMain()));
542
+ for (const e of this.playbackRates) {
543
+ const t = this.video.playbackRate === e, i = this.row(e === 1 ? this.labels.normal : `${e}x`, t ? '<i class="hp-icon hp-icon-check"></i>' : "", () => {
544
+ this.video.playbackRate = e, this.close();
545
+ });
546
+ this.panel.appendChild(i);
547
+ }
548
+ }
549
+ renderQuality() {
550
+ this.panel.innerHTML = "", this.panel.appendChild(this.backRow(this.labels.quality, () => this.renderMain()));
551
+ for (const e of this.qualities) {
552
+ const t = e.label === this.activeQualityLabel;
553
+ this.panel.appendChild(
554
+ this.row(e.label, t ? '<i class="hp-icon hp-icon-check"></i>' : "", () => {
555
+ e.onSelect(), this.close();
556
+ })
557
+ );
558
+ }
559
+ }
560
+ renderCaptions() {
561
+ this.panel.innerHTML = "", this.panel.appendChild(this.backRow(this.labels.captions, () => this.renderMain()));
562
+ for (const e of this.captions) {
563
+ const t = e.label === this.activeCaptionLabel;
564
+ this.panel.appendChild(
565
+ this.row(e.label, t ? '<i class="hp-icon hp-icon-check"></i>' : "", () => {
566
+ e.onSelect(), this.close();
567
+ })
568
+ );
569
+ }
570
+ if (this.captionAppearance && this.activeCaptionLabel !== this.labels.captionsOff) {
571
+ const e = this.captionAppearance;
572
+ this.panel.appendChild(
573
+ this.row(e.sizeLabel, "", () => {
574
+ this.currentPanel = "captions-size", this.renderCaptionsSize();
575
+ })
576
+ ), this.panel.appendChild(
577
+ this.row(e.bgColorLabel, "", () => {
578
+ this.currentPanel = "captions-bg", this.renderCaptionColorPanel("bg");
579
+ })
580
+ ), this.panel.appendChild(
581
+ this.row(e.textColorLabel, "", () => {
582
+ this.currentPanel = "captions-text", this.renderCaptionColorPanel("text");
583
+ })
584
+ ), this.panel.appendChild(
585
+ this.row(e.resetPositionLabel, "", () => {
586
+ e.onResetPosition(), this.close();
587
+ })
588
+ );
589
+ }
590
+ }
591
+ renderCaptionsSize() {
592
+ this.panel.innerHTML = "";
593
+ const e = this.captionAppearance;
594
+ if (this.panel.appendChild(this.backRow((e == null ? void 0 : e.sizeLabel) ?? this.labels.captionSize, () => this.renderCaptions())), !!e)
595
+ for (const t of e.getSizeOptions())
596
+ this.panel.appendChild(
597
+ this.row(t.label, t.active ? '<i class="hp-icon hp-icon-check"></i>' : "", () => {
598
+ t.onSelect(), this.close();
599
+ })
600
+ );
601
+ }
602
+ /** "Arka Plan Rengi" / "Yazı Rengi" — düz metin satırları yerine renkli swatch grid'i (YouTube'un kendi altyazı renk seçici deseni). */
603
+ renderCaptionColorPanel(e) {
604
+ this.panel.innerHTML = "";
605
+ const t = this.captionAppearance, i = e === "bg" ? (t == null ? void 0 : t.bgColorLabel) ?? this.labels.captionBgColor : (t == null ? void 0 : t.textColorLabel) ?? this.labels.captionTextColor;
606
+ if (this.panel.appendChild(this.backRow(i, () => this.renderCaptions())), !t) return;
607
+ const o = document.createElement("div");
608
+ o.className = "hp:flex hp:flex-wrap hp:gap-2 hp:px-3 hp:py-2";
609
+ const s = e === "bg" ? t.getBgColorOptions() : t.getTextColorOptions();
610
+ for (const a of s) {
611
+ const h = document.createElement("button");
612
+ h.type = "button", h.setAttribute("aria-label", a.ariaLabel), h.className = "hp:w-7 hp:h-7 hp:rounded-full hp:cursor-pointer hp:flex-shrink-0 hp:border hp:border-on-surface/20", h.style.background = a.value, h.style.outline = a.active ? "2px solid currentColor" : "2px solid transparent", h.style.outlineOffset = "2px", h.addEventListener("click", () => {
613
+ a.onSelect(), this.render();
614
+ }), o.appendChild(h);
615
+ }
616
+ this.panel.appendChild(o);
617
+ }
618
+ /** Dil sonradan değişince statik buton etiketini tazeler + mevcut panel zaten güncel `this.labels`'ı okuyarak yeniden render edilir. */
619
+ refreshLabels() {
620
+ this.button.setAttribute("aria-label", this.labels.settings), this.render();
621
+ }
622
+ destroy() {
623
+ document.removeEventListener("click", this.onDocumentClick, !0), this.panelObserver.disconnect();
624
+ }
625
+ }
626
+ const he = 15, pe = 480;
627
+ function x(n, e) {
628
+ n.setAttribute("aria-label", e);
629
+ }
630
+ function L(n, e, t) {
631
+ const i = document.createElement("button");
632
+ i.type = "button", x(i, n), t && (i.dataset.shortcut = t), i.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";
633
+ const o = g(e, "hp:text-[length:var(--hp-ctrl-icon-size)]");
634
+ return i.appendChild(o), { btn: i, icon: o };
635
+ }
636
+ class ce {
637
+ constructor(e, t, i, o) {
638
+ r(this, "el");
639
+ r(this, "seekBar");
640
+ r(this, "volumePanel");
641
+ r(this, "settingsMenu");
642
+ r(this, "video");
643
+ r(this, "labels");
644
+ r(this, "playButton");
645
+ r(this, "playIcon");
646
+ r(this, "pipButton");
647
+ r(this, "fullscreenButton");
648
+ r(this, "fullscreenIcon");
649
+ r(this, "timeLabel");
650
+ r(this, "showRemaining", !1);
651
+ /** Kompakt düzende (player < 480px) sağ grubun taşındığı üst bar; tam ekran altta kalır. */
652
+ r(this, "topEl");
653
+ r(this, "bottomRow");
654
+ r(this, "rightGroup");
655
+ r(this, "fullscreenSlot");
656
+ r(this, "compact", !1);
657
+ r(this, "resizeObserver");
658
+ r(this, "liveBadge");
659
+ r(this, "liveText");
660
+ r(this, "adMode", !1);
661
+ r(this, "callbacks");
662
+ r(this, "row");
663
+ r(this, "extraButtonAnchor");
664
+ /** Süre etiketine tıklama: geçen süre ↔ kalan süre. */
665
+ r(this, "onTimeClick", (e) => {
666
+ e.stopPropagation(), this.toggleTimeMode();
667
+ });
668
+ r(this, "renderPlayState", () => {
669
+ const e = this.callbacks.isAdActive() ? this.callbacks.adIsPaused() : this.video.paused;
670
+ E(this.playIcon, e ? "play" : "pause"), x(this.playButton, e ? this.labels.play : this.labels.pause);
671
+ });
672
+ r(this, "renderTime", () => {
673
+ const e = this.video.duration === 1 / 0;
674
+ if (this.timeLabel.style.display = this.adMode || e ? "none" : "", this.liveBadge.style.display = !this.adMode && e ? "" : "none", !e) {
675
+ const o = this.video.duration, s = this.video.currentTime;
676
+ if (this.showRemaining) {
677
+ const a = Number.isFinite(o) ? Math.floor(o) : 0, h = Math.max(0, a - Math.floor(s));
678
+ this.timeLabel.textContent = `-${w(h)} / ${w(o)}`;
679
+ } else
680
+ this.timeLabel.textContent = `${w(s)} / ${w(o)}`;
681
+ return;
682
+ }
683
+ const t = this.liveEdge(), i = t !== null && t - this.video.currentTime > he;
684
+ this.liveBadge.toggleAttribute("data-behind", i);
685
+ });
686
+ r(this, "goToLive", () => {
687
+ const e = this.liveEdge();
688
+ e !== null && (this.video.currentTime = Math.max(0, e - 1), this.video.paused && this.video.play().catch(() => {
689
+ }), this.renderTime());
690
+ });
691
+ this.video = e, this.callbacks = i, this.labels = o, 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 re(e, o), this.seekBar.el.classList.add("hp:pointer-events-auto"), this.el.appendChild(this.seekBar.el);
692
+ const s = document.createElement("div");
693
+ s.className = "hp:flex hp:items-center hp:gap-2", this.el.appendChild(s), this.bottomRow = s;
694
+ const a = document.createElement("div");
695
+ a.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", s.appendChild(a);
696
+ const h = L(o.play, "play", "K");
697
+ this.playButton = h.btn, this.playIcon = h.icon, this.playButton.setAttribute("part", "play-pause-button"), this.playButton.addEventListener("click", () => this.togglePlay()), a.appendChild(this.playButton), this.volumePanel = new se(e, o, i.adVolume), a.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), a.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", o.goToLive);
698
+ const d = document.createElement("span");
699
+ d.className = "hp-live-dot", this.liveText = document.createElement("span"), this.liveText.textContent = o.live, this.liveBadge.append(d, this.liveText), this.liveBadge.style.display = "none", this.liveBadge.addEventListener("click", this.goToLive), a.appendChild(this.liveBadge);
700
+ const l = document.createElement("div");
701
+ l.className = "hp:flex-1", s.appendChild(l);
702
+ const p = document.createElement("div");
703
+ 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", s.appendChild(p), this.rightGroup = p, this.settingsMenu = new le(e, t, o), p.appendChild(this.settingsMenu.el), this.extraButtonAnchor = this.settingsMenu.el, this.row = p;
704
+ const c = L(o.pip, "pip");
705
+ this.pipButton = c.btn, this.pipButton.addEventListener("click", () => this.togglePip()), document.pictureInPictureEnabled || (this.pipButton.style.display = "none"), p.appendChild(this.pipButton);
706
+ const u = L(o.fullscreenEnter, "fullscreen-enter", "F");
707
+ 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", s.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();
708
+ }
709
+ /** 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. */
710
+ updateLayout() {
711
+ var i;
712
+ const e = this.el.getBoundingClientRect().width;
713
+ if (e === 0) return;
714
+ const t = e < pe;
715
+ t !== this.compact && (this.compact = t, this.settingsMenu.closeMenu(), this.el.toggleAttribute("data-compact", t), (i = this.el.closest(".video-area")) == null || i.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"));
716
+ }
717
+ setFullscreenState(e) {
718
+ E(this.fullscreenIcon, e ? "fullscreen-exit" : "fullscreen-enter"), x(this.fullscreenButton, e ? this.labels.fullscreenExit : this.labels.fullscreenEnter);
719
+ }
720
+ /** Dil sonradan değişince (`options.locale`/`labels`) statik (reaktif olarak yeniden render edilmeyen) etiketleri tazeler. */
721
+ refreshLabels() {
722
+ this.renderPlayState(), x(this.pipButton, this.labels.pip), x(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();
723
+ }
724
+ /** Reklam modu: seek bar, süre ve sağ grup gizlenir; oynat/duraklat + ses kalır. */
725
+ setAdMode(e) {
726
+ const t = e ? "none" : "";
727
+ 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();
728
+ const i = e ? "#202020" : "";
729
+ this.playIcon.style.color = i, this.volumePanel.setIconColor(i), this.volumePanel.setSliderFillColor(i), this.renderPlayState(), this.volumePanel.refreshForAdMode();
730
+ }
731
+ /** `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. */
732
+ refreshAdPlayState() {
733
+ this.renderPlayState();
734
+ }
735
+ setQualities(e, t) {
736
+ this.settingsMenu.setQualities(e, t);
737
+ }
738
+ setCaptions(e, t) {
739
+ this.settingsMenu.setCaptions(e, t);
740
+ }
741
+ /** Plugin'lerin (loop-section vb.) kontrol çubuğuna kendi butonlarını eklemesi için — ayarlar menüsünden önce yerleştirilir. */
742
+ addButton(e, t, i) {
743
+ const { btn: o, icon: s } = L(e, t);
744
+ return o.addEventListener("click", i), this.row.insertBefore(o, this.extraButtonAnchor), { btn: o, icon: s };
745
+ }
746
+ toggleTimeMode() {
747
+ this.showRemaining = !this.showRemaining, this.renderTime();
748
+ }
749
+ setShowRemaining(e) {
750
+ this.showRemaining !== e && (this.showRemaining = e, this.renderTime());
751
+ }
752
+ getShowRemaining() {
753
+ return this.showRemaining;
754
+ }
755
+ /** Plugin'lerin (live-wall-clock vb.) kontrol çubuğuna buton olmayan bir element (ör. saat göstergesi) eklemesi için. */
756
+ addElement(e) {
757
+ this.row.insertBefore(e, this.extraButtonAnchor);
758
+ }
759
+ togglePlay() {
760
+ if (this.callbacks.isAdActive()) {
761
+ this.callbacks.adTogglePlay(), this.renderPlayState();
762
+ return;
763
+ }
764
+ this.video.paused ? this.video.play() : this.video.pause();
765
+ }
766
+ async togglePip() {
767
+ try {
768
+ document.pictureInPictureElement ? await document.exitPictureInPicture() : await this.video.requestPictureInPicture();
769
+ } catch {
770
+ }
771
+ }
772
+ toggleFullscreen() {
773
+ this.callbacks.isFullscreen() ? this.callbacks.onExitFullscreen() : this.callbacks.onRequestFullscreen();
774
+ }
775
+ /** 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). */
776
+ liveEdge() {
777
+ const { seekable: e, buffered: t } = this.video;
778
+ return e.length ? e.end(e.length - 1) : t.length ? t.end(t.length - 1) : null;
779
+ }
780
+ destroy() {
781
+ 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();
782
+ }
783
+ }
784
+ const de = 450, ue = 60, O = 8, P = 6, me = /* @__PURE__ */ new Set(["seek-bar", "time-display"]);
785
+ function be() {
786
+ return typeof window.matchMedia != "function" || window.matchMedia("(hover: hover)").matches;
787
+ }
788
+ class ve {
789
+ constructor(e) {
790
+ r(this, "el");
791
+ r(this, "labelEl");
792
+ r(this, "keyEl");
793
+ r(this, "showTimer", null);
794
+ r(this, "hideTimer", null);
795
+ r(this, "currentTarget", null);
796
+ /** Gösterim gecikmesi (SHOW_DELAY_MS) içinde bekleyen hedef — `currentTarget` yalnızca gerçekten gösterilince set ediliyor. */
797
+ r(this, "pendingTarget", null);
798
+ r(this, "onMouseOver", (e) => {
799
+ const t = this.matchTarget(e.target);
800
+ !t || t === this.currentTarget || this.scheduleShow(t);
801
+ });
802
+ r(this, "onMouseOut", (e) => {
803
+ const t = this.matchTarget(e.target);
804
+ if (!t || t !== this.currentTarget && t !== this.pendingTarget) return;
805
+ const i = e.relatedTarget;
806
+ i && t.contains(i) || this.scheduleHide();
807
+ });
808
+ r(this, "onFocusIn", (e) => {
809
+ const t = this.matchTarget(e.target);
810
+ t && this.show(t);
811
+ });
812
+ r(this, "onFocusOut", (e) => {
813
+ const t = this.matchTarget(e.target);
814
+ !t || t !== this.currentTarget || this.hideNow();
815
+ });
816
+ r(this, "hideNow", () => {
817
+ 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");
818
+ });
819
+ 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);
820
+ }
821
+ destroy() {
822
+ 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();
823
+ }
824
+ matchTarget(e) {
825
+ var s;
826
+ const t = e, i = (s = t == null ? void 0 : t.closest) == null ? void 0 : s.call(t, 'button[aria-label], [role="slider"][aria-label]');
827
+ if (!i) return null;
828
+ const o = i.getAttribute("part");
829
+ return o && me.has(o) || i.offsetParent === null && i !== document.activeElement ? null : i;
830
+ }
831
+ scheduleShow(e) {
832
+ this.hideTimer && (clearTimeout(this.hideTimer), this.hideTimer = null), this.showTimer && clearTimeout(this.showTimer), this.pendingTarget = e, this.showTimer = setTimeout(() => {
833
+ this.showTimer = null, this.pendingTarget = null, this.show(e);
834
+ }, de);
835
+ }
836
+ scheduleHide() {
837
+ this.showTimer && (clearTimeout(this.showTimer), this.showTimer = null), this.pendingTarget = null, this.hideTimer && clearTimeout(this.hideTimer), this.hideTimer = setTimeout(() => this.hideNow(), ue);
838
+ }
839
+ show(e) {
840
+ if (!be()) return;
841
+ const t = e.getAttribute("aria-label");
842
+ if (!t) return;
843
+ this.currentTarget = e, this.labelEl.textContent = t;
844
+ const i = e.dataset.shortcut;
845
+ i ? (this.keyEl.textContent = i, 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(() => {
846
+ this.currentTarget === e && (this.position(e), this.el.style.visibility = "visible", this.el.style.opacity = "1");
847
+ });
848
+ }
849
+ position(e) {
850
+ const t = this.mountEl.getBoundingClientRect(), i = e.getBoundingClientRect(), o = this.el.getBoundingClientRect();
851
+ let s = i.top - t.top - o.height - O;
852
+ s < P && (s = i.bottom - t.top + O);
853
+ let a = i.left - t.left + i.width / 2 - o.width / 2;
854
+ const h = t.width - o.width - P;
855
+ a = Math.max(P, Math.min(a, h)), this.el.style.top = `${s}px`, this.el.style.left = `${a}px`;
856
+ }
857
+ }
858
+ class ge {
859
+ constructor(e, t, i) {
860
+ r(this, "host");
861
+ r(this, "video");
862
+ r(this, "toggleFullscreen");
863
+ r(this, "onKeyDown", (e) => {
864
+ if (e.defaultPrevented) return;
865
+ const t = e.composedPath()[0];
866
+ if ((e.key === " " || e.key === "Enter") && t instanceof HTMLButtonElement) return;
867
+ const i = this.video.duration;
868
+ switch (e.key) {
869
+ case " ":
870
+ case "k":
871
+ this.video.paused ? this.video.play() : this.video.pause(), e.preventDefault();
872
+ break;
873
+ case "ArrowRight":
874
+ case "l":
875
+ Number.isFinite(i) && (this.video.currentTime = Math.min(i, this.video.currentTime + 5)), e.preventDefault();
876
+ break;
877
+ case "ArrowLeft":
878
+ case "j":
879
+ this.video.currentTime = Math.max(0, this.video.currentTime - 5), e.preventDefault();
880
+ break;
881
+ case "ArrowUp":
882
+ this.video.volume = Math.min(1, this.video.volume + 0.1), this.video.muted = !1, e.preventDefault();
883
+ break;
884
+ case "ArrowDown":
885
+ this.video.volume = Math.max(0, this.video.volume - 0.1), e.preventDefault();
886
+ break;
887
+ case "m":
888
+ this.video.muted = !this.video.muted, e.preventDefault();
889
+ break;
890
+ case "f":
891
+ this.toggleFullscreen(), e.preventDefault();
892
+ break;
893
+ }
894
+ });
895
+ this.host = e, this.video = t, this.toggleFullscreen = i, this.host.addEventListener("keydown", this.onKeyDown);
896
+ }
897
+ destroy() {
898
+ this.host.removeEventListener("keydown", this.onKeyDown);
899
+ }
900
+ }
901
+ class fe {
902
+ constructor(e) {
903
+ r(this, "el");
904
+ r(this, "video");
905
+ r(this, "show", () => this.el.classList.remove("hp:hidden"));
906
+ r(this, "hide", () => this.el.classList.add("hp:hidden"));
907
+ 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);
908
+ }
909
+ destroy() {
910
+ this.video.removeEventListener("waiting", this.show), this.video.removeEventListener("playing", this.hide), this.video.removeEventListener("canplay", this.hide), this.video.removeEventListener("pause", this.hide);
911
+ }
912
+ }
913
+ const ye = '<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 11a8 8 0 1 0-2.3 5.7"/><path d="M20 4v7h-7"/></svg>';
914
+ class we {
915
+ constructor(e, t) {
916
+ r(this, "el");
917
+ r(this, "video");
918
+ r(this, "labels");
919
+ r(this, "messageEl");
920
+ r(this, "codeEl");
921
+ r(this, "retryBtn");
922
+ r(this, "retryText");
923
+ r(this, "onRetry", null);
924
+ r(this, "shouldShow", () => !0);
925
+ r(this, "show", () => {
926
+ !this.video.getAttribute("src") && !this.video.querySelector("source") || this.shouldShow() && (this.render(), this.el.setAttribute("data-visible", ""));
927
+ });
928
+ this.video = e, this.labels = t, this.el = document.createElement("div"), this.el.setAttribute("part", "error-screen"), this.el.setAttribute("role", "alert"), this.el.className = "hp-error-screen";
929
+ const i = document.createElement("div");
930
+ i.className = "hp-error-card";
931
+ const o = document.createElement("div");
932
+ o.className = "hp-error-icon", o.appendChild(g("warning")), i.appendChild(o), this.messageEl = document.createElement("p"), this.messageEl.className = "hp-error-message", i.appendChild(this.messageEl), this.codeEl = document.createElement("p"), this.codeEl.className = "hp-error-code", i.appendChild(this.codeEl), this.retryBtn = document.createElement("button"), this.retryBtn.type = "button", this.retryBtn.className = "hp-error-retry", this.retryBtn.innerHTML = ye, this.retryText = document.createElement("span"), this.retryText.textContent = t.retry, this.retryBtn.appendChild(this.retryText), this.retryBtn.addEventListener("click", () => {
933
+ var s;
934
+ this.hide(), (s = this.onRetry) == null || s.call(this);
935
+ }), i.appendChild(this.retryBtn), this.el.appendChild(i), e.addEventListener("error", this.show);
936
+ }
937
+ setOnRetry(e) {
938
+ this.onRetry = e;
939
+ }
940
+ /** false dönerse hata gösterilmez (ör. SourceManager native HLS'ten hls.js'e geçerken). */
941
+ setShouldShow(e) {
942
+ this.shouldShow = e;
943
+ }
944
+ get visible() {
945
+ return this.el.hasAttribute("data-visible");
946
+ }
947
+ refreshLabels() {
948
+ this.retryText.textContent = this.labels.retry, this.visible && this.render();
949
+ }
950
+ render() {
951
+ var i;
952
+ const e = ((i = this.video.error) == null ? void 0 : i.code) ?? 0, t = {
953
+ 1: this.labels.errorAborted,
954
+ 2: this.labels.errorNetwork,
955
+ 3: this.labels.errorDecode,
956
+ 4: this.labels.errorSrcNotSupported
957
+ };
958
+ this.messageEl.textContent = t[e] ?? this.labels.errorGeneric, this.codeEl.textContent = e ? `${this.labels.errorCode} ${e}` : "", this.codeEl.style.display = e ? "" : "none";
959
+ }
960
+ hide() {
961
+ this.el.removeAttribute("data-visible");
962
+ }
963
+ destroy() {
964
+ this.video.removeEventListener("error", this.show);
965
+ }
966
+ }
967
+ const M = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap();
968
+ function xe(n, e) {
969
+ n.querySelectorAll("track").forEach((s) => s.remove()), Q(n);
970
+ const t = S.get(n);
971
+ let i = M.get(n);
972
+ i || M.set(n, i = /* @__PURE__ */ new Map());
973
+ const o = [];
974
+ for (const s of e) {
975
+ const a = `${s.label}\0${s.srclang}`;
976
+ let h = i.get(a);
977
+ h || (h = n.addTextTrack("subtitles", s.label, s.srclang), i.set(a, h)), h.mode = s.default ? "hidden" : "disabled", o.push({ label: s.label, track: h }), ke(n, h, s.src, t);
978
+ }
979
+ return o;
980
+ }
981
+ function Q(n) {
982
+ var e;
983
+ S.set(n, (S.get(n) ?? 0) + 1);
984
+ for (const t of ((e = M.get(n)) == null ? void 0 : e.values()) ?? []) {
985
+ t.mode = "hidden";
986
+ for (const i of Array.from(t.cues ?? [])) t.removeCue(i);
987
+ t.mode = "disabled";
988
+ }
989
+ }
990
+ function Ee(n, e) {
991
+ let t = null;
992
+ for (const { label: i, track: o } of n) {
993
+ const s = i === e;
994
+ o.mode = s ? "hidden" : "disabled", s && (t = o);
995
+ }
996
+ return t;
997
+ }
998
+ async function ke(n, e, t, i) {
999
+ let o;
1000
+ try {
1001
+ const s = await fetch(t);
1002
+ if (!s.ok) throw new Error(`HTTP ${s.status}`);
1003
+ o = await s.text();
1004
+ } catch (s) {
1005
+ console.warn("[HopePlayer] altyazı yüklenemedi:", t, s);
1006
+ return;
1007
+ }
1008
+ if (!(S.get(n) !== i || typeof VTTCue != "function"))
1009
+ for (const s of Ae(o)) {
1010
+ const a = new VTTCue(s.start, s.end, s.text);
1011
+ Le(a, s.settings), e.addCue(a);
1012
+ }
1013
+ }
1014
+ const D = "(?:\\d+:)?\\d{1,2}:\\d{2}(?:[.,]\\d{1,3})?", Ce = new RegExp(`^(${D})\\s+-->\\s+(${D})(.*)$`);
1015
+ function H(n) {
1016
+ return n.replace(",", ".").split(":").reduce((e, t) => e * 60 + Number(t), 0);
1017
+ }
1018
+ function Ae(n) {
1019
+ const e = [], t = n.replace(/^/, "").replace(/\r\n?/g, `
1020
+ `).split(/\n{2,}/);
1021
+ for (const i of t) {
1022
+ const o = i.split(`
1023
+ `), s = o.findIndex((d) => d.includes("-->"));
1024
+ if (s < 0) continue;
1025
+ const a = Ce.exec(o[s].trim());
1026
+ if (!a) continue;
1027
+ const h = o.slice(s + 1).join(`
1028
+ `);
1029
+ h.trim() && e.push({ start: H(a[1]), end: H(a[2]), settings: a[3].trim(), text: h });
1030
+ }
1031
+ return e;
1032
+ }
1033
+ function Le(n, e) {
1034
+ for (const t of e.split(/\s+/)) {
1035
+ const [i, o] = t.split(":");
1036
+ if (!i || !o) continue;
1037
+ const [s] = o.split(",");
1038
+ try {
1039
+ i === "align" ? n.align = s : i === "vertical" ? n.vertical = s : i === "size" ? n.size = parseFloat(s) : i === "position" ? n.position = parseFloat(s) : i === "line" && (n.snapToLines = !s.endsWith("%"), n.line = parseFloat(s));
1040
+ } catch {
1041
+ }
1042
+ }
1043
+ }
1044
+ const T = 6, Te = 20, Se = 14, Pe = 6, Me = 10, Be = 3, W = "hope-caption-row", Y = "hope-caption-font-size", V = "hope-caption-bg-color", _ = "hope-caption-text-color", Re = {
1045
+ small: 0.78,
1046
+ normal: 1,
1047
+ large: 1.35
1048
+ }, q = [
1049
+ "rgba(0, 0, 0, 0.75)",
1050
+ "rgba(0, 0, 0, 0)",
1051
+ "rgba(255, 255, 255, 0.85)",
1052
+ "rgba(183, 28, 28, 0.8)",
1053
+ "rgba(13, 71, 161, 0.8)",
1054
+ "rgba(27, 94, 32, 0.8)"
1055
+ ], G = ["#ffffff", "#000000", "#ffeb3b", "#ff5252", "#18ffff", "#69f0ae"];
1056
+ function ze() {
1057
+ try {
1058
+ const n = window.localStorage.getItem(W), e = n === null ? 0 : Number(n);
1059
+ return Number.isFinite(e) && e >= 0 && e < T ? e : 0;
1060
+ } catch {
1061
+ return 0;
1062
+ }
1063
+ }
1064
+ function Ie() {
1065
+ try {
1066
+ const n = window.localStorage.getItem(Y);
1067
+ return n === "small" || n === "normal" || n === "large" ? n : "normal";
1068
+ } catch {
1069
+ return "normal";
1070
+ }
1071
+ }
1072
+ function X(n, e) {
1073
+ const t = e[0] ?? "";
1074
+ try {
1075
+ const i = window.localStorage.getItem(n);
1076
+ return i !== null && e.includes(i) ? i : t;
1077
+ } catch {
1078
+ return t;
1079
+ }
1080
+ }
1081
+ class k {
1082
+ constructor(e, t, i, o) {
1083
+ r(this, "layerEl");
1084
+ r(this, "bubbleEl");
1085
+ r(this, "videoArea");
1086
+ r(this, "seekBarEl");
1087
+ r(this, "labels");
1088
+ r(this, "activeTrack", null);
1089
+ r(this, "fontSize", Ie());
1090
+ r(this, "bgColor", X(V, q));
1091
+ r(this, "textColor", X(_, G));
1092
+ r(this, "rowIndex", ze());
1093
+ r(this, "dragging", !1);
1094
+ /** Kontrol çubuğu görünür mü — görünürken altyazı seek bar'ın üstünde, değilken en altta. */
1095
+ r(this, "chromeVisible", !0);
1096
+ r(this, "dragStartClientY", 0);
1097
+ r(this, "dragStartBottomPx", 0);
1098
+ r(this, "dragMoved", !1);
1099
+ r(this, "rafId", null);
1100
+ r(this, "pendingDeltaPx", 0);
1101
+ r(this, "resizeObserver");
1102
+ r(this, "onCueChange", () => {
1103
+ var t;
1104
+ const e = (t = this.activeTrack) == null ? void 0 : t.activeCues;
1105
+ if (!this.activeTrack || !e || e.length === 0) {
1106
+ this.bubbleEl.classList.remove("hp-caption-visible"), this.bubbleEl.textContent = "";
1107
+ return;
1108
+ }
1109
+ this.bubbleEl.textContent = "";
1110
+ for (let i = 0; i < e.length; i++) {
1111
+ i > 0 && this.bubbleEl.appendChild(document.createElement("br"));
1112
+ const o = e[i];
1113
+ typeof o.getCueAsHTML == "function" ? this.bubbleEl.appendChild(o.getCueAsHTML()) : this.bubbleEl.appendChild(document.createTextNode(o.text ?? ""));
1114
+ }
1115
+ this.bubbleEl.classList.add("hp-caption-visible");
1116
+ });
1117
+ r(this, "onPointerDown", (e) => {
1118
+ 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));
1119
+ });
1120
+ r(this, "onPointerMove", (e) => {
1121
+ this.dragging && (this.pendingDeltaPx = e.clientY - this.dragStartClientY, Math.abs(this.pendingDeltaPx) > Be && (this.dragMoved = !0), this.rafId === null && (this.rafId = requestAnimationFrame(this.applyPendingDrag)));
1122
+ });
1123
+ r(this, "applyPendingDrag", () => {
1124
+ if (this.rafId = null, !this.dragging) return;
1125
+ const { min: e, max: t } = this.bounds(), i = Math.min(t, Math.max(e, this.dragStartBottomPx - this.pendingDeltaPx)), o = this.dragStartBottomPx - i;
1126
+ this.bubbleEl.style.transform = `translateX(-50%) translateY(${o}px)`;
1127
+ });
1128
+ r(this, "onPointerUp", (e) => {
1129
+ 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;
1130
+ const { min: t, max: i } = this.bounds(), o = Math.min(i, Math.max(t, this.dragStartBottomPx - this.pendingDeltaPx)), s = i > t ? (o - t) / (i - t) : 0, a = Math.round(s * (T - 1));
1131
+ this.setRowIndex(a, !0, o);
1132
+ });
1133
+ this.videoArea = t, this.seekBarEl = i, this.labels = o, 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", o.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();
1134
+ }
1135
+ /** `applyOptions()`'tan — hangi track aktif (ya da null = kapalı). */
1136
+ setActiveTrack(e) {
1137
+ this.activeTrack && this.activeTrack.removeEventListener("cuechange", this.onCueChange), this.activeTrack = e, this.activeTrack && this.activeTrack.addEventListener("cuechange", this.onCueChange), this.onCueChange();
1138
+ }
1139
+ getFontSize() {
1140
+ return this.fontSize;
1141
+ }
1142
+ setFontSize(e) {
1143
+ this.fontSize = e, this.applyFontSizeVar(), this.recomputePosition();
1144
+ try {
1145
+ window.localStorage.setItem(Y, e);
1146
+ } catch {
1147
+ }
1148
+ }
1149
+ getBgColor() {
1150
+ return this.bgColor;
1151
+ }
1152
+ setBgColor(e) {
1153
+ this.bgColor = e, this.bubbleEl.style.setProperty("--hp-caption-bg", e);
1154
+ try {
1155
+ window.localStorage.setItem(V, e);
1156
+ } catch {
1157
+ }
1158
+ }
1159
+ getTextColor() {
1160
+ return this.textColor;
1161
+ }
1162
+ setTextColor(e) {
1163
+ this.textColor = e, this.bubbleEl.style.setProperty("--hp-caption-text", e);
1164
+ try {
1165
+ window.localStorage.setItem(_, e);
1166
+ } catch {
1167
+ }
1168
+ }
1169
+ /** Ayarlar menüsündeki "Konumu sıfırla". */
1170
+ resetPosition() {
1171
+ this.setRowIndex(0, !0);
1172
+ }
1173
+ /** Dil sonradan değişince aria-label'ı tazeler. */
1174
+ refreshLabels(e) {
1175
+ this.labels = e, this.bubbleEl.setAttribute("aria-label", e.captionDragHandle);
1176
+ }
1177
+ applyFontSizeVar() {
1178
+ this.bubbleEl.style.setProperty("--hp-caption-size-multiplier", String(Re[this.fontSize]));
1179
+ }
1180
+ bounds() {
1181
+ const e = this.videoArea.getBoundingClientRect(), t = this.seekBarEl.getBoundingClientRect(), o = (this.bubbleEl.getBoundingClientRect().height || 32) + Te, s = Math.max(Me, Math.round(e.height * 0.04)), a = this.chromeVisible && t.height > 0 ? Math.max(0, Math.round(e.bottom - t.top + (this.videoArea.hasAttribute("data-compact") ? Pe : Se))) : s, h = Math.max(a, Math.round(e.height - o));
1182
+ return { min: a, max: h };
1183
+ }
1184
+ pxForRow(e) {
1185
+ const { min: t, max: i } = this.bounds(), o = e / (T - 1);
1186
+ return Math.round(t + o * (i - t));
1187
+ }
1188
+ /** FLIP: bottom anında yazılır, yalnızca transform animasyonlanır — bottom'u animasyonlamak bırakınca zıplatıyordu. */
1189
+ setRowIndex(e, t, i) {
1190
+ this.rowIndex = Math.min(T - 1, Math.max(0, e));
1191
+ const o = this.pxForRow(this.rowIndex), s = i ?? parseFloat(this.bubbleEl.style.bottom || `${o}`);
1192
+ t && s !== o ? (this.bubbleEl.classList.add("hp-caption-no-transition"), this.bubbleEl.style.bottom = `${o}px`, this.bubbleEl.style.transform = `translateX(-50%) translateY(${s - o}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 = `${o}px`);
1193
+ try {
1194
+ window.localStorage.setItem(W, String(this.rowIndex));
1195
+ } catch {
1196
+ }
1197
+ }
1198
+ /** 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ı). */
1199
+ /** HopePlayerElement.setChromeOpacity'den — kontroller açılıp kapanınca balon yumuşakça yukarı/aşağı kayar (satır korunur). */
1200
+ setChromeVisible(e) {
1201
+ e !== this.chromeVisible && (this.chromeVisible = e, this.dragging || this.setRowIndex(this.rowIndex, !0));
1202
+ }
1203
+ recomputePosition() {
1204
+ this.dragging || this.setRowIndex(this.rowIndex, !1);
1205
+ }
1206
+ destroy() {
1207
+ this.activeTrack && this.activeTrack.removeEventListener("cuechange", this.onCueChange), this.resizeObserver.disconnect(), this.rafId !== null && cancelAnimationFrame(this.rafId), this.bubbleEl.removeEventListener("pointerdown", this.onPointerDown);
1208
+ }
1209
+ }
1210
+ r(k, "BG_COLOR_PRESETS", q), r(k, "TEXT_COLOR_PRESETS", G);
1211
+ class Fe {
1212
+ constructor(e) {
1213
+ r(this, "el");
1214
+ r(this, "bufferedEl");
1215
+ r(this, "playedEl");
1216
+ r(this, "visible", !1);
1217
+ r(this, "rafId", null);
1218
+ r(this, "sync", () => {
1219
+ this.render(), this.visible && !this.video.paused ? this.start() : this.stop();
1220
+ });
1221
+ r(this, "render", () => {
1222
+ const e = this.video.duration, t = Number.isFinite(e) && e > 0;
1223
+ if (this.el.toggleAttribute("data-disabled", !t), !this.visible || !t) return;
1224
+ this.playedEl.style.transform = `scaleX(${Math.min(1, this.video.currentTime / e)})`;
1225
+ const { buffered: i } = this.video;
1226
+ let o = 0;
1227
+ for (let s = 0; s < i.length; s++)
1228
+ i.start(s) <= this.video.currentTime && (o = Math.max(o, i.end(s)));
1229
+ this.bufferedEl.style.transform = `scaleX(${Math.min(1, o / e)})`;
1230
+ });
1231
+ 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);
1232
+ }
1233
+ setVisible(e) {
1234
+ e !== this.visible && (this.visible = e, this.el.toggleAttribute("data-visible", e), this.sync());
1235
+ }
1236
+ destroy() {
1237
+ 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();
1238
+ }
1239
+ start() {
1240
+ if (this.rafId !== null) return;
1241
+ const e = () => {
1242
+ this.render(), this.rafId = requestAnimationFrame(e);
1243
+ };
1244
+ this.rafId = requestAnimationFrame(e);
1245
+ }
1246
+ stop() {
1247
+ this.rafId !== null && cancelAnimationFrame(this.rafId), this.rafId = null;
1248
+ }
1249
+ }
1250
+ const Ne = '@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}', j = "hope-player-icon-font";
1251
+ function Oe() {
1252
+ if (typeof document > "u" || document.getElementById(j)) return;
1253
+ const n = document.createElement("style");
1254
+ n.id = j, n.textContent = Ne, document.head.appendChild(n);
1255
+ }
1256
+ const $ = {
1257
+ play: "Oynat",
1258
+ pause: "Duraklat",
1259
+ mute: "Sessize al",
1260
+ unmute: "Sesi aç",
1261
+ volume: "Ses seviyesi",
1262
+ seekBar: "Video konumu",
1263
+ settings: "Ayarlar",
1264
+ pip: "Resim içinde resim",
1265
+ fullscreenEnter: "Tam ekran",
1266
+ fullscreenExit: "Tam ekrandan çık",
1267
+ playbackSpeed: "Oynatma Hızı",
1268
+ normal: "Normal",
1269
+ quality: "Kalite",
1270
+ captions: "Altyazı",
1271
+ captionsOff: "Kapalı",
1272
+ captionSize: "Yazı Boyutu",
1273
+ captionSizeSmall: "Küçük",
1274
+ captionSizeNormal: "Normal",
1275
+ captionSizeLarge: "Büyük",
1276
+ captionResetPosition: "Konumu sıfırla",
1277
+ captionBgColor: "Arka Plan Rengi",
1278
+ captionTextColor: "Yazı Rengi",
1279
+ captionDragHandle: "Altyazı konumu — tutup sürükleyin",
1280
+ autoQuality: "Oto",
1281
+ loop: "Döngü",
1282
+ close: "Kapat",
1283
+ retry: "Tekrar Dene",
1284
+ errorAborted: "Video yüklemesi iptal edildi.",
1285
+ errorNetwork: "Ağ hatası — video yüklenemedi.",
1286
+ errorDecode: "Video kodu çözülemedi.",
1287
+ errorSrcNotSupported: "Bu video kaynağı desteklenmiyor.",
1288
+ errorGeneric: "Video oynatılırken bir hata oluştu.",
1289
+ errorCode: "Hata kodu",
1290
+ countdownRemaining: "Kalan süre",
1291
+ geoDefaultWarning: "Erişim engellendi.",
1292
+ geoUnknownCountry: "Ülke bilgisi bulunamadı.",
1293
+ redirectCancel: "İptal",
1294
+ redirectPlayNow: "Şimdi Oynat",
1295
+ redirectCountdown: (n) => `Sıradaki video ${n} saniye içinde oynatılacak.`,
1296
+ redirectNowPlaying: "Video oynatılıyor...",
1297
+ qrResumeTitle: "Devam etmek için kodu telefonunuzla okutun",
1298
+ qrResumeDontShowAgain: "Bir daha gösterme",
1299
+ qrResumeContinue: "Devam Et",
1300
+ qrResumeMenuLabel: "QR ile Devam Et",
1301
+ qrResumeOn: "Açık",
1302
+ qrResumeOff: "Kapalı",
1303
+ pauseAdLabel: "Sponsorlu",
1304
+ pauseAdClose: "Reklamı kapat",
1305
+ pauseAdResume: "Videoya devam et",
1306
+ markerLearnMore: "Daha fazla bilgi",
1307
+ markerContinue: "Devam et",
1308
+ playlistTitle: "Oynatma Listesi",
1309
+ playlistPrev: "Önceki",
1310
+ playlistNext: "Sonraki",
1311
+ videoFallbackTitle: (n) => `Video ${n + 1}`,
1312
+ storyPrev: "Önceki video",
1313
+ storyNext: "Sonraki video",
1314
+ storyAllVideos: "Tüm videolar",
1315
+ dubbingTitle: "Ses / Dil",
1316
+ liveClock: "Canlı saat",
1317
+ live: "CANLI",
1318
+ goToLive: "Canlıya git"
1319
+ }, De = {
1320
+ play: "Play",
1321
+ pause: "Pause",
1322
+ mute: "Mute",
1323
+ unmute: "Unmute",
1324
+ volume: "Volume",
1325
+ seekBar: "Seek",
1326
+ settings: "Settings",
1327
+ pip: "Picture-in-picture",
1328
+ fullscreenEnter: "Fullscreen",
1329
+ fullscreenExit: "Exit fullscreen",
1330
+ playbackSpeed: "Playback speed",
1331
+ normal: "Normal",
1332
+ quality: "Quality",
1333
+ captions: "Captions",
1334
+ captionsOff: "Off",
1335
+ captionSize: "Font Size",
1336
+ captionSizeSmall: "Small",
1337
+ captionSizeNormal: "Normal",
1338
+ captionSizeLarge: "Large",
1339
+ captionResetPosition: "Reset position",
1340
+ captionBgColor: "Background Color",
1341
+ captionTextColor: "Text Color",
1342
+ captionDragHandle: "Caption position — drag to move",
1343
+ autoQuality: "Auto",
1344
+ loop: "Loop",
1345
+ close: "Close",
1346
+ retry: "Retry",
1347
+ errorAborted: "Video loading was aborted.",
1348
+ errorNetwork: "Network error — the video could not load.",
1349
+ errorDecode: "The video could not be decoded.",
1350
+ errorSrcNotSupported: "This video source is not supported.",
1351
+ errorGeneric: "An error occurred while playing the video.",
1352
+ errorCode: "Error code",
1353
+ countdownRemaining: "Time remaining",
1354
+ geoDefaultWarning: "Access denied.",
1355
+ geoUnknownCountry: "No country information found.",
1356
+ redirectCancel: "Cancel",
1357
+ redirectPlayNow: "Play now",
1358
+ redirectCountdown: (n) => `Next video will play in ${n} seconds.`,
1359
+ redirectNowPlaying: "Now playing...",
1360
+ qrResumeTitle: "Scan to continue watching on your phone",
1361
+ qrResumeDontShowAgain: "Don't show again",
1362
+ qrResumeContinue: "Continue",
1363
+ qrResumeMenuLabel: "Continue via QR",
1364
+ qrResumeOn: "On",
1365
+ qrResumeOff: "Off",
1366
+ pauseAdLabel: "Sponsored",
1367
+ pauseAdClose: "Close ad",
1368
+ pauseAdResume: "Resume video",
1369
+ markerLearnMore: "Learn more",
1370
+ markerContinue: "Continue",
1371
+ playlistTitle: "Playlist",
1372
+ playlistPrev: "Previous",
1373
+ playlistNext: "Next",
1374
+ videoFallbackTitle: (n) => `Video ${n + 1}`,
1375
+ storyPrev: "Previous video",
1376
+ storyNext: "Next video",
1377
+ storyAllVideos: "All videos",
1378
+ dubbingTitle: "Audio / Language",
1379
+ liveClock: "Live clock",
1380
+ live: "LIVE",
1381
+ goToLive: "Go to live"
1382
+ }, He = { tr: $, en: De };
1383
+ function K(n, e) {
1384
+ return { ...He[n ?? "tr"] ?? $, ...e };
1385
+ }
1386
+ function Ve(n, e, t) {
1387
+ Object.assign(n, K(e, t));
1388
+ }
1389
+ const _e = [0.5, 0.75, 1, 1.25, 1.5, 2], U = 1200, qe = 10, Ge = (
1390
+ /* html */
1391
+ `
1392
+ <div class="video-area">
1393
+ <div class="media-layer">
1394
+ <video part="video" playsinline webkit-playsinline preload="metadata"></video>
1395
+ <div part="ad-layer" class="hp:absolute hp:inset-0 hp:z-10 hp:hidden"></div>
1396
+ </div>
1397
+ </div>
1398
+ `
1399
+ );
1400
+ class Xe extends HTMLElement {
1401
+ constructor() {
1402
+ super();
1403
+ r(this, "root");
1404
+ r(this, "videoArea");
1405
+ r(this, "videoEl");
1406
+ r(this, "adLayerEl");
1407
+ r(this, "chromeEl");
1408
+ r(this, "centerPlayButton");
1409
+ r(this, "captionRenderer");
1410
+ /** options.miniProgress açıkken kurulur. */
1411
+ r(this, "miniProgress", null);
1412
+ r(this, "chromeVisible", !0);
1413
+ r(this, "sourceManager");
1414
+ r(this, "controlBar");
1415
+ r(this, "tooltip");
1416
+ r(this, "keyboard");
1417
+ r(this, "loadingSpinner");
1418
+ r(this, "errorScreen");
1419
+ r(this, "adsController", null);
1420
+ r(this, "gestureControls", null);
1421
+ r(this, "loopSection", null);
1422
+ r(this, "inViewAutoplay", null);
1423
+ r(this, "unregisterSticky", null);
1424
+ r(this, "playlistRunner", null);
1425
+ r(this, "hopeStory", null);
1426
+ r(this, "markProgress", null);
1427
+ r(this, "segments", null);
1428
+ r(this, "spriteThumbnails", null);
1429
+ r(this, "countdownScreen", null);
1430
+ r(this, "geoChecker", null);
1431
+ r(this, "redirectScreen", null);
1432
+ r(this, "qrResume", null);
1433
+ r(this, "pauseAd", null);
1434
+ r(this, "dubbing", null);
1435
+ r(this, "liveWallClock", null);
1436
+ r(this, "daiController", null);
1437
+ r(this, "instanceKey");
1438
+ r(this, "subtitleTracks", []);
1439
+ /** `applyOptions()`'ta aktif bir altyazı track'i seçiliyken `true` — dil değişince Boyut/Konum görünümünü tazelemek için. */
1440
+ r(this, "captionTrackActive", !1);
1441
+ /**
1442
+ * countdownScreen varken gerçek init (kaynak + içerik plugin'leri) ertelenir; en güncel options snapshot'ı.
1443
+ * onComplete kaydı tek sefer yapılır (bkz. playbackInitRegistered) — init birden fazla kez tetiklenmesin.
1444
+ */
1445
+ r(this, "pendingPlaybackOptions", null);
1446
+ r(this, "playbackInitRegistered", !1);
1447
+ /**
1448
+ * countdownScreen gibi alanlar yalnızca .options ile gelir. connectedCallback'teki ilk (options'suz) geçiş chrome'u
1449
+ * bir an açıp player'ı gösteriyordu; 'boot' bloklayıcısı gerçek options gelene kadar bekletir.
1450
+ */
1451
+ r(this, "bootResolved", !1);
1452
+ r(this, "bootGraceTimer", null);
1453
+ r(this, "_options", {});
1454
+ r(this, "hideTimer", null);
1455
+ /** Fare (dokunma değil) player'ın üzerinde mi — üzerindeyken kontroller otomatik gizlenmez. */
1456
+ r(this, "mouseOver", !1);
1457
+ /** Kalite menüsünde şu an HLS seviyeleri mi var (kaynak değişince temizlemek için). */
1458
+ r(this, "hlsQualitiesShown", !1);
1459
+ /** Son uygulanan options.showRemainingTime — bkz. applyOptions. */
1460
+ r(this, "appliedShowRemaining");
1461
+ r(this, "autoHideDelayMs", U);
1462
+ r(this, "tapCandidate", !1);
1463
+ r(this, "tapStartX", 0);
1464
+ r(this, "tapStartY", 0);
1465
+ /** Tüm UI'ın paylaştığı tek, mutable sözlük — dil değişince referans değil alanlar güncellenir. */
1466
+ r(this, "i18n", K("tr"));
1467
+ /** IMA SDK'nın kendi ad-UI dili (skip butonu/sayaç metni) de aynı dili takip etsin diye — bkz. plugins/ads/AdsController. */
1468
+ r(this, "localeCode", "tr");
1469
+ /** Playlist panelinin monte edileceği, .video-area'nın ALTINDAKİ (shadow root içi) kapsayıcı — ilk ihtiyaçta oluşturulur. */
1470
+ r(this, "panelContainer", null);
1471
+ r(this, "onHlsLevelsChanged", (t, i) => {
1472
+ if (t.length === 0 && this.hlsQualitiesShown) {
1473
+ this.hlsQualitiesShown = !1, this.controlBar.setQualities([], "");
1474
+ return;
1475
+ }
1476
+ if (t.length <= 1) return;
1477
+ this.hlsQualitiesShown = !0;
1478
+ const o = (s) => `${s.height}p`;
1479
+ this.controlBar.setQualities(
1480
+ [
1481
+ { label: this.i18n.autoQuality, onSelect: () => this.sourceManager.setLevel(-1) },
1482
+ // Yüksekten düşüğe (hls.js artan sıralıyor) — l.index hls.js'teki gerçek seviye numarası, sıradan bağımsız.
1483
+ ...[...t].sort((s, a) => a.height - s.height).map((s) => ({ label: o(s), onSelect: () => this.sourceManager.setLevel(s.index) }))
1484
+ ],
1485
+ i === -1 ? this.i18n.autoQuality : o(t[i])
1486
+ );
1487
+ });
1488
+ r(this, "onFullscreenChange", () => {
1489
+ this.controlBar.setFullscreenState(this.isFullscreenActive());
1490
+ });
1491
+ // ── Oynatma durumuna göre merkez buton + otomatik gizlenme ──
1492
+ // Değer: 'hidden' (tamamen gizle — countdown/geo) ya da 'reduced' (yalnızca oynat/duraklat + ses — ads).
1493
+ r(this, "chromeBlockers", /* @__PURE__ */ new Map());
1494
+ r(this, "onPlay", () => {
1495
+ this.isChromeBlocked || (this.centerPlayButton.style.opacity = "0", this.centerPlayButton.style.pointerEvents = "none", this.scheduleAutoHide()), this.dispatchEvent(new CustomEvent("hp:play"));
1496
+ });
1497
+ r(this, "onPause", () => {
1498
+ this.hideTimer && clearTimeout(this.hideTimer), this.isChromeBlocked || (this.centerPlayButton.style.opacity = "1", this.centerPlayButton.style.pointerEvents = "auto", this.showChrome()), this.dispatchEvent(new CustomEvent("hp:pause"));
1499
+ });
1500
+ r(this, "onPointerDownFocus", () => {
1501
+ var t;
1502
+ this.focus(), (t = this.adsController) == null || t.initializeDisplayContainerOnce();
1503
+ });
1504
+ r(this, "onVideoPressStart", (t) => {
1505
+ this.tapCandidate = !0;
1506
+ const i = "touches" in t ? t.touches[0] : t;
1507
+ i && (this.tapStartX = i.clientX, this.tapStartY = i.clientY);
1508
+ });
1509
+ r(this, "onVideoPressEnd", (t) => {
1510
+ var o;
1511
+ if (!this.tapCandidate || (this.tapCandidate = !1, this.isChromeBlocked) || (o = this.gestureControls) != null && o.isCurrentlyHolding()) return;
1512
+ const i = "changedTouches" in t ? t.changedTouches[0] : t;
1513
+ i && Math.hypot(i.clientX - this.tapStartX, i.clientY - this.tapStartY) > qe || (this.videoEl.paused ? this.videoEl.play().catch(() => {
1514
+ }) : this.videoEl.pause());
1515
+ });
1516
+ r(this, "onVideoPressCancel", () => {
1517
+ this.tapCandidate = !1;
1518
+ });
1519
+ r(this, "onPointerEnter", (t) => {
1520
+ t.pointerType === "mouse" && (this.mouseOver = !0);
1521
+ });
1522
+ r(this, "onPointerLeave", (t) => {
1523
+ t.pointerType === "mouse" && (this.mouseOver = !1, this.scheduleAutoHide());
1524
+ });
1525
+ r(this, "scheduleAutoHide", () => {
1526
+ this.showChrome(), this.hideTimer && clearTimeout(this.hideTimer), !this.videoEl.paused && (this.hideTimer = setTimeout(() => {
1527
+ this.videoEl.paused || this.mouseOver || this.controlBar.settingsMenu.isOpen || this.setChromeOpacity("0");
1528
+ }, this.autoHideDelayMs));
1529
+ });
1530
+ Oe(), this.root = this.attachShadow({ mode: "open" });
1531
+ const t = document.createElement("style");
1532
+ t.textContent = ee, this.root.appendChild(t);
1533
+ const i = document.createElement("div");
1534
+ i.className = "hp-root", i.innerHTML = Ge, this.root.appendChild(i), 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 fe(this.videoEl), this.root.querySelector(".media-layer").appendChild(this.loadingSpinner.el), this.errorScreen = new we(this.videoEl, this.i18n), this.errorScreen.setOnRetry(() => void this.sourceManager.reload()), this.videoArea.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-center-play 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";
1535
+ const o = document.createElement("span");
1536
+ o.className = "hp-chip hp:flex hp:items-center hp:justify-center hp:w-16 hp:h-16", o.style.borderRadius = "9999px", o.appendChild(g("play", "hp:text-2xl")), this.centerPlayButton.appendChild(o), this.centerPlayButton.addEventListener("click", () => {
1537
+ this.videoEl.paused && this.videoEl.play();
1538
+ }), this.videoArea.appendChild(this.centerPlayButton), this.chromeEl = document.createElement("div"), this.chromeEl.className = "hp-chrome hp:absolute hp:inset-0 hp:z-20 hp:pointer-events-none", this.videoArea.appendChild(this.chromeEl), this.sourceManager = new ie(this.videoEl, this.onHlsLevelsChanged), this.errorScreen.setShouldShow(() => !this.sourceManager.isRecovering()), this.controlBar = new ce(
1539
+ this.videoEl,
1540
+ _e,
1541
+ {
1542
+ onRequestFullscreen: () => this.requestFullscreenCompat(),
1543
+ onExitFullscreen: () => this.exitFullscreenCompat(),
1544
+ isFullscreen: () => this.isFullscreenActive(),
1545
+ // adsController sonradan kurulur — closure'lar her çağrıda güncel this.adsController'ı okur.
1546
+ isAdActive: () => this.isAdPlaying(),
1547
+ adTogglePlay: () => {
1548
+ var s;
1549
+ return (s = this.adsController) == null ? void 0 : s.toggleAdPlayPause();
1550
+ },
1551
+ adIsPaused: () => {
1552
+ var s;
1553
+ return ((s = this.adsController) == null ? void 0 : s.isAdPaused()) ?? !0;
1554
+ },
1555
+ adVolume: {
1556
+ isAdActive: () => this.isAdPlaying(),
1557
+ getVolume: () => {
1558
+ var s;
1559
+ return ((s = this.adsController) == null ? void 0 : s.getAdVolume()) ?? 1;
1560
+ },
1561
+ setVolume: (s) => {
1562
+ var a;
1563
+ return (a = this.adsController) == null ? void 0 : a.setAdVolume(s);
1564
+ },
1565
+ toggleMute: () => {
1566
+ var s;
1567
+ return (s = this.adsController) == null ? void 0 : s.toggleAdMute();
1568
+ }
1569
+ }
1570
+ },
1571
+ this.i18n
1572
+ ), 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 ge(
1573
+ this,
1574
+ this.videoEl,
1575
+ () => this.isFullscreenActive() ? this.exitFullscreenCompat() : this.requestFullscreenCompat()
1576
+ ), this.tooltip = new ve(this.videoArea), this.blockChrome("boot");
1577
+ }
1578
+ static get observedAttributes() {
1579
+ return ["src", "poster", "autoplay", "muted", "loop", "theme", "locale"];
1580
+ }
1581
+ connectedCallback() {
1582
+ this.tabIndex = this.tabIndex || 0, this.syncFromAttributes(), this.bootResolved || (this.bootGraceTimer = setTimeout(() => {
1583
+ this.bootGraceTimer = null, this.bootResolved || (this.bootResolved = !0, this.syncFromAttributes());
1584
+ }, 80)), this.videoEl.addEventListener("play", this.onPlay), this.videoEl.addEventListener("pause", this.onPause), this.addEventListener("pointermove", this.scheduleAutoHide), this.addEventListener("pointerenter", this.onPointerEnter), this.addEventListener("pointerleave", this.onPointerLeave), this.addEventListener("pointerdown", this.onPointerDownFocus), document.addEventListener("fullscreenchange", this.onFullscreenChange), document.addEventListener("webkitfullscreenchange", this.onFullscreenChange), this.videoEl.addEventListener("webkitbeginfullscreen", this.onFullscreenChange), this.videoEl.addEventListener("webkitendfullscreen", this.onFullscreenChange), this.controlBar.settingsMenu.onOpenChange = (t) => {
1585
+ t && this.hideTimer && clearTimeout(this.hideTimer), t || this.scheduleAutoHide();
1586
+ }, 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"));
1587
+ }
1588
+ disconnectedCallback() {
1589
+ var t, i, o, s, a, h, d, l, p, c, u, b, f, v, y, m, B, R, z;
1590
+ (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("pointerenter", this.onPointerEnter), this.removeEventListener("pointerleave", this.onPointerLeave), this.removeEventListener("pointerdown", this.onPointerDownFocus), this.controlBar.settingsMenu.onOpenChange = null, document.removeEventListener("fullscreenchange", this.onFullscreenChange), document.removeEventListener("webkitfullscreenchange", this.onFullscreenChange), this.videoEl.removeEventListener("webkitbeginfullscreen", this.onFullscreenChange), this.videoEl.removeEventListener("webkitendfullscreen", 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(), (i = this.adsController) == null || i.destroy(), (o = this.gestureControls) == null || o.destroy(), (s = this.loopSection) == null || s.destroy(), (a = this.inViewAutoplay) == null || a.destroy(), (h = this.unregisterSticky) == null || h.call(this), (d = this.playlistRunner) == null || d.destroy(), (l = this.hopeStory) == null || l.destroy(), (p = this.markProgress) == null || p.destroy(), (c = this.segments) == null || c.destroy(), (u = this.spriteThumbnails) == null || u.destroy(), (b = this.countdownScreen) == null || b.destroy(), (f = this.geoChecker) == null || f.destroy(), (v = this.redirectScreen) == null || v.destroy(), (y = this.qrResume) == null || y.destroy(), (m = this.pauseAd) == null || m.destroy(), this.pauseAd = null, (B = this.dubbing) == null || B.destroy(), (R = this.liveWallClock) == null || R.destroy(), (z = this.daiController) == null || z.destroy(), this.hideTimer && clearTimeout(this.hideTimer), this.bootGraceTimer && clearTimeout(this.bootGraceTimer);
1591
+ }
1592
+ /** Reklam/consent-farkında plugin'lerin (gesture/sticky/in-view-autoplay) ortak sorgusu. */
1593
+ isAdPlaying() {
1594
+ return this.chromeBlockers.has("ads");
1595
+ }
1596
+ attributeChangedCallback() {
1597
+ this.syncFromAttributes();
1598
+ }
1599
+ get options() {
1600
+ return this._options;
1601
+ }
1602
+ set options(t) {
1603
+ this._options = t ?? {}, this.bootGraceTimer && (clearTimeout(this.bootGraceTimer), this.bootGraceTimer = null), this.bootResolved = !0, this.syncFromAttributes();
1604
+ }
1605
+ play() {
1606
+ return this.videoEl.play();
1607
+ }
1608
+ pause() {
1609
+ this.videoEl.pause();
1610
+ }
1611
+ /** Şu anki oynatma yolu: `native` (MP4/WebM), `native-hls` (tarayıcının HLS'i) ya da `hls.js` — teşhis için. */
1612
+ get playbackEngine() {
1613
+ return this.sourceManager.engine;
1614
+ }
1615
+ /** `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. */
1616
+ showQrResume() {
1617
+ var t;
1618
+ (t = this.qrResume) == null || t.show();
1619
+ }
1620
+ get showRemainingTime() {
1621
+ return this.controlBar.getShowRemaining();
1622
+ }
1623
+ set showRemainingTime(t) {
1624
+ this.controlBar.setShowRemaining(t);
1625
+ }
1626
+ toggleTimeDisplay() {
1627
+ this.controlBar.toggleTimeMode();
1628
+ }
1629
+ syncFromAttributes() {
1630
+ const t = {
1631
+ src: this.getAttribute("src") ?? void 0,
1632
+ poster: this.getAttribute("poster") ?? void 0,
1633
+ autoplay: this.hasAttribute("autoplay"),
1634
+ muted: this.hasAttribute("muted"),
1635
+ loop: this.hasAttribute("loop"),
1636
+ theme: this.getAttribute("theme") ?? void 0,
1637
+ locale: this.getAttribute("locale") ?? void 0
1638
+ };
1639
+ this.applyOptions({ ...t, ...this._options });
1640
+ }
1641
+ async applyOptions(t) {
1642
+ var o, s, a, h, d, l, p, c, u, b, f, v, y;
1643
+ if (t.poster && (this.videoEl.poster = t.poster), this.videoEl.autoplay = !!t.autoplay, this.videoEl.muted = !!t.muted, this.videoEl.loop = !!t.loop, this.videoEl.preload = t.preload ?? "metadata", this.videoEl.playsInline = !0, this.videoEl.setAttribute("webkit-playsinline", ""), this.autoHideDelayMs = t.autoHideDelayMs ?? U, 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 && t.showRemainingTime !== this.appliedShowRemaining && (this.appliedShowRemaining = t.showRemainingTime, this.controlBar.setShowRemaining(t.showRemainingTime)), t.theme ? this.setAttribute("data-theme", t.theme) : this.removeAttribute("data-theme"), this.localeCode = t.locale ?? "tr", Ve(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(), (o = this.playlistRunner) == null || o.refreshLabels(), (s = this.hopeStory) == null || s.refreshLabels(), (a = this.countdownScreen) == null || a.refreshLabels(), (h = this.geoChecker) == null || h.refreshLabels(), (d = this.redirectScreen) == null || d.refreshLabels(), (l = this.qrResume) == null || l.refreshLabels(), (p = this.pauseAd) == null || p.refreshLabels(), (c = this.dubbing) == null || c.refreshLabels(), (u = this.liveWallClock) == null || u.refreshLabels(), (b = this.loopSection) == null || b.refreshLabels(), (f = this.markProgress) == null || f.refreshLabels(), (y = (v = this.unregisterSticky) == null ? void 0 : v.refreshLabels) == null || y.call(v), !this.bootResolved)
1644
+ return;
1645
+ const i = () => ({
1646
+ videoEl: this.videoEl,
1647
+ overlayContainerEl: this.videoArea,
1648
+ blockChrome: () => this.blockChrome("countdown-geo"),
1649
+ unblockChrome: () => this.unblockChrome("countdown-geo"),
1650
+ i18n: this.i18n
1651
+ });
1652
+ if (t.countdownScreen && !this.countdownScreen) {
1653
+ const { installCountdownScreen: m } = await import("./index-rENB3n9O.js");
1654
+ this.countdownScreen = m(i(), t.countdownScreen);
1655
+ }
1656
+ if (t.geoChecker && !this.geoChecker) {
1657
+ const { installGeoChecker: m } = await import("./index-BBmuCtKu.js");
1658
+ this.geoChecker = m(i(), t.geoChecker);
1659
+ }
1660
+ this.unblockChrome("boot"), this.countdownScreen && !this.countdownScreen.isComplete() ? (this.pendingPlaybackOptions = t, this.playbackInitRegistered || (this.playbackInitRegistered = !0, this.countdownScreen.onComplete(() => {
1661
+ const m = this.pendingPlaybackOptions;
1662
+ this.pendingPlaybackOptions = null, m && this.initPlayback(m);
1663
+ }))) : await this.initPlayback(t);
1664
+ }
1665
+ async initPlayback(t) {
1666
+ var o, s, a, h, d;
1667
+ const i = (o = t.sources) != null && o.length ? t.sources : t.src ? [{ src: t.src, label: this.i18n.autoQuality }] : [];
1668
+ if (i.length <= 1 && (this.controlBar.setQualities([], ""), this.hlsQualitiesShown = !1), i.length > 0) {
1669
+ const l = i.find((p) => p.selected) ?? i[0];
1670
+ await this.sourceManager.load(l.src, l.type), t.autoplay && this.videoEl.play().catch(() => {
1671
+ });
1672
+ }
1673
+ if (i.length > 1 && this.controlBar.setQualities(
1674
+ i.map((l) => ({
1675
+ label: l.label,
1676
+ onSelect: () => void this.switchQualitySource(l)
1677
+ })),
1678
+ ((s = i.find((l) => l.selected)) == null ? void 0 : s.label) ?? i[0].label
1679
+ ), t.ads && !this.adsController) {
1680
+ const l = t.ads === !0 ? {} : t.ads, { installAds: p } = await import("./index-glxDu2eJ.js");
1681
+ this.adsController = await p(
1682
+ {
1683
+ videoEl: this.videoEl,
1684
+ hostEl: this,
1685
+ adLayerEl: this.adLayerEl,
1686
+ hideChrome: () => this.blockChrome("ads", "reduced"),
1687
+ showChrome: () => this.unblockChrome("ads"),
1688
+ // IMA'nın KENDİ UI'ı üzerinden (ör. reklam video'suna
1689
+ // tıklama) duraklatılır/devam ettirilirse toolbar'ımızın
1690
+ // ikonu da senkron kalsın diye.
1691
+ onAdPlayStateChange: () => this.controlBar.refreshAdPlayState(),
1692
+ locale: this.localeCode
1693
+ },
1694
+ l
1695
+ );
1696
+ }
1697
+ if (t.gesture && !this.gestureControls) {
1698
+ const l = t.gesture === !0 ? {} : t.gesture, { installGesture: p } = await import("./index-Ca8hocby.js");
1699
+ this.gestureControls = p(
1700
+ { videoEl: this.videoEl, overlayContainerEl: this.videoArea, isAdActive: () => this.isAdPlaying() },
1701
+ l
1702
+ );
1703
+ }
1704
+ if (t.loopSection && !this.loopSection) {
1705
+ const l = t.loopSection === !0 ? {} : t.loopSection, { installLoopSection: p } = await import("./index-f0vSgRIK.js");
1706
+ this.loopSection = p(
1707
+ {
1708
+ videoEl: this.videoEl,
1709
+ seekBarEl: this.controlBar.seekBar.el,
1710
+ markers: this.controlBar.seekBar,
1711
+ addControlButton: (c, u, b) => this.controlBar.addButton(c, u, b),
1712
+ i18n: this.i18n
1713
+ },
1714
+ l
1715
+ );
1716
+ }
1717
+ if (t.inViewAutoplay && !this.inViewAutoplay) {
1718
+ const l = t.inViewAutoplay === !0 ? {} : t.inViewAutoplay, { installInViewAutoplay: p } = await import("./index-3QALpwsf.js");
1719
+ this.inViewAutoplay = p(
1720
+ { videoEl: this.videoEl, observeEl: this, isAdActive: () => this.isAdPlaying() },
1721
+ l
1722
+ );
1723
+ }
1724
+ if (t.sticky && !this.unregisterSticky) {
1725
+ const l = t.sticky === !0 ? {} : t.sticky, { installSticky: p } = await import("./index-CDDke5rz.js");
1726
+ this.unregisterSticky = p(
1727
+ {
1728
+ key: this.instanceKey,
1729
+ videoEl: this.videoEl,
1730
+ hostEl: this,
1731
+ wrapperEl: this,
1732
+ closeButtonMountEl: this.videoArea,
1733
+ isAdActive: () => this.isAdPlaying(),
1734
+ i18n: this.i18n
1735
+ },
1736
+ l
1737
+ );
1738
+ }
1739
+ if (t.playlist && !this.playlistRunner) {
1740
+ const { installPlaylist: l } = await import("./index-Xf3PnlMU.js");
1741
+ this.playlistRunner = l(
1742
+ {
1743
+ videoEl: this.videoEl,
1744
+ hostEl: this,
1745
+ panelEl: this.getOrCreatePanelContainer(),
1746
+ loadSource: (p, c) => this.sourceManager.load(p, c),
1747
+ setPoster: (p) => {
1748
+ this.videoEl.poster = p;
1749
+ },
1750
+ requestFreshAd: (p) => {
1751
+ var c;
1752
+ return (c = this.adsController) == null ? void 0 : c.resetForNewItem(p);
1753
+ },
1754
+ i18n: this.i18n
1755
+ },
1756
+ t.playlist
1757
+ );
1758
+ }
1759
+ if (t.story && !this.hopeStory) {
1760
+ const { installStory: l } = await import("./index-CgkX9qaH.js");
1761
+ this.hopeStory = l(
1762
+ {
1763
+ videoEl: this.videoEl,
1764
+ hostEl: this,
1765
+ videoAreaEl: this.videoArea,
1766
+ playerBodyEls: [this.root.querySelector(".media-layer"), this.chromeEl, this.centerPlayButton],
1767
+ loadSource: (p, c) => this.sourceManager.load(p, c),
1768
+ setPoster: (p) => {
1769
+ this.videoEl.poster = p;
1770
+ },
1771
+ requestFreshAd: (p) => {
1772
+ var c;
1773
+ return (c = this.adsController) == null ? void 0 : c.resetForNewItem(p);
1774
+ },
1775
+ i18n: this.i18n
1776
+ },
1777
+ t.story
1778
+ );
1779
+ }
1780
+ if (t.markers && !this.markProgress) {
1781
+ const { installMarkers: l } = await import("./index-C6xzBfNn.js");
1782
+ this.markProgress = l(
1783
+ {
1784
+ videoEl: this.videoEl,
1785
+ overlayContainerEl: this.videoArea,
1786
+ addSeekBarMarker: (p, c) => this.controlBar.seekBar.addMarker(p, c),
1787
+ i18n: this.i18n
1788
+ },
1789
+ t.markers
1790
+ );
1791
+ }
1792
+ if ((a = t.segments) != null && a.length && !this.segments) {
1793
+ const { installSegments: l } = await import("./index-IcJCsJYH.js");
1794
+ this.segments = l({ videoEl: this.videoEl, seekBar: this.controlBar.seekBar }, t.segments);
1795
+ }
1796
+ if (t.spriteThumbnails && !this.spriteThumbnails) {
1797
+ const { installSpriteThumbnails: l } = await import("./index-TQsycon_.js");
1798
+ this.spriteThumbnails = l(
1799
+ {
1800
+ videoEl: this.videoEl,
1801
+ seekBar: this.controlBar.seekBar,
1802
+ playerWidth: () => this.videoArea.clientWidth
1803
+ },
1804
+ t.spriteThumbnails
1805
+ );
1806
+ }
1807
+ if (t.redirectScreen && !this.redirectScreen) {
1808
+ const { installRedirectScreen: l } = await import("./index-D6r-BGAV.js");
1809
+ this.redirectScreen = l(
1810
+ { videoEl: this.videoEl, overlayContainerEl: this.videoArea, isAdActive: () => this.isAdPlaying(), i18n: this.i18n },
1811
+ t.redirectScreen
1812
+ );
1813
+ }
1814
+ if (t.qrResume && !this.qrResume) {
1815
+ const { installQrResume: l } = await import("./index-DT8-oMPm.js");
1816
+ this.qrResume = l({ videoEl: this.videoEl, overlayContainerEl: this.videoArea, i18n: this.i18n }, t.qrResume);
1817
+ }
1818
+ if (this.qrResume) {
1819
+ const l = this.qrResume;
1820
+ this.controlBar.settingsMenu.setQrResumeToggle({
1821
+ label: this.i18n.qrResumeMenuLabel,
1822
+ getValueLabel: () => l.isEnabled() ? this.i18n.qrResumeOn : this.i18n.qrResumeOff,
1823
+ onToggle: () => l.setEnabled(!l.isEnabled())
1824
+ });
1825
+ }
1826
+ if ((h = t.pauseAd) != null && h.adUnitPath && !this.pauseAd) {
1827
+ const { installPauseAd: l } = await import("./index-CaMVTgh0.js");
1828
+ this.pauseAd = l(
1829
+ { videoEl: this.videoEl, hostEl: this, videoArea: this.videoArea, i18n: this.i18n, isBlocked: () => this.isChromeBlocked },
1830
+ t.pauseAd
1831
+ );
1832
+ }
1833
+ if (t.dubbing && !this.dubbing) {
1834
+ const { installDubbing: l } = await import("./index-DXWK4EFa.js");
1835
+ this.dubbing = l(
1836
+ {
1837
+ videoEl: this.videoEl,
1838
+ loadSource: (p, c) => this.sourceManager.load(p, c),
1839
+ registerSubmenu: (p) => this.controlBar.settingsMenu.registerSubmenu(p),
1840
+ unregisterSubmenu: (p) => this.controlBar.settingsMenu.unregisterSubmenu(p),
1841
+ i18n: this.i18n
1842
+ },
1843
+ t.dubbing
1844
+ );
1845
+ }
1846
+ if (t.liveWallClock && !this.liveWallClock) {
1847
+ const l = t.liveWallClock === !0 ? {} : t.liveWallClock, { installLiveWallClock: p } = await import("./index-Z7Jmls0c.js");
1848
+ this.liveWallClock = p(
1849
+ {
1850
+ videoEl: this.videoEl,
1851
+ seekBarEl: this.controlBar.seekBar.el,
1852
+ addControlElement: (c) => this.controlBar.addElement(c),
1853
+ i18n: this.i18n
1854
+ },
1855
+ l
1856
+ );
1857
+ }
1858
+ if (t.dai && !this.daiController) {
1859
+ const { installDai: l } = await import("./index-Q8FMOHj0.js");
1860
+ this.daiController = await l(
1861
+ {
1862
+ videoEl: this.videoEl,
1863
+ hostEl: this,
1864
+ adUiEl: this.adLayerEl,
1865
+ loadStreamUrl: (p) => this.sourceManager.load(p),
1866
+ disableSeeking: () => this.disableSeeking(),
1867
+ enableSeeking: () => this.enableSeeking()
1868
+ },
1869
+ t.dai
1870
+ );
1871
+ }
1872
+ if ((d = t.subtitles) != null && d.length) {
1873
+ this.subtitleTracks = xe(this.videoEl, t.subtitles);
1874
+ const l = t.subtitles.find((c) => c.default), p = (c) => {
1875
+ const u = Ee(this.subtitleTracks, c);
1876
+ this.captionRenderer.setActiveTrack(u), this.captionTrackActive = u !== null, this.controlBar.settingsMenu.setCaptionAppearance(u !== null ? this.buildCaptionAppearance() : null);
1877
+ };
1878
+ this.controlBar.setCaptions(
1879
+ [
1880
+ { label: this.i18n.captionsOff, onSelect: () => p(null) },
1881
+ ...this.subtitleTracks.map(({ label: c }) => ({
1882
+ label: c,
1883
+ onSelect: () => p(c)
1884
+ }))
1885
+ ],
1886
+ (l == null ? void 0 : l.label) ?? this.i18n.captionsOff
1887
+ ), p((l == null ? void 0 : l.label) ?? null);
1888
+ } else
1889
+ Q(this.videoEl), this.subtitleTracks = [], this.captionRenderer.setActiveTrack(null), this.captionTrackActive = !1, this.controlBar.settingsMenu.setCaptionAppearance(null);
1890
+ }
1891
+ /** 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). */
1892
+ buildCaptionAppearance() {
1893
+ const t = ["small", "normal", "large"], i = (o, s, a, h) => o.map((d, l) => ({
1894
+ value: d,
1895
+ active: s() === d,
1896
+ ariaLabel: `${h} ${l + 1}`,
1897
+ onSelect: () => a(d)
1898
+ }));
1899
+ return {
1900
+ sizeLabel: this.i18n.captionSize,
1901
+ getSizeOptions: () => t.map((o) => ({
1902
+ label: o === "small" ? this.i18n.captionSizeSmall : o === "large" ? this.i18n.captionSizeLarge : this.i18n.captionSizeNormal,
1903
+ active: this.captionRenderer.getFontSize() === o,
1904
+ onSelect: () => this.captionRenderer.setFontSize(o)
1905
+ })),
1906
+ bgColorLabel: this.i18n.captionBgColor,
1907
+ getBgColorOptions: () => i(
1908
+ k.BG_COLOR_PRESETS,
1909
+ () => this.captionRenderer.getBgColor(),
1910
+ (o) => this.captionRenderer.setBgColor(o),
1911
+ this.i18n.captionBgColor
1912
+ ),
1913
+ textColorLabel: this.i18n.captionTextColor,
1914
+ getTextColorOptions: () => i(
1915
+ k.TEXT_COLOR_PRESETS,
1916
+ () => this.captionRenderer.getTextColor(),
1917
+ (o) => this.captionRenderer.setTextColor(o),
1918
+ this.i18n.captionTextColor
1919
+ ),
1920
+ resetPositionLabel: this.i18n.captionResetPosition,
1921
+ onResetPosition: () => this.captionRenderer.resetPosition()
1922
+ };
1923
+ }
1924
+ getOrCreatePanelContainer() {
1925
+ return this.panelContainer || (this.panelContainer = document.createElement("div"), this.root.appendChild(this.panelContainer)), this.panelContainer;
1926
+ }
1927
+ /** Kalite değişirken oynatma konumunu ve play/pause durumunu korur. */
1928
+ async switchQualitySource(t) {
1929
+ const i = this.videoEl.currentTime, o = !this.videoEl.paused;
1930
+ await this.sourceManager.load(t.src, t.type), this.videoEl.currentTime = i, o && this.videoEl.play().catch(() => {
1931
+ }), this.dispatchEvent(new CustomEvent("hp:qualitychange", { detail: { label: t.label } }));
1932
+ }
1933
+ // ── Fullscreen (vendor-prefix uyumlu) ───────────────────────────────
1934
+ /** iPhone Safari element tam ekranını desteklemiyor — yalnızca <video>'nun kendi (native kontrollü) tam ekranı. */
1935
+ get iosVideo() {
1936
+ return this.videoEl;
1937
+ }
1938
+ requestFullscreenCompat() {
1939
+ const t = this, i = () => {
1940
+ var o, s;
1941
+ return (s = (o = this.iosVideo).webkitEnterFullscreen) == null ? void 0 : s.call(o);
1942
+ };
1943
+ t.requestFullscreen ? t.requestFullscreen().catch(i) : t.webkitRequestFullscreen ? t.webkitRequestFullscreen() : i();
1944
+ }
1945
+ exitFullscreenCompat() {
1946
+ var i, o;
1947
+ if (this.iosVideo.webkitDisplayingFullscreen) {
1948
+ (o = (i = this.iosVideo).webkitExitFullscreen) == null || o.call(i);
1949
+ return;
1950
+ }
1951
+ const t = document;
1952
+ document.exitFullscreen ? document.exitFullscreen() : t.webkitExitFullscreen && t.webkitExitFullscreen();
1953
+ }
1954
+ isFullscreenActive() {
1955
+ const t = document;
1956
+ return document.fullscreenElement === this || t.webkitFullscreenElement === this || !!this.iosVideo.webkitDisplayingFullscreen;
1957
+ }
1958
+ get isChromeBlocked() {
1959
+ return this.chromeBlockers.size > 0;
1960
+ }
1961
+ get isChromeFullyHidden() {
1962
+ for (const t of this.chromeBlockers.values()) if (t === "hidden") return !0;
1963
+ return !1;
1964
+ }
1965
+ showChrome() {
1966
+ this.setChromeOpacity("1");
1967
+ }
1968
+ /** Chrome görünürlüğünün tek giriş noktası — altyazı da haberdar olur (kontroller gizlenince en alta iner). */
1969
+ setChromeOpacity(t) {
1970
+ var i;
1971
+ this.chromeEl.style.opacity = t, this.chromeVisible = t === "1", (i = this.captionRenderer) == null || i.setChromeVisible(this.chromeVisible), this.updateMiniProgress();
1972
+ }
1973
+ /** İnce ilerleme çizgisi: yalnızca kontroller gizliyken; reklam/giriş ekranı (chrome bloklu) sırasında değil. */
1974
+ updateMiniProgress() {
1975
+ var t;
1976
+ (t = this.miniProgress) == null || t.setVisible(!this.chromeVisible && !this.isChromeBlocked);
1977
+ }
1978
+ /**
1979
+ * Plugin (ads/countdown/geo) chrome'u kendi key'iyle gizler; unblockChrome aynı key'le açar.
1980
+ * 'reduced' (ads): yalnızca oynat/duraklat + ses kalır. Merkez buton her modda gizli.
1981
+ */
1982
+ blockChrome(t, i = "hidden") {
1983
+ this.chromeBlockers.set(t, i), 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");
1984
+ }
1985
+ /** Bloklayan plugin işini bitirince çağırır — başka bir blocker hâlâ aktifse chrome açılmaz. */
1986
+ unblockChrome(t) {
1987
+ if (this.chromeBlockers.delete(t), this.updateMiniProgress(), this.controlBar.setAdMode(this.chromeBlockers.get("ads") === "reduced"), this.isChromeBlocked) {
1988
+ this.isChromeFullyHidden ? (this.setChromeOpacity("0"), this.chromeEl.style.pointerEvents = "none") : (this.setChromeOpacity("1"), this.chromeEl.style.pointerEvents = "");
1989
+ return;
1990
+ }
1991
+ this.chromeEl.style.pointerEvents = "", this.videoEl.paused ? (this.centerPlayButton.style.opacity = "1", this.centerPlayButton.style.pointerEvents = "auto", this.showChrome()) : this.scheduleAutoHide();
1992
+ }
1993
+ /** DAI reklam arası boyunca kullanıcı reklamın İÇİNE seek edemesin diye (sunucu taraflı eklenen reklamlar seekable aralığın parçası). */
1994
+ disableSeeking() {
1995
+ this.controlBar.seekBar.el.style.pointerEvents = "none", this.controlBar.seekBar.el.style.opacity = "0.5";
1996
+ }
1997
+ enableSeeking() {
1998
+ this.controlBar.seekBar.el.style.pointerEvents = "", this.controlBar.seekBar.el.style.opacity = "";
1999
+ }
2000
+ }
2001
+ typeof window < "u" && !customElements.get("hope-player") && customElements.define("hope-player", Xe);
2002
+ export {
2003
+ Xe as H,
2004
+ g as c,
2005
+ w as f
2006
+ };
2007
+ //# sourceMappingURL=index-BvFMYXAE.js.map