icms-api 0.0.2 → 0.0.4
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 +168 -156
- 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/server.d.ts +3 -5
- package/package.json +2 -2
package/dist/icms-api.es.js
CHANGED
|
@@ -18,13 +18,28 @@ var tr = {
|
|
|
18
18
|
name: process.env.APP_NAME ?? "iBoot",
|
|
19
19
|
level: process.env.APP_ENV === "production" ? "info" : "debug",
|
|
20
20
|
nestedKey: "payload"
|
|
21
|
-
}, rr),
|
|
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
|
-
function
|
|
27
|
-
|
|
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) {
|
|
28
43
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "detectDomainLocale", {
|
|
29
44
|
enumerable: !0,
|
|
30
45
|
get: function() {
|
|
@@ -40,11 +55,11 @@ function nr() {
|
|
|
40
55
|
}
|
|
41
56
|
}
|
|
42
57
|
}
|
|
43
|
-
})(
|
|
58
|
+
})(Se)), Se;
|
|
44
59
|
}
|
|
45
|
-
var Ae = {}, Oe = {},
|
|
46
|
-
function
|
|
47
|
-
return
|
|
60
|
+
var Ae = {}, Oe = {}, ut;
|
|
61
|
+
function sr() {
|
|
62
|
+
return ut || (ut = 1, (function(e) {
|
|
48
63
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "removeTrailingSlash", {
|
|
49
64
|
enumerable: !0,
|
|
50
65
|
get: function() {
|
|
@@ -56,9 +71,9 @@ function ir() {
|
|
|
56
71
|
}
|
|
57
72
|
})(Oe)), Oe;
|
|
58
73
|
}
|
|
59
|
-
var xe = {}, Ne = {},
|
|
74
|
+
var xe = {}, Ne = {}, ct;
|
|
60
75
|
function et() {
|
|
61
|
-
return
|
|
76
|
+
return ct || (ct = 1, (function(e) {
|
|
62
77
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "parsePath", {
|
|
63
78
|
enumerable: !0,
|
|
64
79
|
get: function() {
|
|
@@ -79,9 +94,9 @@ function et() {
|
|
|
79
94
|
}
|
|
80
95
|
})(Ne)), Ne;
|
|
81
96
|
}
|
|
82
|
-
var
|
|
97
|
+
var lt;
|
|
83
98
|
function Mt() {
|
|
84
|
-
return
|
|
99
|
+
return lt || (lt = 1, (function(e) {
|
|
85
100
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "addPathPrefix", {
|
|
86
101
|
enumerable: !0,
|
|
87
102
|
get: function() {
|
|
@@ -96,9 +111,9 @@ function Mt() {
|
|
|
96
111
|
}
|
|
97
112
|
})(xe)), xe;
|
|
98
113
|
}
|
|
99
|
-
var Ce = {},
|
|
100
|
-
function
|
|
101
|
-
return
|
|
114
|
+
var Ce = {}, dt;
|
|
115
|
+
function ar() {
|
|
116
|
+
return dt || (dt = 1, (function(e) {
|
|
102
117
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "addPathSuffix", {
|
|
103
118
|
enumerable: !0,
|
|
104
119
|
get: function() {
|
|
@@ -113,9 +128,9 @@ function or() {
|
|
|
113
128
|
}
|
|
114
129
|
})(Ce)), Ce;
|
|
115
130
|
}
|
|
116
|
-
var Le = {}, ke = {},
|
|
131
|
+
var Le = {}, ke = {}, ht;
|
|
117
132
|
function tt() {
|
|
118
|
-
return
|
|
133
|
+
return ht || (ht = 1, (function(e) {
|
|
119
134
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "pathHasPrefix", {
|
|
120
135
|
enumerable: !0,
|
|
121
136
|
get: function() {
|
|
@@ -130,9 +145,9 @@ function tt() {
|
|
|
130
145
|
}
|
|
131
146
|
})(ke)), ke;
|
|
132
147
|
}
|
|
133
|
-
var
|
|
134
|
-
function
|
|
135
|
-
return
|
|
148
|
+
var ft;
|
|
149
|
+
function ur() {
|
|
150
|
+
return ft || (ft = 1, (function(e) {
|
|
136
151
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "addLocale", {
|
|
137
152
|
enumerable: !0,
|
|
138
153
|
get: function() {
|
|
@@ -147,25 +162,25 @@ function sr() {
|
|
|
147
162
|
}
|
|
148
163
|
})(Le)), Le;
|
|
149
164
|
}
|
|
150
|
-
var
|
|
151
|
-
function
|
|
152
|
-
return
|
|
165
|
+
var pt;
|
|
166
|
+
function cr() {
|
|
167
|
+
return pt || (pt = 1, (function(e) {
|
|
153
168
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "formatNextPathnameInfo", {
|
|
154
169
|
enumerable: !0,
|
|
155
170
|
get: function() {
|
|
156
171
|
return a;
|
|
157
172
|
}
|
|
158
173
|
});
|
|
159
|
-
let t =
|
|
174
|
+
let t = sr(), n = Mt(), r = ar(), i = ur();
|
|
160
175
|
function a(e) {
|
|
161
176
|
let a = (0, i.addLocale)(e.pathname, e.locale, e.buildId ? void 0 : e.defaultLocale, e.ignorePrefix);
|
|
162
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);
|
|
163
178
|
}
|
|
164
179
|
})(Ae)), Ae;
|
|
165
180
|
}
|
|
166
|
-
var Ue = {},
|
|
167
|
-
function
|
|
168
|
-
return
|
|
181
|
+
var Ue = {}, mt;
|
|
182
|
+
function lr() {
|
|
183
|
+
return mt || (mt = 1, (function(e) {
|
|
169
184
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "getHostname", {
|
|
170
185
|
enumerable: !0,
|
|
171
186
|
get: function() {
|
|
@@ -181,9 +196,9 @@ function ur() {
|
|
|
181
196
|
}
|
|
182
197
|
})(Ue)), Ue;
|
|
183
198
|
}
|
|
184
|
-
var De = {}, Me = {},
|
|
185
|
-
function
|
|
186
|
-
return
|
|
199
|
+
var De = {}, Me = {}, _t;
|
|
200
|
+
function dr() {
|
|
201
|
+
return _t || (_t = 1, (function(e) {
|
|
187
202
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "normalizeLocalePath", {
|
|
188
203
|
enumerable: !0,
|
|
189
204
|
get: function() {
|
|
@@ -199,9 +214,9 @@ function cr() {
|
|
|
199
214
|
}
|
|
200
215
|
})(Me)), Me;
|
|
201
216
|
}
|
|
202
|
-
var je = {},
|
|
203
|
-
function
|
|
204
|
-
return
|
|
217
|
+
var je = {}, bt;
|
|
218
|
+
function hr() {
|
|
219
|
+
return bt || (bt = 1, (function(e) {
|
|
205
220
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "removePathPrefix", {
|
|
206
221
|
enumerable: !0,
|
|
207
222
|
get: function() {
|
|
@@ -216,16 +231,16 @@ function lr() {
|
|
|
216
231
|
}
|
|
217
232
|
})(je)), je;
|
|
218
233
|
}
|
|
219
|
-
var
|
|
220
|
-
function
|
|
221
|
-
return
|
|
234
|
+
var gt;
|
|
235
|
+
function fr() {
|
|
236
|
+
return gt || (gt = 1, (function(e) {
|
|
222
237
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "getNextPathnameInfo", {
|
|
223
238
|
enumerable: !0,
|
|
224
239
|
get: function() {
|
|
225
240
|
return i;
|
|
226
241
|
}
|
|
227
242
|
});
|
|
228
|
-
let t =
|
|
243
|
+
let t = dr(), n = hr(), r = tt();
|
|
229
244
|
function i(e, i) {
|
|
230
245
|
let { basePath: a, i18n: o, trailingSlash: s } = i.nextConfig ?? {}, c = {
|
|
231
246
|
pathname: e,
|
|
@@ -245,16 +260,16 @@ function dr() {
|
|
|
245
260
|
}
|
|
246
261
|
})(De)), De;
|
|
247
262
|
}
|
|
248
|
-
var
|
|
263
|
+
var wt;
|
|
249
264
|
function jt() {
|
|
250
|
-
return
|
|
265
|
+
return wt || (wt = 1, (function(e) {
|
|
251
266
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "NextURL", {
|
|
252
267
|
enumerable: !0,
|
|
253
268
|
get: function() {
|
|
254
269
|
return c;
|
|
255
270
|
}
|
|
256
271
|
});
|
|
257
|
-
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)/;
|
|
258
273
|
function o(e, t) {
|
|
259
274
|
return new URL(String(e).replace(a, "localhost"), t && String(t).replace(a, "localhost"));
|
|
260
275
|
}
|
|
@@ -411,11 +426,11 @@ function jt() {
|
|
|
411
426
|
return new c(String(this), this[s].options);
|
|
412
427
|
}
|
|
413
428
|
}
|
|
414
|
-
})(
|
|
429
|
+
})(Ie)), Ie;
|
|
415
430
|
}
|
|
416
|
-
var qe = {}, He = {},
|
|
417
|
-
function
|
|
418
|
-
return
|
|
431
|
+
var qe = {}, He = {}, Et;
|
|
432
|
+
function pr() {
|
|
433
|
+
return Et || (Et = 1, (function(e) {
|
|
419
434
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
420
435
|
function t(e, t) {
|
|
421
436
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -428,7 +443,7 @@ function hr() {
|
|
|
428
443
|
return c;
|
|
429
444
|
},
|
|
430
445
|
APP_DIR_ALIAS: function() {
|
|
431
|
-
return
|
|
446
|
+
return dn;
|
|
432
447
|
},
|
|
433
448
|
CACHE_ONE_YEAR: function() {
|
|
434
449
|
return b;
|
|
@@ -437,7 +452,7 @@ function hr() {
|
|
|
437
452
|
return T;
|
|
438
453
|
},
|
|
439
454
|
ESLINT_DEFAULT_DIRS: function() {
|
|
440
|
-
return
|
|
455
|
+
return gn;
|
|
441
456
|
},
|
|
442
457
|
GSP_NO_RETURNED_VALUE: function() {
|
|
443
458
|
return R;
|
|
@@ -446,7 +461,7 @@ function hr() {
|
|
|
446
461
|
return B;
|
|
447
462
|
},
|
|
448
463
|
GSSP_NO_RETURNED_VALUE: function() {
|
|
449
|
-
return
|
|
464
|
+
return mn;
|
|
450
465
|
},
|
|
451
466
|
INSTRUMENTATION_HOOK_FILENAME: function() {
|
|
452
467
|
return C;
|
|
@@ -518,7 +533,7 @@ function hr() {
|
|
|
518
533
|
return A;
|
|
519
534
|
},
|
|
520
535
|
RSC_ACTION_ENCRYPTION_ALIAS: function() {
|
|
521
|
-
return
|
|
536
|
+
return fn;
|
|
522
537
|
},
|
|
523
538
|
RSC_ACTION_PROXY_ALIAS: function() {
|
|
524
539
|
return k;
|
|
@@ -545,16 +560,16 @@ function hr() {
|
|
|
545
560
|
return F;
|
|
546
561
|
},
|
|
547
562
|
SERVER_RUNTIME: function() {
|
|
548
|
-
return
|
|
563
|
+
return _n;
|
|
549
564
|
},
|
|
550
565
|
SSG_FALLBACK_EXPORT_ERROR: function() {
|
|
551
|
-
return
|
|
566
|
+
return hn;
|
|
552
567
|
},
|
|
553
568
|
SSG_GET_INITIAL_PROPS_CONFLICT: function() {
|
|
554
569
|
return N;
|
|
555
570
|
},
|
|
556
571
|
STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: function() {
|
|
557
|
-
return
|
|
572
|
+
return pn;
|
|
558
573
|
},
|
|
559
574
|
UNSTABLE_REVALIDATE_RENAME_ERROR: function() {
|
|
560
575
|
return z;
|
|
@@ -566,13 +581,13 @@ function hr() {
|
|
|
566
581
|
return G;
|
|
567
582
|
}
|
|
568
583
|
});
|
|
569
|
-
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",
|
|
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", dn = "private-next-app-dir", D = "private-next-rsc-mod-ref-proxy", O = "private-next-rsc-action-validate", k = "private-next-rsc-server-reference", fn = "private-next-rsc-action-encryption", A = "private-next-rsc-action-client-wrapper", j = "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", N = "You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps", P = "You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.", F = "You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps", pn = "can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props", I = "pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export", R = "Your `getStaticProps` function did not return an object. Did you forget to add a `return`?", mn = "Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?", z = "The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.", B = "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", V = "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", hn = "Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export", gn = [
|
|
570
585
|
"app",
|
|
571
586
|
"pages",
|
|
572
587
|
"components",
|
|
573
588
|
"lib",
|
|
574
589
|
"src"
|
|
575
|
-
],
|
|
590
|
+
], _n = {
|
|
576
591
|
edge: "edge",
|
|
577
592
|
experimentalEdge: "experimental-edge",
|
|
578
593
|
nodejs: "nodejs"
|
|
@@ -619,9 +634,9 @@ function hr() {
|
|
|
619
634
|
};
|
|
620
635
|
})(He)), He;
|
|
621
636
|
}
|
|
622
|
-
var
|
|
637
|
+
var vt;
|
|
623
638
|
function qt() {
|
|
624
|
-
return
|
|
639
|
+
return vt || (vt = 1, (function(e) {
|
|
625
640
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
626
641
|
function t(e, t) {
|
|
627
642
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -646,7 +661,7 @@ function qt() {
|
|
|
646
661
|
return o;
|
|
647
662
|
}
|
|
648
663
|
});
|
|
649
|
-
let n =
|
|
664
|
+
let n = pr();
|
|
650
665
|
function r(e) {
|
|
651
666
|
let t = new Headers();
|
|
652
667
|
for (let [n, r] of Object.entries(e)) {
|
|
@@ -691,9 +706,9 @@ function qt() {
|
|
|
691
706
|
}
|
|
692
707
|
})(qe)), qe;
|
|
693
708
|
}
|
|
694
|
-
var Fe = {},
|
|
695
|
-
function
|
|
696
|
-
return
|
|
709
|
+
var Fe = {}, Rt;
|
|
710
|
+
function mr() {
|
|
711
|
+
return Rt || (Rt = 1, (function(e) {
|
|
697
712
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
698
713
|
function t(e, t) {
|
|
699
714
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -736,10 +751,10 @@ function fr() {
|
|
|
736
751
|
}
|
|
737
752
|
})(Fe)), Fe;
|
|
738
753
|
}
|
|
739
|
-
var Be = {}, Ge,
|
|
740
|
-
function
|
|
741
|
-
if (
|
|
742
|
-
|
|
754
|
+
var Be = {}, Ge, Pt;
|
|
755
|
+
function _r() {
|
|
756
|
+
if (Pt) return Ge;
|
|
757
|
+
Pt = 1;
|
|
743
758
|
var e = Object.defineProperty, t = Object.getOwnPropertyDescriptor, n = Object.getOwnPropertyNames, r = Object.prototype.hasOwnProperty, i = (t, n) => {
|
|
744
759
|
for (var r in n) e(t, r, {
|
|
745
760
|
get: n[r],
|
|
@@ -967,9 +982,9 @@ function pr() {
|
|
|
967
982
|
}
|
|
968
983
|
return Ge;
|
|
969
984
|
}
|
|
970
|
-
var
|
|
985
|
+
var yt;
|
|
971
986
|
function $e() {
|
|
972
|
-
return
|
|
987
|
+
return yt || (yt = 1, (function(e) {
|
|
973
988
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
974
989
|
function t(e, t) {
|
|
975
990
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -988,12 +1003,12 @@ function $e() {
|
|
|
988
1003
|
return n.stringifyCookie;
|
|
989
1004
|
}
|
|
990
1005
|
});
|
|
991
|
-
let n =
|
|
1006
|
+
let n = _r();
|
|
992
1007
|
})(Be)), Be;
|
|
993
1008
|
}
|
|
994
|
-
var
|
|
995
|
-
function
|
|
996
|
-
return
|
|
1009
|
+
var Tt;
|
|
1010
|
+
function br() {
|
|
1011
|
+
return Tt || (Tt = 1, (function(e) {
|
|
997
1012
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
998
1013
|
function t(e, t) {
|
|
999
1014
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -1009,7 +1024,7 @@ function mr() {
|
|
|
1009
1024
|
return s;
|
|
1010
1025
|
}
|
|
1011
1026
|
});
|
|
1012
|
-
let n = jt(), r = qt(), i =
|
|
1027
|
+
let n = jt(), r = qt(), i = mr(), a = $e(), o = /* @__PURE__ */ Symbol("internal request");
|
|
1013
1028
|
class s extends Request {
|
|
1014
1029
|
constructor(e, t = {}) {
|
|
1015
1030
|
let i = typeof e != "string" && "url" in e ? e.url : String(e);
|
|
@@ -1073,7 +1088,7 @@ function mr() {
|
|
|
1073
1088
|
})(Te)), Te;
|
|
1074
1089
|
}
|
|
1075
1090
|
var Xe = {}, We = {}, It;
|
|
1076
|
-
function
|
|
1091
|
+
function gr() {
|
|
1077
1092
|
return It || (It = 1, (function(e) {
|
|
1078
1093
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "ReflectAdapter", {
|
|
1079
1094
|
enumerable: !0,
|
|
@@ -1098,16 +1113,16 @@ function _r() {
|
|
|
1098
1113
|
}
|
|
1099
1114
|
})(We)), We;
|
|
1100
1115
|
}
|
|
1101
|
-
var
|
|
1102
|
-
function
|
|
1103
|
-
return
|
|
1116
|
+
var St;
|
|
1117
|
+
function wr() {
|
|
1118
|
+
return St || (St = 1, (function(e) {
|
|
1104
1119
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "NextResponse", {
|
|
1105
1120
|
enumerable: !0,
|
|
1106
1121
|
get: function() {
|
|
1107
1122
|
return l;
|
|
1108
1123
|
}
|
|
1109
1124
|
});
|
|
1110
|
-
let t = $e(), n = jt(), r = qt(), i =
|
|
1125
|
+
let t = $e(), n = jt(), r = qt(), i = gr(), a = $e(), o = /* @__PURE__ */ Symbol("internal response"), s = /* @__PURE__ */ new Set([
|
|
1111
1126
|
301,
|
|
1112
1127
|
302,
|
|
1113
1128
|
303,
|
|
@@ -1192,9 +1207,9 @@ function br() {
|
|
|
1192
1207
|
}
|
|
1193
1208
|
})(Xe)), Xe;
|
|
1194
1209
|
}
|
|
1195
|
-
var ze = {},
|
|
1196
|
-
function
|
|
1197
|
-
return
|
|
1210
|
+
var ze = {}, At;
|
|
1211
|
+
function Er() {
|
|
1212
|
+
return At || (At = 1, (function(e) {
|
|
1198
1213
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "ImageResponse", {
|
|
1199
1214
|
enumerable: !0,
|
|
1200
1215
|
get: function() {
|
|
@@ -1206,12 +1221,12 @@ function gr() {
|
|
|
1206
1221
|
}
|
|
1207
1222
|
})(ze)), ze;
|
|
1208
1223
|
}
|
|
1209
|
-
var Ve = {}, Ke = { exports: {} },
|
|
1210
|
-
function
|
|
1211
|
-
return
|
|
1224
|
+
var Ve = {}, Ke = { exports: {} }, Ot;
|
|
1225
|
+
function vr() {
|
|
1226
|
+
return Ot || (Ot = 1, (() => {
|
|
1212
1227
|
var e = { 226: function(e, t) {
|
|
1213
1228
|
(function(n, r) {
|
|
1214
|
-
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",
|
|
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", dn = "ASUS", D = "BlackBerry", O = "Browser", k = "Chrome", fn = "Edge", A = "Firefox", j = "Google", N = "Huawei", P = "LG", F = "Microsoft", pn = "Motorola", I = "Opera", R = "Samsung", mn = "Sharp", z = "Sony", B = "Xiaomi", V = "Zebra", hn = "Facebook", gn = "Chromium OS", _n = "Mac OS", H = function(e, t) {
|
|
1215
1230
|
var n = {};
|
|
1216
1231
|
for (var r in e) t[r] && t[r].length % 2 == 0 ? n[r] = t[r].concat(e[r]) : n[r] = e[r];
|
|
1217
1232
|
return n;
|
|
@@ -1222,7 +1237,7 @@ function wr() {
|
|
|
1222
1237
|
return typeof e === u ? q(t).indexOf(q(e)) !== -1 : !1;
|
|
1223
1238
|
}, q = function(e) {
|
|
1224
1239
|
return e.toLowerCase();
|
|
1225
|
-
},
|
|
1240
|
+
}, vn = function(e) {
|
|
1226
1241
|
return typeof e === u ? e.replace(/[^\d\.]/g, a).split(".")[0] : r;
|
|
1227
1242
|
}, J = function(e, t) {
|
|
1228
1243
|
if (typeof e === u) return e = e.replace(/^\s\s*/, a), typeof t === c ? e : e.substring(0, w);
|
|
@@ -1232,12 +1247,12 @@ function wr() {
|
|
|
1232
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;
|
|
1233
1248
|
n += 2;
|
|
1234
1249
|
}
|
|
1235
|
-
},
|
|
1250
|
+
}, yn = function(e, t) {
|
|
1236
1251
|
for (var n in t) if (typeof t[n] === l && t[n].length > 0) {
|
|
1237
1252
|
for (var i = 0; i < t[n].length; i++) if (G(t[n][i], e)) return n === o ? r : n;
|
|
1238
1253
|
} else if (G(t[n], e)) return n === o ? r : n;
|
|
1239
1254
|
return e;
|
|
1240
|
-
},
|
|
1255
|
+
}, bn = {
|
|
1241
1256
|
"1.0": "/8",
|
|
1242
1257
|
1.2: "/1",
|
|
1243
1258
|
1.3: "/3",
|
|
@@ -1246,7 +1261,7 @@ function wr() {
|
|
|
1246
1261
|
"2.0.3": "/417",
|
|
1247
1262
|
"2.0.4": "/419",
|
|
1248
1263
|
"?": "/"
|
|
1249
|
-
},
|
|
1264
|
+
}, xn = {
|
|
1250
1265
|
ME: "4.90",
|
|
1251
1266
|
"NT 3.11": "NT3.51",
|
|
1252
1267
|
"NT 4.0": "NT4.0",
|
|
@@ -1258,7 +1273,7 @@ function wr() {
|
|
|
1258
1273
|
8.1: "NT 6.3",
|
|
1259
1274
|
10: ["NT 6.4", "NT 10.0"],
|
|
1260
1275
|
RT: "ARM"
|
|
1261
|
-
},
|
|
1276
|
+
}, Sn = {
|
|
1262
1277
|
browser: [
|
|
1263
1278
|
[/\b(?:crmo|crios)\/([\w\.]+)/i],
|
|
1264
1279
|
[g, [p, "Chrome"]],
|
|
@@ -1344,7 +1359,7 @@ function wr() {
|
|
|
1344
1359
|
],
|
|
1345
1360
|
[p],
|
|
1346
1361
|
[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],
|
|
1347
|
-
[[p,
|
|
1362
|
+
[[p, hn], g],
|
|
1348
1363
|
[
|
|
1349
1364
|
/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,
|
|
1350
1365
|
/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,
|
|
@@ -1372,8 +1387,8 @@ function wr() {
|
|
|
1372
1387
|
[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],
|
|
1373
1388
|
[p, [
|
|
1374
1389
|
g,
|
|
1375
|
-
|
|
1376
|
-
|
|
1390
|
+
yn,
|
|
1391
|
+
bn
|
|
1377
1392
|
]],
|
|
1378
1393
|
[/(webkit|khtml)\/([\w\.]+)/i],
|
|
1379
1394
|
[p, g],
|
|
@@ -1463,7 +1478,7 @@ function wr() {
|
|
|
1463
1478
|
[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],
|
|
1464
1479
|
[
|
|
1465
1480
|
f,
|
|
1466
|
-
[h,
|
|
1481
|
+
[h, mn],
|
|
1467
1482
|
[m, y]
|
|
1468
1483
|
],
|
|
1469
1484
|
[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],
|
|
@@ -1529,13 +1544,13 @@ function wr() {
|
|
|
1529
1544
|
],
|
|
1530
1545
|
[
|
|
1531
1546
|
f,
|
|
1532
|
-
[h,
|
|
1547
|
+
[h, pn],
|
|
1533
1548
|
[m, y]
|
|
1534
1549
|
],
|
|
1535
1550
|
[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],
|
|
1536
1551
|
[
|
|
1537
1552
|
f,
|
|
1538
|
-
[h,
|
|
1553
|
+
[h, pn],
|
|
1539
1554
|
[m, b]
|
|
1540
1555
|
],
|
|
1541
1556
|
[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],
|
|
@@ -1635,13 +1650,13 @@ function wr() {
|
|
|
1635
1650
|
[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],
|
|
1636
1651
|
[
|
|
1637
1652
|
f,
|
|
1638
|
-
[h,
|
|
1653
|
+
[h, dn],
|
|
1639
1654
|
[m, b]
|
|
1640
1655
|
],
|
|
1641
1656
|
[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],
|
|
1642
1657
|
[
|
|
1643
1658
|
f,
|
|
1644
|
-
[h,
|
|
1659
|
+
[h, dn],
|
|
1645
1660
|
[m, y]
|
|
1646
1661
|
],
|
|
1647
1662
|
[/(nexus 9)/i],
|
|
@@ -1914,7 +1929,7 @@ function wr() {
|
|
|
1914
1929
|
[/\(dtv[\);].+(aquos)/i, /(aquos-tv[\w ]+)\)/i],
|
|
1915
1930
|
[
|
|
1916
1931
|
f,
|
|
1917
|
-
[h,
|
|
1932
|
+
[h, mn],
|
|
1918
1933
|
[m, x]
|
|
1919
1934
|
],
|
|
1920
1935
|
[/(bravia[\w ]+)( bui|\))/i],
|
|
@@ -1994,7 +2009,7 @@ function wr() {
|
|
|
1994
2009
|
[/(quest( 2| pro)?)/i],
|
|
1995
2010
|
[
|
|
1996
2011
|
f,
|
|
1997
|
-
[h,
|
|
2012
|
+
[h, hn],
|
|
1998
2013
|
[m, S]
|
|
1999
2014
|
],
|
|
2000
2015
|
[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],
|
|
@@ -2018,7 +2033,7 @@ function wr() {
|
|
|
2018
2033
|
],
|
|
2019
2034
|
engine: [
|
|
2020
2035
|
[/windows.+ edge\/([\w\.]+)/i],
|
|
2021
|
-
[g, [p,
|
|
2036
|
+
[g, [p, fn + "HTML"]],
|
|
2022
2037
|
[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],
|
|
2023
2038
|
[g, [p, "Blink"]],
|
|
2024
2039
|
[
|
|
@@ -2043,14 +2058,14 @@ function wr() {
|
|
|
2043
2058
|
],
|
|
2044
2059
|
[p, [
|
|
2045
2060
|
g,
|
|
2046
|
-
|
|
2047
|
-
|
|
2061
|
+
yn,
|
|
2062
|
+
xn
|
|
2048
2063
|
]],
|
|
2049
2064
|
[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],
|
|
2050
2065
|
[[p, "Windows"], [
|
|
2051
2066
|
g,
|
|
2052
|
-
|
|
2053
|
-
|
|
2067
|
+
yn,
|
|
2068
|
+
xn
|
|
2054
2069
|
]],
|
|
2055
2070
|
[
|
|
2056
2071
|
/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,
|
|
@@ -2063,7 +2078,7 @@ function wr() {
|
|
|
2063
2078
|
"."
|
|
2064
2079
|
], [p, "iOS"]],
|
|
2065
2080
|
[/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i],
|
|
2066
|
-
[[p,
|
|
2081
|
+
[[p, _n], [
|
|
2067
2082
|
g,
|
|
2068
2083
|
/_/g,
|
|
2069
2084
|
"."
|
|
@@ -2090,7 +2105,7 @@ function wr() {
|
|
|
2090
2105
|
[/crkey\/([\d\.]+)/i],
|
|
2091
2106
|
[g, [p, k + "cast"]],
|
|
2092
2107
|
[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],
|
|
2093
|
-
[[p,
|
|
2108
|
+
[[p, gn], g],
|
|
2094
2109
|
[
|
|
2095
2110
|
/panasonic;(viera)/i,
|
|
2096
2111
|
/(netrange)mmh/i,
|
|
@@ -2119,10 +2134,10 @@ function wr() {
|
|
|
2119
2134
|
]
|
|
2120
2135
|
}, Z = function(e, t) {
|
|
2121
2136
|
if (typeof e === l && (t = e, e = r), !(this instanceof Z)) return new Z(e, t).getResult();
|
|
2122
|
-
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 ? H(
|
|
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 ? H(Sn, t) : Sn, S = i && i.userAgent == o;
|
|
2123
2138
|
return this.getBrowser = function() {
|
|
2124
2139
|
var e = {};
|
|
2125
|
-
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;
|
|
2126
2141
|
}, this.getCPU = function() {
|
|
2127
2142
|
var e = {};
|
|
2128
2143
|
return e[_] = r, X.call(e, o, x.cpu), e;
|
|
@@ -2134,7 +2149,7 @@ function wr() {
|
|
|
2134
2149
|
return e[p] = r, e[g] = r, X.call(e, o, x.engine), e;
|
|
2135
2150
|
}, this.getOS = function() {
|
|
2136
2151
|
var e = {};
|
|
2137
|
-
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, gn).replace(/macos/i, _n)), e;
|
|
2138
2153
|
}, this.getResult = function() {
|
|
2139
2154
|
return {
|
|
2140
2155
|
ua: this.getUA(),
|
|
@@ -2192,9 +2207,9 @@ function wr() {
|
|
|
2192
2207
|
typeof n < "u" && (n.ab = {}.dirname + "/"), Ke.exports = n(226);
|
|
2193
2208
|
})()), Ke.exports;
|
|
2194
2209
|
}
|
|
2195
|
-
var
|
|
2196
|
-
function
|
|
2197
|
-
return
|
|
2210
|
+
var xt;
|
|
2211
|
+
function Nt() {
|
|
2212
|
+
return xt || (xt = 1, (function(e) {
|
|
2198
2213
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
2199
2214
|
function t(e, t) {
|
|
2200
2215
|
for (var n in t) Object.defineProperty(e, n, {
|
|
@@ -2213,7 +2228,7 @@ function Ct() {
|
|
|
2213
2228
|
return a;
|
|
2214
2229
|
}
|
|
2215
2230
|
});
|
|
2216
|
-
let n = /* @__PURE__ */ r(
|
|
2231
|
+
let n = /* @__PURE__ */ r(vr());
|
|
2217
2232
|
function r(e) {
|
|
2218
2233
|
return e && e.__esModule ? e : { default: e };
|
|
2219
2234
|
}
|
|
@@ -2231,9 +2246,9 @@ function Ct() {
|
|
|
2231
2246
|
}
|
|
2232
2247
|
})(Ve)), Ve;
|
|
2233
2248
|
}
|
|
2234
|
-
var Ye = {},
|
|
2235
|
-
function
|
|
2236
|
-
return
|
|
2249
|
+
var Ye = {}, Ct;
|
|
2250
|
+
function Rr() {
|
|
2251
|
+
return Ct || (Ct = 1, (function(e) {
|
|
2237
2252
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "URLPattern", {
|
|
2238
2253
|
enumerable: !0,
|
|
2239
2254
|
get: function() {
|
|
@@ -2243,21 +2258,21 @@ function Er() {
|
|
|
2243
2258
|
let t = typeof URLPattern > "u" ? void 0 : URLPattern;
|
|
2244
2259
|
})(Ye)), Ye;
|
|
2245
2260
|
}
|
|
2246
|
-
var
|
|
2247
|
-
function
|
|
2248
|
-
return
|
|
2261
|
+
var Lt;
|
|
2262
|
+
function Pr() {
|
|
2263
|
+
return Lt || (Lt = 1, (function(e, t) {
|
|
2249
2264
|
let n = {
|
|
2250
|
-
NextRequest:
|
|
2251
|
-
NextResponse:
|
|
2252
|
-
ImageResponse:
|
|
2253
|
-
userAgentFromString:
|
|
2254
|
-
userAgent:
|
|
2255
|
-
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
|
|
2256
2271
|
};
|
|
2257
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;
|
|
2258
2273
|
})(we, we.exports)), we.exports;
|
|
2259
2274
|
}
|
|
2260
|
-
|
|
2275
|
+
Pr();
|
|
2261
2276
|
var Qe = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "logout", e))(Qe || {}), Je = {
|
|
2262
2277
|
login: "login",
|
|
2263
2278
|
logout: "logout",
|
|
@@ -2266,14 +2281,14 @@ var Qe = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2266
2281
|
applicationJson: "application/json",
|
|
2267
2282
|
multipartFormData: "multipart/form-data",
|
|
2268
2283
|
applicationXwwwFormUrlencoded: "application/x-www-form-urlencoded"
|
|
2269
|
-
},
|
|
2284
|
+
}, zr = class {
|
|
2270
2285
|
config;
|
|
2271
2286
|
http;
|
|
2272
2287
|
adapter;
|
|
2273
2288
|
constructor({ config: e, adapter: t, storage: n }) {
|
|
2274
2289
|
this.config = e;
|
|
2275
|
-
let r =
|
|
2276
|
-
(!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({
|
|
2277
2292
|
...r,
|
|
2278
2293
|
userType: e.userType,
|
|
2279
2294
|
helloURL: e.helloURL
|
|
@@ -2296,7 +2311,7 @@ var Qe = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2296
2311
|
}[n], i = e.cookies;
|
|
2297
2312
|
if (this.http.setHttpOptsToCookies(i), !r || r.length === 0) return this.createErrorResponse(404, "API not found", i);
|
|
2298
2313
|
let a;
|
|
2299
|
-
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);
|
|
2300
2315
|
L.debug({ "content-type": e.contentType }, "Content-Type"), L.debug({
|
|
2301
2316
|
hostUrl: r,
|
|
2302
2317
|
token: a ? { ...a } : ""
|
|
@@ -2358,10 +2373,10 @@ var Qe = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2358
2373
|
switch (e) {
|
|
2359
2374
|
case Je[Qe[0]]:
|
|
2360
2375
|
let e = t.data;
|
|
2361
|
-
|
|
2376
|
+
Nr(e, a);
|
|
2362
2377
|
break;
|
|
2363
2378
|
case Je[Qe[1]]:
|
|
2364
|
-
a.cleanCookies = (e) =>
|
|
2379
|
+
a.cleanCookies = (e) => Cr(e);
|
|
2365
2380
|
break;
|
|
2366
2381
|
}
|
|
2367
2382
|
n.onHandlerSuccess && n.onHandlerSuccess({
|
|
@@ -2392,7 +2407,7 @@ var Qe = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2392
2407
|
t[e] = { value: n };
|
|
2393
2408
|
}), t;
|
|
2394
2409
|
}
|
|
2395
|
-
},
|
|
2410
|
+
}, Tr = "zh-CN", U = {
|
|
2396
2411
|
IBOOT_DEVICE_ID: "dvid",
|
|
2397
2412
|
IBOOT_LANG: "lang",
|
|
2398
2413
|
IBOOT_WEBSITE_ID: "wid",
|
|
@@ -2404,25 +2419,22 @@ var Qe = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2404
2419
|
LANG: "Lang",
|
|
2405
2420
|
WEBSITE_ID: "Website-Id",
|
|
2406
2421
|
WEBSITE_NO: "Website-No"
|
|
2407
|
-
},
|
|
2422
|
+
}, Ar = (e) => {
|
|
2408
2423
|
if (e.get) {
|
|
2409
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 = {};
|
|
2410
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;
|
|
2411
2426
|
}
|
|
2412
2427
|
throw Error("The get method of IStorage has not been implemented.");
|
|
2413
|
-
},
|
|
2414
|
-
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);
|
|
2415
|
-
else throw Error("The set method of IStorage has not been implemented.");
|
|
2416
|
-
}, Ir = (e) => {
|
|
2428
|
+
}, Or = (e) => {
|
|
2417
2429
|
if (e.get) {
|
|
2418
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 = {};
|
|
2419
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;
|
|
2420
2432
|
}
|
|
2421
2433
|
throw Error("The get method of ICookies has not been implemented.");
|
|
2422
|
-
},
|
|
2434
|
+
}, Qr = (e, t) => {
|
|
2423
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);
|
|
2424
2436
|
else throw Error("The set method of ICookies has not been implemented.");
|
|
2425
|
-
},
|
|
2437
|
+
}, xr = (e) => {
|
|
2426
2438
|
if (e.get) {
|
|
2427
2439
|
let t = e[U.IBOOT_USER];
|
|
2428
2440
|
if (t && t.length > 0) {
|
|
@@ -2434,7 +2446,7 @@ var Qe = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2434
2446
|
};
|
|
2435
2447
|
}
|
|
2436
2448
|
}
|
|
2437
|
-
},
|
|
2449
|
+
}, Ut = () => ({
|
|
2438
2450
|
path: "/",
|
|
2439
2451
|
secure: process.env.APP_ENV === "production",
|
|
2440
2452
|
httpOnly: !0,
|
|
@@ -2443,7 +2455,7 @@ var Qe = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2443
2455
|
maxAge: -1,
|
|
2444
2456
|
httpOnly: !0,
|
|
2445
2457
|
path: "/"
|
|
2446
|
-
},
|
|
2458
|
+
}, Nr = (e, t) => {
|
|
2447
2459
|
let { id: n, name: r, username: i, nickname: a, headImg: o, token: s, lastLoginTime: c, deviceId: l, userType: u, mustChangePwd: d } = e, f = {
|
|
2448
2460
|
id: n,
|
|
2449
2461
|
name: r,
|
|
@@ -2460,16 +2472,16 @@ var Qe = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2460
2472
|
};
|
|
2461
2473
|
t.cookies[U.IBOOT_TOKEN] = {
|
|
2462
2474
|
value: s,
|
|
2463
|
-
options:
|
|
2475
|
+
options: Ut()
|
|
2464
2476
|
}, t.cookies[U.IBOOT_USER] = {
|
|
2465
2477
|
value: JSON.stringify(f),
|
|
2466
|
-
options:
|
|
2478
|
+
options: Ut()
|
|
2467
2479
|
};
|
|
2468
|
-
},
|
|
2480
|
+
}, Cr = (e) => {
|
|
2469
2481
|
if (!e.set) throw Error("cookies set function is undefined");
|
|
2470
2482
|
if (e.set(U.IBOOT_TOKEN, "", Ee), e.set(U.IBOOT_USER, "", Ee), !e.delete) throw Error("cookies delete function is undefined");
|
|
2471
2483
|
e.delete(U.IBOOT_TOKEN, Ee), e.delete(U.IBOOT_USER, Ee);
|
|
2472
|
-
},
|
|
2484
|
+
}, Lr = class {
|
|
2473
2485
|
baseUrl;
|
|
2474
2486
|
helloMethod;
|
|
2475
2487
|
apiKey;
|
|
@@ -2481,7 +2493,7 @@ var Qe = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2481
2493
|
websiteId;
|
|
2482
2494
|
websiteNo;
|
|
2483
2495
|
constructor(e) {
|
|
2484
|
-
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 ??
|
|
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 ?? tr.TYPE_MGT, this.deviceId = e.deviceId ?? ir(), this.lang = e.lang ?? Tr, this.websiteId = e.websiteId, this.websiteNo = e.websiteNo;
|
|
2485
2497
|
}
|
|
2486
2498
|
encrypt(e) {
|
|
2487
2499
|
let t = ne.enc.Utf8.parse(this.apiKey);
|
|
@@ -2517,7 +2529,7 @@ var Qe = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "l
|
|
|
2517
2529
|
}
|
|
2518
2530
|
assemblyParameter(e, t) {
|
|
2519
2531
|
let n = e ?? new URLSearchParams(), r = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
2520
|
-
return n.set("timezone", r), n.set("timestamp", Date.now().toString()), n.set("echostr",
|
|
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 !== ""));
|
|
2521
2533
|
}
|
|
2522
2534
|
async assemblyHeader({ urlParams: e, token: t }) {
|
|
2523
2535
|
let n = {
|
|
@@ -2643,19 +2655,19 @@ const helloURL = `${baseUrl.site}helloIBoot`;
|
|
|
2643
2655
|
var ICMSServer = class {
|
|
2644
2656
|
http;
|
|
2645
2657
|
constructor(e) {
|
|
2646
|
-
this.http = new
|
|
2647
|
-
...
|
|
2658
|
+
this.http = new Lr({
|
|
2659
|
+
...Or(e),
|
|
2648
2660
|
userType: tr.TYPE_C,
|
|
2649
2661
|
helloURL
|
|
2650
2662
|
});
|
|
2651
2663
|
}
|
|
2652
|
-
async helloWebsite(e
|
|
2653
|
-
let
|
|
2654
|
-
if (
|
|
2655
|
-
let
|
|
2656
|
-
if (
|
|
2657
|
-
let
|
|
2658
|
-
|
|
2664
|
+
async helloWebsite(e) {
|
|
2665
|
+
let t = baseUrl.site + "helloWebsite", n = await this.http.get({ url: t });
|
|
2666
|
+
if (n.success) {
|
|
2667
|
+
let t = n.headers;
|
|
2668
|
+
if (t) {
|
|
2669
|
+
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), Qr(e, o);
|
|
2659
2671
|
}
|
|
2660
2672
|
}
|
|
2661
2673
|
}
|
|
@@ -2809,7 +2821,7 @@ var ICMSServer = class {
|
|
|
2809
2821
|
throw Error(n.msg);
|
|
2810
2822
|
}
|
|
2811
2823
|
}, APIMAP = {};
|
|
2812
|
-
const icmsRouter = async ({ request: e, routeAdapter: t, storage: n }) => await new
|
|
2824
|
+
const icmsRouter = async ({ request: e, routeAdapter: t, storage: n }) => await new zr({
|
|
2813
2825
|
config: {
|
|
2814
2826
|
userType: tr.TYPE_B,
|
|
2815
2827
|
APIMAP,
|