@kong-ui-public/core 1.5.11 → 1.5.12-pr.1371.afc8f9a9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.es.js +264 -275
- package/dist/core.umd.js +1 -1
- package/package.json +1 -1
package/dist/core.es.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { inject as
|
|
3
|
-
function
|
|
1
|
+
import q from "axios";
|
|
2
|
+
import { inject as re, ref as U, readonly as $, computed as ne, nextTick as G, watchEffect as ie } from "vue";
|
|
3
|
+
function wt() {
|
|
4
4
|
return {
|
|
5
5
|
getAxiosInstance: (t = {}) => {
|
|
6
6
|
try {
|
|
7
|
-
const r =
|
|
8
|
-
return typeof r == "function" ? r(t) :
|
|
7
|
+
const r = re("get-axios-instance", void 0);
|
|
8
|
+
return typeof r == "function" ? r(t) : q.create({
|
|
9
9
|
withCredentials: !0,
|
|
10
10
|
timeout: 3e4,
|
|
11
11
|
...t
|
|
12
12
|
});
|
|
13
13
|
} catch (r) {
|
|
14
|
-
return console.warn("getAxiosInstance:", r.message || r),
|
|
14
|
+
return console.warn("getAxiosInstance:", r.message || r), q.create({
|
|
15
15
|
withCredentials: !0,
|
|
16
16
|
timeout: 3e4,
|
|
17
17
|
...t
|
|
@@ -24,15 +24,15 @@ function Et() {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function W(a) {
|
|
28
28
|
"@babel/helpers - typeof";
|
|
29
|
-
return
|
|
29
|
+
return W = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
30
30
|
return typeof e;
|
|
31
31
|
} : function(e) {
|
|
32
32
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
33
|
-
},
|
|
33
|
+
}, W(a);
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function D(a) {
|
|
36
36
|
if (a === null || a === !0 || a === !1)
|
|
37
37
|
return NaN;
|
|
38
38
|
var e = Number(a);
|
|
@@ -45,49 +45,49 @@ function g(a, e) {
|
|
|
45
45
|
function y(a) {
|
|
46
46
|
g(1, arguments);
|
|
47
47
|
var e = Object.prototype.toString.call(a);
|
|
48
|
-
return a instanceof Date ||
|
|
48
|
+
return a instanceof Date || W(a) === "object" && e === "[object Date]" ? new Date(a.getTime()) : typeof a == "number" || e === "[object Number]" ? new Date(a) : ((typeof a == "string" || e === "[object String]") && typeof console < "u" && (console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"), console.warn(new Error().stack)), /* @__PURE__ */ new Date(NaN));
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function oe(a, e) {
|
|
51
51
|
g(2, arguments);
|
|
52
|
-
var t = y(a).getTime(), r =
|
|
52
|
+
var t = y(a).getTime(), r = D(e);
|
|
53
53
|
return new Date(t + r);
|
|
54
54
|
}
|
|
55
|
-
var
|
|
56
|
-
function
|
|
57
|
-
return
|
|
55
|
+
var ue = {};
|
|
56
|
+
function A() {
|
|
57
|
+
return ue;
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function de(a) {
|
|
60
60
|
var e = new Date(Date.UTC(a.getFullYear(), a.getMonth(), a.getDate(), a.getHours(), a.getMinutes(), a.getSeconds(), a.getMilliseconds()));
|
|
61
61
|
return e.setUTCFullYear(a.getFullYear()), a.getTime() - e.getTime();
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
return g(1, arguments), a instanceof Date ||
|
|
63
|
+
function se(a) {
|
|
64
|
+
return g(1, arguments), a instanceof Date || W(a) === "object" && Object.prototype.toString.call(a) === "[object Date]";
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
if (g(1, arguments), !
|
|
66
|
+
function ce(a) {
|
|
67
|
+
if (g(1, arguments), !se(a) && typeof a != "number")
|
|
68
68
|
return !1;
|
|
69
69
|
var e = y(a);
|
|
70
70
|
return !isNaN(Number(e));
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function le(a, e) {
|
|
73
73
|
g(2, arguments);
|
|
74
|
-
var t =
|
|
75
|
-
return
|
|
74
|
+
var t = D(e);
|
|
75
|
+
return oe(a, -t);
|
|
76
76
|
}
|
|
77
|
-
var
|
|
78
|
-
function
|
|
77
|
+
var fe = 864e5;
|
|
78
|
+
function me(a) {
|
|
79
79
|
g(1, arguments);
|
|
80
80
|
var e = y(a), t = e.getTime();
|
|
81
81
|
e.setUTCMonth(0, 1), e.setUTCHours(0, 0, 0, 0);
|
|
82
82
|
var r = e.getTime(), n = t - r;
|
|
83
|
-
return Math.floor(n /
|
|
83
|
+
return Math.floor(n / fe) + 1;
|
|
84
84
|
}
|
|
85
85
|
function N(a) {
|
|
86
86
|
g(1, arguments);
|
|
87
87
|
var e = 1, t = y(a), r = t.getUTCDay(), n = (r < e ? 7 : 0) + r - e;
|
|
88
88
|
return t.setUTCDate(t.getUTCDate() - n), t.setUTCHours(0, 0, 0, 0), t;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function V(a) {
|
|
91
91
|
g(1, arguments);
|
|
92
92
|
var e = y(a), t = e.getUTCFullYear(), r = /* @__PURE__ */ new Date(0);
|
|
93
93
|
r.setUTCFullYear(t + 1, 0, 4), r.setUTCHours(0, 0, 0, 0);
|
|
@@ -96,74 +96,74 @@ function z(a) {
|
|
|
96
96
|
var o = N(i);
|
|
97
97
|
return e.getTime() >= n.getTime() ? t + 1 : e.getTime() >= o.getTime() ? t : t - 1;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function he(a) {
|
|
100
100
|
g(1, arguments);
|
|
101
|
-
var e =
|
|
101
|
+
var e = V(a), t = /* @__PURE__ */ new Date(0);
|
|
102
102
|
t.setUTCFullYear(e, 0, 4), t.setUTCHours(0, 0, 0, 0);
|
|
103
103
|
var r = N(t);
|
|
104
104
|
return r;
|
|
105
105
|
}
|
|
106
|
-
var
|
|
107
|
-
function
|
|
106
|
+
var ve = 6048e5;
|
|
107
|
+
function ge(a) {
|
|
108
108
|
g(1, arguments);
|
|
109
|
-
var e = y(a), t = N(e).getTime() -
|
|
110
|
-
return Math.round(t /
|
|
109
|
+
var e = y(a), t = N(e).getTime() - he(e).getTime();
|
|
110
|
+
return Math.round(t / ve) + 1;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
var t, r, n, i, o,
|
|
112
|
+
function Y(a, e) {
|
|
113
|
+
var t, r, n, i, o, s, u, d;
|
|
114
114
|
g(1, arguments);
|
|
115
|
-
var f =
|
|
115
|
+
var f = A(), m = D((t = (r = (n = (i = e == null ? void 0 : e.weekStartsOn) !== null && i !== void 0 ? i : e == null || (o = e.locale) === null || o === void 0 || (s = o.options) === null || s === void 0 ? void 0 : s.weekStartsOn) !== null && n !== void 0 ? n : f.weekStartsOn) !== null && r !== void 0 ? r : (u = f.locale) === null || u === void 0 || (d = u.options) === null || d === void 0 ? void 0 : d.weekStartsOn) !== null && t !== void 0 ? t : 0);
|
|
116
116
|
if (!(m >= 0 && m <= 6))
|
|
117
117
|
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
118
118
|
var l = y(a), h = l.getUTCDay(), v = (h < m ? 7 : 0) + h - m;
|
|
119
119
|
return l.setUTCDate(l.getUTCDate() - v), l.setUTCHours(0, 0, 0, 0), l;
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
var t, r, n, i, o,
|
|
121
|
+
function J(a, e) {
|
|
122
|
+
var t, r, n, i, o, s, u, d;
|
|
123
123
|
g(1, arguments);
|
|
124
|
-
var f = y(a), m = f.getUTCFullYear(), l =
|
|
124
|
+
var f = y(a), m = f.getUTCFullYear(), l = A(), h = D((t = (r = (n = (i = e == null ? void 0 : e.firstWeekContainsDate) !== null && i !== void 0 ? i : e == null || (o = e.locale) === null || o === void 0 || (s = o.options) === null || s === void 0 ? void 0 : s.firstWeekContainsDate) !== null && n !== void 0 ? n : l.firstWeekContainsDate) !== null && r !== void 0 ? r : (u = l.locale) === null || u === void 0 || (d = u.options) === null || d === void 0 ? void 0 : d.firstWeekContainsDate) !== null && t !== void 0 ? t : 1);
|
|
125
125
|
if (!(h >= 1 && h <= 7))
|
|
126
126
|
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
127
127
|
var v = /* @__PURE__ */ new Date(0);
|
|
128
128
|
v.setUTCFullYear(m + 1, 0, h), v.setUTCHours(0, 0, 0, 0);
|
|
129
|
-
var b =
|
|
129
|
+
var b = Y(v, e), C = /* @__PURE__ */ new Date(0);
|
|
130
130
|
C.setUTCFullYear(m, 0, h), C.setUTCHours(0, 0, 0, 0);
|
|
131
|
-
var
|
|
132
|
-
return f.getTime() >= b.getTime() ? m + 1 : f.getTime() >=
|
|
131
|
+
var L = Y(C, e);
|
|
132
|
+
return f.getTime() >= b.getTime() ? m + 1 : f.getTime() >= L.getTime() ? m : m - 1;
|
|
133
133
|
}
|
|
134
|
-
function
|
|
135
|
-
var t, r, n, i, o,
|
|
134
|
+
function we(a, e) {
|
|
135
|
+
var t, r, n, i, o, s, u, d;
|
|
136
136
|
g(1, arguments);
|
|
137
|
-
var f =
|
|
137
|
+
var f = A(), m = D((t = (r = (n = (i = e == null ? void 0 : e.firstWeekContainsDate) !== null && i !== void 0 ? i : e == null || (o = e.locale) === null || o === void 0 || (s = o.options) === null || s === void 0 ? void 0 : s.firstWeekContainsDate) !== null && n !== void 0 ? n : f.firstWeekContainsDate) !== null && r !== void 0 ? r : (u = f.locale) === null || u === void 0 || (d = u.options) === null || d === void 0 ? void 0 : d.firstWeekContainsDate) !== null && t !== void 0 ? t : 1), l = J(a, e), h = /* @__PURE__ */ new Date(0);
|
|
138
138
|
h.setUTCFullYear(l, 0, m), h.setUTCHours(0, 0, 0, 0);
|
|
139
|
-
var v =
|
|
139
|
+
var v = Y(h, e);
|
|
140
140
|
return v;
|
|
141
141
|
}
|
|
142
|
-
var
|
|
143
|
-
function
|
|
142
|
+
var be = 6048e5;
|
|
143
|
+
function ye(a, e) {
|
|
144
144
|
g(1, arguments);
|
|
145
|
-
var t = y(a), r =
|
|
146
|
-
return Math.round(r /
|
|
145
|
+
var t = y(a), r = Y(t, e).getTime() - we(t, e).getTime();
|
|
146
|
+
return Math.round(r / be) + 1;
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function c(a, e) {
|
|
149
149
|
for (var t = a < 0 ? "-" : "", r = Math.abs(a).toString(); r.length < e; )
|
|
150
150
|
r = "0" + r;
|
|
151
151
|
return t + r;
|
|
152
152
|
}
|
|
153
|
-
var
|
|
153
|
+
var p = {
|
|
154
154
|
// Year
|
|
155
155
|
y: function(e, t) {
|
|
156
156
|
var r = e.getUTCFullYear(), n = r > 0 ? r : 1 - r;
|
|
157
|
-
return
|
|
157
|
+
return c(t === "yy" ? n % 100 : n, t.length);
|
|
158
158
|
},
|
|
159
159
|
// Month
|
|
160
160
|
M: function(e, t) {
|
|
161
161
|
var r = e.getUTCMonth();
|
|
162
|
-
return t === "M" ? String(r + 1) :
|
|
162
|
+
return t === "M" ? String(r + 1) : c(r + 1, 2);
|
|
163
163
|
},
|
|
164
164
|
// Day of the month
|
|
165
165
|
d: function(e, t) {
|
|
166
|
-
return
|
|
166
|
+
return c(e.getUTCDate(), t.length);
|
|
167
167
|
},
|
|
168
168
|
// AM or PM
|
|
169
169
|
a: function(e, t) {
|
|
@@ -183,28 +183,26 @@ var Se = {
|
|
|
183
183
|
},
|
|
184
184
|
// Hour [1-12]
|
|
185
185
|
h: function(e, t) {
|
|
186
|
-
return
|
|
186
|
+
return c(e.getUTCHours() % 12 || 12, t.length);
|
|
187
187
|
},
|
|
188
188
|
// Hour [0-23]
|
|
189
189
|
H: function(e, t) {
|
|
190
|
-
return
|
|
190
|
+
return c(e.getUTCHours(), t.length);
|
|
191
191
|
},
|
|
192
192
|
// Minute
|
|
193
193
|
m: function(e, t) {
|
|
194
|
-
return
|
|
194
|
+
return c(e.getUTCMinutes(), t.length);
|
|
195
195
|
},
|
|
196
196
|
// Second
|
|
197
197
|
s: function(e, t) {
|
|
198
|
-
return
|
|
198
|
+
return c(e.getUTCSeconds(), t.length);
|
|
199
199
|
},
|
|
200
200
|
// Fraction of second
|
|
201
201
|
S: function(e, t) {
|
|
202
202
|
var r = t.length, n = e.getUTCMilliseconds(), i = Math.floor(n * Math.pow(10, r - 3));
|
|
203
|
-
return
|
|
203
|
+
return c(i, t.length);
|
|
204
204
|
}
|
|
205
|
-
}
|
|
206
|
-
const p = Se;
|
|
207
|
-
var P = {
|
|
205
|
+
}, P = {
|
|
208
206
|
am: "am",
|
|
209
207
|
pm: "pm",
|
|
210
208
|
midnight: "midnight",
|
|
@@ -213,7 +211,7 @@ var P = {
|
|
|
213
211
|
afternoon: "afternoon",
|
|
214
212
|
evening: "evening",
|
|
215
213
|
night: "night"
|
|
216
|
-
},
|
|
214
|
+
}, Te = {
|
|
217
215
|
// Era
|
|
218
216
|
G: function(e, t, r) {
|
|
219
217
|
var n = e.getUTCFullYear() > 0 ? 1 : 0;
|
|
@@ -247,19 +245,19 @@ var P = {
|
|
|
247
245
|
},
|
|
248
246
|
// Local week-numbering year
|
|
249
247
|
Y: function(e, t, r, n) {
|
|
250
|
-
var i =
|
|
248
|
+
var i = J(e, n), o = i > 0 ? i : 1 - i;
|
|
251
249
|
if (t === "YY") {
|
|
252
|
-
var
|
|
253
|
-
return s
|
|
250
|
+
var s = o % 100;
|
|
251
|
+
return c(s, 2);
|
|
254
252
|
}
|
|
255
253
|
return t === "Yo" ? r.ordinalNumber(o, {
|
|
256
254
|
unit: "year"
|
|
257
|
-
}) :
|
|
255
|
+
}) : c(o, t.length);
|
|
258
256
|
},
|
|
259
257
|
// ISO week-numbering year
|
|
260
258
|
R: function(e, t) {
|
|
261
|
-
var r =
|
|
262
|
-
return
|
|
259
|
+
var r = V(e);
|
|
260
|
+
return c(r, t.length);
|
|
263
261
|
},
|
|
264
262
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
265
263
|
// The main difference between `y` and `u` localizers are B.C. years:
|
|
@@ -272,7 +270,7 @@ var P = {
|
|
|
272
270
|
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
273
271
|
u: function(e, t) {
|
|
274
272
|
var r = e.getUTCFullYear();
|
|
275
|
-
return
|
|
273
|
+
return c(r, t.length);
|
|
276
274
|
},
|
|
277
275
|
// Quarter
|
|
278
276
|
Q: function(e, t, r) {
|
|
@@ -281,7 +279,7 @@ var P = {
|
|
|
281
279
|
case "Q":
|
|
282
280
|
return String(n);
|
|
283
281
|
case "QQ":
|
|
284
|
-
return
|
|
282
|
+
return c(n, 2);
|
|
285
283
|
case "Qo":
|
|
286
284
|
return r.ordinalNumber(n, {
|
|
287
285
|
unit: "quarter"
|
|
@@ -311,7 +309,7 @@ var P = {
|
|
|
311
309
|
case "q":
|
|
312
310
|
return String(n);
|
|
313
311
|
case "qq":
|
|
314
|
-
return
|
|
312
|
+
return c(n, 2);
|
|
315
313
|
case "qo":
|
|
316
314
|
return r.ordinalNumber(n, {
|
|
317
315
|
unit: "quarter"
|
|
@@ -370,7 +368,7 @@ var P = {
|
|
|
370
368
|
case "L":
|
|
371
369
|
return String(n + 1);
|
|
372
370
|
case "LL":
|
|
373
|
-
return
|
|
371
|
+
return c(n + 1, 2);
|
|
374
372
|
case "Lo":
|
|
375
373
|
return r.ordinalNumber(n + 1, {
|
|
376
374
|
unit: "month"
|
|
@@ -395,17 +393,17 @@ var P = {
|
|
|
395
393
|
},
|
|
396
394
|
// Local week of year
|
|
397
395
|
w: function(e, t, r, n) {
|
|
398
|
-
var i =
|
|
396
|
+
var i = ye(e, n);
|
|
399
397
|
return t === "wo" ? r.ordinalNumber(i, {
|
|
400
398
|
unit: "week"
|
|
401
|
-
}) :
|
|
399
|
+
}) : c(i, t.length);
|
|
402
400
|
},
|
|
403
401
|
// ISO week of year
|
|
404
402
|
I: function(e, t, r) {
|
|
405
|
-
var n =
|
|
403
|
+
var n = ge(e);
|
|
406
404
|
return t === "Io" ? r.ordinalNumber(n, {
|
|
407
405
|
unit: "week"
|
|
408
|
-
}) :
|
|
406
|
+
}) : c(n, t.length);
|
|
409
407
|
},
|
|
410
408
|
// Day of the month
|
|
411
409
|
d: function(e, t, r) {
|
|
@@ -415,10 +413,10 @@ var P = {
|
|
|
415
413
|
},
|
|
416
414
|
// Day of year
|
|
417
415
|
D: function(e, t, r) {
|
|
418
|
-
var n =
|
|
416
|
+
var n = me(e);
|
|
419
417
|
return t === "Do" ? r.ordinalNumber(n, {
|
|
420
418
|
unit: "dayOfYear"
|
|
421
|
-
}) :
|
|
419
|
+
}) : c(n, t.length);
|
|
422
420
|
},
|
|
423
421
|
// Day of week
|
|
424
422
|
E: function(e, t, r) {
|
|
@@ -456,7 +454,7 @@ var P = {
|
|
|
456
454
|
case "e":
|
|
457
455
|
return String(o);
|
|
458
456
|
case "ee":
|
|
459
|
-
return
|
|
457
|
+
return c(o, 2);
|
|
460
458
|
case "eo":
|
|
461
459
|
return r.ordinalNumber(o, {
|
|
462
460
|
unit: "day"
|
|
@@ -491,7 +489,7 @@ var P = {
|
|
|
491
489
|
case "c":
|
|
492
490
|
return String(o);
|
|
493
491
|
case "cc":
|
|
494
|
-
return
|
|
492
|
+
return c(o, t.length);
|
|
495
493
|
case "co":
|
|
496
494
|
return r.ordinalNumber(o, {
|
|
497
495
|
unit: "day"
|
|
@@ -526,7 +524,7 @@ var P = {
|
|
|
526
524
|
case "i":
|
|
527
525
|
return String(i);
|
|
528
526
|
case "ii":
|
|
529
|
-
return
|
|
527
|
+
return c(i, t.length);
|
|
530
528
|
case "io":
|
|
531
529
|
return r.ordinalNumber(i, {
|
|
532
530
|
unit: "day"
|
|
@@ -655,14 +653,14 @@ var P = {
|
|
|
655
653
|
var n = e.getUTCHours() % 12;
|
|
656
654
|
return t === "Ko" ? r.ordinalNumber(n, {
|
|
657
655
|
unit: "hour"
|
|
658
|
-
}) :
|
|
656
|
+
}) : c(n, t.length);
|
|
659
657
|
},
|
|
660
658
|
// Hour [1-24]
|
|
661
659
|
k: function(e, t, r) {
|
|
662
660
|
var n = e.getUTCHours();
|
|
663
661
|
return n === 0 && (n = 24), t === "ko" ? r.ordinalNumber(n, {
|
|
664
662
|
unit: "hour"
|
|
665
|
-
}) :
|
|
663
|
+
}) : c(n, t.length);
|
|
666
664
|
},
|
|
667
665
|
// Minute
|
|
668
666
|
m: function(e, t, r) {
|
|
@@ -687,14 +685,14 @@ var P = {
|
|
|
687
685
|
return "Z";
|
|
688
686
|
switch (t) {
|
|
689
687
|
case "X":
|
|
690
|
-
return
|
|
688
|
+
return Q(o);
|
|
691
689
|
case "XXXX":
|
|
692
690
|
case "XX":
|
|
693
|
-
return
|
|
691
|
+
return S(o);
|
|
694
692
|
case "XXXXX":
|
|
695
693
|
case "XXX":
|
|
696
694
|
default:
|
|
697
|
-
return
|
|
695
|
+
return S(o, ":");
|
|
698
696
|
}
|
|
699
697
|
},
|
|
700
698
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
@@ -702,14 +700,14 @@ var P = {
|
|
|
702
700
|
var i = n._originalDate || e, o = i.getTimezoneOffset();
|
|
703
701
|
switch (t) {
|
|
704
702
|
case "x":
|
|
705
|
-
return
|
|
703
|
+
return Q(o);
|
|
706
704
|
case "xxxx":
|
|
707
705
|
case "xx":
|
|
708
|
-
return
|
|
706
|
+
return S(o);
|
|
709
707
|
case "xxxxx":
|
|
710
708
|
case "xxx":
|
|
711
709
|
default:
|
|
712
|
-
return
|
|
710
|
+
return S(o, ":");
|
|
713
711
|
}
|
|
714
712
|
},
|
|
715
713
|
// Timezone (GMT)
|
|
@@ -719,10 +717,10 @@ var P = {
|
|
|
719
717
|
case "O":
|
|
720
718
|
case "OO":
|
|
721
719
|
case "OOO":
|
|
722
|
-
return "GMT" +
|
|
720
|
+
return "GMT" + X(o, ":");
|
|
723
721
|
case "OOOO":
|
|
724
722
|
default:
|
|
725
|
-
return "GMT" +
|
|
723
|
+
return "GMT" + S(o, ":");
|
|
726
724
|
}
|
|
727
725
|
},
|
|
728
726
|
// Timezone (specific non-location)
|
|
@@ -732,42 +730,42 @@ var P = {
|
|
|
732
730
|
case "z":
|
|
733
731
|
case "zz":
|
|
734
732
|
case "zzz":
|
|
735
|
-
return "GMT" +
|
|
733
|
+
return "GMT" + X(o, ":");
|
|
736
734
|
case "zzzz":
|
|
737
735
|
default:
|
|
738
|
-
return "GMT" +
|
|
736
|
+
return "GMT" + S(o, ":");
|
|
739
737
|
}
|
|
740
738
|
},
|
|
741
739
|
// Seconds timestamp
|
|
742
740
|
t: function(e, t, r, n) {
|
|
743
741
|
var i = n._originalDate || e, o = Math.floor(i.getTime() / 1e3);
|
|
744
|
-
return
|
|
742
|
+
return c(o, t.length);
|
|
745
743
|
},
|
|
746
744
|
// Milliseconds timestamp
|
|
747
745
|
T: function(e, t, r, n) {
|
|
748
746
|
var i = n._originalDate || e, o = i.getTime();
|
|
749
|
-
return
|
|
747
|
+
return c(o, t.length);
|
|
750
748
|
}
|
|
751
749
|
};
|
|
752
|
-
function
|
|
750
|
+
function X(a, e) {
|
|
753
751
|
var t = a > 0 ? "-" : "+", r = Math.abs(a), n = Math.floor(r / 60), i = r % 60;
|
|
754
752
|
if (i === 0)
|
|
755
753
|
return t + String(n);
|
|
756
|
-
var o = e
|
|
757
|
-
return t + String(n) + o +
|
|
754
|
+
var o = e;
|
|
755
|
+
return t + String(n) + o + c(i, 2);
|
|
758
756
|
}
|
|
759
|
-
function
|
|
757
|
+
function Q(a, e) {
|
|
760
758
|
if (a % 60 === 0) {
|
|
761
759
|
var t = a > 0 ? "-" : "+";
|
|
762
|
-
return t +
|
|
760
|
+
return t + c(Math.abs(a) / 60, 2);
|
|
763
761
|
}
|
|
764
|
-
return
|
|
762
|
+
return S(a, e);
|
|
765
763
|
}
|
|
766
|
-
function
|
|
767
|
-
var t = e || "", r = a > 0 ? "-" : "+", n = Math.abs(a), i =
|
|
764
|
+
function S(a, e) {
|
|
765
|
+
var t = e || "", r = a > 0 ? "-" : "+", n = Math.abs(a), i = c(Math.floor(n / 60), 2), o = c(n % 60, 2);
|
|
768
766
|
return r + i + t + o;
|
|
769
767
|
}
|
|
770
|
-
var
|
|
768
|
+
var j = function(e, t) {
|
|
771
769
|
switch (e) {
|
|
772
770
|
case "P":
|
|
773
771
|
return t.date({
|
|
@@ -787,7 +785,7 @@ var J = function(e, t) {
|
|
|
787
785
|
width: "full"
|
|
788
786
|
});
|
|
789
787
|
}
|
|
790
|
-
},
|
|
788
|
+
}, K = function(e, t) {
|
|
791
789
|
switch (e) {
|
|
792
790
|
case "p":
|
|
793
791
|
return t.time({
|
|
@@ -807,10 +805,10 @@ var J = function(e, t) {
|
|
|
807
805
|
width: "full"
|
|
808
806
|
});
|
|
809
807
|
}
|
|
810
|
-
},
|
|
808
|
+
}, pe = function(e, t) {
|
|
811
809
|
var r = e.match(/(P+)(p+)?/) || [], n = r[1], i = r[2];
|
|
812
810
|
if (!i)
|
|
813
|
-
return
|
|
811
|
+
return j(e, t);
|
|
814
812
|
var o;
|
|
815
813
|
switch (n) {
|
|
816
814
|
case "P":
|
|
@@ -835,18 +833,18 @@ var J = function(e, t) {
|
|
|
835
833
|
});
|
|
836
834
|
break;
|
|
837
835
|
}
|
|
838
|
-
return o.replace("{{date}}",
|
|
839
|
-
},
|
|
840
|
-
p:
|
|
841
|
-
P:
|
|
842
|
-
},
|
|
843
|
-
function
|
|
844
|
-
return
|
|
836
|
+
return o.replace("{{date}}", j(n, t)).replace("{{time}}", K(i, t));
|
|
837
|
+
}, Ce = {
|
|
838
|
+
p: K,
|
|
839
|
+
P: pe
|
|
840
|
+
}, Se = ["D", "DD"], De = ["YY", "YYYY"];
|
|
841
|
+
function Pe(a) {
|
|
842
|
+
return Se.indexOf(a) !== -1;
|
|
845
843
|
}
|
|
846
|
-
function
|
|
847
|
-
return
|
|
844
|
+
function Oe(a) {
|
|
845
|
+
return De.indexOf(a) !== -1;
|
|
848
846
|
}
|
|
849
|
-
function
|
|
847
|
+
function B(a, e, t) {
|
|
850
848
|
if (a === "YYYY")
|
|
851
849
|
throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e, "`) for formatting years to the input `").concat(t, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
852
850
|
if (a === "YY")
|
|
@@ -856,7 +854,7 @@ function K(a, e, t) {
|
|
|
856
854
|
if (a === "DD")
|
|
857
855
|
throw new RangeError("Use `dd` instead of `DD` (in `".concat(e, "`) for formatting days of the month to the input `").concat(t, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
858
856
|
}
|
|
859
|
-
var
|
|
857
|
+
var Me = {
|
|
860
858
|
lessThanXSeconds: {
|
|
861
859
|
one: "less than a second",
|
|
862
860
|
other: "less than {{count}} seconds"
|
|
@@ -918,90 +916,86 @@ var Ue = {
|
|
|
918
916
|
one: "almost 1 year",
|
|
919
917
|
other: "almost {{count}} years"
|
|
920
918
|
}
|
|
921
|
-
},
|
|
922
|
-
var n, i =
|
|
919
|
+
}, Ee = function(e, t, r) {
|
|
920
|
+
var n, i = Me[e];
|
|
923
921
|
return typeof i == "string" ? n = i : t === 1 ? n = i.one : n = i.other.replace("{{count}}", t.toString()), r != null && r.addSuffix ? r.comparison && r.comparison > 0 ? "in " + n : n + " ago" : n;
|
|
924
922
|
};
|
|
925
|
-
|
|
926
|
-
function q(a) {
|
|
923
|
+
function F(a) {
|
|
927
924
|
return function() {
|
|
928
925
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.width ? String(e.width) : a.defaultWidth, r = a.formats[t] || a.formats[a.defaultWidth];
|
|
929
926
|
return r;
|
|
930
927
|
};
|
|
931
928
|
}
|
|
932
|
-
var
|
|
929
|
+
var ke = {
|
|
933
930
|
full: "EEEE, MMMM do, y",
|
|
934
931
|
long: "MMMM do, y",
|
|
935
932
|
medium: "MMM d, y",
|
|
936
933
|
short: "MM/dd/yyyy"
|
|
937
|
-
},
|
|
934
|
+
}, xe = {
|
|
938
935
|
full: "h:mm:ss a zzzz",
|
|
939
936
|
long: "h:mm:ss a z",
|
|
940
937
|
medium: "h:mm:ss a",
|
|
941
938
|
short: "h:mm a"
|
|
942
|
-
},
|
|
939
|
+
}, _e = {
|
|
943
940
|
full: "{{date}} 'at' {{time}}",
|
|
944
941
|
long: "{{date}} 'at' {{time}}",
|
|
945
942
|
medium: "{{date}}, {{time}}",
|
|
946
943
|
short: "{{date}}, {{time}}"
|
|
947
|
-
},
|
|
948
|
-
date:
|
|
949
|
-
formats:
|
|
944
|
+
}, Ue = {
|
|
945
|
+
date: F({
|
|
946
|
+
formats: ke,
|
|
950
947
|
defaultWidth: "full"
|
|
951
948
|
}),
|
|
952
|
-
time:
|
|
953
|
-
formats:
|
|
949
|
+
time: F({
|
|
950
|
+
formats: xe,
|
|
954
951
|
defaultWidth: "full"
|
|
955
952
|
}),
|
|
956
|
-
dateTime:
|
|
957
|
-
formats:
|
|
953
|
+
dateTime: F({
|
|
954
|
+
formats: _e,
|
|
958
955
|
defaultWidth: "full"
|
|
959
956
|
})
|
|
960
|
-
}
|
|
961
|
-
const Ie = Re;
|
|
962
|
-
var Fe = {
|
|
957
|
+
}, We = {
|
|
963
958
|
lastWeek: "'last' eeee 'at' p",
|
|
964
959
|
yesterday: "'yesterday at' p",
|
|
965
960
|
today: "'today at' p",
|
|
966
961
|
tomorrow: "'tomorrow at' p",
|
|
967
962
|
nextWeek: "eeee 'at' p",
|
|
968
963
|
other: "P"
|
|
969
|
-
},
|
|
970
|
-
return
|
|
964
|
+
}, Ne = function(e, t, r, n) {
|
|
965
|
+
return We[e];
|
|
971
966
|
};
|
|
972
|
-
|
|
973
|
-
function k(a) {
|
|
967
|
+
function E(a) {
|
|
974
968
|
return function(e, t) {
|
|
975
969
|
var r = t != null && t.context ? String(t.context) : "standalone", n;
|
|
976
970
|
if (r === "formatting" && a.formattingValues) {
|
|
977
971
|
var i = a.defaultFormattingWidth || a.defaultWidth, o = t != null && t.width ? String(t.width) : i;
|
|
978
972
|
n = a.formattingValues[o] || a.formattingValues[i];
|
|
979
973
|
} else {
|
|
980
|
-
var
|
|
981
|
-
n = a.values[u] || a.values[
|
|
974
|
+
var s = a.defaultWidth, u = t != null && t.width ? String(t.width) : a.defaultWidth;
|
|
975
|
+
n = a.values[u] || a.values[s];
|
|
982
976
|
}
|
|
983
977
|
var d = a.argumentCallback ? a.argumentCallback(e) : e;
|
|
984
978
|
return n[d];
|
|
985
979
|
};
|
|
986
980
|
}
|
|
987
|
-
var
|
|
981
|
+
var Ye = {
|
|
988
982
|
narrow: ["B", "A"],
|
|
989
983
|
abbreviated: ["BC", "AD"],
|
|
990
984
|
wide: ["Before Christ", "Anno Domini"]
|
|
991
|
-
},
|
|
985
|
+
}, Ae = {
|
|
992
986
|
narrow: ["1", "2", "3", "4"],
|
|
993
987
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
994
988
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
995
|
-
},
|
|
989
|
+
}, Le = {
|
|
996
990
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
997
991
|
abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
|
998
992
|
wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
|
|
999
|
-
},
|
|
993
|
+
}, Re = {
|
|
1000
994
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
1001
995
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
1002
996
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
1003
997
|
wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
|
|
1004
|
-
},
|
|
998
|
+
}, Ie = {
|
|
1005
999
|
narrow: {
|
|
1006
1000
|
am: "a",
|
|
1007
1001
|
pm: "p",
|
|
@@ -1032,7 +1026,7 @@ var qe = {
|
|
|
1032
1026
|
evening: "evening",
|
|
1033
1027
|
night: "night"
|
|
1034
1028
|
}
|
|
1035
|
-
},
|
|
1029
|
+
}, Fe = {
|
|
1036
1030
|
narrow: {
|
|
1037
1031
|
am: "a",
|
|
1038
1032
|
pm: "p",
|
|
@@ -1063,7 +1057,7 @@ var qe = {
|
|
|
1063
1057
|
evening: "in the evening",
|
|
1064
1058
|
night: "at night"
|
|
1065
1059
|
}
|
|
1066
|
-
},
|
|
1060
|
+
}, He = function(e, t) {
|
|
1067
1061
|
var r = Number(e), n = r % 100;
|
|
1068
1062
|
if (n > 20 || n < 10)
|
|
1069
1063
|
switch (n % 10) {
|
|
@@ -1075,43 +1069,42 @@ var qe = {
|
|
|
1075
1069
|
return r + "rd";
|
|
1076
1070
|
}
|
|
1077
1071
|
return r + "th";
|
|
1078
|
-
},
|
|
1079
|
-
ordinalNumber:
|
|
1080
|
-
era:
|
|
1081
|
-
values:
|
|
1072
|
+
}, qe = {
|
|
1073
|
+
ordinalNumber: He,
|
|
1074
|
+
era: E({
|
|
1075
|
+
values: Ye,
|
|
1082
1076
|
defaultWidth: "wide"
|
|
1083
1077
|
}),
|
|
1084
|
-
quarter:
|
|
1085
|
-
values:
|
|
1078
|
+
quarter: E({
|
|
1079
|
+
values: Ae,
|
|
1086
1080
|
defaultWidth: "wide",
|
|
1087
1081
|
argumentCallback: function(e) {
|
|
1088
1082
|
return e - 1;
|
|
1089
1083
|
}
|
|
1090
1084
|
}),
|
|
1091
|
-
month:
|
|
1092
|
-
values:
|
|
1085
|
+
month: E({
|
|
1086
|
+
values: Le,
|
|
1093
1087
|
defaultWidth: "wide"
|
|
1094
1088
|
}),
|
|
1095
|
-
day:
|
|
1096
|
-
values:
|
|
1089
|
+
day: E({
|
|
1090
|
+
values: Re,
|
|
1097
1091
|
defaultWidth: "wide"
|
|
1098
1092
|
}),
|
|
1099
|
-
dayPeriod:
|
|
1100
|
-
values:
|
|
1093
|
+
dayPeriod: E({
|
|
1094
|
+
values: Ie,
|
|
1101
1095
|
defaultWidth: "wide",
|
|
1102
|
-
formattingValues:
|
|
1096
|
+
formattingValues: Fe,
|
|
1103
1097
|
defaultFormattingWidth: "wide"
|
|
1104
1098
|
})
|
|
1105
1099
|
};
|
|
1106
|
-
|
|
1107
|
-
function x(a) {
|
|
1100
|
+
function k(a) {
|
|
1108
1101
|
return function(e) {
|
|
1109
1102
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = t.width, n = r && a.matchPatterns[r] || a.matchPatterns[a.defaultMatchWidth], i = e.match(n);
|
|
1110
1103
|
if (!i)
|
|
1111
1104
|
return null;
|
|
1112
|
-
var o = i[0],
|
|
1105
|
+
var o = i[0], s = r && a.parsePatterns[r] || a.parsePatterns[a.defaultParseWidth], u = Array.isArray(s) ? Ge(s, function(m) {
|
|
1113
1106
|
return m.test(o);
|
|
1114
|
-
}) :
|
|
1107
|
+
}) : $e(s, function(m) {
|
|
1115
1108
|
return m.test(o);
|
|
1116
1109
|
}), d;
|
|
1117
1110
|
d = a.valueCallback ? a.valueCallback(u) : u, d = t.valueCallback ? t.valueCallback(d) : d;
|
|
@@ -1122,17 +1115,17 @@ function x(a) {
|
|
|
1122
1115
|
};
|
|
1123
1116
|
};
|
|
1124
1117
|
}
|
|
1125
|
-
function
|
|
1118
|
+
function $e(a, e) {
|
|
1126
1119
|
for (var t in a)
|
|
1127
1120
|
if (a.hasOwnProperty(t) && e(a[t]))
|
|
1128
1121
|
return t;
|
|
1129
1122
|
}
|
|
1130
|
-
function
|
|
1123
|
+
function Ge(a, e) {
|
|
1131
1124
|
for (var t = 0; t < a.length; t++)
|
|
1132
1125
|
if (e(a[t]))
|
|
1133
1126
|
return t;
|
|
1134
1127
|
}
|
|
1135
|
-
function
|
|
1128
|
+
function Xe(a) {
|
|
1136
1129
|
return function(e) {
|
|
1137
1130
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = e.match(a.matchPattern);
|
|
1138
1131
|
if (!r)
|
|
@@ -1142,44 +1135,44 @@ function et(a) {
|
|
|
1142
1135
|
return null;
|
|
1143
1136
|
var o = a.valueCallback ? a.valueCallback(i[0]) : i[0];
|
|
1144
1137
|
o = t.valueCallback ? t.valueCallback(o) : o;
|
|
1145
|
-
var
|
|
1138
|
+
var s = e.slice(n.length);
|
|
1146
1139
|
return {
|
|
1147
1140
|
value: o,
|
|
1148
|
-
rest:
|
|
1141
|
+
rest: s
|
|
1149
1142
|
};
|
|
1150
1143
|
};
|
|
1151
1144
|
}
|
|
1152
|
-
var
|
|
1145
|
+
var Qe = /^(\d+)(th|st|nd|rd)?/i, je = /\d+/i, Be = {
|
|
1153
1146
|
narrow: /^(b|a)/i,
|
|
1154
1147
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
1155
1148
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
1156
|
-
},
|
|
1149
|
+
}, Ve = {
|
|
1157
1150
|
any: [/^b/i, /^(a|c)/i]
|
|
1158
|
-
},
|
|
1151
|
+
}, Je = {
|
|
1159
1152
|
narrow: /^[1234]/i,
|
|
1160
1153
|
abbreviated: /^q[1234]/i,
|
|
1161
1154
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
1162
|
-
},
|
|
1155
|
+
}, Ke = {
|
|
1163
1156
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
1164
|
-
},
|
|
1157
|
+
}, ze = {
|
|
1165
1158
|
narrow: /^[jfmasond]/i,
|
|
1166
1159
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
1167
1160
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
1168
|
-
},
|
|
1161
|
+
}, Ze = {
|
|
1169
1162
|
narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
|
|
1170
1163
|
any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
|
|
1171
|
-
},
|
|
1164
|
+
}, et = {
|
|
1172
1165
|
narrow: /^[smtwf]/i,
|
|
1173
1166
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
1174
1167
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
1175
1168
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
1176
|
-
},
|
|
1169
|
+
}, tt = {
|
|
1177
1170
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
1178
1171
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
1179
|
-
},
|
|
1172
|
+
}, at = {
|
|
1180
1173
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
1181
1174
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
1182
|
-
},
|
|
1175
|
+
}, rt = {
|
|
1183
1176
|
any: {
|
|
1184
1177
|
am: /^a/i,
|
|
1185
1178
|
pm: /^p/i,
|
|
@@ -1190,111 +1183,107 @@ var tt = /^(\d+)(th|st|nd|rd)?/i, at = /\d+/i, rt = {
|
|
|
1190
1183
|
evening: /evening/i,
|
|
1191
1184
|
night: /night/i
|
|
1192
1185
|
}
|
|
1193
|
-
},
|
|
1194
|
-
ordinalNumber:
|
|
1195
|
-
matchPattern:
|
|
1196
|
-
parsePattern:
|
|
1186
|
+
}, nt = {
|
|
1187
|
+
ordinalNumber: Xe({
|
|
1188
|
+
matchPattern: Qe,
|
|
1189
|
+
parsePattern: je,
|
|
1197
1190
|
valueCallback: function(e) {
|
|
1198
1191
|
return parseInt(e, 10);
|
|
1199
1192
|
}
|
|
1200
1193
|
}),
|
|
1201
|
-
era:
|
|
1202
|
-
matchPatterns:
|
|
1194
|
+
era: k({
|
|
1195
|
+
matchPatterns: Be,
|
|
1203
1196
|
defaultMatchWidth: "wide",
|
|
1204
|
-
parsePatterns:
|
|
1197
|
+
parsePatterns: Ve,
|
|
1205
1198
|
defaultParseWidth: "any"
|
|
1206
1199
|
}),
|
|
1207
|
-
quarter:
|
|
1208
|
-
matchPatterns:
|
|
1200
|
+
quarter: k({
|
|
1201
|
+
matchPatterns: Je,
|
|
1209
1202
|
defaultMatchWidth: "wide",
|
|
1210
|
-
parsePatterns:
|
|
1203
|
+
parsePatterns: Ke,
|
|
1211
1204
|
defaultParseWidth: "any",
|
|
1212
1205
|
valueCallback: function(e) {
|
|
1213
1206
|
return e + 1;
|
|
1214
1207
|
}
|
|
1215
1208
|
}),
|
|
1216
|
-
month:
|
|
1217
|
-
matchPatterns:
|
|
1209
|
+
month: k({
|
|
1210
|
+
matchPatterns: ze,
|
|
1218
1211
|
defaultMatchWidth: "wide",
|
|
1219
|
-
parsePatterns:
|
|
1212
|
+
parsePatterns: Ze,
|
|
1220
1213
|
defaultParseWidth: "any"
|
|
1221
1214
|
}),
|
|
1222
|
-
day:
|
|
1223
|
-
matchPatterns:
|
|
1215
|
+
day: k({
|
|
1216
|
+
matchPatterns: et,
|
|
1224
1217
|
defaultMatchWidth: "wide",
|
|
1225
|
-
parsePatterns:
|
|
1218
|
+
parsePatterns: tt,
|
|
1226
1219
|
defaultParseWidth: "any"
|
|
1227
1220
|
}),
|
|
1228
|
-
dayPeriod:
|
|
1229
|
-
matchPatterns:
|
|
1221
|
+
dayPeriod: k({
|
|
1222
|
+
matchPatterns: at,
|
|
1230
1223
|
defaultMatchWidth: "any",
|
|
1231
|
-
parsePatterns:
|
|
1224
|
+
parsePatterns: rt,
|
|
1232
1225
|
defaultParseWidth: "any"
|
|
1233
1226
|
})
|
|
1234
|
-
}
|
|
1235
|
-
const ht = mt;
|
|
1236
|
-
var vt = {
|
|
1227
|
+
}, it = {
|
|
1237
1228
|
code: "en-US",
|
|
1238
|
-
formatDistance:
|
|
1239
|
-
formatLong:
|
|
1240
|
-
formatRelative:
|
|
1241
|
-
localize:
|
|
1242
|
-
match:
|
|
1229
|
+
formatDistance: Ee,
|
|
1230
|
+
formatLong: Ue,
|
|
1231
|
+
formatRelative: Ne,
|
|
1232
|
+
localize: qe,
|
|
1233
|
+
match: nt,
|
|
1243
1234
|
options: {
|
|
1244
1235
|
weekStartsOn: 0,
|
|
1245
1236
|
firstWeekContainsDate: 1
|
|
1246
1237
|
}
|
|
1247
|
-
}
|
|
1248
|
-
|
|
1249
|
-
var
|
|
1250
|
-
function Ct(a, e, t) {
|
|
1251
|
-
var r, n, i, o, c, u, d, f, m, l, h, v, b, C, O, R, I, F;
|
|
1238
|
+
}, ot = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, ut = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, dt = /^'([^]*?)'?$/, st = /''/g, ct = /[a-zA-Z]/;
|
|
1239
|
+
function lt(a, e, t) {
|
|
1240
|
+
var r, n, i, o, s, u, d, f, m, l, h, v, b, C;
|
|
1252
1241
|
g(2, arguments);
|
|
1253
|
-
var
|
|
1254
|
-
if (!(
|
|
1242
|
+
var L = String(e), O = A(), M = (r = (n = void 0) !== null && n !== void 0 ? n : O.locale) !== null && r !== void 0 ? r : it, R = D((i = (o = (s = (u = void 0) !== null && u !== void 0 ? u : void 0) !== null && s !== void 0 ? s : O.firstWeekContainsDate) !== null && o !== void 0 ? o : (d = O.locale) === null || d === void 0 || (f = d.options) === null || f === void 0 ? void 0 : f.firstWeekContainsDate) !== null && i !== void 0 ? i : 1);
|
|
1243
|
+
if (!(R >= 1 && R <= 7))
|
|
1255
1244
|
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
1256
|
-
var
|
|
1257
|
-
if (!(
|
|
1245
|
+
var I = D((m = (l = (h = (v = void 0) !== null && v !== void 0 ? v : void 0) !== null && h !== void 0 ? h : O.weekStartsOn) !== null && l !== void 0 ? l : (b = O.locale) === null || b === void 0 || (C = b.options) === null || C === void 0 ? void 0 : C.weekStartsOn) !== null && m !== void 0 ? m : 0);
|
|
1246
|
+
if (!(I >= 0 && I <= 6))
|
|
1258
1247
|
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
1259
|
-
if (!
|
|
1248
|
+
if (!M.localize)
|
|
1260
1249
|
throw new RangeError("locale must contain localize property");
|
|
1261
|
-
if (!
|
|
1250
|
+
if (!M.formatLong)
|
|
1262
1251
|
throw new RangeError("locale must contain formatLong property");
|
|
1263
|
-
var
|
|
1264
|
-
if (!
|
|
1252
|
+
var x = y(a);
|
|
1253
|
+
if (!ce(x))
|
|
1265
1254
|
throw new RangeError("Invalid time value");
|
|
1266
|
-
var
|
|
1267
|
-
firstWeekContainsDate:
|
|
1268
|
-
weekStartsOn:
|
|
1269
|
-
locale:
|
|
1270
|
-
_originalDate:
|
|
1271
|
-
},
|
|
1255
|
+
var Z = de(x), ee = le(x, Z), te = {
|
|
1256
|
+
firstWeekContainsDate: R,
|
|
1257
|
+
weekStartsOn: I,
|
|
1258
|
+
locale: M,
|
|
1259
|
+
_originalDate: x
|
|
1260
|
+
}, ae = L.match(ut).map(function(w) {
|
|
1272
1261
|
var T = w[0];
|
|
1273
1262
|
if (T === "p" || T === "P") {
|
|
1274
|
-
var
|
|
1275
|
-
return
|
|
1263
|
+
var _ = Ce[T];
|
|
1264
|
+
return _(w, M.formatLong);
|
|
1276
1265
|
}
|
|
1277
1266
|
return w;
|
|
1278
|
-
}).join("").match(
|
|
1267
|
+
}).join("").match(ot).map(function(w) {
|
|
1279
1268
|
if (w === "''")
|
|
1280
1269
|
return "'";
|
|
1281
1270
|
var T = w[0];
|
|
1282
1271
|
if (T === "'")
|
|
1283
|
-
return
|
|
1284
|
-
var
|
|
1285
|
-
if (
|
|
1286
|
-
return
|
|
1287
|
-
if (T.match(
|
|
1272
|
+
return ft(w);
|
|
1273
|
+
var _ = Te[T];
|
|
1274
|
+
if (_)
|
|
1275
|
+
return Oe(w) && B(w, e, String(a)), Pe(w) && B(w, e, String(a)), _(ee, w, M.localize, te);
|
|
1276
|
+
if (T.match(ct))
|
|
1288
1277
|
throw new RangeError("Format string contains an unescaped latin alphabet character `" + T + "`");
|
|
1289
1278
|
return w;
|
|
1290
1279
|
}).join("");
|
|
1291
|
-
return
|
|
1280
|
+
return ae;
|
|
1292
1281
|
}
|
|
1293
|
-
function
|
|
1294
|
-
var e = a.match(
|
|
1295
|
-
return e ? e[1].replace(
|
|
1282
|
+
function ft(a) {
|
|
1283
|
+
var e = a.match(dt);
|
|
1284
|
+
return e ? e[1].replace(st, "'") : a;
|
|
1296
1285
|
}
|
|
1297
|
-
function
|
|
1286
|
+
function bt() {
|
|
1298
1287
|
return {
|
|
1299
1288
|
formatDateBy: (t, r = {}) => {
|
|
1300
1289
|
if (isNaN(t))
|
|
@@ -1321,14 +1310,14 @@ function kt() {
|
|
|
1321
1310
|
const n = r ? "yyyy-MM-dd HH:mm:ss" : "yyyy-MM-dd HH:mm:ss XX";
|
|
1322
1311
|
try {
|
|
1323
1312
|
const i = new Date(t * 1e3);
|
|
1324
|
-
return
|
|
1313
|
+
return lt(i, n);
|
|
1325
1314
|
} catch {
|
|
1326
1315
|
return "";
|
|
1327
1316
|
}
|
|
1328
1317
|
}
|
|
1329
1318
|
};
|
|
1330
1319
|
}
|
|
1331
|
-
function
|
|
1320
|
+
function yt() {
|
|
1332
1321
|
return {
|
|
1333
1322
|
debounce: (e, t) => {
|
|
1334
1323
|
let r;
|
|
@@ -1340,8 +1329,8 @@ function xt() {
|
|
|
1340
1329
|
}
|
|
1341
1330
|
};
|
|
1342
1331
|
}
|
|
1343
|
-
function
|
|
1344
|
-
const r =
|
|
1332
|
+
function Tt({ script: a, styles: e, onReady: t }) {
|
|
1333
|
+
const r = U(!0), n = U(!0), i = async () => {
|
|
1345
1334
|
const { libName: u, url: d, type: f } = a;
|
|
1346
1335
|
if ((f !== void 0 && ["umd", "es"].includes(f) ? f : "umd") === "es") {
|
|
1347
1336
|
await import(
|
|
@@ -1380,27 +1369,27 @@ function _t({ script: a, styles: e, onReady: t }) {
|
|
|
1380
1369
|
var d, f;
|
|
1381
1370
|
if (!a || !a.url || typeof window > "u" || typeof document > "u")
|
|
1382
1371
|
return;
|
|
1383
|
-
const u =
|
|
1372
|
+
const u = ne(() => !!(e && (e != null && e.urls) && (e != null && e.urls.length) && e.shadowRoot));
|
|
1384
1373
|
if ((!e || !(e != null && e.urls) || !((d = e == null ? void 0 : e.urls) != null && d.length)) && (n.value = !1), e != null && e.urls && ((f = e == null ? void 0 : e.urls) != null && f.length) && !u.value && (await o(e.urls), n.value = !1), (!a.type || a.type === "umd") && !u.value)
|
|
1385
1374
|
return await i();
|
|
1386
|
-
await i(), await
|
|
1375
|
+
await i(), await G(), r.value = !1, e != null && e.urls && u.value && (await o(e.urls, e == null ? void 0 : e.shadowRoot), await G(), n.value = !1);
|
|
1387
1376
|
},
|
|
1388
|
-
loadingPackage:
|
|
1389
|
-
loadingStyles:
|
|
1377
|
+
loadingPackage: $(r),
|
|
1378
|
+
loadingStyles: $(n)
|
|
1390
1379
|
};
|
|
1391
1380
|
}
|
|
1392
|
-
var
|
|
1393
|
-
const
|
|
1381
|
+
var z = /* @__PURE__ */ ((a) => (a.VALIDATING = "VALIDATING", a.VALIDATING_HAS_DATA = "VALIDATING_HAS_DATA", a.PENDING = "PENDING", a.SUCCESS = "SUCCESS", a.SUCCESS_HAS_DATA = "SUCCESS_HAS_DATA", a.ERROR = "ERROR", a.STALE_IF_ERROR = "STALE_IF_ERROR", a))(z || {});
|
|
1382
|
+
const mt = (a) => {
|
|
1394
1383
|
var e, t, r, n, i;
|
|
1395
1384
|
return a ? !!// TODO: revisit: currently only the first check ever matters?
|
|
1396
1385
|
((e = Object.keys(a)) != null && e.length || (t = a.data) != null && t.length || (n = (r = a.data) == null ? void 0 : r.data) != null && n.length || !((i = a.data) != null && i.data) && typeof a.data == "object" && Object.keys(a == null ? void 0 : a.data).length) : !1;
|
|
1397
1386
|
};
|
|
1398
|
-
function
|
|
1399
|
-
const n =
|
|
1387
|
+
function pt(a = U({}), e, t, r = mt) {
|
|
1388
|
+
const n = U(
|
|
1400
1389
|
"PENDING"
|
|
1401
1390
|
/* PENDING */
|
|
1402
1391
|
);
|
|
1403
|
-
return
|
|
1392
|
+
return ie(() => {
|
|
1404
1393
|
const i = r(a.value);
|
|
1405
1394
|
if (a.value && i && t.value) {
|
|
1406
1395
|
n.value = "VALIDATING_HAS_DATA";
|
|
@@ -1429,15 +1418,15 @@ function Ut(a = W({}), e, t, r = St) {
|
|
|
1429
1418
|
a.value === void 0 && e && (n.value = "ERROR");
|
|
1430
1419
|
}), {
|
|
1431
1420
|
state: n,
|
|
1432
|
-
swrvState:
|
|
1421
|
+
swrvState: z
|
|
1433
1422
|
};
|
|
1434
1423
|
}
|
|
1435
|
-
const
|
|
1424
|
+
const H = "khcp-user-table-preferences", ht = {
|
|
1436
1425
|
pageSize: 30,
|
|
1437
1426
|
sortColumnKey: void 0,
|
|
1438
1427
|
sortColumnOrder: void 0
|
|
1439
1428
|
};
|
|
1440
|
-
function
|
|
1429
|
+
function Ct() {
|
|
1441
1430
|
const a = (i) => {
|
|
1442
1431
|
if (typeof i == "string")
|
|
1443
1432
|
try {
|
|
@@ -1447,28 +1436,28 @@ function Wt() {
|
|
|
1447
1436
|
return;
|
|
1448
1437
|
}
|
|
1449
1438
|
}, e = () => {
|
|
1450
|
-
const i = a(localStorage.getItem(
|
|
1439
|
+
const i = a(localStorage.getItem(H));
|
|
1451
1440
|
return !i || !Object.keys(i).length ? /* @__PURE__ */ new Map() : new Map(Object.entries(i));
|
|
1452
1441
|
};
|
|
1453
1442
|
return {
|
|
1454
1443
|
setTablePreferences: (i, o) => {
|
|
1455
1444
|
try {
|
|
1456
|
-
const
|
|
1457
|
-
|
|
1458
|
-
} catch (
|
|
1459
|
-
console.error("useTablePreferences(setTablePreferences)",
|
|
1445
|
+
const s = e();
|
|
1446
|
+
s.set(i, o), localStorage.setItem(H, JSON.stringify(Object.fromEntries(s.entries())));
|
|
1447
|
+
} catch (s) {
|
|
1448
|
+
console.error("useTablePreferences(setTablePreferences)", s);
|
|
1460
1449
|
}
|
|
1461
1450
|
},
|
|
1462
1451
|
getTablePreferences: (i) => {
|
|
1463
1452
|
const o = e();
|
|
1464
|
-
return (o == null ? void 0 : o.get(i)) || void 0 ||
|
|
1453
|
+
return (o == null ? void 0 : o.get(i)) || void 0 || ht;
|
|
1465
1454
|
},
|
|
1466
1455
|
deleteAllTablePreferences: () => {
|
|
1467
|
-
localStorage.removeItem(
|
|
1456
|
+
localStorage.removeItem(H);
|
|
1468
1457
|
}
|
|
1469
1458
|
};
|
|
1470
1459
|
}
|
|
1471
|
-
function
|
|
1460
|
+
function St() {
|
|
1472
1461
|
const a = () => {
|
|
1473
1462
|
var u;
|
|
1474
1463
|
return ((u = window == null ? void 0 : window.location) == null ? void 0 : u.search) || "";
|
|
@@ -1501,13 +1490,13 @@ function Yt() {
|
|
|
1501
1490
|
};
|
|
1502
1491
|
}
|
|
1503
1492
|
export {
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1493
|
+
ht as DEFAULT_USER_TABLE_PREFERENCES,
|
|
1494
|
+
H as USER_TABLE_PREFERENCES_LOCAL_STORAGE_KEY,
|
|
1495
|
+
wt as useAxios,
|
|
1496
|
+
bt as useDate,
|
|
1497
|
+
yt as useDebounce,
|
|
1498
|
+
Tt as usePackage,
|
|
1499
|
+
pt as useSwrvState,
|
|
1500
|
+
Ct as useTablePreferences,
|
|
1501
|
+
St as useWindow
|
|
1513
1502
|
};
|
package/dist/core.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(v,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("axios"),require("vue")):typeof define=="function"&&define.amd?define(["exports","axios","vue"],E):(v=typeof globalThis<"u"?globalThis:v||self,E(v["kong-ui-core"]={},v.axios,v.Vue))})(this,function(v,E,T){"use strict";function ae(){return{getAxiosInstance:(t={})=>{try{const r=T.inject("get-axios-instance",void 0);return typeof r=="function"?r(t):E.create({withCredentials:!0,timeout:3e4,...t})}catch(r){return console.warn("getAxiosInstance:",r.message||r),E.create({withCredentials:!0,timeout:3e4,...t})}},getTraceIdFromError:t=>{var r;return((r=t==null?void 0:t.response)==null?void 0:r.headers["x-datadog-trace-id"])||""}}}function A(a){"@babel/helpers - typeof";return A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(a)}function D(a){if(a===null||a===!0||a===!1)return NaN;var e=Number(a);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function w(a,e){if(e.length<a)throw new TypeError(a+" argument"+(a>1?"s":"")+" required, but only "+e.length+" present")}function p(a){w(1,arguments);var e=Object.prototype.toString.call(a);return a instanceof Date||A(a)==="object"&&e==="[object Date]"?new Date(a.getTime()):typeof a=="number"||e==="[object Number]"?new Date(a):((typeof a=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function re(a,e){w(2,arguments);var t=p(a).getTime(),r=D(e);return new Date(t+r)}var ne={};function L(){return ne}function ie(a){var e=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()));return e.setUTCFullYear(a.getFullYear()),a.getTime()-e.getTime()}function oe(a){return w(1,arguments),a instanceof Date||A(a)==="object"&&Object.prototype.toString.call(a)==="[object Date]"}function ue(a){if(w(1,arguments),!oe(a)&&typeof a!="number")return!1;var e=p(a);return!isNaN(Number(e))}function de(a,e){w(2,arguments);var t=D(e);return re(a,-t)}var ce=864e5;function se(a){w(1,arguments);var e=p(a),t=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),n=t-r;return Math.floor(n/ce)+1}function N(a){w(1,arguments);var e=1,t=p(a),r=t.getUTCDay(),n=(r<e?7:0)+r-e;return t.setUTCDate(t.getUTCDate()-n),t.setUTCHours(0,0,0,0),t}function X(a){w(1,arguments);var e=p(a),t=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(t+1,0,4),r.setUTCHours(0,0,0,0);var n=N(r),i=new Date(0);i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0);var o=N(i);return e.getTime()>=n.getTime()?t+1:e.getTime()>=o.getTime()?t:t-1}function le(a){w(1,arguments);var e=X(a),t=new Date(0);t.setUTCFullYear(e,0,4),t.setUTCHours(0,0,0,0);var r=N(t);return r}var fe=6048e5;function me(a){w(1,arguments);var e=p(a),t=N(e).getTime()-le(e).getTime();return Math.round(t/fe)+1}function Y(a,e){var t,r,n,i,o,c,u,d;w(1,arguments);var f=L(),m=D((t=(r=(n=(i=e==null?void 0:e.weekStartsOn)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(c=o.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:f.weekStartsOn)!==null&&r!==void 0?r:(u=f.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&t!==void 0?t:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var l=p(a),h=l.getUTCDay(),g=(h<m?7:0)+h-m;return l.setUTCDate(l.getUTCDate()-g),l.setUTCHours(0,0,0,0),l}function Q(a,e){var t,r,n,i,o,c,u,d;w(1,arguments);var f=p(a),m=f.getUTCFullYear(),l=L(),h=D((t=(r=(n=(i=e==null?void 0:e.firstWeekContainsDate)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(c=o.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:l.firstWeekContainsDate)!==null&&r!==void 0?r:(u=l.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(m+1,0,h),g.setUTCHours(0,0,0,0);var y=Y(g,e),O=new Date(0);O.setUTCFullYear(m,0,h),O.setUTCHours(0,0,0,0);var x=Y(O,e);return f.getTime()>=y.getTime()?m+1:f.getTime()>=x.getTime()?m:m-1}function he(a,e){var t,r,n,i,o,c,u,d;w(1,arguments);var f=L(),m=D((t=(r=(n=(i=e==null?void 0:e.firstWeekContainsDate)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(c=o.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:f.firstWeekContainsDate)!==null&&r!==void 0?r:(u=f.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&t!==void 0?t:1),l=Q(a,e),h=new Date(0);h.setUTCFullYear(l,0,m),h.setUTCHours(0,0,0,0);var g=Y(h,e);return g}var ve=6048e5;function ge(a,e){w(1,arguments);var t=p(a),r=Y(t,e).getTime()-he(t,e).getTime();return Math.round(r/ve)+1}function s(a,e){for(var t=a<0?"-":"",r=Math.abs(a).toString();r.length<e;)r="0"+r;return t+r}var we={y:function(e,t){var r=e.getUTCFullYear(),n=r>0?r:1-r;return s(t==="yy"?n%100:n,t.length)},M:function(e,t){var r=e.getUTCMonth();return t==="M"?String(r+1):s(r+1,2)},d:function(e,t){return s(e.getUTCDate(),t.length)},a:function(e,t){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(e,t){return s(e.getUTCHours()%12||12,t.length)},H:function(e,t){return s(e.getUTCHours(),t.length)},m:function(e,t){return s(e.getUTCMinutes(),t.length)},s:function(e,t){return s(e.getUTCSeconds(),t.length)},S:function(e,t){var r=t.length,n=e.getUTCMilliseconds(),i=Math.floor(n*Math.pow(10,r-3));return s(i,t.length)}};const S=we;var M={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},be={G:function(e,t,r){var n=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){var n=e.getUTCFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return S.y(e,t)},Y:function(e,t,r,n){var i=Q(e,n),o=i>0?i:1-i;if(t==="YY"){var c=o%100;return s(c,2)}return t==="Yo"?r.ordinalNumber(o,{unit:"year"}):s(o,t.length)},R:function(e,t){var r=X(e);return s(r,t.length)},u:function(e,t){var r=e.getUTCFullYear();return s(r,t.length)},Q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return s(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return s(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){var n=e.getUTCMonth();switch(t){case"M":case"MM":return S.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){var n=e.getUTCMonth();switch(t){case"L":return String(n+1);case"LL":return s(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){var i=ge(e,n);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):s(i,t.length)},I:function(e,t,r){var n=me(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):s(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getUTCDate(),{unit:"date"}):S.d(e,t)},D:function(e,t,r){var n=se(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):s(n,t.length)},E:function(e,t,r){var n=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){var i=e.getUTCDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return s(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){var i=e.getUTCDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return s(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){var n=e.getUTCDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return s(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){var n=e.getUTCHours(),i=n/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,r){var n=e.getUTCHours(),i;switch(n===12?i=M.noon:n===0?i=M.midnight:i=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,r){var n=e.getUTCHours(),i;switch(n>=17?i=M.evening:n>=12?i=M.afternoon:n>=4?i=M.morning:i=M.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){var n=e.getUTCHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return S.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getUTCHours(),{unit:"hour"}):S.H(e,t)},K:function(e,t,r){var n=e.getUTCHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):s(n,t.length)},k:function(e,t,r){var n=e.getUTCHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):s(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):S.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):S.s(e,t)},S:function(e,t){return S.S(e,t)},X:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return J(o);case"XXXX":case"XX":return P(o);case"XXXXX":case"XXX":default:return P(o,":")}},x:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();switch(t){case"x":return J(o);case"xxxx":case"xx":return P(o);case"xxxxx":case"xxx":default:return P(o,":")}},O:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+V(o,":");case"OOOO":default:return"GMT"+P(o,":")}},z:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+V(o,":");case"zzzz":default:return"GMT"+P(o,":")}},t:function(e,t,r,n){var i=n._originalDate||e,o=Math.floor(i.getTime()/1e3);return s(o,t.length)},T:function(e,t,r,n){var i=n._originalDate||e,o=i.getTime();return s(o,t.length)}};function V(a,e){var t=a>0?"-":"+",r=Math.abs(a),n=Math.floor(r/60),i=r%60;if(i===0)return t+String(n);var o=e||"";return t+String(n)+o+s(i,2)}function J(a,e){if(a%60===0){var t=a>0?"-":"+";return t+s(Math.abs(a)/60,2)}return P(a,e)}function P(a,e){var t=e||"",r=a>0?"-":"+",n=Math.abs(a),i=s(Math.floor(n/60),2),o=s(n%60,2);return r+i+t+o}var K=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},z=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},ye=function(e,t){var r=e.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return K(e,t);var o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",K(n,t)).replace("{{time}}",z(i,t))},Te={p:z,P:ye},pe=["D","DD"],Se=["YY","YYYY"];function Ce(a){return pe.indexOf(a)!==-1}function De(a){return Se.indexOf(a)!==-1}function Z(a,e,t){if(a==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Pe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Oe=function(e,t,r){var n,i=Pe[e];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};const Ee=Oe;function $(a){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.width?String(e.width):a.defaultWidth,r=a.formats[t]||a.formats[a.defaultWidth];return r}}var Me={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ke={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},_e={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xe={date:$({formats:Me,defaultWidth:"full"}),time:$({formats:ke,defaultWidth:"full"}),dateTime:$({formats:_e,defaultWidth:"full"})};const Ue=xe;var We={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ae=function(e,t,r,n){return We[e]};const Le=Ae;function k(a){return function(e,t){var r=t!=null&&t.context?String(t.context):"standalone",n;if(r==="formatting"&&a.formattingValues){var i=a.defaultFormattingWidth||a.defaultWidth,o=t!=null&&t.width?String(t.width):i;n=a.formattingValues[o]||a.formattingValues[i]}else{var c=a.defaultWidth,u=t!=null&&t.width?String(t.width):a.defaultWidth;n=a.values[u]||a.values[c]}var d=a.argumentCallback?a.argumentCallback(e):e;return n[d]}}var Ne={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ye={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Re={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Fe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Ie={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},$e={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},He=function(e,t){var r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},qe={ordinalNumber:He,era:k({values:Ne,defaultWidth:"wide"}),quarter:k({values:Ye,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:k({values:Re,defaultWidth:"wide"}),day:k({values:Fe,defaultWidth:"wide"}),dayPeriod:k({values:Ie,defaultWidth:"wide",formattingValues:$e,defaultFormattingWidth:"wide"})};const Ge=qe;function _(a){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.width,n=r&&a.matchPatterns[r]||a.matchPatterns[a.defaultMatchWidth],i=e.match(n);if(!i)return null;var o=i[0],c=r&&a.parsePatterns[r]||a.parsePatterns[a.defaultParseWidth],u=Array.isArray(c)?Be(c,function(m){return m.test(o)}):je(c,function(m){return m.test(o)}),d;d=a.valueCallback?a.valueCallback(u):u,d=t.valueCallback?t.valueCallback(d):d;var f=e.slice(o.length);return{value:d,rest:f}}}function je(a,e){for(var t in a)if(a.hasOwnProperty(t)&&e(a[t]))return t}function Be(a,e){for(var t=0;t<a.length;t++)if(e(a[t]))return t}function Xe(a){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.match(a.matchPattern);if(!r)return null;var n=r[0],i=e.match(a.parsePattern);if(!i)return null;var o=a.valueCallback?a.valueCallback(i[0]):i[0];o=t.valueCallback?t.valueCallback(o):o;var c=e.slice(n.length);return{value:o,rest:c}}}var Qe=/^(\d+)(th|st|nd|rd)?/i,Ve=/\d+/i,Je={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ke={any:[/^b/i,/^(a|c)/i]},ze={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ze={any:[/1/i,/2/i,/3/i,/4/i]},et={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},tt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},at={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},rt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},nt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},it={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ot={ordinalNumber:Xe({matchPattern:Qe,parsePattern:Ve,valueCallback:function(e){return parseInt(e,10)}}),era:_({matchPatterns:Je,defaultMatchWidth:"wide",parsePatterns:Ke,defaultParseWidth:"any"}),quarter:_({matchPatterns:ze,defaultMatchWidth:"wide",parsePatterns:Ze,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:_({matchPatterns:et,defaultMatchWidth:"wide",parsePatterns:tt,defaultParseWidth:"any"}),day:_({matchPatterns:at,defaultMatchWidth:"wide",parsePatterns:rt,defaultParseWidth:"any"}),dayPeriod:_({matchPatterns:nt,defaultMatchWidth:"any",parsePatterns:it,defaultParseWidth:"any"})},ut={code:"en-US",formatDistance:Ee,formatLong:Ue,formatRelative:Le,localize:Ge,match:ot,options:{weekStartsOn:0,firstWeekContainsDate:1}};const dt=ut;var ct=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,st=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,lt=/^'([^]*?)'?$/,ft=/''/g,mt=/[a-zA-Z]/;function ht(a,e,t){var r,n,i,o,c,u,d,f,m,l,h,g,y,O,x,H,q,G;w(2,arguments);var Ct=String(e),U=L(),W=(r=(n=t==null?void 0:t.locale)!==null&&n!==void 0?n:U.locale)!==null&&r!==void 0?r:dt,j=D((i=(o=(c=(u=t==null?void 0:t.firstWeekContainsDate)!==null&&u!==void 0?u:t==null||(d=t.locale)===null||d===void 0||(f=d.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&c!==void 0?c:U.firstWeekContainsDate)!==null&&o!==void 0?o:(m=U.locale)===null||m===void 0||(l=m.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(j>=1&&j<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var B=D((h=(g=(y=(O=t==null?void 0:t.weekStartsOn)!==null&&O!==void 0?O:t==null||(x=t.locale)===null||x===void 0||(H=x.options)===null||H===void 0?void 0:H.weekStartsOn)!==null&&y!==void 0?y:U.weekStartsOn)!==null&&g!==void 0?g:(q=U.locale)===null||q===void 0||(G=q.options)===null||G===void 0?void 0:G.weekStartsOn)!==null&&h!==void 0?h:0);if(!(B>=0&&B<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!W.localize)throw new RangeError("locale must contain localize property");if(!W.formatLong)throw new RangeError("locale must contain formatLong property");var F=p(a);if(!ue(F))throw new RangeError("Invalid time value");var Dt=ie(F),Pt=de(F,Dt),Ot={firstWeekContainsDate:j,weekStartsOn:B,locale:W,_originalDate:F},Et=Ct.match(st).map(function(b){var C=b[0];if(C==="p"||C==="P"){var I=Te[C];return I(b,W.formatLong)}return b}).join("").match(ct).map(function(b){if(b==="''")return"'";var C=b[0];if(C==="'")return vt(b);var I=be[C];if(I)return!(t!=null&&t.useAdditionalWeekYearTokens)&&De(b)&&Z(b,e,String(a)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&Ce(b)&&Z(b,e,String(a)),I(Pt,b,W.localize,Ot);if(C.match(mt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return b}).join("");return Et}function vt(a){var e=a.match(lt);return e?e[1].replace(ft,"'"):a}function gt(){return{formatDateBy:(t,r={})=>{if(isNaN(t))return null;try{return new Date(t*1e3).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",weekday:"short",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,...r})}catch{return null}},formatUnixToDate:(t,r)=>{if(!t)return"";const n=r?"yyyy-MM-dd HH:mm:ss":"yyyy-MM-dd HH:mm:ss XX";try{const i=new Date(t*1e3);return ht(i,n)}catch{return""}}}}function wt(){return{debounce:(e,t)=>{let r;return(...n)=>{clearTimeout(r),r=window==null?void 0:window.setTimeout(()=>{e(...n)},t)}}}}function bt({script:a,styles:e,onReady:t}){const r=T.ref(!0),n=T.ref(!0),i=async()=>{const{libName:u,url:d,type:f}=a;if((f!==void 0&&["umd","es"].includes(f)?f:"umd")==="es"){await import(d),typeof t=="function"&&await t();return}const l=u.startsWith("kong-ui-")?u:`kong-ui-${u}`;return window[l]||(window[l]=await new Promise((h,g)=>{const y=document.createElement("script");y.async=!0,y.addEventListener("load",async()=>{typeof t=="function"&&await t(),r.value=!1,h(window[l])}),y.addEventListener("error",()=>{g(new Error(`Could not load '${l}' from ${d}`))}),y.src=d,document.head.appendChild(y)})),window[l]},o=async(u,d)=>{var f;for(const m of u){const l=document.createElement("link");l.type="text/css",l.rel="stylesheet",l.href=m;const h=d?document.querySelector(d):null,g=d?(f=h==null?void 0:h.shadowRoot)==null?void 0:f.children[0]:null;if(h&&g)try{g.appendChild(l)}catch{document.head.appendChild(l)}else document.head.appendChild(l)}};return{importPackage:async()=>{var d,f;if(!a||!a.url||typeof window>"u"||typeof document>"u")return;const u=T.computed(()=>!!(e&&(e!=null&&e.urls)&&(e!=null&&e.urls.length)&&e.shadowRoot));if((!e||!(e!=null&&e.urls)||!((d=e==null?void 0:e.urls)!=null&&d.length))&&(n.value=!1),e!=null&&e.urls&&((f=e==null?void 0:e.urls)!=null&&f.length)&&!u.value&&(await o(e.urls),n.value=!1),(!a.type||a.type==="umd")&&!u.value)return await i();await i(),await T.nextTick(),r.value=!1,e!=null&&e.urls&&u.value&&(await o(e.urls,e==null?void 0:e.shadowRoot),await T.nextTick(),n.value=!1)},loadingPackage:T.readonly(r),loadingStyles:T.readonly(n)}}var ee=(a=>(a.VALIDATING="VALIDATING",a.VALIDATING_HAS_DATA="VALIDATING_HAS_DATA",a.PENDING="PENDING",a.SUCCESS="SUCCESS",a.SUCCESS_HAS_DATA="SUCCESS_HAS_DATA",a.ERROR="ERROR",a.STALE_IF_ERROR="STALE_IF_ERROR",a))(ee||{});const yt=a=>{var e,t,r,n,i;return a?!!((e=Object.keys(a))!=null&&e.length||(t=a.data)!=null&&t.length||(n=(r=a.data)==null?void 0:r.data)!=null&&n.length||!((i=a.data)!=null&&i.data)&&typeof a.data=="object"&&Object.keys(a==null?void 0:a.data).length):!1};function Tt(a=T.ref({}),e,t,r=yt){const n=T.ref("PENDING");return T.watchEffect(()=>{const i=r(a.value);if(a.value&&i&&t.value){n.value="VALIDATING_HAS_DATA";return}if(a.value&&t.value){n.value="VALIDATING";return}if(a.value&&e.value){n.value="STALE_IF_ERROR";return}if(a.value===void 0&&!e.value){n.value="PENDING";return}if(a.value&&!e.value&&i){n.value="SUCCESS_HAS_DATA";return}if(a.value&&!e.value){n.value="SUCCESS";return}a.value===void 0&&e&&(n.value="ERROR")}),{state:n,swrvState:ee}}const R="khcp-user-table-preferences",te={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0};function pt(){const a=i=>{if(typeof i=="string")try{return JSON.parse(i)}catch(o){console.error("useTablePreferences(tryParseJson)",o);return}},e=()=>{const i=a(localStorage.getItem(R));return!i||!Object.keys(i).length?new Map:new Map(Object.entries(i))};return{setTablePreferences:(i,o)=>{try{const c=e();c.set(i,o),localStorage.setItem(R,JSON.stringify(Object.fromEntries(c.entries())))}catch(c){console.error("useTablePreferences(setTablePreferences)",c)}},getTablePreferences:i=>{const o=e();return(o==null?void 0:o.get(i))||void 0||te},deleteAllTablePreferences:()=>{localStorage.removeItem(R)}}}function St(){const a=()=>{var u;return((u=window==null?void 0:window.location)==null?void 0:u.search)||""};return{getLocationSearch:a,getLocationHostname:()=>{var u;return((u=window==null?void 0:window.location)==null?void 0:u.hostname)||""},getLocationHref:()=>{var u;return((u=window==null?void 0:window.location)==null?void 0:u.href)||""},getLocationPathname:()=>{var u;return((u=window==null?void 0:window.location)==null?void 0:u.pathname)||""},getLocationOrigin:()=>{var u;return((u=window==null?void 0:window.location)==null?void 0:u.origin)||""},getUrlSearchParams:()=>new URLSearchParams(a()),setLocationAssign:u=>{window.location.assign(u)},setLocationReplace:u=>{window.location.replace(u)}}}v.DEFAULT_USER_TABLE_PREFERENCES=te,v.USER_TABLE_PREFERENCES_LOCAL_STORAGE_KEY=R,v.useAxios=ae,v.useDate=gt,v.useDebounce=wt,v.usePackage=bt,v.useSwrvState=Tt,v.useTablePreferences=pt,v.useWindow=St,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(v,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("axios"),require("vue")):typeof define=="function"&&define.amd?define(["exports","axios","vue"],E):(v=typeof globalThis<"u"?globalThis:v||self,E(v["kong-ui-core"]={},v.axios,v.Vue))})(this,function(v,E,T){"use strict";function Z(){return{getAxiosInstance:(t={})=>{try{const r=T.inject("get-axios-instance",void 0);return typeof r=="function"?r(t):E.create({withCredentials:!0,timeout:3e4,...t})}catch(r){return console.warn("getAxiosInstance:",r.message||r),E.create({withCredentials:!0,timeout:3e4,...t})}},getTraceIdFromError:t=>{var r;return((r=t==null?void 0:t.response)==null?void 0:r.headers["x-datadog-trace-id"])||""}}}function W(a){"@babel/helpers - typeof";return W=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(a)}function D(a){if(a===null||a===!0||a===!1)return NaN;var e=Number(a);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function w(a,e){if(e.length<a)throw new TypeError(a+" argument"+(a>1?"s":"")+" required, but only "+e.length+" present")}function p(a){w(1,arguments);var e=Object.prototype.toString.call(a);return a instanceof Date||W(a)==="object"&&e==="[object Date]"?new Date(a.getTime()):typeof a=="number"||e==="[object Number]"?new Date(a):((typeof a=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function ee(a,e){w(2,arguments);var t=p(a).getTime(),r=D(e);return new Date(t+r)}var te={};function A(){return te}function ae(a){var e=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()));return e.setUTCFullYear(a.getFullYear()),a.getTime()-e.getTime()}function re(a){return w(1,arguments),a instanceof Date||W(a)==="object"&&Object.prototype.toString.call(a)==="[object Date]"}function ne(a){if(w(1,arguments),!re(a)&&typeof a!="number")return!1;var e=p(a);return!isNaN(Number(e))}function ie(a,e){w(2,arguments);var t=D(e);return ee(a,-t)}var oe=864e5;function ue(a){w(1,arguments);var e=p(a),t=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),n=t-r;return Math.floor(n/oe)+1}function L(a){w(1,arguments);var e=1,t=p(a),r=t.getUTCDay(),n=(r<e?7:0)+r-e;return t.setUTCDate(t.getUTCDate()-n),t.setUTCHours(0,0,0,0),t}function $(a){w(1,arguments);var e=p(a),t=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(t+1,0,4),r.setUTCHours(0,0,0,0);var n=L(r),i=new Date(0);i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0);var o=L(i);return e.getTime()>=n.getTime()?t+1:e.getTime()>=o.getTime()?t:t-1}function de(a){w(1,arguments);var e=$(a),t=new Date(0);t.setUTCFullYear(e,0,4),t.setUTCHours(0,0,0,0);var r=L(t);return r}var se=6048e5;function ce(a){w(1,arguments);var e=p(a),t=L(e).getTime()-de(e).getTime();return Math.round(t/se)+1}function N(a,e){var t,r,n,i,o,s,u,d;w(1,arguments);var f=A(),m=D((t=(r=(n=(i=e==null?void 0:e.weekStartsOn)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&n!==void 0?n:f.weekStartsOn)!==null&&r!==void 0?r:(u=f.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&t!==void 0?t:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var l=p(a),h=l.getUTCDay(),g=(h<m?7:0)+h-m;return l.setUTCDate(l.getUTCDate()-g),l.setUTCHours(0,0,0,0),l}function j(a,e){var t,r,n,i,o,s,u,d;w(1,arguments);var f=p(a),m=f.getUTCFullYear(),l=A(),h=D((t=(r=(n=(i=e==null?void 0:e.firstWeekContainsDate)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&n!==void 0?n:l.firstWeekContainsDate)!==null&&r!==void 0?r:(u=l.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(m+1,0,h),g.setUTCHours(0,0,0,0);var y=N(g,e),O=new Date(0);O.setUTCFullYear(m,0,h),O.setUTCHours(0,0,0,0);var H=N(O,e);return f.getTime()>=y.getTime()?m+1:f.getTime()>=H.getTime()?m:m-1}function le(a,e){var t,r,n,i,o,s,u,d;w(1,arguments);var f=A(),m=D((t=(r=(n=(i=e==null?void 0:e.firstWeekContainsDate)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&n!==void 0?n:f.firstWeekContainsDate)!==null&&r!==void 0?r:(u=f.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&t!==void 0?t:1),l=j(a,e),h=new Date(0);h.setUTCFullYear(l,0,m),h.setUTCHours(0,0,0,0);var g=N(h,e);return g}var fe=6048e5;function me(a,e){w(1,arguments);var t=p(a),r=N(t,e).getTime()-le(t,e).getTime();return Math.round(r/fe)+1}function c(a,e){for(var t=a<0?"-":"",r=Math.abs(a).toString();r.length<e;)r="0"+r;return t+r}var S={y:function(e,t){var r=e.getUTCFullYear(),n=r>0?r:1-r;return c(t==="yy"?n%100:n,t.length)},M:function(e,t){var r=e.getUTCMonth();return t==="M"?String(r+1):c(r+1,2)},d:function(e,t){return c(e.getUTCDate(),t.length)},a:function(e,t){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(e,t){return c(e.getUTCHours()%12||12,t.length)},H:function(e,t){return c(e.getUTCHours(),t.length)},m:function(e,t){return c(e.getUTCMinutes(),t.length)},s:function(e,t){return c(e.getUTCSeconds(),t.length)},S:function(e,t){var r=t.length,n=e.getUTCMilliseconds(),i=Math.floor(n*Math.pow(10,r-3));return c(i,t.length)}},M={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},he={G:function(e,t,r){var n=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){var n=e.getUTCFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return S.y(e,t)},Y:function(e,t,r,n){var i=j(e,n),o=i>0?i:1-i;if(t==="YY"){var s=o%100;return c(s,2)}return t==="Yo"?r.ordinalNumber(o,{unit:"year"}):c(o,t.length)},R:function(e,t){var r=$(e);return c(r,t.length)},u:function(e,t){var r=e.getUTCFullYear();return c(r,t.length)},Q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return c(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return c(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){var n=e.getUTCMonth();switch(t){case"M":case"MM":return S.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){var n=e.getUTCMonth();switch(t){case"L":return String(n+1);case"LL":return c(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){var i=me(e,n);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):c(i,t.length)},I:function(e,t,r){var n=ce(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):c(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getUTCDate(),{unit:"date"}):S.d(e,t)},D:function(e,t,r){var n=ue(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):c(n,t.length)},E:function(e,t,r){var n=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){var i=e.getUTCDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return c(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){var i=e.getUTCDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return c(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){var n=e.getUTCDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return c(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){var n=e.getUTCHours(),i=n/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,r){var n=e.getUTCHours(),i;switch(n===12?i=M.noon:n===0?i=M.midnight:i=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,r){var n=e.getUTCHours(),i;switch(n>=17?i=M.evening:n>=12?i=M.afternoon:n>=4?i=M.morning:i=M.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){var n=e.getUTCHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return S.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getUTCHours(),{unit:"hour"}):S.H(e,t)},K:function(e,t,r){var n=e.getUTCHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):c(n,t.length)},k:function(e,t,r){var n=e.getUTCHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):c(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):S.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):S.s(e,t)},S:function(e,t){return S.S(e,t)},X:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return X(o);case"XXXX":case"XX":return P(o);case"XXXXX":case"XXX":default:return P(o,":")}},x:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();switch(t){case"x":return X(o);case"xxxx":case"xx":return P(o);case"xxxxx":case"xxx":default:return P(o,":")}},O:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+B(o,":");case"OOOO":default:return"GMT"+P(o,":")}},z:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+B(o,":");case"zzzz":default:return"GMT"+P(o,":")}},t:function(e,t,r,n){var i=n._originalDate||e,o=Math.floor(i.getTime()/1e3);return c(o,t.length)},T:function(e,t,r,n){var i=n._originalDate||e,o=i.getTime();return c(o,t.length)}};function B(a,e){var t=a>0?"-":"+",r=Math.abs(a),n=Math.floor(r/60),i=r%60;if(i===0)return t+String(n);var o=e;return t+String(n)+o+c(i,2)}function X(a,e){if(a%60===0){var t=a>0?"-":"+";return t+c(Math.abs(a)/60,2)}return P(a,e)}function P(a,e){var t=e||"",r=a>0?"-":"+",n=Math.abs(a),i=c(Math.floor(n/60),2),o=c(n%60,2);return r+i+t+o}var Q=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},V=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},ve=function(e,t){var r=e.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return Q(e,t);var o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Q(n,t)).replace("{{time}}",V(i,t))},ge={p:V,P:ve},we=["D","DD"],be=["YY","YYYY"];function ye(a){return we.indexOf(a)!==-1}function Te(a){return be.indexOf(a)!==-1}function J(a,e,t){if(a==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var pe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Se=function(e,t,r){var n,i=pe[e];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function I(a){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.width?String(e.width):a.defaultWidth,r=a.formats[t]||a.formats[a.defaultWidth];return r}}var Ce={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},De={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Pe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Oe={date:I({formats:Ce,defaultWidth:"full"}),time:I({formats:De,defaultWidth:"full"}),dateTime:I({formats:Pe,defaultWidth:"full"})},Ee={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Me=function(e,t,r,n){return Ee[e]};function k(a){return function(e,t){var r=t!=null&&t.context?String(t.context):"standalone",n;if(r==="formatting"&&a.formattingValues){var i=a.defaultFormattingWidth||a.defaultWidth,o=t!=null&&t.width?String(t.width):i;n=a.formattingValues[o]||a.formattingValues[i]}else{var s=a.defaultWidth,u=t!=null&&t.width?String(t.width):a.defaultWidth;n=a.values[u]||a.values[s]}var d=a.argumentCallback?a.argumentCallback(e):e;return n[d]}}var ke={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},_e={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},xe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Ue={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},We={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Ae={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Le=function(e,t){var r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Ne={ordinalNumber:Le,era:k({values:ke,defaultWidth:"wide"}),quarter:k({values:_e,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:k({values:xe,defaultWidth:"wide"}),day:k({values:Ue,defaultWidth:"wide"}),dayPeriod:k({values:We,defaultWidth:"wide",formattingValues:Ae,defaultFormattingWidth:"wide"})};function _(a){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.width,n=r&&a.matchPatterns[r]||a.matchPatterns[a.defaultMatchWidth],i=e.match(n);if(!i)return null;var o=i[0],s=r&&a.parsePatterns[r]||a.parsePatterns[a.defaultParseWidth],u=Array.isArray(s)?Re(s,function(m){return m.test(o)}):Ye(s,function(m){return m.test(o)}),d;d=a.valueCallback?a.valueCallback(u):u,d=t.valueCallback?t.valueCallback(d):d;var f=e.slice(o.length);return{value:d,rest:f}}}function Ye(a,e){for(var t in a)if(a.hasOwnProperty(t)&&e(a[t]))return t}function Re(a,e){for(var t=0;t<a.length;t++)if(e(a[t]))return t}function Fe(a){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.match(a.matchPattern);if(!r)return null;var n=r[0],i=e.match(a.parsePattern);if(!i)return null;var o=a.valueCallback?a.valueCallback(i[0]):i[0];o=t.valueCallback?t.valueCallback(o):o;var s=e.slice(n.length);return{value:o,rest:s}}}var Ie=/^(\d+)(th|st|nd|rd)?/i,He=/\d+/i,qe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ge={any:[/^b/i,/^(a|c)/i]},$e={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},je={any:[/1/i,/2/i,/3/i,/4/i]},Be={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Xe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Qe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ve={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Je={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ke={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ze={ordinalNumber:Fe({matchPattern:Ie,parsePattern:He,valueCallback:function(e){return parseInt(e,10)}}),era:_({matchPatterns:qe,defaultMatchWidth:"wide",parsePatterns:Ge,defaultParseWidth:"any"}),quarter:_({matchPatterns:$e,defaultMatchWidth:"wide",parsePatterns:je,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:_({matchPatterns:Be,defaultMatchWidth:"wide",parsePatterns:Xe,defaultParseWidth:"any"}),day:_({matchPatterns:Qe,defaultMatchWidth:"wide",parsePatterns:Ve,defaultParseWidth:"any"}),dayPeriod:_({matchPatterns:Je,defaultMatchWidth:"any",parsePatterns:Ke,defaultParseWidth:"any"})},Ze={code:"en-US",formatDistance:Se,formatLong:Oe,formatRelative:Me,localize:Ne,match:ze,options:{weekStartsOn:0,firstWeekContainsDate:1}},et=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,at=/^'([^]*?)'?$/,rt=/''/g,nt=/[a-zA-Z]/;function it(a,e,t){var r,n,i,o,s,u,d,f,m,l,h,g,y,O;w(2,arguments);var H=String(e),x=A(),U=(r=(n=void 0)!==null&&n!==void 0?n:x.locale)!==null&&r!==void 0?r:Ze,q=D((i=(o=(s=(u=void 0)!==null&&u!==void 0?u:void 0)!==null&&s!==void 0?s:x.firstWeekContainsDate)!==null&&o!==void 0?o:(d=x.locale)===null||d===void 0||(f=d.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(q>=1&&q<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var G=D((m=(l=(h=(g=void 0)!==null&&g!==void 0?g:void 0)!==null&&h!==void 0?h:x.weekStartsOn)!==null&&l!==void 0?l:(y=x.locale)===null||y===void 0||(O=y.options)===null||O===void 0?void 0:O.weekStartsOn)!==null&&m!==void 0?m:0);if(!(G>=0&&G<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!U.localize)throw new RangeError("locale must contain localize property");if(!U.formatLong)throw new RangeError("locale must contain formatLong property");var R=p(a);if(!ne(R))throw new RangeError("Invalid time value");var ht=ae(R),vt=ie(R,ht),gt={firstWeekContainsDate:q,weekStartsOn:G,locale:U,_originalDate:R},wt=H.match(tt).map(function(b){var C=b[0];if(C==="p"||C==="P"){var F=ge[C];return F(b,U.formatLong)}return b}).join("").match(et).map(function(b){if(b==="''")return"'";var C=b[0];if(C==="'")return ot(b);var F=he[C];if(F)return Te(b)&&J(b,e,String(a)),ye(b)&&J(b,e,String(a)),F(vt,b,U.localize,gt);if(C.match(nt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return b}).join("");return wt}function ot(a){var e=a.match(at);return e?e[1].replace(rt,"'"):a}function ut(){return{formatDateBy:(t,r={})=>{if(isNaN(t))return null;try{return new Date(t*1e3).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",weekday:"short",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,...r})}catch{return null}},formatUnixToDate:(t,r)=>{if(!t)return"";const n=r?"yyyy-MM-dd HH:mm:ss":"yyyy-MM-dd HH:mm:ss XX";try{const i=new Date(t*1e3);return it(i,n)}catch{return""}}}}function dt(){return{debounce:(e,t)=>{let r;return(...n)=>{clearTimeout(r),r=window==null?void 0:window.setTimeout(()=>{e(...n)},t)}}}}function st({script:a,styles:e,onReady:t}){const r=T.ref(!0),n=T.ref(!0),i=async()=>{const{libName:u,url:d,type:f}=a;if((f!==void 0&&["umd","es"].includes(f)?f:"umd")==="es"){await import(d),typeof t=="function"&&await t();return}const l=u.startsWith("kong-ui-")?u:`kong-ui-${u}`;return window[l]||(window[l]=await new Promise((h,g)=>{const y=document.createElement("script");y.async=!0,y.addEventListener("load",async()=>{typeof t=="function"&&await t(),r.value=!1,h(window[l])}),y.addEventListener("error",()=>{g(new Error(`Could not load '${l}' from ${d}`))}),y.src=d,document.head.appendChild(y)})),window[l]},o=async(u,d)=>{var f;for(const m of u){const l=document.createElement("link");l.type="text/css",l.rel="stylesheet",l.href=m;const h=d?document.querySelector(d):null,g=d?(f=h==null?void 0:h.shadowRoot)==null?void 0:f.children[0]:null;if(h&&g)try{g.appendChild(l)}catch{document.head.appendChild(l)}else document.head.appendChild(l)}};return{importPackage:async()=>{var d,f;if(!a||!a.url||typeof window>"u"||typeof document>"u")return;const u=T.computed(()=>!!(e&&(e!=null&&e.urls)&&(e!=null&&e.urls.length)&&e.shadowRoot));if((!e||!(e!=null&&e.urls)||!((d=e==null?void 0:e.urls)!=null&&d.length))&&(n.value=!1),e!=null&&e.urls&&((f=e==null?void 0:e.urls)!=null&&f.length)&&!u.value&&(await o(e.urls),n.value=!1),(!a.type||a.type==="umd")&&!u.value)return await i();await i(),await T.nextTick(),r.value=!1,e!=null&&e.urls&&u.value&&(await o(e.urls,e==null?void 0:e.shadowRoot),await T.nextTick(),n.value=!1)},loadingPackage:T.readonly(r),loadingStyles:T.readonly(n)}}var K=(a=>(a.VALIDATING="VALIDATING",a.VALIDATING_HAS_DATA="VALIDATING_HAS_DATA",a.PENDING="PENDING",a.SUCCESS="SUCCESS",a.SUCCESS_HAS_DATA="SUCCESS_HAS_DATA",a.ERROR="ERROR",a.STALE_IF_ERROR="STALE_IF_ERROR",a))(K||{});const ct=a=>{var e,t,r,n,i;return a?!!((e=Object.keys(a))!=null&&e.length||(t=a.data)!=null&&t.length||(n=(r=a.data)==null?void 0:r.data)!=null&&n.length||!((i=a.data)!=null&&i.data)&&typeof a.data=="object"&&Object.keys(a==null?void 0:a.data).length):!1};function lt(a=T.ref({}),e,t,r=ct){const n=T.ref("PENDING");return T.watchEffect(()=>{const i=r(a.value);if(a.value&&i&&t.value){n.value="VALIDATING_HAS_DATA";return}if(a.value&&t.value){n.value="VALIDATING";return}if(a.value&&e.value){n.value="STALE_IF_ERROR";return}if(a.value===void 0&&!e.value){n.value="PENDING";return}if(a.value&&!e.value&&i){n.value="SUCCESS_HAS_DATA";return}if(a.value&&!e.value){n.value="SUCCESS";return}a.value===void 0&&e&&(n.value="ERROR")}),{state:n,swrvState:K}}const Y="khcp-user-table-preferences",z={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0};function ft(){const a=i=>{if(typeof i=="string")try{return JSON.parse(i)}catch(o){console.error("useTablePreferences(tryParseJson)",o);return}},e=()=>{const i=a(localStorage.getItem(Y));return!i||!Object.keys(i).length?new Map:new Map(Object.entries(i))};return{setTablePreferences:(i,o)=>{try{const s=e();s.set(i,o),localStorage.setItem(Y,JSON.stringify(Object.fromEntries(s.entries())))}catch(s){console.error("useTablePreferences(setTablePreferences)",s)}},getTablePreferences:i=>{const o=e();return(o==null?void 0:o.get(i))||void 0||z},deleteAllTablePreferences:()=>{localStorage.removeItem(Y)}}}function mt(){const a=()=>{var u;return((u=window==null?void 0:window.location)==null?void 0:u.search)||""};return{getLocationSearch:a,getLocationHostname:()=>{var u;return((u=window==null?void 0:window.location)==null?void 0:u.hostname)||""},getLocationHref:()=>{var u;return((u=window==null?void 0:window.location)==null?void 0:u.href)||""},getLocationPathname:()=>{var u;return((u=window==null?void 0:window.location)==null?void 0:u.pathname)||""},getLocationOrigin:()=>{var u;return((u=window==null?void 0:window.location)==null?void 0:u.origin)||""},getUrlSearchParams:()=>new URLSearchParams(a()),setLocationAssign:u=>{window.location.assign(u)},setLocationReplace:u=>{window.location.replace(u)}}}v.DEFAULT_USER_TABLE_PREFERENCES=z,v.USER_TABLE_PREFERENCES_LOCAL_STORAGE_KEY=Y,v.useAxios=Z,v.useDate=ut,v.useDebounce=dt,v.usePackage=st,v.useSwrvState=lt,v.useTablePreferences=ft,v.useWindow=mt,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
|