@glodon-aiot/dataset-annotation 3.19.0-alpha.20 → 3.19.0-alpha.21

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.
@@ -1,22 +1,49 @@
1
- import { decode as n } from "js-base64";
2
- const r = (x) => JSON.parse(n(x.split(".")[1])), s = (x) => {
3
- const e = r(x).exp;
4
- return (/* @__PURE__ */ new Date()).valueOf() / 1e3 >= e;
5
- }, B = ["#247FEA", "#FF6B3B", "#FFC100", "#9FB40F", "#76523B", "#DAD5B5", "#0E8E89", "#E19348", "#E19348", "#2BCB95", "#B1ABF4", "#1D42C2", "#1D9ED1", "#D64BC0", "#255634", "#8C8C47", "#8CDAE5", "#8E283B", "#791DC9", "#025DF4", "#DB6BCF", "#2498D1", "#BBBDE6", "#4045B2", "#21A97A", "#FF745A", "#007E99", "#FFA8A8", "#2391FF", "#FFC328", "#A0DC2C", "#946DFF", "#626681", "#EB4185", "#CD8150", "#36BCCB", "#327039", "#803488", "#83BC99", "#626681"], F = (x) => {
6
- const e = x.substring(x.lastIndexOf(".")).toLowerCase();
7
- return x.slice(0, x.lastIndexOf(".")) + e;
8
- }, C = (x, e, t = 1e-11) => Math.abs(x - e) < t;
9
- function c() {
1
+ var F = (x, r, t) => new Promise((n, e) => {
2
+ var o = (s) => {
3
+ try {
4
+ c(t.next(s));
5
+ } catch (B) {
6
+ e(B);
7
+ }
8
+ }, a = (s) => {
9
+ try {
10
+ c(t.throw(s));
11
+ } catch (B) {
12
+ e(B);
13
+ }
14
+ }, c = (s) => s.done ? n(s.value) : Promise.resolve(s.value).then(o, a);
15
+ c((t = t.apply(x, r)).next());
16
+ });
17
+ import { decode as u } from "js-base64";
18
+ const C = (x) => JSON.parse(u(x.split(".")[1])), i = (x) => {
19
+ const r = C(x).exp;
20
+ return (/* @__PURE__ */ new Date()).valueOf() / 1e3 >= r;
21
+ }, l = (x, r) => {
22
+ let t = x, n;
23
+ return () => F(void 0, null, function* () {
24
+ const e = yield r == null ? void 0 : r();
25
+ return t = e != null ? e : t, !t || !i(t) || !r ? t : (n = n != null ? n : Promise.resolve(r({
26
+ forceRefresh: !0
27
+ })).then((o) => (t = o != null ? o : t, t)).finally(() => {
28
+ n = void 0;
29
+ }), n);
30
+ });
31
+ }, p = ["#247FEA", "#FF6B3B", "#FFC100", "#9FB40F", "#76523B", "#DAD5B5", "#0E8E89", "#E19348", "#E19348", "#2BCB95", "#B1ABF4", "#1D42C2", "#1D9ED1", "#D64BC0", "#255634", "#8C8C47", "#8CDAE5", "#8E283B", "#791DC9", "#025DF4", "#DB6BCF", "#2498D1", "#BBBDE6", "#4045B2", "#21A97A", "#FF745A", "#007E99", "#FFA8A8", "#2391FF", "#FFC328", "#A0DC2C", "#946DFF", "#626681", "#EB4185", "#CD8150", "#36BCCB", "#327039", "#803488", "#83BC99", "#626681"], A = (x) => {
32
+ const r = x.substring(x.lastIndexOf(".")).toLowerCase();
33
+ return x.slice(0, x.lastIndexOf(".")) + r;
34
+ }, f = (x, r, t = 1e-11) => Math.abs(x - r) < t;
35
+ function v() {
10
36
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(x) {
11
- const e = Math.random() * 16 | 0;
12
- return (x == "x" ? e : e & 3 | 8).toString(16);
37
+ const r = Math.random() * 16 | 0;
38
+ return (x == "x" ? r : r & 3 | 8).toString(16);
13
39
  });
14
40
  }
15
41
  export {
16
- C as approxeq,
17
- F as fileSuffixToLowerCase,
18
- c as getUuid,
19
- s as isExpired,
20
- r as parseJWT,
21
- B as tagColors
42
+ f as approxeq,
43
+ l as createTokenResolver,
44
+ A as fileSuffixToLowerCase,
45
+ v as getUuid,
46
+ i as isExpired,
47
+ C as parseJWT,
48
+ p as tagColors
22
49
  };