import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
import { E as t, F as n, L as r, at as i } from "./vidstack-D9mvYVIz-DesuYgKV.js";
import { Fragment as a, computed as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, defineComponent as u, openBlock as d, toRef as f } from "vue";
//#region node_modules/vidstack/prod/chunks/vidstack-Dtnbh_MF.js
var p = navigator?.userAgent.toLowerCase() || "", m = /iphone|ipad|ipod|ios|crios|fxios/i.test(p), h = /(iphone|ipod)/gi.test(navigator?.platform || ""), g = !!window.chrome;
/crios/i.test(p);
var _ = !!window.safari || m;
function v() {
	return y() && t(screen.orientation.unlock);
}
function y() {
	return !r(window.screen.orientation) && !r(window.screen.orientation.lock);
}
function b(e, t) {
	return e ||= document.createElement("audio"), e.canPlayType(t).length > 0;
}
function x(e, t) {
	return e ||= document.createElement("video"), e.canPlayType(t).length > 0;
}
function S(e) {
	return e ||= document.createElement("video"), e.canPlayType("application/vnd.apple.mpegurl").length > 0;
}
function C(e) {
	return !!document.pictureInPictureEnabled && !e?.disablePictureInPicture;
}
function w(e) {
	return t(e?.webkitSupportsPresentationMode) && t(e?.webkitSetPresentationMode);
}
async function T() {
	let e = document.createElement("video");
	return e.volume = .5, await i(0), e.volume === .5;
}
function E() {
	return window?.ManagedMediaSource ?? window?.MediaSource ?? window?.WebKitMediaSource;
}
function D() {
	return window?.SourceBuffer ?? window?.WebKitSourceBuffer;
}
function O() {
	let e = E();
	if (r(e)) return !1;
	let n = e && t(e.isTypeSupported) && e.isTypeSupported("video/mp4; codecs=\"avc1.42E01E,mp4a.40.2\""), i = D(), a = r(i) || !r(i.prototype) && t(i.prototype.appendBuffer) && t(i.prototype.remove);
	return !!n && !!a;
}
function k() {
	return O();
}
var A = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx|flac)($|\?)/i, j = /* @__PURE__ */ new Set([
	"audio/mpeg",
	"audio/ogg",
	"audio/3gp",
	"audio/mp3",
	"audio/webm",
	"audio/flac",
	"audio/m4a",
	"audio/m4b",
	"audio/mp4a",
	"audio/mp4"
]), M = /\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i, N = /* @__PURE__ */ new Set([
	"video/mp4",
	"video/webm",
	"video/3gp",
	"video/ogg",
	"video/avi",
	"video/mpeg"
]), P = /\.(m3u8)($|\?)/i, F = /\.(mpd)($|\?)/i, I = /* @__PURE__ */ new Set([
	"application/vnd.apple.mpegurl",
	"audio/mpegurl",
	"audio/x-mpegurl",
	"application/x-mpegurl",
	"video/x-mpegurl",
	"video/mpegurl",
	"application/mpegurl"
]), L = /* @__PURE__ */ new Set(["application/dash+xml"]);
function R({ src: e, type: t }) {
	return n(e) ? A.test(e) || j.has(t) || e.startsWith("blob:") && t === "audio/object" : t === "audio/object";
}
function z(e) {
	return n(e.src) ? M.test(e.src) || N.has(e.type) || e.src.startsWith("blob:") && e.type === "video/object" || B(e) && S() : e.type === "video/object";
}
function B({ src: e, type: t }) {
	return n(e) && P.test(e) || I.has(t);
}
function V({ src: e, type: t }) {
	return n(e) && F.test(e) || L.has(t);
}
function H(e) {
	return n(e.src) && (R(e) || z(e) || B(e) || V(e));
}
function U(e) {
	return window.MediaStream !== void 0 && e instanceof window.MediaStream;
}
//#endregion
//#region src/components/wt-vidstack-player/components/panels/playback-controls-panel/components/time-group.vue?vue&type=script&setup=true&lang.ts
var W = { class: "time-group" }, G = {
	key: 0,
	type: "current",
	remainder: ""
}, K = /*#__PURE__*/ e(/* @__PURE__ */ u({
	__name: "time-group",
	props: { countdown: {
		type: Boolean,
		default: !1
	} },
	setup(e) {
		let t = e;
		return (e, n) => (d(), s("div", W, [t.countdown ? (d(), s("media-time", G)) : (d(), s(a, { key: 1 }, [
			n[0] ||= c("media-time", { type: "current" }, null, -1),
			n[1] ||= l(" / ", -1),
			n[2] ||= c("media-time", { type: "duration" }, null, -1)
		], 64))]));
	}
}), [["__scopeId", "data-v-9611f29d"]]);
//#endregion
//#region src/components/wt-vidstack-player/utils/normalizeVidstackMediaSrc.ts
function q({ src: e, type: t }) {
	return R({
		src: e,
		type: t
	}) || z({
		src: e,
		type: t
	}) || J({
		src: e,
		type: t
	}) ? {
		src: e,
		type: t
	} : t?.includes("audio") ? {
		src: e,
		type: "audio/mp3"
	} : t?.includes("video") ? {
		src: e,
		type: "video/mp4"
	} : {
		src: e,
		type: t
	};
}
function J({ type: e }) {
	return e?.includes("/object");
}
//#endregion
//#region src/components/wt-vidstack-player/composables/useVidstackSrc.ts
var Y = ({ src: e, type: t, stream: n }) => {
	let r = f(e), i = f(t), a = f(n), s = o(() => a.value ? "video/object" : i.value || r.value?.type), c = o(() => {
		if (a.value) return a.value;
		let e = typeof r.value == "string" ? r.value : r.value?.src;
		return e instanceof Blob ? e : e?.replace("/download", "/stream");
	});
	return { normalizedSrcObject: o(() => q({
		src: c.value,
		type: s.value
	})) };
};
//#endregion
export { k as _, h as a, U as b, H as c, S as d, x as f, V as g, R as h, m as i, v as l, w as m, K as n, _ as o, C as p, g as r, T as s, Y as t, b as u, B as v, z as x, O as y };
