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