qt-ui-kit 1.0.3 → 1.0.5
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/index.d.mts +1 -20
- package/dist/index.d.ts +1 -20
- package/dist/index.js +1 -2169
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1 -2133
- package/dist/index.mjs.map +1 -0
- package/dist/style.css +0 -8
- package/package.json +54 -53
- package/dist/index.css +0 -958
package/dist/index.js
CHANGED
|
@@ -1,2170 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/index.ts
|
|
31
|
-
var index_exports = {};
|
|
32
|
-
__export(index_exports, {
|
|
33
|
-
PreviewCard: () => PreviewCard
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(index_exports);
|
|
36
|
-
|
|
37
|
-
// src/components/organisms/preview_card/preview_card.tsx
|
|
38
|
-
var import_react = require("react");
|
|
39
|
-
|
|
40
|
-
// src/data/vector_icons/vector_icons.tsx
|
|
41
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
|
-
function AlertIcon({ variant }) {
|
|
43
|
-
switch (variant) {
|
|
44
|
-
case void 0:
|
|
45
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
46
|
-
"svg",
|
|
47
|
-
{
|
|
48
|
-
width: "100%",
|
|
49
|
-
height: "100%",
|
|
50
|
-
viewBox: "0 0 36 36",
|
|
51
|
-
fill: "#FFC24D",
|
|
52
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
53
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
-
"path",
|
|
55
|
-
{
|
|
56
|
-
d: "M18.0003 15V18M18.0003 24H18.0153M7.60799 30H28.3926C30.702 30 32.1454 27.5 30.9907 25.5L20.5984 7.5C19.4437 5.5 16.5569 5.5 15.4022 7.5L5.00992 25.5C3.85521 27.5 5.29859 30 7.60799 30Z",
|
|
57
|
-
stroke: "#1D1D1F",
|
|
58
|
-
"stroke-width": "2.25",
|
|
59
|
-
"stroke-linecap": "round",
|
|
60
|
-
"stroke-linejoin": "round"
|
|
61
|
-
}
|
|
62
|
-
)
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
default:
|
|
66
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
67
|
-
"svg",
|
|
68
|
-
{
|
|
69
|
-
width: "100%",
|
|
70
|
-
height: "100%",
|
|
71
|
-
viewBox: "0 0 30 28",
|
|
72
|
-
fill: variant,
|
|
73
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
74
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
75
|
-
"path",
|
|
76
|
-
{
|
|
77
|
-
d: "M18.0003 15V18M18.0003 24H18.0153M7.60799 30H28.3926C30.702 30 32.1454 27.5 30.9907 25.5L20.5984 7.5C19.4437 5.5 16.5569 5.5 15.4022 7.5L5.00992 25.5C3.85521 27.5 5.29859 30 7.60799 30Z",
|
|
78
|
-
stroke: "#1D1D1F",
|
|
79
|
-
"stroke-width": "2.25",
|
|
80
|
-
"stroke-linecap": "round",
|
|
81
|
-
"stroke-linejoin": "round"
|
|
82
|
-
}
|
|
83
|
-
)
|
|
84
|
-
}
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
function FireIcon({ variant }) {
|
|
89
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
90
|
-
"svg",
|
|
91
|
-
{
|
|
92
|
-
width: "100%",
|
|
93
|
-
height: "100%",
|
|
94
|
-
viewBox: "0 0 36 36",
|
|
95
|
-
fill: variant == void 0 ? "none" : variant,
|
|
96
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
97
|
-
children: [
|
|
98
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
99
|
-
"path",
|
|
100
|
-
{
|
|
101
|
-
d: "M26.4853 27.9853C21.799 32.6716 14.201 32.6716 9.51472 27.9853C7.17158 25.6421 6 22.5711 6 19.5C6 16.4289 7.17157 13.3579 9.51472 11.0147C9.51472 11.0147 10.5001 13.4999 13.5001 14.9999C13.5001 11.9999 14.2501 7.49993 17.9788 4.5C21 7.5 24.1367 8.66617 26.4853 11.0147C28.8284 13.3579 30 16.4289 30 19.5C30 22.5711 28.8284 25.6421 26.4853 27.9853Z",
|
|
102
|
-
fill: variant == void 0 ? "#FF7E71" : variant,
|
|
103
|
-
stroke: "#1D1D1F",
|
|
104
|
-
"stroke-width": "2.25",
|
|
105
|
-
"stroke-linecap": "round",
|
|
106
|
-
"stroke-linejoin": "round"
|
|
107
|
-
}
|
|
108
|
-
),
|
|
109
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
110
|
-
"path",
|
|
111
|
-
{
|
|
112
|
-
d: "M14.818 24.1819C16.5754 25.9393 19.4246 25.9393 21.182 24.1819C22.0606 23.3033 22.5 22.1516 22.5 21C22.5 19.8483 22.0607 18.6967 21.182 17.818C20.3089 16.9448 19.1662 16.5055 18.0218 16.5L16.4999 20.9999L13.5 21C13.5 22.1516 13.9394 23.3033 14.818 24.1819Z",
|
|
113
|
-
fill: variant == void 0 ? "#FFD481" : variant,
|
|
114
|
-
stroke: "#1D1D1F",
|
|
115
|
-
"stroke-width": "2.25",
|
|
116
|
-
"stroke-linecap": "round",
|
|
117
|
-
"stroke-linejoin": "round"
|
|
118
|
-
}
|
|
119
|
-
)
|
|
120
|
-
]
|
|
121
|
-
}
|
|
122
|
-
);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// node_modules/date-fns/constants.js
|
|
126
|
-
var daysInYear = 365.2425;
|
|
127
|
-
var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3;
|
|
128
|
-
var minTime = -maxTime;
|
|
129
|
-
var millisecondsInWeek = 6048e5;
|
|
130
|
-
var millisecondsInDay = 864e5;
|
|
131
|
-
var secondsInHour = 3600;
|
|
132
|
-
var secondsInDay = secondsInHour * 24;
|
|
133
|
-
var secondsInWeek = secondsInDay * 7;
|
|
134
|
-
var secondsInYear = secondsInDay * daysInYear;
|
|
135
|
-
var secondsInMonth = secondsInYear / 12;
|
|
136
|
-
var secondsInQuarter = secondsInMonth * 3;
|
|
137
|
-
var constructFromSymbol = Symbol.for("constructDateFrom");
|
|
138
|
-
|
|
139
|
-
// node_modules/date-fns/constructFrom.js
|
|
140
|
-
function constructFrom(date, value) {
|
|
141
|
-
if (typeof date === "function") return date(value);
|
|
142
|
-
if (date && typeof date === "object" && constructFromSymbol in date)
|
|
143
|
-
return date[constructFromSymbol](value);
|
|
144
|
-
if (date instanceof Date) return new date.constructor(value);
|
|
145
|
-
return new Date(value);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// node_modules/date-fns/toDate.js
|
|
149
|
-
function toDate(argument, context) {
|
|
150
|
-
return constructFrom(context || argument, argument);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
// node_modules/date-fns/addDays.js
|
|
154
|
-
function addDays(date, amount, options) {
|
|
155
|
-
const _date = toDate(date, options?.in);
|
|
156
|
-
if (isNaN(amount)) return constructFrom(options?.in || date, NaN);
|
|
157
|
-
if (!amount) return _date;
|
|
158
|
-
_date.setDate(_date.getDate() + amount);
|
|
159
|
-
return _date;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
// node_modules/date-fns/_lib/defaultOptions.js
|
|
163
|
-
var defaultOptions = {};
|
|
164
|
-
function getDefaultOptions() {
|
|
165
|
-
return defaultOptions;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// node_modules/date-fns/startOfWeek.js
|
|
169
|
-
function startOfWeek(date, options) {
|
|
170
|
-
const defaultOptions2 = getDefaultOptions();
|
|
171
|
-
const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
|
|
172
|
-
const _date = toDate(date, options?.in);
|
|
173
|
-
const day = _date.getDay();
|
|
174
|
-
const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
175
|
-
_date.setDate(_date.getDate() - diff);
|
|
176
|
-
_date.setHours(0, 0, 0, 0);
|
|
177
|
-
return _date;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
// node_modules/date-fns/startOfISOWeek.js
|
|
181
|
-
function startOfISOWeek(date, options) {
|
|
182
|
-
return startOfWeek(date, { ...options, weekStartsOn: 1 });
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
// node_modules/date-fns/getISOWeekYear.js
|
|
186
|
-
function getISOWeekYear(date, options) {
|
|
187
|
-
const _date = toDate(date, options?.in);
|
|
188
|
-
const year = _date.getFullYear();
|
|
189
|
-
const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);
|
|
190
|
-
fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
|
|
191
|
-
fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
|
|
192
|
-
const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
|
|
193
|
-
const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);
|
|
194
|
-
fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
|
|
195
|
-
fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
|
|
196
|
-
const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
|
|
197
|
-
if (_date.getTime() >= startOfNextYear.getTime()) {
|
|
198
|
-
return year + 1;
|
|
199
|
-
} else if (_date.getTime() >= startOfThisYear.getTime()) {
|
|
200
|
-
return year;
|
|
201
|
-
} else {
|
|
202
|
-
return year - 1;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
// node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
|
|
207
|
-
function getTimezoneOffsetInMilliseconds(date) {
|
|
208
|
-
const _date = toDate(date);
|
|
209
|
-
const utcDate = new Date(
|
|
210
|
-
Date.UTC(
|
|
211
|
-
_date.getFullYear(),
|
|
212
|
-
_date.getMonth(),
|
|
213
|
-
_date.getDate(),
|
|
214
|
-
_date.getHours(),
|
|
215
|
-
_date.getMinutes(),
|
|
216
|
-
_date.getSeconds(),
|
|
217
|
-
_date.getMilliseconds()
|
|
218
|
-
)
|
|
219
|
-
);
|
|
220
|
-
utcDate.setUTCFullYear(_date.getFullYear());
|
|
221
|
-
return +date - +utcDate;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
// node_modules/date-fns/_lib/normalizeDates.js
|
|
225
|
-
function normalizeDates(context, ...dates) {
|
|
226
|
-
const normalize = constructFrom.bind(
|
|
227
|
-
null,
|
|
228
|
-
context || dates.find((date) => typeof date === "object")
|
|
229
|
-
);
|
|
230
|
-
return dates.map(normalize);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
// node_modules/date-fns/startOfDay.js
|
|
234
|
-
function startOfDay(date, options) {
|
|
235
|
-
const _date = toDate(date, options?.in);
|
|
236
|
-
_date.setHours(0, 0, 0, 0);
|
|
237
|
-
return _date;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
// node_modules/date-fns/differenceInCalendarDays.js
|
|
241
|
-
function differenceInCalendarDays(laterDate, earlierDate, options) {
|
|
242
|
-
const [laterDate_, earlierDate_] = normalizeDates(
|
|
243
|
-
options?.in,
|
|
244
|
-
laterDate,
|
|
245
|
-
earlierDate
|
|
246
|
-
);
|
|
247
|
-
const laterStartOfDay = startOfDay(laterDate_);
|
|
248
|
-
const earlierStartOfDay = startOfDay(earlierDate_);
|
|
249
|
-
const laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);
|
|
250
|
-
const earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);
|
|
251
|
-
return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
// node_modules/date-fns/startOfISOWeekYear.js
|
|
255
|
-
function startOfISOWeekYear(date, options) {
|
|
256
|
-
const year = getISOWeekYear(date, options);
|
|
257
|
-
const fourthOfJanuary = constructFrom(options?.in || date, 0);
|
|
258
|
-
fourthOfJanuary.setFullYear(year, 0, 4);
|
|
259
|
-
fourthOfJanuary.setHours(0, 0, 0, 0);
|
|
260
|
-
return startOfISOWeek(fourthOfJanuary);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
// node_modules/date-fns/constructNow.js
|
|
264
|
-
function constructNow(date) {
|
|
265
|
-
return constructFrom(date, Date.now());
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
// node_modules/date-fns/isSameDay.js
|
|
269
|
-
function isSameDay(laterDate, earlierDate, options) {
|
|
270
|
-
const [dateLeft_, dateRight_] = normalizeDates(
|
|
271
|
-
options?.in,
|
|
272
|
-
laterDate,
|
|
273
|
-
earlierDate
|
|
274
|
-
);
|
|
275
|
-
return +startOfDay(dateLeft_) === +startOfDay(dateRight_);
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
// node_modules/date-fns/isDate.js
|
|
279
|
-
function isDate(value) {
|
|
280
|
-
return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]";
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
// node_modules/date-fns/isValid.js
|
|
284
|
-
function isValid(date) {
|
|
285
|
-
return !(!isDate(date) && typeof date !== "number" || isNaN(+toDate(date)));
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
// node_modules/date-fns/startOfYear.js
|
|
289
|
-
function startOfYear(date, options) {
|
|
290
|
-
const date_ = toDate(date, options?.in);
|
|
291
|
-
date_.setFullYear(date_.getFullYear(), 0, 1);
|
|
292
|
-
date_.setHours(0, 0, 0, 0);
|
|
293
|
-
return date_;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
// node_modules/date-fns/locale/en-US/_lib/formatDistance.js
|
|
297
|
-
var formatDistanceLocale = {
|
|
298
|
-
lessThanXSeconds: {
|
|
299
|
-
one: "less than a second",
|
|
300
|
-
other: "less than {{count}} seconds"
|
|
301
|
-
},
|
|
302
|
-
xSeconds: {
|
|
303
|
-
one: "1 second",
|
|
304
|
-
other: "{{count}} seconds"
|
|
305
|
-
},
|
|
306
|
-
halfAMinute: "half a minute",
|
|
307
|
-
lessThanXMinutes: {
|
|
308
|
-
one: "less than a minute",
|
|
309
|
-
other: "less than {{count}} minutes"
|
|
310
|
-
},
|
|
311
|
-
xMinutes: {
|
|
312
|
-
one: "1 minute",
|
|
313
|
-
other: "{{count}} minutes"
|
|
314
|
-
},
|
|
315
|
-
aboutXHours: {
|
|
316
|
-
one: "about 1 hour",
|
|
317
|
-
other: "about {{count}} hours"
|
|
318
|
-
},
|
|
319
|
-
xHours: {
|
|
320
|
-
one: "1 hour",
|
|
321
|
-
other: "{{count}} hours"
|
|
322
|
-
},
|
|
323
|
-
xDays: {
|
|
324
|
-
one: "1 day",
|
|
325
|
-
other: "{{count}} days"
|
|
326
|
-
},
|
|
327
|
-
aboutXWeeks: {
|
|
328
|
-
one: "about 1 week",
|
|
329
|
-
other: "about {{count}} weeks"
|
|
330
|
-
},
|
|
331
|
-
xWeeks: {
|
|
332
|
-
one: "1 week",
|
|
333
|
-
other: "{{count}} weeks"
|
|
334
|
-
},
|
|
335
|
-
aboutXMonths: {
|
|
336
|
-
one: "about 1 month",
|
|
337
|
-
other: "about {{count}} months"
|
|
338
|
-
},
|
|
339
|
-
xMonths: {
|
|
340
|
-
one: "1 month",
|
|
341
|
-
other: "{{count}} months"
|
|
342
|
-
},
|
|
343
|
-
aboutXYears: {
|
|
344
|
-
one: "about 1 year",
|
|
345
|
-
other: "about {{count}} years"
|
|
346
|
-
},
|
|
347
|
-
xYears: {
|
|
348
|
-
one: "1 year",
|
|
349
|
-
other: "{{count}} years"
|
|
350
|
-
},
|
|
351
|
-
overXYears: {
|
|
352
|
-
one: "over 1 year",
|
|
353
|
-
other: "over {{count}} years"
|
|
354
|
-
},
|
|
355
|
-
almostXYears: {
|
|
356
|
-
one: "almost 1 year",
|
|
357
|
-
other: "almost {{count}} years"
|
|
358
|
-
}
|
|
359
|
-
};
|
|
360
|
-
var formatDistance = (token, count, options) => {
|
|
361
|
-
let result;
|
|
362
|
-
const tokenValue = formatDistanceLocale[token];
|
|
363
|
-
if (typeof tokenValue === "string") {
|
|
364
|
-
result = tokenValue;
|
|
365
|
-
} else if (count === 1) {
|
|
366
|
-
result = tokenValue.one;
|
|
367
|
-
} else {
|
|
368
|
-
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
369
|
-
}
|
|
370
|
-
if (options?.addSuffix) {
|
|
371
|
-
if (options.comparison && options.comparison > 0) {
|
|
372
|
-
return "in " + result;
|
|
373
|
-
} else {
|
|
374
|
-
return result + " ago";
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
return result;
|
|
378
|
-
};
|
|
379
|
-
|
|
380
|
-
// node_modules/date-fns/locale/_lib/buildFormatLongFn.js
|
|
381
|
-
function buildFormatLongFn(args) {
|
|
382
|
-
return (options = {}) => {
|
|
383
|
-
const width = options.width ? String(options.width) : args.defaultWidth;
|
|
384
|
-
const format2 = args.formats[width] || args.formats[args.defaultWidth];
|
|
385
|
-
return format2;
|
|
386
|
-
};
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
// node_modules/date-fns/locale/en-US/_lib/formatLong.js
|
|
390
|
-
var dateFormats = {
|
|
391
|
-
full: "EEEE, MMMM do, y",
|
|
392
|
-
long: "MMMM do, y",
|
|
393
|
-
medium: "MMM d, y",
|
|
394
|
-
short: "MM/dd/yyyy"
|
|
395
|
-
};
|
|
396
|
-
var timeFormats = {
|
|
397
|
-
full: "h:mm:ss a zzzz",
|
|
398
|
-
long: "h:mm:ss a z",
|
|
399
|
-
medium: "h:mm:ss a",
|
|
400
|
-
short: "h:mm a"
|
|
401
|
-
};
|
|
402
|
-
var dateTimeFormats = {
|
|
403
|
-
full: "{{date}} 'at' {{time}}",
|
|
404
|
-
long: "{{date}} 'at' {{time}}",
|
|
405
|
-
medium: "{{date}}, {{time}}",
|
|
406
|
-
short: "{{date}}, {{time}}"
|
|
407
|
-
};
|
|
408
|
-
var formatLong = {
|
|
409
|
-
date: buildFormatLongFn({
|
|
410
|
-
formats: dateFormats,
|
|
411
|
-
defaultWidth: "full"
|
|
412
|
-
}),
|
|
413
|
-
time: buildFormatLongFn({
|
|
414
|
-
formats: timeFormats,
|
|
415
|
-
defaultWidth: "full"
|
|
416
|
-
}),
|
|
417
|
-
dateTime: buildFormatLongFn({
|
|
418
|
-
formats: dateTimeFormats,
|
|
419
|
-
defaultWidth: "full"
|
|
420
|
-
})
|
|
421
|
-
};
|
|
422
|
-
|
|
423
|
-
// node_modules/date-fns/locale/en-US/_lib/formatRelative.js
|
|
424
|
-
var formatRelativeLocale = {
|
|
425
|
-
lastWeek: "'last' eeee 'at' p",
|
|
426
|
-
yesterday: "'yesterday at' p",
|
|
427
|
-
today: "'today at' p",
|
|
428
|
-
tomorrow: "'tomorrow at' p",
|
|
429
|
-
nextWeek: "eeee 'at' p",
|
|
430
|
-
other: "P"
|
|
431
|
-
};
|
|
432
|
-
var formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];
|
|
433
|
-
|
|
434
|
-
// node_modules/date-fns/locale/_lib/buildLocalizeFn.js
|
|
435
|
-
function buildLocalizeFn(args) {
|
|
436
|
-
return (value, options) => {
|
|
437
|
-
const context = options?.context ? String(options.context) : "standalone";
|
|
438
|
-
let valuesArray;
|
|
439
|
-
if (context === "formatting" && args.formattingValues) {
|
|
440
|
-
const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
441
|
-
const width = options?.width ? String(options.width) : defaultWidth;
|
|
442
|
-
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
443
|
-
} else {
|
|
444
|
-
const defaultWidth = args.defaultWidth;
|
|
445
|
-
const width = options?.width ? String(options.width) : args.defaultWidth;
|
|
446
|
-
valuesArray = args.values[width] || args.values[defaultWidth];
|
|
447
|
-
}
|
|
448
|
-
const index = args.argumentCallback ? args.argumentCallback(value) : value;
|
|
449
|
-
return valuesArray[index];
|
|
450
|
-
};
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
// node_modules/date-fns/locale/en-US/_lib/localize.js
|
|
454
|
-
var eraValues = {
|
|
455
|
-
narrow: ["B", "A"],
|
|
456
|
-
abbreviated: ["BC", "AD"],
|
|
457
|
-
wide: ["Before Christ", "Anno Domini"]
|
|
458
|
-
};
|
|
459
|
-
var quarterValues = {
|
|
460
|
-
narrow: ["1", "2", "3", "4"],
|
|
461
|
-
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
462
|
-
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
463
|
-
};
|
|
464
|
-
var monthValues = {
|
|
465
|
-
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
466
|
-
abbreviated: [
|
|
467
|
-
"Jan",
|
|
468
|
-
"Feb",
|
|
469
|
-
"Mar",
|
|
470
|
-
"Apr",
|
|
471
|
-
"May",
|
|
472
|
-
"Jun",
|
|
473
|
-
"Jul",
|
|
474
|
-
"Aug",
|
|
475
|
-
"Sep",
|
|
476
|
-
"Oct",
|
|
477
|
-
"Nov",
|
|
478
|
-
"Dec"
|
|
479
|
-
],
|
|
480
|
-
wide: [
|
|
481
|
-
"January",
|
|
482
|
-
"February",
|
|
483
|
-
"March",
|
|
484
|
-
"April",
|
|
485
|
-
"May",
|
|
486
|
-
"June",
|
|
487
|
-
"July",
|
|
488
|
-
"August",
|
|
489
|
-
"September",
|
|
490
|
-
"October",
|
|
491
|
-
"November",
|
|
492
|
-
"December"
|
|
493
|
-
]
|
|
494
|
-
};
|
|
495
|
-
var dayValues = {
|
|
496
|
-
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
497
|
-
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
498
|
-
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
499
|
-
wide: [
|
|
500
|
-
"Sunday",
|
|
501
|
-
"Monday",
|
|
502
|
-
"Tuesday",
|
|
503
|
-
"Wednesday",
|
|
504
|
-
"Thursday",
|
|
505
|
-
"Friday",
|
|
506
|
-
"Saturday"
|
|
507
|
-
]
|
|
508
|
-
};
|
|
509
|
-
var dayPeriodValues = {
|
|
510
|
-
narrow: {
|
|
511
|
-
am: "a",
|
|
512
|
-
pm: "p",
|
|
513
|
-
midnight: "mi",
|
|
514
|
-
noon: "n",
|
|
515
|
-
morning: "morning",
|
|
516
|
-
afternoon: "afternoon",
|
|
517
|
-
evening: "evening",
|
|
518
|
-
night: "night"
|
|
519
|
-
},
|
|
520
|
-
abbreviated: {
|
|
521
|
-
am: "AM",
|
|
522
|
-
pm: "PM",
|
|
523
|
-
midnight: "midnight",
|
|
524
|
-
noon: "noon",
|
|
525
|
-
morning: "morning",
|
|
526
|
-
afternoon: "afternoon",
|
|
527
|
-
evening: "evening",
|
|
528
|
-
night: "night"
|
|
529
|
-
},
|
|
530
|
-
wide: {
|
|
531
|
-
am: "a.m.",
|
|
532
|
-
pm: "p.m.",
|
|
533
|
-
midnight: "midnight",
|
|
534
|
-
noon: "noon",
|
|
535
|
-
morning: "morning",
|
|
536
|
-
afternoon: "afternoon",
|
|
537
|
-
evening: "evening",
|
|
538
|
-
night: "night"
|
|
539
|
-
}
|
|
540
|
-
};
|
|
541
|
-
var formattingDayPeriodValues = {
|
|
542
|
-
narrow: {
|
|
543
|
-
am: "a",
|
|
544
|
-
pm: "p",
|
|
545
|
-
midnight: "mi",
|
|
546
|
-
noon: "n",
|
|
547
|
-
morning: "in the morning",
|
|
548
|
-
afternoon: "in the afternoon",
|
|
549
|
-
evening: "in the evening",
|
|
550
|
-
night: "at night"
|
|
551
|
-
},
|
|
552
|
-
abbreviated: {
|
|
553
|
-
am: "AM",
|
|
554
|
-
pm: "PM",
|
|
555
|
-
midnight: "midnight",
|
|
556
|
-
noon: "noon",
|
|
557
|
-
morning: "in the morning",
|
|
558
|
-
afternoon: "in the afternoon",
|
|
559
|
-
evening: "in the evening",
|
|
560
|
-
night: "at night"
|
|
561
|
-
},
|
|
562
|
-
wide: {
|
|
563
|
-
am: "a.m.",
|
|
564
|
-
pm: "p.m.",
|
|
565
|
-
midnight: "midnight",
|
|
566
|
-
noon: "noon",
|
|
567
|
-
morning: "in the morning",
|
|
568
|
-
afternoon: "in the afternoon",
|
|
569
|
-
evening: "in the evening",
|
|
570
|
-
night: "at night"
|
|
571
|
-
}
|
|
572
|
-
};
|
|
573
|
-
var ordinalNumber = (dirtyNumber, _options) => {
|
|
574
|
-
const number = Number(dirtyNumber);
|
|
575
|
-
const rem100 = number % 100;
|
|
576
|
-
if (rem100 > 20 || rem100 < 10) {
|
|
577
|
-
switch (rem100 % 10) {
|
|
578
|
-
case 1:
|
|
579
|
-
return number + "st";
|
|
580
|
-
case 2:
|
|
581
|
-
return number + "nd";
|
|
582
|
-
case 3:
|
|
583
|
-
return number + "rd";
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
return number + "th";
|
|
587
|
-
};
|
|
588
|
-
var localize = {
|
|
589
|
-
ordinalNumber,
|
|
590
|
-
era: buildLocalizeFn({
|
|
591
|
-
values: eraValues,
|
|
592
|
-
defaultWidth: "wide"
|
|
593
|
-
}),
|
|
594
|
-
quarter: buildLocalizeFn({
|
|
595
|
-
values: quarterValues,
|
|
596
|
-
defaultWidth: "wide",
|
|
597
|
-
argumentCallback: (quarter) => quarter - 1
|
|
598
|
-
}),
|
|
599
|
-
month: buildLocalizeFn({
|
|
600
|
-
values: monthValues,
|
|
601
|
-
defaultWidth: "wide"
|
|
602
|
-
}),
|
|
603
|
-
day: buildLocalizeFn({
|
|
604
|
-
values: dayValues,
|
|
605
|
-
defaultWidth: "wide"
|
|
606
|
-
}),
|
|
607
|
-
dayPeriod: buildLocalizeFn({
|
|
608
|
-
values: dayPeriodValues,
|
|
609
|
-
defaultWidth: "wide",
|
|
610
|
-
formattingValues: formattingDayPeriodValues,
|
|
611
|
-
defaultFormattingWidth: "wide"
|
|
612
|
-
})
|
|
613
|
-
};
|
|
614
|
-
|
|
615
|
-
// node_modules/date-fns/locale/_lib/buildMatchFn.js
|
|
616
|
-
function buildMatchFn(args) {
|
|
617
|
-
return (string, options = {}) => {
|
|
618
|
-
const width = options.width;
|
|
619
|
-
const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
620
|
-
const matchResult = string.match(matchPattern);
|
|
621
|
-
if (!matchResult) {
|
|
622
|
-
return null;
|
|
623
|
-
}
|
|
624
|
-
const matchedString = matchResult[0];
|
|
625
|
-
const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
626
|
-
const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : (
|
|
627
|
-
// [TODO] -- I challenge you to fix the type
|
|
628
|
-
findKey(parsePatterns, (pattern) => pattern.test(matchedString))
|
|
629
|
-
);
|
|
630
|
-
let value;
|
|
631
|
-
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
632
|
-
value = options.valueCallback ? (
|
|
633
|
-
// [TODO] -- I challenge you to fix the type
|
|
634
|
-
options.valueCallback(value)
|
|
635
|
-
) : value;
|
|
636
|
-
const rest = string.slice(matchedString.length);
|
|
637
|
-
return { value, rest };
|
|
638
|
-
};
|
|
639
|
-
}
|
|
640
|
-
function findKey(object, predicate) {
|
|
641
|
-
for (const key in object) {
|
|
642
|
-
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
|
|
643
|
-
return key;
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
return void 0;
|
|
647
|
-
}
|
|
648
|
-
function findIndex(array, predicate) {
|
|
649
|
-
for (let key = 0; key < array.length; key++) {
|
|
650
|
-
if (predicate(array[key])) {
|
|
651
|
-
return key;
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
return void 0;
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
// node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
|
|
658
|
-
function buildMatchPatternFn(args) {
|
|
659
|
-
return (string, options = {}) => {
|
|
660
|
-
const matchResult = string.match(args.matchPattern);
|
|
661
|
-
if (!matchResult) return null;
|
|
662
|
-
const matchedString = matchResult[0];
|
|
663
|
-
const parseResult = string.match(args.parsePattern);
|
|
664
|
-
if (!parseResult) return null;
|
|
665
|
-
let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
666
|
-
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
667
|
-
const rest = string.slice(matchedString.length);
|
|
668
|
-
return { value, rest };
|
|
669
|
-
};
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
// node_modules/date-fns/locale/en-US/_lib/match.js
|
|
673
|
-
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
674
|
-
var parseOrdinalNumberPattern = /\d+/i;
|
|
675
|
-
var matchEraPatterns = {
|
|
676
|
-
narrow: /^(b|a)/i,
|
|
677
|
-
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
678
|
-
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
679
|
-
};
|
|
680
|
-
var parseEraPatterns = {
|
|
681
|
-
any: [/^b/i, /^(a|c)/i]
|
|
682
|
-
};
|
|
683
|
-
var matchQuarterPatterns = {
|
|
684
|
-
narrow: /^[1234]/i,
|
|
685
|
-
abbreviated: /^q[1234]/i,
|
|
686
|
-
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
687
|
-
};
|
|
688
|
-
var parseQuarterPatterns = {
|
|
689
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
690
|
-
};
|
|
691
|
-
var matchMonthPatterns = {
|
|
692
|
-
narrow: /^[jfmasond]/i,
|
|
693
|
-
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
694
|
-
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
695
|
-
};
|
|
696
|
-
var parseMonthPatterns = {
|
|
697
|
-
narrow: [
|
|
698
|
-
/^j/i,
|
|
699
|
-
/^f/i,
|
|
700
|
-
/^m/i,
|
|
701
|
-
/^a/i,
|
|
702
|
-
/^m/i,
|
|
703
|
-
/^j/i,
|
|
704
|
-
/^j/i,
|
|
705
|
-
/^a/i,
|
|
706
|
-
/^s/i,
|
|
707
|
-
/^o/i,
|
|
708
|
-
/^n/i,
|
|
709
|
-
/^d/i
|
|
710
|
-
],
|
|
711
|
-
any: [
|
|
712
|
-
/^ja/i,
|
|
713
|
-
/^f/i,
|
|
714
|
-
/^mar/i,
|
|
715
|
-
/^ap/i,
|
|
716
|
-
/^may/i,
|
|
717
|
-
/^jun/i,
|
|
718
|
-
/^jul/i,
|
|
719
|
-
/^au/i,
|
|
720
|
-
/^s/i,
|
|
721
|
-
/^o/i,
|
|
722
|
-
/^n/i,
|
|
723
|
-
/^d/i
|
|
724
|
-
]
|
|
725
|
-
};
|
|
726
|
-
var matchDayPatterns = {
|
|
727
|
-
narrow: /^[smtwf]/i,
|
|
728
|
-
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
729
|
-
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
730
|
-
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
731
|
-
};
|
|
732
|
-
var parseDayPatterns = {
|
|
733
|
-
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
734
|
-
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
735
|
-
};
|
|
736
|
-
var matchDayPeriodPatterns = {
|
|
737
|
-
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
738
|
-
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
739
|
-
};
|
|
740
|
-
var parseDayPeriodPatterns = {
|
|
741
|
-
any: {
|
|
742
|
-
am: /^a/i,
|
|
743
|
-
pm: /^p/i,
|
|
744
|
-
midnight: /^mi/i,
|
|
745
|
-
noon: /^no/i,
|
|
746
|
-
morning: /morning/i,
|
|
747
|
-
afternoon: /afternoon/i,
|
|
748
|
-
evening: /evening/i,
|
|
749
|
-
night: /night/i
|
|
750
|
-
}
|
|
751
|
-
};
|
|
752
|
-
var match = {
|
|
753
|
-
ordinalNumber: buildMatchPatternFn({
|
|
754
|
-
matchPattern: matchOrdinalNumberPattern,
|
|
755
|
-
parsePattern: parseOrdinalNumberPattern,
|
|
756
|
-
valueCallback: (value) => parseInt(value, 10)
|
|
757
|
-
}),
|
|
758
|
-
era: buildMatchFn({
|
|
759
|
-
matchPatterns: matchEraPatterns,
|
|
760
|
-
defaultMatchWidth: "wide",
|
|
761
|
-
parsePatterns: parseEraPatterns,
|
|
762
|
-
defaultParseWidth: "any"
|
|
763
|
-
}),
|
|
764
|
-
quarter: buildMatchFn({
|
|
765
|
-
matchPatterns: matchQuarterPatterns,
|
|
766
|
-
defaultMatchWidth: "wide",
|
|
767
|
-
parsePatterns: parseQuarterPatterns,
|
|
768
|
-
defaultParseWidth: "any",
|
|
769
|
-
valueCallback: (index) => index + 1
|
|
770
|
-
}),
|
|
771
|
-
month: buildMatchFn({
|
|
772
|
-
matchPatterns: matchMonthPatterns,
|
|
773
|
-
defaultMatchWidth: "wide",
|
|
774
|
-
parsePatterns: parseMonthPatterns,
|
|
775
|
-
defaultParseWidth: "any"
|
|
776
|
-
}),
|
|
777
|
-
day: buildMatchFn({
|
|
778
|
-
matchPatterns: matchDayPatterns,
|
|
779
|
-
defaultMatchWidth: "wide",
|
|
780
|
-
parsePatterns: parseDayPatterns,
|
|
781
|
-
defaultParseWidth: "any"
|
|
782
|
-
}),
|
|
783
|
-
dayPeriod: buildMatchFn({
|
|
784
|
-
matchPatterns: matchDayPeriodPatterns,
|
|
785
|
-
defaultMatchWidth: "any",
|
|
786
|
-
parsePatterns: parseDayPeriodPatterns,
|
|
787
|
-
defaultParseWidth: "any"
|
|
788
|
-
})
|
|
789
|
-
};
|
|
790
|
-
|
|
791
|
-
// node_modules/date-fns/locale/en-US.js
|
|
792
|
-
var enUS = {
|
|
793
|
-
code: "en-US",
|
|
794
|
-
formatDistance,
|
|
795
|
-
formatLong,
|
|
796
|
-
formatRelative,
|
|
797
|
-
localize,
|
|
798
|
-
match,
|
|
799
|
-
options: {
|
|
800
|
-
weekStartsOn: 0,
|
|
801
|
-
firstWeekContainsDate: 1
|
|
802
|
-
}
|
|
803
|
-
};
|
|
804
|
-
|
|
805
|
-
// node_modules/date-fns/getDayOfYear.js
|
|
806
|
-
function getDayOfYear(date, options) {
|
|
807
|
-
const _date = toDate(date, options?.in);
|
|
808
|
-
const diff = differenceInCalendarDays(_date, startOfYear(_date));
|
|
809
|
-
const dayOfYear = diff + 1;
|
|
810
|
-
return dayOfYear;
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
// node_modules/date-fns/getISOWeek.js
|
|
814
|
-
function getISOWeek(date, options) {
|
|
815
|
-
const _date = toDate(date, options?.in);
|
|
816
|
-
const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);
|
|
817
|
-
return Math.round(diff / millisecondsInWeek) + 1;
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
// node_modules/date-fns/getWeekYear.js
|
|
821
|
-
function getWeekYear(date, options) {
|
|
822
|
-
const _date = toDate(date, options?.in);
|
|
823
|
-
const year = _date.getFullYear();
|
|
824
|
-
const defaultOptions2 = getDefaultOptions();
|
|
825
|
-
const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
|
|
826
|
-
const firstWeekOfNextYear = constructFrom(options?.in || date, 0);
|
|
827
|
-
firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
|
|
828
|
-
firstWeekOfNextYear.setHours(0, 0, 0, 0);
|
|
829
|
-
const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);
|
|
830
|
-
const firstWeekOfThisYear = constructFrom(options?.in || date, 0);
|
|
831
|
-
firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
|
|
832
|
-
firstWeekOfThisYear.setHours(0, 0, 0, 0);
|
|
833
|
-
const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);
|
|
834
|
-
if (+_date >= +startOfNextYear) {
|
|
835
|
-
return year + 1;
|
|
836
|
-
} else if (+_date >= +startOfThisYear) {
|
|
837
|
-
return year;
|
|
838
|
-
} else {
|
|
839
|
-
return year - 1;
|
|
840
|
-
}
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
// node_modules/date-fns/startOfWeekYear.js
|
|
844
|
-
function startOfWeekYear(date, options) {
|
|
845
|
-
const defaultOptions2 = getDefaultOptions();
|
|
846
|
-
const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
|
|
847
|
-
const year = getWeekYear(date, options);
|
|
848
|
-
const firstWeek = constructFrom(options?.in || date, 0);
|
|
849
|
-
firstWeek.setFullYear(year, 0, firstWeekContainsDate);
|
|
850
|
-
firstWeek.setHours(0, 0, 0, 0);
|
|
851
|
-
const _date = startOfWeek(firstWeek, options);
|
|
852
|
-
return _date;
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
// node_modules/date-fns/getWeek.js
|
|
856
|
-
function getWeek(date, options) {
|
|
857
|
-
const _date = toDate(date, options?.in);
|
|
858
|
-
const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);
|
|
859
|
-
return Math.round(diff / millisecondsInWeek) + 1;
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
// node_modules/date-fns/_lib/addLeadingZeros.js
|
|
863
|
-
function addLeadingZeros(number, targetLength) {
|
|
864
|
-
const sign = number < 0 ? "-" : "";
|
|
865
|
-
const output = Math.abs(number).toString().padStart(targetLength, "0");
|
|
866
|
-
return sign + output;
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
// node_modules/date-fns/_lib/format/lightFormatters.js
|
|
870
|
-
var lightFormatters = {
|
|
871
|
-
// Year
|
|
872
|
-
y(date, token) {
|
|
873
|
-
const signedYear = date.getFullYear();
|
|
874
|
-
const year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
875
|
-
return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
|
|
876
|
-
},
|
|
877
|
-
// Month
|
|
878
|
-
M(date, token) {
|
|
879
|
-
const month = date.getMonth();
|
|
880
|
-
return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
|
|
881
|
-
},
|
|
882
|
-
// Day of the month
|
|
883
|
-
d(date, token) {
|
|
884
|
-
return addLeadingZeros(date.getDate(), token.length);
|
|
885
|
-
},
|
|
886
|
-
// AM or PM
|
|
887
|
-
a(date, token) {
|
|
888
|
-
const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
|
|
889
|
-
switch (token) {
|
|
890
|
-
case "a":
|
|
891
|
-
case "aa":
|
|
892
|
-
return dayPeriodEnumValue.toUpperCase();
|
|
893
|
-
case "aaa":
|
|
894
|
-
return dayPeriodEnumValue;
|
|
895
|
-
case "aaaaa":
|
|
896
|
-
return dayPeriodEnumValue[0];
|
|
897
|
-
case "aaaa":
|
|
898
|
-
default:
|
|
899
|
-
return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
|
|
900
|
-
}
|
|
901
|
-
},
|
|
902
|
-
// Hour [1-12]
|
|
903
|
-
h(date, token) {
|
|
904
|
-
return addLeadingZeros(date.getHours() % 12 || 12, token.length);
|
|
905
|
-
},
|
|
906
|
-
// Hour [0-23]
|
|
907
|
-
H(date, token) {
|
|
908
|
-
return addLeadingZeros(date.getHours(), token.length);
|
|
909
|
-
},
|
|
910
|
-
// Minute
|
|
911
|
-
m(date, token) {
|
|
912
|
-
return addLeadingZeros(date.getMinutes(), token.length);
|
|
913
|
-
},
|
|
914
|
-
// Second
|
|
915
|
-
s(date, token) {
|
|
916
|
-
return addLeadingZeros(date.getSeconds(), token.length);
|
|
917
|
-
},
|
|
918
|
-
// Fraction of second
|
|
919
|
-
S(date, token) {
|
|
920
|
-
const numberOfDigits = token.length;
|
|
921
|
-
const milliseconds = date.getMilliseconds();
|
|
922
|
-
const fractionalSeconds = Math.trunc(
|
|
923
|
-
milliseconds * Math.pow(10, numberOfDigits - 3)
|
|
924
|
-
);
|
|
925
|
-
return addLeadingZeros(fractionalSeconds, token.length);
|
|
926
|
-
}
|
|
927
|
-
};
|
|
928
|
-
|
|
929
|
-
// node_modules/date-fns/_lib/format/formatters.js
|
|
930
|
-
var dayPeriodEnum = {
|
|
931
|
-
am: "am",
|
|
932
|
-
pm: "pm",
|
|
933
|
-
midnight: "midnight",
|
|
934
|
-
noon: "noon",
|
|
935
|
-
morning: "morning",
|
|
936
|
-
afternoon: "afternoon",
|
|
937
|
-
evening: "evening",
|
|
938
|
-
night: "night"
|
|
939
|
-
};
|
|
940
|
-
var formatters = {
|
|
941
|
-
// Era
|
|
942
|
-
G: function(date, token, localize2) {
|
|
943
|
-
const era = date.getFullYear() > 0 ? 1 : 0;
|
|
944
|
-
switch (token) {
|
|
945
|
-
// AD, BC
|
|
946
|
-
case "G":
|
|
947
|
-
case "GG":
|
|
948
|
-
case "GGG":
|
|
949
|
-
return localize2.era(era, { width: "abbreviated" });
|
|
950
|
-
// A, B
|
|
951
|
-
case "GGGGG":
|
|
952
|
-
return localize2.era(era, { width: "narrow" });
|
|
953
|
-
// Anno Domini, Before Christ
|
|
954
|
-
case "GGGG":
|
|
955
|
-
default:
|
|
956
|
-
return localize2.era(era, { width: "wide" });
|
|
957
|
-
}
|
|
958
|
-
},
|
|
959
|
-
// Year
|
|
960
|
-
y: function(date, token, localize2) {
|
|
961
|
-
if (token === "yo") {
|
|
962
|
-
const signedYear = date.getFullYear();
|
|
963
|
-
const year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
964
|
-
return localize2.ordinalNumber(year, { unit: "year" });
|
|
965
|
-
}
|
|
966
|
-
return lightFormatters.y(date, token);
|
|
967
|
-
},
|
|
968
|
-
// Local week-numbering year
|
|
969
|
-
Y: function(date, token, localize2, options) {
|
|
970
|
-
const signedWeekYear = getWeekYear(date, options);
|
|
971
|
-
const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
|
|
972
|
-
if (token === "YY") {
|
|
973
|
-
const twoDigitYear = weekYear % 100;
|
|
974
|
-
return addLeadingZeros(twoDigitYear, 2);
|
|
975
|
-
}
|
|
976
|
-
if (token === "Yo") {
|
|
977
|
-
return localize2.ordinalNumber(weekYear, { unit: "year" });
|
|
978
|
-
}
|
|
979
|
-
return addLeadingZeros(weekYear, token.length);
|
|
980
|
-
},
|
|
981
|
-
// ISO week-numbering year
|
|
982
|
-
R: function(date, token) {
|
|
983
|
-
const isoWeekYear = getISOWeekYear(date);
|
|
984
|
-
return addLeadingZeros(isoWeekYear, token.length);
|
|
985
|
-
},
|
|
986
|
-
// Extended year. This is a single number designating the year of this calendar system.
|
|
987
|
-
// The main difference between `y` and `u` localizers are B.C. years:
|
|
988
|
-
// | Year | `y` | `u` |
|
|
989
|
-
// |------|-----|-----|
|
|
990
|
-
// | AC 1 | 1 | 1 |
|
|
991
|
-
// | BC 1 | 1 | 0 |
|
|
992
|
-
// | BC 2 | 2 | -1 |
|
|
993
|
-
// Also `yy` always returns the last two digits of a year,
|
|
994
|
-
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
995
|
-
u: function(date, token) {
|
|
996
|
-
const year = date.getFullYear();
|
|
997
|
-
return addLeadingZeros(year, token.length);
|
|
998
|
-
},
|
|
999
|
-
// Quarter
|
|
1000
|
-
Q: function(date, token, localize2) {
|
|
1001
|
-
const quarter = Math.ceil((date.getMonth() + 1) / 3);
|
|
1002
|
-
switch (token) {
|
|
1003
|
-
// 1, 2, 3, 4
|
|
1004
|
-
case "Q":
|
|
1005
|
-
return String(quarter);
|
|
1006
|
-
// 01, 02, 03, 04
|
|
1007
|
-
case "QQ":
|
|
1008
|
-
return addLeadingZeros(quarter, 2);
|
|
1009
|
-
// 1st, 2nd, 3rd, 4th
|
|
1010
|
-
case "Qo":
|
|
1011
|
-
return localize2.ordinalNumber(quarter, { unit: "quarter" });
|
|
1012
|
-
// Q1, Q2, Q3, Q4
|
|
1013
|
-
case "QQQ":
|
|
1014
|
-
return localize2.quarter(quarter, {
|
|
1015
|
-
width: "abbreviated",
|
|
1016
|
-
context: "formatting"
|
|
1017
|
-
});
|
|
1018
|
-
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
1019
|
-
case "QQQQQ":
|
|
1020
|
-
return localize2.quarter(quarter, {
|
|
1021
|
-
width: "narrow",
|
|
1022
|
-
context: "formatting"
|
|
1023
|
-
});
|
|
1024
|
-
// 1st quarter, 2nd quarter, ...
|
|
1025
|
-
case "QQQQ":
|
|
1026
|
-
default:
|
|
1027
|
-
return localize2.quarter(quarter, {
|
|
1028
|
-
width: "wide",
|
|
1029
|
-
context: "formatting"
|
|
1030
|
-
});
|
|
1031
|
-
}
|
|
1032
|
-
},
|
|
1033
|
-
// Stand-alone quarter
|
|
1034
|
-
q: function(date, token, localize2) {
|
|
1035
|
-
const quarter = Math.ceil((date.getMonth() + 1) / 3);
|
|
1036
|
-
switch (token) {
|
|
1037
|
-
// 1, 2, 3, 4
|
|
1038
|
-
case "q":
|
|
1039
|
-
return String(quarter);
|
|
1040
|
-
// 01, 02, 03, 04
|
|
1041
|
-
case "qq":
|
|
1042
|
-
return addLeadingZeros(quarter, 2);
|
|
1043
|
-
// 1st, 2nd, 3rd, 4th
|
|
1044
|
-
case "qo":
|
|
1045
|
-
return localize2.ordinalNumber(quarter, { unit: "quarter" });
|
|
1046
|
-
// Q1, Q2, Q3, Q4
|
|
1047
|
-
case "qqq":
|
|
1048
|
-
return localize2.quarter(quarter, {
|
|
1049
|
-
width: "abbreviated",
|
|
1050
|
-
context: "standalone"
|
|
1051
|
-
});
|
|
1052
|
-
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
1053
|
-
case "qqqqq":
|
|
1054
|
-
return localize2.quarter(quarter, {
|
|
1055
|
-
width: "narrow",
|
|
1056
|
-
context: "standalone"
|
|
1057
|
-
});
|
|
1058
|
-
// 1st quarter, 2nd quarter, ...
|
|
1059
|
-
case "qqqq":
|
|
1060
|
-
default:
|
|
1061
|
-
return localize2.quarter(quarter, {
|
|
1062
|
-
width: "wide",
|
|
1063
|
-
context: "standalone"
|
|
1064
|
-
});
|
|
1065
|
-
}
|
|
1066
|
-
},
|
|
1067
|
-
// Month
|
|
1068
|
-
M: function(date, token, localize2) {
|
|
1069
|
-
const month = date.getMonth();
|
|
1070
|
-
switch (token) {
|
|
1071
|
-
case "M":
|
|
1072
|
-
case "MM":
|
|
1073
|
-
return lightFormatters.M(date, token);
|
|
1074
|
-
// 1st, 2nd, ..., 12th
|
|
1075
|
-
case "Mo":
|
|
1076
|
-
return localize2.ordinalNumber(month + 1, { unit: "month" });
|
|
1077
|
-
// Jan, Feb, ..., Dec
|
|
1078
|
-
case "MMM":
|
|
1079
|
-
return localize2.month(month, {
|
|
1080
|
-
width: "abbreviated",
|
|
1081
|
-
context: "formatting"
|
|
1082
|
-
});
|
|
1083
|
-
// J, F, ..., D
|
|
1084
|
-
case "MMMMM":
|
|
1085
|
-
return localize2.month(month, {
|
|
1086
|
-
width: "narrow",
|
|
1087
|
-
context: "formatting"
|
|
1088
|
-
});
|
|
1089
|
-
// January, February, ..., December
|
|
1090
|
-
case "MMMM":
|
|
1091
|
-
default:
|
|
1092
|
-
return localize2.month(month, { width: "wide", context: "formatting" });
|
|
1093
|
-
}
|
|
1094
|
-
},
|
|
1095
|
-
// Stand-alone month
|
|
1096
|
-
L: function(date, token, localize2) {
|
|
1097
|
-
const month = date.getMonth();
|
|
1098
|
-
switch (token) {
|
|
1099
|
-
// 1, 2, ..., 12
|
|
1100
|
-
case "L":
|
|
1101
|
-
return String(month + 1);
|
|
1102
|
-
// 01, 02, ..., 12
|
|
1103
|
-
case "LL":
|
|
1104
|
-
return addLeadingZeros(month + 1, 2);
|
|
1105
|
-
// 1st, 2nd, ..., 12th
|
|
1106
|
-
case "Lo":
|
|
1107
|
-
return localize2.ordinalNumber(month + 1, { unit: "month" });
|
|
1108
|
-
// Jan, Feb, ..., Dec
|
|
1109
|
-
case "LLL":
|
|
1110
|
-
return localize2.month(month, {
|
|
1111
|
-
width: "abbreviated",
|
|
1112
|
-
context: "standalone"
|
|
1113
|
-
});
|
|
1114
|
-
// J, F, ..., D
|
|
1115
|
-
case "LLLLL":
|
|
1116
|
-
return localize2.month(month, {
|
|
1117
|
-
width: "narrow",
|
|
1118
|
-
context: "standalone"
|
|
1119
|
-
});
|
|
1120
|
-
// January, February, ..., December
|
|
1121
|
-
case "LLLL":
|
|
1122
|
-
default:
|
|
1123
|
-
return localize2.month(month, { width: "wide", context: "standalone" });
|
|
1124
|
-
}
|
|
1125
|
-
},
|
|
1126
|
-
// Local week of year
|
|
1127
|
-
w: function(date, token, localize2, options) {
|
|
1128
|
-
const week = getWeek(date, options);
|
|
1129
|
-
if (token === "wo") {
|
|
1130
|
-
return localize2.ordinalNumber(week, { unit: "week" });
|
|
1131
|
-
}
|
|
1132
|
-
return addLeadingZeros(week, token.length);
|
|
1133
|
-
},
|
|
1134
|
-
// ISO week of year
|
|
1135
|
-
I: function(date, token, localize2) {
|
|
1136
|
-
const isoWeek = getISOWeek(date);
|
|
1137
|
-
if (token === "Io") {
|
|
1138
|
-
return localize2.ordinalNumber(isoWeek, { unit: "week" });
|
|
1139
|
-
}
|
|
1140
|
-
return addLeadingZeros(isoWeek, token.length);
|
|
1141
|
-
},
|
|
1142
|
-
// Day of the month
|
|
1143
|
-
d: function(date, token, localize2) {
|
|
1144
|
-
if (token === "do") {
|
|
1145
|
-
return localize2.ordinalNumber(date.getDate(), { unit: "date" });
|
|
1146
|
-
}
|
|
1147
|
-
return lightFormatters.d(date, token);
|
|
1148
|
-
},
|
|
1149
|
-
// Day of year
|
|
1150
|
-
D: function(date, token, localize2) {
|
|
1151
|
-
const dayOfYear = getDayOfYear(date);
|
|
1152
|
-
if (token === "Do") {
|
|
1153
|
-
return localize2.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
|
|
1154
|
-
}
|
|
1155
|
-
return addLeadingZeros(dayOfYear, token.length);
|
|
1156
|
-
},
|
|
1157
|
-
// Day of week
|
|
1158
|
-
E: function(date, token, localize2) {
|
|
1159
|
-
const dayOfWeek = date.getDay();
|
|
1160
|
-
switch (token) {
|
|
1161
|
-
// Tue
|
|
1162
|
-
case "E":
|
|
1163
|
-
case "EE":
|
|
1164
|
-
case "EEE":
|
|
1165
|
-
return localize2.day(dayOfWeek, {
|
|
1166
|
-
width: "abbreviated",
|
|
1167
|
-
context: "formatting"
|
|
1168
|
-
});
|
|
1169
|
-
// T
|
|
1170
|
-
case "EEEEE":
|
|
1171
|
-
return localize2.day(dayOfWeek, {
|
|
1172
|
-
width: "narrow",
|
|
1173
|
-
context: "formatting"
|
|
1174
|
-
});
|
|
1175
|
-
// Tu
|
|
1176
|
-
case "EEEEEE":
|
|
1177
|
-
return localize2.day(dayOfWeek, {
|
|
1178
|
-
width: "short",
|
|
1179
|
-
context: "formatting"
|
|
1180
|
-
});
|
|
1181
|
-
// Tuesday
|
|
1182
|
-
case "EEEE":
|
|
1183
|
-
default:
|
|
1184
|
-
return localize2.day(dayOfWeek, {
|
|
1185
|
-
width: "wide",
|
|
1186
|
-
context: "formatting"
|
|
1187
|
-
});
|
|
1188
|
-
}
|
|
1189
|
-
},
|
|
1190
|
-
// Local day of week
|
|
1191
|
-
e: function(date, token, localize2, options) {
|
|
1192
|
-
const dayOfWeek = date.getDay();
|
|
1193
|
-
const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
1194
|
-
switch (token) {
|
|
1195
|
-
// Numerical value (Nth day of week with current locale or weekStartsOn)
|
|
1196
|
-
case "e":
|
|
1197
|
-
return String(localDayOfWeek);
|
|
1198
|
-
// Padded numerical value
|
|
1199
|
-
case "ee":
|
|
1200
|
-
return addLeadingZeros(localDayOfWeek, 2);
|
|
1201
|
-
// 1st, 2nd, ..., 7th
|
|
1202
|
-
case "eo":
|
|
1203
|
-
return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
|
|
1204
|
-
case "eee":
|
|
1205
|
-
return localize2.day(dayOfWeek, {
|
|
1206
|
-
width: "abbreviated",
|
|
1207
|
-
context: "formatting"
|
|
1208
|
-
});
|
|
1209
|
-
// T
|
|
1210
|
-
case "eeeee":
|
|
1211
|
-
return localize2.day(dayOfWeek, {
|
|
1212
|
-
width: "narrow",
|
|
1213
|
-
context: "formatting"
|
|
1214
|
-
});
|
|
1215
|
-
// Tu
|
|
1216
|
-
case "eeeeee":
|
|
1217
|
-
return localize2.day(dayOfWeek, {
|
|
1218
|
-
width: "short",
|
|
1219
|
-
context: "formatting"
|
|
1220
|
-
});
|
|
1221
|
-
// Tuesday
|
|
1222
|
-
case "eeee":
|
|
1223
|
-
default:
|
|
1224
|
-
return localize2.day(dayOfWeek, {
|
|
1225
|
-
width: "wide",
|
|
1226
|
-
context: "formatting"
|
|
1227
|
-
});
|
|
1228
|
-
}
|
|
1229
|
-
},
|
|
1230
|
-
// Stand-alone local day of week
|
|
1231
|
-
c: function(date, token, localize2, options) {
|
|
1232
|
-
const dayOfWeek = date.getDay();
|
|
1233
|
-
const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
1234
|
-
switch (token) {
|
|
1235
|
-
// Numerical value (same as in `e`)
|
|
1236
|
-
case "c":
|
|
1237
|
-
return String(localDayOfWeek);
|
|
1238
|
-
// Padded numerical value
|
|
1239
|
-
case "cc":
|
|
1240
|
-
return addLeadingZeros(localDayOfWeek, token.length);
|
|
1241
|
-
// 1st, 2nd, ..., 7th
|
|
1242
|
-
case "co":
|
|
1243
|
-
return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
|
|
1244
|
-
case "ccc":
|
|
1245
|
-
return localize2.day(dayOfWeek, {
|
|
1246
|
-
width: "abbreviated",
|
|
1247
|
-
context: "standalone"
|
|
1248
|
-
});
|
|
1249
|
-
// T
|
|
1250
|
-
case "ccccc":
|
|
1251
|
-
return localize2.day(dayOfWeek, {
|
|
1252
|
-
width: "narrow",
|
|
1253
|
-
context: "standalone"
|
|
1254
|
-
});
|
|
1255
|
-
// Tu
|
|
1256
|
-
case "cccccc":
|
|
1257
|
-
return localize2.day(dayOfWeek, {
|
|
1258
|
-
width: "short",
|
|
1259
|
-
context: "standalone"
|
|
1260
|
-
});
|
|
1261
|
-
// Tuesday
|
|
1262
|
-
case "cccc":
|
|
1263
|
-
default:
|
|
1264
|
-
return localize2.day(dayOfWeek, {
|
|
1265
|
-
width: "wide",
|
|
1266
|
-
context: "standalone"
|
|
1267
|
-
});
|
|
1268
|
-
}
|
|
1269
|
-
},
|
|
1270
|
-
// ISO day of week
|
|
1271
|
-
i: function(date, token, localize2) {
|
|
1272
|
-
const dayOfWeek = date.getDay();
|
|
1273
|
-
const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
|
|
1274
|
-
switch (token) {
|
|
1275
|
-
// 2
|
|
1276
|
-
case "i":
|
|
1277
|
-
return String(isoDayOfWeek);
|
|
1278
|
-
// 02
|
|
1279
|
-
case "ii":
|
|
1280
|
-
return addLeadingZeros(isoDayOfWeek, token.length);
|
|
1281
|
-
// 2nd
|
|
1282
|
-
case "io":
|
|
1283
|
-
return localize2.ordinalNumber(isoDayOfWeek, { unit: "day" });
|
|
1284
|
-
// Tue
|
|
1285
|
-
case "iii":
|
|
1286
|
-
return localize2.day(dayOfWeek, {
|
|
1287
|
-
width: "abbreviated",
|
|
1288
|
-
context: "formatting"
|
|
1289
|
-
});
|
|
1290
|
-
// T
|
|
1291
|
-
case "iiiii":
|
|
1292
|
-
return localize2.day(dayOfWeek, {
|
|
1293
|
-
width: "narrow",
|
|
1294
|
-
context: "formatting"
|
|
1295
|
-
});
|
|
1296
|
-
// Tu
|
|
1297
|
-
case "iiiiii":
|
|
1298
|
-
return localize2.day(dayOfWeek, {
|
|
1299
|
-
width: "short",
|
|
1300
|
-
context: "formatting"
|
|
1301
|
-
});
|
|
1302
|
-
// Tuesday
|
|
1303
|
-
case "iiii":
|
|
1304
|
-
default:
|
|
1305
|
-
return localize2.day(dayOfWeek, {
|
|
1306
|
-
width: "wide",
|
|
1307
|
-
context: "formatting"
|
|
1308
|
-
});
|
|
1309
|
-
}
|
|
1310
|
-
},
|
|
1311
|
-
// AM or PM
|
|
1312
|
-
a: function(date, token, localize2) {
|
|
1313
|
-
const hours = date.getHours();
|
|
1314
|
-
const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
|
1315
|
-
switch (token) {
|
|
1316
|
-
case "a":
|
|
1317
|
-
case "aa":
|
|
1318
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1319
|
-
width: "abbreviated",
|
|
1320
|
-
context: "formatting"
|
|
1321
|
-
});
|
|
1322
|
-
case "aaa":
|
|
1323
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1324
|
-
width: "abbreviated",
|
|
1325
|
-
context: "formatting"
|
|
1326
|
-
}).toLowerCase();
|
|
1327
|
-
case "aaaaa":
|
|
1328
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1329
|
-
width: "narrow",
|
|
1330
|
-
context: "formatting"
|
|
1331
|
-
});
|
|
1332
|
-
case "aaaa":
|
|
1333
|
-
default:
|
|
1334
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1335
|
-
width: "wide",
|
|
1336
|
-
context: "formatting"
|
|
1337
|
-
});
|
|
1338
|
-
}
|
|
1339
|
-
},
|
|
1340
|
-
// AM, PM, midnight, noon
|
|
1341
|
-
b: function(date, token, localize2) {
|
|
1342
|
-
const hours = date.getHours();
|
|
1343
|
-
let dayPeriodEnumValue;
|
|
1344
|
-
if (hours === 12) {
|
|
1345
|
-
dayPeriodEnumValue = dayPeriodEnum.noon;
|
|
1346
|
-
} else if (hours === 0) {
|
|
1347
|
-
dayPeriodEnumValue = dayPeriodEnum.midnight;
|
|
1348
|
-
} else {
|
|
1349
|
-
dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
|
1350
|
-
}
|
|
1351
|
-
switch (token) {
|
|
1352
|
-
case "b":
|
|
1353
|
-
case "bb":
|
|
1354
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1355
|
-
width: "abbreviated",
|
|
1356
|
-
context: "formatting"
|
|
1357
|
-
});
|
|
1358
|
-
case "bbb":
|
|
1359
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1360
|
-
width: "abbreviated",
|
|
1361
|
-
context: "formatting"
|
|
1362
|
-
}).toLowerCase();
|
|
1363
|
-
case "bbbbb":
|
|
1364
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1365
|
-
width: "narrow",
|
|
1366
|
-
context: "formatting"
|
|
1367
|
-
});
|
|
1368
|
-
case "bbbb":
|
|
1369
|
-
default:
|
|
1370
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1371
|
-
width: "wide",
|
|
1372
|
-
context: "formatting"
|
|
1373
|
-
});
|
|
1374
|
-
}
|
|
1375
|
-
},
|
|
1376
|
-
// in the morning, in the afternoon, in the evening, at night
|
|
1377
|
-
B: function(date, token, localize2) {
|
|
1378
|
-
const hours = date.getHours();
|
|
1379
|
-
let dayPeriodEnumValue;
|
|
1380
|
-
if (hours >= 17) {
|
|
1381
|
-
dayPeriodEnumValue = dayPeriodEnum.evening;
|
|
1382
|
-
} else if (hours >= 12) {
|
|
1383
|
-
dayPeriodEnumValue = dayPeriodEnum.afternoon;
|
|
1384
|
-
} else if (hours >= 4) {
|
|
1385
|
-
dayPeriodEnumValue = dayPeriodEnum.morning;
|
|
1386
|
-
} else {
|
|
1387
|
-
dayPeriodEnumValue = dayPeriodEnum.night;
|
|
1388
|
-
}
|
|
1389
|
-
switch (token) {
|
|
1390
|
-
case "B":
|
|
1391
|
-
case "BB":
|
|
1392
|
-
case "BBB":
|
|
1393
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1394
|
-
width: "abbreviated",
|
|
1395
|
-
context: "formatting"
|
|
1396
|
-
});
|
|
1397
|
-
case "BBBBB":
|
|
1398
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1399
|
-
width: "narrow",
|
|
1400
|
-
context: "formatting"
|
|
1401
|
-
});
|
|
1402
|
-
case "BBBB":
|
|
1403
|
-
default:
|
|
1404
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1405
|
-
width: "wide",
|
|
1406
|
-
context: "formatting"
|
|
1407
|
-
});
|
|
1408
|
-
}
|
|
1409
|
-
},
|
|
1410
|
-
// Hour [1-12]
|
|
1411
|
-
h: function(date, token, localize2) {
|
|
1412
|
-
if (token === "ho") {
|
|
1413
|
-
let hours = date.getHours() % 12;
|
|
1414
|
-
if (hours === 0) hours = 12;
|
|
1415
|
-
return localize2.ordinalNumber(hours, { unit: "hour" });
|
|
1416
|
-
}
|
|
1417
|
-
return lightFormatters.h(date, token);
|
|
1418
|
-
},
|
|
1419
|
-
// Hour [0-23]
|
|
1420
|
-
H: function(date, token, localize2) {
|
|
1421
|
-
if (token === "Ho") {
|
|
1422
|
-
return localize2.ordinalNumber(date.getHours(), { unit: "hour" });
|
|
1423
|
-
}
|
|
1424
|
-
return lightFormatters.H(date, token);
|
|
1425
|
-
},
|
|
1426
|
-
// Hour [0-11]
|
|
1427
|
-
K: function(date, token, localize2) {
|
|
1428
|
-
const hours = date.getHours() % 12;
|
|
1429
|
-
if (token === "Ko") {
|
|
1430
|
-
return localize2.ordinalNumber(hours, { unit: "hour" });
|
|
1431
|
-
}
|
|
1432
|
-
return addLeadingZeros(hours, token.length);
|
|
1433
|
-
},
|
|
1434
|
-
// Hour [1-24]
|
|
1435
|
-
k: function(date, token, localize2) {
|
|
1436
|
-
let hours = date.getHours();
|
|
1437
|
-
if (hours === 0) hours = 24;
|
|
1438
|
-
if (token === "ko") {
|
|
1439
|
-
return localize2.ordinalNumber(hours, { unit: "hour" });
|
|
1440
|
-
}
|
|
1441
|
-
return addLeadingZeros(hours, token.length);
|
|
1442
|
-
},
|
|
1443
|
-
// Minute
|
|
1444
|
-
m: function(date, token, localize2) {
|
|
1445
|
-
if (token === "mo") {
|
|
1446
|
-
return localize2.ordinalNumber(date.getMinutes(), { unit: "minute" });
|
|
1447
|
-
}
|
|
1448
|
-
return lightFormatters.m(date, token);
|
|
1449
|
-
},
|
|
1450
|
-
// Second
|
|
1451
|
-
s: function(date, token, localize2) {
|
|
1452
|
-
if (token === "so") {
|
|
1453
|
-
return localize2.ordinalNumber(date.getSeconds(), { unit: "second" });
|
|
1454
|
-
}
|
|
1455
|
-
return lightFormatters.s(date, token);
|
|
1456
|
-
},
|
|
1457
|
-
// Fraction of second
|
|
1458
|
-
S: function(date, token) {
|
|
1459
|
-
return lightFormatters.S(date, token);
|
|
1460
|
-
},
|
|
1461
|
-
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1462
|
-
X: function(date, token, _localize) {
|
|
1463
|
-
const timezoneOffset = date.getTimezoneOffset();
|
|
1464
|
-
if (timezoneOffset === 0) {
|
|
1465
|
-
return "Z";
|
|
1466
|
-
}
|
|
1467
|
-
switch (token) {
|
|
1468
|
-
// Hours and optional minutes
|
|
1469
|
-
case "X":
|
|
1470
|
-
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
1471
|
-
// Hours, minutes and optional seconds without `:` delimiter
|
|
1472
|
-
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1473
|
-
// so this token always has the same output as `XX`
|
|
1474
|
-
case "XXXX":
|
|
1475
|
-
case "XX":
|
|
1476
|
-
return formatTimezone(timezoneOffset);
|
|
1477
|
-
// Hours, minutes and optional seconds with `:` delimiter
|
|
1478
|
-
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1479
|
-
// so this token always has the same output as `XXX`
|
|
1480
|
-
case "XXXXX":
|
|
1481
|
-
case "XXX":
|
|
1482
|
-
// Hours and minutes with `:` delimiter
|
|
1483
|
-
default:
|
|
1484
|
-
return formatTimezone(timezoneOffset, ":");
|
|
1485
|
-
}
|
|
1486
|
-
},
|
|
1487
|
-
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
1488
|
-
x: function(date, token, _localize) {
|
|
1489
|
-
const timezoneOffset = date.getTimezoneOffset();
|
|
1490
|
-
switch (token) {
|
|
1491
|
-
// Hours and optional minutes
|
|
1492
|
-
case "x":
|
|
1493
|
-
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
1494
|
-
// Hours, minutes and optional seconds without `:` delimiter
|
|
1495
|
-
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1496
|
-
// so this token always has the same output as `xx`
|
|
1497
|
-
case "xxxx":
|
|
1498
|
-
case "xx":
|
|
1499
|
-
return formatTimezone(timezoneOffset);
|
|
1500
|
-
// Hours, minutes and optional seconds with `:` delimiter
|
|
1501
|
-
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1502
|
-
// so this token always has the same output as `xxx`
|
|
1503
|
-
case "xxxxx":
|
|
1504
|
-
case "xxx":
|
|
1505
|
-
// Hours and minutes with `:` delimiter
|
|
1506
|
-
default:
|
|
1507
|
-
return formatTimezone(timezoneOffset, ":");
|
|
1508
|
-
}
|
|
1509
|
-
},
|
|
1510
|
-
// Timezone (GMT)
|
|
1511
|
-
O: function(date, token, _localize) {
|
|
1512
|
-
const timezoneOffset = date.getTimezoneOffset();
|
|
1513
|
-
switch (token) {
|
|
1514
|
-
// Short
|
|
1515
|
-
case "O":
|
|
1516
|
-
case "OO":
|
|
1517
|
-
case "OOO":
|
|
1518
|
-
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
1519
|
-
// Long
|
|
1520
|
-
case "OOOO":
|
|
1521
|
-
default:
|
|
1522
|
-
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
1523
|
-
}
|
|
1524
|
-
},
|
|
1525
|
-
// Timezone (specific non-location)
|
|
1526
|
-
z: function(date, token, _localize) {
|
|
1527
|
-
const timezoneOffset = date.getTimezoneOffset();
|
|
1528
|
-
switch (token) {
|
|
1529
|
-
// Short
|
|
1530
|
-
case "z":
|
|
1531
|
-
case "zz":
|
|
1532
|
-
case "zzz":
|
|
1533
|
-
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
1534
|
-
// Long
|
|
1535
|
-
case "zzzz":
|
|
1536
|
-
default:
|
|
1537
|
-
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
1538
|
-
}
|
|
1539
|
-
},
|
|
1540
|
-
// Seconds timestamp
|
|
1541
|
-
t: function(date, token, _localize) {
|
|
1542
|
-
const timestamp = Math.trunc(+date / 1e3);
|
|
1543
|
-
return addLeadingZeros(timestamp, token.length);
|
|
1544
|
-
},
|
|
1545
|
-
// Milliseconds timestamp
|
|
1546
|
-
T: function(date, token, _localize) {
|
|
1547
|
-
return addLeadingZeros(+date, token.length);
|
|
1548
|
-
}
|
|
1549
|
-
};
|
|
1550
|
-
function formatTimezoneShort(offset, delimiter = "") {
|
|
1551
|
-
const sign = offset > 0 ? "-" : "+";
|
|
1552
|
-
const absOffset = Math.abs(offset);
|
|
1553
|
-
const hours = Math.trunc(absOffset / 60);
|
|
1554
|
-
const minutes = absOffset % 60;
|
|
1555
|
-
if (minutes === 0) {
|
|
1556
|
-
return sign + String(hours);
|
|
1557
|
-
}
|
|
1558
|
-
return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
|
|
1559
|
-
}
|
|
1560
|
-
function formatTimezoneWithOptionalMinutes(offset, delimiter) {
|
|
1561
|
-
if (offset % 60 === 0) {
|
|
1562
|
-
const sign = offset > 0 ? "-" : "+";
|
|
1563
|
-
return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
|
|
1564
|
-
}
|
|
1565
|
-
return formatTimezone(offset, delimiter);
|
|
1566
|
-
}
|
|
1567
|
-
function formatTimezone(offset, delimiter = "") {
|
|
1568
|
-
const sign = offset > 0 ? "-" : "+";
|
|
1569
|
-
const absOffset = Math.abs(offset);
|
|
1570
|
-
const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);
|
|
1571
|
-
const minutes = addLeadingZeros(absOffset % 60, 2);
|
|
1572
|
-
return sign + hours + delimiter + minutes;
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
|
-
// node_modules/date-fns/_lib/format/longFormatters.js
|
|
1576
|
-
var dateLongFormatter = (pattern, formatLong2) => {
|
|
1577
|
-
switch (pattern) {
|
|
1578
|
-
case "P":
|
|
1579
|
-
return formatLong2.date({ width: "short" });
|
|
1580
|
-
case "PP":
|
|
1581
|
-
return formatLong2.date({ width: "medium" });
|
|
1582
|
-
case "PPP":
|
|
1583
|
-
return formatLong2.date({ width: "long" });
|
|
1584
|
-
case "PPPP":
|
|
1585
|
-
default:
|
|
1586
|
-
return formatLong2.date({ width: "full" });
|
|
1587
|
-
}
|
|
1588
|
-
};
|
|
1589
|
-
var timeLongFormatter = (pattern, formatLong2) => {
|
|
1590
|
-
switch (pattern) {
|
|
1591
|
-
case "p":
|
|
1592
|
-
return formatLong2.time({ width: "short" });
|
|
1593
|
-
case "pp":
|
|
1594
|
-
return formatLong2.time({ width: "medium" });
|
|
1595
|
-
case "ppp":
|
|
1596
|
-
return formatLong2.time({ width: "long" });
|
|
1597
|
-
case "pppp":
|
|
1598
|
-
default:
|
|
1599
|
-
return formatLong2.time({ width: "full" });
|
|
1600
|
-
}
|
|
1601
|
-
};
|
|
1602
|
-
var dateTimeLongFormatter = (pattern, formatLong2) => {
|
|
1603
|
-
const matchResult = pattern.match(/(P+)(p+)?/) || [];
|
|
1604
|
-
const datePattern = matchResult[1];
|
|
1605
|
-
const timePattern = matchResult[2];
|
|
1606
|
-
if (!timePattern) {
|
|
1607
|
-
return dateLongFormatter(pattern, formatLong2);
|
|
1608
|
-
}
|
|
1609
|
-
let dateTimeFormat;
|
|
1610
|
-
switch (datePattern) {
|
|
1611
|
-
case "P":
|
|
1612
|
-
dateTimeFormat = formatLong2.dateTime({ width: "short" });
|
|
1613
|
-
break;
|
|
1614
|
-
case "PP":
|
|
1615
|
-
dateTimeFormat = formatLong2.dateTime({ width: "medium" });
|
|
1616
|
-
break;
|
|
1617
|
-
case "PPP":
|
|
1618
|
-
dateTimeFormat = formatLong2.dateTime({ width: "long" });
|
|
1619
|
-
break;
|
|
1620
|
-
case "PPPP":
|
|
1621
|
-
default:
|
|
1622
|
-
dateTimeFormat = formatLong2.dateTime({ width: "full" });
|
|
1623
|
-
break;
|
|
1624
|
-
}
|
|
1625
|
-
return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
|
|
1626
|
-
};
|
|
1627
|
-
var longFormatters = {
|
|
1628
|
-
p: timeLongFormatter,
|
|
1629
|
-
P: dateTimeLongFormatter
|
|
1630
|
-
};
|
|
1631
|
-
|
|
1632
|
-
// node_modules/date-fns/_lib/protectedTokens.js
|
|
1633
|
-
var dayOfYearTokenRE = /^D+$/;
|
|
1634
|
-
var weekYearTokenRE = /^Y+$/;
|
|
1635
|
-
var throwTokens = ["D", "DD", "YY", "YYYY"];
|
|
1636
|
-
function isProtectedDayOfYearToken(token) {
|
|
1637
|
-
return dayOfYearTokenRE.test(token);
|
|
1638
|
-
}
|
|
1639
|
-
function isProtectedWeekYearToken(token) {
|
|
1640
|
-
return weekYearTokenRE.test(token);
|
|
1641
|
-
}
|
|
1642
|
-
function warnOrThrowProtectedError(token, format2, input) {
|
|
1643
|
-
const _message = message(token, format2, input);
|
|
1644
|
-
console.warn(_message);
|
|
1645
|
-
if (throwTokens.includes(token)) throw new RangeError(_message);
|
|
1646
|
-
}
|
|
1647
|
-
function message(token, format2, input) {
|
|
1648
|
-
const subject = token[0] === "Y" ? "years" : "days of the month";
|
|
1649
|
-
return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format2}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
// node_modules/date-fns/format.js
|
|
1653
|
-
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
|
|
1654
|
-
var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
|
|
1655
|
-
var escapedStringRegExp = /^'([^]*?)'?$/;
|
|
1656
|
-
var doubleQuoteRegExp = /''/g;
|
|
1657
|
-
var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
1658
|
-
function format(date, formatStr, options) {
|
|
1659
|
-
const defaultOptions2 = getDefaultOptions();
|
|
1660
|
-
const locale = options?.locale ?? defaultOptions2.locale ?? enUS;
|
|
1661
|
-
const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
|
|
1662
|
-
const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
|
|
1663
|
-
const originalDate = toDate(date, options?.in);
|
|
1664
|
-
if (!isValid(originalDate)) {
|
|
1665
|
-
throw new RangeError("Invalid time value");
|
|
1666
|
-
}
|
|
1667
|
-
let parts = formatStr.match(longFormattingTokensRegExp).map((substring) => {
|
|
1668
|
-
const firstCharacter = substring[0];
|
|
1669
|
-
if (firstCharacter === "p" || firstCharacter === "P") {
|
|
1670
|
-
const longFormatter = longFormatters[firstCharacter];
|
|
1671
|
-
return longFormatter(substring, locale.formatLong);
|
|
1672
|
-
}
|
|
1673
|
-
return substring;
|
|
1674
|
-
}).join("").match(formattingTokensRegExp).map((substring) => {
|
|
1675
|
-
if (substring === "''") {
|
|
1676
|
-
return { isToken: false, value: "'" };
|
|
1677
|
-
}
|
|
1678
|
-
const firstCharacter = substring[0];
|
|
1679
|
-
if (firstCharacter === "'") {
|
|
1680
|
-
return { isToken: false, value: cleanEscapedString(substring) };
|
|
1681
|
-
}
|
|
1682
|
-
if (formatters[firstCharacter]) {
|
|
1683
|
-
return { isToken: true, value: substring };
|
|
1684
|
-
}
|
|
1685
|
-
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
|
|
1686
|
-
throw new RangeError(
|
|
1687
|
-
"Format string contains an unescaped latin alphabet character `" + firstCharacter + "`"
|
|
1688
|
-
);
|
|
1689
|
-
}
|
|
1690
|
-
return { isToken: false, value: substring };
|
|
1691
|
-
});
|
|
1692
|
-
if (locale.localize.preprocessor) {
|
|
1693
|
-
parts = locale.localize.preprocessor(originalDate, parts);
|
|
1694
|
-
}
|
|
1695
|
-
const formatterOptions = {
|
|
1696
|
-
firstWeekContainsDate,
|
|
1697
|
-
weekStartsOn,
|
|
1698
|
-
locale
|
|
1699
|
-
};
|
|
1700
|
-
return parts.map((part) => {
|
|
1701
|
-
if (!part.isToken) return part.value;
|
|
1702
|
-
const token = part.value;
|
|
1703
|
-
if (!options?.useAdditionalWeekYearTokens && isProtectedWeekYearToken(token) || !options?.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(token)) {
|
|
1704
|
-
warnOrThrowProtectedError(token, formatStr, String(date));
|
|
1705
|
-
}
|
|
1706
|
-
const formatter = formatters[token[0]];
|
|
1707
|
-
return formatter(originalDate, token, locale.localize, formatterOptions);
|
|
1708
|
-
}).join("");
|
|
1709
|
-
}
|
|
1710
|
-
function cleanEscapedString(input) {
|
|
1711
|
-
const matched = input.match(escapedStringRegExp);
|
|
1712
|
-
if (!matched) {
|
|
1713
|
-
return input;
|
|
1714
|
-
}
|
|
1715
|
-
return matched[1].replace(doubleQuoteRegExp, "'");
|
|
1716
|
-
}
|
|
1717
|
-
|
|
1718
|
-
// node_modules/date-fns/isSameWeek.js
|
|
1719
|
-
function isSameWeek(laterDate, earlierDate, options) {
|
|
1720
|
-
const [laterDate_, earlierDate_] = normalizeDates(
|
|
1721
|
-
options?.in,
|
|
1722
|
-
laterDate,
|
|
1723
|
-
earlierDate
|
|
1724
|
-
);
|
|
1725
|
-
return +startOfWeek(laterDate_, options) === +startOfWeek(earlierDate_, options);
|
|
1726
|
-
}
|
|
1727
|
-
|
|
1728
|
-
// node_modules/date-fns/isToday.js
|
|
1729
|
-
function isToday(date, options) {
|
|
1730
|
-
return isSameDay(
|
|
1731
|
-
constructFrom(options?.in || date, date),
|
|
1732
|
-
constructNow(options?.in || date)
|
|
1733
|
-
);
|
|
1734
|
-
}
|
|
1735
|
-
|
|
1736
|
-
// node_modules/date-fns/isTomorrow.js
|
|
1737
|
-
function isTomorrow(date, options) {
|
|
1738
|
-
return isSameDay(
|
|
1739
|
-
date,
|
|
1740
|
-
addDays(constructNow(options?.in || date), 1),
|
|
1741
|
-
options
|
|
1742
|
-
);
|
|
1743
|
-
}
|
|
1744
|
-
|
|
1745
|
-
// src/util/common.tsx
|
|
1746
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
1747
|
-
function getServiceImagePath(service) {
|
|
1748
|
-
switch (service) {
|
|
1749
|
-
case "slack" /* SLACK */:
|
|
1750
|
-
return "/images/brand_icons/slack.svg";
|
|
1751
|
-
case "google_mail" /* GMAIL */:
|
|
1752
|
-
return "/images/brand_icons/gmail.svg";
|
|
1753
|
-
case "google_calendar" /* GCAL */:
|
|
1754
|
-
return "/images/brand_icons/gcal.svg";
|
|
1755
|
-
case "microsoft_teams" /* MSTEAMS */:
|
|
1756
|
-
return "/images/brand_icons/msteams.svg";
|
|
1757
|
-
case "microsoft_mail" /* MSMAIL */:
|
|
1758
|
-
return "/images/brand_icons/msmail.svg";
|
|
1759
|
-
case "microsoft_calendar" /* MSCAL */:
|
|
1760
|
-
return "/images/brand_icons/mscal.svg";
|
|
1761
|
-
case "atlassian_jira" /* AJIRA */:
|
|
1762
|
-
return "/images/brand_icons/jira.png";
|
|
1763
|
-
default:
|
|
1764
|
-
return void 0;
|
|
1765
|
-
}
|
|
1766
|
-
}
|
|
1767
|
-
function getCategoryIcon(service, variant, size) {
|
|
1768
|
-
if (!size) {
|
|
1769
|
-
size = 24;
|
|
1770
|
-
}
|
|
1771
|
-
switch (service) {
|
|
1772
|
-
case "fire" /* FIRE */:
|
|
1773
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(FireIcon, { variant });
|
|
1774
|
-
case "alert" /* ALERT */:
|
|
1775
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(AlertIcon, { variant });
|
|
1776
|
-
default:
|
|
1777
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, {});
|
|
1778
|
-
}
|
|
1779
|
-
}
|
|
1780
|
-
function formatCustomRelative(date) {
|
|
1781
|
-
const now = /* @__PURE__ */ new Date();
|
|
1782
|
-
if (isToday(date)) {
|
|
1783
|
-
return `Today @ ${format(date, "h:mm a")}`;
|
|
1784
|
-
}
|
|
1785
|
-
if (isTomorrow(date)) {
|
|
1786
|
-
return `Tomorrow @ ${format(date, "h:mm a")}`;
|
|
1787
|
-
}
|
|
1788
|
-
if (isSameWeek(date, now, { weekStartsOn: 1 })) {
|
|
1789
|
-
return `${format(date, "EEEE")} @ ${format(date, "h:mm a")}`;
|
|
1790
|
-
}
|
|
1791
|
-
return `${format(date, "EEEE, do MMMM")} @ ${format(date, "h:mm a")}`;
|
|
1792
|
-
}
|
|
1793
|
-
|
|
1794
|
-
// src/components/atoms/icons/brand_icons/brand_icon.tsx
|
|
1795
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
1796
|
-
var import_clsx = __toESM(require("clsx"));
|
|
1797
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
1798
|
-
function BrandIcon({ size = 24, className, service }) {
|
|
1799
|
-
const imgPath = getServiceImagePath(service);
|
|
1800
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1801
|
-
"div",
|
|
1802
|
-
{
|
|
1803
|
-
className: (0, import_tailwind_merge.twMerge)((0, import_clsx.default)(`flex-none select-none`), className),
|
|
1804
|
-
style: { width: `${size}px`, height: `${size}px` },
|
|
1805
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "w-full h-full", children: service && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1806
|
-
"img",
|
|
1807
|
-
{
|
|
1808
|
-
src: imgPath,
|
|
1809
|
-
className: "w-full h-full object-contain border-0",
|
|
1810
|
-
alt: ""
|
|
1811
|
-
}
|
|
1812
|
-
) })
|
|
1813
|
-
}
|
|
1814
|
-
);
|
|
1815
|
-
}
|
|
1816
|
-
|
|
1817
|
-
// src/components/atoms/icons/base_icons/ExternalLink.tsx
|
|
1818
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
1819
|
-
function ExternalLink({
|
|
1820
|
-
size = 24,
|
|
1821
|
-
color = "#1D1D1F",
|
|
1822
|
-
fillColor = "none"
|
|
1823
|
-
}) {
|
|
1824
|
-
const getIconData = () => {
|
|
1825
|
-
switch (size) {
|
|
1826
|
-
case 16:
|
|
1827
|
-
return {
|
|
1828
|
-
viewBox: "0 0 16 16",
|
|
1829
|
-
path: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M6.66699 3.99996H4.00033C3.26395 3.99996 2.66699 4.59691 2.66699 5.33329V12C2.66699 12.7363 3.26395 13.3333 4.00033 13.3333H10.667C11.4034 13.3333 12.0003 12.7363 12.0003 12V9.33329M9.33366 2.66663H13.3337M13.3337 2.66663V6.66663M13.3337 2.66663L6.66699 9.33329", stroke: color, "stroke-width": "1.25", "stroke-linecap": "round", "stroke-linejoin": "round" })
|
|
1830
|
-
};
|
|
1831
|
-
case 20:
|
|
1832
|
-
return {
|
|
1833
|
-
viewBox: "0 0 20 20",
|
|
1834
|
-
path: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M8.33301 5.00004H4.99967C4.0792 5.00004 3.33301 5.74623 3.33301 6.66671V15C3.33301 15.9205 4.0792 16.6667 4.99967 16.6667H13.333C14.2535 16.6667 14.9997 15.9205 14.9997 15V11.6667M11.6663 3.33337H16.6663M16.6663 3.33337V8.33337M16.6663 3.33337L8.33301 11.6667", stroke: color, "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })
|
|
1835
|
-
};
|
|
1836
|
-
case 24:
|
|
1837
|
-
return {
|
|
1838
|
-
viewBox: "0 0 24 24",
|
|
1839
|
-
path: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M10 6H6C4.89543 6 4 6.89543 4 8V18C4 19.1046 4.89543 20 6 20H16C17.1046 20 18 19.1046 18 18V14M14 4H20M20 4V10M20 4L10 14", stroke: color, "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })
|
|
1840
|
-
};
|
|
1841
|
-
case 36:
|
|
1842
|
-
return {
|
|
1843
|
-
viewBox: "0 0 36 36",
|
|
1844
|
-
path: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M15 9H9C7.34315 9 6 10.3431 6 12V27C6 28.6569 7.34315 30 9 30H24C25.6569 30 27 28.6569 27 27V21M21 6H30M30 6V15M30 6L15 21", stroke: color, "stroke-width": "2.25", "stroke-linecap": "round", "stroke-linejoin": "round" })
|
|
1845
|
-
};
|
|
1846
|
-
}
|
|
1847
|
-
};
|
|
1848
|
-
const { viewBox, path } = getIconData();
|
|
1849
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1850
|
-
"svg",
|
|
1851
|
-
{
|
|
1852
|
-
width: size,
|
|
1853
|
-
height: size,
|
|
1854
|
-
viewBox,
|
|
1855
|
-
fill: "none",
|
|
1856
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1857
|
-
children: path
|
|
1858
|
-
}
|
|
1859
|
-
);
|
|
1860
|
-
}
|
|
1861
|
-
|
|
1862
|
-
// src/components/molecules/text_content/sender_source_row/sender_source_row.tsx
|
|
1863
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1864
|
-
function SenderSourceRow({
|
|
1865
|
-
leftText,
|
|
1866
|
-
seperator,
|
|
1867
|
-
rightText,
|
|
1868
|
-
onClick,
|
|
1869
|
-
shrunk
|
|
1870
|
-
}) {
|
|
1871
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-wrap h-[18px] w-full place-content-between text-neutral-1 text-[14px] leading-[130%]", children: [
|
|
1872
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex gap-[4px] place-items-center flex-wrap", children: [
|
|
1873
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "body-small-bold", children: leftText }),
|
|
1874
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "body-small", children: seperator }),
|
|
1875
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "body-small-bold", children: rightText }),
|
|
1876
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "label-3 flex", children: formatCustomRelative(/* @__PURE__ */ new Date()) })
|
|
1877
|
-
] }),
|
|
1878
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { onClick, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ExternalLink, { size: shrunk ? 16 : 24 }) })
|
|
1879
|
-
] });
|
|
1880
|
-
}
|
|
1881
|
-
|
|
1882
|
-
// src/components/molecules/text_content/subject_line_row/subject_line_row.tsx
|
|
1883
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1884
|
-
function SubjectLineRow({ text }) {
|
|
1885
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex h-[17px]", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "text-neutral-900 body-small-bold", children: text }) });
|
|
1886
|
-
}
|
|
1887
|
-
|
|
1888
|
-
// src/components/molecules/text_content/metadata_row/metadata_row.tsx
|
|
1889
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1890
|
-
function MetadataRow({ metadata }) {
|
|
1891
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex h-[18px] w-[309px] flex-none body-small text-neutral-900 gap-2", children: [
|
|
1892
|
-
metadata && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { children: metadata[0] + (metadata.length == 2 ? "," : "") }),
|
|
1893
|
-
metadata?.length == 2 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { children: metadata[1] })
|
|
1894
|
-
] });
|
|
1895
|
-
}
|
|
1896
|
-
|
|
1897
|
-
// src/components/organisms/preview_card/preview_card.tsx
|
|
1898
|
-
var import_clsx4 = __toESM(require("clsx"));
|
|
1899
|
-
|
|
1900
|
-
// src/components/molecules/checkboxes/main_checkbox/secondary_checkbox.tsx
|
|
1901
|
-
var import_clsx2 = __toESM(require("clsx"));
|
|
1902
|
-
|
|
1903
|
-
// src/components/atoms/icons/base_icons/CheckBox.tsx
|
|
1904
|
-
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1905
|
-
function CheckBox({ size = 24, fillColor }) {
|
|
1906
|
-
const getIconData = () => {
|
|
1907
|
-
let viewBox2 = "";
|
|
1908
|
-
let scale = 1;
|
|
1909
|
-
let maskId = `checkbox-filled-mask-${size}`;
|
|
1910
|
-
switch (size) {
|
|
1911
|
-
case 16:
|
|
1912
|
-
viewBox2 = "0 0 16 16";
|
|
1913
|
-
scale = 16 / 36;
|
|
1914
|
-
break;
|
|
1915
|
-
case 20:
|
|
1916
|
-
viewBox2 = "0 0 20 20";
|
|
1917
|
-
scale = 20 / 36;
|
|
1918
|
-
break;
|
|
1919
|
-
case 24:
|
|
1920
|
-
viewBox2 = "0 0 24 24";
|
|
1921
|
-
scale = 24 / 36;
|
|
1922
|
-
break;
|
|
1923
|
-
case 36:
|
|
1924
|
-
viewBox2 = "0 0 36 36";
|
|
1925
|
-
scale = 1;
|
|
1926
|
-
break;
|
|
1927
|
-
}
|
|
1928
|
-
const path2 = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("g", { transform: `scale(${scale})`, children: [
|
|
1929
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("mask", { id: maskId, fill: "white", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M4.5 11.25C4.5 7.52208 7.52208 4.5 11.25 4.5H24.75C28.4779 4.5 31.5 7.52208 31.5 11.25V24.75C31.5 28.4779 28.4779 31.5 24.75 31.5H11.25C7.52208 31.5 4.5 28.4779 4.5 24.75V11.25Z" }) }),
|
|
1930
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1931
|
-
"path",
|
|
1932
|
-
{
|
|
1933
|
-
d: "M4.5 11.25C4.5 7.52208 7.52208 4.5 11.25 4.5H24.75C28.4779 4.5 31.5 7.52208 31.5 11.25V24.75C31.5 28.4779 28.4779 31.5 24.75 31.5H11.25C7.52208 31.5 4.5 28.4779 4.5 24.75V11.25Z",
|
|
1934
|
-
fill: fillColor
|
|
1935
|
-
}
|
|
1936
|
-
),
|
|
1937
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1938
|
-
"path",
|
|
1939
|
-
{
|
|
1940
|
-
d: "M11.25 4.5V6.75H24.75V4.5V2.25H11.25V4.5ZM31.5 11.25H29.25V24.75H31.5H33.75V11.25H31.5ZM24.75 31.5V29.25H11.25V31.5V33.75H24.75V31.5ZM4.5 24.75H6.75V11.25H4.5H2.25V24.75H4.5ZM11.25 31.5V29.25C8.76472 29.25 6.75 27.2353 6.75 24.75H4.5H2.25C2.25 29.7206 6.27944 33.75 11.25 33.75V31.5ZM31.5 24.75H29.25C29.25 27.2353 27.2353 29.25 24.75 29.25V31.5V33.75C29.7206 33.75 33.75 29.7206 33.75 24.75H31.5ZM24.75 4.5V6.75C27.2353 6.75 29.25 8.76472 29.25 11.25H31.5H33.75C33.75 6.27944 29.7206 2.25 24.75 2.25V4.5ZM11.25 4.5V2.25C6.27944 2.25 2.25 6.27944 2.25 11.25H4.5H6.75C6.75 8.76472 8.76472 6.75 11.25 6.75V4.5Z",
|
|
1941
|
-
fill: "#1D1D1F",
|
|
1942
|
-
mask: `url(#${maskId})`
|
|
1943
|
-
}
|
|
1944
|
-
),
|
|
1945
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1946
|
-
"path",
|
|
1947
|
-
{
|
|
1948
|
-
d: "M13.9502 18L16.6502 20.7L22.0502 15.3",
|
|
1949
|
-
stroke: "#1D1D1F",
|
|
1950
|
-
strokeWidth: "2.25",
|
|
1951
|
-
strokeLinecap: "round",
|
|
1952
|
-
strokeLinejoin: "round"
|
|
1953
|
-
}
|
|
1954
|
-
)
|
|
1955
|
-
] });
|
|
1956
|
-
return { viewBox: viewBox2, path: path2 };
|
|
1957
|
-
};
|
|
1958
|
-
const { viewBox, path } = getIconData();
|
|
1959
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1960
|
-
"svg",
|
|
1961
|
-
{
|
|
1962
|
-
width: size,
|
|
1963
|
-
height: size,
|
|
1964
|
-
viewBox,
|
|
1965
|
-
fill: "none",
|
|
1966
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1967
|
-
children: path
|
|
1968
|
-
}
|
|
1969
|
-
);
|
|
1970
|
-
}
|
|
1971
|
-
function CheckBoxEmpty({ size = 24, fillColor }) {
|
|
1972
|
-
const getIconData = () => {
|
|
1973
|
-
let viewBox2 = "";
|
|
1974
|
-
let scale = 1;
|
|
1975
|
-
let maskId = `checkbox-filled-empty-mask-${size}`;
|
|
1976
|
-
switch (size) {
|
|
1977
|
-
case 16:
|
|
1978
|
-
viewBox2 = "0 0 16 16";
|
|
1979
|
-
scale = 16 / 36;
|
|
1980
|
-
break;
|
|
1981
|
-
case 20:
|
|
1982
|
-
viewBox2 = "0 0 20 20";
|
|
1983
|
-
scale = 20 / 36;
|
|
1984
|
-
break;
|
|
1985
|
-
case 24:
|
|
1986
|
-
viewBox2 = "0 0 24 24";
|
|
1987
|
-
scale = 24 / 36;
|
|
1988
|
-
break;
|
|
1989
|
-
case 36:
|
|
1990
|
-
viewBox2 = "0 0 36 36";
|
|
1991
|
-
scale = 1;
|
|
1992
|
-
break;
|
|
1993
|
-
}
|
|
1994
|
-
const path2 = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("g", { transform: `scale(${scale})`, children: [
|
|
1995
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("mask", { id: maskId, fill: "white", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M4.5 11.25C4.5 7.52208 7.52208 4.5 11.25 4.5H24.75C28.4779 4.5 31.5 7.52208 31.5 11.25V24.75C31.5 28.4779 28.4779 31.5 24.75 31.5H11.25C7.52208 31.5 4.5 28.4779 4.5 24.75V11.25Z" }) }),
|
|
1996
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1997
|
-
"path",
|
|
1998
|
-
{
|
|
1999
|
-
d: "M4.5 11.25C4.5 7.52208 7.52208 4.5 11.25 4.5H24.75C28.4779 4.5 31.5 7.52208 31.5 11.25V24.75C31.5 28.4779 28.4779 31.5 24.75 31.5H11.25C7.52208 31.5 4.5 28.4779 4.5 24.75V11.25Z",
|
|
2000
|
-
fill: fillColor
|
|
2001
|
-
}
|
|
2002
|
-
),
|
|
2003
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2004
|
-
"path",
|
|
2005
|
-
{
|
|
2006
|
-
d: "M11.25 4.5V6.75H24.75V4.5V2.25H11.25V4.5ZM31.5 11.25H29.25V24.75H31.5H33.75V11.25H31.5ZM24.75 31.5V29.25H11.25V31.5V33.75H24.75V31.5ZM4.5 24.75H6.75V11.25H4.5H2.25V24.75H4.5ZM11.25 31.5V29.25C8.76472 29.25 6.75 27.2353 6.75 24.75H4.5H2.25C2.25 29.7206 6.27944 33.75 11.25 33.75V31.5ZM31.5 24.75H29.25C29.25 27.2353 27.2353 29.25 24.75 29.25V31.5V33.75C29.7206 33.75 33.75 29.7206 33.75 24.75H31.5ZM24.75 4.5V6.75C27.2353 6.75 29.25 8.76472 29.25 11.25H31.5H33.75C33.75 6.27944 29.7206 2.25 24.75 2.25V4.5ZM11.25 4.5V2.25C6.27944 2.25 2.25 6.27944 2.25 11.25H4.5H6.75C6.75 8.76472 8.76472 6.75 11.25 6.75V4.5Z",
|
|
2007
|
-
fill: "#1D1D1F",
|
|
2008
|
-
mask: `url(#${maskId})`
|
|
2009
|
-
}
|
|
2010
|
-
)
|
|
2011
|
-
] });
|
|
2012
|
-
return { viewBox: viewBox2, path: path2 };
|
|
2013
|
-
};
|
|
2014
|
-
const { viewBox, path } = getIconData();
|
|
2015
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2016
|
-
"svg",
|
|
2017
|
-
{
|
|
2018
|
-
width: size,
|
|
2019
|
-
height: size,
|
|
2020
|
-
viewBox,
|
|
2021
|
-
fill: "none",
|
|
2022
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2023
|
-
children: path
|
|
2024
|
-
}
|
|
2025
|
-
);
|
|
2026
|
-
}
|
|
2027
|
-
|
|
2028
|
-
// src/components/molecules/checkboxes/main_checkbox/secondary_checkbox.tsx
|
|
2029
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
2030
|
-
function SecondaryCheckBox({ active, onClick }) {
|
|
2031
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2032
|
-
"div",
|
|
2033
|
-
{
|
|
2034
|
-
className: (0, import_clsx2.default)(
|
|
2035
|
-
"flex flex-none w-min h-min place-items-center place-content-center p-0"
|
|
2036
|
-
),
|
|
2037
|
-
onClick: (e) => {
|
|
2038
|
-
e.stopPropagation();
|
|
2039
|
-
onClick && onClick();
|
|
2040
|
-
},
|
|
2041
|
-
children: active ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(CheckBox, { size: 36, fillColor: "#E8FE99" }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(CheckBoxEmpty, { size: 36, fillColor: "#FFFFFF" })
|
|
2042
|
-
}
|
|
2043
|
-
);
|
|
2044
|
-
}
|
|
2045
|
-
|
|
2046
|
-
// src/components/molecules/buttons/icon_button/category_icon_button/category_icon_button.tsx
|
|
2047
|
-
var import_clsx3 = __toESM(require("clsx"));
|
|
2048
|
-
|
|
2049
|
-
// src/components/atoms/icons/category_icons/category_icon.tsx
|
|
2050
|
-
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2051
|
-
function CategoryIcon({ size = 24, icon, variant }) {
|
|
2052
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2053
|
-
"div",
|
|
2054
|
-
{
|
|
2055
|
-
className: `flex-none`,
|
|
2056
|
-
style: { width: `${size}px`, height: `${size}px` },
|
|
2057
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "w-full h-full", children: icon && getCategoryIcon(icon, variant, size) })
|
|
2058
|
-
}
|
|
2059
|
-
);
|
|
2060
|
-
}
|
|
2061
|
-
|
|
2062
|
-
// src/components/molecules/buttons/icon_button/category_icon_button/category_icon_button.tsx
|
|
2063
|
-
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2064
|
-
function CategoryIconButton({ icon, label, active }) {
|
|
2065
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2066
|
-
"div",
|
|
2067
|
-
{
|
|
2068
|
-
className: `w-min h-min flex flex-none flex-col place-items-center gap-2 hover:grayscale-0 ${active ? "" : "grayscale"}`,
|
|
2069
|
-
children: [
|
|
2070
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2071
|
-
"div",
|
|
2072
|
-
{
|
|
2073
|
-
className: (0, import_clsx3.default)(
|
|
2074
|
-
"w-[32px] h-[32px] flex flex-none flex-col place-items-center place-content-center rounded-lg hover:bg-qtneutral-200 hover:border-2 hover:border-qtneutral-500"
|
|
2075
|
-
),
|
|
2076
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CategoryIcon, { icon, size: 24 })
|
|
2077
|
-
}
|
|
2078
|
-
),
|
|
2079
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "font-medium text-[0.7rem] text-qtneutral-900", children: label })
|
|
2080
|
-
]
|
|
2081
|
-
}
|
|
2082
|
-
);
|
|
2083
|
-
}
|
|
2084
|
-
|
|
2085
|
-
// src/components/organisms/preview_card/preview_card.tsx
|
|
2086
|
-
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2087
|
-
function PreviewCard({
|
|
2088
|
-
onRead,
|
|
2089
|
-
onSelected,
|
|
2090
|
-
service,
|
|
2091
|
-
subjectLine
|
|
2092
|
-
}) {
|
|
2093
|
-
const [selected, setSelected] = (0, import_react.useState)(false);
|
|
2094
|
-
const [checked, setChecked] = (0, import_react.useState)(false);
|
|
2095
|
-
const [read, setRead] = (0, import_react.useState)(false);
|
|
2096
|
-
function intializeState() {
|
|
2097
|
-
}
|
|
2098
|
-
function toggleRead() {
|
|
2099
|
-
if (onRead) {
|
|
2100
|
-
try {
|
|
2101
|
-
onRead();
|
|
2102
|
-
} catch (e) {
|
|
2103
|
-
console.log(`Failed to execute: onRead() | [${e}]`);
|
|
2104
|
-
return;
|
|
2105
|
-
}
|
|
2106
|
-
}
|
|
2107
|
-
setRead(!read);
|
|
2108
|
-
}
|
|
2109
|
-
function toggleSelected() {
|
|
2110
|
-
if (onSelected) {
|
|
2111
|
-
try {
|
|
2112
|
-
onSelected();
|
|
2113
|
-
} catch (e) {
|
|
2114
|
-
console.log(`Failed to execute: onSelected() | [${e}]`);
|
|
2115
|
-
return;
|
|
2116
|
-
}
|
|
2117
|
-
}
|
|
2118
|
-
setSelected(!selected);
|
|
2119
|
-
}
|
|
2120
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2121
|
-
"div",
|
|
2122
|
-
{
|
|
2123
|
-
className: (0, import_clsx4.default)(
|
|
2124
|
-
"flex gap-4 h-min w-[409px] bg-neutral-6 rounded-3xl p-4 border-[2px] preview-card-shadow",
|
|
2125
|
-
selected ? "bg-qtpurple-200 border-qtpurple-200" : "",
|
|
2126
|
-
!read ? "border-qtpurple-500" : "border-neutral-6"
|
|
2127
|
-
),
|
|
2128
|
-
onClick: (e) => {
|
|
2129
|
-
e.stopPropagation();
|
|
2130
|
-
toggleSelected();
|
|
2131
|
-
if (!read) {
|
|
2132
|
-
toggleRead();
|
|
2133
|
-
}
|
|
2134
|
-
},
|
|
2135
|
-
children: [
|
|
2136
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-4 place-items-center", children: [
|
|
2137
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2138
|
-
SecondaryCheckBox,
|
|
2139
|
-
{
|
|
2140
|
-
active: checked,
|
|
2141
|
-
onClick: () => setChecked(!checked)
|
|
2142
|
-
}
|
|
2143
|
-
),
|
|
2144
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(BrandIcon, { service: service && service }),
|
|
2145
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CategoryIconButton, { active: true, icon: "fire" /* FIRE */ }),
|
|
2146
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CategoryIconButton, { active: true, icon: "alert" /* ALERT */ })
|
|
2147
|
-
] }),
|
|
2148
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
2149
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col ", children: [
|
|
2150
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2151
|
-
SenderSourceRow,
|
|
2152
|
-
{
|
|
2153
|
-
leftText: "Sender",
|
|
2154
|
-
seperator: "via",
|
|
2155
|
-
rightText: "App Source"
|
|
2156
|
-
}
|
|
2157
|
-
),
|
|
2158
|
-
subjectLine && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SubjectLineRow, { text: subjectLine }),
|
|
2159
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MetadataRow, { metadata: ["Time/Date", "Internal/External"] })
|
|
2160
|
-
] }),
|
|
2161
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "bg-white flex flex-none flex-col gap-2 h-[136px] rounded-2xl text-sm p-4 leading-[120%] font-normal", children: "Too long, don\u2019t read AI summary. Lorem ipsum dolor sit amet, consectetur adipiscing. Dolor sit amet, consectetur. Reprehenderit in voluptate velit." })
|
|
2162
|
-
] })
|
|
2163
|
-
]
|
|
2164
|
-
}
|
|
2165
|
-
);
|
|
2166
|
-
}
|
|
2167
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
2168
|
-
0 && (module.exports = {
|
|
2169
|
-
PreviewCard
|
|
2170
|
-
});
|
|
2
|
+
//# sourceMappingURL=index.js.map
|