fansunited-frontend-components 0.0.39 → 0.0.40

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 (48) hide show
  1. package/ChanceGame.js +104 -102
  2. package/ClassicQuizPlay.js +45 -42
  3. package/CollectLead.js +25 -24
  4. package/Discussion.js +376 -378
  5. package/EitherOrPlay.d.ts +4 -0
  6. package/EitherOrPlay.d.ts.map +1 -0
  7. package/EitherOrPlay.js +2533 -0
  8. package/EventGamePlay.js +59 -54
  9. package/MatchQuizPlay.js +63 -57
  10. package/PersonalityQuizPlay.js +7935 -7201
  11. package/PickThePair.js +153 -151
  12. package/PollVote.js +108 -104
  13. package/chunks/{AlertMessage-C2aBXCrl.js → AlertMessage-cjTHrMUK.js} +51 -51
  14. package/chunks/ArrowRightAlt-88jKjh6A.js +8 -0
  15. package/chunks/Avatar-CQCrd1m-.js +352 -0
  16. package/chunks/ChanceGameEmbedVariant-DWqOTf4o.js +1051 -0
  17. package/chunks/{CheckCircle-D-GH16Lb.js → CheckCircle-ClY-iOQ5.js} +105 -105
  18. package/chunks/{CollectLeadForm-o9NdYQgu.js → CollectLeadForm-0vVnu4DL.js} +5 -5
  19. package/chunks/FavoriteBorder-BHnvGBrn.js +11 -0
  20. package/chunks/{useInfoPage-v91yL5SS.js → NotFoundSkeleton-B3RNa8KJ.js} +451 -646
  21. package/chunks/Notification-BTtUhfZQ.js +615 -0
  22. package/chunks/OverlayLeadAfterCollection-CaBbwZVo.js +480 -0
  23. package/chunks/{OverlayScoreStateSkeleton-xvq9lQEi.js → OverlayScoreStateSkeleton-DJn0Rim3.js} +3 -3
  24. package/chunks/Person-D0Im9_zE.js +522 -0
  25. package/chunks/{PickOneOfX-C2YpLk40.js → PickOneOfX-DYQ4c1o2.js} +7 -7
  26. package/chunks/{Portal-DWAr8MhA.js → Portal-B9wkUnY2.js} +7 -7
  27. package/chunks/{ConstantsProvider-BPJJz9fq.js → PrizeCard-gMp7I66d.js} +3593 -2860
  28. package/chunks/{Spinner-m59ZJZ35.js → Spinner-BBA89t5s.js} +50 -50
  29. package/chunks/StandardLeadAfterCollection-L1cOGfS6.js +432 -0
  30. package/chunks/{Tabs-BGihvj9C.js → Tabs-D_n8rNw3.js} +28 -28
  31. package/chunks/{Textarea-Bzlb89Zp.js → Textarea-BdN2xj4j.js} +44 -44
  32. package/chunks/{TimerOutlined-DiX8hCoC.js → TimerOutlined-DmKZDDI-.js} +1 -1
  33. package/chunks/chevron-right-DGEksBI7.js +330 -0
  34. package/chunks/default-quiz-bg-vertical-CT7rrg9o.js +5 -0
  35. package/chunks/index-2s5UkG1y.js +1607 -0
  36. package/chunks/useImageVariant-pnFelF9A.js +535 -0
  37. package/chunks/useInfoPage-DPkzE5Gn.js +204 -0
  38. package/components.d.ts +2 -1
  39. package/components.d.ts.map +1 -1
  40. package/index.d.ts +1 -0
  41. package/index.d.ts.map +1 -1
  42. package/index.js +4 -2
  43. package/package.json +1 -1
  44. package/chunks/ChanceGameEmbedVariant-BvIKBhq_.js +0 -2609
  45. package/chunks/Notification-Bwcoljir.js +0 -961
  46. package/chunks/OverlayLeadAfterCollection-B3D5ct0J.js +0 -901
  47. package/chunks/chevron-right-Dlc9ZKhv.js +0 -846
  48. package/chunks/useImageVariant-Do8kOVs2.js +0 -537
