@kong-ui-public/analytics-utilities 10.1.6-pr.2346.5bc4acfaa.0 → 10.1.6-pr.2346.d45305afb.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/dashboardSchemaZod.v2.d.ts +58 -0
- package/dist/types/dashboardSchemaZod.v2.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 +272 -272
- package/dist/vitals-utilities.es.js.map +1 -1
- package/dist/vitals-utilities.umd.js +2 -2
- package/dist/vitals-utilities.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var na = Object.defineProperty;
|
|
2
2
|
var ra = (e, t, n) => t in e ? na(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var P = (e, t, n) => ra(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
const
|
|
4
|
+
const Cf = 3e4;
|
|
5
5
|
var w = /* @__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))(w || {});
|
|
6
|
-
const
|
|
6
|
+
const Rf = [
|
|
7
7
|
"horizontal_bar",
|
|
8
8
|
"vertical_bar",
|
|
9
9
|
"timeseries_line",
|
|
@@ -11,7 +11,7 @@ const Cf = [
|
|
|
11
11
|
"timeseries_bar",
|
|
12
12
|
"donut",
|
|
13
13
|
"single_value"
|
|
14
|
-
], zr = ["in", "not_in", "selector"],
|
|
14
|
+
], zr = ["in", "not_in", "selector"], Af = ["=", "!="], jf = ["=", "!=", "<", ">", "<=", ">="], Dr = ["empty", "not_empty"], Ff = ["starts_with", "ends_with"], Uf = ["absolute", "relative"], Or = [
|
|
15
15
|
"15m",
|
|
16
16
|
"1h",
|
|
17
17
|
"6h",
|
|
@@ -169,7 +169,7 @@ const Cf = [
|
|
|
169
169
|
"service_protocol",
|
|
170
170
|
"trace_id",
|
|
171
171
|
"upstream_uri"
|
|
172
|
-
],
|
|
172
|
+
], Yf = aa, sa = [
|
|
173
173
|
"ai_count",
|
|
174
174
|
"latencies_response_ms",
|
|
175
175
|
"latencies_upstream_ms",
|
|
@@ -179,18 +179,18 @@ const Cf = [
|
|
|
179
179
|
"response_header_content_length",
|
|
180
180
|
"status_code",
|
|
181
181
|
"upstream_status_code"
|
|
182
|
-
], ua = Ae(sa),
|
|
182
|
+
], ua = Ae(sa), Lf = [
|
|
183
183
|
"15M",
|
|
184
184
|
"1H",
|
|
185
185
|
"6H",
|
|
186
186
|
"12H",
|
|
187
187
|
"24H",
|
|
188
188
|
"7D"
|
|
189
|
-
],
|
|
189
|
+
], Gf = ["basic", "api_usage", "llm_usage"], ca = {
|
|
190
190
|
basic: new Set(De),
|
|
191
191
|
api_usage: new Set(Oe),
|
|
192
192
|
llm_usage: new Set(Se)
|
|
193
|
-
},
|
|
193
|
+
}, Wf = (e, t) => t.filter((n) => ca[e].has(n.field)), la = [
|
|
194
194
|
"horizontal_bar",
|
|
195
195
|
"vertical_bar",
|
|
196
196
|
"gauge",
|
|
@@ -647,7 +647,7 @@ const Cf = [
|
|
|
647
647
|
},
|
|
648
648
|
required: ["tiles"],
|
|
649
649
|
additionalProperties: !1
|
|
650
|
-
},
|
|
650
|
+
}, Hf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
651
651
|
__proto__: null,
|
|
652
652
|
aiQuerySchema: Ur,
|
|
653
653
|
barChartSchema: xr,
|
|
@@ -2990,7 +2990,7 @@ function hl(e, t = {}) {
|
|
|
2990
2990
|
function ml(e) {
|
|
2991
2991
|
return ac(e);
|
|
2992
2992
|
}
|
|
2993
|
-
const
|
|
2993
|
+
const qf = [
|
|
2994
2994
|
"horizontal_bar",
|
|
2995
2995
|
"vertical_bar",
|
|
2996
2996
|
"gauge",
|
|
@@ -3046,22 +3046,31 @@ const Hf = [
|
|
|
3046
3046
|
type: q("single_value"),
|
|
3047
3047
|
decimal_points: V().optional(),
|
|
3048
3048
|
chart_title: me.optional()
|
|
3049
|
-
}).strict(), kl =
|
|
3049
|
+
}).strict(), kl = le([
|
|
3050
|
+
gl,
|
|
3051
|
+
yl,
|
|
3052
|
+
wl,
|
|
3053
|
+
_l,
|
|
3054
|
+
bl,
|
|
3055
|
+
vl,
|
|
3056
|
+
pl,
|
|
3057
|
+
Tl
|
|
3058
|
+
]), zl = $({
|
|
3050
3059
|
tz: C().optional().default("Etc/UTC"),
|
|
3051
3060
|
type: q("relative"),
|
|
3052
3061
|
time_range: L(Or).optional().default("1h")
|
|
3053
|
-
}).strict(),
|
|
3062
|
+
}).strict(), Dl = $({
|
|
3054
3063
|
tz: C().optional(),
|
|
3055
3064
|
type: q("absolute"),
|
|
3056
3065
|
start: C(),
|
|
3057
3066
|
end: C()
|
|
3058
|
-
}).strict(),
|
|
3067
|
+
}).strict(), Ol = le([zl, Dl]).optional().default({
|
|
3059
3068
|
tz: Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC",
|
|
3060
3069
|
type: "relative",
|
|
3061
3070
|
time_range: "1h"
|
|
3062
3071
|
}), Xt = $({
|
|
3063
3072
|
granularity: L(jt).optional(),
|
|
3064
|
-
time_range:
|
|
3073
|
+
time_range: Ol.optional(),
|
|
3065
3074
|
limit: V().optional(),
|
|
3066
3075
|
meta: $().optional()
|
|
3067
3076
|
}), Qt = (e) => ce(L(e)).optional(), Kt = (e) => ce(L(e)).max(2).optional(), ht = (e) => {
|
|
@@ -3074,34 +3083,25 @@ const Hf = [
|
|
|
3074
3083
|
operator: L(Dr)
|
|
3075
3084
|
}).strict();
|
|
3076
3085
|
return ce(le([t, n])).optional();
|
|
3077
|
-
},
|
|
3086
|
+
}, Sl = Xt.extend({
|
|
3078
3087
|
datasource: q("api_usage"),
|
|
3079
3088
|
metrics: Qt(Sr).optional(),
|
|
3080
3089
|
dimensions: Kt(Ut).optional(),
|
|
3081
3090
|
filters: ht(Oe).optional()
|
|
3082
|
-
}).strict(),
|
|
3091
|
+
}).strict(), El = Xt.extend({
|
|
3083
3092
|
datasource: q("basic"),
|
|
3084
3093
|
metrics: Qt(Ft).optional(),
|
|
3085
3094
|
dimensions: Kt(ct).optional(),
|
|
3086
3095
|
filters: ht(De).optional()
|
|
3087
|
-
}).strict(),
|
|
3096
|
+
}).strict(), Ml = Xt.extend({
|
|
3088
3097
|
datasource: q("llm_usage"),
|
|
3089
3098
|
metrics: Qt(Er).optional(),
|
|
3090
3099
|
dimensions: Kt(Yt).optional(),
|
|
3091
3100
|
filters: ht(Se).optional()
|
|
3092
|
-
}).strict(),
|
|
3093
|
-
query:
|
|
3094
|
-
chart:
|
|
3095
|
-
|
|
3096
|
-
yl,
|
|
3097
|
-
wl,
|
|
3098
|
-
_l,
|
|
3099
|
-
bl,
|
|
3100
|
-
vl,
|
|
3101
|
-
pl,
|
|
3102
|
-
Tl
|
|
3103
|
-
])
|
|
3104
|
-
}).strict(), Zl = $({
|
|
3101
|
+
}).strict(), Il = le([Sl, El, Ml]), Zl = $({
|
|
3102
|
+
query: Il,
|
|
3103
|
+
chart: kl
|
|
3104
|
+
}).strict(), xl = $({
|
|
3105
3105
|
position: $({
|
|
3106
3106
|
col: V(),
|
|
3107
3107
|
row: V()
|
|
@@ -3111,13 +3111,13 @@ const Hf = [
|
|
|
3111
3111
|
rows: V(),
|
|
3112
3112
|
fit_to_content: ue().optional()
|
|
3113
3113
|
}).strict()
|
|
3114
|
-
}).strict(),
|
|
3114
|
+
}).strict(), $l = $({
|
|
3115
3115
|
type: L(["chart"]),
|
|
3116
|
-
definition:
|
|
3117
|
-
layout:
|
|
3116
|
+
definition: Zl,
|
|
3117
|
+
layout: xl,
|
|
3118
3118
|
id: C().optional()
|
|
3119
|
-
}).strict(),
|
|
3120
|
-
tiles: ce(
|
|
3119
|
+
}).strict(), Pl = $({
|
|
3120
|
+
tiles: ce($l),
|
|
3121
3121
|
tile_height: V().optional(),
|
|
3122
3122
|
preset_filters: ht([
|
|
3123
3123
|
...Oe,
|
|
@@ -3125,10 +3125,10 @@ const Hf = [
|
|
|
3125
3125
|
...Se
|
|
3126
3126
|
]),
|
|
3127
3127
|
template_id: C().nullable().optional()
|
|
3128
|
-
}).strict(),
|
|
3128
|
+
}).strict(), Vf = (e) => Pl.parse(e), Bf = (e) => {
|
|
3129
3129
|
const t = [];
|
|
3130
3130
|
return De.includes(e) && t.push("basic"), Oe.includes(e) && t.push("api_usage"), Se.includes(e) && t.push("llm_usage"), (ia.includes(e) || ua.includes(e)) && t.push("requests"), t;
|
|
3131
|
-
}, wo = 6048e5,
|
|
3131
|
+
}, wo = 6048e5, Nl = 864e5, Cl = 60, Rl = 3600, rr = Symbol.for("constructDateFrom");
|
|
3132
3132
|
function H(e, t) {
|
|
3133
3133
|
return typeof e == "function" ? e(t) : e && typeof e == "object" && rr in e ? e[rr](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
3134
3134
|
}
|
|
@@ -3139,7 +3139,7 @@ function or(e, t, n) {
|
|
|
3139
3139
|
const r = R(e, n == null ? void 0 : n.in);
|
|
3140
3140
|
return isNaN(t) ? H(e, NaN) : (r.setDate(r.getDate() + t), r);
|
|
3141
3141
|
}
|
|
3142
|
-
function
|
|
3142
|
+
function Al(e, t, n) {
|
|
3143
3143
|
const r = R(e, n == null ? void 0 : n.in);
|
|
3144
3144
|
if (isNaN(t)) return H(e, NaN);
|
|
3145
3145
|
const o = r.getDate(), i = H(e, r.getTime());
|
|
@@ -3151,9 +3151,9 @@ function Rl(e, t, n) {
|
|
|
3151
3151
|
o
|
|
3152
3152
|
), r);
|
|
3153
3153
|
}
|
|
3154
|
-
let
|
|
3154
|
+
let jl = {};
|
|
3155
3155
|
function Ye() {
|
|
3156
|
-
return
|
|
3156
|
+
return jl;
|
|
3157
3157
|
}
|
|
3158
3158
|
function K(e, t) {
|
|
3159
3159
|
var c, l, h, y;
|
|
@@ -3185,7 +3185,7 @@ function ir(e) {
|
|
|
3185
3185
|
);
|
|
3186
3186
|
return n.setUTCFullYear(t.getFullYear()), +e - +n;
|
|
3187
3187
|
}
|
|
3188
|
-
function
|
|
3188
|
+
function Fl(e, ...t) {
|
|
3189
3189
|
const n = H.bind(
|
|
3190
3190
|
null,
|
|
3191
3191
|
t.find((r) => typeof r == "object")
|
|
@@ -3196,33 +3196,33 @@ function ot(e, t) {
|
|
|
3196
3196
|
const n = R(e, t == null ? void 0 : t.in);
|
|
3197
3197
|
return n.setHours(0, 0, 0, 0), n;
|
|
3198
3198
|
}
|
|
3199
|
-
function
|
|
3200
|
-
const [r, o] =
|
|
3199
|
+
function Ul(e, t, n) {
|
|
3200
|
+
const [r, o] = Fl(
|
|
3201
3201
|
n == null ? void 0 : n.in,
|
|
3202
3202
|
e,
|
|
3203
3203
|
t
|
|
3204
3204
|
), i = ot(r), s = ot(o), c = +i - ir(i), l = +s - ir(s);
|
|
3205
|
-
return Math.round((c - l) /
|
|
3205
|
+
return Math.round((c - l) / Nl);
|
|
3206
3206
|
}
|
|
3207
|
-
function
|
|
3207
|
+
function Yl(e, t) {
|
|
3208
3208
|
const n = vo(e, t), r = H(e, 0);
|
|
3209
3209
|
return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), rt(r);
|
|
3210
3210
|
}
|
|
3211
|
-
function
|
|
3211
|
+
function Ll(e) {
|
|
3212
3212
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
3213
3213
|
}
|
|
3214
|
-
function
|
|
3215
|
-
return !(!
|
|
3214
|
+
function Gl(e) {
|
|
3215
|
+
return !(!Ll(e) && typeof e != "number" || isNaN(+R(e)));
|
|
3216
3216
|
}
|
|
3217
3217
|
function Te(e, t) {
|
|
3218
3218
|
const n = R(e, t == null ? void 0 : t.in);
|
|
3219
3219
|
return n.setDate(1), n.setHours(0, 0, 0, 0), n;
|
|
3220
3220
|
}
|
|
3221
|
-
function
|
|
3221
|
+
function Wl(e, t) {
|
|
3222
3222
|
const n = R(e, t == null ? void 0 : t.in);
|
|
3223
3223
|
return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
3224
3224
|
}
|
|
3225
|
-
const
|
|
3225
|
+
const Hl = {
|
|
3226
3226
|
lessThanXSeconds: {
|
|
3227
3227
|
one: "less than a second",
|
|
3228
3228
|
other: "less than {{count}} seconds"
|
|
@@ -3284,9 +3284,9 @@ const Wl = {
|
|
|
3284
3284
|
one: "almost 1 year",
|
|
3285
3285
|
other: "almost {{count}} years"
|
|
3286
3286
|
}
|
|
3287
|
-
},
|
|
3287
|
+
}, ql = (e, t, n) => {
|
|
3288
3288
|
let r;
|
|
3289
|
-
const o =
|
|
3289
|
+
const o = Hl[e];
|
|
3290
3290
|
return typeof o == "string" ? r = o : t === 1 ? r = o.one : r = o.other.replace("{{count}}", t.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
3291
3291
|
};
|
|
3292
3292
|
function Et(e) {
|
|
@@ -3295,42 +3295,42 @@ function Et(e) {
|
|
|
3295
3295
|
return e.formats[n] || e.formats[e.defaultWidth];
|
|
3296
3296
|
};
|
|
3297
3297
|
}
|
|
3298
|
-
const
|
|
3298
|
+
const Vl = {
|
|
3299
3299
|
full: "EEEE, MMMM do, y",
|
|
3300
3300
|
long: "MMMM do, y",
|
|
3301
3301
|
medium: "MMM d, y",
|
|
3302
3302
|
short: "MM/dd/yyyy"
|
|
3303
|
-
},
|
|
3303
|
+
}, Bl = {
|
|
3304
3304
|
full: "h:mm:ss a zzzz",
|
|
3305
3305
|
long: "h:mm:ss a z",
|
|
3306
3306
|
medium: "h:mm:ss a",
|
|
3307
3307
|
short: "h:mm a"
|
|
3308
|
-
},
|
|
3308
|
+
}, Xl = {
|
|
3309
3309
|
full: "{{date}} 'at' {{time}}",
|
|
3310
3310
|
long: "{{date}} 'at' {{time}}",
|
|
3311
3311
|
medium: "{{date}}, {{time}}",
|
|
3312
3312
|
short: "{{date}}, {{time}}"
|
|
3313
|
-
},
|
|
3313
|
+
}, Ql = {
|
|
3314
3314
|
date: Et({
|
|
3315
|
-
formats:
|
|
3315
|
+
formats: Vl,
|
|
3316
3316
|
defaultWidth: "full"
|
|
3317
3317
|
}),
|
|
3318
3318
|
time: Et({
|
|
3319
|
-
formats:
|
|
3319
|
+
formats: Bl,
|
|
3320
3320
|
defaultWidth: "full"
|
|
3321
3321
|
}),
|
|
3322
3322
|
dateTime: Et({
|
|
3323
|
-
formats:
|
|
3323
|
+
formats: Xl,
|
|
3324
3324
|
defaultWidth: "full"
|
|
3325
3325
|
})
|
|
3326
|
-
},
|
|
3326
|
+
}, Kl = {
|
|
3327
3327
|
lastWeek: "'last' eeee 'at' p",
|
|
3328
3328
|
yesterday: "'yesterday at' p",
|
|
3329
3329
|
today: "'today at' p",
|
|
3330
3330
|
tomorrow: "'tomorrow at' p",
|
|
3331
3331
|
nextWeek: "eeee 'at' p",
|
|
3332
3332
|
other: "P"
|
|
3333
|
-
},
|
|
3333
|
+
}, Jl = (e, t, n, r) => Kl[e];
|
|
3334
3334
|
function xe(e) {
|
|
3335
3335
|
return (t, n) => {
|
|
3336
3336
|
const r = n != null && n.context ? String(n.context) : "standalone";
|
|
@@ -3346,15 +3346,15 @@ function xe(e) {
|
|
|
3346
3346
|
return o[i];
|
|
3347
3347
|
};
|
|
3348
3348
|
}
|
|
3349
|
-
const
|
|
3349
|
+
const ed = {
|
|
3350
3350
|
narrow: ["B", "A"],
|
|
3351
3351
|
abbreviated: ["BC", "AD"],
|
|
3352
3352
|
wide: ["Before Christ", "Anno Domini"]
|
|
3353
|
-
},
|
|
3353
|
+
}, td = {
|
|
3354
3354
|
narrow: ["1", "2", "3", "4"],
|
|
3355
3355
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
3356
3356
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
3357
|
-
},
|
|
3357
|
+
}, nd = {
|
|
3358
3358
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
3359
3359
|
abbreviated: [
|
|
3360
3360
|
"Jan",
|
|
@@ -3384,7 +3384,7 @@ const Jl = {
|
|
|
3384
3384
|
"November",
|
|
3385
3385
|
"December"
|
|
3386
3386
|
]
|
|
3387
|
-
},
|
|
3387
|
+
}, rd = {
|
|
3388
3388
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
3389
3389
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
3390
3390
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -3397,7 +3397,7 @@ const Jl = {
|
|
|
3397
3397
|
"Friday",
|
|
3398
3398
|
"Saturday"
|
|
3399
3399
|
]
|
|
3400
|
-
},
|
|
3400
|
+
}, od = {
|
|
3401
3401
|
narrow: {
|
|
3402
3402
|
am: "a",
|
|
3403
3403
|
pm: "p",
|
|
@@ -3428,7 +3428,7 @@ const Jl = {
|
|
|
3428
3428
|
evening: "evening",
|
|
3429
3429
|
night: "night"
|
|
3430
3430
|
}
|
|
3431
|
-
},
|
|
3431
|
+
}, id = {
|
|
3432
3432
|
narrow: {
|
|
3433
3433
|
am: "a",
|
|
3434
3434
|
pm: "p",
|
|
@@ -3459,7 +3459,7 @@ const Jl = {
|
|
|
3459
3459
|
evening: "in the evening",
|
|
3460
3460
|
night: "at night"
|
|
3461
3461
|
}
|
|
3462
|
-
},
|
|
3462
|
+
}, ad = (e, t) => {
|
|
3463
3463
|
const n = Number(e), r = n % 100;
|
|
3464
3464
|
if (r > 20 || r < 10)
|
|
3465
3465
|
switch (r % 10) {
|
|
@@ -3471,29 +3471,29 @@ const Jl = {
|
|
|
3471
3471
|
return n + "rd";
|
|
3472
3472
|
}
|
|
3473
3473
|
return n + "th";
|
|
3474
|
-
},
|
|
3475
|
-
ordinalNumber:
|
|
3474
|
+
}, sd = {
|
|
3475
|
+
ordinalNumber: ad,
|
|
3476
3476
|
era: xe({
|
|
3477
|
-
values:
|
|
3477
|
+
values: ed,
|
|
3478
3478
|
defaultWidth: "wide"
|
|
3479
3479
|
}),
|
|
3480
3480
|
quarter: xe({
|
|
3481
|
-
values:
|
|
3481
|
+
values: td,
|
|
3482
3482
|
defaultWidth: "wide",
|
|
3483
3483
|
argumentCallback: (e) => e - 1
|
|
3484
3484
|
}),
|
|
3485
3485
|
month: xe({
|
|
3486
|
-
values:
|
|
3486
|
+
values: nd,
|
|
3487
3487
|
defaultWidth: "wide"
|
|
3488
3488
|
}),
|
|
3489
3489
|
day: xe({
|
|
3490
|
-
values:
|
|
3490
|
+
values: rd,
|
|
3491
3491
|
defaultWidth: "wide"
|
|
3492
3492
|
}),
|
|
3493
3493
|
dayPeriod: xe({
|
|
3494
|
-
values:
|
|
3494
|
+
values: od,
|
|
3495
3495
|
defaultWidth: "wide",
|
|
3496
|
-
formattingValues:
|
|
3496
|
+
formattingValues: id,
|
|
3497
3497
|
defaultFormattingWidth: "wide"
|
|
3498
3498
|
})
|
|
3499
3499
|
};
|
|
@@ -3502,9 +3502,9 @@ function $e(e) {
|
|
|
3502
3502
|
const r = n.width, o = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], i = t.match(o);
|
|
3503
3503
|
if (!i)
|
|
3504
3504
|
return null;
|
|
3505
|
-
const s = i[0], c = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], l = Array.isArray(c) ?
|
|
3505
|
+
const s = i[0], c = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], l = Array.isArray(c) ? cd(c, (m) => m.test(s)) : (
|
|
3506
3506
|
// [TODO] -- I challenge you to fix the type
|
|
3507
|
-
|
|
3507
|
+
ud(c, (m) => m.test(s))
|
|
3508
3508
|
);
|
|
3509
3509
|
let h;
|
|
3510
3510
|
h = e.valueCallback ? e.valueCallback(l) : l, h = n.valueCallback ? (
|
|
@@ -3515,17 +3515,17 @@ function $e(e) {
|
|
|
3515
3515
|
return { value: h, rest: y };
|
|
3516
3516
|
};
|
|
3517
3517
|
}
|
|
3518
|
-
function
|
|
3518
|
+
function ud(e, t) {
|
|
3519
3519
|
for (const n in e)
|
|
3520
3520
|
if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
|
|
3521
3521
|
return n;
|
|
3522
3522
|
}
|
|
3523
|
-
function
|
|
3523
|
+
function cd(e, t) {
|
|
3524
3524
|
for (let n = 0; n < e.length; n++)
|
|
3525
3525
|
if (t(e[n]))
|
|
3526
3526
|
return n;
|
|
3527
3527
|
}
|
|
3528
|
-
function
|
|
3528
|
+
function ld(e) {
|
|
3529
3529
|
return (t, n = {}) => {
|
|
3530
3530
|
const r = t.match(e.matchPattern);
|
|
3531
3531
|
if (!r) return null;
|
|
@@ -3537,23 +3537,23 @@ function cd(e) {
|
|
|
3537
3537
|
return { value: s, rest: c };
|
|
3538
3538
|
};
|
|
3539
3539
|
}
|
|
3540
|
-
const
|
|
3540
|
+
const dd = /^(\d+)(th|st|nd|rd)?/i, fd = /\d+/i, hd = {
|
|
3541
3541
|
narrow: /^(b|a)/i,
|
|
3542
3542
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
3543
3543
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
3544
|
-
}, hd = {
|
|
3545
|
-
any: [/^b/i, /^(a|c)/i]
|
|
3546
3544
|
}, md = {
|
|
3545
|
+
any: [/^b/i, /^(a|c)/i]
|
|
3546
|
+
}, pd = {
|
|
3547
3547
|
narrow: /^[1234]/i,
|
|
3548
3548
|
abbreviated: /^q[1234]/i,
|
|
3549
3549
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
3550
|
-
}, pd = {
|
|
3551
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
3552
3550
|
}, gd = {
|
|
3551
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
3552
|
+
}, _d = {
|
|
3553
3553
|
narrow: /^[jfmasond]/i,
|
|
3554
3554
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
3555
3555
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
3556
|
-
},
|
|
3556
|
+
}, yd = {
|
|
3557
3557
|
narrow: [
|
|
3558
3558
|
/^j/i,
|
|
3559
3559
|
/^f/i,
|
|
@@ -3582,18 +3582,18 @@ const ld = /^(\d+)(th|st|nd|rd)?/i, dd = /\d+/i, fd = {
|
|
|
3582
3582
|
/^n/i,
|
|
3583
3583
|
/^d/i
|
|
3584
3584
|
]
|
|
3585
|
-
},
|
|
3585
|
+
}, wd = {
|
|
3586
3586
|
narrow: /^[smtwf]/i,
|
|
3587
3587
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
3588
3588
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
3589
3589
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
3590
|
-
},
|
|
3590
|
+
}, vd = {
|
|
3591
3591
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
3592
3592
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
3593
|
-
},
|
|
3593
|
+
}, bd = {
|
|
3594
3594
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
3595
3595
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
3596
|
-
},
|
|
3596
|
+
}, Td = {
|
|
3597
3597
|
any: {
|
|
3598
3598
|
am: /^a/i,
|
|
3599
3599
|
pm: /^p/i,
|
|
@@ -3604,61 +3604,61 @@ const ld = /^(\d+)(th|st|nd|rd)?/i, dd = /\d+/i, fd = {
|
|
|
3604
3604
|
evening: /evening/i,
|
|
3605
3605
|
night: /night/i
|
|
3606
3606
|
}
|
|
3607
|
-
},
|
|
3608
|
-
ordinalNumber:
|
|
3609
|
-
matchPattern:
|
|
3610
|
-
parsePattern:
|
|
3607
|
+
}, kd = {
|
|
3608
|
+
ordinalNumber: ld({
|
|
3609
|
+
matchPattern: dd,
|
|
3610
|
+
parsePattern: fd,
|
|
3611
3611
|
valueCallback: (e) => parseInt(e, 10)
|
|
3612
3612
|
}),
|
|
3613
3613
|
era: $e({
|
|
3614
|
-
matchPatterns:
|
|
3614
|
+
matchPatterns: hd,
|
|
3615
3615
|
defaultMatchWidth: "wide",
|
|
3616
|
-
parsePatterns:
|
|
3616
|
+
parsePatterns: md,
|
|
3617
3617
|
defaultParseWidth: "any"
|
|
3618
3618
|
}),
|
|
3619
3619
|
quarter: $e({
|
|
3620
|
-
matchPatterns:
|
|
3620
|
+
matchPatterns: pd,
|
|
3621
3621
|
defaultMatchWidth: "wide",
|
|
3622
|
-
parsePatterns:
|
|
3622
|
+
parsePatterns: gd,
|
|
3623
3623
|
defaultParseWidth: "any",
|
|
3624
3624
|
valueCallback: (e) => e + 1
|
|
3625
3625
|
}),
|
|
3626
3626
|
month: $e({
|
|
3627
|
-
matchPatterns:
|
|
3627
|
+
matchPatterns: _d,
|
|
3628
3628
|
defaultMatchWidth: "wide",
|
|
3629
|
-
parsePatterns:
|
|
3629
|
+
parsePatterns: yd,
|
|
3630
3630
|
defaultParseWidth: "any"
|
|
3631
3631
|
}),
|
|
3632
3632
|
day: $e({
|
|
3633
|
-
matchPatterns:
|
|
3633
|
+
matchPatterns: wd,
|
|
3634
3634
|
defaultMatchWidth: "wide",
|
|
3635
|
-
parsePatterns:
|
|
3635
|
+
parsePatterns: vd,
|
|
3636
3636
|
defaultParseWidth: "any"
|
|
3637
3637
|
}),
|
|
3638
3638
|
dayPeriod: $e({
|
|
3639
|
-
matchPatterns:
|
|
3639
|
+
matchPatterns: bd,
|
|
3640
3640
|
defaultMatchWidth: "any",
|
|
3641
|
-
parsePatterns:
|
|
3641
|
+
parsePatterns: Td,
|
|
3642
3642
|
defaultParseWidth: "any"
|
|
3643
3643
|
})
|
|
3644
|
-
},
|
|
3644
|
+
}, zd = {
|
|
3645
3645
|
code: "en-US",
|
|
3646
|
-
formatDistance:
|
|
3647
|
-
formatLong:
|
|
3648
|
-
formatRelative:
|
|
3649
|
-
localize:
|
|
3650
|
-
match:
|
|
3646
|
+
formatDistance: ql,
|
|
3647
|
+
formatLong: Ql,
|
|
3648
|
+
formatRelative: Jl,
|
|
3649
|
+
localize: sd,
|
|
3650
|
+
match: kd,
|
|
3651
3651
|
options: {
|
|
3652
3652
|
weekStartsOn: 0,
|
|
3653
3653
|
firstWeekContainsDate: 1
|
|
3654
3654
|
}
|
|
3655
3655
|
};
|
|
3656
|
-
function
|
|
3656
|
+
function Dd(e, t) {
|
|
3657
3657
|
const n = R(e, t == null ? void 0 : t.in);
|
|
3658
|
-
return
|
|
3658
|
+
return Ul(n, Wl(n)) + 1;
|
|
3659
3659
|
}
|
|
3660
|
-
function
|
|
3661
|
-
const n = R(e, t == null ? void 0 : t.in), r = +rt(n) - +
|
|
3660
|
+
function Od(e, t) {
|
|
3661
|
+
const n = R(e, t == null ? void 0 : t.in), r = +rt(n) - +Yl(n);
|
|
3662
3662
|
return Math.round(r / wo) + 1;
|
|
3663
3663
|
}
|
|
3664
3664
|
function bo(e, t) {
|
|
@@ -3670,13 +3670,13 @@ function bo(e, t) {
|
|
|
3670
3670
|
const h = K(l, t);
|
|
3671
3671
|
return +n >= +c ? r + 1 : +n >= +h ? r : r - 1;
|
|
3672
3672
|
}
|
|
3673
|
-
function
|
|
3673
|
+
function Sd(e, t) {
|
|
3674
3674
|
var c, l, h, y;
|
|
3675
3675
|
const n = Ye(), r = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((l = (c = t == null ? void 0 : t.locale) == null ? void 0 : c.options) == null ? void 0 : l.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((y = (h = n.locale) == null ? void 0 : h.options) == null ? void 0 : y.firstWeekContainsDate) ?? 1, o = bo(e, t), i = H((t == null ? void 0 : t.in) || e, 0);
|
|
3676
3676
|
return i.setFullYear(o, 0, r), i.setHours(0, 0, 0, 0), K(i, t);
|
|
3677
3677
|
}
|
|
3678
|
-
function
|
|
3679
|
-
const n = R(e, t == null ? void 0 : t.in), r = +K(n, t) - +
|
|
3678
|
+
function Ed(e, t) {
|
|
3679
|
+
const n = R(e, t == null ? void 0 : t.in), r = +K(n, t) - +Sd(n, t);
|
|
3680
3680
|
return Math.round(r / wo) + 1;
|
|
3681
3681
|
}
|
|
3682
3682
|
function T(e, t) {
|
|
@@ -3902,12 +3902,12 @@ const te = {
|
|
|
3902
3902
|
},
|
|
3903
3903
|
// Local week of year
|
|
3904
3904
|
w: function(e, t, n, r) {
|
|
3905
|
-
const o =
|
|
3905
|
+
const o = Ed(e, r);
|
|
3906
3906
|
return t === "wo" ? n.ordinalNumber(o, { unit: "week" }) : T(o, t.length);
|
|
3907
3907
|
},
|
|
3908
3908
|
// ISO week of year
|
|
3909
3909
|
I: function(e, t, n) {
|
|
3910
|
-
const r =
|
|
3910
|
+
const r = Od(e);
|
|
3911
3911
|
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : T(r, t.length);
|
|
3912
3912
|
},
|
|
3913
3913
|
// Day of the month
|
|
@@ -3916,7 +3916,7 @@ const te = {
|
|
|
3916
3916
|
},
|
|
3917
3917
|
// Day of year
|
|
3918
3918
|
D: function(e, t, n) {
|
|
3919
|
-
const r =
|
|
3919
|
+
const r = Dd(e);
|
|
3920
3920
|
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : T(r, t.length);
|
|
3921
3921
|
},
|
|
3922
3922
|
// Day of week
|
|
@@ -4266,7 +4266,7 @@ const cr = (e, t) => {
|
|
|
4266
4266
|
default:
|
|
4267
4267
|
return t.time({ width: "full" });
|
|
4268
4268
|
}
|
|
4269
|
-
},
|
|
4269
|
+
}, Md = (e, t) => {
|
|
4270
4270
|
const n = e.match(/(P+)(p+)?/) || [], r = n[1], o = n[2];
|
|
4271
4271
|
if (!o)
|
|
4272
4272
|
return cr(e, t);
|
|
@@ -4287,46 +4287,46 @@ const cr = (e, t) => {
|
|
|
4287
4287
|
break;
|
|
4288
4288
|
}
|
|
4289
4289
|
return i.replace("{{date}}", cr(r, t)).replace("{{time}}", To(o, t));
|
|
4290
|
-
},
|
|
4290
|
+
}, Id = {
|
|
4291
4291
|
p: To,
|
|
4292
|
-
P:
|
|
4293
|
-
},
|
|
4294
|
-
function $d(e) {
|
|
4295
|
-
return Id.test(e);
|
|
4296
|
-
}
|
|
4292
|
+
P: Md
|
|
4293
|
+
}, Zd = /^D+$/, xd = /^Y+$/, $d = ["D", "DD", "YY", "YYYY"];
|
|
4297
4294
|
function Pd(e) {
|
|
4298
4295
|
return Zd.test(e);
|
|
4299
4296
|
}
|
|
4300
|
-
function Nd(e
|
|
4301
|
-
|
|
4302
|
-
if (console.warn(r), xd.includes(e)) throw new RangeError(r);
|
|
4297
|
+
function Nd(e) {
|
|
4298
|
+
return xd.test(e);
|
|
4303
4299
|
}
|
|
4304
4300
|
function Cd(e, t, n) {
|
|
4301
|
+
const r = Rd(e, t, n);
|
|
4302
|
+
if (console.warn(r), $d.includes(e)) throw new RangeError(r);
|
|
4303
|
+
}
|
|
4304
|
+
function Rd(e, t, n) {
|
|
4305
4305
|
const r = e[0] === "Y" ? "years" : "days of the month";
|
|
4306
4306
|
return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
4307
4307
|
}
|
|
4308
|
-
const
|
|
4308
|
+
const Ad = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, jd = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Fd = /^'([^]*?)'?$/, Ud = /''/g, Yd = /[a-zA-Z]/;
|
|
4309
4309
|
function ko(e, t, n) {
|
|
4310
4310
|
var y, m, p, v, z, x, Y, G;
|
|
4311
|
-
const r = Ye(), o = (n == null ? void 0 : n.locale) ?? r.locale ??
|
|
4312
|
-
if (!
|
|
4311
|
+
const r = Ye(), o = (n == null ? void 0 : n.locale) ?? r.locale ?? zd, i = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((m = (y = n == null ? void 0 : n.locale) == null ? void 0 : y.options) == null ? void 0 : m.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((v = (p = r.locale) == null ? void 0 : p.options) == null ? void 0 : v.firstWeekContainsDate) ?? 1, s = (n == null ? void 0 : n.weekStartsOn) ?? ((x = (z = n == null ? void 0 : n.locale) == null ? void 0 : z.options) == null ? void 0 : x.weekStartsOn) ?? r.weekStartsOn ?? ((G = (Y = r.locale) == null ? void 0 : Y.options) == null ? void 0 : G.weekStartsOn) ?? 0, c = R(e, n == null ? void 0 : n.in);
|
|
4312
|
+
if (!Gl(c))
|
|
4313
4313
|
throw new RangeError("Invalid time value");
|
|
4314
|
-
let l = t.match(
|
|
4314
|
+
let l = t.match(jd).map((k) => {
|
|
4315
4315
|
const b = k[0];
|
|
4316
4316
|
if (b === "p" || b === "P") {
|
|
4317
|
-
const Z =
|
|
4317
|
+
const Z = Id[b];
|
|
4318
4318
|
return Z(k, o.formatLong);
|
|
4319
4319
|
}
|
|
4320
4320
|
return k;
|
|
4321
|
-
}).join("").match(
|
|
4321
|
+
}).join("").match(Ad).map((k) => {
|
|
4322
4322
|
if (k === "''")
|
|
4323
4323
|
return { isToken: !1, value: "'" };
|
|
4324
4324
|
const b = k[0];
|
|
4325
4325
|
if (b === "'")
|
|
4326
|
-
return { isToken: !1, value:
|
|
4326
|
+
return { isToken: !1, value: Ld(k) };
|
|
4327
4327
|
if (ar[b])
|
|
4328
4328
|
return { isToken: !0, value: k };
|
|
4329
|
-
if (b.match(
|
|
4329
|
+
if (b.match(Yd))
|
|
4330
4330
|
throw new RangeError(
|
|
4331
4331
|
"Format string contains an unescaped latin alphabet character `" + b + "`"
|
|
4332
4332
|
);
|
|
@@ -4341,20 +4341,20 @@ function ko(e, t, n) {
|
|
|
4341
4341
|
return l.map((k) => {
|
|
4342
4342
|
if (!k.isToken) return k.value;
|
|
4343
4343
|
const b = k.value;
|
|
4344
|
-
(!(n != null && n.useAdditionalWeekYearTokens) &&
|
|
4344
|
+
(!(n != null && n.useAdditionalWeekYearTokens) && Nd(b) || !(n != null && n.useAdditionalDayOfYearTokens) && Pd(b)) && Cd(b, t, String(e));
|
|
4345
4345
|
const Z = ar[b[0]];
|
|
4346
4346
|
return Z(c, b, o.localize, h);
|
|
4347
4347
|
}).join("");
|
|
4348
4348
|
}
|
|
4349
|
-
function
|
|
4350
|
-
const t = e.match(
|
|
4351
|
-
return t ? t[1].replace(
|
|
4349
|
+
function Ld(e) {
|
|
4350
|
+
const t = e.match(Fd);
|
|
4351
|
+
return t ? t[1].replace(Ud, "'") : e;
|
|
4352
4352
|
}
|
|
4353
|
-
function
|
|
4353
|
+
function Gd(e, t) {
|
|
4354
4354
|
const n = R(e, t == null ? void 0 : t.in), r = n.getFullYear(), o = n.getMonth(), i = H(n, 0);
|
|
4355
4355
|
return i.setFullYear(r, o + 1, 0), i.setHours(0, 0, 0, 0), i.getDate();
|
|
4356
4356
|
}
|
|
4357
|
-
function
|
|
4357
|
+
function Wd() {
|
|
4358
4358
|
return Object.assign({}, Ye());
|
|
4359
4359
|
}
|
|
4360
4360
|
function lr(e) {
|
|
@@ -4363,41 +4363,41 @@ function lr(e) {
|
|
|
4363
4363
|
function dr(e) {
|
|
4364
4364
|
return Math.trunc(+R(e) / 1e3);
|
|
4365
4365
|
}
|
|
4366
|
-
function Wd(e) {
|
|
4367
|
-
return Math.trunc(e * Cl);
|
|
4368
|
-
}
|
|
4369
4366
|
function Hd(e) {
|
|
4370
|
-
|
|
4367
|
+
return Math.trunc(e * Rl);
|
|
4368
|
+
}
|
|
4369
|
+
function qd(e) {
|
|
4370
|
+
const t = e / Cl;
|
|
4371
4371
|
return Math.trunc(t);
|
|
4372
4372
|
}
|
|
4373
4373
|
function zo(e, t, n) {
|
|
4374
|
-
return
|
|
4374
|
+
return Al(e, -1, n);
|
|
4375
4375
|
}
|
|
4376
4376
|
function fr(e, t, n) {
|
|
4377
|
-
const r =
|
|
4378
|
-
return "formatToParts" in o ?
|
|
4377
|
+
const r = Wd(), o = Xd(e, n.timeZone, n.locale ?? r.locale);
|
|
4378
|
+
return "formatToParts" in o ? Vd(o, t) : Bd(o, t);
|
|
4379
4379
|
}
|
|
4380
|
-
function
|
|
4380
|
+
function Vd(e, t) {
|
|
4381
4381
|
const n = e.formatToParts(t);
|
|
4382
4382
|
for (let r = n.length - 1; r >= 0; --r)
|
|
4383
4383
|
if (n[r].type === "timeZoneName")
|
|
4384
4384
|
return n[r].value;
|
|
4385
4385
|
}
|
|
4386
|
-
function
|
|
4386
|
+
function Bd(e, t) {
|
|
4387
4387
|
const n = e.format(t).replace(/\u200E/g, ""), r = / [\w-+ ]+$/.exec(n);
|
|
4388
4388
|
return r ? r[0].substr(1) : "";
|
|
4389
4389
|
}
|
|
4390
|
-
function
|
|
4390
|
+
function Xd(e, t, n) {
|
|
4391
4391
|
return new Intl.DateTimeFormat(n ? [n.code, "en-US"] : void 0, {
|
|
4392
4392
|
timeZone: t,
|
|
4393
4393
|
timeZoneName: e
|
|
4394
4394
|
});
|
|
4395
4395
|
}
|
|
4396
|
-
function
|
|
4397
|
-
const n =
|
|
4398
|
-
return "formatToParts" in n ?
|
|
4396
|
+
function Qd(e, t) {
|
|
4397
|
+
const n = nf(t);
|
|
4398
|
+
return "formatToParts" in n ? Jd(n, e) : ef(n, e);
|
|
4399
4399
|
}
|
|
4400
|
-
const
|
|
4400
|
+
const Kd = {
|
|
4401
4401
|
year: 0,
|
|
4402
4402
|
month: 1,
|
|
4403
4403
|
day: 2,
|
|
@@ -4405,11 +4405,11 @@ const Qd = {
|
|
|
4405
4405
|
minute: 4,
|
|
4406
4406
|
second: 5
|
|
4407
4407
|
};
|
|
4408
|
-
function
|
|
4408
|
+
function Jd(e, t) {
|
|
4409
4409
|
try {
|
|
4410
4410
|
const n = e.formatToParts(t), r = [];
|
|
4411
4411
|
for (let o = 0; o < n.length; o++) {
|
|
4412
|
-
const i =
|
|
4412
|
+
const i = Kd[n[o].type];
|
|
4413
4413
|
i !== void 0 && (r[i] = parseInt(n[o].value, 10));
|
|
4414
4414
|
}
|
|
4415
4415
|
return r;
|
|
@@ -4419,7 +4419,7 @@ function Kd(e, t) {
|
|
|
4419
4419
|
throw n;
|
|
4420
4420
|
}
|
|
4421
4421
|
}
|
|
4422
|
-
function
|
|
4422
|
+
function ef(e, t) {
|
|
4423
4423
|
const n = e.format(t), r = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);
|
|
4424
4424
|
return [
|
|
4425
4425
|
parseInt(r[3], 10),
|
|
@@ -4439,9 +4439,9 @@ const Mt = {}, hr = new Intl.DateTimeFormat("en-US", {
|
|
|
4439
4439
|
hour: "2-digit",
|
|
4440
4440
|
minute: "2-digit",
|
|
4441
4441
|
second: "2-digit"
|
|
4442
|
-
}).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")),
|
|
4443
|
-
function
|
|
4444
|
-
return Mt[e] || (Mt[e] =
|
|
4442
|
+
}).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), tf = hr === "06/25/2014, 00:00:00" || hr === "06/25/2014 00:00:00";
|
|
4443
|
+
function nf(e) {
|
|
4444
|
+
return Mt[e] || (Mt[e] = tf ? new Intl.DateTimeFormat("en-US", {
|
|
4445
4445
|
hourCycle: "h23",
|
|
4446
4446
|
timeZone: e,
|
|
4447
4447
|
year: "numeric",
|
|
@@ -4465,7 +4465,7 @@ function Jt(e, t, n, r, o, i, s) {
|
|
|
4465
4465
|
const c = /* @__PURE__ */ new Date(0);
|
|
4466
4466
|
return c.setUTCFullYear(e, t, n), c.setUTCHours(r, o, i, s), c;
|
|
4467
4467
|
}
|
|
4468
|
-
const mr = 36e5,
|
|
4468
|
+
const mr = 36e5, rf = 6e4, It = {
|
|
4469
4469
|
timezoneZ: /^(Z)$/,
|
|
4470
4470
|
timezoneHH: /^([+-]\d{2})$/,
|
|
4471
4471
|
timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/
|
|
@@ -4482,25 +4482,25 @@ function Le(e, t, n) {
|
|
|
4482
4482
|
if (r = It.timezoneHHMM.exec(e), r) {
|
|
4483
4483
|
o = parseInt(r[2], 10);
|
|
4484
4484
|
const s = parseInt(r[3], 10);
|
|
4485
|
-
return pr(o, s) ? (i = Math.abs(o) * mr + s *
|
|
4485
|
+
return pr(o, s) ? (i = Math.abs(o) * mr + s * rf, r[1] === "+" ? -i : i) : NaN;
|
|
4486
4486
|
}
|
|
4487
|
-
if (
|
|
4487
|
+
if (sf(e)) {
|
|
4488
4488
|
t = new Date(t || Date.now());
|
|
4489
|
-
const s = n ? t :
|
|
4490
|
-
return -(n ? c :
|
|
4489
|
+
const s = n ? t : of(t), c = At(s, e);
|
|
4490
|
+
return -(n ? c : af(t, c, e));
|
|
4491
4491
|
}
|
|
4492
4492
|
return NaN;
|
|
4493
4493
|
}
|
|
4494
|
-
function
|
|
4494
|
+
function of(e) {
|
|
4495
4495
|
return Jt(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds());
|
|
4496
4496
|
}
|
|
4497
4497
|
function At(e, t) {
|
|
4498
|
-
const n =
|
|
4498
|
+
const n = Qd(e, t), r = Jt(n[0], n[1] - 1, n[2], n[3] % 24, n[4], n[5], 0).getTime();
|
|
4499
4499
|
let o = e.getTime();
|
|
4500
4500
|
const i = o % 1e3;
|
|
4501
4501
|
return o -= i >= 0 ? i : 1e3 + i, r - o;
|
|
4502
4502
|
}
|
|
4503
|
-
function
|
|
4503
|
+
function af(e, t, n) {
|
|
4504
4504
|
let o = e.getTime() - t;
|
|
4505
4505
|
const i = At(new Date(o), n);
|
|
4506
4506
|
if (t === i)
|
|
@@ -4513,7 +4513,7 @@ function pr(e, t) {
|
|
|
4513
4513
|
return -23 <= e && e <= 23 && (t == null || 0 <= t && t <= 59);
|
|
4514
4514
|
}
|
|
4515
4515
|
const gr = {};
|
|
4516
|
-
function
|
|
4516
|
+
function sf(e) {
|
|
4517
4517
|
if (gr[e])
|
|
4518
4518
|
return !0;
|
|
4519
4519
|
try {
|
|
@@ -4522,7 +4522,7 @@ function af(e) {
|
|
|
4522
4522
|
return !1;
|
|
4523
4523
|
}
|
|
4524
4524
|
}
|
|
4525
|
-
const
|
|
4525
|
+
const uf = 60 * 1e3, cf = {
|
|
4526
4526
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
4527
4527
|
X: function(e, t, n) {
|
|
4528
4528
|
const r = Zt(n.timeZone, e);
|
|
@@ -4562,7 +4562,7 @@ const sf = 60 * 1e3, uf = {
|
|
|
4562
4562
|
case "O":
|
|
4563
4563
|
case "OO":
|
|
4564
4564
|
case "OOO":
|
|
4565
|
-
return "GMT" +
|
|
4565
|
+
return "GMT" + lf(r, ":");
|
|
4566
4566
|
case "OOOO":
|
|
4567
4567
|
default:
|
|
4568
4568
|
return "GMT" + ve(r, ":");
|
|
@@ -4582,7 +4582,7 @@ const sf = 60 * 1e3, uf = {
|
|
|
4582
4582
|
}
|
|
4583
4583
|
};
|
|
4584
4584
|
function Zt(e, t) {
|
|
4585
|
-
const n = e ? Le(e, t, !0) /
|
|
4585
|
+
const n = e ? Le(e, t, !0) / uf : (t == null ? void 0 : t.getTimezoneOffset()) ?? 0;
|
|
4586
4586
|
if (Number.isNaN(n))
|
|
4587
4587
|
throw new RangeError("Invalid time zone specified: " + e);
|
|
4588
4588
|
return n;
|
|
@@ -4601,7 +4601,7 @@ function ve(e, t = "") {
|
|
|
4601
4601
|
function _r(e, t) {
|
|
4602
4602
|
return e % 60 === 0 ? (e > 0 ? "-" : "+") + it(Math.abs(e) / 60, 2) : ve(e, t);
|
|
4603
4603
|
}
|
|
4604
|
-
function
|
|
4604
|
+
function lf(e, t = "") {
|
|
4605
4605
|
const n = e > 0 ? "-" : "+", r = Math.abs(e), o = Math.floor(r / 60), i = r % 60;
|
|
4606
4606
|
return i === 0 ? n + String(o) : n + String(o) + t + it(i, 2);
|
|
4607
4607
|
}
|
|
@@ -4609,7 +4609,7 @@ function yr(e) {
|
|
|
4609
4609
|
const t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()));
|
|
4610
4610
|
return t.setUTCFullYear(e.getFullYear()), +e - +t;
|
|
4611
4611
|
}
|
|
4612
|
-
const Do = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, xt = 36e5, wr = 6e4,
|
|
4612
|
+
const Do = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, xt = 36e5, wr = 6e4, df = 2, A = {
|
|
4613
4613
|
dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
|
|
4614
4614
|
datePattern: /^([0-9W+-]+)(.*)/,
|
|
4615
4615
|
// year tokens
|
|
@@ -4648,7 +4648,7 @@ function at(e, t = {}) {
|
|
|
4648
4648
|
throw new TypeError("1 argument required, but only " + arguments.length + " present");
|
|
4649
4649
|
if (e === null)
|
|
4650
4650
|
return /* @__PURE__ */ new Date(NaN);
|
|
4651
|
-
const n = t.additionalDigits == null ?
|
|
4651
|
+
const n = t.additionalDigits == null ? df : Number(t.additionalDigits);
|
|
4652
4652
|
if (n !== 2 && n !== 1 && n !== 0)
|
|
4653
4653
|
throw new RangeError("additionalDigits must be 0, 1 or 2");
|
|
4654
4654
|
if (e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]")
|
|
@@ -4657,13 +4657,13 @@ function at(e, t = {}) {
|
|
|
4657
4657
|
return new Date(e);
|
|
4658
4658
|
if (Object.prototype.toString.call(e) !== "[object String]")
|
|
4659
4659
|
return /* @__PURE__ */ new Date(NaN);
|
|
4660
|
-
const r =
|
|
4660
|
+
const r = ff(e), { year: o, restDateString: i } = hf(r.date, n), s = mf(i, o);
|
|
4661
4661
|
if (s === null || isNaN(s.getTime()))
|
|
4662
4662
|
return /* @__PURE__ */ new Date(NaN);
|
|
4663
4663
|
if (s) {
|
|
4664
4664
|
const c = s.getTime();
|
|
4665
4665
|
let l = 0, h;
|
|
4666
|
-
if (r.time && (l =
|
|
4666
|
+
if (r.time && (l = pf(r.time), l === null || isNaN(l)))
|
|
4667
4667
|
return /* @__PURE__ */ new Date(NaN);
|
|
4668
4668
|
if (r.timeZone || t.timeZone) {
|
|
4669
4669
|
if (h = Le(r.timeZone || t.timeZone, new Date(c + l)), isNaN(h))
|
|
@@ -4674,7 +4674,7 @@ function at(e, t = {}) {
|
|
|
4674
4674
|
} else
|
|
4675
4675
|
return /* @__PURE__ */ new Date(NaN);
|
|
4676
4676
|
}
|
|
4677
|
-
function
|
|
4677
|
+
function ff(e) {
|
|
4678
4678
|
const t = {};
|
|
4679
4679
|
let n = A.dateTimePattern.exec(e), r;
|
|
4680
4680
|
if (n ? (t.date = n[1], r = n[3]) : (n = A.datePattern.exec(e), n ? (t.date = n[1], r = n[2]) : (t.date = null, r = e)), r) {
|
|
@@ -4683,7 +4683,7 @@ function df(e) {
|
|
|
4683
4683
|
}
|
|
4684
4684
|
return t;
|
|
4685
4685
|
}
|
|
4686
|
-
function
|
|
4686
|
+
function hf(e, t) {
|
|
4687
4687
|
if (e) {
|
|
4688
4688
|
const n = A.YYY[t], r = A.YYYYY[t];
|
|
4689
4689
|
let o = A.YYYY.exec(e) || r.exec(e);
|
|
@@ -4706,7 +4706,7 @@ function ff(e, t) {
|
|
|
4706
4706
|
year: null
|
|
4707
4707
|
};
|
|
4708
4708
|
}
|
|
4709
|
-
function
|
|
4709
|
+
function mf(e, t) {
|
|
4710
4710
|
if (t === null)
|
|
4711
4711
|
return null;
|
|
4712
4712
|
let n, r, o;
|
|
@@ -4718,7 +4718,7 @@ function hf(e, t) {
|
|
|
4718
4718
|
if (i = A.DDD.exec(e), i) {
|
|
4719
4719
|
n = /* @__PURE__ */ new Date(0);
|
|
4720
4720
|
const s = parseInt(i[1], 10);
|
|
4721
|
-
return
|
|
4721
|
+
return yf(t, s) ? (n.setUTCFullYear(t, 0, s), n) : /* @__PURE__ */ new Date(NaN);
|
|
4722
4722
|
}
|
|
4723
4723
|
if (i = A.MMDD.exec(e), i) {
|
|
4724
4724
|
n = /* @__PURE__ */ new Date(0), r = parseInt(i[1], 10) - 1;
|
|
@@ -4734,7 +4734,7 @@ function hf(e, t) {
|
|
|
4734
4734
|
}
|
|
4735
4735
|
return null;
|
|
4736
4736
|
}
|
|
4737
|
-
function
|
|
4737
|
+
function pf(e) {
|
|
4738
4738
|
let t, n, r = A.HH.exec(e);
|
|
4739
4739
|
if (r)
|
|
4740
4740
|
return t = parseFloat(r[1].replace(",", ".")), $t(t) ? t % 24 * xt : NaN;
|
|
@@ -4754,7 +4754,7 @@ function vr(e, t, n) {
|
|
|
4754
4754
|
const o = r.getUTCDay() || 7, i = t * 7 + n + 1 - o;
|
|
4755
4755
|
return r.setUTCDate(r.getUTCDate() + i), r;
|
|
4756
4756
|
}
|
|
4757
|
-
const
|
|
4757
|
+
const gf = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], _f = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
4758
4758
|
function Oo(e) {
|
|
4759
4759
|
return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
|
|
4760
4760
|
}
|
|
@@ -4765,12 +4765,12 @@ function br(e, t, n) {
|
|
|
4765
4765
|
if (n < 1)
|
|
4766
4766
|
return !1;
|
|
4767
4767
|
const r = Oo(e);
|
|
4768
|
-
if (r && n >
|
|
4768
|
+
if (r && n > _f[t] || !r && n > gf[t])
|
|
4769
4769
|
return !1;
|
|
4770
4770
|
}
|
|
4771
4771
|
return !0;
|
|
4772
4772
|
}
|
|
4773
|
-
function
|
|
4773
|
+
function yf(e, t) {
|
|
4774
4774
|
if (t < 1)
|
|
4775
4775
|
return !1;
|
|
4776
4776
|
const n = Oo(e);
|
|
@@ -4782,16 +4782,16 @@ function Tr(e, t) {
|
|
|
4782
4782
|
function $t(e, t, n) {
|
|
4783
4783
|
return !(e < 0 || e >= 25 || t != null && (t < 0 || t >= 60) || n != null && (n < 0 || n >= 60));
|
|
4784
4784
|
}
|
|
4785
|
-
const
|
|
4786
|
-
function
|
|
4785
|
+
const wf = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
|
|
4786
|
+
function vf(e, t, n = {}) {
|
|
4787
4787
|
t = String(t);
|
|
4788
|
-
const r = t.match(
|
|
4788
|
+
const r = t.match(wf);
|
|
4789
4789
|
if (r) {
|
|
4790
4790
|
const o = at(n.originalDate || e, n);
|
|
4791
4791
|
t = r.reduce(function(i, s) {
|
|
4792
4792
|
if (s[0] === "'")
|
|
4793
4793
|
return i;
|
|
4794
|
-
const c = i.indexOf(s), l = i[c - 1] === "'", h = i.replace(s, "'" +
|
|
4794
|
+
const c = i.indexOf(s), l = i[c - 1] === "'", h = i.replace(s, "'" + cf[s[0]](o, s, n) + "'");
|
|
4795
4795
|
return l ? h.substring(0, c - 1) + h.substring(c + 1) : h;
|
|
4796
4796
|
}, t);
|
|
4797
4797
|
}
|
|
@@ -4802,14 +4802,14 @@ function So(e, t, n) {
|
|
|
4802
4802
|
const r = Le(t, e, !0), o = new Date(e.getTime() - r), i = /* @__PURE__ */ new Date(0);
|
|
4803
4803
|
return i.setFullYear(o.getUTCFullYear(), o.getUTCMonth(), o.getUTCDate()), i.setHours(o.getUTCHours(), o.getUTCMinutes(), o.getUTCSeconds(), o.getUTCMilliseconds()), i;
|
|
4804
4804
|
}
|
|
4805
|
-
function
|
|
4805
|
+
function bf(e, t, n, r) {
|
|
4806
4806
|
return r = {
|
|
4807
4807
|
...r,
|
|
4808
4808
|
timeZone: t,
|
|
4809
4809
|
originalDate: e
|
|
4810
|
-
},
|
|
4810
|
+
}, vf(So(e, t, { timeZone: r.timeZone }), n, r);
|
|
4811
4811
|
}
|
|
4812
|
-
function
|
|
4812
|
+
function Tf(e, t, n) {
|
|
4813
4813
|
if (typeof e == "string" && !e.match(Do))
|
|
4814
4814
|
return at(e, { ...n, timeZone: t });
|
|
4815
4815
|
e = at(e, n);
|
|
@@ -4819,7 +4819,7 @@ function bf(e, t, n) {
|
|
|
4819
4819
|
function Eo(e, t) {
|
|
4820
4820
|
return -Le(e, t);
|
|
4821
4821
|
}
|
|
4822
|
-
function
|
|
4822
|
+
function Xf(e) {
|
|
4823
4823
|
return ko(e, "yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
|
|
4824
4824
|
}
|
|
4825
4825
|
function kr(e, t = {}) {
|
|
@@ -4830,12 +4830,12 @@ function kr(e, t = {}) {
|
|
|
4830
4830
|
let r = "MMM dd, yyy hh:mm a";
|
|
4831
4831
|
t.short && (r = "MMM dd, yyy"), t.includeTZ && (r += " (z)");
|
|
4832
4832
|
const o = new Date(e);
|
|
4833
|
-
return
|
|
4833
|
+
return bf(o, n, r);
|
|
4834
4834
|
} catch {
|
|
4835
4835
|
return console.error("Invalid value passed to formatTime", e), "(invalid date)";
|
|
4836
4836
|
}
|
|
4837
4837
|
}
|
|
4838
|
-
function
|
|
4838
|
+
function Qf(e, t) {
|
|
4839
4839
|
return `${kr(e.getTime())} - ${kr(t.getTime(), { includeTZ: !0 })}`;
|
|
4840
4840
|
}
|
|
4841
4841
|
const st = {
|
|
@@ -4853,20 +4853,20 @@ const st = {
|
|
|
4853
4853
|
weekly: 60 * 60 * 24 * 7 * 1e3,
|
|
4854
4854
|
trend: 0
|
|
4855
4855
|
};
|
|
4856
|
-
function
|
|
4856
|
+
function Kf(e, t) {
|
|
4857
4857
|
return e.map((n) => ({
|
|
4858
4858
|
value: n,
|
|
4859
4859
|
label: t.t(`configuration.vitals.reports.granularity.${n}`)
|
|
4860
4860
|
}));
|
|
4861
4861
|
}
|
|
4862
|
-
function
|
|
4862
|
+
function kf(e, t) {
|
|
4863
4863
|
return {
|
|
4864
4864
|
duration: e,
|
|
4865
4865
|
type: "duration",
|
|
4866
4866
|
origin: t
|
|
4867
4867
|
};
|
|
4868
4868
|
}
|
|
4869
|
-
function
|
|
4869
|
+
function Jf(e) {
|
|
4870
4870
|
return e && jt.find((n) => e <= st[n]) || null;
|
|
4871
4871
|
}
|
|
4872
4872
|
function Mo(e, t, n, r) {
|
|
@@ -4874,7 +4874,7 @@ function Mo(e, t, n, r) {
|
|
|
4874
4874
|
let i = 0;
|
|
4875
4875
|
return o >= st.daily && (r ? i = -Eo(r, t) : i = t.getTimezoneOffset() * 60 * 1e3), new Date(e((t.getTime() - i) / o) * o + i);
|
|
4876
4876
|
}
|
|
4877
|
-
function
|
|
4877
|
+
function zf(e, t, n) {
|
|
4878
4878
|
return Mo(Math.floor, e, t, n);
|
|
4879
4879
|
}
|
|
4880
4880
|
function Io(e, t, n) {
|
|
@@ -4893,7 +4893,7 @@ class mt {
|
|
|
4893
4893
|
if (t)
|
|
4894
4894
|
return new Date(this.endDate().getTime() - this.timeframe.timeframeLengthMs() * r);
|
|
4895
4895
|
{
|
|
4896
|
-
const o = this.endDate(), i = this.timeframe.rawStart(this.tz), s =
|
|
4896
|
+
const o = this.endDate(), i = this.timeframe.rawStart(this.tz), s = zf(i, n, this.tz), l = (o.getTime() - s.getTime()) * (r - 1);
|
|
4897
4897
|
return new Date(s.getTime() - l);
|
|
4898
4898
|
}
|
|
4899
4899
|
}
|
|
@@ -4901,7 +4901,7 @@ class mt {
|
|
|
4901
4901
|
return Math.floor(this.granularityMs() / 1e3);
|
|
4902
4902
|
}
|
|
4903
4903
|
granularityDruid() {
|
|
4904
|
-
return
|
|
4904
|
+
return kf(this.granularityMs(), this.startDate().toISOString());
|
|
4905
4905
|
}
|
|
4906
4906
|
// Return a UNIX timestamp suitable for use in the `start` query param.
|
|
4907
4907
|
startSeconds() {
|
|
@@ -4920,7 +4920,7 @@ class mt {
|
|
|
4920
4920
|
return lr(this.endDate());
|
|
4921
4921
|
}
|
|
4922
4922
|
}
|
|
4923
|
-
class
|
|
4923
|
+
class eh extends mt {
|
|
4924
4924
|
constructor(n, r, o, i, s) {
|
|
4925
4925
|
super(n, o, i);
|
|
4926
4926
|
P(this, "granularity");
|
|
@@ -4936,7 +4936,7 @@ class Jf extends mt {
|
|
|
4936
4936
|
return st[this.granularity];
|
|
4937
4937
|
}
|
|
4938
4938
|
}
|
|
4939
|
-
class
|
|
4939
|
+
class Df extends mt {
|
|
4940
4940
|
startDate() {
|
|
4941
4941
|
return this.calculateStartDate(this.timeframe.isRelative, this.dataGranularity);
|
|
4942
4942
|
}
|
|
@@ -4947,7 +4947,7 @@ class zf extends mt {
|
|
|
4947
4947
|
return this.endDate().getTime() - this.startDate().getTime();
|
|
4948
4948
|
}
|
|
4949
4949
|
}
|
|
4950
|
-
class
|
|
4950
|
+
class th extends Df {
|
|
4951
4951
|
startDate() {
|
|
4952
4952
|
return this.calculateStartDate(this.timeframe.isRelative, this.dataGranularity, 2);
|
|
4953
4953
|
}
|
|
@@ -4956,7 +4956,7 @@ class eh extends zf {
|
|
|
4956
4956
|
}
|
|
4957
4957
|
}
|
|
4958
4958
|
var tt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
4959
|
-
function
|
|
4959
|
+
function Of(e) {
|
|
4960
4960
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4961
4961
|
}
|
|
4962
4962
|
var ut = { exports: {} };
|
|
@@ -5404,8 +5404,8 @@ ut.exports;
|
|
|
5404
5404
|
}
|
|
5405
5405
|
e.exports = Vi;
|
|
5406
5406
|
})(ut, ut.exports);
|
|
5407
|
-
var
|
|
5408
|
-
const
|
|
5407
|
+
var Sf = ut.exports;
|
|
5408
|
+
const Ef = /* @__PURE__ */ Of(Sf), ze = (e, t) => new Date(e.getTime() - Eo(t, e));
|
|
5409
5409
|
class W {
|
|
5410
5410
|
constructor(t) {
|
|
5411
5411
|
P(this, "timeframeText");
|
|
@@ -5474,11 +5474,11 @@ class W {
|
|
|
5474
5474
|
tzAdjustedDate(t) {
|
|
5475
5475
|
if (!t)
|
|
5476
5476
|
return /* @__PURE__ */ new Date();
|
|
5477
|
-
const n =
|
|
5477
|
+
const n = Tf(/* @__PURE__ */ new Date(), new Intl.DateTimeFormat().resolvedOptions().timeZone);
|
|
5478
5478
|
return So(n, t);
|
|
5479
5479
|
}
|
|
5480
5480
|
}
|
|
5481
|
-
class
|
|
5481
|
+
class Mf extends W {
|
|
5482
5482
|
rawStart(t) {
|
|
5483
5483
|
let n = K(this.tzAdjustedDate(t), { weekStartsOn: 1 });
|
|
5484
5484
|
return t && (n = ze(n, t)), n;
|
|
@@ -5487,7 +5487,7 @@ class Ef extends W {
|
|
|
5487
5487
|
return 60 * 60 * 24 * 7;
|
|
5488
5488
|
}
|
|
5489
5489
|
}
|
|
5490
|
-
class
|
|
5490
|
+
class If extends W {
|
|
5491
5491
|
rawStart(t) {
|
|
5492
5492
|
let n = Te(this.tzAdjustedDate(t));
|
|
5493
5493
|
return t && (n = ze(n, t)), n;
|
|
@@ -5496,7 +5496,7 @@ class Mf extends W {
|
|
|
5496
5496
|
return 60 * 60 * 24 * 31;
|
|
5497
5497
|
}
|
|
5498
5498
|
}
|
|
5499
|
-
class
|
|
5499
|
+
class Zf extends W {
|
|
5500
5500
|
rawEnd(t) {
|
|
5501
5501
|
let n = K(this.tzAdjustedDate(t), { weekStartsOn: 1 });
|
|
5502
5502
|
return t && (n = ze(n, t)), n;
|
|
@@ -5509,7 +5509,7 @@ class If extends W {
|
|
|
5509
5509
|
return t && (r = ze(r, t)), r;
|
|
5510
5510
|
}
|
|
5511
5511
|
}
|
|
5512
|
-
class
|
|
5512
|
+
class xf extends W {
|
|
5513
5513
|
rawEnd(t) {
|
|
5514
5514
|
let n = Te(this.tzAdjustedDate(t));
|
|
5515
5515
|
return t && (n = ze(n, t)), n;
|
|
@@ -5519,7 +5519,7 @@ class Zf extends W {
|
|
|
5519
5519
|
return t && (n = ze(n, t)), n;
|
|
5520
5520
|
}
|
|
5521
5521
|
}
|
|
5522
|
-
const
|
|
5522
|
+
const $f = /* @__PURE__ */ new Map([
|
|
5523
5523
|
[
|
|
5524
5524
|
w.FIFTEEN_MIN,
|
|
5525
5525
|
new W({
|
|
@@ -5627,7 +5627,7 @@ const xf = /* @__PURE__ */ new Map([
|
|
|
5627
5627
|
],
|
|
5628
5628
|
[
|
|
5629
5629
|
w.CURRENT_WEEK,
|
|
5630
|
-
new
|
|
5630
|
+
new Mf({
|
|
5631
5631
|
key: w.CURRENT_WEEK,
|
|
5632
5632
|
display: "This week",
|
|
5633
5633
|
timeframeText: "Week",
|
|
@@ -5645,7 +5645,7 @@ const xf = /* @__PURE__ */ new Map([
|
|
|
5645
5645
|
],
|
|
5646
5646
|
[
|
|
5647
5647
|
w.CURRENT_MONTH,
|
|
5648
|
-
new
|
|
5648
|
+
new If({
|
|
5649
5649
|
key: w.CURRENT_MONTH,
|
|
5650
5650
|
display: "This month",
|
|
5651
5651
|
timeframeText: "Month",
|
|
@@ -5661,7 +5661,7 @@ const xf = /* @__PURE__ */ new Map([
|
|
|
5661
5661
|
],
|
|
5662
5662
|
[
|
|
5663
5663
|
w.PREVIOUS_WEEK,
|
|
5664
|
-
new
|
|
5664
|
+
new Zf({
|
|
5665
5665
|
key: w.PREVIOUS_WEEK,
|
|
5666
5666
|
display: "Previous week",
|
|
5667
5667
|
timeframeText: "Week",
|
|
@@ -5676,14 +5676,14 @@ const xf = /* @__PURE__ */ new Map([
|
|
|
5676
5676
|
],
|
|
5677
5677
|
[
|
|
5678
5678
|
w.PREVIOUS_MONTH,
|
|
5679
|
-
new
|
|
5679
|
+
new xf({
|
|
5680
5680
|
key: w.PREVIOUS_MONTH,
|
|
5681
5681
|
display: "Previous month",
|
|
5682
5682
|
timeframeText: "Month",
|
|
5683
5683
|
timeframeLength: () => {
|
|
5684
5684
|
let e = 0;
|
|
5685
5685
|
const t = Te(/* @__PURE__ */ new Date()), n = Te(zo(/* @__PURE__ */ new Date()));
|
|
5686
|
-
return t.getTimezoneOffset() !== n.getTimezoneOffset() && (e =
|
|
5686
|
+
return t.getTimezoneOffset() !== n.getTimezoneOffset() && (e = Pf(t, n)), 60 * 60 * 24 * Gd((/* @__PURE__ */ new Date()).setMonth((/* @__PURE__ */ new Date()).getMonth() - 1)) + Hd(e);
|
|
5687
5687
|
},
|
|
5688
5688
|
defaultResponseGranularity: "daily",
|
|
5689
5689
|
dataGranularity: "daily",
|
|
@@ -5692,9 +5692,9 @@ const xf = /* @__PURE__ */ new Map([
|
|
|
5692
5692
|
})
|
|
5693
5693
|
]
|
|
5694
5694
|
]);
|
|
5695
|
-
function
|
|
5695
|
+
function nh(e) {
|
|
5696
5696
|
const t = new Date(e.start), n = new Date(e.end), r = (n.getTime() - t.getTime()) / 1e3;
|
|
5697
|
-
return e.timePeriodsKey &&
|
|
5697
|
+
return e.timePeriodsKey && Ef($f.get(e.timePeriodsKey)) || new W({
|
|
5698
5698
|
key: "custom",
|
|
5699
5699
|
timeframeText: "custom",
|
|
5700
5700
|
display: "custom",
|
|
@@ -5707,14 +5707,14 @@ function th(e) {
|
|
|
5707
5707
|
allowedTiers: ["free", "plus", "enterprise"]
|
|
5708
5708
|
});
|
|
5709
5709
|
}
|
|
5710
|
-
function
|
|
5710
|
+
function rh(e) {
|
|
5711
5711
|
return {
|
|
5712
5712
|
...e.key !== "custom" && { timePeriodsKey: e.key },
|
|
5713
5713
|
start: e.rawStart(),
|
|
5714
5714
|
end: e.rawEnd()
|
|
5715
5715
|
};
|
|
5716
5716
|
}
|
|
5717
|
-
function
|
|
5717
|
+
function oh(e) {
|
|
5718
5718
|
return {
|
|
5719
5719
|
key: e.key,
|
|
5720
5720
|
display: e.display,
|
|
@@ -5725,10 +5725,10 @@ function rh(e) {
|
|
|
5725
5725
|
end: () => e.rawEnd()
|
|
5726
5726
|
};
|
|
5727
5727
|
}
|
|
5728
|
-
function
|
|
5729
|
-
return
|
|
5728
|
+
function Pf(e, t) {
|
|
5729
|
+
return qd(e.getTimezoneOffset() - t.getTimezoneOffset());
|
|
5730
5730
|
}
|
|
5731
|
-
const
|
|
5731
|
+
const ih = {
|
|
5732
5732
|
"15M": w.FIFTEEN_MIN,
|
|
5733
5733
|
"1H": w.ONE_HOUR,
|
|
5734
5734
|
"6H": w.SIX_HOUR,
|
|
@@ -5757,7 +5757,7 @@ class en {
|
|
|
5757
5757
|
return Math.floor(o * (n - t + 1)) + t;
|
|
5758
5758
|
}
|
|
5759
5759
|
}
|
|
5760
|
-
const
|
|
5760
|
+
const ah = (e, t, n) => {
|
|
5761
5761
|
const r = Zo(10, 1e4), o = new en(r), i = Date.now() - 6 * 60 * 60 * 1e3, s = Date.now(), c = [];
|
|
5762
5762
|
let l = 0;
|
|
5763
5763
|
for (let m = i; m <= s; m += 60 * 60 * 1e3)
|
|
@@ -5814,7 +5814,7 @@ const ih = (e, t, n) => {
|
|
|
5814
5814
|
data: c,
|
|
5815
5815
|
meta: y
|
|
5816
5816
|
};
|
|
5817
|
-
},
|
|
5817
|
+
}, sh = (e, t) => {
|
|
5818
5818
|
const n = Zo(10, 1e4), r = new en(n), o = Date.now() - 6 * 60 * 60 * 1e3, i = Date.now(), s = [], c = {};
|
|
5819
5819
|
e.forEach((h) => {
|
|
5820
5820
|
c[h.name] = 0;
|
|
@@ -5848,7 +5848,7 @@ const ih = (e, t, n) => {
|
|
|
5848
5848
|
data: s,
|
|
5849
5849
|
meta: l
|
|
5850
5850
|
};
|
|
5851
|
-
},
|
|
5851
|
+
}, uh = (e, t, n) => {
|
|
5852
5852
|
const r = Math.floor(Math.random() * 9991) + 10, o = new en(r), i = Date.now() - 6 * 60 * 60 * 1e3, s = Date.now(), c = new Date((i + s) / 2).toISOString(), l = [];
|
|
5853
5853
|
if (t) {
|
|
5854
5854
|
const m = Object.keys(t), p = Object.values(t), v = (z, x) => {
|
|
@@ -5909,24 +5909,24 @@ function Zo(e, t) {
|
|
|
5909
5909
|
return e = Math.ceil(e), t = Math.floor(t), Math.floor(Math.random() * (t - e + 1) + e);
|
|
5910
5910
|
}
|
|
5911
5911
|
export {
|
|
5912
|
-
|
|
5912
|
+
th as DeltaQueryTime,
|
|
5913
5913
|
st as Granularities,
|
|
5914
|
-
|
|
5914
|
+
Cf as REFRESH_INTERVAL_MS,
|
|
5915
5915
|
en as SeededRandom,
|
|
5916
|
-
|
|
5917
|
-
|
|
5916
|
+
ih as TIMEFRAME_LOOKUP,
|
|
5917
|
+
$f as TimePeriods,
|
|
5918
5918
|
W as Timeframe,
|
|
5919
5919
|
w as TimeframeKeys,
|
|
5920
|
-
|
|
5921
|
-
|
|
5920
|
+
eh as TimeseriesQueryTime,
|
|
5921
|
+
Df as UnaryQueryTime,
|
|
5922
5922
|
Er as aiExploreAggregations,
|
|
5923
5923
|
Ft as basicExploreAggregations,
|
|
5924
5924
|
Io as ceilToNearestTimeGrain,
|
|
5925
|
-
|
|
5926
|
-
|
|
5925
|
+
qf as dashboardTileTypes,
|
|
5926
|
+
Hf as dashboardsSchemaV1,
|
|
5927
5927
|
ca as datasourceToFilterableDimensions,
|
|
5928
|
-
|
|
5929
|
-
|
|
5928
|
+
nh as datePickerSelectionToTimeframe,
|
|
5929
|
+
Pf as dstOffsetHours,
|
|
5930
5930
|
Sr as exploreAggregations,
|
|
5931
5931
|
zr as exploreFilterTypesV2,
|
|
5932
5932
|
Se as filterableAiExploreDimensions,
|
|
@@ -5934,21 +5934,21 @@ export {
|
|
|
5934
5934
|
Oe as filterableExploreDimensions,
|
|
5935
5935
|
ia as filterableRequestDimensions,
|
|
5936
5936
|
ua as filterableRequestMetrics,
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5937
|
+
Yf as filterableRequestWildcardDimensions,
|
|
5938
|
+
zf as floorToNearestTimeGrain,
|
|
5939
|
+
Xf as formatISOTimeWithTZ,
|
|
5940
5940
|
kr as formatTime,
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5941
|
+
Qf as formatTimeRange,
|
|
5942
|
+
uh as generateCrossSectionalData,
|
|
5943
|
+
sh as generateMultipleMetricTimeSeriesData,
|
|
5944
|
+
ah as generateSingleMetricTimeSeriesData,
|
|
5945
|
+
Bf as getFieldDataSources,
|
|
5946
|
+
Kf as granularitiesToOptions,
|
|
5947
|
+
kf as granularityMsToQuery,
|
|
5948
5948
|
jt as granularityValues,
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5949
|
+
Jf as msToGranularity,
|
|
5950
|
+
Vf as parseDashboardConfig,
|
|
5951
|
+
Gf as queryDatasources,
|
|
5952
5952
|
Yt as queryableAiExploreDimensions,
|
|
5953
5953
|
ct as queryableBasicExploreDimensions,
|
|
5954
5954
|
Ut as queryableExploreDimensions,
|
|
@@ -5956,32 +5956,32 @@ export {
|
|
|
5956
5956
|
sa as queryableRequestMetrics,
|
|
5957
5957
|
aa as queryableRequestWildcardDimensions,
|
|
5958
5958
|
Zo as rand,
|
|
5959
|
-
|
|
5959
|
+
Lf as relativeTimeRangeValuesRequestV2,
|
|
5960
5960
|
Or as relativeTimeRangeValuesV4,
|
|
5961
|
-
|
|
5961
|
+
Rf as reportChartTypes,
|
|
5962
5962
|
Dr as requestFilterTypeEmptyV2,
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5963
|
+
Af as requestFilterTypeEqualsV2,
|
|
5964
|
+
jf as requestFilterTypeMetricV2,
|
|
5965
|
+
Ff as requestFilterTypeWildcardV2,
|
|
5966
|
+
Wf as stripUnknownFilters,
|
|
5967
|
+
Uf as timeRangeTypeV2,
|
|
5968
|
+
rh as timeframeToDatepickerSelection,
|
|
5969
|
+
oh as timeframeToDatepickerTimeperiod,
|
|
5970
|
+
Sl as zApiUsageQuery,
|
|
5971
5971
|
gl as zBarChartSchema,
|
|
5972
|
-
|
|
5973
|
-
|
|
5972
|
+
El as zBasicQuery,
|
|
5973
|
+
Pl as zDashboardConfig,
|
|
5974
5974
|
wl as zDonutChartSchema,
|
|
5975
5975
|
yl as zGaugeChartSchema,
|
|
5976
|
-
|
|
5976
|
+
Ml as zLlmUsageQuery,
|
|
5977
5977
|
bl as zMetricCardSchema,
|
|
5978
5978
|
Tl as zSingleValueSchema,
|
|
5979
5979
|
pl as zSlottableSchema,
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5980
|
+
$l as zTileConfig,
|
|
5981
|
+
Zl as zTileDefinition,
|
|
5982
|
+
xl as zTileLayout,
|
|
5983
5983
|
_l as zTimeseriesChartSchema,
|
|
5984
5984
|
vl as zTopNTableSchema,
|
|
5985
|
-
|
|
5985
|
+
Il as zValidDashboardQuery
|
|
5986
5986
|
};
|
|
5987
5987
|
//# sourceMappingURL=vitals-utilities.es.js.map
|