fansunited-frontend-components 0.0.92 → 0.0.94

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/Betslip.js +1 -1
  2. package/ChanceGame.js +139 -146
  3. package/ClassicQuizPlay.js +1 -1
  4. package/CollectLead.js +14 -20
  5. package/CompetitionStatistics.js +27 -27
  6. package/CompetitorCard.js +895 -891
  7. package/Discussion.js +1 -1
  8. package/EitherOrPlay.js +1 -1
  9. package/EventCard.js +1494 -1571
  10. package/EventGamePlay.js +1 -1
  11. package/Leaderboard.js +249 -257
  12. package/List.js +319 -436
  13. package/MatchQuizPlay.js +1 -1
  14. package/Odds.js +30 -30
  15. package/PersonalityQuizPlay.js +1 -1
  16. package/PickThePair.js +627 -693
  17. package/PlayerOfTheMatch.js +256 -279
  18. package/PollVote.js +1 -1
  19. package/Predictor.js +19443 -2
  20. package/README.md +2 -1
  21. package/Standings.js +94 -99
  22. package/TopX.js +5871 -6988
  23. package/chunks/ChanceGameEmbedVariant-C3NGwvTF.js +21 -0
  24. package/chunks/OddsSkeleton-Bav8FHHN.js +26 -0
  25. package/chunks/{OddsStrip-B159Nivm.js → OddsStrip-CviVfQI4.js} +51 -53
  26. package/chunks/{PickOneOfX-D9qlxKTD.js → PickOneOfX-a6Dv0-rR.js} +210 -212
  27. package/chunks/index-B1d9q8fX.js +4 -0
  28. package/chunks/index-BP0pvFJ4.js +4 -0
  29. package/chunks/index-CHZyL_g_.js +4 -0
  30. package/chunks/index-CeCUdRmF.js +4 -0
  31. package/chunks/index-Ckyyw-I8.js +4 -0
  32. package/chunks/index-DGvCP5G8.js +4 -0
  33. package/chunks/index-yjMVOgwO.js +4 -0
  34. package/chunks/{main-CcPVuc5G.js → main-CFwRpvUi.js} +219 -238
  35. package/chunks/{main-By2Fg4Us.js → main-D9tFZv2q.js} +272 -309
  36. package/chunks/{main-Db4YC1C9.js → main-Dj4Manb5.js} +386 -407
  37. package/chunks/{main-BhONg691.js → main-DjiQz1dv.js} +764 -1125
  38. package/chunks/{main-BoLNJccN.js → main-Dys2_Jt2.js} +1625 -1954
  39. package/chunks/{main-JAewg2VD.js → main-dwV_55lz.js} +409 -432
  40. package/chunks/main-eAQMCxQ7.js +1949 -0
  41. package/chunks/{main-CWfREbUv.js → main-gexg6lc-.js} +959 -977
  42. package/index.js +40 -44
  43. package/package.json +13 -5
  44. package/chunks/AccessTime-B7Q_InTi.js +0 -10
  45. package/chunks/AlertMessage-CTbc9daZ.js +0 -318
  46. package/chunks/Avatar-Ve0m4ut_.js +0 -353
  47. package/chunks/Button-x1sQVMH2.js +0 -665
  48. package/chunks/Card-DfxnA3Cz.js +0 -196
  49. package/chunks/CardActions-TMBAbk8a.js +0 -140
  50. package/chunks/CardContent-CLQHztIU.js +0 -106
  51. package/chunks/ChanceGameEmbedVariant-C3TKbPI4.js +0 -913
  52. package/chunks/CheckCircle-DW1VzjQO.js +0 -8
  53. package/chunks/Chip-BUoNpinI.js +0 -365
  54. package/chunks/CircularProgress-D88LgW2V.js +0 -317
  55. package/chunks/Close-BxLZcPtb.js +0 -9
  56. package/chunks/Close-DVx6f5-e.js +0 -8
  57. package/chunks/CollectLeadForm-DtUFKk99.js +0 -3419
  58. package/chunks/ConsentsList-BcIMKviP.js +0 -339
  59. package/chunks/DirectionScope-CK0duYt8.js +0 -36
  60. package/chunks/Divider-D_ALv2uC.js +0 -166
  61. package/chunks/Edit-CiKqhDom.js +0 -99
  62. package/chunks/EmojiEvents-BYoxruEl.js +0 -8
  63. package/chunks/FavoriteBorder-YhT6RHv5.js +0 -11
  64. package/chunks/FormControl-BNG04EhC.js +0 -656
  65. package/chunks/FormControlContext-Ct0huDDM.js +0 -6
  66. package/chunks/FormLabel-Bl7hTa8O.js +0 -130
  67. package/chunks/GlobalStyles-PokSS9bO.js +0 -12
  68. package/chunks/InlineSpinner-BhKW6lxZ.js +0 -28
  69. package/chunks/Input-B7kPqO0b.js +0 -391
  70. package/chunks/KeyboardArrowDown-OGGGLEnE.js +0 -8
  71. package/chunks/KeyboardArrowRight-DN7qrp17.js +0 -11
  72. package/chunks/KeyboardArrowUp-jvN5m_A0.js +0 -8
  73. package/chunks/Link-brb09X-6.js +0 -319
  74. package/chunks/ListItemButton-BFG5QJbo.js +0 -1151
  75. package/chunks/ModalClose-D3i-AyMB.js +0 -153
  76. package/chunks/ModalDialog-Be6w76fh.js +0 -880
  77. package/chunks/NotFoundSkeleton-BHRVG8yg.js +0 -83
  78. package/chunks/Notification-CC66HKXb.js +0 -614
  79. package/chunks/OddsSkeleton-BBOVhfsn.js +0 -137
  80. package/chunks/OverlayScoreStateSkeleton-D5rnBJ_w.js +0 -154
  81. package/chunks/OverlayScoreStateWrapperSkeleton-CTXzD0bm.js +0 -81
  82. package/chunks/OverlaySignInSkeleton-T8A_9Tco.js +0 -518
  83. package/chunks/OverlaySkeleton-y02LRXZy.js +0 -1193
  84. package/chunks/Person-BD-IO4aX.js +0 -8
  85. package/chunks/PersonOutline-Nxl_9g9S.js +0 -8
  86. package/chunks/Popper-CGfJHTbM.js +0 -1263
  87. package/chunks/Portal-DQQSLiON.js +0 -74
  88. package/chunks/Portal-X8O64KaQ.js +0 -66
  89. package/chunks/Predictor-BJBBwZ6R.js +0 -19513
  90. package/chunks/PrizeCard-B2tBhY45.js +0 -36400
  91. package/chunks/Search-jaDXe8g7.js +0 -14
  92. package/chunks/Select-CzBMHr7z.js +0 -1165
  93. package/chunks/Sheet-x-YGYOYz.js +0 -132
  94. package/chunks/SignInCta-3NFxIOuf.js +0 -79
  95. package/chunks/Spinner-_5U881sC.js +0 -39
  96. package/chunks/SportsSoccer-DLUgspA-.js +0 -20
  97. package/chunks/Stack-CDpKA1D-.js +0 -169
  98. package/chunks/StandardContentSkeleton-DaZftDxZ.js +0 -57
  99. package/chunks/Table-IJ9-D2DF.js +0 -394
  100. package/chunks/Tabs-iyOvjGfd.js +0 -1084
  101. package/chunks/Textarea-Dv_Z4l5j.js +0 -475
  102. package/chunks/TimerOutlined-jNsK__Zz.js +0 -8
  103. package/chunks/Tooltip-clSjN1oC.js +0 -535
  104. package/chunks/Typography-BsucZNXl.js +0 -775
  105. package/chunks/areArraysEqual-B3mXtHvh.js +0 -6
  106. package/chunks/colorInversionUtils-AoR_6ghW.js +0 -347
  107. package/chunks/createSvgIcon-BWoHeNkc.js +0 -2813
  108. package/chunks/createSvgIcon-DBkOhFdn.js +0 -206
  109. package/chunks/dividerClasses-BkQMLbsL.js +0 -9
  110. package/chunks/elementAcceptingRef-DjUfkpLB.js +0 -25
  111. package/chunks/enums-B1lTCQvC.js +0 -15
  112. package/chunks/formLabelClasses-N0g8NZ67.js +0 -9
  113. package/chunks/getReactElementRef-B3MFPBbS.js +0 -21
  114. package/chunks/helpers-CKFwVhwj.js +0 -558
  115. package/chunks/index-Bg5jypgn.js +0 -11
  116. package/chunks/index-Bnad45hB.js +0 -4
  117. package/chunks/index-C6rtfeRX.js +0 -4
  118. package/chunks/index-CFc0WTOi.js +0 -848
  119. package/chunks/index-C_kf8WZI.js +0 -4
  120. package/chunks/index-CaVpDbdC.js +0 -4
  121. package/chunks/index-DJJVbXn_.js +0 -4
  122. package/chunks/index-DQO7VDRC.js +0 -4
  123. package/chunks/index-Kgehqf8J.js +0 -4
  124. package/chunks/main-W_W6YBtr.js +0 -3280
  125. package/chunks/ownerWindow-PI509BpA.js +0 -7
  126. package/chunks/searchEntities-SJcoznz0.js +0 -38
  127. package/chunks/sportsEvents-CGX-WkNB.js +0 -27
  128. package/chunks/useButton-C9taTgFS.js +0 -106
  129. package/chunks/useConsents-BLhgfEDf.js +0 -1168
  130. package/chunks/useControlled-BYdyS7Pn.js +0 -31
  131. package/chunks/useEmbedCode-DCWnWGak.js +0 -31
  132. package/chunks/useEventCallback-C9W0M_8l.js +0 -14
  133. package/chunks/useForwardedInput-CkAnayh_.js +0 -180
  134. package/chunks/useImageVariant-B62O7iLC.js +0 -15
  135. package/chunks/useInfoPage-BHdgKdme.js +0 -50
  136. package/chunks/useParticipationDraft-Brnd_p3w.js +0 -307
  137. package/chunks/useSwitch-DLSSqtcZ.js +0 -66
  138. package/chunks/variantColorInheritance-DZr7CNx6.js +0 -30
  139. package/chunks/visuallyHidden-B8J7BVSJ.js +0 -14
