import { u as N } from "./utils.mjs";
var c = Object.defineProperty, y = Object.getOwnPropertyDescriptor, b = Object.getOwnPropertyNames, f = Object.prototype.hasOwnProperty, D = (t, e) => {
  for (var _ in e)
    c(t, _, { get: e[_], enumerable: !0 });
}, h = (t, e, _, A) => {
  if (e && typeof e == "object" || typeof e == "function")
    for (let o of b(e))
      !f.call(t, o) && o !== _ && c(t, o, { get: () => e[o], enumerable: !(A = y(e, o)) || A.enumerable });
  return t;
}, l = (t) => h(c({}, "__esModule", { value: !0 }), t), m = {};
D(m, {
  AUDIO_EXTENSIONS: () => r,
  DASH_EXTENSIONS: () => v,
  FLV_EXTENSIONS: () => S,
  HLS_EXTENSIONS: () => n,
  MATCH_URL_DAILYMOTION: () => I,
  MATCH_URL_FACEBOOK: () => L,
  MATCH_URL_FACEBOOK_WATCH: () => p,
  MATCH_URL_KALTURA: () => u,
  MATCH_URL_MIXCLOUD: () => R,
  MATCH_URL_MUX: () => U,
  MATCH_URL_SOUNDCLOUD: () => O,
  MATCH_URL_STREAMABLE: () => H,
  MATCH_URL_TWITCH_CHANNEL: () => E,
  MATCH_URL_TWITCH_VIDEO: () => w,
  MATCH_URL_VIDYARD: () => d,
  MATCH_URL_VIMEO: () => C,
  MATCH_URL_WISTIA: () => M,
  MATCH_URL_YOUTUBE: () => s,
  VIDEO_EXTENSIONS: () => i,
  canPlay: () => g
});
var P = l(m), T = N;
const s = /(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//, O = /(?:soundcloud\.com|snd\.sc)\/[^.]+$/, C = /vimeo\.com\/(?!progressive_redirect).+/, U = /stream\.mux\.com\/(?!\w+\.m3u8)(\w+)/, L = /^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/, p = /^https?:\/\/fb\.watch\/.+$/, H = /streamable\.com\/([a-z0-9]+)$/, M = /(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/, w = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/, E = /(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/, I = /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:[\w.#_-]+)?/, R = /mixcloud\.com\/([^/]+\/[^/]+)/, d = /vidyard.com\/(?:watch\/)?([a-zA-Z0-9-_]+)/, u = /^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-_].*)$/, r = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i, i = /\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i, n = /\.(m3u8)($|\?)/i, v = /\.(mpd)($|\?)/i, S = /\.(flv)($|\?)/i, a = (t) => {
  if (t instanceof Array) {
    for (const e of t)
      if (typeof e == "string" && a(e) || a(e.src))
        return !0;
    return !1;
  }
  return (0, T.isMediaStream)(t) || (0, T.isBlobUrl)(t) ? !0 : r.test(t) || i.test(t) || n.test(t) || v.test(t) || S.test(t);
}, g = {
  youtube: (t) => t instanceof Array ? t.every((e) => s.test(e)) : s.test(t),
  soundcloud: (t) => O.test(t) && !r.test(t),
  vimeo: (t) => C.test(t) && !i.test(t) && !n.test(t),
  mux: (t) => U.test(t),
  facebook: (t) => L.test(t) || p.test(t),
  streamable: (t) => H.test(t),
  wistia: (t) => M.test(t),
  twitch: (t) => w.test(t) || E.test(t),
  dailymotion: (t) => I.test(t),
  mixcloud: (t) => R.test(t),
  vidyard: (t) => d.test(t),
  kaltura: (t) => u.test(t),
  file: a
};
export {
  P as p
};
//# sourceMappingURL=patterns.mjs.map