@@ -0,0 +1,1607 @@
1
+ var ye = Object.defineProperty;
2
+ var Ee = (e, i, s) => i in e ? ye(e, i, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[i] = s;
3
+ var t = (e, i, s) => Ee(e, typeof i != "symbol" ? i + "" : i, s);
4
+ import { jsx as R, jsxs as w, Fragment as ee } from "react/jsx-runtime";
5
+ import { A as _e, D as re, B as A, T as M, c as ge, u as Te, e as Oe, W as ce, f as Re, h as ue, j as Ie, k as j, F as Se, g as Ce } from "./PrizeCard-gMp7I66d.js";
6
+ import { A as Ae } from "./AlertMessage-cjTHrMUK.js";
7
+ import { u as De, s as te } from "./useImageVariant-pnFelF9A.js";
8
+ import "react";
9
+ import { R as ie } from "./NotFoundSkeleton-B3RNa8KJ.js";
10
+ import "react-dom";
11
+ const Pt = ({
12
+ additionalCTA: e,
13
+ buttonStyle: i,
14
+ buttonContentStyle: s,
15
+ textStyle: r
16
+ }) => {
17
+ const { t: c } = _e();
18
+ return e ? e.component ? e.component : e.onClick ? /* @__PURE__ */ R(re, { sx: i, onClick: e.onClick, children: e.defaultLabel && /* @__PURE__ */ R(A, { sx: s, children: /* @__PURE__ */ R(M, { sx: r, children: e.defaultLabel }) }) }) : e.url ? /* @__PURE__ */ R(
19
+ re,
20
+ {
21
+ component: "a",
22
+ href: e.url,
23
+ target: e.target || "_self",
24
+ sx: i,
25
+ children: /* @__PURE__ */ R(M, { sx: r, children: e.defaultLabel || c("common.additional") })
26
+ }
27
+ ) : null : null;
28
+ }, ve = (e) => {
29
+ var i, s, r;
30
+ return {
31
+ // Mobile headline with image background
32
+ mobileHeadlineWithImage: {
33
+ display: e.isMobile ? "flex" : "none",
34
+ flexDirection: "column",
35
+ justifyContent: "space-between",
36
+ gap: "10px",
37
+ backgroundImage: `url("${e.finalImage}")`,
38
+ backgroundSize: "cover",
39
+ backgroundPosition: "center",
40
+ borderTopLeftRadius: "5px",
41
+ borderTopRightRadius: "5px",
42
+ position: "relative",
43
+ minHeight: "210px",
44
+ overflow: "hidden",
45
+ height: "auto",
46
+ "&::before": {
47
+ content: '""',
48
+ position: "absolute",
49
+ width: "100%",
50
+ height: "100%",
51
+ background: e.imageBackgroundGradient,
52
+ borderTopLeftRadius: "5px",
53
+ borderTopRightRadius: "5px"
54
+ }
55
+ },
56
+ // Content inside mobile headline with image
57
+ mobileHeadlineContent: {
58
+ zIndex: 1,
59
+ height: "100%",
60
+ p: e.spacingScale.xl,
61
+ gap: e.spacingScale["2xl"],
62
+ display: "flex",
63
+ flexDirection: "column",
64
+ justifyContent: "space-between"
65
+ },
66
+ // Mobile headline without image
67
+ mobileHeadlineWithoutImage: {
68
+ display: e.isMobile ? "flex" : "none",
69
+ flex: "0.5",
70
+ flexDirection: "column",
71
+ justifyContent: "space-between",
72
+ p: e.spacingScale.lg,
73
+ gap: e.spacingScale["2xl"]
74
+ },
75
+ // Headline typography (mobile with image)
76
+ headlineTypographyMobileImage: {
77
+ fontWeight: 500,
78
+ lineHeight: "166%",
79
+ letterSpacing: "1px",
80
+ fontSize: "0.75em",
81
+ color: ((i = e.brandingColors) == null ? void 0 : i.secondaryColor) || e.darkTextColor,
82
+ opacity: "70%",
83
+ textTransform: "uppercase",
84
+ fontFamily: e.fontFamilySecondary,
85
+ textAlign: "center"
86
+ },
87
+ // Headline typography (mobile without image & desktop)
88
+ headlineTypography: {
89
+ fontWeight: 500,
90
+ lineHeight: "166%",
91
+ letterSpacing: "1px",
92
+ textTransform: "uppercase",
93
+ fontSize: "0.75em",
94
+ color: e.secondaryColor,
95
+ opacity: e.opacity,
96
+ fontFamily: e.fontFamilySecondary,
97
+ textAlign: "center"
98
+ },
99
+ // Title typography (mobile with image)
100
+ titleTypographyMobileImage: {
101
+ fontWeight: 700,
102
+ lineHeight: "133%",
103
+ fontSize: "1.5em",
104
+ letterSpacing: "0.15px",
105
+ color: ((s = e.brandingColors) == null ? void 0 : s.contentColor) || e.darkTextColor,
106
+ fontFamily: e.fontFamilyPrimary,
107
+ textAlign: "center"
108
+ },
109
+ // Title typography (mobile without image & desktop)
110
+ titleTypography: {
111
+ fontWeight: 700,
112
+ lineHeight: "133%",
113
+ letterSpacing: "0px",
114
+ fontSize: "1.5em",
115
+ color: e.textColor,
116
+ fontFamily: e.fontFamilyPrimary,
117
+ textAlign: e.isMobile ? "center" : "left"
118
+ },
119
+ // Description typography (mobile with image)
120
+ descriptionTypographyMobileImage: {
121
+ fontWeight: 400,
122
+ lineHeight: "140%",
123
+ fontSize: "1.25em",
124
+ letterSpacing: "0.15px",
125
+ color: ((r = e.brandingColors) == null ? void 0 : r.secondaryColor) || e.darkTextColor,
126
+ opacity: "70%",
127
+ fontFamily: e.fontFamilyPrimary,
128
+ textAlign: "center"
129
+ },
130
+ // Description typography (mobile without image & desktop)
131
+ descriptionTypography: {
132
+ fontWeight: 400,
133
+ lineHeight: "140%",
134
+ letterSpacing: "0.15px",
135
+ fontSize: "1.25em",
136
+ color: e.secondaryColor,
137
+ opacity: e.opacity,
138
+ fontFamily: e.fontFamilyPrimary,
139
+ textAlign: e.isMobile ? "center" : "left"
140
+ },
141
+ // Desktop title typography (centered)
142
+ titleTypographyDesktop: {
143
+ fontWeight: 700,
144
+ lineHeight: "133%",
145
+ letterSpacing: "0px",
146
+ fontSize: "1.5em",
147
+ color: e.textColor,
148
+ fontFamily: e.fontFamilyPrimary
149
+ },
150
+ // Desktop description typography (centered)
151
+ descriptionTypographyDesktop: {
152
+ fontWeight: 400,
153
+ lineHeight: "140%",
154
+ letterSpacing: "0.15px",
155
+ fontSize: "1.25em",
156
+ color: e.secondaryColor,
157
+ opacity: e.opacity,
158
+ fontFamily: e.fontFamilyPrimary
159
+ },
160
+ // Image container (left position)
161
+ imageContainerLeft: {
162
+ display: e.isMobile ? "none" : "block",
163
+ flex: "0.3",
164
+ borderTopLeftRadius: e.borderRadius.md,
165
+ borderBottomLeftRadius: e.borderRadius.md,
166
+ overflow: "hidden",
167
+ height: "auto",
168
+ position: "relative"
169
+ },
170
+ // Image container (right position)
171
+ imageContainerRight: {
172
+ display: e.isMobile ? "none" : "block",
173
+ flex: "0.3",
174
+ borderTopRightRadius: "5px",
175
+ borderBottomRightRadius: "5px",
176
+ overflow: "hidden",
177
+ height: "auto",
178
+ position: "relative"
179
+ },
180
+ // Main content area
181
+ mainContentArea: {
182
+ flex: e.isMobile ? "1" : e.finalImage ? "0.7" : "1",
183
+ // display: props.isMobile ? "block" : "flex",
184
+ display: "flex",
185
+ flexDirection: "column",
186
+ p: e.spacingScale.md,
187
+ gap: e.isMobile ? e.spacingScale.md : e.spacingScale.lg
188
+ },
189
+ // Desktop headline container
190
+ desktopHeadlineContainer: {
191
+ display: e.isMobile ? "none" : "flex",
192
+ flexDirection: "column",
193
+ justifyContent: "space-between",
194
+ gap: e.spacingScale["2xl"],
195
+ textAlign: "center"
196
+ },
197
+ // Content container
198
+ contentContainer: {
199
+ display: "flex",
200
+ flexDirection: "column",
201
+ gap: e.spacingScale["3xs"]
202
+ },
203
+ // Question area
204
+ questionArea: {
205
+ display: "flex",
206
+ flexDirection: "column",
207
+ px: e.spacingScale.md
208
+ },
209
+ // Question container
210
+ questionContainer: {
211
+ display: "flex",
212
+ flexDirection: "column",
213
+ gap: e.isMobile ? e.spacingScale.md : e.spacingScale.lg
214
+ },
215
+ // Alert container
216
+ alertContainer: {
217
+ // py: props.spacingScale.md,
218
+ display: "flex",
219
+ flexDirection: "column",
220
+ backdropFilter: "blur(4px)"
221
+ },
222
+ image: {
223
+ width: "100%",
224
+ height: "100%",
225
+ objectFit: "cover"
226
+ },
227
+ // CTA container
228
+ ctaContainer: {
229
+ display: "flex",
230
+ flexDirection: "column",
231
+ alignItems: "center"
232
+ },
233
+ // CTA content wrapper
234
+ ctaContentWrapper: {
235
+ display: "flex",
236
+ flexDirection: "column",
237
+ justifyContent: "center",
238
+ alignItems: "center",
239
+ gap: e.spacingScale.lg
240
+ },
241
+ // Buttons container
242
+ buttonsContainer: {
243
+ display: "flex",
244
+ flexDirection: e.isMobile ? "column" : "row",
245
+ gap: e.spacingScale.md
246
+ },
247
+ // Try again button
248
+ tryAgainButton: {
249
+ display: "flex",
250
+ py: e.spacingScale.xs,
251
+ px: "16px",
252
+ flexDirection: "column",
253
+ justifyContent: "center",
254
+ alignItems: "center",
255
+ gap: "8px",
256
+ borderRadius: e.borderRadius.xl,
257
+ border: e.borderSize + " solid " + e.primaryColor,
258
+ bgcolor: e.buttonBgColor,
259
+ "&:hover": {
260
+ bgcolor: e.onSurfaceColor,
261
+ borderColor: e.primaryColor
262
+ },
263
+ fontSize: "0.8125em"
264
+ },
265
+ // Try again button content
266
+ tryAgainButtonContent: {
267
+ display: "flex",
268
+ justifyContent: "center",
269
+ alignItems: "center",
270
+ gap: "8px",
271
+ alignSelf: "stretch"
272
+ },
273
+ // Try again icon
274
+ tryAgainIcon: {
275
+ display: "flex",
276
+ width: "16px",
277
+ height: "16px",
278
+ justifyContent: "flex-end",
279
+ alignItems: "center",
280
+ color: e.textPrimary
281
+ },
282
+ // Try again text
283
+ tryAgainText: {
284
+ color: e.textPrimary,
285
+ textAlign: "center",
286
+ fontFamily: e.fontFamilyPrimary,
287
+ fontSize: "0.8125em",
288
+ fontStyle: "normal",
289
+ fontWeight: 500,
290
+ lineHeight: "22px",
291
+ letterSpacing: "0.46px",
292
+ textTransform: "uppercase"
293
+ },
294
+ // Presented by container
295
+ presentedByContainer: {
296
+ px: e.spacingScale.md
297
+ }
298
+ };
299
+ }, Le = ge(/* @__PURE__ */ R("path", {
300
+ d: "M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"
301
+ }), "Replay"), wt = (e) => {
302
+ var o;
303
+ const i = ((o = e.entity.branding) == null ? void 0 : o.colors) || null, s = Te(), r = Oe(), c = De(
304
+ {
305
+ images: e.entity.images || null,
306
+ imagePlaceholder: e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : ""
307
+ },
308
+ ce.STANDARD
309
+ ), h = Re(), m = ue().primary, l = ue().secondary, y = Ie(), n = (i == null ? void 0 : i.contentColor) || j().textColor, d = j().textPrimary, _ = (i == null ? void 0 : i.primaryColor) || j().palette.primary.plainColor, E = (i == null ? void 0 : i.secondaryColor) || j().textColor, f = Se().size, p = j().surface, S = j().onSurface, D = Ce(
310
+ ce.STANDARD
311
+ ), { t: v } = _e(), L = e.imagePosition || "left", P = "60%", F = e.customAlertTitle ?? (e.isApiError ? v("common.error.title") : v("common.authentication.accessRequired")), N = e.customAlertMessage ?? (e.isApiError ? e.apiErrorMessage || v("common.error.message") : v("common.authentication.invalidOrMissingAuth")), a = ve({
312
+ finalImage: c,
313
+ spacingScale: h,
314
+ borderRadius: y,
315
+ fontFamilyPrimary: m,
316
+ fontFamilySecondary: l,
317
+ textColor: n,
318
+ secondaryColor: E,
319
+ brandingColors: i,
320
+ darkTextColor: s.colorSchemes.dark.textColor,
321
+ opacity: P,
322
+ imagePosition: L,
323
+ imageBackgroundGradient: D,
324
+ textPrimary: d,
325
+ primaryColor: _,
326
+ borderSize: f,
327
+ buttonBgColor: p,
328
+ onSurfaceColor: S,
329
+ isMobile: r
330
+ }), u = () => !e.isApiError || !e.toggleTryAgain ? /* @__PURE__ */ R(ee, {}) : /* @__PURE__ */ w(ee, { children: [
331
+ /* @__PURE__ */ R(A, { sx: a.ctaContainer, children: /* @__PURE__ */ R(A, { sx: a.ctaContentWrapper, children: /* @__PURE__ */ R(A, { sx: a.buttonsContainer, children: /* @__PURE__ */ R(re, { sx: a.tryAgainButton, onClick: e.toggleTryAgain, children: /* @__PURE__ */ w(A, { sx: a.tryAgainButtonContent, children: [
332
+ /* @__PURE__ */ R(Le, { sx: a.tryAgainIcon }),
333
+ /* @__PURE__ */ R(M, { sx: a.tryAgainText, children: e.tryAgainButtonText })
334
+ ] }) }) }) }) }),
335
+ /* @__PURE__ */ R(A, { sx: a.presentedByContainer, children: e.renderPresentedBy(n) })
336
+ ] });
337
+ return /* @__PURE__ */ w(ee, { children: [
338
+ c ? /* @__PURE__ */ R(A, { sx: a.mobileHeadlineWithImage, children: /* @__PURE__ */ R(A, { sx: a.mobileHeadlineContent, children: /* @__PURE__ */ w(A, { children: [
339
+ /* @__PURE__ */ w(
340
+ A,
341
+ {
342
+ sx: {
343
+ display: "flex",
344
+ alignItems: "center",
345
+ justifyContent: "center",
346
+ gap: h["3xs"]
347
+ },
348
+ children: [
349
+ /* @__PURE__ */ R(
350
+ M,
351
+ {
352
+ level: "body-sm",
353
+ sx: a.headlineTypographyMobileImage,
354
+ children: e.headline
355
+ }
356
+ ),
357
+ /* @__PURE__ */ R(
358
+ ie,
359
+ {
360
+ rulesDisplay: e.rulesDisplay,
361
+ rules: e.entity.rules || ""
362
+ }
363
+ )
364
+ ]
365
+ }
366
+ ),
367
+ /* @__PURE__ */ w(A, { sx: a.contentContainer, children: [
368
+ /* @__PURE__ */ R(
369
+ M,
370
+ {
371
+ level: "body-lg",
372
+ sx: a.titleTypographyMobileImage,
373
+ children: e.entity.title
374
+ }
375
+ ),
376
+ /* @__PURE__ */ R(
377
+ M,
378
+ {
379
+ level: "body-md",
380
+ sx: a.descriptionTypographyMobileImage,
381
+ children: te(e.entity.description)
382
+ }
383
+ )
384
+ ] })
385
+ ] }) }) }) : /* @__PURE__ */ R(A, { sx: a.mobileHeadlineWithoutImage, children: /* @__PURE__ */ w(A, { children: [
386
+ /* @__PURE__ */ w(
387
+ A,
388
+ {
389
+ sx: {
390
+ display: "flex",
391
+ alignItems: "center",
392
+ justifyContent: "center",
393
+ gap: h["3xs"]
394
+ },
395
+ children: [
396
+ /* @__PURE__ */ R(M, { level: "body-sm", sx: a.headlineTypography, children: e.headline }),
397
+ /* @__PURE__ */ R(
398
+ ie,
399
+ {
400
+ rulesDisplay: e.rulesDisplay,
401
+ rules: e.entity.rules || ""
402
+ }
403
+ )
404
+ ]
405
+ }
406
+ ),
407
+ /* @__PURE__ */ w(A, { sx: a.contentContainer, children: [
408
+ /* @__PURE__ */ R(M, { level: "h4", sx: a.titleTypography, children: e.entity.title }),
409
+ /* @__PURE__ */ R(M, { level: "body-md", sx: a.descriptionTypography, children: te(e.entity.description) })
410
+ ] })
411
+ ] }) }),
412
+ c && L === "left" && /* @__PURE__ */ R(A, { sx: a.imageContainerLeft, children: /* @__PURE__ */ R("img", { src: c, alt: "illustration", style: a.image }) }),
413
+ /* @__PURE__ */ w(A, { sx: a.mainContentArea, children: [
414
+ /* @__PURE__ */ R(A, { sx: { px: h.md }, children: /* @__PURE__ */ R(A, { sx: a.desktopHeadlineContainer, children: /* @__PURE__ */ w(
415
+ A,
416
+ {
417
+ sx: {
418
+ display: "flex",
419
+ flexDirection: "column",
420
+ alignItems: "center"
421
+ },
422
+ children: [
423
+ /* @__PURE__ */ w(
424
+ A,
425
+ {
426
+ sx: {
427
+ display: "flex",
428
+ alignItems: "center",
429
+ gap: h["3xs"]
430
+ },
431
+ children: [
432
+ /* @__PURE__ */ R(M, { level: "body-sm", sx: a.headlineTypography, children: e.headline }),
433
+ /* @__PURE__ */ R(
434
+ ie,
435
+ {
436
+ rulesDisplay: e.rulesDisplay,
437
+ rules: e.entity.rules || ""
438
+ }
439
+ )
440
+ ]
441
+ }
442
+ ),
443
+ /* @__PURE__ */ w(A, { sx: a.contentContainer, children: [
444
+ /* @__PURE__ */ R(M, { level: "h4", sx: a.titleTypographyDesktop, children: e.entity.title }),
445
+ /* @__PURE__ */ R(
446
+ M,
447
+ {
448
+ level: "body-md",
449
+ sx: a.descriptionTypographyDesktop,
450
+ children: te(e.entity.description)
451
+ }
452
+ )
453
+ ] })
454
+ ]
455
+ }
456
+ ) }) }),
457
+ /* @__PURE__ */ R(A, { sx: a.questionArea, children: /* @__PURE__ */ R(A, { sx: a.questionContainer, children: /* @__PURE__ */ R(A, { sx: a.alertContainer, children: /* @__PURE__ */ R(
458
+ Ae,
459
+ {
460
+ variant: e.alertVariant || "error",
461
+ title: F,
462
+ message: N
463
+ }
464
+ ) }) }) }),
465
+ u(),
466
+ !e.isApiError && /* @__PURE__ */ R(A, { sx: { ...a.presentedByContainer, mt: "auto" }, children: e.renderPresentedBy(n) })
467
+ ] }),
468
+ c && L === "right" && /* @__PURE__ */ R(A, { sx: a.imageContainerRight, children: /* @__PURE__ */ R("img", { src: c, alt: "illustration", style: a.image }) })
469
+ ] });
470
+ };
471
+ var Ne = Object.create, $ = Object.defineProperty, be = Object.getOwnPropertyDescriptor, xe = Object.getOwnPropertyNames, Pe = Object.getPrototypeOf, we = Object.prototype.hasOwnProperty, Me = (e, i, s) => i in e ? $(e, i, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[i] = s, Fe = (e, i) => () => (e && (i = e(e = 0)), i), Q = (e, i) => () => (i || e((i = { exports: {} }).exports, i), i.exports), Ve = (e, i) => {
472
+ for (var s in i) $(e, s, { get: i[s], enumerable: !0 });
473
+ }, Ge = (e, i, s, r) => {
474
+ if (i && typeof i == "object" || typeof i == "function") for (let c of xe(i)) !we.call(e, c) && c !== s && $(e, c, { get: () => i[c], enumerable: !(r = be(i, c)) || r.enumerable });
475
+ return e;
476
+ }, ke = (e, i, s) => (s = e != null ? Ne(Pe(e)) : {}, Ge(!e || !e.__esModule ? $(s, "default", { value: e, enumerable: !0 }) : s, e)), k = (e, i, s) => (Me(e, typeof i != "symbol" ? i + "" : i, s), s), me = {};
477
+ Ve(me, { default: () => pe });
478
+ var de, pe, He = Fe(() => {
479
+ de = { 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 }, pe = de;
480
+ }), Ye = Q((e, i) => {
481
+ var s = function() {
482
+ function r(f, p) {
483
+ return p != null && f instanceof p;
484
+ }
485
+ var c;
486
+ try {
487
+ c = Map;
488
+ } catch {
489
+ c = function() {
490
+ };
491
+ }
492
+ var h;
493
+ try {
494
+ h = Set;
495
+ } catch {
496
+ h = function() {
497
+ };
498
+ }
499
+ var m;
500
+ try {
501
+ m = Promise;
502
+ } catch {
503
+ m = function() {
504
+ };
505
+ }
506
+ function l(f, p, S, D, v) {
507
+ typeof p == "object" && (S = p.depth, D = p.prototype, v = p.includeNonEnumerable, p = p.circular);
508
+ var L = [], P = [], F = typeof Buffer < "u";
509
+ typeof p > "u" && (p = !0), typeof S > "u" && (S = 1 / 0);
510
+ function N(a, u) {
511
+ if (a === null) return null;
512
+ if (u === 0) return a;
513
+ var o, g;
514
+ if (typeof a != "object") return a;
515
+ if (r(a, c)) o = new c();
516
+ else if (r(a, h)) o = new h();
517
+ else if (r(a, m)) o = new m(function(H, Y) {
518
+ a.then(function(U) {
519
+ H(N(U, u - 1));
520
+ }, function(U) {
521
+ Y(N(U, u - 1));
522
+ });
523
+ });
524
+ else if (l.__isArray(a)) o = [];
525
+ else if (l.__isRegExp(a)) o = new RegExp(a.source, E(a)), a.lastIndex && (o.lastIndex = a.lastIndex);
526
+ else if (l.__isDate(a)) o = new Date(a.getTime());
527
+ else {
528
+ if (F && Buffer.isBuffer(a)) return Buffer.allocUnsafe ? o = Buffer.allocUnsafe(a.length) : o = new Buffer(a.length), a.copy(o), o;
529
+ r(a, Error) ? o = Object.create(a) : typeof D > "u" ? (g = Object.getPrototypeOf(a), o = Object.create(g)) : (o = Object.create(D), g = D);
530
+ }
531
+ if (p) {
532
+ var O = L.indexOf(a);
533
+ if (O != -1) return P[O];
534
+ L.push(a), P.push(o);
535
+ }
536
+ r(a, c) && a.forEach(function(H, Y) {
537
+ var U = N(Y, u - 1), J = N(H, u - 1);
538
+ o.set(U, J);
539
+ }), r(a, h) && a.forEach(function(H) {
540
+ var Y = N(H, u - 1);
541
+ o.add(Y);
542
+ });
543
+ for (var T in a) {
544
+ var C;
545
+ g && (C = Object.getOwnPropertyDescriptor(g, T)), !(C && C.set == null) && (o[T] = N(a[T], u - 1));
546
+ }
547
+ if (Object.getOwnPropertySymbols) for (var x = Object.getOwnPropertySymbols(a), T = 0; T < x.length; T++) {
548
+ var G = x[T], V = Object.getOwnPropertyDescriptor(a, G);
549
+ V && !V.enumerable && !v || (o[G] = N(a[G], u - 1), V.enumerable || Object.defineProperty(o, G, { enumerable: !1 }));
550
+ }
551
+ if (v) for (var K = Object.getOwnPropertyNames(a), T = 0; T < K.length; T++) {
552
+ var B = K[T], V = Object.getOwnPropertyDescriptor(a, B);
553
+ V && V.enumerable || (o[B] = N(a[B], u - 1), Object.defineProperty(o, B, { enumerable: !1 }));
554
+ }
555
+ return o;
556
+ }
557
+ return N(f, S);
558
+ }
559
+ l.clonePrototype = function(f) {
560
+ if (f === null) return null;
561
+ var p = function() {
562
+ };
563
+ return p.prototype = f, new p();
564
+ };
565
+ function y(f) {
566
+ return Object.prototype.toString.call(f);
567
+ }
568
+ l.__objToStr = y;
569
+ function n(f) {
570
+ return typeof f == "object" && y(f) === "[object Date]";
571
+ }
572
+ l.__isDate = n;
573
+ function d(f) {
574
+ return typeof f == "object" && y(f) === "[object Array]";
575
+ }
576
+ l.__isArray = d;
577
+ function _(f) {
578
+ return typeof f == "object" && y(f) === "[object RegExp]";
579
+ }
580
+ l.__isRegExp = _;
581
+ function E(f) {
582
+ var p = "";
583
+ return f.global && (p += "g"), f.ignoreCase && (p += "i"), f.multiline && (p += "m"), p;
584
+ }
585
+ return l.__getRegExpFlags = E, l;
586
+ }();
587
+ typeof i == "object" && i.exports && (i.exports = s);
588
+ }), Ue = Q((e, i) => {
589
+ var s = typeof Reflect == "object" ? Reflect : null, r = s && typeof s.apply == "function" ? s.apply : function(a, u, o) {
590
+ return Function.prototype.apply.call(a, u, o);
591
+ }, c;
592
+ s && typeof s.ownKeys == "function" ? c = s.ownKeys : Object.getOwnPropertySymbols ? c = function(a) {
593
+ return Object.getOwnPropertyNames(a).concat(Object.getOwnPropertySymbols(a));
594
+ } : c = function(a) {
595
+ return Object.getOwnPropertyNames(a);
596
+ };
597
+ function h(a) {
598
+ console && console.warn && console.warn(a);
599
+ }
600
+ var m = Number.isNaN || function(a) {
601
+ return a !== a;
602
+ };
603
+ function l() {
604
+ l.init.call(this);
605
+ }
606
+ i.exports = l, i.exports.once = P, l.EventEmitter = l, l.prototype._events = void 0, l.prototype._eventsCount = 0, l.prototype._maxListeners = void 0;
607
+ var y = 10;
608
+ function n(a) {
609
+ if (typeof a != "function") throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof a);
610
+ }
611
+ Object.defineProperty(l, "defaultMaxListeners", { enumerable: !0, get: function() {
612
+ return y;
613
+ }, set: function(a) {
614
+ if (typeof a != "number" || a < 0 || m(a)) throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + a + ".");
615
+ y = a;
616
+ } }), l.init = function() {
617
+ (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;
618
+ }, l.prototype.setMaxListeners = function(a) {
619
+ if (typeof a != "number" || a < 0 || m(a)) throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + a + ".");
620
+ return this._maxListeners = a, this;
621
+ };
622
+ function d(a) {
623
+ return a._maxListeners === void 0 ? l.defaultMaxListeners : a._maxListeners;
624
+ }
625
+ l.prototype.getMaxListeners = function() {
626
+ return d(this);
627
+ }, l.prototype.emit = function(a) {
628
+ for (var u = [], o = 1; o < arguments.length; o++) u.push(arguments[o]);
629
+ var g = a === "error", O = this._events;
630
+ if (O !== void 0) g = g && O.error === void 0;
631
+ else if (!g) return !1;
632
+ if (g) {
633
+ var T;
634
+ if (u.length > 0 && (T = u[0]), T instanceof Error) throw T;
635
+ var C = new Error("Unhandled error." + (T ? " (" + T.message + ")" : ""));
636
+ throw C.context = T, C;
637
+ }
638
+ var x = O[a];
639
+ if (x === void 0) return !1;
640
+ if (typeof x == "function") r(x, this, u);
641
+ else for (var G = x.length, V = D(x, G), o = 0; o < G; ++o) r(V[o], this, u);
642
+ return !0;
643
+ };
644
+ function _(a, u, o, g) {
645
+ var O, T, C;
646
+ if (n(o), T = a._events, T === void 0 ? (T = a._events = /* @__PURE__ */ Object.create(null), a._eventsCount = 0) : (T.newListener !== void 0 && (a.emit("newListener", u, o.listener ? o.listener : o), T = a._events), C = T[u]), C === void 0) C = T[u] = o, ++a._eventsCount;
647
+ else if (typeof C == "function" ? C = T[u] = g ? [o, C] : [C, o] : g ? C.unshift(o) : C.push(o), O = d(a), O > 0 && C.length > O && !C.warned) {
648
+ C.warned = !0;
649
+ var x = new Error("Possible EventEmitter memory leak detected. " + C.length + " " + String(u) + " listeners added. Use emitter.setMaxListeners() to increase limit");
650
+ x.name = "MaxListenersExceededWarning", x.emitter = a, x.type = u, x.count = C.length, h(x);
651
+ }
652
+ return a;
653
+ }
654
+ l.prototype.addListener = function(a, u) {
655
+ return _(this, a, u, !1);
656
+ }, l.prototype.on = l.prototype.addListener, l.prototype.prependListener = function(a, u) {
657
+ return _(this, a, u, !0);
658
+ };
659
+ function E() {
660
+ 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);
661
+ }
662
+ function f(a, u, o) {
663
+ var g = { fired: !1, wrapFn: void 0, target: a, type: u, listener: o }, O = E.bind(g);
664
+ return O.listener = o, g.wrapFn = O, O;
665
+ }
666
+ l.prototype.once = function(a, u) {
667
+ return n(u), this.on(a, f(this, a, u)), this;
668
+ }, l.prototype.prependOnceListener = function(a, u) {
669
+ return n(u), this.prependListener(a, f(this, a, u)), this;
670
+ }, l.prototype.removeListener = function(a, u) {
671
+ var o, g, O, T, C;
672
+ if (n(u), g = this._events, g === void 0) return this;
673
+ if (o = g[a], o === void 0) return this;
674
+ if (o === u || o.listener === u) --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete g[a], g.removeListener && this.emit("removeListener", a, o.listener || u));
675
+ else if (typeof o != "function") {
676
+ for (O = -1, T = o.length - 1; T >= 0; T--) if (o[T] === u || o[T].listener === u) {
677
+ C = o[T].listener, O = T;
678
+ break;
679
+ }
680
+ if (O < 0) return this;
681
+ O === 0 ? o.shift() : v(o, O), o.length === 1 && (g[a] = o[0]), g.removeListener !== void 0 && this.emit("removeListener", a, C || u);
682
+ }
683
+ return this;
684
+ }, l.prototype.off = l.prototype.removeListener, l.prototype.removeAllListeners = function(a) {
685
+ var u, o, g;
686
+ if (o = this._events, o === void 0) return this;
687
+ if (o.removeListener === void 0) return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : o[a] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete o[a]), this;
688
+ if (arguments.length === 0) {
689
+ var O = Object.keys(o), T;
690
+ for (g = 0; g < O.length; ++g) T = O[g], T !== "removeListener" && this.removeAllListeners(T);
691
+ return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
692
+ }
693
+ if (u = o[a], typeof u == "function") this.removeListener(a, u);
694
+ else if (u !== void 0) for (g = u.length - 1; g >= 0; g--) this.removeListener(a, u[g]);
695
+ return this;
696
+ };
697
+ function p(a, u, o) {
698
+ var g = a._events;
699
+ if (g === void 0) return [];
700
+ var O = g[u];
701
+ return O === void 0 ? [] : typeof O == "function" ? o ? [O.listener || O] : [O] : o ? L(O) : D(O, O.length);
702
+ }
703
+ l.prototype.listeners = function(a) {
704
+ return p(this, a, !0);
705
+ }, l.prototype.rawListeners = function(a) {
706
+ return p(this, a, !1);
707
+ }, l.listenerCount = function(a, u) {
708
+ return typeof a.listenerCount == "function" ? a.listenerCount(u) : S.call(a, u);
709
+ }, l.prototype.listenerCount = S;
710
+ function S(a) {
711
+ var u = this._events;
712
+ if (u !== void 0) {
713
+ var o = u[a];
714
+ if (typeof o == "function") return 1;
715
+ if (o !== void 0) return o.length;
716
+ }
717
+ return 0;
718
+ }
719
+ l.prototype.eventNames = function() {
720
+ return this._eventsCount > 0 ? c(this._events) : [];
721
+ };
722
+ function D(a, u) {
723
+ for (var o = new Array(u), g = 0; g < u; ++g) o[g] = a[g];
724
+ return o;
725
+ }
726
+ function v(a, u) {
727
+ for (; u + 1 < a.length; u++) a[u] = a[u + 1];
728
+ a.pop();
729
+ }
730
+ function L(a) {
731
+ for (var u = new Array(a.length), o = 0; o < u.length; ++o) u[o] = a[o].listener || a[o];
732
+ return u;
733
+ }
734
+ function P(a, u) {
735
+ return new Promise(function(o, g) {
736
+ function O(C) {
737
+ a.removeListener(u, T), g(C);
738
+ }
739
+ function T() {
740
+ typeof a.removeListener == "function" && a.removeListener("error", O), o([].slice.call(arguments));
741
+ }
742
+ N(a, u, T, { once: !0 }), u !== "error" && F(a, O, { once: !0 });
743
+ });
744
+ }
745
+ function F(a, u, o) {
746
+ typeof a.on == "function" && N(a, "error", u, o);
747
+ }
748
+ function N(a, u, o, g) {
749
+ if (typeof a.on == "function") g.once ? a.once(u, o) : a.on(u, o);
750
+ else if (typeof a.addEventListener == "function") a.addEventListener(u, function O(T) {
751
+ g.once && a.removeEventListener(u, O), o(T);
752
+ });
753
+ else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof a);
754
+ }
755
+ }), Be = Q((e, i) => {
756
+ (function() {
757
+ var s, r, c = [].splice, h = function(l, y) {
758
+ if (!(l instanceof y)) throw new Error("Bound instance method accessed before binding");
759
+ }, m = [].indexOf;
760
+ r = Ye(), s = Ue().EventEmitter, i.exports = (function() {
761
+ class l extends s {
762
+ constructor(n = {}) {
763
+ 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 = n, 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((d) => {
764
+ var _;
765
+ _ = this[d], this[d] = function(...E) {
766
+ var f, p, S, D;
767
+ if (S = E, [...E] = S, [f] = c.call(E, -1), typeof f == "function") try {
768
+ D = _(...E), f(null, D);
769
+ } catch (v) {
770
+ p = v, f(p);
771
+ }
772
+ else return _(...E, f);
773
+ };
774
+ })), this.stats = { hits: 0, misses: 0, keys: 0, ksize: 0, vsize: 0 }, this.validKeyTypes = ["string", "number"], this._checkData();
775
+ }
776
+ get(n) {
777
+ var d, _;
778
+ if (h(this, l), (_ = this._isInvalidKey(n)) != null) throw _;
779
+ if (this.data[n] != null && this._check(n, this.data[n])) return this.stats.hits++, d = this._unwrap(this.data[n]), d;
780
+ this.stats.misses++;
781
+ }
782
+ mget(n) {
783
+ var d, _, E, f, p, S;
784
+ if (h(this, l), !Array.isArray(n)) throw d = this._error("EKEYSTYPE"), d;
785
+ for (S = {}, E = 0, p = n.length; E < p; E++) {
786
+ if (f = n[E], (_ = this._isInvalidKey(f)) != null) throw _;
787
+ this.data[f] != null && this._check(f, this.data[f]) ? (this.stats.hits++, S[f] = this._unwrap(this.data[f])) : this.stats.misses++;
788
+ }
789
+ return S;
790
+ }
791
+ set(n, d, _) {
792
+ var E, f, p;
793
+ if (h(this, l), this.options.maxKeys > -1 && this.stats.keys >= this.options.maxKeys) throw E = this._error("ECACHEFULL"), E;
794
+ if (this.options.forceString && !1 === "string" && (d = JSON.stringify(d)), _ == null && (_ = this.options.stdTTL), (f = this._isInvalidKey(n)) != null) throw f;
795
+ return p = !1, this.data[n] && (p = !0, this.stats.vsize -= this._getValLength(this._unwrap(this.data[n], !1))), this.data[n] = this._wrap(d, _), this.stats.vsize += this._getValLength(d), p || (this.stats.ksize += this._getKeyLength(n), this.stats.keys++), this.emit("set", n, d), !0;
796
+ }
797
+ mset(n) {
798
+ var d, _, E, f, p, S, D, v, L, P;
799
+ if (h(this, l), this.options.maxKeys > -1 && this.stats.keys + n.length >= this.options.maxKeys) throw d = this._error("ECACHEFULL"), d;
800
+ for (E = 0, D = n.length; E < D; E++) {
801
+ if (S = n[E], { key: p, val: P, ttl: L } = S, L && typeof L != "number") throw d = this._error("ETTLTYPE"), d;
802
+ if ((_ = this._isInvalidKey(p)) != null) throw _;
803
+ }
804
+ for (f = 0, v = n.length; f < v; f++) S = n[f], { key: p, val: P, ttl: L } = S, this.set(p, P, L);
805
+ return !0;
806
+ }
807
+ del(n) {
808
+ var d, _, E, f, p, S;
809
+ for (h(this, l), Array.isArray(n) || (n = [n]), d = 0, E = 0, p = n.length; E < p; E++) {
810
+ if (f = n[E], (_ = this._isInvalidKey(f)) != null) throw _;
811
+ this.data[f] != null && (this.stats.vsize -= this._getValLength(this._unwrap(this.data[f], !1)), this.stats.ksize -= this._getKeyLength(f), this.stats.keys--, d++, S = this.data[f], delete this.data[f], this.emit("del", f, S.v));
812
+ }
813
+ return d;
814
+ }
815
+ take(n) {
816
+ var d;
817
+ return h(this, l), d = this.get(n), d != null && this.del(n), d;
818
+ }
819
+ ttl(n, d) {
820
+ var _;
821
+ if (h(this, l), d || (d = this.options.stdTTL), !n) return !1;
822
+ if ((_ = this._isInvalidKey(n)) != null) throw _;
823
+ return this.data[n] != null && this._check(n, this.data[n]) ? (d >= 0 ? this.data[n] = this._wrap(this.data[n].v, d, !1) : this.del(n), !0) : !1;
824
+ }
825
+ getTtl(n) {
826
+ var d, _;
827
+ if (h(this, l), !!n) {
828
+ if ((_ = this._isInvalidKey(n)) != null) throw _;
829
+ if (this.data[n] != null && this._check(n, this.data[n])) return d = this.data[n].t, d;
830
+ }
831
+ }
832
+ keys() {
833
+ var n;
834
+ return h(this, l), n = Object.keys(this.data), n;
835
+ }
836
+ has(n) {
837
+ var d;
838
+ return h(this, l), d = this.data[n] != null && this._check(n, this.data[n]), d;
839
+ }
840
+ getStats() {
841
+ return h(this, l), this.stats;
842
+ }
843
+ flushAll(n = !0) {
844
+ h(this, l), this.data = {}, this.stats = { hits: 0, misses: 0, keys: 0, ksize: 0, vsize: 0 }, this._killCheckPeriod(), this._checkData(n), this.emit("flush");
845
+ }
846
+ flushStats() {
847
+ h(this, l), this.stats = { hits: 0, misses: 0, keys: 0, ksize: 0, vsize: 0 }, this.emit("flush_stats");
848
+ }
849
+ close() {
850
+ h(this, l), this._killCheckPeriod();
851
+ }
852
+ _checkData(n = !0) {
853
+ var d, _, E;
854
+ h(this, l), _ = this.data;
855
+ for (d in _) E = _[d], this._check(d, E);
856
+ n && this.options.checkperiod > 0 && (this.checkTimeout = setTimeout(this._checkData, this.options.checkperiod * 1e3, n), this.checkTimeout != null && this.checkTimeout.unref != null && this.checkTimeout.unref());
857
+ }
858
+ _killCheckPeriod() {
859
+ if (this.checkTimeout != null) return clearTimeout(this.checkTimeout);
860
+ }
861
+ _check(n, d) {
862
+ var _;
863
+ return h(this, l), _ = !0, d.t !== 0 && d.t < Date.now() && (this.options.deleteOnExpire && (_ = !1, this.del(n)), this.emit("expired", n, this._unwrap(d))), _;
864
+ }
865
+ _isInvalidKey(n) {
866
+ var d;
867
+ if (h(this, l), d = typeof n, m.call(this.validKeyTypes, d) < 0) return this._error("EKEYTYPE", { type: typeof n });
868
+ }
869
+ _wrap(n, d, _ = !0) {
870
+ var E, f, p;
871
+ return h(this, l), this.options.useClones || (_ = !1), f = Date.now(), E = 0, p = 1e3, d === 0 ? E = 0 : d ? E = f + d * p : this.options.stdTTL === 0 ? E = this.options.stdTTL : E = f + this.options.stdTTL * p, { t: E, v: _ ? r(n) : n };
872
+ }
873
+ _unwrap(n, d = !0) {
874
+ return this.options.useClones || (d = !1), n.v != null ? d ? r(n.v) : n.v : null;
875
+ }
876
+ _getKeyLength(n) {
877
+ return n.toString().length;
878
+ }
879
+ _getValLength(n) {
880
+ return h(this, l), typeof n == "string" ? n.length : this.options.forceString ? JSON.stringify(n).length : Array.isArray(n) ? this.options.arrayValueSize * n.length : typeof n == "number" ? 8 : typeof (n == null ? void 0 : n.then) == "function" ? this.options.promiseValueSize : typeof Buffer < "u" && Buffer !== null && Buffer.isBuffer(n) ? n.length : n != null && typeof n == "object" ? this.options.objectValueSize * Object.keys(n).length : typeof n == "boolean" ? 8 : 0;
881
+ }
882
+ _error(n, d = {}) {
883
+ var _;
884
+ return h(this, l), _ = new Error(), _.name = n, _.errorcode = n, _.message = this.ERRORS[n] != null ? this.ERRORS[n](d) : "-", _.data = d, _;
885
+ }
886
+ _initErrors() {
887
+ var n, d, _;
888
+ h(this, l), this.ERRORS = {}, _ = this._ERRORS;
889
+ for (d in _) n = _[d], this.ERRORS[d] = this.createErrorMessage(n);
890
+ }
891
+ createErrorMessage(n) {
892
+ return function(d) {
893
+ return n.replace("__key", d.type);
894
+ };
895
+ }
896
+ }
897
+ return l.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." }, l;
898
+ }).call(this);
899
+ }).call(e);
900
+ }), je = Q((e, i) => {
901
+ (function() {
902
+ var s;
903
+ s = i.exports = Be(), s.version = "5.1.2";
904
+ }).call(e);
905
+ }), We = ((e) => (e.EN = "en", e.BG = "bg", e.RO = "ro", e.EL = "el", e.SK = "sk", e.PT = "pt", e.SR = "sr", e.HU = "hu", e.SV = "sv", e.ES = "es", e.FR = "fr", e.NL = "nl", e.DE = "de", e.IT = "it", e.AR = "ar", e))(We || {}), Ke = ((e) => (e.DEV = "dev", e.PROD = "prod", e.STAGING = "staging", e))(Ke || {}), Xe = ((e) => (e.NATIVE = "native", e.ENETPULSE = "enetpulse", e.SPORTRADAR = "sportradar", e.SPORTAL_365 = "sportal365", e.API_FOOTBALL = "api_football", e))(Xe || {}), ze = ((e) => (e.DEFAULT = "default", e.STANDARD = "standard", e))(ze || {}), Je = ((e) => (e.FT_1X2 = "FT_1X2", e.HT_1X2 = "HT_1X2", e.BOTH_TEAMS_SCORE = "BOTH_TEAMS_SCORE", e.DOUBLE_CHANCE = "DOUBLE_CHANCE", e.HT_FT = "HT_FT", e.PLAYER_SCORE = "PLAYER_SCORE", e.PLAYER_YELLOW_CARD = "PLAYER_YELLOW_CARD", e.PLAYER_RED_CARD = "PLAYER_RED_CARD", e.RED_CARD_MATCH = "RED_CARD_MATCH", e.PENALTY_MATCH = "PENALTY_MATCH", e.PLAYER_SCORE_FIRST_GOAL = "PLAYER_SCORE_FIRST_GOAL", e.CORNERS_MATCH = "CORNERS_MATCH", e.CORRECT_SCORE = "CORRECT_SCORE", e.CORRECT_SCORE_ADVANCED = "CORRECT_SCORE_ADVANCED", e.CORRECT_SCORE_HT = "CORRECT_SCORE_HT", e.PLAYER_SCORE_HATTRICK = "PLAYER_SCORE_HATTRICK", e.PLAYER_SCORE_TWICE = "PLAYER_SCORE_TWICE", e.OVER_GOALS_0_5 = "OVER_GOALS_0_5", e.OVER_GOALS_1_5 = "OVER_GOALS_1_5", e.OVER_GOALS_2_5 = "OVER_GOALS_2_5", e.OVER_GOALS_3_5 = "OVER_GOALS_3_5", e.OVER_GOALS_4_5 = "OVER_GOALS_4_5", e.OVER_GOALS_5_5 = "OVER_GOALS_5_5", e.OVER_GOALS_6_5 = "OVER_GOALS_6_5", e.OVER_CORNERS_6_5 = "OVER_CORNERS_6_5", e.OVER_CORNERS_7_5 = "OVER_CORNERS_7_5", e.OVER_CORNERS_8_5 = "OVER_CORNERS_8_5", e.OVER_CORNERS_9_5 = "OVER_CORNERS_9_5", e.OVER_CORNERS_10_5 = "OVER_CORNERS_10_5", e.OVER_CORNERS_11_5 = "OVER_CORNERS_11_5", e.OVER_CORNERS_12_5 = "OVER_CORNERS_12_5", e.OVER_CORNERS_13_5 = "OVER_CORNERS_13_5", e))(Je || {});
906
+ function oe(e) {
907
+ this.message = e;
908
+ }
909
+ oe.prototype = new Error(), oe.prototype.name = "InvalidCharacterError";
910
+ typeof window < "u" && window.atob && window.atob.bind(window);
911
+ function he(e) {
912
+ this.message = e;
913
+ }
914
+ he.prototype = new Error(), he.prototype.name = "InvalidTokenError";
915
+ var qe = ((e) => (e[e.BAD_METHOD_CALL = 400] = "BAD_METHOD_CALL", e[e.UNAUTHORIZED = 401] = "UNAUTHORIZED", e[e.NOT_FOUND = 404] = "NOT_FOUND", e[e.PRECONDITION_FAILED = 412] = "PRECONDITION_FAILED", e))(qe || {}), $e = ((e) => (e.INVALID_TEMPLATE = "INVALID_TEMPLATE", e.INVALID_PREDICTION = "INVALID_PREDICTION", e.INVALID_MARKET = "INVALID_MARKET", e.INVALID_FIELD = "INVALID_FIELD", e.INVALID_TYPE = "INVALID_TYPE", e.EXCEEDED_LENGTH = "EXCEEDED_LENGTH", e.INVALID_TOKEN = "invalid_token", e.UNAUTHORIZED = "unauthorized", e.INVALID_FILTERS = "invalid_filters", e.INVALID_AVATAR = "invalid_avatar", e.INVALID_METHOD_CALL = "invalid_method_call", e.INVALID_LIMIT = "invalid_limit", e.INVALID_TEMPLATE_GROUP_ID = "invalid_template_group_id", e.INVALID_TEMPLATE_GROUP_FILTERS = "invalid_template_group_filters", e.INVALID_PAGE_NUMBER = "invalid_page_number", e.INVALID_DISCUSSION_IDS = "invalid_discussion_ids", e.ID_MAPPING_NOT_FOUND = "id_mapping_not_found", e.INVALID_COMPETITION_ID = "invalid_competition_id", e.INVALID_TEAM_ID = "invalid_team_id", e.INVALID_IDS = "invalid_ids", e.INVALID_INPUT_PROVIDER = "invalid_input_provider", e.INVALID_OUTPUT_PROVIDER = "invalid_output_provider", e.INVALID_MATCH_SUMMARY = "invalid_match_summary", e.INVALID_MATCH_SUMMARY_PREDICTIONS = "invalid_match_summary_predictions", e.INVALID_MATCH_SUMMARY_PREDICTIONS_KEYS = "invalid_match_summary_predictions_keys", e.ENTITY_IDS_NOT_FOUND = "entity_ids_not_found", e.MATCH_IDS_NOT_FOUND = "match_ids_not_found", e.INVALID_MATCH_IDS = "invalid_match_ids", e.ODD_CLIENT_CONFIGURATION_NOT_FOUND = "odd_client_configuration_not_found", e))($e || {}), b = { native: "id", sportradar: "sportradar_id", sportal365: "sportal365_id", enetpulse: "enetpulse_id", api_football: "api_football_id" };
916
+ (/* @__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");
917
+ var Qe = ((e) => (e.INVALID_MATCH_ID = "Match id is invalid!", e.INVALID_PLAYER_ID = "Player id is invalid!", e.QUERY_PARAM_MATCH_IDS_EXCEEDED = "Maximum matchIds in PredictionFilters should be 10 or less.", e.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED = "Maximum limit for filtering games is 50 or less.", e.INVALID_FIXTURES_FIELD = "Fixtures field is invalid. For more information please visit our documentation", e.INVALID_TOKEN = "Invalid JWT token is provided", e.EXPIRED_TOKEN = "The provided JWT token is expired", e.ENTITIES_NEEDED = "At least one of footballCompetitions, footballTeams or footballPlayers properties should be provided for filters.", e.ENTITIES_FOLLOWS_FILTERS_EXCEEDED = "Maximum length per entity should be 24 or less.", e.INVALID_TYPE = "You have provided invalid type. The valid type is ", e.INVALID_VALUE = "You have provided invalid value. The valid value is ", e.INVALID_AVATAR = "Invalid URL syntax for avatar image.", e.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.", e.INVALID_LIMIT = "Invalid limit. The maximum limit is: ", e.INVALID_LIMIT_TYPE = "Invalid limit type. The proper type is number.", e.FILTER_COMBINATION_ERROR = "You need to use both 'entityIds' and 'entityType' filters together", e.INVALID_ENTITY_TYPE = "Invalid 'entityType' filter. Please use one of the following valid options: competition, team, or player", e.INVALID_TEMPLATE_GROUP_ID = "There is no group in this template with the provided groupId", e.INVALID_TEMPLATE_GROUP_FILTERS = "The provided template group has no filters", e.INVALID_PAGE_NUMBER = "Invalid page number provided. Use number between 1 and max number of pages.", e.INVALID_DISCUSSION_IDS = "Invalid discussion ids argument. Please provide at least one discussion id in an array", e.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.", e.EXCEEDED_EXTENDED_DISCUSSION_IDS = "Maximum number of discussion ids exceeded. The maximum number of discussion ids is: ", e.ID_MAPPING_NOT_FOUND = "No ID mappings are available for the provided ID. ID argument: ", e.INVALID_PARAM = "Invalid parameter provided. Please check the following parameter: ", e.INVALID_COMPETITION_ID = "Invalid competition ID provided. Please provide a valid competition ID.", e.INVALID_TEAM_ID = "Invalid team ID provided. Please provide a valid team ID.", e.INVALID_OR_EMPTY_IDS = "Invalid or empty IDs provided. Please provide at least one ID.", e.INVALID_PROVIDER = "Invalid provider. The valid providers are: 'native', 'enetpulse', 'sportal365', 'sportradar' and 'api_football'.", e.INVALID_OUTPUT_PROVIDER = "Invalid output provider. The output can not be the same as the input provider.", e.MATCH_SUMMARY_REQUIRED = "Match summary is required.", e.MATCH_SUMMARY_PREDICTIONS_REQUIRED = "Predictions in match summary are required.", e.INVALID_MATCH_SUMMARY_PREDICTIONS_KEYS = "Keys in predictions in match summary are invalid. The valid ones are: ", e.INVALID_COLLECT_LEAD_METHOD_CALL = "The method 'collectLead' from Profile namespace is not called correctly. You need to provide 'requestBody' parameter to the method.", e.REQUIRED_FIXTURES_FIELD = "Fixtures field is required and should contain at least one fixtures object. For more information please visit our documentation", e.INVALID_TIEBREAKER_FIELD = "Tiebreaker field is invalid. It should contain statTotal key with integer value. For more information please visit our documentation", e.ENTITY_IDS_NOT_FOUND = "Some of the sport entity IDs were not found for the provided id schema", e.MATCH_IDS_NOT_FOUND = "Some of the match IDs were not found for the provided id schema", e.INVALID_STANDING_PREDICTION_ARGUMENT = "The prediction argument is invalid. For more information please visit our documentation", e.INVALID_MAP_PLAYERS_ROLES_KEYS = "The keys in the players roles map are not part of the valid keys. The valid keys are: ", e.INVALID_MAP_PLAYERS_ROLES_VALUES = "The values in the map are not valid. The valid ones are: ", e.INVALID_MATCH_IDS = "Match IDs are invalid!", e.MISSING_ODD_CLIENT_CONFIGURATION = "Odds namespace requires oddClient configuration to be set", e.INVALID_COLLECT_CONSENTS_METHOD_CALL = "The method 'collectConsents' from Profile namespace is not called correctly. You need to provide 'consents' parameter to the method.", e))(Qe || {}), Ze = ((e) => (e.LIKE = "like", e.DISLIKE = "dislike", e.PAGE_VIEW = "page_view", e.CONTENT_CONSUMED = "content_consumed", e.SHARE = "share", e.COMMENT = "comment", e.CLICK_AD = "click_ad", e.PREDICTION_MADE = "prediction_made", e.CONVERT = "convert", e.MANAGE_INTERESTS = "manage_interests", e.GAME_PARTICIPATION = "game_participation", e.ARTICLE_CONSUMED = "article_consumed", e.VIDEO_CONSUMED = "video_consumed", e.SHORT_VIDEO_CONSUMED = "short_video_consumed", e.LONG_VIDEO_CONSUMED = "long_video_consumed", e.AUDIO_CONSUMED = "audio_consumed", e.GALLERY_CONSUMED = "gallery_consumed", e.IMAGE_CONSUMED = "image_consumed", e.POLL_PARTICIPATION = "poll_participation", e))(Ze || {}), ae = "FansUnited", q = { football: { ids: [], countries: [], competitions: [], expirations: { ids: 0 } }, profile: { info: {}, statistics: {}, badges: null, countries: [], expirations: { profile: 0, statistics: 0, badges: 0 } }, client: { features: {}, expirations: { features: 0 } } }, X = class {
918
+ constructor(e) {
919
+ t(this, "idSchema", "");
920
+ t(this, "storageInstance", null);
921
+ t(this, "expirationProfileTimeout", 600);
922
+ t(this, "expirationBadgesTimeout", 3600);
923
+ t(this, "expirationClientFeaturesTimeout", 14400);
924
+ t(this, "expirationFootballIdsTimeout", 604800);
925
+ t(this, "clearData", async () => {
926
+ await this.setData(q);
927
+ });
928
+ t(this, "getCompetitions", async (e) => {
929
+ let i = await this.getData();
930
+ return e ? e.competitionSearchFilter(i.football.competitions) : i.football.competitions;
931
+ });
932
+ t(this, "setCompetitions", async (e) => {
933
+ let i = await this.getData(), s = [...i.football.competitions];
934
+ s.push(...e), i.football.competitions = this.makeCompetitionsUnique(s), await this.setData(i);
935
+ });
936
+ t(this, "getCompetitionsLength", async () => (await this.getData()).football.competitions.length);
937
+ t(this, "getEntityById", async (e = "", i = "") => (await this.getData()).football.ids.find((s) => {
938
+ let r = b[this.idSchema];
939
+ return s && `${s[r]}` === i && s.resource === e;
940
+ }));
941
+ t(this, "getEntity", async (e, i, s) => {
942
+ let r = await this.getData();
943
+ return Array.isArray(e) ? r.football.ids.filter((c) => {
944
+ let h = b[s];
945
+ return c && e.includes(`${c[h]}`) && c.resource === i;
946
+ }) : r.football.ids.find((c) => {
947
+ let h = b[s];
948
+ return c && `${c[h]}` === e && c.resource === i;
949
+ });
950
+ });
951
+ t(this, "checkForExistingIdObjs", async (e, i) => {
952
+ let s = b[i], r = {};
953
+ for (let c of Object.keys(e)) {
954
+ let h = e[c], m = (await this.getEntity(h, c, i)).map((y) => y[s]), l = e[c].filter((y) => !m.includes(y));
955
+ r[c] = h.map((y) => l.includes(y) ? { id: y, exists: !1 } : { id: y, exists: !0 });
956
+ }
957
+ return r;
958
+ });
959
+ t(this, "getIdsByType", async (e, i, s) => {
960
+ let r = await this.getData(), c = b[s], h = b[i], m = {};
961
+ return Object.keys(e).forEach((l) => {
962
+ let y = e[l], n = [];
963
+ r.football.ids.forEach((d) => {
964
+ y.forEach((_, E) => {
965
+ _ === d[h] && l === d.resource && (n[E] = d[c]);
966
+ });
967
+ }), m[l] = n;
968
+ }), m;
969
+ });
970
+ t(this, "addIdMapping", async (e) => {
971
+ let i = await this.getData();
972
+ i.football.ids.push(e), await this.setData(i);
973
+ });
974
+ t(this, "addIdMappings", async (e) => {
975
+ let i = await this.getData(), s = i.football.ids;
976
+ s = [...s, ...e], i.football.ids = s, await this.setData(i);
977
+ });
978
+ t(this, "addTopIdMappings", async (e) => {
979
+ let i = await this.getData();
980
+ if (i.football.ids.length) {
981
+ let s = JSON.parse(JSON.stringify(i.football.ids));
982
+ s = s.filter((r) => r.resource !== "match"), e = e.filter((r) => r.resource === "match"), s = [...s, ...e], i.football.ids = s;
983
+ } else i.football.ids = e;
984
+ i.football.expirations.ids = Math.floor(Date.now() / 1e3) + this.expirationFootballIdsTimeout, await this.setData(i);
985
+ });
986
+ t(this, "setOwnProfile", async (e) => {
987
+ let i = await this.getData();
988
+ i.profile.info = e, i.profile.expirations.profile = Math.floor(Date.now() / 1e3) + this.expirationProfileTimeout, await this.setData(i);
989
+ });
990
+ t(this, "getOwnProfile", async () => (await this.getData()).profile.info);
991
+ t(this, "getProfileCountries", async () => (await this.getData()).profile.countries);
992
+ t(this, "setProfileCountries", async (e) => {
993
+ let i = await this.getData();
994
+ i.profile.countries = e, await this.setData(i);
995
+ });
996
+ t(this, "getProfileStats", async () => (await this.getData()).profile.statistics);
997
+ t(this, "setProfileStats", async (e) => {
998
+ let i = await this.getData();
999
+ i.profile.statistics = e, i.profile.expirations.statistics = Math.floor(Date.now() / 1e3) + this.expirationProfileTimeout, await this.setData(i);
1000
+ });
1001
+ t(this, "getProfileBadges", async () => (await this.getData()).profile.badges);
1002
+ t(this, "setProfileBadges", async (e) => {
1003
+ let i = await this.getData();
1004
+ i.profile.badges = e, i.profile.expirations.badges = Math.floor(Date.now() / 1e3) + this.expirationBadgesTimeout, await this.setData(i);
1005
+ });
1006
+ t(this, "getFootballCountries", async () => (await this.getData()).football.countries);
1007
+ t(this, "setFootballCountries", async (e) => {
1008
+ let i = await this.getData();
1009
+ i.football.countries = e, await this.setData(i);
1010
+ });
1011
+ t(this, "getClientFeatures", async () => (await this.getData()).client.features);
1012
+ t(this, "setClientFeatures", async (e) => {
1013
+ let i = await this.getData(), s = JSON.parse(JSON.stringify(e));
1014
+ i.client.expirations.features = Math.floor(Date.now() / 1e3) + this.expirationClientFeaturesTimeout, i.client.features = s, await this.setData(i);
1015
+ });
1016
+ t(this, "deleteClientFeatures", async () => {
1017
+ let e = await this.getData(), i = JSON.parse(JSON.stringify(e));
1018
+ i.client = { features: {}, expirations: { features: 0 } }, await this.setData(i);
1019
+ });
1020
+ t(this, "getExpiration", async (e, i) => {
1021
+ await this.initialNewSchema(e, "expirations");
1022
+ let s = await this.getData();
1023
+ switch (i) {
1024
+ case "profile":
1025
+ return s.profile.expirations.profile;
1026
+ case "statistics":
1027
+ return s.profile.expirations.statistics;
1028
+ case "badges":
1029
+ return s.profile.expirations.badges;
1030
+ case "features":
1031
+ return s.client.expirations.features;
1032
+ case "ids":
1033
+ return s.football.expirations.ids;
1034
+ }
1035
+ });
1036
+ t(this, "makeCompetitionsUnique", (e) => {
1037
+ let i = /* @__PURE__ */ new Set();
1038
+ return e.filter((s) => {
1039
+ let r = !i.has(s.id);
1040
+ return i.add(s.id), r;
1041
+ });
1042
+ });
1043
+ t(this, "initialNewSchema", async (e, i) => {
1044
+ let s = await this.getData();
1045
+ (!s || !s[e] || !s[e][i]) && await this.setData(q);
1046
+ });
1047
+ this.idSchema = e, this.getStorageInstance();
1048
+ }
1049
+ static getInstance(e) {
1050
+ return X.instance || (X.instance = new X(e)), X.instance;
1051
+ }
1052
+ async getStorageInstance() {
1053
+ try {
1054
+ let e = await Promise.resolve().then(() => (He(), me));
1055
+ this.storageInstance = e.default;
1056
+ } catch (e) {
1057
+ console.error(e);
1058
+ }
1059
+ }
1060
+ async getData() {
1061
+ try {
1062
+ let e = await this.storageInstance.getItem(ae);
1063
+ return e ? JSON.parse(e) : (await this.storageInstance.setItem(ae, JSON.stringify(q)), q);
1064
+ } catch (e) {
1065
+ throw console.error("AsyncStorage error:", e), e;
1066
+ }
1067
+ }
1068
+ async setData(e) {
1069
+ await this.storageInstance.setItem(ae, JSON.stringify(e));
1070
+ }
1071
+ }, et = X;
1072
+ k(et, "instance");
1073
+ var se = "FansUnited", ne = { football: { ids: [], countries: [], competitions: [], expirations: { ids: 0 } }, profile: { info: {}, statistics: {}, badges: null, countries: [], expirations: { profile: 0, statistics: 0, badges: 0 } }, client: { features: {}, expirations: { features: 0 } } }, z = class {
1074
+ constructor(e) {
1075
+ t(this, "idSchema", "");
1076
+ t(this, "expirationProfileTimeout", 600);
1077
+ t(this, "expirationBadgesTimeout", 3600);
1078
+ t(this, "expirationClientFeaturesTimeout", 14400);
1079
+ t(this, "expirationFootballIdsTimeout", 604800);
1080
+ t(this, "clearData", async () => {
1081
+ this.setData(ne);
1082
+ });
1083
+ t(this, "getEntityById", async (e = "", i = "") => this.getData().football.ids.find((s) => {
1084
+ let r = b[this.idSchema];
1085
+ return s && `${s[r]}` === i && s.resource === e;
1086
+ }));
1087
+ t(this, "getEntity", (e, i, s) => Array.isArray(e) ? this.getData().football.ids.filter((r) => {
1088
+ let c = b[s];
1089
+ return r && e.includes(`${r[c]}`) && r.resource === i;
1090
+ }) : this.getData().football.ids.find((r) => {
1091
+ let c = b[s];
1092
+ return r && `${r[c]}` === e && r.resource === i;
1093
+ }));
1094
+ t(this, "getEntityByNativeId", (e = "", i = "") => this.getData().football.ids.find((s) => s && `${s.id}` === i && s.resource === e));
1095
+ t(this, "checkForExistingIdObjs", async (e, i) => {
1096
+ let s = b[i], r = {};
1097
+ return Object.keys(e).forEach((c) => {
1098
+ let h = e[c], m = this.getEntity(h, c, i).map((y) => y[s]), l = e[c].filter((y) => !m.includes(y));
1099
+ r[c] = h.map((y) => l.includes(y) ? { id: y, exists: !1 } : { id: y, exists: !0 });
1100
+ }), r;
1101
+ });
1102
+ t(this, "getIdsByType", async (e, i, s) => {
1103
+ let r = b[s], c = b[i], h = {};
1104
+ return Object.keys(e).forEach((m) => {
1105
+ let l = e[m], y = [];
1106
+ this.getData().football.ids.forEach((n) => {
1107
+ l.forEach((d, _) => {
1108
+ d === n[c] && m === n.resource && (y[_] = n[r]);
1109
+ });
1110
+ }), h[m] = y;
1111
+ }), h;
1112
+ });
1113
+ t(this, "addIdMapping", (e) => {
1114
+ let i = this.getData();
1115
+ i.football.ids.push(e), this.setData(i);
1116
+ });
1117
+ t(this, "addIdMappings", async (e) => {
1118
+ let i = this.getData(), s = i.football.ids;
1119
+ s = [...s, ...e], i.football.ids = s, this.setData(i);
1120
+ });
1121
+ t(this, "addTopIdMappings", async (e) => {
1122
+ let i = this.getData();
1123
+ if (i.football.ids.length) {
1124
+ let s = JSON.parse(JSON.stringify(i.football.ids));
1125
+ s = s.filter((r) => r.resource !== "match"), e = e.filter((r) => r.resource === "match"), s = [...s, ...e], i.football.ids = s;
1126
+ } else i.football.ids = e;
1127
+ i.football.expirations.ids = Math.floor(Date.now() / 1e3) + this.expirationFootballIdsTimeout, this.setData(i);
1128
+ });
1129
+ t(this, "setOwnProfile", async (e) => {
1130
+ let i = this.getData();
1131
+ i.profile.info = e, i.profile.expirations.profile = Math.floor(Date.now() / 1e3) + this.expirationProfileTimeout, this.setData(i);
1132
+ });
1133
+ t(this, "getOwnProfile", () => this.getData().profile.info);
1134
+ t(this, "getProfileCountries", () => this.getData().profile.countries);
1135
+ t(this, "setProfileCountries", async (e) => {
1136
+ let i = this.getData();
1137
+ i.profile.countries = e, this.setData(i);
1138
+ });
1139
+ t(this, "getProfileStats", () => this.getData().profile.statistics);
1140
+ t(this, "setProfileStats", async (e) => {
1141
+ let i = this.getData();
1142
+ i.profile.statistics = e, i.profile.expirations.statistics = Math.floor(Date.now() / 1e3) + this.expirationProfileTimeout, this.setData(i);
1143
+ });
1144
+ t(this, "getProfileBadges", () => this.getData().profile.badges);
1145
+ t(this, "setProfileBadges", async (e) => {
1146
+ let i = this.getData();
1147
+ i.profile.badges = e, i.profile.expirations.badges = Math.floor(Date.now() / 1e3) + this.expirationBadgesTimeout, this.setData(i);
1148
+ });
1149
+ t(this, "getFootballCountries", () => this.getData().football.countries);
1150
+ t(this, "setFootballCountries", async (e) => {
1151
+ let i = this.getData();
1152
+ i.football.countries = e, this.setData(i);
1153
+ });
1154
+ t(this, "getCompetitions", (e) => {
1155
+ let i = this.getData();
1156
+ return e ? e.competitionSearchFilter(i.football.competitions) : i.football.competitions;
1157
+ });
1158
+ t(this, "setCompetitions", async (e) => {
1159
+ let i = this.getData(), s = [...i.football.competitions];
1160
+ s.push(...e), i.football.competitions = this.makeCompetitionsUnique(s), this.setData(i);
1161
+ });
1162
+ t(this, "getCompetitionsLength", async () => {
1163
+ let { football: e } = this.getData();
1164
+ return e.competitions.length;
1165
+ });
1166
+ t(this, "getClientFeatures", () => this.getData().client.features);
1167
+ t(this, "setClientFeatures", async (e) => {
1168
+ let i = this.getData(), s = JSON.parse(JSON.stringify(e));
1169
+ i.client.expirations.features = Math.floor(Date.now() / 1e3) + this.expirationClientFeaturesTimeout, i.client.features = s, this.setData(i);
1170
+ });
1171
+ t(this, "deleteClientFeatures", async () => {
1172
+ let e = this.getData(), i = JSON.parse(JSON.stringify(e));
1173
+ i.client = { features: {}, expirations: { features: 0 } }, this.setData(i);
1174
+ });
1175
+ t(this, "getExpiration", async (e, i) => {
1176
+ this.initialNewSchema(e, "expirations");
1177
+ let s = this.getData();
1178
+ switch (i) {
1179
+ case "profile":
1180
+ return s.profile.expirations.profile;
1181
+ case "statistics":
1182
+ return s.profile.expirations.statistics;
1183
+ case "badges":
1184
+ return s.profile.expirations.badges;
1185
+ case "features":
1186
+ return s.client.expirations.features;
1187
+ case "ids":
1188
+ return s.football.expirations.ids;
1189
+ }
1190
+ });
1191
+ t(this, "makeCompetitionsUnique", (e) => {
1192
+ let i = /* @__PURE__ */ new Set();
1193
+ return e.filter((s) => {
1194
+ let r = !i.has(s.id);
1195
+ return i.add(s.id), r;
1196
+ });
1197
+ });
1198
+ t(this, "getData", () => (localStorage.getItem(se) || this.setData(ne), JSON.parse(localStorage.getItem(se))));
1199
+ t(this, "setData", (e) => {
1200
+ localStorage.setItem(se, JSON.stringify(e));
1201
+ });
1202
+ t(this, "initialNewSchema", (e, i) => {
1203
+ let s = this.getData();
1204
+ (!s || !s[e] || !s[e][i]) && this.setData(ne);
1205
+ });
1206
+ this.idSchema = e;
1207
+ }
1208
+ static getInstance(e) {
1209
+ return z.instance || (z.instance = new z(e)), z.instance;
1210
+ }
1211
+ }, tt = z;
1212
+ k(tt, "instance");
1213
+ var it = ke(je()), I = class {
1214
+ constructor(e) {
1215
+ t(this, "profileTTL", 600);
1216
+ t(this, "clientTTL", 14400);
1217
+ t(this, "profileBadgesTTL", 3600);
1218
+ t(this, "idMappingsExpiration", 0);
1219
+ t(this, "idSchema", "");
1220
+ t(this, "clearData", async () => I.nodeCache.flushAll());
1221
+ t(this, "getEntityById", async (e, i) => {
1222
+ let s = I.nodeCache.get("ids");
1223
+ return s ? s.find((r) => {
1224
+ let c = b[this.idSchema];
1225
+ return r && `${r[c]}` === i && r.resource === e;
1226
+ }) : null;
1227
+ });
1228
+ t(this, "getEntity", async (e, i, s) => {
1229
+ let r = I.nodeCache.get("ids");
1230
+ return r ? Array.isArray(e) ? [] : null : Array.isArray(e) ? r.filter((c) => {
1231
+ let h = b[s];
1232
+ return c && e.includes(`${c[h]}`) && c.resource === i;
1233
+ }) : r.find((c) => {
1234
+ let h = b[s];
1235
+ return c && `${c[h]}` === e && c.resource === i;
1236
+ });
1237
+ });
1238
+ t(this, "checkForExistingIdObjs", async (e, i) => {
1239
+ let s = b[i], r = {};
1240
+ for (let c of Object.keys(e)) {
1241
+ let h = e[c], m = (await this.getEntity(h, c, i)).map((y) => y[s]), l = e[c].filter((y) => !m.includes(y));
1242
+ r[c] = h.map((y) => l.includes(y) ? { id: y, exists: !1 } : { id: y, exists: !0 });
1243
+ }
1244
+ return r;
1245
+ });
1246
+ t(this, "getIdsByType", async (e, i, s) => {
1247
+ let r = b[s], c = b[i], h = I.nodeCache.get("ids"), m = {};
1248
+ return h ? (Object.keys(e).forEach((l) => {
1249
+ let y = e[l], n = [];
1250
+ h.forEach((d) => {
1251
+ y.forEach((_, E) => {
1252
+ _ === d[c] && l === d.resource && (n[E] = d[r]);
1253
+ });
1254
+ }), m[l] = n;
1255
+ }), m) : null;
1256
+ });
1257
+ t(this, "addIdMapping", async (e) => {
1258
+ let i = I.nodeCache.get("ids");
1259
+ i.push(e), I.nodeCache.set("ids", i);
1260
+ });
1261
+ t(this, "addIdMappings", async (e) => {
1262
+ let i = I.nodeCache.get("ids");
1263
+ i = [...i, ...e], I.nodeCache.set("ids", i);
1264
+ });
1265
+ t(this, "addTopIdMappings", async (e) => {
1266
+ let i = I.nodeCache.get("ids"), s = 604800;
1267
+ if (i) {
1268
+ let r = JSON.parse(JSON.stringify(i));
1269
+ r = r.filter((c) => c.resource !== "match"), e = e.filter((c) => c.resource === "match"), r = [...r, ...e], I.nodeCache.set("ids", r);
1270
+ } else I.nodeCache.set("ids", e);
1271
+ this.idMappingsExpiration = Math.floor(Date.now() / 1e3) + s;
1272
+ });
1273
+ t(this, "setOwnProfile", async (e) => {
1274
+ I.nodeCache.set("profile", e, this.profileTTL);
1275
+ });
1276
+ t(this, "getOwnProfile", async () => I.nodeCache.get("profile"));
1277
+ t(this, "getProfileCountries", async () => I.nodeCache.get("profile_countries"));
1278
+ t(this, "setProfileCountries", async (e) => {
1279
+ I.nodeCache.set("profile_countries", e);
1280
+ });
1281
+ t(this, "getProfileStats", async () => I.nodeCache.get("profile_stats"));
1282
+ t(this, "setProfileStats", async (e) => {
1283
+ I.nodeCache.set("profile_stats", e, this.profileTTL);
1284
+ });
1285
+ t(this, "getProfileBadges", async () => I.nodeCache.get("profile_badges"));
1286
+ t(this, "setProfileBadges", async (e) => {
1287
+ I.nodeCache.set("profile_badges", e, this.profileBadgesTTL);
1288
+ });
1289
+ t(this, "getFootballCountries", async () => I.nodeCache.get("football_countries"));
1290
+ t(this, "setFootballCountries", async (e) => {
1291
+ I.nodeCache.set("football_countries", e);
1292
+ });
1293
+ t(this, "getCompetitions", async (e) => {
1294
+ let i = I.nodeCache.get("football_competitions");
1295
+ return i ? e ? e.competitionSearchFilter(i) : i : null;
1296
+ });
1297
+ t(this, "setCompetitions", async (e) => {
1298
+ I.nodeCache.set("football_competitions", e);
1299
+ });
1300
+ t(this, "getCompetitionsLength", async () => {
1301
+ let e = I.nodeCache.get("football_competitions");
1302
+ return e ? e.length : 0;
1303
+ });
1304
+ t(this, "getClientFeatures", async () => I.nodeCache.get("client"));
1305
+ t(this, "setClientFeatures", async (e) => {
1306
+ I.nodeCache.set("client", e, this.clientTTL);
1307
+ });
1308
+ t(this, "deleteClientFeatures", async () => {
1309
+ I.nodeCache.del("client");
1310
+ });
1311
+ t(this, "getExpiration", async (e, i) => {
1312
+ let s = this.getKeyFromExpirationType(i);
1313
+ return s === "ids" ? this.idMappingsExpiration : I.nodeCache.getTtl(s);
1314
+ });
1315
+ t(this, "getKeyFromExpirationType", (e) => {
1316
+ switch (e) {
1317
+ case "profile":
1318
+ return "profile";
1319
+ case "statistics":
1320
+ return "profile_stats";
1321
+ case "badges":
1322
+ return "profile_badges";
1323
+ case "features":
1324
+ return "client";
1325
+ case "ids":
1326
+ return "ids";
1327
+ }
1328
+ });
1329
+ }
1330
+ static getInstance(e) {
1331
+ return I.instance || (I.instance = new I(e), I.nodeCache.options.useClones = !1), I.instance;
1332
+ }
1333
+ }, fe = I;
1334
+ k(fe, "instance"), k(fe, "nodeCache", new it.default());
1335
+ var at = ((e) => (e.ACTIVE = "ACTIVE", e.WON = "WON", e.LOST = "LOST", e.PARTIALLY_WON = "PARTIALLY_WON", e.CANCELED = "CANCELED", e))(at || {}), st = ((e) => (e.ACTIVE = "ACTIVE", e.WON = "WON", e.LOST = "LOST", e.PARTIALLY_WON = "PARTIALLY_WON", e.CANCELED = "CANCELED", e))(st || {}), Mt = class {
1336
+ constructor() {
1337
+ t(this, "id", null);
1338
+ t(this, "title", null);
1339
+ t(this, "description", null);
1340
+ t(this, "images", null);
1341
+ t(this, "rules", null);
1342
+ t(this, "customFields", null);
1343
+ t(this, "type", "EVENT");
1344
+ t(this, "status", null);
1345
+ t(this, "related", []);
1346
+ t(this, "tiebreaker", null);
1347
+ t(this, "predictionsCutoff", null);
1348
+ t(this, "fixtures", []);
1349
+ t(this, "branding", null);
1350
+ t(this, "brandingId", null);
1351
+ t(this, "createdAt", null);
1352
+ t(this, "updatedAt", null);
1353
+ }
1354
+ }, nt = ((e) => (e.BOOLEAN = "BOOLEAN", e.NUMBER = "NUMBER", e.ENUM = "ENUM", e.FREE_INPUT = "FREE_INPUT", e))(nt || {}), rt = ((e) => (e.PARTICIPANT_ONE = "PARTICIPANT_ONE", e.PARTICIPANT_TWO = "PARTICIPANT_TWO", e.DRAW = "DRAW", e))(rt || {}), ot = ((e) => (e.OPEN = "OPEN", e.LIVE = "LIVE", e.PENDING = "PENDING", e.CANCELED = "CANCELED", e.CLOSED = "CLOSED", e.SETTLED = "SETTLED", e))(ot || {}), Ft = class {
1355
+ constructor() {
1356
+ t(this, "fixtures", []);
1357
+ t(this, "tiebreaker");
1358
+ }
1359
+ }, Z = class {
1360
+ constructor() {
1361
+ t(this, "main", null);
1362
+ t(this, "cover", null);
1363
+ t(this, "mobile", null);
1364
+ }
1365
+ }, lt = class {
1366
+ constructor() {
1367
+ t(this, "timeTiebreaker", !1);
1368
+ }
1369
+ }, ct = class {
1370
+ constructor() {
1371
+ t(this, "id", null);
1372
+ t(this, "title", null);
1373
+ t(this, "alternativeTitle", null);
1374
+ t(this, "description", null);
1375
+ t(this, "type", null);
1376
+ t(this, "images", new Z());
1377
+ t(this, "participationCount", null);
1378
+ t(this, "questionsCount", null);
1379
+ t(this, "status", null);
1380
+ t(this, "language", null);
1381
+ t(this, "authRequirement", null);
1382
+ t(this, "flags", null);
1383
+ t(this, "customFields", null);
1384
+ t(this, "labels", null);
1385
+ t(this, "branding", null);
1386
+ t(this, "brandingId", null);
1387
+ t(this, "related", []);
1388
+ t(this, "time", null);
1389
+ t(this, "points", null);
1390
+ t(this, "scored", !1);
1391
+ t(this, "maxAttempts", null);
1392
+ t(this, "averageScore", null);
1393
+ t(this, "perfectScore", null);
1394
+ t(this, "adContent", null);
1395
+ t(this, "context", null);
1396
+ t(this, "createdAt", null);
1397
+ t(this, "updatedAt", null);
1398
+ }
1399
+ }, Vt = class extends ct {
1400
+ constructor() {
1401
+ super(...arguments);
1402
+ t(this, "rules", null);
1403
+ t(this, "questions", []);
1404
+ }
1405
+ }, Gt = class {
1406
+ constructor() {
1407
+ t(this, "classicQuizId", null);
1408
+ t(this, "classicQuizModel", null);
1409
+ t(this, "correct", null);
1410
+ t(this, "classicQuizQuestions", null);
1411
+ t(this, "personalBest", null);
1412
+ t(this, "points", null);
1413
+ t(this, "answers", []);
1414
+ t(this, "attempts", 0);
1415
+ }
1416
+ }, ut = class {
1417
+ constructor() {
1418
+ t(this, "id", "");
1419
+ t(this, "title", "");
1420
+ t(this, "alternativeTitle", "");
1421
+ t(this, "description", "");
1422
+ t(this, "images", new Z());
1423
+ t(this, "flags", []);
1424
+ t(this, "status", "");
1425
+ t(this, "language", "");
1426
+ t(this, "authRequirement", null);
1427
+ t(this, "winningCondition", "");
1428
+ t(this, "lives", 0);
1429
+ t(this, "time", 0);
1430
+ t(this, "points", []);
1431
+ t(this, "customFields", null);
1432
+ t(this, "branding", null);
1433
+ t(this, "brandingId", null);
1434
+ t(this, "labels", null);
1435
+ t(this, "adContent", "");
1436
+ t(this, "context", null);
1437
+ t(this, "type", "");
1438
+ t(this, "related", []);
1439
+ t(this, "totalParticipationsCount", 0);
1440
+ t(this, "totalUsersCount", 0);
1441
+ t(this, "finishedParticipationsCount", 0);
1442
+ t(this, "averageStartedParticipationsCount", 0);
1443
+ t(this, "averageFinishedParticipationsCount", 0);
1444
+ t(this, "createdAt", "");
1445
+ t(this, "updatedAt", "");
1446
+ }
1447
+ }, kt = class extends ut {
1448
+ constructor() {
1449
+ super(...arguments);
1450
+ t(this, "rules", "");
1451
+ }
1452
+ }, dt = ((e) => (e.PRE_EVENT = "PRE_EVENT", e.LIVE = "LIVE", e.ALL = "ALL", e))(dt || {}), ht = ((e) => (e.ORDINARY_TIME = "ORDINARY_TIME", e.FULL_TIME = "FULL_TIME", e))(ht || {}), ft = ((e) => (e.DECIMAL = "DECIMAL", e.MONEYLINE = "MONEYLINE", e.FRACTIONAL = "FRACTIONAL", e))(ft || {}), _t = ((e) => (e.FT_1X2 = "FT_1X2", e.DOUBLE_CHANCE = "DOUBLE_CHANCE", e.HT_FT = "HT_FT", e.BOTH_TEAMS_SCORE = "BOTH_TEAMS_SCORE", e.CORRECT_SCORE = "CORRECT_SCORE", e.PLAYER_SCORE_FIRST_GOAL = "PLAYER_SCORE_FIRST_GOAL", e.PLAYER_SCORE = "PLAYER_SCORE", e.PLAYER_RED_CARD = "PLAYER_RED_CARD", e.PLAYER_YELLOW_CARD = "PLAYER_YELLOW_CARD", e.OVER_GOALS_0_5 = "OVER_GOALS_0_5", e.OVER_GOALS_1_5 = "OVER_GOALS_1_5", e.OVER_GOALS_2_5 = "OVER_GOALS_2_5", e.OVER_GOALS_3_5 = "OVER_GOALS_3_5", e.OVER_GOALS_4_5 = "OVER_GOALS_4_5", e.OVER_GOALS_5_5 = "OVER_GOALS_5_5", e))(_t || {}), Ht = class {
1453
+ constructor() {
1454
+ t(this, "gameInstanceId", null);
1455
+ t(this, "fixtures", null);
1456
+ }
1457
+ }, mt = ((e) => (e.ACTIVE = "ACTIVE", e.WON = "WON", e.LOST = "LOST", e.PARTIALLY_WON = "PARTIALLY_WON", e.CANCELED = "CANCELED", e))(mt || {}), pt = class {
1458
+ constructor() {
1459
+ t(this, "id", null);
1460
+ t(this, "title", null);
1461
+ t(this, "description", null);
1462
+ t(this, "type", null);
1463
+ t(this, "status", null);
1464
+ t(this, "authRequirement", null);
1465
+ t(this, "scheduleOpenAt", null);
1466
+ t(this, "predictionsCutoff", null);
1467
+ t(this, "fixtures", []);
1468
+ t(this, "tiebreaker", new lt());
1469
+ t(this, "participantsCount", 0);
1470
+ t(this, "related", []);
1471
+ t(this, "excludedProfileIds", null);
1472
+ t(this, "rules", null);
1473
+ t(this, "labels", null);
1474
+ t(this, "customFields", null);
1475
+ t(this, "branding", null);
1476
+ t(this, "brandingId", null);
1477
+ t(this, "flags", null);
1478
+ t(this, "images", new Z());
1479
+ t(this, "createdAt", null);
1480
+ t(this, "updatedAt", null);
1481
+ }
1482
+ }, Yt = class extends pt {
1483
+ constructor() {
1484
+ super(...arguments);
1485
+ t(this, "adContent", null);
1486
+ }
1487
+ }, yt = class {
1488
+ constructor() {
1489
+ t(this, "id", null);
1490
+ t(this, "title", null);
1491
+ t(this, "alternativeTitle", null);
1492
+ t(this, "description", null);
1493
+ t(this, "type", null);
1494
+ t(this, "images", new Z());
1495
+ t(this, "status", null);
1496
+ t(this, "language", null);
1497
+ t(this, "authRequirement", null);
1498
+ t(this, "totalVotes", null);
1499
+ t(this, "flags", []);
1500
+ t(this, "customFields", null);
1501
+ t(this, "branding", null);
1502
+ t(this, "brandingId", null);
1503
+ t(this, "embedCode", null);
1504
+ t(this, "labels", null);
1505
+ t(this, "adContent", null);
1506
+ t(this, "context", null);
1507
+ t(this, "options", []);
1508
+ t(this, "related", []);
1509
+ t(this, "preferencesEnabled", !1);
1510
+ t(this, "multipleChoice", !1);
1511
+ t(this, "maxMultipleChoiceOptions", null);
1512
+ t(this, "participationCount", 0);
1513
+ t(this, "maxAttempts", 0);
1514
+ t(this, "externalActivity", null);
1515
+ t(this, "createdAt", null);
1516
+ t(this, "updatedAt", null);
1517
+ }
1518
+ }, Ut = class extends yt {
1519
+ constructor() {
1520
+ super(...arguments);
1521
+ t(this, "rules", null);
1522
+ }
1523
+ }, Et = class {
1524
+ constructor() {
1525
+ t(this, "id", null);
1526
+ t(this, "pollId", null);
1527
+ t(this, "optionId", null);
1528
+ t(this, "optionIds", []);
1529
+ t(this, "userId", null);
1530
+ t(this, "createdAt", null);
1531
+ }
1532
+ }, Bt = class extends Et {
1533
+ constructor() {
1534
+ super(...arguments);
1535
+ t(this, "previousVotes", []);
1536
+ t(this, "attempts", null);
1537
+ }
1538
+ }, gt = ((e) => (e.LIKE = "like", e.DISLIKE = "dislike", e.SHARE = "share", e.COMMENT = "comment", e.PREDICTION_MADE = "prediction_made", e))(gt || {}), Tt = ((e) => (e.CORRECT = "CORRECT", e.INCORRECT = "INCORRECT", e.PARTIALLY_CORRECT = "PARTIALLY_CORRECT", e.NOT_VERIFIED = "NOT_VERIFIED", e))(Tt || {}), Ot = ((e) => (e.ONE = "1", e.X = "x", e.TWO = "2", e))(Ot || {}), Rt = ((e) => (e.ONE_X = "1x", e.X_TWO = "x2", e.ONE_TWO = "12", e))(Rt || {}), It = ((e) => (e.ONE_ONE = "1/1", e.ONE_X = "1/x", e.ONE_TWO = "1/2", e.X_ONE = "x/1", e.X_X = "x/x", e.X_TWO = "x/2", e.TWO_ONE = "2/1", e.TWO_X = "2/x", e.TWO_TWO = "2/2", e))(It || {}), St = ((e) => (e.NONE = "none", e.FINISHED = "finished", e.CANCELLED = "cancelled", e.POSTPONED = "postponed", e.NOT_STARTED = "not_started", e.FIRST_HALF = "1st_half", e.SECOND_HALF = "2nd_half", e.FINISHED_AFTER_AWARDED_WIN = "finished_after_awarded_win", e.TO_FINISH = "to_finish", e.FINISHED_AET = "finished_aet", e.HALFTIME = "halftime", e.FINISHED_AP = "finished_ap", e.INTERRUPTED = "interrupted", e.KICK_OFF_DELAYED = "kick_off_delayed", e.ABANDONED = "abandoned", e.WAITING_FOR_PENALTY = "waiting_for_penalty", e.PENALTY = "penalty", e.PAUSE = "pause", e.EXTRA_TIME_1ST_HALF = "extra_time_1st_half", e.EXTRA_TIME_END_OF_1ST_HALF = "extra_time_end_of_1st_half", e.EXTRA_TIME_2ND_HALF = "extra_time_2nd_half", e.WAITING_FOR_EXTRA_TIME = "waiting_for_extra_time", e.NO_INFO_YET = "no_info_yet", e.AWAITING_INFO = "awaiting_info", e.FINISHED_ASG = "finished_asg", e))(St || {}), le = class {
1539
+ constructor() {
1540
+ }
1541
+ static createMatchMarketsResultsModel(e, i) {
1542
+ var s, r, c, h, m, l, y, n, d, _, E, f, p, S, D, v, L, P, F, N, a, u, o, g, O, T, C, x, G, V, K, B, H, Y, U, J;
1543
+ 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(((r = (s = e.stats) == null ? void 0 : s.corners) == null ? void 0 : r.homeTeam) + ((h = (c = e.stats) == null ? void 0 : c.corners) == null ? void 0 : h.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam, PLAYER_YELLOW_CARD: this.createPlayersMarketsResults(e, i, "yellow_card"), PLAYER_RED_CARD: this.createPlayersMarketsResults(e, i, "red_card"), PLAYER_SCORE_FIRST_GOAL: this.createPlayersMarketsResults(e, i, "first_goal"), PLAYER_SCORE: this.createPlayersMarketsResults(e, i, "one_goal"), PLAYER_SCORE_TWICE: this.createPlayersMarketsResults(e, i, "two_goals"), PLAYER_SCORE_HATTRICK: this.createPlayersMarketsResults(e, i, "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(((l = (m = e.stats) == null ? void 0 : m.corners) == null ? void 0 : l.homeTeam) + ((n = (y = e.stats) == null ? void 0 : y.corners) == null ? void 0 : n.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 6, OVER_CORNERS_7_5: isNaN(((_ = (d = e.stats) == null ? void 0 : d.corners) == null ? void 0 : _.homeTeam) + ((f = (E = e.stats) == null ? void 0 : E.corners) == null ? void 0 : f.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 7, OVER_CORNERS_8_5: isNaN(((S = (p = e.stats) == null ? void 0 : p.corners) == null ? void 0 : S.homeTeam) + ((v = (D = e.stats) == null ? void 0 : D.corners) == null ? void 0 : v.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 8, OVER_CORNERS_9_5: isNaN(((P = (L = e.stats) == null ? void 0 : L.corners) == null ? void 0 : P.homeTeam) + ((N = (F = e.stats) == null ? void 0 : F.corners) == null ? void 0 : N.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 9, OVER_CORNERS_10_5: isNaN(((u = (a = e.stats) == null ? void 0 : a.corners) == null ? void 0 : u.homeTeam) + ((g = (o = e.stats) == null ? void 0 : o.corners) == null ? void 0 : g.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 10, OVER_CORNERS_11_5: isNaN(((T = (O = e.stats) == null ? void 0 : O.corners) == null ? void 0 : T.homeTeam) + ((x = (C = e.stats) == null ? void 0 : C.corners) == null ? void 0 : x.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 11, OVER_CORNERS_12_5: isNaN(((V = (G = e.stats) == null ? void 0 : G.corners) == null ? void 0 : V.homeTeam) + ((B = (K = e.stats) == null ? void 0 : K.corners) == null ? void 0 : B.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 12, OVER_CORNERS_13_5: isNaN(((Y = (H = e.stats) == null ? void 0 : H.corners) == null ? void 0 : Y.homeTeam) + ((J = (U = e.stats) == null ? void 0 : U.corners) == null ? void 0 : J.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 13 };
1544
+ }
1545
+ }, W = le;
1546
+ k(W, "createOneXTwoResult", (e, i) => {
1547
+ var s, r, c, h;
1548
+ return i === "full_time" ? e.ftScore.homeGoals > e.ftScore.awayGoals ? "1" : e.ftScore.homeGoals === e.ftScore.awayGoals ? "x" : "2" : ((s = e == null ? void 0 : e.htScore) == null ? void 0 : s.homeGoals) > ((r = e == null ? void 0 : e.htScore) == null ? void 0 : r.awayGoals) ? "1" : ((c = e == null ? void 0 : e.htScore) == null ? void 0 : c.homeGoals) === ((h = e == null ? void 0 : e.htScore) == null ? void 0 : h.awayGoals) ? "x" : "2";
1549
+ }), k(W, "createDoubleChanceResult", (e) => {
1550
+ var i, s, r, c;
1551
+ return ((i = e == null ? void 0 : e.ftScore) == null ? void 0 : i.homeGoals) > ((s = e == null ? void 0 : e.ftScore) == null ? void 0 : s.awayGoals) ? ["1x", "12"] : ((r = e == null ? void 0 : e.ftScore) == null ? void 0 : r.homeGoals) === ((c = e == null ? void 0 : e.ftScore) == null ? void 0 : c.awayGoals) ? ["1x", "x2"] : ["x2", "12"];
1552
+ }), k(W, "createHalfTimeFullTimeResult", (e) => {
1553
+ var i, s, r, c, h, m, l, y, n, d, _, E, f, p, S, D, v, L, P, F, N, a, u, o;
1554
+ if (((i = e == null ? void 0 : e.htScore) == null ? void 0 : i.homeGoals) > ((s = e == null ? void 0 : e.htScore) == null ? void 0 : s.awayGoals)) {
1555
+ if (((r = e == null ? void 0 : e.ftScore) == null ? void 0 : r.homeGoals) > ((c = e == null ? void 0 : e.ftScore) == null ? void 0 : c.awayGoals)) return "1/1";
1556
+ if (((h = e == null ? void 0 : e.ftScore) == null ? void 0 : h.homeGoals) === ((m = e == null ? void 0 : e.ftScore) == null ? void 0 : m.awayGoals)) return "1/x";
1557
+ if (((l = e == null ? void 0 : e.ftScore) == null ? void 0 : l.homeGoals) < ((y = e == null ? void 0 : e.ftScore) == null ? void 0 : y.awayGoals)) return "1/2";
1558
+ }
1559
+ 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)) {
1560
+ if (((_ = e == null ? void 0 : e.ftScore) == null ? void 0 : _.homeGoals) > ((E = e == null ? void 0 : e.ftScore) == null ? void 0 : E.awayGoals)) return "x/1";
1561
+ if (((f = e == null ? void 0 : e.ftScore) == null ? void 0 : f.homeGoals) === ((p = e == null ? void 0 : e.ftScore) == null ? void 0 : p.awayGoals)) return "x/x";
1562
+ if (((S = e == null ? void 0 : e.ftScore) == null ? void 0 : S.homeGoals) < ((D = e == null ? void 0 : e.ftScore) == null ? void 0 : D.awayGoals)) return "x/2";
1563
+ }
1564
+ if (((v = e == null ? void 0 : e.htScore) == null ? void 0 : v.homeGoals) < ((L = e == null ? void 0 : e.htScore) == null ? void 0 : L.awayGoals)) {
1565
+ if (((P = e == null ? void 0 : e.ftScore) == null ? void 0 : P.homeGoals) > ((F = e == null ? void 0 : e.ftScore) == null ? void 0 : F.awayGoals)) return "2/1";
1566
+ if (((N = e == null ? void 0 : e.ftScore) == null ? void 0 : N.homeGoals) === ((a = e == null ? void 0 : e.ftScore) == null ? void 0 : a.awayGoals)) return "2/x";
1567
+ if (((u = e == null ? void 0 : e.ftScore) == null ? void 0 : u.homeGoals) < ((o = e == null ? void 0 : e.ftScore) == null ? void 0 : o.awayGoals)) return "2/2";
1568
+ }
1569
+ }), k(W, "createMarketResultByCriteria", (e, i) => !e.timeline || !e.timeline.length ? null : i === "red_card" ? e.timeline.filter((s) => Number(s.minute) <= 90).some((s) => s.type === "red_card") : e.timeline.filter((s) => Number(s.minute) <= 90).some((s) => s.type.startsWith(i))), k(W, "createPlayersMarketsResults", (e, i, s) => {
1570
+ if (!e.timeline || !e.timeline.length) return s === "first_goal" ? null : [];
1571
+ if (s === "first_goal") {
1572
+ let m = e.timeline.find((l) => l.type === "goal" || l.type === "penalty_goal" || l.type === "own_goal") || null;
1573
+ if (m) {
1574
+ let l = i[m.player.id];
1575
+ return { playerId: m.type === "goal" || m.type === "penalty_goal" ? m.player.id : "OWN_GOAL", playerModel: l };
1576
+ }
1577
+ return null;
1578
+ }
1579
+ if (s === "yellow_card" || s === "red_card") return le.transformPlayerMarketResult(e.timeline.filter((m) => Number(m.minute) <= 90).filter((m) => m.type === s).map((m) => i[m.player.id]));
1580
+ let r = /* @__PURE__ */ new Map(), c = s === "one_goal" ? 1 : s === "two_goals" ? 2 : 3, h = [];
1581
+ return e.timeline.filter((m) => Number(m.minute) <= 90).filter((m) => m.type === "goal" || m.type === "penalty_goal").forEach((m) => {
1582
+ let l = i[m.player.id];
1583
+ if (r.has(m.player.id)) {
1584
+ let y = r.get(m.player.id);
1585
+ y.push(l), r.set(m.player.id, y);
1586
+ } else r.set(m.player.id, [l]);
1587
+ }), r.forEach((m) => {
1588
+ m.length >= c && h.push(m[0]);
1589
+ }), le.transformPlayerMarketResult(h);
1590
+ }), k(W, "transformPlayerMarketResult", (e) => e.map((i) => ({ playerId: i.id, playerModel: i })));
1591
+ (/* @__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");
1592
+ export {
1593
+ Pt as A,
1594
+ Vt as H,
1595
+ Mt as L,
1596
+ Bt as M,
1597
+ Gt as O,
1598
+ Le as R,
1599
+ wt as S,
1600
+ kt as Z,
1601
+ Ht as a,
1602
+ Ft as b,
1603
+ nt as c,
1604
+ Yt as d,
1605
+ Ut as g,
1606
+ Je as n
1607
+ };