@streamlayer/react 1.24.6 → 1.24.8-pre.11da316

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 (167) hide show
  1. package/lib/app/advertisement.d.ts +5 -0
  2. package/lib/cjs/advertisement.js +19657 -203
  3. package/lib/cjs/auth.js +4459 -1
  4. package/lib/cjs/bet-pack.js +15728 -1
  5. package/lib/cjs/index.js +19469 -1
  6. package/lib/cjs/insight.js +13571 -1
  7. package/lib/cjs/masters.js +20735 -1
  8. package/lib/cjs/notification.js +13118 -1
  9. package/lib/cjs/package.json +1 -0
  10. package/lib/cjs/pause-ad.js +8390 -1
  11. package/lib/cjs/points.js +7220 -1
  12. package/lib/cjs/polyfills.js +69 -0
  13. package/lib/cjs/polymarket.js +16395 -14
  14. package/lib/cjs/style.css +1 -0
  15. package/lib/cjs/useStreamLayerApp.js +4705 -1
  16. package/lib/dist/cjs/index.js +20735 -1
  17. package/lib/dist/es/index.js +20708 -10
  18. package/lib/dist/es/polyfills.js +92 -0
  19. package/lib/es/Question.js +75 -72
  20. package/lib/es/advertisement.js +9223 -8168
  21. package/lib/es/analytics.js +35 -31
  22. package/lib/es/auth.js +1 -1
  23. package/lib/es/bet-pack.js +1 -1
  24. package/lib/es/feature.js +60 -56
  25. package/lib/{classic/es/hooks-n9ax4LRT.js → es/hooks-42q2i9Iw.js} +25 -23
  26. package/lib/{dist/es/index-CfSdnrfA.js → es/index-sWgEw6jy.js} +1 -1
  27. package/lib/es/index.js +1 -1
  28. package/lib/es/index10.js +181 -7
  29. package/lib/es/index11.js +371 -181
  30. package/lib/es/index12.js +116 -128
  31. package/lib/es/index13.js +101 -97
  32. package/lib/es/index14.js +14 -14
  33. package/lib/es/index15.js +384 -414
  34. package/lib/es/index16.js +380 -382
  35. package/lib/es/index2.js +53 -56
  36. package/lib/es/index3.js +34 -4
  37. package/lib/es/index4.js +2 -2
  38. package/lib/es/index5.js +272 -16
  39. package/lib/es/index6.js +1 -1
  40. package/lib/es/index8.js +8 -282
  41. package/lib/es/index9.js +133 -75
  42. package/lib/es/insight.js +2 -2
  43. package/lib/es/masters.js +1 -1
  44. package/lib/es/masters2.js +34 -35
  45. package/lib/es/notification.js +28 -28
  46. package/lib/es/pause-ad.js +20 -20
  47. package/lib/es/points.js +9 -9
  48. package/lib/es/polymarket.js +38 -38
  49. package/lib/es/storage.js +19 -19
  50. package/lib/es/style.css +1 -0
  51. package/lib/es/useStreamLayerApp.js +1 -1
  52. package/lib/es/useStreamLayerApp2.js +6756 -5470
  53. package/lib/es/utils.js +86 -41
  54. package/lib/source.css +1 -120
  55. package/package.json +99 -83
  56. package/lib/cjs/Question.js +0 -1
  57. package/lib/cjs/analytics.js +0 -1
  58. package/lib/cjs/feature.js +0 -1
  59. package/lib/cjs/gamification-feature.js +0 -1
  60. package/lib/cjs/gamification-feature2.js +0 -1
  61. package/lib/cjs/hooks-n9ax4LRT.js +0 -1
  62. package/lib/cjs/index-CfSdnrfA.js +0 -5
  63. package/lib/cjs/index10.js +0 -1
  64. package/lib/cjs/index11.js +0 -1
  65. package/lib/cjs/index12.js +0 -1
  66. package/lib/cjs/index13.js +0 -4
  67. package/lib/cjs/index14.js +0 -1
  68. package/lib/cjs/index15.js +0 -1
  69. package/lib/cjs/index16.js +0 -5
  70. package/lib/cjs/index2.js +0 -1
  71. package/lib/cjs/index3.js +0 -1
  72. package/lib/cjs/index4.js +0 -5
  73. package/lib/cjs/index5.js +0 -1
  74. package/lib/cjs/index6.js +0 -1
  75. package/lib/cjs/index7.js +0 -1
  76. package/lib/cjs/index8.js +0 -1
  77. package/lib/cjs/index9.js +0 -7
  78. package/lib/cjs/masters2.js +0 -8
  79. package/lib/cjs/storage.js +0 -1
  80. package/lib/cjs/theme.js +0 -1
  81. package/lib/cjs/useStreamLayerApp2.js +0 -17
  82. package/lib/cjs/utils.js +0 -47
  83. package/lib/classic/app/advertisement.d.ts +0 -19
  84. package/lib/classic/app/app.d.ts +0 -23
  85. package/lib/classic/app/auth.d.ts +0 -4
  86. package/lib/classic/app/bet-pack.d.ts +0 -10
  87. package/lib/classic/app/insight.d.ts +0 -13
  88. package/lib/classic/app/masters.d.ts +0 -19
  89. package/lib/classic/app/notification.d.ts +0 -5
  90. package/lib/classic/app/pause-ad.d.ts +0 -27
  91. package/lib/classic/app/points.d.ts +0 -3
  92. package/lib/classic/app/polymarket.d.ts +0 -7
  93. package/lib/classic/app/useStreamLayerApp.d.ts +0 -1
  94. package/lib/classic/cjs/Question.js +0 -1
  95. package/lib/classic/cjs/advertisement.js +0 -203
  96. package/lib/classic/cjs/analytics.js +0 -1
  97. package/lib/classic/cjs/auth.js +0 -1
  98. package/lib/classic/cjs/bet-pack.js +0 -5
  99. package/lib/classic/cjs/feature.js +0 -1
  100. package/lib/classic/cjs/gamification-feature.js +0 -1
  101. package/lib/classic/cjs/hooks-n9ax4LRT.js +0 -1
  102. package/lib/classic/cjs/index-CfSdnrfA.js +0 -5
  103. package/lib/classic/cjs/index.js +0 -1
  104. package/lib/classic/cjs/index10.js +0 -1
  105. package/lib/classic/cjs/index11.js +0 -1
  106. package/lib/classic/cjs/index12.js +0 -1
  107. package/lib/classic/cjs/index13.js +0 -4
  108. package/lib/classic/cjs/index2.js +0 -5
  109. package/lib/classic/cjs/index3.js +0 -1
  110. package/lib/classic/cjs/index4.js +0 -1
  111. package/lib/classic/cjs/index5.js +0 -1
  112. package/lib/classic/cjs/index6.js +0 -1
  113. package/lib/classic/cjs/index7.js +0 -7
  114. package/lib/classic/cjs/index8.js +0 -1
  115. package/lib/classic/cjs/index9.js +0 -1
  116. package/lib/classic/cjs/insight.js +0 -1
  117. package/lib/classic/cjs/notification.js +0 -1
  118. package/lib/classic/cjs/notification2.js +0 -1
  119. package/lib/classic/cjs/pause-ad.js +0 -1
  120. package/lib/classic/cjs/points.js +0 -1
  121. package/lib/classic/cjs/polymarket.js +0 -14
  122. package/lib/classic/cjs/useStreamLayerApp.js +0 -1
  123. package/lib/classic/cjs/useStreamLayerApp2.js +0 -17
  124. package/lib/classic/cjs/utils.js +0 -47
  125. package/lib/classic/es/Question.js +0 -503
  126. package/lib/classic/es/advertisement.js +0 -38792
  127. package/lib/classic/es/analytics.js +0 -84
  128. package/lib/classic/es/auth.js +0 -11
  129. package/lib/classic/es/bet-pack.js +0 -3418
  130. package/lib/classic/es/feature.js +0 -210
  131. package/lib/classic/es/gamification-feature.js +0 -4
  132. package/lib/classic/es/index-CfSdnrfA.js +0 -3775
  133. package/lib/classic/es/index.js +0 -15
  134. package/lib/classic/es/index10.js +0 -321
  135. package/lib/classic/es/index11.js +0 -2592
  136. package/lib/classic/es/index12.js +0 -185
  137. package/lib/classic/es/index13.js +0 -820
  138. package/lib/classic/es/index2.js +0 -2605
  139. package/lib/classic/es/index3.js +0 -19
  140. package/lib/classic/es/index4.js +0 -6
  141. package/lib/classic/es/index5.js +0 -4
  142. package/lib/classic/es/index6.js +0 -285
  143. package/lib/classic/es/index7.js +0 -181
  144. package/lib/classic/es/index8.js +0 -7
  145. package/lib/classic/es/index9.js +0 -11
  146. package/lib/classic/es/insight.js +0 -79
  147. package/lib/classic/es/notification.js +0 -9
  148. package/lib/classic/es/notification2.js +0 -1126
  149. package/lib/classic/es/pause-ad.js +0 -232
  150. package/lib/classic/es/points.js +0 -76
  151. package/lib/classic/es/polymarket.js +0 -6617
  152. package/lib/classic/es/useStreamLayerApp.js +0 -4
  153. package/lib/classic/es/useStreamLayerApp2.js +0 -11627
  154. package/lib/classic/es/utils.js +0 -76
  155. package/lib/classic/index.d.ts +0 -6
  156. package/lib/classic/masters.d.ts +0 -8
  157. package/lib/classic/source.css +0 -110
  158. package/lib/dist/cjs/gamification-feature.js +0 -1
  159. package/lib/dist/cjs/index-CfSdnrfA.js +0 -5
  160. package/lib/dist/cjs/masters.js +0 -69
  161. package/lib/dist/es/gamification-feature.js +0 -4
  162. package/lib/dist/es/masters.js +0 -22387
  163. package/lib/dist/index.d.ts +0 -1357
  164. package/lib/dist/source.css +0 -64
  165. package/lib/es/hooks-n9ax4LRT.js +0 -97
  166. package/lib/es/index-CfSdnrfA.js +0 -3775
  167. package/lib/style.css +0 -1
