@kong-ui-public/analytics-utilities 6.1.1 → 6.2.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/format.d.ts +1 -1
- package/dist/types/format.d.ts.map +1 -1
- package/dist/types/timeframes.d.ts +2 -0
- package/dist/types/timeframes.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 +447 -427
- 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,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var _ = (e, t, r) =>
|
|
1
|
+
var Vn = Object.defineProperty;
|
|
2
|
+
var $n = (e, t, r) => t in e ? Vn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var _ = (e, t, r) => $n(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
const gs = 3e4;
|
|
5
|
-
var
|
|
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
6
|
const ps = [
|
|
7
7
|
"horizontal_bar",
|
|
8
8
|
"vertical_bar",
|
|
9
9
|
"timeseries_line",
|
|
10
10
|
"choropleth_map",
|
|
11
11
|
"timeseries_bar"
|
|
12
|
-
],
|
|
12
|
+
], Pt = ["in", "not_in", "selector"], ws = ["=", "!="], _s = ["=", "!=", "<", ">", "<=", ">="], Xn = ["empty", "not_empty"], bs = ["starts_with", "ends_with"], Ts = ["absolute", "relative"], Qn = [
|
|
13
13
|
"15m",
|
|
14
14
|
"1h",
|
|
15
15
|
"6h",
|
|
@@ -157,7 +157,7 @@ const ps = [
|
|
|
157
157
|
"service_protocol",
|
|
158
158
|
"trace_id",
|
|
159
159
|
"upstream_uri"
|
|
160
|
-
],
|
|
160
|
+
], Os = Kn, ea = [
|
|
161
161
|
"ai_count",
|
|
162
162
|
"latencies_response_ms",
|
|
163
163
|
"latencies_upstream_ms",
|
|
@@ -167,7 +167,7 @@ const ps = [
|
|
|
167
167
|
"response_header_content_length",
|
|
168
168
|
"status_code",
|
|
169
169
|
"upstream_status_code"
|
|
170
|
-
],
|
|
170
|
+
], Ms = ae(ea), vs = [
|
|
171
171
|
"15M",
|
|
172
172
|
"1H",
|
|
173
173
|
"6H",
|
|
@@ -389,14 +389,14 @@ const ps = [
|
|
|
389
389
|
meta: {
|
|
390
390
|
type: "object"
|
|
391
391
|
}
|
|
392
|
-
},
|
|
392
|
+
}, Ue = (e) => ({
|
|
393
393
|
type: "array",
|
|
394
394
|
description: "List of aggregated metrics to collect across the requested time span.",
|
|
395
395
|
items: {
|
|
396
396
|
type: "string",
|
|
397
397
|
enum: e
|
|
398
398
|
}
|
|
399
|
-
}),
|
|
399
|
+
}), ze = (e) => ({
|
|
400
400
|
type: "array",
|
|
401
401
|
description: "List of attributes or entity types to group by.",
|
|
402
402
|
minItems: 0,
|
|
@@ -405,7 +405,7 @@ const ps = [
|
|
|
405
405
|
type: "string",
|
|
406
406
|
enum: e
|
|
407
407
|
}
|
|
408
|
-
}),
|
|
408
|
+
}), Ve = (e) => ({
|
|
409
409
|
type: "array",
|
|
410
410
|
description: "A list of filters to apply to the query",
|
|
411
411
|
items: {
|
|
@@ -420,7 +420,7 @@ const ps = [
|
|
|
420
420
|
},
|
|
421
421
|
type: {
|
|
422
422
|
type: "string",
|
|
423
|
-
enum:
|
|
423
|
+
enum: Pt
|
|
424
424
|
},
|
|
425
425
|
values: {
|
|
426
426
|
type: "array",
|
|
@@ -446,7 +446,7 @@ const ps = [
|
|
|
446
446
|
},
|
|
447
447
|
operator: {
|
|
448
448
|
type: "string",
|
|
449
|
-
enum:
|
|
449
|
+
enum: Pt
|
|
450
450
|
},
|
|
451
451
|
value: {
|
|
452
452
|
type: "array",
|
|
@@ -493,9 +493,9 @@ const ps = [
|
|
|
493
493
|
"advanced"
|
|
494
494
|
]
|
|
495
495
|
},
|
|
496
|
-
metrics:
|
|
497
|
-
dimensions:
|
|
498
|
-
filters:
|
|
496
|
+
metrics: Ue(Zn),
|
|
497
|
+
dimensions: ze(rr),
|
|
498
|
+
filters: Ve(nr),
|
|
499
499
|
...Le
|
|
500
500
|
},
|
|
501
501
|
required: ["datasource"],
|
|
@@ -510,9 +510,9 @@ const ps = [
|
|
|
510
510
|
"basic"
|
|
511
511
|
]
|
|
512
512
|
},
|
|
513
|
-
metrics:
|
|
514
|
-
dimensions:
|
|
515
|
-
filters:
|
|
513
|
+
metrics: Ue(tr),
|
|
514
|
+
dimensions: ze(je),
|
|
515
|
+
filters: Ve(er),
|
|
516
516
|
...Le
|
|
517
517
|
},
|
|
518
518
|
required: ["datasource"],
|
|
@@ -527,9 +527,9 @@ const ps = [
|
|
|
527
527
|
"ai"
|
|
528
528
|
]
|
|
529
529
|
},
|
|
530
|
-
metrics:
|
|
531
|
-
dimensions:
|
|
532
|
-
filters:
|
|
530
|
+
metrics: Ue(Bn),
|
|
531
|
+
dimensions: ze(ar),
|
|
532
|
+
filters: Ve(ir),
|
|
533
533
|
...Le
|
|
534
534
|
},
|
|
535
535
|
required: ["datasource"],
|
|
@@ -591,7 +591,7 @@ const ps = [
|
|
|
591
591
|
},
|
|
592
592
|
required: ["definition", "layout"],
|
|
593
593
|
additionalProperties: !1
|
|
594
|
-
},
|
|
594
|
+
}, Ns = {
|
|
595
595
|
type: "object",
|
|
596
596
|
properties: {
|
|
597
597
|
tiles: {
|
|
@@ -619,14 +619,14 @@ const ps = [
|
|
|
619
619
|
},
|
|
620
620
|
required: ["tiles", "gridSize"],
|
|
621
621
|
additionalProperties: !1
|
|
622
|
-
}, ur = 6048e5, ga = 864e5, pa = 60, wa = 3600,
|
|
622
|
+
}, ur = 6048e5, ga = 864e5, pa = 60, wa = 3600, It = Symbol.for("constructDateFrom");
|
|
623
623
|
function k(e, t) {
|
|
624
|
-
return typeof e == "function" ? e(t) : e && typeof e == "object" &&
|
|
624
|
+
return typeof e == "function" ? e(t) : e && typeof e == "object" && It in e ? e[It](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
625
625
|
}
|
|
626
626
|
function D(e, t) {
|
|
627
627
|
return k(t || e, e);
|
|
628
628
|
}
|
|
629
|
-
function
|
|
629
|
+
function Ct(e, t, r) {
|
|
630
630
|
const n = D(e, r == null ? void 0 : r.in);
|
|
631
631
|
return isNaN(t) ? k(e, NaN) : (n.setDate(n.getDate() + t), n);
|
|
632
632
|
}
|
|
@@ -646,13 +646,13 @@ let ba = {};
|
|
|
646
646
|
function se() {
|
|
647
647
|
return ba;
|
|
648
648
|
}
|
|
649
|
-
function
|
|
650
|
-
var d, f,
|
|
651
|
-
const r = se(), n = (t == null ? void 0 : t.weekStartsOn) ?? ((f = (d = t == null ? void 0 : t.locale) == null ? void 0 : d.options) == null ? void 0 : f.weekStartsOn) ?? r.weekStartsOn ?? ((h = (
|
|
649
|
+
function H(e, t) {
|
|
650
|
+
var d, f, y, h;
|
|
651
|
+
const r = se(), n = (t == null ? void 0 : t.weekStartsOn) ?? ((f = (d = t == null ? void 0 : t.locale) == null ? void 0 : d.options) == null ? void 0 : f.weekStartsOn) ?? r.weekStartsOn ?? ((h = (y = r.locale) == null ? void 0 : y.options) == null ? void 0 : h.weekStartsOn) ?? 0, i = D(e, t == null ? void 0 : t.in), o = i.getDay(), c = (o < n ? 7 : 0) + o - n;
|
|
652
652
|
return i.setDate(i.getDate() - c), i.setHours(0, 0, 0, 0), i;
|
|
653
653
|
}
|
|
654
654
|
function ge(e, t) {
|
|
655
|
-
return
|
|
655
|
+
return H(e, { ...t, weekStartsOn: 1 });
|
|
656
656
|
}
|
|
657
657
|
function cr(e, t) {
|
|
658
658
|
const r = D(e, t == null ? void 0 : t.in), n = r.getFullYear(), i = k(r, 0);
|
|
@@ -662,7 +662,7 @@ function cr(e, t) {
|
|
|
662
662
|
const d = ge(c);
|
|
663
663
|
return r.getTime() >= o.getTime() ? n + 1 : r.getTime() >= d.getTime() ? n : n - 1;
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function Yt(e) {
|
|
666
666
|
const t = D(e), r = new Date(
|
|
667
667
|
Date.UTC(
|
|
668
668
|
t.getFullYear(),
|
|
@@ -692,18 +692,18 @@ function Da(e, t, r) {
|
|
|
692
692
|
r == null ? void 0 : r.in,
|
|
693
693
|
e,
|
|
694
694
|
t
|
|
695
|
-
), o = pe(n), c = pe(i), d = +o -
|
|
695
|
+
), o = pe(n), c = pe(i), d = +o - Yt(o), f = +c - Yt(c);
|
|
696
696
|
return Math.round((d - f) / ga);
|
|
697
697
|
}
|
|
698
|
-
function
|
|
698
|
+
function Oa(e, t) {
|
|
699
699
|
const r = cr(e, t), n = k(e, 0);
|
|
700
700
|
return n.setFullYear(r, 0, 4), n.setHours(0, 0, 0, 0), ge(n);
|
|
701
701
|
}
|
|
702
|
-
function
|
|
702
|
+
function Ma(e) {
|
|
703
703
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
704
704
|
}
|
|
705
705
|
function va(e) {
|
|
706
|
-
return !(!
|
|
706
|
+
return !(!Ma(e) && typeof e != "number" || isNaN(+D(e)));
|
|
707
707
|
}
|
|
708
708
|
function B(e, t) {
|
|
709
709
|
const r = D(e, t == null ? void 0 : t.in);
|
|
@@ -786,12 +786,12 @@ function Re(e) {
|
|
|
786
786
|
return e.formats[r] || e.formats[e.defaultWidth];
|
|
787
787
|
};
|
|
788
788
|
}
|
|
789
|
-
const
|
|
789
|
+
const Na = {
|
|
790
790
|
full: "EEEE, MMMM do, y",
|
|
791
791
|
long: "MMMM do, y",
|
|
792
792
|
medium: "MMM d, y",
|
|
793
793
|
short: "MM/dd/yyyy"
|
|
794
|
-
},
|
|
794
|
+
}, Pa = {
|
|
795
795
|
full: "h:mm:ss a zzzz",
|
|
796
796
|
long: "h:mm:ss a z",
|
|
797
797
|
medium: "h:mm:ss a",
|
|
@@ -801,27 +801,27 @@ const Pa = {
|
|
|
801
801
|
long: "{{date}} 'at' {{time}}",
|
|
802
802
|
medium: "{{date}}, {{time}}",
|
|
803
803
|
short: "{{date}}, {{time}}"
|
|
804
|
-
},
|
|
804
|
+
}, Ia = {
|
|
805
805
|
date: Re({
|
|
806
|
-
formats:
|
|
806
|
+
formats: Na,
|
|
807
807
|
defaultWidth: "full"
|
|
808
808
|
}),
|
|
809
809
|
time: Re({
|
|
810
|
-
formats:
|
|
810
|
+
formats: Pa,
|
|
811
811
|
defaultWidth: "full"
|
|
812
812
|
}),
|
|
813
813
|
dateTime: Re({
|
|
814
814
|
formats: ka,
|
|
815
815
|
defaultWidth: "full"
|
|
816
816
|
})
|
|
817
|
-
},
|
|
817
|
+
}, Ca = {
|
|
818
818
|
lastWeek: "'last' eeee 'at' p",
|
|
819
819
|
yesterday: "'yesterday at' p",
|
|
820
820
|
today: "'today at' p",
|
|
821
821
|
tomorrow: "'tomorrow at' p",
|
|
822
822
|
nextWeek: "eeee 'at' p",
|
|
823
823
|
other: "P"
|
|
824
|
-
},
|
|
824
|
+
}, Ya = (e, t, r, n) => Ca[e];
|
|
825
825
|
function re(e) {
|
|
826
826
|
return (t, r) => {
|
|
827
827
|
const n = r != null && r.context ? String(r.context) : "standalone";
|
|
@@ -841,11 +841,11 @@ const Ra = {
|
|
|
841
841
|
narrow: ["B", "A"],
|
|
842
842
|
abbreviated: ["BC", "AD"],
|
|
843
843
|
wide: ["Before Christ", "Anno Domini"]
|
|
844
|
-
},
|
|
844
|
+
}, Ha = {
|
|
845
845
|
narrow: ["1", "2", "3", "4"],
|
|
846
846
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
847
847
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
848
|
-
},
|
|
848
|
+
}, Ga = {
|
|
849
849
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
850
850
|
abbreviated: [
|
|
851
851
|
"Jan",
|
|
@@ -875,7 +875,7 @@ const Ra = {
|
|
|
875
875
|
"November",
|
|
876
876
|
"December"
|
|
877
877
|
]
|
|
878
|
-
},
|
|
878
|
+
}, Aa = {
|
|
879
879
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
880
880
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
881
881
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -888,7 +888,7 @@ const Ra = {
|
|
|
888
888
|
"Friday",
|
|
889
889
|
"Saturday"
|
|
890
890
|
]
|
|
891
|
-
},
|
|
891
|
+
}, Wa = {
|
|
892
892
|
narrow: {
|
|
893
893
|
am: "a",
|
|
894
894
|
pm: "p",
|
|
@@ -919,7 +919,7 @@ const Ra = {
|
|
|
919
919
|
evening: "evening",
|
|
920
920
|
night: "night"
|
|
921
921
|
}
|
|
922
|
-
},
|
|
922
|
+
}, Fa = {
|
|
923
923
|
narrow: {
|
|
924
924
|
am: "a",
|
|
925
925
|
pm: "p",
|
|
@@ -950,7 +950,7 @@ const Ra = {
|
|
|
950
950
|
evening: "in the evening",
|
|
951
951
|
night: "at night"
|
|
952
952
|
}
|
|
953
|
-
},
|
|
953
|
+
}, qa = (e, t) => {
|
|
954
954
|
const r = Number(e), n = r % 100;
|
|
955
955
|
if (n > 20 || n < 10)
|
|
956
956
|
switch (n % 10) {
|
|
@@ -963,28 +963,28 @@ const Ra = {
|
|
|
963
963
|
}
|
|
964
964
|
return r + "th";
|
|
965
965
|
}, ja = {
|
|
966
|
-
ordinalNumber:
|
|
966
|
+
ordinalNumber: qa,
|
|
967
967
|
era: re({
|
|
968
968
|
values: Ra,
|
|
969
969
|
defaultWidth: "wide"
|
|
970
970
|
}),
|
|
971
971
|
quarter: re({
|
|
972
|
-
values:
|
|
972
|
+
values: Ha,
|
|
973
973
|
defaultWidth: "wide",
|
|
974
974
|
argumentCallback: (e) => e - 1
|
|
975
975
|
}),
|
|
976
976
|
month: re({
|
|
977
|
-
values:
|
|
977
|
+
values: Ga,
|
|
978
978
|
defaultWidth: "wide"
|
|
979
979
|
}),
|
|
980
980
|
day: re({
|
|
981
|
-
values:
|
|
981
|
+
values: Aa,
|
|
982
982
|
defaultWidth: "wide"
|
|
983
983
|
}),
|
|
984
984
|
dayPeriod: re({
|
|
985
|
-
values:
|
|
985
|
+
values: Wa,
|
|
986
986
|
defaultWidth: "wide",
|
|
987
|
-
formattingValues:
|
|
987
|
+
formattingValues: Fa,
|
|
988
988
|
defaultFormattingWidth: "wide"
|
|
989
989
|
})
|
|
990
990
|
};
|
|
@@ -993,17 +993,17 @@ function ne(e) {
|
|
|
993
993
|
const n = r.width, i = n && e.matchPatterns[n] || e.matchPatterns[e.defaultMatchWidth], o = t.match(i);
|
|
994
994
|
if (!o)
|
|
995
995
|
return null;
|
|
996
|
-
const c = o[0], d = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], f = Array.isArray(d) ?
|
|
996
|
+
const c = o[0], d = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], f = Array.isArray(d) ? Ua(d, (g) => g.test(c)) : (
|
|
997
997
|
// [TODO] -- I challenge you to fix the type
|
|
998
|
-
La(d, (
|
|
998
|
+
La(d, (g) => g.test(c))
|
|
999
999
|
);
|
|
1000
|
-
let
|
|
1001
|
-
|
|
1000
|
+
let y;
|
|
1001
|
+
y = e.valueCallback ? e.valueCallback(f) : f, y = r.valueCallback ? (
|
|
1002
1002
|
// [TODO] -- I challenge you to fix the type
|
|
1003
|
-
r.valueCallback(
|
|
1004
|
-
) :
|
|
1003
|
+
r.valueCallback(y)
|
|
1004
|
+
) : y;
|
|
1005
1005
|
const h = t.slice(c.length);
|
|
1006
|
-
return { value:
|
|
1006
|
+
return { value: y, rest: h };
|
|
1007
1007
|
};
|
|
1008
1008
|
}
|
|
1009
1009
|
function La(e, t) {
|
|
@@ -1011,12 +1011,12 @@ function La(e, t) {
|
|
|
1011
1011
|
if (Object.prototype.hasOwnProperty.call(e, r) && t(e[r]))
|
|
1012
1012
|
return r;
|
|
1013
1013
|
}
|
|
1014
|
-
function
|
|
1014
|
+
function Ua(e, t) {
|
|
1015
1015
|
for (let r = 0; r < e.length; r++)
|
|
1016
1016
|
if (t(e[r]))
|
|
1017
1017
|
return r;
|
|
1018
1018
|
}
|
|
1019
|
-
function
|
|
1019
|
+
function za(e) {
|
|
1020
1020
|
return (t, r = {}) => {
|
|
1021
1021
|
const n = t.match(e.matchPattern);
|
|
1022
1022
|
if (!n) return null;
|
|
@@ -1028,7 +1028,7 @@ function Ua(e) {
|
|
|
1028
1028
|
return { value: c, rest: d };
|
|
1029
1029
|
};
|
|
1030
1030
|
}
|
|
1031
|
-
const
|
|
1031
|
+
const Va = /^(\d+)(th|st|nd|rd)?/i, $a = /\d+/i, Xa = {
|
|
1032
1032
|
narrow: /^(b|a)/i,
|
|
1033
1033
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
1034
1034
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
@@ -1096,9 +1096,9 @@ const $a = /^(\d+)(th|st|nd|rd)?/i, Va = /\d+/i, Xa = {
|
|
|
1096
1096
|
night: /night/i
|
|
1097
1097
|
}
|
|
1098
1098
|
}, ai = {
|
|
1099
|
-
ordinalNumber:
|
|
1100
|
-
matchPattern:
|
|
1101
|
-
parsePattern:
|
|
1099
|
+
ordinalNumber: za({
|
|
1100
|
+
matchPattern: Va,
|
|
1101
|
+
parsePattern: $a,
|
|
1102
1102
|
valueCallback: (e) => parseInt(e, 10)
|
|
1103
1103
|
}),
|
|
1104
1104
|
era: ne({
|
|
@@ -1135,8 +1135,8 @@ const $a = /^(\d+)(th|st|nd|rd)?/i, Va = /\d+/i, Xa = {
|
|
|
1135
1135
|
}, ii = {
|
|
1136
1136
|
code: "en-US",
|
|
1137
1137
|
formatDistance: Ea,
|
|
1138
|
-
formatLong:
|
|
1139
|
-
formatRelative:
|
|
1138
|
+
formatLong: Ia,
|
|
1139
|
+
formatRelative: Ya,
|
|
1140
1140
|
localize: ja,
|
|
1141
1141
|
match: ai,
|
|
1142
1142
|
options: {
|
|
@@ -1149,45 +1149,45 @@ function si(e, t) {
|
|
|
1149
1149
|
return Da(r, Sa(r)) + 1;
|
|
1150
1150
|
}
|
|
1151
1151
|
function oi(e, t) {
|
|
1152
|
-
const r = D(e, t == null ? void 0 : t.in), n = +ge(r) - +
|
|
1152
|
+
const r = D(e, t == null ? void 0 : t.in), n = +ge(r) - +Oa(r);
|
|
1153
1153
|
return Math.round(n / ur) + 1;
|
|
1154
1154
|
}
|
|
1155
1155
|
function lr(e, t) {
|
|
1156
|
-
var h,
|
|
1157
|
-
const r = D(e, t == null ? void 0 : t.in), n = r.getFullYear(), i = se(), o = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((
|
|
1156
|
+
var h, g, M, S;
|
|
1157
|
+
const r = D(e, t == null ? void 0 : t.in), n = r.getFullYear(), i = se(), o = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((g = (h = t == null ? void 0 : t.locale) == null ? void 0 : h.options) == null ? void 0 : g.firstWeekContainsDate) ?? i.firstWeekContainsDate ?? ((S = (M = i.locale) == null ? void 0 : M.options) == null ? void 0 : S.firstWeekContainsDate) ?? 1, c = k((t == null ? void 0 : t.in) || e, 0);
|
|
1158
1158
|
c.setFullYear(n + 1, 0, o), c.setHours(0, 0, 0, 0);
|
|
1159
|
-
const d =
|
|
1159
|
+
const d = H(c, t), f = k((t == null ? void 0 : t.in) || e, 0);
|
|
1160
1160
|
f.setFullYear(n, 0, o), f.setHours(0, 0, 0, 0);
|
|
1161
|
-
const
|
|
1162
|
-
return +r >= +d ? n + 1 : +r >= +
|
|
1161
|
+
const y = H(f, t);
|
|
1162
|
+
return +r >= +d ? n + 1 : +r >= +y ? n : n - 1;
|
|
1163
1163
|
}
|
|
1164
1164
|
function ui(e, t) {
|
|
1165
|
-
var d, f,
|
|
1166
|
-
const r = se(), n = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((f = (d = t == null ? void 0 : t.locale) == null ? void 0 : d.options) == null ? void 0 : f.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((h = (
|
|
1167
|
-
return o.setFullYear(i, 0, n), o.setHours(0, 0, 0, 0),
|
|
1165
|
+
var d, f, y, h;
|
|
1166
|
+
const r = se(), n = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((f = (d = t == null ? void 0 : t.locale) == null ? void 0 : d.options) == null ? void 0 : f.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((h = (y = r.locale) == null ? void 0 : y.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1, i = lr(e, t), o = k((t == null ? void 0 : t.in) || e, 0);
|
|
1167
|
+
return o.setFullYear(i, 0, n), o.setHours(0, 0, 0, 0), H(o, t);
|
|
1168
1168
|
}
|
|
1169
1169
|
function ci(e, t) {
|
|
1170
|
-
const r = D(e, t == null ? void 0 : t.in), n = +
|
|
1170
|
+
const r = D(e, t == null ? void 0 : t.in), n = +H(r, t) - +ui(r, t);
|
|
1171
1171
|
return Math.round(n / ur) + 1;
|
|
1172
1172
|
}
|
|
1173
|
-
function
|
|
1173
|
+
function p(e, t) {
|
|
1174
1174
|
const r = e < 0 ? "-" : "", n = Math.abs(e).toString().padStart(t, "0");
|
|
1175
1175
|
return r + n;
|
|
1176
1176
|
}
|
|
1177
|
-
const
|
|
1177
|
+
const A = {
|
|
1178
1178
|
// Year
|
|
1179
1179
|
y(e, t) {
|
|
1180
1180
|
const r = e.getFullYear(), n = r > 0 ? r : 1 - r;
|
|
1181
|
-
return
|
|
1181
|
+
return p(t === "yy" ? n % 100 : n, t.length);
|
|
1182
1182
|
},
|
|
1183
1183
|
// Month
|
|
1184
1184
|
M(e, t) {
|
|
1185
1185
|
const r = e.getMonth();
|
|
1186
|
-
return t === "M" ? String(r + 1) :
|
|
1186
|
+
return t === "M" ? String(r + 1) : p(r + 1, 2);
|
|
1187
1187
|
},
|
|
1188
1188
|
// Day of the month
|
|
1189
1189
|
d(e, t) {
|
|
1190
|
-
return
|
|
1190
|
+
return p(e.getDate(), t.length);
|
|
1191
1191
|
},
|
|
1192
1192
|
// AM or PM
|
|
1193
1193
|
a(e, t) {
|
|
@@ -1207,26 +1207,26 @@ const W = {
|
|
|
1207
1207
|
},
|
|
1208
1208
|
// Hour [1-12]
|
|
1209
1209
|
h(e, t) {
|
|
1210
|
-
return
|
|
1210
|
+
return p(e.getHours() % 12 || 12, t.length);
|
|
1211
1211
|
},
|
|
1212
1212
|
// Hour [0-23]
|
|
1213
1213
|
H(e, t) {
|
|
1214
|
-
return
|
|
1214
|
+
return p(e.getHours(), t.length);
|
|
1215
1215
|
},
|
|
1216
1216
|
// Minute
|
|
1217
1217
|
m(e, t) {
|
|
1218
|
-
return
|
|
1218
|
+
return p(e.getMinutes(), t.length);
|
|
1219
1219
|
},
|
|
1220
1220
|
// Second
|
|
1221
1221
|
s(e, t) {
|
|
1222
|
-
return
|
|
1222
|
+
return p(e.getSeconds(), t.length);
|
|
1223
1223
|
},
|
|
1224
1224
|
// Fraction of second
|
|
1225
1225
|
S(e, t) {
|
|
1226
1226
|
const r = t.length, n = e.getMilliseconds(), i = Math.trunc(
|
|
1227
1227
|
n * Math.pow(10, r - 3)
|
|
1228
1228
|
);
|
|
1229
|
-
return
|
|
1229
|
+
return p(i, t.length);
|
|
1230
1230
|
}
|
|
1231
1231
|
}, Q = {
|
|
1232
1232
|
am: "am",
|
|
@@ -1259,21 +1259,21 @@ const W = {
|
|
|
1259
1259
|
const n = e.getFullYear(), i = n > 0 ? n : 1 - n;
|
|
1260
1260
|
return r.ordinalNumber(i, { unit: "year" });
|
|
1261
1261
|
}
|
|
1262
|
-
return
|
|
1262
|
+
return A.y(e, t);
|
|
1263
1263
|
},
|
|
1264
1264
|
// Local week-numbering year
|
|
1265
1265
|
Y: function(e, t, r, n) {
|
|
1266
1266
|
const i = lr(e, n), o = i > 0 ? i : 1 - i;
|
|
1267
1267
|
if (t === "YY") {
|
|
1268
1268
|
const c = o % 100;
|
|
1269
|
-
return
|
|
1269
|
+
return p(c, 2);
|
|
1270
1270
|
}
|
|
1271
|
-
return t === "Yo" ? r.ordinalNumber(o, { unit: "year" }) :
|
|
1271
|
+
return t === "Yo" ? r.ordinalNumber(o, { unit: "year" }) : p(o, t.length);
|
|
1272
1272
|
},
|
|
1273
1273
|
// ISO week-numbering year
|
|
1274
1274
|
R: function(e, t) {
|
|
1275
1275
|
const r = cr(e);
|
|
1276
|
-
return
|
|
1276
|
+
return p(r, t.length);
|
|
1277
1277
|
},
|
|
1278
1278
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
1279
1279
|
// The main difference between `y` and `u` localizers are B.C. years:
|
|
@@ -1286,7 +1286,7 @@ const W = {
|
|
|
1286
1286
|
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
1287
1287
|
u: function(e, t) {
|
|
1288
1288
|
const r = e.getFullYear();
|
|
1289
|
-
return
|
|
1289
|
+
return p(r, t.length);
|
|
1290
1290
|
},
|
|
1291
1291
|
// Quarter
|
|
1292
1292
|
Q: function(e, t, r) {
|
|
@@ -1295,7 +1295,7 @@ const W = {
|
|
|
1295
1295
|
case "Q":
|
|
1296
1296
|
return String(n);
|
|
1297
1297
|
case "QQ":
|
|
1298
|
-
return
|
|
1298
|
+
return p(n, 2);
|
|
1299
1299
|
case "Qo":
|
|
1300
1300
|
return r.ordinalNumber(n, { unit: "quarter" });
|
|
1301
1301
|
case "QQQ":
|
|
@@ -1323,7 +1323,7 @@ const W = {
|
|
|
1323
1323
|
case "q":
|
|
1324
1324
|
return String(n);
|
|
1325
1325
|
case "qq":
|
|
1326
|
-
return
|
|
1326
|
+
return p(n, 2);
|
|
1327
1327
|
case "qo":
|
|
1328
1328
|
return r.ordinalNumber(n, { unit: "quarter" });
|
|
1329
1329
|
case "qqq":
|
|
@@ -1350,7 +1350,7 @@ const W = {
|
|
|
1350
1350
|
switch (t) {
|
|
1351
1351
|
case "M":
|
|
1352
1352
|
case "MM":
|
|
1353
|
-
return
|
|
1353
|
+
return A.M(e, t);
|
|
1354
1354
|
case "Mo":
|
|
1355
1355
|
return r.ordinalNumber(n + 1, { unit: "month" });
|
|
1356
1356
|
case "MMM":
|
|
@@ -1375,7 +1375,7 @@ const W = {
|
|
|
1375
1375
|
case "L":
|
|
1376
1376
|
return String(n + 1);
|
|
1377
1377
|
case "LL":
|
|
1378
|
-
return
|
|
1378
|
+
return p(n + 1, 2);
|
|
1379
1379
|
case "Lo":
|
|
1380
1380
|
return r.ordinalNumber(n + 1, { unit: "month" });
|
|
1381
1381
|
case "LLL":
|
|
@@ -1396,21 +1396,21 @@ const W = {
|
|
|
1396
1396
|
// Local week of year
|
|
1397
1397
|
w: function(e, t, r, n) {
|
|
1398
1398
|
const i = ci(e, n);
|
|
1399
|
-
return t === "wo" ? r.ordinalNumber(i, { unit: "week" }) :
|
|
1399
|
+
return t === "wo" ? r.ordinalNumber(i, { unit: "week" }) : p(i, t.length);
|
|
1400
1400
|
},
|
|
1401
1401
|
// ISO week of year
|
|
1402
1402
|
I: function(e, t, r) {
|
|
1403
1403
|
const n = oi(e);
|
|
1404
|
-
return t === "Io" ? r.ordinalNumber(n, { unit: "week" }) :
|
|
1404
|
+
return t === "Io" ? r.ordinalNumber(n, { unit: "week" }) : p(n, t.length);
|
|
1405
1405
|
},
|
|
1406
1406
|
// Day of the month
|
|
1407
1407
|
d: function(e, t, r) {
|
|
1408
|
-
return t === "do" ? r.ordinalNumber(e.getDate(), { unit: "date" }) :
|
|
1408
|
+
return t === "do" ? r.ordinalNumber(e.getDate(), { unit: "date" }) : A.d(e, t);
|
|
1409
1409
|
},
|
|
1410
1410
|
// Day of year
|
|
1411
1411
|
D: function(e, t, r) {
|
|
1412
1412
|
const n = si(e);
|
|
1413
|
-
return t === "Do" ? r.ordinalNumber(n, { unit: "dayOfYear" }) :
|
|
1413
|
+
return t === "Do" ? r.ordinalNumber(n, { unit: "dayOfYear" }) : p(n, t.length);
|
|
1414
1414
|
},
|
|
1415
1415
|
// Day of week
|
|
1416
1416
|
E: function(e, t, r) {
|
|
@@ -1448,7 +1448,7 @@ const W = {
|
|
|
1448
1448
|
case "e":
|
|
1449
1449
|
return String(o);
|
|
1450
1450
|
case "ee":
|
|
1451
|
-
return
|
|
1451
|
+
return p(o, 2);
|
|
1452
1452
|
case "eo":
|
|
1453
1453
|
return r.ordinalNumber(o, { unit: "day" });
|
|
1454
1454
|
case "eee":
|
|
@@ -1481,7 +1481,7 @@ const W = {
|
|
|
1481
1481
|
case "c":
|
|
1482
1482
|
return String(o);
|
|
1483
1483
|
case "cc":
|
|
1484
|
-
return
|
|
1484
|
+
return p(o, t.length);
|
|
1485
1485
|
case "co":
|
|
1486
1486
|
return r.ordinalNumber(o, { unit: "day" });
|
|
1487
1487
|
case "ccc":
|
|
@@ -1514,7 +1514,7 @@ const W = {
|
|
|
1514
1514
|
case "i":
|
|
1515
1515
|
return String(i);
|
|
1516
1516
|
case "ii":
|
|
1517
|
-
return
|
|
1517
|
+
return p(i, t.length);
|
|
1518
1518
|
case "io":
|
|
1519
1519
|
return r.ordinalNumber(i, { unit: "day" });
|
|
1520
1520
|
case "iii":
|
|
@@ -1628,33 +1628,33 @@ const W = {
|
|
|
1628
1628
|
let n = e.getHours() % 12;
|
|
1629
1629
|
return n === 0 && (n = 12), r.ordinalNumber(n, { unit: "hour" });
|
|
1630
1630
|
}
|
|
1631
|
-
return
|
|
1631
|
+
return A.h(e, t);
|
|
1632
1632
|
},
|
|
1633
1633
|
// Hour [0-23]
|
|
1634
1634
|
H: function(e, t, r) {
|
|
1635
|
-
return t === "Ho" ? r.ordinalNumber(e.getHours(), { unit: "hour" }) :
|
|
1635
|
+
return t === "Ho" ? r.ordinalNumber(e.getHours(), { unit: "hour" }) : A.H(e, t);
|
|
1636
1636
|
},
|
|
1637
1637
|
// Hour [0-11]
|
|
1638
1638
|
K: function(e, t, r) {
|
|
1639
1639
|
const n = e.getHours() % 12;
|
|
1640
|
-
return t === "Ko" ? r.ordinalNumber(n, { unit: "hour" }) :
|
|
1640
|
+
return t === "Ko" ? r.ordinalNumber(n, { unit: "hour" }) : p(n, t.length);
|
|
1641
1641
|
},
|
|
1642
1642
|
// Hour [1-24]
|
|
1643
1643
|
k: function(e, t, r) {
|
|
1644
1644
|
let n = e.getHours();
|
|
1645
|
-
return n === 0 && (n = 24), t === "ko" ? r.ordinalNumber(n, { unit: "hour" }) :
|
|
1645
|
+
return n === 0 && (n = 24), t === "ko" ? r.ordinalNumber(n, { unit: "hour" }) : p(n, t.length);
|
|
1646
1646
|
},
|
|
1647
1647
|
// Minute
|
|
1648
1648
|
m: function(e, t, r) {
|
|
1649
|
-
return t === "mo" ? r.ordinalNumber(e.getMinutes(), { unit: "minute" }) :
|
|
1649
|
+
return t === "mo" ? r.ordinalNumber(e.getMinutes(), { unit: "minute" }) : A.m(e, t);
|
|
1650
1650
|
},
|
|
1651
1651
|
// Second
|
|
1652
1652
|
s: function(e, t, r) {
|
|
1653
|
-
return t === "so" ? r.ordinalNumber(e.getSeconds(), { unit: "second" }) :
|
|
1653
|
+
return t === "so" ? r.ordinalNumber(e.getSeconds(), { unit: "second" }) : A.s(e, t);
|
|
1654
1654
|
},
|
|
1655
1655
|
// Fraction of second
|
|
1656
1656
|
S: function(e, t) {
|
|
1657
|
-
return
|
|
1657
|
+
return A.S(e, t);
|
|
1658
1658
|
},
|
|
1659
1659
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1660
1660
|
X: function(e, t, r) {
|
|
@@ -1663,14 +1663,14 @@ const W = {
|
|
|
1663
1663
|
return "Z";
|
|
1664
1664
|
switch (t) {
|
|
1665
1665
|
case "X":
|
|
1666
|
-
return
|
|
1666
|
+
return Gt(n);
|
|
1667
1667
|
case "XXXX":
|
|
1668
1668
|
case "XX":
|
|
1669
|
-
return
|
|
1669
|
+
return U(n);
|
|
1670
1670
|
case "XXXXX":
|
|
1671
1671
|
case "XXX":
|
|
1672
1672
|
default:
|
|
1673
|
-
return
|
|
1673
|
+
return U(n, ":");
|
|
1674
1674
|
}
|
|
1675
1675
|
},
|
|
1676
1676
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
@@ -1678,14 +1678,14 @@ const W = {
|
|
|
1678
1678
|
const n = e.getTimezoneOffset();
|
|
1679
1679
|
switch (t) {
|
|
1680
1680
|
case "x":
|
|
1681
|
-
return
|
|
1681
|
+
return Gt(n);
|
|
1682
1682
|
case "xxxx":
|
|
1683
1683
|
case "xx":
|
|
1684
|
-
return
|
|
1684
|
+
return U(n);
|
|
1685
1685
|
case "xxxxx":
|
|
1686
1686
|
case "xxx":
|
|
1687
1687
|
default:
|
|
1688
|
-
return
|
|
1688
|
+
return U(n, ":");
|
|
1689
1689
|
}
|
|
1690
1690
|
},
|
|
1691
1691
|
// Timezone (GMT)
|
|
@@ -1695,10 +1695,10 @@ const W = {
|
|
|
1695
1695
|
case "O":
|
|
1696
1696
|
case "OO":
|
|
1697
1697
|
case "OOO":
|
|
1698
|
-
return "GMT" +
|
|
1698
|
+
return "GMT" + Ht(n, ":");
|
|
1699
1699
|
case "OOOO":
|
|
1700
1700
|
default:
|
|
1701
|
-
return "GMT" +
|
|
1701
|
+
return "GMT" + U(n, ":");
|
|
1702
1702
|
}
|
|
1703
1703
|
},
|
|
1704
1704
|
// Timezone (specific non-location)
|
|
@@ -1708,34 +1708,34 @@ const W = {
|
|
|
1708
1708
|
case "z":
|
|
1709
1709
|
case "zz":
|
|
1710
1710
|
case "zzz":
|
|
1711
|
-
return "GMT" +
|
|
1711
|
+
return "GMT" + Ht(n, ":");
|
|
1712
1712
|
case "zzzz":
|
|
1713
1713
|
default:
|
|
1714
|
-
return "GMT" +
|
|
1714
|
+
return "GMT" + U(n, ":");
|
|
1715
1715
|
}
|
|
1716
1716
|
},
|
|
1717
1717
|
// Seconds timestamp
|
|
1718
1718
|
t: function(e, t, r) {
|
|
1719
1719
|
const n = Math.trunc(+e / 1e3);
|
|
1720
|
-
return
|
|
1720
|
+
return p(n, t.length);
|
|
1721
1721
|
},
|
|
1722
1722
|
// Milliseconds timestamp
|
|
1723
1723
|
T: function(e, t, r) {
|
|
1724
|
-
return
|
|
1724
|
+
return p(+e, t.length);
|
|
1725
1725
|
}
|
|
1726
1726
|
};
|
|
1727
|
-
function
|
|
1727
|
+
function Ht(e, t = "") {
|
|
1728
1728
|
const r = e > 0 ? "-" : "+", n = Math.abs(e), i = Math.trunc(n / 60), o = n % 60;
|
|
1729
|
-
return o === 0 ? r + String(i) : r + String(i) + t +
|
|
1729
|
+
return o === 0 ? r + String(i) : r + String(i) + t + p(o, 2);
|
|
1730
1730
|
}
|
|
1731
|
-
function
|
|
1732
|
-
return e % 60 === 0 ? (e > 0 ? "-" : "+") +
|
|
1731
|
+
function Gt(e, t) {
|
|
1732
|
+
return e % 60 === 0 ? (e > 0 ? "-" : "+") + p(Math.abs(e) / 60, 2) : U(e, t);
|
|
1733
1733
|
}
|
|
1734
|
-
function
|
|
1735
|
-
const r = e > 0 ? "-" : "+", n = Math.abs(e), i =
|
|
1734
|
+
function U(e, t = "") {
|
|
1735
|
+
const r = e > 0 ? "-" : "+", n = Math.abs(e), i = p(Math.trunc(n / 60), 2), o = p(n % 60, 2);
|
|
1736
1736
|
return r + i + t + o;
|
|
1737
1737
|
}
|
|
1738
|
-
const
|
|
1738
|
+
const At = (e, t) => {
|
|
1739
1739
|
switch (e) {
|
|
1740
1740
|
case "P":
|
|
1741
1741
|
return t.date({ width: "short" });
|
|
@@ -1762,7 +1762,7 @@ const Wt = (e, t) => {
|
|
|
1762
1762
|
}, li = (e, t) => {
|
|
1763
1763
|
const r = e.match(/(P+)(p+)?/) || [], n = r[1], i = r[2];
|
|
1764
1764
|
if (!i)
|
|
1765
|
-
return
|
|
1765
|
+
return At(e, t);
|
|
1766
1766
|
let o;
|
|
1767
1767
|
switch (n) {
|
|
1768
1768
|
case "P":
|
|
@@ -1779,7 +1779,7 @@ const Wt = (e, t) => {
|
|
|
1779
1779
|
o = t.dateTime({ width: "full" });
|
|
1780
1780
|
break;
|
|
1781
1781
|
}
|
|
1782
|
-
return o.replace("{{date}}",
|
|
1782
|
+
return o.replace("{{date}}", At(n, t)).replace("{{time}}", dr(i, t));
|
|
1783
1783
|
}, di = {
|
|
1784
1784
|
p: dr,
|
|
1785
1785
|
P: li
|
|
@@ -1798,48 +1798,48 @@ function wi(e, t, r) {
|
|
|
1798
1798
|
const n = e[0] === "Y" ? "years" : "days of the month";
|
|
1799
1799
|
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`;
|
|
1800
1800
|
}
|
|
1801
|
-
const _i = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, bi = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ti = /^'([^]*?)'?$/, Di = /''/g,
|
|
1801
|
+
const _i = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, bi = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ti = /^'([^]*?)'?$/, Di = /''/g, Oi = /[a-zA-Z]/;
|
|
1802
1802
|
function fr(e, t, r) {
|
|
1803
|
-
var h,
|
|
1804
|
-
const n = se(), i = (r == null ? void 0 : r.locale) ?? n.locale ?? ii, o = (r == null ? void 0 : r.firstWeekContainsDate) ?? ((
|
|
1803
|
+
var h, g, M, S, N, I, K, W;
|
|
1804
|
+
const n = se(), i = (r == null ? void 0 : r.locale) ?? n.locale ?? ii, o = (r == null ? void 0 : r.firstWeekContainsDate) ?? ((g = (h = r == null ? void 0 : r.locale) == null ? void 0 : h.options) == null ? void 0 : g.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((S = (M = n.locale) == null ? void 0 : M.options) == null ? void 0 : S.firstWeekContainsDate) ?? 1, c = (r == null ? void 0 : r.weekStartsOn) ?? ((I = (N = r == null ? void 0 : r.locale) == null ? void 0 : N.options) == null ? void 0 : I.weekStartsOn) ?? n.weekStartsOn ?? ((W = (K = n.locale) == null ? void 0 : K.options) == null ? void 0 : W.weekStartsOn) ?? 0, d = D(e, r == null ? void 0 : r.in);
|
|
1805
1805
|
if (!va(d))
|
|
1806
1806
|
throw new RangeError("Invalid time value");
|
|
1807
|
-
let f = t.match(bi).map((
|
|
1808
|
-
const b =
|
|
1807
|
+
let f = t.match(bi).map((O) => {
|
|
1808
|
+
const b = O[0];
|
|
1809
1809
|
if (b === "p" || b === "P") {
|
|
1810
|
-
const
|
|
1811
|
-
return
|
|
1810
|
+
const F = di[b];
|
|
1811
|
+
return F(O, i.formatLong);
|
|
1812
1812
|
}
|
|
1813
|
-
return
|
|
1814
|
-
}).join("").match(_i).map((
|
|
1815
|
-
if (
|
|
1813
|
+
return O;
|
|
1814
|
+
}).join("").match(_i).map((O) => {
|
|
1815
|
+
if (O === "''")
|
|
1816
1816
|
return { isToken: !1, value: "'" };
|
|
1817
|
-
const b =
|
|
1817
|
+
const b = O[0];
|
|
1818
1818
|
if (b === "'")
|
|
1819
|
-
return { isToken: !1, value:
|
|
1819
|
+
return { isToken: !1, value: Mi(O) };
|
|
1820
1820
|
if (Rt[b])
|
|
1821
|
-
return { isToken: !0, value:
|
|
1822
|
-
if (b.match(
|
|
1821
|
+
return { isToken: !0, value: O };
|
|
1822
|
+
if (b.match(Oi))
|
|
1823
1823
|
throw new RangeError(
|
|
1824
1824
|
"Format string contains an unescaped latin alphabet character `" + b + "`"
|
|
1825
1825
|
);
|
|
1826
|
-
return { isToken: !1, value:
|
|
1826
|
+
return { isToken: !1, value: O };
|
|
1827
1827
|
});
|
|
1828
1828
|
i.localize.preprocessor && (f = i.localize.preprocessor(d, f));
|
|
1829
|
-
const
|
|
1829
|
+
const y = {
|
|
1830
1830
|
firstWeekContainsDate: o,
|
|
1831
1831
|
weekStartsOn: c,
|
|
1832
1832
|
locale: i
|
|
1833
1833
|
};
|
|
1834
|
-
return f.map((
|
|
1835
|
-
if (!
|
|
1836
|
-
const b =
|
|
1834
|
+
return f.map((O) => {
|
|
1835
|
+
if (!O.isToken) return O.value;
|
|
1836
|
+
const b = O.value;
|
|
1837
1837
|
(!(r != null && r.useAdditionalWeekYearTokens) && gi(b) || !(r != null && r.useAdditionalDayOfYearTokens) && yi(b)) && pi(b, t, String(e));
|
|
1838
|
-
const
|
|
1839
|
-
return
|
|
1838
|
+
const F = Rt[b[0]];
|
|
1839
|
+
return F(d, b, i.localize, y);
|
|
1840
1840
|
}).join("");
|
|
1841
1841
|
}
|
|
1842
|
-
function
|
|
1842
|
+
function Mi(e) {
|
|
1843
1843
|
const t = e.match(Ti);
|
|
1844
1844
|
return t ? t[1].replace(Di, "'") : e;
|
|
1845
1845
|
}
|
|
@@ -1850,10 +1850,10 @@ function vi(e, t) {
|
|
|
1850
1850
|
function Si() {
|
|
1851
1851
|
return Object.assign({}, se());
|
|
1852
1852
|
}
|
|
1853
|
-
function
|
|
1853
|
+
function Wt(e) {
|
|
1854
1854
|
return +D(e);
|
|
1855
1855
|
}
|
|
1856
|
-
function
|
|
1856
|
+
function Ft(e) {
|
|
1857
1857
|
return Math.trunc(+D(e) / 1e3);
|
|
1858
1858
|
}
|
|
1859
1859
|
function xi(e) {
|
|
@@ -1866,17 +1866,17 @@ function Ei(e) {
|
|
|
1866
1866
|
function hr(e, t, r) {
|
|
1867
1867
|
return _a(e, -t, r);
|
|
1868
1868
|
}
|
|
1869
|
-
function
|
|
1869
|
+
function qt(e, t, r) {
|
|
1870
1870
|
const n = Si(), i = ki(e, r.timeZone, r.locale ?? n.locale);
|
|
1871
|
-
return "formatToParts" in i ?
|
|
1871
|
+
return "formatToParts" in i ? Ni(i, t) : Pi(i, t);
|
|
1872
1872
|
}
|
|
1873
|
-
function
|
|
1873
|
+
function Ni(e, t) {
|
|
1874
1874
|
const r = e.formatToParts(t);
|
|
1875
1875
|
for (let n = r.length - 1; n >= 0; --n)
|
|
1876
1876
|
if (r[n].type === "timeZoneName")
|
|
1877
1877
|
return r[n].value;
|
|
1878
1878
|
}
|
|
1879
|
-
function
|
|
1879
|
+
function Pi(e, t) {
|
|
1880
1880
|
const r = e.format(t).replace(/\u200E/g, ""), n = / [\w-+ ]+$/.exec(r);
|
|
1881
1881
|
return n ? n[0].substr(1) : "";
|
|
1882
1882
|
}
|
|
@@ -1886,11 +1886,11 @@ function ki(e, t, r) {
|
|
|
1886
1886
|
timeZoneName: e
|
|
1887
1887
|
});
|
|
1888
1888
|
}
|
|
1889
|
-
function
|
|
1890
|
-
const r =
|
|
1891
|
-
return "formatToParts" in r ?
|
|
1889
|
+
function Ii(e, t) {
|
|
1890
|
+
const r = Gi(t);
|
|
1891
|
+
return "formatToParts" in r ? Yi(r, e) : Ri(r, e);
|
|
1892
1892
|
}
|
|
1893
|
-
const
|
|
1893
|
+
const Ci = {
|
|
1894
1894
|
year: 0,
|
|
1895
1895
|
month: 1,
|
|
1896
1896
|
day: 2,
|
|
@@ -1898,11 +1898,11 @@ const Yi = {
|
|
|
1898
1898
|
minute: 4,
|
|
1899
1899
|
second: 5
|
|
1900
1900
|
};
|
|
1901
|
-
function
|
|
1901
|
+
function Yi(e, t) {
|
|
1902
1902
|
try {
|
|
1903
1903
|
const r = e.formatToParts(t), n = [];
|
|
1904
1904
|
for (let i = 0; i < r.length; i++) {
|
|
1905
|
-
const o =
|
|
1905
|
+
const o = Ci[r[i].type];
|
|
1906
1906
|
o !== void 0 && (n[o] = parseInt(r[i].value, 10));
|
|
1907
1907
|
}
|
|
1908
1908
|
return n;
|
|
@@ -1923,7 +1923,7 @@ function Ri(e, t) {
|
|
|
1923
1923
|
parseInt(n[6], 10)
|
|
1924
1924
|
];
|
|
1925
1925
|
}
|
|
1926
|
-
const
|
|
1926
|
+
const He = {}, jt = new Intl.DateTimeFormat("en-US", {
|
|
1927
1927
|
hourCycle: "h23",
|
|
1928
1928
|
timeZone: "America/New_York",
|
|
1929
1929
|
year: "numeric",
|
|
@@ -1932,9 +1932,9 @@ const Ge = {}, jt = new Intl.DateTimeFormat("en-US", {
|
|
|
1932
1932
|
hour: "2-digit",
|
|
1933
1933
|
minute: "2-digit",
|
|
1934
1934
|
second: "2-digit"
|
|
1935
|
-
}).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")),
|
|
1936
|
-
function
|
|
1937
|
-
return
|
|
1935
|
+
}).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), Hi = jt === "06/25/2014, 00:00:00" || jt === "06/25/2014 00:00:00";
|
|
1936
|
+
function Gi(e) {
|
|
1937
|
+
return He[e] || (He[e] = Hi ? new Intl.DateTimeFormat("en-US", {
|
|
1938
1938
|
hourCycle: "h23",
|
|
1939
1939
|
timeZone: e,
|
|
1940
1940
|
year: "numeric",
|
|
@@ -1952,13 +1952,13 @@ function Hi(e) {
|
|
|
1952
1952
|
hour: "2-digit",
|
|
1953
1953
|
minute: "2-digit",
|
|
1954
1954
|
second: "2-digit"
|
|
1955
|
-
})),
|
|
1955
|
+
})), He[e];
|
|
1956
1956
|
}
|
|
1957
|
-
function
|
|
1957
|
+
function $e(e, t, r, n, i, o, c) {
|
|
1958
1958
|
const d = /* @__PURE__ */ new Date(0);
|
|
1959
1959
|
return d.setUTCFullYear(e, t, r), d.setUTCHours(n, i, o, c), d;
|
|
1960
1960
|
}
|
|
1961
|
-
const Lt = 36e5,
|
|
1961
|
+
const Lt = 36e5, Ai = 6e4, Ge = {
|
|
1962
1962
|
timezone: /([Z+-].*)$/,
|
|
1963
1963
|
timezoneZ: /^(Z)$/,
|
|
1964
1964
|
timezoneHH: /^([+-]\d{2})$/,
|
|
@@ -1967,51 +1967,51 @@ const Lt = 36e5, Wi = 6e4, He = {
|
|
|
1967
1967
|
function oe(e, t, r) {
|
|
1968
1968
|
if (!e)
|
|
1969
1969
|
return 0;
|
|
1970
|
-
let n =
|
|
1970
|
+
let n = Ge.timezoneZ.exec(e);
|
|
1971
1971
|
if (n)
|
|
1972
1972
|
return 0;
|
|
1973
1973
|
let i, o;
|
|
1974
|
-
if (n =
|
|
1975
|
-
return i = parseInt(n[1], 10),
|
|
1976
|
-
if (n =
|
|
1974
|
+
if (n = Ge.timezoneHH.exec(e), n)
|
|
1975
|
+
return i = parseInt(n[1], 10), Ut(i) ? -(i * Lt) : NaN;
|
|
1976
|
+
if (n = Ge.timezoneHHMM.exec(e), n) {
|
|
1977
1977
|
i = parseInt(n[2], 10);
|
|
1978
1978
|
const c = parseInt(n[3], 10);
|
|
1979
|
-
return
|
|
1979
|
+
return Ut(i, c) ? (o = Math.abs(i) * Lt + c * Ai, n[1] === "+" ? -o : o) : NaN;
|
|
1980
1980
|
}
|
|
1981
|
-
if (
|
|
1981
|
+
if (qi(e)) {
|
|
1982
1982
|
t = new Date(t || Date.now());
|
|
1983
|
-
const c = r ? t :
|
|
1984
|
-
return -(r ? d :
|
|
1983
|
+
const c = r ? t : Wi(t), d = qe(c, e);
|
|
1984
|
+
return -(r ? d : Fi(t, d, e));
|
|
1985
1985
|
}
|
|
1986
1986
|
return NaN;
|
|
1987
1987
|
}
|
|
1988
|
-
function
|
|
1989
|
-
return
|
|
1988
|
+
function Wi(e) {
|
|
1989
|
+
return $e(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds());
|
|
1990
1990
|
}
|
|
1991
|
-
function
|
|
1992
|
-
const r =
|
|
1991
|
+
function qe(e, t) {
|
|
1992
|
+
const r = Ii(e, t), n = $e(r[0], r[1] - 1, r[2], r[3] % 24, r[4], r[5], 0).getTime();
|
|
1993
1993
|
let i = e.getTime();
|
|
1994
1994
|
const o = i % 1e3;
|
|
1995
1995
|
return i -= o >= 0 ? o : 1e3 + o, n - i;
|
|
1996
1996
|
}
|
|
1997
|
-
function
|
|
1997
|
+
function Fi(e, t, r) {
|
|
1998
1998
|
let i = e.getTime() - t;
|
|
1999
|
-
const o =
|
|
1999
|
+
const o = qe(new Date(i), r);
|
|
2000
2000
|
if (t === o)
|
|
2001
2001
|
return t;
|
|
2002
2002
|
i -= o - t;
|
|
2003
|
-
const c =
|
|
2003
|
+
const c = qe(new Date(i), r);
|
|
2004
2004
|
return o === c ? o : Math.max(o, c);
|
|
2005
2005
|
}
|
|
2006
|
-
function
|
|
2006
|
+
function Ut(e, t) {
|
|
2007
2007
|
return -23 <= e && e <= 23 && (t == null || 0 <= t && t <= 59);
|
|
2008
2008
|
}
|
|
2009
|
-
const
|
|
2010
|
-
function
|
|
2011
|
-
if (
|
|
2009
|
+
const zt = {};
|
|
2010
|
+
function qi(e) {
|
|
2011
|
+
if (zt[e])
|
|
2012
2012
|
return !0;
|
|
2013
2013
|
try {
|
|
2014
|
-
return new Intl.DateTimeFormat(void 0, { timeZone: e }),
|
|
2014
|
+
return new Intl.DateTimeFormat(void 0, { timeZone: e }), zt[e] = !0, !0;
|
|
2015
2015
|
} catch {
|
|
2016
2016
|
return !1;
|
|
2017
2017
|
}
|
|
@@ -2019,12 +2019,12 @@ function Fi(e) {
|
|
|
2019
2019
|
const ji = 60 * 1e3, Li = {
|
|
2020
2020
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
2021
2021
|
X: function(e, t, r) {
|
|
2022
|
-
const n =
|
|
2022
|
+
const n = Ae(r.timeZone, e);
|
|
2023
2023
|
if (n === 0)
|
|
2024
2024
|
return "Z";
|
|
2025
2025
|
switch (t) {
|
|
2026
2026
|
case "X":
|
|
2027
|
-
return
|
|
2027
|
+
return Vt(n);
|
|
2028
2028
|
case "XXXX":
|
|
2029
2029
|
case "XX":
|
|
2030
2030
|
return Z(n);
|
|
@@ -2036,10 +2036,10 @@ const ji = 60 * 1e3, Li = {
|
|
|
2036
2036
|
},
|
|
2037
2037
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
2038
2038
|
x: function(e, t, r) {
|
|
2039
|
-
const n =
|
|
2039
|
+
const n = Ae(r.timeZone, e);
|
|
2040
2040
|
switch (t) {
|
|
2041
2041
|
case "x":
|
|
2042
|
-
return
|
|
2042
|
+
return Vt(n);
|
|
2043
2043
|
case "xxxx":
|
|
2044
2044
|
case "xx":
|
|
2045
2045
|
return Z(n);
|
|
@@ -2051,12 +2051,12 @@ const ji = 60 * 1e3, Li = {
|
|
|
2051
2051
|
},
|
|
2052
2052
|
// Timezone (GMT)
|
|
2053
2053
|
O: function(e, t, r) {
|
|
2054
|
-
const n =
|
|
2054
|
+
const n = Ae(r.timeZone, e);
|
|
2055
2055
|
switch (t) {
|
|
2056
2056
|
case "O":
|
|
2057
2057
|
case "OO":
|
|
2058
2058
|
case "OOO":
|
|
2059
|
-
return "GMT" +
|
|
2059
|
+
return "GMT" + Ui(n, ":");
|
|
2060
2060
|
case "OOOO":
|
|
2061
2061
|
default:
|
|
2062
2062
|
return "GMT" + Z(n, ":");
|
|
@@ -2068,14 +2068,14 @@ const ji = 60 * 1e3, Li = {
|
|
|
2068
2068
|
case "z":
|
|
2069
2069
|
case "zz":
|
|
2070
2070
|
case "zzz":
|
|
2071
|
-
return
|
|
2071
|
+
return qt("short", e, r);
|
|
2072
2072
|
case "zzzz":
|
|
2073
2073
|
default:
|
|
2074
|
-
return
|
|
2074
|
+
return qt("long", e, r);
|
|
2075
2075
|
}
|
|
2076
2076
|
}
|
|
2077
2077
|
};
|
|
2078
|
-
function
|
|
2078
|
+
function Ae(e, t) {
|
|
2079
2079
|
const r = e ? oe(e, t, !0) / ji : (t == null ? void 0 : t.getTimezoneOffset()) ?? 0;
|
|
2080
2080
|
if (Number.isNaN(r))
|
|
2081
2081
|
throw new RangeError("Invalid time zone specified: " + e);
|
|
@@ -2092,18 +2092,18 @@ function Z(e, t = "") {
|
|
|
2092
2092
|
const r = e > 0 ? "-" : "+", n = Math.abs(e), i = we(Math.floor(n / 60), 2), o = we(Math.floor(n % 60), 2);
|
|
2093
2093
|
return r + i + t + o;
|
|
2094
2094
|
}
|
|
2095
|
-
function
|
|
2095
|
+
function Vt(e, t) {
|
|
2096
2096
|
return e % 60 === 0 ? (e > 0 ? "-" : "+") + we(Math.abs(e) / 60, 2) : Z(e, t);
|
|
2097
2097
|
}
|
|
2098
|
-
function
|
|
2098
|
+
function Ui(e, t = "") {
|
|
2099
2099
|
const r = e > 0 ? "-" : "+", n = Math.abs(e), i = Math.floor(n / 60), o = n % 60;
|
|
2100
2100
|
return o === 0 ? r + String(i) : r + String(i) + t + we(o, 2);
|
|
2101
2101
|
}
|
|
2102
|
-
function
|
|
2102
|
+
function $t(e) {
|
|
2103
2103
|
const t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()));
|
|
2104
2104
|
return t.setUTCFullYear(e.getFullYear()), +e - +t;
|
|
2105
2105
|
}
|
|
2106
|
-
const mr = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,
|
|
2106
|
+
const mr = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, We = 36e5, Xt = 6e4, zi = 2, v = {
|
|
2107
2107
|
dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
|
|
2108
2108
|
datePattern: /^([0-9W+-]+)(.*)/,
|
|
2109
2109
|
plainTime: /:/,
|
|
@@ -2143,7 +2143,7 @@ function _e(e, t = {}) {
|
|
|
2143
2143
|
throw new TypeError("1 argument required, but only " + arguments.length + " present");
|
|
2144
2144
|
if (e === null)
|
|
2145
2145
|
return /* @__PURE__ */ new Date(NaN);
|
|
2146
|
-
const r = t.additionalDigits == null ?
|
|
2146
|
+
const r = t.additionalDigits == null ? zi : Number(t.additionalDigits);
|
|
2147
2147
|
if (r !== 2 && r !== 1 && r !== 0)
|
|
2148
2148
|
throw new RangeError("additionalDigits must be 0, 1 or 2");
|
|
2149
2149
|
if (e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]")
|
|
@@ -2152,24 +2152,24 @@ function _e(e, t = {}) {
|
|
|
2152
2152
|
return new Date(e);
|
|
2153
2153
|
if (Object.prototype.toString.call(e) !== "[object String]")
|
|
2154
2154
|
return /* @__PURE__ */ new Date(NaN);
|
|
2155
|
-
const n =
|
|
2155
|
+
const n = Vi(e), { year: i, restDateString: o } = $i(n.date, r), c = Xi(o, i);
|
|
2156
2156
|
if (c === null || isNaN(c.getTime()))
|
|
2157
2157
|
return /* @__PURE__ */ new Date(NaN);
|
|
2158
2158
|
if (c) {
|
|
2159
2159
|
const d = c.getTime();
|
|
2160
|
-
let f = 0,
|
|
2160
|
+
let f = 0, y;
|
|
2161
2161
|
if (n.time && (f = Qi(n.time), f === null || isNaN(f)))
|
|
2162
2162
|
return /* @__PURE__ */ new Date(NaN);
|
|
2163
2163
|
if (n.timeZone || t.timeZone) {
|
|
2164
|
-
if (
|
|
2164
|
+
if (y = oe(n.timeZone || t.timeZone, new Date(d + f)), isNaN(y))
|
|
2165
2165
|
return /* @__PURE__ */ new Date(NaN);
|
|
2166
2166
|
} else
|
|
2167
|
-
|
|
2168
|
-
return new Date(d + f +
|
|
2167
|
+
y = $t(new Date(d + f)), y = $t(new Date(d + f + y));
|
|
2168
|
+
return new Date(d + f + y);
|
|
2169
2169
|
} else
|
|
2170
2170
|
return /* @__PURE__ */ new Date(NaN);
|
|
2171
2171
|
}
|
|
2172
|
-
function
|
|
2172
|
+
function Vi(e) {
|
|
2173
2173
|
const t = {};
|
|
2174
2174
|
let r = v.dateTimePattern.exec(e), n;
|
|
2175
2175
|
if (r ? (t.date = r[1], n = r[3]) : (r = v.datePattern.exec(e), r ? (t.date = r[1], n = r[2]) : (t.date = null, n = e)), n) {
|
|
@@ -2178,7 +2178,7 @@ function $i(e) {
|
|
|
2178
2178
|
}
|
|
2179
2179
|
return t;
|
|
2180
2180
|
}
|
|
2181
|
-
function
|
|
2181
|
+
function $i(e, t) {
|
|
2182
2182
|
if (e) {
|
|
2183
2183
|
const r = v.YYY[t], n = v.YYYYY[t];
|
|
2184
2184
|
let i = v.YYYY.exec(e) || n.exec(e);
|
|
@@ -2232,13 +2232,13 @@ function Xi(e, t) {
|
|
|
2232
2232
|
function Qi(e) {
|
|
2233
2233
|
let t, r, n = v.HH.exec(e);
|
|
2234
2234
|
if (n)
|
|
2235
|
-
return t = parseFloat(n[1].replace(",", ".")),
|
|
2235
|
+
return t = parseFloat(n[1].replace(",", ".")), Fe(t) ? t % 24 * We : NaN;
|
|
2236
2236
|
if (n = v.HHMM.exec(e), n)
|
|
2237
|
-
return t = parseInt(n[1], 10), r = parseFloat(n[2].replace(",", ".")),
|
|
2237
|
+
return t = parseInt(n[1], 10), r = parseFloat(n[2].replace(",", ".")), Fe(t, r) ? t % 24 * We + r * Xt : NaN;
|
|
2238
2238
|
if (n = v.HHMMSS.exec(e), n) {
|
|
2239
2239
|
t = parseInt(n[1], 10), r = parseInt(n[2], 10);
|
|
2240
2240
|
const i = parseFloat(n[3].replace(",", "."));
|
|
2241
|
-
return
|
|
2241
|
+
return Fe(t, r, i) ? t % 24 * We + r * Xt + i * 1e3 : NaN;
|
|
2242
2242
|
}
|
|
2243
2243
|
return null;
|
|
2244
2244
|
}
|
|
@@ -2274,7 +2274,7 @@ function Ji(e, t) {
|
|
|
2274
2274
|
function Bt(e, t) {
|
|
2275
2275
|
return !(e < 0 || e > 52 || t != null && (t < 0 || t > 6));
|
|
2276
2276
|
}
|
|
2277
|
-
function
|
|
2277
|
+
function Fe(e, t, r) {
|
|
2278
2278
|
return !(e < 0 || e >= 25 || t != null && (t < 0 || t >= 60) || r != null && (r < 0 || r >= 60));
|
|
2279
2279
|
}
|
|
2280
2280
|
const Ki = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
|
|
@@ -2286,8 +2286,8 @@ function es(e, t, r = {}) {
|
|
|
2286
2286
|
t = n.reduce(function(o, c) {
|
|
2287
2287
|
if (c[0] === "'")
|
|
2288
2288
|
return o;
|
|
2289
|
-
const d = o.indexOf(c), f = o[d - 1] === "'",
|
|
2290
|
-
return f ?
|
|
2289
|
+
const d = o.indexOf(c), f = o[d - 1] === "'", y = o.replace(c, "'" + Li[c[0]](i, c, r) + "'");
|
|
2290
|
+
return f ? y.substring(0, d - 1) + y.substring(d + 1) : y;
|
|
2291
2291
|
}, t);
|
|
2292
2292
|
}
|
|
2293
2293
|
return fr(e, t, r);
|
|
@@ -2308,13 +2308,13 @@ function rs(e, t, r) {
|
|
|
2308
2308
|
if (typeof e == "string" && !e.match(mr))
|
|
2309
2309
|
return _e(e, { ...r, timeZone: t });
|
|
2310
2310
|
e = _e(e, r);
|
|
2311
|
-
const n =
|
|
2311
|
+
const n = $e(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()).getTime(), i = oe(t, new Date(n));
|
|
2312
2312
|
return new Date(n + i);
|
|
2313
2313
|
}
|
|
2314
2314
|
function pr(e, t) {
|
|
2315
2315
|
return -oe(e, t);
|
|
2316
2316
|
}
|
|
2317
|
-
function
|
|
2317
|
+
function Ps(e) {
|
|
2318
2318
|
return fr(e, "yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
|
|
2319
2319
|
}
|
|
2320
2320
|
function Jt(e, t = {}) {
|
|
@@ -2348,7 +2348,7 @@ const be = {
|
|
|
2348
2348
|
weekly: 60 * 60 * 24 * 7 * 1e3,
|
|
2349
2349
|
trend: 0
|
|
2350
2350
|
};
|
|
2351
|
-
function
|
|
2351
|
+
function Is(e, t) {
|
|
2352
2352
|
return e.map((r) => ({
|
|
2353
2353
|
value: r,
|
|
2354
2354
|
label: t.t(`configuration.vitals.reports.granularity.${r}`)
|
|
@@ -2361,7 +2361,7 @@ function ns(e, t) {
|
|
|
2361
2361
|
origin: t
|
|
2362
2362
|
};
|
|
2363
2363
|
}
|
|
2364
|
-
function
|
|
2364
|
+
function Cs(e) {
|
|
2365
2365
|
return e && Kt.find((r) => e <= be[r]) || null;
|
|
2366
2366
|
}
|
|
2367
2367
|
function wr(e, t, r, n) {
|
|
@@ -2375,12 +2375,12 @@ function as(e, t, r) {
|
|
|
2375
2375
|
function _r(e, t, r) {
|
|
2376
2376
|
return wr(Math.ceil, e, t, r);
|
|
2377
2377
|
}
|
|
2378
|
-
class
|
|
2378
|
+
class Oe {
|
|
2379
2379
|
constructor(t, r, n) {
|
|
2380
2380
|
_(this, "timeframe");
|
|
2381
2381
|
_(this, "tz");
|
|
2382
2382
|
_(this, "dataGranularity");
|
|
2383
|
-
if (this.constructor ===
|
|
2383
|
+
if (this.constructor === Oe)
|
|
2384
2384
|
throw new Error("BaseQueryTime is not meant to be used directly.");
|
|
2385
2385
|
this.timeframe = t, this.tz = r, this.dataGranularity = n ?? t.dataGranularity;
|
|
2386
2386
|
}
|
|
@@ -2400,22 +2400,22 @@ class Me {
|
|
|
2400
2400
|
}
|
|
2401
2401
|
// Return a UNIX timestamp suitable for use in the `start` query param.
|
|
2402
2402
|
startSeconds() {
|
|
2403
|
-
return
|
|
2403
|
+
return Ft(this.startDate());
|
|
2404
2404
|
}
|
|
2405
2405
|
// Return a UNIX timestamp suitable for use in the `end` query param.
|
|
2406
2406
|
endSeconds() {
|
|
2407
|
-
return
|
|
2407
|
+
return Ft(this.endDate());
|
|
2408
2408
|
}
|
|
2409
2409
|
// Return epoch time in milliseconds, suitable for use in the `startMs` query param.
|
|
2410
2410
|
startMs() {
|
|
2411
|
-
return
|
|
2411
|
+
return Wt(this.startDate());
|
|
2412
2412
|
}
|
|
2413
2413
|
// Return epoch time in milliseconds, suitable for use in the `endMs` query param.
|
|
2414
2414
|
endMs() {
|
|
2415
|
-
return
|
|
2415
|
+
return Wt(this.endDate());
|
|
2416
2416
|
}
|
|
2417
2417
|
}
|
|
2418
|
-
class
|
|
2418
|
+
class Ys extends Oe {
|
|
2419
2419
|
constructor(r, n, i, o, c) {
|
|
2420
2420
|
super(r, i, o);
|
|
2421
2421
|
_(this, "granularity");
|
|
@@ -2431,7 +2431,7 @@ class Is extends Me {
|
|
|
2431
2431
|
return be[this.granularity];
|
|
2432
2432
|
}
|
|
2433
2433
|
}
|
|
2434
|
-
class is extends
|
|
2434
|
+
class is extends Oe {
|
|
2435
2435
|
startDate() {
|
|
2436
2436
|
return this.calculateStartDate(this.timeframe.isRelative, this.dataGranularity);
|
|
2437
2437
|
}
|
|
@@ -2457,16 +2457,16 @@ function ss(e) {
|
|
|
2457
2457
|
var Te = { exports: {} };
|
|
2458
2458
|
Te.exports;
|
|
2459
2459
|
(function(e, t) {
|
|
2460
|
-
var r = 200, n = "__lodash_hash_undefined__", i = 9007199254740991, o = "[object Arguments]", c = "[object Array]", d = "[object Boolean]", f = "[object Date]",
|
|
2461
|
-
|
|
2462
|
-
var vr = typeof ye == "object" && ye && ye.Object === Object && ye, Sr = typeof self == "object" && self && self.Object === Object && self,
|
|
2460
|
+
var r = 200, n = "__lodash_hash_undefined__", i = 9007199254740991, o = "[object Arguments]", c = "[object Array]", d = "[object Boolean]", f = "[object Date]", y = "[object Error]", h = "[object Function]", g = "[object GeneratorFunction]", M = "[object Map]", S = "[object Number]", N = "[object Object]", I = "[object Promise]", K = "[object RegExp]", W = "[object Set]", O = "[object String]", b = "[object Symbol]", F = "[object WeakMap]", Qe = "[object ArrayBuffer]", ue = "[object DataView]", Ze = "[object Float32Array]", Be = "[object Float64Array]", Je = "[object Int8Array]", Ke = "[object Int16Array]", et = "[object Int32Array]", tt = "[object Uint8Array]", rt = "[object Uint8ClampedArray]", nt = "[object Uint16Array]", at = "[object Uint32Array]", Tr = /[\\^$.*+?()[\]{}|]/g, Dr = /\w*$/, Or = /^\[object .+?Constructor\]$/, Mr = /^(?:0|[1-9]\d*)$/, w = {};
|
|
2461
|
+
w[o] = w[c] = w[Qe] = w[ue] = w[d] = w[f] = w[Ze] = w[Be] = w[Je] = w[Ke] = w[et] = w[M] = w[S] = w[N] = w[K] = w[W] = w[O] = w[b] = w[tt] = w[rt] = w[nt] = w[at] = !0, w[y] = w[h] = w[F] = !1;
|
|
2462
|
+
var vr = typeof ye == "object" && ye && ye.Object === Object && ye, Sr = typeof self == "object" && self && self.Object === Object && self, C = vr || Sr || Function("return this")(), it = t && !t.nodeType && t, st = it && !0 && e && !e.nodeType && e, xr = st && st.exports === it;
|
|
2463
2463
|
function Er(a, s) {
|
|
2464
2464
|
return a.set(s[0], s[1]), a;
|
|
2465
2465
|
}
|
|
2466
|
-
function
|
|
2466
|
+
function Nr(a, s) {
|
|
2467
2467
|
return a.add(s), a;
|
|
2468
2468
|
}
|
|
2469
|
-
function
|
|
2469
|
+
function Pr(a, s) {
|
|
2470
2470
|
for (var u = -1, l = a ? a.length : 0; ++u < l && s(a[u], u, a) !== !1; )
|
|
2471
2471
|
;
|
|
2472
2472
|
return a;
|
|
@@ -2481,12 +2481,12 @@ Te.exports;
|
|
|
2481
2481
|
u = s(u, a[T], T, a);
|
|
2482
2482
|
return u;
|
|
2483
2483
|
}
|
|
2484
|
-
function
|
|
2484
|
+
function Ir(a, s) {
|
|
2485
2485
|
for (var u = -1, l = Array(a); ++u < a; )
|
|
2486
2486
|
l[u] = s(u);
|
|
2487
2487
|
return l;
|
|
2488
2488
|
}
|
|
2489
|
-
function
|
|
2489
|
+
function Cr(a, s) {
|
|
2490
2490
|
return a == null ? void 0 : a[s];
|
|
2491
2491
|
}
|
|
2492
2492
|
function ut(a) {
|
|
@@ -2504,7 +2504,7 @@ Te.exports;
|
|
|
2504
2504
|
u[++s] = [T, l];
|
|
2505
2505
|
}), u;
|
|
2506
2506
|
}
|
|
2507
|
-
function
|
|
2507
|
+
function Me(a, s) {
|
|
2508
2508
|
return function(u) {
|
|
2509
2509
|
return a(s(u));
|
|
2510
2510
|
};
|
|
@@ -2515,13 +2515,13 @@ Te.exports;
|
|
|
2515
2515
|
u[++s] = l;
|
|
2516
2516
|
}), u;
|
|
2517
2517
|
}
|
|
2518
|
-
var
|
|
2518
|
+
var Yr = Array.prototype, Rr = Function.prototype, ce = Object.prototype, ve = C["__core-js_shared__"], dt = function() {
|
|
2519
2519
|
var a = /[^.]+$/.exec(ve && ve.keys && ve.keys.IE_PROTO || "");
|
|
2520
2520
|
return a ? "Symbol(src)_1." + a : "";
|
|
2521
|
-
}(), ft = Rr.toString,
|
|
2522
|
-
"^" + ft.call(
|
|
2523
|
-
), ht = xr ?
|
|
2524
|
-
function
|
|
2521
|
+
}(), ft = Rr.toString, G = ce.hasOwnProperty, le = ce.toString, Hr = RegExp(
|
|
2522
|
+
"^" + ft.call(G).replace(Tr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
2523
|
+
), ht = xr ? C.Buffer : void 0, mt = C.Symbol, yt = C.Uint8Array, Gr = Me(Object.getPrototypeOf, Object), Ar = Object.create, Wr = ce.propertyIsEnumerable, Fr = Yr.splice, gt = Object.getOwnPropertySymbols, qr = ht ? ht.isBuffer : void 0, jr = Me(Object.keys, Object), Se = $(C, "DataView"), ee = $(C, "Map"), xe = $(C, "Promise"), Ee = $(C, "Set"), Ne = $(C, "WeakMap"), te = $(Object, "create"), Lr = L(Se), Ur = L(ee), zr = L(xe), Vr = L(Ee), $r = L(Ne), pt = mt ? mt.prototype : void 0, wt = pt ? pt.valueOf : void 0;
|
|
2524
|
+
function q(a) {
|
|
2525
2525
|
var s = -1, u = a ? a.length : 0;
|
|
2526
2526
|
for (this.clear(); ++s < u; ) {
|
|
2527
2527
|
var l = a[s];
|
|
@@ -2540,18 +2540,18 @@ Te.exports;
|
|
|
2540
2540
|
var u = s[a];
|
|
2541
2541
|
return u === n ? void 0 : u;
|
|
2542
2542
|
}
|
|
2543
|
-
return
|
|
2543
|
+
return G.call(s, a) ? s[a] : void 0;
|
|
2544
2544
|
}
|
|
2545
2545
|
function Br(a) {
|
|
2546
2546
|
var s = this.__data__;
|
|
2547
|
-
return te ? s[a] !== void 0 :
|
|
2547
|
+
return te ? s[a] !== void 0 : G.call(s, a);
|
|
2548
2548
|
}
|
|
2549
2549
|
function Jr(a, s) {
|
|
2550
2550
|
var u = this.__data__;
|
|
2551
2551
|
return u[a] = te && s === void 0 ? n : s, this;
|
|
2552
2552
|
}
|
|
2553
|
-
|
|
2554
|
-
function
|
|
2553
|
+
q.prototype.clear = Xr, q.prototype.delete = Qr, q.prototype.get = Zr, q.prototype.has = Br, q.prototype.set = Jr;
|
|
2554
|
+
function Y(a) {
|
|
2555
2555
|
var s = -1, u = a ? a.length : 0;
|
|
2556
2556
|
for (this.clear(); ++s < u; ) {
|
|
2557
2557
|
var l = a[s];
|
|
@@ -2566,7 +2566,7 @@ Te.exports;
|
|
|
2566
2566
|
if (u < 0)
|
|
2567
2567
|
return !1;
|
|
2568
2568
|
var l = s.length - 1;
|
|
2569
|
-
return u == l ? s.pop() :
|
|
2569
|
+
return u == l ? s.pop() : Fr.call(s, u, 1), !0;
|
|
2570
2570
|
}
|
|
2571
2571
|
function tn(a) {
|
|
2572
2572
|
var s = this.__data__, u = de(s, a);
|
|
@@ -2579,8 +2579,8 @@ Te.exports;
|
|
|
2579
2579
|
var u = this.__data__, l = de(u, a);
|
|
2580
2580
|
return l < 0 ? u.push([a, s]) : u[l][1] = s, this;
|
|
2581
2581
|
}
|
|
2582
|
-
|
|
2583
|
-
function
|
|
2582
|
+
Y.prototype.clear = Kr, Y.prototype.delete = en, Y.prototype.get = tn, Y.prototype.has = rn, Y.prototype.set = nn;
|
|
2583
|
+
function z(a) {
|
|
2584
2584
|
var s = -1, u = a ? a.length : 0;
|
|
2585
2585
|
for (this.clear(); ++s < u; ) {
|
|
2586
2586
|
var l = a[s];
|
|
@@ -2589,9 +2589,9 @@ Te.exports;
|
|
|
2589
2589
|
}
|
|
2590
2590
|
function an() {
|
|
2591
2591
|
this.__data__ = {
|
|
2592
|
-
hash: new
|
|
2593
|
-
map: new (ee ||
|
|
2594
|
-
string: new
|
|
2592
|
+
hash: new q(),
|
|
2593
|
+
map: new (ee || Y)(),
|
|
2594
|
+
string: new q()
|
|
2595
2595
|
};
|
|
2596
2596
|
}
|
|
2597
2597
|
function sn(a) {
|
|
@@ -2606,12 +2606,12 @@ Te.exports;
|
|
|
2606
2606
|
function cn(a, s) {
|
|
2607
2607
|
return fe(this, a).set(a, s), this;
|
|
2608
2608
|
}
|
|
2609
|
-
|
|
2610
|
-
function
|
|
2611
|
-
this.__data__ = new
|
|
2609
|
+
z.prototype.clear = an, z.prototype.delete = sn, z.prototype.get = on, z.prototype.has = un, z.prototype.set = cn;
|
|
2610
|
+
function V(a) {
|
|
2611
|
+
this.__data__ = new Y(a);
|
|
2612
2612
|
}
|
|
2613
2613
|
function ln() {
|
|
2614
|
-
this.__data__ = new
|
|
2614
|
+
this.__data__ = new Y();
|
|
2615
2615
|
}
|
|
2616
2616
|
function dn(a) {
|
|
2617
2617
|
return this.__data__.delete(a);
|
|
@@ -2624,83 +2624,83 @@ Te.exports;
|
|
|
2624
2624
|
}
|
|
2625
2625
|
function mn(a, s) {
|
|
2626
2626
|
var u = this.__data__;
|
|
2627
|
-
if (u instanceof
|
|
2627
|
+
if (u instanceof Y) {
|
|
2628
2628
|
var l = u.__data__;
|
|
2629
2629
|
if (!ee || l.length < r - 1)
|
|
2630
2630
|
return l.push([a, s]), this;
|
|
2631
|
-
u = this.__data__ = new
|
|
2631
|
+
u = this.__data__ = new z(l);
|
|
2632
2632
|
}
|
|
2633
2633
|
return u.set(a, s), this;
|
|
2634
2634
|
}
|
|
2635
|
-
|
|
2635
|
+
V.prototype.clear = ln, V.prototype.delete = dn, V.prototype.get = fn, V.prototype.has = hn, V.prototype.set = mn;
|
|
2636
2636
|
function yn(a, s) {
|
|
2637
|
-
var u =
|
|
2637
|
+
var u = Ie(a) || Wn(a) ? Ir(a.length, String) : [], l = u.length, T = !!l;
|
|
2638
2638
|
for (var x in a)
|
|
2639
|
-
|
|
2639
|
+
G.call(a, x) && !(T && (x == "length" || Rn(x, l))) && u.push(x);
|
|
2640
2640
|
return u;
|
|
2641
2641
|
}
|
|
2642
2642
|
function _t(a, s, u) {
|
|
2643
2643
|
var l = a[s];
|
|
2644
|
-
(!(
|
|
2644
|
+
(!(G.call(a, s) && Ot(l, u)) || u === void 0 && !(s in a)) && (a[s] = u);
|
|
2645
2645
|
}
|
|
2646
2646
|
function de(a, s) {
|
|
2647
2647
|
for (var u = a.length; u--; )
|
|
2648
|
-
if (
|
|
2648
|
+
if (Ot(a[u][0], s))
|
|
2649
2649
|
return u;
|
|
2650
2650
|
return -1;
|
|
2651
2651
|
}
|
|
2652
2652
|
function gn(a, s) {
|
|
2653
|
-
return a && bt(s,
|
|
2653
|
+
return a && bt(s, Ce(s), a);
|
|
2654
2654
|
}
|
|
2655
|
-
function
|
|
2655
|
+
function Pe(a, s, u, l, T, x, R) {
|
|
2656
2656
|
var E;
|
|
2657
2657
|
if (l && (E = x ? l(a, T, x, R) : l(a)), E !== void 0)
|
|
2658
2658
|
return E;
|
|
2659
2659
|
if (!he(a))
|
|
2660
2660
|
return a;
|
|
2661
|
-
var St =
|
|
2661
|
+
var St = Ie(a);
|
|
2662
2662
|
if (St) {
|
|
2663
|
-
if (E =
|
|
2664
|
-
return
|
|
2663
|
+
if (E = In(a), !s)
|
|
2664
|
+
return Nn(a, E);
|
|
2665
2665
|
} else {
|
|
2666
|
-
var X = j(a), xt = X == h || X ==
|
|
2667
|
-
if (
|
|
2666
|
+
var X = j(a), xt = X == h || X == g;
|
|
2667
|
+
if (qn(a))
|
|
2668
2668
|
return Dn(a, s);
|
|
2669
|
-
if (X ==
|
|
2669
|
+
if (X == N || X == o || xt && !x) {
|
|
2670
2670
|
if (ut(a))
|
|
2671
2671
|
return x ? a : {};
|
|
2672
|
-
if (E =
|
|
2673
|
-
return
|
|
2672
|
+
if (E = Cn(xt ? {} : a), !s)
|
|
2673
|
+
return Pn(a, gn(E, a));
|
|
2674
2674
|
} else {
|
|
2675
|
-
if (!
|
|
2675
|
+
if (!w[X])
|
|
2676
2676
|
return x ? a : {};
|
|
2677
|
-
E =
|
|
2677
|
+
E = Yn(a, X, Pe, s);
|
|
2678
2678
|
}
|
|
2679
2679
|
}
|
|
2680
|
-
R || (R = new
|
|
2680
|
+
R || (R = new V());
|
|
2681
2681
|
var Et = R.get(a);
|
|
2682
2682
|
if (Et)
|
|
2683
2683
|
return Et;
|
|
2684
2684
|
if (R.set(a, E), !St)
|
|
2685
|
-
var
|
|
2686
|
-
return
|
|
2687
|
-
|
|
2685
|
+
var Nt = u ? kn(a) : Ce(a);
|
|
2686
|
+
return Pr(Nt || a, function(Ye, me) {
|
|
2687
|
+
Nt && (me = Ye, Ye = a[me]), _t(E, me, Pe(Ye, s, u, l, me, a, R));
|
|
2688
2688
|
}), E;
|
|
2689
2689
|
}
|
|
2690
2690
|
function pn(a) {
|
|
2691
|
-
return he(a) ?
|
|
2691
|
+
return he(a) ? Ar(a) : {};
|
|
2692
2692
|
}
|
|
2693
2693
|
function wn(a, s, u) {
|
|
2694
2694
|
var l = s(a);
|
|
2695
|
-
return
|
|
2695
|
+
return Ie(a) ? l : kr(l, u(a));
|
|
2696
2696
|
}
|
|
2697
2697
|
function _n(a) {
|
|
2698
2698
|
return le.call(a);
|
|
2699
2699
|
}
|
|
2700
2700
|
function bn(a) {
|
|
2701
|
-
if (!he(a) ||
|
|
2701
|
+
if (!he(a) || Gn(a))
|
|
2702
2702
|
return !1;
|
|
2703
|
-
var s = vt(a) || ut(a) ?
|
|
2703
|
+
var s = vt(a) || ut(a) ? Hr : Or;
|
|
2704
2704
|
return s.test(L(a));
|
|
2705
2705
|
}
|
|
2706
2706
|
function Tn(a) {
|
|
@@ -2708,7 +2708,7 @@ Te.exports;
|
|
|
2708
2708
|
return jr(a);
|
|
2709
2709
|
var s = [];
|
|
2710
2710
|
for (var u in Object(a))
|
|
2711
|
-
|
|
2711
|
+
G.call(a, u) && u != "constructor" && s.push(u);
|
|
2712
2712
|
return s;
|
|
2713
2713
|
}
|
|
2714
2714
|
function Dn(a, s) {
|
|
@@ -2721,11 +2721,11 @@ Te.exports;
|
|
|
2721
2721
|
var s = new a.constructor(a.byteLength);
|
|
2722
2722
|
return new yt(s).set(new yt(a)), s;
|
|
2723
2723
|
}
|
|
2724
|
-
function
|
|
2724
|
+
function On(a, s) {
|
|
2725
2725
|
var u = s ? ke(a.buffer) : a.buffer;
|
|
2726
2726
|
return new a.constructor(u, a.byteOffset, a.byteLength);
|
|
2727
2727
|
}
|
|
2728
|
-
function
|
|
2728
|
+
function Mn(a, s, u) {
|
|
2729
2729
|
var l = s ? u(ct(a), !0) : ct(a);
|
|
2730
2730
|
return ot(l, Er, new a.constructor());
|
|
2731
2731
|
}
|
|
@@ -2735,7 +2735,7 @@ Te.exports;
|
|
|
2735
2735
|
}
|
|
2736
2736
|
function Sn(a, s, u) {
|
|
2737
2737
|
var l = s ? u(lt(a), !0) : lt(a);
|
|
2738
|
-
return ot(l,
|
|
2738
|
+
return ot(l, Nr, new a.constructor());
|
|
2739
2739
|
}
|
|
2740
2740
|
function xn(a) {
|
|
2741
2741
|
return wt ? Object(wt.call(a)) : {};
|
|
@@ -2744,7 +2744,7 @@ Te.exports;
|
|
|
2744
2744
|
var u = s ? ke(a.buffer) : a.buffer;
|
|
2745
2745
|
return new a.constructor(u, a.byteOffset, a.length);
|
|
2746
2746
|
}
|
|
2747
|
-
function
|
|
2747
|
+
function Nn(a, s) {
|
|
2748
2748
|
var u = -1, l = a.length;
|
|
2749
2749
|
for (s || (s = Array(l)); ++u < l; )
|
|
2750
2750
|
s[u] = a[u];
|
|
@@ -2758,46 +2758,46 @@ Te.exports;
|
|
|
2758
2758
|
}
|
|
2759
2759
|
return u;
|
|
2760
2760
|
}
|
|
2761
|
-
function
|
|
2761
|
+
function Pn(a, s) {
|
|
2762
2762
|
return bt(a, Tt(a), s);
|
|
2763
2763
|
}
|
|
2764
2764
|
function kn(a) {
|
|
2765
|
-
return wn(a,
|
|
2765
|
+
return wn(a, Ce, Tt);
|
|
2766
2766
|
}
|
|
2767
2767
|
function fe(a, s) {
|
|
2768
2768
|
var u = a.__data__;
|
|
2769
|
-
return
|
|
2769
|
+
return Hn(s) ? u[typeof s == "string" ? "string" : "hash"] : u.map;
|
|
2770
2770
|
}
|
|
2771
|
-
function
|
|
2772
|
-
var u =
|
|
2771
|
+
function $(a, s) {
|
|
2772
|
+
var u = Cr(a, s);
|
|
2773
2773
|
return bn(u) ? u : void 0;
|
|
2774
2774
|
}
|
|
2775
|
-
var Tt = gt ?
|
|
2776
|
-
(Se && j(new Se(new ArrayBuffer(1))) != ue || ee && j(new ee()) !=
|
|
2777
|
-
var s = le.call(a), u = s ==
|
|
2775
|
+
var Tt = gt ? Me(gt, Object) : Un, j = _n;
|
|
2776
|
+
(Se && j(new Se(new ArrayBuffer(1))) != ue || ee && j(new ee()) != M || xe && j(xe.resolve()) != I || Ee && j(new Ee()) != W || Ne && j(new Ne()) != F) && (j = function(a) {
|
|
2777
|
+
var s = le.call(a), u = s == N ? a.constructor : void 0, l = u ? L(u) : void 0;
|
|
2778
2778
|
if (l)
|
|
2779
2779
|
switch (l) {
|
|
2780
2780
|
case Lr:
|
|
2781
2781
|
return ue;
|
|
2782
|
-
case zr:
|
|
2783
|
-
return O;
|
|
2784
2782
|
case Ur:
|
|
2785
|
-
return
|
|
2786
|
-
case
|
|
2787
|
-
return
|
|
2783
|
+
return M;
|
|
2784
|
+
case zr:
|
|
2785
|
+
return I;
|
|
2788
2786
|
case Vr:
|
|
2789
|
-
return
|
|
2787
|
+
return W;
|
|
2788
|
+
case $r:
|
|
2789
|
+
return F;
|
|
2790
2790
|
}
|
|
2791
2791
|
return s;
|
|
2792
2792
|
});
|
|
2793
|
-
function
|
|
2793
|
+
function In(a) {
|
|
2794
2794
|
var s = a.length, u = a.constructor(s);
|
|
2795
|
-
return s && typeof a[0] == "string" &&
|
|
2795
|
+
return s && typeof a[0] == "string" && G.call(a, "index") && (u.index = a.index, u.input = a.input), u;
|
|
2796
2796
|
}
|
|
2797
|
-
function
|
|
2798
|
-
return typeof a.constructor == "function" && !Dt(a) ? pn(
|
|
2797
|
+
function Cn(a) {
|
|
2798
|
+
return typeof a.constructor == "function" && !Dt(a) ? pn(Gr(a)) : {};
|
|
2799
2799
|
}
|
|
2800
|
-
function
|
|
2800
|
+
function Yn(a, s, u, l) {
|
|
2801
2801
|
var T = a.constructor;
|
|
2802
2802
|
switch (s) {
|
|
2803
2803
|
case Qe:
|
|
@@ -2806,7 +2806,7 @@ Te.exports;
|
|
|
2806
2806
|
case f:
|
|
2807
2807
|
return new T(+a);
|
|
2808
2808
|
case ue:
|
|
2809
|
-
return
|
|
2809
|
+
return On(a, l);
|
|
2810
2810
|
case Ze:
|
|
2811
2811
|
case Be:
|
|
2812
2812
|
case Je:
|
|
@@ -2817,27 +2817,27 @@ Te.exports;
|
|
|
2817
2817
|
case nt:
|
|
2818
2818
|
case at:
|
|
2819
2819
|
return En(a, l);
|
|
2820
|
-
case O:
|
|
2821
|
-
return On(a, l, u);
|
|
2822
|
-
case S:
|
|
2823
2820
|
case M:
|
|
2821
|
+
return Mn(a, l, u);
|
|
2822
|
+
case S:
|
|
2823
|
+
case O:
|
|
2824
2824
|
return new T(a);
|
|
2825
2825
|
case K:
|
|
2826
2826
|
return vn(a);
|
|
2827
|
-
case
|
|
2827
|
+
case W:
|
|
2828
2828
|
return Sn(a, l, u);
|
|
2829
2829
|
case b:
|
|
2830
2830
|
return xn(a);
|
|
2831
2831
|
}
|
|
2832
2832
|
}
|
|
2833
2833
|
function Rn(a, s) {
|
|
2834
|
-
return s = s ?? i, !!s && (typeof a == "number" ||
|
|
2834
|
+
return s = s ?? i, !!s && (typeof a == "number" || Mr.test(a)) && a > -1 && a % 1 == 0 && a < s;
|
|
2835
2835
|
}
|
|
2836
|
-
function
|
|
2836
|
+
function Hn(a) {
|
|
2837
2837
|
var s = typeof a;
|
|
2838
2838
|
return s == "string" || s == "number" || s == "symbol" || s == "boolean" ? a !== "__proto__" : a === null;
|
|
2839
2839
|
}
|
|
2840
|
-
function
|
|
2840
|
+
function Gn(a) {
|
|
2841
2841
|
return !!dt && dt in a;
|
|
2842
2842
|
}
|
|
2843
2843
|
function Dt(a) {
|
|
@@ -2857,26 +2857,26 @@ Te.exports;
|
|
|
2857
2857
|
}
|
|
2858
2858
|
return "";
|
|
2859
2859
|
}
|
|
2860
|
-
function
|
|
2861
|
-
return
|
|
2860
|
+
function An(a) {
|
|
2861
|
+
return Pe(a, !0, !0);
|
|
2862
2862
|
}
|
|
2863
|
-
function
|
|
2863
|
+
function Ot(a, s) {
|
|
2864
2864
|
return a === s || a !== a && s !== s;
|
|
2865
2865
|
}
|
|
2866
|
-
function
|
|
2867
|
-
return
|
|
2866
|
+
function Wn(a) {
|
|
2867
|
+
return Fn(a) && G.call(a, "callee") && (!Wr.call(a, "callee") || le.call(a) == o);
|
|
2868
2868
|
}
|
|
2869
|
-
var
|
|
2870
|
-
function
|
|
2869
|
+
var Ie = Array.isArray;
|
|
2870
|
+
function Mt(a) {
|
|
2871
2871
|
return a != null && jn(a.length) && !vt(a);
|
|
2872
2872
|
}
|
|
2873
|
-
function
|
|
2874
|
-
return Ln(a) &&
|
|
2873
|
+
function Fn(a) {
|
|
2874
|
+
return Ln(a) && Mt(a);
|
|
2875
2875
|
}
|
|
2876
|
-
var
|
|
2876
|
+
var qn = qr || zn;
|
|
2877
2877
|
function vt(a) {
|
|
2878
2878
|
var s = he(a) ? le.call(a) : "";
|
|
2879
|
-
return s == h || s ==
|
|
2879
|
+
return s == h || s == g;
|
|
2880
2880
|
}
|
|
2881
2881
|
function jn(a) {
|
|
2882
2882
|
return typeof a == "number" && a > -1 && a % 1 == 0 && a <= i;
|
|
@@ -2888,20 +2888,20 @@ Te.exports;
|
|
|
2888
2888
|
function Ln(a) {
|
|
2889
2889
|
return !!a && typeof a == "object";
|
|
2890
2890
|
}
|
|
2891
|
-
function
|
|
2892
|
-
return
|
|
2891
|
+
function Ce(a) {
|
|
2892
|
+
return Mt(a) ? yn(a) : Tn(a);
|
|
2893
2893
|
}
|
|
2894
|
-
function
|
|
2894
|
+
function Un() {
|
|
2895
2895
|
return [];
|
|
2896
2896
|
}
|
|
2897
|
-
function
|
|
2897
|
+
function zn() {
|
|
2898
2898
|
return !1;
|
|
2899
2899
|
}
|
|
2900
|
-
e.exports =
|
|
2900
|
+
e.exports = An;
|
|
2901
2901
|
})(Te, Te.exports);
|
|
2902
2902
|
var os = Te.exports;
|
|
2903
2903
|
const us = /* @__PURE__ */ ss(os), J = (e, t) => new Date(e.getTime() - pr(t, e));
|
|
2904
|
-
class
|
|
2904
|
+
class P {
|
|
2905
2905
|
constructor(t) {
|
|
2906
2906
|
_(this, "timeframeText");
|
|
2907
2907
|
_(this, "key");
|
|
@@ -2973,16 +2973,16 @@ class N {
|
|
|
2973
2973
|
return gr(r, t);
|
|
2974
2974
|
}
|
|
2975
2975
|
}
|
|
2976
|
-
class cs extends
|
|
2976
|
+
class cs extends P {
|
|
2977
2977
|
rawStart(t) {
|
|
2978
|
-
let r =
|
|
2978
|
+
let r = H(this.tzAdjustedDate(t), { weekStartsOn: 1 });
|
|
2979
2979
|
return t && (r = J(r, t)), r;
|
|
2980
2980
|
}
|
|
2981
2981
|
maximumTimeframeLength() {
|
|
2982
2982
|
return 60 * 60 * 24 * 7;
|
|
2983
2983
|
}
|
|
2984
2984
|
}
|
|
2985
|
-
class ls extends
|
|
2985
|
+
class ls extends P {
|
|
2986
2986
|
rawStart(t) {
|
|
2987
2987
|
let r = B(this.tzAdjustedDate(t));
|
|
2988
2988
|
return t && (r = J(r, t)), r;
|
|
@@ -2991,20 +2991,20 @@ class ls extends N {
|
|
|
2991
2991
|
return 60 * 60 * 24 * 31;
|
|
2992
2992
|
}
|
|
2993
2993
|
}
|
|
2994
|
-
class ds extends
|
|
2994
|
+
class ds extends P {
|
|
2995
2995
|
rawEnd(t) {
|
|
2996
|
-
let r =
|
|
2996
|
+
let r = H(this.tzAdjustedDate(t), { weekStartsOn: 1 });
|
|
2997
2997
|
return t && (r = J(r, t)), r;
|
|
2998
2998
|
}
|
|
2999
2999
|
rawStart(t) {
|
|
3000
3000
|
const r = this.tzAdjustedDate(t);
|
|
3001
|
-
let n =
|
|
3001
|
+
let n = H(r.setDate(r.getDate() - 7), {
|
|
3002
3002
|
weekStartsOn: 1
|
|
3003
3003
|
});
|
|
3004
3004
|
return t && (n = J(n, t)), n;
|
|
3005
3005
|
}
|
|
3006
3006
|
}
|
|
3007
|
-
class fs extends
|
|
3007
|
+
class fs extends P {
|
|
3008
3008
|
rawEnd(t) {
|
|
3009
3009
|
let r = B(this.tzAdjustedDate(t));
|
|
3010
3010
|
return t && (r = J(r, t)), r;
|
|
@@ -3016,9 +3016,9 @@ class fs extends N {
|
|
|
3016
3016
|
}
|
|
3017
3017
|
const hs = /* @__PURE__ */ new Map([
|
|
3018
3018
|
[
|
|
3019
|
-
|
|
3020
|
-
new
|
|
3021
|
-
key:
|
|
3019
|
+
m.FIFTEEN_MIN,
|
|
3020
|
+
new P({
|
|
3021
|
+
key: m.FIFTEEN_MIN,
|
|
3022
3022
|
display: "Last 15 minutes",
|
|
3023
3023
|
timeframeText: "15 minutes",
|
|
3024
3024
|
timeframeLength: () => 60 * 15,
|
|
@@ -3031,9 +3031,9 @@ const hs = /* @__PURE__ */ new Map([
|
|
|
3031
3031
|
})
|
|
3032
3032
|
],
|
|
3033
3033
|
[
|
|
3034
|
-
|
|
3035
|
-
new
|
|
3036
|
-
key:
|
|
3034
|
+
m.ONE_HOUR,
|
|
3035
|
+
new P({
|
|
3036
|
+
key: m.ONE_HOUR,
|
|
3037
3037
|
display: "Last hour",
|
|
3038
3038
|
timeframeText: "One hour",
|
|
3039
3039
|
timeframeLength: () => 60 * 60 * 1,
|
|
@@ -3046,9 +3046,9 @@ const hs = /* @__PURE__ */ new Map([
|
|
|
3046
3046
|
})
|
|
3047
3047
|
],
|
|
3048
3048
|
[
|
|
3049
|
-
|
|
3050
|
-
new
|
|
3051
|
-
key:
|
|
3049
|
+
m.SIX_HOUR,
|
|
3050
|
+
new P({
|
|
3051
|
+
key: m.SIX_HOUR,
|
|
3052
3052
|
display: "Last 6 hours",
|
|
3053
3053
|
timeframeText: "6 hours",
|
|
3054
3054
|
timeframeLength: () => 60 * 60 * 6,
|
|
@@ -3061,9 +3061,9 @@ const hs = /* @__PURE__ */ new Map([
|
|
|
3061
3061
|
})
|
|
3062
3062
|
],
|
|
3063
3063
|
[
|
|
3064
|
-
|
|
3065
|
-
new
|
|
3066
|
-
key:
|
|
3064
|
+
m.TWELVE_HOUR,
|
|
3065
|
+
new P({
|
|
3066
|
+
key: m.TWELVE_HOUR,
|
|
3067
3067
|
display: "Last 12 hours",
|
|
3068
3068
|
timeframeText: "12 hours",
|
|
3069
3069
|
timeframeLength: () => 60 * 60 * 12,
|
|
@@ -3076,9 +3076,9 @@ const hs = /* @__PURE__ */ new Map([
|
|
|
3076
3076
|
})
|
|
3077
3077
|
],
|
|
3078
3078
|
[
|
|
3079
|
-
|
|
3080
|
-
new
|
|
3081
|
-
key:
|
|
3079
|
+
m.ONE_DAY,
|
|
3080
|
+
new P({
|
|
3081
|
+
key: m.ONE_DAY,
|
|
3082
3082
|
display: "Last 24 hours",
|
|
3083
3083
|
timeframeText: "24 hours",
|
|
3084
3084
|
timeframeLength: () => 60 * 60 * 24,
|
|
@@ -3091,9 +3091,9 @@ const hs = /* @__PURE__ */ new Map([
|
|
|
3091
3091
|
})
|
|
3092
3092
|
],
|
|
3093
3093
|
[
|
|
3094
|
-
|
|
3095
|
-
new
|
|
3096
|
-
key:
|
|
3094
|
+
m.SEVEN_DAY,
|
|
3095
|
+
new P({
|
|
3096
|
+
key: m.SEVEN_DAY,
|
|
3097
3097
|
display: "Last 7 days",
|
|
3098
3098
|
timeframeText: "7 days",
|
|
3099
3099
|
timeframeLength: () => 60 * 60 * 24 * 7,
|
|
@@ -3106,9 +3106,9 @@ const hs = /* @__PURE__ */ new Map([
|
|
|
3106
3106
|
})
|
|
3107
3107
|
],
|
|
3108
3108
|
[
|
|
3109
|
-
|
|
3110
|
-
new
|
|
3111
|
-
key:
|
|
3109
|
+
m.THIRTY_DAY,
|
|
3110
|
+
new P({
|
|
3111
|
+
key: m.THIRTY_DAY,
|
|
3112
3112
|
display: "Last 30 days",
|
|
3113
3113
|
timeframeText: "30 days",
|
|
3114
3114
|
timeframeLength: () => 60 * 60 * 24 * 30,
|
|
@@ -3121,14 +3121,14 @@ const hs = /* @__PURE__ */ new Map([
|
|
|
3121
3121
|
})
|
|
3122
3122
|
],
|
|
3123
3123
|
[
|
|
3124
|
-
|
|
3124
|
+
m.CURRENT_WEEK,
|
|
3125
3125
|
new cs({
|
|
3126
|
-
key:
|
|
3126
|
+
key: m.CURRENT_WEEK,
|
|
3127
3127
|
display: "This week",
|
|
3128
3128
|
timeframeText: "Week",
|
|
3129
3129
|
timeframeLength: () => {
|
|
3130
|
-
const e =
|
|
3131
|
-
return (pe(
|
|
3130
|
+
const e = H(/* @__PURE__ */ new Date(), { weekStartsOn: 1 });
|
|
3131
|
+
return (pe(Ct(/* @__PURE__ */ new Date(), 1)).getTime() - e.getTime()) / 1e3;
|
|
3132
3132
|
},
|
|
3133
3133
|
defaultResponseGranularity: "daily",
|
|
3134
3134
|
dataGranularity: "daily",
|
|
@@ -3139,14 +3139,14 @@ const hs = /* @__PURE__ */ new Map([
|
|
|
3139
3139
|
})
|
|
3140
3140
|
],
|
|
3141
3141
|
[
|
|
3142
|
-
|
|
3142
|
+
m.CURRENT_MONTH,
|
|
3143
3143
|
new ls({
|
|
3144
|
-
key:
|
|
3144
|
+
key: m.CURRENT_MONTH,
|
|
3145
3145
|
display: "This month",
|
|
3146
3146
|
timeframeText: "Month",
|
|
3147
3147
|
timeframeLength: () => {
|
|
3148
3148
|
const e = B(/* @__PURE__ */ new Date());
|
|
3149
|
-
return (pe(
|
|
3149
|
+
return (pe(Ct(/* @__PURE__ */ new Date(), 1)).getTime() - e.getTime()) / 1e3;
|
|
3150
3150
|
},
|
|
3151
3151
|
defaultResponseGranularity: "daily",
|
|
3152
3152
|
dataGranularity: "daily",
|
|
@@ -3155,9 +3155,9 @@ const hs = /* @__PURE__ */ new Map([
|
|
|
3155
3155
|
})
|
|
3156
3156
|
],
|
|
3157
3157
|
[
|
|
3158
|
-
|
|
3158
|
+
m.PREVIOUS_WEEK,
|
|
3159
3159
|
new ds({
|
|
3160
|
-
key:
|
|
3160
|
+
key: m.PREVIOUS_WEEK,
|
|
3161
3161
|
display: "Previous week",
|
|
3162
3162
|
timeframeText: "Week",
|
|
3163
3163
|
timeframeLength: () => 60 * 60 * 24 * 7,
|
|
@@ -3170,9 +3170,9 @@ const hs = /* @__PURE__ */ new Map([
|
|
|
3170
3170
|
})
|
|
3171
3171
|
],
|
|
3172
3172
|
[
|
|
3173
|
-
|
|
3173
|
+
m.PREVIOUS_MONTH,
|
|
3174
3174
|
new fs({
|
|
3175
|
-
key:
|
|
3175
|
+
key: m.PREVIOUS_MONTH,
|
|
3176
3176
|
display: "Previous month",
|
|
3177
3177
|
timeframeText: "Month",
|
|
3178
3178
|
timeframeLength: () => {
|
|
@@ -3187,9 +3187,9 @@ const hs = /* @__PURE__ */ new Map([
|
|
|
3187
3187
|
})
|
|
3188
3188
|
]
|
|
3189
3189
|
]);
|
|
3190
|
-
function
|
|
3190
|
+
function Hs(e) {
|
|
3191
3191
|
const t = new Date(e.start), r = new Date(e.end), n = (r.getTime() - t.getTime()) / 1e3;
|
|
3192
|
-
return e.timePeriodsKey && us(hs.get(e.timePeriodsKey)) || new
|
|
3192
|
+
return e.timePeriodsKey && us(hs.get(e.timePeriodsKey)) || new P({
|
|
3193
3193
|
key: "custom",
|
|
3194
3194
|
timeframeText: "custom",
|
|
3195
3195
|
display: "custom",
|
|
@@ -3202,14 +3202,14 @@ function Gs(e) {
|
|
|
3202
3202
|
allowedTiers: ["free", "plus", "enterprise"]
|
|
3203
3203
|
});
|
|
3204
3204
|
}
|
|
3205
|
-
function
|
|
3205
|
+
function Gs(e) {
|
|
3206
3206
|
return {
|
|
3207
3207
|
...e.key !== "custom" && { timePeriodsKey: e.key },
|
|
3208
3208
|
start: e.rawStart(),
|
|
3209
3209
|
end: e.rawEnd()
|
|
3210
3210
|
};
|
|
3211
3211
|
}
|
|
3212
|
-
function
|
|
3212
|
+
function As(e) {
|
|
3213
3213
|
return {
|
|
3214
3214
|
key: e.key,
|
|
3215
3215
|
display: e.display,
|
|
@@ -3223,6 +3223,25 @@ function Ws(e) {
|
|
|
3223
3223
|
function ms(e, t) {
|
|
3224
3224
|
return Ei(e.getTimezoneOffset() - t.getTimezoneOffset());
|
|
3225
3225
|
}
|
|
3226
|
+
const Ws = {
|
|
3227
|
+
"15M": m.FIFTEEN_MIN,
|
|
3228
|
+
"1H": m.ONE_HOUR,
|
|
3229
|
+
"6H": m.SIX_HOUR,
|
|
3230
|
+
"12H": m.TWELVE_HOUR,
|
|
3231
|
+
"24H": m.ONE_DAY,
|
|
3232
|
+
"7D": m.SEVEN_DAY,
|
|
3233
|
+
"15m": m.FIFTEEN_MIN,
|
|
3234
|
+
"1h": m.ONE_HOUR,
|
|
3235
|
+
"6h": m.SIX_HOUR,
|
|
3236
|
+
"12h": m.TWELVE_HOUR,
|
|
3237
|
+
"24h": m.ONE_DAY,
|
|
3238
|
+
"7d": m.SEVEN_DAY,
|
|
3239
|
+
"30d": m.THIRTY_DAY,
|
|
3240
|
+
current_week: m.CURRENT_WEEK,
|
|
3241
|
+
current_month: m.CURRENT_MONTH,
|
|
3242
|
+
previous_week: m.PREVIOUS_WEEK,
|
|
3243
|
+
previous_month: m.PREVIOUS_MONTH
|
|
3244
|
+
};
|
|
3226
3245
|
class Xe {
|
|
3227
3246
|
constructor(t) {
|
|
3228
3247
|
_(this, "_seed");
|
|
@@ -3233,45 +3252,45 @@ class Xe {
|
|
|
3233
3252
|
return Math.floor(i * (r - t + 1)) + t;
|
|
3234
3253
|
}
|
|
3235
3254
|
}
|
|
3236
|
-
const
|
|
3255
|
+
const Fs = (e, t) => {
|
|
3237
3256
|
const r = br(10, 1e4), n = new Xe(r), i = Date.now() - 6 * 60 * 60 * 1e3, o = Date.now(), c = [];
|
|
3238
3257
|
let d = 0;
|
|
3239
3258
|
for (let h = i; h <= o; h += 60 * 60 * 1e3)
|
|
3240
3259
|
if (t)
|
|
3241
|
-
for (const
|
|
3242
|
-
t[
|
|
3260
|
+
for (const g in t)
|
|
3261
|
+
t[g].forEach((M) => {
|
|
3243
3262
|
d += n.next(50, 500);
|
|
3244
3263
|
const S = {
|
|
3245
|
-
[
|
|
3264
|
+
[g]: M,
|
|
3246
3265
|
[e.name]: d
|
|
3247
|
-
},
|
|
3266
|
+
}, N = {
|
|
3248
3267
|
version: "1.0",
|
|
3249
3268
|
timestamp: new Date(h).toISOString(),
|
|
3250
3269
|
event: S
|
|
3251
3270
|
};
|
|
3252
|
-
c.push(
|
|
3271
|
+
c.push(N);
|
|
3253
3272
|
});
|
|
3254
3273
|
else {
|
|
3255
3274
|
d += n.next(50, 500);
|
|
3256
|
-
const
|
|
3275
|
+
const g = {
|
|
3257
3276
|
version: "1.0",
|
|
3258
3277
|
timestamp: new Date(h).toISOString(),
|
|
3259
3278
|
event: {
|
|
3260
3279
|
[e.name]: d
|
|
3261
3280
|
}
|
|
3262
3281
|
};
|
|
3263
|
-
c.push(
|
|
3282
|
+
c.push(g);
|
|
3264
3283
|
}
|
|
3265
3284
|
const f = {};
|
|
3266
3285
|
if (t)
|
|
3267
3286
|
for (const h in t)
|
|
3268
|
-
f[h] = {}, t[h].forEach((
|
|
3269
|
-
f[h][
|
|
3270
|
-
name:
|
|
3287
|
+
f[h] = {}, t[h].forEach((g) => {
|
|
3288
|
+
f[h][g] = {
|
|
3289
|
+
name: g,
|
|
3271
3290
|
deleted: !1
|
|
3272
3291
|
};
|
|
3273
3292
|
});
|
|
3274
|
-
const
|
|
3293
|
+
const y = {
|
|
3275
3294
|
start_ms: i,
|
|
3276
3295
|
end_ms: o,
|
|
3277
3296
|
query_id: "12345",
|
|
@@ -3285,7 +3304,7 @@ const As = (e, t) => {
|
|
|
3285
3304
|
};
|
|
3286
3305
|
return {
|
|
3287
3306
|
data: c,
|
|
3288
|
-
meta:
|
|
3307
|
+
meta: y
|
|
3289
3308
|
};
|
|
3290
3309
|
}, qs = (e) => {
|
|
3291
3310
|
const t = br(10, 1e4), r = new Xe(t), n = Date.now() - 6 * 60 * 60 * 1e3, i = Date.now(), o = [], c = {};
|
|
@@ -3293,14 +3312,14 @@ const As = (e, t) => {
|
|
|
3293
3312
|
c[f.name] = 0;
|
|
3294
3313
|
});
|
|
3295
3314
|
for (let f = n; f <= i; f += 60 * 60 * 1e3) {
|
|
3296
|
-
const
|
|
3297
|
-
e.forEach((
|
|
3298
|
-
c[
|
|
3315
|
+
const y = {};
|
|
3316
|
+
e.forEach((g) => {
|
|
3317
|
+
c[g.name] += r.next(50, 500), y[g.name] = c[g.name];
|
|
3299
3318
|
});
|
|
3300
3319
|
const h = {
|
|
3301
3320
|
version: "1.0",
|
|
3302
3321
|
timestamp: new Date(f).toISOString(),
|
|
3303
|
-
event:
|
|
3322
|
+
event: y
|
|
3304
3323
|
};
|
|
3305
3324
|
o.push(h);
|
|
3306
3325
|
}
|
|
@@ -3309,7 +3328,7 @@ const As = (e, t) => {
|
|
|
3309
3328
|
end_ms: i,
|
|
3310
3329
|
query_id: "12345",
|
|
3311
3330
|
metric_names: e.map((f) => f.name),
|
|
3312
|
-
metric_units: e.reduce((f,
|
|
3331
|
+
metric_units: e.reduce((f, y) => (f[y.name] = y.unit, f), {}),
|
|
3313
3332
|
granularity_ms: 60 * 60 * 1e3,
|
|
3314
3333
|
// 1 hour in ms
|
|
3315
3334
|
display: {}
|
|
@@ -3318,13 +3337,13 @@ const As = (e, t) => {
|
|
|
3318
3337
|
data: o,
|
|
3319
3338
|
meta: d
|
|
3320
3339
|
};
|
|
3321
|
-
},
|
|
3340
|
+
}, js = (e, t) => {
|
|
3322
3341
|
const r = Math.floor(Math.random() * 9991) + 10, n = new Xe(r), i = Date.now() - 6 * 60 * 60 * 1e3, o = Date.now(), c = new Date((i + o) / 2).toISOString(), d = [];
|
|
3323
3342
|
if (t) {
|
|
3324
|
-
const h = Object.keys(t),
|
|
3325
|
-
if (
|
|
3326
|
-
e.forEach((
|
|
3327
|
-
S[
|
|
3343
|
+
const h = Object.keys(t), g = Object.values(t), M = (S, N) => {
|
|
3344
|
+
if (N === h.length) {
|
|
3345
|
+
e.forEach((I) => {
|
|
3346
|
+
S[I.name] = n.next(50, 500);
|
|
3328
3347
|
}), d.push({
|
|
3329
3348
|
version: "1.0",
|
|
3330
3349
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -3332,15 +3351,15 @@ const As = (e, t) => {
|
|
|
3332
3351
|
});
|
|
3333
3352
|
return;
|
|
3334
3353
|
}
|
|
3335
|
-
|
|
3336
|
-
|
|
3354
|
+
g[N].forEach((I) => {
|
|
3355
|
+
M({ ...S, [h[N]]: I }, N + 1);
|
|
3337
3356
|
});
|
|
3338
3357
|
};
|
|
3339
|
-
|
|
3358
|
+
M({}, 0);
|
|
3340
3359
|
} else {
|
|
3341
3360
|
const h = {};
|
|
3342
|
-
e.forEach((
|
|
3343
|
-
h[
|
|
3361
|
+
e.forEach((g) => {
|
|
3362
|
+
h[g.name] = n.next(50, 500);
|
|
3344
3363
|
}), d.push({
|
|
3345
3364
|
version: "1.0",
|
|
3346
3365
|
timestamp: c,
|
|
@@ -3350,18 +3369,18 @@ const As = (e, t) => {
|
|
|
3350
3369
|
const f = {};
|
|
3351
3370
|
if (t)
|
|
3352
3371
|
for (const h in t)
|
|
3353
|
-
f[h] = {}, t[h].forEach((
|
|
3354
|
-
f[h][
|
|
3355
|
-
name:
|
|
3372
|
+
f[h] = {}, t[h].forEach((g) => {
|
|
3373
|
+
f[h][g] = {
|
|
3374
|
+
name: g,
|
|
3356
3375
|
deleted: !1
|
|
3357
3376
|
};
|
|
3358
3377
|
});
|
|
3359
|
-
const
|
|
3378
|
+
const y = {
|
|
3360
3379
|
start_ms: i,
|
|
3361
3380
|
end_ms: o,
|
|
3362
3381
|
query_id: "12345",
|
|
3363
3382
|
metric_names: e.map((h) => h.name),
|
|
3364
|
-
metric_units: e.reduce((h,
|
|
3383
|
+
metric_units: e.reduce((h, g) => (h[g.name] = g.unit, h), {}),
|
|
3365
3384
|
truncated: !1,
|
|
3366
3385
|
limit: 50,
|
|
3367
3386
|
display: f,
|
|
@@ -3369,7 +3388,7 @@ const As = (e, t) => {
|
|
|
3369
3388
|
};
|
|
3370
3389
|
return {
|
|
3371
3390
|
data: d,
|
|
3372
|
-
meta:
|
|
3391
|
+
meta: y
|
|
3373
3392
|
};
|
|
3374
3393
|
};
|
|
3375
3394
|
function br(e, t) {
|
|
@@ -3380,10 +3399,11 @@ export {
|
|
|
3380
3399
|
be as Granularities,
|
|
3381
3400
|
gs as REFRESH_INTERVAL_MS,
|
|
3382
3401
|
Xe as SeededRandom,
|
|
3402
|
+
Ws as TIMEFRAME_LOOKUP,
|
|
3383
3403
|
hs as TimePeriods,
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3404
|
+
P as Timeframe,
|
|
3405
|
+
m as TimeframeKeys,
|
|
3406
|
+
Ys as TimeseriesQueryTime,
|
|
3387
3407
|
is as UnaryQueryTime,
|
|
3388
3408
|
Bn as aiExploreAggregations,
|
|
3389
3409
|
da as aiQuerySchema,
|
|
@@ -3391,33 +3411,33 @@ export {
|
|
|
3391
3411
|
tr as basicExploreAggregations,
|
|
3392
3412
|
la as basicQuerySchema,
|
|
3393
3413
|
_r as ceilToNearestTimeGrain,
|
|
3394
|
-
|
|
3414
|
+
Ns as dashboardConfigSchema,
|
|
3395
3415
|
Es as dashboardTileTypes,
|
|
3396
3416
|
kt as datasourceToFilterableDimensions,
|
|
3397
|
-
|
|
3417
|
+
Hs as datePickerSelectionToTimeframe,
|
|
3398
3418
|
ms as dstOffsetHours,
|
|
3399
3419
|
Zn as exploreAggregations,
|
|
3400
|
-
|
|
3420
|
+
Pt as exploreFilterTypesV2,
|
|
3401
3421
|
ca as exploreV4QuerySchema,
|
|
3402
3422
|
ir as filterableAiExploreDimensions,
|
|
3403
3423
|
er as filterableBasicExploreDimensions,
|
|
3404
3424
|
nr as filterableExploreDimensions,
|
|
3405
3425
|
Ds as filterableRequestDimensions,
|
|
3406
|
-
|
|
3407
|
-
|
|
3426
|
+
Ms as filterableRequestMetrics,
|
|
3427
|
+
Os as filterableRequestWildcardDimensions,
|
|
3408
3428
|
as as floorToNearestTimeGrain,
|
|
3409
|
-
|
|
3429
|
+
Ps as formatISOTimeWithTZ,
|
|
3410
3430
|
Jt as formatTime,
|
|
3411
3431
|
ks as formatTimeRange,
|
|
3412
3432
|
aa as gaugeChartSchema,
|
|
3413
|
-
|
|
3433
|
+
js as generateCrossSectionalData,
|
|
3414
3434
|
qs as generateMultipleMetricTimeSeriesData,
|
|
3415
|
-
|
|
3416
|
-
|
|
3435
|
+
Fs as generateSingleMetricTimeSeriesData,
|
|
3436
|
+
Is as granularitiesToOptions,
|
|
3417
3437
|
ns as granularityMsToQuery,
|
|
3418
3438
|
Kt as granularityValues,
|
|
3419
3439
|
sa as metricCardSchema,
|
|
3420
|
-
|
|
3440
|
+
Cs as msToGranularity,
|
|
3421
3441
|
Ss as queryDatasources,
|
|
3422
3442
|
ar as queryableAiExploreDimensions,
|
|
3423
3443
|
je as queryableBasicExploreDimensions,
|
|
@@ -3439,8 +3459,8 @@ export {
|
|
|
3439
3459
|
ha as tileDefinitionSchema,
|
|
3440
3460
|
ma as tileLayoutSchema,
|
|
3441
3461
|
Ts as timeRangeTypeV2,
|
|
3442
|
-
|
|
3443
|
-
|
|
3462
|
+
Gs as timeframeToDatepickerSelection,
|
|
3463
|
+
As as timeframeToDatepickerTimeperiod,
|
|
3444
3464
|
na as timeseriesChartSchema,
|
|
3445
3465
|
ia as topNTableSchema,
|
|
3446
3466
|
fa as validDashboardQuery
|