@@ -1,848 +0,0 @@
1
- var lt = Object.create, $ = Object.defineProperty, ht = Object.getOwnPropertyDescriptor, ct = Object.getOwnPropertyNames, ut = Object.getPrototypeOf, dt = Object.prototype.hasOwnProperty, _t = (t, e) => () => (t && (e = t(t = 0)), e), W = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), Et = (t, e) => {
2
- for (var s in e) $(t, s, { get: e[s], enumerable: !0 });
3
- }, pt = (t, e, s, n) => {
4
- if (e && typeof e == "object" || typeof e == "function") for (let u of ct(e)) !dt.call(t, u) && u !== s && $(t, u, { get: () => e[u], enumerable: !(n = ht(e, u)) || n.enumerable });
5
- return t;
6
- }, q = (t, e, s) => (s = t != null ? lt(ut(t)) : {}, pt(!t || !t.__esModule ? $(s, "default", { value: t, enumerable: !0 }) : s, t)), Z = {};
7
- Et(Z, { default: () => tt });
8
- var Q, tt, mt = _t(() => {
9
- Q = { getItem: async () => null, setItem: async () => null, removeItem: async () => null, clear: async () => null, getAllKeys: async () => [], multiGet: async () => [], multiSet: async () => null, multiRemove: async () => null, mergeItem: async () => null, multiMerge: async () => null }, tt = Q;
10
- }), Ot = W((t, e) => {
11
- var s = function() {
12
- function n(d, E) {
13
- return E != null && d instanceof E;
14
- }
15
- var u;
16
- try {
17
- u = Map;
18
- } catch {
19
- u = function() {
20
- };
21
- }
22
- var c;
23
- try {
24
- c = Set;
25
- } catch {
26
- c = function() {
27
- };
28
- }
29
- var O;
30
- try {
31
- O = Promise;
32
- } catch {
33
- O = function() {
34
- };
35
- }
36
- function a(d, E, A, C, S) {
37
- typeof E == "object" && (A = E.depth, C = E.prototype, S = E.includeNonEnumerable, E = E.circular);
38
- var N = [], D = [], w = typeof Buffer < "u";
39
- typeof E > "u" && (E = !0), typeof A > "u" && (A = 1 / 0);
40
- function v(i, l) {
41
- if (i === null) return null;
42
- if (l === 0) return i;
43
- var o, p;
44
- if (typeof i != "object") return i;
45
- if (n(i, u)) o = new u();
46
- else if (n(i, c)) o = new c();
47
- else if (n(i, O)) o = new O(function(G, F) {
48
- i.then(function(k) {
49
- G(v(k, l - 1));
50
- }, function(k) {
51
- F(v(k, l - 1));
52
- });
53
- });
54
- else if (a.__isArray(i)) o = [];
55
- else if (a.__isRegExp(i)) o = new RegExp(i.source, m(i)), i.lastIndex && (o.lastIndex = i.lastIndex);
56
- else if (a.__isDate(i)) o = new Date(i.getTime());
57
- else {
58
- if (w && Buffer.isBuffer(i)) return Buffer.allocUnsafe ? o = Buffer.allocUnsafe(i.length) : o = new Buffer(i.length), i.copy(o), o;
59
- n(i, Error) ? o = Object.create(i) : typeof C > "u" ? (p = Object.getPrototypeOf(i), o = Object.create(p)) : (o = Object.create(C), p = C);
60
- }
61
- if (E) {
62
- var T = N.indexOf(i);
63
- if (T != -1) return D[T];
64
- N.push(i), D.push(o);
65
- }
66
- n(i, u) && i.forEach(function(G, F) {
67
- var k = v(F, l - 1), K = v(G, l - 1);
68
- o.set(k, K);
69
- }), n(i, c) && i.forEach(function(G) {
70
- var F = v(G, l - 1);
71
- o.add(F);
72
- });
73
- for (var f in i) {
74
- var y;
75
- p && (y = Object.getOwnPropertyDescriptor(p, f)), !(y && y.set == null) && (o[f] = v(i[f], l - 1));
76
- }
77
- if (Object.getOwnPropertySymbols) for (var L = Object.getOwnPropertySymbols(i), f = 0; f < L.length; f++) {
78
- var V = L[f], P = Object.getOwnPropertyDescriptor(i, V);
79
- P && !P.enumerable && !S || (o[V] = v(i[V], l - 1), P.enumerable || Object.defineProperty(o, V, { enumerable: !1 }));
80
- }
81
- if (S) for (var B = Object.getOwnPropertyNames(i), f = 0; f < B.length; f++) {
82
- var Y = B[f], P = Object.getOwnPropertyDescriptor(i, Y);
83
- P && P.enumerable || (o[Y] = v(i[Y], l - 1), Object.defineProperty(o, Y, { enumerable: !1 }));
84
- }
85
- return o;
86
- }
87
- return v(d, A);
88
- }
89
- a.clonePrototype = function(d) {
90
- if (d === null) return null;
91
- var E = function() {
92
- };
93
- return E.prototype = d, new E();
94
- };
95
- function I(d) {
96
- return Object.prototype.toString.call(d);
97
- }
98
- a.__objToStr = I;
99
- function r(d) {
100
- return typeof d == "object" && I(d) === "[object Date]";
101
- }
102
- a.__isDate = r;
103
- function h(d) {
104
- return typeof d == "object" && I(d) === "[object Array]";
105
- }
106
- a.__isArray = h;
107
- function _(d) {
108
- return typeof d == "object" && I(d) === "[object RegExp]";
109
- }
110
- a.__isRegExp = _;
111
- function m(d) {
112
- var E = "";
113
- return d.global && (E += "g"), d.ignoreCase && (E += "i"), d.multiline && (E += "m"), E;
114
- }
115
- return a.__getRegExpFlags = m, a;
116
- }();
117
- typeof e == "object" && e.exports && (e.exports = s);
118
- }), ft = W((t, e) => {
119
- var s = typeof Reflect == "object" ? Reflect : null, n = s && typeof s.apply == "function" ? s.apply : function(i, l, o) {
120
- return Function.prototype.apply.call(i, l, o);
121
- }, u;
122
- s && typeof s.ownKeys == "function" ? u = s.ownKeys : Object.getOwnPropertySymbols ? u = function(i) {
123
- return Object.getOwnPropertyNames(i).concat(Object.getOwnPropertySymbols(i));
124
- } : u = function(i) {
125
- return Object.getOwnPropertyNames(i);
126
- };
127
- function c(i) {
128
- console && console.warn && console.warn(i);
129
- }
130
- var O = Number.isNaN || function(i) {
131
- return i !== i;
132
- };
133
- function a() {
134
- a.init.call(this);
135
- }
136
- e.exports = a, e.exports.once = D, a.EventEmitter = a, a.prototype._events = void 0, a.prototype._eventsCount = 0, a.prototype._maxListeners = void 0;
137
- var I = 10;
138
- function r(i) {
139
- if (typeof i != "function") throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof i);
140
- }
141
- Object.defineProperty(a, "defaultMaxListeners", { enumerable: !0, get: function() {
142
- return I;
143
- }, set: function(i) {
144
- if (typeof i != "number" || i < 0 || O(i)) throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + i + ".");
145
- I = i;
146
- } }), a.init = function() {
147
- (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;
148
- }, a.prototype.setMaxListeners = function(i) {
149
- if (typeof i != "number" || i < 0 || O(i)) throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + i + ".");
150
- return this._maxListeners = i, this;
151
- };
152
- function h(i) {
153
- return i._maxListeners === void 0 ? a.defaultMaxListeners : i._maxListeners;
154
- }
155
- a.prototype.getMaxListeners = function() {
156
- return h(this);
157
- }, a.prototype.emit = function(i) {
158
- for (var l = [], o = 1; o < arguments.length; o++) l.push(arguments[o]);
159
- var p = i === "error", T = this._events;
160
- if (T !== void 0) p = p && T.error === void 0;
161
- else if (!p) return !1;
162
- if (p) {
163
- var f;
164
- if (l.length > 0 && (f = l[0]), f instanceof Error) throw f;
165
- var y = new Error("Unhandled error." + (f ? " (" + f.message + ")" : ""));
166
- throw y.context = f, y;
167
- }
168
- var L = T[i];
169
- if (L === void 0) return !1;
170
- if (typeof L == "function") n(L, this, l);
171
- else for (var V = L.length, P = C(L, V), o = 0; o < V; ++o) n(P[o], this, l);
172
- return !0;
173
- };
174
- function _(i, l, o, p) {
175
- var T, f, y;
176
- if (r(o), f = i._events, f === void 0 ? (f = i._events = /* @__PURE__ */ Object.create(null), i._eventsCount = 0) : (f.newListener !== void 0 && (i.emit("newListener", l, o.listener ? o.listener : o), f = i._events), y = f[l]), y === void 0) y = f[l] = o, ++i._eventsCount;
177
- else if (typeof y == "function" ? y = f[l] = p ? [o, y] : [y, o] : p ? y.unshift(o) : y.push(o), T = h(i), T > 0 && y.length > T && !y.warned) {
178
- y.warned = !0;
179
- var L = new Error("Possible EventEmitter memory leak detected. " + y.length + " " + String(l) + " listeners added. Use emitter.setMaxListeners() to increase limit");
180
- L.name = "MaxListenersExceededWarning", L.emitter = i, L.type = l, L.count = y.length, c(L);
181
- }
182
- return i;
183
- }
184
- a.prototype.addListener = function(i, l) {
185
- return _(this, i, l, !1);
186
- }, a.prototype.on = a.prototype.addListener, a.prototype.prependListener = function(i, l) {
187
- return _(this, i, l, !0);
188
- };
189
- function m() {
190
- 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);
191
- }
192
- function d(i, l, o) {
193
- var p = { fired: !1, wrapFn: void 0, target: i, type: l, listener: o }, T = m.bind(p);
194
- return T.listener = o, p.wrapFn = T, T;
195
- }
196
- a.prototype.once = function(i, l) {
197
- return r(l), this.on(i, d(this, i, l)), this;
198
- }, a.prototype.prependOnceListener = function(i, l) {
199
- return r(l), this.prependListener(i, d(this, i, l)), this;
200
- }, a.prototype.removeListener = function(i, l) {
201
- var o, p, T, f, y;
202
- if (r(l), p = this._events, p === void 0) return this;
203
- if (o = p[i], o === void 0) return this;
204
- if (o === l || o.listener === l) --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete p[i], p.removeListener && this.emit("removeListener", i, o.listener || l));
205
- else if (typeof o != "function") {
206
- for (T = -1, f = o.length - 1; f >= 0; f--) if (o[f] === l || o[f].listener === l) {
207
- y = o[f].listener, T = f;
208
- break;
209
- }
210
- if (T < 0) return this;
211
- T === 0 ? o.shift() : S(o, T), o.length === 1 && (p[i] = o[0]), p.removeListener !== void 0 && this.emit("removeListener", i, y || l);
212
- }
213
- return this;
214
- }, a.prototype.off = a.prototype.removeListener, a.prototype.removeAllListeners = function(i) {
215
- var l, o, p;
216
- if (o = this._events, o === void 0) return this;
217
- if (o.removeListener === void 0) return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : o[i] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete o[i]), this;
218
- if (arguments.length === 0) {
219
- var T = Object.keys(o), f;
220
- for (p = 0; p < T.length; ++p) f = T[p], f !== "removeListener" && this.removeAllListeners(f);
221
- return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
222
- }
223
- if (l = o[i], typeof l == "function") this.removeListener(i, l);
224
- else if (l !== void 0) for (p = l.length - 1; p >= 0; p--) this.removeListener(i, l[p]);
225
- return this;
226
- };
227
- function E(i, l, o) {
228
- var p = i._events;
229
- if (p === void 0) return [];
230
- var T = p[l];
231
- return T === void 0 ? [] : typeof T == "function" ? o ? [T.listener || T] : [T] : o ? N(T) : C(T, T.length);
232
- }
233
- a.prototype.listeners = function(i) {
234
- return E(this, i, !0);
235
- }, a.prototype.rawListeners = function(i) {
236
- return E(this, i, !1);
237
- }, a.listenerCount = function(i, l) {
238
- return typeof i.listenerCount == "function" ? i.listenerCount(l) : A.call(i, l);
239
- }, a.prototype.listenerCount = A;
240
- function A(i) {
241
- var l = this._events;
242
- if (l !== void 0) {
243
- var o = l[i];
244
- if (typeof o == "function") return 1;
245
- if (o !== void 0) return o.length;
246
- }
247
- return 0;
248
- }
249
- a.prototype.eventNames = function() {
250
- return this._eventsCount > 0 ? u(this._events) : [];
251
- };
252
- function C(i, l) {
253
- for (var o = new Array(l), p = 0; p < l; ++p) o[p] = i[p];
254
- return o;
255
- }
256
- function S(i, l) {
257
- for (; l + 1 < i.length; l++) i[l] = i[l + 1];
258
- i.pop();
259
- }
260
- function N(i) {
261
- for (var l = new Array(i.length), o = 0; o < l.length; ++o) l[o] = i[o].listener || i[o];
262
- return l;
263
- }
264
- function D(i, l) {
265
- return new Promise(function(o, p) {
266
- function T(y) {
267
- i.removeListener(l, f), p(y);
268
- }
269
- function f() {
270
- typeof i.removeListener == "function" && i.removeListener("error", T), o([].slice.call(arguments));
271
- }
272
- v(i, l, f, { once: !0 }), l !== "error" && w(i, T, { once: !0 });
273
- });
274
- }
275
- function w(i, l, o) {
276
- typeof i.on == "function" && v(i, "error", l, o);
277
- }
278
- function v(i, l, o, p) {
279
- if (typeof i.on == "function") p.once ? i.once(l, o) : i.on(l, o);
280
- else if (typeof i.addEventListener == "function") i.addEventListener(l, function T(f) {
281
- p.once && i.removeEventListener(l, T), o(f);
282
- });
283
- else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof i);
284
- }
285
- }), Tt = W((t, e) => {
286
- (function() {
287
- var s, n, u = [].splice, c = function(a, I) {
288
- if (!(a instanceof I)) throw new Error("Bound instance method accessed before binding");
289
- }, O = [].indexOf;
290
- n = Ot(), s = ft().EventEmitter, e.exports = (function() {
291
- class a extends s {
292
- constructor(r = {}) {
293
- 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 = r, 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((h) => {
294
- var _;
295
- _ = this[h], this[h] = function(...m) {
296
- var d, E, A, C;
297
- if (A = m, [...m] = A, [d] = u.call(m, -1), typeof d == "function") try {
298
- C = _(...m), d(null, C);
299
- } catch (S) {
300
- E = S, d(E);
301
- }
302
- else return _(...m, d);
303
- };
304
- })), this.stats = { hits: 0, misses: 0, keys: 0, ksize: 0, vsize: 0 }, this.validKeyTypes = ["string", "number"], this._checkData();
305
- }
306
- get(r) {
307
- var h, _;
308
- if (c(this, a), (_ = this._isInvalidKey(r)) != null) throw _;
309
- if (this.data[r] != null && this._check(r, this.data[r])) return this.stats.hits++, h = this._unwrap(this.data[r]), h;
310
- this.stats.misses++;
311
- }
312
- mget(r) {
313
- var h, _, m, d, E, A;
314
- if (c(this, a), !Array.isArray(r)) throw h = this._error("EKEYSTYPE"), h;
315
- for (A = {}, m = 0, E = r.length; m < E; m++) {
316
- if (d = r[m], (_ = this._isInvalidKey(d)) != null) throw _;
317
- this.data[d] != null && this._check(d, this.data[d]) ? (this.stats.hits++, A[d] = this._unwrap(this.data[d])) : this.stats.misses++;
318
- }
319
- return A;
320
- }
321
- set(r, h, _) {
322
- var m, d, E;
323
- if (c(this, a), this.options.maxKeys > -1 && this.stats.keys >= this.options.maxKeys) throw m = this._error("ECACHEFULL"), m;
324
- if (this.options.forceString, _ == null && (_ = this.options.stdTTL), (d = this._isInvalidKey(r)) != null) throw d;
325
- return E = !1, this.data[r] && (E = !0, this.stats.vsize -= this._getValLength(this._unwrap(this.data[r], !1))), this.data[r] = this._wrap(h, _), this.stats.vsize += this._getValLength(h), E || (this.stats.ksize += this._getKeyLength(r), this.stats.keys++), this.emit("set", r, h), !0;
326
- }
327
- mset(r) {
328
- var h, _, m, d, E, A, C, S, N, D;
329
- if (c(this, a), this.options.maxKeys > -1 && this.stats.keys + r.length >= this.options.maxKeys) throw h = this._error("ECACHEFULL"), h;
330
- for (m = 0, C = r.length; m < C; m++) {
331
- if (A = r[m], { key: E, val: D, ttl: N } = A, N && typeof N != "number") throw h = this._error("ETTLTYPE"), h;
332
- if ((_ = this._isInvalidKey(E)) != null) throw _;
333
- }
334
- for (d = 0, S = r.length; d < S; d++) A = r[d], { key: E, val: D, ttl: N } = A, this.set(E, D, N);
335
- return !0;
336
- }
337
- del(r) {
338
- var h, _, m, d, E, A;
339
- for (c(this, a), Array.isArray(r) || (r = [r]), h = 0, m = 0, E = r.length; m < E; m++) {
340
- if (d = r[m], (_ = this._isInvalidKey(d)) != null) throw _;
341
- this.data[d] != null && (this.stats.vsize -= this._getValLength(this._unwrap(this.data[d], !1)), this.stats.ksize -= this._getKeyLength(d), this.stats.keys--, h++, A = this.data[d], delete this.data[d], this.emit("del", d, A.v));
342
- }
343
- return h;
344
- }
345
- take(r) {
346
- var h;
347
- return c(this, a), h = this.get(r), h != null && this.del(r), h;
348
- }
349
- ttl(r, h) {
350
- var _;
351
- if (c(this, a), h || (h = this.options.stdTTL), !r) return !1;
352
- if ((_ = this._isInvalidKey(r)) != null) throw _;
353
- return this.data[r] != null && this._check(r, this.data[r]) ? (h >= 0 ? this.data[r] = this._wrap(this.data[r].v, h, !1) : this.del(r), !0) : !1;
354
- }
355
- getTtl(r) {
356
- var h, _;
357
- if (c(this, a), !!r) {
358
- if ((_ = this._isInvalidKey(r)) != null) throw _;
359
- if (this.data[r] != null && this._check(r, this.data[r])) return h = this.data[r].t, h;
360
- }
361
- }
362
- keys() {
363
- var r;
364
- return c(this, a), r = Object.keys(this.data), r;
365
- }
366
- has(r) {
367
- var h;
368
- return c(this, a), h = this.data[r] != null && this._check(r, this.data[r]), h;
369
- }
370
- getStats() {
371
- return c(this, a), this.stats;
372
- }
373
- flushAll(r = !0) {
374
- c(this, a), this.data = {}, this.stats = { hits: 0, misses: 0, keys: 0, ksize: 0, vsize: 0 }, this._killCheckPeriod(), this._checkData(r), this.emit("flush");
375
- }
376
- flushStats() {
377
- c(this, a), this.stats = { hits: 0, misses: 0, keys: 0, ksize: 0, vsize: 0 }, this.emit("flush_stats");
378
- }
379
- close() {
380
- c(this, a), this._killCheckPeriod();
381
- }
382
- _checkData(r = !0) {
383
- var h, _, m;
384
- c(this, a), _ = this.data;
385
- for (h in _) m = _[h], this._check(h, m);
386
- r && this.options.checkperiod > 0 && (this.checkTimeout = setTimeout(this._checkData, this.options.checkperiod * 1e3, r), this.checkTimeout != null && this.checkTimeout.unref != null && this.checkTimeout.unref());
387
- }
388
- _killCheckPeriod() {
389
- if (this.checkTimeout != null) return clearTimeout(this.checkTimeout);
390
- }
391
- _check(r, h) {
392
- var _;
393
- return c(this, a), _ = !0, h.t !== 0 && h.t < Date.now() && (this.options.deleteOnExpire && (_ = !1, this.del(r)), this.emit("expired", r, this._unwrap(h))), _;
394
- }
395
- _isInvalidKey(r) {
396
- var h;
397
- if (c(this, a), h = typeof r, O.call(this.validKeyTypes, h) < 0) return this._error("EKEYTYPE", { type: typeof r });
398
- }
399
- _wrap(r, h, _ = !0) {
400
- var m, d, E;
401
- return c(this, a), this.options.useClones || (_ = !1), d = Date.now(), m = 0, E = 1e3, h === 0 ? m = 0 : h ? m = d + h * E : this.options.stdTTL === 0 ? m = this.options.stdTTL : m = d + this.options.stdTTL * E, { t: m, v: _ ? n(r) : r };
402
- }
403
- _unwrap(r, h = !0) {
404
- return this.options.useClones || (h = !1), r.v != null ? h ? n(r.v) : r.v : null;
405
- }
406
- _getKeyLength(r) {
407
- return r.toString().length;
408
- }
409
- _getValLength(r) {
410
- return c(this, a), typeof r == "string" ? r.length : this.options.forceString ? JSON.stringify(r).length : Array.isArray(r) ? this.options.arrayValueSize * r.length : typeof r == "number" ? 8 : typeof (r == null ? void 0 : r.then) == "function" ? this.options.promiseValueSize : typeof Buffer < "u" && Buffer !== null && Buffer.isBuffer(r) ? r.length : r != null && typeof r == "object" ? this.options.objectValueSize * Object.keys(r).length : typeof r == "boolean" ? 8 : 0;
411
- }
412
- _error(r, h = {}) {
413
- var _;
414
- return c(this, a), _ = new Error(), _.name = r, _.errorcode = r, _.message = this.ERRORS[r] != null ? this.ERRORS[r](h) : "-", _.data = h, _;
415
- }
416
- _initErrors() {
417
- var r, h, _;
418
- c(this, a), this.ERRORS = {}, _ = this._ERRORS;
419
- for (h in _) r = _[h], this.ERRORS[h] = this.createErrorMessage(r);
420
- }
421
- createErrorMessage(r) {
422
- return function(h) {
423
- return r.replace("__key", h.type);
424
- };
425
- }
426
- }
427
- return a.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." }, a;
428
- }).call(this);
429
- }).call(t);
430
- }), et = W((t, e) => {
431
- (function() {
432
- var s;
433
- s = e.exports = Tt(), s.version = "5.1.2";
434
- }).call(t);
435
- }), Rt = ((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.TR = "tr", t))(Rt || {}), It = ((t) => (t.DEV = "dev", t.PROD = "prod", t.STAGING = "staging", t))(It || {}), yt = ((t) => (t.NATIVE = "native", t.ENETPULSE = "enetpulse", t.SPORTRADAR = "sportradar", t.SPORTAL_365 = "sportal365", t.API_FOOTBALL = "api_football", t.STATSCORE = "statscore", t))(yt || {}), At = ((t) => (t.DEFAULT = "default", t.STANDARD = "standard", t))(At || {}), Ct = ((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))(Ct || {});
436
- function X(t) {
437
- this.message = t;
438
- }
439
- X.prototype = new Error(), X.prototype.name = "InvalidCharacterError";
440
- typeof window < "u" && window.atob && window.atob.bind(window);
441
- function J(t) {
442
- this.message = t;
443
- }
444
- J.prototype = new Error(), J.prototype.name = "InvalidTokenError";
445
- var vt = ((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))(vt || {}), Lt = ((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.INVALID_MATCH_ID = "invalid_match_id", t.INVALID_DATE_RANGE = "invalid_date_range", t.ODDS_NOT_FOUND = "odds_not_found", t))(Lt || {}), H = { native: "id", sportradar: "sportradar_id", sportal365: "sportal365_id", enetpulse: "enetpulse_id", api_football: "api_football_id", statscore: "statscore_id" };
446
- (/* @__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");
447
- var St = ((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_ODDS_DATE_RANGE = "The filters 'dateFrom' and 'dateTo' are required when fetching odds by date range", t.INVALID_ODDS_DATE_RANGE = "The odds date range is invalid. 'dateFrom' and 'dateTo' must be ISO 8601 datetimes and 'dateTo' must be after 'dateFrom'", t.ODDS_DATE_RANGE_EXCEEDED = "The odds date range must not exceed 7 days", t.ODDS_NOT_FOUND = "No odds found for the given event_id", 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))(St || {}), Nt = ((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))(Nt || {}), gt = q(et()), R;
448
- R = class {
449
- constructor(e) {
450
- this.profileTTL = 600, this.clientTTL = 14400, this.profileBadgesTTL = 3600, this.idMappingsExpiration = 0, this.idSchema = "", this.clearData = async () => R.nodeCache.flushAll(), this.getEntityById = async (s, n) => {
451
- let u = R.nodeCache.get("ids");
452
- return u ? u.find((c) => {
453
- let O = H[this.idSchema];
454
- return c && `${c[O]}` === n && c.resource === s;
455
- }) : null;
456
- }, this.getEntity = async (s, n, u) => {
457
- let c = R.nodeCache.get("ids");
458
- return c ? Array.isArray(s) ? [] : null : Array.isArray(s) ? c.filter((O) => {
459
- let a = H[u];
460
- return O && s.includes(`${O[a]}`) && O.resource === n;
461
- }) : c.find((O) => {
462
- let a = H[u];
463
- return O && `${O[a]}` === s && O.resource === n;
464
- });
465
- }, this.checkForExistingIdObjs = async (s, n) => {
466
- let u = H[n], c = {};
467
- for (let O of Object.keys(s)) {
468
- let a = s[O], I = (await this.getEntity(a, O, n)).map((h) => h[u]), r = s[O].filter((h) => !I.includes(h));
469
- c[O] = a.map((h) => r.includes(h) ? { id: h, exists: !1 } : { id: h, exists: !0 });
470
- }
471
- return c;
472
- }, this.getIdsByType = async (s, n, u) => {
473
- let c = H[u], O = H[n], a = R.nodeCache.get("ids"), I = {};
474
- return a ? (Object.keys(s).forEach((r) => {
475
- let h = s[r], _ = [];
476
- a.forEach((m) => {
477
- h.forEach((d, E) => {
478
- d === m[O] && r === m.resource && (_[E] = m[c]);
479
- });
480
- }), I[r] = _;
481
- }), I) : null;
482
- }, this.addIdMapping = async (s) => {
483
- let n = R.nodeCache.get("ids");
484
- n.push(s), R.nodeCache.set("ids", n);
485
- }, this.addIdMappings = async (s) => {
486
- let n = R.nodeCache.get("ids");
487
- n = [...n, ...s], R.nodeCache.set("ids", n);
488
- }, this.addTopIdMappings = async (s) => {
489
- let n = R.nodeCache.get("ids"), u = 604800;
490
- if (n) {
491
- let c = JSON.parse(JSON.stringify(n));
492
- c = c.filter((O) => O.resource !== "match"), s = s.filter((O) => O.resource === "match"), c = [...c, ...s], R.nodeCache.set("ids", c);
493
- } else R.nodeCache.set("ids", s);
494
- this.idMappingsExpiration = Math.floor(Date.now() / 1e3) + u;
495
- }, this.setOwnProfile = async (s) => {
496
- R.nodeCache.set("profile", s, this.profileTTL);
497
- }, this.getOwnProfile = async () => R.nodeCache.get("profile"), this.getProfileCountries = async () => R.nodeCache.get("profile_countries"), this.setProfileCountries = async (s) => {
498
- R.nodeCache.set("profile_countries", s);
499
- }, this.getProfileStats = async () => R.nodeCache.get("profile_stats"), this.setProfileStats = async (s) => {
500
- R.nodeCache.set("profile_stats", s, this.profileTTL);
501
- }, this.getProfileBadges = async () => R.nodeCache.get("profile_badges"), this.setProfileBadges = async (s) => {
502
- R.nodeCache.set("profile_badges", s, this.profileBadgesTTL);
503
- }, this.getFootballCountries = async () => R.nodeCache.get("football_countries"), this.setFootballCountries = async (s) => {
504
- R.nodeCache.set("football_countries", s);
505
- }, this.getCompetitions = async (s) => {
506
- let n = R.nodeCache.get("football_competitions");
507
- return n ? s ? s.competitionSearchFilter(n) : n : null;
508
- }, this.setCompetitions = async (s) => {
509
- R.nodeCache.set("football_competitions", s);
510
- }, this.getCompetitionsLength = async () => {
511
- let s = R.nodeCache.get("football_competitions");
512
- return s ? s.length : 0;
513
- }, this.getClientFeatures = async () => R.nodeCache.get("client"), this.setClientFeatures = async (s) => {
514
- R.nodeCache.set("client", s, this.clientTTL);
515
- }, this.deleteClientFeatures = async () => {
516
- R.nodeCache.del("client");
517
- }, this.getExpiration = async (s, n) => {
518
- let u = this.getKeyFromExpirationType(n);
519
- return u === "ids" ? this.idMappingsExpiration : R.nodeCache.getTtl(u);
520
- }, this.getKeyFromExpirationType = (s) => {
521
- switch (s) {
522
- case "profile":
523
- return "profile";
524
- case "statistics":
525
- return "profile_stats";
526
- case "badges":
527
- return "profile_badges";
528
- case "features":
529
- return "client";
530
- case "ids":
531
- return "ids";
532
- }
533
- };
534
- }
535
- static getInstance(e) {
536
- return R.instance || (R.instance = new R(e), R.nodeCache.options.useClones = !1), R.instance;
537
- }
538
- }, R.nodeCache = new gt.default();
539
- var Dt = ((t) => (t.ACTIVE = "ACTIVE", t.WON = "WON", t.LOST = "LOST", t.PARTIALLY_WON = "PARTIALLY_WON", t.CANCELED = "CANCELED", t))(Dt || {}), bt = ((t) => (t.ACTIVE = "ACTIVE", t.WON = "WON", t.LOST = "LOST", t.PARTIALLY_WON = "PARTIALLY_WON", t.CANCELED = "CANCELED", t))(bt || {}), ie = class {
540
- constructor() {
541
- 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;
542
- }
543
- }, Pt = ((t) => (t.BOOLEAN = "BOOLEAN", t.NUMBER = "NUMBER", t.ENUM = "ENUM", t.FREE_INPUT = "FREE_INPUT", t))(Pt || {}), Vt = ((t) => (t.PARTICIPANT_ONE = "PARTICIPANT_ONE", t.PARTICIPANT_TWO = "PARTICIPANT_TWO", t.DRAW = "DRAW", t))(Vt || {}), wt = ((t) => (t.OPEN = "OPEN", t.LIVE = "LIVE", t.PENDING = "PENDING", t.CANCELED = "CANCELED", t.CLOSED = "CLOSED", t.SETTLED = "SETTLED", t))(wt || {}), re = class {
544
- constructor() {
545
- this.fixtures = [];
546
- }
547
- }, Mt = class {
548
- constructor() {
549
- 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;
550
- }
551
- }, ae = class {
552
- constructor(t) {
553
- this.countryIds = null, this.competitionIds = null, this.matchIds = null, this.status = null, this.teamIds = null, this.fromDate = null, this.toDate = null, this.limit = null, this.page = null, this.sortField = null, this.sortOrder = null, this.constructFilterUrl = (e) => {
554
- let s = "";
555
- return this.countryIds && (s = s + "&", s = s + `countries=${this.countryIds.join(",")}`), this.competitionIds && this.competitionIds.length > 0 && (s = s + "&", s = s + `competitions=${this.competitionIds.join(",")}`), this.matchIds && this.matchIds.length > 0 && (s = s + "&", s = s + `matches=${this.matchIds.join(",")}`), this.status && (s = s + "&", s = s + `status=${this.status}`), this.teamIds && this.teamIds.length > 0 && (s = s + "&", s = s + `teams=${this.teamIds.join(",")}`), this.fromDate && (s = s + "&", s = s + `from_date=${this.fromDate}`), this.toDate && (s = s + "&", s = s + `to_date=${this.toDate}`), this.limit && !e && (s = s + "&", s = s + `limit=${this.limit}`), this.page && !e && (s = s + "&", s = s + `page=${this.page}`), this.sortField && (s = s + "&", s = s + `sort_field=${this.sortField}`), this.sortOrder && (s = s + "&", s = s + `sort_order=${this.sortOrder}`), s;
556
- }, this.countryIds = t.countryIds ? t.countryIds : null, this.competitionIds = t.competitionIds ? t.competitionIds : null, this.matchIds = t.matchIds ? t.matchIds : null, this.status = t.status ? t.status : null, this.teamIds = t.teamIds ? t.teamIds : null, this.fromDate = t.fromDate ? t.fromDate : null, this.toDate = t.toDate ? t.toDate : null, this.limit = t.limit ? t.limit : null, this.page = t.page ? t.page : null, this.sortField = t.sortField ? t.sortField : null, this.sortOrder = t.sortOrder ? t.sortOrder : null;
557
- }
558
- }, j = class {
559
- constructor() {
560
- this.main = null, this.cover = null, this.mobile = null;
561
- }
562
- }, Gt = class {
563
- constructor() {
564
- this.timeTiebreaker = !1;
565
- }
566
- }, Ft = class {
567
- constructor() {
568
- this.id = null, this.title = null, this.alternativeTitle = null, this.description = null, this.type = null, this.images = new j(), 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;
569
- }
570
- }, ne = class extends Ft {
571
- constructor() {
572
- super(...arguments), this.rules = null, this.questions = [];
573
- }
574
- }, oe = class {
575
- constructor() {
576
- this.classicQuizId = null, this.classicQuizModel = null, this.correct = null, this.classicQuizQuestions = null, this.personalBest = null, this.points = null, this.answers = [], this.attempts = 0;
577
- }
578
- }, kt = class {
579
- constructor() {
580
- this.id = "", this.title = "", this.alternativeTitle = "", this.description = "", this.images = new j(), 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 = "";
581
- }
582
- }, le = class extends kt {
583
- constructor() {
584
- super(...arguments), this.rules = "";
585
- }
586
- }, xt = class {
587
- constructor() {
588
- this.id = null, this.title = null, this.alternativeTitle = null, this.description = null, this.images = new j(), 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;
589
- }
590
- }, he = class extends xt {
591
- constructor() {
592
- super(...arguments), this.rules = null, this.questions = [], this.personaResults = [];
593
- }
594
- }, ce = class {
595
- constructor() {
596
- this.personalityQuizId = null, this.userId = null, this.questions = [], this.personas = [], this.attempts = null;
597
- }
598
- }, Yt = ((t) => (t.PRE_EVENT = "PRE_EVENT", t.LIVE = "LIVE", t.ALL = "ALL", t))(Yt || {}), st = ((t) => (t.ORDINARY_TIME = "ORDINARY_TIME", t.FULL_TIME = "FULL_TIME", t))(st || {}), it = ((t) => (t.DECIMAL = "DECIMAL", t.MONEYLINE = "MONEYLINE", t.FRACTIONAL = "FRACTIONAL", t))(it || {}), rt = ((t) => (t.FT_1X2 = "FT_1X2", t.HT_1X2 = "HT_1X2", t.DOUBLE_CHANCE = "DOUBLE_CHANCE", t.DRAW_NO_BET = "DRAW_NO_BET", t.HT_FT = "HT_FT", t.BOTH_TEAMS_SCORE = "BOTH_TEAMS_SCORE", t.CORRECT_SCORE = "CORRECT_SCORE", t.TEAM_SCORE_FIRST_GOAL = "TEAM_SCORE_FIRST_GOAL", 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.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))(rt || {}), ue = class {
599
- constructor(t) {
600
- this.oddType = "PRE_EVENT", this.scopeType = "ORDINARY_TIME", this.oddFormat = "DECIMAL", this.marketTypes = ["FT_1X2"], this.operators = null, this.affiliateId = null, this.affiliateIds = null, this.language = null, this.validateFilters(t);
601
- }
602
- constructFiltersUrl() {
603
- let t = `&odds_format=${this.oddFormat}`;
604
- this.operators && this.operators.length > 0 && (t += `&operators=${this.operators.join(",")}`);
605
- let e = this.constructAffiliateIds();
606
- return e && (t += `&affiliate_ids=${e}`), this.affiliateId && (t += `&affiliate_id=${encodeURIComponent(this.affiliateId)}`), this.language && (t += `&language=${encodeURIComponent(this.language)}`), t;
607
- }
608
- constructAffiliateIds() {
609
- return this.affiliateIds ? Object.keys(this.affiliateIds).filter((t) => t && this.affiliateIds[t]).map((t) => `${encodeURIComponent(t)}:${encodeURIComponent(this.affiliateIds[t])}`).join(",") : "";
610
- }
611
- validateFilters(t) {
612
- let e = Object.values(st), s = Object.values(it), n = Object.values(rt);
613
- if (t != null && t.oddType && console.warn('The filter "oddType" is ignored: the odds API has no odd type request parameter, so pre-event and live odds cannot be requested separately. Whichever applies is reported on each MatchOddsModel.type ("PRE_EVENT" or "LIVE"), derived from the match status.'), t != null && t.scopeType && (e.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 : ${e.join(", ")}`)), t != null && t.oddFormat && (t.oddFormat === "MONEYLINE" ? console.warn('The odd format "MONEYLINE" is not supported by the odds provider and therefore it will be set to DECIMAL.') : s.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 : ${s.join(", ")}`)), (t == null ? void 0 : t.marketTypes) && Array.isArray(t.marketTypes) && t.marketTypes.length > 0) {
614
- let u = t.marketTypes.filter((c) => !n.includes(c));
615
- u.length > 0 && console.warn(`The following market types are not known to this SDK version and will be matched against the API response as-is: ${u.join(", ")}`), this.marketTypes = t.marketTypes;
616
- }
617
- t != null && t.operators && Array.isArray(t.operators) && (this.operators = t.operators), t != null && t.affiliateId && (this.affiliateId = t.affiliateId), (t == null ? void 0 : t.affiliateIds) instanceof Object && !Array.isArray(t.affiliateIds) && (this.affiliateIds = t.affiliateIds), t != null && t.language && (this.language = t.language);
618
- }
619
- }, Ut = ((t) => (t.FOOTBALL = "FOOTBALL", t.BASKETBALL = "BASKETBALL", t.TENNIS = "TENNIS", t.AMERICAN_FOOTBALL = "AMERICAN_FOOTBALL", t.FORMULA_1 = "FORMULA_1", t.HOCKEY = "HOCKEY", t))(Ut || {}), de = class {
620
- constructor() {
621
- this.gameInstanceId = null, this.fixtures = null;
622
- }
623
- }, Ht = ((t) => (t.ACTIVE = "ACTIVE", t.WON = "WON", t.LOST = "LOST", t.PARTIALLY_WON = "PARTIALLY_WON", t.CANCELED = "CANCELED", t))(Ht || {}), Bt = class {
624
- constructor() {
625
- 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 Gt(), 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 j(), this.createdAt = null, this.updatedAt = null;
626
- }
627
- }, _e = class extends Bt {
628
- constructor() {
629
- super(...arguments), this.adContent = null;
630
- }
631
- }, jt = class {
632
- constructor() {
633
- this.id = null, this.title = null, this.alternativeTitle = null, this.description = null, this.type = null, this.images = new j(), 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;
634
- }
635
- }, Ee = class extends jt {
636
- constructor() {
637
- super(...arguments), this.rules = null;
638
- }
639
- }, Kt = class {
640
- constructor() {
641
- this.id = null, this.pollId = null, this.optionId = null, this.optionIds = [], this.userId = null, this.createdAt = null;
642
- }
643
- }, pe = class extends Kt {
644
- constructor() {
645
- super(...arguments), this.previousVotes = [], this.attempts = null;
646
- }
647
- }, Wt = ((t) => (t.LIKE = "like", t.DISLIKE = "dislike", t.SHARE = "share", t.COMMENT = "comment", t.PREDICTION_MADE = "prediction_made", t))(Wt || {}), Xt = ((t) => (t.CORRECT = "CORRECT", t.INCORRECT = "INCORRECT", t.PARTIALLY_CORRECT = "PARTIALLY_CORRECT", t.NOT_VERIFIED = "NOT_VERIFIED", t))(Xt || {}), $t = ((t) => (t.ONE = "1", t.X = "x", t.TWO = "2", t))($t || {}), zt = ((t) => (t.ONE_X = "1x", t.X_TWO = "x2", t.ONE_TWO = "12", t))(zt || {}), Qt = ((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))(Qt || {}), Jt = ((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))(Jt || {}), b;
648
- b = class {
649
- constructor() {
650
- }
651
- static createMatchMarketsResultsModel(e, s) {
652
- var n, u, c, O, a, I, r, h, _, m, d, E, A, C, S, N, D, w, v, i, l, o, p, T, f, y, L, V, P, B, Y, G, F, k, K, z;
653
- 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(((u = (n = e.stats) == null ? void 0 : n.corners) == null ? void 0 : u.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, s, "yellow_card"), PLAYER_RED_CARD: this.createPlayersMarketsResults(e, s, "red_card"), PLAYER_SCORE_FIRST_GOAL: this.createPlayersMarketsResults(e, s, "first_goal"), PLAYER_SCORE: this.createPlayersMarketsResults(e, s, "one_goal"), PLAYER_SCORE_TWICE: this.createPlayersMarketsResults(e, s, "two_goals"), PLAYER_SCORE_HATTRICK: this.createPlayersMarketsResults(e, s, "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(((I = (a = e.stats) == null ? void 0 : a.corners) == null ? void 0 : I.homeTeam) + ((h = (r = e.stats) == null ? void 0 : r.corners) == null ? void 0 : h.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 6, OVER_CORNERS_7_5: isNaN(((m = (_ = e.stats) == null ? void 0 : _.corners) == null ? void 0 : m.homeTeam) + ((E = (d = e.stats) == null ? void 0 : d.corners) == null ? void 0 : E.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 7, OVER_CORNERS_8_5: isNaN(((C = (A = e.stats) == null ? void 0 : A.corners) == null ? void 0 : C.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(((w = (D = e.stats) == null ? void 0 : D.corners) == null ? void 0 : w.homeTeam) + ((i = (v = e.stats) == null ? void 0 : v.corners) == null ? void 0 : i.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 9, OVER_CORNERS_10_5: isNaN(((o = (l = e.stats) == null ? void 0 : l.corners) == null ? void 0 : o.homeTeam) + ((T = (p = e.stats) == null ? void 0 : p.corners) == null ? void 0 : T.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 10, OVER_CORNERS_11_5: isNaN(((y = (f = e.stats) == null ? void 0 : f.corners) == null ? void 0 : y.homeTeam) + ((V = (L = e.stats) == null ? void 0 : L.corners) == null ? void 0 : V.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 11, OVER_CORNERS_12_5: isNaN(((B = (P = e.stats) == null ? void 0 : P.corners) == null ? void 0 : B.homeTeam) + ((G = (Y = e.stats) == null ? void 0 : Y.corners) == null ? void 0 : G.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 12, OVER_CORNERS_13_5: isNaN(((k = (F = e.stats) == null ? void 0 : F.corners) == null ? void 0 : k.homeTeam) + ((z = (K = e.stats) == null ? void 0 : K.corners) == null ? void 0 : z.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 13 };
654
- }
655
- }, b.createOneXTwoResult = (e, s) => {
656
- var n, u, c, O;
657
- return s === "full_time" ? e.ftScore.homeGoals > e.ftScore.awayGoals ? "1" : e.ftScore.homeGoals === e.ftScore.awayGoals ? "x" : "2" : ((n = e == null ? void 0 : e.htScore) == null ? void 0 : n.homeGoals) > ((u = e == null ? void 0 : e.htScore) == null ? void 0 : u.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";
658
- }, b.createDoubleChanceResult = (e) => {
659
- var s, n, u, c;
660
- return ((s = e == null ? void 0 : e.ftScore) == null ? void 0 : s.homeGoals) > ((n = e == null ? void 0 : e.ftScore) == null ? void 0 : n.awayGoals) ? ["1x", "12"] : ((u = e == null ? void 0 : e.ftScore) == null ? void 0 : u.homeGoals) === ((c = e == null ? void 0 : e.ftScore) == null ? void 0 : c.awayGoals) ? ["1x", "x2"] : ["x2", "12"];
661
- }, b.createHalfTimeFullTimeResult = (e) => {
662
- var s, n, u, c, O, a, I, r, h, _, m, d, E, A, C, S, N, D, w, v, i, l, o, p;
663
- if (((s = e == null ? void 0 : e.htScore) == null ? void 0 : s.homeGoals) > ((n = e == null ? void 0 : e.htScore) == null ? void 0 : n.awayGoals)) {
664
- if (((u = e == null ? void 0 : e.ftScore) == null ? void 0 : u.homeGoals) > ((c = e == null ? void 0 : e.ftScore) == null ? void 0 : c.awayGoals)) return "1/1";
665
- if (((O = e == null ? void 0 : e.ftScore) == null ? void 0 : O.homeGoals) === ((a = e == null ? void 0 : e.ftScore) == null ? void 0 : a.awayGoals)) return "1/x";
666
- if (((I = e == null ? void 0 : e.ftScore) == null ? void 0 : I.homeGoals) < ((r = e == null ? void 0 : e.ftScore) == null ? void 0 : r.awayGoals)) return "1/2";
667
- }
668
- if (((h = e == null ? void 0 : e.htScore) == null ? void 0 : h.homeGoals) === ((_ = e == null ? void 0 : e.htScore) == null ? void 0 : _.awayGoals)) {
669
- if (((m = e == null ? void 0 : e.ftScore) == null ? void 0 : m.homeGoals) > ((d = e == null ? void 0 : e.ftScore) == null ? void 0 : d.awayGoals)) return "x/1";
670
- if (((E = e == null ? void 0 : e.ftScore) == null ? void 0 : E.homeGoals) === ((A = e == null ? void 0 : e.ftScore) == null ? void 0 : A.awayGoals)) return "x/x";
671
- if (((C = e == null ? void 0 : e.ftScore) == null ? void 0 : C.homeGoals) < ((S = e == null ? void 0 : e.ftScore) == null ? void 0 : S.awayGoals)) return "x/2";
672
- }
673
- 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)) {
674
- if (((w = e == null ? void 0 : e.ftScore) == null ? void 0 : w.homeGoals) > ((v = e == null ? void 0 : e.ftScore) == null ? void 0 : v.awayGoals)) return "2/1";
675
- if (((i = e == null ? void 0 : e.ftScore) == null ? void 0 : i.homeGoals) === ((l = e == null ? void 0 : e.ftScore) == null ? void 0 : l.awayGoals)) return "2/x";
676
- if (((o = e == null ? void 0 : e.ftScore) == null ? void 0 : o.homeGoals) < ((p = e == null ? void 0 : e.ftScore) == null ? void 0 : p.awayGoals)) return "2/2";
677
- }
678
- }, b.createMarketResultByCriteria = (e, s) => !e.timeline || !e.timeline.length ? null : s === "red_card" ? e.timeline.filter((n) => Number(n.minute) <= 90).some((n) => n.type === "red_card") : e.timeline.filter((n) => Number(n.minute) <= 90).some((n) => n.type.startsWith(s)), b.createPlayersMarketsResults = (e, s, n) => {
679
- if (!e.timeline || !e.timeline.length) return n === "first_goal" ? null : [];
680
- if (n === "first_goal") {
681
- let a = e.timeline.find((I) => I.type === "goal" || I.type === "penalty_goal" || I.type === "own_goal") || null;
682
- if (a) {
683
- let I = s[a.player.id];
684
- return { playerId: a.type === "goal" || a.type === "penalty_goal" ? a.player.id : "OWN_GOAL", playerModel: I };
685
- }
686
- return null;
687
- }
688
- if (n === "yellow_card" || n === "red_card") return b.transformPlayerMarketResult(e.timeline.filter((a) => Number(a.minute) <= 90).filter((a) => a.type === n).map((a) => s[a.player.id]));
689
- let u = /* @__PURE__ */ new Map(), c = n === "one_goal" ? 1 : n === "two_goals" ? 2 : 3, O = [];
690
- return e.timeline.filter((a) => Number(a.minute) <= 90).filter((a) => a.type === "goal" || a.type === "penalty_goal").forEach((a) => {
691
- let I = s[a.player.id];
692
- if (u.has(a.player.id)) {
693
- let r = u.get(a.player.id);
694
- r.push(I), u.set(a.player.id, r);
695
- } else u.set(a.player.id, [I]);
696
- }), u.forEach((a) => {
697
- a.length >= c && O.push(a[0]);
698
- }), b.transformPlayerMarketResult(O);
699
- }, b.transformPlayerMarketResult = (e) => e.map((s) => ({ playerId: s.id, playerModel: s }));
700
- Object.keys(new Mt());
701
- (/* @__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");
702
- var at = class nt {
703
- constructor(e, s, n = null, u = Date.now(), c = null) {
704
- this.data = e, this.expiresAt = s, this.lastModified = n, this.storedAt = u, this.hardExpiresAt = c;
705
- }
706
- isFresh(e = Date.now()) {
707
- return e < this.expiresAt;
708
- }
709
- isExpired(e = Date.now()) {
710
- return this.hardExpiresAt !== null && e >= this.hardExpiresAt;
711
- }
712
- toPlain() {
713
- return { data: this.data, expiresAt: this.expiresAt, hardExpiresAt: this.hardExpiresAt, lastModified: this.lastModified, storedAt: this.storedAt };
714
- }
715
- static fromPlain(e) {
716
- return !e || typeof e.expiresAt != "number" ? null : new nt(e.data, e.expiresAt, e.lastModified || null, e.storedAt || Date.now(), typeof e.hardExpiresAt == "number" ? e.hardExpiresAt : null);
717
- }
718
- }, qt = class {
719
- constructor(t, e) {
720
- this.dbPromise = null, this.isSupported = () => typeof indexedDB < "u" && indexedDB !== null, this.openDb = () => this.dbPromise ? this.dbPromise : (this.dbPromise = new Promise((s) => {
721
- if (!this.isSupported()) {
722
- s(null);
723
- return;
724
- }
725
- try {
726
- let n = indexedDB.open(this.dbName, 1);
727
- n.onupgradeneeded = () => {
728
- let u = n.result;
729
- u.objectStoreNames.contains(this.storeName) || u.createObjectStore(this.storeName);
730
- }, n.onsuccess = () => s(n.result), n.onerror = () => s(null);
731
- } catch {
732
- s(null);
733
- }
734
- }), this.dbPromise), this.runTransaction = (s, n) => this.openDb().then((u) => new Promise((c) => {
735
- if (!u) {
736
- c(null);
737
- return;
738
- }
739
- try {
740
- let O = u.transaction(this.storeName, s), a = n(O.objectStore(this.storeName));
741
- a.onsuccess = () => c(a.result !== void 0 ? a.result : null), a.onerror = () => c(null);
742
- } catch {
743
- c(null);
744
- }
745
- })), this.get = (s) => this.runTransaction("readonly", (n) => n.get(s)), this.set = (s, n) => this.runTransaction("readwrite", (u) => u.put(n, s)).then(() => {
746
- }), this.delete = (s) => this.runTransaction("readwrite", (n) => n.delete(s)).then(() => {
747
- }), this.clear = () => this.runTransaction("readwrite", (s) => s.clear()).then(() => {
748
- }), this.dbName = t, this.storeName = e;
749
- }
750
- }, ot = class {
751
- constructor() {
752
- this.store = /* @__PURE__ */ new Map(), this.get = async (t) => this.store.get(t) || null, this.set = async (t, e) => {
753
- this.store.set(t, e);
754
- }, this.delete = async (t) => {
755
- this.store.delete(t);
756
- }, this.clear = async () => {
757
- this.store.clear();
758
- };
759
- }
760
- }, M, Zt = (M = class {
761
- constructor() {
762
- this.l1 = new ot(), this.get = async (e) => {
763
- let s = await this.l1.get(e);
764
- if (s) return s;
765
- let n = await this.l2.get(e), u = at.fromPlain(n);
766
- return u && await this.l1.set(e, u), u;
767
- }, this.set = async (e, s) => {
768
- await this.l1.set(e, s), await this.l2.set(e, s.toPlain());
769
- }, this.delete = async (e) => {
770
- await this.l1.delete(e), await this.l2.delete(e);
771
- }, this.clear = async () => {
772
- await this.l1.clear(), await this.l2.clear();
773
- }, this.l2 = new qt(M.DB_NAME, M.STORE_NAME);
774
- }
775
- }, M.DB_NAME = "fansunited-sdk-cache", M.STORE_NAME = "http-responses", M), x, te = (x = class {
776
- constructor() {
777
- this.l1 = new ot(), this.loadStorage = async () => {
778
- try {
779
- return (await Promise.resolve().then(() => (mt(), Z))).default;
780
- } catch (e) {
781
- return console.warn("AsyncStorage unavailable, HTTP cache will run memory-only", e), null;
782
- }
783
- }, this.getStorage = () => this.storagePromise, this.storageKey = (e) => `${x.KEY_PREFIX}${e}`, this.get = async (e) => {
784
- let s = await this.l1.get(e);
785
- if (s) return s;
786
- let n = await this.getStorage();
787
- if (!n) return null;
788
- try {
789
- let u = await n.getItem(this.storageKey(e)), c = u ? at.fromPlain(JSON.parse(u)) : null;
790
- return c && await this.l1.set(e, c), c;
791
- } catch {
792
- return null;
793
- }
794
- }, this.set = async (e, s) => {
795
- await this.l1.set(e, s);
796
- let n = await this.getStorage();
797
- if (n) try {
798
- await n.setItem(this.storageKey(e), JSON.stringify(s.toPlain()));
799
- } catch {
800
- }
801
- }, this.delete = async (e) => {
802
- await this.l1.delete(e);
803
- let s = await this.getStorage();
804
- if (s) try {
805
- await s.removeItem(this.storageKey(e));
806
- } catch {
807
- }
808
- }, this.clear = async () => {
809
- await this.l1.clear();
810
- let e = await this.getStorage();
811
- if (e) try {
812
- let s = (await e.getAllKeys()).filter((n) => n.startsWith(x.KEY_PREFIX));
813
- s.length > 0 && await e.multiRemove(s);
814
- } catch {
815
- }
816
- }, this.storagePromise = this.loadStorage();
817
- }
818
- }, x.KEY_PREFIX = "fansunited-sdk-cache:", x), ee = q(et()), U, se = (U = class {
819
- constructor() {
820
- this.get = async (e) => this.cache.get(e) || null, this.set = async (e, s) => {
821
- this.cache.set(e, s);
822
- }, this.delete = async (e) => {
823
- this.cache.del(e);
824
- }, this.clear = async () => {
825
- this.cache.flushAll();
826
- }, this.cache = new ee.default({ stdTTL: U.MAX_RETENTION_SECONDS, useClones: !1 });
827
- }
828
- }, U.MAX_RETENTION_SECONDS = 86400, U), g;
829
- g = class {
830
- }, g.instance = null, g.getInstance = () => g.instance ? g.instance : typeof window > "u" ? (g.instance = new se(), g.instance) : typeof __DEV__ < "u" ? (g.instance = new te(), g.instance) : (g.instance = new Zt(), g.instance);
831
- export {
832
- oe as D,
833
- Ee as L,
834
- ce as T,
835
- he as _,
836
- ie as a,
837
- Pt as b,
838
- re as c,
839
- de as d,
840
- _e as f,
841
- it as h,
842
- ne as j,
843
- pe as k,
844
- ae as l,
845
- Ct as n,
846
- le as s,
847
- ue as t
848
- };