package/lib/es/index9.js CHANGED
@@ -1,10 +1,9 @@
1
- import { jsx as F } from "react/jsx-runtime";
2
- import { d as n } from "./index15.js";
3
- import { useEffect as D, useState as S, useCallback as C } from "react";
4
- import { s as I } from "./feature.js";
5
- import { CountdownCircleTimer as t } from "react-countdown-circle-timer";
6
- import { B as a } from "./index8.js";
7
- const f = {
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { d as v } from "./index15.js";
3
+ import O, { useEffect as L, useRef as S, useState as A, useCallback as p, useLayoutEffect as w } from "react";
4
+ import { s as y } from "./feature.js";
5
+ import { M as b } from "./index5.js";
6
+ const K = {
8
7
  BLUE_QUESTION_ACTION_BTN: "#1589ee",
9
8
  WHITE: "#FFFFFF",
10
9
  BLUE: "#2d6ffd",
@@ -74,7 +73,7 @@ const f = {
74
73
  IN_APP_QUESTION_RESULT_LINE: "#babfc5",
75
74
  QUOTE_BORDER: "#E8E8E8",
76
75
  QUOTE_TEXT: "rgba(10, 14, 19, 0.70)"
77
- }, c = {
76
+ }, W = {
78
77
  BG_PRIMARY: "#13212b",
79
78
  BG_SECONDARY: "#152430",
80
79
  BG_SECONDARY1: "#435059",
@@ -84,7 +83,7 @@ const f = {
84
83
  TEXT_SECONDARY: "rgba(255, 255, 255, 0.8)",
85
84
  TEXT_SECONDARY1: "#878787",
86
85
  WHITE: "#fff"
87
- }, l = ["#107D57", "#DF2F3B", "#DF2F3B", "#E8E8E8"], L = "#cee5de", P = "#f9d6d8", U = "#E8E8E8", x = {
86
+ }, x = ["#107D57", "#DF2F3B", "#DF2F3B", "#E8E8E8"], M = "#cee5de", V = "#f9d6d8", Q = "#E8E8E8", le = {
88
87
  xs: 324,
89
88
  sm: 576,
90
89
  md: 768,
@@ -92,91 +91,150 @@ const f = {
92
91
  xl: 1200,
93
92
  xxl: 1440
94
93
  };
95
- Object.entries(f).reduce((_, [E, T]) => `
96
- ${_}
97
- --color-${E.toLowerCase().replaceAll("_", "-")}: ${T};
94
+ Object.entries(K).reduce((t, [e, i]) => `
95
+ ${t}
96
+ --color-${e.toLowerCase().replaceAll("_", "-")}: ${i};
98
97
  `, "");
99
- Object.entries(c).reduce((_, [E, T]) => `
100
- ${_}
101
- --color-adv-${E.toLowerCase().replaceAll("_", "-")}: ${T};
98
+ Object.entries(W).reduce((t, [e, i]) => `
99
+ ${t}
100
+ --color-adv-${e.toLowerCase().replaceAll("_", "-")}: ${i};
102
101
  `, "");
103
- const d = (_) => {
104
- const { Component: E, options: T, customOptions: e, autoFocus: R, ...O } = _, N = n.useFocusable({
105
- ...T,
106
- ...e,
107
- onEnterPress: () => _.onClick?.({ currentTarget: N.ref.current, stopPropagation: () => {
102
+ const X = (t) => {
103
+ const { Component: e, options: i, customOptions: n, autoFocus: r, ...a } = t, E = v.useFocusable({
104
+ ...i,
105
+ ...n,
106
+ onEnterPress: () => t.onClick?.({ currentTarget: E.ref.current, stopPropagation: () => {
108
107
  } })
109
108
  });
110
- return D(() => {
111
- R && N.focusSelf();
112
- }, []), /* @__PURE__ */ F(E, { ...O, ...N, "data-is-with-focus": "true" });
109
+ return L(() => {
110
+ r && E.focusSelf();
111
+ }, []), /* @__PURE__ */ d(e, { ...a, ...E, "data-is-with-focus": "true" });
113
112
  };
114
- function Q(_, E) {
115
- return ({ webos: T, options: e, ...R }) => T ? /* @__PURE__ */ F(d, { Component: _, options: E, customOptions: e, ...R }) : /* @__PURE__ */ F(_, { ...R });
113
+ function Te(t, e) {
114
+ return ({ webos: i, options: n, ...r }) => i ? /* @__PURE__ */ d(X, { Component: t, options: e, customOptions: n, ...r }) : /* @__PURE__ */ d(t, { ...r });
116
115
  }
117
- const m = [10, 10, 1, 0], G = /* @__PURE__ */ I("div")({
116
+ var U = typeof window > "u" ? L : w, j = ({ isPlaying: t, duration: e, startAt: i = 0, updateInterval: n = 0, onComplete: r, onUpdate: a }) => {
117
+ let [E, l] = A(i), T = S(0), R = S(i), s = S(i * -1e3), _ = S(null), o = S(null), c = S(null), m = (f) => {
118
+ let u = f / 1e3;
119
+ if (o.current === null) {
120
+ o.current = u, _.current = requestAnimationFrame(m);
121
+ return;
122
+ }
123
+ let F = u - o.current, C = T.current + F;
124
+ o.current = u, T.current = C;
125
+ let B = R.current + (n === 0 ? C : (C / n | 0) * n), D = R.current + C, g = typeof e == "number" && D >= e;
126
+ l(g ? e : B), g || (_.current = requestAnimationFrame(m));
127
+ }, I = () => {
128
+ _.current && cancelAnimationFrame(_.current), c.current && clearTimeout(c.current), o.current = null;
129
+ }, N = p((f) => {
130
+ I(), T.current = 0;
131
+ let u = typeof f == "number" ? f : i;
132
+ R.current = u, l(u), t && (_.current = requestAnimationFrame(m));
133
+ }, [t, i]);
134
+ return U(() => {
135
+ if (a?.(E), e && E >= e) {
136
+ s.current += e * 1e3;
137
+ let { shouldRepeat: f = !1, delay: u = 0, newStartAt: F } = r?.(s.current / 1e3) || {};
138
+ f && (c.current = setTimeout(() => N(F), u * 1e3));
139
+ }
140
+ }, [E, e]), U(() => (t && (_.current = requestAnimationFrame(m)), I), [t, e, n]), { elapsedTime: E, reset: N };
141
+ }, z = (t, e, i) => {
142
+ let n = t / 2, r = e / 2, a = n - r, E = 2 * a, l = i === "clockwise" ? "1,0" : "0,1", T = 2 * Math.PI * a;
143
+ return { path: `m ${n},${r} a ${a},${a} 0 ${l} 0,${E} a ${a},${a} 0 ${l} 0,-${E}`, pathLength: T };
144
+ }, G = (t, e) => t === 0 || t === e ? 0 : typeof e == "number" ? t - e : 0, H = (t) => ({ position: "relative", width: t, height: t }), q = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, k = (t, e, i, n, r) => {
145
+ if (n === 0) return e;
146
+ let a = (r ? n - t : t) / n;
147
+ return e + i * a;
148
+ }, $ = (t) => {
149
+ var e, i;
150
+ return (i = (e = t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (n, r, a, E) => `#${r}${r}${a}${a}${E}${E}`).substring(1).match(/.{2}/g)) == null ? void 0 : e.map((n) => parseInt(n, 16))) != null ? i : [];
151
+ }, J = (t, e) => {
152
+ var i;
153
+ let { colors: n, colorsTime: r, isSmoothColorTransition: a = !0 } = t;
154
+ if (typeof n == "string") return n;
155
+ let E = (i = r?.findIndex((o, c) => o >= e && e >= r[c + 1])) != null ? i : -1;
156
+ if (!r || E === -1) return n[0];
157
+ if (!a) return n[E];
158
+ let l = r[E] - e, T = r[E] - r[E + 1], R = $(n[E]), s = $(n[E + 1]), _ = !!t.isGrowing;
159
+ return `rgb(${R.map((o, c) => k(l, o, s[c] - o, T, _) | 0).join(",")})`;
160
+ }, Z = (t) => {
161
+ let { duration: e, initialRemainingTime: i, updateInterval: n, size: r = 180, strokeWidth: a = 12, trailStrokeWidth: E, isPlaying: l = !1, isGrowing: T = !1, rotation: R = "clockwise", onComplete: s, onUpdate: _ } = t, o = S(), c = Math.max(a, E ?? 0), { path: m, pathLength: I } = z(r, c, R), { elapsedTime: N } = j({ isPlaying: l, duration: e, startAt: G(e, i), updateInterval: n, onUpdate: typeof _ == "function" ? (u) => {
162
+ let F = Math.ceil(e - u);
163
+ F !== o.current && (o.current = F, _(F));
164
+ } : void 0, onComplete: typeof s == "function" ? (u) => {
165
+ var F;
166
+ let { shouldRepeat: C, delay: B, newInitialRemainingTime: D } = (F = s(u)) != null ? F : {};
167
+ if (C) return { shouldRepeat: C, delay: B, newStartAt: G(e, D) };
168
+ } : void 0 }), f = e - N;
169
+ return { elapsedTime: N, path: m, pathLength: I, remainingTime: Math.ceil(f), rotation: R, size: r, stroke: J(t, f), strokeDashoffset: k(N, 0, I, e, T), strokeWidth: a };
170
+ }, P = (t) => {
171
+ let { children: e, strokeLinecap: i, trailColor: n, trailStrokeWidth: r } = t, { path: a, pathLength: E, stroke: l, strokeDashoffset: T, remainingTime: R, elapsedTime: s, size: _, strokeWidth: o } = Z(t);
172
+ return O.createElement("div", { style: H(_) }, O.createElement("svg", { viewBox: `0 0 ${_} ${_}`, width: _, height: _, xmlns: "http://www.w3.org/2000/svg" }, O.createElement("path", { d: a, fill: "none", stroke: n ?? "#d9d9d9", strokeWidth: r ?? o }), O.createElement("path", { d: a, fill: "none", stroke: l, strokeLinecap: i ?? "round", strokeWidth: o, strokeDasharray: E, strokeDashoffset: T })), typeof e == "function" && O.createElement("div", { style: q }, e({ remainingTime: R, elapsedTime: s, color: l })));
173
+ };
174
+ P.displayName = "CountdownCircleTimer";
175
+ const ee = [10, 10, 1, 0], te = /* @__PURE__ */ y("div")({
118
176
  name: "RemainingTimeCircle",
119
177
  class: "r165427",
120
178
  propsAsIs: !1
121
- }), p = /* @__PURE__ */ I("div")({
179
+ }), re = /* @__PURE__ */ y("div")({
122
180
  name: "RemainingTime",
123
181
  class: "r17garf3",
124
182
  propsAsIs: !1
125
- }), Y = L, B = P, o = U, X = ({
126
- className: _,
127
- duration: E = 30,
128
- onTimerExpired: T,
129
- isPlaying: e = !0
130
- }) => /* @__PURE__ */ F(t, {
131
- isPlaying: e,
183
+ }), ne = M, h = V, Y = Q, se = ({
184
+ className: t,
185
+ duration: e = 30,
186
+ onTimerExpired: i,
187
+ isPlaying: n = !0
188
+ }) => /* @__PURE__ */ d(P, {
189
+ isPlaying: n,
132
190
  strokeWidth: 0,
133
- duration: E,
134
- colors: B,
191
+ duration: e,
192
+ colors: h,
135
193
  size: 24,
136
- onComplete: T,
194
+ onComplete: i,
137
195
  children: ({
138
- remainingTime: R
139
- }) => /* @__PURE__ */ F(p, {
140
- className: _,
141
- children: E === 0 ? 0 : R
196
+ remainingTime: r
197
+ }) => /* @__PURE__ */ d(re, {
198
+ className: t,
199
+ children: e === 0 ? 0 : r
142
200
  })
143
- }), M = ({
144
- isPlaying: _ = !0,
145
- duration: E = 30,
146
- onTimerExpired: T
201
+ }), Re = ({
202
+ isPlaying: t = !0,
203
+ duration: e = 30,
204
+ onTimerExpired: i
147
205
  }) => {
148
- const [e, R] = S(E > 10 ? Y : B), [O, N] = S(2);
149
- D(() => {
150
- E === 0 && (N(0), R(o));
151
- }, [E]);
152
- const i = ({
153
- remainingTime: r
154
- }) => /* @__PURE__ */ F(G, {
155
- children: E === 0 ? 0 : r
156
- }), s = C(() => {
157
- T?.(), R(o);
158
- }, [T, R]), A = C((r) => {
159
- r === 10 && R(B);
160
- }, [R]);
161
- return /* @__PURE__ */ F(t, {
162
- isPlaying: _,
163
- duration: E,
164
- colors: l,
165
- colorsTime: m,
206
+ const [n, r] = A(e > 10 ? ne : h), [a, E] = A(2);
207
+ L(() => {
208
+ e === 0 && (E(0), r(Y));
209
+ }, [e]);
210
+ const l = ({
211
+ remainingTime: s
212
+ }) => /* @__PURE__ */ d(te, {
213
+ children: e === 0 ? 0 : s
214
+ }), T = p(() => {
215
+ i?.(), r(Y);
216
+ }, [i, r]), R = p((s) => {
217
+ s === 10 && r(h);
218
+ }, [r]);
219
+ return /* @__PURE__ */ d(P, {
220
+ isPlaying: t,
221
+ duration: e,
222
+ colors: x,
223
+ colorsTime: ee,
166
224
  size: 32,
167
- strokeWidth: O,
225
+ strokeWidth: a,
168
226
  trailStrokeWidth: 2,
169
- trailColor: e,
170
- onComplete: s,
171
- onUpdate: A,
172
- children: i
227
+ trailColor: n,
228
+ onComplete: T,
229
+ onUpdate: R,
230
+ children: l
173
231
  });
174
- }, W = ({ height: _ = "37px", width: E = "37px" }) => /* @__PURE__ */ F("div", { style: { height: _, width: E }, children: /* @__PURE__ */ F(a, { name: "loader" }) });
232
+ }, ue = ({ height: t = "37px", width: e = "37px" }) => /* @__PURE__ */ d("div", { style: { height: t, width: e }, children: /* @__PURE__ */ d(b, { name: "loader" }) });
175
233
  export {
176
- x as A,
177
- X as G,
178
- M as L,
179
- f as R,
180
- Q as b,
181
- W as d
234
+ le as A,
235
+ se as G,
236
+ Re as L,
237
+ K as R,
238
+ Te as b,
239
+ ue as d
182
240
  };
package/lib/es/insight.js CHANGED
@@ -2,9 +2,9 @@ import { jsx as u, jsxs as c } from "react/jsx-runtime";
2
2
  import { h as p } from "./index7.js";
3
3
  import { u as a, s as h } from "./feature.js";
4
4
  import { useRef as f, useEffect as l } from "react";
5
- import { _ as I } from "./Question.js";
5
+ import { t as I } from "./Question.js";
6
6
  import { S as g } from "./useStreamLayerApp2.js";
7
- import { Y as S, _ as k, g as Q } from "./hooks-n9ax4LRT.js";
7
+ import { w as S, q as k, j as Q } from "./hooks-42q2i9Iw.js";
8
8
  const y = () => I, A = /* @__PURE__ */ h(y())({
9
9
  name: "QuestionWrap",
10
10
  class: "q10hhsxv",
package/lib/es/masters.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import { S as s, M as m } from "./masters2.js";
3
3
  import "react";
4
- import { Y as S } from "./hooks-n9ax4LRT.js";
4
+ import { w as S } from "./hooks-42q2i9Iw.js";
5
5
  export {
6
6
  s as MastersStreamLayerProvider,
7
7
  m as MastersStreamLayerSDKReact,
@@ -1,22 +1,21 @@
1
1
  import { jsx as n, jsxs as f, Fragment as I } from "react/jsx-runtime";
2
- import { s as c, u as p, F as J, c as S, N as T } from "./feature.js";
2
+ import { s as c, u as p, F as J, c as g, N as T } from "./feature.js";
3
3
  import D from "lodash.throttle";
4
- import { useRef as g, useState as L, useEffect as E, createContext as e2, useContext as U, useMemo as _, Suspense as s2, lazy as t2, forwardRef as n2, useLayoutEffect as r2, useCallback as b, Component as i2 } from "react";
4
+ import { useRef as S, useState as L, useEffect as E, createContext as e2, useContext as U, useMemo as _, Suspense as s2, lazy as t2, forwardRef as n2, useLayoutEffect as r2, useCallback as b, Component as i2 } from "react";
5
5
  import { A as h, R as o2 } from "./index9.js";
6
- import { f as G, A as M, a as Q } from "./analytics.js";
7
- import { Q as a2, z as l2, T as K, I as d2, c as c2, n as C2, f as p2, w as B, a as u2, p as m2 } from "./index16.js";
6
+ import { f as G, c as a2, A as M, a as Q } from "./analytics.js";
7
+ import { Q as l2, z as d2, T as K, I as c2, n as C2, f as p2, w as B, a as u2, p as m2 } from "./index16.js";
8
8
  import { m as A } from "./theme.js";
9
9
  import { a as f2 } from "./index4.js";
10
- import "nanostores";
11
10
  import { Q as E2, Z as L2, y as h2, f as F } from "./index13.js";
12
- import { O as g2, d as S2, f as _2, a as N2 } from "./index12.js";
11
+ import { O as S2, d as g2, f as _2, a as N2 } from "./index12.js";
13
12
  import { Q as T2, S as N } from "./useStreamLayerApp2.js";
14
- import { B as x } from "./index8.js";
13
+ import { M as x } from "./index5.js";
15
14
  import { createPortal as I2 } from "react-dom";
16
15
  import { e as v2 } from "./index3.js";
17
16
  import "./storage.js";
18
- import { e as R2 } from "./index11.js";
19
- import { V as A2, g as y2, i as k2, j as D2 } from "./hooks-n9ax4LRT.js";
17
+ import { e as R2 } from "./index10.js";
18
+ import { _ as A2, j as y2, i as k2, k as D2 } from "./hooks-42q2i9Iw.js";
20
19
  const b2 = /* @__PURE__ */ c("div")({
21
20
  name: "SDKContainer",
22
21
  class: "s8zgqze",
@@ -47,7 +46,7 @@ const b2 = /* @__PURE__ */ c("div")({
47
46
  ...t
48
47
  });
49
48
  }, H2 = 15, $2 = (s, e, t) => {
50
- const r = g(null), i = g(0), [a] = L(
49
+ const r = S(null), i = S(0), [a] = L(
51
50
  G({
52
51
  scrollPosition: 0,
53
52
  tabsShown: !1,
@@ -63,7 +62,7 @@ const b2 = /* @__PURE__ */ c("div")({
63
62
  const C = m.target;
64
63
  if (!C)
65
64
  return;
66
- let d = 0;
65
+ let d;
67
66
  o.screen.size < h.lg && !t ? d = s.current?.getBoundingClientRect().y || 0 : d = C.scrollTop;
68
67
  const v = i.current - d;
69
68
  if (H2 > Math.abs(v))
@@ -155,7 +154,7 @@ const b2 = /* @__PURE__ */ c("div")({
155
154
  return null;
156
155
  const r = e.type;
157
156
  return /* @__PURE__ */ f(G2, {
158
- children: [/* @__PURE__ */ n(g2, {
157
+ children: [/* @__PURE__ */ n(S2, {
159
158
  close: s.closeQuestion,
160
159
  type: e.attributes?.type || T2.UNSET,
161
160
  mastersApp: !0
@@ -165,7 +164,7 @@ const b2 = /* @__PURE__ */ c("div")({
165
164
  extendedQuestion: t
166
165
  }), r !== "question" && /* @__PURE__ */ n(M2, {
167
166
  openedQuestion: e
168
- }), /* @__PURE__ */ n(S2, {
167
+ }), /* @__PURE__ */ n(g2, {
169
168
  mastersApp: !0
170
169
  })]
171
170
  });
@@ -173,11 +172,11 @@ const b2 = /* @__PURE__ */ c("div")({
173
172
  const { sdk: r } = O(), i = p(s);
174
173
  return E(() => {
175
174
  t.set(!0);
176
- }, [t]), /* @__PURE__ */ n(a2, { openQuestion: e, questions: i.data, controlVideo: r?.controlVideoPlayer });
175
+ }, [t]), /* @__PURE__ */ n(l2, { openQuestion: e, questions: i.data, controlVideo: r?.controlVideoPlayer });
177
176
  }, Z2 = ({ userSummary: s }) => {
178
177
  const e = p(s.$store);
179
178
  return /* @__PURE__ */ n(
180
- l2,
179
+ d2,
181
180
  {
182
181
  hideFriendsRank: !0,
183
182
  loading: !e?.summary,
@@ -199,7 +198,7 @@ const b2 = /* @__PURE__ */ c("div")({
199
198
  name: "OpenedContainer",
200
199
  class: "o1seszvt",
201
200
  propsAsIs: !0
202
- }), d1 = ({
201
+ }), l1 = ({
203
202
  gamification: s,
204
203
  className: e
205
204
  }) => /* @__PURE__ */ n(q2, {
@@ -270,7 +269,7 @@ const b2 = /* @__PURE__ */ c("div")({
270
269
  }), r0 = "hlc2pcy", i0 = n2(({
271
270
  className: s
272
271
  }, e) => /* @__PURE__ */ f(s0, {
273
- className: S(s, r0),
272
+ className: g(s, r0),
274
273
  children: [/* @__PURE__ */ n(t0, {
275
274
  children: /* @__PURE__ */ f(n0, {
276
275
  children: [/* @__PURE__ */ n(x, {
@@ -347,7 +346,7 @@ const b2 = /* @__PURE__ */ c("div")({
347
346
  name: "OnboardingContainer",
348
347
  class: "on59ra",
349
348
  propsAsIs: !1
350
- }), h0 = () => F, g0 = /* @__PURE__ */ c(h0())({
349
+ }), h0 = () => F, S0 = /* @__PURE__ */ c(h0())({
351
350
  name: "OnboardingNotificationContainer",
352
351
  class: "op1wk5d",
353
352
  propsAsIs: !0
@@ -355,7 +354,7 @@ const b2 = /* @__PURE__ */ c("div")({
355
354
  name: "InnerContainer",
356
355
  class: "i1i1g2vj",
357
356
  propsAsIs: !1
358
- }), S0 = ({
357
+ }), g0 = ({
359
358
  deepLink: s,
360
359
  onboardingOpts: e,
361
360
  notification: t,
@@ -363,7 +362,7 @@ const b2 = /* @__PURE__ */ c("div")({
363
362
  loading: i,
364
363
  sdk: a
365
364
  }) => {
366
- const o = p(r.friends ? r.friends.getStore() : c2({
365
+ const o = p(r.friends ? r.friends.getStore() : a2({
367
366
  data: []
368
367
  })), [l, u] = L(void 0), m = _(() => {
369
368
  const C = a.getInviter();
@@ -417,7 +416,7 @@ const b2 = /* @__PURE__ */ c("div")({
417
416
  appNode: i,
418
417
  responsiveStore: a
419
418
  }) => {
420
- const o = g(null), l = e.data.onboarding, [u, m] = L(l?.instantOpen), C = s.getFeature(N.GAMES), d = _(() => Y?.map(({
419
+ const o = S(null), l = e.data.onboarding, [u, m] = L(l?.instantOpen), C = s.getFeature(N.GAMES), d = _(() => Y?.map(({
421
420
  graphicSrc: X
422
421
  }) => X), []), {
423
422
  screen: v
@@ -430,11 +429,11 @@ const b2 = /* @__PURE__ */ c("div")({
430
429
  const {
431
430
  loading: R,
432
431
  throttled: W
433
- } = d2(d);
432
+ } = c2(d);
434
433
  return u && C && l && i.current && !W ? /* @__PURE__ */ n(K, {
435
434
  container: i,
436
435
  useContainer: !1,
437
- children: /* @__PURE__ */ n(S0, {
436
+ children: /* @__PURE__ */ n(g0, {
438
437
  notification: e,
439
438
  setOpened: m,
440
439
  gamification: C,
@@ -457,7 +456,7 @@ const b2 = /* @__PURE__ */ c("div")({
457
456
  },
458
457
  onboarding: l
459
458
  })
460
- }), /* @__PURE__ */ n(g0, {
459
+ }), /* @__PURE__ */ n(S0, {
461
460
  style: r,
462
461
  hiding: e.hiding,
463
462
  children: /* @__PURE__ */ n(w, {
@@ -494,7 +493,7 @@ const b2 = /* @__PURE__ */ c("div")({
494
493
  class: "pht79xf",
495
494
  propsAsIs: !0
496
495
  }), k0 = (s) => {
497
- const [e, t] = L(0), r = g(null), i = b((o) => {
496
+ const [e, t] = L(0), r = S(null), i = b((o) => {
498
497
  r.current = o;
499
498
  }, []);
500
499
  E(() => {
@@ -588,7 +587,7 @@ const b2 = /* @__PURE__ */ c("div")({
588
587
  behavior: "smooth"
589
588
  }), e(null);
590
589
  },
591
- className: S(m && b0, "sl-pill-button")
590
+ className: g(m && b0, "sl-pill-button")
592
591
  }), d.current);
593
592
  }, O0 = ({
594
593
  sdk: s,
@@ -742,7 +741,7 @@ Object.entries(V0).reduce((s, [e, t]) => `
742
741
  ${s}
743
742
  --color-${e.toLowerCase().replaceAll("_", "-")}: ${t};
744
743
  `, "");
745
- const w0 = "m1ojpy2l", P0 = ({ children: s, style: e }) => /* @__PURE__ */ n("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ n("div", { className: S("masters-theme", w0), style: e, children: s }) }), c1 = ({ sdkKey: s, plugins: e, children: t, event: r, onDeepLinkHandled: i, videoPlayerController: a, production: o = !0 }) => /* @__PURE__ */ f(
744
+ const w0 = "m1ojpy2l", P0 = ({ children: s, style: e }) => /* @__PURE__ */ n("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ n("div", { className: g("masters-theme", w0), style: e, children: s }) }), d1 = ({ sdkKey: s, plugins: e, children: t, event: r, onDeepLinkHandled: i, videoPlayerController: a, production: o = !0 }) => /* @__PURE__ */ f(
746
745
  A2,
747
746
  {
748
747
  sdkKey: s,
@@ -780,10 +779,10 @@ const w0 = "m1ojpy2l", P0 = ({ children: s, style: e }) => /* @__PURE__ */ n("di
780
779
  ) : null;
781
780
  }) : null;
782
781
  }, U0 = (s) => {
783
- const e = g(null);
782
+ const e = S(null);
784
783
  return M(e, { enabled: !0, event: "click", listener: Q }), /* @__PURE__ */ n(f2, { ref: e, ...s });
785
784
  }, G0 = ({ sdk: s, useContainer: e }) => {
786
- const t = g(null), r = p(s.status), i = p(s.sdkStore.slStreamId), a = g(null), [o] = B0(t), [l, u] = $2(t, o, e), m = r === "ready" && !!i.data;
785
+ const t = S(null), r = p(s.status), i = p(s.sdkStore.slStreamId), a = S(null), [o] = B0(t), [l, u] = $2(t, o, e), m = r === "ready" && !!i.data;
787
786
  return E(() => {
788
787
  window.requestAnimationFrame(() => {
789
788
  s.initializeApp().then(() => {
@@ -792,8 +791,8 @@ const w0 = "m1ojpy2l", P0 = ({ children: s, style: e }) => /* @__PURE__ */ n("di
792
791
  });
793
792
  }, [s]), M(t, { enabled: !0, event: "click", listener: Q }), E(() => {
794
793
  import("./gamification-feature2.js");
795
- }, []), /* @__PURE__ */ f(b2, { className: S("SDKContainer", !e && F2), ref: t, children: [
796
- /* @__PURE__ */ n(i0, { className: S(A), ref: a }),
794
+ }, []), /* @__PURE__ */ f(b2, { className: g("SDKContainer", !e && F2), ref: t, children: [
795
+ /* @__PURE__ */ n(i0, { className: g(A), ref: a }),
797
796
  /* @__PURE__ */ f(O2, { className: "sl-hide-on-modal", ref: l, children: [
798
797
  m && /* @__PURE__ */ n(
799
798
  O0,
@@ -843,7 +842,7 @@ const w0 = "m1ojpy2l", P0 = ({ children: s, style: e }) => /* @__PURE__ */ n("di
843
842
  const { sdk: t, status: r } = U(k2);
844
843
  return r === D2.UNSET ? (console.error("Wrap app in `StreamLayerProvider`"), null) : t ? /* @__PURE__ */ n("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ n(P0, { style: { height: "100%" }, children: /* @__PURE__ */ n(M0, { sdk: t, betPack: s, useContainer: e }) }) }) : null;
845
844
  };
846
- class C1 extends i2 {
845
+ class c1 extends i2 {
847
846
  constructor(e) {
848
847
  super(e), this.state = { hasError: !1 };
849
848
  }
@@ -858,7 +857,7 @@ class C1 extends i2 {
858
857
  }
859
858
  }
860
859
  export {
861
- d1 as C,
862
- C1 as M,
863
- c1 as S
860
+ l1 as C,
861
+ c1 as M,
862
+ d1 as S
864
863
  };