The Ultimate Video Player For WordPress – by Presto Player - Version 1.10.0

Version Description

  • October 21, 2022
Download this release

Release Info

Developer patilvikasj
Plugin Icon 128x128 The Ultimate Video Player For WordPress – by Presto Player
Version 1.10.0
Comparing to
See all releases

Code changes from version 1.10.0-beta1 to 1.10.0

dist/components/cjs/{hls-a9e30850.js → hls-55b568d7.js} RENAMED
@@ -1,7 +1,7 @@
1
  'use strict';
2
 
3
  const index = require('./index-c2577253.js');
4
- const prestoActionBar_prestoActionBarController_prestoActionBarUi_prestoAudio_prestoBunny_prestoBusinessSkin_prestoCtaOverlay_prestoCtaOverlayController_prestoCtaOverlayUi_prestoDynamicOverlayUi_prestoDynamicOverlays_prestoEmailOverlay_prestoEmailOverlayController_prestoEmailOverlayUi_prestoModernSkin_prestoMutedOverlay_prestoPlayer_prestoPlayerButton_prestoPlayerSpinner_prestoStackedSkin_prestoTimestamp_prestoVideo_prestoVimeo_prestoYoutube_prestoYoutubeSubscribeButton_entry = require('./presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-business-skin.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-modern-skin.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-stacked-skin.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-1519d844.js');
5
 
6
  var loadHLS = function loadHLS(_ref) {
7
  var config = _ref.config,
1
  'use strict';
2
 
3
  const index = require('./index-c2577253.js');
4
+ const prestoActionBar_prestoActionBarController_prestoActionBarUi_prestoAudio_prestoBunny_prestoBusinessSkin_prestoCtaOverlay_prestoCtaOverlayController_prestoCtaOverlayUi_prestoDynamicOverlayUi_prestoDynamicOverlays_prestoEmailOverlay_prestoEmailOverlayController_prestoEmailOverlayUi_prestoModernSkin_prestoMutedOverlay_prestoPlayer_prestoPlayerButton_prestoPlayerSpinner_prestoStackedSkin_prestoTimestamp_prestoVideo_prestoVimeo_prestoYoutube_prestoYoutubeSubscribeButton_entry = require('./presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-business-skin.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-modern-skin.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-stacked-skin.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-59f5df90.js');
5
 
6
  var loadHLS = function loadHLS(_ref) {
7
  var config = _ref.config,
dist/components/cjs/{learndash-b3c97d89.js → learndash-da083e6b.js} RENAMED
@@ -1,6 +1,6 @@
1
  'use strict';
2
 
3
- const prestoActionBar_prestoActionBarController_prestoActionBarUi_prestoAudio_prestoBunny_prestoBusinessSkin_prestoCtaOverlay_prestoCtaOverlayController_prestoCtaOverlayUi_prestoDynamicOverlayUi_prestoDynamicOverlays_prestoEmailOverlay_prestoEmailOverlayController_prestoEmailOverlayUi_prestoModernSkin_prestoMutedOverlay_prestoPlayer_prestoPlayerButton_prestoPlayerSpinner_prestoStackedSkin_prestoTimestamp_prestoVideo_prestoVimeo_prestoYoutube_prestoYoutubeSubscribeButton_entry = require('./presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-business-skin.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-modern-skin.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-stacked-skin.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-1519d844.js');
4
  require('./index-c2577253.js');
5
 
6
  const learndash = (function (player) {
1
  'use strict';
2
 
3
+ const prestoActionBar_prestoActionBarController_prestoActionBarUi_prestoAudio_prestoBunny_prestoBusinessSkin_prestoCtaOverlay_prestoCtaOverlayController_prestoCtaOverlayUi_prestoDynamicOverlayUi_prestoDynamicOverlays_prestoEmailOverlay_prestoEmailOverlayController_prestoEmailOverlayUi_prestoModernSkin_prestoMutedOverlay_prestoPlayer_prestoPlayerButton_prestoPlayerSpinner_prestoStackedSkin_prestoTimestamp_prestoVideo_prestoVimeo_prestoYoutube_prestoYoutubeSubscribeButton_entry = require('./presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-business-skin.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-modern-skin.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-stacked-skin.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-59f5df90.js');
4
  require('./index-c2577253.js');
5
 
6
  const learndash = (function (player) {
dist/components/cjs/presto-action-bar_25.cjs.entry.js CHANGED
@@ -2,7 +2,7 @@
2
 
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
 
5
- const prestoActionBar_prestoActionBarController_prestoActionBarUi_prestoAudio_prestoBunny_prestoBusinessSkin_prestoCtaOverlay_prestoCtaOverlayController_prestoCtaOverlayUi_prestoDynamicOverlayUi_prestoDynamicOverlays_prestoEmailOverlay_prestoEmailOverlayController_prestoEmailOverlayUi_prestoModernSkin_prestoMutedOverlay_prestoPlayer_prestoPlayerButton_prestoPlayerSpinner_prestoStackedSkin_prestoTimestamp_prestoVideo_prestoVimeo_prestoYoutube_prestoYoutubeSubscribeButton_entry = require('./presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-business-skin.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-modern-skin.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-stacked-skin.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-1519d844.js');
6
  require('./index-c2577253.js');
7
 
8
 
2
 
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
 
5
+ const prestoActionBar_prestoActionBarController_prestoActionBarUi_prestoAudio_prestoBunny_prestoBusinessSkin_prestoCtaOverlay_prestoCtaOverlayController_prestoCtaOverlayUi_prestoDynamicOverlayUi_prestoDynamicOverlays_prestoEmailOverlay_prestoEmailOverlayController_prestoEmailOverlayUi_prestoModernSkin_prestoMutedOverlay_prestoPlayer_prestoPlayerButton_prestoPlayerSpinner_prestoStackedSkin_prestoTimestamp_prestoVideo_prestoVimeo_prestoYoutube_prestoYoutubeSubscribeButton_entry = require('./presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-business-skin.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-modern-skin.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-stacked-skin.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-59f5df90.js');
6
  require('./index-c2577253.js');
7
 
8
 
dist/components/collection/components/core/player/presto-player.js CHANGED
@@ -236,7 +236,12 @@ export class PrestoPlayer {
236
  }
237
  // on ready
238
  this.duration = this.player.duration;
239
- this.mutedPreview = (_b = (_a = this.blockAttributes) === null || _a === void 0 ? void 0 : _a.mutedPreview) === null || _b === void 0 ? void 0 : _b.enabled;
 
 
 
 
 
240
  // inject UI
241
  this.renderDynamicOverlays();
242
  this.renderVideoCTA();
236
  }
237
  // on ready
238
  this.duration = this.player.duration;
239
+ // skip for iOS
240
+ var ua = window.navigator.userAgent;
241
+ var iOS = !!ua.match(/iPad/i) || !!ua.match(/iPhone/i);
242
+ if (!iOS) {
243
+ this.mutedPreview = (_b = (_a = this.blockAttributes) === null || _a === void 0 ? void 0 : _a.mutedPreview) === null || _b === void 0 ? void 0 : _b.enabled;
244
+ }
245
  // inject UI
246
  this.renderDynamicOverlays();
247
  this.renderVideoCTA();
dist/components/esm/{hls-04ead665.js → hls-0acc614b.js} RENAMED
@@ -1,5 +1,5 @@
1
  import { m as _asyncToGenerator, a as _objectSpread2 } from './index-ef535bb5.js';
2
- import { P as PrestoPlayer } from './presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-business-skin.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-modern-skin.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-stacked-skin.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-d8d36ee7.js';
3
 
4
  var loadHLS = function loadHLS(_ref) {
5
  var config = _ref.config,
1
  import { m as _asyncToGenerator, a as _objectSpread2 } from './index-ef535bb5.js';
2
+ import { P as PrestoPlayer } from './presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-business-skin.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-modern-skin.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-stacked-skin.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-1c494732.js';
3
 
4
  var loadHLS = function loadHLS(_ref) {
5
  var config = _ref.config,
dist/components/esm/{learndash-5bd58e69.js → learndash-9970e552.js} RENAMED
@@ -1,4 +1,4 @@
1
- import { r as resumeProgress } from './presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-business-skin.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-modern-skin.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-stacked-skin.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-d8d36ee7.js';
2
  import './index-ef535bb5.js';
3
 
4
  const learndash = (function (player) {
1
+ import { r as resumeProgress } from './presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-business-skin.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-modern-skin.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-stacked-skin.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-1c494732.js';
2
  import './index-ef535bb5.js';
3
 
4
  const learndash = (function (player) {
dist/components/esm/presto-action-bar_25.entry.js CHANGED
@@ -1,2 +1,2 @@
1
- export { a as presto_action_bar, b as presto_action_bar_controller, c as presto_action_bar_ui, d as presto_audio, e as presto_bunny, f as presto_business_skin, g as presto_cta_overlay, h as presto_cta_overlay_controller, C as presto_cta_overlay_ui, i as presto_dynamic_overlay_ui, j as presto_dynamic_overlays, k as presto_email_overlay, l as presto_email_overlay_controller, E as presto_email_overlay_ui, m as presto_modern_skin, n as presto_muted_overlay, o as presto_player, p as presto_player_button, q as presto_player_spinner, s as presto_stacked_skin, t as presto_timestamp, u as presto_video, v as presto_vimeo, w as presto_youtube, x as presto_youtube_subscribe_button } from './presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-business-skin.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-modern-skin.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-stacked-skin.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-d8d36ee7.js';
2
  import './index-ef535bb5.js';
1
+ export { a as presto_action_bar, b as presto_action_bar_controller, c as presto_action_bar_ui, d as presto_audio, e as presto_bunny, f as presto_business_skin, g as presto_cta_overlay, h as presto_cta_overlay_controller, C as presto_cta_overlay_ui, i as presto_dynamic_overlay_ui, j as presto_dynamic_overlays, k as presto_email_overlay, l as presto_email_overlay_controller, E as presto_email_overlay_ui, m as presto_modern_skin, n as presto_muted_overlay, o as presto_player, p as presto_player_button, q as presto_player_spinner, s as presto_stacked_skin, t as presto_timestamp, u as presto_video, v as presto_vimeo, w as presto_youtube, x as presto_youtube_subscribe_button } from './presto-action-bar.presto-action-bar-controller.presto-action-bar-ui.presto-audio.presto-bunny.presto-business-skin.presto-cta-overlay.presto-cta-overlay-controller.presto-cta-overlay-ui.presto-dynamic-overlay-ui.presto-dynamic-overlays.presto-email-overlay.presto-email-overlay-controller.presto-email-overlay-ui.presto-modern-skin.presto-muted-overlay.presto-player.presto-player-button.presto-player-spinner.presto-stacked-skin.presto-timestamp.presto-video.presto-vimeo.presto-youtube.presto-youtube-subscribe-button-1c494732.js';
2
  import './index-ef535bb5.js';
dist/components/web-components/{p-32a992d3.js → p-06502f62.js} RENAMED
@@ -1 +1 @@
1
- import{r as e}from"./p-37e4ab3e.js";import"./p-3e9a58ac.js";export default function(a){var d,o,s,i,r,_,l,t,n,p,v;if("undefined"!=typeof learndash_video_data&&"presto"===(null===(d=learndash_video_data)||void 0===d?void 0:d.videos_found_provider)){if(e(a),window.learndash_video_data.videos_auto_complete="on"===(null===(o=prestoPlayer)||void 0===o||null===(s=o.learndash)||void 0===s?void 0:s.lesson_video_auto_complete),window.learndash_video_data.videos_hide_complete_button="AFTER"===(null===(i=learndash_video_data)||void 0===i?void 0:i.videos_shown)&&"on"===(null===(r=prestoPlayer)||void 0===r||null===(_=r.learndash)||void 0===_?void 0:_.lesson_video_hide_complete_button),window.learndash_video_data.videos_auto_complete_delay=null===(l=prestoPlayer)||void 0===l||null===(t=l.learndash)||void 0===t?void 0:t.lesson_video_auto_complete_delay,window.learndash_video_data.videos_auto_complete_delay_message=null===(n=prestoPlayer)||void 0===n||null===(p=n.learndash)||void 0===p?void 0:p.videos_auto_complete_delay_message,window.learndash_video_data.video_track_path="/","BEFORE"===(null===(v=learndash_video_data)||void 0===v?void 0:v.videos_shown))return learndash_video_data.videos_auto_complete=!1,jQuery(document).trigger("learndash_video_disable_assets",[!0]),void jQuery((function(){"1"===learndash_video_data.video_debug&&console.log("PRESTO: init"),document.querySelectorAll('presto-player[data-video-progression="true"][data-video-provider="'+learndash_video_data.videos_found_provider+'"]').length&&("1"===learndash_video_data.video_debug&&console.log("PRESTO: calling LearnDash_disable_assets(true)"),LearnDash_disable_assets(!0),LearnDash_watchPlayers(),document.querySelectorAll('presto-player[data-video-progression="true"][data-video-provider="'+learndash_video_data.videos_found_provider+'"]').forEach((function(e,a){var d="presto-player__wrapper-player-"+a,o=e.getAttribute("id");void 0!==o&&""!=o||e.setAttribute("id",o=d),ld_video_players[d]={},ld_video_players[d].player_key=d,ld_video_players[d].player_type=learndash_video_data.videos_found_provider,ld_video_players[d].player_id=o,ld_video_players[d].player_wrapper=e.closest("presto-player"),void 0!==ld_video_players[d].player_wrapper?ld_video_players[d].player_cookie_key=ld_video_players[d].player_wrapper.getAttribute("data-video-cookie-key"):ld_video_players[d].player_cookie_key="",ld_video_players[d].player_cookie_values=LearnDash_Video_Progress_initSettings(ld_video_players[d]),"complete"===LearnDash_Video_Progress_getSetting(ld_video_players[d],"video_state")?(LearnDash_disable_assets(!1),LearnDash_watchPlayersEnd()):(wp.hooks.addAction("presto.playerTimeUpdate","presto-player",(function(e){"1"===learndash_video_data.video_debug&&console.log("PRESTO: Video is playing"),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_duration",e.duration),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_time",e.currentTime),e.duration&&e.duration===e.currentTime&&(LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_state","complete"),"1"===learndash_video_data.video_debug&&console.log("PRESTO: calling LearnDash_disable_assets(false)"),LearnDash_disable_assets(!1),LearnDash_watchPlayersEnd())})),wp.hooks.addAction("presto.playerPlaying","presto-player",(function(e){"1"===learndash_video_data.video_debug&&console.log("PRESTO: Video is playing"),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_duration",e.duration),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_time",e.currentTime),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_state","play")})),wp.hooks.addAction("presto.playerPause","presto-player",(function(e){"1"===learndash_video_data.video_debug&&console.log("PRESTO: Video is paused"),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_time",e.currentTime),console.log(e.duration),console.log(e.currentTime),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_state","pause")})),wp.hooks.addAction("presto.playerEnded","presto-player",(function(e){"1"===learndash_video_data.video_debug&&console.log("PRESTO: video ended"),"1"===learndash_video_data.video_debug&&console.log("PRESTO: setting 'video_state' to 'complete'"),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_time",e.currentTime),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_state","complete"),"1"===learndash_video_data.video_debug&&console.log("PRESTO: calling LearnDash_disable_assets(false)"),LearnDash_disable_assets(!1),LearnDash_watchPlayersEnd()})))})))}));window.LearnDash_disable_assets(!0),wp.hooks.addAction("presto.playerEnded","presto-player",(function(){window.LearnDash_disable_assets(!1)}))}}
1
+ import{r as e}from"./p-4338b6d7.js";import"./p-3e9a58ac.js";export default function(a){var d,o,s,i,r,_,l,t,n,p,v;if("undefined"!=typeof learndash_video_data&&"presto"===(null===(d=learndash_video_data)||void 0===d?void 0:d.videos_found_provider)){if(e(a),window.learndash_video_data.videos_auto_complete="on"===(null===(o=prestoPlayer)||void 0===o||null===(s=o.learndash)||void 0===s?void 0:s.lesson_video_auto_complete),window.learndash_video_data.videos_hide_complete_button="AFTER"===(null===(i=learndash_video_data)||void 0===i?void 0:i.videos_shown)&&"on"===(null===(r=prestoPlayer)||void 0===r||null===(_=r.learndash)||void 0===_?void 0:_.lesson_video_hide_complete_button),window.learndash_video_data.videos_auto_complete_delay=null===(l=prestoPlayer)||void 0===l||null===(t=l.learndash)||void 0===t?void 0:t.lesson_video_auto_complete_delay,window.learndash_video_data.videos_auto_complete_delay_message=null===(n=prestoPlayer)||void 0===n||null===(p=n.learndash)||void 0===p?void 0:p.videos_auto_complete_delay_message,window.learndash_video_data.video_track_path="/","BEFORE"===(null===(v=learndash_video_data)||void 0===v?void 0:v.videos_shown))return learndash_video_data.videos_auto_complete=!1,jQuery(document).trigger("learndash_video_disable_assets",[!0]),void jQuery((function(){"1"===learndash_video_data.video_debug&&console.log("PRESTO: init"),document.querySelectorAll('presto-player[data-video-progression="true"][data-video-provider="'+learndash_video_data.videos_found_provider+'"]').length&&("1"===learndash_video_data.video_debug&&console.log("PRESTO: calling LearnDash_disable_assets(true)"),LearnDash_disable_assets(!0),LearnDash_watchPlayers(),document.querySelectorAll('presto-player[data-video-progression="true"][data-video-provider="'+learndash_video_data.videos_found_provider+'"]').forEach((function(e,a){var d="presto-player__wrapper-player-"+a,o=e.getAttribute("id");void 0!==o&&""!=o||e.setAttribute("id",o=d),ld_video_players[d]={},ld_video_players[d].player_key=d,ld_video_players[d].player_type=learndash_video_data.videos_found_provider,ld_video_players[d].player_id=o,ld_video_players[d].player_wrapper=e.closest("presto-player"),void 0!==ld_video_players[d].player_wrapper?ld_video_players[d].player_cookie_key=ld_video_players[d].player_wrapper.getAttribute("data-video-cookie-key"):ld_video_players[d].player_cookie_key="",ld_video_players[d].player_cookie_values=LearnDash_Video_Progress_initSettings(ld_video_players[d]),"complete"===LearnDash_Video_Progress_getSetting(ld_video_players[d],"video_state")?(LearnDash_disable_assets(!1),LearnDash_watchPlayersEnd()):(wp.hooks.addAction("presto.playerTimeUpdate","presto-player",(function(e){"1"===learndash_video_data.video_debug&&console.log("PRESTO: Video is playing"),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_duration",e.duration),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_time",e.currentTime),e.duration&&e.duration===e.currentTime&&(LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_state","complete"),"1"===learndash_video_data.video_debug&&console.log("PRESTO: calling LearnDash_disable_assets(false)"),LearnDash_disable_assets(!1),LearnDash_watchPlayersEnd())})),wp.hooks.addAction("presto.playerPlaying","presto-player",(function(e){"1"===learndash_video_data.video_debug&&console.log("PRESTO: Video is playing"),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_duration",e.duration),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_time",e.currentTime),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_state","play")})),wp.hooks.addAction("presto.playerPause","presto-player",(function(e){"1"===learndash_video_data.video_debug&&console.log("PRESTO: Video is paused"),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_time",e.currentTime),console.log(e.duration),console.log(e.currentTime),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_state","pause")})),wp.hooks.addAction("presto.playerEnded","presto-player",(function(e){"1"===learndash_video_data.video_debug&&console.log("PRESTO: video ended"),"1"===learndash_video_data.video_debug&&console.log("PRESTO: setting 'video_state' to 'complete'"),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_time",e.currentTime),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_state","complete"),"1"===learndash_video_data.video_debug&&console.log("PRESTO: calling LearnDash_disable_assets(false)"),LearnDash_disable_assets(!1),LearnDash_watchPlayersEnd()})))})))}));window.LearnDash_disable_assets(!0),wp.hooks.addAction("presto.playerEnded","presto-player",(function(){window.LearnDash_disable_assets(!1)}))}}
dist/components/web-components/{p-37e4ab3e.js → p-4338b6d7.js} RENAMED
@@ -1 +1 @@
1
- import{r as t,h as r,g as e,c as i,H as o,_ as n,a,d as s,e as l,f as p,i as u,j as d,k as c,l as h,m as y,n as v}from"./p-3e9a58ac.js";let f=class{constructor(r){t(this,r)}componentWillLoad(){this.player&&(this.player.on("ended",(()=>this.setEnded())),this.player.on("timeupdate",(t=>this.setCurrentTime(t))))}setEnded(){this.ended=!0}setCurrentTime(t){var r,e;this.currentTime=null===(r=null==t?void 0:t.detail)||void 0===r?void 0:r.plyr.currentTime,this.duration=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.plyr.duration}disconnectedCallback(){this.player&&(this.player.off("ended",this.setEnded),this.player.off("timeupdate",this.setCurrentTime))}render(){return r("presto-action-bar-controller",{ended:this.ended,config:this.config,currentTime:this.currentTime,duration:this.duration,direction:this.direction,youtube:this.youtube})}get el(){return e(this)}};function _({current:t,duration:r,showAfter:e=null}){if(0===e)return!0;if(null===e||!r)return!1;if(t===e)return!0;let i=t/r*100;return 99.9<i&&(i=100),i>=e}function g(t){if(!t)return;let r,e,i,o;if(t.match(/^rgb/)){const o=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);r=o[1],e=o[2],i=o[3]}else{const o=+("0x"+t.slice(1).replace(t.length<5&&/./g,"$&$&"));r=o>>16,e=o>>8&255,i=255&o}return o=Math.sqrt(r*r*.299+e*e*.587+i*i*.114),o>127.5?"light":"dark"}function m(t){let r,e=t.split(":");return e.length>1&&(r=60*parseInt(e[0])),parseInt(e[1])+parseInt(r)}function b(){var t=navigator.userAgent||navigator.vendor;return/windows phone/i.test(t)?"Windows Phone":/android/i.test(t)?"Android":"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)?"iOS":"unknown"}function w(){return"iOS"===b()}f.style=":host{display:block}";let k=class{constructor(r){t(this,r),this.actionBarStateChange=i(this,"actionBarStateChange",7),this.show=!1,this.youtubeRenderKey=1,this.percentagePassed=0}componentWillLoad(){this.handleDuration()}handleDuration(){this.handleTime()}handleEnded(t){var r;if(t){if(100!==(null===(r=null==this?void 0:this.config)||void 0===r?void 0:r.percentage_start))return;this.show=!0}}handlePercentagePassed(){this.percentagePassed=this.currentTime/this.duration*100}handleTime(){this.checkTime()}checkTime(){var t,r;this.show=!!(null===(t=null===window||void 0===window?void 0:window.wp)||void 0===t?void 0:t.blocks)||_({current:this.currentTime,duration:this.duration,showAfter:null===(r=this.config)||void 0===r?void 0:r.percentage_start})}handleButtonCountChange(t,r){(null==t?void 0:t.button_count)!==(null==r?void 0:r.button_count)&&this.youtubeRenderKey++,(null==t?void 0:t.enabled)&&this.handleDuration()}youtubeButton(){var t,e,i,o;if("youtube"===(null===(t=this.config)||void 0===t?void 0:t.button_type)&&(null===(e=this.youtube)||void 0===e?void 0:e.channelId))return r("presto-youtube-subscribe-button",{key:this.youtubeRenderKey,channel:null===(i=this.youtube)||void 0===i?void 0:i.channelId,showCount:null===(o=this.config)||void 0===o?void 0:o.button_count})}customButton(){var t,e,i,o,n,a,s,l,p,u,d;if("custom"===(null===(t=this.config)||void 0===t?void 0:t.button_type))return r("presto-player-button",{type:"primary",size:"small",href:null===(i=null===(e=this.config)||void 0===e?void 0:e.button_link)||void 0===i?void 0:i.url,target:(null===(n=null===(o=this.config)||void 0===o?void 0:o.button_link)||void 0===n?void 0:n.opensInNewTab)?"_blank":"_self",style:Object.assign(Object.assign({"--presto-player-button-border-radius":`${null===(a=this.config)||void 0===a?void 0:a.button_radius}px`},(null===(s=this.config)||void 0===s?void 0:s.button_color)?{"--presto-player-button-color":`${null===(l=this.config)||void 0===l?void 0:l.button_color}`}:{}),(null===(p=this.config)||void 0===p?void 0:p.button_text_color)?{"--presto-player-button-text":`${null===(u=this.config)||void 0===u?void 0:u.button_text_color}`}:{})},null===(d=this.config)||void 0===d?void 0:d.button_text)}handleCtaStateChange(t){this.actionBarStateChange.emit(t)}render(){var t,e;return r("presto-action-bar-ui",{open:this.show,style:{"--presto-action-bar-background":(null===(t=this.config)||void 0===t?void 0:t.background_color)||"#1d1d1d"}},null===(e=this.config)||void 0===e?void 0:e.text,r("div",{slot:"button"},this.youtubeButton(),this.customButton()))}get el(){return e(this)}static get watchers(){return{duration:["handleDuration","handlePercentagePassed"],ended:["handleEnded"],currentTime:["handlePercentagePassed","handleTime"],config:["handleButtonCountChange"],show:["handleCtaStateChange"]}}};k.style=":host{display:block}";let x=class{constructor(r){t(this,r)}render(){return r("div",{class:{bar:!0,"bar--open":this.open}},r("span",{part:"content",class:"bar__content"},r("slot",null)),r("span",{part:"button",class:"bar__button"},r("slot",{name:"button"})))}};x.style=":host{display:block;overflow:hidden}.bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;background:var(--presto-action-bar-background, #1d1d1d);color:#fff;padding:0 var(--presto-action-bar-padding, 6px);line-height:1em;font-size:16px;margin-top:-100%;transition:margin var(--presto-action-bar-animation-speed, 0.5s) ease-in-out;transform:translate3d(0);border-radius:0px 0px var(--presto-player-border-radius) var(--presto-player-border-radius)}.bar.bar--open{margin-top:0}.bar__button{margin:var(--presto-action-bar-padding, 6px);display:flex;align-items:center}.bar__content{margin:var(--presto-action-bar-padding, 6px);width:100%;text-align:center}@media screen and (min-width: 480px){.bar__content{width:auto}}";let z=class{constructor(r){t(this,r),this.playVideo=i(this,"playVideo",7),this.pauseVideo=i(this,"pauseVideo",7)}renderPosterImage(){if(this.poster)return r("div",{class:"presto-audio__poster"},r("img",{src:this.poster}))}hasPosterArea(){var t;return!!this.poster||!!(null===(t=this.preset)||void 0===t?void 0:t["play-large"])}renderMobilePoster(){var t;return r("div",{class:"presto-audio__poster-wrapper-mobile"},!!(null===(t=this.preset)||void 0===t?void 0:t["play-large"])&&this.renderLargePlay("presto-audio__large-play-button is-relative"),r("div",{class:"presto-audio__mobile-title"},this.mediaTitle))}renderLargePlay(t="presto-audio__large-play-button"){return r("div",{class:t,onClick:()=>{this.player.playing?this.pauseVideo.emit():this.playVideo.emit()}},r("svg",{class:"presto-audio__icon-play",width:"16",height:"18",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r("path",{d:"M15.5588 9.00005L0.117662 17.915L0.117662 0.0850823L15.5588 9.00005Z"})),r("svg",{class:"presto-audio__icon-pause",width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r("rect",{width:"5",height:"17"}),r("rect",{x:"12",width:"5",height:"17"})))}componentDidLoad(){"ResizeObserver"in window&&new ResizeObserver((t=>{t.forEach((t=>this.width=t.contentRect.width))})).observe(this.el)}render(){var t,e,i,o,n;return r("div",{ref:t=>this.el=t,class:{"presto-audio__wrapper":!0,"has-poster":!!this.poster,"has-play-large":!!(null===(t=this.preset)||void 0===t?void 0:t["play-large"]),"is-playing":null===(e=this.player)||void 0===e?void 0:e.playing,"has-light-background":"light"===g(null===(i=this.preset)||void 0===i?void 0:i.background_color),"has-dark-background":"dark"===g(null===(o=this.preset)||void 0===o?void 0:o.background_color),"breakpoint-small":this.width<520,"skin-stacked":this.width<520,"breakpoint-large":this.width>=520}},this.hasPosterArea()&&r("div",{class:"presto-audio__poster-wrapper"},!!(null===(n=this.preset)||void 0===n?void 0:n["play-large"])&&r("div",{class:"presto-audio__large-play-wrapper"},this.renderLargePlay()),this.renderPosterImage()),this.hasPosterArea()&&this.renderMobilePoster(),r("div",{class:"presto-audio__controls-wrapper"},r("div",{class:"presto-audio__title"},this.mediaTitle),r("audio",Object.assign({part:"audio-player",ref:this.getRef,autoplay:this.autoplay,preload:this.preload,"data-poster":this.poster},this.audioAttributes),r("source",{src:this.src}),!!this.tracks&&!!this.tracks.length&&this.tracks.map((t=>r("track",{kind:"captions",label:(null==t?void 0:t.label)?t.label:"Captions",src:null==t?void 0:t.src,srclang:(null==t?void 0:t.srcLang)?null==t?void 0:t.srcLang:"en"}))))))}};z.style=":host{display:block}.presto-audio__wrapper{border-radius:var(--presto-player-border-radius, 0px)}.presto-audio__wrapper .plyr--audio .plyr__controls{padding:0}.presto-audio__wrapper .plyr--audio .plyr__control.plyr__tab-focus,.presto-audio__wrapper .plyr--audio .plyr__control:hover,.presto-audio__wrapper .plyr--audio .plyr__control[aria-expanded=true]{background:var(--plyr-audio-controls-background);color:var(--plyr-audio-control-color)}.presto-audio__wrapper{display:flex;background:var(--plyr-audio-controls-background, #fff)}.presto-audio__controls-wrapper{padding:calc(var(--plyr-control-spacing, 10px) * 2);flex:1;display:flex;flex-direction:column;justify-content:center;min-width:0}.has-poster .presto-audio__controls-wrapper{padding:calc(var(--plyr-control-spacing, 10px) * 3)}.has-play-large:not(.has-poster) .presto-audio__controls-wrapper{padding-left:0}.presto-audio__title,.presto-audio__mobile-title{font-size:18px;font-weight:500;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--plyr-audio-control-color)}.presto-audio__title{margin:calc(var(--plyr-control-spacing, 10px) / 2);margin-top:0}.presto-audio__poster-wrapper{position:relative;width:100px;min-height:100px;flex:0 0 100px}.presto-audio__poster-wrapper img{border-radius:var(--presto-player-border-radius, 0px) 0 0 var(--presto-player-border-radius, 0px);width:100%;height:100%;object-fit:cover;aspect-ratio:1;display:block}.has-poster .presto-audio__poster-wrapper{width:140px;height:140px;flex:0 0 140px}.presto-audio__poster{width:100%;height:100%}.presto-audio__large-play-button{user-select:none;cursor:pointer;position:absolute;display:flex;align-items:center;justify-content:center;top:50%;left:50%;transform:translate(-50%, -50%);width:50px;height:50px;color:white;border-radius:100%;background:var(--plyr-audio-control-color);color:var(--plyr-audio-controls-background)}.presto-audio__large-play-button.is-relative{position:relative;top:auto;left:auto;transform:none}.has-light-background.has-poster .presto-audio__large-play-button{background:var(--plyr-audio-controls-background);color:var(--plyr-audio-control-color)}.has-dark-background.has-poster .presto-audio__large-play-button{background:var(--plyr-audio-control-color);color:var(--plyr-audio-controls-background)}.presto-audio__icon-play,.presto-audio__icon-pause{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);fill:currentColor;display:block;transition:opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;margin:0 auto;text-align:center}.presto-audio__icon-pause{opacity:0;visibility:hidden}.presto-audio__wrapper.is-playing .presto-audio__icon-pause{opacity:1;visibility:visible}.presto-audio__icon-play{margin-left:2px;opacity:1;visibility:visible}.presto-audio__wrapper.is-playing .presto-audio__icon-play{opacity:0;visibility:hidden}.presto-audio__poster-wrapper-mobile{display:none;min-width:0}.presto-audio__poster-wrapper-mobile .presto-audio__large-play-button{flex:0 0 50px}.presto-audio__wrapper.breakpoint-small{flex-direction:column}.presto-audio__wrapper.breakpoint-small .presto-audio__controls-wrapper{padding:calc(var(--plyr-control-spacing, 10px) * 2)}.presto-audio__wrapper.breakpoint-small.has-poster .presto-audio__title{text-align:center;margin:calc(var(--plyr-control-spacing, 10px) * 1.5)}.presto-audio__wrapper.breakpoint-small.has-poster .presto-audio__poster-wrapper{margin:30px auto auto auto;overflow:hidden;border-radius:var(--presto-player-border-radius, 0px);width:225px;height:225px;flex:0 0 225px}.presto-audio__wrapper.breakpoint-small.has-play-large:not(.has-poster) .presto-audio__poster-wrapper,.presto-audio__wrapper.breakpoint-small.has-play-large:not(.has-poster) .presto-audio__title{display:none}.presto-audio__wrapper.breakpoint-small.has-play-large:not(.has-poster) .presto-audio__poster-wrapper-mobile{display:flex;align-items:center;gap:1em;margin-bottom:calc(var(--plyr-control-spacing, 10px) * -1);padding:calc(var(--plyr-control-spacing, 10px) * 2) calc(var(--plyr-control-spacing, 10px) * 2) 0 calc(var(--plyr-control-spacing, 10px) * 2)}.skin-stacked.presto-sticky-audio .presto-audio__wrapper{height:115px}.skin-stacked.presto-sticky-audio .has-poster .presto-audio__controls-wrapper{padding:20px}.skin-stacked.presto-sticky-audio .has-poster .presto-audio__poster-wrapper{width:115px;height:115px;flex:0 0 115px}.presto-sticky-audio .presto-audio__wrapper{height:100px}.presto-sticky-audio .has-poster .presto-audio__controls-wrapper{padding:20px}.presto-sticky-audio .has-poster .presto-audio__poster-wrapper{width:100px;height:100px;flex:0 0 100px}.action-bar-active .presto-audio__wrapper{border-radius:var(--presto-player-border-radius) var(--presto-player-border-radius) 0px 0px}@media screen and (max-width: 520px){.presto-sticky-audio .presto-audio__poster-wrapper-mobile{display:flex;align-items:center;gap:1em;margin-bottom:calc(var(--plyr-control-spacing, 10px) * -1);padding:calc(var(--plyr-control-spacing, 10px) * 2) calc(var(--plyr-control-spacing, 10px) * 2) 0 calc(var(--plyr-control-spacing, 10px) * 2)}.presto-sticky-audio .presto-audio__poster-wrapper,.presto-sticky-audio .presto-audio__title{display:none}.presto-sticky-audio .presto-audio__wrapper{height:140px}.presto-sticky-audio .has-poster .presto-audio__controls-wrapper{padding:0px}.presto-sticky-audio .presto-audio__poster-wrapper-mobile .presto-audio__large-play-button{flex:0 0 40px;height:40px}}";let j=class{constructor(r){t(this,r)}componentWillLoad(){this.poster=this.poster||this.thumbnail}render(){return r("presto-video",{getRef:this.getRef,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,playsinline:this.playsinline,src:this.src,tracks:this.tracks,videoAttributes:this.videoAttributes})}},T=class{constructor(r){t(this,r)}render(){return r(o,null,r("slot",null))}};T.style='.skin-business.presto-player__wrapper.rewind-inactive .plyr__controls .plyr__controls__item:nth-child(2)::before{border-radius:var(--plyr-control-radius, 3px) 0px 0px var(--plyr-control-radius, 3px)}.skin-business.presto-player__wrapper.caption-style-full .plyr:not(.plyr--hide-controls):not(.is-muted-overlay) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 16px) * -4))}.skin-business.presto-player__wrapper .presto-player-progress__marker{border-radius:0;width:15px;height:15px;border-width:1px}.skin-business.presto-player__wrapper .plyr__control[data-plyr]:hover:not([role*=menuitem]):not(.plyr__control--back),.skin-business.presto-player__wrapper .plyr__control[data-plyr]:focus:not([role*=menuitem]):not(.plyr__control--back),.skin-business.presto-player__wrapper .plyr__control[data-plyr]:active:not([role*=menuitem]):not(.plyr__control--back){background-color:transparent;color:var(--plyr-color-main)}.skin-business.presto-player__wrapper .plyr__control[data-plyr]:hover:not([role*=menuitem]):not(.plyr__control--back)[data-plyr=play],.skin-business.presto-player__wrapper .plyr__control[data-plyr]:focus:not([role*=menuitem]):not(.plyr__control--back)[data-plyr=play],.skin-business.presto-player__wrapper .plyr__control[data-plyr]:active:not([role*=menuitem]):not(.plyr__control--back)[data-plyr=play]{background-color:var(--plyr-color-main);color:white}.skin-business.presto-player__wrapper .plyr__control--overlaid[data-plyr=play]{border-radius:4px;background:#000000;opacity:75%}.skin-business.presto-player__wrapper .plyr__control--overlaid[data-plyr=play]:hover{background-color:var(--plyr-color-main);color:white;opacity:100%}.skin-business.presto-player__wrapper .plyr__volume input[type=range]{cursor:pointer}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item[data-plyr=fast-forward]{border-radius:0px}.skin-business.presto-player__wrapper .plyr__progress{margin:0px 20px 0 5px}.skin-business.presto-player__wrapper .plyr__progress input[type=range]{height:32px;border-radius:0px;cursor:pointer}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item:not(.presto-player-progress__marker):first-child::before{border-radius:var(--plyr-control-radius, 3px) 0px 0px var(--plyr-control-radius, 3px)}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item:not(.presto-player-progress__marker):last-child::before{border-radius:0px var(--plyr-control-radius, 3px) var(--plyr-control-radius, 3px) 0px}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item.plyr__control[data-plyr=play]{order:-1;margin-right:5px;padding:11px 20px 11px 20px;top:-4px}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item.plyr__control[data-plyr=play]::before{border-radius:4px}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item[data-plyr=rewind]::before{border-radius:var(--plyr-control-radius, 3px) 0px 0px var(--plyr-control-radius, 3px)}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item:not([data-plyr=play]){margin:0}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item[data-plyr=fullscreen]{padding:4px}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item[data-plyr=fullscreen] svg{height:24px;width:24px}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item:not(.presto-player-progress__marker){position:relative}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item:not(.presto-player-progress__marker).plyr__time{height:32px;padding-top:4.5px}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item:not(.presto-player-progress__marker)::before{content:"";background:#000000;position:absolute;top:0px;left:0;right:0;bottom:0px;opacity:0.76;z-index:-1}.skin-business.presto-player__wrapper .plyr--full-ui input[type=range]::-webkit-slider-runnable-track{box-shadow:none;color:var(--plyr-color-main);height:9px;outline:1px solid #878787a6;outline-offset:2px;border-radius:0px}.skin-business.presto-player__wrapper .plyr--full-ui input[type=range]::-webkit-slider-thumb{visibility:hidden}.skin-business.presto-player__wrapper .plyr__progress__buffer::-webkit-progress-value{position:relative;border-radius:0px;height:9px;top:-2px}.skin-business.presto-player__wrapper .plyr--full-ui input[type=range]::-webkit-slider-runnable-track{background-color:transparent}@media screen and (max-width: 480px){.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item.plyr__time{padding:1.5%}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item[data-plyr=play]{padding:8px;top:0px}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item[data-plyr=fullscreen] svg{width:22px}}';let S=class{constructor(r){t(this,r)}componentWillLoad(){this.player&&(this.player.on("ended",(()=>this.setEnded())),this.player.on("timeupdate",(t=>this.setCurrentTime(t))))}setEnded(){this.ended=!0}setCurrentTime(t){var r,e;this.currentTime=null===(r=null==t?void 0:t.detail)||void 0===r?void 0:r.plyr.currentTime,this.duration=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.plyr.duration}disconnectedCallback(){this.player&&(this.player.off("ended",this.setEnded),this.player.off("timeupdate",this.setCurrentTime))}render(){var t;return r("presto-cta-overlay-controller",{ended:this.ended,currentTime:this.currentTime,duration:this.duration,direction:this.direction,cta:null===(t=this.preset)||void 0===t?void 0:t.cta,i18n:this.i18n,provider:this.provider})}};S.style=":host{display:block}";let C=class{constructor(r){t(this,r),this.playVideo=i(this,"playVideo",7),this.pauseVideo=i(this,"pauseVideo",7),this.restartVideo=i(this,"restartVideo",7),this.ctaStateChange=i(this,"ctaStateChange",7),this.percentagePassed=0}componentWillLoad(){this.handleDuration()}handleEnded(t){var r;if(t){if(100!==(null===(r=null==this?void 0:this.cta)||void 0===r?void 0:r.percentage))return;this.show=!0}}handleDuration(){var t;this.enabled=!this.skipped&&(null===(t=null==this?void 0:this.cta)||void 0===t?void 0:t.enabled),this.handleTime()}handlePercentagePassed(){this.percentagePassed=this.currentTime/this.duration*100}handleEnabled(){this.show&&(this.skipped||this.pauseVideo.emit(!0))}handleTime(){var t;this.enabled&&(this.skipped||100!==(null===(t=null==this?void 0:this.cta)||void 0===t?void 0:t.percentage)&&this.checkTime())}checkTime(){var t;this.show=_({current:this.currentTime,duration:this.duration,showAfter:(null===(t=null==this?void 0:this.cta)||void 0===t?void 0:t.percentage)||0})}skip(){this.skipped=!0,this.show=!1,this.playVideo.emit()}rewatch(){this.ended=!1,this.show=!1,this.restartVideo.emit()}handleCtaStateChange(t){this.ctaStateChange.emit(t)}render(){var t,e,i,o,n,a,s,l,p,u,d,c,h,y;if(this.show)return r("presto-cta-overlay-ui",{style:Object.assign(Object.assign(Object.assign({"--presto-player-button-border-radius":`${null===(t=null==this?void 0:this.cta)||void 0===t?void 0:t.button_radius}px`},(null===(e=null==this?void 0:this.cta)||void 0===e?void 0:e.background_opacity)?{"--presto-player-cta-background-opacity":""+(null===(i=null==this?void 0:this.cta)||void 0===i?void 0:i.background_opacity)/100}:{}),(null===(o=null==this?void 0:this.cta)||void 0===o?void 0:o.button_color)?{"--presto-player-button-color":`${null===(n=null==this?void 0:this.cta)||void 0===n?void 0:n.button_color}`}:{}),(null===(a=null==this?void 0:this.cta)||void 0===a?void 0:a.button_text_color)?{"--presto-player-button-text":`${null===(s=null==this?void 0:this.cta)||void 0===s?void 0:s.button_text_color}`}:{}),direction:this.direction,class:"cta-overlay",i18n:this.i18n,headline:null===(l=null==this?void 0:this.cta)||void 0===l?void 0:l.headline,"bottom-text":null===(p=null==this?void 0:this.cta)||void 0===p?void 0:p.bottom_text,"show-button":null===(u=null==this?void 0:this.cta)||void 0===u?void 0:u.show_button,buttonLink:null===(d=null==this?void 0:this.cta)||void 0===d?void 0:d.button_link,allowSkip:!this.ended&&(null===(c=null==this?void 0:this.cta)||void 0===c?void 0:c.show_skip),allowRewatch:this.ended&&(null===(h=null==this?void 0:this.cta)||void 0===h?void 0:h.show_rewatch),"button-text":null===(y=null==this?void 0:this.cta)||void 0===y?void 0:y.button_text,onSkip:()=>this.skip(),onRewatch:()=>this.rewatch(),provider:this.provider})}static get watchers(){return{ended:["handleEnded"],duration:["handleDuration","handlePercentagePassed"],currentTime:["handlePercentagePassed","handleEnabled","handleTime"],show:["handleCtaStateChange"]}}};C.style=":host{display:block}";const P=function(t,r,e){var i=function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e]);return t}({minFontSize:-1/0,maxFontSize:1/0,container:t},e),o=function(t){var e=r||1,o=function(){var r;t.style.fontSize=Math.max(Math.min(((null==i||null===(r=i.container)||void 0===r?void 0:r.clientWidth)||0)/(10*e),parseFloat(i.maxFontSize)),parseFloat(i.minFontSize))+"px"};if(o(),"ResizeObserver"in window==0)var n=import("./p-97e2763b.js").then((function(){window.ResizeObserver=n.ResizeObserver,new ResizeObserver(o).observe(i.container)}));else new ResizeObserver(o).observe(i.container)};if(t.length)for(var n=0;n<t.length;n++)o(t[n]);else o(t);return t};let O=class{constructor(r){t(this,r),this.skip=i(this,"skip",7),this.rewatch=i(this,"rewatch",7)}componentDidLoad(){this.isAudioProvider="audio"===(this.type||this.provider),P(this.textInput,3,{maxFontSize:!0===this.isAudioProvider?15:20,minFontSize:8})}handleCTAClick(t){var r;(null===(r=this.buttonLink)||void 0===r?void 0:r.url)&&(t.preventDefault(),t.stopPropagation(),this.handleLink())}handleLink(){var t,r,e;(null===(t=this.buttonLink)||void 0===t?void 0:t.opensInNewTab)?window.open(null===(r=this.buttonLink)||void 0===r?void 0:r.url,"_blank"):window.location.href=null===(e=this.buttonLink)||void 0===e?void 0:e.url}render(){var t,e,i,o,n;return r("div",{class:"wrapper",ref:t=>this.textInput=t},r("div",{onClick:t=>this.handleCTAClick(t),class:`overlay ${"rtl"===this.direction?"rtl":""} ${(null===(t=this.buttonLink)||void 0===t?void 0:t.url)?"has-link":""}`},r("div",{class:this.isAudioProvider?"content is-centered":"content"},r("h1",{part:"cta-headline"},this.headline||this.defaultHeadline),this.bottomText&&r("p",{class:this.isAudioProvider&&"is-small",part:"cta-bottom-text",innerHTML:this.bottomText}),this.showButton&&r("presto-player-button",{full:!0,onClick:t=>this.handleCTAClick(t),part:"cta-button",href:null===(e=null==this?void 0:this.buttonLink)||void 0===e?void 0:e.url,target:(null===(i=null==this?void 0:this.buttonLink)||void 0===i?void 0:i.opensInNewTab)?"_blank":"_self",class:"button",type:"primary"},this.buttonText))),!!this.allowRewatch&&r("div",{class:"rewatch",onClick:t=>{t.preventDefault(),t.stopImmediatePropagation(),this.rewatch.emit()}},r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-corner-up-left"},r("polyline",{points:"9 14 4 9 9 4"}),r("path",{d:"M20 20v-7a4 4 0 0 0-4-4H4"})),null===(o=null==this?void 0:this.i18n)||void 0===o?void 0:o.rewatch),!!this.allowSkip&&r("div",{class:"skip",onClick:t=>{t.preventDefault(),this.skip.emit()}},null===(n=null==this?void 0:this.i18n)||void 0===n?void 0:n.skip," →"))}};O.style=':host{display:block;font-size:16px;width:100%;height:100%;position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;z-index:99999;user-select:none}*{box-sizing:border-box}a{color:#fff}.wrapper{height:100%;position:relative;color:#fff;font-family:var(--plyr-font-family, "San Francisco", -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", Avenir, "Avenir Next", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif)}.overlay{position:relative;display:flex;align-items:center;justify-content:center;padding:48px;height:100%}.overlay.has-link{cursor:pointer}.overlay:before{content:"";border-radius:var(--presto-player-border-radius, 0);opacity:var(--presto-player-cta-background-opacity, 0.75);position:absolute;top:0;left:0;bottom:0;right:0;background-color:var(--presto-player-cta-background, #000);z-index:-1;box-shadow:inset 0 0 100px black}.content{width:80%;max-width:600px}.content *~*{margin-top:22px}button{background:var(--plyr-color-main, #000);appearance:none;padding:6px 12px;align-items:center;display:inline-flex;border-width:1px;border-color:transparent;color:#fff;border-radius:0;cursor:pointer;font-size:0.8em;border-radius:0 var(--presto-player-cta-border-radius, 0) var(--presto-player-cta-border-radius) 0}@media screen and (min-width: 700px){button{padding:10px 18px}}button:focus{box-shadow:white 0px 0px 0px 2px, var(--plyr-color-main, #000) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;z-index:1}button:focus,button:hover{outline:none}h1{font-size:1.5em;font-weight:500;margin:0;line-height:1.1em}.skip,.rewatch{font-size:0.8em;font-weight:600;position:absolute;top:0;right:0;padding:4%;cursor:pointer}.rewatch{display:inline-flex;align-items:center;right:auto;left:0}.rewatch .icon{margin-right:5px}p{font-size:0.85em;margin:0;margin-top:1.5em;line-height:1.4em;opacity:0.75}p.is-small{font-size:0.85em;margin:1.5em 0px 0px;line-height:0.1em;opacity:0.75}.is-centered{text-align:center}';let A=class{constructor(r){t(this,r),this.position="top-right"}closestElement(t,r){return r&&r!=document&&r!=window&&r.closest(t)||r&&this.closestElement(t,r.getRootNode().host)}componentDidLoad(){let t=this.closestElement("presto-player",this.el);P(this.text,3,{maxFontSize:16,minFontSize:10,container:t})}render(){return r(this.href?"a":"span",{class:{"overlay-text":!0,"overlay--top-left":"top-left"===this.position,"overlay--top-right":"top-right"===this.position},href:this.href,target:this.target,part:"overlay-text",ref:t=>this.text=t},r("slot",null))}get el(){return e(this)}};A.style=":host{display:block}.overlay-text{text-decoration:none;display:inline-block;user-select:none;line-height:1;opacity:var(--presto-dynamic-overlay-opacity, 1);font-size:var(--presto-dynamic-overlay-font-size, 18px);padding:var(--presto-dynamic-overlay-padding, 0.65em 0.85em);font-weight:var(--presto-dynamic-overlay-font-weight, 500);border-radius:var(--presto-dynamic-overlay-radius, 0.25em);background:var(--presto-dynamic-overlay-background, rgba(0, 0, 0, 0.8));color:var(--presto-dynamic-overlay-color, #fff);opacity:var(--presto-dynamic-overlay-opacity, 1);word-break:break-word}a.overlay-text{cursor:pointer}";let I=class{constructor(r){t(this,r),this.reloadComponent=i(this,"reloadComponent",7),this.watermarkRef={left:null,right:null},this.destroy=!1,this.refs={}}componentDidLoad(){this.player&&this.player.on("timeupdate",(t=>{this.currentTime=t.detail.plyr.currentTime,this.checkValidity()}))}checkValidity(){var t,r,e,i,o,n,a,s,l,p;this.player.playing&&((null===(t=null==this?void 0:this.overlays)||void 0===t?void 0:t.length)||(null===(e=null===(r=this.preset)||void 0===r?void 0:r.watermark)||void 0===e?void 0:e.enabled))&&((null===(i=this.container)||void 0===i?void 0:i.offsetParent)&&(null===(o=this.topLeft)||void 0===o?void 0:o.offsetParent)&&(null===(n=this.topRight)||void 0===n?void 0:n.offsetParent)||this.reloadComponent.emit(),Object.keys(this.refs||{}).forEach((t=>{const{overlay:r,component:e}=this.refs[t];this.checkComponent(e,r.text,(()=>this.reloadComponent.emit()))})),this.shouldShowWatermark("top-left")&&this.watermarkRef.left&&this.checkComponent(this.watermarkRef.left,null===(s=null===(a=this.preset)||void 0===a?void 0:a.watermark)||void 0===s?void 0:s.text,(()=>this.reloadComponent.emit())),this.shouldShowWatermark("top-right")&&this.watermarkRef.right&&this.checkComponent(this.watermarkRef.right,null===(p=null===(l=this.preset)||void 0===l?void 0:l.watermark)||void 0===p?void 0:p.text,(()=>this.reloadComponent.emit())))}checkComponent(t,r,e){if(!(null==t?void 0:t.offsetParent))return e();if(!t.shadowRoot.querySelector("slot"))return e();if(this.player&&this.player.playing){const i=t.shadowRoot.querySelector("slot").assignedNodes()[0];if(i){if(i.parentElement.innerHTML!=r)return e();const t=getComputedStyle(i.parentElement.shadowRoot.querySelector(".overlay-text"));if(parseInt(t.fontSize,10)<10)return e();const o=function(t){var r=t.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);return r?[r[1],r[2],r[3],"1"]:(r=t.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*((0.)?\d+)\s*\)$/i))?[r[1],r[2],r[3],r[4]]:void 0}(t.color);if("1"!==(null==o?void 0:o[3]))return e()}}}shouldShowOverlay(t){if(void 0!==this.currentTime)return!(this.currentTime<m(null==t?void 0:t.startTime)||this.currentTime>m(null==t?void 0:t.endTime))}renderOverlay(t){var e,i;return r("presto-dynamic-overlay-ui",{class:{visible:this.shouldShowOverlay(t)},ref:r=>this.refs[t.id]={overlay:t,component:r},key:t.id,position:t.position,href:null===(e=null==t?void 0:t.link)||void 0===e?void 0:e.url,target:(null===(i=null==t?void 0:t.link)||void 0===i?void 0:i.opensInNewTab)?"_blank":"_self",innerHTML:this.shouldShowOverlay(t)?t.text:"",style:{"--presto-dynamic-overlay-color":(null==t?void 0:t.color)||"#fff","--presto-dynamic-overlay-background":(null==t?void 0:t.backgroundColor)||"#333","--presto-dynamic-overlay-opacity":(null==t?void 0:t.opacity)?(t.opacity/100).toString():"1"}})}shouldShowWatermark(t){var r,e,i;if(!(null===(e=null===(r=this.preset)||void 0===r?void 0:r.watermark)||void 0===e?void 0:e.enabled))return!1;const o=null===(i=this.preset)||void 0===i?void 0:i.watermark;return"randomize"===o.position?Math.floor((this.player.currentTime||0)/10)%2==0?"top-left"===t:"top-right"===t:o.position===t||!o.position&&"top-right"===t}render(){var t,e,i,o,n,a,s,l,p,u,d;if(this.enabled&&((null===(t=null==this?void 0:this.overlays)||void 0===t?void 0:t.length)||(null===(i=null===(e=this.preset)||void 0===e?void 0:e.watermark)||void 0===i?void 0:i.enabled)))return r("div",{class:"overlays",ref:t=>this.container=t},r("div",{class:"top-left",ref:t=>this.topLeft=t},!!this.shouldShowWatermark("top-left")&&r("presto-dynamic-overlay-ui",{ref:t=>this.watermarkRef.left=t,style:{"--presto-dynamic-overlay-color":(null===(o=this.preset.watermark)||void 0===o?void 0:o.color)||"#fff","--presto-dynamic-overlay-background":(null===(n=this.preset.watermark)||void 0===n?void 0:n.backgroundColor)||"#333","--presto-dynamic-overlay-opacity":(null===(a=this.preset.watermark)||void 0===a?void 0:a.opacity)?(this.preset.watermark.opacity/100).toString():"1"},class:"visible",position:"top-left",innerHTML:this.preset.watermark.text}),!!(null===(s=null==this?void 0:this.overlays)||void 0===s?void 0:s.length)&&this.overlays.map((t=>"top-left"!==t.position?"":this.renderOverlay(t)))),r("div",{class:"top-right",ref:t=>this.topRight=t},!!this.shouldShowWatermark("top-right")&&r("presto-dynamic-overlay-ui",{ref:t=>this.watermarkRef.right=t,style:{"--presto-dynamic-overlay-color":(null===(l=this.preset.watermark)||void 0===l?void 0:l.color)||"#fff","--presto-dynamic-overlay-background":(null===(p=this.preset.watermark)||void 0===p?void 0:p.backgroundColor)||"#333","--presto-dynamic-overlay-opacity":(null===(u=this.preset.watermark)||void 0===u?void 0:u.opacity)?(this.preset.watermark.opacity/100).toString():"1"},class:"visible",position:"top-right",innerHTML:this.preset.watermark.text}),!!(null===(d=null==this?void 0:this.overlays)||void 0===d?void 0:d.length)&&this.overlays.map((t=>"top-right"!==t.position?"":this.renderOverlay(t)))))}get el(){return e(this)}};I.style=".top-left,.top-right{position:absolute;display:block;padding:20px;max-width:45%;z-index:20;display:flex;flex-direction:column;flex-wrap:wrap}.top-left{top:0;left:0}.top-right{top:0;right:0;align-items:flex-end}presto-dynamic-overlay-ui{overflow:hidden;height:0;opacity:0;transition:height 0ms 400ms, opacity 400ms 0ms}presto-dynamic-overlay-ui.visible{margin-bottom:10px;height:auto;opacity:1;transition:height 0ms 0ms, opacity 500ms 0ms}";let M=class{constructor(r){t(this,r)}componentWillLoad(){this.player&&(this.player.on("ended",(()=>this.setEnded())),this.player.on("timeupdate",(t=>this.setCurrentTime(t))))}setEnded(){this.ended=!0}setCurrentTime(t){var r,e;this.currentTime=null===(r=null==t?void 0:t.detail)||void 0===r?void 0:r.plyr.currentTime,this.duration=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.plyr.duration}disconnectedCallback(){this.player&&(this.player.off("ended",this.setEnded),this.player.off("timeupdate",this.setCurrentTime))}render(){var t,e;return r("presto-email-overlay-controller",{ended:this.ended,currentTime:this.currentTime,videoId:this.videoId,duration:this.duration,direction:this.direction,presetId:null===(t=this.preset)||void 0===t?void 0:t.id,emailCollection:null===(e=this.preset)||void 0===e?void 0:e.email_collection,i18n:this.i18n,provider:this.provider})}};M.style=":host{display:block}";let E=class{constructor(r){t(this,r),this.playVideo=i(this,"playVideo",7),this.pauseVideo=i(this,"pauseVideo",7),this.restartVideo=i(this,"restartVideo",7),this.emailStateChange=i(this,"emailStateChange",7),this.percentagePassed=0}setStorage(t){window.localStorage.setItem("presto.videos.email_collection",JSON.stringify({[this.videoId]:t}))}getStorage(){return window.localStorage.getItem("presto.videos.email_collection")}componentWillLoad(){this.handleDuration()}handleDuration(){var t;this.enabled=!this.getStorage()&&(null===(t=null==this?void 0:this.emailCollection)||void 0===t?void 0:t.enabled),this.handleTimeCheck()}handleTimeCheck(){this.enabled&&(this.getStorage()||this.checkTime())}handleShowChange(){this.show&&this.pauseVideo.emit(!0)}checkTime(){var t;this.show=_({current:this.currentTime,duration:this.duration,showAfter:(null===(t=null==this?void 0:this.emailCollection)||void 0===t?void 0:t.percentage)||0})}async getNonce(){var t;return fetch(`${null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.ajaxurl}?action=presto_refresh_progress_nonce`)}async submit(t){var r;this.loading=!0,this.error="";const e=await this.getNonce(),{data:i}=await e.json();try{let e=await fetch(null===(r=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===r?void 0:r.ajaxurl,{method:"post",body:new URLSearchParams(Object.assign({action:"presto_player_email_submit",nonce:i,preset_id:this.presetId,video_id:this.videoId},(null==t?void 0:t.detail)||{}))});const{success:o,data:n}=await e.json();if(!o)throw n;this.setStorage("collected"),this.show=!1,this.playVideo.emit()}catch(t){const r=null==t?void 0:t[0];r&&"string"==typeof r&&(this.error=r)}finally{this.loading=!1}}skip(){this.setStorage("skipped"),this.show=!1,this.playVideo.emit()}handleEmailStateChange(t){this.emailStateChange.emit(t)}render(){var t,e,i,o,n,a,s,l;if(this.show)return r("presto-email-overlay-ui",{style:Object.assign(Object.assign({},(null===(t=null==this?void 0:this.emailCollection)||void 0===t?void 0:t.button_color)?{"--presto-player-button-color":`${null===(e=null==this?void 0:this.emailCollection)||void 0===e?void 0:e.button_color}`}:{}),(null===(i=null==this?void 0:this.emailCollection)||void 0===i?void 0:i.button_text_color)?{"--presto-player-button-text":`${null===(o=null==this?void 0:this.emailCollection)||void 0===o?void 0:o.button_text_color}`}:{}),direction:this.direction,class:"email-overlay",headline:null===(n=null==this?void 0:this.emailCollection)||void 0===n?void 0:n.headline,bottomText:null===(a=null==this?void 0:this.emailCollection)||void 0===a?void 0:a.bottom_text,allowSkip:null===(s=null==this?void 0:this.emailCollection)||void 0===s?void 0:s.allow_skip,buttonText:null===(l=null==this?void 0:this.emailCollection)||void 0===l?void 0:l.button_text,isLoading:this.loading,errorMessage:this.error,onSubmitForm:t=>this.submit(t),onSkip:()=>this.skip(),i18n:this.i18n,provider:this.provider})}static get watchers(){return{duration:["handleDuration"],currentTime:["handleTimeCheck","handleShowChange"],show:["handleEmailStateChange"]}}};E.style=":host{display:block}";let F=class{constructor(r){t(this,r),this.submitForm=i(this,"submitForm",7),this.skip=i(this,"skip",7)}handleSubmit(t){this.submitForm.emit({email:this.email}),t.preventDefault()}componentDidLoad(){this.isAudioProvider="audio"===(this.type||this.provider),P(this.textInput,3,{maxFontSize:this.isAudioProvider?15:20,minFontSize:8})}handleChange(t){this.email=t.target.value}render(){var t,e,i,o;return r("div",{class:"overlay "+("rtl"===this.direction?"rtl":""),ref:t=>this.textInput=t},r("div",{class:"content"},r("h1",{class:this.isAudioProvider&&"is-small"},this.headline||(null===(t=null==this?void 0:this.i18n)||void 0===t?void 0:t.emailDefaultHeadline)),this.isLoading?r("presto-player-spinner",null):r("form",{onSubmit:t=>this.handleSubmit(t)},r("input",{type:"email",placeholder:null===(e=null==this?void 0:this.i18n)||void 0===e?void 0:e.emailPlaceholder,value:this.email,onInput:t=>this.handleChange(t),required:!0}),r("button",{type:"submit"},this.buttonText||(null===(i=null==this?void 0:this.i18n)||void 0===i?void 0:i.play))),this.errorMessage&&r("p",{class:"error"},this.errorMessage),this.bottomText&&r("p",{innerHTML:this.bottomText,class:this.isAudioProvider&&"is-small"}),!!this.allowSkip&&r("div",{class:"skip",onClick:()=>{this.skip.emit()}},null===(o=null==this?void 0:this.i18n)||void 0===o?void 0:o.skip," →")))}};F.style=':host{display:block;font-size:16px;width:100%;height:100%;position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;z-index:99999}*{box-sizing:border-box}a{color:#fff}.overlay{position:relative;display:flex;align-items:center;text-align:center;justify-content:center;padding:48px;color:#fff;font-family:var(--plyr-font-family, "San Francisco", -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", Avenir, "Avenir Next", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif);height:100%}.overlay:before{content:"";border-radius:var(--presto-player-border-radius, 0);opacity:var(--presto-player-email-background-opacity, 0.75);position:absolute;top:0;left:0;bottom:0;right:0;background-color:var(--presto-player-email-background, #000);z-index:-1;box-shadow:inset 0 0 100px black}.overlay.rtl form{flex-direction:row-reverse}.content{width:20em}form{display:flex;align-items:stretch;justify-content:center}input{background:#fff;border:none;font-size:0.8em;line-height:20px;padding:6px 8px;border-radius:0;border-width:1px;border-style:solid;border-color:transparent;border-radius:var(--presto-player-email-border-radius, 0) 0 0 var(--presto-player-email-border-radius);flex:1}@media screen and (min-width: 700px){input{padding:10px 14px}}input:focus{border-color:var(--plyr-color-main, #000);z-index:1}input:focus,input:hover{outline:none}.rtl input{border-radius:0 var(--presto-player-email-border-radius, 0) var(--presto-player-email-border-radius) 0}button{background-color:var(--presto-player-button-color, var(--plyr-color-main));border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-text, #fff);appearance:none;padding:6px 12px;align-items:center;display:inline-flex;border-width:1px;border-color:transparent;border-radius:0;cursor:pointer;font-size:0.8em;border-radius:0 var(--presto-player-email-border-radius, 0) var(--presto-player-email-border-radius) 0}@media screen and (min-width: 700px){button{padding:10px 18px}}button:focus{box-shadow:white 0px 0px 0px 2px, var(--plyr-color-main, #000) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;z-index:1}button:focus,button:hover{outline:none}.rtl button{border-radius:var(--presto-player-email-border-radius, 0) 0 0 var(--presto-player-email-border-radius)}h1{font-size:1.5em;font-weight:500;margin:0 0 22px 0;max-width:600px;line-height:1.1em}h1.is-small{margin-bottom:1em;font-size:1.1em}.skip{font-size:0.8em;font-weight:600;position:absolute;top:0;right:0;padding:4%;cursor:pointer}p{font-size:0.7em;margin:0;margin-top:1.5em}p.is-small{font-size:0.9em;margin-top:1em}';let L=class{constructor(r){t(this,r)}render(){return r(o,null,r("slot",null))}};L.style='.skin-modern.presto-player__wrapper button.plyr__control.plyr__control--overlaid{border-radius:2px;padding:3% 5%;max-width:135px;max-height:90px;box-sizing:content-box;position:absolute !important;top:50% !important;opacity:100%}.skin-modern.presto-player__wrapper button.plyr__control.plyr__control--overlaid svg{height:31px;width:37px}.skin-modern.presto-player__wrapper button.plyr__control.plyr__control--overlaid:hover,.skin-modern.presto-player__wrapper button.plyr__control.plyr__control--overlaid:focus{opacity:0.8;background:var(--plyr-color-main)}.skin-modern.presto-player__wrapper.caption-style-full .plyr:not(.plyr--hide-controls):not(.is-muted-overlay) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 9px) * -4))}.skin-modern.presto-player__wrapper .plyr--video .plyr__controls{padding:0px}.skin-modern.presto-player__wrapper .plyr--video .plyr__controls::before{content:"";background:var(--plyr-color-main);position:absolute;top:0;left:0;right:0;bottom:0;opacity:0.75}.skin-modern.presto-player__wrapper .plyr__controls__item{z-index:1}.skin-modern.presto-player__wrapper .plyr__controls__item.plyr__control:not(.presto-player-progress__marker):not([role*=menuitem]):not(.plyr__control--back){height:36px;border-radius:0px}.skin-modern.presto-player__wrapper .plyr__controls__item.plyr__control:not(.presto-player-progress__marker):not([role*=menuitem]):not(.plyr__control--back):focus{background-color:transparent;color:white}.skin-modern.presto-player__wrapper .plyr__controls__item.presto-player-progress__marker{z-index:2}.skin-modern.presto-player__wrapper .plyr__controls__item.plyr__menu{height:36px}.skin-modern.presto-player__wrapper .plyr--full-ui.plyr--video input[type=range]::-webkit-slider-runnable-track{height:2px;color:white}.skin-modern.presto-player__wrapper .presto-player__wrapper .plyr--full-ui.plyr--video input[type=range]::-webkit-slider-runnable-track{height:2px}.skin-modern.presto-player__wrapper .plyr--video .plyr__progress__buffer{height:2px;top:11px}.skin-modern.presto-player__wrapper .plyr__progress input[type=range]{cursor:pointer}.skin-modern.presto-player__wrapper .plyr--full-ui input[type=range]::-webkit-slider-thumb{top:1px;height:var(--plyr-range-thumb-height, 8px);width:var(--plyr-range-thumb-height, 8px);box-shadow:0px 0px 5px white}.skin-modern.presto-player__wrapper .plyr--full-ui input[type=range]::-webkit-slider-thumb:hover{transform:scale(1.5)}.skin-modern.presto-player__wrapper .plyr__controls .plyr__controls__item{margin:0px}.skin-modern.presto-player__wrapper .plyr__volume{width:auto}.skin-modern.presto-player__wrapper .plyr__volume input[type=range]{width:55px}.skin-modern.presto-player__wrapper .plyr__volume input[type=range]{cursor:pointer}.skin-modern.presto-player__wrapper .presto-player__muted-overlay .plyr__control.plyr__control--overlaid{border-radius:2px}.skin-modern.presto-player__wrapper .presto-player__muted-overlay .plyr__control.plyr__control--overlaid svg{height:40px;width:50px}.skin-modern.presto-player__wrapper .plyr__controls .plyr__controls__item[data-plyr=rewind] svg,.skin-modern.presto-player__wrapper .plyr__controls .plyr__controls__item[data-plyr=fast-forward] svg,.skin-modern.presto-player__wrapper .plyr__controls .plyr__controls__item[data-plyr=fullscreen] svg{width:22px;height:22px}@media screen and (max-width: 480px){.skin-modern.presto-player__wrapper .plyr__control--overlaid svg{height:18px;width:16px}}';let R=class{constructor(r){t(this,r),this.playVideo=i(this,"playVideo",7)}render(){var t,e,i,o,n,a,s,l,p;return r("div",{class:"presto-player__muted-overlay",onClick:()=>{this.mutedPreview=!1,this.playVideo.emit()}},(null===(t=this.preset)||void 0===t?void 0:t["play-large"])&&r("div",{class:"plyr__control plyr__control--overlaid","data-plyr":"play","aria-label":"Play",part:"muted-overlay-play"},r("svg",{id:"plyr-play",viewBox:"0 0 18 18"},r("path",{d:"M15.562 8.1L3.87.225c-.818-.562-1.87 0-1.87.9v15.75c0 .9 1.052 1.462 1.87.9L15.563 9.9c.584-.45.584-1.35 0-1.8z"})),r("span",{class:"plyr__sr-only"},"Play")),(null===(e=this.mutedOverlay)||void 0===e?void 0:e.enabled)&&(null===(i=this.mutedOverlay)||void 0===i?void 0:i.src)?r("div",{class:"presto-player__overlay is-image",part:"muted-overlay-image",style:{width:`${(null===(o=this.mutedOverlay)||void 0===o?void 0:o.width)||50}%`,left:100*((null===(a=null===(n=this.mutedOverlay)||void 0===n?void 0:n.focalPoint)||void 0===a?void 0:a.x)||.5)+"%",top:100*((null===(l=null===(s=this.mutedOverlay)||void 0===s?void 0:s.focalPoint)||void 0===l?void 0:l.y)||.5)+"%"}},r("img",{src:null===(p=this.mutedOverlay)||void 0===p?void 0:p.src,style:{transform:"translateX(-50%) translateY(-50%)"}})):"")}};R.style=":host{display:block}";var N=["premium","referrerPolicy"];function B(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function D(t,r){for(var e=0;e<r.length;e++){var i=r[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function $(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function q(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,i)}return e}function V(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?q(Object(e),!0).forEach((function(r){$(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):q(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}var H={addCSS:!0,thumbWidth:15,watch:!0};function U(t,r){return function(){return Array.from(document.querySelectorAll(r)).includes(this)}.call(t,r)}var Q=function(t){return null!=t?t.constructor:null},Y=function(t,r){return!!(t&&r&&t instanceof r)},W=function(t){return Q(t)===String},J=function(t){return Array.isArray(t)},G=function(t){return Y(t,NodeList)},K=W,X=J,Z=G,tt=function(t){return Y(t,Element)},rt=function(t){return Y(t,Event)},et=function(t){return function(t){return null==t}(t)||(W(t)||J(t)||G(t))&&!t.length||function(t){return Q(t)===Object}(t)&&!Object.keys(t).length};var it,ot,nt,at=function(){function t(r,e){(function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")})(this,t),tt(r)?this.element=r:K(r)&&(this.element=document.querySelector(r)),tt(this.element)&&et(this.element.rangeTouch)&&(this.config=V({},H,{},e),this.init())}return function(t,r,e){r&&D(t.prototype,r),e&&D(t,e)}(t,[{key:"init",value:function(){t.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){t.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(t){var r=this,e=t?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach((function(t){r.element[e](t,(function(t){return r.set(t)}),!1)}))}},{key:"get",value:function(r){if(!t.enabled||!rt(r))return null;var e,i=r.target,o=r.changedTouches[0],n=parseFloat(i.getAttribute("min"))||0,a=parseFloat(i.getAttribute("max"))||100,s=parseFloat(i.getAttribute("step"))||1,l=i.getBoundingClientRect(),p=100/l.width*(this.config.thumbWidth/2)/100;return 0>(e=100/l.width*(o.clientX-l.left))?e=0:100<e&&(e=100),50>e?e-=(100-2*e)*p:50<e&&(e+=2*(e-50)*p),n+function(t,r){if(1>r){var e=function(t){var r="".concat(t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return r?Math.max(0,(r[1]?r[1].length:0)-(r[2]?+r[2]:0)):0}(r);return parseFloat(t.toFixed(e))}return Math.round(t/r)*r}(e/100*(a-n),s)}},{key:"set",value:function(r){t.enabled&&rt(r)&&!r.target.disabled&&(r.preventDefault(),r.target.value=this.get(r),function(t,r){if(t&&r){var e=new Event(r,{bubbles:!0});t.dispatchEvent(e)}}(r.target,"touchend"===r.type?"change":"input"))}}],[{key:"setup",value:function(r){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=null;if(et(r)||K(r)?i=Array.from(document.querySelectorAll(K(r)?r:'input[type="range"]')):tt(r)?i=[r]:Z(r)?i=Array.from(r):X(r)&&(i=r.filter(tt)),et(i))return null;var o=V({},H,{},e);if(K(r)&&o.watch){var n=new MutationObserver((function(e){Array.from(e).forEach((function(e){Array.from(e.addedNodes).forEach((function(e){tt(e)&&U(e,r)&&new t(e,o)}))}))}));n.observe(document.body,{childList:!0,subtree:!0})}return i.map((function(r){return new t(r,e)}))}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),t}(),st=function(t){return null!=t?t.constructor:null},lt=function(t,r){return Boolean(t&&r&&t instanceof r)},pt=function(t){return null==t},ut=function(t){return st(t)===Object},dt=function(t){return st(t)===String},ct=function(t){return st(t)===Function},ht=function(t){return Array.isArray(t)},yt=function(t){return lt(t,NodeList)},vt=function(t){return pt(t)||(dt(t)||ht(t)||yt(t))&&!t.length||ut(t)&&!Object.keys(t).length},ft=pt,_t=ut,gt=function(t){return st(t)===Number&&!Number.isNaN(t)},mt=dt,bt=function(t){return st(t)===Boolean},wt=ct,kt=ht,xt=yt,zt=function(t){return null!==t&&"object"==p(t)&&1===t.nodeType&&"object"==p(t.style)&&"object"==p(t.ownerDocument)},jt=function(t){return lt(t,Event)},Tt=function(t){return lt(t,KeyboardEvent)},St=function(t){return lt(t,TextTrack)||!pt(t)&&dt(t.kind)},Ct=function(t){if(lt(t,window.URL))return!0;if(!dt(t))return!1;var r=t;t.startsWith("http://")&&t.startsWith("https://")||(r="http://".concat(t));try{return!vt(new URL(r).hostname)}catch(t){return!1}},Pt=vt,Ot=(it=document.createElement("span"),ot={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},nt=Object.keys(ot).find((function(t){return void 0!==it.style[t]})),!!mt(nt)&&ot[nt]);function At(t,r){setTimeout((function(){try{t.hidden=!0,t.hidden=!1}catch(t){}}),r)}var It={isIE:Boolean(window.document.documentMode),isEdge:window.navigator.userAgent.includes("Edge"),isWebkit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPhone:/(iPhone|iPod)/gi.test(navigator.platform),isIos:"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)};function Mt(t,r){return r.split(".").reduce((function(t,r){return t&&t[r]}),t)}function Et(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length,e=new Array(r>1?r-1:0),i=1;i<r;i++)e[i-1]=arguments[i];if(!e.length)return t;var o=e.shift();return _t(o)?(Object.keys(o).forEach((function(r){_t(o[r])?(Object.keys(t).includes(r)||Object.assign(t,s({},r,{})),Et(t[r],o[r])):Object.assign(t,s({},r,o[r]))})),Et.apply(void 0,[t].concat(e))):t}function Ft(t,r){Array.from(t.length?t:[t]).reverse().forEach((function(t,e){var i=e>0?r.cloneNode(!0):r,o=t.parentNode,n=t.nextSibling;i.appendChild(t),n?o.insertBefore(i,n):o.appendChild(i)}))}function Lt(t,r){zt(t)&&!Pt(r)&&Object.entries(r).filter((function(t){var r=n(t,2);return!ft(r[1])})).forEach((function(r){var e=n(r,2);return t.setAttribute(e[0],e[1])}))}function Rt(t,r,e){var i=document.createElement(t);return _t(r)&&Lt(i,r),mt(e)&&(i.innerText=e),i}function Nt(t,r,e,i){zt(r)&&r.appendChild(Rt(t,e,i))}function Bt(t){xt(t)||kt(t)?Array.from(t).forEach(Bt):zt(t)&&zt(t.parentNode)&&t.parentNode.removeChild(t)}function Dt(t){if(zt(t))for(var r=t.childNodes.length;r>0;)t.removeChild(t.lastChild),r-=1}function $t(t,r){return zt(r)&&zt(r.parentNode)&&zt(t)?(r.parentNode.replaceChild(t,r),t):null}function qt(t,r){if(!mt(t)||Pt(t))return{};var e={},i=Et({},r);return t.split(",").forEach((function(t){var r=t.trim(),o=r.replace(".",""),a=r.replace(/[[\]]/g,"").split("="),s=n(a,1)[0],l=a.length>1?a[1].replace(/["']/g,""):"";switch(r.charAt(0)){case".":e.class=mt(i.class)?"".concat(i.class," ").concat(o):o;break;case"#":e.id=r.replace("#","");break;case"[":e[s]=l}})),Et(i,e)}function Vt(t,r){if(zt(t)){var e=r;bt(e)||(e=!t.hidden),t.hidden=e}}function Ht(t,r,e){if(xt(t))return Array.from(t).map((function(t){return Ht(t,r,e)}));if(zt(t)){var i="toggle";return void 0!==e&&(i=e?"add":"remove"),t.classList[i](r),t.classList.contains(r)}return!1}function Ut(t,r){return zt(t)&&t.classList.contains(r)}function Qt(t,r){var e=Element.prototype;return(e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||function(){return Array.from(document.querySelectorAll(r)).includes(this)}).call(t,r)}function Yt(t){return this.elements.container.querySelectorAll(t)}function Wt(t){return this.elements.container.querySelector(t)}function Jt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];zt(t)&&(t.focus({preventScroll:!0}),r&&Ht(t,this.config.classNames.tabFocus))}var Gt={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},Kt={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check:function(t,r,e){var i=Kt[t]||"html5"!==r;return{api:i,ui:i&&Kt.rangeInput&&("video"!==t||!It.isIPhone||It.isIPhone&&e&&Kt.playsinline)}},pip:!(It.isIPhone||!wt(Rt("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||Rt("video").disablePictureInPicture)),airplay:wt(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime:function(t){if(Pt(t))return!1;var r=t.split("/"),e=n(r,1),i=t;if(!this.isHTML5||e[0]!==this.type)return!1;Object.keys(Gt).includes(i)&&(i+='; codecs="'.concat(Gt[t],'"'));try{return Boolean(i&&this.media.canPlayType(i).replace(/no/,""))}catch(t){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:function(){var t=document.createElement("input");return t.type="range","range"===t.type}(),touch:"ontouchstart"in document.documentElement,transitions:!1!==Ot,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},Xt=function(){var t=!1;try{var r=Object.defineProperty({},"passive",{get:function(){return t=!0,null}});window.addEventListener("test",null,r),window.removeEventListener("test",null,r)}catch(t){}return t}();function Zt(t,r,e){var i=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(t&&"addEventListener"in t&&!Pt(r)&&wt(e)){var s=r.split(" "),l=a;Xt&&(l={passive:n,capture:a}),s.forEach((function(r){i&&i.eventListeners&&o&&i.eventListeners.push({element:t,type:r,callback:e,options:l}),t[o?"addEventListener":"removeEventListener"](r,e,l)}))}}function tr(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2?arguments[2]:void 0,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Zt.call(this,t,r,e,!0,i,o)}function rr(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2?arguments[2]:void 0,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Zt.call(this,t,r,e,!1,i,o)}function er(t){var r=this,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=function a(){for(var s=arguments.length,l=new Array(s),p=0;p<s;p++)l[p]=arguments[p];rr(t,e,a,o,n),i.apply(r,l)};Zt.call(this,t,e,a,!0,o,n)}function ir(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(zt(t)&&!Pt(r)){var o=new CustomEvent(r,{bubbles:e,detail:a(a({},i),{},{plyr:this})});t.dispatchEvent(o)}}function or(){this&&this.eventListeners&&(this.eventListeners.forEach((function(t){t.element.removeEventListener(t.type,t.callback,t.options)})),this.eventListeners=[])}function nr(){var t=this;return new Promise((function(r){return t.ready?setTimeout(r,0):tr.call(t,t.elements.container,"ready",r)})).then((function(){}))}function ar(t){(function(t){return lt(t,Promise)&&ct(t.then)})(t)&&t.then(null,(function(){}))}function sr(t){return kt(t)?t.filter((function(r,e){return t.indexOf(r)===e})):t}function lr(t,r){return kt(t)&&t.length?t.reduce((function(t,e){return Math.abs(e-r)<Math.abs(t-r)?e:t})):null}function pr(t){return!(!window||!window.CSS)&&window.CSS.supports(t)}var ur=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce((function(t,r){var e=n(r,2),i=e[0],o=e[1];return a(a({},t),{},s({},i/o,[i,o]))}),{});function dr(t){return!!(kt(t)||mt(t)&&t.includes(":"))&&(kt(t)?t:t.split(":")).map(Number).every(gt)}function cr(t){if(!kt(t)||!t.every(gt))return null;var r=n(t,2),e=r[0],i=r[1],o=function t(r,e){return 0===e?r:t(e,r%e)}(e,i);return[e/o,i/o]}function hr(t){var r=function(t){return dr(t)?t.split(":").map(Number):null},e=r(t);if(null===e&&(e=r(this.config.ratio)),null===e&&!Pt(this.embed)&&kt(this.embed.ratio)&&(e=this.embed.ratio),null===e&&this.isHTML5){var i=this.media;e=[i.videoWidth,i.videoHeight]}return cr(e)}function yr(t){if(!this.isVideo)return{};var r=this.elements.wrapper,e=hr.call(this,t);if(!kt(e))return{};var i=cr(e),o=n(i,2),a=o[0],s=o[1],l=100/a*s;if(pr("aspect-ratio: ".concat(a,"/").concat(s))?r.style.aspectRatio="".concat(a,"/").concat(s):r.style.paddingBottom="".concat(l,"%"),this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){var p=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),u=(p-l)/(p/50);this.fullscreen.active?r.style.paddingBottom=null:this.media.style.transform="translateY(-".concat(u,"%)")}else this.isHTML5&&r.classList.add(this.config.classNames.videoFixedRatio);return{padding:l,ratio:e}}function vr(t,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.05,i=t/r,o=lr(Object.keys(ur),i);return Math.abs(o-i)<=e?ur[o]:[t,r]}var fr={getSources:function(){var t=this;return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter((function(r){var e=r.getAttribute("type");return!!Pt(e)||Kt.mime.call(t,e)})):[]},getQualityOptions:function(){return this.config.quality.forced?this.config.quality.options:fr.getSources.call(this).map((function(t){return Number(t.getAttribute("size"))})).filter(Boolean)},setup:function(){if(this.isHTML5){var t=this;t.options.speed=t.config.speed.options,Pt(this.config.ratio)||yr.call(t),Object.defineProperty(t.media,"quality",{get:function(){var r=fr.getSources.call(t).find((function(r){return r.getAttribute("src")===t.source}));return r&&Number(r.getAttribute("size"))},set:function(r){if(t.quality!==r){if(t.config.quality.forced&&wt(t.config.quality.onChange))t.config.quality.onChange(r);else{var e=fr.getSources.call(t).find((function(t){return Number(t.getAttribute("size"))===r}));if(!e)return;var i=t.media,o=i.currentTime,n=i.paused,a=i.preload,s=i.readyState,l=i.playbackRate;t.media.src=e.getAttribute("src"),("none"!==a||s)&&(t.once("loadedmetadata",(function(){t.speed=l,t.currentTime=o,n||ar(t.play())})),t.media.load())}ir.call(t,t.media,"qualitychange",!1,{quality:r})}}})}},cancelRequests:function(){this.isHTML5&&(Bt(fr.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function _r(t){return"".concat(t,"-").concat(Math.floor(1e4*Math.random()))}function gr(t){for(var r=arguments.length,e=new Array(r>1?r-1:0),i=1;i<r;i++)e[i-1]=arguments[i];return Pt(t)?t:t.toString().replace(/{(\d+)}/g,(function(t,r){return e[r].toString()}))}var mr=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return t.replace(new RegExp(r.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),e.toString())},br=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.toString().replace(/\w\S*/g,(function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}))};function wr(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=t.toString();return r=mr(r,"-"," "),r=mr(r,"_"," "),r=br(r),mr(r," ","")}function kr(t){var r=document.createElement("div");return r.appendChild(t),r.innerHTML}var xr={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},zr=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Pt(t)||Pt(r))return"";var e=Mt(r.i18n,t);if(Pt(e))return Object.keys(xr).includes(t)?xr[t]:"";var i={"{seektime}":r.seekTime,"{title}":r.title};return Object.entries(i).forEach((function(t){var r=n(t,2);e=mr(e,r[0],r[1])})),e},jr=function(){function t(r){var e=this;u(this,t),B(this,"get",(function(r){if(!t.supported||!e.enabled)return null;var i=window.localStorage.getItem(e.key);if(Pt(i))return null;var o=JSON.parse(i);return mt(r)&&r.length?o[r]:o})),B(this,"set",(function(r){if(t.supported&&e.enabled&&_t(r)){var i=e.get();Pt(i)&&(i={}),Et(i,r);try{window.localStorage.setItem(e.key,JSON.stringify(i))}catch(r){}}})),this.enabled=r.config.storage.enabled,this.key=r.config.storage.key}return l(t,null,[{key:"supported",get:function(){try{if(!("localStorage"in window))return!1;var t="___test";return window.localStorage.setItem(t,t),window.localStorage.removeItem(t),!0}catch(t){return!1}}}]),t}();function Tr(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";return new Promise((function(e,i){try{var o=new XMLHttpRequest;if(!("withCredentials"in o))return;o.addEventListener("load",(function(){if("text"===r)try{e(JSON.parse(o.responseText))}catch(t){e(o.responseText)}else e(o.response)})),o.addEventListener("error",(function(){throw new Error(o.status)})),o.open("GET",t,!0),o.responseType=r,o.send()}catch(t){i(t)}}))}function Sr(t,r){if(mt(t)){var e=mt(r),i=function(){return null!==document.getElementById(r)},o=function(t,r){t.innerHTML=r,e&&i()||document.body.insertAdjacentElement("afterbegin",t)};if(!e||!i()){var n=jr.supported,a=document.createElement("div");if(a.setAttribute("hidden",""),e&&a.setAttribute("id",r),n){var s=window.localStorage.getItem("cache-".concat(r));if(null!==s){var l=JSON.parse(s);o(a,l.content)}}Tr(t).then((function(t){if(!Pt(t)){if(n)try{window.localStorage.setItem("cache-".concat(r),JSON.stringify({content:t}))}catch(t){}o(a,t)}})).catch((function(){}))}}}var Cr=function(t){return Math.trunc(t/60/60%60,10)},Pr=function(t){return Math.trunc(t%60,10)};function Or(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!gt(t))return Or(void 0,r,e);var i,o=function(t){return"0".concat(t).slice(-2)},n=Cr(t),a=(i=t,Math.trunc(i/60%60,10)),s=Pr(t);return n=r||n>0?"".concat(n,":"):"","".concat(e&&t>0?"-":"").concat(n).concat(o(a),":").concat(o(s))}var Ar={getIconUrl:function(){var t=new URL(this.config.iconUrl,window.location),r=window.location.host?window.location.host:window.top.location.host,e=t.host!==r||It.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:e}},findElements:function(){try{return this.elements.controls=Wt.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:Yt.call(this,this.config.selectors.buttons.play),pause:Wt.call(this,this.config.selectors.buttons.pause),restart:Wt.call(this,this.config.selectors.buttons.restart),rewind:Wt.call(this,this.config.selectors.buttons.rewind),fastForward:Wt.call(this,this.config.selectors.buttons.fastForward),mute:Wt.call(this,this.config.selectors.buttons.mute),pip:Wt.call(this,this.config.selectors.buttons.pip),airplay:Wt.call(this,this.config.selectors.buttons.airplay),settings:Wt.call(this,this.config.selectors.buttons.settings),captions:Wt.call(this,this.config.selectors.buttons.captions),fullscreen:Wt.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=Wt.call(this,this.config.selectors.progress),this.elements.inputs={seek:Wt.call(this,this.config.selectors.inputs.seek),volume:Wt.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:Wt.call(this,this.config.selectors.display.buffer),currentTime:Wt.call(this,this.config.selectors.display.currentTime),duration:Wt.call(this,this.config.selectors.display.duration)},zt(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(".".concat(this.config.classNames.tooltip))),!0}catch(t){return this.debug.warn("It looks like there is a problem with your custom controls HTML",t),this.toggleNativeControls(!0),!1}},createIcon:function(t,r){var e="http://www.w3.org/2000/svg",i=Ar.getIconUrl.call(this),o="".concat(i.cors?"":i.url,"#").concat(this.config.iconPrefix),n=document.createElementNS(e,"svg");Lt(n,Et(r,{"aria-hidden":"true",focusable:"false"}));var a=document.createElementNS(e,"use"),s="".concat(o,"-").concat(t);return"href"in a&&a.setAttributeNS("http://www.w3.org/1999/xlink","href",s),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s),n.appendChild(a),n},createLabel:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=zr(t,this.config);return Rt("span",a(a({},r),{},{class:[r.class,this.config.classNames.hidden].filter(Boolean).join(" ")}),e)},createBadge:function(t){if(Pt(t))return null;var r=Rt("span",{class:this.config.classNames.menu.value});return r.appendChild(Rt("span",{class:this.config.classNames.menu.badge},t)),r},createButton:function(t,r){var e=this,i=Et({},r),o=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return(t=wr(t)).charAt(0).toLowerCase()+t.slice(1)}(t),n={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach((function(t){Object.keys(i).includes(t)&&(n[t]=i[t],delete i[t])})),"button"!==n.element||Object.keys(i).includes("type")||(i.type="button"),Object.keys(i).includes("class")?i.class.split(" ").some((function(t){return t===e.config.classNames.control}))||Et(i,{class:"".concat(i.class," ").concat(this.config.classNames.control)}):i.class=this.config.classNames.control,t){case"play":n.toggle=!0,n.label="play",n.labelPressed="pause",n.icon="play",n.iconPressed="pause";break;case"mute":n.toggle=!0,n.label="mute",n.labelPressed="unmute",n.icon="volume",n.iconPressed="muted";break;case"captions":n.toggle=!0,n.label="enableCaptions",n.labelPressed="disableCaptions",n.icon="captions-off",n.iconPressed="captions-on";break;case"fullscreen":n.toggle=!0,n.label="enterFullscreen",n.labelPressed="exitFullscreen",n.icon="enter-fullscreen",n.iconPressed="exit-fullscreen";break;case"play-large":i.class+=" ".concat(this.config.classNames.control,"--overlaid"),o="play",n.label="play",n.icon="play";break;default:Pt(n.label)&&(n.label=o),Pt(n.icon)&&(n.icon=t)}var a=Rt(n.element);return n.toggle?(a.appendChild(Ar.createIcon.call(this,n.iconPressed,{class:"icon--pressed"})),a.appendChild(Ar.createIcon.call(this,n.icon,{class:"icon--not-pressed"})),a.appendChild(Ar.createLabel.call(this,n.labelPressed,{class:"label--pressed"})),a.appendChild(Ar.createLabel.call(this,n.label,{class:"label--not-pressed"}))):(a.appendChild(Ar.createIcon.call(this,n.icon)),a.appendChild(Ar.createLabel.call(this,n.label))),Et(i,qt(this.config.selectors.buttons[o],i)),Lt(a,i),"play"===o?(kt(this.elements.buttons[o])||(this.elements.buttons[o]=[]),this.elements.buttons[o].push(a)):this.elements.buttons[o]=a,a},createRange:function(t,r){var e=Rt("input",Et(qt(this.config.selectors.inputs[t]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":zr(t,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},r));return this.elements.inputs[t]=e,Ar.updateRangeFill.call(this,e),at.setup(e),e},createProgress:function(t,r){var e=Rt("progress",Et(qt(this.config.selectors.display[t]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},r));if("volume"!==t){e.appendChild(Rt("span",null,"0"));var i={played:"played",buffer:"buffered"}[t],o=i?zr(i,this.config):"";e.innerText="% ".concat(o.toLowerCase())}return this.elements.display[t]=e,e},createTime:function(t,r){var e=qt(this.config.selectors.display[t],r),i=Rt("div",Et(e,{class:"".concat(e.class?e.class:""," ").concat(this.config.classNames.display.time," ").trim(),"aria-label":zr(t,this.config)}),"00:00");return this.elements.display[t]=i,i},bindMenuItemShortcuts:function(t,r){var e=this;tr.call(this,t,"keydown keyup",(function(i){if([32,38,39,40].includes(i.which)&&(i.preventDefault(),i.stopPropagation(),"keydown"!==i.type)){var o,n=Qt(t,'[role="menuitemradio"]');!n&&[32,39].includes(i.which)?Ar.showMenuPanel.call(e,r,!0):32!==i.which&&(40===i.which||n&&39===i.which?zt(o=t.nextElementSibling)||(o=t.parentNode.firstElementChild):zt(o=t.previousElementSibling)||(o=t.parentNode.lastElementChild),Jt.call(e,o,!0))}}),!1),tr.call(this,t,"keyup",(function(t){13===t.which&&Ar.focusFirstMenuItem.call(e,null,!0)}))},createMenuItem:function(t){var r=this,e=t.value,i=t.list,o=t.type,n=t.title,a=t.badge,s=void 0===a?null:a,l=t.checked,p=void 0!==l&&l,u=qt(this.config.selectors.inputs[o]),d=Rt("button",Et(u,{type:"button",role:"menuitemradio",class:"".concat(this.config.classNames.control," ").concat(u.class?u.class:"").trim(),"aria-checked":p,value:e})),c=Rt("span");c.innerHTML=n,zt(s)&&c.appendChild(s),d.appendChild(c),Object.defineProperty(d,"checked",{enumerable:!0,get:function(){return"true"===d.getAttribute("aria-checked")},set:function(t){t&&Array.from(d.parentNode.children).filter((function(t){return Qt(t,'[role="menuitemradio"]')})).forEach((function(t){return t.setAttribute("aria-checked","false")})),d.setAttribute("aria-checked",t?"true":"false")}}),this.listeners.bind(d,"click keyup",(function(t){if(!Tt(t)||32===t.which){switch(t.preventDefault(),t.stopPropagation(),d.checked=!0,o){case"language":r.currentTrack=Number(e);break;case"quality":r.quality=e;break;case"speed":r.speed=parseFloat(e)}Ar.showMenuPanel.call(r,"home",Tt(t))}}),o,!1),Ar.bindMenuItemShortcuts.call(this,d,o),i.appendChild(d)},formatTime:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return gt(t)?Or(t,Cr(this.duration)>0,r):t},updateTimeDisplay:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];zt(t)&&gt(r)&&(t.innerText=Ar.formatTime(r,e))},updateVolume:function(){this.supported.ui&&(zt(this.elements.inputs.volume)&&Ar.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),zt(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;zt(t)&&(t.value=r,Ar.updateRangeFill.call(this,t))},updateProgress:function(t){var r=this;if(this.supported.ui&&jt(t)){var e=0;if(t)switch(t.type){case"timeupdate":case"seeking":case"seeked":e=function(t,r){return 0===t||0===r||Number.isNaN(t)||Number.isNaN(r)?0:(t/r*100).toFixed(2)}(this.currentTime,this.duration),"timeupdate"===t.type&&Ar.setRange.call(this,this.elements.inputs.seek,e);break;case"playing":case"progress":!function(t,e){var i=gt(e)?e:0,o=zt(t)?t:r.elements.display.buffer;if(zt(o)){o.value=i;var n=o.getElementsByTagName("span")[0];zt(n)&&(n.childNodes[0].nodeValue=i)}}(this.elements.display.buffer,100*this.buffered)}}},updateRangeFill:function(t){var r=jt(t)?t.target:t;if(zt(r)&&"range"===r.getAttribute("type")){if(Qt(r,this.config.selectors.inputs.seek)){r.setAttribute("aria-valuenow",this.currentTime);var e=Ar.formatTime(this.currentTime),i=Ar.formatTime(this.duration),o=zr("seekLabel",this.config);r.setAttribute("aria-valuetext",o.replace("{currentTime}",e).replace("{duration}",i))}else if(Qt(r,this.config.selectors.inputs.volume)){var n=100*r.value;r.setAttribute("aria-valuenow",n),r.setAttribute("aria-valuetext","".concat(n.toFixed(1),"%"))}else r.setAttribute("aria-valuenow",r.value);It.isWebkit&&r.style.setProperty("--value",r.value/r.max*100+"%")}},updateSeekTooltip:function(t){var r=this;if(this.config.tooltips.seek&&zt(this.elements.inputs.seek)&&zt(this.elements.display.seekTooltip)&&0!==this.duration){var e="".concat(this.config.classNames.tooltip,"--visible"),i=function(t){return Ht(r.elements.display.seekTooltip,e,t)};if(this.touch)i(!1);else{var o=0,n=this.elements.progress.getBoundingClientRect();if(jt(t))o=100/n.width*(t.pageX-n.left);else{if(!Ut(this.elements.display.seekTooltip,e))return;o=parseFloat(this.elements.display.seekTooltip.style.left,10)}o<0?o=0:o>100&&(o=100),Ar.updateTimeDisplay.call(this,this.elements.display.seekTooltip,this.duration/100*o),this.elements.display.seekTooltip.style.left="".concat(o,"%"),jt(t)&&["mouseenter","mouseleave"].includes(t.type)&&i("mouseenter"===t.type)}}},timeUpdate:function(t){var r=!zt(this.elements.display.duration)&&this.config.invertTime;Ar.updateTimeDisplay.call(this,this.elements.display.currentTime,r?this.duration-this.currentTime:this.currentTime,r),t&&"timeupdate"===t.type&&this.media.seeking||Ar.updateProgress.call(this,t)},durationUpdate:function(){if(this.supported.ui&&(this.config.invertTime||!this.currentTime)){if(this.duration>=Math.pow(2,32))return Vt(this.elements.display.currentTime,!0),void Vt(this.elements.progress,!0);zt(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);var t=zt(this.elements.display.duration);!t&&this.config.displayDuration&&this.paused&&Ar.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),t&&Ar.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),Ar.updateSeekTooltip.call(this)}},toggleMenuButton:function(t,r){Vt(this.elements.settings.buttons[t],!r)},updateSetting:function(t,r,e){var i=this.elements.settings.panels[t],o=null,n=r;if("captions"===t)o=this.currentTrack;else{if(o=Pt(e)?this[t]:e,Pt(o)&&(o=this.config[t].default),!Pt(this.options[t])&&!this.options[t].includes(o))return void this.debug.warn("Unsupported value of '".concat(o,"' for ").concat(t));if(!this.config[t].options.includes(o))return void this.debug.warn("Disabled value of '".concat(o,"' for ").concat(t))}if(zt(n)||(n=i&&i.querySelector('[role="menu"]')),zt(n)){this.elements.settings.buttons[t].querySelector(".".concat(this.config.classNames.menu.value)).innerHTML=Ar.getLabel.call(this,t,o);var a=n&&n.querySelector('[value="'.concat(o,'"]'));zt(a)&&(a.checked=!0)}},getLabel:function(t,r){switch(t){case"speed":return 1===r?zr("normal",this.config):"".concat(r,"&times;");case"quality":if(gt(r)){if(0===r)return zr("auto",this.config);var e=zr("qualityLabel.".concat(r),this.config);return e.length?e:"".concat(r,"p")}return br(r);case"captions":return Er.getLabel.call(this);default:return null}},setQualityMenu:function(t){var r=this;if(zt(this.elements.settings.panels.quality)){var e="quality",i=this.elements.settings.panels.quality.querySelector('[role="menu"]');kt(t)&&(this.options.quality=sr(t).filter((function(t){return r.config.quality.options.includes(t)})));var o=!Pt(this.options.quality)&&this.options.quality.length>1;if(Ar.toggleMenuButton.call(this,e,o),Dt(i),Ar.checkMenu.call(this),o){var n=function(t){var e=zr("qualityBadge.".concat(t),r.config);return e.length?Ar.createBadge.call(r,e):null};this.options.quality.sort((function(t,e){var i=r.config.quality.options;return i.indexOf(t)>i.indexOf(e)?1:-1})).forEach((function(t){Ar.createMenuItem.call(r,{value:t,list:i,type:e,title:Ar.getLabel.call(r,"quality",t),badge:n(t)})})),Ar.updateSetting.call(this,e,i)}}},setCaptionsMenu:function(){var t=this;if(zt(this.elements.settings.panels.captions)){var r="captions",e=this.elements.settings.panels.captions.querySelector('[role="menu"]'),i=Er.getTracks.call(this),o=Boolean(i.length);if(Ar.toggleMenuButton.call(this,r,o),Dt(e),Ar.checkMenu.call(this),o){var n=i.map((function(r,i){return{value:i,checked:t.captions.toggled&&t.currentTrack===i,title:Er.getLabel.call(t,r),badge:r.language&&Ar.createBadge.call(t,r.language.toUpperCase()),list:e,type:"language"}}));n.unshift({value:-1,checked:!this.captions.toggled,title:zr("disabled",this.config),list:e,type:"language"}),n.forEach(Ar.createMenuItem.bind(this)),Ar.updateSetting.call(this,r,e)}}},setSpeedMenu:function(){var t=this;if(zt(this.elements.settings.panels.speed)){var r="speed",e=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter((function(r){return r>=t.minimumSpeed&&r<=t.maximumSpeed}));var i=!Pt(this.options.speed)&&this.options.speed.length>1;Ar.toggleMenuButton.call(this,r,i),Dt(e),Ar.checkMenu.call(this),i&&(this.options.speed.forEach((function(i){Ar.createMenuItem.call(t,{value:i,list:e,type:r,title:Ar.getLabel.call(t,"speed",i)})})),Ar.updateSetting.call(this,r,e))}},checkMenu:function(){var t=this.elements.settings.buttons,r=!Pt(t)&&Object.values(t).some((function(t){return!t.hidden}));Vt(this.elements.settings.menu,!r)},focusFirstMenuItem:function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.elements.settings.popup.hidden){var e=t;zt(e)||(e=Object.values(this.elements.settings.panels).find((function(t){return!t.hidden})));var i=e.querySelector('[role^="menuitem"]');Jt.call(this,i,r)}},toggleMenu:function(t){var r=this.elements.settings.popup,e=this.elements.buttons.settings;if(zt(r)&&zt(e)){var i=r.hidden,o=i;if(bt(t))o=t;else if(Tt(t)&&27===t.which)o=!1;else if(jt(t)){var n=wt(t.composedPath)?t.composedPath()[0]:t.target,a=r.contains(n);if(a||!a&&t.target!==e&&o)return}e.setAttribute("aria-expanded",o),Vt(r,!o),Ht(this.elements.container,this.config.classNames.menu.open,o),o&&Tt(t)?Ar.focusFirstMenuItem.call(this,null,!0):o||i||Jt.call(this,e,Tt(t))}},getMenuSize:function(t){var r=t.cloneNode(!0);r.style.position="absolute",r.style.opacity=0,r.removeAttribute("hidden"),t.parentNode.appendChild(r);var e=r.scrollWidth,i=r.scrollHeight;return Bt(r),{width:e,height:i}},showMenuPanel:function(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.elements.container.querySelector("#plyr-settings-".concat(this.id,"-").concat(r));if(zt(i)){var o=i.parentNode,n=Array.from(o.children).find((function(t){return!t.hidden}));if(Kt.transitions&&!Kt.reducedMotion){o.style.width="".concat(n.scrollWidth,"px"),o.style.height="".concat(n.scrollHeight,"px");var a=Ar.getMenuSize.call(this,i),s=function r(e){e.target===o&&["width","height"].includes(e.propertyName)&&(o.style.width="",o.style.height="",rr.call(t,o,Ot,r))};tr.call(this,o,Ot,s),o.style.width="".concat(a.width,"px"),o.style.height="".concat(a.height,"px")}Vt(n,!0),Vt(i,!1),Ar.focusFirstMenuItem.call(this,i,e)}},setDownloadUrl:function(){var t=this.elements.buttons.download;zt(t)&&t.setAttribute("href",this.download)},create:function(t){var r=this,e=Ar.bindMenuItemShortcuts,i=Ar.createButton,o=Ar.createProgress,n=Ar.createRange,a=Ar.createTime,s=Ar.setQualityMenu,l=Ar.setSpeedMenu,p=Ar.showMenuPanel;this.elements.controls=null,kt(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(i.call(this,"play-large"));var u=Rt("div",qt(this.config.selectors.controls.wrapper));this.elements.controls=u;var d={class:"plyr__controls__item"};return sr(kt(this.config.controls)?this.config.controls:[]).forEach((function(s){if("restart"===s&&u.appendChild(i.call(r,"restart",d)),"rewind"===s&&u.appendChild(i.call(r,"rewind",d)),"play"===s&&u.appendChild(i.call(r,"play",d)),"fast-forward"===s&&u.appendChild(i.call(r,"fast-forward",d)),"progress"===s){var l=Rt("div",{class:"".concat(d.class," plyr__progress__container")}),c=Rt("div",qt(r.config.selectors.progress));if(c.appendChild(n.call(r,"seek",{id:"plyr-seek-".concat(t.id)})),c.appendChild(o.call(r,"buffer")),r.config.tooltips.seek){var h=Rt("span",{class:r.config.classNames.tooltip},"00:00");c.appendChild(h),r.elements.display.seekTooltip=h}r.elements.progress=c,l.appendChild(r.elements.progress),u.appendChild(l)}if("current-time"===s&&u.appendChild(a.call(r,"currentTime",d)),"duration"===s&&u.appendChild(a.call(r,"duration",d)),"mute"===s||"volume"===s){var y=r.elements.volume;zt(y)&&u.contains(y)||(y=Rt("div",Et({},d,{class:"".concat(d.class," plyr__volume").trim()})),r.elements.volume=y,u.appendChild(y)),"mute"===s&&y.appendChild(i.call(r,"mute")),"volume"!==s||It.isIos||y.appendChild(n.call(r,"volume",Et({max:1,step:.05,value:r.config.volume},{id:"plyr-volume-".concat(t.id)})))}if("captions"===s&&u.appendChild(i.call(r,"captions",d)),"settings"===s&&!Pt(r.config.settings)){var v=Rt("div",Et({},d,{class:"".concat(d.class," plyr__menu").trim(),hidden:""}));v.appendChild(i.call(r,"settings",{"aria-haspopup":!0,"aria-controls":"plyr-settings-".concat(t.id),"aria-expanded":!1}));var f=Rt("div",{class:"plyr__menu__container",id:"plyr-settings-".concat(t.id),hidden:""}),_=Rt("div"),g=Rt("div",{id:"plyr-settings-".concat(t.id,"-home")}),m=Rt("div",{role:"menu"});g.appendChild(m),_.appendChild(g),r.elements.settings.panels.home=g,r.config.settings.forEach((function(i){var o=Rt("button",Et(qt(r.config.selectors.buttons.settings),{type:"button",class:"".concat(r.config.classNames.control," ").concat(r.config.classNames.control,"--forward"),role:"menuitem","aria-haspopup":!0,hidden:""}));e.call(r,o,i),tr.call(r,o,"click",(function(){p.call(r,i,!1)}));var n=Rt("span",null,zr(i,r.config)),a=Rt("span",{class:r.config.classNames.menu.value});a.innerHTML=t[i],n.appendChild(a),o.appendChild(n),m.appendChild(o);var s=Rt("div",{id:"plyr-settings-".concat(t.id,"-").concat(i),hidden:""}),l=Rt("button",{type:"button",class:"".concat(r.config.classNames.control," ").concat(r.config.classNames.control,"--back")});l.appendChild(Rt("span",{"aria-hidden":!0},zr(i,r.config))),l.appendChild(Rt("span",{class:r.config.classNames.hidden},zr("menuBack",r.config))),tr.call(r,s,"keydown",(function(t){37===t.which&&(t.preventDefault(),t.stopPropagation(),p.call(r,"home",!0))}),!1),tr.call(r,l,"click",(function(){p.call(r,"home",!1)})),s.appendChild(l),s.appendChild(Rt("div",{role:"menu"})),_.appendChild(s),r.elements.settings.buttons[i]=o,r.elements.settings.panels[i]=s})),f.appendChild(_),v.appendChild(f),u.appendChild(v),r.elements.settings.popup=f,r.elements.settings.menu=v}if("pip"===s&&Kt.pip&&u.appendChild(i.call(r,"pip",d)),"airplay"===s&&Kt.airplay&&u.appendChild(i.call(r,"airplay",d)),"download"===s){var b=Et({},d,{element:"a",href:r.download,target:"_blank"});r.isHTML5&&(b.download=""),!Ct(r.config.urls.download)&&r.isEmbed&&Et(b,{icon:"logo-".concat(r.provider),label:r.provider}),u.appendChild(i.call(r,"download",b))}"fullscreen"===s&&u.appendChild(i.call(r,"fullscreen",d))})),this.isHTML5&&s.call(this,fr.getQualityOptions.call(this)),l.call(this),u},inject:function(){var t=this;if(this.config.loadSprite){var r=Ar.getIconUrl.call(this);r.cors&&Sr(r.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());var e=null;this.elements.controls=null;var i,o={id:this.id,seektime:this.config.seekTime,title:this.config.title},a=!0;if(wt(this.config.controls)&&(this.config.controls=this.config.controls.call(this,o)),this.config.controls||(this.config.controls=[]),zt(this.config.controls)||mt(this.config.controls)?e=this.config.controls:(e=Ar.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Er.getLabel.call(this)}),a=!1),a&&mt(this.config.controls)&&(e=function(t){var r=t;return Object.entries(o).forEach((function(t){var e=n(t,2),i=e[1];r=mr(r,"{".concat(e[0],"}"),i)})),r}(e)),mt(this.config.selectors.controls.container)&&(i=document.querySelector(this.config.selectors.controls.container)),zt(i)||(i=this.elements.container),i[zt(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),zt(this.elements.controls)||Ar.findElements.call(this),!Pt(this.elements.buttons)){var s=function(r){var e=t.config.classNames.controlPressed;Object.defineProperty(r,"pressed",{enumerable:!0,get:function(){return Ut(r,e)},set:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Ht(r,e,t)}})};Object.values(this.elements.buttons).filter(Boolean).forEach((function(t){kt(t)||xt(t)?Array.from(t).filter(Boolean).forEach(s):s(t)}))}if(It.isEdge&&At(i),this.config.tooltips.controls){var l=this.config,p=l.classNames,u=l.selectors,d="".concat(u.controls.wrapper," ").concat(u.labels," .").concat(p.hidden),c=Yt.call(this,d);Array.from(c).forEach((function(r){Ht(r,t.config.classNames.hidden,!1),Ht(r,t.config.classNames.tooltip,!0)}))}}};function Ir(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=t;if(r){var i=document.createElement("a");i.href=e,e=i.href}try{return new URL(e)}catch(t){return null}}function Mr(t){var r=new URLSearchParams;return _t(t)&&Object.entries(t).forEach((function(t){var e=n(t,2);r.set(e[0],e[1])})),r}var Er={setup:function(){if(this.supported.ui)if(!this.isVideo||this.isYouTube||this.isHTML5&&!Kt.textTracks)kt(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Ar.setCaptionsMenu.call(this);else{if(zt(this.elements.captions)||(this.elements.captions=Rt("div",qt(this.config.selectors.captions)),function(t,r){zt(t)&&zt(r)&&r.parentNode.insertBefore(t,r.nextSibling)}(this.elements.captions,this.elements.wrapper)),It.isIE&&window.URL){var t=this.media.querySelectorAll("track");Array.from(t).forEach((function(t){var r=t.getAttribute("src"),e=Ir(r);null!==e&&e.hostname!==window.location.href.hostname&&["http:","https:"].includes(e.protocol)&&Tr(r,"blob").then((function(r){t.setAttribute("src",window.URL.createObjectURL(r))})).catch((function(){Bt(t)}))}))}var r=sr((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map((function(t){return t.split("-")[0]}))),e=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();"auto"===e&&(e=n(r,1)[0]);var i=this.storage.get("captions");bt(i)||(i=this.config.captions.active),Object.assign(this.captions,{toggled:!1,active:i,language:e,languages:r}),this.isHTML5&&tr.call(this,this.media.textTracks,this.config.captions.update?"addtrack removetrack":"removetrack",Er.update.bind(this)),setTimeout(Er.update.bind(this),0)}},update:function(){var t=this,r=Er.getTracks.call(this,!0),e=this.captions,i=e.active,o=e.language,n=e.meta,a=e.currentTrackNode,s=Boolean(r.find((function(t){return t.language===o})));this.isHTML5&&this.isVideo&&r.filter((function(t){return!n.get(t)})).forEach((function(r){t.debug.log("Track added",r),n.set(r,{default:"showing"===r.mode}),"showing"===r.mode&&(r.mode="hidden"),tr.call(t,r,"cuechange",(function(){return Er.updateCues.call(t)}))})),(s&&this.language!==o||!r.includes(a))&&(Er.setLanguage.call(this,o),Er.toggle.call(this,i&&s)),this.elements&&Ht(this.elements.container,this.config.classNames.captions.enabled,!Pt(r)),kt(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Ar.setCaptionsMenu.call(this)},toggle:function(t){var r=this,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.supported.ui){var i=this.captions.toggled,o=this.config.classNames.captions.active,n=ft(t)?!i:t;if(n!==i){if(e||(this.captions.active=n,this.storage.set({captions:n})),!this.language&&n&&!e){var a=Er.getTracks.call(this),s=Er.findTrack.call(this,[this.captions.language].concat(d(this.captions.languages)),!0);return this.captions.language=s.language,void Er.set.call(this,a.indexOf(s))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=n),Ht(this.elements.container,o,n),this.captions.toggled=n,Ar.updateSetting.call(this,"captions"),ir.call(this,this.media,n?"captionsenabled":"captionsdisabled")}setTimeout((function(){n&&r.captions.toggled&&r.captions.currentTrackNode&&(r.captions.currentTrackNode.mode="hidden")}))}},set:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=Er.getTracks.call(this);if(-1!==t)if(gt(t))if(t in e){if(this.captions.currentTrack!==t){this.captions.currentTrack=t;var i=e[t],o=i||{},n=o.language;this.captions.currentTrackNode=i,Ar.updateSetting.call(this,"captions"),r||(this.captions.language=n,this.storage.set({language:n})),this.isVimeo&&this.embed.enableTextTrack(n),ir.call(this,this.media,"languagechange")}Er.toggle.call(this,!0,r),this.isHTML5&&this.isVideo&&Er.updateCues.call(this)}else this.debug.warn("Track not found",t);else this.debug.warn("Invalid caption argument",t);else Er.toggle.call(this,!1,r)},setLanguage:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(mt(t)){var e=t.toLowerCase();this.captions.language=e;var i=Er.getTracks.call(this),o=Er.findTrack.call(this,[e]);Er.set.call(this,i.indexOf(o),r)}else this.debug.warn("Invalid language argument",t)},getTracks:function(){var t=this,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Array.from((this.media||{}).textTracks||[]).filter((function(e){return!t.isHTML5||r||t.captions.meta.has(e)})).filter((function(t){return["captions","subtitles"].includes(t.kind)}))},findTrack:function(t){var r,e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=Er.getTracks.call(this),n=function(t){return Number((e.captions.meta.get(t)||{}).default)},a=Array.from(o).sort((function(t,r){return n(r)-n(t)}));return t.every((function(t){return!(r=a.find((function(r){return r.language===t})))})),r||(i?a[0]:void 0)},getCurrentTrack:function(){return Er.getTracks.call(this)[this.currentTrack]},getLabel:function(t){var r=t;return!St(r)&&Kt.textTracks&&this.captions.toggled&&(r=Er.getCurrentTrack.call(this)),St(r)?Pt(r.label)?Pt(r.language)?zr("enabled",this.config):t.language.toUpperCase():r.label:zr("disabled",this.config)},updateCues:function(t){if(this.supported.ui)if(zt(this.elements.captions))if(ft(t)||Array.isArray(t)){var r=t;if(!r){var e=Er.getCurrentTrack.call(this);r=Array.from((e||{}).activeCues||[]).map((function(t){return t.getCueAsHTML()})).map(kr)}var i=r.map((function(t){return t.trim()})).join("\n");if(i!==this.elements.captions.innerHTML){Dt(this.elements.captions);var o=Rt("span",qt(this.config.selectors.caption));o.innerHTML=i,this.elements.captions.appendChild(o),ir.call(this,this.media,"cuechange")}}else this.debug.warn("updateCues: Invalid input",t);else this.debug.warn("No captions element to render to")}},Fr={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.6.9/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"},auto:"AUTO"},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isIos:"plyr--is-ios",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},tabFocus:"plyr__tab-focus",previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1}},Lr={html5:"html5",youtube:"youtube",vimeo:"vimeo"},Rr=function(){},Nr=function(){function t(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];u(this,t),this.enabled=window.console&&r,this.enabled&&this.log("Debugging enabled")}return l(t,[{key:"log",get:function(){return this.enabled?Function.prototype.bind.call(console.log,console):Rr}},{key:"warn",get:function(){return this.enabled?Function.prototype.bind.call(console.warn,console):Rr}},{key:"error",get:function(){return this.enabled?Function.prototype.bind.call(console.error,console):Rr}}]),t}(),Br=function(){function t(r){var e=this;u(this,t),B(this,"onChange",(function(){if(e.enabled){var t=e.player.elements.buttons.fullscreen;zt(t)&&(t.pressed=e.active),ir.call(e.player,e.target===e.player.media?e.target:e.player.elements.container,e.active?"enterfullscreen":"exitfullscreen",!0)}})),B(this,"toggleFallback",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t?e.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(e.scrollPosition.x,e.scrollPosition.y),document.body.style.overflow=t?"hidden":"",Ht(e.target,e.player.config.classNames.fullscreen.fallback,t),It.isIos){var r=document.head.querySelector('meta[name="viewport"]'),i="viewport-fit=cover";r||(r=document.createElement("meta")).setAttribute("name","viewport");var o=mt(r.content)&&r.content.includes(i);t?(e.cleanupViewport=!o,o||(r.content+=",".concat(i))):e.cleanupViewport&&(r.content=r.content.split(",").filter((function(t){return t.trim()!==i})).join(","))}e.onChange()})),B(this,"trapFocus",(function(t){if(!It.isIos&&e.active&&"Tab"===t.key&&9===t.keyCode){var r=document.activeElement,i=Yt.call(e.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),o=n(i,1)[0],a=i[i.length-1];r!==a||t.shiftKey?r===o&&t.shiftKey&&(a.focus(),t.preventDefault()):(o.focus(),t.preventDefault())}})),B(this,"update",(function(){e.player.debug.log(e.enabled?"".concat(e.forceFallback?"Fallback (forced)":t.native?"Native":"Fallback"," fullscreen enabled"):"Fullscreen not supported and fallback disabled"),Ht(e.player.elements.container,e.player.config.classNames.fullscreen.enabled,e.enabled)})),B(this,"enter",(function(){e.enabled&&(It.isIos&&e.player.config.fullscreen.iosNative?e.player.isVimeo?e.player.embed.requestFullscreen():e.target.webkitEnterFullscreen():!t.native||e.forceFallback?e.toggleFallback(!0):e.prefix?Pt(e.prefix)||e.target["".concat(e.prefix,"Request").concat(e.property)]():e.target.requestFullscreen({navigationUI:"hide"}))})),B(this,"exit",(function(){if(e.enabled)if(It.isIos&&e.player.config.fullscreen.iosNative)e.target.webkitExitFullscreen(),ar(e.player.play());else if(!t.native||e.forceFallback)e.toggleFallback(!1);else if(e.prefix){if(!Pt(e.prefix)){var r="moz"===e.prefix?"Cancel":"Exit";document["".concat(e.prefix).concat(r).concat(e.property)]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)})),B(this,"toggle",(function(){e.active?e.exit():e.enter()})),this.player=r,this.prefix=t.prefix,this.property=t.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===r.config.fullscreen.fallback,this.player.elements.fullscreen=r.config.fullscreen.container&&function(t,r){return(Element.prototype.closest||function(){var t=this;do{if(Qt.matches(t,r))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}).call(t,r)}(this.player.elements.container,r.config.fullscreen.container),tr.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":"".concat(this.prefix,"fullscreenchange"),(function(){e.onChange()})),tr.call(this.player,this.player.elements.container,"dblclick",(function(t){zt(e.player.elements.controls)&&e.player.elements.controls.contains(t.target)||e.player.listeners.proxy(t,e.toggle,"fullscreen")})),tr.call(this,this.player.elements.container,"keydown",(function(t){return e.trapFocus(t)})),this.update()}return l(t,[{key:"usingNative",get:function(){return t.native&&!this.forceFallback}},{key:"enabled",get:function(){return(t.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}},{key:"active",get:function(){if(!this.enabled)return!1;if(!t.native||this.forceFallback)return Ut(this.target,this.player.config.classNames.fullscreen.fallback);var r=this.prefix?this.target.getRootNode()["".concat(this.prefix).concat(this.property,"Element")]:this.target.getRootNode().fullscreenElement;return r&&r.shadowRoot?r===this.target.getRootNode().host:r===this.target}},{key:"target",get:function(){return It.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen||this.player.elements.container}}],[{key:"native",get:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},{key:"prefix",get:function(){if(wt(document.exitFullscreen))return"";var t="";return["webkit","moz","ms"].some((function(r){return!(!wt(document["".concat(r,"ExitFullscreen")])&&!wt(document["".concat(r,"CancelFullScreen")])||(t=r,0))})),t}},{key:"property",get:function(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}}]),t}();function Dr(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new Promise((function(e,i){var o=new Image,n=function(){delete o.onload,delete o.onerror,(o.naturalWidth>=r?e:i)(o)};Object.assign(o,{onload:n,onerror:n,src:t})}))}var $r={addStyleHook:function(){Ht(this.elements.container,this.config.selectors.container.replace(".",""),!0),Ht(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build:function(){var t=this;if(this.listeners.media(),!this.supported.ui)return this.debug.warn("Basic support only for ".concat(this.provider," ").concat(this.type)),void $r.toggleNativeControls.call(this,!0);zt(this.elements.controls)||(Ar.inject.call(this),this.listeners.controls()),$r.toggleNativeControls.call(this),this.isHTML5&&Er.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,Ar.updateVolume.call(this),Ar.timeUpdate.call(this),Ar.durationUpdate.call(this),$r.checkPlaying.call(this),Ht(this.elements.container,this.config.classNames.pip.supported,Kt.pip&&this.isHTML5&&this.isVideo),Ht(this.elements.container,this.config.classNames.airplay.supported,Kt.airplay&&this.isHTML5),Ht(this.elements.container,this.config.classNames.isIos,It.isIos),Ht(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout((function(){ir.call(t,t.media,"ready")}),0),$r.setTitle.call(this),this.poster&&$r.setPoster.call(this,this.poster,!1).catch((function(){})),this.config.duration&&Ar.durationUpdate.call(this)},setTitle:function(){var t=zr("play",this.config);if(mt(this.config.title)&&!Pt(this.config.title)&&(t+=", ".concat(this.config.title)),Array.from(this.elements.buttons.play||[]).forEach((function(r){r.setAttribute("aria-label",t)})),this.isEmbed){var r=Wt.call(this,"iframe");if(!zt(r))return;var e=Pt(this.config.title)?"video":this.config.title,i=zr("frameTitle",this.config);r.setAttribute("title",i.replace("{title}",e))}},togglePoster:function(t){Ht(this.elements.container,this.config.classNames.posterEnabled,t)},setPoster:function(t){var r=this,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",t),this.elements.poster.removeAttribute("hidden"),nr.call(this).then((function(){return Dr(t)})).catch((function(e){throw t===r.poster&&$r.togglePoster.call(r,!1),e})).then((function(){if(t!==r.poster)throw new Error("setPoster cancelled by later call to setPoster")})).then((function(){return Object.assign(r.elements.poster.style,{backgroundImage:"url('".concat(t,"')"),backgroundSize:""}),$r.togglePoster.call(r,!0),t})))},checkPlaying:function(t){var r=this;Ht(this.elements.container,this.config.classNames.playing,this.playing),Ht(this.elements.container,this.config.classNames.paused,this.paused),Ht(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach((function(t){Object.assign(t,{pressed:r.playing}),t.setAttribute("aria-label",zr(r.playing?"pause":"play",r.config))})),jt(t)&&"timeupdate"===t.type||$r.toggleControls.call(this)},checkLoading:function(t){var r=this;this.loading=["stalled","waiting"].includes(t.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout((function(){Ht(r.elements.container,r.config.classNames.loading,r.loading),$r.toggleControls.call(r)}),this.loading?250:0)},toggleControls:function(t){var r=this.elements.controls;if(r&&this.config.hideControls){var e=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(t||this.loading||this.paused||r.pressed||r.hover||e))}},migrateStyles:function(){var t=this;Object.values(a({},this.media.style)).filter((function(t){return!Pt(t)&&mt(t)&&t.startsWith("--plyr")})).forEach((function(r){t.elements.container.style.setProperty(r,t.media.style.getPropertyValue(r)),t.media.style.removeProperty(r)})),Pt(this.media.style)&&this.media.removeAttribute("style")}},qr=function(){function t(r){var e=this;u(this,t),B(this,"firstTouch",(function(){var t=e.player,r=t.elements;t.touch=!0,Ht(r.container,t.config.classNames.isTouch,!0)})),B(this,"setTabFocus",(function(t){var r=e.player,i=r.elements;clearTimeout(e.focusTimer),("keydown"!==t.type||9===t.which)&&("keydown"===t.type&&(e.lastKeyDown=t.timeStamp),("focus"!==t.type||t.timeStamp-e.lastKeyDown<=20)&&(function(){var t=r.config.classNames.tabFocus;Ht(Yt.call(r,".".concat(t)),t,!1)}(),"focusout"!==t.type&&(e.focusTimer=setTimeout((function(){var t=document.activeElement;i.container.contains(t)&&Ht(document.activeElement,r.config.classNames.tabFocus,!0)}),10))))})),B(this,"global",(function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=e.player;r.config.keyboard.global&&Zt.call(r,window,"keydown keyup",e.handleKey,t,!1),Zt.call(r,document.body,"click",e.toggleMenu,t),er.call(r,document.body,"touchstart",e.firstTouch),Zt.call(r,document.body,"keydown focus blur focusout",e.setTabFocus,t,!1,!0)})),B(this,"container",(function(){var t=e.player,r=t.config,i=t.elements,o=t.timers;!r.keyboard.global&&r.keyboard.focused&&tr.call(t,i.container,"keydown keyup",e.handleKey,!1),tr.call(t,i.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",(function(r){var e=i.controls;e&&"enterfullscreen"===r.type&&(e.pressed=!1,e.hover=!1);var n=0;["touchstart","touchmove","mousemove"].includes(r.type)&&($r.toggleControls.call(t,!0),n=t.touch?3e3:2e3),clearTimeout(o.controls),o.controls=setTimeout((function(){return $r.toggleControls.call(t,!1)}),n)}));var a=function(){if(t.isVimeo&&!t.config.vimeo.premium){var r=i.wrapper,e=t.fullscreen.active,o=hr.call(t),a=n(o,2),s=a[0],l=a[1],p=pr("aspect-ratio: ".concat(s," / ").concat(l));if(e){var u=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],d=n(u,2),c=d[1],h=d[0]/c>s/l;p?(r.style.width=h?"auto":"100%",r.style.height=h?"100%":"auto"):(r.style.maxWidth=h?c/l*s+"px":null,r.style.margin=h?"0 auto":null)}else p?(r.style.width=null,r.style.height=null):(r.style.maxWidth=null,r.style.margin=null)}},s=function(){clearTimeout(o.resized),o.resized=setTimeout(a,50)};tr.call(t,i.container,"enterfullscreen exitfullscreen",(function(r){t.fullscreen.target===i.container&&(!t.isEmbed&&Pt(t.config.ratio)||(a(),("enterfullscreen"===r.type?tr:rr).call(t,window,"resize",s)))}))})),B(this,"media",(function(){var t=e.player,r=t.elements;if(tr.call(t,t.media,"timeupdate seeking seeked",(function(r){return Ar.timeUpdate.call(t,r)})),tr.call(t,t.media,"durationchange loadeddata loadedmetadata",(function(r){return Ar.durationUpdate.call(t,r)})),tr.call(t,t.media,"ended",(function(){t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())})),tr.call(t,t.media,"progress playing seeking seeked",(function(r){return Ar.updateProgress.call(t,r)})),tr.call(t,t.media,"volumechange",(function(r){return Ar.updateVolume.call(t,r)})),tr.call(t,t.media,"playing play pause ended emptied timeupdate",(function(r){return $r.checkPlaying.call(t,r)})),tr.call(t,t.media,"waiting canplay seeked playing",(function(r){return $r.checkLoading.call(t,r)})),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){var i=Wt.call(t,".".concat(t.config.classNames.video));if(!zt(i))return;tr.call(t,r.container,"click",(function(o){([r.container,i].includes(o.target)||i.contains(o.target))&&(t.touch&&t.config.hideControls||(t.ended?(e.proxy(o,t.restart,"restart"),e.proxy(o,(function(){ar(t.play())}),"play")):e.proxy(o,(function(){ar(t.togglePlay())}),"play")))}))}t.supported.ui&&t.config.disableContextMenu&&tr.call(t,r.wrapper,"contextmenu",(function(t){t.preventDefault()}),!1),tr.call(t,t.media,"volumechange",(function(){t.storage.set({volume:t.volume,muted:t.muted})})),tr.call(t,t.media,"ratechange",(function(){Ar.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})})),tr.call(t,t.media,"qualitychange",(function(r){Ar.updateSetting.call(t,"quality",null,r.detail.quality)})),tr.call(t,t.media,"ready qualitychange",(function(){Ar.setDownloadUrl.call(t)}));var o=t.config.events.concat(["keyup","keydown"]).join(" ");tr.call(t,t.media,o,(function(e){var i=e.detail,o=void 0===i?{}:i;"error"===e.type&&(o=t.media.error),ir.call(t,r.container,e.type,!0,o)}))})),B(this,"proxy",(function(t,r,i){var o=e.player,n=o.config.listeners[i],a=!0;wt(n)&&(a=n.call(o,t)),!1!==a&&wt(r)&&r.call(o,t)})),B(this,"bind",(function(t,r,i,o){var n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=e.player,s=a.config.listeners[o],l=wt(s);tr.call(a,t,r,(function(t){return e.proxy(t,i,o)}),n&&!l)})),B(this,"controls",(function(){var t=e.player,r=t.elements,i=It.isIE?"change":"input";if(r.buttons.play&&Array.from(r.buttons.play).forEach((function(r){e.bind(r,"click",(function(){ar(t.togglePlay())}),"play")})),e.bind(r.buttons.restart,"click",t.restart,"restart"),e.bind(r.buttons.rewind,"click",(function(){t.lastSeekTime=Date.now(),t.rewind()}),"rewind"),e.bind(r.buttons.fastForward,"click",(function(){t.lastSeekTime=Date.now(),t.forward()}),"fastForward"),e.bind(r.buttons.mute,"click",(function(){t.muted=!t.muted}),"mute"),e.bind(r.buttons.captions,"click",(function(){return t.toggleCaptions()})),e.bind(r.buttons.download,"click",(function(){ir.call(t,t.media,"download")}),"download"),e.bind(r.buttons.fullscreen,"click",(function(){t.fullscreen.toggle()}),"fullscreen"),e.bind(r.buttons.pip,"click",(function(){t.pip="toggle"}),"pip"),e.bind(r.buttons.airplay,"click",t.airplay,"airplay"),e.bind(r.buttons.settings,"click",(function(r){r.stopPropagation(),r.preventDefault(),Ar.toggleMenu.call(t,r)}),null,!1),e.bind(r.buttons.settings,"keyup",(function(r){var e=r.which;[13,32].includes(e)&&(13!==e?(r.preventDefault(),r.stopPropagation(),Ar.toggleMenu.call(t,r)):Ar.focusFirstMenuItem.call(t,null,!0))}),null,!1),e.bind(r.settings.menu,"keydown",(function(r){27===r.which&&Ar.toggleMenu.call(t,r)})),e.bind(r.inputs.seek,"mousedown mousemove",(function(t){var e=r.progress.getBoundingClientRect();t.currentTarget.setAttribute("seek-value",100/e.width*(t.pageX-e.left))})),e.bind(r.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",(function(r){var e=r.currentTarget,i=r.keyCode?r.keyCode:r.which,o="play-on-seeked";if(!Tt(r)||39===i||37===i){t.lastSeekTime=Date.now();var n=e.hasAttribute(o),a=["mouseup","touchend","keyup"].includes(r.type);n&&a?(e.removeAttribute(o),ar(t.play())):!a&&t.playing&&(e.setAttribute(o,""),t.pause())}})),It.isIos){var o=Yt.call(t,'input[type="range"]');Array.from(o).forEach((function(t){return e.bind(t,i,(function(t){return At(t.target)}))}))}e.bind(r.inputs.seek,i,(function(r){var e=r.currentTarget,i=e.getAttribute("seek-value");Pt(i)&&(i=e.value),e.removeAttribute("seek-value"),t.currentTime=i/e.max*t.duration}),"seek"),e.bind(r.progress,"mouseenter mouseleave mousemove",(function(r){return Ar.updateSeekTooltip.call(t,r)})),e.bind(r.progress,"mousemove touchmove",(function(r){var e=t.previewThumbnails;e&&e.loaded&&e.startMove(r)})),e.bind(r.progress,"mouseleave touchend click",(function(){var r=t.previewThumbnails;r&&r.loaded&&r.endMove(!1,!0)})),e.bind(r.progress,"mousedown touchstart",(function(r){var e=t.previewThumbnails;e&&e.loaded&&e.startScrubbing(r)})),e.bind(r.progress,"mouseup touchend",(function(r){var e=t.previewThumbnails;e&&e.loaded&&e.endScrubbing(r)})),It.isWebkit&&Array.from(Yt.call(t,'input[type="range"]')).forEach((function(r){e.bind(r,"input",(function(r){return Ar.updateRangeFill.call(t,r.target)}))})),t.config.toggleInvert&&!zt(r.display.duration)&&e.bind(r.display.currentTime,"click",(function(){0!==t.currentTime&&(t.config.invertTime=!t.config.invertTime,Ar.timeUpdate.call(t))})),e.bind(r.inputs.volume,i,(function(r){t.volume=r.target.value}),"volume"),e.bind(r.controls,"mouseenter mouseleave",(function(e){r.controls.hover=!t.touch&&"mouseenter"===e.type})),r.fullscreen&&Array.from(r.fullscreen.children).filter((function(t){return!t.contains(r.container)})).forEach((function(i){e.bind(i,"mouseenter mouseleave",(function(e){r.controls&&(r.controls.hover=!t.touch&&"mouseenter"===e.type)}))})),e.bind(r.controls,"mousedown mouseup touchstart touchend touchcancel",(function(t){r.controls.pressed=["mousedown","touchstart"].includes(t.type)})),e.bind(r.controls,"focusin",(function(){var i=t.config,o=t.timers;Ht(r.controls,i.classNames.noTransition,!0),$r.toggleControls.call(t,!0),setTimeout((function(){Ht(r.controls,i.classNames.noTransition,!1)}),0);var n=e.touch?3e3:4e3;clearTimeout(o.controls),o.controls=setTimeout((function(){return $r.toggleControls.call(t,!1)}),n)})),e.bind(r.inputs.volume,"wheel",(function(r){var e=r.webkitDirectionInvertedFromDevice,i=[r.deltaX,-r.deltaY].map((function(t){return e?-t:t})),o=n(i,2),a=o[0],s=o[1],l=Math.sign(Math.abs(a)>Math.abs(s)?a:s);t.increaseVolume(l/50);var p=t.media.volume;(1===l&&p<1||-1===l&&p>0)&&r.preventDefault()}),"volume",!1)})),this.player=r,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.setTabFocus=this.setTabFocus.bind(this),this.firstTouch=this.firstTouch.bind(this)}return l(t,[{key:"handleKey",value:function(t){var r=this.player,e=r.elements,i=t.keyCode?t.keyCode:t.which,o="keydown"===t.type,n=o&&i===this.lastKey;if(!(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)&&gt(i))if(o){var a=document.activeElement;if(zt(a)){if(a!==e.inputs.seek&&Qt(a,r.config.selectors.editable))return;if(32===t.which&&Qt(a,'button, [role^="menuitem"]'))return}switch([32,37,38,39,40,48,49,50,51,52,53,54,56,57,67,70,73,75,76,77,79].includes(i)&&(t.preventDefault(),t.stopPropagation()),i){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:n||(r.currentTime=r.duration/10*(i-48));break;case 32:case 75:n||ar(r.togglePlay());break;case 38:r.increaseVolume(.1);break;case 40:r.decreaseVolume(.1);break;case 77:n||(r.muted=!r.muted);break;case 39:r.forward();break;case 37:r.rewind();break;case 70:r.fullscreen.toggle();break;case 67:n||r.toggleCaptions();break;case 76:r.loop=!r.loop}27===i&&!r.fullscreen.usingNative&&r.fullscreen.active&&r.fullscreen.toggle(),this.lastKey=i}else this.lastKey=null}},{key:"toggleMenu",value:function(t){Ar.toggleMenu.call(this.player,t)}}]),t}(),Vr=function(t,r){return function(t){t.exports=function(){var t=function(){},r={},e={},i={};function o(t,r){if(t){var o=i[t];if(e[t]=r,o)for(;o.length;)o[0](t,r),o.splice(0,1)}}function n(r,e){r.call&&(r={success:r}),e.length?(r.error||t)(e):(r.success||t)(r)}function a(r,e,i,o){var n,s,l=document,p=i.async,u=(i.numRetries||0)+1,d=i.before||t,c=r.replace(/[\?|#].*$/,""),h=r.replace(/^(css|img)!/,"");o=o||0,/(^css!|\.css$)/.test(c)?((s=l.createElement("link")).rel="stylesheet",s.href=h,(n="hideFocus"in s)&&s.relList&&(n=0,s.rel="preload",s.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(c)?(s=l.createElement("img")).src=h:((s=l.createElement("script")).src=r,s.async=void 0===p||p),s.onload=s.onerror=s.onbeforeload=function(t){var l=t.type[0];if(n)try{s.sheet.cssText.length||(l="e")}catch(t){18!=t.code&&(l="e")}if("e"==l){if((o+=1)<u)return a(r,e,i,o)}else if("preload"==s.rel&&"style"==s.as)return s.rel="stylesheet";e(r,l,t.defaultPrevented)},!1!==d(r,s)&&l.head.appendChild(s)}function s(t,r,e){var i,o,n=(t=t.push?t:[t]).length,s=n,l=[];for(i=function(t,e,i){if("e"==e&&l.push(t),"b"==e){if(!i)return;l.push(t)}--n||r(l)},o=0;o<s;o++)a(t[o],i,e)}function l(t,e,i){var a,l;if(e&&e.trim&&(a=e),l=(a?i:e)||{},a){if(a in r)throw"LoadJS";r[a]=!0}function p(r,e){s(t,(function(t){n(l,t),r&&n({success:r,error:e},t),o(a,t)}),l)}if(l.returnPromise)return new Promise(p);p()}return l.ready=function(t,r){return function(t,r){var o,n,a,s=[],l=(t=t.push?t:[t]).length,p=l;for(o=function(t,e){e.length&&s.push(t),--p||r(s)};l--;)(a=e[n=t[l]])?o(n,a):(i[n]=i[n]||[]).push(o)}(t,(function(t){n(r,t)})),l},l.done=function(t){o(t,[])},l.reset=function(){r={},e={},i={}},l.isDefined=function(t){return t in r},l}()}(r={exports:{}}),r.exports}();function Hr(t){return new Promise((function(r,e){Vr(t,{success:r,error:e})}))}function Ur(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,ir.call(this,this.media,t?"play":"pause"))}var Qr={setup:function(){var t=this;Ht(t.elements.wrapper,t.config.classNames.embed,!0),t.options.speed=t.config.speed.options,yr.call(t),_t(window.Vimeo)?Qr.ready.call(t):Hr(t.config.urls.vimeo.sdk).then((function(){Qr.ready.call(t)})).catch((function(r){t.debug.warn("Vimeo SDK (player.js) failed to load",r)}))},ready:function(){var t=this,r=this,e=r.config.vimeo,i=e.premium,o=e.referrerPolicy,s=c(e,N),l=r.media.getAttribute("src"),p="";Pt(l)?(l=r.media.getAttribute(r.config.attributes.embed.id),p=r.media.getAttribute(r.config.attributes.embed.hash)):p=function(t){var r=t.match(h(/^.*(?:vimeo.com\/|video\/)(?:[0-9]+)(?:\?.*&*h=|\/)+([,0-9a-f]+)/,{hash:1}));return r?r.groups.hash:null}(l);var u=p?{h:p}:{};i&&Object.assign(s,{controls:!1,sidedock:!1});var d=Mr(a(a({loop:r.config.loop.active,autoplay:r.autoplay,muted:r.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative},u),s)),y=function(t){return Pt(t)?null:gt(Number(t))?t:t.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:t}(l),v=Rt("iframe"),f=gr(r.config.urls.vimeo.iframe,y,d);if(v.setAttribute("src",f),v.setAttribute("allowfullscreen",""),v.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),Pt(o)||v.setAttribute("referrerPolicy",o),i||!e.customControls)v.setAttribute("data-poster",r.poster),r.media=$t(v,r.media);else{var _=Rt("div",{class:r.config.classNames.embedContainer,"data-poster":r.poster});_.appendChild(v),r.media=$t(_,r.media)}e.customControls||Tr(gr(r.config.urls.vimeo.api,f)).then((function(t){!Pt(t)&&t.thumbnail_url&&$r.setPoster.call(r,t.thumbnail_url).catch((function(){}))})),r.embed=new window.Vimeo.Player(v,{autopause:r.config.autopause,muted:r.muted}),r.media.paused=!0,r.media.currentTime=0,r.supported.ui&&r.embed.disableTextTrack(),r.media.play=function(){return Ur.call(r,!0),r.embed.play()},r.media.pause=function(){return Ur.call(r,!1),r.embed.pause()},r.media.stop=function(){r.pause(),r.currentTime=0};var g=r.media.currentTime;Object.defineProperty(r.media,"currentTime",{get:function(){return g},set:function(t){var e=r.embed,i=r.media,o=r.volume,n=r.paused&&!e.hasPlayed;i.seeking=!0,ir.call(r,i,"seeking"),Promise.resolve(n&&e.setVolume(0)).then((function(){return e.setCurrentTime(t)})).then((function(){return n&&e.pause()})).then((function(){return n&&e.setVolume(o)})).catch((function(){}))}});var m=r.config.speed.selected;Object.defineProperty(r.media,"playbackRate",{get:function(){return m},set:function(t){r.embed.setPlaybackRate(t).then((function(){m=t,ir.call(r,r.media,"ratechange")})).catch((function(){r.options.speed=[1]}))}});var b=r.config.volume;Object.defineProperty(r.media,"volume",{get:function(){return b},set:function(t){r.embed.setVolume(t).then((function(){b=t,ir.call(r,r.media,"volumechange")}))}});var w=r.config.muted;Object.defineProperty(r.media,"muted",{get:function(){return w},set:function(t){var e=!!bt(t)&&t;r.embed.setVolume(e?0:r.config.volume).then((function(){w=e,ir.call(r,r.media,"volumechange")}))}});var k,x=r.config.loop;Object.defineProperty(r.media,"loop",{get:function(){return x},set:function(t){var e=bt(t)?t:r.config.loop.active;r.embed.setLoop(e).then((function(){x=e}))}}),r.embed.getVideoUrl().then((function(t){k=t,Ar.setDownloadUrl.call(r)})).catch((function(r){t.debug.warn(r)})),Object.defineProperty(r.media,"currentSrc",{get:function(){return k}}),Object.defineProperty(r.media,"ended",{get:function(){return r.currentTime===r.duration}}),Promise.all([r.embed.getVideoWidth(),r.embed.getVideoHeight()]).then((function(e){var i=n(e,2);r.embed.ratio=vr(i[0],i[1]),yr.call(t)})),r.embed.setAutopause(r.config.autopause).then((function(t){r.config.autopause=t})),r.embed.getVideoTitle().then((function(e){r.config.title=e,$r.setTitle.call(t)})),r.embed.getCurrentTime().then((function(t){g=t,ir.call(r,r.media,"timeupdate")})),r.embed.getDuration().then((function(t){r.media.duration=t,ir.call(r,r.media,"durationchange")})),r.embed.getTextTracks().then((function(t){r.media.textTracks=t,Er.setup.call(r)})),r.embed.on("cuechange",(function(t){var e=t.cues,i=(void 0===e?[]:e).map((function(t){return function(t){var r=document.createDocumentFragment(),e=document.createElement("div");return r.appendChild(e),e.innerHTML=t,r.firstChild.innerText}(t.text)}));Er.updateCues.call(r,i)})),r.embed.on("loaded",(function(){r.embed.getPaused().then((function(t){Ur.call(r,!t),t||ir.call(r,r.media,"playing")})),zt(r.embed.element)&&r.supported.ui&&r.embed.element.setAttribute("tabindex",-1)})),r.embed.on("bufferstart",(function(){ir.call(r,r.media,"waiting")})),r.embed.on("bufferend",(function(){ir.call(r,r.media,"playing")})),r.embed.on("play",(function(){Ur.call(r,!0),ir.call(r,r.media,"playing")})),r.embed.on("pause",(function(){Ur.call(r,!1)})),r.embed.on("timeupdate",(function(t){r.media.seeking=!1,g=t.seconds,ir.call(r,r.media,"timeupdate")})),r.embed.on("progress",(function(t){r.media.buffered=t.percent,ir.call(r,r.media,"progress"),1===parseInt(t.percent,10)&&ir.call(r,r.media,"canplaythrough"),r.embed.getDuration().then((function(t){t!==r.media.duration&&(r.media.duration=t,ir.call(r,r.media,"durationchange"))}))})),r.embed.on("seeked",(function(){r.media.seeking=!1,ir.call(r,r.media,"seeked")})),r.embed.on("ended",(function(){r.media.paused=!0,ir.call(r,r.media,"ended")})),r.embed.on("error",(function(t){r.media.error=t,ir.call(r,r.media,"error")})),e.customControls&&setTimeout((function(){return $r.build.call(r)}),0)}};function Yr(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,ir.call(this,this.media,t?"play":"pause"))}function Wr(t){return t.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0}var Jr,Gr,Kr,Xr,Zr,te,re={setup:function(){var t=this;if(Ht(this.elements.wrapper,this.config.classNames.embed,!0),_t(window.YT)&&wt(window.YT.Player))re.ready.call(this);else{var r=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){wt(r)&&r(),re.ready.call(t)},Hr(this.config.urls.youtube.sdk).catch((function(r){t.debug.warn("YouTube API failed to load",r)}))}},getTitle:function(t){var r=this;Tr(gr(this.config.urls.youtube.api,t)).then((function(t){if(_t(t)){var e=t.height,i=t.width;r.config.title=t.title,$r.setTitle.call(r),r.embed.ratio=vr(i,e)}yr.call(r)})).catch((function(){yr.call(r)}))},ready:function(){var t=this,r=t.config.youtube,e=t.media&&t.media.getAttribute("id");if(Pt(e)||!e.startsWith("youtube-")){var i=t.media.getAttribute("src");Pt(i)&&(i=t.media.getAttribute(this.config.attributes.embed.id));var o=function(t){return Pt(t)?null:t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:t}(i),n=Rt("div",{id:_r(t.provider),"data-poster":r.customControls?t.poster:void 0});if(t.media=$t(n,t.media),r.customControls){var a=function(t){return"https://i.ytimg.com/vi/".concat(o,"/").concat(t,"default.jpg")};Dr(a("maxres"),121).catch((function(){return Dr(a("sd"),121)})).catch((function(){return Dr(a("hq"))})).then((function(r){return $r.setPoster.call(t,r.src)})).then((function(r){r.includes("maxres")||(t.elements.poster.style.backgroundSize="cover")})).catch((function(){}))}t.embed=new window.YT.Player(t.media,{videoId:o,host:Wr(r),playerVars:Et({},{autoplay:t.config.autoplay?1:0,hl:t.config.hl,controls:t.supported.ui&&r.customControls?0:1,disablekb:1,playsinline:t.config.fullscreen.iosNative?0:1,cc_load_policy:t.captions.active?1:0,cc_lang_pref:t.config.captions.language,widget_referrer:window?window.location.href:null},r),events:{onError:function(r){if(!t.media.error){var e=r.data;t.media.error={code:e,message:{2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[e]||"An unknown error occured"},ir.call(t,t.media,"error")}},onPlaybackRateChange:function(r){t.media.playbackRate=r.target.getPlaybackRate(),ir.call(t,t.media,"ratechange")},onReady:function(e){if(!wt(t.media.play)){var i=e.target;re.getTitle.call(t,o),t.media.play=function(){Yr.call(t,!0),i.playVideo()},t.media.pause=function(){Yr.call(t,!1),i.pauseVideo()},t.media.stop=function(){i.stopVideo()},t.media.duration=i.getDuration(),t.media.paused=!0,t.media.currentTime=0,Object.defineProperty(t.media,"currentTime",{get:function(){return Number(i.getCurrentTime())},set:function(r){t.paused&&!t.embed.hasPlayed&&t.embed.mute(),t.media.seeking=!0,ir.call(t,t.media,"seeking"),i.seekTo(r)}}),Object.defineProperty(t.media,"playbackRate",{get:function(){return i.getPlaybackRate()},set:function(t){i.setPlaybackRate(t)}});var n=t.config.volume;Object.defineProperty(t.media,"volume",{get:function(){return n},set:function(r){i.setVolume(100*(n=r)),ir.call(t,t.media,"volumechange")}});var a=t.config.muted;Object.defineProperty(t.media,"muted",{get:function(){return a},set:function(r){var e=bt(r)?r:a;a=e,i[e?"mute":"unMute"](),i.setVolume(100*n),ir.call(t,t.media,"volumechange")}}),Object.defineProperty(t.media,"currentSrc",{get:function(){return i.getVideoUrl()}}),Object.defineProperty(t.media,"ended",{get:function(){return t.currentTime===t.duration}});var s=i.getAvailablePlaybackRates();t.options.speed=s.filter((function(r){return t.config.speed.options.includes(r)})),t.supported.ui&&r.customControls&&t.media.setAttribute("tabindex",-1),ir.call(t,t.media,"timeupdate"),ir.call(t,t.media,"durationchange"),clearInterval(t.timers.buffering),t.timers.buffering=setInterval((function(){t.media.buffered=i.getVideoLoadedFraction(),(null===t.media.lastBuffered||t.media.lastBuffered<t.media.buffered)&&ir.call(t,t.media,"progress"),t.media.lastBuffered=t.media.buffered,1===t.media.buffered&&(clearInterval(t.timers.buffering),ir.call(t,t.media,"canplaythrough"))}),200),r.customControls&&setTimeout((function(){return $r.build.call(t)}),50)}},onStateChange:function(e){var i=e.target;switch(clearInterval(t.timers.playing),t.media.seeking&&[1,2].includes(e.data)&&(t.media.seeking=!1,ir.call(t,t.media,"seeked")),e.data){case-1:ir.call(t,t.media,"timeupdate"),t.media.buffered=i.getVideoLoadedFraction(),ir.call(t,t.media,"progress");break;case 0:Yr.call(t,!1),t.media.loop?(i.stopVideo(),i.playVideo()):ir.call(t,t.media,"ended");break;case 1:r.customControls&&!t.config.autoplay&&t.media.paused&&!t.embed.hasPlayed?t.media.pause():(Yr.call(t,!0),ir.call(t,t.media,"playing"),t.timers.playing=setInterval((function(){ir.call(t,t.media,"timeupdate")}),50),t.media.duration!==i.getDuration()&&(t.media.duration=i.getDuration(),ir.call(t,t.media,"durationchange")));break;case 2:t.muted||t.embed.unMute(),Yr.call(t,!1);break;case 3:ir.call(t,t.media,"waiting")}ir.call(t,t.elements.container,"statechange",!1,{code:e.data})}}})}}},ee={setup:function(){this.media?(Ht(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),Ht(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&Ht(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=Rt("div",{class:this.config.classNames.video}),Ft(this.media,this.elements.wrapper),this.elements.poster=Rt("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?fr.setup.call(this):this.isYouTube?re.setup.call(this):this.isVimeo&&Qr.setup.call(this)):this.debug.warn("No media element found!")}},ie=function(){function t(r){var e=this;u(this,t),B(this,"load",(function(){e.enabled&&(_t(window.google)&&_t(window.google.ima)?e.ready():Hr(e.player.config.urls.googleIMA.sdk).then((function(){e.ready()})).catch((function(){e.trigger("error",new Error("Google IMA SDK failed to load"))})))})),B(this,"ready",(function(){var t;e.enabled||((t=e).manager&&t.manager.destroy(),t.elements.displayContainer&&t.elements.displayContainer.destroy(),t.elements.container.remove()),e.startSafetyTimer(12e3,"ready()"),e.managerPromise.then((function(){e.clearSafetyTimer("onAdsManagerLoaded()")})),e.listeners(),e.setupIMA()})),B(this,"setupIMA",(function(){e.elements.container=Rt("div",{class:e.player.config.classNames.ads}),e.player.elements.container.appendChild(e.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(e.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(e.player.config.playsinline),e.elements.displayContainer=new google.ima.AdDisplayContainer(e.elements.container,e.player.media),e.loader=new google.ima.AdsLoader(e.elements.displayContainer),e.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(function(t){return e.onAdsManagerLoaded(t)}),!1),e.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){return e.onAdError(t)}),!1),e.requestAds()})),B(this,"requestAds",(function(){var t=e.player.elements.container;try{var r=new google.ima.AdsRequest;r.adTagUrl=e.tagUrl,r.linearAdSlotWidth=t.offsetWidth,r.linearAdSlotHeight=t.offsetHeight,r.nonLinearAdSlotWidth=t.offsetWidth,r.nonLinearAdSlotHeight=t.offsetHeight,r.forceNonLinearFullSlot=!1,r.setAdWillPlayMuted(!e.player.muted),e.loader.requestAds(r)}catch(t){e.onAdError(t)}})),B(this,"pollCountdown",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!t)return clearInterval(e.countdownTimer),void e.elements.container.removeAttribute("data-badge-text");e.countdownTimer=setInterval((function(){var t=Or(Math.max(e.manager.getRemainingTime(),0)),r="".concat(zr("advertisement",e.player.config)," - ").concat(t);e.elements.container.setAttribute("data-badge-text",r)}),100)})),B(this,"onAdsManagerLoaded",(function(t){if(e.enabled){var r=new google.ima.AdsRenderingSettings;r.restoreCustomPlaybackStateOnAdBreakComplete=!0,r.enablePreloading=!0,e.manager=t.getAdsManager(e.player,r),e.cuePoints=e.manager.getCuePoints(),e.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){return e.onAdError(t)})),Object.keys(google.ima.AdEvent.Type).forEach((function(t){e.manager.addEventListener(google.ima.AdEvent.Type[t],(function(t){return e.onAdEvent(t)}))})),e.trigger("loaded")}})),B(this,"addCuePoints",(function(){Pt(e.cuePoints)||e.cuePoints.forEach((function(t){if(0!==t&&-1!==t&&t<e.player.duration){var r=e.player.elements.progress;if(zt(r)){var i=100/e.player.duration*t,o=Rt("span",{class:e.player.config.classNames.cues});o.style.left="".concat(i.toString(),"%"),r.appendChild(o)}}}))})),B(this,"onAdEvent",(function(t){var r=e.player.elements.container,i=t.getAd(),o=t.getAdData();switch(function(t){ir.call(e.player,e.player.media,"ads".concat(t.replace(/_/g,"").toLowerCase()))}(t.type),t.type){case google.ima.AdEvent.Type.LOADED:e.trigger("loaded"),e.pollCountdown(!0),i.isLinear()||(i.width=r.offsetWidth,i.height=r.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:e.manager.setVolume(e.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:e.player.ended?e.loadAds():e.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:e.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:e.pollCountdown(),e.resumeContent();break;case google.ima.AdEvent.Type.LOG:o.adError&&e.player.debug.warn("Non-fatal ad error: ".concat(o.adError.getMessage()))}})),B(this,"onAdError",(function(t){e.cancel(),e.player.debug.warn("Ads error",t)})),B(this,"listeners",(function(){var t,r=e.player.elements.container;e.player.on("canplay",(function(){e.addCuePoints()})),e.player.on("ended",(function(){e.loader.contentComplete()})),e.player.on("timeupdate",(function(){t=e.player.currentTime})),e.player.on("seeked",(function(){var r=e.player.currentTime;Pt(e.cuePoints)||e.cuePoints.forEach((function(i,o){t<i&&i<r&&(e.manager.discardAdBreak(),e.cuePoints.splice(o,1))}))})),window.addEventListener("resize",(function(){e.manager&&e.manager.resize(r.offsetWidth,r.offsetHeight,google.ima.ViewMode.NORMAL)}))})),B(this,"play",(function(){var t=e.player.elements.container;e.managerPromise||e.resumeContent(),e.managerPromise.then((function(){e.manager.setVolume(e.player.volume),e.elements.displayContainer.initialize();try{e.initialized||(e.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),e.manager.start()),e.initialized=!0}catch(t){e.onAdError(t)}})).catch((function(){}))})),B(this,"resumeContent",(function(){e.elements.container.style.zIndex="",e.playing=!1,ar(e.player.media.play())})),B(this,"pauseContent",(function(){e.elements.container.style.zIndex=3,e.playing=!0,e.player.media.pause()})),B(this,"cancel",(function(){e.initialized&&e.resumeContent(),e.trigger("error"),e.loadAds()})),B(this,"loadAds",(function(){e.managerPromise.then((function(){e.manager&&e.manager.destroy(),e.managerPromise=new Promise((function(t){e.on("loaded",t),e.player.debug.log(e.manager)})),e.initialized=!1,e.requestAds()})).catch((function(){}))})),B(this,"trigger",(function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];var n=e.events[t];kt(n)&&n.forEach((function(t){wt(t)&&t.apply(e,i)}))})),B(this,"on",(function(t,r){return kt(e.events[t])||(e.events[t]=[]),e.events[t].push(r),e})),B(this,"startSafetyTimer",(function(t,r){e.player.debug.log("Safety timer invoked from: ".concat(r)),e.safetyTimer=setTimeout((function(){e.cancel(),e.clearSafetyTimer("startSafetyTimer()")}),t)})),B(this,"clearSafetyTimer",(function(t){ft(e.safetyTimer)||(e.player.debug.log("Safety timer cleared from: ".concat(t)),clearTimeout(e.safetyTimer),e.safetyTimer=null)})),this.player=r,this.config=r.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((function(t,r){e.on("loaded",t),e.on("error",r)})),this.load()}return l(t,[{key:"enabled",get:function(){var t=this.config;return this.player.isHTML5&&this.player.isVideo&&t.enabled&&(!Pt(t.publisherId)||Ct(t.tagUrl))}},{key:"tagUrl",get:function(){var t=this.config;return Ct(t.tagUrl)?t.tagUrl:"https://go.aniview.com/api/adserver6/vast/?".concat(Mr({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:t.publisherId}))}}]),t}(),oe=function(t){var r=[];return t.split(/\r\n\r\n|\n\n|\r\r/).forEach((function(t){var e={};t.split(/\r\n|\n|\r/).forEach((function(t){if(gt(e.startTime)){if(!Pt(t.trim())&&Pt(e.text)){var r,i,o,a=t.trim().split("#xywh=");r=n(a,1),e.text=r[0],a[1]&&(i=a[1].split(","),o=n(i,4),e.x=o[0],e.y=o[1],e.w=o[2],e.h=o[3])}}else{var s=t.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);s&&(e.startTime=60*Number(s[1]||0)*60+60*Number(s[2])+Number(s[3])+Number("0.".concat(s[4])),e.endTime=60*Number(s[6]||0)*60+60*Number(s[7])+Number(s[8])+Number("0.".concat(s[9])))}})),e.text&&r.push(e)})),r},ne=function(t,r){var e={};return t>r.width/r.height?(e.width=r.width,e.height=1/t*r.width):(e.height=r.height,e.width=t*r.height),e},ae=function(){function t(r){var e=this;u(this,t),B(this,"load",(function(){e.player.elements.display.seekTooltip&&(e.player.elements.display.seekTooltip.hidden=e.enabled),e.enabled&&e.getThumbnails().then((function(){e.enabled&&(e.render(),e.determineContainerAutoSizing(),e.loaded=!0)}))})),B(this,"getThumbnails",(function(){return new Promise((function(t){var r=e.player.config.previewThumbnails.src;if(Pt(r))throw new Error("Missing previewThumbnails.src config attribute");var i=function(){e.thumbnails.sort((function(t,r){return t.height-r.height})),e.player.debug.log("Preview thumbnails",e.thumbnails),t()};if(wt(r))r((function(t){e.thumbnails=t,i()}));else{var o=(mt(r)?[r]:r).map((function(t){return e.getThumbnail(t)}));Promise.all(o).then(i)}}))})),B(this,"getThumbnail",(function(t){return new Promise((function(r){Tr(t).then((function(i){var o={frames:oe(i),height:null,urlPrefix:""};o.frames[0].text.startsWith("/")||o.frames[0].text.startsWith("http://")||o.frames[0].text.startsWith("https://")||(o.urlPrefix=t.substring(0,t.lastIndexOf("/")+1));var n=new Image;n.onload=function(){o.height=n.naturalHeight,o.width=n.naturalWidth,e.thumbnails.push(o),r()},n.src=o.urlPrefix+o.frames[0].text}))}))})),B(this,"startMove",(function(t){if(e.loaded&&jt(t)&&["touchmove","mousemove"].includes(t.type)&&e.player.media.duration){if("touchmove"===t.type)e.seekTime=e.player.media.duration*(e.player.elements.inputs.seek.value/100);else{var r=e.player.elements.progress.getBoundingClientRect();e.seekTime=e.player.media.duration*(100/r.width*(t.pageX-r.left)/100),e.seekTime<0&&(e.seekTime=0),e.seekTime>e.player.media.duration-1&&(e.seekTime=e.player.media.duration-1),e.mousePosX=t.pageX,e.elements.thumb.time.innerText=Or(e.seekTime)}e.showImageAtCurrentTime()}})),B(this,"endMove",(function(){e.toggleThumbContainer(!1,!0)})),B(this,"startScrubbing",(function(t){(ft(t.button)||!1===t.button||0===t.button)&&(e.mouseDown=!0,e.player.media.duration&&(e.toggleScrubbingContainer(!0),e.toggleThumbContainer(!1,!0),e.showImageAtCurrentTime()))})),B(this,"endScrubbing",(function(){e.mouseDown=!1,Math.ceil(e.lastTime)===Math.ceil(e.player.media.currentTime)?e.toggleScrubbingContainer(!1):er.call(e.player,e.player.media,"timeupdate",(function(){e.mouseDown||e.toggleScrubbingContainer(!1)}))})),B(this,"listeners",(function(){e.player.on("play",(function(){e.toggleThumbContainer(!1,!0)})),e.player.on("seeked",(function(){e.toggleThumbContainer(!1)})),e.player.on("timeupdate",(function(){e.lastTime=e.player.media.currentTime}))})),B(this,"render",(function(){e.elements.thumb.container=Rt("div",{class:e.player.config.classNames.previewThumbnails.thumbContainer}),e.elements.thumb.imageContainer=Rt("div",{class:e.player.config.classNames.previewThumbnails.imageContainer}),e.elements.thumb.container.appendChild(e.elements.thumb.imageContainer);var t=Rt("div",{class:e.player.config.classNames.previewThumbnails.timeContainer});e.elements.thumb.time=Rt("span",{},"00:00"),t.appendChild(e.elements.thumb.time),e.elements.thumb.container.appendChild(t),zt(e.player.elements.progress)&&e.player.elements.progress.appendChild(e.elements.thumb.container),e.elements.scrubbing.container=Rt("div",{class:e.player.config.classNames.previewThumbnails.scrubbingContainer}),e.player.elements.wrapper.appendChild(e.elements.scrubbing.container)})),B(this,"destroy",(function(){e.elements.thumb.container&&e.elements.thumb.container.remove(),e.elements.scrubbing.container&&e.elements.scrubbing.container.remove()})),B(this,"showImageAtCurrentTime",(function(){e.mouseDown?e.setScrubbingContainerSize():e.setThumbContainerSizeAndPos();var t=e.thumbnails[0].frames.findIndex((function(t){return e.seekTime>=t.startTime&&e.seekTime<=t.endTime})),r=t>=0,i=0;e.mouseDown||e.toggleThumbContainer(r),r&&(e.thumbnails.forEach((function(r,o){e.loadedImages.includes(r.frames[t].text)&&(i=o)})),t!==e.showingThumb&&(e.showingThumb=t,e.loadImage(i)))})),B(this,"loadImage",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=e.showingThumb,i=e.thumbnails[t],o=i.urlPrefix,n=i.frames[r],a=i.frames[r].text,s=o+a;if(e.currentImageElement&&e.currentImageElement.dataset.filename===a)e.showImage(e.currentImageElement,n,t,r,a,!1),e.currentImageElement.dataset.index=r,e.removeOldImages(e.currentImageElement);else{e.loadingImage&&e.usingSprites&&(e.loadingImage.onload=null);var l=new Image;l.src=s,l.dataset.index=r,l.dataset.filename=a,e.showingThumbFilename=a,e.player.debug.log("Loading image: ".concat(s)),l.onload=function(){return e.showImage(l,n,t,r,a,!0)},e.loadingImage=l,e.removeOldImages(l)}})),B(this,"showImage",(function(t,r,i,o,n){var a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];e.player.debug.log("Showing thumb: ".concat(n,". num: ").concat(o,". qual: ").concat(i,". newimg: ").concat(a)),e.setImageSizeAndOffset(t,r),a&&(e.currentImageContainer.appendChild(t),e.currentImageElement=t,e.loadedImages.includes(n)||e.loadedImages.push(n)),e.preloadNearby(o,!0).then(e.preloadNearby(o,!1)).then(e.getHigherQuality(i,t,r,n))})),B(this,"removeOldImages",(function(t){Array.from(e.currentImageContainer.children).forEach((function(r){if("img"===r.tagName.toLowerCase()){var i=e.usingSprites?500:1e3;if(r.dataset.index!==t.dataset.index&&!r.dataset.deleting){r.dataset.deleting=!0;var o=e.currentImageContainer;setTimeout((function(){o.removeChild(r),e.player.debug.log("Removing thumb: ".concat(r.dataset.filename))}),i)}}}))})),B(this,"preloadNearby",(function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new Promise((function(i){setTimeout((function(){var o=e.thumbnails[0].frames[t].text;if(e.showingThumbFilename===o){var n;n=r?e.thumbnails[0].frames.slice(t):e.thumbnails[0].frames.slice(0,t).reverse();var a=!1;n.forEach((function(t){var r=t.text;if(r!==o&&!e.loadedImages.includes(r)){a=!0,e.player.debug.log("Preloading thumb filename: ".concat(r));var n=e.thumbnails[0].urlPrefix+r,s=new Image;s.src=n,s.onload=function(){e.player.debug.log("Preloaded thumb filename: ".concat(r)),e.loadedImages.includes(r)||e.loadedImages.push(r),i()}}})),a||i()}}),300)}))})),B(this,"getHigherQuality",(function(t,r,i,o){if(t<e.thumbnails.length-1){var n=r.naturalHeight;e.usingSprites&&(n=i.h),n<e.thumbContainerHeight&&setTimeout((function(){e.showingThumbFilename===o&&(e.player.debug.log("Showing higher quality thumb for: ".concat(o)),e.loadImage(t+1))}),300)}})),B(this,"toggleThumbContainer",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=e.player.config.classNames.previewThumbnails.thumbContainerShown;e.elements.thumb.container.classList.toggle(i,t),!t&&r&&(e.showingThumb=null,e.showingThumbFilename=null)})),B(this,"toggleScrubbingContainer",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=e.player.config.classNames.previewThumbnails.scrubbingContainerShown;e.elements.scrubbing.container.classList.toggle(r,t),t||(e.showingThumb=null,e.showingThumbFilename=null)})),B(this,"determineContainerAutoSizing",(function(){(e.elements.thumb.imageContainer.clientHeight>20||e.elements.thumb.imageContainer.clientWidth>20)&&(e.sizeSpecifiedInCSS=!0)})),B(this,"setThumbContainerSizeAndPos",(function(){if(e.sizeSpecifiedInCSS){if(e.elements.thumb.imageContainer.clientHeight>20&&e.elements.thumb.imageContainer.clientWidth<20){var t=Math.floor(e.elements.thumb.imageContainer.clientHeight*e.thumbAspectRatio);e.elements.thumb.imageContainer.style.width="".concat(t,"px")}else if(e.elements.thumb.imageContainer.clientHeight<20&&e.elements.thumb.imageContainer.clientWidth>20){var r=Math.floor(e.elements.thumb.imageContainer.clientWidth/e.thumbAspectRatio);e.elements.thumb.imageContainer.style.height="".concat(r,"px")}}else{var i=Math.floor(e.thumbContainerHeight*e.thumbAspectRatio);e.elements.thumb.imageContainer.style.height="".concat(e.thumbContainerHeight,"px"),e.elements.thumb.imageContainer.style.width="".concat(i,"px")}e.setThumbContainerPos()})),B(this,"setThumbContainerPos",(function(){var t=e.player.elements.progress.getBoundingClientRect(),r=e.player.elements.container.getBoundingClientRect(),i=e.elements.thumb.container,o=r.left-t.left+10,n=r.right-t.left-i.clientWidth-10,a=e.mousePosX-t.left-i.clientWidth/2;a<o&&(a=o),a>n&&(a=n),i.style.left="".concat(a,"px")})),B(this,"setScrubbingContainerSize",(function(){var t=ne(e.thumbAspectRatio,{width:e.player.media.clientWidth,height:e.player.media.clientHeight}),r=t.height;e.elements.scrubbing.container.style.width="".concat(t.width,"px"),e.elements.scrubbing.container.style.height="".concat(r,"px")})),B(this,"setImageSizeAndOffset",(function(t,r){if(e.usingSprites){var i=e.thumbContainerHeight/r.h;t.style.height=t.naturalHeight*i+"px",t.style.width=t.naturalWidth*i+"px",t.style.left="-".concat(r.x*i,"px"),t.style.top="-".concat(r.y*i,"px")}})),this.player=r,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}return l(t,[{key:"enabled",get:function(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}},{key:"currentImageContainer",get:function(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}},{key:"usingSprites",get:function(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}},{key:"thumbAspectRatio",get:function(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}},{key:"thumbContainerHeight",get:function(){return this.mouseDown?ne(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight}).height:this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}},{key:"currentImageElement",get:function(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement},set:function(t){this.mouseDown?this.currentScrubbingImageElement=t:this.currentThumbnailImageElement=t}}]),t}(),se={insertElements:function(t,r){var e=this;mt(r)?Nt(t,this.media,{src:r}):kt(r)&&r.forEach((function(r){Nt(t,e.media,r)}))},change:function(t){var r=this;Mt(t,"sources.length")?(fr.cancelRequests.call(this),this.destroy.call(this,(function(){r.options.quality=[],Bt(r.media),r.media=null,zt(r.elements.container)&&r.elements.container.removeAttribute("class");var e=t.sources,i=t.type,o=n(e,1)[0],a=o.provider,s=void 0===a?Lr.html5:a,l="html5"===s?i:"div",p="html5"===s?{}:{src:o.src};Object.assign(r,{provider:s,type:i,supported:Kt.check(i,s,r.config.playsinline),media:Rt(l,p)}),r.elements.container.appendChild(r.media),bt(t.autoplay)&&(r.config.autoplay=t.autoplay),r.isHTML5&&(r.config.crossorigin&&r.media.setAttribute("crossorigin",""),r.config.autoplay&&r.media.setAttribute("autoplay",""),Pt(t.poster)||(r.poster=t.poster),r.config.loop.active&&r.media.setAttribute("loop",""),r.config.muted&&r.media.setAttribute("muted",""),r.config.playsinline&&r.media.setAttribute("playsinline","")),$r.addStyleHook.call(r),r.isHTML5&&se.insertElements.call(r,"source",e),r.config.title=t.title,ee.setup.call(r),r.isHTML5&&Object.keys(t).includes("tracks")&&se.insertElements.call(r,"track",t.tracks),(r.isHTML5||r.isEmbed&&!r.supported.ui)&&$r.build.call(r),r.isHTML5&&r.media.load(),Pt(t.previewThumbnails)||(Object.assign(r.config.previewThumbnails,t.previewThumbnails),r.previewThumbnails&&r.previewThumbnails.loaded&&(r.previewThumbnails.destroy(),r.previewThumbnails=null),r.config.previewThumbnails.enabled&&(r.previewThumbnails=new ae(r))),r.fullscreen.update()}),!0)):this.debug.warn("Invalid source format")}},le=function(){function t(r,e){var i=this;if(u(this,t),B(this,"play",(function(){return wt(i.media.play)?(i.ads&&i.ads.enabled&&i.ads.managerPromise.then((function(){return i.ads.play()})).catch((function(){return ar(i.media.play())})),i.media.play()):null})),B(this,"pause",(function(){return i.playing&&wt(i.media.pause)?i.media.pause():null})),B(this,"togglePlay",(function(t){return(bt(t)?t:!i.playing)?i.play():i.pause()})),B(this,"stop",(function(){i.isHTML5?(i.pause(),i.restart()):wt(i.media.stop)&&i.media.stop()})),B(this,"restart",(function(){i.currentTime=0})),B(this,"rewind",(function(t){i.currentTime-=gt(t)?t:i.config.seekTime})),B(this,"forward",(function(t){i.currentTime+=gt(t)?t:i.config.seekTime})),B(this,"increaseVolume",(function(t){i.volume=(i.media.muted?0:i.volume)+(gt(t)?t:0)})),B(this,"decreaseVolume",(function(t){i.increaseVolume(-t)})),B(this,"airplay",(function(){Kt.airplay&&i.media.webkitShowPlaybackTargetPicker()})),B(this,"toggleControls",(function(t){if(i.supported.ui&&!i.isAudio){var r=Ut(i.elements.container,i.config.classNames.hideControls),e=Ht(i.elements.container,i.config.classNames.hideControls,void 0===t?void 0:!t);return e&&kt(i.config.controls)&&i.config.controls.includes("settings")&&!Pt(i.config.settings)&&Ar.toggleMenu.call(i,!1),e!==r&&ir.call(i,i.media,e?"controlshidden":"controlsshown"),!e}return!1})),B(this,"on",(function(t,r){tr.call(i,i.elements.container,t,r)})),B(this,"once",(function(t,r){er.call(i,i.elements.container,t,r)})),B(this,"off",(function(t,r){rr(i.elements.container,t,r)})),B(this,"destroy",(function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(i.ready){var e=function(){document.body.style.overflow="",i.embed=null,r?(Object.keys(i.elements).length&&(Bt(i.elements.buttons.play),Bt(i.elements.captions),Bt(i.elements.controls),Bt(i.elements.wrapper),i.elements.buttons.play=null,i.elements.captions=null,i.elements.controls=null,i.elements.wrapper=null),wt(t)&&t()):(or.call(i),fr.cancelRequests.call(i),$t(i.elements.original,i.elements.container),ir.call(i,i.elements.original,"destroyed",!0),wt(t)&&t.call(i.elements.original),i.ready=!1,setTimeout((function(){i.elements=null,i.media=null}),200))};i.stop(),clearTimeout(i.timers.loading),clearTimeout(i.timers.controls),clearTimeout(i.timers.resized),i.isHTML5?($r.toggleNativeControls.call(i,!0),e()):i.isYouTube?(clearInterval(i.timers.buffering),clearInterval(i.timers.playing),null!==i.embed&&wt(i.embed.destroy)&&i.embed.destroy(),e()):i.isVimeo&&(null!==i.embed&&i.embed.unload().then(e),setTimeout(e,200))}})),B(this,"supports",(function(t){return Kt.mime.call(i,t)})),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=Kt.touch,this.media=r,mt(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||xt(this.media)||kt(this.media))&&(this.media=this.media[0]),this.config=Et({},Fr,t.defaults,e||{},function(){try{return JSON.parse(i.media.getAttribute("data-plyr-config"))}catch(t){return{}}}()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new Nr(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",Kt),!ft(this.media)&&zt(this.media))if(this.media.plyr)this.debug.warn("Target already setup");else if(this.config.enabled)if(Kt.check().api){var o=this.media.cloneNode(!0);o.autoplay=!1,this.elements.original=o;var n=this.media.tagName.toLowerCase(),a=null,s=null;switch(n){case"div":if(a=this.media.querySelector("iframe"),zt(a)){if(s=Ir(a.getAttribute("src")),this.provider=function(t){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(t)?Lr.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(t)?Lr.vimeo:null}(s.toString()),this.elements.container=this.media,this.media=a,this.elements.container.className="",s.search.length){var l=["1","true"];l.includes(s.searchParams.get("autoplay"))&&(this.config.autoplay=!0),l.includes(s.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=l.includes(s.searchParams.get("playsinline")),this.config.youtube.hl=s.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(Pt(this.provider)||!Object.values(Lr).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type="video";break;case"video":case"audio":this.type=n,this.provider=Lr.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=Kt.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new qr(this),this.storage=new jr(this),this.media.plyr=this,zt(this.elements.container)||(this.elements.container=Rt("div",{tabindex:0}),Ft(this.media,this.elements.container)),$r.migrateStyles.call(this),$r.addStyleHook.call(this),ee.setup.call(this),this.config.debug&&tr.call(this,this.elements.container,this.config.events.join(" "),(function(t){i.debug.log("event: ".concat(t.type))})),this.fullscreen=new Br(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&$r.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new ie(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",(function(){return ar(i.play())})),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new ae(this))):this.debug.error("Setup failed: no support")}else this.debug.error("Setup failed: no support");else this.debug.error("Setup failed: disabled by config");else this.debug.error("Setup failed: no suitable element passed")}return l(t,[{key:"isHTML5",get:function(){return this.provider===Lr.html5}},{key:"isEmbed",get:function(){return this.isYouTube||this.isVimeo}},{key:"isYouTube",get:function(){return this.provider===Lr.youtube}},{key:"isVimeo",get:function(){return this.provider===Lr.vimeo}},{key:"isVideo",get:function(){return"video"===this.type}},{key:"isAudio",get:function(){return"audio"===this.type}},{key:"playing",get:function(){return Boolean(this.ready&&!this.paused&&!this.ended)}},{key:"paused",get:function(){return Boolean(this.media.paused)}},{key:"stopped",get:function(){return Boolean(this.paused&&0===this.currentTime)}},{key:"ended",get:function(){return Boolean(this.media.ended)}},{key:"currentTime",get:function(){return Number(this.media.currentTime)},set:function(t){if(this.duration){var r=gt(t)&&t>0;this.media.currentTime=r?Math.min(t,this.duration):0,this.debug.log("Seeking to ".concat(this.currentTime," seconds"))}}},{key:"buffered",get:function(){var t=this.media.buffered;return gt(t)?t:t&&t.length&&this.duration>0?t.end(0)/this.duration:0}},{key:"seeking",get:function(){return Boolean(this.media.seeking)}},{key:"duration",get:function(){var t=parseFloat(this.config.duration),r=(this.media||{}).duration,e=gt(r)&&r!==1/0?r:0;return t||e}},{key:"volume",get:function(){return Number(this.media.volume)},set:function(t){var r=t;mt(r)&&(r=Number(r)),gt(r)||(r=this.storage.get("volume")),gt(r)||(r=this.config.volume),r>1&&(r=1),r<0&&(r=0),this.config.volume=r,this.media.volume=r,!Pt(t)&&this.muted&&r>0&&(this.muted=!1)}},{key:"muted",get:function(){return Boolean(this.media.muted)},set:function(t){var r=t;bt(r)||(r=this.storage.get("muted")),bt(r)||(r=this.config.muted),this.config.muted=r,this.media.muted=r}},{key:"hasAudio",get:function(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}},{key:"speed",get:function(){return Number(this.media.playbackRate)},set:function(t){var r=this,e=null;gt(t)&&(e=t),gt(e)||(e=this.storage.get("speed")),gt(e)||(e=this.config.speed.selected),e=function(){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:255;return Math.min(Math.max(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),t)}(e,this.minimumSpeed,this.maximumSpeed),this.config.speed.selected=e,setTimeout((function(){r.media&&(r.media.playbackRate=e)}),0)}},{key:"minimumSpeed",get:function(){return this.isYouTube?Math.min.apply(Math,d(this.options.speed)):this.isVimeo?.5:.0625}},{key:"maximumSpeed",get:function(){return this.isYouTube?Math.max.apply(Math,d(this.options.speed)):this.isVimeo?2:16}},{key:"quality",get:function(){return this.media.quality},set:function(t){var r=this.config.quality,e=this.options.quality;if(e.length){var i=[!Pt(t)&&Number(t),this.storage.get("quality"),r.selected,r.default].find(gt),o=!0;if(!e.includes(i)){var n=lr(e,i);this.debug.warn("Unsupported quality option: ".concat(i,", using ").concat(n," instead")),i=n,o=!1}r.selected=i,this.media.quality=i,o&&this.storage.set({quality:i})}}},{key:"loop",get:function(){return Boolean(this.media.loop)},set:function(t){var r=bt(t)?t:this.config.loop.active;this.config.loop.active=r,this.media.loop=r}},{key:"source",get:function(){return this.media.currentSrc},set:function(t){se.change.call(this,t)}},{key:"download",get:function(){var t=this.config.urls.download;return Ct(t)?t:this.source},set:function(t){Ct(t)&&(this.config.urls.download=t,Ar.setDownloadUrl.call(this))}},{key:"poster",get:function(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null},set:function(t){this.isVideo?$r.setPoster.call(this,t,!1).catch((function(){})):this.debug.warn("Poster can only be set for video")}},{key:"ratio",get:function(){if(!this.isVideo)return null;var t=cr(hr.call(this));return kt(t)?t.join(":"):t},set:function(t){this.isVideo?mt(t)&&dr(t)?(this.config.ratio=cr(t),yr.call(this)):this.debug.error("Invalid aspect ratio specified (".concat(t,")")):this.debug.warn("Aspect ratio can only be set for video")}},{key:"autoplay",get:function(){return Boolean(this.config.autoplay)},set:function(t){var r=bt(t)?t:this.config.autoplay;this.config.autoplay=r}},{key:"toggleCaptions",value:function(t){Er.toggle.call(this,t,!1)}},{key:"currentTrack",get:function(){var t=this.captions;return t.toggled?t.currentTrack:-1},set:function(t){Er.set.call(this,t,!1),Er.setup()}},{key:"language",get:function(){return(Er.getCurrentTrack.call(this)||{}).language},set:function(t){Er.setLanguage.call(this,t,!1)}},{key:"pip",get:function(){return Kt.pip?Pt(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:"picture-in-picture"===this.media.webkitPresentationMode:null},set:function(t){if(Kt.pip){var r=bt(t)?t:!this.pip;wt(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(r?"picture-in-picture":"inline"),wt(this.media.requestPictureInPicture)&&(!this.pip&&r?this.media.requestPictureInPicture():this.pip&&!r&&document.exitPictureInPicture())}}},{key:"setPreviewThumbnails",value:function(t){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,t),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new ae(this))}}],[{key:"supported",value:function(t,r,e){return Kt.check(t,r,e)}},{key:"loadSprite",value:function(t,r){return Sr(t,r)}},{key:"setup",value:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null;return mt(r)?i=Array.from(document.querySelectorAll(r)):xt(r)?i=Array.from(r):kt(r)&&(i=r.filter(zt)),Pt(i)?null:i.map((function(r){return new t(r,e)}))}}]),t}();function pe(t){t.on("timeupdate",(function(){return function(t){var r,e;null!=t&&null!==(r=t.config)&&void 0!==r&&null!==(e=r.mutedPreview)&&void 0!==e&&e.enabled||function(t){var r;0!==t.currentTime&&null!=t&&null!==(r=t.config)&&void 0!==r&&r.save_player_position&&localStorage.setItem("player-progress-".concat(ue(t)),t.currentTime)}(t)}(t)})),t.on("ready",(function(){return de(t)})),t.on("loadeddata",(function(){return de(t)})),t.on("ended",(function(){return function(t){localStorage.removeItem("player-progress-".concat(ue(t)))}(t)}))}function ue(t){var r,e;return null==t||null===(r=t.config)||void 0===r||null===(e=r.blockAttributes)||void 0===e?void 0:e.id}function de(t){var r,e,i;if(null!=t&&null!==(r=t.config)&&void 0!==r&&r.save_player_position&&(null==t||null===(e=t.config)||void 0===e||null===(i=e.mutedPreview)||void 0===i||!i.enabled)){var o=function(t){return parseFloat(localStorage.getItem("player-progress-".concat(ue(t))))}(t);return t.hls&&o>=0&&t.hls.startLoad(o),t.duration&&(o=Math.min(o,t.duration)),!o||o<1?0:(t.currentTime=o,null!=t&&t.isVimeo&&setTimeout((function(){t.embed.setCurrentTime(o||0)}),0),o)}}le.defaults=JSON.parse(JSON.stringify(Fr));var ce=(null===(Jr=window)||void 0===Jr||null===(Gr=Jr.prestoPlayer)||void 0===Gr||null===(Kr=Gr.i18n)||void 0===Kr?void 0:Kr.hide_chapters)||"Hide Chapters",he=(null===(Xr=window)||void 0===Xr||null===(Zr=Xr.prestoPlayer)||void 0===Zr||null===(te=Zr.i18n)||void 0===te?void 0:te.show_chapters)||"Show Chapters";const ye='<button class="plyr__controls__item plyr__control" type="button" data-plyr="chapters">\n<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-list">\n <line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line>\n <line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line>\n <line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line>\n</svg>\n<span class="label--pressed plyr__tooltip" role="tooltip">'.concat(ce,'</span>\n<span class="label--not-pressed plyr__tooltip" role="tooltip">').concat(he,"</span>\n</button>\n");var ve,fe,_e;const ge='\n<div class="presto-player-toc__wrapper">\n <div class="presto-player-toc__cover" data-player-toc-cover></div>\n <div class="presto-player-toc">\n <div class="presto-player-toc__title">'.concat((null===(ve=window)||void 0===ve||null===(fe=ve.prestoPlayer)||void 0===fe||null===(_e=fe.i18n)||void 0===_e?void 0:_e.chapters)||"Chapters",'</div>\n <div class="presto-player-toc__list" data-player-toc></div>\n </div>\n</div>');function me(t){var r,e,i,o,n,a,s,l,u,c,h,y,v,f=0,_={},g=null,m=0;if("undefined"!=typeof jQuery)if(i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!t.length)return t;var r={};return t.forEach((function(t){var e,i=t.time.split(":");i.length>1&&(e=60*parseInt(i[0]));var o=parseInt(i[1])+parseInt(e);r[o]=t})),r}((null===(r=o=t.detail.plyr)||void 0===r||null===(e=r.config)||void 0===e?void 0:e.chapters)||[]),"html5"!==o.provider||o.duration){if(i&&Object.keys(i).length){n=jQuery(o.elements.container).closest(".presto-player__wrapper").find(".plyr");var b=(v=jQuery(o.elements.controls)).find(".plyr__time");b=b.length?b:v.find(".plyr__progress__container"),(u=n.find('[data-plyr="chapters"]')).length||(u=jQuery(ye).insertAfter(b)),(s=n.find(".presto-player-toc__wrapper")).length||(s=jQuery(ge).appendTo(n)),c=s.find("[data-player-toc-cover]"),l=s.find("[data-player-toc]"),a=n.find(".plyr__progress__container");var w,k=jQuery('<div class="presto-player__chapters"></div>').appendTo(a);h=jQuery('<div class="presto-player__chapter-markers"></div>').appendTo(k),w=0,l.find(".presto-player-toc__chapter").length||(Object.keys(i).forEach((function(t){w++;var r=jQuery(function(t){var r=t.name,e=void 0===r?"Untitled":r,i=t.order,o=void 0===i?1:i,n=t.highlight;return'<div class="presto-player-toc__chapter '.concat(void 0!==n&&n?"is-highlighted":"",'" data-chapter-item>\n \n <span class="presto-player-toc__order">\n ').concat(o,'\n </span>\n <span class="presto-player-toc__name">\n ').concat(e,"\n </div>\n</div>")}({name:i[t].title,order:w})).appendTo(l);r.data("presto-player-timestamp",t),_[t]=r,r.on("click",(function(){o.currentTime=parseFloat(t),o.playing||(o.play(),o.once("playing",(function(){setTimeout((function(){o.pause()}),50)}))),j(!1)}))})),y=s.find("[data-chapter-item]")),z(),u.off("click"),u.on("click",j),x(),o.off("timeupdate"),o.on("timeupdate",x),g=window.setInterval((function(){m++,o.duration&&(z(),window.clearInterval(g)),m>50&&window.clearInterval(g)}),100),c.off("click"),c.on("click",(function(){return j(!1)})),l.off("mouseleave"),l.on("mouseleave",(function t(){if(o.playing){var r=setTimeout((function(){j(!1),l.off("mouseleave",t)}),2e3);l.on("mouseenter",(function(){clearTimeout(r)}))}}))}}else o.on("loadedmetadata",me);function x(){f=o.currentTime;var t=Object.keys(i).filter((function(t){return t<=f})).map((function(t){return parseInt(t,10)})),r=Math.max.apply(Math,d(t));y&&y.removeClass("is-highlighted"),jQuery(_[r||0]).addClass("is-highlighted")}function z(){o.duration&&(Object.keys(i).forEach((function(t){if(parseInt(t)&&!h.find("[data-timestamp=".concat(t,"]")).length){var r,e,n,a,s=i[t],l=parseInt(t)/o.duration*100,p=jQuery((r={position:l,name:"".concat(s.title)},e=r.position,n=r.name,a=void 0===n?"":n,'<div class="presto-player-progress__marker plyr__controls__item plyr__control" style="left: '.concat(void 0===e?0:e,'%" data-timeline-marker>\n <span class="label--not-pressed plyr__tooltip" role="tooltip">').concat(a,"</span>\n </div>"))).prependTo(h);p.attr("data-timestamp",t),p.data("timestamp",t),p.on("click",(function(){o.currentTime=parseInt(t),o.play()}))}})),s.find("[data-timeline-marker]"))}function j(t){void 0!==p(t)?s.toggleClass("is-showing",t):s.toggleClass("is-showing")}}var be;function we(t){"undefined"!=typeof jQuery&&(be=t,jQuery(be.elements.container).closest(".presto-player__wrapper"),be.on("ready",me),be.on("controlshidden",ke),be.on("controlsshown",xe))}function ke(t){var r,e,i;"undefined"!=typeof jQuery&&jQuery(null==t||null===(r=t.detail)||void 0===r||null===(e=r.plyr)||void 0===e||null===(i=e.elements)||void 0===i?void 0:i.container).closest(".presto-player__wrapper").addClass("presto-player--hide-controls")}function xe(t){var r,e,i;"undefined"!=typeof jQuery&&jQuery(null==t||null===(r=t.detail)||void 0===r||null===(e=r.plyr)||void 0===e||null===(i=e.elements)||void 0===i?void 0:i.container).closest(".presto-player__wrapper").removeClass("presto-player--hide-controls")}function ze(t){var r,e;return a(a(a({video_current_time:parseInt((null==t?void 0:t.currentTime)||0),video_provider:(null==t?void 0:t.provider)||"html5"},null!=t&&t.duration?{video_duration:parseInt(null==t?void 0:t.duration)}:{}),null!=t&&t.source?{video_url:null==t?void 0:t.source}:{}),null!=t&&null!==(r=t.config)&&void 0!==r&&r.title?{video_title:null==t||null===(e=t.config)||void 0===e?void 0:e.title}:{})}function je(t){var r,e;null!=t&&null!==(r=t.config)&&void 0!==r&&r.hasPlayed||(t.config.hasPlayed=!0,null===(e=window)||void 0===e||e.gtag("event","Play",ze(t)))}function Te(t){var r;null===(r=window)||void 0===r||r.gtag("event","Pause",ze(t))}function Se(t){var r,e;null!=t&&null!==(r=t.config)&&void 0!==r&&r.hasLoaded||(t.config.hasLoaded=!0,null===(e=window)||void 0===e||e.gtag("event","Player Load",ze(t)))}var Ce,Pe={25:!1,50:!1,75:!1,100:!1};function Oe(t){if(t.currentTime){var r=parseFloat(t.currentTime)/parseFloat(t.duration)*100;Object.keys(Pe).forEach((function(e){var i;!Pe[e]&&r>=parseInt(e)&&(Pe[e]=!0,null===(i=window)||void 0===i||i.gtag("event","".concat(e," Percent Played"),ze(t)))}))}}var Ae="presto-player.analytics",Ie="",Me=0;function Ee(t){var r,e;(Ce=t).config.analytics&&null!==(r=window)&&void 0!==r&&null!==(e=r.wp)&&void 0!==e&&e.hooks&&(wp.hooks.hasAction("presto.nonceRefreshed",Ae)||wp.hooks.addAction("presto.nonceRefreshed",Ae,(function(t){Ie=t})),wp.hooks.hasAction("presto.playerPlay",Ae)||wp.hooks.addAction("presto.playerPlay",Ae,Fe),wp.hooks.hasAction("presto.playerEnded",Ae)||wp.hooks.addAction("presto.playerEnded",Ae,Fe),wp.hooks.hasAction("presto.playerHidden",Ae)||wp.hooks.addAction("presto.playerHidden",Ae,Fe),wp.hooks.hasAction("presto.playerPause",Ae)||wp.hooks.addAction("presto.playerPause",Ae,Fe),wp.hooks.hasAction("presto.playerSeeked",Ae)||wp.hooks.addAction("presto.playerSeeked",Ae,Fe))}function Fe(t){isNaN(null==t?void 0:t.currentTime)||Le(function(t){var r,e;return t.currentTime>Me&&(Me=t.currentTime),t.currentTime>=t.duration&&(Me=t.duration),a(a(a({video_current_time:parseInt(Me),video_provider:(null==t?void 0:t.provider)||"html5"},null!=t&&t.duration?{video_duration:parseInt(null==t?void 0:t.duration)}:{}),null!=t&&t.source?{video_url:null==t?void 0:t.source}:{}),null!=t&&null!==(r=t.config)&&void 0!==r&&r.title?{video_title:null==t||null===(e=t.config)||void 0===e?void 0:e.title}:{})}(t))}function Le(t){var r,e,i,o,n,a,s,l;if(Ie){var p,u,d=new FormData;d.append("action","presto_player_progress"),d.append("duration",null==t?void 0:t.video_current_time),d.append("video_id",null===(r=Ce)||void 0===r||null===(e=r.config)||void 0===e?void 0:e.id),d.append("nonce",Ie),null!==(i=window)&&void 0!==i&&null!==(o=i.prestoPlayer)&&void 0!==o&&o.debug_navigator?"undefined"!=typeof jQuery&&jQuery.ajax({type:"POST",url:null===(n=window)||void 0===n||null===(a=n.prestoPlayer)||void 0===a?void 0:a.ajaxurl,dataType:"json",cache:!1,data:{action:"presto_player_progress",duration:null==t?void 0:t.video_current_time,video_id:null===(s=Ce)||void 0===s||null===(l=s.config)||void 0===l?void 0:l.id,nonce:Ie}}):navigator.sendBeacon(null===(p=window)||void 0===p||null===(u=p.prestoPlayer)||void 0===u?void 0:u.ajaxurl,d)}}function Re(t){var r,e;null!==(r=window)&&void 0!==r&&null!==(e=r.prestoPlayer)&&void 0!==e&&e.isPremium&&(function(){var t;null!==(t=window)&&void 0!==t&&t.gtag&&(wp.hooks.addAction("presto.playerPlay","presto-player",je),wp.hooks.addAction("presto.playerPause","presto-player",Te),wp.hooks.addAction("presto.playerReady","presto-player",Se),wp.hooks.addAction("presto.playerTimeUpdate","presto-player",Oe))}(),Ee(t))}const Ne=function(t){t.on("ready",(function(){var r,e,i,o;null==t||null===(r=t.config)||void 0===r||!r.logo||null!=t&&null!==(e=t.config)&&void 0!==e&&e.logo_added||"undefined"!=typeof jQuery&&(t.isAudio||(jQuery('<img src="'.concat(null==t||null===(i=t.config)||void 0===i?void 0:i.logo,'" class="presto-player__logo is-bottom-right" part="logo">')).insertBefore(null==t||null===(o=t.elements)||void 0===o?void 0:o.controls),t.config.logo_added=!0))}))};function Be(t){var r;null!=t&&null!==(r=t.config)&&void 0!==r&&r.poster&&(t.poster=t.config.poster)}const De=function(t){var r,e;null!==(r=window)&&void 0!==r&&null!==(e=r.wp)&&void 0!==e&&e.hooks&&(t.on("ready",(function(){$e("Ready",t)})),t.on("play",(function(){$e("Play",t)})),t.on("playing",(function(){$e("Playing",t)})),t.on("pause",(function(){$e("Pause",t)})),t.on("ended",(function(){$e("Ended",t)})),t.on("seeked",(function(){$e("Seeked",t)})),t.on("timeupdate",(function(){$e("TimeUpdate",t)})),t.on("enterfullscreen",(function(){$e("EnterFullScreen",t)})),t.on("exitfullscreen",(function(){$e("ExitFullScreen",t)})),document.addEventListener("visibilitychange",(function(){$e("hidden"===document.visibilityState?"Hidden":"Visible",t)})),t.on("statechange",(function(r){var e;switch(null==r||null===(e=r.detail)||void 0===e?void 0:e.code){case 0:$e("Ended",t);break;case 1:$e("Play",t);break;case 2:$e("Pause",t)}})))};function $e(t,r){window.wp.hooks.doAction("presto.player".concat(t),r)}let qe,Ve=Date.now();const He=t=>{var r,e;if(!t.automations)return;(null===(e=null===(r=null===window||void 0===window?void 0:window.wp)||void 0===r?void 0:r.hooks)||void 0===e?void 0:e.hasAction("presto.nonceRefreshed","presto-player.progress"))||window.wp.hooks.addAction("presto.nonceRefreshed","presto-player.progress",(t=>{qe=t})),null===window||void 0===window||window.wp.hooks.addAction("presto.playerTimeUpdate","presto-player",o),null===window||void 0===window||window.wp.hooks.addAction("presto.playerEnded","presto-player",(t=>o(t,100)));let i={0:!1,10:!1,20:!1,30:!1,40:!1,50:!1,60:!1,70:!1,80:!1,90:!1,100:!1};function o(t,r=null){var e;qe&&(null===(e=null==t?void 0:t.config)||void 0===e?void 0:e.ajaxProgress)&&(r||(r=parseFloat(t.currentTime)/parseFloat(t.duration)*100),t.watched=t.watched||{},Object.keys(i).forEach((e=>{var i,o,n,a,s,l,p,u,d;const c=parseInt(e);if(!t.watched[c]&&r>=c){t.watched[c]=!0;let r=new FormData;if(r.append("action","presto_player_progress_percent"),r.append("id",null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.id),r.append("percent",c.toString()),r.append("visit_time",Ve.toString()),r.append("nonce",qe),(null===(o=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===o?void 0:o.debug)&&console.log(`${c} percent watched.`),null===(n=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===n?void 0:n.debug_navigator)window.jQuery.ajax({type:"POST",url:null===(u=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===u?void 0:u.ajaxurl,dataType:"json",cache:!1,data:{action:"presto_player_progress_percent",id:null===(d=null==t?void 0:t.config)||void 0===d?void 0:d.id,visit_time:Ve,percent:c,nonce:qe}});else{let e=navigator.sendBeacon(null===(a=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===a?void 0:a.ajaxurl,r);(null===(s=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===s?void 0:s.debug)&&(e?console.log("Successfully queued progress:",{id:null===(l=null==t?void 0:t.config)||void 0===l?void 0:l.id,percent:c,visit_time:Ve,nonce:qe}):console.log("Failed to queue progress",{id:null===(p=null==t?void 0:t.config)||void 0===p?void 0:p.id,percent:c,visit_time:Ve,nonce:qe}))}}})))}};let Ue=!1,Qe=!1;function Ye(t){return t.status>=200&&t.status<300?Promise.resolve(t):Promise.reject(new Error(t.statusText))}const We=t=>{var r,e;(t.config.analytics||t.config.automations)&&(null===(e=null===(r=null===window||void 0===window?void 0:window.wp)||void 0===r?void 0:r.hooks)||void 0===e||e.addAction("presto.playerPlaying","presto-player",(()=>{null===window||void 0===window||window.wp.hooks.doAction("presto.playerGetNonce")})),null===window||void 0===window||window.wp.hooks.addAction("presto.playerGetNonce","presto-player",(()=>{var t;Ue||Qe||(Qe=!0,fetch(`${null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.ajaxurl}?action=presto_refresh_progress_nonce`).then(Ye).then((t=>t.json())).then((({data:t})=>{null===window||void 0===window||window.wp.hooks.doAction("presto.nonceRefreshed",t),Ue=!0})).catch((function(t){console.log("Request failed",t)})).finally((()=>{Qe=!1})))})))},Je=function(t){var r=window.navigator.userAgent;if(r.match(/iPad/i)||r.match(/iPhone/i)){var e=function(t,r){for(var e,i,o,n=null==t||null===(e=t.elements)||void 0===e||null===(i=e.container)||void 0===i||null===(o=i.getRootNode())||void 0===o?void 0:o.host;(null!=n?n.nodeType:void 0)===Node.ELEMENT_NODE&&"BODY"!==n.tagName&&"HTML"!==n.tagName;)r?n.classList.add("presto-player-fullscreen-open"):n.classList.remove("presto-player-fullscreen-open"),n=n.parentNode};wp.hooks.addAction("presto.playerEnterFullScreen","presto-player",(function(){var r;null!=t&&null!==(r=t.fullscreen)&&void 0!==r&&r.active&&e(t,!0)})),wp.hooks.addAction("presto.playerExitFullScreen","presto-player",(function(){var r;null!=t&&null!==(r=t.fullscreen)&&void 0!==r&&r.active||e(t,!1)}))}},Ge=function(){var t=y(regeneratorRuntime.mark((function t(r){var e,i,o,n,a,s,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("undefined"!=typeof jQuery){t.next=2;break}return t.abrupt("return");case 2:if("ResizeObserver"in window!=0){t.next=7;break}return t.next=5,import("./p-97e2763b.js");case 5:window.ResizeObserver=t.sent.ResizeObserver;case 7:if(l=new ResizeObserver((function(t){var r,e=v(t);try{for(e.s();!(r=e.n()).done;){var i=r.value,o=i.contentRect;jQuery(i.target).find(".plyr__menu__container").css({maxHeight:"".concat(Math.max(o.height-48,200),"px")})}}catch(t){e.e(t)}finally{e.f()}})),null!=r&&null!==(e=r.elements)&&void 0!==e&&null!==(i=e.container)&&void 0!==i&&null!==(o=i.getRootNode())&&void 0!==o&&o.firstChild){t.next=10;break}return t.abrupt("return");case 10:if(l.observe(null==r||null===(n=r.elements)||void 0===n||null===(a=n.container)||void 0===a||null===(s=a.getRootNode())||void 0===s?void 0:s.firstChild),r){t.next=13;break}return t.abrupt("return");case 13:r.on("playing",(function(){var t,e,i,o,n=null==r||null===(t=r.elements)||void 0===t||null===(e=t.container)||void 0===e?void 0:e.getRootNode().firstChild.getBoundingClientRect();jQuery(null==r||null===(i=r.elements)||void 0===i||null===(o=i.container)||void 0===o?void 0:o.getRootNode()).find(".plyr__menu__container").css({maxHeight:"".concat(Math.max(n.height-48,200),"px")})}));case 14:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}();function Ke(t){var r,e,i,o,n,s,l,p,u,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=a(a(a({},d),null!==(r=window)&&void 0!==r&&null!==(e=r.prestoPlayer)&&void 0!==e&&e.plugin_url?{iconUrl:"".concat(null===(i=window)||void 0===i||null===(o=i.prestoPlayer)||void 0===o?void 0:o.plugin_url,"img/")+"".concat(null!=d&&null!==(n=d.preset)&&void 0!==n&&n.skin?d.preset.skin:"default")+".svg"}:{}),{chapters:(null==d?void 0:d.chapters)||[],controls:(null==d?void 0:d.controls)||[],settings:Object.keys((null==d?void 0:d.settings)||{}).length?d.settings:{}}),h=new le(t,c);return"undefined"!=typeof learndash_video_data&&import("./p-32a992d3.js").then((function(t){(0,t.default)(h)})),"undefined"!=typeof _tutorobject&&import("./p-0e1cd603.js").then((function(t){(0,t.default)(h)})),void 0!==window.llms&&!0===(null===(p=prestoPlayer)||void 0===p||null===(u=p.lifter)||void 0===u?void 0:u.isLesson)&&import("./p-68f17ca9.js").then((function(t){(0,t.default)(h)})),De(h),Je(h),Ge(h),Ne(h),Be(h),we(h),null!==(s=window)&&void 0!==s&&null!==(l=s.prestoPlayer)&&void 0!==l&&l.isAdmin||(We(h),He(c),pe(h),Re(h)),h}function Xe(t){return"string"==typeof t&&t.includes(".m3u8")}var Ze=function(t){var r=t.config,e=t.selector;return new Promise((function(t){return t(new Ke(e,a({},r)))}))};let ti=class{constructor(r){t(this,r),this.loaded=i(this,"loaded",7),this.currentMediaPlayer=i(this,"currentMediaPlayer",7),this.isAdmin=!1,this.previouslyPlaying=!1,this.ctaActive=!1,this.emailActive=!1,this.actionBarActive=!1,this.components={cta:null,email:null,overlays:null}}async play(t=!1){this.shouldLazyLoad=!1,t&&(this.mutedPreview=!1),this.player.play()}async goToAndPlay(t){this.player.play(),this.player.currentTime=t}handleScroll(t){t.detail.id!==this.player.id&&(this.mutedPreview||this.pause())}async restart(){return this.shouldLazyLoad=!1,this.player.restart()}async pause(){return this.player.pause()}async stop(){return this.player.stop()}async fullscreenToggle(t){return this.player.fullscreen.toggle(t)}async on(t,r){return this.player.on(t,r)}async once(t,r){return this.player.once(t,r)}async off(t,r){return this.player.off(t,r)}async handleCurrentTimeChange(t){this.player&&Number.isInteger(t)&&(this.player.duration&&(this.player.currentTime=Math.min(this.player.currentTime,this.player.duration)),this.shouldLazyLoad&&(this.shouldLazyLoad=!1,await new Promise((t=>{setTimeout((async()=>{await this.initialize(),t()}),50)}))),this.player.embed&&!this.player.playing?(this.player.currentTime=t,this.player.muted=!0,this.player.play(),this.player.once("timeupdate",(()=>{this.player.pause(),this.player.currentTime=t,this.player.muted=!1}))):this.player.currentTime=t)}handleStickyChange(){(function(t){for(var r=[];t.parentNode&&"body"!=t.parentNode.nodeName.toLowerCase();)r.push(t=t.parentNode);return r})(this.el).forEach((t=>{t.classList.toggle("presto-sticky-parent",this.isSticky)}))}getConfig(){return Object.assign(Object.assign({},function({preset:t={},chapters:r,branding:e,src:i,analytics:o,automations:n,autoplay:a,blockAttributes:s={},provider:l="",provider_video_id:p="",youtube:u,type:d,isAdmin:c,i18n:h,storage:y={enabled:!c,key:`presto-player-${t.id}`}}){var v,f,_,g;const m=["settings"],b=[...["youtube","vimeo"].includes(l)?["pip"]:[]],w=["play-large","rewind","play","fast-forward","progress","current-time","mute","volume","captions","settings","pip","fullscreen"].filter((r=>((null==t?void 0:t[r])||m.includes(r))&&!b.includes(r)));(null===(v=null==s?void 0:s.mutedPreview)||void 0===v?void 0:v.enabled)&&(y={enabled:!1});let k=Object.assign(Object.assign(Object.assign(Object.assign({id:null==s?void 0:s.id,title:(null==s?void 0:s.title)||"",blockAttributes:Object.assign(Object.assign({},s),{type:d}),src:i,ajaxProgress:!0,analytics:o,preset:t,automations:n,mutedPreview:{enabled:null===(f=null==s?void 0:s.mutedPreview)||void 0===f?void 0:f.enabled},loop:{active:"loop"===(null==t?void 0:t.on_video_end)},chapters:r,controls:w,settings:["captions","quality","loop",...(null==t?void 0:t.speed)?["speed"]:[]],hideControls:null==t?void 0:t.auto_hide,captions:{active:null==t?void 0:t.captions_enabled,language:"auto",update:!1},logo:null==e?void 0:e.logo,logo_width:null==e?void 0:e.logo_width,hide_logo:null==t?void 0:t.hide_logo,lazy_load_youtube:null==t?void 0:t.lazy_load_youtube,save_player_position:!!(null==t?void 0:t.save_player_position),sticky_scroll:null==t?void 0:t.sticky_scroll,play_video_viewport:null==t?void 0:t.play_video_viewport,autoplay:!(!a||(null===(_=window.wp)||void 0===_?void 0:_.blocks))},l?{provider:l}:{}),p?{provider_video_id:p}:{}),(null==s?void 0:s.poster)?{poster:s.poster}:{}),{invertTime:!t.hasOwnProperty("invert_time")||(null==t?void 0:t.invert_time),storage:y,keyboard:{focused:!1,global:!1},resetOnEnd:!!(null==t?void 0:t.reset_on_end),vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,premium:!1,playsinline:!!(null==s?void 0:s.playsInline)},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!!(null==u?void 0:u.noCookie),playsinline:!!(null==s?void 0:s.playsInline)},tooltips:{controls:!0,seek:!0},i18n:h});return(null===(g=null===window||void 0===window?void 0:window.wp)||void 0===g?void 0:g.hooks)&&(k=window.wp.hooks.applyFilters("presto.playerSettings",k)),k}({preset:this.preset,chapters:this.chapters,branding:this.branding,analytics:!!this.analytics,automations:!!this.automations,autoplay:!this.isAdmin&&!!this.autoplay,blockAttributes:this.blockAttributes,provider:this.provider,youtube:this.youtube,provider_video_id:this.provider_video_id,i18n:this.i18n})),this.iconUrl?{iconUrl:this.iconUrl}:{})}getPlayerData(){return{selector:this.playerEl,src:this.src||"",preload:this.preload,provider:this.provider,config:this.getConfig(),isAdmin:this.isAdmin}}async createPlayer(){return await(t=this.getPlayerData(),r=t.config,e=t.selector,i=t.src,o=t.preload,i&&Xe(i)?e&&e.canPlayType("application/vnd.apple.mpegurl")&&w()?Ze({config:r,selector:e}):import("./p-b62f6371.js").then((function(t){return(0,t.default)({config:r,selector:e,src:i,preload:o})})):Ze({config:r,selector:e}));var t,r,e,i,o}handlePlayerElementChange(){var t;(({src:t,el:r,preload:e,currentTime:i})=>{if(!r.getAttribute("hls_loaded")&&["metadata","none"].includes(e)&&Xe(t)){if(i>0)return r.style.height=null,r.style.paddingBottom=null,void r.setAttribute("hls_loaded","1");r.style.height="0px",r.style.paddingBottom="56.25%"}})({src:this.src,el:this.playerEl,preload:this.preload,currentTime:null===(t=null==this?void 0:this.player)||void 0===t?void 0:t.currentTime})}handleMutedPreview(t,r){var e,i,o,n,a,s,l;this.player&&!this.isAdmin&&(!t&&r&&this.player.once("timeupdate",(()=>{var t,r;this.player.loop="loop"===(null===(t=this.preset)||void 0===t?void 0:t.on_video_end),this.player.toggleCaptions(null===(r=null==this?void 0:this.preset)||void 0===r?void 0:r.captions_enabled)})),(null===(o=null===(i=null===(e=this.originalConfig)||void 0===e?void 0:e.blockAttributes)||void 0===i?void 0:i.mutedPreview)||void 0===o?void 0:o.enabled)&&(({player:t,mutedPreview:r,captions:e,progress:i,savePosition:o,onPlay:n})=>{var a=window.navigator.userAgent;if(!a.match(/iPad/i)&&!a.match(/iPhone/i)){t.config.mutedPreview.enabled=r,t.muted=r,t.loop=r,t.config.ajaxProgress=!r&&i,t.config.save_player_position=!r&&o;try{t.toggleCaptions(!!r&&!!e)}catch(t){}return setTimeout((()=>{de(t)||t.restart(),setTimeout((()=>{t.muted=r,n()}),50)}),0),t}console.log("ios device, do not do muted autoplay")})({player:this.player,mutedPreview:this.mutedPreview,captions:!!(null===(a=null===(n=this.blockAttributes)||void 0===n?void 0:n.mutedPreview)||void 0===a?void 0:a.captions),progress:null===(s=this.originalConfig)||void 0===s?void 0:s.ajaxProgress,savePosition:null===(l=this.originalConfig)||void 0===l?void 0:l.save_player_position,onPlay:()=>this.play()}))}onPlayerReady(){var t,r,e;this.observer&&(this.observer.disconnect(),this.observer.observe(this.el)),this.duration=this.player.duration,this.mutedPreview=null===(r=null===(t=this.blockAttributes)||void 0===t?void 0:t.mutedPreview)||void 0===r?void 0:r.enabled,this.renderDynamicOverlays(),this.renderVideoCTA(),this.renderEmailOverlay(),this.player.on("timeupdate loadedmetadata",(()=>{this.duration=this.player.duration,this.renderDynamicOverlays()})),Xe(this.src)&&this.player.once("playing",(()=>{this.playerEl.style.height=null,this.playerEl.style.paddingBottom=null,this.playerEl.setAttribute("hls_loaded","1")})),this.player.on("playing",(()=>this.playClass="presto-player--playing")),this.player.on("pause",(()=>this.playClass="presto-player--paused")),this.player.on("ended",(()=>this.playClass="presto-player--ended")),this.player.on("playing",(t=>!this.mutedPreview&&this.currentMediaPlayer.emit(t.detail.plyr))),"go-to-start"===(null===(e=this.preset)||void 0===e?void 0:e.on_video_end)&&this.player.on("ended",(()=>{this.restart(),"youtube"===this.provider&&this.stop()}))}handlePlayerEvents(t){t.on("ready",(t=>{this.player=t.detail.plyr,this.onPlayerReady()}))}handleLazyLoadChange(){"youtube"!==this.provider||this.shouldLazyLoad||this.isAdmin||setTimeout((()=>{this.onReload("play")}),50)}shouldLazyLoadVideo(){var t,r,e;return"youtube"===this.provider&&!this.autoplay&&!(null===(r=null===(t=this.blockAttributes)||void 0===t?void 0:t.mutedPreview)||void 0===r?void 0:r.enabled)&&!!(null===(e=this.preset)||void 0===e?void 0:e.lazy_load_youtube)}componentWillLoad(){var t,r,e;const i=null===(t=this.el.children)||void 0===t?void 0:t[0];i&&i.classList&&i.classList.contains("presto-iframe-fallback-container")&&i.remove(),this.shouldLazyLoad=this.shouldLazyLoadVideo(),this.i18n=(null===(r=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===r?void 0:r.i18n)||(null===(e=null===window||void 0===window?void 0:window.prestoPlayerAdmin)||void 0===e?void 0:e.i18n),this.originalConfig||(this.originalConfig=this.getConfig()),this.trackIntersection()}async componentDidLoad(){setTimeout((()=>{this.initialize(),this.loaded.emit(!0)}),0)}async initialize(){const t=await this.createPlayer();return this.handlePlayerEvents(t),this.syncVideoHeight(),((t,r)=>{if(!r)return;const e=document.createElement("style");t.shadowRoot.append(e),e.appendChild(document.createTextNode(r))})(this.el,this.css),t}renderSkins(){var t,e,i;return"modern"===(null===(t=this.preset)||void 0===t?void 0:t.skin)?r("presto-modern-skin",null):"business"===(null===(e=this.preset)||void 0===e?void 0:e.skin)?r("presto-business-skin",null):"stacked"===(null===(i=this.preset)||void 0===i?void 0:i.skin)?r("presto-stacked-skin",null):void 0}async onReload(t){const r=await this.initialize();"play"==t&&r.on("ready",(()=>{this.play(),r.muted=!0,r.muted=!1,r.off("ready",this.play)}))}async syncVideoHeight(){if("ResizeObserver"in window==0){const t=await import("./p-97e2763b.js");window.ResizeObserver=t.ResizeObserver}new ResizeObserver((()=>{this.isSticky||(this.videoHeight=this.el.getBoundingClientRect().height)})).observe(this.el)}handleRestartVideo(){this.player.once("timeupdate",(()=>{setTimeout((()=>this.play()),500)})),this.player.restart()}handlePlayVideo(){this.play()}handlePauseVideo(t){this.pause(),t.detail&&function(t){var r,e,i,o,n;if("unknown"!==b()&&!(null===(e=null===(r=null==t?void 0:t.config)||void 0===r?void 0:r.blockAttributes)||void 0===e?void 0:e.playsInline)&&("function"==typeof(null===(i=null==t?void 0:t.media)||void 0===i?void 0:i.webkitExitFullScreen)&&(null==t||t.media.webkitExitFullScreen()),"function"==typeof(null===(o=null==t?void 0:t.embed)||void 0===o?void 0:o.exitFullscreen)&&(null===(n=null==t?void 0:t.embed)||void 0===n||n.exitFullscreen()),"youtube"===t.provider)){const r=t.currentTime;t.currentTime=t.duration,t.once("playing",(()=>{t.currentTime=r}))}}(this.player)}playVideoOnlyInViewport(){var t;!this.isAdmin&&(null===(t=this.preset)||void 0===t?void 0:t.play_video_viewport)&&this.player&&("visible"===document.visibilityState?this.observer.observe(this.el):(this.player.playing&&(this.previouslyPlaying=!0),this.pause(),this.observer.disconnect()))}trackIntersection(){this.observer=new IntersectionObserver((t=>{this.handleVisibilityIntersection(null==t?void 0:t[0])})),this.observer.observe(this.el)}handleVisibilityIntersection(t){t&&(this.handleStickyScroll(t),this.handleVisibilityPlayChange(t))}handleStickyScroll(t){var r,e;if(!(null===(r=this.preset)||void 0===r?void 0:r.sticky_scroll))return;if(this.isAdmin||this.mutedPreview||!(null===(e=null==this?void 0:this.player)||void 0===e?void 0:e.playing))return void(this.isSticky=!1);let i=t.boundingClientRect;if(this.isSticky=i.height<-i.top,"visible"===document.visibilityState&&this.isSticky&&this.player){const t=()=>{window.removeEventListener("scroll",t),this.player.paused&&(this.isSticky=!1)};this.player.once("pause",(()=>{window.addEventListener("scroll",t)}))}}handleVisibilityPlayChange(t){var r,e,i;if(!this.isAdmin&&(null===(r=this.preset)||void 0===r?void 0:r.play_video_viewport)&&(!this.player&&this.originalConfig.autoplay&&(this.previouslyPlaying=!0,this.autoplay=!!(null==t?void 0:t.isIntersecting)),this.player)){if(null==t?void 0:t.isIntersecting)return this.originalConfig.autoplay&&(this.autoplay=!0),this.previouslyPlaying&&this.play(),void(this.previouslyPlaying=!1);if("visible"!==document.visibilityState||!this.isSticky){if(null===(i=null===(e=this.blockAttributes)||void 0===e?void 0:e.mutedPreview)||void 0===i?void 0:i.enabled)return this.previouslyPlaying=!0,this.pause(),void this.player.once("playing",(()=>{this.previouslyPlaying=!0,this.pause()}));this.player.playing&&(this.previouslyPlaying=!0),this.pause()}}}renderMutedOverlay(){var t;if(this.player&&this.mutedPreview&&!this.isAdmin)return r("presto-muted-overlay",{mutedOverlay:null===(t=this.player.config.blockAttributes)||void 0===t?void 0:t.mutedOverlay,preset:this.preset,onPlayVideo:()=>{this.mutedPreview=!1,this.play()}})}renderVideo(){var t;switch(this.provider){case"vimeo":return r("presto-vimeo",{player:this.player,getRef:t=>this.playerEl=t,poster:this.poster,src:this.src});case"youtube":return r("presto-youtube",{onReload:t=>this.onReload(null==t?void 0:t.detail),player:this.player,getRef:t=>this.playerEl=t,lazyLoad:this.shouldLazyLoad,poster:this.poster,src:this.src});case"bunny":return r("presto-bunny",{thumbnail:null===(t=null==this?void 0:this.bunny)||void 0===t?void 0:t.thumbnail,getRef:t=>this.playerEl=t,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,playsinline:this.playsinline,src:this.src,tracks:this.tracks,videoAttributes:this.videoAttributes});case"audio":return r("presto-audio",{getRef:t=>this.playerEl=t,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,preset:this.preset,src:this.src,tracks:this.tracks,mediaTitle:this.mediaTitle,audioAttributes:this.audioAttributes});default:return r("presto-video",{getRef:t=>this.playerEl=t,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,playsinline:this.playsinline,src:this.src,tracks:this.tracks,videoAttributes:this.videoAttributes})}}renderVideoCTA(){var t,r,e,i;(null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.isPremium)&&(this.isAdmin||(null===(e=null===(r=this.preset)||void 0===r?void 0:r.cta)||void 0===e?void 0:e.enabled)&&((null===(i=this.components.cta)||void 0===i?void 0:i.offsetParent)||"audio"!==this.provider&&(this.components.cta=document.createElement("presto-cta-overlay"),this.components.cta.direction=this.direction,this.components.cta.player=this.player,this.components.cta.preset=this.preset,this.components.cta.i18n=this.i18n,this.player.elements.container.append(this.components.cta))))}renderAudioCTA(){var t,e;if("audio"===this.provider&&this.player&&(null===(e=null===(t=this.preset)||void 0===t?void 0:t.cta)||void 0===e?void 0:e.enabled))return r("presto-cta-overlay",{direction:this.direction,player:this.player,preset:this.preset,i18n:this.i18n,provider:this.provider})}renderEmailOverlay(){var t,r,e;!(null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.isPremium)||this.isAdmin||(null===(r=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===r?void 0:r.logged_in)||(null===(e=this.components.email)||void 0===e?void 0:e.offsetParent)||"audio"!==this.provider&&(this.components.email=document.createElement("presto-email-overlay"),this.components.email.direction=this.direction,this.components.email.player=this.player,this.components.email.preset=this.preset,this.components.email.i18n=this.i18n,this.components.email.videoId=this.video_id,this.player.elements.container.append(this.components.email))}renderAudioEmail(){var t,e;if("audio"===this.provider&&this.player&&(null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.isPremium)&&!this.isAdmin&&!(null===(e=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===e?void 0:e.logged_in))return r("presto-email-overlay",{direction:this.direction,player:this.player,preset:this.preset,i18n:this.i18n,provider:this.provider})}renderActionBar(){var t,e;if((null===(e=null===(t=this.preset)||void 0===t?void 0:t.action_bar)||void 0===e?void 0:e.enabled)&&this.player)return r("presto-action-bar",{config:this.preset.action_bar,player:null==this?void 0:this.player,youtube:this.youtube})}stickyPositionClass(){var t,r;return this.isSticky?(null===(t=this.preset)||void 0===t?void 0:t.sticky_scroll_position)?`presto-sticky--${null===(r=this.preset)||void 0===r?void 0:r.sticky_scroll_position.replace(/\s+/g,"-")}`:"presto-sticky--bottom-right":""}renderDynamicOverlays(){var t,r,e,i,o,n,a;this.player&&((null===(t=null==this?void 0:this.overlaysComponent)||void 0===t?void 0:t.offsetParent)||(this.overlaysComponent=document.createElement("presto-dynamic-overlays"),this.overlaysComponent.addEventListener("reloadComponent",(()=>{this.overlaysComponent.remove(),this.overlaysComponent=document.createElement("presto-dynamic-overlays")}),{once:!0})),this.overlaysComponent.style.cssText="display: block !important; opacity: 1 !important; visibility: visible !important;",this.overlaysComponent.overlays=this.overlays,this.overlaysComponent.preset=this.preset,this.overlaysComponent.player=this.player,this.overlaysComponent.enabled=!(null===(i=null===(e=null===(r=this.player)||void 0===r?void 0:r.config)||void 0===e?void 0:e.mutedPreview)||void 0===i?void 0:i.enabled),(null===(o=null==this?void 0:this.overlaysComponent)||void 0===o?void 0:o.offsetParent)||null===(a=null===(n=this.player.elements)||void 0===n?void 0:n.wrapper)||void 0===a||a.append(this.overlaysComponent))}handleCtaStateChange(t){this.ctaActive=t.detail}handleEmailStateChange(t){this.emailActive=t.detail}handleActionBarStateChange(t){this.actionBarActive=t.detail}render(){var t,e,i,n,a,s,l,p;return r(o,{style:{height:this.isSticky?`${this.videoHeight}px`:"auto"}},r("div",{part:"wrapper",dir:this.direction,class:`presto-player__wrapper fitvidsignore\n presto-video-id-${this.video_id}\n ${this.isSticky?"audio"===this.provider?"presto-sticky-audio":"presto-sticky":""}\n ${"audio"!==this.provider?this.stickyPositionClass():""}\n ${"rtl"===this.direction?"rtl":""}\n ${!0===this.ctaActive?"cta-active":""}\n ${!0===this.emailActive?"email-active":""}\n ${!0===this.actionBarActive&&(null===(e=null===(t=this.preset)||void 0===t?void 0:t.action_bar)||void 0===e?void 0:e.enabled)?"action-bar-active":""}\n ${!!(null===(i=this.preset)||void 0===i?void 0:i.skin)&&`skin-${null===(n=this.preset)||void 0===n?void 0:n.skin}`}\n ${(null===(a=this.preset)||void 0===a?void 0:a.hide_youtube)?"hide-youtube-ui":""}\n ${(null===(s=this.preset)||void 0===s?void 0:s.caption_style)?`caption-style-${null===(l=this.preset)||void 0===l?void 0:l.caption_style}`:""}\n ${this.mutedPreview?"is-muted-overlay":""}\n ${this.playClass?this.playClass:""}\n ${(null===(p=this.preset)||void 0===p?void 0:p.play)&&!this.preset.rewind?"rewind-inactive":""}\n ${this.classes||""}`},r("div",null,r("slot",{name:"player-start"}),r("slot",{name:"player-before-video"}),this.renderVideo(),r("slot",{name:"player-after-video"}),this.renderActionBar(),this.renderMutedOverlay(),this.renderAudioCTA(),this.renderAudioEmail(),this.renderSkins(),r("slot",{name:"player-end"}))))}get el(){return e(this)}static get watchers(){return{currentTime:["handleCurrentTimeChange"],isSticky:["handleStickyChange"],playerEl:["handlePlayerElementChange"],player:["handlePlayerElementChange"],mutedPreview:["handleMutedPreview"],shouldLazyLoad:["handleLazyLoadChange"],overlays:["renderDynamicOverlays"],preset:["renderDynamicOverlays"]}}};ti.style='@charset "UTF-8";@keyframes plyr-progress{to{background-position:var(--plyr-progress-loading-size, 25px) 0}}@keyframes plyr-popup{0%{opacity:0.5;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes plyr-fade-in{from{opacity:0}to{opacity:1}}.plyr{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;align-items:center;direction:ltr;display:flex;flex-direction:column;font-family:var(--plyr-font-family, inherit);font-variant-numeric:tabular-nums;font-weight:var(--plyr-font-weight-regular, 400);line-height:var(--plyr-line-height, 1.7);max-width:100%;min-width:200px;position:relative;text-shadow:none;transition:box-shadow 0.3s ease;z-index:0}.plyr video,.plyr audio,.plyr iframe{display:block;height:100%;width:100%}.plyr button{font:inherit;line-height:inherit;width:auto}.plyr:focus{outline:0}.plyr--full-ui{box-sizing:border-box}.plyr--full-ui *,.plyr--full-ui *::after,.plyr--full-ui *::before{box-sizing:inherit}.plyr--full-ui a,.plyr--full-ui button,.plyr--full-ui input,.plyr--full-ui label{touch-action:manipulation}.plyr__badge{background:var(--plyr-badge-background, #4a5464);border-radius:var(--plyr-badge-border-radius, 2px);color:var(--plyr-badge-text-color, #fff);font-size:var(--plyr-font-size-badge, 9px);line-height:1;padding:3px 4px}.plyr--full-ui ::-webkit-media-text-track-container{display:none}.plyr__captions{animation:plyr-fade-in 0.3s ease;bottom:0;display:none;font-size:var(--plyr-font-size-small, 13px);left:0;padding:var(--plyr-control-spacing, 10px);position:absolute;text-align:center;transition:transform 0.4s ease-in-out;width:100%}.plyr__captions span:empty{display:none}@media (min-width: 480px){.plyr__captions{font-size:var(--plyr-font-size-base, 15px);padding:calc(var(--plyr-control-spacing, 10px) * 2)}}@media (min-width: 768px){.plyr__captions{font-size:var(--plyr-font-size-large, 18px)}}.plyr--captions-active .plyr__captions{display:block}.plyr:not(.plyr--hide-controls) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 10px) * -4))}.plyr__caption{background:var(--plyr-captions-background, rgba(0, 0, 0, 0.8));border-radius:2px;box-decoration-break:clone;color:var(--plyr-captions-text-color, #fff);line-height:185%;padding:0.2em 0.5em;white-space:pre-wrap}.plyr__caption div{display:inline}.plyr__control{background:transparent;border:0;border-radius:var(--plyr-control-radius, 3px);color:inherit;cursor:pointer;flex-shrink:0;overflow:visible;padding:calc(var(--plyr-control-spacing, 10px) * 0.7);position:relative;transition:all 0.3s ease}.plyr__control svg{display:block;fill:currentColor;height:var(--plyr-control-icon-size, 18px);pointer-events:none;width:var(--plyr-control-icon-size, 18px)}.plyr__control:focus{outline:0}.plyr__control.plyr__tab-focus{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}a.plyr__control{text-decoration:none}a.plyr__control::after,a.plyr__control::before{display:none}.plyr__control:not(.plyr__control--pressed) .icon--pressed,.plyr__control.plyr__control--pressed .icon--not-pressed,.plyr__control:not(.plyr__control--pressed) .label--pressed,.plyr__control.plyr__control--pressed .label--not-pressed{display:none}.plyr--full-ui ::-webkit-media-controls{display:none}.plyr__controls{align-items:center;display:flex;justify-content:flex-end;text-align:center}.plyr__controls .plyr__progress__container{flex:1;min-width:0}.plyr__controls .plyr__controls__item{margin-left:calc(var(--plyr-control-spacing, 10px) / 4)}.plyr__controls .plyr__controls__item:first-child{margin-left:0;margin-right:auto}.plyr__controls .plyr__controls__item.plyr__progress__container{padding-left:calc(var(--plyr-control-spacing, 10px) / 4)}.plyr__controls .plyr__controls__item.plyr__time{padding:0 calc(var(--plyr-control-spacing, 10px) / 2)}.plyr__controls .plyr__controls__item.plyr__progress__container:first-child,.plyr__controls .plyr__controls__item.plyr__time:first-child,.plyr__controls .plyr__controls__item.plyr__time+.plyr__time{padding-left:0}.plyr__controls:empty{display:none}.plyr [data-plyr=captions],.plyr [data-plyr=pip],.plyr [data-plyr=airplay],.plyr [data-plyr=fullscreen]{display:none}.plyr--captions-enabled [data-plyr=captions],.plyr--pip-supported [data-plyr=pip],.plyr--airplay-supported [data-plyr=airplay],.plyr--fullscreen-enabled [data-plyr=fullscreen]{display:inline-block}.plyr__menu{display:flex;position:relative}.plyr__menu .plyr__control svg{transition:transform 0.3s ease}.plyr__menu .plyr__control[aria-expanded=true] svg{transform:rotate(90deg)}.plyr__menu .plyr__control[aria-expanded=true] .plyr__tooltip{display:none}.plyr__menu__container{animation:plyr-popup 0.2s ease;background:var(--plyr-menu-background, rgba(255, 255, 255, 0.9));border-radius:4px;bottom:100%;box-shadow:var(--plyr-menu-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));color:var(--plyr-menu-color, #4a5464);font-size:var(--plyr-font-size-base, 15px);margin-bottom:10px;position:absolute;right:-3px;text-align:left;white-space:nowrap;z-index:3}.plyr__menu__container>div{overflow:hidden;transition:height 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1)}.plyr__menu__container::after{border:var(--plyr-menu-arrow-size, 4px) solid transparent;border-top-color:var(--plyr-menu-background, rgba(255, 255, 255, 0.9));content:"";height:0;position:absolute;right:calc(((var(--plyr-control-icon-size, 18px) / 2) + calc(var(--plyr-control-spacing, 10px) * 0.7)) - (var(--plyr-menu-arrow-size, 4px) / 2));top:100%;width:0}.plyr__menu__container [role=menu]{padding:calc(var(--plyr-control-spacing, 10px) * 0.7)}.plyr__menu__container [role=menuitem],.plyr__menu__container [role=menuitemradio]{margin-top:2px}.plyr__menu__container [role=menuitem]:first-child,.plyr__menu__container [role=menuitemradio]:first-child{margin-top:0}.plyr__menu__container .plyr__control{align-items:center;color:var(--plyr-menu-color, #4a5464);display:flex;font-size:var(--plyr-font-size-menu, var(--plyr-font-size-small, 13px));padding-bottom:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 1.5);padding-left:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5);padding-right:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5);padding-top:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 1.5);user-select:none;width:100%}.plyr__menu__container .plyr__control>span{align-items:inherit;display:flex;width:100%}.plyr__menu__container .plyr__control::after{border:var(--plyr-menu-item-arrow-size, 4px) solid transparent;content:"";position:absolute;top:50%;transform:translateY(-50%)}.plyr__menu__container .plyr__control--forward{padding-right:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 4)}.plyr__menu__container .plyr__control--forward::after{border-left-color:var(--plyr-menu-arrow-color, #728197);right:calc((calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5) - var(--plyr-menu-item-arrow-size, 4px))}.plyr__menu__container .plyr__control--forward.plyr__tab-focus::after,.plyr__menu__container .plyr__control--forward:hover::after{border-left-color:currentColor}.plyr__menu__container .plyr__control--back{font-weight:var(--plyr-font-weight-regular, 400);margin:calc(var(--plyr-control-spacing, 10px) * 0.7);margin-bottom:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 2);padding-left:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 4);position:relative;width:calc(100% - (calc(var(--plyr-control-spacing, 10px) * 0.7) * 2))}.plyr__menu__container .plyr__control--back::after{border-right-color:var(--plyr-menu-arrow-color, #728197);left:calc((calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5) - var(--plyr-menu-item-arrow-size, 4px))}.plyr__menu__container .plyr__control--back::before{background:var(--plyr-menu-back-border-color, #dcdfe5);box-shadow:0 1px 0 var(--plyr-menu-back-border-shadow-color, #fff);content:"";height:1px;left:0;margin-top:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 2);overflow:hidden;position:absolute;right:0;top:100%}.plyr__menu__container .plyr__control--back.plyr__tab-focus::after,.plyr__menu__container .plyr__control--back:hover::after{border-right-color:currentColor}.plyr__menu__container .plyr__control[role=menuitemradio]{padding-left:calc(var(--plyr-control-spacing, 10px) * 0.7)}.plyr__menu__container .plyr__control[role=menuitemradio]::before,.plyr__menu__container .plyr__control[role=menuitemradio]::after{border-radius:100%}.plyr__menu__container .plyr__control[role=menuitemradio]::before{background:rgba(0, 0, 0, 0.1);content:"";display:block;flex-shrink:0;height:16px;margin-right:var(--plyr-control-spacing, 10px);transition:all 0.3s ease;width:16px}.plyr__menu__container .plyr__control[role=menuitemradio]::after{background:#fff;border:0;height:6px;left:12px;opacity:0;top:50%;transform:translateY(-50%) scale(0);transition:transform 0.3s ease, opacity 0.3s ease;width:6px}.plyr__menu__container .plyr__control[role=menuitemradio][aria-checked=true]::before{background:var(--plyr-control-toggle-checked-background, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)))}.plyr__menu__container .plyr__control[role=menuitemradio][aria-checked=true]::after{opacity:1;transform:translateY(-50%) scale(1)}.plyr__menu__container .plyr__control[role=menuitemradio].plyr__tab-focus::before,.plyr__menu__container .plyr__control[role=menuitemradio]:hover::before{background:rgba(35, 40, 47, 0.1)}.plyr__menu__container .plyr__menu__value{align-items:center;display:flex;margin-left:auto;margin-right:calc((calc(var(--plyr-control-spacing, 10px) * 0.7) - 2) * -1);overflow:hidden;padding-left:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 3.5);pointer-events:none}.plyr--full-ui input[type=range]{-webkit-appearance:none;background:transparent;border:0;border-radius:calc(var(--plyr-range-thumb-height, 13px) * 2);color:var(--plyr-range-fill-background, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));display:block;height:calc((var(--plyr-range-thumb-active-shadow-width, 3px) * 2) + var(--plyr-range-thumb-height, 13px));margin:0;min-width:0;padding:0;transition:box-shadow 0.3s ease;width:100%}.plyr--full-ui input[type=range]::-webkit-slider-runnable-track{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none;background-image:linear-gradient(to right, currentColor var(--value, 0%), transparent var(--value, 0%))}.plyr--full-ui input[type=range]::-webkit-slider-thumb{background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2));height:var(--plyr-range-thumb-height, 13px);position:relative;transition:all 0.2s ease;width:var(--plyr-range-thumb-height, 13px);-webkit-appearance:none;margin-top:calc((var(--plyr-range-thumb-height, 13px) - var(--plyr-range-track-height, 5px)) / 2 * -1)}.plyr--full-ui input[type=range]::-moz-range-track{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none}.plyr--full-ui input[type=range]::-moz-range-thumb{background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2));height:var(--plyr-range-thumb-height, 13px);position:relative;transition:all 0.2s ease;width:var(--plyr-range-thumb-height, 13px)}.plyr--full-ui input[type=range]::-moz-range-progress{background:currentColor;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px)}.plyr--full-ui input[type=range]::-ms-track{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none;color:transparent}.plyr--full-ui input[type=range]::-ms-fill-upper{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none}.plyr--full-ui input[type=range]::-ms-fill-lower{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none;background:currentColor}.plyr--full-ui input[type=range]::-ms-thumb{background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2));height:var(--plyr-range-thumb-height, 13px);position:relative;transition:all 0.2s ease;width:var(--plyr-range-thumb-height, 13px);margin-top:0}.plyr--full-ui input[type=range]::-ms-tooltip{display:none}.plyr--full-ui input[type=range]:focus{outline:0}.plyr--full-ui input[type=range]::-moz-focus-outer{border:0}.plyr--full-ui input[type=range].plyr__tab-focus::-webkit-slider-runnable-track{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr--full-ui input[type=range].plyr__tab-focus::-moz-range-track{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr--full-ui input[type=range].plyr__tab-focus::-ms-track{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr__poster{background-color:var(--plyr-video-background, var(--plyr-video-background, black));background-position:50% 50%;background-repeat:no-repeat;background-size:contain;height:100%;left:0;opacity:0;position:absolute;top:0;transition:opacity 0.2s ease;width:100%;z-index:1}.plyr--stopped.plyr__poster-enabled .plyr__poster{opacity:1}.plyr--youtube.plyr--paused.plyr__poster-enabled:not(.plyr--stopped) .plyr__poster{display:none}.plyr__time{font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px))}.plyr__time+.plyr__time::before{content:"⁄";margin-right:var(--plyr-control-spacing, 10px)}@media (max-width: 767px){.plyr__time+.plyr__time{display:none}}.plyr__tooltip{background:var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));border-radius:var(--plyr-tooltip-radius, 3px);bottom:100%;box-shadow:var(--plyr-tooltip-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));color:var(--plyr-tooltip-color, #4a5464);font-size:var(--plyr-font-size-small, 13px);font-weight:var(--plyr-font-weight-regular, 400);left:50%;line-height:1.3;margin-bottom:calc(calc(var(--plyr-control-spacing, 10px) / 2) * 2);opacity:0;padding:calc(var(--plyr-control-spacing, 10px) / 2) calc(calc(var(--plyr-control-spacing, 10px) / 2) * 1.5);pointer-events:none;position:absolute;transform:translate(-50%, 10px) scale(0.8);transform-origin:50% 100%;transition:transform 0.2s 0.1s ease, opacity 0.2s 0.1s ease;white-space:nowrap;z-index:2}.plyr__tooltip::before{border-left:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-right:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-top:var(--plyr-tooltip-arrow-size, 4px) solid var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));bottom:calc(var(--plyr-tooltip-arrow-size, 4px) * -1);content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;z-index:2}.plyr .plyr__control:hover .plyr__tooltip,.plyr .plyr__control.plyr__tab-focus .plyr__tooltip,.plyr__tooltip--visible{opacity:1;transform:translate(-50%, 0) scale(1)}.plyr .plyr__control:hover .plyr__tooltip{z-index:3}.plyr__controls>.plyr__control:first-child .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip{left:0;transform:translate(0, 10px) scale(0.8);transform-origin:0 100%}.plyr__controls>.plyr__control:first-child .plyr__tooltip::before,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip::before{left:calc((var(--plyr-control-icon-size, 18px) / 2) + calc(var(--plyr-control-spacing, 10px) * 0.7))}.plyr__controls>.plyr__control:last-child .plyr__tooltip{left:auto;right:0;transform:translate(0, 10px) scale(0.8);transform-origin:100% 100%}.plyr__controls>.plyr__control:last-child .plyr__tooltip::before{left:auto;right:calc((var(--plyr-control-icon-size, 18px) / 2) + calc(var(--plyr-control-spacing, 10px) * 0.7));transform:translateX(50%)}.plyr__controls>.plyr__control:first-child:hover .plyr__tooltip,.plyr__controls>.plyr__control:first-child.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:first-child .plyr__tooltip--visible,.plyr__controls>.plyr__control:first-child+.plyr__control:hover .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip--visible,.plyr__controls>.plyr__control:last-child:hover .plyr__tooltip,.plyr__controls>.plyr__control:last-child.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:last-child .plyr__tooltip--visible{transform:translate(0, 0) scale(1)}.plyr__progress{left:calc(var(--plyr-range-thumb-height, 13px) * 0.5);margin-right:var(--plyr-range-thumb-height, 13px);position:relative}.plyr__progress input[type=range],.plyr__progress__buffer{margin-left:calc(var(--plyr-range-thumb-height, 13px) * -0.5);margin-right:calc(var(--plyr-range-thumb-height, 13px) * -0.5);width:calc(100% + var(--plyr-range-thumb-height, 13px))}.plyr__progress input[type=range]{position:relative;z-index:2}.plyr__progress .plyr__tooltip{font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px));left:0}.plyr__progress__buffer{-webkit-appearance:none;background:transparent;border:0;border-radius:100px;height:var(--plyr-range-track-height, 5px);left:0;margin-top:calc((var(--plyr-range-track-height, 5px) / 2) * -1);padding:0;position:absolute;top:50%}.plyr__progress__buffer::-webkit-progress-bar{background:transparent}.plyr__progress__buffer::-webkit-progress-value{background:currentColor;border-radius:100px;min-width:var(--plyr-range-track-height, 5px);transition:width 0.2s ease}.plyr__progress__buffer::-moz-progress-bar{background:currentColor;border-radius:100px;min-width:var(--plyr-range-track-height, 5px);transition:width 0.2s ease}.plyr__progress__buffer::-ms-fill{border-radius:100px;transition:width 0.2s ease}.plyr--loading .plyr__progress__buffer{animation:plyr-progress 1s linear infinite;background-image:linear-gradient(-45deg, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 25%, transparent 25%, transparent 50%, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 50%, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 75%, transparent 75%, transparent);background-repeat:repeat-x;background-size:var(--plyr-progress-loading-size, 25px) var(--plyr-progress-loading-size, 25px);color:transparent}.plyr--video.plyr--loading .plyr__progress__buffer{background-color:var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25))}.plyr--audio.plyr--loading .plyr__progress__buffer{background-color:var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6))}.plyr__volume{align-items:center;display:flex;max-width:110px;min-width:80px;position:relative;width:20%}.plyr__volume input[type=range]{margin-left:calc(var(--plyr-control-spacing, 10px) / 2);margin-right:calc(var(--plyr-control-spacing, 10px) / 2);position:relative;z-index:2}.plyr--is-ios .plyr__volume{min-width:0;width:auto}.plyr--audio{display:block}.plyr--audio .plyr__controls{background:var(--plyr-audio-controls-background, #fff);border-radius:inherit;color:var(--plyr-audio-control-color, #4a5464);padding:var(--plyr-control-spacing, 10px)}.plyr--audio .plyr__control.plyr__tab-focus,.plyr--audio .plyr__control:hover,.plyr--audio .plyr__control[aria-expanded=true]{background:var(--plyr-audio-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:var(--plyr-audio-control-color-hover, #fff)}.plyr--full-ui.plyr--audio input[type=range]::-webkit-slider-runnable-track{background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]::-moz-range-track{background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]::-ms-track{background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]:active::-webkit-slider-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1))}.plyr--full-ui.plyr--audio input[type=range]:active::-moz-range-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1))}.plyr--full-ui.plyr--audio input[type=range]:active::-ms-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1))}.plyr--audio .plyr__progress__buffer{color:var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6))}.plyr--video{background:var(--plyr-video-background, var(--plyr-video-background, black));overflow:hidden}.plyr--video.plyr--menu-open{overflow:visible}.plyr__video-wrapper{background:var(--plyr-video-background, var(--plyr-video-background, black));height:100%;margin:auto;overflow:hidden;position:relative;width:100%}.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{aspect-ratio:16/9}@supports not (aspect-ratio: 16/9){.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{height:0;padding-bottom:56.25%;position:relative}}.plyr__video-embed iframe,.plyr__video-wrapper--fixed-ratio video{border:0;height:100%;left:0;position:absolute;top:0;width:100%}.plyr--full-ui .plyr__video-embed>.plyr__video-embed__container{padding-bottom:240%;position:relative;transform:translateY(-38.28125%)}.plyr--video .plyr__controls{background:var(--plyr-video-controls-background, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75)));border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;bottom:0;color:var(--plyr-video-control-color, #fff);left:0;padding:calc(var(--plyr-control-spacing, 10px) / 2);padding-top:calc(var(--plyr-control-spacing, 10px) * 2);position:absolute;right:0;transition:opacity 0.4s ease-in-out, transform 0.4s ease-in-out;z-index:3}@media (min-width: 480px){.plyr--video .plyr__controls{padding:var(--plyr-control-spacing, 10px);padding-top:calc(var(--plyr-control-spacing, 10px) * 3.5)}}.plyr--video.plyr--hide-controls .plyr__controls{opacity:0;pointer-events:none;transform:translateY(100%)}.plyr--video .plyr__control.plyr__tab-focus,.plyr--video .plyr__control:hover,.plyr--video .plyr__control[aria-expanded=true]{background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:var(--plyr-video-control-color-hover, #fff)}.plyr__control--overlaid{background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));border:0;border-radius:100%;color:var(--plyr-video-control-color, #fff);display:none;left:50%;opacity:0.9;padding:calc(var(--plyr-control-spacing, 10px) * 1.5);position:absolute;top:50%;transform:translate(-50%, -50%);transition:0.3s;z-index:2}.plyr__control--overlaid svg{left:2px;position:relative}.plyr__control--overlaid:hover,.plyr__control--overlaid:focus{opacity:1}.plyr--playing .plyr__control--overlaid{opacity:0;visibility:hidden}.plyr--full-ui.plyr--video .plyr__control--overlaid{display:block}.plyr--full-ui.plyr--video input[type=range]::-webkit-slider-runnable-track{background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25)))}.plyr--full-ui.plyr--video input[type=range]::-moz-range-track{background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25)))}.plyr--full-ui.plyr--video input[type=range]::-ms-track{background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25)))}.plyr--full-ui.plyr--video input[type=range]:active::-webkit-slider-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5))}.plyr--full-ui.plyr--video input[type=range]:active::-moz-range-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5))}.plyr--full-ui.plyr--video input[type=range]:active::-ms-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5))}.plyr--video .plyr__progress__buffer{color:var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25))}.plyr:fullscreen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:fullscreen video{height:100%}.plyr:fullscreen .plyr__control .icon--exit-fullscreen{display:block}.plyr:fullscreen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:fullscreen.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr:fullscreen .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr:-webkit-full-screen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:-webkit-full-screen video{height:100%}.plyr:-webkit-full-screen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-webkit-full-screen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-webkit-full-screen.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr:-webkit-full-screen .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr:-moz-full-screen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:-moz-full-screen video{height:100%}.plyr:-moz-full-screen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-moz-full-screen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-moz-full-screen.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr:-moz-full-screen .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr:-ms-fullscreen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:-ms-fullscreen video{height:100%}.plyr:-ms-fullscreen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-ms-fullscreen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-ms-fullscreen.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr:-ms-fullscreen .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr--fullscreen-fallback{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%;bottom:0;display:block;left:0;position:fixed;right:0;top:0;z-index:10000000}.plyr--fullscreen-fallback video{height:100%}.plyr--fullscreen-fallback .plyr__control .icon--exit-fullscreen{display:block}.plyr--fullscreen-fallback .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr--fullscreen-fallback.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr--fullscreen-fallback .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr__ads{border-radius:inherit;bottom:0;cursor:pointer;left:0;overflow:hidden;position:absolute;right:0;top:0;z-index:-1}.plyr__ads>div,.plyr__ads>div iframe{height:100%;position:absolute;width:100%}.plyr__ads::after{background:#23282f;border-radius:2px;bottom:var(--plyr-control-spacing, 10px);color:#fff;content:attr(data-badge-text);font-size:11px;padding:2px 6px;pointer-events:none;position:absolute;right:var(--plyr-control-spacing, 10px);z-index:3}.plyr__ads:empty::after{display:none}.plyr__cues{background:currentColor;display:block;height:var(--plyr-range-track-height, 5px);left:0;margin:-var(--plyr-range-track-height, 5px)/2 0 0;opacity:0.8;position:absolute;top:50%;width:3px;z-index:3}.plyr__preview-thumb{background-color:var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));border-radius:3px;bottom:100%;box-shadow:var(--plyr-tooltip-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));margin-bottom:calc(calc(var(--plyr-control-spacing, 10px) / 2) * 2);opacity:0;padding:var(--plyr-tooltip-radius, 3px);pointer-events:none;position:absolute;transform:translate(0, 10px) scale(0.8);transform-origin:50% 100%;transition:transform 0.2s 0.1s ease, opacity 0.2s 0.1s ease;z-index:2}.plyr__preview-thumb--is-shown{opacity:1;transform:translate(0, 0) scale(1)}.plyr__preview-thumb::before{border-left:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-right:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-top:var(--plyr-tooltip-arrow-size, 4px) solid var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));bottom:calc(var(--plyr-tooltip-arrow-size, 4px) * -1);content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;z-index:2}.plyr__preview-thumb__image-container{background:#c1c8d1;border-radius:calc(var(--plyr-tooltip-radius, 3px) - 1px);overflow:hidden;position:relative;z-index:0}.plyr__preview-thumb__image-container img{height:100%;left:0;max-height:none;max-width:none;position:absolute;top:0;width:100%}.plyr__preview-thumb__time-container{bottom:6px;left:0;position:absolute;right:0;white-space:nowrap;z-index:3}.plyr__preview-thumb__time-container span{background-color:rgba(0, 0, 0, 0.55);border-radius:calc(var(--plyr-tooltip-radius, 3px) - 1px);color:#fff;font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px));padding:3px 6px}.plyr__preview-scrubbing{bottom:0;filter:blur(1px);height:100%;left:0;margin:auto;opacity:0;overflow:hidden;pointer-events:none;position:absolute;right:0;top:0;transition:opacity 0.3s ease;width:100%;z-index:1}.plyr__preview-scrubbing--is-shown{opacity:1}.plyr__preview-scrubbing img{height:100%;left:0;max-height:none;max-width:none;object-fit:contain;position:absolute;top:0;width:100%}.plyr--no-transition{transition:none !important}.plyr__sr-only{clip:rect(1px, 1px, 1px, 1px);overflow:hidden;border:0 !important;height:1px !important;padding:0 !important;position:absolute !important;width:1px !important}.plyr [hidden]{display:none !important}video,iframe{max-width:100%}.plyr--html5 .plyr__video-wrapper,.plyr--youtube .plyr__video-wrapper{height:100%}.plyr__video-wrapper{z-index:1}.presto-player__wrapper{position:relative;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}.presto-player__wrapper.rtl{direction:rtl}.presto-player__wrapper img{max-width:100%}.presto-player__wrapper .plyr{border-radius:var(--presto-player-border-radius)}.presto-player__wrapper .plyr.plyr--video.plyr--menu-open{overflow:hidden}.presto-player__wrapper .plyr--fullscreen-fallback.plyr--vimeo .plyr__video-wrapper{top:50%;transform:translateY(-50%)}.presto-player__wrapper .plyr--fullscreen-fallback.plyr{border-radius:0 !important}.presto-player__wrapper .plyr--fullscreen-fallback.plyr iframe{border-radius:0 !important}.presto-player__wrapper .plyr__menu__container{overflow:auto}.presto-player__wrapper .plyr__menu__container:after{display:none}.presto-player__wrapper img{border:none}.presto-player__wrapper video{margin:auto}.presto-player__wrapper iframe{height:100%}.presto-player__wrapper .plyr--video .plyr__control:active,.presto-player__wrapper .plyr--video .plyr__control:focus{background:#00b3ff;background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:#fff;color:var(--plyr-video-control-color-hover, #fff)}.presto-player__wrapper .plyr__poster{background-size:cover;z-index:2}.presto-player__wrapper .presto-player__logo{margin:0;display:block;position:absolute;z-index:3;opacity:0.5;object-fit:contain;transition:bottom 0.4s ease-in-out;max-width:var(--presto-player-logo-width, 75px)}.presto-player__wrapper .presto-player__logo.is-bottom-right{left:auto;right:20px;top:auto;bottom:60px}.presto-player__wrapper .presto-player__logo.is-bottom-left{left:20px;right:auto;top:auto;bottom:60px}@media screen and (min-width: 380px){.presto-player__wrapper.presto-player--hide-controls .presto-player__logo.is-bottom-right,.presto-player__wrapper.presto-player--hide-controls .presto-player__logo.is-bottom-left,.presto-player__wrapper .plyr--hide-controls .presto-player__logo.is-bottom-right,.presto-player__wrapper .plyr--hide-controls .presto-player__logo.is-bottom-left{bottom:20px}}.presto-player__wrapper .presto-player-progress__marker{width:16px;height:16px;padding:0;border:2px solid rgba(255, 255, 255, 0.5);position:absolute;border-radius:9999px;bottom:calc(50% - 8px);z-index:9;margin-left:-8px !important}.presto-player__wrapper.presto-player--ended .plyr--youtube .plyr__poster{display:none}.presto-player__wrapper.presto-player--ended .plyr--youtube .plyr__control.plyr__control--overlaid{display:none}.presto-player__wrapper .presto-player__wrapper .plyr__control--overlaid{z-index:4}.presto-player__wrapper button.plyr__control.plyr__control--overlaid:focus{background:inherit;border:none;outline:0;position:absolute;top:50%;transform:translate(-50%, -50%)}.presto-player__wrapper .plyr__controls__item.plyr__progress__container{position:relative}.presto-player__wrapper .plyr--full-ui.plyr--video input[type=range]::-webkit-slider-runnable-track{box-shadow:none}.presto-player__wrapper .plyr--video .plyr__controls{background:var(--plyr-video-controls-background, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.75)))}.presto-player__wrapper .plyr--fullscreen-fallback.plyr--video .plyr__controls{padding-bottom:calc(var(--plyr-control-spacing, 10px) + env(safe-area-inset-bottom))}.presto-player__wrapper .presto-player-toc{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";line-height:1.4;position:absolute;top:auto;right:0;left:0;bottom:0;max-height:100%;max-width:100%;background:rgba(255, 255, 255, 0.9);background:var(--plyr-menu-background, rgba(255, 255, 255, 0.9));left:auto;padding:20px 15px;border-radius:4px;width:100%;z-index:9;box-shadow:0 1px 2px rgba(0, 0, 0, 0.15);box-shadow:var(--plyr-menu-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));color:#4a5464;color:var(--plyr-menu-color, #4a5464);font-size:15px;font-size:var(--plyr-font-size-base, 15px);white-space:nowrap;z-index:3;display:flex;flex-direction:column;transition:bottom 0.25s ease}@media screen and (min-width: 380px){.presto-player__wrapper .presto-player-toc{right:20px;bottom:60px;width:300px;max-height:calc(100% - 80px);max-width:calc(100vw - 70px)}}.presto-player__wrapper .presto-player-toc__wrapper{position:absolute;top:0;left:0;bottom:0;right:0;z-index:3;visibility:hidden;opacity:0;transition:opacity 0.3s ease-in-out, visibility 0.3s ease-in-out}.presto-player__wrapper .presto-player-toc__wrapper.is-showing{visibility:visible;opacity:1}.presto-player__wrapper .presto-player-toc__cover{position:absolute;top:0;left:0;bottom:0;right:0;z-index:3}.presto-player__wrapper .presto-player-toc__list{flex:1;overflow:auto}.presto-player__wrapper .presto-player-toc__title{font-size:12px;font-weight:bold;margin-bottom:10px;margin-left:10px;margin-right:10px;display:none}@media screen and (min-width: 380px){.presto-player__wrapper .presto-player-toc__title{display:block}}.presto-player__wrapper .presto-player-toc__name{white-space:nowrap;overflow:hidden;width:100%;text-overflow:ellipsis}.presto-player__wrapper .presto-player-toc__chapter{padding:12px;border-radius:3px;cursor:pointer;line-height:1;display:flex;align-items:center;transition:background-color 0.4s ease, color 0.4s ease;margin-bottom:2px;position:relative}.presto-player__wrapper .presto-player-toc__chapter:last-child{margin-bottom:0}.presto-player__wrapper .presto-player-toc__chapter.is-highlighted,.presto-player__wrapper .presto-player-toc__chapter:hover{background:#00b3ff;background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:#fff;color:var(--plyr-video-control-color-hover, #fff)}.presto-player__wrapper .presto-player-toc__chapter.is-highlighted{padding-right:30px}.presto-player__wrapper .presto-player-toc__chapter.is-highlighted:after{background:rgba(255, 255, 255, 0.5);content:"";display:block;flex-shrink:0;height:8px;width:8px;margin-right:10px;margin-right:var(--plyr-control-spacing, 10px);transition:all 0.3s ease;border-radius:9999px;position:absolute;right:7px}.presto-player__wrapper .presto-player-toc__order{margin-right:12px;opacity:0.5}.presto-player__wrapper.rtl{direction:rtl}.presto-player__wrapper.rtl .presto-player-toc__order{order:2;margin-left:12px;margin-right:0}.presto-player__wrapper.rtl .presto-player-toc__name{direction:rtl}.presto-player__wrapper.action-bar-active .presto-audio__poster img{border-bottom-left-radius:0px}.presto-player__wrapper .presto-player-error{position:absolute;top:0;left:0;bottom:0;right:0;background:rgba(0, 0, 0, 0.9);color:#fff;display:flex;align-items:center;justify-content:center;z-index:10;text-align:center}.presto-player__wrapper .presto-player-error__title{font-size:18px;font-weight:bold;margin-bottom:8px}.presto-player__wrapper .presto-player-error__description{opacity:0.75}.presto-player__wrapper.hide-youtube-ui .plyr__video-embed iframe{top:-50%;height:200%}.presto-player__wrapper .plyr--vimeo.plyr--playing .plyr__video-embed__container{pointer-events:none}.presto-player__wrapper .plyr__control--overlaid{border-radius:6px;padding-left:26px;padding-right:26px;position:absolute !important;top:50% !important}.presto-player__wrapper.presto-player--hide-scrim .plyr__controls{background:transparent}.presto-player__wrapper presto-audio .presto-player-toc{max-height:350px}.presto-player__wrapper presto-action-bar{position:relative;z-index:1}.presto-sticky-parent{z-index:99998}.presto-sticky-audio{position:fixed;z-index:3000;width:100vw;bottom:0px;right:0px;left:0px}@media screen and (min-width: 960px){.presto-sticky{--presto-sticky-space:15px;position:fixed;z-index:3000;max-width:var(--presto-sticky-width, 380px);width:100vw}.presto-sticky .plyr__controls,.presto-sticky .presto-player-toc__wrapper,.presto-sticky presto-action-bar,.presto-sticky .presto-player__logo{display:none}.presto-sticky--top-left{top:var(--presto-sticky-space);left:var(--presto-sticky-space)}.presto-sticky--top-center{top:var(--presto-sticky-space);left:0;right:0;margin:0 auto}.presto-sticky--top-right{top:var(--presto-sticky-space);right:var(--presto-sticky-space)}.presto-sticky--center-left{top:0;bottom:0;margin:auto 0;left:var(--presto-sticky-space);display:flex;align-items:center}.presto-sticky--center-center{top:0;bottom:0;right:0;left:0;margin:auto;display:flex;align-items:center}.presto-sticky--center-right{top:0;bottom:0;margin:auto 0;right:var(--presto-sticky-space);display:flex;align-items:center}.presto-sticky--bottom-left{bottom:var(--presto-sticky-space);left:var(--presto-sticky-space)}.presto-sticky--bottom-center{bottom:var(--presto-sticky-space);left:0;right:0;margin:0 auto}.presto-sticky--bottom-right{bottom:var(--presto-sticky-space);right:var(--presto-sticky-space)}}.presto-player__overlay{position:absolute;top:50%;left:50%;z-index:3}.presto-player__muted-overlay{position:absolute;top:0;left:0;right:0;bottom:0;display:none;align-items:center;justify-content:center}.presto-player__muted-overlay .plyr__control--overlaid{display:block;opacity:1;visibility:visible}.presto-player__wrapper.is-muted-overlay{cursor:pointer}.presto-player__wrapper.is-muted-overlay.presto-player--playing .presto-player__muted-overlay{display:flex}.presto-player__wrapper.is-muted-overlay .plyr--playing .presto-player__muted-overlay .plyr__control--overlaid{opacity:1;visibility:visible}.presto-player__wrapper.is-muted-overlay .presto-player__logo{display:none}.presto-player__wrapper.is-muted-overlay .plyr__controls{display:none}.presto-player__wrapper.is-muted-overlay .plyr .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(0) !important}.presto-player__wrapper.rtl .plyr__captions{direction:rtl}.presto-player__wrapper .plyr__captions{z-index:1}.presto-player__wrapper.caption-style-full .plyr__captions{background:var(--plyr-captions-background, rgba(0, 0, 0, 0.8));padding-top:0;padding-bottom:0}.presto-player__wrapper.caption-style-full .plyr:not(.plyr--hide-controls):not(.is-muted-overlay) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 13px) * -4))}.presto-player__wrapper.caption-style-full.skin-stacked .plyr:not(.plyr--hide-controls):not(.is-muted-overlay) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 17px) * -4))}.presto-player__play-cover{cursor:pointer;position:absolute;top:0;left:0;right:0;bottom:0;z-index:99}.presto-player__chapters{width:100%;position:absolute;top:0;height:100%}.presto-player__chapter-markers{margin:0 8px;height:100%;position:relative}.presto-player-progress__marker.plyr__controls__item.plyr__control:hover{border:0;background:#fff}.presto-iframe-fallback-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.presto-iframe-fallback-container embed,.presto-iframe-fallback-container iframe,.presto-iframe-fallback-container object{position:absolute;top:0;left:0;width:100%;height:100%}@media (min-aspect-ratio: 16/9){.hide-youtube-ui presto-youtube .plyr:fullscreen .plyr__video-wrapper{width:177.7777777778vh}}.cta-email-active,.cta-email-active .presto-audio__wrapper{min-height:140px}.cta-active,.email-active,.cta-active .presto-audio__wrapper,.email-active .presto-audio__wrapper{min-height:140px}.action-bar-active .plyr{border-radius:var(--presto-player-border-radius) var(--presto-player-border-radius) 0px 0px}';const ri=function(t,r){return d(r)};let ei=class{constructor(r){t(this,r),this.prestoBlur=i(this,"prestoBlur",7),this.prestoFocus=i(this,"prestoFocus",7),this.hasFocus=!1,this.hasLabel=!1,this.hasPrefix=!1,this.hasSuffix=!1,this.type="default",this.size="medium",this.full=!1,this.disabled=!1,this.submit=!1}componentWillLoad(){this.handleSlotChange()}click(){this.button.click()}focus(t){this.button.focus(t)}blur(){this.button.blur()}handleSlotChange(){this.hasLabel=!!this.button.children,this.hasPrefix=!!this.button.querySelector('[slot="prefix"]'),this.hasSuffix=!!this.button.querySelector('[slot="suffix"]')}handleBlur(){this.hasFocus=!1,this.prestoBlur.emit()}handleFocus(){this.hasFocus=!0,this.prestoFocus.emit()}handleClick(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}render(){const t=!!this.href,e=r(ri,null,r("span",{part:"prefix",class:"button__prefix"},r("slot",{onSlotchange:()=>this.handleSlotChange(),name:"prefix"})),r("span",{part:"label",class:"button__label"},r("slot",{onSlotchange:()=>this.handleSlotChange()})),r("span",{part:"suffix",class:"button__suffix"},r("slot",{onSlotchange:()=>this.handleSlotChange(),name:"suffix"}))),i=r("button",{part:"base",class:{button:!0,"button--default":"default"===this.type,"button--primary":"primary"===this.type,"button--success":"success"===this.type,"button--info":"info"===this.type,"button--warning":"warning"===this.type,"button--danger":"danger"===this.type,"button--text":"text"===this.type,"button--small":"small"===this.size,"button--medium":"medium"===this.size,"button--large":"large"===this.size,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--has-label":this.hasLabel,"button--has-prefix":this.hasPrefix,"button--has-suffix":this.hasSuffix},disabled:this.disabled,type:this.submit?"submit":"button",name:this.name,value:this.value,onBlur:()=>this.handleBlur,onFocus:()=>this.handleFocus,onClick:()=>this.handleClick},e),o=r("a",{part:"base",class:{button:!0,"button--default":"default"===this.type,"button--primary":"primary"===this.type,"button--success":"success"===this.type,"button--info":"info"===this.type,"button--warning":"warning"===this.type,"button--danger":"danger"===this.type,"button--text":"text"===this.type,"button--small":"small"===this.size,"button--medium":"medium"===this.size,"button--large":"large"===this.size,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--has-label":this.hasLabel,"button--has-prefix":this.hasPrefix,"button--has-suffix":this.hasSuffix},href:this.href,target:this.target,download:this.download,rel:this.target?"noreferrer noopener":void 0,role:"button","aria-disabled":this.disabled?"true":"false",tabindex:this.disabled?"-1":"0",onBlur:()=>this.handleBlur,onFocus:()=>this.handleFocus,onClick:()=>this.handleClick},e);return t?o:i}get button(){return e(this)}};ei.style=":host{display:inline-block;width:auto;cursor:pointer}:host([full]){display:block}.button{display:inline-flex;align-items:stretch;justify-content:center;width:100%;border-style:solid;border-width:var(--presto-player-button-border-width);font-family:var(--plyr-font-family, inherit);font-weight:var(--presto-player-button-font-weight, 500);text-decoration:none;user-select:none;white-space:nowrap;vertical-align:middle;padding:0;transition:var(--presto--player-transition-fast, 150ms) background-color, var(--presto-player-transition-fast, 150ms) color, var(--presto-player-transition-fast, 150ms) border, var(--presto--player-transition-fast, 150ms) box-shadow;cursor:inherit;border-radius:var(--presto-player-button-border-radius, 0.25em)}.button::-moz-focus-inner{border:0}.button:focus{outline:none}.button.button--disabled{opacity:0.5;cursor:not-allowed}.button.button--disabled *{pointer-events:none}.button ::slotted(.presto--icon){pointer-events:none}.button__prefix,.button__suffix{flex:0 0 auto;display:flex;align-items:center}.button__label{display:flex;align-items:center}.button__label ::slotted(presto-icon){vertical-align:-2px}.button.button--default{background-color:var(--presto-player-color-white, #fff);border-color:var(--presto-player-color-gray-300, #d1d5db);color:var(--presto-player-color-gray-600, #4b5563)}.button.button--default:hover:not(.button--disabled){border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-color, var(--plyr-color-main));opacity:0.75}.button.button--default:focus:not(.button--disabled){border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-color, var(--plyr-color-main));opacity:1}.button.button--default:active:not(.button--disabled){border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-color, var(--plyr-color-main));opacity:1}.button.button--primary{background-color:var(--presto-player-button-color, var(--plyr-color-main));border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-text, #fff)}.button.button--primary:hover:not(.button--disabled){opacity:0.9}.button.button--primary:focus:not(.button--disabled){opacity:1}.button.button--primary:active:not(.button--disabled){opacity:1}.button--text{background-color:transparent;border-color:transparent;color:var(--presto-player-button-color, var(--plyr-color-main))}.button--text:hover:not(.button--disabled){background-color:transparent;border-color:transparent;opacity:0.8}.button--text:focus:not(.button--disabled){background-color:transparent;border-color:transparent;opacity:0.7}.button--text:active:not(.button--disabled){background-color:transparent;border-color:transparent;opacity:0.7}.button--small{font-size:var(--presto-player-button-font-size-small, 0.875em);height:var(--presto-player-button-height-small, 1.875em);line-height:calc(var(--presto-player-button-height-small, 1.875em) - var(--presto-player-button-border-width, 1px) * 2)}.button--medium{font-size:var(--presto-player-button-font-size-medium, 1em);height:var(--presto-player-button-height-medium, 2.5em);line-height:calc(var(--presto-player-button-height-medium, 2.5em) - var(--presto-player-button-border-width, 1px) * 2)}.button--large{font-size:var(--presto-player-button-font-size-large, 1.25em);height:var(--presto-player-button-height-large, 3.125em);line-height:calc(var(--presto-player-button-height-large, 3.125em) - var(--presto-player-button-border-width, 1px) * 2)}.button--full{display:block}.button--has-label.button--small .button__label{padding:0 var(--presto-player-button-spacing-small, 0.75em)}.button--has-label.button--medium .button__label{padding:0 var(--presto-player-button-spacing-medium, 1em)}.button--has-label.button--large .button__label{padding:0 var(--presto-player-button-spacing-large, 1.25em)}.button--has-prefix.button--small{padding-left:var(--presto-player-button-spacing-x-small, 0.5em)}.button--has-prefix.button--small .button__label{padding-left:var(--presto-player-button-spacing-x-small, 0.5em)}.button--has-prefix.button--medium{padding-left:var(--presto-player-button-spacing-small, 0.75em)}.button--has-prefix.button--medium .button__label{padding-left:var(--presto-player-button-spacing-small, 0.75em)}.button--has-prefix.button--large{padding-left:var(--presto-player-button-spacing-small, 0.75em)}.button--has-prefix.button--large .button__label{padding-left:var(--presto-player-button-spacing-small, 0.75em)}.button--has-suffix.button--small,.button--caret.button--small{padding-right:var(--presto-player-button-spacing-x-small, 0.5em)}.button--has-suffix.button--small .button__label,.button--caret.button--small .button__label{padding-right:var(--presto-player-button-spacing-x-small, 0.5em)}.button--has-suffix.button--medium,.button--caret.button--medium{padding-right:var(--presto-player-button-spacing-small, 0.75em)}.button--has-suffix.button--medium .button__label,.button--caret.button--medium .button__label{padding-right:var(--presto-player-button-spacing-small, 0.75em)}.button--has-suffix.button--large,.button--caret.button--large{padding-right:var(--presto-player-button-spacing-small, 0.75em)}.button--has-suffix.button--large .button__label,.button--caret.button--large .button__label{padding-right:var(--presto-player-button-spacing-small, 0.75em)}";let ii=class{constructor(r){t(this,r)}render(){return r("span",{part:"base",class:"spinner","aria-busy":"true","aria-live":"polite"})}};ii.style=":host{position:relative;box-sizing:border-box;--track-color:#0d131e20;--indicator-color:var(--plyr-color-main);--stroke-width:2px;display:inline-flex}:host *,:host *:before,:host *:after{box-sizing:inherit}.spinner{display:inline-block;width:1em;height:1em;border-radius:50%;border:solid var(--stroke-width) var(--track-color);border-top-color:var(--indicator-color);border-right-color:var(--indicator-color);animation:1s linear infinite spin}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";let oi=class{constructor(r){t(this,r)}render(){return r(o,null,r("slot",null))}};oi.style=".skin-stacked .plyr__controls{flex-wrap:wrap}.skin-stacked .presto-player-progress__marker{transform:scale(0.75)}.skin-stacked .plyr__controls{justify-content:flex-start}.skin-stacked .plyr__controls__item.plyr__progress__container{order:-1;flex:1 0 100%}.skin-stacked .plyr__controls__item.plyr__progress__container+:not(.plyr__time),.skin-stacked .plyr__controls__item.plyr__progress__container+.plyr__time+*{margin-left:auto}.skin-stacked .plyr__controls .plyr__controls__item:first-child{margin:0}.skin-stacked .plyr__progress{height:19px;display:flex;align-items:center}.skin-stacked .plyr__progress .plyr__progress__buffer{height:3px;transition:all 0.25s ease;position:absolute;top:calc(50% + 1px)}.skin-stacked .plyr__progress input[type=range]::-moz-range-track{height:3px;transition:all 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-webkit-slider-runnable-track{height:3px;transition:all 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-ms-track{height:3px;transition:all 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-ms-fill-upper{height:3px;transition:all 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-ms-fill-lower{height:3px;transition:height 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-webkit-slider-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-moz-range-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-ms-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.skin-stacked .plyr__progress__container:hover .presto-player-progress__marker{transform:scale(1)}.skin-stacked .plyr__progress__container:hover .plyr__progress .plyr__progress__buffer{height:5px;top:50%}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]{overflow:visible}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-moz-range-track{height:5px}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-webkit-slider-runnable-track{height:5px}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-track{height:5px}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-fill-upper{height:5px}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-fill-lower{height:5px}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-webkit-slider-thumb{visibility:visible;opacity:1}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-moz-range-thumb{visibility:visible;opacity:1}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-thumb{visibility:visible;opacity:1}";let ni=class{constructor(r){t(this,r)}handleClick(t){t.preventDefault();const r=document.body.querySelector("presto-player");r&&r.goToAndPlay(this.timeToSeconds(this.time))}timeToSeconds(t){let r,e=t.split(":");return e.length>1&&(r=60*parseInt(e[0])),parseInt(e[1])+parseInt(r)}render(){return r("a",{href:"#",class:"presto-timestamp",onClick:t=>this.handleClick(t)},r("slot",null,this.time))}};ni.style=":host{display:inline}";let ai=class{constructor(r){t(this,r)}render(){return r("video",Object.assign({class:{"presto-player__player":!0,"plyr__video-embed":["youtube","vimeo"].includes(this.provider)},part:"video",ref:this.getRef,autoplay:this.autoplay,preload:this.preload,"data-poster":this.poster,playsinline:this.playsinline},this.videoAttributes),r("source",{src:this.src}),!!this.tracks&&!!this.tracks.length&&this.tracks.map((t=>r("track",{kind:"captions",label:(null==t?void 0:t.label)?t.label:"Captions",src:null==t?void 0:t.src,srclang:(null==t?void 0:t.srcLang)?null==t?void 0:t.srcLang:"en"}))))}};ai.style=":host{display:block}";let si=class{constructor(r){t(this,r)}getId(t){const r=/^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/.exec(t||"");return(null==r?void 0:r[5])||""}parseHash(t){const r=t.match(/^.*(?:vimeo.com\/|video\/)(?:\d+)(?:\?.*\&*h=|\/)+(?<hash>[\d,a-f]+)/);return r?r.groups.hash:null}render(){if(this.src)return"Android"!==b()||(t=window.navigator.standalone,e=window.navigator.userAgent.toLowerCase(),i=/safari/.test(e),/iphone|ipod|ipad/.test(e)?!t&&i||t||i:!e.includes("wv"))?r("div",{class:"plyr__video-embed",part:"embed",ref:this.getRef,"data-plyr-provider":"vimeo","data-plyr-embed-id":this.getId(this.src),"data-plyr-embed-hash":this.parseHash(this.src)}):r("div",{class:"presto-iframe-fallback-container"},r("iframe",{src:`https://player.vimeo.com/video/${this.getId(this.src)}?h=${this.parseHash(this.src)}&amp;loop=false&amp;byline=false&amp;portrait=false&amp;title=false&amp;speed=true&amp;transparent=0&amp;gesture=media`,allowFullScreen:!0,allowTransparency:!0,allow:"autoplay",style:{width:"100%"},class:"presto-fallback-iframe"}));var t,e,i}};si.style=":host{display:block}";let li=class{constructor(r){t(this,r),this.reload=i(this,"reload",7)}handlePlayerChange(){this.player&&this.fixes()}fixes(){this.player.once("statechange",(t=>{var r,e,i,o,n;1===t.detail.code&&((null===(n=null===(o=null===(i=null===(e=null===(r=null==t?void 0:t.detail)||void 0===r?void 0:r.plyr)||void 0===e?void 0:e.config)||void 0===i?void 0:i.blockAttributes)||void 0===o?void 0:o.mutedPreview)||void 0===n?void 0:n.enabled)||(this.player.muted=!1))}))}getId(t){var r;const e=(t||"").match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return e&&11===(null===(r=null==e?void 0:e[2])||void 0===r?void 0:r.length)?e[2]:null}loadPlayer(){this.lazyLoad=!1,this.reloadPlayer=!0}componentDidRender(){this.reloadPlayer&&(this.reloadPlayer=!1,this.reload.emit("play"))}setWebView(){var t;let r=null===(t=window.navigator)||void 0===t?void 0:t.standalone,e=window.navigator.userAgent.toLowerCase(),i=/safari/.test(e),o=/iphone|ipod|ipad/.test(e);this.isWebView=o?!r&&!i:e.includes("wv")}componentWillLoad(){this.setWebView(),this.poster||(this.poster=`//img.youtube.com/vi/${this.getId(this.src)}/maxresdefault.jpg`),this.lazyLoad&&w()&&(this.lazyLoad=!1)}render(){return this.isWebView?r("div",{class:"fallback-container"},r("iframe",{src:this.src,allowFullScreen:!0,allowtransparency:!0,allow:"autoplay"})):this.lazyLoad?r("div",null,r("presto-video",{part:"video",getRef:this.getRef,poster:this.poster,src:"",provider:"youtube"}),r("div",{class:"presto-player__play-cover",onClick:()=>this.loadPlayer()})):r("div",{class:"plyr__video-embed",part:"embed",ref:this.getRef,"data-plyr-provider":"youtube","data-plyr-embed-id":this.getId(this.src)})}static get watchers(){return{player:["handlePlayerChange"]}}};li.style=":host{display:block}.fallback-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.fallback-container iframe,.fallback-container object,.fallback-container embed{position:absolute;top:0;left:0;width:100%;height:100%}@supports not (aspect-ratio: 16/9){.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{height:0 !important;padding-bottom:56.25%;position:relative}}";let pi=class{constructor(r){t(this,r),this.layout="default"}waitForApi(t){var r=setInterval((function(){var e;(null===(e=null===window||void 0===window?void 0:window.gapi)||void 0===e?void 0:e.ytsubscribe)&&(clearInterval(r),t())}),50)}componentDidLoad(){const t=document.createElement("script");t.type="text/javascript",t.async=!1,t.src="https://apis.google.com/js/platform.js";const r=document.getElementsByTagName("script")[0];r&&r.parentNode.insertBefore(t,r),this.waitForApi((()=>{window.gapi.ytsubscribe.render(this.textInput,{channelId:this.channel,layout:this.layout,count:this.showCount?"default":"hidden"})}))}render(){return r("div",{class:"g-ytsubscribe",ref:t=>this.textInput=t})}};pi.style=":host{display:block}";export{O as C,F as E,Ke as P,f as a,k as b,x as c,z as d,j as e,T as f,S as g,C as h,A as i,I as j,M as k,E as l,L as m,R as n,ti as o,ei as p,ii as q,de as r,oi as s,ni as t,ai as u,si as v,li as w,pi as x}
1
+ import{r as t,h as r,g as e,c as i,H as o,_ as n,a,d as s,e as l,f as p,i as u,j as d,k as c,l as h,m as y,n as v}from"./p-3e9a58ac.js";let f=class{constructor(r){t(this,r)}componentWillLoad(){this.player&&(this.player.on("ended",(()=>this.setEnded())),this.player.on("timeupdate",(t=>this.setCurrentTime(t))))}setEnded(){this.ended=!0}setCurrentTime(t){var r,e;this.currentTime=null===(r=null==t?void 0:t.detail)||void 0===r?void 0:r.plyr.currentTime,this.duration=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.plyr.duration}disconnectedCallback(){this.player&&(this.player.off("ended",this.setEnded),this.player.off("timeupdate",this.setCurrentTime))}render(){return r("presto-action-bar-controller",{ended:this.ended,config:this.config,currentTime:this.currentTime,duration:this.duration,direction:this.direction,youtube:this.youtube})}get el(){return e(this)}};function _({current:t,duration:r,showAfter:e=null}){if(0===e)return!0;if(null===e||!r)return!1;if(t===e)return!0;let i=t/r*100;return 99.9<i&&(i=100),i>=e}function g(t){if(!t)return;let r,e,i,o;if(t.match(/^rgb/)){const o=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);r=o[1],e=o[2],i=o[3]}else{const o=+("0x"+t.slice(1).replace(t.length<5&&/./g,"$&$&"));r=o>>16,e=o>>8&255,i=255&o}return o=Math.sqrt(r*r*.299+e*e*.587+i*i*.114),o>127.5?"light":"dark"}function m(t){let r,e=t.split(":");return e.length>1&&(r=60*parseInt(e[0])),parseInt(e[1])+parseInt(r)}function b(){var t=navigator.userAgent||navigator.vendor;return/windows phone/i.test(t)?"Windows Phone":/android/i.test(t)?"Android":"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)?"iOS":"unknown"}function w(){return"iOS"===b()}f.style=":host{display:block}";let k=class{constructor(r){t(this,r),this.actionBarStateChange=i(this,"actionBarStateChange",7),this.show=!1,this.youtubeRenderKey=1,this.percentagePassed=0}componentWillLoad(){this.handleDuration()}handleDuration(){this.handleTime()}handleEnded(t){var r;if(t){if(100!==(null===(r=null==this?void 0:this.config)||void 0===r?void 0:r.percentage_start))return;this.show=!0}}handlePercentagePassed(){this.percentagePassed=this.currentTime/this.duration*100}handleTime(){this.checkTime()}checkTime(){var t,r;this.show=!!(null===(t=null===window||void 0===window?void 0:window.wp)||void 0===t?void 0:t.blocks)||_({current:this.currentTime,duration:this.duration,showAfter:null===(r=this.config)||void 0===r?void 0:r.percentage_start})}handleButtonCountChange(t,r){(null==t?void 0:t.button_count)!==(null==r?void 0:r.button_count)&&this.youtubeRenderKey++,(null==t?void 0:t.enabled)&&this.handleDuration()}youtubeButton(){var t,e,i,o;if("youtube"===(null===(t=this.config)||void 0===t?void 0:t.button_type)&&(null===(e=this.youtube)||void 0===e?void 0:e.channelId))return r("presto-youtube-subscribe-button",{key:this.youtubeRenderKey,channel:null===(i=this.youtube)||void 0===i?void 0:i.channelId,showCount:null===(o=this.config)||void 0===o?void 0:o.button_count})}customButton(){var t,e,i,o,n,a,s,l,p,u,d;if("custom"===(null===(t=this.config)||void 0===t?void 0:t.button_type))return r("presto-player-button",{type:"primary",size:"small",href:null===(i=null===(e=this.config)||void 0===e?void 0:e.button_link)||void 0===i?void 0:i.url,target:(null===(n=null===(o=this.config)||void 0===o?void 0:o.button_link)||void 0===n?void 0:n.opensInNewTab)?"_blank":"_self",style:Object.assign(Object.assign({"--presto-player-button-border-radius":`${null===(a=this.config)||void 0===a?void 0:a.button_radius}px`},(null===(s=this.config)||void 0===s?void 0:s.button_color)?{"--presto-player-button-color":`${null===(l=this.config)||void 0===l?void 0:l.button_color}`}:{}),(null===(p=this.config)||void 0===p?void 0:p.button_text_color)?{"--presto-player-button-text":`${null===(u=this.config)||void 0===u?void 0:u.button_text_color}`}:{})},null===(d=this.config)||void 0===d?void 0:d.button_text)}handleCtaStateChange(t){this.actionBarStateChange.emit(t)}render(){var t,e;return r("presto-action-bar-ui",{open:this.show,style:{"--presto-action-bar-background":(null===(t=this.config)||void 0===t?void 0:t.background_color)||"#1d1d1d"}},null===(e=this.config)||void 0===e?void 0:e.text,r("div",{slot:"button"},this.youtubeButton(),this.customButton()))}get el(){return e(this)}static get watchers(){return{duration:["handleDuration","handlePercentagePassed"],ended:["handleEnded"],currentTime:["handlePercentagePassed","handleTime"],config:["handleButtonCountChange"],show:["handleCtaStateChange"]}}};k.style=":host{display:block}";let x=class{constructor(r){t(this,r)}render(){return r("div",{class:{bar:!0,"bar--open":this.open}},r("span",{part:"content",class:"bar__content"},r("slot",null)),r("span",{part:"button",class:"bar__button"},r("slot",{name:"button"})))}};x.style=":host{display:block;overflow:hidden}.bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;background:var(--presto-action-bar-background, #1d1d1d);color:#fff;padding:0 var(--presto-action-bar-padding, 6px);line-height:1em;font-size:16px;margin-top:-100%;transition:margin var(--presto-action-bar-animation-speed, 0.5s) ease-in-out;transform:translate3d(0);border-radius:0px 0px var(--presto-player-border-radius) var(--presto-player-border-radius)}.bar.bar--open{margin-top:0}.bar__button{margin:var(--presto-action-bar-padding, 6px);display:flex;align-items:center}.bar__content{margin:var(--presto-action-bar-padding, 6px);width:100%;text-align:center}@media screen and (min-width: 480px){.bar__content{width:auto}}";let z=class{constructor(r){t(this,r),this.playVideo=i(this,"playVideo",7),this.pauseVideo=i(this,"pauseVideo",7)}renderPosterImage(){if(this.poster)return r("div",{class:"presto-audio__poster"},r("img",{src:this.poster}))}hasPosterArea(){var t;return!!this.poster||!!(null===(t=this.preset)||void 0===t?void 0:t["play-large"])}renderMobilePoster(){var t;return r("div",{class:"presto-audio__poster-wrapper-mobile"},!!(null===(t=this.preset)||void 0===t?void 0:t["play-large"])&&this.renderLargePlay("presto-audio__large-play-button is-relative"),r("div",{class:"presto-audio__mobile-title"},this.mediaTitle))}renderLargePlay(t="presto-audio__large-play-button"){return r("div",{class:t,onClick:()=>{this.player.playing?this.pauseVideo.emit():this.playVideo.emit()}},r("svg",{class:"presto-audio__icon-play",width:"16",height:"18",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r("path",{d:"M15.5588 9.00005L0.117662 17.915L0.117662 0.0850823L15.5588 9.00005Z"})),r("svg",{class:"presto-audio__icon-pause",width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r("rect",{width:"5",height:"17"}),r("rect",{x:"12",width:"5",height:"17"})))}componentDidLoad(){"ResizeObserver"in window&&new ResizeObserver((t=>{t.forEach((t=>this.width=t.contentRect.width))})).observe(this.el)}render(){var t,e,i,o,n;return r("div",{ref:t=>this.el=t,class:{"presto-audio__wrapper":!0,"has-poster":!!this.poster,"has-play-large":!!(null===(t=this.preset)||void 0===t?void 0:t["play-large"]),"is-playing":null===(e=this.player)||void 0===e?void 0:e.playing,"has-light-background":"light"===g(null===(i=this.preset)||void 0===i?void 0:i.background_color),"has-dark-background":"dark"===g(null===(o=this.preset)||void 0===o?void 0:o.background_color),"breakpoint-small":this.width<520,"skin-stacked":this.width<520,"breakpoint-large":this.width>=520}},this.hasPosterArea()&&r("div",{class:"presto-audio__poster-wrapper"},!!(null===(n=this.preset)||void 0===n?void 0:n["play-large"])&&r("div",{class:"presto-audio__large-play-wrapper"},this.renderLargePlay()),this.renderPosterImage()),this.hasPosterArea()&&this.renderMobilePoster(),r("div",{class:"presto-audio__controls-wrapper"},r("div",{class:"presto-audio__title"},this.mediaTitle),r("audio",Object.assign({part:"audio-player",ref:this.getRef,autoplay:this.autoplay,preload:this.preload,"data-poster":this.poster},this.audioAttributes),r("source",{src:this.src}),!!this.tracks&&!!this.tracks.length&&this.tracks.map((t=>r("track",{kind:"captions",label:(null==t?void 0:t.label)?t.label:"Captions",src:null==t?void 0:t.src,srclang:(null==t?void 0:t.srcLang)?null==t?void 0:t.srcLang:"en"}))))))}};z.style=":host{display:block}.presto-audio__wrapper{border-radius:var(--presto-player-border-radius, 0px)}.presto-audio__wrapper .plyr--audio .plyr__controls{padding:0}.presto-audio__wrapper .plyr--audio .plyr__control.plyr__tab-focus,.presto-audio__wrapper .plyr--audio .plyr__control:hover,.presto-audio__wrapper .plyr--audio .plyr__control[aria-expanded=true]{background:var(--plyr-audio-controls-background);color:var(--plyr-audio-control-color)}.presto-audio__wrapper{display:flex;background:var(--plyr-audio-controls-background, #fff)}.presto-audio__controls-wrapper{padding:calc(var(--plyr-control-spacing, 10px) * 2);flex:1;display:flex;flex-direction:column;justify-content:center;min-width:0}.has-poster .presto-audio__controls-wrapper{padding:calc(var(--plyr-control-spacing, 10px) * 3)}.has-play-large:not(.has-poster) .presto-audio__controls-wrapper{padding-left:0}.presto-audio__title,.presto-audio__mobile-title{font-size:18px;font-weight:500;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--plyr-audio-control-color)}.presto-audio__title{margin:calc(var(--plyr-control-spacing, 10px) / 2);margin-top:0}.presto-audio__poster-wrapper{position:relative;width:100px;min-height:100px;flex:0 0 100px}.presto-audio__poster-wrapper img{border-radius:var(--presto-player-border-radius, 0px) 0 0 var(--presto-player-border-radius, 0px);width:100%;height:100%;object-fit:cover;aspect-ratio:1;display:block}.has-poster .presto-audio__poster-wrapper{width:140px;height:140px;flex:0 0 140px}.presto-audio__poster{width:100%;height:100%}.presto-audio__large-play-button{user-select:none;cursor:pointer;position:absolute;display:flex;align-items:center;justify-content:center;top:50%;left:50%;transform:translate(-50%, -50%);width:50px;height:50px;color:white;border-radius:100%;background:var(--plyr-audio-control-color);color:var(--plyr-audio-controls-background)}.presto-audio__large-play-button.is-relative{position:relative;top:auto;left:auto;transform:none}.has-light-background.has-poster .presto-audio__large-play-button{background:var(--plyr-audio-controls-background);color:var(--plyr-audio-control-color)}.has-dark-background.has-poster .presto-audio__large-play-button{background:var(--plyr-audio-control-color);color:var(--plyr-audio-controls-background)}.presto-audio__icon-play,.presto-audio__icon-pause{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);fill:currentColor;display:block;transition:opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;margin:0 auto;text-align:center}.presto-audio__icon-pause{opacity:0;visibility:hidden}.presto-audio__wrapper.is-playing .presto-audio__icon-pause{opacity:1;visibility:visible}.presto-audio__icon-play{margin-left:2px;opacity:1;visibility:visible}.presto-audio__wrapper.is-playing .presto-audio__icon-play{opacity:0;visibility:hidden}.presto-audio__poster-wrapper-mobile{display:none;min-width:0}.presto-audio__poster-wrapper-mobile .presto-audio__large-play-button{flex:0 0 50px}.presto-audio__wrapper.breakpoint-small{flex-direction:column}.presto-audio__wrapper.breakpoint-small .presto-audio__controls-wrapper{padding:calc(var(--plyr-control-spacing, 10px) * 2)}.presto-audio__wrapper.breakpoint-small.has-poster .presto-audio__title{text-align:center;margin:calc(var(--plyr-control-spacing, 10px) * 1.5)}.presto-audio__wrapper.breakpoint-small.has-poster .presto-audio__poster-wrapper{margin:30px auto auto auto;overflow:hidden;border-radius:var(--presto-player-border-radius, 0px);width:225px;height:225px;flex:0 0 225px}.presto-audio__wrapper.breakpoint-small.has-play-large:not(.has-poster) .presto-audio__poster-wrapper,.presto-audio__wrapper.breakpoint-small.has-play-large:not(.has-poster) .presto-audio__title{display:none}.presto-audio__wrapper.breakpoint-small.has-play-large:not(.has-poster) .presto-audio__poster-wrapper-mobile{display:flex;align-items:center;gap:1em;margin-bottom:calc(var(--plyr-control-spacing, 10px) * -1);padding:calc(var(--plyr-control-spacing, 10px) * 2) calc(var(--plyr-control-spacing, 10px) * 2) 0 calc(var(--plyr-control-spacing, 10px) * 2)}.skin-stacked.presto-sticky-audio .presto-audio__wrapper{height:115px}.skin-stacked.presto-sticky-audio .has-poster .presto-audio__controls-wrapper{padding:20px}.skin-stacked.presto-sticky-audio .has-poster .presto-audio__poster-wrapper{width:115px;height:115px;flex:0 0 115px}.presto-sticky-audio .presto-audio__wrapper{height:100px}.presto-sticky-audio .has-poster .presto-audio__controls-wrapper{padding:20px}.presto-sticky-audio .has-poster .presto-audio__poster-wrapper{width:100px;height:100px;flex:0 0 100px}.action-bar-active .presto-audio__wrapper{border-radius:var(--presto-player-border-radius) var(--presto-player-border-radius) 0px 0px}@media screen and (max-width: 520px){.presto-sticky-audio .presto-audio__poster-wrapper-mobile{display:flex;align-items:center;gap:1em;margin-bottom:calc(var(--plyr-control-spacing, 10px) * -1);padding:calc(var(--plyr-control-spacing, 10px) * 2) calc(var(--plyr-control-spacing, 10px) * 2) 0 calc(var(--plyr-control-spacing, 10px) * 2)}.presto-sticky-audio .presto-audio__poster-wrapper,.presto-sticky-audio .presto-audio__title{display:none}.presto-sticky-audio .presto-audio__wrapper{height:140px}.presto-sticky-audio .has-poster .presto-audio__controls-wrapper{padding:0px}.presto-sticky-audio .presto-audio__poster-wrapper-mobile .presto-audio__large-play-button{flex:0 0 40px;height:40px}}";let j=class{constructor(r){t(this,r)}componentWillLoad(){this.poster=this.poster||this.thumbnail}render(){return r("presto-video",{getRef:this.getRef,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,playsinline:this.playsinline,src:this.src,tracks:this.tracks,videoAttributes:this.videoAttributes})}},T=class{constructor(r){t(this,r)}render(){return r(o,null,r("slot",null))}};T.style='.skin-business.presto-player__wrapper.rewind-inactive .plyr__controls .plyr__controls__item:nth-child(2)::before{border-radius:var(--plyr-control-radius, 3px) 0px 0px var(--plyr-control-radius, 3px)}.skin-business.presto-player__wrapper.caption-style-full .plyr:not(.plyr--hide-controls):not(.is-muted-overlay) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 16px) * -4))}.skin-business.presto-player__wrapper .presto-player-progress__marker{border-radius:0;width:15px;height:15px;border-width:1px}.skin-business.presto-player__wrapper .plyr__control[data-plyr]:hover:not([role*=menuitem]):not(.plyr__control--back),.skin-business.presto-player__wrapper .plyr__control[data-plyr]:focus:not([role*=menuitem]):not(.plyr__control--back),.skin-business.presto-player__wrapper .plyr__control[data-plyr]:active:not([role*=menuitem]):not(.plyr__control--back){background-color:transparent;color:var(--plyr-color-main)}.skin-business.presto-player__wrapper .plyr__control[data-plyr]:hover:not([role*=menuitem]):not(.plyr__control--back)[data-plyr=play],.skin-business.presto-player__wrapper .plyr__control[data-plyr]:focus:not([role*=menuitem]):not(.plyr__control--back)[data-plyr=play],.skin-business.presto-player__wrapper .plyr__control[data-plyr]:active:not([role*=menuitem]):not(.plyr__control--back)[data-plyr=play]{background-color:var(--plyr-color-main);color:white}.skin-business.presto-player__wrapper .plyr__control--overlaid[data-plyr=play]{border-radius:4px;background:#000000;opacity:75%}.skin-business.presto-player__wrapper .plyr__control--overlaid[data-plyr=play]:hover{background-color:var(--plyr-color-main);color:white;opacity:100%}.skin-business.presto-player__wrapper .plyr__volume input[type=range]{cursor:pointer}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item[data-plyr=fast-forward]{border-radius:0px}.skin-business.presto-player__wrapper .plyr__progress{margin:0px 20px 0 5px}.skin-business.presto-player__wrapper .plyr__progress input[type=range]{height:32px;border-radius:0px;cursor:pointer}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item:not(.presto-player-progress__marker):first-child::before{border-radius:var(--plyr-control-radius, 3px) 0px 0px var(--plyr-control-radius, 3px)}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item:not(.presto-player-progress__marker):last-child::before{border-radius:0px var(--plyr-control-radius, 3px) var(--plyr-control-radius, 3px) 0px}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item.plyr__control[data-plyr=play]{order:-1;margin-right:5px;padding:11px 20px 11px 20px;top:-4px}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item.plyr__control[data-plyr=play]::before{border-radius:4px}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item[data-plyr=rewind]::before{border-radius:var(--plyr-control-radius, 3px) 0px 0px var(--plyr-control-radius, 3px)}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item:not([data-plyr=play]){margin:0}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item[data-plyr=fullscreen]{padding:4px}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item[data-plyr=fullscreen] svg{height:24px;width:24px}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item:not(.presto-player-progress__marker){position:relative}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item:not(.presto-player-progress__marker).plyr__time{height:32px;padding-top:4.5px}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item:not(.presto-player-progress__marker)::before{content:"";background:#000000;position:absolute;top:0px;left:0;right:0;bottom:0px;opacity:0.76;z-index:-1}.skin-business.presto-player__wrapper .plyr--full-ui input[type=range]::-webkit-slider-runnable-track{box-shadow:none;color:var(--plyr-color-main);height:9px;outline:1px solid #878787a6;outline-offset:2px;border-radius:0px}.skin-business.presto-player__wrapper .plyr--full-ui input[type=range]::-webkit-slider-thumb{visibility:hidden}.skin-business.presto-player__wrapper .plyr__progress__buffer::-webkit-progress-value{position:relative;border-radius:0px;height:9px;top:-2px}.skin-business.presto-player__wrapper .plyr--full-ui input[type=range]::-webkit-slider-runnable-track{background-color:transparent}@media screen and (max-width: 480px){.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item.plyr__time{padding:1.5%}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item[data-plyr=play]{padding:8px;top:0px}.skin-business.presto-player__wrapper .plyr__controls .plyr__controls__item[data-plyr=fullscreen] svg{width:22px}}';let S=class{constructor(r){t(this,r)}componentWillLoad(){this.player&&(this.player.on("ended",(()=>this.setEnded())),this.player.on("timeupdate",(t=>this.setCurrentTime(t))))}setEnded(){this.ended=!0}setCurrentTime(t){var r,e;this.currentTime=null===(r=null==t?void 0:t.detail)||void 0===r?void 0:r.plyr.currentTime,this.duration=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.plyr.duration}disconnectedCallback(){this.player&&(this.player.off("ended",this.setEnded),this.player.off("timeupdate",this.setCurrentTime))}render(){var t;return r("presto-cta-overlay-controller",{ended:this.ended,currentTime:this.currentTime,duration:this.duration,direction:this.direction,cta:null===(t=this.preset)||void 0===t?void 0:t.cta,i18n:this.i18n,provider:this.provider})}};S.style=":host{display:block}";let C=class{constructor(r){t(this,r),this.playVideo=i(this,"playVideo",7),this.pauseVideo=i(this,"pauseVideo",7),this.restartVideo=i(this,"restartVideo",7),this.ctaStateChange=i(this,"ctaStateChange",7),this.percentagePassed=0}componentWillLoad(){this.handleDuration()}handleEnded(t){var r;if(t){if(100!==(null===(r=null==this?void 0:this.cta)||void 0===r?void 0:r.percentage))return;this.show=!0}}handleDuration(){var t;this.enabled=!this.skipped&&(null===(t=null==this?void 0:this.cta)||void 0===t?void 0:t.enabled),this.handleTime()}handlePercentagePassed(){this.percentagePassed=this.currentTime/this.duration*100}handleEnabled(){this.show&&(this.skipped||this.pauseVideo.emit(!0))}handleTime(){var t;this.enabled&&(this.skipped||100!==(null===(t=null==this?void 0:this.cta)||void 0===t?void 0:t.percentage)&&this.checkTime())}checkTime(){var t;this.show=_({current:this.currentTime,duration:this.duration,showAfter:(null===(t=null==this?void 0:this.cta)||void 0===t?void 0:t.percentage)||0})}skip(){this.skipped=!0,this.show=!1,this.playVideo.emit()}rewatch(){this.ended=!1,this.show=!1,this.restartVideo.emit()}handleCtaStateChange(t){this.ctaStateChange.emit(t)}render(){var t,e,i,o,n,a,s,l,p,u,d,c,h,y;if(this.show)return r("presto-cta-overlay-ui",{style:Object.assign(Object.assign(Object.assign({"--presto-player-button-border-radius":`${null===(t=null==this?void 0:this.cta)||void 0===t?void 0:t.button_radius}px`},(null===(e=null==this?void 0:this.cta)||void 0===e?void 0:e.background_opacity)?{"--presto-player-cta-background-opacity":""+(null===(i=null==this?void 0:this.cta)||void 0===i?void 0:i.background_opacity)/100}:{}),(null===(o=null==this?void 0:this.cta)||void 0===o?void 0:o.button_color)?{"--presto-player-button-color":`${null===(n=null==this?void 0:this.cta)||void 0===n?void 0:n.button_color}`}:{}),(null===(a=null==this?void 0:this.cta)||void 0===a?void 0:a.button_text_color)?{"--presto-player-button-text":`${null===(s=null==this?void 0:this.cta)||void 0===s?void 0:s.button_text_color}`}:{}),direction:this.direction,class:"cta-overlay",i18n:this.i18n,headline:null===(l=null==this?void 0:this.cta)||void 0===l?void 0:l.headline,"bottom-text":null===(p=null==this?void 0:this.cta)||void 0===p?void 0:p.bottom_text,"show-button":null===(u=null==this?void 0:this.cta)||void 0===u?void 0:u.show_button,buttonLink:null===(d=null==this?void 0:this.cta)||void 0===d?void 0:d.button_link,allowSkip:!this.ended&&(null===(c=null==this?void 0:this.cta)||void 0===c?void 0:c.show_skip),allowRewatch:this.ended&&(null===(h=null==this?void 0:this.cta)||void 0===h?void 0:h.show_rewatch),"button-text":null===(y=null==this?void 0:this.cta)||void 0===y?void 0:y.button_text,onSkip:()=>this.skip(),onRewatch:()=>this.rewatch(),provider:this.provider})}static get watchers(){return{ended:["handleEnded"],duration:["handleDuration","handlePercentagePassed"],currentTime:["handlePercentagePassed","handleEnabled","handleTime"],show:["handleCtaStateChange"]}}};C.style=":host{display:block}";const P=function(t,r,e){var i=function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e]);return t}({minFontSize:-1/0,maxFontSize:1/0,container:t},e),o=function(t){var e=r||1,o=function(){var r;t.style.fontSize=Math.max(Math.min(((null==i||null===(r=i.container)||void 0===r?void 0:r.clientWidth)||0)/(10*e),parseFloat(i.maxFontSize)),parseFloat(i.minFontSize))+"px"};if(o(),"ResizeObserver"in window==0)var n=import("./p-97e2763b.js").then((function(){window.ResizeObserver=n.ResizeObserver,new ResizeObserver(o).observe(i.container)}));else new ResizeObserver(o).observe(i.container)};if(t.length)for(var n=0;n<t.length;n++)o(t[n]);else o(t);return t};let O=class{constructor(r){t(this,r),this.skip=i(this,"skip",7),this.rewatch=i(this,"rewatch",7)}componentDidLoad(){this.isAudioProvider="audio"===(this.type||this.provider),P(this.textInput,3,{maxFontSize:!0===this.isAudioProvider?15:20,minFontSize:8})}handleCTAClick(t){var r;(null===(r=this.buttonLink)||void 0===r?void 0:r.url)&&(t.preventDefault(),t.stopPropagation(),this.handleLink())}handleLink(){var t,r,e;(null===(t=this.buttonLink)||void 0===t?void 0:t.opensInNewTab)?window.open(null===(r=this.buttonLink)||void 0===r?void 0:r.url,"_blank"):window.location.href=null===(e=this.buttonLink)||void 0===e?void 0:e.url}render(){var t,e,i,o,n;return r("div",{class:"wrapper",ref:t=>this.textInput=t},r("div",{onClick:t=>this.handleCTAClick(t),class:`overlay ${"rtl"===this.direction?"rtl":""} ${(null===(t=this.buttonLink)||void 0===t?void 0:t.url)?"has-link":""}`},r("div",{class:this.isAudioProvider?"content is-centered":"content"},r("h1",{part:"cta-headline"},this.headline||this.defaultHeadline),this.bottomText&&r("p",{class:this.isAudioProvider&&"is-small",part:"cta-bottom-text",innerHTML:this.bottomText}),this.showButton&&r("presto-player-button",{full:!0,onClick:t=>this.handleCTAClick(t),part:"cta-button",href:null===(e=null==this?void 0:this.buttonLink)||void 0===e?void 0:e.url,target:(null===(i=null==this?void 0:this.buttonLink)||void 0===i?void 0:i.opensInNewTab)?"_blank":"_self",class:"button",type:"primary"},this.buttonText))),!!this.allowRewatch&&r("div",{class:"rewatch",onClick:t=>{t.preventDefault(),t.stopImmediatePropagation(),this.rewatch.emit()}},r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-corner-up-left"},r("polyline",{points:"9 14 4 9 9 4"}),r("path",{d:"M20 20v-7a4 4 0 0 0-4-4H4"})),null===(o=null==this?void 0:this.i18n)||void 0===o?void 0:o.rewatch),!!this.allowSkip&&r("div",{class:"skip",onClick:t=>{t.preventDefault(),this.skip.emit()}},null===(n=null==this?void 0:this.i18n)||void 0===n?void 0:n.skip," →"))}};O.style=':host{display:block;font-size:16px;width:100%;height:100%;position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;z-index:99999;user-select:none}*{box-sizing:border-box}a{color:#fff}.wrapper{height:100%;position:relative;color:#fff;font-family:var(--plyr-font-family, "San Francisco", -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", Avenir, "Avenir Next", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif)}.overlay{position:relative;display:flex;align-items:center;justify-content:center;padding:48px;height:100%}.overlay.has-link{cursor:pointer}.overlay:before{content:"";border-radius:var(--presto-player-border-radius, 0);opacity:var(--presto-player-cta-background-opacity, 0.75);position:absolute;top:0;left:0;bottom:0;right:0;background-color:var(--presto-player-cta-background, #000);z-index:-1;box-shadow:inset 0 0 100px black}.content{width:80%;max-width:600px}.content *~*{margin-top:22px}button{background:var(--plyr-color-main, #000);appearance:none;padding:6px 12px;align-items:center;display:inline-flex;border-width:1px;border-color:transparent;color:#fff;border-radius:0;cursor:pointer;font-size:0.8em;border-radius:0 var(--presto-player-cta-border-radius, 0) var(--presto-player-cta-border-radius) 0}@media screen and (min-width: 700px){button{padding:10px 18px}}button:focus{box-shadow:white 0px 0px 0px 2px, var(--plyr-color-main, #000) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;z-index:1}button:focus,button:hover{outline:none}h1{font-size:1.5em;font-weight:500;margin:0;line-height:1.1em}.skip,.rewatch{font-size:0.8em;font-weight:600;position:absolute;top:0;right:0;padding:4%;cursor:pointer}.rewatch{display:inline-flex;align-items:center;right:auto;left:0}.rewatch .icon{margin-right:5px}p{font-size:0.85em;margin:0;margin-top:1.5em;line-height:1.4em;opacity:0.75}p.is-small{font-size:0.85em;margin:1.5em 0px 0px;line-height:0.1em;opacity:0.75}.is-centered{text-align:center}';let A=class{constructor(r){t(this,r),this.position="top-right"}closestElement(t,r){return r&&r!=document&&r!=window&&r.closest(t)||r&&this.closestElement(t,r.getRootNode().host)}componentDidLoad(){let t=this.closestElement("presto-player",this.el);P(this.text,3,{maxFontSize:16,minFontSize:10,container:t})}render(){return r(this.href?"a":"span",{class:{"overlay-text":!0,"overlay--top-left":"top-left"===this.position,"overlay--top-right":"top-right"===this.position},href:this.href,target:this.target,part:"overlay-text",ref:t=>this.text=t},r("slot",null))}get el(){return e(this)}};A.style=":host{display:block}.overlay-text{text-decoration:none;display:inline-block;user-select:none;line-height:1;opacity:var(--presto-dynamic-overlay-opacity, 1);font-size:var(--presto-dynamic-overlay-font-size, 18px);padding:var(--presto-dynamic-overlay-padding, 0.65em 0.85em);font-weight:var(--presto-dynamic-overlay-font-weight, 500);border-radius:var(--presto-dynamic-overlay-radius, 0.25em);background:var(--presto-dynamic-overlay-background, rgba(0, 0, 0, 0.8));color:var(--presto-dynamic-overlay-color, #fff);opacity:var(--presto-dynamic-overlay-opacity, 1);word-break:break-word}a.overlay-text{cursor:pointer}";let I=class{constructor(r){t(this,r),this.reloadComponent=i(this,"reloadComponent",7),this.watermarkRef={left:null,right:null},this.destroy=!1,this.refs={}}componentDidLoad(){this.player&&this.player.on("timeupdate",(t=>{this.currentTime=t.detail.plyr.currentTime,this.checkValidity()}))}checkValidity(){var t,r,e,i,o,n,a,s,l,p;this.player.playing&&((null===(t=null==this?void 0:this.overlays)||void 0===t?void 0:t.length)||(null===(e=null===(r=this.preset)||void 0===r?void 0:r.watermark)||void 0===e?void 0:e.enabled))&&((null===(i=this.container)||void 0===i?void 0:i.offsetParent)&&(null===(o=this.topLeft)||void 0===o?void 0:o.offsetParent)&&(null===(n=this.topRight)||void 0===n?void 0:n.offsetParent)||this.reloadComponent.emit(),Object.keys(this.refs||{}).forEach((t=>{const{overlay:r,component:e}=this.refs[t];this.checkComponent(e,r.text,(()=>this.reloadComponent.emit()))})),this.shouldShowWatermark("top-left")&&this.watermarkRef.left&&this.checkComponent(this.watermarkRef.left,null===(s=null===(a=this.preset)||void 0===a?void 0:a.watermark)||void 0===s?void 0:s.text,(()=>this.reloadComponent.emit())),this.shouldShowWatermark("top-right")&&this.watermarkRef.right&&this.checkComponent(this.watermarkRef.right,null===(p=null===(l=this.preset)||void 0===l?void 0:l.watermark)||void 0===p?void 0:p.text,(()=>this.reloadComponent.emit())))}checkComponent(t,r,e){if(!(null==t?void 0:t.offsetParent))return e();if(!t.shadowRoot.querySelector("slot"))return e();if(this.player&&this.player.playing){const i=t.shadowRoot.querySelector("slot").assignedNodes()[0];if(i){if(i.parentElement.innerHTML!=r)return e();const t=getComputedStyle(i.parentElement.shadowRoot.querySelector(".overlay-text"));if(parseInt(t.fontSize,10)<10)return e();const o=function(t){var r=t.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);return r?[r[1],r[2],r[3],"1"]:(r=t.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*((0.)?\d+)\s*\)$/i))?[r[1],r[2],r[3],r[4]]:void 0}(t.color);if("1"!==(null==o?void 0:o[3]))return e()}}}shouldShowOverlay(t){if(void 0!==this.currentTime)return!(this.currentTime<m(null==t?void 0:t.startTime)||this.currentTime>m(null==t?void 0:t.endTime))}renderOverlay(t){var e,i;return r("presto-dynamic-overlay-ui",{class:{visible:this.shouldShowOverlay(t)},ref:r=>this.refs[t.id]={overlay:t,component:r},key:t.id,position:t.position,href:null===(e=null==t?void 0:t.link)||void 0===e?void 0:e.url,target:(null===(i=null==t?void 0:t.link)||void 0===i?void 0:i.opensInNewTab)?"_blank":"_self",innerHTML:this.shouldShowOverlay(t)?t.text:"",style:{"--presto-dynamic-overlay-color":(null==t?void 0:t.color)||"#fff","--presto-dynamic-overlay-background":(null==t?void 0:t.backgroundColor)||"#333","--presto-dynamic-overlay-opacity":(null==t?void 0:t.opacity)?(t.opacity/100).toString():"1"}})}shouldShowWatermark(t){var r,e,i;if(!(null===(e=null===(r=this.preset)||void 0===r?void 0:r.watermark)||void 0===e?void 0:e.enabled))return!1;const o=null===(i=this.preset)||void 0===i?void 0:i.watermark;return"randomize"===o.position?Math.floor((this.player.currentTime||0)/10)%2==0?"top-left"===t:"top-right"===t:o.position===t||!o.position&&"top-right"===t}render(){var t,e,i,o,n,a,s,l,p,u,d;if(this.enabled&&((null===(t=null==this?void 0:this.overlays)||void 0===t?void 0:t.length)||(null===(i=null===(e=this.preset)||void 0===e?void 0:e.watermark)||void 0===i?void 0:i.enabled)))return r("div",{class:"overlays",ref:t=>this.container=t},r("div",{class:"top-left",ref:t=>this.topLeft=t},!!this.shouldShowWatermark("top-left")&&r("presto-dynamic-overlay-ui",{ref:t=>this.watermarkRef.left=t,style:{"--presto-dynamic-overlay-color":(null===(o=this.preset.watermark)||void 0===o?void 0:o.color)||"#fff","--presto-dynamic-overlay-background":(null===(n=this.preset.watermark)||void 0===n?void 0:n.backgroundColor)||"#333","--presto-dynamic-overlay-opacity":(null===(a=this.preset.watermark)||void 0===a?void 0:a.opacity)?(this.preset.watermark.opacity/100).toString():"1"},class:"visible",position:"top-left",innerHTML:this.preset.watermark.text}),!!(null===(s=null==this?void 0:this.overlays)||void 0===s?void 0:s.length)&&this.overlays.map((t=>"top-left"!==t.position?"":this.renderOverlay(t)))),r("div",{class:"top-right",ref:t=>this.topRight=t},!!this.shouldShowWatermark("top-right")&&r("presto-dynamic-overlay-ui",{ref:t=>this.watermarkRef.right=t,style:{"--presto-dynamic-overlay-color":(null===(l=this.preset.watermark)||void 0===l?void 0:l.color)||"#fff","--presto-dynamic-overlay-background":(null===(p=this.preset.watermark)||void 0===p?void 0:p.backgroundColor)||"#333","--presto-dynamic-overlay-opacity":(null===(u=this.preset.watermark)||void 0===u?void 0:u.opacity)?(this.preset.watermark.opacity/100).toString():"1"},class:"visible",position:"top-right",innerHTML:this.preset.watermark.text}),!!(null===(d=null==this?void 0:this.overlays)||void 0===d?void 0:d.length)&&this.overlays.map((t=>"top-right"!==t.position?"":this.renderOverlay(t)))))}get el(){return e(this)}};I.style=".top-left,.top-right{position:absolute;display:block;padding:20px;max-width:45%;z-index:20;display:flex;flex-direction:column;flex-wrap:wrap}.top-left{top:0;left:0}.top-right{top:0;right:0;align-items:flex-end}presto-dynamic-overlay-ui{overflow:hidden;height:0;opacity:0;transition:height 0ms 400ms, opacity 400ms 0ms}presto-dynamic-overlay-ui.visible{margin-bottom:10px;height:auto;opacity:1;transition:height 0ms 0ms, opacity 500ms 0ms}";let M=class{constructor(r){t(this,r)}componentWillLoad(){this.player&&(this.player.on("ended",(()=>this.setEnded())),this.player.on("timeupdate",(t=>this.setCurrentTime(t))))}setEnded(){this.ended=!0}setCurrentTime(t){var r,e;this.currentTime=null===(r=null==t?void 0:t.detail)||void 0===r?void 0:r.plyr.currentTime,this.duration=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.plyr.duration}disconnectedCallback(){this.player&&(this.player.off("ended",this.setEnded),this.player.off("timeupdate",this.setCurrentTime))}render(){var t,e;return r("presto-email-overlay-controller",{ended:this.ended,currentTime:this.currentTime,videoId:this.videoId,duration:this.duration,direction:this.direction,presetId:null===(t=this.preset)||void 0===t?void 0:t.id,emailCollection:null===(e=this.preset)||void 0===e?void 0:e.email_collection,i18n:this.i18n,provider:this.provider})}};M.style=":host{display:block}";let E=class{constructor(r){t(this,r),this.playVideo=i(this,"playVideo",7),this.pauseVideo=i(this,"pauseVideo",7),this.restartVideo=i(this,"restartVideo",7),this.emailStateChange=i(this,"emailStateChange",7),this.percentagePassed=0}setStorage(t){window.localStorage.setItem("presto.videos.email_collection",JSON.stringify({[this.videoId]:t}))}getStorage(){return window.localStorage.getItem("presto.videos.email_collection")}componentWillLoad(){this.handleDuration()}handleDuration(){var t;this.enabled=!this.getStorage()&&(null===(t=null==this?void 0:this.emailCollection)||void 0===t?void 0:t.enabled),this.handleTimeCheck()}handleTimeCheck(){this.enabled&&(this.getStorage()||this.checkTime())}handleShowChange(){this.show&&this.pauseVideo.emit(!0)}checkTime(){var t;this.show=_({current:this.currentTime,duration:this.duration,showAfter:(null===(t=null==this?void 0:this.emailCollection)||void 0===t?void 0:t.percentage)||0})}async getNonce(){var t;return fetch(`${null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.ajaxurl}?action=presto_refresh_progress_nonce`)}async submit(t){var r;this.loading=!0,this.error="";const e=await this.getNonce(),{data:i}=await e.json();try{let e=await fetch(null===(r=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===r?void 0:r.ajaxurl,{method:"post",body:new URLSearchParams(Object.assign({action:"presto_player_email_submit",nonce:i,preset_id:this.presetId,video_id:this.videoId},(null==t?void 0:t.detail)||{}))});const{success:o,data:n}=await e.json();if(!o)throw n;this.setStorage("collected"),this.show=!1,this.playVideo.emit()}catch(t){const r=null==t?void 0:t[0];r&&"string"==typeof r&&(this.error=r)}finally{this.loading=!1}}skip(){this.setStorage("skipped"),this.show=!1,this.playVideo.emit()}handleEmailStateChange(t){this.emailStateChange.emit(t)}render(){var t,e,i,o,n,a,s,l;if(this.show)return r("presto-email-overlay-ui",{style:Object.assign(Object.assign({},(null===(t=null==this?void 0:this.emailCollection)||void 0===t?void 0:t.button_color)?{"--presto-player-button-color":`${null===(e=null==this?void 0:this.emailCollection)||void 0===e?void 0:e.button_color}`}:{}),(null===(i=null==this?void 0:this.emailCollection)||void 0===i?void 0:i.button_text_color)?{"--presto-player-button-text":`${null===(o=null==this?void 0:this.emailCollection)||void 0===o?void 0:o.button_text_color}`}:{}),direction:this.direction,class:"email-overlay",headline:null===(n=null==this?void 0:this.emailCollection)||void 0===n?void 0:n.headline,bottomText:null===(a=null==this?void 0:this.emailCollection)||void 0===a?void 0:a.bottom_text,allowSkip:null===(s=null==this?void 0:this.emailCollection)||void 0===s?void 0:s.allow_skip,buttonText:null===(l=null==this?void 0:this.emailCollection)||void 0===l?void 0:l.button_text,isLoading:this.loading,errorMessage:this.error,onSubmitForm:t=>this.submit(t),onSkip:()=>this.skip(),i18n:this.i18n,provider:this.provider})}static get watchers(){return{duration:["handleDuration"],currentTime:["handleTimeCheck","handleShowChange"],show:["handleEmailStateChange"]}}};E.style=":host{display:block}";let F=class{constructor(r){t(this,r),this.submitForm=i(this,"submitForm",7),this.skip=i(this,"skip",7)}handleSubmit(t){this.submitForm.emit({email:this.email}),t.preventDefault()}componentDidLoad(){this.isAudioProvider="audio"===(this.type||this.provider),P(this.textInput,3,{maxFontSize:this.isAudioProvider?15:20,minFontSize:8})}handleChange(t){this.email=t.target.value}render(){var t,e,i,o;return r("div",{class:"overlay "+("rtl"===this.direction?"rtl":""),ref:t=>this.textInput=t},r("div",{class:"content"},r("h1",{class:this.isAudioProvider&&"is-small"},this.headline||(null===(t=null==this?void 0:this.i18n)||void 0===t?void 0:t.emailDefaultHeadline)),this.isLoading?r("presto-player-spinner",null):r("form",{onSubmit:t=>this.handleSubmit(t)},r("input",{type:"email",placeholder:null===(e=null==this?void 0:this.i18n)||void 0===e?void 0:e.emailPlaceholder,value:this.email,onInput:t=>this.handleChange(t),required:!0}),r("button",{type:"submit"},this.buttonText||(null===(i=null==this?void 0:this.i18n)||void 0===i?void 0:i.play))),this.errorMessage&&r("p",{class:"error"},this.errorMessage),this.bottomText&&r("p",{innerHTML:this.bottomText,class:this.isAudioProvider&&"is-small"}),!!this.allowSkip&&r("div",{class:"skip",onClick:()=>{this.skip.emit()}},null===(o=null==this?void 0:this.i18n)||void 0===o?void 0:o.skip," →")))}};F.style=':host{display:block;font-size:16px;width:100%;height:100%;position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;z-index:99999}*{box-sizing:border-box}a{color:#fff}.overlay{position:relative;display:flex;align-items:center;text-align:center;justify-content:center;padding:48px;color:#fff;font-family:var(--plyr-font-family, "San Francisco", -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", Avenir, "Avenir Next", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif);height:100%}.overlay:before{content:"";border-radius:var(--presto-player-border-radius, 0);opacity:var(--presto-player-email-background-opacity, 0.75);position:absolute;top:0;left:0;bottom:0;right:0;background-color:var(--presto-player-email-background, #000);z-index:-1;box-shadow:inset 0 0 100px black}.overlay.rtl form{flex-direction:row-reverse}.content{width:20em}form{display:flex;align-items:stretch;justify-content:center}input{background:#fff;border:none;font-size:0.8em;line-height:20px;padding:6px 8px;border-radius:0;border-width:1px;border-style:solid;border-color:transparent;border-radius:var(--presto-player-email-border-radius, 0) 0 0 var(--presto-player-email-border-radius);flex:1}@media screen and (min-width: 700px){input{padding:10px 14px}}input:focus{border-color:var(--plyr-color-main, #000);z-index:1}input:focus,input:hover{outline:none}.rtl input{border-radius:0 var(--presto-player-email-border-radius, 0) var(--presto-player-email-border-radius) 0}button{background-color:var(--presto-player-button-color, var(--plyr-color-main));border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-text, #fff);appearance:none;padding:6px 12px;align-items:center;display:inline-flex;border-width:1px;border-color:transparent;border-radius:0;cursor:pointer;font-size:0.8em;border-radius:0 var(--presto-player-email-border-radius, 0) var(--presto-player-email-border-radius) 0}@media screen and (min-width: 700px){button{padding:10px 18px}}button:focus{box-shadow:white 0px 0px 0px 2px, var(--plyr-color-main, #000) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;z-index:1}button:focus,button:hover{outline:none}.rtl button{border-radius:var(--presto-player-email-border-radius, 0) 0 0 var(--presto-player-email-border-radius)}h1{font-size:1.5em;font-weight:500;margin:0 0 22px 0;max-width:600px;line-height:1.1em}h1.is-small{margin-bottom:1em;font-size:1.1em}.skip{font-size:0.8em;font-weight:600;position:absolute;top:0;right:0;padding:4%;cursor:pointer}p{font-size:0.7em;margin:0;margin-top:1.5em}p.is-small{font-size:0.9em;margin-top:1em}';let L=class{constructor(r){t(this,r)}render(){return r(o,null,r("slot",null))}};L.style='.skin-modern.presto-player__wrapper button.plyr__control.plyr__control--overlaid{border-radius:2px;padding:3% 5%;max-width:135px;max-height:90px;box-sizing:content-box;position:absolute !important;top:50% !important;opacity:100%}.skin-modern.presto-player__wrapper button.plyr__control.plyr__control--overlaid svg{height:31px;width:37px}.skin-modern.presto-player__wrapper button.plyr__control.plyr__control--overlaid:hover,.skin-modern.presto-player__wrapper button.plyr__control.plyr__control--overlaid:focus{opacity:0.8;background:var(--plyr-color-main)}.skin-modern.presto-player__wrapper.caption-style-full .plyr:not(.plyr--hide-controls):not(.is-muted-overlay) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 9px) * -4))}.skin-modern.presto-player__wrapper .plyr--video .plyr__controls{padding:0px}.skin-modern.presto-player__wrapper .plyr--video .plyr__controls::before{content:"";background:var(--plyr-color-main);position:absolute;top:0;left:0;right:0;bottom:0;opacity:0.75}.skin-modern.presto-player__wrapper .plyr__controls__item{z-index:1}.skin-modern.presto-player__wrapper .plyr__controls__item.plyr__control:not(.presto-player-progress__marker):not([role*=menuitem]):not(.plyr__control--back){height:36px;border-radius:0px}.skin-modern.presto-player__wrapper .plyr__controls__item.plyr__control:not(.presto-player-progress__marker):not([role*=menuitem]):not(.plyr__control--back):focus{background-color:transparent;color:white}.skin-modern.presto-player__wrapper .plyr__controls__item.presto-player-progress__marker{z-index:2}.skin-modern.presto-player__wrapper .plyr__controls__item.plyr__menu{height:36px}.skin-modern.presto-player__wrapper .plyr--full-ui.plyr--video input[type=range]::-webkit-slider-runnable-track{height:2px;color:white}.skin-modern.presto-player__wrapper .presto-player__wrapper .plyr--full-ui.plyr--video input[type=range]::-webkit-slider-runnable-track{height:2px}.skin-modern.presto-player__wrapper .plyr--video .plyr__progress__buffer{height:2px;top:11px}.skin-modern.presto-player__wrapper .plyr__progress input[type=range]{cursor:pointer}.skin-modern.presto-player__wrapper .plyr--full-ui input[type=range]::-webkit-slider-thumb{top:1px;height:var(--plyr-range-thumb-height, 8px);width:var(--plyr-range-thumb-height, 8px);box-shadow:0px 0px 5px white}.skin-modern.presto-player__wrapper .plyr--full-ui input[type=range]::-webkit-slider-thumb:hover{transform:scale(1.5)}.skin-modern.presto-player__wrapper .plyr__controls .plyr__controls__item{margin:0px}.skin-modern.presto-player__wrapper .plyr__volume{width:auto}.skin-modern.presto-player__wrapper .plyr__volume input[type=range]{width:55px}.skin-modern.presto-player__wrapper .plyr__volume input[type=range]{cursor:pointer}.skin-modern.presto-player__wrapper .presto-player__muted-overlay .plyr__control.plyr__control--overlaid{border-radius:2px}.skin-modern.presto-player__wrapper .presto-player__muted-overlay .plyr__control.plyr__control--overlaid svg{height:40px;width:50px}.skin-modern.presto-player__wrapper .plyr__controls .plyr__controls__item[data-plyr=rewind] svg,.skin-modern.presto-player__wrapper .plyr__controls .plyr__controls__item[data-plyr=fast-forward] svg,.skin-modern.presto-player__wrapper .plyr__controls .plyr__controls__item[data-plyr=fullscreen] svg{width:22px;height:22px}@media screen and (max-width: 480px){.skin-modern.presto-player__wrapper .plyr__control--overlaid svg{height:18px;width:16px}}';let R=class{constructor(r){t(this,r),this.playVideo=i(this,"playVideo",7)}render(){var t,e,i,o,n,a,s,l,p;return r("div",{class:"presto-player__muted-overlay",onClick:()=>{this.mutedPreview=!1,this.playVideo.emit()}},(null===(t=this.preset)||void 0===t?void 0:t["play-large"])&&r("div",{class:"plyr__control plyr__control--overlaid","data-plyr":"play","aria-label":"Play",part:"muted-overlay-play"},r("svg",{id:"plyr-play",viewBox:"0 0 18 18"},r("path",{d:"M15.562 8.1L3.87.225c-.818-.562-1.87 0-1.87.9v15.75c0 .9 1.052 1.462 1.87.9L15.563 9.9c.584-.45.584-1.35 0-1.8z"})),r("span",{class:"plyr__sr-only"},"Play")),(null===(e=this.mutedOverlay)||void 0===e?void 0:e.enabled)&&(null===(i=this.mutedOverlay)||void 0===i?void 0:i.src)?r("div",{class:"presto-player__overlay is-image",part:"muted-overlay-image",style:{width:`${(null===(o=this.mutedOverlay)||void 0===o?void 0:o.width)||50}%`,left:100*((null===(a=null===(n=this.mutedOverlay)||void 0===n?void 0:n.focalPoint)||void 0===a?void 0:a.x)||.5)+"%",top:100*((null===(l=null===(s=this.mutedOverlay)||void 0===s?void 0:s.focalPoint)||void 0===l?void 0:l.y)||.5)+"%"}},r("img",{src:null===(p=this.mutedOverlay)||void 0===p?void 0:p.src,style:{transform:"translateX(-50%) translateY(-50%)"}})):"")}};R.style=":host{display:block}";var N=["premium","referrerPolicy"];function B(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function D(t,r){for(var e=0;e<r.length;e++){var i=r[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function $(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function q(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,i)}return e}function V(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?q(Object(e),!0).forEach((function(r){$(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):q(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}var H={addCSS:!0,thumbWidth:15,watch:!0};function U(t,r){return function(){return Array.from(document.querySelectorAll(r)).includes(this)}.call(t,r)}var Q=function(t){return null!=t?t.constructor:null},Y=function(t,r){return!!(t&&r&&t instanceof r)},W=function(t){return Q(t)===String},J=function(t){return Array.isArray(t)},G=function(t){return Y(t,NodeList)},K=W,X=J,Z=G,tt=function(t){return Y(t,Element)},rt=function(t){return Y(t,Event)},et=function(t){return function(t){return null==t}(t)||(W(t)||J(t)||G(t))&&!t.length||function(t){return Q(t)===Object}(t)&&!Object.keys(t).length};var it,ot,nt,at=function(){function t(r,e){(function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")})(this,t),tt(r)?this.element=r:K(r)&&(this.element=document.querySelector(r)),tt(this.element)&&et(this.element.rangeTouch)&&(this.config=V({},H,{},e),this.init())}return function(t,r,e){r&&D(t.prototype,r),e&&D(t,e)}(t,[{key:"init",value:function(){t.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){t.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(t){var r=this,e=t?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach((function(t){r.element[e](t,(function(t){return r.set(t)}),!1)}))}},{key:"get",value:function(r){if(!t.enabled||!rt(r))return null;var e,i=r.target,o=r.changedTouches[0],n=parseFloat(i.getAttribute("min"))||0,a=parseFloat(i.getAttribute("max"))||100,s=parseFloat(i.getAttribute("step"))||1,l=i.getBoundingClientRect(),p=100/l.width*(this.config.thumbWidth/2)/100;return 0>(e=100/l.width*(o.clientX-l.left))?e=0:100<e&&(e=100),50>e?e-=(100-2*e)*p:50<e&&(e+=2*(e-50)*p),n+function(t,r){if(1>r){var e=function(t){var r="".concat(t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return r?Math.max(0,(r[1]?r[1].length:0)-(r[2]?+r[2]:0)):0}(r);return parseFloat(t.toFixed(e))}return Math.round(t/r)*r}(e/100*(a-n),s)}},{key:"set",value:function(r){t.enabled&&rt(r)&&!r.target.disabled&&(r.preventDefault(),r.target.value=this.get(r),function(t,r){if(t&&r){var e=new Event(r,{bubbles:!0});t.dispatchEvent(e)}}(r.target,"touchend"===r.type?"change":"input"))}}],[{key:"setup",value:function(r){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=null;if(et(r)||K(r)?i=Array.from(document.querySelectorAll(K(r)?r:'input[type="range"]')):tt(r)?i=[r]:Z(r)?i=Array.from(r):X(r)&&(i=r.filter(tt)),et(i))return null;var o=V({},H,{},e);if(K(r)&&o.watch){var n=new MutationObserver((function(e){Array.from(e).forEach((function(e){Array.from(e.addedNodes).forEach((function(e){tt(e)&&U(e,r)&&new t(e,o)}))}))}));n.observe(document.body,{childList:!0,subtree:!0})}return i.map((function(r){return new t(r,e)}))}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),t}(),st=function(t){return null!=t?t.constructor:null},lt=function(t,r){return Boolean(t&&r&&t instanceof r)},pt=function(t){return null==t},ut=function(t){return st(t)===Object},dt=function(t){return st(t)===String},ct=function(t){return st(t)===Function},ht=function(t){return Array.isArray(t)},yt=function(t){return lt(t,NodeList)},vt=function(t){return pt(t)||(dt(t)||ht(t)||yt(t))&&!t.length||ut(t)&&!Object.keys(t).length},ft=pt,_t=ut,gt=function(t){return st(t)===Number&&!Number.isNaN(t)},mt=dt,bt=function(t){return st(t)===Boolean},wt=ct,kt=ht,xt=yt,zt=function(t){return null!==t&&"object"==p(t)&&1===t.nodeType&&"object"==p(t.style)&&"object"==p(t.ownerDocument)},jt=function(t){return lt(t,Event)},Tt=function(t){return lt(t,KeyboardEvent)},St=function(t){return lt(t,TextTrack)||!pt(t)&&dt(t.kind)},Ct=function(t){if(lt(t,window.URL))return!0;if(!dt(t))return!1;var r=t;t.startsWith("http://")&&t.startsWith("https://")||(r="http://".concat(t));try{return!vt(new URL(r).hostname)}catch(t){return!1}},Pt=vt,Ot=(it=document.createElement("span"),ot={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},nt=Object.keys(ot).find((function(t){return void 0!==it.style[t]})),!!mt(nt)&&ot[nt]);function At(t,r){setTimeout((function(){try{t.hidden=!0,t.hidden=!1}catch(t){}}),r)}var It={isIE:Boolean(window.document.documentMode),isEdge:window.navigator.userAgent.includes("Edge"),isWebkit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPhone:/(iPhone|iPod)/gi.test(navigator.platform),isIos:"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)};function Mt(t,r){return r.split(".").reduce((function(t,r){return t&&t[r]}),t)}function Et(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length,e=new Array(r>1?r-1:0),i=1;i<r;i++)e[i-1]=arguments[i];if(!e.length)return t;var o=e.shift();return _t(o)?(Object.keys(o).forEach((function(r){_t(o[r])?(Object.keys(t).includes(r)||Object.assign(t,s({},r,{})),Et(t[r],o[r])):Object.assign(t,s({},r,o[r]))})),Et.apply(void 0,[t].concat(e))):t}function Ft(t,r){Array.from(t.length?t:[t]).reverse().forEach((function(t,e){var i=e>0?r.cloneNode(!0):r,o=t.parentNode,n=t.nextSibling;i.appendChild(t),n?o.insertBefore(i,n):o.appendChild(i)}))}function Lt(t,r){zt(t)&&!Pt(r)&&Object.entries(r).filter((function(t){var r=n(t,2);return!ft(r[1])})).forEach((function(r){var e=n(r,2);return t.setAttribute(e[0],e[1])}))}function Rt(t,r,e){var i=document.createElement(t);return _t(r)&&Lt(i,r),mt(e)&&(i.innerText=e),i}function Nt(t,r,e,i){zt(r)&&r.appendChild(Rt(t,e,i))}function Bt(t){xt(t)||kt(t)?Array.from(t).forEach(Bt):zt(t)&&zt(t.parentNode)&&t.parentNode.removeChild(t)}function Dt(t){if(zt(t))for(var r=t.childNodes.length;r>0;)t.removeChild(t.lastChild),r-=1}function $t(t,r){return zt(r)&&zt(r.parentNode)&&zt(t)?(r.parentNode.replaceChild(t,r),t):null}function qt(t,r){if(!mt(t)||Pt(t))return{};var e={},i=Et({},r);return t.split(",").forEach((function(t){var r=t.trim(),o=r.replace(".",""),a=r.replace(/[[\]]/g,"").split("="),s=n(a,1)[0],l=a.length>1?a[1].replace(/["']/g,""):"";switch(r.charAt(0)){case".":e.class=mt(i.class)?"".concat(i.class," ").concat(o):o;break;case"#":e.id=r.replace("#","");break;case"[":e[s]=l}})),Et(i,e)}function Vt(t,r){if(zt(t)){var e=r;bt(e)||(e=!t.hidden),t.hidden=e}}function Ht(t,r,e){if(xt(t))return Array.from(t).map((function(t){return Ht(t,r,e)}));if(zt(t)){var i="toggle";return void 0!==e&&(i=e?"add":"remove"),t.classList[i](r),t.classList.contains(r)}return!1}function Ut(t,r){return zt(t)&&t.classList.contains(r)}function Qt(t,r){var e=Element.prototype;return(e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||function(){return Array.from(document.querySelectorAll(r)).includes(this)}).call(t,r)}function Yt(t){return this.elements.container.querySelectorAll(t)}function Wt(t){return this.elements.container.querySelector(t)}function Jt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];zt(t)&&(t.focus({preventScroll:!0}),r&&Ht(t,this.config.classNames.tabFocus))}var Gt={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},Kt={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check:function(t,r,e){var i=Kt[t]||"html5"!==r;return{api:i,ui:i&&Kt.rangeInput&&("video"!==t||!It.isIPhone||It.isIPhone&&e&&Kt.playsinline)}},pip:!(It.isIPhone||!wt(Rt("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||Rt("video").disablePictureInPicture)),airplay:wt(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime:function(t){if(Pt(t))return!1;var r=t.split("/"),e=n(r,1),i=t;if(!this.isHTML5||e[0]!==this.type)return!1;Object.keys(Gt).includes(i)&&(i+='; codecs="'.concat(Gt[t],'"'));try{return Boolean(i&&this.media.canPlayType(i).replace(/no/,""))}catch(t){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:function(){var t=document.createElement("input");return t.type="range","range"===t.type}(),touch:"ontouchstart"in document.documentElement,transitions:!1!==Ot,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},Xt=function(){var t=!1;try{var r=Object.defineProperty({},"passive",{get:function(){return t=!0,null}});window.addEventListener("test",null,r),window.removeEventListener("test",null,r)}catch(t){}return t}();function Zt(t,r,e){var i=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(t&&"addEventListener"in t&&!Pt(r)&&wt(e)){var s=r.split(" "),l=a;Xt&&(l={passive:n,capture:a}),s.forEach((function(r){i&&i.eventListeners&&o&&i.eventListeners.push({element:t,type:r,callback:e,options:l}),t[o?"addEventListener":"removeEventListener"](r,e,l)}))}}function tr(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2?arguments[2]:void 0,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Zt.call(this,t,r,e,!0,i,o)}function rr(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2?arguments[2]:void 0,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Zt.call(this,t,r,e,!1,i,o)}function er(t){var r=this,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=function a(){for(var s=arguments.length,l=new Array(s),p=0;p<s;p++)l[p]=arguments[p];rr(t,e,a,o,n),i.apply(r,l)};Zt.call(this,t,e,a,!0,o,n)}function ir(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(zt(t)&&!Pt(r)){var o=new CustomEvent(r,{bubbles:e,detail:a(a({},i),{},{plyr:this})});t.dispatchEvent(o)}}function or(){this&&this.eventListeners&&(this.eventListeners.forEach((function(t){t.element.removeEventListener(t.type,t.callback,t.options)})),this.eventListeners=[])}function nr(){var t=this;return new Promise((function(r){return t.ready?setTimeout(r,0):tr.call(t,t.elements.container,"ready",r)})).then((function(){}))}function ar(t){(function(t){return lt(t,Promise)&&ct(t.then)})(t)&&t.then(null,(function(){}))}function sr(t){return kt(t)?t.filter((function(r,e){return t.indexOf(r)===e})):t}function lr(t,r){return kt(t)&&t.length?t.reduce((function(t,e){return Math.abs(e-r)<Math.abs(t-r)?e:t})):null}function pr(t){return!(!window||!window.CSS)&&window.CSS.supports(t)}var ur=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce((function(t,r){var e=n(r,2),i=e[0],o=e[1];return a(a({},t),{},s({},i/o,[i,o]))}),{});function dr(t){return!!(kt(t)||mt(t)&&t.includes(":"))&&(kt(t)?t:t.split(":")).map(Number).every(gt)}function cr(t){if(!kt(t)||!t.every(gt))return null;var r=n(t,2),e=r[0],i=r[1],o=function t(r,e){return 0===e?r:t(e,r%e)}(e,i);return[e/o,i/o]}function hr(t){var r=function(t){return dr(t)?t.split(":").map(Number):null},e=r(t);if(null===e&&(e=r(this.config.ratio)),null===e&&!Pt(this.embed)&&kt(this.embed.ratio)&&(e=this.embed.ratio),null===e&&this.isHTML5){var i=this.media;e=[i.videoWidth,i.videoHeight]}return cr(e)}function yr(t){if(!this.isVideo)return{};var r=this.elements.wrapper,e=hr.call(this,t);if(!kt(e))return{};var i=cr(e),o=n(i,2),a=o[0],s=o[1],l=100/a*s;if(pr("aspect-ratio: ".concat(a,"/").concat(s))?r.style.aspectRatio="".concat(a,"/").concat(s):r.style.paddingBottom="".concat(l,"%"),this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){var p=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),u=(p-l)/(p/50);this.fullscreen.active?r.style.paddingBottom=null:this.media.style.transform="translateY(-".concat(u,"%)")}else this.isHTML5&&r.classList.add(this.config.classNames.videoFixedRatio);return{padding:l,ratio:e}}function vr(t,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.05,i=t/r,o=lr(Object.keys(ur),i);return Math.abs(o-i)<=e?ur[o]:[t,r]}var fr={getSources:function(){var t=this;return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter((function(r){var e=r.getAttribute("type");return!!Pt(e)||Kt.mime.call(t,e)})):[]},getQualityOptions:function(){return this.config.quality.forced?this.config.quality.options:fr.getSources.call(this).map((function(t){return Number(t.getAttribute("size"))})).filter(Boolean)},setup:function(){if(this.isHTML5){var t=this;t.options.speed=t.config.speed.options,Pt(this.config.ratio)||yr.call(t),Object.defineProperty(t.media,"quality",{get:function(){var r=fr.getSources.call(t).find((function(r){return r.getAttribute("src")===t.source}));return r&&Number(r.getAttribute("size"))},set:function(r){if(t.quality!==r){if(t.config.quality.forced&&wt(t.config.quality.onChange))t.config.quality.onChange(r);else{var e=fr.getSources.call(t).find((function(t){return Number(t.getAttribute("size"))===r}));if(!e)return;var i=t.media,o=i.currentTime,n=i.paused,a=i.preload,s=i.readyState,l=i.playbackRate;t.media.src=e.getAttribute("src"),("none"!==a||s)&&(t.once("loadedmetadata",(function(){t.speed=l,t.currentTime=o,n||ar(t.play())})),t.media.load())}ir.call(t,t.media,"qualitychange",!1,{quality:r})}}})}},cancelRequests:function(){this.isHTML5&&(Bt(fr.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function _r(t){return"".concat(t,"-").concat(Math.floor(1e4*Math.random()))}function gr(t){for(var r=arguments.length,e=new Array(r>1?r-1:0),i=1;i<r;i++)e[i-1]=arguments[i];return Pt(t)?t:t.toString().replace(/{(\d+)}/g,(function(t,r){return e[r].toString()}))}var mr=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return t.replace(new RegExp(r.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),e.toString())},br=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.toString().replace(/\w\S*/g,(function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}))};function wr(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=t.toString();return r=mr(r,"-"," "),r=mr(r,"_"," "),r=br(r),mr(r," ","")}function kr(t){var r=document.createElement("div");return r.appendChild(t),r.innerHTML}var xr={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},zr=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Pt(t)||Pt(r))return"";var e=Mt(r.i18n,t);if(Pt(e))return Object.keys(xr).includes(t)?xr[t]:"";var i={"{seektime}":r.seekTime,"{title}":r.title};return Object.entries(i).forEach((function(t){var r=n(t,2);e=mr(e,r[0],r[1])})),e},jr=function(){function t(r){var e=this;u(this,t),B(this,"get",(function(r){if(!t.supported||!e.enabled)return null;var i=window.localStorage.getItem(e.key);if(Pt(i))return null;var o=JSON.parse(i);return mt(r)&&r.length?o[r]:o})),B(this,"set",(function(r){if(t.supported&&e.enabled&&_t(r)){var i=e.get();Pt(i)&&(i={}),Et(i,r);try{window.localStorage.setItem(e.key,JSON.stringify(i))}catch(r){}}})),this.enabled=r.config.storage.enabled,this.key=r.config.storage.key}return l(t,null,[{key:"supported",get:function(){try{if(!("localStorage"in window))return!1;var t="___test";return window.localStorage.setItem(t,t),window.localStorage.removeItem(t),!0}catch(t){return!1}}}]),t}();function Tr(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";return new Promise((function(e,i){try{var o=new XMLHttpRequest;if(!("withCredentials"in o))return;o.addEventListener("load",(function(){if("text"===r)try{e(JSON.parse(o.responseText))}catch(t){e(o.responseText)}else e(o.response)})),o.addEventListener("error",(function(){throw new Error(o.status)})),o.open("GET",t,!0),o.responseType=r,o.send()}catch(t){i(t)}}))}function Sr(t,r){if(mt(t)){var e=mt(r),i=function(){return null!==document.getElementById(r)},o=function(t,r){t.innerHTML=r,e&&i()||document.body.insertAdjacentElement("afterbegin",t)};if(!e||!i()){var n=jr.supported,a=document.createElement("div");if(a.setAttribute("hidden",""),e&&a.setAttribute("id",r),n){var s=window.localStorage.getItem("cache-".concat(r));if(null!==s){var l=JSON.parse(s);o(a,l.content)}}Tr(t).then((function(t){if(!Pt(t)){if(n)try{window.localStorage.setItem("cache-".concat(r),JSON.stringify({content:t}))}catch(t){}o(a,t)}})).catch((function(){}))}}}var Cr=function(t){return Math.trunc(t/60/60%60,10)},Pr=function(t){return Math.trunc(t%60,10)};function Or(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!gt(t))return Or(void 0,r,e);var i,o=function(t){return"0".concat(t).slice(-2)},n=Cr(t),a=(i=t,Math.trunc(i/60%60,10)),s=Pr(t);return n=r||n>0?"".concat(n,":"):"","".concat(e&&t>0?"-":"").concat(n).concat(o(a),":").concat(o(s))}var Ar={getIconUrl:function(){var t=new URL(this.config.iconUrl,window.location),r=window.location.host?window.location.host:window.top.location.host,e=t.host!==r||It.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:e}},findElements:function(){try{return this.elements.controls=Wt.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:Yt.call(this,this.config.selectors.buttons.play),pause:Wt.call(this,this.config.selectors.buttons.pause),restart:Wt.call(this,this.config.selectors.buttons.restart),rewind:Wt.call(this,this.config.selectors.buttons.rewind),fastForward:Wt.call(this,this.config.selectors.buttons.fastForward),mute:Wt.call(this,this.config.selectors.buttons.mute),pip:Wt.call(this,this.config.selectors.buttons.pip),airplay:Wt.call(this,this.config.selectors.buttons.airplay),settings:Wt.call(this,this.config.selectors.buttons.settings),captions:Wt.call(this,this.config.selectors.buttons.captions),fullscreen:Wt.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=Wt.call(this,this.config.selectors.progress),this.elements.inputs={seek:Wt.call(this,this.config.selectors.inputs.seek),volume:Wt.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:Wt.call(this,this.config.selectors.display.buffer),currentTime:Wt.call(this,this.config.selectors.display.currentTime),duration:Wt.call(this,this.config.selectors.display.duration)},zt(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(".".concat(this.config.classNames.tooltip))),!0}catch(t){return this.debug.warn("It looks like there is a problem with your custom controls HTML",t),this.toggleNativeControls(!0),!1}},createIcon:function(t,r){var e="http://www.w3.org/2000/svg",i=Ar.getIconUrl.call(this),o="".concat(i.cors?"":i.url,"#").concat(this.config.iconPrefix),n=document.createElementNS(e,"svg");Lt(n,Et(r,{"aria-hidden":"true",focusable:"false"}));var a=document.createElementNS(e,"use"),s="".concat(o,"-").concat(t);return"href"in a&&a.setAttributeNS("http://www.w3.org/1999/xlink","href",s),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s),n.appendChild(a),n},createLabel:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=zr(t,this.config);return Rt("span",a(a({},r),{},{class:[r.class,this.config.classNames.hidden].filter(Boolean).join(" ")}),e)},createBadge:function(t){if(Pt(t))return null;var r=Rt("span",{class:this.config.classNames.menu.value});return r.appendChild(Rt("span",{class:this.config.classNames.menu.badge},t)),r},createButton:function(t,r){var e=this,i=Et({},r),o=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return(t=wr(t)).charAt(0).toLowerCase()+t.slice(1)}(t),n={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach((function(t){Object.keys(i).includes(t)&&(n[t]=i[t],delete i[t])})),"button"!==n.element||Object.keys(i).includes("type")||(i.type="button"),Object.keys(i).includes("class")?i.class.split(" ").some((function(t){return t===e.config.classNames.control}))||Et(i,{class:"".concat(i.class," ").concat(this.config.classNames.control)}):i.class=this.config.classNames.control,t){case"play":n.toggle=!0,n.label="play",n.labelPressed="pause",n.icon="play",n.iconPressed="pause";break;case"mute":n.toggle=!0,n.label="mute",n.labelPressed="unmute",n.icon="volume",n.iconPressed="muted";break;case"captions":n.toggle=!0,n.label="enableCaptions",n.labelPressed="disableCaptions",n.icon="captions-off",n.iconPressed="captions-on";break;case"fullscreen":n.toggle=!0,n.label="enterFullscreen",n.labelPressed="exitFullscreen",n.icon="enter-fullscreen",n.iconPressed="exit-fullscreen";break;case"play-large":i.class+=" ".concat(this.config.classNames.control,"--overlaid"),o="play",n.label="play",n.icon="play";break;default:Pt(n.label)&&(n.label=o),Pt(n.icon)&&(n.icon=t)}var a=Rt(n.element);return n.toggle?(a.appendChild(Ar.createIcon.call(this,n.iconPressed,{class:"icon--pressed"})),a.appendChild(Ar.createIcon.call(this,n.icon,{class:"icon--not-pressed"})),a.appendChild(Ar.createLabel.call(this,n.labelPressed,{class:"label--pressed"})),a.appendChild(Ar.createLabel.call(this,n.label,{class:"label--not-pressed"}))):(a.appendChild(Ar.createIcon.call(this,n.icon)),a.appendChild(Ar.createLabel.call(this,n.label))),Et(i,qt(this.config.selectors.buttons[o],i)),Lt(a,i),"play"===o?(kt(this.elements.buttons[o])||(this.elements.buttons[o]=[]),this.elements.buttons[o].push(a)):this.elements.buttons[o]=a,a},createRange:function(t,r){var e=Rt("input",Et(qt(this.config.selectors.inputs[t]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":zr(t,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},r));return this.elements.inputs[t]=e,Ar.updateRangeFill.call(this,e),at.setup(e),e},createProgress:function(t,r){var e=Rt("progress",Et(qt(this.config.selectors.display[t]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},r));if("volume"!==t){e.appendChild(Rt("span",null,"0"));var i={played:"played",buffer:"buffered"}[t],o=i?zr(i,this.config):"";e.innerText="% ".concat(o.toLowerCase())}return this.elements.display[t]=e,e},createTime:function(t,r){var e=qt(this.config.selectors.display[t],r),i=Rt("div",Et(e,{class:"".concat(e.class?e.class:""," ").concat(this.config.classNames.display.time," ").trim(),"aria-label":zr(t,this.config)}),"00:00");return this.elements.display[t]=i,i},bindMenuItemShortcuts:function(t,r){var e=this;tr.call(this,t,"keydown keyup",(function(i){if([32,38,39,40].includes(i.which)&&(i.preventDefault(),i.stopPropagation(),"keydown"!==i.type)){var o,n=Qt(t,'[role="menuitemradio"]');!n&&[32,39].includes(i.which)?Ar.showMenuPanel.call(e,r,!0):32!==i.which&&(40===i.which||n&&39===i.which?zt(o=t.nextElementSibling)||(o=t.parentNode.firstElementChild):zt(o=t.previousElementSibling)||(o=t.parentNode.lastElementChild),Jt.call(e,o,!0))}}),!1),tr.call(this,t,"keyup",(function(t){13===t.which&&Ar.focusFirstMenuItem.call(e,null,!0)}))},createMenuItem:function(t){var r=this,e=t.value,i=t.list,o=t.type,n=t.title,a=t.badge,s=void 0===a?null:a,l=t.checked,p=void 0!==l&&l,u=qt(this.config.selectors.inputs[o]),d=Rt("button",Et(u,{type:"button",role:"menuitemradio",class:"".concat(this.config.classNames.control," ").concat(u.class?u.class:"").trim(),"aria-checked":p,value:e})),c=Rt("span");c.innerHTML=n,zt(s)&&c.appendChild(s),d.appendChild(c),Object.defineProperty(d,"checked",{enumerable:!0,get:function(){return"true"===d.getAttribute("aria-checked")},set:function(t){t&&Array.from(d.parentNode.children).filter((function(t){return Qt(t,'[role="menuitemradio"]')})).forEach((function(t){return t.setAttribute("aria-checked","false")})),d.setAttribute("aria-checked",t?"true":"false")}}),this.listeners.bind(d,"click keyup",(function(t){if(!Tt(t)||32===t.which){switch(t.preventDefault(),t.stopPropagation(),d.checked=!0,o){case"language":r.currentTrack=Number(e);break;case"quality":r.quality=e;break;case"speed":r.speed=parseFloat(e)}Ar.showMenuPanel.call(r,"home",Tt(t))}}),o,!1),Ar.bindMenuItemShortcuts.call(this,d,o),i.appendChild(d)},formatTime:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return gt(t)?Or(t,Cr(this.duration)>0,r):t},updateTimeDisplay:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];zt(t)&&gt(r)&&(t.innerText=Ar.formatTime(r,e))},updateVolume:function(){this.supported.ui&&(zt(this.elements.inputs.volume)&&Ar.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),zt(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;zt(t)&&(t.value=r,Ar.updateRangeFill.call(this,t))},updateProgress:function(t){var r=this;if(this.supported.ui&&jt(t)){var e=0;if(t)switch(t.type){case"timeupdate":case"seeking":case"seeked":e=function(t,r){return 0===t||0===r||Number.isNaN(t)||Number.isNaN(r)?0:(t/r*100).toFixed(2)}(this.currentTime,this.duration),"timeupdate"===t.type&&Ar.setRange.call(this,this.elements.inputs.seek,e);break;case"playing":case"progress":!function(t,e){var i=gt(e)?e:0,o=zt(t)?t:r.elements.display.buffer;if(zt(o)){o.value=i;var n=o.getElementsByTagName("span")[0];zt(n)&&(n.childNodes[0].nodeValue=i)}}(this.elements.display.buffer,100*this.buffered)}}},updateRangeFill:function(t){var r=jt(t)?t.target:t;if(zt(r)&&"range"===r.getAttribute("type")){if(Qt(r,this.config.selectors.inputs.seek)){r.setAttribute("aria-valuenow",this.currentTime);var e=Ar.formatTime(this.currentTime),i=Ar.formatTime(this.duration),o=zr("seekLabel",this.config);r.setAttribute("aria-valuetext",o.replace("{currentTime}",e).replace("{duration}",i))}else if(Qt(r,this.config.selectors.inputs.volume)){var n=100*r.value;r.setAttribute("aria-valuenow",n),r.setAttribute("aria-valuetext","".concat(n.toFixed(1),"%"))}else r.setAttribute("aria-valuenow",r.value);It.isWebkit&&r.style.setProperty("--value",r.value/r.max*100+"%")}},updateSeekTooltip:function(t){var r=this;if(this.config.tooltips.seek&&zt(this.elements.inputs.seek)&&zt(this.elements.display.seekTooltip)&&0!==this.duration){var e="".concat(this.config.classNames.tooltip,"--visible"),i=function(t){return Ht(r.elements.display.seekTooltip,e,t)};if(this.touch)i(!1);else{var o=0,n=this.elements.progress.getBoundingClientRect();if(jt(t))o=100/n.width*(t.pageX-n.left);else{if(!Ut(this.elements.display.seekTooltip,e))return;o=parseFloat(this.elements.display.seekTooltip.style.left,10)}o<0?o=0:o>100&&(o=100),Ar.updateTimeDisplay.call(this,this.elements.display.seekTooltip,this.duration/100*o),this.elements.display.seekTooltip.style.left="".concat(o,"%"),jt(t)&&["mouseenter","mouseleave"].includes(t.type)&&i("mouseenter"===t.type)}}},timeUpdate:function(t){var r=!zt(this.elements.display.duration)&&this.config.invertTime;Ar.updateTimeDisplay.call(this,this.elements.display.currentTime,r?this.duration-this.currentTime:this.currentTime,r),t&&"timeupdate"===t.type&&this.media.seeking||Ar.updateProgress.call(this,t)},durationUpdate:function(){if(this.supported.ui&&(this.config.invertTime||!this.currentTime)){if(this.duration>=Math.pow(2,32))return Vt(this.elements.display.currentTime,!0),void Vt(this.elements.progress,!0);zt(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);var t=zt(this.elements.display.duration);!t&&this.config.displayDuration&&this.paused&&Ar.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),t&&Ar.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),Ar.updateSeekTooltip.call(this)}},toggleMenuButton:function(t,r){Vt(this.elements.settings.buttons[t],!r)},updateSetting:function(t,r,e){var i=this.elements.settings.panels[t],o=null,n=r;if("captions"===t)o=this.currentTrack;else{if(o=Pt(e)?this[t]:e,Pt(o)&&(o=this.config[t].default),!Pt(this.options[t])&&!this.options[t].includes(o))return void this.debug.warn("Unsupported value of '".concat(o,"' for ").concat(t));if(!this.config[t].options.includes(o))return void this.debug.warn("Disabled value of '".concat(o,"' for ").concat(t))}if(zt(n)||(n=i&&i.querySelector('[role="menu"]')),zt(n)){this.elements.settings.buttons[t].querySelector(".".concat(this.config.classNames.menu.value)).innerHTML=Ar.getLabel.call(this,t,o);var a=n&&n.querySelector('[value="'.concat(o,'"]'));zt(a)&&(a.checked=!0)}},getLabel:function(t,r){switch(t){case"speed":return 1===r?zr("normal",this.config):"".concat(r,"&times;");case"quality":if(gt(r)){if(0===r)return zr("auto",this.config);var e=zr("qualityLabel.".concat(r),this.config);return e.length?e:"".concat(r,"p")}return br(r);case"captions":return Er.getLabel.call(this);default:return null}},setQualityMenu:function(t){var r=this;if(zt(this.elements.settings.panels.quality)){var e="quality",i=this.elements.settings.panels.quality.querySelector('[role="menu"]');kt(t)&&(this.options.quality=sr(t).filter((function(t){return r.config.quality.options.includes(t)})));var o=!Pt(this.options.quality)&&this.options.quality.length>1;if(Ar.toggleMenuButton.call(this,e,o),Dt(i),Ar.checkMenu.call(this),o){var n=function(t){var e=zr("qualityBadge.".concat(t),r.config);return e.length?Ar.createBadge.call(r,e):null};this.options.quality.sort((function(t,e){var i=r.config.quality.options;return i.indexOf(t)>i.indexOf(e)?1:-1})).forEach((function(t){Ar.createMenuItem.call(r,{value:t,list:i,type:e,title:Ar.getLabel.call(r,"quality",t),badge:n(t)})})),Ar.updateSetting.call(this,e,i)}}},setCaptionsMenu:function(){var t=this;if(zt(this.elements.settings.panels.captions)){var r="captions",e=this.elements.settings.panels.captions.querySelector('[role="menu"]'),i=Er.getTracks.call(this),o=Boolean(i.length);if(Ar.toggleMenuButton.call(this,r,o),Dt(e),Ar.checkMenu.call(this),o){var n=i.map((function(r,i){return{value:i,checked:t.captions.toggled&&t.currentTrack===i,title:Er.getLabel.call(t,r),badge:r.language&&Ar.createBadge.call(t,r.language.toUpperCase()),list:e,type:"language"}}));n.unshift({value:-1,checked:!this.captions.toggled,title:zr("disabled",this.config),list:e,type:"language"}),n.forEach(Ar.createMenuItem.bind(this)),Ar.updateSetting.call(this,r,e)}}},setSpeedMenu:function(){var t=this;if(zt(this.elements.settings.panels.speed)){var r="speed",e=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter((function(r){return r>=t.minimumSpeed&&r<=t.maximumSpeed}));var i=!Pt(this.options.speed)&&this.options.speed.length>1;Ar.toggleMenuButton.call(this,r,i),Dt(e),Ar.checkMenu.call(this),i&&(this.options.speed.forEach((function(i){Ar.createMenuItem.call(t,{value:i,list:e,type:r,title:Ar.getLabel.call(t,"speed",i)})})),Ar.updateSetting.call(this,r,e))}},checkMenu:function(){var t=this.elements.settings.buttons,r=!Pt(t)&&Object.values(t).some((function(t){return!t.hidden}));Vt(this.elements.settings.menu,!r)},focusFirstMenuItem:function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.elements.settings.popup.hidden){var e=t;zt(e)||(e=Object.values(this.elements.settings.panels).find((function(t){return!t.hidden})));var i=e.querySelector('[role^="menuitem"]');Jt.call(this,i,r)}},toggleMenu:function(t){var r=this.elements.settings.popup,e=this.elements.buttons.settings;if(zt(r)&&zt(e)){var i=r.hidden,o=i;if(bt(t))o=t;else if(Tt(t)&&27===t.which)o=!1;else if(jt(t)){var n=wt(t.composedPath)?t.composedPath()[0]:t.target,a=r.contains(n);if(a||!a&&t.target!==e&&o)return}e.setAttribute("aria-expanded",o),Vt(r,!o),Ht(this.elements.container,this.config.classNames.menu.open,o),o&&Tt(t)?Ar.focusFirstMenuItem.call(this,null,!0):o||i||Jt.call(this,e,Tt(t))}},getMenuSize:function(t){var r=t.cloneNode(!0);r.style.position="absolute",r.style.opacity=0,r.removeAttribute("hidden"),t.parentNode.appendChild(r);var e=r.scrollWidth,i=r.scrollHeight;return Bt(r),{width:e,height:i}},showMenuPanel:function(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.elements.container.querySelector("#plyr-settings-".concat(this.id,"-").concat(r));if(zt(i)){var o=i.parentNode,n=Array.from(o.children).find((function(t){return!t.hidden}));if(Kt.transitions&&!Kt.reducedMotion){o.style.width="".concat(n.scrollWidth,"px"),o.style.height="".concat(n.scrollHeight,"px");var a=Ar.getMenuSize.call(this,i),s=function r(e){e.target===o&&["width","height"].includes(e.propertyName)&&(o.style.width="",o.style.height="",rr.call(t,o,Ot,r))};tr.call(this,o,Ot,s),o.style.width="".concat(a.width,"px"),o.style.height="".concat(a.height,"px")}Vt(n,!0),Vt(i,!1),Ar.focusFirstMenuItem.call(this,i,e)}},setDownloadUrl:function(){var t=this.elements.buttons.download;zt(t)&&t.setAttribute("href",this.download)},create:function(t){var r=this,e=Ar.bindMenuItemShortcuts,i=Ar.createButton,o=Ar.createProgress,n=Ar.createRange,a=Ar.createTime,s=Ar.setQualityMenu,l=Ar.setSpeedMenu,p=Ar.showMenuPanel;this.elements.controls=null,kt(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(i.call(this,"play-large"));var u=Rt("div",qt(this.config.selectors.controls.wrapper));this.elements.controls=u;var d={class:"plyr__controls__item"};return sr(kt(this.config.controls)?this.config.controls:[]).forEach((function(s){if("restart"===s&&u.appendChild(i.call(r,"restart",d)),"rewind"===s&&u.appendChild(i.call(r,"rewind",d)),"play"===s&&u.appendChild(i.call(r,"play",d)),"fast-forward"===s&&u.appendChild(i.call(r,"fast-forward",d)),"progress"===s){var l=Rt("div",{class:"".concat(d.class," plyr__progress__container")}),c=Rt("div",qt(r.config.selectors.progress));if(c.appendChild(n.call(r,"seek",{id:"plyr-seek-".concat(t.id)})),c.appendChild(o.call(r,"buffer")),r.config.tooltips.seek){var h=Rt("span",{class:r.config.classNames.tooltip},"00:00");c.appendChild(h),r.elements.display.seekTooltip=h}r.elements.progress=c,l.appendChild(r.elements.progress),u.appendChild(l)}if("current-time"===s&&u.appendChild(a.call(r,"currentTime",d)),"duration"===s&&u.appendChild(a.call(r,"duration",d)),"mute"===s||"volume"===s){var y=r.elements.volume;zt(y)&&u.contains(y)||(y=Rt("div",Et({},d,{class:"".concat(d.class," plyr__volume").trim()})),r.elements.volume=y,u.appendChild(y)),"mute"===s&&y.appendChild(i.call(r,"mute")),"volume"!==s||It.isIos||y.appendChild(n.call(r,"volume",Et({max:1,step:.05,value:r.config.volume},{id:"plyr-volume-".concat(t.id)})))}if("captions"===s&&u.appendChild(i.call(r,"captions",d)),"settings"===s&&!Pt(r.config.settings)){var v=Rt("div",Et({},d,{class:"".concat(d.class," plyr__menu").trim(),hidden:""}));v.appendChild(i.call(r,"settings",{"aria-haspopup":!0,"aria-controls":"plyr-settings-".concat(t.id),"aria-expanded":!1}));var f=Rt("div",{class:"plyr__menu__container",id:"plyr-settings-".concat(t.id),hidden:""}),_=Rt("div"),g=Rt("div",{id:"plyr-settings-".concat(t.id,"-home")}),m=Rt("div",{role:"menu"});g.appendChild(m),_.appendChild(g),r.elements.settings.panels.home=g,r.config.settings.forEach((function(i){var o=Rt("button",Et(qt(r.config.selectors.buttons.settings),{type:"button",class:"".concat(r.config.classNames.control," ").concat(r.config.classNames.control,"--forward"),role:"menuitem","aria-haspopup":!0,hidden:""}));e.call(r,o,i),tr.call(r,o,"click",(function(){p.call(r,i,!1)}));var n=Rt("span",null,zr(i,r.config)),a=Rt("span",{class:r.config.classNames.menu.value});a.innerHTML=t[i],n.appendChild(a),o.appendChild(n),m.appendChild(o);var s=Rt("div",{id:"plyr-settings-".concat(t.id,"-").concat(i),hidden:""}),l=Rt("button",{type:"button",class:"".concat(r.config.classNames.control," ").concat(r.config.classNames.control,"--back")});l.appendChild(Rt("span",{"aria-hidden":!0},zr(i,r.config))),l.appendChild(Rt("span",{class:r.config.classNames.hidden},zr("menuBack",r.config))),tr.call(r,s,"keydown",(function(t){37===t.which&&(t.preventDefault(),t.stopPropagation(),p.call(r,"home",!0))}),!1),tr.call(r,l,"click",(function(){p.call(r,"home",!1)})),s.appendChild(l),s.appendChild(Rt("div",{role:"menu"})),_.appendChild(s),r.elements.settings.buttons[i]=o,r.elements.settings.panels[i]=s})),f.appendChild(_),v.appendChild(f),u.appendChild(v),r.elements.settings.popup=f,r.elements.settings.menu=v}if("pip"===s&&Kt.pip&&u.appendChild(i.call(r,"pip",d)),"airplay"===s&&Kt.airplay&&u.appendChild(i.call(r,"airplay",d)),"download"===s){var b=Et({},d,{element:"a",href:r.download,target:"_blank"});r.isHTML5&&(b.download=""),!Ct(r.config.urls.download)&&r.isEmbed&&Et(b,{icon:"logo-".concat(r.provider),label:r.provider}),u.appendChild(i.call(r,"download",b))}"fullscreen"===s&&u.appendChild(i.call(r,"fullscreen",d))})),this.isHTML5&&s.call(this,fr.getQualityOptions.call(this)),l.call(this),u},inject:function(){var t=this;if(this.config.loadSprite){var r=Ar.getIconUrl.call(this);r.cors&&Sr(r.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());var e=null;this.elements.controls=null;var i,o={id:this.id,seektime:this.config.seekTime,title:this.config.title},a=!0;if(wt(this.config.controls)&&(this.config.controls=this.config.controls.call(this,o)),this.config.controls||(this.config.controls=[]),zt(this.config.controls)||mt(this.config.controls)?e=this.config.controls:(e=Ar.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Er.getLabel.call(this)}),a=!1),a&&mt(this.config.controls)&&(e=function(t){var r=t;return Object.entries(o).forEach((function(t){var e=n(t,2),i=e[1];r=mr(r,"{".concat(e[0],"}"),i)})),r}(e)),mt(this.config.selectors.controls.container)&&(i=document.querySelector(this.config.selectors.controls.container)),zt(i)||(i=this.elements.container),i[zt(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),zt(this.elements.controls)||Ar.findElements.call(this),!Pt(this.elements.buttons)){var s=function(r){var e=t.config.classNames.controlPressed;Object.defineProperty(r,"pressed",{enumerable:!0,get:function(){return Ut(r,e)},set:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Ht(r,e,t)}})};Object.values(this.elements.buttons).filter(Boolean).forEach((function(t){kt(t)||xt(t)?Array.from(t).filter(Boolean).forEach(s):s(t)}))}if(It.isEdge&&At(i),this.config.tooltips.controls){var l=this.config,p=l.classNames,u=l.selectors,d="".concat(u.controls.wrapper," ").concat(u.labels," .").concat(p.hidden),c=Yt.call(this,d);Array.from(c).forEach((function(r){Ht(r,t.config.classNames.hidden,!1),Ht(r,t.config.classNames.tooltip,!0)}))}}};function Ir(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=t;if(r){var i=document.createElement("a");i.href=e,e=i.href}try{return new URL(e)}catch(t){return null}}function Mr(t){var r=new URLSearchParams;return _t(t)&&Object.entries(t).forEach((function(t){var e=n(t,2);r.set(e[0],e[1])})),r}var Er={setup:function(){if(this.supported.ui)if(!this.isVideo||this.isYouTube||this.isHTML5&&!Kt.textTracks)kt(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Ar.setCaptionsMenu.call(this);else{if(zt(this.elements.captions)||(this.elements.captions=Rt("div",qt(this.config.selectors.captions)),function(t,r){zt(t)&&zt(r)&&r.parentNode.insertBefore(t,r.nextSibling)}(this.elements.captions,this.elements.wrapper)),It.isIE&&window.URL){var t=this.media.querySelectorAll("track");Array.from(t).forEach((function(t){var r=t.getAttribute("src"),e=Ir(r);null!==e&&e.hostname!==window.location.href.hostname&&["http:","https:"].includes(e.protocol)&&Tr(r,"blob").then((function(r){t.setAttribute("src",window.URL.createObjectURL(r))})).catch((function(){Bt(t)}))}))}var r=sr((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map((function(t){return t.split("-")[0]}))),e=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();"auto"===e&&(e=n(r,1)[0]);var i=this.storage.get("captions");bt(i)||(i=this.config.captions.active),Object.assign(this.captions,{toggled:!1,active:i,language:e,languages:r}),this.isHTML5&&tr.call(this,this.media.textTracks,this.config.captions.update?"addtrack removetrack":"removetrack",Er.update.bind(this)),setTimeout(Er.update.bind(this),0)}},update:function(){var t=this,r=Er.getTracks.call(this,!0),e=this.captions,i=e.active,o=e.language,n=e.meta,a=e.currentTrackNode,s=Boolean(r.find((function(t){return t.language===o})));this.isHTML5&&this.isVideo&&r.filter((function(t){return!n.get(t)})).forEach((function(r){t.debug.log("Track added",r),n.set(r,{default:"showing"===r.mode}),"showing"===r.mode&&(r.mode="hidden"),tr.call(t,r,"cuechange",(function(){return Er.updateCues.call(t)}))})),(s&&this.language!==o||!r.includes(a))&&(Er.setLanguage.call(this,o),Er.toggle.call(this,i&&s)),this.elements&&Ht(this.elements.container,this.config.classNames.captions.enabled,!Pt(r)),kt(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Ar.setCaptionsMenu.call(this)},toggle:function(t){var r=this,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.supported.ui){var i=this.captions.toggled,o=this.config.classNames.captions.active,n=ft(t)?!i:t;if(n!==i){if(e||(this.captions.active=n,this.storage.set({captions:n})),!this.language&&n&&!e){var a=Er.getTracks.call(this),s=Er.findTrack.call(this,[this.captions.language].concat(d(this.captions.languages)),!0);return this.captions.language=s.language,void Er.set.call(this,a.indexOf(s))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=n),Ht(this.elements.container,o,n),this.captions.toggled=n,Ar.updateSetting.call(this,"captions"),ir.call(this,this.media,n?"captionsenabled":"captionsdisabled")}setTimeout((function(){n&&r.captions.toggled&&r.captions.currentTrackNode&&(r.captions.currentTrackNode.mode="hidden")}))}},set:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=Er.getTracks.call(this);if(-1!==t)if(gt(t))if(t in e){if(this.captions.currentTrack!==t){this.captions.currentTrack=t;var i=e[t],o=i||{},n=o.language;this.captions.currentTrackNode=i,Ar.updateSetting.call(this,"captions"),r||(this.captions.language=n,this.storage.set({language:n})),this.isVimeo&&this.embed.enableTextTrack(n),ir.call(this,this.media,"languagechange")}Er.toggle.call(this,!0,r),this.isHTML5&&this.isVideo&&Er.updateCues.call(this)}else this.debug.warn("Track not found",t);else this.debug.warn("Invalid caption argument",t);else Er.toggle.call(this,!1,r)},setLanguage:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(mt(t)){var e=t.toLowerCase();this.captions.language=e;var i=Er.getTracks.call(this),o=Er.findTrack.call(this,[e]);Er.set.call(this,i.indexOf(o),r)}else this.debug.warn("Invalid language argument",t)},getTracks:function(){var t=this,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Array.from((this.media||{}).textTracks||[]).filter((function(e){return!t.isHTML5||r||t.captions.meta.has(e)})).filter((function(t){return["captions","subtitles"].includes(t.kind)}))},findTrack:function(t){var r,e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=Er.getTracks.call(this),n=function(t){return Number((e.captions.meta.get(t)||{}).default)},a=Array.from(o).sort((function(t,r){return n(r)-n(t)}));return t.every((function(t){return!(r=a.find((function(r){return r.language===t})))})),r||(i?a[0]:void 0)},getCurrentTrack:function(){return Er.getTracks.call(this)[this.currentTrack]},getLabel:function(t){var r=t;return!St(r)&&Kt.textTracks&&this.captions.toggled&&(r=Er.getCurrentTrack.call(this)),St(r)?Pt(r.label)?Pt(r.language)?zr("enabled",this.config):t.language.toUpperCase():r.label:zr("disabled",this.config)},updateCues:function(t){if(this.supported.ui)if(zt(this.elements.captions))if(ft(t)||Array.isArray(t)){var r=t;if(!r){var e=Er.getCurrentTrack.call(this);r=Array.from((e||{}).activeCues||[]).map((function(t){return t.getCueAsHTML()})).map(kr)}var i=r.map((function(t){return t.trim()})).join("\n");if(i!==this.elements.captions.innerHTML){Dt(this.elements.captions);var o=Rt("span",qt(this.config.selectors.caption));o.innerHTML=i,this.elements.captions.appendChild(o),ir.call(this,this.media,"cuechange")}}else this.debug.warn("updateCues: Invalid input",t);else this.debug.warn("No captions element to render to")}},Fr={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.6.9/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"},auto:"AUTO"},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isIos:"plyr--is-ios",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},tabFocus:"plyr__tab-focus",previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1}},Lr={html5:"html5",youtube:"youtube",vimeo:"vimeo"},Rr=function(){},Nr=function(){function t(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];u(this,t),this.enabled=window.console&&r,this.enabled&&this.log("Debugging enabled")}return l(t,[{key:"log",get:function(){return this.enabled?Function.prototype.bind.call(console.log,console):Rr}},{key:"warn",get:function(){return this.enabled?Function.prototype.bind.call(console.warn,console):Rr}},{key:"error",get:function(){return this.enabled?Function.prototype.bind.call(console.error,console):Rr}}]),t}(),Br=function(){function t(r){var e=this;u(this,t),B(this,"onChange",(function(){if(e.enabled){var t=e.player.elements.buttons.fullscreen;zt(t)&&(t.pressed=e.active),ir.call(e.player,e.target===e.player.media?e.target:e.player.elements.container,e.active?"enterfullscreen":"exitfullscreen",!0)}})),B(this,"toggleFallback",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t?e.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(e.scrollPosition.x,e.scrollPosition.y),document.body.style.overflow=t?"hidden":"",Ht(e.target,e.player.config.classNames.fullscreen.fallback,t),It.isIos){var r=document.head.querySelector('meta[name="viewport"]'),i="viewport-fit=cover";r||(r=document.createElement("meta")).setAttribute("name","viewport");var o=mt(r.content)&&r.content.includes(i);t?(e.cleanupViewport=!o,o||(r.content+=",".concat(i))):e.cleanupViewport&&(r.content=r.content.split(",").filter((function(t){return t.trim()!==i})).join(","))}e.onChange()})),B(this,"trapFocus",(function(t){if(!It.isIos&&e.active&&"Tab"===t.key&&9===t.keyCode){var r=document.activeElement,i=Yt.call(e.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),o=n(i,1)[0],a=i[i.length-1];r!==a||t.shiftKey?r===o&&t.shiftKey&&(a.focus(),t.preventDefault()):(o.focus(),t.preventDefault())}})),B(this,"update",(function(){e.player.debug.log(e.enabled?"".concat(e.forceFallback?"Fallback (forced)":t.native?"Native":"Fallback"," fullscreen enabled"):"Fullscreen not supported and fallback disabled"),Ht(e.player.elements.container,e.player.config.classNames.fullscreen.enabled,e.enabled)})),B(this,"enter",(function(){e.enabled&&(It.isIos&&e.player.config.fullscreen.iosNative?e.player.isVimeo?e.player.embed.requestFullscreen():e.target.webkitEnterFullscreen():!t.native||e.forceFallback?e.toggleFallback(!0):e.prefix?Pt(e.prefix)||e.target["".concat(e.prefix,"Request").concat(e.property)]():e.target.requestFullscreen({navigationUI:"hide"}))})),B(this,"exit",(function(){if(e.enabled)if(It.isIos&&e.player.config.fullscreen.iosNative)e.target.webkitExitFullscreen(),ar(e.player.play());else if(!t.native||e.forceFallback)e.toggleFallback(!1);else if(e.prefix){if(!Pt(e.prefix)){var r="moz"===e.prefix?"Cancel":"Exit";document["".concat(e.prefix).concat(r).concat(e.property)]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)})),B(this,"toggle",(function(){e.active?e.exit():e.enter()})),this.player=r,this.prefix=t.prefix,this.property=t.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===r.config.fullscreen.fallback,this.player.elements.fullscreen=r.config.fullscreen.container&&function(t,r){return(Element.prototype.closest||function(){var t=this;do{if(Qt.matches(t,r))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}).call(t,r)}(this.player.elements.container,r.config.fullscreen.container),tr.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":"".concat(this.prefix,"fullscreenchange"),(function(){e.onChange()})),tr.call(this.player,this.player.elements.container,"dblclick",(function(t){zt(e.player.elements.controls)&&e.player.elements.controls.contains(t.target)||e.player.listeners.proxy(t,e.toggle,"fullscreen")})),tr.call(this,this.player.elements.container,"keydown",(function(t){return e.trapFocus(t)})),this.update()}return l(t,[{key:"usingNative",get:function(){return t.native&&!this.forceFallback}},{key:"enabled",get:function(){return(t.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}},{key:"active",get:function(){if(!this.enabled)return!1;if(!t.native||this.forceFallback)return Ut(this.target,this.player.config.classNames.fullscreen.fallback);var r=this.prefix?this.target.getRootNode()["".concat(this.prefix).concat(this.property,"Element")]:this.target.getRootNode().fullscreenElement;return r&&r.shadowRoot?r===this.target.getRootNode().host:r===this.target}},{key:"target",get:function(){return It.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen||this.player.elements.container}}],[{key:"native",get:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},{key:"prefix",get:function(){if(wt(document.exitFullscreen))return"";var t="";return["webkit","moz","ms"].some((function(r){return!(!wt(document["".concat(r,"ExitFullscreen")])&&!wt(document["".concat(r,"CancelFullScreen")])||(t=r,0))})),t}},{key:"property",get:function(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}}]),t}();function Dr(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new Promise((function(e,i){var o=new Image,n=function(){delete o.onload,delete o.onerror,(o.naturalWidth>=r?e:i)(o)};Object.assign(o,{onload:n,onerror:n,src:t})}))}var $r={addStyleHook:function(){Ht(this.elements.container,this.config.selectors.container.replace(".",""),!0),Ht(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build:function(){var t=this;if(this.listeners.media(),!this.supported.ui)return this.debug.warn("Basic support only for ".concat(this.provider," ").concat(this.type)),void $r.toggleNativeControls.call(this,!0);zt(this.elements.controls)||(Ar.inject.call(this),this.listeners.controls()),$r.toggleNativeControls.call(this),this.isHTML5&&Er.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,Ar.updateVolume.call(this),Ar.timeUpdate.call(this),Ar.durationUpdate.call(this),$r.checkPlaying.call(this),Ht(this.elements.container,this.config.classNames.pip.supported,Kt.pip&&this.isHTML5&&this.isVideo),Ht(this.elements.container,this.config.classNames.airplay.supported,Kt.airplay&&this.isHTML5),Ht(this.elements.container,this.config.classNames.isIos,It.isIos),Ht(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout((function(){ir.call(t,t.media,"ready")}),0),$r.setTitle.call(this),this.poster&&$r.setPoster.call(this,this.poster,!1).catch((function(){})),this.config.duration&&Ar.durationUpdate.call(this)},setTitle:function(){var t=zr("play",this.config);if(mt(this.config.title)&&!Pt(this.config.title)&&(t+=", ".concat(this.config.title)),Array.from(this.elements.buttons.play||[]).forEach((function(r){r.setAttribute("aria-label",t)})),this.isEmbed){var r=Wt.call(this,"iframe");if(!zt(r))return;var e=Pt(this.config.title)?"video":this.config.title,i=zr("frameTitle",this.config);r.setAttribute("title",i.replace("{title}",e))}},togglePoster:function(t){Ht(this.elements.container,this.config.classNames.posterEnabled,t)},setPoster:function(t){var r=this,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",t),this.elements.poster.removeAttribute("hidden"),nr.call(this).then((function(){return Dr(t)})).catch((function(e){throw t===r.poster&&$r.togglePoster.call(r,!1),e})).then((function(){if(t!==r.poster)throw new Error("setPoster cancelled by later call to setPoster")})).then((function(){return Object.assign(r.elements.poster.style,{backgroundImage:"url('".concat(t,"')"),backgroundSize:""}),$r.togglePoster.call(r,!0),t})))},checkPlaying:function(t){var r=this;Ht(this.elements.container,this.config.classNames.playing,this.playing),Ht(this.elements.container,this.config.classNames.paused,this.paused),Ht(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach((function(t){Object.assign(t,{pressed:r.playing}),t.setAttribute("aria-label",zr(r.playing?"pause":"play",r.config))})),jt(t)&&"timeupdate"===t.type||$r.toggleControls.call(this)},checkLoading:function(t){var r=this;this.loading=["stalled","waiting"].includes(t.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout((function(){Ht(r.elements.container,r.config.classNames.loading,r.loading),$r.toggleControls.call(r)}),this.loading?250:0)},toggleControls:function(t){var r=this.elements.controls;if(r&&this.config.hideControls){var e=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(t||this.loading||this.paused||r.pressed||r.hover||e))}},migrateStyles:function(){var t=this;Object.values(a({},this.media.style)).filter((function(t){return!Pt(t)&&mt(t)&&t.startsWith("--plyr")})).forEach((function(r){t.elements.container.style.setProperty(r,t.media.style.getPropertyValue(r)),t.media.style.removeProperty(r)})),Pt(this.media.style)&&this.media.removeAttribute("style")}},qr=function(){function t(r){var e=this;u(this,t),B(this,"firstTouch",(function(){var t=e.player,r=t.elements;t.touch=!0,Ht(r.container,t.config.classNames.isTouch,!0)})),B(this,"setTabFocus",(function(t){var r=e.player,i=r.elements;clearTimeout(e.focusTimer),("keydown"!==t.type||9===t.which)&&("keydown"===t.type&&(e.lastKeyDown=t.timeStamp),("focus"!==t.type||t.timeStamp-e.lastKeyDown<=20)&&(function(){var t=r.config.classNames.tabFocus;Ht(Yt.call(r,".".concat(t)),t,!1)}(),"focusout"!==t.type&&(e.focusTimer=setTimeout((function(){var t=document.activeElement;i.container.contains(t)&&Ht(document.activeElement,r.config.classNames.tabFocus,!0)}),10))))})),B(this,"global",(function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=e.player;r.config.keyboard.global&&Zt.call(r,window,"keydown keyup",e.handleKey,t,!1),Zt.call(r,document.body,"click",e.toggleMenu,t),er.call(r,document.body,"touchstart",e.firstTouch),Zt.call(r,document.body,"keydown focus blur focusout",e.setTabFocus,t,!1,!0)})),B(this,"container",(function(){var t=e.player,r=t.config,i=t.elements,o=t.timers;!r.keyboard.global&&r.keyboard.focused&&tr.call(t,i.container,"keydown keyup",e.handleKey,!1),tr.call(t,i.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",(function(r){var e=i.controls;e&&"enterfullscreen"===r.type&&(e.pressed=!1,e.hover=!1);var n=0;["touchstart","touchmove","mousemove"].includes(r.type)&&($r.toggleControls.call(t,!0),n=t.touch?3e3:2e3),clearTimeout(o.controls),o.controls=setTimeout((function(){return $r.toggleControls.call(t,!1)}),n)}));var a=function(){if(t.isVimeo&&!t.config.vimeo.premium){var r=i.wrapper,e=t.fullscreen.active,o=hr.call(t),a=n(o,2),s=a[0],l=a[1],p=pr("aspect-ratio: ".concat(s," / ").concat(l));if(e){var u=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],d=n(u,2),c=d[1],h=d[0]/c>s/l;p?(r.style.width=h?"auto":"100%",r.style.height=h?"100%":"auto"):(r.style.maxWidth=h?c/l*s+"px":null,r.style.margin=h?"0 auto":null)}else p?(r.style.width=null,r.style.height=null):(r.style.maxWidth=null,r.style.margin=null)}},s=function(){clearTimeout(o.resized),o.resized=setTimeout(a,50)};tr.call(t,i.container,"enterfullscreen exitfullscreen",(function(r){t.fullscreen.target===i.container&&(!t.isEmbed&&Pt(t.config.ratio)||(a(),("enterfullscreen"===r.type?tr:rr).call(t,window,"resize",s)))}))})),B(this,"media",(function(){var t=e.player,r=t.elements;if(tr.call(t,t.media,"timeupdate seeking seeked",(function(r){return Ar.timeUpdate.call(t,r)})),tr.call(t,t.media,"durationchange loadeddata loadedmetadata",(function(r){return Ar.durationUpdate.call(t,r)})),tr.call(t,t.media,"ended",(function(){t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())})),tr.call(t,t.media,"progress playing seeking seeked",(function(r){return Ar.updateProgress.call(t,r)})),tr.call(t,t.media,"volumechange",(function(r){return Ar.updateVolume.call(t,r)})),tr.call(t,t.media,"playing play pause ended emptied timeupdate",(function(r){return $r.checkPlaying.call(t,r)})),tr.call(t,t.media,"waiting canplay seeked playing",(function(r){return $r.checkLoading.call(t,r)})),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){var i=Wt.call(t,".".concat(t.config.classNames.video));if(!zt(i))return;tr.call(t,r.container,"click",(function(o){([r.container,i].includes(o.target)||i.contains(o.target))&&(t.touch&&t.config.hideControls||(t.ended?(e.proxy(o,t.restart,"restart"),e.proxy(o,(function(){ar(t.play())}),"play")):e.proxy(o,(function(){ar(t.togglePlay())}),"play")))}))}t.supported.ui&&t.config.disableContextMenu&&tr.call(t,r.wrapper,"contextmenu",(function(t){t.preventDefault()}),!1),tr.call(t,t.media,"volumechange",(function(){t.storage.set({volume:t.volume,muted:t.muted})})),tr.call(t,t.media,"ratechange",(function(){Ar.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})})),tr.call(t,t.media,"qualitychange",(function(r){Ar.updateSetting.call(t,"quality",null,r.detail.quality)})),tr.call(t,t.media,"ready qualitychange",(function(){Ar.setDownloadUrl.call(t)}));var o=t.config.events.concat(["keyup","keydown"]).join(" ");tr.call(t,t.media,o,(function(e){var i=e.detail,o=void 0===i?{}:i;"error"===e.type&&(o=t.media.error),ir.call(t,r.container,e.type,!0,o)}))})),B(this,"proxy",(function(t,r,i){var o=e.player,n=o.config.listeners[i],a=!0;wt(n)&&(a=n.call(o,t)),!1!==a&&wt(r)&&r.call(o,t)})),B(this,"bind",(function(t,r,i,o){var n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=e.player,s=a.config.listeners[o],l=wt(s);tr.call(a,t,r,(function(t){return e.proxy(t,i,o)}),n&&!l)})),B(this,"controls",(function(){var t=e.player,r=t.elements,i=It.isIE?"change":"input";if(r.buttons.play&&Array.from(r.buttons.play).forEach((function(r){e.bind(r,"click",(function(){ar(t.togglePlay())}),"play")})),e.bind(r.buttons.restart,"click",t.restart,"restart"),e.bind(r.buttons.rewind,"click",(function(){t.lastSeekTime=Date.now(),t.rewind()}),"rewind"),e.bind(r.buttons.fastForward,"click",(function(){t.lastSeekTime=Date.now(),t.forward()}),"fastForward"),e.bind(r.buttons.mute,"click",(function(){t.muted=!t.muted}),"mute"),e.bind(r.buttons.captions,"click",(function(){return t.toggleCaptions()})),e.bind(r.buttons.download,"click",(function(){ir.call(t,t.media,"download")}),"download"),e.bind(r.buttons.fullscreen,"click",(function(){t.fullscreen.toggle()}),"fullscreen"),e.bind(r.buttons.pip,"click",(function(){t.pip="toggle"}),"pip"),e.bind(r.buttons.airplay,"click",t.airplay,"airplay"),e.bind(r.buttons.settings,"click",(function(r){r.stopPropagation(),r.preventDefault(),Ar.toggleMenu.call(t,r)}),null,!1),e.bind(r.buttons.settings,"keyup",(function(r){var e=r.which;[13,32].includes(e)&&(13!==e?(r.preventDefault(),r.stopPropagation(),Ar.toggleMenu.call(t,r)):Ar.focusFirstMenuItem.call(t,null,!0))}),null,!1),e.bind(r.settings.menu,"keydown",(function(r){27===r.which&&Ar.toggleMenu.call(t,r)})),e.bind(r.inputs.seek,"mousedown mousemove",(function(t){var e=r.progress.getBoundingClientRect();t.currentTarget.setAttribute("seek-value",100/e.width*(t.pageX-e.left))})),e.bind(r.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",(function(r){var e=r.currentTarget,i=r.keyCode?r.keyCode:r.which,o="play-on-seeked";if(!Tt(r)||39===i||37===i){t.lastSeekTime=Date.now();var n=e.hasAttribute(o),a=["mouseup","touchend","keyup"].includes(r.type);n&&a?(e.removeAttribute(o),ar(t.play())):!a&&t.playing&&(e.setAttribute(o,""),t.pause())}})),It.isIos){var o=Yt.call(t,'input[type="range"]');Array.from(o).forEach((function(t){return e.bind(t,i,(function(t){return At(t.target)}))}))}e.bind(r.inputs.seek,i,(function(r){var e=r.currentTarget,i=e.getAttribute("seek-value");Pt(i)&&(i=e.value),e.removeAttribute("seek-value"),t.currentTime=i/e.max*t.duration}),"seek"),e.bind(r.progress,"mouseenter mouseleave mousemove",(function(r){return Ar.updateSeekTooltip.call(t,r)})),e.bind(r.progress,"mousemove touchmove",(function(r){var e=t.previewThumbnails;e&&e.loaded&&e.startMove(r)})),e.bind(r.progress,"mouseleave touchend click",(function(){var r=t.previewThumbnails;r&&r.loaded&&r.endMove(!1,!0)})),e.bind(r.progress,"mousedown touchstart",(function(r){var e=t.previewThumbnails;e&&e.loaded&&e.startScrubbing(r)})),e.bind(r.progress,"mouseup touchend",(function(r){var e=t.previewThumbnails;e&&e.loaded&&e.endScrubbing(r)})),It.isWebkit&&Array.from(Yt.call(t,'input[type="range"]')).forEach((function(r){e.bind(r,"input",(function(r){return Ar.updateRangeFill.call(t,r.target)}))})),t.config.toggleInvert&&!zt(r.display.duration)&&e.bind(r.display.currentTime,"click",(function(){0!==t.currentTime&&(t.config.invertTime=!t.config.invertTime,Ar.timeUpdate.call(t))})),e.bind(r.inputs.volume,i,(function(r){t.volume=r.target.value}),"volume"),e.bind(r.controls,"mouseenter mouseleave",(function(e){r.controls.hover=!t.touch&&"mouseenter"===e.type})),r.fullscreen&&Array.from(r.fullscreen.children).filter((function(t){return!t.contains(r.container)})).forEach((function(i){e.bind(i,"mouseenter mouseleave",(function(e){r.controls&&(r.controls.hover=!t.touch&&"mouseenter"===e.type)}))})),e.bind(r.controls,"mousedown mouseup touchstart touchend touchcancel",(function(t){r.controls.pressed=["mousedown","touchstart"].includes(t.type)})),e.bind(r.controls,"focusin",(function(){var i=t.config,o=t.timers;Ht(r.controls,i.classNames.noTransition,!0),$r.toggleControls.call(t,!0),setTimeout((function(){Ht(r.controls,i.classNames.noTransition,!1)}),0);var n=e.touch?3e3:4e3;clearTimeout(o.controls),o.controls=setTimeout((function(){return $r.toggleControls.call(t,!1)}),n)})),e.bind(r.inputs.volume,"wheel",(function(r){var e=r.webkitDirectionInvertedFromDevice,i=[r.deltaX,-r.deltaY].map((function(t){return e?-t:t})),o=n(i,2),a=o[0],s=o[1],l=Math.sign(Math.abs(a)>Math.abs(s)?a:s);t.increaseVolume(l/50);var p=t.media.volume;(1===l&&p<1||-1===l&&p>0)&&r.preventDefault()}),"volume",!1)})),this.player=r,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.setTabFocus=this.setTabFocus.bind(this),this.firstTouch=this.firstTouch.bind(this)}return l(t,[{key:"handleKey",value:function(t){var r=this.player,e=r.elements,i=t.keyCode?t.keyCode:t.which,o="keydown"===t.type,n=o&&i===this.lastKey;if(!(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)&&gt(i))if(o){var a=document.activeElement;if(zt(a)){if(a!==e.inputs.seek&&Qt(a,r.config.selectors.editable))return;if(32===t.which&&Qt(a,'button, [role^="menuitem"]'))return}switch([32,37,38,39,40,48,49,50,51,52,53,54,56,57,67,70,73,75,76,77,79].includes(i)&&(t.preventDefault(),t.stopPropagation()),i){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:n||(r.currentTime=r.duration/10*(i-48));break;case 32:case 75:n||ar(r.togglePlay());break;case 38:r.increaseVolume(.1);break;case 40:r.decreaseVolume(.1);break;case 77:n||(r.muted=!r.muted);break;case 39:r.forward();break;case 37:r.rewind();break;case 70:r.fullscreen.toggle();break;case 67:n||r.toggleCaptions();break;case 76:r.loop=!r.loop}27===i&&!r.fullscreen.usingNative&&r.fullscreen.active&&r.fullscreen.toggle(),this.lastKey=i}else this.lastKey=null}},{key:"toggleMenu",value:function(t){Ar.toggleMenu.call(this.player,t)}}]),t}(),Vr=function(t,r){return function(t){t.exports=function(){var t=function(){},r={},e={},i={};function o(t,r){if(t){var o=i[t];if(e[t]=r,o)for(;o.length;)o[0](t,r),o.splice(0,1)}}function n(r,e){r.call&&(r={success:r}),e.length?(r.error||t)(e):(r.success||t)(r)}function a(r,e,i,o){var n,s,l=document,p=i.async,u=(i.numRetries||0)+1,d=i.before||t,c=r.replace(/[\?|#].*$/,""),h=r.replace(/^(css|img)!/,"");o=o||0,/(^css!|\.css$)/.test(c)?((s=l.createElement("link")).rel="stylesheet",s.href=h,(n="hideFocus"in s)&&s.relList&&(n=0,s.rel="preload",s.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(c)?(s=l.createElement("img")).src=h:((s=l.createElement("script")).src=r,s.async=void 0===p||p),s.onload=s.onerror=s.onbeforeload=function(t){var l=t.type[0];if(n)try{s.sheet.cssText.length||(l="e")}catch(t){18!=t.code&&(l="e")}if("e"==l){if((o+=1)<u)return a(r,e,i,o)}else if("preload"==s.rel&&"style"==s.as)return s.rel="stylesheet";e(r,l,t.defaultPrevented)},!1!==d(r,s)&&l.head.appendChild(s)}function s(t,r,e){var i,o,n=(t=t.push?t:[t]).length,s=n,l=[];for(i=function(t,e,i){if("e"==e&&l.push(t),"b"==e){if(!i)return;l.push(t)}--n||r(l)},o=0;o<s;o++)a(t[o],i,e)}function l(t,e,i){var a,l;if(e&&e.trim&&(a=e),l=(a?i:e)||{},a){if(a in r)throw"LoadJS";r[a]=!0}function p(r,e){s(t,(function(t){n(l,t),r&&n({success:r,error:e},t),o(a,t)}),l)}if(l.returnPromise)return new Promise(p);p()}return l.ready=function(t,r){return function(t,r){var o,n,a,s=[],l=(t=t.push?t:[t]).length,p=l;for(o=function(t,e){e.length&&s.push(t),--p||r(s)};l--;)(a=e[n=t[l]])?o(n,a):(i[n]=i[n]||[]).push(o)}(t,(function(t){n(r,t)})),l},l.done=function(t){o(t,[])},l.reset=function(){r={},e={},i={}},l.isDefined=function(t){return t in r},l}()}(r={exports:{}}),r.exports}();function Hr(t){return new Promise((function(r,e){Vr(t,{success:r,error:e})}))}function Ur(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,ir.call(this,this.media,t?"play":"pause"))}var Qr={setup:function(){var t=this;Ht(t.elements.wrapper,t.config.classNames.embed,!0),t.options.speed=t.config.speed.options,yr.call(t),_t(window.Vimeo)?Qr.ready.call(t):Hr(t.config.urls.vimeo.sdk).then((function(){Qr.ready.call(t)})).catch((function(r){t.debug.warn("Vimeo SDK (player.js) failed to load",r)}))},ready:function(){var t=this,r=this,e=r.config.vimeo,i=e.premium,o=e.referrerPolicy,s=c(e,N),l=r.media.getAttribute("src"),p="";Pt(l)?(l=r.media.getAttribute(r.config.attributes.embed.id),p=r.media.getAttribute(r.config.attributes.embed.hash)):p=function(t){var r=t.match(h(/^.*(?:vimeo.com\/|video\/)(?:[0-9]+)(?:\?.*&*h=|\/)+([,0-9a-f]+)/,{hash:1}));return r?r.groups.hash:null}(l);var u=p?{h:p}:{};i&&Object.assign(s,{controls:!1,sidedock:!1});var d=Mr(a(a({loop:r.config.loop.active,autoplay:r.autoplay,muted:r.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative},u),s)),y=function(t){return Pt(t)?null:gt(Number(t))?t:t.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:t}(l),v=Rt("iframe"),f=gr(r.config.urls.vimeo.iframe,y,d);if(v.setAttribute("src",f),v.setAttribute("allowfullscreen",""),v.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),Pt(o)||v.setAttribute("referrerPolicy",o),i||!e.customControls)v.setAttribute("data-poster",r.poster),r.media=$t(v,r.media);else{var _=Rt("div",{class:r.config.classNames.embedContainer,"data-poster":r.poster});_.appendChild(v),r.media=$t(_,r.media)}e.customControls||Tr(gr(r.config.urls.vimeo.api,f)).then((function(t){!Pt(t)&&t.thumbnail_url&&$r.setPoster.call(r,t.thumbnail_url).catch((function(){}))})),r.embed=new window.Vimeo.Player(v,{autopause:r.config.autopause,muted:r.muted}),r.media.paused=!0,r.media.currentTime=0,r.supported.ui&&r.embed.disableTextTrack(),r.media.play=function(){return Ur.call(r,!0),r.embed.play()},r.media.pause=function(){return Ur.call(r,!1),r.embed.pause()},r.media.stop=function(){r.pause(),r.currentTime=0};var g=r.media.currentTime;Object.defineProperty(r.media,"currentTime",{get:function(){return g},set:function(t){var e=r.embed,i=r.media,o=r.volume,n=r.paused&&!e.hasPlayed;i.seeking=!0,ir.call(r,i,"seeking"),Promise.resolve(n&&e.setVolume(0)).then((function(){return e.setCurrentTime(t)})).then((function(){return n&&e.pause()})).then((function(){return n&&e.setVolume(o)})).catch((function(){}))}});var m=r.config.speed.selected;Object.defineProperty(r.media,"playbackRate",{get:function(){return m},set:function(t){r.embed.setPlaybackRate(t).then((function(){m=t,ir.call(r,r.media,"ratechange")})).catch((function(){r.options.speed=[1]}))}});var b=r.config.volume;Object.defineProperty(r.media,"volume",{get:function(){return b},set:function(t){r.embed.setVolume(t).then((function(){b=t,ir.call(r,r.media,"volumechange")}))}});var w=r.config.muted;Object.defineProperty(r.media,"muted",{get:function(){return w},set:function(t){var e=!!bt(t)&&t;r.embed.setVolume(e?0:r.config.volume).then((function(){w=e,ir.call(r,r.media,"volumechange")}))}});var k,x=r.config.loop;Object.defineProperty(r.media,"loop",{get:function(){return x},set:function(t){var e=bt(t)?t:r.config.loop.active;r.embed.setLoop(e).then((function(){x=e}))}}),r.embed.getVideoUrl().then((function(t){k=t,Ar.setDownloadUrl.call(r)})).catch((function(r){t.debug.warn(r)})),Object.defineProperty(r.media,"currentSrc",{get:function(){return k}}),Object.defineProperty(r.media,"ended",{get:function(){return r.currentTime===r.duration}}),Promise.all([r.embed.getVideoWidth(),r.embed.getVideoHeight()]).then((function(e){var i=n(e,2);r.embed.ratio=vr(i[0],i[1]),yr.call(t)})),r.embed.setAutopause(r.config.autopause).then((function(t){r.config.autopause=t})),r.embed.getVideoTitle().then((function(e){r.config.title=e,$r.setTitle.call(t)})),r.embed.getCurrentTime().then((function(t){g=t,ir.call(r,r.media,"timeupdate")})),r.embed.getDuration().then((function(t){r.media.duration=t,ir.call(r,r.media,"durationchange")})),r.embed.getTextTracks().then((function(t){r.media.textTracks=t,Er.setup.call(r)})),r.embed.on("cuechange",(function(t){var e=t.cues,i=(void 0===e?[]:e).map((function(t){return function(t){var r=document.createDocumentFragment(),e=document.createElement("div");return r.appendChild(e),e.innerHTML=t,r.firstChild.innerText}(t.text)}));Er.updateCues.call(r,i)})),r.embed.on("loaded",(function(){r.embed.getPaused().then((function(t){Ur.call(r,!t),t||ir.call(r,r.media,"playing")})),zt(r.embed.element)&&r.supported.ui&&r.embed.element.setAttribute("tabindex",-1)})),r.embed.on("bufferstart",(function(){ir.call(r,r.media,"waiting")})),r.embed.on("bufferend",(function(){ir.call(r,r.media,"playing")})),r.embed.on("play",(function(){Ur.call(r,!0),ir.call(r,r.media,"playing")})),r.embed.on("pause",(function(){Ur.call(r,!1)})),r.embed.on("timeupdate",(function(t){r.media.seeking=!1,g=t.seconds,ir.call(r,r.media,"timeupdate")})),r.embed.on("progress",(function(t){r.media.buffered=t.percent,ir.call(r,r.media,"progress"),1===parseInt(t.percent,10)&&ir.call(r,r.media,"canplaythrough"),r.embed.getDuration().then((function(t){t!==r.media.duration&&(r.media.duration=t,ir.call(r,r.media,"durationchange"))}))})),r.embed.on("seeked",(function(){r.media.seeking=!1,ir.call(r,r.media,"seeked")})),r.embed.on("ended",(function(){r.media.paused=!0,ir.call(r,r.media,"ended")})),r.embed.on("error",(function(t){r.media.error=t,ir.call(r,r.media,"error")})),e.customControls&&setTimeout((function(){return $r.build.call(r)}),0)}};function Yr(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,ir.call(this,this.media,t?"play":"pause"))}function Wr(t){return t.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0}var Jr,Gr,Kr,Xr,Zr,te,re={setup:function(){var t=this;if(Ht(this.elements.wrapper,this.config.classNames.embed,!0),_t(window.YT)&&wt(window.YT.Player))re.ready.call(this);else{var r=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){wt(r)&&r(),re.ready.call(t)},Hr(this.config.urls.youtube.sdk).catch((function(r){t.debug.warn("YouTube API failed to load",r)}))}},getTitle:function(t){var r=this;Tr(gr(this.config.urls.youtube.api,t)).then((function(t){if(_t(t)){var e=t.height,i=t.width;r.config.title=t.title,$r.setTitle.call(r),r.embed.ratio=vr(i,e)}yr.call(r)})).catch((function(){yr.call(r)}))},ready:function(){var t=this,r=t.config.youtube,e=t.media&&t.media.getAttribute("id");if(Pt(e)||!e.startsWith("youtube-")){var i=t.media.getAttribute("src");Pt(i)&&(i=t.media.getAttribute(this.config.attributes.embed.id));var o=function(t){return Pt(t)?null:t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:t}(i),n=Rt("div",{id:_r(t.provider),"data-poster":r.customControls?t.poster:void 0});if(t.media=$t(n,t.media),r.customControls){var a=function(t){return"https://i.ytimg.com/vi/".concat(o,"/").concat(t,"default.jpg")};Dr(a("maxres"),121).catch((function(){return Dr(a("sd"),121)})).catch((function(){return Dr(a("hq"))})).then((function(r){return $r.setPoster.call(t,r.src)})).then((function(r){r.includes("maxres")||(t.elements.poster.style.backgroundSize="cover")})).catch((function(){}))}t.embed=new window.YT.Player(t.media,{videoId:o,host:Wr(r),playerVars:Et({},{autoplay:t.config.autoplay?1:0,hl:t.config.hl,controls:t.supported.ui&&r.customControls?0:1,disablekb:1,playsinline:t.config.fullscreen.iosNative?0:1,cc_load_policy:t.captions.active?1:0,cc_lang_pref:t.config.captions.language,widget_referrer:window?window.location.href:null},r),events:{onError:function(r){if(!t.media.error){var e=r.data;t.media.error={code:e,message:{2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[e]||"An unknown error occured"},ir.call(t,t.media,"error")}},onPlaybackRateChange:function(r){t.media.playbackRate=r.target.getPlaybackRate(),ir.call(t,t.media,"ratechange")},onReady:function(e){if(!wt(t.media.play)){var i=e.target;re.getTitle.call(t,o),t.media.play=function(){Yr.call(t,!0),i.playVideo()},t.media.pause=function(){Yr.call(t,!1),i.pauseVideo()},t.media.stop=function(){i.stopVideo()},t.media.duration=i.getDuration(),t.media.paused=!0,t.media.currentTime=0,Object.defineProperty(t.media,"currentTime",{get:function(){return Number(i.getCurrentTime())},set:function(r){t.paused&&!t.embed.hasPlayed&&t.embed.mute(),t.media.seeking=!0,ir.call(t,t.media,"seeking"),i.seekTo(r)}}),Object.defineProperty(t.media,"playbackRate",{get:function(){return i.getPlaybackRate()},set:function(t){i.setPlaybackRate(t)}});var n=t.config.volume;Object.defineProperty(t.media,"volume",{get:function(){return n},set:function(r){i.setVolume(100*(n=r)),ir.call(t,t.media,"volumechange")}});var a=t.config.muted;Object.defineProperty(t.media,"muted",{get:function(){return a},set:function(r){var e=bt(r)?r:a;a=e,i[e?"mute":"unMute"](),i.setVolume(100*n),ir.call(t,t.media,"volumechange")}}),Object.defineProperty(t.media,"currentSrc",{get:function(){return i.getVideoUrl()}}),Object.defineProperty(t.media,"ended",{get:function(){return t.currentTime===t.duration}});var s=i.getAvailablePlaybackRates();t.options.speed=s.filter((function(r){return t.config.speed.options.includes(r)})),t.supported.ui&&r.customControls&&t.media.setAttribute("tabindex",-1),ir.call(t,t.media,"timeupdate"),ir.call(t,t.media,"durationchange"),clearInterval(t.timers.buffering),t.timers.buffering=setInterval((function(){t.media.buffered=i.getVideoLoadedFraction(),(null===t.media.lastBuffered||t.media.lastBuffered<t.media.buffered)&&ir.call(t,t.media,"progress"),t.media.lastBuffered=t.media.buffered,1===t.media.buffered&&(clearInterval(t.timers.buffering),ir.call(t,t.media,"canplaythrough"))}),200),r.customControls&&setTimeout((function(){return $r.build.call(t)}),50)}},onStateChange:function(e){var i=e.target;switch(clearInterval(t.timers.playing),t.media.seeking&&[1,2].includes(e.data)&&(t.media.seeking=!1,ir.call(t,t.media,"seeked")),e.data){case-1:ir.call(t,t.media,"timeupdate"),t.media.buffered=i.getVideoLoadedFraction(),ir.call(t,t.media,"progress");break;case 0:Yr.call(t,!1),t.media.loop?(i.stopVideo(),i.playVideo()):ir.call(t,t.media,"ended");break;case 1:r.customControls&&!t.config.autoplay&&t.media.paused&&!t.embed.hasPlayed?t.media.pause():(Yr.call(t,!0),ir.call(t,t.media,"playing"),t.timers.playing=setInterval((function(){ir.call(t,t.media,"timeupdate")}),50),t.media.duration!==i.getDuration()&&(t.media.duration=i.getDuration(),ir.call(t,t.media,"durationchange")));break;case 2:t.muted||t.embed.unMute(),Yr.call(t,!1);break;case 3:ir.call(t,t.media,"waiting")}ir.call(t,t.elements.container,"statechange",!1,{code:e.data})}}})}}},ee={setup:function(){this.media?(Ht(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),Ht(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&Ht(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=Rt("div",{class:this.config.classNames.video}),Ft(this.media,this.elements.wrapper),this.elements.poster=Rt("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?fr.setup.call(this):this.isYouTube?re.setup.call(this):this.isVimeo&&Qr.setup.call(this)):this.debug.warn("No media element found!")}},ie=function(){function t(r){var e=this;u(this,t),B(this,"load",(function(){e.enabled&&(_t(window.google)&&_t(window.google.ima)?e.ready():Hr(e.player.config.urls.googleIMA.sdk).then((function(){e.ready()})).catch((function(){e.trigger("error",new Error("Google IMA SDK failed to load"))})))})),B(this,"ready",(function(){var t;e.enabled||((t=e).manager&&t.manager.destroy(),t.elements.displayContainer&&t.elements.displayContainer.destroy(),t.elements.container.remove()),e.startSafetyTimer(12e3,"ready()"),e.managerPromise.then((function(){e.clearSafetyTimer("onAdsManagerLoaded()")})),e.listeners(),e.setupIMA()})),B(this,"setupIMA",(function(){e.elements.container=Rt("div",{class:e.player.config.classNames.ads}),e.player.elements.container.appendChild(e.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(e.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(e.player.config.playsinline),e.elements.displayContainer=new google.ima.AdDisplayContainer(e.elements.container,e.player.media),e.loader=new google.ima.AdsLoader(e.elements.displayContainer),e.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(function(t){return e.onAdsManagerLoaded(t)}),!1),e.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){return e.onAdError(t)}),!1),e.requestAds()})),B(this,"requestAds",(function(){var t=e.player.elements.container;try{var r=new google.ima.AdsRequest;r.adTagUrl=e.tagUrl,r.linearAdSlotWidth=t.offsetWidth,r.linearAdSlotHeight=t.offsetHeight,r.nonLinearAdSlotWidth=t.offsetWidth,r.nonLinearAdSlotHeight=t.offsetHeight,r.forceNonLinearFullSlot=!1,r.setAdWillPlayMuted(!e.player.muted),e.loader.requestAds(r)}catch(t){e.onAdError(t)}})),B(this,"pollCountdown",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!t)return clearInterval(e.countdownTimer),void e.elements.container.removeAttribute("data-badge-text");e.countdownTimer=setInterval((function(){var t=Or(Math.max(e.manager.getRemainingTime(),0)),r="".concat(zr("advertisement",e.player.config)," - ").concat(t);e.elements.container.setAttribute("data-badge-text",r)}),100)})),B(this,"onAdsManagerLoaded",(function(t){if(e.enabled){var r=new google.ima.AdsRenderingSettings;r.restoreCustomPlaybackStateOnAdBreakComplete=!0,r.enablePreloading=!0,e.manager=t.getAdsManager(e.player,r),e.cuePoints=e.manager.getCuePoints(),e.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){return e.onAdError(t)})),Object.keys(google.ima.AdEvent.Type).forEach((function(t){e.manager.addEventListener(google.ima.AdEvent.Type[t],(function(t){return e.onAdEvent(t)}))})),e.trigger("loaded")}})),B(this,"addCuePoints",(function(){Pt(e.cuePoints)||e.cuePoints.forEach((function(t){if(0!==t&&-1!==t&&t<e.player.duration){var r=e.player.elements.progress;if(zt(r)){var i=100/e.player.duration*t,o=Rt("span",{class:e.player.config.classNames.cues});o.style.left="".concat(i.toString(),"%"),r.appendChild(o)}}}))})),B(this,"onAdEvent",(function(t){var r=e.player.elements.container,i=t.getAd(),o=t.getAdData();switch(function(t){ir.call(e.player,e.player.media,"ads".concat(t.replace(/_/g,"").toLowerCase()))}(t.type),t.type){case google.ima.AdEvent.Type.LOADED:e.trigger("loaded"),e.pollCountdown(!0),i.isLinear()||(i.width=r.offsetWidth,i.height=r.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:e.manager.setVolume(e.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:e.player.ended?e.loadAds():e.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:e.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:e.pollCountdown(),e.resumeContent();break;case google.ima.AdEvent.Type.LOG:o.adError&&e.player.debug.warn("Non-fatal ad error: ".concat(o.adError.getMessage()))}})),B(this,"onAdError",(function(t){e.cancel(),e.player.debug.warn("Ads error",t)})),B(this,"listeners",(function(){var t,r=e.player.elements.container;e.player.on("canplay",(function(){e.addCuePoints()})),e.player.on("ended",(function(){e.loader.contentComplete()})),e.player.on("timeupdate",(function(){t=e.player.currentTime})),e.player.on("seeked",(function(){var r=e.player.currentTime;Pt(e.cuePoints)||e.cuePoints.forEach((function(i,o){t<i&&i<r&&(e.manager.discardAdBreak(),e.cuePoints.splice(o,1))}))})),window.addEventListener("resize",(function(){e.manager&&e.manager.resize(r.offsetWidth,r.offsetHeight,google.ima.ViewMode.NORMAL)}))})),B(this,"play",(function(){var t=e.player.elements.container;e.managerPromise||e.resumeContent(),e.managerPromise.then((function(){e.manager.setVolume(e.player.volume),e.elements.displayContainer.initialize();try{e.initialized||(e.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),e.manager.start()),e.initialized=!0}catch(t){e.onAdError(t)}})).catch((function(){}))})),B(this,"resumeContent",(function(){e.elements.container.style.zIndex="",e.playing=!1,ar(e.player.media.play())})),B(this,"pauseContent",(function(){e.elements.container.style.zIndex=3,e.playing=!0,e.player.media.pause()})),B(this,"cancel",(function(){e.initialized&&e.resumeContent(),e.trigger("error"),e.loadAds()})),B(this,"loadAds",(function(){e.managerPromise.then((function(){e.manager&&e.manager.destroy(),e.managerPromise=new Promise((function(t){e.on("loaded",t),e.player.debug.log(e.manager)})),e.initialized=!1,e.requestAds()})).catch((function(){}))})),B(this,"trigger",(function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];var n=e.events[t];kt(n)&&n.forEach((function(t){wt(t)&&t.apply(e,i)}))})),B(this,"on",(function(t,r){return kt(e.events[t])||(e.events[t]=[]),e.events[t].push(r),e})),B(this,"startSafetyTimer",(function(t,r){e.player.debug.log("Safety timer invoked from: ".concat(r)),e.safetyTimer=setTimeout((function(){e.cancel(),e.clearSafetyTimer("startSafetyTimer()")}),t)})),B(this,"clearSafetyTimer",(function(t){ft(e.safetyTimer)||(e.player.debug.log("Safety timer cleared from: ".concat(t)),clearTimeout(e.safetyTimer),e.safetyTimer=null)})),this.player=r,this.config=r.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((function(t,r){e.on("loaded",t),e.on("error",r)})),this.load()}return l(t,[{key:"enabled",get:function(){var t=this.config;return this.player.isHTML5&&this.player.isVideo&&t.enabled&&(!Pt(t.publisherId)||Ct(t.tagUrl))}},{key:"tagUrl",get:function(){var t=this.config;return Ct(t.tagUrl)?t.tagUrl:"https://go.aniview.com/api/adserver6/vast/?".concat(Mr({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:t.publisherId}))}}]),t}(),oe=function(t){var r=[];return t.split(/\r\n\r\n|\n\n|\r\r/).forEach((function(t){var e={};t.split(/\r\n|\n|\r/).forEach((function(t){if(gt(e.startTime)){if(!Pt(t.trim())&&Pt(e.text)){var r,i,o,a=t.trim().split("#xywh=");r=n(a,1),e.text=r[0],a[1]&&(i=a[1].split(","),o=n(i,4),e.x=o[0],e.y=o[1],e.w=o[2],e.h=o[3])}}else{var s=t.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);s&&(e.startTime=60*Number(s[1]||0)*60+60*Number(s[2])+Number(s[3])+Number("0.".concat(s[4])),e.endTime=60*Number(s[6]||0)*60+60*Number(s[7])+Number(s[8])+Number("0.".concat(s[9])))}})),e.text&&r.push(e)})),r},ne=function(t,r){var e={};return t>r.width/r.height?(e.width=r.width,e.height=1/t*r.width):(e.height=r.height,e.width=t*r.height),e},ae=function(){function t(r){var e=this;u(this,t),B(this,"load",(function(){e.player.elements.display.seekTooltip&&(e.player.elements.display.seekTooltip.hidden=e.enabled),e.enabled&&e.getThumbnails().then((function(){e.enabled&&(e.render(),e.determineContainerAutoSizing(),e.loaded=!0)}))})),B(this,"getThumbnails",(function(){return new Promise((function(t){var r=e.player.config.previewThumbnails.src;if(Pt(r))throw new Error("Missing previewThumbnails.src config attribute");var i=function(){e.thumbnails.sort((function(t,r){return t.height-r.height})),e.player.debug.log("Preview thumbnails",e.thumbnails),t()};if(wt(r))r((function(t){e.thumbnails=t,i()}));else{var o=(mt(r)?[r]:r).map((function(t){return e.getThumbnail(t)}));Promise.all(o).then(i)}}))})),B(this,"getThumbnail",(function(t){return new Promise((function(r){Tr(t).then((function(i){var o={frames:oe(i),height:null,urlPrefix:""};o.frames[0].text.startsWith("/")||o.frames[0].text.startsWith("http://")||o.frames[0].text.startsWith("https://")||(o.urlPrefix=t.substring(0,t.lastIndexOf("/")+1));var n=new Image;n.onload=function(){o.height=n.naturalHeight,o.width=n.naturalWidth,e.thumbnails.push(o),r()},n.src=o.urlPrefix+o.frames[0].text}))}))})),B(this,"startMove",(function(t){if(e.loaded&&jt(t)&&["touchmove","mousemove"].includes(t.type)&&e.player.media.duration){if("touchmove"===t.type)e.seekTime=e.player.media.duration*(e.player.elements.inputs.seek.value/100);else{var r=e.player.elements.progress.getBoundingClientRect();e.seekTime=e.player.media.duration*(100/r.width*(t.pageX-r.left)/100),e.seekTime<0&&(e.seekTime=0),e.seekTime>e.player.media.duration-1&&(e.seekTime=e.player.media.duration-1),e.mousePosX=t.pageX,e.elements.thumb.time.innerText=Or(e.seekTime)}e.showImageAtCurrentTime()}})),B(this,"endMove",(function(){e.toggleThumbContainer(!1,!0)})),B(this,"startScrubbing",(function(t){(ft(t.button)||!1===t.button||0===t.button)&&(e.mouseDown=!0,e.player.media.duration&&(e.toggleScrubbingContainer(!0),e.toggleThumbContainer(!1,!0),e.showImageAtCurrentTime()))})),B(this,"endScrubbing",(function(){e.mouseDown=!1,Math.ceil(e.lastTime)===Math.ceil(e.player.media.currentTime)?e.toggleScrubbingContainer(!1):er.call(e.player,e.player.media,"timeupdate",(function(){e.mouseDown||e.toggleScrubbingContainer(!1)}))})),B(this,"listeners",(function(){e.player.on("play",(function(){e.toggleThumbContainer(!1,!0)})),e.player.on("seeked",(function(){e.toggleThumbContainer(!1)})),e.player.on("timeupdate",(function(){e.lastTime=e.player.media.currentTime}))})),B(this,"render",(function(){e.elements.thumb.container=Rt("div",{class:e.player.config.classNames.previewThumbnails.thumbContainer}),e.elements.thumb.imageContainer=Rt("div",{class:e.player.config.classNames.previewThumbnails.imageContainer}),e.elements.thumb.container.appendChild(e.elements.thumb.imageContainer);var t=Rt("div",{class:e.player.config.classNames.previewThumbnails.timeContainer});e.elements.thumb.time=Rt("span",{},"00:00"),t.appendChild(e.elements.thumb.time),e.elements.thumb.container.appendChild(t),zt(e.player.elements.progress)&&e.player.elements.progress.appendChild(e.elements.thumb.container),e.elements.scrubbing.container=Rt("div",{class:e.player.config.classNames.previewThumbnails.scrubbingContainer}),e.player.elements.wrapper.appendChild(e.elements.scrubbing.container)})),B(this,"destroy",(function(){e.elements.thumb.container&&e.elements.thumb.container.remove(),e.elements.scrubbing.container&&e.elements.scrubbing.container.remove()})),B(this,"showImageAtCurrentTime",(function(){e.mouseDown?e.setScrubbingContainerSize():e.setThumbContainerSizeAndPos();var t=e.thumbnails[0].frames.findIndex((function(t){return e.seekTime>=t.startTime&&e.seekTime<=t.endTime})),r=t>=0,i=0;e.mouseDown||e.toggleThumbContainer(r),r&&(e.thumbnails.forEach((function(r,o){e.loadedImages.includes(r.frames[t].text)&&(i=o)})),t!==e.showingThumb&&(e.showingThumb=t,e.loadImage(i)))})),B(this,"loadImage",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=e.showingThumb,i=e.thumbnails[t],o=i.urlPrefix,n=i.frames[r],a=i.frames[r].text,s=o+a;if(e.currentImageElement&&e.currentImageElement.dataset.filename===a)e.showImage(e.currentImageElement,n,t,r,a,!1),e.currentImageElement.dataset.index=r,e.removeOldImages(e.currentImageElement);else{e.loadingImage&&e.usingSprites&&(e.loadingImage.onload=null);var l=new Image;l.src=s,l.dataset.index=r,l.dataset.filename=a,e.showingThumbFilename=a,e.player.debug.log("Loading image: ".concat(s)),l.onload=function(){return e.showImage(l,n,t,r,a,!0)},e.loadingImage=l,e.removeOldImages(l)}})),B(this,"showImage",(function(t,r,i,o,n){var a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];e.player.debug.log("Showing thumb: ".concat(n,". num: ").concat(o,". qual: ").concat(i,". newimg: ").concat(a)),e.setImageSizeAndOffset(t,r),a&&(e.currentImageContainer.appendChild(t),e.currentImageElement=t,e.loadedImages.includes(n)||e.loadedImages.push(n)),e.preloadNearby(o,!0).then(e.preloadNearby(o,!1)).then(e.getHigherQuality(i,t,r,n))})),B(this,"removeOldImages",(function(t){Array.from(e.currentImageContainer.children).forEach((function(r){if("img"===r.tagName.toLowerCase()){var i=e.usingSprites?500:1e3;if(r.dataset.index!==t.dataset.index&&!r.dataset.deleting){r.dataset.deleting=!0;var o=e.currentImageContainer;setTimeout((function(){o.removeChild(r),e.player.debug.log("Removing thumb: ".concat(r.dataset.filename))}),i)}}}))})),B(this,"preloadNearby",(function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new Promise((function(i){setTimeout((function(){var o=e.thumbnails[0].frames[t].text;if(e.showingThumbFilename===o){var n;n=r?e.thumbnails[0].frames.slice(t):e.thumbnails[0].frames.slice(0,t).reverse();var a=!1;n.forEach((function(t){var r=t.text;if(r!==o&&!e.loadedImages.includes(r)){a=!0,e.player.debug.log("Preloading thumb filename: ".concat(r));var n=e.thumbnails[0].urlPrefix+r,s=new Image;s.src=n,s.onload=function(){e.player.debug.log("Preloaded thumb filename: ".concat(r)),e.loadedImages.includes(r)||e.loadedImages.push(r),i()}}})),a||i()}}),300)}))})),B(this,"getHigherQuality",(function(t,r,i,o){if(t<e.thumbnails.length-1){var n=r.naturalHeight;e.usingSprites&&(n=i.h),n<e.thumbContainerHeight&&setTimeout((function(){e.showingThumbFilename===o&&(e.player.debug.log("Showing higher quality thumb for: ".concat(o)),e.loadImage(t+1))}),300)}})),B(this,"toggleThumbContainer",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=e.player.config.classNames.previewThumbnails.thumbContainerShown;e.elements.thumb.container.classList.toggle(i,t),!t&&r&&(e.showingThumb=null,e.showingThumbFilename=null)})),B(this,"toggleScrubbingContainer",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=e.player.config.classNames.previewThumbnails.scrubbingContainerShown;e.elements.scrubbing.container.classList.toggle(r,t),t||(e.showingThumb=null,e.showingThumbFilename=null)})),B(this,"determineContainerAutoSizing",(function(){(e.elements.thumb.imageContainer.clientHeight>20||e.elements.thumb.imageContainer.clientWidth>20)&&(e.sizeSpecifiedInCSS=!0)})),B(this,"setThumbContainerSizeAndPos",(function(){if(e.sizeSpecifiedInCSS){if(e.elements.thumb.imageContainer.clientHeight>20&&e.elements.thumb.imageContainer.clientWidth<20){var t=Math.floor(e.elements.thumb.imageContainer.clientHeight*e.thumbAspectRatio);e.elements.thumb.imageContainer.style.width="".concat(t,"px")}else if(e.elements.thumb.imageContainer.clientHeight<20&&e.elements.thumb.imageContainer.clientWidth>20){var r=Math.floor(e.elements.thumb.imageContainer.clientWidth/e.thumbAspectRatio);e.elements.thumb.imageContainer.style.height="".concat(r,"px")}}else{var i=Math.floor(e.thumbContainerHeight*e.thumbAspectRatio);e.elements.thumb.imageContainer.style.height="".concat(e.thumbContainerHeight,"px"),e.elements.thumb.imageContainer.style.width="".concat(i,"px")}e.setThumbContainerPos()})),B(this,"setThumbContainerPos",(function(){var t=e.player.elements.progress.getBoundingClientRect(),r=e.player.elements.container.getBoundingClientRect(),i=e.elements.thumb.container,o=r.left-t.left+10,n=r.right-t.left-i.clientWidth-10,a=e.mousePosX-t.left-i.clientWidth/2;a<o&&(a=o),a>n&&(a=n),i.style.left="".concat(a,"px")})),B(this,"setScrubbingContainerSize",(function(){var t=ne(e.thumbAspectRatio,{width:e.player.media.clientWidth,height:e.player.media.clientHeight}),r=t.height;e.elements.scrubbing.container.style.width="".concat(t.width,"px"),e.elements.scrubbing.container.style.height="".concat(r,"px")})),B(this,"setImageSizeAndOffset",(function(t,r){if(e.usingSprites){var i=e.thumbContainerHeight/r.h;t.style.height=t.naturalHeight*i+"px",t.style.width=t.naturalWidth*i+"px",t.style.left="-".concat(r.x*i,"px"),t.style.top="-".concat(r.y*i,"px")}})),this.player=r,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}return l(t,[{key:"enabled",get:function(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}},{key:"currentImageContainer",get:function(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}},{key:"usingSprites",get:function(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}},{key:"thumbAspectRatio",get:function(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}},{key:"thumbContainerHeight",get:function(){return this.mouseDown?ne(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight}).height:this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}},{key:"currentImageElement",get:function(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement},set:function(t){this.mouseDown?this.currentScrubbingImageElement=t:this.currentThumbnailImageElement=t}}]),t}(),se={insertElements:function(t,r){var e=this;mt(r)?Nt(t,this.media,{src:r}):kt(r)&&r.forEach((function(r){Nt(t,e.media,r)}))},change:function(t){var r=this;Mt(t,"sources.length")?(fr.cancelRequests.call(this),this.destroy.call(this,(function(){r.options.quality=[],Bt(r.media),r.media=null,zt(r.elements.container)&&r.elements.container.removeAttribute("class");var e=t.sources,i=t.type,o=n(e,1)[0],a=o.provider,s=void 0===a?Lr.html5:a,l="html5"===s?i:"div",p="html5"===s?{}:{src:o.src};Object.assign(r,{provider:s,type:i,supported:Kt.check(i,s,r.config.playsinline),media:Rt(l,p)}),r.elements.container.appendChild(r.media),bt(t.autoplay)&&(r.config.autoplay=t.autoplay),r.isHTML5&&(r.config.crossorigin&&r.media.setAttribute("crossorigin",""),r.config.autoplay&&r.media.setAttribute("autoplay",""),Pt(t.poster)||(r.poster=t.poster),r.config.loop.active&&r.media.setAttribute("loop",""),r.config.muted&&r.media.setAttribute("muted",""),r.config.playsinline&&r.media.setAttribute("playsinline","")),$r.addStyleHook.call(r),r.isHTML5&&se.insertElements.call(r,"source",e),r.config.title=t.title,ee.setup.call(r),r.isHTML5&&Object.keys(t).includes("tracks")&&se.insertElements.call(r,"track",t.tracks),(r.isHTML5||r.isEmbed&&!r.supported.ui)&&$r.build.call(r),r.isHTML5&&r.media.load(),Pt(t.previewThumbnails)||(Object.assign(r.config.previewThumbnails,t.previewThumbnails),r.previewThumbnails&&r.previewThumbnails.loaded&&(r.previewThumbnails.destroy(),r.previewThumbnails=null),r.config.previewThumbnails.enabled&&(r.previewThumbnails=new ae(r))),r.fullscreen.update()}),!0)):this.debug.warn("Invalid source format")}},le=function(){function t(r,e){var i=this;if(u(this,t),B(this,"play",(function(){return wt(i.media.play)?(i.ads&&i.ads.enabled&&i.ads.managerPromise.then((function(){return i.ads.play()})).catch((function(){return ar(i.media.play())})),i.media.play()):null})),B(this,"pause",(function(){return i.playing&&wt(i.media.pause)?i.media.pause():null})),B(this,"togglePlay",(function(t){return(bt(t)?t:!i.playing)?i.play():i.pause()})),B(this,"stop",(function(){i.isHTML5?(i.pause(),i.restart()):wt(i.media.stop)&&i.media.stop()})),B(this,"restart",(function(){i.currentTime=0})),B(this,"rewind",(function(t){i.currentTime-=gt(t)?t:i.config.seekTime})),B(this,"forward",(function(t){i.currentTime+=gt(t)?t:i.config.seekTime})),B(this,"increaseVolume",(function(t){i.volume=(i.media.muted?0:i.volume)+(gt(t)?t:0)})),B(this,"decreaseVolume",(function(t){i.increaseVolume(-t)})),B(this,"airplay",(function(){Kt.airplay&&i.media.webkitShowPlaybackTargetPicker()})),B(this,"toggleControls",(function(t){if(i.supported.ui&&!i.isAudio){var r=Ut(i.elements.container,i.config.classNames.hideControls),e=Ht(i.elements.container,i.config.classNames.hideControls,void 0===t?void 0:!t);return e&&kt(i.config.controls)&&i.config.controls.includes("settings")&&!Pt(i.config.settings)&&Ar.toggleMenu.call(i,!1),e!==r&&ir.call(i,i.media,e?"controlshidden":"controlsshown"),!e}return!1})),B(this,"on",(function(t,r){tr.call(i,i.elements.container,t,r)})),B(this,"once",(function(t,r){er.call(i,i.elements.container,t,r)})),B(this,"off",(function(t,r){rr(i.elements.container,t,r)})),B(this,"destroy",(function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(i.ready){var e=function(){document.body.style.overflow="",i.embed=null,r?(Object.keys(i.elements).length&&(Bt(i.elements.buttons.play),Bt(i.elements.captions),Bt(i.elements.controls),Bt(i.elements.wrapper),i.elements.buttons.play=null,i.elements.captions=null,i.elements.controls=null,i.elements.wrapper=null),wt(t)&&t()):(or.call(i),fr.cancelRequests.call(i),$t(i.elements.original,i.elements.container),ir.call(i,i.elements.original,"destroyed",!0),wt(t)&&t.call(i.elements.original),i.ready=!1,setTimeout((function(){i.elements=null,i.media=null}),200))};i.stop(),clearTimeout(i.timers.loading),clearTimeout(i.timers.controls),clearTimeout(i.timers.resized),i.isHTML5?($r.toggleNativeControls.call(i,!0),e()):i.isYouTube?(clearInterval(i.timers.buffering),clearInterval(i.timers.playing),null!==i.embed&&wt(i.embed.destroy)&&i.embed.destroy(),e()):i.isVimeo&&(null!==i.embed&&i.embed.unload().then(e),setTimeout(e,200))}})),B(this,"supports",(function(t){return Kt.mime.call(i,t)})),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=Kt.touch,this.media=r,mt(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||xt(this.media)||kt(this.media))&&(this.media=this.media[0]),this.config=Et({},Fr,t.defaults,e||{},function(){try{return JSON.parse(i.media.getAttribute("data-plyr-config"))}catch(t){return{}}}()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new Nr(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",Kt),!ft(this.media)&&zt(this.media))if(this.media.plyr)this.debug.warn("Target already setup");else if(this.config.enabled)if(Kt.check().api){var o=this.media.cloneNode(!0);o.autoplay=!1,this.elements.original=o;var n=this.media.tagName.toLowerCase(),a=null,s=null;switch(n){case"div":if(a=this.media.querySelector("iframe"),zt(a)){if(s=Ir(a.getAttribute("src")),this.provider=function(t){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(t)?Lr.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(t)?Lr.vimeo:null}(s.toString()),this.elements.container=this.media,this.media=a,this.elements.container.className="",s.search.length){var l=["1","true"];l.includes(s.searchParams.get("autoplay"))&&(this.config.autoplay=!0),l.includes(s.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=l.includes(s.searchParams.get("playsinline")),this.config.youtube.hl=s.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(Pt(this.provider)||!Object.values(Lr).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type="video";break;case"video":case"audio":this.type=n,this.provider=Lr.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=Kt.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new qr(this),this.storage=new jr(this),this.media.plyr=this,zt(this.elements.container)||(this.elements.container=Rt("div",{tabindex:0}),Ft(this.media,this.elements.container)),$r.migrateStyles.call(this),$r.addStyleHook.call(this),ee.setup.call(this),this.config.debug&&tr.call(this,this.elements.container,this.config.events.join(" "),(function(t){i.debug.log("event: ".concat(t.type))})),this.fullscreen=new Br(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&$r.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new ie(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",(function(){return ar(i.play())})),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new ae(this))):this.debug.error("Setup failed: no support")}else this.debug.error("Setup failed: no support");else this.debug.error("Setup failed: disabled by config");else this.debug.error("Setup failed: no suitable element passed")}return l(t,[{key:"isHTML5",get:function(){return this.provider===Lr.html5}},{key:"isEmbed",get:function(){return this.isYouTube||this.isVimeo}},{key:"isYouTube",get:function(){return this.provider===Lr.youtube}},{key:"isVimeo",get:function(){return this.provider===Lr.vimeo}},{key:"isVideo",get:function(){return"video"===this.type}},{key:"isAudio",get:function(){return"audio"===this.type}},{key:"playing",get:function(){return Boolean(this.ready&&!this.paused&&!this.ended)}},{key:"paused",get:function(){return Boolean(this.media.paused)}},{key:"stopped",get:function(){return Boolean(this.paused&&0===this.currentTime)}},{key:"ended",get:function(){return Boolean(this.media.ended)}},{key:"currentTime",get:function(){return Number(this.media.currentTime)},set:function(t){if(this.duration){var r=gt(t)&&t>0;this.media.currentTime=r?Math.min(t,this.duration):0,this.debug.log("Seeking to ".concat(this.currentTime," seconds"))}}},{key:"buffered",get:function(){var t=this.media.buffered;return gt(t)?t:t&&t.length&&this.duration>0?t.end(0)/this.duration:0}},{key:"seeking",get:function(){return Boolean(this.media.seeking)}},{key:"duration",get:function(){var t=parseFloat(this.config.duration),r=(this.media||{}).duration,e=gt(r)&&r!==1/0?r:0;return t||e}},{key:"volume",get:function(){return Number(this.media.volume)},set:function(t){var r=t;mt(r)&&(r=Number(r)),gt(r)||(r=this.storage.get("volume")),gt(r)||(r=this.config.volume),r>1&&(r=1),r<0&&(r=0),this.config.volume=r,this.media.volume=r,!Pt(t)&&this.muted&&r>0&&(this.muted=!1)}},{key:"muted",get:function(){return Boolean(this.media.muted)},set:function(t){var r=t;bt(r)||(r=this.storage.get("muted")),bt(r)||(r=this.config.muted),this.config.muted=r,this.media.muted=r}},{key:"hasAudio",get:function(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}},{key:"speed",get:function(){return Number(this.media.playbackRate)},set:function(t){var r=this,e=null;gt(t)&&(e=t),gt(e)||(e=this.storage.get("speed")),gt(e)||(e=this.config.speed.selected),e=function(){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:255;return Math.min(Math.max(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),t)}(e,this.minimumSpeed,this.maximumSpeed),this.config.speed.selected=e,setTimeout((function(){r.media&&(r.media.playbackRate=e)}),0)}},{key:"minimumSpeed",get:function(){return this.isYouTube?Math.min.apply(Math,d(this.options.speed)):this.isVimeo?.5:.0625}},{key:"maximumSpeed",get:function(){return this.isYouTube?Math.max.apply(Math,d(this.options.speed)):this.isVimeo?2:16}},{key:"quality",get:function(){return this.media.quality},set:function(t){var r=this.config.quality,e=this.options.quality;if(e.length){var i=[!Pt(t)&&Number(t),this.storage.get("quality"),r.selected,r.default].find(gt),o=!0;if(!e.includes(i)){var n=lr(e,i);this.debug.warn("Unsupported quality option: ".concat(i,", using ").concat(n," instead")),i=n,o=!1}r.selected=i,this.media.quality=i,o&&this.storage.set({quality:i})}}},{key:"loop",get:function(){return Boolean(this.media.loop)},set:function(t){var r=bt(t)?t:this.config.loop.active;this.config.loop.active=r,this.media.loop=r}},{key:"source",get:function(){return this.media.currentSrc},set:function(t){se.change.call(this,t)}},{key:"download",get:function(){var t=this.config.urls.download;return Ct(t)?t:this.source},set:function(t){Ct(t)&&(this.config.urls.download=t,Ar.setDownloadUrl.call(this))}},{key:"poster",get:function(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null},set:function(t){this.isVideo?$r.setPoster.call(this,t,!1).catch((function(){})):this.debug.warn("Poster can only be set for video")}},{key:"ratio",get:function(){if(!this.isVideo)return null;var t=cr(hr.call(this));return kt(t)?t.join(":"):t},set:function(t){this.isVideo?mt(t)&&dr(t)?(this.config.ratio=cr(t),yr.call(this)):this.debug.error("Invalid aspect ratio specified (".concat(t,")")):this.debug.warn("Aspect ratio can only be set for video")}},{key:"autoplay",get:function(){return Boolean(this.config.autoplay)},set:function(t){var r=bt(t)?t:this.config.autoplay;this.config.autoplay=r}},{key:"toggleCaptions",value:function(t){Er.toggle.call(this,t,!1)}},{key:"currentTrack",get:function(){var t=this.captions;return t.toggled?t.currentTrack:-1},set:function(t){Er.set.call(this,t,!1),Er.setup()}},{key:"language",get:function(){return(Er.getCurrentTrack.call(this)||{}).language},set:function(t){Er.setLanguage.call(this,t,!1)}},{key:"pip",get:function(){return Kt.pip?Pt(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:"picture-in-picture"===this.media.webkitPresentationMode:null},set:function(t){if(Kt.pip){var r=bt(t)?t:!this.pip;wt(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(r?"picture-in-picture":"inline"),wt(this.media.requestPictureInPicture)&&(!this.pip&&r?this.media.requestPictureInPicture():this.pip&&!r&&document.exitPictureInPicture())}}},{key:"setPreviewThumbnails",value:function(t){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,t),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new ae(this))}}],[{key:"supported",value:function(t,r,e){return Kt.check(t,r,e)}},{key:"loadSprite",value:function(t,r){return Sr(t,r)}},{key:"setup",value:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null;return mt(r)?i=Array.from(document.querySelectorAll(r)):xt(r)?i=Array.from(r):kt(r)&&(i=r.filter(zt)),Pt(i)?null:i.map((function(r){return new t(r,e)}))}}]),t}();function pe(t){t.on("timeupdate",(function(){return function(t){var r,e;null!=t&&null!==(r=t.config)&&void 0!==r&&null!==(e=r.mutedPreview)&&void 0!==e&&e.enabled||function(t){var r;0!==t.currentTime&&null!=t&&null!==(r=t.config)&&void 0!==r&&r.save_player_position&&localStorage.setItem("player-progress-".concat(ue(t)),t.currentTime)}(t)}(t)})),t.on("ready",(function(){return de(t)})),t.on("loadeddata",(function(){return de(t)})),t.on("ended",(function(){return function(t){localStorage.removeItem("player-progress-".concat(ue(t)))}(t)}))}function ue(t){var r,e;return null==t||null===(r=t.config)||void 0===r||null===(e=r.blockAttributes)||void 0===e?void 0:e.id}function de(t){var r,e,i;if(null!=t&&null!==(r=t.config)&&void 0!==r&&r.save_player_position&&(null==t||null===(e=t.config)||void 0===e||null===(i=e.mutedPreview)||void 0===i||!i.enabled)){var o=function(t){return parseFloat(localStorage.getItem("player-progress-".concat(ue(t))))}(t);return t.hls&&o>=0&&t.hls.startLoad(o),t.duration&&(o=Math.min(o,t.duration)),!o||o<1?0:(t.currentTime=o,null!=t&&t.isVimeo&&setTimeout((function(){t.embed.setCurrentTime(o||0)}),0),o)}}le.defaults=JSON.parse(JSON.stringify(Fr));var ce=(null===(Jr=window)||void 0===Jr||null===(Gr=Jr.prestoPlayer)||void 0===Gr||null===(Kr=Gr.i18n)||void 0===Kr?void 0:Kr.hide_chapters)||"Hide Chapters",he=(null===(Xr=window)||void 0===Xr||null===(Zr=Xr.prestoPlayer)||void 0===Zr||null===(te=Zr.i18n)||void 0===te?void 0:te.show_chapters)||"Show Chapters";const ye='<button class="plyr__controls__item plyr__control" type="button" data-plyr="chapters">\n<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-list">\n <line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line>\n <line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line>\n <line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line>\n</svg>\n<span class="label--pressed plyr__tooltip" role="tooltip">'.concat(ce,'</span>\n<span class="label--not-pressed plyr__tooltip" role="tooltip">').concat(he,"</span>\n</button>\n");var ve,fe,_e;const ge='\n<div class="presto-player-toc__wrapper">\n <div class="presto-player-toc__cover" data-player-toc-cover></div>\n <div class="presto-player-toc">\n <div class="presto-player-toc__title">'.concat((null===(ve=window)||void 0===ve||null===(fe=ve.prestoPlayer)||void 0===fe||null===(_e=fe.i18n)||void 0===_e?void 0:_e.chapters)||"Chapters",'</div>\n <div class="presto-player-toc__list" data-player-toc></div>\n </div>\n</div>');function me(t){var r,e,i,o,n,a,s,l,u,c,h,y,v,f=0,_={},g=null,m=0;if("undefined"!=typeof jQuery)if(i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!t.length)return t;var r={};return t.forEach((function(t){var e,i=t.time.split(":");i.length>1&&(e=60*parseInt(i[0]));var o=parseInt(i[1])+parseInt(e);r[o]=t})),r}((null===(r=o=t.detail.plyr)||void 0===r||null===(e=r.config)||void 0===e?void 0:e.chapters)||[]),"html5"!==o.provider||o.duration){if(i&&Object.keys(i).length){n=jQuery(o.elements.container).closest(".presto-player__wrapper").find(".plyr");var b=(v=jQuery(o.elements.controls)).find(".plyr__time");b=b.length?b:v.find(".plyr__progress__container"),(u=n.find('[data-plyr="chapters"]')).length||(u=jQuery(ye).insertAfter(b)),(s=n.find(".presto-player-toc__wrapper")).length||(s=jQuery(ge).appendTo(n)),c=s.find("[data-player-toc-cover]"),l=s.find("[data-player-toc]"),a=n.find(".plyr__progress__container");var w,k=jQuery('<div class="presto-player__chapters"></div>').appendTo(a);h=jQuery('<div class="presto-player__chapter-markers"></div>').appendTo(k),w=0,l.find(".presto-player-toc__chapter").length||(Object.keys(i).forEach((function(t){w++;var r=jQuery(function(t){var r=t.name,e=void 0===r?"Untitled":r,i=t.order,o=void 0===i?1:i,n=t.highlight;return'<div class="presto-player-toc__chapter '.concat(void 0!==n&&n?"is-highlighted":"",'" data-chapter-item>\n \n <span class="presto-player-toc__order">\n ').concat(o,'\n </span>\n <span class="presto-player-toc__name">\n ').concat(e,"\n </div>\n</div>")}({name:i[t].title,order:w})).appendTo(l);r.data("presto-player-timestamp",t),_[t]=r,r.on("click",(function(){o.currentTime=parseFloat(t),o.playing||(o.play(),o.once("playing",(function(){setTimeout((function(){o.pause()}),50)}))),j(!1)}))})),y=s.find("[data-chapter-item]")),z(),u.off("click"),u.on("click",j),x(),o.off("timeupdate"),o.on("timeupdate",x),g=window.setInterval((function(){m++,o.duration&&(z(),window.clearInterval(g)),m>50&&window.clearInterval(g)}),100),c.off("click"),c.on("click",(function(){return j(!1)})),l.off("mouseleave"),l.on("mouseleave",(function t(){if(o.playing){var r=setTimeout((function(){j(!1),l.off("mouseleave",t)}),2e3);l.on("mouseenter",(function(){clearTimeout(r)}))}}))}}else o.on("loadedmetadata",me);function x(){f=o.currentTime;var t=Object.keys(i).filter((function(t){return t<=f})).map((function(t){return parseInt(t,10)})),r=Math.max.apply(Math,d(t));y&&y.removeClass("is-highlighted"),jQuery(_[r||0]).addClass("is-highlighted")}function z(){o.duration&&(Object.keys(i).forEach((function(t){if(parseInt(t)&&!h.find("[data-timestamp=".concat(t,"]")).length){var r,e,n,a,s=i[t],l=parseInt(t)/o.duration*100,p=jQuery((r={position:l,name:"".concat(s.title)},e=r.position,n=r.name,a=void 0===n?"":n,'<div class="presto-player-progress__marker plyr__controls__item plyr__control" style="left: '.concat(void 0===e?0:e,'%" data-timeline-marker>\n <span class="label--not-pressed plyr__tooltip" role="tooltip">').concat(a,"</span>\n </div>"))).prependTo(h);p.attr("data-timestamp",t),p.data("timestamp",t),p.on("click",(function(){o.currentTime=parseInt(t),o.play()}))}})),s.find("[data-timeline-marker]"))}function j(t){void 0!==p(t)?s.toggleClass("is-showing",t):s.toggleClass("is-showing")}}var be;function we(t){"undefined"!=typeof jQuery&&(be=t,jQuery(be.elements.container).closest(".presto-player__wrapper"),be.on("ready",me),be.on("controlshidden",ke),be.on("controlsshown",xe))}function ke(t){var r,e,i;"undefined"!=typeof jQuery&&jQuery(null==t||null===(r=t.detail)||void 0===r||null===(e=r.plyr)||void 0===e||null===(i=e.elements)||void 0===i?void 0:i.container).closest(".presto-player__wrapper").addClass("presto-player--hide-controls")}function xe(t){var r,e,i;"undefined"!=typeof jQuery&&jQuery(null==t||null===(r=t.detail)||void 0===r||null===(e=r.plyr)||void 0===e||null===(i=e.elements)||void 0===i?void 0:i.container).closest(".presto-player__wrapper").removeClass("presto-player--hide-controls")}function ze(t){var r,e;return a(a(a({video_current_time:parseInt((null==t?void 0:t.currentTime)||0),video_provider:(null==t?void 0:t.provider)||"html5"},null!=t&&t.duration?{video_duration:parseInt(null==t?void 0:t.duration)}:{}),null!=t&&t.source?{video_url:null==t?void 0:t.source}:{}),null!=t&&null!==(r=t.config)&&void 0!==r&&r.title?{video_title:null==t||null===(e=t.config)||void 0===e?void 0:e.title}:{})}function je(t){var r,e;null!=t&&null!==(r=t.config)&&void 0!==r&&r.hasPlayed||(t.config.hasPlayed=!0,null===(e=window)||void 0===e||e.gtag("event","Play",ze(t)))}function Te(t){var r;null===(r=window)||void 0===r||r.gtag("event","Pause",ze(t))}function Se(t){var r,e;null!=t&&null!==(r=t.config)&&void 0!==r&&r.hasLoaded||(t.config.hasLoaded=!0,null===(e=window)||void 0===e||e.gtag("event","Player Load",ze(t)))}var Ce,Pe={25:!1,50:!1,75:!1,100:!1};function Oe(t){if(t.currentTime){var r=parseFloat(t.currentTime)/parseFloat(t.duration)*100;Object.keys(Pe).forEach((function(e){var i;!Pe[e]&&r>=parseInt(e)&&(Pe[e]=!0,null===(i=window)||void 0===i||i.gtag("event","".concat(e," Percent Played"),ze(t)))}))}}var Ae="presto-player.analytics",Ie="",Me=0;function Ee(t){var r,e;(Ce=t).config.analytics&&null!==(r=window)&&void 0!==r&&null!==(e=r.wp)&&void 0!==e&&e.hooks&&(wp.hooks.hasAction("presto.nonceRefreshed",Ae)||wp.hooks.addAction("presto.nonceRefreshed",Ae,(function(t){Ie=t})),wp.hooks.hasAction("presto.playerPlay",Ae)||wp.hooks.addAction("presto.playerPlay",Ae,Fe),wp.hooks.hasAction("presto.playerEnded",Ae)||wp.hooks.addAction("presto.playerEnded",Ae,Fe),wp.hooks.hasAction("presto.playerHidden",Ae)||wp.hooks.addAction("presto.playerHidden",Ae,Fe),wp.hooks.hasAction("presto.playerPause",Ae)||wp.hooks.addAction("presto.playerPause",Ae,Fe),wp.hooks.hasAction("presto.playerSeeked",Ae)||wp.hooks.addAction("presto.playerSeeked",Ae,Fe))}function Fe(t){isNaN(null==t?void 0:t.currentTime)||Le(function(t){var r,e;return t.currentTime>Me&&(Me=t.currentTime),t.currentTime>=t.duration&&(Me=t.duration),a(a(a({video_current_time:parseInt(Me),video_provider:(null==t?void 0:t.provider)||"html5"},null!=t&&t.duration?{video_duration:parseInt(null==t?void 0:t.duration)}:{}),null!=t&&t.source?{video_url:null==t?void 0:t.source}:{}),null!=t&&null!==(r=t.config)&&void 0!==r&&r.title?{video_title:null==t||null===(e=t.config)||void 0===e?void 0:e.title}:{})}(t))}function Le(t){var r,e,i,o,n,a,s,l;if(Ie){var p,u,d=new FormData;d.append("action","presto_player_progress"),d.append("duration",null==t?void 0:t.video_current_time),d.append("video_id",null===(r=Ce)||void 0===r||null===(e=r.config)||void 0===e?void 0:e.id),d.append("nonce",Ie),null!==(i=window)&&void 0!==i&&null!==(o=i.prestoPlayer)&&void 0!==o&&o.debug_navigator?"undefined"!=typeof jQuery&&jQuery.ajax({type:"POST",url:null===(n=window)||void 0===n||null===(a=n.prestoPlayer)||void 0===a?void 0:a.ajaxurl,dataType:"json",cache:!1,data:{action:"presto_player_progress",duration:null==t?void 0:t.video_current_time,video_id:null===(s=Ce)||void 0===s||null===(l=s.config)||void 0===l?void 0:l.id,nonce:Ie}}):navigator.sendBeacon(null===(p=window)||void 0===p||null===(u=p.prestoPlayer)||void 0===u?void 0:u.ajaxurl,d)}}function Re(t){var r,e;null!==(r=window)&&void 0!==r&&null!==(e=r.prestoPlayer)&&void 0!==e&&e.isPremium&&(function(){var t;null!==(t=window)&&void 0!==t&&t.gtag&&(wp.hooks.addAction("presto.playerPlay","presto-player",je),wp.hooks.addAction("presto.playerPause","presto-player",Te),wp.hooks.addAction("presto.playerReady","presto-player",Se),wp.hooks.addAction("presto.playerTimeUpdate","presto-player",Oe))}(),Ee(t))}const Ne=function(t){t.on("ready",(function(){var r,e,i,o;null==t||null===(r=t.config)||void 0===r||!r.logo||null!=t&&null!==(e=t.config)&&void 0!==e&&e.logo_added||"undefined"!=typeof jQuery&&(t.isAudio||(jQuery('<img src="'.concat(null==t||null===(i=t.config)||void 0===i?void 0:i.logo,'" class="presto-player__logo is-bottom-right" part="logo">')).insertBefore(null==t||null===(o=t.elements)||void 0===o?void 0:o.controls),t.config.logo_added=!0))}))};function Be(t){var r;null!=t&&null!==(r=t.config)&&void 0!==r&&r.poster&&(t.poster=t.config.poster)}const De=function(t){var r,e;null!==(r=window)&&void 0!==r&&null!==(e=r.wp)&&void 0!==e&&e.hooks&&(t.on("ready",(function(){$e("Ready",t)})),t.on("play",(function(){$e("Play",t)})),t.on("playing",(function(){$e("Playing",t)})),t.on("pause",(function(){$e("Pause",t)})),t.on("ended",(function(){$e("Ended",t)})),t.on("seeked",(function(){$e("Seeked",t)})),t.on("timeupdate",(function(){$e("TimeUpdate",t)})),t.on("enterfullscreen",(function(){$e("EnterFullScreen",t)})),t.on("exitfullscreen",(function(){$e("ExitFullScreen",t)})),document.addEventListener("visibilitychange",(function(){$e("hidden"===document.visibilityState?"Hidden":"Visible",t)})),t.on("statechange",(function(r){var e;switch(null==r||null===(e=r.detail)||void 0===e?void 0:e.code){case 0:$e("Ended",t);break;case 1:$e("Play",t);break;case 2:$e("Pause",t)}})))};function $e(t,r){window.wp.hooks.doAction("presto.player".concat(t),r)}let qe,Ve=Date.now();const He=t=>{var r,e;if(!t.automations)return;(null===(e=null===(r=null===window||void 0===window?void 0:window.wp)||void 0===r?void 0:r.hooks)||void 0===e?void 0:e.hasAction("presto.nonceRefreshed","presto-player.progress"))||window.wp.hooks.addAction("presto.nonceRefreshed","presto-player.progress",(t=>{qe=t})),null===window||void 0===window||window.wp.hooks.addAction("presto.playerTimeUpdate","presto-player",o),null===window||void 0===window||window.wp.hooks.addAction("presto.playerEnded","presto-player",(t=>o(t,100)));let i={0:!1,10:!1,20:!1,30:!1,40:!1,50:!1,60:!1,70:!1,80:!1,90:!1,100:!1};function o(t,r=null){var e;qe&&(null===(e=null==t?void 0:t.config)||void 0===e?void 0:e.ajaxProgress)&&(r||(r=parseFloat(t.currentTime)/parseFloat(t.duration)*100),t.watched=t.watched||{},Object.keys(i).forEach((e=>{var i,o,n,a,s,l,p,u,d;const c=parseInt(e);if(!t.watched[c]&&r>=c){t.watched[c]=!0;let r=new FormData;if(r.append("action","presto_player_progress_percent"),r.append("id",null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.id),r.append("percent",c.toString()),r.append("visit_time",Ve.toString()),r.append("nonce",qe),(null===(o=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===o?void 0:o.debug)&&console.log(`${c} percent watched.`),null===(n=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===n?void 0:n.debug_navigator)window.jQuery.ajax({type:"POST",url:null===(u=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===u?void 0:u.ajaxurl,dataType:"json",cache:!1,data:{action:"presto_player_progress_percent",id:null===(d=null==t?void 0:t.config)||void 0===d?void 0:d.id,visit_time:Ve,percent:c,nonce:qe}});else{let e=navigator.sendBeacon(null===(a=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===a?void 0:a.ajaxurl,r);(null===(s=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===s?void 0:s.debug)&&(e?console.log("Successfully queued progress:",{id:null===(l=null==t?void 0:t.config)||void 0===l?void 0:l.id,percent:c,visit_time:Ve,nonce:qe}):console.log("Failed to queue progress",{id:null===(p=null==t?void 0:t.config)||void 0===p?void 0:p.id,percent:c,visit_time:Ve,nonce:qe}))}}})))}};let Ue=!1,Qe=!1;function Ye(t){return t.status>=200&&t.status<300?Promise.resolve(t):Promise.reject(new Error(t.statusText))}const We=t=>{var r,e;(t.config.analytics||t.config.automations)&&(null===(e=null===(r=null===window||void 0===window?void 0:window.wp)||void 0===r?void 0:r.hooks)||void 0===e||e.addAction("presto.playerPlaying","presto-player",(()=>{null===window||void 0===window||window.wp.hooks.doAction("presto.playerGetNonce")})),null===window||void 0===window||window.wp.hooks.addAction("presto.playerGetNonce","presto-player",(()=>{var t;Ue||Qe||(Qe=!0,fetch(`${null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.ajaxurl}?action=presto_refresh_progress_nonce`).then(Ye).then((t=>t.json())).then((({data:t})=>{null===window||void 0===window||window.wp.hooks.doAction("presto.nonceRefreshed",t),Ue=!0})).catch((function(t){console.log("Request failed",t)})).finally((()=>{Qe=!1})))})))},Je=function(t){var r=window.navigator.userAgent;if(r.match(/iPad/i)||r.match(/iPhone/i)){var e=function(t,r){for(var e,i,o,n=null==t||null===(e=t.elements)||void 0===e||null===(i=e.container)||void 0===i||null===(o=i.getRootNode())||void 0===o?void 0:o.host;(null!=n?n.nodeType:void 0)===Node.ELEMENT_NODE&&"BODY"!==n.tagName&&"HTML"!==n.tagName;)r?n.classList.add("presto-player-fullscreen-open"):n.classList.remove("presto-player-fullscreen-open"),n=n.parentNode};wp.hooks.addAction("presto.playerEnterFullScreen","presto-player",(function(){var r;null!=t&&null!==(r=t.fullscreen)&&void 0!==r&&r.active&&e(t,!0)})),wp.hooks.addAction("presto.playerExitFullScreen","presto-player",(function(){var r;null!=t&&null!==(r=t.fullscreen)&&void 0!==r&&r.active||e(t,!1)}))}},Ge=function(){var t=y(regeneratorRuntime.mark((function t(r){var e,i,o,n,a,s,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("undefined"!=typeof jQuery){t.next=2;break}return t.abrupt("return");case 2:if("ResizeObserver"in window!=0){t.next=7;break}return t.next=5,import("./p-97e2763b.js");case 5:window.ResizeObserver=t.sent.ResizeObserver;case 7:if(l=new ResizeObserver((function(t){var r,e=v(t);try{for(e.s();!(r=e.n()).done;){var i=r.value,o=i.contentRect;jQuery(i.target).find(".plyr__menu__container").css({maxHeight:"".concat(Math.max(o.height-48,200),"px")})}}catch(t){e.e(t)}finally{e.f()}})),null!=r&&null!==(e=r.elements)&&void 0!==e&&null!==(i=e.container)&&void 0!==i&&null!==(o=i.getRootNode())&&void 0!==o&&o.firstChild){t.next=10;break}return t.abrupt("return");case 10:if(l.observe(null==r||null===(n=r.elements)||void 0===n||null===(a=n.container)||void 0===a||null===(s=a.getRootNode())||void 0===s?void 0:s.firstChild),r){t.next=13;break}return t.abrupt("return");case 13:r.on("playing",(function(){var t,e,i,o,n=null==r||null===(t=r.elements)||void 0===t||null===(e=t.container)||void 0===e?void 0:e.getRootNode().firstChild.getBoundingClientRect();jQuery(null==r||null===(i=r.elements)||void 0===i||null===(o=i.container)||void 0===o?void 0:o.getRootNode()).find(".plyr__menu__container").css({maxHeight:"".concat(Math.max(n.height-48,200),"px")})}));case 14:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}();function Ke(t){var r,e,i,o,n,s,l,p,u,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=a(a(a({},d),null!==(r=window)&&void 0!==r&&null!==(e=r.prestoPlayer)&&void 0!==e&&e.plugin_url?{iconUrl:"".concat(null===(i=window)||void 0===i||null===(o=i.prestoPlayer)||void 0===o?void 0:o.plugin_url,"img/")+"".concat(null!=d&&null!==(n=d.preset)&&void 0!==n&&n.skin?d.preset.skin:"default")+".svg"}:{}),{chapters:(null==d?void 0:d.chapters)||[],controls:(null==d?void 0:d.controls)||[],settings:Object.keys((null==d?void 0:d.settings)||{}).length?d.settings:{}}),h=new le(t,c);return"undefined"!=typeof learndash_video_data&&import("./p-06502f62.js").then((function(t){(0,t.default)(h)})),"undefined"!=typeof _tutorobject&&import("./p-0e1cd603.js").then((function(t){(0,t.default)(h)})),void 0!==window.llms&&!0===(null===(p=prestoPlayer)||void 0===p||null===(u=p.lifter)||void 0===u?void 0:u.isLesson)&&import("./p-68f17ca9.js").then((function(t){(0,t.default)(h)})),De(h),Je(h),Ge(h),Ne(h),Be(h),we(h),null!==(s=window)&&void 0!==s&&null!==(l=s.prestoPlayer)&&void 0!==l&&l.isAdmin||(We(h),He(c),pe(h),Re(h)),h}function Xe(t){return"string"==typeof t&&t.includes(".m3u8")}var Ze=function(t){var r=t.config,e=t.selector;return new Promise((function(t){return t(new Ke(e,a({},r)))}))};let ti=class{constructor(r){t(this,r),this.loaded=i(this,"loaded",7),this.currentMediaPlayer=i(this,"currentMediaPlayer",7),this.isAdmin=!1,this.previouslyPlaying=!1,this.ctaActive=!1,this.emailActive=!1,this.actionBarActive=!1,this.components={cta:null,email:null,overlays:null}}async play(t=!1){this.shouldLazyLoad=!1,t&&(this.mutedPreview=!1),this.player.play()}async goToAndPlay(t){this.player.play(),this.player.currentTime=t}handleScroll(t){t.detail.id!==this.player.id&&(this.mutedPreview||this.pause())}async restart(){return this.shouldLazyLoad=!1,this.player.restart()}async pause(){return this.player.pause()}async stop(){return this.player.stop()}async fullscreenToggle(t){return this.player.fullscreen.toggle(t)}async on(t,r){return this.player.on(t,r)}async once(t,r){return this.player.once(t,r)}async off(t,r){return this.player.off(t,r)}async handleCurrentTimeChange(t){this.player&&Number.isInteger(t)&&(this.player.duration&&(this.player.currentTime=Math.min(this.player.currentTime,this.player.duration)),this.shouldLazyLoad&&(this.shouldLazyLoad=!1,await new Promise((t=>{setTimeout((async()=>{await this.initialize(),t()}),50)}))),this.player.embed&&!this.player.playing?(this.player.currentTime=t,this.player.muted=!0,this.player.play(),this.player.once("timeupdate",(()=>{this.player.pause(),this.player.currentTime=t,this.player.muted=!1}))):this.player.currentTime=t)}handleStickyChange(){(function(t){for(var r=[];t.parentNode&&"body"!=t.parentNode.nodeName.toLowerCase();)r.push(t=t.parentNode);return r})(this.el).forEach((t=>{t.classList.toggle("presto-sticky-parent",this.isSticky)}))}getConfig(){return Object.assign(Object.assign({},function({preset:t={},chapters:r,branding:e,src:i,analytics:o,automations:n,autoplay:a,blockAttributes:s={},provider:l="",provider_video_id:p="",youtube:u,type:d,isAdmin:c,i18n:h,storage:y={enabled:!c,key:`presto-player-${t.id}`}}){var v,f,_,g;const m=["settings"],b=[...["youtube","vimeo"].includes(l)?["pip"]:[]],w=["play-large","rewind","play","fast-forward","progress","current-time","mute","volume","captions","settings","pip","fullscreen"].filter((r=>((null==t?void 0:t[r])||m.includes(r))&&!b.includes(r)));(null===(v=null==s?void 0:s.mutedPreview)||void 0===v?void 0:v.enabled)&&(y={enabled:!1});let k=Object.assign(Object.assign(Object.assign(Object.assign({id:null==s?void 0:s.id,title:(null==s?void 0:s.title)||"",blockAttributes:Object.assign(Object.assign({},s),{type:d}),src:i,ajaxProgress:!0,analytics:o,preset:t,automations:n,mutedPreview:{enabled:null===(f=null==s?void 0:s.mutedPreview)||void 0===f?void 0:f.enabled},loop:{active:"loop"===(null==t?void 0:t.on_video_end)},chapters:r,controls:w,settings:["captions","quality","loop",...(null==t?void 0:t.speed)?["speed"]:[]],hideControls:null==t?void 0:t.auto_hide,captions:{active:null==t?void 0:t.captions_enabled,language:"auto",update:!1},logo:null==e?void 0:e.logo,logo_width:null==e?void 0:e.logo_width,hide_logo:null==t?void 0:t.hide_logo,lazy_load_youtube:null==t?void 0:t.lazy_load_youtube,save_player_position:!!(null==t?void 0:t.save_player_position),sticky_scroll:null==t?void 0:t.sticky_scroll,play_video_viewport:null==t?void 0:t.play_video_viewport,autoplay:!(!a||(null===(_=window.wp)||void 0===_?void 0:_.blocks))},l?{provider:l}:{}),p?{provider_video_id:p}:{}),(null==s?void 0:s.poster)?{poster:s.poster}:{}),{invertTime:!t.hasOwnProperty("invert_time")||(null==t?void 0:t.invert_time),storage:y,keyboard:{focused:!1,global:!1},resetOnEnd:!!(null==t?void 0:t.reset_on_end),vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,premium:!1,playsinline:!!(null==s?void 0:s.playsInline)},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!!(null==u?void 0:u.noCookie),playsinline:!!(null==s?void 0:s.playsInline)},tooltips:{controls:!0,seek:!0},i18n:h});return(null===(g=null===window||void 0===window?void 0:window.wp)||void 0===g?void 0:g.hooks)&&(k=window.wp.hooks.applyFilters("presto.playerSettings",k)),k}({preset:this.preset,chapters:this.chapters,branding:this.branding,analytics:!!this.analytics,automations:!!this.automations,autoplay:!this.isAdmin&&!!this.autoplay,blockAttributes:this.blockAttributes,provider:this.provider,youtube:this.youtube,provider_video_id:this.provider_video_id,i18n:this.i18n})),this.iconUrl?{iconUrl:this.iconUrl}:{})}getPlayerData(){return{selector:this.playerEl,src:this.src||"",preload:this.preload,provider:this.provider,config:this.getConfig(),isAdmin:this.isAdmin}}async createPlayer(){return await(t=this.getPlayerData(),r=t.config,e=t.selector,i=t.src,o=t.preload,i&&Xe(i)?e&&e.canPlayType("application/vnd.apple.mpegurl")&&w()?Ze({config:r,selector:e}):import("./p-82ad268e.js").then((function(t){return(0,t.default)({config:r,selector:e,src:i,preload:o})})):Ze({config:r,selector:e}));var t,r,e,i,o}handlePlayerElementChange(){var t;(({src:t,el:r,preload:e,currentTime:i})=>{if(!r.getAttribute("hls_loaded")&&["metadata","none"].includes(e)&&Xe(t)){if(i>0)return r.style.height=null,r.style.paddingBottom=null,void r.setAttribute("hls_loaded","1");r.style.height="0px",r.style.paddingBottom="56.25%"}})({src:this.src,el:this.playerEl,preload:this.preload,currentTime:null===(t=null==this?void 0:this.player)||void 0===t?void 0:t.currentTime})}handleMutedPreview(t,r){var e,i,o,n,a,s,l;this.player&&!this.isAdmin&&(!t&&r&&this.player.once("timeupdate",(()=>{var t,r;this.player.loop="loop"===(null===(t=this.preset)||void 0===t?void 0:t.on_video_end),this.player.toggleCaptions(null===(r=null==this?void 0:this.preset)||void 0===r?void 0:r.captions_enabled)})),(null===(o=null===(i=null===(e=this.originalConfig)||void 0===e?void 0:e.blockAttributes)||void 0===i?void 0:i.mutedPreview)||void 0===o?void 0:o.enabled)&&(({player:t,mutedPreview:r,captions:e,progress:i,savePosition:o,onPlay:n})=>{var a=window.navigator.userAgent;if(!a.match(/iPad/i)&&!a.match(/iPhone/i)){t.config.mutedPreview.enabled=r,t.muted=r,t.loop=r,t.config.ajaxProgress=!r&&i,t.config.save_player_position=!r&&o;try{t.toggleCaptions(!!r&&!!e)}catch(t){}return setTimeout((()=>{de(t)||t.restart(),setTimeout((()=>{t.muted=r,n()}),50)}),0),t}console.log("ios device, do not do muted autoplay")})({player:this.player,mutedPreview:this.mutedPreview,captions:!!(null===(a=null===(n=this.blockAttributes)||void 0===n?void 0:n.mutedPreview)||void 0===a?void 0:a.captions),progress:null===(s=this.originalConfig)||void 0===s?void 0:s.ajaxProgress,savePosition:null===(l=this.originalConfig)||void 0===l?void 0:l.save_player_position,onPlay:()=>this.play()}))}onPlayerReady(){var t,r,e;this.observer&&(this.observer.disconnect(),this.observer.observe(this.el)),this.duration=this.player.duration;var i=window.navigator.userAgent;!!i.match(/iPad/i)||!!i.match(/iPhone/i)||(this.mutedPreview=null===(r=null===(t=this.blockAttributes)||void 0===t?void 0:t.mutedPreview)||void 0===r?void 0:r.enabled),this.renderDynamicOverlays(),this.renderVideoCTA(),this.renderEmailOverlay(),this.player.on("timeupdate loadedmetadata",(()=>{this.duration=this.player.duration,this.renderDynamicOverlays()})),Xe(this.src)&&this.player.once("playing",(()=>{this.playerEl.style.height=null,this.playerEl.style.paddingBottom=null,this.playerEl.setAttribute("hls_loaded","1")})),this.player.on("playing",(()=>this.playClass="presto-player--playing")),this.player.on("pause",(()=>this.playClass="presto-player--paused")),this.player.on("ended",(()=>this.playClass="presto-player--ended")),this.player.on("playing",(t=>!this.mutedPreview&&this.currentMediaPlayer.emit(t.detail.plyr))),"go-to-start"===(null===(e=this.preset)||void 0===e?void 0:e.on_video_end)&&this.player.on("ended",(()=>{this.restart(),"youtube"===this.provider&&this.stop()}))}handlePlayerEvents(t){t.on("ready",(t=>{this.player=t.detail.plyr,this.onPlayerReady()}))}handleLazyLoadChange(){"youtube"!==this.provider||this.shouldLazyLoad||this.isAdmin||setTimeout((()=>{this.onReload("play")}),50)}shouldLazyLoadVideo(){var t,r,e;return"youtube"===this.provider&&!this.autoplay&&!(null===(r=null===(t=this.blockAttributes)||void 0===t?void 0:t.mutedPreview)||void 0===r?void 0:r.enabled)&&!!(null===(e=this.preset)||void 0===e?void 0:e.lazy_load_youtube)}componentWillLoad(){var t,r,e;const i=null===(t=this.el.children)||void 0===t?void 0:t[0];i&&i.classList&&i.classList.contains("presto-iframe-fallback-container")&&i.remove(),this.shouldLazyLoad=this.shouldLazyLoadVideo(),this.i18n=(null===(r=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===r?void 0:r.i18n)||(null===(e=null===window||void 0===window?void 0:window.prestoPlayerAdmin)||void 0===e?void 0:e.i18n),this.originalConfig||(this.originalConfig=this.getConfig()),this.trackIntersection()}async componentDidLoad(){setTimeout((()=>{this.initialize(),this.loaded.emit(!0)}),0)}async initialize(){const t=await this.createPlayer();return this.handlePlayerEvents(t),this.syncVideoHeight(),((t,r)=>{if(!r)return;const e=document.createElement("style");t.shadowRoot.append(e),e.appendChild(document.createTextNode(r))})(this.el,this.css),t}renderSkins(){var t,e,i;return"modern"===(null===(t=this.preset)||void 0===t?void 0:t.skin)?r("presto-modern-skin",null):"business"===(null===(e=this.preset)||void 0===e?void 0:e.skin)?r("presto-business-skin",null):"stacked"===(null===(i=this.preset)||void 0===i?void 0:i.skin)?r("presto-stacked-skin",null):void 0}async onReload(t){const r=await this.initialize();"play"==t&&r.on("ready",(()=>{this.play(),r.muted=!0,r.muted=!1,r.off("ready",this.play)}))}async syncVideoHeight(){if("ResizeObserver"in window==0){const t=await import("./p-97e2763b.js");window.ResizeObserver=t.ResizeObserver}new ResizeObserver((()=>{this.isSticky||(this.videoHeight=this.el.getBoundingClientRect().height)})).observe(this.el)}handleRestartVideo(){this.player.once("timeupdate",(()=>{setTimeout((()=>this.play()),500)})),this.player.restart()}handlePlayVideo(){this.play()}handlePauseVideo(t){this.pause(),t.detail&&function(t){var r,e,i,o,n;if("unknown"!==b()&&!(null===(e=null===(r=null==t?void 0:t.config)||void 0===r?void 0:r.blockAttributes)||void 0===e?void 0:e.playsInline)&&("function"==typeof(null===(i=null==t?void 0:t.media)||void 0===i?void 0:i.webkitExitFullScreen)&&(null==t||t.media.webkitExitFullScreen()),"function"==typeof(null===(o=null==t?void 0:t.embed)||void 0===o?void 0:o.exitFullscreen)&&(null===(n=null==t?void 0:t.embed)||void 0===n||n.exitFullscreen()),"youtube"===t.provider)){const r=t.currentTime;t.currentTime=t.duration,t.once("playing",(()=>{t.currentTime=r}))}}(this.player)}playVideoOnlyInViewport(){var t;!this.isAdmin&&(null===(t=this.preset)||void 0===t?void 0:t.play_video_viewport)&&this.player&&("visible"===document.visibilityState?this.observer.observe(this.el):(this.player.playing&&(this.previouslyPlaying=!0),this.pause(),this.observer.disconnect()))}trackIntersection(){this.observer=new IntersectionObserver((t=>{this.handleVisibilityIntersection(null==t?void 0:t[0])})),this.observer.observe(this.el)}handleVisibilityIntersection(t){t&&(this.handleStickyScroll(t),this.handleVisibilityPlayChange(t))}handleStickyScroll(t){var r,e;if(!(null===(r=this.preset)||void 0===r?void 0:r.sticky_scroll))return;if(this.isAdmin||this.mutedPreview||!(null===(e=null==this?void 0:this.player)||void 0===e?void 0:e.playing))return void(this.isSticky=!1);let i=t.boundingClientRect;if(this.isSticky=i.height<-i.top,"visible"===document.visibilityState&&this.isSticky&&this.player){const t=()=>{window.removeEventListener("scroll",t),this.player.paused&&(this.isSticky=!1)};this.player.once("pause",(()=>{window.addEventListener("scroll",t)}))}}handleVisibilityPlayChange(t){var r,e,i;if(!this.isAdmin&&(null===(r=this.preset)||void 0===r?void 0:r.play_video_viewport)&&(!this.player&&this.originalConfig.autoplay&&(this.previouslyPlaying=!0,this.autoplay=!!(null==t?void 0:t.isIntersecting)),this.player)){if(null==t?void 0:t.isIntersecting)return this.originalConfig.autoplay&&(this.autoplay=!0),this.previouslyPlaying&&this.play(),void(this.previouslyPlaying=!1);if("visible"!==document.visibilityState||!this.isSticky){if(null===(i=null===(e=this.blockAttributes)||void 0===e?void 0:e.mutedPreview)||void 0===i?void 0:i.enabled)return this.previouslyPlaying=!0,this.pause(),void this.player.once("playing",(()=>{this.previouslyPlaying=!0,this.pause()}));this.player.playing&&(this.previouslyPlaying=!0),this.pause()}}}renderMutedOverlay(){var t;if(this.player&&this.mutedPreview&&!this.isAdmin)return r("presto-muted-overlay",{mutedOverlay:null===(t=this.player.config.blockAttributes)||void 0===t?void 0:t.mutedOverlay,preset:this.preset,onPlayVideo:()=>{this.mutedPreview=!1,this.play()}})}renderVideo(){var t;switch(this.provider){case"vimeo":return r("presto-vimeo",{player:this.player,getRef:t=>this.playerEl=t,poster:this.poster,src:this.src});case"youtube":return r("presto-youtube",{onReload:t=>this.onReload(null==t?void 0:t.detail),player:this.player,getRef:t=>this.playerEl=t,lazyLoad:this.shouldLazyLoad,poster:this.poster,src:this.src});case"bunny":return r("presto-bunny",{thumbnail:null===(t=null==this?void 0:this.bunny)||void 0===t?void 0:t.thumbnail,getRef:t=>this.playerEl=t,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,playsinline:this.playsinline,src:this.src,tracks:this.tracks,videoAttributes:this.videoAttributes});case"audio":return r("presto-audio",{getRef:t=>this.playerEl=t,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,preset:this.preset,src:this.src,tracks:this.tracks,mediaTitle:this.mediaTitle,audioAttributes:this.audioAttributes});default:return r("presto-video",{getRef:t=>this.playerEl=t,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,playsinline:this.playsinline,src:this.src,tracks:this.tracks,videoAttributes:this.videoAttributes})}}renderVideoCTA(){var t,r,e,i;(null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.isPremium)&&(this.isAdmin||(null===(e=null===(r=this.preset)||void 0===r?void 0:r.cta)||void 0===e?void 0:e.enabled)&&((null===(i=this.components.cta)||void 0===i?void 0:i.offsetParent)||"audio"!==this.provider&&(this.components.cta=document.createElement("presto-cta-overlay"),this.components.cta.direction=this.direction,this.components.cta.player=this.player,this.components.cta.preset=this.preset,this.components.cta.i18n=this.i18n,this.player.elements.container.append(this.components.cta))))}renderAudioCTA(){var t,e;if("audio"===this.provider&&this.player&&(null===(e=null===(t=this.preset)||void 0===t?void 0:t.cta)||void 0===e?void 0:e.enabled))return r("presto-cta-overlay",{direction:this.direction,player:this.player,preset:this.preset,i18n:this.i18n,provider:this.provider})}renderEmailOverlay(){var t,r,e;!(null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.isPremium)||this.isAdmin||(null===(r=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===r?void 0:r.logged_in)||(null===(e=this.components.email)||void 0===e?void 0:e.offsetParent)||"audio"!==this.provider&&(this.components.email=document.createElement("presto-email-overlay"),this.components.email.direction=this.direction,this.components.email.player=this.player,this.components.email.preset=this.preset,this.components.email.i18n=this.i18n,this.components.email.videoId=this.video_id,this.player.elements.container.append(this.components.email))}renderAudioEmail(){var t,e;if("audio"===this.provider&&this.player&&(null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.isPremium)&&!this.isAdmin&&!(null===(e=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===e?void 0:e.logged_in))return r("presto-email-overlay",{direction:this.direction,player:this.player,preset:this.preset,i18n:this.i18n,provider:this.provider})}renderActionBar(){var t,e;if((null===(e=null===(t=this.preset)||void 0===t?void 0:t.action_bar)||void 0===e?void 0:e.enabled)&&this.player)return r("presto-action-bar",{config:this.preset.action_bar,player:null==this?void 0:this.player,youtube:this.youtube})}stickyPositionClass(){var t,r;return this.isSticky?(null===(t=this.preset)||void 0===t?void 0:t.sticky_scroll_position)?`presto-sticky--${null===(r=this.preset)||void 0===r?void 0:r.sticky_scroll_position.replace(/\s+/g,"-")}`:"presto-sticky--bottom-right":""}renderDynamicOverlays(){var t,r,e,i,o,n,a;this.player&&((null===(t=null==this?void 0:this.overlaysComponent)||void 0===t?void 0:t.offsetParent)||(this.overlaysComponent=document.createElement("presto-dynamic-overlays"),this.overlaysComponent.addEventListener("reloadComponent",(()=>{this.overlaysComponent.remove(),this.overlaysComponent=document.createElement("presto-dynamic-overlays")}),{once:!0})),this.overlaysComponent.style.cssText="display: block !important; opacity: 1 !important; visibility: visible !important;",this.overlaysComponent.overlays=this.overlays,this.overlaysComponent.preset=this.preset,this.overlaysComponent.player=this.player,this.overlaysComponent.enabled=!(null===(i=null===(e=null===(r=this.player)||void 0===r?void 0:r.config)||void 0===e?void 0:e.mutedPreview)||void 0===i?void 0:i.enabled),(null===(o=null==this?void 0:this.overlaysComponent)||void 0===o?void 0:o.offsetParent)||null===(a=null===(n=this.player.elements)||void 0===n?void 0:n.wrapper)||void 0===a||a.append(this.overlaysComponent))}handleCtaStateChange(t){this.ctaActive=t.detail}handleEmailStateChange(t){this.emailActive=t.detail}handleActionBarStateChange(t){this.actionBarActive=t.detail}render(){var t,e,i,n,a,s,l,p;return r(o,{style:{height:this.isSticky?`${this.videoHeight}px`:"auto"}},r("div",{part:"wrapper",dir:this.direction,class:`presto-player__wrapper fitvidsignore\n presto-video-id-${this.video_id}\n ${this.isSticky?"audio"===this.provider?"presto-sticky-audio":"presto-sticky":""}\n ${"audio"!==this.provider?this.stickyPositionClass():""}\n ${"rtl"===this.direction?"rtl":""}\n ${!0===this.ctaActive?"cta-active":""}\n ${!0===this.emailActive?"email-active":""}\n ${!0===this.actionBarActive&&(null===(e=null===(t=this.preset)||void 0===t?void 0:t.action_bar)||void 0===e?void 0:e.enabled)?"action-bar-active":""}\n ${!!(null===(i=this.preset)||void 0===i?void 0:i.skin)&&`skin-${null===(n=this.preset)||void 0===n?void 0:n.skin}`}\n ${(null===(a=this.preset)||void 0===a?void 0:a.hide_youtube)?"hide-youtube-ui":""}\n ${(null===(s=this.preset)||void 0===s?void 0:s.caption_style)?`caption-style-${null===(l=this.preset)||void 0===l?void 0:l.caption_style}`:""}\n ${this.mutedPreview?"is-muted-overlay":""}\n ${this.playClass?this.playClass:""}\n ${(null===(p=this.preset)||void 0===p?void 0:p.play)&&!this.preset.rewind?"rewind-inactive":""}\n ${this.classes||""}`},r("div",null,r("slot",{name:"player-start"}),r("slot",{name:"player-before-video"}),this.renderVideo(),r("slot",{name:"player-after-video"}),this.renderActionBar(),this.renderMutedOverlay(),this.renderAudioCTA(),this.renderAudioEmail(),this.renderSkins(),r("slot",{name:"player-end"}))))}get el(){return e(this)}static get watchers(){return{currentTime:["handleCurrentTimeChange"],isSticky:["handleStickyChange"],playerEl:["handlePlayerElementChange"],player:["handlePlayerElementChange"],mutedPreview:["handleMutedPreview"],shouldLazyLoad:["handleLazyLoadChange"],overlays:["renderDynamicOverlays"],preset:["renderDynamicOverlays"]}}};ti.style='@charset "UTF-8";@keyframes plyr-progress{to{background-position:var(--plyr-progress-loading-size, 25px) 0}}@keyframes plyr-popup{0%{opacity:0.5;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes plyr-fade-in{from{opacity:0}to{opacity:1}}.plyr{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;align-items:center;direction:ltr;display:flex;flex-direction:column;font-family:var(--plyr-font-family, inherit);font-variant-numeric:tabular-nums;font-weight:var(--plyr-font-weight-regular, 400);line-height:var(--plyr-line-height, 1.7);max-width:100%;min-width:200px;position:relative;text-shadow:none;transition:box-shadow 0.3s ease;z-index:0}.plyr video,.plyr audio,.plyr iframe{display:block;height:100%;width:100%}.plyr button{font:inherit;line-height:inherit;width:auto}.plyr:focus{outline:0}.plyr--full-ui{box-sizing:border-box}.plyr--full-ui *,.plyr--full-ui *::after,.plyr--full-ui *::before{box-sizing:inherit}.plyr--full-ui a,.plyr--full-ui button,.plyr--full-ui input,.plyr--full-ui label{touch-action:manipulation}.plyr__badge{background:var(--plyr-badge-background, #4a5464);border-radius:var(--plyr-badge-border-radius, 2px);color:var(--plyr-badge-text-color, #fff);font-size:var(--plyr-font-size-badge, 9px);line-height:1;padding:3px 4px}.plyr--full-ui ::-webkit-media-text-track-container{display:none}.plyr__captions{animation:plyr-fade-in 0.3s ease;bottom:0;display:none;font-size:var(--plyr-font-size-small, 13px);left:0;padding:var(--plyr-control-spacing, 10px);position:absolute;text-align:center;transition:transform 0.4s ease-in-out;width:100%}.plyr__captions span:empty{display:none}@media (min-width: 480px){.plyr__captions{font-size:var(--plyr-font-size-base, 15px);padding:calc(var(--plyr-control-spacing, 10px) * 2)}}@media (min-width: 768px){.plyr__captions{font-size:var(--plyr-font-size-large, 18px)}}.plyr--captions-active .plyr__captions{display:block}.plyr:not(.plyr--hide-controls) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 10px) * -4))}.plyr__caption{background:var(--plyr-captions-background, rgba(0, 0, 0, 0.8));border-radius:2px;box-decoration-break:clone;color:var(--plyr-captions-text-color, #fff);line-height:185%;padding:0.2em 0.5em;white-space:pre-wrap}.plyr__caption div{display:inline}.plyr__control{background:transparent;border:0;border-radius:var(--plyr-control-radius, 3px);color:inherit;cursor:pointer;flex-shrink:0;overflow:visible;padding:calc(var(--plyr-control-spacing, 10px) * 0.7);position:relative;transition:all 0.3s ease}.plyr__control svg{display:block;fill:currentColor;height:var(--plyr-control-icon-size, 18px);pointer-events:none;width:var(--plyr-control-icon-size, 18px)}.plyr__control:focus{outline:0}.plyr__control.plyr__tab-focus{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}a.plyr__control{text-decoration:none}a.plyr__control::after,a.plyr__control::before{display:none}.plyr__control:not(.plyr__control--pressed) .icon--pressed,.plyr__control.plyr__control--pressed .icon--not-pressed,.plyr__control:not(.plyr__control--pressed) .label--pressed,.plyr__control.plyr__control--pressed .label--not-pressed{display:none}.plyr--full-ui ::-webkit-media-controls{display:none}.plyr__controls{align-items:center;display:flex;justify-content:flex-end;text-align:center}.plyr__controls .plyr__progress__container{flex:1;min-width:0}.plyr__controls .plyr__controls__item{margin-left:calc(var(--plyr-control-spacing, 10px) / 4)}.plyr__controls .plyr__controls__item:first-child{margin-left:0;margin-right:auto}.plyr__controls .plyr__controls__item.plyr__progress__container{padding-left:calc(var(--plyr-control-spacing, 10px) / 4)}.plyr__controls .plyr__controls__item.plyr__time{padding:0 calc(var(--plyr-control-spacing, 10px) / 2)}.plyr__controls .plyr__controls__item.plyr__progress__container:first-child,.plyr__controls .plyr__controls__item.plyr__time:first-child,.plyr__controls .plyr__controls__item.plyr__time+.plyr__time{padding-left:0}.plyr__controls:empty{display:none}.plyr [data-plyr=captions],.plyr [data-plyr=pip],.plyr [data-plyr=airplay],.plyr [data-plyr=fullscreen]{display:none}.plyr--captions-enabled [data-plyr=captions],.plyr--pip-supported [data-plyr=pip],.plyr--airplay-supported [data-plyr=airplay],.plyr--fullscreen-enabled [data-plyr=fullscreen]{display:inline-block}.plyr__menu{display:flex;position:relative}.plyr__menu .plyr__control svg{transition:transform 0.3s ease}.plyr__menu .plyr__control[aria-expanded=true] svg{transform:rotate(90deg)}.plyr__menu .plyr__control[aria-expanded=true] .plyr__tooltip{display:none}.plyr__menu__container{animation:plyr-popup 0.2s ease;background:var(--plyr-menu-background, rgba(255, 255, 255, 0.9));border-radius:4px;bottom:100%;box-shadow:var(--plyr-menu-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));color:var(--plyr-menu-color, #4a5464);font-size:var(--plyr-font-size-base, 15px);margin-bottom:10px;position:absolute;right:-3px;text-align:left;white-space:nowrap;z-index:3}.plyr__menu__container>div{overflow:hidden;transition:height 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1)}.plyr__menu__container::after{border:var(--plyr-menu-arrow-size, 4px) solid transparent;border-top-color:var(--plyr-menu-background, rgba(255, 255, 255, 0.9));content:"";height:0;position:absolute;right:calc(((var(--plyr-control-icon-size, 18px) / 2) + calc(var(--plyr-control-spacing, 10px) * 0.7)) - (var(--plyr-menu-arrow-size, 4px) / 2));top:100%;width:0}.plyr__menu__container [role=menu]{padding:calc(var(--plyr-control-spacing, 10px) * 0.7)}.plyr__menu__container [role=menuitem],.plyr__menu__container [role=menuitemradio]{margin-top:2px}.plyr__menu__container [role=menuitem]:first-child,.plyr__menu__container [role=menuitemradio]:first-child{margin-top:0}.plyr__menu__container .plyr__control{align-items:center;color:var(--plyr-menu-color, #4a5464);display:flex;font-size:var(--plyr-font-size-menu, var(--plyr-font-size-small, 13px));padding-bottom:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 1.5);padding-left:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5);padding-right:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5);padding-top:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 1.5);user-select:none;width:100%}.plyr__menu__container .plyr__control>span{align-items:inherit;display:flex;width:100%}.plyr__menu__container .plyr__control::after{border:var(--plyr-menu-item-arrow-size, 4px) solid transparent;content:"";position:absolute;top:50%;transform:translateY(-50%)}.plyr__menu__container .plyr__control--forward{padding-right:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 4)}.plyr__menu__container .plyr__control--forward::after{border-left-color:var(--plyr-menu-arrow-color, #728197);right:calc((calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5) - var(--plyr-menu-item-arrow-size, 4px))}.plyr__menu__container .plyr__control--forward.plyr__tab-focus::after,.plyr__menu__container .plyr__control--forward:hover::after{border-left-color:currentColor}.plyr__menu__container .plyr__control--back{font-weight:var(--plyr-font-weight-regular, 400);margin:calc(var(--plyr-control-spacing, 10px) * 0.7);margin-bottom:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 2);padding-left:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 4);position:relative;width:calc(100% - (calc(var(--plyr-control-spacing, 10px) * 0.7) * 2))}.plyr__menu__container .plyr__control--back::after{border-right-color:var(--plyr-menu-arrow-color, #728197);left:calc((calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5) - var(--plyr-menu-item-arrow-size, 4px))}.plyr__menu__container .plyr__control--back::before{background:var(--plyr-menu-back-border-color, #dcdfe5);box-shadow:0 1px 0 var(--plyr-menu-back-border-shadow-color, #fff);content:"";height:1px;left:0;margin-top:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 2);overflow:hidden;position:absolute;right:0;top:100%}.plyr__menu__container .plyr__control--back.plyr__tab-focus::after,.plyr__menu__container .plyr__control--back:hover::after{border-right-color:currentColor}.plyr__menu__container .plyr__control[role=menuitemradio]{padding-left:calc(var(--plyr-control-spacing, 10px) * 0.7)}.plyr__menu__container .plyr__control[role=menuitemradio]::before,.plyr__menu__container .plyr__control[role=menuitemradio]::after{border-radius:100%}.plyr__menu__container .plyr__control[role=menuitemradio]::before{background:rgba(0, 0, 0, 0.1);content:"";display:block;flex-shrink:0;height:16px;margin-right:var(--plyr-control-spacing, 10px);transition:all 0.3s ease;width:16px}.plyr__menu__container .plyr__control[role=menuitemradio]::after{background:#fff;border:0;height:6px;left:12px;opacity:0;top:50%;transform:translateY(-50%) scale(0);transition:transform 0.3s ease, opacity 0.3s ease;width:6px}.plyr__menu__container .plyr__control[role=menuitemradio][aria-checked=true]::before{background:var(--plyr-control-toggle-checked-background, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)))}.plyr__menu__container .plyr__control[role=menuitemradio][aria-checked=true]::after{opacity:1;transform:translateY(-50%) scale(1)}.plyr__menu__container .plyr__control[role=menuitemradio].plyr__tab-focus::before,.plyr__menu__container .plyr__control[role=menuitemradio]:hover::before{background:rgba(35, 40, 47, 0.1)}.plyr__menu__container .plyr__menu__value{align-items:center;display:flex;margin-left:auto;margin-right:calc((calc(var(--plyr-control-spacing, 10px) * 0.7) - 2) * -1);overflow:hidden;padding-left:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 3.5);pointer-events:none}.plyr--full-ui input[type=range]{-webkit-appearance:none;background:transparent;border:0;border-radius:calc(var(--plyr-range-thumb-height, 13px) * 2);color:var(--plyr-range-fill-background, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));display:block;height:calc((var(--plyr-range-thumb-active-shadow-width, 3px) * 2) + var(--plyr-range-thumb-height, 13px));margin:0;min-width:0;padding:0;transition:box-shadow 0.3s ease;width:100%}.plyr--full-ui input[type=range]::-webkit-slider-runnable-track{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none;background-image:linear-gradient(to right, currentColor var(--value, 0%), transparent var(--value, 0%))}.plyr--full-ui input[type=range]::-webkit-slider-thumb{background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2));height:var(--plyr-range-thumb-height, 13px);position:relative;transition:all 0.2s ease;width:var(--plyr-range-thumb-height, 13px);-webkit-appearance:none;margin-top:calc((var(--plyr-range-thumb-height, 13px) - var(--plyr-range-track-height, 5px)) / 2 * -1)}.plyr--full-ui input[type=range]::-moz-range-track{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none}.plyr--full-ui input[type=range]::-moz-range-thumb{background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2));height:var(--plyr-range-thumb-height, 13px);position:relative;transition:all 0.2s ease;width:var(--plyr-range-thumb-height, 13px)}.plyr--full-ui input[type=range]::-moz-range-progress{background:currentColor;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px)}.plyr--full-ui input[type=range]::-ms-track{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none;color:transparent}.plyr--full-ui input[type=range]::-ms-fill-upper{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none}.plyr--full-ui input[type=range]::-ms-fill-lower{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none;background:currentColor}.plyr--full-ui input[type=range]::-ms-thumb{background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2));height:var(--plyr-range-thumb-height, 13px);position:relative;transition:all 0.2s ease;width:var(--plyr-range-thumb-height, 13px);margin-top:0}.plyr--full-ui input[type=range]::-ms-tooltip{display:none}.plyr--full-ui input[type=range]:focus{outline:0}.plyr--full-ui input[type=range]::-moz-focus-outer{border:0}.plyr--full-ui input[type=range].plyr__tab-focus::-webkit-slider-runnable-track{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr--full-ui input[type=range].plyr__tab-focus::-moz-range-track{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr--full-ui input[type=range].plyr__tab-focus::-ms-track{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr__poster{background-color:var(--plyr-video-background, var(--plyr-video-background, black));background-position:50% 50%;background-repeat:no-repeat;background-size:contain;height:100%;left:0;opacity:0;position:absolute;top:0;transition:opacity 0.2s ease;width:100%;z-index:1}.plyr--stopped.plyr__poster-enabled .plyr__poster{opacity:1}.plyr--youtube.plyr--paused.plyr__poster-enabled:not(.plyr--stopped) .plyr__poster{display:none}.plyr__time{font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px))}.plyr__time+.plyr__time::before{content:"⁄";margin-right:var(--plyr-control-spacing, 10px)}@media (max-width: 767px){.plyr__time+.plyr__time{display:none}}.plyr__tooltip{background:var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));border-radius:var(--plyr-tooltip-radius, 3px);bottom:100%;box-shadow:var(--plyr-tooltip-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));color:var(--plyr-tooltip-color, #4a5464);font-size:var(--plyr-font-size-small, 13px);font-weight:var(--plyr-font-weight-regular, 400);left:50%;line-height:1.3;margin-bottom:calc(calc(var(--plyr-control-spacing, 10px) / 2) * 2);opacity:0;padding:calc(var(--plyr-control-spacing, 10px) / 2) calc(calc(var(--plyr-control-spacing, 10px) / 2) * 1.5);pointer-events:none;position:absolute;transform:translate(-50%, 10px) scale(0.8);transform-origin:50% 100%;transition:transform 0.2s 0.1s ease, opacity 0.2s 0.1s ease;white-space:nowrap;z-index:2}.plyr__tooltip::before{border-left:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-right:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-top:var(--plyr-tooltip-arrow-size, 4px) solid var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));bottom:calc(var(--plyr-tooltip-arrow-size, 4px) * -1);content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;z-index:2}.plyr .plyr__control:hover .plyr__tooltip,.plyr .plyr__control.plyr__tab-focus .plyr__tooltip,.plyr__tooltip--visible{opacity:1;transform:translate(-50%, 0) scale(1)}.plyr .plyr__control:hover .plyr__tooltip{z-index:3}.plyr__controls>.plyr__control:first-child .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip{left:0;transform:translate(0, 10px) scale(0.8);transform-origin:0 100%}.plyr__controls>.plyr__control:first-child .plyr__tooltip::before,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip::before{left:calc((var(--plyr-control-icon-size, 18px) / 2) + calc(var(--plyr-control-spacing, 10px) * 0.7))}.plyr__controls>.plyr__control:last-child .plyr__tooltip{left:auto;right:0;transform:translate(0, 10px) scale(0.8);transform-origin:100% 100%}.plyr__controls>.plyr__control:last-child .plyr__tooltip::before{left:auto;right:calc((var(--plyr-control-icon-size, 18px) / 2) + calc(var(--plyr-control-spacing, 10px) * 0.7));transform:translateX(50%)}.plyr__controls>.plyr__control:first-child:hover .plyr__tooltip,.plyr__controls>.plyr__control:first-child.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:first-child .plyr__tooltip--visible,.plyr__controls>.plyr__control:first-child+.plyr__control:hover .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip--visible,.plyr__controls>.plyr__control:last-child:hover .plyr__tooltip,.plyr__controls>.plyr__control:last-child.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:last-child .plyr__tooltip--visible{transform:translate(0, 0) scale(1)}.plyr__progress{left:calc(var(--plyr-range-thumb-height, 13px) * 0.5);margin-right:var(--plyr-range-thumb-height, 13px);position:relative}.plyr__progress input[type=range],.plyr__progress__buffer{margin-left:calc(var(--plyr-range-thumb-height, 13px) * -0.5);margin-right:calc(var(--plyr-range-thumb-height, 13px) * -0.5);width:calc(100% + var(--plyr-range-thumb-height, 13px))}.plyr__progress input[type=range]{position:relative;z-index:2}.plyr__progress .plyr__tooltip{font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px));left:0}.plyr__progress__buffer{-webkit-appearance:none;background:transparent;border:0;border-radius:100px;height:var(--plyr-range-track-height, 5px);left:0;margin-top:calc((var(--plyr-range-track-height, 5px) / 2) * -1);padding:0;position:absolute;top:50%}.plyr__progress__buffer::-webkit-progress-bar{background:transparent}.plyr__progress__buffer::-webkit-progress-value{background:currentColor;border-radius:100px;min-width:var(--plyr-range-track-height, 5px);transition:width 0.2s ease}.plyr__progress__buffer::-moz-progress-bar{background:currentColor;border-radius:100px;min-width:var(--plyr-range-track-height, 5px);transition:width 0.2s ease}.plyr__progress__buffer::-ms-fill{border-radius:100px;transition:width 0.2s ease}.plyr--loading .plyr__progress__buffer{animation:plyr-progress 1s linear infinite;background-image:linear-gradient(-45deg, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 25%, transparent 25%, transparent 50%, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 50%, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 75%, transparent 75%, transparent);background-repeat:repeat-x;background-size:var(--plyr-progress-loading-size, 25px) var(--plyr-progress-loading-size, 25px);color:transparent}.plyr--video.plyr--loading .plyr__progress__buffer{background-color:var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25))}.plyr--audio.plyr--loading .plyr__progress__buffer{background-color:var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6))}.plyr__volume{align-items:center;display:flex;max-width:110px;min-width:80px;position:relative;width:20%}.plyr__volume input[type=range]{margin-left:calc(var(--plyr-control-spacing, 10px) / 2);margin-right:calc(var(--plyr-control-spacing, 10px) / 2);position:relative;z-index:2}.plyr--is-ios .plyr__volume{min-width:0;width:auto}.plyr--audio{display:block}.plyr--audio .plyr__controls{background:var(--plyr-audio-controls-background, #fff);border-radius:inherit;color:var(--plyr-audio-control-color, #4a5464);padding:var(--plyr-control-spacing, 10px)}.plyr--audio .plyr__control.plyr__tab-focus,.plyr--audio .plyr__control:hover,.plyr--audio .plyr__control[aria-expanded=true]{background:var(--plyr-audio-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:var(--plyr-audio-control-color-hover, #fff)}.plyr--full-ui.plyr--audio input[type=range]::-webkit-slider-runnable-track{background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]::-moz-range-track{background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]::-ms-track{background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]:active::-webkit-slider-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1))}.plyr--full-ui.plyr--audio input[type=range]:active::-moz-range-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1))}.plyr--full-ui.plyr--audio input[type=range]:active::-ms-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1))}.plyr--audio .plyr__progress__buffer{color:var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6))}.plyr--video{background:var(--plyr-video-background, var(--plyr-video-background, black));overflow:hidden}.plyr--video.plyr--menu-open{overflow:visible}.plyr__video-wrapper{background:var(--plyr-video-background, var(--plyr-video-background, black));height:100%;margin:auto;overflow:hidden;position:relative;width:100%}.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{aspect-ratio:16/9}@supports not (aspect-ratio: 16/9){.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{height:0;padding-bottom:56.25%;position:relative}}.plyr__video-embed iframe,.plyr__video-wrapper--fixed-ratio video{border:0;height:100%;left:0;position:absolute;top:0;width:100%}.plyr--full-ui .plyr__video-embed>.plyr__video-embed__container{padding-bottom:240%;position:relative;transform:translateY(-38.28125%)}.plyr--video .plyr__controls{background:var(--plyr-video-controls-background, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75)));border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;bottom:0;color:var(--plyr-video-control-color, #fff);left:0;padding:calc(var(--plyr-control-spacing, 10px) / 2);padding-top:calc(var(--plyr-control-spacing, 10px) * 2);position:absolute;right:0;transition:opacity 0.4s ease-in-out, transform 0.4s ease-in-out;z-index:3}@media (min-width: 480px){.plyr--video .plyr__controls{padding:var(--plyr-control-spacing, 10px);padding-top:calc(var(--plyr-control-spacing, 10px) * 3.5)}}.plyr--video.plyr--hide-controls .plyr__controls{opacity:0;pointer-events:none;transform:translateY(100%)}.plyr--video .plyr__control.plyr__tab-focus,.plyr--video .plyr__control:hover,.plyr--video .plyr__control[aria-expanded=true]{background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:var(--plyr-video-control-color-hover, #fff)}.plyr__control--overlaid{background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));border:0;border-radius:100%;color:var(--plyr-video-control-color, #fff);display:none;left:50%;opacity:0.9;padding:calc(var(--plyr-control-spacing, 10px) * 1.5);position:absolute;top:50%;transform:translate(-50%, -50%);transition:0.3s;z-index:2}.plyr__control--overlaid svg{left:2px;position:relative}.plyr__control--overlaid:hover,.plyr__control--overlaid:focus{opacity:1}.plyr--playing .plyr__control--overlaid{opacity:0;visibility:hidden}.plyr--full-ui.plyr--video .plyr__control--overlaid{display:block}.plyr--full-ui.plyr--video input[type=range]::-webkit-slider-runnable-track{background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25)))}.plyr--full-ui.plyr--video input[type=range]::-moz-range-track{background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25)))}.plyr--full-ui.plyr--video input[type=range]::-ms-track{background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25)))}.plyr--full-ui.plyr--video input[type=range]:active::-webkit-slider-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5))}.plyr--full-ui.plyr--video input[type=range]:active::-moz-range-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5))}.plyr--full-ui.plyr--video input[type=range]:active::-ms-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5))}.plyr--video .plyr__progress__buffer{color:var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25))}.plyr:fullscreen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:fullscreen video{height:100%}.plyr:fullscreen .plyr__control .icon--exit-fullscreen{display:block}.plyr:fullscreen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:fullscreen.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr:fullscreen .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr:-webkit-full-screen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:-webkit-full-screen video{height:100%}.plyr:-webkit-full-screen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-webkit-full-screen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-webkit-full-screen.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr:-webkit-full-screen .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr:-moz-full-screen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:-moz-full-screen video{height:100%}.plyr:-moz-full-screen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-moz-full-screen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-moz-full-screen.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr:-moz-full-screen .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr:-ms-fullscreen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:-ms-fullscreen video{height:100%}.plyr:-ms-fullscreen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-ms-fullscreen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-ms-fullscreen.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr:-ms-fullscreen .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr--fullscreen-fallback{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%;bottom:0;display:block;left:0;position:fixed;right:0;top:0;z-index:10000000}.plyr--fullscreen-fallback video{height:100%}.plyr--fullscreen-fallback .plyr__control .icon--exit-fullscreen{display:block}.plyr--fullscreen-fallback .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr--fullscreen-fallback.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr--fullscreen-fallback .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr__ads{border-radius:inherit;bottom:0;cursor:pointer;left:0;overflow:hidden;position:absolute;right:0;top:0;z-index:-1}.plyr__ads>div,.plyr__ads>div iframe{height:100%;position:absolute;width:100%}.plyr__ads::after{background:#23282f;border-radius:2px;bottom:var(--plyr-control-spacing, 10px);color:#fff;content:attr(data-badge-text);font-size:11px;padding:2px 6px;pointer-events:none;position:absolute;right:var(--plyr-control-spacing, 10px);z-index:3}.plyr__ads:empty::after{display:none}.plyr__cues{background:currentColor;display:block;height:var(--plyr-range-track-height, 5px);left:0;margin:-var(--plyr-range-track-height, 5px)/2 0 0;opacity:0.8;position:absolute;top:50%;width:3px;z-index:3}.plyr__preview-thumb{background-color:var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));border-radius:3px;bottom:100%;box-shadow:var(--plyr-tooltip-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));margin-bottom:calc(calc(var(--plyr-control-spacing, 10px) / 2) * 2);opacity:0;padding:var(--plyr-tooltip-radius, 3px);pointer-events:none;position:absolute;transform:translate(0, 10px) scale(0.8);transform-origin:50% 100%;transition:transform 0.2s 0.1s ease, opacity 0.2s 0.1s ease;z-index:2}.plyr__preview-thumb--is-shown{opacity:1;transform:translate(0, 0) scale(1)}.plyr__preview-thumb::before{border-left:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-right:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-top:var(--plyr-tooltip-arrow-size, 4px) solid var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));bottom:calc(var(--plyr-tooltip-arrow-size, 4px) * -1);content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;z-index:2}.plyr__preview-thumb__image-container{background:#c1c8d1;border-radius:calc(var(--plyr-tooltip-radius, 3px) - 1px);overflow:hidden;position:relative;z-index:0}.plyr__preview-thumb__image-container img{height:100%;left:0;max-height:none;max-width:none;position:absolute;top:0;width:100%}.plyr__preview-thumb__time-container{bottom:6px;left:0;position:absolute;right:0;white-space:nowrap;z-index:3}.plyr__preview-thumb__time-container span{background-color:rgba(0, 0, 0, 0.55);border-radius:calc(var(--plyr-tooltip-radius, 3px) - 1px);color:#fff;font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px));padding:3px 6px}.plyr__preview-scrubbing{bottom:0;filter:blur(1px);height:100%;left:0;margin:auto;opacity:0;overflow:hidden;pointer-events:none;position:absolute;right:0;top:0;transition:opacity 0.3s ease;width:100%;z-index:1}.plyr__preview-scrubbing--is-shown{opacity:1}.plyr__preview-scrubbing img{height:100%;left:0;max-height:none;max-width:none;object-fit:contain;position:absolute;top:0;width:100%}.plyr--no-transition{transition:none !important}.plyr__sr-only{clip:rect(1px, 1px, 1px, 1px);overflow:hidden;border:0 !important;height:1px !important;padding:0 !important;position:absolute !important;width:1px !important}.plyr [hidden]{display:none !important}video,iframe{max-width:100%}.plyr--html5 .plyr__video-wrapper,.plyr--youtube .plyr__video-wrapper{height:100%}.plyr__video-wrapper{z-index:1}.presto-player__wrapper{position:relative;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}.presto-player__wrapper.rtl{direction:rtl}.presto-player__wrapper img{max-width:100%}.presto-player__wrapper .plyr{border-radius:var(--presto-player-border-radius)}.presto-player__wrapper .plyr.plyr--video.plyr--menu-open{overflow:hidden}.presto-player__wrapper .plyr--fullscreen-fallback.plyr--vimeo .plyr__video-wrapper{top:50%;transform:translateY(-50%)}.presto-player__wrapper .plyr--fullscreen-fallback.plyr{border-radius:0 !important}.presto-player__wrapper .plyr--fullscreen-fallback.plyr iframe{border-radius:0 !important}.presto-player__wrapper .plyr__menu__container{overflow:auto}.presto-player__wrapper .plyr__menu__container:after{display:none}.presto-player__wrapper img{border:none}.presto-player__wrapper video{margin:auto}.presto-player__wrapper iframe{height:100%}.presto-player__wrapper .plyr--video .plyr__control:active,.presto-player__wrapper .plyr--video .plyr__control:focus{background:#00b3ff;background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:#fff;color:var(--plyr-video-control-color-hover, #fff)}.presto-player__wrapper .plyr__poster{background-size:cover;z-index:2}.presto-player__wrapper .presto-player__logo{margin:0;display:block;position:absolute;z-index:3;opacity:0.5;object-fit:contain;transition:bottom 0.4s ease-in-out;max-width:var(--presto-player-logo-width, 75px)}.presto-player__wrapper .presto-player__logo.is-bottom-right{left:auto;right:20px;top:auto;bottom:60px}.presto-player__wrapper .presto-player__logo.is-bottom-left{left:20px;right:auto;top:auto;bottom:60px}@media screen and (min-width: 380px){.presto-player__wrapper.presto-player--hide-controls .presto-player__logo.is-bottom-right,.presto-player__wrapper.presto-player--hide-controls .presto-player__logo.is-bottom-left,.presto-player__wrapper .plyr--hide-controls .presto-player__logo.is-bottom-right,.presto-player__wrapper .plyr--hide-controls .presto-player__logo.is-bottom-left{bottom:20px}}.presto-player__wrapper .presto-player-progress__marker{width:16px;height:16px;padding:0;border:2px solid rgba(255, 255, 255, 0.5);position:absolute;border-radius:9999px;bottom:calc(50% - 8px);z-index:9;margin-left:-8px !important}.presto-player__wrapper.presto-player--ended .plyr--youtube .plyr__poster{display:none}.presto-player__wrapper.presto-player--ended .plyr--youtube .plyr__control.plyr__control--overlaid{display:none}.presto-player__wrapper .presto-player__wrapper .plyr__control--overlaid{z-index:4}.presto-player__wrapper button.plyr__control.plyr__control--overlaid:focus{background:inherit;border:none;outline:0;position:absolute;top:50%;transform:translate(-50%, -50%)}.presto-player__wrapper .plyr__controls__item.plyr__progress__container{position:relative}.presto-player__wrapper .plyr--full-ui.plyr--video input[type=range]::-webkit-slider-runnable-track{box-shadow:none}.presto-player__wrapper .plyr--video .plyr__controls{background:var(--plyr-video-controls-background, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.75)))}.presto-player__wrapper .plyr--fullscreen-fallback.plyr--video .plyr__controls{padding-bottom:calc(var(--plyr-control-spacing, 10px) + env(safe-area-inset-bottom))}.presto-player__wrapper .presto-player-toc{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";line-height:1.4;position:absolute;top:auto;right:0;left:0;bottom:0;max-height:100%;max-width:100%;background:rgba(255, 255, 255, 0.9);background:var(--plyr-menu-background, rgba(255, 255, 255, 0.9));left:auto;padding:20px 15px;border-radius:4px;width:100%;z-index:9;box-shadow:0 1px 2px rgba(0, 0, 0, 0.15);box-shadow:var(--plyr-menu-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));color:#4a5464;color:var(--plyr-menu-color, #4a5464);font-size:15px;font-size:var(--plyr-font-size-base, 15px);white-space:nowrap;z-index:3;display:flex;flex-direction:column;transition:bottom 0.25s ease}@media screen and (min-width: 380px){.presto-player__wrapper .presto-player-toc{right:20px;bottom:60px;width:300px;max-height:calc(100% - 80px);max-width:calc(100vw - 70px)}}.presto-player__wrapper .presto-player-toc__wrapper{position:absolute;top:0;left:0;bottom:0;right:0;z-index:3;visibility:hidden;opacity:0;transition:opacity 0.3s ease-in-out, visibility 0.3s ease-in-out}.presto-player__wrapper .presto-player-toc__wrapper.is-showing{visibility:visible;opacity:1}.presto-player__wrapper .presto-player-toc__cover{position:absolute;top:0;left:0;bottom:0;right:0;z-index:3}.presto-player__wrapper .presto-player-toc__list{flex:1;overflow:auto}.presto-player__wrapper .presto-player-toc__title{font-size:12px;font-weight:bold;margin-bottom:10px;margin-left:10px;margin-right:10px;display:none}@media screen and (min-width: 380px){.presto-player__wrapper .presto-player-toc__title{display:block}}.presto-player__wrapper .presto-player-toc__name{white-space:nowrap;overflow:hidden;width:100%;text-overflow:ellipsis}.presto-player__wrapper .presto-player-toc__chapter{padding:12px;border-radius:3px;cursor:pointer;line-height:1;display:flex;align-items:center;transition:background-color 0.4s ease, color 0.4s ease;margin-bottom:2px;position:relative}.presto-player__wrapper .presto-player-toc__chapter:last-child{margin-bottom:0}.presto-player__wrapper .presto-player-toc__chapter.is-highlighted,.presto-player__wrapper .presto-player-toc__chapter:hover{background:#00b3ff;background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:#fff;color:var(--plyr-video-control-color-hover, #fff)}.presto-player__wrapper .presto-player-toc__chapter.is-highlighted{padding-right:30px}.presto-player__wrapper .presto-player-toc__chapter.is-highlighted:after{background:rgba(255, 255, 255, 0.5);content:"";display:block;flex-shrink:0;height:8px;width:8px;margin-right:10px;margin-right:var(--plyr-control-spacing, 10px);transition:all 0.3s ease;border-radius:9999px;position:absolute;right:7px}.presto-player__wrapper .presto-player-toc__order{margin-right:12px;opacity:0.5}.presto-player__wrapper.rtl{direction:rtl}.presto-player__wrapper.rtl .presto-player-toc__order{order:2;margin-left:12px;margin-right:0}.presto-player__wrapper.rtl .presto-player-toc__name{direction:rtl}.presto-player__wrapper.action-bar-active .presto-audio__poster img{border-bottom-left-radius:0px}.presto-player__wrapper .presto-player-error{position:absolute;top:0;left:0;bottom:0;right:0;background:rgba(0, 0, 0, 0.9);color:#fff;display:flex;align-items:center;justify-content:center;z-index:10;text-align:center}.presto-player__wrapper .presto-player-error__title{font-size:18px;font-weight:bold;margin-bottom:8px}.presto-player__wrapper .presto-player-error__description{opacity:0.75}.presto-player__wrapper.hide-youtube-ui .plyr__video-embed iframe{top:-50%;height:200%}.presto-player__wrapper .plyr--vimeo.plyr--playing .plyr__video-embed__container{pointer-events:none}.presto-player__wrapper .plyr__control--overlaid{border-radius:6px;padding-left:26px;padding-right:26px;position:absolute !important;top:50% !important}.presto-player__wrapper.presto-player--hide-scrim .plyr__controls{background:transparent}.presto-player__wrapper presto-audio .presto-player-toc{max-height:350px}.presto-player__wrapper presto-action-bar{position:relative;z-index:1}.presto-sticky-parent{z-index:99998}.presto-sticky-audio{position:fixed;z-index:3000;width:100vw;bottom:0px;right:0px;left:0px}@media screen and (min-width: 960px){.presto-sticky{--presto-sticky-space:15px;position:fixed;z-index:3000;max-width:var(--presto-sticky-width, 380px);width:100vw}.presto-sticky .plyr__controls,.presto-sticky .presto-player-toc__wrapper,.presto-sticky presto-action-bar,.presto-sticky .presto-player__logo{display:none}.presto-sticky--top-left{top:var(--presto-sticky-space);left:var(--presto-sticky-space)}.presto-sticky--top-center{top:var(--presto-sticky-space);left:0;right:0;margin:0 auto}.presto-sticky--top-right{top:var(--presto-sticky-space);right:var(--presto-sticky-space)}.presto-sticky--center-left{top:0;bottom:0;margin:auto 0;left:var(--presto-sticky-space);display:flex;align-items:center}.presto-sticky--center-center{top:0;bottom:0;right:0;left:0;margin:auto;display:flex;align-items:center}.presto-sticky--center-right{top:0;bottom:0;margin:auto 0;right:var(--presto-sticky-space);display:flex;align-items:center}.presto-sticky--bottom-left{bottom:var(--presto-sticky-space);left:var(--presto-sticky-space)}.presto-sticky--bottom-center{bottom:var(--presto-sticky-space);left:0;right:0;margin:0 auto}.presto-sticky--bottom-right{bottom:var(--presto-sticky-space);right:var(--presto-sticky-space)}}.presto-player__overlay{position:absolute;top:50%;left:50%;z-index:3}.presto-player__muted-overlay{position:absolute;top:0;left:0;right:0;bottom:0;display:none;align-items:center;justify-content:center}.presto-player__muted-overlay .plyr__control--overlaid{display:block;opacity:1;visibility:visible}.presto-player__wrapper.is-muted-overlay{cursor:pointer}.presto-player__wrapper.is-muted-overlay.presto-player--playing .presto-player__muted-overlay{display:flex}.presto-player__wrapper.is-muted-overlay .plyr--playing .presto-player__muted-overlay .plyr__control--overlaid{opacity:1;visibility:visible}.presto-player__wrapper.is-muted-overlay .presto-player__logo{display:none}.presto-player__wrapper.is-muted-overlay .plyr__controls{display:none}.presto-player__wrapper.is-muted-overlay .plyr .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(0) !important}.presto-player__wrapper.rtl .plyr__captions{direction:rtl}.presto-player__wrapper .plyr__captions{z-index:1}.presto-player__wrapper.caption-style-full .plyr__captions{background:var(--plyr-captions-background, rgba(0, 0, 0, 0.8));padding-top:0;padding-bottom:0}.presto-player__wrapper.caption-style-full .plyr:not(.plyr--hide-controls):not(.is-muted-overlay) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 13px) * -4))}.presto-player__wrapper.caption-style-full.skin-stacked .plyr:not(.plyr--hide-controls):not(.is-muted-overlay) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 17px) * -4))}.presto-player__play-cover{cursor:pointer;position:absolute;top:0;left:0;right:0;bottom:0;z-index:99}.presto-player__chapters{width:100%;position:absolute;top:0;height:100%}.presto-player__chapter-markers{margin:0 8px;height:100%;position:relative}.presto-player-progress__marker.plyr__controls__item.plyr__control:hover{border:0;background:#fff}.presto-iframe-fallback-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.presto-iframe-fallback-container embed,.presto-iframe-fallback-container iframe,.presto-iframe-fallback-container object{position:absolute;top:0;left:0;width:100%;height:100%}@media (min-aspect-ratio: 16/9){.hide-youtube-ui presto-youtube .plyr:fullscreen .plyr__video-wrapper{width:177.7777777778vh}}.cta-email-active,.cta-email-active .presto-audio__wrapper{min-height:140px}.cta-active,.email-active,.cta-active .presto-audio__wrapper,.email-active .presto-audio__wrapper{min-height:140px}.action-bar-active .plyr{border-radius:var(--presto-player-border-radius) var(--presto-player-border-radius) 0px 0px}';const ri=function(t,r){return d(r)};let ei=class{constructor(r){t(this,r),this.prestoBlur=i(this,"prestoBlur",7),this.prestoFocus=i(this,"prestoFocus",7),this.hasFocus=!1,this.hasLabel=!1,this.hasPrefix=!1,this.hasSuffix=!1,this.type="default",this.size="medium",this.full=!1,this.disabled=!1,this.submit=!1}componentWillLoad(){this.handleSlotChange()}click(){this.button.click()}focus(t){this.button.focus(t)}blur(){this.button.blur()}handleSlotChange(){this.hasLabel=!!this.button.children,this.hasPrefix=!!this.button.querySelector('[slot="prefix"]'),this.hasSuffix=!!this.button.querySelector('[slot="suffix"]')}handleBlur(){this.hasFocus=!1,this.prestoBlur.emit()}handleFocus(){this.hasFocus=!0,this.prestoFocus.emit()}handleClick(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}render(){const t=!!this.href,e=r(ri,null,r("span",{part:"prefix",class:"button__prefix"},r("slot",{onSlotchange:()=>this.handleSlotChange(),name:"prefix"})),r("span",{part:"label",class:"button__label"},r("slot",{onSlotchange:()=>this.handleSlotChange()})),r("span",{part:"suffix",class:"button__suffix"},r("slot",{onSlotchange:()=>this.handleSlotChange(),name:"suffix"}))),i=r("button",{part:"base",class:{button:!0,"button--default":"default"===this.type,"button--primary":"primary"===this.type,"button--success":"success"===this.type,"button--info":"info"===this.type,"button--warning":"warning"===this.type,"button--danger":"danger"===this.type,"button--text":"text"===this.type,"button--small":"small"===this.size,"button--medium":"medium"===this.size,"button--large":"large"===this.size,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--has-label":this.hasLabel,"button--has-prefix":this.hasPrefix,"button--has-suffix":this.hasSuffix},disabled:this.disabled,type:this.submit?"submit":"button",name:this.name,value:this.value,onBlur:()=>this.handleBlur,onFocus:()=>this.handleFocus,onClick:()=>this.handleClick},e),o=r("a",{part:"base",class:{button:!0,"button--default":"default"===this.type,"button--primary":"primary"===this.type,"button--success":"success"===this.type,"button--info":"info"===this.type,"button--warning":"warning"===this.type,"button--danger":"danger"===this.type,"button--text":"text"===this.type,"button--small":"small"===this.size,"button--medium":"medium"===this.size,"button--large":"large"===this.size,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--has-label":this.hasLabel,"button--has-prefix":this.hasPrefix,"button--has-suffix":this.hasSuffix},href:this.href,target:this.target,download:this.download,rel:this.target?"noreferrer noopener":void 0,role:"button","aria-disabled":this.disabled?"true":"false",tabindex:this.disabled?"-1":"0",onBlur:()=>this.handleBlur,onFocus:()=>this.handleFocus,onClick:()=>this.handleClick},e);return t?o:i}get button(){return e(this)}};ei.style=":host{display:inline-block;width:auto;cursor:pointer}:host([full]){display:block}.button{display:inline-flex;align-items:stretch;justify-content:center;width:100%;border-style:solid;border-width:var(--presto-player-button-border-width);font-family:var(--plyr-font-family, inherit);font-weight:var(--presto-player-button-font-weight, 500);text-decoration:none;user-select:none;white-space:nowrap;vertical-align:middle;padding:0;transition:var(--presto--player-transition-fast, 150ms) background-color, var(--presto-player-transition-fast, 150ms) color, var(--presto-player-transition-fast, 150ms) border, var(--presto--player-transition-fast, 150ms) box-shadow;cursor:inherit;border-radius:var(--presto-player-button-border-radius, 0.25em)}.button::-moz-focus-inner{border:0}.button:focus{outline:none}.button.button--disabled{opacity:0.5;cursor:not-allowed}.button.button--disabled *{pointer-events:none}.button ::slotted(.presto--icon){pointer-events:none}.button__prefix,.button__suffix{flex:0 0 auto;display:flex;align-items:center}.button__label{display:flex;align-items:center}.button__label ::slotted(presto-icon){vertical-align:-2px}.button.button--default{background-color:var(--presto-player-color-white, #fff);border-color:var(--presto-player-color-gray-300, #d1d5db);color:var(--presto-player-color-gray-600, #4b5563)}.button.button--default:hover:not(.button--disabled){border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-color, var(--plyr-color-main));opacity:0.75}.button.button--default:focus:not(.button--disabled){border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-color, var(--plyr-color-main));opacity:1}.button.button--default:active:not(.button--disabled){border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-color, var(--plyr-color-main));opacity:1}.button.button--primary{background-color:var(--presto-player-button-color, var(--plyr-color-main));border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-text, #fff)}.button.button--primary:hover:not(.button--disabled){opacity:0.9}.button.button--primary:focus:not(.button--disabled){opacity:1}.button.button--primary:active:not(.button--disabled){opacity:1}.button--text{background-color:transparent;border-color:transparent;color:var(--presto-player-button-color, var(--plyr-color-main))}.button--text:hover:not(.button--disabled){background-color:transparent;border-color:transparent;opacity:0.8}.button--text:focus:not(.button--disabled){background-color:transparent;border-color:transparent;opacity:0.7}.button--text:active:not(.button--disabled){background-color:transparent;border-color:transparent;opacity:0.7}.button--small{font-size:var(--presto-player-button-font-size-small, 0.875em);height:var(--presto-player-button-height-small, 1.875em);line-height:calc(var(--presto-player-button-height-small, 1.875em) - var(--presto-player-button-border-width, 1px) * 2)}.button--medium{font-size:var(--presto-player-button-font-size-medium, 1em);height:var(--presto-player-button-height-medium, 2.5em);line-height:calc(var(--presto-player-button-height-medium, 2.5em) - var(--presto-player-button-border-width, 1px) * 2)}.button--large{font-size:var(--presto-player-button-font-size-large, 1.25em);height:var(--presto-player-button-height-large, 3.125em);line-height:calc(var(--presto-player-button-height-large, 3.125em) - var(--presto-player-button-border-width, 1px) * 2)}.button--full{display:block}.button--has-label.button--small .button__label{padding:0 var(--presto-player-button-spacing-small, 0.75em)}.button--has-label.button--medium .button__label{padding:0 var(--presto-player-button-spacing-medium, 1em)}.button--has-label.button--large .button__label{padding:0 var(--presto-player-button-spacing-large, 1.25em)}.button--has-prefix.button--small{padding-left:var(--presto-player-button-spacing-x-small, 0.5em)}.button--has-prefix.button--small .button__label{padding-left:var(--presto-player-button-spacing-x-small, 0.5em)}.button--has-prefix.button--medium{padding-left:var(--presto-player-button-spacing-small, 0.75em)}.button--has-prefix.button--medium .button__label{padding-left:var(--presto-player-button-spacing-small, 0.75em)}.button--has-prefix.button--large{padding-left:var(--presto-player-button-spacing-small, 0.75em)}.button--has-prefix.button--large .button__label{padding-left:var(--presto-player-button-spacing-small, 0.75em)}.button--has-suffix.button--small,.button--caret.button--small{padding-right:var(--presto-player-button-spacing-x-small, 0.5em)}.button--has-suffix.button--small .button__label,.button--caret.button--small .button__label{padding-right:var(--presto-player-button-spacing-x-small, 0.5em)}.button--has-suffix.button--medium,.button--caret.button--medium{padding-right:var(--presto-player-button-spacing-small, 0.75em)}.button--has-suffix.button--medium .button__label,.button--caret.button--medium .button__label{padding-right:var(--presto-player-button-spacing-small, 0.75em)}.button--has-suffix.button--large,.button--caret.button--large{padding-right:var(--presto-player-button-spacing-small, 0.75em)}.button--has-suffix.button--large .button__label,.button--caret.button--large .button__label{padding-right:var(--presto-player-button-spacing-small, 0.75em)}";let ii=class{constructor(r){t(this,r)}render(){return r("span",{part:"base",class:"spinner","aria-busy":"true","aria-live":"polite"})}};ii.style=":host{position:relative;box-sizing:border-box;--track-color:#0d131e20;--indicator-color:var(--plyr-color-main);--stroke-width:2px;display:inline-flex}:host *,:host *:before,:host *:after{box-sizing:inherit}.spinner{display:inline-block;width:1em;height:1em;border-radius:50%;border:solid var(--stroke-width) var(--track-color);border-top-color:var(--indicator-color);border-right-color:var(--indicator-color);animation:1s linear infinite spin}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";let oi=class{constructor(r){t(this,r)}render(){return r(o,null,r("slot",null))}};oi.style=".skin-stacked .plyr__controls{flex-wrap:wrap}.skin-stacked .presto-player-progress__marker{transform:scale(0.75)}.skin-stacked .plyr__controls{justify-content:flex-start}.skin-stacked .plyr__controls__item.plyr__progress__container{order:-1;flex:1 0 100%}.skin-stacked .plyr__controls__item.plyr__progress__container+:not(.plyr__time),.skin-stacked .plyr__controls__item.plyr__progress__container+.plyr__time+*{margin-left:auto}.skin-stacked .plyr__controls .plyr__controls__item:first-child{margin:0}.skin-stacked .plyr__progress{height:19px;display:flex;align-items:center}.skin-stacked .plyr__progress .plyr__progress__buffer{height:3px;transition:all 0.25s ease;position:absolute;top:calc(50% + 1px)}.skin-stacked .plyr__progress input[type=range]::-moz-range-track{height:3px;transition:all 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-webkit-slider-runnable-track{height:3px;transition:all 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-ms-track{height:3px;transition:all 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-ms-fill-upper{height:3px;transition:all 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-ms-fill-lower{height:3px;transition:height 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-webkit-slider-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-moz-range-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.skin-stacked .plyr__progress input[type=range]::-ms-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.skin-stacked .plyr__progress__container:hover .presto-player-progress__marker{transform:scale(1)}.skin-stacked .plyr__progress__container:hover .plyr__progress .plyr__progress__buffer{height:5px;top:50%}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]{overflow:visible}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-moz-range-track{height:5px}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-webkit-slider-runnable-track{height:5px}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-track{height:5px}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-fill-upper{height:5px}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-fill-lower{height:5px}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-webkit-slider-thumb{visibility:visible;opacity:1}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-moz-range-thumb{visibility:visible;opacity:1}.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-thumb{visibility:visible;opacity:1}";let ni=class{constructor(r){t(this,r)}handleClick(t){t.preventDefault();const r=document.body.querySelector("presto-player");r&&r.goToAndPlay(this.timeToSeconds(this.time))}timeToSeconds(t){let r,e=t.split(":");return e.length>1&&(r=60*parseInt(e[0])),parseInt(e[1])+parseInt(r)}render(){return r("a",{href:"#",class:"presto-timestamp",onClick:t=>this.handleClick(t)},r("slot",null,this.time))}};ni.style=":host{display:inline}";let ai=class{constructor(r){t(this,r)}render(){return r("video",Object.assign({class:{"presto-player__player":!0,"plyr__video-embed":["youtube","vimeo"].includes(this.provider)},part:"video",ref:this.getRef,autoplay:this.autoplay,preload:this.preload,"data-poster":this.poster,playsinline:this.playsinline},this.videoAttributes),r("source",{src:this.src}),!!this.tracks&&!!this.tracks.length&&this.tracks.map((t=>r("track",{kind:"captions",label:(null==t?void 0:t.label)?t.label:"Captions",src:null==t?void 0:t.src,srclang:(null==t?void 0:t.srcLang)?null==t?void 0:t.srcLang:"en"}))))}};ai.style=":host{display:block}";let si=class{constructor(r){t(this,r)}getId(t){const r=/^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/.exec(t||"");return(null==r?void 0:r[5])||""}parseHash(t){const r=t.match(/^.*(?:vimeo.com\/|video\/)(?:\d+)(?:\?.*\&*h=|\/)+(?<hash>[\d,a-f]+)/);return r?r.groups.hash:null}render(){if(this.src)return"Android"!==b()||(t=window.navigator.standalone,e=window.navigator.userAgent.toLowerCase(),i=/safari/.test(e),/iphone|ipod|ipad/.test(e)?!t&&i||t||i:!e.includes("wv"))?r("div",{class:"plyr__video-embed",part:"embed",ref:this.getRef,"data-plyr-provider":"vimeo","data-plyr-embed-id":this.getId(this.src),"data-plyr-embed-hash":this.parseHash(this.src)}):r("div",{class:"presto-iframe-fallback-container"},r("iframe",{src:`https://player.vimeo.com/video/${this.getId(this.src)}?h=${this.parseHash(this.src)}&amp;loop=false&amp;byline=false&amp;portrait=false&amp;title=false&amp;speed=true&amp;transparent=0&amp;gesture=media`,allowFullScreen:!0,allowTransparency:!0,allow:"autoplay",style:{width:"100%"},class:"presto-fallback-iframe"}));var t,e,i}};si.style=":host{display:block}";let li=class{constructor(r){t(this,r),this.reload=i(this,"reload",7)}handlePlayerChange(){this.player&&this.fixes()}fixes(){this.player.once("statechange",(t=>{var r,e,i,o,n;1===t.detail.code&&((null===(n=null===(o=null===(i=null===(e=null===(r=null==t?void 0:t.detail)||void 0===r?void 0:r.plyr)||void 0===e?void 0:e.config)||void 0===i?void 0:i.blockAttributes)||void 0===o?void 0:o.mutedPreview)||void 0===n?void 0:n.enabled)||(this.player.muted=!1))}))}getId(t){var r;const e=(t||"").match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return e&&11===(null===(r=null==e?void 0:e[2])||void 0===r?void 0:r.length)?e[2]:null}loadPlayer(){this.lazyLoad=!1,this.reloadPlayer=!0}componentDidRender(){this.reloadPlayer&&(this.reloadPlayer=!1,this.reload.emit("play"))}setWebView(){var t;let r=null===(t=window.navigator)||void 0===t?void 0:t.standalone,e=window.navigator.userAgent.toLowerCase(),i=/safari/.test(e),o=/iphone|ipod|ipad/.test(e);this.isWebView=o?!r&&!i:e.includes("wv")}componentWillLoad(){this.setWebView(),this.poster||(this.poster=`//img.youtube.com/vi/${this.getId(this.src)}/maxresdefault.jpg`),this.lazyLoad&&w()&&(this.lazyLoad=!1)}render(){return this.isWebView?r("div",{class:"fallback-container"},r("iframe",{src:this.src,allowFullScreen:!0,allowtransparency:!0,allow:"autoplay"})):this.lazyLoad?r("div",null,r("presto-video",{part:"video",getRef:this.getRef,poster:this.poster,src:"",provider:"youtube"}),r("div",{class:"presto-player__play-cover",onClick:()=>this.loadPlayer()})):r("div",{class:"plyr__video-embed",part:"embed",ref:this.getRef,"data-plyr-provider":"youtube","data-plyr-embed-id":this.getId(this.src)})}static get watchers(){return{player:["handlePlayerChange"]}}};li.style=":host{display:block}.fallback-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.fallback-container iframe,.fallback-container object,.fallback-container embed{position:absolute;top:0;left:0;width:100%;height:100%}@supports not (aspect-ratio: 16/9){.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{height:0 !important;padding-bottom:56.25%;position:relative}}";let pi=class{constructor(r){t(this,r),this.layout="default"}waitForApi(t){var r=setInterval((function(){var e;(null===(e=null===window||void 0===window?void 0:window.gapi)||void 0===e?void 0:e.ytsubscribe)&&(clearInterval(r),t())}),50)}componentDidLoad(){const t=document.createElement("script");t.type="text/javascript",t.async=!1,t.src="https://apis.google.com/js/platform.js";const r=document.getElementsByTagName("script")[0];r&&r.parentNode.insertBefore(t,r),this.waitForApi((()=>{window.gapi.ytsubscribe.render(this.textInput,{channelId:this.channel,layout:this.layout,count:this.showCount?"default":"hidden"})}))}render(){return r("div",{class:"g-ytsubscribe",ref:t=>this.textInput=t})}};pi.style=":host{display:block}";export{O as C,F as E,Ke as P,f as a,k as b,x as c,z as d,j as e,T as f,S as g,C as h,A as i,I as j,M as k,E as l,L as m,R as n,ti as o,ei as p,ii as q,de as r,oi as s,ni as t,ai as u,si as v,li as w,pi as x}
dist/components/web-components/{p-b62f6371.js → p-82ad268e.js} RENAMED
@@ -1 +1 @@
1
- import{m as n,a as e}from"./p-3e9a58ac.js";import{P as r}from"./p-37e4ab3e.js";export default function(t){var a=t.config,o=t.selector,i=t.src,u=t.preload;return new Promise(function(){var t=n(regeneratorRuntime.mark((function n(t){var c,s,w;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(window.Hls){n.next=6;break}case 1:if(window.hasOwnProperty("Hls")){n.next=6;break}return n.next=4,new Promise((function(n){return setTimeout(n,50)}));case 4:n.next=1;break;case 6:if(!window.Hls.isSupported()){n.next=16;break}return s=!["metadata","none"].includes(u),null!==(c=wp)&&void 0!==c&&c.blocks&&(s=!0),(w=new window.Hls({autoStartLoad:s})).loadSource(i),w.on(window.Hls.Events.LEVEL_SWITCHED,(function(n,e){o.closest(".presto-player__wrapper").querySelector(".plyr__menu__container [data-plyr='quality'][value='0'] span").innerHTML=w.autoLevelEnabled?"AUTO (".concat(w.levels[e.level].height,"p)"):"AUTO"})),w.on(window.Hls.Events.MANIFEST_PARSED,(function(){var n=w.levels.map((function(n){return n.height}));n.unshift(0);var i=n.findIndex((function(n){var e;return n===parseInt(null===(e=prestoPlayer)||void 0===e?void 0:e.hls_start_level)}));w.startLevel=i?i-1:2,a.quality={default:0,options:n,forced:!0,onChange:function(n){0===n?prestoHLS.currentLevel=-1:prestoHLS.levels.forEach((function(e,r){e.height===n&&(console.log("Found quality match with "+n),prestoHLS.currentLevel=r)}))}},w.attachMedia(o),window.prestoHLS=w;var u=new r(o,e({},a));return u.hls=w,u.on("waiting",(function n(){w.startLoad(-1),u.off("waiting",n)})),u.on("languagechange",(function(){setTimeout((function(){return w.subtitleTrack=u.currentTrack}),50)})),t(u)})),n.abrupt("return");case 16:if(!o.canPlayType("application/vnd.apple.mpegurl")){n.next=18;break}return n.abrupt("return",t(new r(o,e({},a))));case 18:return n.abrupt("return",t(new r(o,e({},a))));case 19:case"end":return n.stop()}}),n)})));return function(n,e){return t.apply(this,arguments)}}())}
1
+ import{m as n,a as e}from"./p-3e9a58ac.js";import{P as r}from"./p-4338b6d7.js";export default function(t){var a=t.config,o=t.selector,i=t.src,u=t.preload;return new Promise(function(){var t=n(regeneratorRuntime.mark((function n(t){var c,s,w;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(window.Hls){n.next=6;break}case 1:if(window.hasOwnProperty("Hls")){n.next=6;break}return n.next=4,new Promise((function(n){return setTimeout(n,50)}));case 4:n.next=1;break;case 6:if(!window.Hls.isSupported()){n.next=16;break}return s=!["metadata","none"].includes(u),null!==(c=wp)&&void 0!==c&&c.blocks&&(s=!0),(w=new window.Hls({autoStartLoad:s})).loadSource(i),w.on(window.Hls.Events.LEVEL_SWITCHED,(function(n,e){o.closest(".presto-player__wrapper").querySelector(".plyr__menu__container [data-plyr='quality'][value='0'] span").innerHTML=w.autoLevelEnabled?"AUTO (".concat(w.levels[e.level].height,"p)"):"AUTO"})),w.on(window.Hls.Events.MANIFEST_PARSED,(function(){var n=w.levels.map((function(n){return n.height}));n.unshift(0);var i=n.findIndex((function(n){var e;return n===parseInt(null===(e=prestoPlayer)||void 0===e?void 0:e.hls_start_level)}));w.startLevel=i?i-1:2,a.quality={default:0,options:n,forced:!0,onChange:function(n){0===n?prestoHLS.currentLevel=-1:prestoHLS.levels.forEach((function(e,r){e.height===n&&(console.log("Found quality match with "+n),prestoHLS.currentLevel=r)}))}},w.attachMedia(o),window.prestoHLS=w;var u=new r(o,e({},a));return u.hls=w,u.on("waiting",(function n(){w.startLoad(-1),u.off("waiting",n)})),u.on("languagechange",(function(){setTimeout((function(){return w.subtitleTrack=u.currentTrack}),50)})),t(u)})),n.abrupt("return");case 16:if(!o.canPlayType("application/vnd.apple.mpegurl")){n.next=18;break}return n.abrupt("return",t(new r(o,e({},a))));case 18:return n.abrupt("return",t(new r(o,e({},a))));case 19:case"end":return n.stop()}}),n)})));return function(n,e){return t.apply(this,arguments)}}())}
dist/components/web-components/{p-16857c3f.entry.js → p-b2b3bfdb.entry.js} RENAMED
@@ -1 +1 @@
1
- export{a as presto_action_bar,b as presto_action_bar_controller,c as presto_action_bar_ui,d as presto_audio,e as presto_bunny,f as presto_business_skin,g as presto_cta_overlay,h as presto_cta_overlay_controller,C as presto_cta_overlay_ui,i as presto_dynamic_overlay_ui,j as presto_dynamic_overlays,k as presto_email_overlay,l as presto_email_overlay_controller,E as presto_email_overlay_ui,m as presto_modern_skin,n as presto_muted_overlay,o as presto_player,p as presto_player_button,q as presto_player_spinner,s as presto_stacked_skin,t as presto_timestamp,u as presto_video,v as presto_vimeo,w as presto_youtube,x as presto_youtube_subscribe_button}from"./p-37e4ab3e.js";import"./p-3e9a58ac.js";
1
+ export{a as presto_action_bar,b as presto_action_bar_controller,c as presto_action_bar_ui,d as presto_audio,e as presto_bunny,f as presto_business_skin,g as presto_cta_overlay,h as presto_cta_overlay_controller,C as presto_cta_overlay_ui,i as presto_dynamic_overlay_ui,j as presto_dynamic_overlays,k as presto_email_overlay,l as presto_email_overlay_controller,E as presto_email_overlay_ui,m as presto_modern_skin,n as presto_muted_overlay,o as presto_player,p as presto_player_button,q as presto_player_spinner,s as presto_stacked_skin,t as presto_timestamp,u as presto_video,v as presto_vimeo,w as presto_youtube,x as presto_youtube_subscribe_button}from"./p-4338b6d7.js";import"./p-3e9a58ac.js";
dist/components/web-components/web-components.esm.js CHANGED
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-3e9a58ac.js";var r,o;(r=import.meta.url,o={},""!==r&&(o.resourcesUrl=new URL(".",r).href),e(o)).then((e=>t([["p-5f63f270",[[1,"presto-player-skeleton",{effect:[1]}]]],["p-a9751bf2",[[1,"presto-video-curtain-ui",{actionUrl:[1,"action-url"]}]]],["p-16857c3f",[[1,"presto-player",{video_id:[2],iconUrl:[1,"icon-url"],src:[1],bunny:[16],branding:[16],config:[16],preset:[16],chapters:[16],overlays:[16],blockAttributes:[16],tracks:[16],analytics:[4],automations:[4],provider:[1],provider_video_id:[1],actionBar:[16],youtube:[16],type:[1],autoplay:[1540],preload:[1],poster:[1],playsinline:[4],isAdmin:[4,"is-admin"],direction:[1],css:[1],currentTime:[2,"current-time"],mediaTitle:[1,"media-title"],classes:[1],videoAttributes:[16],audioAttributes:[16],player:[32],playerEl:[32],shouldLazyLoad:[32],mutedPreview:[32],duration:[32],isSticky:[32],videoHeight:[32],playClass:[32],previouslyPlaying:[32],ctaActive:[32],emailActive:[32],actionBarActive:[32],play:[64],goToAndPlay:[64],restart:[64],pause:[64],stop:[64],fullscreenToggle:[64],on:[64],once:[64],off:[64]},[[8,"currentMediaPlayer","handleScroll"],[0,"restartVideo","handleRestartVideo"],[0,"playVideo","handlePlayVideo"],[0,"pauseVideo","handlePauseVideo"],[8,"visibilitychange","playVideoOnlyInViewport"],[0,"ctaStateChange","handleCtaStateChange"],[0,"emailStateChange","handleEmailStateChange"],[0,"actionBarStateChange","handleActionBarStateChange"]]],[4,"presto-timestamp",{time:[1]}],[1,"presto-action-bar",{player:[8],config:[16],direction:[1],youtube:[16],currentTime:[32],duration:[32],ended:[32]}],[0,"presto-cta-overlay",{player:[8],direction:[1],preset:[16],i18n:[16],provider:[1],currentTime:[32],duration:[32],ended:[32]}],[0,"presto-email-overlay",{player:[8],direction:[1],preset:[16],videoId:[2,"video-id"],i18n:[16],provider:[1],currentTime:[32],duration:[32],ended:[32]}],[0,"presto-bunny",{getRef:[1040],autoplay:[4],src:[1],preload:[1],poster:[1025],player:[8],tracks:[16],playsinline:[4],provider:[1],thumbnail:[1],previewUrl:[1,"preview-url"],videoAttributes:[16]}],[1,"presto-dynamic-overlays",{overlays:[16],player:[8],preset:[16],enabled:[4],currentTime:[32],destroy:[32]}],[0,"presto-youtube",{src:[1],poster:[1025],lazyLoad:[1028,"lazy-load"],player:[8],getRef:[1040],reloadPlayer:[32],isWebView:[32]}],[0,"presto-audio",{getRef:[1040],autoplay:[4],src:[1],preload:[1],poster:[1],player:[8],preset:[16],tracks:[16],provider:[1],mediaTitle:[1,"media-title"],audioAttributes:[16],width:[32]}],[4,"presto-business-skin"],[4,"presto-modern-skin"],[0,"presto-muted-overlay",{mutedPreview:[4,"muted-preview"],mutedOverlay:[16],preset:[16]}],[4,"presto-stacked-skin"],[0,"presto-vimeo",{src:[1],poster:[1],player:[8],getRef:[1040]}],[1,"presto-action-bar-controller",{ended:[4],config:[16],currentTime:[514,"current-time"],duration:[514],direction:[1],youtube:[16],show:[32],youtubeRenderKey:[32],percentagePassed:[32]}],[0,"presto-cta-overlay-controller",{ended:[4],currentTime:[514,"current-time"],duration:[514],direction:[1],cta:[16],i18n:[16],provider:[1],enabled:[32],show:[32],loading:[32],error:[32],skipped:[32],percentagePassed:[32]}],[0,"presto-email-overlay-controller",{ended:[4],currentTime:[514,"current-time"],duration:[514],direction:[1],emailCollection:[16],i18n:[16],videoId:[2,"video-id"],presetId:[2,"preset-id"],provider:[1],enabled:[32],show:[32],loading:[32],error:[32],percentagePassed:[32]}],[1,"presto-dynamic-overlay-ui",{href:[1],target:[1],position:[1]}],[1,"presto-cta-overlay-ui",{headline:[1],defaultHeadline:[1,"default-headline"],bottomText:[1,"bottom-text"],showButton:[4,"show-button"],buttonText:[1,"button-text"],buttonType:[1,"button-type"],buttonLink:[16],allowRewatch:[4,"allow-rewatch"],allowSkip:[4,"allow-skip"],direction:[1],i18n:[16],provider:[1],type:[1],isAudioProvider:[32]}],[1,"presto-email-overlay-ui",{headline:[1],bottomText:[1,"bottom-text"],buttonText:[1,"button-text"],allowSkip:[4,"allow-skip"],borderRadius:[2,"border-radius"],isLoading:[4,"is-loading"],errorMessage:[1,"error-message"],direction:[1],i18n:[16],provider:[1],type:[1],email:[32],isAudioProvider:[32]}],[1,"presto-action-bar-ui",{open:[4]}],[0,"presto-video",{getRef:[1040],autoplay:[4],src:[1],preload:[1],poster:[1],player:[8],tracks:[16],playsinline:[4],provider:[1],videoAttributes:[16]}],[0,"presto-youtube-subscribe-button",{channel:[1],layout:[1],showCount:[4,"show-count"]}],[1,"presto-player-spinner"],[1,"presto-player-button",{type:[513],size:[513],full:[516],disabled:[516],submit:[516],name:[1],value:[1],href:[1],target:[513],download:[1],hasFocus:[32],hasLabel:[32],hasPrefix:[32],hasSuffix:[32]}]]]],e)));
1
+ import{p as e,b as t}from"./p-3e9a58ac.js";var r,o;(r=import.meta.url,o={},""!==r&&(o.resourcesUrl=new URL(".",r).href),e(o)).then((e=>t([["p-5f63f270",[[1,"presto-player-skeleton",{effect:[1]}]]],["p-a9751bf2",[[1,"presto-video-curtain-ui",{actionUrl:[1,"action-url"]}]]],["p-b2b3bfdb",[[1,"presto-player",{video_id:[2],iconUrl:[1,"icon-url"],src:[1],bunny:[16],branding:[16],config:[16],preset:[16],chapters:[16],overlays:[16],blockAttributes:[16],tracks:[16],analytics:[4],automations:[4],provider:[1],provider_video_id:[1],actionBar:[16],youtube:[16],type:[1],autoplay:[1540],preload:[1],poster:[1],playsinline:[4],isAdmin:[4,"is-admin"],direction:[1],css:[1],currentTime:[2,"current-time"],mediaTitle:[1,"media-title"],classes:[1],videoAttributes:[16],audioAttributes:[16],player:[32],playerEl:[32],shouldLazyLoad:[32],mutedPreview:[32],duration:[32],isSticky:[32],videoHeight:[32],playClass:[32],previouslyPlaying:[32],ctaActive:[32],emailActive:[32],actionBarActive:[32],play:[64],goToAndPlay:[64],restart:[64],pause:[64],stop:[64],fullscreenToggle:[64],on:[64],once:[64],off:[64]},[[8,"currentMediaPlayer","handleScroll"],[0,"restartVideo","handleRestartVideo"],[0,"playVideo","handlePlayVideo"],[0,"pauseVideo","handlePauseVideo"],[8,"visibilitychange","playVideoOnlyInViewport"],[0,"ctaStateChange","handleCtaStateChange"],[0,"emailStateChange","handleEmailStateChange"],[0,"actionBarStateChange","handleActionBarStateChange"]]],[4,"presto-timestamp",{time:[1]}],[1,"presto-action-bar",{player:[8],config:[16],direction:[1],youtube:[16],currentTime:[32],duration:[32],ended:[32]}],[0,"presto-cta-overlay",{player:[8],direction:[1],preset:[16],i18n:[16],provider:[1],currentTime:[32],duration:[32],ended:[32]}],[0,"presto-email-overlay",{player:[8],direction:[1],preset:[16],videoId:[2,"video-id"],i18n:[16],provider:[1],currentTime:[32],duration:[32],ended:[32]}],[0,"presto-bunny",{getRef:[1040],autoplay:[4],src:[1],preload:[1],poster:[1025],player:[8],tracks:[16],playsinline:[4],provider:[1],thumbnail:[1],previewUrl:[1,"preview-url"],videoAttributes:[16]}],[1,"presto-dynamic-overlays",{overlays:[16],player:[8],preset:[16],enabled:[4],currentTime:[32],destroy:[32]}],[0,"presto-youtube",{src:[1],poster:[1025],lazyLoad:[1028,"lazy-load"],player:[8],getRef:[1040],reloadPlayer:[32],isWebView:[32]}],[0,"presto-audio",{getRef:[1040],autoplay:[4],src:[1],preload:[1],poster:[1],player:[8],preset:[16],tracks:[16],provider:[1],mediaTitle:[1,"media-title"],audioAttributes:[16],width:[32]}],[4,"presto-business-skin"],[4,"presto-modern-skin"],[0,"presto-muted-overlay",{mutedPreview:[4,"muted-preview"],mutedOverlay:[16],preset:[16]}],[4,"presto-stacked-skin"],[0,"presto-vimeo",{src:[1],poster:[1],player:[8],getRef:[1040]}],[1,"presto-action-bar-controller",{ended:[4],config:[16],currentTime:[514,"current-time"],duration:[514],direction:[1],youtube:[16],show:[32],youtubeRenderKey:[32],percentagePassed:[32]}],[0,"presto-cta-overlay-controller",{ended:[4],currentTime:[514,"current-time"],duration:[514],direction:[1],cta:[16],i18n:[16],provider:[1],enabled:[32],show:[32],loading:[32],error:[32],skipped:[32],percentagePassed:[32]}],[0,"presto-email-overlay-controller",{ended:[4],currentTime:[514,"current-time"],duration:[514],direction:[1],emailCollection:[16],i18n:[16],videoId:[2,"video-id"],presetId:[2,"preset-id"],provider:[1],enabled:[32],show:[32],loading:[32],error:[32],percentagePassed:[32]}],[1,"presto-dynamic-overlay-ui",{href:[1],target:[1],position:[1]}],[1,"presto-cta-overlay-ui",{headline:[1],defaultHeadline:[1,"default-headline"],bottomText:[1,"bottom-text"],showButton:[4,"show-button"],buttonText:[1,"button-text"],buttonType:[1,"button-type"],buttonLink:[16],allowRewatch:[4,"allow-rewatch"],allowSkip:[4,"allow-skip"],direction:[1],i18n:[16],provider:[1],type:[1],isAudioProvider:[32]}],[1,"presto-email-overlay-ui",{headline:[1],bottomText:[1,"bottom-text"],buttonText:[1,"button-text"],allowSkip:[4,"allow-skip"],borderRadius:[2,"border-radius"],isLoading:[4,"is-loading"],errorMessage:[1,"error-message"],direction:[1],i18n:[16],provider:[1],type:[1],email:[32],isAudioProvider:[32]}],[1,"presto-action-bar-ui",{open:[4]}],[0,"presto-video",{getRef:[1040],autoplay:[4],src:[1],preload:[1],poster:[1],player:[8],tracks:[16],playsinline:[4],provider:[1],videoAttributes:[16]}],[0,"presto-youtube-subscribe-button",{channel:[1],layout:[1],showCount:[4,"show-count"]}],[1,"presto-player-spinner"],[1,"presto-player-button",{type:[513],size:[513],full:[516],disabled:[516],submit:[516],name:[1],value:[1],href:[1],target:[513],download:[1],hasFocus:[32],hasLabel:[32],hasPrefix:[32],hasSuffix:[32]}]]]],e)));
dist/settings/{admin-68736b19.js → admin-1aadbb22.js} RENAMED
@@ -15,5 +15,5 @@
15
  * Compiled with the help of https://wpack.io
16
  * A zero setup Webpack Bundler Script for WordPress
17
  */
18
- (window.wpackioprestoPlayersettingsJsonp=window.wpackioprestoPlayersettingsJsonp||[]).push([[0],{0:function(e,t){e.exports=window.wp.i18n},1:function(e,t){e.exports=window.wp.components},11:function(e,t){e.exports=window.wp.notices},12:function(e,t){e.exports=window.wp.compose},2:function(e,t){e.exports=window.wp.coreData},32:function(e,t){e.exports=window.wp.apiFetch},35:function(e,t,r){r(36),e.exports=r(51)},51:function(e,t,r){"use strict";r.r(t);var n=r(8),a=r(2),o=r(7),c=r(0);Object(o.dispatch)(a.store).addEntities([{name:"preset",kind:"presto-player",label:Object(c.__)("Presets","presto-player"),baseURL:"presto-player/v1/preset",baseURLParams:{context:"edit"}},{name:"audio-preset",kind:"presto-player",label:Object(c.__)("Audio Presets","presto-player"),baseURL:"presto-player/v1/audio-preset",baseURLParams:{context:"edit"}},{name:"webhook",kind:"presto-player",label:Object(c.__)("Webhook","presto-player"),baseURL:"presto-player/v1/webhook",baseURLParams:{context:"edit"}}]);var l=r(9),s=r(3),i=r(4),p=r.n(i),u=r(1),b=r(11),y=r(27),m=r(28),d=r(19),O=r(29),_=r(30),f=r(23),v=r(5),h=r(31),j=r.n(h);function g(e){return{path:e.pathname,hash:e.hash,query:j.a.parse(e.search)}}var E=r(34),R=Object(E.a)(),w=wp.element.createContext({route:g(R.location)}),P=r(16),k=wp.element.useContext,C="";function S(e){var t=e.path,r=e.onRoute,n=e.children,a=k(w).route,o=Object(P.a)("".concat(t))("".concat(a.hash.substr(1)));return o?(r&&(C!==o.path&&r(),C=o.path),React.createElement("div",null,wp.element.cloneElement(n,{route:o}))):null}var x=r(14),D=r.n(x);function N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var T=wp.element.useContext;function B(e){var t=e.to,r=e.onClick,n=e.children,a=e.activeClassName,o=T(w).route,c=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e);delete c.activeClassName;return React.createElement("a",Object.assign({},c,{className:D()(Object(v.a)({},a,Object(P.a)("".concat(t))("".concat(o.hash.substr(1)))),e.className),onClick:function(e){if(e.preventDefault(),o.path!==t){r&&r(e);var n=R.location.search;R.push("".concat(n,"#").concat(t))}}}),n)}function F(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Object(f.a)(e);if(t){var a=Object(f.a)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return Object(_.a)(this,r)}}var I=function(e){Object(O.a)(r,e);var t=F(r);function r(e){var n;Object(y.a)(this,r),n=t.call(this,e),Object(v.a)(Object(d.a)(n),"handleRouteChange",(function(e){var t=g(null==e?void 0:e.location);n.setState({route:t})})),n.routes=Object.keys(e.routes).map((function(t){return e.routes[t].path})),n.unlisten=R.listen(n.handleRouteChange);var a=g(R.location),o=R.location.search;return n.state={route:a,defaultRoute:null!=e&&e.defaultRoute?"".concat(o,"#").concat(null==e?void 0:e.defaultRoute):"".concat(o,"#/")},n}return Object(m.a)(r,[{key:"componentWillUnmount",value:function(){this.unlisten()}},{key:"render",value:function(){var e=this.props,t=e.children,r=(e.NotFound,this.state),n=r.route,a=r.defaultRoute;if(!n.hash)return R.push(a),React.createElement("div",null);var o=!1;(this.routes||[]).forEach((function(e){var t=Object(P.a)(n.hash.substr(1))("".concat(n.hash.substr(1)));t&&(o={name:e,data:t})}));var c={route:n,matched:o},l=!o;return React.createElement(w.Provider,{value:c},l?React.createElement("div",null,"Not found"):t)}}]),r}(n.Component),A={general:{path:"general"},integrations:{path:"/integrations"},performance:{path:"/performance"}},L=r(33),M=["onSave","children","busy","loading"];function U(e){var t=e.onSave,r=e.children,n=e.busy,c=e.loading,l=Object(L.a)(e,M),s=Object(o.useSelect)((function(e){var t=e(a.store),r=t.__experimentalGetDirtyEntityRecords,n=t.isSavingEntityRecord,o=(r()||[]).filter((function(e){return"webhook"!==e.name}));return{isDirty:o.length>0,isSaving:o.some((function(e){return n(e.kind,e.name,e.key)}))}}),[]),i=s.isDirty,p=s.isSaving,b=!i||p;return c?React.createElement(ScSkeleton,{style:{width:"120px",height:"35px",display:"inline-block"}}):React.createElement(u.Button,Object.assign({isPrimary:!0,"aria-disabled":b,disabled:b||p||n,isBusy:p||n,onClick:b?void 0:t},l),r)}var q=function(e){var t=e.className,r=Object(o.useSelect)((function(e){return e(b.store).getNotices()})),n=Object(o.useDispatch)(b.store).removeNotice,a=r.filter((function(e){return"snackbar"===e.type}));return React.createElement(u.SnackbarList,{notices:a,className:t,onRemove:n})};function W(){var e=Object(o.useDispatch)(a.store).saveEditedEntityRecord;return{save:function(){var t=Object(l.a)(p.a.mark((function t(){var r,n;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(o.select)(a.store).__experimentalGetDirtyEntityRecords(),n=[],r.forEach((function(t){var r=t.kind,a=t.name,o=t.key;n.push(e(r,a,o,{throwOnError:!0}))})),t.next=5,Promise.all(n);case 5:if(!t.sent.some((function(e){return void 0===e}))){t.next=8;break}throw{message:"Saving failed."};case 8:return t.abrupt("return",!0);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()}}var Y,G=wp.i18n.__,z=wp.element.useState,H=wp.components,V=H.Modal,K=H.Button,J=function(e){var t=e.children,r=e.disabled,n=z(!1),a=Object(s.a)(n,2),o=a[0],c=a[1];return r?React.createElement("div",null,React.createElement("div",{className:"presto-options__disabled-overlay",onClick:function(e){return c(!0),e.preventDefault(),!1}},React.createElement("div",null,t)),!!o&&React.createElement(V,{title:null==r?void 0:r.title,onRequestClose:function(){return c(!1)}},React.createElement("h2",null,null==r?void 0:r.heading),React.createElement("p",null,null==r?void 0:r.message),React.createElement(K,{href:null==r?void 0:r.link,target:"_blank",isPrimary:!0},G("Learn More","presto-player")))):React.createElement("div",null,t)},Q=wp.components,X=Q.Card,Z=Q.CardBody,$=Q.CardFooter,ee=function(e){var t=e.title,r=e.description,n=e.children,a=e.disabled,s=e.hideSaveButton,i=W().save,u=Object(o.useDispatch)(b.store),y=u.createSuccessNotice,m=u.createErrorNotice,d=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i();case 3:y(Object(c.__)("Settings Updated","presto-player"),{type:"snackbar"}),e.next=10;break;case 6:e.prev=6,e.t0=e.catch(0),console.error(e.t0),m((null===e.t0||void 0===e.t0?void 0:e.t0.message)||Object(c.__)("Something went wrong","presto-player"));case 10:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}();return React.createElement(J,{disabled:a},React.createElement(X,{size:"large",className:"presto-options__card"},React.createElement(Z,{className:"presto-options__card-body"},React.createElement("div",{className:"presto-flow",style:{"--presto-flow-space":"2em"}},React.createElement("div",{className:"presto-flow",style:{"--presto-flow-space":"1em"}},t&&React.createElement("h2",{style:{marginBottom:0}},t," ",!!a&&React.createElement("div",{className:"presto-options__pro-badge"},"Pro")),r&&React.createElement("p",null,r)),React.createElement("div",null,n))),s?React.createElement("br",null):React.createElement($,{isShady:!0},React.createElement("div",null,React.createElement(U,{onSave:d},Object(c.__)("Update Settings"))))))},te=wp.i18n.__,re=wp.components,ne=re.Button,ae=re.BaseControl,oe=wp.mediaUtils.MediaUpload,ce=(wp.data.dispatch,function(e){var t=e.option,r=e.label,n=e.help,a=e.allowedTypes,o=e.value,c=e.className,l=e.maxWidth,s=e.onSelect;return React.createElement("div",{className:D()(c,"presto-settings__setting is-media-control")},React.createElement(ae,{className:"editor-video-poster-control"},React.createElement(ae.VisualLabel,null,r),o&&React.createElement(ae,null,React.createElement("img",{style:{maxWidth:l,border:"1px solid #dcdcdc"},src:o})),React.createElement("br",null),React.createElement(oe,{title:n,onSelect:s,allowedTypes:a,render:function(e){var t=e.open;return React.createElement(ne,{isSecondary:!0,onClick:t,className:o?"button-replace":"button-select"},te(o?"Replace":"Select","presto-player"))}})," ",React.createElement("p",{id:"video-block__logo-image-description-".concat(null==t?void 0:t.id),hidden:!0},o?sprintf(te("The current logo image url is %s","presto-player"),o):te("There is no logo image currently selected","presto-player")),!!o&&React.createElement(ne,{onClick:function(){return s("")},isTertiary:!0},te("Remove","presto-player"))),React.createElement("br",null))}),le=function(e){var t=e.children,r=e.title,n=e.description;return React.createElement("div",{className:"presto-flow presto-settings__page"},React.createElement("div",{className:"presto-flow",style:{"--presto-flow-space":"1em"}},r&&React.createElement("h1",null,r),n&&React.createElement("p",null,n)),React.createElement("div",{className:"presto-settings__body "},React.createElement("div",{className:"presto-flow"},t)))},se=r(21),ie=r(6),pe=function(e){var t=e.option,r=e.value,a=e.className,o=e.disabled,c=e.onChange,l=function(e){o||(e.save(),c(s.current.value))},s=Object(n.useRef)();return Object(n.useEffect)((function(){var e;null!==(e=wp)&&void 0!==e&&e.CodeMirror&&wp.CodeMirror.fromTextArea(s.current,{type:"text/css",lineNumbers:!0}).on("change",l)}),[]),Object(ie.b)("div",{className:D()(a,"presto-settings__setting")},Object(ie.b)(u.BaseControl,{css:Object(ie.a)(Y||(Y=Object(se.a)(["\n .CodeMirror {\n height: 200px;\n border: 1px solid #e3e3e3;\n border-radius: 4px;\n }\n "]))),label:null==t?void 0:t.name,help:null==t?void 0:t.help},Object(ie.b)("textarea",{onChange:l,ref:s,rows:"5",disabled:!0},r)))};function ue(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ue(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ye,me=function(){var e,t=function(){var e;return(null===(e=prestoPlayer)||void 0===e||!e.isPremium)&&{title:Object(c.__)("Pro Feature","presto-player"),heading:Object(c.__)("Unlock Presto Player Pro","presto-player"),message:Object(c.__)("Get this feature and more with the Pro version of Presto Player!","presto-player"),link:"https://prestoplayer.com"}},r=Object(o.useSelect)((function(e){var t,r,n=["presto-player","preset"],o=["presto-player","audio-preset"];return{presets:(t=e(a.store)).getEntityRecords.apply(t,n),loadingPresets:e(a.store).isResolving("getEntityRecords",n),audioPresets:(r=e(a.store)).getEntityRecords.apply(r,o),loadingAudioPresets:e(a.store).isResolving("getEntityRecords",o)}}),[]),n=r.presets,l=r.loadingPresets,i=r.audioPresets,p=r.loadingAudioPresets,b=Object(a.useEntityProp)("root","site","presto_player_presets"),y=Object(s.a)(b,2),m=y[0],d=y[1],O=Object(a.useEntityProp)("root","site","presto_player_audio_presets"),_=Object(s.a)(O,2),f=_[0],v=_[1],h=Object(a.useEntityProp)("root","site","presto_player_analytics"),j=Object(s.a)(h,2),g=j[0],E=j[1],R=function(e){E(be(be({},g||{}),e))},w=Object(a.useEntityProp)("root","site","presto_player_branding"),P=Object(s.a)(w,2),k=P[0],C=P[1],S=function(e){C(be(be({},k||{}),e))},x=Object(a.useEntityProp)("root","site","presto_player_uninstall"),D=Object(s.a)(x,2),N=D[0],T=D[1];return React.createElement(le,{title:Object(c.__)("General","presto-player"),description:Object(c.__)("Branding, analytics and uninstall data.","presto-player")},React.createElement(ee,{title:Object(c.__)("Branding","presto-player"),description:Object(c.__)("Global player branding options","presto-player")},React.createElement(J,{disabled:t()},React.createElement(ce,{className:"presto-player__setting--logo",label:React.createElement(React.Fragment,null,Object(c.__)("Logo","presto-player")," ",t()&&React.createElement("span",{className:"presto-options__pro-badge"},Object(c.__)("Pro","presto-player"))),onSelect:function(e){return S({logo:null==e?void 0:e.url})},maxWidth:(null==k?void 0:k.logo_width)||150,value:null==k?void 0:k.logo}),React.createElement("div",{style:{maxWidth:"500px"}},React.createElement(u.RangeControl,{className:"presto-player__setting--logo-width",label:Object(c.__)("Logo Max Width","presto-player"),value:(null==k?void 0:k.logo_width)||150,onChange:function(e){return S({logo_width:e})},min:1,max:400}))),React.createElement(u.ColorPicker,{className:"presto-player__setting--brand-color",onChangeComplete:function(e){return S({color:e.hex})},color:null==k?void 0:k.color})),React.createElement(ee,{title:Object(c.__)("Analytics","presto-player"),disabled:t(),description:Object(c.__)("Analytics settings for media plays, watch times and more.","presto-player")},React.createElement("div",null,React.createElement(u.ToggleControl,{className:"presto-player__setting--analytics-enable",label:Object(c.__)("Enable","presto-player"),help:Object(c.__)("Enable view analytics for your media","presto-player"),checked:null==g?void 0:g.enable,onChange:function(e){return R({enable:e})}}),!(null==g||!g.enable)&&React.createElement(u.ToggleControl,{label:Object(c.__)("Auto-Purge Data (recommended)"),help:Object(c.__)("Automatically purge data older than 90 days.","presto-player"),className:"presto-player__setting--analytics-enable",checked:void 0===(null==g?void 0:g.purge_data)||(null==g?void 0:g.purge_data),onChange:function(e){return R({purge_data:e})}}))),React.createElement(ee,{title:Object(c.__)("Presets","presto-player"),disabled:t(),description:Object(c.__)("Media presets settings.","presto-player")},l?React.createElement(u.Spinner,null):React.createElement(u.ComboboxControl,{label:Object(c.__)("Select default preset for video.","presto-player"),value:null==m?void 0:m.default_player_preset,options:(n||[]).map((function(e){return{value:null==e?void 0:e.id,label:null==e?void 0:e.name}})),onChange:function(e){return t={default_player_preset:e||1},void d(be(be({},m||{}),t));var t}}),p?React.createElement(u.Spinner,null):React.createElement(u.ComboboxControl,{label:Object(c.__)("Select default preset for audio.","presto-player"),value:null==f?void 0:f.default_player_preset,options:(i||[]).map((function(e){return{value:null==e?void 0:e.id,label:null==e?void 0:e.name}})),onChange:function(e){return t={default_player_preset:e||1},void v(be(be({},f||{}),t));var t}})),React.createElement(ee,{disabled:t(),title:Object(c.__)("Custom CSS","presto-player"),description:Object(c.__)("Quickly add custom css to the player web component.","presto-player")},React.createElement(pe,{disabled:!(null!==(e=prestoPlayer)&&void 0!==e&&e.isPremium),option:{id:"player_css"},value:null==k?void 0:k.player_css,key:null==k?void 0:k.player_css,onChange:function(e){return S({player_css:e})}})),React.createElement(ee,{title:Object(c.__)("Uninstall Options","presto-player"),description:Object(c.__)("Options to remove data on uninstall.","presto-player")},React.createElement(u.ToggleControl,{label:Object(c.__)("Remove data on uninstall"),help:Object(c.__)("This removes all data on uninstall.","presto-player"),className:"presto-player__setting--uninstall",checked:null==N?void 0:N.uninstall_data,onChange:function(e){var t;if(e&&!confirm(Object(c.__)("Caution: Data Loss. Are you sure you want to remove all the data from this plugin? This is irreversible!","presto-player")))return;t={uninstall_data:e},T(be(be({},N||{}),t))}})))};function de(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Oe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?de(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):de(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var _e=function(){var e=Object(a.useEntityProp)("root","site","presto_player_performance"),t=Object(s.a)(e,2),r=t[0],n=t[1],o=function(e){n(Oe(Oe({},r||{}),e))};return Object(ie.b)(le,{title:Object(c.__)("Performance","presto-player"),description:Object(c.__)("Player performance preferences.","presto-player")},Object(ie.b)(ee,{title:Object(c.__)("Performance","presto-player"),description:Object(c.__)("Performance options for player loading.","presto-player")},Object(ie.b)("div",null,Object(ie.b)(u.ToggleControl,{className:"presto-player__setting--module-enabled",label:Object(c.__)("Dynamically Load JavaScript","presto-player"),help:Object(c.__)("Dynamically load javascript modules on the page which can significantly reduce javascript size and increase performance.","presto-player"),checked:null==r?void 0:r.module_enabled,onChange:function(e){return o({module_enabled:e})}}),!(null==r||!r.module_enabled)&&Object(ie.b)(u.Notice,{css:Object(ie.a)(ye||(ye=Object(se.a)(["\n background: #f3f4f5 !important;\n margin-bottom: 20px !important;\n "]))),className:"presto-notice",status:"info",isDismissible:!1},Object(ie.b)("div",null,Object(ie.b)("strong",null,Object(c.__)("Please Note","presto-player"))),Object(ie.b)("div",null,Object(c.__)("You may need to exclude the player script from combining, as well as enable CORS requests for some CDNs.","presto-player")," ",Object(ie.b)(u.ExternalLink,{href:"https://prestoplayer.com/docs/performance-preferences-explained#global-player-performance-setting"},Object(c.__)("Learn More","presto-player"))))),Object(ie.b)(u.ToggleControl,{className:"presto-player__setting--automations",label:Object(c.__)("Enable Ajax Requests for Progress Integrations","presto-player"),help:Object(c.__)("Keep this on unless you do not plan on using automation, LMS or membership integrations.","presto-player"),checked:null==r?void 0:r.automations,onChange:function(e){return o({automations:e})}})))};function fe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ve(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var he=function(){var e=Object(a.useEntityProp)("root","site","presto_player_bunny_pull_zones"),t=Object(s.a)(e,2),r=t[0],n=t[1],o=function(e){n(ve(ve({},r||{}),e))},l=r||{},i=l.public_id,p=l.public_hostname,b=l.private_id,y=l.private_hostname,m=l.private_security_key;return React.createElement(React.Fragment,null,React.createElement("h2",{style:{marginTop:"40px"}},Object(c.__)("Bunny.net Storage (Classic)","presto-player")),React.createElement("p",{style:{fontSize:"12px",color:"#757575"}},Object(c.__)('Note: To Change your API key, please click "Reconnect" from a bunny block.',"presto-player")),React.createElement(u.TextControl,{label:Object(c.__)("Public ID","presto-player"),help:Object(c.__)("The ID of the public pull zone to use.","presto-player"),value:i,onChange:function(e){return o({public_id:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Public Host Name","presto-player"),help:Object(c.__)("The hostname to use for this pullzone.","presto-player"),value:p,onChange:function(e){return o({public_hostname:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private ID","presto-player"),help:Object(c.__)("The ID of the private pull zone to use.","presto-player"),value:b,onChange:function(e){return o({private_id:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private Host Name","presto-player"),help:Object(c.__)("The hostname to use for the private pullzone.","presto-player"),value:y,onChange:function(e){return o({private_hostname:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private Url Token Authentication Key","presto-player"),help:Object(c.__)("Update the security token used to sign private urls.","presto-player"),type:"password",value:m,onChange:function(e){return o({private_security_key:e})}}))};function je(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ge(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?je(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):je(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ee=function(){var e=Object(a.useEntityProp)("root","site","presto_player_bunny_stream_public"),t=Object(s.a)(e,2),r=t[0],n=t[1],o=function(e){n(ge(ge({},r||{}),e))},l=r||{},i=l.video_library_api_key,p=l.pull_zone_url,b=l.video_library_id;return React.createElement(React.Fragment,null,React.createElement(u.TextControl,{label:Object(c.__)("Public Stream Library ID","presto-player"),help:Object(c.__)("The ID of the video library to use.","presto-player"),value:b,onChange:function(e){return o({video_library_id:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Public Stream Library API Key","presto-player"),help:Object(c.__)("The API key for the above video library for read/write access.","presto-player"),value:i,onChange:function(e){return o({video_library_api_key:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Public Stream CDN Hostname","presto-player"),help:Object(c.__)("The public cdn hostname for the video library.","presto-player"),value:p,onChange:function(e){return o({pull_zone_url:e})}}))};function Re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function we(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Pe=function(){var e=Object(a.useEntityProp)("root","site","presto_player_bunny_stream_private"),t=Object(s.a)(e,2),r=t[0],n=t[1],o=function(e){n(we(we({},r||{}),e))},l=r||{},i=l.video_library_api_key,p=l.pull_zone_url,b=l.video_library_id,y=l.token_auth_key;return React.createElement(React.Fragment,null,React.createElement(u.TextControl,{label:Object(c.__)("Private Stream Library ID","presto-player"),help:Object(c.__)("The ID of the video library to use.","presto-player"),value:b,onChange:function(e){return o({video_library_id:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private Stream Library API Key","presto-player"),help:Object(c.__)("The API key for the above video library for read/write access.","presto-player"),value:i,onChange:function(e){return o({video_library_api_key:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private Stream CDN Hostname","presto-player"),help:Object(c.__)("The public cdn hostname for the video library.","presto-player"),value:p,onChange:function(e){return o({pull_zone_url:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private Stream Token Authentication Key","presto-player"),help:Object(c.__)("The token authentication key used to sign private urls.","presto-player"),value:y,onChange:function(e){return o({token_auth_key:e})}}))},ke=function(){var e=Object(a.useEntityProp)("root","site","presto_player_bunny_stream_public"),t=Object(s.a)(e,2),r=t[0];t[1];return r?React.createElement(React.Fragment,null,React.createElement("h2",{style:{marginTop:"40px"}},Object(c.__)("Bunny.net Stream","presto-player")),React.createElement(Ee,null),React.createElement(Pe,null)):null},Ce=wp.i18n.__,Se=wp.components,xe=Se.Button,De=Se.Panel,Ne=Se.PanelBody,Te=Se.Flex,Be=Se.FlexBlock,Fe=Se.Notice,Ie=Se.Spinner,Ae=wp.element,Le=Ae.useState,Me=Ae.useEffect,Ue=function(){var e=Le(0),t=Object(s.a)(e,2),r=t[0],n=t[1],a=Le(0),o=Object(s.a)(a,2),c=o[0],i=o[1],u=Le(""),b=Object(s.a)(u,2),y=b[0],m=b[1],d=Le(0),O=Object(s.a)(d,2),_=O[0],f=O[1],v=function(){var e=Object(l.a)(p.a.mark((function e(){var t,a,o,c;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(""),e.prev=1,e.next=4,wp.apiFetch({path:"/presto-player/v1/email/export",method:"post",data:{step:r}});case 4:t=e.sent,a=t.percentage,o=t.step,c=t.url,n(o),i(a),f(c),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(1),i(0),m((null===e.t0||void 0===e.t0?void 0:e.t0.message)||Ce("Something went wrong","presto-player"));case 17:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(){return e.apply(this,arguments)}}();return Me((function(){r&&"done"!=r&&v()}),[r]),Me((function(){_&&window.open(_)}),[_]),React.createElement(De,null,React.createElement(Ne,{title:React.createElement(Te,null,React.createElement(Be,null,Ce("Other","presto-player"))),initialOpen:!1},React.createElement("h2",null,Ce("Manual Export","presto-player")),React.createElement("p",null,Ce("Using a service not listed here? You can export contacts and manually upload them to a service.","presto-player")),y&&React.createElement(Fe,{className:"presto-notice",status:"error",onRemove:function(){return m("")}},y),React.createElement(Te,{align:"center",justify:"flex-start"},React.createElement(xe,{isPrimary:!0,onClick:function(e){n(1),i(1),e.preventDefault()}},Ce("Download CSV File","presto-player")),!!c&&React.createElement("div",{style:{display:"flex",alignItems:"center"}},React.createElement(Ie,{style:{marginTop:0}}),React.createElement("span",null,"Exporting... ",c,"% Complete")))))},qe=r(12),We=wp.i18n.__,Ye=wp.components,Ge=Ye.Button,ze=Ye.Panel,He=Ye.PanelBody,Ve=Ye.Flex,Ke=Ye.Modal,Je=Ye.FlexBlock,Qe=Ye.FlexItem,Xe=Ye.PanelRow,Ze=wp.element.useState,$e=function(e){var t=e.connected,r=e.title,n=e.children,a=e.onConnect,o=e.isBusy,c=e.connectButtonText,l=e.disconnectButtonText,i=e.onDisconnect,p=Ze(!1),u=Object(s.a)(p,2),b=u[0],y=u[1];return React.createElement(ze,null,React.createElement(He,{title:React.createElement(Ve,null,React.createElement(Je,null,r),React.createElement(Qe,null,t?React.createElement(Ge,{isSmall:!0,isPrimary:!0,style:{marginRight:"30px"}},We("Connected","presto-player")):React.createElement(Ge,{isSmall:!0,isSecondary:!0,style:{marginRight:"30px"}},We("Not Connected","presto-player")))),initialOpen:!1},React.createElement("form",{onSubmit:function(e){e.preventDefault(),a()},disabled:o},n,React.createElement(Xe,null,React.createElement("div",null,t?React.createElement("div",null," ",React.createElement(Ge,{isSecondary:!0,isBusy:o,disabled:o,onClick:function(e){e.preventDefault(),y(!0)}},l||We("Disconnect","presto-player"))):React.createElement(Ge,{isPrimary:!0,isBusy:o,disabled:o,type:"submit"},c||We("Connect","presto-player")))))),b&&React.createElement(Ke,{className:"presto-player__modal-confirm",title:We("Are you sure?","presto-player"),style:{"max-width":"350px"},onRequestClose:function(){return y(!1)}},React.createElement("p",null,We("Are you sure you want to disconnect this integration?","presto-player")),React.createElement(Ge,{className:"presto-player__modal-confirm-button",isDestructive:!0,onClick:function(){i&&i(),y(!1)}},We("Disconnect","presto-player")),React.createElement(Ge,{onClick:function(){return y(!1)}},We("Cancel","presto-player"))))},et=wp.components.TextControl,tt=wp.data.dispatch,rt=function(e){var t=e.option,r=e.value,n=e.optionName,a=e.className;return React.createElement("div",{className:"presto-settings__setting is-text-control"},React.createElement(et,Object.assign({className:D()(a,"presto-settings__setting is-media-control"),label:null==t?void 0:t.name,value:r,type:null==t?void 0:t.type,help:null==t?void 0:t.help,placeholder:null==t?void 0:t.placeholder,onChange:function(e){return tt("presto-player/settings").updateSetting(t.id,e,n)}},e)))},nt=r(32),at=r.n(nt);function ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ct(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var lt=function(e){var t=e.name;return Object(qe.createHigherOrderComponent)((function(e){return function(r){var o=Object(n.useState)(""),i=Object(s.a)(o,2),u=i[0],b=i[1],y=Object(n.useState)(""),m=Object(s.a)(y,2),d=m[0],O=m[1],_=Object(n.useState)(!1),f=Object(s.a)(_,2),v=f[0],h=f[1],j=Object(a.useEntityProp)("root","site",t),g=Object(s.a)(j,2),E=g[0],R=g[1],w=function(){var e=Object(l.a)(p.a.mark((function e(t){var r,n,a,o,l,s,i,u;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.path,n=t.data,a=void 0===n?{}:n,o=t.message,l=void 0===o?Object(c.__)("Success","presto-player"):o,s=t.success,i=t.error,b(""),O(""),h(!0),e.prev=4,e.next=7,at()({path:r,method:"post",data:a});case 7:u=e.sent,s&&s(u),O(l),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),null!==e.t0&&void 0!==e.t0&&e.t0.message&&(b(e.t0.message),i&&i(e.t0));case 15:return e.prev=15,h(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[4,12,15,18]])})));return function(t){return e.apply(this,arguments)}}();return React.createElement(e,Object.assign({success:d,setSuccess:O,setError:b,error:u,isBusy:v,setting:E,updateSetting:function(e){R(ct(ct({},E||{}),e))},makeRequest:w},r))}}),"withIntegration")};function st(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var it=Object(qe.compose)([lt({name:"presto_player_activecampaign"})])((function(e){var t=e.success,r=e.setSuccess,n=e.error,a=e.setError,o=e.isBusy,s=e.makeRequest,i=e.setting,b=e.updateSetting,y=function(e){b(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?st(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):st(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e))},m=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s({path:"/presto-player/v1/activecampaign/disconnect",message:Object(c.__)("Disconnected","presto-player"),success:y,error:y});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return React.createElement($e,{title:Object(c.__)("ActiveCampaign"),connected:null==i?void 0:i.connected,onConnect:function(){s({path:"/presto-player/v1/activecampaign/connect",data:{api_key:null==i?void 0:i.api_key,url:null==i?void 0:i.url},message:Object(c.__)("Connected","presto-player"),success:y,error:y})},onDisconnect:m,isBusy:o},n&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"error",onRemove:function(){return a("")}},n)),t&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"success",onRemove:function(){return r("")}},t)),React.createElement(u.PanelRow,null,React.createElement(u.BaseControl,null,React.createElement(rt,{label:Object(c.__)("Your ActiveCampaign Url","presto-player"),type:"url",help:Object(c.__)("You can find this on your Settings > Developer page.","presto-player"),value:null==i?void 0:i.url,onChange:function(e){return b({url:e})}}),React.createElement(rt,{label:Object(c.__)("Your ActiveCampaign API key","presto-player"),help:Object(c.__)("You can find this on your Settings > Developer page.","presto-player"),value:null==i?void 0:i.api_key,onChange:function(e){return b({api_key:e})}}))))}));function pt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var ut=Object(qe.compose)([lt({name:"presto_player_fluentcrm"})])((function(e){var t=e.error,r=e.setError,n=e.isBusy,a=e.makeRequest,o=e.setting,s=e.updateSetting,i=function(e){s(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pt(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e))},b=(o||{}).connected,y=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a({path:"/presto-player/v1/fluentcrm/disconnect",message:Object(c.__)("Deactivated","presto-player"),success:i,error:i});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return React.createElement($e,{title:Object(c.__)("FluentCRM"),connected:b,onConnect:function(){a({path:"/presto-player/v1/fluentcrm/connect",message:Object(c.__)("Installed and connected","presto-player"),success:i,error:i})},onDisconnect:y,connectButtonText:Object(c.__)("Install FluentCRM Plugin","presto-player"),disconnectButtonText:Object(c.__)("Deactivate FluentCRM Plugin","presto-player"),isBusy:n},t&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"error",onRemove:function(){return r("")}},t)),b&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"success",isDismissible:!1},Object(c.__)("Installed and connected!","presto-player"))))}));function bt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var yt=Object(qe.compose)([lt({name:"presto_player_mailchimp"})])((function(e){var t=e.success,r=e.setSuccess,n=e.error,a=e.setError,o=e.isBusy,s=e.makeRequest,i=e.setting,b=e.updateSetting,y=i||{},m=y.api_key,d=y.connected,O=function(e){b(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e))},_=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s({path:"/presto-player/v1/mailchimp/disconnect",message:Object(c.__)("Disconnected","presto-player"),success:O,error:O});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return React.createElement($e,{title:Object(c.__)("Mailchimp"),connected:d,onDisconnect:_,onConnect:function(){s({path:"/presto-player/v1/mailchimp/connect",data:{api_key:m},message:Object(c.__)("Connected","presto-player"),success:O,error:O})},isBusy:o},n&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"error",onRemove:function(){return a("")}},n)),t&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"success",onRemove:function(){return r("")}},t)),React.createElement(u.PanelRow,null,React.createElement(u.BaseControl,null,React.createElement(rt,{className:"presto-player__setting--mailchimp-api_key",label:Object(c.__)("Your Mailchimp API key","presto-player"),help:React.createElement("p",null,Object(c.__)("You can create a new key on your mailchimp account page.","presto-player")," ",React.createElement(u.ExternalLink,{href:"https://us11.admin.mailchimp.com/account/api/"},Object(c.__)("Get My API Key","presto-player"))),value:m,onChange:function(e){return b({api_key:e})}}))))}));function mt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var dt=Object(qe.compose)([lt({name:"presto_player_mailerlite"})])((function(e){var t=e.success,r=e.setSuccess,n=e.error,a=e.setError,o=e.isBusy,s=e.makeRequest,i=e.setting,b=e.updateSetting,y=i||{},m=y.api_key,d=y.connected,O=function(e){b(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mt(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e))},_=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s({path:"/presto-player/v1/mailerlite/disconnect",message:Object(c.__)("Disconnected","presto-player"),success:O,error:O});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return React.createElement($e,{title:Object(c.__)("Mailerlite"),connected:d,onDisconnect:_,onConnect:function(){s({path:"/presto-player/v1/mailerlite/connect",data:{api_key:m},message:Object(c.__)("Connected","presto-player"),success:O,error:O})},isBusy:o},n&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"error",onRemove:function(){return a("")}},n)),t&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"success",onRemove:function(){return r("")}},t)),React.createElement(u.PanelRow,null,React.createElement(u.BaseControl,null,React.createElement(rt,{className:"presto-player__setting--mailerlite-api_key",label:Object(c.__)("Your MailerLite API key","presto-player"),help:React.createElement("p",null,Object(c.__)("You can create a new key on your MailerLite account page.","presto-player")," ",React.createElement(u.ExternalLink,{href:"https://app.mailerlite.com/integrations/api/"},Object(c.__)("Get My API Key","presto-player"))),value:m,onChange:function(e){return b({api_key:e})}}))))})),Ot=r(22);function _t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ft(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_t(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var vt=function(e){var t=e.headers,r=e.setHeaders,n=function(e,n){r((t||[]).map((function(t,r){return r!==n?t:ft(ft({},t),e)})))};return React.createElement(React.Fragment,null,(t||[]).map((function(e,a){var o=e.name,l=e.value;return React.createElement(u.Flex,{key:a,align:"center"},React.createElement(u.TextControl,{placeholder:Object(c.__)("Header Name","presto-player"),value:o,onChange:function(e){return n({name:e},a)}}),React.createElement(u.TextControl,{placeholder:Object(c.__)("New Value","presto-player"),value:l,onChange:function(e){return n({value:e},a)}}),React.createElement(u.BaseControl,null,React.createElement(u.ToolbarButton,{icon:"trash",onClick:function(){return function(e){return r((t||[]).filter((function(t,r){return r!==e})))}(a)}})))})),React.createElement("div",null,React.createElement(u.Button,{isSecondary:!0,isSmall:!0,onClick:function(){return e={name:"",value:""},void r([].concat(Object(Ot.a)(t||[]),[e]));var e}},Object(c.__)("Add Header","presto-player"))))};function ht(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function jt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ht(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ht(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var gt=function(e){var t=e.onClose,r=e.webhook,i=Object(o.useDispatch)(a.store).saveEntityRecord,y=Object(o.useDispatch)(b.store),m=y.createSuccessNotice,d=y.createErrorNotice,O=Object(n.useState)(!1),_=Object(s.a)(O,2),f=_[0],v=_[1],h=Object(n.useState)(r||{email_name:"email",method:"POST"}),j=Object(s.a)(h,2),g=j[0],E=j[1],R=function(e){E(jt(jt({},g||{}),e))},w=g.name,P=g.url,k=g.method,C=g.email_name,S=g.headers,x=(g.archived,function(){var e=Object(l.a)(p.a.mark((function e(r){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r.preventDefault(),v(!0),e.next=5,i("presto-player","webhook",jt({},g));case 5:m(null!=g&&g.id?Object(c.__)("Webhook updated","presto-player"):Object(c.__)("Webhook created.","presto-player"),{type:"snackbar"}),t(),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.error(e.t0),d((null===e.t0||void 0===e.t0?void 0:e.t0.message)||Object(c.__)("Something went wrong.","presto-player"),{type:"snackbar"});case 13:return e.prev=13,v(!1),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[0,9,13,16]])})));return function(t){return e.apply(this,arguments)}}());return Object(ie.b)(u.Modal,{title:null!=g&&g.id?Object(c.__)("Edit Webhook","presto-player"):Object(c.__)("Add A Webhook","presto-player"),onRequestClose:t,shouldCloseOnClickOutside:!1},Object(ie.b)("form",{onSubmit:x},Object(ie.b)(u.TextControl,{label:Object(c.__)("Name","presto-player"),placeholder:Object(c.__)("Webhook feed name","presto-player"),value:w,onChange:function(e){return R({name:e})},required:!0,autoFocus:!0}),Object(ie.b)(u.TextControl,{label:Object(c.__)("Request URL","presto-player"),placeholder:Object(c.__)("Webhook URL","presto-player"),type:"url",value:P,onChange:function(e){return R({url:e})},required:!0}),Object(ie.b)(u.SelectControl,{label:Object(c.__)("Request Method","presto-player"),value:k,options:[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"PUT",value:"PUT"}],onChange:function(e){return R({method:e})},required:!0}),Object(ie.b)(u.TextControl,{label:Object(c.__)("Email Name","presto-player"),placeholder:Object(c.__)("The name (key) of the email sent.","presto-player"),value:C,onChange:function(e){return R({email_name:e})},required:!0}),Object(ie.b)("div",{css:{margin:"0 0 1.5rem"}},Object(ie.b)(u.BaseControl.VisualLabel,null,Object(c.__)("Headers","presto-player")),Object(ie.b)(vt,{headers:S,setHeaders:function(e){return R({headers:e})}})),Object(ie.b)(u.Button,{isPrimary:!0,type:"submit",isBusy:f},null!=g&&g.id?Object(c.__)("Update","presto-player"):Object(c.__)("Create","presto-player"))))},Et=function(e){var t=e.webhook,r=Object(n.useState)(!1),i=Object(s.a)(r,2),y=(i[0],i[1],Object(n.useState)(!1)),m=Object(s.a)(y,2),d=m[0],O=m[1],_=Object(o.useDispatch)(a.store),f=_.deleteEntityRecord,v=(_.saveEntityRecord,Object(o.useDispatch)(b.store)),h=v.createSuccessNotice,j=v.createErrorNotice,g=Object(o.useSelect)((function(e){var r=["presto-player","webhook",null==t?void 0:t.id],n=e(a.store),o=n.getEditedEntityRecord,c=n.isSavingEntityRecord,l=n.isDeletingEntityRecord;return{webhook:o.apply(void 0,r),loading:e(a.store).isResolving("getEditedEntityRecord",r),isSaving:c.apply(void 0,r),isDeleting:l.apply(void 0,r)}}),[]),E=g.webhook,R=g.loading,w=g.isSaving,P=g.isDeleting,k=E||{},C=k.name,S=k.url;console.log({isDeleting:P});var x=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,confirm(Object(c.__)("Are you sure you want to delete this webhook?","presto-player"))){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,f("presto-player","webhook",null==E?void 0:E.id,void 0,{throwOnError:!0});case 6:h(Object(c.__)("Webhook deleted.","presto-player"),{type:"snackbar"}),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.error(e.t0),j((null===e.t0||void 0===e.t0?void 0:e.t0.message)||Object(c.__)("Something went wrong","presto-player"),{type:"snackbar"});case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}();return R?React.createElement(u.Spinner,null):React.createElement(u.Card,null,React.createElement(u.CardBody,null,React.createElement(u.Flex,{align:"center"},React.createElement(u.FlexBlock,null,React.createElement("strong",null,C||Object(c.__)("Untitled webhook","presto-player")),React.createElement("br",null),S),React.createElement(u.FlexItem,null,React.createElement(u.Flex,{align:"center"},w||P?React.createElement(u.Spinner,null):React.createElement(React.Fragment,null,React.createElement(u.ToolbarButton,{icon:"edit",label:"Edit",onClick:function(){return O(!0)}}),React.createElement(u.ToolbarButton,{icon:"trash",label:Object(c.__)("Delete","presto-player"),onClick:x})))))),d&&React.createElement(gt,{onClose:function(){return O(!1)},webhook:t}))},Rt=function(){var e=Object(n.useState)(!1),t=Object(s.a)(e,2),r=t[0],l=t[1],i=Object(o.useSelect)((function(e){var t,r=["presto-player","webhook"];return{webhooks:(t=e(a.store)).getEntityRecords.apply(t,r),loading:e(a.store).isResolving("getEntityRecords",r)}}),[]),p=i.webhooks,b=i.loading;return React.createElement(u.Panel,null,React.createElement(u.PanelBody,{title:React.createElement(u.Flex,null,React.createElement(u.FlexBlock,null,Object(c.__)("Webhooks","presto-player")),!(null==p||!p.length)&&React.createElement(u.Button,{isSmall:!0,isPrimary:!0,style:{marginRight:"30px"}},Object(c.sprintf)(Object(c.__)("%d connected"),null==p?void 0:p.length))),initialOpen:!1},(p||[]).map((function(e){return React.createElement(Et,{webhook:e,key:null==e?void 0:e.id,loading:b})})),React.createElement("br",null),React.createElement(u.Button,{isSecondary:!0,onClick:function(){l(!0)}},Object(c.__)("Create New WebHook","presto-player")),r&&React.createElement(gt,{onClose:function(){return l(!1)}})))};function wt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Pt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wt(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var kt=r(43),Ct=function(){var e,t,r,o,l,i,p,b,y,m,d,O,_=Object(n.useState)(!1),f=Object(s.a)(_,2),v=f[0],h=f[1],j=Object(a.useEntityProp)("root","site","presto_player_bunny_stream"),g=Object(s.a)(j,2),E=g[0],R=g[1],w=function(e){R(Pt(Pt({},E||{}),e))},P=Object(a.useEntityProp)("root","site","presto_player_google_analytics"),k=Object(s.a)(P,2),C=k[0],S=k[1],x=function(e){S(Pt(Pt({},C||{}),e))},D=Object(a.useEntityProp)("root","site","presto_player_youtube"),N=Object(s.a)(D,2),T=N[0],B=N[1],F=function(e){B(Pt(Pt({},T||{}),e))},I=function(){var e;return(null===(e=prestoPlayer)||void 0===e||!e.isPremium)&&{title:Object(c.__)("Pro Feature","presto-player"),heading:Object(c.__)("Unlock Presto Player Pro","presto-player"),message:Object(c.__)("Get this feature and more with the Pro version of Presto Player!","presto-player"),link:"https://prestoplayer.com"}};return React.createElement(le,{title:Object(c.__)("Integrations","presto-player"),description:Object(c.__)("Third party integrations and connections.","presto-player")},React.createElement(ee,{title:Object(c.__)("Google Analytics","presto-player"),description:Object(c.__)("Analytics settings for media plays, watch times and more.","presto-player"),disabled:I()},React.createElement(u.ToggleControl,{className:"presto-player__setting--google-analytics",label:Object(c.__)("Enable","presto-player"),help:Object(c.__)("Send analytics events to your Google Analytics account.","presto-player"),checked:null==C?void 0:C.enable,onChange:function(e){return x({enable:e})}}),React.createElement(u.ToggleControl,{className:"presto-player__setting--use-existing-tag",label:Object(c.__)("Use existing on-page tag?","presto-player"),help:Object(c.__)("Should we use an existing google analytics (v4) tag? If not, we'll output one for you.","presto-player"),checked:null==C?void 0:C.use_existing_tag,onChange:function(e){return x({use_existing_tag:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Measurement ID","presto-player"),help:Object(c.__)("Enter a Google Analytics Measurement ID, which can be found on your analytics admin page.","presto-player"),value:null==C?void 0:C.measurement_id,onChange:function(e){return x({measurement_id:e})}})),React.createElement(ee,{title:Object(c.__)("YouTube","presto-player"),description:Object(c.__)("Settings for YouTube videos.","presto-player")},React.createElement(u.ToggleControl,{className:"presto-player__setting--youtube-nocookie",label:Object(c.__)("Privacy-Enhanced Mode","presto-player"),help:Object(c.__)("Embed YouTube videos without using cookies that track viewing behaviour.","presto-player"),checked:null==T?void 0:T.nocookie,onChange:function(e){return F({nocookie:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Channel ID","presto-player"),help:React.createElement("div",null,Object(c.__)("Enter the ID of your channel to enable Youtube Subscribe button functionality.","presto-player")," ",React.createElement(u.ExternalLink,{href:"https://support.google.com/youtube/answer/3250431?hl=en"},Object(c.__)("Find my channel id","presto-player"))),value:null==T?void 0:T.channel_id,onChange:function(e){return F({channel_id:e})}})),(null===(m=prestoPlayer)||void 0===m||!m.isPremium||!!(null!==(d=prestoPlayer)&&void 0!==d&&d.proVersion&&kt(null===(O=prestoPlayer)||void 0===O?void 0:O.proVersion,"0.9.0")>=0))&&React.createElement(ee,{hideSaveButton:!0,title:Object(c.__)("Email Capture","presto-player"),description:Object(c.__)("Integrate Presto Player with an email provider for email capture.","presto-player"),disabled:I()},React.createElement(it,null),React.createElement(ut,null),React.createElement(yt,null),React.createElement(dt,null),(null===(e=prestoPlayer)||void 0===e?void 0:e.proVersion)&&kt(null===(t=prestoPlayer)||void 0===t?void 0:t.proVersion,"1.2.0")>=0&&React.createElement(Rt,null),React.createElement(Ue,null)),null!==(r=window)&&void 0!==r&&null!==(o=r.prestoPlayer)&&void 0!==o&&null!==(l=o.isSetup)&&void 0!==l&&l.bunny?React.createElement(React.Fragment,null,React.createElement(ee,{title:Object(c.__)("Bunny.net Settings","presto-player"),description:Object(c.__)("Modify bunny.net settings.","presto-player")},!(null===(i=window)||void 0===i||null===(p=i.prestoPlayer)||void 0===p||null===(b=p.isSetup)||void 0===b||null===(y=b.bunny)||void 0===y||!y.stream)&&React.createElement(n.Fragment,null,React.createElement(u.TextControl,{label:Object(c.__)("Initial Quality Level","presto-player"),help:Object(c.__)("You can set the default quality start level for all streams (i.e. 240, 360, 480, 720, 1080, etc). Set this lower to prevent initial buffering if your users have slow connections. Set this higher to start with a higher quality stream.","presto-player"),placeholder:"480",type:"number",value:null==E?void 0:E.hls_start_level,onChange:function(e){return w({hls_start_level:e})}}),React.createElement("br",null),React.createElement(u.ToggleControl,{label:Object(c.__)("Disable Classic Bunny.net Storage","presto-player"),help:Object(c.__)("This will disable Bunny.net classic storage in your block UI.","presto-player"),checked:null==E?void 0:E.disable_legacy_storage,onChange:function(e){return w({disable_legacy_storage:e})}}),React.createElement("br",null)),React.createElement(u.ToggleControl,{label:Object(c.__)("Edit Bunny.net Settings","presto-player"),help:Object(c.__)("Edit Bunny.net connection settings. Only edit this if you know what you're doing.","presto-player"),checked:v,onChange:h}),!!v&&React.createElement(React.Fragment,null,React.createElement(ke,null),React.createElement(he,null)))):React.createElement(ee,null,React.createElement(CTA,{className:"presto-player__setting--bunny-cta",option:{name:Object(c.__)("Bunny.net Video","presto-player"),help:Object(c.__)("To get started with Bunny.net, add a Bunny.net video to your page.","presto-player"),type:"cta",button:{text:"Learn More",link:"https://prestoplayer.com/secure-video-with-bunny-net",target:"_blank"}}})))};var St=function(){var e,t,r,i,y,m,d,O=Object(o.useDispatch)(b.store),_=O.createSuccessNotice,f=O.createErrorNotice,v=Object(n.useState)(!1),h=Object(s.a)(v,2),j=h[0],g=h[1];window.onhashchange=function(){window.scrollTo(0,0)};var E=W().save,R=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,E();case 3:_(Object(c.__)("Settings Updated","presto-player"),{type:"snackbar"}),e.next=10;break;case 6:e.prev=6,e.t0=e.catch(0),console.error(e.t0),f((null===e.t0||void 0===e.t0?void 0:e.t0.message)||Object(c.__)("Something went wrong","presto-player"),{type:"snackbar"});case 10:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),w=Object(o.useSelect)((function(e){var t,r,n,o=["root","site"];return(t=e(a.store)).getEntityRecords.apply(t,o),!(null!==(r=e(a.store))&&void 0!==r&&null!==(n=r.hasFinishedResolution)&&void 0!==n&&n.call(r,"getEntityRecords",o))}));return Object(n.useEffect)((function(){w||g(!0)}),[w]),j?React.createElement("div",{className:"presto-settings"},React.createElement(I,{routes:A,defaultRoute:null==A||null===(e=A.general)||void 0===e?void 0:e.path},React.createElement(u.Card,{className:"presto-settings__navigation"},React.createElement(u.Flex,null,React.createElement(u.FlexBlock,null,React.createElement("div",{role:"tablist","aria-orientation":"horizontal",className:"components-tab-panel__tabs"},React.createElement(B,{to:null==A||null===(t=A.general)||void 0===t?void 0:t.path,type:"button",role:"tab",activeClassName:"is-active",className:"components-button components-tab-panel__tabs-item presto-player__nav-general"},Object(c.__)("General","presto-player")),React.createElement(B,{to:null==A||null===(r=A.integrations)||void 0===r?void 0:r.path,type:"button",role:"tab",activeClassName:"is-active",className:"components-button components-tab-panel__tabs-item presto-player__nav-integrations"},Object(c.__)("Integrations","presto-player")),React.createElement(B,{to:null==A||null===(i=A.performance)||void 0===i?void 0:i.path,type:"button",role:"tab",activeClassName:"is-active",className:"components-button components-tab-panel__tabs-item presto-player__nav-performance"},Object(c.__)("Performance","presto-player")))),React.createElement(u.FlexItem,null,React.createElement(U,{onSave:R,style:{marginRight:"8px"}},Object(c.__)("Update Settings","presto-player"))))),React.createElement(S,{path:null==A||null===(y=A.general)||void 0===y?void 0:y.path},React.createElement(me,null)),React.createElement(S,{path:null==A||null===(m=A.integrations)||void 0===m?void 0:m.path},React.createElement(Ct,null)),React.createElement(S,{path:null==A||null===(d=A.performance)||void 0===d?void 0:d.path},React.createElement(_e,null))),React.createElement(q,{className:"presto-settings-page-notices"})):React.createElement("div",{className:"presto-settings__loading"},React.createElement(u.Spinner,null))};Object(n.render)(React.createElement(St,null),document.getElementById("presto-settings-page"))},7:function(e,t){e.exports=window.wp.data},8:function(e,t){e.exports=window.wp.element}},[[35,1,2]]]);
19
- //# sourceMappingURL=admin-68736b19.js.map
15
  * Compiled with the help of https://wpack.io
16
  * A zero setup Webpack Bundler Script for WordPress
17
  */
18
+ (window.wpackioprestoPlayersettingsJsonp=window.wpackioprestoPlayersettingsJsonp||[]).push([[0],{0:function(e,t){e.exports=window.wp.i18n},1:function(e,t){e.exports=window.wp.components},11:function(e,t){e.exports=window.wp.notices},12:function(e,t){e.exports=window.wp.compose},2:function(e,t){e.exports=window.wp.coreData},32:function(e,t){e.exports=window.wp.apiFetch},35:function(e,t,r){r(36),e.exports=r(51)},51:function(e,t,r){"use strict";r.r(t);var n=r(8),a=r(2),o=r(7),c=r(0);Object(o.dispatch)(a.store).addEntities([{name:"preset",kind:"presto-player",label:Object(c.__)("Presets","presto-player"),baseURL:"presto-player/v1/preset",baseURLParams:{context:"edit"}},{name:"audio-preset",kind:"presto-player",label:Object(c.__)("Audio Presets","presto-player"),baseURL:"presto-player/v1/audio-preset",baseURLParams:{context:"edit"}},{name:"webhook",kind:"presto-player",label:Object(c.__)("Webhook","presto-player"),baseURL:"presto-player/v1/webhook",baseURLParams:{context:"edit"}}]);var l=r(9),s=r(3),i=r(4),p=r.n(i),u=r(1),b=r(11),y=r(27),m=r(28),d=r(19),O=r(29),_=r(30),f=r(23),v=r(5),h=r(31),j=r.n(h);function g(e){return{path:e.pathname,hash:e.hash,query:j.a.parse(e.search)}}var E=r(34),R=Object(E.a)(),w=wp.element.createContext({route:g(R.location)}),P=r(16),k=wp.element.useContext,C="";function S(e){var t=e.path,r=e.onRoute,n=e.children,a=k(w).route,o=Object(P.a)("".concat(t))("".concat(a.hash.substr(1)));return o?(r&&(C!==o.path&&r(),C=o.path),React.createElement("div",null,wp.element.cloneElement(n,{route:o}))):null}var x=r(14),D=r.n(x);function N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var T=wp.element.useContext;function B(e){var t=e.to,r=e.onClick,n=e.children,a=e.activeClassName,o=T(w).route,c=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e);delete c.activeClassName;return React.createElement("a",Object.assign({},c,{className:D()(Object(v.a)({},a,Object(P.a)("".concat(t))("".concat(o.hash.substr(1)))),e.className),onClick:function(e){if(e.preventDefault(),o.path!==t){r&&r(e);var n=R.location.search;R.push("".concat(n,"#").concat(t))}}}),n)}function F(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Object(f.a)(e);if(t){var a=Object(f.a)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return Object(_.a)(this,r)}}var I=function(e){Object(O.a)(r,e);var t=F(r);function r(e){var n;Object(y.a)(this,r),n=t.call(this,e),Object(v.a)(Object(d.a)(n),"handleRouteChange",(function(e){var t=g(null==e?void 0:e.location);n.setState({route:t})})),n.routes=Object.keys(e.routes).map((function(t){return e.routes[t].path})),n.unlisten=R.listen(n.handleRouteChange);var a=g(R.location),o=R.location.search;return n.state={route:a,defaultRoute:null!=e&&e.defaultRoute?"".concat(o,"#").concat(null==e?void 0:e.defaultRoute):"".concat(o,"#/")},n}return Object(m.a)(r,[{key:"componentWillUnmount",value:function(){this.unlisten()}},{key:"render",value:function(){var e=this.props,t=e.children,r=(e.NotFound,this.state),n=r.route,a=r.defaultRoute;if(!n.hash)return R.push(a),React.createElement("div",null);var o=!1;(this.routes||[]).forEach((function(e){var t=Object(P.a)(n.hash.substr(1))("".concat(n.hash.substr(1)));t&&(o={name:e,data:t})}));var c={route:n,matched:o},l=!o;return React.createElement(w.Provider,{value:c},l?React.createElement("div",null,"Not found"):t)}}]),r}(n.Component),A={general:{path:"general"},integrations:{path:"/integrations"},performance:{path:"/performance"}},L=r(33),M=["onSave","children","busy","loading"];function U(e){var t=e.onSave,r=e.children,n=e.busy,c=e.loading,l=Object(L.a)(e,M),s=Object(o.useSelect)((function(e){var t=e(a.store),r=t.__experimentalGetDirtyEntityRecords,n=t.isSavingEntityRecord,o=(r()||[]).filter((function(e){return"webhook"!==e.name}));return{isDirty:o.length>0,isSaving:o.some((function(e){return n(e.kind,e.name,e.key)}))}}),[]),i=s.isDirty,p=s.isSaving,b=!i||p;return c?React.createElement(ScSkeleton,{style:{width:"120px",height:"35px",display:"inline-block"}}):React.createElement(u.Button,Object.assign({isPrimary:!0,"aria-disabled":b,disabled:b||p||n,isBusy:p||n,onClick:b?void 0:t},l),r)}var q=function(e){var t=e.className,r=Object(o.useSelect)((function(e){return e(b.store).getNotices()})),n=Object(o.useDispatch)(b.store).removeNotice,a=r.filter((function(e){return"snackbar"===e.type}));return React.createElement(u.SnackbarList,{notices:a,className:t,onRemove:n})};function W(){var e=Object(o.useDispatch)(a.store).saveEditedEntityRecord;return{save:function(){var t=Object(l.a)(p.a.mark((function t(){var r,n;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(o.select)(a.store).__experimentalGetDirtyEntityRecords(),n=[],r.forEach((function(t){var r=t.kind,a=t.name,o=t.key;n.push(e(r,a,o,{throwOnError:!0}))})),t.next=5,Promise.all(n);case 5:if(!t.sent.some((function(e){return void 0===e}))){t.next=8;break}throw{message:"Saving failed."};case 8:return t.abrupt("return",!0);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()}}var Y,G=wp.i18n.__,z=wp.element.useState,H=wp.components,V=H.Modal,K=H.Button,J=function(e){var t=e.children,r=e.disabled,n=z(!1),a=Object(s.a)(n,2),o=a[0],c=a[1];return r?React.createElement("div",null,React.createElement("div",{className:"presto-options__disabled-overlay",onClick:function(e){return c(!0),e.preventDefault(),!1}},React.createElement("div",null,t)),!!o&&React.createElement(V,{title:null==r?void 0:r.title,onRequestClose:function(){return c(!1)}},React.createElement("h2",null,null==r?void 0:r.heading),React.createElement("p",null,null==r?void 0:r.message),React.createElement(K,{href:null==r?void 0:r.link,target:"_blank",isPrimary:!0},G("Learn More","presto-player")))):React.createElement("div",null,t)},Q=wp.components,X=Q.Card,Z=Q.CardBody,$=Q.CardFooter,ee=function(e){var t=e.title,r=e.description,n=e.children,a=e.disabled,s=e.hideSaveButton,i=W().save,u=Object(o.useDispatch)(b.store),y=u.createSuccessNotice,m=u.createErrorNotice,d=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i();case 3:y(Object(c.__)("Settings Updated","presto-player"),{type:"snackbar"}),e.next=10;break;case 6:e.prev=6,e.t0=e.catch(0),console.error(e.t0),m((null===e.t0||void 0===e.t0?void 0:e.t0.message)||Object(c.__)("Something went wrong","presto-player"));case 10:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}();return React.createElement(J,{disabled:a},React.createElement(X,{size:"large",className:"presto-options__card"},React.createElement(Z,{className:"presto-options__card-body"},React.createElement("div",{className:"presto-flow",style:{"--presto-flow-space":"2em"}},React.createElement("div",{className:"presto-flow",style:{"--presto-flow-space":"1em"}},t&&React.createElement("h2",{style:{marginBottom:0}},t," ",!!a&&React.createElement("div",{className:"presto-options__pro-badge"},"Pro")),r&&React.createElement("p",null,r)),React.createElement("div",null,n))),s?React.createElement("br",null):React.createElement($,{isShady:!0},React.createElement("div",null,React.createElement(U,{onSave:d},Object(c.__)("Update Settings"))))))},te=wp.i18n.__,re=wp.components,ne=re.Button,ae=re.BaseControl,oe=wp.mediaUtils.MediaUpload,ce=(wp.data.dispatch,function(e){var t=e.option,r=e.label,n=e.help,a=e.allowedTypes,o=e.value,c=e.className,l=e.maxWidth,s=e.onSelect;return React.createElement("div",{className:D()(c,"presto-settings__setting is-media-control")},React.createElement(ae,{className:"editor-video-poster-control"},React.createElement(ae.VisualLabel,null,r),o&&React.createElement(ae,null,React.createElement("img",{style:{maxWidth:l,border:"1px solid #dcdcdc"},src:o})),React.createElement("br",null),React.createElement(oe,{title:n,onSelect:s,allowedTypes:a,render:function(e){var t=e.open;return React.createElement(ne,{isSecondary:!0,onClick:t,className:o?"button-replace":"button-select"},te(o?"Replace":"Select","presto-player"))}})," ",React.createElement("p",{id:"video-block__logo-image-description-".concat(null==t?void 0:t.id),hidden:!0},o?sprintf(te("The current logo image url is %s","presto-player"),o):te("There is no logo image currently selected","presto-player")),!!o&&React.createElement(ne,{onClick:function(){return s("")},isTertiary:!0},te("Remove","presto-player"))),React.createElement("br",null))}),le=function(e){var t=e.children,r=e.title,n=e.description;return React.createElement("div",{className:"presto-flow presto-settings__page"},React.createElement("div",{className:"presto-flow",style:{"--presto-flow-space":"1em"}},r&&React.createElement("h1",null,r),n&&React.createElement("p",null,n)),React.createElement("div",{className:"presto-settings__body "},React.createElement("div",{className:"presto-flow"},t)))},se=r(21),ie=r(6),pe=function(e){var t=e.option,r=e.value,a=e.className,o=e.disabled,c=e.onChange,l=function(e){o||(e.save(),c(s.current.value))},s=Object(n.useRef)();return Object(n.useEffect)((function(){var e;null!==(e=wp)&&void 0!==e&&e.CodeMirror&&wp.CodeMirror.fromTextArea(s.current,{type:"text/css",lineNumbers:!0}).on("change",l)}),[]),Object(ie.b)("div",{className:D()(a,"presto-settings__setting")},Object(ie.b)(u.BaseControl,{css:Object(ie.a)(Y||(Y=Object(se.a)(["\n .CodeMirror {\n height: 200px;\n border: 1px solid #e3e3e3;\n border-radius: 4px;\n }\n "]))),label:null==t?void 0:t.name,help:null==t?void 0:t.help},Object(ie.b)("textarea",{onChange:l,ref:s,rows:"5",disabled:!0},r)))};function ue(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ue(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ye,me=function(){var e,t=function(){var e;return(null===(e=prestoPlayer)||void 0===e||!e.isPremium)&&{title:Object(c.__)("Pro Feature","presto-player"),heading:Object(c.__)("Unlock Presto Player Pro","presto-player"),message:Object(c.__)("Get this feature and more with the Pro version of Presto Player!","presto-player"),link:"https://prestoplayer.com"}},r=Object(o.useSelect)((function(e){var t,r,n=["presto-player","preset"],o=["presto-player","audio-preset"];return{presets:(t=e(a.store)).getEntityRecords.apply(t,n),loadingPresets:e(a.store).isResolving("getEntityRecords",n),audioPresets:(r=e(a.store)).getEntityRecords.apply(r,o),loadingAudioPresets:e(a.store).isResolving("getEntityRecords",o)}}),[]),n=r.presets,l=r.loadingPresets,i=r.audioPresets,p=r.loadingAudioPresets,b=Object(a.useEntityProp)("root","site","presto_player_presets"),y=Object(s.a)(b,2),m=y[0],d=y[1],O=Object(a.useEntityProp)("root","site","presto_player_audio_presets"),_=Object(s.a)(O,2),f=_[0],v=_[1],h=Object(a.useEntityProp)("root","site","presto_player_analytics"),j=Object(s.a)(h,2),g=j[0],E=j[1],R=function(e){E(be(be({},g||{}),e))},w=Object(a.useEntityProp)("root","site","presto_player_branding"),P=Object(s.a)(w,2),k=P[0],C=P[1],S=function(e){C(be(be({},k||{}),e))},x=Object(a.useEntityProp)("root","site","presto_player_uninstall"),D=Object(s.a)(x,2),N=D[0],T=D[1];return React.createElement(le,{title:Object(c.__)("General","presto-player"),description:Object(c.__)("Branding, analytics and uninstall data.","presto-player")},React.createElement(ee,{title:Object(c.__)("Branding","presto-player"),description:Object(c.__)("Global player branding options","presto-player")},React.createElement(J,{disabled:t()},React.createElement(ce,{className:"presto-player__setting--logo",label:React.createElement(React.Fragment,null,Object(c.__)("Logo","presto-player")," ",t()&&React.createElement("span",{className:"presto-options__pro-badge"},Object(c.__)("Pro","presto-player"))),onSelect:function(e){return S({logo:null==e?void 0:e.url})},maxWidth:(null==k?void 0:k.logo_width)||150,value:null==k?void 0:k.logo}),React.createElement("div",{style:{maxWidth:"500px"}},React.createElement(u.RangeControl,{className:"presto-player__setting--logo-width",label:Object(c.__)("Logo Max Width","presto-player"),value:(null==k?void 0:k.logo_width)||150,onChange:function(e){return S({logo_width:e})},min:1,max:400}))),React.createElement(u.ColorPicker,{className:"presto-player__setting--brand-color",onChangeComplete:function(e){return S({color:e.hex})},color:null==k?void 0:k.color})),React.createElement(ee,{title:Object(c.__)("Analytics","presto-player"),disabled:t(),description:Object(c.__)("Analytics settings for media plays, watch times and more.","presto-player")},React.createElement("div",null,React.createElement(u.ToggleControl,{className:"presto-player__setting--analytics-enable",label:Object(c.__)("Enable","presto-player"),help:Object(c.__)("Enable view analytics for your media","presto-player"),checked:null==g?void 0:g.enable,onChange:function(e){return R({enable:e})}}),!(null==g||!g.enable)&&React.createElement(u.ToggleControl,{label:Object(c.__)("Auto-Purge Data (recommended)"),help:Object(c.__)("Automatically purge data older than 90 days.","presto-player"),className:"presto-player__setting--analytics-enable",checked:void 0===(null==g?void 0:g.purge_data)||(null==g?void 0:g.purge_data),onChange:function(e){return R({purge_data:e})}}))),React.createElement(ee,{title:Object(c.__)("Presets","presto-player"),disabled:t(),description:Object(c.__)("Media presets settings.","presto-player")},l?React.createElement(u.Spinner,null):React.createElement(u.ComboboxControl,{label:Object(c.__)("Select default preset for video.","presto-player"),value:null==m?void 0:m.default_player_preset,options:(n||[]).map((function(e){return{value:null==e?void 0:e.id,label:null==e?void 0:e.name}})),onChange:function(e){return t={default_player_preset:e||1},void d(be(be({},m||{}),t));var t}}),p?React.createElement(u.Spinner,null):React.createElement(u.ComboboxControl,{label:Object(c.__)("Select default preset for audio.","presto-player"),value:null==f?void 0:f.default_player_preset,options:(i||[]).map((function(e){return{value:null==e?void 0:e.id,label:null==e?void 0:e.name}})),onChange:function(e){return t={default_player_preset:e||1},void v(be(be({},f||{}),t));var t}})),React.createElement(ee,{disabled:t(),title:Object(c.__)("Custom CSS","presto-player"),description:Object(c.__)("Quickly add custom css to the player web component.","presto-player")},React.createElement(pe,{disabled:!(null!==(e=prestoPlayer)&&void 0!==e&&e.isPremium),option:{id:"player_css"},value:null==k?void 0:k.player_css,key:null==k?void 0:k.player_css,onChange:function(e){return S({player_css:e})}})),React.createElement(ee,{title:Object(c.__)("Uninstall Options","presto-player"),description:Object(c.__)("Options to remove data on uninstall.","presto-player")},React.createElement(u.ToggleControl,{label:Object(c.__)("Remove data on uninstall"),help:Object(c.__)("This removes all data on uninstall.","presto-player"),className:"presto-player__setting--uninstall",checked:null==N?void 0:N.uninstall_data,onChange:function(e){var t;if(e&&!confirm(Object(c.__)("Caution: Data Loss. Are you sure you want to remove all the data from this plugin? This is irreversible!","presto-player")))return;t={uninstall_data:e},T(be(be({},N||{}),t))}})))};function de(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Oe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?de(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):de(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var _e=function(){var e=Object(a.useEntityProp)("root","site","presto_player_performance"),t=Object(s.a)(e,2),r=t[0],n=t[1],o=function(e){n(Oe(Oe({},r||{}),e))};return Object(ie.b)(le,{title:Object(c.__)("Performance","presto-player"),description:Object(c.__)("Player performance preferences.","presto-player")},Object(ie.b)(ee,{title:Object(c.__)("Performance","presto-player"),description:Object(c.__)("Performance options for player loading.","presto-player")},Object(ie.b)("div",null,Object(ie.b)(u.ToggleControl,{className:"presto-player__setting--module-enabled",label:Object(c.__)("Dynamically Load JavaScript","presto-player"),help:Object(c.__)("Dynamically load javascript modules on the page which can significantly reduce javascript size and increase performance.","presto-player"),checked:null==r?void 0:r.module_enabled,onChange:function(e){return o({module_enabled:e})}}),!(null==r||!r.module_enabled)&&Object(ie.b)(u.Notice,{css:Object(ie.a)(ye||(ye=Object(se.a)(["\n background: #f3f4f5 !important;\n margin-bottom: 20px !important;\n "]))),className:"presto-notice",status:"info",isDismissible:!1},Object(ie.b)("div",null,Object(ie.b)("strong",null,Object(c.__)("Please Note","presto-player"))),Object(ie.b)("div",null,Object(c.__)("You may need to exclude the player script from combining, as well as enable CORS requests for some CDNs.","presto-player")," ",Object(ie.b)(u.ExternalLink,{href:"https://prestoplayer.com/docs/performance-preferences-explained#global-player-performance-setting"},Object(c.__)("Learn More","presto-player"))))),Object(ie.b)(u.ToggleControl,{className:"presto-player__setting--automations",label:Object(c.__)("Enable Ajax Requests for Progress Integrations","presto-player"),help:Object(c.__)("Keep this on unless you do not plan on using automation, LMS or membership integrations.","presto-player"),checked:null==r?void 0:r.automations,onChange:function(e){return o({automations:e})}})))};function fe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ve(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var he=function(){var e=Object(a.useEntityProp)("root","site","presto_player_bunny_pull_zones"),t=Object(s.a)(e,2),r=t[0],n=t[1],o=function(e){n(ve(ve({},r||{}),e))},l=r||{},i=l.public_id,p=l.public_hostname,b=l.private_id,y=l.private_hostname,m=l.private_security_key;return React.createElement(React.Fragment,null,React.createElement("h2",{style:{marginTop:"40px"}},Object(c.__)("Bunny.net Storage (Classic)","presto-player")),React.createElement("p",{style:{fontSize:"12px",color:"#757575"}},Object(c.__)('Note: To Change your API key, please click "Reconnect" from a bunny block.',"presto-player")),React.createElement(u.TextControl,{label:Object(c.__)("Public ID","presto-player"),help:Object(c.__)("The ID of the public pull zone to use.","presto-player"),value:i,onChange:function(e){return o({public_id:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Public Host Name","presto-player"),help:Object(c.__)("The hostname to use for this pullzone.","presto-player"),value:p,onChange:function(e){return o({public_hostname:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private ID","presto-player"),help:Object(c.__)("The ID of the private pull zone to use.","presto-player"),value:b,onChange:function(e){return o({private_id:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private Host Name","presto-player"),help:Object(c.__)("The hostname to use for the private pullzone.","presto-player"),value:y,onChange:function(e){return o({private_hostname:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private Url Token Authentication Key","presto-player"),help:Object(c.__)("Update the security token used to sign private urls.","presto-player"),type:"password",value:m,onChange:function(e){return o({private_security_key:e})}}))};function je(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ge(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?je(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):je(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ee=function(){var e=Object(a.useEntityProp)("root","site","presto_player_bunny_stream_public"),t=Object(s.a)(e,2),r=t[0],n=t[1],o=function(e){n(ge(ge({},r||{}),e))},l=r||{},i=l.video_library_api_key,p=l.pull_zone_url,b=l.video_library_id;return React.createElement(React.Fragment,null,React.createElement(u.TextControl,{label:Object(c.__)("Public Stream Library ID","presto-player"),help:Object(c.__)("The ID of the video library to use.","presto-player"),value:b,onChange:function(e){return o({video_library_id:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Public Stream Library API Key","presto-player"),help:Object(c.__)("The API key for the above video library for read/write access.","presto-player"),value:i,onChange:function(e){return o({video_library_api_key:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Public Stream CDN Hostname","presto-player"),help:Object(c.__)("The public cdn hostname for the video library.","presto-player"),value:p,onChange:function(e){return o({pull_zone_url:e})}}))};function Re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function we(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Pe=function(){var e=Object(a.useEntityProp)("root","site","presto_player_bunny_stream_private"),t=Object(s.a)(e,2),r=t[0],n=t[1],o=function(e){n(we(we({},r||{}),e))},l=r||{},i=l.video_library_api_key,p=l.pull_zone_url,b=l.video_library_id,y=l.token_auth_key;return React.createElement(React.Fragment,null,React.createElement(u.TextControl,{label:Object(c.__)("Private Stream Library ID","presto-player"),help:Object(c.__)("The ID of the video library to use.","presto-player"),value:b,onChange:function(e){return o({video_library_id:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private Stream Library API Key","presto-player"),help:Object(c.__)("The API key for the above video library for read/write access.","presto-player"),value:i,onChange:function(e){return o({video_library_api_key:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private Stream CDN Hostname","presto-player"),help:Object(c.__)("The public cdn hostname for the video library.","presto-player"),value:p,onChange:function(e){return o({pull_zone_url:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Private Stream Token Authentication Key","presto-player"),help:Object(c.__)("The token authentication key used to sign private urls.","presto-player"),value:y,onChange:function(e){return o({token_auth_key:e})}}))},ke=function(){var e=Object(a.useEntityProp)("root","site","presto_player_bunny_stream_public"),t=Object(s.a)(e,2),r=t[0];t[1];return r?React.createElement(React.Fragment,null,React.createElement("h2",{style:{marginTop:"40px"}},Object(c.__)("Bunny.net Stream","presto-player")),React.createElement(Ee,null),React.createElement(Pe,null)):null},Ce=wp.i18n.__,Se=wp.components,xe=Se.Button,De=Se.Panel,Ne=Se.PanelBody,Te=Se.Flex,Be=Se.FlexBlock,Fe=Se.Notice,Ie=Se.Spinner,Ae=wp.element,Le=Ae.useState,Me=Ae.useEffect,Ue=function(){var e=Le(0),t=Object(s.a)(e,2),r=t[0],n=t[1],a=Le(0),o=Object(s.a)(a,2),c=o[0],i=o[1],u=Le(""),b=Object(s.a)(u,2),y=b[0],m=b[1],d=Le(0),O=Object(s.a)(d,2),_=O[0],f=O[1],v=function(){var e=Object(l.a)(p.a.mark((function e(){var t,a,o,c;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(""),e.prev=1,e.next=4,wp.apiFetch({path:"/presto-player/v1/email/export",method:"post",data:{step:r}});case 4:t=e.sent,a=t.percentage,o=t.step,c=t.url,n(o),i(a),f(c),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(1),i(0),m((null===e.t0||void 0===e.t0?void 0:e.t0.message)||Ce("Something went wrong","presto-player"));case 17:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(){return e.apply(this,arguments)}}();return Me((function(){r&&"done"!=r&&v()}),[r]),Me((function(){_&&window.open(_)}),[_]),React.createElement(De,null,React.createElement(Ne,{title:React.createElement(Te,null,React.createElement(Be,null,Ce("Other","presto-player"))),initialOpen:!1},React.createElement("h2",null,Ce("Manual Export","presto-player")),React.createElement("p",null,Ce("Using a service not listed here? You can export contacts and manually upload them to a service.","presto-player")),y&&React.createElement(Fe,{className:"presto-notice",status:"error",onRemove:function(){return m("")}},y),React.createElement(Te,{align:"center",justify:"flex-start"},React.createElement(xe,{isPrimary:!0,onClick:function(e){n(1),i(1),e.preventDefault()}},Ce("Download CSV File","presto-player")),!!c&&React.createElement("div",{style:{display:"flex",alignItems:"center"}},React.createElement(Ie,{style:{marginTop:0}}),React.createElement("span",null,"Exporting... ",c,"% Complete")))))},qe=r(12),We=wp.i18n.__,Ye=wp.components,Ge=Ye.Button,ze=Ye.Panel,He=Ye.PanelBody,Ve=Ye.Flex,Ke=Ye.Modal,Je=Ye.FlexBlock,Qe=Ye.FlexItem,Xe=Ye.PanelRow,Ze=wp.element.useState,$e=function(e){var t=e.connected,r=e.title,n=e.children,a=e.onConnect,o=e.isBusy,c=e.connectButtonText,l=e.disconnectButtonText,i=e.onDisconnect,p=Ze(!1),u=Object(s.a)(p,2),b=u[0],y=u[1];return React.createElement(ze,null,React.createElement(He,{title:React.createElement(Ve,null,React.createElement(Je,null,r),React.createElement(Qe,null,t?React.createElement(Ge,{isSmall:!0,isPrimary:!0,style:{marginRight:"30px"}},We("Connected","presto-player")):React.createElement(Ge,{isSmall:!0,isSecondary:!0,style:{marginRight:"30px"}},We("Not Connected","presto-player")))),initialOpen:!1},React.createElement("form",{onSubmit:function(e){e.preventDefault(),a()},disabled:o},n,React.createElement(Xe,null,React.createElement("div",null,t?React.createElement("div",null," ",React.createElement(Ge,{isSecondary:!0,isBusy:o,disabled:o,onClick:function(e){e.preventDefault(),y(!0)}},l||We("Disconnect","presto-player"))):React.createElement(Ge,{isPrimary:!0,isBusy:o,disabled:o,type:"submit"},c||We("Connect","presto-player")))))),b&&React.createElement(Ke,{className:"presto-player__modal-confirm",title:We("Are you sure?","presto-player"),style:{"max-width":"350px"},onRequestClose:function(){return y(!1)}},React.createElement("p",null,We("Are you sure you want to disconnect this integration?","presto-player")),React.createElement(Ge,{className:"presto-player__modal-confirm-button",isDestructive:!0,onClick:function(){i&&i(),y(!1)}},We("Disconnect","presto-player")),React.createElement(Ge,{onClick:function(){return y(!1)}},We("Cancel","presto-player"))))},et=wp.components.TextControl,tt=wp.data.dispatch,rt=function(e){var t=e.option,r=e.value,n=e.optionName,a=e.className;return React.createElement("div",{className:"presto-settings__setting is-text-control"},React.createElement(et,Object.assign({className:D()(a,"presto-settings__setting is-media-control"),label:null==t?void 0:t.name,value:r,type:null==t?void 0:t.type,help:null==t?void 0:t.help,placeholder:null==t?void 0:t.placeholder,onChange:function(e){return tt("presto-player/settings").updateSetting(t.id,e,n)}},e)))},nt=r(32),at=r.n(nt);function ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ct(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var lt=function(e){var t=e.name;return Object(qe.createHigherOrderComponent)((function(e){return function(r){var o=Object(n.useState)(""),i=Object(s.a)(o,2),u=i[0],b=i[1],y=Object(n.useState)(""),m=Object(s.a)(y,2),d=m[0],O=m[1],_=Object(n.useState)(!1),f=Object(s.a)(_,2),v=f[0],h=f[1],j=Object(a.useEntityProp)("root","site",t),g=Object(s.a)(j,2),E=g[0],R=g[1],w=function(){var e=Object(l.a)(p.a.mark((function e(t){var r,n,a,o,l,s,i,u;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.path,n=t.data,a=void 0===n?{}:n,o=t.message,l=void 0===o?Object(c.__)("Success","presto-player"):o,s=t.success,i=t.error,b(""),O(""),h(!0),e.prev=4,e.next=7,at()({path:r,method:"post",data:a});case 7:u=e.sent,s&&s(u),O(l),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),null!==e.t0&&void 0!==e.t0&&e.t0.message&&(b(e.t0.message),i&&i(e.t0));case 15:return e.prev=15,h(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[4,12,15,18]])})));return function(t){return e.apply(this,arguments)}}();return React.createElement(e,Object.assign({success:d,setSuccess:O,setError:b,error:u,isBusy:v,setting:E,updateSetting:function(e){R(ct(ct({},E||{}),e))},makeRequest:w},r))}}),"withIntegration")};function st(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var it=Object(qe.compose)([lt({name:"presto_player_activecampaign"})])((function(e){var t=e.success,r=e.setSuccess,n=e.error,a=e.setError,o=e.isBusy,s=e.makeRequest,i=e.setting,b=e.updateSetting,y=function(e){b(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?st(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):st(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e))},m=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s({path:"/presto-player/v1/activecampaign/disconnect",message:Object(c.__)("Disconnected","presto-player"),success:y,error:y});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return React.createElement($e,{title:Object(c.__)("ActiveCampaign"),connected:null==i?void 0:i.connected,onConnect:function(){s({path:"/presto-player/v1/activecampaign/connect",data:{api_key:null==i?void 0:i.api_key,url:null==i?void 0:i.url},message:Object(c.__)("Connected","presto-player"),success:y,error:y})},onDisconnect:m,isBusy:o},n&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"error",onRemove:function(){return a("")}},n)),t&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"success",onRemove:function(){return r("")}},t)),React.createElement(u.PanelRow,null,React.createElement(u.BaseControl,null,React.createElement(rt,{label:Object(c.__)("Your ActiveCampaign Url","presto-player"),type:"url",help:Object(c.__)("You can find this on your Settings > Developer page.","presto-player"),value:null==i?void 0:i.url,onChange:function(e){return b({url:e})}}),React.createElement(rt,{label:Object(c.__)("Your ActiveCampaign API key","presto-player"),help:Object(c.__)("You can find this on your Settings > Developer page.","presto-player"),value:null==i?void 0:i.api_key,onChange:function(e){return b({api_key:e})}}))))}));function pt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var ut=Object(qe.compose)([lt({name:"presto_player_fluentcrm"})])((function(e){var t=e.error,r=e.setError,n=e.isBusy,a=e.makeRequest,o=e.setting,s=e.updateSetting,i=function(e){s(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pt(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e))},b=(o||{}).connected,y=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a({path:"/presto-player/v1/fluentcrm/disconnect",message:Object(c.__)("Deactivated","presto-player"),success:i,error:i});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return React.createElement($e,{title:Object(c.__)("FluentCRM"),connected:b,onConnect:function(){a({path:"/presto-player/v1/fluentcrm/connect",message:Object(c.__)("Installed and connected","presto-player"),success:i,error:i})},onDisconnect:y,connectButtonText:Object(c.__)("Install FluentCRM Plugin","presto-player"),disconnectButtonText:Object(c.__)("Deactivate FluentCRM Plugin","presto-player"),isBusy:n},t&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"error",onRemove:function(){return r("")}},t)),b&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"success",isDismissible:!1},Object(c.__)("Installed and connected!","presto-player"))))}));function bt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var yt=Object(qe.compose)([lt({name:"presto_player_mailchimp"})])((function(e){var t=e.success,r=e.setSuccess,n=e.error,a=e.setError,o=e.isBusy,s=e.makeRequest,i=e.setting,b=e.updateSetting,y=i||{},m=y.api_key,d=y.connected,O=function(e){b(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e))},_=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s({path:"/presto-player/v1/mailchimp/disconnect",message:Object(c.__)("Disconnected","presto-player"),success:O,error:O});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return React.createElement($e,{title:Object(c.__)("Mailchimp"),connected:d,onDisconnect:_,onConnect:function(){s({path:"/presto-player/v1/mailchimp/connect",data:{api_key:m},message:Object(c.__)("Connected","presto-player"),success:O,error:O})},isBusy:o},n&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"error",onRemove:function(){return a("")}},n)),t&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"success",onRemove:function(){return r("")}},t)),React.createElement(u.PanelRow,null,React.createElement(u.BaseControl,null,React.createElement(rt,{className:"presto-player__setting--mailchimp-api_key",label:Object(c.__)("Your Mailchimp API key","presto-player"),help:React.createElement("p",null,Object(c.__)("You can create a new key on your mailchimp account page.","presto-player")," ",React.createElement(u.ExternalLink,{href:"https://us11.admin.mailchimp.com/account/api/"},Object(c.__)("Get My API Key","presto-player"))),value:m,onChange:function(e){return b({api_key:e})}}))))}));function mt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var dt=Object(qe.compose)([lt({name:"presto_player_mailerlite"})])((function(e){var t=e.success,r=e.setSuccess,n=e.error,a=e.setError,o=e.isBusy,s=e.makeRequest,i=e.setting,b=e.updateSetting,y=i||{},m=y.api_key,d=y.connected,O=function(e){b(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mt(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e))},_=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s({path:"/presto-player/v1/mailerlite/disconnect",message:Object(c.__)("Disconnected","presto-player"),success:O,error:O});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return React.createElement($e,{title:Object(c.__)("Mailerlite"),connected:d,onDisconnect:_,onConnect:function(){s({path:"/presto-player/v1/mailerlite/connect",data:{api_key:m},message:Object(c.__)("Connected","presto-player"),success:O,error:O})},isBusy:o},n&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"error",onRemove:function(){return a("")}},n)),t&&React.createElement(u.PanelRow,null,React.createElement(u.Notice,{className:"presto-notice",status:"success",onRemove:function(){return r("")}},t)),React.createElement(u.PanelRow,null,React.createElement(u.BaseControl,null,React.createElement(rt,{className:"presto-player__setting--mailerlite-api_key",label:Object(c.__)("Your MailerLite API key","presto-player"),help:React.createElement("p",null,Object(c.__)("You can create a new key on your MailerLite account page.","presto-player")," ",React.createElement(u.ExternalLink,{href:"https://app.mailerlite.com/integrations/api/"},Object(c.__)("Get My API Key","presto-player"))),value:m,onChange:function(e){return b({api_key:e})}}))))})),Ot=r(22);function _t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ft(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_t(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var vt=function(e){var t=e.headers,r=e.setHeaders,n=function(e,n){r((t||[]).map((function(t,r){return r!==n?t:ft(ft({},t),e)})))};return React.createElement(React.Fragment,null,(t||[]).map((function(e,a){var o=e.name,l=e.value;return React.createElement(u.Flex,{key:a,align:"center"},React.createElement(u.TextControl,{placeholder:Object(c.__)("Header Name","presto-player"),value:o,onChange:function(e){return n({name:e},a)}}),React.createElement(u.TextControl,{placeholder:Object(c.__)("New Value","presto-player"),value:l,onChange:function(e){return n({value:e},a)}}),React.createElement(u.BaseControl,null,React.createElement(u.ToolbarButton,{icon:"trash",onClick:function(){return function(e){return r((t||[]).filter((function(t,r){return r!==e})))}(a)}})))})),React.createElement("div",null,React.createElement(u.Button,{isSecondary:!0,isSmall:!0,onClick:function(){return e={name:"",value:""},void r([].concat(Object(Ot.a)(t||[]),[e]));var e}},Object(c.__)("Add Header","presto-player"))))};function ht(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function jt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ht(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ht(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var gt=function(e){var t=e.onClose,r=e.webhook,i=Object(o.useDispatch)(a.store).saveEntityRecord,y=Object(o.useDispatch)(b.store),m=y.createSuccessNotice,d=y.createErrorNotice,O=Object(n.useState)(!1),_=Object(s.a)(O,2),f=_[0],v=_[1],h=Object(n.useState)(r||{email_name:"email",method:"POST"}),j=Object(s.a)(h,2),g=j[0],E=j[1],R=function(e){E(jt(jt({},g||{}),e))},w=g.name,P=g.url,k=g.method,C=g.email_name,S=g.headers,x=(g.archived,function(){var e=Object(l.a)(p.a.mark((function e(r){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r.preventDefault(),v(!0),e.next=5,i("presto-player","webhook",jt({},g));case 5:m(null!=g&&g.id?Object(c.__)("Webhook updated","presto-player"):Object(c.__)("Webhook created.","presto-player"),{type:"snackbar"}),t(),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.error(e.t0),d((null===e.t0||void 0===e.t0?void 0:e.t0.message)||Object(c.__)("Something went wrong.","presto-player"),{type:"snackbar"});case 13:return e.prev=13,v(!1),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[0,9,13,16]])})));return function(t){return e.apply(this,arguments)}}());return Object(ie.b)(u.Modal,{title:null!=g&&g.id?Object(c.__)("Edit Webhook","presto-player"):Object(c.__)("Add A Webhook","presto-player"),onRequestClose:t,shouldCloseOnClickOutside:!1},Object(ie.b)("form",{onSubmit:x},Object(ie.b)(u.TextControl,{label:Object(c.__)("Name","presto-player"),placeholder:Object(c.__)("Webhook feed name","presto-player"),value:w,onChange:function(e){return R({name:e})},required:!0,autoFocus:!0}),Object(ie.b)(u.TextControl,{label:Object(c.__)("Request URL","presto-player"),placeholder:Object(c.__)("Webhook URL","presto-player"),type:"url",value:P,onChange:function(e){return R({url:e})},required:!0}),Object(ie.b)(u.SelectControl,{label:Object(c.__)("Request Method","presto-player"),value:k,options:[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"PUT",value:"PUT"}],onChange:function(e){return R({method:e})},required:!0}),Object(ie.b)(u.TextControl,{label:Object(c.__)("Email Name","presto-player"),placeholder:Object(c.__)("The name (key) of the email sent.","presto-player"),value:C,onChange:function(e){return R({email_name:e})},required:!0}),Object(ie.b)("div",{css:{margin:"0 0 1.5rem"}},Object(ie.b)(u.BaseControl.VisualLabel,null,Object(c.__)("Headers","presto-player")),Object(ie.b)(vt,{headers:S,setHeaders:function(e){return R({headers:e})}})),Object(ie.b)(u.Button,{isPrimary:!0,type:"submit",isBusy:f},null!=g&&g.id?Object(c.__)("Update","presto-player"):Object(c.__)("Create","presto-player"))))},Et=function(e){var t=e.webhook,r=Object(n.useState)(!1),i=Object(s.a)(r,2),y=(i[0],i[1],Object(n.useState)(!1)),m=Object(s.a)(y,2),d=m[0],O=m[1],_=Object(o.useDispatch)(a.store),f=_.deleteEntityRecord,v=(_.saveEntityRecord,Object(o.useDispatch)(b.store)),h=v.createSuccessNotice,j=v.createErrorNotice,g=Object(o.useSelect)((function(e){var r=["presto-player","webhook",null==t?void 0:t.id],n=e(a.store),o=n.getEditedEntityRecord,c=n.isSavingEntityRecord,l=n.isDeletingEntityRecord;return{webhook:o.apply(void 0,r),loading:e(a.store).isResolving("getEditedEntityRecord",r),isSaving:c.apply(void 0,r),isDeleting:l.apply(void 0,r)}}),[]),E=g.webhook,R=g.loading,w=g.isSaving,P=g.isDeleting,k=E||{},C=k.name,S=k.url,x=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,confirm(Object(c.__)("Are you sure you want to delete this webhook?","presto-player"))){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,f("presto-player","webhook",null==E?void 0:E.id,void 0,{throwOnError:!0});case 6:h(Object(c.__)("Webhook deleted.","presto-player"),{type:"snackbar"}),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.error(e.t0),j((null===e.t0||void 0===e.t0?void 0:e.t0.message)||Object(c.__)("Something went wrong","presto-player"),{type:"snackbar"});case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}();return R?React.createElement(u.Spinner,null):React.createElement(u.Card,null,React.createElement(u.CardBody,null,React.createElement(u.Flex,{align:"center"},React.createElement(u.FlexBlock,null,React.createElement("strong",null,C||Object(c.__)("Untitled webhook","presto-player")),React.createElement("br",null),S),React.createElement(u.FlexItem,null,React.createElement(u.Flex,{align:"center"},w||P?React.createElement(u.Spinner,null):React.createElement(React.Fragment,null,React.createElement(u.ToolbarButton,{icon:"edit",label:"Edit",onClick:function(){return O(!0)}}),React.createElement(u.ToolbarButton,{icon:"trash",label:Object(c.__)("Delete","presto-player"),onClick:x})))))),d&&React.createElement(gt,{onClose:function(){return O(!1)},webhook:t}))},Rt=function(){var e=Object(n.useState)(!1),t=Object(s.a)(e,2),r=t[0],l=t[1],i=Object(o.useSelect)((function(e){var t,r=["presto-player","webhook"];return{webhooks:(t=e(a.store)).getEntityRecords.apply(t,r),loading:e(a.store).isResolving("getEntityRecords",r)}}),[]),p=i.webhooks,b=i.loading;return React.createElement(u.Panel,null,React.createElement(u.PanelBody,{title:React.createElement(u.Flex,null,React.createElement(u.FlexBlock,null,Object(c.__)("Webhooks","presto-player")),!(null==p||!p.length)&&React.createElement(u.Button,{isSmall:!0,isPrimary:!0,style:{marginRight:"30px"}},Object(c.sprintf)(Object(c.__)("%d connected"),null==p?void 0:p.length))),initialOpen:!1},(p||[]).map((function(e){return React.createElement(Et,{webhook:e,key:null==e?void 0:e.id,loading:b})})),React.createElement("br",null),React.createElement(u.Button,{isSecondary:!0,onClick:function(){l(!0)}},Object(c.__)("Create New WebHook","presto-player")),r&&React.createElement(gt,{onClose:function(){return l(!1)}})))};function wt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Pt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wt(Object(r),!0).forEach((function(t){Object(v.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var kt=r(43),Ct=function(){var e,t,r,o,l,i,p,b,y,m,d,O,_=Object(n.useState)(!1),f=Object(s.a)(_,2),v=f[0],h=f[1],j=Object(a.useEntityProp)("root","site","presto_player_bunny_stream"),g=Object(s.a)(j,2),E=g[0],R=g[1],w=function(e){R(Pt(Pt({},E||{}),e))},P=Object(a.useEntityProp)("root","site","presto_player_google_analytics"),k=Object(s.a)(P,2),C=k[0],S=k[1],x=function(e){S(Pt(Pt({},C||{}),e))},D=Object(a.useEntityProp)("root","site","presto_player_youtube"),N=Object(s.a)(D,2),T=N[0],B=N[1],F=function(e){B(Pt(Pt({},T||{}),e))},I=function(){var e;return(null===(e=prestoPlayer)||void 0===e||!e.isPremium)&&{title:Object(c.__)("Pro Feature","presto-player"),heading:Object(c.__)("Unlock Presto Player Pro","presto-player"),message:Object(c.__)("Get this feature and more with the Pro version of Presto Player!","presto-player"),link:"https://prestoplayer.com"}};return React.createElement(le,{title:Object(c.__)("Integrations","presto-player"),description:Object(c.__)("Third party integrations and connections.","presto-player")},React.createElement(ee,{title:Object(c.__)("Google Analytics","presto-player"),description:Object(c.__)("Analytics settings for media plays, watch times and more.","presto-player"),disabled:I()},React.createElement(u.ToggleControl,{className:"presto-player__setting--google-analytics",label:Object(c.__)("Enable","presto-player"),help:Object(c.__)("Send analytics events to your Google Analytics account.","presto-player"),checked:null==C?void 0:C.enable,onChange:function(e){return x({enable:e})}}),React.createElement(u.ToggleControl,{className:"presto-player__setting--use-existing-tag",label:Object(c.__)("Use existing on-page tag?","presto-player"),help:Object(c.__)("Should we use an existing google analytics (v4) tag? If not, we'll output one for you.","presto-player"),checked:null==C?void 0:C.use_existing_tag,onChange:function(e){return x({use_existing_tag:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Measurement ID","presto-player"),help:Object(c.__)("Enter a Google Analytics Measurement ID, which can be found on your analytics admin page.","presto-player"),value:null==C?void 0:C.measurement_id,onChange:function(e){return x({measurement_id:e})}})),React.createElement(ee,{title:Object(c.__)("YouTube","presto-player"),description:Object(c.__)("Settings for YouTube videos.","presto-player")},React.createElement(u.ToggleControl,{className:"presto-player__setting--youtube-nocookie",label:Object(c.__)("Privacy-Enhanced Mode","presto-player"),help:Object(c.__)("Embed YouTube videos without using cookies that track viewing behaviour.","presto-player"),checked:null==T?void 0:T.nocookie,onChange:function(e){return F({nocookie:e})}}),React.createElement(u.TextControl,{label:Object(c.__)("Channel ID","presto-player"),help:React.createElement("div",null,Object(c.__)("Enter the ID of your channel to enable Youtube Subscribe button functionality.","presto-player")," ",React.createElement(u.ExternalLink,{href:"https://support.google.com/youtube/answer/3250431?hl=en"},Object(c.__)("Find my channel id","presto-player"))),value:null==T?void 0:T.channel_id,onChange:function(e){return F({channel_id:e})}})),(null===(m=prestoPlayer)||void 0===m||!m.isPremium||!!(null!==(d=prestoPlayer)&&void 0!==d&&d.proVersion&&kt(null===(O=prestoPlayer)||void 0===O?void 0:O.proVersion,"0.9.0")>=0))&&React.createElement(ee,{hideSaveButton:!0,title:Object(c.__)("Email Capture","presto-player"),description:Object(c.__)("Integrate Presto Player with an email provider for email capture.","presto-player"),disabled:I()},React.createElement(it,null),React.createElement(ut,null),React.createElement(yt,null),React.createElement(dt,null),(null===(e=prestoPlayer)||void 0===e?void 0:e.proVersion)&&kt(null===(t=prestoPlayer)||void 0===t?void 0:t.proVersion,"1.2.0")>=0&&React.createElement(Rt,null),React.createElement(Ue,null)),null!==(r=window)&&void 0!==r&&null!==(o=r.prestoPlayer)&&void 0!==o&&null!==(l=o.isSetup)&&void 0!==l&&l.bunny?React.createElement(React.Fragment,null,React.createElement(ee,{title:Object(c.__)("Bunny.net Settings","presto-player"),description:Object(c.__)("Modify bunny.net settings.","presto-player")},!(null===(i=window)||void 0===i||null===(p=i.prestoPlayer)||void 0===p||null===(b=p.isSetup)||void 0===b||null===(y=b.bunny)||void 0===y||!y.stream)&&React.createElement(n.Fragment,null,React.createElement(u.TextControl,{label:Object(c.__)("Initial Quality Level","presto-player"),help:Object(c.__)("You can set the default quality start level for all streams (i.e. 240, 360, 480, 720, 1080, etc). Set this lower to prevent initial buffering if your users have slow connections. Set this higher to start with a higher quality stream.","presto-player"),placeholder:"480",type:"number",value:null==E?void 0:E.hls_start_level,onChange:function(e){return w({hls_start_level:e})}}),React.createElement("br",null),React.createElement(u.ToggleControl,{label:Object(c.__)("Disable Classic Bunny.net Storage","presto-player"),help:Object(c.__)("This will disable Bunny.net classic storage in your block UI.","presto-player"),checked:null==E?void 0:E.disable_legacy_storage,onChange:function(e){return w({disable_legacy_storage:e})}}),React.createElement("br",null)),React.createElement(u.ToggleControl,{label:Object(c.__)("Edit Bunny.net Settings","presto-player"),help:Object(c.__)("Edit Bunny.net connection settings. Only edit this if you know what you're doing.","presto-player"),checked:v,onChange:h}),!!v&&React.createElement(React.Fragment,null,React.createElement(ke,null),React.createElement(he,null)))):React.createElement(ee,null,React.createElement(CTA,{className:"presto-player__setting--bunny-cta",option:{name:Object(c.__)("Bunny.net Video","presto-player"),help:Object(c.__)("To get started with Bunny.net, add a Bunny.net video to your page.","presto-player"),type:"cta",button:{text:"Learn More",link:"https://prestoplayer.com/secure-video-with-bunny-net",target:"_blank"}}})))};var St=function(){var e,t,r,i,y,m,d,O=Object(o.useDispatch)(b.store),_=O.createSuccessNotice,f=O.createErrorNotice,v=Object(n.useState)(!1),h=Object(s.a)(v,2),j=h[0],g=h[1];window.onhashchange=function(){window.scrollTo(0,0)};var E=W().save,R=function(){var e=Object(l.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,E();case 3:_(Object(c.__)("Settings Updated","presto-player"),{type:"snackbar"}),e.next=10;break;case 6:e.prev=6,e.t0=e.catch(0),console.error(e.t0),f((null===e.t0||void 0===e.t0?void 0:e.t0.message)||Object(c.__)("Something went wrong","presto-player"),{type:"snackbar"});case 10:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),w=Object(o.useSelect)((function(e){var t,r,n,o=["root","site"];return(t=e(a.store)).getEntityRecords.apply(t,o),!(null!==(r=e(a.store))&&void 0!==r&&null!==(n=r.hasFinishedResolution)&&void 0!==n&&n.call(r,"getEntityRecords",o))}));return Object(n.useEffect)((function(){w||g(!0)}),[w]),j?React.createElement("div",{className:"presto-settings"},React.createElement(I,{routes:A,defaultRoute:null==A||null===(e=A.general)||void 0===e?void 0:e.path},React.createElement(u.Card,{className:"presto-settings__navigation"},React.createElement(u.Flex,null,React.createElement(u.FlexBlock,null,React.createElement("div",{role:"tablist","aria-orientation":"horizontal",className:"components-tab-panel__tabs"},React.createElement(B,{to:null==A||null===(t=A.general)||void 0===t?void 0:t.path,type:"button",role:"tab",activeClassName:"is-active",className:"components-button components-tab-panel__tabs-item presto-player__nav-general"},Object(c.__)("General","presto-player")),React.createElement(B,{to:null==A||null===(r=A.integrations)||void 0===r?void 0:r.path,type:"button",role:"tab",activeClassName:"is-active",className:"components-button components-tab-panel__tabs-item presto-player__nav-integrations"},Object(c.__)("Integrations","presto-player")),React.createElement(B,{to:null==A||null===(i=A.performance)||void 0===i?void 0:i.path,type:"button",role:"tab",activeClassName:"is-active",className:"components-button components-tab-panel__tabs-item presto-player__nav-performance"},Object(c.__)("Performance","presto-player")))),React.createElement(u.FlexItem,null,React.createElement(U,{onSave:R,style:{marginRight:"8px"}},Object(c.__)("Update Settings","presto-player"))))),React.createElement(S,{path:null==A||null===(y=A.general)||void 0===y?void 0:y.path},React.createElement(me,null)),React.createElement(S,{path:null==A||null===(m=A.integrations)||void 0===m?void 0:m.path},React.createElement(Ct,null)),React.createElement(S,{path:null==A||null===(d=A.performance)||void 0===d?void 0:d.path},React.createElement(_e,null))),React.createElement(q,{className:"presto-settings-page-notices"})):React.createElement("div",{className:"presto-settings__loading"},React.createElement(u.Spinner,null))};Object(n.render)(React.createElement(St,null),document.getElementById("presto-settings-page"))},7:function(e,t){e.exports=window.wp.data},8:function(e,t){e.exports=window.wp.element}},[[35,1,2]]]);
19
+ //# sourceMappingURL=admin-1aadbb22.js.map
dist/settings/admin-1aadbb22.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["webpack:///external [\"wp\",\"i18n\"]","webpack:///external [\"wp\",\"components\"]","webpack:///external [\"wp\",\"notices\"]","webpack:///external [\"wp\",\"compose\"]","webpack:///external [\"wp\",\"coreData\"]","webpack:///external [\"wp\",\"apiFetch\"]","webpack:///./src/admin/settings/entities.js","webpack:///./src/router/utils.js","webpack:///./src/router/context.js","webpack:///./src/router/route.js","webpack:///./src/router/link.js","webpack:///./src/router/index.js","webpack:///./src/admin/settings/routes.js","webpack:///./src/admin/settings/components/SaveButton.js","webpack:///./src/admin/settings/components/Notices.js","webpack:///./src/hooks/useSave.js","webpack:///./src/admin/settings/components/Disabled.js","webpack:///./src/admin/settings/components/Group.js","webpack:///./src/admin/settings/components/Media.js","webpack:///./src/admin/settings/components/Page.js","webpack:///./src/admin/settings/components/CodeMirror.js","webpack:///./src/admin/settings/pages/General.js","webpack:///./src/admin/settings/pages/Performance.js","webpack:///./src/admin/settings/pages/parts/BunnyClassic/index.js","webpack:///./src/admin/settings/pages/parts/BunnyStream/PublicStream.js","webpack:///./src/admin/settings/pages/parts/BunnyStream/PrivateStream.js","webpack:///./src/admin/settings/pages/parts/BunnyStream/index.js","webpack:///./src/admin/settings/pages/parts/EmailExport.js","webpack:///./src/admin/settings/components/Integration.js","webpack:///./src/admin/settings/components/TextControl.js","webpack:///./src/admin/settings/pages/parts/integration/withIntegration.js","webpack:///./src/admin/settings/pages/parts/integration/ActiveCampaign.js","webpack:///./src/admin/settings/pages/parts/integration/FluentCRM.js","webpack:///./src/admin/settings/pages/parts/integration/Mailchimp.js","webpack:///./src/admin/settings/pages/parts/integration/MailerLite.js","webpack:///./src/admin/settings/pages/parts/Webhooks/Headers.js","webpack:///./src/admin/settings/pages/parts/Webhooks/NewWebhook.js","webpack:///./src/admin/settings/pages/parts/Webhooks/Webhook.js","webpack:///./src/admin/settings/pages/parts/Webhooks/index.js","webpack:///./src/admin/settings/pages/Integrations.js","webpack:///./src/admin/settings/app.js","webpack:///./src/admin/settings/index.js","webpack:///external [\"wp\",\"data\"]","webpack:///external [\"wp\",\"element\"]"],"names":["module","exports","window","dispatch","coreStore","addEntities","name","kind","label","__","baseURL","baseURLParams","context","locationToRoute","location","path","pathname","hash","query","qs","parse","search","history","createBrowserHistory","RouterContext","wp","element","createContext","route","useContext","prev","Route","onRoute","children","matched","match","checkMatch","substr","cloneElement","Link","props","to","onClick","activeClassName","state","className","classNames","e","preventDefault","push","Router","setState","routes","Object","keys","map","key","unlisten","listen","handleRouteChange","defaultRoute","this","NotFound","forEach","isMatched","data","routerContextValue","is404","Provider","value","Component","general","integrations","performance","SaveButton","onSave","busy","loading","rest","useSelect","select","__experimentalGetDirtyEntityRecords","isSavingEntityRecord","dirtyEntityRecords","filter","r","isDirty","length","isSaving","some","record","disabled","ScSkeleton","style","width","height","display","isPrimary","aria-disabled","isBusy","undefined","notices","noticesStore","getNotices","removeNotice","useDispatch","snackbarNotices","type","onRemove","useSave","saveEditedEntityRecord","save","a","dirtyRecords","pendingSavedRecords","throwOnError","Promise","all","message","i18n","useState","components","Modal","Button","dialog","setDialog","title","onRequestClose","heading","href","link","target","Card","CardBody","CardFooter","description","hideSaveButton","createSuccessNotice","createErrorNotice","console","error","Disabled","size","marginBottom","isShady","BaseControl","MediaUpload","mediaUtils","option","help","allowedTypes","maxWidth","onSelect","VisualLabel","border","src","render","open","isSecondary","id","hidden","sprintf","isTertiary","onChange","handleChange","instance","textRef","current","useRef","useEffect","CodeMirror","fromTextArea","lineNumbers","on","css","ref","rows","prestoPlayer","isPremium","presetArgs","audioPresetArgs","presets","getEntityRecords","loadingPresets","isResolving","audioPresets","loadingAudioPresets","useEntityProp","presetSettings","setPresetSettings","audioPresetSettings","setAudioPresetSettings","analytics","setAnalytics","updateAnalytics","branding","setBranding","updateBranding","uninstall","setUninstall","Page","Group","Media","image","logo","url","logo_width","min","max","onChangeComplete","color","hex","checked","enable","purge_data","default_player_preset","options","preset","player_css","uninstall_data","confirm","setPerformance","updatePerformance","module_enabled","status","isDismissible","automations","classic","setClassic","updateClassic","public_id","public_hostname","private_id","private_hostname","private_security_key","marginTop","fontSize","stream","setStream","updateStream","video_library_api_key","pull_zone_url","video_library_id","token_auth_key","PublicStream","PrivateStream","Panel","PanelBody","Flex","FlexBlock","Notice","Spinner","step","setStep","progress","setProgress","setError","setURL","exportEmails","apiFetch","method","percentage","currentStep","fetchedURL","initialOpen","align","justify","alignItems","FlexItem","PanelRow","connected","onConnect","connectButtonText","disconnectButtonText","onDisconnect","setConfirm","isSmall","marginRight","onSubmit","isDestructive","TextControl","optionName","placeholder","updateSetting","createHigherOrderComponent","WrappedComponent","success","setSuccess","setIsBusy","setting","setSetting","makeRequest","response","compose","withIntegration","setData","Integration","api_key","headers","setHeaders","updateHeader","index","item","i","icon","_","removeHeader","header","onClose","webhook","saveEntityRecord","setBusy","email_name","form","setForm","updateForm","submit","archived","shouldCloseOnClickOutside","required","autoFocus","margin","Headers","incomingWebhook","setOpen","deleteEntityRecord","queryArgs","getEditedEntityRecord","isDeletingEntityRecord","isDeleting","deleteWebhook","NewWebhook","webhooks","Webhook","semverCompare","require","editBunny","setEditBunny","youtube","setYoutube","updateYoutube","use_existing_tag","measurement_id","nocookie","channel_id","proVersion","ActiveCampaign","FluentCRM","Mailchimp","MailerLite","Webhooks","EmailExport","isSetup","bunny","hls_start_level","disable_legacy_storage","BunnyStream","BunnyClassic","CTA","button","text","App","loaded","setLoaded","onhashchange","scrollTo","hasFinishedResolution","role","aria-orientation","General","Integrations","Performance","Notices","document","getElementById"],"mappings":";;;;;;;;;;;;;;;;;iHAAcA,EAAOC,QAAUC,OAAW,GAAQ,M,gBCApCF,EAAOC,QAAUC,OAAW,GAAc,Y,iBCA1CF,EAAOC,QAAUC,OAAW,GAAW,S,iBCAvCF,EAAOC,QAAUC,OAAW,GAAW,S,gBCAvCF,EAAOC,QAAUC,OAAW,GAAY,U,iBCAxCF,EAAOC,QAAUC,OAAW,GAAY,U,iHCItDC,mBAASC,SAAWC,YAAY,CAC9B,CACEC,KAAM,SACNC,KAAM,gBACNC,MAAOC,aAAG,UAAW,iBACrBC,QAAS,0BACTC,cAAe,CAAEC,QAAS,SAE5B,CACEN,KAAM,eACNC,KAAM,gBACNC,MAAOC,aAAG,gBAAiB,iBAC3BC,QAAS,gCACTC,cAAe,CAAEC,QAAS,SAE5B,CACEN,KAAM,UACNC,KAAM,gBACNC,MAAOC,aAAG,UAAW,iBACrBC,QAAS,2BACTC,c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pU,gBAAgB,YAChBE,UAAU,oFAETpC,aAAG,cAAe,oBAIzB,oBAAC,WAAD,KACE,oBAACiE,EAAD,CAAYC,OAAQ2M,EAAUzL,MAAO,CAAEwL,YAAa,QACjD5Q,aAAG,kBAAmB,qBAM/B,oBAACsB,EAAD,CAAOhB,KAAMqC,SAAF,UAAEA,EAAQmB,eAAV,aAAE,EAAiBxD,MAC5B,oBAACkW,GAAD,OAEF,oBAAClV,EAAD,CAAOhB,KAAMqC,SAAF,UAAEA,EAAQoB,oBAAV,aAAE,EAAsBzD,MACjC,oBAACmW,GAAD,OAEF,oBAACnV,EAAD,CAAOhB,KAAMqC,SAAF,UAAEA,EAAQqB,mBAAV,aAAE,EAAqB1D,MAChC,oBAACoW,GAAD,QAIJ,oBAACC,EAAD,CAASvU,UAAU,kCAjEnB,2BAAKA,UAAU,4BACb,oBAAC,UAAD,QClDR+G,iBAAO,oBAAC,GAAD,MAASyN,SAASC,eAAe,0B,gBCpB1BtX,EAAOC,QAAUC,OAAW,GAAQ,M,gBCApCF,EAAOC,QAAUC,OAAW,GAAW,U","file":"settings/admin-1aadbb22.js","sourcesContent":["(function() { module.exports = window[\"wp\"][\"i18n\"]; }());","(function() { module.exports = window[\"wp\"][\"components\"]; }());","(function() { module.exports = window[\"wp\"][\"notices\"]; }());","(function() { module.exports = window[\"wp\"][\"compose\"]; }());","(function() { module.exports = window[\"wp\"][\"coreData\"]; }());","(function() { module.exports = window[\"wp\"][\"apiFetch\"]; }());","import { store as coreStore } from \"@wordpress/core-data\";\nimport { dispatch } from \"@wordpress/data\";\nimport { __ } from \"@wordpress/i18n\";\n\ndispatch(coreStore).addEntities([\n {\n name: \"preset\",\n kind: \"presto-player\",\n label: __(\"Presets\", \"presto-player\"),\n baseURL: \"presto-player/v1/preset\",\n baseURLParams: { context: \"edit\" },\n },\n {\n name: \"audio-preset\",\n kind: \"presto-player\",\n label: __(\"Audio Presets\", \"presto-player\"),\n baseURL: \"presto-player/v1/audio-preset\",\n baseURLParams: { context: \"edit\" },\n },\n {\n name: \"webhook\",\n kind: \"presto-player\",\n label: __(\"Webhook\", \"presto-player\"),\n baseURL: \"presto-player/v1/webhook\",\n baseURLParams: { context: \"edit\" },\n },\n]);\n","import qs from \"querystringify\";\nexport function locationToRoute(location) {\n // location comes from the history package\n return {\n path: location.pathname,\n hash: location.hash,\n query: qs.parse(location.search),\n };\n}\n","import { createBrowserHistory } from \"history\";\nimport { locationToRoute } from \"./utils\";\n\nexport const history = createBrowserHistory();\nexport const RouterContext = wp.element.createContext({\n route: locationToRoute(history.location),\n});\n","import { RouterContext } from \"./context\";\nconst { useContext } = wp.element;\nimport { match } from \"path-to-regexp\";\nlet prev = \"\";\n\nexport function Route({ path, onRoute, children }) {\n // Extract route from RouterContext\n const { route } = useContext(RouterContext);\n\n const checkMatch = match(`${path}`);\n const matched = checkMatch(`${route.hash.substr(1)}`);\n\n if (!matched) {\n return null;\n }\n\n if (onRoute) {\n if (prev !== matched.path) {\n onRoute();\n }\n prev = matched.path;\n }\n\n return <div>{wp.element.cloneElement(children, { route: matched })}</div>;\n}\n","const { useContext } = wp.element;\nimport { RouterContext, history } from \"./context\";\nimport classNames from \"classnames\";\nimport { match } from \"path-to-regexp\";\n\nexport function Link(props) {\n const { to, onClick, children, activeClassName } = props;\n const { route } = useContext(RouterContext);\n\n let state = { ...props };\n delete state.activeClassName;\n\n const isActive = () => {\n const checkMatch = match(`${to}`);\n return checkMatch(`${route.hash.substr(1)}`);\n };\n\n const handleClick = (e) => {\n e.preventDefault();\n // Dont' navigate if current path\n if (route.path === to) {\n return;\n }\n // Trigger onClick prop manually\n if (onClick) {\n onClick(e);\n }\n const { search } = history.location;\n\n // Use history API to navigate page\n history.push(`${search}#${to}`);\n };\n\n return (\n <a\n {...state}\n className={classNames({ [activeClassName]: isActive() }, props.className)}\n onClick={handleClick}\n >\n {children}\n </a>\n );\n}\n","import { Component } from \"@wordpress/element\";\nimport { locationToRoute } from \"./utils\";\nimport { history, RouterContext } from \"./context\";\nimport { Route } from \"./route\";\nimport { Link } from \"./link\";\nimport { match } from \"path-to-regexp\";\n\nclass Router extends Component {\n constructor(props) {\n super(props);\n\n // Convert our routes into an array for easy 404 checking\n this.routes = Object.keys(props.routes).map(\n (key) => props.routes[key].path\n );\n\n // Listen for path changes from the history API\n this.unlisten = history.listen(this.handleRouteChange);\n\n const route = locationToRoute(history.location);\n const { search } = history.location;\n\n // Define the initial RouterContext value\n this.state = {\n route,\n defaultRoute: props?.defaultRoute\n ? `${search}#${props?.defaultRoute}`\n : `${search}#/`,\n };\n }\n\n componentWillUnmount() {\n // Stop listening for changes if the Router component unmounts\n this.unlisten();\n }\n\n handleRouteChange = (location) => {\n const route = locationToRoute(location?.location);\n this.setState({ route: route });\n };\n\n render() {\n // Define our variables\n const { children, NotFound } = this.props;\n const { route, defaultRoute } = this.state;\n\n if (!route.hash) {\n history.push(defaultRoute);\n return <div></div>;\n }\n\n let matched = false;\n // match route\n (this.routes || []).forEach((name) => {\n const checkMatch = match(route.hash.substr(1));\n const isMatched = checkMatch(`${route.hash.substr(1)}`);\n if (!isMatched) {\n return;\n }\n matched = {\n name,\n data: isMatched,\n };\n });\n\n const routerContextValue = { route, matched };\n\n // Check if 404 if no route matched\n const is404 = !matched;\n\n return (\n <RouterContext.Provider value={routerContextValue}>\n {is404 ? <div>Not found</div> : children}\n </RouterContext.Provider>\n );\n }\n}\nexport { history, RouterContext, Router, Route, Link };\n","export const routes = {\n general: {\n path: \"general\",\n },\n integrations: {\n path: \"/integrations\",\n },\n performance: {\n path: \"/performance\",\n },\n};\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from \"@wordpress/data\";\nimport { __ } from \"@wordpress/i18n\";\nimport { store as coreStore } from \"@wordpress/core-data\";\nimport { Button } from \"@wordpress/components\";\n\nexport default function SaveButton({\n onSave,\n children,\n busy,\n loading,\n ...rest\n}) {\n const { isDirty, isSaving } = useSelect((select) => {\n const {\n __experimentalGetDirtyEntityRecords,\n isSavingEntityRecord,\n } = select(coreStore);\n\n const dirtyEntityRecords = (\n __experimentalGetDirtyEntityRecords() || []\n ).filter((r) => r.name !== \"webhook\");\n\n return {\n isDirty: dirtyEntityRecords.length > 0,\n isSaving: dirtyEntityRecords.some((record) =>\n isSavingEntityRecord(record.kind, record.name, record.key)\n ),\n };\n }, []);\n\n const disabled = !isDirty || isSaving;\n\n if (loading) {\n return (\n <ScSkeleton\n style={{\n width: \"120px\",\n height: \"35px\",\n display: \"inline-block\",\n }}\n ></ScSkeleton>\n );\n }\n\n return (\n <Button\n isPrimary\n aria-disabled={disabled}\n disabled={disabled || isSaving || busy}\n isBusy={isSaving || busy}\n onClick={disabled ? undefined : onSave}\n {...rest}\n >\n {children}\n </Button>\n );\n}\n","import { SnackbarList } from \"@wordpress/components\";\nimport { useDispatch, useSelect } from \"@wordpress/data\";\n\nimport { store as noticesStore } from \"@wordpress/notices\";\n\nexport default ({ className }) => {\n const notices = useSelect((select) => select(noticesStore).getNotices());\n const { removeNotice } = useDispatch(noticesStore);\n const snackbarNotices = notices.filter(({ type }) => type === \"snackbar\");\n\n return (\n <SnackbarList\n notices={snackbarNotices}\n className={className}\n onRemove={removeNotice}\n />\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { select, useDispatch } from \"@wordpress/data\";\nimport { store as coreStore } from \"@wordpress/core-data\";\n\nexport default function useSave() {\n const { saveEditedEntityRecord } = useDispatch(coreStore);\n\n /**\n * Handle the form submission\n */\n const save = async () => {\n // build up pending records to save.\n const dirtyRecords = select(\n coreStore\n ).__experimentalGetDirtyEntityRecords();\n const pendingSavedRecords = [];\n\n dirtyRecords.forEach(({ kind, name, key }) => {\n pendingSavedRecords.push(\n saveEditedEntityRecord(kind, name, key, {\n throwOnError: true,\n })\n );\n });\n\n // check values.\n const values = await Promise.all(pendingSavedRecords);\n if (values.some((value) => typeof value === \"undefined\")) {\n throw { message: \"Saving failed.\" };\n }\n\n return true;\n };\n\n return {\n save,\n };\n}\n","const { __ } = wp.i18n;\nconst { useState } = wp.element;\nconst { Modal, Button } = wp.components;\n\nexport default ({ children, disabled }) => {\n const [dialog, setDialog] = useState(false);\n\n if (!disabled) {\n return <div>{children}</div>;\n }\n\n return (\n <div>\n <div\n className=\"presto-options__disabled-overlay\"\n onClick={(e) => {\n setDialog(true);\n e.preventDefault();\n return false;\n }}\n >\n <div>{children}</div>\n </div>\n {!!dialog && (\n <Modal title={disabled?.title} onRequestClose={() => setDialog(false)}>\n <h2>{disabled?.heading}</h2>\n <p>{disabled?.message}</p>\n <Button href={disabled?.link} target=\"_blank\" isPrimary>\n {__(\"Learn More\", \"presto-player\")}\n </Button>\n </Modal>\n )}\n </div>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nconst { Card, CardBody, CardFooter } = wp.components;\nimport SaveButton from \"./SaveButton\";\nimport { useDispatch } from \"@wordpress/data\";\nimport { store as noticesStore } from \"@wordpress/notices\";\nimport Disabled from \"./Disabled\";\nimport useSave from \"../../../hooks/useSave\";\n\nexport default ({ title, description, children, disabled, hideSaveButton }) => {\n const { save } = useSave();\n const { createSuccessNotice, createErrorNotice } = useDispatch(noticesStore);\n\n /**\n * Form is submitted.\n */\n const onSave = async () => {\n try {\n await save();\n createSuccessNotice(__(\"Settings Updated\", \"presto-player\"), {\n type: \"snackbar\",\n });\n } catch (e) {\n console.error(e);\n createErrorNotice(\n e?.message || __(\"Something went wrong\", \"presto-player\")\n );\n }\n };\n\n return (\n <Disabled disabled={disabled}>\n <Card size=\"large\" className=\"presto-options__card\">\n <CardBody className={`presto-options__card-body`}>\n <div className=\"presto-flow\" style={{ \"--presto-flow-space\": \"2em\" }}>\n <div\n className=\"presto-flow\"\n style={{ \"--presto-flow-space\": \"1em\" }}\n >\n {title && (\n <h2 style={{ marginBottom: 0 }}>\n {title}{\" \"}\n {!!disabled && (\n <div className=\"presto-options__pro-badge\">Pro</div>\n )}\n </h2>\n )}\n {description && <p>{description}</p>}\n </div>\n <div>{children}</div>\n </div>\n </CardBody>\n {!hideSaveButton ? (\n <CardFooter isShady>\n <div>\n <SaveButton onSave={onSave}>{__(\"Update Settings\")}</SaveButton>\n </div>\n </CardFooter>\n ) : (\n <br />\n )}\n </Card>\n </Disabled>\n );\n};\n","const { __ } = wp.i18n;\n\nconst { Button, BaseControl } = wp.components;\nconst { MediaUpload } = wp.mediaUtils;\nconst { dispatch } = wp.data;\nimport classNames from \"classnames\";\n\nexport default ({\n option,\n label,\n help,\n allowedTypes,\n value,\n className,\n maxWidth,\n onSelect,\n}) => {\n return (\n <div\n className={classNames(\n className,\n \"presto-settings__setting is-media-control\"\n )}\n >\n <BaseControl className=\"editor-video-poster-control\">\n <BaseControl.VisualLabel>{label}</BaseControl.VisualLabel>\n {value && (\n <BaseControl>\n <img\n style={{\n maxWidth,\n border: \"1px solid #dcdcdc\",\n }}\n src={value}\n />\n </BaseControl>\n )}\n <br />\n <MediaUpload\n title={help}\n onSelect={onSelect}\n allowedTypes={allowedTypes}\n render={({ open }) => (\n <Button\n isSecondary\n onClick={open}\n className={!value ? \"button-select\" : \"button-replace\"}\n >\n {!value\n ? __(\"Select\", \"presto-player\")\n : __(\"Replace\", \"presto-player\")}\n </Button>\n )}\n />{\" \"}\n <p id={`video-block__logo-image-description-${option?.id}`} hidden>\n {value\n ? sprintf(\n /* translators: %s: poster image URL. */\n __(\"The current logo image url is %s\", \"presto-player\"),\n value\n )\n : __(\"There is no logo image currently selected\", \"presto-player\")}\n </p>\n {!!value && (\n <Button onClick={() => onSelect(\"\")} isTertiary>\n {__(\"Remove\", \"presto-player\")}\n </Button>\n )}\n </BaseControl>\n <br />\n </div>\n );\n};\n","export default ({ children, title, description }) => {\n return (\n <div className=\"presto-flow presto-settings__page\">\n <div className=\"presto-flow\" style={{ \"--presto-flow-space\": \"1em\" }}>\n {title && <h1>{title}</h1>}\n {description && <p>{description}</p>}\n </div>\n\n <div className=\"presto-settings__body \">\n <div className=\"presto-flow\">{children}</div>\n </div>\n </div>\n );\n};\n","/** @jsx jsx */\nimport { css, jsx } from \"@emotion/core\";\nimport { BaseControl } from \"@wordpress/components\";\nimport { useEffect, useRef } from \"@wordpress/element\";\nimport classNames from \"classnames\";\n\nexport default ({ option, value, className, disabled, onChange }) => {\n let codeMirror;\n\n const handleChange = (instance) => {\n if (disabled) {\n return;\n }\n instance.save();\n onChange(textRef.current.value);\n };\n\n const textRef = useRef();\n useEffect(() => {\n if (!wp?.CodeMirror) {\n return;\n }\n codeMirror = wp.CodeMirror.fromTextArea(textRef.current, {\n type: \"text/css\",\n lineNumbers: true,\n });\n\n codeMirror.on(\"change\", handleChange);\n }, []);\n\n return (\n <div className={classNames(className, \"presto-settings__setting\")}>\n <BaseControl\n css={css`\n .CodeMirror {\n height: 200px;\n border: 1px solid #e3e3e3;\n border-radius: 4px;\n }\n `}\n label={option?.name}\n help={option?.help}\n >\n <textarea onChange={handleChange} ref={textRef} rows=\"5\" disabled>\n {value}\n </textarea>\n </BaseControl>\n </div>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { useEntityProp, store as coreStore } from \"@wordpress/core-data\";\nimport { useSelect } from \"@wordpress/data\";\nimport {\n ColorPicker,\n ComboboxControl,\n ToggleControl,\n RangeControl,\n Spinner,\n} from \"@wordpress/components\";\nimport Disabled from \"../components/Disabled\";\nimport Group from \"../components/Group\";\nimport Media from \"../components/Media\";\nimport Page from \"../components/Page\";\nimport CodeMirror from \"../components/CodeMirror\";\n\nexport default () => {\n const disabled = () => {\n if (prestoPlayer?.isPremium) {\n return false;\n }\n return {\n title: __(\"Pro Feature\", \"presto-player\"),\n heading: __(\"Unlock Presto Player Pro\", \"presto-player\"),\n message: __(\n \"Get this feature and more with the Pro version of Presto Player!\",\n \"presto-player\"\n ),\n link: \"https://prestoplayer.com\",\n };\n };\n\n const {\n presets,\n loadingPresets,\n audioPresets,\n loadingAudioPresets,\n } = useSelect((select) => {\n const presetArgs = [\"presto-player\", \"preset\"];\n const audioPresetArgs = [\"presto-player\", \"audio-preset\"];\n return {\n presets: select(coreStore).getEntityRecords(...presetArgs),\n loadingPresets: select(coreStore).isResolving(\n \"getEntityRecords\",\n presetArgs\n ),\n audioPresets: select(coreStore).getEntityRecords(...audioPresetArgs),\n loadingAudioPresets: select(coreStore).isResolving(\n \"getEntityRecords\",\n audioPresetArgs\n ),\n };\n }, []);\n\n const [presetSettings, setPresetSettings] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_presets\"\n );\n const updatePresetSettings = (data) => {\n setPresetSettings({\n ...(presetSettings || {}),\n ...data,\n });\n };\n\n const [audioPresetSettings, setAudioPresetSettings] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_audio_presets\"\n );\n const updateAudioPresetSettings = (data) => {\n setAudioPresetSettings({\n ...(audioPresetSettings || {}),\n ...data,\n });\n };\n\n const [analytics, setAnalytics] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_analytics\"\n );\n const updateAnalytics = (data) => {\n setAnalytics({\n ...(analytics || {}),\n ...data,\n });\n };\n\n const [branding, setBranding] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_branding\"\n );\n const updateBranding = (data) => {\n setBranding({\n ...(branding || {}),\n ...data,\n });\n };\n\n const [uninstall, setUninstall] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_uninstall\"\n );\n const updateUninstall = (data) => {\n setUninstall({\n ...(uninstall || {}),\n ...data,\n });\n };\n\n return (\n <Page\n title={__(\"General\", \"presto-player\")}\n description={__(\n \"Branding, analytics and uninstall data.\",\n \"presto-player\"\n )}\n >\n <Group\n title={__(\"Branding\", \"presto-player\")}\n description={__(\"Global player branding options\", \"presto-player\")}\n >\n <Disabled disabled={disabled()}>\n <Media\n className={\"presto-player__setting--logo\"}\n label={\n <>\n {__(\"Logo\", \"presto-player\")}{\" \"}\n {disabled() && (\n <span className=\"presto-options__pro-badge\">\n {__(\"Pro\", \"presto-player\")}\n </span>\n )}\n </>\n }\n onSelect={(image) => updateBranding({ logo: image?.url })}\n maxWidth={branding?.logo_width || 150}\n value={branding?.logo}\n />\n\n <div style={{ maxWidth: \"500px\" }}>\n <RangeControl\n className={\"presto-player__setting--logo-width\"}\n label={__(\"Logo Max Width\", \"presto-player\")}\n value={branding?.logo_width || 150}\n onChange={(logo_width) => updateBranding({ logo_width })}\n min={1}\n max={400}\n />\n </div>\n </Disabled>\n <ColorPicker\n className={\"presto-player__setting--brand-color\"}\n onChangeComplete={(value) => updateBranding({ color: value.hex })}\n color={branding?.color}\n />\n </Group>\n <Group\n title={__(\"Analytics\", \"presto-player\")}\n disabled={disabled()}\n description={__(\n \"Analytics settings for media plays, watch times and more.\",\n \"presto-player\"\n )}\n >\n <div>\n <ToggleControl\n className={\"presto-player__setting--analytics-enable\"}\n label={__(\"Enable\", \"presto-player\")}\n help={__(\"Enable view analytics for your media\", \"presto-player\")}\n checked={analytics?.enable}\n onChange={(enable) => updateAnalytics({ enable })}\n />\n\n {!!analytics?.enable && (\n <ToggleControl\n label={__(\"Auto-Purge Data (recommended)\")}\n help={__(\n \"Automatically purge data older than 90 days.\",\n \"presto-player\"\n )}\n className={\"presto-player__setting--analytics-enable\"}\n checked={\n analytics?.purge_data !== undefined\n ? analytics?.purge_data\n : true\n }\n onChange={(purge_data) => updateAnalytics({ purge_data })}\n />\n )}\n </div>\n </Group>\n <Group\n title={__(\"Presets\", \"presto-player\")}\n disabled={disabled()}\n description={__(\"Media presets settings.\", \"presto-player\")}\n >\n {!!loadingPresets ? (\n <Spinner />\n ) : (\n <ComboboxControl\n label={__(\"Select default preset for video.\", \"presto-player\")}\n value={presetSettings?.default_player_preset}\n options={(presets || []).map((preset) => {\n return {\n value: preset?.id,\n label: preset?.name,\n };\n })}\n onChange={(default_player_preset) =>\n updatePresetSettings({\n default_player_preset: default_player_preset || 1,\n })\n }\n />\n )}\n\n {!!loadingAudioPresets ? (\n <Spinner />\n ) : (\n <ComboboxControl\n label={__(\"Select default preset for audio.\", \"presto-player\")}\n value={audioPresetSettings?.default_player_preset}\n options={(audioPresets || []).map((preset) => {\n return {\n value: preset?.id,\n label: preset?.name,\n };\n })}\n onChange={(default_player_preset) =>\n updateAudioPresetSettings({\n default_player_preset: default_player_preset || 1,\n })\n }\n />\n )}\n </Group>\n <Group\n disabled={disabled()}\n title={__(\"Custom CSS\", \"presto-player\")}\n description={__(\n \"Quickly add custom css to the player web component.\",\n \"presto-player\"\n )}\n >\n <CodeMirror\n disabled={!prestoPlayer?.isPremium}\n option={{ id: \"player_css\" }}\n value={branding?.player_css}\n key={branding?.player_css}\n onChange={(player_css) => updateBranding({ player_css })}\n />\n </Group>\n <Group\n title={__(\"Uninstall Options\", \"presto-player\")}\n description={__(\n \"Options to remove data on uninstall.\",\n \"presto-player\"\n )}\n >\n <ToggleControl\n label={__(\"Remove data on uninstall\")}\n help={__(\"This removes all data on uninstall.\", \"presto-player\")}\n className=\"presto-player__setting--uninstall\"\n checked={uninstall?.uninstall_data}\n onChange={(uninstall_data) => {\n if (uninstall_data) {\n const r = confirm(\n __(\n \"Caution: Data Loss. Are you sure you want to remove all the data from this plugin? This is irreversible!\",\n \"presto-player\"\n )\n );\n if (!r) return;\n }\n updateUninstall({ uninstall_data });\n }}\n />\n </Group>\n </Page>\n );\n};\n","/** @jsx jsx */\nimport { css, jsx } from \"@emotion/core\";\n\nimport { __ } from \"@wordpress/i18n\";\nimport { Notice, ExternalLink, ToggleControl } from \"@wordpress/components\";\nimport { useEntityProp } from \"@wordpress/core-data\";\n\nimport Group from \"../components/Group\";\nimport Page from \"../components/Page\";\n\nexport default () => {\n const [performance, setPerformance] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_performance\"\n );\n const updatePerformance = (data) => {\n setPerformance({\n ...(performance || {}),\n ...data,\n });\n };\n\n return (\n <Page\n title={__(\"Performance\", \"presto-player\")}\n description={__(\"Player performance preferences.\", \"presto-player\")}\n >\n <Group\n title={__(\"Performance\", \"presto-player\")}\n description={__(\n \"Performance options for player loading.\",\n \"presto-player\"\n )}\n >\n <div>\n <ToggleControl\n className={\"presto-player__setting--module-enabled\"}\n label={__(\"Dynamically Load JavaScript\", \"presto-player\")}\n help={__(\n \"Dynamically load javascript modules on the page which can significantly reduce javascript size and increase performance.\",\n \"presto-player\"\n )}\n checked={performance?.module_enabled}\n onChange={(module_enabled) => updatePerformance({ module_enabled })}\n />\n\n {!!performance?.module_enabled && (\n <Notice\n css={css`\n background: #f3f4f5 !important;\n margin-bottom: 20px !important;\n `}\n className=\"presto-notice\"\n status=\"info\"\n isDismissible={false}\n >\n <div>\n <strong>{__(\"Please Note\", \"presto-player\")}</strong>\n </div>\n <div>\n {__(\n \"You may need to exclude the player script from combining, as well as enable CORS requests for some CDNs.\",\n \"presto-player\"\n )}{\" \"}\n <ExternalLink href=\"https://prestoplayer.com/docs/performance-preferences-explained#global-player-performance-setting\">\n {__(\"Learn More\", \"presto-player\")}\n </ExternalLink>\n </div>\n </Notice>\n )}\n </div>\n\n <ToggleControl\n className={\"presto-player__setting--automations\"}\n label={__(\n \"Enable Ajax Requests for Progress Integrations\",\n \"presto-player\"\n )}\n help={__(\n \"Keep this on unless you do not plan on using automation, LMS or membership integrations.\",\n \"presto-player\"\n )}\n checked={performance?.automations}\n onChange={(automations) => updatePerformance({ automations })}\n />\n </Group>\n </Page>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { TextControl } from \"@wordpress/components\";\nimport { useEntityProp } from \"@wordpress/core-data\";\n\nexport default () => {\n const [classic, setClassic] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_bunny_pull_zones\"\n );\n const updateClassic = (data) => {\n setClassic({\n ...(classic || {}),\n ...data,\n });\n };\n\n const {\n public_id,\n public_hostname,\n private_id,\n private_hostname,\n private_security_key,\n } = classic || {};\n\n return (\n <>\n <h2 style={{ marginTop: \"40px\" }}>\n {__(\"Bunny.net Storage (Classic)\", \"presto-player\")}\n </h2>\n <p style={{ fontSize: \"12px\", color: \"#757575\" }}>\n {__(\n 'Note: To Change your API key, please click \"Reconnect\" from a bunny block.',\n \"presto-player\"\n )}\n </p>\n\n <TextControl\n label={__(\"Public ID\", \"presto-player\")}\n help={__(\"The ID of the public pull zone to use.\", \"presto-player\")}\n value={public_id}\n onChange={(public_id) => updateClassic({ public_id })}\n />\n\n <TextControl\n label={__(\"Public Host Name\", \"presto-player\")}\n help={__(\"The hostname to use for this pullzone.\", \"presto-player\")}\n value={public_hostname}\n onChange={(public_hostname) => updateClassic({ public_hostname })}\n />\n\n <TextControl\n label={__(\"Private ID\", \"presto-player\")}\n help={__(\"The ID of the private pull zone to use.\", \"presto-player\")}\n value={private_id}\n onChange={(private_id) => updateClassic({ private_id })}\n />\n\n <TextControl\n label={__(\"Private Host Name\", \"presto-player\")}\n help={__(\n \"The hostname to use for the private pullzone.\",\n \"presto-player\"\n )}\n value={private_hostname}\n onChange={(private_hostname) => updateClassic({ private_hostname })}\n />\n\n <TextControl\n label={__(\"Private Url Token Authentication Key\", \"presto-player\")}\n help={__(\n \"Update the security token used to sign private urls.\",\n \"presto-player\"\n )}\n type=\"password\"\n value={private_security_key}\n onChange={(private_security_key) =>\n updateClassic({ private_security_key })\n }\n />\n </>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { TextControl } from \"@wordpress/components\";\nimport { useEntityProp } from \"@wordpress/core-data\";\n\nexport default () => {\n const [stream, setStream] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_bunny_stream_public\"\n );\n const updateStream = (data) => {\n setStream({\n ...(stream || {}),\n ...data,\n });\n };\n\n const { video_library_api_key, pull_zone_url, video_library_id } =\n stream || {};\n\n return (\n <>\n <TextControl\n label={__(\"Public Stream Library ID\", \"presto-player\")}\n help={__(\"The ID of the video library to use.\", \"presto-player\")}\n value={video_library_id}\n onChange={(video_library_id) => updateStream({ video_library_id })}\n />\n\n <TextControl\n label={__(\"Public Stream Library API Key\", \"presto-player\")}\n help={__(\n \"The API key for the above video library for read/write access.\",\n \"presto-player\"\n )}\n value={video_library_api_key}\n onChange={(video_library_api_key) =>\n updateStream({ video_library_api_key })\n }\n />\n\n <TextControl\n label={__(\"Public Stream CDN Hostname\", \"presto-player\")}\n help={__(\n \"The public cdn hostname for the video library.\",\n \"presto-player\"\n )}\n value={pull_zone_url}\n onChange={(pull_zone_url) => updateStream({ pull_zone_url })}\n />\n </>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { TextControl } from \"@wordpress/components\";\nimport { useEntityProp } from \"@wordpress/core-data\";\n\nexport default () => {\n const [stream, setStream] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_bunny_stream_private\"\n );\n const updateStream = (data) => {\n setStream({\n ...(stream || {}),\n ...data,\n });\n };\n\n const {\n video_library_api_key,\n pull_zone_url,\n video_library_id,\n token_auth_key,\n } = stream || {};\n\n return (\n <>\n <TextControl\n label={__(\"Private Stream Library ID\", \"presto-player\")}\n help={__(\"The ID of the video library to use.\", \"presto-player\")}\n value={video_library_id}\n onChange={(video_library_id) => updateStream({ video_library_id })}\n />\n\n <TextControl\n label={__(\"Private Stream Library API Key\", \"presto-player\")}\n help={__(\n \"The API key for the above video library for read/write access.\",\n \"presto-player\"\n )}\n value={video_library_api_key}\n onChange={(video_library_api_key) =>\n updateStream({ video_library_api_key })\n }\n />\n\n <TextControl\n label={__(\"Private Stream CDN Hostname\", \"presto-player\")}\n help={__(\n \"The public cdn hostname for the video library.\",\n \"presto-player\"\n )}\n value={pull_zone_url}\n onChange={(pull_zone_url) => updateStream({ pull_zone_url })}\n />\n\n <TextControl\n label={__(\"Private Stream Token Authentication Key\", \"presto-player\")}\n help={__(\n \"The token authentication key used to sign private urls.\",\n \"presto-player\"\n )}\n value={token_auth_key}\n onChange={(token_auth_key) => updateStream({ token_auth_key })}\n />\n </>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { useEntityProp } from \"@wordpress/core-data\";\nimport PublicStream from \"./PublicStream\";\nimport PrivateStream from \"./PrivateStream\";\n\nexport default () => {\n const [stream, setStream] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_bunny_stream_public\"\n );\n\n if (!stream) return null;\n\n return (\n <>\n <h2 style={{ marginTop: \"40px\" }}>\n {__(\"Bunny.net Stream\", \"presto-player\")}\n </h2>\n <PublicStream />\n <PrivateStream />\n </>\n );\n};\n","const { __ } = wp.i18n;\nconst {\n Button,\n Panel,\n PanelBody,\n Flex,\n FlexBlock,\n Notice,\n Spinner,\n} = wp.components;\nconst { useState, useEffect } = wp.element;\n\nexport default () => {\n const [step, setStep] = useState(0);\n const [progress, setProgress] = useState(0);\n const [error, setError] = useState(\"\");\n const [url, setURL] = useState(0);\n\n const exportEmails = async () => {\n setError(\"\");\n try {\n const {\n percentage,\n step: currentStep,\n url: fetchedURL,\n } = await wp.apiFetch({\n path: \"/presto-player/v1/email/export\",\n method: \"post\",\n data: {\n step,\n },\n });\n\n setStep(currentStep);\n setProgress(percentage);\n setURL(fetchedURL);\n } catch (e) {\n setProgress(0);\n setError(e?.message || __(\"Something went wrong\", \"presto-player\"));\n }\n };\n\n useEffect(() => {\n if (step && step != \"done\") {\n exportEmails();\n }\n }, [step]);\n\n useEffect(() => {\n if (url) {\n window.open(url);\n }\n }, [url]);\n\n return (\n <Panel>\n <PanelBody\n title={\n <Flex>\n <FlexBlock>{__(\"Other\", \"presto-player\")}</FlexBlock>\n </Flex>\n }\n initialOpen={false}\n >\n <h2>{__(\"Manual Export\", \"presto-player\")}</h2>\n <p>\n {__(\n \"Using a service not listed here? You can export contacts and manually upload them to a service.\",\n \"presto-player\"\n )}\n </p>\n {error && (\n <Notice\n className=\"presto-notice\"\n status=\"error\"\n onRemove={() => setError(\"\")}\n >\n {error}\n </Notice>\n )}\n <Flex align=\"center\" justify=\"flex-start\">\n <Button\n isPrimary\n onClick={(e) => {\n setStep(1);\n setProgress(1);\n e.preventDefault();\n }}\n >\n {__(\"Download CSV File\", \"presto-player\")}\n </Button>\n {!!progress && (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n }}\n >\n <Spinner style={{ marginTop: 0 }} />\n <span>Exporting... {progress}% Complete</span>\n </div>\n )}\n </Flex>\n </PanelBody>\n </Panel>\n );\n};\n","const { __ } = wp.i18n;\n\nconst {\n Button,\n Panel,\n PanelBody,\n Flex,\n Modal,\n FlexBlock,\n FlexItem,\n PanelRow,\n} = wp.components;\n\nconst { useState } = wp.element;\n\nexport default ({\n connected,\n title,\n children,\n onConnect,\n isBusy,\n connectButtonText,\n disconnectButtonText,\n onDisconnect,\n}) => {\n const [confirm, setConfirm] = useState(false);\n\n return (\n <Panel>\n <PanelBody\n title={\n <Flex>\n <FlexBlock>{title}</FlexBlock>\n <FlexItem>\n {connected ? (\n <Button isSmall isPrimary style={{ marginRight: \"30px\" }}>\n {__(\"Connected\", \"presto-player\")}\n </Button>\n ) : (\n <Button isSmall isSecondary style={{ marginRight: \"30px\" }}>\n {__(\"Not Connected\", \"presto-player\")}\n </Button>\n )}\n </FlexItem>\n </Flex>\n }\n initialOpen={false}\n >\n <form\n onSubmit={(e) => {\n e.preventDefault();\n onConnect();\n }}\n disabled={isBusy}\n >\n {children}\n <PanelRow>\n <div>\n {!connected ? (\n <Button\n isPrimary\n isBusy={isBusy}\n disabled={isBusy}\n type=\"submit\"\n >\n {connectButtonText\n ? connectButtonText\n : __(\"Connect\", \"presto-player\")}\n </Button>\n ) : (\n <div>\n {\" \"}\n <Button\n isSecondary\n isBusy={isBusy}\n disabled={isBusy}\n onClick={(e) => {\n e.preventDefault();\n setConfirm(true);\n }}\n >\n {disconnectButtonText\n ? disconnectButtonText\n : __(\"Disconnect\", \"presto-player\")}\n </Button>\n </div>\n )}\n </div>\n </PanelRow>\n </form>\n </PanelBody>\n\n {confirm && (\n <Modal\n className=\"presto-player__modal-confirm\"\n title={__(\"Are you sure?\", \"presto-player\")}\n style={{ \"max-width\": \"350px\" }}\n onRequestClose={() => setConfirm(false)}\n >\n <p>\n {__(\n \"Are you sure you want to disconnect this integration?\",\n \"presto-player\"\n )}\n </p>\n <Button\n className=\"presto-player__modal-confirm-button\"\n isDestructive\n onClick={() => {\n onDisconnect && onDisconnect();\n setConfirm(false);\n }}\n >\n {__(\"Disconnect\", \"presto-player\")}\n </Button>\n <Button onClick={() => setConfirm(false)}>\n {__(\"Cancel\", \"presto-player\")}\n </Button>\n </Modal>\n )}\n </Panel>\n );\n};\n","const { TextControl } = wp.components;\nconst { dispatch } = wp.data;\nimport classNames from \"classnames\";\n\nexport default (props) => {\n const { option, value, optionName, className } = props;\n return (\n <div className=\"presto-settings__setting is-text-control\">\n <TextControl\n className={classNames(\n className,\n \"presto-settings__setting is-media-control\"\n )}\n label={option?.name}\n value={value}\n type={option?.type}\n help={option?.help}\n placeholder={option?.placeholder}\n onChange={(value) =>\n dispatch(\"presto-player/settings\").updateSetting(\n option.id,\n value,\n optionName\n )\n }\n {...props}\n />\n </div>\n );\n};\n","/**\n * WordPress dependencies\n */\nimport { __ } from \"@wordpress/i18n\";\nimport { useState } from \"@wordpress/element\";\nimport apiFetch from \"@wordpress/api-fetch\";\nimport { createHigherOrderComponent } from \"@wordpress/compose\";\nimport { useEntityProp } from \"@wordpress/core-data\";\n\n/**\n * Higher order component factory\n *\n * @return {Function} The higher order component.\n */\nexport default ({ name }) =>\n createHigherOrderComponent(\n (WrappedComponent) => (props) => {\n const [error, setError] = useState(\"\");\n const [success, setSuccess] = useState(\"\");\n const [isBusy, setIsBusy] = useState(false);\n\n const [setting, setSetting] = useEntityProp(\"root\", \"site\", name);\n const updateSetting = (data) => {\n setSetting({\n ...(setting || {}),\n ...data,\n });\n };\n\n const makeRequest = async ({\n path,\n data = {},\n message = __(\"Success\", \"presto-player\"),\n success,\n error,\n }) => {\n setError(\"\");\n setSuccess(\"\");\n setIsBusy(true);\n\n try {\n let response = await apiFetch({\n path,\n method: \"post\",\n data,\n });\n success && success(response);\n setSuccess(message);\n } catch (e) {\n if (e?.message) {\n setError(e.message);\n error && error(e);\n }\n } finally {\n setIsBusy(false);\n }\n };\n\n return (\n <WrappedComponent\n success={success}\n setSuccess={setSuccess}\n setError={setError}\n error={error}\n isBusy={isBusy}\n setting={setting}\n updateSetting={updateSetting}\n makeRequest={makeRequest}\n {...props}\n />\n );\n },\n \"withIntegration\"\n );\n","import { __ } from \"@wordpress/i18n\";\nimport { BaseControl, PanelRow, Notice } from \"@wordpress/components\";\nimport { compose } from \"@wordpress/compose\";\n\nimport Integration from \"../../../components/Integration\";\nimport TextControl from \"../../../components/TextControl\";\nimport withIntegration from \"./withIntegration\";\n\nexport default compose([\n withIntegration({ name: \"presto_player_activecampaign\" }),\n])(\n ({\n success,\n setSuccess,\n error,\n setError,\n isBusy,\n makeRequest,\n setting,\n updateSetting,\n }) => {\n const setData = (props) => {\n updateSetting({\n ...props,\n });\n };\n\n const onConnect = () => {\n makeRequest({\n path: \"/presto-player/v1/activecampaign/connect\",\n data: { api_key: setting?.api_key, url: setting?.url },\n message: __(\"Connected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n const onDisconnect = async () => {\n makeRequest({\n path: \"/presto-player/v1/activecampaign/disconnect\",\n message: __(\"Disconnected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n return (\n <Integration\n title={__(\"ActiveCampaign\")}\n connected={setting?.connected}\n onConnect={onConnect}\n onDisconnect={onDisconnect}\n isBusy={isBusy}\n >\n {error && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"error\"\n onRemove={() => setError(\"\")}\n >\n {error}\n </Notice>\n </PanelRow>\n )}\n {success && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"success\"\n onRemove={() => setSuccess(\"\")}\n >\n {success}\n </Notice>\n </PanelRow>\n )}\n <PanelRow>\n <BaseControl>\n <TextControl\n label={__(\"Your ActiveCampaign Url\", \"presto-player\")}\n type=\"url\"\n help={__(\n \"You can find this on your Settings > Developer page.\",\n \"presto-player\"\n )}\n value={setting?.url}\n onChange={(url) => updateSetting({ url })}\n />\n <TextControl\n label={__(\"Your ActiveCampaign API key\", \"presto-player\")}\n help={__(\n \"You can find this on your Settings > Developer page.\",\n \"presto-player\"\n )}\n value={setting?.api_key}\n onChange={(api_key) => updateSetting({ api_key })}\n />\n </BaseControl>\n </PanelRow>\n </Integration>\n );\n }\n);\n","import { Notice, PanelRow } from \"@wordpress/components\";\nimport { compose } from \"@wordpress/compose\";\nimport { __ } from \"@wordpress/i18n\";\n\nimport Integration from \"../../../components/Integration\";\nimport withIntegration from \"./withIntegration\";\n\nexport default compose([withIntegration({ name: \"presto_player_fluentcrm\" })])(\n ({ error, setError, isBusy, makeRequest, setting, updateSetting }) => {\n const setData = (props) => {\n updateSetting({\n ...props,\n });\n };\n\n const { connected } = setting || {};\n\n const onConnect = () => {\n makeRequest({\n path: \"/presto-player/v1/fluentcrm/connect\",\n message: __(\"Installed and connected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n const onDisconnect = async () => {\n makeRequest({\n path: \"/presto-player/v1/fluentcrm/disconnect\",\n message: __(\"Deactivated\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n return (\n <Integration\n title={__(\"FluentCRM\")}\n connected={connected}\n onConnect={onConnect}\n onDisconnect={onDisconnect}\n connectButtonText={__(\"Install FluentCRM Plugin\", \"presto-player\")}\n disconnectButtonText={__(\n \"Deactivate FluentCRM Plugin\",\n \"presto-player\"\n )}\n isBusy={isBusy}\n >\n {error && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"error\"\n onRemove={() => setError(\"\")}\n >\n {error}\n </Notice>\n </PanelRow>\n )}\n {connected && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"success\"\n isDismissible={false}\n >\n {__(\"Installed and connected!\", \"presto-player\")}\n </Notice>\n </PanelRow>\n )}\n </Integration>\n );\n }\n);\n","import {\n BaseControl,\n ExternalLink,\n Notice,\n PanelRow,\n} from \"@wordpress/components\";\nimport { compose } from \"@wordpress/compose\";\nimport { __ } from \"@wordpress/i18n\";\n\nimport Integration from \"../../../components/Integration\";\nimport TextControl from \"../../../components/TextControl\";\nimport withIntegration from \"./withIntegration\";\n\nexport default compose([withIntegration({ name: \"presto_player_mailchimp\" })])(\n ({\n success,\n setSuccess,\n error,\n setError,\n isBusy,\n makeRequest,\n setting,\n updateSetting,\n }) => {\n const { api_key, connected } = setting || {};\n\n const setData = (props) => {\n updateSetting({\n ...props,\n });\n };\n\n const onConnect = () => {\n makeRequest({\n path: \"/presto-player/v1/mailchimp/connect\",\n data: { api_key },\n message: __(\"Connected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n const onDisconnect = async () => {\n makeRequest({\n path: \"/presto-player/v1/mailchimp/disconnect\",\n message: __(\"Disconnected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n return (\n <Integration\n title={__(\"Mailchimp\")}\n connected={connected}\n onDisconnect={onDisconnect}\n onConnect={onConnect}\n isBusy={isBusy}\n >\n {error && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"error\"\n onRemove={() => setError(\"\")}\n >\n {error}\n </Notice>\n </PanelRow>\n )}\n {success && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"success\"\n onRemove={() => setSuccess(\"\")}\n >\n {success}\n </Notice>\n </PanelRow>\n )}\n <PanelRow>\n <BaseControl>\n <TextControl\n className=\"presto-player__setting--mailchimp-api_key\"\n label={__(\"Your Mailchimp API key\", \"presto-player\")}\n help={\n <p>\n {__(\n \"You can create a new key on your mailchimp account page.\",\n \"presto-player\"\n )}{\" \"}\n <ExternalLink href=\"https://us11.admin.mailchimp.com/account/api/\">\n {__(\"Get My API Key\", \"presto-player\")}\n </ExternalLink>\n </p>\n }\n value={api_key}\n onChange={(api_key) => updateSetting({ api_key })}\n />\n </BaseControl>\n </PanelRow>\n </Integration>\n );\n }\n);\n","import {\n BaseControl,\n ExternalLink,\n Notice,\n PanelRow,\n} from \"@wordpress/components\";\nimport { compose } from \"@wordpress/compose\";\nimport { __ } from \"@wordpress/i18n\";\n\nimport Integration from \"../../../components/Integration\";\nimport TextControl from \"../../../components/TextControl\";\nimport withIntegration from \"./withIntegration\";\n\nexport default compose([withIntegration({ name: \"presto_player_mailerlite\" })])(\n ({\n success,\n setSuccess,\n error,\n setError,\n isBusy,\n makeRequest,\n setting,\n updateSetting,\n }) => {\n const { api_key, connected } = setting || {};\n\n const setData = (props) => {\n updateSetting({\n ...props,\n });\n };\n\n const onConnect = () => {\n makeRequest({\n path: \"/presto-player/v1/mailerlite/connect\",\n data: { api_key },\n message: __(\"Connected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n const onDisconnect = async () => {\n makeRequest({\n path: \"/presto-player/v1/mailerlite/disconnect\",\n message: __(\"Disconnected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n return (\n <Integration\n title={__(\"Mailerlite\")}\n connected={connected}\n onDisconnect={onDisconnect}\n onConnect={onConnect}\n isBusy={isBusy}\n >\n {error && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"error\"\n onRemove={() => setError(\"\")}\n >\n {error}\n </Notice>\n </PanelRow>\n )}\n {success && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"success\"\n onRemove={() => setSuccess(\"\")}\n >\n {success}\n </Notice>\n </PanelRow>\n )}\n <PanelRow>\n <BaseControl>\n <TextControl\n className=\"presto-player__setting--mailerlite-api_key\"\n label={__(\"Your MailerLite API key\", \"presto-player\")}\n help={\n <p>\n {__(\n \"You can create a new key on your MailerLite account page.\",\n \"presto-player\"\n )}{\" \"}\n <ExternalLink href=\"https://app.mailerlite.com/integrations/api/\">\n {__(\"Get My API Key\", \"presto-player\")}\n </ExternalLink>\n </p>\n }\n value={api_key}\n onChange={(api_key) => updateSetting({ api_key })}\n />\n </BaseControl>\n </PanelRow>\n </Integration>\n );\n }\n);\n","import {\n BaseControl,\n Button,\n Flex,\n TextControl,\n ToolbarButton,\n} from \"@wordpress/components\";\nimport { __ } from \"@wordpress/i18n\";\n\nexport default ({ headers, setHeaders }) => {\n const updateHeaders = (data) => {\n setHeaders([...(headers || []), ...data]);\n };\n\n const addHeader = (header) => {\n setHeaders([...(headers || []), ...[header]]);\n };\n const updateHeader = (data, index) => {\n setHeaders(\n (headers || []).map((item, i) => {\n if (i !== index) {\n // This isn't the item we care about - keep it as-is\n return item;\n }\n\n // Otherwise, this is the one we want - return an updated value\n return {\n ...item,\n ...data,\n };\n })\n );\n };\n\n const removeHeader = (index) =>\n setHeaders((headers || []).filter((_, i) => i !== index));\n\n return (\n <>\n {(headers || []).map(({ name, value }, index) => {\n return (\n <Flex key={index} align=\"center\">\n <TextControl\n placeholder={__(\"Header Name\", \"presto-player\")}\n value={name}\n onChange={(name) => updateHeader({ name }, index)}\n />\n <TextControl\n placeholder={__(\"New Value\", \"presto-player\")}\n value={value}\n onChange={(value) => updateHeader({ value }, index)}\n />\n <BaseControl>\n <ToolbarButton icon=\"trash\" onClick={() => removeHeader(index)} />\n </BaseControl>\n </Flex>\n );\n })}\n\n <div>\n <Button\n isSecondary\n isSmall\n onClick={() => addHeader({ name: \"\", value: \"\" })}\n >\n {__(\"Add Header\", \"presto-player\")}\n </Button>\n </div>\n </>\n );\n};\n","import { css, jsx } from \"@emotion/core\";\n/** @jsx jsx */\nimport {\n BaseControl,\n Button,\n Card,\n CardBody,\n Flex,\n Modal,\n SelectControl,\n TextControl,\n ToggleControl,\n} from \"@wordpress/components\";\nimport { store as coreStore } from \"@wordpress/core-data\";\nimport { useDispatch } from \"@wordpress/data\";\nimport { useState } from \"@wordpress/element\";\nimport { __ } from \"@wordpress/i18n\";\nimport { store as noticesStore } from \"@wordpress/notices\";\n\nimport Headers from \"./Headers\";\n\nexport default ({ onClose, webhook }) => {\n const { saveEntityRecord } = useDispatch(coreStore);\n const { createSuccessNotice, createErrorNotice } = useDispatch(noticesStore);\n const [busy, setBusy] = useState(false);\n\n const sectionCSS = { margin: \"0 0 1.5rem\" };\n\n const [form, setForm] = useState(\n webhook || {\n email_name: \"email\",\n method: \"POST\",\n }\n );\n\n const updateForm = (data) => {\n setForm({\n ...(form || {}),\n ...data,\n });\n };\n\n const { name, url, method, email_name, headers, archived } = form;\n\n const submit = async (e) => {\n try {\n e.preventDefault();\n setBusy(true);\n await saveEntityRecord(\"presto-player\", \"webhook\", {\n ...form,\n });\n createSuccessNotice(\n form?.id\n ? __(\"Webhook updated\", \"presto-player\")\n : __(\"Webhook created.\", \"presto-player\"),\n {\n type: \"snackbar\",\n }\n );\n onClose();\n } catch (e) {\n console.error(e);\n createErrorNotice(\n e?.message || __(\"Something went wrong.\", \"presto-player\"),\n { type: \"snackbar\" }\n );\n } finally {\n setBusy(false);\n }\n };\n\n return (\n <Modal\n title={\n form?.id\n ? __(\"Edit Webhook\", \"presto-player\")\n : __(\"Add A Webhook\", \"presto-player\")\n }\n onRequestClose={onClose}\n shouldCloseOnClickOutside={false}\n >\n <form onSubmit={submit}>\n <TextControl\n label={__(\"Name\", \"presto-player\")}\n placeholder={__(\"Webhook feed name\", \"presto-player\")}\n value={name}\n onChange={(name) => updateForm({ name })}\n required\n autoFocus\n />\n\n <TextControl\n label={__(\"Request URL\", \"presto-player\")}\n placeholder={__(\"Webhook URL\", \"presto-player\")}\n type=\"url\"\n value={url}\n onChange={(url) => updateForm({ url })}\n required\n />\n\n <SelectControl\n label={__(\"Request Method\", \"presto-player\")}\n value={method}\n options={[\n { label: \"GET\", value: \"GET\" },\n { label: \"POST\", value: \"POST\" },\n { label: \"PUT\", value: \"PUT\" },\n ]}\n onChange={(method) => updateForm({ method })}\n required\n />\n\n <TextControl\n label={__(\"Email Name\", \"presto-player\")}\n placeholder={__(\"The name (key) of the email sent.\", \"presto-player\")}\n value={email_name}\n onChange={(email_name) => updateForm({ email_name })}\n required\n />\n\n <div css={sectionCSS}>\n <BaseControl.VisualLabel>\n {__(\"Headers\", \"presto-player\")}\n </BaseControl.VisualLabel>\n <Headers\n headers={headers}\n setHeaders={(headers) => updateForm({ headers })}\n />\n </div>\n\n <Button isPrimary type=\"submit\" isBusy={busy}>\n {form?.id\n ? __(\"Update\", \"presto-player\")\n : __(\"Create\", \"presto-player\")}\n </Button>\n </form>\n </Modal>\n );\n};\n","import {\n Card,\n CardBody,\n Flex,\n FlexBlock,\n FlexItem,\n Spinner,\n ToolbarButton,\n} from \"@wordpress/components\";\nimport { store as coreStore } from \"@wordpress/core-data\";\nimport { select, useDispatch, useSelect } from \"@wordpress/data\";\nimport { useState } from \"@wordpress/element\";\nimport { __ } from \"@wordpress/i18n\";\nimport { store as noticesStore } from \"@wordpress/notices\";\n\nimport NewWebhook from \"./NewWebhook\";\n\nexport default ({ webhook: incomingWebhook }) => {\n const [busy, setBusy] = useState(false);\n const [open, setOpen] = useState(false);\n const { deleteEntityRecord, saveEntityRecord } = useDispatch(coreStore);\n const { createSuccessNotice, createErrorNotice } = useDispatch(noticesStore);\n\n const { webhook, loading, isSaving, isDeleting } = useSelect((select) => {\n const queryArgs = [\"presto-player\", \"webhook\", incomingWebhook?.id];\n const {\n getEditedEntityRecord,\n isSavingEntityRecord,\n isDeletingEntityRecord,\n } = select(coreStore);\n return {\n webhook: getEditedEntityRecord(...queryArgs),\n loading: select(coreStore).isResolving(\n \"getEditedEntityRecord\",\n queryArgs\n ),\n isSaving: isSavingEntityRecord(...queryArgs),\n isDeleting: isDeletingEntityRecord(...queryArgs),\n };\n }, []);\n\n const { name, url } = webhook || {};\n\n const deleteWebhook = async () => {\n try {\n const r = confirm(\n __(\"Are you sure you want to delete this webhook?\", \"presto-player\")\n );\n if (!r) return;\n await deleteEntityRecord(\n \"presto-player\",\n \"webhook\",\n webhook?.id,\n undefined,\n { throwOnError: true }\n );\n createSuccessNotice(__(\"Webhook deleted.\", \"presto-player\"), {\n type: \"snackbar\",\n });\n } catch (e) {\n console.error(e);\n createErrorNotice(\n e?.message || __(\"Something went wrong\", \"presto-player\"),\n { type: \"snackbar\" }\n );\n }\n };\n\n if (loading) {\n return <Spinner />;\n }\n\n return (\n <Card>\n <CardBody>\n <Flex align=\"center\">\n <FlexBlock>\n <strong>{name || __(\"Untitled webhook\", \"presto-player\")}</strong>\n <br />\n {url}\n </FlexBlock>\n <FlexItem>\n <Flex align=\"center\">\n {isSaving || isDeleting ? (\n <Spinner />\n ) : (\n <>\n <ToolbarButton\n icon=\"edit\"\n label=\"Edit\"\n onClick={() => setOpen(true)}\n />\n <ToolbarButton\n icon=\"trash\"\n label={__(\"Delete\", \"presto-player\")}\n onClick={deleteWebhook}\n />\n </>\n )}\n </Flex>\n </FlexItem>\n </Flex>\n </CardBody>\n {open && (\n <NewWebhook onClose={() => setOpen(false)} webhook={incomingWebhook} />\n )}\n </Card>\n );\n};\n","import {\n Button,\n Flex,\n FlexBlock,\n Panel,\n PanelBody,\n} from \"@wordpress/components\";\nimport { store as coreStore } from \"@wordpress/core-data\";\nimport { useSelect } from \"@wordpress/data\";\nimport { useState } from \"@wordpress/element\";\nimport { __, _n, sprintf } from \"@wordpress/i18n\";\n\nimport NewWebhook from \"./NewWebhook\";\nimport Webhook from \"./Webhook\";\n\nexport default () => {\n const [open, setOpen] = useState(false);\n const { webhooks, loading } = useSelect((select) => {\n const queryArgs = [\"presto-player\", \"webhook\"];\n return {\n webhooks: select(coreStore).getEntityRecords(...queryArgs),\n loading: select(coreStore).isResolving(\"getEntityRecords\", queryArgs),\n };\n }, []);\n\n return (\n <Panel>\n <PanelBody\n title={\n <Flex>\n <FlexBlock>{__(\"Webhooks\", \"presto-player\")}</FlexBlock>\n {!!webhooks?.length && (\n <Button isSmall isPrimary style={{ marginRight: \"30px\" }}>\n {sprintf(__(\"%d connected\"), webhooks?.length)}\n </Button>\n )}\n </Flex>\n }\n initialOpen={false}\n >\n {(webhooks || []).map((webhook) => {\n return (\n <Webhook webhook={webhook} key={webhook?.id} loading={loading} />\n );\n })}\n\n <br />\n\n <Button\n isSecondary\n onClick={() => {\n setOpen(true);\n }}\n >\n {__(\"Create New WebHook\", \"presto-player\")}\n </Button>\n\n {open && <NewWebhook onClose={() => setOpen(false)} />}\n </PanelBody>\n </Panel>\n );\n};\n","import {\n ExternalLink,\n TextControl,\n ToggleControl,\n} from \"@wordpress/components\";\nimport { useEntityProp } from \"@wordpress/core-data\";\nimport { Fragment, useState } from \"@wordpress/element\";\nimport { __ } from \"@wordpress/i18n\";\n\nconst semverCompare = require(\"semver/functions/compare\");\n\nimport Group from \"../components/Group\";\nimport Page from \"../components/Page\";\nimport BunnyClassic from \"./parts/BunnyClassic/index\";\nimport BunnyStream from \"./parts/BunnyStream/index\";\nimport EmailExport from \"./parts/EmailExport\";\n\nimport ActiveCampaign from \"./parts/integration/ActiveCampaign\";\nimport FluentCRM from \"./parts/integration/FluentCRM\";\nimport Mailchimp from \"./parts/integration/Mailchimp\";\nimport MailerLite from \"./parts/integration/MailerLite\";\nimport Webhooks from \"./parts/Webhooks/index.js\";\n\nexport default () => {\n const [editBunny, setEditBunny] = useState(false);\n\n const [stream, setStream] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_bunny_stream\"\n );\n const updateStream = (data) => {\n setStream({\n ...(stream || {}),\n ...data,\n });\n };\n\n const [analytics, setAnalytics] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_google_analytics\"\n );\n const updateAnalytics = (data) => {\n setAnalytics({\n ...(analytics || {}),\n ...data,\n });\n };\n\n const [youtube, setYoutube] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_youtube\"\n );\n const updateYoutube = (data) => {\n setYoutube({\n ...(youtube || {}),\n ...data,\n });\n };\n\n const disabled = () => {\n if (prestoPlayer?.isPremium) {\n return false;\n }\n return {\n title: __(\"Pro Feature\", \"presto-player\"),\n heading: __(\"Unlock Presto Player Pro\", \"presto-player\"),\n message: __(\n \"Get this feature and more with the Pro version of Presto Player!\",\n \"presto-player\"\n ),\n link: \"https://prestoplayer.com\",\n };\n };\n\n const showEmailIntegration = () => {\n if (!prestoPlayer?.isPremium) {\n return true;\n }\n\n if (\n prestoPlayer?.proVersion &&\n semverCompare(prestoPlayer?.proVersion, \"0.9.0\") >= 0\n ) {\n return true;\n }\n\n return false;\n };\n\n const bunnySettings = () => {\n return (\n <>\n <Group\n title={__(\"Bunny.net Settings\", \"presto-player\")}\n description={__(\"Modify bunny.net settings.\", \"presto-player\")}\n >\n {!!window?.prestoPlayer?.isSetup?.bunny?.stream && (\n <Fragment>\n <TextControl\n label={__(\"Initial Quality Level\", \"presto-player\")}\n help={__(\n \"You can set the default quality start level for all streams (i.e. 240, 360, 480, 720, 1080, etc). Set this lower to prevent initial buffering if your users have slow connections. Set this higher to start with a higher quality stream.\",\n \"presto-player\"\n )}\n placeholder={\"480\"}\n type=\"number\"\n value={stream?.hls_start_level}\n onChange={(hls_start_level) =>\n updateStream({ hls_start_level })\n }\n />\n\n {<br />}\n\n <ToggleControl\n label={__(\"Disable Classic Bunny.net Storage\", \"presto-player\")}\n help={__(\n \"This will disable Bunny.net classic storage in your block UI.\",\n \"presto-player\"\n )}\n checked={stream?.disable_legacy_storage}\n onChange={(disable_legacy_storage) =>\n updateStream({ disable_legacy_storage })\n }\n />\n\n {<br />}\n </Fragment>\n )}\n\n <ToggleControl\n label={__(\"Edit Bunny.net Settings\", \"presto-player\")}\n help={__(\n \"Edit Bunny.net connection settings. Only edit this if you know what you're doing.\",\n \"presto-player\"\n )}\n checked={editBunny}\n onChange={setEditBunny}\n />\n\n {!!editBunny && (\n <>\n <BunnyStream />\n <BunnyClassic />\n </>\n )}\n </Group>\n </>\n );\n };\n\n return (\n <Page\n title={__(\"Integrations\", \"presto-player\")}\n description={__(\n \"Third party integrations and connections.\",\n \"presto-player\"\n )}\n >\n <Group\n title={__(\"Google Analytics\", \"presto-player\")}\n description={__(\n \"Analytics settings for media plays, watch times and more.\",\n \"presto-player\"\n )}\n disabled={disabled()}\n >\n <ToggleControl\n className=\"presto-player__setting--google-analytics\"\n label={__(\"Enable\", \"presto-player\")}\n help={__(\n \"Send analytics events to your Google Analytics account.\",\n \"presto-player\"\n )}\n checked={analytics?.enable}\n onChange={(enable) => updateAnalytics({ enable })}\n />\n\n <ToggleControl\n className=\"presto-player__setting--use-existing-tag\"\n label={__(\"Use existing on-page tag?\", \"presto-player\")}\n help={__(\n \"Should we use an existing google analytics (v4) tag? If not, we'll output one for you.\",\n \"presto-player\"\n )}\n checked={analytics?.use_existing_tag}\n onChange={(use_existing_tag) => updateAnalytics({ use_existing_tag })}\n />\n\n <TextControl\n label={__(\"Measurement ID\", \"presto-player\")}\n help={__(\n \"Enter a Google Analytics Measurement ID, which can be found on your analytics admin page.\",\n \"presto-player\"\n )}\n value={analytics?.measurement_id}\n onChange={(measurement_id) => updateAnalytics({ measurement_id })}\n />\n </Group>\n\n <Group\n title={__(\"YouTube\", \"presto-player\")}\n description={__(\"Settings for YouTube videos.\", \"presto-player\")}\n >\n <ToggleControl\n className=\"presto-player__setting--youtube-nocookie\"\n label={__(\"Privacy-Enhanced Mode\", \"presto-player\")}\n help={__(\n \"Embed YouTube videos without using cookies that track viewing behaviour.\",\n \"presto-player\"\n )}\n checked={youtube?.nocookie}\n onChange={(nocookie) => updateYoutube({ nocookie })}\n />\n\n <TextControl\n label={__(\"Channel ID\", \"presto-player\")}\n help={\n <div>\n {__(\n \"Enter the ID of your channel to enable Youtube Subscribe button functionality.\",\n \"presto-player\"\n )}{\" \"}\n <ExternalLink href=\"https://support.google.com/youtube/answer/3250431?hl=en\">\n {__(\"Find my channel id\", \"presto-player\")}\n </ExternalLink>\n </div>\n }\n value={youtube?.channel_id}\n onChange={(channel_id) => updateYoutube({ channel_id })}\n />\n </Group>\n\n {showEmailIntegration() && (\n <Group\n hideSaveButton={true}\n title={__(\"Email Capture\", \"presto-player\")}\n description={__(\n \"Integrate Presto Player with an email provider for email capture.\",\n \"presto-player\"\n )}\n disabled={disabled()}\n >\n <ActiveCampaign />\n <FluentCRM />\n <Mailchimp />\n <MailerLite />\n {prestoPlayer?.proVersion &&\n semverCompare(prestoPlayer?.proVersion, \"1.2.0\") >= 0 && (\n <Webhooks />\n )}\n <EmailExport />\n </Group>\n )}\n\n {!window?.prestoPlayer?.isSetup?.bunny ? (\n <Group>\n <CTA\n className=\"presto-player__setting--bunny-cta\"\n option={{\n name: __(\"Bunny.net Video\", \"presto-player\"),\n help: __(\n \"To get started with Bunny.net, add a Bunny.net video to your page.\",\n \"presto-player\"\n ),\n type: \"cta\",\n button: {\n text: \"Learn More\",\n link: \"https://prestoplayer.com/secure-video-with-bunny-net\",\n target: \"_blank\",\n },\n }}\n />\n </Group>\n ) : (\n bunnySettings()\n )}\n </Page>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport {\n Card,\n Flex,\n FlexBlock,\n FlexItem,\n Spinner,\n} from \"@wordpress/components\";\nimport { store as noticesStore } from \"@wordpress/notices\";\nimport { useDispatch, useSelect } from \"@wordpress/data\";\nimport { store as coreStore } from \"@wordpress/core-data\";\nimport { useState, useEffect } from \"@wordpress/element\";\n\nimport { Router, Link, Route } from \"@/router\";\nimport { routes } from \"./routes\";\n\nimport SaveButton from \"./components/SaveButton\";\nimport Notices from \"./components/Notices\";\nimport useSave from \"../../hooks/useSave\";\nimport General from \"./pages/General\";\nimport Performance from \"./pages/Performance\";\nimport Integrations from \"./pages/Integrations\";\n\nfunction App() {\n const { createSuccessNotice, createErrorNotice } = useDispatch(noticesStore);\n const [loaded, setLoaded] = useState(false);\n\n // scroll top on history change\n window.onhashchange = () => {\n window.scrollTo(0, 0);\n };\n\n const { save } = useSave();\n\n /**\n * Form is submitted.\n */\n const onSubmit = async () => {\n try {\n await save();\n createSuccessNotice(__(\"Settings Updated\", \"presto-player\"), {\n type: \"snackbar\",\n });\n } catch (e) {\n console.error(e);\n createErrorNotice(\n e?.message || __(\"Something went wrong\", \"presto-player\"),\n { type: \"snackbar\" }\n );\n }\n };\n\n const loading = useSelect((select) => {\n const queryArgs = [\"root\", \"site\"];\n select(coreStore).getEntityRecords(...queryArgs);\n return !select(coreStore)?.hasFinishedResolution?.(\n \"getEntityRecords\",\n queryArgs\n );\n });\n\n useEffect(() => {\n if (!loading) {\n setLoaded(true);\n }\n }, [loading]);\n\n if (!loaded) {\n return (\n <div className=\"presto-settings__loading\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <div className=\"presto-settings\">\n <Router routes={routes} defaultRoute={routes?.general?.path}>\n <Card className=\"presto-settings__navigation\">\n <Flex>\n <FlexBlock>\n <div\n role=\"tablist\"\n aria-orientation=\"horizontal\"\n className=\"components-tab-panel__tabs\"\n >\n <Link\n to={routes?.general?.path}\n type=\"button\"\n role=\"tab\"\n activeClassName=\"is-active\"\n className=\"components-button components-tab-panel__tabs-item presto-player__nav-general\"\n >\n {__(\"General\", \"presto-player\")}\n </Link>\n <Link\n to={routes?.integrations?.path}\n type=\"button\"\n role=\"tab\"\n activeClassName=\"is-active\"\n className=\"components-button components-tab-panel__tabs-item presto-player__nav-integrations\"\n >\n {__(\"Integrations\", \"presto-player\")}\n </Link>\n <Link\n to={routes?.performance?.path}\n type=\"button\"\n role=\"tab\"\n activeClassName=\"is-active\"\n className=\"components-button components-tab-panel__tabs-item presto-player__nav-performance\"\n >\n {__(\"Performance\", \"presto-player\")}\n </Link>\n </div>\n </FlexBlock>\n <FlexItem>\n <SaveButton onSave={onSubmit} style={{ marginRight: \"8px\" }}>\n {__(\"Update Settings\", \"presto-player\")}\n </SaveButton>\n </FlexItem>\n </Flex>\n </Card>\n\n <Route path={routes?.general?.path}>\n <General />\n </Route>\n <Route path={routes?.integrations?.path}>\n <Integrations />\n </Route>\n <Route path={routes?.performance?.path}>\n <Performance />\n </Route>\n </Router>\n\n <Notices className=\"presto-settings-page-notices\" />\n </div>\n );\n}\n\nexport default App;\n","import { render } from \"@wordpress/element\";\n\n/**\n * Redux entities.\n */\nimport \"./entities\";\n\n/**\n * App\n */\nimport App from \"./app\";\n\n/**\n * styles\n */\nimport \"./settings.scss\";\n\n/**\n * Render\n */\nrender(<App />, document.getElementById(\"presto-settings-page\"));\n","(function() { module.exports = window[\"wp\"][\"data\"]; }());","(function() { module.exports = window[\"wp\"][\"element\"]; }());"],"sourceRoot":""}
dist/settings/admin-68736b19.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack:///external [\"wp\",\"i18n\"]","webpack:///external [\"wp\",\"components\"]","webpack:///external [\"wp\",\"notices\"]","webpack:///external [\"wp\",\"compose\"]","webpack:///external [\"wp\",\"coreData\"]","webpack:///external [\"wp\",\"apiFetch\"]","webpack:///./src/admin/settings/entities.js","webpack:///./src/router/utils.js","webpack:///./src/router/context.js","webpack:///./src/router/route.js","webpack:///./src/router/link.js","webpack:///./src/router/index.js","webpack:///./src/admin/settings/routes.js","webpack:///./src/admin/settings/components/SaveButton.js","webpack:///./src/admin/settings/components/Notices.js","webpack:///./src/hooks/useSave.js","webpack:///./src/admin/settings/components/Disabled.js","webpack:///./src/admin/settings/components/Group.js","webpack:///./src/admin/settings/components/Media.js","webpack:///./src/admin/settings/components/Page.js","webpack:///./src/admin/settings/components/CodeMirror.js","webpack:///./src/admin/settings/pages/General.js","webpack:///./src/admin/settings/pages/Performance.js","webpack:///./src/admin/settings/pages/parts/BunnyClassic/index.js","webpack:///./src/admin/settings/pages/parts/BunnyStream/PublicStream.js","webpack:///./src/admin/settings/pages/parts/BunnyStream/PrivateStream.js","webpack:///./src/admin/settings/pages/parts/BunnyStream/index.js","webpack:///./src/admin/settings/pages/parts/EmailExport.js","webpack:///./src/admin/settings/components/Integration.js","webpack:///./src/admin/settings/components/TextControl.js","webpack:///./src/admin/settings/pages/parts/integration/withIntegration.js","webpack:///./src/admin/settings/pages/parts/integration/ActiveCampaign.js","webpack:///./src/admin/settings/pages/parts/integration/FluentCRM.js","webpack:///./src/admin/settings/pages/parts/integration/Mailchimp.js","webpack:///./src/admin/settings/pages/parts/integration/MailerLite.js","webpack:///./src/admin/settings/pages/parts/Webhooks/Headers.js","webpack:///./src/admin/settings/pages/parts/Webhooks/NewWebhook.js","webpack:///./src/admin/settings/pages/parts/Webhooks/Webhook.js","webpack:///./src/admin/settings/pages/parts/Webhooks/index.js","webpack:///./src/admin/settings/pages/Integrations.js","webpack:///./src/admin/settings/app.js","webpack:///./src/admin/settings/index.js","webpack:///external [\"wp\",\"data\"]","webpack:///external [\"wp\",\"element\"]"],"names":["module","exports","window","dispatch","coreStore","addEntities","name","kind","label","__","baseURL","baseURLParams","context","locationToRoute","location","path","pathname","hash","query","qs","parse","search","history","createBrowserHistory","RouterContext","wp","element","createContext","route","useContext","prev","Route","onRoute","children","matched","match","checkMatch","substr","cloneElement","Link","props","to","onClick","activeClassName","state","className","classNames","e","preventDefault","push","Router","setState","routes","Object","keys","map","key","unlisten","listen","handleRouteChange","defaultRoute","this","NotFound","forEach","isMatched","data","routerContextValue","is404","Provider","value","Component","general","integrations","performance","SaveButton","onSave","busy","loading","rest","useSelect","select","__experimentalGetDirtyEntityRecords","isSavingEntityRecord","dirtyEntityRecords","filter","r","isDirty","length","isSaving","some","record","disabled","ScSkeleton","style","width","height","display","isPrimary","aria-disabled","isBusy","undefined","notices","noticesStore","getNotices","removeNotice","useDispatch","snackbarNotices","type","onRemove","useSave","saveEditedEntityRecord","save","a","dirtyRecords","pendingSavedRecords","throwOnError","Promise","all","message","i18n","useState","components","Modal","Button","dialog","setDialog","title","onRequestClose","heading","href","link","target","Card","CardBody","CardFooter","description","hideSaveButton","createSuccessNotice","createErrorNotice","console","error","Disabled","size","marginBottom","isShady","BaseControl","MediaUpload","mediaUtils","option","help","allowedTypes","maxWidth","onSelect","VisualLabel","border","src","render","open","isSecondary","id","hidden","sprintf","isTertiary","onChange","handleChange","instance","textRef","current","useRef","useEffect","CodeMirror","fromTextArea","lineNumbers","on","css","ref","rows","prestoPlayer","isPremium","presetArgs","audioPresetArgs","presets","getEntityRecords","loadingPresets","isResolving","audioPresets","loadingAudioPresets","useEntityProp","presetSettings","setPresetSettings","audioPresetSettings","setAudioPresetSettings","analytics","setAnalytics","updateAnalytics","branding","setBranding","updateBranding","uninstall","setUninstall","Page","Group","Media","image","logo","url","logo_width","min","max","onChangeComplete","color","hex","checked","enable","purge_data","default_player_preset","options","preset","player_css","uninstall_data","confirm","setPerformance","updatePerformance","module_enabled","status","isDismissible","automations","classic","setClassic","updateClassic","public_id","public_hostname","private_id","private_hostname","private_security_key","marginTop","fontSize","stream","setStream","updateStream","video_library_api_key","pull_zone_url","video_library_id","token_auth_key","PublicStream","PrivateStream","Panel","PanelBody","Flex","FlexBlock","Notice","Spinner","step","setStep","progress","setProgress","setError","setURL","exportEmails","apiFetch","method","percentage","currentStep","fetchedURL","initialOpen","align","justify","alignItems","FlexItem","PanelRow","connected","onConnect","connectButtonText","disconnectButtonText","onDisconnect","setConfirm","isSmall","marginRight","onSubmit","isDestructive","TextControl","optionName","placeholder","updateSetting","createHigherOrderComponent","WrappedComponent","success","setSuccess","setIsBusy","setting","setSetting","makeRequest","response","compose","withIntegration","setData","Integration","api_key","headers","setHeaders","updateHeader","index","item","i","icon","_","removeHeader","header","onClose","webhook","saveEntityRecord","setBusy","email_name","form","setForm","updateForm","submit","archived","shouldCloseOnClickOutside","required","autoFocus","margin","Headers","incomingWebhook","setOpen","deleteEntityRecord","queryArgs","getEditedEntityRecord","isDeletingEntityRecord","isDeleting","log","deleteWebhook","NewWebhook","webhooks","Webhook","semverCompare","require","editBunny","setEditBunny","youtube","setYoutube","updateYoutube","use_existing_tag","measurement_id","nocookie","channel_id","proVersion","ActiveCampaign","FluentCRM","Mailchimp","MailerLite","Webhooks","EmailExport","isSetup","bunny","hls_start_level","disable_legacy_storage","BunnyStream","BunnyClassic","CTA","button","text","App","loaded","setLoaded","onhashchange","scrollTo","hasFinishedResolution","role","aria-orientation","General","Integrations","Performance","Notices","document","getElementById"],"mappings":";;;;;;;;;;;;;;;;;iHAAcA,EAAOC,QAAUC,OAAW,GAAQ,M,gBCApCF,EAAOC,QAAUC,OAAW,GAAc,Y,iBCA1CF,EAAOC,QAAUC,OAAW,GAAW,S,iBCAvCF,EAAOC,QAAUC,OAAW,GAAW,S,gBCAvCF,EAAOC,QAAUC,OAAW,GAAY,U,iBCAxCF,EAAOC,QAAUC,OAAW,GAAY,U,iHCItDC,mBAASC,SAAWC,YAAY,CAC9B,CACEC,KAAM,SACNC,KA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AAG,UAAW,kBAEjB,oBAAC8B,EAAD,CACEE,GAAIW,SAAF,UAAEA,EAAQoB,oBAAV,aAAE,EAAsBzD,KAC1B4F,KAAK,SACLqQ,KAAK,MACLrU,gBAAgB,YAChBE,UAAU,qFAETpC,aAAG,eAAgB,kBAEtB,oBAAC8B,EAAD,CACEE,GAAIW,SAAF,UAAEA,EAAQqB,mBAAV,aAAE,EAAqB1D,KACzB4F,KAAK,SACLqQ,KAAK,MACLrU,gBAAgB,YAChBE,UAAU,oFAETpC,aAAG,cAAe,oBAIzB,oBAAC,WAAD,KACE,oBAACiE,EAAD,CAAYC,OAAQ2M,EAAUzL,MAAO,CAAEwL,YAAa,QACjD5Q,aAAG,kBAAmB,qBAM/B,oBAACsB,EAAD,CAAOhB,KAAMqC,SAAF,UAAEA,EAAQmB,eAAV,aAAE,EAAiBxD,MAC5B,oBAACmW,GAAD,OAEF,oBAACnV,EAAD,CAAOhB,KAAMqC,SAAF,UAAEA,EAAQoB,oBAAV,aAAE,EAAsBzD,MACjC,oBAACoW,GAAD,OAEF,oBAACpV,EAAD,CAAOhB,KAAMqC,SAAF,UAAEA,EAAQqB,mBAAV,aAAE,EAAqB1D,MAChC,oBAACqW,GAAD,QAIJ,oBAACC,EAAD,CAASxU,UAAU,kCAjEnB,2BAAKA,UAAU,4BACb,oBAAC,UAAD,QClDR+G,iBAAO,oBAAC,GAAD,MAAS0N,SAASC,eAAe,0B,gBCpB1BvX,EAAOC,QAAUC,OAAW,GAAQ,M,gBCApCF,EAAOC,QAAUC,OAAW,GAAW,U","file":"settings/admin-68736b19.js","sourcesContent":["(function() { module.exports = window[\"wp\"][\"i18n\"]; }());","(function() { module.exports = window[\"wp\"][\"components\"]; }());","(function() { module.exports = window[\"wp\"][\"notices\"]; }());","(function() { module.exports = window[\"wp\"][\"compose\"]; }());","(function() { module.exports = window[\"wp\"][\"coreData\"]; }());","(function() { module.exports = window[\"wp\"][\"apiFetch\"]; }());","import { store as coreStore } from \"@wordpress/core-data\";\nimport { dispatch } from \"@wordpress/data\";\nimport { __ } from \"@wordpress/i18n\";\n\ndispatch(coreStore).addEntities([\n {\n name: \"preset\",\n kind: \"presto-player\",\n label: __(\"Presets\", \"presto-player\"),\n baseURL: \"presto-player/v1/preset\",\n baseURLParams: { context: \"edit\" },\n },\n {\n name: \"audio-preset\",\n kind: \"presto-player\",\n label: __(\"Audio Presets\", \"presto-player\"),\n baseURL: \"presto-player/v1/audio-preset\",\n baseURLParams: { context: \"edit\" },\n },\n {\n name: \"webhook\",\n kind: \"presto-player\",\n label: __(\"Webhook\", \"presto-player\"),\n baseURL: \"presto-player/v1/webhook\",\n baseURLParams: { context: \"edit\" },\n },\n]);\n","import qs from \"querystringify\";\nexport function locationToRoute(location) {\n // location comes from the history package\n return {\n path: location.pathname,\n hash: location.hash,\n query: qs.parse(location.search),\n };\n}\n","import { createBrowserHistory } from \"history\";\nimport { locationToRoute } from \"./utils\";\n\nexport const history = createBrowserHistory();\nexport const RouterContext = wp.element.createContext({\n route: locationToRoute(history.location),\n});\n","import { RouterContext } from \"./context\";\nconst { useContext } = wp.element;\nimport { match } from \"path-to-regexp\";\nlet prev = \"\";\n\nexport function Route({ path, onRoute, children }) {\n // Extract route from RouterContext\n const { route } = useContext(RouterContext);\n\n const checkMatch = match(`${path}`);\n const matched = checkMatch(`${route.hash.substr(1)}`);\n\n if (!matched) {\n return null;\n }\n\n if (onRoute) {\n if (prev !== matched.path) {\n onRoute();\n }\n prev = matched.path;\n }\n\n return <div>{wp.element.cloneElement(children, { route: matched })}</div>;\n}\n","const { useContext } = wp.element;\nimport { RouterContext, history } from \"./context\";\nimport classNames from \"classnames\";\nimport { match } from \"path-to-regexp\";\n\nexport function Link(props) {\n const { to, onClick, children, activeClassName } = props;\n const { route } = useContext(RouterContext);\n\n let state = { ...props };\n delete state.activeClassName;\n\n const isActive = () => {\n const checkMatch = match(`${to}`);\n return checkMatch(`${route.hash.substr(1)}`);\n };\n\n const handleClick = (e) => {\n e.preventDefault();\n // Dont' navigate if current path\n if (route.path === to) {\n return;\n }\n // Trigger onClick prop manually\n if (onClick) {\n onClick(e);\n }\n const { search } = history.location;\n\n // Use history API to navigate page\n history.push(`${search}#${to}`);\n };\n\n return (\n <a\n {...state}\n className={classNames({ [activeClassName]: isActive() }, props.className)}\n onClick={handleClick}\n >\n {children}\n </a>\n );\n}\n","import { Component } from \"@wordpress/element\";\nimport { locationToRoute } from \"./utils\";\nimport { history, RouterContext } from \"./context\";\nimport { Route } from \"./route\";\nimport { Link } from \"./link\";\nimport { match } from \"path-to-regexp\";\n\nclass Router extends Component {\n constructor(props) {\n super(props);\n\n // Convert our routes into an array for easy 404 checking\n this.routes = Object.keys(props.routes).map(\n (key) => props.routes[key].path\n );\n\n // Listen for path changes from the history API\n this.unlisten = history.listen(this.handleRouteChange);\n\n const route = locationToRoute(history.location);\n const { search } = history.location;\n\n // Define the initial RouterContext value\n this.state = {\n route,\n defaultRoute: props?.defaultRoute\n ? `${search}#${props?.defaultRoute}`\n : `${search}#/`,\n };\n }\n\n componentWillUnmount() {\n // Stop listening for changes if the Router component unmounts\n this.unlisten();\n }\n\n handleRouteChange = (location) => {\n const route = locationToRoute(location?.location);\n this.setState({ route: route });\n };\n\n render() {\n // Define our variables\n const { children, NotFound } = this.props;\n const { route, defaultRoute } = this.state;\n\n if (!route.hash) {\n history.push(defaultRoute);\n return <div></div>;\n }\n\n let matched = false;\n // match route\n (this.routes || []).forEach((name) => {\n const checkMatch = match(route.hash.substr(1));\n const isMatched = checkMatch(`${route.hash.substr(1)}`);\n if (!isMatched) {\n return;\n }\n matched = {\n name,\n data: isMatched,\n };\n });\n\n const routerContextValue = { route, matched };\n\n // Check if 404 if no route matched\n const is404 = !matched;\n\n return (\n <RouterContext.Provider value={routerContextValue}>\n {is404 ? <div>Not found</div> : children}\n </RouterContext.Provider>\n );\n }\n}\nexport { history, RouterContext, Router, Route, Link };\n","export const routes = {\n general: {\n path: \"general\",\n },\n integrations: {\n path: \"/integrations\",\n },\n performance: {\n path: \"/performance\",\n },\n};\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from \"@wordpress/data\";\nimport { __ } from \"@wordpress/i18n\";\nimport { store as coreStore } from \"@wordpress/core-data\";\nimport { Button } from \"@wordpress/components\";\n\nexport default function SaveButton({\n onSave,\n children,\n busy,\n loading,\n ...rest\n}) {\n const { isDirty, isSaving } = useSelect((select) => {\n const {\n __experimentalGetDirtyEntityRecords,\n isSavingEntityRecord,\n } = select(coreStore);\n\n const dirtyEntityRecords = (\n __experimentalGetDirtyEntityRecords() || []\n ).filter((r) => r.name !== \"webhook\");\n\n return {\n isDirty: dirtyEntityRecords.length > 0,\n isSaving: dirtyEntityRecords.some((record) =>\n isSavingEntityRecord(record.kind, record.name, record.key)\n ),\n };\n }, []);\n\n const disabled = !isDirty || isSaving;\n\n if (loading) {\n return (\n <ScSkeleton\n style={{\n width: \"120px\",\n height: \"35px\",\n display: \"inline-block\",\n }}\n ></ScSkeleton>\n );\n }\n\n return (\n <Button\n isPrimary\n aria-disabled={disabled}\n disabled={disabled || isSaving || busy}\n isBusy={isSaving || busy}\n onClick={disabled ? undefined : onSave}\n {...rest}\n >\n {children}\n </Button>\n );\n}\n","import { SnackbarList } from \"@wordpress/components\";\nimport { useDispatch, useSelect } from \"@wordpress/data\";\n\nimport { store as noticesStore } from \"@wordpress/notices\";\n\nexport default ({ className }) => {\n const notices = useSelect((select) => select(noticesStore).getNotices());\n const { removeNotice } = useDispatch(noticesStore);\n const snackbarNotices = notices.filter(({ type }) => type === \"snackbar\");\n\n return (\n <SnackbarList\n notices={snackbarNotices}\n className={className}\n onRemove={removeNotice}\n />\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { select, useDispatch } from \"@wordpress/data\";\nimport { store as coreStore } from \"@wordpress/core-data\";\n\nexport default function useSave() {\n const { saveEditedEntityRecord } = useDispatch(coreStore);\n\n /**\n * Handle the form submission\n */\n const save = async () => {\n // build up pending records to save.\n const dirtyRecords = select(\n coreStore\n ).__experimentalGetDirtyEntityRecords();\n const pendingSavedRecords = [];\n\n dirtyRecords.forEach(({ kind, name, key }) => {\n pendingSavedRecords.push(\n saveEditedEntityRecord(kind, name, key, {\n throwOnError: true,\n })\n );\n });\n\n // check values.\n const values = await Promise.all(pendingSavedRecords);\n if (values.some((value) => typeof value === \"undefined\")) {\n throw { message: \"Saving failed.\" };\n }\n\n return true;\n };\n\n return {\n save,\n };\n}\n","const { __ } = wp.i18n;\nconst { useState } = wp.element;\nconst { Modal, Button } = wp.components;\n\nexport default ({ children, disabled }) => {\n const [dialog, setDialog] = useState(false);\n\n if (!disabled) {\n return <div>{children}</div>;\n }\n\n return (\n <div>\n <div\n className=\"presto-options__disabled-overlay\"\n onClick={(e) => {\n setDialog(true);\n e.preventDefault();\n return false;\n }}\n >\n <div>{children}</div>\n </div>\n {!!dialog && (\n <Modal title={disabled?.title} onRequestClose={() => setDialog(false)}>\n <h2>{disabled?.heading}</h2>\n <p>{disabled?.message}</p>\n <Button href={disabled?.link} target=\"_blank\" isPrimary>\n {__(\"Learn More\", \"presto-player\")}\n </Button>\n </Modal>\n )}\n </div>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nconst { Card, CardBody, CardFooter } = wp.components;\nimport SaveButton from \"./SaveButton\";\nimport { useDispatch } from \"@wordpress/data\";\nimport { store as noticesStore } from \"@wordpress/notices\";\nimport Disabled from \"./Disabled\";\nimport useSave from \"../../../hooks/useSave\";\n\nexport default ({ title, description, children, disabled, hideSaveButton }) => {\n const { save } = useSave();\n const { createSuccessNotice, createErrorNotice } = useDispatch(noticesStore);\n\n /**\n * Form is submitted.\n */\n const onSave = async () => {\n try {\n await save();\n createSuccessNotice(__(\"Settings Updated\", \"presto-player\"), {\n type: \"snackbar\",\n });\n } catch (e) {\n console.error(e);\n createErrorNotice(\n e?.message || __(\"Something went wrong\", \"presto-player\")\n );\n }\n };\n\n return (\n <Disabled disabled={disabled}>\n <Card size=\"large\" className=\"presto-options__card\">\n <CardBody className={`presto-options__card-body`}>\n <div className=\"presto-flow\" style={{ \"--presto-flow-space\": \"2em\" }}>\n <div\n className=\"presto-flow\"\n style={{ \"--presto-flow-space\": \"1em\" }}\n >\n {title && (\n <h2 style={{ marginBottom: 0 }}>\n {title}{\" \"}\n {!!disabled && (\n <div className=\"presto-options__pro-badge\">Pro</div>\n )}\n </h2>\n )}\n {description && <p>{description}</p>}\n </div>\n <div>{children}</div>\n </div>\n </CardBody>\n {!hideSaveButton ? (\n <CardFooter isShady>\n <div>\n <SaveButton onSave={onSave}>{__(\"Update Settings\")}</SaveButton>\n </div>\n </CardFooter>\n ) : (\n <br />\n )}\n </Card>\n </Disabled>\n );\n};\n","const { __ } = wp.i18n;\n\nconst { Button, BaseControl } = wp.components;\nconst { MediaUpload } = wp.mediaUtils;\nconst { dispatch } = wp.data;\nimport classNames from \"classnames\";\n\nexport default ({\n option,\n label,\n help,\n allowedTypes,\n value,\n className,\n maxWidth,\n onSelect,\n}) => {\n return (\n <div\n className={classNames(\n className,\n \"presto-settings__setting is-media-control\"\n )}\n >\n <BaseControl className=\"editor-video-poster-control\">\n <BaseControl.VisualLabel>{label}</BaseControl.VisualLabel>\n {value && (\n <BaseControl>\n <img\n style={{\n maxWidth,\n border: \"1px solid #dcdcdc\",\n }}\n src={value}\n />\n </BaseControl>\n )}\n <br />\n <MediaUpload\n title={help}\n onSelect={onSelect}\n allowedTypes={allowedTypes}\n render={({ open }) => (\n <Button\n isSecondary\n onClick={open}\n className={!value ? \"button-select\" : \"button-replace\"}\n >\n {!value\n ? __(\"Select\", \"presto-player\")\n : __(\"Replace\", \"presto-player\")}\n </Button>\n )}\n />{\" \"}\n <p id={`video-block__logo-image-description-${option?.id}`} hidden>\n {value\n ? sprintf(\n /* translators: %s: poster image URL. */\n __(\"The current logo image url is %s\", \"presto-player\"),\n value\n )\n : __(\"There is no logo image currently selected\", \"presto-player\")}\n </p>\n {!!value && (\n <Button onClick={() => onSelect(\"\")} isTertiary>\n {__(\"Remove\", \"presto-player\")}\n </Button>\n )}\n </BaseControl>\n <br />\n </div>\n );\n};\n","export default ({ children, title, description }) => {\n return (\n <div className=\"presto-flow presto-settings__page\">\n <div className=\"presto-flow\" style={{ \"--presto-flow-space\": \"1em\" }}>\n {title && <h1>{title}</h1>}\n {description && <p>{description}</p>}\n </div>\n\n <div className=\"presto-settings__body \">\n <div className=\"presto-flow\">{children}</div>\n </div>\n </div>\n );\n};\n","/** @jsx jsx */\nimport { css, jsx } from \"@emotion/core\";\nimport { BaseControl } from \"@wordpress/components\";\nimport { useEffect, useRef } from \"@wordpress/element\";\nimport classNames from \"classnames\";\n\nexport default ({ option, value, className, disabled, onChange }) => {\n let codeMirror;\n\n const handleChange = (instance) => {\n if (disabled) {\n return;\n }\n instance.save();\n onChange(textRef.current.value);\n };\n\n const textRef = useRef();\n useEffect(() => {\n if (!wp?.CodeMirror) {\n return;\n }\n codeMirror = wp.CodeMirror.fromTextArea(textRef.current, {\n type: \"text/css\",\n lineNumbers: true,\n });\n\n codeMirror.on(\"change\", handleChange);\n }, []);\n\n return (\n <div className={classNames(className, \"presto-settings__setting\")}>\n <BaseControl\n css={css`\n .CodeMirror {\n height: 200px;\n border: 1px solid #e3e3e3;\n border-radius: 4px;\n }\n `}\n label={option?.name}\n help={option?.help}\n >\n <textarea onChange={handleChange} ref={textRef} rows=\"5\" disabled>\n {value}\n </textarea>\n </BaseControl>\n </div>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { useEntityProp, store as coreStore } from \"@wordpress/core-data\";\nimport { useSelect } from \"@wordpress/data\";\nimport {\n ColorPicker,\n ComboboxControl,\n ToggleControl,\n RangeControl,\n Spinner,\n} from \"@wordpress/components\";\nimport Disabled from \"../components/Disabled\";\nimport Group from \"../components/Group\";\nimport Media from \"../components/Media\";\nimport Page from \"../components/Page\";\nimport CodeMirror from \"../components/CodeMirror\";\n\nexport default () => {\n const disabled = () => {\n if (prestoPlayer?.isPremium) {\n return false;\n }\n return {\n title: __(\"Pro Feature\", \"presto-player\"),\n heading: __(\"Unlock Presto Player Pro\", \"presto-player\"),\n message: __(\n \"Get this feature and more with the Pro version of Presto Player!\",\n \"presto-player\"\n ),\n link: \"https://prestoplayer.com\",\n };\n };\n\n const {\n presets,\n loadingPresets,\n audioPresets,\n loadingAudioPresets,\n } = useSelect((select) => {\n const presetArgs = [\"presto-player\", \"preset\"];\n const audioPresetArgs = [\"presto-player\", \"audio-preset\"];\n return {\n presets: select(coreStore).getEntityRecords(...presetArgs),\n loadingPresets: select(coreStore).isResolving(\n \"getEntityRecords\",\n presetArgs\n ),\n audioPresets: select(coreStore).getEntityRecords(...audioPresetArgs),\n loadingAudioPresets: select(coreStore).isResolving(\n \"getEntityRecords\",\n audioPresetArgs\n ),\n };\n }, []);\n\n const [presetSettings, setPresetSettings] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_presets\"\n );\n const updatePresetSettings = (data) => {\n setPresetSettings({\n ...(presetSettings || {}),\n ...data,\n });\n };\n\n const [audioPresetSettings, setAudioPresetSettings] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_audio_presets\"\n );\n const updateAudioPresetSettings = (data) => {\n setAudioPresetSettings({\n ...(audioPresetSettings || {}),\n ...data,\n });\n };\n\n const [analytics, setAnalytics] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_analytics\"\n );\n const updateAnalytics = (data) => {\n setAnalytics({\n ...(analytics || {}),\n ...data,\n });\n };\n\n const [branding, setBranding] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_branding\"\n );\n const updateBranding = (data) => {\n setBranding({\n ...(branding || {}),\n ...data,\n });\n };\n\n const [uninstall, setUninstall] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_uninstall\"\n );\n const updateUninstall = (data) => {\n setUninstall({\n ...(uninstall || {}),\n ...data,\n });\n };\n\n return (\n <Page\n title={__(\"General\", \"presto-player\")}\n description={__(\n \"Branding, analytics and uninstall data.\",\n \"presto-player\"\n )}\n >\n <Group\n title={__(\"Branding\", \"presto-player\")}\n description={__(\"Global player branding options\", \"presto-player\")}\n >\n <Disabled disabled={disabled()}>\n <Media\n className={\"presto-player__setting--logo\"}\n label={\n <>\n {__(\"Logo\", \"presto-player\")}{\" \"}\n {disabled() && (\n <span className=\"presto-options__pro-badge\">\n {__(\"Pro\", \"presto-player\")}\n </span>\n )}\n </>\n }\n onSelect={(image) => updateBranding({ logo: image?.url })}\n maxWidth={branding?.logo_width || 150}\n value={branding?.logo}\n />\n\n <div style={{ maxWidth: \"500px\" }}>\n <RangeControl\n className={\"presto-player__setting--logo-width\"}\n label={__(\"Logo Max Width\", \"presto-player\")}\n value={branding?.logo_width || 150}\n onChange={(logo_width) => updateBranding({ logo_width })}\n min={1}\n max={400}\n />\n </div>\n </Disabled>\n <ColorPicker\n className={\"presto-player__setting--brand-color\"}\n onChangeComplete={(value) => updateBranding({ color: value.hex })}\n color={branding?.color}\n />\n </Group>\n <Group\n title={__(\"Analytics\", \"presto-player\")}\n disabled={disabled()}\n description={__(\n \"Analytics settings for media plays, watch times and more.\",\n \"presto-player\"\n )}\n >\n <div>\n <ToggleControl\n className={\"presto-player__setting--analytics-enable\"}\n label={__(\"Enable\", \"presto-player\")}\n help={__(\"Enable view analytics for your media\", \"presto-player\")}\n checked={analytics?.enable}\n onChange={(enable) => updateAnalytics({ enable })}\n />\n\n {!!analytics?.enable && (\n <ToggleControl\n label={__(\"Auto-Purge Data (recommended)\")}\n help={__(\n \"Automatically purge data older than 90 days.\",\n \"presto-player\"\n )}\n className={\"presto-player__setting--analytics-enable\"}\n checked={\n analytics?.purge_data !== undefined\n ? analytics?.purge_data\n : true\n }\n onChange={(purge_data) => updateAnalytics({ purge_data })}\n />\n )}\n </div>\n </Group>\n <Group\n title={__(\"Presets\", \"presto-player\")}\n disabled={disabled()}\n description={__(\"Media presets settings.\", \"presto-player\")}\n >\n {!!loadingPresets ? (\n <Spinner />\n ) : (\n <ComboboxControl\n label={__(\"Select default preset for video.\", \"presto-player\")}\n value={presetSettings?.default_player_preset}\n options={(presets || []).map((preset) => {\n return {\n value: preset?.id,\n label: preset?.name,\n };\n })}\n onChange={(default_player_preset) =>\n updatePresetSettings({\n default_player_preset: default_player_preset || 1,\n })\n }\n />\n )}\n\n {!!loadingAudioPresets ? (\n <Spinner />\n ) : (\n <ComboboxControl\n label={__(\"Select default preset for audio.\", \"presto-player\")}\n value={audioPresetSettings?.default_player_preset}\n options={(audioPresets || []).map((preset) => {\n return {\n value: preset?.id,\n label: preset?.name,\n };\n })}\n onChange={(default_player_preset) =>\n updateAudioPresetSettings({\n default_player_preset: default_player_preset || 1,\n })\n }\n />\n )}\n </Group>\n <Group\n disabled={disabled()}\n title={__(\"Custom CSS\", \"presto-player\")}\n description={__(\n \"Quickly add custom css to the player web component.\",\n \"presto-player\"\n )}\n >\n <CodeMirror\n disabled={!prestoPlayer?.isPremium}\n option={{ id: \"player_css\" }}\n value={branding?.player_css}\n key={branding?.player_css}\n onChange={(player_css) => updateBranding({ player_css })}\n />\n </Group>\n <Group\n title={__(\"Uninstall Options\", \"presto-player\")}\n description={__(\n \"Options to remove data on uninstall.\",\n \"presto-player\"\n )}\n >\n <ToggleControl\n label={__(\"Remove data on uninstall\")}\n help={__(\"This removes all data on uninstall.\", \"presto-player\")}\n className=\"presto-player__setting--uninstall\"\n checked={uninstall?.uninstall_data}\n onChange={(uninstall_data) => {\n if (uninstall_data) {\n const r = confirm(\n __(\n \"Caution: Data Loss. Are you sure you want to remove all the data from this plugin? This is irreversible!\",\n \"presto-player\"\n )\n );\n if (!r) return;\n }\n updateUninstall({ uninstall_data });\n }}\n />\n </Group>\n </Page>\n );\n};\n","/** @jsx jsx */\nimport { css, jsx } from \"@emotion/core\";\n\nimport { __ } from \"@wordpress/i18n\";\nimport { Notice, ExternalLink, ToggleControl } from \"@wordpress/components\";\nimport { useEntityProp } from \"@wordpress/core-data\";\n\nimport Group from \"../components/Group\";\nimport Page from \"../components/Page\";\n\nexport default () => {\n const [performance, setPerformance] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_performance\"\n );\n const updatePerformance = (data) => {\n setPerformance({\n ...(performance || {}),\n ...data,\n });\n };\n\n return (\n <Page\n title={__(\"Performance\", \"presto-player\")}\n description={__(\"Player performance preferences.\", \"presto-player\")}\n >\n <Group\n title={__(\"Performance\", \"presto-player\")}\n description={__(\n \"Performance options for player loading.\",\n \"presto-player\"\n )}\n >\n <div>\n <ToggleControl\n className={\"presto-player__setting--module-enabled\"}\n label={__(\"Dynamically Load JavaScript\", \"presto-player\")}\n help={__(\n \"Dynamically load javascript modules on the page which can significantly reduce javascript size and increase performance.\",\n \"presto-player\"\n )}\n checked={performance?.module_enabled}\n onChange={(module_enabled) => updatePerformance({ module_enabled })}\n />\n\n {!!performance?.module_enabled && (\n <Notice\n css={css`\n background: #f3f4f5 !important;\n margin-bottom: 20px !important;\n `}\n className=\"presto-notice\"\n status=\"info\"\n isDismissible={false}\n >\n <div>\n <strong>{__(\"Please Note\", \"presto-player\")}</strong>\n </div>\n <div>\n {__(\n \"You may need to exclude the player script from combining, as well as enable CORS requests for some CDNs.\",\n \"presto-player\"\n )}{\" \"}\n <ExternalLink href=\"https://prestoplayer.com/docs/performance-preferences-explained#global-player-performance-setting\">\n {__(\"Learn More\", \"presto-player\")}\n </ExternalLink>\n </div>\n </Notice>\n )}\n </div>\n\n <ToggleControl\n className={\"presto-player__setting--automations\"}\n label={__(\n \"Enable Ajax Requests for Progress Integrations\",\n \"presto-player\"\n )}\n help={__(\n \"Keep this on unless you do not plan on using automation, LMS or membership integrations.\",\n \"presto-player\"\n )}\n checked={performance?.automations}\n onChange={(automations) => updatePerformance({ automations })}\n />\n </Group>\n </Page>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { TextControl } from \"@wordpress/components\";\nimport { useEntityProp } from \"@wordpress/core-data\";\n\nexport default () => {\n const [classic, setClassic] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_bunny_pull_zones\"\n );\n const updateClassic = (data) => {\n setClassic({\n ...(classic || {}),\n ...data,\n });\n };\n\n const {\n public_id,\n public_hostname,\n private_id,\n private_hostname,\n private_security_key,\n } = classic || {};\n\n return (\n <>\n <h2 style={{ marginTop: \"40px\" }}>\n {__(\"Bunny.net Storage (Classic)\", \"presto-player\")}\n </h2>\n <p style={{ fontSize: \"12px\", color: \"#757575\" }}>\n {__(\n 'Note: To Change your API key, please click \"Reconnect\" from a bunny block.',\n \"presto-player\"\n )}\n </p>\n\n <TextControl\n label={__(\"Public ID\", \"presto-player\")}\n help={__(\"The ID of the public pull zone to use.\", \"presto-player\")}\n value={public_id}\n onChange={(public_id) => updateClassic({ public_id })}\n />\n\n <TextControl\n label={__(\"Public Host Name\", \"presto-player\")}\n help={__(\"The hostname to use for this pullzone.\", \"presto-player\")}\n value={public_hostname}\n onChange={(public_hostname) => updateClassic({ public_hostname })}\n />\n\n <TextControl\n label={__(\"Private ID\", \"presto-player\")}\n help={__(\"The ID of the private pull zone to use.\", \"presto-player\")}\n value={private_id}\n onChange={(private_id) => updateClassic({ private_id })}\n />\n\n <TextControl\n label={__(\"Private Host Name\", \"presto-player\")}\n help={__(\n \"The hostname to use for the private pullzone.\",\n \"presto-player\"\n )}\n value={private_hostname}\n onChange={(private_hostname) => updateClassic({ private_hostname })}\n />\n\n <TextControl\n label={__(\"Private Url Token Authentication Key\", \"presto-player\")}\n help={__(\n \"Update the security token used to sign private urls.\",\n \"presto-player\"\n )}\n type=\"password\"\n value={private_security_key}\n onChange={(private_security_key) =>\n updateClassic({ private_security_key })\n }\n />\n </>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { TextControl } from \"@wordpress/components\";\nimport { useEntityProp } from \"@wordpress/core-data\";\n\nexport default () => {\n const [stream, setStream] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_bunny_stream_public\"\n );\n const updateStream = (data) => {\n setStream({\n ...(stream || {}),\n ...data,\n });\n };\n\n const { video_library_api_key, pull_zone_url, video_library_id } =\n stream || {};\n\n return (\n <>\n <TextControl\n label={__(\"Public Stream Library ID\", \"presto-player\")}\n help={__(\"The ID of the video library to use.\", \"presto-player\")}\n value={video_library_id}\n onChange={(video_library_id) => updateStream({ video_library_id })}\n />\n\n <TextControl\n label={__(\"Public Stream Library API Key\", \"presto-player\")}\n help={__(\n \"The API key for the above video library for read/write access.\",\n \"presto-player\"\n )}\n value={video_library_api_key}\n onChange={(video_library_api_key) =>\n updateStream({ video_library_api_key })\n }\n />\n\n <TextControl\n label={__(\"Public Stream CDN Hostname\", \"presto-player\")}\n help={__(\n \"The public cdn hostname for the video library.\",\n \"presto-player\"\n )}\n value={pull_zone_url}\n onChange={(pull_zone_url) => updateStream({ pull_zone_url })}\n />\n </>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { TextControl } from \"@wordpress/components\";\nimport { useEntityProp } from \"@wordpress/core-data\";\n\nexport default () => {\n const [stream, setStream] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_bunny_stream_private\"\n );\n const updateStream = (data) => {\n setStream({\n ...(stream || {}),\n ...data,\n });\n };\n\n const {\n video_library_api_key,\n pull_zone_url,\n video_library_id,\n token_auth_key,\n } = stream || {};\n\n return (\n <>\n <TextControl\n label={__(\"Private Stream Library ID\", \"presto-player\")}\n help={__(\"The ID of the video library to use.\", \"presto-player\")}\n value={video_library_id}\n onChange={(video_library_id) => updateStream({ video_library_id })}\n />\n\n <TextControl\n label={__(\"Private Stream Library API Key\", \"presto-player\")}\n help={__(\n \"The API key for the above video library for read/write access.\",\n \"presto-player\"\n )}\n value={video_library_api_key}\n onChange={(video_library_api_key) =>\n updateStream({ video_library_api_key })\n }\n />\n\n <TextControl\n label={__(\"Private Stream CDN Hostname\", \"presto-player\")}\n help={__(\n \"The public cdn hostname for the video library.\",\n \"presto-player\"\n )}\n value={pull_zone_url}\n onChange={(pull_zone_url) => updateStream({ pull_zone_url })}\n />\n\n <TextControl\n label={__(\"Private Stream Token Authentication Key\", \"presto-player\")}\n help={__(\n \"The token authentication key used to sign private urls.\",\n \"presto-player\"\n )}\n value={token_auth_key}\n onChange={(token_auth_key) => updateStream({ token_auth_key })}\n />\n </>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport { useEntityProp } from \"@wordpress/core-data\";\nimport PublicStream from \"./PublicStream\";\nimport PrivateStream from \"./PrivateStream\";\n\nexport default () => {\n const [stream, setStream] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_bunny_stream_public\"\n );\n\n if (!stream) return null;\n\n return (\n <>\n <h2 style={{ marginTop: \"40px\" }}>\n {__(\"Bunny.net Stream\", \"presto-player\")}\n </h2>\n <PublicStream />\n <PrivateStream />\n </>\n );\n};\n","const { __ } = wp.i18n;\nconst {\n Button,\n Panel,\n PanelBody,\n Flex,\n FlexBlock,\n Notice,\n Spinner,\n} = wp.components;\nconst { useState, useEffect } = wp.element;\n\nexport default () => {\n const [step, setStep] = useState(0);\n const [progress, setProgress] = useState(0);\n const [error, setError] = useState(\"\");\n const [url, setURL] = useState(0);\n\n const exportEmails = async () => {\n setError(\"\");\n try {\n const {\n percentage,\n step: currentStep,\n url: fetchedURL,\n } = await wp.apiFetch({\n path: \"/presto-player/v1/email/export\",\n method: \"post\",\n data: {\n step,\n },\n });\n\n setStep(currentStep);\n setProgress(percentage);\n setURL(fetchedURL);\n } catch (e) {\n setProgress(0);\n setError(e?.message || __(\"Something went wrong\", \"presto-player\"));\n }\n };\n\n useEffect(() => {\n if (step && step != \"done\") {\n exportEmails();\n }\n }, [step]);\n\n useEffect(() => {\n if (url) {\n window.open(url);\n }\n }, [url]);\n\n return (\n <Panel>\n <PanelBody\n title={\n <Flex>\n <FlexBlock>{__(\"Other\", \"presto-player\")}</FlexBlock>\n </Flex>\n }\n initialOpen={false}\n >\n <h2>{__(\"Manual Export\", \"presto-player\")}</h2>\n <p>\n {__(\n \"Using a service not listed here? You can export contacts and manually upload them to a service.\",\n \"presto-player\"\n )}\n </p>\n {error && (\n <Notice\n className=\"presto-notice\"\n status=\"error\"\n onRemove={() => setError(\"\")}\n >\n {error}\n </Notice>\n )}\n <Flex align=\"center\" justify=\"flex-start\">\n <Button\n isPrimary\n onClick={(e) => {\n setStep(1);\n setProgress(1);\n e.preventDefault();\n }}\n >\n {__(\"Download CSV File\", \"presto-player\")}\n </Button>\n {!!progress && (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n }}\n >\n <Spinner style={{ marginTop: 0 }} />\n <span>Exporting... {progress}% Complete</span>\n </div>\n )}\n </Flex>\n </PanelBody>\n </Panel>\n );\n};\n","const { __ } = wp.i18n;\n\nconst {\n Button,\n Panel,\n PanelBody,\n Flex,\n Modal,\n FlexBlock,\n FlexItem,\n PanelRow,\n} = wp.components;\n\nconst { useState } = wp.element;\n\nexport default ({\n connected,\n title,\n children,\n onConnect,\n isBusy,\n connectButtonText,\n disconnectButtonText,\n onDisconnect,\n}) => {\n const [confirm, setConfirm] = useState(false);\n\n return (\n <Panel>\n <PanelBody\n title={\n <Flex>\n <FlexBlock>{title}</FlexBlock>\n <FlexItem>\n {connected ? (\n <Button isSmall isPrimary style={{ marginRight: \"30px\" }}>\n {__(\"Connected\", \"presto-player\")}\n </Button>\n ) : (\n <Button isSmall isSecondary style={{ marginRight: \"30px\" }}>\n {__(\"Not Connected\", \"presto-player\")}\n </Button>\n )}\n </FlexItem>\n </Flex>\n }\n initialOpen={false}\n >\n <form\n onSubmit={(e) => {\n e.preventDefault();\n onConnect();\n }}\n disabled={isBusy}\n >\n {children}\n <PanelRow>\n <div>\n {!connected ? (\n <Button\n isPrimary\n isBusy={isBusy}\n disabled={isBusy}\n type=\"submit\"\n >\n {connectButtonText\n ? connectButtonText\n : __(\"Connect\", \"presto-player\")}\n </Button>\n ) : (\n <div>\n {\" \"}\n <Button\n isSecondary\n isBusy={isBusy}\n disabled={isBusy}\n onClick={(e) => {\n e.preventDefault();\n setConfirm(true);\n }}\n >\n {disconnectButtonText\n ? disconnectButtonText\n : __(\"Disconnect\", \"presto-player\")}\n </Button>\n </div>\n )}\n </div>\n </PanelRow>\n </form>\n </PanelBody>\n\n {confirm && (\n <Modal\n className=\"presto-player__modal-confirm\"\n title={__(\"Are you sure?\", \"presto-player\")}\n style={{ \"max-width\": \"350px\" }}\n onRequestClose={() => setConfirm(false)}\n >\n <p>\n {__(\n \"Are you sure you want to disconnect this integration?\",\n \"presto-player\"\n )}\n </p>\n <Button\n className=\"presto-player__modal-confirm-button\"\n isDestructive\n onClick={() => {\n onDisconnect && onDisconnect();\n setConfirm(false);\n }}\n >\n {__(\"Disconnect\", \"presto-player\")}\n </Button>\n <Button onClick={() => setConfirm(false)}>\n {__(\"Cancel\", \"presto-player\")}\n </Button>\n </Modal>\n )}\n </Panel>\n );\n};\n","const { TextControl } = wp.components;\nconst { dispatch } = wp.data;\nimport classNames from \"classnames\";\n\nexport default (props) => {\n const { option, value, optionName, className } = props;\n return (\n <div className=\"presto-settings__setting is-text-control\">\n <TextControl\n className={classNames(\n className,\n \"presto-settings__setting is-media-control\"\n )}\n label={option?.name}\n value={value}\n type={option?.type}\n help={option?.help}\n placeholder={option?.placeholder}\n onChange={(value) =>\n dispatch(\"presto-player/settings\").updateSetting(\n option.id,\n value,\n optionName\n )\n }\n {...props}\n />\n </div>\n );\n};\n","/**\n * WordPress dependencies\n */\nimport { __ } from \"@wordpress/i18n\";\nimport { useState } from \"@wordpress/element\";\nimport apiFetch from \"@wordpress/api-fetch\";\nimport { createHigherOrderComponent } from \"@wordpress/compose\";\nimport { useEntityProp } from \"@wordpress/core-data\";\n\n/**\n * Higher order component factory\n *\n * @return {Function} The higher order component.\n */\nexport default ({ name }) =>\n createHigherOrderComponent(\n (WrappedComponent) => (props) => {\n const [error, setError] = useState(\"\");\n const [success, setSuccess] = useState(\"\");\n const [isBusy, setIsBusy] = useState(false);\n\n const [setting, setSetting] = useEntityProp(\"root\", \"site\", name);\n const updateSetting = (data) => {\n setSetting({\n ...(setting || {}),\n ...data,\n });\n };\n\n const makeRequest = async ({\n path,\n data = {},\n message = __(\"Success\", \"presto-player\"),\n success,\n error,\n }) => {\n setError(\"\");\n setSuccess(\"\");\n setIsBusy(true);\n\n try {\n let response = await apiFetch({\n path,\n method: \"post\",\n data,\n });\n success && success(response);\n setSuccess(message);\n } catch (e) {\n if (e?.message) {\n setError(e.message);\n error && error(e);\n }\n } finally {\n setIsBusy(false);\n }\n };\n\n return (\n <WrappedComponent\n success={success}\n setSuccess={setSuccess}\n setError={setError}\n error={error}\n isBusy={isBusy}\n setting={setting}\n updateSetting={updateSetting}\n makeRequest={makeRequest}\n {...props}\n />\n );\n },\n \"withIntegration\"\n );\n","import { __ } from \"@wordpress/i18n\";\nimport { BaseControl, PanelRow, Notice } from \"@wordpress/components\";\nimport { compose } from \"@wordpress/compose\";\n\nimport Integration from \"../../../components/Integration\";\nimport TextControl from \"../../../components/TextControl\";\nimport withIntegration from \"./withIntegration\";\n\nexport default compose([\n withIntegration({ name: \"presto_player_activecampaign\" }),\n])(\n ({\n success,\n setSuccess,\n error,\n setError,\n isBusy,\n makeRequest,\n setting,\n updateSetting,\n }) => {\n const setData = (props) => {\n updateSetting({\n ...props,\n });\n };\n\n const onConnect = () => {\n makeRequest({\n path: \"/presto-player/v1/activecampaign/connect\",\n data: { api_key: setting?.api_key, url: setting?.url },\n message: __(\"Connected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n const onDisconnect = async () => {\n makeRequest({\n path: \"/presto-player/v1/activecampaign/disconnect\",\n message: __(\"Disconnected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n return (\n <Integration\n title={__(\"ActiveCampaign\")}\n connected={setting?.connected}\n onConnect={onConnect}\n onDisconnect={onDisconnect}\n isBusy={isBusy}\n >\n {error && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"error\"\n onRemove={() => setError(\"\")}\n >\n {error}\n </Notice>\n </PanelRow>\n )}\n {success && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"success\"\n onRemove={() => setSuccess(\"\")}\n >\n {success}\n </Notice>\n </PanelRow>\n )}\n <PanelRow>\n <BaseControl>\n <TextControl\n label={__(\"Your ActiveCampaign Url\", \"presto-player\")}\n type=\"url\"\n help={__(\n \"You can find this on your Settings > Developer page.\",\n \"presto-player\"\n )}\n value={setting?.url}\n onChange={(url) => updateSetting({ url })}\n />\n <TextControl\n label={__(\"Your ActiveCampaign API key\", \"presto-player\")}\n help={__(\n \"You can find this on your Settings > Developer page.\",\n \"presto-player\"\n )}\n value={setting?.api_key}\n onChange={(api_key) => updateSetting({ api_key })}\n />\n </BaseControl>\n </PanelRow>\n </Integration>\n );\n }\n);\n","import { Notice, PanelRow } from \"@wordpress/components\";\nimport { compose } from \"@wordpress/compose\";\nimport { __ } from \"@wordpress/i18n\";\n\nimport Integration from \"../../../components/Integration\";\nimport withIntegration from \"./withIntegration\";\n\nexport default compose([withIntegration({ name: \"presto_player_fluentcrm\" })])(\n ({ error, setError, isBusy, makeRequest, setting, updateSetting }) => {\n const setData = (props) => {\n updateSetting({\n ...props,\n });\n };\n\n const { connected } = setting || {};\n\n const onConnect = () => {\n makeRequest({\n path: \"/presto-player/v1/fluentcrm/connect\",\n message: __(\"Installed and connected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n const onDisconnect = async () => {\n makeRequest({\n path: \"/presto-player/v1/fluentcrm/disconnect\",\n message: __(\"Deactivated\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n return (\n <Integration\n title={__(\"FluentCRM\")}\n connected={connected}\n onConnect={onConnect}\n onDisconnect={onDisconnect}\n connectButtonText={__(\"Install FluentCRM Plugin\", \"presto-player\")}\n disconnectButtonText={__(\n \"Deactivate FluentCRM Plugin\",\n \"presto-player\"\n )}\n isBusy={isBusy}\n >\n {error && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"error\"\n onRemove={() => setError(\"\")}\n >\n {error}\n </Notice>\n </PanelRow>\n )}\n {connected && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"success\"\n isDismissible={false}\n >\n {__(\"Installed and connected!\", \"presto-player\")}\n </Notice>\n </PanelRow>\n )}\n </Integration>\n );\n }\n);\n","import {\n BaseControl,\n ExternalLink,\n Notice,\n PanelRow,\n} from \"@wordpress/components\";\nimport { compose } from \"@wordpress/compose\";\nimport { __ } from \"@wordpress/i18n\";\n\nimport Integration from \"../../../components/Integration\";\nimport TextControl from \"../../../components/TextControl\";\nimport withIntegration from \"./withIntegration\";\n\nexport default compose([withIntegration({ name: \"presto_player_mailchimp\" })])(\n ({\n success,\n setSuccess,\n error,\n setError,\n isBusy,\n makeRequest,\n setting,\n updateSetting,\n }) => {\n const { api_key, connected } = setting || {};\n\n const setData = (props) => {\n updateSetting({\n ...props,\n });\n };\n\n const onConnect = () => {\n makeRequest({\n path: \"/presto-player/v1/mailchimp/connect\",\n data: { api_key },\n message: __(\"Connected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n const onDisconnect = async () => {\n makeRequest({\n path: \"/presto-player/v1/mailchimp/disconnect\",\n message: __(\"Disconnected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n return (\n <Integration\n title={__(\"Mailchimp\")}\n connected={connected}\n onDisconnect={onDisconnect}\n onConnect={onConnect}\n isBusy={isBusy}\n >\n {error && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"error\"\n onRemove={() => setError(\"\")}\n >\n {error}\n </Notice>\n </PanelRow>\n )}\n {success && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"success\"\n onRemove={() => setSuccess(\"\")}\n >\n {success}\n </Notice>\n </PanelRow>\n )}\n <PanelRow>\n <BaseControl>\n <TextControl\n className=\"presto-player__setting--mailchimp-api_key\"\n label={__(\"Your Mailchimp API key\", \"presto-player\")}\n help={\n <p>\n {__(\n \"You can create a new key on your mailchimp account page.\",\n \"presto-player\"\n )}{\" \"}\n <ExternalLink href=\"https://us11.admin.mailchimp.com/account/api/\">\n {__(\"Get My API Key\", \"presto-player\")}\n </ExternalLink>\n </p>\n }\n value={api_key}\n onChange={(api_key) => updateSetting({ api_key })}\n />\n </BaseControl>\n </PanelRow>\n </Integration>\n );\n }\n);\n","import {\n BaseControl,\n ExternalLink,\n Notice,\n PanelRow,\n} from \"@wordpress/components\";\nimport { compose } from \"@wordpress/compose\";\nimport { __ } from \"@wordpress/i18n\";\n\nimport Integration from \"../../../components/Integration\";\nimport TextControl from \"../../../components/TextControl\";\nimport withIntegration from \"./withIntegration\";\n\nexport default compose([withIntegration({ name: \"presto_player_mailerlite\" })])(\n ({\n success,\n setSuccess,\n error,\n setError,\n isBusy,\n makeRequest,\n setting,\n updateSetting,\n }) => {\n const { api_key, connected } = setting || {};\n\n const setData = (props) => {\n updateSetting({\n ...props,\n });\n };\n\n const onConnect = () => {\n makeRequest({\n path: \"/presto-player/v1/mailerlite/connect\",\n data: { api_key },\n message: __(\"Connected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n const onDisconnect = async () => {\n makeRequest({\n path: \"/presto-player/v1/mailerlite/disconnect\",\n message: __(\"Disconnected\", \"presto-player\"),\n success: setData,\n error: setData,\n });\n };\n\n return (\n <Integration\n title={__(\"Mailerlite\")}\n connected={connected}\n onDisconnect={onDisconnect}\n onConnect={onConnect}\n isBusy={isBusy}\n >\n {error && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"error\"\n onRemove={() => setError(\"\")}\n >\n {error}\n </Notice>\n </PanelRow>\n )}\n {success && (\n <PanelRow>\n <Notice\n className=\"presto-notice\"\n status=\"success\"\n onRemove={() => setSuccess(\"\")}\n >\n {success}\n </Notice>\n </PanelRow>\n )}\n <PanelRow>\n <BaseControl>\n <TextControl\n className=\"presto-player__setting--mailerlite-api_key\"\n label={__(\"Your MailerLite API key\", \"presto-player\")}\n help={\n <p>\n {__(\n \"You can create a new key on your MailerLite account page.\",\n \"presto-player\"\n )}{\" \"}\n <ExternalLink href=\"https://app.mailerlite.com/integrations/api/\">\n {__(\"Get My API Key\", \"presto-player\")}\n </ExternalLink>\n </p>\n }\n value={api_key}\n onChange={(api_key) => updateSetting({ api_key })}\n />\n </BaseControl>\n </PanelRow>\n </Integration>\n );\n }\n);\n","import {\n BaseControl,\n Button,\n Flex,\n TextControl,\n ToolbarButton,\n} from \"@wordpress/components\";\nimport { __ } from \"@wordpress/i18n\";\n\nexport default ({ headers, setHeaders }) => {\n const updateHeaders = (data) => {\n setHeaders([...(headers || []), ...data]);\n };\n\n const addHeader = (header) => {\n setHeaders([...(headers || []), ...[header]]);\n };\n const updateHeader = (data, index) => {\n setHeaders(\n (headers || []).map((item, i) => {\n if (i !== index) {\n // This isn't the item we care about - keep it as-is\n return item;\n }\n\n // Otherwise, this is the one we want - return an updated value\n return {\n ...item,\n ...data,\n };\n })\n );\n };\n\n const removeHeader = (index) =>\n setHeaders((headers || []).filter((_, i) => i !== index));\n\n return (\n <>\n {(headers || []).map(({ name, value }, index) => {\n return (\n <Flex key={index} align=\"center\">\n <TextControl\n placeholder={__(\"Header Name\", \"presto-player\")}\n value={name}\n onChange={(name) => updateHeader({ name }, index)}\n />\n <TextControl\n placeholder={__(\"New Value\", \"presto-player\")}\n value={value}\n onChange={(value) => updateHeader({ value }, index)}\n />\n <BaseControl>\n <ToolbarButton icon=\"trash\" onClick={() => removeHeader(index)} />\n </BaseControl>\n </Flex>\n );\n })}\n\n <div>\n <Button\n isSecondary\n isSmall\n onClick={() => addHeader({ name: \"\", value: \"\" })}\n >\n {__(\"Add Header\", \"presto-player\")}\n </Button>\n </div>\n </>\n );\n};\n","import { css, jsx } from \"@emotion/core\";\n/** @jsx jsx */\nimport {\n BaseControl,\n Button,\n Card,\n CardBody,\n Flex,\n Modal,\n SelectControl,\n TextControl,\n ToggleControl,\n} from \"@wordpress/components\";\nimport { store as coreStore } from \"@wordpress/core-data\";\nimport { useDispatch } from \"@wordpress/data\";\nimport { useState } from \"@wordpress/element\";\nimport { __ } from \"@wordpress/i18n\";\nimport { store as noticesStore } from \"@wordpress/notices\";\n\nimport Headers from \"./Headers\";\n\nexport default ({ onClose, webhook }) => {\n const { saveEntityRecord } = useDispatch(coreStore);\n const { createSuccessNotice, createErrorNotice } = useDispatch(noticesStore);\n const [busy, setBusy] = useState(false);\n\n const sectionCSS = { margin: \"0 0 1.5rem\" };\n\n const [form, setForm] = useState(\n webhook || {\n email_name: \"email\",\n method: \"POST\",\n }\n );\n\n const updateForm = (data) => {\n setForm({\n ...(form || {}),\n ...data,\n });\n };\n\n const { name, url, method, email_name, headers, archived } = form;\n\n const submit = async (e) => {\n try {\n e.preventDefault();\n setBusy(true);\n await saveEntityRecord(\"presto-player\", \"webhook\", {\n ...form,\n });\n createSuccessNotice(\n form?.id\n ? __(\"Webhook updated\", \"presto-player\")\n : __(\"Webhook created.\", \"presto-player\"),\n {\n type: \"snackbar\",\n }\n );\n onClose();\n } catch (e) {\n console.error(e);\n createErrorNotice(\n e?.message || __(\"Something went wrong.\", \"presto-player\"),\n { type: \"snackbar\" }\n );\n } finally {\n setBusy(false);\n }\n };\n\n return (\n <Modal\n title={\n form?.id\n ? __(\"Edit Webhook\", \"presto-player\")\n : __(\"Add A Webhook\", \"presto-player\")\n }\n onRequestClose={onClose}\n shouldCloseOnClickOutside={false}\n >\n <form onSubmit={submit}>\n <TextControl\n label={__(\"Name\", \"presto-player\")}\n placeholder={__(\"Webhook feed name\", \"presto-player\")}\n value={name}\n onChange={(name) => updateForm({ name })}\n required\n autoFocus\n />\n\n <TextControl\n label={__(\"Request URL\", \"presto-player\")}\n placeholder={__(\"Webhook URL\", \"presto-player\")}\n type=\"url\"\n value={url}\n onChange={(url) => updateForm({ url })}\n required\n />\n\n <SelectControl\n label={__(\"Request Method\", \"presto-player\")}\n value={method}\n options={[\n { label: \"GET\", value: \"GET\" },\n { label: \"POST\", value: \"POST\" },\n { label: \"PUT\", value: \"PUT\" },\n ]}\n onChange={(method) => updateForm({ method })}\n required\n />\n\n <TextControl\n label={__(\"Email Name\", \"presto-player\")}\n placeholder={__(\"The name (key) of the email sent.\", \"presto-player\")}\n value={email_name}\n onChange={(email_name) => updateForm({ email_name })}\n required\n />\n\n <div css={sectionCSS}>\n <BaseControl.VisualLabel>\n {__(\"Headers\", \"presto-player\")}\n </BaseControl.VisualLabel>\n <Headers\n headers={headers}\n setHeaders={(headers) => updateForm({ headers })}\n />\n </div>\n\n <Button isPrimary type=\"submit\" isBusy={busy}>\n {form?.id\n ? __(\"Update\", \"presto-player\")\n : __(\"Create\", \"presto-player\")}\n </Button>\n </form>\n </Modal>\n );\n};\n","import {\n Card,\n CardBody,\n Flex,\n FlexBlock,\n FlexItem,\n Spinner,\n ToolbarButton,\n} from \"@wordpress/components\";\nimport { store as coreStore } from \"@wordpress/core-data\";\nimport { select, useDispatch, useSelect } from \"@wordpress/data\";\nimport { useState } from \"@wordpress/element\";\nimport { __ } from \"@wordpress/i18n\";\nimport { store as noticesStore } from \"@wordpress/notices\";\n\nimport NewWebhook from \"./NewWebhook\";\n\nexport default ({ webhook: incomingWebhook }) => {\n const [busy, setBusy] = useState(false);\n const [open, setOpen] = useState(false);\n const { deleteEntityRecord, saveEntityRecord } = useDispatch(coreStore);\n const { createSuccessNotice, createErrorNotice } = useDispatch(noticesStore);\n\n const { webhook, loading, isSaving, isDeleting } = useSelect((select) => {\n const queryArgs = [\"presto-player\", \"webhook\", incomingWebhook?.id];\n const {\n getEditedEntityRecord,\n isSavingEntityRecord,\n isDeletingEntityRecord,\n } = select(coreStore);\n return {\n webhook: getEditedEntityRecord(...queryArgs),\n loading: select(coreStore).isResolving(\n \"getEditedEntityRecord\",\n queryArgs\n ),\n isSaving: isSavingEntityRecord(...queryArgs),\n isDeleting: isDeletingEntityRecord(...queryArgs),\n };\n }, []);\n\n const { name, url } = webhook || {};\n\n console.log({ isDeleting });\n\n const deleteWebhook = async () => {\n try {\n const r = confirm(\n __(\"Are you sure you want to delete this webhook?\", \"presto-player\")\n );\n if (!r) return;\n await deleteEntityRecord(\n \"presto-player\",\n \"webhook\",\n webhook?.id,\n undefined,\n { throwOnError: true }\n );\n createSuccessNotice(__(\"Webhook deleted.\", \"presto-player\"), {\n type: \"snackbar\",\n });\n } catch (e) {\n console.error(e);\n createErrorNotice(\n e?.message || __(\"Something went wrong\", \"presto-player\"),\n { type: \"snackbar\" }\n );\n }\n };\n\n if (loading) {\n return <Spinner />;\n }\n\n return (\n <Card>\n <CardBody>\n <Flex align=\"center\">\n <FlexBlock>\n <strong>{name || __(\"Untitled webhook\", \"presto-player\")}</strong>\n <br />\n {url}\n </FlexBlock>\n <FlexItem>\n <Flex align=\"center\">\n {isSaving || isDeleting ? (\n <Spinner />\n ) : (\n <>\n <ToolbarButton\n icon=\"edit\"\n label=\"Edit\"\n onClick={() => setOpen(true)}\n />\n <ToolbarButton\n icon=\"trash\"\n label={__(\"Delete\", \"presto-player\")}\n onClick={deleteWebhook}\n />\n </>\n )}\n </Flex>\n </FlexItem>\n </Flex>\n </CardBody>\n {open && (\n <NewWebhook onClose={() => setOpen(false)} webhook={incomingWebhook} />\n )}\n </Card>\n );\n};\n","import {\n Button,\n Flex,\n FlexBlock,\n Panel,\n PanelBody,\n} from \"@wordpress/components\";\nimport { store as coreStore } from \"@wordpress/core-data\";\nimport { useSelect } from \"@wordpress/data\";\nimport { useState } from \"@wordpress/element\";\nimport { __, _n, sprintf } from \"@wordpress/i18n\";\n\nimport NewWebhook from \"./NewWebhook\";\nimport Webhook from \"./Webhook\";\n\nexport default () => {\n const [open, setOpen] = useState(false);\n const { webhooks, loading } = useSelect((select) => {\n const queryArgs = [\"presto-player\", \"webhook\"];\n return {\n webhooks: select(coreStore).getEntityRecords(...queryArgs),\n loading: select(coreStore).isResolving(\"getEntityRecords\", queryArgs),\n };\n }, []);\n\n return (\n <Panel>\n <PanelBody\n title={\n <Flex>\n <FlexBlock>{__(\"Webhooks\", \"presto-player\")}</FlexBlock>\n {!!webhooks?.length && (\n <Button isSmall isPrimary style={{ marginRight: \"30px\" }}>\n {sprintf(__(\"%d connected\"), webhooks?.length)}\n </Button>\n )}\n </Flex>\n }\n initialOpen={false}\n >\n {(webhooks || []).map((webhook) => {\n return (\n <Webhook webhook={webhook} key={webhook?.id} loading={loading} />\n );\n })}\n\n <br />\n\n <Button\n isSecondary\n onClick={() => {\n setOpen(true);\n }}\n >\n {__(\"Create New WebHook\", \"presto-player\")}\n </Button>\n\n {open && <NewWebhook onClose={() => setOpen(false)} />}\n </PanelBody>\n </Panel>\n );\n};\n","import {\n ExternalLink,\n TextControl,\n ToggleControl,\n} from \"@wordpress/components\";\nimport { useEntityProp } from \"@wordpress/core-data\";\nimport { Fragment, useState } from \"@wordpress/element\";\nimport { __ } from \"@wordpress/i18n\";\n\nconst semverCompare = require(\"semver/functions/compare\");\n\nimport Group from \"../components/Group\";\nimport Page from \"../components/Page\";\nimport BunnyClassic from \"./parts/BunnyClassic/index\";\nimport BunnyStream from \"./parts/BunnyStream/index\";\nimport EmailExport from \"./parts/EmailExport\";\n\nimport ActiveCampaign from \"./parts/integration/ActiveCampaign\";\nimport FluentCRM from \"./parts/integration/FluentCRM\";\nimport Mailchimp from \"./parts/integration/Mailchimp\";\nimport MailerLite from \"./parts/integration/MailerLite\";\nimport Webhooks from \"./parts/Webhooks/index.js\";\n\nexport default () => {\n const [editBunny, setEditBunny] = useState(false);\n\n const [stream, setStream] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_bunny_stream\"\n );\n const updateStream = (data) => {\n setStream({\n ...(stream || {}),\n ...data,\n });\n };\n\n const [analytics, setAnalytics] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_google_analytics\"\n );\n const updateAnalytics = (data) => {\n setAnalytics({\n ...(analytics || {}),\n ...data,\n });\n };\n\n const [youtube, setYoutube] = useEntityProp(\n \"root\",\n \"site\",\n \"presto_player_youtube\"\n );\n const updateYoutube = (data) => {\n setYoutube({\n ...(youtube || {}),\n ...data,\n });\n };\n\n const disabled = () => {\n if (prestoPlayer?.isPremium) {\n return false;\n }\n return {\n title: __(\"Pro Feature\", \"presto-player\"),\n heading: __(\"Unlock Presto Player Pro\", \"presto-player\"),\n message: __(\n \"Get this feature and more with the Pro version of Presto Player!\",\n \"presto-player\"\n ),\n link: \"https://prestoplayer.com\",\n };\n };\n\n const showEmailIntegration = () => {\n if (!prestoPlayer?.isPremium) {\n return true;\n }\n\n if (\n prestoPlayer?.proVersion &&\n semverCompare(prestoPlayer?.proVersion, \"0.9.0\") >= 0\n ) {\n return true;\n }\n\n return false;\n };\n\n const bunnySettings = () => {\n return (\n <>\n <Group\n title={__(\"Bunny.net Settings\", \"presto-player\")}\n description={__(\"Modify bunny.net settings.\", \"presto-player\")}\n >\n {!!window?.prestoPlayer?.isSetup?.bunny?.stream && (\n <Fragment>\n <TextControl\n label={__(\"Initial Quality Level\", \"presto-player\")}\n help={__(\n \"You can set the default quality start level for all streams (i.e. 240, 360, 480, 720, 1080, etc). Set this lower to prevent initial buffering if your users have slow connections. Set this higher to start with a higher quality stream.\",\n \"presto-player\"\n )}\n placeholder={\"480\"}\n type=\"number\"\n value={stream?.hls_start_level}\n onChange={(hls_start_level) =>\n updateStream({ hls_start_level })\n }\n />\n\n {<br />}\n\n <ToggleControl\n label={__(\"Disable Classic Bunny.net Storage\", \"presto-player\")}\n help={__(\n \"This will disable Bunny.net classic storage in your block UI.\",\n \"presto-player\"\n )}\n checked={stream?.disable_legacy_storage}\n onChange={(disable_legacy_storage) =>\n updateStream({ disable_legacy_storage })\n }\n />\n\n {<br />}\n </Fragment>\n )}\n\n <ToggleControl\n label={__(\"Edit Bunny.net Settings\", \"presto-player\")}\n help={__(\n \"Edit Bunny.net connection settings. Only edit this if you know what you're doing.\",\n \"presto-player\"\n )}\n checked={editBunny}\n onChange={setEditBunny}\n />\n\n {!!editBunny && (\n <>\n <BunnyStream />\n <BunnyClassic />\n </>\n )}\n </Group>\n </>\n );\n };\n\n return (\n <Page\n title={__(\"Integrations\", \"presto-player\")}\n description={__(\n \"Third party integrations and connections.\",\n \"presto-player\"\n )}\n >\n <Group\n title={__(\"Google Analytics\", \"presto-player\")}\n description={__(\n \"Analytics settings for media plays, watch times and more.\",\n \"presto-player\"\n )}\n disabled={disabled()}\n >\n <ToggleControl\n className=\"presto-player__setting--google-analytics\"\n label={__(\"Enable\", \"presto-player\")}\n help={__(\n \"Send analytics events to your Google Analytics account.\",\n \"presto-player\"\n )}\n checked={analytics?.enable}\n onChange={(enable) => updateAnalytics({ enable })}\n />\n\n <ToggleControl\n className=\"presto-player__setting--use-existing-tag\"\n label={__(\"Use existing on-page tag?\", \"presto-player\")}\n help={__(\n \"Should we use an existing google analytics (v4) tag? If not, we'll output one for you.\",\n \"presto-player\"\n )}\n checked={analytics?.use_existing_tag}\n onChange={(use_existing_tag) => updateAnalytics({ use_existing_tag })}\n />\n\n <TextControl\n label={__(\"Measurement ID\", \"presto-player\")}\n help={__(\n \"Enter a Google Analytics Measurement ID, which can be found on your analytics admin page.\",\n \"presto-player\"\n )}\n value={analytics?.measurement_id}\n onChange={(measurement_id) => updateAnalytics({ measurement_id })}\n />\n </Group>\n\n <Group\n title={__(\"YouTube\", \"presto-player\")}\n description={__(\"Settings for YouTube videos.\", \"presto-player\")}\n >\n <ToggleControl\n className=\"presto-player__setting--youtube-nocookie\"\n label={__(\"Privacy-Enhanced Mode\", \"presto-player\")}\n help={__(\n \"Embed YouTube videos without using cookies that track viewing behaviour.\",\n \"presto-player\"\n )}\n checked={youtube?.nocookie}\n onChange={(nocookie) => updateYoutube({ nocookie })}\n />\n\n <TextControl\n label={__(\"Channel ID\", \"presto-player\")}\n help={\n <div>\n {__(\n \"Enter the ID of your channel to enable Youtube Subscribe button functionality.\",\n \"presto-player\"\n )}{\" \"}\n <ExternalLink href=\"https://support.google.com/youtube/answer/3250431?hl=en\">\n {__(\"Find my channel id\", \"presto-player\")}\n </ExternalLink>\n </div>\n }\n value={youtube?.channel_id}\n onChange={(channel_id) => updateYoutube({ channel_id })}\n />\n </Group>\n\n {showEmailIntegration() && (\n <Group\n hideSaveButton={true}\n title={__(\"Email Capture\", \"presto-player\")}\n description={__(\n \"Integrate Presto Player with an email provider for email capture.\",\n \"presto-player\"\n )}\n disabled={disabled()}\n >\n <ActiveCampaign />\n <FluentCRM />\n <Mailchimp />\n <MailerLite />\n {prestoPlayer?.proVersion &&\n semverCompare(prestoPlayer?.proVersion, \"1.2.0\") >= 0 && (\n <Webhooks />\n )}\n <EmailExport />\n </Group>\n )}\n\n {!window?.prestoPlayer?.isSetup?.bunny ? (\n <Group>\n <CTA\n className=\"presto-player__setting--bunny-cta\"\n option={{\n name: __(\"Bunny.net Video\", \"presto-player\"),\n help: __(\n \"To get started with Bunny.net, add a Bunny.net video to your page.\",\n \"presto-player\"\n ),\n type: \"cta\",\n button: {\n text: \"Learn More\",\n link: \"https://prestoplayer.com/secure-video-with-bunny-net\",\n target: \"_blank\",\n },\n }}\n />\n </Group>\n ) : (\n bunnySettings()\n )}\n </Page>\n );\n};\n","import { __ } from \"@wordpress/i18n\";\nimport {\n Card,\n Flex,\n FlexBlock,\n FlexItem,\n Spinner,\n} from \"@wordpress/components\";\nimport { store as noticesStore } from \"@wordpress/notices\";\nimport { useDispatch, useSelect } from \"@wordpress/data\";\nimport { store as coreStore } from \"@wordpress/core-data\";\nimport { useState, useEffect } from \"@wordpress/element\";\n\nimport { Router, Link, Route } from \"@/router\";\nimport { routes } from \"./routes\";\n\nimport SaveButton from \"./components/SaveButton\";\nimport Notices from \"./components/Notices\";\nimport useSave from \"../../hooks/useSave\";\nimport General from \"./pages/General\";\nimport Performance from \"./pages/Performance\";\nimport Integrations from \"./pages/Integrations\";\n\nfunction App() {\n const { createSuccessNotice, createErrorNotice } = useDispatch(noticesStore);\n const [loaded, setLoaded] = useState(false);\n\n // scroll top on history change\n window.onhashchange = () => {\n window.scrollTo(0, 0);\n };\n\n const { save } = useSave();\n\n /**\n * Form is submitted.\n */\n const onSubmit = async () => {\n try {\n await save();\n createSuccessNotice(__(\"Settings Updated\", \"presto-player\"), {\n type: \"snackbar\",\n });\n } catch (e) {\n console.error(e);\n createErrorNotice(\n e?.message || __(\"Something went wrong\", \"presto-player\"),\n { type: \"snackbar\" }\n );\n }\n };\n\n const loading = useSelect((select) => {\n const queryArgs = [\"root\", \"site\"];\n select(coreStore).getEntityRecords(...queryArgs);\n return !select(coreStore)?.hasFinishedResolution?.(\n \"getEntityRecords\",\n queryArgs\n );\n });\n\n useEffect(() => {\n if (!loading) {\n setLoaded(true);\n }\n }, [loading]);\n\n if (!loaded) {\n return (\n <div className=\"presto-settings__loading\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <div className=\"presto-settings\">\n <Router routes={routes} defaultRoute={routes?.general?.path}>\n <Card className=\"presto-settings__navigation\">\n <Flex>\n <FlexBlock>\n <div\n role=\"tablist\"\n aria-orientation=\"horizontal\"\n className=\"components-tab-panel__tabs\"\n >\n <Link\n to={routes?.general?.path}\n type=\"button\"\n role=\"tab\"\n activeClassName=\"is-active\"\n className=\"components-button components-tab-panel__tabs-item presto-player__nav-general\"\n >\n {__(\"General\", \"presto-player\")}\n </Link>\n <Link\n to={routes?.integrations?.path}\n type=\"button\"\n role=\"tab\"\n activeClassName=\"is-active\"\n className=\"components-button components-tab-panel__tabs-item presto-player__nav-integrations\"\n >\n {__(\"Integrations\", \"presto-player\")}\n </Link>\n <Link\n to={routes?.performance?.path}\n type=\"button\"\n role=\"tab\"\n activeClassName=\"is-active\"\n className=\"components-button components-tab-panel__tabs-item presto-player__nav-performance\"\n >\n {__(\"Performance\", \"presto-player\")}\n </Link>\n </div>\n </FlexBlock>\n <FlexItem>\n <SaveButton onSave={onSubmit} style={{ marginRight: \"8px\" }}>\n {__(\"Update Settings\", \"presto-player\")}\n </SaveButton>\n </FlexItem>\n </Flex>\n </Card>\n\n <Route path={routes?.general?.path}>\n <General />\n </Route>\n <Route path={routes?.integrations?.path}>\n <Integrations />\n </Route>\n <Route path={routes?.performance?.path}>\n <Performance />\n </Route>\n </Router>\n\n <Notices className=\"presto-settings-page-notices\" />\n </div>\n );\n}\n\nexport default App;\n","import { render } from \"@wordpress/element\";\n\n/**\n * Redux entities.\n */\nimport \"./entities\";\n\n/**\n * App\n */\nimport App from \"./app\";\n\n/**\n * styles\n */\nimport \"./settings.scss\";\n\n/**\n * Render\n */\nrender(<App />, document.getElementById(\"presto-settings-page\"));\n","(function() { module.exports = window[\"wp\"][\"data\"]; }());","(function() { module.exports = window[\"wp\"][\"element\"]; }());"],"sourceRoot":""}
 
dist/settings/manifest.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
  "admin.css": "settings/admin-7aab8cd8.css",
3
  "admin.css.map": "settings/admin-7aab8cd8.css.map",
4
- "admin.js": "settings/admin-68736b19.js",
5
- "admin.js.map": "settings/admin-68736b19.js.map",
6
  "runtime.js": "settings/runtime-e654b653.js",
7
  "runtime.js.map": "settings/runtime-e654b653.js.map",
8
  "vendors--presto-player--admin.js": "settings/vendors--presto-player--admin-23d68b5f.js",
@@ -13,12 +13,12 @@
13
  "js": [
14
  "settings/runtime-e654b653.js",
15
  "settings/vendors--presto-player--admin-23d68b5f.js",
16
- "settings/admin-68736b19.js"
17
  ],
18
  "js.map": [
19
  "settings/runtime-e654b653.js.map",
20
  "settings/vendors--presto-player--admin-23d68b5f.js.map",
21
- "settings/admin-68736b19.js.map"
22
  ],
23
  "css": [
24
  "settings/admin-7aab8cd8.css"
1
  {
2
  "admin.css": "settings/admin-7aab8cd8.css",
3
  "admin.css.map": "settings/admin-7aab8cd8.css.map",
4
+ "admin.js": "settings/admin-1aadbb22.js",
5
+ "admin.js.map": "settings/admin-1aadbb22.js.map",
6
  "runtime.js": "settings/runtime-e654b653.js",
7
  "runtime.js.map": "settings/runtime-e654b653.js.map",
8
  "vendors--presto-player--admin.js": "settings/vendors--presto-player--admin-23d68b5f.js",
13
  "js": [
14
  "settings/runtime-e654b653.js",
15
  "settings/vendors--presto-player--admin-23d68b5f.js",
16
+ "settings/admin-1aadbb22.js"
17
  ],
18
  "js.map": [
19
  "settings/runtime-e654b653.js.map",
20
  "settings/vendors--presto-player--admin-23d68b5f.js.map",
21
+ "settings/admin-1aadbb22.js.map"
22
  ],
23
  "css": [
24
  "settings/admin-7aab8cd8.css"
languages/presto-player.pot CHANGED
@@ -7,7 +7,7 @@ msgstr ""
7
  "MIME-Version: 1.0\n"
8
  "Content-Type: text/plain; charset=UTF-8\n"
9
  "Content-Transfer-Encoding: 8bit\n"
10
- "POT-Creation-Date: 2022-10-19T18:24:44+00:00\n"
11
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
  "X-Generator: WP-CLI 2.6.0\n"
13
 
@@ -516,7 +516,7 @@ msgid "This will also delete all videos inside of the collection."
516
  msgstr ""
517
 
518
  #: admin/blocks/blocks/bunny/popup/stream/CollectionHeader.js:95
519
- #: admin/settings/pages/parts/Webhooks/Webhook.js:97
520
  msgid "Delete"
521
  msgstr ""
522
 
@@ -1985,7 +1985,7 @@ msgstr ""
1985
  #: admin/settings/app.js:47
1986
  #: admin/settings/components/Group.js:25
1987
  #: admin/settings/pages/parts/EmailExport.js:39
1988
- #: admin/settings/pages/parts/Webhooks/Webhook.js:65
1989
  msgid "Something went wrong"
1990
  msgstr ""
1991
 
@@ -2496,15 +2496,15 @@ msgstr ""
2496
  msgid "Update"
2497
  msgstr ""
2498
 
2499
- #: admin/settings/pages/parts/Webhooks/Webhook.js:49
2500
  msgid "Are you sure you want to delete this webhook?"
2501
  msgstr ""
2502
 
2503
- #: admin/settings/pages/parts/Webhooks/Webhook.js:59
2504
  msgid "Webhook deleted."
2505
  msgstr ""
2506
 
2507
- #: admin/settings/pages/parts/Webhooks/Webhook.js:80
2508
  msgid "Untitled webhook"
2509
  msgstr ""
2510
 
7
  "MIME-Version: 1.0\n"
8
  "Content-Type: text/plain; charset=UTF-8\n"
9
  "Content-Transfer-Encoding: 8bit\n"
10
+ "POT-Creation-Date: 2022-10-21T15:45:55+00:00\n"
11
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
  "X-Generator: WP-CLI 2.6.0\n"
13
 
516
  msgstr ""
517
 
518
  #: admin/blocks/blocks/bunny/popup/stream/CollectionHeader.js:95
519
+ #: admin/settings/pages/parts/Webhooks/Webhook.js:95
520
  msgid "Delete"
521
  msgstr ""
522
 
1985
  #: admin/settings/app.js:47
1986
  #: admin/settings/components/Group.js:25
1987
  #: admin/settings/pages/parts/EmailExport.js:39
1988
+ #: admin/settings/pages/parts/Webhooks/Webhook.js:63
1989
  msgid "Something went wrong"
1990
  msgstr ""
1991
 
2496
  msgid "Update"
2497
  msgstr ""
2498
 
2499
+ #: admin/settings/pages/parts/Webhooks/Webhook.js:47
2500
  msgid "Are you sure you want to delete this webhook?"
2501
  msgstr ""
2502
 
2503
+ #: admin/settings/pages/parts/Webhooks/Webhook.js:57
2504
  msgid "Webhook deleted."
2505
  msgstr ""
2506
 
2507
+ #: admin/settings/pages/parts/Webhooks/Webhook.js:78
2508
  msgid "Untitled webhook"
2509
  msgstr ""
2510
 
presto-player.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Presto Player
5
  * Plugin URI: http://prestoplayer.com
6
  * Description: A beautiful, fast media player for WordPress.
7
- * Version: 1.10.0-beta1
8
  * Author: Presto Made, Inc
9
  * Author URI: https://prestoplayer.com/
10
  * Text Domain: presto-player
4
  * Plugin Name: Presto Player
5
  * Plugin URI: http://prestoplayer.com
6
  * Description: A beautiful, fast media player for WordPress.
7
+ * Version: 1.10.0
8
  * Author: Presto Made, Inc
9
  * Author URI: https://prestoplayer.com/
10
  * Text Domain: presto-player
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://prestoplayer.com
4
  Tags: video, audio, youtube, vimeo, lms, elementor, learndash, beaver builder, lifterlms
5
  Requires at least: 5.6
6
  Tested up to: 6.0
7
- Stable tag: 1.9.14
8
  Requires PHP: 7.3
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -150,8 +150,9 @@ It is also important to point out that BunnyNet has a $1 per month minimum.
150
 
151
  == Changelog ==
152
 
153
- = 1.10.0 - October 17, 2022 =
154
  * New: Webhooks for email capture.
 
155
  * Fix: CSS issue with classic bunny.net popup.
156
 
157
  = 1.9.14 - September 20, 2022 =
4
  Tags: video, audio, youtube, vimeo, lms, elementor, learndash, beaver builder, lifterlms
5
  Requires at least: 5.6
6
  Tested up to: 6.0
7
+ Stable tag: 1.10.0
8
  Requires PHP: 7.3
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
150
 
151
  == Changelog ==
152
 
153
+ = 1.10.0 - October 21, 2022 =
154
  * New: Webhooks for email capture.
155
+ * Fix: Issue with muted autoplay on iOS devices.
156
  * Fix: CSS issue with classic bunny.net popup.
157
 
158
  = 1.9.14 - September 20, 2022 =
src/admin/settings/pages/parts/Webhooks/Webhook.js CHANGED
@@ -41,8 +41,6 @@ export default ({ webhook: incomingWebhook }) => {
41
 
42
  const { name, url } = webhook || {};
43
 
44
- console.log({ isDeleting });
45
-
46
  const deleteWebhook = async () => {
47
  try {
48
  const r = confirm(
41
 
42
  const { name, url } = webhook || {};
43
 
 
 
44
  const deleteWebhook = async () => {
45
  try {
46
  const r = confirm(
vendor/composer/installed.php CHANGED
@@ -3,7 +3,7 @@
3
  'name' => 'course/player',
4
  'pretty_version' => 'dev-next',
5
  'version' => 'dev-next',
6
- 'reference' => 'c504ffdfb89afb910ec158f5f600da0371a7930f',
7
  'type' => 'project',
8
  'install_path' => __DIR__ . '/../../',
9
  'aliases' => array(),
@@ -31,7 +31,7 @@
31
  'course/player' => array(
32
  'pretty_version' => 'dev-next',
33
  'version' => 'dev-next',
34
- 'reference' => 'c504ffdfb89afb910ec158f5f600da0371a7930f',
35
  'type' => 'project',
36
  'install_path' => __DIR__ . '/../../',
37
  'aliases' => array(),
3
  'name' => 'course/player',
4
  'pretty_version' => 'dev-next',
5
  'version' => 'dev-next',
6
+ 'reference' => 'a4a07e51611c332011c2b96a29023b0343810116',
7
  'type' => 'project',
8
  'install_path' => __DIR__ . '/../../',
9
  'aliases' => array(),
31
  'course/player' => array(
32
  'pretty_version' => 'dev-next',
33
  'version' => 'dev-next',
34
+ 'reference' => 'a4a07e51611c332011c2b96a29023b0343810116',
35
  'type' => 'project',
36
  'install_path' => __DIR__ . '/../../',
37
  'aliases' => array(),