little-wheels 1.2.6 → 1.2.7
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/index.d.ts +10 -1
- package/dist/index.es.js +173 -150
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -57,12 +57,21 @@ export declare class AuthLogin {
|
|
|
57
57
|
*/
|
|
58
58
|
getCompanyList(): Promise<CompanyItem[]>;
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
60
|
+
* 获取当前登录用户所属分公司名称
|
|
61
61
|
* @async
|
|
62
62
|
* @description 递归查找用户组中类型为'3'(分公司)的节点
|
|
63
63
|
* @returns {Promise<string>} 分公司名称,未找到则返回空字符串
|
|
64
64
|
*/
|
|
65
65
|
getUserBranchGroup(): Promise<string>;
|
|
66
|
+
/**
|
|
67
|
+
* 根据groupId获取所属分公司信息
|
|
68
|
+
* @async
|
|
69
|
+
* @description 递归查找用户组中类型小于等于3的节点 如果小于等于3则返回节点名称 否则继续递归查找父节点
|
|
70
|
+
* @returns {Promise<UserGroupItem>} 分公司节点信息,未找到则返回空对象
|
|
71
|
+
*/
|
|
72
|
+
getUserBranchGroupByGroupId(params: {
|
|
73
|
+
groupId: string;
|
|
74
|
+
}): Promise<{}>;
|
|
66
75
|
/**
|
|
67
76
|
* 刷新Token
|
|
68
77
|
* @async
|
package/dist/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var nn = Object.defineProperty;
|
|
2
2
|
var on = (r, e, n) => e in r ? nn(r, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : r[e] = n;
|
|
3
|
-
var
|
|
3
|
+
var me = (r, e, n) => on(r, typeof e != "symbol" ? e + "" : e, n);
|
|
4
4
|
class an {
|
|
5
5
|
constructor(e) {
|
|
6
|
-
|
|
6
|
+
me(this, "appId");
|
|
7
7
|
this.appId = e;
|
|
8
8
|
}
|
|
9
9
|
setItem(e, n) {
|
|
@@ -68,7 +68,7 @@ var je, Jr;
|
|
|
68
68
|
function xe() {
|
|
69
69
|
if (Jr) return je;
|
|
70
70
|
Jr = 1;
|
|
71
|
-
var r = typeof Map == "function" && Map.prototype, e = Object.getOwnPropertyDescriptor && r ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, n = r && e && typeof e.get == "function" ? e.get : null, a = r && Map.prototype.forEach, s = typeof Set == "function" && Set.prototype, y = Object.getOwnPropertyDescriptor && s ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null,
|
|
71
|
+
var r = typeof Map == "function" && Map.prototype, e = Object.getOwnPropertyDescriptor && r ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, n = r && e && typeof e.get == "function" ? e.get : null, a = r && Map.prototype.forEach, s = typeof Set == "function" && Set.prototype, y = Object.getOwnPropertyDescriptor && s ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, P = s && y && typeof y.get == "function" ? y.get : null, v = s && Set.prototype.forEach, E = typeof WeakMap == "function" && WeakMap.prototype, m = E ? WeakMap.prototype.has : null, d = typeof WeakSet == "function" && WeakSet.prototype, h = d ? WeakSet.prototype.has : null, S = typeof WeakRef == "function" && WeakRef.prototype, l = S ? WeakRef.prototype.deref : null, c = Boolean.prototype.valueOf, b = Object.prototype.toString, i = Function.prototype.toString, u = String.prototype.match, f = String.prototype.slice, g = String.prototype.replace, p = String.prototype.toUpperCase, w = String.prototype.toLowerCase, A = RegExp.prototype.test, O = Array.prototype.concat, R = Array.prototype.join, q = Array.prototype.slice, _ = Math.floor, D = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, I = Object.getOwnPropertySymbols, j = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, B = typeof Symbol == "function" && typeof Symbol.iterator == "object", Q = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === B || !0) ? Symbol.toStringTag : null, te = Object.prototype.propertyIsEnumerable, ne = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) {
|
|
72
72
|
return t.__proto__;
|
|
73
73
|
} : null);
|
|
74
74
|
function $(t, o) {
|
|
@@ -84,29 +84,29 @@ function xe() {
|
|
|
84
84
|
}
|
|
85
85
|
return g.call(o, x, "$&_");
|
|
86
86
|
}
|
|
87
|
-
var V = sn, oe = V.custom,
|
|
87
|
+
var V = sn, oe = V.custom, he = H(oe) ? oe : null, ue = {
|
|
88
88
|
__proto__: null,
|
|
89
89
|
double: '"',
|
|
90
90
|
single: "'"
|
|
91
|
-
},
|
|
91
|
+
}, fe = {
|
|
92
92
|
__proto__: null,
|
|
93
93
|
double: /(["\\])/g,
|
|
94
94
|
single: /(['\\])/g
|
|
95
95
|
};
|
|
96
96
|
je = function t(o, x, C, M) {
|
|
97
97
|
var T = x || {};
|
|
98
|
-
if (K(T, "quoteStyle") && !K(
|
|
98
|
+
if (K(T, "quoteStyle") && !K(ue, T.quoteStyle))
|
|
99
99
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
100
100
|
if (K(T, "maxStringLength") && (typeof T.maxStringLength == "number" ? T.maxStringLength < 0 && T.maxStringLength !== 1 / 0 : T.maxStringLength !== null))
|
|
101
101
|
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
102
|
-
var
|
|
103
|
-
if (typeof
|
|
102
|
+
var ye = K(T, "customInspect") ? T.customInspect : !0;
|
|
103
|
+
if (typeof ye != "boolean" && ye !== "symbol")
|
|
104
104
|
throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
|
|
105
105
|
if (K(T, "indent") && T.indent !== null && T.indent !== " " && !(parseInt(T.indent, 10) === T.indent && T.indent > 0))
|
|
106
106
|
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
107
107
|
if (K(T, "numericSeparator") && typeof T.numericSeparator != "boolean")
|
|
108
108
|
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
109
|
-
var
|
|
109
|
+
var ge = T.numericSeparator;
|
|
110
110
|
if (typeof o > "u")
|
|
111
111
|
return "undefined";
|
|
112
112
|
if (o === null)
|
|
@@ -119,19 +119,19 @@ function xe() {
|
|
|
119
119
|
if (o === 0)
|
|
120
120
|
return 1 / 0 / o > 0 ? "0" : "-0";
|
|
121
121
|
var J = String(o);
|
|
122
|
-
return
|
|
122
|
+
return ge ? $(o, J) : J;
|
|
123
123
|
}
|
|
124
124
|
if (typeof o == "bigint") {
|
|
125
|
-
var
|
|
126
|
-
return
|
|
125
|
+
var de = String(o) + "n";
|
|
126
|
+
return ge ? $(o, de) : de;
|
|
127
127
|
}
|
|
128
128
|
var Ce = typeof T.depth > "u" ? 5 : T.depth;
|
|
129
129
|
if (typeof C > "u" && (C = 0), C >= Ce && Ce > 0 && typeof o == "object")
|
|
130
|
-
return
|
|
130
|
+
return ce(o) ? "[Array]" : "[Object]";
|
|
131
131
|
var Oe = en(T, C);
|
|
132
132
|
if (typeof M > "u")
|
|
133
133
|
M = [];
|
|
134
|
-
else if (
|
|
134
|
+
else if (pe(M, o) >= 0)
|
|
135
135
|
return "[Circular]";
|
|
136
136
|
function re(Ee, ke, tn) {
|
|
137
137
|
if (ke && (M = q.call(M), M.push(ke)), tn) {
|
|
@@ -152,10 +152,10 @@ function xe() {
|
|
|
152
152
|
}
|
|
153
153
|
if (Yt(o)) {
|
|
154
154
|
for (var Re = "<" + w.call(String(o.nodeName)), Me = o.attributes || [], $e = 0; $e < Me.length; $e++)
|
|
155
|
-
Re += " " + Me[$e].name + "=" +
|
|
155
|
+
Re += " " + Me[$e].name + "=" + le(ae(Me[$e].value), "double", T);
|
|
156
156
|
return Re += ">", o.childNodes && o.childNodes.length && (Re += "..."), Re += "</" + w.call(String(o.nodeName)) + ">", Re;
|
|
157
157
|
}
|
|
158
|
-
if (
|
|
158
|
+
if (ce(o)) {
|
|
159
159
|
if (o.length === 0)
|
|
160
160
|
return "[]";
|
|
161
161
|
var Ne = Te(o, re);
|
|
@@ -165,10 +165,10 @@ function xe() {
|
|
|
165
165
|
var Ue = Te(o, re);
|
|
166
166
|
return !("cause" in Error.prototype) && "cause" in o && !te.call(o, "cause") ? "{ [" + String(o) + "] " + R.call(O.call("[cause]: " + re(o.cause), Ue), ", ") + " }" : Ue.length === 0 ? "[" + String(o) + "]" : "{ [" + String(o) + "] " + R.call(Ue, ", ") + " }";
|
|
167
167
|
}
|
|
168
|
-
if (typeof o == "object" &&
|
|
169
|
-
if (
|
|
168
|
+
if (typeof o == "object" && ye) {
|
|
169
|
+
if (he && typeof o[he] == "function" && V)
|
|
170
170
|
return V(o, { depth: Ce - C });
|
|
171
|
-
if (
|
|
171
|
+
if (ye !== "symbol" && typeof o.inspect == "function")
|
|
172
172
|
return o.inspect();
|
|
173
173
|
}
|
|
174
174
|
if (ee(o)) {
|
|
@@ -181,7 +181,7 @@ function xe() {
|
|
|
181
181
|
var jr = [];
|
|
182
182
|
return v && v.call(o, function(Ee) {
|
|
183
183
|
jr.push(re(Ee, o));
|
|
184
|
-
}), Ur("Set",
|
|
184
|
+
}), Ur("Set", P.call(o), jr, Oe);
|
|
185
185
|
}
|
|
186
186
|
if (we(o))
|
|
187
187
|
return De("WeakMap");
|
|
@@ -201,14 +201,14 @@ function xe() {
|
|
|
201
201
|
return "{ [object Window] }";
|
|
202
202
|
if (typeof globalThis < "u" && o === globalThis || typeof Qr < "u" && o === Qr)
|
|
203
203
|
return "{ [object globalThis] }";
|
|
204
|
-
if (!
|
|
204
|
+
if (!se(o) && !L(o)) {
|
|
205
205
|
var Be = Te(o, re), Hr = ne ? ne(o) === Object.prototype : o instanceof Object || o.constructor === Object, Ge = o instanceof Object ? "" : "null prototype", zr = !Hr && Q && Object(o) === o && Q in o ? f.call(Z(o), 8, -1) : Ge ? "Object" : "", rn = Hr || typeof o.constructor != "function" ? "" : o.constructor.name ? o.constructor.name + " " : "", We = rn + (zr || Ge ? "[" + R.call(O.call([], zr || [], Ge || []), ": ") + "] " : "");
|
|
206
206
|
return Be.length === 0 ? We + "{}" : Oe ? We + "{" + Fe(Be, Oe) + "}" : We + "{ " + R.call(Be, ", ") + " }";
|
|
207
207
|
}
|
|
208
208
|
return String(o);
|
|
209
209
|
};
|
|
210
|
-
function
|
|
211
|
-
var C = x.quoteStyle || o, M =
|
|
210
|
+
function le(t, o, x) {
|
|
211
|
+
var C = x.quoteStyle || o, M = ue[C];
|
|
212
212
|
return M + t + M;
|
|
213
213
|
}
|
|
214
214
|
function ae(t) {
|
|
@@ -217,10 +217,10 @@ function xe() {
|
|
|
217
217
|
function Y(t) {
|
|
218
218
|
return !Q || !(typeof t == "object" && (Q in t || typeof t[Q] < "u"));
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function ce(t) {
|
|
221
221
|
return Z(t) === "[object Array]" && Y(t);
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function se(t) {
|
|
224
224
|
return Z(t) === "[object Date]" && Y(t);
|
|
225
225
|
}
|
|
226
226
|
function L(t) {
|
|
@@ -275,7 +275,7 @@ function xe() {
|
|
|
275
275
|
var o = u.call(i.call(t), /^function\s*([\w$]+)/);
|
|
276
276
|
return o ? o[1] : null;
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function pe(t, o) {
|
|
279
279
|
if (t.indexOf)
|
|
280
280
|
return t.indexOf(o);
|
|
281
281
|
for (var x = 0, C = t.length; x < C; x++)
|
|
@@ -289,7 +289,7 @@ function xe() {
|
|
|
289
289
|
try {
|
|
290
290
|
n.call(t);
|
|
291
291
|
try {
|
|
292
|
-
|
|
292
|
+
P.call(t);
|
|
293
293
|
} catch {
|
|
294
294
|
return !0;
|
|
295
295
|
}
|
|
@@ -323,10 +323,10 @@ function xe() {
|
|
|
323
323
|
return !1;
|
|
324
324
|
}
|
|
325
325
|
function Ae(t) {
|
|
326
|
-
if (!
|
|
326
|
+
if (!P || !t || typeof t != "object")
|
|
327
327
|
return !1;
|
|
328
328
|
try {
|
|
329
|
-
|
|
329
|
+
P.call(t);
|
|
330
330
|
try {
|
|
331
331
|
n.call(t);
|
|
332
332
|
} catch {
|
|
@@ -360,10 +360,10 @@ function xe() {
|
|
|
360
360
|
var x = t.length - o.maxStringLength, C = "... " + x + " more character" + (x > 1 ? "s" : "");
|
|
361
361
|
return Nr(f.call(t, 0, o.maxStringLength), o) + C;
|
|
362
362
|
}
|
|
363
|
-
var M =
|
|
363
|
+
var M = fe[o.quoteStyle || "single"];
|
|
364
364
|
M.lastIndex = 0;
|
|
365
365
|
var T = g.call(g.call(t, M, "\\$1"), /[\x00-\x1f]/g, Xt);
|
|
366
|
-
return
|
|
366
|
+
return le(T, "single", o);
|
|
367
367
|
}
|
|
368
368
|
function Xt(t) {
|
|
369
369
|
var o = t.charCodeAt(0), x = {
|
|
@@ -387,7 +387,7 @@ function xe() {
|
|
|
387
387
|
}
|
|
388
388
|
function Zt(t) {
|
|
389
389
|
for (var o = 0; o < t.length; o++)
|
|
390
|
-
if (
|
|
390
|
+
if (pe(t[o], `
|
|
391
391
|
`) >= 0)
|
|
392
392
|
return !1;
|
|
393
393
|
return !0;
|
|
@@ -414,23 +414,23 @@ function xe() {
|
|
|
414
414
|
` + o.prev;
|
|
415
415
|
}
|
|
416
416
|
function Te(t, o) {
|
|
417
|
-
var x =
|
|
417
|
+
var x = ce(t), C = [];
|
|
418
418
|
if (x) {
|
|
419
419
|
C.length = t.length;
|
|
420
420
|
for (var M = 0; M < t.length; M++)
|
|
421
421
|
C[M] = K(t, M) ? o(t[M], t) : "";
|
|
422
422
|
}
|
|
423
|
-
var T = typeof
|
|
423
|
+
var T = typeof I == "function" ? I(t) : [], ye;
|
|
424
424
|
if (B) {
|
|
425
|
-
|
|
426
|
-
for (var
|
|
427
|
-
|
|
425
|
+
ye = {};
|
|
426
|
+
for (var ge = 0; ge < T.length; ge++)
|
|
427
|
+
ye["$" + T[ge]] = T[ge];
|
|
428
428
|
}
|
|
429
429
|
for (var J in t)
|
|
430
|
-
K(t, J) && (x && String(Number(J)) === J && J < t.length || B &&
|
|
431
|
-
if (typeof
|
|
432
|
-
for (var
|
|
433
|
-
te.call(t, T[
|
|
430
|
+
K(t, J) && (x && String(Number(J)) === J && J < t.length || B && ye["$" + J] instanceof Symbol || (A.call(/[^\w$]/, J) ? C.push(o(J, t) + ": " + o(t[J], t)) : C.push(J + ": " + o(t[J], t))));
|
|
431
|
+
if (typeof I == "function")
|
|
432
|
+
for (var de = 0; de < T.length; de++)
|
|
433
|
+
te.call(t, T[de]) && C.push("[" + o(T[de]) + "]: " + o(t[T[de]], t));
|
|
434
434
|
return C;
|
|
435
435
|
}
|
|
436
436
|
return je;
|
|
@@ -460,7 +460,7 @@ function pn() {
|
|
|
460
460
|
};
|
|
461
461
|
}, y = function(v, E) {
|
|
462
462
|
return v ? !!n(v, E) : !1;
|
|
463
|
-
},
|
|
463
|
+
}, P = function(v, E) {
|
|
464
464
|
if (v)
|
|
465
465
|
return n(v, E, !0);
|
|
466
466
|
};
|
|
@@ -471,7 +471,7 @@ function pn() {
|
|
|
471
471
|
throw new e("Side channel does not contain " + r(d));
|
|
472
472
|
},
|
|
473
473
|
delete: function(d) {
|
|
474
|
-
var h = E && E.next, S =
|
|
474
|
+
var h = E && E.next, S = P(E, d);
|
|
475
475
|
return S && h && h === S && (E = void 0), !!S;
|
|
476
476
|
},
|
|
477
477
|
get: function(d) {
|
|
@@ -607,8 +607,8 @@ function Tn() {
|
|
|
607
607
|
return !1;
|
|
608
608
|
if (typeof Object.keys == "function" && Object.keys(e).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(e).length !== 0)
|
|
609
609
|
return !1;
|
|
610
|
-
var
|
|
611
|
-
if (
|
|
610
|
+
var P = Object.getOwnPropertySymbols(e);
|
|
611
|
+
if (P.length !== 1 || P[0] !== n || !Object.prototype.propertyIsEnumerable.call(e, n))
|
|
612
612
|
return !1;
|
|
613
613
|
if (typeof Object.getOwnPropertyDescriptor == "function") {
|
|
614
614
|
var v = (
|
|
@@ -655,7 +655,7 @@ function kn() {
|
|
|
655
655
|
for (var d = [], h = m, S = 0; h < E.length; h += 1, S += 1)
|
|
656
656
|
d[S] = E[h];
|
|
657
657
|
return d;
|
|
658
|
-
},
|
|
658
|
+
}, P = function(v, E) {
|
|
659
659
|
for (var m = "", d = 0; d < v.length; d += 1)
|
|
660
660
|
m += v[d], d + 1 < v.length && (m += E);
|
|
661
661
|
return m;
|
|
@@ -678,7 +678,7 @@ function kn() {
|
|
|
678
678
|
);
|
|
679
679
|
}, l = n(0, m.length - d.length), c = [], b = 0; b < l; b++)
|
|
680
680
|
c[b] = "$" + b;
|
|
681
|
-
if (h = Function("binder", "return function (" +
|
|
681
|
+
if (h = Function("binder", "return function (" + P(c, ",") + "){ return binder.apply(this,arguments); }")(S), m.prototype) {
|
|
682
682
|
var i = function() {
|
|
683
683
|
};
|
|
684
684
|
i.prototype = m.prototype, h.prototype = new i(), i.prototype = null;
|
|
@@ -731,9 +731,9 @@ function Dn() {
|
|
|
731
731
|
try {
|
|
732
732
|
n = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
733
733
|
[].__proto__ === Array.prototype;
|
|
734
|
-
} catch (
|
|
735
|
-
if (!
|
|
736
|
-
throw
|
|
734
|
+
} catch (P) {
|
|
735
|
+
if (!P || typeof P != "object" || !("code" in P) || P.code !== "ERR_PROTO_ACCESS")
|
|
736
|
+
throw P;
|
|
737
737
|
}
|
|
738
738
|
var a = !!n && e && e(
|
|
739
739
|
Object.prototype,
|
|
@@ -773,7 +773,7 @@ var Er, $t;
|
|
|
773
773
|
function Cr() {
|
|
774
774
|
if ($t) return Er;
|
|
775
775
|
$t = 1;
|
|
776
|
-
var r, e = /* @__PURE__ */ Gt(), n = /* @__PURE__ */ yn(), a = /* @__PURE__ */ dn(), s = /* @__PURE__ */ vn(), y = /* @__PURE__ */ hn(),
|
|
776
|
+
var r, e = /* @__PURE__ */ Gt(), n = /* @__PURE__ */ yn(), a = /* @__PURE__ */ dn(), s = /* @__PURE__ */ vn(), y = /* @__PURE__ */ hn(), P = /* @__PURE__ */ gn(), v = /* @__PURE__ */ Pe(), E = /* @__PURE__ */ mn(), m = /* @__PURE__ */ Sn(), d = /* @__PURE__ */ wn(), h = /* @__PURE__ */ bn(), S = /* @__PURE__ */ An(), l = /* @__PURE__ */ On(), c = /* @__PURE__ */ En(), b = /* @__PURE__ */ In(), i = Function, u = function(L) {
|
|
777
777
|
try {
|
|
778
778
|
return i('"use strict"; return (' + L + ").constructor;")();
|
|
779
779
|
} catch {
|
|
@@ -790,17 +790,17 @@ function Cr() {
|
|
|
790
790
|
return p;
|
|
791
791
|
}
|
|
792
792
|
}
|
|
793
|
-
}() : p, A = $n()(), O = Fn(), R = jt(), q = Lt(), _ = Ht(), D = Fr(),
|
|
793
|
+
}() : p, A = $n()(), O = Fn(), R = jt(), q = Lt(), _ = Ht(), D = Fr(), I = {}, j = typeof Uint8Array > "u" || !O ? r : O(Uint8Array), B = {
|
|
794
794
|
__proto__: null,
|
|
795
795
|
"%AggregateError%": typeof AggregateError > "u" ? r : AggregateError,
|
|
796
796
|
"%Array%": Array,
|
|
797
797
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? r : ArrayBuffer,
|
|
798
798
|
"%ArrayIteratorPrototype%": A && O ? O([][Symbol.iterator]()) : r,
|
|
799
799
|
"%AsyncFromSyncIteratorPrototype%": r,
|
|
800
|
-
"%AsyncFunction%":
|
|
801
|
-
"%AsyncGenerator%":
|
|
802
|
-
"%AsyncGeneratorFunction%":
|
|
803
|
-
"%AsyncIteratorPrototype%":
|
|
800
|
+
"%AsyncFunction%": I,
|
|
801
|
+
"%AsyncGenerator%": I,
|
|
802
|
+
"%AsyncGeneratorFunction%": I,
|
|
803
|
+
"%AsyncIteratorPrototype%": I,
|
|
804
804
|
"%Atomics%": typeof Atomics > "u" ? r : Atomics,
|
|
805
805
|
"%BigInt%": typeof BigInt > "u" ? r : BigInt,
|
|
806
806
|
"%BigInt64Array%": typeof BigInt64Array > "u" ? r : BigInt64Array,
|
|
@@ -821,7 +821,7 @@ function Cr() {
|
|
|
821
821
|
"%Float64Array%": typeof Float64Array > "u" ? r : Float64Array,
|
|
822
822
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? r : FinalizationRegistry,
|
|
823
823
|
"%Function%": i,
|
|
824
|
-
"%GeneratorFunction%":
|
|
824
|
+
"%GeneratorFunction%": I,
|
|
825
825
|
"%Int8Array%": typeof Int8Array > "u" ? r : Int8Array,
|
|
826
826
|
"%Int16Array%": typeof Int16Array > "u" ? r : Int16Array,
|
|
827
827
|
"%Int32Array%": typeof Int32Array > "u" ? r : Int32Array,
|
|
@@ -849,7 +849,7 @@ function Cr() {
|
|
|
849
849
|
"%String%": String,
|
|
850
850
|
"%StringIteratorPrototype%": A && O ? O(""[Symbol.iterator]()) : r,
|
|
851
851
|
"%Symbol%": A ? Symbol : r,
|
|
852
|
-
"%SyntaxError%":
|
|
852
|
+
"%SyntaxError%": P,
|
|
853
853
|
"%ThrowTypeError%": w,
|
|
854
854
|
"%TypedArray%": j,
|
|
855
855
|
"%TypeError%": v,
|
|
@@ -950,21 +950,21 @@ function Cr() {
|
|
|
950
950
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
951
951
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
952
952
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
953
|
-
}, $ = qe(), V = /* @__PURE__ */ Cn(), oe = $.call(D, Array.prototype.concat),
|
|
954
|
-
var N =
|
|
953
|
+
}, $ = qe(), V = /* @__PURE__ */ Cn(), oe = $.call(D, Array.prototype.concat), he = $.call(_, Array.prototype.splice), ue = $.call(D, String.prototype.replace), fe = $.call(D, String.prototype.slice), le = $.call(D, RegExp.prototype.exec), ae = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Y = /\\(\\)?/g, ce = function(k) {
|
|
954
|
+
var N = fe(k, 0, 1), F = fe(k, -1);
|
|
955
955
|
if (N === "%" && F !== "%")
|
|
956
|
-
throw new
|
|
956
|
+
throw new P("invalid intrinsic syntax, expected closing `%`");
|
|
957
957
|
if (F === "%" && N !== "%")
|
|
958
|
-
throw new
|
|
958
|
+
throw new P("invalid intrinsic syntax, expected opening `%`");
|
|
959
959
|
var W = [];
|
|
960
|
-
return
|
|
961
|
-
W[W.length] = z ?
|
|
960
|
+
return ue(k, ae, function(H, X, z, K) {
|
|
961
|
+
W[W.length] = z ? ue(K, Y, "$1") : X || H;
|
|
962
962
|
}), W;
|
|
963
|
-
},
|
|
963
|
+
}, se = function(k, N) {
|
|
964
964
|
var F = k, W;
|
|
965
965
|
if (V(ne, F) && (W = ne[F], F = "%" + W[0] + "%"), V(B, F)) {
|
|
966
966
|
var H = B[F];
|
|
967
|
-
if (H ===
|
|
967
|
+
if (H === I && (H = te(F)), typeof H > "u" && !N)
|
|
968
968
|
throw new v("intrinsic " + k + " exists, but is not available. Please file an issue!");
|
|
969
969
|
return {
|
|
970
970
|
alias: W,
|
|
@@ -972,22 +972,22 @@ function Cr() {
|
|
|
972
972
|
value: H
|
|
973
973
|
};
|
|
974
974
|
}
|
|
975
|
-
throw new
|
|
975
|
+
throw new P("intrinsic " + k + " does not exist!");
|
|
976
976
|
};
|
|
977
977
|
return Er = function(k, N) {
|
|
978
978
|
if (typeof k != "string" || k.length === 0)
|
|
979
979
|
throw new v("intrinsic name must be a non-empty string");
|
|
980
980
|
if (arguments.length > 1 && typeof N != "boolean")
|
|
981
981
|
throw new v('"allowMissing" argument must be a boolean');
|
|
982
|
-
if (
|
|
983
|
-
throw new
|
|
984
|
-
var F =
|
|
985
|
-
Z && (W = Z[0],
|
|
986
|
-
for (var Se = 1,
|
|
987
|
-
var ee = F[Se], we =
|
|
982
|
+
if (le(/^%?[^%]*%?$/, k) === null)
|
|
983
|
+
throw new P("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
984
|
+
var F = ce(k), W = F.length > 0 ? F[0] : "", H = se("%" + W + "%", N), X = H.name, z = H.value, K = !1, Z = H.alias;
|
|
985
|
+
Z && (W = Z[0], he(F, oe([0, 1], Z)));
|
|
986
|
+
for (var Se = 1, pe = !0; Se < F.length; Se += 1) {
|
|
987
|
+
var ee = F[Se], we = fe(ee, 0, 1), be = fe(ee, -1);
|
|
988
988
|
if ((we === '"' || we === "'" || we === "`" || be === '"' || be === "'" || be === "`") && we !== be)
|
|
989
|
-
throw new
|
|
990
|
-
if ((ee === "constructor" || !
|
|
989
|
+
throw new P("property names with quotes must have matching quotes");
|
|
990
|
+
if ((ee === "constructor" || !pe) && (K = !0), W += "." + ee, X = "%" + W + "%", V(B, X))
|
|
991
991
|
z = B[X];
|
|
992
992
|
else if (z != null) {
|
|
993
993
|
if (!(ee in z)) {
|
|
@@ -997,10 +997,10 @@ function Cr() {
|
|
|
997
997
|
}
|
|
998
998
|
if (f && Se + 1 >= F.length) {
|
|
999
999
|
var Ae = f(z, ee);
|
|
1000
|
-
|
|
1000
|
+
pe = !!Ae, pe && "get" in Ae && !("originalValue" in Ae.get) ? z = Ae.get : z = z[ee];
|
|
1001
1001
|
} else
|
|
1002
|
-
|
|
1003
|
-
|
|
1002
|
+
pe = V(z, ee), z = z[ee];
|
|
1003
|
+
pe && !K && (B[X] = z);
|
|
1004
1004
|
}
|
|
1005
1005
|
}
|
|
1006
1006
|
return z;
|
|
@@ -1012,21 +1012,21 @@ function Kt() {
|
|
|
1012
1012
|
kt = 1;
|
|
1013
1013
|
var r = /* @__PURE__ */ Cr(), e = zt(), n = e([r("%String.prototype.indexOf%")]);
|
|
1014
1014
|
return Pr = function(s, y) {
|
|
1015
|
-
var
|
|
1015
|
+
var P = (
|
|
1016
1016
|
/** @type {(this: unknown, ...args: unknown[]) => unknown} */
|
|
1017
1017
|
r(s, !!y)
|
|
1018
1018
|
);
|
|
1019
|
-
return typeof
|
|
1019
|
+
return typeof P == "function" && n(s, ".prototype.") > -1 ? e(
|
|
1020
1020
|
/** @type {const} */
|
|
1021
|
-
[
|
|
1022
|
-
) :
|
|
1021
|
+
[P]
|
|
1022
|
+
) : P;
|
|
1023
1023
|
}, Pr;
|
|
1024
1024
|
}
|
|
1025
1025
|
var Ir, xt;
|
|
1026
1026
|
function Qt() {
|
|
1027
1027
|
if (xt) return Ir;
|
|
1028
1028
|
xt = 1;
|
|
1029
|
-
var r = /* @__PURE__ */ Cr(), e = /* @__PURE__ */ Kt(), n = /* @__PURE__ */ xe(), a = /* @__PURE__ */ Pe(), s = r("%Map%", !0), y = e("Map.prototype.get", !0),
|
|
1029
|
+
var r = /* @__PURE__ */ Cr(), e = /* @__PURE__ */ Kt(), n = /* @__PURE__ */ xe(), a = /* @__PURE__ */ Pe(), s = r("%Map%", !0), y = e("Map.prototype.get", !0), P = e("Map.prototype.set", !0), v = e("Map.prototype.has", !0), E = e("Map.prototype.delete", !0), m = e("Map.prototype.size", !0);
|
|
1030
1030
|
return Ir = !!s && /** @type {Exclude<import('.'), false>} */
|
|
1031
1031
|
function() {
|
|
1032
1032
|
var h, S = {
|
|
@@ -1049,7 +1049,7 @@ function Qt() {
|
|
|
1049
1049
|
return h ? v(h, l) : !1;
|
|
1050
1050
|
},
|
|
1051
1051
|
set: function(l, c) {
|
|
1052
|
-
h || (h = new s()),
|
|
1052
|
+
h || (h = new s()), P(h, l, c);
|
|
1053
1053
|
}
|
|
1054
1054
|
};
|
|
1055
1055
|
return S;
|
|
@@ -1059,7 +1059,7 @@ var Rr, qt;
|
|
|
1059
1059
|
function Mn() {
|
|
1060
1060
|
if (qt) return Rr;
|
|
1061
1061
|
qt = 1;
|
|
1062
|
-
var r = /* @__PURE__ */ Cr(), e = /* @__PURE__ */ Kt(), n = /* @__PURE__ */ xe(), a = Qt(), s = /* @__PURE__ */ Pe(), y = r("%WeakMap%", !0),
|
|
1062
|
+
var r = /* @__PURE__ */ Cr(), e = /* @__PURE__ */ Kt(), n = /* @__PURE__ */ xe(), a = Qt(), s = /* @__PURE__ */ Pe(), y = r("%WeakMap%", !0), P = e("WeakMap.prototype.get", !0), v = e("WeakMap.prototype.set", !0), E = e("WeakMap.prototype.has", !0), m = e("WeakMap.prototype.delete", !0);
|
|
1063
1063
|
return Rr = y ? (
|
|
1064
1064
|
/** @type {Exclude<import('.'), false>} */
|
|
1065
1065
|
function() {
|
|
@@ -1077,7 +1077,7 @@ function Mn() {
|
|
|
1077
1077
|
return !1;
|
|
1078
1078
|
},
|
|
1079
1079
|
get: function(c) {
|
|
1080
|
-
return y && c && (typeof c == "object" || typeof c == "function") && h ?
|
|
1080
|
+
return y && c && (typeof c == "object" || typeof c == "function") && h ? P(h, c) : S && S.get(c);
|
|
1081
1081
|
},
|
|
1082
1082
|
has: function(c) {
|
|
1083
1083
|
return y && c && (typeof c == "object" || typeof c == "function") && h ? E(h, c) : !!S && S.has(c);
|
|
@@ -1160,7 +1160,7 @@ function Vt() {
|
|
|
1160
1160
|
for (var g = f && f.plainObjects ? { __proto__: null } : {}, p = 0; p < u.length; ++p)
|
|
1161
1161
|
typeof u[p] < "u" && (g[p] = u[p]);
|
|
1162
1162
|
return g;
|
|
1163
|
-
},
|
|
1163
|
+
}, P = function i(u, f, g) {
|
|
1164
1164
|
if (!f)
|
|
1165
1165
|
return u;
|
|
1166
1166
|
if (typeof f != "object" && typeof f != "function") {
|
|
@@ -1208,24 +1208,24 @@ function Vt() {
|
|
|
1208
1208
|
});
|
|
1209
1209
|
for (var O = "", R = 0; R < A.length; R += m) {
|
|
1210
1210
|
for (var q = A.length >= m ? A.slice(R, R + m) : A, _ = [], D = 0; D < q.length; ++D) {
|
|
1211
|
-
var
|
|
1212
|
-
if (
|
|
1211
|
+
var I = q.charCodeAt(D);
|
|
1212
|
+
if (I === 45 || I === 46 || I === 95 || I === 126 || I >= 48 && I <= 57 || I >= 65 && I <= 90 || I >= 97 && I <= 122 || w === r.RFC1738 && (I === 40 || I === 41)) {
|
|
1213
1213
|
_[_.length] = q.charAt(D);
|
|
1214
1214
|
continue;
|
|
1215
1215
|
}
|
|
1216
|
-
if (
|
|
1217
|
-
_[_.length] = a[
|
|
1216
|
+
if (I < 128) {
|
|
1217
|
+
_[_.length] = a[I];
|
|
1218
1218
|
continue;
|
|
1219
1219
|
}
|
|
1220
|
-
if (
|
|
1221
|
-
_[_.length] = a[192 |
|
|
1220
|
+
if (I < 2048) {
|
|
1221
|
+
_[_.length] = a[192 | I >> 6] + a[128 | I & 63];
|
|
1222
1222
|
continue;
|
|
1223
1223
|
}
|
|
1224
|
-
if (
|
|
1225
|
-
_[_.length] = a[224 |
|
|
1224
|
+
if (I < 55296 || I >= 57344) {
|
|
1225
|
+
_[_.length] = a[224 | I >> 12] + a[128 | I >> 6 & 63] + a[128 | I & 63];
|
|
1226
1226
|
continue;
|
|
1227
1227
|
}
|
|
1228
|
-
D += 1,
|
|
1228
|
+
D += 1, I = 65536 + ((I & 1023) << 10 | q.charCodeAt(D) & 1023), _[_.length] = a[240 | I >> 18] + a[128 | I >> 12 & 63] + a[128 | I >> 6 & 63] + a[128 | I & 63];
|
|
1229
1229
|
}
|
|
1230
1230
|
O += _.join("");
|
|
1231
1231
|
}
|
|
@@ -1261,7 +1261,7 @@ function Vt() {
|
|
|
1261
1261
|
isBuffer: l,
|
|
1262
1262
|
isRegExp: S,
|
|
1263
1263
|
maybeMap: b,
|
|
1264
|
-
merge:
|
|
1264
|
+
merge: P
|
|
1265
1265
|
}, $r;
|
|
1266
1266
|
}
|
|
1267
1267
|
var kr, Mt;
|
|
@@ -1279,8 +1279,8 @@ function Un() {
|
|
|
1279
1279
|
repeat: function(i) {
|
|
1280
1280
|
return i;
|
|
1281
1281
|
}
|
|
1282
|
-
}, y = Array.isArray,
|
|
1283
|
-
|
|
1282
|
+
}, y = Array.isArray, P = Array.prototype.push, v = function(b, i) {
|
|
1283
|
+
P.apply(b, y(i) ? i : [i]);
|
|
1284
1284
|
}, E = Date.prototype.toISOString, m = n.default, d = {
|
|
1285
1285
|
addQueryPrefix: !1,
|
|
1286
1286
|
allowDots: !1,
|
|
@@ -1306,18 +1306,18 @@ function Un() {
|
|
|
1306
1306
|
strictNullHandling: !1
|
|
1307
1307
|
}, h = function(i) {
|
|
1308
1308
|
return typeof i == "string" || typeof i == "number" || typeof i == "boolean" || typeof i == "symbol" || typeof i == "bigint";
|
|
1309
|
-
}, S = {}, l = function b(i, u, f, g, p, w, A, O, R, q, _, D,
|
|
1310
|
-
for (var $ = i, V = ne, oe = 0,
|
|
1311
|
-
var
|
|
1312
|
-
if (oe += 1, typeof
|
|
1313
|
-
if (
|
|
1309
|
+
}, S = {}, l = function b(i, u, f, g, p, w, A, O, R, q, _, D, I, j, B, Q, te, ne) {
|
|
1310
|
+
for (var $ = i, V = ne, oe = 0, he = !1; (V = V.get(S)) !== void 0 && !he; ) {
|
|
1311
|
+
var ue = V.get(i);
|
|
1312
|
+
if (oe += 1, typeof ue < "u") {
|
|
1313
|
+
if (ue === oe)
|
|
1314
1314
|
throw new RangeError("Cyclic object value");
|
|
1315
|
-
|
|
1315
|
+
he = !0;
|
|
1316
1316
|
}
|
|
1317
1317
|
typeof V.get(S) > "u" && (oe = 0);
|
|
1318
1318
|
}
|
|
1319
|
-
if (typeof q == "function" ? $ = q(u, $) : $ instanceof Date ? $ =
|
|
1320
|
-
return X instanceof Date ?
|
|
1319
|
+
if (typeof q == "function" ? $ = q(u, $) : $ instanceof Date ? $ = I($) : f === "comma" && y($) && ($ = e.maybeMap($, function(X) {
|
|
1320
|
+
return X instanceof Date ? I(X) : X;
|
|
1321
1321
|
})), $ === null) {
|
|
1322
1322
|
if (w)
|
|
1323
1323
|
return R && !Q ? R(u, d.encoder, te, "key", j) : u;
|
|
@@ -1325,14 +1325,14 @@ function Un() {
|
|
|
1325
1325
|
}
|
|
1326
1326
|
if (h($) || e.isBuffer($)) {
|
|
1327
1327
|
if (R) {
|
|
1328
|
-
var
|
|
1329
|
-
return [B(
|
|
1328
|
+
var fe = Q ? u : R(u, d.encoder, te, "key", j);
|
|
1329
|
+
return [B(fe) + "=" + B(R($, d.encoder, te, "value", j))];
|
|
1330
1330
|
}
|
|
1331
1331
|
return [B(u) + "=" + B(String($))];
|
|
1332
1332
|
}
|
|
1333
|
-
var
|
|
1333
|
+
var le = [];
|
|
1334
1334
|
if (typeof $ > "u")
|
|
1335
|
-
return
|
|
1335
|
+
return le;
|
|
1336
1336
|
var ae;
|
|
1337
1337
|
if (f === "comma" && y($))
|
|
1338
1338
|
Q && R && ($ = e.maybeMap($, R)), ae = [{ value: $.length > 0 ? $.join(",") || null : void 0 }];
|
|
@@ -1342,16 +1342,16 @@ function Un() {
|
|
|
1342
1342
|
var Y = Object.keys($);
|
|
1343
1343
|
ae = _ ? Y.sort(_) : Y;
|
|
1344
1344
|
}
|
|
1345
|
-
var
|
|
1345
|
+
var ce = O ? String(u).replace(/\./g, "%2E") : String(u), se = g && y($) && $.length === 1 ? ce + "[]" : ce;
|
|
1346
1346
|
if (p && y($) && $.length === 0)
|
|
1347
|
-
return
|
|
1347
|
+
return se + "[]";
|
|
1348
1348
|
for (var L = 0; L < ae.length; ++L) {
|
|
1349
1349
|
var k = ae[L], N = typeof k == "object" && k && typeof k.value < "u" ? k.value : $[k];
|
|
1350
1350
|
if (!(A && N === null)) {
|
|
1351
|
-
var F = D && O ? String(k).replace(/\./g, "%2E") : String(k), W = y($) ? typeof f == "function" ? f(
|
|
1351
|
+
var F = D && O ? String(k).replace(/\./g, "%2E") : String(k), W = y($) ? typeof f == "function" ? f(se, F) : se : se + (D ? "." + F : "[" + F + "]");
|
|
1352
1352
|
ne.set(i, oe);
|
|
1353
1353
|
var H = r();
|
|
1354
|
-
H.set(S, ne), v(
|
|
1354
|
+
H.set(S, ne), v(le, b(
|
|
1355
1355
|
N,
|
|
1356
1356
|
W,
|
|
1357
1357
|
f,
|
|
@@ -1364,7 +1364,7 @@ function Un() {
|
|
|
1364
1364
|
q,
|
|
1365
1365
|
_,
|
|
1366
1366
|
D,
|
|
1367
|
-
|
|
1367
|
+
I,
|
|
1368
1368
|
j,
|
|
1369
1369
|
B,
|
|
1370
1370
|
Q,
|
|
@@ -1373,7 +1373,7 @@ function Un() {
|
|
|
1373
1373
|
));
|
|
1374
1374
|
}
|
|
1375
1375
|
}
|
|
1376
|
-
return
|
|
1376
|
+
return le;
|
|
1377
1377
|
}, c = function(i) {
|
|
1378
1378
|
if (!i)
|
|
1379
1379
|
return d;
|
|
@@ -1451,8 +1451,8 @@ function Un() {
|
|
|
1451
1451
|
R
|
|
1452
1452
|
));
|
|
1453
1453
|
}
|
|
1454
|
-
var
|
|
1455
|
-
return f.charsetSentinel && (f.charset === "iso-8859-1" ? j += "utf8=%26%2310003%3B&" : j += "utf8=%E2%9C%93&"),
|
|
1454
|
+
var I = w.join(f.delimiter), j = f.addQueryPrefix === !0 ? "?" : "";
|
|
1455
|
+
return f.charsetSentinel && (f.charset === "iso-8859-1" ? j += "utf8=%26%2310003%3B&" : j += "utf8=%E2%9C%93&"), I.length > 0 ? j + I : "";
|
|
1456
1456
|
}, kr;
|
|
1457
1457
|
}
|
|
1458
1458
|
var xr, Nt;
|
|
@@ -1491,7 +1491,7 @@ function Bn() {
|
|
|
1491
1491
|
if (l.throwOnLimitExceeded && c >= l.arrayLimit)
|
|
1492
1492
|
throw new RangeError("Array limit exceeded. Only " + l.arrayLimit + " element" + (l.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
|
|
1493
1493
|
return S;
|
|
1494
|
-
},
|
|
1494
|
+
}, P = "utf8=%26%2310003%3B", v = "utf8=%E2%9C%93", E = function(l, c) {
|
|
1495
1495
|
var b = { __proto__: null }, i = c.ignoreQueryPrefix ? l.replace(/^\?/, "") : l;
|
|
1496
1496
|
i = i.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
1497
1497
|
var u = c.parameterLimit === 1 / 0 ? void 0 : c.parameterLimit, f = i.split(
|
|
@@ -1503,7 +1503,7 @@ function Bn() {
|
|
|
1503
1503
|
var g = -1, p, w = c.charset;
|
|
1504
1504
|
if (c.charsetSentinel)
|
|
1505
1505
|
for (p = 0; p < f.length; ++p)
|
|
1506
|
-
f[p].indexOf("utf8=") === 0 && (f[p] === v ? w = "utf-8" : f[p] ===
|
|
1506
|
+
f[p].indexOf("utf8=") === 0 && (f[p] === v ? w = "utf-8" : f[p] === P && (w = "iso-8859-1"), g = p, p = f.length);
|
|
1507
1507
|
for (p = 0; p < f.length; ++p)
|
|
1508
1508
|
if (p !== g) {
|
|
1509
1509
|
var A = f[p], O = A.indexOf("]="), R = O === -1 ? A.indexOf("=") : O + 1, q, _;
|
|
@@ -1513,8 +1513,8 @@ function Bn() {
|
|
|
1513
1513
|
c,
|
|
1514
1514
|
n(b[q]) ? b[q].length : 0
|
|
1515
1515
|
),
|
|
1516
|
-
function(
|
|
1517
|
-
return c.decoder(
|
|
1516
|
+
function(I) {
|
|
1517
|
+
return c.decoder(I, a.decoder, w, "value");
|
|
1518
1518
|
}
|
|
1519
1519
|
)), _ && c.interpretNumericEntities && w === "iso-8859-1" && (_ = s(String(_))), A.indexOf("[]=") > -1 && (_ = n(_) ? [_] : _);
|
|
1520
1520
|
var D = e.call(b, q);
|
|
@@ -1624,7 +1624,7 @@ function Gn() {
|
|
|
1624
1624
|
}, qr;
|
|
1625
1625
|
}
|
|
1626
1626
|
var Wn = /* @__PURE__ */ Gn();
|
|
1627
|
-
const
|
|
1627
|
+
const ve = /* @__PURE__ */ un(Wn), G = {
|
|
1628
1628
|
token: "/lxwork/api/auth/token",
|
|
1629
1629
|
permissionTicket: "/lxwork/api/auth/create-permission-ticket",
|
|
1630
1630
|
authToken: "/sso/realms/myrealm/protocol/openid-connect/token",
|
|
@@ -1651,8 +1651,8 @@ async function U(r, e, n) {
|
|
|
1651
1651
|
}
|
|
1652
1652
|
return Dr = 0, await a.json();
|
|
1653
1653
|
}
|
|
1654
|
-
const
|
|
1655
|
-
getTokenInfo: (e) => U(r, `${G.token}?${
|
|
1654
|
+
const ie = (r) => ({
|
|
1655
|
+
getTokenInfo: (e) => U(r, `${G.token}?${ve.stringify(e)}`),
|
|
1656
1656
|
createPermissionTicket: (e) => U(r, `${G.permissionTicket}`, {
|
|
1657
1657
|
method: "POST",
|
|
1658
1658
|
body: JSON.stringify(e)
|
|
@@ -1696,7 +1696,7 @@ const me = (r) => ({
|
|
|
1696
1696
|
* @param params.max_size Maximum results size (defaults to 100)
|
|
1697
1697
|
* @param params.extend 如果为 true 返回 position 和 department 字段,,代表用户的岗位和部门
|
|
1698
1698
|
*/
|
|
1699
|
-
getUsers: (e) => U(r, `${G.user}/search?${
|
|
1699
|
+
getUsers: (e) => U(r, `${G.user}/search?${ve.stringify(e)}`, {
|
|
1700
1700
|
method: "GET"
|
|
1701
1701
|
}),
|
|
1702
1702
|
/**
|
|
@@ -1708,7 +1708,7 @@ const me = (r) => ({
|
|
|
1708
1708
|
* @param params.page_size 可选,每页数据量(默认10)
|
|
1709
1709
|
* @returns Promise<ListRes<SearchUserItem>> 返回分页格式的用户列表数据
|
|
1710
1710
|
*/
|
|
1711
|
-
getUsersByRole: (e) => U(r, `${G.user}/search-by-role?${
|
|
1711
|
+
getUsersByRole: (e) => U(r, `${G.user}/search-by-role?${ve.stringify(e)}`, {
|
|
1712
1712
|
method: "GET"
|
|
1713
1713
|
}),
|
|
1714
1714
|
/**
|
|
@@ -1739,7 +1739,7 @@ const me = (r) => ({
|
|
|
1739
1739
|
* 接口文档 不统一 GroupItem UserGroupItem 字段有下划线 有驼峰
|
|
1740
1740
|
* @returns Promise<GroupItem[]>
|
|
1741
1741
|
*/
|
|
1742
|
-
getGroupByParentId: (e) => U(r, `${G.groups}?${
|
|
1742
|
+
getGroupByParentId: (e) => U(r, `${G.groups}?${ve.stringify(e)}`, {
|
|
1743
1743
|
method: "GET"
|
|
1744
1744
|
}),
|
|
1745
1745
|
/**
|
|
@@ -1755,7 +1755,7 @@ const me = (r) => ({
|
|
|
1755
1755
|
* @param params.max 返回结果数, keycloak 默认返回 11 个, 如何希望返回所有,可以设一个较大值
|
|
1756
1756
|
* @returns Promise<GroupItem[]> 会按照树形结构返回所有符合搜索条件的树形结果
|
|
1757
1757
|
*/
|
|
1758
|
-
getGroupsByName: (e) => U(r, `${G.groups}/search?${
|
|
1758
|
+
getGroupsByName: (e) => U(r, `${G.groups}/search?${ve.stringify(e)}`, {
|
|
1759
1759
|
method: "GET"
|
|
1760
1760
|
}),
|
|
1761
1761
|
/**
|
|
@@ -1777,7 +1777,7 @@ const me = (r) => ({
|
|
|
1777
1777
|
* @param params.extend 如果为 true 则返回 position 和 department 字段, 代表用户的岗位和部门
|
|
1778
1778
|
* @returns Promise<SearchUserItem[]>
|
|
1779
1779
|
*/
|
|
1780
|
-
getUsersByGroup: (e) => U(r, `${G.groups}/${e.group_id}/members?${
|
|
1780
|
+
getUsersByGroup: (e) => U(r, `${G.groups}/${e.group_id}/members?${ve.stringify(e)}`, {
|
|
1781
1781
|
method: "GET"
|
|
1782
1782
|
})
|
|
1783
1783
|
});
|
|
@@ -1860,11 +1860,11 @@ class Jn {
|
|
|
1860
1860
|
* @param {string} config.APPID - 应用唯一标识
|
|
1861
1861
|
*/
|
|
1862
1862
|
constructor({ APPID: e, dev: n, baseURL: a, token: s }) {
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1863
|
+
me(this, "APPID");
|
|
1864
|
+
me(this, "dev");
|
|
1865
|
+
me(this, "baseURL");
|
|
1866
|
+
me(this, "token");
|
|
1867
|
+
me(this, "storage");
|
|
1868
1868
|
this.APPID = e, this.storage = new an(e), this.dev = n || !1, this.baseURL = a || "", this.token = s || "";
|
|
1869
1869
|
}
|
|
1870
1870
|
/**
|
|
@@ -1888,16 +1888,16 @@ class Jn {
|
|
|
1888
1888
|
Object.keys(e).includes(n[y]) && s.length <= a ? s.push(n[y]) : s = [], y++;
|
|
1889
1889
|
if (s.length === a) {
|
|
1890
1890
|
this.removeToken();
|
|
1891
|
-
let
|
|
1891
|
+
let P;
|
|
1892
1892
|
const v = this.storage.getItem("login_redirect_uri"), { code: E, state: m } = e;
|
|
1893
1893
|
try {
|
|
1894
|
-
|
|
1894
|
+
P = await ie(this).getTokenInfo({
|
|
1895
1895
|
code: E,
|
|
1896
1896
|
client_id: this.APPID,
|
|
1897
1897
|
state: m,
|
|
1898
1898
|
redirect_uri: v
|
|
1899
|
-
}), this.setToken(
|
|
1900
|
-
const { ticket: d } = await
|
|
1899
|
+
}), this.setToken(P);
|
|
1900
|
+
const { ticket: d } = await ie(this).createPermissionTicket({ client_id: this.APPID }), h = await ie(this).getAuthTokenInfo({ grant_type: "urn:ietf:params:oauth:grant-type:uma-ticket", ticket: d });
|
|
1901
1901
|
this.setToken(h, "auth"), jn(n);
|
|
1902
1902
|
} catch {
|
|
1903
1903
|
this.removeToken(), window.location.href = v;
|
|
@@ -1920,7 +1920,7 @@ class Jn {
|
|
|
1920
1920
|
scope: "openid"
|
|
1921
1921
|
};
|
|
1922
1922
|
this.storage.setItem("login_redirect_uri", a.redirect_uri), Bt(n) && !this.dev && (a.keycloak_host = n + "/sso/");
|
|
1923
|
-
let s = `/lxwork/api/auth/login?${
|
|
1923
|
+
let s = `/lxwork/api/auth/login?${ve.stringify(a)}`;
|
|
1924
1924
|
window.location.replace(s);
|
|
1925
1925
|
}
|
|
1926
1926
|
/**
|
|
@@ -1937,7 +1937,7 @@ class Jn {
|
|
|
1937
1937
|
post_logout_redirect_uri: e
|
|
1938
1938
|
};
|
|
1939
1939
|
Bt(n) && !this.dev && (s.keycloak_host = n + "/sso/");
|
|
1940
|
-
let y = `/lxwork/api/auth/endsession?${
|
|
1940
|
+
let y = `/lxwork/api/auth/endsession?${ve.stringify(s)}`;
|
|
1941
1941
|
this.removeToken(), window.location.href = y;
|
|
1942
1942
|
}
|
|
1943
1943
|
/**
|
|
@@ -1960,25 +1960,25 @@ class Jn {
|
|
|
1960
1960
|
* @returns {Promise<CompanyItem>} 公司列表数据
|
|
1961
1961
|
*/
|
|
1962
1962
|
async getCompanyList() {
|
|
1963
|
-
return await
|
|
1963
|
+
return await ie(this).getCompanyList();
|
|
1964
1964
|
}
|
|
1965
1965
|
/**
|
|
1966
|
-
*
|
|
1966
|
+
* 获取当前登录用户所属分公司名称
|
|
1967
1967
|
* @async
|
|
1968
1968
|
* @description 递归查找用户组中类型为'3'(分公司)的节点
|
|
1969
1969
|
* @returns {Promise<string>} 分公司名称,未找到则返回空字符串
|
|
1970
1970
|
*/
|
|
1971
1971
|
async getUserBranchGroup() {
|
|
1972
|
-
const e = await
|
|
1972
|
+
const e = await ie(this).getUserGroupList(), n = e.find((y) => y.attributes.type.includes("3"));
|
|
1973
1973
|
if (n)
|
|
1974
1974
|
return n.name;
|
|
1975
1975
|
const a = async (y) => {
|
|
1976
1976
|
if (y.attributes.type.includes("3"))
|
|
1977
1977
|
return y.name;
|
|
1978
1978
|
if (y.parentId) {
|
|
1979
|
-
const
|
|
1980
|
-
if (
|
|
1981
|
-
return a(
|
|
1979
|
+
const P = await ie(this).getGroupDetail({ id: y.parentId });
|
|
1980
|
+
if (P)
|
|
1981
|
+
return a(P);
|
|
1982
1982
|
}
|
|
1983
1983
|
return "";
|
|
1984
1984
|
};
|
|
@@ -1987,6 +1987,29 @@ class Jn {
|
|
|
1987
1987
|
;
|
|
1988
1988
|
return s;
|
|
1989
1989
|
}
|
|
1990
|
+
/**
|
|
1991
|
+
* 根据groupId获取所属分公司信息
|
|
1992
|
+
* @async
|
|
1993
|
+
* @description 递归查找用户组中类型小于等于3的节点 如果小于等于3则返回节点名称 否则继续递归查找父节点
|
|
1994
|
+
* @returns {Promise<UserGroupItem>} 分公司节点信息,未找到则返回空对象
|
|
1995
|
+
*/
|
|
1996
|
+
async getUserBranchGroupByGroupId(e) {
|
|
1997
|
+
const n = await ie(this).getGroupDetail({ id: e.groupId });
|
|
1998
|
+
if (n.attributes.type.includes("3"))
|
|
1999
|
+
return n;
|
|
2000
|
+
const a = async (s) => {
|
|
2001
|
+
const y = s.attributes.type[0] || 0;
|
|
2002
|
+
if (Number(y) <= 3)
|
|
2003
|
+
return s;
|
|
2004
|
+
if (s.parentId) {
|
|
2005
|
+
const P = await ie(this).getGroupDetail({ id: s.parentId });
|
|
2006
|
+
if (P)
|
|
2007
|
+
return a(P);
|
|
2008
|
+
}
|
|
2009
|
+
return {};
|
|
2010
|
+
};
|
|
2011
|
+
return a(n);
|
|
2012
|
+
}
|
|
1990
2013
|
/**
|
|
1991
2014
|
* 刷新Token
|
|
1992
2015
|
* @async
|
|
@@ -1996,7 +2019,7 @@ class Jn {
|
|
|
1996
2019
|
async refreshToken(e) {
|
|
1997
2020
|
const { exp: n } = this.getDecodeToken(), a = Date.now() / 1e3;
|
|
1998
2021
|
if (e || a > n - 200 && a < n) {
|
|
1999
|
-
const s = await
|
|
2022
|
+
const s = await ie(this).refreshAuthToken();
|
|
2000
2023
|
this.setToken(s), this.setToken(s, "auth");
|
|
2001
2024
|
}
|
|
2002
2025
|
}
|
|
@@ -2048,5 +2071,5 @@ export {
|
|
|
2048
2071
|
Bt as isIpAddress,
|
|
2049
2072
|
jn as removeUrlParam,
|
|
2050
2073
|
Vn as subBefore,
|
|
2051
|
-
|
|
2074
|
+
ie as useSSOApi
|
|
2052
2075
|
};
|