@das-fed/upf-utils 6.4.0-dev.242 → 6.4.0-dev.243
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/api-services/es5.js +1537 -1518
- package/api-services/index.js +1231 -1221
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/es5.js +875 -844
- package/api-services/modules/app-manage/index.js +714 -686
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/es5.js +1138 -1095
- package/api-services/modules/authentication/index.js +960 -914
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/es5.js +874 -843
- package/api-services/modules/bems/index.js +714 -686
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/es5.js +1178 -1147
- package/api-services/modules/contract/index.js +983 -955
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/es5.js +874 -843
- package/api-services/modules/duty-manage/index.js +712 -684
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.js +881 -850
- package/api-services/modules/enterpriseright/index.js +704 -676
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/es5.js +1426 -1383
- package/api-services/modules/file/es5.js +1298 -1255
- package/api-services/modules/file/index.js +1083 -1037
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/es5.js +875 -844
- package/api-services/modules/gateway-edge/index.js +714 -686
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +1146 -1100
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/es5.js +880 -849
- package/api-services/modules/iot/index.js +711 -683
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/es5.js +1388 -1345
- package/api-services/modules/justauth/index.js +1189 -1143
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/es5.js +1212 -1193
- package/api-services/modules/knowledge/index.js +999 -989
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/es5.js +875 -844
- package/api-services/modules/link/index.js +714 -686
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/es5.js +878 -847
- package/api-services/modules/permission/index.js +703 -675
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/es5.js +1220 -1201
- package/api-services/modules/platformManage/index.js +1007 -997
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/es5.js +515 -487
- package/api-services/modules/portal/index.js +397 -373
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/es5.js +1212 -1193
- package/api-services/modules/space-manage/index.js +999 -989
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/es5.js +1196 -1174
- package/api-services/modules/super-admin/index.js +978 -964
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/es5.js +1192 -1173
- package/api-services/modules/supplier/index.js +977 -967
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/es5.js +1178 -1147
- package/api-services/modules/supplychain-manage/index.js +983 -955
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/es5.js +1138 -1095
- package/api-services/modules/systemConfiguration/index.js +960 -914
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/es5.js +1014 -980
- package/api-services/modules/tool/index.js +804 -772
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/es5.js +1198 -1176
- package/api-services/src/create-service/index.js +985 -971
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/es5.js +968 -937
- package/common-info/getPermissionMethod/es5.js +910 -879
- package/common-info/getPermissionMethod/index.js +735 -707
- package/common-info/getPermissionMethod/index.js.gz +0 -0
- package/common-info/index.js +783 -755
- package/common-info/index.js.gz +0 -0
- package/common-tools/timezone-format/es5.js +122 -90
- package/common-tools/timezone-format/index.js +84 -56
- package/common-tools/timezone-format/index.js.gz +0 -0
- package/create-api-service/es5.js +1206 -1187
- package/create-api-service/index.js +991 -981
- package/create-api-service/index.js.gz +0 -0
- package/package.json +3 -3
package/common-info/index.js.gz
CHANGED
|
Binary file
|
|
@@ -7,134 +7,166 @@ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Sym
|
|
|
7
7
|
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
8
8
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
9
9
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
-
var
|
|
11
|
-
var
|
|
10
|
+
var i = require('dayjs');
|
|
11
|
+
var D = require('dayjs/plugin/utc');
|
|
12
12
|
var w = require('dayjs/plugin/timezone');
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
i.extend(D);
|
|
14
|
+
i.extend(w);
|
|
15
|
+
var l = "zh-CN",
|
|
16
|
+
z = "YYYY.MM.DD HH:mm:ss",
|
|
17
|
+
v = "UTC",
|
|
18
|
+
u = {
|
|
19
19
|
zh: "夏令时",
|
|
20
20
|
"default": "DST"
|
|
21
|
+
};
|
|
22
|
+
var d, g;
|
|
23
|
+
var S = (g = (d = i.tz) == null ? undefined : d.guess) == null ? undefined : g.bind(i.tz),
|
|
24
|
+
Z = function Z() {
|
|
25
|
+
if (!((typeof Intl === "undefined" ? "undefined" : _typeof(Intl)) > "u" || typeof Intl.DateTimeFormat != "function")) try {
|
|
26
|
+
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
27
|
+
} catch (_unused) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
C = function C(t) {
|
|
32
|
+
if (!t) return false;
|
|
33
|
+
if ((typeof Intl === "undefined" ? "undefined" : _typeof(Intl)) > "u" || typeof Intl.DateTimeFormat != "function") return true;
|
|
34
|
+
try {
|
|
35
|
+
return new Intl.DateTimeFormat(void 0, {
|
|
36
|
+
timeZone: t
|
|
37
|
+
}), !0;
|
|
38
|
+
} catch (_unused2) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
I = function I() {
|
|
43
|
+
var n;
|
|
44
|
+
var t = (n = i.tz) == null ? undefined : n.guess,
|
|
45
|
+
e = typeof t == "function" ? t : S;
|
|
46
|
+
try {
|
|
47
|
+
return e == null ? void 0 : e();
|
|
48
|
+
} catch (_unused3) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
21
51
|
},
|
|
22
|
-
|
|
23
|
-
|
|
52
|
+
m = function m() {
|
|
53
|
+
var t = I() || Z();
|
|
54
|
+
return C(t) ? t : v;
|
|
24
55
|
},
|
|
25
|
-
|
|
56
|
+
b = function b() {
|
|
26
57
|
var t;
|
|
27
|
-
return (typeof window === "undefined" ? "undefined" : _typeof(window)) < "u" && (t = window.navigator) != null && t.language ? window.navigator.language :
|
|
58
|
+
return (typeof window === "undefined" ? "undefined" : _typeof(window)) < "u" && (t = window.navigator) != null && t.language ? window.navigator.language : l;
|
|
28
59
|
},
|
|
29
|
-
|
|
60
|
+
p = function p(t) {
|
|
30
61
|
var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
if (!e.length) return
|
|
34
|
-
var
|
|
35
|
-
return
|
|
62
|
+
var r = t || b() || l,
|
|
63
|
+
o = r.toLowerCase();
|
|
64
|
+
if (!e.length) return o === "en" ? "en-US" : o === "zh" || o === "zh-cn" ? l : r;
|
|
65
|
+
var s = e.find(function (c) {
|
|
66
|
+
return c.toLowerCase() === o;
|
|
36
67
|
});
|
|
37
|
-
if (
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
return
|
|
68
|
+
if (s) return s;
|
|
69
|
+
var a = o.split("-")[0],
|
|
70
|
+
f = e.find(function (c) {
|
|
71
|
+
return c.toLowerCase().split("-")[0] === a;
|
|
41
72
|
});
|
|
42
|
-
return
|
|
43
|
-
return
|
|
44
|
-
}) ||
|
|
45
|
-
return
|
|
46
|
-
}) ||
|
|
47
|
-
},
|
|
48
|
-
g = function g(t) {
|
|
49
|
-
if (l.isDayjs(t)) return t;
|
|
50
|
-
if (t == null || t === "") return l();
|
|
51
|
-
var e = l(t);
|
|
52
|
-
return e.isValid() ? e : l();
|
|
73
|
+
return f || (a === "en" ? e.find(function (c) {
|
|
74
|
+
return c.toLowerCase().startsWith("en-");
|
|
75
|
+
}) || r : a === "zh" ? e.find(function (c) {
|
|
76
|
+
return c.toLowerCase().startsWith("zh-");
|
|
77
|
+
}) || l : r);
|
|
53
78
|
},
|
|
54
79
|
h = function h(t) {
|
|
55
|
-
if (
|
|
80
|
+
if (i.isDayjs(t)) return t;
|
|
81
|
+
if (t == null || t === "") return i();
|
|
82
|
+
var e = i(t);
|
|
83
|
+
return e.isValid() ? e : i();
|
|
84
|
+
},
|
|
85
|
+
T = function T(t) {
|
|
86
|
+
if (!t) return m();
|
|
56
87
|
try {
|
|
57
88
|
return new Intl.DateTimeFormat(void 0, {
|
|
58
89
|
timeZone: t
|
|
59
90
|
}), t;
|
|
60
|
-
} catch (
|
|
61
|
-
return
|
|
91
|
+
} catch (_unused4) {
|
|
92
|
+
return m();
|
|
62
93
|
}
|
|
63
94
|
},
|
|
64
|
-
|
|
95
|
+
y = function y(t) {
|
|
65
96
|
return "UTC".concat(t);
|
|
66
97
|
},
|
|
67
|
-
|
|
68
|
-
var
|
|
69
|
-
if (!
|
|
70
|
-
var
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
return "UTC".concat(
|
|
98
|
+
O = function O(t, e) {
|
|
99
|
+
var n = t.match(/([+-]\d{1,2})(?::?(\d{2}))?/) || [];
|
|
100
|
+
if (!n[1]) return e;
|
|
101
|
+
var r = n[1].startsWith("-") ? "-" : "+",
|
|
102
|
+
o = n[1].replace(/[+-]/, "").padStart(2, "0"),
|
|
103
|
+
s = n[2] || "00";
|
|
104
|
+
return "UTC".concat(r).concat(o, ":").concat(s);
|
|
74
105
|
},
|
|
75
|
-
|
|
76
|
-
var
|
|
77
|
-
var
|
|
106
|
+
A = function A(t, e, n) {
|
|
107
|
+
var o, s;
|
|
108
|
+
var r = y(n.format("Z"));
|
|
78
109
|
try {
|
|
79
|
-
var
|
|
80
|
-
|
|
110
|
+
var a = Intl.DateTimeFormat.supportedLocalesOf([e])[0] || e,
|
|
111
|
+
f = (s = (o = new Intl.DateTimeFormat(a, {
|
|
81
112
|
timeZone: t,
|
|
82
113
|
timeZoneName: "long"
|
|
83
|
-
}).formatToParts(
|
|
84
|
-
return
|
|
85
|
-
})) == null ? void 0 :
|
|
86
|
-
return
|
|
87
|
-
} catch (
|
|
88
|
-
return
|
|
114
|
+
}).formatToParts(n.toDate()).find(function (c) {
|
|
115
|
+
return c.type === "timeZoneName";
|
|
116
|
+
})) == null ? void 0 : o.value) == null ? void 0 : s.trim();
|
|
117
|
+
return f ? /^(gmt|utc)/i.test(f) ? O(f, r) : f : r;
|
|
118
|
+
} catch (_unused5) {
|
|
119
|
+
return r;
|
|
89
120
|
}
|
|
90
121
|
},
|
|
91
|
-
|
|
92
|
-
var
|
|
122
|
+
F = function F(t, e) {
|
|
123
|
+
var n = e.year();
|
|
93
124
|
return Array.from(new Set(Array.from({
|
|
94
125
|
length: 12
|
|
95
|
-
}, function (
|
|
96
|
-
var
|
|
97
|
-
|
|
126
|
+
}, function (r, o) {
|
|
127
|
+
var s = "".concat(o + 1).padStart(2, "0"),
|
|
128
|
+
a = "".concat(n, "-").concat(s, "-15 12:00:00");
|
|
129
|
+
return typeof i.tz == "function" ? i.tz(a, t).utcOffset() : i.utc(a).tz(t).utcOffset();
|
|
98
130
|
})));
|
|
99
131
|
},
|
|
100
|
-
|
|
101
|
-
var
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return
|
|
132
|
+
$ = function $(t, e) {
|
|
133
|
+
var n = T(t),
|
|
134
|
+
r = h(e).tz(n),
|
|
135
|
+
o = F(n, r);
|
|
136
|
+
return o.length <= 1 ? false : r.utcOffset() > Math.min.apply(Math, _toConsumableArray(o));
|
|
105
137
|
},
|
|
106
|
-
|
|
138
|
+
M = function M(t) {
|
|
107
139
|
var e = t.toLowerCase().split("-")[0];
|
|
108
|
-
return
|
|
140
|
+
return u[e] || u["default"];
|
|
109
141
|
},
|
|
110
|
-
|
|
142
|
+
N = function N(t) {
|
|
111
143
|
var _t$showDaylightSaving;
|
|
112
144
|
return typeof t.showDaylightSavingLabel == "boolean" ? t.showDaylightSavingLabel : (_t$showDaylightSaving = t.showDaylightSavingMarker) !== null && _t$showDaylightSaving !== void 0 ? _t$showDaylightSaving : true;
|
|
113
145
|
},
|
|
114
|
-
|
|
146
|
+
E = function E() {
|
|
115
147
|
var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
116
|
-
var e =
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
148
|
+
var e = p(t.locale, t.supportedLocales),
|
|
149
|
+
n = T(t.timeZone),
|
|
150
|
+
r = h(t.value).tz(n),
|
|
151
|
+
o = A(n, e, r),
|
|
152
|
+
s = y(r.format("Z")),
|
|
153
|
+
a = $(n, r),
|
|
154
|
+
f = a ? M(e) : "",
|
|
155
|
+
c = N(t),
|
|
156
|
+
L = a && c ? "".concat(o, " - ").concat(f) : o;
|
|
125
157
|
return {
|
|
126
|
-
formattedValue:
|
|
158
|
+
formattedValue: r.format(t.format || z),
|
|
127
159
|
locale: e,
|
|
128
|
-
timeZone:
|
|
129
|
-
timeZoneName:
|
|
130
|
-
timeZoneLabel:
|
|
131
|
-
offsetLabel:
|
|
132
|
-
offsetMinutes:
|
|
133
|
-
isDaylightSavingTime:
|
|
134
|
-
daylightSavingLabel:
|
|
160
|
+
timeZone: n,
|
|
161
|
+
timeZoneName: o,
|
|
162
|
+
timeZoneLabel: L,
|
|
163
|
+
offsetLabel: s,
|
|
164
|
+
offsetMinutes: r.utcOffset(),
|
|
165
|
+
isDaylightSavingTime: a,
|
|
166
|
+
daylightSavingLabel: f
|
|
135
167
|
};
|
|
136
168
|
};
|
|
137
|
-
exports.getClientTimeZone =
|
|
138
|
-
exports.getTimeZoneDisplayInfo =
|
|
139
|
-
exports.isDaylightSavingTime =
|
|
140
|
-
exports.normalizeLocaleCode =
|
|
169
|
+
exports.getClientTimeZone = m;
|
|
170
|
+
exports.getTimeZoneDisplayInfo = E;
|
|
171
|
+
exports.isDaylightSavingTime = $;
|
|
172
|
+
exports.normalizeLocaleCode = p;
|
|
@@ -1,81 +1,109 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import i from "dayjs";
|
|
2
|
+
import D from "dayjs/plugin/utc";
|
|
3
3
|
import w from "dayjs/plugin/timezone";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
4
|
+
i.extend(D);
|
|
5
|
+
i.extend(w);
|
|
6
|
+
const l = "zh-CN", z = "YYYY.MM.DD HH:mm:ss", v = "UTC", u = {
|
|
7
7
|
zh: "夏令时",
|
|
8
8
|
default: "DST"
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
|
+
var d, g;
|
|
11
|
+
const S = (g = (d = i.tz) == null ? void 0 : d.guess) == null ? void 0 : g.bind(i.tz), Z = () => {
|
|
12
|
+
if (!(typeof Intl > "u" || typeof Intl.DateTimeFormat != "function"))
|
|
13
|
+
try {
|
|
14
|
+
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
15
|
+
} catch {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
}, C = (t) => {
|
|
19
|
+
if (!t) return !1;
|
|
20
|
+
if (typeof Intl > "u" || typeof Intl.DateTimeFormat != "function") return !0;
|
|
21
|
+
try {
|
|
22
|
+
return new Intl.DateTimeFormat(void 0, { timeZone: t }), !0;
|
|
23
|
+
} catch {
|
|
24
|
+
return !1;
|
|
25
|
+
}
|
|
26
|
+
}, I = () => {
|
|
27
|
+
var n;
|
|
28
|
+
const t = (n = i.tz) == null ? void 0 : n.guess, e = typeof t == "function" ? t : S;
|
|
29
|
+
try {
|
|
30
|
+
return e == null ? void 0 : e();
|
|
31
|
+
} catch {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
}, m = () => {
|
|
35
|
+
const t = I() || Z();
|
|
36
|
+
return C(t) ? t : v;
|
|
37
|
+
}, b = () => {
|
|
10
38
|
var t;
|
|
11
|
-
return typeof window < "u" && ((t = window.navigator) != null && t.language) ? window.navigator.language :
|
|
12
|
-
},
|
|
13
|
-
const
|
|
39
|
+
return typeof window < "u" && ((t = window.navigator) != null && t.language) ? window.navigator.language : l;
|
|
40
|
+
}, p = (t, e = []) => {
|
|
41
|
+
const r = t || b() || l, o = r.toLowerCase();
|
|
14
42
|
if (!e.length)
|
|
15
|
-
return
|
|
16
|
-
const
|
|
17
|
-
if (
|
|
18
|
-
const
|
|
19
|
-
return
|
|
20
|
-
}, g = (t) => {
|
|
21
|
-
if (l.isDayjs(t)) return t;
|
|
22
|
-
if (t == null || t === "") return l();
|
|
23
|
-
const e = l(t);
|
|
24
|
-
return e.isValid() ? e : l();
|
|
43
|
+
return o === "en" ? "en-US" : o === "zh" || o === "zh-cn" ? l : r;
|
|
44
|
+
const s = e.find((c) => c.toLowerCase() === o);
|
|
45
|
+
if (s) return s;
|
|
46
|
+
const a = o.split("-")[0], f = e.find((c) => c.toLowerCase().split("-")[0] === a);
|
|
47
|
+
return f || (a === "en" ? e.find((c) => c.toLowerCase().startsWith("en-")) || r : a === "zh" ? e.find((c) => c.toLowerCase().startsWith("zh-")) || l : r);
|
|
25
48
|
}, h = (t) => {
|
|
26
|
-
if (
|
|
49
|
+
if (i.isDayjs(t)) return t;
|
|
50
|
+
if (t == null || t === "") return i();
|
|
51
|
+
const e = i(t);
|
|
52
|
+
return e.isValid() ? e : i();
|
|
53
|
+
}, T = (t) => {
|
|
54
|
+
if (!t) return m();
|
|
27
55
|
try {
|
|
28
56
|
return new Intl.DateTimeFormat(void 0, { timeZone: t }), t;
|
|
29
57
|
} catch {
|
|
30
|
-
return
|
|
58
|
+
return m();
|
|
31
59
|
}
|
|
32
|
-
},
|
|
33
|
-
const
|
|
34
|
-
if (!
|
|
35
|
-
const
|
|
36
|
-
return `UTC${
|
|
37
|
-
},
|
|
38
|
-
var
|
|
39
|
-
const
|
|
60
|
+
}, y = (t) => `UTC${t}`, O = (t, e) => {
|
|
61
|
+
const n = t.match(/([+-]\d{1,2})(?::?(\d{2}))?/) || [];
|
|
62
|
+
if (!n[1]) return e;
|
|
63
|
+
const r = n[1].startsWith("-") ? "-" : "+", o = n[1].replace(/[+-]/, "").padStart(2, "0"), s = n[2] || "00";
|
|
64
|
+
return `UTC${r}${o}:${s}`;
|
|
65
|
+
}, A = (t, e, n) => {
|
|
66
|
+
var o, s;
|
|
67
|
+
const r = y(n.format("Z"));
|
|
40
68
|
try {
|
|
41
|
-
const
|
|
42
|
-
return
|
|
69
|
+
const a = Intl.DateTimeFormat.supportedLocalesOf([e])[0] || e, f = (s = (o = new Intl.DateTimeFormat(a, { timeZone: t, timeZoneName: "long" }).formatToParts(n.toDate()).find((c) => c.type === "timeZoneName")) == null ? void 0 : o.value) == null ? void 0 : s.trim();
|
|
70
|
+
return f ? /^(gmt|utc)/i.test(f) ? O(f, r) : f : r;
|
|
43
71
|
} catch {
|
|
44
|
-
return
|
|
72
|
+
return r;
|
|
45
73
|
}
|
|
46
|
-
},
|
|
47
|
-
const
|
|
74
|
+
}, F = (t, e) => {
|
|
75
|
+
const n = e.year();
|
|
48
76
|
return Array.from(
|
|
49
77
|
new Set(
|
|
50
|
-
Array.from({ length: 12 }, (
|
|
51
|
-
const
|
|
52
|
-
return
|
|
78
|
+
Array.from({ length: 12 }, (r, o) => {
|
|
79
|
+
const s = `${o + 1}`.padStart(2, "0"), a = `${n}-${s}-15 12:00:00`;
|
|
80
|
+
return typeof i.tz == "function" ? i.tz(a, t).utcOffset() : i.utc(a).tz(t).utcOffset();
|
|
53
81
|
})
|
|
54
82
|
)
|
|
55
83
|
);
|
|
56
|
-
},
|
|
57
|
-
const
|
|
58
|
-
return
|
|
59
|
-
},
|
|
84
|
+
}, $ = (t, e) => {
|
|
85
|
+
const n = T(t), r = h(e).tz(n), o = F(n, r);
|
|
86
|
+
return o.length <= 1 ? !1 : r.utcOffset() > Math.min(...o);
|
|
87
|
+
}, M = (t) => {
|
|
60
88
|
const e = t.toLowerCase().split("-")[0];
|
|
61
|
-
return
|
|
62
|
-
},
|
|
63
|
-
const e =
|
|
89
|
+
return u[e] || u.default;
|
|
90
|
+
}, N = (t) => typeof t.showDaylightSavingLabel == "boolean" ? t.showDaylightSavingLabel : t.showDaylightSavingMarker ?? !0, E = (t = {}) => {
|
|
91
|
+
const e = p(t.locale, t.supportedLocales), n = T(t.timeZone), r = h(t.value).tz(n), o = A(n, e, r), s = y(r.format("Z")), a = $(n, r), f = a ? M(e) : "", c = N(t), L = a && c ? `${o} - ${f}` : o;
|
|
64
92
|
return {
|
|
65
|
-
formattedValue:
|
|
93
|
+
formattedValue: r.format(t.format || z),
|
|
66
94
|
locale: e,
|
|
67
|
-
timeZone:
|
|
68
|
-
timeZoneName:
|
|
69
|
-
timeZoneLabel:
|
|
70
|
-
offsetLabel:
|
|
71
|
-
offsetMinutes:
|
|
72
|
-
isDaylightSavingTime:
|
|
73
|
-
daylightSavingLabel:
|
|
95
|
+
timeZone: n,
|
|
96
|
+
timeZoneName: o,
|
|
97
|
+
timeZoneLabel: L,
|
|
98
|
+
offsetLabel: s,
|
|
99
|
+
offsetMinutes: r.utcOffset(),
|
|
100
|
+
isDaylightSavingTime: a,
|
|
101
|
+
daylightSavingLabel: f
|
|
74
102
|
};
|
|
75
103
|
};
|
|
76
104
|
export {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
105
|
+
m as getClientTimeZone,
|
|
106
|
+
E as getTimeZoneDisplayInfo,
|
|
107
|
+
$ as isDaylightSavingTime,
|
|
108
|
+
p as normalizeLocaleCode
|
|
81
109
|
};
|
|
Binary file
|