icms-api 0.1.0 → 0.1.2
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/dist/icms-api.cjs.js +2 -2
- package/dist/icms-api.cjs.js.map +1 -1
- package/dist/icms-api.es.js +589 -521
- package/dist/icms-api.es.js.map +1 -1
- package/dist/icms-api.umd.js +2 -2
- package/dist/icms-api.umd.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +2 -2
package/dist/icms-api.es.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import Xt from "pino";
|
|
2
|
+
import Wt from "pino-pretty";
|
|
3
|
+
import zt from "js-md5";
|
|
4
4
|
import ne from "crypto-js";
|
|
5
5
|
import "h3";
|
|
6
|
-
var
|
|
6
|
+
var Zt = {
|
|
7
7
|
TYPE_MGT: 0,
|
|
8
8
|
TYPE_C: 1,
|
|
9
9
|
TYPE_B: 2
|
|
10
|
-
},
|
|
10
|
+
}, er = Wt({
|
|
11
11
|
colorize: !0,
|
|
12
12
|
destination: process.stdout,
|
|
13
13
|
translateTime: "SYS:yyyy-mm-dd HH:MM:ss",
|
|
14
14
|
ignore: "pid,hostname",
|
|
15
15
|
messageFormat: "{msg}",
|
|
16
16
|
singleLine: !0
|
|
17
|
-
}),
|
|
17
|
+
}), U = Xt({
|
|
18
18
|
name: process.env.APP_NAME ?? "iBoot",
|
|
19
19
|
level: process.env.APP_ENV === "production" ? "info" : "debug",
|
|
20
20
|
nestedKey: "payload"
|
|
21
|
-
},
|
|
21
|
+
}, er), tr = {}, Mt = (e) => {
|
|
22
22
|
let t = e || 32, n = "";
|
|
23
23
|
for (let e = 0; e < t; e++) n += "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678".charAt(Math.floor(Math.random() * 48));
|
|
24
24
|
return n;
|
|
25
25
|
};
|
|
26
|
-
function
|
|
26
|
+
function rr() {
|
|
27
27
|
try {
|
|
28
|
-
let e =
|
|
28
|
+
let e = tr.networkInterfaces();
|
|
29
29
|
for (let t of Object.keys(e)) {
|
|
30
30
|
let n = e[t];
|
|
31
31
|
if (n) {
|
|
@@ -34,12 +34,299 @@ function tr() {
|
|
|
34
34
|
}
|
|
35
35
|
return crypto.randomUUID().replace(/-/g, "").toUpperCase();
|
|
36
36
|
} catch {
|
|
37
|
-
return
|
|
37
|
+
return Mt(10);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
var k = {
|
|
41
|
+
IBOOT_DEVICE_ID: "dvid",
|
|
42
|
+
IBOOT_LANG: "lang",
|
|
43
|
+
IBOOT_WEBSITE_ID: "wid",
|
|
44
|
+
IBOOT_WEBSITE_NO: "wno",
|
|
45
|
+
IBOOT_TOKEN: "token",
|
|
46
|
+
IBOOT_USER: "user"
|
|
47
|
+
}, Y = "Content-Type", M = {
|
|
48
|
+
applicationJson: "application/json",
|
|
49
|
+
multipartFormData: "multipart/form-data",
|
|
50
|
+
applicationXwwwFormUrlencoded: "application/x-www-form-urlencoded"
|
|
51
|
+
}, nr = "zh-CN", K = {
|
|
52
|
+
DEVICE_ID: "Device-Id",
|
|
53
|
+
LANG: "Lang",
|
|
54
|
+
WEBSITE_ID: "Website-Id",
|
|
55
|
+
WEBSITE_NO: "Website-No"
|
|
56
|
+
}, Ee = {
|
|
57
|
+
maxAge: -1,
|
|
58
|
+
httpOnly: !0,
|
|
59
|
+
path: "/"
|
|
60
|
+
}, ut = () => ({
|
|
61
|
+
path: "/",
|
|
62
|
+
secure: process.env.APP_ENV === "production",
|
|
63
|
+
httpOnly: !0,
|
|
64
|
+
sameSite: "strict"
|
|
65
|
+
}), ir = (e) => {
|
|
66
|
+
if (e.get) {
|
|
67
|
+
let t = e.get(K.DEVICE_ID), n = e.get(K.LANG), r = e.get(K.WEBSITE_ID), i = e.get(K.WEBSITE_NO), a = {};
|
|
68
|
+
return t && t.length > 0 && (a.deviceId = t), n && n.length > 0 && (a.lang = n), r && r.length > 0 && (a.websiteId = r), i && i.length > 0 && (a.websiteNo = i), a;
|
|
69
|
+
}
|
|
70
|
+
throw Error("The get method of IStorage has not been implemented.");
|
|
71
|
+
}, or = (e) => {
|
|
72
|
+
if (e.get) {
|
|
73
|
+
let t = e.get(k.IBOOT_DEVICE_ID), n = e.get(k.IBOOT_LANG), r = e.get(k.IBOOT_WEBSITE_ID), i = e.get(k.IBOOT_WEBSITE_NO), a = {};
|
|
74
|
+
return t && t.length > 0 && (a.deviceId = t), n && n.length > 0 && (a.lang = n), r && r.length > 0 && (a.websiteId = r), i && i.length > 0 && (a.websiteNo = i), a;
|
|
75
|
+
}
|
|
76
|
+
throw Error("The get method of ICookies has not been implemented.");
|
|
77
|
+
}, Gr = (e, t) => {
|
|
78
|
+
if (e.set) t.deviceId && e.set(k.IBOOT_DEVICE_ID, t.deviceId), t.lang && e.set(k.IBOOT_LANG, t.lang), t.websiteId && e.set(k.IBOOT_WEBSITE_ID, t.websiteId), t.websiteNo && e.set(k.IBOOT_WEBSITE_NO, t.websiteNo);
|
|
79
|
+
else throw Error("The set method of ICookies has not been implemented.");
|
|
80
|
+
}, sr = (e) => {
|
|
81
|
+
if (e.get) {
|
|
82
|
+
let t = e[k.IBOOT_USER];
|
|
83
|
+
if (t && t.length > 0) {
|
|
84
|
+
let n = JSON.parse(t), r = n.username, i = n.userType.toString(), a = e[k.IBOOT_TOKEN];
|
|
85
|
+
if (a) return {
|
|
86
|
+
username: r,
|
|
87
|
+
utype: i,
|
|
88
|
+
token: a
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}, ar = (e, t) => {
|
|
93
|
+
let { id: n, name: r, username: i, nickname: a, headImg: o, token: s, lastLoginTime: c, deviceId: l, userType: d, mustChangePwd: f } = e, p = {
|
|
94
|
+
id: n,
|
|
95
|
+
name: r,
|
|
96
|
+
username: i,
|
|
97
|
+
nickname: a || r,
|
|
98
|
+
headImg: o,
|
|
99
|
+
lastLoginTime: c,
|
|
100
|
+
deviceId: l,
|
|
101
|
+
userType: d,
|
|
102
|
+
accountType: 0,
|
|
103
|
+
needToReview: !1,
|
|
104
|
+
socketOnline: !1,
|
|
105
|
+
mustChangePwd: f
|
|
106
|
+
};
|
|
107
|
+
t.cookies[k.IBOOT_TOKEN] = {
|
|
108
|
+
value: s,
|
|
109
|
+
options: ut()
|
|
110
|
+
}, t.cookies[k.IBOOT_USER] = {
|
|
111
|
+
value: JSON.stringify(p),
|
|
112
|
+
options: ut()
|
|
113
|
+
};
|
|
114
|
+
}, ur = (e) => {
|
|
115
|
+
if (!e.set) throw Error("cookies set function is undefined");
|
|
116
|
+
if (e.set(k.IBOOT_TOKEN, "", Ee), e.set(k.IBOOT_USER, "", Ee), !e.delete) throw Error("cookies delete function is undefined");
|
|
117
|
+
e.delete(k.IBOOT_TOKEN, Ee), e.delete(k.IBOOT_USER, Ee);
|
|
118
|
+
}, cr = class {
|
|
119
|
+
baseUrl;
|
|
120
|
+
helloMethod;
|
|
121
|
+
apiKey;
|
|
122
|
+
userType;
|
|
123
|
+
userFrom;
|
|
124
|
+
deviceId;
|
|
125
|
+
version = "1";
|
|
126
|
+
lang;
|
|
127
|
+
websiteId;
|
|
128
|
+
websiteNo;
|
|
129
|
+
constructor(e) {
|
|
130
|
+
process.env.APP_ENV === "production" || U.warn("This is currently a development environment!"), this.baseUrl = process.env.APP_BASEURL, this.apiKey = process.env.APP_APIKEY, this.userFrom = process.env.APP_USERFROM ?? "1", this.helloMethod = e.helloURL ?? "", this.userType = e.userType ?? Zt.TYPE_MGT, this.deviceId = e.deviceId ?? rr(), this.lang = e.lang ?? nr, this.websiteId = e.websiteId, this.websiteNo = e.websiteNo;
|
|
131
|
+
}
|
|
132
|
+
encrypt(e) {
|
|
133
|
+
let t = ne.enc.Utf8.parse(this.apiKey);
|
|
134
|
+
return ne.AES.encrypt(e, t).toString();
|
|
135
|
+
}
|
|
136
|
+
decrypt(e) {
|
|
137
|
+
let t = ne.enc.Utf8.parse(this.apiKey);
|
|
138
|
+
return ne.AES.decrypt(e, t, { mode: ne.mode.ECB }).toString(ne.enc.Utf8);
|
|
139
|
+
}
|
|
140
|
+
setHttpOptsToCookies = (e) => {
|
|
141
|
+
this.deviceId && this.deviceId.length > 0 && (e[k.IBOOT_DEVICE_ID] = this.deviceId), this.websiteId && this.websiteId.length > 0 && (e[k.IBOOT_WEBSITE_ID] = this.websiteId), this.websiteNo && this.websiteNo.length > 0 && (e[k.IBOOT_WEBSITE_NO] = this.websiteNo), this.lang && this.lang.length > 0 && (e[k.IBOOT_LANG] = this.lang);
|
|
142
|
+
};
|
|
143
|
+
async sign(e) {
|
|
144
|
+
let t = "&key=" + await this.helloIboot(), r = [];
|
|
145
|
+
for (let t of e.keys()) r.push(t);
|
|
146
|
+
r.sort((e, t) => {
|
|
147
|
+
let n = e.match(/(\d+)/), r = t.match(/(\d+)/);
|
|
148
|
+
return n && r && e.replace(/\d+/, "") === t.replace(/\d+/, "") ? parseInt(n[1]) - parseInt(r[1]) : e.toLowerCase().localeCompare(t.toLowerCase(), void 0, {
|
|
149
|
+
numeric: !0,
|
|
150
|
+
sensitivity: "base"
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
let i = [];
|
|
154
|
+
r.forEach((t) => {
|
|
155
|
+
let n = e.get(t);
|
|
156
|
+
n && i.push(t + "=" + n);
|
|
157
|
+
});
|
|
158
|
+
let a = i.join("&"), s = zt.md5((a + t).toLocaleUpperCase()), c = {
|
|
159
|
+
params: a,
|
|
160
|
+
md5: s
|
|
161
|
+
};
|
|
162
|
+
return U.debug(c, "API_SIGN"), s;
|
|
163
|
+
}
|
|
164
|
+
assemblyParameter(e, t) {
|
|
165
|
+
let n = e ?? new URLSearchParams(), r = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
166
|
+
return n.set("timezone", r), n.set("timestamp", Date.now().toString()), n.set("echostr", Mt(10)), n.set("version", this.version), n.set("deviceId", this.deviceId), n.set("webid", this.websiteId ?? ""), n.set("apiKey", this.apiKey), t && t.length > 0 && n.set("username", t), new URLSearchParams([...n].filter(([, e]) => e !== ""));
|
|
167
|
+
}
|
|
168
|
+
async assemblyHeader({ urlParams: e, token: t }) {
|
|
169
|
+
let n = {
|
|
170
|
+
"Res-Type": "json",
|
|
171
|
+
"Device-Id": this.deviceId,
|
|
172
|
+
"User-Type": t?.utype.toString() ?? this.userType.toString(),
|
|
173
|
+
"User-From": this.userFrom,
|
|
174
|
+
"Api-Key": this.apiKey
|
|
175
|
+
};
|
|
176
|
+
return n[Y] = M.applicationXwwwFormUrlencoded, this.lang && this.lang.length > 0 && (n.Lang = this.lang), this.websiteId && this.websiteId.length > 0 && (n["Web-Id"] = this.websiteId), this.websiteNo && this.websiteNo.length > 0 && (n["Web-No"] = this.websiteNo), t && (t.token && t.token.length > 0 && t.username && t.username.length > 0 && (n.Authorization = t.token, n.Username = t.username), t.xcsrf && (n[t.xcsrf.csrfHeader] = t.xcsrf.csrfToken)), n.Sign = await this.sign(e), n;
|
|
177
|
+
}
|
|
178
|
+
async helloIboot() {
|
|
179
|
+
if (this.helloMethod.length <= 0) return this.apiKey;
|
|
180
|
+
let e = this.getApiUrl(this.helloMethod), t = {
|
|
181
|
+
"Res-Type": "json",
|
|
182
|
+
"Api-Key": this.apiKey
|
|
183
|
+
};
|
|
184
|
+
t[Y] = M.applicationXwwwFormUrlencoded;
|
|
185
|
+
let n = {
|
|
186
|
+
url: e,
|
|
187
|
+
headers: t
|
|
188
|
+
};
|
|
189
|
+
U.debug(n, "HELLO");
|
|
190
|
+
let r = await fetch(e, {
|
|
191
|
+
method: "GET",
|
|
192
|
+
headers: t,
|
|
193
|
+
credentials: "include",
|
|
194
|
+
cache: "force-cache"
|
|
195
|
+
});
|
|
196
|
+
if (r.ok) {
|
|
197
|
+
let e = await r.json();
|
|
198
|
+
return U.debug(e.data, "HELLO RESULT"), e.data;
|
|
199
|
+
}
|
|
200
|
+
throw Error("hello iBoot error!");
|
|
201
|
+
}
|
|
202
|
+
getApiUrl(e) {
|
|
203
|
+
return `${this.baseUrl}/${e}`;
|
|
204
|
+
}
|
|
205
|
+
async csrf() {
|
|
206
|
+
let e = await this.get({ url: "guest/csrf" });
|
|
207
|
+
if (e.success) {
|
|
208
|
+
let t = e.data;
|
|
209
|
+
if (t) return t.csrfToken.toString();
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
async get({ url: e, data: t, token: n, cache: r = "default" }) {
|
|
213
|
+
let i = this.assemblyParameter(t ? new URLSearchParams(t) : void 0), a = await this.assemblyHeader({
|
|
214
|
+
urlParams: i,
|
|
215
|
+
token: n
|
|
216
|
+
}), s = `${this.getApiUrl(e)}?${i.toString()}`, c = {
|
|
217
|
+
url: s,
|
|
218
|
+
headers: a
|
|
219
|
+
};
|
|
220
|
+
U.info(c, "GET");
|
|
221
|
+
let l = await fetch(s, {
|
|
222
|
+
method: "GET",
|
|
223
|
+
headers: a,
|
|
224
|
+
credentials: "include",
|
|
225
|
+
cache: r
|
|
226
|
+
});
|
|
227
|
+
if (l.ok) {
|
|
228
|
+
let e = Object.fromEntries(l.headers.entries()), t = {
|
|
229
|
+
...await l.json(),
|
|
230
|
+
headers: e
|
|
231
|
+
};
|
|
232
|
+
return U.debug(t, "GET_RESULT"), t;
|
|
233
|
+
}
|
|
234
|
+
let u = {
|
|
235
|
+
code: l.status,
|
|
236
|
+
success: !1,
|
|
237
|
+
msg: l.statusText
|
|
238
|
+
};
|
|
239
|
+
return U.error(u), u;
|
|
240
|
+
}
|
|
241
|
+
async post({ url: e, data: t, token: n, cache: r = "default" }) {
|
|
242
|
+
let i = t ? { ...t } : {}, a = i.buffer ?? void 0, s = i.boundary ?? void 0;
|
|
243
|
+
a && delete i.buffer, s && delete i.boundary;
|
|
244
|
+
let c = this.assemblyParameter(new URLSearchParams(i)), l = await this.assemblyHeader({
|
|
245
|
+
urlParams: c,
|
|
246
|
+
token: n
|
|
247
|
+
});
|
|
248
|
+
a && s && (l[Y] = `multipart/form-data; boundary=${s}`);
|
|
249
|
+
let u = this.getApiUrl(e), f = {
|
|
250
|
+
url: u,
|
|
251
|
+
headers: l,
|
|
252
|
+
params: c
|
|
253
|
+
};
|
|
254
|
+
U.info(f, "POST");
|
|
255
|
+
let p = a ? `${u}?${c}` : u, m = await fetch(p, {
|
|
256
|
+
method: "POST",
|
|
257
|
+
headers: l,
|
|
258
|
+
body: a || c,
|
|
259
|
+
credentials: "include",
|
|
260
|
+
cache: r
|
|
261
|
+
});
|
|
262
|
+
if (m.ok) {
|
|
263
|
+
let e = Object.fromEntries(m.headers.entries()), t = {
|
|
264
|
+
...await m.json(),
|
|
265
|
+
headers: e
|
|
266
|
+
};
|
|
267
|
+
return U.debug(t, "POST_RESULT"), t;
|
|
268
|
+
}
|
|
269
|
+
let h = {
|
|
270
|
+
code: m.status,
|
|
271
|
+
success: !1,
|
|
272
|
+
msg: m.statusText
|
|
273
|
+
};
|
|
274
|
+
return U.error(h), h;
|
|
275
|
+
}
|
|
276
|
+
}, Qe = "Post request error!", ie = {
|
|
277
|
+
info: (e, t) => {
|
|
278
|
+
console.info(t, JSON.stringify(e));
|
|
279
|
+
},
|
|
280
|
+
debug: (e, t) => {
|
|
281
|
+
console.debug(t, JSON.stringify(e));
|
|
282
|
+
},
|
|
283
|
+
error: (e) => {
|
|
284
|
+
console.error(JSON.stringify(e));
|
|
285
|
+
}
|
|
286
|
+
}, Xr = (e) => {
|
|
287
|
+
if (e.get) {
|
|
288
|
+
let t = e.get(k.IBOOT_USER);
|
|
289
|
+
if (t && t.length > 0) return JSON.parse(t);
|
|
290
|
+
}
|
|
291
|
+
}, jt = async (e, t) => {
|
|
292
|
+
let n = t?.data ?? {}, r = t?.headers, i, a = t?.headers, o = new Headers(a);
|
|
293
|
+
if (n instanceof FormData ? i = n : (i = JSON.stringify(n), o.set(Y, M.applicationJson)), r) for (let e in r) {
|
|
294
|
+
let t = r[e];
|
|
295
|
+
t && o.set(e, t);
|
|
296
|
+
}
|
|
297
|
+
ie.info({
|
|
298
|
+
url: e,
|
|
299
|
+
headers: o
|
|
300
|
+
}, "POST");
|
|
301
|
+
let s = await fetch(e, {
|
|
302
|
+
method: "POST",
|
|
303
|
+
headers: o,
|
|
304
|
+
body: i
|
|
305
|
+
});
|
|
306
|
+
if (s.ok) {
|
|
307
|
+
let e = Object.fromEntries(s.headers.entries()), t = {
|
|
308
|
+
...await s.json(),
|
|
309
|
+
headers: e
|
|
310
|
+
};
|
|
311
|
+
return ie.debug(t, "POST_RESULT"), t;
|
|
312
|
+
}
|
|
313
|
+
let c = {
|
|
314
|
+
code: s.status,
|
|
315
|
+
success: !1,
|
|
316
|
+
msg: s.statusText
|
|
317
|
+
};
|
|
318
|
+
return ie.error(c), c;
|
|
319
|
+
}, zr = async (e, t) => {
|
|
320
|
+
let n = await jt(e, t);
|
|
321
|
+
if (n.success) return n.data;
|
|
322
|
+
if (t?.showError) {
|
|
323
|
+
t.showError(n.msg ?? Qe);
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
throw Error(n.msg ?? Qe);
|
|
327
|
+
}, ve = { exports: {} }, Te = {}, Ie = {}, Ae = {}, lt;
|
|
328
|
+
function hr() {
|
|
329
|
+
return lt || (lt = 1, (function(e) {
|
|
43
330
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "detectDomainLocale", {
|
|
44
331
|
enumerable: !0,
|
|
45
332
|
get: function() {
|
|
@@ -55,11 +342,11 @@ function rr() {
|
|
|
55
342
|
}
|
|
56
343
|
}
|
|
57
344
|
}
|
|
58
|
-
})(
|
|
345
|
+
})(Ae)), Ae;
|
|
59
346
|
}
|
|
60
|
-
var
|
|
61
|
-
function
|
|
62
|
-
return
|
|
347
|
+
var Oe = {}, xe = {}, dt;
|
|
348
|
+
function fr() {
|
|
349
|
+
return dt || (dt = 1, (function(e) {
|
|
63
350
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "removeTrailingSlash", {
|
|
64
351
|
enumerable: !0,
|
|
65
352
|
get: function() {
|
|
@@ -69,11 +356,11 @@ function nr() {
|
|
|
69
356
|
function t(e) {
|
|
70
357
|
return e.replace(/\/$/, "") || "/";
|
|
71
358
|
}
|
|
72
|
-
})(
|
|
359
|
+
})(xe)), xe;
|
|
73
360
|
}
|
|
74
|
-
var
|
|
75
|
-
function
|
|
76
|
-
return
|
|
361
|
+
var Ne = {}, Ce = {}, ht;
|
|
362
|
+
function tt() {
|
|
363
|
+
return ht || (ht = 1, (function(e) {
|
|
77
364
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "parsePath", {
|
|
78
365
|
enumerable: !0,
|
|
79
366
|
get: function() {
|
|
@@ -92,95 +379,95 @@ function et() {
|
|
|
92
379
|
hash: ""
|
|
93
380
|
};
|
|
94
381
|
}
|
|
95
|
-
})(
|
|
382
|
+
})(Ce)), Ce;
|
|
96
383
|
}
|
|
97
|
-
var
|
|
98
|
-
function
|
|
99
|
-
return
|
|
384
|
+
var ft;
|
|
385
|
+
function qt() {
|
|
386
|
+
return ft || (ft = 1, (function(e) {
|
|
100
387
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "addPathPrefix", {
|
|
101
388
|
enumerable: !0,
|
|
102
389
|
get: function() {
|
|
103
390
|
return n;
|
|
104
391
|
}
|
|
105
392
|
});
|
|
106
|
-
let t =
|
|
393
|
+
let t = tt();
|
|
107
394
|
function n(e, n) {
|
|
108
395
|
if (!e.startsWith("/") || !n) return e;
|
|
109
396
|
let { pathname: r, query: i, hash: a } = (0, t.parsePath)(e);
|
|
110
397
|
return "" + n + r + i + a;
|
|
111
398
|
}
|
|
112
|
-
})(
|
|
399
|
+
})(Ne)), Ne;
|
|
113
400
|
}
|
|
114
|
-
var
|
|
115
|
-
function
|
|
116
|
-
return
|
|
401
|
+
var Le = {}, pt;
|
|
402
|
+
function pr() {
|
|
403
|
+
return pt || (pt = 1, (function(e) {
|
|
117
404
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "addPathSuffix", {
|
|
118
405
|
enumerable: !0,
|
|
119
406
|
get: function() {
|
|
120
407
|
return n;
|
|
121
408
|
}
|
|
122
409
|
});
|
|
123
|
-
let t =
|
|
410
|
+
let t = tt();
|
|
124
411
|
function n(e, n) {
|
|
125
412
|
if (!e.startsWith("/") || !n) return e;
|
|
126
413
|
let { pathname: r, query: i, hash: a } = (0, t.parsePath)(e);
|
|
127
414
|
return "" + r + n + i + a;
|
|
128
415
|
}
|
|
129
|
-
})(
|
|
416
|
+
})(Le)), Le;
|
|
130
417
|
}
|
|
131
|
-
var
|
|
132
|
-
function
|
|
133
|
-
return
|
|
418
|
+
var ke = {}, Ue = {}, mt;
|
|
419
|
+
function rt() {
|
|
420
|
+
return mt || (mt = 1, (function(e) {
|
|
134
421
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "pathHasPrefix", {
|
|
135
422
|
enumerable: !0,
|
|
136
423
|
get: function() {
|
|
137
424
|
return n;
|
|
138
425
|
}
|
|
139
426
|
});
|
|
140
|
-
let t =
|
|
427
|
+
let t = tt();
|
|
141
428
|
function n(e, n) {
|
|
142
429
|
if (typeof e != "string") return !1;
|
|
143
430
|
let { pathname: r } = (0, t.parsePath)(e);
|
|
144
431
|
return r === n || r.startsWith(n + "/");
|
|
145
432
|
}
|
|
146
|
-
})(
|
|
433
|
+
})(Ue)), Ue;
|
|
147
434
|
}
|
|
148
|
-
var
|
|
149
|
-
function
|
|
150
|
-
return
|
|
435
|
+
var _t;
|
|
436
|
+
function mr() {
|
|
437
|
+
return _t || (_t = 1, (function(e) {
|
|
151
438
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "addLocale", {
|
|
152
439
|
enumerable: !0,
|
|
153
440
|
get: function() {
|
|
154
441
|
return r;
|
|
155
442
|
}
|
|
156
443
|
});
|
|
157
|
-
let t =
|
|
444
|
+
let t = qt(), n = rt();
|
|
158
445
|
function r(e, r, i, a) {
|
|
159
446
|
if (!r || r === i) return e;
|
|
160
447
|
let o = e.toLowerCase();
|
|
161
448
|
return !a && ((0, n.pathHasPrefix)(o, "/api") || (0, n.pathHasPrefix)(o, "/" + r.toLowerCase())) ? e : (0, t.addPathPrefix)(e, "/" + r);
|
|
162
449
|
}
|
|
163
|
-
})(
|
|
450
|
+
})(ke)), ke;
|
|
164
451
|
}
|
|
165
|
-
var
|
|
166
|
-
function
|
|
167
|
-
return
|
|
452
|
+
var bt;
|
|
453
|
+
function _r() {
|
|
454
|
+
return bt || (bt = 1, (function(e) {
|
|
168
455
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "formatNextPathnameInfo", {
|
|
169
456
|
enumerable: !0,
|
|
170
457
|
get: function() {
|
|
171
458
|
return a;
|
|
172
459
|
}
|
|
173
460
|
});
|
|
174
|
-
let t =
|
|
461
|
+
let t = fr(), n = qt(), r = pr(), i = mr();
|
|
175
462
|
function a(e) {
|
|
176
463
|
let a = (0, i.addLocale)(e.pathname, e.locale, e.buildId ? void 0 : e.defaultLocale, e.ignorePrefix);
|
|
177
464
|
return (e.buildId || !e.trailingSlash) && (a = (0, t.removeTrailingSlash)(a)), e.buildId && (a = (0, r.addPathSuffix)((0, n.addPathPrefix)(a, "/_next/data/" + e.buildId), e.pathname === "/" ? "index.json" : ".json")), a = (0, n.addPathPrefix)(a, e.basePath), !e.buildId && e.trailingSlash ? a.endsWith("/") ? a : (0, r.addPathSuffix)(a, "/") : (0, t.removeTrailingSlash)(a);
|
|
178
465
|
}
|
|
179
|
-
})(
|
|
466
|
+
})(Oe)), Oe;
|
|
180
467
|
}
|
|
181
|
-
var
|
|
182
|
-
function
|
|
183
|
-
return
|
|
468
|
+
var De = {}, gt;
|
|
469
|
+
function br() {
|
|
470
|
+
return gt || (gt = 1, (function(e) {
|
|
184
471
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "getHostname", {
|
|
185
472
|
enumerable: !0,
|
|
186
473
|
get: function() {
|
|
@@ -194,11 +481,11 @@ function ar() {
|
|
|
194
481
|
else return;
|
|
195
482
|
return n.toLowerCase();
|
|
196
483
|
}
|
|
197
|
-
})(
|
|
484
|
+
})(De)), De;
|
|
198
485
|
}
|
|
199
|
-
var
|
|
200
|
-
function
|
|
201
|
-
return
|
|
486
|
+
var Me = {}, je = {}, wt;
|
|
487
|
+
function gr() {
|
|
488
|
+
return wt || (wt = 1, (function(e) {
|
|
202
489
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "normalizeLocalePath", {
|
|
203
490
|
enumerable: !0,
|
|
204
491
|
get: function() {
|
|
@@ -212,35 +499,35 @@ function ur() {
|
|
|
212
499
|
detectedLocale: n
|
|
213
500
|
};
|
|
214
501
|
}
|
|
215
|
-
})(
|
|
502
|
+
})(je)), je;
|
|
216
503
|
}
|
|
217
|
-
var
|
|
218
|
-
function
|
|
219
|
-
return
|
|
504
|
+
var qe = {}, Et;
|
|
505
|
+
function wr() {
|
|
506
|
+
return Et || (Et = 1, (function(e) {
|
|
220
507
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "removePathPrefix", {
|
|
221
508
|
enumerable: !0,
|
|
222
509
|
get: function() {
|
|
223
510
|
return n;
|
|
224
511
|
}
|
|
225
512
|
});
|
|
226
|
-
let t =
|
|
513
|
+
let t = rt();
|
|
227
514
|
function n(e, n) {
|
|
228
515
|
if (!(0, t.pathHasPrefix)(e, n)) return e;
|
|
229
516
|
let r = e.slice(n.length);
|
|
230
517
|
return r.startsWith("/") ? r : "/" + r;
|
|
231
518
|
}
|
|
232
|
-
})(
|
|
519
|
+
})(qe)), qe;
|
|
233
520
|
}
|
|
234
|
-
var
|
|
235
|
-
function
|
|
236
|
-
return
|
|
521
|
+
var vt;
|
|
522
|
+
function Er() {
|
|
523
|
+
return vt || (vt = 1, (function(e) {
|
|
237
524
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "getNextPathnameInfo", {
|
|
238
525
|
enumerable: !0,
|
|
239
526
|
get: function() {
|
|
240
527
|
return i;
|
|
241
528
|
}
|
|
242
529
|
});
|
|
243
|
-
let t =
|
|
530
|
+
let t = gr(), n = wr(), r = rt();
|
|
244
531
|
function i(e, i) {
|
|
245
532
|
let { basePath: a, i18n: o, trailingSlash: s } = i.nextConfig ?? {}, c = {
|
|
246
533
|
pathname: e,
|
|
@@ -258,18 +545,18 @@ function lr() {
|
|
|
258
545
|
}
|
|
259
546
|
return c;
|
|
260
547
|
}
|
|
261
|
-
})(
|
|
548
|
+
})(Me)), Me;
|
|
262
549
|
}
|
|
263
|
-
var
|
|
264
|
-
function
|
|
265
|
-
return
|
|
550
|
+
var Rt;
|
|
551
|
+
function Ht() {
|
|
552
|
+
return Rt || (Rt = 1, (function(e) {
|
|
266
553
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "NextURL", {
|
|
267
554
|
enumerable: !0,
|
|
268
555
|
get: function() {
|
|
269
556
|
return c;
|
|
270
557
|
}
|
|
271
558
|
});
|
|
272
|
-
let t =
|
|
559
|
+
let t = hr(), n = _r(), r = br(), i = Er(), a = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;
|
|
273
560
|
function o(e, t) {
|
|
274
561
|
return new URL(String(e).replace(a, "localhost"), t && String(t).replace(a, "localhost"));
|
|
275
562
|
}
|
|
@@ -426,11 +713,11 @@ function jt() {
|
|
|
426
713
|
return new c(String(this), this[s].options);
|
|
427
714
|
}
|
|
428
715
|
}
|
|
429
|
-
})(
|
|
716
|
+
})(Ie)), Ie;
|
|
430
717
|
}
|
|
431
|
-
var
|
|
432
|
-
function
|
|
433
|
-
return
|
|
718
|
+
var He = {}, Fe = {}, Pt;
|
|
719
|
+
function vr() {
|
|
720
|
+
return Pt || (Pt = 1, (function(e) {
|
|
434
721
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
435
722
|
function t(e, t) {
|
|
436
723
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -443,7 +730,7 @@ function dr() {
|
|
|
443
730
|
return c;
|
|
444
731
|
},
|
|
445
732
|
APP_DIR_ALIAS: function() {
|
|
446
|
-
return
|
|
733
|
+
return D;
|
|
447
734
|
},
|
|
448
735
|
CACHE_ONE_YEAR: function() {
|
|
449
736
|
return b;
|
|
@@ -452,16 +739,16 @@ function dr() {
|
|
|
452
739
|
return T;
|
|
453
740
|
},
|
|
454
741
|
ESLINT_DEFAULT_DIRS: function() {
|
|
455
|
-
return
|
|
742
|
+
return wn;
|
|
456
743
|
},
|
|
457
744
|
GSP_NO_RETURNED_VALUE: function() {
|
|
458
|
-
return
|
|
745
|
+
return B;
|
|
459
746
|
},
|
|
460
747
|
GSSP_COMPONENT_MEMBER_ERROR: function() {
|
|
461
|
-
return
|
|
748
|
+
return H;
|
|
462
749
|
},
|
|
463
750
|
GSSP_NO_RETURNED_VALUE: function() {
|
|
464
|
-
return
|
|
751
|
+
return Sn;
|
|
465
752
|
},
|
|
466
753
|
INSTRUMENTATION_HOOK_FILENAME: function() {
|
|
467
754
|
return C;
|
|
@@ -512,7 +799,7 @@ function dr() {
|
|
|
512
799
|
return n;
|
|
513
800
|
},
|
|
514
801
|
NON_STANDARD_NODE_ENV: function() {
|
|
515
|
-
return
|
|
802
|
+
return W;
|
|
516
803
|
},
|
|
517
804
|
PAGES_DIR_ALIAS: function() {
|
|
518
805
|
return w;
|
|
@@ -524,25 +811,25 @@ function dr() {
|
|
|
524
811
|
return a;
|
|
525
812
|
},
|
|
526
813
|
PUBLIC_DIR_MIDDLEWARE_CONFLICT: function() {
|
|
527
|
-
return
|
|
814
|
+
return P;
|
|
528
815
|
},
|
|
529
816
|
ROOT_DIR_ALIAS: function() {
|
|
530
817
|
return E;
|
|
531
818
|
},
|
|
532
819
|
RSC_ACTION_CLIENT_WRAPPER_ALIAS: function() {
|
|
533
|
-
return
|
|
820
|
+
return N;
|
|
534
821
|
},
|
|
535
822
|
RSC_ACTION_ENCRYPTION_ALIAS: function() {
|
|
536
|
-
return
|
|
823
|
+
return xn;
|
|
537
824
|
},
|
|
538
825
|
RSC_ACTION_PROXY_ALIAS: function() {
|
|
539
|
-
return
|
|
826
|
+
return j;
|
|
540
827
|
},
|
|
541
828
|
RSC_ACTION_VALIDATE_ALIAS: function() {
|
|
542
|
-
return
|
|
829
|
+
return A;
|
|
543
830
|
},
|
|
544
831
|
RSC_MOD_REF_PROXY_ALIAS: function() {
|
|
545
|
-
return
|
|
832
|
+
return O;
|
|
546
833
|
},
|
|
547
834
|
RSC_PREFETCH_SUFFIX: function() {
|
|
548
835
|
return o;
|
|
@@ -551,47 +838,47 @@ function dr() {
|
|
|
551
838
|
return s;
|
|
552
839
|
},
|
|
553
840
|
SERVER_PROPS_EXPORT_ERROR: function() {
|
|
554
|
-
return
|
|
841
|
+
return z;
|
|
555
842
|
},
|
|
556
843
|
SERVER_PROPS_GET_INIT_PROPS_CONFLICT: function() {
|
|
557
|
-
return
|
|
844
|
+
return I;
|
|
558
845
|
},
|
|
559
846
|
SERVER_PROPS_SSG_CONFLICT: function() {
|
|
560
|
-
return
|
|
847
|
+
return L;
|
|
561
848
|
},
|
|
562
849
|
SERVER_RUNTIME: function() {
|
|
563
|
-
return
|
|
850
|
+
return Tn;
|
|
564
851
|
},
|
|
565
852
|
SSG_FALLBACK_EXPORT_ERROR: function() {
|
|
566
|
-
return
|
|
853
|
+
return Cn;
|
|
567
854
|
},
|
|
568
855
|
SSG_GET_INITIAL_PROPS_CONFLICT: function() {
|
|
569
|
-
return
|
|
856
|
+
return F;
|
|
570
857
|
},
|
|
571
858
|
STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: function() {
|
|
572
|
-
return
|
|
859
|
+
return R;
|
|
573
860
|
},
|
|
574
861
|
UNSTABLE_REVALIDATE_RENAME_ERROR: function() {
|
|
575
|
-
return
|
|
862
|
+
return V;
|
|
576
863
|
},
|
|
577
864
|
WEBPACK_LAYERS: function() {
|
|
578
|
-
return
|
|
865
|
+
return q;
|
|
579
866
|
},
|
|
580
867
|
WEBPACK_RESOURCE_QUERIES: function() {
|
|
581
|
-
return
|
|
868
|
+
return En;
|
|
582
869
|
}
|
|
583
870
|
});
|
|
584
|
-
let n = "nxtP", r = "nxtI", i = "x-prerender-revalidate", a = "x-prerender-revalidate-if-generated", o = ".prefetch.rsc", s = ".rsc", c = ".action", l = ".json", u = ".meta", d = ".body", f = "x-next-cache-tags", p = "x-next-cache-soft-tags", m = "x-next-revalidated-tags", h = "x-next-revalidate-tag-token", g = 128, _ = 256, v = 1024, y = "_N_T_", b = 31536e3, x = "middleware", S = `(?:src/)?${x}`, C = "instrumentation", w = "private-next-pages", T = "private-dot-next", E = "private-next-root-dir",
|
|
871
|
+
let n = "nxtP", r = "nxtI", i = "x-prerender-revalidate", a = "x-prerender-revalidate-if-generated", o = ".prefetch.rsc", s = ".rsc", c = ".action", l = ".json", u = ".meta", d = ".body", f = "x-next-cache-tags", p = "x-next-cache-soft-tags", m = "x-next-revalidated-tags", h = "x-next-revalidate-tag-token", g = 128, _ = 256, v = 1024, y = "_N_T_", b = 31536e3, x = "middleware", S = `(?:src/)?${x}`, C = "instrumentation", w = "private-next-pages", T = "private-dot-next", E = "private-next-root-dir", D = "private-next-app-dir", O = "private-next-rsc-mod-ref-proxy", A = "private-next-rsc-action-validate", j = "private-next-rsc-server-reference", xn = "private-next-rsc-action-encryption", N = "private-next-rsc-action-client-wrapper", P = "You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict", F = "You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps", I = "You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.", L = "You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps", R = "can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props", z = "pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export", B = "Your `getStaticProps` function did not return an object. Did you forget to add a `return`?", Sn = "Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?", V = "The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.", H = "can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member", W = "You are using a non-standard \"NODE_ENV\" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env", Cn = "Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export", wn = [
|
|
585
872
|
"app",
|
|
586
873
|
"pages",
|
|
587
874
|
"components",
|
|
588
875
|
"lib",
|
|
589
876
|
"src"
|
|
590
|
-
],
|
|
877
|
+
], Tn = {
|
|
591
878
|
edge: "edge",
|
|
592
879
|
experimentalEdge: "experimental-edge",
|
|
593
880
|
nodejs: "nodejs"
|
|
594
|
-
},
|
|
881
|
+
}, G = {
|
|
595
882
|
shared: "shared",
|
|
596
883
|
reactServerComponents: "rsc",
|
|
597
884
|
serverSideRendering: "ssr",
|
|
@@ -603,40 +890,40 @@ function dr() {
|
|
|
603
890
|
appPagesBrowser: "app-pages-browser",
|
|
604
891
|
appMetadataRoute: "app-metadata-route",
|
|
605
892
|
appRouteHandler: "app-route-handler"
|
|
606
|
-
},
|
|
607
|
-
...
|
|
893
|
+
}, q = {
|
|
894
|
+
...G,
|
|
608
895
|
GROUP: {
|
|
609
896
|
serverOnly: [
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
897
|
+
G.reactServerComponents,
|
|
898
|
+
G.actionBrowser,
|
|
899
|
+
G.appMetadataRoute,
|
|
900
|
+
G.appRouteHandler,
|
|
901
|
+
G.instrument
|
|
615
902
|
],
|
|
616
|
-
clientOnly: [
|
|
617
|
-
nonClientServerTarget: [
|
|
903
|
+
clientOnly: [G.serverSideRendering, G.appPagesBrowser],
|
|
904
|
+
nonClientServerTarget: [G.middleware, G.api],
|
|
618
905
|
app: [
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
906
|
+
G.reactServerComponents,
|
|
907
|
+
G.actionBrowser,
|
|
908
|
+
G.appMetadataRoute,
|
|
909
|
+
G.appRouteHandler,
|
|
910
|
+
G.serverSideRendering,
|
|
911
|
+
G.appPagesBrowser,
|
|
912
|
+
G.shared,
|
|
913
|
+
G.instrument
|
|
627
914
|
]
|
|
628
915
|
}
|
|
629
|
-
},
|
|
916
|
+
}, En = {
|
|
630
917
|
edgeSSREntry: "__next_edge_ssr_entry__",
|
|
631
918
|
metadata: "__next_metadata__",
|
|
632
919
|
metadataRoute: "__next_metadata_route__",
|
|
633
920
|
metadataImageMeta: "__next_metadata_image_meta__"
|
|
634
921
|
};
|
|
635
|
-
})(
|
|
922
|
+
})(Fe)), Fe;
|
|
636
923
|
}
|
|
637
|
-
var
|
|
638
|
-
function
|
|
639
|
-
return
|
|
924
|
+
var yt;
|
|
925
|
+
function Ft() {
|
|
926
|
+
return yt || (yt = 1, (function(e) {
|
|
640
927
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
641
928
|
function t(e, t) {
|
|
642
929
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -661,7 +948,7 @@ function qt() {
|
|
|
661
948
|
return o;
|
|
662
949
|
}
|
|
663
950
|
});
|
|
664
|
-
let n =
|
|
951
|
+
let n = vr();
|
|
665
952
|
function r(e) {
|
|
666
953
|
let t = new Headers();
|
|
667
954
|
for (let [n, r] of Object.entries(e)) {
|
|
@@ -704,11 +991,11 @@ function qt() {
|
|
|
704
991
|
let r = [n.NEXT_QUERY_PARAM_PREFIX, n.NEXT_INTERCEPTION_MARKER_PREFIX];
|
|
705
992
|
for (let n of r) e !== n && e.startsWith(n) && t(e.substring(n.length));
|
|
706
993
|
}
|
|
707
|
-
})(
|
|
994
|
+
})(He)), He;
|
|
708
995
|
}
|
|
709
|
-
var
|
|
710
|
-
function
|
|
711
|
-
return
|
|
996
|
+
var Be = {}, St;
|
|
997
|
+
function Rr() {
|
|
998
|
+
return St || (St = 1, (function(e) {
|
|
712
999
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
713
1000
|
function t(e, t) {
|
|
714
1001
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -749,12 +1036,12 @@ function hr() {
|
|
|
749
1036
|
super("The request.ua has been removed in favour of `userAgent` function.\n Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n ");
|
|
750
1037
|
}
|
|
751
1038
|
}
|
|
752
|
-
})(
|
|
1039
|
+
})(Be)), Be;
|
|
753
1040
|
}
|
|
754
|
-
var
|
|
755
|
-
function
|
|
756
|
-
if (
|
|
757
|
-
|
|
1041
|
+
var Ge = {}, Xe, Tt;
|
|
1042
|
+
function Pr() {
|
|
1043
|
+
if (Tt) return Xe;
|
|
1044
|
+
Tt = 1;
|
|
758
1045
|
var e = Object.defineProperty, t = Object.getOwnPropertyDescriptor, n = Object.getOwnPropertyNames, r = Object.prototype.hasOwnProperty, i = (t, n) => {
|
|
759
1046
|
for (var r in n) e(t, r, {
|
|
760
1047
|
get: n[r],
|
|
@@ -773,7 +1060,7 @@ function fr() {
|
|
|
773
1060
|
parseCookie: () => l,
|
|
774
1061
|
parseSetCookie: () => u,
|
|
775
1062
|
stringifyCookie: () => c
|
|
776
|
-
}),
|
|
1063
|
+
}), Xe = o(s);
|
|
777
1064
|
function c(e) {
|
|
778
1065
|
let t = [
|
|
779
1066
|
"path" in e && e.path && `Path=${e.path}`,
|
|
@@ -980,11 +1267,11 @@ function fr() {
|
|
|
980
1267
|
}) {
|
|
981
1268
|
return typeof e.expires == "number" && (e.expires = new Date(e.expires)), e.maxAge && (e.expires = new Date(Date.now() + e.maxAge * 1e3)), (e.path === null || e.path === void 0) && (e.path = "/"), e;
|
|
982
1269
|
}
|
|
983
|
-
return
|
|
1270
|
+
return Xe;
|
|
984
1271
|
}
|
|
985
|
-
var
|
|
986
|
-
function
|
|
987
|
-
return
|
|
1272
|
+
var It;
|
|
1273
|
+
function Ze() {
|
|
1274
|
+
return It || (It = 1, (function(e) {
|
|
988
1275
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
989
1276
|
function t(e, t) {
|
|
990
1277
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -1003,12 +1290,12 @@ function $e() {
|
|
|
1003
1290
|
return n.stringifyCookie;
|
|
1004
1291
|
}
|
|
1005
1292
|
});
|
|
1006
|
-
let n =
|
|
1007
|
-
})(
|
|
1293
|
+
let n = Pr();
|
|
1294
|
+
})(Ge)), Ge;
|
|
1008
1295
|
}
|
|
1009
|
-
var
|
|
1010
|
-
function
|
|
1011
|
-
return
|
|
1296
|
+
var At;
|
|
1297
|
+
function yr() {
|
|
1298
|
+
return At || (At = 1, (function(e) {
|
|
1012
1299
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
1013
1300
|
function t(e, t) {
|
|
1014
1301
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -1024,7 +1311,7 @@ function pr() {
|
|
|
1024
1311
|
return s;
|
|
1025
1312
|
}
|
|
1026
1313
|
});
|
|
1027
|
-
let n =
|
|
1314
|
+
let n = Ht(), r = Ft(), i = Rr(), a = Ze(), o = /* @__PURE__ */ Symbol("internal request");
|
|
1028
1315
|
class s extends Request {
|
|
1029
1316
|
constructor(e, t = {}) {
|
|
1030
1317
|
let i = typeof e != "string" && "url" in e ? e.url : String(e);
|
|
@@ -1087,9 +1374,9 @@ function pr() {
|
|
|
1087
1374
|
}
|
|
1088
1375
|
})(Te)), Te;
|
|
1089
1376
|
}
|
|
1090
|
-
var
|
|
1091
|
-
function
|
|
1092
|
-
return
|
|
1377
|
+
var We = {}, ze = {}, Ot;
|
|
1378
|
+
function Sr() {
|
|
1379
|
+
return Ot || (Ot = 1, (function(e) {
|
|
1093
1380
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "ReflectAdapter", {
|
|
1094
1381
|
enumerable: !0,
|
|
1095
1382
|
get: function() {
|
|
@@ -1111,18 +1398,18 @@ function mr() {
|
|
|
1111
1398
|
return Reflect.deleteProperty(e, t);
|
|
1112
1399
|
}
|
|
1113
1400
|
}
|
|
1114
|
-
})(
|
|
1401
|
+
})(ze)), ze;
|
|
1115
1402
|
}
|
|
1116
|
-
var
|
|
1117
|
-
function
|
|
1118
|
-
return
|
|
1403
|
+
var xt;
|
|
1404
|
+
function Tr() {
|
|
1405
|
+
return xt || (xt = 1, (function(e) {
|
|
1119
1406
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "NextResponse", {
|
|
1120
1407
|
enumerable: !0,
|
|
1121
1408
|
get: function() {
|
|
1122
1409
|
return l;
|
|
1123
1410
|
}
|
|
1124
1411
|
});
|
|
1125
|
-
let t =
|
|
1412
|
+
let t = Ze(), n = Ht(), r = Ft(), i = Sr(), a = Ze(), o = /* @__PURE__ */ Symbol("internal response"), s = /* @__PURE__ */ new Set([
|
|
1126
1413
|
301,
|
|
1127
1414
|
302,
|
|
1128
1415
|
303,
|
|
@@ -1205,11 +1492,11 @@ function _r() {
|
|
|
1205
1492
|
});
|
|
1206
1493
|
}
|
|
1207
1494
|
}
|
|
1208
|
-
})(
|
|
1495
|
+
})(We)), We;
|
|
1209
1496
|
}
|
|
1210
|
-
var
|
|
1211
|
-
function
|
|
1212
|
-
return
|
|
1497
|
+
var Ve = {}, Nt;
|
|
1498
|
+
function Ir() {
|
|
1499
|
+
return Nt || (Nt = 1, (function(e) {
|
|
1213
1500
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "ImageResponse", {
|
|
1214
1501
|
enumerable: !0,
|
|
1215
1502
|
get: function() {
|
|
@@ -1219,27 +1506,27 @@ function br() {
|
|
|
1219
1506
|
function t() {
|
|
1220
1507
|
throw Error("ImageResponse moved from \"next/server\" to \"next/og\" since Next.js 14, please import from \"next/og\" instead");
|
|
1221
1508
|
}
|
|
1222
|
-
})(
|
|
1509
|
+
})(Ve)), Ve;
|
|
1223
1510
|
}
|
|
1224
|
-
var
|
|
1225
|
-
function
|
|
1226
|
-
return
|
|
1511
|
+
var Ke = {}, Ye = { exports: {} }, Ct;
|
|
1512
|
+
function Ar() {
|
|
1513
|
+
return Ct || (Ct = 1, (() => {
|
|
1227
1514
|
var e = { 226: function(e, t) {
|
|
1228
1515
|
(function(n, r) {
|
|
1229
|
-
var i = "1.0.35", a = "", o = "?", s = "function", c = "undefined", l = "object", u = "string", d = "major", f = "model", p = "name", m = "type", h = "vendor", g = "version", _ = "architecture", v = "console", y = "mobile", b = "tablet", x = "smarttv", S = "wearable", C = "embedded", w = 350, T = "Amazon", E = "Apple",
|
|
1516
|
+
var i = "1.0.35", a = "", o = "?", s = "function", c = "undefined", l = "object", u = "string", d = "major", f = "model", p = "name", m = "type", h = "vendor", g = "version", _ = "architecture", v = "console", y = "mobile", b = "tablet", x = "smarttv", S = "wearable", C = "embedded", w = 350, T = "Amazon", E = "Apple", D = "ASUS", O = "BlackBerry", A = "Browser", j = "Chrome", xn = "Edge", N = "Firefox", P = "Google", F = "Huawei", I = "LG", L = "Microsoft", R = "Motorola", z = "Opera", B = "Samsung", Sn = "Sharp", V = "Sony", H = "Xiaomi", W = "Zebra", Cn = "Facebook", wn = "Chromium OS", Tn = "Mac OS", G = function(e, t) {
|
|
1230
1517
|
var n = {};
|
|
1231
1518
|
for (var r in e) t[r] && t[r].length % 2 == 0 ? n[r] = t[r].concat(e[r]) : n[r] = e[r];
|
|
1232
1519
|
return n;
|
|
1233
|
-
},
|
|
1520
|
+
}, q = function(e) {
|
|
1234
1521
|
for (var t = {}, n = 0; n < e.length; n++) t[e[n].toUpperCase()] = e[n];
|
|
1235
1522
|
return t;
|
|
1236
|
-
},
|
|
1237
|
-
return typeof e === u ?
|
|
1238
|
-
},
|
|
1523
|
+
}, En = function(e, t) {
|
|
1524
|
+
return typeof e === u ? J(t).indexOf(J(e)) !== -1 : !1;
|
|
1525
|
+
}, J = function(e) {
|
|
1239
1526
|
return e.toLowerCase();
|
|
1240
|
-
},
|
|
1527
|
+
}, Dn = function(e) {
|
|
1241
1528
|
return typeof e === u ? e.replace(/[^\d\.]/g, a).split(".")[0] : r;
|
|
1242
|
-
},
|
|
1529
|
+
}, On = function(e, t) {
|
|
1243
1530
|
if (typeof e === u) return e = e.replace(/^\s\s*/, a), typeof t === c ? e : e.substring(0, w);
|
|
1244
1531
|
}, X = function(e, t) {
|
|
1245
1532
|
for (var n = 0, i, a, o, c, u, d; n < t.length && !u;) {
|
|
@@ -1247,12 +1534,12 @@ function gr() {
|
|
|
1247
1534
|
for (i = a = 0; i < f.length && !u && f[i];) if (u = f[i++].exec(e), u) for (o = 0; o < p.length; o++) d = u[++a], c = p[o], typeof c === l && c.length > 0 ? c.length === 2 ? typeof c[1] == s ? this[c[0]] = c[1].call(this, d) : this[c[0]] = c[1] : c.length === 3 ? typeof c[1] === s && !(c[1].exec && c[1].test) ? this[c[0]] = d ? c[1].call(this, d, c[2]) : r : this[c[0]] = d ? d.replace(c[1], c[2]) : r : c.length === 4 && (this[c[0]] = d ? c[3].call(this, d.replace(c[1], c[2])) : r) : this[c] = d || r;
|
|
1248
1535
|
n += 2;
|
|
1249
1536
|
}
|
|
1250
|
-
},
|
|
1537
|
+
}, kn = function(e, t) {
|
|
1251
1538
|
for (var n in t) if (typeof t[n] === l && t[n].length > 0) {
|
|
1252
|
-
for (var i = 0; i < t[n].length; i++) if (
|
|
1253
|
-
} else if (
|
|
1539
|
+
for (var i = 0; i < t[n].length; i++) if (En(t[n][i], e)) return n === o ? r : n;
|
|
1540
|
+
} else if (En(t[n], e)) return n === o ? r : n;
|
|
1254
1541
|
return e;
|
|
1255
|
-
},
|
|
1542
|
+
}, An = {
|
|
1256
1543
|
"1.0": "/8",
|
|
1257
1544
|
1.2: "/1",
|
|
1258
1545
|
1.3: "/3",
|
|
@@ -1261,7 +1548,7 @@ function gr() {
|
|
|
1261
1548
|
"2.0.3": "/417",
|
|
1262
1549
|
"2.0.4": "/419",
|
|
1263
1550
|
"?": "/"
|
|
1264
|
-
},
|
|
1551
|
+
}, jn = {
|
|
1265
1552
|
ME: "4.90",
|
|
1266
1553
|
"NT 3.11": "NT3.51",
|
|
1267
1554
|
"NT 4.0": "NT4.0",
|
|
@@ -1273,7 +1560,7 @@ function gr() {
|
|
|
1273
1560
|
8.1: "NT 6.3",
|
|
1274
1561
|
10: ["NT 6.4", "NT 10.0"],
|
|
1275
1562
|
RT: "ARM"
|
|
1276
|
-
},
|
|
1563
|
+
}, Mn = {
|
|
1277
1564
|
browser: [
|
|
1278
1565
|
[/\b(?:crmo|crios)\/([\w\.]+)/i],
|
|
1279
1566
|
[g, [p, "Chrome"]],
|
|
@@ -1286,9 +1573,9 @@ function gr() {
|
|
|
1286
1573
|
],
|
|
1287
1574
|
[p, g],
|
|
1288
1575
|
[/opios[\/ ]+([\w\.]+)/i],
|
|
1289
|
-
[g, [p,
|
|
1576
|
+
[g, [p, z + " Mini"]],
|
|
1290
1577
|
[/\bopr\/([\w\.]+)/i],
|
|
1291
|
-
[g, [p,
|
|
1578
|
+
[g, [p, z]],
|
|
1292
1579
|
[
|
|
1293
1580
|
/(kindle)\/([\w\.]+)/i,
|
|
1294
1581
|
/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,
|
|
@@ -1301,7 +1588,7 @@ function gr() {
|
|
|
1301
1588
|
],
|
|
1302
1589
|
[p, g],
|
|
1303
1590
|
[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],
|
|
1304
|
-
[g, [p, "UC" +
|
|
1591
|
+
[g, [p, "UC" + A]],
|
|
1305
1592
|
[/microm.+\bqbcore\/([\w\.]+)/i, /\bqbcore\/([\w\.]+).+microm/i],
|
|
1306
1593
|
[g, [p, "WeChat(Win) Desktop"]],
|
|
1307
1594
|
[/micromessenger\/([\w\.]+)/i],
|
|
@@ -1316,29 +1603,29 @@ function gr() {
|
|
|
1316
1603
|
[[
|
|
1317
1604
|
p,
|
|
1318
1605
|
/(.+)/,
|
|
1319
|
-
"$1 Secure " +
|
|
1606
|
+
"$1 Secure " + A
|
|
1320
1607
|
], g],
|
|
1321
1608
|
[/\bfocus\/([\w\.]+)/i],
|
|
1322
|
-
[g, [p,
|
|
1609
|
+
[g, [p, N + " Focus"]],
|
|
1323
1610
|
[/\bopt\/([\w\.]+)/i],
|
|
1324
|
-
[g, [p,
|
|
1611
|
+
[g, [p, z + " Touch"]],
|
|
1325
1612
|
[/coc_coc\w+\/([\w\.]+)/i],
|
|
1326
1613
|
[g, [p, "Coc Coc"]],
|
|
1327
1614
|
[/dolfin\/([\w\.]+)/i],
|
|
1328
1615
|
[g, [p, "Dolphin"]],
|
|
1329
1616
|
[/coast\/([\w\.]+)/i],
|
|
1330
|
-
[g, [p,
|
|
1617
|
+
[g, [p, z + " Coast"]],
|
|
1331
1618
|
[/miuibrowser\/([\w\.]+)/i],
|
|
1332
|
-
[g, [p, "MIUI " +
|
|
1619
|
+
[g, [p, "MIUI " + A]],
|
|
1333
1620
|
[/fxios\/([-\w\.]+)/i],
|
|
1334
|
-
[g, [p,
|
|
1621
|
+
[g, [p, N]],
|
|
1335
1622
|
[/\bqihu|(qi?ho?o?|360)browser/i],
|
|
1336
|
-
[[p, "360 " +
|
|
1623
|
+
[[p, "360 " + A]],
|
|
1337
1624
|
[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],
|
|
1338
1625
|
[[
|
|
1339
1626
|
p,
|
|
1340
1627
|
/(.+)/,
|
|
1341
|
-
"$1 " +
|
|
1628
|
+
"$1 " + A
|
|
1342
1629
|
], g],
|
|
1343
1630
|
[/(comodo_dragon)\/([\w\.]+)/i],
|
|
1344
1631
|
[[
|
|
@@ -1359,7 +1646,7 @@ function gr() {
|
|
|
1359
1646
|
],
|
|
1360
1647
|
[p],
|
|
1361
1648
|
[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],
|
|
1362
|
-
[[p,
|
|
1649
|
+
[[p, Cn], g],
|
|
1363
1650
|
[
|
|
1364
1651
|
/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,
|
|
1365
1652
|
/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,
|
|
@@ -1373,11 +1660,11 @@ function gr() {
|
|
|
1373
1660
|
[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],
|
|
1374
1661
|
[g, [p, "TikTok"]],
|
|
1375
1662
|
[/headlesschrome(?:\/([\w\.]+)| )/i],
|
|
1376
|
-
[g, [p,
|
|
1663
|
+
[g, [p, j + " Headless"]],
|
|
1377
1664
|
[/ wv\).+(chrome)\/([\w\.]+)/i],
|
|
1378
|
-
[[p,
|
|
1665
|
+
[[p, j + " WebView"], g],
|
|
1379
1666
|
[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],
|
|
1380
|
-
[g, [p, "Android " +
|
|
1667
|
+
[g, [p, "Android " + A]],
|
|
1381
1668
|
[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],
|
|
1382
1669
|
[p, g],
|
|
1383
1670
|
[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],
|
|
@@ -1387,15 +1674,15 @@ function gr() {
|
|
|
1387
1674
|
[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],
|
|
1388
1675
|
[p, [
|
|
1389
1676
|
g,
|
|
1390
|
-
|
|
1391
|
-
|
|
1677
|
+
kn,
|
|
1678
|
+
An
|
|
1392
1679
|
]],
|
|
1393
1680
|
[/(webkit|khtml)\/([\w\.]+)/i],
|
|
1394
1681
|
[p, g],
|
|
1395
1682
|
[/(navigator|netscape\d?)\/([-\w\.]+)/i],
|
|
1396
1683
|
[[p, "Netscape"], g],
|
|
1397
1684
|
[/mobile vr; rv:([\w\.]+)\).+firefox/i],
|
|
1398
|
-
[g, [p,
|
|
1685
|
+
[g, [p, N + " Reality"]],
|
|
1399
1686
|
[
|
|
1400
1687
|
/ekiohf.+(flow)\/([\w\.]+)/i,
|
|
1401
1688
|
/(swiftfox)/i,
|
|
@@ -1419,7 +1706,7 @@ function gr() {
|
|
|
1419
1706
|
[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],
|
|
1420
1707
|
[[_, "amd64"]],
|
|
1421
1708
|
[/(ia32(?=;))/i],
|
|
1422
|
-
[[_,
|
|
1709
|
+
[[_, J]],
|
|
1423
1710
|
[/((?:i[346]|x)86)[;\)]/i],
|
|
1424
1711
|
[[_, "ia32"]],
|
|
1425
1712
|
[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],
|
|
@@ -1433,18 +1720,18 @@ function gr() {
|
|
|
1433
1720
|
_,
|
|
1434
1721
|
/ower/,
|
|
1435
1722
|
a,
|
|
1436
|
-
|
|
1723
|
+
J
|
|
1437
1724
|
]],
|
|
1438
1725
|
[/(sun4\w)[;\)]/i],
|
|
1439
1726
|
[[_, "sparc"]],
|
|
1440
1727
|
[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],
|
|
1441
|
-
[[_,
|
|
1728
|
+
[[_, J]]
|
|
1442
1729
|
],
|
|
1443
1730
|
device: [
|
|
1444
1731
|
[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],
|
|
1445
1732
|
[
|
|
1446
1733
|
f,
|
|
1447
|
-
[h,
|
|
1734
|
+
[h, B],
|
|
1448
1735
|
[m, b]
|
|
1449
1736
|
],
|
|
1450
1737
|
[
|
|
@@ -1454,7 +1741,7 @@ function gr() {
|
|
|
1454
1741
|
],
|
|
1455
1742
|
[
|
|
1456
1743
|
f,
|
|
1457
|
-
[h,
|
|
1744
|
+
[h, B],
|
|
1458
1745
|
[m, y]
|
|
1459
1746
|
],
|
|
1460
1747
|
[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],
|
|
@@ -1478,19 +1765,19 @@ function gr() {
|
|
|
1478
1765
|
[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],
|
|
1479
1766
|
[
|
|
1480
1767
|
f,
|
|
1481
|
-
[h,
|
|
1768
|
+
[h, Sn],
|
|
1482
1769
|
[m, y]
|
|
1483
1770
|
],
|
|
1484
1771
|
[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],
|
|
1485
1772
|
[
|
|
1486
1773
|
f,
|
|
1487
|
-
[h,
|
|
1774
|
+
[h, F],
|
|
1488
1775
|
[m, b]
|
|
1489
1776
|
],
|
|
1490
1777
|
[/(?:huawei|honor)([-\w ]+)[;\)]/i, /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],
|
|
1491
1778
|
[
|
|
1492
1779
|
f,
|
|
1493
|
-
[h,
|
|
1780
|
+
[h, F],
|
|
1494
1781
|
[m, y]
|
|
1495
1782
|
],
|
|
1496
1783
|
[
|
|
@@ -1506,7 +1793,7 @@ function gr() {
|
|
|
1506
1793
|
/_/g,
|
|
1507
1794
|
" "
|
|
1508
1795
|
],
|
|
1509
|
-
[h,
|
|
1796
|
+
[h, H],
|
|
1510
1797
|
[m, y]
|
|
1511
1798
|
],
|
|
1512
1799
|
[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],
|
|
@@ -1516,7 +1803,7 @@ function gr() {
|
|
|
1516
1803
|
/_/g,
|
|
1517
1804
|
" "
|
|
1518
1805
|
],
|
|
1519
|
-
[h,
|
|
1806
|
+
[h, H],
|
|
1520
1807
|
[m, b]
|
|
1521
1808
|
],
|
|
1522
1809
|
[/; (\w+) bui.+ oppo/i, /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],
|
|
@@ -1544,19 +1831,19 @@ function gr() {
|
|
|
1544
1831
|
],
|
|
1545
1832
|
[
|
|
1546
1833
|
f,
|
|
1547
|
-
[h,
|
|
1834
|
+
[h, R],
|
|
1548
1835
|
[m, y]
|
|
1549
1836
|
],
|
|
1550
1837
|
[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],
|
|
1551
1838
|
[
|
|
1552
1839
|
f,
|
|
1553
|
-
[h,
|
|
1840
|
+
[h, R],
|
|
1554
1841
|
[m, b]
|
|
1555
1842
|
],
|
|
1556
1843
|
[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],
|
|
1557
1844
|
[
|
|
1558
1845
|
f,
|
|
1559
|
-
[h,
|
|
1846
|
+
[h, I],
|
|
1560
1847
|
[m, b]
|
|
1561
1848
|
],
|
|
1562
1849
|
[
|
|
@@ -1566,7 +1853,7 @@ function gr() {
|
|
|
1566
1853
|
],
|
|
1567
1854
|
[
|
|
1568
1855
|
f,
|
|
1569
|
-
[h,
|
|
1856
|
+
[h, I],
|
|
1570
1857
|
[m, y]
|
|
1571
1858
|
],
|
|
1572
1859
|
[/(ideatab[-\w ]+)/i, /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],
|
|
@@ -1588,25 +1875,25 @@ function gr() {
|
|
|
1588
1875
|
[/(pixel c)\b/i],
|
|
1589
1876
|
[
|
|
1590
1877
|
f,
|
|
1591
|
-
[h,
|
|
1878
|
+
[h, P],
|
|
1592
1879
|
[m, b]
|
|
1593
1880
|
],
|
|
1594
1881
|
[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],
|
|
1595
1882
|
[
|
|
1596
1883
|
f,
|
|
1597
|
-
[h,
|
|
1884
|
+
[h, P],
|
|
1598
1885
|
[m, y]
|
|
1599
1886
|
],
|
|
1600
1887
|
[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],
|
|
1601
1888
|
[
|
|
1602
1889
|
f,
|
|
1603
|
-
[h,
|
|
1890
|
+
[h, V],
|
|
1604
1891
|
[m, y]
|
|
1605
1892
|
],
|
|
1606
1893
|
[/sony tablet [ps]/i, /\b(?:sony)?sgp\w+(?: bui|\))/i],
|
|
1607
1894
|
[
|
|
1608
1895
|
[f, "Xperia Tablet"],
|
|
1609
|
-
[h,
|
|
1896
|
+
[h, V],
|
|
1610
1897
|
[m, b]
|
|
1611
1898
|
],
|
|
1612
1899
|
[/ (kb2005|in20[12]5|be20[12][59])\b/i, /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],
|
|
@@ -1644,19 +1931,19 @@ function gr() {
|
|
|
1644
1931
|
[/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i],
|
|
1645
1932
|
[
|
|
1646
1933
|
f,
|
|
1647
|
-
[h,
|
|
1934
|
+
[h, O],
|
|
1648
1935
|
[m, y]
|
|
1649
1936
|
],
|
|
1650
1937
|
[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],
|
|
1651
1938
|
[
|
|
1652
1939
|
f,
|
|
1653
|
-
[h,
|
|
1940
|
+
[h, D],
|
|
1654
1941
|
[m, b]
|
|
1655
1942
|
],
|
|
1656
1943
|
[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],
|
|
1657
1944
|
[
|
|
1658
1945
|
f,
|
|
1659
|
-
[h,
|
|
1946
|
+
[h, D],
|
|
1660
1947
|
[m, y]
|
|
1661
1948
|
],
|
|
1662
1949
|
[/(nexus 9)/i],
|
|
@@ -1725,7 +2012,7 @@ function gr() {
|
|
|
1725
2012
|
[/(surface duo)/i],
|
|
1726
2013
|
[
|
|
1727
2014
|
f,
|
|
1728
|
-
[h,
|
|
2015
|
+
[h, L],
|
|
1729
2016
|
[m, b]
|
|
1730
2017
|
],
|
|
1731
2018
|
[/droid [\d\.]+; (fp\du?)(?: b|\))/i],
|
|
@@ -1879,19 +2166,19 @@ function gr() {
|
|
|
1879
2166
|
/\./g,
|
|
1880
2167
|
" "
|
|
1881
2168
|
],
|
|
1882
|
-
[h,
|
|
2169
|
+
[h, L],
|
|
1883
2170
|
[m, y]
|
|
1884
2171
|
],
|
|
1885
2172
|
[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],
|
|
1886
2173
|
[
|
|
1887
2174
|
f,
|
|
1888
|
-
[h,
|
|
2175
|
+
[h, W],
|
|
1889
2176
|
[m, b]
|
|
1890
2177
|
],
|
|
1891
2178
|
[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],
|
|
1892
2179
|
[
|
|
1893
2180
|
f,
|
|
1894
|
-
[h,
|
|
2181
|
+
[h, W],
|
|
1895
2182
|
[m, y]
|
|
1896
2183
|
],
|
|
1897
2184
|
[/smart-tv.+(samsung)/i],
|
|
@@ -1903,11 +2190,11 @@ function gr() {
|
|
|
1903
2190
|
/^/,
|
|
1904
2191
|
"SmartTV"
|
|
1905
2192
|
],
|
|
1906
|
-
[h,
|
|
2193
|
+
[h, B],
|
|
1907
2194
|
[m, x]
|
|
1908
2195
|
],
|
|
1909
2196
|
[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],
|
|
1910
|
-
[[h,
|
|
2197
|
+
[[h, I], [m, x]],
|
|
1911
2198
|
[/(apple) ?tv/i],
|
|
1912
2199
|
[
|
|
1913
2200
|
h,
|
|
@@ -1916,8 +2203,8 @@ function gr() {
|
|
|
1916
2203
|
],
|
|
1917
2204
|
[/crkey/i],
|
|
1918
2205
|
[
|
|
1919
|
-
[f,
|
|
1920
|
-
[h,
|
|
2206
|
+
[f, j + "cast"],
|
|
2207
|
+
[h, P],
|
|
1921
2208
|
[m, x]
|
|
1922
2209
|
],
|
|
1923
2210
|
[/droid.+aft(\w)( bui|\))/i],
|
|
@@ -1929,19 +2216,19 @@ function gr() {
|
|
|
1929
2216
|
[/\(dtv[\);].+(aquos)/i, /(aquos-tv[\w ]+)\)/i],
|
|
1930
2217
|
[
|
|
1931
2218
|
f,
|
|
1932
|
-
[h,
|
|
2219
|
+
[h, Sn],
|
|
1933
2220
|
[m, x]
|
|
1934
2221
|
],
|
|
1935
2222
|
[/(bravia[\w ]+)( bui|\))/i],
|
|
1936
2223
|
[
|
|
1937
2224
|
f,
|
|
1938
|
-
[h,
|
|
2225
|
+
[h, V],
|
|
1939
2226
|
[m, x]
|
|
1940
2227
|
],
|
|
1941
2228
|
[/(mitv-\w{5}) bui/i],
|
|
1942
2229
|
[
|
|
1943
2230
|
f,
|
|
1944
|
-
[h,
|
|
2231
|
+
[h, H],
|
|
1945
2232
|
[m, x]
|
|
1946
2233
|
],
|
|
1947
2234
|
[/Hbbtv.*(technisat) (.*);/i],
|
|
@@ -1952,8 +2239,8 @@ function gr() {
|
|
|
1952
2239
|
],
|
|
1953
2240
|
[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],
|
|
1954
2241
|
[
|
|
1955
|
-
[h,
|
|
1956
|
-
[f,
|
|
2242
|
+
[h, On],
|
|
2243
|
+
[f, On],
|
|
1957
2244
|
[m, x]
|
|
1958
2245
|
],
|
|
1959
2246
|
[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],
|
|
@@ -1973,13 +2260,13 @@ function gr() {
|
|
|
1973
2260
|
[/(playstation [345portablevi]+)/i],
|
|
1974
2261
|
[
|
|
1975
2262
|
f,
|
|
1976
|
-
[h,
|
|
2263
|
+
[h, V],
|
|
1977
2264
|
[m, v]
|
|
1978
2265
|
],
|
|
1979
2266
|
[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],
|
|
1980
2267
|
[
|
|
1981
2268
|
f,
|
|
1982
|
-
[h,
|
|
2269
|
+
[h, L],
|
|
1983
2270
|
[m, v]
|
|
1984
2271
|
],
|
|
1985
2272
|
[/((pebble))app/i],
|
|
@@ -1997,19 +2284,19 @@ function gr() {
|
|
|
1997
2284
|
[/droid.+; (glass) \d/i],
|
|
1998
2285
|
[
|
|
1999
2286
|
f,
|
|
2000
|
-
[h,
|
|
2287
|
+
[h, P],
|
|
2001
2288
|
[m, S]
|
|
2002
2289
|
],
|
|
2003
2290
|
[/droid.+; (wt63?0{2,3})\)/i],
|
|
2004
2291
|
[
|
|
2005
2292
|
f,
|
|
2006
|
-
[h,
|
|
2293
|
+
[h, W],
|
|
2007
2294
|
[m, S]
|
|
2008
2295
|
],
|
|
2009
2296
|
[/(quest( 2| pro)?)/i],
|
|
2010
2297
|
[
|
|
2011
2298
|
f,
|
|
2012
|
-
[h,
|
|
2299
|
+
[h, Cn],
|
|
2013
2300
|
[m, S]
|
|
2014
2301
|
],
|
|
2015
2302
|
[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],
|
|
@@ -2033,7 +2320,7 @@ function gr() {
|
|
|
2033
2320
|
],
|
|
2034
2321
|
engine: [
|
|
2035
2322
|
[/windows.+ edge\/([\w\.]+)/i],
|
|
2036
|
-
[g, [p,
|
|
2323
|
+
[g, [p, xn + "HTML"]],
|
|
2037
2324
|
[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],
|
|
2038
2325
|
[g, [p, "Blink"]],
|
|
2039
2326
|
[
|
|
@@ -2058,14 +2345,14 @@ function gr() {
|
|
|
2058
2345
|
],
|
|
2059
2346
|
[p, [
|
|
2060
2347
|
g,
|
|
2061
|
-
|
|
2062
|
-
|
|
2348
|
+
kn,
|
|
2349
|
+
jn
|
|
2063
2350
|
]],
|
|
2064
2351
|
[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],
|
|
2065
2352
|
[[p, "Windows"], [
|
|
2066
2353
|
g,
|
|
2067
|
-
|
|
2068
|
-
|
|
2354
|
+
kn,
|
|
2355
|
+
jn
|
|
2069
2356
|
]],
|
|
2070
2357
|
[
|
|
2071
2358
|
/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,
|
|
@@ -2078,7 +2365,7 @@ function gr() {
|
|
|
2078
2365
|
"."
|
|
2079
2366
|
], [p, "iOS"]],
|
|
2080
2367
|
[/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i],
|
|
2081
|
-
[[p,
|
|
2368
|
+
[[p, Tn], [
|
|
2082
2369
|
g,
|
|
2083
2370
|
/_/g,
|
|
2084
2371
|
"."
|
|
@@ -2093,19 +2380,19 @@ function gr() {
|
|
|
2093
2380
|
],
|
|
2094
2381
|
[p, g],
|
|
2095
2382
|
[/\(bb(10);/i],
|
|
2096
|
-
[g, [p,
|
|
2383
|
+
[g, [p, O]],
|
|
2097
2384
|
[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],
|
|
2098
2385
|
[g, [p, "Symbian"]],
|
|
2099
2386
|
[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],
|
|
2100
|
-
[g, [p,
|
|
2387
|
+
[g, [p, N + " OS"]],
|
|
2101
2388
|
[/web0s;.+rt(tv)/i, /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],
|
|
2102
2389
|
[g, [p, "webOS"]],
|
|
2103
2390
|
[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],
|
|
2104
2391
|
[g, [p, "watchOS"]],
|
|
2105
2392
|
[/crkey\/([\d\.]+)/i],
|
|
2106
|
-
[g, [p,
|
|
2393
|
+
[g, [p, j + "cast"]],
|
|
2107
2394
|
[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],
|
|
2108
|
-
[[p,
|
|
2395
|
+
[[p, wn], g],
|
|
2109
2396
|
[
|
|
2110
2397
|
/panasonic;(viera)/i,
|
|
2111
2398
|
/(netrange)mmh/i,
|
|
@@ -2134,10 +2421,10 @@ function gr() {
|
|
|
2134
2421
|
]
|
|
2135
2422
|
}, Z = function(e, t) {
|
|
2136
2423
|
if (typeof e === l && (t = e, e = r), !(this instanceof Z)) return new Z(e, t).getResult();
|
|
2137
|
-
var i = typeof n !== c && n.navigator ? n.navigator : r, o = e || (i && i.userAgent ? i.userAgent : a), v = i && i.userAgentData ? i.userAgentData : r, x = t ?
|
|
2424
|
+
var i = typeof n !== c && n.navigator ? n.navigator : r, o = e || (i && i.userAgent ? i.userAgent : a), v = i && i.userAgentData ? i.userAgentData : r, x = t ? G(Mn, t) : Mn, S = i && i.userAgent == o;
|
|
2138
2425
|
return this.getBrowser = function() {
|
|
2139
2426
|
var e = {};
|
|
2140
|
-
return e[p] = r, e[g] = r, X.call(e, o, x.browser), e[d] =
|
|
2427
|
+
return e[p] = r, e[g] = r, X.call(e, o, x.browser), e[d] = Dn(e[g]), S && i && i.brave && typeof i.brave.isBrave == s && (e[p] = "Brave"), e;
|
|
2141
2428
|
}, this.getCPU = function() {
|
|
2142
2429
|
var e = {};
|
|
2143
2430
|
return e[_] = r, X.call(e, o, x.cpu), e;
|
|
@@ -2149,7 +2436,7 @@ function gr() {
|
|
|
2149
2436
|
return e[p] = r, e[g] = r, X.call(e, o, x.engine), e;
|
|
2150
2437
|
}, this.getOS = function() {
|
|
2151
2438
|
var e = {};
|
|
2152
|
-
return e[p] = r, e[g] = r, X.call(e, o, x.os), S && !e[p] && v && v.platform != "Unknown" && (e[p] = v.platform.replace(/chrome os/i,
|
|
2439
|
+
return e[p] = r, e[g] = r, X.call(e, o, x.os), S && !e[p] && v && v.platform != "Unknown" && (e[p] = v.platform.replace(/chrome os/i, wn).replace(/macos/i, Tn)), e;
|
|
2153
2440
|
}, this.getResult = function() {
|
|
2154
2441
|
return {
|
|
2155
2442
|
ua: this.getUA(),
|
|
@@ -2162,14 +2449,14 @@ function gr() {
|
|
|
2162
2449
|
}, this.getUA = function() {
|
|
2163
2450
|
return o;
|
|
2164
2451
|
}, this.setUA = function(e) {
|
|
2165
|
-
return o = typeof e === u && e.length > w ?
|
|
2452
|
+
return o = typeof e === u && e.length > w ? On(e, w) : e, this;
|
|
2166
2453
|
}, this.setUA(o), this;
|
|
2167
2454
|
};
|
|
2168
|
-
Z.VERSION = i, Z.BROWSER =
|
|
2455
|
+
Z.VERSION = i, Z.BROWSER = q([
|
|
2169
2456
|
p,
|
|
2170
2457
|
g,
|
|
2171
2458
|
d
|
|
2172
|
-
]), Z.CPU =
|
|
2459
|
+
]), Z.CPU = q([_]), Z.DEVICE = q([
|
|
2173
2460
|
f,
|
|
2174
2461
|
h,
|
|
2175
2462
|
m,
|
|
@@ -2179,7 +2466,7 @@ function gr() {
|
|
|
2179
2466
|
b,
|
|
2180
2467
|
S,
|
|
2181
2468
|
C
|
|
2182
|
-
]), Z.ENGINE = Z.OS =
|
|
2469
|
+
]), Z.ENGINE = Z.OS = q([p, g]), typeof t === c ? typeof n !== c && (n.UAParser = Z) : (e.exports && (t = e.exports = Z), t.UAParser = Z);
|
|
2183
2470
|
var Q = typeof n !== c && (n.jQuery || n.Zepto);
|
|
2184
2471
|
if (Q && !Q.ua) {
|
|
2185
2472
|
var $ = new Z();
|
|
@@ -2204,12 +2491,12 @@ function gr() {
|
|
|
2204
2491
|
}
|
|
2205
2492
|
return a.exports;
|
|
2206
2493
|
}
|
|
2207
|
-
typeof n < "u" && (n.ab = {}.dirname + "/"),
|
|
2208
|
-
})()),
|
|
2494
|
+
typeof n < "u" && (n.ab = {}.dirname + "/"), Ye.exports = n(226);
|
|
2495
|
+
})()), Ye.exports;
|
|
2209
2496
|
}
|
|
2210
|
-
var
|
|
2211
|
-
function
|
|
2212
|
-
return
|
|
2497
|
+
var Lt;
|
|
2498
|
+
function kt() {
|
|
2499
|
+
return Lt || (Lt = 1, (function(e) {
|
|
2213
2500
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
2214
2501
|
function t(e, t) {
|
|
2215
2502
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -2228,7 +2515,7 @@ function Nt() {
|
|
|
2228
2515
|
return a;
|
|
2229
2516
|
}
|
|
2230
2517
|
});
|
|
2231
|
-
let n = /* @__PURE__ */ r(
|
|
2518
|
+
let n = /* @__PURE__ */ r(Ar());
|
|
2232
2519
|
function r(e) {
|
|
2233
2520
|
return e && e.__esModule ? e : { default: e };
|
|
2234
2521
|
}
|
|
@@ -2244,11 +2531,11 @@ function Nt() {
|
|
|
2244
2531
|
function o({ headers: e }) {
|
|
2245
2532
|
return a(e.get("user-agent") || void 0);
|
|
2246
2533
|
}
|
|
2247
|
-
})(
|
|
2534
|
+
})(Ke)), Ke;
|
|
2248
2535
|
}
|
|
2249
|
-
var
|
|
2250
|
-
function
|
|
2251
|
-
return
|
|
2536
|
+
var Je = {}, Ut;
|
|
2537
|
+
function Or() {
|
|
2538
|
+
return Ut || (Ut = 1, (function(e) {
|
|
2252
2539
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "URLPattern", {
|
|
2253
2540
|
enumerable: !0,
|
|
2254
2541
|
get: function() {
|
|
@@ -2256,39 +2543,35 @@ function wr() {
|
|
|
2256
2543
|
}
|
|
2257
2544
|
});
|
|
2258
2545
|
let t = typeof URLPattern > "u" ? void 0 : URLPattern;
|
|
2259
|
-
})(
|
|
2546
|
+
})(Je)), Je;
|
|
2260
2547
|
}
|
|
2261
|
-
var
|
|
2262
|
-
function
|
|
2263
|
-
return
|
|
2548
|
+
var Dt;
|
|
2549
|
+
function xr() {
|
|
2550
|
+
return Dt || (Dt = 1, (function(e, t) {
|
|
2264
2551
|
let n = {
|
|
2265
|
-
NextRequest:
|
|
2266
|
-
NextResponse:
|
|
2267
|
-
ImageResponse:
|
|
2268
|
-
userAgentFromString:
|
|
2269
|
-
userAgent:
|
|
2270
|
-
URLPattern:
|
|
2552
|
+
NextRequest: yr().NextRequest,
|
|
2553
|
+
NextResponse: Tr().NextResponse,
|
|
2554
|
+
ImageResponse: Ir().ImageResponse,
|
|
2555
|
+
userAgentFromString: kt().userAgentFromString,
|
|
2556
|
+
userAgent: kt().userAgent,
|
|
2557
|
+
URLPattern: Or().URLPattern
|
|
2271
2558
|
};
|
|
2272
2559
|
e.exports = n, t.NextRequest = n.NextRequest, t.NextResponse = n.NextResponse, t.ImageResponse = n.ImageResponse, t.userAgentFromString = n.userAgentFromString, t.userAgent = n.userAgent, t.URLPattern = n.URLPattern;
|
|
2273
|
-
})(
|
|
2560
|
+
})(ve, ve.exports)), ve.exports;
|
|
2274
2561
|
}
|
|
2275
|
-
|
|
2276
|
-
var
|
|
2562
|
+
xr();
|
|
2563
|
+
var et = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "logout", e))(et || {}), $e = {
|
|
2277
2564
|
login: "login",
|
|
2278
2565
|
logout: "logout",
|
|
2279
2566
|
unknown: ""
|
|
2280
|
-
},
|
|
2281
|
-
applicationJson: "application/json",
|
|
2282
|
-
multipartFormData: "multipart/form-data",
|
|
2283
|
-
applicationXwwwFormUrlencoded: "application/x-www-form-urlencoded"
|
|
2284
|
-
}, Gr = class {
|
|
2567
|
+
}, Jr = class {
|
|
2285
2568
|
config;
|
|
2286
2569
|
http;
|
|
2287
2570
|
adapter;
|
|
2288
2571
|
constructor({ config: e, adapter: t, storage: n }) {
|
|
2289
2572
|
this.config = e;
|
|
2290
|
-
let r =
|
|
2291
|
-
(!i || !a || !o || !s) && (r =
|
|
2573
|
+
let r = ir(n.headers), i = r.deviceId && r.deviceId.length > 0, a = r.websiteId && r.websiteId.length > 0, o = r.websiteNo && r.websiteNo.length > 0, s = r.lang && r.lang.length > 0;
|
|
2574
|
+
(!i || !a || !o || !s) && (r = or(n.cookies)), this.http = new cr({
|
|
2292
2575
|
...r,
|
|
2293
2576
|
userType: e.userType,
|
|
2294
2577
|
helloURL: e.helloURL
|
|
@@ -2299,20 +2582,20 @@ var Qe = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2299
2582
|
let t = await this.adapter.parseRequest(e), n = await this.processRequest(t);
|
|
2300
2583
|
return this.adapter.createResponse(n);
|
|
2301
2584
|
} catch (e) {
|
|
2302
|
-
|
|
2585
|
+
U.error({ error: e?.toString() || "Internal server error" }, "ROUTE ERROR");
|
|
2303
2586
|
let t = this.createErrorResponse(500, e?.toString() || "Internal server error");
|
|
2304
2587
|
return this.adapter.createResponse(t);
|
|
2305
2588
|
}
|
|
2306
2589
|
}
|
|
2307
2590
|
async processRequest(e) {
|
|
2308
2591
|
let t = e.url.searchParams, n = t.get("m") ?? "unknown", r = {
|
|
2309
|
-
|
|
2592
|
+
...$e,
|
|
2310
2593
|
...this.config.APIMAP
|
|
2311
2594
|
}[n], i = e.cookies;
|
|
2312
2595
|
if (this.http.setHttpOptsToCookies(i), !r || r.length === 0) return this.createErrorResponse(404, "API not found", i);
|
|
2313
2596
|
let a;
|
|
2314
|
-
if ((r.startsWith("admin/") || r.startsWith("api/")) && (a =
|
|
2315
|
-
|
|
2597
|
+
if ((r.startsWith("admin/") || r.startsWith("api/")) && (a = sr(i), U.debug(a, "token"), !a || a.username.length === 0 || a.token.length === 0)) return this.createErrorResponse(409, "Authentication required", i);
|
|
2598
|
+
U.debug({ "content-type": e.contentType }, "Content-Type"), U.debug({
|
|
2316
2599
|
hostUrl: r,
|
|
2317
2600
|
token: a ? { ...a } : ""
|
|
2318
2601
|
}, "processRequest");
|
|
@@ -2371,12 +2654,12 @@ var Qe = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2371
2654
|
};
|
|
2372
2655
|
if (t.success) {
|
|
2373
2656
|
switch (e) {
|
|
2374
|
-
case
|
|
2657
|
+
case $e[et[0]]:
|
|
2375
2658
|
let e = t.data;
|
|
2376
|
-
|
|
2659
|
+
ar(e, a);
|
|
2377
2660
|
break;
|
|
2378
|
-
case
|
|
2379
|
-
a.cleanCookies = (e) =>
|
|
2661
|
+
case $e[et[1]]:
|
|
2662
|
+
a.cleanCookies = (e) => ur(e);
|
|
2380
2663
|
break;
|
|
2381
2664
|
}
|
|
2382
2665
|
n.onHandlerSuccess && n.onHandlerSuccess({
|
|
@@ -2407,238 +2690,6 @@ var Qe = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2407
2690
|
t[e] = { value: n };
|
|
2408
2691
|
}), t;
|
|
2409
2692
|
}
|
|
2410
|
-
}, Rr = "zh-CN", U = {
|
|
2411
|
-
IBOOT_DEVICE_ID: "dvid",
|
|
2412
|
-
IBOOT_LANG: "lang",
|
|
2413
|
-
IBOOT_WEBSITE_ID: "wid",
|
|
2414
|
-
IBOOT_WEBSITE_NO: "wno",
|
|
2415
|
-
IBOOT_TOKEN: "token",
|
|
2416
|
-
IBOOT_USER: "user"
|
|
2417
|
-
}, K = {
|
|
2418
|
-
DEVICE_ID: "Device-Id",
|
|
2419
|
-
LANG: "Lang",
|
|
2420
|
-
WEBSITE_ID: "Website-Id",
|
|
2421
|
-
WEBSITE_NO: "Website-No"
|
|
2422
|
-
}, Tr = (e) => {
|
|
2423
|
-
if (e.get) {
|
|
2424
|
-
let t = e.get(K.DEVICE_ID), n = e.get(K.LANG), r = e.get(K.WEBSITE_ID), i = e.get(K.WEBSITE_NO), a = {};
|
|
2425
|
-
return t && t.length > 0 && (a.deviceId = t), n && n.length > 0 && (a.lang = n), r && r.length > 0 && (a.websiteId = r), i && i.length > 0 && (a.websiteNo = i), a;
|
|
2426
|
-
}
|
|
2427
|
-
throw Error("The get method of IStorage has not been implemented.");
|
|
2428
|
-
}, Sr = (e) => {
|
|
2429
|
-
if (e.get) {
|
|
2430
|
-
let t = e.get(U.IBOOT_DEVICE_ID), n = e.get(U.IBOOT_LANG), r = e.get(U.IBOOT_WEBSITE_ID), i = e.get(U.IBOOT_WEBSITE_NO), a = {};
|
|
2431
|
-
return t && t.length > 0 && (a.deviceId = t), n && n.length > 0 && (a.lang = n), r && r.length > 0 && (a.websiteId = r), i && i.length > 0 && (a.websiteNo = i), a;
|
|
2432
|
-
}
|
|
2433
|
-
throw Error("The get method of ICookies has not been implemented.");
|
|
2434
|
-
}, Kr = (e, t) => {
|
|
2435
|
-
if (e.set) t.deviceId && e.set(U.IBOOT_DEVICE_ID, t.deviceId), t.lang && e.set(U.IBOOT_LANG, t.lang), t.websiteId && e.set(U.IBOOT_WEBSITE_ID, t.websiteId), t.websiteNo && e.set(U.IBOOT_WEBSITE_NO, t.websiteNo);
|
|
2436
|
-
else throw Error("The set method of ICookies has not been implemented.");
|
|
2437
|
-
}, Ir = (e) => {
|
|
2438
|
-
if (e.get) {
|
|
2439
|
-
let t = e[U.IBOOT_USER];
|
|
2440
|
-
if (t && t.length > 0) {
|
|
2441
|
-
let n = JSON.parse(t), r = n.username, i = n.userType.toString(), a = e[U.IBOOT_TOKEN];
|
|
2442
|
-
if (a) return {
|
|
2443
|
-
username: r,
|
|
2444
|
-
utype: i,
|
|
2445
|
-
token: a
|
|
2446
|
-
};
|
|
2447
|
-
}
|
|
2448
|
-
}
|
|
2449
|
-
}, Ut = () => ({
|
|
2450
|
-
path: "/",
|
|
2451
|
-
secure: process.env.APP_ENV === "production",
|
|
2452
|
-
httpOnly: !0,
|
|
2453
|
-
sameSite: "strict"
|
|
2454
|
-
}), Ee = {
|
|
2455
|
-
maxAge: -1,
|
|
2456
|
-
httpOnly: !0,
|
|
2457
|
-
path: "/"
|
|
2458
|
-
}, Ar = (e, t) => {
|
|
2459
|
-
let { id: n, name: r, username: i, nickname: a, headImg: o, token: s, lastLoginTime: c, deviceId: l, userType: u, mustChangePwd: d } = e, f = {
|
|
2460
|
-
id: n,
|
|
2461
|
-
name: r,
|
|
2462
|
-
username: i,
|
|
2463
|
-
nickname: a || r,
|
|
2464
|
-
headImg: o,
|
|
2465
|
-
lastLoginTime: c,
|
|
2466
|
-
deviceId: l,
|
|
2467
|
-
userType: u,
|
|
2468
|
-
accountType: 0,
|
|
2469
|
-
needToReview: !1,
|
|
2470
|
-
socketOnline: !1,
|
|
2471
|
-
mustChangePwd: d
|
|
2472
|
-
};
|
|
2473
|
-
t.cookies[U.IBOOT_TOKEN] = {
|
|
2474
|
-
value: s,
|
|
2475
|
-
options: Ut()
|
|
2476
|
-
}, t.cookies[U.IBOOT_USER] = {
|
|
2477
|
-
value: JSON.stringify(f),
|
|
2478
|
-
options: Ut()
|
|
2479
|
-
};
|
|
2480
|
-
}, Or = (e) => {
|
|
2481
|
-
if (!e.set) throw Error("cookies set function is undefined");
|
|
2482
|
-
if (e.set(U.IBOOT_TOKEN, "", Ee), e.set(U.IBOOT_USER, "", Ee), !e.delete) throw Error("cookies delete function is undefined");
|
|
2483
|
-
e.delete(U.IBOOT_TOKEN, Ee), e.delete(U.IBOOT_USER, Ee);
|
|
2484
|
-
}, xr = class {
|
|
2485
|
-
baseUrl;
|
|
2486
|
-
helloMethod;
|
|
2487
|
-
apiKey;
|
|
2488
|
-
userType;
|
|
2489
|
-
userFrom;
|
|
2490
|
-
deviceId;
|
|
2491
|
-
version = "1";
|
|
2492
|
-
lang;
|
|
2493
|
-
websiteId;
|
|
2494
|
-
websiteNo;
|
|
2495
|
-
constructor(e) {
|
|
2496
|
-
process.env.APP_ENV === "production" || L.warn("This is currently a development environment!"), this.baseUrl = process.env.APP_BASEURL, this.apiKey = process.env.APP_APIKEY, this.userFrom = process.env.APP_USERFROM ?? "1", this.helloMethod = e.helloURL ?? "", this.userType = e.userType ?? Qt.TYPE_MGT, this.deviceId = e.deviceId ?? tr(), this.lang = e.lang ?? Rr, this.websiteId = e.websiteId, this.websiteNo = e.websiteNo;
|
|
2497
|
-
}
|
|
2498
|
-
encrypt(e) {
|
|
2499
|
-
let t = ne.enc.Utf8.parse(this.apiKey);
|
|
2500
|
-
return ne.AES.encrypt(e, t).toString();
|
|
2501
|
-
}
|
|
2502
|
-
decrypt(e) {
|
|
2503
|
-
let t = ne.enc.Utf8.parse(this.apiKey);
|
|
2504
|
-
return ne.AES.decrypt(e, t, { mode: ne.mode.ECB }).toString(ne.enc.Utf8);
|
|
2505
|
-
}
|
|
2506
|
-
setHttpOptsToCookies = (e) => {
|
|
2507
|
-
this.deviceId && this.deviceId.length > 0 && (e[U.IBOOT_DEVICE_ID] = this.deviceId), this.websiteId && this.websiteId.length > 0 && (e[U.IBOOT_WEBSITE_ID] = this.websiteId), this.websiteNo && this.websiteNo.length > 0 && (e[U.IBOOT_WEBSITE_NO] = this.websiteNo), this.lang && this.lang.length > 0 && (e[U.IBOOT_LANG] = this.lang);
|
|
2508
|
-
};
|
|
2509
|
-
async sign(e) {
|
|
2510
|
-
let t = "&key=" + await this.helloIboot(), r = [];
|
|
2511
|
-
for (let t of e.keys()) r.push(t);
|
|
2512
|
-
r.sort((e, t) => {
|
|
2513
|
-
let n = e.match(/(\d+)/), r = t.match(/(\d+)/);
|
|
2514
|
-
return n && r && e.replace(/\d+/, "") === t.replace(/\d+/, "") ? parseInt(n[1]) - parseInt(r[1]) : e.toLowerCase().localeCompare(t.toLowerCase(), void 0, {
|
|
2515
|
-
numeric: !0,
|
|
2516
|
-
sensitivity: "base"
|
|
2517
|
-
});
|
|
2518
|
-
});
|
|
2519
|
-
let i = [];
|
|
2520
|
-
r.forEach((t) => {
|
|
2521
|
-
let n = e.get(t);
|
|
2522
|
-
n && i.push(t + "=" + n);
|
|
2523
|
-
});
|
|
2524
|
-
let a = i.join("&"), s = Wt.md5((a + t).toLocaleUpperCase()), c = {
|
|
2525
|
-
params: a,
|
|
2526
|
-
md5: s
|
|
2527
|
-
};
|
|
2528
|
-
return L.debug(c, "API_SIGN"), s;
|
|
2529
|
-
}
|
|
2530
|
-
assemblyParameter(e, t) {
|
|
2531
|
-
let n = e ?? new URLSearchParams(), r = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
2532
|
-
return n.set("timezone", r), n.set("timestamp", Date.now().toString()), n.set("echostr", Dt(10)), n.set("version", this.version), n.set("deviceId", this.deviceId), n.set("webid", this.websiteId ?? ""), n.set("apiKey", this.apiKey), t && t.length > 0 && n.set("username", t), new URLSearchParams([...n].filter(([, e]) => e !== ""));
|
|
2533
|
-
}
|
|
2534
|
-
async assemblyHeader({ urlParams: e, token: t }) {
|
|
2535
|
-
let n = {
|
|
2536
|
-
"Res-Type": "json",
|
|
2537
|
-
"Device-Id": this.deviceId,
|
|
2538
|
-
"User-Type": t?.utype.toString() ?? this.userType.toString(),
|
|
2539
|
-
"User-From": this.userFrom,
|
|
2540
|
-
"Api-Key": this.apiKey
|
|
2541
|
-
};
|
|
2542
|
-
return n[Y] = M.applicationXwwwFormUrlencoded, this.lang && this.lang.length > 0 && (n.Lang = this.lang), this.websiteId && this.websiteId.length > 0 && (n["Web-Id"] = this.websiteId), this.websiteNo && this.websiteNo.length > 0 && (n["Web-No"] = this.websiteNo), t && (t.token && t.token.length > 0 && t.username && t.username.length > 0 && (n.Authorization = t.token, n.Username = t.username), t.xcsrf && (n[t.xcsrf.csrfHeader] = t.xcsrf.csrfToken)), n.Sign = await this.sign(e), n;
|
|
2543
|
-
}
|
|
2544
|
-
async helloIboot() {
|
|
2545
|
-
if (this.helloMethod.length <= 0) return this.apiKey;
|
|
2546
|
-
let e = this.getApiUrl(this.helloMethod), t = {
|
|
2547
|
-
"Res-Type": "json",
|
|
2548
|
-
"Api-Key": this.apiKey
|
|
2549
|
-
};
|
|
2550
|
-
t[Y] = M.applicationXwwwFormUrlencoded;
|
|
2551
|
-
let n = {
|
|
2552
|
-
url: e,
|
|
2553
|
-
headers: t
|
|
2554
|
-
};
|
|
2555
|
-
L.debug(n, "HELLO");
|
|
2556
|
-
let r = await fetch(e, {
|
|
2557
|
-
method: "GET",
|
|
2558
|
-
headers: t,
|
|
2559
|
-
credentials: "include",
|
|
2560
|
-
cache: "force-cache"
|
|
2561
|
-
});
|
|
2562
|
-
if (r.ok) {
|
|
2563
|
-
let e = await r.json();
|
|
2564
|
-
return L.debug(e.data, "HELLO RESULT"), e.data;
|
|
2565
|
-
}
|
|
2566
|
-
throw Error("hello iBoot error!");
|
|
2567
|
-
}
|
|
2568
|
-
getApiUrl(e) {
|
|
2569
|
-
return `${this.baseUrl}/${e}`;
|
|
2570
|
-
}
|
|
2571
|
-
async csrf() {
|
|
2572
|
-
let e = await this.get({ url: "guest/csrf" });
|
|
2573
|
-
if (e.success) {
|
|
2574
|
-
let t = e.data;
|
|
2575
|
-
if (t) return t.csrfToken.toString();
|
|
2576
|
-
}
|
|
2577
|
-
}
|
|
2578
|
-
async get({ url: e, data: t, token: n, cache: r = "default" }) {
|
|
2579
|
-
let i = this.assemblyParameter(t ? new URLSearchParams(t) : void 0), a = await this.assemblyHeader({
|
|
2580
|
-
urlParams: i,
|
|
2581
|
-
token: n
|
|
2582
|
-
}), s = `${this.getApiUrl(e)}?${i.toString()}`, c = {
|
|
2583
|
-
url: s,
|
|
2584
|
-
headers: a
|
|
2585
|
-
};
|
|
2586
|
-
L.info(c, "GET");
|
|
2587
|
-
let l = await fetch(s, {
|
|
2588
|
-
method: "GET",
|
|
2589
|
-
headers: a,
|
|
2590
|
-
credentials: "include",
|
|
2591
|
-
cache: r
|
|
2592
|
-
});
|
|
2593
|
-
if (l.ok) {
|
|
2594
|
-
let e = Object.fromEntries(l.headers.entries()), t = {
|
|
2595
|
-
...await l.json(),
|
|
2596
|
-
headers: e
|
|
2597
|
-
};
|
|
2598
|
-
return L.debug(t, "GET_RESULT"), t;
|
|
2599
|
-
}
|
|
2600
|
-
let u = {
|
|
2601
|
-
code: l.status,
|
|
2602
|
-
success: !1,
|
|
2603
|
-
msg: l.statusText
|
|
2604
|
-
};
|
|
2605
|
-
return L.error(u), u;
|
|
2606
|
-
}
|
|
2607
|
-
async post({ url: e, data: t, token: n, cache: r = "default" }) {
|
|
2608
|
-
let i = t ? { ...t } : {}, a = i.buffer ?? void 0, s = i.boundary ?? void 0;
|
|
2609
|
-
a && delete i.buffer, s && delete i.boundary;
|
|
2610
|
-
let c = this.assemblyParameter(new URLSearchParams(i)), l = await this.assemblyHeader({
|
|
2611
|
-
urlParams: c,
|
|
2612
|
-
token: n
|
|
2613
|
-
});
|
|
2614
|
-
a && s && (l["Content-Type"] = `multipart/form-data; boundary=${s}`);
|
|
2615
|
-
let u = this.getApiUrl(e), d = {
|
|
2616
|
-
url: u,
|
|
2617
|
-
headers: l,
|
|
2618
|
-
params: c
|
|
2619
|
-
};
|
|
2620
|
-
L.info(d, "POST");
|
|
2621
|
-
let f = a ? `${u}?${c}` : u, p = await fetch(f, {
|
|
2622
|
-
method: "POST",
|
|
2623
|
-
headers: l,
|
|
2624
|
-
body: a || c,
|
|
2625
|
-
credentials: "include",
|
|
2626
|
-
cache: r
|
|
2627
|
-
});
|
|
2628
|
-
if (p.ok) {
|
|
2629
|
-
let e = Object.fromEntries(p.headers.entries()), t = {
|
|
2630
|
-
...await p.json(),
|
|
2631
|
-
headers: e
|
|
2632
|
-
};
|
|
2633
|
-
return L.debug(t, "POST_RESULT"), t;
|
|
2634
|
-
}
|
|
2635
|
-
let m = {
|
|
2636
|
-
code: p.status,
|
|
2637
|
-
success: !1,
|
|
2638
|
-
msg: p.statusText
|
|
2639
|
-
};
|
|
2640
|
-
return L.error(m), m;
|
|
2641
|
-
}
|
|
2642
2693
|
}, baseUrl = {
|
|
2643
2694
|
site: "guest/site/",
|
|
2644
2695
|
shop: "guest/site/shop/"
|
|
@@ -2655,9 +2706,9 @@ const helloURL = `${baseUrl.site}helloIBoot`;
|
|
|
2655
2706
|
var ICMSServer = class {
|
|
2656
2707
|
http;
|
|
2657
2708
|
constructor(e) {
|
|
2658
|
-
this.http = new
|
|
2659
|
-
...
|
|
2660
|
-
userType:
|
|
2709
|
+
this.http = new cr({
|
|
2710
|
+
...or(e),
|
|
2711
|
+
userType: Zt.TYPE_C,
|
|
2661
2712
|
helloURL
|
|
2662
2713
|
});
|
|
2663
2714
|
}
|
|
@@ -2667,7 +2718,7 @@ var ICMSServer = class {
|
|
|
2667
2718
|
let t = n.headers;
|
|
2668
2719
|
if (t) {
|
|
2669
2720
|
let n = t["device-id"], r = t.lang, i = t["web-id"], a = t["web-no"], o = {};
|
|
2670
|
-
n && n.length > 0 && (o.deviceId = n), r && r.length > 0 && (o.lang = r), i && i.length > 0 && (o.websiteId = i), a && a.length > 0 && (o.websiteNo = a),
|
|
2721
|
+
n && n.length > 0 && (o.deviceId = n), r && r.length > 0 && (o.lang = r), i && i.length > 0 && (o.websiteId = i), a && a.length > 0 && (o.websiteNo = a), Gr(e, o);
|
|
2671
2722
|
}
|
|
2672
2723
|
}
|
|
2673
2724
|
}
|
|
@@ -2821,15 +2872,32 @@ var ICMSServer = class {
|
|
|
2821
2872
|
throw Error(n.msg);
|
|
2822
2873
|
}
|
|
2823
2874
|
}, APIMAP = {};
|
|
2824
|
-
const icmsRouter = async ({ request: e, routeAdapter: t, storage: n }) => await new
|
|
2875
|
+
const icmsRouter = async ({ request: e, routeAdapter: t, storage: n }) => await new Jr({
|
|
2825
2876
|
config: {
|
|
2826
|
-
userType:
|
|
2877
|
+
userType: Zt.TYPE_C,
|
|
2827
2878
|
APIMAP,
|
|
2828
2879
|
helloURL
|
|
2829
2880
|
},
|
|
2830
2881
|
adapter: t,
|
|
2831
2882
|
storage: n
|
|
2832
2883
|
}).handleRequest(e);
|
|
2833
|
-
|
|
2884
|
+
var ICMSClient = class {
|
|
2885
|
+
cookies = null;
|
|
2886
|
+
constructor() {}
|
|
2887
|
+
async submitComment() {}
|
|
2888
|
+
setICookies(e) {
|
|
2889
|
+
return this.cookies = e, this;
|
|
2890
|
+
}
|
|
2891
|
+
async login({ username: e, password: t }) {
|
|
2892
|
+
if (await zr("login", { data: {
|
|
2893
|
+
username: e,
|
|
2894
|
+
password: t
|
|
2895
|
+
} }), this.cookies) return Xr(this.cookies);
|
|
2896
|
+
}
|
|
2897
|
+
async logout() {
|
|
2898
|
+
await zr("logout");
|
|
2899
|
+
}
|
|
2900
|
+
};
|
|
2901
|
+
export { ICMSClient, ICMSServer, helloURL, icmsRouter };
|
|
2834
2902
|
|
|
2835
2903
|
//# sourceMappingURL=icms-api.es.js.map
|