import { S as it, b as nt, s as at, f as U, c as lt, n as J, e as W, l as N, w as ot, v as rt, K as V, L as ct, g as X, D as ft, t as dt, k as ut, x as B, m as l, o as v, p as j, y as I, q as e, z as ht, V as mt, F as vt, W as pt, J as G, A as gt, N as T, E as xt } from "./CashierConfirmModal-untxGhsx.js";
import { f as K } from "./CashierModal-BrwIBn9a.js";
import { a as kt, $ as wt, i as yt, b as Tt } from "./CashierError-Cns-3PNq.js";
import { d as bt } from "./CashierMethodDetails-B6Mr4aP0.js";
yt({
  fallbackLocale: "en"
});
function Q(a, t) {
  kt(a, t);
}
function _t(a) {
  wt.set(a);
}
const Z = {
  en: {
    transactionHistoryTitle: "Transaction History",
    transactionIdTitle: "ID",
    transactionDateTitle: "Date",
    transactionTypeTitle: "Type",
    transactionStatusTitle: "Status",
    copyTransactionId: "Transaction Id copied to clipboard",
    transactionStatus: {
      Authorized: "Authorized",
      Success: "Success",
      Failed: "Failed",
      Rejected: "Rejected",
      Pending: "Pending"
    },
    transactionType: {
      Deposit: "Deposit",
      Withdraw: "Withdraw"
    }
  },
  tr: {
    transactionHistoryTitle: "İşlem Geçmişi",
    transactionIdTitle: "İşlem ID'si",
    transactionDateTitle: "Tarih",
    transactionTypeTitle: "Tip",
    transactionStatusTitle: "Durum",
    copyTransactionId: "İşlem ID’si kopyalandı",
    transactionStatus: {
      Authorized: "Onaylandı",
      Success: "Başarılı",
      Failed: "Başarısız",
      Rejected: "Reddedildi",
      Pending: "Beklemede"
    },
    transactionType: {
      Deposit: "Para Yatır",
      Withdraw: "Çekim"
    }
  }
};
function Ct(a, t) {
  if (a) {
    const s = document.createElement("style");
    s.innerHTML = t, a.appendChild(s);
  }
}
function St(a, t) {
  const s = new URL(t);
  fetch(s.href).then((i) => i.text()).then((i) => {
    const o = document.createElement("style");
    o.innerHTML = i, a && a.appendChild(o);
  }).catch((i) => {
    console.error("There was an error while trying to load client styling from URL", i);
  });
}
function Ht(a) {
  lt(a, "svelte-1kx4sff", ".svelte-1kx4sff.svelte-1kx4sff,.svelte-1kx4sff.svelte-1kx4sff::before,.svelte-1kx4sff.svelte-1kx4sff::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-style:inherit}.CopyTooltip.svelte-1kx4sff.svelte-1kx4sff{width:50%;display:flex;align-items:center;justify-content:center;background-color:var(--emw--color-primary, #7EC51E);position:absolute;top:-6px;left:50%;transform:translateX(-50%);color:var(--emw--color-white, #FFF);border-radius:var(--mmw--border-radius-medium-plus, 6px);z-index:1;opacity:1;container-name:copy-tooltip;font-size:var(--emw--font-size-medium, 16px);line-height:calc(var(--emw--font-size-medium, 16px) + 2px);padding:4px}.CashierTransactionHistory.svelte-1kx4sff.svelte-1kx4sff{display:flex;flex-direction:column;position:relative;width:100%;row-gap:var(--emw--spacing-small, 12px);container-name:transaction-history;container-type:inline-size;margin-bottom:var(--emw--spacing-small, 12px)}.CashierTransactionHistory.svelte-1kx4sff table.svelte-1kx4sff{font-size:var(--emw--font-size-medium, 16px);word-break:break-all;width:100%;border-collapse:collapse;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;margin-bottom:var(--emw--spacing-small-minus, 10px)}.CashierTransactionHistory.svelte-1kx4sff table.svelte-1kx4sff:not(:last-child){margin-bottom:var(--emw--spacing-large, 20px)}.CashierTransactionHistory.svelte-1kx4sff thead tr.svelte-1kx4sff{border-bottom:1px solid var(--mmw--color-grey-105, #E8E9EB);color:var(--mmw--color-grey-10, #111);height:50px}.CashierTransactionHistory.svelte-1kx4sff tbody tr.svelte-1kx4sff{color:var(--mmw--color-grey-290, #666)}.CashierTransactionHistory.svelte-1kx4sff td.svelte-1kx4sff{max-width:250px;vertical-align:middle;height:40px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 var(--emw--spacing-large, 20px) 0 var(--emw--spacing-small, 12px)}.CashierTransactionHistory.svelte-1kx4sff td:last-child .CashierTransactionHistoryStatusText.svelte-1kx4sff{width:calc(100% - var(--emw--spacing-2x-small-plus, 6px) * 3 - 5px);display:block}.CashierTransactionHistory.svelte-1kx4sff tr.svelte-1kx4sff{position:relative}@container transaction-history (width < 750px){.CashierTransactionHistory.svelte-1kx4sff .CopyTooltip.svelte-1kx4sff{width:100%}.CashierTransactionHistory.svelte-1kx4sff .CashierTransactionId.svelte-1kx4sff{max-width:135px}.CashierTransactionHistory.svelte-1kx4sff td.svelte-1kx4sff{padding:0 var(--emw--spacing-small, 12px) 0 var(--emw--spacing-small, 12px)}}@container transaction-history (width < 475px){.CashierTransactionHistory.svelte-1kx4sff .CashierTransactionHistoryWrapper.svelte-1kx4sff{padding:0 var(--emw--spacing-2x-small-plus, 6px)}.CashierTransactionHistory.svelte-1kx4sff td.svelte-1kx4sff{padding:0 var(--emw--spacing-2x-small-plus, 6px)}.CashierTransactionHistory.svelte-1kx4sff td.svelte-1kx4sff:first-child{max-width:60px}}@container transaction-history (width < 350px){.CashierTransactionHistory.svelte-1kx4sff table.svelte-1kx4sff{table-layout:fixed}.CashierTransactionHistory.svelte-1kx4sff table td.svelte-1kx4sff{padding:0 0 0 var(--emw--spacing-small, 5px)}}.CashierTransactionHistoryWrapper.svelte-1kx4sff.svelte-1kx4sff{background:var(--emw--color-background, #fff);box-shadow:0 0 4px var(--mmw--color-black-transparency-10, rgba(0, 0, 0, 0.1));border-radius:var(--mmw--border-radius-medium-plus, 6px);width:100%;box-sizing:border-box;padding:0 var(--emw--spacing-small, 12px)}.CashierTransactionHistoryTitle.svelte-1kx4sff.svelte-1kx4sff{color:var(--mmw--color-grey-10, #111);font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-normal, 400);line-height:calc(var(--emw--font-size-medium, 16px) + 2px);text-align:left}.CashierTransactionId.svelte-1kx4sff.svelte-1kx4sff{cursor:pointer;-webkit-user-select:none;-ms-user-select:none;user-select:none}.CashierTransactionId.svelte-1kx4sff.svelte-1kx4sff:hover{background-color:var(--emw--color-gray-50, #F7F8FA)}.CashierTransactionHistoryStatus.svelte-1kx4sff.svelte-1kx4sff{display:flex;gap:5px}.CashierTransactionHistoryStatusText.svelte-1kx4sff.svelte-1kx4sff{line-height:calc(var(--emw--font-size-medium, 16px) + 2px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.CashierTransactionHistoryContent.svelte-1kx4sff.svelte-1kx4sff{width:100%;overflow:hidden}.CashierTransactionHistoryIcon.svelte-1kx4sff.svelte-1kx4sff{vertical-align:middle;height:var(--emw--font-size-medium, 16px);width:var(--emw--font-size-medium, 16px)}");
}
function $(a, t, s) {
  const i = a.slice();
  return i[24] = t[s], i[26] = s, i;
}
function tt(a) {
  let t, s, i, o = (
    /*$_*/
    a[5]("transactionHistoryTitle") + ""
  ), c, d, u, x, b, _, p, H, L = (
    /*$_*/
    a[5]("transactionIdTitle") + ""
  ), D, k, C, y = (
    /*$_*/
    a[5]("transactionDateTitle") + ""
  ), A, z, R, M = (
    /*$_*/
    a[5]("transactionTypeTitle") + ""
  ), E, Y, P, S = (
    /*$_*/
    a[5]("transactionStatusTitle") + ""
  ), g, n, r, f = (
    /*copied*/
    a[3] && et(a)
  ), O = V(
    /*txnHistory*/
    a[2]
  ), m = [];
  for (let h = 0; h < O.length; h += 1)
    m[h] = st($(a, O, h));
  return {
    c() {
      t = v("div"), f && f.c(), s = j(), i = v("h3"), c = I(o), d = j(), u = v("div"), x = v("div"), b = v("table"), _ = v("thead"), p = v("tr"), H = v("td"), D = I(L), k = j(), C = v("td"), A = I(y), z = j(), R = v("td"), E = I(M), Y = j(), P = v("td"), g = I(S), n = j(), r = v("tbody");
      for (let h = 0; h < m.length; h += 1)
        m[h].c();
      e(i, "class", "CashierTransactionHistoryTitle svelte-1kx4sff"), e(H, "class", "svelte-1kx4sff"), e(C, "class", "svelte-1kx4sff"), e(R, "class", "svelte-1kx4sff"), e(P, "class", "svelte-1kx4sff"), e(p, "class", "svelte-1kx4sff"), e(_, "class", "svelte-1kx4sff"), e(r, "class", "svelte-1kx4sff"), e(b, "class", "svelte-1kx4sff"), e(x, "class", "CashierTransactionHistoryContent svelte-1kx4sff"), e(u, "class", "CashierTransactionHistoryWrapper svelte-1kx4sff"), e(t, "class", "CashierTransactionHistory svelte-1kx4sff");
    },
    m(h, F) {
      N(h, t, F), f && f.m(t, null), l(t, s), l(t, i), l(i, c), l(t, d), l(t, u), l(u, x), l(x, b), l(b, _), l(_, p), l(p, H), l(H, D), l(p, k), l(p, C), l(C, A), l(p, z), l(p, R), l(R, E), l(p, Y), l(p, P), l(P, g), l(b, n), l(b, r);
      for (let w = 0; w < m.length; w += 1)
        m[w] && m[w].m(r, null);
      a[16](t);
    },
    p(h, F) {
      if (/*copied*/
      h[3] ? f ? (f.p(h, F), F & /*copied*/
      8 && X(f, 1)) : (f = et(h), f.c(), X(f, 1), f.m(t, s)) : f && (ft(), dt(f, 1, 1, () => {
        f = null;
      }), ut()), F & /*$_*/
      32 && o !== (o = /*$_*/
      h[5]("transactionHistoryTitle") + "") && B(c, o), F & /*$_*/
      32 && L !== (L = /*$_*/
      h[5]("transactionIdTitle") + "") && B(D, L), F & /*$_*/
      32 && y !== (y = /*$_*/
      h[5]("transactionDateTitle") + "") && B(A, y), F & /*$_*/
      32 && M !== (M = /*$_*/
      h[5]("transactionTypeTitle") + "") && B(E, M), F & /*$_*/
      32 && S !== (S = /*$_*/
      h[5]("transactionStatusTitle") + "") && B(g, S), F & /*$_, txnHistory, TransactionMainStatus, copied, copyToClipboard*/
      124) {
        O = V(
          /*txnHistory*/
          h[2]
        );
        let w;
        for (w = 0; w < O.length; w += 1) {
          const q = $(h, O, w);
          m[w] ? m[w].p(q, F) : (m[w] = st(q), m[w].c(), m[w].m(r, null));
        }
        for (; w < m.length; w += 1)
          m[w].d(1);
        m.length = O.length;
      }
    },
    d(h) {
      h && W(t), f && f.d(), ct(m, h), a[16](null);
    }
  };
}
function et(a) {
  let t, s = (
    /*$_*/
    a[5]("copyTransactionId") + ""
  ), i, o, c, d;
  return {
    c() {
      t = v("div"), i = I(s), e(t, "class", "CopyTooltip svelte-1kx4sff");
    },
    m(u, x) {
      N(u, t, x), l(t, i), d = !0;
    },
    p(u, x) {
      a = u, (!d || x & /*$_*/
      32) && s !== (s = /*$_*/
      a[5]("copyTransactionId") + "") && B(i, s);
    },
    i(u) {
      d || (u && vt(() => {
        d && (c && c.end(1), o = pt(t, K, { duration: 100 }), o.start());
      }), d = !0);
    },
    o(u) {
      o && o.invalidate(), u && (c = mt(t, K, { duration: (
        /*tooltipduration*/
        a[0]
      ) })), d = !1;
    },
    d(u) {
      u && W(t), u && c && c.end();
    }
  };
}
function Dt(a) {
  let t, s, i;
  return {
    c() {
      t = T("svg"), s = T("circle"), i = T("path"), e(s, "cx", "12"), e(s, "cy", "12"), e(s, "r", "10"), e(s, "stroke", "#25bf00"), e(s, "stroke-width", "2"), e(s, "class", "svelte-1kx4sff"), e(i, "d", "M8 12L11 15L16 9"), e(i, "stroke", "#25bf00"), e(i, "stroke-width", "2"), e(i, "stroke-linecap", "round"), e(i, "stroke-linejoin", "round"), e(i, "class", "svelte-1kx4sff"), e(t, "width", "18"), e(t, "height", "18"), e(t, "viewBox", "0 0 24 24"), e(t, "fill", "none"), e(t, "xmlns", "http://www.w3.org/2000/svg"), e(t, "class", "svelte-1kx4sff");
    },
    m(o, c) {
      N(o, t, c), l(t, s), l(t, i);
    },
    d(o) {
      o && W(t);
    }
  };
}
function zt(a) {
  let t, s, i, o;
  return {
    c() {
      t = T("svg"), s = T("circle"), i = T("text"), o = I("R"), e(s, "cx", "12"), e(s, "cy", "12"), e(s, "r", "10"), e(s, "stroke", "#dd6617d4"), e(s, "stroke-width", "2"), e(s, "class", "svelte-1kx4sff"), e(i, "x", "50%"), e(i, "y", "54%"), e(i, "text-anchor", "middle"), e(i, "dominant-baseline", "middle"), e(i, "font-size", "14"), e(i, "font-weight", "bold"), e(i, "fill", "#dd6617d4"), e(i, "font-family", "Arial Rounded MT Bold, Arial, sans-serif"), e(i, "class", "svelte-1kx4sff"), e(t, "width", "18"), e(t, "height", "18"), e(t, "viewBox", "0 0 24 24"), e(t, "fill", "none"), e(t, "xmlns", "http://www.w3.org/2000/svg"), e(t, "class", "svelte-1kx4sff");
    },
    m(c, d) {
      N(c, t, d), l(t, s), l(t, i), l(i, o);
    },
    d(c) {
      c && W(t);
    }
  };
}
function It(a) {
  let t, s, i;
  return {
    c() {
      t = T("svg"), s = T("circle"), i = T("path"), e(s, "cx", "12"), e(s, "cy", "12"), e(s, "r", "10"), e(s, "stroke", "#f0a85f"), e(s, "stroke-width", "2"), e(s, "class", "svelte-1kx4sff"), e(i, "d", "M12 7V12L15 14"), e(i, "stroke", "#f0a85f"), e(i, "stroke-width", "2"), e(i, "stroke-linecap", "round"), e(i, "stroke-linejoin", "round"), e(i, "class", "svelte-1kx4sff"), e(t, "width", "18"), e(t, "height", "18"), e(t, "viewBox", "0 0 24 24"), e(t, "fill", "none"), e(t, "xmlns", "http://www.w3.org/2000/svg"), e(t, "class", "svelte-1kx4sff");
    },
    m(o, c) {
      N(o, t, c), l(t, s), l(t, i);
    },
    d(o) {
      o && W(t);
    }
  };
}
function At(a) {
  let t, s, i;
  return {
    c() {
      t = T("svg"), s = T("circle"), i = T("path"), e(s, "cx", "12"), e(s, "cy", "12"), e(s, "r", "10"), e(s, "stroke", "#e76049"), e(s, "stroke-width", "2"), e(s, "class", "svelte-1kx4sff"), e(i, "d", "M9 9L15 15M15 9L9 15"), e(i, "stroke", "#e76049"), e(i, "stroke-width", "2"), e(i, "stroke-linecap", "round"), e(i, "stroke-linejoin", "round"), e(i, "class", "svelte-1kx4sff"), e(t, "width", "18"), e(t, "height", "18"), e(t, "viewBox", "0 0 24 24"), e(t, "fill", "none"), e(t, "xmlns", "http://www.w3.org/2000/svg"), e(t, "class", "svelte-1kx4sff");
    },
    m(o, c) {
      N(o, t, c), l(t, s), l(t, i);
    },
    d(o) {
      o && W(t);
    }
  };
}
function Ft(a) {
  let t, s, i, o;
  return {
    c() {
      t = T("svg"), s = T("circle"), i = T("text"), o = I("A"), e(s, "cx", "12"), e(s, "cy", "12"), e(s, "r", "10"), e(s, "stroke", "#32b398"), e(s, "stroke-width", "2"), e(s, "class", "svelte-1kx4sff"), e(i, "x", "50%"), e(i, "y", "54%"), e(i, "text-anchor", "middle"), e(i, "dominant-baseline", "middle"), e(i, "font-size", "14"), e(i, "font-weight", "bold"), e(i, "fill", "#32b398"), e(i, "font-family", "Arial Rounded MT Bold, Arial, sans-serif"), e(i, "class", "svelte-1kx4sff"), e(t, "width", "18"), e(t, "height", "18"), e(t, "viewBox", "0 0 24 24"), e(t, "fill", "none"), e(t, "xmlns", "http://www.w3.org/2000/svg"), e(t, "class", "svelte-1kx4sff");
    },
    m(c, d) {
      N(c, t, d), l(t, s), l(t, i), l(i, o);
    },
    d(c) {
      c && W(t);
    }
  };
}
function st(a) {
  let t, s, i = (
    /*transaction*/
    a[24].Code + ""
  ), o, c, d, u = (
    /*transaction*/
    a[24].Date + ""
  ), x, b, _, p = (
    /*$_*/
    a[5](`transactionType.${/*transaction*/
    a[24].Type}`) + ""
  ), H, L, D, k, C, y, A, z = (
    /*$_*/
    a[5](`transactionStatus.${/*transaction*/
    a[24].Status}`) + ""
  ), R, M, E, Y;
  function P(n, r) {
    if (
      /*transaction*/
      n[24].Status === /*TransactionMainStatus*/
      n[4].Authorized
    )
      return Ft;
    if (
      /*transaction*/
      n[24].Status === /*TransactionMainStatus*/
      n[4].Failed
    )
      return At;
    if (
      /*transaction*/
      n[24].Status === /*TransactionMainStatus*/
      n[4].Pending
    )
      return It;
    if (
      /*transaction*/
      n[24].Status === /*TransactionMainStatus*/
      n[4].Rejected
    )
      return zt;
    if (
      /*transaction*/
      n[24].Status === /*TransactionMainStatus*/
      n[4].Success
    )
      return Dt;
  }
  let S = P(a), g = S && S(a);
  return {
    c() {
      t = v("tr"), s = v("td"), o = I(i), c = j(), d = v("td"), x = I(u), b = j(), _ = v("td"), H = I(p), L = j(), D = v("td"), k = v("div"), C = v("span"), g && g.c(), y = j(), A = v("span"), R = I(z), M = j(), e(s, "class", "CashierTransactionId svelte-1kx4sff"), G(
        s,
        "copied",
        /*copied*/
        a[3]
      ), e(d, "class", "svelte-1kx4sff"), e(_, "class", "svelte-1kx4sff"), e(C, "class", "CashierTransactionHistoryIcon svelte-1kx4sff"), e(A, "class", "CashierTransactionHistoryStatusText svelte-1kx4sff"), e(k, "class", "CashierTransactionHistoryStatus svelte-1kx4sff"), e(D, "class", "svelte-1kx4sff"), e(t, "class", "svelte-1kx4sff");
    },
    m(n, r) {
      N(n, t, r), l(t, s), l(s, o), l(t, c), l(t, d), l(d, x), l(t, b), l(t, _), l(_, H), l(t, L), l(t, D), l(D, k), l(k, C), g && g.m(C, null), l(k, y), l(k, A), l(A, R), l(t, M), E || (Y = gt(
        s,
        "mousedown",
        /*mousedown_handler*/
        a[15]
      ), E = !0);
    },
    p(n, r) {
      r & /*txnHistory*/
      4 && i !== (i = /*transaction*/
      n[24].Code + "") && B(o, i), r & /*copied*/
      8 && G(
        s,
        "copied",
        /*copied*/
        n[3]
      ), r & /*txnHistory*/
      4 && u !== (u = /*transaction*/
      n[24].Date + "") && B(x, u), r & /*$_, txnHistory*/
      36 && p !== (p = /*$_*/
      n[5](`transactionType.${/*transaction*/
      n[24].Type}`) + "") && B(H, p), S !== (S = P(n)) && (g && g.d(1), g = S && S(n), g && (g.c(), g.m(C, null))), r & /*$_, txnHistory*/
      36 && z !== (z = /*$_*/
      n[5](`transactionStatus.${/*transaction*/
      n[24].Status}`) + "") && B(R, z);
    },
    d(n) {
      n && W(t), g && g.d(), E = !1, Y();
    }
  };
}
function jt(a) {
  let t, s = (
    /*txnHistory*/
    a[2].length && tt(a)
  );
  return {
    c() {
      s && s.c(), t = ot();
    },
    m(i, o) {
      s && s.m(i, o), N(i, t, o);
    },
    p(i, [o]) {
      /*txnHistory*/
      i[2].length ? s ? s.p(i, o) : (s = tt(i), s.c(), s.m(t.parentNode, t)) : s && (s.d(1), s = null);
    },
    i: J,
    o: J,
    d(i) {
      i && W(t), s && s.d(i);
    }
  };
}
const Lt = "DD.MM.YYYY";
function Rt(a, t, s) {
  let i;
  rt(a, Tt, (n) => s(5, i = n));
  let { endpoint: o } = t, { session: c } = t, { lang: d = "en" } = t, { customerid: u } = t, { clientstyling: x = "" } = t, { clientstylingurl: b = "" } = t, { translationurl: _ } = t, { tooltipduration: p = 1e3 } = t, { txncount: H = 3 } = t, L = [], D = !1, k, C;
  var y;
  (function(n) {
    n.Deposit = "deposit", n.Withdraw = "withdraw", n.Refund = "refund", n.Unknown = "unknown", n.TaxDeduction = "taxDeduction";
  })(y || (y = {}));
  const A = [
    "Authorized",
    "Success",
    "Failed",
    "Rejected",
    "PendingApprovalStage1",
    "PendingApprovalStage2",
    "PendingApprovalStage3",
    "PendingNotification",
    "PendingOfflineNotification",
    "PendingConfirmation"
  ];
  var z;
  (function(n) {
    n.Authorized = "Authorized", n.Success = "Success", n.Failed = "Failed", n.Rejected = "Rejected", n.Pending = "Pending";
  })(z || (z = {}));
  const R = () => {
    let n = _;
    if (n)
      return fetch(n).then((r) => r.json()).then((r) => {
        Object.keys(r).forEach((f) => {
          Q(f, r[f]);
        });
      }).catch((r) => {
        console.log(r);
      });
  };
  Object.keys(Z).forEach((n) => {
    Q(n, Z[n]);
  });
  const M = () => {
    _t(d);
  }, E = () => {
    const n = new URL(`${o}/api/v1/mm/payment/gettransactionshistory`), r = new Headers();
    r.append("accept", "application/json"), r.append("Content-Type", "application/json"), r.append("X-SessionId", `${c}`);
    const f = new Date((/* @__PURE__ */ new Date()).setMonth((/* @__PURE__ */ new Date()).getMonth() - 3)).toISOString(), O = {
      method: "POST",
      mode: "cors",
      headers: r,
      body: JSON.stringify({
        language: d,
        customerId: u,
        count: H,
        page: 0,
        fromDate: f,
        toDate: null,
        statuses: {
          [y.Deposit]: A,
          [y.Withdraw]: A,
          [y.Refund]: ["Unknown"],
          [y.TaxDeduction]: ["Unknown"],
          [y.Unknown]: ["Unknown"]
        },
        calculateProfit: !1
      })
    };
    fetch(n, O).then((m) => m.json()).then((m) => {
      s(2, L = Y(m?.items || []));
    }).catch((m) => console.log(m));
  }, Y = (n) => n.map((r) => {
    let f = r.generalFields.status;
    return r.generalFields.status.toLowerCase().includes("pending") && (f = z.Pending), {
      Code: r.generalFields.code,
      Date: bt(r.generalFields.created).format(Lt),
      Status: f,
      Type: r.generalFields.type
    };
  }) || [], P = (n) => {
    const r = n.currentTarget;
    n.target === r && navigator.clipboard.writeText(r.innerText).then(() => {
      s(3, D = !0), clearTimeout(C), C = setTimeout(
        () => {
          s(3, D = !1);
        },
        2e3
      );
    }).catch((f) => {
      console.error("Could not copy text: ", f);
    });
  }, S = (n) => P(n);
  function g(n) {
    ht[n ? "unshift" : "push"](() => {
      k = n, s(1, k);
    });
  }
  return a.$$set = (n) => {
    "endpoint" in n && s(7, o = n.endpoint), "session" in n && s(8, c = n.session), "lang" in n && s(9, d = n.lang), "customerid" in n && s(10, u = n.customerid), "clientstyling" in n && s(11, x = n.clientstyling), "clientstylingurl" in n && s(12, b = n.clientstylingurl), "translationurl" in n && s(13, _ = n.translationurl), "tooltipduration" in n && s(0, p = n.tooltipduration), "txncount" in n && s(14, H = n.txncount);
  }, a.$$.update = () => {
    a.$$.dirty & /*lang*/
    512 && d && M(), a.$$.dirty & /*clientstyling, customStylingContainer*/
    2050 && x && k && Ct(k, x), a.$$.dirty & /*clientstylingurl, customStylingContainer*/
    4098 && b && k && St(k, b), a.$$.dirty & /*endpoint, session, customerid, lang*/
    1920 && o && c && u && d && E(), a.$$.dirty & /*translationurl*/
    8192 && _ && R();
  }, [
    p,
    k,
    L,
    D,
    z,
    i,
    P,
    o,
    c,
    d,
    u,
    x,
    b,
    _,
    H,
    S,
    g
  ];
}
class Pt extends it {
  constructor(t) {
    super(), nt(
      this,
      t,
      Rt,
      jt,
      at,
      {
        endpoint: 7,
        session: 8,
        lang: 9,
        customerid: 10,
        clientstyling: 11,
        clientstylingurl: 12,
        translationurl: 13,
        tooltipduration: 0,
        txncount: 14
      },
      Ht
    );
  }
  get endpoint() {
    return this.$$.ctx[7];
  }
  set endpoint(t) {
    this.$$set({ endpoint: t }), U();
  }
  get session() {
    return this.$$.ctx[8];
  }
  set session(t) {
    this.$$set({ session: t }), U();
  }
  get lang() {
    return this.$$.ctx[9];
  }
  set lang(t) {
    this.$$set({ lang: t }), U();
  }
  get customerid() {
    return this.$$.ctx[10];
  }
  set customerid(t) {
    this.$$set({ customerid: t }), U();
  }
  get clientstyling() {
    return this.$$.ctx[11];
  }
  set clientstyling(t) {
    this.$$set({ clientstyling: t }), U();
  }
  get clientstylingurl() {
    return this.$$.ctx[12];
  }
  set clientstylingurl(t) {
    this.$$set({ clientstylingurl: t }), U();
  }
  get translationurl() {
    return this.$$.ctx[13];
  }
  set translationurl(t) {
    this.$$set({ translationurl: t }), U();
  }
  get tooltipduration() {
    return this.$$.ctx[0];
  }
  set tooltipduration(t) {
    this.$$set({ tooltipduration: t }), U();
  }
  get txncount() {
    return this.$$.ctx[14];
  }
  set txncount(t) {
    this.$$set({ txncount: t }), U();
  }
}
xt(Pt, { endpoint: {}, session: {}, lang: {}, customerid: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, tooltipduration: {}, txncount: {} }, [], [], !0);
export {
  Pt as default
};
