import { S as Te, b as Oe, s as Me, f as y, c as Be, n as J, e as D, J as T, l as C, o as w, q as V, v as Z, K as X, L as Le, C as b, p as A, z as xe, m as k, A as U, x as qe, y as Fe, E as ze } from "./CashierConfirmModal-untxGhsx.js";
import { a as Ie, i as Ee, $ as Re, b as Ue } from "./CashierError-Cns-3PNq.js";
import { d as Q, u as He, x as Ne } from "./CashierMethodDetails-B6Mr4aP0.js";
function $(t, i) {
  Ie(t, i);
}
function je(t) {
  Ee({
    fallbackLocale: "en"
  }), Re.set(t);
}
const ee = {
  en: {
    "verification.video.how-to": "How to verify yourself",
    "verification.idenfy.referred-awaiting": "ID verification is in progress. We will inform you as soon as verification is completed and you can withdraw money back",
    "verification.message.failed": "We apologize, but we were unable to verify your account. Please contact support team",
    "verification.idenfy.link-name": "link",
    "verification.idenfy.in-progress": "To withdraw funds to your account you are required to pass user verification. Please have your ID ready and follow the {link} to start verification",
    "verification.shuftipro.in-progress.Biometric": "To proceed with a transaction you are required to pass user verification. Please follow the link to start {Biometric} verification.",
    "verification.shuftipro.in-progress.Biometric.Documents": "To proceed with a transaction you are required to pass user verification. Please follow the link to start {Biometric} verification and {Documents} verification.",
    "verification.shuftipro.in-progress.Biometric.Documents.ProofOfAddress": "To proceed with a transaction you are required to pass user verification. Please follow the link to start {Biometric} verification, {Documents} verification and {ProofOfAddress} verification.",
    "verification.shuftipro.in-progress.Biometric.ProofOfAddress": "To proceed with a transaction you are required to pass user verification. Please follow the link to start {Biometric} verification and {ProofOfAddress} verification.",
    "verification.shuftipro.in-progress.Documents": "To proceed with a transaction you are required to pass user verification. Please follow the link to start {Documents} verification.",
    "verification.shuftipro.in-progress.Documents.ProofOfAddress": "To proceed with a transaction you are required to pass user verification. Please follow the link to start {Documents} verification and {ProofOfAddress} verification.",
    "verification.shuftipro.in-progress.ProofOfAddress": "To proceed with a transaction you are required to pass user verification. Please follow the link to start {ProofOfAddress} verification.",
    "verification.shuftipro.link-name.Biometric": "Biometric",
    "verification.shuftipro.link-name.Documents": "Documents",
    "verification.shuftipro.link-name.ProofOfAddress": "Proof Of Address",
    "verification.shuftipro.validations-started": "After completing verification, please proceed with the transaction"
  },
  tr: {
    "verification.video.how-to": "Kimlik doğrulama nasıl yapılır",
    "verification.idenfy.referred-awaiting": "Kimlik doğrulaması işlemde. Doğrulama tamamlandığında size haber vereceğiz",
    "verification.message.failed": "Döküman doğrulama başarısız, hesabınız doğrulanamadı",
    "verification.idenfy.link-name": "link",
    "verification.idenfy.in-progress": "Hesabınızdan çekim yapabilmek için kullanıcı doğrulaması gerekiyor. Lütfen kimliğinizi hazır edin ve {link} adresinden doğrulamayı başlatın",
    "verification.shuftipro.in-progress.Biometric": "İşlemi gerçekleştirmek için kullanıcı doğrulamasını geçmeniz gerekmektedir. Doğrulamayı başlatmak için Lütfen linke tıklayın {Biometric}",
    "verification.shuftipro.in-progress.Biometric.Documents": "To proceed with a transaction you are required to pass user verification. Please follow the link to start {Biometric} verification and {Documents} verification.",
    "verification.shuftipro.in-progress.Biometric.Documents.ProofOfAddress": "To proceed with a transaction you are required to pass user verification. Please follow the link to start {Biometric} verification, {Documents} verification and {ProofOfAddress} verification.",
    "verification.shuftipro.in-progress.Biometric.ProofOfAddress": "To proceed with a transaction you are required to pass user verification. Please follow the link to start {Biometric} verification and {ProofOfAddress} verification.",
    "verification.shuftipro.in-progress.Documents": "To proceed with a transaction you are required to pass user verification. Please follow the link to start {Documents} verification.",
    "verification.shuftipro.in-progress.Documents.ProofOfAddress": "To proceed with a transaction you are required to pass user verification. Please follow the link to start {Documents} verification and {ProofOfAddress} verification.",
    "verification.shuftipro.in-progress.ProofOfAddress": "To proceed with a transaction you are required to pass user verification. Please follow the link to start {ProofOfAddress} verification.",
    "verification.shuftipro.link-name.Biometric": "Doğrulama Yap",
    "verification.shuftipro.link-name.Documents": "Documents",
    "verification.shuftipro.link-name.ProofOfAddress": "Proof Of Address",
    "verification.shuftipro.validations-started": "Lütfen Doğrulamayı tamamladıktan sonra işleme devam ediniz"
  },
  hr: {
    "verification.video.how-to": "How to verify yourself",
    "verification.idenfy.referred-awaiting": "ID verification is in progress. We will inform you as soon as verification is completed and you can withdraw money back",
    "verification.message.failed": "We apologize, but we were unable to verify your account. Please contact support team",
    "verification.idenfy.link-name": "link",
    "verification.idenfy.in-progress": "To withdraw funds to your account you are required to pass user verification. Please have your ID ready and follow the {link} to start verification",
    "verification.shuftipro.in-progress.Biometric": "To proceed with a transaction you are required to pass user verification. Please follow the link to start {Biometric} verification.",
    "verification.shuftipro.in-progress.Biometric.Documents": "To proceed with a transaction you are required to pass user verification. Please follow the link to start {Biometric} verification and {Documents} verification.",
    "verification.shuftipro.in-progress.Biometric.Documents.ProofOfAddress": "To proceed with a transaction you are required to pass user verification. Please follow the link to start {Biometric} verification, {Documents} verification and {ProofOfAddress} verification.",
    "verification.shuftipro.in-progress.Biometric.ProofOfAddress": "To proceed with a transaction you are required to pass user verification. Please follow the link to start {Biometric} verification and {ProofOfAddress} verification.",
    "verification.shuftipro.in-progress.Documents": "To proceed with a transaction you are required to pass user verification. Please follow the link to start {Documents} verification.",
    "verification.shuftipro.in-progress.Documents.ProofOfAddress": "To proceed with a transaction you are required to pass user verification. Please follow the link to start {Documents} verification and {ProofOfAddress} verification.",
    "verification.shuftipro.in-progress.ProofOfAddress": "To proceed with a transaction you are required to pass user verification. Please follow the link to start {ProofOfAddress} verification.",
    "verification.shuftipro.link-name.Biometric": "Biometric",
    "verification.shuftipro.link-name.Documents": "Documents",
    "verification.shuftipro.link-name.ProofOfAddress": "Proof Of Address",
    "verification.shuftipro.validations-started": "After completing verification, please proceed with the transaction"
  }
};
if (typeof window < "u") {
  let t = function(i) {
    return function(...o) {
      try {
        return i.apply(this, o);
      } catch (n) {
        if (n instanceof DOMException && n.message.includes("has already been used with this registry") || n.message.includes("Cannot define multiple custom elements with the same tag name"))
          return !1;
        throw n;
      }
    };
  };
  customElements.define = t(customElements.define), import("./CashierVideoModal-CVDvqrcy.js").then(({ default: i }) => {
    !customElements.get("cashier-video-modal") && customElements.define("cashier-video-modal", i.element);
  });
}
function We(t) {
  Be(t, "svelte-1emynn4", "*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;-webkit-tap-highlight-color:transparent}.CashierVerifications{box-shadow:0 0 4px var(--mmw--color-black-transparency-10, rgba(0, 0, 0, 0.1))}.CashierVerifications.CashierVerificationsDesktop{border-radius:var(--mmw--border-radius-medium-plus, 6px);overflow:hidden}.CashierVerifications.CashierVerificationsDesktop:has(.CashierVerificationMessage){margin-bottom:var(--emw--spacing-small, 12px)}.CashierVerificationsWrapper{display:flex;flex-direction:column;width:100%}.IconVerification{width:30px;display:flex}.CashierVerificationMessage{display:flex;align-items:center;box-sizing:border-box;background:var(--emw--color-gray-50, #F7F8FA);border-bottom:1px solid var(--mmw--color-grey-105, #E8E9EB);padding:0 var(--emw--spacing-small, 12px);transition:0.5s;max-height:500px}.CashierVerificationMessage:first-child{transition:none;cursor:pointer}.CashierVerificationMessage:first-child:hover{background:linear-gradient(0, var(--emw--color-gray-50, #F7F8FA) 0%, var(--emw--color-white, #fff) 100%)}.CashierVerificationMessage:not(.ShowAll):not(:first-child){max-height:0;overflow:hidden}.CashierVerificationMessage:hover .CashierVerificationChevron svg path{opacity:1}svg{height:20px}svg .IconColor{fill:var(--emw--color-warning, #ec9109)}p{color:var(--mmw--color-grey-10, #111);font-size:var(--emw--font-size-small, 14px);font-family:inherit;line-height:120%;margin:var(--emw--spacing-small, 12px)}.CashierVerificationsDesktop p{font-size:var(--emw--font-size-medium, 16px)}.text{word-break:break-word}.CashierVerificationChevron{cursor:pointer;margin-left:auto}.CashierVerificationChevron svg{transition:0.25s}.CashierVerificationChevron svg path{fill:var(--mmw--color-grey-290, #666);opacity:0.5}.CashierVerificationChevron:hover svg path{opacity:1}.ShowAll .CashierVerificationChevron svg{-o-transform:rotate(180deg);-ms-transform:rotate(180deg);-moz-transform:rotate(180deg);-webkit-transform:rotate(180deg);transform:rotate(180deg)}.CashierVerificationVideo{display:flex;width:100%;align-items:center;box-sizing:border-box;background:var(--emw--color-gray-50, #F7F8FA);border-bottom:1px solid var(--mmw--color-grey-105, #E8E9EB);padding:0 var(--emw--spacing-small, 12px);transition:0.5s;max-height:500px}.IconVideo{width:30px;display:flex;justify-content:center}.CashierVerificationVideoLink{cursor:pointer;color:var(--mmw--color-grey-10, #111);font-family:inherit;font-size:var(--emw--font-size-small, 14px);line-height:120%;margin:var(--emw--spacing-small, 12px);text-decoration:underline}.CashierVerificationVideoLinkDesktop{font-size:var(--emw--font-size-medium, 16px)}");
}
function ie(t, i, o) {
  const n = t.slice();
  return n[52] = i[o], n[54] = o, n;
}
function te(t) {
  let i, o, n, c, d = X(
    /*displayMessages*/
    t[4]
  ), f = [];
  for (let a = 0; a < d.length; a += 1)
    f[a] = re(ie(t, d, a));
  let h = (
    /*videoExists*/
    t[7] && se(t)
  );
  return {
    c() {
      i = w("div");
      for (let a = 0; a < f.length; a += 1)
        f[a].c();
      o = A(), h && h.c(), n = A(), c = w("cashier-video-modal"), V(i, "class", "CashierVerificationsWrapper"), b(
        c,
        "clientstylingurl",
        /*clientstylingurl*/
        t[1]
      ), b(
        c,
        "clientstyling",
        /*clientstyling*/
        t[0]
      ), b(
        c,
        "ismobileview",
        /*ismobileview*/
        t[2]
      ), b(
        c,
        "videosrc",
        /*videoSrc*/
        t[8]
      );
    },
    m(a, u) {
      C(a, i, u);
      for (let s = 0; s < f.length; s += 1)
        f[s] && f[s].m(i, null);
      C(a, o, u), h && h.m(a, u), C(a, n, u), C(a, c, u);
    },
    p(a, u) {
      if (u[0] & /*allVerificationsVisible, showAllVerifications, displayMessages*/
      1072) {
        d = X(
          /*displayMessages*/
          a[4]
        );
        let s;
        for (s = 0; s < d.length; s += 1) {
          const P = ie(a, d, s);
          f[s] ? f[s].p(P, u) : (f[s] = re(P), f[s].c(), f[s].m(i, null));
        }
        for (; s < f.length; s += 1)
          f[s].d(1);
        f.length = d.length;
      }
      /*videoExists*/
      a[7] ? h ? h.p(a, u) : (h = se(a), h.c(), h.m(n.parentNode, n)) : h && (h.d(1), h = null), u[0] & /*clientstylingurl*/
      2 && b(
        c,
        "clientstylingurl",
        /*clientstylingurl*/
        a[1]
      ), u[0] & /*clientstyling*/
      1 && b(
        c,
        "clientstyling",
        /*clientstyling*/
        a[0]
      ), u[0] & /*ismobileview*/
      4 && b(
        c,
        "ismobileview",
        /*ismobileview*/
        a[2]
      ), u[0] & /*videoSrc*/
      256 && b(
        c,
        "videosrc",
        /*videoSrc*/
        a[8]
      );
    },
    d(a) {
      a && (D(i), D(o), D(n), D(c)), Le(f, a), h && h.d(a);
    }
  };
}
function oe(t) {
  let i, o, n;
  function c(...d) {
    return (
      /*click_handler*/
      t[19](
        /*index*/
        t[54],
        ...d
      )
    );
  }
  return {
    c() {
      i = w("span"), i.innerHTML = '<svg width="25px" height="25px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1ZM8.70711 9.79289C8.31658 9.40237 7.68342 9.40237 7.29289 9.79289C6.90237 10.1834 6.90237 10.8166 7.29289 11.2071L11.2929 15.2071C11.6834 15.5976 12.3166 15.5976 12.7071 15.2071L16.7071 11.2071C17.0976 10.8166 17.0976 10.1834 16.7071 9.79289C16.3166 9.40237 15.6834 9.40237 15.2929 9.79289L12 13.0858L8.70711 9.79289Z" fill="#000000"></path></svg>', V(i, "class", "CashierVerificationChevron");
    },
    m(d, f) {
      C(d, i, f), o || (n = U(i, "click", c), o = !0);
    },
    p(d, f) {
      t = d;
    },
    d(d) {
      d && D(i), o = !1, n();
    }
  };
}
function re(t) {
  let i, o, n, c, d = (
    /*message*/
    t[52] + ""
  ), f, h, a, u, s = (
    /*displayMessages*/
    t[4].length > 1 && /*index*/
    t[54] === 0 && oe(t)
  );
  function P(...p) {
    return (
      /*click_handler_1*/
      t[20](
        /*index*/
        t[54],
        ...p
      )
    );
  }
  return {
    c() {
      i = w("div"), o = w("div"), o.innerHTML = '<svg width="64px" height="64px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="#ffffff"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path d="M4.39254 16.2614C2.64803 13.1941 1.66074 9.71783 1.51646 6.15051C1.50127 5.77507 1.70918 5.42812 2.04153 5.25282L11.5335 0.246091C11.8254 0.0920859 12.1746 0.0920859 12.4665 0.246091L21.9585 5.25282C22.2908 5.42812 22.4987 5.77507 22.4835 6.15051C22.3393 9.71783 21.352 13.1941 19.6075 16.2614C17.8618 19.3307 15.4169 21.8869 12.4986 23.7001C12.1931 23.8899 11.8069 23.8899 11.5014 23.7001C8.58313 21.8869 6.13817 19.3307 4.39254 16.2614Z" fill="#fa9200"></path><path d="M8.25 12.75L11.25 15L17.25 9" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></g></svg>', n = A(), c = w("p"), f = A(), s && s.c(), h = A(), V(o, "class", "IconVerification"), V(c, "class", "text"), V(i, "class", "CashierVerificationMessage"), T(
        i,
        "ShowAll",
        /*allVerificationsVisible*/
        t[5]
      );
    },
    m(p, g) {
      C(p, i, g), k(i, o), k(i, n), k(i, c), c.innerHTML = d, k(i, f), s && s.m(i, null), k(i, h), a || (u = U(i, "click", P), a = !0);
    },
    p(p, g) {
      t = p, g[0] & /*displayMessages*/
      16 && d !== (d = /*message*/
      t[52] + "") && (c.innerHTML = d), /*displayMessages*/
      t[4].length > 1 && /*index*/
      t[54] === 0 ? s ? s.p(t, g) : (s = oe(t), s.c(), s.m(i, h)) : s && (s.d(1), s = null), g[0] & /*allVerificationsVisible*/
      32 && T(
        i,
        "ShowAll",
        /*allVerificationsVisible*/
        t[5]
      );
    },
    d(p) {
      p && D(i), s && s.d(), a = !1, u();
    }
  };
}
function se(t) {
  let i, o, n, c, d = (
    /*$_*/
    t[9]("verification.video.how-to") + ""
  ), f, h, a;
  return {
    c() {
      i = w("div"), o = w("div"), o.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path 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 448c-110.532 0-200-89.431-200-200 0-110.495 89.472-200 200-200 110.491 0 200 89.471 200 200 0 110.53-89.431 200-200 200zm107.244-255.2c0 67.052-72.421 68.084-72.421 92.863V300c0 6.627-5.373 12-12 12h-45.647c-6.627 0-12-5.373-12-12v-8.659c0-35.745 27.1-50.034 47.579-61.516 17.561-9.845 28.324-16.541 28.324-29.579 0-17.246-21.999-28.693-39.784-28.693-23.189 0-33.894 10.977-48.942 29.969-4.057 5.12-11.46 6.071-16.666 2.124l-27.824-21.098c-5.107-3.872-6.251-11.066-2.644-16.363C184.846 131.491 214.94 112 261.794 112c49.071 0 101.45 38.304 101.45 88.8zM298 368c0 23.159-18.841 42-42 42s-42-18.841-42-42 18.841-42 42-42 42 18.841 42 42z"></path></svg>', n = A(), c = w("div"), f = Fe(d), V(o, "class", "IconVideo"), V(c, "class", "CashierVerificationVideoLink"), T(
        c,
        "CashierVerificationVideoLinkDesktop",
        /*desktopView*/
        t[6]
      ), V(i, "class", "CashierVerificationVideo");
    },
    m(u, s) {
      C(u, i, s), k(i, o), k(i, n), k(i, c), k(c, f), h || (a = U(
        c,
        "click",
        /*click_handler_2*/
        t[21]
      ), h = !0);
    },
    p(u, s) {
      s[0] & /*$_*/
      512 && d !== (d = /*$_*/
      u[9]("verification.video.how-to") + "") && qe(f, d), s[0] & /*desktopView*/
      64 && T(
        c,
        "CashierVerificationVideoLinkDesktop",
        /*desktopView*/
        u[6]
      );
    },
    d(u) {
      u && D(i), h = !1, a();
    }
  };
}
function Ke(t) {
  let i, o = (
    /*displayMessages*/
    t[4] && te(t)
  );
  return {
    c() {
      i = w("div"), o && o.c(), V(i, "class", "CashierVerifications"), T(
        i,
        "CashierVerificationsDesktop",
        /*desktopView*/
        t[6]
      );
    },
    m(n, c) {
      C(n, i, c), o && o.m(i, null), t[22](i);
    },
    p(n, c) {
      /*displayMessages*/
      n[4] ? o ? o.p(n, c) : (o = te(n), o.c(), o.m(i, null)) : o && (o.d(1), o = null), c[0] & /*desktopView*/
      64 && T(
        i,
        "CashierVerificationsDesktop",
        /*desktopView*/
        n[6]
      );
    },
    i: J,
    o: J,
    d(n) {
      n && D(i), o && o.d(), t[22](null);
    }
  };
}
const Ye = "verification_explanation_video_widgets.MP4";
function Ge(t, i, o) {
  let n, c;
  Z(t, Ue, (e) => o(9, n = e)), Z(t, Ne, (e) => o(28, c = e)), Q.extend(He);
  let { endpoint: d } = i, { lang: f = "en" } = i, { translationurl: h = "" } = i, { clientstyling: a = "" } = i, { clientstylingurl: u = "" } = i, { session: s = "" } = i, { customerid: P = "" } = i, { ismobileview: p = "" } = i, { playersession: g = "" } = i, S, H = /* @__PURE__ */ new Set(), N = /* @__PURE__ */ new Set(), B, L, q, F = !0, j = !0, z = !1, I = "";
  var O;
  (function(e) {
    e.Manual = "Manual", e.ShuftiPro = "ShuftiPro";
  })(O || (O = {}));
  var E;
  (function(e) {
    e.Requested = "Requested";
  })(E || (E = {}));
  var m;
  (function(e) {
    e.Unknown = "Unknown", e.Unverified = "Unverified", e.InProgress = "InProgress", e.Failed = "Failed", e.Verified = "Verified", e.Referred = "Referred", e.True = "True", e.False = "False", e.AwaitingForResponse = "AwaitingForResponse";
  })(m || (m = {}));
  var M;
  (function(e) {
    e.Unknown = "Unknown", e.Documents = "Documents", e.Age = "Age", e.Pep = "Pep", e.Sanction = "Sanction", e.Aml = "Aml", e.ProofOfAddress = "ProofOfAddress", e.SourceOfWealth = "SourceOfWealth", e.SocialMedia = "SocialMedia", e.Biometric = "Biometric";
  })(M || (M = {}));
  const ne = [
    m.InProgress,
    m.Referred,
    m.AwaitingForResponse
  ], ae = () => {
    let e = h;
    if (e)
      return fetch(e).then((r) => r.json()).then((r) => {
        Object.keys(r).forEach((l) => {
          $(l, r[l]);
        });
      }).catch((r) => {
        console.log(r);
      });
  };
  Object.keys(ee).forEach((e) => {
    $(e, ee[e]);
  });
  const le = () => {
    je(f);
  }, ce = () => {
    let e = document.createElement("style");
    e.innerHTML = a, S.appendChild(e);
  }, fe = () => {
    let e = new URL(u), r = document.createElement("style");
    fetch(e.href).then((l) => l.text()).then((l) => {
      r.innerHTML = l, setTimeout(
        () => {
          S.appendChild(r);
        },
        1
      );
    });
  }, W = () => {
    o(18, L = ue());
    const e = new URL(`${d}/v1/player/${P}/verification/GetKYCCustomerStatus?language=${f}`), r = new Headers();
    r.append("accept", "application/json"), r.append("Content-Type", "application/json"), r.append("x-sessionid", `${g}`), r.append("X-Client-Request-Timestamp", Q.utc().format("YYYY-MM-DD HH:mm:ss.SSS"));
    const l = {
      method: "POST",
      headers: r,
      body: JSON.stringify({})
    };
    fetch(e, l).then((v) => v.json()).then((v) => {
      B = he(v.Verifications), B.VerificationStatuses.forEach((x) => {
        x.VerificationUrlType !== "Widget" && H.add(x.Vendor);
      }), o(4, q = Y());
    });
  }, de = () => {
    c && W();
  }, ue = () => {
    let e = (s || c).split(".")[1];
    if (e) {
      let r = JSON.parse(atob(e));
      return r.cdn + "/cashier/operator-assets/" + r?.mid;
    }
    return "";
  }, he = (e) => {
    if (!e || !e.length)
      return {
        VerificationSummaryStatus: m.Unverified,
        VerificationStatuses: []
      };
    const r = pe(e);
    if (r && r.length) {
      const l = me(r);
      return {
        VerificationSummaryStatus: l.Status,
        VerificationUrl: l.Flags?.DeferredUrlKey,
        VerificationStatuses: K(r, l.Status)
      };
    } else
      return {
        VerificationSummaryStatus: e.some((v) => v.Status === m.Failed) ? m.Failed : m.Verified,
        VerificationStatuses: K(e, [m.Failed])
      };
  }, me = (e) => e.reduce(
    (r, l) => r ? new Date(r) < new Date(l) ? l : r : l,
    0
  ), K = (e, r) => e.filter((l) => r.includes(l.Status)).map((l) => ({
    Type: l.Type,
    Vendor: l.VendorName,
    VerificationDocuments: l.Documents ? [...l.Documents] : [],
    VerificationUrlType: l.FlowInfo?.Type,
    VerificationUrl: l.FlowInfo?.Url
  })), pe = (e) => e.filter((r) => ne.includes(r.Status) ? r.FlowInfo && r.FlowInfo.Url || ge(r) || ve(r) : !1), ge = (e) => {
    const r = e.Documents && e.VendorName === O.Manual, l = e.Documents && e.Documents.some((v) => v.Status === E.Requested);
    return r && l;
  }, ve = (e) => e.VendorName === O.ShuftiPro && e.Status === m.Referred, Y = () => {
    switch (B.VerificationSummaryStatus) {
      case m.InProgress:
        const e = [];
        return H.forEach((r) => {
          e.push(we(r));
        }), e;
      case m.Referred:
        return [n("verification.idenfy.referred-awaiting")];
      case m.Failed:
        return [n("verification.message.failed")];
    }
  }, we = (e) => {
    const r = B.VerificationStatuses.filter((l) => l.Vendor === e);
    if (e === O.ShuftiPro)
      return ye(r);
    {
      const l = n("verification.idenfy.link-name"), v = {
        link: `<a href="${r[0].VerificationUrl}" target="_blank">${l}</a>`
      };
      return n("verification.idenfy.in-progress", { values: v });
    }
  }, ye = (e) => {
    const r = [], l = {}, v = [
      M.Biometric,
      M.Documents,
      M.ProofOfAddress
    ];
    e.forEach((_) => {
      v.includes(_.Type) && (r.push(_.Type), l[_.Type] = ke(_, Ve(_.Type)));
    });
    let x = r.every((_) => N.has(_)), Ae = `verification.shuftipro.in-progress.${r.sort().join(".")}`;
    return x ? n("verification.shuftipro.validations-started") : n(Ae, { values: l });
  }, ke = (e, r) => `<a class="verificationLink ${e.Type}" href=" ${e.VerificationUrl} " target="_blank">${r}</a>`, Ve = (e) => n(`verification.shuftipro.link-name.${e}`), R = (e, r) => {
    if (e.stopPropagation(), e.target && (e.target.href || e.target.closest("a"))) {
      if (e.target.closest(".verificationLink")) {
        const l = e.target.className.split(" ")[1];
        N.add(l), o(4, q = Y());
      }
      return;
    }
    r === 0 && o(5, F = !F);
  }, Pe = () => {
    o(6, j = p === "false");
  }, be = () => {
    o(8, I = L + "/" + f + "/" + Ye);
    try {
      fetch(I, { method: "HEAD" }).then((e) => {
        o(7, z = e.ok);
      });
    } catch {
      o(7, z = !1);
    }
  }, G = () => {
    window.postMessage({ type: "ShowCashierVideoModal" }, window.location.href);
  }, De = (e, r) => R(r, e), Ce = (e, r) => R(r, e), Se = () => G();
  function _e(e) {
    xe[e ? "unshift" : "push"](() => {
      S = e, o(3, S);
    });
  }
  return t.$$set = (e) => {
    "endpoint" in e && o(12, d = e.endpoint), "lang" in e && o(13, f = e.lang), "translationurl" in e && o(14, h = e.translationurl), "clientstyling" in e && o(0, a = e.clientstyling), "clientstylingurl" in e && o(1, u = e.clientstylingurl), "session" in e && o(15, s = e.session), "customerid" in e && o(16, P = e.customerid), "ismobileview" in e && o(2, p = e.ismobileview), "playersession" in e && o(17, g = e.playersession);
  }, t.$$.update = () => {
    t.$$.dirty[0] & /*lang*/
    8192 && f && le(), t.$$.dirty[0] & /*endpoint, session, playersession*/
    167936 && d && s && g && W(), t.$$.dirty[0] & /*endpoint, session, playersession*/
    167936 && d && !s && g && de(), t.$$.dirty[0] & /*translationurl*/
    16384 && h && ae(), t.$$.dirty[0] & /*clientstyling, customStylingContainer*/
    9 && a && S && ce(), t.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
    10 && u && S && fe(), t.$$.dirty[0] & /*ismobileview*/
    4 && p && Pe(), t.$$.dirty[0] & /*staticCdnUrl*/
    262144 && L && be();
  }, [
    a,
    u,
    p,
    S,
    q,
    F,
    j,
    z,
    I,
    n,
    R,
    G,
    d,
    f,
    h,
    s,
    P,
    g,
    L,
    De,
    Ce,
    Se,
    _e
  ];
}
class Je extends Te {
  constructor(i) {
    super(), Oe(
      this,
      i,
      Ge,
      Ke,
      Me,
      {
        endpoint: 12,
        lang: 13,
        translationurl: 14,
        clientstyling: 0,
        clientstylingurl: 1,
        session: 15,
        customerid: 16,
        ismobileview: 2,
        playersession: 17
      },
      We,
      [-1, -1]
    );
  }
  get endpoint() {
    return this.$$.ctx[12];
  }
  set endpoint(i) {
    this.$$set({ endpoint: i }), y();
  }
  get lang() {
    return this.$$.ctx[13];
  }
  set lang(i) {
    this.$$set({ lang: i }), y();
  }
  get translationurl() {
    return this.$$.ctx[14];
  }
  set translationurl(i) {
    this.$$set({ translationurl: i }), y();
  }
  get clientstyling() {
    return this.$$.ctx[0];
  }
  set clientstyling(i) {
    this.$$set({ clientstyling: i }), y();
  }
  get clientstylingurl() {
    return this.$$.ctx[1];
  }
  set clientstylingurl(i) {
    this.$$set({ clientstylingurl: i }), y();
  }
  get session() {
    return this.$$.ctx[15];
  }
  set session(i) {
    this.$$set({ session: i }), y();
  }
  get customerid() {
    return this.$$.ctx[16];
  }
  set customerid(i) {
    this.$$set({ customerid: i }), y();
  }
  get ismobileview() {
    return this.$$.ctx[2];
  }
  set ismobileview(i) {
    this.$$set({ ismobileview: i }), y();
  }
  get playersession() {
    return this.$$.ctx[17];
  }
  set playersession(i) {
    this.$$set({ playersession: i }), y();
  }
}
ze(Je, { endpoint: {}, lang: {}, translationurl: {}, clientstyling: {}, clientstylingurl: {}, session: {}, customerid: {}, ismobileview: {}, playersession: {} }, [], [], !0);
export {
  Je as default
};
