import { a as e, c as t, g as a } from "./alasql-f59e855e.js";
import r from "react";
import { c as o } from "./react-joyride-fd0eca79.js";
import { Q as n } from "./antd-eb0b81b8.js";
import { p as i } from "./fontawesome-7bcd29b1.js";
function s(e2, t2) {
  for (var a2 = 0; a2 < t2.length; a2++) {
    const r2 = t2[a2];
    if ("string" != typeof r2 && !Array.isArray(r2)) {
      for (const t3 in r2)
        if ("default" !== t3 && !(t3 in e2)) {
          const a3 = Object.getOwnPropertyDescriptor(r2, t3);
          a3 && Object.defineProperty(e2, t3, a3.get ? a3 : { enumerable: true, get: () => r2[t3] });
        }
    }
  }
  return Object.freeze(Object.defineProperty(e2, Symbol.toStringTag, { value: "Module" }));
}
function l(e2, t2) {
  e2.onload = function() {
    this.onerror = this.onload = null, t2(null, e2);
  }, e2.onerror = function() {
    this.onerror = this.onload = null, t2(new Error("Failed to load " + this.src), e2);
  };
}
function u(e2, t2) {
  e2.onreadystatechange = function() {
    "complete" != this.readyState && "loaded" != this.readyState || (this.onreadystatechange = null, t2(null, e2));
  };
}
var p = Object.create, d = Object.defineProperty, c = Object.getOwnPropertyDescriptor, y = Object.getOwnPropertyNames, h = Object.getPrototypeOf, f = Object.prototype.hasOwnProperty, m = (e2, t2, a2, r2) => {
  if (t2 && "object" == typeof t2 || "function" == typeof t2)
    for (let o2 of y(t2))
      f.call(e2, o2) || o2 === a2 || d(e2, o2, { get: () => t2[o2], enumerable: !(r2 = c(t2, o2)) || r2.enumerable });
  return e2;
}, P = (e2, t2, a2) => (a2 = null != e2 ? p(h(e2)) : {}, m(!t2 && e2 && e2.__esModule ? a2 : d(a2, "default", { value: e2, enumerable: true }), e2)), b = {};
((e2, t2) => {
  for (var a2 in t2)
    d(e2, a2, { get: t2[a2], enumerable: true });
})(b, { callPlayer: () => N, getConfig: () => z, getSDK: () => x, isBlobUrl: () => V, isMediaStream: () => H, lazy: () => k, omit: () => U, parseEndTime: () => R, parseStartTime: () => E, queryString: () => A, randomString: () => M, supportsWebKitPresentationMode: () => $ });
var g, w = (g = b, m(d({}, "__esModule", { value: true }), g)), v = P(r), O = P(function(e2, t2, a2) {
  var r2 = document.head || document.getElementsByTagName("head")[0], o2 = document.createElement("script");
  "function" == typeof t2 && (a2 = t2, t2 = {}), t2 = t2 || {}, a2 = a2 || function() {
  }, o2.type = t2.type || "text/javascript", o2.charset = t2.charset || "utf8", o2.async = !("async" in t2) || !!t2.async, o2.src = e2, t2.attrs && function(e3, t3) {
    for (var a3 in t3)
      e3.setAttribute(a3, t3[a3]);
  }(o2, t2.attrs), t2.text && (o2.text = "" + t2.text), ("onload" in o2 ? l : u)(o2, a2), o2.onload || l(o2, a2), r2.appendChild(o2);
}), _ = P(o);
const k = (e2) => v.default.lazy(async () => {
  const t2 = await e2();
  return "function" == typeof t2.default ? t2 : t2.default;
}), j = /[?&#](?:start|t)=([0-9hms]+)/, T = /[?&#]end=([0-9hms]+)/, S = /(\d+)(h|m|s)/g, C = /^\d+$/;
function I(e2, t2) {
  if (e2 instanceof Array)
    return;
  const a2 = e2.match(t2);
  if (a2) {
    const e3 = a2[1];
    if (e3.match(S))
      return function(e4) {
        let t3 = 0, a3 = S.exec(e4);
        for (; null !== a3; ) {
          const [, r2, o2] = a3;
          "h" === o2 && (t3 += 60 * parseInt(r2, 10) * 60), "m" === o2 && (t3 += 60 * parseInt(r2, 10)), "s" === o2 && (t3 += parseInt(r2, 10)), a3 = S.exec(e4);
        }
        return t3;
      }(e3);
    if (C.test(e3))
      return parseInt(e3);
  }
}
function E(e2) {
  return I(e2, j);
}
function R(e2) {
  return I(e2, T);
}
function M() {
  return Math.random().toString(36).substr(2, 5);
}
function A(e2) {
  return Object.keys(e2).map((t2) => `${t2}=${e2[t2]}`).join("&");
}
function L(e2) {
  return window[e2] ? window[e2] : window.exports && window.exports[e2] ? window.exports[e2] : window.module && window.module.exports && window.module.exports[e2] ? window.module.exports[e2] : null;
}
const D = {}, x = function(e2, t2, a2 = null, r2 = () => true, o2 = O.default) {
  const n2 = L(t2);
  return n2 && r2(n2) ? Promise.resolve(n2) : new Promise((r3, n3) => {
    if (D[e2])
      return void D[e2].push({ resolve: r3, reject: n3 });
    D[e2] = [{ resolve: r3, reject: n3 }];
    const i2 = (t3) => {
      D[e2].forEach((e3) => e3.resolve(t3));
    };
    if (a2) {
      const e3 = window[a2];
      window[a2] = function() {
        e3 && e3(), i2(L(t2));
      };
    }
    o2(e2, (r4) => {
      r4 ? (D[e2].forEach((e3) => e3.reject(r4)), D[e2] = null) : a2 || i2(L(t2));
    });
  });
};
function z(e2, t2) {
  return (0, _.default)(t2.config, e2.config);
}
function U(e2, ...t2) {
  const a2 = [].concat(...t2), r2 = {}, o2 = Object.keys(e2);
  for (const t3 of o2)
    -1 === a2.indexOf(t3) && (r2[t3] = e2[t3]);
  return r2;
}
function N(e2, ...t2) {
  return this.player && this.player[e2] ? this.player[e2](...t2) : null;
}
function H(e2) {
  return "undefined" != typeof window && void 0 !== window.MediaStream && e2 instanceof window.MediaStream;
}
function V(e2) {
  return /^blob:/.test(e2);
}
function $(e2 = document.createElement("video")) {
  const t2 = false === /iPhone|iPod/.test(navigator.userAgent);
  return e2.webkitSupportsPresentationMode && "function" == typeof e2.webkitSetPresentationMode && t2;
}
var F = Object.defineProperty, B = Object.getOwnPropertyDescriptor, K = Object.getOwnPropertyNames, W = Object.prototype.hasOwnProperty, X = {};
((e2, t2) => {
  for (var a2 in t2)
    F(e2, a2, { get: t2[a2], enumerable: true });
})(X, { AUDIO_EXTENSIONS: () => pe, DASH_EXTENSIONS: () => ye, FLV_EXTENSIONS: () => he, HLS_EXTENSIONS: () => ce, MATCH_URL_DAILYMOTION: () => ie, MATCH_URL_FACEBOOK: () => ee, MATCH_URL_FACEBOOK_WATCH: () => te, MATCH_URL_KALTURA: () => ue, MATCH_URL_MIXCLOUD: () => se, MATCH_URL_MUX: () => G, MATCH_URL_SOUNDCLOUD: () => Q, MATCH_URL_STREAMABLE: () => ae, MATCH_URL_TWITCH_CHANNEL: () => ne, MATCH_URL_TWITCH_VIDEO: () => oe, MATCH_URL_VIDYARD: () => le, MATCH_URL_VIMEO: () => J, MATCH_URL_WISTIA: () => re, MATCH_URL_YOUTUBE: () => q, VIDEO_EXTENSIONS: () => de, canPlay: () => me });
var Y = ((e2) => ((e3, t2, a2, r2) => {
  if (t2 && "object" == typeof t2 || "function" == typeof t2)
    for (let o2 of K(t2))
      W.call(e3, o2) || o2 === a2 || F(e3, o2, { get: () => t2[o2], enumerable: !(r2 = B(t2, o2)) || r2.enumerable });
  return e3;
})(F({}, "__esModule", { value: true }), e2))(X), Z = w;
const q = /(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//, Q = /(?:soundcloud\.com|snd\.sc)\/[^.]+$/, J = /vimeo\.com\/(?!progressive_redirect).+/, G = /stream\.mux\.com\/(?!\w+\.m3u8)(\w+)/, ee = /^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/, te = /^https?:\/\/fb\.watch\/.+$/, ae = /streamable\.com\/([a-z0-9]+)$/, re = /(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/, oe = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/, ne = /(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/, ie = /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:[\w.#_-]+)?/, se = /mixcloud\.com\/([^/]+\/[^/]+)/, le = /vidyard.com\/(?:watch\/)?([a-zA-Z0-9-_]+)/, ue = /^https?:\/\/[a-zA-Z]+\.kaltura.(com|org)\/p\/([0-9]+)\/sp\/([0-9]+)00\/embedIframeJs\/uiconf_id\/([0-9]+)\/partner_id\/([0-9]+)(.*)entry_id.([a-zA-Z0-9-_].*)$/, pe = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i, de = /\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i, ce = /\.(m3u8)($|\?)/i, ye = /\.(mpd)($|\?)/i, he = /\.(flv)($|\?)/i, fe = (e2) => {
  if (e2 instanceof Array) {
    for (const t2 of e2) {
      if ("string" == typeof t2 && fe(t2))
        return true;
      if (fe(t2.src))
        return true;
    }
    return false;
  }
  return !(!(0, Z.isMediaStream)(e2) && !(0, Z.isBlobUrl)(e2)) || (pe.test(e2) || de.test(e2) || ce.test(e2) || ye.test(e2) || he.test(e2));
}, me = { youtube: (e2) => e2 instanceof Array ? e2.every((e3) => q.test(e3)) : q.test(e2), soundcloud: (e2) => Q.test(e2) && !pe.test(e2), vimeo: (e2) => J.test(e2) && !de.test(e2) && !ce.test(e2), mux: (e2) => G.test(e2), facebook: (e2) => ee.test(e2) || te.test(e2), streamable: (e2) => ae.test(e2), wistia: (e2) => re.test(e2), twitch: (e2) => oe.test(e2) || ne.test(e2), dailymotion: (e2) => ie.test(e2), mixcloud: (e2) => se.test(e2), vidyard: (e2) => le.test(e2), kaltura: (e2) => ue.test(e2), file: fe };
var Pe = Object.defineProperty, be = Object.getOwnPropertyDescriptor, ge = Object.getOwnPropertyNames, we = Object.prototype.hasOwnProperty, ve = {};
((e2, t2) => {
  for (var a2 in t2)
    Pe(e2, a2, { get: t2[a2], enumerable: true });
})(ve, { default: () => je });
var Oe = ((e2) => ((e3, t2, a2, r2) => {
  if (t2 && "object" == typeof t2 || "function" == typeof t2)
    for (let o2 of ge(t2))
      we.call(e3, o2) || o2 === a2 || Pe(e3, o2, { get: () => t2[o2], enumerable: !(r2 = be(t2, o2)) || r2.enumerable });
  return e3;
})(Pe({}, "__esModule", { value: true }), e2))(ve), _e = w, ke = Y, je = [{ key: "youtube", name: "YouTube", canPlay: ke.canPlay.youtube, lazyPlayer: (0, _e.lazy)(() => import("./YouTube-c7d3b68f.js").then((e2) => e2.Y)) }, { key: "soundcloud", name: "SoundCloud", canPlay: ke.canPlay.soundcloud, lazyPlayer: (0, _e.lazy)(() => import("./SoundCloud-87026d18.js").then((e2) => e2.S)) }, { key: "vimeo", name: "Vimeo", canPlay: ke.canPlay.vimeo, lazyPlayer: (0, _e.lazy)(() => import("./Vimeo-efff01ad.js").then((e2) => e2.V)) }, { key: "mux", name: "Mux", canPlay: ke.canPlay.mux, lazyPlayer: (0, _e.lazy)(() => import("./Mux-d268bcf4.js").then((e2) => e2.M)) }, { key: "facebook", name: "Facebook", canPlay: ke.canPlay.facebook, lazyPlayer: (0, _e.lazy)(() => import("./Facebook-9b345327.js").then((e2) => e2.F)) }, { key: "streamable", name: "Streamable", canPlay: ke.canPlay.streamable, lazyPlayer: (0, _e.lazy)(() => import("./Streamable-df07ff7e.js").then((e2) => e2.S)) }, { key: "wistia", name: "Wistia", canPlay: ke.canPlay.wistia, lazyPlayer: (0, _e.lazy)(() => import("./Wistia-28755e1f.js").then((e2) => e2.W)) }, { key: "twitch", name: "Twitch", canPlay: ke.canPlay.twitch, lazyPlayer: (0, _e.lazy)(() => import("./Twitch-1b70b326.js").then((e2) => e2.T)) }, { key: "dailymotion", name: "DailyMotion", canPlay: ke.canPlay.dailymotion, lazyPlayer: (0, _e.lazy)(() => import("./DailyMotion-8509ec61.js").then((e2) => e2.D)) }, { key: "mixcloud", name: "Mixcloud", canPlay: ke.canPlay.mixcloud, lazyPlayer: (0, _e.lazy)(() => import("./Mixcloud-845eb13e.js").then((e2) => e2.M)) }, { key: "vidyard", name: "Vidyard", canPlay: ke.canPlay.vidyard, lazyPlayer: (0, _e.lazy)(() => import("./Vidyard-89e1c23e.js").then((e2) => e2.V)) }, { key: "kaltura", name: "Kaltura", canPlay: ke.canPlay.kaltura, lazyPlayer: (0, _e.lazy)(() => import("./Kaltura-63775a1d.js").then((e2) => e2.K)) }, { key: "file", name: "FilePlayer", canPlay: ke.canPlay.file, canEnablePIP: (e2) => ke.canPlay.file(e2) && (document.pictureInPictureEnabled || (0, _e.supportsWebKitPresentationMode)()) && !ke.AUDIO_EXTENSIONS.test(e2), lazyPlayer: (0, _e.lazy)(() => import("./FilePlayer-995ab735.js").then((e2) => e2.F)) }], Te = Number.isNaN || function(e2) {
  return "number" == typeof e2 && e2 != e2;
};
function Se(e2, t2) {
  return e2 === t2 || !(!Te(e2) || !Te(t2));
}
function Ce(e2, t2) {
  if (e2.length !== t2.length)
    return false;
  for (var a2 = 0; a2 < e2.length; a2++)
    if (!Se(e2[a2], t2[a2]))
      return false;
  return true;
}
const Ie = Object.freeze(Object.defineProperty({ __proto__: null, default: function(e2, t2) {
  var a2;
  void 0 === t2 && (t2 = Ce);
  var r2, o2 = [], n2 = false;
  return function() {
    for (var i2 = [], s2 = 0; s2 < arguments.length; s2++)
      i2[s2] = arguments[s2];
    return n2 && a2 === this && t2(i2, o2) || (r2 = e2.apply(this, i2), n2 = true, a2 = this, o2 = i2), r2;
  };
} }, Symbol.toStringTag, { value: "Module" })), Ee = e(Ie);
var Re = Object.create, Me = Object.defineProperty, Ae = Object.getOwnPropertyDescriptor, Le = Object.getOwnPropertyNames, De = Object.getPrototypeOf, xe = Object.prototype.hasOwnProperty, ze = (e2, t2, a2, r2) => {
  if (t2 && "object" == typeof t2 || "function" == typeof t2)
    for (let o2 of Le(t2))
      xe.call(e2, o2) || o2 === a2 || Me(e2, o2, { get: () => t2[o2], enumerable: !(r2 = Ae(t2, o2)) || r2.enumerable });
  return e2;
}, Ue = {};
((e2, t2) => {
  for (var a2 in t2)
    Me(e2, a2, { get: t2[a2], enumerable: true });
})(Ue, { defaultProps: () => Je, propTypes: () => qe });
var Ne = ((e2) => ze(Me({}, "__esModule", { value: true }), e2))(Ue), He = ((e2, t2, a2) => (a2 = null != e2 ? Re(De(e2)) : {}, ze(!t2 && e2 && e2.__esModule ? a2 : Me(a2, "default", { value: e2, enumerable: true }), e2)))(i);
const { string: Ve, bool: $e, number: Fe, array: Be, oneOfType: Ke, shape: We, object: Xe, func: Ye, node: Ze } = He.default, qe = { url: Ke([Ve, Be, Xe]), playing: $e, loop: $e, controls: $e, volume: Fe, muted: $e, playbackRate: Fe, width: Ke([Ve, Fe]), height: Ke([Ve, Fe]), style: Xe, progressInterval: Fe, playsinline: $e, pip: $e, stopOnUnmount: $e, light: Ke([$e, Ve, Xe]), playIcon: Ze, previewTabIndex: Fe, previewAriaLabel: Ve, fallback: Ze, oEmbedUrl: Ve, wrapper: Ke([Ve, Ye, We({ render: Ye.isRequired })]), config: We({ soundcloud: We({ options: Xe }), youtube: We({ playerVars: Xe, embedOptions: Xe, onUnstarted: Ye }), facebook: We({ appId: Ve, version: Ve, playerId: Ve, attributes: Xe }), dailymotion: We({ params: Xe }), vimeo: We({ playerOptions: Xe, title: Ve }), mux: We({ attributes: Xe, version: Ve }), file: We({ attributes: Xe, tracks: Be, forceVideo: $e, forceAudio: $e, forceHLS: $e, forceSafariHLS: $e, forceDisableHls: $e, forceDASH: $e, forceFLV: $e, hlsOptions: Xe, hlsVersion: Ve, dashVersion: Ve, flvVersion: Ve }), wistia: We({ options: Xe, playerId: Ve, customControls: Be }), mixcloud: We({ options: Xe }), twitch: We({ options: Xe, playerId: Ve }), vidyard: We({ options: Xe }) }), onReady: Ye, onStart: Ye, onPlay: Ye, onPause: Ye, onBuffer: Ye, onBufferEnd: Ye, onEnded: Ye, onError: Ye, onDuration: Ye, onSeek: Ye, onPlaybackRateChange: Ye, onPlaybackQualityChange: Ye, onProgress: Ye, onClickPreview: Ye, onEnablePIP: Ye, onDisablePIP: Ye }, Qe = () => {
}, Je = { playing: false, loop: false, controls: false, volume: null, muted: false, playbackRate: 1, width: "640px", height: "360px", style: {}, progressInterval: 1e3, playsinline: false, pip: false, stopOnUnmount: true, light: false, fallback: null, wrapper: "div", previewTabIndex: 0, previewAriaLabel: "", oEmbedUrl: "https://noembed.com/embed?url={url}", config: { soundcloud: { options: { visual: true, buying: false, liking: false, download: false, sharing: false, show_comments: false, show_playcount: false } }, youtube: { playerVars: { playsinline: 1, showinfo: 0, rel: 0, iv_load_policy: 3, modestbranding: 1 }, embedOptions: {}, onUnstarted: Qe }, facebook: { appId: "1309697205772819", version: "v3.3", playerId: null, attributes: {} }, dailymotion: { params: { api: 1, "endscreen-enable": false } }, vimeo: { playerOptions: { autopause: false, byline: false, portrait: false, title: false }, title: null }, mux: { attributes: {}, version: "2" }, file: { attributes: {}, tracks: [], forceVideo: false, forceAudio: false, forceHLS: false, forceDASH: false, forceFLV: false, hlsOptions: {}, hlsVersion: "1.1.4", dashVersion: "3.1.3", flvVersion: "1.5.0", forceDisableHls: false }, wistia: { options: {}, playerId: null, customControls: null }, mixcloud: { options: { hide_cover: 1 } }, twitch: { options: {}, playerId: null }, vidyard: { options: {} } }, onReady: Qe, onStart: Qe, onPlay: Qe, onPause: Qe, onBuffer: Qe, onBufferEnd: Qe, onEnded: Qe, onError: Qe, onDuration: Qe, onSeek: Qe, onPlaybackRateChange: Qe, onPlaybackQualityChange: Qe, onProgress: Qe, onClickPreview: Qe, onEnablePIP: Qe, onDisablePIP: Qe };
var Ge = Object.create, et = Object.defineProperty, tt = Object.getOwnPropertyDescriptor, at = Object.getOwnPropertyNames, rt = Object.getPrototypeOf, ot = Object.prototype.hasOwnProperty, nt = (e2, t2, a2, r2) => {
  if (t2 && "object" == typeof t2 || "function" == typeof t2)
    for (let o2 of at(t2))
      ot.call(e2, o2) || o2 === a2 || et(e2, o2, { get: () => t2[o2], enumerable: !(r2 = tt(t2, o2)) || r2.enumerable });
  return e2;
}, it = (e2, t2, a2) => (a2 = null != e2 ? Ge(rt(e2)) : {}, nt(!t2 && e2 && e2.__esModule ? a2 : et(a2, "default", { value: e2, enumerable: true }), e2)), st = (e2, t2, a2) => (((e3, t3, a3) => {
  t3 in e3 ? et(e3, t3, { enumerable: true, configurable: true, writable: true, value: a3 }) : e3[t3] = a3;
})(e2, "symbol" != typeof t2 ? t2 + "" : t2, a2), a2), lt = {};
((e2, t2) => {
  for (var a2 in t2)
    et(e2, a2, { get: t2[a2], enumerable: true });
})(lt, { default: () => ht });
var ut = ((e2) => nt(et({}, "__esModule", { value: true }), e2))(lt), pt = it(r), dt = it(n), ct = Ne, yt = w;
class ht extends pt.Component {
  constructor() {
    super(...arguments), st(this, "mounted", false), st(this, "isReady", false), st(this, "isPlaying", false), st(this, "isLoading", true), st(this, "loadOnReady", null), st(this, "startOnPlay", true), st(this, "seekOnPlay", null), st(this, "onDurationCalled", false), st(this, "handlePlayerMount", (e2) => {
      this.player || (this.player = e2, this.player.load(this.props.url)), this.progress();
    }), st(this, "getInternalPlayer", (e2) => this.player ? this.player[e2] : null), st(this, "progress", () => {
      if (this.props.url && this.player && this.isReady) {
        const e2 = this.getCurrentTime() || 0, t2 = this.getSecondsLoaded(), a2 = this.getDuration();
        if (a2) {
          const r2 = { playedSeconds: e2, played: e2 / a2 };
          null !== t2 && (r2.loadedSeconds = t2, r2.loaded = t2 / a2), r2.playedSeconds === this.prevPlayed && r2.loadedSeconds === this.prevLoaded || this.props.onProgress(r2), this.prevPlayed = r2.playedSeconds, this.prevLoaded = r2.loadedSeconds;
        }
      }
      this.progressTimeout = setTimeout(this.progress, this.props.progressFrequency || this.props.progressInterval);
    }), st(this, "handleReady", () => {
      if (!this.mounted)
        return;
      this.isReady = true, this.isLoading = false;
      const { onReady: e2, playing: t2, volume: a2, muted: r2 } = this.props;
      e2(), r2 || null === a2 || this.player.setVolume(a2), this.loadOnReady ? (this.player.load(this.loadOnReady, true), this.loadOnReady = null) : t2 && this.player.play(), this.handleDurationCheck();
    }), st(this, "handlePlay", () => {
      this.isPlaying = true, this.isLoading = false;
      const { onStart: e2, onPlay: t2, playbackRate: a2 } = this.props;
      this.startOnPlay && (this.player.setPlaybackRate && 1 !== a2 && this.player.setPlaybackRate(a2), e2(), this.startOnPlay = false), t2(), this.seekOnPlay && (this.seekTo(this.seekOnPlay), this.seekOnPlay = null), this.handleDurationCheck();
    }), st(this, "handlePause", (e2) => {
      this.isPlaying = false, this.isLoading || this.props.onPause(e2);
    }), st(this, "handleEnded", () => {
      const { activePlayer: e2, loop: t2, onEnded: a2 } = this.props;
      e2.loopOnEnded && t2 && this.seekTo(0), t2 || (this.isPlaying = false, a2());
    }), st(this, "handleError", (...e2) => {
      this.isLoading = false, this.props.onError(...e2);
    }), st(this, "handleDurationCheck", () => {
      clearTimeout(this.durationCheckTimeout);
      const e2 = this.getDuration();
      e2 ? this.onDurationCalled || (this.props.onDuration(e2), this.onDurationCalled = true) : this.durationCheckTimeout = setTimeout(this.handleDurationCheck, 100);
    }), st(this, "handleLoaded", () => {
      this.isLoading = false;
    });
  }
  componentDidMount() {
    this.mounted = true;
  }
  componentWillUnmount() {
    clearTimeout(this.progressTimeout), clearTimeout(this.durationCheckTimeout), this.isReady && this.props.stopOnUnmount && (this.player.stop(), this.player.disablePIP && this.player.disablePIP()), this.mounted = false;
  }
  componentDidUpdate(e2) {
    if (!this.player)
      return;
    const { url: t2, playing: a2, volume: r2, muted: o2, playbackRate: n2, pip: i2, loop: s2, activePlayer: l2, disableDeferredLoading: u2 } = this.props;
    if (!(0, dt.default)(e2.url, t2)) {
      if (this.isLoading && !l2.forceLoad && !u2 && !(0, yt.isMediaStream)(t2))
        return void (this.loadOnReady = t2);
      this.isLoading = true, this.startOnPlay = true, this.onDurationCalled = false, this.player.load(t2, this.isReady);
    }
    e2.playing || !a2 || this.isPlaying || this.player.play(), e2.playing && !a2 && this.isPlaying && this.player.pause(), !e2.pip && i2 && this.player.enablePIP && this.player.enablePIP(), e2.pip && !i2 && this.player.disablePIP && this.player.disablePIP(), e2.volume !== r2 && null !== r2 && this.player.setVolume(r2), e2.muted !== o2 && (o2 ? this.player.mute() : (this.player.unmute(), null !== r2 && setTimeout(() => this.player.setVolume(r2)))), e2.playbackRate !== n2 && this.player.setPlaybackRate && this.player.setPlaybackRate(n2), e2.loop !== s2 && this.player.setLoop && this.player.setLoop(s2);
  }
  getDuration() {
    return this.isReady ? this.player.getDuration() : null;
  }
  getCurrentTime() {
    return this.isReady ? this.player.getCurrentTime() : null;
  }
  getSecondsLoaded() {
    return this.isReady ? this.player.getSecondsLoaded() : null;
  }
  seekTo(e2, t2, a2) {
    if (!this.isReady)
      return void (0 !== e2 && (this.seekOnPlay = e2, setTimeout(() => {
        this.seekOnPlay = null;
      }, 5e3)));
    if (t2 ? "fraction" === t2 : e2 > 0 && e2 < 1) {
      const t3 = this.player.getDuration();
      if (!t3)
        return;
      return void this.player.seekTo(t3 * e2, a2);
    }
    this.player.seekTo(e2, a2);
  }
  render() {
    const e2 = this.props.activePlayer;
    return e2 ? pt.default.createElement(e2, { ...this.props, onMount: this.handlePlayerMount, onReady: this.handleReady, onPlay: this.handlePlay, onPause: this.handlePause, onEnded: this.handleEnded, onLoaded: this.handleLoaded, onError: this.handleError }) : null;
  }
}
st(ht, "displayName", "Player"), st(ht, "propTypes", ct.propTypes), st(ht, "defaultProps", ct.defaultProps);
var ft = Object.create, mt = Object.defineProperty, Pt = Object.getOwnPropertyDescriptor, bt = Object.getOwnPropertyNames, gt = Object.getPrototypeOf, wt = Object.prototype.hasOwnProperty, vt = (e2, t2, a2, r2) => {
  if (t2 && "object" == typeof t2 || "function" == typeof t2)
    for (let o2 of bt(t2))
      wt.call(e2, o2) || o2 === a2 || mt(e2, o2, { get: () => t2[o2], enumerable: !(r2 = Pt(t2, o2)) || r2.enumerable });
  return e2;
}, Ot = (e2, t2, a2) => (a2 = null != e2 ? ft(gt(e2)) : {}, vt(!t2 && e2 && e2.__esModule ? a2 : mt(a2, "default", { value: e2, enumerable: true }), e2)), _t = (e2, t2, a2) => (((e3, t3, a3) => {
  t3 in e3 ? mt(e3, t3, { enumerable: true, configurable: true, writable: true, value: a3 }) : e3[t3] = a3;
})(e2, "symbol" != typeof t2 ? t2 + "" : t2, a2), a2), kt = {};
((e2, t2) => {
  for (var a2 in t2)
    mt(e2, a2, { get: t2[a2], enumerable: true });
})(kt, { createReactPlayer: () => Nt });
var jt = ((e2) => vt(mt({}, "__esModule", { value: true }), e2))(kt), Tt = Ot(r), St = Ot(o), Ct = Ot(Ee), It = Ot(n), Et = Ne, Rt = w, Mt = Ot(ut);
const At = (0, Rt.lazy)(() => import("./Preview-394bd832.js").then((e2) => e2.P)), Lt = "undefined" != typeof window && window.document && "undefined" != typeof document, Dt = void 0 !== t && t.window && t.window.document, xt = Object.keys(Et.propTypes), zt = Lt || Dt ? Tt.Suspense : () => null, Ut = [], Nt = (e2, t2) => {
  var a2;
  return a2 = class extends Tt.Component {
    constructor() {
      super(...arguments), _t(this, "state", { showPreview: !!this.props.light }), _t(this, "references", { wrapper: (e3) => {
        this.wrapper = e3;
      }, player: (e3) => {
        this.player = e3;
      } }), _t(this, "handleClickPreview", (e3) => {
        this.setState({ showPreview: false }), this.props.onClickPreview(e3);
      }), _t(this, "showPreview", () => {
        this.setState({ showPreview: true });
      }), _t(this, "getDuration", () => this.player ? this.player.getDuration() : null), _t(this, "getCurrentTime", () => this.player ? this.player.getCurrentTime() : null), _t(this, "getSecondsLoaded", () => this.player ? this.player.getSecondsLoaded() : null), _t(this, "getInternalPlayer", (e3 = "player") => this.player ? this.player.getInternalPlayer(e3) : null), _t(this, "seekTo", (e3, t3, a3) => {
        if (!this.player)
          return null;
        this.player.seekTo(e3, t3, a3);
      }), _t(this, "handleReady", () => {
        this.props.onReady(this);
      }), _t(this, "getActivePlayer", (0, Ct.default)((a3) => {
        for (const t3 of [...Ut, ...e2])
          if (t3.canPlay(a3))
            return t3;
        return t2 || null;
      })), _t(this, "getConfig", (0, Ct.default)((e3, t3) => {
        const { config: a3 } = this.props;
        return St.default.all([Et.defaultProps.config, Et.defaultProps.config[t3] || {}, a3, a3[t3] || {}]);
      })), _t(this, "getAttributes", (0, Ct.default)((e3) => (0, Rt.omit)(this.props, xt))), _t(this, "renderActivePlayer", (e3) => {
        if (!e3)
          return null;
        const t3 = this.getActivePlayer(e3);
        if (!t3)
          return null;
        const a3 = this.getConfig(e3, t3.key);
        return Tt.default.createElement(Mt.default, { ...this.props, key: t3.key, ref: this.references.player, config: a3, activePlayer: t3.lazyPlayer || t3, onReady: this.handleReady });
      });
    }
    shouldComponentUpdate(e3, t3) {
      return !(0, It.default)(this.props, e3) || !(0, It.default)(this.state, t3);
    }
    componentDidUpdate(e3) {
      const { light: t3 } = this.props;
      !e3.light && t3 && this.setState({ showPreview: true }), e3.light && !t3 && this.setState({ showPreview: false });
    }
    renderPreview(e3) {
      if (!e3)
        return null;
      const { light: t3, playIcon: a3, previewTabIndex: r2, oEmbedUrl: o2, previewAriaLabel: n2 } = this.props;
      return Tt.default.createElement(At, { url: e3, light: t3, playIcon: a3, previewTabIndex: r2, previewAriaLabel: n2, oEmbedUrl: o2, onClick: this.handleClickPreview });
    }
    render() {
      const { url: e3, style: t3, width: a3, height: r2, fallback: o2, wrapper: n2 } = this.props, { showPreview: i2 } = this.state, s2 = this.getAttributes(e3), l2 = "string" == typeof n2 ? this.references.wrapper : void 0;
      return Tt.default.createElement(n2, { ref: l2, style: { ...t3, width: a3, height: r2 }, ...s2 }, Tt.default.createElement(zt, { fallback: o2 }, i2 ? this.renderPreview(e3) : this.renderActivePlayer(e3)));
    }
  }, _t(a2, "displayName", "ReactPlayer"), _t(a2, "propTypes", Et.propTypes), _t(a2, "defaultProps", Et.defaultProps), _t(a2, "addCustomPlayer", (e3) => {
    Ut.push(e3);
  }), _t(a2, "removeCustomPlayers", () => {
    Ut.length = 0;
  }), _t(a2, "canPlay", (t3) => {
    for (const a3 of [...Ut, ...e2])
      if (a3.canPlay(t3))
        return true;
    return false;
  }), _t(a2, "canEnablePIP", (t3) => {
    for (const a3 of [...Ut, ...e2])
      if (a3.canEnablePIP && a3.canEnablePIP(t3))
        return true;
    return false;
  }), a2;
};
var Ht = Object.create, Vt = Object.defineProperty, $t = Object.getOwnPropertyDescriptor, Ft = Object.getOwnPropertyNames, Bt = Object.getPrototypeOf, Kt = Object.prototype.hasOwnProperty, Wt = (e2, t2, a2, r2) => {
  if (t2 && "object" == typeof t2 || "function" == typeof t2)
    for (let o2 of Ft(t2))
      Kt.call(e2, o2) || o2 === a2 || Vt(e2, o2, { get: () => t2[o2], enumerable: !(r2 = $t(t2, o2)) || r2.enumerable });
  return e2;
}, Xt = {};
((e2, t2) => {
  for (var a2 in t2)
    Vt(e2, a2, { get: t2[a2], enumerable: true });
})(Xt, { default: () => Jt });
var Yt = ((e2) => Wt(Vt({}, "__esModule", { value: true }), e2))(Xt), Zt = ((e2, t2, a2) => (a2 = null != e2 ? Ht(Bt(e2)) : {}, Wt(!t2 && e2 && e2.__esModule ? a2 : Vt(a2, "default", { value: e2, enumerable: true }), e2)))(Oe), qt = jt;
const Qt = Zt.default[Zt.default.length - 1];
var Jt = (0, qt.createReactPlayer)(Zt.default, Qt);
const Gt = s({ __proto__: null, default: a(Yt) }, [Yt]);
export {
  Gt as i,
  Y as p,
  w as u
};
