icms-api 0.0.1 → 0.0.3
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 +306 -367
- 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/router.d.ts +1 -1
- package/dist/types/server.d.ts +5 -3
- package/package.json +3 -2
package/dist/icms-api.es.js
CHANGED
|
@@ -1,36 +1,45 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import zt from "pino";
|
|
2
|
+
import Vt from "pino-pretty";
|
|
3
|
+
import Kt from "js-md5";
|
|
4
4
|
import ne from "crypto-js";
|
|
5
5
|
import "h3";
|
|
6
|
-
var
|
|
6
|
+
var tr = {
|
|
7
7
|
TYPE_MGT: 0,
|
|
8
8
|
TYPE_C: 1,
|
|
9
9
|
TYPE_B: 2
|
|
10
|
-
},
|
|
10
|
+
}, rr = Vt({
|
|
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
|
-
}), L =
|
|
17
|
+
}), L = zt({
|
|
18
18
|
name: process.env.APP_NAME ?? "iBoot",
|
|
19
19
|
level: process.env.APP_ENV === "production" ? "info" : "debug",
|
|
20
20
|
nestedKey: "payload"
|
|
21
|
-
},
|
|
21
|
+
}, rr), nr = {}, Dt = (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
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
let
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
};
|
|
26
|
+
function ir() {
|
|
27
|
+
try {
|
|
28
|
+
let e = nr.networkInterfaces();
|
|
29
|
+
for (let t of Object.keys(e)) {
|
|
30
|
+
let n = e[t];
|
|
31
|
+
if (n) {
|
|
32
|
+
for (let e of n) if (e.mac && e.mac !== "00:00:00:00:00:00") return e.mac.replace(/:/g, "").toUpperCase();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return crypto.randomUUID().replace(/-/g, "").toUpperCase();
|
|
36
|
+
} catch {
|
|
37
|
+
return Dt(10);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
var we = { exports: {} }, Te = {}, Ie = {}, Se = {}, at;
|
|
41
|
+
function or() {
|
|
42
|
+
return at || (at = 1, (function(e) {
|
|
34
43
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "detectDomainLocale", {
|
|
35
44
|
enumerable: !0,
|
|
36
45
|
get: function() {
|
|
@@ -46,11 +55,11 @@ function sr() {
|
|
|
46
55
|
}
|
|
47
56
|
}
|
|
48
57
|
}
|
|
49
|
-
})(
|
|
58
|
+
})(Se)), Se;
|
|
50
59
|
}
|
|
51
|
-
var
|
|
52
|
-
function
|
|
53
|
-
return
|
|
60
|
+
var Ae = {}, Oe = {}, ut;
|
|
61
|
+
function sr() {
|
|
62
|
+
return ut || (ut = 1, (function(e) {
|
|
54
63
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "removeTrailingSlash", {
|
|
55
64
|
enumerable: !0,
|
|
56
65
|
get: function() {
|
|
@@ -60,11 +69,11 @@ function ar() {
|
|
|
60
69
|
function t(e) {
|
|
61
70
|
return e.replace(/\/$/, "") || "/";
|
|
62
71
|
}
|
|
63
|
-
})(
|
|
72
|
+
})(Oe)), Oe;
|
|
64
73
|
}
|
|
65
|
-
var
|
|
66
|
-
function
|
|
67
|
-
return
|
|
74
|
+
var xe = {}, Ne = {}, ct;
|
|
75
|
+
function et() {
|
|
76
|
+
return ct || (ct = 1, (function(e) {
|
|
68
77
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "parsePath", {
|
|
69
78
|
enumerable: !0,
|
|
70
79
|
get: function() {
|
|
@@ -83,95 +92,95 @@ function rt() {
|
|
|
83
92
|
hash: ""
|
|
84
93
|
};
|
|
85
94
|
}
|
|
86
|
-
})(
|
|
95
|
+
})(Ne)), Ne;
|
|
87
96
|
}
|
|
88
|
-
var
|
|
89
|
-
function
|
|
90
|
-
return
|
|
97
|
+
var lt;
|
|
98
|
+
function Mt() {
|
|
99
|
+
return lt || (lt = 1, (function(e) {
|
|
91
100
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "addPathPrefix", {
|
|
92
101
|
enumerable: !0,
|
|
93
102
|
get: function() {
|
|
94
103
|
return n;
|
|
95
104
|
}
|
|
96
105
|
});
|
|
97
|
-
let t =
|
|
106
|
+
let t = et();
|
|
98
107
|
function n(e, n) {
|
|
99
108
|
if (!e.startsWith("/") || !n) return e;
|
|
100
109
|
let { pathname: r, query: i, hash: a } = (0, t.parsePath)(e);
|
|
101
110
|
return "" + n + r + i + a;
|
|
102
111
|
}
|
|
103
|
-
})(
|
|
112
|
+
})(xe)), xe;
|
|
104
113
|
}
|
|
105
|
-
var
|
|
106
|
-
function
|
|
107
|
-
return
|
|
114
|
+
var Ce = {}, dt;
|
|
115
|
+
function ar() {
|
|
116
|
+
return dt || (dt = 1, (function(e) {
|
|
108
117
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "addPathSuffix", {
|
|
109
118
|
enumerable: !0,
|
|
110
119
|
get: function() {
|
|
111
120
|
return n;
|
|
112
121
|
}
|
|
113
122
|
});
|
|
114
|
-
let t =
|
|
123
|
+
let t = et();
|
|
115
124
|
function n(e, n) {
|
|
116
125
|
if (!e.startsWith("/") || !n) return e;
|
|
117
126
|
let { pathname: r, query: i, hash: a } = (0, t.parsePath)(e);
|
|
118
127
|
return "" + r + n + i + a;
|
|
119
128
|
}
|
|
120
|
-
})(
|
|
129
|
+
})(Ce)), Ce;
|
|
121
130
|
}
|
|
122
|
-
var
|
|
123
|
-
function
|
|
124
|
-
return
|
|
131
|
+
var Le = {}, ke = {}, ht;
|
|
132
|
+
function tt() {
|
|
133
|
+
return ht || (ht = 1, (function(e) {
|
|
125
134
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "pathHasPrefix", {
|
|
126
135
|
enumerable: !0,
|
|
127
136
|
get: function() {
|
|
128
137
|
return n;
|
|
129
138
|
}
|
|
130
139
|
});
|
|
131
|
-
let t =
|
|
140
|
+
let t = et();
|
|
132
141
|
function n(e, n) {
|
|
133
142
|
if (typeof e != "string") return !1;
|
|
134
143
|
let { pathname: r } = (0, t.parsePath)(e);
|
|
135
144
|
return r === n || r.startsWith(n + "/");
|
|
136
145
|
}
|
|
137
|
-
})(
|
|
146
|
+
})(ke)), ke;
|
|
138
147
|
}
|
|
139
|
-
var
|
|
140
|
-
function
|
|
141
|
-
return
|
|
148
|
+
var ft;
|
|
149
|
+
function ur() {
|
|
150
|
+
return ft || (ft = 1, (function(e) {
|
|
142
151
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "addLocale", {
|
|
143
152
|
enumerable: !0,
|
|
144
153
|
get: function() {
|
|
145
154
|
return r;
|
|
146
155
|
}
|
|
147
156
|
});
|
|
148
|
-
let t =
|
|
157
|
+
let t = Mt(), n = tt();
|
|
149
158
|
function r(e, r, i, a) {
|
|
150
159
|
if (!r || r === i) return e;
|
|
151
160
|
let o = e.toLowerCase();
|
|
152
161
|
return !a && ((0, n.pathHasPrefix)(o, "/api") || (0, n.pathHasPrefix)(o, "/" + r.toLowerCase())) ? e : (0, t.addPathPrefix)(e, "/" + r);
|
|
153
162
|
}
|
|
154
|
-
})(
|
|
163
|
+
})(Le)), Le;
|
|
155
164
|
}
|
|
156
|
-
var
|
|
157
|
-
function
|
|
158
|
-
return
|
|
165
|
+
var pt;
|
|
166
|
+
function cr() {
|
|
167
|
+
return pt || (pt = 1, (function(e) {
|
|
159
168
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "formatNextPathnameInfo", {
|
|
160
169
|
enumerable: !0,
|
|
161
170
|
get: function() {
|
|
162
171
|
return a;
|
|
163
172
|
}
|
|
164
173
|
});
|
|
165
|
-
let t =
|
|
174
|
+
let t = sr(), n = Mt(), r = ar(), i = ur();
|
|
166
175
|
function a(e) {
|
|
167
176
|
let a = (0, i.addLocale)(e.pathname, e.locale, e.buildId ? void 0 : e.defaultLocale, e.ignorePrefix);
|
|
168
177
|
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);
|
|
169
178
|
}
|
|
170
|
-
})(
|
|
179
|
+
})(Ae)), Ae;
|
|
171
180
|
}
|
|
172
|
-
var
|
|
173
|
-
function
|
|
174
|
-
return
|
|
181
|
+
var Ue = {}, mt;
|
|
182
|
+
function lr() {
|
|
183
|
+
return mt || (mt = 1, (function(e) {
|
|
175
184
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "getHostname", {
|
|
176
185
|
enumerable: !0,
|
|
177
186
|
get: function() {
|
|
@@ -185,11 +194,11 @@ function dr() {
|
|
|
185
194
|
else return;
|
|
186
195
|
return n.toLowerCase();
|
|
187
196
|
}
|
|
188
|
-
})(
|
|
197
|
+
})(Ue)), Ue;
|
|
189
198
|
}
|
|
190
|
-
var
|
|
191
|
-
function
|
|
192
|
-
return
|
|
199
|
+
var De = {}, Me = {}, _t;
|
|
200
|
+
function dr() {
|
|
201
|
+
return _t || (_t = 1, (function(e) {
|
|
193
202
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "normalizeLocalePath", {
|
|
194
203
|
enumerable: !0,
|
|
195
204
|
get: function() {
|
|
@@ -203,35 +212,35 @@ function fr() {
|
|
|
203
212
|
detectedLocale: n
|
|
204
213
|
};
|
|
205
214
|
}
|
|
206
|
-
})(
|
|
215
|
+
})(Me)), Me;
|
|
207
216
|
}
|
|
208
|
-
var
|
|
217
|
+
var je = {}, bt;
|
|
209
218
|
function hr() {
|
|
210
|
-
return
|
|
219
|
+
return bt || (bt = 1, (function(e) {
|
|
211
220
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "removePathPrefix", {
|
|
212
221
|
enumerable: !0,
|
|
213
222
|
get: function() {
|
|
214
223
|
return n;
|
|
215
224
|
}
|
|
216
225
|
});
|
|
217
|
-
let t =
|
|
226
|
+
let t = tt();
|
|
218
227
|
function n(e, n) {
|
|
219
228
|
if (!(0, t.pathHasPrefix)(e, n)) return e;
|
|
220
229
|
let r = e.slice(n.length);
|
|
221
230
|
return r.startsWith("/") ? r : "/" + r;
|
|
222
231
|
}
|
|
223
|
-
})(
|
|
232
|
+
})(je)), je;
|
|
224
233
|
}
|
|
225
|
-
var
|
|
226
|
-
function
|
|
227
|
-
return
|
|
234
|
+
var gt;
|
|
235
|
+
function fr() {
|
|
236
|
+
return gt || (gt = 1, (function(e) {
|
|
228
237
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "getNextPathnameInfo", {
|
|
229
238
|
enumerable: !0,
|
|
230
239
|
get: function() {
|
|
231
240
|
return i;
|
|
232
241
|
}
|
|
233
242
|
});
|
|
234
|
-
let t =
|
|
243
|
+
let t = dr(), n = hr(), r = tt();
|
|
235
244
|
function i(e, i) {
|
|
236
245
|
let { basePath: a, i18n: o, trailingSlash: s } = i.nextConfig ?? {}, c = {
|
|
237
246
|
pathname: e,
|
|
@@ -249,18 +258,18 @@ function pr() {
|
|
|
249
258
|
}
|
|
250
259
|
return c;
|
|
251
260
|
}
|
|
252
|
-
})(
|
|
261
|
+
})(De)), De;
|
|
253
262
|
}
|
|
254
|
-
var
|
|
255
|
-
function
|
|
256
|
-
return
|
|
263
|
+
var wt;
|
|
264
|
+
function jt() {
|
|
265
|
+
return wt || (wt = 1, (function(e) {
|
|
257
266
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "NextURL", {
|
|
258
267
|
enumerable: !0,
|
|
259
268
|
get: function() {
|
|
260
269
|
return c;
|
|
261
270
|
}
|
|
262
271
|
});
|
|
263
|
-
let t =
|
|
272
|
+
let t = or(), n = cr(), r = lr(), i = fr(), a = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;
|
|
264
273
|
function o(e, t) {
|
|
265
274
|
return new URL(String(e).replace(a, "localhost"), t && String(t).replace(a, "localhost"));
|
|
266
275
|
}
|
|
@@ -419,9 +428,9 @@ function Ft() {
|
|
|
419
428
|
}
|
|
420
429
|
})(Ie)), Ie;
|
|
421
430
|
}
|
|
422
|
-
var
|
|
423
|
-
function
|
|
424
|
-
return
|
|
431
|
+
var qe = {}, He = {}, Et;
|
|
432
|
+
function pr() {
|
|
433
|
+
return Et || (Et = 1, (function(e) {
|
|
425
434
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
426
435
|
function t(e, t) {
|
|
427
436
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -443,7 +452,7 @@ function mr() {
|
|
|
443
452
|
return T;
|
|
444
453
|
},
|
|
445
454
|
ESLINT_DEFAULT_DIRS: function() {
|
|
446
|
-
return
|
|
455
|
+
return hn;
|
|
447
456
|
},
|
|
448
457
|
GSP_NO_RETURNED_VALUE: function() {
|
|
449
458
|
return B;
|
|
@@ -452,7 +461,7 @@ function mr() {
|
|
|
452
461
|
return H;
|
|
453
462
|
},
|
|
454
463
|
GSSP_NO_RETURNED_VALUE: function() {
|
|
455
|
-
return
|
|
464
|
+
return pn;
|
|
456
465
|
},
|
|
457
466
|
INSTRUMENTATION_HOOK_FILENAME: function() {
|
|
458
467
|
return C;
|
|
@@ -503,7 +512,7 @@ function mr() {
|
|
|
503
512
|
return n;
|
|
504
513
|
},
|
|
505
514
|
NON_STANDARD_NODE_ENV: function() {
|
|
506
|
-
return
|
|
515
|
+
return W;
|
|
507
516
|
},
|
|
508
517
|
PAGES_DIR_ALIAS: function() {
|
|
509
518
|
return w;
|
|
@@ -524,7 +533,7 @@ function mr() {
|
|
|
524
533
|
return j;
|
|
525
534
|
},
|
|
526
535
|
RSC_ACTION_ENCRYPTION_ALIAS: function() {
|
|
527
|
-
return
|
|
536
|
+
return fn;
|
|
528
537
|
},
|
|
529
538
|
RSC_ACTION_PROXY_ALIAS: function() {
|
|
530
539
|
return A;
|
|
@@ -551,10 +560,10 @@ function mr() {
|
|
|
551
560
|
return I;
|
|
552
561
|
},
|
|
553
562
|
SERVER_RUNTIME: function() {
|
|
554
|
-
return
|
|
563
|
+
return gn;
|
|
555
564
|
},
|
|
556
565
|
SSG_FALLBACK_EXPORT_ERROR: function() {
|
|
557
|
-
return
|
|
566
|
+
return mn;
|
|
558
567
|
},
|
|
559
568
|
SSG_GET_INITIAL_PROPS_CONFLICT: function() {
|
|
560
569
|
return P;
|
|
@@ -569,20 +578,20 @@ function mr() {
|
|
|
569
578
|
return q;
|
|
570
579
|
},
|
|
571
580
|
WEBPACK_RESOURCE_QUERIES: function() {
|
|
572
|
-
return
|
|
581
|
+
return _n;
|
|
573
582
|
}
|
|
574
583
|
});
|
|
575
|
-
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", k = "private-next-rsc-action-validate", A = "private-next-rsc-server-reference",
|
|
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", D = "private-next-app-dir", O = "private-next-rsc-mod-ref-proxy", k = "private-next-rsc-action-validate", A = "private-next-rsc-server-reference", fn = "private-next-rsc-action-encryption", j = "private-next-rsc-action-client-wrapper", N = "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", P = "You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps", F = "You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.", I = "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`?", pn = "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", mn = "Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export", hn = [
|
|
576
585
|
"app",
|
|
577
586
|
"pages",
|
|
578
587
|
"components",
|
|
579
588
|
"lib",
|
|
580
589
|
"src"
|
|
581
|
-
],
|
|
590
|
+
], gn = {
|
|
582
591
|
edge: "edge",
|
|
583
592
|
experimentalEdge: "experimental-edge",
|
|
584
593
|
nodejs: "nodejs"
|
|
585
|
-
},
|
|
594
|
+
}, G = {
|
|
586
595
|
shared: "shared",
|
|
587
596
|
reactServerComponents: "rsc",
|
|
588
597
|
serverSideRendering: "ssr",
|
|
@@ -595,39 +604,39 @@ function mr() {
|
|
|
595
604
|
appMetadataRoute: "app-metadata-route",
|
|
596
605
|
appRouteHandler: "app-route-handler"
|
|
597
606
|
}, q = {
|
|
598
|
-
...
|
|
607
|
+
...G,
|
|
599
608
|
GROUP: {
|
|
600
609
|
serverOnly: [
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
610
|
+
G.reactServerComponents,
|
|
611
|
+
G.actionBrowser,
|
|
612
|
+
G.appMetadataRoute,
|
|
613
|
+
G.appRouteHandler,
|
|
614
|
+
G.instrument
|
|
606
615
|
],
|
|
607
|
-
clientOnly: [
|
|
608
|
-
nonClientServerTarget: [
|
|
616
|
+
clientOnly: [G.serverSideRendering, G.appPagesBrowser],
|
|
617
|
+
nonClientServerTarget: [G.middleware, G.api],
|
|
609
618
|
app: [
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
619
|
+
G.reactServerComponents,
|
|
620
|
+
G.actionBrowser,
|
|
621
|
+
G.appMetadataRoute,
|
|
622
|
+
G.appRouteHandler,
|
|
623
|
+
G.serverSideRendering,
|
|
624
|
+
G.appPagesBrowser,
|
|
625
|
+
G.shared,
|
|
626
|
+
G.instrument
|
|
618
627
|
]
|
|
619
628
|
}
|
|
620
|
-
},
|
|
629
|
+
}, _n = {
|
|
621
630
|
edgeSSREntry: "__next_edge_ssr_entry__",
|
|
622
631
|
metadata: "__next_metadata__",
|
|
623
632
|
metadataRoute: "__next_metadata_route__",
|
|
624
633
|
metadataImageMeta: "__next_metadata_image_meta__"
|
|
625
634
|
};
|
|
626
|
-
})(
|
|
635
|
+
})(He)), He;
|
|
627
636
|
}
|
|
628
|
-
var
|
|
629
|
-
function
|
|
630
|
-
return
|
|
637
|
+
var vt;
|
|
638
|
+
function qt() {
|
|
639
|
+
return vt || (vt = 1, (function(e) {
|
|
631
640
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
632
641
|
function t(e, t) {
|
|
633
642
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -652,7 +661,7 @@ function Bt() {
|
|
|
652
661
|
return o;
|
|
653
662
|
}
|
|
654
663
|
});
|
|
655
|
-
let n =
|
|
664
|
+
let n = pr();
|
|
656
665
|
function r(e) {
|
|
657
666
|
let t = new Headers();
|
|
658
667
|
for (let [n, r] of Object.entries(e)) {
|
|
@@ -695,11 +704,11 @@ function Bt() {
|
|
|
695
704
|
let r = [n.NEXT_QUERY_PARAM_PREFIX, n.NEXT_INTERCEPTION_MARKER_PREFIX];
|
|
696
705
|
for (let n of r) e !== n && e.startsWith(n) && t(e.substring(n.length));
|
|
697
706
|
}
|
|
698
|
-
})(
|
|
707
|
+
})(qe)), qe;
|
|
699
708
|
}
|
|
700
|
-
var
|
|
701
|
-
function
|
|
702
|
-
return
|
|
709
|
+
var Fe = {}, Rt;
|
|
710
|
+
function mr() {
|
|
711
|
+
return Rt || (Rt = 1, (function(e) {
|
|
703
712
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
704
713
|
function t(e, t) {
|
|
705
714
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -740,12 +749,12 @@ function _r() {
|
|
|
740
749
|
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 ");
|
|
741
750
|
}
|
|
742
751
|
}
|
|
743
|
-
})(
|
|
752
|
+
})(Fe)), Fe;
|
|
744
753
|
}
|
|
745
|
-
var
|
|
746
|
-
function
|
|
747
|
-
if (
|
|
748
|
-
|
|
754
|
+
var Be = {}, Ge, Pt;
|
|
755
|
+
function _r() {
|
|
756
|
+
if (Pt) return Ge;
|
|
757
|
+
Pt = 1;
|
|
749
758
|
var e = Object.defineProperty, t = Object.getOwnPropertyDescriptor, n = Object.getOwnPropertyNames, r = Object.prototype.hasOwnProperty, i = (t, n) => {
|
|
750
759
|
for (var r in n) e(t, r, {
|
|
751
760
|
get: n[r],
|
|
@@ -764,7 +773,7 @@ function br() {
|
|
|
764
773
|
parseCookie: () => l,
|
|
765
774
|
parseSetCookie: () => u,
|
|
766
775
|
stringifyCookie: () => c
|
|
767
|
-
}),
|
|
776
|
+
}), Ge = o(s);
|
|
768
777
|
function c(e) {
|
|
769
778
|
let t = [
|
|
770
779
|
"path" in e && e.path && `Path=${e.path}`,
|
|
@@ -971,11 +980,11 @@ function br() {
|
|
|
971
980
|
}) {
|
|
972
981
|
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;
|
|
973
982
|
}
|
|
974
|
-
return
|
|
983
|
+
return Ge;
|
|
975
984
|
}
|
|
976
|
-
var
|
|
977
|
-
function
|
|
978
|
-
return
|
|
985
|
+
var yt;
|
|
986
|
+
function $e() {
|
|
987
|
+
return yt || (yt = 1, (function(e) {
|
|
979
988
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
980
989
|
function t(e, t) {
|
|
981
990
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -994,12 +1003,12 @@ function Qe() {
|
|
|
994
1003
|
return n.stringifyCookie;
|
|
995
1004
|
}
|
|
996
1005
|
});
|
|
997
|
-
let n =
|
|
998
|
-
})(
|
|
1006
|
+
let n = _r();
|
|
1007
|
+
})(Be)), Be;
|
|
999
1008
|
}
|
|
1000
|
-
var
|
|
1001
|
-
function
|
|
1002
|
-
return
|
|
1009
|
+
var Tt;
|
|
1010
|
+
function br() {
|
|
1011
|
+
return Tt || (Tt = 1, (function(e) {
|
|
1003
1012
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
1004
1013
|
function t(e, t) {
|
|
1005
1014
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -1015,7 +1024,7 @@ function gr() {
|
|
|
1015
1024
|
return s;
|
|
1016
1025
|
}
|
|
1017
1026
|
});
|
|
1018
|
-
let n =
|
|
1027
|
+
let n = jt(), r = qt(), i = mr(), a = $e(), o = /* @__PURE__ */ Symbol("internal request");
|
|
1019
1028
|
class s extends Request {
|
|
1020
1029
|
constructor(e, t = {}) {
|
|
1021
1030
|
let i = typeof e != "string" && "url" in e ? e.url : String(e);
|
|
@@ -1078,9 +1087,9 @@ function gr() {
|
|
|
1078
1087
|
}
|
|
1079
1088
|
})(Te)), Te;
|
|
1080
1089
|
}
|
|
1081
|
-
var
|
|
1082
|
-
function
|
|
1083
|
-
return
|
|
1090
|
+
var Xe = {}, We = {}, It;
|
|
1091
|
+
function gr() {
|
|
1092
|
+
return It || (It = 1, (function(e) {
|
|
1084
1093
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "ReflectAdapter", {
|
|
1085
1094
|
enumerable: !0,
|
|
1086
1095
|
get: function() {
|
|
@@ -1102,18 +1111,18 @@ function wr() {
|
|
|
1102
1111
|
return Reflect.deleteProperty(e, t);
|
|
1103
1112
|
}
|
|
1104
1113
|
}
|
|
1105
|
-
})(
|
|
1114
|
+
})(We)), We;
|
|
1106
1115
|
}
|
|
1107
|
-
var
|
|
1108
|
-
function
|
|
1109
|
-
return
|
|
1116
|
+
var St;
|
|
1117
|
+
function wr() {
|
|
1118
|
+
return St || (St = 1, (function(e) {
|
|
1110
1119
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "NextResponse", {
|
|
1111
1120
|
enumerable: !0,
|
|
1112
1121
|
get: function() {
|
|
1113
1122
|
return l;
|
|
1114
1123
|
}
|
|
1115
1124
|
});
|
|
1116
|
-
let t =
|
|
1125
|
+
let t = $e(), n = jt(), r = qt(), i = gr(), a = $e(), o = /* @__PURE__ */ Symbol("internal response"), s = /* @__PURE__ */ new Set([
|
|
1117
1126
|
301,
|
|
1118
1127
|
302,
|
|
1119
1128
|
303,
|
|
@@ -1196,11 +1205,11 @@ function Er() {
|
|
|
1196
1205
|
});
|
|
1197
1206
|
}
|
|
1198
1207
|
}
|
|
1199
|
-
})(
|
|
1208
|
+
})(Xe)), Xe;
|
|
1200
1209
|
}
|
|
1201
|
-
var
|
|
1202
|
-
function
|
|
1203
|
-
return
|
|
1210
|
+
var ze = {}, At;
|
|
1211
|
+
function Er() {
|
|
1212
|
+
return At || (At = 1, (function(e) {
|
|
1204
1213
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "ImageResponse", {
|
|
1205
1214
|
enumerable: !0,
|
|
1206
1215
|
get: function() {
|
|
@@ -1210,27 +1219,27 @@ function vr() {
|
|
|
1210
1219
|
function t() {
|
|
1211
1220
|
throw Error("ImageResponse moved from \"next/server\" to \"next/og\" since Next.js 14, please import from \"next/og\" instead");
|
|
1212
1221
|
}
|
|
1213
|
-
})(
|
|
1222
|
+
})(ze)), ze;
|
|
1214
1223
|
}
|
|
1215
|
-
var
|
|
1216
|
-
function
|
|
1217
|
-
return
|
|
1224
|
+
var Ve = {}, Ke = { exports: {} }, Ot;
|
|
1225
|
+
function vr() {
|
|
1226
|
+
return Ot || (Ot = 1, (() => {
|
|
1218
1227
|
var e = { 226: function(e, t) {
|
|
1219
1228
|
(function(n, r) {
|
|
1220
|
-
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", k = "Browser", A = "Chrome",
|
|
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", D = "ASUS", O = "BlackBerry", k = "Browser", A = "Chrome", fn = "Edge", j = "Firefox", N = "Google", P = "Huawei", F = "LG", I = "Microsoft", R = "Motorola", z = "Opera", B = "Samsung", pn = "Sharp", V = "Sony", H = "Xiaomi", W = "Zebra", mn = "Facebook", hn = "Chromium OS", gn = "Mac OS", G = function(e, t) {
|
|
1221
1230
|
var n = {};
|
|
1222
1231
|
for (var r in e) t[r] && t[r].length % 2 == 0 ? n[r] = t[r].concat(e[r]) : n[r] = e[r];
|
|
1223
1232
|
return n;
|
|
1224
1233
|
}, q = function(e) {
|
|
1225
1234
|
for (var t = {}, n = 0; n < e.length; n++) t[e[n].toUpperCase()] = e[n];
|
|
1226
1235
|
return t;
|
|
1227
|
-
},
|
|
1236
|
+
}, _n = function(e, t) {
|
|
1228
1237
|
return typeof e === u ? J(t).indexOf(J(e)) !== -1 : !1;
|
|
1229
1238
|
}, J = function(e) {
|
|
1230
1239
|
return e.toLowerCase();
|
|
1231
|
-
},
|
|
1240
|
+
}, vn = function(e) {
|
|
1232
1241
|
return typeof e === u ? e.replace(/[^\d\.]/g, a).split(".")[0] : r;
|
|
1233
|
-
},
|
|
1242
|
+
}, yn = function(e, t) {
|
|
1234
1243
|
if (typeof e === u) return e = e.replace(/^\s\s*/, a), typeof t === c ? e : e.substring(0, w);
|
|
1235
1244
|
}, X = function(e, t) {
|
|
1236
1245
|
for (var n = 0, i, a, o, c, u, d; n < t.length && !u;) {
|
|
@@ -1238,12 +1247,12 @@ function Rr() {
|
|
|
1238
1247
|
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;
|
|
1239
1248
|
n += 2;
|
|
1240
1249
|
}
|
|
1241
|
-
},
|
|
1250
|
+
}, bn = function(e, t) {
|
|
1242
1251
|
for (var n in t) if (typeof t[n] === l && t[n].length > 0) {
|
|
1243
|
-
for (var i = 0; i < t[n].length; i++) if (
|
|
1244
|
-
} else if (
|
|
1252
|
+
for (var i = 0; i < t[n].length; i++) if (_n(t[n][i], e)) return n === o ? r : n;
|
|
1253
|
+
} else if (_n(t[n], e)) return n === o ? r : n;
|
|
1245
1254
|
return e;
|
|
1246
|
-
},
|
|
1255
|
+
}, xn = {
|
|
1247
1256
|
"1.0": "/8",
|
|
1248
1257
|
1.2: "/1",
|
|
1249
1258
|
1.3: "/3",
|
|
@@ -1252,7 +1261,7 @@ function Rr() {
|
|
|
1252
1261
|
"2.0.3": "/417",
|
|
1253
1262
|
"2.0.4": "/419",
|
|
1254
1263
|
"?": "/"
|
|
1255
|
-
},
|
|
1264
|
+
}, Sn = {
|
|
1256
1265
|
ME: "4.90",
|
|
1257
1266
|
"NT 3.11": "NT3.51",
|
|
1258
1267
|
"NT 4.0": "NT4.0",
|
|
@@ -1264,7 +1273,7 @@ function Rr() {
|
|
|
1264
1273
|
8.1: "NT 6.3",
|
|
1265
1274
|
10: ["NT 6.4", "NT 10.0"],
|
|
1266
1275
|
RT: "ARM"
|
|
1267
|
-
},
|
|
1276
|
+
}, Cn = {
|
|
1268
1277
|
browser: [
|
|
1269
1278
|
[/\b(?:crmo|crios)\/([\w\.]+)/i],
|
|
1270
1279
|
[g, [p, "Chrome"]],
|
|
@@ -1350,7 +1359,7 @@ function Rr() {
|
|
|
1350
1359
|
],
|
|
1351
1360
|
[p],
|
|
1352
1361
|
[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],
|
|
1353
|
-
[[p,
|
|
1362
|
+
[[p, mn], g],
|
|
1354
1363
|
[
|
|
1355
1364
|
/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,
|
|
1356
1365
|
/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,
|
|
@@ -1378,8 +1387,8 @@ function Rr() {
|
|
|
1378
1387
|
[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],
|
|
1379
1388
|
[p, [
|
|
1380
1389
|
g,
|
|
1381
|
-
|
|
1382
|
-
|
|
1390
|
+
bn,
|
|
1391
|
+
xn
|
|
1383
1392
|
]],
|
|
1384
1393
|
[/(webkit|khtml)\/([\w\.]+)/i],
|
|
1385
1394
|
[p, g],
|
|
@@ -1469,7 +1478,7 @@ function Rr() {
|
|
|
1469
1478
|
[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],
|
|
1470
1479
|
[
|
|
1471
1480
|
f,
|
|
1472
|
-
[h,
|
|
1481
|
+
[h, pn],
|
|
1473
1482
|
[m, y]
|
|
1474
1483
|
],
|
|
1475
1484
|
[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],
|
|
@@ -1876,13 +1885,13 @@ function Rr() {
|
|
|
1876
1885
|
[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],
|
|
1877
1886
|
[
|
|
1878
1887
|
f,
|
|
1879
|
-
[h,
|
|
1888
|
+
[h, W],
|
|
1880
1889
|
[m, b]
|
|
1881
1890
|
],
|
|
1882
1891
|
[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],
|
|
1883
1892
|
[
|
|
1884
1893
|
f,
|
|
1885
|
-
[h,
|
|
1894
|
+
[h, W],
|
|
1886
1895
|
[m, y]
|
|
1887
1896
|
],
|
|
1888
1897
|
[/smart-tv.+(samsung)/i],
|
|
@@ -1920,7 +1929,7 @@ function Rr() {
|
|
|
1920
1929
|
[/\(dtv[\);].+(aquos)/i, /(aquos-tv[\w ]+)\)/i],
|
|
1921
1930
|
[
|
|
1922
1931
|
f,
|
|
1923
|
-
[h,
|
|
1932
|
+
[h, pn],
|
|
1924
1933
|
[m, x]
|
|
1925
1934
|
],
|
|
1926
1935
|
[/(bravia[\w ]+)( bui|\))/i],
|
|
@@ -1943,8 +1952,8 @@ function Rr() {
|
|
|
1943
1952
|
],
|
|
1944
1953
|
[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],
|
|
1945
1954
|
[
|
|
1946
|
-
[h,
|
|
1947
|
-
[f,
|
|
1955
|
+
[h, yn],
|
|
1956
|
+
[f, yn],
|
|
1948
1957
|
[m, x]
|
|
1949
1958
|
],
|
|
1950
1959
|
[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],
|
|
@@ -1994,13 +2003,13 @@ function Rr() {
|
|
|
1994
2003
|
[/droid.+; (wt63?0{2,3})\)/i],
|
|
1995
2004
|
[
|
|
1996
2005
|
f,
|
|
1997
|
-
[h,
|
|
2006
|
+
[h, W],
|
|
1998
2007
|
[m, S]
|
|
1999
2008
|
],
|
|
2000
2009
|
[/(quest( 2| pro)?)/i],
|
|
2001
2010
|
[
|
|
2002
2011
|
f,
|
|
2003
|
-
[h,
|
|
2012
|
+
[h, mn],
|
|
2004
2013
|
[m, S]
|
|
2005
2014
|
],
|
|
2006
2015
|
[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],
|
|
@@ -2024,7 +2033,7 @@ function Rr() {
|
|
|
2024
2033
|
],
|
|
2025
2034
|
engine: [
|
|
2026
2035
|
[/windows.+ edge\/([\w\.]+)/i],
|
|
2027
|
-
[g, [p,
|
|
2036
|
+
[g, [p, fn + "HTML"]],
|
|
2028
2037
|
[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],
|
|
2029
2038
|
[g, [p, "Blink"]],
|
|
2030
2039
|
[
|
|
@@ -2049,14 +2058,14 @@ function Rr() {
|
|
|
2049
2058
|
],
|
|
2050
2059
|
[p, [
|
|
2051
2060
|
g,
|
|
2052
|
-
|
|
2053
|
-
|
|
2061
|
+
bn,
|
|
2062
|
+
Sn
|
|
2054
2063
|
]],
|
|
2055
2064
|
[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],
|
|
2056
2065
|
[[p, "Windows"], [
|
|
2057
2066
|
g,
|
|
2058
|
-
|
|
2059
|
-
|
|
2067
|
+
bn,
|
|
2068
|
+
Sn
|
|
2060
2069
|
]],
|
|
2061
2070
|
[
|
|
2062
2071
|
/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,
|
|
@@ -2069,7 +2078,7 @@ function Rr() {
|
|
|
2069
2078
|
"."
|
|
2070
2079
|
], [p, "iOS"]],
|
|
2071
2080
|
[/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i],
|
|
2072
|
-
[[p,
|
|
2081
|
+
[[p, gn], [
|
|
2073
2082
|
g,
|
|
2074
2083
|
/_/g,
|
|
2075
2084
|
"."
|
|
@@ -2096,7 +2105,7 @@ function Rr() {
|
|
|
2096
2105
|
[/crkey\/([\d\.]+)/i],
|
|
2097
2106
|
[g, [p, A + "cast"]],
|
|
2098
2107
|
[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],
|
|
2099
|
-
[[p,
|
|
2108
|
+
[[p, hn], g],
|
|
2100
2109
|
[
|
|
2101
2110
|
/panasonic;(viera)/i,
|
|
2102
2111
|
/(netrange)mmh/i,
|
|
@@ -2125,10 +2134,10 @@ function Rr() {
|
|
|
2125
2134
|
]
|
|
2126
2135
|
}, Z = function(e, t) {
|
|
2127
2136
|
if (typeof e === l && (t = e, e = r), !(this instanceof Z)) return new Z(e, t).getResult();
|
|
2128
|
-
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 ?
|
|
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 ? G(Cn, t) : Cn, S = i && i.userAgent == o;
|
|
2129
2138
|
return this.getBrowser = function() {
|
|
2130
2139
|
var e = {};
|
|
2131
|
-
return e[p] = r, e[g] = r, X.call(e, o, x.browser), e[d] =
|
|
2140
|
+
return e[p] = r, e[g] = r, X.call(e, o, x.browser), e[d] = vn(e[g]), S && i && i.brave && typeof i.brave.isBrave == s && (e[p] = "Brave"), e;
|
|
2132
2141
|
}, this.getCPU = function() {
|
|
2133
2142
|
var e = {};
|
|
2134
2143
|
return e[_] = r, X.call(e, o, x.cpu), e;
|
|
@@ -2140,7 +2149,7 @@ function Rr() {
|
|
|
2140
2149
|
return e[p] = r, e[g] = r, X.call(e, o, x.engine), e;
|
|
2141
2150
|
}, this.getOS = function() {
|
|
2142
2151
|
var e = {};
|
|
2143
|
-
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,
|
|
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, hn).replace(/macos/i, gn)), e;
|
|
2144
2153
|
}, this.getResult = function() {
|
|
2145
2154
|
return {
|
|
2146
2155
|
ua: this.getUA(),
|
|
@@ -2153,7 +2162,7 @@ function Rr() {
|
|
|
2153
2162
|
}, this.getUA = function() {
|
|
2154
2163
|
return o;
|
|
2155
2164
|
}, this.setUA = function(e) {
|
|
2156
|
-
return o = typeof e === u && e.length > w ?
|
|
2165
|
+
return o = typeof e === u && e.length > w ? yn(e, w) : e, this;
|
|
2157
2166
|
}, this.setUA(o), this;
|
|
2158
2167
|
};
|
|
2159
2168
|
Z.VERSION = i, Z.BROWSER = q([
|
|
@@ -2195,12 +2204,12 @@ function Rr() {
|
|
|
2195
2204
|
}
|
|
2196
2205
|
return a.exports;
|
|
2197
2206
|
}
|
|
2198
|
-
typeof n < "u" && (n.ab = {}.dirname + "/"),
|
|
2199
|
-
})()),
|
|
2207
|
+
typeof n < "u" && (n.ab = {}.dirname + "/"), Ke.exports = n(226);
|
|
2208
|
+
})()), Ke.exports;
|
|
2200
2209
|
}
|
|
2201
|
-
var
|
|
2202
|
-
function
|
|
2203
|
-
return
|
|
2210
|
+
var xt;
|
|
2211
|
+
function Nt() {
|
|
2212
|
+
return xt || (xt = 1, (function(e) {
|
|
2204
2213
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
2205
2214
|
function t(e, t) {
|
|
2206
2215
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -2219,7 +2228,7 @@ function Ut() {
|
|
|
2219
2228
|
return a;
|
|
2220
2229
|
}
|
|
2221
2230
|
});
|
|
2222
|
-
let n = /* @__PURE__ */ r(
|
|
2231
|
+
let n = /* @__PURE__ */ r(vr());
|
|
2223
2232
|
function r(e) {
|
|
2224
2233
|
return e && e.__esModule ? e : { default: e };
|
|
2225
2234
|
}
|
|
@@ -2235,11 +2244,11 @@ function Ut() {
|
|
|
2235
2244
|
function o({ headers: e }) {
|
|
2236
2245
|
return a(e.get("user-agent") || void 0);
|
|
2237
2246
|
}
|
|
2238
|
-
})(
|
|
2247
|
+
})(Ve)), Ve;
|
|
2239
2248
|
}
|
|
2240
|
-
var
|
|
2241
|
-
function
|
|
2242
|
-
return
|
|
2249
|
+
var Ye = {}, Ct;
|
|
2250
|
+
function Rr() {
|
|
2251
|
+
return Ct || (Ct = 1, (function(e) {
|
|
2243
2252
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "URLPattern", {
|
|
2244
2253
|
enumerable: !0,
|
|
2245
2254
|
get: function() {
|
|
@@ -2247,28 +2256,28 @@ function Pr() {
|
|
|
2247
2256
|
}
|
|
2248
2257
|
});
|
|
2249
2258
|
let t = typeof URLPattern > "u" ? void 0 : URLPattern;
|
|
2250
|
-
})(
|
|
2259
|
+
})(Ye)), Ye;
|
|
2251
2260
|
}
|
|
2252
|
-
var
|
|
2253
|
-
function
|
|
2254
|
-
return
|
|
2261
|
+
var Lt;
|
|
2262
|
+
function Pr() {
|
|
2263
|
+
return Lt || (Lt = 1, (function(e, t) {
|
|
2255
2264
|
let n = {
|
|
2256
|
-
NextRequest:
|
|
2257
|
-
NextResponse:
|
|
2258
|
-
ImageResponse:
|
|
2259
|
-
userAgentFromString:
|
|
2260
|
-
userAgent:
|
|
2261
|
-
URLPattern:
|
|
2265
|
+
NextRequest: br().NextRequest,
|
|
2266
|
+
NextResponse: wr().NextResponse,
|
|
2267
|
+
ImageResponse: Er().ImageResponse,
|
|
2268
|
+
userAgentFromString: Nt().userAgentFromString,
|
|
2269
|
+
userAgent: Nt().userAgent,
|
|
2270
|
+
URLPattern: Rr().URLPattern
|
|
2262
2271
|
};
|
|
2263
2272
|
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;
|
|
2264
|
-
})(
|
|
2273
|
+
})(we, we.exports)), we.exports;
|
|
2265
2274
|
}
|
|
2266
|
-
|
|
2267
|
-
var
|
|
2275
|
+
Pr();
|
|
2276
|
+
var Qe = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "logout", e))(Qe || {}), Je = {
|
|
2268
2277
|
login: "login",
|
|
2269
2278
|
logout: "logout",
|
|
2270
2279
|
unknown: ""
|
|
2271
|
-
},
|
|
2280
|
+
}, Y = "Content-Type", M = {
|
|
2272
2281
|
applicationJson: "application/json",
|
|
2273
2282
|
multipartFormData: "multipart/form-data",
|
|
2274
2283
|
applicationXwwwFormUrlencoded: "application/x-www-form-urlencoded"
|
|
@@ -2278,8 +2287,8 @@ var Ze = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2278
2287
|
adapter;
|
|
2279
2288
|
constructor({ config: e, adapter: t, storage: n }) {
|
|
2280
2289
|
this.config = e;
|
|
2281
|
-
let r =
|
|
2282
|
-
(!r.deviceId || r.deviceId.trim().length === 0) && (r =
|
|
2290
|
+
let r = Ar(n.headers);
|
|
2291
|
+
(!r.deviceId || r.deviceId.trim().length === 0) && (r = Or(n.cookies)), this.http = new Lr({
|
|
2283
2292
|
...r,
|
|
2284
2293
|
userType: e.userType,
|
|
2285
2294
|
helloURL: e.helloURL
|
|
@@ -2302,14 +2311,16 @@ var Ze = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2302
2311
|
}[n], i = e.cookies;
|
|
2303
2312
|
if (this.http.setHttpOptsToCookies(i), !r || r.length === 0) return this.createErrorResponse(404, "API not found", i);
|
|
2304
2313
|
let a;
|
|
2305
|
-
if ((r.startsWith("admin/") || r.startsWith("api/")) && (a =
|
|
2314
|
+
if ((r.startsWith("admin/") || r.startsWith("api/")) && (a = xr(i), L.debug(a, "token"), !a || a.username.length === 0 || a.token.length === 0)) return this.createErrorResponse(409, "Authentication required", i);
|
|
2306
2315
|
L.debug({ "content-type": e.contentType }, "Content-Type"), L.debug({
|
|
2307
2316
|
hostUrl: r,
|
|
2308
2317
|
token: a ? { ...a } : ""
|
|
2309
2318
|
}, "processRequest");
|
|
2310
2319
|
let s = e.method;
|
|
2311
2320
|
if (s === "GET") {
|
|
2312
|
-
let n =
|
|
2321
|
+
let n = { ...t };
|
|
2322
|
+
n.delete("m");
|
|
2323
|
+
let i = await this.http.get({
|
|
2313
2324
|
url: r,
|
|
2314
2325
|
data: n,
|
|
2315
2326
|
token: a
|
|
@@ -2350,7 +2361,7 @@ var Ze = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2350
2361
|
}
|
|
2351
2362
|
createResponse({ url: e, result: t, config: n, req: r }) {
|
|
2352
2363
|
let i = {};
|
|
2353
|
-
i[
|
|
2364
|
+
i[Y] = M.applicationJson;
|
|
2354
2365
|
let a = {
|
|
2355
2366
|
status: t.success ? 200 : t.code,
|
|
2356
2367
|
headers: i,
|
|
@@ -2360,12 +2371,12 @@ var Ze = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2360
2371
|
};
|
|
2361
2372
|
if (t.success) {
|
|
2362
2373
|
switch (e) {
|
|
2363
|
-
case Je[
|
|
2374
|
+
case Je[Qe[0]]:
|
|
2364
2375
|
let e = t.data;
|
|
2365
|
-
|
|
2376
|
+
Nr(e, a);
|
|
2366
2377
|
break;
|
|
2367
|
-
case Je[
|
|
2368
|
-
a.cleanCookies = (e) =>
|
|
2378
|
+
case Je[Qe[1]]:
|
|
2379
|
+
a.cleanCookies = (e) => Cr(e);
|
|
2369
2380
|
break;
|
|
2370
2381
|
}
|
|
2371
2382
|
n.onHandlerSuccess && n.onHandlerSuccess({
|
|
@@ -2379,7 +2390,7 @@ var Ze = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2379
2390
|
}
|
|
2380
2391
|
createErrorResponse(e, t, n) {
|
|
2381
2392
|
let r = {};
|
|
2382
|
-
return r[
|
|
2393
|
+
return r[Y] = M.applicationJson, {
|
|
2383
2394
|
status: e,
|
|
2384
2395
|
headers: r,
|
|
2385
2396
|
cookies: n ? this.setCookies(n) : {},
|
|
@@ -2403,27 +2414,30 @@ var Ze = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2403
2414
|
IBOOT_WEBSITE_NO: "wno",
|
|
2404
2415
|
IBOOT_TOKEN: "token",
|
|
2405
2416
|
IBOOT_USER: "user"
|
|
2406
|
-
},
|
|
2417
|
+
}, K = {
|
|
2407
2418
|
DEVICE_ID: "Device-Id",
|
|
2408
2419
|
LANG: "Lang",
|
|
2409
2420
|
WEBSITE_ID: "Website-Id",
|
|
2410
2421
|
WEBSITE_NO: "Website-No"
|
|
2411
|
-
},
|
|
2422
|
+
}, Ar = (e) => {
|
|
2412
2423
|
if (e.get) {
|
|
2413
|
-
let t = 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 = {};
|
|
2414
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;
|
|
2415
2426
|
}
|
|
2416
2427
|
throw Error("The get method of IStorage has not been implemented.");
|
|
2417
|
-
},
|
|
2418
|
-
if (e.set) t.deviceId && e.set(
|
|
2428
|
+
}, $r = (e, t) => {
|
|
2429
|
+
if (e.set) t.deviceId && e.set(K.DEVICE_ID, t.deviceId), t.lang && e.set(K.LANG, t.lang), t.websiteId && e.set(K.WEBSITE_ID, t.websiteId), t.websiteNo && e.set(K.WEBSITE_NO, t.websiteNo);
|
|
2419
2430
|
else throw Error("The set method of IStorage has not been implemented.");
|
|
2420
|
-
},
|
|
2431
|
+
}, Or = (e) => {
|
|
2421
2432
|
if (e.get) {
|
|
2422
2433
|
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 = {};
|
|
2423
2434
|
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;
|
|
2424
2435
|
}
|
|
2425
2436
|
throw Error("The get method of ICookies has not been implemented.");
|
|
2426
|
-
},
|
|
2437
|
+
}, Qr = (e, t) => {
|
|
2438
|
+
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);
|
|
2439
|
+
else throw Error("The set method of ICookies has not been implemented.");
|
|
2440
|
+
}, xr = (e) => {
|
|
2427
2441
|
if (e.get) {
|
|
2428
2442
|
let t = e[U.IBOOT_USER];
|
|
2429
2443
|
if (t && t.length > 0) {
|
|
@@ -2435,16 +2449,16 @@ var Ze = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2435
2449
|
};
|
|
2436
2450
|
}
|
|
2437
2451
|
}
|
|
2438
|
-
},
|
|
2452
|
+
}, Ut = () => ({
|
|
2439
2453
|
path: "/",
|
|
2440
2454
|
secure: process.env.APP_ENV === "production",
|
|
2441
2455
|
httpOnly: !0,
|
|
2442
2456
|
sameSite: "strict"
|
|
2443
|
-
}),
|
|
2457
|
+
}), Ee = {
|
|
2444
2458
|
maxAge: -1,
|
|
2445
2459
|
httpOnly: !0,
|
|
2446
2460
|
path: "/"
|
|
2447
|
-
},
|
|
2461
|
+
}, Nr = (e, t) => {
|
|
2448
2462
|
let { id: n, name: r, username: i, nickname: a, headImg: o, token: s, lastLoginTime: c, deviceId: l, userType: u, mustChangePwd: d } = e, f = {
|
|
2449
2463
|
id: n,
|
|
2450
2464
|
name: r,
|
|
@@ -2461,16 +2475,16 @@ var Ze = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2461
2475
|
};
|
|
2462
2476
|
t.cookies[U.IBOOT_TOKEN] = {
|
|
2463
2477
|
value: s,
|
|
2464
|
-
options:
|
|
2478
|
+
options: Ut()
|
|
2465
2479
|
}, t.cookies[U.IBOOT_USER] = {
|
|
2466
2480
|
value: JSON.stringify(f),
|
|
2467
|
-
options:
|
|
2481
|
+
options: Ut()
|
|
2468
2482
|
};
|
|
2469
|
-
},
|
|
2483
|
+
}, Cr = (e) => {
|
|
2470
2484
|
if (!e.set) throw Error("cookies set function is undefined");
|
|
2471
|
-
if (e.set(U.IBOOT_TOKEN, "",
|
|
2472
|
-
e.delete(U.IBOOT_TOKEN,
|
|
2473
|
-
},
|
|
2485
|
+
if (e.set(U.IBOOT_TOKEN, "", Ee), e.set(U.IBOOT_USER, "", Ee), !e.delete) throw Error("cookies delete function is undefined");
|
|
2486
|
+
e.delete(U.IBOOT_TOKEN, Ee), e.delete(U.IBOOT_USER, Ee);
|
|
2487
|
+
}, Lr = class {
|
|
2474
2488
|
baseUrl;
|
|
2475
2489
|
helloMethod;
|
|
2476
2490
|
apiKey;
|
|
@@ -2482,7 +2496,7 @@ var Ze = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2482
2496
|
websiteId;
|
|
2483
2497
|
websiteNo;
|
|
2484
2498
|
constructor(e) {
|
|
2485
|
-
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 ??
|
|
2499
|
+
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 ?? tr.TYPE_MGT, this.deviceId = e.deviceId ?? ir(), this.lang = e.lang ?? Tr, this.websiteId = e.websiteId, this.websiteNo = e.websiteNo;
|
|
2486
2500
|
}
|
|
2487
2501
|
encrypt(e) {
|
|
2488
2502
|
let t = ne.enc.Utf8.parse(this.apiKey);
|
|
@@ -2495,66 +2509,30 @@ var Ze = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2495
2509
|
setHttpOptsToCookies = (e) => {
|
|
2496
2510
|
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);
|
|
2497
2511
|
};
|
|
2498
|
-
convertUrlParameter(e) {
|
|
2499
|
-
let t = [];
|
|
2500
|
-
for (let n in e) {
|
|
2501
|
-
let r = e[n];
|
|
2502
|
-
if (r && typeof r == "string") r = r.trim();
|
|
2503
|
-
else if (r && typeof r == "object") {
|
|
2504
|
-
if (ct(r)) {
|
|
2505
|
-
if (r.length === 0) continue;
|
|
2506
|
-
for (let e = 0; e < r.length; e++) {
|
|
2507
|
-
let i = r[e];
|
|
2508
|
-
for (let r in i) {
|
|
2509
|
-
let a = i[r] ?? void 0;
|
|
2510
|
-
if (a) {
|
|
2511
|
-
if (typeof a == "object") ct(a) && a.forEach((i, a) => {
|
|
2512
|
-
if (i) for (let o in i) {
|
|
2513
|
-
let s = i[o];
|
|
2514
|
-
if (s && s.toString().length > 0) {
|
|
2515
|
-
let i = `[${e.toString()}].${r + `[${a.toString()}].${o}`}=${we(s)}`;
|
|
2516
|
-
t.push(n + i);
|
|
2517
|
-
}
|
|
2518
|
-
}
|
|
2519
|
-
});
|
|
2520
|
-
else if (a.toString().length > 0) {
|
|
2521
|
-
let i = `[${e.toString()}].${r}=${we(a.toString())}`;
|
|
2522
|
-
t.push(n + i);
|
|
2523
|
-
}
|
|
2524
|
-
}
|
|
2525
|
-
}
|
|
2526
|
-
}
|
|
2527
|
-
} else for (let e in r) {
|
|
2528
|
-
let i = r[e];
|
|
2529
|
-
if (i != null && i != "" && i.length != 0) {
|
|
2530
|
-
let r = `.${e}=${we(i)}`;
|
|
2531
|
-
t.push(n + r);
|
|
2532
|
-
}
|
|
2533
|
-
}
|
|
2534
|
-
continue;
|
|
2535
|
-
} else r && typeof r == "function" && (r = null);
|
|
2536
|
-
r != null && r != "" && r.length != 0 && t.push(n + "=" + we(r));
|
|
2537
|
-
}
|
|
2538
|
-
return t && t.join("&");
|
|
2539
|
-
}
|
|
2540
2512
|
async sign(e) {
|
|
2541
2513
|
let t = "&key=" + await this.helloIboot(), r = [];
|
|
2542
|
-
for (let t
|
|
2543
|
-
r.sort((e, t) =>
|
|
2514
|
+
for (let t of e.keys()) r.push(t);
|
|
2515
|
+
r.sort((e, t) => {
|
|
2516
|
+
let n = e.match(/(\d+)/), r = t.match(/(\d+)/);
|
|
2517
|
+
return n && r && e.replace(/\d+/, "") === t.replace(/\d+/, "") ? parseInt(n[1]) - parseInt(r[1]) : e.toLowerCase().localeCompare(t.toLowerCase(), void 0, {
|
|
2518
|
+
numeric: !0,
|
|
2519
|
+
sensitivity: "base"
|
|
2520
|
+
});
|
|
2521
|
+
});
|
|
2544
2522
|
let i = [];
|
|
2545
2523
|
r.forEach((t) => {
|
|
2546
|
-
let n = e
|
|
2547
|
-
|
|
2524
|
+
let n = e.get(t);
|
|
2525
|
+
n && i.push(t + "=" + n);
|
|
2548
2526
|
});
|
|
2549
|
-
let a = i.join("&"), s =
|
|
2527
|
+
let a = i.join("&"), s = Kt.md5((a + t).toLocaleUpperCase()), c = {
|
|
2550
2528
|
params: a,
|
|
2551
2529
|
md5: s
|
|
2552
2530
|
};
|
|
2553
2531
|
return L.debug(c, "API_SIGN"), s;
|
|
2554
2532
|
}
|
|
2555
2533
|
assemblyParameter(e, t) {
|
|
2556
|
-
let n = e ??
|
|
2557
|
-
return n.timestamp
|
|
2534
|
+
let n = e ?? new URLSearchParams(), r = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
2535
|
+
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 !== ""));
|
|
2558
2536
|
}
|
|
2559
2537
|
async assemblyHeader({ urlParams: e, token: t }) {
|
|
2560
2538
|
let n = {
|
|
@@ -2564,9 +2542,7 @@ var Ze = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2564
2542
|
"User-From": this.userFrom,
|
|
2565
2543
|
"Api-Key": this.apiKey
|
|
2566
2544
|
};
|
|
2567
|
-
n[
|
|
2568
|
-
let r = tt(e);
|
|
2569
|
-
return n.Sign = await this.sign(r), n;
|
|
2545
|
+
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;
|
|
2570
2546
|
}
|
|
2571
2547
|
async helloIboot() {
|
|
2572
2548
|
if (this.helloMethod.length <= 0) return this.apiKey;
|
|
@@ -2574,7 +2550,7 @@ var Ze = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2574
2550
|
"Res-Type": "json",
|
|
2575
2551
|
"Api-Key": this.apiKey
|
|
2576
2552
|
};
|
|
2577
|
-
t[
|
|
2553
|
+
t[Y] = M.applicationXwwwFormUrlencoded;
|
|
2578
2554
|
let n = {
|
|
2579
2555
|
url: e,
|
|
2580
2556
|
headers: t
|
|
@@ -2603,99 +2579,68 @@ var Ze = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2603
2579
|
}
|
|
2604
2580
|
}
|
|
2605
2581
|
async get({ url: e, data: t, token: n, cache: r = "default" }) {
|
|
2606
|
-
let i = this.assemblyParameter(t
|
|
2607
|
-
urlParams:
|
|
2582
|
+
let i = this.assemblyParameter(t ? new URLSearchParams(t) : void 0), a = await this.assemblyHeader({
|
|
2583
|
+
urlParams: i,
|
|
2608
2584
|
token: n
|
|
2609
|
-
}),
|
|
2610
|
-
url:
|
|
2611
|
-
headers:
|
|
2585
|
+
}), s = `${this.getApiUrl(e)}?${i.toString()}`, c = {
|
|
2586
|
+
url: s,
|
|
2587
|
+
headers: a
|
|
2612
2588
|
};
|
|
2613
|
-
L.info(
|
|
2614
|
-
let
|
|
2589
|
+
L.info(c, "GET");
|
|
2590
|
+
let l = await fetch(s, {
|
|
2615
2591
|
method: "GET",
|
|
2616
|
-
headers:
|
|
2592
|
+
headers: a,
|
|
2617
2593
|
credentials: "include",
|
|
2618
2594
|
cache: r
|
|
2619
2595
|
});
|
|
2620
|
-
if (
|
|
2621
|
-
let e = Object.fromEntries(
|
|
2622
|
-
...await
|
|
2596
|
+
if (l.ok) {
|
|
2597
|
+
let e = Object.fromEntries(l.headers.entries()), t = {
|
|
2598
|
+
...await l.json(),
|
|
2623
2599
|
headers: e
|
|
2624
2600
|
};
|
|
2625
2601
|
return L.debug(t, "GET_RESULT"), t;
|
|
2626
2602
|
}
|
|
2627
|
-
let
|
|
2628
|
-
code:
|
|
2603
|
+
let u = {
|
|
2604
|
+
code: l.status,
|
|
2629
2605
|
success: !1,
|
|
2630
|
-
msg:
|
|
2606
|
+
msg: l.statusText
|
|
2631
2607
|
};
|
|
2632
|
-
return L.error(
|
|
2608
|
+
return L.error(u), u;
|
|
2633
2609
|
}
|
|
2634
2610
|
async post({ url: e, data: t, token: n, cache: r = "default" }) {
|
|
2635
2611
|
let i = t ? { ...t } : {}, a = i.buffer ?? void 0, s = i.boundary ?? void 0;
|
|
2636
2612
|
a && delete i.buffer, s && delete i.boundary;
|
|
2637
|
-
let c = this.assemblyParameter(i), l =
|
|
2638
|
-
urlParams:
|
|
2613
|
+
let c = this.assemblyParameter(new URLSearchParams(i)), l = await this.assemblyHeader({
|
|
2614
|
+
urlParams: c,
|
|
2639
2615
|
token: n
|
|
2640
2616
|
});
|
|
2641
|
-
a && s && (
|
|
2642
|
-
let
|
|
2643
|
-
url:
|
|
2644
|
-
headers:
|
|
2617
|
+
a && s && (l["Content-Type"] = `multipart/form-data; boundary=${s}`);
|
|
2618
|
+
let u = this.getApiUrl(e), d = {
|
|
2619
|
+
url: u,
|
|
2620
|
+
headers: l,
|
|
2645
2621
|
params: c
|
|
2646
2622
|
};
|
|
2647
|
-
L.info(
|
|
2648
|
-
let
|
|
2623
|
+
L.info(d, "POST");
|
|
2624
|
+
let f = a ? `${u}?${c}` : u, p = await fetch(f, {
|
|
2649
2625
|
method: "POST",
|
|
2650
|
-
headers:
|
|
2651
|
-
body: a ||
|
|
2626
|
+
headers: l,
|
|
2627
|
+
body: a || c,
|
|
2652
2628
|
credentials: "include",
|
|
2653
2629
|
cache: r
|
|
2654
2630
|
});
|
|
2655
|
-
if (
|
|
2656
|
-
let e = Object.fromEntries(
|
|
2657
|
-
...await
|
|
2631
|
+
if (p.ok) {
|
|
2632
|
+
let e = Object.fromEntries(p.headers.entries()), t = {
|
|
2633
|
+
...await p.json(),
|
|
2658
2634
|
headers: e
|
|
2659
2635
|
};
|
|
2660
2636
|
return L.debug(t, "POST_RESULT"), t;
|
|
2661
2637
|
}
|
|
2662
|
-
let
|
|
2663
|
-
code:
|
|
2638
|
+
let m = {
|
|
2639
|
+
code: p.status,
|
|
2664
2640
|
success: !1,
|
|
2665
|
-
msg:
|
|
2641
|
+
msg: p.statusText
|
|
2666
2642
|
};
|
|
2667
|
-
return L.error(
|
|
2668
|
-
}
|
|
2669
|
-
async stream({ url: e, data: t, token: n }) {
|
|
2670
|
-
t = t ? { ...t } : {};
|
|
2671
|
-
let r = t.buffer ?? void 0, i = t.boundary ?? void 0;
|
|
2672
|
-
r && delete t.buffer, i && delete t.boundary;
|
|
2673
|
-
let a = this.assemblyParameter(t), s = this.convertUrlParameter(a), c = await this.assemblyHeader({
|
|
2674
|
-
urlParams: s,
|
|
2675
|
-
token: n
|
|
2676
|
-
});
|
|
2677
|
-
r && i && (c["Content-Type"] = `multipart/form-data; boundary=${i}`), c.Connection = "keep-alive", c["X-Accel-Buffering"] = "no", c["Cache-Control"] = "no-cache";
|
|
2678
|
-
let l = this.getApiUrl(e);
|
|
2679
|
-
try {
|
|
2680
|
-
let e = r ? `${l}?${s}` : l, t = {
|
|
2681
|
-
url: l,
|
|
2682
|
-
headers: c,
|
|
2683
|
-
params: a
|
|
2684
|
-
};
|
|
2685
|
-
L.info(t, "STREAM");
|
|
2686
|
-
let n = await fetch(e, {
|
|
2687
|
-
method: "POST",
|
|
2688
|
-
headers: c,
|
|
2689
|
-
body: r || s.toString(),
|
|
2690
|
-
credentials: "include"
|
|
2691
|
-
});
|
|
2692
|
-
if (!n.ok) throw Error(`HTTP error! status: ${n.status}`);
|
|
2693
|
-
if (!n.body) throw Error("No response body");
|
|
2694
|
-
let i = Object.fromEntries(n.headers.entries());
|
|
2695
|
-
return new Response(n.body, { headers: i });
|
|
2696
|
-
} catch (e) {
|
|
2697
|
-
throw e;
|
|
2698
|
-
}
|
|
2643
|
+
return L.error(m), m;
|
|
2699
2644
|
}
|
|
2700
2645
|
}, baseUrl = {
|
|
2701
2646
|
site: "guest/site/",
|
|
@@ -2713,22 +2658,19 @@ const helloURL = `${baseUrl.site}helloIBoot`;
|
|
|
2713
2658
|
var ICMSServer = class {
|
|
2714
2659
|
http;
|
|
2715
2660
|
constructor(e) {
|
|
2716
|
-
this.http = new
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
websiteId: e?.websiteId,
|
|
2720
|
-
websiteNo: e?.websiteNo,
|
|
2721
|
-
userType: or.TYPE_C,
|
|
2661
|
+
this.http = new Lr({
|
|
2662
|
+
...Ar(e.headerStorage),
|
|
2663
|
+
userType: tr.TYPE_C,
|
|
2722
2664
|
helloURL
|
|
2723
|
-
})
|
|
2665
|
+
});
|
|
2724
2666
|
}
|
|
2725
|
-
async helloWebsite(e) {
|
|
2726
|
-
let
|
|
2727
|
-
if (
|
|
2728
|
-
let
|
|
2729
|
-
if (
|
|
2730
|
-
let
|
|
2731
|
-
|
|
2667
|
+
async helloWebsite(e, t) {
|
|
2668
|
+
let n = baseUrl.site + "helloWebsite", r = await this.http.get({ url: n });
|
|
2669
|
+
if (r.success) {
|
|
2670
|
+
let n = r.headers;
|
|
2671
|
+
if (n) {
|
|
2672
|
+
let r = n["device-id"], i = n.lang, a = n["web-id"], o = n["web-no"], s = {};
|
|
2673
|
+
r && r.length > 0 && (s.deviceId = r), i && i.length > 0 && (s.lang = i), a && a.length > 0 && (s.websiteId = a), o && o.length > 0 && (s.websiteNo = o), $r(e, s), Qr(t, s);
|
|
2732
2674
|
}
|
|
2733
2675
|
}
|
|
2734
2676
|
}
|
|
@@ -2882,18 +2824,15 @@ var ICMSServer = class {
|
|
|
2882
2824
|
throw Error(n.msg);
|
|
2883
2825
|
}
|
|
2884
2826
|
}, APIMAP = {};
|
|
2885
|
-
const icmsRouter = async ({ request: e, routeAdapter: t, storage: n }) => {
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
storage: n
|
|
2895
|
-
}).handleRequest(e);
|
|
2896
|
-
};
|
|
2827
|
+
const icmsRouter = async ({ request: e, routeAdapter: t, storage: n }) => await new zr({
|
|
2828
|
+
config: {
|
|
2829
|
+
userType: tr.TYPE_B,
|
|
2830
|
+
APIMAP,
|
|
2831
|
+
helloURL
|
|
2832
|
+
},
|
|
2833
|
+
adapter: t,
|
|
2834
|
+
storage: n
|
|
2835
|
+
}).handleRequest(e);
|
|
2897
2836
|
export { ICMSServer, helloURL, icmsRouter };
|
|
2898
2837
|
|
|
2899
2838
|
//# sourceMappingURL=icms-api.es.js.map
|