@ftlab/one-vue3 0.3.4 → 0.3.6

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/utils.js CHANGED
@@ -1,275 +1,193 @@
1
- import { c as K, g as X } from "./utils-0eda3e43.js";
2
- import { d as Dt } from "./utils-0eda3e43.js";
3
- import { s as pt } from "./storage-9f2ae3ed.js";
4
- var et = { exports: {} };
5
- (function(o, O) {
6
- (function(g, S) {
7
- o.exports = S();
8
- })(K, function() {
9
- var g = 1e3, S = 6e4, H = 36e5, J = "millisecond", p = "second", _ = "minute", f = "hour", C = "day", j = "week", Y = "month", d = "quarter", v = "year", l = "date", r = "Invalid Date", h = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, T = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, D = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(s) {
10
- var n = ["th", "st", "nd", "rd"], t = s % 100;
11
- return "[" + s + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
12
- } }, M = function(s, n, t) {
13
- var i = String(s);
14
- return !i || i.length >= n ? s : "" + Array(n + 1 - i.length).join(t) + s;
15
- }, I = { s: M, z: function(s) {
16
- var n = -s.utcOffset(), t = Math.abs(n), i = Math.floor(t / 60), e = t % 60;
17
- return (n <= 0 ? "+" : "-") + M(i, 2, "0") + ":" + M(e, 2, "0");
18
- }, m: function s(n, t) {
1
+ import { c as R, g as K } from "./utils-0eda3e43.js";
2
+ import { d as gt } from "./utils-0eda3e43.js";
3
+ import { s as Mt } from "./storage-9f2ae3ed.js";
4
+ var tt = { exports: {} };
5
+ (function(a, S) {
6
+ (function(g, O) {
7
+ a.exports = O();
8
+ })(R, function() {
9
+ var g = 1e3, O = 6e4, C = 36e5, k = "millisecond", y = "second", _ = "minute", c = "hour", U = "day", A = "week", Y = "month", m = "quarter", v = "year", d = "date", r = "Invalid Date", l = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, w = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, D = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(i) {
10
+ var n = ["th", "st", "nd", "rd"], t = i % 100;
11
+ return "[" + i + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
12
+ } }, M = function(i, n, t) {
13
+ var s = String(i);
14
+ return !s || s.length >= n ? i : "" + Array(n + 1 - s.length).join(t) + i;
15
+ }, L = { s: M, z: function(i) {
16
+ var n = -i.utcOffset(), t = Math.abs(n), s = Math.floor(t / 60), e = t % 60;
17
+ return (n <= 0 ? "+" : "-") + M(s, 2, "0") + ":" + M(e, 2, "0");
18
+ }, m: function i(n, t) {
19
19
  if (n.date() < t.date())
20
- return -s(t, n);
21
- var i = 12 * (t.year() - n.year()) + (t.month() - n.month()), e = n.clone().add(i, Y), u = t - e < 0, a = n.clone().add(i + (u ? -1 : 1), Y);
22
- return +(-(i + (t - e) / (u ? e - a : a - e)) || 0);
23
- }, a: function(s) {
24
- return s < 0 ? Math.ceil(s) || 0 : Math.floor(s);
25
- }, p: function(s) {
26
- return { M: Y, y: v, w: j, d: C, D: l, h: f, m: _, s: p, ms: J, Q: d }[s] || String(s || "").toLowerCase().replace(/s$/, "");
27
- }, u: function(s) {
28
- return s === void 0;
29
- } }, x = "en", b = {};
30
- b[x] = D;
31
- var k = "$isDayjsObject", A = function(s) {
32
- return s instanceof G || !(!s || !s[k]);
33
- }, L = function s(n, t, i) {
20
+ return -i(t, n);
21
+ var s = 12 * (t.year() - n.year()) + (t.month() - n.month()), e = n.clone().add(s, Y), o = t - e < 0, u = n.clone().add(s + (o ? -1 : 1), Y);
22
+ return +(-(s + (t - e) / (o ? e - u : u - e)) || 0);
23
+ }, a: function(i) {
24
+ return i < 0 ? Math.ceil(i) || 0 : Math.floor(i);
25
+ }, p: function(i) {
26
+ return { M: Y, y: v, w: A, d: U, D: d, h: c, m: _, s: y, ms: k, Q: m }[i] || String(i || "").toLowerCase().replace(/s$/, "");
27
+ }, u: function(i) {
28
+ return i === void 0;
29
+ } }, x = "en", H = {};
30
+ H[x] = D;
31
+ var b = function(i) {
32
+ return i instanceof W;
33
+ }, N = function i(n, t, s) {
34
34
  var e;
35
35
  if (!n)
36
36
  return x;
37
37
  if (typeof n == "string") {
38
- var u = n.toLowerCase();
39
- b[u] && (e = u), t && (b[u] = t, e = u);
40
- var a = n.split("-");
41
- if (!e && a.length > 1)
42
- return s(a[0]);
38
+ var o = n.toLowerCase();
39
+ H[o] && (e = o), t && (H[o] = t, e = o);
40
+ var u = n.split("-");
41
+ if (!e && u.length > 1)
42
+ return i(u[0]);
43
43
  } else {
44
- var $ = n.name;
45
- b[$] = n, e = $;
44
+ var h = n.name;
45
+ H[h] = n, e = h;
46
46
  }
47
- return !i && e && (x = e), e || !i && x;
48
- }, m = function(s, n) {
49
- if (A(s))
50
- return s.clone();
47
+ return !s && e && (x = e), e || !s && x;
48
+ }, $ = function(i, n) {
49
+ if (b(i))
50
+ return i.clone();
51
51
  var t = typeof n == "object" ? n : {};
52
- return t.date = s, t.args = arguments, new G(t);
53
- }, c = I;
54
- c.l = L, c.i = A, c.w = function(s, n) {
55
- return m(s, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
52
+ return t.date = i, t.args = arguments, new W(t);
53
+ }, f = L;
54
+ f.l = N, f.i = b, f.w = function(i, n) {
55
+ return $(i, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
56
56
  };
57
- var G = function() {
58
- function s(t) {
59
- this.$L = L(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[k] = !0;
57
+ var W = function() {
58
+ function i(t) {
59
+ this.$L = N(t.locale, null, !0), this.parse(t);
60
60
  }
61
- var n = s.prototype;
61
+ var n = i.prototype;
62
62
  return n.parse = function(t) {
63
- this.$d = function(i) {
64
- var e = i.date, u = i.utc;
63
+ this.$d = function(s) {
64
+ var e = s.date, o = s.utc;
65
65
  if (e === null)
66
66
  return /* @__PURE__ */ new Date(NaN);
67
- if (c.u(e))
67
+ if (f.u(e))
68
68
  return /* @__PURE__ */ new Date();
69
69
  if (e instanceof Date)
70
70
  return new Date(e);
71
71
  if (typeof e == "string" && !/Z$/i.test(e)) {
72
- var a = e.match(h);
73
- if (a) {
74
- var $ = a[2] - 1 || 0, y = (a[7] || "0").substring(0, 3);
75
- return u ? new Date(Date.UTC(a[1], $, a[3] || 1, a[4] || 0, a[5] || 0, a[6] || 0, y)) : new Date(a[1], $, a[3] || 1, a[4] || 0, a[5] || 0, a[6] || 0, y);
72
+ var u = e.match(l);
73
+ if (u) {
74
+ var h = u[2] - 1 || 0, T = (u[7] || "0").substring(0, 3);
75
+ return o ? new Date(Date.UTC(u[1], h, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, T)) : new Date(u[1], h, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, T);
76
76
  }
77
77
  }
78
78
  return new Date(e);
79
- }(t), this.init();
79
+ }(t), this.$x = t.x || {}, this.init();
80
80
  }, n.init = function() {
81
81
  var t = this.$d;
82
82
  this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
83
83
  }, n.$utils = function() {
84
- return c;
84
+ return f;
85
85
  }, n.isValid = function() {
86
86
  return this.$d.toString() !== r;
87
- }, n.isSame = function(t, i) {
88
- var e = m(t);
89
- return this.startOf(i) <= e && e <= this.endOf(i);
90
- }, n.isAfter = function(t, i) {
91
- return m(t) < this.startOf(i);
92
- }, n.isBefore = function(t, i) {
93
- return this.endOf(i) < m(t);
94
- }, n.$g = function(t, i, e) {
95
- return c.u(t) ? this[i] : this.set(e, t);
87
+ }, n.isSame = function(t, s) {
88
+ var e = $(t);
89
+ return this.startOf(s) <= e && e <= this.endOf(s);
90
+ }, n.isAfter = function(t, s) {
91
+ return $(t) < this.startOf(s);
92
+ }, n.isBefore = function(t, s) {
93
+ return this.endOf(s) < $(t);
94
+ }, n.$g = function(t, s, e) {
95
+ return f.u(t) ? this[s] : this.set(e, t);
96
96
  }, n.unix = function() {
97
97
  return Math.floor(this.valueOf() / 1e3);
98
98
  }, n.valueOf = function() {
99
99
  return this.$d.getTime();
100
- }, n.startOf = function(t, i) {
101
- var e = this, u = !!c.u(i) || i, a = c.p(t), $ = function(E, U) {
102
- var F = c.w(e.$u ? Date.UTC(e.$y, U, E) : new Date(e.$y, U, E), e);
103
- return u ? F : F.endOf(C);
104
- }, y = function(E, U) {
105
- return c.w(e.toDate()[E].apply(e.toDate("s"), (u ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(U)), e);
106
- }, w = this.$W, z = this.$M, N = this.$D, P = "set" + (this.$u ? "UTC" : "");
107
- switch (a) {
100
+ }, n.startOf = function(t, s) {
101
+ var e = this, o = !!f.u(s) || s, u = f.p(t), h = function(J, I) {
102
+ var E = f.w(e.$u ? Date.UTC(e.$y, I, J) : new Date(e.$y, I, J), e);
103
+ return o ? E : E.endOf(U);
104
+ }, T = function(J, I) {
105
+ return f.w(e.toDate()[J].apply(e.toDate("s"), (o ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(I)), e);
106
+ }, p = this.$W, z = this.$M, j = this.$D, F = "set" + (this.$u ? "UTC" : "");
107
+ switch (u) {
108
108
  case v:
109
- return u ? $(1, 0) : $(31, 11);
109
+ return o ? h(1, 0) : h(31, 11);
110
110
  case Y:
111
- return u ? $(1, z) : $(0, z + 1);
112
- case j:
113
- var W = this.$locale().weekStart || 0, q = (w < W ? w + 7 : w) - W;
114
- return $(u ? N - q : N + (6 - q), z);
115
- case C:
116
- case l:
117
- return y(P + "Hours", 0);
118
- case f:
119
- return y(P + "Minutes", 1);
111
+ return o ? h(1, z) : h(0, z + 1);
112
+ case A:
113
+ var V = this.$locale().weekStart || 0, q = (p < V ? p + 7 : p) - V;
114
+ return h(o ? j - q : j + (6 - q), z);
115
+ case U:
116
+ case d:
117
+ return T(F + "Hours", 0);
118
+ case c:
119
+ return T(F + "Minutes", 1);
120
120
  case _:
121
- return y(P + "Seconds", 2);
122
- case p:
123
- return y(P + "Milliseconds", 3);
121
+ return T(F + "Seconds", 2);
122
+ case y:
123
+ return T(F + "Milliseconds", 3);
124
124
  default:
125
125
  return this.clone();
126
126
  }
127
127
  }, n.endOf = function(t) {
128
128
  return this.startOf(t, !1);
129
- }, n.$set = function(t, i) {
130
- var e, u = c.p(t), a = "set" + (this.$u ? "UTC" : ""), $ = (e = {}, e[C] = a + "Date", e[l] = a + "Date", e[Y] = a + "Month", e[v] = a + "FullYear", e[f] = a + "Hours", e[_] = a + "Minutes", e[p] = a + "Seconds", e[J] = a + "Milliseconds", e)[u], y = u === C ? this.$D + (i - this.$W) : i;
131
- if (u === Y || u === v) {
132
- var w = this.clone().set(l, 1);
133
- w.$d[$](y), w.init(), this.$d = w.set(l, Math.min(this.$D, w.daysInMonth())).$d;
129
+ }, n.$set = function(t, s) {
130
+ var e, o = f.p(t), u = "set" + (this.$u ? "UTC" : ""), h = (e = {}, e[U] = u + "Date", e[d] = u + "Date", e[Y] = u + "Month", e[v] = u + "FullYear", e[c] = u + "Hours", e[_] = u + "Minutes", e[y] = u + "Seconds", e[k] = u + "Milliseconds", e)[o], T = o === U ? this.$D + (s - this.$W) : s;
131
+ if (o === Y || o === v) {
132
+ var p = this.clone().set(d, 1);
133
+ p.$d[h](T), p.init(), this.$d = p.set(d, Math.min(this.$D, p.daysInMonth())).$d;
134
134
  } else
135
- $ && this.$d[$](y);
135
+ h && this.$d[h](T);
136
136
  return this.init(), this;
137
- }, n.set = function(t, i) {
138
- return this.clone().$set(t, i);
137
+ }, n.set = function(t, s) {
138
+ return this.clone().$set(t, s);
139
139
  }, n.get = function(t) {
140
- return this[c.p(t)]();
141
- }, n.add = function(t, i) {
142
- var e, u = this;
140
+ return this[f.p(t)]();
141
+ }, n.add = function(t, s) {
142
+ var e, o = this;
143
143
  t = Number(t);
144
- var a = c.p(i), $ = function(z) {
145
- var N = m(u);
146
- return c.w(N.date(N.date() + Math.round(z * t)), u);
144
+ var u = f.p(s), h = function(z) {
145
+ var j = $(o);
146
+ return f.w(j.date(j.date() + Math.round(z * t)), o);
147
147
  };
148
- if (a === Y)
148
+ if (u === Y)
149
149
  return this.set(Y, this.$M + t);
150
- if (a === v)
150
+ if (u === v)
151
151
  return this.set(v, this.$y + t);
152
- if (a === C)
153
- return $(1);
154
- if (a === j)
155
- return $(7);
156
- var y = (e = {}, e[_] = S, e[f] = H, e[p] = g, e)[a] || 1, w = this.$d.getTime() + t * y;
157
- return c.w(w, this);
158
- }, n.subtract = function(t, i) {
159
- return this.add(-1 * t, i);
152
+ if (u === U)
153
+ return h(1);
154
+ if (u === A)
155
+ return h(7);
156
+ var T = (e = {}, e[_] = O, e[c] = C, e[y] = g, e)[u] || 1, p = this.$d.getTime() + t * T;
157
+ return f.w(p, this);
158
+ }, n.subtract = function(t, s) {
159
+ return this.add(-1 * t, s);
160
160
  }, n.format = function(t) {
161
- var i = this, e = this.$locale();
161
+ var s = this, e = this.$locale();
162
162
  if (!this.isValid())
163
163
  return e.invalidDate || r;
164
- var u = t || "YYYY-MM-DDTHH:mm:ssZ", a = c.z(this), $ = this.$H, y = this.$m, w = this.$M, z = e.weekdays, N = e.months, P = e.meridiem, W = function(U, F, B, Q) {
165
- return U && (U[F] || U(i, u)) || B[F].slice(0, Q);
166
- }, q = function(U) {
167
- return c.s($ % 12 || 12, U, "0");
168
- }, E = P || function(U, F, B) {
169
- var Q = U < 12 ? "AM" : "PM";
170
- return B ? Q.toLowerCase() : Q;
171
- };
172
- return u.replace(T, function(U, F) {
173
- return F || function(B) {
174
- switch (B) {
175
- case "YY":
176
- return String(i.$y).slice(-2);
177
- case "YYYY":
178
- return c.s(i.$y, 4, "0");
179
- case "M":
180
- return w + 1;
181
- case "MM":
182
- return c.s(w + 1, 2, "0");
183
- case "MMM":
184
- return W(e.monthsShort, w, N, 3);
185
- case "MMMM":
186
- return W(N, w);
187
- case "D":
188
- return i.$D;
189
- case "DD":
190
- return c.s(i.$D, 2, "0");
191
- case "d":
192
- return String(i.$W);
193
- case "dd":
194
- return W(e.weekdaysMin, i.$W, z, 2);
195
- case "ddd":
196
- return W(e.weekdaysShort, i.$W, z, 3);
197
- case "dddd":
198
- return z[i.$W];
199
- case "H":
200
- return String($);
201
- case "HH":
202
- return c.s($, 2, "0");
203
- case "h":
204
- return q(1);
205
- case "hh":
206
- return q(2);
207
- case "a":
208
- return E($, y, !0);
209
- case "A":
210
- return E($, y, !1);
211
- case "m":
212
- return String(y);
213
- case "mm":
214
- return c.s(y, 2, "0");
215
- case "s":
216
- return String(i.$s);
217
- case "ss":
218
- return c.s(i.$s, 2, "0");
219
- case "SSS":
220
- return c.s(i.$ms, 3, "0");
221
- case "Z":
222
- return a;
223
- }
224
- return null;
225
- }(U) || a.replace(":", "");
164
+ var o = t || "YYYY-MM-DDTHH:mm:ssZ", u = f.z(this), h = this.$H, T = this.$m, p = this.$M, z = e.weekdays, j = e.months, F = function(I, E, Q, B) {
165
+ return I && (I[E] || I(s, o)) || Q[E].slice(0, B);
166
+ }, V = function(I) {
167
+ return f.s(h % 12 || 12, I, "0");
168
+ }, q = e.meridiem || function(I, E, Q) {
169
+ var B = I < 12 ? "AM" : "PM";
170
+ return Q ? B.toLowerCase() : B;
171
+ }, J = { YY: String(this.$y).slice(-2), YYYY: f.s(this.$y, 4, "0"), M: p + 1, MM: f.s(p + 1, 2, "0"), MMM: F(e.monthsShort, p, j, 3), MMMM: F(j, p), D: this.$D, DD: f.s(this.$D, 2, "0"), d: String(this.$W), dd: F(e.weekdaysMin, this.$W, z, 2), ddd: F(e.weekdaysShort, this.$W, z, 3), dddd: z[this.$W], H: String(h), HH: f.s(h, 2, "0"), h: V(1), hh: V(2), a: q(h, T, !0), A: q(h, T, !1), m: String(T), mm: f.s(T, 2, "0"), s: String(this.$s), ss: f.s(this.$s, 2, "0"), SSS: f.s(this.$ms, 3, "0"), Z: u };
172
+ return o.replace(w, function(I, E) {
173
+ return E || J[I] || u.replace(":", "");
226
174
  });
227
175
  }, n.utcOffset = function() {
228
176
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
229
- }, n.diff = function(t, i, e) {
230
- var u, a = this, $ = c.p(i), y = m(t), w = (y.utcOffset() - this.utcOffset()) * S, z = this - y, N = function() {
231
- return c.m(a, y);
232
- };
233
- switch ($) {
234
- case v:
235
- u = N() / 12;
236
- break;
237
- case Y:
238
- u = N();
239
- break;
240
- case d:
241
- u = N() / 3;
242
- break;
243
- case j:
244
- u = (z - w) / 6048e5;
245
- break;
246
- case C:
247
- u = (z - w) / 864e5;
248
- break;
249
- case f:
250
- u = z / H;
251
- break;
252
- case _:
253
- u = z / S;
254
- break;
255
- case p:
256
- u = z / g;
257
- break;
258
- default:
259
- u = z;
260
- }
261
- return e ? u : c.a(u);
177
+ }, n.diff = function(t, s, e) {
178
+ var o, u = f.p(s), h = $(t), T = (h.utcOffset() - this.utcOffset()) * O, p = this - h, z = f.m(this, h);
179
+ return z = (o = {}, o[v] = z / 12, o[Y] = z, o[m] = z / 3, o[A] = (p - T) / 6048e5, o[U] = (p - T) / 864e5, o[c] = p / C, o[_] = p / O, o[y] = p / g, o)[u] || p, e ? z : f.a(z);
262
180
  }, n.daysInMonth = function() {
263
181
  return this.endOf(Y).$D;
264
182
  }, n.$locale = function() {
265
- return b[this.$L];
266
- }, n.locale = function(t, i) {
183
+ return H[this.$L];
184
+ }, n.locale = function(t, s) {
267
185
  if (!t)
268
186
  return this.$L;
269
- var e = this.clone(), u = L(t, i, !0);
270
- return u && (e.$L = u), e;
187
+ var e = this.clone(), o = N(t, s, !0);
188
+ return o && (e.$L = o), e;
271
189
  }, n.clone = function() {
272
- return c.w(this.$d, this);
190
+ return f.w(this.$d, this);
273
191
  }, n.toDate = function() {
274
192
  return new Date(this.valueOf());
275
193
  }, n.toJSON = function() {
@@ -278,198 +196,198 @@ var et = { exports: {} };
278
196
  return this.$d.toISOString();
279
197
  }, n.toString = function() {
280
198
  return this.$d.toUTCString();
281
- }, s;
282
- }(), tt = G.prototype;
283
- return m.prototype = tt, [["$ms", J], ["$s", p], ["$m", _], ["$H", f], ["$W", C], ["$M", Y], ["$y", v], ["$D", l]].forEach(function(s) {
284
- tt[s[1]] = function(n) {
285
- return this.$g(n, s[0], s[1]);
199
+ }, i;
200
+ }(), X = W.prototype;
201
+ return $.prototype = X, [["$ms", k], ["$s", y], ["$m", _], ["$H", c], ["$W", U], ["$M", Y], ["$y", v], ["$D", d]].forEach(function(i) {
202
+ X[i[1]] = function(n) {
203
+ return this.$g(n, i[0], i[1]);
286
204
  };
287
- }), m.extend = function(s, n) {
288
- return s.$i || (s(n, G, m), s.$i = !0), m;
289
- }, m.locale = L, m.isDayjs = A, m.unix = function(s) {
290
- return m(1e3 * s);
291
- }, m.en = b[x], m.Ls = b, m.p = {}, m;
205
+ }), $.extend = function(i, n) {
206
+ return i.$i || (i(n, W, $), i.$i = !0), $;
207
+ }, $.locale = N, $.isDayjs = b, $.unix = function(i) {
208
+ return $(1e3 * i);
209
+ }, $.en = H[x], $.Ls = H, $.p = {}, $;
292
210
  });
293
- })(et);
294
- var st = et.exports;
295
- const Z = /* @__PURE__ */ X(st);
296
- var nt = { exports: {} };
297
- (function(o, O) {
298
- (function(g, S) {
299
- o.exports = S();
300
- })(K, function() {
301
- var g = "minute", S = /[+-]\d\d(?::?\d\d)?/g, H = /([+-]|\d\d)/g;
302
- return function(J, p, _) {
303
- var f = p.prototype;
211
+ })(tt);
212
+ var it = tt.exports;
213
+ const Z = /* @__PURE__ */ K(it);
214
+ var et = { exports: {} };
215
+ (function(a, S) {
216
+ (function(g, O) {
217
+ a.exports = O();
218
+ })(R, function() {
219
+ var g = "minute", O = /[+-]\d\d(?::?\d\d)?/g, C = /([+-]|\d\d)/g;
220
+ return function(k, y, _) {
221
+ var c = y.prototype;
304
222
  _.utc = function(r) {
305
- var h = { date: r, utc: !0, args: arguments };
306
- return new p(h);
307
- }, f.utc = function(r) {
308
- var h = _(this.toDate(), { locale: this.$L, utc: !0 });
309
- return r ? h.add(this.utcOffset(), g) : h;
310
- }, f.local = function() {
223
+ var l = { date: r, utc: !0, args: arguments };
224
+ return new y(l);
225
+ }, c.utc = function(r) {
226
+ var l = _(this.toDate(), { locale: this.$L, utc: !0 });
227
+ return r ? l.add(this.utcOffset(), g) : l;
228
+ }, c.local = function() {
311
229
  return _(this.toDate(), { locale: this.$L, utc: !1 });
312
230
  };
313
- var C = f.parse;
314
- f.parse = function(r) {
315
- r.utc && (this.$u = !0), this.$utils().u(r.$offset) || (this.$offset = r.$offset), C.call(this, r);
231
+ var U = c.parse;
232
+ c.parse = function(r) {
233
+ r.utc && (this.$u = !0), this.$utils().u(r.$offset) || (this.$offset = r.$offset), U.call(this, r);
316
234
  };
317
- var j = f.init;
318
- f.init = function() {
235
+ var A = c.init;
236
+ c.init = function() {
319
237
  if (this.$u) {
320
238
  var r = this.$d;
321
239
  this.$y = r.getUTCFullYear(), this.$M = r.getUTCMonth(), this.$D = r.getUTCDate(), this.$W = r.getUTCDay(), this.$H = r.getUTCHours(), this.$m = r.getUTCMinutes(), this.$s = r.getUTCSeconds(), this.$ms = r.getUTCMilliseconds();
322
240
  } else
323
- j.call(this);
241
+ A.call(this);
324
242
  };
325
- var Y = f.utcOffset;
326
- f.utcOffset = function(r, h) {
327
- var T = this.$utils().u;
328
- if (T(r))
329
- return this.$u ? 0 : T(this.$offset) ? Y.call(this) : this.$offset;
243
+ var Y = c.utcOffset;
244
+ c.utcOffset = function(r, l) {
245
+ var w = this.$utils().u;
246
+ if (w(r))
247
+ return this.$u ? 0 : w(this.$offset) ? Y.call(this) : this.$offset;
330
248
  if (typeof r == "string" && (r = function(x) {
331
249
  x === void 0 && (x = "");
332
- var b = x.match(S);
333
- if (!b)
250
+ var H = x.match(O);
251
+ if (!H)
334
252
  return null;
335
- var k = ("" + b[0]).match(H) || ["-", 0, 0], A = k[0], L = 60 * +k[1] + +k[2];
336
- return L === 0 ? 0 : A === "+" ? L : -L;
253
+ var b = ("" + H[0]).match(C) || ["-", 0, 0], N = b[0], $ = 60 * +b[1] + +b[2];
254
+ return $ === 0 ? 0 : N === "+" ? $ : -$;
337
255
  }(r), r === null))
338
256
  return this;
339
257
  var D = Math.abs(r) <= 16 ? 60 * r : r, M = this;
340
- if (h)
258
+ if (l)
341
259
  return M.$offset = D, M.$u = r === 0, M;
342
260
  if (r !== 0) {
343
- var I = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
344
- (M = this.local().add(D + I, g)).$offset = D, M.$x.$localOffset = I;
261
+ var L = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
262
+ (M = this.local().add(D + L, g)).$offset = D, M.$x.$localOffset = L;
345
263
  } else
346
264
  M = this.utc();
347
265
  return M;
348
266
  };
349
- var d = f.format;
350
- f.format = function(r) {
351
- var h = r || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
352
- return d.call(this, h);
353
- }, f.valueOf = function() {
267
+ var m = c.format;
268
+ c.format = function(r) {
269
+ var l = r || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
270
+ return m.call(this, l);
271
+ }, c.valueOf = function() {
354
272
  var r = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
355
273
  return this.$d.valueOf() - 6e4 * r;
356
- }, f.isUTC = function() {
274
+ }, c.isUTC = function() {
357
275
  return !!this.$u;
358
- }, f.toISOString = function() {
276
+ }, c.toISOString = function() {
359
277
  return this.toDate().toISOString();
360
- }, f.toString = function() {
278
+ }, c.toString = function() {
361
279
  return this.toDate().toUTCString();
362
280
  };
363
- var v = f.toDate;
364
- f.toDate = function(r) {
281
+ var v = c.toDate;
282
+ c.toDate = function(r) {
365
283
  return r === "s" && this.$offset ? _(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : v.call(this);
366
284
  };
367
- var l = f.diff;
368
- f.diff = function(r, h, T) {
285
+ var d = c.diff;
286
+ c.diff = function(r, l, w) {
369
287
  if (r && this.$u === r.$u)
370
- return l.call(this, r, h, T);
288
+ return d.call(this, r, l, w);
371
289
  var D = this.local(), M = _(r).local();
372
- return l.call(D, M, h, T);
290
+ return d.call(D, M, l, w);
373
291
  };
374
292
  };
375
293
  });
376
- })(nt);
377
- var ut = nt.exports;
378
- const at = /* @__PURE__ */ X(ut);
379
- var rt = { exports: {} };
380
- (function(o, O) {
381
- (function(g, S) {
382
- o.exports = S();
383
- })(K, function() {
384
- var g = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, S = {};
385
- return function(H, J, p) {
386
- var _, f = function(d, v, l) {
387
- l === void 0 && (l = {});
388
- var r = new Date(d), h = function(T, D) {
294
+ })(et);
295
+ var st = et.exports;
296
+ const ut = /* @__PURE__ */ K(st);
297
+ var nt = { exports: {} };
298
+ (function(a, S) {
299
+ (function(g, O) {
300
+ a.exports = O();
301
+ })(R, function() {
302
+ var g = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, O = {};
303
+ return function(C, k, y) {
304
+ var _, c = function(m, v, d) {
305
+ d === void 0 && (d = {});
306
+ var r = new Date(m), l = function(w, D) {
389
307
  D === void 0 && (D = {});
390
- var M = D.timeZoneName || "short", I = T + "|" + M, x = S[I];
391
- return x || (x = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: T, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: M }), S[I] = x), x;
392
- }(v, l);
393
- return h.formatToParts(r);
394
- }, C = function(d, v) {
395
- for (var l = f(d, v), r = [], h = 0; h < l.length; h += 1) {
396
- var T = l[h], D = T.type, M = T.value, I = g[D];
397
- I >= 0 && (r[I] = parseInt(M, 10));
308
+ var M = D.timeZoneName || "short", L = w + "|" + M, x = O[L];
309
+ return x || (x = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: w, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: M }), O[L] = x), x;
310
+ }(v, d);
311
+ return l.formatToParts(r);
312
+ }, U = function(m, v) {
313
+ for (var d = c(m, v), r = [], l = 0; l < d.length; l += 1) {
314
+ var w = d[l], D = w.type, M = w.value, L = g[D];
315
+ L >= 0 && (r[L] = parseInt(M, 10));
398
316
  }
399
- var x = r[3], b = x === 24 ? 0 : x, k = r[0] + "-" + r[1] + "-" + r[2] + " " + b + ":" + r[4] + ":" + r[5] + ":000", A = +d;
400
- return (p.utc(k).valueOf() - (A -= A % 1e3)) / 6e4;
401
- }, j = J.prototype;
402
- j.tz = function(d, v) {
403
- d === void 0 && (d = _);
404
- var l = this.utcOffset(), r = this.toDate(), h = r.toLocaleString("en-US", { timeZone: d }), T = Math.round((r - new Date(h)) / 1e3 / 60), D = p(h, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(15 * -Math.round(r.getTimezoneOffset() / 15) - T, !0);
317
+ var x = r[3], H = x === 24 ? 0 : x, b = r[0] + "-" + r[1] + "-" + r[2] + " " + H + ":" + r[4] + ":" + r[5] + ":000", N = +m;
318
+ return (y.utc(b).valueOf() - (N -= N % 1e3)) / 6e4;
319
+ }, A = k.prototype;
320
+ A.tz = function(m, v) {
321
+ m === void 0 && (m = _);
322
+ var d = this.utcOffset(), r = this.toDate(), l = r.toLocaleString("en-US", { timeZone: m }), w = Math.round((r - new Date(l)) / 1e3 / 60), D = y(l).$set("millisecond", this.$ms).utcOffset(15 * -Math.round(r.getTimezoneOffset() / 15) - w, !0);
405
323
  if (v) {
406
324
  var M = D.utcOffset();
407
- D = D.add(l - M, "minute");
325
+ D = D.add(d - M, "minute");
408
326
  }
409
- return D.$x.$timezone = d, D;
410
- }, j.offsetName = function(d) {
411
- var v = this.$x.$timezone || p.tz.guess(), l = f(this.valueOf(), v, { timeZoneName: d }).find(function(r) {
327
+ return D.$x.$timezone = m, D;
328
+ }, A.offsetName = function(m) {
329
+ var v = this.$x.$timezone || y.tz.guess(), d = c(this.valueOf(), v, { timeZoneName: m }).find(function(r) {
412
330
  return r.type.toLowerCase() === "timezonename";
413
331
  });
414
- return l && l.value;
332
+ return d && d.value;
415
333
  };
416
- var Y = j.startOf;
417
- j.startOf = function(d, v) {
334
+ var Y = A.startOf;
335
+ A.startOf = function(m, v) {
418
336
  if (!this.$x || !this.$x.$timezone)
419
- return Y.call(this, d, v);
420
- var l = p(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
421
- return Y.call(l, d, v).tz(this.$x.$timezone, !0);
422
- }, p.tz = function(d, v, l) {
423
- var r = l && v, h = l || v || _, T = C(+p(), h);
424
- if (typeof d != "string")
425
- return p(d).tz(h);
426
- var D = function(b, k, A) {
427
- var L = b - 60 * k * 1e3, m = C(L, A);
428
- if (k === m)
429
- return [L, k];
430
- var c = C(L -= 60 * (m - k) * 1e3, A);
431
- return m === c ? [L, m] : [b - 60 * Math.min(m, c) * 1e3, Math.max(m, c)];
432
- }(p.utc(d, r).valueOf(), T, h), M = D[0], I = D[1], x = p(M).utcOffset(I);
433
- return x.$x.$timezone = h, x;
434
- }, p.tz.guess = function() {
337
+ return Y.call(this, m, v);
338
+ var d = y(this.format("YYYY-MM-DD HH:mm:ss:SSS"));
339
+ return Y.call(d, m, v).tz(this.$x.$timezone, !0);
340
+ }, y.tz = function(m, v, d) {
341
+ var r = d && v, l = d || v || _, w = U(+y(), l);
342
+ if (typeof m != "string")
343
+ return y(m).tz(l);
344
+ var D = function(H, b, N) {
345
+ var $ = H - 60 * b * 1e3, f = U($, N);
346
+ if (b === f)
347
+ return [$, b];
348
+ var W = U($ -= 60 * (f - b) * 1e3, N);
349
+ return f === W ? [$, f] : [H - 60 * Math.min(f, W) * 1e3, Math.max(f, W)];
350
+ }(y.utc(m, r).valueOf(), w, l), M = D[0], L = D[1], x = y(M).utcOffset(L);
351
+ return x.$x.$timezone = l, x;
352
+ }, y.tz.guess = function() {
435
353
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
436
- }, p.tz.setDefault = function(d) {
437
- _ = d;
354
+ }, y.tz.setDefault = function(m) {
355
+ _ = m;
438
356
  };
439
357
  };
440
358
  });
441
- })(rt);
442
- var ot = rt.exports;
443
- const ct = /* @__PURE__ */ X(ot);
444
- Z.extend(ct);
359
+ })(nt);
360
+ var ot = nt.exports;
361
+ const at = /* @__PURE__ */ K(ot);
445
362
  Z.extend(at);
446
- const R = "YYYY-MM-DD HH:mm:ss", V = (o) => {
447
- const O = new Date(o);
448
- if (!isNaN(O.getTime())) {
449
- const g = O.getFullYear(), S = O.getMonth() + 1;
450
- return O.getDate() === 29 && S === 2 ? g % 4 === 0 && g % 100 !== 0 || g % 400 === 0 : !0;
363
+ Z.extend(ut);
364
+ const G = "YYYY-MM-DD HH:mm:ss", P = (a) => {
365
+ const S = new Date(a);
366
+ if (!isNaN(S.getTime())) {
367
+ const g = S.getFullYear(), O = S.getMonth() + 1;
368
+ return S.getDate() === 29 && O === 2 ? g % 4 === 0 && g % 100 !== 0 || g % 400 === 0 : !0;
451
369
  }
452
- return !isNaN(O.getTime());
453
- }, ht = (o, O, g = "") => !o || !V(o) ? g : Z(o).utc().tz("Asia/Shanghai").format(O || R), lt = (o, O, g = "") => !o || !V(o) ? g : Z(o).utc().tz("Europe/Paris").format(O || R), $t = (o, O = "") => {
454
- if (!o || !V(o))
455
- return O;
456
- const g = new Date(Z(o).format(R)).getTime(), S = new Date(Z(o).utc().format(R)).getTime(), H = (g - S) / (1e3 * 3600);
457
- return H > 0 ? Z(o).utc().add(H, "hours").toDate() : Z(o).utc().subtract(H, "hours").toDate();
458
- }, it = (o, O) => {
459
- if (!o || !V(o))
370
+ return !isNaN(S.getTime());
371
+ }, ct = (a, S, g = "") => !a || !P(a) ? g : Z(a).utc().tz("Asia/Shanghai").format(S || G), ht = (a, S, g = "") => !a || !P(a) ? g : Z(a).utc().tz("Europe/Paris").format(S || G), lt = (a, S = "") => {
372
+ if (!a || !P(a))
373
+ return S;
374
+ const g = new Date(Z(a).format(G)).getTime(), O = new Date(Z(a).utc().format(G)).getTime(), C = (g - O) / (1e3 * 3600);
375
+ return C > 0 ? Z(a).utc().add(C, "hours").toDate() : Z(a).utc().subtract(C, "hours").toDate();
376
+ }, rt = (a, S) => {
377
+ if (!a || !P(a))
460
378
  return "";
461
- const g = Z(o).utcOffset(), S = Z(o).tz(O).utcOffset(), H = g - S;
462
- return H > 0 ? Z(o).add(H, "minutes").toDate() : Z(o).subtract(H, "minutes").toDate();
463
- }, dt = (o, O = "") => !o || !V(o) ? O : it(o, "Asia/Shanghai"), mt = (o, O = "") => !o || !V(o) ? O : it(o, "Europe/Paris");
379
+ const g = Z(a).utcOffset(), O = Z(a).tz(S).utcOffset(), C = g - O;
380
+ return C > 0 ? Z(a).add(C, "minutes").toDate() : Z(a).subtract(C, "minutes").toDate();
381
+ }, $t = (a, S = "") => !a || !P(a) ? S : rt(a, "Asia/Shanghai"), dt = (a, S = "") => !a || !P(a) ? S : rt(a, "Europe/Paris");
464
382
  export {
465
383
  Z as dayjs,
466
- Dt as debounce,
467
- V as isValidDate,
468
- dt as local_cn_date,
469
- mt as local_fr_date,
470
- it as local_tz_date,
471
- $t as local_utc_date,
472
- pt as storage,
473
- ht as utc_cn,
474
- lt as utc_fr
384
+ gt as debounce,
385
+ P as isValidDate,
386
+ $t as local_cn_date,
387
+ dt as local_fr_date,
388
+ rt as local_tz_date,
389
+ lt as local_utc_date,
390
+ Mt as storage,
391
+ ct as utc_cn,
392
+ ht as utc_fr
475
393
  };