var Bt = Object.defineProperty, Tt = Object.defineProperties;
var Rt = Object.getOwnPropertyDescriptors;
var mt = Object.getOwnPropertySymbols;
var Wt = Object.prototype.hasOwnProperty, Dt = Object.prototype.propertyIsEnumerable;
var it = (t, e, n) => e in t ? Bt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, gt = (t, e) => {
  for (var n in e || (e = {}))
    Wt.call(e, n) && it(t, n, e[n]);
  if (mt)
    for (var n of mt(e))
      Dt.call(e, n) && it(t, n, e[n]);
  return t;
}, pt = (t, e) => Tt(t, Rt(e));
var v = (t, e, n) => (it(t, typeof e != "symbol" ? e + "" : e, n), n);
var yt = (t, e, n) => new Promise((i, o) => {
  var s = (a) => {
    try {
      r(n.next(a));
    } catch (c) {
      o(c);
    }
  }, l = (a) => {
    try {
      r(n.throw(a));
    } catch (c) {
      o(c);
    }
  }, r = (a) => a.done ? i(a.value) : Promise.resolve(a.value).then(s, l);
  r((n = n.apply(t, e)).next());
});
function k() {
}
const ct = (t) => t;
function Ht(t, e) {
  for (const n in e)
    t[n] = e[n];
  return (
    /** @type {T & S} */
    t
  );
}
function Lt(t) {
  return t();
}
function bt() {
  return /* @__PURE__ */ Object.create(null);
}
function j(t) {
  t.forEach(Lt);
}
function H(t) {
  return typeof t == "function";
}
function It(t, e) {
  return t != t ? e == e : t !== e || t && typeof t == "object" || typeof t == "function";
}
let I;
function be(t, e) {
  return t === e ? !0 : (I || (I = document.createElement("a")), I.href = e, t === I.href);
}
function qt(t) {
  return Object.keys(t).length === 0;
}
function Ft(t, ...e) {
  if (t == null) {
    for (const i of e)
      i(void 0);
    return k;
  }
  const n = t.subscribe(...e);
  return n.unsubscribe ? () => n.unsubscribe() : n;
}
function we(t, e, n) {
  t.$$.on_destroy.push(Ft(e, n));
}
function q(t, e, n, i) {
  if (t) {
    const o = kt(t, e, n, i);
    return t[0](o);
  }
}
function kt(t, e, n, i) {
  return t[1] && i ? Ht(n.ctx.slice(), t[1](i(e))) : n.ctx;
}
function F(t, e, n, i) {
  if (t[2] && i) {
    const o = t[2](i(n));
    if (e.dirty === void 0)
      return o;
    if (typeof o == "object") {
      const s = [], l = Math.max(e.dirty.length, o.length);
      for (let r = 0; r < l; r += 1)
        s[r] = e.dirty[r] | o[r];
      return s;
    }
    return e.dirty | o;
  }
  return e.dirty;
}
function U(t, e, n, i, o, s) {
  if (o) {
    const l = kt(e, n, i, s);
    t.p(l, o);
  }
}
function J(t) {
  if (t.ctx.length > 32) {
    const e = [], n = t.ctx.length / 32;
    for (let i = 0; i < n; i++)
      e[i] = -1;
    return e;
  }
  return -1;
}
const jt = typeof window != "undefined";
let at = jt ? () => window.performance.now() : () => Date.now(), ut = jt ? (t) => requestAnimationFrame(t) : k;
const N = /* @__PURE__ */ new Set();
function Ot(t) {
  N.forEach((e) => {
    e.c(t) || (N.delete(e), e.f());
  }), N.size !== 0 && ut(Ot);
}
function ft(t) {
  let e;
  return N.size === 0 && ut(Ot), {
    promise: new Promise((n) => {
      N.add(e = { c: t, f: n });
    }),
    abort() {
      N.delete(e);
    }
  };
}
const Ce = typeof window != "undefined" ? window : typeof globalThis != "undefined" ? globalThis : (
  // @ts-ignore Node typings have this
  global
);
function M(t, e) {
  t.appendChild(e);
}
function Ut(t, e, n) {
  const i = dt(t);
  if (!i.getElementById(e)) {
    const o = L("style");
    o.id = e, o.textContent = n, St(i, o);
  }
}
function dt(t) {
  if (!t)
    return document;
  const e = t.getRootNode ? t.getRootNode() : t.ownerDocument;
  return e && /** @type {ShadowRoot} */
  e.host ? (
    /** @type {ShadowRoot} */
    e
  ) : t.ownerDocument;
}
function Jt(t) {
  const e = L("style");
  return e.textContent = "/* empty */", St(dt(t), e), e.sheet;
}
function St(t, e) {
  return M(
    /** @type {Document} */
    t.head || t,
    e
  ), e.sheet;
}
function ht(t, e, n) {
  t.insertBefore(e, n || null);
}
function B(t) {
  t.parentNode && t.parentNode.removeChild(t);
}
function xe(t, e) {
  for (let n = 0; n < t.length; n += 1)
    t[n] && t[n].d(e);
}
function L(t) {
  return document.createElement(t);
}
function wt(t) {
  return document.createElementNS("http://www.w3.org/2000/svg", t);
}
function At(t) {
  return document.createTextNode(t);
}
function st() {
  return At(" ");
}
function ve() {
  return At("");
}
function X(t, e, n, i) {
  return t.addEventListener(e, n, i), () => t.removeEventListener(e, n, i);
}
function Me(t) {
  return function(e) {
    return e.preventDefault(), t.call(this, e);
  };
}
function y(t, e, n) {
  n == null ? t.removeAttribute(e) : t.getAttribute(e) !== n && t.setAttribute(e, n);
}
function Ee(t, e, n) {
  const i = e.toLowerCase();
  i in t ? t[i] = typeof t[i] == "boolean" && n === "" ? !0 : n : e in t ? t[e] = typeof t[e] == "boolean" && n === "" ? !0 : n : y(t, e, n);
}
function Le(t) {
  return t === "" ? null : +t;
}
function Vt(t) {
  return Array.from(t.childNodes);
}
function ke(t, e) {
  e = "" + e, t.data !== e && (t.data = /** @type {string} */
  e);
}
function je(t, e) {
  t.value = e == null ? "" : e;
}
function Oe(t, e, n, i) {
  n == null ? t.style.removeProperty(e) : t.style.setProperty(e, n, "");
}
let V;
function Gt() {
  if (V === void 0) {
    V = !1;
    try {
      typeof window != "undefined" && window.parent && window.parent.document;
    } catch (t) {
      V = !0;
    }
  }
  return V;
}
function Se(t, e) {
  getComputedStyle(t).position === "static" && (t.style.position = "relative");
  const i = L("iframe");
  i.setAttribute(
    "style",
    "display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"
  ), i.setAttribute("aria-hidden", "true"), i.tabIndex = -1;
  const o = Gt();
  let s;
  return o ? (i.src = "data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>", s = X(
    window,
    "message",
    /** @param {MessageEvent} event */
    (l) => {
      l.source === i.contentWindow && e();
    }
  )) : (i.src = "about:blank", i.onload = () => {
    s = X(i.contentWindow, "resize", e), e();
  }), M(t, i), () => {
    (o || s && i.contentWindow) && s(), B(i);
  };
}
function Ae(t, e, n) {
  t.classList.toggle(e, !!n);
}
function Kt(t, e, { bubbles: n = !1, cancelable: i = !1 } = {}) {
  return new CustomEvent(t, { detail: e, bubbles: n, cancelable: i });
}
function Qt(t) {
  const e = {};
  return t.childNodes.forEach(
    /** @param {Element} node */
    (n) => {
      e[n.slot || "default"] = !0;
    }
  ), e;
}
const Z = /* @__PURE__ */ new Map();
let Y = 0;
function Xt(t) {
  let e = 5381, n = t.length;
  for (; n--; )
    e = (e << 5) - e ^ t.charCodeAt(n);
  return e >>> 0;
}
function Zt(t, e) {
  const n = { stylesheet: Jt(e), rules: {} };
  return Z.set(t, n), n;
}
function tt(t, e, n, i, o, s, l, r = 0) {
  const a = 16.666 / i;
  let c = `{
`;
  for (let p = 0; p <= 1; p += a) {
    const m = e + (n - e) * s(p);
    c += p * 100 + `%{${l(m, 1 - m)}}
`;
  }
  const _ = c + `100% {${l(n, 1 - n)}}
}`, $ = `__svelte_${Xt(_)}_${r}`, g = dt(t), { stylesheet: u, rules: d } = Z.get(g) || Zt(g, t);
  d[$] || (d[$] = !0, u.insertRule(`@keyframes ${$} ${_}`, u.cssRules.length));
  const h = t.style.animation || "";
  return t.style.animation = `${h ? `${h}, ` : ""}${$} ${i}ms linear ${o}ms 1 both`, Y += 1, $;
}
function et(t, e) {
  const n = (t.style.animation || "").split(", "), i = n.filter(
    e ? (s) => s.indexOf(e) < 0 : (s) => s.indexOf("__svelte") === -1
    // remove all Svelte animations
  ), o = n.length - i.length;
  o && (t.style.animation = i.join(", "), Y -= o, Y || Yt());
}
function Yt() {
  ut(() => {
    Y || (Z.forEach((t) => {
      const { ownerNode: e } = t.stylesheet;
      e && B(e);
    }), Z.clear());
  });
}
let D;
function W(t) {
  D = t;
}
function Nt() {
  if (!D)
    throw new Error("Function called outside component initialization");
  return D;
}
function Ne(t) {
  Nt().$$.on_mount.push(t);
}
function ze(t) {
  Nt().$$.on_destroy.push(t);
}
const A = [], rt = [];
let z = [];
const Ct = [], te = /* @__PURE__ */ Promise.resolve();
let lt = !1;
function ee() {
  lt || (lt = !0, te.then(nt));
}
function P(t) {
  z.push(t);
}
const ot = /* @__PURE__ */ new Set();
let S = 0;
function nt() {
  if (S !== 0)
    return;
  const t = D;
  do {
    try {
      for (; S < A.length; ) {
        const e = A[S];
        S++, W(e), ne(e.$$);
      }
    } catch (e) {
      throw A.length = 0, S = 0, e;
    }
    for (W(null), A.length = 0, S = 0; rt.length; )
      rt.pop()();
    for (let e = 0; e < z.length; e += 1) {
      const n = z[e];
      ot.has(n) || (ot.add(n), n());
    }
    z.length = 0;
  } while (A.length);
  for (; Ct.length; )
    Ct.pop()();
  lt = !1, ot.clear(), W(t);
}
function ne(t) {
  if (t.fragment !== null) {
    t.update(), j(t.before_update);
    const e = t.dirty;
    t.dirty = [-1], t.fragment && t.fragment.p(t.ctx, e), t.after_update.forEach(P);
  }
}
function ie(t) {
  const e = [], n = [];
  z.forEach((i) => t.indexOf(i) === -1 ? e.push(i) : n.push(i)), n.forEach((i) => i()), z = e;
}
let T;
function $t() {
  return T || (T = Promise.resolve(), T.then(() => {
    T = null;
  })), T;
}
function O(t, e, n) {
  t.dispatchEvent(Kt(`${e ? "intro" : "outro"}${n}`));
}
const K = /* @__PURE__ */ new Set();
let E;
function Pe() {
  E = {
    r: 0,
    c: [],
    p: E
    // parent group
  };
}
function Be() {
  E.r || j(E.c), E = E.p;
}
function R(t, e) {
  t && t.i && (K.delete(t), t.i(e));
}
function G(t, e, n, i) {
  if (t && t.o) {
    if (K.has(t))
      return;
    K.add(t), E.c.push(() => {
      K.delete(t), i && (n && t.d(1), i());
    }), t.o(e);
  } else
    i && i();
}
const _t = { duration: 0 };
function Te(t, e, n) {
  const i = { direction: "in" };
  let o = e(t, n, i), s = !1, l, r, a = 0;
  function c() {
    l && et(t, l);
  }
  function _() {
    const {
      delay: g = 0,
      duration: u = 300,
      easing: d = ct,
      tick: h = k,
      css: p
    } = o || _t;
    p && (l = tt(t, 0, 1, u, g, d, p, a++)), h(0, 1);
    const m = at() + g, w = m + u;
    r && r.abort(), s = !0, P(() => O(t, !0, "start")), r = ft((C) => {
      if (s) {
        if (C >= w)
          return h(1, 0), O(t, !0, "end"), c(), s = !1;
        if (C >= m) {
          const b = d((C - m) / u);
          h(b, 1 - b);
        }
      }
      return s;
    });
  }
  let $ = !1;
  return {
    start() {
      $ || ($ = !0, et(t), H(o) ? (o = o(i), $t().then(_)) : _());
    },
    invalidate() {
      $ = !1;
    },
    end() {
      s && (c(), s = !1);
    }
  };
}
function Re(t, e, n) {
  const i = { direction: "out" };
  let o = e(t, n, i), s = !0, l;
  const r = E;
  r.r += 1;
  let a;
  function c() {
    const {
      delay: _ = 0,
      duration: $ = 300,
      easing: g = ct,
      tick: u = k,
      css: d
    } = o || _t;
    d && (l = tt(t, 1, 0, $, _, g, d));
    const h = at() + _, p = h + $;
    P(() => O(t, !1, "start")), "inert" in t && (a = /** @type {HTMLElement} */
    t.inert, t.inert = !0), ft((m) => {
      if (s) {
        if (m >= p)
          return u(0, 1), O(t, !1, "end"), --r.r || j(r.c), !1;
        if (m >= h) {
          const w = g((m - h) / $);
          u(1 - w, w);
        }
      }
      return s;
    });
  }
  return H(o) ? $t().then(() => {
    o = o(i), c();
  }) : c(), {
    end(_) {
      _ && "inert" in t && (t.inert = a), _ && o.tick && o.tick(1, 0), s && (l && et(t, l), s = !1);
    }
  };
}
function We(t, e, n, i) {
  let s = e(t, n, { direction: "both" }), l = i ? 0 : 1, r = null, a = null, c = null, _;
  function $() {
    c && et(t, c);
  }
  function g(d, h) {
    const p = (
      /** @type {Program['d']} */
      d.b - l
    );
    return h *= Math.abs(p), {
      a: l,
      b: d.b,
      d: p,
      duration: h,
      start: d.start,
      end: d.start + h,
      group: d.group
    };
  }
  function u(d) {
    const {
      delay: h = 0,
      duration: p = 300,
      easing: m = ct,
      tick: w = k,
      css: C
    } = s || _t, b = {
      start: at() + h,
      b: d
    };
    d || (b.group = E, E.r += 1), "inert" in t && (d ? _ !== void 0 && (t.inert = _) : (_ = /** @type {HTMLElement} */
    t.inert, t.inert = !0)), r || a ? a = b : (C && ($(), c = tt(t, l, d, p, h, m, C)), d && w(0, 1), r = g(b, p), P(() => O(t, d, "start")), ft((f) => {
      if (a && f > a.start && (r = g(a, p), a = null, O(t, r.b, "start"), C && ($(), c = tt(
        t,
        l,
        r.b,
        r.duration,
        0,
        m,
        s.css
      ))), r) {
        if (f >= r.end)
          w(l = r.b, 1 - l), O(t, r.b, "end"), a || (r.b ? $() : --r.group.r || j(r.group.c)), r = null;
        else if (f >= r.start) {
          const x = f - r.start;
          l = r.a + r.d * m(x / r.duration), w(l, 1 - l);
        }
      }
      return !!(r || a);
    }));
  }
  return {
    run(d) {
      H(s) ? $t().then(() => {
        s = s({ direction: d ? "in" : "out" }), u(d);
      }) : u(d);
    },
    end() {
      $(), r = a = null;
    }
  };
}
function De(t) {
  return (t == null ? void 0 : t.length) !== void 0 ? t : Array.from(t);
}
function se(t, e, n) {
  const { fragment: i, after_update: o } = t.$$;
  i && i.m(e, n), P(() => {
    const s = t.$$.on_mount.map(Lt).filter(H);
    t.$$.on_destroy ? t.$$.on_destroy.push(...s) : j(s), t.$$.on_mount = [];
  }), o.forEach(P);
}
function oe(t, e) {
  const n = t.$$;
  n.fragment !== null && (ie(n.after_update), j(n.on_destroy), n.fragment && n.fragment.d(e), n.on_destroy = n.fragment = null, n.ctx = []);
}
function re(t, e) {
  t.$$.dirty[0] === -1 && (A.push(t), ee(), t.$$.dirty.fill(0)), t.$$.dirty[e / 31 | 0] |= 1 << e % 31;
}
function le(t, e, n, i, o, s, l = null, r = [-1]) {
  const a = D;
  W(t);
  const c = t.$$ = {
    fragment: null,
    ctx: [],
    // state
    props: s,
    update: k,
    not_equal: o,
    bound: bt(),
    // lifecycle
    on_mount: [],
    on_destroy: [],
    on_disconnect: [],
    before_update: [],
    after_update: [],
    context: new Map(e.context || (a ? a.$$.context : [])),
    // everything else
    callbacks: bt(),
    dirty: r,
    skip_bound: !1,
    root: e.target || a.$$.root
  };
  l && l(c.root);
  let _ = !1;
  if (c.ctx = n ? n(t, e.props || {}, ($, g, ...u) => {
    const d = u.length ? u[0] : g;
    return c.ctx && o(c.ctx[$], c.ctx[$] = d) && (!c.skip_bound && c.bound[$] && c.bound[$](d), _ && re(t, $)), g;
  }) : [], c.update(), _ = !0, j(c.before_update), c.fragment = i ? i(c.ctx) : !1, e.target) {
    if (e.hydrate) {
      const $ = Vt(e.target);
      c.fragment && c.fragment.l($), $.forEach(B);
    } else
      c.fragment && c.fragment.c();
    e.intro && R(t.$$.fragment), se(t, e.target, e.anchor), nt();
  }
  W(a);
}
let zt;
typeof HTMLElement == "function" && (zt = class extends HTMLElement {
  constructor(e, n, i) {
    super();
    /** The Svelte component constructor */
    v(this, "$$ctor");
    /** Slots */
    v(this, "$$s");
    /** The Svelte component instance */
    v(this, "$$c");
    /** Whether or not the custom element is connected */
    v(this, "$$cn", !1);
    /** Component props data */
    v(this, "$$d", {});
    /** `true` if currently in the process of reflecting component props back to attributes */
    v(this, "$$r", !1);
    /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
    v(this, "$$p_d", {});
    /** @type {Record<string, Function[]>} Event listeners */
    v(this, "$$l", {});
    /** @type {Map<Function, Function>} Event listener unsubscribe functions */
    v(this, "$$l_u", /* @__PURE__ */ new Map());
    this.$$ctor = e, this.$$s = n, i && this.attachShadow({ mode: "open" });
  }
  addEventListener(e, n, i) {
    if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(n), this.$$c) {
      const o = this.$$c.$on(e, n);
      this.$$l_u.set(n, o);
    }
    super.addEventListener(e, n, i);
  }
  removeEventListener(e, n, i) {
    if (super.removeEventListener(e, n, i), this.$$c) {
      const o = this.$$l_u.get(n);
      o && (o(), this.$$l_u.delete(n));
    }
  }
  connectedCallback() {
    return yt(this, null, function* () {
      if (this.$$cn = !0, !this.$$c) {
        let e = function(s) {
          return () => {
            let l;
            return {
              c: function() {
                l = L("slot"), s !== "default" && y(l, "name", s);
              },
              /**
               * @param {HTMLElement} target
               * @param {HTMLElement} [anchor]
               */
              m: function(c, _) {
                ht(c, l, _);
              },
              d: function(c) {
                c && B(l);
              }
            };
          };
        };
        if (yield Promise.resolve(), !this.$$cn || this.$$c)
          return;
        const n = {}, i = Qt(this);
        for (const s of this.$$s)
          s in i && (n[s] = [e(s)]);
        for (const s of this.attributes) {
          const l = this.$$g_p(s.name);
          l in this.$$d || (this.$$d[l] = Q(l, s.value, this.$$p_d, "toProp"));
        }
        for (const s in this.$$p_d)
          !(s in this.$$d) && this[s] !== void 0 && (this.$$d[s] = this[s], delete this[s]);
        this.$$c = new this.$$ctor({
          target: this.shadowRoot || this,
          props: pt(gt({}, this.$$d), {
            $$slots: n,
            $$scope: {
              ctx: []
            }
          })
        });
        const o = () => {
          this.$$r = !0;
          for (const s in this.$$p_d)
            if (this.$$d[s] = this.$$c.$$.ctx[this.$$c.$$.props[s]], this.$$p_d[s].reflect) {
              const l = Q(
                s,
                this.$$d[s],
                this.$$p_d,
                "toAttribute"
              );
              l == null ? this.removeAttribute(this.$$p_d[s].attribute || s) : this.setAttribute(this.$$p_d[s].attribute || s, l);
            }
          this.$$r = !1;
        };
        this.$$c.$$.after_update.push(o), o();
        for (const s in this.$$l)
          for (const l of this.$$l[s]) {
            const r = this.$$c.$on(s, l);
            this.$$l_u.set(l, r);
          }
        this.$$l = {};
      }
    });
  }
  // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
  // and setting attributes through setAttribute etc, this is helpful
  attributeChangedCallback(e, n, i) {
    var o;
    this.$$r || (e = this.$$g_p(e), this.$$d[e] = Q(e, i, this.$$p_d, "toProp"), (o = this.$$c) == null || o.$set({ [e]: this.$$d[e] }));
  }
  disconnectedCallback() {
    this.$$cn = !1, Promise.resolve().then(() => {
      !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$c = void 0);
    });
  }
  $$g_p(e) {
    return Object.keys(this.$$p_d).find(
      (n) => this.$$p_d[n].attribute === e || !this.$$p_d[n].attribute && n.toLowerCase() === e
    ) || e;
  }
});
function Q(t, e, n, i) {
  var s;
  const o = (s = n[t]) == null ? void 0 : s.type;
  if (e = o === "Boolean" && typeof e != "boolean" ? e != null : e, !i || !n[t])
    return e;
  if (i === "toAttribute")
    switch (o) {
      case "Object":
      case "Array":
        return e == null ? null : JSON.stringify(e);
      case "Boolean":
        return e ? "" : null;
      case "Number":
        return e == null ? null : e;
      default:
        return e;
    }
  else
    switch (o) {
      case "Object":
      case "Array":
        return e && JSON.parse(e);
      case "Boolean":
        return e;
      case "Number":
        return e != null ? +e : e;
      default:
        return e;
    }
}
function ce(t, e, n, i, o, s) {
  let l = class extends zt {
    constructor() {
      super(t, n, o), this.$$p_d = e;
    }
    static get observedAttributes() {
      return Object.keys(e).map(
        (r) => (e[r].attribute || r).toLowerCase()
      );
    }
  };
  return Object.keys(e).forEach((r) => {
    Object.defineProperty(l.prototype, r, {
      get() {
        return this.$$c && r in this.$$c ? this.$$c[r] : this.$$d[r];
      },
      set(a) {
        var c;
        a = Q(r, a, e), this.$$d[r] = a, (c = this.$$c) == null || c.$set({ [r]: a });
      }
    });
  }), i.forEach((r) => {
    Object.defineProperty(l.prototype, r, {
      get() {
        var a;
        return (a = this.$$c) == null ? void 0 : a[r];
      }
    });
  }), t.element = /** @type {any} */
  l, l;
}
class ae {
  constructor() {
    /**
     * ### PRIVATE API
     *
     * Do not use, may change at any time
     *
     * @type {any}
     */
    v(this, "$$");
    /**
     * ### PRIVATE API
     *
     * Do not use, may change at any time
     *
     * @type {any}
     */
    v(this, "$$set");
  }
  /** @returns {void} */
  $destroy() {
    oe(this, 1), this.$destroy = k;
  }
  /**
   * @template {Extract<keyof Events, string>} K
   * @param {K} type
   * @param {((e: Events[K]) => void) | null | undefined} callback
   * @returns {() => void}
   */
  $on(e, n) {
    if (!H(n))
      return k;
    const i = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
    return i.push(n), () => {
      const o = i.indexOf(n);
      o !== -1 && i.splice(o, 1);
    };
  }
  /**
   * @param {Partial<Props>} props
   * @returns {void}
   */
  $set(e) {
    this.$$set && !qt(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
  }
}
const ue = "4";
typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(ue);
function fe(t) {
  Ut(t, "svelte-1m890h5", "*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.CashierModalWindow{container-type:inline-size;container-name:confirm-modal;display:flex;position:absolute;align-items:center;justify-content:center;width:100%;height:100%;z-index:4;top:0;left:0;background-color:var(--emw--color-background, rgba(0, 0, 0, 0.1))}.CashierModalContainer{width:500px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:var(--emw--spacing-large, 20px);position:relative;padding:var(--emw--spacing-medium, 15px);min-height:200px;box-shadow:0 2px 6px 0 var(--mmw--color-black-transparency-10, rgba(0, 0, 0, 0.1));border-radius:var(--mmw--border-radius-large-plus, 10px);background-color:var(--emw--color-white, #fff)}.ModalOkBtn{color:var(--emw--color-white, #fff);display:flex;align-items:center;justify-content:center;font-size:var(--emw--font-size-medium, 16px);font-style:normal;font-weight:var(--emw--font-weight-normal, 400);font-family:inherit;height:46px;width:100%;border:none;border-radius:50px;line-height:125%;background-color:var(--emw--color-primary, #7EC51E);margin-top:var(--emw--spacing-small, 12px);cursor:pointer}.ModalCloseBtn{position:absolute;display:flex;justify-content:space-between;align-items:center;padding:var(--emw--spacing-small, 12px) var(--emw--spacing-small, 12px);height:inherit;right:0;top:0;cursor:pointer}@container confirm-modal (max-width: 750px){.CashierModalContainer{margin:var(--emw--spacing-x-large, 30px) var(--emw--spacing-small, 12px)}}");
}
const de = (t) => ({}), xt = (t) => ({}), he = (t) => ({}), vt = (t) => ({}), $e = (t) => ({}), Mt = (t) => ({ class: "CashierModalText" }), _e = (t) => ({}), Et = (t) => ({ class: "CashierModalTitle" });
function me(t) {
  let e, n;
  return {
    c() {
      e = wt("svg"), n = wt("path"), y(n, "d", "M12.7711 0.229435C13.0582 0.517619 13.0755 0.973729 12.8215 1.28141L12.7711 1.33721L7.60685 6.50068L12.7711 11.6641C12.9128 11.8066 12.9944 11.998 12.999 12.1988C13.0035 12.3997 12.9308 12.5946 12.7957 12.7433C12.6606 12.892 12.4735 12.9832 12.2731 12.9979C12.0728 13.0126 11.8744 12.9497 11.7191 12.8223L11.6633 12.7719L6.49958 7.60791L1.3359 12.7719C1.19349 12.9136 1.00207 12.9952 0.801203 12.9998C0.60034 13.0044 0.405398 12.9316 0.256676 12.7965C0.107955 12.6614 0.0168256 12.4744 0.00212786 12.274C-0.0125699 12.0736 0.0502877 11.8753 0.177706 11.7199L0.228086 11.6641L5.3923 6.50068L0.228086 1.33721C0.0863637 1.1948 0.00478102 1.00338 0.000203544 0.802529C-0.00437393 0.601674 0.0684038 0.40674 0.203491 0.258024C0.338579 0.109308 0.525647 0.0181829 0.726024 0.00348576C0.9264 -0.0112114 1.12476 0.0516437 1.28011 0.179057L1.3359 0.229435L6.49958 5.39345L11.6633 0.229435C11.736 0.156695 11.8223 0.0989949 11.9174 0.0596283C12.0124 0.0202617 12.1143 0 12.2172 0C12.32 0 12.4219 0.0202617 12.5169 0.0596283C12.612 0.0989949 12.6983 0.156695 12.7711 0.229435Z"), y(n, "fill", "#111111"), y(e, "xmlns", "http://www.w3.org/2000/svg"), y(e, "width", "13"), y(e, "height", "20"), y(e, "viewBox", "0 0 13 13"), y(e, "fill", "none");
    },
    m(i, o) {
      ht(i, e, o), M(e, n);
    },
    p: k,
    d(i) {
      i && B(e);
    }
  };
}
function ge(t) {
  let e, n, i, o, s, l, r, a, c, _, $;
  const g = (
    /*#slots*/
    t[6].title
  ), u = q(
    g,
    t,
    /*$$scope*/
    t[5],
    Et
  ), d = (
    /*#slots*/
    t[6].text
  ), h = q(
    d,
    t,
    /*$$scope*/
    t[5],
    Mt
  ), p = (
    /*#slots*/
    t[6].confirm
  ), m = q(
    p,
    t,
    /*$$scope*/
    t[5],
    vt
  ), w = (
    /*#slots*/
    t[6].close
  ), C = q(
    w,
    t,
    /*$$scope*/
    t[5],
    xt
  ), b = C || me();
  return {
    c() {
      e = L("div"), n = L("div"), i = L("div"), u && u.c(), o = st(), h && h.c(), s = st(), l = L("span"), m && m.c(), r = st(), a = L("span"), b && b.c(), y(l, "class", "ModalOkBtn"), y(l, "role", "button"), y(a, "class", "ModalCloseBtn"), y(a, "role", "button"), y(i, "class", "CashierModalContainer"), y(i, "part", "CashierModalContainer"), y(n, "class", "CashierModalWindow"), y(n, "part", "CashierModalWindow"), y(n, "id", "Modal"), y(e, "part", "CustomStylingContainer");
    },
    m(f, x) {
      ht(f, e, x), M(e, n), M(n, i), u && u.m(i, null), M(i, o), h && h.m(i, null), M(i, s), M(i, l), m && m.m(l, null), M(i, r), M(i, a), b && b.m(a, null), t[7](e), c = !0, _ || ($ = [
        X(
          l,
          "click",
          /*confirm*/
          t[2]
        ),
        X(
          a,
          "click",
          /*close*/
          t[1]
        )
      ], _ = !0);
    },
    p(f, [x]) {
      u && u.p && (!c || x & /*$$scope*/
      32) && U(
        u,
        g,
        f,
        /*$$scope*/
        f[5],
        c ? F(
          g,
          /*$$scope*/
          f[5],
          x,
          _e
        ) : J(
          /*$$scope*/
          f[5]
        ),
        Et
      ), h && h.p && (!c || x & /*$$scope*/
      32) && U(
        h,
        d,
        f,
        /*$$scope*/
        f[5],
        c ? F(
          d,
          /*$$scope*/
          f[5],
          x,
          $e
        ) : J(
          /*$$scope*/
          f[5]
        ),
        Mt
      ), m && m.p && (!c || x & /*$$scope*/
      32) && U(
        m,
        p,
        f,
        /*$$scope*/
        f[5],
        c ? F(
          p,
          /*$$scope*/
          f[5],
          x,
          he
        ) : J(
          /*$$scope*/
          f[5]
        ),
        vt
      ), C && C.p && (!c || x & /*$$scope*/
      32) && U(
        C,
        w,
        f,
        /*$$scope*/
        f[5],
        c ? F(
          w,
          /*$$scope*/
          f[5],
          x,
          de
        ) : J(
          /*$$scope*/
          f[5]
        ),
        xt
      );
    },
    i(f) {
      c || (R(u, f), R(h, f), R(m, f), R(b, f), c = !0);
    },
    o(f) {
      G(u, f), G(h, f), G(m, f), G(b, f), c = !1;
    },
    d(f) {
      f && B(e), u && u.d(f), h && h.d(f), m && m.d(f), b && b.d(f), t[7](null), _ = !1, j($);
    }
  };
}
function pe(t, e, n) {
  let { $$slots: i = {}, $$scope: o } = e, { clientstyling: s = "" } = e, { clientstylingurl: l = "" } = e, r;
  const a = () => {
    window.postMessage({ type: "CloseModal" }, window.location.href);
  }, c = () => {
    window.postMessage({ type: "ConfirmModal" }, window.location.href), a();
  }, _ = () => {
    let u = document.createElement("style");
    u.innerHTML = s, r.appendChild(u);
  }, $ = () => {
    let u = new URL(l), d = document.createElement("style");
    fetch(u.href).then((h) => h.text()).then((h) => {
      d.innerHTML = h, setTimeout(
        () => {
          r.appendChild(d);
        },
        1
      );
    });
  };
  function g(u) {
    rt[u ? "unshift" : "push"](() => {
      r = u, n(0, r);
    });
  }
  return t.$$set = (u) => {
    "clientstyling" in u && n(3, s = u.clientstyling), "clientstylingurl" in u && n(4, l = u.clientstylingurl), "$$scope" in u && n(5, o = u.$$scope);
  }, t.$$.update = () => {
    t.$$.dirty & /*clientstyling, customStylingContainer*/
    9 && s && r && _(), t.$$.dirty & /*clientstylingurl, customStylingContainer*/
    17 && l && r && $();
  }, [
    r,
    a,
    c,
    s,
    l,
    o,
    i,
    g
  ];
}
class Pt extends ae {
  constructor(e) {
    super(), le(this, e, pe, ge, It, { clientstyling: 3, clientstylingurl: 4 }, fe);
  }
  get clientstyling() {
    return this.$$.ctx[3];
  }
  set clientstyling(e) {
    this.$$set({ clientstyling: e }), nt();
  }
  get clientstylingurl() {
    return this.$$.ctx[4];
  }
  set clientstylingurl(e) {
    this.$$set({ clientstylingurl: e }), nt();
  }
}
ce(Pt, { clientstyling: {}, clientstylingurl: {} }, ["title", "text", "confirm", "close"], [], !0);
const He = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: Pt
}, Symbol.toStringTag, { value: "Module" }));
export {
  rt as A,
  X as B,
  be as C,
  Ee as D,
  ce as E,
  P as F,
  Ce as G,
  Ne as H,
  Le as I,
  Ae as J,
  De as K,
  xe as L,
  Me as M,
  je as N,
  wt as O,
  Oe as P,
  ct as Q,
  We as R,
  ae as S,
  Se as T,
  ze as U,
  Re as V,
  Te as W,
  He as X,
  Ft as a,
  le as b,
  Ut as c,
  q as d,
  B as e,
  nt as f,
  R as g,
  J as h,
  H as i,
  F as j,
  Pe as k,
  Be as l,
  ht as m,
  k as n,
  M as o,
  L as p,
  st as q,
  j as r,
  It as s,
  G as t,
  U as u,
  y as v,
  we as w,
  ve as x,
  ke as y,
  At as z
};
