const H = [], R = /* @__PURE__ */ new WeakSet(), J = navigator.userAgent.includes("Chrome");
navigator.userAgent.includes("Firefox");
navigator.userAgent.includes("Safari");
navigator.userAgent.includes("Windows");
const K = navigator.userAgent.includes("Macintosh");
navigator.userAgent.includes("Linux");
navigator.userAgent.includes("Android");
const Q = /iPad|iPhone|iPod/.test(navigator.userAgent);
function ve() {
  return window == null ? void 0 : window.matchMedia("(prefers-color-scheme: dark)").matches;
}
async function U(e) {
  await new Promise((t) => setTimeout(t, e));
}
function be() {
  return "fxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e) => {
    const t = Math.random() * 16 | 0;
    return (e === "x" ? t : t & 3 | 8).toString(16);
  });
}
function y(e, t) {
  try {
    return typeof e == "string" ? (t ?? document).querySelector(e) : e;
  } catch {
    return null;
  }
}
function u(e, t) {
  try {
    return typeof e == "string" ? (t ?? document).querySelectorAll(e) : e ?? H;
  } catch {
    return H;
  }
}
function l(e, t) {
  return (e == null ? void 0 : e.classList.contains(t)) ?? !1;
}
function m(e, t) {
  var n;
  return ((n = e == null ? void 0 : e.tagName) == null ? void 0 : n.toLowerCase()) === t;
}
function A(e, t) {
  var n;
  return ((n = e == null ? void 0 : e.type) == null ? void 0 : n.toLowerCase()) === t;
}
function p(e, t) {
  if (e instanceof NodeList) for (let n = 0; n < e.length; n++) e[n].classList.add(t);
  else e == null || e.classList.add(t);
}
function g(e, t) {
  if (e instanceof NodeList) for (let n = 0; n < e.length; n++) e[n].classList.remove(t);
  else e == null || e.classList.remove(t);
}
function T(e, t, n, i = !0) {
  e != null && e.addEventListener && e.addEventListener(t, n, i);
}
function o(e, t, n, i = !0) {
  Le(e), T(e, t, n, i);
}
function F(e, t, n, i = !0) {
  e != null && e.removeEventListener && e.removeEventListener(t, n, i);
}
function xe(e, t) {
  var n;
  (n = t == null ? void 0 : t.parentNode) == null || n.insertBefore(e, t);
}
function N(e) {
  return e == null ? void 0 : e.previousElementSibling;
}
function _(e) {
  return e == null ? void 0 : e.nextElementSibling;
}
function L(e) {
  return e == null ? void 0 : e.parentElement;
}
function ke(e) {
  const t = document.createElement("div");
  for (let n = 0, i = Object.keys(e), a = i.length; n < a; n++) {
    const c = i[n], r = e[c];
    t.setAttribute(c, r);
  }
  return t;
}
function z() {
  var e;
  (e = document.activeElement) == null || e.blur();
}
function we(e) {
  return u('[data-ui="#' + e + '"]');
}
function Ae(e) {
  return y('[data-ui="#' + e + '"]');
}
function Te(e) {
  e.id && l(e, "page") && (e = Ae(e.id) ?? e);
  const t = L(e);
  if (!l(t, "tabs") && !l(t, "tabbed") && !m(t, "nav")) return;
  const n = u("a", t);
  for (let i = 0; i < n.length; i++) g(n[i], "active");
  !m(e, "button") && !l(e, "button") && !l(e, "chip") && p(e, "active");
}
function Le(e) {
  R.has(e) || R.add(e);
}
function ee() {
  const e = getComputedStyle(document.documentElement).getPropertyValue("--size") || "16px";
  return e.includes("%") ? parseInt(e) * 16 / 100 : e.includes("em") ? parseInt(e) * 16 : parseInt(e);
}
function te(e) {
  e.placeholder || (e.placeholder = " ");
}
function Ce(e) {
  const t = e.currentTarget, n = L(t), i = y("input:not([type=file], [type=checkbox], [type=radio]), select, textarea", n);
  i && i.focus();
}
function O(e) {
  const t = e.currentTarget;
  C(t);
}
function j(e) {
  const t = e.currentTarget;
  C(t);
}
function Ee(e) {
  const t = e.currentTarget;
  D(t);
}
function Se(e) {
  const t = e.currentTarget;
  I(t);
}
function Fe(e) {
  const t = e.currentTarget;
  D(t, e);
}
function $e(e) {
  const t = e.currentTarget;
  I(t, e);
}
function Me(e) {
  var t;
  const n = e.currentTarget, i = y("input", L(n));
  i && (t = n.textContent) != null && t.includes("visibility") && (i.type === "password" ? (i.type = "text", n.textContent = "visibility_off") : (i.type = "password", n.textContent = "visibility"));
}
function Pe(e) {
  const t = e.currentTarget;
  ne(t);
}
function qe() {
  const e = u(".field > label");
  for (let t = 0; t < e.length; t++) o(e[t], "click", Ce);
}
function Ne() {
  const e = u(".field > input:not([type=file], [type=color], [type=range])");
  for (let t = 0; t < e.length; t++) o(e[t], "focus", O), o(e[t], "blur", j), C(e[t]);
}
function _e() {
  const e = u(".field > select");
  for (let t = 0; t < e.length; t++) o(e[t], "focus", O), o(e[t], "blur", j);
}
function ze() {
  const e = u(".field > input[type=file]");
  for (let t = 0; t < e.length; t++) o(e[t], "change", Ee), D(e[t]);
}
function Oe() {
  const e = u(".field > input[type=color]");
  for (let t = 0; t < e.length; t++) o(e[t], "change", Se), I(e[t]);
}
function je() {
  const e = u(".field > textarea");
  for (let t = 0; t < e.length; t++) o(e[t], "focus", O), o(e[t], "blur", j), !(J && !K && !Q) && (o(e[t], "input", Pe), ne(e[t]));
}
function De() {
  const e = u(".field:has(> input[type=password]) > i, a");
  for (let t = 0; t < e.length; t++) o(e[t], "click", Me);
}
function C(e) {
  A(e, "number") && !e.value && (e.value = ""), te(e);
}
function D(e, t) {
  if ((t == null ? void 0 : t.key) === "Enter") {
    const i = N(e);
    if (!A(i, "file")) return;
    i.click();
    return;
  }
  const n = _(e);
  A(n, "text") && (n.value = e.files ? Array.from(e.files).map((i) => i.name).join(", ") : "", n.readOnly = !0, o(n, "keydown", Fe, !1), C(n));
}
function I(e, t) {
  if ((t == null ? void 0 : t.key) === "Enter") {
    const i = N(e);
    if (!A(i, "color")) return;
    i.click();
    return;
  }
  const n = _(e);
  A(n, "text") && (n.readOnly = !0, n.value = e.value, o(n, "keydown", $e, !1), C(n));
}
function ne(e) {
  if (te(e), e.hasAttribute("rows")) return;
  const t = ee();
  e.style.blockSize = "auto", e.style.blockSize = `${e.scrollHeight - t}px`;
}
function Ie() {
  qe(), Ne(), _e(), ze(), Oe(), je(), De();
}
function X(e) {
  const t = e.target;
  !m(t, "input") && !m(t, "select") || (t.type === "range" ? (t.focus(), re(t)) : ie());
}
function Ve(e) {
  window.matchMedia("(pointer: coarse)").matches && e.target.blur();
}
function ie() {
  const e = document.body, t = u(".slider > input[type=range]");
  t.length ? T(e, "input", X, !1) : F(e, "input", X, !1);
  for (let n = 0; n < t.length; n++) re(t[n]);
}
function re(e) {
  o(e, "change", Ve);
  const t = L(e), n = y("span", t), i = u("input", t);
  if (!i.length || !n) return;
  const a = ee(), c = l(t, "max") ? 0 : 0.25 * a * 100 / i[0].offsetWidth, r = [], s = [];
  for (let v = 0, pe = i.length; v < pe; v++) {
    const W = parseFloat(i[v].min) || 0, ye = parseFloat(i[v].max) || 100, B = parseFloat(i[v].value) || 0, Z = (B - W) * 100 / (ye - W), he = c / 2 - c * Z / 100;
    r.push(Z + he), s.push(B);
  }
  let f = r[0], h = 0, E = 100 - h - f, b = s[0], x = s[1] || 0;
  i.length > 1 && (f = Math.abs(r[1] - r[0]), h = r[1] > r[0] ? r[0] : r[1], E = 100 - h - f, x > b && (b = s[1] || 0, x = s[0])), requestAnimationFrame(() => t.style.cssText = `--_start: ${h}%; --_end: ${E}%; --_value1: '${b}'; --_value2: '${x}';`);
}
function We() {
  ie();
}
const d = { light: "", dark: "" };
function q() {
  var e;
  return (e = document == null ? void 0 : document.body) != null && e.classList.contains("dark") ? "dark" : "light";
}
function Be() {
  if (d.light && d.dark) return d;
  const e = document.body, t = document.createElement("body");
  t.className = "light", e.appendChild(t);
  const n = document.createElement("body");
  n.className = "dark", e.appendChild(n);
  const i = getComputedStyle(t), a = getComputedStyle(n), c = ["--primary", "--on-primary", "--primary-container", "--on-primary-container", "--secondary", "--on-secondary", "--secondary-container", "--on-secondary-container", "--tertiary", "--on-tertiary", "--tertiary-container", "--on-tertiary-container", "--error", "--on-error", "--error-container", "--on-error-container", "--background", "--on-background", "--surface", "--on-surface", "--surface-variant", "--on-surface-variant", "--outline", "--outline-variant", "--shadow", "--scrim", "--inverse-surface", "--inverse-on-surface", "--inverse-primary", "--surface-dim", "--surface-bright", "--surface-container-lowest", "--surface-container-low", "--surface-container", "--surface-container-high", "--surface-container-highest"];
  for (let r = 0, s = c.length; r < s; r++) d.light += c[r] + ":" + i.getPropertyValue(c[r]) + ";", d.dark += c[r] + ":" + a.getPropertyValue(c[r]) + ";";
  return e.removeChild(t), e.removeChild(n), d;
}
async function Ze(e) {
  const t = globalThis, n = document.body;
  if (!e || !t.materialDynamicColors) return Be();
  const i = q();
  return e.light && e.dark ? (d.light = e.light, d.dark = e.dark, n.setAttribute("style", e[i]), e) : t.materialDynamicColors(e).then((a) => {
    const c = (r) => {
      let s = "";
      for (let f = 0, h = Object.keys(r), E = h.length; f < E; f++) {
        const b = h[f], x = r[b], v = b.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
        s += "--" + v + ":" + x + ";";
      }
      return s;
    };
    return d.light = c(a.light), d.dark = c(a.dark), n.setAttribute("style", d[i]), d;
  });
}
function oe(e) {
  const t = globalThis, n = document.body;
  if (!n) return e;
  if (!e) return q();
  e === "auto" && (e = ve() ? "dark" : "light"), n.classList.remove("light", "dark"), n.classList.add(e);
  const i = e === "light" ? d.light : d.dark;
  return t.materialDynamicColors && n.setAttribute("style", i), q();
}
const S = [];
function ce(e) {
  if (e.key === "Escape") {
    const t = e.currentTarget;
    ae(t, t);
  }
}
function He(e) {
  (y("[autofocus]", e) ?? e).focus();
}
function ue(e, t) {
  g(we(e.id), "active"), g(e, "active"), g(t, "active"), e.close(), S.pop();
  const n = S[S.length - 1];
  n && n.focus();
}
async function Re(e, t, n, i) {
  !m(i, "button") && !l(i, "button") && !l(i, "chip") && p(i, "active"), p(t, "active"), p(e, "active"), n ? e.showModal() : e.show(), await U(90), n || T(e, "keydown", ce, !1), S.push(e), He(e);
}
function Xe(e) {
  const t = e.currentTarget, n = _(t);
  m(n, "dialog") && ue(n, t);
}
async function ae(e, t) {
  z();
  let n = N(t);
  const i = l(t, "active") || t.open, a = l(t, "modal");
  a || F(t, "keydown", ce, !1), l(n, "overlay") || (n = ke({ class: "overlay" }), xe(n, t), await U(90)), a || o(n, "click", Xe, !1), i ? ue(t, n) : Re(t, n, a, e);
}
let $;
function le(e) {
  F(document.body, "click", le);
  const t = e.target, n = u("menu.active");
  for (let i = 0; i < n.length; i++) se(t, n[i], e);
}
function Ye(e) {
  setTimeout(() => {
    const t = y(".field > input", e);
    t ? t.focus() : e.focus();
  }, 90);
}
function se(e, t, n) {
  $ && clearTimeout($), $ = setTimeout(() => {
    T(document.body, "click", le), m(document.activeElement, "input") || z();
    const i = l(t, "active"), a = (n == null ? void 0 : n.target) === e, c = !!e.closest("menu");
    if (!i && c || i && a) {
      g(t, "active");
      return;
    }
    g(u("menu.active"), "active"), p(t, "active"), Ye(t);
  }, 90);
}
let k;
function Ge(e) {
  const t = e.currentTarget;
  g(t, "active"), k && clearTimeout(k);
}
function Je(e, t) {
  z();
  const n = u(".snackbar.active");
  for (let i = 0; i < n.length; i++) g(n[i], "active");
  p(e, "active"), o(e, "click", Ge), k && clearTimeout(k), t !== -1 && (k = setTimeout(() => {
    g(e, "active");
  }, t ?? 6e3));
}
function Ke(e) {
  const t = L(e);
  t && g(u(":scope > .page", t), "active"), p(e, "active");
}
function Qe(e) {
  Ue(e);
}
function Ue(e) {
  const t = e.currentTarget, n = t.getBoundingClientRect(), i = Math.max(n.width, n.height), a = i / 2, c = e.clientX - n.left - a, r = e.clientY - n.top - a, s = document.createElement("div");
  s.className = "ripple-js";
  const f = document.createElement("div");
  f.style.inlineSize = f.style.blockSize = `${i}px`, f.style.left = `${c}px`, f.style.top = `${r}px`, o(f, "animationend", () => {
    s.remove();
  }), s.appendChild(f), t.appendChild(s);
}
function et() {
  const e = u(".slow-ripple, .ripple, .fast-ripple");
  for (let t = 0; t < e.length; t++) o(e[t], "pointerdown", Qe);
}
function Y(e) {
  const t = e.target;
  m(t, "progress") ? fe(t) : de();
}
function fe(e) {
  requestAnimationFrame(() => {
    if (!e.hasAttribute("value") && !e.hasAttribute("max")) {
      const t = l(e, "circle") ? "50" : "100";
      e.style.setProperty("--_value", t), e.setAttribute("value", t), e.setAttribute("max", "100"), e.classList.add("indeterminate");
    } else e.style.setProperty("--_value", String(e.value));
  });
}
function de() {
  if (J && !K && !Q) return;
  const e = document.body, t = u("progress");
  t.length ? T(e, "input", Y, !1) : F(e, "input", Y, !1);
  for (let n = 0; n < t.length; n++) fe(t[n]);
}
const w = globalThis;
let M, P;
function G() {
  M && clearTimeout(M), M = setTimeout(async () => await me(), 180);
}
async function V(e, t, n, i) {
  if (!t && (t = y(e.getAttribute("data-ui")), !t)) {
    e.classList.toggle("active");
    return;
  }
  if (Te(e), m(t, "dialog")) {
    requestAnimationFrame(() => ae(e, t));
    return;
  }
  if (m(t, "menu")) {
    requestAnimationFrame(() => se(e, t, i));
    return;
  }
  if (l(t, "snackbar")) {
    requestAnimationFrame(() => Je(t, n));
    return;
  }
  if (l(t, "page")) {
    requestAnimationFrame(() => Ke(t));
    return;
  }
  if (l(t, "active")) {
    g(e, "active"), g(t, "active");
    return;
  }
  p(t, "active");
}
function tt(e) {
  V(e.currentTarget, null, null, e);
}
function nt(e) {
  e.key === "Enter" && V(e.currentTarget, null, null, e);
}
function ge() {
  w.ui || P || !w.MutationObserver || (P = new MutationObserver(G), P.observe(document.body, { childList: !0, subtree: !0 }), G());
}
function it() {
  const e = u("[data-ui]");
  for (let t = 0, n = e.length; t < n; t++) o(e[t], "click", tt), m(e[t], "a") && !e[t].getAttribute("href") && o(e[t], "keydown", nt);
}
function me(e, t) {
  if (e) {
    if (e === "setup") {
      ge();
      return;
    }
    if (e === "guid") return be();
    if (e === "mode") return oe(t);
    if (e === "theme") return Ze(t);
    const n = y(e);
    if (!n) return;
    V(n, n, t);
  }
  it(), Ie(), We(), et(), de();
}
function rt() {
  var e;
  if (w.ui) return;
  const t = (e = w.document) == null ? void 0 : e.body;
  t && !t.classList.contains("dark") && !t.classList.contains("light") && oe("auto"), ge(), w.ui = me;
}
rt();
