var J = (i, e, t) => new Promise((n, a) => {
  var o = (d) => {
    try {
      k(t.next(d));
    } catch (f) {
      a(f);
    }
  }, c = (d) => {
    try {
      k(t.throw(d));
    } catch (f) {
      a(f);
    }
  }, k = (d) => d.done ? n(d.value) : Promise.resolve(d.value).then(o, c);
  k((t = t.apply(i, e)).next());
});
import { a as oe, $ as re, S as le, i as se, s as ce, f as O, b as ue, n as I, d as T, c as H, e as y, r as p, g as de, h as pe, o as he, j as fe, k as Y, l as ie, m as r, p as F, q as C, t as N, w as G, u as V, v as me, x as E, R as ye, K as ge, z as ke, A as ve, B as be, C as Ce, D as _e } from "./PlayerAccountController-DQUfjs7n.js";
import "../stencil/ui-skeleton-BKpwkQ2A.js";
function K(i, e) {
  oe(i, e);
}
function we(i) {
  re.set(i);
}
const Z = {
  en: {
    titleRealityCheck: "Reality Check",
    never: "Never",
    minutes: "Minutes",
    oneHour: "1 Hour",
    hours: "Hours",
    successMessage: "Reality check has been successfully updated.",
    realityCheckText: "The Reality Check facility allows you to set the frequency at which you will see a Reality Check on the screen within your gaming session. A Reality Check means a display of the time elapsed since your session began. You are able to control the frequency at which the Reality Check will appear on your screen.",
    realityCheckLoading: "Loading items, please wait ...",
    setFrequency: "Set frequency"
  },
  "zh-hk": {
    titleRealityCheck: "現實檢查",
    never: "絕不",
    minutes: "分鐘",
    oneHour: "1小時",
    hours: "小時",
    successMessage: "現實檢查已成功更新。",
    realityCheckText: "該工具允許您設置在遊戲會話中在屏幕上看到消息的頻率。 它將顯示自會話開始以來經過的時間。",
    realityCheckLoading: "正在加載項目，請稍候...",
    setFrequency: "設置頻率"
  },
  fr: {
    titleRealityCheck: "Verification de la réalité",
    never: "Jamais",
    minutes: "Minutes",
    oneHour: "1 Heure",
    hours: "Heure",
    successMessage: "Le contrôle de la réalité a été mis à jour avec succès.",
    realityCheckText: "La fonction de contrôle de la réalité vous permet de définir la fréquence à laquelle vous verrez un contrôlede la réalité sur l'écran au cours de votre sessions de jeu , c'est-à-dire un affichage du temps écoulé depuis le début de votre session.",
    realityCheckLoading: "Chargement des éléments, veuillez patienter ...",
    setFrequency: "Régler la fréquence"
  },
  ro: {
    titleRealityCheck: "Verificare timp",
    never: "Niciodata",
    minutes: "Minute",
    oneHour: "1 Ora",
    hours: "Ore",
    successMessage: "Frecvența a fost setată cu succes!",
    realityCheckText: "Opțiunea Reality Check îți permite să setezi frecvența cu care vei vedea verificarea timpului de joc pe parcursul sesiunii tale de joc. O astfel de verificare reprezintă afișarea timpului trecut de la începerea sesiunii de joc.",
    realityCheckLoading: "Se încarcă...",
    setFrequency: "Stabilește frecvența"
  },
  es: {
    titleRealityCheck: "Verificación de la realidad",
    never: "Nunca",
    minutes: "Minutos",
    oneHour: "1 Hora",
    hours: "Horas",
    successMessage: "La verificación de la realidad se ha actualizado con éxito.",
    realityCheckText: "La función de Verificación de la realidad le permite establecer la frecuencia con la que verá una Verificación de la realidad en la pantalla dentro de su sesión de juego. Una verificación de la realidad significa una visualización del tiempo transcurrido desde que comenzó su sesión. Puede controlar la frecuencia con la que aparecerá la Verificación de realidad en su pantalla.",
    realityCheckLoading: "Cargando items",
    setFrequency: "Estabelecer frecuencia"
  },
  pt: {
    titleRealityCheck: "Verificação da realidade",
    never: "Nunca",
    minutes: "Minutos",
    oneHour: "1 hora",
    hours: "Horas",
    successMessage: "A verificação da realidade foi atualizada com sucesso.",
    realityCheckText: "O recurso Verificação da Realidade permite que você defina a frequência com que você verá uma Verificação da Realidade na tela durante sua sessão de jogo. Uma verificação da realidade significa uma exibição do tempo decorrido desde o início da sua sessão.",
    realityCheckLoading: "Carregando itens, por favor aguarde...",
    setFrequency: "Definir frequência"
  },
  hr: {
    titleRealityCheck: "Provjera stvarnosti",
    never: "Nikad",
    minutes: "Minuta",
    oneHour: "1 sat",
    hours: "Sati",
    successMessage: "Provjera stvarnosti je uspješno ažurirana.",
    realityCheckText: "Mogućnost Provjere stvarnosti omogućuje vam da postavite učestalost na kojoj ćete vidjeti Provjeru stvarnosti na zaslonu tijekom svoje sesije igranja. Provjera stvarnosti znači prikaz vremena proteklog od početka vaše sesije. Možete kontrolirati učestalost kojom će se Reality Provjera stvarnosti pojaviti na vašem zaslonu.",
    realityCheckLoading: "Učitavanje stavki",
    setFrequency: "Postavite frekvenciju"
  },
  "pt-br": {
    titleRealityCheck: "Verificação da realidade",
    never: "Nunca",
    minutes: "Minutos",
    oneHour: "1 hora",
    hours: "Horas",
    successMessage: "A verificação da realidade foi atualizada com sucesso.",
    realityCheckText: "A instalação da verificação da realidade permite ajustar a frequência com que a verificação da realidade aparece na tela durante a sessão de jogo. Uma verificação da realidade significa exibir o tempo decorrido desde que você iniciou sua sessão. Você é capaz de controlar a frequência com que essa verificação da realidade aparecerá na sua tela.",
    realityCheckLoading: "Carregando itens, por favor espere...",
    setFrequency: "Definir frequência"
  },
  "es-mx": {
    titleRealityCheck: "Control de Realidad",
    never: "Nunca",
    minutes: "Minutos",
    oneHour: "1 Hora",
    hours: "Horas",
    successMessage: "El control de realidad ha sido actualizada exitosamente.",
    realityCheckText: "La instalación del control de realidad le permite ajustar la frequencia en la que aparece la verificación de realidad en la pantalla durante su sesión de juego. Un control de realidad significa la visualización del tiempo transcurrido desde que arranco su sesión. Ustede es capaza de controlar la frecuencia en la que esta verificación de realidad aparecerá en su pantalla.",
    realityCheckLoading: "Cargando elementos, por favor espere...",
    setFrequency: "Fijar frecuencia"
  },
  "en-us": {
    titleRealityCheck: "Reality Check",
    never: "Never",
    minutes: "Minutes",
    oneHour: "1 Hour",
    hours: "Hours",
    successMessage: "Reality check has been successfully updated.",
    realityCheckText: "The Reality Check facility allows you to set the frequency at which you will see a Reality Check on the screen within your gaming session. A Reality Check means a display of the time elapsed since your session began. You are able to control the frequency at which the Reality Check will appear on your screen.",
    realityCheckLoading: "Loading items, please wait ...",
    setFrequency: "Set frequency"
  }
};
function xe(i) {
  ue(i, "svelte-17lev58", '.SkeletonContainer{width:100%;display:flex;flex-direction:column;gap:17px;animation-name:fadeIn;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:0.3s}.SkeletonContainer .SkeletonMenuButton{display:flex;gap:20px;width:100%}.SkeletonContainer .SkeletonMenuButton.Mobile{margin-top:10px}.SkeletonContainer .SkeletonTextContainer{width:100%;min-height:140px}.SkeletonContainer .SkeletonOptionContainer{display:flex;flex-direction:column;width:100%;min-height:200px}.SkeletonContainer .SkeletonOptionContainer .SkeletonOption{display:flex;flex-direction:row;align-items:center;gap:10px;width:100%;margin:0 0 13px}.SkeletonContainer .SkeletonOptionContainer .SkeletonOption .SkeletonOptionText{width:20%;margin-top:10px}.SkeletonContainer .SkeletonOptionContainer .Button{margin-top:5px}.successMessage{position:absolute;display:block;top:25px;left:50px;background:var(--emw--color-valid, var(--emw--color-green, #48952a));font-size:14px;border-radius:5px;padding:10px;color:var(--emw--color-white, #FFFFFF)}.successMessage.successMessageMobile{display:none}.successMessageMobile{display:block;background:var(--emw--color-valid, var(--emw--color-green, #48952a));font-size:14px;border-radius:5px;padding:10px;color:var(--emw--color-white, #FFFFFF)}.successMessageMobile.successMessage{display:none}.TextContainer{display:flex;flex-direction:column;padding:10px 20px}.customRadio{margin-top:15px}.customRadio div{margin:0 0 20px}.customRadio input[type=radio]{position:absolute;left:-9999px}.customRadio input[type=radio]+label{position:relative;padding:3px 0 0 30px;cursor:pointer}.customRadio input[type=radio]+label:before{content:"";background:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-300, #58586B);height:16px;width:16px;border-radius:50%;position:absolute;top:0;left:0}.customRadio input[type=radio]+label:after{content:"";background:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));width:14px;height:14px;border-radius:50%;position:absolute;top:2px;left:2px;opacity:0;transform:scale(2);transition:transform 0.3s linear, opacity 0.3s linear}.customRadio input[type=radio]:checked+label:after{opacity:1;transform:scale(1)}.RealityCheckDescription{color:var(--emw--pam-typography, var(--emw--color-contrast, #07072A));line-height:24px}.RealityCheckDescription p{min-height:140px}.RealityCheckDescription.RealityChecktionMobile{font-size:12px;line-height:18px}.PlayerDetailsContent{display:grid;grid-column-gap:50px;grid-row-gap:20px;grid-template-rows:auto;grid-template-columns:1fr;padding-bottom:30px}.PlayerRealityCheckWrapper{position:relative;color:var(--emw--pam-contrast, var(--emw--color-contrast, #07072A));padding:50px;max-width:760px}.PlayerRealityCheckWrapper.PlayerRealityCheckWrapperMobile{padding:20px 15px;max-width:unset}.RealityCheckTitle{font-size:26px;color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));font-weight:400}.RealityCheckTitleMobile{font-size:16px;color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.RealityCheckTitleNone{display:none}.BottomButtonsArea{display:grid;grid-column-gap:30px;grid-template-rows:auto;grid-template-columns:1fr 1fr;margin-top:20px}.BottomButtonsArea.BottomButtonsAreaMobile{width:100%;grid-template-columns:1fr}.PlayerRealityCheckButton{cursor:pointer;border-radius:5px;width:100%;height:50px;display:flex;align-items:center;justify-content:center;font-size:15px;color:var(--emw--button-typography, var(--emw--color-white, #FFFFFF));text-transform:uppercase;text-align:center;transition-duration:0.3s;box-sizing:border-box;padding:10px}.PlayerRealityCheckButton.ButtonInactive{background:transparent;border:1px solid var(--emw--color-gray-300, #58586B);cursor:not-allowed;opacity:0.6;color:var(--emw--color-gray-300, #58586B)}.PlayerRealityCheckButton{background:transparent;border:1px solid var(--emw--color-gray-300, #58586B)}.PlayerRealityCheckButton{background:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));border:1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.PlayerDetailsContent{grid-template-columns:1fr}.containerTimeout{animation-name:fadeIn;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:0.3s}.MenuReturnButton{color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));display:inline-flex;align-items:center;column-gap:20PX}.MenuReturnButton svg{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}@keyframes fadeIn{0%{opacity:0.01}1%{opacity:0}50%{opacity:0}100%{opacity:1}}');
}
function Q(i, e, t) {
  const n = i.slice();
  return n[33] = e[t].value, n[34] = e[t].text, n[36] = t, n;
}
function Re(i, e, t) {
  const n = i.slice();
  return n[30] = e[t], n;
}
function Me(i) {
  let e, t, n, a, o = (
    /*$_*/
    i[5]("titleRealityCheck") + ""
  ), c, k, d, f, b = (
    /*$_*/
    i[5]("realityCheckText") + ""
  ), w, v, M, x, m, s, g = (
    /*$_*/
    i[5]("setFrequency") + ""
  ), B, L, D, U, W, z = (
    /*isMobile*/
    i[6] && je(i)
  ), S = (
    /*realityCheckSuccess*/
    i[4] && ee(i)
  ), P = Y(
    /*realityCheckOptions*/
    i[7]
  ), R = [];
  for (let h = 0; h < P.length; h += 1)
    R[h] = te(Q(i, P, h));
  return {
    c() {
      e = y("div"), z && z.c(), t = F(), S && S.c(), n = F(), a = y("h2"), c = V(o), k = F(), d = y("div"), f = y("p"), w = V(b), v = F(), M = y("form");
      for (let h = 0; h < R.length; h += 1)
        R[h].c();
      x = F(), m = y("div"), s = y("button"), B = V(g), p(a, "class", "RealityCheckTitle " + /*isMobile*/
      (i[6] ? "RealityCheckTitleNone" : "")), p(d, "class", "RealityCheckDescription " + /*isMobile*/
      (i[6] ? "RealityCheckDescriptionMobile" : "")), p(s, "class", L = "PlayerRealityCheckButton " + /*currentRealityCheckValue*/
      (i[3] === /*realityCheckValue*/
      i[2] ? "ButtonInactive" : "")), s.disabled = D = /*currentRealityCheckValue*/
      i[3] === /*realityCheckValue*/
      i[2], p(m, "class", "BottomButtonsArea " + /*isMobile*/
      (i[6] ? "BottomButtonsAreaMobile" : "")), p(M, "class", "customRadio"), p(e, "class", "containerTimeout");
    },
    m(h, q) {
      H(h, e, q), z && z.m(e, null), r(e, t), S && S.m(e, null), r(e, n), r(e, a), r(a, c), r(e, k), r(e, d), r(d, f), r(f, w), r(e, v), r(e, M);
      for (let _ = 0; _ < R.length; _ += 1)
        R[_] && R[_].m(M, null);
      r(M, x), r(M, m), r(m, s), r(s, B), U || (W = G(
        s,
        "click",
        /*submitRealityCheckValue*/
        i[8]
      ), U = !0);
    },
    p(h, q) {
      if (
        /*isMobile*/
        h[6] && z.p(h, q), /*realityCheckSuccess*/
        h[4] ? S ? S.p(h, q) : (S = ee(h), S.c(), S.m(e, n)) : S && (S.d(1), S = null), q[0] & /*$_*/
        32 && o !== (o = /*$_*/
        h[5]("titleRealityCheck") + "") && N(c, o), q[0] & /*$_*/
        32 && b !== (b = /*$_*/
        h[5]("realityCheckText") + "") && N(w, b), q[0] & /*realityCheckOptions, realityCheckValue*/
        132
      ) {
        P = Y(
          /*realityCheckOptions*/
          h[7]
        );
        let _;
        for (_ = 0; _ < P.length; _ += 1) {
          const X = Q(h, P, _);
          R[_] ? R[_].p(X, q) : (R[_] = te(X), R[_].c(), R[_].m(M, x));
        }
        for (; _ < R.length; _ += 1)
          R[_].d(1);
        R.length = P.length;
      }
      q[0] & /*$_*/
      32 && g !== (g = /*$_*/
      h[5]("setFrequency") + "") && N(B, g), q[0] & /*currentRealityCheckValue, realityCheckValue*/
      12 && L !== (L = "PlayerRealityCheckButton " + /*currentRealityCheckValue*/
      (h[3] === /*realityCheckValue*/
      h[2] ? "ButtonInactive" : "")) && p(s, "class", L), q[0] & /*currentRealityCheckValue, realityCheckValue*/
      12 && D !== (D = /*currentRealityCheckValue*/
      h[3] === /*realityCheckValue*/
      h[2]) && (s.disabled = D);
    },
    d(h) {
      h && T(e), z && z.d(), S && S.d(), ie(R, h), U = !1, W();
    }
  };
}
function Se(i) {
  let e, t, n, a, o, c, k, d, f;
  function b(m, s) {
    return (
      /*isMobile*/
      m[6] ? qe : Be
    );
  }
  let v = b(i)(i), M = Y({ length: 6 }), x = [];
  for (let m = 0; m < M.length; m += 1)
    x[m] = Fe(Re(i, M, m));
  return {
    c() {
      e = y("div"), v.c(), t = F(), n = y("div"), a = y("ui-skeleton"), o = F(), c = y("div");
      for (let m = 0; m < x.length; m += 1)
        x[m].c();
      k = F(), d = y("div"), f = y("ui-skeleton"), C(a, "structure", "text"), C(a, "height", "15px"), C(a, "width", "100%"), C(a, "margin-bottom", "7px"), C(
        a,
        "rows",
        /*isMobile*/
        i[6] ? "5" : "3"
      ), p(n, "class", "SkeletonTextContainer"), C(f, "structure", "rectangle"), C(f, "height", "50px"), C(f, "margin-bottom", "0"), C(f, "borderRadius", "5px"), C(
        f,
        "width",
        /*isMobile*/
        i[6] ? "100%" : "350px"
      ), p(d, "class", "Button"), p(c, "class", "SkeletonOptionContainer"), p(e, "class", "SkeletonContainer");
    },
    m(m, s) {
      H(m, e, s), v.m(e, null), r(e, t), r(e, n), r(n, a), r(e, o), r(e, c);
      for (let g = 0; g < x.length; g += 1)
        x[g] && x[g].m(c, null);
      r(c, k), r(c, d), r(d, f);
    },
    p(m, s) {
      v.p(m, s);
    },
    d(m) {
      m && T(e), v.d(), ie(x, m);
    }
  };
}
function je(i) {
  let e, t, n, a, o, c, k, d, f, b, w, v = (
    /*$_*/
    i[5]("titleRealityCheck") + ""
  ), M, x, m, s = (
    /*realityCheckSuccess*/
    i[4] && $(i)
  );
  return {
    c() {
      s && s.c(), e = F(), t = y("div"), n = E("svg"), a = E("defs"), o = E("style"), c = V(".aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));}"), k = E("g"), d = E("g"), f = E("path"), b = F(), w = y("h2"), M = V(v), p(f, "class", "aaa"), p(f, "d", "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"), p(f, "transform", "translate(15 15) rotate(180)"), p(d, "transform", "translate(20 158)"), p(k, "transform", "translate(-20 -158)"), p(n, "xmlns", "http://www.w3.org/2000/svg"), p(n, "width", "15"), p(n, "height", "15"), p(n, "viewBox", "0 0 15 15"), p(w, "class", "RealityCheckTitleMobile"), p(t, "class", "MenuReturnButton");
    },
    m(g, B) {
      s && s.m(g, B), H(g, e, B), H(g, t, B), r(t, n), r(n, a), r(a, o), r(o, c), r(n, k), r(k, d), r(d, f), r(t, b), r(t, w), r(w, M), x || (m = [
        G(
          t,
          "click",
          /*click_handler*/
          i[18]
        ),
        G(t, "keydown", null)
      ], x = !0);
    },
    p(g, B) {
      /*realityCheckSuccess*/
      g[4] ? s ? s.p(g, B) : (s = $(g), s.c(), s.m(e.parentNode, e)) : s && (s.d(1), s = null), B[0] & /*$_*/
      32 && v !== (v = /*$_*/
      g[5]("titleRealityCheck") + "") && N(M, v);
    },
    d(g) {
      g && (T(e), T(t)), s && s.d(g), x = !1, me(m);
    }
  };
}
function $(i) {
  let e, t = (
    /*$_*/
    i[5]("successMessage") + ""
  ), n;
  return {
    c() {
      e = y("div"), n = V(t), p(e, "class", "successMessageMobile");
    },
    m(a, o) {
      H(a, e, o), r(e, n);
    },
    p(a, o) {
      o[0] & /*$_*/
      32 && t !== (t = /*$_*/
      a[5]("successMessage") + "") && N(n, t);
    },
    d(a) {
      a && T(e);
    }
  };
}
function ee(i) {
  let e, t = (
    /*$_*/
    i[5]("successMessage") + ""
  ), n;
  return {
    c() {
      e = y("div"), n = V(t), p(e, "class", "successMessage " + /*isMobile*/
      (i[6] ? "successMessageMobile" : ""));
    },
    m(a, o) {
      H(a, e, o), r(e, n);
    },
    p(a, o) {
      o[0] & /*$_*/
      32 && t !== (t = /*$_*/
      a[5]("successMessage") + "") && N(n, t);
    },
    d(a) {
      a && T(e);
    }
  };
}
function te(i) {
  let e, t, n, a, o = (
    /*text*/
    i[34] + ""
  ), c, k, d, f;
  return k = ye(
    /*$$binding_groups*/
    i[20][0]
  ), {
    c() {
      e = y("div"), t = y("input"), n = F(), a = y("label"), c = V(o), p(t, "type", "radio"), p(
        t,
        "id",
        /*value*/
        i[33]
      ), t.__value = /*value*/
      i[33], ge(t, t.__value), p(
        a,
        "for",
        /*value*/
        i[33]
      ), k.p(t);
    },
    m(b, w) {
      H(b, e, w), r(e, t), t.checked = t.__value === /*realityCheckValue*/
      i[2], r(e, n), r(e, a), r(a, c), d || (f = G(
        t,
        "change",
        /*input_change_handler*/
        i[19]
      ), d = !0);
    },
    p(b, w) {
      w[0] & /*realityCheckValue*/
      4 && (t.checked = t.__value === /*realityCheckValue*/
      b[2]);
    },
    d(b) {
      b && T(e), k.r(), d = !1, f();
    }
  };
}
function Be(i) {
  let e;
  return {
    c() {
      e = y("div"), e.innerHTML = '<ui-skeleton structure="title" width="200px" margin-top="20px"></ui-skeleton>', p(e, "class", "SkeletonHeaderText");
    },
    m(t, n) {
      H(t, e, n);
    },
    p: I,
    d(t) {
      t && T(e);
    }
  };
}
function qe(i) {
  let e, t, n, a;
  return {
    c() {
      e = y("div"), t = y("ui-skeleton"), n = F(), a = y("ui-skeleton"), C(t, "structure", "title"), C(t, "width", "20px"), C(t, "height", "20px"), C(t, "margin-top", "5px"), C(t, "margin-bottom", "15px"), C(a, "structure", "title"), C(a, "width", "100px"), C(a, "height", "20px"), C(a, "margin-top", "5px"), C(a, "margin-bottom", "15px"), p(e, "class", "SkeletonMenuButton " + /*isMobile*/
      (i[6] ? "Mobile" : ""));
    },
    m(o, c) {
      H(o, e, c), r(e, t), r(e, n), r(e, a);
    },
    p: I,
    d(o) {
      o && T(e);
    }
  };
}
function Fe(i) {
  let e;
  return {
    c() {
      e = y("div"), e.innerHTML = '<div class="SkeletonOptionCircle"><ui-skeleton structure="circle" size="20px"></ui-skeleton></div> <div class="SkeletonOptionText"><ui-skeleton structure="text" height="10px" width="auto"></ui-skeleton></div>', p(e, "class", "SkeletonOption");
    },
    m(t, n) {
      H(t, e, n);
    },
    p: I,
    d(t) {
      t && T(e);
    }
  };
}
function Te(i) {
  let e;
  function t(o, c) {
    return (
      /*skeletonLoading*/
      o[1] ? Se : Me
    );
  }
  let n = t(i), a = n(i);
  return {
    c() {
      e = y("div"), a.c(), p(e, "class", "PlayerRealityCheckWrapper " + /*isMobile*/
      (i[6] ? "PlayerRealityCheckWrapperMobile" : ""));
    },
    m(o, c) {
      H(o, e, c), a.m(e, null), i[21](e);
    },
    p(o, c) {
      n === (n = t(o)) && a ? a.p(o, c) : (a.d(1), a = n(o), a && (a.c(), a.m(e, null)));
    },
    i: I,
    o: I,
    d(o) {
      o && T(e), a.d(), i[21](null);
    }
  };
}
function He(i, e, t) {
  let n;
  de(i, _e, (l) => t(5, n = l));
  let { endpoint: a = "" } = e, { playerid: o = "" } = e, { session: c = "" } = e, { lang: k = "en" } = e, { clientstyling: d = "" } = e, { clientstylingurl: f = "" } = e, { mbsource: b } = e, { translationurl: w = "" } = e, v, M, x = pe(window.navigator.userAgent) !== "PC", m = !0, s, g, B = !1, L = [];
  const D = () => {
    const l = new URL(`${a}/v1/player/${o}/realitycheck`), u = new Headers();
    u.append("X-SessionID", c);
    const A = { method: "GET", headers: u };
    fetch(l.href, A).then((j) => j.json()).then(
      (j) => {
        t(2, s = t(3, g = j.UserRealityCheckValue));
      },
      (j) => {
        console.error(j);
      }
    );
  }, U = () => {
    const l = new URL(`${a}/v1/player/${o}/availablerealityvalues`), u = new Headers();
    u.append("X-SessionID", c), u.append("accept", "application/json");
    const A = { method: "GET", headers: u };
    fetch(l.href, A).then((j) => j.json()).then(
      (j) => {
        W(j.AvailableRealityCheckValues), t(1, m = !1);
      },
      (j) => {
        console.error(j);
      }
    );
  }, W = (l) => {
    l.forEach((u) => {
      u == 0 ? L.push({
        value: u.toString(),
        text: n("never")
      }) : u < 60 ? L.push({
        value: u.toString(),
        text: u + " " + n("minutes")
      }) : u == 60 ? L.push({
        value: u.toString(),
        text: n("oneHour")
      }) : u > 60 && L.push({
        value: u.toString(),
        text: u / 60 + " " + n("hours")
      });
    });
  }, z = () => J(this, null, function* () {
    const l = new URL(`${a}/v1/player/${o}/realitycheck`), u = new Headers();
    u.append("X-SessionID", c), u.append("Content-Type", "application/json"), u.append("Accept", "application/json"), u.append("realityCheckValue", `${parseInt(s, 10)}`);
    const A = { method: "POST", headers: u };
    return yield fetch(l.href, A).then(
      (j) => j.status == 200,
      (j) => (console.error(j), !1)
    );
  }), S = (l) => {
    l.preventDefault(), z().then((u) => {
      u && (P(), D());
    });
  }, P = () => {
    window.postMessage(
      {
        type: "WidgetNotification",
        data: {
          type: "success",
          message: n("realityCheckSuccess")
        }
      },
      window.location.href
    ), t(4, B = !0), setTimeout(() => t(4, B = !1), 2e3);
  }, R = () => {
    window.postMessage(
      {
        type: "PlayerAccountMenuActive",
        isMobile: x
      },
      window.location.href
    );
  }, h = () => {
    we(k);
  }, q = () => {
    fetch(w).then((u) => u.json()).then((u) => {
      Object.keys(u).forEach((A) => {
        K(A, u[A]);
      });
    }).catch((u) => {
      console.log(u);
    });
  };
  Object.keys(Z).forEach((l) => {
    K(l, Z[l]);
  }), he(() => () => {
  });
  const _ = [[]], X = () => R();
  function ae() {
    s = this.__value, t(2, s);
  }
  function ne(l) {
    fe[l ? "unshift" : "push"](() => {
      v = l, t(0, v);
    });
  }
  return i.$$set = (l) => {
    "endpoint" in l && t(10, a = l.endpoint), "playerid" in l && t(11, o = l.playerid), "session" in l && t(12, c = l.session), "lang" in l && t(13, k = l.lang), "clientstyling" in l && t(14, d = l.clientstyling), "clientstylingurl" in l && t(15, f = l.clientstylingurl), "mbsource" in l && t(16, b = l.mbsource), "translationurl" in l && t(17, w = l.translationurl);
  }, i.$$.update = () => {
    i.$$.dirty[0] & /*lang*/
    8192 && k && h(), i.$$.dirty[0] & /*endpoint, playerid, session*/
    7168 && a && o && c && D(), i.$$.dirty[0] & /*endpoint, playerid, session*/
    7168 && a && o && c && U(), i.$$.dirty[0] & /*clientstyling, customStylingContainer*/
    16385 && d && v && ke(v, d), i.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
    32769 && f && v && ve(v, f), i.$$.dirty[0] & /*mbsource, customStylingContainer*/
    65537 && b && v && be(v, `${b}.Style`, M), i.$$.dirty[0] & /*translationurl*/
    131072 && w && q();
  }, [
    v,
    m,
    s,
    g,
    B,
    n,
    x,
    L,
    S,
    R,
    a,
    o,
    c,
    k,
    d,
    f,
    b,
    w,
    X,
    ae,
    _,
    ne
  ];
}
class Le extends le {
  constructor(e) {
    super(), se(
      this,
      e,
      He,
      Te,
      ce,
      {
        endpoint: 10,
        playerid: 11,
        session: 12,
        lang: 13,
        clientstyling: 14,
        clientstylingurl: 15,
        mbsource: 16,
        translationurl: 17
      },
      xe,
      [-1, -1]
    );
  }
  get endpoint() {
    return this.$$.ctx[10];
  }
  set endpoint(e) {
    this.$$set({ endpoint: e }), O();
  }
  get playerid() {
    return this.$$.ctx[11];
  }
  set playerid(e) {
    this.$$set({ playerid: e }), O();
  }
  get session() {
    return this.$$.ctx[12];
  }
  set session(e) {
    this.$$set({ session: e }), O();
  }
  get lang() {
    return this.$$.ctx[13];
  }
  set lang(e) {
    this.$$set({ lang: e }), O();
  }
  get clientstyling() {
    return this.$$.ctx[14];
  }
  set clientstyling(e) {
    this.$$set({ clientstyling: e }), O();
  }
  get clientstylingurl() {
    return this.$$.ctx[15];
  }
  set clientstylingurl(e) {
    this.$$set({ clientstylingurl: e }), O();
  }
  get mbsource() {
    return this.$$.ctx[16];
  }
  set mbsource(e) {
    this.$$set({ mbsource: e }), O();
  }
  get translationurl() {
    return this.$$.ctx[17];
  }
  set translationurl(e) {
    this.$$set({ translationurl: e }), O();
  }
}
Ce(Le, { endpoint: {}, playerid: {}, session: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, mbsource: {}, translationurl: {} }, [], [], !0);
export {
  Le as default
};
