import { a as fe, $ as ye, S as pe, i as he, s as be, f as k, b as Ae, n as D, d as E, c as B, e as b, g as we, h as J, o as Me, j as ve, k as S, l as le, m as a, p as I, q as c, r as d, t as T, u as W, v as Pe, w as R, x as H, y as K, z as _e, A as xe, B as ke, C as Ie, D as Ce } from "./PlayerAccountControllerNd-yeUlo8Jv.js";
import "../stencil/ui-skeleton-Dd7tqzYw.js";
import "../lazy/general-logout-mdnrMAz7.js";
function Q(n, e) {
  fe(n, e);
}
function Fe(n) {
  ye.set(n);
}
const Y = {
  en: {
    title: "My Account"
  },
  "zh-hk": {
    title: "我的帳戶"
  },
  fr: {
    title: "Mon compte"
  },
  tr: {
    title: "Hesabım"
  },
  ro: {
    title: "Contul meu"
  },
  es: {
    title: "Mi Cuenta"
  },
  pt: {
    title: "Minha Conta"
  },
  hr: {
    title: "Moj račun"
  },
  "pt-br": {
    title: "Minha conta"
  },
  "es-mx": {
    title: "Mi cuenta"
  },
  "en-us": {
    title: "My Account"
  }
};
function Le(n) {
  Ae(n, "svelte-j26xf8", '.PlayerAccountMenuContainer{background:var(--emw--color-primary, #184026);color:var(--emw--pam-typography-color-nav-bg, var(--emw--color-contrast, #FFFFFF));position:relative;height:100vh;display:flex;flex-direction:column;padding:0 15px;animation-name:fadeIn;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:0.3s}.PlayerAccountMenuContainer .PlayerAccountMenuItemWrapper{margin:0;word-break:break-all;display:flex;align-items:center}.PlayerAccountMenuContainer .PlayerAccountMenuItemWrapper span{display:flex;align-items:center}.PlayerAccountMenuContainer .skeletonLogOut{width:100%;border-radius:10px;overflow:hidden}.PlayerAccountMenuHeader{color:var(--emw--pam-typography-color-nav-bg, var(--emw--color-contrast, #FFFFFF));flex-grow:0;padding:30px 20px}.PlayerAccountMenuHeader .PlayerAccountMenuUser{margin-bottom:5px;font-size:var(--emw--font-size-large, 20px);color:var(--emw--pam-color-secondary, var(--emw--color-secondary, #E98B10))}.PlayerAccountMenuHeader .PlayerAccountMenuEmail{font-size:var(--emw--font-size-small, 14px);text-overflow:ellipsis;overflow:hidden}.PlayerAccountMenuHeader p{font-weight:300}.PlayerAccountMenuHeaderMobile{color:var(--emw--pam-typography-color-nav-bg, var(--emw--color-contrast, #FFFFFF))}.PlayerAccountMenuItemBox{padding:14px 20px;margin:2px 0;font-size:var(--emw--font-size-medium, 16px);line-height:16px;display:inline-flex;width:100%;box-sizing:border-box;align-items:center;border-radius:var(--emw--border-radius-medium, 10px);border:2px solid transparent;cursor:pointer;transition:all 0.3s linear}.PlayerAccountMenuItemBox:hover{transition:all 0.3s linear;background:rgba(35, 176, 78, 0.3);border:2px solid var(--emw--pam-color-primary, var(--emw--color-primary, #23B04E));border-radius:var(--emw--border-radius-medium, 10px);color:var(--emw--color-white, #FFFFFF)}.PlayerAccountMenuItemBox .PlayerAccountMenuItemTitle{margin-left:20px}.PlayerAccountMenuItemBox .PlayerAccountMenuItemIcon{width:20px;height:20px;padding-top:unset}.PlayerAccountMenuItemBox .PlayerAccountMenuItemIconMobile{width:30px;height:30px;padding-top:15px}.PlayerAccountMenuList::-webkit-scrollbar{width:6px}.PlayerAccountMenuList::-webkit-scrollbar-track{background:var(--emw--color-gray-300, #58586B)}.PlayerAccountMenuList::-webkit-scrollbar-thumb{background:var(--emw--color-gray-100, #E6E6E6)}.PlayerAccountItemWrap{display:flex;gap:20px;padding:16px 20px}.PlayerAccountItemWrap.PlayerAccountItemWrapMobile{padding:5px;width:100%;box-sizing:border-box}.PlayerAccountItemWrap ui-skeleton:last-child{flex:1}.PlayerAccountLogOutArea{background-color:rgba(253, 40, 57, 0.3);color:var(--emw--color-white, #FFFFFF);border-radius:var(--emw--border-radius-medium, 10px);width:100%;flex-grow:0}.PlayerAccountMenuActiveItemBox{background:rgba(35, 176, 78, 0.3);color:var(--emw--pam-color-primary, var(--emw--color-primary, #23B04E));border:2px solid var(--emw--pam-color-primary, var(--emw--color-primary, #23B04E));border-radius:var(--emw--border-radius-medium, 10px);transition:all 0.3s linear}.PlayerAccountMobileContainer{height:unset;padding:0}.PlayerAccountMobileContainer .PlayerAccountMenuCategoryWrapper{display:flex;align-items:center;gap:10px;margin-bottom:18px}.PlayerAccountMobileContainer .PlayerAccountMenuCategoryTitle{margin:0;font-weight:600}.PlayerAccountMobileContainer .PlayerAccountMenuItemTitle{margin-left:0;text-transform:capitalize;line-height:14px}.PlayerAccountMobileContainer .PlayerAccountMenuEmail{margin:0}.PlayerAccountMobileContainer .PlayerAccountMenuList{display:flex;flex-direction:column;align-items:flex-start;margin:0px 15px;min-height:900px}.PlayerAccountMobileContainer .PlayerAccountMenuList .PlayerAccountMenuItemBox{background:rgba(35, 176, 78, 0.3);color:var(--emw--pam-color-primary, var(--emw--color-primary, #23B04E));border:2px solid var(--emw--pam-color-primary, var(--emw--color-primary, #23B04E));border-radius:var(--emw--border-radius-medium, 10px);height:60px;margin:5px 0;align-items:flex-start;position:relative}.PlayerAccountMobileContainer .PlayerAccountMenuList .PlayerAccountMenuItemBox.PlayerAccountMenuActiveItemBox{background:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.PlayerAccountMobileContainer .PlayerAccountMenuList .PlayerAccountMenuItemBox .PlayerAccountMenuItemIcon{width:20px;padding:0 10px 0 15px}.PlayerAccountMobileContainer .PlayerAccountMenuList .PlayerAccountMenuItemBox::after{content:"";display:inline-block;width:15px;height:15px;background-image:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2215%22 height=%2215%22 viewBox=%220 0 15 15%22%3E%3Cdefs%3E%3Cstyle%3E.aaa%7Bfill:var(--emw--color-white,%20%23FFFFFF);%7D%3C/style%3E%3C/defs%3E%3Cg transform=%22translate(-20%20-158)%22%3E%3Cg transform=%22translate(20%20158)%22%3E%3Cpath class=%22aaa%22 d=%22M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z%22 transform=%22translate(15%2015)%20rotate(180)%22%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E");background-size:contain;transform:scaleX(-1);background-repeat:no-repeat;position:absolute;right:15px;top:22px}.PlayerAccountMobileContainer .PlayerAccountMenuList .PlayerAccountMenuItemWrapper{display:flex;justify-items:center;align-items:center;flex-flow:row;gap:6px;position:absolute;top:0;bottom:0;left:0;right:0}.PlayerAccountMobileContainer .PlayerAccountMenuList .PlayerAccountMenuItemWrapper .PlayerAccountMenuItemTitle{font-size:var(--emw--font-size-medium, 16px);line-height:16px;font-weight:400;word-break:break-word;text-align:left;color:var(--emw--pam-typography-color-nav-bg, var(--emw--color-contrast, #FFFFFF))}.PlayerAccountMobileContainer .PlayerAccountLogOutArea{position:absolute;right:18px;top:56px;bottom:unset;background:transparent;width:48px;border-top:0}@keyframes fadeIn{0%{opacity:0.01}1%{opacity:0}50%{opacity:0}100%{opacity:1}}');
}
function $(n, e, t) {
  const i = n.slice();
  return i[43] = e[t], i;
}
function ee(n, e, t) {
  const i = n.slice();
  return i[40] = e[t], i;
}
function Ee(n) {
  let e, t, i, r, s = (
    /*showaliasasusername*/
    (n[5] === "true" ? (
      /*profileAlias*/
      n[12]
    ) : (
      /*profileUsername*/
      n[10]
    )) + ""
  ), u, w, h, _, P, v, A, f, o = (
    /*isMobile*/
    n[14] && He(n)
  ), y = (
    /*isMobile*/
    n[14] && We(n)
  ), m = S(
    /*menuItems*/
    n[8]
  ), M = [];
  for (let g = 0; g < m.length; g += 1)
    M[g] = te($(n, m, g));
  let F = !/*isMobile*/
  n[14] && ze(n);
  return {
    c() {
      e = b("div"), t = b("div"), o && o.c(), i = I(), r = b("p"), u = W(s), w = I(), h = b("p"), _ = W(
        /*profileEmail*/
        n[11]
      ), P = I(), y && y.c(), v = I(), A = b("div");
      for (let g = 0; g < M.length; g += 1)
        M[g].c();
      f = I(), F && F.c(), d(r, "class", "PlayerAccountMenuUser"), d(r, "translate", "no"), d(h, "class", "PlayerAccountMenuEmail"), d(h, "translate", "no"), d(t, "class", "PlayerAccountMenuHeader " + /*isMobile*/
      (n[14] ? "PlayerAccountMenuHeaderMobile" : "")), d(A, "class", "PlayerAccountMenuList"), d(e, "class", "PlayerAccountMenuContainer " + /*isMobile*/
      (n[14] ? "PlayerAccountMobileContainer" : ""));
    },
    m(g, C) {
      B(g, e, C), a(e, t), o && o.m(t, null), a(t, i), a(t, r), a(r, u), a(t, w), a(t, h), a(h, _), a(t, P), y && y.m(t, null), a(e, v), a(e, A);
      for (let p = 0; p < M.length; p += 1)
        M[p] && M[p].m(A, null);
      a(e, f), F && F.m(e, null);
    },
    p(g, C) {
      if (
        /*isMobile*/
        g[14] && o.p(g, C), C[0] & /*showaliasasusername, profileAlias, profileUsername*/
        5152 && s !== (s = /*showaliasasusername*/
        (g[5] === "true" ? (
          /*profileAlias*/
          g[12]
        ) : (
          /*profileUsername*/
          g[10]
        )) + "") && T(u, s), C[0] & /*profileEmail*/
        2048 && T(
          _,
          /*profileEmail*/
          g[11]
        ), /*isMobile*/
        g[14] && y.p(g, C), C[0] & /*selectedItem, menuItems, isMobile, openAccountSection*/
        49920
      ) {
        m = S(
          /*menuItems*/
          g[8]
        );
        let p;
        for (p = 0; p < m.length; p += 1) {
          const z = $(g, m, p);
          M[p] ? M[p].p(z, C) : (M[p] = te(z), M[p].c(), M[p].m(A, null));
        }
        for (; p < M.length; p += 1)
          M[p].d(1);
        M.length = m.length;
      }
      /*isMobile*/
      g[14] || F.p(g, C);
    },
    d(g) {
      g && E(e), o && o.d(), y && y.d(), le(M, g), F && F.d();
    }
  };
}
function Be(n) {
  let e, t, i, r, s, u, w, h, _, P, v = (
    /*isMobile*/
    n[14] && Se()
  ), A = S(Array(18)), f = [];
  for (let o = 0; o < A.length; o += 1)
    f[o] = ne(ee(n, A, o));
  return {
    c() {
      e = b("div"), t = b("div"), v && v.c(), i = I(), r = b("ui-skeleton"), s = I(), u = b("ui-skeleton"), w = I(), h = b("div");
      for (let o = 0; o < f.length; o += 1)
        f[o].c();
      _ = I(), P = b("div"), P.innerHTML = '<ui-skeleton structure="rectangle" width="auto" height="60px"></ui-skeleton>', c(r, "structure", "title"), c(r, "width", "100px"), c(r, "height", "20px"), c(r, "margin-top", "20px"), c(u, "structure", "text"), c(u, "width", "200px"), c(u, "height", "20px"), d(t, "class", "PlayerAccountMenuHeader " + /*isMobile*/
      (n[14] ? "PlayerAccountMenuHeaderMobile" : "")), d(h, "class", "PlayerAccountMenuList"), d(P, "class", "skeletonLogOut"), d(e, "class", "PlayerAccountMenuContainer " + /*isMobile*/
      (n[14] ? "PlayerAccountMobileContainer" : ""));
    },
    m(o, y) {
      B(o, e, y), a(e, t), v && v.m(t, null), a(t, i), a(t, r), a(t, s), a(t, u), a(e, w), a(e, h);
      for (let m = 0; m < f.length; m += 1)
        f[m] && f[m].m(h, null);
      a(e, _), a(e, P);
    },
    p(o, y) {
      if (y[0] & /*isMobile*/
      16384) {
        A = S(Array(18));
        let m;
        for (m = 0; m < A.length; m += 1) {
          const M = ee(o, A, m);
          f[m] ? f[m].p(M, y) : (f[m] = ne(M), f[m].c(), f[m].m(h, null));
        }
        for (; m < f.length; m += 1)
          f[m].d(1);
        f.length = A.length;
      }
    },
    d(o) {
      o && E(e), v && v.d(), le(f, o);
    }
  };
}
function He(n) {
  let e, t, i, r, s, u, w, h, _, P, v = (
    /*$_*/
    n[13]("title") + ""
  ), A, f, o;
  return {
    c() {
      e = b("div"), t = H("svg"), i = H("defs"), r = H("style"), s = W(".aaa{fill:var(--emw--color-white, #FFFFFF);}"), u = H("g"), w = H("g"), h = H("path"), _ = I(), P = b("h3"), A = W(v), d(h, "class", "aaa"), d(h, "d", "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"), d(h, "transform", "translate(15 15) rotate(180)"), d(w, "transform", "translate(20 158)"), d(u, "transform", "translate(-20 -158)"), d(t, "xmlns", "http://www.w3.org/2000/svg"), d(t, "width", "15"), d(t, "height", "15"), d(t, "viewBox", "0 0 15 15"), d(P, "class", "PlayerAccountMenuCategoryTitle"), d(e, "class", "PlayerAccountMenuCategoryWrapper");
    },
    m(y, m) {
      B(y, e, m), a(e, t), a(t, i), a(i, r), a(r, s), a(t, u), a(u, w), a(w, h), a(e, _), a(e, P), a(P, A), f || (o = [
        R(
          t,
          "click",
          /*goToHome*/
          n[16]
        ),
        R(
          P,
          "click",
          /*goToHome*/
          n[16]
        )
      ], f = !0);
    },
    p(y, m) {
      m[0] & /*$_*/
      8192 && v !== (v = /*$_*/
      y[13]("title") + "") && T(A, v);
    },
    d(y) {
      y && E(e), f = !1, Pe(o);
    }
  };
}
function We(n) {
  let e, t;
  return {
    c() {
      e = b("div"), t = b("general-logout"), c(
        t,
        "endpoint",
        /*endpoint*/
        n[1]
      ), c(
        t,
        "session",
        /*session*/
        n[0]
      ), c(t, "buttonlocation", "PlayerAccountMenu"), c(
        t,
        "clientstyling",
        /*clientstyling*/
        n[2]
      ), c(
        t,
        "clientstylingurl",
        /*clientstylingurl*/
        n[3]
      ), c(
        t,
        "mbsource",
        /*mbsource*/
        n[4]
      ), d(e, "class", "PlayerAccountLogOutArea");
    },
    m(i, r) {
      B(i, e, r), a(e, t);
    },
    p(i, r) {
      r[0] & /*endpoint*/
      2 && c(
        t,
        "endpoint",
        /*endpoint*/
        i[1]
      ), r[0] & /*session*/
      1 && c(
        t,
        "session",
        /*session*/
        i[0]
      ), r[0] & /*clientstyling*/
      4 && c(
        t,
        "clientstyling",
        /*clientstyling*/
        i[2]
      ), r[0] & /*clientstylingurl*/
      8 && c(
        t,
        "clientstylingurl",
        /*clientstylingurl*/
        i[3]
      ), r[0] & /*mbsource*/
      16 && c(
        t,
        "mbsource",
        /*mbsource*/
        i[4]
      );
    },
    d(i) {
      i && E(e);
    }
  };
}
function te(n) {
  let e, t, i, r, s, u, w = (
    /*menuItem*/
    n[43].label + ""
  ), h, _, P, v, A;
  function f() {
    return (
      /*click_handler*/
      n[27](
        /*menuItem*/
        n[43]
      )
    );
  }
  return {
    c() {
      e = b("div"), t = b("p"), i = b("img"), s = I(), u = b("span"), h = W(w), _ = I(), d(i, "class", "PlayerAccountMenuItemIcon " + /*isMobile*/
      (n[14] ? "PlayerAccountMenuItemIconMobile" : "")), K(i.src, r = /*menuItem*/
      n[43].img) || d(i, "src", r), d(u, "class", "PlayerAccountMenuItemTitle"), d(t, "class", "PlayerAccountMenuItemWrapper"), d(e, "class", P = "PlayerAccountMenuItemBox " + /*selectedItem*/
      (n[9] === /*menuItem*/
      n[43].id && !/*isMobile*/
      n[14] ? "PlayerAccountMenuActiveItemBox" : ""));
    },
    m(o, y) {
      B(o, e, y), a(e, t), a(t, i), a(t, s), a(t, u), a(u, h), a(e, _), v || (A = R(e, "click", f), v = !0);
    },
    p(o, y) {
      n = o, y[0] & /*menuItems*/
      256 && !K(i.src, r = /*menuItem*/
      n[43].img) && d(i, "src", r), y[0] & /*menuItems*/
      256 && w !== (w = /*menuItem*/
      n[43].label + "") && T(h, w), y[0] & /*selectedItem, menuItems*/
      768 && P !== (P = "PlayerAccountMenuItemBox " + /*selectedItem*/
      (n[9] === /*menuItem*/
      n[43].id && !/*isMobile*/
      n[14] ? "PlayerAccountMenuActiveItemBox" : "")) && d(e, "class", P);
    },
    d(o) {
      o && E(e), v = !1, A();
    }
  };
}
function ze(n) {
  let e, t;
  return {
    c() {
      e = b("div"), t = b("general-logout"), c(
        t,
        "endpoint",
        /*endpoint*/
        n[1]
      ), c(
        t,
        "session",
        /*session*/
        n[0]
      ), c(t, "buttonlocation", "PlayerAccountMenu"), c(
        t,
        "clientstyling",
        /*clientstyling*/
        n[2]
      ), c(
        t,
        "clientstylingurl",
        /*clientstylingurl*/
        n[3]
      ), c(
        t,
        "mbsource",
        /*mbsource*/
        n[4]
      ), d(e, "class", "PlayerAccountLogOutArea");
    },
    m(i, r) {
      B(i, e, r), a(e, t);
    },
    p(i, r) {
      r[0] & /*endpoint*/
      2 && c(
        t,
        "endpoint",
        /*endpoint*/
        i[1]
      ), r[0] & /*session*/
      1 && c(
        t,
        "session",
        /*session*/
        i[0]
      ), r[0] & /*clientstyling*/
      4 && c(
        t,
        "clientstyling",
        /*clientstyling*/
        i[2]
      ), r[0] & /*clientstylingurl*/
      8 && c(
        t,
        "clientstylingurl",
        /*clientstylingurl*/
        i[3]
      ), r[0] & /*mbsource*/
      16 && c(
        t,
        "mbsource",
        /*mbsource*/
        i[4]
      );
    },
    d(i) {
      i && E(e);
    }
  };
}
function Se(n) {
  let e;
  return {
    c() {
      e = b("div"), e.innerHTML = '<ui-skeleton structure="title" width="30px" height="40px"></ui-skeleton> <ui-skeleton structure="text" width="150px" height="40px"></ui-skeleton>', d(e, "class", "PlayerAccountMenuCategoryWrapper");
    },
    m(t, i) {
      B(t, e, i);
    },
    d(t) {
      t && E(e);
    }
  };
}
function Te(n) {
  let e;
  return {
    c() {
      e = b("ui-skeleton"), c(e, "structure", "circle"), c(e, "size", "20px");
    },
    m(t, i) {
      B(t, e, i);
    },
    d(t) {
      t && E(e);
    }
  };
}
function ne(n) {
  let e, t, i, r, s = !/*isMobile*/
  n[14] && Te();
  return {
    c() {
      e = b("div"), s && s.c(), t = I(), i = b("ui-skeleton"), r = I(), c(i, "structure", "rectangle"), c(i, "width", "100%"), c(
        i,
        "height",
        /*isMobile*/
        n[14] ? "60px" : "20px"
      ), d(e, "class", "PlayerAccountItemWrap " + /*isMobile*/
      (n[14] ? "PlayerAccountItemWrapMobile" : ""));
    },
    m(u, w) {
      B(u, e, w), s && s.m(e, null), a(e, t), a(e, i), a(e, r);
    },
    p: D,
    d(u) {
      u && E(e), s && s.d();
    }
  };
}
function je(n) {
  let e;
  function t(s, u) {
    return (
      /*skeletonLoading*/
      s[7] ? Be : Ee
    );
  }
  let i = t(n), r = i(n);
  return {
    c() {
      e = b("div"), r.c();
    },
    m(s, u) {
      B(s, e, u), r.m(e, null), n[28](e);
    },
    p(s, u) {
      i === (i = t(s)) && r ? r.p(s, u) : (r.d(1), r = i(s), r && (r.c(), r.m(e, null)));
    },
    i: D,
    o: D,
    d(s) {
      s && E(e), r.d(), n[28](null);
    }
  };
}
function Oe(n, e, t) {
  let i;
  we(n, Ce, (l) => t(13, i = l));
  let { endpoint: r = "" } = e, { cmsendpoint: s = "" } = e, { env: u = "" } = e, { session: w = "" } = e, { playerid: h = "" } = e, { lang: _ = "en" } = e, { selecteditem: P = "" } = e, { userroles: v = "" } = e, { clientstyling: A = "" } = e, { clientstylingurl: f = "" } = e, { mbsource: o } = e, { translationurl: y = "" } = e, { activemenuitem: m = "" } = e, { showaliasasusername: M = "false" } = e, F = !1, g = !1, C = !0, p, z, j = [], O, N = window.navigator.userAgent, ie = J(N) !== "PC", q = "", G = "", U = "";
  window.matchMedia("(min-width: 768px)");
  const re = () => {
    fetch(y).then((x) => x.json()).then((x) => {
      Object.keys(x).forEach((L) => {
        Q(L, x[L]);
      });
    }).catch((x) => {
      console.error(x);
    });
  };
  Object.keys(Y).forEach((l) => {
    Q(l, Y[l]);
  });
  const V = (l) => {
    if (l.data)
      switch (l.data.type) {
        case "AccountMenuDetails":
          availableMenuItemsArray = l.data.accountMenuInfo;
          break;
        case "UserSessionID":
          t(0, w = l.data.session);
          break;
        case "AliasUpdated":
          M === "true" && l.data.alias && t(12, U = l.data.alias);
          break;
      }
  }, ae = () => {
    let l = J(N);
    if (l)
      return l === "PC" ? "dk" : "mtWeb";
  }, oe = () => {
    const l = new URL(`${s}/${_}/profile-menu?env=${u}`);
    l.searchParams.append("device", ae()), fetch(l.href).then((x) => x.json()).then((x) => {
      t(8, j = x), Z();
    }).catch((x) => {
      console.error("Error getting menu items", x);
    }).finally(() => {
      t(25, F = !0);
    });
  }, se = () => {
    let l = new URL(`${r}/v1/player/${h}/profile`);
    l.searchParams.append("userRoles", v);
    let x = {
      method: "GET",
      headers: { "X-SessionID": w }
    };
    fetch(l.href, x).then((L) => L.json()).then(
      (L) => {
        t(10, q = L.username), t(11, G = L.email), M === "true" && t(12, U = L.alias || "");
      },
      (L) => {
        console.error(L);
      }
    ).finally(() => {
      t(26, g = !0);
    });
  }, X = (l) => {
    window.postMessage({ type: "ChangeAccountPage", page: l }, window.location.href), t(9, O = l.id);
  }, Z = () => {
    var l;
    t(9, O = (l = j.find((x) => x.path.includes(m))) == null ? void 0 : l.id);
  }, ce = () => {
    window.postMessage({ type: "GoToHomepage" }, window.location.href);
  }, ue = () => {
    Fe(_);
  }, me = () => {
    se();
  };
  Me(() => (window.addEventListener("message", V, !1), () => {
    window.removeEventListener("message", V);
  }));
  const de = (l) => X(l);
  function ge(l) {
    ve[l ? "unshift" : "push"](() => {
      p = l, t(6, p);
    });
  }
  return n.$$set = (l) => {
    "endpoint" in l && t(1, r = l.endpoint), "cmsendpoint" in l && t(17, s = l.cmsendpoint), "env" in l && t(18, u = l.env), "session" in l && t(0, w = l.session), "playerid" in l && t(19, h = l.playerid), "lang" in l && t(20, _ = l.lang), "selecteditem" in l && t(21, P = l.selecteditem), "userroles" in l && t(22, v = l.userroles), "clientstyling" in l && t(2, A = l.clientstyling), "clientstylingurl" in l && t(3, f = l.clientstylingurl), "mbsource" in l && t(4, o = l.mbsource), "translationurl" in l && t(23, y = l.translationurl), "activemenuitem" in l && t(24, m = l.activemenuitem), "showaliasasusername" in l && t(5, M = l.showaliasasusername);
  }, n.$$.update = () => {
    n.$$.dirty[0] & /*menuLoaded, playerInfoLoaded*/
    100663296 && t(7, C = !F || !g), n.$$.dirty[0] & /*lang*/
    1048576 && _ && ue(), n.$$.dirty[0] & /*endpoint, session, playerid, lang*/
    1572867 && r && w && h && _ && me(), n.$$.dirty[0] & /*cmsendpoint, lang, env*/
    1441792 && s && _ && u && oe(), n.$$.dirty[0] & /*activemenuitem*/
    16777216 && m && Z(), n.$$.dirty[0] & /*clientstyling, customStylingContainer*/
    68 && A && p && _e(p, A), n.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
    72 && f && p && xe(p, f), n.$$.dirty[0] & /*mbsource, customStylingContainer*/
    80 && o && p && ke(p, `${o}.Style`, z), n.$$.dirty[0] & /*translationurl*/
    8388608 && y && re();
  }, [
    w,
    r,
    A,
    f,
    o,
    M,
    p,
    C,
    j,
    O,
    q,
    G,
    U,
    i,
    ie,
    X,
    ce,
    s,
    u,
    h,
    _,
    P,
    v,
    y,
    m,
    F,
    g,
    de,
    ge
  ];
}
class Ue extends pe {
  constructor(e) {
    super(), he(
      this,
      e,
      Oe,
      je,
      be,
      {
        endpoint: 1,
        cmsendpoint: 17,
        env: 18,
        session: 0,
        playerid: 19,
        lang: 20,
        selecteditem: 21,
        userroles: 22,
        clientstyling: 2,
        clientstylingurl: 3,
        mbsource: 4,
        translationurl: 23,
        activemenuitem: 24,
        showaliasasusername: 5
      },
      Le,
      [-1, -1]
    );
  }
  get endpoint() {
    return this.$$.ctx[1];
  }
  set endpoint(e) {
    this.$$set({ endpoint: e }), k();
  }
  get cmsendpoint() {
    return this.$$.ctx[17];
  }
  set cmsendpoint(e) {
    this.$$set({ cmsendpoint: e }), k();
  }
  get env() {
    return this.$$.ctx[18];
  }
  set env(e) {
    this.$$set({ env: e }), k();
  }
  get session() {
    return this.$$.ctx[0];
  }
  set session(e) {
    this.$$set({ session: e }), k();
  }
  get playerid() {
    return this.$$.ctx[19];
  }
  set playerid(e) {
    this.$$set({ playerid: e }), k();
  }
  get lang() {
    return this.$$.ctx[20];
  }
  set lang(e) {
    this.$$set({ lang: e }), k();
  }
  get selecteditem() {
    return this.$$.ctx[21];
  }
  set selecteditem(e) {
    this.$$set({ selecteditem: e }), k();
  }
  get userroles() {
    return this.$$.ctx[22];
  }
  set userroles(e) {
    this.$$set({ userroles: e }), k();
  }
  get clientstyling() {
    return this.$$.ctx[2];
  }
  set clientstyling(e) {
    this.$$set({ clientstyling: e }), k();
  }
  get clientstylingurl() {
    return this.$$.ctx[3];
  }
  set clientstylingurl(e) {
    this.$$set({ clientstylingurl: e }), k();
  }
  get mbsource() {
    return this.$$.ctx[4];
  }
  set mbsource(e) {
    this.$$set({ mbsource: e }), k();
  }
  get translationurl() {
    return this.$$.ctx[23];
  }
  set translationurl(e) {
    this.$$set({ translationurl: e }), k();
  }
  get activemenuitem() {
    return this.$$.ctx[24];
  }
  set activemenuitem(e) {
    this.$$set({ activemenuitem: e }), k();
  }
  get showaliasasusername() {
    return this.$$.ctx[5];
  }
  set showaliasasusername(e) {
    this.$$set({ showaliasasusername: e }), k();
  }
}
Ie(Ue, { endpoint: {}, cmsendpoint: {}, env: {}, session: {}, playerid: {}, lang: {}, selecteditem: {}, userroles: {}, clientstyling: {}, clientstylingurl: {}, mbsource: {}, translationurl: {}, activemenuitem: {}, showaliasasusername: {} }, [], [], !0);
export {
  Ue as default
};
