@kong-ui-public/core 1.9.0 → 1.9.1

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 CHANGED
@@ -1,17 +1,17 @@
1
- import L from "axios";
2
- import { inject as J, ref as x, readonly as F, computed as $, nextTick as _, watchEffect as K } from "vue";
3
- function ut() {
1
+ import A from "axios";
2
+ import { inject as Q, ref as T, readonly as C, computed as B, nextTick as Y, watchEffect as V } from "vue";
3
+ function ae() {
4
4
  return {
5
5
  getAxiosInstance: (n = {}) => {
6
6
  try {
7
- const r = J("get-axios-instance", void 0);
8
- return typeof r == "function" ? r(n) : L.create({
7
+ const r = Q("get-axios-instance", void 0);
8
+ return typeof r == "function" ? r(n) : A.create({
9
9
  withCredentials: !0,
10
10
  timeout: 3e4,
11
11
  ...n
12
12
  });
13
13
  } catch (r) {
14
- return console.warn("getAxiosInstance:", r.message || r), L.create({
14
+ return console.warn("getAxiosInstance:", r.message || r), A.create({
15
15
  withCredentials: !0,
16
16
  timeout: 3e4,
17
17
  ...n
@@ -24,74 +24,74 @@ function ut() {
24
24
  }
25
25
  };
26
26
  }
27
- function b(e) {
28
- const t = Object.prototype.toString.call(e);
29
- return e instanceof Date || typeof e == "object" && t === "[object Date]" ? new e.constructor(+e) : typeof e == "number" || t === "[object Number]" || typeof e == "string" || t === "[object String]" ? new Date(e) : /* @__PURE__ */ new Date(NaN);
27
+ function b(t) {
28
+ const e = Object.prototype.toString.call(t);
29
+ return t instanceof Date || typeof t == "object" && e === "[object Date]" ? new t.constructor(+t) : typeof t == "number" || e === "[object Number]" || typeof t == "string" || e === "[object String]" ? new Date(t) : /* @__PURE__ */ new Date(NaN);
30
30
  }
31
- function O(e, t) {
32
- return e instanceof Date ? new e.constructor(t) : new Date(t);
31
+ function v(t, e) {
32
+ return t instanceof Date ? new t.constructor(e) : new Date(e);
33
33
  }
34
- const X = 6048e5, z = 864e5;
35
- let Z = {};
36
- function W() {
37
- return Z;
34
+ const H = 6048e5, U = 864e5;
35
+ let J = {};
36
+ function k() {
37
+ return J;
38
38
  }
39
- function M(e, t) {
39
+ function M(t, e) {
40
40
  var u, i, d, f;
41
- const n = W(), r = (t == null ? void 0 : t.weekStartsOn) ?? ((i = (u = t == null ? void 0 : t.locale) == null ? void 0 : u.options) == null ? void 0 : i.weekStartsOn) ?? n.weekStartsOn ?? ((f = (d = n.locale) == null ? void 0 : d.options) == null ? void 0 : f.weekStartsOn) ?? 0, a = b(e), o = a.getDay(), c = (o < r ? 7 : 0) + o - r;
41
+ const n = k(), r = (e == null ? void 0 : e.weekStartsOn) ?? ((i = (u = e == null ? void 0 : e.locale) == null ? void 0 : u.options) == null ? void 0 : i.weekStartsOn) ?? n.weekStartsOn ?? ((f = (d = n.locale) == null ? void 0 : d.options) == null ? void 0 : f.weekStartsOn) ?? 0, a = b(t), o = a.getDay(), c = (o < r ? 7 : 0) + o - r;
42
42
  return a.setDate(a.getDate() - c), a.setHours(0, 0, 0, 0), a;
43
43
  }
44
- function E(e) {
45
- return M(e, { weekStartsOn: 1 });
44
+ function p(t) {
45
+ return M(t, { weekStartsOn: 1 });
46
46
  }
47
- function Q(e) {
48
- const t = b(e), n = t.getFullYear(), r = O(e, 0);
47
+ function q(t) {
48
+ const e = b(t), n = e.getFullYear(), r = v(t, 0);
49
49
  r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
50
- const a = E(r), o = O(e, 0);
50
+ const a = p(r), o = v(t, 0);
51
51
  o.setFullYear(n, 0, 4), o.setHours(0, 0, 0, 0);
52
- const c = E(o);
53
- return t.getTime() >= a.getTime() ? n + 1 : t.getTime() >= c.getTime() ? n : n - 1;
52
+ const c = p(o);
53
+ return e.getTime() >= a.getTime() ? n + 1 : e.getTime() >= c.getTime() ? n : n - 1;
54
54
  }
55
- function R(e) {
56
- const t = b(e);
57
- return t.setHours(0, 0, 0, 0), t;
55
+ function N(t) {
56
+ const e = b(t);
57
+ return e.setHours(0, 0, 0, 0), e;
58
58
  }
59
- function I(e) {
60
- const t = b(e), n = new Date(
59
+ function L(t) {
60
+ const e = b(t), n = new Date(
61
61
  Date.UTC(
62
- t.getFullYear(),
63
- t.getMonth(),
64
- t.getDate(),
65
- t.getHours(),
66
- t.getMinutes(),
67
- t.getSeconds(),
68
- t.getMilliseconds()
62
+ e.getFullYear(),
63
+ e.getMonth(),
64
+ e.getDate(),
65
+ e.getHours(),
66
+ e.getMinutes(),
67
+ e.getSeconds(),
68
+ e.getMilliseconds()
69
69
  )
70
70
  );
71
- return n.setUTCFullYear(t.getFullYear()), +e - +n;
71
+ return n.setUTCFullYear(e.getFullYear()), +t - +n;
72
72
  }
73
- function ee(e, t) {
74
- const n = R(e), r = R(t), a = +n - I(n), o = +r - I(r);
75
- return Math.round((a - o) / z);
73
+ function $(t, e) {
74
+ const n = N(t), r = N(e), a = +n - L(n), o = +r - L(r);
75
+ return Math.round((a - o) / U);
76
76
  }
77
- function te(e) {
78
- const t = Q(e), n = O(e, 0);
79
- return n.setFullYear(t, 0, 4), n.setHours(0, 0, 0, 0), E(n);
77
+ function K(t) {
78
+ const e = q(t), n = v(t, 0);
79
+ return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0), p(n);
80
80
  }
81
- function ne(e) {
82
- return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
81
+ function z(t) {
82
+ return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
83
83
  }
84
- function re(e) {
85
- if (!ne(e) && typeof e != "number")
84
+ function Z(t) {
85
+ if (!z(t) && typeof t != "number")
86
86
  return !1;
87
- const t = b(e);
88
- return !isNaN(Number(t));
87
+ const e = b(t);
88
+ return !isNaN(Number(e));
89
89
  }
90
- function ae(e) {
91
- const t = b(e), n = O(e, 0);
92
- return n.setFullYear(t.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
90
+ function tt(t) {
91
+ const e = b(t), n = v(t, 0);
92
+ return n.setFullYear(e.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
93
93
  }
94
- const oe = {
94
+ const et = {
95
95
  lessThanXSeconds: {
96
96
  one: "less than a second",
97
97
  other: "less than {{count}} seconds"
@@ -153,77 +153,77 @@ const oe = {
153
153
  one: "almost 1 year",
154
154
  other: "almost {{count}} years"
155
155
  }
156
- }, ie = (e, t, n) => {
156
+ }, nt = (t, e, n) => {
157
157
  let r;
158
- const a = oe[e];
159
- return typeof a == "string" ? r = a : t === 1 ? r = a.one : r = a.other.replace("{{count}}", t.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
158
+ const a = et[t];
159
+ return typeof a == "string" ? r = a : e === 1 ? r = a.one : r = a.other.replace("{{count}}", e.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
160
160
  };
161
- function C(e) {
162
- return (t = {}) => {
163
- const n = t.width ? String(t.width) : e.defaultWidth;
164
- return e.formats[n] || e.formats[e.defaultWidth];
161
+ function E(t) {
162
+ return (e = {}) => {
163
+ const n = e.width ? String(e.width) : t.defaultWidth;
164
+ return t.formats[n] || t.formats[t.defaultWidth];
165
165
  };
166
166
  }
167
- const ce = {
167
+ const rt = {
168
168
  full: "EEEE, MMMM do, y",
169
169
  long: "MMMM do, y",
170
170
  medium: "MMM d, y",
171
171
  short: "MM/dd/yyyy"
172
- }, ue = {
172
+ }, at = {
173
173
  full: "h:mm:ss a zzzz",
174
174
  long: "h:mm:ss a z",
175
175
  medium: "h:mm:ss a",
176
176
  short: "h:mm a"
177
- }, se = {
177
+ }, ot = {
178
178
  full: "{{date}} 'at' {{time}}",
179
179
  long: "{{date}} 'at' {{time}}",
180
180
  medium: "{{date}}, {{time}}",
181
181
  short: "{{date}}, {{time}}"
182
- }, de = {
183
- date: C({
184
- formats: ce,
182
+ }, it = {
183
+ date: E({
184
+ formats: rt,
185
185
  defaultWidth: "full"
186
186
  }),
187
- time: C({
188
- formats: ue,
187
+ time: E({
188
+ formats: at,
189
189
  defaultWidth: "full"
190
190
  }),
191
- dateTime: C({
192
- formats: se,
191
+ dateTime: E({
192
+ formats: ot,
193
193
  defaultWidth: "full"
194
194
  })
195
- }, fe = {
195
+ }, ct = {
196
196
  lastWeek: "'last' eeee 'at' p",
197
197
  yesterday: "'yesterday at' p",
198
198
  today: "'today at' p",
199
199
  tomorrow: "'tomorrow at' p",
200
200
  nextWeek: "eeee 'at' p",
201
201
  other: "P"
202
- }, le = (e, t, n, r) => fe[e];
203
- function T(e) {
204
- return (t, n) => {
202
+ }, ut = (t, e, n, r) => ct[t];
203
+ function O(t) {
204
+ return (e, n) => {
205
205
  const r = n != null && n.context ? String(n.context) : "standalone";
206
206
  let a;
207
- if (r === "formatting" && e.formattingValues) {
208
- const c = e.defaultFormattingWidth || e.defaultWidth, u = n != null && n.width ? String(n.width) : c;
209
- a = e.formattingValues[u] || e.formattingValues[c];
207
+ if (r === "formatting" && t.formattingValues) {
208
+ const c = t.defaultFormattingWidth || t.defaultWidth, u = n != null && n.width ? String(n.width) : c;
209
+ a = t.formattingValues[u] || t.formattingValues[c];
210
210
  } else {
211
- const c = e.defaultWidth, u = n != null && n.width ? String(n.width) : e.defaultWidth;
212
- a = e.values[u] || e.values[c];
211
+ const c = t.defaultWidth, u = n != null && n.width ? String(n.width) : t.defaultWidth;
212
+ a = t.values[u] || t.values[c];
213
213
  }
214
- const o = e.argumentCallback ? e.argumentCallback(t) : t;
214
+ const o = t.argumentCallback ? t.argumentCallback(e) : e;
215
215
  return a[o];
216
216
  };
217
217
  }
218
- const he = {
218
+ const st = {
219
219
  narrow: ["B", "A"],
220
220
  abbreviated: ["BC", "AD"],
221
221
  wide: ["Before Christ", "Anno Domini"]
222
- }, me = {
222
+ }, dt = {
223
223
  narrow: ["1", "2", "3", "4"],
224
224
  abbreviated: ["Q1", "Q2", "Q3", "Q4"],
225
225
  wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
226
- }, ge = {
226
+ }, ft = {
227
227
  narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
228
228
  abbreviated: [
229
229
  "Jan",
@@ -253,7 +253,7 @@ const he = {
253
253
  "November",
254
254
  "December"
255
255
  ]
256
- }, we = {
256
+ }, lt = {
257
257
  narrow: ["S", "M", "T", "W", "T", "F", "S"],
258
258
  short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
259
259
  abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
@@ -266,7 +266,7 @@ const he = {
266
266
  "Friday",
267
267
  "Saturday"
268
268
  ]
269
- }, be = {
269
+ }, ht = {
270
270
  narrow: {
271
271
  am: "a",
272
272
  pm: "p",
@@ -297,7 +297,7 @@ const he = {
297
297
  evening: "evening",
298
298
  night: "night"
299
299
  }
300
- }, ye = {
300
+ }, mt = {
301
301
  narrow: {
302
302
  am: "a",
303
303
  pm: "p",
@@ -328,8 +328,8 @@ const he = {
328
328
  evening: "in the evening",
329
329
  night: "at night"
330
330
  }
331
- }, Pe = (e, t) => {
332
- const n = Number(e), r = n % 100;
331
+ }, gt = (t, e) => {
332
+ const n = Number(t), r = n % 100;
333
333
  if (r > 20 || r < 10)
334
334
  switch (r % 10) {
335
335
  case 1:
@@ -340,89 +340,89 @@ const he = {
340
340
  return n + "rd";
341
341
  }
342
342
  return n + "th";
343
- }, ve = {
344
- ordinalNumber: Pe,
345
- era: T({
346
- values: he,
343
+ }, wt = {
344
+ ordinalNumber: gt,
345
+ era: O({
346
+ values: st,
347
347
  defaultWidth: "wide"
348
348
  }),
349
- quarter: T({
350
- values: me,
349
+ quarter: O({
350
+ values: dt,
351
351
  defaultWidth: "wide",
352
- argumentCallback: (e) => e - 1
352
+ argumentCallback: (t) => t - 1
353
353
  }),
354
- month: T({
355
- values: ge,
354
+ month: O({
355
+ values: ft,
356
356
  defaultWidth: "wide"
357
357
  }),
358
- day: T({
359
- values: we,
358
+ day: O({
359
+ values: lt,
360
360
  defaultWidth: "wide"
361
361
  }),
362
- dayPeriod: T({
363
- values: be,
362
+ dayPeriod: O({
363
+ values: ht,
364
364
  defaultWidth: "wide",
365
- formattingValues: ye,
365
+ formattingValues: mt,
366
366
  defaultFormattingWidth: "wide"
367
367
  })
368
368
  };
369
- function k(e) {
370
- return (t, n = {}) => {
371
- const r = n.width, a = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], o = t.match(a);
369
+ function D(t) {
370
+ return (e, n = {}) => {
371
+ const r = n.width, a = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], o = e.match(a);
372
372
  if (!o)
373
373
  return null;
374
- const c = o[0], u = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], i = Array.isArray(u) ? Oe(u, (g) => g.test(c)) : (
374
+ const c = o[0], u = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], i = Array.isArray(u) ? yt(u, (g) => g.test(c)) : (
375
375
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
376
- Se(u, (g) => g.test(c))
376
+ bt(u, (g) => g.test(c))
377
377
  );
378
378
  let d;
379
- d = e.valueCallback ? e.valueCallback(i) : i, d = n.valueCallback ? (
379
+ d = t.valueCallback ? t.valueCallback(i) : i, d = n.valueCallback ? (
380
380
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
381
381
  n.valueCallback(d)
382
382
  ) : d;
383
- const f = t.slice(c.length);
383
+ const f = e.slice(c.length);
384
384
  return { value: d, rest: f };
385
385
  };
386
386
  }
387
- function Se(e, t) {
388
- for (const n in e)
389
- if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
387
+ function bt(t, e) {
388
+ for (const n in t)
389
+ if (Object.prototype.hasOwnProperty.call(t, n) && e(t[n]))
390
390
  return n;
391
391
  }
392
- function Oe(e, t) {
393
- for (let n = 0; n < e.length; n++)
394
- if (t(e[n]))
392
+ function yt(t, e) {
393
+ for (let n = 0; n < t.length; n++)
394
+ if (e(t[n]))
395
395
  return n;
396
396
  }
397
- function De(e) {
398
- return (t, n = {}) => {
399
- const r = t.match(e.matchPattern);
397
+ function Pt(t) {
398
+ return (e, n = {}) => {
399
+ const r = e.match(t.matchPattern);
400
400
  if (!r) return null;
401
- const a = r[0], o = t.match(e.parsePattern);
401
+ const a = r[0], o = e.match(t.parsePattern);
402
402
  if (!o) return null;
403
- let c = e.valueCallback ? e.valueCallback(o[0]) : o[0];
403
+ let c = t.valueCallback ? t.valueCallback(o[0]) : o[0];
404
404
  c = n.valueCallback ? n.valueCallback(c) : c;
405
- const u = t.slice(a.length);
405
+ const u = e.slice(a.length);
406
406
  return { value: c, rest: u };
407
407
  };
408
408
  }
409
- const Te = /^(\d+)(th|st|nd|rd)?/i, ke = /\d+/i, Me = {
409
+ const vt = /^(\d+)(th|st|nd|rd)?/i, St = /\d+/i, Ot = {
410
410
  narrow: /^(b|a)/i,
411
411
  abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
412
412
  wide: /^(before christ|before common era|anno domini|common era)/i
413
- }, xe = {
413
+ }, Dt = {
414
414
  any: [/^b/i, /^(a|c)/i]
415
- }, Ee = {
415
+ }, Mt = {
416
416
  narrow: /^[1234]/i,
417
417
  abbreviated: /^q[1234]/i,
418
418
  wide: /^[1234](th|st|nd|rd)? quarter/i
419
- }, We = {
419
+ }, Tt = {
420
420
  any: [/1/i, /2/i, /3/i, /4/i]
421
- }, Ae = {
421
+ }, pt = {
422
422
  narrow: /^[jfmasond]/i,
423
423
  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
424
424
  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
425
- }, Ce = {
425
+ }, kt = {
426
426
  narrow: [
427
427
  /^j/i,
428
428
  /^f/i,
@@ -451,18 +451,18 @@ const Te = /^(\d+)(th|st|nd|rd)?/i, ke = /\d+/i, Me = {
451
451
  /^n/i,
452
452
  /^d/i
453
453
  ]
454
- }, Ye = {
454
+ }, xt = {
455
455
  narrow: /^[smtwf]/i,
456
456
  short: /^(su|mo|tu|we|th|fr|sa)/i,
457
457
  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
458
458
  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
459
- }, pe = {
459
+ }, Et = {
460
460
  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
461
461
  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
462
- }, Ne = {
462
+ }, Wt = {
463
463
  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
464
464
  any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
465
- }, Le = {
465
+ }, At = {
466
466
  any: {
467
467
  am: /^a/i,
468
468
  pm: /^p/i,
@@ -473,104 +473,104 @@ const Te = /^(\d+)(th|st|nd|rd)?/i, ke = /\d+/i, Me = {
473
473
  evening: /evening/i,
474
474
  night: /night/i
475
475
  }
476
- }, Fe = {
477
- ordinalNumber: De({
478
- matchPattern: Te,
479
- parsePattern: ke,
480
- valueCallback: (e) => parseInt(e, 10)
476
+ }, Ct = {
477
+ ordinalNumber: Pt({
478
+ matchPattern: vt,
479
+ parsePattern: St,
480
+ valueCallback: (t) => parseInt(t, 10)
481
481
  }),
482
- era: k({
483
- matchPatterns: Me,
482
+ era: D({
483
+ matchPatterns: Ot,
484
484
  defaultMatchWidth: "wide",
485
- parsePatterns: xe,
485
+ parsePatterns: Dt,
486
486
  defaultParseWidth: "any"
487
487
  }),
488
- quarter: k({
489
- matchPatterns: Ee,
488
+ quarter: D({
489
+ matchPatterns: Mt,
490
490
  defaultMatchWidth: "wide",
491
- parsePatterns: We,
491
+ parsePatterns: Tt,
492
492
  defaultParseWidth: "any",
493
- valueCallback: (e) => e + 1
493
+ valueCallback: (t) => t + 1
494
494
  }),
495
- month: k({
496
- matchPatterns: Ae,
495
+ month: D({
496
+ matchPatterns: pt,
497
497
  defaultMatchWidth: "wide",
498
- parsePatterns: Ce,
498
+ parsePatterns: kt,
499
499
  defaultParseWidth: "any"
500
500
  }),
501
- day: k({
502
- matchPatterns: Ye,
501
+ day: D({
502
+ matchPatterns: xt,
503
503
  defaultMatchWidth: "wide",
504
- parsePatterns: pe,
504
+ parsePatterns: Et,
505
505
  defaultParseWidth: "any"
506
506
  }),
507
- dayPeriod: k({
508
- matchPatterns: Ne,
507
+ dayPeriod: D({
508
+ matchPatterns: Wt,
509
509
  defaultMatchWidth: "any",
510
- parsePatterns: Le,
510
+ parsePatterns: At,
511
511
  defaultParseWidth: "any"
512
512
  })
513
- }, _e = {
513
+ }, Yt = {
514
514
  code: "en-US",
515
- formatDistance: ie,
516
- formatLong: de,
517
- formatRelative: le,
518
- localize: ve,
519
- match: Fe,
515
+ formatDistance: nt,
516
+ formatLong: it,
517
+ formatRelative: ut,
518
+ localize: wt,
519
+ match: Ct,
520
520
  options: {
521
521
  weekStartsOn: 0,
522
522
  firstWeekContainsDate: 1
523
523
  }
524
524
  };
525
- function Re(e) {
526
- const t = b(e);
527
- return ee(t, ae(t)) + 1;
525
+ function Nt(t) {
526
+ const e = b(t);
527
+ return $(e, tt(e)) + 1;
528
528
  }
529
- function Ie(e) {
530
- const t = b(e), n = +E(t) - +te(t);
531
- return Math.round(n / X) + 1;
529
+ function Lt(t) {
530
+ const e = b(t), n = +p(e) - +K(e);
531
+ return Math.round(n / H) + 1;
532
532
  }
533
- function B(e, t) {
534
- var f, g, l, w;
535
- const n = b(e), r = n.getFullYear(), a = W(), o = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((g = (f = t == null ? void 0 : t.locale) == null ? void 0 : f.options) == null ? void 0 : g.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((w = (l = a.locale) == null ? void 0 : l.options) == null ? void 0 : w.firstWeekContainsDate) ?? 1, c = O(e, 0);
533
+ function G(t, e) {
534
+ var f, g, h, w;
535
+ const n = b(t), r = n.getFullYear(), a = k(), o = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((g = (f = e == null ? void 0 : e.locale) == null ? void 0 : f.options) == null ? void 0 : g.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((w = (h = a.locale) == null ? void 0 : h.options) == null ? void 0 : w.firstWeekContainsDate) ?? 1, c = v(t, 0);
536
536
  c.setFullYear(r + 1, 0, o), c.setHours(0, 0, 0, 0);
537
- const u = M(c, t), i = O(e, 0);
537
+ const u = M(c, e), i = v(t, 0);
538
538
  i.setFullYear(r, 0, o), i.setHours(0, 0, 0, 0);
539
- const d = M(i, t);
539
+ const d = M(i, e);
540
540
  return n.getTime() >= u.getTime() ? r + 1 : n.getTime() >= d.getTime() ? r : r - 1;
541
541
  }
542
- function He(e, t) {
542
+ function Ft(t, e) {
543
543
  var u, i, d, f;
544
- const n = W(), r = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((i = (u = t == null ? void 0 : t.locale) == null ? void 0 : u.options) == null ? void 0 : i.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((f = (d = n.locale) == null ? void 0 : d.options) == null ? void 0 : f.firstWeekContainsDate) ?? 1, a = B(e, t), o = O(e, 0);
545
- return o.setFullYear(a, 0, r), o.setHours(0, 0, 0, 0), M(o, t);
544
+ const n = k(), r = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((i = (u = e == null ? void 0 : e.locale) == null ? void 0 : u.options) == null ? void 0 : i.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((f = (d = n.locale) == null ? void 0 : d.options) == null ? void 0 : f.firstWeekContainsDate) ?? 1, a = G(t, e), o = v(t, 0);
545
+ return o.setFullYear(a, 0, r), o.setHours(0, 0, 0, 0), M(o, e);
546
546
  }
547
- function qe(e, t) {
548
- const n = b(e), r = +M(n, t) - +He(n, t);
549
- return Math.round(r / X) + 1;
547
+ function _t(t, e) {
548
+ const n = b(t), r = +M(n, e) - +Ft(n, e);
549
+ return Math.round(r / H) + 1;
550
550
  }
551
- function s(e, t) {
552
- const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
551
+ function s(t, e) {
552
+ const n = t < 0 ? "-" : "", r = Math.abs(t).toString().padStart(e, "0");
553
553
  return n + r;
554
554
  }
555
- const P = {
555
+ const y = {
556
556
  // Year
557
- y(e, t) {
558
- const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
559
- return s(t === "yy" ? r % 100 : r, t.length);
557
+ y(t, e) {
558
+ const n = t.getFullYear(), r = n > 0 ? n : 1 - n;
559
+ return s(e === "yy" ? r % 100 : r, e.length);
560
560
  },
561
561
  // Month
562
- M(e, t) {
563
- const n = e.getMonth();
564
- return t === "M" ? String(n + 1) : s(n + 1, 2);
562
+ M(t, e) {
563
+ const n = t.getMonth();
564
+ return e === "M" ? String(n + 1) : s(n + 1, 2);
565
565
  },
566
566
  // Day of the month
567
- d(e, t) {
568
- return s(e.getDate(), t.length);
567
+ d(t, e) {
568
+ return s(t.getDate(), e.length);
569
569
  },
570
570
  // AM or PM
571
- a(e, t) {
572
- const n = e.getHours() / 12 >= 1 ? "pm" : "am";
573
- switch (t) {
571
+ a(t, e) {
572
+ const n = t.getHours() / 12 >= 1 ? "pm" : "am";
573
+ switch (e) {
574
574
  case "a":
575
575
  case "aa":
576
576
  return n.toUpperCase();
@@ -584,29 +584,29 @@ const P = {
584
584
  }
585
585
  },
586
586
  // Hour [1-12]
587
- h(e, t) {
588
- return s(e.getHours() % 12 || 12, t.length);
587
+ h(t, e) {
588
+ return s(t.getHours() % 12 || 12, e.length);
589
589
  },
590
590
  // Hour [0-23]
591
- H(e, t) {
592
- return s(e.getHours(), t.length);
591
+ H(t, e) {
592
+ return s(t.getHours(), e.length);
593
593
  },
594
594
  // Minute
595
- m(e, t) {
596
- return s(e.getMinutes(), t.length);
595
+ m(t, e) {
596
+ return s(t.getMinutes(), e.length);
597
597
  },
598
598
  // Second
599
- s(e, t) {
600
- return s(e.getSeconds(), t.length);
599
+ s(t, e) {
600
+ return s(t.getSeconds(), e.length);
601
601
  },
602
602
  // Fraction of second
603
- S(e, t) {
604
- const n = t.length, r = e.getMilliseconds(), a = Math.trunc(
603
+ S(t, e) {
604
+ const n = e.length, r = t.getMilliseconds(), a = Math.trunc(
605
605
  r * Math.pow(10, n - 3)
606
606
  );
607
- return s(a, t.length);
607
+ return s(a, e.length);
608
608
  }
609
- }, D = {
609
+ }, S = {
610
610
  am: "am",
611
611
  pm: "pm",
612
612
  midnight: "midnight",
@@ -615,11 +615,11 @@ const P = {
615
615
  afternoon: "afternoon",
616
616
  evening: "evening",
617
617
  night: "night"
618
- }, H = {
618
+ }, F = {
619
619
  // Era
620
- G: function(e, t, n) {
621
- const r = e.getFullYear() > 0 ? 1 : 0;
622
- switch (t) {
620
+ G: function(t, e, n) {
621
+ const r = t.getFullYear() > 0 ? 1 : 0;
622
+ switch (e) {
623
623
  case "G":
624
624
  case "GG":
625
625
  case "GGG":
@@ -632,26 +632,26 @@ const P = {
632
632
  }
633
633
  },
634
634
  // Year
635
- y: function(e, t, n) {
636
- if (t === "yo") {
637
- const r = e.getFullYear(), a = r > 0 ? r : 1 - r;
635
+ y: function(t, e, n) {
636
+ if (e === "yo") {
637
+ const r = t.getFullYear(), a = r > 0 ? r : 1 - r;
638
638
  return n.ordinalNumber(a, { unit: "year" });
639
639
  }
640
- return P.y(e, t);
640
+ return y.y(t, e);
641
641
  },
642
642
  // Local week-numbering year
643
- Y: function(e, t, n, r) {
644
- const a = B(e, r), o = a > 0 ? a : 1 - a;
645
- if (t === "YY") {
643
+ Y: function(t, e, n, r) {
644
+ const a = G(t, r), o = a > 0 ? a : 1 - a;
645
+ if (e === "YY") {
646
646
  const c = o % 100;
647
647
  return s(c, 2);
648
648
  }
649
- return t === "Yo" ? n.ordinalNumber(o, { unit: "year" }) : s(o, t.length);
649
+ return e === "Yo" ? n.ordinalNumber(o, { unit: "year" }) : s(o, e.length);
650
650
  },
651
651
  // ISO week-numbering year
652
- R: function(e, t) {
653
- const n = Q(e);
654
- return s(n, t.length);
652
+ R: function(t, e) {
653
+ const n = q(t);
654
+ return s(n, e.length);
655
655
  },
656
656
  // Extended year. This is a single number designating the year of this calendar system.
657
657
  // The main difference between `y` and `u` localizers are B.C. years:
@@ -662,14 +662,14 @@ const P = {
662
662
  // | BC 2 | 2 | -1 |
663
663
  // Also `yy` always returns the last two digits of a year,
664
664
  // while `uu` pads single digit years to 2 characters and returns other years unchanged.
665
- u: function(e, t) {
666
- const n = e.getFullYear();
667
- return s(n, t.length);
665
+ u: function(t, e) {
666
+ const n = t.getFullYear();
667
+ return s(n, e.length);
668
668
  },
669
669
  // Quarter
670
- Q: function(e, t, n) {
671
- const r = Math.ceil((e.getMonth() + 1) / 3);
672
- switch (t) {
670
+ Q: function(t, e, n) {
671
+ const r = Math.ceil((t.getMonth() + 1) / 3);
672
+ switch (e) {
673
673
  case "Q":
674
674
  return String(r);
675
675
  case "QQ":
@@ -695,9 +695,9 @@ const P = {
695
695
  }
696
696
  },
697
697
  // Stand-alone quarter
698
- q: function(e, t, n) {
699
- const r = Math.ceil((e.getMonth() + 1) / 3);
700
- switch (t) {
698
+ q: function(t, e, n) {
699
+ const r = Math.ceil((t.getMonth() + 1) / 3);
700
+ switch (e) {
701
701
  case "q":
702
702
  return String(r);
703
703
  case "qq":
@@ -723,12 +723,12 @@ const P = {
723
723
  }
724
724
  },
725
725
  // Month
726
- M: function(e, t, n) {
727
- const r = e.getMonth();
728
- switch (t) {
726
+ M: function(t, e, n) {
727
+ const r = t.getMonth();
728
+ switch (e) {
729
729
  case "M":
730
730
  case "MM":
731
- return P.M(e, t);
731
+ return y.M(t, e);
732
732
  case "Mo":
733
733
  return n.ordinalNumber(r + 1, { unit: "month" });
734
734
  case "MMM":
@@ -747,9 +747,9 @@ const P = {
747
747
  }
748
748
  },
749
749
  // Stand-alone month
750
- L: function(e, t, n) {
751
- const r = e.getMonth();
752
- switch (t) {
750
+ L: function(t, e, n) {
751
+ const r = t.getMonth();
752
+ switch (e) {
753
753
  case "L":
754
754
  return String(r + 1);
755
755
  case "LL":
@@ -772,28 +772,28 @@ const P = {
772
772
  }
773
773
  },
774
774
  // Local week of year
775
- w: function(e, t, n, r) {
776
- const a = qe(e, r);
777
- return t === "wo" ? n.ordinalNumber(a, { unit: "week" }) : s(a, t.length);
775
+ w: function(t, e, n, r) {
776
+ const a = _t(t, r);
777
+ return e === "wo" ? n.ordinalNumber(a, { unit: "week" }) : s(a, e.length);
778
778
  },
779
779
  // ISO week of year
780
- I: function(e, t, n) {
781
- const r = Ie(e);
782
- return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : s(r, t.length);
780
+ I: function(t, e, n) {
781
+ const r = Lt(t);
782
+ return e === "Io" ? n.ordinalNumber(r, { unit: "week" }) : s(r, e.length);
783
783
  },
784
784
  // Day of the month
785
- d: function(e, t, n) {
786
- return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : P.d(e, t);
785
+ d: function(t, e, n) {
786
+ return e === "do" ? n.ordinalNumber(t.getDate(), { unit: "date" }) : y.d(t, e);
787
787
  },
788
788
  // Day of year
789
- D: function(e, t, n) {
790
- const r = Re(e);
791
- return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : s(r, t.length);
789
+ D: function(t, e, n) {
790
+ const r = Nt(t);
791
+ return e === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : s(r, e.length);
792
792
  },
793
793
  // Day of week
794
- E: function(e, t, n) {
795
- const r = e.getDay();
796
- switch (t) {
794
+ E: function(t, e, n) {
795
+ const r = t.getDay();
796
+ switch (e) {
797
797
  case "E":
798
798
  case "EE":
799
799
  case "EEE":
@@ -820,9 +820,9 @@ const P = {
820
820
  }
821
821
  },
822
822
  // Local day of week
823
- e: function(e, t, n, r) {
824
- const a = e.getDay(), o = (a - r.weekStartsOn + 8) % 7 || 7;
825
- switch (t) {
823
+ e: function(t, e, n, r) {
824
+ const a = t.getDay(), o = (a - r.weekStartsOn + 8) % 7 || 7;
825
+ switch (e) {
826
826
  case "e":
827
827
  return String(o);
828
828
  case "ee":
@@ -853,13 +853,13 @@ const P = {
853
853
  }
854
854
  },
855
855
  // Stand-alone local day of week
856
- c: function(e, t, n, r) {
857
- const a = e.getDay(), o = (a - r.weekStartsOn + 8) % 7 || 7;
858
- switch (t) {
856
+ c: function(t, e, n, r) {
857
+ const a = t.getDay(), o = (a - r.weekStartsOn + 8) % 7 || 7;
858
+ switch (e) {
859
859
  case "c":
860
860
  return String(o);
861
861
  case "cc":
862
- return s(o, t.length);
862
+ return s(o, e.length);
863
863
  case "co":
864
864
  return n.ordinalNumber(o, { unit: "day" });
865
865
  case "ccc":
@@ -886,13 +886,13 @@ const P = {
886
886
  }
887
887
  },
888
888
  // ISO day of week
889
- i: function(e, t, n) {
890
- const r = e.getDay(), a = r === 0 ? 7 : r;
891
- switch (t) {
889
+ i: function(t, e, n) {
890
+ const r = t.getDay(), a = r === 0 ? 7 : r;
891
+ switch (e) {
892
892
  case "i":
893
893
  return String(a);
894
894
  case "ii":
895
- return s(a, t.length);
895
+ return s(a, e.length);
896
896
  case "io":
897
897
  return n.ordinalNumber(a, { unit: "day" });
898
898
  case "iii":
@@ -919,9 +919,9 @@ const P = {
919
919
  }
920
920
  },
921
921
  // AM or PM
922
- a: function(e, t, n) {
923
- const a = e.getHours() / 12 >= 1 ? "pm" : "am";
924
- switch (t) {
922
+ a: function(t, e, n) {
923
+ const a = t.getHours() / 12 >= 1 ? "pm" : "am";
924
+ switch (e) {
925
925
  case "a":
926
926
  case "aa":
927
927
  return n.dayPeriod(a, {
@@ -947,10 +947,10 @@ const P = {
947
947
  }
948
948
  },
949
949
  // AM, PM, midnight, noon
950
- b: function(e, t, n) {
951
- const r = e.getHours();
950
+ b: function(t, e, n) {
951
+ const r = t.getHours();
952
952
  let a;
953
- switch (r === 12 ? a = D.noon : r === 0 ? a = D.midnight : a = r / 12 >= 1 ? "pm" : "am", t) {
953
+ switch (r === 12 ? a = S.noon : r === 0 ? a = S.midnight : a = r / 12 >= 1 ? "pm" : "am", e) {
954
954
  case "b":
955
955
  case "bb":
956
956
  return n.dayPeriod(a, {
@@ -976,10 +976,10 @@ const P = {
976
976
  }
977
977
  },
978
978
  // in the morning, in the afternoon, in the evening, at night
979
- B: function(e, t, n) {
980
- const r = e.getHours();
979
+ B: function(t, e, n) {
980
+ const r = t.getHours();
981
981
  let a;
982
- switch (r >= 17 ? a = D.evening : r >= 12 ? a = D.afternoon : r >= 4 ? a = D.morning : a = D.night, t) {
982
+ switch (r >= 17 ? a = S.evening : r >= 12 ? a = S.afternoon : r >= 4 ? a = S.morning : a = S.night, e) {
983
983
  case "B":
984
984
  case "BB":
985
985
  case "BBB":
@@ -1001,206 +1001,206 @@ const P = {
1001
1001
  }
1002
1002
  },
1003
1003
  // Hour [1-12]
1004
- h: function(e, t, n) {
1005
- if (t === "ho") {
1006
- let r = e.getHours() % 12;
1004
+ h: function(t, e, n) {
1005
+ if (e === "ho") {
1006
+ let r = t.getHours() % 12;
1007
1007
  return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
1008
1008
  }
1009
- return P.h(e, t);
1009
+ return y.h(t, e);
1010
1010
  },
1011
1011
  // Hour [0-23]
1012
- H: function(e, t, n) {
1013
- return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : P.H(e, t);
1012
+ H: function(t, e, n) {
1013
+ return e === "Ho" ? n.ordinalNumber(t.getHours(), { unit: "hour" }) : y.H(t, e);
1014
1014
  },
1015
1015
  // Hour [0-11]
1016
- K: function(e, t, n) {
1017
- const r = e.getHours() % 12;
1018
- return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : s(r, t.length);
1016
+ K: function(t, e, n) {
1017
+ const r = t.getHours() % 12;
1018
+ return e === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : s(r, e.length);
1019
1019
  },
1020
1020
  // Hour [1-24]
1021
- k: function(e, t, n) {
1022
- let r = e.getHours();
1023
- return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : s(r, t.length);
1021
+ k: function(t, e, n) {
1022
+ let r = t.getHours();
1023
+ return r === 0 && (r = 24), e === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : s(r, e.length);
1024
1024
  },
1025
1025
  // Minute
1026
- m: function(e, t, n) {
1027
- return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : P.m(e, t);
1026
+ m: function(t, e, n) {
1027
+ return e === "mo" ? n.ordinalNumber(t.getMinutes(), { unit: "minute" }) : y.m(t, e);
1028
1028
  },
1029
1029
  // Second
1030
- s: function(e, t, n) {
1031
- return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : P.s(e, t);
1030
+ s: function(t, e, n) {
1031
+ return e === "so" ? n.ordinalNumber(t.getSeconds(), { unit: "second" }) : y.s(t, e);
1032
1032
  },
1033
1033
  // Fraction of second
1034
- S: function(e, t) {
1035
- return P.S(e, t);
1034
+ S: function(t, e) {
1035
+ return y.S(t, e);
1036
1036
  },
1037
1037
  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1038
- X: function(e, t, n) {
1039
- const r = e.getTimezoneOffset();
1038
+ X: function(t, e, n) {
1039
+ const r = t.getTimezoneOffset();
1040
1040
  if (r === 0)
1041
1041
  return "Z";
1042
- switch (t) {
1042
+ switch (e) {
1043
1043
  case "X":
1044
- return G(r);
1044
+ return R(r);
1045
1045
  case "XXXX":
1046
1046
  case "XX":
1047
- return S(r);
1047
+ return P(r);
1048
1048
  case "XXXXX":
1049
1049
  case "XXX":
1050
1050
  default:
1051
- return S(r, ":");
1051
+ return P(r, ":");
1052
1052
  }
1053
1053
  },
1054
1054
  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
1055
- x: function(e, t, n) {
1056
- const r = e.getTimezoneOffset();
1057
- switch (t) {
1055
+ x: function(t, e, n) {
1056
+ const r = t.getTimezoneOffset();
1057
+ switch (e) {
1058
1058
  case "x":
1059
- return G(r);
1059
+ return R(r);
1060
1060
  case "xxxx":
1061
1061
  case "xx":
1062
- return S(r);
1062
+ return P(r);
1063
1063
  case "xxxxx":
1064
1064
  case "xxx":
1065
1065
  default:
1066
- return S(r, ":");
1066
+ return P(r, ":");
1067
1067
  }
1068
1068
  },
1069
1069
  // Timezone (GMT)
1070
- O: function(e, t, n) {
1071
- const r = e.getTimezoneOffset();
1072
- switch (t) {
1070
+ O: function(t, e, n) {
1071
+ const r = t.getTimezoneOffset();
1072
+ switch (e) {
1073
1073
  case "O":
1074
1074
  case "OO":
1075
1075
  case "OOO":
1076
- return "GMT" + q(r, ":");
1076
+ return "GMT" + _(r, ":");
1077
1077
  case "OOOO":
1078
1078
  default:
1079
- return "GMT" + S(r, ":");
1079
+ return "GMT" + P(r, ":");
1080
1080
  }
1081
1081
  },
1082
1082
  // Timezone (specific non-location)
1083
- z: function(e, t, n) {
1084
- const r = e.getTimezoneOffset();
1085
- switch (t) {
1083
+ z: function(t, e, n) {
1084
+ const r = t.getTimezoneOffset();
1085
+ switch (e) {
1086
1086
  case "z":
1087
1087
  case "zz":
1088
1088
  case "zzz":
1089
- return "GMT" + q(r, ":");
1089
+ return "GMT" + _(r, ":");
1090
1090
  case "zzzz":
1091
1091
  default:
1092
- return "GMT" + S(r, ":");
1092
+ return "GMT" + P(r, ":");
1093
1093
  }
1094
1094
  },
1095
1095
  // Seconds timestamp
1096
- t: function(e, t, n) {
1097
- const r = Math.trunc(e.getTime() / 1e3);
1098
- return s(r, t.length);
1096
+ t: function(t, e, n) {
1097
+ const r = Math.trunc(t.getTime() / 1e3);
1098
+ return s(r, e.length);
1099
1099
  },
1100
1100
  // Milliseconds timestamp
1101
- T: function(e, t, n) {
1102
- const r = e.getTime();
1103
- return s(r, t.length);
1101
+ T: function(t, e, n) {
1102
+ const r = t.getTime();
1103
+ return s(r, e.length);
1104
1104
  }
1105
1105
  };
1106
- function q(e, t = "") {
1107
- const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.trunc(r / 60), o = r % 60;
1108
- return o === 0 ? n + String(a) : n + String(a) + t + s(o, 2);
1106
+ function _(t, e = "") {
1107
+ const n = t > 0 ? "-" : "+", r = Math.abs(t), a = Math.trunc(r / 60), o = r % 60;
1108
+ return o === 0 ? n + String(a) : n + String(a) + e + s(o, 2);
1109
1109
  }
1110
- function G(e, t) {
1111
- return e % 60 === 0 ? (e > 0 ? "-" : "+") + s(Math.abs(e) / 60, 2) : S(e, t);
1110
+ function R(t, e) {
1111
+ return t % 60 === 0 ? (t > 0 ? "-" : "+") + s(Math.abs(t) / 60, 2) : P(t, e);
1112
1112
  }
1113
- function S(e, t = "") {
1114
- const n = e > 0 ? "-" : "+", r = Math.abs(e), a = s(Math.trunc(r / 60), 2), o = s(r % 60, 2);
1115
- return n + a + t + o;
1113
+ function P(t, e = "") {
1114
+ const n = t > 0 ? "-" : "+", r = Math.abs(t), a = s(Math.trunc(r / 60), 2), o = s(r % 60, 2);
1115
+ return n + a + e + o;
1116
1116
  }
1117
- const j = (e, t) => {
1118
- switch (e) {
1117
+ const I = (t, e) => {
1118
+ switch (t) {
1119
1119
  case "P":
1120
- return t.date({ width: "short" });
1120
+ return e.date({ width: "short" });
1121
1121
  case "PP":
1122
- return t.date({ width: "medium" });
1122
+ return e.date({ width: "medium" });
1123
1123
  case "PPP":
1124
- return t.date({ width: "long" });
1124
+ return e.date({ width: "long" });
1125
1125
  case "PPPP":
1126
1126
  default:
1127
- return t.date({ width: "full" });
1127
+ return e.date({ width: "full" });
1128
1128
  }
1129
- }, V = (e, t) => {
1130
- switch (e) {
1129
+ }, j = (t, e) => {
1130
+ switch (t) {
1131
1131
  case "p":
1132
- return t.time({ width: "short" });
1132
+ return e.time({ width: "short" });
1133
1133
  case "pp":
1134
- return t.time({ width: "medium" });
1134
+ return e.time({ width: "medium" });
1135
1135
  case "ppp":
1136
- return t.time({ width: "long" });
1136
+ return e.time({ width: "long" });
1137
1137
  case "pppp":
1138
1138
  default:
1139
- return t.time({ width: "full" });
1139
+ return e.time({ width: "full" });
1140
1140
  }
1141
- }, Ge = (e, t) => {
1142
- const n = e.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
1141
+ }, Rt = (t, e) => {
1142
+ const n = t.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
1143
1143
  if (!a)
1144
- return j(e, t);
1144
+ return I(t, e);
1145
1145
  let o;
1146
1146
  switch (r) {
1147
1147
  case "P":
1148
- o = t.dateTime({ width: "short" });
1148
+ o = e.dateTime({ width: "short" });
1149
1149
  break;
1150
1150
  case "PP":
1151
- o = t.dateTime({ width: "medium" });
1151
+ o = e.dateTime({ width: "medium" });
1152
1152
  break;
1153
1153
  case "PPP":
1154
- o = t.dateTime({ width: "long" });
1154
+ o = e.dateTime({ width: "long" });
1155
1155
  break;
1156
1156
  case "PPPP":
1157
1157
  default:
1158
- o = t.dateTime({ width: "full" });
1158
+ o = e.dateTime({ width: "full" });
1159
1159
  break;
1160
1160
  }
1161
- return o.replace("{{date}}", j(r, t)).replace("{{time}}", V(a, t));
1162
- }, je = {
1163
- p: V,
1164
- P: Ge
1165
- }, Xe = /^D+$/, Qe = /^Y+$/, Be = ["D", "DD", "YY", "YYYY"];
1166
- function Ve(e) {
1167
- return Xe.test(e);
1161
+ return o.replace("{{date}}", I(r, e)).replace("{{time}}", j(a, e));
1162
+ }, It = {
1163
+ p: j,
1164
+ P: Rt
1165
+ }, Ht = /^D+$/, qt = /^Y+$/, Gt = ["D", "DD", "YY", "YYYY"];
1166
+ function jt(t) {
1167
+ return Ht.test(t);
1168
1168
  }
1169
- function Ue(e) {
1170
- return Qe.test(e);
1169
+ function Xt(t) {
1170
+ return qt.test(t);
1171
1171
  }
1172
- function Je(e, t, n) {
1173
- const r = $e(e, t, n);
1174
- if (console.warn(r), Be.includes(e)) throw new RangeError(r);
1172
+ function Qt(t, e, n) {
1173
+ const r = Bt(t, e, n);
1174
+ if (console.warn(r), Gt.includes(t)) throw new RangeError(r);
1175
1175
  }
1176
- function $e(e, t, n) {
1177
- const r = e[0] === "Y" ? "years" : "days of the month";
1178
- return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1176
+ function Bt(t, e, n) {
1177
+ const r = t[0] === "Y" ? "years" : "days of the month";
1178
+ return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1179
1179
  }
1180
- const Ke = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, ze = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ze = /^'([^]*?)'?$/, et = /''/g, tt = /[a-zA-Z]/;
1181
- function nt(e, t, n) {
1182
- var f, g, l, w, v, y, p, N;
1183
- const r = W(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? _e, o = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((g = (f = n == null ? void 0 : n.locale) == null ? void 0 : f.options) == null ? void 0 : g.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((w = (l = r.locale) == null ? void 0 : l.options) == null ? void 0 : w.firstWeekContainsDate) ?? 1, c = (n == null ? void 0 : n.weekStartsOn) ?? ((y = (v = n == null ? void 0 : n.locale) == null ? void 0 : v.options) == null ? void 0 : y.weekStartsOn) ?? r.weekStartsOn ?? ((N = (p = r.locale) == null ? void 0 : p.options) == null ? void 0 : N.weekStartsOn) ?? 0, u = b(e);
1184
- if (!re(u))
1180
+ const Vt = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Ut = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Jt = /^'([^]*?)'?$/, $t = /''/g, Kt = /[a-zA-Z]/;
1181
+ function zt(t, e, n) {
1182
+ var f, g, h, w;
1183
+ const r = k(), a = r.locale ?? Yt, o = r.firstWeekContainsDate ?? ((g = (f = r.locale) == null ? void 0 : f.options) == null ? void 0 : g.firstWeekContainsDate) ?? 1, c = r.weekStartsOn ?? ((w = (h = r.locale) == null ? void 0 : h.options) == null ? void 0 : w.weekStartsOn) ?? 0, u = b(t);
1184
+ if (!Z(u))
1185
1185
  throw new RangeError("Invalid time value");
1186
- let i = t.match(ze).map((m) => {
1187
- const h = m[0];
1188
- if (h === "p" || h === "P") {
1189
- const A = je[h];
1190
- return A(m, a.formatLong);
1186
+ let i = e.match(Ut).map((m) => {
1187
+ const l = m[0];
1188
+ if (l === "p" || l === "P") {
1189
+ const x = It[l];
1190
+ return x(m, a.formatLong);
1191
1191
  }
1192
1192
  return m;
1193
- }).join("").match(Ke).map((m) => {
1193
+ }).join("").match(Vt).map((m) => {
1194
1194
  if (m === "''")
1195
1195
  return { isToken: !1, value: "'" };
1196
- const h = m[0];
1197
- if (h === "'")
1198
- return { isToken: !1, value: rt(m) };
1199
- if (H[h])
1196
+ const l = m[0];
1197
+ if (l === "'")
1198
+ return { isToken: !1, value: Zt(m) };
1199
+ if (F[l])
1200
1200
  return { isToken: !0, value: m };
1201
- if (h.match(tt))
1201
+ if (l.match(Kt))
1202
1202
  throw new RangeError(
1203
- "Format string contains an unescaped latin alphabet character `" + h + "`"
1203
+ "Format string contains an unescaped latin alphabet character `" + l + "`"
1204
1204
  );
1205
1205
  return { isToken: !1, value: m };
1206
1206
  });
@@ -1212,17 +1212,17 @@ function nt(e, t, n) {
1212
1212
  };
1213
1213
  return i.map((m) => {
1214
1214
  if (!m.isToken) return m.value;
1215
- const h = m.value;
1216
- (!(n != null && n.useAdditionalWeekYearTokens) && Ue(h) || !(n != null && n.useAdditionalDayOfYearTokens) && Ve(h)) && Je(h, t, String(e));
1217
- const A = H[h[0]];
1218
- return A(u, h, a.localize, d);
1215
+ const l = m.value;
1216
+ (Xt(l) || jt(l)) && Qt(l, e, String(t));
1217
+ const x = F[l[0]];
1218
+ return x(u, l, a.localize, d);
1219
1219
  }).join("");
1220
1220
  }
1221
- function rt(e) {
1222
- const t = e.match(Ze);
1223
- return t ? t[1].replace(et, "'") : e;
1221
+ function Zt(t) {
1222
+ const e = t.match(Jt);
1223
+ return e ? e[1].replace($t, "'") : t;
1224
1224
  }
1225
- function st() {
1225
+ function oe() {
1226
1226
  return {
1227
1227
  formatDateBy: (n, r = {}) => {
1228
1228
  if (isNaN(n))
@@ -1249,28 +1249,28 @@ function st() {
1249
1249
  const a = r ? "yyyy-MM-dd HH:mm:ss" : "yyyy-MM-dd HH:mm:ss XX";
1250
1250
  try {
1251
1251
  const o = new Date(n * 1e3);
1252
- return nt(o, a);
1252
+ return zt(o, a);
1253
1253
  } catch {
1254
1254
  return "";
1255
1255
  }
1256
1256
  }
1257
1257
  };
1258
1258
  }
1259
- function dt() {
1259
+ function ie() {
1260
1260
  return {
1261
- debounce: (t, n) => {
1261
+ debounce: (e, n) => {
1262
1262
  let r;
1263
1263
  return (...a) => {
1264
1264
  clearTimeout(r), r = window == null ? void 0 : window.setTimeout(() => {
1265
- t(...a);
1265
+ e(...a);
1266
1266
  }, n);
1267
1267
  };
1268
1268
  }
1269
1269
  };
1270
1270
  }
1271
- function ft({ script: e, styles: t, onReady: n }) {
1272
- const r = x(!0), a = x(!0), o = async () => {
1273
- const { libName: i, url: d, type: f } = e;
1271
+ function ce({ script: t, styles: e, onReady: n }) {
1272
+ const r = T(!0), a = T(!0), o = async () => {
1273
+ const { libName: i, url: d, type: f } = t;
1274
1274
  if ((f !== void 0 && ["umd", "es"].includes(f) ? f : "umd") === "es") {
1275
1275
  await import(
1276
1276
  /* @vite-ignore */
@@ -1278,96 +1278,96 @@ function ft({ script: e, styles: t, onReady: n }) {
1278
1278
  ), typeof n == "function" && await n();
1279
1279
  return;
1280
1280
  }
1281
- const l = i.startsWith("kong-ui-") ? i : `kong-ui-${i}`;
1282
- return window[l] || (window[l] = await new Promise((w, v) => {
1283
- const y = document.createElement("script");
1284
- y.async = !0, y.addEventListener("load", async () => {
1285
- typeof n == "function" && await n(), r.value = !1, w(window[l]);
1286
- }), y.addEventListener("error", () => {
1287
- v(new Error(`Could not load '${l}' from ${d}`));
1288
- }), y.src = d, document.head.appendChild(y);
1289
- })), window[l];
1281
+ const h = i.startsWith("kong-ui-") ? i : `kong-ui-${i}`;
1282
+ return window[h] || (window[h] = await new Promise((w, m) => {
1283
+ const l = document.createElement("script");
1284
+ l.async = !0, l.addEventListener("load", async () => {
1285
+ typeof n == "function" && await n(), r.value = !1, w(window[h]);
1286
+ }), l.addEventListener("error", () => {
1287
+ m(new Error(`Could not load '${h}' from ${d}`));
1288
+ }), l.src = d, document.head.appendChild(l);
1289
+ })), window[h];
1290
1290
  }, c = async (i, d) => {
1291
1291
  var f;
1292
1292
  for (const g of i) {
1293
- const l = document.createElement("link");
1294
- l.type = "text/css", l.rel = "stylesheet", l.href = g;
1295
- const w = d ? document.querySelector(d) : null, v = d ? (f = w == null ? void 0 : w.shadowRoot) == null ? void 0 : f.children[0] : null;
1296
- if (w && v)
1293
+ const h = document.createElement("link");
1294
+ h.type = "text/css", h.rel = "stylesheet", h.href = g;
1295
+ const w = d ? document.querySelector(d) : null, m = d ? (f = w == null ? void 0 : w.shadowRoot) == null ? void 0 : f.children[0] : null;
1296
+ if (w && m)
1297
1297
  try {
1298
- v.appendChild(l);
1298
+ m.appendChild(h);
1299
1299
  } catch {
1300
- document.head.appendChild(l);
1300
+ document.head.appendChild(h);
1301
1301
  }
1302
1302
  else
1303
- document.head.appendChild(l);
1303
+ document.head.appendChild(h);
1304
1304
  }
1305
1305
  };
1306
1306
  return {
1307
1307
  importPackage: async () => {
1308
1308
  var d, f;
1309
- if (!e || !e.url || typeof window > "u" || typeof document > "u") return;
1310
- const i = $(() => !!(t && (t != null && t.urls) && (t != null && t.urls.length) && t.shadowRoot));
1311
- if ((!t || !(t != null && t.urls) || !((d = t == null ? void 0 : t.urls) != null && d.length)) && (a.value = !1), t != null && t.urls && ((f = t == null ? void 0 : t.urls) != null && f.length) && !i.value && (await c(t.urls), a.value = !1), (!e.type || e.type === "umd") && !i.value)
1309
+ if (!t || !t.url || typeof window > "u" || typeof document > "u") return;
1310
+ const i = B(() => !!(e && (e != null && e.urls) && (e != null && e.urls.length) && e.shadowRoot));
1311
+ if ((!e || !(e != null && e.urls) || !((d = e == null ? void 0 : e.urls) != null && d.length)) && (a.value = !1), e != null && e.urls && ((f = e == null ? void 0 : e.urls) != null && f.length) && !i.value && (await c(e.urls), a.value = !1), (!t.type || t.type === "umd") && !i.value)
1312
1312
  return await o();
1313
- await o(), await _(), r.value = !1, t != null && t.urls && i.value && (await c(t.urls, t == null ? void 0 : t.shadowRoot), await _(), a.value = !1);
1313
+ await o(), await Y(), r.value = !1, e != null && e.urls && i.value && (await c(e.urls, e == null ? void 0 : e.shadowRoot), await Y(), a.value = !1);
1314
1314
  },
1315
- loadingPackage: F(r),
1316
- loadingStyles: F(a)
1315
+ loadingPackage: C(r),
1316
+ loadingStyles: C(a)
1317
1317
  };
1318
1318
  }
1319
- var U = /* @__PURE__ */ ((e) => (e.VALIDATING = "VALIDATING", e.VALIDATING_HAS_DATA = "VALIDATING_HAS_DATA", e.PENDING = "PENDING", e.SUCCESS = "SUCCESS", e.SUCCESS_HAS_DATA = "SUCCESS_HAS_DATA", e.ERROR = "ERROR", e.STALE_IF_ERROR = "STALE_IF_ERROR", e))(U || {});
1320
- const at = (e) => {
1321
- var t, n, r, a, o;
1322
- return e ? !!// TODO: revisit: currently only the first check ever matters?
1323
- ((t = Object.keys(e)) != null && t.length || (n = e.data) != null && n.length || (a = (r = e.data) == null ? void 0 : r.data) != null && a.length || !((o = e.data) != null && o.data) && typeof e.data == "object" && Object.keys(e == null ? void 0 : e.data).length) : !1;
1319
+ var X = /* @__PURE__ */ ((t) => (t.VALIDATING = "VALIDATING", t.VALIDATING_HAS_DATA = "VALIDATING_HAS_DATA", t.PENDING = "PENDING", t.SUCCESS = "SUCCESS", t.SUCCESS_HAS_DATA = "SUCCESS_HAS_DATA", t.ERROR = "ERROR", t.STALE_IF_ERROR = "STALE_IF_ERROR", t))(X || {});
1320
+ const te = (t) => {
1321
+ var e, n, r, a, o;
1322
+ return t ? !!// TODO: revisit: currently only the first check ever matters?
1323
+ ((e = Object.keys(t)) != null && e.length || (n = t.data) != null && n.length || (a = (r = t.data) == null ? void 0 : r.data) != null && a.length || !((o = t.data) != null && o.data) && typeof t.data == "object" && Object.keys(t == null ? void 0 : t.data).length) : !1;
1324
1324
  };
1325
- function lt(e = x({}), t, n, r = at) {
1326
- const a = x(
1325
+ function ue(t = T({}), e, n, r = te) {
1326
+ const a = T(
1327
1327
  "PENDING"
1328
1328
  /* PENDING */
1329
1329
  );
1330
- return K(() => {
1331
- const o = r(e.value);
1332
- if (e.value && o && n.value) {
1330
+ return V(() => {
1331
+ const o = r(t.value);
1332
+ if (t.value && o && n.value) {
1333
1333
  a.value = "VALIDATING_HAS_DATA";
1334
1334
  return;
1335
1335
  }
1336
- if (e.value && n.value) {
1336
+ if (t.value && n.value) {
1337
1337
  a.value = "VALIDATING";
1338
1338
  return;
1339
1339
  }
1340
- if (e.value && t.value) {
1340
+ if (t.value && e.value) {
1341
1341
  a.value = "STALE_IF_ERROR";
1342
1342
  return;
1343
1343
  }
1344
- if (e.value === void 0 && !t.value) {
1344
+ if (t.value === void 0 && !e.value) {
1345
1345
  a.value = "PENDING";
1346
1346
  return;
1347
1347
  }
1348
- if (e.value && !t.value && o) {
1348
+ if (t.value && !e.value && o) {
1349
1349
  a.value = "SUCCESS_HAS_DATA";
1350
1350
  return;
1351
1351
  }
1352
- if (e.value && !t.value) {
1352
+ if (t.value && !e.value) {
1353
1353
  a.value = "SUCCESS";
1354
1354
  return;
1355
1355
  }
1356
- e.value === void 0 && t && (a.value = "ERROR");
1356
+ t.value === void 0 && e && (a.value = "ERROR");
1357
1357
  }), {
1358
1358
  state: a,
1359
- swrvState: U
1359
+ swrvState: X
1360
1360
  };
1361
1361
  }
1362
- const Y = "khcp-user-table-preferences", ot = {
1362
+ const W = "khcp-user-table-preferences", ee = {
1363
1363
  pageSize: 30,
1364
1364
  sortColumnKey: void 0,
1365
1365
  sortColumnOrder: void 0,
1366
1366
  columnWidths: {},
1367
1367
  columnVisibility: {}
1368
1368
  };
1369
- function ht() {
1370
- const e = (o) => {
1369
+ function se() {
1370
+ const t = (o) => {
1371
1371
  if (typeof o == "string")
1372
1372
  try {
1373
1373
  return JSON.parse(o);
@@ -1375,35 +1375,35 @@ function ht() {
1375
1375
  console.error("useTablePreferences(tryParseJson)", c);
1376
1376
  return;
1377
1377
  }
1378
- }, t = () => {
1379
- const o = e(localStorage.getItem(Y));
1378
+ }, e = () => {
1379
+ const o = t(localStorage.getItem(W));
1380
1380
  return !o || !Object.keys(o).length ? /* @__PURE__ */ new Map() : new Map(Object.entries(o));
1381
1381
  };
1382
1382
  return {
1383
1383
  setTablePreferences: (o, c) => {
1384
1384
  try {
1385
- const u = t();
1386
- u.set(o, c), localStorage.setItem(Y, JSON.stringify(Object.fromEntries(u.entries())));
1385
+ const u = e();
1386
+ u.set(o, c), localStorage.setItem(W, JSON.stringify(Object.fromEntries(u.entries())));
1387
1387
  } catch (u) {
1388
1388
  console.error("useTablePreferences(setTablePreferences)", u);
1389
1389
  }
1390
1390
  },
1391
1391
  getTablePreferences: (o) => {
1392
- const c = t();
1393
- return (c == null ? void 0 : c.get(o)) || void 0 || ot;
1392
+ const c = e();
1393
+ return (c == null ? void 0 : c.get(o)) || void 0 || ee;
1394
1394
  },
1395
1395
  deleteAllTablePreferences: () => {
1396
- localStorage.removeItem(Y);
1396
+ localStorage.removeItem(W);
1397
1397
  }
1398
1398
  };
1399
1399
  }
1400
- function mt() {
1401
- const e = () => {
1400
+ function de() {
1401
+ const t = () => {
1402
1402
  var i;
1403
1403
  return ((i = window == null ? void 0 : window.location) == null ? void 0 : i.search) || "";
1404
1404
  };
1405
1405
  return {
1406
- getLocationSearch: e,
1406
+ getLocationSearch: t,
1407
1407
  getLocationHostname: () => {
1408
1408
  var i;
1409
1409
  return ((i = window == null ? void 0 : window.location) == null ? void 0 : i.hostname) || "";
@@ -1420,7 +1420,7 @@ function mt() {
1420
1420
  var i;
1421
1421
  return ((i = window == null ? void 0 : window.location) == null ? void 0 : i.origin) || "";
1422
1422
  },
1423
- getUrlSearchParams: () => new URLSearchParams(e()),
1423
+ getUrlSearchParams: () => new URLSearchParams(t()),
1424
1424
  setLocationAssign: (i) => {
1425
1425
  window.location.assign(i);
1426
1426
  },
@@ -1430,13 +1430,13 @@ function mt() {
1430
1430
  };
1431
1431
  }
1432
1432
  export {
1433
- ot as DEFAULT_USER_TABLE_PREFERENCES,
1434
- Y as USER_TABLE_PREFERENCES_LOCAL_STORAGE_KEY,
1435
- ut as useAxios,
1436
- st as useDate,
1437
- dt as useDebounce,
1438
- ft as usePackage,
1439
- lt as useSwrvState,
1440
- ht as useTablePreferences,
1441
- mt as useWindow
1433
+ ee as DEFAULT_USER_TABLE_PREFERENCES,
1434
+ W as USER_TABLE_PREFERENCES_LOCAL_STORAGE_KEY,
1435
+ ae as useAxios,
1436
+ oe as useDate,
1437
+ ie as useDebounce,
1438
+ ce as usePackage,
1439
+ ue as useSwrvState,
1440
+ se as useTablePreferences,
1441
+ de as useWindow
1442
1442
  };