var ve = Object.defineProperty;
var Z = Object.getOwnPropertySymbols;
var we = Object.prototype.hasOwnProperty, Te = Object.prototype.propertyIsEnumerable;
var $ = (i, e, t) => e in i ? ve(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, X = (i, e) => {
  for (var t in e || (e = {}))
    we.call(e, t) && $(i, t, e[t]);
  if (Z)
    for (var t of Z(e))
      Te.call(e, t) && $(i, t, e[t]);
  return i;
};
import { a as be, $ as Se, S as _e, i as Pe, s as Ae, f as P, b as Ce, n as D, d as z, c as j, e as b, r as d, g as ke, M as xe, o as Ee, j as ee, t as x, m as g, u as E, k as ie, l as De, J as M, w as ze, p as Q, x as Y, E as je, aa as te, z as Re, A as We, B as He, C as Ie, D as Fe } from "./PlayerAccountControllerNd-yeUlo8Jv.js";
function se(i, e) {
  be(i, e);
}
function Oe(i) {
  Se.set(i);
}
const q = {
  en: {
    expandLimits: "Limit history",
    daily: "per day",
    weekly: "per week",
    monthly: "per month",
    loss: "Loss Limit",
    deposit: "Deposit Limit",
    wagering: "Wagering Limit",
    max: "Stake limit",
    wageringSports: "Stake Limit",
    loading: "Loading limits history...",
    error: "Something went wrong. Please try again.",
    limitRemoved: "Limit removed",
    historyProductTypeSports: "Sports",
    historyProductTypeAll: "All",
    historyProductTypeCasino: "Casino",
    historyLimitTypeDeposit: "Deposit Limit",
    historyLimitTypeWagering: "Wagering Limit",
    historyLimitTypeLoss: "Loss Limit"
  },
  de: {
    expandLimits: "Limit-Verlauf",
    daily: "pro Tag",
    weekly: "pro Woche",
    monthly: "pro Monat",
    loss: "Verlustlimit",
    deposit: "Einzahlungslimit",
    wagering: "Einsatzlimit",
    max: "Einsatzlimit",
    loading: "Lädt ...",
    error: "Etwas ist schiefgelaufen. Bitte nochmal versuchen!",
    limitRemoved: "Limit entfernt",
    historyProductTypeSports: "Sport",
    historyProductTypeAll: "Alle",
    historyProductTypeCasino: "Slots",
    historyLimitTypeDeposit: "Einzahlungslimit",
    historyLimitTypeWagering: "Einsatzlimit",
    historyLimitTypeLoss: "Verlustlimit"
  },
  hr: {
    expandLimits: "Povijest ograničenja",
    daily: "dnevno",
    weekly: "tjedno",
    monthly: "mjesečno",
    loss: "Ograničenje gubitka",
    deposit: "Ograničenje uplate",
    wagering: "Ograničenje igranja",
    max: "Ograničenje uloga",
    loading: "Učitavanje povijesti ograničenja...",
    error: "Nešto je pošlo po zlu. Molimo vas pokušajte ponovno.",
    limitRemoved: "Ograničenje uklonjeno",
    historyProductTypeSports: "Sportovi",
    historyProductTypeAll: "Sve",
    historyProductTypeCasino: "Casino",
    historyLimitTypeDeposit: "Ograničenje uplate",
    historyLimitTypeWagering: "Ograničenje igranja",
    historyLimitTypeLoss: "Ograničenje gubitka",
    wageringSports: "Ograničenje uloga"
  },
  sl: {
    expandLimits: "Limit zgodovina",
    daily: "na dan",
    weekly: "na teden",
    monthly: "na mesec",
    loss: "Limit izgube",
    deposit: "Limit vplačila",
    wagering: "Limit na vložek",
    max: "Limit vložkov",
    loading: "Nalaga...",
    error: "Nekaj ​​je šlo narobe. Prosim poskusite ponovno.",
    limitRemoved: "Limit odstranjen",
    historyProductTypeSports: "Sports",
    historyProductTypeAll: "All",
    historyProductTypeCasino: "Casino",
    historyLimitTypeDeposit: "Deposit Limit",
    historyLimitTypeWagering: "Wagering Limit",
    historyLimitTypeLoss: "Loss Limit"
  },
  pl: {
    expandLimits: "Historia limitu",
    daily: "na dzień",
    weekly: "na tydzień",
    monthly: "na miesiąc",
    loss: "Limit Strat",
    deposit: "Limit depozytów",
    wagering: "Limit Stawek",
    max: "Limit stawek",
    loading: "Ładowanie...",
    error: "Coś poszło nie tak. Proszę spróbuj ponownie.",
    limitRemoved: "Usunięty limit",
    historyProductTypeSports: "Sports",
    historyProductTypeAll: "All",
    historyProductTypeCasino: "Casino",
    historyLimitTypeDeposit: "Deposit Limit",
    historyLimitTypeWagering: "Wagering Limit",
    historyLimitTypeLoss: "Loss Limit"
  },
  "zh-hk": {
    expandLimits: "极限历史",
    daily: "每天",
    weekly: "每个星期",
    monthly: "每月",
    loss: "损失限额",
    deposit: "存款限额",
    wagering: "投注限额",
    loading: "加载请稍候...",
    error: "500 - 服务器错误",
    limitRemoved: "移除限制",
    historyProductTypeSports: "Sports",
    historyProductTypeAll: "All",
    historyProductTypeCasino: "Casino",
    historyLimitTypeDeposit: "Deposit Limit",
    historyLimitTypeWagering: "Wagering Limit",
    historyLimitTypeLoss: "Loss Limit"
  },
  fr: {
    expandLimits: "Limiter l'historique",
    daily: "par jour",
    weekly: "par semaine",
    monthly: "par mois",
    loss: "Limite de perte",
    deposit: "Limite de dépôt",
    wagering: "Limite de mise",
    loading: "Chargement, veuillez patienter...",
    error: "500 - Erreur de serveur",
    limitRemoved: "Limite supprimée",
    historyProductTypeSports: "Sports",
    historyProductTypeAll: "All",
    historyProductTypeCasino: "Casino",
    historyLimitTypeDeposit: "Deposit Limit",
    historyLimitTypeWagering: "Wagering Limit",
    historyLimitTypeLoss: "Loss Limit"
  },
  ro: {
    expandLimits: "Istoric limite",
    daily: "pe zi",
    weekly: "pe saptamana",
    monthly: "pe luna",
    loss: "Limita de pierdere",
    deposit: "Limita de incarcare",
    loading: "Se incarca, va rugam asteptati...",
    error: "500 - Eroare de server",
    limitRemoved: "Limita eliminata",
    historyProductTypeSports: "Sports",
    historyProductTypeAll: "All",
    historyProductTypeCasino: "Casino",
    historyLimitTypeDeposit: "Limita depunere",
    historyLimitTypeWagering: "Limita pariere",
    historyLimitTypeLoss: "Limita pierdere"
  },
  es: {
    expandLimits: "Historial de límites",
    daily: "por día",
    weekly: "por semana",
    monthly: "por mes",
    loss: "Límite de pérdida",
    deposit: "Límite de depósito",
    wagering: "Límite de apuestas",
    max: "Límite de apuesta",
    loading: "Cargando historial de límites…",
    error: "Algo salió mal. Por favor inténtalo de nuevo.",
    limitRemoved: "Límite eliminado",
    historyProductTypeSports: "Sports",
    historyProductTypeAll: "All",
    historyProductTypeCasino: "Casino",
    historyLimitTypeDeposit: "Deposit Limit",
    historyLimitTypeWagering: "Wagering Limit",
    historyLimitTypeLoss: "Loss Limit"
  },
  "pt-br": {
    expandLimits: "Histórico de limite",
    daily: "Por dia",
    weekly: "por semana",
    monthly: "por mês",
    loss: "Limite de perda",
    deposit: "Limite de depósito",
    wagering: "Limite de Quantidade de Apostas",
    max: "Limite de apostas",
    wageringSports: "Limite de Quantidade de Apostas Esportivas",
    Loading: "Carregando histórico de limite...",
    error: "Algo deu errado. Por favor, tente novamente",
    limitRemoved: "Limite removido",
    historyProductTypeSports: "Esportes",
    historyProductTypeAll: "Todos",
    historyProductTypeCasino: "casino",
    historyLimitTypeDeposit: "Limite de depósito",
    historyLimitTypeWagering: "Limite de valor da aposta",
    historyLimitTypeLoss: "Limite de perda"
  },
  "es-mx": {
    expandLimits: "Historial de límites",
    daily: "Por día",
    weekly: "por semana",
    monthly: "por mes",
    loss: "Límite de pérdidas",
    deposit: "Límite de depósito",
    wagering: "Límite de monto de apuestas",
    max: "Límite de apuestas",
    wageringSports: "Límite de monto de apuestas deportivas",
    Loading: "Cargando historial de límites...",
    error: "Algo salió mal. Por favor intente de nuevo",
    limitRemoved: "Límite removido",
    historyProductTypeSports: "Deportes",
    historyProductTypeAll: "Todo",
    historyProductTypeCasino: "Casino",
    historyLimitTypeDeposit: "Límite de depósito",
    historyLimitTypeWagering: "Límite de monto de apuesta",
    historyLimitTypeLoss: "Límite de pérdida"
  },
  tr: {
    expandLimits: "SINIR GEÇMİŞİ",
    daily: "günlük",
    weekly: "haftada",
    monthly: "her ay",
    loss: "Kayıp Limiti",
    deposit: "Para Yatırma Limiti",
    wagering: "Bahis Limiti",
    max: "Bahis limiti",
    wageringSports: "Bahis Limiti",
    loading: "Limit geçmişi yükleniyor...",
    error: "Bir şeyler yanlış gitti. Lütfen tekrar deneyin.",
    limitRemoved: "Sınır kaldırıldı",
    historyProductTypeSports: "Spor Dalları",
    historyProductTypeAll: "Tüm",
    historyProductTypeCasino: "Kumarhane",
    historyLimitTypeDeposit: "Para Yatırma Limiti",
    historyLimitTypeWagering: "Bahis Limiti",
    historyLimitTypeLoss: "Kayıp Limiti"
  }
};
function Be(i) {
  Ce(i, "svelte-1wi0iai", ':host{font-family:system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:1.3rem}.svelte-1wi0iai.svelte-1wi0iai,.svelte-1wi0iai.svelte-1wi0iai::before,.svelte-1wi0iai.svelte-1wi0iai::after{color:var(--emw--color-typography-contrast, #444444);margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.player-account-gaming-limits-history-2.svelte-1wi0iai.svelte-1wi0iai{color:var(--emw--color-white, #FFFFFF)}button.svelte-1wi0iai.svelte-1wi0iai{font-size:1rem;border:0;padding:0}.ExpandButton.svelte-1wi0iai.svelte-1wi0iai{display:flex;align-items:center;margin-right:-14px;background:transparent;border:none;color:var(--emw--color-primary, #22B04E);font-size:var(--emw--font-size-large, 20px);text-transform:capitalize;font-weight:var(--emw--font-weight-bold, 700)}.ExpandButton.Mobile.svelte-1wi0iai.svelte-1wi0iai{font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-bold, 700)}.ExpandButton.svelte-1wi0iai svg.svelte-1wi0iai{width:40px;height:auto;margin-left:-4px}.extended.svelte-1wi0iai.svelte-1wi0iai{transform:rotate(180deg)}.HistoryWrapper.svelte-1wi0iai.svelte-1wi0iai{display:flex;flex-direction:column;width:320px;padding:0 12px;margin:12px auto}.HistoryWrapper.svelte-1wi0iai .HistoryDisplayArea.svelte-1wi0iai{width:inherit;background-color:var(--emw--color-typpgraphy, #FFFFFF);border-radius:var(--emw--border-radius-large, 10px);box-shadow:0px 3px 19px 0px rgba(0, 0, 0, 0.3);padding:30px 20px}.HistoryWrapper.svelte-1wi0iai .HistoryDisplayArea .LimitType.svelte-1wi0iai{font-size:var(--emw--font-size-medium, 16px);color:color-mix(in srgb, var(--emw--color-secondary, #E1A749) 80%, black 10%)}.HistoryWrapper.svelte-1wi0iai .HistoryDisplayArea.Mobile.svelte-1wi0iai{width:auto;font-size:var(--emw--font-size-x-small, 12px);padding:15px}.hidden.svelte-1wi0iai.svelte-1wi0iai{display:none}.HistoryRow.svelte-1wi0iai.svelte-1wi0iai{padding:12px 0;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6)}.GeneralLimitInformation.svelte-1wi0iai.svelte-1wi0iai{display:flex;flex-direction:column;gap:4px;color:var(--emw--color-grey-150, #C0CBC3)}.LimitAmountPeriod.svelte-1wi0iai.svelte-1wi0iai{color:var(--emw--color-grey-150, #C0CBC3)}.LimitContainer.svelte-1wi0iai.svelte-1wi0iai{animation:svelte-1wi0iai-animateEntry 0.7s ease-in}@keyframes svelte-1wi0iai-animateEntry{0%{opacity:0;transform:translateX(500px)}100%{opacity:1;transform:translateX(0)}}');
}
function re(i, e, t) {
  const r = i.slice();
  return r[37] = e[t], r[38] = e, r[39] = t, r;
}
function Me(i) {
  let e, t, r, o = (
    /*$_*/
    i[9]("expandLimits") + ""
  ), n, l, a, v, L, p, y, u, f, A = ie(
    /*lazyShowedHistoryArray*/
    i[7]
  ), w = [];
  for (let h = 0; h < A.length; h += 1)
    w[h] = oe(re(i, A, h));
  return {
    c() {
      e = b("div"), t = b("div"), r = b("button"), n = E(o), l = Q(), a = Y("svg"), v = Y("path"), L = Y("path"), p = Q(), y = b("div");
      for (let h = 0; h < w.length; h += 1)
        w[h].c();
      d(v, "d", "M10.5 15l7.5 7.5 7.5-7.5z"), d(v, "class", "svelte-1wi0iai"), d(L, "d", "M0 0h36v36h-36z"), d(L, "fill", "none"), d(L, "class", "svelte-1wi0iai"), d(a, "class", "ExpandArrow " + (/*isDesktop*/
      i[10] ? "" : "Mobile") + " svelte-1wi0iai"), d(a, "xmlns", "http://www.w3.org/2000/svg"), d(a, "width", "36"), d(a, "height", "36"), d(a, "viewBox", "0 0 36 36"), je(a, "fill", "var(--emw--color-primary, #22B04E)"), M(
        a,
        "extended",
        /*extended*/
        i[8]
      ), d(r, "class", "ExpandButton " + (/*isDesktop*/
      i[10] ? "" : "Mobile") + " svelte-1wi0iai"), d(y, "class", "HistoryDisplayArea " + (/*isDesktop*/
      i[10] ? "" : "Mobile") + " svelte-1wi0iai"), M(
        y,
        "hidden",
        /*hidden*/
        i[5]
      ), d(t, "class", "HistoryWrapper svelte-1wi0iai"), d(e, "class", "player-account-gaming-limits-history-2 svelte-1wi0iai");
    },
    m(h, S) {
      j(h, e, S), g(e, t), g(t, r), g(r, n), g(r, l), g(r, a), g(a, v), g(a, L), g(t, p), g(t, y);
      for (let m = 0; m < w.length; m += 1)
        w[m] && w[m].m(y, null);
      u || (f = ze(
        r,
        "click",
        /*toggleHistoryDisplayArea*/
        i[11]
      ), u = !0);
    },
    p(h, S) {
      if (S[0] & /*$_*/
      512 && o !== (o = /*$_*/
      h[9]("expandLimits") + "") && x(n, o), S[0] & /*extended*/
      256 && M(
        a,
        "extended",
        /*extended*/
        h[8]
      ), S[0] & /*numberofentries, limitContainer, lazyShowedHistoryArray, $_*/
      650) {
        A = ie(
          /*lazyShowedHistoryArray*/
          h[7]
        );
        let m;
        for (m = 0; m < A.length; m += 1) {
          const W = re(h, A, m);
          w[m] ? w[m].p(W, S) : (w[m] = oe(W), w[m].c(), w[m].m(y, null));
        }
        for (; m < w.length; m += 1)
          w[m].d(1);
        w.length = A.length;
      }
      S[0] & /*hidden*/
      32 && M(
        y,
        "hidden",
        /*hidden*/
        h[5]
      );
    },
    d(h) {
      h && z(e), De(w, h), u = !1, f();
    }
  };
}
function Ne(i) {
  return { c: D, m: D, p: D, d: D };
}
function Ue(i) {
  let e, t = (
    /*lang*/
    (i[0] ? (
      /*$_*/
      i[9]("error")
    ) : "500 Server Error") + ""
  ), r;
  return {
    c() {
      e = b("p"), r = E(t), d(e, "class", "svelte-1wi0iai");
    },
    m(o, n) {
      j(o, e, n), g(e, r);
    },
    p(o, n) {
      n[0] & /*lang, $_*/
      513 && t !== (t = /*lang*/
      (o[0] ? (
        /*$_*/
        o[9]("error")
      ) : "500 Server Error") + "") && x(r, t);
    },
    d(o) {
      o && z(e);
    }
  };
}
function Ge(i) {
  let e, t, r, o = (
    /*history*/
    i[37].type + ""
  ), n, l, a = (
    /*history*/
    i[37].amount + ""
  ), v, L, p = (
    /*history*/
    i[37].date + ""
  ), y;
  return {
    c() {
      e = b("div"), t = b("span"), r = b("span"), n = E(o), l = b("span"), v = E(a), L = b("span"), y = E(p), d(r, "class", "LimitType svelte-1wi0iai"), d(l, "class", "LimitAmountPeriod svelte-1wi0iai"), d(t, "class", "GeneralLimitInformation svelte-1wi0iai"), d(L, "class", "DateLimitInformation svelte-1wi0iai"), d(e, "class", "HistoryRow svelte-1wi0iai");
    },
    m(u, f) {
      j(u, e, f), g(e, t), g(t, r), g(r, n), g(t, l), g(l, v), g(e, L), g(L, y);
    },
    p(u, f) {
      f[0] & /*lazyShowedHistoryArray*/
      128 && o !== (o = /*history*/
      u[37].type + "") && x(n, o), f[0] & /*lazyShowedHistoryArray*/
      128 && a !== (a = /*history*/
      u[37].amount + "") && x(v, a), f[0] & /*lazyShowedHistoryArray*/
      128 && p !== (p = /*history*/
      u[37].date + "") && x(y, p);
    },
    d(u) {
      u && z(e);
    }
  };
}
function Ke(i) {
  let e, t, r, o = (
    /*history*/
    i[37].type + ""
  ), n, l, a = (
    /*$_*/
    i[9]("limitRemoved") + ""
  ), v, L, p = (
    /*history*/
    i[37].date + ""
  ), y;
  return {
    c() {
      e = b("div"), t = b("span"), r = b("span"), n = E(o), l = b("span"), v = E(a), L = b("span"), y = E(p), d(r, "class", "LimitType svelte-1wi0iai"), d(l, "class", "LimitAmountPeriod svelte-1wi0iai"), d(t, "class", "GeneralLimitInformation svelte-1wi0iai"), d(L, "class", "DateLimitInformation svelte-1wi0iai"), d(e, "class", "HistoryRow svelte-1wi0iai");
    },
    m(u, f) {
      j(u, e, f), g(e, t), g(t, r), g(r, n), g(t, l), g(l, v), g(e, L), g(L, y);
    },
    p(u, f) {
      f[0] & /*lazyShowedHistoryArray*/
      128 && o !== (o = /*history*/
      u[37].type + "") && x(n, o), f[0] & /*$_*/
      512 && a !== (a = /*$_*/
      u[9]("limitRemoved") + "") && x(v, a), f[0] & /*lazyShowedHistoryArray*/
      128 && p !== (p = /*history*/
      u[37].date + "") && x(y, p);
    },
    d(u) {
      u && z(e);
    }
  };
}
function oe(i) {
  let e, t, r, o = (
    /*index*/
    i[39]
  );
  function n(p, y) {
    return (
      /*history*/
      p[37].removed ? Ke : Ge
    );
  }
  let l = n(i), a = l(i);
  const v = () => (
    /*div_binding*/
    i[22](e, o)
  ), L = () => (
    /*div_binding*/
    i[22](null, o)
  );
  return {
    c() {
      e = b("div"), a.c(), t = Q(), d(e, "class", r = te(
        /*index*/
        i[39] > +/*numberofentries*/
        i[1] ? "LimitContainer" : ""
      ) + " svelte-1wi0iai");
    },
    m(p, y) {
      j(p, e, y), a.m(e, null), g(e, t), v();
    },
    p(p, y) {
      i = p, l === (l = n(i)) && a ? a.p(i, y) : (a.d(1), a = l(i), a && (a.c(), a.m(e, t))), y[0] & /*numberofentries*/
      2 && r !== (r = te(
        /*index*/
        i[39] > +/*numberofentries*/
        i[1] ? "LimitContainer" : ""
      ) + " svelte-1wi0iai") && d(e, "class", r), o !== /*index*/
      i[39] && (L(), o = /*index*/
      i[39], v());
    },
    d(p) {
      p && z(e), a.d(), L();
    }
  };
}
function Ve(i) {
  let e;
  function t(n, l) {
    return (
      /*hasErrors*/
      n[6] ? Ue : (
        /*isLoading*/
        n[4] ? Ne : Me
      )
    );
  }
  let r = t(i), o = r(i);
  return {
    c() {
      e = b("div"), o.c(), d(e, "class", "svelte-1wi0iai");
    },
    m(n, l) {
      j(n, e, l), o.m(e, null), i[23](e);
    },
    p(n, l) {
      r === (r = t(n)) && o ? o.p(n, l) : (o.d(1), o = r(n), o && (o.c(), o.m(e, null)));
    },
    i: D,
    o: D,
    d(n) {
      n && z(e), o.d(), i[23](null);
    }
  };
}
function Xe(i, e, t) {
  let r;
  ke(i, Fe, (s) => t(9, r = s));
  let o = window.navigator.userAgent, n = !xe(o), { lang: l = "" } = e, { userid: a = "" } = e, { session: v = "" } = e, { endpoint: L = "" } = e, { apiversion: p = "" } = e, { numberofentries: y = "10" } = e, { customcurrencysymbols: u = "" } = e, { limitformat: f = "" } = e, { clientstyling: A = "" } = e, { clientstylingurl: w = "" } = e, { mbsource: h } = e, { translationurl: S = "" } = e, m, W, k = new Array(), N = parseInt(y, 10), U = !1, H = !0, I = [], F = [], O = !0, G = !1, R = { EUR: "€", RON: "lei", TRY: "₺" };
  const ae = () => {
    fetch(S).then((c) => c.json()).then((c) => {
      Object.keys(c).forEach((_) => {
        se(_, c[_]);
      });
    }).catch((c) => {
      console.log(c);
    });
  };
  Object.keys(q).forEach((s) => {
    se(s, q[s]);
  });
  const ne = () => {
    let s = p === "gmcore" ? `/v2/player/${a}/transactions/limit` : `/v1/player/${a}/limits/monetary/history`, c = new URL(`${L}${s}`);
    c.searchParams.append("startDate", `${(/* @__PURE__ */ new Date("2022")).toISOString()}`), c.searchParams.append("endDate", `${(/* @__PURE__ */ new Date("2099")).toISOString()}`), c.searchParams.append("limit", "10000");
    let _ = {
      method: "GET",
      headers: { "X-SessionID": v }
    };
    fetch(c.href, _).then((T) => {
      if (T.status >= 300)
        throw t(4, H = !1), t(6, U = !0), new Error("There was an error fetching the limits");
      return T.json();
    }).then(
      (T) => {
        T.length && (I = le(T), t(7, F = I.slice(0, N))), t(4, H = !1);
      },
      (T) => {
        console.error("There was an error", T), t(6, U = !0);
      }
    );
  }, le = (s) => {
    const c = !!q[l];
    return s.map((T) => {
      let C = {
        amount: "",
        currency: "",
        date: "",
        period: "",
        type: "",
        removed: !1
      };
      return C.amount = me(T), C.currency = c ? R[T.limitCurrencyCode] : T.limitCurrencyCode, C.date = new Intl.DateTimeFormat("de", { dateStyle: "medium" }).format(new Date(T.limitDate)), C.period = r(`${T.limitPeriod.toLowerCase()}`), C.type = p === "gmcore" ? r(`historyLimitType${T.limitType.split(" ")[0]}`) : r(`historyLimitType${T.limitType.split(" ")[0]}`) + " " + r(`historyProductType${T.limitProductType}`), C.removed = T.limitAmount === -1, C;
    });
  }, me = (s) => {
    let c = f || Intl.NumberFormat("en-US", { maximumFractionDigits: 0 }).format(s.limitAmount);
    if (!f) {
      let fe = R[s.limitCurrencyCode] || s.limitCurrencyCode;
      return `${c}${fe}`;
    }
    typeof s.limitAmount == "string" && s.limitAmount.includes(",") && (s.limitAmount = s.limitAmount.replaceAll(",", ""));
    const _ = c.match(/\{(\d+)decimals\}/), T = _ ? parseInt(_[1], 10) : 2, C = _ ? new RegExp("\\{\\d+decimals\\}", "g") : "{decimals}";
    let B = parseFloat(s.limitAmount).toFixed(T);
    const [he, K] = f.includes(".") ? [",", "."] : [".", ","];
    let [V, Le] = B.split(".");
    return V = V.replace(/\B(?=(\d{3})+(?!\d))/g, he), B = `${V}${K}${Le}`, c = c.replace("{currency}", R[s.limitCurrencyCode] || s.limitCurrencyCode).replace("{amount}", B.split(K)[0]).replace(
      C,
      B.split(K)[1]
    ), c;
  }, de = () => {
    t(5, O = !O), t(8, G = !G);
  };
  let J = new IntersectionObserver((s) => {
    s.forEach((c) => {
      c.isIntersecting && (N += parseInt(y, 10) || 10, F.length < I.length && t(7, F = I.slice(0, N)));
    });
  });
  const pe = () => {
    J.observe(k[k.length - 1]);
  }, ye = () => {
    if (!u)
      return;
    let s = {};
    u.split(",").forEach((c) => {
      let _ = c.split(":");
      s[_[0].trim()] = _[1].trim();
    }), R = X(X({}, R), s);
  }, ue = () => {
    Oe(l);
  };
  Ee(() => () => {
    J.unobserve(k[k.length - 1]);
  });
  function ce(s, c) {
    ee[s ? "unshift" : "push"](() => {
      k[c] = s, t(3, k);
    });
  }
  function ge(s) {
    ee[s ? "unshift" : "push"](() => {
      m = s, t(2, m);
    });
  }
  return i.$$set = (s) => {
    "lang" in s && t(0, l = s.lang), "userid" in s && t(12, a = s.userid), "session" in s && t(13, v = s.session), "endpoint" in s && t(14, L = s.endpoint), "apiversion" in s && t(15, p = s.apiversion), "numberofentries" in s && t(1, y = s.numberofentries), "customcurrencysymbols" in s && t(16, u = s.customcurrencysymbols), "limitformat" in s && t(17, f = s.limitformat), "clientstyling" in s && t(18, A = s.clientstyling), "clientstylingurl" in s && t(19, w = s.clientstylingurl), "mbsource" in s && t(20, h = s.mbsource), "translationurl" in s && t(21, S = s.translationurl);
  }, i.$$.update = () => {
    i.$$.dirty[0] & /*customcurrencysymbols*/
    65536 && u && ye(), i.$$.dirty[0] & /*endpoint, userid, session, apiversion*/
    61440 && L && a && v && p && ne(), i.$$.dirty[0] & /*limitContainer, isLoading, hidden*/
    56 && k[0] && !H && !O && pe(), i.$$.dirty[0] & /*lang*/
    1 && l && ue(), i.$$.dirty[0] & /*clientstyling, customStylingContainer*/
    262148 && A && m && Re(m, A), i.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
    524292 && w && m && We(m, w), i.$$.dirty[0] & /*mbsource, customStylingContainer*/
    1048580 && h && m && He(m, `${h}.Style`, W), i.$$.dirty[0] & /*translationurl, customStylingContainer*/
    2097156 && S && m && ae();
  }, [
    l,
    y,
    m,
    k,
    H,
    O,
    U,
    F,
    G,
    r,
    n,
    de,
    a,
    v,
    L,
    p,
    u,
    f,
    A,
    w,
    h,
    S,
    ce,
    ge
  ];
}
class Ye extends _e {
  constructor(e) {
    super(), Pe(
      this,
      e,
      Xe,
      Ve,
      Ae,
      {
        lang: 0,
        userid: 12,
        session: 13,
        endpoint: 14,
        apiversion: 15,
        numberofentries: 1,
        customcurrencysymbols: 16,
        limitformat: 17,
        clientstyling: 18,
        clientstylingurl: 19,
        mbsource: 20,
        translationurl: 21
      },
      Be,
      [-1, -1]
    );
  }
  get lang() {
    return this.$$.ctx[0];
  }
  set lang(e) {
    this.$$set({ lang: e }), P();
  }
  get userid() {
    return this.$$.ctx[12];
  }
  set userid(e) {
    this.$$set({ userid: e }), P();
  }
  get session() {
    return this.$$.ctx[13];
  }
  set session(e) {
    this.$$set({ session: e }), P();
  }
  get endpoint() {
    return this.$$.ctx[14];
  }
  set endpoint(e) {
    this.$$set({ endpoint: e }), P();
  }
  get apiversion() {
    return this.$$.ctx[15];
  }
  set apiversion(e) {
    this.$$set({ apiversion: e }), P();
  }
  get numberofentries() {
    return this.$$.ctx[1];
  }
  set numberofentries(e) {
    this.$$set({ numberofentries: e }), P();
  }
  get customcurrencysymbols() {
    return this.$$.ctx[16];
  }
  set customcurrencysymbols(e) {
    this.$$set({ customcurrencysymbols: e }), P();
  }
  get limitformat() {
    return this.$$.ctx[17];
  }
  set limitformat(e) {
    this.$$set({ limitformat: e }), P();
  }
  get clientstyling() {
    return this.$$.ctx[18];
  }
  set clientstyling(e) {
    this.$$set({ clientstyling: e }), P();
  }
  get clientstylingurl() {
    return this.$$.ctx[19];
  }
  set clientstylingurl(e) {
    this.$$set({ clientstylingurl: e }), P();
  }
  get mbsource() {
    return this.$$.ctx[20];
  }
  set mbsource(e) {
    this.$$set({ mbsource: e }), P();
  }
  get translationurl() {
    return this.$$.ctx[21];
  }
  set translationurl(e) {
    this.$$set({ translationurl: e }), P();
  }
}
Ie(Ye, { lang: {}, userid: {}, session: {}, endpoint: {}, apiversion: {}, numberofentries: {}, customcurrencysymbols: {}, limitformat: {}, clientstyling: {}, clientstylingurl: {}, mbsource: {}, translationurl: {} }, [], [], !0);
export {
  Ye as default
};
