import u from "classnames";
import s from "react";
import { U as i } from "./UrlUtils-45b0efe7.mjs";
import c from "dompurify";
function* d() {
  let e = 0;
  for (; ; )
    yield String(e), e = (e + 1) % 10;
}
function l(r, e) {
  class a extends s.Component {
    constructor(t) {
      super(t), this.refresh = () => {
        this.setState({ key: this.state.keygen.next().value });
      }, this.state = {
        keygen: d(),
        oldProps: t,
        key: "1"
      };
    }
    static getDerivedStateFromProps(t, n) {
      return e(n.oldProps, t) ? {
        key: n.keygen.next().value,
        oldProps: t
      } : null;
    }
    render() {
      return /* @__PURE__ */ s.createElement(r, { key: this.state.key, propsGuardRefresh: this.refresh, ...this.props }, this.props.children);
    }
  }
  return a;
}
const b = "breadcrumbs _breadcrumbs_629dc", p = "breadcrumbsSeparator _breadcrumbsSeparator_f3218", o = {
  breadcrumbs: b,
  breadcrumbsSeparator: p
}, h = () => /* @__PURE__ */ s.createElement("span", { className: u(o.breadcrumbsSeparator, "breadcrumbsSeparator") }, "›"), S = l(
  (r) => /* @__PURE__ */ s.createElement("div", { className: u(o.breadcrumbs, "breadcrumb", r.className) }, (s.Children.map(r.children, (e) => e) || []).reduce(
    (e, a, m, t) => (e.push(a), m < t.length - 1 && e.push(/* @__PURE__ */ s.createElement(h, { key: `separator-${m}` })), e),
    []
  )),
  (r, e) => e.children !== r.children
), k = (r, e) => ({ __html: e ? c.sanitize(r, e) : c.sanitize(r) }), w = (r) => `https://img.youtube.com/vi/${r}/hqdefault.jpg`, v = (r, e) => {
  if (!e)
    return `https://www.youtube.com/embed/${r}`;
  const a = i.buildURLSearchParamsFromObject({
    ...e,
    autoplay: e.autoplay ? "1" : "",
    modestbranding: e.modestbranding ? "1" : "",
    mute: e.mute ? "1" : ""
  });
  return `https://www.youtube.com/embed/${r}?${a.toString()}`;
};
export {
  S as B,
  w as a,
  v as g,
  k as m
};
