@streamlayer/react 0.29.10 → 0.30.0
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.
- package/lib/app/masters.d.ts +1 -0
- package/lib/{app-c9828ece.cjs → app-36051bbe.cjs} +1 -1
- package/lib/{app-e4b43a5c.js → app-c53bb384.js} +5 -5
- package/lib/cjs/auth.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/dist/cjs/masters.js +1 -1
- package/lib/dist/es/masters.js +1 -1
- package/lib/dist/index-bcabe854.js +1464 -0
- package/lib/dist/index-f504e8d3.cjs +1 -0
- package/lib/dist/index.d.ts +1 -0
- package/lib/dist/masters-3c9c6ffe.js +26765 -0
- package/lib/dist/masters-fe5f1486.cjs +297 -0
- package/lib/dist/style.css +1 -193
- package/lib/es/auth.js +2 -2
- package/lib/es/index.js +2 -2
- package/lib/es/masters.js +5 -4
- package/lib/es/points.js +40 -40
- package/lib/index-15f61ac8.js +151 -0
- package/lib/index-565f26fb.cjs +1 -0
- package/lib/{index-0d23b24e.js → index-89366251.js} +5 -5
- package/lib/index-af5c5738.cjs +1 -0
- package/lib/{index-89c19a6e.cjs → index-dd93a61a.cjs} +2 -2
- package/lib/index-e26b3493.js +1410 -0
- package/lib/masters-bf25c11c.js +2415 -0
- package/lib/masters-f135002d.cjs +6 -0
- package/lib/style.css +1 -1
- package/package.json +4 -4
- package/lib/dist/index-5d2b7e7a.cjs +0 -1
- package/lib/dist/index-b48a730f.js +0 -1710
- package/lib/dist/masters-187c9707.js +0 -20454
- package/lib/dist/masters-9e88aaec.cjs +0 -29
- package/lib/index-3f5c6152.cjs +0 -6
- package/lib/index-616b0bcd.js +0 -936
- package/lib/index-66ccd267.js +0 -2821
- package/lib/index-b0206045.cjs +0 -1
- package/lib/masters-1b02c80d.cjs +0 -1
- package/lib/masters-5752c805.js +0 -693
package/lib/index-66ccd267.js
DELETED
|
@@ -1,2821 +0,0 @@
|
|
|
1
|
-
import { jsxs as v, jsx as p, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
-
import { s as g, C as Q } from "./index-616b0bcd.js";
|
|
3
|
-
import { useStore as re } from "@nanostores/react";
|
|
4
|
-
import { o as Et, r as Tt, w as Wt, e as We, n as Vt, f as Ht } from "./masters-5752c805.js";
|
|
5
|
-
import { useState as xe, useCallback as Ve, useMemo as Se, Component as Gt, createElement as ze, PureComponent as vt } from "react";
|
|
6
|
-
import { QuestionType as q, QuestionStatus as we, QuestionImages as ue, PickHistoryStatus as Ne } from "@streamlayer/sdk-web-types";
|
|
7
|
-
import { o as Nt, i as _t, r as Zt, a as Jt, n as Kt } from "./common-2d2a3ba3.js";
|
|
8
|
-
import { CountdownCircleTimer as Xt } from "react-countdown-circle-timer";
|
|
9
|
-
import { E as de } from "./index-0d23b24e.js";
|
|
10
|
-
import "@streamlayer/sdk-web-interfaces";
|
|
11
|
-
import "@streamlayer/sdk-web-notifications";
|
|
12
|
-
import "./es/useStreamLayerApp.js";
|
|
13
|
-
import "@streamlayer/sdk-web";
|
|
14
|
-
const er = () => Q, tr = () => Q, rr = /* @__PURE__ */ g("div")({
|
|
15
|
-
name: "a",
|
|
16
|
-
class: "acysrl1",
|
|
17
|
-
propsAsIs: !1
|
|
18
|
-
}), ir = /* @__PURE__ */ g("div")({
|
|
19
|
-
name: "l",
|
|
20
|
-
class: "lo57cjm",
|
|
21
|
-
propsAsIs: !1
|
|
22
|
-
}), nr = /* @__PURE__ */ g(er())({
|
|
23
|
-
name: "p",
|
|
24
|
-
class: "p14kwh4y",
|
|
25
|
-
propsAsIs: !0
|
|
26
|
-
}), sr = /* @__PURE__ */ g("span")({
|
|
27
|
-
name: "s",
|
|
28
|
-
class: "sxun7sq",
|
|
29
|
-
propsAsIs: !1
|
|
30
|
-
}), or = /* @__PURE__ */ g("button")({
|
|
31
|
-
name: "c",
|
|
32
|
-
class: "c1i8ida8",
|
|
33
|
-
propsAsIs: !1
|
|
34
|
-
}), ar = /* @__PURE__ */ g(tr())({
|
|
35
|
-
name: "g",
|
|
36
|
-
class: "g1m0xfmw",
|
|
37
|
-
propsAsIs: !0
|
|
38
|
-
}), St = ({ type: i, close: n, label: a }) => {
|
|
39
|
-
const c = i ? Et[i] : { label: a, iconName: void 0 };
|
|
40
|
-
return /* @__PURE__ */ v(rr, { children: [
|
|
41
|
-
/* @__PURE__ */ v(ir, { children: [
|
|
42
|
-
(c == null ? void 0 : c.iconName) && /* @__PURE__ */ p(nr, { name: c.iconName }),
|
|
43
|
-
(c == null ? void 0 : c.label) && /* @__PURE__ */ p(sr, { children: c.label })
|
|
44
|
-
] }),
|
|
45
|
-
/* @__PURE__ */ p(or, { onClick: n, children: /* @__PURE__ */ p(ar, { name: "icon-cross" }) })
|
|
46
|
-
] });
|
|
47
|
-
};
|
|
48
|
-
const lr = /* @__PURE__ */ g("div")({
|
|
49
|
-
name: "t",
|
|
50
|
-
class: "taj61ja",
|
|
51
|
-
propsAsIs: !1
|
|
52
|
-
}), cr = /* @__PURE__ */ g("div")({
|
|
53
|
-
name: "r",
|
|
54
|
-
class: "r19fxewd",
|
|
55
|
-
propsAsIs: !1
|
|
56
|
-
}), ur = /* @__PURE__ */ g("div")({
|
|
57
|
-
name: "i",
|
|
58
|
-
class: "i1whkbqh",
|
|
59
|
-
propsAsIs: !1
|
|
60
|
-
}), ot = ({ indicator: i, title: n }) => /* @__PURE__ */ v(lr, { children: [
|
|
61
|
-
/* @__PURE__ */ p(cr, { children: n }),
|
|
62
|
-
/* @__PURE__ */ p(ur, { children: i })
|
|
63
|
-
] });
|
|
64
|
-
const dr = /* @__PURE__ */ g("div")({
|
|
65
|
-
name: "i",
|
|
66
|
-
class: "i4lbhzs",
|
|
67
|
-
propsAsIs: !1
|
|
68
|
-
}), hr = /* @__PURE__ */ g("div")({
|
|
69
|
-
name: "o",
|
|
70
|
-
class: "ordquhq",
|
|
71
|
-
propsAsIs: !1
|
|
72
|
-
}), pr = /* @__PURE__ */ g("div")({
|
|
73
|
-
name: "n",
|
|
74
|
-
class: "nwzed99",
|
|
75
|
-
propsAsIs: !1
|
|
76
|
-
}), _e = ({ indicator: i, title: n }) => /* @__PURE__ */ v(dr, { children: [
|
|
77
|
-
/* @__PURE__ */ p(hr, { children: i }),
|
|
78
|
-
/* @__PURE__ */ p(pr, { children: n })
|
|
79
|
-
] });
|
|
80
|
-
const fr = /* @__PURE__ */ g("div")({
|
|
81
|
-
name: "o",
|
|
82
|
-
class: "o15y0waw",
|
|
83
|
-
propsAsIs: !1
|
|
84
|
-
}), mr = /* @__PURE__ */ g("div")({
|
|
85
|
-
name: "i",
|
|
86
|
-
class: "ihjewwf",
|
|
87
|
-
propsAsIs: !1
|
|
88
|
-
}), gr = /* @__PURE__ */ g("div")({
|
|
89
|
-
name: "n",
|
|
90
|
-
class: "n10e9lv8",
|
|
91
|
-
propsAsIs: !1
|
|
92
|
-
}), Ir = /* @__PURE__ */ g("div")({
|
|
93
|
-
name: "r",
|
|
94
|
-
class: "r13bxv",
|
|
95
|
-
propsAsIs: !1
|
|
96
|
-
}), yr = /* @__PURE__ */ g("img")({
|
|
97
|
-
name: "a",
|
|
98
|
-
class: "a1fi59c9",
|
|
99
|
-
propsAsIs: !1
|
|
100
|
-
}), xr = /* @__PURE__ */ g("div")({
|
|
101
|
-
name: "s",
|
|
102
|
-
class: "s1kkihge",
|
|
103
|
-
propsAsIs: !1
|
|
104
|
-
}), wr = /* @__PURE__ */ g("div")({
|
|
105
|
-
name: "c",
|
|
106
|
-
class: "cy4f4t",
|
|
107
|
-
propsAsIs: !1
|
|
108
|
-
}), Mr = /* @__PURE__ */ g("div")({
|
|
109
|
-
name: "p",
|
|
110
|
-
class: "p18cnlx1",
|
|
111
|
-
propsAsIs: !1
|
|
112
|
-
}), Ar = /* @__PURE__ */ g("img")({
|
|
113
|
-
name: "l",
|
|
114
|
-
class: "lboqgs5",
|
|
115
|
-
propsAsIs: !1
|
|
116
|
-
}), Er = /* @__PURE__ */ g("div")({
|
|
117
|
-
name: "d",
|
|
118
|
-
class: "d1oaal4",
|
|
119
|
-
propsAsIs: !1
|
|
120
|
-
}), Tr = /* @__PURE__ */ g("div")({
|
|
121
|
-
name: "x",
|
|
122
|
-
class: "x1yzgo0u",
|
|
123
|
-
propsAsIs: !1
|
|
124
|
-
}), vr = /* @__PURE__ */ g("div")({
|
|
125
|
-
name: "f",
|
|
126
|
-
class: "f1l9i8s8",
|
|
127
|
-
propsAsIs: !1
|
|
128
|
-
}), Nr = /* @__PURE__ */ g("div")({
|
|
129
|
-
name: "g",
|
|
130
|
-
class: "g4cgl4u",
|
|
131
|
-
propsAsIs: !1
|
|
132
|
-
}), _r = /* @__PURE__ */ g("div")({
|
|
133
|
-
name: "h",
|
|
134
|
-
class: "h1qn1tmd",
|
|
135
|
-
propsAsIs: !1
|
|
136
|
-
}), Sr = /* @__PURE__ */ g("div")({
|
|
137
|
-
name: "u",
|
|
138
|
-
class: "u1gsbhq4",
|
|
139
|
-
propsAsIs: !1
|
|
140
|
-
}), zr = /* @__PURE__ */ g("div")({
|
|
141
|
-
name: "m",
|
|
142
|
-
class: "mvj8oco",
|
|
143
|
-
propsAsIs: !1
|
|
144
|
-
}), Dr = /* @__PURE__ */ g("button")({
|
|
145
|
-
name: "v",
|
|
146
|
-
class: "viqiaf2",
|
|
147
|
-
propsAsIs: !1
|
|
148
|
-
}), br = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY5MTk3IDQuNjY2NjJDMy42OTE5NyA1Ljk5NzA1IDMuOTI5MTQgNy4xNzc4NyA0LjQwMzUgOC4yMDkxMkMzLjQ5OTY2IDguMDI0NTEgMi43NDQ4NyA3LjY2NDg2IDIuMTM5MSA3LjEzMDE0QzEuNTMzMzMgNi41OTU0MiAxLjIzMDQ2IDYuMDc5OCAxLjIzMDQ2IDUuNTgzMjhWNC42NjY2MkgzLjY5MTk3Wk0xNC43Njg2IDQuNjY2NjJWNS41ODMyOEMxNC43Njg2IDYuMDc5OCAxNC40NjU4IDYuNTk1NDIgMTMuODYgNy4xMzAxNEMxMy4yNTQyIDcuNjY0ODYgMTIuNDk5NCA4LjAyNDUxIDExLjU5NTYgOC4yMDkxMkMxMi4wNjk5IDcuMTc3ODcgMTIuMzA3MSA1Ljk5NzA1IDEyLjMwNzEgNC42NjY2MkgxNC43Njg2Wk0xNS45OTk4IDUuNTgzMjlWNC4zNjEwOEMxNS45OTk4IDQuMTA2NDUgMTUuOTEwMSAzLjg5MDAyIDE1LjczMDYgMy43MTE3OEMxNS41NTExIDMuNTMzNTQgMTUuMzMzMiAzLjQ0NDQyIDE1LjA3NjggMy40NDQ0MkgxMi4zMDc2VjIuNTI3NzZDMTIuMzA3NiAyLjEwNzYzIDEyLjE1NjkgMS43NDc5NyAxMS44NTU2IDEuNDQ4NzhDMTEuNTU0NCAxLjE0OTU5IDExLjE5MjIgMSAxMC43NjkxIDFINS4yMzA3MkM0LjgwNzY0IDEgNC40NDU0NyAxLjE0OTU5IDQuMTQ0MTkgMS40NDg3OEMzLjg0MjkxIDEuNzQ3OTcgMy42OTIyNyAyLjEwNzYzIDMuNjkyMjcgMi41Mjc3NlYzLjQ0NDQySDAuOTIzMDY4QzAuNjY2NjU5IDMuNDQ0NDIgMC40NDg3MTQgMy41MzM1NCAwLjI2OTIyOCAzLjcxMTc4QzAuMDg5NzQxOCAzLjg5MDAyIDAgNC4xMDY0NSAwIDQuMzYxMDhWNS41ODMyOUMwIDYuMDM1MjUgMC4xMzMwMSA2LjQ5MDM5IDAuMzk5MDM0IDYuOTQ4NzJDMC42NjUwNTkgNy40MDcwNSAxLjAyNDAzIDcuODIwODIgMS40NzU5NSA4LjE5MDAzQzEuOTI3ODcgOC41NTkyNCAyLjQ4MjM0IDguODY5NTcgMy4xMzkzOSA5LjEyMTAxQzMuNzk2NDQgOS4zNzI0NiA0LjQ4NzEzIDkuNTE0MDkgNS4yMTE0OSA5LjU0NTkyQzUuNDgwNzEgOS44ODk2NyA1Ljc4NTIgMTAuMTkyIDYuMTI0OTQgMTAuNDUzQzYuMzY4NTMgMTAuNjY5NSA2LjUzNjc5IDEwLjkwMDIgNi42Mjk3NCAxMS4xNDUzQzYuNzIyNjkgMTEuMzkwNCA2Ljc2OTE2IDExLjY3NTIgNi43NjkxNiAxMS45OTk5QzYuNzY5MTYgMTIuMzQzNiA2LjY3MTQxIDEyLjYzMzMgNi40NzU5IDEyLjg2ODhDNi4yODAzOCAxMy4xMDQzIDUuOTY3ODkgMTMuMjIyMSA1LjUzODQxIDEzLjIyMjFDNS4wNTc2NCAxMy4yMjIxIDQuNjI5NzYgMTMuMzY2OSA0LjI1NDc2IDEzLjY1NjZDMy44Nzk3NyAxMy45NDYyIDMuNjkyMjcgMTQuMzEwNiAzLjY5MjI3IDE0Ljc0OTlWMTUuMzYxQzMuNjkyMjcgMTUuNDUwMSAzLjcyMTEyIDE1LjUyMzMgMy43Nzg4MSAxNS41ODA2QzMuODM2NSAxNS42Mzc5IDMuOTEwMjIgMTUuNjY2NSAzLjk5OTk2IDE1LjY2NjVIMTEuOTk5OUMxMi4wODk2IDE1LjY2NjUgMTIuMTYzMyAxNS42Mzc5IDEyLjIyMSAxNS41ODA2QzEyLjI3ODcgMTUuNTIzMyAxMi4zMDc2IDE1LjQ1MDEgMTIuMzA3NiAxNS4zNjFWMTQuNzQ5OUMxMi4zMDc2IDE0LjMxMDYgMTIuMTIwMSAxMy45NDYyIDExLjc0NTEgMTMuNjU2NkMxMS4zNzAxIDEzLjM2NjkgMTAuOTQyMiAxMy4yMjIxIDEwLjQ2MTQgMTMuMjIyMUMxMC4wMzE5IDEzLjIyMjEgOS43MTk0NSAxMy4xMDQzIDkuNTIzOTQgMTIuODY4OEM5LjMyODQzIDEyLjYzMzMgOS4yMzA2OCAxMi4zNDM2IDkuMjMwNjggMTEuOTk5OUM5LjIzMDY4IDExLjY3NTIgOS4yNzcxNSAxMS4zOTA0IDkuMzcwMSAxMS4xNDUzQzkuNDYzMDUgMTAuOTAwMiA5LjYzMTMxIDEwLjY2OTUgOS44NzQ5IDEwLjQ1M0MxMC4yMTQ2IDEwLjE5MiAxMC41MTkxIDkuODg5NjcgMTAuNzg4NCA5LjU0NTkyQzExLjUxMjcgOS41MTQwOSAxMi4yMDM0IDkuMzcyNDYgMTIuODYwNCA5LjEyMTAxQzEzLjUxNzUgOC44Njk1NyAxNC4wNzIgOC41NTkyNCAxNC41MjM5IDguMTkwMDNDMTQuOTc1OCA3LjgyMDgyIDE1LjMzNDggNy40MDcwNSAxNS42MDA4IDYuOTQ4NzJDMTUuODY2OCA2LjQ5MDM5IDE1Ljk5OTggNi4wMzUyNSAxNS45OTk4IDUuNTgzMjlaTTYuNzYwNDcgNy4xNzk4TDguMDUxMDkgNi40OTk5N0w5LjM0MTcgNy4xNzk4TDkuMDk1MjEgNS43Mzk4OUwxMC4xMzkzIDQuNzIwMTVMOC42OTYzOSA0LjUxMDA3TDguMDUxMDkgMy4yTDcuNDA1NzggNC41MTAwN0w1Ljk2MjgzIDQuNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=", zt = ({
|
|
149
|
-
avatar: i,
|
|
150
|
-
name: n,
|
|
151
|
-
points: a,
|
|
152
|
-
friendsRank: c,
|
|
153
|
-
rank: u,
|
|
154
|
-
streak: I,
|
|
155
|
-
correct: m,
|
|
156
|
-
incorrect: o,
|
|
157
|
-
inTop: y,
|
|
158
|
-
successRate: E
|
|
159
|
-
}) => /* @__PURE__ */ v(fr, { children: [
|
|
160
|
-
/* @__PURE__ */ p(mr, { children: /* @__PURE__ */ v(Ir, { children: [
|
|
161
|
-
/* @__PURE__ */ v(Dr, { children: [
|
|
162
|
-
i && /* @__PURE__ */ p(yr, { alt: "avatar", src: i }),
|
|
163
|
-
!i && /* @__PURE__ */ p(zr, { children: Nt(n || "") })
|
|
164
|
-
] }),
|
|
165
|
-
/* @__PURE__ */ v(xr, { children: [
|
|
166
|
-
/* @__PURE__ */ p(wr, { children: n }),
|
|
167
|
-
/* @__PURE__ */ v(Mr, { children: [
|
|
168
|
-
/* @__PURE__ */ v(Er, { children: [
|
|
169
|
-
/* @__PURE__ */ p(Ar, { alt: "rank-icon", src: br }),
|
|
170
|
-
/* @__PURE__ */ v(Tr, { children: [
|
|
171
|
-
_t(a),
|
|
172
|
-
/* @__PURE__ */ p(vr, { children: "PTS" })
|
|
173
|
-
] })
|
|
174
|
-
] }),
|
|
175
|
-
/* @__PURE__ */ p(Nr, {}),
|
|
176
|
-
/* @__PURE__ */ v("div", { children: [
|
|
177
|
-
"TOP ",
|
|
178
|
-
y || 0,
|
|
179
|
-
"%"
|
|
180
|
-
] })
|
|
181
|
-
] })
|
|
182
|
-
] })
|
|
183
|
-
] }) }),
|
|
184
|
-
/* @__PURE__ */ v(gr, { children: [
|
|
185
|
-
/* @__PURE__ */ v(_r, { children: [
|
|
186
|
-
/* @__PURE__ */ p(ot, { indicator: c || 0, title: "Friends rank" }),
|
|
187
|
-
/* @__PURE__ */ p(ot, { indicator: u || 0, title: "Global rank" })
|
|
188
|
-
] }),
|
|
189
|
-
/* @__PURE__ */ v(Sr, { children: [
|
|
190
|
-
/* @__PURE__ */ p(_e, { indicator: I || 0, title: "Win streak" }),
|
|
191
|
-
/* @__PURE__ */ p(_e, { indicator: m || 0, title: "Correct" }),
|
|
192
|
-
/* @__PURE__ */ p(_e, { indicator: o || 0, title: "Incorrect" }),
|
|
193
|
-
/* @__PURE__ */ p(_e, { indicator: `${E || 0}%`, title: "Succ. rate" })
|
|
194
|
-
] })
|
|
195
|
-
] })
|
|
196
|
-
] });
|
|
197
|
-
const Or = () => Q, Cr = /* @__PURE__ */ g("div")({
|
|
198
|
-
name: "c",
|
|
199
|
-
class: "ciyeb68",
|
|
200
|
-
propsAsIs: !1
|
|
201
|
-
}), Lr = /* @__PURE__ */ g(Or())({
|
|
202
|
-
name: "n",
|
|
203
|
-
class: "nfic4xc",
|
|
204
|
-
propsAsIs: !0
|
|
205
|
-
}), at = /* @__PURE__ */ g("div")({
|
|
206
|
-
name: "d",
|
|
207
|
-
class: "d1pd1p66",
|
|
208
|
-
propsAsIs: !1
|
|
209
|
-
}), lt = /* @__PURE__ */ g("div")({
|
|
210
|
-
name: "p",
|
|
211
|
-
class: "p132yxcv",
|
|
212
|
-
propsAsIs: !1
|
|
213
|
-
}), kr = /* @__PURE__ */ g("span")({
|
|
214
|
-
name: "l",
|
|
215
|
-
class: "l4a8aw",
|
|
216
|
-
propsAsIs: !1
|
|
217
|
-
}), je = /* @__PURE__ */ g("span")({
|
|
218
|
-
name: "g",
|
|
219
|
-
class: "gzdx7pk",
|
|
220
|
-
propsAsIs: !1
|
|
221
|
-
}), Br = /* @__PURE__ */ g("div")({
|
|
222
|
-
name: "s",
|
|
223
|
-
class: "smnc4zm",
|
|
224
|
-
propsAsIs: !1
|
|
225
|
-
}), Rr = ({
|
|
226
|
-
feedbackMessages: i,
|
|
227
|
-
questionVotedCorrectly: n,
|
|
228
|
-
questionVoted: a,
|
|
229
|
-
questionType: c,
|
|
230
|
-
hasCorrectAnswer: u,
|
|
231
|
-
questionStatus: I
|
|
232
|
-
}) => {
|
|
233
|
-
const m = a && (c === q.TRIVIA || c === q.PREDICTION);
|
|
234
|
-
if (!m && I !== we.RESOLVED)
|
|
235
|
-
return null;
|
|
236
|
-
const o = c === q.PREDICTION && !u, y = n ? "correct" : "incorrect", E = n ? i.correctFeedback : i.incorrectFeedback;
|
|
237
|
-
return /* @__PURE__ */ v(Cr, { "data-isPrediction": o, children: [
|
|
238
|
-
I === we.RESOLVED && c === q.TRIVIA && !a && /* @__PURE__ */ v(ye, { children: [
|
|
239
|
-
/* @__PURE__ */ p(at, { children: /* @__PURE__ */ p(Q, { name: "questionExpired" }) }),
|
|
240
|
-
/* @__PURE__ */ v("div", { children: [
|
|
241
|
-
/* @__PURE__ */ p(lt, { children: /* @__PURE__ */ p(je, { children: "Question Expired" }) }),
|
|
242
|
-
/* @__PURE__ */ p(Br, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
243
|
-
] })
|
|
244
|
-
] }),
|
|
245
|
-
m && o && /* @__PURE__ */ v(ye, { children: [
|
|
246
|
-
/* @__PURE__ */ p(Lr, { name: "icon-prediction" }),
|
|
247
|
-
/* @__PURE__ */ p(je, { children: "Stay tuned to see if your prediction was correct." })
|
|
248
|
-
] }),
|
|
249
|
-
m && u && /* @__PURE__ */ v(ye, { children: [
|
|
250
|
-
/* @__PURE__ */ p(at, { "data-feedbackType": y, children: /* @__PURE__ */ p(Q, { name: y }) }),
|
|
251
|
-
/* @__PURE__ */ p("div", { children: /* @__PURE__ */ v(lt, { children: [
|
|
252
|
-
/* @__PURE__ */ p(kr, { "data-feedbackType": y, children: E == null ? void 0 : E.title }),
|
|
253
|
-
/* @__PURE__ */ p(je, { children: E == null ? void 0 : E.description })
|
|
254
|
-
] }) })
|
|
255
|
-
] })
|
|
256
|
-
] });
|
|
257
|
-
};
|
|
258
|
-
const Ur = /* @__PURE__ */ g("div")({
|
|
259
|
-
name: "o",
|
|
260
|
-
class: "olc1eph",
|
|
261
|
-
propsAsIs: !1
|
|
262
|
-
}), jr = /* @__PURE__ */ g("div")({
|
|
263
|
-
name: "n",
|
|
264
|
-
class: "n1yoh29a",
|
|
265
|
-
propsAsIs: !1
|
|
266
|
-
}), Fr = /* @__PURE__ */ g("div")({
|
|
267
|
-
name: "p",
|
|
268
|
-
class: "pjkr5mb",
|
|
269
|
-
propsAsIs: !1
|
|
270
|
-
}), $r = /* @__PURE__ */ g("div")({
|
|
271
|
-
name: "r",
|
|
272
|
-
class: "r82wnnx",
|
|
273
|
-
propsAsIs: !1
|
|
274
|
-
});
|
|
275
|
-
const Qr = () => Dt, Pr = () => Dt, qr = () => Q, Yr = /* @__PURE__ */ g("button")({
|
|
276
|
-
name: "c",
|
|
277
|
-
class: "cpm4u8k",
|
|
278
|
-
propsAsIs: !1
|
|
279
|
-
}), Wr = /* @__PURE__ */ g("div")({
|
|
280
|
-
name: "l",
|
|
281
|
-
class: "lwfomc3",
|
|
282
|
-
propsAsIs: !1
|
|
283
|
-
}), Vr = /* @__PURE__ */ g("span")({
|
|
284
|
-
name: "d",
|
|
285
|
-
class: "dmltvg2",
|
|
286
|
-
propsAsIs: !1
|
|
287
|
-
}), Hr = /* @__PURE__ */ g("div")({
|
|
288
|
-
name: "s",
|
|
289
|
-
class: "stfjpqz",
|
|
290
|
-
propsAsIs: !1
|
|
291
|
-
}), Gr = /* @__PURE__ */ g("div")({
|
|
292
|
-
name: "p",
|
|
293
|
-
class: "p198m24r",
|
|
294
|
-
propsAsIs: !1
|
|
295
|
-
}), Dt = /* @__PURE__ */ g("img")({
|
|
296
|
-
name: "r",
|
|
297
|
-
class: "rbq5eu7",
|
|
298
|
-
propsAsIs: !1
|
|
299
|
-
}), Zr = /* @__PURE__ */ g(Qr())({
|
|
300
|
-
name: "g",
|
|
301
|
-
class: "g1iv6oeb",
|
|
302
|
-
propsAsIs: !0
|
|
303
|
-
}), Jr = /* @__PURE__ */ g(Pr())({
|
|
304
|
-
name: "h",
|
|
305
|
-
class: "h1qtxlqc",
|
|
306
|
-
propsAsIs: !0
|
|
307
|
-
}), Kr = /* @__PURE__ */ g("span")({
|
|
308
|
-
name: "u",
|
|
309
|
-
class: "udm736q",
|
|
310
|
-
propsAsIs: !1
|
|
311
|
-
}), Xr = /* @__PURE__ */ g("span")({
|
|
312
|
-
name: "b",
|
|
313
|
-
class: "b1da34tx",
|
|
314
|
-
propsAsIs: !1
|
|
315
|
-
}), ei = /* @__PURE__ */ g("span")({
|
|
316
|
-
name: "x",
|
|
317
|
-
class: "x1dqwq83",
|
|
318
|
-
propsAsIs: !1
|
|
319
|
-
}), ti = /* @__PURE__ */ g(qr())({
|
|
320
|
-
name: "v",
|
|
321
|
-
class: "v10s9my2",
|
|
322
|
-
propsAsIs: !0
|
|
323
|
-
}), ct = {
|
|
324
|
-
[ue.CENTERED]: (i) => /* @__PURE__ */ p(Zr, { alt: "option-icon", src: i }),
|
|
325
|
-
[ue.TRANSPARENT]: (i) => /* @__PURE__ */ p(Hr, { children: /* @__PURE__ */ p(Gr, { style: { backgroundImage: `url(${i})` } }) }),
|
|
326
|
-
[ue.ROUNDED]: (i) => /* @__PURE__ */ p(Jr, { alt: "option-icon", src: i }),
|
|
327
|
-
[ue.NONE]: () => null,
|
|
328
|
-
[ue.UNSET]: () => null
|
|
329
|
-
}, ri = ({ questionType: i, hasCorrectAnswer: n, correct: a, youVoted: c, questionVoted: u }) => {
|
|
330
|
-
if (i === q.POLL && c)
|
|
331
|
-
return "correct";
|
|
332
|
-
if (i === q.PREDICTION) {
|
|
333
|
-
if (n && u)
|
|
334
|
-
return c ? a ? "correct" : "incorrect" : a ? "correct" : "unset";
|
|
335
|
-
if (c)
|
|
336
|
-
return "correct";
|
|
337
|
-
}
|
|
338
|
-
return i === q.TRIVIA && u ? c ? a ? "correct" : "incorrect" : a ? "correct" : "unset" : "unset";
|
|
339
|
-
}, ii = ({
|
|
340
|
-
questionType: i,
|
|
341
|
-
questionVoted: n,
|
|
342
|
-
correct: a,
|
|
343
|
-
hasCorrectAnswer: c,
|
|
344
|
-
questionStatus: u
|
|
345
|
-
}) => i === q.TRIVIA ? n && a : i === q.PREDICTION ? n && a && c || u === we.RESOLVED && a : !1, ni = (i) => {
|
|
346
|
-
var n;
|
|
347
|
-
const {
|
|
348
|
-
// option props
|
|
349
|
-
id: a,
|
|
350
|
-
icon: c,
|
|
351
|
-
text: u,
|
|
352
|
-
percentageDecimal: I,
|
|
353
|
-
// extra props
|
|
354
|
-
onVote: m,
|
|
355
|
-
youSelected: o,
|
|
356
|
-
questionVoted: y,
|
|
357
|
-
// ToDo: Figure out why imageMode is not in the response, and delete default value
|
|
358
|
-
imageMode: E = ue.ROUNDED,
|
|
359
|
-
answerTimeExpired: _,
|
|
360
|
-
questionStatus: S,
|
|
361
|
-
isLoading: x,
|
|
362
|
-
questionType: T,
|
|
363
|
-
correct: N,
|
|
364
|
-
hasCorrectAnswer: h
|
|
365
|
-
} = i, M = ri(i), w = ii({ questionType: T, questionVoted: y, correct: N, hasCorrectAnswer: h, questionStatus: S }), A = y || S === we.RESOLVED && T === q.PREDICTION;
|
|
366
|
-
return /* @__PURE__ */ v(
|
|
367
|
-
Yr,
|
|
368
|
-
{
|
|
369
|
-
value: a,
|
|
370
|
-
"data-selected": o,
|
|
371
|
-
"data-answerState": M,
|
|
372
|
-
disabled: y || x || _,
|
|
373
|
-
onClick: m,
|
|
374
|
-
children: [
|
|
375
|
-
A && /* @__PURE__ */ p(Wr, { "data-answerState": M, style: { width: `${I}%` } }),
|
|
376
|
-
/* @__PURE__ */ v(Vr, { children: [
|
|
377
|
-
c && ((n = ct[E]) == null ? void 0 : n.call(ct, c)),
|
|
378
|
-
/* @__PURE__ */ p(Kr, { children: u }),
|
|
379
|
-
A && /* @__PURE__ */ v(Xr, { children: [
|
|
380
|
-
w && /* @__PURE__ */ p(ti, { name: "selected" }),
|
|
381
|
-
/* @__PURE__ */ v(ei, { children: [
|
|
382
|
-
I,
|
|
383
|
-
"%"
|
|
384
|
-
] })
|
|
385
|
-
] })
|
|
386
|
-
] })
|
|
387
|
-
]
|
|
388
|
-
}
|
|
389
|
-
);
|
|
390
|
-
};
|
|
391
|
-
const si = [de.PRIMARY_GREEN1, de.SECONDARY_RED1, de.SECONDARY_RED1], oi = [10, 10, 0], ai = /* @__PURE__ */ g("div")({
|
|
392
|
-
name: "A",
|
|
393
|
-
class: "a1f928zy",
|
|
394
|
-
propsAsIs: !1
|
|
395
|
-
}), li = de.SECONDARY_GREEN6, ut = de.SECONDARY_RED3, ci = de.NEUTRALS_GRAY3, ui = ({
|
|
396
|
-
isPlaying: i = !0,
|
|
397
|
-
duration: n = 30,
|
|
398
|
-
onTimerExpired: a
|
|
399
|
-
}) => {
|
|
400
|
-
const [c, u] = xe(n > 10 ? li : ut), I = ({
|
|
401
|
-
remainingTime: y
|
|
402
|
-
}) => /* @__PURE__ */ p(ai, {
|
|
403
|
-
children: y
|
|
404
|
-
}), m = Ve(() => {
|
|
405
|
-
a == null || a(), u(ci);
|
|
406
|
-
}, [a, u]), o = Ve((y) => {
|
|
407
|
-
y === 10 && u(ut);
|
|
408
|
-
}, [u]);
|
|
409
|
-
return /* @__PURE__ */ p(Xt, {
|
|
410
|
-
isPlaying: i,
|
|
411
|
-
duration: n,
|
|
412
|
-
colors: si,
|
|
413
|
-
colorsTime: oi,
|
|
414
|
-
size: 32,
|
|
415
|
-
strokeWidth: 2,
|
|
416
|
-
trailStrokeWidth: 2,
|
|
417
|
-
trailColor: c,
|
|
418
|
-
onComplete: m,
|
|
419
|
-
onUpdate: o,
|
|
420
|
-
children: I
|
|
421
|
-
});
|
|
422
|
-
};
|
|
423
|
-
const di = () => Q, hi = /* @__PURE__ */ g("div")({
|
|
424
|
-
name: "a",
|
|
425
|
-
class: "a1r7f3z4",
|
|
426
|
-
propsAsIs: !1
|
|
427
|
-
}), pi = /* @__PURE__ */ g("div")({
|
|
428
|
-
name: "s",
|
|
429
|
-
class: "sblndl",
|
|
430
|
-
propsAsIs: !1
|
|
431
|
-
}), fi = /* @__PURE__ */ g("div")({
|
|
432
|
-
name: "l",
|
|
433
|
-
class: "l7ka1tv",
|
|
434
|
-
propsAsIs: !1
|
|
435
|
-
}), mi = /* @__PURE__ */ g(di())({
|
|
436
|
-
name: "p",
|
|
437
|
-
class: "p1edlxt3",
|
|
438
|
-
propsAsIs: !0
|
|
439
|
-
}), gi = /* @__PURE__ */ g("div")({
|
|
440
|
-
name: "g",
|
|
441
|
-
class: "ghm08u2",
|
|
442
|
-
propsAsIs: !1
|
|
443
|
-
}), Ii = /* @__PURE__ */ g("span")({
|
|
444
|
-
name: "c",
|
|
445
|
-
class: "c12nsh46",
|
|
446
|
-
propsAsIs: !1
|
|
447
|
-
}), yi = /* @__PURE__ */ g("span")({
|
|
448
|
-
name: "d",
|
|
449
|
-
class: "dlr9eoc",
|
|
450
|
-
propsAsIs: !1
|
|
451
|
-
}), xi = ({ title: i, points: n, isPlayingTimer: a, isTimer: c, onTimerExpired: u }) => /* @__PURE__ */ v(hi, { children: [
|
|
452
|
-
/* @__PURE__ */ v(pi, { children: [
|
|
453
|
-
i && /* @__PURE__ */ p(fi, { children: i }),
|
|
454
|
-
n !== void 0 && /* @__PURE__ */ v(ye, { children: [
|
|
455
|
-
/* @__PURE__ */ p(mi, { name: "icon-trophy" }),
|
|
456
|
-
/* @__PURE__ */ v(gi, { children: [
|
|
457
|
-
/* @__PURE__ */ p(Ii, { children: n }),
|
|
458
|
-
/* @__PURE__ */ p(yi, { children: "PTS" })
|
|
459
|
-
] })
|
|
460
|
-
] })
|
|
461
|
-
] }),
|
|
462
|
-
c && /* @__PURE__ */ p(ui, { isPlaying: a, onTimerExpired: u })
|
|
463
|
-
] }), wi = ({ openedQuestion: i, vote: n }) => {
|
|
464
|
-
var a;
|
|
465
|
-
const c = i.subject, u = i.type, I = (a = i.options) == null ? void 0 : a.options, [m, o] = xe(!1), [y, E] = xe(!1), [_, S] = xe(""), x = i == null ? void 0 : i.id, T = Ve(
|
|
466
|
-
async (A) => {
|
|
467
|
-
if (x) {
|
|
468
|
-
const z = A.currentTarget.value;
|
|
469
|
-
S(z), E(!0), await n(x, z), E(!1);
|
|
470
|
-
}
|
|
471
|
-
},
|
|
472
|
-
[x, S, n]
|
|
473
|
-
), N = Se(
|
|
474
|
-
() => i == null ? void 0 : i.answers.find((A) => A.youVoted === !0),
|
|
475
|
-
[i]
|
|
476
|
-
), h = Se(
|
|
477
|
-
() => !!(i != null && i.answers.find((A) => A.correct === !0)),
|
|
478
|
-
[i]
|
|
479
|
-
), M = Se(() => i ? i.answers.map((A) => ({
|
|
480
|
-
...A,
|
|
481
|
-
questionVoted: !!N,
|
|
482
|
-
youSelected: _ === A.id,
|
|
483
|
-
isLoading: y,
|
|
484
|
-
hasCorrectAnswer: h,
|
|
485
|
-
questionType: i.type,
|
|
486
|
-
answerTimeExpired: m,
|
|
487
|
-
questionStatus: i.status,
|
|
488
|
-
// ToDo: Figure out why imageMode is not in the response
|
|
489
|
-
onVote: T
|
|
490
|
-
})) : [], [h, m, y, i, N, T, _]), w = I && (I.case === "trivia" || I.case === "prediction") ? I.value : void 0;
|
|
491
|
-
return /* @__PURE__ */ p(Tt, { "data-question-header": "true", children: /* @__PURE__ */ p(Ur, { children: /* @__PURE__ */ v(jr, { children: [
|
|
492
|
-
w && /* @__PURE__ */ p(
|
|
493
|
-
Rr,
|
|
494
|
-
{
|
|
495
|
-
feedbackMessages: w,
|
|
496
|
-
questionVoted: !!N,
|
|
497
|
-
questionVotedCorrectly: N == null ? void 0 : N.correct,
|
|
498
|
-
questionType: u,
|
|
499
|
-
hasCorrectAnswer: h,
|
|
500
|
-
questionStatus: i.status
|
|
501
|
-
}
|
|
502
|
-
),
|
|
503
|
-
/* @__PURE__ */ p(
|
|
504
|
-
xi,
|
|
505
|
-
{
|
|
506
|
-
title: m ? "Expired" : "To win",
|
|
507
|
-
points: m ? void 0 : 100,
|
|
508
|
-
onTimerExpired: () => o(!0),
|
|
509
|
-
isTimer: !0
|
|
510
|
-
}
|
|
511
|
-
),
|
|
512
|
-
/* @__PURE__ */ p(Fr, { children: c }),
|
|
513
|
-
/* @__PURE__ */ p($r, { children: M.map((A) => /* @__PURE__ */ p(ni, { ...A }, A.id)) })
|
|
514
|
-
] }) }) });
|
|
515
|
-
};
|
|
516
|
-
const Mi = /* @__PURE__ */ g("div")({
|
|
517
|
-
name: "e",
|
|
518
|
-
class: "e1eio0mt",
|
|
519
|
-
propsAsIs: !1
|
|
520
|
-
}), Ai = /* @__PURE__ */ g("div")({
|
|
521
|
-
name: "i",
|
|
522
|
-
class: "iigl87b",
|
|
523
|
-
propsAsIs: !1
|
|
524
|
-
}), Ei = /* @__PURE__ */ g("h3")({
|
|
525
|
-
name: "n",
|
|
526
|
-
class: "n1o2cwub",
|
|
527
|
-
propsAsIs: !1
|
|
528
|
-
}), Ti = /* @__PURE__ */ g("div")({
|
|
529
|
-
name: "r",
|
|
530
|
-
class: "r3uxe45",
|
|
531
|
-
propsAsIs: !1
|
|
532
|
-
}), vi = /* @__PURE__ */ g("div")({
|
|
533
|
-
name: "l",
|
|
534
|
-
class: "lrqius",
|
|
535
|
-
propsAsIs: !1
|
|
536
|
-
}), bt = ({ created: i, title: n, instantView: a }) => {
|
|
537
|
-
const c = Se(() => {
|
|
538
|
-
if (i) {
|
|
539
|
-
const u = new Date(i);
|
|
540
|
-
if (Zt(u))
|
|
541
|
-
return {
|
|
542
|
-
date: Jt(u),
|
|
543
|
-
time: Kt(u)
|
|
544
|
-
};
|
|
545
|
-
}
|
|
546
|
-
return null;
|
|
547
|
-
}, [i]);
|
|
548
|
-
return /* @__PURE__ */ v(Mi, { children: [
|
|
549
|
-
c && /* @__PURE__ */ v(vi, { children: [
|
|
550
|
-
c.date,
|
|
551
|
-
" · ",
|
|
552
|
-
c.time
|
|
553
|
-
] }),
|
|
554
|
-
(a == null ? void 0 : a.video) && /* @__PURE__ */ p(Wt, { source: a.video.url, poster: a.video.thumbnailUrl }),
|
|
555
|
-
/* @__PURE__ */ v(Ai, { children: [
|
|
556
|
-
/* @__PURE__ */ p(Ei, { children: (a == null ? void 0 : a.heading) || n }),
|
|
557
|
-
/* @__PURE__ */ p(Ti, { children: a == null ? void 0 : a.body })
|
|
558
|
-
] })
|
|
559
|
-
] });
|
|
560
|
-
};
|
|
561
|
-
const Ni = /* @__PURE__ */ g("div")({
|
|
562
|
-
name: "o",
|
|
563
|
-
class: "o18unvw4",
|
|
564
|
-
propsAsIs: !1
|
|
565
|
-
}), _i = /* @__PURE__ */ g("a")({
|
|
566
|
-
name: "n",
|
|
567
|
-
class: "ns0uvk8",
|
|
568
|
-
propsAsIs: !1
|
|
569
|
-
}), Si = ({ instantView: i, ...n }) => /* @__PURE__ */ v(Ni, { children: [
|
|
570
|
-
/* @__PURE__ */ p(bt, { instantView: i, ...n }),
|
|
571
|
-
(i == null ? void 0 : i.webLink) && /* @__PURE__ */ v(_i, { href: i == null ? void 0 : i.webLink.url, target: "_blank", children: [
|
|
572
|
-
"Explore more of the Masters History",
|
|
573
|
-
/* @__PURE__ */ p(Q, { name: "icon-external-link" })
|
|
574
|
-
] })
|
|
575
|
-
] });
|
|
576
|
-
const zi = /* @__PURE__ */ g("div")({
|
|
577
|
-
name: "d",
|
|
578
|
-
class: "dk8r1eq",
|
|
579
|
-
propsAsIs: !1
|
|
580
|
-
}), Di = ({
|
|
581
|
-
openedQuestion: i
|
|
582
|
-
}) => {
|
|
583
|
-
var n;
|
|
584
|
-
return ((n = i == null ? void 0 : i.attributes) == null ? void 0 : n.attributes.case) === "insight" ? /* @__PURE__ */ p(Si, {
|
|
585
|
-
created: i.attributes.created,
|
|
586
|
-
...i.attributes.attributes.value
|
|
587
|
-
}) : null;
|
|
588
|
-
}, bi = ({
|
|
589
|
-
extendedQuestion: i,
|
|
590
|
-
vote: n
|
|
591
|
-
}) => {
|
|
592
|
-
const {
|
|
593
|
-
loading: a,
|
|
594
|
-
data: c
|
|
595
|
-
} = i;
|
|
596
|
-
return !a && c ? /* @__PURE__ */ p(wi, {
|
|
597
|
-
vote: n,
|
|
598
|
-
openedQuestion: c
|
|
599
|
-
}) : null;
|
|
600
|
-
}, Oi = ({
|
|
601
|
-
gamification: i
|
|
602
|
-
}) => {
|
|
603
|
-
var n;
|
|
604
|
-
const a = re(i.openedQuestion.$store), c = re(i.openedQuestion.$extendedStore);
|
|
605
|
-
if (!a)
|
|
606
|
-
return null;
|
|
607
|
-
const u = a.type;
|
|
608
|
-
return /* @__PURE__ */ v(zi, {
|
|
609
|
-
children: [/* @__PURE__ */ p(St, {
|
|
610
|
-
close: i.closeQuestion,
|
|
611
|
-
type: ((n = a.attributes) == null ? void 0 : n.type) || q.UNSET
|
|
612
|
-
}), u === "question" && /* @__PURE__ */ p(bi, {
|
|
613
|
-
vote: i.submitAnswer,
|
|
614
|
-
extendedQuestion: c
|
|
615
|
-
}), u !== "question" && /* @__PURE__ */ p(Di, {
|
|
616
|
-
openedQuestion: a
|
|
617
|
-
})]
|
|
618
|
-
});
|
|
619
|
-
};
|
|
620
|
-
const Ci = /* @__PURE__ */ g("div")({
|
|
621
|
-
name: "t",
|
|
622
|
-
class: "tcim9sm",
|
|
623
|
-
propsAsIs: !1
|
|
624
|
-
}), Li = /* @__PURE__ */ g("div")({
|
|
625
|
-
name: "e",
|
|
626
|
-
class: "e8wco6o",
|
|
627
|
-
propsAsIs: !1
|
|
628
|
-
}), ki = /* @__PURE__ */ g("button")({
|
|
629
|
-
name: "n",
|
|
630
|
-
class: "n1ardwzl",
|
|
631
|
-
propsAsIs: !1
|
|
632
|
-
}), Bi = /* @__PURE__ */ g("span")({
|
|
633
|
-
name: "i",
|
|
634
|
-
class: "i1vk8ojx",
|
|
635
|
-
propsAsIs: !1
|
|
636
|
-
});
|
|
637
|
-
var Ie = /* @__PURE__ */ ((i) => (i.HOME = "home", i.LEADERBOARD = "leaderboard", i))(Ie || {});
|
|
638
|
-
const dt = ({ title: i, active: n, onClick: a }) => /* @__PURE__ */ p(ki, { onClick: a, "data-selected": n, children: /* @__PURE__ */ p(Bi, { children: i }) }), Ri = ({ activePage: i = "home", toggleActivePage: n }) => /* @__PURE__ */ p(Ci, { children: /* @__PURE__ */ v(Li, { "data-position": i === "home" ? "left" : "right", children: [
|
|
639
|
-
/* @__PURE__ */ p(dt, { title: "Home", active: i === "home", onClick: () => n(
|
|
640
|
-
"home"
|
|
641
|
-
/* HOME */
|
|
642
|
-
) }),
|
|
643
|
-
/* @__PURE__ */ p(
|
|
644
|
-
dt,
|
|
645
|
-
{
|
|
646
|
-
title: "Leader Board",
|
|
647
|
-
active: i === "leaderboard",
|
|
648
|
-
onClick: () => n(
|
|
649
|
-
"leaderboard"
|
|
650
|
-
/* LEADERBOARD */
|
|
651
|
-
)
|
|
652
|
-
}
|
|
653
|
-
)
|
|
654
|
-
] }) });
|
|
655
|
-
var Ot = {}, Ct = {}, be = {};
|
|
656
|
-
be.byteLength = Fi;
|
|
657
|
-
be.toByteArray = Qi;
|
|
658
|
-
be.fromByteArray = Yi;
|
|
659
|
-
var J = [], P = [], Ui = typeof Uint8Array < "u" ? Uint8Array : Array, Fe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
660
|
-
for (var le = 0, ji = Fe.length; le < ji; ++le)
|
|
661
|
-
J[le] = Fe[le], P[Fe.charCodeAt(le)] = le;
|
|
662
|
-
P["-".charCodeAt(0)] = 62;
|
|
663
|
-
P["_".charCodeAt(0)] = 63;
|
|
664
|
-
function Lt(i) {
|
|
665
|
-
var n = i.length;
|
|
666
|
-
if (n % 4 > 0)
|
|
667
|
-
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
668
|
-
var a = i.indexOf("=");
|
|
669
|
-
a === -1 && (a = n);
|
|
670
|
-
var c = a === n ? 0 : 4 - a % 4;
|
|
671
|
-
return [a, c];
|
|
672
|
-
}
|
|
673
|
-
function Fi(i) {
|
|
674
|
-
var n = Lt(i), a = n[0], c = n[1];
|
|
675
|
-
return (a + c) * 3 / 4 - c;
|
|
676
|
-
}
|
|
677
|
-
function $i(i, n, a) {
|
|
678
|
-
return (n + a) * 3 / 4 - a;
|
|
679
|
-
}
|
|
680
|
-
function Qi(i) {
|
|
681
|
-
var n, a = Lt(i), c = a[0], u = a[1], I = new Ui($i(i, c, u)), m = 0, o = u > 0 ? c - 4 : c, y;
|
|
682
|
-
for (y = 0; y < o; y += 4)
|
|
683
|
-
n = P[i.charCodeAt(y)] << 18 | P[i.charCodeAt(y + 1)] << 12 | P[i.charCodeAt(y + 2)] << 6 | P[i.charCodeAt(y + 3)], I[m++] = n >> 16 & 255, I[m++] = n >> 8 & 255, I[m++] = n & 255;
|
|
684
|
-
return u === 2 && (n = P[i.charCodeAt(y)] << 2 | P[i.charCodeAt(y + 1)] >> 4, I[m++] = n & 255), u === 1 && (n = P[i.charCodeAt(y)] << 10 | P[i.charCodeAt(y + 1)] << 4 | P[i.charCodeAt(y + 2)] >> 2, I[m++] = n >> 8 & 255, I[m++] = n & 255), I;
|
|
685
|
-
}
|
|
686
|
-
function Pi(i) {
|
|
687
|
-
return J[i >> 18 & 63] + J[i >> 12 & 63] + J[i >> 6 & 63] + J[i & 63];
|
|
688
|
-
}
|
|
689
|
-
function qi(i, n, a) {
|
|
690
|
-
for (var c, u = [], I = n; I < a; I += 3)
|
|
691
|
-
c = (i[I] << 16 & 16711680) + (i[I + 1] << 8 & 65280) + (i[I + 2] & 255), u.push(Pi(c));
|
|
692
|
-
return u.join("");
|
|
693
|
-
}
|
|
694
|
-
function Yi(i) {
|
|
695
|
-
for (var n, a = i.length, c = a % 3, u = [], I = 16383, m = 0, o = a - c; m < o; m += I)
|
|
696
|
-
u.push(qi(i, m, m + I > o ? o : m + I));
|
|
697
|
-
return c === 1 ? (n = i[a - 1], u.push(
|
|
698
|
-
J[n >> 2] + J[n << 4 & 63] + "=="
|
|
699
|
-
)) : c === 2 && (n = (i[a - 2] << 8) + i[a - 1], u.push(
|
|
700
|
-
J[n >> 10] + J[n >> 4 & 63] + J[n << 2 & 63] + "="
|
|
701
|
-
)), u.join("");
|
|
702
|
-
}
|
|
703
|
-
var et = {};
|
|
704
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
705
|
-
et.read = function(i, n, a, c, u) {
|
|
706
|
-
var I, m, o = u * 8 - c - 1, y = (1 << o) - 1, E = y >> 1, _ = -7, S = a ? u - 1 : 0, x = a ? -1 : 1, T = i[n + S];
|
|
707
|
-
for (S += x, I = T & (1 << -_) - 1, T >>= -_, _ += o; _ > 0; I = I * 256 + i[n + S], S += x, _ -= 8)
|
|
708
|
-
;
|
|
709
|
-
for (m = I & (1 << -_) - 1, I >>= -_, _ += c; _ > 0; m = m * 256 + i[n + S], S += x, _ -= 8)
|
|
710
|
-
;
|
|
711
|
-
if (I === 0)
|
|
712
|
-
I = 1 - E;
|
|
713
|
-
else {
|
|
714
|
-
if (I === y)
|
|
715
|
-
return m ? NaN : (T ? -1 : 1) * (1 / 0);
|
|
716
|
-
m = m + Math.pow(2, c), I = I - E;
|
|
717
|
-
}
|
|
718
|
-
return (T ? -1 : 1) * m * Math.pow(2, I - c);
|
|
719
|
-
};
|
|
720
|
-
et.write = function(i, n, a, c, u, I) {
|
|
721
|
-
var m, o, y, E = I * 8 - u - 1, _ = (1 << E) - 1, S = _ >> 1, x = u === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, T = c ? 0 : I - 1, N = c ? 1 : -1, h = n < 0 || n === 0 && 1 / n < 0 ? 1 : 0;
|
|
722
|
-
for (n = Math.abs(n), isNaN(n) || n === 1 / 0 ? (o = isNaN(n) ? 1 : 0, m = _) : (m = Math.floor(Math.log(n) / Math.LN2), n * (y = Math.pow(2, -m)) < 1 && (m--, y *= 2), m + S >= 1 ? n += x / y : n += x * Math.pow(2, 1 - S), n * y >= 2 && (m++, y /= 2), m + S >= _ ? (o = 0, m = _) : m + S >= 1 ? (o = (n * y - 1) * Math.pow(2, u), m = m + S) : (o = n * Math.pow(2, S - 1) * Math.pow(2, u), m = 0)); u >= 8; i[a + T] = o & 255, T += N, o /= 256, u -= 8)
|
|
723
|
-
;
|
|
724
|
-
for (m = m << u | o, E += u; E > 0; i[a + T] = m & 255, T += N, m /= 256, E -= 8)
|
|
725
|
-
;
|
|
726
|
-
i[a + T - N] |= h * 128;
|
|
727
|
-
};
|
|
728
|
-
/*!
|
|
729
|
-
* The buffer module from node.js, for the browser.
|
|
730
|
-
*
|
|
731
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
732
|
-
* @license MIT
|
|
733
|
-
*/
|
|
734
|
-
(function(i) {
|
|
735
|
-
const n = be, a = et, c = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
736
|
-
i.Buffer = o, i.SlowBuffer = A, i.INSPECT_MAX_BYTES = 50;
|
|
737
|
-
const u = 2147483647;
|
|
738
|
-
i.kMaxLength = u, o.TYPED_ARRAY_SUPPORT = I(), !o.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
|
|
739
|
-
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
|
|
740
|
-
);
|
|
741
|
-
function I() {
|
|
742
|
-
try {
|
|
743
|
-
const r = new Uint8Array(1), e = { foo: function() {
|
|
744
|
-
return 42;
|
|
745
|
-
} };
|
|
746
|
-
return Object.setPrototypeOf(e, Uint8Array.prototype), Object.setPrototypeOf(r, e), r.foo() === 42;
|
|
747
|
-
} catch {
|
|
748
|
-
return !1;
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
Object.defineProperty(o.prototype, "parent", {
|
|
752
|
-
enumerable: !0,
|
|
753
|
-
get: function() {
|
|
754
|
-
if (o.isBuffer(this))
|
|
755
|
-
return this.buffer;
|
|
756
|
-
}
|
|
757
|
-
}), Object.defineProperty(o.prototype, "offset", {
|
|
758
|
-
enumerable: !0,
|
|
759
|
-
get: function() {
|
|
760
|
-
if (o.isBuffer(this))
|
|
761
|
-
return this.byteOffset;
|
|
762
|
-
}
|
|
763
|
-
});
|
|
764
|
-
function m(r) {
|
|
765
|
-
if (r > u)
|
|
766
|
-
throw new RangeError('The value "' + r + '" is invalid for option "size"');
|
|
767
|
-
const e = new Uint8Array(r);
|
|
768
|
-
return Object.setPrototypeOf(e, o.prototype), e;
|
|
769
|
-
}
|
|
770
|
-
function o(r, e, t) {
|
|
771
|
-
if (typeof r == "number") {
|
|
772
|
-
if (typeof e == "string")
|
|
773
|
-
throw new TypeError(
|
|
774
|
-
'The "string" argument must be of type string. Received type number'
|
|
775
|
-
);
|
|
776
|
-
return S(r);
|
|
777
|
-
}
|
|
778
|
-
return y(r, e, t);
|
|
779
|
-
}
|
|
780
|
-
o.poolSize = 8192;
|
|
781
|
-
function y(r, e, t) {
|
|
782
|
-
if (typeof r == "string")
|
|
783
|
-
return x(r, e);
|
|
784
|
-
if (ArrayBuffer.isView(r))
|
|
785
|
-
return N(r);
|
|
786
|
-
if (r == null)
|
|
787
|
-
throw new TypeError(
|
|
788
|
-
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof r
|
|
789
|
-
);
|
|
790
|
-
if (H(r, ArrayBuffer) || r && H(r.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (H(r, SharedArrayBuffer) || r && H(r.buffer, SharedArrayBuffer)))
|
|
791
|
-
return h(r, e, t);
|
|
792
|
-
if (typeof r == "number")
|
|
793
|
-
throw new TypeError(
|
|
794
|
-
'The "value" argument must not be of type number. Received type number'
|
|
795
|
-
);
|
|
796
|
-
const s = r.valueOf && r.valueOf();
|
|
797
|
-
if (s != null && s !== r)
|
|
798
|
-
return o.from(s, e, t);
|
|
799
|
-
const l = M(r);
|
|
800
|
-
if (l)
|
|
801
|
-
return l;
|
|
802
|
-
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof r[Symbol.toPrimitive] == "function")
|
|
803
|
-
return o.from(r[Symbol.toPrimitive]("string"), e, t);
|
|
804
|
-
throw new TypeError(
|
|
805
|
-
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof r
|
|
806
|
-
);
|
|
807
|
-
}
|
|
808
|
-
o.from = function(r, e, t) {
|
|
809
|
-
return y(r, e, t);
|
|
810
|
-
}, Object.setPrototypeOf(o.prototype, Uint8Array.prototype), Object.setPrototypeOf(o, Uint8Array);
|
|
811
|
-
function E(r) {
|
|
812
|
-
if (typeof r != "number")
|
|
813
|
-
throw new TypeError('"size" argument must be of type number');
|
|
814
|
-
if (r < 0)
|
|
815
|
-
throw new RangeError('The value "' + r + '" is invalid for option "size"');
|
|
816
|
-
}
|
|
817
|
-
function _(r, e, t) {
|
|
818
|
-
return E(r), r <= 0 ? m(r) : e !== void 0 ? typeof t == "string" ? m(r).fill(e, t) : m(r).fill(e) : m(r);
|
|
819
|
-
}
|
|
820
|
-
o.alloc = function(r, e, t) {
|
|
821
|
-
return _(r, e, t);
|
|
822
|
-
};
|
|
823
|
-
function S(r) {
|
|
824
|
-
return E(r), m(r < 0 ? 0 : w(r) | 0);
|
|
825
|
-
}
|
|
826
|
-
o.allocUnsafe = function(r) {
|
|
827
|
-
return S(r);
|
|
828
|
-
}, o.allocUnsafeSlow = function(r) {
|
|
829
|
-
return S(r);
|
|
830
|
-
};
|
|
831
|
-
function x(r, e) {
|
|
832
|
-
if ((typeof e != "string" || e === "") && (e = "utf8"), !o.isEncoding(e))
|
|
833
|
-
throw new TypeError("Unknown encoding: " + e);
|
|
834
|
-
const t = z(r, e) | 0;
|
|
835
|
-
let s = m(t);
|
|
836
|
-
const l = s.write(r, e);
|
|
837
|
-
return l !== t && (s = s.slice(0, l)), s;
|
|
838
|
-
}
|
|
839
|
-
function T(r) {
|
|
840
|
-
const e = r.length < 0 ? 0 : w(r.length) | 0, t = m(e);
|
|
841
|
-
for (let s = 0; s < e; s += 1)
|
|
842
|
-
t[s] = r[s] & 255;
|
|
843
|
-
return t;
|
|
844
|
-
}
|
|
845
|
-
function N(r) {
|
|
846
|
-
if (H(r, Uint8Array)) {
|
|
847
|
-
const e = new Uint8Array(r);
|
|
848
|
-
return h(e.buffer, e.byteOffset, e.byteLength);
|
|
849
|
-
}
|
|
850
|
-
return T(r);
|
|
851
|
-
}
|
|
852
|
-
function h(r, e, t) {
|
|
853
|
-
if (e < 0 || r.byteLength < e)
|
|
854
|
-
throw new RangeError('"offset" is outside of buffer bounds');
|
|
855
|
-
if (r.byteLength < e + (t || 0))
|
|
856
|
-
throw new RangeError('"length" is outside of buffer bounds');
|
|
857
|
-
let s;
|
|
858
|
-
return e === void 0 && t === void 0 ? s = new Uint8Array(r) : t === void 0 ? s = new Uint8Array(r, e) : s = new Uint8Array(r, e, t), Object.setPrototypeOf(s, o.prototype), s;
|
|
859
|
-
}
|
|
860
|
-
function M(r) {
|
|
861
|
-
if (o.isBuffer(r)) {
|
|
862
|
-
const e = w(r.length) | 0, t = m(e);
|
|
863
|
-
return t.length === 0 || r.copy(t, 0, 0, e), t;
|
|
864
|
-
}
|
|
865
|
-
if (r.length !== void 0)
|
|
866
|
-
return typeof r.length != "number" || Ue(r.length) ? m(0) : T(r);
|
|
867
|
-
if (r.type === "Buffer" && Array.isArray(r.data))
|
|
868
|
-
return T(r.data);
|
|
869
|
-
}
|
|
870
|
-
function w(r) {
|
|
871
|
-
if (r >= u)
|
|
872
|
-
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + u.toString(16) + " bytes");
|
|
873
|
-
return r | 0;
|
|
874
|
-
}
|
|
875
|
-
function A(r) {
|
|
876
|
-
return +r != r && (r = 0), o.alloc(+r);
|
|
877
|
-
}
|
|
878
|
-
o.isBuffer = function(e) {
|
|
879
|
-
return e != null && e._isBuffer === !0 && e !== o.prototype;
|
|
880
|
-
}, o.compare = function(e, t) {
|
|
881
|
-
if (H(e, Uint8Array) && (e = o.from(e, e.offset, e.byteLength)), H(t, Uint8Array) && (t = o.from(t, t.offset, t.byteLength)), !o.isBuffer(e) || !o.isBuffer(t))
|
|
882
|
-
throw new TypeError(
|
|
883
|
-
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
884
|
-
);
|
|
885
|
-
if (e === t)
|
|
886
|
-
return 0;
|
|
887
|
-
let s = e.length, l = t.length;
|
|
888
|
-
for (let d = 0, f = Math.min(s, l); d < f; ++d)
|
|
889
|
-
if (e[d] !== t[d]) {
|
|
890
|
-
s = e[d], l = t[d];
|
|
891
|
-
break;
|
|
892
|
-
}
|
|
893
|
-
return s < l ? -1 : l < s ? 1 : 0;
|
|
894
|
-
}, o.isEncoding = function(e) {
|
|
895
|
-
switch (String(e).toLowerCase()) {
|
|
896
|
-
case "hex":
|
|
897
|
-
case "utf8":
|
|
898
|
-
case "utf-8":
|
|
899
|
-
case "ascii":
|
|
900
|
-
case "latin1":
|
|
901
|
-
case "binary":
|
|
902
|
-
case "base64":
|
|
903
|
-
case "ucs2":
|
|
904
|
-
case "ucs-2":
|
|
905
|
-
case "utf16le":
|
|
906
|
-
case "utf-16le":
|
|
907
|
-
return !0;
|
|
908
|
-
default:
|
|
909
|
-
return !1;
|
|
910
|
-
}
|
|
911
|
-
}, o.concat = function(e, t) {
|
|
912
|
-
if (!Array.isArray(e))
|
|
913
|
-
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
914
|
-
if (e.length === 0)
|
|
915
|
-
return o.alloc(0);
|
|
916
|
-
let s;
|
|
917
|
-
if (t === void 0)
|
|
918
|
-
for (t = 0, s = 0; s < e.length; ++s)
|
|
919
|
-
t += e[s].length;
|
|
920
|
-
const l = o.allocUnsafe(t);
|
|
921
|
-
let d = 0;
|
|
922
|
-
for (s = 0; s < e.length; ++s) {
|
|
923
|
-
let f = e[s];
|
|
924
|
-
if (H(f, Uint8Array))
|
|
925
|
-
d + f.length > l.length ? (o.isBuffer(f) || (f = o.from(f)), f.copy(l, d)) : Uint8Array.prototype.set.call(
|
|
926
|
-
l,
|
|
927
|
-
f,
|
|
928
|
-
d
|
|
929
|
-
);
|
|
930
|
-
else if (o.isBuffer(f))
|
|
931
|
-
f.copy(l, d);
|
|
932
|
-
else
|
|
933
|
-
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
934
|
-
d += f.length;
|
|
935
|
-
}
|
|
936
|
-
return l;
|
|
937
|
-
};
|
|
938
|
-
function z(r, e) {
|
|
939
|
-
if (o.isBuffer(r))
|
|
940
|
-
return r.length;
|
|
941
|
-
if (ArrayBuffer.isView(r) || H(r, ArrayBuffer))
|
|
942
|
-
return r.byteLength;
|
|
943
|
-
if (typeof r != "string")
|
|
944
|
-
throw new TypeError(
|
|
945
|
-
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof r
|
|
946
|
-
);
|
|
947
|
-
const t = r.length, s = arguments.length > 2 && arguments[2] === !0;
|
|
948
|
-
if (!s && t === 0)
|
|
949
|
-
return 0;
|
|
950
|
-
let l = !1;
|
|
951
|
-
for (; ; )
|
|
952
|
-
switch (e) {
|
|
953
|
-
case "ascii":
|
|
954
|
-
case "latin1":
|
|
955
|
-
case "binary":
|
|
956
|
-
return t;
|
|
957
|
-
case "utf8":
|
|
958
|
-
case "utf-8":
|
|
959
|
-
return Re(r).length;
|
|
960
|
-
case "ucs2":
|
|
961
|
-
case "ucs-2":
|
|
962
|
-
case "utf16le":
|
|
963
|
-
case "utf-16le":
|
|
964
|
-
return t * 2;
|
|
965
|
-
case "hex":
|
|
966
|
-
return t >>> 1;
|
|
967
|
-
case "base64":
|
|
968
|
-
return st(r).length;
|
|
969
|
-
default:
|
|
970
|
-
if (l)
|
|
971
|
-
return s ? -1 : Re(r).length;
|
|
972
|
-
e = ("" + e).toLowerCase(), l = !0;
|
|
973
|
-
}
|
|
974
|
-
}
|
|
975
|
-
o.byteLength = z;
|
|
976
|
-
function O(r, e, t) {
|
|
977
|
-
let s = !1;
|
|
978
|
-
if ((e === void 0 || e < 0) && (e = 0), e > this.length || ((t === void 0 || t > this.length) && (t = this.length), t <= 0) || (t >>>= 0, e >>>= 0, t <= e))
|
|
979
|
-
return "";
|
|
980
|
-
for (r || (r = "utf8"); ; )
|
|
981
|
-
switch (r) {
|
|
982
|
-
case "hex":
|
|
983
|
-
return ke(this, e, t);
|
|
984
|
-
case "utf8":
|
|
985
|
-
case "utf-8":
|
|
986
|
-
return Me(this, e, t);
|
|
987
|
-
case "ascii":
|
|
988
|
-
return Ee(this, e, t);
|
|
989
|
-
case "latin1":
|
|
990
|
-
case "binary":
|
|
991
|
-
return pe(this, e, t);
|
|
992
|
-
case "base64":
|
|
993
|
-
return Ce(this, e, t);
|
|
994
|
-
case "ucs2":
|
|
995
|
-
case "ucs-2":
|
|
996
|
-
case "utf16le":
|
|
997
|
-
case "utf-16le":
|
|
998
|
-
return Te(this, e, t);
|
|
999
|
-
default:
|
|
1000
|
-
if (s)
|
|
1001
|
-
throw new TypeError("Unknown encoding: " + r);
|
|
1002
|
-
r = (r + "").toLowerCase(), s = !0;
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
o.prototype._isBuffer = !0;
|
|
1006
|
-
function D(r, e, t) {
|
|
1007
|
-
const s = r[e];
|
|
1008
|
-
r[e] = r[t], r[t] = s;
|
|
1009
|
-
}
|
|
1010
|
-
o.prototype.swap16 = function() {
|
|
1011
|
-
const e = this.length;
|
|
1012
|
-
if (e % 2 !== 0)
|
|
1013
|
-
throw new RangeError("Buffer size must be a multiple of 16-bits");
|
|
1014
|
-
for (let t = 0; t < e; t += 2)
|
|
1015
|
-
D(this, t, t + 1);
|
|
1016
|
-
return this;
|
|
1017
|
-
}, o.prototype.swap32 = function() {
|
|
1018
|
-
const e = this.length;
|
|
1019
|
-
if (e % 4 !== 0)
|
|
1020
|
-
throw new RangeError("Buffer size must be a multiple of 32-bits");
|
|
1021
|
-
for (let t = 0; t < e; t += 4)
|
|
1022
|
-
D(this, t, t + 3), D(this, t + 1, t + 2);
|
|
1023
|
-
return this;
|
|
1024
|
-
}, o.prototype.swap64 = function() {
|
|
1025
|
-
const e = this.length;
|
|
1026
|
-
if (e % 8 !== 0)
|
|
1027
|
-
throw new RangeError("Buffer size must be a multiple of 64-bits");
|
|
1028
|
-
for (let t = 0; t < e; t += 8)
|
|
1029
|
-
D(this, t, t + 7), D(this, t + 1, t + 6), D(this, t + 2, t + 5), D(this, t + 3, t + 4);
|
|
1030
|
-
return this;
|
|
1031
|
-
}, o.prototype.toString = function() {
|
|
1032
|
-
const e = this.length;
|
|
1033
|
-
return e === 0 ? "" : arguments.length === 0 ? Me(this, 0, e) : O.apply(this, arguments);
|
|
1034
|
-
}, o.prototype.toLocaleString = o.prototype.toString, o.prototype.equals = function(e) {
|
|
1035
|
-
if (!o.isBuffer(e))
|
|
1036
|
-
throw new TypeError("Argument must be a Buffer");
|
|
1037
|
-
return this === e ? !0 : o.compare(this, e) === 0;
|
|
1038
|
-
}, o.prototype.inspect = function() {
|
|
1039
|
-
let e = "";
|
|
1040
|
-
const t = i.INSPECT_MAX_BYTES;
|
|
1041
|
-
return e = this.toString("hex", 0, t).replace(/(.{2})/g, "$1 ").trim(), this.length > t && (e += " ... "), "<Buffer " + e + ">";
|
|
1042
|
-
}, c && (o.prototype[c] = o.prototype.inspect), o.prototype.compare = function(e, t, s, l, d) {
|
|
1043
|
-
if (H(e, Uint8Array) && (e = o.from(e, e.offset, e.byteLength)), !o.isBuffer(e))
|
|
1044
|
-
throw new TypeError(
|
|
1045
|
-
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof e
|
|
1046
|
-
);
|
|
1047
|
-
if (t === void 0 && (t = 0), s === void 0 && (s = e ? e.length : 0), l === void 0 && (l = 0), d === void 0 && (d = this.length), t < 0 || s > e.length || l < 0 || d > this.length)
|
|
1048
|
-
throw new RangeError("out of range index");
|
|
1049
|
-
if (l >= d && t >= s)
|
|
1050
|
-
return 0;
|
|
1051
|
-
if (l >= d)
|
|
1052
|
-
return -1;
|
|
1053
|
-
if (t >= s)
|
|
1054
|
-
return 1;
|
|
1055
|
-
if (t >>>= 0, s >>>= 0, l >>>= 0, d >>>= 0, this === e)
|
|
1056
|
-
return 0;
|
|
1057
|
-
let f = d - l, b = s - t;
|
|
1058
|
-
const B = Math.min(f, b), k = this.slice(l, d), R = e.slice(t, s);
|
|
1059
|
-
for (let C = 0; C < B; ++C)
|
|
1060
|
-
if (k[C] !== R[C]) {
|
|
1061
|
-
f = k[C], b = R[C];
|
|
1062
|
-
break;
|
|
1063
|
-
}
|
|
1064
|
-
return f < b ? -1 : b < f ? 1 : 0;
|
|
1065
|
-
};
|
|
1066
|
-
function L(r, e, t, s, l) {
|
|
1067
|
-
if (r.length === 0)
|
|
1068
|
-
return -1;
|
|
1069
|
-
if (typeof t == "string" ? (s = t, t = 0) : t > 2147483647 ? t = 2147483647 : t < -2147483648 && (t = -2147483648), t = +t, Ue(t) && (t = l ? 0 : r.length - 1), t < 0 && (t = r.length + t), t >= r.length) {
|
|
1070
|
-
if (l)
|
|
1071
|
-
return -1;
|
|
1072
|
-
t = r.length - 1;
|
|
1073
|
-
} else if (t < 0)
|
|
1074
|
-
if (l)
|
|
1075
|
-
t = 0;
|
|
1076
|
-
else
|
|
1077
|
-
return -1;
|
|
1078
|
-
if (typeof e == "string" && (e = o.from(e, s)), o.isBuffer(e))
|
|
1079
|
-
return e.length === 0 ? -1 : j(r, e, t, s, l);
|
|
1080
|
-
if (typeof e == "number")
|
|
1081
|
-
return e = e & 255, typeof Uint8Array.prototype.indexOf == "function" ? l ? Uint8Array.prototype.indexOf.call(r, e, t) : Uint8Array.prototype.lastIndexOf.call(r, e, t) : j(r, [e], t, s, l);
|
|
1082
|
-
throw new TypeError("val must be string, number or Buffer");
|
|
1083
|
-
}
|
|
1084
|
-
function j(r, e, t, s, l) {
|
|
1085
|
-
let d = 1, f = r.length, b = e.length;
|
|
1086
|
-
if (s !== void 0 && (s = String(s).toLowerCase(), s === "ucs2" || s === "ucs-2" || s === "utf16le" || s === "utf-16le")) {
|
|
1087
|
-
if (r.length < 2 || e.length < 2)
|
|
1088
|
-
return -1;
|
|
1089
|
-
d = 2, f /= 2, b /= 2, t /= 2;
|
|
1090
|
-
}
|
|
1091
|
-
function B(R, C) {
|
|
1092
|
-
return d === 1 ? R[C] : R.readUInt16BE(C * d);
|
|
1093
|
-
}
|
|
1094
|
-
let k;
|
|
1095
|
-
if (l) {
|
|
1096
|
-
let R = -1;
|
|
1097
|
-
for (k = t; k < f; k++)
|
|
1098
|
-
if (B(r, k) === B(e, R === -1 ? 0 : k - R)) {
|
|
1099
|
-
if (R === -1 && (R = k), k - R + 1 === b)
|
|
1100
|
-
return R * d;
|
|
1101
|
-
} else
|
|
1102
|
-
R !== -1 && (k -= k - R), R = -1;
|
|
1103
|
-
} else
|
|
1104
|
-
for (t + b > f && (t = f - b), k = t; k >= 0; k--) {
|
|
1105
|
-
let R = !0;
|
|
1106
|
-
for (let C = 0; C < b; C++)
|
|
1107
|
-
if (B(r, k + C) !== B(e, C)) {
|
|
1108
|
-
R = !1;
|
|
1109
|
-
break;
|
|
1110
|
-
}
|
|
1111
|
-
if (R)
|
|
1112
|
-
return k;
|
|
1113
|
-
}
|
|
1114
|
-
return -1;
|
|
1115
|
-
}
|
|
1116
|
-
o.prototype.includes = function(e, t, s) {
|
|
1117
|
-
return this.indexOf(e, t, s) !== -1;
|
|
1118
|
-
}, o.prototype.indexOf = function(e, t, s) {
|
|
1119
|
-
return L(this, e, t, s, !0);
|
|
1120
|
-
}, o.prototype.lastIndexOf = function(e, t, s) {
|
|
1121
|
-
return L(this, e, t, s, !1);
|
|
1122
|
-
};
|
|
1123
|
-
function W(r, e, t, s) {
|
|
1124
|
-
t = Number(t) || 0;
|
|
1125
|
-
const l = r.length - t;
|
|
1126
|
-
s ? (s = Number(s), s > l && (s = l)) : s = l;
|
|
1127
|
-
const d = e.length;
|
|
1128
|
-
s > d / 2 && (s = d / 2);
|
|
1129
|
-
let f;
|
|
1130
|
-
for (f = 0; f < s; ++f) {
|
|
1131
|
-
const b = parseInt(e.substr(f * 2, 2), 16);
|
|
1132
|
-
if (Ue(b))
|
|
1133
|
-
return f;
|
|
1134
|
-
r[t + f] = b;
|
|
1135
|
-
}
|
|
1136
|
-
return f;
|
|
1137
|
-
}
|
|
1138
|
-
function V(r, e, t, s) {
|
|
1139
|
-
return ve(Re(e, r.length - t), r, t, s);
|
|
1140
|
-
}
|
|
1141
|
-
function ne(r, e, t, s) {
|
|
1142
|
-
return ve(Qt(e), r, t, s);
|
|
1143
|
-
}
|
|
1144
|
-
function se(r, e, t, s) {
|
|
1145
|
-
return ve(st(e), r, t, s);
|
|
1146
|
-
}
|
|
1147
|
-
function Oe(r, e, t, s) {
|
|
1148
|
-
return ve(Pt(e, r.length - t), r, t, s);
|
|
1149
|
-
}
|
|
1150
|
-
o.prototype.write = function(e, t, s, l) {
|
|
1151
|
-
if (t === void 0)
|
|
1152
|
-
l = "utf8", s = this.length, t = 0;
|
|
1153
|
-
else if (s === void 0 && typeof t == "string")
|
|
1154
|
-
l = t, s = this.length, t = 0;
|
|
1155
|
-
else if (isFinite(t))
|
|
1156
|
-
t = t >>> 0, isFinite(s) ? (s = s >>> 0, l === void 0 && (l = "utf8")) : (l = s, s = void 0);
|
|
1157
|
-
else
|
|
1158
|
-
throw new Error(
|
|
1159
|
-
"Buffer.write(string, encoding, offset[, length]) is no longer supported"
|
|
1160
|
-
);
|
|
1161
|
-
const d = this.length - t;
|
|
1162
|
-
if ((s === void 0 || s > d) && (s = d), e.length > 0 && (s < 0 || t < 0) || t > this.length)
|
|
1163
|
-
throw new RangeError("Attempt to write outside buffer bounds");
|
|
1164
|
-
l || (l = "utf8");
|
|
1165
|
-
let f = !1;
|
|
1166
|
-
for (; ; )
|
|
1167
|
-
switch (l) {
|
|
1168
|
-
case "hex":
|
|
1169
|
-
return W(this, e, t, s);
|
|
1170
|
-
case "utf8":
|
|
1171
|
-
case "utf-8":
|
|
1172
|
-
return V(this, e, t, s);
|
|
1173
|
-
case "ascii":
|
|
1174
|
-
case "latin1":
|
|
1175
|
-
case "binary":
|
|
1176
|
-
return ne(this, e, t, s);
|
|
1177
|
-
case "base64":
|
|
1178
|
-
return se(this, e, t, s);
|
|
1179
|
-
case "ucs2":
|
|
1180
|
-
case "ucs-2":
|
|
1181
|
-
case "utf16le":
|
|
1182
|
-
case "utf-16le":
|
|
1183
|
-
return Oe(this, e, t, s);
|
|
1184
|
-
default:
|
|
1185
|
-
if (f)
|
|
1186
|
-
throw new TypeError("Unknown encoding: " + l);
|
|
1187
|
-
l = ("" + l).toLowerCase(), f = !0;
|
|
1188
|
-
}
|
|
1189
|
-
}, o.prototype.toJSON = function() {
|
|
1190
|
-
return {
|
|
1191
|
-
type: "Buffer",
|
|
1192
|
-
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
1193
|
-
};
|
|
1194
|
-
};
|
|
1195
|
-
function Ce(r, e, t) {
|
|
1196
|
-
return e === 0 && t === r.length ? n.fromByteArray(r) : n.fromByteArray(r.slice(e, t));
|
|
1197
|
-
}
|
|
1198
|
-
function Me(r, e, t) {
|
|
1199
|
-
t = Math.min(r.length, t);
|
|
1200
|
-
const s = [];
|
|
1201
|
-
let l = e;
|
|
1202
|
-
for (; l < t; ) {
|
|
1203
|
-
const d = r[l];
|
|
1204
|
-
let f = null, b = d > 239 ? 4 : d > 223 ? 3 : d > 191 ? 2 : 1;
|
|
1205
|
-
if (l + b <= t) {
|
|
1206
|
-
let B, k, R, C;
|
|
1207
|
-
switch (b) {
|
|
1208
|
-
case 1:
|
|
1209
|
-
d < 128 && (f = d);
|
|
1210
|
-
break;
|
|
1211
|
-
case 2:
|
|
1212
|
-
B = r[l + 1], (B & 192) === 128 && (C = (d & 31) << 6 | B & 63, C > 127 && (f = C));
|
|
1213
|
-
break;
|
|
1214
|
-
case 3:
|
|
1215
|
-
B = r[l + 1], k = r[l + 2], (B & 192) === 128 && (k & 192) === 128 && (C = (d & 15) << 12 | (B & 63) << 6 | k & 63, C > 2047 && (C < 55296 || C > 57343) && (f = C));
|
|
1216
|
-
break;
|
|
1217
|
-
case 4:
|
|
1218
|
-
B = r[l + 1], k = r[l + 2], R = r[l + 3], (B & 192) === 128 && (k & 192) === 128 && (R & 192) === 128 && (C = (d & 15) << 18 | (B & 63) << 12 | (k & 63) << 6 | R & 63, C > 65535 && C < 1114112 && (f = C));
|
|
1219
|
-
}
|
|
1220
|
-
}
|
|
1221
|
-
f === null ? (f = 65533, b = 1) : f > 65535 && (f -= 65536, s.push(f >>> 10 & 1023 | 55296), f = 56320 | f & 1023), s.push(f), l += b;
|
|
1222
|
-
}
|
|
1223
|
-
return Le(s);
|
|
1224
|
-
}
|
|
1225
|
-
const Ae = 4096;
|
|
1226
|
-
function Le(r) {
|
|
1227
|
-
const e = r.length;
|
|
1228
|
-
if (e <= Ae)
|
|
1229
|
-
return String.fromCharCode.apply(String, r);
|
|
1230
|
-
let t = "", s = 0;
|
|
1231
|
-
for (; s < e; )
|
|
1232
|
-
t += String.fromCharCode.apply(
|
|
1233
|
-
String,
|
|
1234
|
-
r.slice(s, s += Ae)
|
|
1235
|
-
);
|
|
1236
|
-
return t;
|
|
1237
|
-
}
|
|
1238
|
-
function Ee(r, e, t) {
|
|
1239
|
-
let s = "";
|
|
1240
|
-
t = Math.min(r.length, t);
|
|
1241
|
-
for (let l = e; l < t; ++l)
|
|
1242
|
-
s += String.fromCharCode(r[l] & 127);
|
|
1243
|
-
return s;
|
|
1244
|
-
}
|
|
1245
|
-
function pe(r, e, t) {
|
|
1246
|
-
let s = "";
|
|
1247
|
-
t = Math.min(r.length, t);
|
|
1248
|
-
for (let l = e; l < t; ++l)
|
|
1249
|
-
s += String.fromCharCode(r[l]);
|
|
1250
|
-
return s;
|
|
1251
|
-
}
|
|
1252
|
-
function ke(r, e, t) {
|
|
1253
|
-
const s = r.length;
|
|
1254
|
-
(!e || e < 0) && (e = 0), (!t || t < 0 || t > s) && (t = s);
|
|
1255
|
-
let l = "";
|
|
1256
|
-
for (let d = e; d < t; ++d)
|
|
1257
|
-
l += qt[r[d]];
|
|
1258
|
-
return l;
|
|
1259
|
-
}
|
|
1260
|
-
function Te(r, e, t) {
|
|
1261
|
-
const s = r.slice(e, t);
|
|
1262
|
-
let l = "";
|
|
1263
|
-
for (let d = 0; d < s.length - 1; d += 2)
|
|
1264
|
-
l += String.fromCharCode(s[d] + s[d + 1] * 256);
|
|
1265
|
-
return l;
|
|
1266
|
-
}
|
|
1267
|
-
o.prototype.slice = function(e, t) {
|
|
1268
|
-
const s = this.length;
|
|
1269
|
-
e = ~~e, t = t === void 0 ? s : ~~t, e < 0 ? (e += s, e < 0 && (e = 0)) : e > s && (e = s), t < 0 ? (t += s, t < 0 && (t = 0)) : t > s && (t = s), t < e && (t = e);
|
|
1270
|
-
const l = this.subarray(e, t);
|
|
1271
|
-
return Object.setPrototypeOf(l, o.prototype), l;
|
|
1272
|
-
};
|
|
1273
|
-
function F(r, e, t) {
|
|
1274
|
-
if (r % 1 !== 0 || r < 0)
|
|
1275
|
-
throw new RangeError("offset is not uint");
|
|
1276
|
-
if (r + e > t)
|
|
1277
|
-
throw new RangeError("Trying to access beyond buffer length");
|
|
1278
|
-
}
|
|
1279
|
-
o.prototype.readUintLE = o.prototype.readUIntLE = function(e, t, s) {
|
|
1280
|
-
e = e >>> 0, t = t >>> 0, s || F(e, t, this.length);
|
|
1281
|
-
let l = this[e], d = 1, f = 0;
|
|
1282
|
-
for (; ++f < t && (d *= 256); )
|
|
1283
|
-
l += this[e + f] * d;
|
|
1284
|
-
return l;
|
|
1285
|
-
}, o.prototype.readUintBE = o.prototype.readUIntBE = function(e, t, s) {
|
|
1286
|
-
e = e >>> 0, t = t >>> 0, s || F(e, t, this.length);
|
|
1287
|
-
let l = this[e + --t], d = 1;
|
|
1288
|
-
for (; t > 0 && (d *= 256); )
|
|
1289
|
-
l += this[e + --t] * d;
|
|
1290
|
-
return l;
|
|
1291
|
-
}, o.prototype.readUint8 = o.prototype.readUInt8 = function(e, t) {
|
|
1292
|
-
return e = e >>> 0, t || F(e, 1, this.length), this[e];
|
|
1293
|
-
}, o.prototype.readUint16LE = o.prototype.readUInt16LE = function(e, t) {
|
|
1294
|
-
return e = e >>> 0, t || F(e, 2, this.length), this[e] | this[e + 1] << 8;
|
|
1295
|
-
}, o.prototype.readUint16BE = o.prototype.readUInt16BE = function(e, t) {
|
|
1296
|
-
return e = e >>> 0, t || F(e, 2, this.length), this[e] << 8 | this[e + 1];
|
|
1297
|
-
}, o.prototype.readUint32LE = o.prototype.readUInt32LE = function(e, t) {
|
|
1298
|
-
return e = e >>> 0, t || F(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + this[e + 3] * 16777216;
|
|
1299
|
-
}, o.prototype.readUint32BE = o.prototype.readUInt32BE = function(e, t) {
|
|
1300
|
-
return e = e >>> 0, t || F(e, 4, this.length), this[e] * 16777216 + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
|
|
1301
|
-
}, o.prototype.readBigUInt64LE = te(function(e) {
|
|
1302
|
-
e = e >>> 0, ae(e, "offset");
|
|
1303
|
-
const t = this[e], s = this[e + 7];
|
|
1304
|
-
(t === void 0 || s === void 0) && ge(e, this.length - 8);
|
|
1305
|
-
const l = t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24, d = this[++e] + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + s * 2 ** 24;
|
|
1306
|
-
return BigInt(l) + (BigInt(d) << BigInt(32));
|
|
1307
|
-
}), o.prototype.readBigUInt64BE = te(function(e) {
|
|
1308
|
-
e = e >>> 0, ae(e, "offset");
|
|
1309
|
-
const t = this[e], s = this[e + 7];
|
|
1310
|
-
(t === void 0 || s === void 0) && ge(e, this.length - 8);
|
|
1311
|
-
const l = t * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e], d = this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + s;
|
|
1312
|
-
return (BigInt(l) << BigInt(32)) + BigInt(d);
|
|
1313
|
-
}), o.prototype.readIntLE = function(e, t, s) {
|
|
1314
|
-
e = e >>> 0, t = t >>> 0, s || F(e, t, this.length);
|
|
1315
|
-
let l = this[e], d = 1, f = 0;
|
|
1316
|
-
for (; ++f < t && (d *= 256); )
|
|
1317
|
-
l += this[e + f] * d;
|
|
1318
|
-
return d *= 128, l >= d && (l -= Math.pow(2, 8 * t)), l;
|
|
1319
|
-
}, o.prototype.readIntBE = function(e, t, s) {
|
|
1320
|
-
e = e >>> 0, t = t >>> 0, s || F(e, t, this.length);
|
|
1321
|
-
let l = t, d = 1, f = this[e + --l];
|
|
1322
|
-
for (; l > 0 && (d *= 256); )
|
|
1323
|
-
f += this[e + --l] * d;
|
|
1324
|
-
return d *= 128, f >= d && (f -= Math.pow(2, 8 * t)), f;
|
|
1325
|
-
}, o.prototype.readInt8 = function(e, t) {
|
|
1326
|
-
return e = e >>> 0, t || F(e, 1, this.length), this[e] & 128 ? (255 - this[e] + 1) * -1 : this[e];
|
|
1327
|
-
}, o.prototype.readInt16LE = function(e, t) {
|
|
1328
|
-
e = e >>> 0, t || F(e, 2, this.length);
|
|
1329
|
-
const s = this[e] | this[e + 1] << 8;
|
|
1330
|
-
return s & 32768 ? s | 4294901760 : s;
|
|
1331
|
-
}, o.prototype.readInt16BE = function(e, t) {
|
|
1332
|
-
e = e >>> 0, t || F(e, 2, this.length);
|
|
1333
|
-
const s = this[e + 1] | this[e] << 8;
|
|
1334
|
-
return s & 32768 ? s | 4294901760 : s;
|
|
1335
|
-
}, o.prototype.readInt32LE = function(e, t) {
|
|
1336
|
-
return e = e >>> 0, t || F(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24;
|
|
1337
|
-
}, o.prototype.readInt32BE = function(e, t) {
|
|
1338
|
-
return e = e >>> 0, t || F(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];
|
|
1339
|
-
}, o.prototype.readBigInt64LE = te(function(e) {
|
|
1340
|
-
e = e >>> 0, ae(e, "offset");
|
|
1341
|
-
const t = this[e], s = this[e + 7];
|
|
1342
|
-
(t === void 0 || s === void 0) && ge(e, this.length - 8);
|
|
1343
|
-
const l = this[e + 4] + this[e + 5] * 2 ** 8 + this[e + 6] * 2 ** 16 + (s << 24);
|
|
1344
|
-
return (BigInt(l) << BigInt(32)) + BigInt(t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24);
|
|
1345
|
-
}), o.prototype.readBigInt64BE = te(function(e) {
|
|
1346
|
-
e = e >>> 0, ae(e, "offset");
|
|
1347
|
-
const t = this[e], s = this[e + 7];
|
|
1348
|
-
(t === void 0 || s === void 0) && ge(e, this.length - 8);
|
|
1349
|
-
const l = (t << 24) + // Overflow
|
|
1350
|
-
this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e];
|
|
1351
|
-
return (BigInt(l) << BigInt(32)) + BigInt(this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + s);
|
|
1352
|
-
}), o.prototype.readFloatLE = function(e, t) {
|
|
1353
|
-
return e = e >>> 0, t || F(e, 4, this.length), a.read(this, e, !0, 23, 4);
|
|
1354
|
-
}, o.prototype.readFloatBE = function(e, t) {
|
|
1355
|
-
return e = e >>> 0, t || F(e, 4, this.length), a.read(this, e, !1, 23, 4);
|
|
1356
|
-
}, o.prototype.readDoubleLE = function(e, t) {
|
|
1357
|
-
return e = e >>> 0, t || F(e, 8, this.length), a.read(this, e, !0, 52, 8);
|
|
1358
|
-
}, o.prototype.readDoubleBE = function(e, t) {
|
|
1359
|
-
return e = e >>> 0, t || F(e, 8, this.length), a.read(this, e, !1, 52, 8);
|
|
1360
|
-
};
|
|
1361
|
-
function $(r, e, t, s, l, d) {
|
|
1362
|
-
if (!o.isBuffer(r))
|
|
1363
|
-
throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
1364
|
-
if (e > l || e < d)
|
|
1365
|
-
throw new RangeError('"value" argument is out of bounds');
|
|
1366
|
-
if (t + s > r.length)
|
|
1367
|
-
throw new RangeError("Index out of range");
|
|
1368
|
-
}
|
|
1369
|
-
o.prototype.writeUintLE = o.prototype.writeUIntLE = function(e, t, s, l) {
|
|
1370
|
-
if (e = +e, t = t >>> 0, s = s >>> 0, !l) {
|
|
1371
|
-
const b = Math.pow(2, 8 * s) - 1;
|
|
1372
|
-
$(this, e, t, s, b, 0);
|
|
1373
|
-
}
|
|
1374
|
-
let d = 1, f = 0;
|
|
1375
|
-
for (this[t] = e & 255; ++f < s && (d *= 256); )
|
|
1376
|
-
this[t + f] = e / d & 255;
|
|
1377
|
-
return t + s;
|
|
1378
|
-
}, o.prototype.writeUintBE = o.prototype.writeUIntBE = function(e, t, s, l) {
|
|
1379
|
-
if (e = +e, t = t >>> 0, s = s >>> 0, !l) {
|
|
1380
|
-
const b = Math.pow(2, 8 * s) - 1;
|
|
1381
|
-
$(this, e, t, s, b, 0);
|
|
1382
|
-
}
|
|
1383
|
-
let d = s - 1, f = 1;
|
|
1384
|
-
for (this[t + d] = e & 255; --d >= 0 && (f *= 256); )
|
|
1385
|
-
this[t + d] = e / f & 255;
|
|
1386
|
-
return t + s;
|
|
1387
|
-
}, o.prototype.writeUint8 = o.prototype.writeUInt8 = function(e, t, s) {
|
|
1388
|
-
return e = +e, t = t >>> 0, s || $(this, e, t, 1, 255, 0), this[t] = e & 255, t + 1;
|
|
1389
|
-
}, o.prototype.writeUint16LE = o.prototype.writeUInt16LE = function(e, t, s) {
|
|
1390
|
-
return e = +e, t = t >>> 0, s || $(this, e, t, 2, 65535, 0), this[t] = e & 255, this[t + 1] = e >>> 8, t + 2;
|
|
1391
|
-
}, o.prototype.writeUint16BE = o.prototype.writeUInt16BE = function(e, t, s) {
|
|
1392
|
-
return e = +e, t = t >>> 0, s || $(this, e, t, 2, 65535, 0), this[t] = e >>> 8, this[t + 1] = e & 255, t + 2;
|
|
1393
|
-
}, o.prototype.writeUint32LE = o.prototype.writeUInt32LE = function(e, t, s) {
|
|
1394
|
-
return e = +e, t = t >>> 0, s || $(this, e, t, 4, 4294967295, 0), this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8, this[t] = e & 255, t + 4;
|
|
1395
|
-
}, o.prototype.writeUint32BE = o.prototype.writeUInt32BE = function(e, t, s) {
|
|
1396
|
-
return e = +e, t = t >>> 0, s || $(this, e, t, 4, 4294967295, 0), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255, t + 4;
|
|
1397
|
-
};
|
|
1398
|
-
function fe(r, e, t, s, l) {
|
|
1399
|
-
nt(e, s, l, r, t, 7);
|
|
1400
|
-
let d = Number(e & BigInt(4294967295));
|
|
1401
|
-
r[t++] = d, d = d >> 8, r[t++] = d, d = d >> 8, r[t++] = d, d = d >> 8, r[t++] = d;
|
|
1402
|
-
let f = Number(e >> BigInt(32) & BigInt(4294967295));
|
|
1403
|
-
return r[t++] = f, f = f >> 8, r[t++] = f, f = f >> 8, r[t++] = f, f = f >> 8, r[t++] = f, t;
|
|
1404
|
-
}
|
|
1405
|
-
function ee(r, e, t, s, l) {
|
|
1406
|
-
nt(e, s, l, r, t, 7);
|
|
1407
|
-
let d = Number(e & BigInt(4294967295));
|
|
1408
|
-
r[t + 7] = d, d = d >> 8, r[t + 6] = d, d = d >> 8, r[t + 5] = d, d = d >> 8, r[t + 4] = d;
|
|
1409
|
-
let f = Number(e >> BigInt(32) & BigInt(4294967295));
|
|
1410
|
-
return r[t + 3] = f, f = f >> 8, r[t + 2] = f, f = f >> 8, r[t + 1] = f, f = f >> 8, r[t] = f, t + 8;
|
|
1411
|
-
}
|
|
1412
|
-
o.prototype.writeBigUInt64LE = te(function(e, t = 0) {
|
|
1413
|
-
return fe(this, e, t, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
1414
|
-
}), o.prototype.writeBigUInt64BE = te(function(e, t = 0) {
|
|
1415
|
-
return ee(this, e, t, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
1416
|
-
}), o.prototype.writeIntLE = function(e, t, s, l) {
|
|
1417
|
-
if (e = +e, t = t >>> 0, !l) {
|
|
1418
|
-
const B = Math.pow(2, 8 * s - 1);
|
|
1419
|
-
$(this, e, t, s, B - 1, -B);
|
|
1420
|
-
}
|
|
1421
|
-
let d = 0, f = 1, b = 0;
|
|
1422
|
-
for (this[t] = e & 255; ++d < s && (f *= 256); )
|
|
1423
|
-
e < 0 && b === 0 && this[t + d - 1] !== 0 && (b = 1), this[t + d] = (e / f >> 0) - b & 255;
|
|
1424
|
-
return t + s;
|
|
1425
|
-
}, o.prototype.writeIntBE = function(e, t, s, l) {
|
|
1426
|
-
if (e = +e, t = t >>> 0, !l) {
|
|
1427
|
-
const B = Math.pow(2, 8 * s - 1);
|
|
1428
|
-
$(this, e, t, s, B - 1, -B);
|
|
1429
|
-
}
|
|
1430
|
-
let d = s - 1, f = 1, b = 0;
|
|
1431
|
-
for (this[t + d] = e & 255; --d >= 0 && (f *= 256); )
|
|
1432
|
-
e < 0 && b === 0 && this[t + d + 1] !== 0 && (b = 1), this[t + d] = (e / f >> 0) - b & 255;
|
|
1433
|
-
return t + s;
|
|
1434
|
-
}, o.prototype.writeInt8 = function(e, t, s) {
|
|
1435
|
-
return e = +e, t = t >>> 0, s || $(this, e, t, 1, 127, -128), e < 0 && (e = 255 + e + 1), this[t] = e & 255, t + 1;
|
|
1436
|
-
}, o.prototype.writeInt16LE = function(e, t, s) {
|
|
1437
|
-
return e = +e, t = t >>> 0, s || $(this, e, t, 2, 32767, -32768), this[t] = e & 255, this[t + 1] = e >>> 8, t + 2;
|
|
1438
|
-
}, o.prototype.writeInt16BE = function(e, t, s) {
|
|
1439
|
-
return e = +e, t = t >>> 0, s || $(this, e, t, 2, 32767, -32768), this[t] = e >>> 8, this[t + 1] = e & 255, t + 2;
|
|
1440
|
-
}, o.prototype.writeInt32LE = function(e, t, s) {
|
|
1441
|
-
return e = +e, t = t >>> 0, s || $(this, e, t, 4, 2147483647, -2147483648), this[t] = e & 255, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24, t + 4;
|
|
1442
|
-
}, o.prototype.writeInt32BE = function(e, t, s) {
|
|
1443
|
-
return e = +e, t = t >>> 0, s || $(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255, t + 4;
|
|
1444
|
-
}, o.prototype.writeBigInt64LE = te(function(e, t = 0) {
|
|
1445
|
-
return fe(this, e, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
1446
|
-
}), o.prototype.writeBigInt64BE = te(function(e, t = 0) {
|
|
1447
|
-
return ee(this, e, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
1448
|
-
});
|
|
1449
|
-
function me(r, e, t, s, l, d) {
|
|
1450
|
-
if (t + s > r.length)
|
|
1451
|
-
throw new RangeError("Index out of range");
|
|
1452
|
-
if (t < 0)
|
|
1453
|
-
throw new RangeError("Index out of range");
|
|
1454
|
-
}
|
|
1455
|
-
function tt(r, e, t, s, l) {
|
|
1456
|
-
return e = +e, t = t >>> 0, l || me(r, e, t, 4), a.write(r, e, t, s, 23, 4), t + 4;
|
|
1457
|
-
}
|
|
1458
|
-
o.prototype.writeFloatLE = function(e, t, s) {
|
|
1459
|
-
return tt(this, e, t, !0, s);
|
|
1460
|
-
}, o.prototype.writeFloatBE = function(e, t, s) {
|
|
1461
|
-
return tt(this, e, t, !1, s);
|
|
1462
|
-
};
|
|
1463
|
-
function rt(r, e, t, s, l) {
|
|
1464
|
-
return e = +e, t = t >>> 0, l || me(r, e, t, 8), a.write(r, e, t, s, 52, 8), t + 8;
|
|
1465
|
-
}
|
|
1466
|
-
o.prototype.writeDoubleLE = function(e, t, s) {
|
|
1467
|
-
return rt(this, e, t, !0, s);
|
|
1468
|
-
}, o.prototype.writeDoubleBE = function(e, t, s) {
|
|
1469
|
-
return rt(this, e, t, !1, s);
|
|
1470
|
-
}, o.prototype.copy = function(e, t, s, l) {
|
|
1471
|
-
if (!o.isBuffer(e))
|
|
1472
|
-
throw new TypeError("argument should be a Buffer");
|
|
1473
|
-
if (s || (s = 0), !l && l !== 0 && (l = this.length), t >= e.length && (t = e.length), t || (t = 0), l > 0 && l < s && (l = s), l === s || e.length === 0 || this.length === 0)
|
|
1474
|
-
return 0;
|
|
1475
|
-
if (t < 0)
|
|
1476
|
-
throw new RangeError("targetStart out of bounds");
|
|
1477
|
-
if (s < 0 || s >= this.length)
|
|
1478
|
-
throw new RangeError("Index out of range");
|
|
1479
|
-
if (l < 0)
|
|
1480
|
-
throw new RangeError("sourceEnd out of bounds");
|
|
1481
|
-
l > this.length && (l = this.length), e.length - t < l - s && (l = e.length - t + s);
|
|
1482
|
-
const d = l - s;
|
|
1483
|
-
return this === e && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(t, s, l) : Uint8Array.prototype.set.call(
|
|
1484
|
-
e,
|
|
1485
|
-
this.subarray(s, l),
|
|
1486
|
-
t
|
|
1487
|
-
), d;
|
|
1488
|
-
}, o.prototype.fill = function(e, t, s, l) {
|
|
1489
|
-
if (typeof e == "string") {
|
|
1490
|
-
if (typeof t == "string" ? (l = t, t = 0, s = this.length) : typeof s == "string" && (l = s, s = this.length), l !== void 0 && typeof l != "string")
|
|
1491
|
-
throw new TypeError("encoding must be a string");
|
|
1492
|
-
if (typeof l == "string" && !o.isEncoding(l))
|
|
1493
|
-
throw new TypeError("Unknown encoding: " + l);
|
|
1494
|
-
if (e.length === 1) {
|
|
1495
|
-
const f = e.charCodeAt(0);
|
|
1496
|
-
(l === "utf8" && f < 128 || l === "latin1") && (e = f);
|
|
1497
|
-
}
|
|
1498
|
-
} else
|
|
1499
|
-
typeof e == "number" ? e = e & 255 : typeof e == "boolean" && (e = Number(e));
|
|
1500
|
-
if (t < 0 || this.length < t || this.length < s)
|
|
1501
|
-
throw new RangeError("Out of range index");
|
|
1502
|
-
if (s <= t)
|
|
1503
|
-
return this;
|
|
1504
|
-
t = t >>> 0, s = s === void 0 ? this.length : s >>> 0, e || (e = 0);
|
|
1505
|
-
let d;
|
|
1506
|
-
if (typeof e == "number")
|
|
1507
|
-
for (d = t; d < s; ++d)
|
|
1508
|
-
this[d] = e;
|
|
1509
|
-
else {
|
|
1510
|
-
const f = o.isBuffer(e) ? e : o.from(e, l), b = f.length;
|
|
1511
|
-
if (b === 0)
|
|
1512
|
-
throw new TypeError('The value "' + e + '" is invalid for argument "value"');
|
|
1513
|
-
for (d = 0; d < s - t; ++d)
|
|
1514
|
-
this[d + t] = f[d % b];
|
|
1515
|
-
}
|
|
1516
|
-
return this;
|
|
1517
|
-
};
|
|
1518
|
-
const oe = {};
|
|
1519
|
-
function Be(r, e, t) {
|
|
1520
|
-
oe[r] = class extends t {
|
|
1521
|
-
constructor() {
|
|
1522
|
-
super(), Object.defineProperty(this, "message", {
|
|
1523
|
-
value: e.apply(this, arguments),
|
|
1524
|
-
writable: !0,
|
|
1525
|
-
configurable: !0
|
|
1526
|
-
}), this.name = `${this.name} [${r}]`, this.stack, delete this.name;
|
|
1527
|
-
}
|
|
1528
|
-
get code() {
|
|
1529
|
-
return r;
|
|
1530
|
-
}
|
|
1531
|
-
set code(l) {
|
|
1532
|
-
Object.defineProperty(this, "code", {
|
|
1533
|
-
configurable: !0,
|
|
1534
|
-
enumerable: !0,
|
|
1535
|
-
value: l,
|
|
1536
|
-
writable: !0
|
|
1537
|
-
});
|
|
1538
|
-
}
|
|
1539
|
-
toString() {
|
|
1540
|
-
return `${this.name} [${r}]: ${this.message}`;
|
|
1541
|
-
}
|
|
1542
|
-
};
|
|
1543
|
-
}
|
|
1544
|
-
Be(
|
|
1545
|
-
"ERR_BUFFER_OUT_OF_BOUNDS",
|
|
1546
|
-
function(r) {
|
|
1547
|
-
return r ? `${r} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
|
|
1548
|
-
},
|
|
1549
|
-
RangeError
|
|
1550
|
-
), Be(
|
|
1551
|
-
"ERR_INVALID_ARG_TYPE",
|
|
1552
|
-
function(r, e) {
|
|
1553
|
-
return `The "${r}" argument must be of type number. Received type ${typeof e}`;
|
|
1554
|
-
},
|
|
1555
|
-
TypeError
|
|
1556
|
-
), Be(
|
|
1557
|
-
"ERR_OUT_OF_RANGE",
|
|
1558
|
-
function(r, e, t) {
|
|
1559
|
-
let s = `The value of "${r}" is out of range.`, l = t;
|
|
1560
|
-
return Number.isInteger(t) && Math.abs(t) > 2 ** 32 ? l = it(String(t)) : typeof t == "bigint" && (l = String(t), (t > BigInt(2) ** BigInt(32) || t < -(BigInt(2) ** BigInt(32))) && (l = it(l)), l += "n"), s += ` It must be ${e}. Received ${l}`, s;
|
|
1561
|
-
},
|
|
1562
|
-
RangeError
|
|
1563
|
-
);
|
|
1564
|
-
function it(r) {
|
|
1565
|
-
let e = "", t = r.length;
|
|
1566
|
-
const s = r[0] === "-" ? 1 : 0;
|
|
1567
|
-
for (; t >= s + 4; t -= 3)
|
|
1568
|
-
e = `_${r.slice(t - 3, t)}${e}`;
|
|
1569
|
-
return `${r.slice(0, t)}${e}`;
|
|
1570
|
-
}
|
|
1571
|
-
function jt(r, e, t) {
|
|
1572
|
-
ae(e, "offset"), (r[e] === void 0 || r[e + t] === void 0) && ge(e, r.length - (t + 1));
|
|
1573
|
-
}
|
|
1574
|
-
function nt(r, e, t, s, l, d) {
|
|
1575
|
-
if (r > t || r < e) {
|
|
1576
|
-
const f = typeof e == "bigint" ? "n" : "";
|
|
1577
|
-
let b;
|
|
1578
|
-
throw d > 3 ? e === 0 || e === BigInt(0) ? b = `>= 0${f} and < 2${f} ** ${(d + 1) * 8}${f}` : b = `>= -(2${f} ** ${(d + 1) * 8 - 1}${f}) and < 2 ** ${(d + 1) * 8 - 1}${f}` : b = `>= ${e}${f} and <= ${t}${f}`, new oe.ERR_OUT_OF_RANGE("value", b, r);
|
|
1579
|
-
}
|
|
1580
|
-
jt(s, l, d);
|
|
1581
|
-
}
|
|
1582
|
-
function ae(r, e) {
|
|
1583
|
-
if (typeof r != "number")
|
|
1584
|
-
throw new oe.ERR_INVALID_ARG_TYPE(e, "number", r);
|
|
1585
|
-
}
|
|
1586
|
-
function ge(r, e, t) {
|
|
1587
|
-
throw Math.floor(r) !== r ? (ae(r, t), new oe.ERR_OUT_OF_RANGE(t || "offset", "an integer", r)) : e < 0 ? new oe.ERR_BUFFER_OUT_OF_BOUNDS() : new oe.ERR_OUT_OF_RANGE(
|
|
1588
|
-
t || "offset",
|
|
1589
|
-
`>= ${t ? 1 : 0} and <= ${e}`,
|
|
1590
|
-
r
|
|
1591
|
-
);
|
|
1592
|
-
}
|
|
1593
|
-
const Ft = /[^+/0-9A-Za-z-_]/g;
|
|
1594
|
-
function $t(r) {
|
|
1595
|
-
if (r = r.split("=")[0], r = r.trim().replace(Ft, ""), r.length < 2)
|
|
1596
|
-
return "";
|
|
1597
|
-
for (; r.length % 4 !== 0; )
|
|
1598
|
-
r = r + "=";
|
|
1599
|
-
return r;
|
|
1600
|
-
}
|
|
1601
|
-
function Re(r, e) {
|
|
1602
|
-
e = e || 1 / 0;
|
|
1603
|
-
let t;
|
|
1604
|
-
const s = r.length;
|
|
1605
|
-
let l = null;
|
|
1606
|
-
const d = [];
|
|
1607
|
-
for (let f = 0; f < s; ++f) {
|
|
1608
|
-
if (t = r.charCodeAt(f), t > 55295 && t < 57344) {
|
|
1609
|
-
if (!l) {
|
|
1610
|
-
if (t > 56319) {
|
|
1611
|
-
(e -= 3) > -1 && d.push(239, 191, 189);
|
|
1612
|
-
continue;
|
|
1613
|
-
} else if (f + 1 === s) {
|
|
1614
|
-
(e -= 3) > -1 && d.push(239, 191, 189);
|
|
1615
|
-
continue;
|
|
1616
|
-
}
|
|
1617
|
-
l = t;
|
|
1618
|
-
continue;
|
|
1619
|
-
}
|
|
1620
|
-
if (t < 56320) {
|
|
1621
|
-
(e -= 3) > -1 && d.push(239, 191, 189), l = t;
|
|
1622
|
-
continue;
|
|
1623
|
-
}
|
|
1624
|
-
t = (l - 55296 << 10 | t - 56320) + 65536;
|
|
1625
|
-
} else
|
|
1626
|
-
l && (e -= 3) > -1 && d.push(239, 191, 189);
|
|
1627
|
-
if (l = null, t < 128) {
|
|
1628
|
-
if ((e -= 1) < 0)
|
|
1629
|
-
break;
|
|
1630
|
-
d.push(t);
|
|
1631
|
-
} else if (t < 2048) {
|
|
1632
|
-
if ((e -= 2) < 0)
|
|
1633
|
-
break;
|
|
1634
|
-
d.push(
|
|
1635
|
-
t >> 6 | 192,
|
|
1636
|
-
t & 63 | 128
|
|
1637
|
-
);
|
|
1638
|
-
} else if (t < 65536) {
|
|
1639
|
-
if ((e -= 3) < 0)
|
|
1640
|
-
break;
|
|
1641
|
-
d.push(
|
|
1642
|
-
t >> 12 | 224,
|
|
1643
|
-
t >> 6 & 63 | 128,
|
|
1644
|
-
t & 63 | 128
|
|
1645
|
-
);
|
|
1646
|
-
} else if (t < 1114112) {
|
|
1647
|
-
if ((e -= 4) < 0)
|
|
1648
|
-
break;
|
|
1649
|
-
d.push(
|
|
1650
|
-
t >> 18 | 240,
|
|
1651
|
-
t >> 12 & 63 | 128,
|
|
1652
|
-
t >> 6 & 63 | 128,
|
|
1653
|
-
t & 63 | 128
|
|
1654
|
-
);
|
|
1655
|
-
} else
|
|
1656
|
-
throw new Error("Invalid code point");
|
|
1657
|
-
}
|
|
1658
|
-
return d;
|
|
1659
|
-
}
|
|
1660
|
-
function Qt(r) {
|
|
1661
|
-
const e = [];
|
|
1662
|
-
for (let t = 0; t < r.length; ++t)
|
|
1663
|
-
e.push(r.charCodeAt(t) & 255);
|
|
1664
|
-
return e;
|
|
1665
|
-
}
|
|
1666
|
-
function Pt(r, e) {
|
|
1667
|
-
let t, s, l;
|
|
1668
|
-
const d = [];
|
|
1669
|
-
for (let f = 0; f < r.length && !((e -= 2) < 0); ++f)
|
|
1670
|
-
t = r.charCodeAt(f), s = t >> 8, l = t % 256, d.push(l), d.push(s);
|
|
1671
|
-
return d;
|
|
1672
|
-
}
|
|
1673
|
-
function st(r) {
|
|
1674
|
-
return n.toByteArray($t(r));
|
|
1675
|
-
}
|
|
1676
|
-
function ve(r, e, t, s) {
|
|
1677
|
-
let l;
|
|
1678
|
-
for (l = 0; l < s && !(l + t >= e.length || l >= r.length); ++l)
|
|
1679
|
-
e[l + t] = r[l];
|
|
1680
|
-
return l;
|
|
1681
|
-
}
|
|
1682
|
-
function H(r, e) {
|
|
1683
|
-
return r instanceof e || r != null && r.constructor != null && r.constructor.name != null && r.constructor.name === e.name;
|
|
1684
|
-
}
|
|
1685
|
-
function Ue(r) {
|
|
1686
|
-
return r !== r;
|
|
1687
|
-
}
|
|
1688
|
-
const qt = function() {
|
|
1689
|
-
const r = "0123456789abcdef", e = new Array(256);
|
|
1690
|
-
for (let t = 0; t < 16; ++t) {
|
|
1691
|
-
const s = t * 16;
|
|
1692
|
-
for (let l = 0; l < 16; ++l)
|
|
1693
|
-
e[s + l] = r[t] + r[l];
|
|
1694
|
-
}
|
|
1695
|
-
return e;
|
|
1696
|
-
}();
|
|
1697
|
-
function te(r) {
|
|
1698
|
-
return typeof BigInt > "u" ? Yt : r;
|
|
1699
|
-
}
|
|
1700
|
-
function Yt() {
|
|
1701
|
-
throw new Error("BigInt not supported");
|
|
1702
|
-
}
|
|
1703
|
-
})(Ct);
|
|
1704
|
-
var kt = { exports: {} }, U = kt.exports = {}, G, Z;
|
|
1705
|
-
function He() {
|
|
1706
|
-
throw new Error("setTimeout has not been defined");
|
|
1707
|
-
}
|
|
1708
|
-
function Ge() {
|
|
1709
|
-
throw new Error("clearTimeout has not been defined");
|
|
1710
|
-
}
|
|
1711
|
-
(function() {
|
|
1712
|
-
try {
|
|
1713
|
-
typeof setTimeout == "function" ? G = setTimeout : G = He;
|
|
1714
|
-
} catch {
|
|
1715
|
-
G = He;
|
|
1716
|
-
}
|
|
1717
|
-
try {
|
|
1718
|
-
typeof clearTimeout == "function" ? Z = clearTimeout : Z = Ge;
|
|
1719
|
-
} catch {
|
|
1720
|
-
Z = Ge;
|
|
1721
|
-
}
|
|
1722
|
-
})();
|
|
1723
|
-
function Bt(i) {
|
|
1724
|
-
if (G === setTimeout)
|
|
1725
|
-
return setTimeout(i, 0);
|
|
1726
|
-
if ((G === He || !G) && setTimeout)
|
|
1727
|
-
return G = setTimeout, setTimeout(i, 0);
|
|
1728
|
-
try {
|
|
1729
|
-
return G(i, 0);
|
|
1730
|
-
} catch {
|
|
1731
|
-
try {
|
|
1732
|
-
return G.call(null, i, 0);
|
|
1733
|
-
} catch {
|
|
1734
|
-
return G.call(this, i, 0);
|
|
1735
|
-
}
|
|
1736
|
-
}
|
|
1737
|
-
}
|
|
1738
|
-
function Wi(i) {
|
|
1739
|
-
if (Z === clearTimeout)
|
|
1740
|
-
return clearTimeout(i);
|
|
1741
|
-
if ((Z === Ge || !Z) && clearTimeout)
|
|
1742
|
-
return Z = clearTimeout, clearTimeout(i);
|
|
1743
|
-
try {
|
|
1744
|
-
return Z(i);
|
|
1745
|
-
} catch {
|
|
1746
|
-
try {
|
|
1747
|
-
return Z.call(null, i);
|
|
1748
|
-
} catch {
|
|
1749
|
-
return Z.call(this, i);
|
|
1750
|
-
}
|
|
1751
|
-
}
|
|
1752
|
-
}
|
|
1753
|
-
var K = [], he = !1, ie, De = -1;
|
|
1754
|
-
function Vi() {
|
|
1755
|
-
!he || !ie || (he = !1, ie.length ? K = ie.concat(K) : De = -1, K.length && Rt());
|
|
1756
|
-
}
|
|
1757
|
-
function Rt() {
|
|
1758
|
-
if (!he) {
|
|
1759
|
-
var i = Bt(Vi);
|
|
1760
|
-
he = !0;
|
|
1761
|
-
for (var n = K.length; n; ) {
|
|
1762
|
-
for (ie = K, K = []; ++De < n; )
|
|
1763
|
-
ie && ie[De].run();
|
|
1764
|
-
De = -1, n = K.length;
|
|
1765
|
-
}
|
|
1766
|
-
ie = null, he = !1, Wi(i);
|
|
1767
|
-
}
|
|
1768
|
-
}
|
|
1769
|
-
U.nextTick = function(i) {
|
|
1770
|
-
var n = new Array(arguments.length - 1);
|
|
1771
|
-
if (arguments.length > 1)
|
|
1772
|
-
for (var a = 1; a < arguments.length; a++)
|
|
1773
|
-
n[a - 1] = arguments[a];
|
|
1774
|
-
K.push(new Ut(i, n)), K.length === 1 && !he && Bt(Rt);
|
|
1775
|
-
};
|
|
1776
|
-
function Ut(i, n) {
|
|
1777
|
-
this.fun = i, this.array = n;
|
|
1778
|
-
}
|
|
1779
|
-
Ut.prototype.run = function() {
|
|
1780
|
-
this.fun.apply(null, this.array);
|
|
1781
|
-
};
|
|
1782
|
-
U.title = "browser";
|
|
1783
|
-
U.browser = !0;
|
|
1784
|
-
U.env = {};
|
|
1785
|
-
U.argv = [];
|
|
1786
|
-
U.version = "";
|
|
1787
|
-
U.versions = {};
|
|
1788
|
-
function X() {
|
|
1789
|
-
}
|
|
1790
|
-
U.on = X;
|
|
1791
|
-
U.addListener = X;
|
|
1792
|
-
U.once = X;
|
|
1793
|
-
U.off = X;
|
|
1794
|
-
U.removeListener = X;
|
|
1795
|
-
U.removeAllListeners = X;
|
|
1796
|
-
U.emit = X;
|
|
1797
|
-
U.prependListener = X;
|
|
1798
|
-
U.prependOnceListener = X;
|
|
1799
|
-
U.listeners = function(i) {
|
|
1800
|
-
return [];
|
|
1801
|
-
};
|
|
1802
|
-
U.binding = function(i) {
|
|
1803
|
-
throw new Error("process.binding is not supported");
|
|
1804
|
-
};
|
|
1805
|
-
U.cwd = function() {
|
|
1806
|
-
return "/";
|
|
1807
|
-
};
|
|
1808
|
-
U.chdir = function(i) {
|
|
1809
|
-
throw new Error("process.chdir is not supported");
|
|
1810
|
-
};
|
|
1811
|
-
U.umask = function() {
|
|
1812
|
-
return 0;
|
|
1813
|
-
};
|
|
1814
|
-
var Hi = kt.exports;
|
|
1815
|
-
(function(i) {
|
|
1816
|
-
Object.defineProperty(i, Symbol.toStringTag, { value: "Module" });
|
|
1817
|
-
const n = Ct, a = Hi, c = (m) => m && m.__esModule ? m : { default: m }, u = c(a), I = globalThis || void 0 || self;
|
|
1818
|
-
Object.defineProperty(i, "Buffer", { enumerable: !0, get: () => n.Buffer }), Object.defineProperty(i, "process", { enumerable: !0, get: () => u.default }), i.global = I;
|
|
1819
|
-
})(Ot);
|
|
1820
|
-
let Y;
|
|
1821
|
-
typeof window < "u" ? Y = window : typeof self < "u" ? Y = self : Y = Ot.global;
|
|
1822
|
-
let Ze = null, Je = null;
|
|
1823
|
-
const ht = 20, $e = Y.clearTimeout, pt = Y.setTimeout, Qe = Y.cancelAnimationFrame || Y.mozCancelAnimationFrame || Y.webkitCancelAnimationFrame, ft = Y.requestAnimationFrame || Y.mozRequestAnimationFrame || Y.webkitRequestAnimationFrame;
|
|
1824
|
-
Qe == null || ft == null ? (Ze = $e, Je = function(n) {
|
|
1825
|
-
return pt(n, ht);
|
|
1826
|
-
}) : (Ze = function([n, a]) {
|
|
1827
|
-
Qe(n), $e(a);
|
|
1828
|
-
}, Je = function(n) {
|
|
1829
|
-
const a = ft(function() {
|
|
1830
|
-
$e(c), n();
|
|
1831
|
-
}), c = pt(function() {
|
|
1832
|
-
Qe(a), n();
|
|
1833
|
-
}, ht);
|
|
1834
|
-
return [a, c];
|
|
1835
|
-
});
|
|
1836
|
-
function Gi(i) {
|
|
1837
|
-
let n, a, c, u, I, m, o;
|
|
1838
|
-
const y = typeof document < "u" && document.attachEvent;
|
|
1839
|
-
if (!y) {
|
|
1840
|
-
m = function(w) {
|
|
1841
|
-
const A = w.__resizeTriggers__, z = A.firstElementChild, O = A.lastElementChild, D = z.firstElementChild;
|
|
1842
|
-
O.scrollLeft = O.scrollWidth, O.scrollTop = O.scrollHeight, D.style.width = z.offsetWidth + 1 + "px", D.style.height = z.offsetHeight + 1 + "px", z.scrollLeft = z.scrollWidth, z.scrollTop = z.scrollHeight;
|
|
1843
|
-
}, I = function(w) {
|
|
1844
|
-
return w.offsetWidth !== w.__resizeLast__.width || w.offsetHeight !== w.__resizeLast__.height;
|
|
1845
|
-
}, o = function(w) {
|
|
1846
|
-
if (w.target.className && typeof w.target.className.indexOf == "function" && w.target.className.indexOf("contract-trigger") < 0 && w.target.className.indexOf("expand-trigger") < 0)
|
|
1847
|
-
return;
|
|
1848
|
-
const A = this;
|
|
1849
|
-
m(this), this.__resizeRAF__ && Ze(this.__resizeRAF__), this.__resizeRAF__ = Je(function() {
|
|
1850
|
-
I(A) && (A.__resizeLast__.width = A.offsetWidth, A.__resizeLast__.height = A.offsetHeight, A.__resizeListeners__.forEach(function(D) {
|
|
1851
|
-
D.call(A, w);
|
|
1852
|
-
}));
|
|
1853
|
-
});
|
|
1854
|
-
};
|
|
1855
|
-
let x = !1, T = "";
|
|
1856
|
-
c = "animationstart";
|
|
1857
|
-
const N = "Webkit Moz O ms".split(" ");
|
|
1858
|
-
let h = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), M = "";
|
|
1859
|
-
{
|
|
1860
|
-
const w = document.createElement("fakeelement");
|
|
1861
|
-
if (w.style.animationName !== void 0 && (x = !0), x === !1) {
|
|
1862
|
-
for (let A = 0; A < N.length; A++)
|
|
1863
|
-
if (w.style[N[A] + "AnimationName"] !== void 0) {
|
|
1864
|
-
M = N[A], T = "-" + M.toLowerCase() + "-", c = h[A], x = !0;
|
|
1865
|
-
break;
|
|
1866
|
-
}
|
|
1867
|
-
}
|
|
1868
|
-
}
|
|
1869
|
-
a = "resizeanim", n = "@" + T + "keyframes " + a + " { from { opacity: 0; } to { opacity: 0; } } ", u = T + "animation: 1ms " + a + "; ";
|
|
1870
|
-
}
|
|
1871
|
-
const E = function(x) {
|
|
1872
|
-
if (!x.getElementById("detectElementResize")) {
|
|
1873
|
-
const T = (n || "") + ".resize-triggers { " + (u || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', N = x.head || x.getElementsByTagName("head")[0], h = x.createElement("style");
|
|
1874
|
-
h.id = "detectElementResize", h.type = "text/css", i != null && h.setAttribute("nonce", i), h.styleSheet ? h.styleSheet.cssText = T : h.appendChild(x.createTextNode(T)), N.appendChild(h);
|
|
1875
|
-
}
|
|
1876
|
-
};
|
|
1877
|
-
return {
|
|
1878
|
-
addResizeListener: function(x, T) {
|
|
1879
|
-
if (y)
|
|
1880
|
-
x.attachEvent("onresize", T);
|
|
1881
|
-
else {
|
|
1882
|
-
if (!x.__resizeTriggers__) {
|
|
1883
|
-
const N = x.ownerDocument, h = Y.getComputedStyle(x);
|
|
1884
|
-
h && h.position === "static" && (x.style.position = "relative"), E(N), x.__resizeLast__ = {}, x.__resizeListeners__ = [], (x.__resizeTriggers__ = N.createElement("div")).className = "resize-triggers";
|
|
1885
|
-
const M = N.createElement("div");
|
|
1886
|
-
M.className = "expand-trigger", M.appendChild(N.createElement("div"));
|
|
1887
|
-
const w = N.createElement("div");
|
|
1888
|
-
w.className = "contract-trigger", x.__resizeTriggers__.appendChild(M), x.__resizeTriggers__.appendChild(w), x.appendChild(x.__resizeTriggers__), m(x), x.addEventListener("scroll", o, !0), c && (x.__resizeTriggers__.__animationListener__ = function(z) {
|
|
1889
|
-
z.animationName === a && m(x);
|
|
1890
|
-
}, x.__resizeTriggers__.addEventListener(c, x.__resizeTriggers__.__animationListener__));
|
|
1891
|
-
}
|
|
1892
|
-
x.__resizeListeners__.push(T);
|
|
1893
|
-
}
|
|
1894
|
-
},
|
|
1895
|
-
removeResizeListener: function(x, T) {
|
|
1896
|
-
if (y)
|
|
1897
|
-
x.detachEvent("onresize", T);
|
|
1898
|
-
else if (x.__resizeListeners__.splice(x.__resizeListeners__.indexOf(T), 1), !x.__resizeListeners__.length) {
|
|
1899
|
-
x.removeEventListener("scroll", o, !0), x.__resizeTriggers__.__animationListener__ && (x.__resizeTriggers__.removeEventListener(c, x.__resizeTriggers__.__animationListener__), x.__resizeTriggers__.__animationListener__ = null);
|
|
1900
|
-
try {
|
|
1901
|
-
x.__resizeTriggers__ = !x.removeChild(x.__resizeTriggers__);
|
|
1902
|
-
} catch {
|
|
1903
|
-
}
|
|
1904
|
-
}
|
|
1905
|
-
}
|
|
1906
|
-
};
|
|
1907
|
-
}
|
|
1908
|
-
class Zi extends Gt {
|
|
1909
|
-
constructor(...n) {
|
|
1910
|
-
super(...n), this.state = {
|
|
1911
|
-
height: this.props.defaultHeight || 0,
|
|
1912
|
-
scaledHeight: this.props.defaultHeight || 0,
|
|
1913
|
-
scaledWidth: this.props.defaultWidth || 0,
|
|
1914
|
-
width: this.props.defaultWidth || 0
|
|
1915
|
-
}, this._autoSizer = null, this._detectElementResize = null, this._parentNode = null, this._resizeObserver = null, this._timeoutId = null, this._onResize = () => {
|
|
1916
|
-
this._timeoutId = null;
|
|
1917
|
-
const {
|
|
1918
|
-
disableHeight: a,
|
|
1919
|
-
disableWidth: c,
|
|
1920
|
-
onResize: u
|
|
1921
|
-
} = this.props;
|
|
1922
|
-
if (this._parentNode) {
|
|
1923
|
-
var I, m, o, y;
|
|
1924
|
-
const E = window.getComputedStyle(this._parentNode) || {}, _ = parseFloat((I = E.paddingLeft) !== null && I !== void 0 ? I : "0"), S = parseFloat((m = E.paddingRight) !== null && m !== void 0 ? m : "0"), x = parseFloat((o = E.paddingTop) !== null && o !== void 0 ? o : "0"), T = parseFloat((y = E.paddingBottom) !== null && y !== void 0 ? y : "0"), N = this._parentNode.getBoundingClientRect(), h = N.height - x - T, M = N.width - _ - S, w = this._parentNode.offsetHeight - x - T, A = this._parentNode.offsetWidth - _ - S;
|
|
1925
|
-
(!a && (this.state.height !== w || this.state.scaledHeight !== h) || !c && (this.state.width !== A || this.state.scaledWidth !== M)) && (this.setState({
|
|
1926
|
-
height: w,
|
|
1927
|
-
width: A,
|
|
1928
|
-
scaledHeight: h,
|
|
1929
|
-
scaledWidth: M
|
|
1930
|
-
}), typeof u == "function" && u({
|
|
1931
|
-
height: w,
|
|
1932
|
-
scaledHeight: h,
|
|
1933
|
-
scaledWidth: M,
|
|
1934
|
-
width: A
|
|
1935
|
-
}));
|
|
1936
|
-
}
|
|
1937
|
-
}, this._setRef = (a) => {
|
|
1938
|
-
this._autoSizer = a;
|
|
1939
|
-
};
|
|
1940
|
-
}
|
|
1941
|
-
componentDidMount() {
|
|
1942
|
-
const {
|
|
1943
|
-
nonce: n
|
|
1944
|
-
} = this.props;
|
|
1945
|
-
this._autoSizer && this._autoSizer.parentNode && this._autoSizer.parentNode.ownerDocument && this._autoSizer.parentNode.ownerDocument.defaultView && this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement && (this._parentNode = this._autoSizer.parentNode, this._parentNode != null && (typeof ResizeObserver < "u" ? (this._resizeObserver = new ResizeObserver(() => {
|
|
1946
|
-
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1947
|
-
}), this._resizeObserver.observe(this._parentNode)) : (this._detectElementResize = Gi(n), this._detectElementResize.addResizeListener(this._parentNode, this._onResize)), this._onResize()));
|
|
1948
|
-
}
|
|
1949
|
-
componentWillUnmount() {
|
|
1950
|
-
this._parentNode && (this._detectElementResize && this._detectElementResize.removeResizeListener(this._parentNode, this._onResize), this._timeoutId !== null && clearTimeout(this._timeoutId), this._resizeObserver && (this._resizeObserver.observe(this._parentNode), this._resizeObserver.disconnect()));
|
|
1951
|
-
}
|
|
1952
|
-
render() {
|
|
1953
|
-
const {
|
|
1954
|
-
children: n,
|
|
1955
|
-
defaultHeight: a,
|
|
1956
|
-
defaultWidth: c,
|
|
1957
|
-
disableHeight: u = !1,
|
|
1958
|
-
disableWidth: I = !1,
|
|
1959
|
-
nonce: m,
|
|
1960
|
-
onResize: o,
|
|
1961
|
-
style: y = {},
|
|
1962
|
-
tagName: E = "div",
|
|
1963
|
-
..._
|
|
1964
|
-
} = this.props, {
|
|
1965
|
-
height: S,
|
|
1966
|
-
scaledHeight: x,
|
|
1967
|
-
scaledWidth: T,
|
|
1968
|
-
width: N
|
|
1969
|
-
} = this.state, h = {
|
|
1970
|
-
overflow: "visible"
|
|
1971
|
-
}, M = {};
|
|
1972
|
-
let w = !1;
|
|
1973
|
-
return u || (S === 0 && (w = !0), h.height = 0, M.height = S, M.scaledHeight = x), I || (N === 0 && (w = !0), h.width = 0, M.width = N, M.scaledWidth = T), ze(E, {
|
|
1974
|
-
ref: this._setRef,
|
|
1975
|
-
style: {
|
|
1976
|
-
...h,
|
|
1977
|
-
...y
|
|
1978
|
-
},
|
|
1979
|
-
..._
|
|
1980
|
-
}, !w && n(M));
|
|
1981
|
-
}
|
|
1982
|
-
}
|
|
1983
|
-
function Ke() {
|
|
1984
|
-
return Ke = Object.assign ? Object.assign.bind() : function(i) {
|
|
1985
|
-
for (var n = 1; n < arguments.length; n++) {
|
|
1986
|
-
var a = arguments[n];
|
|
1987
|
-
for (var c in a)
|
|
1988
|
-
Object.prototype.hasOwnProperty.call(a, c) && (i[c] = a[c]);
|
|
1989
|
-
}
|
|
1990
|
-
return i;
|
|
1991
|
-
}, Ke.apply(this, arguments);
|
|
1992
|
-
}
|
|
1993
|
-
function mt(i) {
|
|
1994
|
-
if (i === void 0)
|
|
1995
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1996
|
-
return i;
|
|
1997
|
-
}
|
|
1998
|
-
function Xe(i, n) {
|
|
1999
|
-
return Xe = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(c, u) {
|
|
2000
|
-
return c.__proto__ = u, c;
|
|
2001
|
-
}, Xe(i, n);
|
|
2002
|
-
}
|
|
2003
|
-
function Ji(i, n) {
|
|
2004
|
-
i.prototype = Object.create(n.prototype), i.prototype.constructor = i, Xe(i, n);
|
|
2005
|
-
}
|
|
2006
|
-
var gt = Number.isNaN || function(n) {
|
|
2007
|
-
return typeof n == "number" && n !== n;
|
|
2008
|
-
};
|
|
2009
|
-
function Ki(i, n) {
|
|
2010
|
-
return !!(i === n || gt(i) && gt(n));
|
|
2011
|
-
}
|
|
2012
|
-
function Xi(i, n) {
|
|
2013
|
-
if (i.length !== n.length)
|
|
2014
|
-
return !1;
|
|
2015
|
-
for (var a = 0; a < i.length; a++)
|
|
2016
|
-
if (!Ki(i[a], n[a]))
|
|
2017
|
-
return !1;
|
|
2018
|
-
return !0;
|
|
2019
|
-
}
|
|
2020
|
-
function Pe(i, n) {
|
|
2021
|
-
n === void 0 && (n = Xi);
|
|
2022
|
-
var a, c = [], u, I = !1;
|
|
2023
|
-
function m() {
|
|
2024
|
-
for (var o = [], y = 0; y < arguments.length; y++)
|
|
2025
|
-
o[y] = arguments[y];
|
|
2026
|
-
return I && a === this && n(o, c) || (u = i.apply(this, o), I = !0, a = this, c = o), u;
|
|
2027
|
-
}
|
|
2028
|
-
return m;
|
|
2029
|
-
}
|
|
2030
|
-
var en = typeof performance == "object" && typeof performance.now == "function", It = en ? function() {
|
|
2031
|
-
return performance.now();
|
|
2032
|
-
} : function() {
|
|
2033
|
-
return Date.now();
|
|
2034
|
-
};
|
|
2035
|
-
function yt(i) {
|
|
2036
|
-
cancelAnimationFrame(i.id);
|
|
2037
|
-
}
|
|
2038
|
-
function tn(i, n) {
|
|
2039
|
-
var a = It();
|
|
2040
|
-
function c() {
|
|
2041
|
-
It() - a >= n ? i.call(null) : u.id = requestAnimationFrame(c);
|
|
2042
|
-
}
|
|
2043
|
-
var u = {
|
|
2044
|
-
id: requestAnimationFrame(c)
|
|
2045
|
-
};
|
|
2046
|
-
return u;
|
|
2047
|
-
}
|
|
2048
|
-
var qe = -1;
|
|
2049
|
-
function xt(i) {
|
|
2050
|
-
if (i === void 0 && (i = !1), qe === -1 || i) {
|
|
2051
|
-
var n = document.createElement("div"), a = n.style;
|
|
2052
|
-
a.width = "50px", a.height = "50px", a.overflow = "scroll", document.body.appendChild(n), qe = n.offsetWidth - n.clientWidth, document.body.removeChild(n);
|
|
2053
|
-
}
|
|
2054
|
-
return qe;
|
|
2055
|
-
}
|
|
2056
|
-
var ce = null;
|
|
2057
|
-
function wt(i) {
|
|
2058
|
-
if (i === void 0 && (i = !1), ce === null || i) {
|
|
2059
|
-
var n = document.createElement("div"), a = n.style;
|
|
2060
|
-
a.width = "50px", a.height = "50px", a.overflow = "scroll", a.direction = "rtl";
|
|
2061
|
-
var c = document.createElement("div"), u = c.style;
|
|
2062
|
-
return u.width = "100px", u.height = "100px", n.appendChild(c), document.body.appendChild(n), n.scrollLeft > 0 ? ce = "positive-descending" : (n.scrollLeft = 1, n.scrollLeft === 0 ? ce = "negative" : ce = "positive-ascending"), document.body.removeChild(n), ce;
|
|
2063
|
-
}
|
|
2064
|
-
return ce;
|
|
2065
|
-
}
|
|
2066
|
-
var rn = 150, nn = function(n, a) {
|
|
2067
|
-
return n;
|
|
2068
|
-
};
|
|
2069
|
-
function sn(i) {
|
|
2070
|
-
var n, a = i.getItemOffset, c = i.getEstimatedTotalSize, u = i.getItemSize, I = i.getOffsetForIndexAndAlignment, m = i.getStartIndexForOffset, o = i.getStopIndexForStartIndex, y = i.initInstanceProps, E = i.shouldResetStyleCacheOnItemSizeChange, _ = i.validateProps;
|
|
2071
|
-
return n = /* @__PURE__ */ function(S) {
|
|
2072
|
-
Ji(x, S);
|
|
2073
|
-
function x(N) {
|
|
2074
|
-
var h;
|
|
2075
|
-
return h = S.call(this, N) || this, h._instanceProps = y(h.props, mt(h)), h._outerRef = void 0, h._resetIsScrollingTimeoutId = null, h.state = {
|
|
2076
|
-
instance: mt(h),
|
|
2077
|
-
isScrolling: !1,
|
|
2078
|
-
scrollDirection: "forward",
|
|
2079
|
-
scrollOffset: typeof h.props.initialScrollOffset == "number" ? h.props.initialScrollOffset : 0,
|
|
2080
|
-
scrollUpdateWasRequested: !1
|
|
2081
|
-
}, h._callOnItemsRendered = void 0, h._callOnItemsRendered = Pe(function(M, w, A, z) {
|
|
2082
|
-
return h.props.onItemsRendered({
|
|
2083
|
-
overscanStartIndex: M,
|
|
2084
|
-
overscanStopIndex: w,
|
|
2085
|
-
visibleStartIndex: A,
|
|
2086
|
-
visibleStopIndex: z
|
|
2087
|
-
});
|
|
2088
|
-
}), h._callOnScroll = void 0, h._callOnScroll = Pe(function(M, w, A) {
|
|
2089
|
-
return h.props.onScroll({
|
|
2090
|
-
scrollDirection: M,
|
|
2091
|
-
scrollOffset: w,
|
|
2092
|
-
scrollUpdateWasRequested: A
|
|
2093
|
-
});
|
|
2094
|
-
}), h._getItemStyle = void 0, h._getItemStyle = function(M) {
|
|
2095
|
-
var w = h.props, A = w.direction, z = w.itemSize, O = w.layout, D = h._getItemStyleCache(E && z, E && O, E && A), L;
|
|
2096
|
-
if (D.hasOwnProperty(M))
|
|
2097
|
-
L = D[M];
|
|
2098
|
-
else {
|
|
2099
|
-
var j = a(h.props, M, h._instanceProps), W = u(h.props, M, h._instanceProps), V = A === "horizontal" || O === "horizontal", ne = A === "rtl", se = V ? j : 0;
|
|
2100
|
-
D[M] = L = {
|
|
2101
|
-
position: "absolute",
|
|
2102
|
-
left: ne ? void 0 : se,
|
|
2103
|
-
right: ne ? se : void 0,
|
|
2104
|
-
top: V ? 0 : j,
|
|
2105
|
-
height: V ? "100%" : W,
|
|
2106
|
-
width: V ? W : "100%"
|
|
2107
|
-
};
|
|
2108
|
-
}
|
|
2109
|
-
return L;
|
|
2110
|
-
}, h._getItemStyleCache = void 0, h._getItemStyleCache = Pe(function(M, w, A) {
|
|
2111
|
-
return {};
|
|
2112
|
-
}), h._onScrollHorizontal = function(M) {
|
|
2113
|
-
var w = M.currentTarget, A = w.clientWidth, z = w.scrollLeft, O = w.scrollWidth;
|
|
2114
|
-
h.setState(function(D) {
|
|
2115
|
-
if (D.scrollOffset === z)
|
|
2116
|
-
return null;
|
|
2117
|
-
var L = h.props.direction, j = z;
|
|
2118
|
-
if (L === "rtl")
|
|
2119
|
-
switch (wt()) {
|
|
2120
|
-
case "negative":
|
|
2121
|
-
j = -z;
|
|
2122
|
-
break;
|
|
2123
|
-
case "positive-descending":
|
|
2124
|
-
j = O - A - z;
|
|
2125
|
-
break;
|
|
2126
|
-
}
|
|
2127
|
-
return j = Math.max(0, Math.min(j, O - A)), {
|
|
2128
|
-
isScrolling: !0,
|
|
2129
|
-
scrollDirection: D.scrollOffset < z ? "forward" : "backward",
|
|
2130
|
-
scrollOffset: j,
|
|
2131
|
-
scrollUpdateWasRequested: !1
|
|
2132
|
-
};
|
|
2133
|
-
}, h._resetIsScrollingDebounced);
|
|
2134
|
-
}, h._onScrollVertical = function(M) {
|
|
2135
|
-
var w = M.currentTarget, A = w.clientHeight, z = w.scrollHeight, O = w.scrollTop;
|
|
2136
|
-
h.setState(function(D) {
|
|
2137
|
-
if (D.scrollOffset === O)
|
|
2138
|
-
return null;
|
|
2139
|
-
var L = Math.max(0, Math.min(O, z - A));
|
|
2140
|
-
return {
|
|
2141
|
-
isScrolling: !0,
|
|
2142
|
-
scrollDirection: D.scrollOffset < L ? "forward" : "backward",
|
|
2143
|
-
scrollOffset: L,
|
|
2144
|
-
scrollUpdateWasRequested: !1
|
|
2145
|
-
};
|
|
2146
|
-
}, h._resetIsScrollingDebounced);
|
|
2147
|
-
}, h._outerRefSetter = function(M) {
|
|
2148
|
-
var w = h.props.outerRef;
|
|
2149
|
-
h._outerRef = M, typeof w == "function" ? w(M) : w != null && typeof w == "object" && w.hasOwnProperty("current") && (w.current = M);
|
|
2150
|
-
}, h._resetIsScrollingDebounced = function() {
|
|
2151
|
-
h._resetIsScrollingTimeoutId !== null && yt(h._resetIsScrollingTimeoutId), h._resetIsScrollingTimeoutId = tn(h._resetIsScrolling, rn);
|
|
2152
|
-
}, h._resetIsScrolling = function() {
|
|
2153
|
-
h._resetIsScrollingTimeoutId = null, h.setState({
|
|
2154
|
-
isScrolling: !1
|
|
2155
|
-
}, function() {
|
|
2156
|
-
h._getItemStyleCache(-1, null);
|
|
2157
|
-
});
|
|
2158
|
-
}, h;
|
|
2159
|
-
}
|
|
2160
|
-
x.getDerivedStateFromProps = function(h, M) {
|
|
2161
|
-
return on(h, M), _(h), null;
|
|
2162
|
-
};
|
|
2163
|
-
var T = x.prototype;
|
|
2164
|
-
return T.scrollTo = function(h) {
|
|
2165
|
-
h = Math.max(0, h), this.setState(function(M) {
|
|
2166
|
-
return M.scrollOffset === h ? null : {
|
|
2167
|
-
scrollDirection: M.scrollOffset < h ? "forward" : "backward",
|
|
2168
|
-
scrollOffset: h,
|
|
2169
|
-
scrollUpdateWasRequested: !0
|
|
2170
|
-
};
|
|
2171
|
-
}, this._resetIsScrollingDebounced);
|
|
2172
|
-
}, T.scrollToItem = function(h, M) {
|
|
2173
|
-
M === void 0 && (M = "auto");
|
|
2174
|
-
var w = this.props, A = w.itemCount, z = w.layout, O = this.state.scrollOffset;
|
|
2175
|
-
h = Math.max(0, Math.min(h, A - 1));
|
|
2176
|
-
var D = 0;
|
|
2177
|
-
if (this._outerRef) {
|
|
2178
|
-
var L = this._outerRef;
|
|
2179
|
-
z === "vertical" ? D = L.scrollWidth > L.clientWidth ? xt() : 0 : D = L.scrollHeight > L.clientHeight ? xt() : 0;
|
|
2180
|
-
}
|
|
2181
|
-
this.scrollTo(I(this.props, h, M, O, this._instanceProps, D));
|
|
2182
|
-
}, T.componentDidMount = function() {
|
|
2183
|
-
var h = this.props, M = h.direction, w = h.initialScrollOffset, A = h.layout;
|
|
2184
|
-
if (typeof w == "number" && this._outerRef != null) {
|
|
2185
|
-
var z = this._outerRef;
|
|
2186
|
-
M === "horizontal" || A === "horizontal" ? z.scrollLeft = w : z.scrollTop = w;
|
|
2187
|
-
}
|
|
2188
|
-
this._callPropsCallbacks();
|
|
2189
|
-
}, T.componentDidUpdate = function() {
|
|
2190
|
-
var h = this.props, M = h.direction, w = h.layout, A = this.state, z = A.scrollOffset, O = A.scrollUpdateWasRequested;
|
|
2191
|
-
if (O && this._outerRef != null) {
|
|
2192
|
-
var D = this._outerRef;
|
|
2193
|
-
if (M === "horizontal" || w === "horizontal")
|
|
2194
|
-
if (M === "rtl")
|
|
2195
|
-
switch (wt()) {
|
|
2196
|
-
case "negative":
|
|
2197
|
-
D.scrollLeft = -z;
|
|
2198
|
-
break;
|
|
2199
|
-
case "positive-ascending":
|
|
2200
|
-
D.scrollLeft = z;
|
|
2201
|
-
break;
|
|
2202
|
-
default:
|
|
2203
|
-
var L = D.clientWidth, j = D.scrollWidth;
|
|
2204
|
-
D.scrollLeft = j - L - z;
|
|
2205
|
-
break;
|
|
2206
|
-
}
|
|
2207
|
-
else
|
|
2208
|
-
D.scrollLeft = z;
|
|
2209
|
-
else
|
|
2210
|
-
D.scrollTop = z;
|
|
2211
|
-
}
|
|
2212
|
-
this._callPropsCallbacks();
|
|
2213
|
-
}, T.componentWillUnmount = function() {
|
|
2214
|
-
this._resetIsScrollingTimeoutId !== null && yt(this._resetIsScrollingTimeoutId);
|
|
2215
|
-
}, T.render = function() {
|
|
2216
|
-
var h = this.props, M = h.children, w = h.className, A = h.direction, z = h.height, O = h.innerRef, D = h.innerElementType, L = h.innerTagName, j = h.itemCount, W = h.itemData, V = h.itemKey, ne = V === void 0 ? nn : V, se = h.layout, Oe = h.outerElementType, Ce = h.outerTagName, Me = h.style, Ae = h.useIsScrolling, Le = h.width, Ee = this.state.isScrolling, pe = A === "horizontal" || se === "horizontal", ke = pe ? this._onScrollHorizontal : this._onScrollVertical, Te = this._getRangeToRender(), F = Te[0], $ = Te[1], fe = [];
|
|
2217
|
-
if (j > 0)
|
|
2218
|
-
for (var ee = F; ee <= $; ee++)
|
|
2219
|
-
fe.push(ze(M, {
|
|
2220
|
-
data: W,
|
|
2221
|
-
key: ne(ee, W),
|
|
2222
|
-
index: ee,
|
|
2223
|
-
isScrolling: Ae ? Ee : void 0,
|
|
2224
|
-
style: this._getItemStyle(ee)
|
|
2225
|
-
}));
|
|
2226
|
-
var me = c(this.props, this._instanceProps);
|
|
2227
|
-
return ze(Oe || Ce || "div", {
|
|
2228
|
-
className: w,
|
|
2229
|
-
onScroll: ke,
|
|
2230
|
-
ref: this._outerRefSetter,
|
|
2231
|
-
style: Ke({
|
|
2232
|
-
position: "relative",
|
|
2233
|
-
height: z,
|
|
2234
|
-
width: Le,
|
|
2235
|
-
overflow: "auto",
|
|
2236
|
-
WebkitOverflowScrolling: "touch",
|
|
2237
|
-
willChange: "transform",
|
|
2238
|
-
direction: A
|
|
2239
|
-
}, Me)
|
|
2240
|
-
}, ze(D || L || "div", {
|
|
2241
|
-
children: fe,
|
|
2242
|
-
ref: O,
|
|
2243
|
-
style: {
|
|
2244
|
-
height: pe ? "100%" : me,
|
|
2245
|
-
pointerEvents: Ee ? "none" : void 0,
|
|
2246
|
-
width: pe ? me : "100%"
|
|
2247
|
-
}
|
|
2248
|
-
}));
|
|
2249
|
-
}, T._callPropsCallbacks = function() {
|
|
2250
|
-
if (typeof this.props.onItemsRendered == "function") {
|
|
2251
|
-
var h = this.props.itemCount;
|
|
2252
|
-
if (h > 0) {
|
|
2253
|
-
var M = this._getRangeToRender(), w = M[0], A = M[1], z = M[2], O = M[3];
|
|
2254
|
-
this._callOnItemsRendered(w, A, z, O);
|
|
2255
|
-
}
|
|
2256
|
-
}
|
|
2257
|
-
if (typeof this.props.onScroll == "function") {
|
|
2258
|
-
var D = this.state, L = D.scrollDirection, j = D.scrollOffset, W = D.scrollUpdateWasRequested;
|
|
2259
|
-
this._callOnScroll(L, j, W);
|
|
2260
|
-
}
|
|
2261
|
-
}, T._getRangeToRender = function() {
|
|
2262
|
-
var h = this.props, M = h.itemCount, w = h.overscanCount, A = this.state, z = A.isScrolling, O = A.scrollDirection, D = A.scrollOffset;
|
|
2263
|
-
if (M === 0)
|
|
2264
|
-
return [0, 0, 0, 0];
|
|
2265
|
-
var L = m(this.props, D, this._instanceProps), j = o(this.props, L, D, this._instanceProps), W = !z || O === "backward" ? Math.max(1, w) : 1, V = !z || O === "forward" ? Math.max(1, w) : 1;
|
|
2266
|
-
return [Math.max(0, L - W), Math.max(0, Math.min(M - 1, j + V)), L, j];
|
|
2267
|
-
}, x;
|
|
2268
|
-
}(vt), n.defaultProps = {
|
|
2269
|
-
direction: "ltr",
|
|
2270
|
-
itemData: void 0,
|
|
2271
|
-
layout: "vertical",
|
|
2272
|
-
overscanCount: 2,
|
|
2273
|
-
useIsScrolling: !1
|
|
2274
|
-
}, n;
|
|
2275
|
-
}
|
|
2276
|
-
var on = function(n, a) {
|
|
2277
|
-
n.children, n.direction, n.height, n.layout, n.innerTagName, n.outerTagName, n.width, a.instance;
|
|
2278
|
-
}, an = /* @__PURE__ */ sn({
|
|
2279
|
-
getItemOffset: function(n, a) {
|
|
2280
|
-
var c = n.itemSize;
|
|
2281
|
-
return a * c;
|
|
2282
|
-
},
|
|
2283
|
-
getItemSize: function(n, a) {
|
|
2284
|
-
var c = n.itemSize;
|
|
2285
|
-
return c;
|
|
2286
|
-
},
|
|
2287
|
-
getEstimatedTotalSize: function(n) {
|
|
2288
|
-
var a = n.itemCount, c = n.itemSize;
|
|
2289
|
-
return c * a;
|
|
2290
|
-
},
|
|
2291
|
-
getOffsetForIndexAndAlignment: function(n, a, c, u, I, m) {
|
|
2292
|
-
var o = n.direction, y = n.height, E = n.itemCount, _ = n.itemSize, S = n.layout, x = n.width, T = o === "horizontal" || S === "horizontal", N = T ? x : y, h = Math.max(0, E * _ - N), M = Math.min(h, a * _), w = Math.max(0, a * _ - N + _ + m);
|
|
2293
|
-
switch (c === "smart" && (u >= w - N && u <= M + N ? c = "auto" : c = "center"), c) {
|
|
2294
|
-
case "start":
|
|
2295
|
-
return M;
|
|
2296
|
-
case "end":
|
|
2297
|
-
return w;
|
|
2298
|
-
case "center": {
|
|
2299
|
-
var A = Math.round(w + (M - w) / 2);
|
|
2300
|
-
return A < Math.ceil(N / 2) ? 0 : A > h + Math.floor(N / 2) ? h : A;
|
|
2301
|
-
}
|
|
2302
|
-
case "auto":
|
|
2303
|
-
default:
|
|
2304
|
-
return u >= w && u <= M ? u : u < w ? w : M;
|
|
2305
|
-
}
|
|
2306
|
-
},
|
|
2307
|
-
getStartIndexForOffset: function(n, a) {
|
|
2308
|
-
var c = n.itemCount, u = n.itemSize;
|
|
2309
|
-
return Math.max(0, Math.min(c - 1, Math.floor(a / u)));
|
|
2310
|
-
},
|
|
2311
|
-
getStopIndexForStartIndex: function(n, a, c) {
|
|
2312
|
-
var u = n.direction, I = n.height, m = n.itemCount, o = n.itemSize, y = n.layout, E = n.width, _ = u === "horizontal" || y === "horizontal", S = a * o, x = _ ? E : I, T = Math.ceil((x + c - S) / o);
|
|
2313
|
-
return Math.max(0, Math.min(
|
|
2314
|
-
m - 1,
|
|
2315
|
-
a + T - 1
|
|
2316
|
-
// -1 is because stop index is inclusive
|
|
2317
|
-
));
|
|
2318
|
-
},
|
|
2319
|
-
initInstanceProps: function(n) {
|
|
2320
|
-
},
|
|
2321
|
-
shouldResetStyleCacheOnItemSizeChange: !0,
|
|
2322
|
-
validateProps: function(n) {
|
|
2323
|
-
n.itemSize;
|
|
2324
|
-
}
|
|
2325
|
-
});
|
|
2326
|
-
function ln(i) {
|
|
2327
|
-
var n = i.lastRenderedStartIndex, a = i.lastRenderedStopIndex, c = i.startIndex, u = i.stopIndex;
|
|
2328
|
-
return !(c > a || u < n);
|
|
2329
|
-
}
|
|
2330
|
-
function cn(i) {
|
|
2331
|
-
for (var n = i.isItemLoaded, a = i.itemCount, c = i.minimumBatchSize, u = i.startIndex, I = i.stopIndex, m = [], o = null, y = null, E = u; E <= I; E++) {
|
|
2332
|
-
var _ = n(E);
|
|
2333
|
-
_ ? y !== null && (m.push(o, y), o = y = null) : (y = E, o === null && (o = E));
|
|
2334
|
-
}
|
|
2335
|
-
if (y !== null) {
|
|
2336
|
-
for (var S = Math.min(Math.max(y, o + c - 1), a - 1), x = y + 1; x <= S && !n(x); x++)
|
|
2337
|
-
y = x;
|
|
2338
|
-
m.push(o, y);
|
|
2339
|
-
}
|
|
2340
|
-
if (m.length)
|
|
2341
|
-
for (; m[1] - m[0] + 1 < c && m[0] > 0; ) {
|
|
2342
|
-
var T = m[0] - 1;
|
|
2343
|
-
if (!n(T))
|
|
2344
|
-
m[0] = T;
|
|
2345
|
-
else
|
|
2346
|
-
break;
|
|
2347
|
-
}
|
|
2348
|
-
return m;
|
|
2349
|
-
}
|
|
2350
|
-
var un = function(i, n) {
|
|
2351
|
-
if (!(i instanceof n))
|
|
2352
|
-
throw new TypeError("Cannot call a class as a function");
|
|
2353
|
-
}, dn = function() {
|
|
2354
|
-
function i(n, a) {
|
|
2355
|
-
for (var c = 0; c < a.length; c++) {
|
|
2356
|
-
var u = a[c];
|
|
2357
|
-
u.enumerable = u.enumerable || !1, u.configurable = !0, "value" in u && (u.writable = !0), Object.defineProperty(n, u.key, u);
|
|
2358
|
-
}
|
|
2359
|
-
}
|
|
2360
|
-
return function(n, a, c) {
|
|
2361
|
-
return a && i(n.prototype, a), c && i(n, c), n;
|
|
2362
|
-
};
|
|
2363
|
-
}(), hn = function(i, n) {
|
|
2364
|
-
if (typeof n != "function" && n !== null)
|
|
2365
|
-
throw new TypeError("Super expression must either be null or a function, not " + typeof n);
|
|
2366
|
-
i.prototype = Object.create(n && n.prototype, {
|
|
2367
|
-
constructor: {
|
|
2368
|
-
value: i,
|
|
2369
|
-
enumerable: !1,
|
|
2370
|
-
writable: !0,
|
|
2371
|
-
configurable: !0
|
|
2372
|
-
}
|
|
2373
|
-
}), n && (Object.setPrototypeOf ? Object.setPrototypeOf(i, n) : i.__proto__ = n);
|
|
2374
|
-
}, Mt = function(i, n) {
|
|
2375
|
-
if (!i)
|
|
2376
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2377
|
-
return n && (typeof n == "object" || typeof n == "function") ? n : i;
|
|
2378
|
-
}, pn = function(i) {
|
|
2379
|
-
hn(n, i);
|
|
2380
|
-
function n() {
|
|
2381
|
-
var a, c, u, I;
|
|
2382
|
-
un(this, n);
|
|
2383
|
-
for (var m = arguments.length, o = Array(m), y = 0; y < m; y++)
|
|
2384
|
-
o[y] = arguments[y];
|
|
2385
|
-
return I = (c = (u = Mt(this, (a = n.__proto__ || Object.getPrototypeOf(n)).call.apply(a, [this].concat(o))), u), u._lastRenderedStartIndex = -1, u._lastRenderedStopIndex = -1, u._memoizedUnloadedRanges = [], u._onItemsRendered = function(E) {
|
|
2386
|
-
var _ = E.visibleStartIndex, S = E.visibleStopIndex;
|
|
2387
|
-
u._lastRenderedStartIndex = _, u._lastRenderedStopIndex = S, u._ensureRowsLoaded(_, S);
|
|
2388
|
-
}, u._setRef = function(E) {
|
|
2389
|
-
u._listRef = E;
|
|
2390
|
-
}, c), Mt(u, I);
|
|
2391
|
-
}
|
|
2392
|
-
return dn(n, [{
|
|
2393
|
-
key: "resetloadMoreItemsCache",
|
|
2394
|
-
value: function() {
|
|
2395
|
-
var c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
2396
|
-
this._memoizedUnloadedRanges = [], c && this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
|
|
2397
|
-
}
|
|
2398
|
-
}, {
|
|
2399
|
-
key: "componentDidMount",
|
|
2400
|
-
value: function() {
|
|
2401
|
-
}
|
|
2402
|
-
}, {
|
|
2403
|
-
key: "render",
|
|
2404
|
-
value: function() {
|
|
2405
|
-
var c = this.props.children;
|
|
2406
|
-
return c({
|
|
2407
|
-
onItemsRendered: this._onItemsRendered,
|
|
2408
|
-
ref: this._setRef
|
|
2409
|
-
});
|
|
2410
|
-
}
|
|
2411
|
-
}, {
|
|
2412
|
-
key: "_ensureRowsLoaded",
|
|
2413
|
-
value: function(c, u) {
|
|
2414
|
-
var I = this.props, m = I.isItemLoaded, o = I.itemCount, y = I.minimumBatchSize, E = y === void 0 ? 10 : y, _ = I.threshold, S = _ === void 0 ? 15 : _, x = cn({
|
|
2415
|
-
isItemLoaded: m,
|
|
2416
|
-
itemCount: o,
|
|
2417
|
-
minimumBatchSize: E,
|
|
2418
|
-
startIndex: Math.max(0, c - S),
|
|
2419
|
-
stopIndex: Math.min(o - 1, u + S)
|
|
2420
|
-
});
|
|
2421
|
-
(this._memoizedUnloadedRanges.length !== x.length || this._memoizedUnloadedRanges.some(function(T, N) {
|
|
2422
|
-
return x[N] !== T;
|
|
2423
|
-
})) && (this._memoizedUnloadedRanges = x, this._loadUnloadedRanges(x));
|
|
2424
|
-
}
|
|
2425
|
-
}, {
|
|
2426
|
-
key: "_loadUnloadedRanges",
|
|
2427
|
-
value: function(c) {
|
|
2428
|
-
for (var u = this, I = this.props.loadMoreItems || this.props.loadMoreRows, m = function(E) {
|
|
2429
|
-
var _ = c[E], S = c[E + 1], x = I(_, S);
|
|
2430
|
-
x != null && x.then(function() {
|
|
2431
|
-
if (ln({
|
|
2432
|
-
lastRenderedStartIndex: u._lastRenderedStartIndex,
|
|
2433
|
-
lastRenderedStopIndex: u._lastRenderedStopIndex,
|
|
2434
|
-
startIndex: _,
|
|
2435
|
-
stopIndex: S
|
|
2436
|
-
})) {
|
|
2437
|
-
if (u._listRef == null)
|
|
2438
|
-
return;
|
|
2439
|
-
typeof u._listRef.resetAfterIndex == "function" ? u._listRef.resetAfterIndex(_, !0) : (typeof u._listRef._getItemStyleCache == "function" && u._listRef._getItemStyleCache(-1), u._listRef.forceUpdate());
|
|
2440
|
-
}
|
|
2441
|
-
});
|
|
2442
|
-
}, o = 0; o < c.length; o += 2)
|
|
2443
|
-
m(o);
|
|
2444
|
-
}
|
|
2445
|
-
}]), n;
|
|
2446
|
-
}(vt);
|
|
2447
|
-
const fn = () => Q, mn = /* @__PURE__ */ g("div")({
|
|
2448
|
-
name: "a",
|
|
2449
|
-
class: "a1w9zony",
|
|
2450
|
-
propsAsIs: !1
|
|
2451
|
-
}), gn = /* @__PURE__ */ g("div")({
|
|
2452
|
-
name: "l",
|
|
2453
|
-
class: "l16qcfv8",
|
|
2454
|
-
propsAsIs: !1
|
|
2455
|
-
}), In = /* @__PURE__ */ g("img")({
|
|
2456
|
-
name: "p",
|
|
2457
|
-
class: "p1gmcc5f",
|
|
2458
|
-
propsAsIs: !1
|
|
2459
|
-
}), yn = /* @__PURE__ */ g("div")({
|
|
2460
|
-
name: "s",
|
|
2461
|
-
class: "s1doddh0",
|
|
2462
|
-
propsAsIs: !1
|
|
2463
|
-
}), xn = /* @__PURE__ */ g("div")({
|
|
2464
|
-
name: "c",
|
|
2465
|
-
class: "c1js9xhe",
|
|
2466
|
-
propsAsIs: !1
|
|
2467
|
-
}), wn = /* @__PURE__ */ g("div")({
|
|
2468
|
-
name: "d",
|
|
2469
|
-
class: "d1tmnqsh",
|
|
2470
|
-
propsAsIs: !1
|
|
2471
|
-
}), Mn = /* @__PURE__ */ g("span")({
|
|
2472
|
-
name: "g",
|
|
2473
|
-
class: "gi9h87j",
|
|
2474
|
-
propsAsIs: !1
|
|
2475
|
-
}), An = /* @__PURE__ */ g(fn())({
|
|
2476
|
-
name: "x",
|
|
2477
|
-
class: "x13mk3z6",
|
|
2478
|
-
propsAsIs: !0
|
|
2479
|
-
}), En = ({
|
|
2480
|
-
rank: i,
|
|
2481
|
-
avatar: n,
|
|
2482
|
-
name: a,
|
|
2483
|
-
points: c,
|
|
2484
|
-
isCurrentUser: u,
|
|
2485
|
-
openItemDetail: I,
|
|
2486
|
-
style: m
|
|
2487
|
-
}) => /* @__PURE__ */ v(mn, { onClick: I, style: m, children: [
|
|
2488
|
-
/* @__PURE__ */ p(gn, { children: i || 0 }),
|
|
2489
|
-
/* @__PURE__ */ v(xn, { children: [
|
|
2490
|
-
n ? /* @__PURE__ */ p(In, { alt: "leaderboard-item-avatar", src: n }) : /* @__PURE__ */ p(yn, { children: Nt(a || "") }),
|
|
2491
|
-
/* @__PURE__ */ v(wn, { children: [
|
|
2492
|
-
/* @__PURE__ */ p(Mn, { children: a || "" }),
|
|
2493
|
-
u && /* @__PURE__ */ p(An, { name: "icon-star" })
|
|
2494
|
-
] })
|
|
2495
|
-
] }),
|
|
2496
|
-
/* @__PURE__ */ p("div", { children: _t(c) })
|
|
2497
|
-
] }), Tn = ({
|
|
2498
|
-
items: i,
|
|
2499
|
-
currentUserId: n,
|
|
2500
|
-
openItemDetail: a,
|
|
2501
|
-
fetchMore: c
|
|
2502
|
-
}) => /* @__PURE__ */ p(Zi, { children: ({ width: u, height: I }) => /* @__PURE__ */ p(
|
|
2503
|
-
pn,
|
|
2504
|
-
{
|
|
2505
|
-
isItemLoaded: (m) => m < i.length,
|
|
2506
|
-
itemCount: i.length + 1,
|
|
2507
|
-
loadMoreItems: c,
|
|
2508
|
-
children: ({ onItemsRendered: m, ref: o }) => /* @__PURE__ */ p(
|
|
2509
|
-
an,
|
|
2510
|
-
{
|
|
2511
|
-
itemSize: 56,
|
|
2512
|
-
onItemsRendered: m,
|
|
2513
|
-
ref: o,
|
|
2514
|
-
itemCount: i.length,
|
|
2515
|
-
width: u,
|
|
2516
|
-
height: I,
|
|
2517
|
-
children: ({ index: y, style: E }) => /* @__PURE__ */ p(
|
|
2518
|
-
En,
|
|
2519
|
-
{
|
|
2520
|
-
style: { ...E, maxHeight: 48 },
|
|
2521
|
-
...i[y],
|
|
2522
|
-
openItemDetail: () => a(i[y].userId),
|
|
2523
|
-
isCurrentUser: !!n && n === i[y].userId
|
|
2524
|
-
},
|
|
2525
|
-
i[y].userId
|
|
2526
|
-
)
|
|
2527
|
-
}
|
|
2528
|
-
)
|
|
2529
|
-
}
|
|
2530
|
-
) });
|
|
2531
|
-
const vn = () => Q, Nn = () => Q, _n = /* @__PURE__ */ g("div")({
|
|
2532
|
-
name: "a",
|
|
2533
|
-
class: "ay8exst",
|
|
2534
|
-
propsAsIs: !1
|
|
2535
|
-
}), Sn = /* @__PURE__ */ g("div")({
|
|
2536
|
-
name: "l",
|
|
2537
|
-
class: "l31riw0",
|
|
2538
|
-
propsAsIs: !1
|
|
2539
|
-
}), zn = /* @__PURE__ */ g(vn())({
|
|
2540
|
-
name: "p",
|
|
2541
|
-
class: "pcmm4w7",
|
|
2542
|
-
propsAsIs: !0
|
|
2543
|
-
}), Dn = /* @__PURE__ */ g("div")({
|
|
2544
|
-
name: "c",
|
|
2545
|
-
class: "cct922a",
|
|
2546
|
-
propsAsIs: !1
|
|
2547
|
-
}), bn = /* @__PURE__ */ g("div")({
|
|
2548
|
-
name: "s",
|
|
2549
|
-
class: "s12b7u74",
|
|
2550
|
-
propsAsIs: !1
|
|
2551
|
-
}), On = /* @__PURE__ */ g("div")({
|
|
2552
|
-
name: "x",
|
|
2553
|
-
class: "x1896nrl",
|
|
2554
|
-
propsAsIs: !1
|
|
2555
|
-
}), Cn = /* @__PURE__ */ g("div")({
|
|
2556
|
-
name: "d",
|
|
2557
|
-
class: "d1vnagog",
|
|
2558
|
-
propsAsIs: !1
|
|
2559
|
-
}), Ln = /* @__PURE__ */ g("div")({
|
|
2560
|
-
name: "g",
|
|
2561
|
-
class: "gznzzc2",
|
|
2562
|
-
propsAsIs: !1
|
|
2563
|
-
}), kn = /* @__PURE__ */ g("span")({
|
|
2564
|
-
name: "f",
|
|
2565
|
-
class: "fnmvyxu",
|
|
2566
|
-
propsAsIs: !1
|
|
2567
|
-
}), Bn = /* @__PURE__ */ g("span")({
|
|
2568
|
-
name: "h",
|
|
2569
|
-
class: "h1iubd2g",
|
|
2570
|
-
propsAsIs: !1
|
|
2571
|
-
}), Rn = /* @__PURE__ */ g(Nn())({
|
|
2572
|
-
name: "m",
|
|
2573
|
-
class: "mmvjfuo",
|
|
2574
|
-
propsAsIs: !0
|
|
2575
|
-
}), Un = /* @__PURE__ */ g("div")({
|
|
2576
|
-
name: "v",
|
|
2577
|
-
class: "v1oi1553",
|
|
2578
|
-
propsAsIs: !1
|
|
2579
|
-
}), jn = /* @__PURE__ */ g("a")({
|
|
2580
|
-
name: "w",
|
|
2581
|
-
class: "w1vwcogq",
|
|
2582
|
-
propsAsIs: !1
|
|
2583
|
-
}), Fn = /* @__PURE__ */ g("span")({
|
|
2584
|
-
name: "u",
|
|
2585
|
-
class: "utbqo0e",
|
|
2586
|
-
propsAsIs: !1
|
|
2587
|
-
}), $n = ({
|
|
2588
|
-
inviteLink: i,
|
|
2589
|
-
socialLinks: n,
|
|
2590
|
-
inviteCardTitle: a,
|
|
2591
|
-
inviteCardSubtext: c,
|
|
2592
|
-
primaryColor: u,
|
|
2593
|
-
className: I
|
|
2594
|
-
}) => /* @__PURE__ */ v(_n, { className: I, children: [
|
|
2595
|
-
/* @__PURE__ */ p(Sn, { style: { backgroundColor: u }, children: /* @__PURE__ */ p(zn, { name: "invite-game-icon" }) }),
|
|
2596
|
-
/* @__PURE__ */ v(Dn, { children: [
|
|
2597
|
-
/* @__PURE__ */ p(bn, { children: a || "" }),
|
|
2598
|
-
/* @__PURE__ */ p(On, { children: c || "" })
|
|
2599
|
-
] }),
|
|
2600
|
-
i && /* @__PURE__ */ v(Cn, { onClick: async () => {
|
|
2601
|
-
if (i)
|
|
2602
|
-
try {
|
|
2603
|
-
await navigator.clipboard.writeText(i);
|
|
2604
|
-
} catch (m) {
|
|
2605
|
-
console.error("Unable to copy to clipboard", m);
|
|
2606
|
-
}
|
|
2607
|
-
}, children: [
|
|
2608
|
-
/* @__PURE__ */ v(Ln, { children: [
|
|
2609
|
-
/* @__PURE__ */ p(kn, { children: "Invite link" }),
|
|
2610
|
-
/* @__PURE__ */ p(Bn, { children: i })
|
|
2611
|
-
] }),
|
|
2612
|
-
/* @__PURE__ */ p(Rn, { name: "icon-copy" })
|
|
2613
|
-
] }),
|
|
2614
|
-
n && n.length > 0 && /* @__PURE__ */ p(Un, { children: n.map(({ icon: m, link: o, label: y }) => /* @__PURE__ */ v(jn, { href: o, target: "_blank", children: [
|
|
2615
|
-
/* @__PURE__ */ p(Q, { name: m }),
|
|
2616
|
-
/* @__PURE__ */ p(Fn, { children: y })
|
|
2617
|
-
] }, o)) })
|
|
2618
|
-
] }), Qn = ({ deepLink: i }) => {
|
|
2619
|
-
const { data: n } = re(i.$store);
|
|
2620
|
-
return /* @__PURE__ */ p(
|
|
2621
|
-
$n,
|
|
2622
|
-
{
|
|
2623
|
-
inviteLink: n == null ? void 0 : n.url,
|
|
2624
|
-
socialLinks: [
|
|
2625
|
-
{
|
|
2626
|
-
icon: "icon-facebook",
|
|
2627
|
-
link: "https://www.facebook.com/TheMasters",
|
|
2628
|
-
label: "Facebook"
|
|
2629
|
-
},
|
|
2630
|
-
{
|
|
2631
|
-
icon: "icon-twitter",
|
|
2632
|
-
link: "https://twitter.com/@TheMasters",
|
|
2633
|
-
label: "X"
|
|
2634
|
-
}
|
|
2635
|
-
],
|
|
2636
|
-
inviteCardTitle: "It’s more fun with friends",
|
|
2637
|
-
inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
|
|
2638
|
-
}
|
|
2639
|
-
);
|
|
2640
|
-
}, Pn = ({ gamification: i }) => {
|
|
2641
|
-
const { data: n } = re(i.leaderboardList.$store);
|
|
2642
|
-
return n != null && n.length ? /* @__PURE__ */ p(
|
|
2643
|
-
Tn,
|
|
2644
|
-
{
|
|
2645
|
-
fetchMore: i.leaderboardList.fetchMore,
|
|
2646
|
-
items: n,
|
|
2647
|
-
openItemDetail: i.openUser,
|
|
2648
|
-
currentUserId: i.currentUserId.get()
|
|
2649
|
-
}
|
|
2650
|
-
) : /* @__PURE__ */ p(Qn, { deepLink: i.deepLink });
|
|
2651
|
-
};
|
|
2652
|
-
const qn = /* @__PURE__ */ g("button")({
|
|
2653
|
-
name: "a",
|
|
2654
|
-
class: "akly9h2",
|
|
2655
|
-
propsAsIs: !1
|
|
2656
|
-
}), Yn = /* @__PURE__ */ g("span")({
|
|
2657
|
-
name: "e",
|
|
2658
|
-
class: "eptoiz9",
|
|
2659
|
-
propsAsIs: !1
|
|
2660
|
-
}), Wn = ({ disabled: i, variant: n = "primary", onClick: a, children: c, ...u }) => /* @__PURE__ */ p(qn, { onClick: a, disabled: i, "data-variant": n, ...u, children: /* @__PURE__ */ p(Yn, { children: c }) });
|
|
2661
|
-
const Vn = () => Q, Hn = () => Q, Gn = /* @__PURE__ */ g("div")({
|
|
2662
|
-
name: "s",
|
|
2663
|
-
class: "s1lblda3",
|
|
2664
|
-
propsAsIs: !1
|
|
2665
|
-
}), Zn = /* @__PURE__ */ g("div")({
|
|
2666
|
-
name: "a",
|
|
2667
|
-
class: "ascvb2g",
|
|
2668
|
-
propsAsIs: !1
|
|
2669
|
-
}), Jn = /* @__PURE__ */ g("div")({
|
|
2670
|
-
name: "p",
|
|
2671
|
-
class: "p17rl8zy",
|
|
2672
|
-
propsAsIs: !1
|
|
2673
|
-
}), Kn = /* @__PURE__ */ g("div")({
|
|
2674
|
-
name: "l",
|
|
2675
|
-
class: "l1vvttbn",
|
|
2676
|
-
propsAsIs: !1
|
|
2677
|
-
}), Ye = /* @__PURE__ */ g(Vn())({
|
|
2678
|
-
name: "c",
|
|
2679
|
-
class: "c6fk2ph",
|
|
2680
|
-
propsAsIs: !0
|
|
2681
|
-
}), Xn = /* @__PURE__ */ g(Hn())({
|
|
2682
|
-
name: "d",
|
|
2683
|
-
class: "d1rdm136",
|
|
2684
|
-
propsAsIs: !0
|
|
2685
|
-
}), es = /* @__PURE__ */ g("div")({
|
|
2686
|
-
name: "f",
|
|
2687
|
-
class: "fwqnnel",
|
|
2688
|
-
propsAsIs: !1
|
|
2689
|
-
}), ts = /* @__PURE__ */ g("div")({
|
|
2690
|
-
name: "u",
|
|
2691
|
-
class: "ucyxnlg",
|
|
2692
|
-
propsAsIs: !1
|
|
2693
|
-
}), rs = {
|
|
2694
|
-
[Ne.LOST]: /* @__PURE__ */ p(Ye, { name: "icon-cross" }),
|
|
2695
|
-
[Ne.WON]: /* @__PURE__ */ p(Ye, { name: "icon-check" }),
|
|
2696
|
-
[Ne.UNSET]: void 0,
|
|
2697
|
-
[Ne.DNP]: /* @__PURE__ */ p(Ye, { name: "icon-arrow" })
|
|
2698
|
-
}, is = ({
|
|
2699
|
-
questionId: i,
|
|
2700
|
-
questionType: n,
|
|
2701
|
-
questionStatus: a,
|
|
2702
|
-
subject: c,
|
|
2703
|
-
openForVoting: u,
|
|
2704
|
-
openQuestion: I,
|
|
2705
|
-
status: m
|
|
2706
|
-
}) => {
|
|
2707
|
-
const o = Et[n], y = rs[m];
|
|
2708
|
-
return o ? /* @__PURE__ */ v(Gn, { onClick: () => I == null ? void 0 : I(i), children: [
|
|
2709
|
-
/* @__PURE__ */ v(ts, { children: [
|
|
2710
|
-
/* @__PURE__ */ v(Zn, { children: [
|
|
2711
|
-
/* @__PURE__ */ p(Xn, { name: o.iconName }),
|
|
2712
|
-
/* @__PURE__ */ v(es, { children: [
|
|
2713
|
-
o.label,
|
|
2714
|
-
n === q.TRIVIA && a === we.RESOLVED && " • Expired"
|
|
2715
|
-
] })
|
|
2716
|
-
] }),
|
|
2717
|
-
/* @__PURE__ */ p(Jn, { children: c || "" })
|
|
2718
|
-
] }),
|
|
2719
|
-
/* @__PURE__ */ p(Kn, { children: y || (u ? /* @__PURE__ */ p(Wn, { children: "Play" }) : null) })
|
|
2720
|
-
] }) : null;
|
|
2721
|
-
};
|
|
2722
|
-
const ns = /* @__PURE__ */ g("div")({
|
|
2723
|
-
name: "n",
|
|
2724
|
-
class: "n1jcgove",
|
|
2725
|
-
propsAsIs: !1
|
|
2726
|
-
}), ss = /* @__PURE__ */ g("button")({
|
|
2727
|
-
name: "l",
|
|
2728
|
-
class: "l1bwp7hh",
|
|
2729
|
-
propsAsIs: !1
|
|
2730
|
-
}), os = ({
|
|
2731
|
-
openInsight: i,
|
|
2732
|
-
questionId: n,
|
|
2733
|
-
...a
|
|
2734
|
-
}) => /* @__PURE__ */ v(ns, { children: [
|
|
2735
|
-
/* @__PURE__ */ p(bt, { questionId: n, ...a }),
|
|
2736
|
-
i && /* @__PURE__ */ p(ss, { onClick: () => i(n), children: "View Insight" })
|
|
2737
|
-
] });
|
|
2738
|
-
const as = /* @__PURE__ */ g("div")({
|
|
2739
|
-
name: "t",
|
|
2740
|
-
class: "t19vr3p1",
|
|
2741
|
-
propsAsIs: !1
|
|
2742
|
-
}), ls = ({ questions: i, openQuestion: n }) => /* @__PURE__ */ p(as, { children: i == null ? void 0 : i.map((a) => {
|
|
2743
|
-
var c, u;
|
|
2744
|
-
if (a.type === "question" && ((c = a.attributes) == null ? void 0 : c.attributes.case) === "question") {
|
|
2745
|
-
const I = a.attributes.attributes.value;
|
|
2746
|
-
return /* @__PURE__ */ p(is, { openQuestion: n, ...I }, I.questionId);
|
|
2747
|
-
}
|
|
2748
|
-
if (a.type === "insight" && ((u = a.attributes) == null ? void 0 : u.attributes.case) === "insight") {
|
|
2749
|
-
const I = a.attributes.attributes.value;
|
|
2750
|
-
return /* @__PURE__ */ p(os, { openInsight: n, ...I }, I.questionId);
|
|
2751
|
-
}
|
|
2752
|
-
return null;
|
|
2753
|
-
}) }), cs = ({ store: i, openQuestion: n }) => {
|
|
2754
|
-
const a = re(i);
|
|
2755
|
-
return a != null && a.data ? /* @__PURE__ */ p(ls, { openQuestion: n, questions: a.data }) : /* @__PURE__ */ p("div", { children: "wait questions..." });
|
|
2756
|
-
}, us = ({ userSummary: i }) => {
|
|
2757
|
-
var n, a;
|
|
2758
|
-
const c = re(i.getStore());
|
|
2759
|
-
return (n = c.data) != null && n.summary ? /* @__PURE__ */ p(zt, { ...c.data.summary, successRate: (a = c.data.percentage) == null ? void 0 : a.correct }) : /* @__PURE__ */ p("div", { children: "wait user..." });
|
|
2760
|
-
}, ds = ({ gamification: i }) => {
|
|
2761
|
-
const [n, a] = xe(Ie.HOME);
|
|
2762
|
-
return /* @__PURE__ */ v("div", { style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
|
|
2763
|
-
/* @__PURE__ */ v(We, { children: [
|
|
2764
|
-
/* @__PURE__ */ p(Ri, { activePage: n, toggleActivePage: a }),
|
|
2765
|
-
n === Ie.HOME && /* @__PURE__ */ p(us, { userSummary: i.userSummary })
|
|
2766
|
-
] }),
|
|
2767
|
-
n === Ie.HOME && /* @__PURE__ */ p(Vt, { children: /* @__PURE__ */ p(cs, { openQuestion: i.openQuestion, store: i.feedList.getStore() }) }),
|
|
2768
|
-
n === Ie.LEADERBOARD && /* @__PURE__ */ p(We, { style: { flex: "1 1 auto", paddingTop: 0, paddingBottom: 0 }, children: /* @__PURE__ */ p(Pn, { gamification: i }) })
|
|
2769
|
-
] });
|
|
2770
|
-
};
|
|
2771
|
-
const hs = () => Ht, At = /* @__PURE__ */ g(hs())({
|
|
2772
|
-
name: "n",
|
|
2773
|
-
class: "n1ph66cs",
|
|
2774
|
-
propsAsIs: !0
|
|
2775
|
-
}), ps = /* @__PURE__ */ g("div")({
|
|
2776
|
-
name: "x",
|
|
2777
|
-
class: "xorme7i",
|
|
2778
|
-
propsAsIs: !1
|
|
2779
|
-
}), fs = ({
|
|
2780
|
-
correct: i,
|
|
2781
|
-
incorrect: n
|
|
2782
|
-
}) => {
|
|
2783
|
-
const a = i + n;
|
|
2784
|
-
return a === 0 ? 0 : Math.round(i / a * 100);
|
|
2785
|
-
}, zs = ({
|
|
2786
|
-
gamification: i,
|
|
2787
|
-
className: n
|
|
2788
|
-
}) => {
|
|
2789
|
-
const a = re(i.openedQuestion.$store), c = re(i.openedUser);
|
|
2790
|
-
return /* @__PURE__ */ v(ye, {
|
|
2791
|
-
children: [a && /* @__PURE__ */ p(At, {
|
|
2792
|
-
className: n,
|
|
2793
|
-
children: /* @__PURE__ */ p(Oi, {
|
|
2794
|
-
gamification: i
|
|
2795
|
-
})
|
|
2796
|
-
}), c && /* @__PURE__ */ p(At, {
|
|
2797
|
-
className: n,
|
|
2798
|
-
children: /* @__PURE__ */ v(ps, {
|
|
2799
|
-
children: [/* @__PURE__ */ p(St, {
|
|
2800
|
-
label: "Friend's Rank",
|
|
2801
|
-
close: i.closeUser
|
|
2802
|
-
}), /* @__PURE__ */ p(We, {
|
|
2803
|
-
children: /* @__PURE__ */ p(zt, {
|
|
2804
|
-
...c,
|
|
2805
|
-
successRate: fs(c)
|
|
2806
|
-
})
|
|
2807
|
-
})]
|
|
2808
|
-
})
|
|
2809
|
-
}), /* @__PURE__ */ p(Tt, {
|
|
2810
|
-
className: n,
|
|
2811
|
-
"data-nav": "true",
|
|
2812
|
-
children: /* @__PURE__ */ p(ds, {
|
|
2813
|
-
gamification: i
|
|
2814
|
-
})
|
|
2815
|
-
})]
|
|
2816
|
-
});
|
|
2817
|
-
};
|
|
2818
|
-
export {
|
|
2819
|
-
zs as GamificationOverlay,
|
|
2820
|
-
zs as default
|
|
2821
|
-
};
|