import { S as An, b as Cn, s as On, f as Y, c as xn, e as le, t as me, g as re, k as rn, l as ln, m as ce, x as cn, w as Rn, H as Nn, V as Mn, d as Fe, r as kn, T as zt, F as Ht, y as Ve, u as Be, h as _e, j as Je, o as x, U as vn, B as Zt, p as Z, z as qe, q as Le, v as d, A as Wt, n as ct, N as Ft, C as ut, D as Dn } from "./CashierConfirmModal-T9FhMxP2.js";
import { f as Bt } from "./CashierModal-CZ_PAOXO.js";
import { a as Ln, i as Pn, $ as In, b as Un } from "./CashierError-CXr1Ga3A.js";
import { d as _t, u as zn } from "./CashierMethodDetails-BHM-R2f6.js";
function Jt(n, t) {
  Ln(n, t);
}
function Hn(n) {
  Pn({
    fallbackLocale: "en"
  }), In.set(n);
}
const Gt = {
  en: {
    sessionExpirationHeader: "Session Warning",
    sessionExpirationTitle: "Your session is about to expire!",
    sessionExpirationGeneralText: "Your session will automatically terminate in <b>{second} seconds</b>.",
    sessionExpirationGeneralButton: "CONTINUE",
    sessionExpirationLoadingButton: "PROCESSING..."
  },
  tr: {
    sessionExpirationHeader: "Oturum Uyarısı",
    sessionExpirationTitle: "Oturumunuzun süresi dolmak üzere!",
    sessionExpirationGeneralText: "Oyun seansınız <b>{second} saniye</b> içinde otomatik olarak sonuçlandırılacaktır",
    sessionExpirationGeneralButton: "DEVAM ET",
    sessionExpirationLoadingButton: "İŞLEME..."
  },
  "en-us": {
    sessionExpirationHeader: "Session Warning",
    sessionExpirationTitle: "Your session is about to expire!",
    sessionExpirationGeneralText: "Your session will automatically terminate in <b>{second} seconds</b>.",
    sessionExpirationGeneralButton: "CONTINUE",
    sessionExpirationLoadingButton: "PROCESSING..."
  }
};
/*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */
const {
  entries: un,
  setPrototypeOf: Vt,
  isFrozen: Zn,
  getPrototypeOf: Wn,
  getOwnPropertyDescriptor: Fn
} = Object;
let {
  freeze: W,
  seal: j,
  create: fn
} = Object, {
  apply: ft,
  construct: mt
} = typeof Reflect != "undefined" && Reflect;
W || (W = function(t) {
  return t;
});
j || (j = function(t) {
  return t;
});
ft || (ft = function(t, i, o) {
  return t.apply(i, o);
});
mt || (mt = function(t, i) {
  return new t(...i);
});
const Ze = _(Array.prototype.forEach), qt = _(Array.prototype.pop), Ne = _(Array.prototype.push), Ge = _(String.prototype.toLowerCase), ot = _(String.prototype.toString), Yt = _(String.prototype.match), Me = _(String.prototype.replace), Bn = _(String.prototype.indexOf), _n = _(String.prototype.trim), Q = _(Object.prototype.hasOwnProperty), H = _(RegExp.prototype.test), ke = Jn(TypeError);
function _(n) {
  return function(t) {
    for (var i = arguments.length, o = new Array(i > 1 ? i - 1 : 0), a = 1; a < i; a++)
      o[a - 1] = arguments[a];
    return ft(n, t, o);
  };
}
function Jn(n) {
  return function() {
    for (var t = arguments.length, i = new Array(t), o = 0; o < t; o++)
      i[o] = arguments[o];
    return mt(n, i);
  };
}
function m(n, t) {
  let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ge;
  Vt && Vt(n, null);
  let o = t.length;
  for (; o--; ) {
    let a = t[o];
    if (typeof a == "string") {
      const r = i(a);
      r !== a && (Zn(t) || (t[o] = r), a = r);
    }
    n[a] = !0;
  }
  return n;
}
function Gn(n) {
  for (let t = 0; t < n.length; t++)
    Q(n, t) || (n[t] = null);
  return n;
}
function he(n) {
  const t = fn(null);
  for (const [i, o] of un(n))
    Q(n, i) && (Array.isArray(o) ? t[i] = Gn(o) : o && typeof o == "object" && o.constructor === Object ? t[i] = he(o) : t[i] = o);
  return t;
}
function ve(n, t) {
  for (; n !== null; ) {
    const o = Fn(n, t);
    if (o) {
      if (o.get)
        return _(o.get);
      if (typeof o.value == "function")
        return _(o.value);
    }
    n = Wn(n);
  }
  function i() {
    return null;
  }
  return i;
}
const jt = W(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), st = W(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), at = W(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Vn = W(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), rt = W(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), qn = W(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Xt = W(["#text"]), Kt = W(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), lt = W(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Qt = W(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), We = W(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Yn = j(/\{\{[\w\W]*|[\w\W]*\}\}/gm), jn = j(/<%[\w\W]*|[\w\W]*%>/gm), Xn = j(/\${[\w\W]*}/gm), Kn = j(/^data-[\-\w.\u00B7-\uFFFF]/), Qn = j(/^aria-[\-\w]+$/), mn = j(
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
  // eslint-disable-line no-useless-escape
), $n = j(/^(?:\w+script|data):/i), ei = j(
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
  // eslint-disable-line no-control-regex
), pn = j(/^html$/i), ti = j(/^[a-z][.\w]*(-[.\w]+)+$/i);
var $t = /* @__PURE__ */ Object.freeze({
  __proto__: null,
  MUSTACHE_EXPR: Yn,
  ERB_EXPR: jn,
  TMPLIT_EXPR: Xn,
  DATA_ATTR: Kn,
  ARIA_ATTR: Qn,
  IS_ALLOWED_URI: mn,
  IS_SCRIPT_OR_DATA: $n,
  ATTR_WHITESPACE: ei,
  DOCTYPE_NAME: pn,
  CUSTOM_ELEMENT: ti
});
const De = {
  element: 1,
  text: 3,
  // Deprecated
  progressingInstruction: 7,
  comment: 8,
  document: 9
}, ni = function() {
  return typeof window == "undefined" ? null : window;
}, ii = function(t, i) {
  if (typeof t != "object" || typeof t.createPolicy != "function")
    return null;
  let o = null;
  const a = "data-tt-policy-suffix";
  i && i.hasAttribute(a) && (o = i.getAttribute(a));
  const r = "dompurify" + (o ? "#" + o : "");
  try {
    return t.createPolicy(r, {
      createHTML(p) {
        return p;
      },
      createScriptURL(p) {
        return p;
      }
    });
  } catch (p) {
    return console.warn("TrustedTypes policy " + r + " could not be created."), null;
  }
};
function dn() {
  let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ni();
  const t = (u) => dn(u);
  if (t.version = "3.1.6", t.removed = [], !n || !n.document || n.document.nodeType !== De.document)
    return t.isSupported = !1, t;
  let {
    document: i
  } = n;
  const o = i, a = o.currentScript, {
    DocumentFragment: r,
    HTMLTemplateElement: p,
    Node: D,
    Element: L,
    NodeFilter: y,
    NamedNodeMap: P = n.NamedNodeMap || n.MozNamedAttrMap,
    HTMLFormElement: pe,
    DOMParser: ie,
    trustedTypes: J
  } = n, O = L.prototype, R = ve(O, "cloneNode"), M = ve(O, "remove"), ue = ve(O, "nextSibling"), A = ve(O, "childNodes"), h = ve(O, "parentNode");
  if (typeof p == "function") {
    const u = i.createElement("template");
    u.content && u.content.ownerDocument && (i = u.content.ownerDocument);
  }
  let S, F = "";
  const {
    implementation: G,
    createNodeIterator: V,
    createDocumentFragment: I,
    getElementsByTagName: $
  } = i, {
    importNode: oe
  } = o;
  let w = {};
  t.isSupported = typeof un == "function" && typeof h == "function" && G && G.createHTMLDocument !== void 0;
  const {
    MUSTACHE_EXPR: ee,
    ERB_EXPR: X,
    TMPLIT_EXPR: k,
    DATA_ATTR: ge,
    ARIA_ATTR: q,
    IS_SCRIPT_OR_DATA: Te,
    ATTR_WHITESPACE: g,
    CUSTOM_ELEMENT: b
  } = $t;
  let {
    IS_ALLOWED_URI: fe
  } = $t, C = null;
  const l = m({}, [...jt, ...st, ...at, ...rt, ...Xt]);
  let f = null;
  const K = m({}, [...Kt, ...lt, ...Qt, ...We]);
  let E = Object.seal(fn(null, {
    tagNameCheck: {
      writable: !0,
      configurable: !1,
      enumerable: !0,
      value: null
    },
    attributeNameCheck: {
      writable: !0,
      configurable: !1,
      enumerable: !0,
      value: null
    },
    allowCustomizedBuiltInElements: {
      writable: !0,
      configurable: !1,
      enumerable: !0,
      value: !1
    }
  })), Ce = null, Ye = null, pt = !0, je = !0, dt = !1, ht = !0, Ee = !1, Xe = !0, de = !1, Ke = !1, Qe = !1, Se = !1, Pe = !1, Ie = !1, gt = !0, Tt = !1;
  const hn = "user-content-";
  let $e = !0, Oe = !1, we = {}, be = null;
  const Et = m({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
  let St = null;
  const wt = m({}, ["audio", "video", "img", "source", "image", "track"]);
  let et = null;
  const bt = m({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Ue = "http://www.w3.org/1998/Math/MathML", ze = "http://www.w3.org/2000/svg", se = "http://www.w3.org/1999/xhtml";
  let ye = se, tt = !1, nt = null;
  const gn = m({}, [Ue, ze, se], ot);
  let xe = null;
  const Tn = ["application/xhtml+xml", "text/html"], En = "text/html";
  let N = null, Ae = null;
  const Sn = i.createElement("form"), yt = function(e) {
    return e instanceof RegExp || e instanceof Function;
  }, it = function() {
    let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
    if (!(Ae && Ae === e)) {
      if ((!e || typeof e != "object") && (e = {}), e = he(e), xe = // eslint-disable-next-line unicorn/prefer-includes
      Tn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? En : e.PARSER_MEDIA_TYPE, N = xe === "application/xhtml+xml" ? ot : Ge, C = Q(e, "ALLOWED_TAGS") ? m({}, e.ALLOWED_TAGS, N) : l, f = Q(e, "ALLOWED_ATTR") ? m({}, e.ALLOWED_ATTR, N) : K, nt = Q(e, "ALLOWED_NAMESPACES") ? m({}, e.ALLOWED_NAMESPACES, ot) : gn, et = Q(e, "ADD_URI_SAFE_ATTR") ? m(
        he(bt),
        // eslint-disable-line indent
        e.ADD_URI_SAFE_ATTR,
        // eslint-disable-line indent
        N
        // eslint-disable-line indent
      ) : bt, St = Q(e, "ADD_DATA_URI_TAGS") ? m(
        he(wt),
        // eslint-disable-line indent
        e.ADD_DATA_URI_TAGS,
        // eslint-disable-line indent
        N
        // eslint-disable-line indent
      ) : wt, be = Q(e, "FORBID_CONTENTS") ? m({}, e.FORBID_CONTENTS, N) : Et, Ce = Q(e, "FORBID_TAGS") ? m({}, e.FORBID_TAGS, N) : {}, Ye = Q(e, "FORBID_ATTR") ? m({}, e.FORBID_ATTR, N) : {}, we = Q(e, "USE_PROFILES") ? e.USE_PROFILES : !1, pt = e.ALLOW_ARIA_ATTR !== !1, je = e.ALLOW_DATA_ATTR !== !1, dt = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ht = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ee = e.SAFE_FOR_TEMPLATES || !1, Xe = e.SAFE_FOR_XML !== !1, de = e.WHOLE_DOCUMENT || !1, Se = e.RETURN_DOM || !1, Pe = e.RETURN_DOM_FRAGMENT || !1, Ie = e.RETURN_TRUSTED_TYPE || !1, Qe = e.FORCE_BODY || !1, gt = e.SANITIZE_DOM !== !1, Tt = e.SANITIZE_NAMED_PROPS || !1, $e = e.KEEP_CONTENT !== !1, Oe = e.IN_PLACE || !1, fe = e.ALLOWED_URI_REGEXP || mn, ye = e.NAMESPACE || se, E = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && yt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (E.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && yt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (E.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (E.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Ee && (je = !1), Pe && (Se = !0), we && (C = m({}, Xt), f = [], we.html === !0 && (m(C, jt), m(f, Kt)), we.svg === !0 && (m(C, st), m(f, lt), m(f, We)), we.svgFilters === !0 && (m(C, at), m(f, lt), m(f, We)), we.mathMl === !0 && (m(C, rt), m(f, Qt), m(f, We))), e.ADD_TAGS && (C === l && (C = he(C)), m(C, e.ADD_TAGS, N)), e.ADD_ATTR && (f === K && (f = he(f)), m(f, e.ADD_ATTR, N)), e.ADD_URI_SAFE_ATTR && m(et, e.ADD_URI_SAFE_ATTR, N), e.FORBID_CONTENTS && (be === Et && (be = he(be)), m(be, e.FORBID_CONTENTS, N)), $e && (C["#text"] = !0), de && m(C, ["html", "head", "body"]), C.table && (m(C, ["tbody"]), delete Ce.tbody), e.TRUSTED_TYPES_POLICY) {
        if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
          throw ke('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
        if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
          throw ke('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
        S = e.TRUSTED_TYPES_POLICY, F = S.createHTML("");
      } else
        S === void 0 && (S = ii(J, a)), S !== null && typeof F == "string" && (F = S.createHTML(""));
      W && W(e), Ae = e;
    }
  }, At = m({}, ["mi", "mo", "mn", "ms", "mtext"]), Ct = m({}, ["foreignobject", "annotation-xml"]), wn = m({}, ["title", "style", "font", "a", "script"]), Ot = m({}, [...st, ...at, ...Vn]), xt = m({}, [...rt, ...qn]), bn = function(e) {
    let s = h(e);
    (!s || !s.tagName) && (s = {
      namespaceURI: ye,
      tagName: "template"
    });
    const c = Ge(e.tagName), T = Ge(s.tagName);
    return nt[e.namespaceURI] ? e.namespaceURI === ze ? s.namespaceURI === se ? c === "svg" : s.namespaceURI === Ue ? c === "svg" && (T === "annotation-xml" || At[T]) : !!Ot[c] : e.namespaceURI === Ue ? s.namespaceURI === se ? c === "math" : s.namespaceURI === ze ? c === "math" && Ct[T] : !!xt[c] : e.namespaceURI === se ? s.namespaceURI === ze && !Ct[T] || s.namespaceURI === Ue && !At[T] ? !1 : !xt[c] && (wn[c] || !Ot[c]) : !!(xe === "application/xhtml+xml" && nt[e.namespaceURI]) : !1;
  }, te = function(e) {
    Ne(t.removed, {
      element: e
    });
    try {
      h(e).removeChild(e);
    } catch (s) {
      M(e);
    }
  }, He = function(e, s) {
    try {
      Ne(t.removed, {
        attribute: s.getAttributeNode(e),
        from: s
      });
    } catch (c) {
      Ne(t.removed, {
        attribute: null,
        from: s
      });
    }
    if (s.removeAttribute(e), e === "is" && !f[e])
      if (Se || Pe)
        try {
          te(s);
        } catch (c) {
        }
      else
        try {
          s.setAttribute(e, "");
        } catch (c) {
        }
  }, Rt = function(e) {
    let s = null, c = null;
    if (Qe)
      e = "<remove></remove>" + e;
    else {
      const v = Yt(e, /^[\r\n\t ]+/);
      c = v && v[0];
    }
    xe === "application/xhtml+xml" && ye === se && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
    const T = S ? S.createHTML(e) : e;
    if (ye === se)
      try {
        s = new ie().parseFromString(T, xe);
      } catch (v) {
      }
    if (!s || !s.documentElement) {
      s = G.createDocument(ye, "template", null);
      try {
        s.documentElement.innerHTML = tt ? F : T;
      } catch (v) {
      }
    }
    const U = s.body || s.documentElement;
    return e && c && U.insertBefore(i.createTextNode(c), U.childNodes[0] || null), ye === se ? $.call(s, de ? "html" : "body")[0] : de ? s.documentElement : U;
  }, Nt = function(e) {
    return V.call(
      e.ownerDocument || e,
      e,
      // eslint-disable-next-line no-bitwise
      y.SHOW_ELEMENT | y.SHOW_COMMENT | y.SHOW_TEXT | y.SHOW_PROCESSING_INSTRUCTION | y.SHOW_CDATA_SECTION,
      null
    );
  }, Mt = function(e) {
    return e instanceof pe && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof P) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
  }, kt = function(e) {
    return typeof D == "function" && e instanceof D;
  }, ae = function(e, s, c) {
    w[e] && Ze(w[e], (T) => {
      T.call(t, s, c, Ae);
    });
  }, vt = function(e) {
    let s = null;
    if (ae("beforeSanitizeElements", e, null), Mt(e))
      return te(e), !0;
    const c = N(e.nodeName);
    if (ae("uponSanitizeElement", e, {
      tagName: c,
      allowedTags: C
    }), e.hasChildNodes() && !kt(e.firstElementChild) && H(/<[/\w]/g, e.innerHTML) && H(/<[/\w]/g, e.textContent) || e.nodeType === De.progressingInstruction || Xe && e.nodeType === De.comment && H(/<[/\w]/g, e.data))
      return te(e), !0;
    if (!C[c] || Ce[c]) {
      if (!Ce[c] && Lt(c) && (E.tagNameCheck instanceof RegExp && H(E.tagNameCheck, c) || E.tagNameCheck instanceof Function && E.tagNameCheck(c)))
        return !1;
      if ($e && !be[c]) {
        const T = h(e) || e.parentNode, U = A(e) || e.childNodes;
        if (U && T) {
          const v = U.length;
          for (let B = v - 1; B >= 0; --B) {
            const ne = R(U[B], !0);
            ne.__removalCount = (e.__removalCount || 0) + 1, T.insertBefore(ne, ue(e));
          }
        }
      }
      return te(e), !0;
    }
    return e instanceof L && !bn(e) || (c === "noscript" || c === "noembed" || c === "noframes") && H(/<\/no(script|embed|frames)/i, e.innerHTML) ? (te(e), !0) : (Ee && e.nodeType === De.text && (s = e.textContent, Ze([ee, X, k], (T) => {
      s = Me(s, T, " ");
    }), e.textContent !== s && (Ne(t.removed, {
      element: e.cloneNode()
    }), e.textContent = s)), ae("afterSanitizeElements", e, null), !1);
  }, Dt = function(e, s, c) {
    if (gt && (s === "id" || s === "name") && (c in i || c in Sn))
      return !1;
    if (!(je && !Ye[s] && H(ge, s))) {
      if (!(pt && H(q, s))) {
        if (!f[s] || Ye[s]) {
          if (
            // First condition does a very basic check if a) it's basically a valid custom element tagname AND
            // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
            // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
            !(Lt(e) && (E.tagNameCheck instanceof RegExp && H(E.tagNameCheck, e) || E.tagNameCheck instanceof Function && E.tagNameCheck(e)) && (E.attributeNameCheck instanceof RegExp && H(E.attributeNameCheck, s) || E.attributeNameCheck instanceof Function && E.attributeNameCheck(s)) || // Alternative, second condition checks if it's an `is`-attribute, AND
            // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
            s === "is" && E.allowCustomizedBuiltInElements && (E.tagNameCheck instanceof RegExp && H(E.tagNameCheck, c) || E.tagNameCheck instanceof Function && E.tagNameCheck(c)))
          ) return !1;
        } else if (!et[s]) {
          if (!H(fe, Me(c, g, ""))) {
            if (!((s === "src" || s === "xlink:href" || s === "href") && e !== "script" && Bn(c, "data:") === 0 && St[e])) {
              if (!(dt && !H(Te, Me(c, g, "")))) {
                if (c)
                  return !1;
              }
            }
          }
        }
      }
    }
    return !0;
  }, Lt = function(e) {
    return e !== "annotation-xml" && Yt(e, b);
  }, Pt = function(e) {
    ae("beforeSanitizeAttributes", e, null);
    const {
      attributes: s
    } = e;
    if (!s)
      return;
    const c = {
      attrName: "",
      attrValue: "",
      keepAttr: !0,
      allowedAttributes: f
    };
    let T = s.length;
    for (; T--; ) {
      const U = s[T], {
        name: v,
        namespaceURI: B,
        value: ne
      } = U, Re = N(v);
      let z = v === "value" ? ne : _n(ne);
      if (c.attrName = Re, c.attrValue = z, c.keepAttr = !0, c.forceKeepAttr = void 0, ae("uponSanitizeAttribute", e, c), z = c.attrValue, Xe && H(/((--!?|])>)|<\/(style|title)/i, z)) {
        He(v, e);
        continue;
      }
      if (c.forceKeepAttr || (He(v, e), !c.keepAttr))
        continue;
      if (!ht && H(/\/>/i, z)) {
        He(v, e);
        continue;
      }
      Ee && Ze([ee, X, k], (Ut) => {
        z = Me(z, Ut, " ");
      });
      const It = N(e.nodeName);
      if (Dt(It, Re, z)) {
        if (Tt && (Re === "id" || Re === "name") && (He(v, e), z = hn + z), S && typeof J == "object" && typeof J.getAttributeType == "function" && !B)
          switch (J.getAttributeType(It, Re)) {
            case "TrustedHTML": {
              z = S.createHTML(z);
              break;
            }
            case "TrustedScriptURL": {
              z = S.createScriptURL(z);
              break;
            }
          }
        try {
          B ? e.setAttributeNS(B, v, z) : e.setAttribute(v, z), Mt(e) ? te(e) : qt(t.removed);
        } catch (Ut) {
        }
      }
    }
    ae("afterSanitizeAttributes", e, null);
  }, yn = function u(e) {
    let s = null;
    const c = Nt(e);
    for (ae("beforeSanitizeShadowDOM", e, null); s = c.nextNode(); )
      ae("uponSanitizeShadowNode", s, null), !vt(s) && (s.content instanceof r && u(s.content), Pt(s));
    ae("afterSanitizeShadowDOM", e, null);
  };
  return t.sanitize = function(u) {
    let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = null, c = null, T = null, U = null;
    if (tt = !u, tt && (u = "<!-->"), typeof u != "string" && !kt(u))
      if (typeof u.toString == "function") {
        if (u = u.toString(), typeof u != "string")
          throw ke("dirty is not a string, aborting");
      } else
        throw ke("toString is not a function");
    if (!t.isSupported)
      return u;
    if (Ke || it(e), t.removed = [], typeof u == "string" && (Oe = !1), Oe) {
      if (u.nodeName) {
        const ne = N(u.nodeName);
        if (!C[ne] || Ce[ne])
          throw ke("root node is forbidden and cannot be sanitized in-place");
      }
    } else if (u instanceof D)
      s = Rt("<!---->"), c = s.ownerDocument.importNode(u, !0), c.nodeType === De.element && c.nodeName === "BODY" || c.nodeName === "HTML" ? s = c : s.appendChild(c);
    else {
      if (!Se && !Ee && !de && // eslint-disable-next-line unicorn/prefer-includes
      u.indexOf("<") === -1)
        return S && Ie ? S.createHTML(u) : u;
      if (s = Rt(u), !s)
        return Se ? null : Ie ? F : "";
    }
    s && Qe && te(s.firstChild);
    const v = Nt(Oe ? u : s);
    for (; T = v.nextNode(); )
      vt(T) || (T.content instanceof r && yn(T.content), Pt(T));
    if (Oe)
      return u;
    if (Se) {
      if (Pe)
        for (U = I.call(s.ownerDocument); s.firstChild; )
          U.appendChild(s.firstChild);
      else
        U = s;
      return (f.shadowroot || f.shadowrootmode) && (U = oe.call(o, U, !0)), U;
    }
    let B = de ? s.outerHTML : s.innerHTML;
    return de && C["!doctype"] && s.ownerDocument && s.ownerDocument.doctype && s.ownerDocument.doctype.name && H(pn, s.ownerDocument.doctype.name) && (B = "<!DOCTYPE " + s.ownerDocument.doctype.name + `>
` + B), Ee && Ze([ee, X, k], (ne) => {
      B = Me(B, ne, " ");
    }), S && Ie ? S.createHTML(B) : B;
  }, t.setConfig = function() {
    let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
    it(u), Ke = !0;
  }, t.clearConfig = function() {
    Ae = null, Ke = !1;
  }, t.isValidAttribute = function(u, e, s) {
    Ae || it({});
    const c = N(u), T = N(e);
    return Dt(c, T, s);
  }, t.addHook = function(u, e) {
    typeof e == "function" && (w[u] = w[u] || [], Ne(w[u], e));
  }, t.removeHook = function(u) {
    if (w[u])
      return qt(w[u]);
  }, t.removeHooks = function(u) {
    w[u] && (w[u] = []);
  }, t.removeAllHooks = function() {
    w = {};
  }, t;
}
var en = dn();
const oi = "data:image/png;base64, ";
function si(n) {
  xn(n, "svelte-h8zhj8", "*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}@keyframes loading-spinner{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.CashierSessionExpirationModalWindow{display:flex;position:absolute;align-items:center;justify-content:center;width:100%;height:100%;z-index:5;top:0;left:0;background-color:var(--mmw--color-black-transparency-20, rgba(0, 0, 0, 0.2));container-type:inline-size;container-name:session-expiration-modal-window}.CashierSessionExpirationModalWrapper{background:var(--emw--color-white, #fff);border-radius:var(--emw--border-radius-medium, 4px);width:400px}.CashierSessionExpirationModalHeader{display:flex;align-items:center;position:relative;height:var(--mmw--header-height, 40px);background-color:var(--mmw--color-grey-10, rgba(17, 17, 17, 0.0666666667));width:100%;border-radius:var(--emw--border-radius-medium, 4px) var(--emw--border-radius-medium, 4px) 0 0}.CashierSessionExpirationModalHeaderTitle{display:flex;text-align:center;color:var(--mmw--color-grey-10, #111);font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-semibold, 500);margin:auto;max-width:calc(100% - 150px);overflow:hidden;text-overflow:ellipsis;line-height:calc(var(--emw--font-size-medium, 16px) + 2px)}.CashierSessionExpirationModalContainer{padding:var(--emw--spacing-large, 20px)}.CashierSessionExpirationModalCloseBtn{position:absolute;display:flex;align-items:center;justify-content:center;top:10px;right:10px;padding:var(--emw--spacing-small-minus, 10px);border-radius:50%;color:var(--emw--color-white, #fff);background:var(--mmw--color-gray-transparency-85, rgba(255, 255, 255, 0.85));cursor:pointer;transition:all 150ms ease-in-out}.CashierSessionExpirationModalCloseBtn svg{width:32px;height:32px}.CashierSessionExpirationModalCloseBtn:hover{background:var(--emw--color-gray-transparency-20, rgba(255, 255, 255, 0.2))}.CashierSessionExpiration{width:100%;display:flex;flex-direction:column;align-items:center;gap:var(--emw--spacing-large, 20px)}.CashierSessionExpirationTitle{color:var(--emw--color-black, #000);font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-small, 14px);line-height:120%;text-align:center}.CashierSessionExpirationText{color:var(--mmw--color-grey-290, #666);font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-small, 14px);line-height:120%;text-align:center}.CashierSessionExpirationButton{display:flex;width:100%;height:36px;flex-direction:column;justify-content:center;align-items:center;flex-shrink:0;color:var(--emw--color-white, #FFF);cursor:pointer;text-align:center;font-style:normal;font-weight:var(--emw--font-weight-semibold, 500);line-height:36px;border-radius:var(--emw--border-radius-medium, 4px);background:var(--emw--color-primary, #7EC51E);border:none}.CashierSessionExpirationButton:hover{background:var(--mmw--color-main-button-hover, #71B11B)}.CashierSessionExpirationButton:active{background:var(--mmw--color-main-button-active, #5C950F)}.CashierSessionExpirationButton:disabled{background:var(--mmw--color-main-button-disabled, #5C950F)}.CashierSessionExpirationButtonText{font-size:var(--emw--font-size-medium, 16px);font-family:inherit}.CashierSessionExpirationButtonSpinner{animation:loading-spinner 1s linear infinite}@container session-expiration-modal-window (max-width:750px){.CashierSessionExpirationModalWindow .CashierSessionExpirationModalWrapper{width:90%;max-width:400px}}");
}
const ai = (n) => ({}), tn = (n) => ({}), ri = (n) => ({}), nn = (n) => ({}), li = (n) => ({}), on = (n) => ({}), ci = (n) => ({}), sn = (n) => ({ class: "CashierSessionExpirationIcon" });
function an(n) {
  let t, i, o, a, r, p = (
    /*$_*/
    n[8]("sessionExpirationHeader") + ""
  ), D, L, y, P, pe, ie, J, O, R, M, ue, A, h, S, F;
  const G = (
    /*#slots*/
    n[20].icon
  ), V = Fe(
    G,
    n,
    /*$$scope*/
    n[19],
    sn
  ), I = V || mi(n), $ = (
    /*#slots*/
    n[20].title
  ), oe = Fe(
    $,
    n,
    /*$$scope*/
    n[19],
    on
  ), w = oe || pi(n), ee = (
    /*#slots*/
    n[20].text
  ), X = Fe(
    ee,
    n,
    /*$$scope*/
    n[19],
    nn
  ), k = X || di(n), ge = [gi, hi], q = [];
  function Te(g, b) {
    return (
      /*showLoaderButton*/
      g[6] ? 0 : 1
    );
  }
  return R = Te(n), M = q[R] = ge[R](n), {
    c() {
      t = Z("div"), i = Z("div"), o = Z("div"), a = Z("div"), r = Z("div"), D = qe(p), L = Le(), y = Z("div"), P = Z("div"), I && I.c(), pe = Le(), w && w.c(), ie = Le(), k && k.c(), J = Le(), O = Z("button"), M.c(), d(r, "class", "CashierSessionExpirationModalHeaderTitle"), d(a, "class", "CashierSessionExpirationModalHeader"), d(O, "type", "button"), O.disabled = /*showLoaderButton*/
      n[6], d(O, "class", "CashierSessionExpirationButton"), d(P, "class", "CashierSessionExpiration"), d(y, "class", "CashierSessionExpirationModalContainer"), d(y, "part", "CashierSessionExpirationModalContainer"), d(o, "class", "CashierSessionExpirationModalWrapper"), d(o, "part", "CashierSessionExpirationModalWrapper"), d(i, "class", "CashierSessionExpirationModalWindow"), d(i, "part", "CashierSessionExpirationModalWindow"), d(i, "id", "CashierSessionExpirationModal"), Ht(() => (
        /*div5_elementresize_handler*/
        n[22].call(i)
      )), d(t, "part", "CustomStylingContainer");
    },
    m(g, b) {
      ce(g, t, b), x(t, i), x(i, o), x(o, a), x(a, r), x(r, D), x(o, L), x(o, y), x(y, P), I && I.m(P, null), x(P, pe), w && w.m(P, null), x(P, ie), k && k.m(P, null), x(P, J), x(P, O), q[R].m(O, null), n[21](P), ue = vn(
        i,
        /*div5_elementresize_handler*/
        n[22].bind(i)
      ), n[23](t), h = !0, S || (F = [
        Zt(
          O,
          "click",
          /*renewSession*/
          n[9]
        ),
        Zt(
          i,
          "click",
          /*outOfModalClick*/
          n[10]
        )
      ], S = !0);
    },
    p(g, b) {
      n = g, (!h || b[0] & /*$_*/
      256) && p !== (p = /*$_*/
      n[8]("sessionExpirationHeader") + "") && Ve(D, p), V ? V.p && (!h || b[0] & /*$$scope*/
      524288) && Be(
        V,
        G,
        n,
        /*$$scope*/
        n[19],
        h ? Je(
          G,
          /*$$scope*/
          n[19],
          b,
          ci
        ) : _e(
          /*$$scope*/
          n[19]
        ),
        sn
      ) : I && I.p && (!h || b[0] & /*assetsurl*/
      8) && I.p(n, h ? b : [-1, -1]), oe ? oe.p && (!h || b[0] & /*$$scope*/
      524288) && Be(
        oe,
        $,
        n,
        /*$$scope*/
        n[19],
        h ? Je(
          $,
          /*$$scope*/
          n[19],
          b,
          li
        ) : _e(
          /*$$scope*/
          n[19]
        ),
        on
      ) : w && w.p && (!h || b[0] & /*$_*/
      256) && w.p(n, h ? b : [-1, -1]), X ? X.p && (!h || b[0] & /*$$scope*/
      524288) && Be(
        X,
        ee,
        n,
        /*$$scope*/
        n[19],
        h ? Je(
          ee,
          /*$$scope*/
          n[19],
          b,
          ri
        ) : _e(
          /*$$scope*/
          n[19]
        ),
        nn
      ) : k && k.p && (!h || b[0] & /*$_, timeLeft*/
      384) && k.p(n, h ? b : [-1, -1]);
      let fe = R;
      R = Te(n), R === fe ? q[R].p(n, b) : (rn(), me(q[fe], 1, 1, () => {
        q[fe] = null;
      }), ln(), M = q[R], M ? M.p(n, b) : (M = q[R] = ge[R](n), M.c()), re(M, 1), M.m(O, null)), (!h || b[0] & /*showLoaderButton*/
      64) && (O.disabled = /*showLoaderButton*/
      n[6]);
    },
    i(g) {
      h || (re(I, g), re(w, g), re(k, g), re(M), g && Ht(() => {
        h && (A || (A = zt(i, Bt, { duration: (
          /*duration*/
          n[2]
        ) }, !0)), A.run(1));
      }), h = !0);
    },
    o(g) {
      me(I, g), me(w, g), me(k, g), me(M), g && (A || (A = zt(i, Bt, { duration: (
        /*duration*/
        n[2]
      ) }, !1)), A.run(0)), h = !1;
    },
    d(g) {
      g && le(t), I && I.d(g), w && w.d(g), k && k.d(g), q[R].d(), n[21](null), ue(), g && A && A.end(), n[23](null), S = !1, kn(F);
    }
  };
}
function ui(n) {
  let t, i;
  return {
    c() {
      t = Z("img"), ut(t.src, i = oi) || d(t, "src", i), d(t, "width", "300px"), d(t, "alt", "error");
    },
    m(o, a) {
      ce(o, t, a);
    },
    p: ct,
    d(o) {
      o && le(t);
    }
  };
}
function fi(n) {
  let t, i;
  return {
    c() {
      t = Z("img"), ut(t.src, i = `${/*assetsurl*/
      n[3]}/set-timeout-icon.png`) || d(t, "src", i), d(t, "width", "300px"), d(t, "alt", "error");
    },
    m(o, a) {
      ce(o, t, a);
    },
    p(o, a) {
      a[0] & /*assetsurl*/
      8 && !ut(t.src, i = `${/*assetsurl*/
      o[3]}/set-timeout-icon.png`) && d(t, "src", i);
    },
    d(o) {
      o && le(t);
    }
  };
}
function mi(n) {
  let t;
  function i(r, p) {
    return (
      /*assetsurl*/
      r[3] ? fi : ui
    );
  }
  let o = i(n), a = o(n);
  return {
    c() {
      a.c(), t = cn();
    },
    m(r, p) {
      a.m(r, p), ce(r, t, p);
    },
    p(r, p) {
      o === (o = i(r)) && a ? a.p(r, p) : (a.d(1), a = o(r), a && (a.c(), a.m(t.parentNode, t)));
    },
    d(r) {
      r && le(t), a.d(r);
    }
  };
}
function pi(n) {
  let t, i = (
    /*$_*/
    n[8]("sessionExpirationTitle") + ""
  ), o;
  return {
    c() {
      t = Z("span"), o = qe(i), d(t, "class", "CashierSessionExpirationTitle");
    },
    m(a, r) {
      ce(a, t, r), x(t, o);
    },
    p(a, r) {
      r[0] & /*$_*/
      256 && i !== (i = /*$_*/
      a[8]("sessionExpirationTitle") + "") && Ve(o, i);
    },
    d(a) {
      a && le(t);
    }
  };
}
function di(n) {
  let t, i = en.sanitize(
    /*$_*/
    n[8]("sessionExpirationGeneralText", { values: { second: (
      /*timeLeft*/
      n[7]
    ) } })
  ) + "";
  return {
    c() {
      t = Z("span"), d(t, "class", "CashierSessionExpirationText");
    },
    m(o, a) {
      ce(o, t, a), t.innerHTML = i;
    },
    p(o, a) {
      a[0] & /*$_, timeLeft*/
      384 && i !== (i = en.sanitize(
        /*$_*/
        o[8]("sessionExpirationGeneralText", { values: { second: (
          /*timeLeft*/
          o[7]
        ) } })
      ) + "") && (t.innerHTML = i);
    },
    d(o) {
      o && le(t);
    }
  };
}
function hi(n) {
  let t;
  const i = (
    /*#slots*/
    n[20].button
  ), o = Fe(
    i,
    n,
    /*$$scope*/
    n[19],
    tn
  ), a = o || Ti(n);
  return {
    c() {
      a && a.c();
    },
    m(r, p) {
      a && a.m(r, p), t = !0;
    },
    p(r, p) {
      o ? o.p && (!t || p[0] & /*$$scope*/
      524288) && Be(
        o,
        i,
        r,
        /*$$scope*/
        r[19],
        t ? Je(
          i,
          /*$$scope*/
          r[19],
          p,
          ai
        ) : _e(
          /*$$scope*/
          r[19]
        ),
        tn
      ) : a && a.p && (!t || p[0] & /*$_*/
      256) && a.p(r, t ? p : [-1, -1]);
    },
    i(r) {
      t || (re(a, r), t = !0);
    },
    o(r) {
      me(a, r), t = !1;
    },
    d(r) {
      a && a.d(r);
    }
  };
}
function gi(n) {
  let t, i, o, a, r, p = (
    /*$_*/
    n[8]("sessionExpirationLoadingButton") + ""
  ), D;
  return {
    c() {
      t = Z("div"), i = Ft("svg"), o = Ft("path"), a = Le(), r = Z("span"), D = qe(p), d(o, "d", "M14.0282 6.58425C13.9037 4.05374 12.3688 1.68916 10.0872 0.61058C7.59818 -0.509483 4.56986 -0.0531603 2.49567 1.68916C0.504443 3.34851 -0.408201 6.04496 0.172573 8.57547C0.711862 11.0645 2.6616 13.0972 5.10915 13.7609C8.0545 14.5906 10.7509 13.1802 12.4103 10.7741C10.9169 12.7653 8.63527 14.0928 6.10476 13.6365C3.57424 13.1802 1.50005 11.2719 0.919281 8.78289C0.297024 6.12793 1.54154 3.34851 3.90612 1.97955C6.35366 0.569097 9.79682 1.10839 11.4147 3.51445C11.8295 4.09522 12.1199 4.80045 12.2444 5.50567C12.3688 6.08644 12.3273 6.7087 12.4103 7.28947C12.4933 7.82876 12.9496 8.53399 13.5718 8.16063C14.1111 7.82876 14.0696 7.12354 14.0282 6.58425C14.0696 6.87464 14.0282 6.41831 14.0282 6.58425Z"), d(o, "fill", "white"), d(i, "class", "CashierSessionExpirationButtonSpinner"), d(i, "xmlns", "http://www.w3.org/2000/svg"), d(i, "width", "15"), d(i, "height", "14"), d(i, "viewBox", "0 0 15 14"), d(i, "fill", "none"), d(r, "class", "CashierSessionExpirationButtonText");
    },
    m(L, y) {
      ce(L, t, y), x(t, i), x(i, o), x(t, a), x(t, r), x(r, D);
    },
    p(L, y) {
      y[0] & /*$_*/
      256 && p !== (p = /*$_*/
      L[8]("sessionExpirationLoadingButton") + "") && Ve(D, p);
    },
    i: ct,
    o: ct,
    d(L) {
      L && le(t);
    }
  };
}
function Ti(n) {
  let t, i = (
    /*$_*/
    n[8]("sessionExpirationGeneralButton") + ""
  ), o;
  return {
    c() {
      t = Z("span"), o = qe(i), d(t, "class", "CashierSessionExpirationButtonText");
    },
    m(a, r) {
      ce(a, t, r), x(t, o);
    },
    p(a, r) {
      r[0] & /*$_*/
      256 && i !== (i = /*$_*/
      a[8]("sessionExpirationGeneralButton") + "") && Ve(o, i);
    },
    d(a) {
      a && le(t);
    }
  };
}
function Ei(n) {
  let t, i, o = (
    /*show*/
    n[5] && an(n)
  );
  return {
    c() {
      o && o.c(), t = cn();
    },
    m(a, r) {
      o && o.m(a, r), ce(a, t, r), i = !0;
    },
    p(a, r) {
      /*show*/
      a[5] ? o ? (o.p(a, r), r[0] & /*show*/
      32 && re(o, 1)) : (o = an(a), o.c(), re(o, 1), o.m(t.parentNode, t)) : o && (rn(), me(o, 1, 1, () => {
        o = null;
      }), ln());
    },
    i(a) {
      i || (re(o), i = !0);
    },
    o(a) {
      me(o), i = !1;
    },
    d(a) {
      a && le(t), o && o.d(a);
    }
  };
}
const Si = 90;
function wi(n, t, i) {
  let o;
  Rn(n, Un, (l) => i(8, o = l));
  let { $$slots: a = {}, $$scope: r } = t;
  _t.extend(zn);
  let { clientstyling: p = "" } = t, { clientstylingurl: D = "" } = t, { width: L } = t, { height: y } = t, { duration: P = 200 } = t, { assetsurl: pe = "" } = t, { lang: ie = "en" } = t, { translationurl: J = "" } = t, { endpoint: O } = t, { currency: R } = t, { customerid: M } = t, { selectedpaymentmethodname: ue } = t, A, h = !1, S = !1, F, G, V, I, $;
  const oe = (l) => {
    l.data.type === "StartSessionCountdown" && ($ = l.data.xPaymentSessionToken, I = l.data.paymentMethodName, ee());
  }, w = (l) => {
    try {
      return JSON.parse(atob(l.split(".")[1]));
    } catch (f) {
      return null;
    }
  }, ee = () => {
    i(5, h = !1);
    const l = w($);
    l && (G = l == null ? void 0 : l.exp, i(7, F = G), V && clearInterval(V), V = setInterval(
      () => {
        const f = Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3);
        i(7, F = G - f), F <= Si && i(5, h = !0), f >= G && (i(7, F = 0), i(5, h = !1), clearInterval(V), window.postMessage({ type: "SessionExpired" }, window.location.href));
      },
      1e3
    ));
  }, X = () => {
    if (S) return;
    const l = new URL(`${O}/v1/player/${M}/payment/GetPaymentMethod`), f = new Headers();
    i(6, S = !0), f.append("accept", "application/json"), f.append("Content-Type", "application/json"), f.append("X-Client-Request-Timestamp", _t.utc().format("YYYY-MM-DD HH:mm:ss.SSS"));
    const K = {
      method: "POST",
      mode: "cors",
      headers: f,
      body: JSON.stringify({
        PaymentMethodName: I || ue,
        Currency: R,
        XPaymentSessionToken: $
      })
    };
    fetch(l, K).then((E) => E.json()).then((E) => {
      $ = E.XPaymentSessionToken, ee();
    }).finally(() => i(6, S = !1));
  }, k = (l) => {
    const f = l.currentTarget;
    l.target === f && X();
  }, ge = () => {
    fetch(J).then((f) => f.json()).then((f) => {
      Object.keys(f).forEach((K) => {
        Jt(K, f[K]);
      });
    }).catch((f) => {
      console.log(f);
    });
  };
  Object.keys(Gt).forEach((l) => {
    Jt(l, Gt[l]);
  });
  const q = () => {
    Hn(ie);
  }, Te = () => {
    let l = document.createElement("style");
    l.innerHTML = p, A.appendChild(l);
  }, g = () => {
    let l = new URL(D), f = document.createElement("style");
    fetch(l.href).then((K) => K.text()).then((K) => {
      f.innerHTML = K, setTimeout(
        () => {
          A.appendChild(f);
        },
        1
      );
    });
  };
  Nn(() => (window.addEventListener("message", oe, !1), () => {
    window.removeEventListener("message", oe);
  })), Mn(() => {
    clearInterval(V);
  });
  function b(l) {
    Wt[l ? "unshift" : "push"](() => {
      A = l, i(4, A);
    });
  }
  function fe() {
    L = this.clientWidth, y = this.clientHeight, i(0, L), i(1, y);
  }
  function C(l) {
    Wt[l ? "unshift" : "push"](() => {
      A = l, i(4, A);
    });
  }
  return n.$$set = (l) => {
    "clientstyling" in l && i(11, p = l.clientstyling), "clientstylingurl" in l && i(12, D = l.clientstylingurl), "width" in l && i(0, L = l.width), "height" in l && i(1, y = l.height), "duration" in l && i(2, P = l.duration), "assetsurl" in l && i(3, pe = l.assetsurl), "lang" in l && i(13, ie = l.lang), "translationurl" in l && i(14, J = l.translationurl), "endpoint" in l && i(15, O = l.endpoint), "currency" in l && i(16, R = l.currency), "customerid" in l && i(17, M = l.customerid), "selectedpaymentmethodname" in l && i(18, ue = l.selectedpaymentmethodname), "$$scope" in l && i(19, r = l.$$scope);
  }, n.$$.update = () => {
    n.$$.dirty[0] & /*lang*/
    8192 && ie && q(), n.$$.dirty[0] & /*clientstyling, customStylingContainer*/
    2064 && p && A && Te(), n.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
    4112 && D && A && g(), n.$$.dirty[0] & /*translationurl*/
    16384 && J && ge();
  }, [
    L,
    y,
    P,
    pe,
    A,
    h,
    S,
    F,
    o,
    X,
    k,
    p,
    D,
    ie,
    J,
    O,
    R,
    M,
    ue,
    r,
    a,
    b,
    fe,
    C
  ];
}
class bi extends An {
  constructor(t) {
    super(), Cn(
      this,
      t,
      wi,
      Ei,
      On,
      {
        clientstyling: 11,
        clientstylingurl: 12,
        width: 0,
        height: 1,
        duration: 2,
        assetsurl: 3,
        lang: 13,
        translationurl: 14,
        endpoint: 15,
        currency: 16,
        customerid: 17,
        selectedpaymentmethodname: 18
      },
      si,
      [-1, -1]
    );
  }
  get clientstyling() {
    return this.$$.ctx[11];
  }
  set clientstyling(t) {
    this.$$set({ clientstyling: t }), Y();
  }
  get clientstylingurl() {
    return this.$$.ctx[12];
  }
  set clientstylingurl(t) {
    this.$$set({ clientstylingurl: t }), Y();
  }
  get width() {
    return this.$$.ctx[0];
  }
  set width(t) {
    this.$$set({ width: t }), Y();
  }
  get height() {
    return this.$$.ctx[1];
  }
  set height(t) {
    this.$$set({ height: t }), Y();
  }
  get duration() {
    return this.$$.ctx[2];
  }
  set duration(t) {
    this.$$set({ duration: t }), Y();
  }
  get assetsurl() {
    return this.$$.ctx[3];
  }
  set assetsurl(t) {
    this.$$set({ assetsurl: t }), Y();
  }
  get lang() {
    return this.$$.ctx[13];
  }
  set lang(t) {
    this.$$set({ lang: t }), Y();
  }
  get translationurl() {
    return this.$$.ctx[14];
  }
  set translationurl(t) {
    this.$$set({ translationurl: t }), Y();
  }
  get endpoint() {
    return this.$$.ctx[15];
  }
  set endpoint(t) {
    this.$$set({ endpoint: t }), Y();
  }
  get currency() {
    return this.$$.ctx[16];
  }
  set currency(t) {
    this.$$set({ currency: t }), Y();
  }
  get customerid() {
    return this.$$.ctx[17];
  }
  set customerid(t) {
    this.$$set({ customerid: t }), Y();
  }
  get selectedpaymentmethodname() {
    return this.$$.ctx[18];
  }
  set selectedpaymentmethodname(t) {
    this.$$set({ selectedpaymentmethodname: t }), Y();
  }
}
Dn(bi, { clientstyling: {}, clientstylingurl: {}, width: {}, height: {}, duration: {}, assetsurl: {}, lang: {}, translationurl: {}, endpoint: {}, currency: {}, customerid: {}, selectedpaymentmethodname: {} }, ["icon", "title", "text", "button"], [], !0);
export {
  bi as default
};
