@mrreality255/turbo-react 0.0.6 → 0.2.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/README.md +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +24 -10
- package/dist/index.es.js +1016 -996
- package/dist/index.umd.js +3 -19
- package/package.json +56 -56
package/dist/index.es.js
CHANGED
|
@@ -1,19 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
var Qe = { exports: {} },
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the MIT license found in the
|
|
10
|
-
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/
|
|
12
|
-
var Tn;
|
|
13
|
-
function Ts() {
|
|
14
|
-
if (Tn) return je;
|
|
15
|
-
Tn = 1;
|
|
16
|
-
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
1
|
+
import lr, { createContext as qe, useContext as G, useId as He, useRef as J, useEffect as L, useState as V, useMemo as ze, createElement as ur } from "react";
|
|
2
|
+
var Qe = { exports: {} }, Ve = {};
|
|
3
|
+
var Sn;
|
|
4
|
+
function Ss() {
|
|
5
|
+
if (Sn) return Ve;
|
|
6
|
+
Sn = 1;
|
|
7
|
+
var t = /* @__PURE__ */ Symbol.for("react.transitional.element"), e = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
17
8
|
function n(r, s, i) {
|
|
18
9
|
var a = null;
|
|
19
10
|
if (i !== void 0 && (a = "" + i), s.key !== void 0 && (a = "" + s.key), "key" in s) {
|
|
@@ -29,21 +20,12 @@ function Ts() {
|
|
|
29
20
|
props: i
|
|
30
21
|
};
|
|
31
22
|
}
|
|
32
|
-
return
|
|
23
|
+
return Ve.Fragment = e, Ve.jsx = n, Ve.jsxs = n, Ve;
|
|
33
24
|
}
|
|
34
25
|
var Re = {};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
*
|
|
39
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
40
|
-
*
|
|
41
|
-
* This source code is licensed under the MIT license found in the
|
|
42
|
-
* LICENSE file in the root directory of this source tree.
|
|
43
|
-
*/
|
|
44
|
-
var Sn;
|
|
45
|
-
function Ss() {
|
|
46
|
-
return Sn || (Sn = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
26
|
+
var pn;
|
|
27
|
+
function ps() {
|
|
28
|
+
return pn || (pn = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
47
29
|
function t(f) {
|
|
48
30
|
if (f == null) return null;
|
|
49
31
|
if (typeof f == "function")
|
|
@@ -67,7 +49,7 @@ function Ss() {
|
|
|
67
49
|
switch (typeof f.tag == "number" && console.error(
|
|
68
50
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
69
51
|
), f.$$typeof) {
|
|
70
|
-
case
|
|
52
|
+
case R:
|
|
71
53
|
return "Portal";
|
|
72
54
|
case be:
|
|
73
55
|
return f.displayName || "Context";
|
|
@@ -126,7 +108,7 @@ function Ss() {
|
|
|
126
108
|
return Error("react-stack-top-frame");
|
|
127
109
|
}
|
|
128
110
|
function a(f) {
|
|
129
|
-
if (
|
|
111
|
+
if (vn.call(f, "key")) {
|
|
130
112
|
var b = Object.getOwnPropertyDescriptor(f, "key").get;
|
|
131
113
|
if (b && b.isReactWarning) return !1;
|
|
132
114
|
}
|
|
@@ -134,7 +116,7 @@ function Ss() {
|
|
|
134
116
|
}
|
|
135
117
|
function o(f, b) {
|
|
136
118
|
function p() {
|
|
137
|
-
|
|
119
|
+
xn || (xn = !0, console.error(
|
|
138
120
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
139
121
|
b
|
|
140
122
|
));
|
|
@@ -146,19 +128,19 @@ function Ss() {
|
|
|
146
128
|
}
|
|
147
129
|
function l() {
|
|
148
130
|
var f = t(this.type);
|
|
149
|
-
return
|
|
131
|
+
return bn[f] || (bn[f] = !0, console.error(
|
|
150
132
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
151
133
|
)), f = this.props.ref, f !== void 0 ? f : null;
|
|
152
134
|
}
|
|
153
|
-
function
|
|
154
|
-
var
|
|
135
|
+
function c(f, b, p, D, Xe, Ct) {
|
|
136
|
+
var j = p.ref;
|
|
155
137
|
return f = {
|
|
156
138
|
$$typeof: S,
|
|
157
139
|
type: f,
|
|
158
140
|
key: b,
|
|
159
141
|
props: p,
|
|
160
142
|
_owner: D
|
|
161
|
-
}, (
|
|
143
|
+
}, (j !== void 0 ? j : null) !== null ? Object.defineProperty(f, "ref", {
|
|
162
144
|
enumerable: !1,
|
|
163
145
|
get: l
|
|
164
146
|
}) : Object.defineProperty(f, "ref", { enumerable: !1, value: null }), f._store = {}, Object.defineProperty(f._store, "validated", {
|
|
@@ -183,25 +165,25 @@ function Ss() {
|
|
|
183
165
|
value: Ct
|
|
184
166
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
185
167
|
}
|
|
186
|
-
function
|
|
187
|
-
var
|
|
188
|
-
if (
|
|
168
|
+
function d(f, b, p, D, Xe, Ct) {
|
|
169
|
+
var j = b.children;
|
|
170
|
+
if (j !== void 0)
|
|
189
171
|
if (D)
|
|
190
|
-
if (
|
|
191
|
-
for (D = 0; D <
|
|
192
|
-
m(
|
|
193
|
-
Object.freeze && Object.freeze(
|
|
172
|
+
if (_s(j)) {
|
|
173
|
+
for (D = 0; D < j.length; D++)
|
|
174
|
+
m(j[D]);
|
|
175
|
+
Object.freeze && Object.freeze(j);
|
|
194
176
|
} else
|
|
195
177
|
console.error(
|
|
196
178
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
197
179
|
);
|
|
198
|
-
else m(
|
|
199
|
-
if (
|
|
200
|
-
|
|
201
|
-
var ke = Object.keys(b).filter(function(
|
|
202
|
-
return
|
|
180
|
+
else m(j);
|
|
181
|
+
if (vn.call(b, "key")) {
|
|
182
|
+
j = t(f);
|
|
183
|
+
var ke = Object.keys(b).filter(function(Ts) {
|
|
184
|
+
return Ts !== "key";
|
|
203
185
|
});
|
|
204
|
-
D = 0 < ke.length ? "{key: someKey, " + ke.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
186
|
+
D = 0 < ke.length ? "{key: someKey, " + ke.join(": ..., ") + ": ...}" : "{key: someKey}", Tn[j + D] || (ke = 0 < ke.length ? "{" + ke.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
205
187
|
`A props object containing a "key" prop is being spread into JSX:
|
|
206
188
|
let props = %s;
|
|
207
189
|
<%s {...props} />
|
|
@@ -209,22 +191,22 @@ React keys must be passed directly to JSX without using spread:
|
|
|
209
191
|
let props = %s;
|
|
210
192
|
<%s key={someKey} {...props} />`,
|
|
211
193
|
D,
|
|
212
|
-
|
|
194
|
+
j,
|
|
213
195
|
ke,
|
|
214
|
-
|
|
215
|
-
),
|
|
196
|
+
j
|
|
197
|
+
), Tn[j + D] = !0);
|
|
216
198
|
}
|
|
217
|
-
if (
|
|
199
|
+
if (j = null, p !== void 0 && (n(p), j = "" + p), a(b) && (n(b.key), j = "" + b.key), "key" in b) {
|
|
218
200
|
p = {};
|
|
219
201
|
for (var Dt in b)
|
|
220
202
|
Dt !== "key" && (p[Dt] = b[Dt]);
|
|
221
203
|
} else p = b;
|
|
222
|
-
return
|
|
204
|
+
return j && o(
|
|
223
205
|
p,
|
|
224
206
|
typeof f == "function" ? f.displayName || f.name || "Unknown" : f
|
|
225
|
-
),
|
|
207
|
+
), c(
|
|
226
208
|
f,
|
|
227
|
-
|
|
209
|
+
j,
|
|
228
210
|
p,
|
|
229
211
|
s(),
|
|
230
212
|
Xe,
|
|
@@ -237,7 +219,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
237
219
|
function g(f) {
|
|
238
220
|
return typeof f == "object" && f !== null && f.$$typeof === S;
|
|
239
221
|
}
|
|
240
|
-
var y =
|
|
222
|
+
var y = lr, S = /* @__PURE__ */ Symbol.for("react.transitional.element"), R = /* @__PURE__ */ Symbol.for("react.portal"), C = /* @__PURE__ */ Symbol.for("react.fragment"), B = /* @__PURE__ */ Symbol.for("react.strict_mode"), K = /* @__PURE__ */ Symbol.for("react.profiler"), ce = /* @__PURE__ */ Symbol.for("react.consumer"), be = /* @__PURE__ */ Symbol.for("react.context"), Ke = /* @__PURE__ */ Symbol.for("react.forward_ref"), St = /* @__PURE__ */ Symbol.for("react.suspense"), pt = /* @__PURE__ */ Symbol.for("react.suspense_list"), Ot = /* @__PURE__ */ Symbol.for("react.memo"), X = /* @__PURE__ */ Symbol.for("react.lazy"), de = /* @__PURE__ */ Symbol.for("react.activity"), Nt = /* @__PURE__ */ Symbol.for("react.client.reference"), Et = y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, vn = Object.prototype.hasOwnProperty, _s = Array.isArray, Mt = console.createTask ? console.createTask : function() {
|
|
241
223
|
return null;
|
|
242
224
|
};
|
|
243
225
|
y = {
|
|
@@ -245,79 +227,79 @@ React keys must be passed directly to JSX without using spread:
|
|
|
245
227
|
return f();
|
|
246
228
|
}
|
|
247
229
|
};
|
|
248
|
-
var
|
|
230
|
+
var xn, bn = {}, kn = y.react_stack_bottom_frame.bind(
|
|
249
231
|
y,
|
|
250
232
|
i
|
|
251
|
-
)(),
|
|
233
|
+
)(), _n = Mt(r(i)), Tn = {};
|
|
252
234
|
Re.Fragment = C, Re.jsx = function(f, b, p) {
|
|
253
235
|
var D = 1e4 > Et.recentlyCreatedOwnerStacks++;
|
|
254
|
-
return
|
|
236
|
+
return d(
|
|
255
237
|
f,
|
|
256
238
|
b,
|
|
257
239
|
p,
|
|
258
240
|
!1,
|
|
259
|
-
D ? Error("react-stack-top-frame") :
|
|
260
|
-
D ? Mt(r(f)) :
|
|
241
|
+
D ? Error("react-stack-top-frame") : kn,
|
|
242
|
+
D ? Mt(r(f)) : _n
|
|
261
243
|
);
|
|
262
244
|
}, Re.jsxs = function(f, b, p) {
|
|
263
245
|
var D = 1e4 > Et.recentlyCreatedOwnerStacks++;
|
|
264
|
-
return
|
|
246
|
+
return d(
|
|
265
247
|
f,
|
|
266
248
|
b,
|
|
267
249
|
p,
|
|
268
250
|
!0,
|
|
269
|
-
D ? Error("react-stack-top-frame") :
|
|
270
|
-
D ? Mt(r(f)) :
|
|
251
|
+
D ? Error("react-stack-top-frame") : kn,
|
|
252
|
+
D ? Mt(r(f)) : _n
|
|
271
253
|
);
|
|
272
254
|
};
|
|
273
255
|
})()), Re;
|
|
274
256
|
}
|
|
275
|
-
var
|
|
276
|
-
function
|
|
277
|
-
return
|
|
278
|
-
}
|
|
279
|
-
var u =
|
|
280
|
-
const
|
|
281
|
-
text:
|
|
282
|
-
fill:
|
|
283
|
-
btn:
|
|
284
|
-
default: "
|
|
285
|
-
down:
|
|
286
|
-
plain:
|
|
287
|
-
link:
|
|
257
|
+
var On;
|
|
258
|
+
function Os() {
|
|
259
|
+
return On || (On = 1, process.env.NODE_ENV === "production" ? Qe.exports = Ss() : Qe.exports = ps()), Qe.exports;
|
|
260
|
+
}
|
|
261
|
+
var u = Os();
|
|
262
|
+
const Ns = "_text_1eq6a_25", Es = "_fill_1eq6a_41", Ms = "_btn_1eq6a_55", Cs = "_down_1eq6a_117", Ds = "_plain_1eq6a_153", js = "_link_1eq6a_229", Is = "_green_1eq6a_277", Fs = "_blue_1eq6a_325", Vs = "_cyan_1eq6a_385", Rs = "_dark_1eq6a_449", Ws = "_grey_1eq6a_507", $s = "_dialog_1eq6a_541", Ls = "_red_1eq6a_561", As = "_mono_1eq6a_643", Q = {
|
|
263
|
+
text: Ns,
|
|
264
|
+
fill: Es,
|
|
265
|
+
btn: Ms,
|
|
266
|
+
default: "_default_1eq6a_77",
|
|
267
|
+
down: Cs,
|
|
268
|
+
plain: Ds,
|
|
269
|
+
link: js,
|
|
288
270
|
green: Is,
|
|
289
271
|
blue: Fs,
|
|
290
272
|
cyan: Vs,
|
|
291
|
-
dark:
|
|
292
|
-
grey:
|
|
273
|
+
dark: Rs,
|
|
274
|
+
grey: Ws,
|
|
293
275
|
dialog: $s,
|
|
294
|
-
red:
|
|
295
|
-
mono:
|
|
296
|
-
},
|
|
276
|
+
red: Ls,
|
|
277
|
+
mono: As
|
|
278
|
+
}, cr = qe("blue");
|
|
297
279
|
function re(t) {
|
|
298
|
-
return /* @__PURE__ */ u.jsx(
|
|
280
|
+
return /* @__PURE__ */ u.jsx(cr.Provider, { value: t.palette, children: t.children });
|
|
299
281
|
}
|
|
300
282
|
function E(t, e) {
|
|
301
|
-
const n = G(
|
|
283
|
+
const n = G(cr), r = (e?.palette ?? n) || "mono";
|
|
302
284
|
return {
|
|
303
285
|
palette: r,
|
|
304
286
|
styles: function(...s) {
|
|
305
287
|
if (!t)
|
|
306
288
|
return s.map((a) => a).join(" ");
|
|
307
289
|
const i = t[r];
|
|
308
|
-
return i && (s = [...s, i]), s.map((a) => typeof a == "string" ? t[a] ?? a :
|
|
290
|
+
return i && (s = [...s, i]), s.map((a) => typeof a == "string" ? t[a] ?? a : Ps(a, t)).join(" ");
|
|
309
291
|
}
|
|
310
292
|
};
|
|
311
293
|
}
|
|
312
|
-
function
|
|
294
|
+
function Ps(t, e) {
|
|
313
295
|
return Object.keys(t).filter((n) => t[n]).map((n) => e[n] ?? n).join(" ");
|
|
314
296
|
}
|
|
315
|
-
const Ce =
|
|
316
|
-
function
|
|
297
|
+
const Ce = qe(null);
|
|
298
|
+
function dr() {
|
|
317
299
|
return G(Ce);
|
|
318
300
|
}
|
|
319
|
-
function
|
|
320
|
-
const e =
|
|
301
|
+
function an(t) {
|
|
302
|
+
const e = dr(), n = E(Q, t), r = He(), s = J(null);
|
|
321
303
|
return L(() => {
|
|
322
304
|
e && !e.submitRef?.ref && t.default && !t.disabled && s?.current && e.setDefaultSubmit({
|
|
323
305
|
id: r,
|
|
@@ -339,12 +321,12 @@ function dr(t) {
|
|
|
339
321
|
[Q.link]: t.variant == "link" || t.variant == "text",
|
|
340
322
|
[Q.text]: t.variant == "text"
|
|
341
323
|
}),
|
|
342
|
-
style: { width: t.width ??
|
|
324
|
+
style: { width: t.width ?? zs(t) },
|
|
343
325
|
children: t.children
|
|
344
326
|
}
|
|
345
327
|
);
|
|
346
328
|
}
|
|
347
|
-
function
|
|
329
|
+
function zs(t) {
|
|
348
330
|
switch (!0) {
|
|
349
331
|
case t.w0:
|
|
350
332
|
return "80px";
|
|
@@ -352,12 +334,12 @@ function Ps(t) {
|
|
|
352
334
|
return "120px";
|
|
353
335
|
}
|
|
354
336
|
}
|
|
355
|
-
const
|
|
356
|
-
cb:
|
|
357
|
-
disabled:
|
|
358
|
-
mono:
|
|
337
|
+
const Us = "_cb_1yqjk_1", Zs = "_disabled_1yqjk_51", qs = "_mono_1yqjk_75", Hs = "_dialog_1yqjk_91", Ys = "_green_1yqjk_107", et = {
|
|
338
|
+
cb: Us,
|
|
339
|
+
disabled: Zs,
|
|
340
|
+
mono: qs,
|
|
359
341
|
dialog: Hs,
|
|
360
|
-
green:
|
|
342
|
+
green: Ys
|
|
361
343
|
}, ue = {
|
|
362
344
|
handleChange: function(t, e) {
|
|
363
345
|
return t = e.onChanging ? e.onChanging(t) : t, e.onChange?.(t), t;
|
|
@@ -429,7 +411,7 @@ const zs = "_cb_10efi_1", Us = "_disabled_10efi_26", Zs = "_mono_10efi_38", Hs =
|
|
|
429
411
|
update: function(r, s, i) {
|
|
430
412
|
e((a) => {
|
|
431
413
|
const o = a.data[r];
|
|
432
|
-
return
|
|
414
|
+
return Gs(
|
|
433
415
|
{
|
|
434
416
|
...a,
|
|
435
417
|
isValidated: !1,
|
|
@@ -448,7 +430,7 @@ const zs = "_cb_10efi_1", Us = "_disabled_10efi_26", Zs = "_mono_10efi_38", Hs =
|
|
|
448
430
|
});
|
|
449
431
|
},
|
|
450
432
|
validate: function() {
|
|
451
|
-
return e((r) =>
|
|
433
|
+
return e((r) => Ht(r)), t.isValid ?? !1;
|
|
452
434
|
}
|
|
453
435
|
};
|
|
454
436
|
function n(r) {
|
|
@@ -456,7 +438,7 @@ const zs = "_cb_10efi_1", Us = "_disabled_10efi_26", Zs = "_mono_10efi_38", Hs =
|
|
|
456
438
|
}
|
|
457
439
|
},
|
|
458
440
|
getDataContent: Zt,
|
|
459
|
-
getInitialState:
|
|
441
|
+
getInitialState: qt
|
|
460
442
|
};
|
|
461
443
|
function Zt(t) {
|
|
462
444
|
const e = {};
|
|
@@ -475,18 +457,18 @@ function Zt(t) {
|
|
|
475
457
|
}
|
|
476
458
|
}), e;
|
|
477
459
|
}
|
|
478
|
-
function
|
|
460
|
+
function qt(t) {
|
|
479
461
|
if (t !== void 0)
|
|
480
462
|
return {
|
|
481
463
|
isLoading: !1,
|
|
482
464
|
isValidated: !1,
|
|
483
465
|
isDisabled: !1,
|
|
484
466
|
isValid: !1,
|
|
485
|
-
data:
|
|
467
|
+
data: Bs(t),
|
|
486
468
|
submitRef: { ref: void 0, id: void 0 }
|
|
487
469
|
};
|
|
488
470
|
}
|
|
489
|
-
function
|
|
471
|
+
function Bs(t) {
|
|
490
472
|
const e = {};
|
|
491
473
|
return Object.keys(t).forEach((n) => {
|
|
492
474
|
const r = t[n];
|
|
@@ -500,7 +482,7 @@ function Ys(t) {
|
|
|
500
482
|
origValue: null,
|
|
501
483
|
value: {
|
|
502
484
|
mode: "list",
|
|
503
|
-
items: r.map((s) =>
|
|
485
|
+
items: r.map((s) => qt(s))
|
|
504
486
|
}
|
|
505
487
|
};
|
|
506
488
|
return;
|
|
@@ -509,41 +491,41 @@ function Ys(t) {
|
|
|
509
491
|
isValid: void 0,
|
|
510
492
|
origValue: null,
|
|
511
493
|
value: {
|
|
512
|
-
...
|
|
494
|
+
...qt(r),
|
|
513
495
|
mode: "datacontext"
|
|
514
496
|
}
|
|
515
497
|
};
|
|
516
498
|
}), e;
|
|
517
499
|
}
|
|
518
|
-
function
|
|
500
|
+
function Ht(t) {
|
|
519
501
|
return t = { ...t, isValidated: !0, data: { ...t.data } }, Object.keys(t.data).forEach((e) => {
|
|
520
502
|
const n = t.data[e].value;
|
|
521
503
|
if (typeof n != "string")
|
|
522
504
|
switch (n.mode) {
|
|
523
505
|
case "datacontext":
|
|
524
506
|
t.data[e].value = {
|
|
525
|
-
...
|
|
507
|
+
...Ht(n),
|
|
526
508
|
mode: "datacontext"
|
|
527
509
|
};
|
|
528
510
|
break;
|
|
529
511
|
case "list":
|
|
530
512
|
const s = {
|
|
531
513
|
mode: "list",
|
|
532
|
-
items: t.data[e].value.items.map((i) =>
|
|
514
|
+
items: t.data[e].value.items.map((i) => Ht(i))
|
|
533
515
|
};
|
|
534
516
|
t.data[e].value = s;
|
|
535
517
|
break;
|
|
536
518
|
}
|
|
537
519
|
}), t;
|
|
538
520
|
}
|
|
539
|
-
function
|
|
521
|
+
function Gs(t, e) {
|
|
540
522
|
if (!e)
|
|
541
523
|
return { ...t, isValid: !1 };
|
|
542
524
|
const n = !Object.keys(t.data).find((r) => !t.data[r].isValid);
|
|
543
525
|
return { ...t, isValid: n };
|
|
544
526
|
}
|
|
545
527
|
function gt(t) {
|
|
546
|
-
const [e, n] =
|
|
528
|
+
const [e, n] = V(t.defaultValue);
|
|
547
529
|
return {
|
|
548
530
|
value: t.value ?? e,
|
|
549
531
|
set: function(s) {
|
|
@@ -556,8 +538,8 @@ function wt(t, e) {
|
|
|
556
538
|
t.autoFocus && e && e.current?.focus();
|
|
557
539
|
}, [e]);
|
|
558
540
|
}
|
|
559
|
-
function
|
|
560
|
-
const e =
|
|
541
|
+
function Js(t) {
|
|
542
|
+
const e = He(), n = E(et, t), r = gt(t), s = J(null);
|
|
561
543
|
return wt(t, s), /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
562
544
|
/* @__PURE__ */ u.jsx(
|
|
563
545
|
"input",
|
|
@@ -576,14 +558,14 @@ function Gs(t) {
|
|
|
576
558
|
t.caption && /* @__PURE__ */ u.jsx("label", { className: n.styles(et.cb, { [et.disabled]: !!t.disabled }), htmlFor: e, children: t.caption })
|
|
577
559
|
] });
|
|
578
560
|
}
|
|
579
|
-
const
|
|
561
|
+
const Ks = 100;
|
|
580
562
|
function fr(t, e) {
|
|
581
|
-
t = t || "resize", e = e ??
|
|
582
|
-
const n =
|
|
563
|
+
t = t || "resize", e = e ?? Ks;
|
|
564
|
+
const n = Xs(t, e), r = ze(() => ({
|
|
583
565
|
transition: n,
|
|
584
566
|
transform: t == "resize" ? "scale(0.1)" : void 0,
|
|
585
567
|
opacity: t == "opacity" ? 0 : void 0
|
|
586
|
-
}), []), s = G(ve), [i, a] =
|
|
568
|
+
}), []), s = G(ve), [i, a] = V(r);
|
|
587
569
|
return L(() => {
|
|
588
570
|
a({
|
|
589
571
|
transition: n,
|
|
@@ -605,7 +587,7 @@ function fr(t, e) {
|
|
|
605
587
|
}
|
|
606
588
|
};
|
|
607
589
|
}
|
|
608
|
-
function
|
|
590
|
+
function Xs(t, e) {
|
|
609
591
|
switch (e = e / 1e3, t) {
|
|
610
592
|
case "resize":
|
|
611
593
|
return `transform ${e}s ease`;
|
|
@@ -617,20 +599,20 @@ function hr(t) {
|
|
|
617
599
|
const e = fr(t.effect, t.animationDuration), n = e.get();
|
|
618
600
|
return t.emptyMode ? t.onRender(() => e.close(t.onClose), n) : /* @__PURE__ */ u.jsx("div", { style: n, children: t.onRender(() => e.close(t.onClose), n) });
|
|
619
601
|
}
|
|
620
|
-
const
|
|
621
|
-
tb:
|
|
622
|
-
prefix:
|
|
623
|
-
empty:
|
|
624
|
-
tbWrapper:
|
|
625
|
-
green:
|
|
626
|
-
dialog:
|
|
627
|
-
blue:
|
|
628
|
-
grey:
|
|
629
|
-
mono:
|
|
630
|
-
red:
|
|
602
|
+
const Qs = "_tb_1juvc_1", ei = "_prefix_1juvc_73", ti = "_empty_1juvc_85", ni = "_tbWrapper_1juvc_97", ri = "_green_1juvc_103", si = "_dialog_1juvc_111", ii = "_blue_1juvc_129", ai = "_grey_1juvc_145", oi = "_mono_1juvc_153", li = "_red_1juvc_163", fe = {
|
|
603
|
+
tb: Qs,
|
|
604
|
+
prefix: ei,
|
|
605
|
+
empty: ti,
|
|
606
|
+
tbWrapper: ni,
|
|
607
|
+
green: ri,
|
|
608
|
+
dialog: si,
|
|
609
|
+
blue: ii,
|
|
610
|
+
grey: ai,
|
|
611
|
+
mono: oi,
|
|
612
|
+
red: li
|
|
631
613
|
};
|
|
632
|
-
function
|
|
633
|
-
const e = E(fe, t), n =
|
|
614
|
+
function on(t) {
|
|
615
|
+
const e = E(fe, t), n = He(), r = J(null), s = t.inputRef ?? r, i = gt(t), a = dr();
|
|
634
616
|
return wt(t, r), /* @__PURE__ */ u.jsxs("div", { className: e.styles("tbWrapper"), children: [
|
|
635
617
|
t.caption && /* @__PURE__ */ u.jsx("label", { htmlFor: n, children: t.caption }),
|
|
636
618
|
/* @__PURE__ */ u.jsxs("div", { ref: t.wrapperRef, className: e.styles(fe.tb), children: [
|
|
@@ -676,16 +658,16 @@ function an(t) {
|
|
|
676
658
|
] })
|
|
677
659
|
] });
|
|
678
660
|
}
|
|
679
|
-
const
|
|
680
|
-
glass:
|
|
681
|
-
backdrop:
|
|
661
|
+
const ui = "_glass_zhks7_9", ci = "_backdrop_zhks7_27", Nn = {
|
|
662
|
+
glass: ui,
|
|
663
|
+
backdrop: ci
|
|
682
664
|
};
|
|
683
665
|
function Ue(t) {
|
|
684
|
-
const [e, n] =
|
|
666
|
+
const [e, n] = V(null);
|
|
685
667
|
return t.visible ? /* @__PURE__ */ u.jsx(
|
|
686
668
|
"div",
|
|
687
669
|
{
|
|
688
|
-
className:
|
|
670
|
+
className: Nn.glass + (t.backdrop ? " " + Nn.backdrop : ""),
|
|
689
671
|
onClick: () => t.onClick?.(),
|
|
690
672
|
onTouchMove: (r) => {
|
|
691
673
|
r.preventDefault(), r.stopPropagation();
|
|
@@ -721,7 +703,7 @@ const mr = {
|
|
|
721
703
|
return t !== void 0 ? e(t) : n;
|
|
722
704
|
}
|
|
723
705
|
};
|
|
724
|
-
function
|
|
706
|
+
function q(t) {
|
|
725
707
|
const e = (t.center || t.centerV) && "50%" || t.rect?.y, n = (t.center || t.centerH) && "50%" || t.rect?.x, r = t.center || t.centerH || t.centerV ? mr.orUndefined(t.style?.transform, (s) => s + " ", "") + `translate(${t.center || t.centerH ? "-50%" : "0"},${t.center || t.centerV ? "-50%" : "0"})` : t.style?.transform;
|
|
726
708
|
return /* @__PURE__ */ u.jsx(
|
|
727
709
|
"div",
|
|
@@ -749,44 +731,44 @@ function H(t) {
|
|
|
749
731
|
}
|
|
750
732
|
);
|
|
751
733
|
}
|
|
752
|
-
const
|
|
753
|
-
clickable:
|
|
754
|
-
fullSize:
|
|
755
|
-
main:
|
|
756
|
-
shadow:
|
|
757
|
-
frameStd:
|
|
758
|
-
single:
|
|
759
|
-
borderless:
|
|
760
|
-
contentWithTitle:
|
|
761
|
-
close:
|
|
762
|
-
titleWrapper:
|
|
763
|
-
title:
|
|
764
|
-
btn:
|
|
765
|
-
contentInsideWrapper:
|
|
766
|
-
outerBox:
|
|
767
|
-
wrapper:
|
|
768
|
-
frame:
|
|
769
|
-
padding:
|
|
770
|
-
content:
|
|
771
|
-
contentPadding:
|
|
772
|
-
contentPaddingSpace:
|
|
773
|
-
outerMargin:
|
|
774
|
-
autoSize:
|
|
734
|
+
const di = "_clickable_16ge4_3", fi = "_fullSize_16ge4_11", hi = "_main_16ge4_21", mi = "_shadow_16ge4_29", yi = "_frameStd_16ge4_37", gi = "_single_16ge4_49", wi = "_borderless_16ge4_59", vi = "_contentWithTitle_16ge4_69", xi = "_close_16ge4_77", bi = "_titleWrapper_16ge4_85", ki = "_title_16ge4_85", _i = "_btn_16ge4_117", Ti = "_contentInsideWrapper_16ge4_149", Si = "_outerBox_16ge4_163", pi = "_wrapper_16ge4_203", Oi = "_frame_16ge4_37", Ni = "_padding_16ge4_213", Ei = "_content_16ge4_69", Mi = "_contentPadding_16ge4_251", Ci = "_contentPaddingSpace_16ge4_261", Di = "_outerMargin_16ge4_291", ji = "_autoSize_16ge4_299", Ii = "_space_16ge4_299", Fi = "_blue_16ge4_405", Vi = "_frameBck_16ge4_405", Ri = "_cyan_16ge4_459", Wi = "_dark_16ge4_513", $i = "_green_16ge4_567", Li = "_grey_16ge4_631", Ai = "_dialog_16ge4_723", Pi = "_mono_16ge4_807", zi = "_red_16ge4_861", x = {
|
|
735
|
+
clickable: di,
|
|
736
|
+
fullSize: fi,
|
|
737
|
+
main: hi,
|
|
738
|
+
shadow: mi,
|
|
739
|
+
frameStd: yi,
|
|
740
|
+
single: gi,
|
|
741
|
+
borderless: wi,
|
|
742
|
+
contentWithTitle: vi,
|
|
743
|
+
close: xi,
|
|
744
|
+
titleWrapper: bi,
|
|
745
|
+
title: ki,
|
|
746
|
+
btn: _i,
|
|
747
|
+
contentInsideWrapper: Ti,
|
|
748
|
+
outerBox: Si,
|
|
749
|
+
wrapper: pi,
|
|
750
|
+
frame: Oi,
|
|
751
|
+
padding: Ni,
|
|
752
|
+
content: Ei,
|
|
753
|
+
contentPadding: Mi,
|
|
754
|
+
contentPaddingSpace: Ci,
|
|
755
|
+
outerMargin: Di,
|
|
756
|
+
autoSize: ji,
|
|
775
757
|
space: Ii,
|
|
776
758
|
blue: Fi,
|
|
777
759
|
frameBck: Vi,
|
|
778
|
-
cyan:
|
|
779
|
-
dark:
|
|
760
|
+
cyan: Ri,
|
|
761
|
+
dark: Wi,
|
|
780
762
|
green: $i,
|
|
781
|
-
grey:
|
|
782
|
-
dialog:
|
|
783
|
-
mono:
|
|
784
|
-
red:
|
|
763
|
+
grey: Li,
|
|
764
|
+
dialog: Ai,
|
|
765
|
+
mono: Pi,
|
|
766
|
+
red: zi
|
|
785
767
|
};
|
|
786
768
|
function vt(t) {
|
|
787
|
-
return t.fill ? /* @__PURE__ */ u.jsx(
|
|
769
|
+
return t.fill ? /* @__PURE__ */ u.jsx(Zi, { ...t }) : /* @__PURE__ */ u.jsx(Ui, { ...t });
|
|
788
770
|
}
|
|
789
|
-
function
|
|
771
|
+
function Ui(t) {
|
|
790
772
|
const e = E(x, t);
|
|
791
773
|
return /* @__PURE__ */ u.jsx(re, { palette: e.palette, children: /* @__PURE__ */ u.jsx(
|
|
792
774
|
"div",
|
|
@@ -822,7 +804,7 @@ function zi(t) {
|
|
|
822
804
|
}
|
|
823
805
|
) });
|
|
824
806
|
}
|
|
825
|
-
function
|
|
807
|
+
function Zi(t) {
|
|
826
808
|
const e = E(x, t);
|
|
827
809
|
return /* @__PURE__ */ u.jsx(re, { palette: e.palette, children: /* @__PURE__ */ u.jsx(
|
|
828
810
|
"div",
|
|
@@ -914,39 +896,39 @@ function wr(t) {
|
|
|
914
896
|
}
|
|
915
897
|
) });
|
|
916
898
|
}
|
|
917
|
-
const
|
|
918
|
-
menu:
|
|
899
|
+
const qi = "_menu_1jpcc_1", Hi = "_selected_1jpcc_51", Yi = "_disabled_1jpcc_59", Bi = "_separator_1jpcc_69", Gi = "_secondary_1jpcc_79", Ji = "_prefix_1jpcc_87", Ki = "_cyan_1jpcc_101", Xi = "_grey_1jpcc_121", Qi = "_mono_1jpcc_131", ea = "_dark_1jpcc_141", ta = "_green_1jpcc_161", na = "_red_1jpcc_201", ra = "_blue_1jpcc_221", he = {
|
|
900
|
+
menu: qi,
|
|
919
901
|
selected: Hi,
|
|
920
|
-
disabled:
|
|
921
|
-
separator:
|
|
922
|
-
secondary:
|
|
923
|
-
prefix:
|
|
924
|
-
cyan:
|
|
925
|
-
grey:
|
|
926
|
-
mono:
|
|
927
|
-
dark:
|
|
928
|
-
green:
|
|
929
|
-
red:
|
|
930
|
-
blue:
|
|
902
|
+
disabled: Yi,
|
|
903
|
+
separator: Bi,
|
|
904
|
+
secondary: Gi,
|
|
905
|
+
prefix: Ji,
|
|
906
|
+
cyan: Ki,
|
|
907
|
+
grey: Xi,
|
|
908
|
+
mono: Qi,
|
|
909
|
+
dark: ea,
|
|
910
|
+
green: ta,
|
|
911
|
+
red: na,
|
|
912
|
+
blue: ra
|
|
931
913
|
}, Ee = {
|
|
932
914
|
clamp: function(t, e, n) {
|
|
933
915
|
return Math.min(Math.max(t, e), n);
|
|
934
916
|
}
|
|
935
917
|
};
|
|
936
|
-
function
|
|
937
|
-
const e = E(he, t), n = J(null), r = t.items.findIndex((
|
|
918
|
+
function sa(t) {
|
|
919
|
+
const e = E(he, t), n = J(null), r = t.items.findIndex((d) => d.selected), s = Ee.clamp(r, 0, t.items.length), i = t.selectedRef ?? n;
|
|
938
920
|
return t.menuEventHandlerRef && (t.menuEventHandlerRef.current = a), L(() => {
|
|
939
921
|
i.current && i.current.parentElement?.scrollIntoView({ behavior: "smooth" });
|
|
940
|
-
}, [t.items[r]?.id]), /* @__PURE__ */ u.jsx("div", { className: e.styles(he.menu), children: /* @__PURE__ */ u.jsx("ul", { children: t.items.map((
|
|
922
|
+
}, [t.items[r]?.id]), /* @__PURE__ */ u.jsx("div", { className: e.styles(he.menu), children: /* @__PURE__ */ u.jsx("ul", { children: t.items.map((d, m) => /* @__PURE__ */ u.jsx(
|
|
941
923
|
"li",
|
|
942
924
|
{
|
|
943
925
|
onClick: (g) => {
|
|
944
|
-
g.preventDefault(), g.stopPropagation(), t.onClick?.(
|
|
926
|
+
g.preventDefault(), g.stopPropagation(), t.onClick?.(d.id);
|
|
945
927
|
},
|
|
946
928
|
className: e.styles({
|
|
947
|
-
[he.separator]: !!
|
|
948
|
-
[he.selected]: !!
|
|
949
|
-
[he.disabled]: !!
|
|
929
|
+
[he.separator]: !!d.withSeparator,
|
|
930
|
+
[he.selected]: !!d.selected,
|
|
931
|
+
[he.disabled]: !!d.disabled
|
|
950
932
|
}),
|
|
951
933
|
children: /* @__PURE__ */ u.jsxs(
|
|
952
934
|
"a",
|
|
@@ -955,20 +937,20 @@ function ra(t) {
|
|
|
955
937
|
onKeyDown: (g) => o(g),
|
|
956
938
|
href: "#",
|
|
957
939
|
onClick: (g) => {
|
|
958
|
-
g.preventDefault(), g.stopPropagation(), t.onClick?.(
|
|
940
|
+
g.preventDefault(), g.stopPropagation(), t.onClick?.(d.id);
|
|
959
941
|
},
|
|
960
942
|
children: [
|
|
961
|
-
/* @__PURE__ */ u.jsx("span", { className: he.prefix, style: { color:
|
|
962
|
-
|
|
963
|
-
/* @__PURE__ */ u.jsx("span", { className: he.secondary, style: { color:
|
|
943
|
+
/* @__PURE__ */ u.jsx("span", { className: he.prefix, style: { color: d.prefixColor, width: d.prefixWidth }, children: d.prefix }),
|
|
944
|
+
d.label || d.id,
|
|
945
|
+
/* @__PURE__ */ u.jsx("span", { className: he.secondary, style: { color: d.secondaryColor }, children: d.secondary })
|
|
964
946
|
]
|
|
965
947
|
}
|
|
966
948
|
)
|
|
967
949
|
},
|
|
968
|
-
|
|
950
|
+
d.id
|
|
969
951
|
)) }) });
|
|
970
|
-
function a(
|
|
971
|
-
switch (
|
|
952
|
+
function a(d) {
|
|
953
|
+
switch (d) {
|
|
972
954
|
case "ArrowDown":
|
|
973
955
|
return t.onSelect?.(l(1, !0)), !0;
|
|
974
956
|
case "End":
|
|
@@ -987,39 +969,39 @@ function ra(t) {
|
|
|
987
969
|
}
|
|
988
970
|
return !1;
|
|
989
971
|
}
|
|
990
|
-
function o(
|
|
991
|
-
a(
|
|
972
|
+
function o(d) {
|
|
973
|
+
a(d.code) && (d.stopPropagation(), d.preventDefault());
|
|
992
974
|
}
|
|
993
|
-
function l(
|
|
994
|
-
return t.items[d
|
|
975
|
+
function l(d, m) {
|
|
976
|
+
return t.items[c(d, m)].id;
|
|
995
977
|
}
|
|
996
|
-
function d
|
|
997
|
-
const g =
|
|
998
|
-
for (
|
|
999
|
-
m ? s +
|
|
978
|
+
function c(d, m) {
|
|
979
|
+
const g = d >= 0 ? 1 : -1;
|
|
980
|
+
for (d = Ee.clamp(
|
|
981
|
+
m ? s + d : d == -1 ? t.items.length - 1 : d,
|
|
1000
982
|
0,
|
|
1001
983
|
t.items.length - 1
|
|
1002
|
-
);
|
|
1003
|
-
if (t.items[
|
|
1004
|
-
return
|
|
1005
|
-
|
|
984
|
+
); d >= 0 && d < t.items.length; ) {
|
|
985
|
+
if (t.items[d] && !t.items[d].disabled)
|
|
986
|
+
return d;
|
|
987
|
+
d += g;
|
|
1006
988
|
}
|
|
1007
|
-
return
|
|
989
|
+
return d;
|
|
1008
990
|
}
|
|
1009
991
|
}
|
|
1010
|
-
function
|
|
1011
|
-
const e = t.items.map((
|
|
1012
|
-
...
|
|
1013
|
-
selected:
|
|
1014
|
-
id: t.mode == "combo" ?
|
|
1015
|
-
})).filter((
|
|
992
|
+
function ia(t) {
|
|
993
|
+
const e = t.items.map((c) => ({
|
|
994
|
+
...c,
|
|
995
|
+
selected: c.id == t.value,
|
|
996
|
+
id: t.mode == "combo" ? c.label || "" : c.id
|
|
997
|
+
})).filter((c) => c.id), n = aa(t);
|
|
1016
998
|
return /* @__PURE__ */ u.jsx(
|
|
1017
|
-
|
|
999
|
+
oa,
|
|
1018
1000
|
{
|
|
1019
1001
|
...t,
|
|
1020
1002
|
dl: n,
|
|
1021
1003
|
popup: /* @__PURE__ */ u.jsx(
|
|
1022
|
-
|
|
1004
|
+
la,
|
|
1023
1005
|
{
|
|
1024
1006
|
filterCaption: t.filterCaption ?? "Filter",
|
|
1025
1007
|
autoFocus: !0,
|
|
@@ -1030,26 +1012,26 @@ function sa(t) {
|
|
|
1030
1012
|
onClose: () => {
|
|
1031
1013
|
n.setShowOpen(!1), n.flagDisableFocus.disabled = !0, n.inputRef.current?.focus(), n.flagDisableFocus.disabled = !1;
|
|
1032
1014
|
},
|
|
1033
|
-
onMatchFilter: (
|
|
1015
|
+
onMatchFilter: (c, d) => t.onMatchFilter ? t.onMatchFilter(c, d) : (d = d.toLowerCase(), (c.id + "," + c.label).toLowerCase().includes(d)),
|
|
1034
1016
|
windowPalette: n.windowPalette
|
|
1035
1017
|
}
|
|
1036
1018
|
),
|
|
1037
1019
|
children: /* @__PURE__ */ u.jsx(
|
|
1038
|
-
|
|
1020
|
+
on,
|
|
1039
1021
|
{
|
|
1040
1022
|
...t,
|
|
1041
1023
|
mode: "text",
|
|
1042
1024
|
inputRef: n.inputRef,
|
|
1043
1025
|
value: r(),
|
|
1044
1026
|
wrapperRef: n.wrapperRef,
|
|
1045
|
-
suffix: /* @__PURE__ */ u.jsx(
|
|
1027
|
+
suffix: /* @__PURE__ */ u.jsx(an, { variant: "link", disabled: t.disabled, onClick: () => l(), children: "▼" }),
|
|
1046
1028
|
suffixStyle: { opacity: t.items.length == 0 ? 0.3 : void 0 },
|
|
1047
1029
|
readOnly: n.mode == "select",
|
|
1048
1030
|
inputStyle: { cursor: t.items.length > 0 ? "pointer" : void 0 },
|
|
1049
1031
|
onClick: () => s(),
|
|
1050
1032
|
onFocus: () => a(),
|
|
1051
|
-
onChange: (
|
|
1052
|
-
onKeyDown: (
|
|
1033
|
+
onChange: (c) => i(c),
|
|
1034
|
+
onKeyDown: (c, d) => o(c, d)
|
|
1053
1035
|
}
|
|
1054
1036
|
)
|
|
1055
1037
|
}
|
|
@@ -1057,7 +1039,7 @@ function sa(t) {
|
|
|
1057
1039
|
function r() {
|
|
1058
1040
|
switch (n.mode) {
|
|
1059
1041
|
case "select":
|
|
1060
|
-
return t.items.find((
|
|
1042
|
+
return t.items.find((c) => c.id == n.v.value)?.label || "";
|
|
1061
1043
|
case "combo":
|
|
1062
1044
|
return t.value;
|
|
1063
1045
|
}
|
|
@@ -1065,36 +1047,32 @@ function sa(t) {
|
|
|
1065
1047
|
function s() {
|
|
1066
1048
|
n.mode == "select" && l(), n.mode == "combo" && !t.value && l();
|
|
1067
1049
|
}
|
|
1068
|
-
function i(
|
|
1069
|
-
|
|
1070
|
-
case "combo":
|
|
1071
|
-
n.v.set(d);
|
|
1072
|
-
break;
|
|
1073
|
-
}
|
|
1050
|
+
function i(c) {
|
|
1051
|
+
n.mode === "combo" && n.v.set(c);
|
|
1074
1052
|
}
|
|
1075
1053
|
function a() {
|
|
1076
1054
|
!n.flagDisableFocus.disabled && n.mode == "select" && n.setShowOpen(t.items.length > 0);
|
|
1077
1055
|
}
|
|
1078
|
-
function o(
|
|
1079
|
-
(
|
|
1056
|
+
function o(c, d) {
|
|
1057
|
+
(c == "ArrowUp" || c == "ArrowDown" || c == "F3") && (l(), d.stopPropagation());
|
|
1080
1058
|
}
|
|
1081
1059
|
function l() {
|
|
1082
1060
|
n.setShowOpen(t.items.length > 0);
|
|
1083
1061
|
}
|
|
1084
1062
|
}
|
|
1085
|
-
function
|
|
1086
|
-
const e = gt(t), n = E(void 0, t), r = J(null), s = J(null), [i, a] =
|
|
1063
|
+
function aa(t) {
|
|
1064
|
+
const e = gt(t), n = E(void 0, t), r = J(null), s = J(null), [i, a] = V(!1), o = t.windowPalette ?? (n.palette == "dialog" ? "blue" : n.palette), l = t.hasFilter === void 0 ? t.items.length > 8 : t.hasFilter, c = l ? 4 : 0, d = Ee.clamp(t.items.length * 2.3 + 2.7 + c, 3, 21), m = J(null);
|
|
1087
1065
|
L(() => {
|
|
1088
1066
|
if (!m.current || !C)
|
|
1089
1067
|
return;
|
|
1090
1068
|
const K = m.current.getBoundingClientRect(), ce = C.y + C.height, be = ce + K.height - (window.visualViewport?.height || 0);
|
|
1091
1069
|
y(ce - (be > 0 ? be : 0));
|
|
1092
1070
|
}, [m.current, i]);
|
|
1093
|
-
const [g, y] =
|
|
1071
|
+
const [g, y] = V(0), S = t.wrapperRef ?? r, R = t.inputRef ?? s, C = S.current && S.current.getBoundingClientRect(), B = ze(() => ({ disabled: !1 }), []);
|
|
1094
1072
|
return wt(t, s), {
|
|
1095
1073
|
flagDisableFocus: B,
|
|
1096
1074
|
hasFilter: l,
|
|
1097
|
-
height:
|
|
1075
|
+
height: d,
|
|
1098
1076
|
mode: t.mode || "select",
|
|
1099
1077
|
palette: n,
|
|
1100
1078
|
rect: C,
|
|
@@ -1103,12 +1081,12 @@ function ia(t) {
|
|
|
1103
1081
|
windowY: g,
|
|
1104
1082
|
showOpen: i,
|
|
1105
1083
|
setShowOpen: a,
|
|
1106
|
-
inputRef:
|
|
1084
|
+
inputRef: R,
|
|
1107
1085
|
viewportRef: m,
|
|
1108
1086
|
wrapperRef: S
|
|
1109
1087
|
};
|
|
1110
1088
|
}
|
|
1111
|
-
function
|
|
1089
|
+
function oa(t) {
|
|
1112
1090
|
const e = t.dl;
|
|
1113
1091
|
return /* @__PURE__ */ u.jsxs(re, { ...e.palette, children: [
|
|
1114
1092
|
/* @__PURE__ */ u.jsx(Ue, { visible: e.showOpen, backdrop: !0 }),
|
|
@@ -1120,7 +1098,7 @@ function aa(t) {
|
|
|
1120
1098
|
e.setShowOpen(!1);
|
|
1121
1099
|
},
|
|
1122
1100
|
children: /* @__PURE__ */ u.jsx(
|
|
1123
|
-
|
|
1101
|
+
q,
|
|
1124
1102
|
{
|
|
1125
1103
|
onClick: (n) => {
|
|
1126
1104
|
n.stopPropagation();
|
|
@@ -1140,15 +1118,15 @@ function aa(t) {
|
|
|
1140
1118
|
t.children
|
|
1141
1119
|
] });
|
|
1142
1120
|
}
|
|
1143
|
-
function
|
|
1144
|
-
const [e, n] =
|
|
1145
|
-
...
|
|
1146
|
-
selected:
|
|
1121
|
+
function la(t) {
|
|
1122
|
+
const [e, n] = V(""), r = J(null), [s, i] = V(t.v.value), a = t.menu.filter((d) => t.onMatchFilter(d, e)).map((d) => ({
|
|
1123
|
+
...d,
|
|
1124
|
+
selected: d.id == s
|
|
1147
1125
|
}));
|
|
1148
1126
|
L(() => {
|
|
1149
1127
|
r.current && t.autoFocus && !t.hasFilter && r.current.focus();
|
|
1150
1128
|
}, [r.current, t.autoFocus, t.hasFilter]);
|
|
1151
|
-
const [o] =
|
|
1129
|
+
const [o] = V({ current: null });
|
|
1152
1130
|
return /* @__PURE__ */ u.jsx(
|
|
1153
1131
|
hr,
|
|
1154
1132
|
{
|
|
@@ -1156,20 +1134,20 @@ function oa(t) {
|
|
|
1156
1134
|
onClose: () => {
|
|
1157
1135
|
t.onClose();
|
|
1158
1136
|
},
|
|
1159
|
-
onRender: (
|
|
1137
|
+
onRender: (d, m) => /* @__PURE__ */ u.jsxs(
|
|
1160
1138
|
vt,
|
|
1161
1139
|
{
|
|
1162
|
-
onHotKey: (g, y) =>
|
|
1140
|
+
onHotKey: (g, y) => c(g, y, d),
|
|
1163
1141
|
style: m,
|
|
1164
1142
|
caption: t.caption,
|
|
1165
1143
|
onClose: () => {
|
|
1166
|
-
|
|
1144
|
+
d();
|
|
1167
1145
|
},
|
|
1168
1146
|
fill: !0,
|
|
1169
1147
|
palette: t.windowPalette,
|
|
1170
1148
|
children: [
|
|
1171
|
-
t.hasFilter && /* @__PURE__ */ u.jsx(
|
|
1172
|
-
|
|
1149
|
+
t.hasFilter && /* @__PURE__ */ u.jsx(q, { rect: { y2: "4em", y: 0, x: 0, x2: 0 }, width: "100%", children: /* @__PURE__ */ u.jsx(
|
|
1150
|
+
on,
|
|
1173
1151
|
{
|
|
1174
1152
|
autoFocus: !0,
|
|
1175
1153
|
value: e,
|
|
@@ -1178,14 +1156,14 @@ function oa(t) {
|
|
|
1178
1156
|
onKeyDown: (g, y) => l(g, y)
|
|
1179
1157
|
}
|
|
1180
1158
|
) }),
|
|
1181
|
-
/* @__PURE__ */ u.jsx(
|
|
1182
|
-
|
|
1159
|
+
/* @__PURE__ */ u.jsx(q, { rect: { y: t.hasFilter ? "4.5em" : 0, y2: 0, x: 0, x2: 0 }, width: "100%", scrollbar: !0, children: /* @__PURE__ */ u.jsx(
|
|
1160
|
+
sa,
|
|
1183
1161
|
{
|
|
1184
1162
|
menuEventHandlerRef: o,
|
|
1185
1163
|
selectedRef: r,
|
|
1186
1164
|
items: a,
|
|
1187
1165
|
onClick: (g) => {
|
|
1188
|
-
t.v.set(g),
|
|
1166
|
+
t.v.set(g), d();
|
|
1189
1167
|
},
|
|
1190
1168
|
onSelect: (g) => i(g)
|
|
1191
1169
|
}
|
|
@@ -1195,67 +1173,67 @@ function oa(t) {
|
|
|
1195
1173
|
)
|
|
1196
1174
|
}
|
|
1197
1175
|
);
|
|
1198
|
-
function l(
|
|
1199
|
-
o?.current && o.current(
|
|
1176
|
+
function l(d, m) {
|
|
1177
|
+
o?.current && o.current(d) && m.stopPropagation();
|
|
1200
1178
|
}
|
|
1201
|
-
function d
|
|
1202
|
-
if (!t.hasFilter &&
|
|
1203
|
-
const y = parseInt(
|
|
1179
|
+
function c(d, m, g) {
|
|
1180
|
+
if (!t.hasFilter && d >= "1" && d <= "9") {
|
|
1181
|
+
const y = parseInt(d) - 1;
|
|
1204
1182
|
y < t.menu.length && (t.v.set(t.menu[y].id), g());
|
|
1205
1183
|
}
|
|
1206
1184
|
}
|
|
1207
1185
|
}
|
|
1208
|
-
function
|
|
1186
|
+
function ua(t) {
|
|
1209
1187
|
const e = E(void 0, t);
|
|
1210
1188
|
return /* @__PURE__ */ u.jsx(re, { palette: e.palette, children: /* @__PURE__ */ u.jsx(vt, { palette: "red", border: "none", innerPadding: "none", noShadow: !0, children: /* @__PURE__ */ u.jsx("div", { style: { marginTop: "0.25em", marginBottom: "0.25em" }, children: t.children }) }) });
|
|
1211
1189
|
}
|
|
1212
|
-
const
|
|
1213
|
-
gb:
|
|
1214
|
-
green:
|
|
1215
|
-
dialog:
|
|
1216
|
-
cyan:
|
|
1217
|
-
grey:
|
|
1218
|
-
red:
|
|
1219
|
-
dark:
|
|
1220
|
-
mono:
|
|
1190
|
+
const ca = "_gb_1l8j1_1", da = "_green_1l8j1_23", fa = "_dialog_1l8j1_31", ha = "_cyan_1l8j1_39", ma = "_grey_1l8j1_47", ya = "_red_1l8j1_55", ga = "_dark_1l8j1_71", wa = "_mono_1l8j1_79", jt = {
|
|
1191
|
+
gb: ca,
|
|
1192
|
+
green: da,
|
|
1193
|
+
dialog: fa,
|
|
1194
|
+
cyan: ha,
|
|
1195
|
+
grey: ma,
|
|
1196
|
+
red: ya,
|
|
1197
|
+
dark: ga,
|
|
1198
|
+
mono: wa
|
|
1221
1199
|
};
|
|
1222
|
-
function
|
|
1223
|
-
const e = E(
|
|
1200
|
+
function Ru(t) {
|
|
1201
|
+
const e = E(jt, t), n = He(), r = G(Ce);
|
|
1224
1202
|
return /* @__PURE__ */ u.jsxs("div", { children: [
|
|
1225
|
-
/* @__PURE__ */ u.jsx("label", { htmlFor: n, className: e.styles(
|
|
1203
|
+
/* @__PURE__ */ u.jsx("label", { htmlFor: n, className: e.styles(jt.gb), children: t.caption }),
|
|
1226
1204
|
/* @__PURE__ */ u.jsx(we, { context: r || void 0, disabled: t.disabled, children: /* @__PURE__ */ u.jsx(
|
|
1227
1205
|
"div",
|
|
1228
1206
|
{
|
|
1229
1207
|
id: n,
|
|
1230
|
-
className: e.styles(
|
|
1208
|
+
className: e.styles(jt.gb),
|
|
1231
1209
|
style: { width: t.width, height: t.height },
|
|
1232
1210
|
children: t.children
|
|
1233
1211
|
}
|
|
1234
1212
|
) })
|
|
1235
1213
|
] });
|
|
1236
1214
|
}
|
|
1237
|
-
const
|
|
1238
|
-
heading:
|
|
1239
|
-
blue:
|
|
1215
|
+
const va = "_heading_1jaeq_1", xa = "_blue_1jaeq_27", En = {
|
|
1216
|
+
heading: va,
|
|
1217
|
+
blue: xa
|
|
1240
1218
|
};
|
|
1241
|
-
function
|
|
1242
|
-
const e = E(
|
|
1243
|
-
return /* @__PURE__ */ u.jsx("h1", { className: e.styles(
|
|
1244
|
-
}
|
|
1245
|
-
const
|
|
1246
|
-
editable:
|
|
1247
|
-
pb:
|
|
1248
|
-
wrapper:
|
|
1249
|
-
value:
|
|
1250
|
-
editSpace:
|
|
1251
|
-
cursor:
|
|
1252
|
-
dialog:
|
|
1253
|
-
green:
|
|
1254
|
-
grey:
|
|
1255
|
-
mono:
|
|
1219
|
+
function Wu(t) {
|
|
1220
|
+
const e = E(En, t);
|
|
1221
|
+
return /* @__PURE__ */ u.jsx("h1", { className: e.styles(En.heading), children: t.children });
|
|
1222
|
+
}
|
|
1223
|
+
const ba = "_editable_1lfbo_1", ka = "_pb_1lfbo_9", _a = "_wrapper_1lfbo_9", Ta = "_value_1lfbo_31", Sa = "_editSpace_1lfbo_41", pa = "_cursor_1lfbo_55", Oa = "_dialog_1lfbo_77", Na = "_green_1lfbo_93", Ea = "_grey_1lfbo_109", Ma = "_mono_1lfbo_125", se = {
|
|
1224
|
+
editable: ba,
|
|
1225
|
+
pb: ka,
|
|
1226
|
+
wrapper: _a,
|
|
1227
|
+
value: Ta,
|
|
1228
|
+
editSpace: Sa,
|
|
1229
|
+
cursor: pa,
|
|
1230
|
+
dialog: Oa,
|
|
1231
|
+
green: Na,
|
|
1232
|
+
grey: Ea,
|
|
1233
|
+
mono: Ma
|
|
1256
1234
|
};
|
|
1257
|
-
function
|
|
1258
|
-
const [n, r] =
|
|
1235
|
+
function Ca(t, e) {
|
|
1236
|
+
const [n, r] = V(null), s = t.current && t.current.getBoundingClientRect(), i = ze(() => s && n && {
|
|
1259
1237
|
...n,
|
|
1260
1238
|
x: Ee.clamp(Math.round(n.x - s.x), 0, s.width),
|
|
1261
1239
|
y: Ee.clamp(Math.round(n.y - s.y), 0, s.height)
|
|
@@ -1277,7 +1255,7 @@ function Ma(t, e) {
|
|
|
1277
1255
|
};
|
|
1278
1256
|
}
|
|
1279
1257
|
function vr(t) {
|
|
1280
|
-
const e = E(se, t), n = J(null), r =
|
|
1258
|
+
const e = E(se, t), n = J(null), r = Ca(n, a), s = gt(t), i = s.value || "0";
|
|
1281
1259
|
return L(() => {
|
|
1282
1260
|
isNaN(Number(s.value)) && s.set("0");
|
|
1283
1261
|
}, [s.value]), /* @__PURE__ */ u.jsxs(
|
|
@@ -1329,8 +1307,8 @@ function vr(t) {
|
|
|
1329
1307
|
t.disabled || s.set("" + Math.round(l.x));
|
|
1330
1308
|
}
|
|
1331
1309
|
}
|
|
1332
|
-
function
|
|
1333
|
-
const [e, n] =
|
|
1310
|
+
function Da() {
|
|
1311
|
+
const [e, n] = V({ v: 90, dir: 1 });
|
|
1334
1312
|
return L(() => {
|
|
1335
1313
|
let s = !0;
|
|
1336
1314
|
return r(() => s), () => {
|
|
@@ -1352,23 +1330,23 @@ function Ca() {
|
|
|
1352
1330
|
}, 5);
|
|
1353
1331
|
}
|
|
1354
1332
|
}
|
|
1355
|
-
const
|
|
1356
|
-
nv:
|
|
1333
|
+
const ja = "_nv_hojc4_1", Ia = "_label_hojc4_9", Fa = "_value_hojc4_17", Va = "_blue_hojc4_25", Ra = "_green_hojc4_33", Wa = "_grey_hojc4_41", $a = "_dialog_hojc4_49", tt = {
|
|
1334
|
+
nv: ja,
|
|
1357
1335
|
label: Ia,
|
|
1358
1336
|
value: Fa,
|
|
1359
1337
|
blue: Va,
|
|
1360
|
-
green:
|
|
1361
|
-
grey:
|
|
1338
|
+
green: Ra,
|
|
1339
|
+
grey: Wa,
|
|
1362
1340
|
dialog: $a
|
|
1363
|
-
},
|
|
1341
|
+
}, La = {
|
|
1364
1342
|
wrapper: function(t, e, n) {
|
|
1365
1343
|
return e && (n === void 0 || n) ? e(t) : t;
|
|
1366
1344
|
}
|
|
1367
1345
|
};
|
|
1368
1346
|
function $u(t) {
|
|
1369
1347
|
return t.items ? /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
1370
|
-
t.items.map((e, n) => /* @__PURE__ */
|
|
1371
|
-
|
|
1348
|
+
t.items.map((e, n) => /* @__PURE__ */ ur(
|
|
1349
|
+
It,
|
|
1372
1350
|
{
|
|
1373
1351
|
...t,
|
|
1374
1352
|
name: e.name,
|
|
@@ -1377,10 +1355,10 @@ function $u(t) {
|
|
|
1377
1355
|
key: n
|
|
1378
1356
|
}
|
|
1379
1357
|
)),
|
|
1380
|
-
t.children && /* @__PURE__ */ u.jsx(
|
|
1381
|
-
] }) : /* @__PURE__ */ u.jsx(
|
|
1358
|
+
t.children && /* @__PURE__ */ u.jsx(It, { ...t })
|
|
1359
|
+
] }) : /* @__PURE__ */ u.jsx(It, { ...t });
|
|
1382
1360
|
}
|
|
1383
|
-
function
|
|
1361
|
+
function It(t) {
|
|
1384
1362
|
const e = E(tt, t);
|
|
1385
1363
|
return /* @__PURE__ */ u.jsxs(
|
|
1386
1364
|
"div",
|
|
@@ -1399,7 +1377,7 @@ function Ft(t) {
|
|
|
1399
1377
|
display: t.action ? "flex" : void 0,
|
|
1400
1378
|
gap: t.action ? "1em" : void 0
|
|
1401
1379
|
},
|
|
1402
|
-
children:
|
|
1380
|
+
children: La.wrapper(
|
|
1403
1381
|
t.children,
|
|
1404
1382
|
(n) => /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
1405
1383
|
/* @__PURE__ */ u.jsx("div", { style: { flexGrow: 1 }, children: n }),
|
|
@@ -1413,7 +1391,7 @@ function Ft(t) {
|
|
|
1413
1391
|
}
|
|
1414
1392
|
);
|
|
1415
1393
|
}
|
|
1416
|
-
function
|
|
1394
|
+
function Aa(t) {
|
|
1417
1395
|
const e = E(void 0, t), n = fr("opacity", 300), r = t.timeout ?? 2e3;
|
|
1418
1396
|
return L(() => {
|
|
1419
1397
|
let s = !0;
|
|
@@ -1433,7 +1411,7 @@ function La(t) {
|
|
|
1433
1411
|
transform: "translate(-50%, 0)"
|
|
1434
1412
|
},
|
|
1435
1413
|
children: /* @__PURE__ */ u.jsx(
|
|
1436
|
-
|
|
1414
|
+
q,
|
|
1437
1415
|
{
|
|
1438
1416
|
style: {
|
|
1439
1417
|
...n.get(),
|
|
@@ -1456,45 +1434,45 @@ function La(t) {
|
|
|
1456
1434
|
}
|
|
1457
1435
|
) });
|
|
1458
1436
|
}
|
|
1459
|
-
const
|
|
1460
|
-
rb:
|
|
1461
|
-
disabled:
|
|
1462
|
-
mono:
|
|
1463
|
-
dialog:
|
|
1464
|
-
green:
|
|
1437
|
+
const Pa = "_rb_khpw4_1", za = "_disabled_khpw4_51", Ua = "_mono_khpw4_75", Za = "_dialog_khpw4_91", qa = "_green_khpw4_107", nt = {
|
|
1438
|
+
rb: Pa,
|
|
1439
|
+
disabled: za,
|
|
1440
|
+
mono: Ua,
|
|
1441
|
+
dialog: Za,
|
|
1442
|
+
green: qa
|
|
1465
1443
|
};
|
|
1466
|
-
function
|
|
1467
|
-
const e =
|
|
1444
|
+
function Lu(t) {
|
|
1445
|
+
const e = He(), n = E(nt, t), r = J(null);
|
|
1468
1446
|
return wt(t, r), /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
1469
1447
|
/* @__PURE__ */ u.jsx("input", { ref: r, className: nt.rb, id: e, type: "radio", disabled: t.disabled }),
|
|
1470
1448
|
t.caption && /* @__PURE__ */ u.jsx("label", { className: n.styles(nt.rb, { [nt.disabled]: !!t.disabled }), htmlFor: e, children: t.caption })
|
|
1471
1449
|
] });
|
|
1472
1450
|
}
|
|
1473
|
-
const Ha = "
|
|
1451
|
+
const Ha = "_tb_232o0_1", Ya = "_hdr_232o0_21", Ba = "_ptr_232o0_51", Ga = "_alt_232o0_67", Ja = "_icon_232o0_83", Ka = "_iconR_232o0_93", Xa = "_blue_232o0_107", Qa = "_red_232o0_115", eo = "_green_232o0_125", to = "_dialog_232o0_135", te = {
|
|
1474
1452
|
tb: Ha,
|
|
1475
|
-
hdr:
|
|
1476
|
-
ptr:
|
|
1477
|
-
alt:
|
|
1478
|
-
icon:
|
|
1479
|
-
iconR:
|
|
1480
|
-
blue:
|
|
1481
|
-
red:
|
|
1482
|
-
green:
|
|
1483
|
-
dialog:
|
|
1453
|
+
hdr: Ya,
|
|
1454
|
+
ptr: Ba,
|
|
1455
|
+
alt: Ga,
|
|
1456
|
+
icon: Ja,
|
|
1457
|
+
iconR: Ka,
|
|
1458
|
+
blue: Xa,
|
|
1459
|
+
red: Qa,
|
|
1460
|
+
green: eo,
|
|
1461
|
+
dialog: to
|
|
1484
1462
|
};
|
|
1485
1463
|
class xe extends Error {
|
|
1486
1464
|
}
|
|
1487
|
-
class
|
|
1465
|
+
class no extends xe {
|
|
1488
1466
|
constructor(e) {
|
|
1489
1467
|
super(`Invalid DateTime: ${e.toMessage()}`);
|
|
1490
1468
|
}
|
|
1491
1469
|
}
|
|
1492
|
-
class
|
|
1470
|
+
class ro extends xe {
|
|
1493
1471
|
constructor(e) {
|
|
1494
1472
|
super(`Invalid Interval: ${e.toMessage()}`);
|
|
1495
1473
|
}
|
|
1496
1474
|
}
|
|
1497
|
-
class
|
|
1475
|
+
class so extends xe {
|
|
1498
1476
|
constructor(e) {
|
|
1499
1477
|
super(`Invalid Duration: ${e.toMessage()}`);
|
|
1500
1478
|
}
|
|
@@ -1506,14 +1484,14 @@ class xr extends xe {
|
|
|
1506
1484
|
super(`Invalid unit ${e}`);
|
|
1507
1485
|
}
|
|
1508
1486
|
}
|
|
1509
|
-
class
|
|
1487
|
+
class I extends xe {
|
|
1510
1488
|
}
|
|
1511
1489
|
class ie extends xe {
|
|
1512
1490
|
constructor() {
|
|
1513
1491
|
super("Zone is an abstract class");
|
|
1514
1492
|
}
|
|
1515
1493
|
}
|
|
1516
|
-
const h = "numeric", Y = "short",
|
|
1494
|
+
const h = "numeric", Y = "short", $ = "long", ft = {
|
|
1517
1495
|
year: h,
|
|
1518
1496
|
month: h,
|
|
1519
1497
|
day: h
|
|
@@ -1521,20 +1499,20 @@ const h = "numeric", Y = "short", W = "long", ft = {
|
|
|
1521
1499
|
year: h,
|
|
1522
1500
|
month: Y,
|
|
1523
1501
|
day: h
|
|
1524
|
-
},
|
|
1502
|
+
}, io = {
|
|
1525
1503
|
year: h,
|
|
1526
1504
|
month: Y,
|
|
1527
1505
|
day: h,
|
|
1528
1506
|
weekday: Y
|
|
1529
1507
|
}, kr = {
|
|
1530
1508
|
year: h,
|
|
1531
|
-
month:
|
|
1509
|
+
month: $,
|
|
1532
1510
|
day: h
|
|
1533
1511
|
}, _r = {
|
|
1534
1512
|
year: h,
|
|
1535
|
-
month:
|
|
1513
|
+
month: $,
|
|
1536
1514
|
day: h,
|
|
1537
|
-
weekday:
|
|
1515
|
+
weekday: $
|
|
1538
1516
|
}, Tr = {
|
|
1539
1517
|
hour: h,
|
|
1540
1518
|
minute: h
|
|
@@ -1551,7 +1529,7 @@ const h = "numeric", Y = "short", W = "long", ft = {
|
|
|
1551
1529
|
hour: h,
|
|
1552
1530
|
minute: h,
|
|
1553
1531
|
second: h,
|
|
1554
|
-
timeZoneName:
|
|
1532
|
+
timeZoneName: $
|
|
1555
1533
|
}, Nr = {
|
|
1556
1534
|
hour: h,
|
|
1557
1535
|
minute: h,
|
|
@@ -1572,72 +1550,72 @@ const h = "numeric", Y = "short", W = "long", ft = {
|
|
|
1572
1550
|
minute: h,
|
|
1573
1551
|
second: h,
|
|
1574
1552
|
hourCycle: "h23",
|
|
1575
|
-
timeZoneName:
|
|
1553
|
+
timeZoneName: $
|
|
1576
1554
|
}, Dr = {
|
|
1577
1555
|
year: h,
|
|
1578
1556
|
month: h,
|
|
1579
1557
|
day: h,
|
|
1580
1558
|
hour: h,
|
|
1581
1559
|
minute: h
|
|
1582
|
-
},
|
|
1560
|
+
}, jr = {
|
|
1583
1561
|
year: h,
|
|
1584
1562
|
month: h,
|
|
1585
1563
|
day: h,
|
|
1586
1564
|
hour: h,
|
|
1587
1565
|
minute: h,
|
|
1588
1566
|
second: h
|
|
1589
|
-
},
|
|
1567
|
+
}, Ir = {
|
|
1590
1568
|
year: h,
|
|
1591
1569
|
month: Y,
|
|
1592
1570
|
day: h,
|
|
1593
1571
|
hour: h,
|
|
1594
1572
|
minute: h
|
|
1595
|
-
},
|
|
1573
|
+
}, Fr = {
|
|
1596
1574
|
year: h,
|
|
1597
1575
|
month: Y,
|
|
1598
1576
|
day: h,
|
|
1599
1577
|
hour: h,
|
|
1600
1578
|
minute: h,
|
|
1601
1579
|
second: h
|
|
1602
|
-
},
|
|
1580
|
+
}, ao = {
|
|
1603
1581
|
year: h,
|
|
1604
1582
|
month: Y,
|
|
1605
1583
|
day: h,
|
|
1606
1584
|
weekday: Y,
|
|
1607
1585
|
hour: h,
|
|
1608
1586
|
minute: h
|
|
1609
|
-
},
|
|
1587
|
+
}, Vr = {
|
|
1610
1588
|
year: h,
|
|
1611
|
-
month:
|
|
1589
|
+
month: $,
|
|
1612
1590
|
day: h,
|
|
1613
1591
|
hour: h,
|
|
1614
1592
|
minute: h,
|
|
1615
1593
|
timeZoneName: Y
|
|
1616
1594
|
}, Rr = {
|
|
1617
1595
|
year: h,
|
|
1618
|
-
month:
|
|
1596
|
+
month: $,
|
|
1619
1597
|
day: h,
|
|
1620
1598
|
hour: h,
|
|
1621
1599
|
minute: h,
|
|
1622
1600
|
second: h,
|
|
1623
1601
|
timeZoneName: Y
|
|
1624
|
-
},
|
|
1602
|
+
}, Wr = {
|
|
1625
1603
|
year: h,
|
|
1626
|
-
month:
|
|
1604
|
+
month: $,
|
|
1627
1605
|
day: h,
|
|
1628
|
-
weekday:
|
|
1606
|
+
weekday: $,
|
|
1629
1607
|
hour: h,
|
|
1630
1608
|
minute: h,
|
|
1631
|
-
timeZoneName:
|
|
1632
|
-
},
|
|
1609
|
+
timeZoneName: $
|
|
1610
|
+
}, $r = {
|
|
1633
1611
|
year: h,
|
|
1634
|
-
month:
|
|
1612
|
+
month: $,
|
|
1635
1613
|
day: h,
|
|
1636
|
-
weekday:
|
|
1614
|
+
weekday: $,
|
|
1637
1615
|
hour: h,
|
|
1638
1616
|
minute: h,
|
|
1639
1617
|
second: h,
|
|
1640
|
-
timeZoneName:
|
|
1618
|
+
timeZoneName: $
|
|
1641
1619
|
};
|
|
1642
1620
|
class Ye {
|
|
1643
1621
|
/**
|
|
@@ -1723,14 +1701,14 @@ class Ye {
|
|
|
1723
1701
|
throw new ie();
|
|
1724
1702
|
}
|
|
1725
1703
|
}
|
|
1726
|
-
let
|
|
1704
|
+
let Ft = null;
|
|
1727
1705
|
class xt extends Ye {
|
|
1728
1706
|
/**
|
|
1729
1707
|
* Get a singleton instance of the local zone
|
|
1730
1708
|
* @return {SystemZone}
|
|
1731
1709
|
*/
|
|
1732
1710
|
static get instance() {
|
|
1733
|
-
return
|
|
1711
|
+
return Ft === null && (Ft = new xt()), Ft;
|
|
1734
1712
|
}
|
|
1735
1713
|
/** @override **/
|
|
1736
1714
|
get type() {
|
|
@@ -1766,7 +1744,7 @@ class xt extends Ye {
|
|
|
1766
1744
|
}
|
|
1767
1745
|
}
|
|
1768
1746
|
const Yt = /* @__PURE__ */ new Map();
|
|
1769
|
-
function
|
|
1747
|
+
function oo(t) {
|
|
1770
1748
|
let e = Yt.get(t);
|
|
1771
1749
|
return e === void 0 && (e = new Intl.DateTimeFormat("en-US", {
|
|
1772
1750
|
hour12: !1,
|
|
@@ -1780,7 +1758,7 @@ function ao(t) {
|
|
|
1780
1758
|
era: "short"
|
|
1781
1759
|
}), Yt.set(t, e)), e;
|
|
1782
1760
|
}
|
|
1783
|
-
const
|
|
1761
|
+
const lo = {
|
|
1784
1762
|
year: 0,
|
|
1785
1763
|
month: 1,
|
|
1786
1764
|
day: 2,
|
|
@@ -1789,34 +1767,34 @@ const oo = {
|
|
|
1789
1767
|
minute: 5,
|
|
1790
1768
|
second: 6
|
|
1791
1769
|
};
|
|
1792
|
-
function lo(t, e) {
|
|
1793
|
-
const n = t.format(e).replace(/\u200E/g, ""), r = /(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n), [, s, i, a, o, l, d, c] = r;
|
|
1794
|
-
return [a, s, i, o, l, d, c];
|
|
1795
|
-
}
|
|
1796
1770
|
function uo(t, e) {
|
|
1771
|
+
const n = t.format(e).replace(/\u200E/g, ""), r = /(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n), [, s, i, a, o, l, c, d] = r;
|
|
1772
|
+
return [a, s, i, o, l, c, d];
|
|
1773
|
+
}
|
|
1774
|
+
function co(t, e) {
|
|
1797
1775
|
const n = t.formatToParts(e), r = [];
|
|
1798
1776
|
for (let s = 0; s < n.length; s++) {
|
|
1799
|
-
const { type: i, value: a } = n[s], o =
|
|
1777
|
+
const { type: i, value: a } = n[s], o = lo[i];
|
|
1800
1778
|
i === "era" ? r[o] = a : v(o) || (r[o] = parseInt(a, 10));
|
|
1801
1779
|
}
|
|
1802
1780
|
return r;
|
|
1803
1781
|
}
|
|
1804
|
-
const
|
|
1782
|
+
const Vt = /* @__PURE__ */ new Map();
|
|
1805
1783
|
class ne extends Ye {
|
|
1806
1784
|
/**
|
|
1807
1785
|
* @param {string} name - Zone name
|
|
1808
1786
|
* @return {IANAZone}
|
|
1809
1787
|
*/
|
|
1810
1788
|
static create(e) {
|
|
1811
|
-
let n =
|
|
1812
|
-
return n === void 0 &&
|
|
1789
|
+
let n = Vt.get(e);
|
|
1790
|
+
return n === void 0 && Vt.set(e, n = new ne(e)), n;
|
|
1813
1791
|
}
|
|
1814
1792
|
/**
|
|
1815
1793
|
* Reset local caches. Should only be necessary in testing scenarios.
|
|
1816
1794
|
* @return {void}
|
|
1817
1795
|
*/
|
|
1818
1796
|
static resetCache() {
|
|
1819
|
-
|
|
1797
|
+
Vt.clear(), Yt.clear();
|
|
1820
1798
|
}
|
|
1821
1799
|
/**
|
|
1822
1800
|
* Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.
|
|
@@ -1907,16 +1885,16 @@ class ne extends Ye {
|
|
|
1907
1885
|
if (!this.valid) return NaN;
|
|
1908
1886
|
const n = new Date(e);
|
|
1909
1887
|
if (isNaN(n)) return NaN;
|
|
1910
|
-
const r =
|
|
1911
|
-
let [s, i, a, o, l,
|
|
1888
|
+
const r = oo(this.name);
|
|
1889
|
+
let [s, i, a, o, l, c, d] = r.formatToParts ? co(r, n) : uo(r, n);
|
|
1912
1890
|
o === "BC" && (s = -Math.abs(s) + 1);
|
|
1913
1891
|
const g = kt({
|
|
1914
1892
|
year: s,
|
|
1915
1893
|
month: i,
|
|
1916
1894
|
day: a,
|
|
1917
1895
|
hour: l === 24 ? 0 : l,
|
|
1918
|
-
minute:
|
|
1919
|
-
second:
|
|
1896
|
+
minute: c,
|
|
1897
|
+
second: d,
|
|
1920
1898
|
millisecond: 0
|
|
1921
1899
|
});
|
|
1922
1900
|
let y = +n;
|
|
@@ -1941,11 +1919,11 @@ class ne extends Ye {
|
|
|
1941
1919
|
return this.valid;
|
|
1942
1920
|
}
|
|
1943
1921
|
}
|
|
1944
|
-
let
|
|
1945
|
-
function
|
|
1922
|
+
let Mn = {};
|
|
1923
|
+
function fo(t, e = {}) {
|
|
1946
1924
|
const n = JSON.stringify([t, e]);
|
|
1947
|
-
let r =
|
|
1948
|
-
return r || (r = new Intl.ListFormat(t, e),
|
|
1925
|
+
let r = Mn[n];
|
|
1926
|
+
return r || (r = new Intl.ListFormat(t, e), Mn[n] = r), r;
|
|
1949
1927
|
}
|
|
1950
1928
|
const Bt = /* @__PURE__ */ new Map();
|
|
1951
1929
|
function Gt(t, e = {}) {
|
|
@@ -1954,20 +1932,20 @@ function Gt(t, e = {}) {
|
|
|
1954
1932
|
return r === void 0 && (r = new Intl.DateTimeFormat(t, e), Bt.set(n, r)), r;
|
|
1955
1933
|
}
|
|
1956
1934
|
const Jt = /* @__PURE__ */ new Map();
|
|
1957
|
-
function
|
|
1935
|
+
function ho(t, e = {}) {
|
|
1958
1936
|
const n = JSON.stringify([t, e]);
|
|
1959
1937
|
let r = Jt.get(n);
|
|
1960
1938
|
return r === void 0 && (r = new Intl.NumberFormat(t, e), Jt.set(n, r)), r;
|
|
1961
1939
|
}
|
|
1962
1940
|
const Kt = /* @__PURE__ */ new Map();
|
|
1963
|
-
function
|
|
1941
|
+
function mo(t, e = {}) {
|
|
1964
1942
|
const { base: n, ...r } = e, s = JSON.stringify([t, r]);
|
|
1965
1943
|
let i = Kt.get(s);
|
|
1966
1944
|
return i === void 0 && (i = new Intl.RelativeTimeFormat(t, e), Kt.set(s, i)), i;
|
|
1967
1945
|
}
|
|
1968
|
-
let
|
|
1969
|
-
function
|
|
1970
|
-
return
|
|
1946
|
+
let $e = null;
|
|
1947
|
+
function yo() {
|
|
1948
|
+
return $e || ($e = new Intl.DateTimeFormat().resolvedOptions().locale, $e);
|
|
1971
1949
|
}
|
|
1972
1950
|
const Xt = /* @__PURE__ */ new Map();
|
|
1973
1951
|
function Lr(t) {
|
|
@@ -1975,7 +1953,7 @@ function Lr(t) {
|
|
|
1975
1953
|
return e === void 0 && (e = new Intl.DateTimeFormat(t).resolvedOptions(), Xt.set(t, e)), e;
|
|
1976
1954
|
}
|
|
1977
1955
|
const Qt = /* @__PURE__ */ new Map();
|
|
1978
|
-
function
|
|
1956
|
+
function go(t) {
|
|
1979
1957
|
let e = Qt.get(t);
|
|
1980
1958
|
if (!e) {
|
|
1981
1959
|
const n = new Intl.Locale(t);
|
|
@@ -1983,7 +1961,7 @@ function yo(t) {
|
|
|
1983
1961
|
}
|
|
1984
1962
|
return e;
|
|
1985
1963
|
}
|
|
1986
|
-
function
|
|
1964
|
+
function wo(t) {
|
|
1987
1965
|
const e = t.indexOf("-x-");
|
|
1988
1966
|
e !== -1 && (t = t.substring(0, e));
|
|
1989
1967
|
const n = t.indexOf("-u-");
|
|
@@ -2001,10 +1979,10 @@ function go(t) {
|
|
|
2001
1979
|
return [s, i, a];
|
|
2002
1980
|
}
|
|
2003
1981
|
}
|
|
2004
|
-
function
|
|
1982
|
+
function vo(t, e, n) {
|
|
2005
1983
|
return (n || e) && (t.includes("-u-") || (t += "-u"), n && (t += `-ca-${n}`), e && (t += `-nu-${e}`)), t;
|
|
2006
1984
|
}
|
|
2007
|
-
function
|
|
1985
|
+
function xo(t) {
|
|
2008
1986
|
const e = [];
|
|
2009
1987
|
for (let n = 1; n <= 12; n++) {
|
|
2010
1988
|
const r = w.utc(2009, n, 1);
|
|
@@ -2012,7 +1990,7 @@ function vo(t) {
|
|
|
2012
1990
|
}
|
|
2013
1991
|
return e;
|
|
2014
1992
|
}
|
|
2015
|
-
function
|
|
1993
|
+
function bo(t) {
|
|
2016
1994
|
const e = [];
|
|
2017
1995
|
for (let n = 1; n <= 7; n++) {
|
|
2018
1996
|
const r = w.utc(2016, 11, 13 + n);
|
|
@@ -2024,16 +2002,16 @@ function rt(t, e, n, r) {
|
|
|
2024
2002
|
const s = t.listingMode();
|
|
2025
2003
|
return s === "error" ? null : s === "en" ? n(e) : r(e);
|
|
2026
2004
|
}
|
|
2027
|
-
function
|
|
2005
|
+
function ko(t) {
|
|
2028
2006
|
return t.numberingSystem && t.numberingSystem !== "latn" ? !1 : t.numberingSystem === "latn" || !t.locale || t.locale.startsWith("en") || Lr(t.locale).numberingSystem === "latn";
|
|
2029
2007
|
}
|
|
2030
|
-
class
|
|
2008
|
+
class _o {
|
|
2031
2009
|
constructor(e, n, r) {
|
|
2032
2010
|
this.padTo = r.padTo || 0, this.floor = r.floor || !1;
|
|
2033
2011
|
const { padTo: s, floor: i, ...a } = r;
|
|
2034
2012
|
if (!n || Object.keys(a).length > 0) {
|
|
2035
2013
|
const o = { useGrouping: !1, ...r };
|
|
2036
|
-
r.padTo > 0 && (o.minimumIntegerDigits = r.padTo), this.inf =
|
|
2014
|
+
r.padTo > 0 && (o.minimumIntegerDigits = r.padTo), this.inf = ho(e, o);
|
|
2037
2015
|
}
|
|
2038
2016
|
}
|
|
2039
2017
|
format(e) {
|
|
@@ -2041,12 +2019,12 @@ class ko {
|
|
|
2041
2019
|
const n = this.floor ? Math.floor(e) : e;
|
|
2042
2020
|
return this.inf.format(n);
|
|
2043
2021
|
} else {
|
|
2044
|
-
const n = this.floor ? Math.floor(e) :
|
|
2022
|
+
const n = this.floor ? Math.floor(e) : fn(e, 3);
|
|
2045
2023
|
return M(n, this.padTo);
|
|
2046
2024
|
}
|
|
2047
2025
|
}
|
|
2048
2026
|
}
|
|
2049
|
-
class
|
|
2027
|
+
class To {
|
|
2050
2028
|
constructor(e, n, r) {
|
|
2051
2029
|
this.opts = r, this.originalZone = void 0;
|
|
2052
2030
|
let s;
|
|
@@ -2082,9 +2060,9 @@ class _o {
|
|
|
2082
2060
|
return this.dtf.resolvedOptions();
|
|
2083
2061
|
}
|
|
2084
2062
|
}
|
|
2085
|
-
class
|
|
2063
|
+
class So {
|
|
2086
2064
|
constructor(e, n, r) {
|
|
2087
|
-
this.opts = { style: "long", ...r }, !n && Yr() && (this.rtf =
|
|
2065
|
+
this.opts = { style: "long", ...r }, !n && Yr() && (this.rtf = mo(e, r));
|
|
2088
2066
|
}
|
|
2089
2067
|
format(e, n) {
|
|
2090
2068
|
return this.rtf ? this.rtf.format(e, n) : Ho(n, e, this.opts.numeric, this.opts.style !== "long");
|
|
@@ -2109,21 +2087,21 @@ class T {
|
|
|
2109
2087
|
);
|
|
2110
2088
|
}
|
|
2111
2089
|
static create(e, n, r, s, i = !1) {
|
|
2112
|
-
const a = e || N.defaultLocale, o = a || (i ? "en-US" :
|
|
2113
|
-
return new T(o, l,
|
|
2090
|
+
const a = e || N.defaultLocale, o = a || (i ? "en-US" : yo()), l = n || N.defaultNumberingSystem, c = r || N.defaultOutputCalendar, d = tn(s) || N.defaultWeekSettings;
|
|
2091
|
+
return new T(o, l, c, d, a);
|
|
2114
2092
|
}
|
|
2115
2093
|
static resetCache() {
|
|
2116
|
-
|
|
2094
|
+
$e = null, Bt.clear(), Jt.clear(), Kt.clear(), Xt.clear(), Qt.clear();
|
|
2117
2095
|
}
|
|
2118
2096
|
static fromObject({ locale: e, numberingSystem: n, outputCalendar: r, weekSettings: s } = {}) {
|
|
2119
2097
|
return T.create(e, n, r, s);
|
|
2120
2098
|
}
|
|
2121
2099
|
constructor(e, n, r, s, i) {
|
|
2122
|
-
const [a, o, l] =
|
|
2123
|
-
this.locale = a, this.numberingSystem = n || o || null, this.outputCalendar = r || l || null, this.weekSettings = s, this.intl =
|
|
2100
|
+
const [a, o, l] = wo(e);
|
|
2101
|
+
this.locale = a, this.numberingSystem = n || o || null, this.outputCalendar = r || l || null, this.weekSettings = s, this.intl = vo(this.locale, this.numberingSystem, this.outputCalendar), this.weekdaysCache = { format: {}, standalone: {} }, this.monthsCache = { format: {}, standalone: {} }, this.meridiemCache = null, this.eraCache = {}, this.specifiedLocale = i, this.fastNumbersCached = null;
|
|
2124
2102
|
}
|
|
2125
2103
|
get fastNumbers() {
|
|
2126
|
-
return this.fastNumbersCached == null && (this.fastNumbersCached =
|
|
2104
|
+
return this.fastNumbersCached == null && (this.fastNumbersCached = ko(this)), this.fastNumbersCached;
|
|
2127
2105
|
}
|
|
2128
2106
|
listingMode() {
|
|
2129
2107
|
const e = this.isEnglish(), n = (this.numberingSystem === null || this.numberingSystem === "latn") && (this.outputCalendar === null || this.outputCalendar === "gregory");
|
|
@@ -2151,7 +2129,7 @@ class T {
|
|
|
2151
2129
|
const s = n ? { month: e, day: "numeric" } : { month: e }, i = n ? "format" : "standalone";
|
|
2152
2130
|
if (!this.monthsCache[i][e]) {
|
|
2153
2131
|
const a = r ? (o) => this.dtFormatter(o, s).format() : (o) => this.extract(o, s, "month");
|
|
2154
|
-
this.monthsCache[i][e] =
|
|
2132
|
+
this.monthsCache[i][e] = xo(a);
|
|
2155
2133
|
}
|
|
2156
2134
|
return this.monthsCache[i][e];
|
|
2157
2135
|
});
|
|
@@ -2159,7 +2137,7 @@ class T {
|
|
|
2159
2137
|
weekdays(e, n = !1) {
|
|
2160
2138
|
return rt(this, e, ts, () => {
|
|
2161
2139
|
const r = n ? { weekday: e, year: "numeric", month: "long", day: "numeric" } : { weekday: e }, s = n ? "format" : "standalone";
|
|
2162
|
-
return this.weekdaysCache[s][e] || (this.weekdaysCache[s][e] =
|
|
2140
|
+
return this.weekdaysCache[s][e] || (this.weekdaysCache[s][e] = bo(
|
|
2163
2141
|
(i) => this.extract(i, r, "weekday")
|
|
2164
2142
|
)), this.weekdaysCache[s][e];
|
|
2165
2143
|
});
|
|
@@ -2193,22 +2171,22 @@ class T {
|
|
|
2193
2171
|
return a ? a.value : null;
|
|
2194
2172
|
}
|
|
2195
2173
|
numberFormatter(e = {}) {
|
|
2196
|
-
return new
|
|
2174
|
+
return new _o(this.intl, e.forceSimple || this.fastNumbers, e);
|
|
2197
2175
|
}
|
|
2198
2176
|
dtFormatter(e, n = {}) {
|
|
2199
|
-
return new
|
|
2177
|
+
return new To(e, this.intl, n);
|
|
2200
2178
|
}
|
|
2201
2179
|
relFormatter(e = {}) {
|
|
2202
|
-
return new
|
|
2180
|
+
return new So(this.intl, this.isEnglish(), e);
|
|
2203
2181
|
}
|
|
2204
2182
|
listFormatter(e = {}) {
|
|
2205
|
-
return
|
|
2183
|
+
return fo(this.intl, e);
|
|
2206
2184
|
}
|
|
2207
2185
|
isEnglish() {
|
|
2208
2186
|
return this.locale === "en" || this.locale.toLowerCase() === "en-us" || Lr(this.intl).locale.startsWith("en-us");
|
|
2209
2187
|
}
|
|
2210
2188
|
getWeekSettings() {
|
|
2211
|
-
return this.weekSettings ? this.weekSettings : Br() ?
|
|
2189
|
+
return this.weekSettings ? this.weekSettings : Br() ? go(this.locale) : Ar;
|
|
2212
2190
|
}
|
|
2213
2191
|
getStartOfWeek() {
|
|
2214
2192
|
return this.getWeekSettings().firstDay;
|
|
@@ -2227,13 +2205,13 @@ class T {
|
|
|
2227
2205
|
}
|
|
2228
2206
|
}
|
|
2229
2207
|
let Rt = null;
|
|
2230
|
-
class
|
|
2208
|
+
class W extends Ye {
|
|
2231
2209
|
/**
|
|
2232
2210
|
* Get a singleton instance of UTC
|
|
2233
2211
|
* @return {FixedOffsetZone}
|
|
2234
2212
|
*/
|
|
2235
2213
|
static get utcInstance() {
|
|
2236
|
-
return Rt === null && (Rt = new
|
|
2214
|
+
return Rt === null && (Rt = new W(0)), Rt;
|
|
2237
2215
|
}
|
|
2238
2216
|
/**
|
|
2239
2217
|
* Get an instance with a specified offset
|
|
@@ -2241,7 +2219,7 @@ class R extends Ye {
|
|
|
2241
2219
|
* @return {FixedOffsetZone}
|
|
2242
2220
|
*/
|
|
2243
2221
|
static instance(e) {
|
|
2244
|
-
return e === 0 ?
|
|
2222
|
+
return e === 0 ? W.utcInstance : new W(e);
|
|
2245
2223
|
}
|
|
2246
2224
|
/**
|
|
2247
2225
|
* Get an instance of FixedOffsetZone from a UTC offset string, like "UTC+6"
|
|
@@ -2255,7 +2233,7 @@ class R extends Ye {
|
|
|
2255
2233
|
if (e) {
|
|
2256
2234
|
const n = e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);
|
|
2257
2235
|
if (n)
|
|
2258
|
-
return new
|
|
2236
|
+
return new W(_t(n[1], n[2]));
|
|
2259
2237
|
}
|
|
2260
2238
|
return null;
|
|
2261
2239
|
}
|
|
@@ -2346,7 +2324,7 @@ class R extends Ye {
|
|
|
2346
2324
|
return !0;
|
|
2347
2325
|
}
|
|
2348
2326
|
}
|
|
2349
|
-
class
|
|
2327
|
+
class po extends Ye {
|
|
2350
2328
|
constructor(e) {
|
|
2351
2329
|
super(), this.zoneName = e;
|
|
2352
2330
|
}
|
|
@@ -2388,12 +2366,12 @@ function oe(t, e) {
|
|
|
2388
2366
|
return e;
|
|
2389
2367
|
if (t instanceof Ye)
|
|
2390
2368
|
return t;
|
|
2391
|
-
if (
|
|
2369
|
+
if (Do(t)) {
|
|
2392
2370
|
const n = t.toLowerCase();
|
|
2393
|
-
return n === "default" ? e : n === "local" || n === "system" ? xt.instance : n === "utc" || n === "gmt" ?
|
|
2394
|
-
} else return le(t) ?
|
|
2371
|
+
return n === "default" ? e : n === "local" || n === "system" ? xt.instance : n === "utc" || n === "gmt" ? W.utcInstance : W.parseSpecifier(n) || ne.create(t);
|
|
2372
|
+
} else return le(t) ? W.instance(t) : typeof t == "object" && "offset" in t && typeof t.offset == "function" ? t : new po(t);
|
|
2395
2373
|
}
|
|
2396
|
-
const
|
|
2374
|
+
const ln = {
|
|
2397
2375
|
arab: "[٠-٩]",
|
|
2398
2376
|
arabext: "[۰-۹]",
|
|
2399
2377
|
bali: "[᭐-᭙]",
|
|
@@ -2415,7 +2393,7 @@ const on = {
|
|
|
2415
2393
|
thai: "[๐-๙]",
|
|
2416
2394
|
tibt: "[༠-༩]",
|
|
2417
2395
|
latn: "\\d"
|
|
2418
|
-
},
|
|
2396
|
+
}, Cn = {
|
|
2419
2397
|
arab: [1632, 1641],
|
|
2420
2398
|
arabext: [1776, 1785],
|
|
2421
2399
|
bali: [6992, 7001],
|
|
@@ -2435,18 +2413,18 @@ const on = {
|
|
|
2435
2413
|
telu: [3174, 3183],
|
|
2436
2414
|
thai: [3664, 3673],
|
|
2437
2415
|
tibt: [3872, 3881]
|
|
2438
|
-
},
|
|
2439
|
-
function
|
|
2416
|
+
}, Oo = ln.hanidec.replace(/[\[|\]]/g, "").split("");
|
|
2417
|
+
function No(t) {
|
|
2440
2418
|
let e = parseInt(t, 10);
|
|
2441
2419
|
if (isNaN(e)) {
|
|
2442
2420
|
e = "";
|
|
2443
2421
|
for (let n = 0; n < t.length; n++) {
|
|
2444
2422
|
const r = t.charCodeAt(n);
|
|
2445
|
-
if (t[n].search(
|
|
2446
|
-
e +=
|
|
2423
|
+
if (t[n].search(ln.hanidec) !== -1)
|
|
2424
|
+
e += Oo.indexOf(t[n]);
|
|
2447
2425
|
else
|
|
2448
|
-
for (const s in
|
|
2449
|
-
const [i, a] =
|
|
2426
|
+
for (const s in Cn) {
|
|
2427
|
+
const [i, a] = Cn[s];
|
|
2450
2428
|
r >= i && r <= a && (e += r - i);
|
|
2451
2429
|
}
|
|
2452
2430
|
}
|
|
@@ -2455,7 +2433,7 @@ function Oo(t) {
|
|
|
2455
2433
|
return e;
|
|
2456
2434
|
}
|
|
2457
2435
|
const en = /* @__PURE__ */ new Map();
|
|
2458
|
-
function
|
|
2436
|
+
function Eo() {
|
|
2459
2437
|
en.clear();
|
|
2460
2438
|
}
|
|
2461
2439
|
function U({ numberingSystem: t }, e = "") {
|
|
@@ -2463,16 +2441,16 @@ function U({ numberingSystem: t }, e = "") {
|
|
|
2463
2441
|
let r = en.get(n);
|
|
2464
2442
|
r === void 0 && (r = /* @__PURE__ */ new Map(), en.set(n, r));
|
|
2465
2443
|
let s = r.get(e);
|
|
2466
|
-
return s === void 0 && (s = new RegExp(`${
|
|
2444
|
+
return s === void 0 && (s = new RegExp(`${ln[n]}${e}`), r.set(e, s)), s;
|
|
2467
2445
|
}
|
|
2468
|
-
let
|
|
2446
|
+
let Dn = () => Date.now(), jn = "system", In = null, Fn = null, Vn = null, Rn = 60, Wn, $n = null;
|
|
2469
2447
|
class N {
|
|
2470
2448
|
/**
|
|
2471
2449
|
* Get the callback for returning the current timestamp.
|
|
2472
2450
|
* @type {function}
|
|
2473
2451
|
*/
|
|
2474
2452
|
static get now() {
|
|
2475
|
-
return
|
|
2453
|
+
return Dn;
|
|
2476
2454
|
}
|
|
2477
2455
|
/**
|
|
2478
2456
|
* Set the callback for returning the current timestamp.
|
|
@@ -2482,7 +2460,7 @@ class N {
|
|
|
2482
2460
|
* @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time
|
|
2483
2461
|
*/
|
|
2484
2462
|
static set now(e) {
|
|
2485
|
-
|
|
2463
|
+
Dn = e;
|
|
2486
2464
|
}
|
|
2487
2465
|
/**
|
|
2488
2466
|
* Set the default time zone to create DateTimes in. Does not affect existing instances.
|
|
@@ -2490,7 +2468,7 @@ class N {
|
|
|
2490
2468
|
* @type {string}
|
|
2491
2469
|
*/
|
|
2492
2470
|
static set defaultZone(e) {
|
|
2493
|
-
|
|
2471
|
+
jn = e;
|
|
2494
2472
|
}
|
|
2495
2473
|
/**
|
|
2496
2474
|
* Get the default time zone object currently used to create DateTimes. Does not affect existing instances.
|
|
@@ -2498,7 +2476,7 @@ class N {
|
|
|
2498
2476
|
* @type {Zone}
|
|
2499
2477
|
*/
|
|
2500
2478
|
static get defaultZone() {
|
|
2501
|
-
return oe(
|
|
2479
|
+
return oe(jn, xt.instance);
|
|
2502
2480
|
}
|
|
2503
2481
|
/**
|
|
2504
2482
|
* Get the default locale to create DateTimes with. Does not affect existing instances.
|
|
@@ -2569,7 +2547,7 @@ class N {
|
|
|
2569
2547
|
* @type {number}
|
|
2570
2548
|
*/
|
|
2571
2549
|
static get twoDigitCutoffYear() {
|
|
2572
|
-
return
|
|
2550
|
+
return Rn;
|
|
2573
2551
|
}
|
|
2574
2552
|
/**
|
|
2575
2553
|
* Set the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.
|
|
@@ -2581,31 +2559,31 @@ class N {
|
|
|
2581
2559
|
* @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50
|
|
2582
2560
|
*/
|
|
2583
2561
|
static set twoDigitCutoffYear(e) {
|
|
2584
|
-
|
|
2562
|
+
Rn = e % 100;
|
|
2585
2563
|
}
|
|
2586
2564
|
/**
|
|
2587
2565
|
* Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
|
|
2588
2566
|
* @type {boolean}
|
|
2589
2567
|
*/
|
|
2590
2568
|
static get throwOnInvalid() {
|
|
2591
|
-
return
|
|
2569
|
+
return Wn;
|
|
2592
2570
|
}
|
|
2593
2571
|
/**
|
|
2594
2572
|
* Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
|
|
2595
2573
|
* @type {boolean}
|
|
2596
2574
|
*/
|
|
2597
2575
|
static set throwOnInvalid(e) {
|
|
2598
|
-
|
|
2576
|
+
Wn = e;
|
|
2599
2577
|
}
|
|
2600
2578
|
/**
|
|
2601
2579
|
* Reset Luxon's global caches. Should only be necessary in testing scenarios.
|
|
2602
2580
|
* @return {void}
|
|
2603
2581
|
*/
|
|
2604
2582
|
static resetCaches() {
|
|
2605
|
-
T.resetCache(), ne.resetCache(), w.resetCache(),
|
|
2583
|
+
T.resetCache(), ne.resetCache(), w.resetCache(), Eo();
|
|
2606
2584
|
}
|
|
2607
2585
|
}
|
|
2608
|
-
class
|
|
2586
|
+
class H {
|
|
2609
2587
|
constructor(e, n) {
|
|
2610
2588
|
this.reason = e, this.explanation = n;
|
|
2611
2589
|
}
|
|
@@ -2615,12 +2593,12 @@ class q {
|
|
|
2615
2593
|
}
|
|
2616
2594
|
const Pr = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], zr = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];
|
|
2617
2595
|
function P(t, e) {
|
|
2618
|
-
return new
|
|
2596
|
+
return new H(
|
|
2619
2597
|
"unit out of range",
|
|
2620
2598
|
`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`
|
|
2621
2599
|
);
|
|
2622
2600
|
}
|
|
2623
|
-
function
|
|
2601
|
+
function un(t, e, n) {
|
|
2624
2602
|
const r = new Date(Date.UTC(t, e - 1, n));
|
|
2625
2603
|
t < 100 && t >= 0 && r.setUTCFullYear(r.getUTCFullYear() - 1900);
|
|
2626
2604
|
const s = r.getUTCDay();
|
|
@@ -2633,30 +2611,30 @@ function Zr(t, e) {
|
|
|
2633
2611
|
const n = Be(t) ? zr : Pr, r = n.findIndex((i) => i < e), s = e - n[r];
|
|
2634
2612
|
return { month: r + 1, day: s };
|
|
2635
2613
|
}
|
|
2636
|
-
function
|
|
2614
|
+
function cn(t, e) {
|
|
2637
2615
|
return (t - e + 7) % 7 + 1;
|
|
2638
2616
|
}
|
|
2639
2617
|
function ht(t, e = 4, n = 1) {
|
|
2640
|
-
const { year: r, month: s, day: i } = t, a = Ur(r, s, i), o = un(
|
|
2641
|
-
let l = Math.floor((a - o + 14 - e) / 7),
|
|
2642
|
-
return l < 1 ? (
|
|
2643
|
-
}
|
|
2644
|
-
function
|
|
2645
|
-
const { weekYear: r, weekNumber: s, weekday: i } = t, a = un(
|
|
2646
|
-
let l = s * 7 + i - a - 7 + e,
|
|
2647
|
-
l < 1 ? (
|
|
2648
|
-
const { month:
|
|
2649
|
-
return { year:
|
|
2650
|
-
}
|
|
2651
|
-
function
|
|
2618
|
+
const { year: r, month: s, day: i } = t, a = Ur(r, s, i), o = cn(un(r, s, i), n);
|
|
2619
|
+
let l = Math.floor((a - o + 14 - e) / 7), c;
|
|
2620
|
+
return l < 1 ? (c = r - 1, l = Ze(c, e, n)) : l > Ze(r, e, n) ? (c = r + 1, l = 1) : c = r, { weekYear: c, weekNumber: l, weekday: o, ...Tt(t) };
|
|
2621
|
+
}
|
|
2622
|
+
function Ln(t, e = 4, n = 1) {
|
|
2623
|
+
const { weekYear: r, weekNumber: s, weekday: i } = t, a = cn(un(r, 1, e), n), o = Oe(r);
|
|
2624
|
+
let l = s * 7 + i - a - 7 + e, c;
|
|
2625
|
+
l < 1 ? (c = r - 1, l += Oe(c)) : l > o ? (c = r + 1, l -= Oe(r)) : c = r;
|
|
2626
|
+
const { month: d, day: m } = Zr(c, l);
|
|
2627
|
+
return { year: c, month: d, day: m, ...Tt(t) };
|
|
2628
|
+
}
|
|
2629
|
+
function Wt(t) {
|
|
2652
2630
|
const { year: e, month: n, day: r } = t, s = Ur(e, n, r);
|
|
2653
2631
|
return { year: e, ordinal: s, ...Tt(t) };
|
|
2654
2632
|
}
|
|
2655
|
-
function
|
|
2633
|
+
function An(t) {
|
|
2656
2634
|
const { year: e, ordinal: n } = t, { month: r, day: s } = Zr(e, n);
|
|
2657
2635
|
return { year: e, month: r, day: s, ...Tt(t) };
|
|
2658
2636
|
}
|
|
2659
|
-
function
|
|
2637
|
+
function Pn(t, e) {
|
|
2660
2638
|
if (!v(t.localWeekday) || !v(t.localWeekNumber) || !v(t.localWeekYear)) {
|
|
2661
2639
|
if (!v(t.weekday) || !v(t.weekNumber) || !v(t.weekYear))
|
|
2662
2640
|
throw new pe(
|
|
@@ -2669,7 +2647,7 @@ function An(t, e) {
|
|
|
2669
2647
|
} else
|
|
2670
2648
|
return { minDaysInFirstWeek: 4, startOfWeek: 1 };
|
|
2671
2649
|
}
|
|
2672
|
-
function
|
|
2650
|
+
function Mo(t, e = 4, n = 1) {
|
|
2673
2651
|
const r = bt(t.weekYear), s = z(
|
|
2674
2652
|
t.weekNumber,
|
|
2675
2653
|
1,
|
|
@@ -2677,15 +2655,15 @@ function Eo(t, e = 4, n = 1) {
|
|
|
2677
2655
|
), i = z(t.weekday, 1, 7);
|
|
2678
2656
|
return r ? s ? i ? !1 : P("weekday", t.weekday) : P("week", t.weekNumber) : P("weekYear", t.weekYear);
|
|
2679
2657
|
}
|
|
2680
|
-
function
|
|
2658
|
+
function Co(t) {
|
|
2681
2659
|
const e = bt(t.year), n = z(t.ordinal, 1, Oe(t.year));
|
|
2682
2660
|
return e ? n ? !1 : P("ordinal", t.ordinal) : P("year", t.year);
|
|
2683
2661
|
}
|
|
2684
|
-
function
|
|
2662
|
+
function qr(t) {
|
|
2685
2663
|
const e = bt(t.year), n = z(t.month, 1, 12), r = z(t.day, 1, mt(t.year, t.month));
|
|
2686
2664
|
return e ? n ? r ? !1 : P("day", t.day) : P("month", t.month) : P("year", t.year);
|
|
2687
2665
|
}
|
|
2688
|
-
function
|
|
2666
|
+
function Hr(t) {
|
|
2689
2667
|
const { hour: e, minute: n, second: r, millisecond: s } = t, i = z(e, 0, 23) || e === 24 && n === 0 && r === 0 && s === 0, a = z(n, 0, 59), o = z(r, 0, 59), l = z(s, 0, 999);
|
|
2690
2668
|
return i ? a ? o ? l ? !1 : P("millisecond", s) : P("second", r) : P("minute", n) : P("hour", e);
|
|
2691
2669
|
}
|
|
@@ -2698,10 +2676,10 @@ function le(t) {
|
|
|
2698
2676
|
function bt(t) {
|
|
2699
2677
|
return typeof t == "number" && t % 1 === 0;
|
|
2700
2678
|
}
|
|
2701
|
-
function
|
|
2679
|
+
function Do(t) {
|
|
2702
2680
|
return typeof t == "string";
|
|
2703
2681
|
}
|
|
2704
|
-
function
|
|
2682
|
+
function jo(t) {
|
|
2705
2683
|
return Object.prototype.toString.call(t) === "[object Date]";
|
|
2706
2684
|
}
|
|
2707
2685
|
function Yr() {
|
|
@@ -2721,7 +2699,7 @@ function Br() {
|
|
|
2721
2699
|
function Io(t) {
|
|
2722
2700
|
return Array.isArray(t) ? t : [t];
|
|
2723
2701
|
}
|
|
2724
|
-
function
|
|
2702
|
+
function zn(t, e, n) {
|
|
2725
2703
|
if (t.length !== 0)
|
|
2726
2704
|
return t.reduce((r, s) => {
|
|
2727
2705
|
const i = [e(s), s];
|
|
@@ -2738,9 +2716,9 @@ function tn(t) {
|
|
|
2738
2716
|
if (t == null)
|
|
2739
2717
|
return null;
|
|
2740
2718
|
if (typeof t != "object")
|
|
2741
|
-
throw new
|
|
2719
|
+
throw new I("Week settings must be an object");
|
|
2742
2720
|
if (!z(t.firstDay, 1, 7) || !z(t.minimalDays, 1, 7) || !Array.isArray(t.weekend) || t.weekend.some((e) => !z(e, 1, 7)))
|
|
2743
|
-
throw new
|
|
2721
|
+
throw new I("Invalid week settings");
|
|
2744
2722
|
return {
|
|
2745
2723
|
firstDay: t.firstDay,
|
|
2746
2724
|
minimalDays: t.minimalDays,
|
|
@@ -2766,13 +2744,13 @@ function me(t) {
|
|
|
2766
2744
|
if (!(v(t) || t === null || t === ""))
|
|
2767
2745
|
return parseFloat(t);
|
|
2768
2746
|
}
|
|
2769
|
-
function
|
|
2747
|
+
function dn(t) {
|
|
2770
2748
|
if (!(v(t) || t === null || t === "")) {
|
|
2771
2749
|
const e = parseFloat("0." + t) * 1e3;
|
|
2772
2750
|
return Math.floor(e);
|
|
2773
2751
|
}
|
|
2774
2752
|
}
|
|
2775
|
-
function
|
|
2753
|
+
function fn(t, e, n = "round") {
|
|
2776
2754
|
const r = 10 ** e;
|
|
2777
2755
|
switch (n) {
|
|
2778
2756
|
case "expand":
|
|
@@ -2811,11 +2789,11 @@ function kt(t) {
|
|
|
2811
2789
|
);
|
|
2812
2790
|
return t.year < 100 && t.year >= 0 && (e = new Date(e), e.setUTCFullYear(t.year, t.month - 1, t.day)), +e;
|
|
2813
2791
|
}
|
|
2814
|
-
function
|
|
2815
|
-
return -un(
|
|
2792
|
+
function Un(t, e, n) {
|
|
2793
|
+
return -cn(un(t, 1, e), n) + e - 1;
|
|
2816
2794
|
}
|
|
2817
2795
|
function Ze(t, e = 4, n = 1) {
|
|
2818
|
-
const r =
|
|
2796
|
+
const r = Un(t, e, n), s = Un(t + 1, e, n);
|
|
2819
2797
|
return (Oe(t) - r + s) / 7;
|
|
2820
2798
|
}
|
|
2821
2799
|
function nn(t) {
|
|
@@ -2843,7 +2821,7 @@ function _t(t, e) {
|
|
|
2843
2821
|
function Jr(t) {
|
|
2844
2822
|
const e = Number(t);
|
|
2845
2823
|
if (typeof t == "boolean" || t === "" || !Number.isFinite(e))
|
|
2846
|
-
throw new
|
|
2824
|
+
throw new I(`Invalid unit value ${t}`);
|
|
2847
2825
|
return e;
|
|
2848
2826
|
}
|
|
2849
2827
|
function yt(t, e) {
|
|
@@ -2872,7 +2850,7 @@ function Pe(t, e) {
|
|
|
2872
2850
|
function Tt(t) {
|
|
2873
2851
|
return Fo(t, ["hour", "minute", "second", "millisecond"]);
|
|
2874
2852
|
}
|
|
2875
|
-
const
|
|
2853
|
+
const Ro = [
|
|
2876
2854
|
"January",
|
|
2877
2855
|
"February",
|
|
2878
2856
|
"March",
|
|
@@ -2898,15 +2876,15 @@ const jo = [
|
|
|
2898
2876
|
"Oct",
|
|
2899
2877
|
"Nov",
|
|
2900
2878
|
"Dec"
|
|
2901
|
-
],
|
|
2879
|
+
], Wo = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"];
|
|
2902
2880
|
function Xr(t) {
|
|
2903
2881
|
switch (t) {
|
|
2904
2882
|
case "narrow":
|
|
2905
|
-
return [...
|
|
2883
|
+
return [...Wo];
|
|
2906
2884
|
case "short":
|
|
2907
2885
|
return [...Kr];
|
|
2908
2886
|
case "long":
|
|
2909
|
-
return [...
|
|
2887
|
+
return [...Ro];
|
|
2910
2888
|
case "numeric":
|
|
2911
2889
|
return ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
|
|
2912
2890
|
case "2-digit":
|
|
@@ -2938,29 +2916,29 @@ function ts(t) {
|
|
|
2938
2916
|
return null;
|
|
2939
2917
|
}
|
|
2940
2918
|
}
|
|
2941
|
-
const ns = ["AM", "PM"],
|
|
2919
|
+
const ns = ["AM", "PM"], Lo = ["Before Christ", "Anno Domini"], Ao = ["BC", "AD"], Po = ["B", "A"];
|
|
2942
2920
|
function rs(t) {
|
|
2943
2921
|
switch (t) {
|
|
2944
2922
|
case "narrow":
|
|
2945
|
-
return [...
|
|
2923
|
+
return [...Po];
|
|
2946
2924
|
case "short":
|
|
2947
|
-
return [...
|
|
2925
|
+
return [...Ao];
|
|
2948
2926
|
case "long":
|
|
2949
|
-
return [...
|
|
2927
|
+
return [...Lo];
|
|
2950
2928
|
default:
|
|
2951
2929
|
return null;
|
|
2952
2930
|
}
|
|
2953
2931
|
}
|
|
2954
|
-
function
|
|
2932
|
+
function zo(t) {
|
|
2955
2933
|
return ns[t.hour < 12 ? 0 : 1];
|
|
2956
2934
|
}
|
|
2957
|
-
function
|
|
2935
|
+
function Uo(t, e) {
|
|
2958
2936
|
return ts(e)[t.weekday - 1];
|
|
2959
2937
|
}
|
|
2960
|
-
function
|
|
2938
|
+
function Zo(t, e) {
|
|
2961
2939
|
return Xr(e)[t.month - 1];
|
|
2962
2940
|
}
|
|
2963
|
-
function
|
|
2941
|
+
function qo(t, e) {
|
|
2964
2942
|
return rs(e)[t.year < 0 ? 0 : 1];
|
|
2965
2943
|
}
|
|
2966
2944
|
function Ho(t, e, n = "always", r = !1) {
|
|
@@ -2985,16 +2963,16 @@ function Ho(t, e, n = "always", r = !1) {
|
|
|
2985
2963
|
return m ? "today" : `this ${s[t][0]}`;
|
|
2986
2964
|
}
|
|
2987
2965
|
}
|
|
2988
|
-
const a = Object.is(e, -0) || e < 0, o = Math.abs(e), l = o === 1,
|
|
2989
|
-
return a ? `${o} ${
|
|
2966
|
+
const a = Object.is(e, -0) || e < 0, o = Math.abs(e), l = o === 1, c = s[t], d = r ? l ? c[1] : c[2] || c[1] : l ? s[t][0] : t;
|
|
2967
|
+
return a ? `${o} ${d} ago` : `in ${o} ${d}`;
|
|
2990
2968
|
}
|
|
2991
|
-
function
|
|
2969
|
+
function Zn(t, e) {
|
|
2992
2970
|
let n = "";
|
|
2993
2971
|
for (const r of t)
|
|
2994
2972
|
r.literal ? n += r.val : n += e(r.val);
|
|
2995
2973
|
return n;
|
|
2996
2974
|
}
|
|
2997
|
-
const
|
|
2975
|
+
const Yo = {
|
|
2998
2976
|
D: ft,
|
|
2999
2977
|
DD: br,
|
|
3000
2978
|
DDD: kr,
|
|
@@ -3008,17 +2986,17 @@ const qo = {
|
|
|
3008
2986
|
TTT: Mr,
|
|
3009
2987
|
TTTT: Cr,
|
|
3010
2988
|
f: Dr,
|
|
3011
|
-
ff:
|
|
3012
|
-
fff:
|
|
3013
|
-
ffff:
|
|
3014
|
-
F:
|
|
3015
|
-
FF:
|
|
2989
|
+
ff: Ir,
|
|
2990
|
+
fff: Vr,
|
|
2991
|
+
ffff: Wr,
|
|
2992
|
+
F: jr,
|
|
2993
|
+
FF: Fr,
|
|
3016
2994
|
FFF: Rr,
|
|
3017
|
-
FFFF:
|
|
2995
|
+
FFFF: $r
|
|
3018
2996
|
};
|
|
3019
|
-
class
|
|
2997
|
+
class F {
|
|
3020
2998
|
static create(e, n = {}) {
|
|
3021
|
-
return new
|
|
2999
|
+
return new F(e, n);
|
|
3022
3000
|
}
|
|
3023
3001
|
static parseFormat(e) {
|
|
3024
3002
|
let n = null, r = "", s = !1;
|
|
@@ -3033,7 +3011,7 @@ class V {
|
|
|
3033
3011
|
return r.length > 0 && i.push({ literal: s || /^\s+$/.test(r), val: r }), i;
|
|
3034
3012
|
}
|
|
3035
3013
|
static macroTokenToFormatOpts(e) {
|
|
3036
|
-
return
|
|
3014
|
+
return Yo[e];
|
|
3037
3015
|
}
|
|
3038
3016
|
constructor(e, n) {
|
|
3039
3017
|
this.opts = n, this.loc = e, this.systemLoc = null;
|
|
@@ -3063,13 +3041,13 @@ class V {
|
|
|
3063
3041
|
return n > 0 && (s.padTo = n), r && (s.signDisplay = r), this.loc.numberFormatter(s).format(e);
|
|
3064
3042
|
}
|
|
3065
3043
|
formatDateTimeFromString(e, n) {
|
|
3066
|
-
const r = this.loc.listingMode() === "en", s = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", i = (y, S) => this.loc.extract(e, y, S), a = (y) => e.isOffsetFixed && e.offset === 0 && y.allowZ ? "Z" : e.isValid ? e.zone.formatOffset(e.ts, y.format) : "", o = () => r ?
|
|
3044
|
+
const r = this.loc.listingMode() === "en", s = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", i = (y, S) => this.loc.extract(e, y, S), a = (y) => e.isOffsetFixed && e.offset === 0 && y.allowZ ? "Z" : e.isValid ? e.zone.formatOffset(e.ts, y.format) : "", o = () => r ? zo(e) : i({ hour: "numeric", hourCycle: "h12" }, "dayperiod"), l = (y, S) => r ? Zo(e, y) : i(S ? { month: y } : { month: y, day: "numeric" }, "month"), c = (y, S) => r ? Uo(e, y) : i(
|
|
3067
3045
|
S ? { weekday: y } : { weekday: y, month: "long", day: "numeric" },
|
|
3068
3046
|
"weekday"
|
|
3069
|
-
),
|
|
3070
|
-
const S =
|
|
3047
|
+
), d = (y) => {
|
|
3048
|
+
const S = F.macroTokenToFormatOpts(y);
|
|
3071
3049
|
return S ? this.formatWithSystemDefault(e, S) : y;
|
|
3072
|
-
}, m = (y) => r ?
|
|
3050
|
+
}, m = (y) => r ? qo(e, y) : i({ era: y }, "era"), g = (y) => {
|
|
3073
3051
|
switch (y) {
|
|
3074
3052
|
// ms
|
|
3075
3053
|
case "S":
|
|
@@ -3128,20 +3106,20 @@ class V {
|
|
|
3128
3106
|
case "c":
|
|
3129
3107
|
return this.num(e.weekday);
|
|
3130
3108
|
case "ccc":
|
|
3131
|
-
return
|
|
3109
|
+
return c("short", !0);
|
|
3132
3110
|
case "cccc":
|
|
3133
|
-
return
|
|
3111
|
+
return c("long", !0);
|
|
3134
3112
|
case "ccccc":
|
|
3135
|
-
return
|
|
3113
|
+
return c("narrow", !0);
|
|
3136
3114
|
// weekdays - format
|
|
3137
3115
|
case "E":
|
|
3138
3116
|
return this.num(e.weekday);
|
|
3139
3117
|
case "EEE":
|
|
3140
|
-
return
|
|
3118
|
+
return c("short", !1);
|
|
3141
3119
|
case "EEEE":
|
|
3142
|
-
return
|
|
3120
|
+
return c("long", !1);
|
|
3143
3121
|
case "EEEEE":
|
|
3144
|
-
return
|
|
3122
|
+
return c("narrow", !1);
|
|
3145
3123
|
// months - standalone
|
|
3146
3124
|
case "L":
|
|
3147
3125
|
return s ? i({ month: "numeric", day: "numeric" }, "month") : this.num(e.month);
|
|
@@ -3209,14 +3187,14 @@ class V {
|
|
|
3209
3187
|
case "x":
|
|
3210
3188
|
return this.num(e.ts);
|
|
3211
3189
|
default:
|
|
3212
|
-
return
|
|
3190
|
+
return d(y);
|
|
3213
3191
|
}
|
|
3214
3192
|
};
|
|
3215
|
-
return
|
|
3193
|
+
return Zn(F.parseFormat(n), g);
|
|
3216
3194
|
}
|
|
3217
3195
|
formatDurationFromString(e, n) {
|
|
3218
|
-
const r = this.opts.signMode === "negativeLargestOnly" ? -1 : 1, s = (
|
|
3219
|
-
switch (
|
|
3196
|
+
const r = this.opts.signMode === "negativeLargestOnly" ? -1 : 1, s = (d) => {
|
|
3197
|
+
switch (d[0]) {
|
|
3220
3198
|
case "S":
|
|
3221
3199
|
return "milliseconds";
|
|
3222
3200
|
case "s":
|
|
@@ -3236,24 +3214,24 @@ class V {
|
|
|
3236
3214
|
default:
|
|
3237
3215
|
return null;
|
|
3238
3216
|
}
|
|
3239
|
-
}, i = (
|
|
3217
|
+
}, i = (d, m) => (g) => {
|
|
3240
3218
|
const y = s(g);
|
|
3241
3219
|
if (y) {
|
|
3242
3220
|
const S = m.isNegativeDuration && y !== m.largestUnit ? r : 1;
|
|
3243
|
-
let
|
|
3244
|
-
return this.opts.signMode === "negativeLargestOnly" && y !== m.largestUnit ?
|
|
3221
|
+
let R;
|
|
3222
|
+
return this.opts.signMode === "negativeLargestOnly" && y !== m.largestUnit ? R = "never" : this.opts.signMode === "all" ? R = "always" : R = "auto", this.num(d.get(y) * S, g.length, R);
|
|
3245
3223
|
} else
|
|
3246
3224
|
return g;
|
|
3247
|
-
}, a =
|
|
3248
|
-
(
|
|
3225
|
+
}, a = F.parseFormat(n), o = a.reduce(
|
|
3226
|
+
(d, { literal: m, val: g }) => m ? d : d.concat(g),
|
|
3249
3227
|
[]
|
|
3250
|
-
), l = e.shiftTo(...o.map(s).filter((
|
|
3228
|
+
), l = e.shiftTo(...o.map(s).filter((d) => d)), c = {
|
|
3251
3229
|
isNegativeDuration: l < 0,
|
|
3252
3230
|
// this relies on "collapsed" being based on "shiftTo", which builds up the object
|
|
3253
3231
|
// in order
|
|
3254
3232
|
largestUnit: Object.keys(l.values)[0]
|
|
3255
3233
|
};
|
|
3256
|
-
return
|
|
3234
|
+
return Zn(a, i(l, c));
|
|
3257
3235
|
}
|
|
3258
3236
|
}
|
|
3259
3237
|
const ss = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;
|
|
@@ -3261,7 +3239,7 @@ function De(...t) {
|
|
|
3261
3239
|
const e = t.reduce((n, r) => n + r.source, "");
|
|
3262
3240
|
return RegExp(`^${e}$`);
|
|
3263
3241
|
}
|
|
3264
|
-
function
|
|
3242
|
+
function je(...t) {
|
|
3265
3243
|
return (e) => t.reduce(
|
|
3266
3244
|
([n, r, s], i) => {
|
|
3267
3245
|
const [a, o, l] = i(e, s);
|
|
@@ -3270,7 +3248,7 @@ function Ie(...t) {
|
|
|
3270
3248
|
[{}, null, 1]
|
|
3271
3249
|
).slice(0, 2);
|
|
3272
3250
|
}
|
|
3273
|
-
function
|
|
3251
|
+
function Ie(t, ...e) {
|
|
3274
3252
|
if (t == null)
|
|
3275
3253
|
return [null, null];
|
|
3276
3254
|
for (const [n, r] of e) {
|
|
@@ -3289,39 +3267,39 @@ function is(...t) {
|
|
|
3289
3267
|
return [r, null, n + s];
|
|
3290
3268
|
};
|
|
3291
3269
|
}
|
|
3292
|
-
const as = /(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,
|
|
3293
|
-
`${
|
|
3294
|
-
),
|
|
3270
|
+
const as = /(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/, Bo = `(?:${as.source}?(?:\\[(${ss.source})\\])?)?`, hn = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, os = RegExp(`${hn.source}${Bo}`), mn = RegExp(`(?:[Tt]${os.source})?`), Go = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, Jo = /(\d{4})-?W(\d\d)(?:-?(\d))?/, Ko = /(\d{4})-?(\d{3})/, Xo = is("weekYear", "weekNumber", "weekDay"), Qo = is("year", "ordinal"), el = /(\d{4})-(\d\d)-(\d\d)/, ls = RegExp(
|
|
3271
|
+
`${hn.source} ?(?:${as.source}|(${ss.source}))?`
|
|
3272
|
+
), tl = RegExp(`(?: ${ls.source})?`);
|
|
3295
3273
|
function Ne(t, e, n) {
|
|
3296
3274
|
const r = t[e];
|
|
3297
3275
|
return v(r) ? n : ae(r);
|
|
3298
3276
|
}
|
|
3299
|
-
function
|
|
3277
|
+
function nl(t, e) {
|
|
3300
3278
|
return [{
|
|
3301
3279
|
year: Ne(t, e),
|
|
3302
3280
|
month: Ne(t, e + 1, 1),
|
|
3303
3281
|
day: Ne(t, e + 2, 1)
|
|
3304
3282
|
}, null, e + 3];
|
|
3305
3283
|
}
|
|
3306
|
-
function
|
|
3284
|
+
function Fe(t, e) {
|
|
3307
3285
|
return [{
|
|
3308
3286
|
hours: Ne(t, e, 0),
|
|
3309
3287
|
minutes: Ne(t, e + 1, 0),
|
|
3310
3288
|
seconds: Ne(t, e + 2, 0),
|
|
3311
|
-
milliseconds:
|
|
3289
|
+
milliseconds: dn(t[e + 3])
|
|
3312
3290
|
}, null, e + 4];
|
|
3313
3291
|
}
|
|
3314
3292
|
function Ge(t, e) {
|
|
3315
|
-
const n = !t[e] && !t[e + 1], r = _t(t[e + 1], t[e + 2]), s = n ? null :
|
|
3293
|
+
const n = !t[e] && !t[e + 1], r = _t(t[e + 1], t[e + 2]), s = n ? null : W.instance(r);
|
|
3316
3294
|
return [{}, s, e + 3];
|
|
3317
3295
|
}
|
|
3318
3296
|
function Je(t, e) {
|
|
3319
3297
|
const n = t[e] ? ne.create(t[e]) : null;
|
|
3320
3298
|
return [{}, n, e + 1];
|
|
3321
3299
|
}
|
|
3322
|
-
const
|
|
3323
|
-
function
|
|
3324
|
-
const [e, n, r, s, i, a, o, l,
|
|
3300
|
+
const rl = RegExp(`^T?${hn.source}$`), sl = /^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;
|
|
3301
|
+
function il(t) {
|
|
3302
|
+
const [e, n, r, s, i, a, o, l, c] = t, d = e[0] === "-", m = l && l[0] === "-", g = (y, S = !1) => y !== void 0 && (S || y && d) ? -y : y;
|
|
3325
3303
|
return [
|
|
3326
3304
|
{
|
|
3327
3305
|
years: g(me(n)),
|
|
@@ -3331,11 +3309,11 @@ function sl(t) {
|
|
|
3331
3309
|
hours: g(me(a)),
|
|
3332
3310
|
minutes: g(me(o)),
|
|
3333
3311
|
seconds: g(me(l), l === "-0"),
|
|
3334
|
-
milliseconds: g(
|
|
3312
|
+
milliseconds: g(dn(c), m)
|
|
3335
3313
|
}
|
|
3336
3314
|
];
|
|
3337
3315
|
}
|
|
3338
|
-
const
|
|
3316
|
+
const al = {
|
|
3339
3317
|
GMT: 0,
|
|
3340
3318
|
EDT: -240,
|
|
3341
3319
|
EST: -300,
|
|
@@ -3346,7 +3324,7 @@ const il = {
|
|
|
3346
3324
|
PDT: -420,
|
|
3347
3325
|
PST: -480
|
|
3348
3326
|
};
|
|
3349
|
-
function
|
|
3327
|
+
function yn(t, e, n, r, s, i, a) {
|
|
3350
3328
|
const o = {
|
|
3351
3329
|
year: e.length === 2 ? nn(ae(e)) : ae(e),
|
|
3352
3330
|
month: Kr.indexOf(n) + 1,
|
|
@@ -3356,8 +3334,8 @@ function mn(t, e, n, r, s, i, a) {
|
|
|
3356
3334
|
};
|
|
3357
3335
|
return a && (o.second = ae(a)), t && (o.weekday = t.length > 3 ? Qr.indexOf(t) + 1 : es.indexOf(t) + 1), o;
|
|
3358
3336
|
}
|
|
3359
|
-
const
|
|
3360
|
-
function
|
|
3337
|
+
const ol = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;
|
|
3338
|
+
function ll(t) {
|
|
3361
3339
|
const [
|
|
3362
3340
|
,
|
|
3363
3341
|
e,
|
|
@@ -3368,82 +3346,82 @@ function ol(t) {
|
|
|
3368
3346
|
a,
|
|
3369
3347
|
o,
|
|
3370
3348
|
l,
|
|
3371
|
-
d,
|
|
3372
3349
|
c,
|
|
3350
|
+
d,
|
|
3373
3351
|
m
|
|
3374
|
-
] = t, g =
|
|
3352
|
+
] = t, g = yn(e, s, r, n, i, a, o);
|
|
3375
3353
|
let y;
|
|
3376
|
-
return l ? y =
|
|
3354
|
+
return l ? y = al[l] : c ? y = 0 : y = _t(d, m), [g, new W(y)];
|
|
3377
3355
|
}
|
|
3378
|
-
function
|
|
3356
|
+
function ul(t) {
|
|
3379
3357
|
return t.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim();
|
|
3380
3358
|
}
|
|
3381
|
-
const
|
|
3382
|
-
function
|
|
3359
|
+
const cl = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/, dl = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/, fl = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;
|
|
3360
|
+
function qn(t) {
|
|
3383
3361
|
const [, e, n, r, s, i, a, o] = t;
|
|
3384
|
-
return [
|
|
3362
|
+
return [yn(e, s, r, n, i, a, o), W.utcInstance];
|
|
3385
3363
|
}
|
|
3386
|
-
function
|
|
3364
|
+
function hl(t) {
|
|
3387
3365
|
const [, e, n, r, s, i, a, o] = t;
|
|
3388
|
-
return [
|
|
3366
|
+
return [yn(e, o, n, r, s, i, a), W.utcInstance];
|
|
3389
3367
|
}
|
|
3390
|
-
const
|
|
3391
|
-
|
|
3392
|
-
|
|
3368
|
+
const ml = De(Go, mn), yl = De(Jo, mn), gl = De(Ko, mn), wl = De(os), us = je(
|
|
3369
|
+
nl,
|
|
3370
|
+
Fe,
|
|
3393
3371
|
Ge,
|
|
3394
3372
|
Je
|
|
3395
|
-
),
|
|
3396
|
-
|
|
3397
|
-
|
|
3373
|
+
), vl = je(
|
|
3374
|
+
Xo,
|
|
3375
|
+
Fe,
|
|
3398
3376
|
Ge,
|
|
3399
3377
|
Je
|
|
3400
|
-
),
|
|
3401
|
-
|
|
3402
|
-
|
|
3378
|
+
), xl = je(
|
|
3379
|
+
Qo,
|
|
3380
|
+
Fe,
|
|
3403
3381
|
Ge,
|
|
3404
3382
|
Je
|
|
3405
|
-
),
|
|
3406
|
-
|
|
3383
|
+
), bl = je(
|
|
3384
|
+
Fe,
|
|
3407
3385
|
Ge,
|
|
3408
3386
|
Je
|
|
3409
3387
|
);
|
|
3410
|
-
function
|
|
3411
|
-
return
|
|
3388
|
+
function kl(t) {
|
|
3389
|
+
return Ie(
|
|
3412
3390
|
t,
|
|
3413
|
-
[
|
|
3414
|
-
[ml, wl],
|
|
3391
|
+
[ml, us],
|
|
3415
3392
|
[yl, vl],
|
|
3416
|
-
[gl, xl]
|
|
3393
|
+
[gl, xl],
|
|
3394
|
+
[wl, bl]
|
|
3417
3395
|
);
|
|
3418
3396
|
}
|
|
3419
|
-
function kl(t) {
|
|
3420
|
-
return Fe(ll(t), [al, ol]);
|
|
3421
|
-
}
|
|
3422
3397
|
function _l(t) {
|
|
3423
|
-
return
|
|
3398
|
+
return Ie(ul(t), [ol, ll]);
|
|
3399
|
+
}
|
|
3400
|
+
function Tl(t) {
|
|
3401
|
+
return Ie(
|
|
3424
3402
|
t,
|
|
3425
|
-
[
|
|
3426
|
-
[
|
|
3427
|
-
[
|
|
3403
|
+
[cl, qn],
|
|
3404
|
+
[dl, qn],
|
|
3405
|
+
[fl, hl]
|
|
3428
3406
|
);
|
|
3429
3407
|
}
|
|
3430
|
-
function
|
|
3431
|
-
return
|
|
3408
|
+
function Sl(t) {
|
|
3409
|
+
return Ie(t, [sl, il]);
|
|
3432
3410
|
}
|
|
3433
|
-
const
|
|
3434
|
-
function
|
|
3435
|
-
return
|
|
3411
|
+
const pl = je(Fe);
|
|
3412
|
+
function Ol(t) {
|
|
3413
|
+
return Ie(t, [rl, pl]);
|
|
3436
3414
|
}
|
|
3437
|
-
const
|
|
3438
|
-
|
|
3415
|
+
const Nl = De(el, tl), El = De(ls), Ml = je(
|
|
3416
|
+
Fe,
|
|
3439
3417
|
Ge,
|
|
3440
3418
|
Je
|
|
3441
3419
|
);
|
|
3442
|
-
function
|
|
3443
|
-
return
|
|
3420
|
+
function Cl(t) {
|
|
3421
|
+
return Ie(
|
|
3444
3422
|
t,
|
|
3445
|
-
[
|
|
3446
|
-
[
|
|
3423
|
+
[Nl, us],
|
|
3424
|
+
[El, Ml]
|
|
3447
3425
|
);
|
|
3448
3426
|
}
|
|
3449
3427
|
const Hn = "Invalid Duration", cs = {
|
|
@@ -3463,7 +3441,7 @@ const Hn = "Invalid Duration", cs = {
|
|
|
3463
3441
|
hours: { minutes: 60, seconds: 3600, milliseconds: 3600 * 1e3 },
|
|
3464
3442
|
minutes: { seconds: 60, milliseconds: 60 * 1e3 },
|
|
3465
3443
|
seconds: { milliseconds: 1e3 }
|
|
3466
|
-
},
|
|
3444
|
+
}, Dl = {
|
|
3467
3445
|
years: {
|
|
3468
3446
|
quarters: 4,
|
|
3469
3447
|
months: 12,
|
|
@@ -3492,7 +3470,7 @@ const Hn = "Invalid Duration", cs = {
|
|
|
3492
3470
|
milliseconds: 720 * 60 * 60 * 1e3
|
|
3493
3471
|
},
|
|
3494
3472
|
...cs
|
|
3495
|
-
}, A = 146097 / 400, _e = 146097 / 4800,
|
|
3473
|
+
}, A = 146097 / 400, _e = 146097 / 4800, jl = {
|
|
3496
3474
|
years: {
|
|
3497
3475
|
quarters: 4,
|
|
3498
3476
|
months: 12,
|
|
@@ -3547,7 +3525,7 @@ function ds(t, e) {
|
|
|
3547
3525
|
e[r] && (n += e[r] * t[r].milliseconds);
|
|
3548
3526
|
return n;
|
|
3549
3527
|
}
|
|
3550
|
-
function
|
|
3528
|
+
function Yn(t, e) {
|
|
3551
3529
|
const n = ds(t, e) < 0 ? -1 : 1;
|
|
3552
3530
|
ge.reduceRight((r, s) => {
|
|
3553
3531
|
if (v(e[s]))
|
|
@@ -3567,7 +3545,7 @@ function qn(t, e) {
|
|
|
3567
3545
|
return s;
|
|
3568
3546
|
}, null);
|
|
3569
3547
|
}
|
|
3570
|
-
function
|
|
3548
|
+
function Bn(t) {
|
|
3571
3549
|
const e = {};
|
|
3572
3550
|
for (const [n, r] of Object.entries(t))
|
|
3573
3551
|
r !== 0 && (e[n] = r);
|
|
@@ -3579,7 +3557,7 @@ class k {
|
|
|
3579
3557
|
*/
|
|
3580
3558
|
constructor(e) {
|
|
3581
3559
|
const n = e.conversionAccuracy === "longterm" || !1;
|
|
3582
|
-
let r = n ?
|
|
3560
|
+
let r = n ? jl : Dl;
|
|
3583
3561
|
e.matrix && (r = e.matrix), this.values = e.values, this.loc = e.loc || T.create(), this.conversionAccuracy = n ? "longterm" : "casual", this.invalid = e.invalid || null, this.matrix = r, this.isLuxonDuration = !0;
|
|
3584
3562
|
}
|
|
3585
3563
|
/**
|
|
@@ -3616,7 +3594,7 @@ class k {
|
|
|
3616
3594
|
*/
|
|
3617
3595
|
static fromObject(e, n = {}) {
|
|
3618
3596
|
if (e == null || typeof e != "object")
|
|
3619
|
-
throw new
|
|
3597
|
+
throw new I(
|
|
3620
3598
|
`Duration.fromObject: argument expected to be an object, got ${e === null ? "null" : typeof e}`
|
|
3621
3599
|
);
|
|
3622
3600
|
return new k({
|
|
@@ -3643,7 +3621,7 @@ class k {
|
|
|
3643
3621
|
return e;
|
|
3644
3622
|
if (typeof e == "object")
|
|
3645
3623
|
return k.fromObject(e);
|
|
3646
|
-
throw new
|
|
3624
|
+
throw new I(
|
|
3647
3625
|
`Unknown duration argument ${e} of type ${typeof e}`
|
|
3648
3626
|
);
|
|
3649
3627
|
}
|
|
@@ -3662,7 +3640,7 @@ class k {
|
|
|
3662
3640
|
* @return {Duration}
|
|
3663
3641
|
*/
|
|
3664
3642
|
static fromISO(e, n) {
|
|
3665
|
-
const [r] =
|
|
3643
|
+
const [r] = Sl(e);
|
|
3666
3644
|
return r ? k.fromObject(r, n) : k.invalid("unparsable", `the input "${e}" can't be parsed as ISO 8601`);
|
|
3667
3645
|
}
|
|
3668
3646
|
/**
|
|
@@ -3682,7 +3660,7 @@ class k {
|
|
|
3682
3660
|
* @return {Duration}
|
|
3683
3661
|
*/
|
|
3684
3662
|
static fromISOTime(e, n) {
|
|
3685
|
-
const [r] =
|
|
3663
|
+
const [r] = Ol(e);
|
|
3686
3664
|
return r ? k.fromObject(r, n) : k.invalid("unparsable", `the input "${e}" can't be parsed as ISO 8601`);
|
|
3687
3665
|
}
|
|
3688
3666
|
/**
|
|
@@ -3693,10 +3671,10 @@ class k {
|
|
|
3693
3671
|
*/
|
|
3694
3672
|
static invalid(e, n = null) {
|
|
3695
3673
|
if (!e)
|
|
3696
|
-
throw new
|
|
3697
|
-
const r = e instanceof
|
|
3674
|
+
throw new I("need to specify a reason the Duration is invalid");
|
|
3675
|
+
const r = e instanceof H ? e : new H(e, n);
|
|
3698
3676
|
if (N.throwOnInvalid)
|
|
3699
|
-
throw new
|
|
3677
|
+
throw new so(r);
|
|
3700
3678
|
return new k({ invalid: r });
|
|
3701
3679
|
}
|
|
3702
3680
|
/**
|
|
@@ -3780,7 +3758,7 @@ class k {
|
|
|
3780
3758
|
...n,
|
|
3781
3759
|
floor: n.round !== !1 && n.floor !== !1
|
|
3782
3760
|
};
|
|
3783
|
-
return this.isValid ?
|
|
3761
|
+
return this.isValid ? F.create(this.loc, r).formatDurationFromString(this, e) : Hn;
|
|
3784
3762
|
}
|
|
3785
3763
|
/**
|
|
3786
3764
|
* Returns a string representation of a Duration with all units included.
|
|
@@ -3827,7 +3805,7 @@ class k {
|
|
|
3827
3805
|
toISO() {
|
|
3828
3806
|
if (!this.isValid) return null;
|
|
3829
3807
|
let e = "P";
|
|
3830
|
-
return this.years !== 0 && (e += this.years + "Y"), (this.months !== 0 || this.quarters !== 0) && (e += this.months + this.quarters * 3 + "M"), this.weeks !== 0 && (e += this.weeks + "W"), this.days !== 0 && (e += this.days + "D"), (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) && (e += "T"), this.hours !== 0 && (e += this.hours + "H"), this.minutes !== 0 && (e += this.minutes + "M"), (this.seconds !== 0 || this.milliseconds !== 0) && (e +=
|
|
3808
|
+
return this.years !== 0 && (e += this.years + "Y"), (this.months !== 0 || this.quarters !== 0) && (e += this.months + this.quarters * 3 + "M"), this.weeks !== 0 && (e += this.weeks + "W"), this.days !== 0 && (e += this.days + "D"), (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) && (e += "T"), this.hours !== 0 && (e += this.hours + "H"), this.minutes !== 0 && (e += this.minutes + "M"), (this.seconds !== 0 || this.milliseconds !== 0) && (e += fn(this.seconds + this.milliseconds / 1e3, 3) + "S"), e === "P" && (e += "T0S"), e;
|
|
3831
3809
|
}
|
|
3832
3810
|
/**
|
|
3833
3811
|
* Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day.
|
|
@@ -3875,7 +3853,7 @@ class k {
|
|
|
3875
3853
|
* Returns a string representation of this Duration appropriate for the REPL.
|
|
3876
3854
|
* @return {string}
|
|
3877
3855
|
*/
|
|
3878
|
-
[Symbol.for("nodejs.util.inspect.custom")]() {
|
|
3856
|
+
[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")]() {
|
|
3879
3857
|
return this.isValid ? `Duration { values: ${JSON.stringify(this.values)} }` : `Duration { Invalid, reason: ${this.invalidReason} }`;
|
|
3880
3858
|
}
|
|
3881
3859
|
/**
|
|
@@ -3989,7 +3967,7 @@ class k {
|
|
|
3989
3967
|
normalize() {
|
|
3990
3968
|
if (!this.isValid) return this;
|
|
3991
3969
|
const e = this.toObject();
|
|
3992
|
-
return
|
|
3970
|
+
return Yn(this.matrix, e), ee(this, { values: e }, !0);
|
|
3993
3971
|
}
|
|
3994
3972
|
/**
|
|
3995
3973
|
* Rescale units to its largest representation
|
|
@@ -3998,7 +3976,7 @@ class k {
|
|
|
3998
3976
|
*/
|
|
3999
3977
|
rescale() {
|
|
4000
3978
|
if (!this.isValid) return this;
|
|
4001
|
-
const e =
|
|
3979
|
+
const e = Bn(this.normalize().shiftToAll().toObject());
|
|
4002
3980
|
return ee(this, { values: e }, !0);
|
|
4003
3981
|
}
|
|
4004
3982
|
/**
|
|
@@ -4017,15 +3995,15 @@ class k {
|
|
|
4017
3995
|
if (e.indexOf(a) >= 0) {
|
|
4018
3996
|
i = a;
|
|
4019
3997
|
let o = 0;
|
|
4020
|
-
for (const
|
|
4021
|
-
o += this.matrix[
|
|
3998
|
+
for (const c in r)
|
|
3999
|
+
o += this.matrix[c][a] * r[c], r[c] = 0;
|
|
4022
4000
|
le(s[a]) && (o += s[a]);
|
|
4023
4001
|
const l = Math.trunc(o);
|
|
4024
4002
|
n[a] = l, r[a] = (o * 1e3 - l * 1e3) / 1e3;
|
|
4025
4003
|
} else le(s[a]) && (r[a] = s[a]);
|
|
4026
4004
|
for (const a in r)
|
|
4027
4005
|
r[a] !== 0 && (n[i] += a === i ? r[a] : r[a] / this.matrix[i][a]);
|
|
4028
|
-
return
|
|
4006
|
+
return Yn(this.matrix, n), ee(this, { values: n }, !0);
|
|
4029
4007
|
}
|
|
4030
4008
|
/**
|
|
4031
4009
|
* Shift this Duration to all available units.
|
|
@@ -4063,7 +4041,7 @@ class k {
|
|
|
4063
4041
|
*/
|
|
4064
4042
|
removeZeros() {
|
|
4065
4043
|
if (!this.isValid) return this;
|
|
4066
|
-
const e =
|
|
4044
|
+
const e = Bn(this.values);
|
|
4067
4045
|
return ee(this, { values: e }, !0);
|
|
4068
4046
|
}
|
|
4069
4047
|
/**
|
|
@@ -4191,10 +4169,10 @@ class O {
|
|
|
4191
4169
|
*/
|
|
4192
4170
|
static invalid(e, n = null) {
|
|
4193
4171
|
if (!e)
|
|
4194
|
-
throw new
|
|
4195
|
-
const r = e instanceof
|
|
4172
|
+
throw new I("need to specify a reason the Interval is invalid");
|
|
4173
|
+
const r = e instanceof H ? e : new H(e, n);
|
|
4196
4174
|
if (N.throwOnInvalid)
|
|
4197
|
-
throw new
|
|
4175
|
+
throw new ro(r);
|
|
4198
4176
|
return new O({ invalid: r });
|
|
4199
4177
|
}
|
|
4200
4178
|
/**
|
|
@@ -4204,7 +4182,7 @@ class O {
|
|
|
4204
4182
|
* @return {Interval}
|
|
4205
4183
|
*/
|
|
4206
4184
|
static fromDateTimes(e, n) {
|
|
4207
|
-
const r =
|
|
4185
|
+
const r = We(e), s = We(n), i = Fl(r, s);
|
|
4208
4186
|
return i ?? new O({
|
|
4209
4187
|
start: r,
|
|
4210
4188
|
end: s
|
|
@@ -4217,7 +4195,7 @@ class O {
|
|
|
4217
4195
|
* @return {Interval}
|
|
4218
4196
|
*/
|
|
4219
4197
|
static after(e, n) {
|
|
4220
|
-
const r = k.fromDurationLike(n), s =
|
|
4198
|
+
const r = k.fromDurationLike(n), s = We(e);
|
|
4221
4199
|
return O.fromDateTimes(s, s.plus(r));
|
|
4222
4200
|
}
|
|
4223
4201
|
/**
|
|
@@ -4227,7 +4205,7 @@ class O {
|
|
|
4227
4205
|
* @return {Interval}
|
|
4228
4206
|
*/
|
|
4229
4207
|
static before(e, n) {
|
|
4230
|
-
const r = k.fromDurationLike(n), s =
|
|
4208
|
+
const r = k.fromDurationLike(n), s = We(e);
|
|
4231
4209
|
return O.fromDateTimes(s.minus(r), s);
|
|
4232
4210
|
}
|
|
4233
4211
|
/**
|
|
@@ -4256,13 +4234,13 @@ class O {
|
|
|
4256
4234
|
if (a && l)
|
|
4257
4235
|
return O.fromDateTimes(i, o);
|
|
4258
4236
|
if (a) {
|
|
4259
|
-
const
|
|
4260
|
-
if (
|
|
4261
|
-
return O.after(i,
|
|
4237
|
+
const c = k.fromISO(s, n);
|
|
4238
|
+
if (c.isValid)
|
|
4239
|
+
return O.after(i, c);
|
|
4262
4240
|
} else if (l) {
|
|
4263
|
-
const
|
|
4264
|
-
if (
|
|
4265
|
-
return O.before(o,
|
|
4241
|
+
const c = k.fromISO(r, n);
|
|
4242
|
+
if (c.isValid)
|
|
4243
|
+
return O.before(o, c);
|
|
4266
4244
|
}
|
|
4267
4245
|
}
|
|
4268
4246
|
return O.invalid("unparsable", `the input "${e}" can't be parsed as ISO 8601`);
|
|
@@ -4397,7 +4375,7 @@ class O {
|
|
|
4397
4375
|
*/
|
|
4398
4376
|
splitAt(...e) {
|
|
4399
4377
|
if (!this.isValid) return [];
|
|
4400
|
-
const n = e.map(
|
|
4378
|
+
const n = e.map(We).filter((a) => this.contains(a)).sort((a, o) => a.toMillis() - o.toMillis()), r = [];
|
|
4401
4379
|
let { s } = this, i = 0;
|
|
4402
4380
|
for (; s < this.e; ) {
|
|
4403
4381
|
const a = n[i] || this.e, o = +a > +this.e ? this.e : a;
|
|
@@ -4520,7 +4498,7 @@ class O {
|
|
|
4520
4498
|
const s = [], i = e.map((l) => [
|
|
4521
4499
|
{ time: l.s, type: "s" },
|
|
4522
4500
|
{ time: l.e, type: "e" }
|
|
4523
|
-
]), a = Array.prototype.concat(...i), o = a.sort((l,
|
|
4501
|
+
]), a = Array.prototype.concat(...i), o = a.sort((l, c) => l.time - c.time);
|
|
4524
4502
|
for (const l of o)
|
|
4525
4503
|
r += l.type === "s" ? 1 : -1, r === 1 ? n = l.time : (n && +n != +l.time && s.push(O.fromDateTimes(n, l.time)), n = null);
|
|
4526
4504
|
return O.merge(s);
|
|
@@ -4544,7 +4522,7 @@ class O {
|
|
|
4544
4522
|
* Returns a string representation of this Interval appropriate for the REPL.
|
|
4545
4523
|
* @return {string}
|
|
4546
4524
|
*/
|
|
4547
|
-
[Symbol.for("nodejs.util.inspect.custom")]() {
|
|
4525
|
+
[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")]() {
|
|
4548
4526
|
return this.isValid ? `Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }` : `Interval { Invalid, reason: ${this.invalidReason} }`;
|
|
4549
4527
|
}
|
|
4550
4528
|
/**
|
|
@@ -4566,7 +4544,7 @@ class O {
|
|
|
4566
4544
|
* @return {string}
|
|
4567
4545
|
*/
|
|
4568
4546
|
toLocaleString(e = ft, n = {}) {
|
|
4569
|
-
return this.isValid ?
|
|
4547
|
+
return this.isValid ? F.create(this.s.loc.clone(n), e).formatInterval(this) : Te;
|
|
4570
4548
|
}
|
|
4571
4549
|
/**
|
|
4572
4550
|
* Returns an ISO 8601-compliant string representation of this Interval.
|
|
@@ -4807,66 +4785,66 @@ class st {
|
|
|
4807
4785
|
return { relative: Yr(), localeWeek: Br() };
|
|
4808
4786
|
}
|
|
4809
4787
|
}
|
|
4810
|
-
function
|
|
4788
|
+
function Gn(t, e) {
|
|
4811
4789
|
const n = (s) => s.toUTC(0, { keepLocalTime: !0 }).startOf("day").valueOf(), r = n(e) - n(t);
|
|
4812
4790
|
return Math.floor(k.fromMillis(r).as("days"));
|
|
4813
4791
|
}
|
|
4814
4792
|
function Vl(t, e, n) {
|
|
4815
4793
|
const r = [
|
|
4816
|
-
["years", (l,
|
|
4817
|
-
["quarters", (l,
|
|
4818
|
-
["months", (l,
|
|
4794
|
+
["years", (l, c) => c.year - l.year],
|
|
4795
|
+
["quarters", (l, c) => c.quarter - l.quarter + (c.year - l.year) * 4],
|
|
4796
|
+
["months", (l, c) => c.month - l.month + (c.year - l.year) * 12],
|
|
4819
4797
|
[
|
|
4820
4798
|
"weeks",
|
|
4821
|
-
(l,
|
|
4822
|
-
const
|
|
4823
|
-
return (
|
|
4799
|
+
(l, c) => {
|
|
4800
|
+
const d = Gn(l, c);
|
|
4801
|
+
return (d - d % 7) / 7;
|
|
4824
4802
|
}
|
|
4825
4803
|
],
|
|
4826
|
-
["days",
|
|
4804
|
+
["days", Gn]
|
|
4827
4805
|
], s = {}, i = t;
|
|
4828
4806
|
let a, o;
|
|
4829
|
-
for (const [l,
|
|
4830
|
-
n.indexOf(l) >= 0 && (a = l, s[l] =
|
|
4807
|
+
for (const [l, c] of r)
|
|
4808
|
+
n.indexOf(l) >= 0 && (a = l, s[l] = c(t, e), o = i.plus(s), o > e ? (s[l]--, t = i.plus(s), t > e && (o = t, s[l]--, t = i.plus(s))) : t = o);
|
|
4831
4809
|
return [t, s, o, a];
|
|
4832
4810
|
}
|
|
4833
|
-
function
|
|
4811
|
+
function Rl(t, e, n, r) {
|
|
4834
4812
|
let [s, i, a, o] = Vl(t, e, n);
|
|
4835
|
-
const l = e - s,
|
|
4813
|
+
const l = e - s, c = n.filter(
|
|
4836
4814
|
(m) => ["hours", "minutes", "seconds", "milliseconds"].indexOf(m) >= 0
|
|
4837
4815
|
);
|
|
4838
|
-
|
|
4839
|
-
const
|
|
4840
|
-
return
|
|
4816
|
+
c.length === 0 && (a < e && (a = s.plus({ [o]: 1 })), a !== s && (i[o] = (i[o] || 0) + l / (a - s)));
|
|
4817
|
+
const d = k.fromObject(i, r);
|
|
4818
|
+
return c.length > 0 ? k.fromMillis(l, r).shiftTo(...c).plus(d) : d;
|
|
4841
4819
|
}
|
|
4842
|
-
const
|
|
4820
|
+
const Wl = "missing Intl.DateTimeFormat.formatToParts support";
|
|
4843
4821
|
function _(t, e = (n) => n) {
|
|
4844
|
-
return { regex: t, deser: ([n]) => e(
|
|
4822
|
+
return { regex: t, deser: ([n]) => e(No(n)) };
|
|
4845
4823
|
}
|
|
4846
4824
|
const $l = " ", fs = `[ ${$l}]`, hs = new RegExp(fs, "g");
|
|
4847
|
-
function
|
|
4825
|
+
function Ll(t) {
|
|
4848
4826
|
return t.replace(/\./g, "\\.?").replace(hs, fs);
|
|
4849
4827
|
}
|
|
4850
|
-
function
|
|
4828
|
+
function Jn(t) {
|
|
4851
4829
|
return t.replace(/\./g, "").replace(hs, " ").toLowerCase();
|
|
4852
4830
|
}
|
|
4853
4831
|
function Z(t, e) {
|
|
4854
4832
|
return t === null ? null : {
|
|
4855
|
-
regex: RegExp(t.map(
|
|
4856
|
-
deser: ([n]) => t.findIndex((r) =>
|
|
4833
|
+
regex: RegExp(t.map(Ll).join("|")),
|
|
4834
|
+
deser: ([n]) => t.findIndex((r) => Jn(n) === Jn(r)) + e
|
|
4857
4835
|
};
|
|
4858
4836
|
}
|
|
4859
|
-
function
|
|
4837
|
+
function Kn(t, e) {
|
|
4860
4838
|
return { regex: t, deser: ([, n, r]) => _t(n, r), groups: e };
|
|
4861
4839
|
}
|
|
4862
4840
|
function it(t) {
|
|
4863
4841
|
return { regex: t, deser: ([e]) => e };
|
|
4864
4842
|
}
|
|
4865
|
-
function
|
|
4843
|
+
function Al(t) {
|
|
4866
4844
|
return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
|
|
4867
4845
|
}
|
|
4868
|
-
function
|
|
4869
|
-
const n = U(e), r = U(e, "{2}"), s = U(e, "{3}"), i = U(e, "{4}"), a = U(e, "{6}"), o = U(e, "{1,2}"), l = U(e, "{1,3}"),
|
|
4846
|
+
function Pl(t, e) {
|
|
4847
|
+
const n = U(e), r = U(e, "{2}"), s = U(e, "{3}"), i = U(e, "{4}"), a = U(e, "{6}"), o = U(e, "{1,2}"), l = U(e, "{1,3}"), c = U(e, "{1,6}"), d = U(e, "{1,9}"), m = U(e, "{2,4}"), g = U(e, "{4,6}"), y = (C) => ({ regex: RegExp(Al(C.val)), deser: ([B]) => B, literal: !0 }), R = ((C) => {
|
|
4870
4848
|
if (t.literal)
|
|
4871
4849
|
return y(C);
|
|
4872
4850
|
switch (C.val) {
|
|
@@ -4877,7 +4855,7 @@ function Al(t, e) {
|
|
|
4877
4855
|
return Z(e.eras("long"), 0);
|
|
4878
4856
|
// years
|
|
4879
4857
|
case "y":
|
|
4880
|
-
return _(
|
|
4858
|
+
return _(c);
|
|
4881
4859
|
case "yy":
|
|
4882
4860
|
return _(m, nn);
|
|
4883
4861
|
case "yyyy":
|
|
@@ -4939,7 +4917,7 @@ function Al(t, e) {
|
|
|
4939
4917
|
case "SSS":
|
|
4940
4918
|
return _(s);
|
|
4941
4919
|
case "u":
|
|
4942
|
-
return it(
|
|
4920
|
+
return it(d);
|
|
4943
4921
|
case "uu":
|
|
4944
4922
|
return it(o);
|
|
4945
4923
|
case "uuu":
|
|
@@ -4972,9 +4950,9 @@ function Al(t, e) {
|
|
|
4972
4950
|
// offset/zone
|
|
4973
4951
|
case "Z":
|
|
4974
4952
|
case "ZZ":
|
|
4975
|
-
return
|
|
4953
|
+
return Kn(new RegExp(`([+-]${o.source})(?::(${r.source}))?`), 2);
|
|
4976
4954
|
case "ZZZ":
|
|
4977
|
-
return
|
|
4955
|
+
return Kn(new RegExp(`([+-]${o.source})(${r.source})?`), 2);
|
|
4978
4956
|
// we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing
|
|
4979
4957
|
// because we don't have any way to figure out what they are
|
|
4980
4958
|
case "z":
|
|
@@ -4987,11 +4965,11 @@ function Al(t, e) {
|
|
|
4987
4965
|
return y(C);
|
|
4988
4966
|
}
|
|
4989
4967
|
})(t) || {
|
|
4990
|
-
invalidReason:
|
|
4968
|
+
invalidReason: Wl
|
|
4991
4969
|
};
|
|
4992
|
-
return
|
|
4970
|
+
return R.token = t, R;
|
|
4993
4971
|
}
|
|
4994
|
-
const
|
|
4972
|
+
const zl = {
|
|
4995
4973
|
year: {
|
|
4996
4974
|
"2-digit": "yy",
|
|
4997
4975
|
numeric: "yyyyy"
|
|
@@ -5033,7 +5011,7 @@ const Pl = {
|
|
|
5033
5011
|
short: "ZZZ"
|
|
5034
5012
|
}
|
|
5035
5013
|
};
|
|
5036
|
-
function
|
|
5014
|
+
function Ul(t, e, n) {
|
|
5037
5015
|
const { type: r, value: s } = t;
|
|
5038
5016
|
if (r === "literal") {
|
|
5039
5017
|
const l = /^\s+$/.test(s);
|
|
@@ -5045,17 +5023,17 @@ function zl(t, e, n) {
|
|
|
5045
5023
|
const i = e[r];
|
|
5046
5024
|
let a = r;
|
|
5047
5025
|
r === "hour" && (e.hour12 != null ? a = e.hour12 ? "hour12" : "hour24" : e.hourCycle != null ? e.hourCycle === "h11" || e.hourCycle === "h12" ? a = "hour12" : a = "hour24" : a = n.hour12 ? "hour12" : "hour24");
|
|
5048
|
-
let o =
|
|
5026
|
+
let o = zl[a];
|
|
5049
5027
|
if (typeof o == "object" && (o = o[i]), o)
|
|
5050
5028
|
return {
|
|
5051
5029
|
literal: !1,
|
|
5052
5030
|
val: o
|
|
5053
5031
|
};
|
|
5054
5032
|
}
|
|
5055
|
-
function
|
|
5033
|
+
function Zl(t) {
|
|
5056
5034
|
return [`^${t.map((n) => n.regex).reduce((n, r) => `${n}(${r.source})`, "")}$`, t];
|
|
5057
5035
|
}
|
|
5058
|
-
function
|
|
5036
|
+
function ql(t, e, n) {
|
|
5059
5037
|
const r = t.match(e);
|
|
5060
5038
|
if (r) {
|
|
5061
5039
|
const s = {};
|
|
@@ -5104,34 +5082,34 @@ function Hl(t) {
|
|
|
5104
5082
|
}
|
|
5105
5083
|
};
|
|
5106
5084
|
let n = null, r;
|
|
5107
|
-
return v(t.z) || (n = ne.create(t.z)), v(t.Z) || (n || (n = new
|
|
5085
|
+
return v(t.z) || (n = ne.create(t.z)), v(t.Z) || (n || (n = new W(t.Z)), r = t.Z), v(t.q) || (t.M = (t.q - 1) * 3 + 1), v(t.h) || (t.h < 12 && t.a === 1 ? t.h += 12 : t.h === 12 && t.a === 0 && (t.h = 0)), t.G === 0 && t.y && (t.y = -t.y), v(t.u) || (t.S = dn(t.u)), [Object.keys(t).reduce((i, a) => {
|
|
5108
5086
|
const o = e(a);
|
|
5109
5087
|
return o && (i[o] = t[a]), i;
|
|
5110
5088
|
}, {}), n, r];
|
|
5111
5089
|
}
|
|
5112
|
-
let
|
|
5113
|
-
function
|
|
5114
|
-
return
|
|
5090
|
+
let $t = null;
|
|
5091
|
+
function Yl() {
|
|
5092
|
+
return $t || ($t = w.fromMillis(1555555555555)), $t;
|
|
5115
5093
|
}
|
|
5116
|
-
function
|
|
5094
|
+
function Bl(t, e) {
|
|
5117
5095
|
if (t.literal)
|
|
5118
5096
|
return t;
|
|
5119
|
-
const n =
|
|
5097
|
+
const n = F.macroTokenToFormatOpts(t.val), r = ws(n, e);
|
|
5120
5098
|
return r == null || r.includes(void 0) ? t : r;
|
|
5121
5099
|
}
|
|
5122
5100
|
function ms(t, e) {
|
|
5123
|
-
return Array.prototype.concat(...t.map((n) =>
|
|
5101
|
+
return Array.prototype.concat(...t.map((n) => Bl(n, e)));
|
|
5124
5102
|
}
|
|
5125
5103
|
class ys {
|
|
5126
5104
|
constructor(e, n) {
|
|
5127
|
-
if (this.locale = e, this.format = n, this.tokens = ms(
|
|
5128
|
-
const [r, s] =
|
|
5105
|
+
if (this.locale = e, this.format = n, this.tokens = ms(F.parseFormat(n), e), this.units = this.tokens.map((r) => Pl(r, e)), this.disqualifyingUnit = this.units.find((r) => r.invalidReason), !this.disqualifyingUnit) {
|
|
5106
|
+
const [r, s] = Zl(this.units);
|
|
5129
5107
|
this.regex = RegExp(r, "i"), this.handlers = s;
|
|
5130
5108
|
}
|
|
5131
5109
|
}
|
|
5132
5110
|
explainFromTokens(e) {
|
|
5133
5111
|
if (this.isValid) {
|
|
5134
|
-
const [n, r] =
|
|
5112
|
+
const [n, r] = ql(e, this.regex, this.handlers), [s, i, a] = r ? Hl(r) : [null, null, void 0];
|
|
5135
5113
|
if (Me(r, "a") && Me(r, "H"))
|
|
5136
5114
|
throw new pe(
|
|
5137
5115
|
"Can't include meridiem when specifying 24-hour format"
|
|
@@ -5159,19 +5137,19 @@ class ys {
|
|
|
5159
5137
|
function gs(t, e, n) {
|
|
5160
5138
|
return new ys(t, n).explainFromTokens(e);
|
|
5161
5139
|
}
|
|
5162
|
-
function
|
|
5140
|
+
function Gl(t, e, n) {
|
|
5163
5141
|
const { result: r, zone: s, specificOffset: i, invalidReason: a } = gs(t, e, n);
|
|
5164
5142
|
return [r, s, i, a];
|
|
5165
5143
|
}
|
|
5166
5144
|
function ws(t, e) {
|
|
5167
5145
|
if (!t)
|
|
5168
5146
|
return null;
|
|
5169
|
-
const r =
|
|
5170
|
-
return s.map((a) =>
|
|
5147
|
+
const r = F.create(e, t).dtFormatter(Yl()), s = r.formatToParts(), i = r.resolvedOptions();
|
|
5148
|
+
return s.map((a) => Ul(a, t, i));
|
|
5171
5149
|
}
|
|
5172
|
-
const Lt = "Invalid DateTime",
|
|
5150
|
+
const Lt = "Invalid DateTime", Xn = 864e13;
|
|
5173
5151
|
function Le(t) {
|
|
5174
|
-
return new
|
|
5152
|
+
return new H("unsupported zone", `the zone "${t.name}" is not supported`);
|
|
5175
5153
|
}
|
|
5176
5154
|
function At(t) {
|
|
5177
5155
|
return t.weekData === null && (t.weekData = ht(t.c)), t.weekData;
|
|
@@ -5219,7 +5197,7 @@ function at(t, e) {
|
|
|
5219
5197
|
function lt(t, e, n) {
|
|
5220
5198
|
return vs(kt(t), e, n);
|
|
5221
5199
|
}
|
|
5222
|
-
function
|
|
5200
|
+
function Qn(t, e) {
|
|
5223
5201
|
const n = t.o, r = t.c.year + Math.trunc(e.years), s = t.c.month + Math.trunc(e.months) + Math.trunc(e.quarters) * 3, i = {
|
|
5224
5202
|
...t.c,
|
|
5225
5203
|
year: r,
|
|
@@ -5236,25 +5214,25 @@ function Xn(t, e) {
|
|
|
5236
5214
|
seconds: e.seconds,
|
|
5237
5215
|
milliseconds: e.milliseconds
|
|
5238
5216
|
}).as("milliseconds"), o = kt(i);
|
|
5239
|
-
let [l,
|
|
5240
|
-
return a !== 0 && (l += a,
|
|
5217
|
+
let [l, c] = vs(o, n, t.zone);
|
|
5218
|
+
return a !== 0 && (l += a, c = t.zone.offset(l)), { ts: l, o: c };
|
|
5241
5219
|
}
|
|
5242
5220
|
function Se(t, e, n, r, s, i) {
|
|
5243
5221
|
const { setZone: a, zone: o } = n;
|
|
5244
5222
|
if (t && Object.keys(t).length !== 0 || e) {
|
|
5245
|
-
const l = e || o,
|
|
5223
|
+
const l = e || o, c = w.fromObject(t, {
|
|
5246
5224
|
...n,
|
|
5247
5225
|
zone: l,
|
|
5248
5226
|
specificOffset: i
|
|
5249
5227
|
});
|
|
5250
|
-
return a ?
|
|
5228
|
+
return a ? c : c.setZone(o);
|
|
5251
5229
|
} else
|
|
5252
5230
|
return w.invalid(
|
|
5253
|
-
new
|
|
5231
|
+
new H("unparsable", `the input "${s}" can't be parsed as ${r}`)
|
|
5254
5232
|
);
|
|
5255
5233
|
}
|
|
5256
5234
|
function ot(t, e, n = !0) {
|
|
5257
|
-
return t.isValid ?
|
|
5235
|
+
return t.isValid ? F.create(T.create("en-US"), {
|
|
5258
5236
|
allowZ: n,
|
|
5259
5237
|
forceSimple: !0
|
|
5260
5238
|
}).formatDateTimeFromString(t, e) : null;
|
|
@@ -5269,7 +5247,7 @@ function zt(t, e, n) {
|
|
|
5269
5247
|
} else if (s += M(t.c.month), n === "month") return s;
|
|
5270
5248
|
return s += M(t.c.day), s;
|
|
5271
5249
|
}
|
|
5272
|
-
function
|
|
5250
|
+
function er(t, e, n, r, s, i, a) {
|
|
5273
5251
|
let o = !n || t.c.millisecond !== 0 || t.c.second !== 0, l = "";
|
|
5274
5252
|
switch (a) {
|
|
5275
5253
|
case "day":
|
|
@@ -5297,20 +5275,20 @@ const xs = {
|
|
|
5297
5275
|
minute: 0,
|
|
5298
5276
|
second: 0,
|
|
5299
5277
|
millisecond: 0
|
|
5300
|
-
},
|
|
5278
|
+
}, Jl = {
|
|
5301
5279
|
weekNumber: 1,
|
|
5302
5280
|
weekday: 1,
|
|
5303
5281
|
hour: 0,
|
|
5304
5282
|
minute: 0,
|
|
5305
5283
|
second: 0,
|
|
5306
5284
|
millisecond: 0
|
|
5307
|
-
},
|
|
5285
|
+
}, Kl = {
|
|
5308
5286
|
ordinal: 1,
|
|
5309
5287
|
hour: 0,
|
|
5310
5288
|
minute: 0,
|
|
5311
5289
|
second: 0,
|
|
5312
5290
|
millisecond: 0
|
|
5313
|
-
}, ut = ["year", "month", "day", "hour", "minute", "second", "millisecond"],
|
|
5291
|
+
}, ut = ["year", "month", "day", "hour", "minute", "second", "millisecond"], Xl = [
|
|
5314
5292
|
"weekYear",
|
|
5315
5293
|
"weekNumber",
|
|
5316
5294
|
"weekday",
|
|
@@ -5318,7 +5296,7 @@ const xs = {
|
|
|
5318
5296
|
"minute",
|
|
5319
5297
|
"second",
|
|
5320
5298
|
"millisecond"
|
|
5321
|
-
],
|
|
5299
|
+
], Ql = ["year", "ordinal", "hour", "minute", "second", "millisecond"];
|
|
5322
5300
|
function ct(t) {
|
|
5323
5301
|
const e = {
|
|
5324
5302
|
year: "year",
|
|
@@ -5349,7 +5327,7 @@ function ct(t) {
|
|
|
5349
5327
|
if (!e) throw new xr(t);
|
|
5350
5328
|
return e;
|
|
5351
5329
|
}
|
|
5352
|
-
function
|
|
5330
|
+
function tr(t) {
|
|
5353
5331
|
switch (t.toLowerCase()) {
|
|
5354
5332
|
case "localweekday":
|
|
5355
5333
|
case "localweekdays":
|
|
@@ -5364,14 +5342,14 @@ function er(t) {
|
|
|
5364
5342
|
return ct(t);
|
|
5365
5343
|
}
|
|
5366
5344
|
}
|
|
5367
|
-
function
|
|
5345
|
+
function eu(t) {
|
|
5368
5346
|
if (Ae === void 0 && (Ae = N.now()), t.type !== "iana")
|
|
5369
5347
|
return t.offset(Ae);
|
|
5370
5348
|
const e = t.name;
|
|
5371
5349
|
let n = rn.get(e);
|
|
5372
5350
|
return n === void 0 && (n = t.offset(Ae), rn.set(e, n)), n;
|
|
5373
5351
|
}
|
|
5374
|
-
function
|
|
5352
|
+
function nr(t, e) {
|
|
5375
5353
|
const n = oe(e.zone, N.defaultZone);
|
|
5376
5354
|
if (!n.isValid)
|
|
5377
5355
|
return w.invalid(Le(n));
|
|
@@ -5382,16 +5360,16 @@ function tr(t, e) {
|
|
|
5382
5360
|
else {
|
|
5383
5361
|
for (const l of ut)
|
|
5384
5362
|
v(t[l]) && (t[l] = xs[l]);
|
|
5385
|
-
const a =
|
|
5363
|
+
const a = qr(t) || Hr(t);
|
|
5386
5364
|
if (a)
|
|
5387
5365
|
return w.invalid(a);
|
|
5388
|
-
const o =
|
|
5366
|
+
const o = eu(n);
|
|
5389
5367
|
[s, i] = lt(t, o, n);
|
|
5390
5368
|
}
|
|
5391
5369
|
return new w({ ts: s, zone: n, loc: r, o: i });
|
|
5392
5370
|
}
|
|
5393
|
-
function
|
|
5394
|
-
const r = v(n.round) ? !0 : n.round, s = v(n.rounding) ? "trunc" : n.rounding, i = (o, l) => (o =
|
|
5371
|
+
function rr(t, e, n) {
|
|
5372
|
+
const r = v(n.round) ? !0 : n.round, s = v(n.rounding) ? "trunc" : n.rounding, i = (o, l) => (o = fn(o, r || n.calendary ? 0 : 2, n.calendary ? "round" : s), e.loc.clone(n).relFormatter(n).format(o, l)), a = (o) => n.calendary ? e.hasSame(t, o) ? 0 : e.startOf(o).diff(t.startOf(o), o).get(o) : e.diff(t, o).get(o);
|
|
5395
5373
|
if (n.unit)
|
|
5396
5374
|
return i(a(n.unit), n.unit);
|
|
5397
5375
|
for (const o of n.units) {
|
|
@@ -5401,7 +5379,7 @@ function nr(t, e, n) {
|
|
|
5401
5379
|
}
|
|
5402
5380
|
return i(t > e ? -0 : 0, n.units[n.units.length - 1]);
|
|
5403
5381
|
}
|
|
5404
|
-
function
|
|
5382
|
+
function sr(t) {
|
|
5405
5383
|
let e = {}, n;
|
|
5406
5384
|
return t.length > 0 && typeof t[t.length - 1] == "object" ? (e = t[t.length - 1], n = Array.from(t).slice(0, t.length - 1)) : n = Array.from(t), [e, n];
|
|
5407
5385
|
}
|
|
@@ -5413,7 +5391,7 @@ class w {
|
|
|
5413
5391
|
*/
|
|
5414
5392
|
constructor(e) {
|
|
5415
5393
|
const n = e.zone || N.defaultZone;
|
|
5416
|
-
let r = e.invalid || (Number.isNaN(e.ts) ? new
|
|
5394
|
+
let r = e.invalid || (Number.isNaN(e.ts) ? new H("invalid input") : null) || (n.isValid ? null : Le(n));
|
|
5417
5395
|
this.ts = v(e.ts) ? N.now() : e.ts;
|
|
5418
5396
|
let s = null, i = null;
|
|
5419
5397
|
if (!r)
|
|
@@ -5421,7 +5399,7 @@ class w {
|
|
|
5421
5399
|
[s, i] = [e.old.c, e.old.o];
|
|
5422
5400
|
else {
|
|
5423
5401
|
const o = le(e.o) && !e.old ? e.o : n.offset(this.ts);
|
|
5424
|
-
s = at(this.ts, o), r = Number.isNaN(s.year) ? new
|
|
5402
|
+
s = at(this.ts, o), r = Number.isNaN(s.year) ? new H("invalid input") : null, s = r ? null : s, i = r ? null : o;
|
|
5425
5403
|
}
|
|
5426
5404
|
this._zone = n, this.loc = e.loc || T.create(), this.invalid = r, this.weekData = null, this.localWeekData = null, this.c = s, this.o = i, this.isLuxonDateTime = !0;
|
|
5427
5405
|
}
|
|
@@ -5458,8 +5436,8 @@ class w {
|
|
|
5458
5436
|
* @return {DateTime}
|
|
5459
5437
|
*/
|
|
5460
5438
|
static local() {
|
|
5461
|
-
const [e, n] =
|
|
5462
|
-
return
|
|
5439
|
+
const [e, n] = sr(arguments), [r, s, i, a, o, l, c] = n;
|
|
5440
|
+
return nr({ year: r, month: s, day: i, hour: a, minute: o, second: l, millisecond: c }, e);
|
|
5463
5441
|
}
|
|
5464
5442
|
/**
|
|
5465
5443
|
* Create a DateTime in UTC
|
|
@@ -5487,8 +5465,8 @@ class w {
|
|
|
5487
5465
|
* @return {DateTime}
|
|
5488
5466
|
*/
|
|
5489
5467
|
static utc() {
|
|
5490
|
-
const [e, n] =
|
|
5491
|
-
return e.zone =
|
|
5468
|
+
const [e, n] = sr(arguments), [r, s, i, a, o, l, c] = n;
|
|
5469
|
+
return e.zone = W.utcInstance, nr({ year: r, month: s, day: i, hour: a, minute: o, second: l, millisecond: c }, e);
|
|
5492
5470
|
}
|
|
5493
5471
|
/**
|
|
5494
5472
|
* Create a DateTime from a JavaScript Date object. Uses the default zone.
|
|
@@ -5498,7 +5476,7 @@ class w {
|
|
|
5498
5476
|
* @return {DateTime}
|
|
5499
5477
|
*/
|
|
5500
5478
|
static fromJSDate(e, n = {}) {
|
|
5501
|
-
const r =
|
|
5479
|
+
const r = jo(e) ? e.valueOf() : NaN;
|
|
5502
5480
|
if (Number.isNaN(r))
|
|
5503
5481
|
return w.invalid("invalid input");
|
|
5504
5482
|
const s = oe(n.zone, N.defaultZone);
|
|
@@ -5521,12 +5499,12 @@ class w {
|
|
|
5521
5499
|
*/
|
|
5522
5500
|
static fromMillis(e, n = {}) {
|
|
5523
5501
|
if (le(e))
|
|
5524
|
-
return e < -
|
|
5502
|
+
return e < -Xn || e > Xn ? w.invalid("Timestamp out of range") : new w({
|
|
5525
5503
|
ts: e,
|
|
5526
5504
|
zone: oe(n.zone, N.defaultZone),
|
|
5527
5505
|
loc: T.fromObject(n)
|
|
5528
5506
|
});
|
|
5529
|
-
throw new
|
|
5507
|
+
throw new I(
|
|
5530
5508
|
`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`
|
|
5531
5509
|
);
|
|
5532
5510
|
}
|
|
@@ -5548,7 +5526,7 @@ class w {
|
|
|
5548
5526
|
zone: oe(n.zone, N.defaultZone),
|
|
5549
5527
|
loc: T.fromObject(n)
|
|
5550
5528
|
});
|
|
5551
|
-
throw new
|
|
5529
|
+
throw new I("fromSeconds requires a numerical input");
|
|
5552
5530
|
}
|
|
5553
5531
|
/**
|
|
5554
5532
|
* Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults.
|
|
@@ -5588,25 +5566,25 @@ class w {
|
|
|
5588
5566
|
const r = oe(n.zone, N.defaultZone);
|
|
5589
5567
|
if (!r.isValid)
|
|
5590
5568
|
return w.invalid(Le(r));
|
|
5591
|
-
const s = T.fromObject(n), i = yt(e,
|
|
5592
|
-
if ((y ||
|
|
5569
|
+
const s = T.fromObject(n), i = yt(e, tr), { minDaysInFirstWeek: a, startOfWeek: o } = Pn(i, s), l = N.now(), c = v(n.specificOffset) ? r.offset(l) : n.specificOffset, d = !v(i.ordinal), m = !v(i.year), g = !v(i.month) || !v(i.day), y = m || g, S = i.weekYear || i.weekNumber;
|
|
5570
|
+
if ((y || d) && S)
|
|
5593
5571
|
throw new pe(
|
|
5594
5572
|
"Can't mix weekYear/weekNumber units with year/month/day or ordinals"
|
|
5595
5573
|
);
|
|
5596
|
-
if (g &&
|
|
5574
|
+
if (g && d)
|
|
5597
5575
|
throw new pe("Can't mix ordinal dates with month/day");
|
|
5598
|
-
const
|
|
5599
|
-
let C, B, K = at(l,
|
|
5600
|
-
|
|
5576
|
+
const R = S || i.weekday && !y;
|
|
5577
|
+
let C, B, K = at(l, c);
|
|
5578
|
+
R ? (C = Xl, B = Jl, K = ht(K, a, o)) : d ? (C = Ql, B = Kl, K = Wt(K)) : (C = ut, B = xs);
|
|
5601
5579
|
let ce = !1;
|
|
5602
5580
|
for (const de of C) {
|
|
5603
5581
|
const Nt = i[de];
|
|
5604
5582
|
v(Nt) ? ce ? i[de] = B[de] : i[de] = K[de] : ce = !0;
|
|
5605
5583
|
}
|
|
5606
|
-
const be =
|
|
5584
|
+
const be = R ? Mo(i, a, o) : d ? Co(i) : qr(i), Ke = be || Hr(i);
|
|
5607
5585
|
if (Ke)
|
|
5608
5586
|
return w.invalid(Ke);
|
|
5609
|
-
const St =
|
|
5587
|
+
const St = R ? Ln(i, a, o) : d ? An(i) : i, [pt, Ot] = lt(St, c, r), X = new w({
|
|
5610
5588
|
ts: pt,
|
|
5611
5589
|
zone: r,
|
|
5612
5590
|
o: Ot,
|
|
@@ -5635,7 +5613,7 @@ class w {
|
|
|
5635
5613
|
* @return {DateTime}
|
|
5636
5614
|
*/
|
|
5637
5615
|
static fromISO(e, n = {}) {
|
|
5638
|
-
const [r, s] =
|
|
5616
|
+
const [r, s] = kl(e);
|
|
5639
5617
|
return Se(r, s, n, "ISO 8601", e);
|
|
5640
5618
|
}
|
|
5641
5619
|
/**
|
|
@@ -5654,7 +5632,7 @@ class w {
|
|
|
5654
5632
|
* @return {DateTime}
|
|
5655
5633
|
*/
|
|
5656
5634
|
static fromRFC2822(e, n = {}) {
|
|
5657
|
-
const [r, s] =
|
|
5635
|
+
const [r, s] = _l(e);
|
|
5658
5636
|
return Se(r, s, n, "RFC 2822", e);
|
|
5659
5637
|
}
|
|
5660
5638
|
/**
|
|
@@ -5674,7 +5652,7 @@ class w {
|
|
|
5674
5652
|
* @return {DateTime}
|
|
5675
5653
|
*/
|
|
5676
5654
|
static fromHTTP(e, n = {}) {
|
|
5677
|
-
const [r, s] =
|
|
5655
|
+
const [r, s] = Tl(e);
|
|
5678
5656
|
return Se(r, s, n, "HTTP", n);
|
|
5679
5657
|
}
|
|
5680
5658
|
/**
|
|
@@ -5693,13 +5671,13 @@ class w {
|
|
|
5693
5671
|
*/
|
|
5694
5672
|
static fromFormat(e, n, r = {}) {
|
|
5695
5673
|
if (v(e) || v(n))
|
|
5696
|
-
throw new
|
|
5674
|
+
throw new I("fromFormat requires an input string and a format");
|
|
5697
5675
|
const { locale: s = null, numberingSystem: i = null } = r, a = T.fromOpts({
|
|
5698
5676
|
locale: s,
|
|
5699
5677
|
numberingSystem: i,
|
|
5700
5678
|
defaultToEN: !0
|
|
5701
|
-
}), [o, l,
|
|
5702
|
-
return
|
|
5679
|
+
}), [o, l, c, d] = Gl(a, e, n);
|
|
5680
|
+
return d ? w.invalid(d) : Se(o, l, r, `format ${n}`, e, c);
|
|
5703
5681
|
}
|
|
5704
5682
|
/**
|
|
5705
5683
|
* @deprecated use fromFormat instead
|
|
@@ -5729,7 +5707,7 @@ class w {
|
|
|
5729
5707
|
* @return {DateTime}
|
|
5730
5708
|
*/
|
|
5731
5709
|
static fromSQL(e, n = {}) {
|
|
5732
|
-
const [r, s] =
|
|
5710
|
+
const [r, s] = Cl(e);
|
|
5733
5711
|
return Se(r, s, n, "SQL", e);
|
|
5734
5712
|
}
|
|
5735
5713
|
/**
|
|
@@ -5740,10 +5718,10 @@ class w {
|
|
|
5740
5718
|
*/
|
|
5741
5719
|
static invalid(e, n = null) {
|
|
5742
5720
|
if (!e)
|
|
5743
|
-
throw new
|
|
5744
|
-
const r = e instanceof
|
|
5721
|
+
throw new I("need to specify a reason the DateTime is invalid");
|
|
5722
|
+
const r = e instanceof H ? e : new H(e, n);
|
|
5745
5723
|
if (N.throwOnInvalid)
|
|
5746
|
-
throw new
|
|
5724
|
+
throw new no(r);
|
|
5747
5725
|
return new w({ invalid: r });
|
|
5748
5726
|
}
|
|
5749
5727
|
/**
|
|
@@ -5772,7 +5750,7 @@ class w {
|
|
|
5772
5750
|
* @returns {string}
|
|
5773
5751
|
*/
|
|
5774
5752
|
static expandFormat(e, n = {}) {
|
|
5775
|
-
return ms(
|
|
5753
|
+
return ms(F.parseFormat(e), T.fromObject(n)).map((s) => s.val).join("");
|
|
5776
5754
|
}
|
|
5777
5755
|
static resetCache() {
|
|
5778
5756
|
Ae = void 0, rn.clear();
|
|
@@ -5980,7 +5958,7 @@ class w {
|
|
|
5980
5958
|
* @type {number|DateTime}
|
|
5981
5959
|
*/
|
|
5982
5960
|
get ordinal() {
|
|
5983
|
-
return this.isValid ?
|
|
5961
|
+
return this.isValid ? Wt(this.c).ordinal : NaN;
|
|
5984
5962
|
}
|
|
5985
5963
|
/**
|
|
5986
5964
|
* Get the human readable short month name, such as 'Oct'.
|
|
@@ -6076,8 +6054,8 @@ class w {
|
|
|
6076
6054
|
const e = 864e5, n = 6e4, r = kt(this.c), s = this.zone.offset(r - e), i = this.zone.offset(r + e), a = this.zone.offset(r - s * n), o = this.zone.offset(r - i * n);
|
|
6077
6055
|
if (a === o)
|
|
6078
6056
|
return [this];
|
|
6079
|
-
const l = r - a * n,
|
|
6080
|
-
return
|
|
6057
|
+
const l = r - a * n, c = r - o * n, d = at(l, a), m = at(c, o);
|
|
6058
|
+
return d.hour === m.hour && d.minute === m.minute && d.second === m.second && d.millisecond === m.millisecond ? [ye(this, { ts: l }), ye(this, { ts: c })] : [this];
|
|
6081
6059
|
}
|
|
6082
6060
|
/**
|
|
6083
6061
|
* Returns true if this DateTime is in a leap year, false otherwise
|
|
@@ -6136,7 +6114,7 @@ class w {
|
|
|
6136
6114
|
* @return {Object}
|
|
6137
6115
|
*/
|
|
6138
6116
|
resolvedLocaleOptions(e = {}) {
|
|
6139
|
-
const { locale: n, numberingSystem: r, calendar: s } =
|
|
6117
|
+
const { locale: n, numberingSystem: r, calendar: s } = F.create(
|
|
6140
6118
|
this.loc.clone(e),
|
|
6141
6119
|
e
|
|
6142
6120
|
).resolvedOptions(this);
|
|
@@ -6152,7 +6130,7 @@ class w {
|
|
|
6152
6130
|
* @return {DateTime}
|
|
6153
6131
|
*/
|
|
6154
6132
|
toUTC(e = 0, n = {}) {
|
|
6155
|
-
return this.setZone(
|
|
6133
|
+
return this.setZone(W.instance(e), n);
|
|
6156
6134
|
}
|
|
6157
6135
|
/**
|
|
6158
6136
|
* "Set" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.
|
|
@@ -6219,19 +6197,19 @@ class w {
|
|
|
6219
6197
|
*/
|
|
6220
6198
|
set(e) {
|
|
6221
6199
|
if (!this.isValid) return this;
|
|
6222
|
-
const n = yt(e,
|
|
6223
|
-
if ((
|
|
6200
|
+
const n = yt(e, tr), { minDaysInFirstWeek: r, startOfWeek: s } = Pn(n, this.loc), i = !v(n.weekYear) || !v(n.weekNumber) || !v(n.weekday), a = !v(n.ordinal), o = !v(n.year), l = !v(n.month) || !v(n.day), c = o || l, d = n.weekYear || n.weekNumber;
|
|
6201
|
+
if ((c || a) && d)
|
|
6224
6202
|
throw new pe(
|
|
6225
6203
|
"Can't mix weekYear/weekNumber units with year/month/day or ordinals"
|
|
6226
6204
|
);
|
|
6227
6205
|
if (l && a)
|
|
6228
6206
|
throw new pe("Can't mix ordinal dates with month/day");
|
|
6229
6207
|
let m;
|
|
6230
|
-
i ? m =
|
|
6208
|
+
i ? m = Ln(
|
|
6231
6209
|
{ ...ht(this.c, r, s), ...n },
|
|
6232
6210
|
r,
|
|
6233
6211
|
s
|
|
6234
|
-
) : v(n.ordinal) ? (m = { ...this.toObject(), ...n }, v(n.day) && (m.day = Math.min(mt(m.year, m.month), m.day))) : m =
|
|
6212
|
+
) : v(n.ordinal) ? (m = { ...this.toObject(), ...n }, v(n.day) && (m.day = Math.min(mt(m.year, m.month), m.day))) : m = An({ ...Wt(this.c), ...n });
|
|
6235
6213
|
const [g, y] = lt(m, this.o, this.zone);
|
|
6236
6214
|
return ye(this, { ts: g, o: y });
|
|
6237
6215
|
}
|
|
@@ -6251,7 +6229,7 @@ class w {
|
|
|
6251
6229
|
plus(e) {
|
|
6252
6230
|
if (!this.isValid) return this;
|
|
6253
6231
|
const n = k.fromDurationLike(e);
|
|
6254
|
-
return ye(this,
|
|
6232
|
+
return ye(this, Qn(this, n));
|
|
6255
6233
|
}
|
|
6256
6234
|
/**
|
|
6257
6235
|
* Subtract a period of time to this DateTime and return the resulting DateTime
|
|
@@ -6262,7 +6240,7 @@ class w {
|
|
|
6262
6240
|
minus(e) {
|
|
6263
6241
|
if (!this.isValid) return this;
|
|
6264
6242
|
const n = k.fromDurationLike(e).negate();
|
|
6265
|
-
return ye(this,
|
|
6243
|
+
return ye(this, Qn(this, n));
|
|
6266
6244
|
}
|
|
6267
6245
|
/**
|
|
6268
6246
|
* "Set" this DateTime to the beginning of a unit of time.
|
|
@@ -6342,7 +6320,7 @@ class w {
|
|
|
6342
6320
|
* @return {string}
|
|
6343
6321
|
*/
|
|
6344
6322
|
toFormat(e, n = {}) {
|
|
6345
|
-
return this.isValid ?
|
|
6323
|
+
return this.isValid ? F.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this, e) : Lt;
|
|
6346
6324
|
}
|
|
6347
6325
|
/**
|
|
6348
6326
|
* Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.
|
|
@@ -6364,7 +6342,7 @@ class w {
|
|
|
6364
6342
|
* @return {string}
|
|
6365
6343
|
*/
|
|
6366
6344
|
toLocaleString(e = ft, n = {}) {
|
|
6367
|
-
return this.isValid ?
|
|
6345
|
+
return this.isValid ? F.create(this.loc.clone(n), e).formatDateTime(this) : Lt;
|
|
6368
6346
|
}
|
|
6369
6347
|
/**
|
|
6370
6348
|
* Returns an array of format "parts", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.
|
|
@@ -6380,7 +6358,7 @@ class w {
|
|
|
6380
6358
|
* //=> ]
|
|
6381
6359
|
*/
|
|
6382
6360
|
toLocaleParts(e = {}) {
|
|
6383
|
-
return this.isValid ?
|
|
6361
|
+
return this.isValid ? F.create(this.loc.clone(e), e).formatDateTimeParts(this) : [];
|
|
6384
6362
|
}
|
|
6385
6363
|
/**
|
|
6386
6364
|
* Returns an ISO 8601-compliant string representation of this DateTime
|
|
@@ -6412,7 +6390,7 @@ class w {
|
|
|
6412
6390
|
a = ct(a);
|
|
6413
6391
|
const o = e === "extended";
|
|
6414
6392
|
let l = zt(this, o, a);
|
|
6415
|
-
return ut.indexOf(a) >= 3 && (l += "T"), l +=
|
|
6393
|
+
return ut.indexOf(a) >= 3 && (l += "T"), l += er(
|
|
6416
6394
|
this,
|
|
6417
6395
|
o,
|
|
6418
6396
|
n,
|
|
@@ -6469,7 +6447,7 @@ class w {
|
|
|
6469
6447
|
format: a = "extended",
|
|
6470
6448
|
precision: o = "milliseconds"
|
|
6471
6449
|
} = {}) {
|
|
6472
|
-
return this.isValid ? (o = ct(o), (s && ut.indexOf(o) >= 3 ? "T" : "") +
|
|
6450
|
+
return this.isValid ? (o = ct(o), (s && ut.indexOf(o) >= 3 ? "T" : "") + er(
|
|
6473
6451
|
this,
|
|
6474
6452
|
a === "extended",
|
|
6475
6453
|
n,
|
|
@@ -6549,7 +6527,7 @@ class w {
|
|
|
6549
6527
|
* Returns a string representation of this DateTime appropriate for the REPL.
|
|
6550
6528
|
* @return {string}
|
|
6551
6529
|
*/
|
|
6552
|
-
[Symbol.for("nodejs.util.inspect.custom")]() {
|
|
6530
|
+
[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")]() {
|
|
6553
6531
|
return this.isValid ? `DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }` : `DateTime { Invalid, reason: ${this.invalidReason} }`;
|
|
6554
6532
|
}
|
|
6555
6533
|
/**
|
|
@@ -6632,8 +6610,8 @@ class w {
|
|
|
6632
6610
|
diff(e, n = "milliseconds", r = {}) {
|
|
6633
6611
|
if (!this.isValid || !e.isValid)
|
|
6634
6612
|
return k.invalid("created by diffing an invalid DateTime");
|
|
6635
|
-
const s = { locale: this.locale, numberingSystem: this.numberingSystem, ...r }, i = Io(n).map(k.normalizeUnit), a = e.valueOf() > this.valueOf(), o = a ? this : e, l = a ? e : this,
|
|
6636
|
-
return a ?
|
|
6613
|
+
const s = { locale: this.locale, numberingSystem: this.numberingSystem, ...r }, i = Io(n).map(k.normalizeUnit), a = e.valueOf() > this.valueOf(), o = a ? this : e, l = a ? e : this, c = Rl(o, l, i, s);
|
|
6614
|
+
return a ? c.negate() : c;
|
|
6637
6615
|
}
|
|
6638
6616
|
/**
|
|
6639
6617
|
* Return the difference between this DateTime and right now.
|
|
@@ -6703,7 +6681,7 @@ class w {
|
|
|
6703
6681
|
if (!this.isValid) return null;
|
|
6704
6682
|
const n = e.base || w.fromObject({}, { zone: this.zone }), r = e.padding ? this < n ? -e.padding : e.padding : 0;
|
|
6705
6683
|
let s = ["years", "months", "days", "hours", "minutes", "seconds"], i = e.unit;
|
|
6706
|
-
return Array.isArray(e.unit) && (s = e.unit, i = void 0),
|
|
6684
|
+
return Array.isArray(e.unit) && (s = e.unit, i = void 0), rr(n, this.plus(r), {
|
|
6707
6685
|
...e,
|
|
6708
6686
|
numeric: "always",
|
|
6709
6687
|
units: s,
|
|
@@ -6724,7 +6702,7 @@ class w {
|
|
|
6724
6702
|
* @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> "2 days ago"
|
|
6725
6703
|
*/
|
|
6726
6704
|
toRelativeCalendar(e = {}) {
|
|
6727
|
-
return this.isValid ?
|
|
6705
|
+
return this.isValid ? rr(e.base || w.fromObject({}, { zone: this.zone }), this, {
|
|
6728
6706
|
...e,
|
|
6729
6707
|
numeric: "auto",
|
|
6730
6708
|
units: ["years", "months", "days"],
|
|
@@ -6738,8 +6716,8 @@ class w {
|
|
|
6738
6716
|
*/
|
|
6739
6717
|
static min(...e) {
|
|
6740
6718
|
if (!e.every(w.isDateTime))
|
|
6741
|
-
throw new
|
|
6742
|
-
return
|
|
6719
|
+
throw new I("min requires all arguments be DateTimes");
|
|
6720
|
+
return zn(e, (n) => n.valueOf(), Math.min);
|
|
6743
6721
|
}
|
|
6744
6722
|
/**
|
|
6745
6723
|
* Return the max of several date times
|
|
@@ -6748,8 +6726,8 @@ class w {
|
|
|
6748
6726
|
*/
|
|
6749
6727
|
static max(...e) {
|
|
6750
6728
|
if (!e.every(w.isDateTime))
|
|
6751
|
-
throw new
|
|
6752
|
-
return
|
|
6729
|
+
throw new I("max requires all arguments be DateTimes");
|
|
6730
|
+
return zn(e, (n) => n.valueOf(), Math.max);
|
|
6753
6731
|
}
|
|
6754
6732
|
// MISC
|
|
6755
6733
|
/**
|
|
@@ -6805,7 +6783,7 @@ class w {
|
|
|
6805
6783
|
*/
|
|
6806
6784
|
static fromFormatParser(e, n, r = {}) {
|
|
6807
6785
|
if (v(e) || v(n))
|
|
6808
|
-
throw new
|
|
6786
|
+
throw new I(
|
|
6809
6787
|
"fromFormatParser requires an input string and a format parser"
|
|
6810
6788
|
);
|
|
6811
6789
|
const { locale: s = null, numberingSystem: i = null } = r, a = T.fromOpts({
|
|
@@ -6814,17 +6792,17 @@ class w {
|
|
|
6814
6792
|
defaultToEN: !0
|
|
6815
6793
|
});
|
|
6816
6794
|
if (!a.equals(n.locale))
|
|
6817
|
-
throw new
|
|
6795
|
+
throw new I(
|
|
6818
6796
|
`fromFormatParser called with a locale of ${a}, but the format parser was created for ${n.locale}`
|
|
6819
6797
|
);
|
|
6820
|
-
const { result: o, zone: l, specificOffset:
|
|
6821
|
-
return
|
|
6798
|
+
const { result: o, zone: l, specificOffset: c, invalidReason: d } = n.explainFromTokens(e);
|
|
6799
|
+
return d ? w.invalid(d) : Se(
|
|
6822
6800
|
o,
|
|
6823
6801
|
l,
|
|
6824
6802
|
r,
|
|
6825
6803
|
`format ${n.format}`,
|
|
6826
6804
|
e,
|
|
6827
|
-
|
|
6805
|
+
c
|
|
6828
6806
|
);
|
|
6829
6807
|
}
|
|
6830
6808
|
// FORMAT PRESETS
|
|
@@ -6847,7 +6825,7 @@ class w {
|
|
|
6847
6825
|
* @type {Object}
|
|
6848
6826
|
*/
|
|
6849
6827
|
static get DATE_MED_WITH_WEEKDAY() {
|
|
6850
|
-
return
|
|
6828
|
+
return io;
|
|
6851
6829
|
}
|
|
6852
6830
|
/**
|
|
6853
6831
|
* {@link DateTime#toLocaleString} format like 'October 14, 1983'
|
|
@@ -6931,35 +6909,35 @@ class w {
|
|
|
6931
6909
|
* @type {Object}
|
|
6932
6910
|
*/
|
|
6933
6911
|
static get DATETIME_SHORT_WITH_SECONDS() {
|
|
6934
|
-
return
|
|
6912
|
+
return jr;
|
|
6935
6913
|
}
|
|
6936
6914
|
/**
|
|
6937
6915
|
* {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.
|
|
6938
6916
|
* @type {Object}
|
|
6939
6917
|
*/
|
|
6940
6918
|
static get DATETIME_MED() {
|
|
6941
|
-
return
|
|
6919
|
+
return Ir;
|
|
6942
6920
|
}
|
|
6943
6921
|
/**
|
|
6944
6922
|
* {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.
|
|
6945
6923
|
* @type {Object}
|
|
6946
6924
|
*/
|
|
6947
6925
|
static get DATETIME_MED_WITH_SECONDS() {
|
|
6948
|
-
return
|
|
6926
|
+
return Fr;
|
|
6949
6927
|
}
|
|
6950
6928
|
/**
|
|
6951
6929
|
* {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.
|
|
6952
6930
|
* @type {Object}
|
|
6953
6931
|
*/
|
|
6954
6932
|
static get DATETIME_MED_WITH_WEEKDAY() {
|
|
6955
|
-
return
|
|
6933
|
+
return ao;
|
|
6956
6934
|
}
|
|
6957
6935
|
/**
|
|
6958
6936
|
* {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.
|
|
6959
6937
|
* @type {Object}
|
|
6960
6938
|
*/
|
|
6961
6939
|
static get DATETIME_FULL() {
|
|
6962
|
-
return
|
|
6940
|
+
return Vr;
|
|
6963
6941
|
}
|
|
6964
6942
|
/**
|
|
6965
6943
|
* {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.
|
|
@@ -6973,32 +6951,32 @@ class w {
|
|
|
6973
6951
|
* @type {Object}
|
|
6974
6952
|
*/
|
|
6975
6953
|
static get DATETIME_HUGE() {
|
|
6976
|
-
return
|
|
6954
|
+
return Wr;
|
|
6977
6955
|
}
|
|
6978
6956
|
/**
|
|
6979
6957
|
* {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.
|
|
6980
6958
|
* @type {Object}
|
|
6981
6959
|
*/
|
|
6982
6960
|
static get DATETIME_HUGE_WITH_SECONDS() {
|
|
6983
|
-
return
|
|
6961
|
+
return $r;
|
|
6984
6962
|
}
|
|
6985
6963
|
}
|
|
6986
|
-
function
|
|
6964
|
+
function We(t) {
|
|
6987
6965
|
if (w.isDateTime(t))
|
|
6988
6966
|
return t;
|
|
6989
6967
|
if (t && t.valueOf && le(t.valueOf()))
|
|
6990
6968
|
return w.fromJSDate(t);
|
|
6991
6969
|
if (t && typeof t == "object")
|
|
6992
6970
|
return w.fromObject(t);
|
|
6993
|
-
throw new
|
|
6971
|
+
throw new I(
|
|
6994
6972
|
`Unknown datetime argument: ${t}, of type ${typeof t}`
|
|
6995
6973
|
);
|
|
6996
6974
|
}
|
|
6997
|
-
function
|
|
6975
|
+
function Au(t) {
|
|
6998
6976
|
const e = E(te, t);
|
|
6999
6977
|
return /* @__PURE__ */ u.jsx(re, { palette: e.palette, children: /* @__PURE__ */ u.jsxs("table", { className: e.styles(te.tb), children: [
|
|
7000
6978
|
/* @__PURE__ */ u.jsx("thead", { children: /* @__PURE__ */ u.jsx("tr", { className: te.hdr, children: t.columns.map((n, r) => /* @__PURE__ */ u.jsx(
|
|
7001
|
-
|
|
6979
|
+
tu,
|
|
7002
6980
|
{
|
|
7003
6981
|
...n,
|
|
7004
6982
|
palette: e.palette,
|
|
@@ -7014,17 +6992,17 @@ function Lu(t) {
|
|
|
7014
6992
|
[te.alt]: r % 2 == 1,
|
|
7015
6993
|
[te.ptr]: !!t.onRowClick
|
|
7016
6994
|
}),
|
|
7017
|
-
children: t.columns.map((s, i) => /* @__PURE__ */ u.jsx("td", { style: { textAlign: s.align }, children: /* @__PURE__ */ u.jsx(
|
|
6995
|
+
children: t.columns.map((s, i) => /* @__PURE__ */ u.jsx("td", { style: { textAlign: s.align }, children: /* @__PURE__ */ u.jsx(nu, { d: s.data, row: n }) }, i))
|
|
7018
6996
|
},
|
|
7019
6997
|
r
|
|
7020
6998
|
)) })
|
|
7021
6999
|
] }) });
|
|
7022
7000
|
}
|
|
7023
|
-
function
|
|
7024
|
-
const [e, n] =
|
|
7001
|
+
function tu(t) {
|
|
7002
|
+
const [e, n] = V(!1), r = E(te, t);
|
|
7025
7003
|
let s = t.caption ?? t.id;
|
|
7026
7004
|
s || (s = /* @__PURE__ */ u.jsx(u.Fragment, { children: " " }));
|
|
7027
|
-
const i = t.icon ??
|
|
7005
|
+
const i = t.icon ?? su(t);
|
|
7028
7006
|
return /* @__PURE__ */ u.jsxs(
|
|
7029
7007
|
"th",
|
|
7030
7008
|
{
|
|
@@ -7052,16 +7030,16 @@ function eu(t) {
|
|
|
7052
7030
|
}
|
|
7053
7031
|
);
|
|
7054
7032
|
}
|
|
7055
|
-
function
|
|
7033
|
+
function nu(t) {
|
|
7056
7034
|
if (typeof t.d == "function")
|
|
7057
7035
|
return t.d(t.row);
|
|
7058
7036
|
const e = t.d;
|
|
7059
|
-
return typeof e == "string" ?
|
|
7037
|
+
return typeof e == "string" ? ru(t.row[e]) : t.d;
|
|
7060
7038
|
}
|
|
7061
|
-
function
|
|
7039
|
+
function ru(t) {
|
|
7062
7040
|
return typeof t == "object" && t instanceof w ? t.toLocaleString({ dateStyle: "medium", timeStyle: "medium" }) : "" + t;
|
|
7063
7041
|
}
|
|
7064
|
-
function
|
|
7042
|
+
function su(t) {
|
|
7065
7043
|
switch (t.sortIcon) {
|
|
7066
7044
|
case "down":
|
|
7067
7045
|
return "↓";
|
|
@@ -7069,23 +7047,23 @@ function ru(t) {
|
|
|
7069
7047
|
return "↑";
|
|
7070
7048
|
}
|
|
7071
7049
|
}
|
|
7072
|
-
const
|
|
7073
|
-
field:
|
|
7074
|
-
err:
|
|
7050
|
+
const iu = "_field_1sopd_1", au = "_err_1sopd_17", Ut = {
|
|
7051
|
+
field: iu,
|
|
7052
|
+
err: au
|
|
7075
7053
|
};
|
|
7076
|
-
function
|
|
7054
|
+
function ou(t) {
|
|
7077
7055
|
const e = G(Ce), n = E(void 0, t), r = t.wrapperFct ?? ((s) => s);
|
|
7078
7056
|
return /* @__PURE__ */ u.jsx(re, { palette: n.palette, children: r(
|
|
7079
7057
|
/* @__PURE__ */ u.jsx(u.Fragment, { children: t.items.map((s, i) => {
|
|
7080
|
-
const a = t.itemFct(s,
|
|
7058
|
+
const a = t.itemFct(s, lu(t, i)), o = Array.isArray(a) ? a : void 0, l = o ? void 0 : a;
|
|
7081
7059
|
return /* @__PURE__ */ u.jsx(
|
|
7082
7060
|
we,
|
|
7083
7061
|
{
|
|
7084
7062
|
children: l,
|
|
7085
7063
|
items: o,
|
|
7086
|
-
context: ue.newFormContext(s, (
|
|
7087
|
-
const
|
|
7088
|
-
(g, y) => y == i ?
|
|
7064
|
+
context: ue.newFormContext(s, (c) => {
|
|
7065
|
+
const d = c(s), m = t.items.map(
|
|
7066
|
+
(g, y) => y == i ? d : g
|
|
7089
7067
|
);
|
|
7090
7068
|
t.onUpdateItems?.(m);
|
|
7091
7069
|
})
|
|
@@ -7112,28 +7090,103 @@ function au(t) {
|
|
|
7112
7090
|
}
|
|
7113
7091
|
) });
|
|
7114
7092
|
}
|
|
7115
|
-
function
|
|
7093
|
+
function lu(t, e) {
|
|
7116
7094
|
return () => {
|
|
7117
7095
|
const n = t.items.filter((r, s) => s != e);
|
|
7118
7096
|
t.onUpdateItems?.(n);
|
|
7119
7097
|
};
|
|
7120
7098
|
}
|
|
7121
|
-
|
|
7099
|
+
function Pu(t) {
|
|
7100
|
+
const e = lr.Children.toArray(t.children), n = Math.ceil(e.length / t.cols), r = [...Array(n)].map((s, i) => {
|
|
7101
|
+
const a = e.slice(i * t.cols, (i + 1) * t.cols), o = [...Array(t.cols)].map(
|
|
7102
|
+
(l, c) => c < a.length ? a[c] : ""
|
|
7103
|
+
);
|
|
7104
|
+
return /* @__PURE__ */ u.jsx(
|
|
7105
|
+
"div",
|
|
7106
|
+
{
|
|
7107
|
+
style: {
|
|
7108
|
+
height: t.lineHeight,
|
|
7109
|
+
display: "flex",
|
|
7110
|
+
gap: t.gap,
|
|
7111
|
+
minWidth: t.minWidth
|
|
7112
|
+
},
|
|
7113
|
+
children: o.map((l, c) => /* @__PURE__ */ u.jsx("div", { style: { flex: 1, width: "100%" }, children: l }, c))
|
|
7114
|
+
},
|
|
7115
|
+
i
|
|
7116
|
+
);
|
|
7117
|
+
});
|
|
7118
|
+
return /* @__PURE__ */ u.jsx("div", { children: r });
|
|
7119
|
+
}
|
|
7120
|
+
function bs(t) {
|
|
7121
|
+
return /* @__PURE__ */ u.jsxs("div", { style: { display: "flex", gap: t.gap }, children: [
|
|
7122
|
+
/* @__PURE__ */ u.jsx(
|
|
7123
|
+
"div",
|
|
7124
|
+
{
|
|
7125
|
+
style: {
|
|
7126
|
+
flexGrow: t.leftWidth === void 0 && t.rightWidth !== void 0 ? 1 : void 0,
|
|
7127
|
+
width: t.leftWidth
|
|
7128
|
+
},
|
|
7129
|
+
children: t.left
|
|
7130
|
+
}
|
|
7131
|
+
),
|
|
7132
|
+
/* @__PURE__ */ u.jsx(
|
|
7133
|
+
"div",
|
|
7134
|
+
{
|
|
7135
|
+
style: {
|
|
7136
|
+
flexGrow: t.rightWidth === void 0 ? 1 : void 0,
|
|
7137
|
+
width: t.rightWidth,
|
|
7138
|
+
textAlign: t.alignMode == "right" ? "right" : void 0
|
|
7139
|
+
},
|
|
7140
|
+
children: t.children
|
|
7141
|
+
}
|
|
7142
|
+
)
|
|
7143
|
+
] });
|
|
7144
|
+
}
|
|
7122
7145
|
function uu(t) {
|
|
7146
|
+
return /* @__PURE__ */ u.jsx(
|
|
7147
|
+
"div",
|
|
7148
|
+
{
|
|
7149
|
+
style: {
|
|
7150
|
+
display: "flex",
|
|
7151
|
+
flexDirection: "column",
|
|
7152
|
+
gap: t.gap ?? "1em",
|
|
7153
|
+
...t.style
|
|
7154
|
+
},
|
|
7155
|
+
children: t.children
|
|
7156
|
+
}
|
|
7157
|
+
);
|
|
7158
|
+
}
|
|
7159
|
+
function cu(t) {
|
|
7160
|
+
return /* @__PURE__ */ u.jsxs(
|
|
7161
|
+
"div",
|
|
7162
|
+
{
|
|
7163
|
+
style: {
|
|
7164
|
+
gap: t.gap,
|
|
7165
|
+
flexDirection: "column",
|
|
7166
|
+
display: "flex",
|
|
7167
|
+
width: "100%",
|
|
7168
|
+
height: t.autoHeight ? void 0 : "100%"
|
|
7169
|
+
},
|
|
7170
|
+
children: [
|
|
7171
|
+
t.header && /* @__PURE__ */ u.jsx("div", { children: t.header }),
|
|
7172
|
+
/* @__PURE__ */ u.jsx("div", { style: { overflow: "auto", flexGrow: 1, position: "relative" }, children: t.children }),
|
|
7173
|
+
t.footer && /* @__PURE__ */ u.jsx("div", { children: t.footer })
|
|
7174
|
+
]
|
|
7175
|
+
}
|
|
7176
|
+
);
|
|
7177
|
+
}
|
|
7178
|
+
const du = /* @__PURE__ */ new Set(["checkbox", "progress"]);
|
|
7179
|
+
function fu(t) {
|
|
7123
7180
|
const e = G(Ce), n = e?.data[t.id], r = E(Ut, t), s = e?.isDisabled || t.disabled || !1, i = e?.data[t.id]?.isValid;
|
|
7124
7181
|
L(() => {
|
|
7125
|
-
const l =
|
|
7126
|
-
e?.initializeField(
|
|
7127
|
-
t.id,
|
|
7128
|
-
l,
|
|
7129
|
-
mu(t) ?? dt(t, l)
|
|
7130
|
-
);
|
|
7182
|
+
const l = gu(t);
|
|
7183
|
+
e?.initializeField(t.id, l, wu(t) ?? dt(t, l));
|
|
7131
7184
|
}, []);
|
|
7132
|
-
const a = (l,
|
|
7185
|
+
const a = (l, c, d, m) => l, o = t.wrapperFct ?? a;
|
|
7133
7186
|
return /* @__PURE__ */ u.jsx(re, { palette: r.palette, children: /* @__PURE__ */ u.jsxs("div", { children: [
|
|
7134
7187
|
/* @__PURE__ */ u.jsx("div", { className: r.styles(Ut.field), children: /* @__PURE__ */ u.jsx("div", { children: o(
|
|
7135
7188
|
/* @__PURE__ */ u.jsx(
|
|
7136
|
-
|
|
7189
|
+
hu,
|
|
7137
7190
|
{
|
|
7138
7191
|
...t,
|
|
7139
7192
|
ctx: e,
|
|
@@ -7144,50 +7197,79 @@ function uu(t) {
|
|
|
7144
7197
|
),
|
|
7145
7198
|
n,
|
|
7146
7199
|
t,
|
|
7147
|
-
t.onAction ? (l,
|
|
7148
|
-
t.onAction?.(l,
|
|
7200
|
+
t.onAction ? (l, c) => {
|
|
7201
|
+
t.onAction?.(l, c);
|
|
7149
7202
|
} : void 0
|
|
7150
7203
|
) }) }),
|
|
7151
7204
|
e?.isValidated && !n?.isValid && /* @__PURE__ */ u.jsx("div", { className: r.styles(Ut.err), children: "x" })
|
|
7152
7205
|
] }) });
|
|
7153
7206
|
}
|
|
7154
|
-
function
|
|
7207
|
+
function hu(t) {
|
|
7155
7208
|
const e = (typeof t.item?.value == "object" ? void 0 : t.item?.value) || "", n = typeof t.item?.value == "object" && t.item.value.mode == "datacontext" ? t.item.value : void 0, r = typeof t.item?.value == "object" && t.item.value.mode == "list" ? t.item.value.items : [], s = ze(() => {
|
|
7156
7209
|
if (t.type != "form")
|
|
7157
7210
|
return;
|
|
7158
|
-
const
|
|
7159
|
-
return ue.newFormContext(
|
|
7160
|
-
const
|
|
7161
|
-
|
|
7211
|
+
const o = n ?? ue.newDataContext();
|
|
7212
|
+
return ue.newFormContext(o, (l) => {
|
|
7213
|
+
const c = l(o);
|
|
7214
|
+
a({ ...c, mode: "datacontext" });
|
|
7162
7215
|
});
|
|
7163
7216
|
}, [t.item?.value, t.type]);
|
|
7164
|
-
|
|
7217
|
+
L(() => {
|
|
7165
7218
|
if (t.item === void 0) {
|
|
7166
|
-
const
|
|
7167
|
-
|
|
7219
|
+
const o = yu(t), l = dt(t, o);
|
|
7220
|
+
a(o, l);
|
|
7168
7221
|
}
|
|
7169
7222
|
}, [t.item]), L(() => {
|
|
7170
7223
|
if (t.item) {
|
|
7171
|
-
const
|
|
7172
|
-
|
|
7224
|
+
const o = dt(t, t.item.value);
|
|
7225
|
+
o !== t.item.isValid && a(t.item.value, o);
|
|
7173
7226
|
}
|
|
7174
|
-
}, [t.isOptional, t.disabled, t.validator?.signature])
|
|
7227
|
+
}, [t.isOptional, t.disabled, t.validator?.signature]);
|
|
7228
|
+
const i = !!(t.value ?? e);
|
|
7229
|
+
switch (t.type) {
|
|
7230
|
+
case "toggle":
|
|
7231
|
+
return /* @__PURE__ */ u.jsxs(bs, { children: [
|
|
7232
|
+
/* @__PURE__ */ u.jsx(
|
|
7233
|
+
an,
|
|
7234
|
+
{
|
|
7235
|
+
autoFocus: t.autoFocus,
|
|
7236
|
+
disabled: t.disabled,
|
|
7237
|
+
variant: "plain",
|
|
7238
|
+
down: !!(t.value ?? e),
|
|
7239
|
+
onClick: () => {
|
|
7240
|
+
t.readOnly || a(i ? "" : "true");
|
|
7241
|
+
},
|
|
7242
|
+
...t.buttonProps,
|
|
7243
|
+
children: i ? t.buttonProps?.textOn ?? "ON" : t.buttonProps?.textOff ?? "OFF"
|
|
7244
|
+
}
|
|
7245
|
+
),
|
|
7246
|
+
/* @__PURE__ */ u.jsx(
|
|
7247
|
+
"div",
|
|
7248
|
+
{
|
|
7249
|
+
style: {
|
|
7250
|
+
marginLeft: t.buttonProps?.gap ?? "1em",
|
|
7251
|
+
display: "inline-block"
|
|
7252
|
+
},
|
|
7253
|
+
children: t.caption
|
|
7254
|
+
}
|
|
7255
|
+
)
|
|
7256
|
+
] });
|
|
7175
7257
|
case "checkbox":
|
|
7176
7258
|
return /* @__PURE__ */ u.jsx(
|
|
7177
|
-
|
|
7259
|
+
Js,
|
|
7178
7260
|
{
|
|
7179
7261
|
autoFocus: t.autoFocus,
|
|
7180
7262
|
caption: t.caption,
|
|
7181
7263
|
value: t.value ?? e,
|
|
7182
7264
|
defaultValue: t.defaultValue,
|
|
7183
|
-
onChange: (
|
|
7265
|
+
onChange: (o) => a(o),
|
|
7184
7266
|
disabled: t.disabled,
|
|
7185
7267
|
...t.checkBoxProps
|
|
7186
7268
|
}
|
|
7187
7269
|
);
|
|
7188
7270
|
case "dropdown":
|
|
7189
7271
|
return /* @__PURE__ */ u.jsx(
|
|
7190
|
-
|
|
7272
|
+
ia,
|
|
7191
7273
|
{
|
|
7192
7274
|
autoFocus: t.autoFocus,
|
|
7193
7275
|
items: t.dropDownProps?.items || [],
|
|
@@ -7195,7 +7277,7 @@ function cu(t) {
|
|
|
7195
7277
|
value: t.value ?? e,
|
|
7196
7278
|
defaultValue: t.defaultValue,
|
|
7197
7279
|
disabled: t.disabled,
|
|
7198
|
-
onChange: (
|
|
7280
|
+
onChange: (o) => a(o),
|
|
7199
7281
|
...t.dropDownProps
|
|
7200
7282
|
}
|
|
7201
7283
|
);
|
|
@@ -7205,8 +7287,8 @@ function cu(t) {
|
|
|
7205
7287
|
{
|
|
7206
7288
|
...t.formProps,
|
|
7207
7289
|
context: s,
|
|
7208
|
-
onAction: t.onAction ? (
|
|
7209
|
-
t.onAction?.(
|
|
7290
|
+
onAction: t.onAction ? (o, l, c) => {
|
|
7291
|
+
t.onAction?.(o, { id: t.id, idx: void 0, data: c });
|
|
7210
7292
|
} : void 0,
|
|
7211
7293
|
children: t.children
|
|
7212
7294
|
}
|
|
@@ -7217,44 +7299,44 @@ function cu(t) {
|
|
|
7217
7299
|
{
|
|
7218
7300
|
...t.progressBarProps,
|
|
7219
7301
|
caption: t.caption,
|
|
7220
|
-
value: t.value,
|
|
7302
|
+
value: t.value ?? e,
|
|
7221
7303
|
defaultValue: t.defaultValue,
|
|
7222
7304
|
disabled: t.disabled,
|
|
7223
|
-
onChange: (
|
|
7305
|
+
onChange: (o) => a(o, !0)
|
|
7224
7306
|
}
|
|
7225
7307
|
);
|
|
7226
7308
|
case "template":
|
|
7227
7309
|
return t.templateProps ? /* @__PURE__ */ u.jsx(
|
|
7228
|
-
|
|
7310
|
+
ou,
|
|
7229
7311
|
{
|
|
7230
7312
|
...t.templateProps,
|
|
7231
7313
|
items: r,
|
|
7232
|
-
onUpdateItems: (
|
|
7314
|
+
onUpdateItems: (o) => a({ mode: "list", items: o })
|
|
7233
7315
|
}
|
|
7234
7316
|
) : /* @__PURE__ */ u.jsx("div", {});
|
|
7235
7317
|
case "textbox":
|
|
7236
7318
|
return /* @__PURE__ */ u.jsx(
|
|
7237
|
-
|
|
7319
|
+
on,
|
|
7238
7320
|
{
|
|
7239
7321
|
autoFocus: t.autoFocus,
|
|
7240
7322
|
caption: t.caption,
|
|
7241
7323
|
value: t.value ?? e,
|
|
7242
7324
|
defaultValue: t.defaultValue,
|
|
7243
|
-
onChange: (
|
|
7325
|
+
onChange: (o) => a(o),
|
|
7244
7326
|
disabled: t.disabled,
|
|
7245
7327
|
...t.textBoxProps
|
|
7246
7328
|
}
|
|
7247
7329
|
);
|
|
7248
7330
|
}
|
|
7249
|
-
return /* @__PURE__ */ u.jsx(
|
|
7250
|
-
function
|
|
7251
|
-
t.ctx?.update(t.id,
|
|
7331
|
+
return /* @__PURE__ */ u.jsx(mu, {});
|
|
7332
|
+
function a(o, l) {
|
|
7333
|
+
t.readOnly || t.ctx?.update(t.id, o, l ?? dt(t, o) ?? !1);
|
|
7252
7334
|
}
|
|
7253
7335
|
}
|
|
7254
|
-
function
|
|
7336
|
+
function mu() {
|
|
7255
7337
|
return /* @__PURE__ */ u.jsx("div", { children: "Invalid control" });
|
|
7256
7338
|
}
|
|
7257
|
-
function
|
|
7339
|
+
function yu(t) {
|
|
7258
7340
|
switch (t.type) {
|
|
7259
7341
|
case "form":
|
|
7260
7342
|
return {
|
|
@@ -7275,7 +7357,7 @@ function fu(t) {
|
|
|
7275
7357
|
return "";
|
|
7276
7358
|
}
|
|
7277
7359
|
}
|
|
7278
|
-
function
|
|
7360
|
+
function gu(t) {
|
|
7279
7361
|
switch (t.type) {
|
|
7280
7362
|
case "form":
|
|
7281
7363
|
return {
|
|
@@ -7305,7 +7387,7 @@ function dt(t, e) {
|
|
|
7305
7387
|
if (e === void 0)
|
|
7306
7388
|
return !!t.isOptional;
|
|
7307
7389
|
if (typeof e == "string")
|
|
7308
|
-
return
|
|
7390
|
+
return du.has(t.type) || t.isOptional && !e ? !0 : t.validator?.onValidate ? t.validator.onValidate(e) : !!e;
|
|
7309
7391
|
switch (e.mode) {
|
|
7310
7392
|
case "datacontext":
|
|
7311
7393
|
return e.isValid ?? !1;
|
|
@@ -7314,12 +7396,12 @@ function dt(t, e) {
|
|
|
7314
7396
|
}
|
|
7315
7397
|
return !1;
|
|
7316
7398
|
}
|
|
7317
|
-
function
|
|
7399
|
+
function wu(t) {
|
|
7318
7400
|
if (t.type === "progress")
|
|
7319
7401
|
return !0;
|
|
7320
7402
|
}
|
|
7321
7403
|
function we(t) {
|
|
7322
|
-
const [e, n] =
|
|
7404
|
+
const [e, n] = V({
|
|
7323
7405
|
data: {},
|
|
7324
7406
|
isDisabled: t.disabled ?? !1,
|
|
7325
7407
|
isLoading: !1,
|
|
@@ -7332,19 +7414,19 @@ function we(t) {
|
|
|
7332
7414
|
isValidated: t.isValidated ?? r.isValidated
|
|
7333
7415
|
};
|
|
7334
7416
|
return /* @__PURE__ */ u.jsxs(Ce.Provider, { value: s, children: [
|
|
7335
|
-
/* @__PURE__ */ u.jsx(
|
|
7336
|
-
t.items?.map((i) => /* @__PURE__ */
|
|
7417
|
+
/* @__PURE__ */ u.jsx(vu, { ctx: s }),
|
|
7418
|
+
t.items?.map((i) => /* @__PURE__ */ ur(fu, { ...i, key: i.id })),
|
|
7337
7419
|
t.children
|
|
7338
7420
|
] });
|
|
7339
7421
|
}
|
|
7340
|
-
function
|
|
7422
|
+
function vu(t) {
|
|
7341
7423
|
return /* @__PURE__ */ u.jsx(u.Fragment, {});
|
|
7342
7424
|
}
|
|
7343
|
-
const
|
|
7344
|
-
function
|
|
7345
|
-
const e = G(Ce), n = G(ve), r = G(
|
|
7425
|
+
const ks = qe(null);
|
|
7426
|
+
function ir(t) {
|
|
7427
|
+
const e = G(Ce), n = G(ve), r = G(ks);
|
|
7346
7428
|
return /* @__PURE__ */ u.jsx(
|
|
7347
|
-
|
|
7429
|
+
an,
|
|
7348
7430
|
{
|
|
7349
7431
|
...t,
|
|
7350
7432
|
onClick: t.cancel && !t.onClick ? () => {
|
|
@@ -7354,7 +7436,7 @@ function sr(t) {
|
|
|
7354
7436
|
}
|
|
7355
7437
|
);
|
|
7356
7438
|
}
|
|
7357
|
-
const
|
|
7439
|
+
const xu = {
|
|
7358
7440
|
data: {},
|
|
7359
7441
|
submitRef: {
|
|
7360
7442
|
id: void 0,
|
|
@@ -7365,114 +7447,35 @@ const gu = {
|
|
|
7365
7447
|
isValid: !0,
|
|
7366
7448
|
isLoading: !1
|
|
7367
7449
|
};
|
|
7368
|
-
function wu(t) {
|
|
7369
|
-
const [e, n] = $(
|
|
7370
|
-
t ?? gu
|
|
7371
|
-
);
|
|
7372
|
-
return { ctx: e, setCtx: n };
|
|
7373
|
-
}
|
|
7374
|
-
function Au(t) {
|
|
7375
|
-
const e = or.Children.toArray(t.children), n = Math.ceil(e.length / t.cols), r = [...Array(n)].map((s, i) => {
|
|
7376
|
-
const a = e.slice(i * t.cols, (i + 1) * t.cols), o = [...Array(t.cols)].map(
|
|
7377
|
-
(l, d) => d < a.length ? a[d] : ""
|
|
7378
|
-
);
|
|
7379
|
-
return /* @__PURE__ */ u.jsx(
|
|
7380
|
-
"div",
|
|
7381
|
-
{
|
|
7382
|
-
style: {
|
|
7383
|
-
height: t.lineHeight,
|
|
7384
|
-
display: "flex",
|
|
7385
|
-
gap: t.gap,
|
|
7386
|
-
minWidth: t.minWidth
|
|
7387
|
-
},
|
|
7388
|
-
children: o.map((l, d) => /* @__PURE__ */ u.jsx("div", { style: { flex: 1, width: "100%" }, children: l }, d))
|
|
7389
|
-
},
|
|
7390
|
-
i
|
|
7391
|
-
);
|
|
7392
|
-
});
|
|
7393
|
-
return /* @__PURE__ */ u.jsx("div", { children: r });
|
|
7394
|
-
}
|
|
7395
|
-
function vu(t) {
|
|
7396
|
-
return /* @__PURE__ */ u.jsxs("div", { style: { display: "flex", gap: t.gap }, children: [
|
|
7397
|
-
/* @__PURE__ */ u.jsx(
|
|
7398
|
-
"div",
|
|
7399
|
-
{
|
|
7400
|
-
style: {
|
|
7401
|
-
flexGrow: t.leftWidth === void 0 && t.rightWidth !== void 0 ? 1 : void 0,
|
|
7402
|
-
width: t.leftWidth
|
|
7403
|
-
},
|
|
7404
|
-
children: t.left
|
|
7405
|
-
}
|
|
7406
|
-
),
|
|
7407
|
-
/* @__PURE__ */ u.jsx(
|
|
7408
|
-
"div",
|
|
7409
|
-
{
|
|
7410
|
-
style: {
|
|
7411
|
-
flexGrow: t.rightWidth === void 0 ? 1 : void 0,
|
|
7412
|
-
width: t.rightWidth,
|
|
7413
|
-
textAlign: t.alignMode == "right" ? "right" : void 0
|
|
7414
|
-
},
|
|
7415
|
-
children: t.children
|
|
7416
|
-
}
|
|
7417
|
-
)
|
|
7418
|
-
] });
|
|
7419
|
-
}
|
|
7420
|
-
function xu(t) {
|
|
7421
|
-
return /* @__PURE__ */ u.jsx(
|
|
7422
|
-
"div",
|
|
7423
|
-
{
|
|
7424
|
-
style: {
|
|
7425
|
-
display: "flex",
|
|
7426
|
-
flexDirection: "column",
|
|
7427
|
-
gap: t.gap ?? "1em",
|
|
7428
|
-
...t.style
|
|
7429
|
-
},
|
|
7430
|
-
children: t.children
|
|
7431
|
-
}
|
|
7432
|
-
);
|
|
7433
|
-
}
|
|
7434
7450
|
function bu(t) {
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
{
|
|
7438
|
-
style: {
|
|
7439
|
-
gap: t.gap,
|
|
7440
|
-
flexDirection: "column",
|
|
7441
|
-
display: "flex",
|
|
7442
|
-
width: "100%",
|
|
7443
|
-
height: t.autoHeight ? void 0 : "100%"
|
|
7444
|
-
},
|
|
7445
|
-
children: [
|
|
7446
|
-
t.header && /* @__PURE__ */ u.jsx("div", { children: t.header }),
|
|
7447
|
-
/* @__PURE__ */ u.jsx("div", { style: { overflow: "auto", flexGrow: 1, position: "relative" }, children: t.children }),
|
|
7448
|
-
t.footer && /* @__PURE__ */ u.jsx("div", { children: t.footer })
|
|
7449
|
-
]
|
|
7450
|
-
}
|
|
7451
|
+
const [e, n] = V(
|
|
7452
|
+
t ?? xu
|
|
7451
7453
|
);
|
|
7454
|
+
return { ctx: e, setCtx: n };
|
|
7452
7455
|
}
|
|
7453
7456
|
function ku(t) {
|
|
7454
7457
|
const e = Su(t.initialState), n = {
|
|
7455
|
-
beforeClose: (
|
|
7458
|
+
beforeClose: (d) => {
|
|
7456
7459
|
}
|
|
7457
7460
|
}, r = {
|
|
7458
7461
|
ctx: t.ctx,
|
|
7459
7462
|
frm: e,
|
|
7460
|
-
close: () =>
|
|
7461
|
-
submit: (
|
|
7463
|
+
close: () => c(),
|
|
7464
|
+
submit: (d) => a(d)
|
|
7462
7465
|
}, s = t.fct(r);
|
|
7463
7466
|
n.beforeClose = s.onBeforeClose ?? n.beforeClose;
|
|
7464
7467
|
const i = E(void 0, { palette: s.palette ?? "dialog" });
|
|
7465
7468
|
return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
7466
7469
|
/* @__PURE__ */ u.jsx(Ue, { backdrop: !0, visible: !0 }),
|
|
7467
7470
|
/* @__PURE__ */ u.jsx(Ue, { visible: !0, children: /* @__PURE__ */ u.jsx(
|
|
7468
|
-
|
|
7471
|
+
ks.Provider,
|
|
7469
7472
|
{
|
|
7470
7473
|
value: {
|
|
7471
|
-
cancel: () =>
|
|
7472
|
-
submit: (
|
|
7474
|
+
cancel: () => c(),
|
|
7475
|
+
submit: (d, m) => l(d, m)
|
|
7473
7476
|
},
|
|
7474
7477
|
children: /* @__PURE__ */ u.jsx(
|
|
7475
|
-
|
|
7478
|
+
q,
|
|
7476
7479
|
{
|
|
7477
7480
|
...s.pos,
|
|
7478
7481
|
center: !0,
|
|
@@ -7485,7 +7488,7 @@ function ku(t) {
|
|
|
7485
7488
|
palette: i.palette,
|
|
7486
7489
|
fill: !0,
|
|
7487
7490
|
caption: s.caption,
|
|
7488
|
-
onClose: () =>
|
|
7491
|
+
onClose: () => c(),
|
|
7489
7492
|
...s.windowProps,
|
|
7490
7493
|
children: /* @__PURE__ */ u.jsx(
|
|
7491
7494
|
"div",
|
|
@@ -7495,10 +7498,10 @@ function ku(t) {
|
|
|
7495
7498
|
position: "relative"
|
|
7496
7499
|
},
|
|
7497
7500
|
children: /* @__PURE__ */ u.jsxs(
|
|
7498
|
-
|
|
7501
|
+
cu,
|
|
7499
7502
|
{
|
|
7500
7503
|
header: /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
7501
|
-
e.error && /* @__PURE__ */ u.jsx(
|
|
7504
|
+
e.error && /* @__PURE__ */ u.jsx(ua, { children: e.error }),
|
|
7502
7505
|
s.header && /* @__PURE__ */ u.jsx(we, { context: e, children: s.header })
|
|
7503
7506
|
] }),
|
|
7504
7507
|
footer: /* @__PURE__ */ u.jsx(u.Fragment, { children: s.footer ? /* @__PURE__ */ u.jsx(we, { context: e, children: s.footer }) : s.buttons ? /* @__PURE__ */ u.jsx(
|
|
@@ -7530,7 +7533,7 @@ function ku(t) {
|
|
|
7530
7533
|
width: "100%",
|
|
7531
7534
|
height: "1.5em"
|
|
7532
7535
|
},
|
|
7533
|
-
children: /* @__PURE__ */ u.jsx(
|
|
7536
|
+
children: /* @__PURE__ */ u.jsx(Da, {})
|
|
7534
7537
|
}
|
|
7535
7538
|
)
|
|
7536
7539
|
}
|
|
@@ -7557,31 +7560,31 @@ function ku(t) {
|
|
|
7557
7560
|
}
|
|
7558
7561
|
) })
|
|
7559
7562
|
] });
|
|
7560
|
-
function a(
|
|
7561
|
-
if (
|
|
7562
|
-
o(
|
|
7563
|
+
function a(d) {
|
|
7564
|
+
if (d instanceof Promise) {
|
|
7565
|
+
o(d);
|
|
7563
7566
|
return;
|
|
7564
7567
|
}
|
|
7565
|
-
if (
|
|
7566
|
-
l(
|
|
7568
|
+
if (d.result) {
|
|
7569
|
+
l(d.result, d.data);
|
|
7567
7570
|
return;
|
|
7568
7571
|
}
|
|
7569
|
-
|
|
7572
|
+
d.error && e.setError(d.error);
|
|
7570
7573
|
}
|
|
7571
|
-
function o(
|
|
7572
|
-
e.setLoading(!0), e.setError(void 0),
|
|
7574
|
+
function o(d) {
|
|
7575
|
+
e.setLoading(!0), e.setError(void 0), d.then((m) => {
|
|
7573
7576
|
e.setLoading(!1), a(m);
|
|
7574
7577
|
});
|
|
7575
7578
|
}
|
|
7576
|
-
function l(
|
|
7577
|
-
n.beforeClose(
|
|
7579
|
+
function l(d, m) {
|
|
7580
|
+
n.beforeClose(d), t.onSubmit?.(d, m, e);
|
|
7578
7581
|
}
|
|
7579
|
-
function
|
|
7582
|
+
function c() {
|
|
7580
7583
|
n.beforeClose(null), t.onCancel();
|
|
7581
7584
|
}
|
|
7582
7585
|
}
|
|
7583
7586
|
function _u(t) {
|
|
7584
|
-
const e =
|
|
7587
|
+
const e = gn();
|
|
7585
7588
|
return /* @__PURE__ */ u.jsx(
|
|
7586
7589
|
hr,
|
|
7587
7590
|
{
|
|
@@ -7608,9 +7611,9 @@ function _u(t) {
|
|
|
7608
7611
|
}
|
|
7609
7612
|
function Tu(t) {
|
|
7610
7613
|
if (t.ctx)
|
|
7611
|
-
return /* @__PURE__ */ u.jsx(we, { context: t.ctx, children: /* @__PURE__ */ u.jsxs(
|
|
7614
|
+
return /* @__PURE__ */ u.jsx(we, { context: t.ctx, children: /* @__PURE__ */ u.jsxs(bs, { alignMode: "right", children: [
|
|
7612
7615
|
(t.submit || t.onSubmit) && /* @__PURE__ */ u.jsx(
|
|
7613
|
-
|
|
7616
|
+
ir,
|
|
7614
7617
|
{
|
|
7615
7618
|
w0: !0,
|
|
7616
7619
|
default: !0,
|
|
@@ -7621,17 +7624,17 @@ function Tu(t) {
|
|
|
7621
7624
|
children: typeof t.submit == "string" ? t.submit : "OK"
|
|
7622
7625
|
}
|
|
7623
7626
|
),
|
|
7624
|
-
(t.cancel || t.onCancel) && /* @__PURE__ */ u.jsx(
|
|
7627
|
+
(t.cancel || t.onCancel) && /* @__PURE__ */ u.jsx(ir, { w0: !0, cancel: !0, onClick: t.onCancel, children: typeof t.cancel == "string" ? t.cancel : "Cancel" })
|
|
7625
7628
|
] }) });
|
|
7626
7629
|
}
|
|
7627
|
-
function
|
|
7630
|
+
function gn() {
|
|
7628
7631
|
const t = G(ve);
|
|
7629
7632
|
if (!t)
|
|
7630
7633
|
throw "Missing CtxLayerRenderContext";
|
|
7631
7634
|
return t;
|
|
7632
7635
|
}
|
|
7633
|
-
function
|
|
7634
|
-
const e =
|
|
7636
|
+
function zu(t) {
|
|
7637
|
+
const e = gn();
|
|
7635
7638
|
return {
|
|
7636
7639
|
show: (n, r) => new Promise((s) => {
|
|
7637
7640
|
e.show(() => /* @__PURE__ */ u.jsx(
|
|
@@ -7656,7 +7659,7 @@ function Pu(t) {
|
|
|
7656
7659
|
};
|
|
7657
7660
|
}
|
|
7658
7661
|
function Su(t) {
|
|
7659
|
-
const e =
|
|
7662
|
+
const e = bu(t);
|
|
7660
7663
|
return ue.newFormContext(e.ctx, e.setCtx);
|
|
7661
7664
|
}
|
|
7662
7665
|
function pu() {
|
|
@@ -7664,18 +7667,33 @@ function pu() {
|
|
|
7664
7667
|
t.addEventListener("change", function(r) {
|
|
7665
7668
|
n(r.matches);
|
|
7666
7669
|
});
|
|
7667
|
-
const [e, n] =
|
|
7670
|
+
const [e, n] = V(t.matches);
|
|
7668
7671
|
return e;
|
|
7669
7672
|
}
|
|
7670
|
-
function
|
|
7671
|
-
const t =
|
|
7673
|
+
function Uu() {
|
|
7674
|
+
const t = gn();
|
|
7672
7675
|
return {
|
|
7673
7676
|
show: function(e, n) {
|
|
7674
|
-
t.showRow(() => /* @__PURE__ */ u.jsx(
|
|
7677
|
+
t.showRow(() => /* @__PURE__ */ u.jsx(Aa, { ...n, children: e }));
|
|
7675
7678
|
}
|
|
7676
7679
|
};
|
|
7677
7680
|
}
|
|
7678
|
-
const
|
|
7681
|
+
const Ou = {
|
|
7682
|
+
xs: 0,
|
|
7683
|
+
sm: 640,
|
|
7684
|
+
md: 768,
|
|
7685
|
+
lg: 1024,
|
|
7686
|
+
xl: 1280
|
|
7687
|
+
};
|
|
7688
|
+
function Zu(t) {
|
|
7689
|
+
const e = "(min-width: " + (typeof t == "string" ? Ou[t] : t) + "px)", n = window.matchMedia(e);
|
|
7690
|
+
n.addEventListener("change", function(i) {
|
|
7691
|
+
s(i.matches);
|
|
7692
|
+
});
|
|
7693
|
+
const [r, s] = V(n.matches);
|
|
7694
|
+
return r;
|
|
7695
|
+
}
|
|
7696
|
+
const ar = [
|
|
7679
7697
|
"dd.MM.yyyy HH:mm:ss",
|
|
7680
7698
|
"dd.MM.yyyy HH:mm",
|
|
7681
7699
|
"yyyyMMddHHmmss",
|
|
@@ -7691,20 +7709,20 @@ const ir = [
|
|
|
7691
7709
|
return mr.distint(e).join(" ");
|
|
7692
7710
|
},
|
|
7693
7711
|
formatDateTime: function(t, e) {
|
|
7694
|
-
return typeof t != "object" && (t = sn.parseDateTime(t)),
|
|
7712
|
+
return typeof t != "object" && (t = sn.parseDateTime(t)), Nu(t, e);
|
|
7695
7713
|
},
|
|
7696
7714
|
parseDateTime: function(t) {
|
|
7697
7715
|
switch (typeof t) {
|
|
7698
7716
|
case "undefined":
|
|
7699
7717
|
return;
|
|
7700
7718
|
case "number":
|
|
7701
|
-
return Nu(t);
|
|
7702
|
-
case "string":
|
|
7703
7719
|
return Eu(t);
|
|
7720
|
+
case "string":
|
|
7721
|
+
return Mu(t);
|
|
7704
7722
|
}
|
|
7705
7723
|
}
|
|
7706
7724
|
};
|
|
7707
|
-
function
|
|
7725
|
+
function Nu(t, e) {
|
|
7708
7726
|
if (!t || t.toUnixInteger() == 0)
|
|
7709
7727
|
return "--";
|
|
7710
7728
|
switch (e) {
|
|
@@ -7716,7 +7734,7 @@ function Ou(t, e) {
|
|
|
7716
7734
|
return t.toLocaleString({ timeStyle: "medium" });
|
|
7717
7735
|
}
|
|
7718
7736
|
}
|
|
7719
|
-
function
|
|
7737
|
+
function Eu(t) {
|
|
7720
7738
|
switch (!0) {
|
|
7721
7739
|
case t < 0:
|
|
7722
7740
|
return;
|
|
@@ -7726,12 +7744,12 @@ function Nu(t) {
|
|
|
7726
7744
|
return w.fromMillis(t);
|
|
7727
7745
|
}
|
|
7728
7746
|
}
|
|
7729
|
-
function
|
|
7747
|
+
function Mu(t) {
|
|
7730
7748
|
const e = [
|
|
7731
7749
|
w.fromISO,
|
|
7732
7750
|
function(n) {
|
|
7733
|
-
for (let r = 0; r <
|
|
7734
|
-
const s =
|
|
7751
|
+
for (let r = 0; r < ar.length; r++) {
|
|
7752
|
+
const s = ar[r], i = w.fromFormat(n, s);
|
|
7735
7753
|
if (i.isValid)
|
|
7736
7754
|
return i;
|
|
7737
7755
|
}
|
|
@@ -7743,16 +7761,16 @@ function Eu(t) {
|
|
|
7743
7761
|
return r;
|
|
7744
7762
|
}
|
|
7745
7763
|
}
|
|
7746
|
-
const
|
|
7764
|
+
const Cu = qe(
|
|
7747
7765
|
null
|
|
7748
|
-
), ve =
|
|
7749
|
-
function
|
|
7750
|
-
const [e, n] =
|
|
7766
|
+
), ve = qe(null);
|
|
7767
|
+
function Du(t) {
|
|
7768
|
+
const [e, n] = V({
|
|
7751
7769
|
layers: [],
|
|
7752
7770
|
rows: []
|
|
7753
7771
|
});
|
|
7754
7772
|
return /* @__PURE__ */ u.jsxs(
|
|
7755
|
-
|
|
7773
|
+
Cu.Provider,
|
|
7756
7774
|
{
|
|
7757
7775
|
value: {
|
|
7758
7776
|
layers: e.layers,
|
|
@@ -7768,27 +7786,27 @@ function Cu(t) {
|
|
|
7768
7786
|
}
|
|
7769
7787
|
),
|
|
7770
7788
|
e.layers.map((r, s) => {
|
|
7771
|
-
const i =
|
|
7789
|
+
const i = wn(s, e, n, !1);
|
|
7772
7790
|
return /* @__PURE__ */ u.jsx(ve.Provider, { value: i, children: r(() => i.hide()) }, s);
|
|
7773
7791
|
}),
|
|
7774
|
-
/* @__PURE__ */ u.jsx(
|
|
7792
|
+
/* @__PURE__ */ u.jsx(ju, { container: e, updateContainer: n })
|
|
7775
7793
|
]
|
|
7776
7794
|
}
|
|
7777
7795
|
);
|
|
7778
7796
|
}
|
|
7779
|
-
function
|
|
7797
|
+
function ju({
|
|
7780
7798
|
container: t,
|
|
7781
7799
|
updateContainer: e
|
|
7782
7800
|
}) {
|
|
7783
|
-
return /* @__PURE__ */ u.jsx(
|
|
7784
|
-
const s =
|
|
7801
|
+
return /* @__PURE__ */ u.jsx(uu, { children: t.rows.map((n, r) => {
|
|
7802
|
+
const s = wn(r, t, e, !0);
|
|
7785
7803
|
return /* @__PURE__ */ u.jsx(ve.Provider, { value: s, children: n(() => s.hide()) }, r);
|
|
7786
7804
|
}) });
|
|
7787
7805
|
}
|
|
7788
7806
|
function Iu(t, e) {
|
|
7789
|
-
return
|
|
7807
|
+
return wn(-1, t, e, !1);
|
|
7790
7808
|
}
|
|
7791
|
-
function
|
|
7809
|
+
function wn(t, e, n, r) {
|
|
7792
7810
|
return {
|
|
7793
7811
|
show: function(s) {
|
|
7794
7812
|
const i = {
|
|
@@ -7797,7 +7815,7 @@ function gn(t, e, n, r) {
|
|
|
7797
7815
|
}, a = i.layers.length - 1;
|
|
7798
7816
|
return n(() => i), function() {
|
|
7799
7817
|
n((o) => ({
|
|
7800
|
-
layers: o.layers.filter((l,
|
|
7818
|
+
layers: o.layers.filter((l, c) => c < a),
|
|
7801
7819
|
rows: o.rows
|
|
7802
7820
|
}));
|
|
7803
7821
|
};
|
|
@@ -7809,7 +7827,7 @@ function gn(t, e, n, r) {
|
|
|
7809
7827
|
}, a = i.rows.length - 1;
|
|
7810
7828
|
return n(() => i), function() {
|
|
7811
7829
|
n((o) => ({
|
|
7812
|
-
rows: o.rows.filter((l,
|
|
7830
|
+
rows: o.rows.filter((l, c) => c < a),
|
|
7813
7831
|
layers: o.layers
|
|
7814
7832
|
}));
|
|
7815
7833
|
};
|
|
@@ -7825,14 +7843,14 @@ function gn(t, e, n, r) {
|
|
|
7825
7843
|
}
|
|
7826
7844
|
};
|
|
7827
7845
|
}
|
|
7828
|
-
function
|
|
7829
|
-
return /* @__PURE__ */ u.jsx(
|
|
7846
|
+
function qu(t) {
|
|
7847
|
+
return /* @__PURE__ */ u.jsx(Du, { children: t.children });
|
|
7830
7848
|
}
|
|
7831
|
-
const Fu = "
|
|
7849
|
+
const Fu = "_appLayout_17a06_19", or = {
|
|
7832
7850
|
appLayout: Fu
|
|
7833
7851
|
};
|
|
7834
|
-
function
|
|
7835
|
-
const e = E(
|
|
7852
|
+
function Hu(t) {
|
|
7853
|
+
const e = E(or, t), n = pu(), r = {
|
|
7836
7854
|
...t,
|
|
7837
7855
|
...n ? t.mobile : void 0,
|
|
7838
7856
|
sizes: {
|
|
@@ -7850,10 +7868,10 @@ function Zu(t) {
|
|
|
7850
7868
|
left: s.left ? a(r.sizes?.left, r.sizes?.leftSpace) : 0,
|
|
7851
7869
|
right: s.right ? a(r.sizes?.right, r.sizes?.rightSpace) : 0
|
|
7852
7870
|
};
|
|
7853
|
-
return /* @__PURE__ */ u.jsx("div", { className: e.styles(
|
|
7854
|
-
s.header && /* @__PURE__ */ u.jsx(
|
|
7871
|
+
return /* @__PURE__ */ u.jsx("div", { className: e.styles(or.appLayout), children: /* @__PURE__ */ u.jsx(re, { palette: e.palette, children: /* @__PURE__ */ u.jsxs(q, { rect: { x: 0, y: 0, x2: 0, y2: 0 }, children: [
|
|
7872
|
+
s.header && /* @__PURE__ */ u.jsx(q, { rect: { x: 0, y: 0, x2: 0 }, height: i.header, children: r.header }),
|
|
7855
7873
|
s.left && /* @__PURE__ */ u.jsx(
|
|
7856
|
-
|
|
7874
|
+
q,
|
|
7857
7875
|
{
|
|
7858
7876
|
rect: { x: 0, y: i.header, y2: i.footer },
|
|
7859
7877
|
width: a(r.sizes?.left),
|
|
@@ -7861,7 +7879,7 @@ function Zu(t) {
|
|
|
7861
7879
|
}
|
|
7862
7880
|
),
|
|
7863
7881
|
/* @__PURE__ */ u.jsx(
|
|
7864
|
-
|
|
7882
|
+
q,
|
|
7865
7883
|
{
|
|
7866
7884
|
rect: {
|
|
7867
7885
|
x: i.left,
|
|
@@ -7874,63 +7892,65 @@ function Zu(t) {
|
|
|
7874
7892
|
}
|
|
7875
7893
|
),
|
|
7876
7894
|
s.right && /* @__PURE__ */ u.jsx(
|
|
7877
|
-
|
|
7895
|
+
q,
|
|
7878
7896
|
{
|
|
7879
7897
|
rect: { x2: 0, y: i.header, y2: i.footer },
|
|
7880
7898
|
width: a(r.sizes?.right),
|
|
7881
7899
|
children: r.right
|
|
7882
7900
|
}
|
|
7883
7901
|
),
|
|
7884
|
-
s.footer && /* @__PURE__ */ u.jsx(
|
|
7902
|
+
s.footer && /* @__PURE__ */ u.jsx(q, { rect: { x: 0, x2: 0, y2: 0 }, height: i.footer, children: r.footer })
|
|
7885
7903
|
] }) }) });
|
|
7886
7904
|
function a(...o) {
|
|
7887
|
-
const l = o.filter((
|
|
7888
|
-
if (o.find((
|
|
7905
|
+
const l = o.filter((d) => d !== void 0).reduce((d, m) => d + m, 0);
|
|
7906
|
+
if (o.find((d) => d !== void 0))
|
|
7889
7907
|
return t.sizeUnit ? l + t.sizeUnit : l;
|
|
7890
7908
|
}
|
|
7891
7909
|
}
|
|
7892
7910
|
export {
|
|
7893
|
-
|
|
7911
|
+
cr as CtxPalette,
|
|
7894
7912
|
ue as InputUtils,
|
|
7895
7913
|
Ee as MathUtils,
|
|
7896
7914
|
mr as MiscUtils,
|
|
7897
7915
|
sn as StrUtils,
|
|
7898
|
-
|
|
7899
|
-
|
|
7900
|
-
|
|
7901
|
-
|
|
7916
|
+
qu as TAppContainer,
|
|
7917
|
+
Hu as TAppLayout,
|
|
7918
|
+
an as TButton,
|
|
7919
|
+
Js as TCheckbox,
|
|
7902
7920
|
hr as TClosingEffectProvider,
|
|
7903
|
-
|
|
7904
|
-
|
|
7905
|
-
|
|
7921
|
+
Pu as TColLayout,
|
|
7922
|
+
ia as TDropDown,
|
|
7923
|
+
ua as TErrorPanel,
|
|
7906
7924
|
we as TForm,
|
|
7907
|
-
|
|
7908
|
-
|
|
7925
|
+
ir as TFormButton,
|
|
7926
|
+
fu as TFormField,
|
|
7909
7927
|
Ue as TGlass,
|
|
7910
|
-
|
|
7911
|
-
|
|
7912
|
-
|
|
7913
|
-
|
|
7914
|
-
|
|
7928
|
+
Ru as TGroupBox,
|
|
7929
|
+
Wu as THeading,
|
|
7930
|
+
bs as THorizLayout,
|
|
7931
|
+
Da as TLoadingBar,
|
|
7932
|
+
sa as TMenu,
|
|
7915
7933
|
$u as TNameValue,
|
|
7916
|
-
|
|
7934
|
+
Aa as TNotification,
|
|
7917
7935
|
re as TPaletteProvider,
|
|
7918
7936
|
vr as TProgressBar,
|
|
7919
|
-
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
|
|
7924
|
-
|
|
7937
|
+
Lu as TRadioButton,
|
|
7938
|
+
uu as TRowLayout,
|
|
7939
|
+
Au as TTable,
|
|
7940
|
+
on as TTextBox,
|
|
7941
|
+
cu as TVertLayout,
|
|
7942
|
+
q as TViewport,
|
|
7925
7943
|
vt as TWindow,
|
|
7926
|
-
|
|
7944
|
+
La as ViewUtils,
|
|
7927
7945
|
fr as useClosingEffect,
|
|
7928
|
-
|
|
7929
|
-
|
|
7930
|
-
|
|
7946
|
+
bu as useDataContext,
|
|
7947
|
+
zu as useDialog,
|
|
7948
|
+
dr as useFormContext,
|
|
7949
|
+
gn as useLayer,
|
|
7931
7950
|
pu as useMobile,
|
|
7932
|
-
|
|
7951
|
+
Ca as useMouseValue,
|
|
7933
7952
|
Su as useNewFormContext,
|
|
7934
|
-
|
|
7935
|
-
gt as useValue
|
|
7953
|
+
Uu as useNotifications,
|
|
7954
|
+
gt as useValue,
|
|
7955
|
+
Zu as useWidth
|
|
7936
7956
|
};
|