var x = (e, t, s) => new Promise((r, n) => {
  var a = (i) => {
    try {
      o(s.next(i));
    } catch ($) {
      n($);
    }
  }, l = (i) => {
    try {
      o(s.throw(i));
    } catch ($) {
      n($);
    }
  }, o = (i) => i.done ? r(i.value) : Promise.resolve(i.value).then(a, l);
  o((s = s.apply(e, t)).next());
});
const oe = "ui-skeleton", $e = (
  /* ui-skeleton */
  { hydratedSelectorName: "hydrated" }
);
var ce = Object.defineProperty, ue = (e, t) => {
  for (var s in t)
    ce(e, s, { get: t[s], enumerable: !0 });
}, U = /* @__PURE__ */ new WeakMap(), b = (e) => U.get(e), Qe = (e, t) => U.set(t.$lazyInstance$ = e, t), fe = (e, t) => {
  const s = {
    $flags$: 0,
    $hostElement$: e,
    $cmpMeta$: t,
    $instanceValues$: /* @__PURE__ */ new Map()
  };
  return s.$onReadyPromise$ = new Promise((r) => s.$onReadyResolve$ = r), e["s-p"] = [], e["s-rc"] = [], U.set(e, s);
}, E = (e, t) => (0, console.error)(e, t), O = /* @__PURE__ */ new Map(), de = (e, t, s) => {
  const r = e.$tagName$.replace(/-/g, "_"), n = e.$lazyBundleId$;
  if (!n)
    return;
  const a = O.get(n);
  if (a)
    return a[r];
  {
    const l = (o) => (O.set(n, o), o[r]);
    switch (n) {
      case "ui-skeleton":
        return import(
          /* webpackMode: "lazy" */
          "../stencil/ui-skeleton-Dd7tqzYw.js"
        ).then(l, E);
    }
  }
  return import(
    /* @vite-ignore */
    /* webpackInclude: /\.entry\.js$/ */
    /* webpackExclude: /\.system\.entry\.js$/ */
    /* webpackMode: "lazy" */
    `./${n}.entry.js`
  ).then((l) => (O.set(n, l), l[r]), E);
}, _ = /* @__PURE__ */ new Map(), me = "{visibility:hidden}.hydrated{visibility:inherit}", J = "slot-fb{display:contents}slot-fb[hidden]{display:none}", B = typeof window != "undefined" ? window : {}, y = B.document || { head: {} }, g = {
  $flags$: 0,
  $resourcesUrl$: "",
  jmp: (e) => e(),
  raf: (e) => requestAnimationFrame(e),
  ael: (e, t, s, r) => e.addEventListener(t, s, r),
  rel: (e, t, s, r) => e.removeEventListener(t, s, r),
  ce: (e, t) => new CustomEvent(e, t)
}, ve = (e) => Promise.resolve(e), ge = /* @__PURE__ */ (() => {
  try {
    return new CSSStyleSheet(), typeof new CSSStyleSheet().replaceSync == "function";
  } catch (e) {
  }
  return !1;
})(), A = !1, C = [], K = [], he = (e, t) => (s) => {
  e.push(s), A || (A = !0, g.$flags$ & 4 ? z(H) : g.raf(H));
}, D = (e) => {
  for (let t = 0; t < e.length; t++)
    try {
      e[t](performance.now());
    } catch (s) {
      E(s);
    }
  e.length = 0;
}, H = () => {
  D(C), D(K), (A = C.length > 0) && g.raf(H);
}, z = (e) => ve().then(e), pe = /* @__PURE__ */ he(K), F = {}, Q = (e) => (e = typeof e, e === "object" || e === "function");
function X(e) {
  var t, s, r;
  return (r = (s = (t = e.head) == null ? void 0 : t.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : s.getAttribute("content")) != null ? r : void 0;
}
var ye = {};
ue(ye, {
  err: () => Z,
  map: () => Se,
  ok: () => I,
  unwrap: () => be,
  unwrapErr: () => ke
});
var I = (e) => ({
  isOk: !0,
  isErr: !1,
  value: e
}), Z = (e) => ({
  isOk: !1,
  isErr: !0,
  value: e
});
function Se(e, t) {
  if (e.isOk) {
    const s = t(e.value);
    return s instanceof Promise ? s.then((r) => I(r)) : I(s);
  }
  if (e.isErr) {
    const s = e.value;
    return Z(s);
  }
  throw "should never get here";
}
var be = (e) => {
  if (e.isOk)
    return e.value;
  throw e.value;
}, ke = (e) => {
  if (e.isErr)
    return e.value;
  throw e.value;
}, S = (e, t = "") => () => {
}, Ee = (e, t) => () => {
}, we = (e, t, ...s) => {
  let r = null, n = null, a = !1, l = !1;
  const o = [], i = (c) => {
    for (let u = 0; u < c.length; u++)
      r = c[u], Array.isArray(r) ? i(r) : r != null && typeof r != "boolean" && ((a = typeof e != "function" && !Q(r)) && (r = String(r)), a && l ? o[o.length - 1].$text$ += r : o.push(a ? N(null, r) : r), l = a);
  };
  if (i(s), t) {
    t.key && (n = t.key);
    {
      const c = t.className || t.class;
      c && (t.class = typeof c != "object" ? c : Object.keys(c).filter((u) => c[u]).join(" "));
    }
  }
  const $ = N(e, null);
  return $.$attrs$ = t, o.length > 0 && ($.$children$ = o), $.$key$ = n, $;
}, N = (e, t) => {
  const s = {
    $flags$: 0,
    $tag$: e,
    $text$: t,
    $elm$: null,
    $children$: null
  };
  return s.$attrs$ = null, s.$key$ = null, s;
}, xe = {}, Pe = (e) => e && e.$tag$ === xe, Te = (e, t) => e != null && !Q(e) ? t & 4 ? e === "false" ? !1 : e === "" || !!e : t & 2 ? parseFloat(e) : t & 1 ? String(e) : e : e, _e = (e, t, s) => {
  const r = g.ce(t, s);
  return e.dispatchEvent(r), r;
}, M = /* @__PURE__ */ new WeakMap(), je = (e, t, s) => {
  let r = _.get(e);
  ge && s ? (r = r || new CSSStyleSheet(), typeof r == "string" ? r = t : r.replaceSync(t)) : r = t, _.set(e, r);
}, Le = (e, t, s) => {
  var r;
  const n = R(t), a = _.get(n);
  if (e = e.nodeType === 11 ? e : y, a)
    if (typeof a == "string") {
      e = e.head || e;
      let l = M.get(e), o;
      if (l || M.set(e, l = /* @__PURE__ */ new Set()), !l.has(n)) {
        {
          o = y.createElement("style"), o.innerHTML = a;
          const i = (r = g.$nonce$) != null ? r : X(y);
          i != null && o.setAttribute("nonce", i), e.insertBefore(o, e.querySelector("link"));
        }
        t.$flags$ & 4 && (o.innerHTML += J), l && l.add(n);
      }
    } else
      e.adoptedStyleSheets.includes(a) || (e.adoptedStyleSheets = [...e.adoptedStyleSheets, a]);
  return n;
}, Oe = (e) => {
  const t = e.$cmpMeta$, s = e.$hostElement$, r = S("attachStyles", t.$tagName$);
  Le(
    s.getRootNode(),
    t
  ), r();
}, R = (e, t) => "sc-" + e.$tagName$, W = (e, t, s, r, n, a) => {
  if (s !== r && (t.toLowerCase(), t === "class")) {
    const l = e.classList, o = Y(s), i = Y(r);
    l.remove(...o.filter(($) => $ && !i.includes($))), l.add(...i.filter(($) => $ && !o.includes($)));
  }
}, Ae = /\s/, Y = (e) => e ? e.split(Ae) : [], V = (e, t, s) => {
  const r = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, n = e && e.$attrs$ || F, a = t.$attrs$ || F;
  for (const l of G(Object.keys(n)))
    l in a || W(r, l, n[l], void 0);
  for (const l of G(Object.keys(a)))
    W(r, l, n[l], a[l]);
};
function G(e) {
  return e.includes("ref") ? (
    // we need to sort these to ensure that `'ref'` is the last attr
    [...e.filter((t) => t !== "ref"), "ref"]
  ) : (
    // no need to sort, return the original array
    e
  );
}
var ee, j = (e, t, s, r) => {
  const n = t.$children$[s];
  let a = 0, l, o;
  if (n.$text$ !== null)
    l = n.$elm$ = y.createTextNode(n.$text$);
  else if (l = n.$elm$ = y.createElement(
    n.$tag$
  ), V(null, n), n.$children$)
    for (a = 0; a < n.$children$.length; ++a)
      o = j(e, n, a), o && l.appendChild(o);
  return l["s-hn"] = ee, l;
}, te = (e, t, s, r, n, a) => {
  let l = e, o;
  for (; n <= a; ++n)
    r[n] && (o = j(null, s, n), o && (r[n].$elm$ = o, T(l, o, t)));
}, ne = (e, t, s) => {
  for (let r = t; r <= s; ++r) {
    const n = e[r];
    if (n) {
      const a = n.$elm$;
      a && a.remove();
    }
  }
}, He = (e, t, s, r, n = !1) => {
  let a = 0, l = 0, o = 0, i = 0, $ = t.length - 1, c = t[0], u = t[$], f = r.length - 1, d = r[0], m = r[f], v, h;
  for (; a <= $ && l <= f; )
    if (c == null)
      c = t[++a];
    else if (u == null)
      u = t[--$];
    else if (d == null)
      d = r[++l];
    else if (m == null)
      m = r[--f];
    else if (P(c, d, n))
      k(c, d, n), c = t[++a], d = r[++l];
    else if (P(u, m, n))
      k(u, m, n), u = t[--$], m = r[--f];
    else if (P(c, m, n))
      k(c, m, n), T(e, c.$elm$, u.$elm$.nextSibling), c = t[++a], m = r[--f];
    else if (P(u, d, n))
      k(u, d, n), T(e, u.$elm$, c.$elm$), u = t[--$], d = r[++l];
    else {
      for (o = -1, i = a; i <= $; ++i)
        if (t[i] && t[i].$key$ !== null && t[i].$key$ === d.$key$) {
          o = i;
          break;
        }
      o >= 0 ? (h = t[o], h.$tag$ !== d.$tag$ ? v = j(t && t[l], s, o) : (k(h, d, n), t[o] = void 0, v = h.$elm$), d = r[++l]) : (v = j(t && t[l], s, l), d = r[++l]), v && T(c.$elm$.parentNode, v, c.$elm$);
    }
  a > $ ? te(
    e,
    r[f + 1] == null ? null : r[f + 1].$elm$,
    s,
    r,
    l,
    f
  ) : l > f && ne(t, a, $);
}, P = (e, t, s = !1) => e.$tag$ === t.$tag$ ? s ? !0 : e.$key$ === t.$key$ : !1, k = (e, t, s = !1) => {
  const r = t.$elm$ = e.$elm$, n = e.$children$, a = t.$children$, l = t.$text$;
  l === null ? (V(e, t), n !== null && a !== null ? He(r, n, t, a, s) : a !== null ? (e.$text$ !== null && (r.textContent = ""), te(r, null, t, a, 0, a.length - 1)) : n !== null && ne(n, 0, n.length - 1)) : e.$text$ !== l && (r.data = l);
}, T = (e, t, s) => e == null ? void 0 : e.insertBefore(t, s), Ie = (e, t, s = !1) => {
  const r = e.$hostElement$, n = e.$vnode$ || N(null, null), a = Pe(t) ? t : we(null, null, t);
  if (ee = r.tagName, s && a.$attrs$)
    for (const l of Object.keys(a.$attrs$))
      r.hasAttribute(l) && !["key", "ref", "style", "class"].includes(l) && (a.$attrs$[l] = r[l]);
  a.$tag$ = null, a.$flags$ |= 4, e.$vnode$ = a, a.$elm$ = n.$elm$ = r, k(n, a, s);
}, se = (e, t) => {
  t && !e.$onRenderResolve$ && t["s-p"] && t["s-p"].push(new Promise((s) => e.$onRenderResolve$ = s));
}, q = (e, t) => {
  if (e.$flags$ |= 16, e.$flags$ & 4) {
    e.$flags$ |= 512;
    return;
  }
  return se(e, e.$ancestorComponent$), pe(() => Ne(e, t));
}, Ne = (e, t) => {
  const s = e.$hostElement$, r = S("scheduleUpdate", e.$cmpMeta$.$tagName$), n = e.$lazyInstance$;
  if (!n)
    throw new Error(
      `Can't render component <${s.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`
    );
  let a;
  return r(), Ue(a, () => ze(e, n, t));
}, Ue = (e, t) => Be(e) ? e.then(t).catch((s) => {
  console.error(s), t();
}) : t(), Be = (e) => e instanceof Promise || e && e.then && typeof e.then == "function", ze = (e, t, s) => x(void 0, null, function* () {
  var r;
  const n = e.$hostElement$, a = S("update", e.$cmpMeta$.$tagName$), l = n["s-rc"];
  s && Oe(e);
  const o = S("render", e.$cmpMeta$.$tagName$);
  qe(e, t, n, s), l && (l.map((i) => i()), n["s-rc"] = void 0), o(), a();
  {
    const i = (r = n["s-p"]) != null ? r : [], $ = () => Ce(e);
    i.length === 0 ? $() : (Promise.all(i).then($), e.$flags$ |= 4, i.length = 0);
  }
}), qe = (e, t, s, r) => {
  try {
    t = t.render(), e.$flags$ &= -17, e.$flags$ |= 2, Ie(e, t, r);
  } catch (n) {
    E(n, e.$hostElement$);
  }
  return null;
}, Ce = (e) => {
  const t = e.$cmpMeta$.$tagName$, s = e.$hostElement$, r = S("postUpdate", t), n = e.$ancestorComponent$;
  e.$flags$ & 64 ? r() : (e.$flags$ |= 64, le(s), r(), e.$onReadyResolve$(s), n || re()), e.$onRenderResolve$ && (e.$onRenderResolve$(), e.$onRenderResolve$ = void 0), e.$flags$ & 512 && z(() => q(e, !1)), e.$flags$ &= -517;
}, re = (e) => {
  le(y.documentElement), z(() => _e(B, "appload", { detail: { namespace: oe } }));
}, le = (e) => {
  var t;
  return e.classList.add((t = $e.hydratedSelectorName) != null ? t : "hydrated");
}, De = (e, t) => b(e).$instanceValues$.get(t), Fe = (e, t, s, r) => {
  const n = b(e);
  if (!n)
    throw new Error(
      `Couldn't find host element for "${r.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`
    );
  const a = n.$hostElement$, l = n.$instanceValues$.get(t), o = n.$flags$, i = n.$lazyInstance$;
  s = Te(s, r.$members$[t][0]);
  const $ = Number.isNaN(l) && Number.isNaN(s), c = s !== l && !$;
  if ((!(o & 8) || l === void 0) && c && (n.$instanceValues$.set(t, s), i)) {
    if (r.$watchers$ && o & 128) {
      const u = r.$watchers$[t];
      u && u.map((f) => {
        try {
          i[f](s, l, t);
        } catch (d) {
          E(d, a);
        }
      });
    }
    (o & 18) === 2 && q(n, !1);
  }
}, ae = (e, t, s) => {
  var r, n;
  const a = e.prototype;
  if (t.$members$ || t.$watchers$ || e.watchers) {
    e.watchers && !t.$watchers$ && (t.$watchers$ = e.watchers);
    const l = Object.entries((r = t.$members$) != null ? r : {});
    if (l.map(([o, [i]]) => {
      (i & 31 || s & 2 && i & 32) && Object.defineProperty(a, o, {
        get() {
          return De(this, o);
        },
        set($) {
          Fe(this, o, $, t);
        },
        configurable: !0,
        enumerable: !0
      });
    }), s & 1) {
      const o = /* @__PURE__ */ new Map();
      a.attributeChangedCallback = function(i, $, c) {
        g.jmp(() => {
          var u;
          const f = o.get(i);
          if (this.hasOwnProperty(f))
            c = this[f], delete this[f];
          else {
            if (a.hasOwnProperty(f) && typeof this[f] == "number" && this[f] == c)
              return;
            if (f == null) {
              const d = b(this), m = d == null ? void 0 : d.$flags$;
              if (m && !(m & 8) && m & 128 && c !== $) {
                const v = d.$lazyInstance$, h = (u = t.$watchers$) == null ? void 0 : u[i];
                h == null || h.forEach((p) => {
                  v[p] != null && v[p].call(v, c, $, i);
                });
              }
              return;
            }
          }
          this[f] = c === null && typeof this[f] == "boolean" ? !1 : c;
        });
      }, e.observedAttributes = Array.from(
        /* @__PURE__ */ new Set([
          ...Object.keys((n = t.$watchers$) != null ? n : {}),
          ...l.filter(
            ([i, $]) => $[0] & 15
            /* HasAttribute */
          ).map(([i, $]) => {
            const c = $[1] || i;
            return o.set(c, i), c;
          })
        ])
      );
    }
  }
  return e;
}, Me = (e, t, s, r) => x(void 0, null, function* () {
  let n;
  if (!(t.$flags$ & 32)) {
    if (t.$flags$ |= 32, s.$lazyBundleId$) {
      const i = de(s);
      if (i && "then" in i) {
        const c = Ee();
        n = yield i, c();
      } else
        n = i;
      if (!n)
        throw new Error(`Constructor for "${s.$tagName$}#${t.$modeName$}" was not found`);
      n.isProxied || (s.$watchers$ = n.watchers, ae(
        n,
        s,
        2
        /* proxyState */
      ), n.isProxied = !0);
      const $ = S("createInstance", s.$tagName$);
      t.$flags$ |= 8;
      try {
        new n(t);
      } catch (c) {
        E(c);
      }
      t.$flags$ &= -9, t.$flags$ |= 128, $();
    } else {
      n = e.constructor;
      const i = e.localName;
      customElements.whenDefined(i).then(
        () => t.$flags$ |= 128
        /* isWatchReady */
      );
    }
    if (n && n.style) {
      let i;
      typeof n.style == "string" && (i = n.style);
      const $ = R(s);
      if (!_.has($)) {
        const c = S("registerStyles", s.$tagName$);
        je($, i, !!(s.$flags$ & 1)), c();
      }
    }
  }
  const a = t.$ancestorComponent$, l = () => q(t, !0);
  a && a["s-rc"] ? a["s-rc"].push(l) : l();
}), We = (e) => {
}, Ye = (e) => {
  if (!(g.$flags$ & 1)) {
    const t = b(e), s = t.$cmpMeta$, r = S("connectedCallback", s.$tagName$);
    if (t.$flags$ & 1)
      t != null && t.$lazyInstance$ || t != null && t.$onReadyPromise$ && t.$onReadyPromise$.then(() => We());
    else {
      t.$flags$ |= 1;
      {
        let n = e;
        for (; n = n.parentNode || n.host; )
          if (n["s-p"]) {
            se(t, t.$ancestorComponent$ = n);
            break;
          }
      }
      s.$members$ && Object.entries(s.$members$).map(([n, [a]]) => {
        if (a & 31 && e.hasOwnProperty(n)) {
          const l = e[n];
          delete e[n], e[n] = l;
        }
      }), Me(e, t, s);
    }
    r();
  }
}, Ge = (e) => {
}, Je = (e) => x(void 0, null, function* () {
  if (!(g.$flags$ & 1)) {
    const t = b(e);
    t != null && t.$lazyInstance$ || t != null && t.$onReadyPromise$ && t.$onReadyPromise$.then(() => Ge());
  }
}), Xe = (e, t = {}) => {
  var s;
  const r = S(), n = [], a = t.exclude || [], l = B.customElements, o = y.head, i = /* @__PURE__ */ o.querySelector("meta[charset]"), $ = /* @__PURE__ */ y.createElement("style"), c = [];
  let u, f = !0;
  Object.assign(g, t), g.$resourcesUrl$ = new URL(t.resourcesUrl || "./", y.baseURI).href;
  let d = !1;
  if (e.map((m) => {
    m[1].map((v) => {
      var h;
      const p = {
        $flags$: v[0],
        $tagName$: v[1],
        $members$: v[2],
        $listeners$: v[3]
      };
      p.$flags$ & 4 && (d = !0), p.$members$ = v[2], p.$watchers$ = (h = v[4]) != null ? h : {};
      const w = p.$tagName$, ie = class extends HTMLElement {
        // StencilLazyHost
        constructor(L) {
          super(L), this.hasRegisteredEventListeners = !1, L = this, fe(L, p);
        }
        connectedCallback() {
          b(this), this.hasRegisteredEventListeners || (this.hasRegisteredEventListeners = !0), u && (clearTimeout(u), u = null), f ? c.push(this) : g.jmp(() => Ye(this));
        }
        disconnectedCallback() {
          g.jmp(() => Je(this));
        }
        componentOnReady() {
          return b(this).$onReadyPromise$;
        }
      };
      p.$lazyBundleId$ = m[0], !a.includes(w) && !l.get(w) && (n.push(w), l.define(
        w,
        ae(
          ie,
          p,
          1
          /* isElementConstructor */
        )
      ));
    });
  }), n.length > 0 && (d && ($.textContent += J), $.textContent += n.sort() + me, $.innerHTML.length)) {
    $.setAttribute("data-styles", "");
    const m = (s = g.$nonce$) != null ? s : X(y);
    m != null && $.setAttribute("nonce", m), o.insertBefore($, i ? i.nextSibling : o.firstChild);
  }
  f = !1, c.length ? c.map((m) => m.connectedCallback()) : g.jmp(() => u = setTimeout(re, 30)), r();
};
export {
  xe as H,
  Xe as b,
  we as h,
  ve as p,
  Qe as r
};
