react-semaphor 0.1.558 → 0.1.560
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/analytics-protocol/index.js +368 -358
- package/dist/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +5 -5
- package/dist/brand-studio/index.js +9 -9
- package/dist/briefings/index.js +5 -5
- package/dist/chunks/analytics-base-schemas-CHLxsPfX.js +630 -0
- package/dist/chunks/{assistant-chat-BCWoP6Rf.js → assistant-chat-Bu2fFm_I.js} +206 -207
- package/dist/chunks/{bookmark-state-PjQpxbG7.js → bookmark-state-BFY9oNmr.js} +3 -3
- package/dist/chunks/{braces-D5Ucy7q1.js → braces-Da41xfUd.js} +1 -1
- package/dist/chunks/{comparison-window-caption-Dc7BaCMz.js → comparison-window-caption-4FNkMrzE.js} +213 -213
- package/dist/chunks/{context-DVy4HOU0.js → context-BgPDzLHZ.js} +1 -1
- package/dist/chunks/{custom-visual-inputs-B-DLRGrV.js → custom-visual-inputs-Dz-enUNR.js} +1 -1
- package/dist/chunks/{dashboard-wK6Bai4V.js → dashboard-_MeBuy67.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-Coqghdn6.js → dashboard-briefing-launcher-CEi4Pr_v.js} +1152 -1166
- package/dist/chunks/{dashboard-controls-BYWSM2RM.js → dashboard-controls-Bi7fyG-4.js} +98 -98
- package/dist/chunks/{dashboard-json-pPTB5gj0.js → dashboard-json-B1mU_OMa.js} +5 -5
- package/dist/chunks/{document-dashboard-inputs-PY_7Xm55.js → document-dashboard-inputs-CkWfDB8c.js} +64 -64
- package/dist/chunks/{edit-dashboard-visual-BODxuUeq.js → edit-dashboard-visual-0CJN31Y3.js} +8274 -8514
- package/dist/chunks/filter-reach-copy-BF4w4kI2.js +3738 -0
- package/dist/chunks/{filter-value-text-CUBpotVN.js → filter-value-text-CRC-K_l_.js} +3 -3
- package/dist/chunks/{global-date-filter-utils-BsFqnnbA.js → global-date-filter-utils-D8365uPH.js} +4088 -3416
- package/dist/chunks/{index-DP_wQl0v.js → index-DtHidOPV.js} +579 -604
- package/dist/chunks/{layout-grid-CkoXmv0L.js → layout-grid-BvsH4RY2.js} +1 -1
- package/dist/chunks/{list-filter-B4i25kuc.js → list-filter-Dg0otx5E.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-4GTUDheD.js → matrix-analytical-definition-CM18W8w6.js} +41 -41
- package/dist/chunks/{matrix-card-fS_4O7zA.js → matrix-card-HPskLaPy.js} +3 -3
- package/dist/chunks/{matrix-member-presentation-Dj7HaAHC.js → matrix-member-presentation-Bbrfrke4.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-CpgLZ7E5.js → matrix-operation-contract-WPv4R-H_.js} +130 -130
- package/dist/chunks/{metric-comparison-C8LY7GG5.js → metric-comparison-ljMKYZKa.js} +2 -2
- package/dist/chunks/{model-change-CJEj3ZD6.js → model-change-Ccn1zaxl.js} +1 -1
- package/dist/chunks/{palette-stlpjVk4.js → palette-Bsh376zO.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-DMk-mKhG.js → pivot-result-contract-expectations-Bl5suy4-.js} +602 -696
- package/dist/chunks/{pivot-result-identity-CrQ54Xbj.js → pivot-result-identity-vS9TSh4f.js} +1 -1
- package/dist/chunks/{raw-temporal-presentation-BI2z2LlB.js → raw-temporal-presentation-BHm7s-hz.js} +230 -274
- package/dist/chunks/{report-preferences-dialog-Dc-YyVwf.js → report-preferences-dialog-BV8L0SeS.js} +55 -55
- package/dist/chunks/{report-runtime-context-CohdtiMg.js → report-runtime-context-BZQh9ywy.js} +2 -2
- package/dist/chunks/{resolve-dashboard-input-context-BZYI1hB0.js → resolve-dashboard-input-context-CAMiWvyR.js} +2021 -2239
- package/dist/chunks/{save-C1dgxgAu.js → save-B5EAsgQF.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-CIBoMq46.js → saved-dashboard-context-n2Wn11cV.js} +57 -57
- package/dist/chunks/{selection-reducer-_d6aKJnj.js → selection-reducer-D0YnaAD9.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-ERTLU7B4.js → semaphor-ready-indicator-XLBLOJ2V.js} +38446 -39176
- package/dist/chunks/{shelf-drop-preview-context-fEnx6iL_.js → shelf-drop-preview-context-DHMa54a-.js} +570 -570
- package/dist/chunks/source-entity-resolution-dUG5VWRm.js +607 -0
- package/dist/chunks/{switch-BqUan2mN.js → switch-ByxH4M7t.js} +3 -3
- package/dist/chunks/{table-export-sheet-CTCTA_bd.js → table-export-sheet-C_GdeTYU.js} +1 -1
- package/dist/chunks/{table-settings-DF1gdVQR.js → table-settings-Imz0FgWi.js} +8 -8
- package/dist/chunks/{temporal-input-presentation-DoSniQj1.js → temporal-input-presentation-uvNK_tM0.js} +1109 -820
- package/dist/chunks/{token-types-DFyLflLY.js → token-types-CQtXUVMy.js} +1 -1
- package/dist/chunks/{upload-DcoyjkRV.js → upload-wbR-NVzq.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-xhb9YFg-.js → use-create-flow-overlay-state-CEBaLOKC.js} +6 -6
- package/dist/chunks/validators-CXTneCA4.js +3453 -0
- package/dist/chunks/{zoned-wall-clock-E35Frf9v.js → zoned-wall-clock-B1n_WjW3.js} +1 -1
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +2207 -1496
- package/dist/data-app-sdk/index.js +20 -20
- package/dist/data-app-sdk-adapters/index.js +3 -3
- package/dist/data-app-sdk-validation/index.js +6 -6
- package/dist/format-utils/index.js +181 -176
- package/dist/index.js +22 -22
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/components/editor/editor-aside/utils.d.ts +1 -1
- package/dist/types/components/visual/data-table/types/data-table.d.ts +5 -20
- package/dist/types/index.js +6 -6
- package/dist/types/lib/formatters/canonical-format-adapter.d.ts +2 -29
- package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +0 -2
- package/dist/types/lib/formatters/table-column-settings.d.ts +47 -0
- package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +10 -188
- package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +1 -1
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +16 -372
- package/dist/types/lib/stores/dashboard-store.d.ts +0 -1
- package/dist/types/lib/stores/editor-store.d.ts +39 -9
- package/dist/types/lib/stores/table-actions.d.ts +9 -3
- package/dist/types/lib/table-formatting/index.d.ts +0 -2
- package/dist/types/lib/table-formatting/table-conditional-formatting-range-source.d.ts +3 -2
- package/dist/types/lib/table-formatting/table-conditional-formatting-range.d.ts +3 -2
- package/dist/types/lib/table-formatting/table-formatting-normalize.d.ts +1 -2
- package/dist/types/lib/table-formatting/table-formatting-render-model.d.ts +9 -0
- package/dist/types/lib/table-formatting/table-formatting-types.d.ts +5 -95
- package/dist/types/lib/table-formatting/table-presentation-fields.d.ts +35 -0
- package/dist/types/lib/types/common-types.d.ts +40 -47
- package/dist/types/lib/types/explorer-types.d.ts +13 -44
- package/dist/types/lib/utils/card-config-utils.d.ts +9 -1
- package/dist/types/lib/utils/card-definition.d.ts +9 -187
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +159 -513
- package/dist/types/shared/analytics-protocol/contracts.d.ts +32 -9
- package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +108 -980
- package/dist/types/shared/analytics-protocol/field-validation.d.ts +1 -0
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +281 -4624
- package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +20 -20
- package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +18 -18
- package/dist/types/shared/analytics-protocol/matrix-path-contract.d.ts +40 -40
- package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +3 -203
- package/dist/types/shared/analytics-protocol/scalar-value.d.ts +8 -8
- package/dist/types/shared/analytics-protocol/source-capabilities.d.ts +21 -0
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +8 -0
- package/dist/types/shared/assistant-protocol/context.d.ts +69 -69
- package/dist/types/shared/dashboard-authoring/canonical-result-keys.d.ts +13 -0
- package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +4 -1
- package/dist/types/shared/dashboard-authoring/card-formats/sql-date-pattern.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/card-formats/upgrade-card-formats.d.ts +57 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +24 -24
- package/dist/types/shared/dashboard-authoring/conditional-formatting/editable.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/evaluate.d.ts +16 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/index.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/resolve-card-column-ref.d.ts +17 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/retain.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +4499 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/store.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/types.d.ts +151 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/upgrade.d.ts +35 -0
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +62 -62
- package/dist/types/shared/dashboard-authoring/dashboard-card-source-index.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +5 -0
- package/dist/types/shared/dashboard-authoring/legacy-table-routing.d.ts +4 -2
- package/dist/types/shared/dashboard-authoring/matrix-authoring.d.ts +4 -5
- package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +24 -736
- package/dist/types/shared/dashboard-authoring/retired-presentation-fields.d.ts +31 -0
- package/dist/types/shared/dashboard-authoring/upgrade-card-presentation.d.ts +14 -0
- package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +5 -1
- package/dist/types/shared/format-utils/formatters/number-formatter.d.ts +16 -0
- package/dist/types/shared/format-utils/index.d.ts +2 -0
- package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +10 -366
- package/dist/types/shared/format-utils/raw-temporal.d.ts +15 -1
- package/dist/types/shared/format-utils/resolve-column-format.d.ts +43 -0
- package/dist/types/shared/format-utils/retired-format-adapters.d.ts +68 -0
- package/dist/types/shared/format-utils/semantic-format.d.ts +5 -1
- package/dist/types/shared/format-utils/stored-value-format.d.ts +16 -0
- package/dist/types/shared/format-utils/types/format-types.d.ts +10 -12
- package/package.json +1 -1
- package/dist/chunks/analytics-base-schemas-BUFUoO6G.js +0 -472
- package/dist/chunks/editor-draft-sync-BN5qYHPF.js +0 -15
- package/dist/chunks/filter-reach-copy-BvJH9JO-.js +0 -3411
- package/dist/chunks/source-entity-resolution-DXW1HpKf.js +0 -816
- package/dist/chunks/validators-hmfNNQz8.js +0 -3595
- package/dist/types/lib/table-formatting/table-conditional-formatting-evaluator.d.ts +0 -9
- package/dist/types/lib/table-formatting/table-formatting-validation.d.ts +0 -12
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
import "./matrix-operation-contract-
|
|
6
|
-
import
|
|
1
|
+
var fe = Object.defineProperty;
|
|
2
|
+
var le = (e, t, n) => t in e ? fe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var z = (e, t, n) => le(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { aW as me, t as j, aj as de, _ as he } from "./validators-CXTneCA4.js";
|
|
5
|
+
import "./matrix-operation-contract-WPv4R-H_.js";
|
|
6
|
+
import "./analytics-base-schemas-CHLxsPfX.js";
|
|
7
7
|
import "zod";
|
|
8
|
-
import {
|
|
9
|
-
import { r as
|
|
10
|
-
function
|
|
8
|
+
import { au as ge, av as ee, aq as H, ar as W, aw as te, ax as ne, ay as we, m as ye, d as be, a3 as Me, a5 as re, p as ve, r as Oe, s as Te, i as xe, J as De, l as Pe, o as pe } from "./temporal-input-presentation-uvNK_tM0.js";
|
|
9
|
+
import { r as ke } from "./metric-comparison-ljMKYZKa.js";
|
|
10
|
+
function d(e) {
|
|
11
11
|
const t = Object.prototype.toString.call(e);
|
|
12
12
|
return e instanceof Date || typeof e == "object" && t === "[object Date]" ? new e.constructor(+e) : typeof e == "number" || t === "[object Number]" || typeof e == "string" || t === "[object String]" ? new Date(e) : /* @__PURE__ */ new Date(NaN);
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function O(e, t) {
|
|
15
15
|
return e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
16
16
|
}
|
|
17
|
-
let
|
|
17
|
+
let Se = {};
|
|
18
18
|
function P() {
|
|
19
|
-
return
|
|
19
|
+
return Se;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
var
|
|
23
|
-
const n = P(), r = (t == null ? void 0 : t.weekStartsOn) ?? ((
|
|
24
|
-
return a.setDate(a.getDate() -
|
|
21
|
+
function S(e, t) {
|
|
22
|
+
var i, f, l, c;
|
|
23
|
+
const n = P(), r = (t == null ? void 0 : t.weekStartsOn) ?? ((f = (i = t == null ? void 0 : t.locale) == null ? void 0 : i.options) == null ? void 0 : f.weekStartsOn) ?? n.weekStartsOn ?? ((c = (l = n.locale) == null ? void 0 : l.options) == null ? void 0 : c.weekStartsOn) ?? 0, a = d(e), s = a.getDay(), o = (s < r ? 7 : 0) + s - r;
|
|
24
|
+
return a.setDate(a.getDate() - o), a.setHours(0, 0, 0, 0), a;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
return
|
|
26
|
+
function N(e) {
|
|
27
|
+
return S(e, { weekStartsOn: 1 });
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
const t =
|
|
29
|
+
function ae(e) {
|
|
30
|
+
const t = d(e), n = t.getFullYear(), r = O(e, 0);
|
|
31
31
|
r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
|
|
32
|
-
const a =
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
return t.getTime() >= a.getTime() ? n + 1 : t.getTime() >=
|
|
32
|
+
const a = N(r), s = O(e, 0);
|
|
33
|
+
s.setFullYear(n, 0, 4), s.setHours(0, 0, 0, 0);
|
|
34
|
+
const o = N(s);
|
|
35
|
+
return t.getTime() >= a.getTime() ? n + 1 : t.getTime() >= o.getTime() ? n : n - 1;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
const t =
|
|
37
|
+
function B(e) {
|
|
38
|
+
const t = d(e);
|
|
39
39
|
return t.setHours(0, 0, 0, 0), t;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const t =
|
|
41
|
+
function Y(e) {
|
|
42
|
+
const t = d(e), n = new Date(
|
|
43
43
|
Date.UTC(
|
|
44
44
|
t.getFullYear(),
|
|
45
45
|
t.getMonth(),
|
|
@@ -52,78 +52,78 @@ function E(e) {
|
|
|
52
52
|
);
|
|
53
53
|
return n.setUTCFullYear(t.getFullYear()), +e - +n;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
const n =
|
|
57
|
-
return Math.round((a -
|
|
55
|
+
function We(e, t) {
|
|
56
|
+
const n = B(e), r = B(t), a = +n - Y(n), s = +r - Y(r);
|
|
57
|
+
return Math.round((a - s) / ge);
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
const t =
|
|
61
|
-
return n.setFullYear(t, 0, 4), n.setHours(0, 0, 0, 0),
|
|
59
|
+
function Ce(e) {
|
|
60
|
+
const t = ae(e), n = O(e, 0);
|
|
61
|
+
return n.setFullYear(t, 0, 4), n.setHours(0, 0, 0, 0), N(n);
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
const n =
|
|
63
|
+
function C(e, t) {
|
|
64
|
+
const n = d(e), r = d(t), a = n.getTime() - r.getTime();
|
|
65
65
|
return a < 0 ? -1 : a > 0 ? 1 : a;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
return
|
|
67
|
+
function Ne(e) {
|
|
68
|
+
return O(e, Date.now());
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function Ye(e) {
|
|
71
71
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
if (!
|
|
73
|
+
function Ee(e) {
|
|
74
|
+
if (!Ye(e) && typeof e != "number")
|
|
75
75
|
return !1;
|
|
76
|
-
const t =
|
|
76
|
+
const t = d(e);
|
|
77
77
|
return !isNaN(Number(t));
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
const n =
|
|
81
|
-
return a * 12 +
|
|
79
|
+
function Fe(e, t) {
|
|
80
|
+
const n = d(e), r = d(t), a = n.getFullYear() - r.getFullYear(), s = n.getMonth() - r.getMonth();
|
|
81
|
+
return a * 12 + s;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function Le(e) {
|
|
84
84
|
return (t) => {
|
|
85
85
|
const r = (e ? Math[e] : Math.trunc)(t);
|
|
86
86
|
return r === 0 ? 0 : r;
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
return +
|
|
89
|
+
function Xe(e, t) {
|
|
90
|
+
return +d(e) - +d(t);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
const t =
|
|
92
|
+
function Ie(e) {
|
|
93
|
+
const t = d(e);
|
|
94
94
|
return t.setHours(23, 59, 59, 999), t;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
const t =
|
|
96
|
+
function _e(e) {
|
|
97
|
+
const t = d(e), n = t.getMonth();
|
|
98
98
|
return t.setFullYear(t.getFullYear(), n + 1, 0), t.setHours(23, 59, 59, 999), t;
|
|
99
99
|
}
|
|
100
|
-
function
|
|
101
|
-
const t =
|
|
102
|
-
return +
|
|
100
|
+
function qe(e) {
|
|
101
|
+
const t = d(e);
|
|
102
|
+
return +Ie(t) == +_e(t);
|
|
103
103
|
}
|
|
104
|
-
function
|
|
105
|
-
const n =
|
|
106
|
-
|
|
104
|
+
function Ae(e, t) {
|
|
105
|
+
const n = d(e), r = d(t), a = C(n, r), s = Math.abs(
|
|
106
|
+
Fe(n, r)
|
|
107
107
|
);
|
|
108
|
-
let
|
|
109
|
-
if (
|
|
110
|
-
|
|
108
|
+
let o;
|
|
109
|
+
if (s < 1)
|
|
110
|
+
o = 0;
|
|
111
111
|
else {
|
|
112
|
-
n.getMonth() === 1 && n.getDate() > 27 && n.setDate(30), n.setMonth(n.getMonth() - a *
|
|
113
|
-
let
|
|
114
|
-
|
|
112
|
+
n.getMonth() === 1 && n.getDate() > 27 && n.setDate(30), n.setMonth(n.getMonth() - a * s);
|
|
113
|
+
let i = C(n, r) === -a;
|
|
114
|
+
qe(d(e)) && s === 1 && C(e, r) === 1 && (i = !1), o = a * (s - Number(i));
|
|
115
115
|
}
|
|
116
|
-
return
|
|
116
|
+
return o === 0 ? 0 : o;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
const r =
|
|
120
|
-
return
|
|
118
|
+
function Re(e, t, n) {
|
|
119
|
+
const r = Xe(e, t) / 1e3;
|
|
120
|
+
return Le(n == null ? void 0 : n.roundingMethod)(r);
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
const t =
|
|
122
|
+
function ze(e) {
|
|
123
|
+
const t = d(e), n = O(e, 0);
|
|
124
124
|
return n.setFullYear(t.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
125
125
|
}
|
|
126
|
-
const
|
|
126
|
+
const je = {
|
|
127
127
|
lessThanXSeconds: {
|
|
128
128
|
one: "less than a second",
|
|
129
129
|
other: "less than {{count}} seconds"
|
|
@@ -185,77 +185,77 @@ const Ve = {
|
|
|
185
185
|
one: "almost 1 year",
|
|
186
186
|
other: "almost {{count}} years"
|
|
187
187
|
}
|
|
188
|
-
},
|
|
188
|
+
}, He = (e, t, n) => {
|
|
189
189
|
let r;
|
|
190
|
-
const a =
|
|
190
|
+
const a = je[e];
|
|
191
191
|
return typeof a == "string" ? r = a : t === 1 ? r = a.one : r = a.other.replace("{{count}}", t.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
192
192
|
};
|
|
193
|
-
function
|
|
193
|
+
function L(e) {
|
|
194
194
|
return (t = {}) => {
|
|
195
195
|
const n = t.width ? String(t.width) : e.defaultWidth;
|
|
196
196
|
return e.formats[n] || e.formats[e.defaultWidth];
|
|
197
197
|
};
|
|
198
198
|
}
|
|
199
|
-
const
|
|
199
|
+
const Be = {
|
|
200
200
|
full: "EEEE, MMMM do, y",
|
|
201
201
|
long: "MMMM do, y",
|
|
202
202
|
medium: "MMM d, y",
|
|
203
203
|
short: "MM/dd/yyyy"
|
|
204
|
-
},
|
|
204
|
+
}, $e = {
|
|
205
205
|
full: "h:mm:ss a zzzz",
|
|
206
206
|
long: "h:mm:ss a z",
|
|
207
207
|
medium: "h:mm:ss a",
|
|
208
208
|
short: "h:mm a"
|
|
209
|
-
},
|
|
209
|
+
}, Ze = {
|
|
210
210
|
full: "{{date}} 'at' {{time}}",
|
|
211
211
|
long: "{{date}} 'at' {{time}}",
|
|
212
212
|
medium: "{{date}}, {{time}}",
|
|
213
213
|
short: "{{date}}, {{time}}"
|
|
214
|
-
},
|
|
215
|
-
date:
|
|
216
|
-
formats:
|
|
214
|
+
}, Ve = {
|
|
215
|
+
date: L({
|
|
216
|
+
formats: Be,
|
|
217
217
|
defaultWidth: "full"
|
|
218
218
|
}),
|
|
219
|
-
time:
|
|
220
|
-
formats:
|
|
219
|
+
time: L({
|
|
220
|
+
formats: $e,
|
|
221
221
|
defaultWidth: "full"
|
|
222
222
|
}),
|
|
223
|
-
dateTime:
|
|
224
|
-
formats:
|
|
223
|
+
dateTime: L({
|
|
224
|
+
formats: Ze,
|
|
225
225
|
defaultWidth: "full"
|
|
226
226
|
})
|
|
227
|
-
},
|
|
227
|
+
}, Qe = {
|
|
228
228
|
lastWeek: "'last' eeee 'at' p",
|
|
229
229
|
yesterday: "'yesterday at' p",
|
|
230
230
|
today: "'today at' p",
|
|
231
231
|
tomorrow: "'tomorrow at' p",
|
|
232
232
|
nextWeek: "eeee 'at' p",
|
|
233
233
|
other: "P"
|
|
234
|
-
},
|
|
235
|
-
function
|
|
234
|
+
}, Ge = (e, t, n, r) => Qe[e];
|
|
235
|
+
function p(e) {
|
|
236
236
|
return (t, n) => {
|
|
237
237
|
const r = n != null && n.context ? String(n.context) : "standalone";
|
|
238
238
|
let a;
|
|
239
239
|
if (r === "formatting" && e.formattingValues) {
|
|
240
|
-
const
|
|
241
|
-
a = e.formattingValues[
|
|
240
|
+
const o = e.defaultFormattingWidth || e.defaultWidth, i = n != null && n.width ? String(n.width) : o;
|
|
241
|
+
a = e.formattingValues[i] || e.formattingValues[o];
|
|
242
242
|
} else {
|
|
243
|
-
const
|
|
244
|
-
a = e.values[
|
|
243
|
+
const o = e.defaultWidth, i = n != null && n.width ? String(n.width) : e.defaultWidth;
|
|
244
|
+
a = e.values[i] || e.values[o];
|
|
245
245
|
}
|
|
246
|
-
const
|
|
247
|
-
return a[
|
|
246
|
+
const s = e.argumentCallback ? e.argumentCallback(t) : t;
|
|
247
|
+
return a[s];
|
|
248
248
|
};
|
|
249
249
|
}
|
|
250
|
-
const
|
|
250
|
+
const Ue = {
|
|
251
251
|
narrow: ["B", "A"],
|
|
252
252
|
abbreviated: ["BC", "AD"],
|
|
253
253
|
wide: ["Before Christ", "Anno Domini"]
|
|
254
|
-
},
|
|
254
|
+
}, Je = {
|
|
255
255
|
narrow: ["1", "2", "3", "4"],
|
|
256
256
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
257
257
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
258
|
-
},
|
|
258
|
+
}, Ke = {
|
|
259
259
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
260
260
|
abbreviated: [
|
|
261
261
|
"Jan",
|
|
@@ -285,7 +285,7 @@ const nt = {
|
|
|
285
285
|
"November",
|
|
286
286
|
"December"
|
|
287
287
|
]
|
|
288
|
-
},
|
|
288
|
+
}, et = {
|
|
289
289
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
290
290
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
291
291
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -298,7 +298,7 @@ const nt = {
|
|
|
298
298
|
"Friday",
|
|
299
299
|
"Saturday"
|
|
300
300
|
]
|
|
301
|
-
},
|
|
301
|
+
}, tt = {
|
|
302
302
|
narrow: {
|
|
303
303
|
am: "a",
|
|
304
304
|
pm: "p",
|
|
@@ -329,7 +329,7 @@ const nt = {
|
|
|
329
329
|
evening: "evening",
|
|
330
330
|
night: "night"
|
|
331
331
|
}
|
|
332
|
-
},
|
|
332
|
+
}, nt = {
|
|
333
333
|
narrow: {
|
|
334
334
|
am: "a",
|
|
335
335
|
pm: "p",
|
|
@@ -360,7 +360,7 @@ const nt = {
|
|
|
360
360
|
evening: "in the evening",
|
|
361
361
|
night: "at night"
|
|
362
362
|
}
|
|
363
|
-
},
|
|
363
|
+
}, rt = (e, t) => {
|
|
364
364
|
const n = Number(e), r = n % 100;
|
|
365
365
|
if (r > 20 || r < 10)
|
|
366
366
|
switch (r % 10) {
|
|
@@ -372,89 +372,89 @@ const nt = {
|
|
|
372
372
|
return n + "rd";
|
|
373
373
|
}
|
|
374
374
|
return n + "th";
|
|
375
|
-
},
|
|
376
|
-
ordinalNumber:
|
|
377
|
-
era:
|
|
378
|
-
values:
|
|
375
|
+
}, at = {
|
|
376
|
+
ordinalNumber: rt,
|
|
377
|
+
era: p({
|
|
378
|
+
values: Ue,
|
|
379
379
|
defaultWidth: "wide"
|
|
380
380
|
}),
|
|
381
|
-
quarter:
|
|
382
|
-
values:
|
|
381
|
+
quarter: p({
|
|
382
|
+
values: Je,
|
|
383
383
|
defaultWidth: "wide",
|
|
384
384
|
argumentCallback: (e) => e - 1
|
|
385
385
|
}),
|
|
386
|
-
month:
|
|
387
|
-
values:
|
|
386
|
+
month: p({
|
|
387
|
+
values: Ke,
|
|
388
388
|
defaultWidth: "wide"
|
|
389
389
|
}),
|
|
390
|
-
day:
|
|
391
|
-
values:
|
|
390
|
+
day: p({
|
|
391
|
+
values: et,
|
|
392
392
|
defaultWidth: "wide"
|
|
393
393
|
}),
|
|
394
|
-
dayPeriod:
|
|
395
|
-
values:
|
|
394
|
+
dayPeriod: p({
|
|
395
|
+
values: tt,
|
|
396
396
|
defaultWidth: "wide",
|
|
397
|
-
formattingValues:
|
|
397
|
+
formattingValues: nt,
|
|
398
398
|
defaultFormattingWidth: "wide"
|
|
399
399
|
})
|
|
400
400
|
};
|
|
401
401
|
function k(e) {
|
|
402
402
|
return (t, n = {}) => {
|
|
403
|
-
const r = n.width, a = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth],
|
|
404
|
-
if (!
|
|
403
|
+
const r = n.width, a = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], s = t.match(a);
|
|
404
|
+
if (!s)
|
|
405
405
|
return null;
|
|
406
|
-
const
|
|
406
|
+
const o = s[0], i = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], f = Array.isArray(i) ? ot(i, (h) => h.test(o)) : (
|
|
407
407
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
408
|
-
|
|
408
|
+
st(i, (h) => h.test(o))
|
|
409
409
|
);
|
|
410
|
-
let
|
|
411
|
-
|
|
410
|
+
let l;
|
|
411
|
+
l = e.valueCallback ? e.valueCallback(f) : f, l = n.valueCallback ? (
|
|
412
412
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
413
|
-
n.valueCallback(
|
|
414
|
-
) :
|
|
415
|
-
const
|
|
416
|
-
return { value:
|
|
413
|
+
n.valueCallback(l)
|
|
414
|
+
) : l;
|
|
415
|
+
const c = t.slice(o.length);
|
|
416
|
+
return { value: l, rest: c };
|
|
417
417
|
};
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function st(e, t) {
|
|
420
420
|
for (const n in e)
|
|
421
421
|
if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
|
|
422
422
|
return n;
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function ot(e, t) {
|
|
425
425
|
for (let n = 0; n < e.length; n++)
|
|
426
426
|
if (t(e[n]))
|
|
427
427
|
return n;
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function it(e) {
|
|
430
430
|
return (t, n = {}) => {
|
|
431
431
|
const r = t.match(e.matchPattern);
|
|
432
432
|
if (!r) return null;
|
|
433
|
-
const a = r[0],
|
|
434
|
-
if (!
|
|
435
|
-
let
|
|
436
|
-
|
|
437
|
-
const
|
|
438
|
-
return { value:
|
|
433
|
+
const a = r[0], s = t.match(e.parsePattern);
|
|
434
|
+
if (!s) return null;
|
|
435
|
+
let o = e.valueCallback ? e.valueCallback(s[0]) : s[0];
|
|
436
|
+
o = n.valueCallback ? n.valueCallback(o) : o;
|
|
437
|
+
const i = t.slice(a.length);
|
|
438
|
+
return { value: o, rest: i };
|
|
439
439
|
};
|
|
440
440
|
}
|
|
441
|
-
const
|
|
441
|
+
const ut = /^(\d+)(th|st|nd|rd)?/i, ct = /\d+/i, ft = {
|
|
442
442
|
narrow: /^(b|a)/i,
|
|
443
443
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
444
444
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
445
|
-
},
|
|
445
|
+
}, lt = {
|
|
446
446
|
any: [/^b/i, /^(a|c)/i]
|
|
447
|
-
},
|
|
447
|
+
}, mt = {
|
|
448
448
|
narrow: /^[1234]/i,
|
|
449
449
|
abbreviated: /^q[1234]/i,
|
|
450
450
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
451
|
-
},
|
|
451
|
+
}, dt = {
|
|
452
452
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
453
|
-
},
|
|
453
|
+
}, ht = {
|
|
454
454
|
narrow: /^[jfmasond]/i,
|
|
455
455
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
456
456
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
457
|
-
},
|
|
457
|
+
}, gt = {
|
|
458
458
|
narrow: [
|
|
459
459
|
/^j/i,
|
|
460
460
|
/^f/i,
|
|
@@ -483,18 +483,18 @@ const mt = /^(\d+)(th|st|nd|rd)?/i, ht = /\d+/i, gt = {
|
|
|
483
483
|
/^n/i,
|
|
484
484
|
/^d/i
|
|
485
485
|
]
|
|
486
|
-
},
|
|
486
|
+
}, wt = {
|
|
487
487
|
narrow: /^[smtwf]/i,
|
|
488
488
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
489
489
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
490
490
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
491
|
-
},
|
|
491
|
+
}, yt = {
|
|
492
492
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
493
493
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
494
|
-
},
|
|
494
|
+
}, bt = {
|
|
495
495
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
496
496
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
497
|
-
},
|
|
497
|
+
}, Mt = {
|
|
498
498
|
any: {
|
|
499
499
|
am: /^a/i,
|
|
500
500
|
pm: /^p/i,
|
|
@@ -506,98 +506,98 @@ const mt = /^(\d+)(th|st|nd|rd)?/i, ht = /\d+/i, gt = {
|
|
|
506
506
|
night: /night/i
|
|
507
507
|
}
|
|
508
508
|
}, vt = {
|
|
509
|
-
ordinalNumber:
|
|
510
|
-
matchPattern:
|
|
511
|
-
parsePattern:
|
|
509
|
+
ordinalNumber: it({
|
|
510
|
+
matchPattern: ut,
|
|
511
|
+
parsePattern: ct,
|
|
512
512
|
valueCallback: (e) => parseInt(e, 10)
|
|
513
513
|
}),
|
|
514
514
|
era: k({
|
|
515
|
-
matchPatterns:
|
|
515
|
+
matchPatterns: ft,
|
|
516
516
|
defaultMatchWidth: "wide",
|
|
517
|
-
parsePatterns:
|
|
517
|
+
parsePatterns: lt,
|
|
518
518
|
defaultParseWidth: "any"
|
|
519
519
|
}),
|
|
520
520
|
quarter: k({
|
|
521
|
-
matchPatterns:
|
|
521
|
+
matchPatterns: mt,
|
|
522
522
|
defaultMatchWidth: "wide",
|
|
523
|
-
parsePatterns:
|
|
523
|
+
parsePatterns: dt,
|
|
524
524
|
defaultParseWidth: "any",
|
|
525
525
|
valueCallback: (e) => e + 1
|
|
526
526
|
}),
|
|
527
527
|
month: k({
|
|
528
|
-
matchPatterns:
|
|
528
|
+
matchPatterns: ht,
|
|
529
529
|
defaultMatchWidth: "wide",
|
|
530
|
-
parsePatterns:
|
|
530
|
+
parsePatterns: gt,
|
|
531
531
|
defaultParseWidth: "any"
|
|
532
532
|
}),
|
|
533
533
|
day: k({
|
|
534
|
-
matchPatterns:
|
|
534
|
+
matchPatterns: wt,
|
|
535
535
|
defaultMatchWidth: "wide",
|
|
536
|
-
parsePatterns:
|
|
536
|
+
parsePatterns: yt,
|
|
537
537
|
defaultParseWidth: "any"
|
|
538
538
|
}),
|
|
539
539
|
dayPeriod: k({
|
|
540
|
-
matchPatterns:
|
|
540
|
+
matchPatterns: bt,
|
|
541
541
|
defaultMatchWidth: "any",
|
|
542
|
-
parsePatterns:
|
|
542
|
+
parsePatterns: Mt,
|
|
543
543
|
defaultParseWidth: "any"
|
|
544
544
|
})
|
|
545
|
-
},
|
|
545
|
+
}, se = {
|
|
546
546
|
code: "en-US",
|
|
547
|
-
formatDistance:
|
|
548
|
-
formatLong:
|
|
549
|
-
formatRelative:
|
|
550
|
-
localize:
|
|
547
|
+
formatDistance: He,
|
|
548
|
+
formatLong: Ve,
|
|
549
|
+
formatRelative: Ge,
|
|
550
|
+
localize: at,
|
|
551
551
|
match: vt,
|
|
552
552
|
options: {
|
|
553
553
|
weekStartsOn: 0,
|
|
554
554
|
firstWeekContainsDate: 1
|
|
555
555
|
}
|
|
556
556
|
};
|
|
557
|
-
function
|
|
558
|
-
const t =
|
|
559
|
-
return
|
|
560
|
-
}
|
|
561
|
-
function
|
|
562
|
-
const t =
|
|
563
|
-
return Math.round(n /
|
|
564
|
-
}
|
|
565
|
-
function
|
|
566
|
-
var
|
|
567
|
-
const n =
|
|
568
|
-
|
|
569
|
-
const
|
|
570
|
-
|
|
571
|
-
const
|
|
572
|
-
return n.getTime() >=
|
|
573
|
-
}
|
|
574
|
-
function
|
|
575
|
-
var
|
|
576
|
-
const n = P(), r = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((
|
|
577
|
-
return
|
|
578
|
-
}
|
|
579
|
-
function
|
|
580
|
-
const n =
|
|
581
|
-
return Math.round(r /
|
|
582
|
-
}
|
|
583
|
-
function
|
|
557
|
+
function Ot(e) {
|
|
558
|
+
const t = d(e);
|
|
559
|
+
return We(t, ze(t)) + 1;
|
|
560
|
+
}
|
|
561
|
+
function Tt(e) {
|
|
562
|
+
const t = d(e), n = +N(t) - +Ce(t);
|
|
563
|
+
return Math.round(n / ee) + 1;
|
|
564
|
+
}
|
|
565
|
+
function oe(e, t) {
|
|
566
|
+
var c, h, u, g;
|
|
567
|
+
const n = d(e), r = n.getFullYear(), a = P(), s = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((h = (c = t == null ? void 0 : t.locale) == null ? void 0 : c.options) == null ? void 0 : h.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((g = (u = a.locale) == null ? void 0 : u.options) == null ? void 0 : g.firstWeekContainsDate) ?? 1, o = O(e, 0);
|
|
568
|
+
o.setFullYear(r + 1, 0, s), o.setHours(0, 0, 0, 0);
|
|
569
|
+
const i = S(o, t), f = O(e, 0);
|
|
570
|
+
f.setFullYear(r, 0, s), f.setHours(0, 0, 0, 0);
|
|
571
|
+
const l = S(f, t);
|
|
572
|
+
return n.getTime() >= i.getTime() ? r + 1 : n.getTime() >= l.getTime() ? r : r - 1;
|
|
573
|
+
}
|
|
574
|
+
function xt(e, t) {
|
|
575
|
+
var i, f, l, c;
|
|
576
|
+
const n = P(), r = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((f = (i = t == null ? void 0 : t.locale) == null ? void 0 : i.options) == null ? void 0 : f.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((c = (l = n.locale) == null ? void 0 : l.options) == null ? void 0 : c.firstWeekContainsDate) ?? 1, a = oe(e, t), s = O(e, 0);
|
|
577
|
+
return s.setFullYear(a, 0, r), s.setHours(0, 0, 0, 0), S(s, t);
|
|
578
|
+
}
|
|
579
|
+
function Dt(e, t) {
|
|
580
|
+
const n = d(e), r = +S(n, t) - +xt(n, t);
|
|
581
|
+
return Math.round(r / ee) + 1;
|
|
582
|
+
}
|
|
583
|
+
function m(e, t) {
|
|
584
584
|
const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
|
|
585
585
|
return n + r;
|
|
586
586
|
}
|
|
587
|
-
const
|
|
587
|
+
const v = {
|
|
588
588
|
// Year
|
|
589
589
|
y(e, t) {
|
|
590
590
|
const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
|
|
591
|
-
return
|
|
591
|
+
return m(t === "yy" ? r % 100 : r, t.length);
|
|
592
592
|
},
|
|
593
593
|
// Month
|
|
594
594
|
M(e, t) {
|
|
595
595
|
const n = e.getMonth();
|
|
596
|
-
return t === "M" ? String(n + 1) :
|
|
596
|
+
return t === "M" ? String(n + 1) : m(n + 1, 2);
|
|
597
597
|
},
|
|
598
598
|
// Day of the month
|
|
599
599
|
d(e, t) {
|
|
600
|
-
return
|
|
600
|
+
return m(e.getDate(), t.length);
|
|
601
601
|
},
|
|
602
602
|
// AM or PM
|
|
603
603
|
a(e, t) {
|
|
@@ -617,35 +617,35 @@ const M = {
|
|
|
617
617
|
},
|
|
618
618
|
// Hour [1-12]
|
|
619
619
|
h(e, t) {
|
|
620
|
-
return
|
|
620
|
+
return m(e.getHours() % 12 || 12, t.length);
|
|
621
621
|
},
|
|
622
622
|
// Hour [0-23]
|
|
623
623
|
H(e, t) {
|
|
624
|
-
return
|
|
624
|
+
return m(e.getHours(), t.length);
|
|
625
625
|
},
|
|
626
626
|
// Minute
|
|
627
627
|
m(e, t) {
|
|
628
|
-
return
|
|
628
|
+
return m(e.getMinutes(), t.length);
|
|
629
629
|
},
|
|
630
630
|
// Second
|
|
631
631
|
s(e, t) {
|
|
632
|
-
return
|
|
632
|
+
return m(e.getSeconds(), t.length);
|
|
633
633
|
},
|
|
634
634
|
// Fraction of second
|
|
635
635
|
S(e, t) {
|
|
636
636
|
const n = t.length, r = e.getMilliseconds(), a = Math.trunc(
|
|
637
637
|
r * Math.pow(10, n - 3)
|
|
638
638
|
);
|
|
639
|
-
return
|
|
639
|
+
return m(a, t.length);
|
|
640
640
|
}
|
|
641
|
-
},
|
|
641
|
+
}, x = {
|
|
642
642
|
midnight: "midnight",
|
|
643
643
|
noon: "noon",
|
|
644
644
|
morning: "morning",
|
|
645
645
|
afternoon: "afternoon",
|
|
646
646
|
evening: "evening",
|
|
647
647
|
night: "night"
|
|
648
|
-
},
|
|
648
|
+
}, $ = {
|
|
649
649
|
// Era
|
|
650
650
|
G: function(e, t, n) {
|
|
651
651
|
const r = e.getFullYear() > 0 ? 1 : 0;
|
|
@@ -667,21 +667,21 @@ const M = {
|
|
|
667
667
|
const r = e.getFullYear(), a = r > 0 ? r : 1 - r;
|
|
668
668
|
return n.ordinalNumber(a, { unit: "year" });
|
|
669
669
|
}
|
|
670
|
-
return
|
|
670
|
+
return v.y(e, t);
|
|
671
671
|
},
|
|
672
672
|
// Local week-numbering year
|
|
673
673
|
Y: function(e, t, n, r) {
|
|
674
|
-
const a =
|
|
674
|
+
const a = oe(e, r), s = a > 0 ? a : 1 - a;
|
|
675
675
|
if (t === "YY") {
|
|
676
|
-
const
|
|
677
|
-
return
|
|
676
|
+
const o = s % 100;
|
|
677
|
+
return m(o, 2);
|
|
678
678
|
}
|
|
679
|
-
return t === "Yo" ? n.ordinalNumber(
|
|
679
|
+
return t === "Yo" ? n.ordinalNumber(s, { unit: "year" }) : m(s, t.length);
|
|
680
680
|
},
|
|
681
681
|
// ISO week-numbering year
|
|
682
682
|
R: function(e, t) {
|
|
683
|
-
const n =
|
|
684
|
-
return
|
|
683
|
+
const n = ae(e);
|
|
684
|
+
return m(n, t.length);
|
|
685
685
|
},
|
|
686
686
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
687
687
|
// The main difference between `y` and `u` localizers are B.C. years:
|
|
@@ -694,7 +694,7 @@ const M = {
|
|
|
694
694
|
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
695
695
|
u: function(e, t) {
|
|
696
696
|
const n = e.getFullYear();
|
|
697
|
-
return
|
|
697
|
+
return m(n, t.length);
|
|
698
698
|
},
|
|
699
699
|
// Quarter
|
|
700
700
|
Q: function(e, t, n) {
|
|
@@ -703,7 +703,7 @@ const M = {
|
|
|
703
703
|
case "Q":
|
|
704
704
|
return String(r);
|
|
705
705
|
case "QQ":
|
|
706
|
-
return
|
|
706
|
+
return m(r, 2);
|
|
707
707
|
case "Qo":
|
|
708
708
|
return n.ordinalNumber(r, { unit: "quarter" });
|
|
709
709
|
case "QQQ":
|
|
@@ -731,7 +731,7 @@ const M = {
|
|
|
731
731
|
case "q":
|
|
732
732
|
return String(r);
|
|
733
733
|
case "qq":
|
|
734
|
-
return
|
|
734
|
+
return m(r, 2);
|
|
735
735
|
case "qo":
|
|
736
736
|
return n.ordinalNumber(r, { unit: "quarter" });
|
|
737
737
|
case "qqq":
|
|
@@ -758,7 +758,7 @@ const M = {
|
|
|
758
758
|
switch (t) {
|
|
759
759
|
case "M":
|
|
760
760
|
case "MM":
|
|
761
|
-
return
|
|
761
|
+
return v.M(e, t);
|
|
762
762
|
case "Mo":
|
|
763
763
|
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
764
764
|
case "MMM":
|
|
@@ -783,7 +783,7 @@ const M = {
|
|
|
783
783
|
case "L":
|
|
784
784
|
return String(r + 1);
|
|
785
785
|
case "LL":
|
|
786
|
-
return
|
|
786
|
+
return m(r + 1, 2);
|
|
787
787
|
case "Lo":
|
|
788
788
|
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
789
789
|
case "LLL":
|
|
@@ -803,22 +803,22 @@ const M = {
|
|
|
803
803
|
},
|
|
804
804
|
// Local week of year
|
|
805
805
|
w: function(e, t, n, r) {
|
|
806
|
-
const a =
|
|
807
|
-
return t === "wo" ? n.ordinalNumber(a, { unit: "week" }) :
|
|
806
|
+
const a = Dt(e, r);
|
|
807
|
+
return t === "wo" ? n.ordinalNumber(a, { unit: "week" }) : m(a, t.length);
|
|
808
808
|
},
|
|
809
809
|
// ISO week of year
|
|
810
810
|
I: function(e, t, n) {
|
|
811
|
-
const r =
|
|
812
|
-
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) :
|
|
811
|
+
const r = Tt(e);
|
|
812
|
+
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : m(r, t.length);
|
|
813
813
|
},
|
|
814
814
|
// Day of the month
|
|
815
815
|
d: function(e, t, n) {
|
|
816
|
-
return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) :
|
|
816
|
+
return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : v.d(e, t);
|
|
817
817
|
},
|
|
818
818
|
// Day of year
|
|
819
819
|
D: function(e, t, n) {
|
|
820
|
-
const r =
|
|
821
|
-
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) :
|
|
820
|
+
const r = Ot(e);
|
|
821
|
+
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : m(r, t.length);
|
|
822
822
|
},
|
|
823
823
|
// Day of week
|
|
824
824
|
E: function(e, t, n) {
|
|
@@ -851,14 +851,14 @@ const M = {
|
|
|
851
851
|
},
|
|
852
852
|
// Local day of week
|
|
853
853
|
e: function(e, t, n, r) {
|
|
854
|
-
const a = e.getDay(),
|
|
854
|
+
const a = e.getDay(), s = (a - r.weekStartsOn + 8) % 7 || 7;
|
|
855
855
|
switch (t) {
|
|
856
856
|
case "e":
|
|
857
|
-
return String(
|
|
857
|
+
return String(s);
|
|
858
858
|
case "ee":
|
|
859
|
-
return
|
|
859
|
+
return m(s, 2);
|
|
860
860
|
case "eo":
|
|
861
|
-
return n.ordinalNumber(
|
|
861
|
+
return n.ordinalNumber(s, { unit: "day" });
|
|
862
862
|
case "eee":
|
|
863
863
|
return n.day(a, {
|
|
864
864
|
width: "abbreviated",
|
|
@@ -884,14 +884,14 @@ const M = {
|
|
|
884
884
|
},
|
|
885
885
|
// Stand-alone local day of week
|
|
886
886
|
c: function(e, t, n, r) {
|
|
887
|
-
const a = e.getDay(),
|
|
887
|
+
const a = e.getDay(), s = (a - r.weekStartsOn + 8) % 7 || 7;
|
|
888
888
|
switch (t) {
|
|
889
889
|
case "c":
|
|
890
|
-
return String(
|
|
890
|
+
return String(s);
|
|
891
891
|
case "cc":
|
|
892
|
-
return
|
|
892
|
+
return m(s, t.length);
|
|
893
893
|
case "co":
|
|
894
|
-
return n.ordinalNumber(
|
|
894
|
+
return n.ordinalNumber(s, { unit: "day" });
|
|
895
895
|
case "ccc":
|
|
896
896
|
return n.day(a, {
|
|
897
897
|
width: "abbreviated",
|
|
@@ -922,7 +922,7 @@ const M = {
|
|
|
922
922
|
case "i":
|
|
923
923
|
return String(a);
|
|
924
924
|
case "ii":
|
|
925
|
-
return
|
|
925
|
+
return m(a, t.length);
|
|
926
926
|
case "io":
|
|
927
927
|
return n.ordinalNumber(a, { unit: "day" });
|
|
928
928
|
case "iii":
|
|
@@ -980,7 +980,7 @@ const M = {
|
|
|
980
980
|
b: function(e, t, n) {
|
|
981
981
|
const r = e.getHours();
|
|
982
982
|
let a;
|
|
983
|
-
switch (r === 12 ? a =
|
|
983
|
+
switch (r === 12 ? a = x.noon : r === 0 ? a = x.midnight : a = r / 12 >= 1 ? "pm" : "am", t) {
|
|
984
984
|
case "b":
|
|
985
985
|
case "bb":
|
|
986
986
|
return n.dayPeriod(a, {
|
|
@@ -1009,7 +1009,7 @@ const M = {
|
|
|
1009
1009
|
B: function(e, t, n) {
|
|
1010
1010
|
const r = e.getHours();
|
|
1011
1011
|
let a;
|
|
1012
|
-
switch (r >= 17 ? a =
|
|
1012
|
+
switch (r >= 17 ? a = x.evening : r >= 12 ? a = x.afternoon : r >= 4 ? a = x.morning : a = x.night, t) {
|
|
1013
1013
|
case "B":
|
|
1014
1014
|
case "BB":
|
|
1015
1015
|
case "BBB":
|
|
@@ -1036,33 +1036,33 @@ const M = {
|
|
|
1036
1036
|
let r = e.getHours() % 12;
|
|
1037
1037
|
return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
|
|
1038
1038
|
}
|
|
1039
|
-
return
|
|
1039
|
+
return v.h(e, t);
|
|
1040
1040
|
},
|
|
1041
1041
|
// Hour [0-23]
|
|
1042
1042
|
H: function(e, t, n) {
|
|
1043
|
-
return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) :
|
|
1043
|
+
return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : v.H(e, t);
|
|
1044
1044
|
},
|
|
1045
1045
|
// Hour [0-11]
|
|
1046
1046
|
K: function(e, t, n) {
|
|
1047
1047
|
const r = e.getHours() % 12;
|
|
1048
|
-
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) :
|
|
1048
|
+
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : m(r, t.length);
|
|
1049
1049
|
},
|
|
1050
1050
|
// Hour [1-24]
|
|
1051
1051
|
k: function(e, t, n) {
|
|
1052
1052
|
let r = e.getHours();
|
|
1053
|
-
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) :
|
|
1053
|
+
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : m(r, t.length);
|
|
1054
1054
|
},
|
|
1055
1055
|
// Minute
|
|
1056
1056
|
m: function(e, t, n) {
|
|
1057
|
-
return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) :
|
|
1057
|
+
return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : v.m(e, t);
|
|
1058
1058
|
},
|
|
1059
1059
|
// Second
|
|
1060
1060
|
s: function(e, t, n) {
|
|
1061
|
-
return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) :
|
|
1061
|
+
return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : v.s(e, t);
|
|
1062
1062
|
},
|
|
1063
1063
|
// Fraction of second
|
|
1064
1064
|
S: function(e, t) {
|
|
1065
|
-
return
|
|
1065
|
+
return v.S(e, t);
|
|
1066
1066
|
},
|
|
1067
1067
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1068
1068
|
X: function(e, t, n) {
|
|
@@ -1071,14 +1071,14 @@ const M = {
|
|
|
1071
1071
|
return "Z";
|
|
1072
1072
|
switch (t) {
|
|
1073
1073
|
case "X":
|
|
1074
|
-
return
|
|
1074
|
+
return V(r);
|
|
1075
1075
|
case "XXXX":
|
|
1076
1076
|
case "XX":
|
|
1077
|
-
return
|
|
1077
|
+
return T(r);
|
|
1078
1078
|
case "XXXXX":
|
|
1079
1079
|
case "XXX":
|
|
1080
1080
|
default:
|
|
1081
|
-
return
|
|
1081
|
+
return T(r, ":");
|
|
1082
1082
|
}
|
|
1083
1083
|
},
|
|
1084
1084
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
@@ -1086,14 +1086,14 @@ const M = {
|
|
|
1086
1086
|
const r = e.getTimezoneOffset();
|
|
1087
1087
|
switch (t) {
|
|
1088
1088
|
case "x":
|
|
1089
|
-
return
|
|
1089
|
+
return V(r);
|
|
1090
1090
|
case "xxxx":
|
|
1091
1091
|
case "xx":
|
|
1092
|
-
return
|
|
1092
|
+
return T(r);
|
|
1093
1093
|
case "xxxxx":
|
|
1094
1094
|
case "xxx":
|
|
1095
1095
|
default:
|
|
1096
|
-
return
|
|
1096
|
+
return T(r, ":");
|
|
1097
1097
|
}
|
|
1098
1098
|
},
|
|
1099
1099
|
// Timezone (GMT)
|
|
@@ -1103,10 +1103,10 @@ const M = {
|
|
|
1103
1103
|
case "O":
|
|
1104
1104
|
case "OO":
|
|
1105
1105
|
case "OOO":
|
|
1106
|
-
return "GMT" +
|
|
1106
|
+
return "GMT" + Z(r, ":");
|
|
1107
1107
|
case "OOOO":
|
|
1108
1108
|
default:
|
|
1109
|
-
return "GMT" +
|
|
1109
|
+
return "GMT" + T(r, ":");
|
|
1110
1110
|
}
|
|
1111
1111
|
},
|
|
1112
1112
|
// Timezone (specific non-location)
|
|
@@ -1116,35 +1116,35 @@ const M = {
|
|
|
1116
1116
|
case "z":
|
|
1117
1117
|
case "zz":
|
|
1118
1118
|
case "zzz":
|
|
1119
|
-
return "GMT" +
|
|
1119
|
+
return "GMT" + Z(r, ":");
|
|
1120
1120
|
case "zzzz":
|
|
1121
1121
|
default:
|
|
1122
|
-
return "GMT" +
|
|
1122
|
+
return "GMT" + T(r, ":");
|
|
1123
1123
|
}
|
|
1124
1124
|
},
|
|
1125
1125
|
// Seconds timestamp
|
|
1126
1126
|
t: function(e, t, n) {
|
|
1127
1127
|
const r = Math.trunc(e.getTime() / 1e3);
|
|
1128
|
-
return
|
|
1128
|
+
return m(r, t.length);
|
|
1129
1129
|
},
|
|
1130
1130
|
// Milliseconds timestamp
|
|
1131
1131
|
T: function(e, t, n) {
|
|
1132
1132
|
const r = e.getTime();
|
|
1133
|
-
return
|
|
1133
|
+
return m(r, t.length);
|
|
1134
1134
|
}
|
|
1135
1135
|
};
|
|
1136
|
-
function
|
|
1137
|
-
const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.trunc(r / 60),
|
|
1138
|
-
return
|
|
1136
|
+
function Z(e, t = "") {
|
|
1137
|
+
const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.trunc(r / 60), s = r % 60;
|
|
1138
|
+
return s === 0 ? n + String(a) : n + String(a) + t + m(s, 2);
|
|
1139
1139
|
}
|
|
1140
|
-
function
|
|
1141
|
-
return e % 60 === 0 ? (e > 0 ? "-" : "+") +
|
|
1140
|
+
function V(e, t) {
|
|
1141
|
+
return e % 60 === 0 ? (e > 0 ? "-" : "+") + m(Math.abs(e) / 60, 2) : T(e, t);
|
|
1142
1142
|
}
|
|
1143
|
-
function
|
|
1144
|
-
const n = e > 0 ? "-" : "+", r = Math.abs(e), a =
|
|
1145
|
-
return n + a + t +
|
|
1143
|
+
function T(e, t = "") {
|
|
1144
|
+
const n = e > 0 ? "-" : "+", r = Math.abs(e), a = m(Math.trunc(r / 60), 2), s = m(r % 60, 2);
|
|
1145
|
+
return n + a + t + s;
|
|
1146
1146
|
}
|
|
1147
|
-
const
|
|
1147
|
+
const Q = (e, t) => {
|
|
1148
1148
|
switch (e) {
|
|
1149
1149
|
case "P":
|
|
1150
1150
|
return t.date({ width: "short" });
|
|
@@ -1156,7 +1156,7 @@ const J = (e, t) => {
|
|
|
1156
1156
|
default:
|
|
1157
1157
|
return t.date({ width: "full" });
|
|
1158
1158
|
}
|
|
1159
|
-
},
|
|
1159
|
+
}, ie = (e, t) => {
|
|
1160
1160
|
switch (e) {
|
|
1161
1161
|
case "p":
|
|
1162
1162
|
return t.time({ width: "short" });
|
|
@@ -1168,155 +1168,155 @@ const J = (e, t) => {
|
|
|
1168
1168
|
default:
|
|
1169
1169
|
return t.time({ width: "full" });
|
|
1170
1170
|
}
|
|
1171
|
-
},
|
|
1171
|
+
}, Pt = (e, t) => {
|
|
1172
1172
|
const n = e.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
|
|
1173
1173
|
if (!a)
|
|
1174
|
-
return
|
|
1175
|
-
let
|
|
1174
|
+
return Q(e, t);
|
|
1175
|
+
let s;
|
|
1176
1176
|
switch (r) {
|
|
1177
1177
|
case "P":
|
|
1178
|
-
|
|
1178
|
+
s = t.dateTime({ width: "short" });
|
|
1179
1179
|
break;
|
|
1180
1180
|
case "PP":
|
|
1181
|
-
|
|
1181
|
+
s = t.dateTime({ width: "medium" });
|
|
1182
1182
|
break;
|
|
1183
1183
|
case "PPP":
|
|
1184
|
-
|
|
1184
|
+
s = t.dateTime({ width: "long" });
|
|
1185
1185
|
break;
|
|
1186
1186
|
case "PPPP":
|
|
1187
1187
|
default:
|
|
1188
|
-
|
|
1188
|
+
s = t.dateTime({ width: "full" });
|
|
1189
1189
|
break;
|
|
1190
1190
|
}
|
|
1191
|
-
return
|
|
1192
|
-
},
|
|
1193
|
-
p:
|
|
1194
|
-
P:
|
|
1195
|
-
},
|
|
1196
|
-
function
|
|
1197
|
-
return
|
|
1198
|
-
}
|
|
1199
|
-
function
|
|
1200
|
-
return
|
|
1201
|
-
}
|
|
1202
|
-
function
|
|
1203
|
-
const r =
|
|
1204
|
-
if (console.warn(r),
|
|
1205
|
-
}
|
|
1206
|
-
function
|
|
1191
|
+
return s.replace("{{date}}", Q(r, t)).replace("{{time}}", ie(a, t));
|
|
1192
|
+
}, pt = {
|
|
1193
|
+
p: ie,
|
|
1194
|
+
P: Pt
|
|
1195
|
+
}, kt = /^D+$/, St = /^Y+$/, Wt = ["D", "DD", "YY", "YYYY"];
|
|
1196
|
+
function Ct(e) {
|
|
1197
|
+
return kt.test(e);
|
|
1198
|
+
}
|
|
1199
|
+
function Nt(e) {
|
|
1200
|
+
return St.test(e);
|
|
1201
|
+
}
|
|
1202
|
+
function Yt(e, t, n) {
|
|
1203
|
+
const r = Et(e, t, n);
|
|
1204
|
+
if (console.warn(r), Wt.includes(e)) throw new RangeError(r);
|
|
1205
|
+
}
|
|
1206
|
+
function Et(e, t, n) {
|
|
1207
1207
|
const r = e[0] === "Y" ? "years" : "days of the month";
|
|
1208
1208
|
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`;
|
|
1209
1209
|
}
|
|
1210
|
-
const
|
|
1211
|
-
function
|
|
1212
|
-
var
|
|
1213
|
-
const r = P(), a = (n == null ? void 0 : n.locale) ?? r.locale ??
|
|
1214
|
-
if (!
|
|
1210
|
+
const Ft = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Lt = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Xt = /^'([^]*?)'?$/, It = /''/g, _t = /[a-zA-Z]/;
|
|
1211
|
+
function I(e, t, n) {
|
|
1212
|
+
var c, h, u, g, w, M, A, R;
|
|
1213
|
+
const r = P(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? se, s = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((h = (c = n == null ? void 0 : n.locale) == null ? void 0 : c.options) == null ? void 0 : h.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((g = (u = r.locale) == null ? void 0 : u.options) == null ? void 0 : g.firstWeekContainsDate) ?? 1, o = (n == null ? void 0 : n.weekStartsOn) ?? ((M = (w = n == null ? void 0 : n.locale) == null ? void 0 : w.options) == null ? void 0 : M.weekStartsOn) ?? r.weekStartsOn ?? ((R = (A = r.locale) == null ? void 0 : A.options) == null ? void 0 : R.weekStartsOn) ?? 0, i = d(e);
|
|
1214
|
+
if (!Ee(i))
|
|
1215
1215
|
throw new RangeError("Invalid time value");
|
|
1216
|
-
let
|
|
1217
|
-
const
|
|
1218
|
-
if (
|
|
1219
|
-
const
|
|
1220
|
-
return
|
|
1216
|
+
let f = t.match(Lt).map((b) => {
|
|
1217
|
+
const y = b[0];
|
|
1218
|
+
if (y === "p" || y === "P") {
|
|
1219
|
+
const F = pt[y];
|
|
1220
|
+
return F(b, a.formatLong);
|
|
1221
1221
|
}
|
|
1222
1222
|
return b;
|
|
1223
|
-
}).join("").match(
|
|
1223
|
+
}).join("").match(Ft).map((b) => {
|
|
1224
1224
|
if (b === "''")
|
|
1225
1225
|
return { isToken: !1, value: "'" };
|
|
1226
|
-
const
|
|
1227
|
-
if (
|
|
1228
|
-
return { isToken: !1, value:
|
|
1229
|
-
if (
|
|
1226
|
+
const y = b[0];
|
|
1227
|
+
if (y === "'")
|
|
1228
|
+
return { isToken: !1, value: qt(b) };
|
|
1229
|
+
if ($[y])
|
|
1230
1230
|
return { isToken: !0, value: b };
|
|
1231
|
-
if (
|
|
1231
|
+
if (y.match(_t))
|
|
1232
1232
|
throw new RangeError(
|
|
1233
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
1233
|
+
"Format string contains an unescaped latin alphabet character `" + y + "`"
|
|
1234
1234
|
);
|
|
1235
1235
|
return { isToken: !1, value: b };
|
|
1236
1236
|
});
|
|
1237
|
-
a.localize.preprocessor && (
|
|
1238
|
-
const
|
|
1239
|
-
firstWeekContainsDate:
|
|
1240
|
-
weekStartsOn:
|
|
1237
|
+
a.localize.preprocessor && (f = a.localize.preprocessor(i, f));
|
|
1238
|
+
const l = {
|
|
1239
|
+
firstWeekContainsDate: s,
|
|
1240
|
+
weekStartsOn: o,
|
|
1241
1241
|
locale: a
|
|
1242
1242
|
};
|
|
1243
|
-
return
|
|
1243
|
+
return f.map((b) => {
|
|
1244
1244
|
if (!b.isToken) return b.value;
|
|
1245
|
-
const
|
|
1246
|
-
(!(n != null && n.useAdditionalWeekYearTokens) &&
|
|
1247
|
-
const
|
|
1248
|
-
return
|
|
1245
|
+
const y = b.value;
|
|
1246
|
+
(!(n != null && n.useAdditionalWeekYearTokens) && Nt(y) || !(n != null && n.useAdditionalDayOfYearTokens) && Ct(y)) && Yt(y, t, String(e));
|
|
1247
|
+
const F = $[y[0]];
|
|
1248
|
+
return F(i, y, a.localize, l);
|
|
1249
1249
|
}).join("");
|
|
1250
1250
|
}
|
|
1251
|
-
function
|
|
1252
|
-
const t = e.match(
|
|
1253
|
-
return t ? t[1].replace(
|
|
1251
|
+
function qt(e) {
|
|
1252
|
+
const t = e.match(Xt);
|
|
1253
|
+
return t ? t[1].replace(It, "'") : e;
|
|
1254
1254
|
}
|
|
1255
|
-
function
|
|
1256
|
-
const r = P(), a = (n == null ? void 0 : n.locale) ?? r.locale ??
|
|
1257
|
-
if (isNaN(
|
|
1255
|
+
function At(e, t, n) {
|
|
1256
|
+
const r = P(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? se, s = 2520, o = C(e, t);
|
|
1257
|
+
if (isNaN(o))
|
|
1258
1258
|
throw new RangeError("Invalid time value");
|
|
1259
|
-
const
|
|
1259
|
+
const i = Object.assign({}, n, {
|
|
1260
1260
|
addSuffix: n == null ? void 0 : n.addSuffix,
|
|
1261
|
-
comparison:
|
|
1261
|
+
comparison: o
|
|
1262
1262
|
});
|
|
1263
|
-
let
|
|
1264
|
-
|
|
1265
|
-
const
|
|
1266
|
-
let
|
|
1267
|
-
if (
|
|
1268
|
-
return n != null && n.includeSeconds ?
|
|
1269
|
-
if (
|
|
1270
|
-
return a.formatDistance("xMinutes",
|
|
1271
|
-
if (
|
|
1272
|
-
return a.formatDistance("aboutXHours", 1,
|
|
1273
|
-
if (
|
|
1274
|
-
const
|
|
1275
|
-
return a.formatDistance("aboutXHours",
|
|
1263
|
+
let f, l;
|
|
1264
|
+
o > 0 ? (f = d(t), l = d(e)) : (f = d(e), l = d(t));
|
|
1265
|
+
const c = Re(l, f), h = (Y(l) - Y(f)) / 1e3, u = Math.round((c - h) / 60);
|
|
1266
|
+
let g;
|
|
1267
|
+
if (u < 2)
|
|
1268
|
+
return n != null && n.includeSeconds ? c < 5 ? a.formatDistance("lessThanXSeconds", 5, i) : c < 10 ? a.formatDistance("lessThanXSeconds", 10, i) : c < 20 ? a.formatDistance("lessThanXSeconds", 20, i) : c < 40 ? a.formatDistance("halfAMinute", 0, i) : c < 60 ? a.formatDistance("lessThanXMinutes", 1, i) : a.formatDistance("xMinutes", 1, i) : u === 0 ? a.formatDistance("lessThanXMinutes", 1, i) : a.formatDistance("xMinutes", u, i);
|
|
1269
|
+
if (u < 45)
|
|
1270
|
+
return a.formatDistance("xMinutes", u, i);
|
|
1271
|
+
if (u < 90)
|
|
1272
|
+
return a.formatDistance("aboutXHours", 1, i);
|
|
1273
|
+
if (u < H) {
|
|
1274
|
+
const w = Math.round(u / 60);
|
|
1275
|
+
return a.formatDistance("aboutXHours", w, i);
|
|
1276
1276
|
} else {
|
|
1277
|
-
if (
|
|
1278
|
-
return a.formatDistance("xDays", 1,
|
|
1279
|
-
if (
|
|
1280
|
-
const
|
|
1281
|
-
return a.formatDistance("xDays",
|
|
1282
|
-
} else if (
|
|
1283
|
-
return
|
|
1277
|
+
if (u < s)
|
|
1278
|
+
return a.formatDistance("xDays", 1, i);
|
|
1279
|
+
if (u < W) {
|
|
1280
|
+
const w = Math.round(u / H);
|
|
1281
|
+
return a.formatDistance("xDays", w, i);
|
|
1282
|
+
} else if (u < W * 2)
|
|
1283
|
+
return g = Math.round(u / W), a.formatDistance("aboutXMonths", g, i);
|
|
1284
1284
|
}
|
|
1285
|
-
if (
|
|
1286
|
-
const
|
|
1287
|
-
return a.formatDistance("xMonths",
|
|
1285
|
+
if (g = Ae(l, f), g < 12) {
|
|
1286
|
+
const w = Math.round(u / W);
|
|
1287
|
+
return a.formatDistance("xMonths", w, i);
|
|
1288
1288
|
} else {
|
|
1289
|
-
const
|
|
1290
|
-
return
|
|
1289
|
+
const w = g % 12, M = Math.trunc(g / 12);
|
|
1290
|
+
return w < 3 ? a.formatDistance("aboutXYears", M, i) : w < 9 ? a.formatDistance("overXYears", M, i) : a.formatDistance("almostXYears", M + 1, i);
|
|
1291
1291
|
}
|
|
1292
1292
|
}
|
|
1293
|
-
function
|
|
1294
|
-
return
|
|
1293
|
+
function Rt(e, t) {
|
|
1294
|
+
return At(e, Ne(e), t);
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1296
|
+
function zt() {
|
|
1297
1297
|
return Object.assign({}, P());
|
|
1298
1298
|
}
|
|
1299
|
-
function
|
|
1300
|
-
const r =
|
|
1301
|
-
return "formatToParts" in a ?
|
|
1299
|
+
function G(e, t, n) {
|
|
1300
|
+
const r = zt(), a = Bt(e, n.timeZone, n.locale ?? r.locale);
|
|
1301
|
+
return "formatToParts" in a ? jt(a, t) : Ht(a, t);
|
|
1302
1302
|
}
|
|
1303
|
-
function
|
|
1303
|
+
function jt(e, t) {
|
|
1304
1304
|
const n = e.formatToParts(t);
|
|
1305
1305
|
for (let r = n.length - 1; r >= 0; --r)
|
|
1306
1306
|
if (n[r].type === "timeZoneName")
|
|
1307
1307
|
return n[r].value;
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1309
|
+
function Ht(e, t) {
|
|
1310
1310
|
const n = e.format(t).replace(/\u200E/g, ""), r = / [\w-+ ]+$/.exec(n);
|
|
1311
1311
|
return r ? r[0].substr(1) : "";
|
|
1312
1312
|
}
|
|
1313
|
-
function
|
|
1313
|
+
function Bt(e, t, n) {
|
|
1314
1314
|
return new Intl.DateTimeFormat(n ? [n.code, "en-US"] : void 0, {
|
|
1315
1315
|
timeZone: t,
|
|
1316
1316
|
timeZoneName: e
|
|
1317
1317
|
});
|
|
1318
1318
|
}
|
|
1319
|
-
const
|
|
1319
|
+
const $t = 60 * 1e3, Zt = {
|
|
1320
1320
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1321
1321
|
X: function(e, t, n) {
|
|
1322
1322
|
const r = X(n.timeZone, e);
|
|
@@ -1324,14 +1324,14 @@ const Qt = 60 * 1e3, Jt = {
|
|
|
1324
1324
|
return "Z";
|
|
1325
1325
|
switch (t) {
|
|
1326
1326
|
case "X":
|
|
1327
|
-
return
|
|
1327
|
+
return U(r);
|
|
1328
1328
|
case "XXXX":
|
|
1329
1329
|
case "XX":
|
|
1330
|
-
return
|
|
1330
|
+
return D(r);
|
|
1331
1331
|
case "XXXXX":
|
|
1332
1332
|
case "XXX":
|
|
1333
1333
|
default:
|
|
1334
|
-
return
|
|
1334
|
+
return D(r, ":");
|
|
1335
1335
|
}
|
|
1336
1336
|
},
|
|
1337
1337
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
@@ -1339,14 +1339,14 @@ const Qt = 60 * 1e3, Jt = {
|
|
|
1339
1339
|
const r = X(n.timeZone, e);
|
|
1340
1340
|
switch (t) {
|
|
1341
1341
|
case "x":
|
|
1342
|
-
return
|
|
1342
|
+
return U(r);
|
|
1343
1343
|
case "xxxx":
|
|
1344
1344
|
case "xx":
|
|
1345
|
-
return
|
|
1345
|
+
return D(r);
|
|
1346
1346
|
case "xxxxx":
|
|
1347
1347
|
case "xxx":
|
|
1348
1348
|
default:
|
|
1349
|
-
return
|
|
1349
|
+
return D(r, ":");
|
|
1350
1350
|
}
|
|
1351
1351
|
},
|
|
1352
1352
|
// Timezone (GMT)
|
|
@@ -1356,10 +1356,10 @@ const Qt = 60 * 1e3, Jt = {
|
|
|
1356
1356
|
case "O":
|
|
1357
1357
|
case "OO":
|
|
1358
1358
|
case "OOO":
|
|
1359
|
-
return "GMT" +
|
|
1359
|
+
return "GMT" + Vt(r, ":");
|
|
1360
1360
|
case "OOOO":
|
|
1361
1361
|
default:
|
|
1362
|
-
return "GMT" +
|
|
1362
|
+
return "GMT" + D(r, ":");
|
|
1363
1363
|
}
|
|
1364
1364
|
},
|
|
1365
1365
|
// Timezone (specific non-location)
|
|
@@ -1368,79 +1368,79 @@ const Qt = 60 * 1e3, Jt = {
|
|
|
1368
1368
|
case "z":
|
|
1369
1369
|
case "zz":
|
|
1370
1370
|
case "zzz":
|
|
1371
|
-
return
|
|
1371
|
+
return G("short", e, n);
|
|
1372
1372
|
case "zzzz":
|
|
1373
1373
|
default:
|
|
1374
|
-
return
|
|
1374
|
+
return G("long", e, n);
|
|
1375
1375
|
}
|
|
1376
1376
|
}
|
|
1377
1377
|
};
|
|
1378
1378
|
function X(e, t) {
|
|
1379
|
-
const n = e ?
|
|
1379
|
+
const n = e ? te(e, t, !0) / $t : (t == null ? void 0 : t.getTimezoneOffset()) ?? 0;
|
|
1380
1380
|
if (Number.isNaN(n))
|
|
1381
1381
|
throw new RangeError("Invalid time zone specified: " + e);
|
|
1382
1382
|
return n;
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1384
|
+
function E(e, t) {
|
|
1385
1385
|
const n = e < 0 ? "-" : "";
|
|
1386
1386
|
let r = Math.abs(e).toString();
|
|
1387
1387
|
for (; r.length < t; )
|
|
1388
1388
|
r = "0" + r;
|
|
1389
1389
|
return n + r;
|
|
1390
1390
|
}
|
|
1391
|
-
function
|
|
1392
|
-
const n = e > 0 ? "-" : "+", r = Math.abs(e), a =
|
|
1393
|
-
return n + a + t +
|
|
1391
|
+
function D(e, t = "") {
|
|
1392
|
+
const n = e > 0 ? "-" : "+", r = Math.abs(e), a = E(Math.floor(r / 60), 2), s = E(Math.floor(r % 60), 2);
|
|
1393
|
+
return n + a + t + s;
|
|
1394
1394
|
}
|
|
1395
|
-
function
|
|
1396
|
-
return e % 60 === 0 ? (e > 0 ? "-" : "+") +
|
|
1395
|
+
function U(e, t) {
|
|
1396
|
+
return e % 60 === 0 ? (e > 0 ? "-" : "+") + E(Math.abs(e) / 60, 2) : D(e, t);
|
|
1397
1397
|
}
|
|
1398
|
-
function
|
|
1399
|
-
const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.floor(r / 60),
|
|
1400
|
-
return
|
|
1398
|
+
function Vt(e, t = "") {
|
|
1399
|
+
const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.floor(r / 60), s = r % 60;
|
|
1400
|
+
return s === 0 ? n + String(a) : n + String(a) + t + E(s, 2);
|
|
1401
1401
|
}
|
|
1402
|
-
const
|
|
1403
|
-
function
|
|
1402
|
+
const Qt = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
|
|
1403
|
+
function Gt(e, t, n = {}) {
|
|
1404
1404
|
t = String(t);
|
|
1405
|
-
const r = t.match(
|
|
1405
|
+
const r = t.match(Qt);
|
|
1406
1406
|
if (r) {
|
|
1407
|
-
const a =
|
|
1408
|
-
t = r.reduce(function(
|
|
1409
|
-
if (
|
|
1410
|
-
return
|
|
1411
|
-
const
|
|
1412
|
-
return
|
|
1407
|
+
const a = ne(n.originalDate || e, n);
|
|
1408
|
+
t = r.reduce(function(s, o) {
|
|
1409
|
+
if (o[0] === "'")
|
|
1410
|
+
return s;
|
|
1411
|
+
const i = s.indexOf(o), f = s[i - 1] === "'", l = s.replace(o, "'" + Zt[o[0]](a, o, n) + "'");
|
|
1412
|
+
return f ? l.substring(0, i - 1) + l.substring(i + 1) : l;
|
|
1413
1413
|
}, t);
|
|
1414
1414
|
}
|
|
1415
|
-
return
|
|
1415
|
+
return I(e, t, n);
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1418
|
-
e =
|
|
1419
|
-
const r =
|
|
1420
|
-
return
|
|
1417
|
+
function Ut(e, t, n) {
|
|
1418
|
+
e = ne(e, n);
|
|
1419
|
+
const r = te(t, e, !0), a = new Date(e.getTime() - r), s = /* @__PURE__ */ new Date(0);
|
|
1420
|
+
return s.setFullYear(a.getUTCFullYear(), a.getUTCMonth(), a.getUTCDate()), s.setHours(a.getUTCHours(), a.getUTCMinutes(), a.getUTCSeconds(), a.getUTCMilliseconds()), s;
|
|
1421
1421
|
}
|
|
1422
|
-
function
|
|
1422
|
+
function ue(e, t, n, r) {
|
|
1423
1423
|
return r = {
|
|
1424
1424
|
...r,
|
|
1425
1425
|
timeZone: t,
|
|
1426
1426
|
originalDate: e
|
|
1427
|
-
},
|
|
1427
|
+
}, Gt(Ut(e, t, { timeZone: r.timeZone }), n, r);
|
|
1428
1428
|
}
|
|
1429
|
-
function
|
|
1429
|
+
function xn(e, t) {
|
|
1430
1430
|
return e && e !== "auto" ? e : t;
|
|
1431
1431
|
}
|
|
1432
|
-
function
|
|
1432
|
+
function Dn(e, t = /* @__PURE__ */ new Date()) {
|
|
1433
1433
|
try {
|
|
1434
1434
|
const n = {
|
|
1435
1435
|
timeZone: e,
|
|
1436
1436
|
timeZoneName: "short"
|
|
1437
|
-
}, a = new Intl.DateTimeFormat("en-US", n).formatToParts(t).find((
|
|
1437
|
+
}, a = new Intl.DateTimeFormat("en-US", n).formatToParts(t).find((s) => s.type === "timeZoneName");
|
|
1438
1438
|
return (a == null ? void 0 : a.value) || e;
|
|
1439
1439
|
} catch {
|
|
1440
1440
|
return e;
|
|
1441
1441
|
}
|
|
1442
1442
|
}
|
|
1443
|
-
function
|
|
1443
|
+
function Pn(e) {
|
|
1444
1444
|
try {
|
|
1445
1445
|
const t = {
|
|
1446
1446
|
timeZone: e,
|
|
@@ -1453,7 +1453,7 @@ function Sn(e) {
|
|
|
1453
1453
|
return e;
|
|
1454
1454
|
}
|
|
1455
1455
|
}
|
|
1456
|
-
function
|
|
1456
|
+
function _(e, t = "auto") {
|
|
1457
1457
|
if (!e)
|
|
1458
1458
|
return /* @__PURE__ */ new Date(NaN);
|
|
1459
1459
|
const n = e.endsWith("Z"), r = /[+-]\d{2}:?\d{2}$/.test(e), a = /\([A-Z]{3,4}\)$/.test(e);
|
|
@@ -1461,77 +1461,77 @@ function R(e, t = "auto") {
|
|
|
1461
1461
|
return n || r || a ? new Date(e) : /* @__PURE__ */ new Date(e + "Z");
|
|
1462
1462
|
if (t === "local") {
|
|
1463
1463
|
if (n || r) {
|
|
1464
|
-
const
|
|
1465
|
-
return new Date(
|
|
1464
|
+
const s = e.replace(/Z$/, "").replace(/[+-]\d{2}:?\d{2}$/, "");
|
|
1465
|
+
return new Date(s);
|
|
1466
1466
|
}
|
|
1467
1467
|
return new Date(e);
|
|
1468
|
-
} else return t === "UTC" ? n ? new Date(e) : r ? new Date(e) : /* @__PURE__ */ new Date(e + "Z") : n || r || a ? new Date(e) :
|
|
1468
|
+
} else return t === "UTC" ? n ? new Date(e) : r ? new Date(e) : /* @__PURE__ */ new Date(e + "Z") : n || r || a ? new Date(e) : we(e, t);
|
|
1469
1469
|
}
|
|
1470
|
-
const
|
|
1470
|
+
const Jt = "MM/dd/yyyy", Kt = (e, t, n, r = "auto") => {
|
|
1471
1471
|
if (!e)
|
|
1472
1472
|
return "";
|
|
1473
1473
|
try {
|
|
1474
|
-
const a =
|
|
1474
|
+
const a = _(e, r);
|
|
1475
1475
|
if (isNaN(a.getTime()))
|
|
1476
1476
|
return e;
|
|
1477
|
-
const
|
|
1478
|
-
return n && n !== "auto" ?
|
|
1477
|
+
const o = (t && t.trim() ? t : Jt).replace(/LLLL/g, "MMMM").replace(/LLL/g, "MMM");
|
|
1478
|
+
return n && n !== "auto" ? ue(a, n, o) : I(a, o);
|
|
1479
1479
|
} catch (a) {
|
|
1480
1480
|
return console.error("Date formatting error:", a), e;
|
|
1481
1481
|
}
|
|
1482
1482
|
};
|
|
1483
|
-
function
|
|
1483
|
+
function pn(e, t, n = "auto") {
|
|
1484
1484
|
if (e)
|
|
1485
1485
|
try {
|
|
1486
|
-
const r =
|
|
1486
|
+
const r = _(e, n);
|
|
1487
1487
|
if (isNaN(r.getTime())) return;
|
|
1488
|
-
const a = "yyyy M d H m s",
|
|
1489
|
-
return { year:
|
|
1488
|
+
const a = "yyyy M d H m s", s = t && t !== "auto" ? ue(r, t, a) : I(r, a), [o, i, f, l, c, h] = s.split(" ").map(Number);
|
|
1489
|
+
return { year: o, month: i, day: f, hour: l, minute: c, second: h };
|
|
1490
1490
|
} catch {
|
|
1491
1491
|
return;
|
|
1492
1492
|
}
|
|
1493
1493
|
}
|
|
1494
|
-
const
|
|
1494
|
+
const en = (e, t = "auto") => {
|
|
1495
1495
|
if (!e)
|
|
1496
1496
|
return "";
|
|
1497
1497
|
try {
|
|
1498
|
-
const n =
|
|
1499
|
-
return isNaN(n.getTime()) ? e :
|
|
1498
|
+
const n = _(e, t);
|
|
1499
|
+
return isNaN(n.getTime()) ? e : Rt(n, { addSuffix: !0 });
|
|
1500
1500
|
} catch (n) {
|
|
1501
1501
|
return console.error("Relative time formatting error:", n), e;
|
|
1502
1502
|
}
|
|
1503
1503
|
};
|
|
1504
|
-
function
|
|
1505
|
-
const a = e instanceof Date ? e.toISOString() : String(e),
|
|
1504
|
+
function tn(e, t, n, r) {
|
|
1505
|
+
const a = e instanceof Date ? e.toISOString() : String(e), s = (r == null ? void 0 : r.browserTimezone) || n, o = (r == null ? void 0 : r.isSqlCard) ?? !1;
|
|
1506
1506
|
if (t != null && t.useRelativeTime)
|
|
1507
|
-
return
|
|
1507
|
+
return en(
|
|
1508
1508
|
a,
|
|
1509
1509
|
(t == null ? void 0 : t.sourceTimezone) || "auto"
|
|
1510
1510
|
);
|
|
1511
|
-
const
|
|
1512
|
-
return
|
|
1511
|
+
const i = t != null && t.useCustomFormat && (t != null && t.customFormat) ? t.customFormat : (t == null ? void 0 : t.format) || "MM/dd/yyyy";
|
|
1512
|
+
return Kt(
|
|
1513
1513
|
a,
|
|
1514
|
-
|
|
1515
|
-
t != null && t.timezone && (t == null ? void 0 : t.timezone) !== "auto" ? t.timezone :
|
|
1514
|
+
i,
|
|
1515
|
+
t != null && t.timezone && (t == null ? void 0 : t.timezone) !== "auto" ? t.timezone : o ? s : n,
|
|
1516
1516
|
(t == null ? void 0 : t.sourceTimezone) || "auto"
|
|
1517
1517
|
);
|
|
1518
1518
|
}
|
|
1519
|
-
function
|
|
1520
|
-
var
|
|
1519
|
+
function ce(e, t, n) {
|
|
1520
|
+
var o, i;
|
|
1521
1521
|
if (e == null)
|
|
1522
|
-
return e === null ? ((
|
|
1523
|
-
const r =
|
|
1522
|
+
return e === null ? ((o = n.absence) == null ? void 0 : o.nullText) ?? "" : ((i = n.absence) == null ? void 0 : i.emptyText) ?? "";
|
|
1523
|
+
const r = me(e) ? e : void 0, a = r ? r.value : e, s = r ?? (typeof e == "number" ? e : void 0);
|
|
1524
1524
|
if (!n.useFormattedValues || !t)
|
|
1525
1525
|
return String(a);
|
|
1526
1526
|
switch (t.type) {
|
|
1527
1527
|
case "number":
|
|
1528
|
-
return
|
|
1529
|
-
|
|
1528
|
+
return s !== void 0 ? ye(
|
|
1529
|
+
s,
|
|
1530
1530
|
t.numberFormat,
|
|
1531
1531
|
n.locale
|
|
1532
1532
|
) : String(a);
|
|
1533
1533
|
case "date":
|
|
1534
|
-
return
|
|
1534
|
+
return tn(
|
|
1535
1535
|
a,
|
|
1536
1536
|
t.dateFormat,
|
|
1537
1537
|
n.timezone,
|
|
@@ -1541,7 +1541,7 @@ function ye(e, t, n) {
|
|
|
1541
1541
|
}
|
|
1542
1542
|
);
|
|
1543
1543
|
case "progress":
|
|
1544
|
-
return
|
|
1544
|
+
return s !== void 0 ? `${a}%` : String(a);
|
|
1545
1545
|
case "badge":
|
|
1546
1546
|
case "link":
|
|
1547
1547
|
case "text":
|
|
@@ -1550,197 +1550,110 @@ function ye(e, t, n) {
|
|
|
1550
1550
|
return String(a);
|
|
1551
1551
|
}
|
|
1552
1552
|
}
|
|
1553
|
-
function
|
|
1553
|
+
function kn(e, t) {
|
|
1554
1554
|
return t.visibleColumns.map((n) => {
|
|
1555
1555
|
const r = e[n], a = t.columnSettings[n];
|
|
1556
|
-
return
|
|
1556
|
+
return ce(r, a, {
|
|
1557
1557
|
useFormattedValues: t.useFormattedValues,
|
|
1558
1558
|
timezone: t.timezone,
|
|
1559
1559
|
locale: t.locale
|
|
1560
1560
|
});
|
|
1561
1561
|
});
|
|
1562
1562
|
}
|
|
1563
|
-
const
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
return t.length === te.length && te.every(
|
|
1576
|
-
(n, r) => t[r] === n
|
|
1577
|
-
) && typeof e.minimumFractionDigits == "number" && typeof e.maximumFractionDigits == "number" && e.useGrouping === !0 && e.negativeStyle === "minus" && typeof e.compact == "boolean";
|
|
1578
|
-
}
|
|
1579
|
-
function ne(e) {
|
|
1580
|
-
if (typeof e != "string")
|
|
1581
|
-
return;
|
|
1582
|
-
const t = e.trim();
|
|
1583
|
-
if (!(!t || t.toLowerCase() === "none"))
|
|
1584
|
-
return t;
|
|
1585
|
-
}
|
|
1586
|
-
function N(e) {
|
|
1587
|
-
if (!(typeof e != "number" || !Number.isFinite(e)))
|
|
1588
|
-
return Math.max(0, Math.min(10, Math.trunc(e)));
|
|
1589
|
-
}
|
|
1590
|
-
function ln(e) {
|
|
1591
|
-
return e === "currency" ? 2 : e === "percent" ? 1 : e === "scientific" ? 2 : 0;
|
|
1592
|
-
}
|
|
1593
|
-
function fn(e, t, n) {
|
|
1594
|
-
const r = N(t.minimumFractionDigits), a = N(t.maximumFractionDigits);
|
|
1595
|
-
if (typeof r == "number" || typeof a == "number") {
|
|
1596
|
-
const o = r ?? 0, l = a ?? Math.max(o, 2);
|
|
1597
|
-
return {
|
|
1598
|
-
minimumFractionDigits: Math.min(o, l),
|
|
1599
|
-
maximumFractionDigits: Math.max(o, l)
|
|
1600
|
-
};
|
|
1563
|
+
const nn = Object.freeze({ source: "automatic" });
|
|
1564
|
+
function rn(e, t) {
|
|
1565
|
+
var r, a;
|
|
1566
|
+
const n = e.preferences;
|
|
1567
|
+
switch (t) {
|
|
1568
|
+
case "tooltip":
|
|
1569
|
+
return (r = n == null ? void 0 : n.tooltipConfig) == null ? void 0 : r.valueFormat;
|
|
1570
|
+
case "dataLabel":
|
|
1571
|
+
case "pieLabel":
|
|
1572
|
+
return (a = n == null ? void 0 : n.dataLabelsConfig) == null ? void 0 : a.valueFormat;
|
|
1573
|
+
default:
|
|
1574
|
+
return;
|
|
1601
1575
|
}
|
|
1602
|
-
const i = N(t.decimals);
|
|
1603
|
-
if (typeof i == "number")
|
|
1604
|
-
return {
|
|
1605
|
-
minimumFractionDigits: i,
|
|
1606
|
-
maximumFractionDigits: i
|
|
1607
|
-
};
|
|
1608
|
-
if (n != null && n.preserveOmittedProperties)
|
|
1609
|
-
return {};
|
|
1610
|
-
const s = ln(e);
|
|
1611
|
-
return {
|
|
1612
|
-
minimumFractionDigits: s,
|
|
1613
|
-
maximumFractionDigits: s
|
|
1614
|
-
};
|
|
1615
|
-
}
|
|
1616
|
-
function dn(e, t) {
|
|
1617
|
-
if (!(typeof t != "string" || e === "percent" && t === "%"))
|
|
1618
|
-
return t;
|
|
1619
|
-
}
|
|
1620
|
-
function re(e) {
|
|
1621
|
-
const t = ne(e.locale), n = ne(e.currency), r = dn(e.type, e.suffix);
|
|
1622
|
-
return {
|
|
1623
|
-
...e,
|
|
1624
|
-
...t !== e.locale ? { locale: t } : {},
|
|
1625
|
-
...n !== e.currency ? { currency: n } : {},
|
|
1626
|
-
...r !== e.suffix ? { suffix: r } : {}
|
|
1627
|
-
};
|
|
1628
|
-
}
|
|
1629
|
-
function x(e, t, n) {
|
|
1630
|
-
const r = { ...t, type: e };
|
|
1631
|
-
if ((n == null ? void 0 : n.numericInput) === "canonical" && q(r))
|
|
1632
|
-
return re(r);
|
|
1633
|
-
const a = fn(e, t, n), i = typeof t.prefix == "string" ? t.prefix : void 0, s = {
|
|
1634
|
-
type: e,
|
|
1635
|
-
locale: t.locale,
|
|
1636
|
-
minimumFractionDigits: a.minimumFractionDigits,
|
|
1637
|
-
maximumFractionDigits: a.maximumFractionDigits,
|
|
1638
|
-
useGrouping: typeof t.useGrouping == "boolean" ? t.useGrouping : typeof t.thousandsSeparator == "boolean" ? t.thousandsSeparator : !0,
|
|
1639
|
-
prefix: i,
|
|
1640
|
-
suffix: t.suffix,
|
|
1641
|
-
negativeStyle: t.negativeStyle || "minus",
|
|
1642
|
-
compact: !!t.compact,
|
|
1643
|
-
scale: typeof t.scale == "number" ? t.scale : void 0
|
|
1644
|
-
};
|
|
1645
|
-
return e === "currency" && t.currency && (s.currency = t.currency), e === "percent" && (s.percentValueMode = t.percentValueMode || "fraction"), re(s);
|
|
1646
1576
|
}
|
|
1647
|
-
function
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1577
|
+
function J(e, t) {
|
|
1578
|
+
const n = e.config;
|
|
1579
|
+
if (n)
|
|
1580
|
+
return [
|
|
1581
|
+
...n.metricColumns ?? [],
|
|
1582
|
+
...n.groupByColumns ?? [],
|
|
1583
|
+
...n.detailColumns ?? [],
|
|
1584
|
+
...n.pivotByColumns ?? []
|
|
1585
|
+
].find((r) => r.id === t);
|
|
1586
|
+
}
|
|
1587
|
+
function an(e, t) {
|
|
1588
|
+
if (t.kind === "field") return J(e, t.fieldId);
|
|
1589
|
+
if (t.kind === "pivot") return J(e, t.metricId);
|
|
1590
|
+
}
|
|
1591
|
+
function sn(e, t, n) {
|
|
1592
|
+
var r, a, s, o, i, f, l, c, h;
|
|
1593
|
+
switch (t.kind) {
|
|
1594
|
+
case "field":
|
|
1595
|
+
case "pivot":
|
|
1596
|
+
return n != null && n.format && n.formatOrigin === "override" ? n.format : void 0;
|
|
1597
|
+
case "result":
|
|
1598
|
+
return (s = (a = (r = e.preferences) == null ? void 0 : r.sqlColumns) == null ? void 0 : a[t.key]) == null ? void 0 : s.format;
|
|
1599
|
+
case "sqlKpiValue":
|
|
1600
|
+
return (i = (o = e.preferences) == null ? void 0 : o.sqlKpiValue) == null ? void 0 : i.format;
|
|
1601
|
+
case "matrixMeasure":
|
|
1602
|
+
return (l = (f = e.config) == null ? void 0 : f.matrix) == null ? void 0 : l.presentation.measureFormats[t.measureId];
|
|
1603
|
+
case "matrixLevel":
|
|
1604
|
+
return (h = (c = e.config) == null ? void 0 : c.matrix) == null ? void 0 : h.presentation.levelFormats[t.levelId];
|
|
1605
|
+
}
|
|
1675
1606
|
}
|
|
1676
|
-
function
|
|
1677
|
-
return
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1607
|
+
function on(e) {
|
|
1608
|
+
if (!e) return;
|
|
1609
|
+
if (e.format && e.formatOrigin !== "override") return e.format;
|
|
1610
|
+
const t = e.semanticTemporalPresentation;
|
|
1611
|
+
return t && t.granularity === e.granularity ? t.format : void 0;
|
|
1612
|
+
}
|
|
1613
|
+
function q(e) {
|
|
1614
|
+
return e.surface ? { format: e.surface, source: "surface" } : e.override ? { format: e.override, source: "override" } : e.model ? { format: e.model, source: "model" } : e.snapshot ? { format: e.snapshot, source: "snapshot" } : nn;
|
|
1615
|
+
}
|
|
1616
|
+
function un(e) {
|
|
1617
|
+
var o;
|
|
1618
|
+
const { card: t, column: n, surface: r } = e, a = an(t, n), s = n.kind === "field" ? n.fieldId : n.kind === "pivot" ? n.metricId : void 0;
|
|
1619
|
+
return q({
|
|
1620
|
+
surface: r ? rn(t, r) : void 0,
|
|
1621
|
+
override: sn(t, n, a),
|
|
1622
|
+
model: (s !== void 0 ? (o = e.modelFormats) == null ? void 0 : o[s] : void 0) ?? e.catalogFormat,
|
|
1623
|
+
snapshot: on(a)
|
|
1624
|
+
});
|
|
1682
1625
|
}
|
|
1683
|
-
function
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
t
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
const r = De.safeParse(e);
|
|
1711
|
-
return r.success ? r.data : void 0;
|
|
1712
|
-
}
|
|
1713
|
-
const n = e;
|
|
1714
|
-
if ((t == null ? void 0 : t.numericInput) === "canonical") {
|
|
1715
|
-
const r = n.type === "percentage" ? { ...n, type: "percent" } : n;
|
|
1716
|
-
if (q(r))
|
|
1717
|
-
return x(r.type, r, t);
|
|
1718
|
-
}
|
|
1719
|
-
if (n.type === "percentage")
|
|
1720
|
-
return x(
|
|
1721
|
-
"percent",
|
|
1722
|
-
{
|
|
1723
|
-
...n,
|
|
1724
|
-
percentValueMode: n.percentValueMode || "fraction"
|
|
1725
|
-
},
|
|
1726
|
-
t
|
|
1727
|
-
);
|
|
1728
|
-
if (n.type === "number" || n.type === "currency" || n.type === "percent" || n.type === "scientific") {
|
|
1729
|
-
const r = x(
|
|
1730
|
-
n.type,
|
|
1731
|
-
n,
|
|
1732
|
-
t
|
|
1733
|
-
);
|
|
1734
|
-
return cn(n) ? { ...r, currency: "USD" } : r;
|
|
1626
|
+
function cn(e, t) {
|
|
1627
|
+
const n = (r) => r && typeof r == "object" && !Array.isArray(r) ? Object.fromEntries(
|
|
1628
|
+
Object.keys(r).sort().map((a) => [a, n(r[a])])
|
|
1629
|
+
) : r;
|
|
1630
|
+
return JSON.stringify(n(e)) === JSON.stringify(n(t));
|
|
1631
|
+
}
|
|
1632
|
+
const fn = ["metricColumns", "groupByColumns", "detailColumns", "pivotByColumns"], K = /* @__PURE__ */ new WeakMap();
|
|
1633
|
+
function Sn(e, t) {
|
|
1634
|
+
const n = t == null ? void 0 : t.modelFormats;
|
|
1635
|
+
if (!e || !n || Object.keys(n).length === 0) return e;
|
|
1636
|
+
let r = K.get(e);
|
|
1637
|
+
if (r || K.set(e, r = /* @__PURE__ */ new WeakMap()), r.has(n)) return r.get(n);
|
|
1638
|
+
const a = ln(e, n);
|
|
1639
|
+
return r.set(n, a), a;
|
|
1640
|
+
}
|
|
1641
|
+
function ln(e, t) {
|
|
1642
|
+
const n = { config: e };
|
|
1643
|
+
let r;
|
|
1644
|
+
for (const a of fn) {
|
|
1645
|
+
const s = e[a];
|
|
1646
|
+
if (!(s != null && s.length)) continue;
|
|
1647
|
+
let o = !1;
|
|
1648
|
+
const i = s.map((f) => {
|
|
1649
|
+
const l = un({ card: n, column: { kind: "field", fieldId: f.id }, modelFormats: t });
|
|
1650
|
+
return l.source !== "model" || cn(l.format, f.format) ? f : (o = !0, { ...f, format: l.format });
|
|
1651
|
+
});
|
|
1652
|
+
o && ((r ?? (r = { ...e }))[a] = i);
|
|
1735
1653
|
}
|
|
1736
|
-
|
|
1737
|
-
return ae(n);
|
|
1738
|
-
if (n.type === "duration")
|
|
1739
|
-
return ie(n);
|
|
1740
|
-
if (n.type === "string")
|
|
1741
|
-
return se(n);
|
|
1654
|
+
return r ?? e;
|
|
1742
1655
|
}
|
|
1743
|
-
function
|
|
1656
|
+
function mn(e, t) {
|
|
1744
1657
|
var a;
|
|
1745
1658
|
const n = e[e.length - 1];
|
|
1746
1659
|
if (!n) return "";
|
|
@@ -1748,126 +1661,122 @@ function hn(e, t) {
|
|
|
1748
1661
|
const r = n.member.value;
|
|
1749
1662
|
return r === null ? "(Blank)" : ((a = t == null ? void 0 : t.get(n.levelId)) == null ? void 0 : a(r)) ?? (typeof r == "object" ? r.value : String(r));
|
|
1750
1663
|
}
|
|
1751
|
-
function
|
|
1752
|
-
return e === "grand_total" ? n ?? "Grand Total" : e === "subtotal" ? (n == null ? void 0 : n.split(
|
|
1664
|
+
function dn(e, t, n) {
|
|
1665
|
+
return e === "grand_total" ? n ?? "Grand Total" : e === "subtotal" ? (n == null ? void 0 : n.split(he).join(t)) ?? `${t} Total` : t;
|
|
1753
1666
|
}
|
|
1754
|
-
function
|
|
1755
|
-
var
|
|
1756
|
-
const a = e[e.length - 1],
|
|
1757
|
-
return
|
|
1667
|
+
function Wn(e, t, n, r) {
|
|
1668
|
+
var o;
|
|
1669
|
+
const a = e[e.length - 1], s = t === "grand_total" ? n.grand.label : a ? (o = n.levels[a.levelId]) == null ? void 0 : o.label : void 0;
|
|
1670
|
+
return dn(t, mn(e, r), s);
|
|
1758
1671
|
}
|
|
1759
|
-
function
|
|
1672
|
+
function Cn(e, t, n) {
|
|
1760
1673
|
return e.kind === "value" ? (t == null ? void 0 : t(e.value)) ?? "" : e.kind === "null" ? n.nullText : n.emptyText;
|
|
1761
1674
|
}
|
|
1762
1675
|
function Nn(e) {
|
|
1763
|
-
const { path: t, previousPath: n, role: r, repeatLabels: a, levelCount:
|
|
1764
|
-
return Array.from({ length:
|
|
1765
|
-
const
|
|
1676
|
+
const { path: t, previousPath: n, role: r, repeatLabels: a, levelCount: s } = e;
|
|
1677
|
+
return Array.from({ length: s }, (o, i) => {
|
|
1678
|
+
const f = t.slice(0, i + 1), l = r === "grand_total" ? i === 0 : r === "subtotal" && i === t.length - 1, c = n && n.length > i && j(n.slice(0, i + 1)) === j(f);
|
|
1766
1679
|
return {
|
|
1767
|
-
path:
|
|
1768
|
-
total:
|
|
1769
|
-
visible:
|
|
1680
|
+
path: f,
|
|
1681
|
+
total: l,
|
|
1682
|
+
visible: l || t.length > i && (a || !c || i === t.length - 1)
|
|
1770
1683
|
};
|
|
1771
1684
|
});
|
|
1772
1685
|
}
|
|
1773
|
-
function
|
|
1774
|
-
return
|
|
1686
|
+
function hn(e, t) {
|
|
1687
|
+
return be(q({ override: e, model: t }).format, {
|
|
1775
1688
|
preserveOmittedProperties: !0,
|
|
1776
1689
|
numericInput: "canonical"
|
|
1777
1690
|
});
|
|
1778
1691
|
}
|
|
1779
1692
|
function Yn(e, t, n) {
|
|
1780
|
-
const r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(),
|
|
1781
|
-
const
|
|
1782
|
-
|
|
1783
|
-
isNumeric:
|
|
1693
|
+
const r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), s = (o, i) => {
|
|
1694
|
+
const f = (i === "levels" ? t.levelFormats : t.measureFormats)[o.id], l = o.semanticFormat, c = hn(f, l);
|
|
1695
|
+
i === "measures" && r.set(o.id, {
|
|
1696
|
+
isNumeric: de(o.column.dataType) === "number",
|
|
1784
1697
|
// Use normalized affixes: a redundant percent suffix is already removed.
|
|
1785
|
-
hasTextAffixes: !!
|
|
1698
|
+
hasTextAffixes: !!c && !!("prefix" in c && c.prefix || "suffix" in c && c.suffix)
|
|
1786
1699
|
});
|
|
1787
|
-
const
|
|
1700
|
+
const h = (u) => ce(u, void 0, {
|
|
1788
1701
|
useFormattedValues: !0,
|
|
1789
1702
|
timezone: n.calendar.tz,
|
|
1790
1703
|
locale: n.valueFormat.locale,
|
|
1791
1704
|
absence: t.absence
|
|
1792
1705
|
});
|
|
1793
|
-
if (
|
|
1794
|
-
const
|
|
1795
|
-
metadata:
|
|
1796
|
-
cardFormat: (
|
|
1797
|
-
semanticFormat: (
|
|
1706
|
+
if (o.column.temporalBucket) {
|
|
1707
|
+
const u = o.column.temporalBucket, g = Me({
|
|
1708
|
+
metadata: u,
|
|
1709
|
+
cardFormat: (f == null ? void 0 : f.type) === "temporal_bucket" ? f : void 0,
|
|
1710
|
+
semanticFormat: (l == null ? void 0 : l.type) === "temporal_bucket" ? { granularity: u.granularity, format: l } : void 0,
|
|
1798
1711
|
locale: n.valueFormat.locale,
|
|
1799
1712
|
styles: { dateStyle: n.valueFormat.dateStyle, dateTime: n.valueFormat.dateTime }
|
|
1800
1713
|
});
|
|
1801
|
-
return (
|
|
1714
|
+
return (w) => typeof w == "string" ? re({ value: w, metadata: u, format: g.format }) : h(w);
|
|
1802
1715
|
}
|
|
1803
|
-
if (
|
|
1804
|
-
const
|
|
1805
|
-
metadata:
|
|
1806
|
-
format:
|
|
1716
|
+
if (o.column.rawTemporal) {
|
|
1717
|
+
const u = q({ override: f, model: l }).format, g = ve({
|
|
1718
|
+
metadata: o.column.rawTemporal,
|
|
1719
|
+
format: Oe({
|
|
1807
1720
|
format: (u == null ? void 0 : u.type) === "date" ? {
|
|
1808
1721
|
type: "raw_temporal",
|
|
1809
1722
|
timezone: u.timezone,
|
|
1810
1723
|
sourceTimezone: u.sourceTimezone,
|
|
1811
|
-
presentation: u
|
|
1812
|
-
mode: "pattern",
|
|
1813
|
-
dialect: "semaphor_tokens",
|
|
1814
|
-
pattern: u.pattern
|
|
1815
|
-
} : { mode: "auto" }
|
|
1724
|
+
presentation: Te(u)
|
|
1816
1725
|
} : void 0,
|
|
1817
1726
|
preferences: n.valueFormat,
|
|
1818
1727
|
calendar: n.calendar
|
|
1819
1728
|
})
|
|
1820
1729
|
});
|
|
1821
|
-
return (
|
|
1822
|
-
if (typeof
|
|
1823
|
-
const
|
|
1824
|
-
return
|
|
1730
|
+
return (w) => {
|
|
1731
|
+
if (typeof w != "string") return h(w);
|
|
1732
|
+
const M = g(w);
|
|
1733
|
+
return M.ok ? M.text : h(w);
|
|
1825
1734
|
};
|
|
1826
1735
|
}
|
|
1827
|
-
if (
|
|
1828
|
-
const
|
|
1829
|
-
return
|
|
1736
|
+
if (xe(c)) {
|
|
1737
|
+
const u = De(c, n.valueFormat);
|
|
1738
|
+
return i === "measures" && a.set(o.id, u), (g) => typeof g == "number" || typeof g == "object" && g !== null ? Pe(g, u) : h(g);
|
|
1830
1739
|
}
|
|
1831
|
-
return (
|
|
1832
|
-
typeof
|
|
1833
|
-
|
|
1834
|
-
) :
|
|
1740
|
+
return (c == null ? void 0 : c.type) === "duration" && i === "measures" && a.set(o.id, c), (c == null ? void 0 : c.type) === "duration" ? (u) => typeof u == "number" || typeof u == "string" || typeof u == "object" && u !== null ? pe(
|
|
1741
|
+
typeof u == "object" ? u.value : u,
|
|
1742
|
+
c
|
|
1743
|
+
) : h(u) : (c == null ? void 0 : c.type) === "string" ? (u) => u === null ? h(u) : `${c.prefix ?? ""}${h(u)}${c.suffix ?? ""}` : h;
|
|
1835
1744
|
};
|
|
1836
1745
|
return {
|
|
1837
1746
|
levels: new Map(
|
|
1838
|
-
e.levels.map((
|
|
1747
|
+
e.levels.map((o) => [o.id, s(o, "levels")])
|
|
1839
1748
|
),
|
|
1840
1749
|
measures: new Map(
|
|
1841
|
-
e.measures.map((
|
|
1750
|
+
e.measures.map((o) => [o.id, s(o, "measures")])
|
|
1842
1751
|
),
|
|
1843
1752
|
measureSemantics: r,
|
|
1844
1753
|
measureFormats: a,
|
|
1845
1754
|
absence: t.absence
|
|
1846
1755
|
};
|
|
1847
1756
|
}
|
|
1848
|
-
class
|
|
1757
|
+
class gn extends Error {
|
|
1849
1758
|
constructor(n, r) {
|
|
1850
1759
|
super(`${n}: ${r}`);
|
|
1851
|
-
|
|
1760
|
+
z(this, "deliveryBlocking", !0);
|
|
1852
1761
|
this.code = n, this.name = "PivotHeaderPresentationError";
|
|
1853
1762
|
}
|
|
1854
1763
|
}
|
|
1855
1764
|
function En(e) {
|
|
1856
1765
|
var a;
|
|
1857
|
-
const t = e.mode ?? "formatted", n = e.members.map((
|
|
1858
|
-
var
|
|
1859
|
-
if (t === "canonical" || !
|
|
1860
|
-
return
|
|
1861
|
-
const
|
|
1862
|
-
if (!
|
|
1863
|
-
throw new
|
|
1766
|
+
const t = e.mode ?? "formatted", n = e.members.map((s) => {
|
|
1767
|
+
var i;
|
|
1768
|
+
if (t === "canonical" || !s.temporalBucket)
|
|
1769
|
+
return s.value === null ? "" : String(s.value);
|
|
1770
|
+
const o = (i = e.resolveTemporalFormat) == null ? void 0 : i.call(e, s.fieldId);
|
|
1771
|
+
if (!o)
|
|
1772
|
+
throw new gn(
|
|
1864
1773
|
"missing_resolved_temporal_format",
|
|
1865
|
-
`Missing resolved temporal presentation for pivot field "${
|
|
1774
|
+
`Missing resolved temporal presentation for pivot field "${s.fieldId}"`
|
|
1866
1775
|
);
|
|
1867
|
-
return
|
|
1868
|
-
value:
|
|
1869
|
-
metadata:
|
|
1870
|
-
format:
|
|
1776
|
+
return re({
|
|
1777
|
+
value: s.value,
|
|
1778
|
+
metadata: s.temporalBucket,
|
|
1779
|
+
format: o
|
|
1871
1780
|
});
|
|
1872
1781
|
}), r = ((a = e.metricLabel) == null ? void 0 : a.trim()) || void 0;
|
|
1873
1782
|
return {
|
|
@@ -1879,48 +1788,45 @@ function En(e) {
|
|
|
1879
1788
|
].join(" / ")
|
|
1880
1789
|
};
|
|
1881
1790
|
}
|
|
1882
|
-
function
|
|
1791
|
+
function Fn(e) {
|
|
1883
1792
|
const t = /* @__PURE__ */ new Map();
|
|
1884
1793
|
return e.forEach((n) => {
|
|
1885
1794
|
n.id && t.set(n.id, (t.get(n.id) ?? 0) + 1);
|
|
1886
1795
|
}), e.flatMap(
|
|
1887
|
-
(n) => n.id && (t.get(n.id) ?? 0) > 1 ? [
|
|
1796
|
+
(n) => n.id && (t.get(n.id) ?? 0) > 1 ? [ke(n)] : []
|
|
1888
1797
|
);
|
|
1889
1798
|
}
|
|
1890
1799
|
export {
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
m as x,
|
|
1924
|
-
qe as y,
|
|
1925
|
-
E as z
|
|
1800
|
+
Le as A,
|
|
1801
|
+
Y as B,
|
|
1802
|
+
Ne as C,
|
|
1803
|
+
hn as D,
|
|
1804
|
+
dn as E,
|
|
1805
|
+
gn as P,
|
|
1806
|
+
en as a,
|
|
1807
|
+
xn as b,
|
|
1808
|
+
Pn as c,
|
|
1809
|
+
pn as d,
|
|
1810
|
+
_ as e,
|
|
1811
|
+
Kt as f,
|
|
1812
|
+
Dn as g,
|
|
1813
|
+
ce as h,
|
|
1814
|
+
kn as i,
|
|
1815
|
+
Yn as j,
|
|
1816
|
+
En as k,
|
|
1817
|
+
Fn as l,
|
|
1818
|
+
mn as m,
|
|
1819
|
+
Wn as n,
|
|
1820
|
+
Nn as o,
|
|
1821
|
+
q as p,
|
|
1822
|
+
Cn as q,
|
|
1823
|
+
un as r,
|
|
1824
|
+
ue as s,
|
|
1825
|
+
I as t,
|
|
1826
|
+
At as u,
|
|
1827
|
+
P as v,
|
|
1828
|
+
Sn as w,
|
|
1829
|
+
se as x,
|
|
1830
|
+
C as y,
|
|
1831
|
+
d as z
|
|
1926
1832
|
};
|