var Pe = Object.defineProperty, Ne = Object.defineProperties;
var ze = Object.getOwnPropertyDescriptors;
var oe = Object.getOwnPropertySymbols;
var De = Object.prototype.hasOwnProperty, Fe = Object.prototype.propertyIsEnumerable;
var re = (t, e, s) => e in t ? Pe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, ee = (t, e) => {
  for (var s in e || (e = {}))
    De.call(e, s) && re(t, s, e[s]);
  if (oe)
    for (var s of oe(e))
      Fe.call(e, s) && re(t, s, e[s]);
  return t;
}, te = (t, e) => Ne(t, ze(e));
import { S as He, b as We, f as S, c as je, a as Oe, d as Ue, h as _, x as Re, k as z, n as ae, v as D, w as Be, Q as Ie, G as Ge, g as b, E as v, K as me, j as y, l as d, M as Ve, y as x, D as ce, I as Z, A as se, z as T, r as qe, C as Ye } from "./CashierConfirmModal-BErwh2fQ.js";
import { a as Je, i as Xe, $ as Ke, b as Qe } from "./CashierError-DoHJAf67.js";
import { d as de, u as Ze } from "./CashierMethodDetails-T4mbzimW.js";
function ue(t, e) {
  Je(t, e);
}
function $e(t) {
  Xe({
    fallbackLocale: "en"
  }), Ke.set(t);
}
const ge = {
  en: {
    generalMin: "Min",
    generalMax: "Max",
    showAll: "SHOW ALL",
    showLess: "SHOW LESS",
    error: "Error",
    noPaymentMethods: "No payment methods available"
  },
  uk: {
    generalMin: "Мін",
    generalMax: "Макс"
  },
  hr: {
    generalMin: "Minimalno",
    generalMax: "Maksimalno",
    showAll: "Prikaži sve",
    showLess: "Prikaži manje"
  },
  tr: {
    generalMin: "Min",
    generalMax: "Maks",
    showAll: "HEPSİNİ GÖSTER",
    showLess: "DAHA AZ GÖSTER",
    error: "Hata",
    noPaymentMethods: "Hiçbir ödeme yöntemi mevcut değil"
  },
  "en-us": {
    generalMin: "Min",
    generalMax: "Max",
    showAll: "SHOW ALL",
    showLess: "SHOW LESS"
  }
};
function et(t) {
  Ue(t, "svelte-1wlv0rl", "*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.CashierMethodList{display:flex;flex-direction:column;background:var(--emw--color-background, #fff);box-shadow:0 0 4px var(--mmw--color-black-transparency-10, rgba(0, 0, 0, 0.1));width:100%;border-radius:var(--mmw--border-radius-medium-plus, 6px);container-name:method-list;container-type:inline-size}.SelectorWrapper{display:flex;flex-direction:row;align-items:center;justify-content:left;cursor:pointer;position:relative;height:var(--mmw-method-height, 80px);box-sizing:border-box;border-bottom:1px solid var(--mmw--color-grey-105, #E8E9EB);padding:0 var(--emw--spacing-small, 12px)}.SelectorWrapper:first-child{border-radius:var(--mmw--border-radius-medium-plus, 6px) var(--mmw--border-radius-medium-plus, 6px) 0 0}.SelectorWrapper:last-child{border-radius:0 0 var(--mmw--border-radius-medium-plus, 6px) var(--mmw--border-radius-medium-plus, 6px)}.SelectorWrapper.checked{background:var(--emw--color-background-secondary, #F9F8F8)}.SelectorWrapper:not(.checked):hover{background:linear-gradient(0, var(--emw--color-background-secondary, #F9F8F8) 0%, var(--emw--color-background, #fff) 100%)}.MethodLogo{display:flex;justify-content:center;align-items:center;margin-right:var(--mmw--spacing-small, 14px);width:var(--mmw-logo-width, 110px);min-height:var(--mmw-logo-height, 64px);background:var(--emw--color-background, #FFF);border:1px solid var(--mmw--color-grey-105, #E8E9EB);border-radius:var(--mmw--border-radius-medium-plus, 6px);overflow:hidden;max-height:calc(100% - var(--emw--spacing-small, 12px) - var(--emw--spacing-small, 12px))}.MethodLogo img{width:100%;height:100%}.MethodTitle{color:var(--mmw--color-grey-10, #111);font-size:var(--emw--font-size-medium, 16px);word-break:break-all}.MethodLimits{display:flex;flex-direction:column;align-items:flex-end;margin-left:auto}.Limits{max-width:100%;white-space:nowrap;font-size:var(--emw--font-size-small, 14px);line-height:var(--emw--line-height-xl, 24px);color:var(--mmw--color-grey-290, #666);font-weight:var(--emw--font-weight-normal, 400);font-style:normal}.EmptyContentMessageWrapper{display:flex;flex-direction:column;box-sizing:border-box;background:var(--emw--color-gray-50, #F7F8FA);border-bottom:1px solid var(--mmw--color-grey-105, #E8E9EB);padding:var(--emw--spacing-small, 12px);max-height:500px}.EmptyContentMessageHeader{display:flex;gap:4px;align-items:end}.EmptyContentMessageTitle{font-size:var(--emw--font-size-small, 16px);font-weight:var(--emw--font-weight-semibold, 500);color:var(--emw--color-warning, rgb(250, 146, 0))}.EmptyContentMessageText{word-break:break-word;padding:var(--emw--spacing-small, 12px) calc(var(--emw--spacing-small, 12px) / 2);font-size:var(--emw--font-size-small, 14px)}.EmptyContentMessageDesktop p{font-size:var(--emw--font-size-medium, 16px)}.IconWarning{width:30px;display:flex}.IconWarning svg{height:18px;fill:var(--emw--color-warning, rgb(250, 146, 0))}.ShowAllButton{cursor:pointer;color:var(--mmw--color-grey-290, #666);text-align:center;font-size:var(--emw--font-size-x-small, 12px);font-style:normal;font-weight:var(--emw--font-weight-semibold, 500);font-family:inherit;background:var(--emw--color-gray-50, #F7F8FA);line-height:normal;border:1px solid var(--mmw--color-grey-105, #E8E9EB);border-radius:var(--emw--border-radius-medium, 4px);margin:var(--emw--spacing-small, 12px) auto;height:36px;display:flex;align-items:center;justify-content:center;width:80%}.ShowAllButton:hover{background:var(--emw--color-background, #fff)}@container method-list (width < 450px){.MethodLogo{min-width:var(--mmw-logo-small-width, 90px);min-height:var(--mmw-logo--small-height, 50px);overflow:hidden}.CashierMethodList .MethodTitle{display:inline-block;flex-grow:1;font-size:var(--emw--font-size-medium, 16px);line-height:120%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.CashierMethodList .MethodLimits .Limits{flex-shrink:0;font-size:var(--emw--font-size-x-small, 12px)}}@container method-list (max-width: 300px){.Limits{display:none}}");
}
function he(t, e, s) {
  const r = t.slice();
  return r[48] = e[s], r[50] = s, r;
}
function fe(t) {
  let e;
  return {
    c() {
      e = b("cashier-spinner"), v(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        t[4]
      ), v(
        e,
        "clientstyling",
        /*clientstyling*/
        t[3]
      );
    },
    m(s, r) {
      z(s, e, r);
    },
    p(s, r) {
      r[0] & /*clientstylingurl*/
      16 && v(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        s[4]
      ), r[0] & /*clientstyling*/
      8 && v(
        e,
        "clientstyling",
        /*clientstyling*/
        s[3]
      );
    },
    d(s) {
      s && D(e);
    }
  };
}
function pe(t) {
  let e, s, r, a, l = me(
    /*paymentMethodsToShow*/
    t[8]
  ), o = [];
  for (let c = 0; c < l.length; c += 1)
    o[c] = we(he(t, l, c));
  let i = (
    /*noPaymentMethodsAvailable*/
    t[13] && !/*showSpinner*/
    t[12] && ye(t)
  ), m = (
    /*methodsButtonToggleText*/
    t[7] && be(t)
  );
  return {
    c() {
      e = b("div"), s = b("div");
      for (let c = 0; c < o.length; c += 1)
        o[c].c();
      r = _(), i && i.c(), a = _(), m && m.c(), y(s, "class", "CashierMethodList"), y(e, "class", "CashierMethodListWidget");
    },
    m(c, f) {
      z(c, e, f), d(e, s);
      for (let u = 0; u < o.length; u += 1)
        o[u] && o[u].m(s, null);
      d(s, r), i && i.m(s, null), d(e, a), m && m.m(e, null), t[27](e);
    },
    p(c, f) {
      if (f[0] & /*selectedPaymentMethod, paymentMethodsToShow, selectPayMeth, formatter, $_*/
      115008) {
        l = me(
          /*paymentMethodsToShow*/
          c[8]
        );
        let u;
        for (u = 0; u < l.length; u += 1) {
          const h = he(c, l, u);
          o[u] ? o[u].p(h, f) : (o[u] = we(h), o[u].c(), o[u].m(s, r));
        }
        for (; u < o.length; u += 1)
          o[u].d(1);
        o.length = l.length;
      }
      /*noPaymentMethodsAvailable*/
      c[13] && !/*showSpinner*/
      c[12] ? i ? i.p(c, f) : (i = ye(c), i.c(), i.m(s, null)) : i && (i.d(1), i = null), /*methodsButtonToggleText*/
      c[7] ? m ? m.p(c, f) : (m = be(c), m.c(), m.m(e, null)) : m && (m.d(1), m = null);
    },
    d(c) {
      c && D(e), Ve(o, c), i && i.d(), m && m.d(), t[27](null);
    }
  };
}
function we(t) {
  let e, s, r, a, l, o, i, m, c = (
    /*payMeth*/
    (t[48].Label || /*payMeth*/
    t[48].Name) + ""
  ), f, u, h, p, P = (
    /*$_*/
    t[14]("generalMin") + ""
  ), F, k, C = (
    /*formatter*/
    t[15].format(
      /*payMeth*/
      t[48].DisplayCurrency.MinAmountLimit
    ) + ""
  ), N, H, L = (
    /*payMeth*/
    t[48].DisplayCurrency.Name + ""
  ), W, J, E, j = (
    /*$_*/
    t[14]("generalMax") + ""
  ), O, I, U = (
    /*formatter*/
    t[15].format(
      /*payMeth*/
      t[48].DisplayCurrency.MaxAmountLimit
    ) + ""
  ), R, X, G = (
    /*payMeth*/
    t[48].DisplayCurrency.Name + ""
  ), q, Y, K;
  function Q() {
    return (
      /*click_handler*/
      t[25](
        /*payMeth*/
        t[48]
      )
    );
  }
  return {
    c() {
      e = b("div"), s = b("div"), r = b("img"), o = _(), i = b("div"), m = b("span"), f = x(c), u = _(), h = b("div"), p = b("span"), F = x(P), k = _(), N = x(C), H = _(), W = x(L), J = _(), E = b("span"), O = x(j), I = _(), R = x(U), X = _(), q = x(G), ce(r.src, a = /*payMeth*/
      t[48].LogoUrl) || y(r, "src", a), y(r, "alt", l = /*payMeth*/
      t[48].Label), y(s, "class", "MethodLogo"), y(i, "class", "MethodTitle"), y(p, "class", "Limits"), y(E, "class", "Limits"), y(h, "class", "MethodLimits"), y(e, "class", "SelectorWrapper"), Z(
        e,
        "checked",
        /*selectedPaymentMethod*/
        t[6] === /*payMeth*/
        t[48].Name
      );
    },
    m(B, M) {
      z(B, e, M), d(e, s), d(s, r), d(e, o), d(e, i), d(i, m), d(m, f), d(e, u), d(e, h), d(h, p), d(p, F), d(p, k), d(p, N), d(p, H), d(p, W), d(h, J), d(h, E), d(E, O), d(E, I), d(E, R), d(E, X), d(E, q), Y || (K = [
        se(e, "click", Q),
        se(e, "keyup", st)
      ], Y = !0);
    },
    p(B, M) {
      t = B, M[0] & /*paymentMethodsToShow*/
      256 && !ce(r.src, a = /*payMeth*/
      t[48].LogoUrl) && y(r, "src", a), M[0] & /*paymentMethodsToShow*/
      256 && l !== (l = /*payMeth*/
      t[48].Label) && y(r, "alt", l), M[0] & /*paymentMethodsToShow*/
      256 && c !== (c = /*payMeth*/
      (t[48].Label || /*payMeth*/
      t[48].Name) + "") && T(f, c), M[0] & /*$_*/
      16384 && P !== (P = /*$_*/
      t[14]("generalMin") + "") && T(F, P), M[0] & /*paymentMethodsToShow*/
      256 && C !== (C = /*formatter*/
      t[15].format(
        /*payMeth*/
        t[48].DisplayCurrency.MinAmountLimit
      ) + "") && T(N, C), M[0] & /*paymentMethodsToShow*/
      256 && L !== (L = /*payMeth*/
      t[48].DisplayCurrency.Name + "") && T(W, L), M[0] & /*$_*/
      16384 && j !== (j = /*$_*/
      t[14]("generalMax") + "") && T(O, j), M[0] & /*paymentMethodsToShow*/
      256 && U !== (U = /*formatter*/
      t[15].format(
        /*payMeth*/
        t[48].DisplayCurrency.MaxAmountLimit
      ) + "") && T(R, U), M[0] & /*paymentMethodsToShow*/
      256 && G !== (G = /*payMeth*/
      t[48].DisplayCurrency.Name + "") && T(q, G), M[0] & /*selectedPaymentMethod, paymentMethodsToShow*/
      320 && Z(
        e,
        "checked",
        /*selectedPaymentMethod*/
        t[6] === /*payMeth*/
        t[48].Name
      );
    },
    d(B) {
      B && D(e), Y = !1, qe(K);
    }
  };
}
function ye(t) {
  let e, s, r, a, l, o = (
    /*$_*/
    t[14]("error") + ""
  ), i, m, c, f = (
    /*$_*/
    t[14]("noPaymentMethods") + ""
  ), u;
  return {
    c() {
      e = b("div"), s = b("div"), r = b("div"), r.innerHTML = '<svg fill="currentColor" height="200px" width="200px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 294.995 294.995" xml:space="preserve" stroke="#fa9200"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><g><path d="M291.874,248.279L165.605,26.526c-4.007-7.037-10.776-11.26-18.107-11.26s-14.101,4.202-18.107,11.239L3.121,248.238 c-3.979,6.989-4.164,15.013-0.493,21.326c3.67,6.313,10.663,10.165,18.705,10.165h252.329c8.042,0,15.035-3.852,18.705-10.165 C296.038,263.251,295.854,255.268,291.874,248.279z M146.665,86.229c9.665,0,17.5,7.835,17.5,17.5v63c0,9.665-7.835,17.5-17.5,17.5 c-9.665,0-17.5-7.835-17.5-17.5v-63C129.165,94.064,137,86.229,146.665,86.229z M147.498,204.005c9.665,0,17.5,7.835,17.5,17.5 c0,9.665-7.835,17.5-17.5,17.5c-9.665,0-17.5-7.835-17.5-17.5C129.998,211.84,137.833,204.005,147.498,204.005z"></path></g></g></svg>', a = _(), l = b("p"), i = x(o), m = _(), c = b("p"), u = x(f), y(r, "class", "IconWarning"), y(l, "class", "EmptyContentMessageTitle"), y(s, "class", "EmptyContentMessageHeader"), y(c, "class", "EmptyContentMessageText"), y(e, "class", "EmptyContentMessageWrapper"), Z(
        e,
        "EmptyContentMessageDesktop",
        /*desktopView*/
        t[11]
      );
    },
    m(h, p) {
      z(h, e, p), d(e, s), d(s, r), d(s, a), d(s, l), d(l, i), d(e, m), d(e, c), d(c, u);
    },
    p(h, p) {
      p[0] & /*$_*/
      16384 && o !== (o = /*$_*/
      h[14]("error") + "") && T(i, o), p[0] & /*$_*/
      16384 && f !== (f = /*$_*/
      h[14]("noPaymentMethods") + "") && T(u, f), p[0] & /*desktopView*/
      2048 && Z(
        e,
        "EmptyContentMessageDesktop",
        /*desktopView*/
        h[11]
      );
    },
    d(h) {
      h && D(e);
    }
  };
}
function be(t) {
  let e, s, r, a;
  return {
    c() {
      e = b("div"), s = x(
        /*methodsButtonToggleText*/
        t[7]
      ), y(e, "class", "ShowAllButton");
    },
    m(l, o) {
      z(l, e, o), d(e, s), r || (a = se(
        e,
        "click",
        /*click_handler_1*/
        t[26]
      ), r = !0);
    },
    p(l, o) {
      o[0] & /*methodsButtonToggleText*/
      128 && T(
        s,
        /*methodsButtonToggleText*/
        l[7]
      );
    },
    d(l) {
      l && D(e), r = !1, a();
    }
  };
}
function ve(t) {
  let e, s, r;
  return {
    c() {
      e = b("cashier-error"), s = b("span"), r = x(
        /*errorMessage*/
        t[10]
      ), y(s, "slot", "text"), v(
        e,
        "lang",
        /*lang*/
        t[0]
      ), v(
        e,
        "assetsurl",
        /*assetsurl*/
        t[1]
      ), v(
        e,
        "translationurl",
        /*translationurl*/
        t[2]
      ), v(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        t[4]
      ), v(
        e,
        "clientstyling",
        /*clientstyling*/
        t[3]
      ), v(e, "hidebuttons", "true");
    },
    m(a, l) {
      z(a, e, l), d(e, s), d(s, r);
    },
    p(a, l) {
      l[0] & /*errorMessage*/
      1024 && T(
        r,
        /*errorMessage*/
        a[10]
      ), l[0] & /*lang*/
      1 && v(
        e,
        "lang",
        /*lang*/
        a[0]
      ), l[0] & /*assetsurl*/
      2 && v(
        e,
        "assetsurl",
        /*assetsurl*/
        a[1]
      ), l[0] & /*translationurl*/
      4 && v(
        e,
        "translationurl",
        /*translationurl*/
        a[2]
      ), l[0] & /*clientstylingurl*/
      16 && v(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        a[4]
      ), l[0] & /*clientstyling*/
      8 && v(
        e,
        "clientstyling",
        /*clientstyling*/
        a[3]
      );
    },
    d(a) {
      a && D(e);
    }
  };
}
function tt(t) {
  let e, s, r, a = (
    /*showSpinner*/
    t[12] && fe(t)
  ), l = (
    /*showMethodsList*/
    (t[9] || /*desktopView*/
    t[11]) && pe(t)
  ), o = (
    /*errorMessage*/
    t[10] && ve(t)
  );
  return {
    c() {
      a && a.c(), e = _(), l && l.c(), s = _(), o && o.c(), r = Re();
    },
    m(i, m) {
      a && a.m(i, m), z(i, e, m), l && l.m(i, m), z(i, s, m), o && o.m(i, m), z(i, r, m);
    },
    p(i, m) {
      /*showSpinner*/
      i[12] ? a ? a.p(i, m) : (a = fe(i), a.c(), a.m(e.parentNode, e)) : a && (a.d(1), a = null), /*showMethodsList*/
      i[9] || /*desktopView*/
      i[11] ? l ? l.p(i, m) : (l = pe(i), l.c(), l.m(s.parentNode, s)) : l && (l.d(1), l = null), /*errorMessage*/
      i[10] ? o ? o.p(i, m) : (o = ve(i), o.c(), o.m(r.parentNode, r)) : o && (o.d(1), o = null);
    },
    i: ae,
    o: ae,
    d(i) {
      i && (D(e), D(s), D(r)), a && a.d(i), l && l.d(i), o && o.d(i);
    }
  };
}
const st = () => {
};
function nt(t, e, s) {
  let r;
  Be(t, Qe, (n) => s(14, r = n)), de.extend(Ze);
  let { lang: a = "en" } = e, { local: l = "en-US" } = e, { endpoint: o } = e, { session: i } = e, { customerid: m } = e, { assetsurl: c } = e, { currency: f } = e, { numberofmethodsshown: u } = e, { translationurl: h = "" } = e, { clientstyling: p = "" } = e, { clientstylingurl: P = "" } = e, { ismobileview: F } = e, k = [], C, N, H = "", L = [], W = !0, J = new Intl.NumberFormat(l, { minimumFractionDigits: 2 }), E = "", j, O = !0, I = !1, U = !1;
  var R;
  (function(n) {
    n.PlayerSessionIsNotValid = "PlayerSessionIsNotValid", n.Success = "Success", n.JwtTokenError = "JwtTokenError";
  })(R || (R = {})), Ie();
  const X = () => {
    let n = h;
    if (n)
      return fetch(n).then((g) => g.json()).then((g) => {
        Object.keys(g).forEach((A) => {
          ue(A, g[A]);
        });
      }).catch((g) => {
        console.log(g);
      });
  };
  Object.keys(ge).forEach((n) => {
    ue(n, ge[n]);
  });
  const G = () => {
    $e(a);
  }, q = () => {
    s(12, I = !0);
    const n = new URL(`${o}/v1/player/${m}/payment/GetPaymentMetadata`), g = new Headers();
    g.append("accept", "application/json"), g.append("Content-Type", "application/json"), g.append("X-Client-Request-Timestamp", de.utc().format("YYYY-MM-DD HH:mm:ss.SSS"));
    const A = {
      method: "POST",
      headers: g,
      body: JSON.stringify({
        XPaymentSessionToken: i,
        Currency: f,
        Tags: { UserAgent: window.navigator.userAgent }
      })
    };
    fetch(n, A).then((w) => w.json()).then((w) => {
      var V;
      if (w.error) {
        s(10, E = w.error);
        return;
      }
      if (w.ResponseCode !== R.Success) {
        j = w.ResponseCode, B();
        return;
      }
      k = (V = w.PaymentMethods) != null && V.Ordering ? Y(w) : K(w), s(7, H = u && +u > 0 && k.length > +u ? r("showAll") : ""), s(8, L = H ? k.slice(0, +u) : k), window.postMessage(
        {
          type: "StartSessionCountdown",
          paymentMethodName: k[0].Name,
          xPaymentSessionToken: w.XPaymentSessionToken
        },
        window.location.href
      ), window.postMessage({ type: "DataLoading", isDataLoaded: !1 });
    }).finally(() => {
      s(12, I = !1), window.postMessage({ type: "DataLoading", isDataLoaded: !0 }), s(13, U = !L.length);
    });
  }, Y = (n) => {
    const g = [];
    return n.PaymentMethods.Ordering.DefaultPaymentMethodsOrder.forEach((A) => {
      const w = n.PaymentMethods.PaymentMethods.find((V) => V.Name === A);
      if (w) {
        const V = (w == null ? void 0 : w.Logos.find(($) => $.LogoType === "Desktop")) || {}, Ae = (w == null ? void 0 : w.Logos.find(($) => $.LogoType === "Mobile")) || {}, le = O ? V : Ae;
        g.push(te(ee({}, w), {
          LogoUrl: le.LogoUrl ? `https:${le.LogoUrl}` : ""
        }));
      }
    }), g;
  }, K = (n) => n.PaymentMethods.PaymentMethods.map((g) => te(ee({}, g), {
    LogoUrl: g.Logos && g.Logos.length && g.Logos[0].LogoUrl ? `https:${g.Logos[0].LogoUrl}` : ""
  })), Q = (n) => {
    s(6, N = n.Name), window.postMessage({ type: "SelectPayMeth", details: n }, window.location.href), dispatchEvent(new CustomEvent(
      "selectPayMeth",
      {
        detail: n,
        bubbles: !0,
        cancelable: !0,
        composed: !0
      }
    ));
  }, B = () => {
    window.postMessage(
      {
        type: "ErrorResponseCode",
        errorResponseCode: j
      },
      window.location.href
    );
  }, M = () => {
    s(11, O = F === "false");
  }, ne = () => {
    L == k ? Le() : Me();
  }, Me = () => {
    s(8, L = k), s(7, H = r("showLess"));
  }, Le = () => {
    s(8, L = k.slice(0, +u)), N && !L.find((n) => n.Name === N) && L.splice(0, 0, k.find((n) => n.Name === N)), s(7, H = r("showAll"));
  }, _e = () => {
    s(9, W = !0);
  }, ke = (n) => {
    s(9, W = !n.hideMethodsList);
  }, Ce = () => {
    let n = document.createElement("style");
    n.innerHTML = p, C.appendChild(n);
  }, Se = () => {
    let n = new URL(P), g = document.createElement("style");
    fetch(n.href).then((A) => A.text()).then((A) => {
      g.innerHTML = A, setTimeout(
        () => {
          C.appendChild(g);
        },
        1
      ), setTimeout(
        () => {
        },
        500
      );
    });
  };
  Ge(() => (window.addEventListener("message", ie, !1), () => {
    window.removeEventListener("message", ie, !1);
  }));
  const ie = (n) => {
    switch (n.data.type) {
      case "BackToMethodList":
        _e();
        break;
      case "HideMethodsList":
        ke(n.data.details);
        break;
    }
  }, Ee = (n) => Q(n), xe = () => ne();
  function Te(n) {
    Ye[n ? "unshift" : "push"](() => {
      C = n, s(5, C);
    });
  }
  return t.$$set = (n) => {
    "lang" in n && s(0, a = n.lang), "local" in n && s(18, l = n.local), "endpoint" in n && s(19, o = n.endpoint), "session" in n && s(20, i = n.session), "customerid" in n && s(21, m = n.customerid), "assetsurl" in n && s(1, c = n.assetsurl), "currency" in n && s(22, f = n.currency), "numberofmethodsshown" in n && s(23, u = n.numberofmethodsshown), "translationurl" in n && s(2, h = n.translationurl), "clientstyling" in n && s(3, p = n.clientstyling), "clientstylingurl" in n && s(4, P = n.clientstylingurl), "ismobileview" in n && s(24, F = n.ismobileview);
  }, t.$$.update = () => {
    t.$$.dirty[0] & /*endpoint, session, customerid*/
    3670016 && o && i && m && q(), t.$$.dirty[0] & /*lang*/
    1 && a && G(), t.$$.dirty[0] & /*clientstyling, customStylingContainer*/
    40 && p && C && Ce(), t.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
    48 && P && C && Se(), t.$$.dirty[0] & /*ismobileview*/
    16777216 && F && M(), t.$$.dirty[0] & /*lang, translationurl*/
    5 && a && h && X();
  }, [
    a,
    c,
    h,
    p,
    P,
    C,
    N,
    H,
    L,
    W,
    E,
    O,
    I,
    U,
    r,
    J,
    Q,
    ne,
    l,
    o,
    i,
    m,
    f,
    u,
    F,
    Ee,
    xe,
    Te
  ];
}
class it extends He {
  constructor(e) {
    super(), We(
      this,
      e,
      nt,
      tt,
      Oe,
      {
        lang: 0,
        local: 18,
        endpoint: 19,
        session: 20,
        customerid: 21,
        assetsurl: 1,
        currency: 22,
        numberofmethodsshown: 23,
        translationurl: 2,
        clientstyling: 3,
        clientstylingurl: 4,
        ismobileview: 24
      },
      et,
      [-1, -1]
    );
  }
  get lang() {
    return this.$$.ctx[0];
  }
  set lang(e) {
    this.$$set({ lang: e }), S();
  }
  get local() {
    return this.$$.ctx[18];
  }
  set local(e) {
    this.$$set({ local: e }), S();
  }
  get endpoint() {
    return this.$$.ctx[19];
  }
  set endpoint(e) {
    this.$$set({ endpoint: e }), S();
  }
  get session() {
    return this.$$.ctx[20];
  }
  set session(e) {
    this.$$set({ session: e }), S();
  }
  get customerid() {
    return this.$$.ctx[21];
  }
  set customerid(e) {
    this.$$set({ customerid: e }), S();
  }
  get assetsurl() {
    return this.$$.ctx[1];
  }
  set assetsurl(e) {
    this.$$set({ assetsurl: e }), S();
  }
  get currency() {
    return this.$$.ctx[22];
  }
  set currency(e) {
    this.$$set({ currency: e }), S();
  }
  get numberofmethodsshown() {
    return this.$$.ctx[23];
  }
  set numberofmethodsshown(e) {
    this.$$set({ numberofmethodsshown: e }), S();
  }
  get translationurl() {
    return this.$$.ctx[2];
  }
  set translationurl(e) {
    this.$$set({ translationurl: e }), S();
  }
  get clientstyling() {
    return this.$$.ctx[3];
  }
  set clientstyling(e) {
    this.$$set({ clientstyling: e }), S();
  }
  get clientstylingurl() {
    return this.$$.ctx[4];
  }
  set clientstylingurl(e) {
    this.$$set({ clientstylingurl: e }), S();
  }
  get ismobileview() {
    return this.$$.ctx[24];
  }
  set ismobileview(e) {
    this.$$set({ ismobileview: e }), S();
  }
}
je(it, { lang: {}, local: {}, endpoint: {}, session: {}, customerid: {}, assetsurl: {}, currency: {}, numberofmethodsshown: {}, translationurl: {}, clientstyling: {}, clientstylingurl: {}, ismobileview: {} }, [], [], !0);
export {
  it as default
};
