var J = Object.create, B = Object.defineProperty, Z = Object.getOwnPropertyDescriptor, $ = Object.getOwnPropertyNames, tt = Object.getPrototypeOf, et = Object.prototype.hasOwnProperty, U = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), st = (t, e) => {
  for (var n in e) B(t, n, { get: e[n], enumerable: !0 });
}, it = (t, e, n, h) => {
  if (e && typeof e == "object" || typeof e == "function") for (let d of $(e)) !et.call(t, d) && d !== n && B(t, d, { get: () => e[d], enumerable: !(h = Z(e, d)) || h.enumerable });
  return t;
}, rt = (t, e, n) => (n = t != null ? J(tt(t)) : {}, it(!t || !t.__esModule ? B(n, "default", { value: t, enumerable: !0 }) : n, t)), nt = {};
st(nt, { default: () => at });
var at, ot = U((t, e) => {
  var n = function() {
    function h(u, E) {
      return E != null && u instanceof E;
    }
    var d;
    try {
      d = Map;
    } catch {
      d = function() {
      };
    }
    var c;
    try {
      c = Set;
    } catch {
      c = function() {
      };
    }
    var O;
    try {
      O = Promise;
    } catch {
      O = function() {
      };
    }
    function r(u, E, y, v, S) {
      typeof E == "object" && (y = E.depth, v = E.prototype, S = E.includeNonEnumerable, E = E.circular);
      var N = [], D = [], V = typeof Buffer < "u";
      typeof E > "u" && (E = !0), typeof y > "u" && (y = 1 / 0);
      function C(s, o) {
        if (s === null) return null;
        if (o === 0) return s;
        var a, p;
        if (typeof s != "object") return s;
        if (h(s, d)) a = new d();
        else if (h(s, c)) a = new c();
        else if (h(s, O)) a = new O(function(M, G) {
          s.then(function(w) {
            M(C(w, o - 1));
          }, function(w) {
            G(C(w, o - 1));
          });
        });
        else if (r.__isArray(s)) a = [];
        else if (r.__isRegExp(s)) a = new RegExp(s.source, f(s)), s.lastIndex && (a.lastIndex = s.lastIndex);
        else if (r.__isDate(s)) a = new Date(s.getTime());
        else {
          if (V && Buffer.isBuffer(s)) return Buffer.allocUnsafe ? a = Buffer.allocUnsafe(s.length) : a = new Buffer(s.length), s.copy(a), a;
          h(s, Error) ? a = Object.create(s) : typeof v > "u" ? (p = Object.getPrototypeOf(s), a = Object.create(p)) : (a = Object.create(v), p = v);
        }
        if (E) {
          var R = N.indexOf(s);
          if (R != -1) return D[R];
          N.push(s), D.push(a);
        }
        h(s, d) && s.forEach(function(M, G) {
          var w = C(G, o - 1), H = C(M, o - 1);
          a.set(w, H);
        }), h(s, c) && s.forEach(function(M) {
          var G = C(M, o - 1);
          a.add(G);
        });
        for (var T in s) {
          var I;
          p && (I = Object.getOwnPropertyDescriptor(p, T)), !(I && I.set == null) && (a[T] = C(s[T], o - 1));
        }
        if (Object.getOwnPropertySymbols) for (var L = Object.getOwnPropertySymbols(s), T = 0; T < L.length; T++) {
          var P = L[T], b = Object.getOwnPropertyDescriptor(s, P);
          b && !b.enumerable && !S || (a[P] = C(s[P], o - 1), b.enumerable || Object.defineProperty(a, P, { enumerable: !1 }));
        }
        if (S) for (var x = Object.getOwnPropertyNames(s), T = 0; T < x.length; T++) {
          var F = x[T], b = Object.getOwnPropertyDescriptor(s, F);
          b && b.enumerable || (a[F] = C(s[F], o - 1), Object.defineProperty(a, F, { enumerable: !1 }));
        }
        return a;
      }
      return C(u, y);
    }
    r.clonePrototype = function(u) {
      if (u === null) return null;
      var E = function() {
      };
      return E.prototype = u, new E();
    };
    function A(u) {
      return Object.prototype.toString.call(u);
    }
    r.__objToStr = A;
    function i(u) {
      return typeof u == "object" && A(u) === "[object Date]";
    }
    r.__isDate = i;
    function l(u) {
      return typeof u == "object" && A(u) === "[object Array]";
    }
    r.__isArray = l;
    function _(u) {
      return typeof u == "object" && A(u) === "[object RegExp]";
    }
    r.__isRegExp = _;
    function f(u) {
      var E = "";
      return u.global && (E += "g"), u.ignoreCase && (E += "i"), u.multiline && (E += "m"), E;
    }
    return r.__getRegExpFlags = f, r;
  }();
  typeof e == "object" && e.exports && (e.exports = n);
}), lt = U((t, e) => {
  var n = typeof Reflect == "object" ? Reflect : null, h = n && typeof n.apply == "function" ? n.apply : function(s, o, a) {
    return Function.prototype.apply.call(s, o, a);
  }, d;
  n && typeof n.ownKeys == "function" ? d = n.ownKeys : Object.getOwnPropertySymbols ? d = function(s) {
    return Object.getOwnPropertyNames(s).concat(Object.getOwnPropertySymbols(s));
  } : d = function(s) {
    return Object.getOwnPropertyNames(s);
  };
  function c(s) {
    console && console.warn && console.warn(s);
  }
  var O = Number.isNaN || function(s) {
    return s !== s;
  };
  function r() {
    r.init.call(this);
  }
  e.exports = r, e.exports.once = D, r.EventEmitter = r, r.prototype._events = void 0, r.prototype._eventsCount = 0, r.prototype._maxListeners = void 0;
  var A = 10;
  function i(s) {
    if (typeof s != "function") throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof s);
  }
  Object.defineProperty(r, "defaultMaxListeners", { enumerable: !0, get: function() {
    return A;
  }, set: function(s) {
    if (typeof s != "number" || s < 0 || O(s)) throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + s + ".");
    A = s;
  } }), r.init = function() {
    (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
  }, r.prototype.setMaxListeners = function(s) {
    if (typeof s != "number" || s < 0 || O(s)) throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + s + ".");
    return this._maxListeners = s, this;
  };
  function l(s) {
    return s._maxListeners === void 0 ? r.defaultMaxListeners : s._maxListeners;
  }
  r.prototype.getMaxListeners = function() {
    return l(this);
  }, r.prototype.emit = function(s) {
    for (var o = [], a = 1; a < arguments.length; a++) o.push(arguments[a]);
    var p = s === "error", R = this._events;
    if (R !== void 0) p = p && R.error === void 0;
    else if (!p) return !1;
    if (p) {
      var T;
      if (o.length > 0 && (T = o[0]), T instanceof Error) throw T;
      var I = new Error("Unhandled error." + (T ? " (" + T.message + ")" : ""));
      throw I.context = T, I;
    }
    var L = R[s];
    if (L === void 0) return !1;
    if (typeof L == "function") h(L, this, o);
    else for (var P = L.length, b = v(L, P), a = 0; a < P; ++a) h(b[a], this, o);
    return !0;
  };
  function _(s, o, a, p) {
    var R, T, I;
    if (i(a), T = s._events, T === void 0 ? (T = s._events = /* @__PURE__ */ Object.create(null), s._eventsCount = 0) : (T.newListener !== void 0 && (s.emit("newListener", o, a.listener ? a.listener : a), T = s._events), I = T[o]), I === void 0) I = T[o] = a, ++s._eventsCount;
    else if (typeof I == "function" ? I = T[o] = p ? [a, I] : [I, a] : p ? I.unshift(a) : I.push(a), R = l(s), R > 0 && I.length > R && !I.warned) {
      I.warned = !0;
      var L = new Error("Possible EventEmitter memory leak detected. " + I.length + " " + String(o) + " listeners added. Use emitter.setMaxListeners() to increase limit");
      L.name = "MaxListenersExceededWarning", L.emitter = s, L.type = o, L.count = I.length, c(L);
    }
    return s;
  }
  r.prototype.addListener = function(s, o) {
    return _(this, s, o, !1);
  }, r.prototype.on = r.prototype.addListener, r.prototype.prependListener = function(s, o) {
    return _(this, s, o, !0);
  };
  function f() {
    if (!this.fired) return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
  }
  function u(s, o, a) {
    var p = { fired: !1, wrapFn: void 0, target: s, type: o, listener: a }, R = f.bind(p);
    return R.listener = a, p.wrapFn = R, R;
  }
  r.prototype.once = function(s, o) {
    return i(o), this.on(s, u(this, s, o)), this;
  }, r.prototype.prependOnceListener = function(s, o) {
    return i(o), this.prependListener(s, u(this, s, o)), this;
  }, r.prototype.removeListener = function(s, o) {
    var a, p, R, T, I;
    if (i(o), p = this._events, p === void 0) return this;
    if (a = p[s], a === void 0) return this;
    if (a === o || a.listener === o) --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete p[s], p.removeListener && this.emit("removeListener", s, a.listener || o));
    else if (typeof a != "function") {
      for (R = -1, T = a.length - 1; T >= 0; T--) if (a[T] === o || a[T].listener === o) {
        I = a[T].listener, R = T;
        break;
      }
      if (R < 0) return this;
      R === 0 ? a.shift() : S(a, R), a.length === 1 && (p[s] = a[0]), p.removeListener !== void 0 && this.emit("removeListener", s, I || o);
    }
    return this;
  }, r.prototype.off = r.prototype.removeListener, r.prototype.removeAllListeners = function(s) {
    var o, a, p;
    if (a = this._events, a === void 0) return this;
    if (a.removeListener === void 0) return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : a[s] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete a[s]), this;
    if (arguments.length === 0) {
      var R = Object.keys(a), T;
      for (p = 0; p < R.length; ++p) T = R[p], T !== "removeListener" && this.removeAllListeners(T);
      return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
    }
    if (o = a[s], typeof o == "function") this.removeListener(s, o);
    else if (o !== void 0) for (p = o.length - 1; p >= 0; p--) this.removeListener(s, o[p]);
    return this;
  };
  function E(s, o, a) {
    var p = s._events;
    if (p === void 0) return [];
    var R = p[o];
    return R === void 0 ? [] : typeof R == "function" ? a ? [R.listener || R] : [R] : a ? N(R) : v(R, R.length);
  }
  r.prototype.listeners = function(s) {
    return E(this, s, !0);
  }, r.prototype.rawListeners = function(s) {
    return E(this, s, !1);
  }, r.listenerCount = function(s, o) {
    return typeof s.listenerCount == "function" ? s.listenerCount(o) : y.call(s, o);
  }, r.prototype.listenerCount = y;
  function y(s) {
    var o = this._events;
    if (o !== void 0) {
      var a = o[s];
      if (typeof a == "function") return 1;
      if (a !== void 0) return a.length;
    }
    return 0;
  }
  r.prototype.eventNames = function() {
    return this._eventsCount > 0 ? d(this._events) : [];
  };
  function v(s, o) {
    for (var a = new Array(o), p = 0; p < o; ++p) a[p] = s[p];
    return a;
  }
  function S(s, o) {
    for (; o + 1 < s.length; o++) s[o] = s[o + 1];
    s.pop();
  }
  function N(s) {
    for (var o = new Array(s.length), a = 0; a < o.length; ++a) o[a] = s[a].listener || s[a];
    return o;
  }
  function D(s, o) {
    return new Promise(function(a, p) {
      function R(I) {
        s.removeListener(o, T), p(I);
      }
      function T() {
        typeof s.removeListener == "function" && s.removeListener("error", R), a([].slice.call(arguments));
      }
      C(s, o, T, { once: !0 }), o !== "error" && V(s, R, { once: !0 });
    });
  }
  function V(s, o, a) {
    typeof s.on == "function" && C(s, "error", o, a);
  }
  function C(s, o, a, p) {
    if (typeof s.on == "function") p.once ? s.once(o, a) : s.on(o, a);
    else if (typeof s.addEventListener == "function") s.addEventListener(o, function R(T) {
      p.once && s.removeEventListener(o, R), a(T);
    });
    else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof s);
  }
}), ht = U((t, e) => {
  (function() {
    var n, h, d = [].splice, c = function(r, A) {
      if (!(r instanceof A)) throw new Error("Bound instance method accessed before binding");
    }, O = [].indexOf;
    h = ot(), n = lt().EventEmitter, e.exports = (function() {
      class r extends n {
        constructor(i = {}) {
          super(), this.get = this.get.bind(this), this.mget = this.mget.bind(this), this.set = this.set.bind(this), this.mset = this.mset.bind(this), this.del = this.del.bind(this), this.take = this.take.bind(this), this.ttl = this.ttl.bind(this), this.getTtl = this.getTtl.bind(this), this.keys = this.keys.bind(this), this.has = this.has.bind(this), this.getStats = this.getStats.bind(this), this.flushAll = this.flushAll.bind(this), this.flushStats = this.flushStats.bind(this), this.close = this.close.bind(this), this._checkData = this._checkData.bind(this), this._check = this._check.bind(this), this._isInvalidKey = this._isInvalidKey.bind(this), this._wrap = this._wrap.bind(this), this._getValLength = this._getValLength.bind(this), this._error = this._error.bind(this), this._initErrors = this._initErrors.bind(this), this.options = i, this._initErrors(), this.data = {}, this.options = Object.assign({ forceString: !1, objectValueSize: 80, promiseValueSize: 80, arrayValueSize: 40, stdTTL: 0, checkperiod: 600, useClones: !0, deleteOnExpire: !0, enableLegacyCallbacks: !1, maxKeys: -1 }, this.options), this.options.enableLegacyCallbacks && (console.warn("WARNING! node-cache legacy callback support will drop in v6.x"), ["get", "mget", "set", "del", "ttl", "getTtl", "keys", "has"].forEach((l) => {
            var _;
            _ = this[l], this[l] = function(...f) {
              var u, E, y, v;
              if (y = f, [...f] = y, [u] = d.call(f, -1), typeof u == "function") try {
                v = _(...f), u(null, v);
              } catch (S) {
                E = S, u(E);
              }
              else return _(...f, u);
            };
          })), this.stats = { hits: 0, misses: 0, keys: 0, ksize: 0, vsize: 0 }, this.validKeyTypes = ["string", "number"], this._checkData();
        }
        get(i) {
          var l, _;
          if (c(this, r), (_ = this._isInvalidKey(i)) != null) throw _;
          if (this.data[i] != null && this._check(i, this.data[i])) return this.stats.hits++, l = this._unwrap(this.data[i]), l;
          this.stats.misses++;
        }
        mget(i) {
          var l, _, f, u, E, y;
          if (c(this, r), !Array.isArray(i)) throw l = this._error("EKEYSTYPE"), l;
          for (y = {}, f = 0, E = i.length; f < E; f++) {
            if (u = i[f], (_ = this._isInvalidKey(u)) != null) throw _;
            this.data[u] != null && this._check(u, this.data[u]) ? (this.stats.hits++, y[u] = this._unwrap(this.data[u])) : this.stats.misses++;
          }
          return y;
        }
        set(i, l, _) {
          var f, u, E;
          if (c(this, r), this.options.maxKeys > -1 && this.stats.keys >= this.options.maxKeys) throw f = this._error("ECACHEFULL"), f;
          if (this.options.forceString, _ == null && (_ = this.options.stdTTL), (u = this._isInvalidKey(i)) != null) throw u;
          return E = !1, this.data[i] && (E = !0, this.stats.vsize -= this._getValLength(this._unwrap(this.data[i], !1))), this.data[i] = this._wrap(l, _), this.stats.vsize += this._getValLength(l), E || (this.stats.ksize += this._getKeyLength(i), this.stats.keys++), this.emit("set", i, l), !0;
        }
        mset(i) {
          var l, _, f, u, E, y, v, S, N, D;
          if (c(this, r), this.options.maxKeys > -1 && this.stats.keys + i.length >= this.options.maxKeys) throw l = this._error("ECACHEFULL"), l;
          for (f = 0, v = i.length; f < v; f++) {
            if (y = i[f], { key: E, val: D, ttl: N } = y, N && typeof N != "number") throw l = this._error("ETTLTYPE"), l;
            if ((_ = this._isInvalidKey(E)) != null) throw _;
          }
          for (u = 0, S = i.length; u < S; u++) y = i[u], { key: E, val: D, ttl: N } = y, this.set(E, D, N);
          return !0;
        }
        del(i) {
          var l, _, f, u, E, y;
          for (c(this, r), Array.isArray(i) || (i = [i]), l = 0, f = 0, E = i.length; f < E; f++) {
            if (u = i[f], (_ = this._isInvalidKey(u)) != null) throw _;
            this.data[u] != null && (this.stats.vsize -= this._getValLength(this._unwrap(this.data[u], !1)), this.stats.ksize -= this._getKeyLength(u), this.stats.keys--, l++, y = this.data[u], delete this.data[u], this.emit("del", u, y.v));
          }
          return l;
        }
        take(i) {
          var l;
          return c(this, r), l = this.get(i), l != null && this.del(i), l;
        }
        ttl(i, l) {
          var _;
          if (c(this, r), l || (l = this.options.stdTTL), !i) return !1;
          if ((_ = this._isInvalidKey(i)) != null) throw _;
          return this.data[i] != null && this._check(i, this.data[i]) ? (l >= 0 ? this.data[i] = this._wrap(this.data[i].v, l, !1) : this.del(i), !0) : !1;
        }
        getTtl(i) {
          var l, _;
          if (c(this, r), !!i) {
            if ((_ = this._isInvalidKey(i)) != null) throw _;
            if (this.data[i] != null && this._check(i, this.data[i])) return l = this.data[i].t, l;
          }
        }
        keys() {
          var i;
          return c(this, r), i = Object.keys(this.data), i;
        }
        has(i) {
          var l;
          return c(this, r), l = this.data[i] != null && this._check(i, this.data[i]), l;
        }
        getStats() {
          return c(this, r), this.stats;
        }
        flushAll(i = !0) {
          c(this, r), this.data = {}, this.stats = { hits: 0, misses: 0, keys: 0, ksize: 0, vsize: 0 }, this._killCheckPeriod(), this._checkData(i), this.emit("flush");
        }
        flushStats() {
          c(this, r), this.stats = { hits: 0, misses: 0, keys: 0, ksize: 0, vsize: 0 }, this.emit("flush_stats");
        }
        close() {
          c(this, r), this._killCheckPeriod();
        }
        _checkData(i = !0) {
          var l, _, f;
          c(this, r), _ = this.data;
          for (l in _) f = _[l], this._check(l, f);
          i && this.options.checkperiod > 0 && (this.checkTimeout = setTimeout(this._checkData, this.options.checkperiod * 1e3, i), this.checkTimeout != null && this.checkTimeout.unref != null && this.checkTimeout.unref());
        }
        _killCheckPeriod() {
          if (this.checkTimeout != null) return clearTimeout(this.checkTimeout);
        }
        _check(i, l) {
          var _;
          return c(this, r), _ = !0, l.t !== 0 && l.t < Date.now() && (this.options.deleteOnExpire && (_ = !1, this.del(i)), this.emit("expired", i, this._unwrap(l))), _;
        }
        _isInvalidKey(i) {
          var l;
          if (c(this, r), l = typeof i, O.call(this.validKeyTypes, l) < 0) return this._error("EKEYTYPE", { type: typeof i });
        }
        _wrap(i, l, _ = !0) {
          var f, u, E;
          return c(this, r), this.options.useClones || (_ = !1), u = Date.now(), f = 0, E = 1e3, l === 0 ? f = 0 : l ? f = u + l * E : this.options.stdTTL === 0 ? f = this.options.stdTTL : f = u + this.options.stdTTL * E, { t: f, v: _ ? h(i) : i };
        }
        _unwrap(i, l = !0) {
          return this.options.useClones || (l = !1), i.v != null ? l ? h(i.v) : i.v : null;
        }
        _getKeyLength(i) {
          return i.toString().length;
        }
        _getValLength(i) {
          return c(this, r), typeof i == "string" ? i.length : this.options.forceString ? JSON.stringify(i).length : Array.isArray(i) ? this.options.arrayValueSize * i.length : typeof i == "number" ? 8 : typeof (i == null ? void 0 : i.then) == "function" ? this.options.promiseValueSize : typeof Buffer < "u" && Buffer !== null && Buffer.isBuffer(i) ? i.length : i != null && typeof i == "object" ? this.options.objectValueSize * Object.keys(i).length : typeof i == "boolean" ? 8 : 0;
        }
        _error(i, l = {}) {
          var _;
          return c(this, r), _ = new Error(), _.name = i, _.errorcode = i, _.message = this.ERRORS[i] != null ? this.ERRORS[i](l) : "-", _.data = l, _;
        }
        _initErrors() {
          var i, l, _;
          c(this, r), this.ERRORS = {}, _ = this._ERRORS;
          for (l in _) i = _[l], this.ERRORS[l] = this.createErrorMessage(i);
        }
        createErrorMessage(i) {
          return function(l) {
            return i.replace("__key", l.type);
          };
        }
      }
      return r.prototype._ERRORS = { ENOTFOUND: "Key `__key` not found", ECACHEFULL: "Cache max keys amount exceeded", EKEYTYPE: "The key argument has to be of type `string` or `number`. Found: `__key`", EKEYSTYPE: "The keys argument has to be an array.", ETTLTYPE: "The ttl argument has to be a number." }, r;
    }).call(this);
  }).call(t);
}), ut = U((t, e) => {
  (function() {
    var n;
    n = e.exports = ht(), n.version = "5.1.2";
  }).call(t);
}), ct = ((t) => (t.EN = "en", t.BG = "bg", t.RO = "ro", t.EL = "el", t.SK = "sk", t.PT = "pt", t.SR = "sr", t.HU = "hu", t.SV = "sv", t.ES = "es", t.FR = "fr", t.NL = "nl", t.DE = "de", t.IT = "it", t.AR = "ar", t))(ct || {}), _t = ((t) => (t.DEV = "dev", t.PROD = "prod", t.STAGING = "staging", t))(_t || {}), dt = ((t) => (t.NATIVE = "native", t.ENETPULSE = "enetpulse", t.SPORTRADAR = "sportradar", t.SPORTAL_365 = "sportal365", t.API_FOOTBALL = "api_football", t))(dt || {}), Et = ((t) => (t.DEFAULT = "default", t.STANDARD = "standard", t))(Et || {}), pt = ((t) => (t.FT_1X2 = "FT_1X2", t.HT_1X2 = "HT_1X2", t.BOTH_TEAMS_SCORE = "BOTH_TEAMS_SCORE", t.DOUBLE_CHANCE = "DOUBLE_CHANCE", t.HT_FT = "HT_FT", t.PLAYER_SCORE = "PLAYER_SCORE", t.PLAYER_YELLOW_CARD = "PLAYER_YELLOW_CARD", t.PLAYER_RED_CARD = "PLAYER_RED_CARD", t.RED_CARD_MATCH = "RED_CARD_MATCH", t.PENALTY_MATCH = "PENALTY_MATCH", t.PLAYER_SCORE_FIRST_GOAL = "PLAYER_SCORE_FIRST_GOAL", t.CORNERS_MATCH = "CORNERS_MATCH", t.CORRECT_SCORE = "CORRECT_SCORE", t.CORRECT_SCORE_ADVANCED = "CORRECT_SCORE_ADVANCED", t.CORRECT_SCORE_HT = "CORRECT_SCORE_HT", t.PLAYER_SCORE_HATTRICK = "PLAYER_SCORE_HATTRICK", t.PLAYER_SCORE_TWICE = "PLAYER_SCORE_TWICE", t.OVER_GOALS_0_5 = "OVER_GOALS_0_5", t.OVER_GOALS_1_5 = "OVER_GOALS_1_5", t.OVER_GOALS_2_5 = "OVER_GOALS_2_5", t.OVER_GOALS_3_5 = "OVER_GOALS_3_5", t.OVER_GOALS_4_5 = "OVER_GOALS_4_5", t.OVER_GOALS_5_5 = "OVER_GOALS_5_5", t.OVER_GOALS_6_5 = "OVER_GOALS_6_5", t.OVER_CORNERS_6_5 = "OVER_CORNERS_6_5", t.OVER_CORNERS_7_5 = "OVER_CORNERS_7_5", t.OVER_CORNERS_8_5 = "OVER_CORNERS_8_5", t.OVER_CORNERS_9_5 = "OVER_CORNERS_9_5", t.OVER_CORNERS_10_5 = "OVER_CORNERS_10_5", t.OVER_CORNERS_11_5 = "OVER_CORNERS_11_5", t.OVER_CORNERS_12_5 = "OVER_CORNERS_12_5", t.OVER_CORNERS_13_5 = "OVER_CORNERS_13_5", t))(pt || {});
function j(t) {
  this.message = t;
}
j.prototype = new Error(), j.prototype.name = "InvalidCharacterError";
typeof window < "u" && window.atob && window.atob.bind(window);
function K(t) {
  this.message = t;
}
K.prototype = new Error(), K.prototype.name = "InvalidTokenError";
var ft = ((t) => (t[t.BAD_METHOD_CALL = 400] = "BAD_METHOD_CALL", t[t.UNAUTHORIZED = 401] = "UNAUTHORIZED", t[t.NOT_FOUND = 404] = "NOT_FOUND", t[t.PRECONDITION_FAILED = 412] = "PRECONDITION_FAILED", t))(ft || {}), Tt = ((t) => (t.INVALID_TEMPLATE = "INVALID_TEMPLATE", t.INVALID_PREDICTION = "INVALID_PREDICTION", t.INVALID_MARKET = "INVALID_MARKET", t.INVALID_FIELD = "INVALID_FIELD", t.INVALID_TYPE = "INVALID_TYPE", t.EXCEEDED_LENGTH = "EXCEEDED_LENGTH", t.INVALID_TOKEN = "invalid_token", t.UNAUTHORIZED = "unauthorized", t.INVALID_FILTERS = "invalid_filters", t.INVALID_AVATAR = "invalid_avatar", t.INVALID_METHOD_CALL = "invalid_method_call", t.INVALID_LIMIT = "invalid_limit", t.INVALID_TEMPLATE_GROUP_ID = "invalid_template_group_id", t.INVALID_TEMPLATE_GROUP_FILTERS = "invalid_template_group_filters", t.INVALID_PAGE_NUMBER = "invalid_page_number", t.INVALID_DISCUSSION_IDS = "invalid_discussion_ids", t.ID_MAPPING_NOT_FOUND = "id_mapping_not_found", t.INVALID_COMPETITION_ID = "invalid_competition_id", t.INVALID_TEAM_ID = "invalid_team_id", t.INVALID_IDS = "invalid_ids", t.INVALID_INPUT_PROVIDER = "invalid_input_provider", t.INVALID_OUTPUT_PROVIDER = "invalid_output_provider", t.INVALID_MATCH_SUMMARY = "invalid_match_summary", t.INVALID_MATCH_SUMMARY_PREDICTIONS = "invalid_match_summary_predictions", t.INVALID_MATCH_SUMMARY_PREDICTIONS_KEYS = "invalid_match_summary_predictions_keys", t.ENTITY_IDS_NOT_FOUND = "entity_ids_not_found", t.MATCH_IDS_NOT_FOUND = "match_ids_not_found", t.INVALID_MATCH_IDS = "invalid_match_ids", t.ODD_CLIENT_CONFIGURATION_NOT_FOUND = "odd_client_configuration_not_found", t))(Tt || {}), k = { native: "id", sportradar: "sportradar_id", sportal365: "sportal365_id", enetpulse: "enetpulse_id", api_football: "api_football_id" };
(/* @__PURE__ */ new Map()).set("FT_1X2", "fullTimeOneXTwo").set("HT_1X2", "halfTimeOneXTwo").set("BOTH_TEAMS_SCORE", "bothTeamsScore").set("DOUBLE_CHANCE", "doubleChance").set("HT_FT", "halfTimeFullTime").set("PLAYER_SCORE", "playerScore").set("PLAYER_YELLOW_CARD", "playerYellowCard").set("PLAYER_RED_CARD", "playerRedCard").set("RED_CARD_MATCH", "redCardMatch").set("PENALTY_MATCH", "penaltyMatch").set("PLAYER_SCORE_FIRST_GOAL", "playerScoreFirstGoal").set("CORNERS_MATCH", "cornersMatch").set("CORRECT_SCORE", "correctScore").set("CORRECT_SCORE_ADVANCED", "correctScoreAdvanced").set("CORRECT_SCORE_HT", "correctScoreHalfTime").set("PLAYER_SCORE_HATTRICK", "playerScoreHattrick").set("PLAYER_SCORE_TWICE", "playerScoreTwice").set("OVER_GOALS_0_5", "overZeroPointFiveGoals").set("OVER_GOALS_1_5", "overOnePointFiveGoals").set("OVER_GOALS_2_5", "overTwoPointFiveGoals").set("OVER_GOALS_3_5", "overThreePointFiveGoals").set("OVER_GOALS_4_5", "overFourPointFiveGoals").set("OVER_GOALS_5_5", "overFivePointFiveGoals").set("OVER_GOALS_6_5", "overSixPointFiveGoals").set("OVER_CORNERS_6_5", "overSixPointFiveCorners").set("OVER_CORNERS_7_5", "overSevenPointFiveCorners").set("OVER_CORNERS_8_5", "overEightPointFiveCorners").set("OVER_CORNERS_9_5", "overNinePointFiveCorners").set("OVER_CORNERS_10_5", "overTenPointFiveCorners").set("OVER_CORNERS_11_5", "overElevenPointFiveCorners").set("OVER_CORNERS_12_5", "overTwelvePointFiveCorners").set("OVER_CORNERS_13_5", "overThirteenPointFiveCorners");
var Ot = ((t) => (t.INVALID_MATCH_ID = "Match id is invalid!", t.INVALID_PLAYER_ID = "Player id is invalid!", t.QUERY_PARAM_MATCH_IDS_EXCEEDED = "Maximum matchIds in PredictionFilters should be 10 or less.", t.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED = "Maximum limit for filtering games is 50 or less.", t.INVALID_FIXTURES_FIELD = "Fixtures field is invalid. For more information please visit our documentation", t.INVALID_TOKEN = "Invalid JWT token is provided", t.EXPIRED_TOKEN = "The provided JWT token is expired", t.ENTITIES_NEEDED = "At least one of footballCompetitions, footballTeams or footballPlayers properties should be provided for filters.", t.ENTITIES_FOLLOWS_FILTERS_EXCEEDED = "Maximum length per entity should be 24 or less.", t.INVALID_TYPE = "You have provided invalid type. The valid type is ", t.INVALID_VALUE = "You have provided invalid value. The valid value is ", t.INVALID_AVATAR = "Invalid URL syntax for avatar image.", t.INVALID_GET_PROFILES_METHOD_CALL = "The method 'getByIds' from Profile namespace is not called correctly. You need to provide 'profileIds' OR 'search' parameters to the method, but you can't use both of them or neither of them.", t.INVALID_LIMIT = "Invalid limit. The maximum limit is: ", t.INVALID_LIMIT_TYPE = "Invalid limit type. The proper type is number.", t.FILTER_COMBINATION_ERROR = "You need to use both 'entityIds' and 'entityType' filters together", t.INVALID_ENTITY_TYPE = "Invalid 'entityType' filter. Please use one of the following valid options: competition, team, or player", t.INVALID_TEMPLATE_GROUP_ID = "There is no group in this template with the provided groupId", t.INVALID_TEMPLATE_GROUP_FILTERS = "The provided template group has no filters", t.INVALID_PAGE_NUMBER = "Invalid page number provided. Use number between 1 and max number of pages.", t.INVALID_DISCUSSION_IDS = "Invalid discussion ids argument. Please provide at least one discussion id in an array", t.EXCEEDED_DISCUSSION_IDS = "Maximum number of discussion ids exceeded. The maximum number of discussion ids is 50. You can use 'getPostsCountExtended' method for more than 50 discussion ids.", t.EXCEEDED_EXTENDED_DISCUSSION_IDS = "Maximum number of discussion ids exceeded. The maximum number of discussion ids is: ", t.ID_MAPPING_NOT_FOUND = "No ID mappings are available for the provided ID. ID argument: ", t.INVALID_PARAM = "Invalid parameter provided. Please check the following parameter: ", t.INVALID_COMPETITION_ID = "Invalid competition ID provided. Please provide a valid competition ID.", t.INVALID_TEAM_ID = "Invalid team ID provided. Please provide a valid team ID.", t.INVALID_OR_EMPTY_IDS = "Invalid or empty IDs provided. Please provide at least one ID.", t.INVALID_PROVIDER = "Invalid provider. The valid providers are: 'native', 'enetpulse', 'sportal365', 'sportradar' and 'api_football'.", t.INVALID_OUTPUT_PROVIDER = "Invalid output provider. The output can not be the same as the input provider.", t.MATCH_SUMMARY_REQUIRED = "Match summary is required.", t.MATCH_SUMMARY_PREDICTIONS_REQUIRED = "Predictions in match summary are required.", t.INVALID_MATCH_SUMMARY_PREDICTIONS_KEYS = "Keys in predictions in match summary are invalid. The valid ones are: ", t.INVALID_COLLECT_LEAD_METHOD_CALL = "The method 'collectLead' from Profile namespace is not called correctly. You need to provide 'requestBody' parameter to the method.", t.REQUIRED_FIXTURES_FIELD = "Fixtures field is required and should contain at least one fixtures object. For more information please visit our documentation", t.INVALID_TIEBREAKER_FIELD = "Tiebreaker field is invalid. It should contain statTotal key with integer value. For more information please visit our documentation", t.ENTITY_IDS_NOT_FOUND = "Some of the sport entity IDs were not found for the provided id schema", t.MATCH_IDS_NOT_FOUND = "Some of the match IDs were not found for the provided id schema", t.INVALID_STANDING_PREDICTION_ARGUMENT = "The prediction argument is invalid. For more information please visit our documentation", t.INVALID_MAP_PLAYERS_ROLES_KEYS = "The keys in the players roles map are not part of the valid keys. The valid keys are: ", t.INVALID_MAP_PLAYERS_ROLES_VALUES = "The values in the map are not valid. The valid ones are: ", t.INVALID_MATCH_IDS = "Match IDs are invalid!", t.MISSING_ODD_CLIENT_CONFIGURATION = "Odds namespace requires oddClient configuration to be set", t.INVALID_COLLECT_CONSENTS_METHOD_CALL = "The method 'collectConsents' from Profile namespace is not called correctly. You need to provide 'consents' parameter to the method.", t))(Ot || {}), Rt = ((t) => (t.LIKE = "like", t.DISLIKE = "dislike", t.PAGE_VIEW = "page_view", t.CONTENT_CONSUMED = "content_consumed", t.SHARE = "share", t.COMMENT = "comment", t.CLICK_AD = "click_ad", t.PREDICTION_MADE = "prediction_made", t.CONVERT = "convert", t.MANAGE_INTERESTS = "manage_interests", t.GAME_PARTICIPATION = "game_participation", t.ARTICLE_CONSUMED = "article_consumed", t.VIDEO_CONSUMED = "video_consumed", t.SHORT_VIDEO_CONSUMED = "short_video_consumed", t.LONG_VIDEO_CONSUMED = "long_video_consumed", t.AUDIO_CONSUMED = "audio_consumed", t.GALLERY_CONSUMED = "gallery_consumed", t.IMAGE_CONSUMED = "image_consumed", t.POLL_PARTICIPATION = "poll_participation", t))(Rt || {}), mt = rt(ut()), m;
m = class {
  constructor(e) {
    this.profileTTL = 600, this.clientTTL = 14400, this.profileBadgesTTL = 3600, this.idMappingsExpiration = 0, this.idSchema = "", this.clearData = async () => m.nodeCache.flushAll(), this.getEntityById = async (n, h) => {
      let d = m.nodeCache.get("ids");
      return d ? d.find((c) => {
        let O = k[this.idSchema];
        return c && `${c[O]}` === h && c.resource === n;
      }) : null;
    }, this.getEntity = async (n, h, d) => {
      let c = m.nodeCache.get("ids");
      return c ? Array.isArray(n) ? [] : null : Array.isArray(n) ? c.filter((O) => {
        let r = k[d];
        return O && n.includes(`${O[r]}`) && O.resource === h;
      }) : c.find((O) => {
        let r = k[d];
        return O && `${O[r]}` === n && O.resource === h;
      });
    }, this.checkForExistingIdObjs = async (n, h) => {
      let d = k[h], c = {};
      for (let O of Object.keys(n)) {
        let r = n[O], A = (await this.getEntity(r, O, h)).map((l) => l[d]), i = n[O].filter((l) => !A.includes(l));
        c[O] = r.map((l) => i.includes(l) ? { id: l, exists: !1 } : { id: l, exists: !0 });
      }
      return c;
    }, this.getIdsByType = async (n, h, d) => {
      let c = k[d], O = k[h], r = m.nodeCache.get("ids"), A = {};
      return r ? (Object.keys(n).forEach((i) => {
        let l = n[i], _ = [];
        r.forEach((f) => {
          l.forEach((u, E) => {
            u === f[O] && i === f.resource && (_[E] = f[c]);
          });
        }), A[i] = _;
      }), A) : null;
    }, this.addIdMapping = async (n) => {
      let h = m.nodeCache.get("ids");
      h.push(n), m.nodeCache.set("ids", h);
    }, this.addIdMappings = async (n) => {
      let h = m.nodeCache.get("ids");
      h = [...h, ...n], m.nodeCache.set("ids", h);
    }, this.addTopIdMappings = async (n) => {
      let h = m.nodeCache.get("ids"), d = 604800;
      if (h) {
        let c = JSON.parse(JSON.stringify(h));
        c = c.filter((O) => O.resource !== "match"), n = n.filter((O) => O.resource === "match"), c = [...c, ...n], m.nodeCache.set("ids", c);
      } else m.nodeCache.set("ids", n);
      this.idMappingsExpiration = Math.floor(Date.now() / 1e3) + d;
    }, this.setOwnProfile = async (n) => {
      m.nodeCache.set("profile", n, this.profileTTL);
    }, this.getOwnProfile = async () => m.nodeCache.get("profile"), this.getProfileCountries = async () => m.nodeCache.get("profile_countries"), this.setProfileCountries = async (n) => {
      m.nodeCache.set("profile_countries", n);
    }, this.getProfileStats = async () => m.nodeCache.get("profile_stats"), this.setProfileStats = async (n) => {
      m.nodeCache.set("profile_stats", n, this.profileTTL);
    }, this.getProfileBadges = async () => m.nodeCache.get("profile_badges"), this.setProfileBadges = async (n) => {
      m.nodeCache.set("profile_badges", n, this.profileBadgesTTL);
    }, this.getFootballCountries = async () => m.nodeCache.get("football_countries"), this.setFootballCountries = async (n) => {
      m.nodeCache.set("football_countries", n);
    }, this.getCompetitions = async (n) => {
      let h = m.nodeCache.get("football_competitions");
      return h ? n ? n.competitionSearchFilter(h) : h : null;
    }, this.setCompetitions = async (n) => {
      m.nodeCache.set("football_competitions", n);
    }, this.getCompetitionsLength = async () => {
      let n = m.nodeCache.get("football_competitions");
      return n ? n.length : 0;
    }, this.getClientFeatures = async () => m.nodeCache.get("client"), this.setClientFeatures = async (n) => {
      m.nodeCache.set("client", n, this.clientTTL);
    }, this.deleteClientFeatures = async () => {
      m.nodeCache.del("client");
    }, this.getExpiration = async (n, h) => {
      let d = this.getKeyFromExpirationType(h);
      return d === "ids" ? this.idMappingsExpiration : m.nodeCache.getTtl(d);
    }, this.getKeyFromExpirationType = (n) => {
      switch (n) {
        case "profile":
          return "profile";
        case "statistics":
          return "profile_stats";
        case "badges":
          return "profile_badges";
        case "features":
          return "client";
        case "ids":
          return "ids";
      }
    };
  }
  static getInstance(e) {
    return m.instance || (m.instance = new m(e), m.nodeCache.options.useClones = !1), m.instance;
  }
}, m.nodeCache = new mt.default();
var At = ((t) => (t.ACTIVE = "ACTIVE", t.WON = "WON", t.LOST = "LOST", t.PARTIALLY_WON = "PARTIALLY_WON", t.CANCELED = "CANCELED", t))(At || {}), It = ((t) => (t.ACTIVE = "ACTIVE", t.WON = "WON", t.LOST = "LOST", t.PARTIALLY_WON = "PARTIALLY_WON", t.CANCELED = "CANCELED", t))(It || {}), Ut = class {
  constructor() {
    this.id = null, this.title = null, this.description = null, this.images = null, this.rules = null, this.customFields = null, this.type = "EVENT", this.status = null, this.related = [], this.tiebreaker = null, this.predictionsCutoff = null, this.fixtures = [], this.flags = null, this.language = null, this.branding = null, this.brandingId = null, this.createdAt = null, this.updatedAt = null;
  }
}, yt = ((t) => (t.BOOLEAN = "BOOLEAN", t.NUMBER = "NUMBER", t.ENUM = "ENUM", t.FREE_INPUT = "FREE_INPUT", t))(yt || {}), vt = ((t) => (t.PARTICIPANT_ONE = "PARTICIPANT_ONE", t.PARTICIPANT_TWO = "PARTICIPANT_TWO", t.DRAW = "DRAW", t))(vt || {}), Ct = ((t) => (t.OPEN = "OPEN", t.LIVE = "LIVE", t.PENDING = "PENDING", t.CANCELED = "CANCELED", t.CLOSED = "CLOSED", t.SETTLED = "SETTLED", t))(Ct || {}), jt = class {
  constructor() {
    this.fixtures = [];
  }
}, Lt = class {
  constructor() {
    this.minutesPlayed = null, this.yellowCards = null, this.redCards = null, this.goals = null, this.penaltyGoals = null, this.penaltyCommitted = null, this.penaltyWon = null, this.penaltyMissed = null, this.penaltySaved = null, this.penaltyReceived = null, this.ownGoals = null, this.assists = null, this.cleanSheets = null, this.shots = null, this.shotsOn = null, this.shotsBlocked = null, this.offsides = null, this.foulsCommitted = null, this.foulsWon = null, this.tackles = null, this.tacklesBlocks = null, this.tacklesInterceptions = null, this.concededGoals = null, this.caughtBall = null, this.saves = null, this.passes = null, this.crosses = null, this.interceptions = null, this.keyPasses = null, this.passesAccuracy = null, this.duels = null, this.duelsWon = null, this.dribblesAttempts = null, this.dribblesSuccess = null, this.dribblesPast = null;
  }
}, Y = class {
  constructor() {
    this.main = null, this.cover = null, this.mobile = null;
  }
}, St = class {
  constructor() {
    this.timeTiebreaker = !1;
  }
}, Nt = class {
  constructor() {
    this.id = null, this.title = null, this.alternativeTitle = null, this.description = null, this.type = null, this.images = new Y(), this.participationCount = null, this.questionsCount = null, this.status = null, this.language = null, this.authRequirement = null, this.flags = null, this.customFields = null, this.labels = null, this.branding = null, this.brandingId = null, this.related = [], this.time = null, this.points = null, this.scored = !1, this.maxAttempts = null, this.averageScore = null, this.perfectScore = null, this.adContent = null, this.context = null, this.createdAt = null, this.updatedAt = null;
  }
}, Bt = class extends Nt {
  constructor() {
    super(...arguments), this.rules = null, this.questions = [];
  }
}, Wt = class {
  constructor() {
    this.classicQuizId = null, this.classicQuizModel = null, this.correct = null, this.classicQuizQuestions = null, this.personalBest = null, this.points = null, this.answers = [], this.attempts = 0;
  }
}, Dt = class {
  constructor() {
    this.id = "", this.title = "", this.alternativeTitle = "", this.description = "", this.images = new Y(), this.flags = [], this.status = "", this.language = "", this.authRequirement = null, this.winningCondition = "", this.lives = 0, this.time = 0, this.points = [], this.customFields = null, this.branding = null, this.brandingId = null, this.labels = null, this.adContent = "", this.context = null, this.type = "", this.related = [], this.totalParticipationsCount = 0, this.totalUsersCount = 0, this.finishedParticipationsCount = 0, this.averageStartedParticipationsCount = 0, this.averageFinishedParticipationsCount = 0, this.createdAt = "", this.updatedAt = "";
  }
}, Kt = class extends Dt {
  constructor() {
    super(...arguments), this.rules = "";
  }
}, gt = class {
  constructor() {
    this.id = null, this.title = null, this.alternativeTitle = null, this.description = null, this.images = new Y(), this.participationCount = null, this.status = null, this.language = null, this.authRequirement = null, this.flags = null, this.customFields = null, this.labels = null, this.branding = null, this.brandingId = null, this.related = [], this.time = null, this.preferencesEnabled = !1, this.maxAttempts = null, this.adContent = null, this.context = null, this.createdAt = null, this.updatedAt = null;
  }
}, Xt = class extends gt {
  constructor() {
    super(...arguments), this.rules = null, this.questions = [], this.personaResults = [];
  }
}, zt = class {
  constructor() {
    this.personalityQuizId = null, this.userId = null, this.questions = [], this.personas = [], this.attempts = null;
  }
}, X = ((t) => (t.PRE_EVENT = "PRE_EVENT", t.LIVE = "LIVE", t.ALL = "ALL", t))(X || {}), z = ((t) => (t.ORDINARY_TIME = "ORDINARY_TIME", t.FULL_TIME = "FULL_TIME", t))(z || {}), q = ((t) => (t.DECIMAL = "DECIMAL", t.MONEYLINE = "MONEYLINE", t.FRACTIONAL = "FRACTIONAL", t))(q || {}), Q = ((t) => (t.FT_1X2 = "FT_1X2", t.DOUBLE_CHANCE = "DOUBLE_CHANCE", t.HT_FT = "HT_FT", t.BOTH_TEAMS_SCORE = "BOTH_TEAMS_SCORE", t.CORRECT_SCORE = "CORRECT_SCORE", t.PLAYER_SCORE_FIRST_GOAL = "PLAYER_SCORE_FIRST_GOAL", t.PLAYER_SCORE = "PLAYER_SCORE", t.PLAYER_RED_CARD = "PLAYER_RED_CARD", t.PLAYER_YELLOW_CARD = "PLAYER_YELLOW_CARD", t.OVER_GOALS_0_5 = "OVER_GOALS_0_5", t.OVER_GOALS_1_5 = "OVER_GOALS_1_5", t.OVER_GOALS_2_5 = "OVER_GOALS_2_5", t.OVER_GOALS_3_5 = "OVER_GOALS_3_5", t.OVER_GOALS_4_5 = "OVER_GOALS_4_5", t.OVER_GOALS_5_5 = "OVER_GOALS_5_5", t))(Q || {}), bt = { FT_1X2: "1x2", DOUBLE_CHANCE: "DOUBLE_CHANCE", HT_FT: "FIRST_HALF_AND_FINAL_RESULT", BOTH_TEAMS_SCORE: "BOTH_TO_SCORE", CORRECT_SCORE: "CORRECT_SCORE", PLAYER_SCORE_FIRST_GOAL: "FIRST_PLAYER_TO_SCORE", PLAYER_SCORE: "PLAYER_TO_SCORE_DURING_GAME", PLAYER_RED_CARD: "PLAYER_TO_RECEIVE_CARD", PLAYER_YELLOW_CARD: "PLAYER_TO_RECEIVE_CARD" }, qt = class {
  constructor(t) {
    this.oddType = "PRE_EVENT", this.scopeType = "ORDINARY_TIME", this.oddFormat = "DECIMAL", this.marketTypes = ["FT_1X2"], this.validateFilters(t);
  }
  constructFiltersUrl() {
    let t = this.marketTypes.map((e) => this.mapToSportal365Market(e));
    return `&odd_type=${this.oddType}&scope_type=${this.scopeType}&odd_format=${this.oddFormat}&market_types=${t.join(",")}`;
  }
  validateFilters(t) {
    let e = Object.values(X), n = Object.values(z), h = Object.values(q), d = Object.values(Q);
    t != null && t.oddType && (e.includes(t.oddType) ? this.oddType = t.oddType : console.warn(`The filter "oddType" is NOT valid and therefore it will be set to PRE_EVENT. The VALID values are : ${e.join(", ")}`)), t != null && t.scopeType && (n.includes(t.scopeType) ? this.scopeType = t.scopeType : console.warn(`The filter "scopeType" is NOT valid and therefore it will be set to ORDINARY_TIME. The VALID values are : ${n.join(", ")}`)), t != null && t.oddFormat && (h.includes(t.oddFormat) ? this.oddFormat = t.oddFormat : console.warn(`The filter "oddFormat" is NOT valid and therefore it will be set to DECIMAL. The VALID values are : ${h.join(", ")}`)), t != null && t.marketTypes && Array.isArray(t == null ? void 0 : t.marketTypes) && (t == null ? void 0 : t.marketTypes.length) > 0 && (t.marketTypes.every((c) => d.includes(c)) ? this.marketTypes = t.marketTypes : console.warn(`The filter "marketTypes" is NOT valid and therefore it will be set to FT_1X2. The VALID values are : ${d.join(", ")}`));
  }
  mapToSportal365Market(t) {
    return t.startsWith("OVER_GOALS_") ? "OVER_UNDER" : bt[t];
  }
}, Qt = class {
  constructor() {
    this.gameInstanceId = null, this.fixtures = null;
  }
}, Pt = ((t) => (t.ACTIVE = "ACTIVE", t.WON = "WON", t.LOST = "LOST", t.PARTIALLY_WON = "PARTIALLY_WON", t.CANCELED = "CANCELED", t))(Pt || {}), Vt = class {
  constructor() {
    this.id = null, this.title = null, this.description = null, this.type = null, this.status = null, this.authRequirement = null, this.scheduleOpenAt = null, this.predictionsCutoff = null, this.fixtures = [], this.tiebreaker = new St(), this.participantsCount = 0, this.related = [], this.excludedProfileIds = null, this.rules = null, this.labels = null, this.customFields = null, this.branding = null, this.brandingId = null, this.flags = null, this.language = null, this.images = new Y(), this.createdAt = null, this.updatedAt = null;
  }
}, Jt = class extends Vt {
  constructor() {
    super(...arguments), this.adContent = null;
  }
}, Mt = class {
  constructor() {
    this.id = null, this.title = null, this.alternativeTitle = null, this.description = null, this.type = null, this.images = new Y(), this.status = null, this.language = null, this.authRequirement = null, this.totalVotes = null, this.flags = [], this.customFields = null, this.branding = null, this.brandingId = null, this.embedCode = null, this.labels = null, this.adContent = null, this.context = null, this.options = [], this.related = [], this.preferencesEnabled = !1, this.multipleChoice = !1, this.maxMultipleChoiceOptions = null, this.participationCount = 0, this.maxAttempts = 0, this.externalActivity = null, this.createdAt = null, this.updatedAt = null;
  }
}, Zt = class extends Mt {
  constructor() {
    super(...arguments), this.rules = null;
  }
}, Gt = class {
  constructor() {
    this.id = null, this.pollId = null, this.optionId = null, this.optionIds = [], this.userId = null, this.createdAt = null;
  }
}, $t = class extends Gt {
  constructor() {
    super(...arguments), this.previousVotes = [], this.attempts = null;
  }
}, wt = ((t) => (t.LIKE = "like", t.DISLIKE = "dislike", t.SHARE = "share", t.COMMENT = "comment", t.PREDICTION_MADE = "prediction_made", t))(wt || {}), Ft = ((t) => (t.CORRECT = "CORRECT", t.INCORRECT = "INCORRECT", t.PARTIALLY_CORRECT = "PARTIALLY_CORRECT", t.NOT_VERIFIED = "NOT_VERIFIED", t))(Ft || {}), kt = ((t) => (t.ONE = "1", t.X = "x", t.TWO = "2", t))(kt || {}), xt = ((t) => (t.ONE_X = "1x", t.X_TWO = "x2", t.ONE_TWO = "12", t))(xt || {}), Yt = ((t) => (t.ONE_ONE = "1/1", t.ONE_X = "1/x", t.ONE_TWO = "1/2", t.X_ONE = "x/1", t.X_X = "x/x", t.X_TWO = "x/2", t.TWO_ONE = "2/1", t.TWO_X = "2/x", t.TWO_TWO = "2/2", t))(Yt || {}), Ht = ((t) => (t.NONE = "none", t.FINISHED = "finished", t.CANCELLED = "cancelled", t.POSTPONED = "postponed", t.NOT_STARTED = "not_started", t.FIRST_HALF = "1st_half", t.SECOND_HALF = "2nd_half", t.FINISHED_AFTER_AWARDED_WIN = "finished_after_awarded_win", t.TO_FINISH = "to_finish", t.FINISHED_AET = "finished_aet", t.HALFTIME = "halftime", t.FINISHED_AP = "finished_ap", t.INTERRUPTED = "interrupted", t.KICK_OFF_DELAYED = "kick_off_delayed", t.ABANDONED = "abandoned", t.WAITING_FOR_PENALTY = "waiting_for_penalty", t.PENALTY = "penalty", t.PAUSE = "pause", t.EXTRA_TIME_1ST_HALF = "extra_time_1st_half", t.EXTRA_TIME_END_OF_1ST_HALF = "extra_time_end_of_1st_half", t.EXTRA_TIME_2ND_HALF = "extra_time_2nd_half", t.WAITING_FOR_EXTRA_TIME = "waiting_for_extra_time", t.NO_INFO_YET = "no_info_yet", t.AWAITING_INFO = "awaiting_info", t.FINISHED_ASG = "finished_asg", t))(Ht || {}), g;
g = class {
  constructor() {
  }
  static createMatchMarketsResultsModel(e, n) {
    var h, d, c, O, r, A, i, l, _, f, u, E, y, v, S, N, D, V, C, s, o, a, p, R, T, I, L, P, b, x, F, M, G, w, H, W;
    return { FT_1X2: this.createOneXTwoResult(e.scores, "full_time"), HT_1X2: this.createOneXTwoResult(e.scores, "half_time"), BOTH_TEAMS_SCORE: e.scores.ftScore.homeGoals > 0 && e.scores.ftScore.awayGoals > 0, DOUBLE_CHANCE: this.createDoubleChanceResult(e.scores), HT_FT: this.createHalfTimeFullTimeResult(e.scores), RED_CARD_MATCH: this.createMarketResultByCriteria(e, "red_card"), PENALTY_MATCH: this.createMarketResultByCriteria(e, "penalty"), CORNERS_MATCH: isNaN(((d = (h = e.stats) == null ? void 0 : h.corners) == null ? void 0 : d.homeTeam) + ((O = (c = e.stats) == null ? void 0 : c.corners) == null ? void 0 : O.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam, PLAYER_YELLOW_CARD: this.createPlayersMarketsResults(e, n, "yellow_card"), PLAYER_RED_CARD: this.createPlayersMarketsResults(e, n, "red_card"), PLAYER_SCORE_FIRST_GOAL: this.createPlayersMarketsResults(e, n, "first_goal"), PLAYER_SCORE: this.createPlayersMarketsResults(e, n, "one_goal"), PLAYER_SCORE_TWICE: this.createPlayersMarketsResults(e, n, "two_goals"), PLAYER_SCORE_HATTRICK: this.createPlayersMarketsResults(e, n, "hattrick"), CORRECT_SCORE: { homeGoals: e.scores.ftScore.homeGoals, awayGoals: e.scores.ftScore.awayGoals }, CORRECT_SCORE_ADVANCED: { homeGoals: e.scores.ftScore.homeGoals, awayGoals: e.scores.ftScore.awayGoals }, CORRECT_SCORE_HT: { homeGoals: e.scores.htScore.homeGoals, awayGoals: e.scores.htScore.awayGoals }, OVER_GOALS_0_5: e.scores.ftScore.homeGoals + e.scores.ftScore.awayGoals > 0, OVER_GOALS_1_5: e.scores.ftScore.homeGoals + e.scores.ftScore.awayGoals > 1, OVER_GOALS_2_5: e.scores.ftScore.homeGoals + e.scores.ftScore.awayGoals > 2, OVER_GOALS_3_5: e.scores.ftScore.homeGoals + e.scores.ftScore.awayGoals > 3, OVER_GOALS_4_5: e.scores.ftScore.homeGoals + e.scores.ftScore.awayGoals > 4, OVER_GOALS_5_5: e.scores.ftScore.homeGoals + e.scores.ftScore.awayGoals > 5, OVER_GOALS_6_5: e.scores.ftScore.homeGoals + e.scores.ftScore.awayGoals > 6, OVER_CORNERS_6_5: isNaN(((A = (r = e.stats) == null ? void 0 : r.corners) == null ? void 0 : A.homeTeam) + ((l = (i = e.stats) == null ? void 0 : i.corners) == null ? void 0 : l.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 6, OVER_CORNERS_7_5: isNaN(((f = (_ = e.stats) == null ? void 0 : _.corners) == null ? void 0 : f.homeTeam) + ((E = (u = e.stats) == null ? void 0 : u.corners) == null ? void 0 : E.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 7, OVER_CORNERS_8_5: isNaN(((v = (y = e.stats) == null ? void 0 : y.corners) == null ? void 0 : v.homeTeam) + ((N = (S = e.stats) == null ? void 0 : S.corners) == null ? void 0 : N.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 8, OVER_CORNERS_9_5: isNaN(((V = (D = e.stats) == null ? void 0 : D.corners) == null ? void 0 : V.homeTeam) + ((s = (C = e.stats) == null ? void 0 : C.corners) == null ? void 0 : s.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 9, OVER_CORNERS_10_5: isNaN(((a = (o = e.stats) == null ? void 0 : o.corners) == null ? void 0 : a.homeTeam) + ((R = (p = e.stats) == null ? void 0 : p.corners) == null ? void 0 : R.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 10, OVER_CORNERS_11_5: isNaN(((I = (T = e.stats) == null ? void 0 : T.corners) == null ? void 0 : I.homeTeam) + ((P = (L = e.stats) == null ? void 0 : L.corners) == null ? void 0 : P.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 11, OVER_CORNERS_12_5: isNaN(((x = (b = e.stats) == null ? void 0 : b.corners) == null ? void 0 : x.homeTeam) + ((M = (F = e.stats) == null ? void 0 : F.corners) == null ? void 0 : M.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 12, OVER_CORNERS_13_5: isNaN(((w = (G = e.stats) == null ? void 0 : G.corners) == null ? void 0 : w.homeTeam) + ((W = (H = e.stats) == null ? void 0 : H.corners) == null ? void 0 : W.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 13 };
  }
}, g.createOneXTwoResult = (e, n) => {
  var h, d, c, O;
  return n === "full_time" ? e.ftScore.homeGoals > e.ftScore.awayGoals ? "1" : e.ftScore.homeGoals === e.ftScore.awayGoals ? "x" : "2" : ((h = e == null ? void 0 : e.htScore) == null ? void 0 : h.homeGoals) > ((d = e == null ? void 0 : e.htScore) == null ? void 0 : d.awayGoals) ? "1" : ((c = e == null ? void 0 : e.htScore) == null ? void 0 : c.homeGoals) === ((O = e == null ? void 0 : e.htScore) == null ? void 0 : O.awayGoals) ? "x" : "2";
}, g.createDoubleChanceResult = (e) => {
  var n, h, d, c;
  return ((n = e == null ? void 0 : e.ftScore) == null ? void 0 : n.homeGoals) > ((h = e == null ? void 0 : e.ftScore) == null ? void 0 : h.awayGoals) ? ["1x", "12"] : ((d = e == null ? void 0 : e.ftScore) == null ? void 0 : d.homeGoals) === ((c = e == null ? void 0 : e.ftScore) == null ? void 0 : c.awayGoals) ? ["1x", "x2"] : ["x2", "12"];
}, g.createHalfTimeFullTimeResult = (e) => {
  var n, h, d, c, O, r, A, i, l, _, f, u, E, y, v, S, N, D, V, C, s, o, a, p;
  if (((n = e == null ? void 0 : e.htScore) == null ? void 0 : n.homeGoals) > ((h = e == null ? void 0 : e.htScore) == null ? void 0 : h.awayGoals)) {
    if (((d = e == null ? void 0 : e.ftScore) == null ? void 0 : d.homeGoals) > ((c = e == null ? void 0 : e.ftScore) == null ? void 0 : c.awayGoals)) return "1/1";
    if (((O = e == null ? void 0 : e.ftScore) == null ? void 0 : O.homeGoals) === ((r = e == null ? void 0 : e.ftScore) == null ? void 0 : r.awayGoals)) return "1/x";
    if (((A = e == null ? void 0 : e.ftScore) == null ? void 0 : A.homeGoals) < ((i = e == null ? void 0 : e.ftScore) == null ? void 0 : i.awayGoals)) return "1/2";
  }
  if (((l = e == null ? void 0 : e.htScore) == null ? void 0 : l.homeGoals) === ((_ = e == null ? void 0 : e.htScore) == null ? void 0 : _.awayGoals)) {
    if (((f = e == null ? void 0 : e.ftScore) == null ? void 0 : f.homeGoals) > ((u = e == null ? void 0 : e.ftScore) == null ? void 0 : u.awayGoals)) return "x/1";
    if (((E = e == null ? void 0 : e.ftScore) == null ? void 0 : E.homeGoals) === ((y = e == null ? void 0 : e.ftScore) == null ? void 0 : y.awayGoals)) return "x/x";
    if (((v = e == null ? void 0 : e.ftScore) == null ? void 0 : v.homeGoals) < ((S = e == null ? void 0 : e.ftScore) == null ? void 0 : S.awayGoals)) return "x/2";
  }
  if (((N = e == null ? void 0 : e.htScore) == null ? void 0 : N.homeGoals) < ((D = e == null ? void 0 : e.htScore) == null ? void 0 : D.awayGoals)) {
    if (((V = e == null ? void 0 : e.ftScore) == null ? void 0 : V.homeGoals) > ((C = e == null ? void 0 : e.ftScore) == null ? void 0 : C.awayGoals)) return "2/1";
    if (((s = e == null ? void 0 : e.ftScore) == null ? void 0 : s.homeGoals) === ((o = e == null ? void 0 : e.ftScore) == null ? void 0 : o.awayGoals)) return "2/x";
    if (((a = e == null ? void 0 : e.ftScore) == null ? void 0 : a.homeGoals) < ((p = e == null ? void 0 : e.ftScore) == null ? void 0 : p.awayGoals)) return "2/2";
  }
}, g.createMarketResultByCriteria = (e, n) => !e.timeline || !e.timeline.length ? null : n === "red_card" ? e.timeline.filter((h) => Number(h.minute) <= 90).some((h) => h.type === "red_card") : e.timeline.filter((h) => Number(h.minute) <= 90).some((h) => h.type.startsWith(n)), g.createPlayersMarketsResults = (e, n, h) => {
  if (!e.timeline || !e.timeline.length) return h === "first_goal" ? null : [];
  if (h === "first_goal") {
    let r = e.timeline.find((A) => A.type === "goal" || A.type === "penalty_goal" || A.type === "own_goal") || null;
    if (r) {
      let A = n[r.player.id];
      return { playerId: r.type === "goal" || r.type === "penalty_goal" ? r.player.id : "OWN_GOAL", playerModel: A };
    }
    return null;
  }
  if (h === "yellow_card" || h === "red_card") return g.transformPlayerMarketResult(e.timeline.filter((r) => Number(r.minute) <= 90).filter((r) => r.type === h).map((r) => n[r.player.id]));
  let d = /* @__PURE__ */ new Map(), c = h === "one_goal" ? 1 : h === "two_goals" ? 2 : 3, O = [];
  return e.timeline.filter((r) => Number(r.minute) <= 90).filter((r) => r.type === "goal" || r.type === "penalty_goal").forEach((r) => {
    let A = n[r.player.id];
    if (d.has(r.player.id)) {
      let i = d.get(r.player.id);
      i.push(A), d.set(r.player.id, i);
    } else d.set(r.player.id, [A]);
  }), d.forEach((r) => {
    r.length >= c && O.push(r[0]);
  }), g.transformPlayerMarketResult(O);
}, g.transformPlayerMarketResult = (e) => e.map((n) => ({ playerId: n.id, playerModel: n }));
Object.keys(new Lt());
(/* @__PURE__ */ new Map()).set("minutesPlayed", "Minutes Played").set("cleanSheets", "Clean Sheets").set("concededGoals", "Goals Conceded").set("saves", "Saves").set("penaltySaved", "Penalties Saved").set("penaltyCommitted", "Penalties Committed").set("yellowCards", "Yellow Cards").set("redCards", "Red Cards").set("assists", "Assists").set("foulsCommitted", "Fouls Committed").set("ownGoals", "Own Goals").set("goals", "Goals").set("tackles", "Tackles").set("shotsOn", "Shots On Target").set("penaltyGoals", "Penalty Goals").set("penaltyWon", "Penalty Won").set("penaltyMissed", "Penalty Missed").set("penaltySaved", "Penalty Saved").set("penaltyReceived", "Penalty Received").set("shots", "Shots").set("shotsBlocked", "Shots Blocked").set("offsides", "Offsides").set("foulsWon", "Fouls Won").set("tacklesBlocks", "Tackles Blocks").set("tacklesInterceptions", "Tackles Interceptions").set("caughtBall", "Caught Ball").set("passes", "Passes").set("crosses", "Crosses").set("interceptions", "Interceptions").set("keyPasses", "Key Passes").set("passesAccuracy", "Passes Accuracy").set("duels", "Duels").set("duelsWon", "Duels Won").set("dribblesAttempts", "Dribbles Attempts").set("dribblesSuccess", "Dribbles Success").set("dribblesPast", "Dribbles Past");
export {
  Ut as E,
  yt as a,
  Q as b,
  $t as c,
  q as d,
  X as e,
  zt as l,
  jt as m,
  Zt as n,
  pt as o,
  Jt as p,
  Qt as r,
  Xt as s,
  z as u,
  Wt as v,
  Bt as x,
  qt as y,
  Kt as z
};
