import { defineComponent as S, computed as d, openBlock as p, createBlock as I, resolveDynamicComponent as G, unref as m, normalizeClass as X, withCtx as W, createTextVNode as ne, toDisplayString as he, ref as b, watch as oe, nextTick as se, createElementBlock as L, mergeProps as M, renderSlot as ge, createCommentVNode as Z, createElementVNode as R, Fragment as j, toHandlers as Se, withModifiers as Ae, getCurrentInstance as Ce, provide as Ne, inject as Re, toRaw as Fe, toRefs as ae, onMounted as F, onBeforeUnmount as J, normalizeStyle as He, reactive as ie, onBeforeMount as ke, renderList as le, createVNode as Me, TransitionGroup as Ue, createApp as ze } from "vue";
var Ve = Object.defineProperty, Ge = Object.defineProperties, Xe = Object.getOwnPropertyDescriptors, U = Object.getOwnPropertySymbols, ye = Object.prototype.hasOwnProperty, Te = Object.prototype.propertyIsEnumerable, ee = (e, t, n) => t in e ? Ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, y = (e, t) => {
  for (var n in t || (t = {}))
    ye.call(t, n) && ee(e, n, t[n]);
  if (U)
    for (var n of U(t))
      Te.call(t, n) && ee(e, n, t[n]);
  return e;
}, te = (e, t) => Ge(e, Xe(t)), _e = (e, t) => {
  var n = {};
  for (var o in e)
    ye.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && U)
    for (var o of U(e))
      t.indexOf(o) < 0 && Te.call(e, o) && (n[o] = e[o]);
  return n;
}, We = (e, t, n) => (ee(e, typeof t != "symbol" ? t + "" : t, n), n);
const q = (e) => typeof e == "function", K = (e) => typeof e == "string", Be = (e) => K(e) && e.trim().length > 0, Je = (e) => typeof e == "number", Q = (e) => typeof e > "u", N = (e) => typeof e == "object" && e !== null, qe = (e) => $(e, "tag") && Be(e.tag), Ee = (e) => window.TouchEvent && e instanceof TouchEvent, we = (e) => $(e, "component") && Oe(e.component), Ke = (e) => q(e) || N(e), Oe = (e) => !Q(e) && (K(e) || Ke(e) || we(e)), Qe = (e) => N(e) && ["height", "width", "right", "left", "top", "bottom"].every((t) => Je(e[t])), $ = (e, t) => (N(e) || q(e)) && t in e, A = (e, t, n) => $(e, t) ? e[t] : n, Ye = ((e) => () => e++)(0);
function ue(e) {
  return Ee(e) ? e.targetTouches[0].clientX : e.clientX;
}
function de(e) {
  return Ee(e) ? e.targetTouches[0].clientY : e.clientY;
}
const Ze = (e) => {
  Q(e.remove) ? e.parentNode && e.parentNode.removeChild(e) : e.remove();
}, H = (e) => we(e) ? H(e.component) : qe(e) ? S({
  render() {
    return e;
  }
}) : typeof e == "string" ? e : Fe(m(e)), je = (e) => {
  if (typeof e == "string")
    return e;
  const t = $(e, "props") && N(e.props) ? e.props : {}, n = $(e, "listeners") && N(e.listeners) ? e.listeners : {};
  return { component: H(e), props: t, listeners: n };
}, et = () => typeof window < "u", be = (e) => {
  const t = e, {
    position: n,
    container: o,
    newestOnTop: a,
    maxToasts: i,
    transition: s,
    toastDefaults: f,
    eventBus: c,
    filterBeforeCreate: u,
    filterToasts: v,
    containerClassName: B,
    rootComponent: h
  } = t, x = _e(t, [
    "position",
    "container",
    "newestOnTop",
    "maxToasts",
    "transition",
    "toastDefaults",
    "eventBus",
    "filterBeforeCreate",
    "filterToasts",
    "containerClassName",
    "rootComponent"
  ]), E = {
    position: n,
    container: o,
    newestOnTop: a,
    maxToasts: i,
    transition: s,
    toastDefaults: f,
    eventBus: c,
    filterBeforeCreate: u,
    filterToasts: v,
    containerClassName: B,
    rootComponent: h,
    defaultToastProps: x
  };
  return Object.keys(E).forEach((k) => typeof E[k] > "u" && delete E[k]), E;
}, tt = (e, t) => {
  const { draggablePercent: n, draggable: o } = ae(t), a = d(() => e.value ? e.value.getBoundingClientRect() : void 0), i = b(!1), s = b(!1), f = b({ x: 0, y: 0 }), c = b(0), u = d(() => s.value ? f.value.x - c.value : 0), v = b(!1), B = d(() => Qe(a.value) ? (a.value.right - a.value.left) * n.value : 0);
  oe([e, c, f, u, B, s], () => {
    e.value && (e.value.style.transform = "translateX(0px)", e.value.style.opacity = "1", c.value === f.value.x ? e.value.style.transition = "" : s.value ? (e.value.style.transform = `translateX(${u.value}px)`, e.value.style.opacity = `${1 - Math.abs(u.value / B.value)}`) : e.value.style.transition = "transform 0.2s, opacity 0.2s");
  });
  const h = (D) => {
    i.value = !0, f.value = { x: ue(D), y: de(D) }, c.value = f.value.x;
  }, x = (D) => {
    i.value && (s.value = !0, D.preventDefault(), f.value = { x: ue(D), y: de(D) });
  }, E = () => {
    i.value = !1, s.value && (Math.abs(u.value) >= B.value ? v.value = !0 : setTimeout(() => {
      s.value = !1;
    }));
  };
  return F(() => {
    o.value && e.value && (e.value.addEventListener("touchstart", h, {
      passive: !0
    }), e.value.addEventListener("mousedown", h), addEventListener("touchmove", x, { passive: !1 }), addEventListener("mousemove", x), addEventListener("touchend", E), addEventListener("mouseup", E));
  }), J(() => {
    o.value && e.value && (e.value.removeEventListener("touchstart", h), e.value.removeEventListener("mousedown", h), removeEventListener("touchmove", x), removeEventListener("mousemove", x), removeEventListener("touchend", E), removeEventListener("mouseup", E));
  }), { dragComplete: v, beingDragged: s };
}, nt = (e, t) => {
  const { pauseOnFocusLoss: n } = ae(t), o = b(!0), a = () => o.value = !0, i = () => o.value = !1;
  return F(() => {
    e.value && n.value && (addEventListener("blur", i), addEventListener("focus", a));
  }), J(() => {
    e.value && n.value && (removeEventListener("blur", i), removeEventListener("focus", a));
  }), { focused: o };
}, ot = (e, t) => {
  const { pauseOnHover: n } = ae(t), o = b(!1), a = () => o.value = !0, i = () => o.value = !1;
  return F(() => {
    e.value && n.value && (e.value.addEventListener("mouseenter", a), e.value.addEventListener("mouseleave", i));
  }), J(() => {
    e.value && n.value && (e.value.removeEventListener("mouseenter", a), e.value.removeEventListener("mouseleave", i));
  }), { hovering: o };
};
var T;
(function(e) {
  e.SUCCESS = "success", e.ERROR = "error", e.WARNING = "warning", e.INFO = "info", e.DEFAULT = "default";
})(T || (T = {}));
var z;
(function(e) {
  e.TOP_LEFT = "top-left", e.TOP_CENTER = "top-center", e.TOP_RIGHT = "top-right", e.BOTTOM_LEFT = "bottom-left", e.BOTTOM_CENTER = "bottom-center", e.BOTTOM_RIGHT = "bottom-right";
})(z || (z = {}));
var _;
(function(e) {
  e.ADD = "add", e.DISMISS = "dismiss", e.UPDATE = "update", e.CLEAR = "clear", e.UPDATE_DEFAULTS = "update_defaults";
})(_ || (_ = {}));
const P = "Vue-Toastification";
class re {
  constructor() {
    We(this, "allHandlers", {});
  }
  getHandlers(t) {
    return this.allHandlers[t] || [];
  }
  on(t, n) {
    const o = this.getHandlers(t);
    o.push(n), this.allHandlers[t] = o;
  }
  off(t, n) {
    const o = this.getHandlers(t);
    o.splice(o.indexOf(n) >>> 0, 1);
  }
  emit(t, n) {
    this.getHandlers(t).forEach((a) => a(n));
  }
}
const st = (e) => ["on", "off", "emit"].every((t) => $(e, t) && q(e[t])), Le = new re(), xe = () => new re(), fe = () => {
}, ve = (e) => () => e, l = {
  id: 0,
  accessibility: () => ({
    toastRole: "alert",
    closeButtonLabel: "close"
  }),
  bodyClassName: () => [],
  closeButton: () => "button",
  closeButtonClassName: () => [],
  closeOnClick: !0,
  draggable: !0,
  draggablePercent: 0.6,
  eventBus: xe,
  hideProgressBar: !1,
  icon: () => !0,
  pauseOnFocusLoss: !0,
  pauseOnHover: !0,
  position: z.TOP_RIGHT,
  rtl: !1,
  showCloseButtonOnHover: !1,
  timeout: 5e3,
  toastClassName: () => [],
  onClick: fe,
  onClose: fe,
  type: T.DEFAULT,
  description: ""
}, O = {
  position: l.position,
  container: () => document.body,
  containerClassName: () => [],
  eventBus: xe,
  filterBeforeCreate: ve((e) => e),
  filterToasts: ve((e) => e),
  maxToasts: 20,
  newestOnTop: !0,
  toastDefaults: () => ({}),
  transition: `${P}__bounce`,
  defaultToastProps: () => ({}),
  rootComponent: () => St
}, at = /* @__PURE__ */ ne(" × "), rt = /* @__PURE__ */ S({
  props: {
    component: { default: l.closeButton },
    classNames: { default: l.closeButtonClassName },
    showOnHover: { type: Boolean, default: l.showCloseButtonOnHover },
    ariaLabel: { default: l.accessibility().closeButtonLabel }
  },
  setup(e) {
    const t = e, n = d(() => t.component !== !1 ? H(t.component) : "button"), o = d(() => {
      const a = [`${P}__close-button`];
      return t.showOnHover && a.push("show-on-hover"), a.concat(t.classNames);
    });
    return (a, i) => (p(), I(G(m(n)), M({
      "aria-label": e.ariaLabel,
      class: m(o)
    }, a.$attrs), {
      default: W(() => [
        at
      ]),
      _: 1
    }, 16, ["aria-label", "class"]));
  }
});
var Y = (e, t) => {
  const n = e.__vccOpts || e;
  for (const [o, a] of t)
    n[o] = a;
  return n;
};
const ct = {}, it = {
  "aria-hidden": "true",
  focusable: "false",
  role: "img",
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 576 512"
}, lt = /* @__PURE__ */ R("path", {
  fill: "currentColor",
  d: "M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"
}, null, -1), ut = [
  lt
];
function dt(e, t) {
  return p(), L("svg", it, ut);
}
var ft = /* @__PURE__ */ Y(ct, [["render", dt]]);
const vt = {}, mt = {
  "aria-hidden": "true",
  focusable: "false",
  role: "img",
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 512 512"
}, pt = /* @__PURE__ */ R("path", {
  fill: "currentColor",
  d: "M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"
}, null, -1), ht = [
  pt
];
function gt(e, t) {
  return p(), L("svg", mt, ht);
}
var me = /* @__PURE__ */ Y(vt, [["render", gt]]);
const Ct = {}, yt = {
  "aria-hidden": "true",
  focusable: "false",
  role: "img",
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 512 512"
}, Tt = /* @__PURE__ */ R("path", {
  fill: "currentColor",
  d: "M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"
}, null, -1), _t = [
  Tt
];
function Bt(e, t) {
  return p(), L("svg", yt, _t);
}
var Et = /* @__PURE__ */ Y(Ct, [["render", Bt]]);
const wt = {}, Ot = {
  "aria-hidden": "true",
  focusable: "false",
  role: "img",
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 512 512"
}, bt = /* @__PURE__ */ R("path", {
  fill: "currentColor",
  d: "M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"
}, null, -1), Lt = [
  bt
];
function xt(e, t) {
  return p(), L("svg", Ot, Lt);
}
var Dt = /* @__PURE__ */ Y(wt, [["render", xt]]);
const Pt = /* @__PURE__ */ S({
  props: {
    type: { default: T.DEFAULT },
    customIcon: { default: l.icon }
  },
  setup(e) {
    const t = e, n = (v, B = "") => Be(v) ? v.trim() : B, o = d(() => $(t.customIcon, "iconChildren") ? n(t.customIcon.iconChildren) : ""), a = d(() => K(t.customIcon) ? n(t.customIcon) : $(t.customIcon, "iconClass") ? n(t.customIcon.iconClass) : ""), i = d(() => $(t.customIcon, "iconTag") ? n(t.customIcon.iconTag, "i") : "i"), s = d(() => a.value.length > 0), f = d(() => s.value ? i.value : Oe(t.customIcon) ? H(t.customIcon) : c.value), c = d(() => ({
      [T.DEFAULT]: me,
      [T.INFO]: me,
      [T.SUCCESS]: Et,
      [T.ERROR]: ft,
      [T.WARNING]: Dt
    })[t.type]), u = d(() => {
      const v = [`${P}__icon`];
      return s.value ? v.concat(a.value) : v;
    });
    return (v, B) => (p(), I(G(m(f)), {
      class: X(m(u))
    }, {
      default: W(() => [
        ne(he(m(o)), 1)
      ]),
      _: 1
    }, 8, ["class"]));
  }
}), $t = /* @__PURE__ */ S({
  props: {
    timeout: { default: l.timeout },
    hideProgressBar: { default: l.hideProgressBar },
    isRunning: { type: Boolean, default: !1 }
  },
  emits: ["close-toast"],
  setup(e, { emit: t }) {
    const n = e, o = b(), a = b(!0), i = d(() => ({
      animationDuration: `${n.timeout}ms`,
      animationPlayState: n.isRunning ? "running" : "paused",
      opacity: n.hideProgressBar ? 0 : 1
    })), s = d(() => a.value ? `${P}__progress-bar` : "");
    oe(() => n.timeout, () => {
      a.value = !1, se(() => a.value = !0);
    });
    const f = () => t("close-toast");
    return F(() => {
      o.value && o.value.addEventListener("animationend", f);
    }), J(() => {
      o.value && o.value.removeEventListener("animationend", f);
    }), (c, u) => (p(), L("div", {
      ref_key: "el",
      ref: o,
      style: He(m(i)),
      class: X(m(s))
    }, null, 6));
  }
}), It = ["role"], St = /* @__PURE__ */ S({
  props: {
    content: null,
    id: { default: 0 },
    accessibility: { default: l.accessibility },
    bodyClassName: { default: l.bodyClassName },
    closeButton: { default: l.closeButton },
    closeButtonClassName: { default: l.closeButtonClassName },
    closeOnClick: { default: l.closeOnClick },
    draggable: { default: l.draggable },
    draggablePercent: { default: l.draggablePercent },
    eventBus: { default: l.eventBus },
    hideProgressBar: { default: l.hideProgressBar },
    icon: { default: l.icon },
    onClick: { default: () => {
    } },
    onClose: { default: () => {
    } },
    pauseOnFocusLoss: { default: l.pauseOnFocusLoss },
    pauseOnHover: { default: l.pauseOnHover },
    position: { default: l.position },
    rtl: { default: l.rtl },
    showCloseButtonOnHover: { default: l.showCloseButtonOnHover },
    timeout: { default: l.timeout },
    toastClassName: { default: l.toastClassName },
    type: { default: T.DEFAULT },
    description: { default: l.description }
  },
  setup(e) {
    const t = e, n = b(), { hovering: o } = ot(n, t), { focused: a } = nt(n, t), { beingDragged: i, dragComplete: s } = tt(n, t), f = d(() => !o.value && a.value && !i.value), c = () => {
      t.eventBus.emit(_.DISMISS, t.id);
    }, u = () => {
      i.value || (t.onClick && t.onClick(c), t.closeOnClick && c());
    };
    oe(s, (h) => {
      h && se(() => c());
    });
    const v = d(() => {
      const h = [
        `${P}__toast`,
        `${P}__toast--${t.type}`,
        `${t.position}`
      ].concat(t.toastClassName);
      return s.value && h.push("disable-transition"), t.rtl && h.push(`${P}__toast--rtl`), h;
    }), B = d(() => [
      `${P}__toast-${K(t.content) ? "body" : "component-body"}`
    ].concat(t.bodyClassName));
    return (h, x) => (p(), L("div", M(h.$attrs, {
      ref_key: "el",
      ref: n,
      class: m(v),
      onClick: u
    }), [
      ge(h.$slots, "default", {
        type: e.type,
        closeToast: c,
        toastId: e.id,
        showOnHover: e.showCloseButtonOnHover,
        icon: e.icon,
        closeButton: e.closeButton,
        role: e.accessibility.toastRole,
        content: e.content,
        description: e.description
      }, () => [
        e.icon ? (p(), I(Pt, {
          key: 0,
          "custom-icon": e.icon,
          type: e.type
        }, null, 8, ["custom-icon", "type"])) : Z("", !0),
        R("div", {
          role: e.accessibility.toastRole || "alert",
          class: X(m(B))
        }, [
          typeof e.content == "string" ? (p(), L(j, { key: 0 }, [
            ne(he(e.content), 1)
          ], 64)) : (p(), I(G(m(H)(e.content)), M({
            key: 1,
            "toast-id": e.id
          }, m(A)(e.content, "props", {}), Se(m(A)(e.content, "listeners", {})), { onCloseToast: c }), null, 16, ["toast-id"]))
        ], 10, It),
        e.closeButton ? (p(), I(rt, {
          key: 1,
          component: e.closeButton,
          "class-names": e.closeButtonClassName,
          "show-on-hover": e.showCloseButtonOnHover,
          "aria-label": e.accessibility.closeButtonLabel,
          onClick: Ae(c, ["stop"])
        }, null, 8, ["component", "class-names", "show-on-hover", "aria-label", "onClick"])) : Z("", !0)
      ]),
      e.timeout ? (p(), I($t, {
        key: 0,
        "is-running": m(f),
        "hide-progress-bar": e.hideProgressBar,
        timeout: e.timeout,
        onCloseToast: c
      }, null, 8, ["is-running", "hide-progress-bar", "timeout"])) : Z("", !0)
    ], 16));
  }
}), At = /* @__PURE__ */ S({
  props: {
    transition: { default: O.transition }
  },
  emits: ["leave"],
  setup(e) {
    const t = (n) => {
      n instanceof HTMLElement && (n.style.left = n.offsetLeft + "px", n.style.top = n.offsetTop + "px", n.style.width = getComputedStyle(n).width, n.style.position = "absolute");
    };
    return (n, o) => (p(), I(Ue, {
      type: "animation",
      tag: "div",
      "enter-active-class": m(A)(e.transition, "enter", `${e.transition}-enter-active`),
      "move-class": m(A)(e.transition, "move", `${e.transition}-move`),
      "leave-active-class": m(A)(e.transition, "leave", `${e.transition}-leave-active`),
      onLeave: t
    }, {
      default: W(() => [
        ge(n.$slots, "default")
      ]),
      _: 3
    }, 8, ["enter-active-class", "move-class", "leave-active-class"]));
  }
}), Nt = {
  devtools: {
    hide: !0
  }
}, Rt = /* @__PURE__ */ S(te(y({}, Nt), {
  props: {
    position: { default: O.position },
    container: { default: O.container },
    containerClassName: { default: O.containerClassName },
    defaultToastProps: { default: () => ({}) },
    eventBus: { default: O.eventBus },
    filterBeforeCreate: { default: O.filterBeforeCreate },
    filterToasts: { default: O.filterToasts },
    maxToasts: { default: O.maxToasts },
    newestOnTop: { default: O.newestOnTop },
    toastDefaults: { default: O.toastDefaults },
    transition: { default: O.transition },
    rootComponent: { default: O.rootComponent }
  },
  setup(e) {
    const t = e, n = Object.values(z), o = (r) => n.reduce((g, C) => te(y({}, g), {
      [C]: r(C)
    }), {}), a = b(), i = ie({}), s = d(() => y(y({}, t), i)), f = d(() => y({
      eventBus: s.value.eventBus,
      position: s.value.position
    }, s.value.defaultToastProps)), c = d(() => s.value.toastDefaults), u = ie({}), v = d(() => Object.values(u)), B = d(() => {
      const r = s.value.filterToasts;
      return r(v.value);
    }), h = async (r) => {
      q(r) && (r = await r()), a.value && (Ze(a.value), r.appendChild(a.value));
    }, x = (r) => {
      Q(r.id) || (u[r.id] = r);
    }, E = (r) => {
      r.content = je(r.content);
      const g = r.type && c.value[r.type] || {};
      let C = y(y(y({}, f.value), g), r);
      const w = s.value.filterBeforeCreate;
      C = w(C, v.value), C && x(C);
    }, D = (r) => {
      const g = u[r];
      g && g.onClose && g.onClose(), delete u[r];
    }, k = () => {
      Object.keys(u).forEach(D);
    }, De = d(() => o((g) => {
      const C = B.value.filter((w) => w.position === g).slice(0, s.value.maxToasts);
      return s.value.newestOnTop ? C.reverse() : C;
    })), Pe = (r) => {
      r.container && h(r.container), Object.assign(i, r);
    }, $e = (r) => {
      const { id: g, create: C, options: w } = r;
      u[g] ? (w.timeout && w.timeout === u[g].timeout && w.timeout++, x(y(y({}, u[g]), w))) : C && E(y({ id: g }, w));
    }, Ie = d(() => o((g) => [`${P}__container`, g].concat(s.value.containerClassName)));
    return ke(() => {
      t.eventBus.on(_.ADD, E), t.eventBus.on(_.CLEAR, k), t.eventBus.on(_.DISMISS, D), t.eventBus.on(_.UPDATE, $e), t.eventBus.on(_.UPDATE_DEFAULTS, Pe);
    }), F(() => {
      const r = s.value.container;
      r && h(r);
    }), (r, g) => (p(), L("div", {
      ref_key: "el",
      ref: a
    }, [
      (p(!0), L(j, null, le(m(n), (C) => (p(), L("div", { key: C }, [
        Me(At, {
          transition: m(s).transition,
          class: X(m(Ie)[C])
        }, {
          default: W(() => [
            (p(!0), L(j, null, le(m(De)[C], (w) => (p(), I(G(e.rootComponent), M({
              key: w.id
            }, w), null, 16))), 128))
          ]),
          _: 2
        }, 1032, ["transition", "class"])
      ]))), 128))
    ], 512));
  }
}));
function Ft(e) {
  const t = e, { shareAppContext: n, onMounted: o } = t, a = _e(t, ["shareAppContext", "onMounted"]), i = be(a), s = ze(Rt, y({}, i));
  if (n && n !== !0) {
    const c = n;
    s._context.components = c._context.components, s._context.directives = c._context.directives, s._context.mixins = c._context.mixins, s._context.provides = c._context.provides, s.config.globalProperties = c.config.globalProperties;
  }
  const f = s.mount(document.createElement("div"));
  Q(o) || o(f, s);
}
const Ht = (e) => {
  const t = (s) => (c, u) => {
    const v = Object.assign({ id: Ye(), type: s, content: c }, u);
    return e.emit(_.ADD, v), v.id;
  }, n = (s) => e.emit(_.DISMISS, s), o = () => e.emit(_.CLEAR, void 0), a = (s) => e.emit(_.UPDATE_DEFAULTS, be(s)), i = (s, f, c) => {
    const { content: u, options: v } = f;
    e.emit(_.UPDATE, {
      id: s,
      create: c || !1,
      options: te(y({}, v), { content: u })
    });
  };
  return Object.assign(t(T.DEFAULT), {
    success: t(T.SUCCESS),
    info: t(T.INFO),
    warning: t(T.WARNING),
    error: t(T.ERROR),
    dismiss: n,
    clear: o,
    update: i,
    updateDefaults: a
  });
}, pe = (e = {}, t = !0) => {
  const n = y({}, e), o = n.eventBus = n.eventBus || new re();
  return t && se(() => Ft(n)), Ht(o);
}, ce = Symbol("VueToastification"), kt = () => {
  const e = () => console.warn(`[${P}] This plugin does not support SSR!`);
  return new Proxy(e, {
    get() {
      return e;
    }
  });
}, V = (e) => et() ? st(e) ? pe({ eventBus: e }, !1) : pe(e, !0) : kt(), Ut = (e) => {
  if (Ce()) {
    const t = V(e);
    Ne(ce, t);
  }
}, zt = (e) => {
  if (e)
    return V(e);
  const t = Ce() ? Re(ce, void 0) : void 0;
  return t || V(Le);
}, Vt = (e, t) => {
  (t == null ? void 0 : t.shareAppContext) === !0 && (t.shareAppContext = e);
  const n = V(y({
    eventBus: Le
  }, t));
  e.provide(ce, n);
};
export {
  re as EventBus,
  z as POSITION,
  T as TYPE,
  St as VtToast,
  V as createToastInstance,
  Vt as default,
  Ut as provideToast,
  zt as useToast
};
