@kong-ui-public/analytics-utilities 10.1.0 → 10.1.1-pr.2292.3197d72a1.0
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/types/filters.d.ts +3 -0
- package/dist/types/filters.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types/explore/all.d.ts +6 -3
- package/dist/types/types/explore/all.d.ts.map +1 -1
- package/dist/types/types/query-bridge.d.ts +1 -0
- package/dist/types/types/query-bridge.d.ts.map +1 -1
- package/dist/vitals-utilities.cjs +1 -1
- package/dist/vitals-utilities.cjs.map +1 -1
- package/dist/vitals-utilities.es.js +358 -354
- package/dist/vitals-utilities.es.js.map +1 -1
- package/dist/vitals-utilities.umd.js +1 -1
- package/dist/vitals-utilities.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var _a = Object.defineProperty;
|
|
2
2
|
var wa = (e, t, r) => t in e ? _a(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var b = (e, t, r) => wa(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
-
const
|
|
4
|
+
const Vs = 3e4;
|
|
5
5
|
var m = /* @__PURE__ */ ((e) => (e.FIFTEEN_MIN = "15m", e.ONE_HOUR = "1h", e.SIX_HOUR = "6h", e.TWELVE_HOUR = "12h", e.ONE_DAY = "24h", e.SEVEN_DAY = "7d", e.THIRTY_DAY = "30d", e.CURRENT_WEEK = "current_week", e.CURRENT_MONTH = "current_month", e.CURRENT_QUARTER = "current_quarter", e.PREVIOUS_WEEK = "previous_week", e.PREVIOUS_MONTH = "previous_month", e.PREVIOUS_QUARTER = "previous_quarter", e))(m || {});
|
|
6
|
-
const
|
|
6
|
+
const Xs = [
|
|
7
7
|
"horizontal_bar",
|
|
8
8
|
"vertical_bar",
|
|
9
9
|
"timeseries_line",
|
|
@@ -11,7 +11,7 @@ const $s = [
|
|
|
11
11
|
"timeseries_bar",
|
|
12
12
|
"donut",
|
|
13
13
|
"single_value"
|
|
14
|
-
], lr = ["in", "not_in", "selector"],
|
|
14
|
+
], lr = ["in", "not_in", "selector"], Qs = ["=", "!="], Zs = ["=", "!=", "<", ">", "<=", ">="], dr = ["empty", "not_empty"], Bs = ["starts_with", "ends_with"], Ks = ["absolute", "relative"], fr = [
|
|
15
15
|
"15m",
|
|
16
16
|
"1h",
|
|
17
17
|
"6h",
|
|
@@ -37,7 +37,7 @@ const $s = [
|
|
|
37
37
|
"daily",
|
|
38
38
|
"weekly",
|
|
39
39
|
"trend"
|
|
40
|
-
],
|
|
40
|
+
], ce = (e) => e.filter((t) => t !== "time"), Ee = [
|
|
41
41
|
"api",
|
|
42
42
|
"api_product",
|
|
43
43
|
"api_product_version",
|
|
@@ -50,7 +50,7 @@ const $s = [
|
|
|
50
50
|
"status_code",
|
|
51
51
|
"status_code_grouped",
|
|
52
52
|
"time"
|
|
53
|
-
],
|
|
53
|
+
], re = ce(Ee), Be = [
|
|
54
54
|
"active_services",
|
|
55
55
|
"request_count",
|
|
56
56
|
"request_per_minute",
|
|
@@ -66,7 +66,7 @@ const $s = [
|
|
|
66
66
|
"response_source",
|
|
67
67
|
"data_plane_node_version",
|
|
68
68
|
"realm"
|
|
69
|
-
],
|
|
69
|
+
], ne = ce(Ke), hr = [
|
|
70
70
|
...Be,
|
|
71
71
|
"response_latency_p99",
|
|
72
72
|
"response_latency_p95",
|
|
@@ -107,7 +107,7 @@ const $s = [
|
|
|
107
107
|
"status_code",
|
|
108
108
|
"status_code_grouped",
|
|
109
109
|
"ai_plugin"
|
|
110
|
-
],
|
|
110
|
+
], ae = ce(Je), mr = [
|
|
111
111
|
"total_tokens",
|
|
112
112
|
"prompt_tokens",
|
|
113
113
|
"completion_tokens",
|
|
@@ -153,7 +153,7 @@ const $s = [
|
|
|
153
153
|
"upstream_uri",
|
|
154
154
|
"upstream_status_code_grouped",
|
|
155
155
|
"websocket"
|
|
156
|
-
],
|
|
156
|
+
], Ta = ce(ba), Da = [
|
|
157
157
|
"auth_type",
|
|
158
158
|
"client_ip",
|
|
159
159
|
"country_code",
|
|
@@ -169,7 +169,7 @@ const $s = [
|
|
|
169
169
|
"service_protocol",
|
|
170
170
|
"trace_id",
|
|
171
171
|
"upstream_uri"
|
|
172
|
-
],
|
|
172
|
+
], Js = Da, Oa = [
|
|
173
173
|
"ai_count",
|
|
174
174
|
"latencies_response_ms",
|
|
175
175
|
"latencies_upstream_ms",
|
|
@@ -179,18 +179,18 @@ const $s = [
|
|
|
179
179
|
"response_header_content_length",
|
|
180
180
|
"status_code",
|
|
181
181
|
"upstream_status_code"
|
|
182
|
-
],
|
|
182
|
+
], Sa = ce(Oa), eo = [
|
|
183
183
|
"15M",
|
|
184
184
|
"1H",
|
|
185
185
|
"6H",
|
|
186
186
|
"12H",
|
|
187
187
|
"24H",
|
|
188
188
|
"7D"
|
|
189
|
-
], to = ["basic", "api_usage", "llm_usage"],
|
|
190
|
-
basic: new Set(
|
|
191
|
-
api_usage: new Set(
|
|
192
|
-
llm_usage: new Set(
|
|
193
|
-
}, ro = (e, t) => t.filter((r) =>
|
|
189
|
+
], to = ["basic", "api_usage", "llm_usage"], Ma = {
|
|
190
|
+
basic: new Set(re),
|
|
191
|
+
api_usage: new Set(ne),
|
|
192
|
+
llm_usage: new Set(ae)
|
|
193
|
+
}, ro = (e, t) => t.filter((r) => Ma[e].has(r.field)), va = [
|
|
194
194
|
"horizontal_bar",
|
|
195
195
|
"vertical_bar",
|
|
196
196
|
"gauge",
|
|
@@ -355,7 +355,7 @@ const $s = [
|
|
|
355
355
|
},
|
|
356
356
|
required: ["type"],
|
|
357
357
|
additionalProperties: !1
|
|
358
|
-
},
|
|
358
|
+
}, xa = {
|
|
359
359
|
type: "object",
|
|
360
360
|
properties: {
|
|
361
361
|
tz: {
|
|
@@ -379,7 +379,7 @@ const $s = [
|
|
|
379
379
|
"time_range"
|
|
380
380
|
],
|
|
381
381
|
additionalProperties: !1
|
|
382
|
-
},
|
|
382
|
+
}, Ea = {
|
|
383
383
|
type: "object",
|
|
384
384
|
description: "A duration representing an exact start and end time.",
|
|
385
385
|
properties: {
|
|
@@ -415,8 +415,8 @@ const $s = [
|
|
|
415
415
|
type: "object",
|
|
416
416
|
description: "The time range to query.",
|
|
417
417
|
anyOf: [
|
|
418
|
-
|
|
419
|
-
|
|
418
|
+
xa,
|
|
419
|
+
Ea
|
|
420
420
|
],
|
|
421
421
|
default: {
|
|
422
422
|
type: "relative",
|
|
@@ -509,7 +509,7 @@ const $s = [
|
|
|
509
509
|
},
|
|
510
510
|
metrics: tt(hr),
|
|
511
511
|
dimensions: rt(Ke),
|
|
512
|
-
filters: Pe(
|
|
512
|
+
filters: Pe(ne),
|
|
513
513
|
...et
|
|
514
514
|
},
|
|
515
515
|
required: ["datasource"],
|
|
@@ -526,7 +526,7 @@ const $s = [
|
|
|
526
526
|
},
|
|
527
527
|
metrics: tt(Be),
|
|
528
528
|
dimensions: rt(Ee),
|
|
529
|
-
filters: Pe(
|
|
529
|
+
filters: Pe(re),
|
|
530
530
|
...et
|
|
531
531
|
},
|
|
532
532
|
required: ["datasource"],
|
|
@@ -543,7 +543,7 @@ const $s = [
|
|
|
543
543
|
},
|
|
544
544
|
metrics: tt(mr),
|
|
545
545
|
dimensions: rt(Je),
|
|
546
|
-
filters: Pe(
|
|
546
|
+
filters: Pe(ae),
|
|
547
547
|
...et
|
|
548
548
|
},
|
|
549
549
|
required: ["datasource"],
|
|
@@ -618,7 +618,7 @@ const $s = [
|
|
|
618
618
|
},
|
|
619
619
|
required: ["definition", "layout"],
|
|
620
620
|
additionalProperties: !1
|
|
621
|
-
},
|
|
621
|
+
}, Pa = {
|
|
622
622
|
type: "object",
|
|
623
623
|
properties: {
|
|
624
624
|
tiles: {
|
|
@@ -643,7 +643,7 @@ const $s = [
|
|
|
643
643
|
required: ["cols", "rows"],
|
|
644
644
|
additionalProperties: !1
|
|
645
645
|
},
|
|
646
|
-
global_filters: Pe([.../* @__PURE__ */ new Set([...
|
|
646
|
+
global_filters: Pe([.../* @__PURE__ */ new Set([...ne, ...re, ...ae])])
|
|
647
647
|
},
|
|
648
648
|
required: ["tiles"],
|
|
649
649
|
additionalProperties: !1
|
|
@@ -652,8 +652,8 @@ const $s = [
|
|
|
652
652
|
aiQuerySchema: xr,
|
|
653
653
|
barChartSchema: _r,
|
|
654
654
|
basicQuerySchema: vr,
|
|
655
|
-
dashboardConfigSchema:
|
|
656
|
-
dashboardTileTypes:
|
|
655
|
+
dashboardConfigSchema: Pa,
|
|
656
|
+
dashboardTileTypes: va,
|
|
657
657
|
donutChartSchema: Tr,
|
|
658
658
|
exploreV4QuerySchema: Mr,
|
|
659
659
|
gaugeChartSchema: br,
|
|
@@ -691,7 +691,7 @@ const $s = [
|
|
|
691
691
|
additionalProperties: {
|
|
692
692
|
type: "string"
|
|
693
693
|
}
|
|
694
|
-
},
|
|
694
|
+
}, Na = {
|
|
695
695
|
type: "object",
|
|
696
696
|
properties: {
|
|
697
697
|
type: {
|
|
@@ -704,7 +704,7 @@ const $s = [
|
|
|
704
704
|
},
|
|
705
705
|
required: ["type", "id"],
|
|
706
706
|
additionalProperties: !1
|
|
707
|
-
},
|
|
707
|
+
}, Ca = {
|
|
708
708
|
type: "object",
|
|
709
709
|
properties: {
|
|
710
710
|
type: {
|
|
@@ -721,7 +721,7 @@ const $s = [
|
|
|
721
721
|
},
|
|
722
722
|
required: ["type"],
|
|
723
723
|
additionalProperties: !1
|
|
724
|
-
},
|
|
724
|
+
}, Ia = {
|
|
725
725
|
type: "object",
|
|
726
726
|
properties: {
|
|
727
727
|
type: {
|
|
@@ -744,7 +744,7 @@ const $s = [
|
|
|
744
744
|
},
|
|
745
745
|
required: ["type"],
|
|
746
746
|
additionalProperties: !1
|
|
747
|
-
},
|
|
747
|
+
}, ka = {
|
|
748
748
|
type: "object",
|
|
749
749
|
properties: {
|
|
750
750
|
type: {
|
|
@@ -767,7 +767,7 @@ const $s = [
|
|
|
767
767
|
},
|
|
768
768
|
required: ["type"],
|
|
769
769
|
additionalProperties: !1
|
|
770
|
-
},
|
|
770
|
+
}, Ya = {
|
|
771
771
|
type: "object",
|
|
772
772
|
properties: {
|
|
773
773
|
type: {
|
|
@@ -779,7 +779,7 @@ const $s = [
|
|
|
779
779
|
},
|
|
780
780
|
required: ["type"],
|
|
781
781
|
additionalProperties: !1
|
|
782
|
-
},
|
|
782
|
+
}, qa = {
|
|
783
783
|
type: "object",
|
|
784
784
|
properties: {
|
|
785
785
|
chart_title: V,
|
|
@@ -797,7 +797,7 @@ const $s = [
|
|
|
797
797
|
},
|
|
798
798
|
required: ["type"],
|
|
799
799
|
additionalProperties: !1
|
|
800
|
-
},
|
|
800
|
+
}, Ra = {
|
|
801
801
|
type: "object",
|
|
802
802
|
properties: {
|
|
803
803
|
chart_title: V,
|
|
@@ -817,7 +817,7 @@ const $s = [
|
|
|
817
817
|
},
|
|
818
818
|
required: ["type"],
|
|
819
819
|
additionalProperties: !1
|
|
820
|
-
},
|
|
820
|
+
}, Ha = {
|
|
821
821
|
type: "object",
|
|
822
822
|
properties: {
|
|
823
823
|
type: {
|
|
@@ -831,7 +831,7 @@ const $s = [
|
|
|
831
831
|
},
|
|
832
832
|
required: ["type"],
|
|
833
833
|
additionalProperties: !1
|
|
834
|
-
},
|
|
834
|
+
}, ja = {
|
|
835
835
|
type: "object",
|
|
836
836
|
properties: {
|
|
837
837
|
tz: {
|
|
@@ -855,7 +855,7 @@ const $s = [
|
|
|
855
855
|
"time_range"
|
|
856
856
|
],
|
|
857
857
|
additionalProperties: !1
|
|
858
|
-
},
|
|
858
|
+
}, Aa = {
|
|
859
859
|
type: "object",
|
|
860
860
|
description: "A duration representing an exact start and end time.",
|
|
861
861
|
properties: {
|
|
@@ -891,8 +891,8 @@ const $s = [
|
|
|
891
891
|
type: "object",
|
|
892
892
|
description: "The time range to query.",
|
|
893
893
|
anyOf: [
|
|
894
|
-
|
|
895
|
-
|
|
894
|
+
ja,
|
|
895
|
+
Aa
|
|
896
896
|
],
|
|
897
897
|
default: {
|
|
898
898
|
type: "relative",
|
|
@@ -973,7 +973,7 @@ const $s = [
|
|
|
973
973
|
}
|
|
974
974
|
]
|
|
975
975
|
}
|
|
976
|
-
}),
|
|
976
|
+
}), Ga = {
|
|
977
977
|
type: "object",
|
|
978
978
|
description: "A query to launch at the advanced explore API",
|
|
979
979
|
properties: {
|
|
@@ -985,12 +985,12 @@ const $s = [
|
|
|
985
985
|
},
|
|
986
986
|
metrics: at(hr),
|
|
987
987
|
dimensions: it(Ke),
|
|
988
|
-
filters: Ne(
|
|
988
|
+
filters: Ne(ne),
|
|
989
989
|
...nt
|
|
990
990
|
},
|
|
991
991
|
required: ["datasource"],
|
|
992
992
|
additionalProperties: !1
|
|
993
|
-
},
|
|
993
|
+
}, Fa = {
|
|
994
994
|
type: "object",
|
|
995
995
|
description: "A query to launch at the basic explore API",
|
|
996
996
|
properties: {
|
|
@@ -1002,12 +1002,12 @@ const $s = [
|
|
|
1002
1002
|
},
|
|
1003
1003
|
metrics: at(Be),
|
|
1004
1004
|
dimensions: it(Ee),
|
|
1005
|
-
filters: Ne(
|
|
1005
|
+
filters: Ne(re),
|
|
1006
1006
|
...nt
|
|
1007
1007
|
},
|
|
1008
1008
|
required: ["datasource"],
|
|
1009
1009
|
additionalProperties: !1
|
|
1010
|
-
},
|
|
1010
|
+
}, Wa = {
|
|
1011
1011
|
type: "object",
|
|
1012
1012
|
description: "A query to launch at the AI explore API",
|
|
1013
1013
|
properties: {
|
|
@@ -1019,33 +1019,33 @@ const $s = [
|
|
|
1019
1019
|
},
|
|
1020
1020
|
metrics: at(mr),
|
|
1021
1021
|
dimensions: it(Je),
|
|
1022
|
-
filters: Ne(
|
|
1022
|
+
filters: Ne(ae),
|
|
1023
1023
|
...nt
|
|
1024
1024
|
},
|
|
1025
1025
|
required: ["datasource"],
|
|
1026
1026
|
additionalProperties: !1
|
|
1027
|
-
},
|
|
1028
|
-
anyOf: [
|
|
1029
|
-
},
|
|
1027
|
+
}, La = {
|
|
1028
|
+
anyOf: [Ga, Fa, Wa]
|
|
1029
|
+
}, Ua = {
|
|
1030
1030
|
type: "object",
|
|
1031
1031
|
properties: {
|
|
1032
|
-
query:
|
|
1032
|
+
query: La,
|
|
1033
1033
|
chart: {
|
|
1034
1034
|
anyOf: [
|
|
1035
|
-
Pa,
|
|
1036
1035
|
Ca,
|
|
1036
|
+
ka,
|
|
1037
|
+
Ya,
|
|
1037
1038
|
Ia,
|
|
1039
|
+
Ra,
|
|
1040
|
+
qa,
|
|
1038
1041
|
Na,
|
|
1039
|
-
|
|
1040
|
-
ka,
|
|
1041
|
-
Ea,
|
|
1042
|
-
Ra
|
|
1042
|
+
Ha
|
|
1043
1043
|
]
|
|
1044
1044
|
}
|
|
1045
1045
|
},
|
|
1046
1046
|
required: ["query", "chart"],
|
|
1047
1047
|
additionalProperties: !1
|
|
1048
|
-
},
|
|
1048
|
+
}, za = {
|
|
1049
1049
|
type: "object",
|
|
1050
1050
|
properties: {
|
|
1051
1051
|
position: {
|
|
@@ -1082,15 +1082,15 @@ const $s = [
|
|
|
1082
1082
|
},
|
|
1083
1083
|
required: ["position", "size"],
|
|
1084
1084
|
additionalProperties: !1
|
|
1085
|
-
},
|
|
1085
|
+
}, $a = {
|
|
1086
1086
|
type: "object",
|
|
1087
1087
|
properties: {
|
|
1088
1088
|
type: {
|
|
1089
1089
|
type: "string",
|
|
1090
1090
|
enum: ["chart"]
|
|
1091
1091
|
},
|
|
1092
|
-
definition:
|
|
1093
|
-
layout:
|
|
1092
|
+
definition: Ua,
|
|
1093
|
+
layout: za,
|
|
1094
1094
|
id: {
|
|
1095
1095
|
type: "string",
|
|
1096
1096
|
description: "Unique identifier for the tile. If not provided, one will be generated."
|
|
@@ -1103,17 +1103,20 @@ const $s = [
|
|
|
1103
1103
|
properties: {
|
|
1104
1104
|
tiles: {
|
|
1105
1105
|
type: "array",
|
|
1106
|
-
items:
|
|
1106
|
+
items: $a
|
|
1107
1107
|
},
|
|
1108
1108
|
tile_height: {
|
|
1109
1109
|
type: "number",
|
|
1110
1110
|
description: "Height of each tile in pixels."
|
|
1111
1111
|
},
|
|
1112
|
-
preset_filters: Ne([.../* @__PURE__ */ new Set([...
|
|
1112
|
+
preset_filters: Ne([.../* @__PURE__ */ new Set([...ne, ...re, ...ae])])
|
|
1113
1113
|
},
|
|
1114
1114
|
required: ["tiles"],
|
|
1115
1115
|
additionalProperties: !1
|
|
1116
|
-
},
|
|
1116
|
+
}, so = (e) => {
|
|
1117
|
+
const t = [];
|
|
1118
|
+
return re.includes(e) && t.push("basic"), ne.includes(e) && t.push("api_usage"), ae.includes(e) && t.push("llm_usage"), (Ta.includes(e) || Sa.includes(e)) && t.push("requests"), t;
|
|
1119
|
+
}, Yr = 6048e5, Va = 864e5, Xa = 60, Qa = 3600, Lt = Symbol.for("constructDateFrom");
|
|
1117
1120
|
function I(e, t) {
|
|
1118
1121
|
return typeof e == "function" ? e(t) : e && typeof e == "object" && Lt in e ? e[Lt](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
1119
1122
|
}
|
|
@@ -1124,7 +1127,7 @@ function Ut(e, t, r) {
|
|
|
1124
1127
|
const n = O(e, r == null ? void 0 : r.in);
|
|
1125
1128
|
return isNaN(t) ? I(e, NaN) : (n.setDate(n.getDate() + t), n);
|
|
1126
1129
|
}
|
|
1127
|
-
function
|
|
1130
|
+
function Za(e, t, r) {
|
|
1128
1131
|
const n = O(e, r == null ? void 0 : r.in);
|
|
1129
1132
|
if (isNaN(t)) return I(e, NaN);
|
|
1130
1133
|
const i = n.getDate(), o = I(e, n.getTime());
|
|
@@ -1136,9 +1139,9 @@ function Xa(e, t, r) {
|
|
|
1136
1139
|
i
|
|
1137
1140
|
), n);
|
|
1138
1141
|
}
|
|
1139
|
-
let
|
|
1142
|
+
let Ba = {};
|
|
1140
1143
|
function fe() {
|
|
1141
|
-
return
|
|
1144
|
+
return Ba;
|
|
1142
1145
|
}
|
|
1143
1146
|
function H(e, t) {
|
|
1144
1147
|
var d, h, f, _;
|
|
@@ -1148,7 +1151,7 @@ function H(e, t) {
|
|
|
1148
1151
|
function De(e, t) {
|
|
1149
1152
|
return H(e, { ...t, weekStartsOn: 1 });
|
|
1150
1153
|
}
|
|
1151
|
-
function
|
|
1154
|
+
function qr(e, t) {
|
|
1152
1155
|
const r = O(e, t == null ? void 0 : t.in), n = r.getFullYear(), i = I(r, 0);
|
|
1153
1156
|
i.setFullYear(n + 1, 0, 4), i.setHours(0, 0, 0, 0);
|
|
1154
1157
|
const o = De(i), c = I(r, 0);
|
|
@@ -1170,7 +1173,7 @@ function zt(e) {
|
|
|
1170
1173
|
);
|
|
1171
1174
|
return r.setUTCFullYear(t.getFullYear()), +e - +r;
|
|
1172
1175
|
}
|
|
1173
|
-
function
|
|
1176
|
+
function Ka(e, ...t) {
|
|
1174
1177
|
const r = I.bind(
|
|
1175
1178
|
null,
|
|
1176
1179
|
t.find((n) => typeof n == "object")
|
|
@@ -1181,33 +1184,33 @@ function Oe(e, t) {
|
|
|
1181
1184
|
const r = O(e, t == null ? void 0 : t.in);
|
|
1182
1185
|
return r.setHours(0, 0, 0, 0), r;
|
|
1183
1186
|
}
|
|
1184
|
-
function
|
|
1185
|
-
const [n, i] =
|
|
1187
|
+
function Ja(e, t, r) {
|
|
1188
|
+
const [n, i] = Ka(
|
|
1186
1189
|
r == null ? void 0 : r.in,
|
|
1187
1190
|
e,
|
|
1188
1191
|
t
|
|
1189
1192
|
), o = Oe(n), c = Oe(i), d = +o - zt(o), h = +c - zt(c);
|
|
1190
|
-
return Math.round((d - h) /
|
|
1193
|
+
return Math.round((d - h) / Va);
|
|
1191
1194
|
}
|
|
1192
|
-
function
|
|
1193
|
-
const r =
|
|
1195
|
+
function ei(e, t) {
|
|
1196
|
+
const r = qr(e, t), n = I(e, 0);
|
|
1194
1197
|
return n.setFullYear(r, 0, 4), n.setHours(0, 0, 0, 0), De(n);
|
|
1195
1198
|
}
|
|
1196
|
-
function
|
|
1199
|
+
function ti(e) {
|
|
1197
1200
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
1198
1201
|
}
|
|
1199
|
-
function
|
|
1200
|
-
return !(!
|
|
1202
|
+
function ri(e) {
|
|
1203
|
+
return !(!ti(e) && typeof e != "number" || isNaN(+O(e)));
|
|
1201
1204
|
}
|
|
1202
1205
|
function ee(e, t) {
|
|
1203
1206
|
const r = O(e, t == null ? void 0 : t.in);
|
|
1204
1207
|
return r.setDate(1), r.setHours(0, 0, 0, 0), r;
|
|
1205
1208
|
}
|
|
1206
|
-
function
|
|
1209
|
+
function ni(e, t) {
|
|
1207
1210
|
const r = O(e, t == null ? void 0 : t.in);
|
|
1208
1211
|
return r.setFullYear(r.getFullYear(), 0, 1), r.setHours(0, 0, 0, 0), r;
|
|
1209
1212
|
}
|
|
1210
|
-
const
|
|
1213
|
+
const ai = {
|
|
1211
1214
|
lessThanXSeconds: {
|
|
1212
1215
|
one: "less than a second",
|
|
1213
1216
|
other: "less than {{count}} seconds"
|
|
@@ -1269,9 +1272,9 @@ const ri = {
|
|
|
1269
1272
|
one: "almost 1 year",
|
|
1270
1273
|
other: "almost {{count}} years"
|
|
1271
1274
|
}
|
|
1272
|
-
},
|
|
1275
|
+
}, ii = (e, t, r) => {
|
|
1273
1276
|
let n;
|
|
1274
|
-
const i =
|
|
1277
|
+
const i = ai[e];
|
|
1275
1278
|
return typeof i == "string" ? n = i : t === 1 ? n = i.one : n = i.other.replace("{{count}}", t.toString()), r != null && r.addSuffix ? r.comparison && r.comparison > 0 ? "in " + n : n + " ago" : n;
|
|
1276
1279
|
};
|
|
1277
1280
|
function Le(e) {
|
|
@@ -1280,43 +1283,43 @@ function Le(e) {
|
|
|
1280
1283
|
return e.formats[r] || e.formats[e.defaultWidth];
|
|
1281
1284
|
};
|
|
1282
1285
|
}
|
|
1283
|
-
const
|
|
1286
|
+
const si = {
|
|
1284
1287
|
full: "EEEE, MMMM do, y",
|
|
1285
1288
|
long: "MMMM do, y",
|
|
1286
1289
|
medium: "MMM d, y",
|
|
1287
1290
|
short: "MM/dd/yyyy"
|
|
1288
|
-
},
|
|
1291
|
+
}, oi = {
|
|
1289
1292
|
full: "h:mm:ss a zzzz",
|
|
1290
1293
|
long: "h:mm:ss a z",
|
|
1291
1294
|
medium: "h:mm:ss a",
|
|
1292
1295
|
short: "h:mm a"
|
|
1293
|
-
},
|
|
1296
|
+
}, ui = {
|
|
1294
1297
|
full: "{{date}} 'at' {{time}}",
|
|
1295
1298
|
long: "{{date}} 'at' {{time}}",
|
|
1296
1299
|
medium: "{{date}}, {{time}}",
|
|
1297
1300
|
short: "{{date}}, {{time}}"
|
|
1298
|
-
},
|
|
1301
|
+
}, ci = {
|
|
1299
1302
|
date: Le({
|
|
1300
|
-
formats:
|
|
1303
|
+
formats: si,
|
|
1301
1304
|
defaultWidth: "full"
|
|
1302
1305
|
}),
|
|
1303
1306
|
time: Le({
|
|
1304
|
-
formats:
|
|
1307
|
+
formats: oi,
|
|
1305
1308
|
defaultWidth: "full"
|
|
1306
1309
|
}),
|
|
1307
1310
|
dateTime: Le({
|
|
1308
|
-
formats:
|
|
1311
|
+
formats: ui,
|
|
1309
1312
|
defaultWidth: "full"
|
|
1310
1313
|
})
|
|
1311
|
-
},
|
|
1314
|
+
}, li = {
|
|
1312
1315
|
lastWeek: "'last' eeee 'at' p",
|
|
1313
1316
|
yesterday: "'yesterday at' p",
|
|
1314
1317
|
today: "'today at' p",
|
|
1315
1318
|
tomorrow: "'tomorrow at' p",
|
|
1316
1319
|
nextWeek: "eeee 'at' p",
|
|
1317
1320
|
other: "P"
|
|
1318
|
-
},
|
|
1319
|
-
function
|
|
1321
|
+
}, di = (e, t, r, n) => li[e];
|
|
1322
|
+
function oe(e) {
|
|
1320
1323
|
return (t, r) => {
|
|
1321
1324
|
const n = r != null && r.context ? String(r.context) : "standalone";
|
|
1322
1325
|
let i;
|
|
@@ -1331,15 +1334,15 @@ function ae(e) {
|
|
|
1331
1334
|
return i[o];
|
|
1332
1335
|
};
|
|
1333
1336
|
}
|
|
1334
|
-
const
|
|
1337
|
+
const fi = {
|
|
1335
1338
|
narrow: ["B", "A"],
|
|
1336
1339
|
abbreviated: ["BC", "AD"],
|
|
1337
1340
|
wide: ["Before Christ", "Anno Domini"]
|
|
1338
|
-
},
|
|
1341
|
+
}, hi = {
|
|
1339
1342
|
narrow: ["1", "2", "3", "4"],
|
|
1340
1343
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
1341
1344
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
1342
|
-
},
|
|
1345
|
+
}, mi = {
|
|
1343
1346
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
1344
1347
|
abbreviated: [
|
|
1345
1348
|
"Jan",
|
|
@@ -1369,7 +1372,7 @@ const li = {
|
|
|
1369
1372
|
"November",
|
|
1370
1373
|
"December"
|
|
1371
1374
|
]
|
|
1372
|
-
},
|
|
1375
|
+
}, yi = {
|
|
1373
1376
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
1374
1377
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
1375
1378
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -1382,7 +1385,7 @@ const li = {
|
|
|
1382
1385
|
"Friday",
|
|
1383
1386
|
"Saturday"
|
|
1384
1387
|
]
|
|
1385
|
-
},
|
|
1388
|
+
}, pi = {
|
|
1386
1389
|
narrow: {
|
|
1387
1390
|
am: "a",
|
|
1388
1391
|
pm: "p",
|
|
@@ -1413,7 +1416,7 @@ const li = {
|
|
|
1413
1416
|
evening: "evening",
|
|
1414
1417
|
night: "night"
|
|
1415
1418
|
}
|
|
1416
|
-
},
|
|
1419
|
+
}, gi = {
|
|
1417
1420
|
narrow: {
|
|
1418
1421
|
am: "a",
|
|
1419
1422
|
pm: "p",
|
|
@@ -1444,7 +1447,7 @@ const li = {
|
|
|
1444
1447
|
evening: "in the evening",
|
|
1445
1448
|
night: "at night"
|
|
1446
1449
|
}
|
|
1447
|
-
},
|
|
1450
|
+
}, _i = (e, t) => {
|
|
1448
1451
|
const r = Number(e), n = r % 100;
|
|
1449
1452
|
if (n > 20 || n < 10)
|
|
1450
1453
|
switch (n % 10) {
|
|
@@ -1456,40 +1459,40 @@ const li = {
|
|
|
1456
1459
|
return r + "rd";
|
|
1457
1460
|
}
|
|
1458
1461
|
return r + "th";
|
|
1459
|
-
},
|
|
1460
|
-
ordinalNumber:
|
|
1461
|
-
era:
|
|
1462
|
-
values:
|
|
1462
|
+
}, wi = {
|
|
1463
|
+
ordinalNumber: _i,
|
|
1464
|
+
era: oe({
|
|
1465
|
+
values: fi,
|
|
1463
1466
|
defaultWidth: "wide"
|
|
1464
1467
|
}),
|
|
1465
|
-
quarter:
|
|
1466
|
-
values:
|
|
1468
|
+
quarter: oe({
|
|
1469
|
+
values: hi,
|
|
1467
1470
|
defaultWidth: "wide",
|
|
1468
1471
|
argumentCallback: (e) => e - 1
|
|
1469
1472
|
}),
|
|
1470
|
-
month:
|
|
1471
|
-
values:
|
|
1473
|
+
month: oe({
|
|
1474
|
+
values: mi,
|
|
1472
1475
|
defaultWidth: "wide"
|
|
1473
1476
|
}),
|
|
1474
|
-
day:
|
|
1475
|
-
values:
|
|
1477
|
+
day: oe({
|
|
1478
|
+
values: yi,
|
|
1476
1479
|
defaultWidth: "wide"
|
|
1477
1480
|
}),
|
|
1478
|
-
dayPeriod:
|
|
1479
|
-
values:
|
|
1481
|
+
dayPeriod: oe({
|
|
1482
|
+
values: pi,
|
|
1480
1483
|
defaultWidth: "wide",
|
|
1481
|
-
formattingValues:
|
|
1484
|
+
formattingValues: gi,
|
|
1482
1485
|
defaultFormattingWidth: "wide"
|
|
1483
1486
|
})
|
|
1484
1487
|
};
|
|
1485
|
-
function
|
|
1488
|
+
function ue(e) {
|
|
1486
1489
|
return (t, r = {}) => {
|
|
1487
1490
|
const n = r.width, i = n && e.matchPatterns[n] || e.matchPatterns[e.defaultMatchWidth], o = t.match(i);
|
|
1488
1491
|
if (!o)
|
|
1489
1492
|
return null;
|
|
1490
|
-
const c = o[0], d = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], h = Array.isArray(d) ?
|
|
1493
|
+
const c = o[0], d = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], h = Array.isArray(d) ? Ti(d, (y) => y.test(c)) : (
|
|
1491
1494
|
// [TODO] -- I challenge you to fix the type
|
|
1492
|
-
|
|
1495
|
+
bi(d, (y) => y.test(c))
|
|
1493
1496
|
);
|
|
1494
1497
|
let f;
|
|
1495
1498
|
f = e.valueCallback ? e.valueCallback(h) : h, f = r.valueCallback ? (
|
|
@@ -1500,17 +1503,17 @@ function ie(e) {
|
|
|
1500
1503
|
return { value: f, rest: _ };
|
|
1501
1504
|
};
|
|
1502
1505
|
}
|
|
1503
|
-
function
|
|
1506
|
+
function bi(e, t) {
|
|
1504
1507
|
for (const r in e)
|
|
1505
1508
|
if (Object.prototype.hasOwnProperty.call(e, r) && t(e[r]))
|
|
1506
1509
|
return r;
|
|
1507
1510
|
}
|
|
1508
|
-
function
|
|
1511
|
+
function Ti(e, t) {
|
|
1509
1512
|
for (let r = 0; r < e.length; r++)
|
|
1510
1513
|
if (t(e[r]))
|
|
1511
1514
|
return r;
|
|
1512
1515
|
}
|
|
1513
|
-
function
|
|
1516
|
+
function Di(e) {
|
|
1514
1517
|
return (t, r = {}) => {
|
|
1515
1518
|
const n = t.match(e.matchPattern);
|
|
1516
1519
|
if (!n) return null;
|
|
@@ -1522,23 +1525,23 @@ function bi(e) {
|
|
|
1522
1525
|
return { value: c, rest: d };
|
|
1523
1526
|
};
|
|
1524
1527
|
}
|
|
1525
|
-
const
|
|
1528
|
+
const Oi = /^(\d+)(th|st|nd|rd)?/i, Si = /\d+/i, Mi = {
|
|
1526
1529
|
narrow: /^(b|a)/i,
|
|
1527
1530
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
1528
1531
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
1529
|
-
},
|
|
1532
|
+
}, vi = {
|
|
1530
1533
|
any: [/^b/i, /^(a|c)/i]
|
|
1531
|
-
},
|
|
1534
|
+
}, xi = {
|
|
1532
1535
|
narrow: /^[1234]/i,
|
|
1533
1536
|
abbreviated: /^q[1234]/i,
|
|
1534
1537
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
1535
|
-
},
|
|
1538
|
+
}, Ei = {
|
|
1536
1539
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
1537
|
-
},
|
|
1540
|
+
}, Pi = {
|
|
1538
1541
|
narrow: /^[jfmasond]/i,
|
|
1539
1542
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
1540
1543
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
1541
|
-
},
|
|
1544
|
+
}, Ni = {
|
|
1542
1545
|
narrow: [
|
|
1543
1546
|
/^j/i,
|
|
1544
1547
|
/^f/i,
|
|
@@ -1567,18 +1570,18 @@ const Ti = /^(\d+)(th|st|nd|rd)?/i, Di = /\d+/i, Oi = {
|
|
|
1567
1570
|
/^n/i,
|
|
1568
1571
|
/^d/i
|
|
1569
1572
|
]
|
|
1570
|
-
},
|
|
1573
|
+
}, Ci = {
|
|
1571
1574
|
narrow: /^[smtwf]/i,
|
|
1572
1575
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
1573
1576
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
1574
1577
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
1575
|
-
},
|
|
1578
|
+
}, Ii = {
|
|
1576
1579
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
1577
1580
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
1578
|
-
},
|
|
1581
|
+
}, ki = {
|
|
1579
1582
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
1580
1583
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
1581
|
-
},
|
|
1584
|
+
}, Yi = {
|
|
1582
1585
|
any: {
|
|
1583
1586
|
am: /^a/i,
|
|
1584
1587
|
pm: /^p/i,
|
|
@@ -1589,64 +1592,64 @@ const Ti = /^(\d+)(th|st|nd|rd)?/i, Di = /\d+/i, Oi = {
|
|
|
1589
1592
|
evening: /evening/i,
|
|
1590
1593
|
night: /night/i
|
|
1591
1594
|
}
|
|
1592
|
-
},
|
|
1593
|
-
ordinalNumber:
|
|
1594
|
-
matchPattern:
|
|
1595
|
-
parsePattern:
|
|
1595
|
+
}, qi = {
|
|
1596
|
+
ordinalNumber: Di({
|
|
1597
|
+
matchPattern: Oi,
|
|
1598
|
+
parsePattern: Si,
|
|
1596
1599
|
valueCallback: (e) => parseInt(e, 10)
|
|
1597
1600
|
}),
|
|
1598
|
-
era:
|
|
1599
|
-
matchPatterns: Oi,
|
|
1600
|
-
defaultMatchWidth: "wide",
|
|
1601
|
-
parsePatterns: Si,
|
|
1602
|
-
defaultParseWidth: "any"
|
|
1603
|
-
}),
|
|
1604
|
-
quarter: ie({
|
|
1601
|
+
era: ue({
|
|
1605
1602
|
matchPatterns: Mi,
|
|
1606
1603
|
defaultMatchWidth: "wide",
|
|
1607
1604
|
parsePatterns: vi,
|
|
1608
|
-
defaultParseWidth: "any"
|
|
1609
|
-
valueCallback: (e) => e + 1
|
|
1605
|
+
defaultParseWidth: "any"
|
|
1610
1606
|
}),
|
|
1611
|
-
|
|
1607
|
+
quarter: ue({
|
|
1612
1608
|
matchPatterns: xi,
|
|
1613
1609
|
defaultMatchWidth: "wide",
|
|
1614
1610
|
parsePatterns: Ei,
|
|
1615
|
-
defaultParseWidth: "any"
|
|
1611
|
+
defaultParseWidth: "any",
|
|
1612
|
+
valueCallback: (e) => e + 1
|
|
1616
1613
|
}),
|
|
1617
|
-
|
|
1614
|
+
month: ue({
|
|
1618
1615
|
matchPatterns: Pi,
|
|
1619
1616
|
defaultMatchWidth: "wide",
|
|
1620
1617
|
parsePatterns: Ni,
|
|
1621
1618
|
defaultParseWidth: "any"
|
|
1622
1619
|
}),
|
|
1623
|
-
|
|
1620
|
+
day: ue({
|
|
1624
1621
|
matchPatterns: Ci,
|
|
1625
|
-
defaultMatchWidth: "
|
|
1622
|
+
defaultMatchWidth: "wide",
|
|
1626
1623
|
parsePatterns: Ii,
|
|
1627
1624
|
defaultParseWidth: "any"
|
|
1625
|
+
}),
|
|
1626
|
+
dayPeriod: ue({
|
|
1627
|
+
matchPatterns: ki,
|
|
1628
|
+
defaultMatchWidth: "any",
|
|
1629
|
+
parsePatterns: Yi,
|
|
1630
|
+
defaultParseWidth: "any"
|
|
1628
1631
|
})
|
|
1629
|
-
},
|
|
1632
|
+
}, Ri = {
|
|
1630
1633
|
code: "en-US",
|
|
1631
|
-
formatDistance:
|
|
1632
|
-
formatLong:
|
|
1633
|
-
formatRelative:
|
|
1634
|
-
localize:
|
|
1635
|
-
match:
|
|
1634
|
+
formatDistance: ii,
|
|
1635
|
+
formatLong: ci,
|
|
1636
|
+
formatRelative: di,
|
|
1637
|
+
localize: wi,
|
|
1638
|
+
match: qi,
|
|
1636
1639
|
options: {
|
|
1637
1640
|
weekStartsOn: 0,
|
|
1638
1641
|
firstWeekContainsDate: 1
|
|
1639
1642
|
}
|
|
1640
1643
|
};
|
|
1641
|
-
function
|
|
1644
|
+
function Hi(e, t) {
|
|
1642
1645
|
const r = O(e, t == null ? void 0 : t.in);
|
|
1643
|
-
return
|
|
1646
|
+
return Ja(r, ni(r)) + 1;
|
|
1644
1647
|
}
|
|
1645
|
-
function
|
|
1646
|
-
const r = O(e, t == null ? void 0 : t.in), n = +De(r) - +
|
|
1648
|
+
function ji(e, t) {
|
|
1649
|
+
const r = O(e, t == null ? void 0 : t.in), n = +De(r) - +ei(r);
|
|
1647
1650
|
return Math.round(n / Yr) + 1;
|
|
1648
1651
|
}
|
|
1649
|
-
function
|
|
1652
|
+
function Rr(e, t) {
|
|
1650
1653
|
var _, y, p, E;
|
|
1651
1654
|
const r = O(e, t == null ? void 0 : t.in), n = r.getFullYear(), i = fe(), o = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((y = (_ = t == null ? void 0 : t.locale) == null ? void 0 : _.options) == null ? void 0 : y.firstWeekContainsDate) ?? i.firstWeekContainsDate ?? ((E = (p = i.locale) == null ? void 0 : p.options) == null ? void 0 : E.firstWeekContainsDate) ?? 1, c = I((t == null ? void 0 : t.in) || e, 0);
|
|
1652
1655
|
c.setFullYear(n + 1, 0, o), c.setHours(0, 0, 0, 0);
|
|
@@ -1655,13 +1658,13 @@ function qr(e, t) {
|
|
|
1655
1658
|
const f = H(h, t);
|
|
1656
1659
|
return +r >= +d ? n + 1 : +r >= +f ? n : n - 1;
|
|
1657
1660
|
}
|
|
1658
|
-
function
|
|
1661
|
+
function Ai(e, t) {
|
|
1659
1662
|
var d, h, f, _;
|
|
1660
|
-
const r = fe(), n = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((h = (d = t == null ? void 0 : t.locale) == null ? void 0 : d.options) == null ? void 0 : h.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((_ = (f = r.locale) == null ? void 0 : f.options) == null ? void 0 : _.firstWeekContainsDate) ?? 1, i =
|
|
1663
|
+
const r = fe(), n = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((h = (d = t == null ? void 0 : t.locale) == null ? void 0 : d.options) == null ? void 0 : h.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((_ = (f = r.locale) == null ? void 0 : f.options) == null ? void 0 : _.firstWeekContainsDate) ?? 1, i = Rr(e, t), o = I((t == null ? void 0 : t.in) || e, 0);
|
|
1661
1664
|
return o.setFullYear(i, 0, n), o.setHours(0, 0, 0, 0), H(o, t);
|
|
1662
1665
|
}
|
|
1663
|
-
function
|
|
1664
|
-
const r = O(e, t == null ? void 0 : t.in), n = +H(r, t) - +
|
|
1666
|
+
function Gi(e, t) {
|
|
1667
|
+
const r = O(e, t == null ? void 0 : t.in), n = +H(r, t) - +Ai(r, t);
|
|
1665
1668
|
return Math.round(n / Yr) + 1;
|
|
1666
1669
|
}
|
|
1667
1670
|
function g(e, t) {
|
|
@@ -1755,7 +1758,7 @@ const A = {
|
|
|
1755
1758
|
},
|
|
1756
1759
|
// Local week-numbering year
|
|
1757
1760
|
Y: function(e, t, r, n) {
|
|
1758
|
-
const i =
|
|
1761
|
+
const i = Rr(e, n), o = i > 0 ? i : 1 - i;
|
|
1759
1762
|
if (t === "YY") {
|
|
1760
1763
|
const c = o % 100;
|
|
1761
1764
|
return g(c, 2);
|
|
@@ -1764,7 +1767,7 @@ const A = {
|
|
|
1764
1767
|
},
|
|
1765
1768
|
// ISO week-numbering year
|
|
1766
1769
|
R: function(e, t) {
|
|
1767
|
-
const r =
|
|
1770
|
+
const r = qr(e);
|
|
1768
1771
|
return g(r, t.length);
|
|
1769
1772
|
},
|
|
1770
1773
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
@@ -1887,12 +1890,12 @@ const A = {
|
|
|
1887
1890
|
},
|
|
1888
1891
|
// Local week of year
|
|
1889
1892
|
w: function(e, t, r, n) {
|
|
1890
|
-
const i =
|
|
1893
|
+
const i = Gi(e, n);
|
|
1891
1894
|
return t === "wo" ? r.ordinalNumber(i, { unit: "week" }) : g(i, t.length);
|
|
1892
1895
|
},
|
|
1893
1896
|
// ISO week of year
|
|
1894
1897
|
I: function(e, t, r) {
|
|
1895
|
-
const n =
|
|
1898
|
+
const n = ji(e);
|
|
1896
1899
|
return t === "Io" ? r.ordinalNumber(n, { unit: "week" }) : g(n, t.length);
|
|
1897
1900
|
},
|
|
1898
1901
|
// Day of the month
|
|
@@ -1901,7 +1904,7 @@ const A = {
|
|
|
1901
1904
|
},
|
|
1902
1905
|
// Day of year
|
|
1903
1906
|
D: function(e, t, r) {
|
|
1904
|
-
const n =
|
|
1907
|
+
const n = Hi(e);
|
|
1905
1908
|
return t === "Do" ? r.ordinalNumber(n, { unit: "dayOfYear" }) : g(n, t.length);
|
|
1906
1909
|
},
|
|
1907
1910
|
// Day of week
|
|
@@ -2251,7 +2254,7 @@ const Qt = (e, t) => {
|
|
|
2251
2254
|
default:
|
|
2252
2255
|
return t.time({ width: "full" });
|
|
2253
2256
|
}
|
|
2254
|
-
},
|
|
2257
|
+
}, Fi = (e, t) => {
|
|
2255
2258
|
const r = e.match(/(P+)(p+)?/) || [], n = r[1], i = r[2];
|
|
2256
2259
|
if (!i)
|
|
2257
2260
|
return Qt(e, t);
|
|
@@ -2272,46 +2275,46 @@ const Qt = (e, t) => {
|
|
|
2272
2275
|
break;
|
|
2273
2276
|
}
|
|
2274
2277
|
return o.replace("{{date}}", Qt(n, t)).replace("{{time}}", Hr(i, t));
|
|
2275
|
-
},
|
|
2278
|
+
}, Wi = {
|
|
2276
2279
|
p: Hr,
|
|
2277
|
-
P:
|
|
2278
|
-
},
|
|
2279
|
-
function
|
|
2280
|
-
return
|
|
2280
|
+
P: Fi
|
|
2281
|
+
}, Li = /^D+$/, Ui = /^Y+$/, zi = ["D", "DD", "YY", "YYYY"];
|
|
2282
|
+
function $i(e) {
|
|
2283
|
+
return Li.test(e);
|
|
2281
2284
|
}
|
|
2282
|
-
function
|
|
2283
|
-
return
|
|
2285
|
+
function Vi(e) {
|
|
2286
|
+
return Ui.test(e);
|
|
2284
2287
|
}
|
|
2285
|
-
function
|
|
2286
|
-
const n =
|
|
2287
|
-
if (console.warn(n),
|
|
2288
|
+
function Xi(e, t, r) {
|
|
2289
|
+
const n = Qi(e, t, r);
|
|
2290
|
+
if (console.warn(n), zi.includes(e)) throw new RangeError(n);
|
|
2288
2291
|
}
|
|
2289
|
-
function
|
|
2292
|
+
function Qi(e, t, r) {
|
|
2290
2293
|
const n = e[0] === "Y" ? "years" : "days of the month";
|
|
2291
2294
|
return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
2292
2295
|
}
|
|
2293
|
-
const
|
|
2296
|
+
const Zi = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Bi = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ki = /^'([^]*?)'?$/, Ji = /''/g, es = /[a-zA-Z]/;
|
|
2294
2297
|
function jr(e, t, r) {
|
|
2295
2298
|
var _, y, p, E, P, N, k, G;
|
|
2296
|
-
const n = fe(), i = (r == null ? void 0 : r.locale) ?? n.locale ??
|
|
2297
|
-
if (!
|
|
2299
|
+
const n = fe(), i = (r == null ? void 0 : r.locale) ?? n.locale ?? Ri, o = (r == null ? void 0 : r.firstWeekContainsDate) ?? ((y = (_ = r == null ? void 0 : r.locale) == null ? void 0 : _.options) == null ? void 0 : y.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((E = (p = n.locale) == null ? void 0 : p.options) == null ? void 0 : E.firstWeekContainsDate) ?? 1, c = (r == null ? void 0 : r.weekStartsOn) ?? ((N = (P = r == null ? void 0 : r.locale) == null ? void 0 : P.options) == null ? void 0 : N.weekStartsOn) ?? n.weekStartsOn ?? ((G = (k = n.locale) == null ? void 0 : k.options) == null ? void 0 : G.weekStartsOn) ?? 0, d = O(e, r == null ? void 0 : r.in);
|
|
2300
|
+
if (!ri(d))
|
|
2298
2301
|
throw new RangeError("Invalid time value");
|
|
2299
|
-
let h = t.match(
|
|
2302
|
+
let h = t.match(Bi).map((S) => {
|
|
2300
2303
|
const T = S[0];
|
|
2301
2304
|
if (T === "p" || T === "P") {
|
|
2302
|
-
const F =
|
|
2305
|
+
const F = Wi[T];
|
|
2303
2306
|
return F(S, i.formatLong);
|
|
2304
2307
|
}
|
|
2305
2308
|
return S;
|
|
2306
|
-
}).join("").match(
|
|
2309
|
+
}).join("").match(Zi).map((S) => {
|
|
2307
2310
|
if (S === "''")
|
|
2308
2311
|
return { isToken: !1, value: "'" };
|
|
2309
2312
|
const T = S[0];
|
|
2310
2313
|
if (T === "'")
|
|
2311
|
-
return { isToken: !1, value:
|
|
2314
|
+
return { isToken: !1, value: ts(S) };
|
|
2312
2315
|
if ($t[T])
|
|
2313
2316
|
return { isToken: !0, value: S };
|
|
2314
|
-
if (T.match(
|
|
2317
|
+
if (T.match(es))
|
|
2315
2318
|
throw new RangeError(
|
|
2316
2319
|
"Format string contains an unescaped latin alphabet character `" + T + "`"
|
|
2317
2320
|
);
|
|
@@ -2326,20 +2329,20 @@ function jr(e, t, r) {
|
|
|
2326
2329
|
return h.map((S) => {
|
|
2327
2330
|
if (!S.isToken) return S.value;
|
|
2328
2331
|
const T = S.value;
|
|
2329
|
-
(!(r != null && r.useAdditionalWeekYearTokens) &&
|
|
2332
|
+
(!(r != null && r.useAdditionalWeekYearTokens) && Vi(T) || !(r != null && r.useAdditionalDayOfYearTokens) && $i(T)) && Xi(T, t, String(e));
|
|
2330
2333
|
const F = $t[T[0]];
|
|
2331
2334
|
return F(d, T, i.localize, f);
|
|
2332
2335
|
}).join("");
|
|
2333
2336
|
}
|
|
2334
|
-
function
|
|
2335
|
-
const t = e.match(
|
|
2336
|
-
return t ? t[1].replace(
|
|
2337
|
+
function ts(e) {
|
|
2338
|
+
const t = e.match(Ki);
|
|
2339
|
+
return t ? t[1].replace(Ji, "'") : e;
|
|
2337
2340
|
}
|
|
2338
|
-
function
|
|
2341
|
+
function rs(e, t) {
|
|
2339
2342
|
const r = O(e, t == null ? void 0 : t.in), n = r.getFullYear(), i = r.getMonth(), o = I(r, 0);
|
|
2340
2343
|
return o.setFullYear(n, i + 1, 0), o.setHours(0, 0, 0, 0), o.getDate();
|
|
2341
2344
|
}
|
|
2342
|
-
function
|
|
2345
|
+
function ns() {
|
|
2343
2346
|
return Object.assign({}, fe());
|
|
2344
2347
|
}
|
|
2345
2348
|
function Zt(e) {
|
|
@@ -2348,41 +2351,41 @@ function Zt(e) {
|
|
|
2348
2351
|
function Bt(e) {
|
|
2349
2352
|
return Math.trunc(+O(e) / 1e3);
|
|
2350
2353
|
}
|
|
2351
|
-
function
|
|
2352
|
-
return Math.trunc(e *
|
|
2354
|
+
function as(e) {
|
|
2355
|
+
return Math.trunc(e * Qa);
|
|
2353
2356
|
}
|
|
2354
|
-
function
|
|
2355
|
-
const t = e /
|
|
2357
|
+
function is(e) {
|
|
2358
|
+
const t = e / Xa;
|
|
2356
2359
|
return Math.trunc(t);
|
|
2357
2360
|
}
|
|
2358
2361
|
function Ar(e, t, r) {
|
|
2359
|
-
return
|
|
2362
|
+
return Za(e, -1, r);
|
|
2360
2363
|
}
|
|
2361
2364
|
function Kt(e, t, r) {
|
|
2362
|
-
const n =
|
|
2363
|
-
return "formatToParts" in i ?
|
|
2365
|
+
const n = ns(), i = us(e, r.timeZone, r.locale ?? n.locale);
|
|
2366
|
+
return "formatToParts" in i ? ss(i, t) : os(i, t);
|
|
2364
2367
|
}
|
|
2365
|
-
function
|
|
2368
|
+
function ss(e, t) {
|
|
2366
2369
|
const r = e.formatToParts(t);
|
|
2367
2370
|
for (let n = r.length - 1; n >= 0; --n)
|
|
2368
2371
|
if (r[n].type === "timeZoneName")
|
|
2369
2372
|
return r[n].value;
|
|
2370
2373
|
}
|
|
2371
|
-
function
|
|
2374
|
+
function os(e, t) {
|
|
2372
2375
|
const r = e.format(t).replace(/\u200E/g, ""), n = / [\w-+ ]+$/.exec(r);
|
|
2373
2376
|
return n ? n[0].substr(1) : "";
|
|
2374
2377
|
}
|
|
2375
|
-
function
|
|
2378
|
+
function us(e, t, r) {
|
|
2376
2379
|
return new Intl.DateTimeFormat(r ? [r.code, "en-US"] : void 0, {
|
|
2377
2380
|
timeZone: t,
|
|
2378
2381
|
timeZoneName: e
|
|
2379
2382
|
});
|
|
2380
2383
|
}
|
|
2381
|
-
function
|
|
2382
|
-
const r =
|
|
2383
|
-
return "formatToParts" in r ?
|
|
2384
|
+
function cs(e, t) {
|
|
2385
|
+
const r = ms(t);
|
|
2386
|
+
return "formatToParts" in r ? ds(r, e) : fs(r, e);
|
|
2384
2387
|
}
|
|
2385
|
-
const
|
|
2388
|
+
const ls = {
|
|
2386
2389
|
year: 0,
|
|
2387
2390
|
month: 1,
|
|
2388
2391
|
day: 2,
|
|
@@ -2390,11 +2393,11 @@ const us = {
|
|
|
2390
2393
|
minute: 4,
|
|
2391
2394
|
second: 5
|
|
2392
2395
|
};
|
|
2393
|
-
function
|
|
2396
|
+
function ds(e, t) {
|
|
2394
2397
|
try {
|
|
2395
2398
|
const r = e.formatToParts(t), n = [];
|
|
2396
2399
|
for (let i = 0; i < r.length; i++) {
|
|
2397
|
-
const o =
|
|
2400
|
+
const o = ls[r[i].type];
|
|
2398
2401
|
o !== void 0 && (n[o] = parseInt(r[i].value, 10));
|
|
2399
2402
|
}
|
|
2400
2403
|
return n;
|
|
@@ -2404,7 +2407,7 @@ function cs(e, t) {
|
|
|
2404
2407
|
throw r;
|
|
2405
2408
|
}
|
|
2406
2409
|
}
|
|
2407
|
-
function
|
|
2410
|
+
function fs(e, t) {
|
|
2408
2411
|
const r = e.format(t), n = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(r);
|
|
2409
2412
|
return [
|
|
2410
2413
|
parseInt(n[3], 10),
|
|
@@ -2424,9 +2427,9 @@ const Ue = {}, Jt = new Intl.DateTimeFormat("en-US", {
|
|
|
2424
2427
|
hour: "2-digit",
|
|
2425
2428
|
minute: "2-digit",
|
|
2426
2429
|
second: "2-digit"
|
|
2427
|
-
}).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")),
|
|
2428
|
-
function
|
|
2429
|
-
return Ue[e] || (Ue[e] =
|
|
2430
|
+
}).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), hs = Jt === "06/25/2014, 00:00:00" || Jt === "06/25/2014 00:00:00";
|
|
2431
|
+
function ms(e) {
|
|
2432
|
+
return Ue[e] || (Ue[e] = hs ? new Intl.DateTimeFormat("en-US", {
|
|
2430
2433
|
hourCycle: "h23",
|
|
2431
2434
|
timeZone: e,
|
|
2432
2435
|
year: "numeric",
|
|
@@ -2450,7 +2453,7 @@ function st(e, t, r, n, i, o, c) {
|
|
|
2450
2453
|
const d = /* @__PURE__ */ new Date(0);
|
|
2451
2454
|
return d.setUTCFullYear(e, t, r), d.setUTCHours(n, i, o, c), d;
|
|
2452
2455
|
}
|
|
2453
|
-
const er = 36e5,
|
|
2456
|
+
const er = 36e5, ys = 6e4, ze = {
|
|
2454
2457
|
timezoneZ: /^(Z)$/,
|
|
2455
2458
|
timezoneHH: /^([+-]\d{2})$/,
|
|
2456
2459
|
timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/
|
|
@@ -2467,25 +2470,25 @@ function he(e, t, r) {
|
|
|
2467
2470
|
if (n = ze.timezoneHHMM.exec(e), n) {
|
|
2468
2471
|
i = parseInt(n[2], 10);
|
|
2469
2472
|
const c = parseInt(n[3], 10);
|
|
2470
|
-
return tr(i, c) ? (o = Math.abs(i) * er + c *
|
|
2473
|
+
return tr(i, c) ? (o = Math.abs(i) * er + c * ys, n[1] === "+" ? -o : o) : NaN;
|
|
2471
2474
|
}
|
|
2472
|
-
if (
|
|
2475
|
+
if (_s(e)) {
|
|
2473
2476
|
t = new Date(t || Date.now());
|
|
2474
|
-
const c = r ? t :
|
|
2475
|
-
return -(r ? d :
|
|
2477
|
+
const c = r ? t : ps(t), d = Qe(c, e);
|
|
2478
|
+
return -(r ? d : gs(t, d, e));
|
|
2476
2479
|
}
|
|
2477
2480
|
return NaN;
|
|
2478
2481
|
}
|
|
2479
|
-
function
|
|
2482
|
+
function ps(e) {
|
|
2480
2483
|
return st(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds());
|
|
2481
2484
|
}
|
|
2482
2485
|
function Qe(e, t) {
|
|
2483
|
-
const r =
|
|
2486
|
+
const r = cs(e, t), n = st(r[0], r[1] - 1, r[2], r[3] % 24, r[4], r[5], 0).getTime();
|
|
2484
2487
|
let i = e.getTime();
|
|
2485
2488
|
const o = i % 1e3;
|
|
2486
2489
|
return i -= o >= 0 ? o : 1e3 + o, n - i;
|
|
2487
2490
|
}
|
|
2488
|
-
function
|
|
2491
|
+
function gs(e, t, r) {
|
|
2489
2492
|
let i = e.getTime() - t;
|
|
2490
2493
|
const o = Qe(new Date(i), r);
|
|
2491
2494
|
if (t === o)
|
|
@@ -2498,7 +2501,7 @@ function tr(e, t) {
|
|
|
2498
2501
|
return -23 <= e && e <= 23 && (t == null || 0 <= t && t <= 59);
|
|
2499
2502
|
}
|
|
2500
2503
|
const rr = {};
|
|
2501
|
-
function
|
|
2504
|
+
function _s(e) {
|
|
2502
2505
|
if (rr[e])
|
|
2503
2506
|
return !0;
|
|
2504
2507
|
try {
|
|
@@ -2507,7 +2510,7 @@ function ps(e) {
|
|
|
2507
2510
|
return !1;
|
|
2508
2511
|
}
|
|
2509
2512
|
}
|
|
2510
|
-
const
|
|
2513
|
+
const ws = 60 * 1e3, bs = {
|
|
2511
2514
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
2512
2515
|
X: function(e, t, r) {
|
|
2513
2516
|
const n = $e(r.timeZone, e);
|
|
@@ -2547,7 +2550,7 @@ const gs = 60 * 1e3, _s = {
|
|
|
2547
2550
|
case "O":
|
|
2548
2551
|
case "OO":
|
|
2549
2552
|
case "OOO":
|
|
2550
|
-
return "GMT" +
|
|
2553
|
+
return "GMT" + Ts(n, ":");
|
|
2551
2554
|
case "OOOO":
|
|
2552
2555
|
default:
|
|
2553
2556
|
return "GMT" + J(n, ":");
|
|
@@ -2567,7 +2570,7 @@ const gs = 60 * 1e3, _s = {
|
|
|
2567
2570
|
}
|
|
2568
2571
|
};
|
|
2569
2572
|
function $e(e, t) {
|
|
2570
|
-
const r = e ? he(e, t, !0) /
|
|
2573
|
+
const r = e ? he(e, t, !0) / ws : (t == null ? void 0 : t.getTimezoneOffset()) ?? 0;
|
|
2571
2574
|
if (Number.isNaN(r))
|
|
2572
2575
|
throw new RangeError("Invalid time zone specified: " + e);
|
|
2573
2576
|
return r;
|
|
@@ -2586,7 +2589,7 @@ function J(e, t = "") {
|
|
|
2586
2589
|
function nr(e, t) {
|
|
2587
2590
|
return e % 60 === 0 ? (e > 0 ? "-" : "+") + Se(Math.abs(e) / 60, 2) : J(e, t);
|
|
2588
2591
|
}
|
|
2589
|
-
function
|
|
2592
|
+
function Ts(e, t = "") {
|
|
2590
2593
|
const r = e > 0 ? "-" : "+", n = Math.abs(e), i = Math.floor(n / 60), o = n % 60;
|
|
2591
2594
|
return o === 0 ? r + String(i) : r + String(i) + t + Se(o, 2);
|
|
2592
2595
|
}
|
|
@@ -2594,7 +2597,7 @@ function ar(e) {
|
|
|
2594
2597
|
const t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()));
|
|
2595
2598
|
return t.setUTCFullYear(e.getFullYear()), +e - +t;
|
|
2596
2599
|
}
|
|
2597
|
-
const Gr = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, Ve = 36e5, ir = 6e4,
|
|
2600
|
+
const Gr = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, Ve = 36e5, ir = 6e4, Ds = 2, M = {
|
|
2598
2601
|
dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
|
|
2599
2602
|
datePattern: /^([0-9W+-]+)(.*)/,
|
|
2600
2603
|
// year tokens
|
|
@@ -2633,7 +2636,7 @@ function Me(e, t = {}) {
|
|
|
2633
2636
|
throw new TypeError("1 argument required, but only " + arguments.length + " present");
|
|
2634
2637
|
if (e === null)
|
|
2635
2638
|
return /* @__PURE__ */ new Date(NaN);
|
|
2636
|
-
const r = t.additionalDigits == null ?
|
|
2639
|
+
const r = t.additionalDigits == null ? Ds : Number(t.additionalDigits);
|
|
2637
2640
|
if (r !== 2 && r !== 1 && r !== 0)
|
|
2638
2641
|
throw new RangeError("additionalDigits must be 0, 1 or 2");
|
|
2639
2642
|
if (e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]")
|
|
@@ -2642,13 +2645,13 @@ function Me(e, t = {}) {
|
|
|
2642
2645
|
return new Date(e);
|
|
2643
2646
|
if (Object.prototype.toString.call(e) !== "[object String]")
|
|
2644
2647
|
return /* @__PURE__ */ new Date(NaN);
|
|
2645
|
-
const n =
|
|
2648
|
+
const n = Os(e), { year: i, restDateString: o } = Ss(n.date, r), c = Ms(o, i);
|
|
2646
2649
|
if (c === null || isNaN(c.getTime()))
|
|
2647
2650
|
return /* @__PURE__ */ new Date(NaN);
|
|
2648
2651
|
if (c) {
|
|
2649
2652
|
const d = c.getTime();
|
|
2650
2653
|
let h = 0, f;
|
|
2651
|
-
if (n.time && (h =
|
|
2654
|
+
if (n.time && (h = vs(n.time), h === null || isNaN(h)))
|
|
2652
2655
|
return /* @__PURE__ */ new Date(NaN);
|
|
2653
2656
|
if (n.timeZone || t.timeZone) {
|
|
2654
2657
|
if (f = he(n.timeZone || t.timeZone, new Date(d + h)), isNaN(f))
|
|
@@ -2659,7 +2662,7 @@ function Me(e, t = {}) {
|
|
|
2659
2662
|
} else
|
|
2660
2663
|
return /* @__PURE__ */ new Date(NaN);
|
|
2661
2664
|
}
|
|
2662
|
-
function
|
|
2665
|
+
function Os(e) {
|
|
2663
2666
|
const t = {};
|
|
2664
2667
|
let r = M.dateTimePattern.exec(e), n;
|
|
2665
2668
|
if (r ? (t.date = r[1], n = r[3]) : (r = M.datePattern.exec(e), r ? (t.date = r[1], n = r[2]) : (t.date = null, n = e)), n) {
|
|
@@ -2668,7 +2671,7 @@ function Ts(e) {
|
|
|
2668
2671
|
}
|
|
2669
2672
|
return t;
|
|
2670
2673
|
}
|
|
2671
|
-
function
|
|
2674
|
+
function Ss(e, t) {
|
|
2672
2675
|
if (e) {
|
|
2673
2676
|
const r = M.YYY[t], n = M.YYYYY[t];
|
|
2674
2677
|
let i = M.YYYY.exec(e) || n.exec(e);
|
|
@@ -2691,7 +2694,7 @@ function Ds(e, t) {
|
|
|
2691
2694
|
year: null
|
|
2692
2695
|
};
|
|
2693
2696
|
}
|
|
2694
|
-
function
|
|
2697
|
+
function Ms(e, t) {
|
|
2695
2698
|
if (t === null)
|
|
2696
2699
|
return null;
|
|
2697
2700
|
let r, n, i;
|
|
@@ -2703,7 +2706,7 @@ function Os(e, t) {
|
|
|
2703
2706
|
if (o = M.DDD.exec(e), o) {
|
|
2704
2707
|
r = /* @__PURE__ */ new Date(0);
|
|
2705
2708
|
const c = parseInt(o[1], 10);
|
|
2706
|
-
return
|
|
2709
|
+
return Ps(t, c) ? (r.setUTCFullYear(t, 0, c), r) : /* @__PURE__ */ new Date(NaN);
|
|
2707
2710
|
}
|
|
2708
2711
|
if (o = M.MMDD.exec(e), o) {
|
|
2709
2712
|
r = /* @__PURE__ */ new Date(0), n = parseInt(o[1], 10) - 1;
|
|
@@ -2719,7 +2722,7 @@ function Os(e, t) {
|
|
|
2719
2722
|
}
|
|
2720
2723
|
return null;
|
|
2721
2724
|
}
|
|
2722
|
-
function
|
|
2725
|
+
function vs(e) {
|
|
2723
2726
|
let t, r, n = M.HH.exec(e);
|
|
2724
2727
|
if (n)
|
|
2725
2728
|
return t = parseFloat(n[1].replace(",", ".")), Xe(t) ? t % 24 * Ve : NaN;
|
|
@@ -2739,7 +2742,7 @@ function sr(e, t, r) {
|
|
|
2739
2742
|
const i = n.getUTCDay() || 7, o = t * 7 + r + 1 - i;
|
|
2740
2743
|
return n.setUTCDate(n.getUTCDate() + o), n;
|
|
2741
2744
|
}
|
|
2742
|
-
const
|
|
2745
|
+
const xs = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Es = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
2743
2746
|
function Fr(e) {
|
|
2744
2747
|
return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
|
|
2745
2748
|
}
|
|
@@ -2750,12 +2753,12 @@ function or(e, t, r) {
|
|
|
2750
2753
|
if (r < 1)
|
|
2751
2754
|
return !1;
|
|
2752
2755
|
const n = Fr(e);
|
|
2753
|
-
if (n && r >
|
|
2756
|
+
if (n && r > Es[t] || !n && r > xs[t])
|
|
2754
2757
|
return !1;
|
|
2755
2758
|
}
|
|
2756
2759
|
return !0;
|
|
2757
2760
|
}
|
|
2758
|
-
function
|
|
2761
|
+
function Ps(e, t) {
|
|
2759
2762
|
if (t < 1)
|
|
2760
2763
|
return !1;
|
|
2761
2764
|
const r = Fr(e);
|
|
@@ -2767,16 +2770,16 @@ function ur(e, t) {
|
|
|
2767
2770
|
function Xe(e, t, r) {
|
|
2768
2771
|
return !(e < 0 || e >= 25 || t != null && (t < 0 || t >= 60) || r != null && (r < 0 || r >= 60));
|
|
2769
2772
|
}
|
|
2770
|
-
const
|
|
2771
|
-
function
|
|
2773
|
+
const Ns = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
|
|
2774
|
+
function Cs(e, t, r = {}) {
|
|
2772
2775
|
t = String(t);
|
|
2773
|
-
const n = t.match(
|
|
2776
|
+
const n = t.match(Ns);
|
|
2774
2777
|
if (n) {
|
|
2775
2778
|
const i = Me(r.originalDate || e, r);
|
|
2776
2779
|
t = n.reduce(function(o, c) {
|
|
2777
2780
|
if (c[0] === "'")
|
|
2778
2781
|
return o;
|
|
2779
|
-
const d = o.indexOf(c), h = o[d - 1] === "'", f = o.replace(c, "'" +
|
|
2782
|
+
const d = o.indexOf(c), h = o[d - 1] === "'", f = o.replace(c, "'" + bs[c[0]](i, c, r) + "'");
|
|
2780
2783
|
return h ? f.substring(0, d - 1) + f.substring(d + 1) : f;
|
|
2781
2784
|
}, t);
|
|
2782
2785
|
}
|
|
@@ -2787,14 +2790,14 @@ function Wr(e, t, r) {
|
|
|
2787
2790
|
const n = he(t, e, !0), i = new Date(e.getTime() - n), o = /* @__PURE__ */ new Date(0);
|
|
2788
2791
|
return o.setFullYear(i.getUTCFullYear(), i.getUTCMonth(), i.getUTCDate()), o.setHours(i.getUTCHours(), i.getUTCMinutes(), i.getUTCSeconds(), i.getUTCMilliseconds()), o;
|
|
2789
2792
|
}
|
|
2790
|
-
function
|
|
2793
|
+
function Is(e, t, r, n) {
|
|
2791
2794
|
return n = {
|
|
2792
2795
|
...n,
|
|
2793
2796
|
timeZone: t,
|
|
2794
2797
|
originalDate: e
|
|
2795
|
-
},
|
|
2798
|
+
}, Cs(Wr(e, t, { timeZone: n.timeZone }), r, n);
|
|
2796
2799
|
}
|
|
2797
|
-
function
|
|
2800
|
+
function ks(e, t, r) {
|
|
2798
2801
|
if (typeof e == "string" && !e.match(Gr))
|
|
2799
2802
|
return Me(e, { ...r, timeZone: t });
|
|
2800
2803
|
e = Me(e, r);
|
|
@@ -2804,7 +2807,7 @@ function Cs(e, t, r) {
|
|
|
2804
2807
|
function Lr(e, t) {
|
|
2805
2808
|
return -he(e, t);
|
|
2806
2809
|
}
|
|
2807
|
-
function
|
|
2810
|
+
function oo(e) {
|
|
2808
2811
|
return jr(e, "yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
|
|
2809
2812
|
}
|
|
2810
2813
|
function cr(e, t = {}) {
|
|
@@ -2815,12 +2818,12 @@ function cr(e, t = {}) {
|
|
|
2815
2818
|
let n = "MMM dd, yyy hh:mm a";
|
|
2816
2819
|
t.short && (n = "MMM dd, yyy"), t.includeTZ && (n += " (z)");
|
|
2817
2820
|
const i = new Date(e);
|
|
2818
|
-
return
|
|
2821
|
+
return Is(i, r, n);
|
|
2819
2822
|
} catch {
|
|
2820
2823
|
return console.error("Invalid value passed to formatTime", e), "(invalid date)";
|
|
2821
2824
|
}
|
|
2822
2825
|
}
|
|
2823
|
-
function
|
|
2826
|
+
function uo(e, t) {
|
|
2824
2827
|
return `${cr(e.getTime())} - ${cr(t.getTime(), { includeTZ: !0 })}`;
|
|
2825
2828
|
}
|
|
2826
2829
|
const ve = {
|
|
@@ -2838,20 +2841,20 @@ const ve = {
|
|
|
2838
2841
|
weekly: 60 * 60 * 24 * 7 * 1e3,
|
|
2839
2842
|
trend: 0
|
|
2840
2843
|
};
|
|
2841
|
-
function
|
|
2844
|
+
function co(e, t) {
|
|
2842
2845
|
return e.map((r) => ({
|
|
2843
2846
|
value: r,
|
|
2844
2847
|
label: t.t(`configuration.vitals.reports.granularity.${r}`)
|
|
2845
2848
|
}));
|
|
2846
2849
|
}
|
|
2847
|
-
function
|
|
2850
|
+
function Ys(e, t) {
|
|
2848
2851
|
return {
|
|
2849
2852
|
duration: e,
|
|
2850
2853
|
type: "duration",
|
|
2851
2854
|
origin: t
|
|
2852
2855
|
};
|
|
2853
2856
|
}
|
|
2854
|
-
function
|
|
2857
|
+
function lo(e) {
|
|
2855
2858
|
return e && Ze.find((r) => e <= ve[r]) || null;
|
|
2856
2859
|
}
|
|
2857
2860
|
function Ur(e, t, r, n) {
|
|
@@ -2859,7 +2862,7 @@ function Ur(e, t, r, n) {
|
|
|
2859
2862
|
let o = 0;
|
|
2860
2863
|
return i >= ve.daily && (n ? o = -Lr(n, t) : o = t.getTimezoneOffset() * 60 * 1e3), new Date(e((t.getTime() - o) / i) * i + o);
|
|
2861
2864
|
}
|
|
2862
|
-
function
|
|
2865
|
+
function qs(e, t, r) {
|
|
2863
2866
|
return Ur(Math.floor, e, t, r);
|
|
2864
2867
|
}
|
|
2865
2868
|
function zr(e, t, r) {
|
|
@@ -2878,7 +2881,7 @@ class Ce {
|
|
|
2878
2881
|
if (t)
|
|
2879
2882
|
return new Date(this.endDate().getTime() - this.timeframe.timeframeLengthMs() * n);
|
|
2880
2883
|
{
|
|
2881
|
-
const i = this.endDate(), o = this.timeframe.rawStart(this.tz), c =
|
|
2884
|
+
const i = this.endDate(), o = this.timeframe.rawStart(this.tz), c = qs(o, r, this.tz), h = (i.getTime() - c.getTime()) * (n - 1);
|
|
2882
2885
|
return new Date(c.getTime() - h);
|
|
2883
2886
|
}
|
|
2884
2887
|
}
|
|
@@ -2886,7 +2889,7 @@ class Ce {
|
|
|
2886
2889
|
return Math.floor(this.granularityMs() / 1e3);
|
|
2887
2890
|
}
|
|
2888
2891
|
granularityDruid() {
|
|
2889
|
-
return
|
|
2892
|
+
return Ys(this.granularityMs(), this.startDate().toISOString());
|
|
2890
2893
|
}
|
|
2891
2894
|
// Return a UNIX timestamp suitable for use in the `start` query param.
|
|
2892
2895
|
startSeconds() {
|
|
@@ -2905,7 +2908,7 @@ class Ce {
|
|
|
2905
2908
|
return Zt(this.endDate());
|
|
2906
2909
|
}
|
|
2907
2910
|
}
|
|
2908
|
-
class
|
|
2911
|
+
class fo extends Ce {
|
|
2909
2912
|
constructor(r, n, i, o, c) {
|
|
2910
2913
|
super(r, i, o);
|
|
2911
2914
|
b(this, "granularity");
|
|
@@ -2921,7 +2924,7 @@ class lo extends Ce {
|
|
|
2921
2924
|
return ve[this.granularity];
|
|
2922
2925
|
}
|
|
2923
2926
|
}
|
|
2924
|
-
class
|
|
2927
|
+
class Rs extends Ce {
|
|
2925
2928
|
startDate() {
|
|
2926
2929
|
return this.calculateStartDate(this.timeframe.isRelative, this.dataGranularity);
|
|
2927
2930
|
}
|
|
@@ -2932,7 +2935,7 @@ class Ys extends Ce {
|
|
|
2932
2935
|
return this.endDate().getTime() - this.startDate().getTime();
|
|
2933
2936
|
}
|
|
2934
2937
|
}
|
|
2935
|
-
class
|
|
2938
|
+
class ho extends Rs {
|
|
2936
2939
|
startDate() {
|
|
2937
2940
|
return this.calculateStartDate(this.timeframe.isRelative, this.dataGranularity, 2);
|
|
2938
2941
|
}
|
|
@@ -2941,7 +2944,7 @@ class fo extends Ys {
|
|
|
2941
2944
|
}
|
|
2942
2945
|
}
|
|
2943
2946
|
var Te = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2944
|
-
function
|
|
2947
|
+
function Hs(e) {
|
|
2945
2948
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
2946
2949
|
}
|
|
2947
2950
|
var xe = { exports: {} };
|
|
@@ -3010,7 +3013,7 @@ xe.exports;
|
|
|
3010
3013
|
return a ? "Symbol(src)_1." + a : "";
|
|
3011
3014
|
}(), Mt = un.toString, j = ye.hasOwnProperty, pe = ye.toString, cn = RegExp(
|
|
3012
3015
|
"^" + Mt.call(j).replace(Vr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
3013
|
-
), vt = Jr ? Y.Buffer : void 0, xt = Y.Symbol, Et = Y.Uint8Array, ln = Ie(Object.getPrototypeOf, Object), dn = Object.create, fn = ye.propertyIsEnumerable, hn = on.splice, Pt = Object.getOwnPropertySymbols, mn = vt ? vt.isBuffer : void 0, yn = Ie(Object.keys, Object), Ye = Z(Y, "DataView"),
|
|
3016
|
+
), vt = Jr ? Y.Buffer : void 0, xt = Y.Symbol, Et = Y.Uint8Array, ln = Ie(Object.getPrototypeOf, Object), dn = Object.create, fn = ye.propertyIsEnumerable, hn = on.splice, Pt = Object.getOwnPropertySymbols, mn = vt ? vt.isBuffer : void 0, yn = Ie(Object.keys, Object), Ye = Z(Y, "DataView"), ie = Z(Y, "Map"), qe = Z(Y, "Promise"), Re = Z(Y, "Set"), He = Z(Y, "WeakMap"), se = Z(Object, "create"), pn = U(Ye), gn = U(ie), _n = U(qe), wn = U(Re), bn = U(He), Nt = xt ? xt.prototype : void 0, Ct = Nt ? Nt.valueOf : void 0;
|
|
3014
3017
|
function W(a) {
|
|
3015
3018
|
var s = -1, u = a ? a.length : 0;
|
|
3016
3019
|
for (this.clear(); ++s < u; ) {
|
|
@@ -3019,14 +3022,14 @@ xe.exports;
|
|
|
3019
3022
|
}
|
|
3020
3023
|
}
|
|
3021
3024
|
function Tn() {
|
|
3022
|
-
this.__data__ =
|
|
3025
|
+
this.__data__ = se ? se(null) : {};
|
|
3023
3026
|
}
|
|
3024
3027
|
function Dn(a) {
|
|
3025
3028
|
return this.has(a) && delete this.__data__[a];
|
|
3026
3029
|
}
|
|
3027
3030
|
function On(a) {
|
|
3028
3031
|
var s = this.__data__;
|
|
3029
|
-
if (
|
|
3032
|
+
if (se) {
|
|
3030
3033
|
var u = s[a];
|
|
3031
3034
|
return u === n ? void 0 : u;
|
|
3032
3035
|
}
|
|
@@ -3034,14 +3037,14 @@ xe.exports;
|
|
|
3034
3037
|
}
|
|
3035
3038
|
function Sn(a) {
|
|
3036
3039
|
var s = this.__data__;
|
|
3037
|
-
return
|
|
3040
|
+
return se ? s[a] !== void 0 : j.call(s, a);
|
|
3038
3041
|
}
|
|
3039
3042
|
function Mn(a, s) {
|
|
3040
3043
|
var u = this.__data__;
|
|
3041
|
-
return u[a] =
|
|
3044
|
+
return u[a] = se && s === void 0 ? n : s, this;
|
|
3042
3045
|
}
|
|
3043
3046
|
W.prototype.clear = Tn, W.prototype.delete = Dn, W.prototype.get = On, W.prototype.has = Sn, W.prototype.set = Mn;
|
|
3044
|
-
function
|
|
3047
|
+
function q(a) {
|
|
3045
3048
|
var s = -1, u = a ? a.length : 0;
|
|
3046
3049
|
for (this.clear(); ++s < u; ) {
|
|
3047
3050
|
var l = a[s];
|
|
@@ -3069,7 +3072,7 @@ xe.exports;
|
|
|
3069
3072
|
var u = this.__data__, l = ge(u, a);
|
|
3070
3073
|
return l < 0 ? u.push([a, s]) : u[l][1] = s, this;
|
|
3071
3074
|
}
|
|
3072
|
-
|
|
3075
|
+
q.prototype.clear = vn, q.prototype.delete = xn, q.prototype.get = En, q.prototype.has = Pn, q.prototype.set = Nn;
|
|
3073
3076
|
function X(a) {
|
|
3074
3077
|
var s = -1, u = a ? a.length : 0;
|
|
3075
3078
|
for (this.clear(); ++s < u; ) {
|
|
@@ -3080,7 +3083,7 @@ xe.exports;
|
|
|
3080
3083
|
function Cn() {
|
|
3081
3084
|
this.__data__ = {
|
|
3082
3085
|
hash: new W(),
|
|
3083
|
-
map: new (
|
|
3086
|
+
map: new (ie || q)(),
|
|
3084
3087
|
string: new W()
|
|
3085
3088
|
};
|
|
3086
3089
|
}
|
|
@@ -3093,15 +3096,15 @@ xe.exports;
|
|
|
3093
3096
|
function Yn(a) {
|
|
3094
3097
|
return _e(this, a).has(a);
|
|
3095
3098
|
}
|
|
3096
|
-
function
|
|
3099
|
+
function qn(a, s) {
|
|
3097
3100
|
return _e(this, a).set(a, s), this;
|
|
3098
3101
|
}
|
|
3099
|
-
X.prototype.clear = Cn, X.prototype.delete = In, X.prototype.get = kn, X.prototype.has = Yn, X.prototype.set =
|
|
3102
|
+
X.prototype.clear = Cn, X.prototype.delete = In, X.prototype.get = kn, X.prototype.has = Yn, X.prototype.set = qn;
|
|
3100
3103
|
function Q(a) {
|
|
3101
|
-
this.__data__ = new
|
|
3104
|
+
this.__data__ = new q(a);
|
|
3102
3105
|
}
|
|
3103
|
-
function
|
|
3104
|
-
this.__data__ = new
|
|
3106
|
+
function Rn() {
|
|
3107
|
+
this.__data__ = new q();
|
|
3105
3108
|
}
|
|
3106
3109
|
function Hn(a) {
|
|
3107
3110
|
return this.__data__.delete(a);
|
|
@@ -3114,15 +3117,15 @@ xe.exports;
|
|
|
3114
3117
|
}
|
|
3115
3118
|
function Gn(a, s) {
|
|
3116
3119
|
var u = this.__data__;
|
|
3117
|
-
if (u instanceof
|
|
3120
|
+
if (u instanceof q) {
|
|
3118
3121
|
var l = u.__data__;
|
|
3119
|
-
if (!
|
|
3122
|
+
if (!ie || l.length < r - 1)
|
|
3120
3123
|
return l.push([a, s]), this;
|
|
3121
3124
|
u = this.__data__ = new X(l);
|
|
3122
3125
|
}
|
|
3123
3126
|
return u.set(a, s), this;
|
|
3124
3127
|
}
|
|
3125
|
-
Q.prototype.clear =
|
|
3128
|
+
Q.prototype.clear = Rn, Q.prototype.delete = Hn, Q.prototype.get = jn, Q.prototype.has = An, Q.prototype.set = Gn;
|
|
3126
3129
|
function Fn(a, s) {
|
|
3127
3130
|
var u = Ge(a) || da(a) ? an(a.length, String) : [], l = u.length, D = !!l;
|
|
3128
3131
|
for (var v in a)
|
|
@@ -3131,20 +3134,20 @@ xe.exports;
|
|
|
3131
3134
|
}
|
|
3132
3135
|
function It(a, s, u) {
|
|
3133
3136
|
var l = a[s];
|
|
3134
|
-
(!(j.call(a, s) &&
|
|
3137
|
+
(!(j.call(a, s) && Rt(l, u)) || u === void 0 && !(s in a)) && (a[s] = u);
|
|
3135
3138
|
}
|
|
3136
3139
|
function ge(a, s) {
|
|
3137
3140
|
for (var u = a.length; u--; )
|
|
3138
|
-
if (
|
|
3141
|
+
if (Rt(a[u][0], s))
|
|
3139
3142
|
return u;
|
|
3140
3143
|
return -1;
|
|
3141
3144
|
}
|
|
3142
3145
|
function Wn(a, s) {
|
|
3143
3146
|
return a && kt(s, Fe(s), a);
|
|
3144
3147
|
}
|
|
3145
|
-
function je(a, s, u, l, D, v,
|
|
3148
|
+
function je(a, s, u, l, D, v, R) {
|
|
3146
3149
|
var x;
|
|
3147
|
-
if (l && (x = v ? l(a, D, v,
|
|
3150
|
+
if (l && (x = v ? l(a, D, v, R) : l(a)), x !== void 0)
|
|
3148
3151
|
return x;
|
|
3149
3152
|
if (!we(a))
|
|
3150
3153
|
return a;
|
|
@@ -3167,14 +3170,14 @@ xe.exports;
|
|
|
3167
3170
|
x = sa(a, B, je, s);
|
|
3168
3171
|
}
|
|
3169
3172
|
}
|
|
3170
|
-
|
|
3171
|
-
var Ft =
|
|
3173
|
+
R || (R = new Q());
|
|
3174
|
+
var Ft = R.get(a);
|
|
3172
3175
|
if (Ft)
|
|
3173
3176
|
return Ft;
|
|
3174
|
-
if (
|
|
3177
|
+
if (R.set(a, x), !At)
|
|
3175
3178
|
var Wt = u ? na(a) : Fe(a);
|
|
3176
3179
|
return rn(Wt || a, function(We, be) {
|
|
3177
|
-
Wt && (be = We, We = a[be]), It(x, be, je(We, s, u, l, be, a,
|
|
3180
|
+
Wt && (be = We, We = a[be]), It(x, be, je(We, s, u, l, be, a, R));
|
|
3178
3181
|
}), x;
|
|
3179
3182
|
}
|
|
3180
3183
|
function Ln(a) {
|
|
@@ -3194,7 +3197,7 @@ xe.exports;
|
|
|
3194
3197
|
return s.test(U(a));
|
|
3195
3198
|
}
|
|
3196
3199
|
function Vn(a) {
|
|
3197
|
-
if (!
|
|
3200
|
+
if (!qt(a))
|
|
3198
3201
|
return yn(a);
|
|
3199
3202
|
var s = [];
|
|
3200
3203
|
for (var u in Object(a))
|
|
@@ -3243,8 +3246,8 @@ xe.exports;
|
|
|
3243
3246
|
function kt(a, s, u, l) {
|
|
3244
3247
|
u || (u = {});
|
|
3245
3248
|
for (var D = -1, v = s.length; ++D < v; ) {
|
|
3246
|
-
var
|
|
3247
|
-
It(u,
|
|
3249
|
+
var R = s[D], x = void 0;
|
|
3250
|
+
It(u, R, x === void 0 ? a[R] : x);
|
|
3248
3251
|
}
|
|
3249
3252
|
return u;
|
|
3250
3253
|
}
|
|
@@ -3263,7 +3266,7 @@ xe.exports;
|
|
|
3263
3266
|
return $n(u) ? u : void 0;
|
|
3264
3267
|
}
|
|
3265
3268
|
var Yt = Pt ? Ie(Pt, Object) : pa, L = zn;
|
|
3266
|
-
(Ye && L(new Ye(new ArrayBuffer(1))) != me ||
|
|
3269
|
+
(Ye && L(new Ye(new ArrayBuffer(1))) != me || ie && L(new ie()) != p || qe && L(qe.resolve()) != N || Re && L(new Re()) != G || He && L(new He()) != F) && (L = function(a) {
|
|
3267
3270
|
var s = pe.call(a), u = s == P ? a.constructor : void 0, l = u ? U(u) : void 0;
|
|
3268
3271
|
if (l)
|
|
3269
3272
|
switch (l) {
|
|
@@ -3285,7 +3288,7 @@ xe.exports;
|
|
|
3285
3288
|
return s && typeof a[0] == "string" && j.call(a, "index") && (u.index = a.index, u.input = a.input), u;
|
|
3286
3289
|
}
|
|
3287
3290
|
function ia(a) {
|
|
3288
|
-
return typeof a.constructor == "function" && !
|
|
3291
|
+
return typeof a.constructor == "function" && !qt(a) ? Ln(ln(a)) : {};
|
|
3289
3292
|
}
|
|
3290
3293
|
function sa(a, s, u, l) {
|
|
3291
3294
|
var D = a.constructor;
|
|
@@ -3330,7 +3333,7 @@ xe.exports;
|
|
|
3330
3333
|
function ca(a) {
|
|
3331
3334
|
return !!St && St in a;
|
|
3332
3335
|
}
|
|
3333
|
-
function
|
|
3336
|
+
function qt(a) {
|
|
3334
3337
|
var s = a && a.constructor, u = typeof s == "function" && s.prototype || ye;
|
|
3335
3338
|
return a === u;
|
|
3336
3339
|
}
|
|
@@ -3350,7 +3353,7 @@ xe.exports;
|
|
|
3350
3353
|
function la(a) {
|
|
3351
3354
|
return je(a, !0, !0);
|
|
3352
3355
|
}
|
|
3353
|
-
function
|
|
3356
|
+
function Rt(a, s) {
|
|
3354
3357
|
return a === s || a !== a && s !== s;
|
|
3355
3358
|
}
|
|
3356
3359
|
function da(a) {
|
|
@@ -3389,8 +3392,8 @@ xe.exports;
|
|
|
3389
3392
|
}
|
|
3390
3393
|
e.exports = la;
|
|
3391
3394
|
})(xe, xe.exports);
|
|
3392
|
-
var
|
|
3393
|
-
const
|
|
3395
|
+
var js = xe.exports;
|
|
3396
|
+
const As = /* @__PURE__ */ Hs(js), te = (e, t) => new Date(e.getTime() - Lr(t, e));
|
|
3394
3397
|
class C {
|
|
3395
3398
|
constructor(t) {
|
|
3396
3399
|
b(this, "timeframeText");
|
|
@@ -3459,11 +3462,11 @@ class C {
|
|
|
3459
3462
|
tzAdjustedDate(t) {
|
|
3460
3463
|
if (!t)
|
|
3461
3464
|
return /* @__PURE__ */ new Date();
|
|
3462
|
-
const r =
|
|
3465
|
+
const r = ks(/* @__PURE__ */ new Date(), new Intl.DateTimeFormat().resolvedOptions().timeZone);
|
|
3463
3466
|
return Wr(r, t);
|
|
3464
3467
|
}
|
|
3465
3468
|
}
|
|
3466
|
-
class
|
|
3469
|
+
class Gs extends C {
|
|
3467
3470
|
rawStart(t) {
|
|
3468
3471
|
let r = H(this.tzAdjustedDate(t), { weekStartsOn: 1 });
|
|
3469
3472
|
return t && (r = te(r, t)), r;
|
|
@@ -3472,7 +3475,7 @@ class js extends C {
|
|
|
3472
3475
|
return 60 * 60 * 24 * 7;
|
|
3473
3476
|
}
|
|
3474
3477
|
}
|
|
3475
|
-
class
|
|
3478
|
+
class Fs extends C {
|
|
3476
3479
|
rawStart(t) {
|
|
3477
3480
|
let r = ee(this.tzAdjustedDate(t));
|
|
3478
3481
|
return t && (r = te(r, t)), r;
|
|
@@ -3481,7 +3484,7 @@ class As extends C {
|
|
|
3481
3484
|
return 60 * 60 * 24 * 31;
|
|
3482
3485
|
}
|
|
3483
3486
|
}
|
|
3484
|
-
class
|
|
3487
|
+
class Ws extends C {
|
|
3485
3488
|
rawEnd(t) {
|
|
3486
3489
|
let r = H(this.tzAdjustedDate(t), { weekStartsOn: 1 });
|
|
3487
3490
|
return t && (r = te(r, t)), r;
|
|
@@ -3494,7 +3497,7 @@ class Gs extends C {
|
|
|
3494
3497
|
return t && (n = te(n, t)), n;
|
|
3495
3498
|
}
|
|
3496
3499
|
}
|
|
3497
|
-
class
|
|
3500
|
+
class Ls extends C {
|
|
3498
3501
|
rawEnd(t) {
|
|
3499
3502
|
let r = ee(this.tzAdjustedDate(t));
|
|
3500
3503
|
return t && (r = te(r, t)), r;
|
|
@@ -3504,7 +3507,7 @@ class Fs extends C {
|
|
|
3504
3507
|
return t && (r = te(r, t)), r;
|
|
3505
3508
|
}
|
|
3506
3509
|
}
|
|
3507
|
-
const
|
|
3510
|
+
const Us = /* @__PURE__ */ new Map([
|
|
3508
3511
|
[
|
|
3509
3512
|
m.FIFTEEN_MIN,
|
|
3510
3513
|
new C({
|
|
@@ -3612,7 +3615,7 @@ const Ws = /* @__PURE__ */ new Map([
|
|
|
3612
3615
|
],
|
|
3613
3616
|
[
|
|
3614
3617
|
m.CURRENT_WEEK,
|
|
3615
|
-
new
|
|
3618
|
+
new Gs({
|
|
3616
3619
|
key: m.CURRENT_WEEK,
|
|
3617
3620
|
display: "This week",
|
|
3618
3621
|
timeframeText: "Week",
|
|
@@ -3630,7 +3633,7 @@ const Ws = /* @__PURE__ */ new Map([
|
|
|
3630
3633
|
],
|
|
3631
3634
|
[
|
|
3632
3635
|
m.CURRENT_MONTH,
|
|
3633
|
-
new
|
|
3636
|
+
new Fs({
|
|
3634
3637
|
key: m.CURRENT_MONTH,
|
|
3635
3638
|
display: "This month",
|
|
3636
3639
|
timeframeText: "Month",
|
|
@@ -3646,7 +3649,7 @@ const Ws = /* @__PURE__ */ new Map([
|
|
|
3646
3649
|
],
|
|
3647
3650
|
[
|
|
3648
3651
|
m.PREVIOUS_WEEK,
|
|
3649
|
-
new
|
|
3652
|
+
new Ws({
|
|
3650
3653
|
key: m.PREVIOUS_WEEK,
|
|
3651
3654
|
display: "Previous week",
|
|
3652
3655
|
timeframeText: "Week",
|
|
@@ -3661,14 +3664,14 @@ const Ws = /* @__PURE__ */ new Map([
|
|
|
3661
3664
|
],
|
|
3662
3665
|
[
|
|
3663
3666
|
m.PREVIOUS_MONTH,
|
|
3664
|
-
new
|
|
3667
|
+
new Ls({
|
|
3665
3668
|
key: m.PREVIOUS_MONTH,
|
|
3666
3669
|
display: "Previous month",
|
|
3667
3670
|
timeframeText: "Month",
|
|
3668
3671
|
timeframeLength: () => {
|
|
3669
3672
|
let e = 0;
|
|
3670
3673
|
const t = ee(/* @__PURE__ */ new Date()), r = ee(Ar(/* @__PURE__ */ new Date()));
|
|
3671
|
-
return t.getTimezoneOffset() !== r.getTimezoneOffset() && (e =
|
|
3674
|
+
return t.getTimezoneOffset() !== r.getTimezoneOffset() && (e = zs(t, r)), 60 * 60 * 24 * rs((/* @__PURE__ */ new Date()).setMonth((/* @__PURE__ */ new Date()).getMonth() - 1)) + as(e);
|
|
3672
3675
|
},
|
|
3673
3676
|
defaultResponseGranularity: "daily",
|
|
3674
3677
|
dataGranularity: "daily",
|
|
@@ -3677,9 +3680,9 @@ const Ws = /* @__PURE__ */ new Map([
|
|
|
3677
3680
|
})
|
|
3678
3681
|
]
|
|
3679
3682
|
]);
|
|
3680
|
-
function
|
|
3683
|
+
function mo(e) {
|
|
3681
3684
|
const t = new Date(e.start), r = new Date(e.end), n = (r.getTime() - t.getTime()) / 1e3;
|
|
3682
|
-
return e.timePeriodsKey &&
|
|
3685
|
+
return e.timePeriodsKey && As(Us.get(e.timePeriodsKey)) || new C({
|
|
3683
3686
|
key: "custom",
|
|
3684
3687
|
timeframeText: "custom",
|
|
3685
3688
|
display: "custom",
|
|
@@ -3692,14 +3695,14 @@ function ho(e) {
|
|
|
3692
3695
|
allowedTiers: ["free", "plus", "enterprise"]
|
|
3693
3696
|
});
|
|
3694
3697
|
}
|
|
3695
|
-
function
|
|
3698
|
+
function yo(e) {
|
|
3696
3699
|
return {
|
|
3697
3700
|
...e.key !== "custom" && { timePeriodsKey: e.key },
|
|
3698
3701
|
start: e.rawStart(),
|
|
3699
3702
|
end: e.rawEnd()
|
|
3700
3703
|
};
|
|
3701
3704
|
}
|
|
3702
|
-
function
|
|
3705
|
+
function po(e) {
|
|
3703
3706
|
return {
|
|
3704
3707
|
key: e.key,
|
|
3705
3708
|
display: e.display,
|
|
@@ -3710,10 +3713,10 @@ function yo(e) {
|
|
|
3710
3713
|
end: () => e.rawEnd()
|
|
3711
3714
|
};
|
|
3712
3715
|
}
|
|
3713
|
-
function
|
|
3714
|
-
return
|
|
3716
|
+
function zs(e, t) {
|
|
3717
|
+
return is(e.getTimezoneOffset() - t.getTimezoneOffset());
|
|
3715
3718
|
}
|
|
3716
|
-
const
|
|
3719
|
+
const go = {
|
|
3717
3720
|
"15M": m.FIFTEEN_MIN,
|
|
3718
3721
|
"1H": m.ONE_HOUR,
|
|
3719
3722
|
"6H": m.SIX_HOUR,
|
|
@@ -3742,7 +3745,7 @@ class ot {
|
|
|
3742
3745
|
return Math.floor(i * (r - t + 1)) + t;
|
|
3743
3746
|
}
|
|
3744
3747
|
}
|
|
3745
|
-
const
|
|
3748
|
+
const _o = (e, t, r) => {
|
|
3746
3749
|
const n = $r(10, 1e4), i = new ot(n), o = Date.now() - 6 * 60 * 60 * 1e3, c = Date.now(), d = [];
|
|
3747
3750
|
let h = 0;
|
|
3748
3751
|
for (let y = o; y <= c; y += 60 * 60 * 1e3)
|
|
@@ -3799,7 +3802,7 @@ const go = (e, t, r) => {
|
|
|
3799
3802
|
data: d,
|
|
3800
3803
|
meta: _
|
|
3801
3804
|
};
|
|
3802
|
-
},
|
|
3805
|
+
}, wo = (e, t) => {
|
|
3803
3806
|
const r = $r(10, 1e4), n = new ot(r), i = Date.now() - 6 * 60 * 60 * 1e3, o = Date.now(), c = [], d = {};
|
|
3804
3807
|
e.forEach((f) => {
|
|
3805
3808
|
d[f.name] = 0;
|
|
@@ -3833,7 +3836,7 @@ const go = (e, t, r) => {
|
|
|
3833
3836
|
data: c,
|
|
3834
3837
|
meta: h
|
|
3835
3838
|
};
|
|
3836
|
-
},
|
|
3839
|
+
}, bo = (e, t, r) => {
|
|
3837
3840
|
const n = Math.floor(Math.random() * 9991) + 10, i = new ot(n), o = Date.now() - 6 * 60 * 60 * 1e3, c = Date.now(), d = new Date((o + c) / 2).toISOString(), h = [];
|
|
3838
3841
|
if (t) {
|
|
3839
3842
|
const y = Object.keys(t), p = Object.values(t), E = (P, N) => {
|
|
@@ -3894,77 +3897,78 @@ function $r(e, t) {
|
|
|
3894
3897
|
return e = Math.ceil(e), t = Math.floor(t), Math.floor(Math.random() * (t - e + 1) + e);
|
|
3895
3898
|
}
|
|
3896
3899
|
export {
|
|
3897
|
-
|
|
3900
|
+
ho as DeltaQueryTime,
|
|
3898
3901
|
ve as Granularities,
|
|
3899
|
-
|
|
3902
|
+
Vs as REFRESH_INTERVAL_MS,
|
|
3900
3903
|
ot as SeededRandom,
|
|
3901
|
-
|
|
3902
|
-
|
|
3904
|
+
go as TIMEFRAME_LOOKUP,
|
|
3905
|
+
Us as TimePeriods,
|
|
3903
3906
|
C as Timeframe,
|
|
3904
3907
|
m as TimeframeKeys,
|
|
3905
|
-
|
|
3906
|
-
|
|
3908
|
+
fo as TimeseriesQueryTime,
|
|
3909
|
+
Rs as UnaryQueryTime,
|
|
3907
3910
|
mr as aiExploreAggregations,
|
|
3908
|
-
|
|
3909
|
-
|
|
3911
|
+
Ga as apiUsageQuerySchema,
|
|
3912
|
+
Ca as barChartSchema,
|
|
3910
3913
|
Be as basicExploreAggregations,
|
|
3911
|
-
|
|
3914
|
+
Fa as basicQuerySchema,
|
|
3912
3915
|
zr as ceilToNearestTimeGrain,
|
|
3913
3916
|
io as dashboardConfigSchema,
|
|
3914
3917
|
ao as dashboardTileTypes,
|
|
3915
3918
|
no as dashboardsSchemaV1,
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3919
|
+
Ma as datasourceToFilterableDimensions,
|
|
3920
|
+
mo as datePickerSelectionToTimeframe,
|
|
3921
|
+
Ya as donutChartSchema,
|
|
3922
|
+
zs as dstOffsetHours,
|
|
3920
3923
|
hr as exploreAggregations,
|
|
3921
3924
|
lr as exploreFilterTypesV2,
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3925
|
+
ae as filterableAiExploreDimensions,
|
|
3926
|
+
re as filterableBasicExploreDimensions,
|
|
3927
|
+
ne as filterableExploreDimensions,
|
|
3928
|
+
Ta as filterableRequestDimensions,
|
|
3929
|
+
Sa as filterableRequestMetrics,
|
|
3930
|
+
Js as filterableRequestWildcardDimensions,
|
|
3931
|
+
qs as floorToNearestTimeGrain,
|
|
3932
|
+
oo as formatISOTimeWithTZ,
|
|
3930
3933
|
cr as formatTime,
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3934
|
+
uo as formatTimeRange,
|
|
3935
|
+
ka as gaugeChartSchema,
|
|
3936
|
+
bo as generateCrossSectionalData,
|
|
3937
|
+
wo as generateMultipleMetricTimeSeriesData,
|
|
3938
|
+
_o as generateSingleMetricTimeSeriesData,
|
|
3939
|
+
so as getFieldDataSources,
|
|
3940
|
+
co as granularitiesToOptions,
|
|
3941
|
+
Ys as granularityMsToQuery,
|
|
3938
3942
|
Ze as granularityValues,
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3943
|
+
Wa as llmUsageSchema,
|
|
3944
|
+
Ra as metricCardSchema,
|
|
3945
|
+
lo as msToGranularity,
|
|
3942
3946
|
to as queryDatasources,
|
|
3943
3947
|
Je as queryableAiExploreDimensions,
|
|
3944
3948
|
Ee as queryableBasicExploreDimensions,
|
|
3945
3949
|
Ke as queryableExploreDimensions,
|
|
3946
3950
|
ba as queryableRequestDimensions,
|
|
3947
|
-
|
|
3948
|
-
|
|
3951
|
+
Oa as queryableRequestMetrics,
|
|
3952
|
+
Da as queryableRequestWildcardDimensions,
|
|
3949
3953
|
$r as rand,
|
|
3950
3954
|
eo as relativeTimeRangeValuesRequestV2,
|
|
3951
3955
|
fr as relativeTimeRangeValuesV4,
|
|
3952
|
-
|
|
3956
|
+
Xs as reportChartTypes,
|
|
3953
3957
|
dr as requestFilterTypeEmptyV2,
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3958
|
+
Qs as requestFilterTypeEqualsV2,
|
|
3959
|
+
Zs as requestFilterTypeMetricV2,
|
|
3960
|
+
Bs as requestFilterTypeWildcardV2,
|
|
3961
|
+
Ha as singleValueSchema,
|
|
3962
|
+
Na as slottableSchema,
|
|
3959
3963
|
ro as stripUnknownFilters,
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3964
|
+
$a as tileConfigSchema,
|
|
3965
|
+
Ua as tileDefinitionSchema,
|
|
3966
|
+
za as tileLayoutSchema,
|
|
3967
|
+
Ks as timeRangeTypeV2,
|
|
3968
|
+
yo as timeframeToDatepickerSelection,
|
|
3969
|
+
po as timeframeToDatepickerTimeperiod,
|
|
3970
|
+
Ia as timeseriesChartSchema,
|
|
3971
|
+
qa as topNTableSchema,
|
|
3972
|
+
La as validDashboardQuery
|
|
3969
3973
|
};
|
|
3970
3974
|
//# sourceMappingURL=vitals-utilities.es.js.map
|