@vaebe/ccui 2.0.0-beta.0 → 2.0.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/button/index.es.js +28 -22
- package/button/index.umd.js +1 -1
- package/calendar/index.es.js +445 -90
- package/calendar/index.umd.js +1 -1
- package/ccui-cli.css +1 -1
- package/check-box/index.es.js +8 -2
- package/check-box/index.umd.js +1 -1
- package/chunk-Ndeg2fpE.js +20 -0
- package/collapse/index.es.js +10 -7
- package/collapse/index.umd.js +1 -1
- package/config-provider/chunk-C_CI6nMA.js +13 -0
- package/config-provider/en-BG83iZ_P.js +24 -0
- package/config-provider/index.es.js +408 -53
- package/config-provider/index.umd.js +1 -1
- package/config-provider/ja-B-93MQG5.js +56 -0
- package/config-provider/ko-86th3uXt.js +56 -0
- package/config-provider/zh-cn-BQE-LNg1.js +59 -0
- package/date-picker/ccui-cli.css +1 -1
- package/date-picker/index.es.js +664 -482
- package/date-picker/index.umd.js +1 -1
- package/drawer/index.es.js +271 -279
- package/drawer/index.umd.js +1 -1
- package/dropdown/index.es.js +187 -171
- package/dropdown/index.umd.js +1 -1
- package/empty/index.es.js +341 -24
- package/empty/index.umd.js +1 -1
- package/en-BVwCvuzF.js +24 -0
- package/float-button/index.es.js +1134 -46
- package/float-button/index.umd.js +1 -1
- package/form/index.es.js +1357 -261
- package/form/index.umd.js +1 -1
- package/icon/index.es.js +93 -10
- package/icon/index.umd.js +1 -1
- package/image/index.es.js +353 -36
- package/image/index.umd.js +1 -1
- package/input/index.es.js +24 -15
- package/input/index.umd.js +1 -1
- package/input-number/index.es.js +45 -25
- package/input-number/index.umd.js +1 -1
- package/ja-B4U4rt8A.js +56 -0
- package/ko-BG35I8uK.js +56 -0
- package/menu/index.es.js +3 -1
- package/menu/index.umd.js +1 -1
- package/message/index.es.js +1179 -86
- package/message/index.umd.js +1 -1
- package/modal/index.es.js +735 -335
- package/modal/index.umd.js +1 -1
- package/notification/index.es.js +1176 -83
- package/notification/index.umd.js +1 -1
- package/package.json +9 -9
- package/pagination/index.es.js +381 -60
- package/pagination/index.umd.js +1 -1
- package/popconfirm/index.es.js +469 -143
- package/popconfirm/index.umd.js +1 -1
- package/popover/index.es.js +192 -175
- package/popover/index.umd.js +1 -1
- package/radio/index.es.js +8 -2
- package/radio/index.umd.js +1 -1
- package/rate/index.es.js +22 -12
- package/rate/index.umd.js +1 -1
- package/select/index.es.js +135 -53
- package/select/index.umd.js +1 -1
- package/slider/index.es.js +165 -155
- package/slider/index.umd.js +1 -1
- package/steps/index.es.js +1140 -49
- package/steps/index.umd.js +1 -1
- package/switch/index.es.js +2 -0
- package/switch/index.umd.js +1 -1
- package/tabs/index.es.js +31 -5
- package/tabs/index.umd.js +1 -1
- package/tag/index.es.js +53 -35
- package/tag/index.umd.js +1 -1
- package/tooltip/index.es.js +78 -77
- package/tooltip/index.umd.js +1 -1
- package/tree/ccui-cli.css +1 -1
- package/tree/index.es.js +1491 -276
- package/tree/index.umd.js +1 -1
- package/typography/index.es.js +1213 -125
- package/typography/index.umd.js +1 -1
- package/vue-ccui.es.js +8726 -7604
- package/vue-ccui.umd.js +1 -1
- package/zh-cn-C8nbfD5S.js +59 -0
package/date-picker/index.es.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import * as e from "vue";
|
|
2
|
-
import { Fragment as t, Teleport as n, Transition as r, computed as i, createTextVNode as a, createVNode as o, defineComponent as s,
|
|
3
|
-
import { autoUpdate as
|
|
2
|
+
import { Fragment as t, Teleport as n, Transition as r, computed as i, createTextVNode as a, createVNode as o, defineComponent as s, getCurrentInstance as c, h as l, inject as u, nextTick as d, onMounted as f, onUnmounted as p, ref as m, shallowRef as h, watch as g } from "vue";
|
|
3
|
+
import { autoUpdate as _, computePosition as v, flip as y, offset as b, shift as x } from "@floating-ui/dom";
|
|
4
4
|
//#region \0rolldown/runtime.js
|
|
5
|
-
var
|
|
5
|
+
var S = Object.create, C = Object.defineProperty, w = Object.getOwnPropertyDescriptor, T = Object.getOwnPropertyNames, E = Object.getPrototypeOf, D = Object.prototype.hasOwnProperty, O = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), k = (e, t) => {
|
|
6
6
|
let n = {};
|
|
7
|
-
for (var r in e)
|
|
7
|
+
for (var r in e) C(n, r, {
|
|
8
8
|
get: e[r],
|
|
9
9
|
enumerable: !0
|
|
10
10
|
});
|
|
11
|
-
return t ||
|
|
12
|
-
},
|
|
13
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
11
|
+
return t || C(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
12
|
+
}, A = (e, t, n, r) => {
|
|
13
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = T(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !D.call(e, s) && s !== n && C(e, s, {
|
|
14
14
|
get: ((e) => t[e]).bind(null, s),
|
|
15
|
-
enumerable: !(r =
|
|
15
|
+
enumerable: !(r = w(t, s)) || r.enumerable
|
|
16
16
|
});
|
|
17
17
|
return e;
|
|
18
|
-
},
|
|
18
|
+
}, j = (e, t, n) => (A(e, t, "default"), n && A(n, t, "default")), M = (e, t, n) => (n = e == null ? {} : S(E(e)), A(t || !e || !e.__esModule ? C(n, "default", {
|
|
19
19
|
value: e,
|
|
20
20
|
enumerable: !0
|
|
21
|
-
}) : n, e)),
|
|
21
|
+
}) : n, e)), N = /* @__PURE__ */ M((/* @__PURE__ */ O(((e, t) => {
|
|
22
22
|
(function(n, r) {
|
|
23
23
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs = r();
|
|
24
24
|
})(e, (function() {
|
|
@@ -313,37 +313,37 @@ var x = Object.create, S = Object.defineProperty, C = Object.getOwnPropertyDescr
|
|
|
313
313
|
}, w.en = b[y], w.Ls = b, w.p = {}, w;
|
|
314
314
|
}));
|
|
315
315
|
})))(), 1);
|
|
316
|
-
function
|
|
316
|
+
function ee() {
|
|
317
317
|
return typeof window < "u";
|
|
318
318
|
}
|
|
319
|
-
function
|
|
320
|
-
return
|
|
319
|
+
function te(e) {
|
|
320
|
+
return P(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function ne(e) {
|
|
323
323
|
var t;
|
|
324
324
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
325
325
|
}
|
|
326
|
-
function
|
|
327
|
-
return
|
|
326
|
+
function P(e) {
|
|
327
|
+
return ee() ? e instanceof Node || e instanceof ne(e).Node : !1;
|
|
328
328
|
}
|
|
329
329
|
//#endregion
|
|
330
330
|
//#region ../../node_modules/.pnpm/vue-demi@0.14.10_vue@3.5.33_typescript@5.9.3_/node_modules/vue-demi/lib/index.mjs
|
|
331
|
-
var
|
|
331
|
+
var F = /* @__PURE__ */ k({
|
|
332
332
|
Vue: () => e,
|
|
333
333
|
Vue2: () => void 0,
|
|
334
|
-
del: () =>
|
|
335
|
-
install: () =>
|
|
334
|
+
del: () => L,
|
|
335
|
+
install: () => ie,
|
|
336
336
|
isVue2: () => !1,
|
|
337
337
|
isVue3: () => !0,
|
|
338
|
-
set: () =>
|
|
338
|
+
set: () => I
|
|
339
339
|
});
|
|
340
|
-
import * as
|
|
341
|
-
|
|
342
|
-
function
|
|
343
|
-
function
|
|
340
|
+
import * as re from "vue";
|
|
341
|
+
j(F, re);
|
|
342
|
+
function ie() {}
|
|
343
|
+
function I(e, t, n) {
|
|
344
344
|
return Array.isArray(e) ? (e.length = Math.max(e.length, t), e.splice(t, 1, n), n) : (e[t] = n, n);
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function L(e, t) {
|
|
347
347
|
if (Array.isArray(e)) {
|
|
348
348
|
e.splice(t, 1);
|
|
349
349
|
return;
|
|
@@ -352,40 +352,40 @@ function re(e, t) {
|
|
|
352
352
|
}
|
|
353
353
|
//#endregion
|
|
354
354
|
//#region ../../node_modules/.pnpm/@floating-ui+vue@1.1.9_vue@3.5.33_typescript@5.9.3_/node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs
|
|
355
|
-
function
|
|
355
|
+
function R(e) {
|
|
356
356
|
return typeof e == "object" && !!e && "$el" in e;
|
|
357
357
|
}
|
|
358
|
-
function
|
|
359
|
-
if (
|
|
358
|
+
function z(e) {
|
|
359
|
+
if (R(e)) {
|
|
360
360
|
let t = e.$el;
|
|
361
|
-
return
|
|
361
|
+
return P(t) && te(t) === "#comment" ? null : t;
|
|
362
362
|
}
|
|
363
363
|
return e;
|
|
364
364
|
}
|
|
365
|
-
function
|
|
366
|
-
return typeof e == "function" ? e() : (0,
|
|
365
|
+
function B(e) {
|
|
366
|
+
return typeof e == "function" ? e() : (0, F.unref)(e);
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function V(e) {
|
|
369
369
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
370
370
|
}
|
|
371
|
-
function
|
|
372
|
-
let n =
|
|
371
|
+
function H(e, t) {
|
|
372
|
+
let n = V(e);
|
|
373
373
|
return Math.round(t * n) / n;
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function ae(e, t, n) {
|
|
376
376
|
n === void 0 && (n = {});
|
|
377
|
-
let r = n.whileElementsMounted, i = (0,
|
|
377
|
+
let r = n.whileElementsMounted, i = (0, F.computed)(() => B(n.open) ?? !0), a = (0, F.computed)(() => B(n.middleware)), o = (0, F.computed)(() => B(n.placement) ?? "bottom"), s = (0, F.computed)(() => B(n.strategy) ?? "absolute"), c = (0, F.computed)(() => B(n.transform) ?? !0), l = (0, F.computed)(() => z(e.value)), u = (0, F.computed)(() => z(t.value)), d = (0, F.ref)(0), f = (0, F.ref)(0), p = (0, F.ref)(s.value), m = (0, F.ref)(o.value), h = (0, F.shallowRef)({}), g = (0, F.ref)(!1), _ = (0, F.computed)(() => {
|
|
378
378
|
let e = {
|
|
379
379
|
position: p.value,
|
|
380
380
|
left: "0",
|
|
381
381
|
top: "0"
|
|
382
382
|
};
|
|
383
383
|
if (!u.value) return e;
|
|
384
|
-
let t =
|
|
384
|
+
let t = H(u.value, d.value), n = H(u.value, f.value);
|
|
385
385
|
return c.value ? {
|
|
386
386
|
...e,
|
|
387
387
|
transform: "translate(" + t + "px, " + n + "px)",
|
|
388
|
-
...
|
|
388
|
+
...V(u.value) >= 1.5 && { willChange: "transform" }
|
|
389
389
|
} : {
|
|
390
390
|
position: p.value,
|
|
391
391
|
left: t + "px",
|
|
@@ -395,7 +395,7 @@ function se(e, t, n) {
|
|
|
395
395
|
function b() {
|
|
396
396
|
if (l.value == null || u.value == null) return;
|
|
397
397
|
let e = i.value;
|
|
398
|
-
|
|
398
|
+
v(l.value, u.value, {
|
|
399
399
|
middleware: a.value,
|
|
400
400
|
placement: o.value,
|
|
401
401
|
strategy: s.value
|
|
@@ -419,41 +419,41 @@ function se(e, t, n) {
|
|
|
419
419
|
function C() {
|
|
420
420
|
i.value || (g.value = !1);
|
|
421
421
|
}
|
|
422
|
-
return (0,
|
|
422
|
+
return (0, F.watch)([
|
|
423
423
|
a,
|
|
424
424
|
o,
|
|
425
425
|
s,
|
|
426
426
|
i
|
|
427
|
-
], b, { flush: "sync" }), (0,
|
|
428
|
-
x: (0,
|
|
429
|
-
y: (0,
|
|
430
|
-
strategy: (0,
|
|
431
|
-
placement: (0,
|
|
432
|
-
middlewareData: (0,
|
|
433
|
-
isPositioned: (0,
|
|
434
|
-
floatingStyles:
|
|
427
|
+
], b, { flush: "sync" }), (0, F.watch)([l, u], S, { flush: "sync" }), (0, F.watch)(i, C, { flush: "sync" }), (0, F.getCurrentScope)() && (0, F.onScopeDispose)(x), {
|
|
428
|
+
x: (0, F.shallowReadonly)(d),
|
|
429
|
+
y: (0, F.shallowReadonly)(f),
|
|
430
|
+
strategy: (0, F.shallowReadonly)(p),
|
|
431
|
+
placement: (0, F.shallowReadonly)(m),
|
|
432
|
+
middlewareData: (0, F.shallowReadonly)(h),
|
|
433
|
+
isPositioned: (0, F.shallowReadonly)(g),
|
|
434
|
+
floatingStyles: _,
|
|
435
435
|
update: b
|
|
436
436
|
};
|
|
437
437
|
}
|
|
438
438
|
//#endregion
|
|
439
439
|
//#region ../ccui/ui/shared/hooks/use-namespace.ts
|
|
440
|
-
function
|
|
440
|
+
function U(e, t, n) {
|
|
441
441
|
let r = e;
|
|
442
442
|
return t && (r += `__${t}`), n && (r += `--${n}`), r;
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function oe(e, t = !1) {
|
|
445
445
|
let n = t ? `.ccui-${e}` : `ccui-${e}`;
|
|
446
446
|
return {
|
|
447
|
-
b: () =>
|
|
448
|
-
e: (e) => e ?
|
|
449
|
-
m: (e) => e ?
|
|
450
|
-
em: (e, t) => e && t ?
|
|
447
|
+
b: () => U(n),
|
|
448
|
+
e: (e) => e ? U(n, e) : "",
|
|
449
|
+
m: (e) => e ? U(n, "", e) : "",
|
|
450
|
+
em: (e, t) => e && t ? U(n, e, t) : "",
|
|
451
451
|
is: (e) => `is-${e}`
|
|
452
452
|
};
|
|
453
453
|
}
|
|
454
454
|
//#endregion
|
|
455
455
|
//#region ../ccui/ui/locale/zh-CN.ts
|
|
456
|
-
var
|
|
456
|
+
var se = {
|
|
457
457
|
locale: "zh-CN",
|
|
458
458
|
Modal: {
|
|
459
459
|
okText: "确 定",
|
|
@@ -468,7 +468,10 @@ var le = {
|
|
|
468
468
|
AutoComplete: { notFoundContent: "暂无数据" },
|
|
469
469
|
Mentions: { notFoundContent: "暂无数据" },
|
|
470
470
|
Cascader: { notFoundContent: "暂无数据" },
|
|
471
|
-
TreeSelect: {
|
|
471
|
+
TreeSelect: {
|
|
472
|
+
notFoundContent: "暂无数据",
|
|
473
|
+
searchPlaceholder: "搜索"
|
|
474
|
+
},
|
|
472
475
|
Select: { notFoundContent: "暂无数据" },
|
|
473
476
|
Pagination: {
|
|
474
477
|
itemsPerPage: "条/页",
|
|
@@ -476,7 +479,8 @@ var le = {
|
|
|
476
479
|
page: "页",
|
|
477
480
|
prevPage: "上一页",
|
|
478
481
|
nextPage: "下一页",
|
|
479
|
-
total: "共 {total} 条"
|
|
482
|
+
total: "共 {total} 条",
|
|
483
|
+
pagination: "分页"
|
|
480
484
|
},
|
|
481
485
|
Image: {
|
|
482
486
|
loading: "加载中",
|
|
@@ -525,15 +529,30 @@ var le = {
|
|
|
525
529
|
nextYearLabel: "后一年",
|
|
526
530
|
nextMonthLabel: "下个月",
|
|
527
531
|
clearLabel: "清除"
|
|
532
|
+
},
|
|
533
|
+
Calendar: {
|
|
534
|
+
weekdaysShort: [
|
|
535
|
+
"日",
|
|
536
|
+
"一",
|
|
537
|
+
"二",
|
|
538
|
+
"三",
|
|
539
|
+
"四",
|
|
540
|
+
"五",
|
|
541
|
+
"六"
|
|
542
|
+
],
|
|
543
|
+
prevMonthLabel: "上个月",
|
|
544
|
+
nextMonthLabel: "下个月",
|
|
545
|
+
todayLabel: "今天",
|
|
546
|
+
monthFormat: "YYYY 年 M 月"
|
|
528
547
|
}
|
|
529
|
-
},
|
|
548
|
+
}, ce = Symbol("ccui-config");
|
|
530
549
|
//#endregion
|
|
531
550
|
//#region ../ccui/ui/config-provider/src/config-provider.tsx
|
|
532
|
-
function
|
|
533
|
-
return
|
|
551
|
+
function le() {
|
|
552
|
+
return u(ce, {
|
|
534
553
|
prefixCls: "ccui",
|
|
535
554
|
componentSize: "middle",
|
|
536
|
-
locale:
|
|
555
|
+
locale: se,
|
|
537
556
|
direction: "ltr",
|
|
538
557
|
theme: void 0,
|
|
539
558
|
iconPrefixCls: "ccui-icon"
|
|
@@ -541,7 +560,7 @@ function ue() {
|
|
|
541
560
|
}
|
|
542
561
|
//#endregion
|
|
543
562
|
//#region ../ccui/ui/form/src/form-types.ts
|
|
544
|
-
var
|
|
563
|
+
var ue = Symbol("ccuiFormItem"), de = /^[a-z0-9]+(-[a-z0-9]+)*$/, W = (e, t, n, r = "") => {
|
|
545
564
|
let i = e.split(":");
|
|
546
565
|
if (e.slice(0, 1) === "@") {
|
|
547
566
|
if (i.length < 2 || i.length > 3) return null;
|
|
@@ -554,7 +573,7 @@ var de = Symbol("ccuiFormItem"), H = /^[a-z0-9]+(-[a-z0-9]+)*$/, U = (e, t, n, r
|
|
|
554
573
|
prefix: n,
|
|
555
574
|
name: e
|
|
556
575
|
};
|
|
557
|
-
return t && !
|
|
576
|
+
return t && !G(a) ? null : a;
|
|
558
577
|
}
|
|
559
578
|
let a = i[0], o = a.split("-");
|
|
560
579
|
if (o.length > 1) {
|
|
@@ -563,7 +582,7 @@ var de = Symbol("ccuiFormItem"), H = /^[a-z0-9]+(-[a-z0-9]+)*$/, U = (e, t, n, r
|
|
|
563
582
|
prefix: o.shift(),
|
|
564
583
|
name: o.join("-")
|
|
565
584
|
};
|
|
566
|
-
return t && !
|
|
585
|
+
return t && !G(e) ? null : e;
|
|
567
586
|
}
|
|
568
587
|
if (n && r === "") {
|
|
569
588
|
let e = {
|
|
@@ -571,10 +590,10 @@ var de = Symbol("ccuiFormItem"), H = /^[a-z0-9]+(-[a-z0-9]+)*$/, U = (e, t, n, r
|
|
|
571
590
|
prefix: "",
|
|
572
591
|
name: a
|
|
573
592
|
};
|
|
574
|
-
return t && !
|
|
593
|
+
return t && !G(e, n) ? null : e;
|
|
575
594
|
}
|
|
576
595
|
return null;
|
|
577
|
-
},
|
|
596
|
+
}, G = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
|
|
578
597
|
function fe(e, t) {
|
|
579
598
|
let n = e.icons, r = e.aliases || Object.create(null), i = Object.create(null);
|
|
580
599
|
function a(e) {
|
|
@@ -588,7 +607,7 @@ function fe(e, t) {
|
|
|
588
607
|
}
|
|
589
608
|
return Object.keys(n).concat(Object.keys(r)).forEach(a), i;
|
|
590
609
|
}
|
|
591
|
-
var
|
|
610
|
+
var pe = Object.freeze({
|
|
592
611
|
left: 0,
|
|
593
612
|
top: 0,
|
|
594
613
|
width: 16,
|
|
@@ -598,32 +617,32 @@ var G = Object.freeze({
|
|
|
598
617
|
vFlip: !1,
|
|
599
618
|
hFlip: !1
|
|
600
619
|
}), q = Object.freeze({
|
|
601
|
-
...
|
|
620
|
+
...pe,
|
|
602
621
|
...K
|
|
603
|
-
}),
|
|
622
|
+
}), me = Object.freeze({
|
|
604
623
|
...q,
|
|
605
624
|
body: "",
|
|
606
625
|
hidden: !1
|
|
607
626
|
});
|
|
608
|
-
function
|
|
627
|
+
function J(e, t) {
|
|
609
628
|
let n = {};
|
|
610
629
|
!e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
|
|
611
630
|
let r = ((e.rotate || 0) + (t.rotate || 0)) % 4;
|
|
612
631
|
return r && (n.rotate = r), n;
|
|
613
632
|
}
|
|
614
633
|
function he(e, t) {
|
|
615
|
-
let n =
|
|
616
|
-
for (let r in
|
|
634
|
+
let n = J(e, t);
|
|
635
|
+
for (let r in me) r in K ? r in e && !(r in n) && (n[r] = K[r]) : r in t ? n[r] = t[r] : r in e && (n[r] = e[r]);
|
|
617
636
|
return n;
|
|
618
637
|
}
|
|
619
|
-
function
|
|
638
|
+
function Y(e, t, n) {
|
|
620
639
|
let r = e.icons, i = e.aliases || Object.create(null), a = {};
|
|
621
640
|
function o(e) {
|
|
622
641
|
a = he(r[e] || i[e], a);
|
|
623
642
|
}
|
|
624
643
|
return o(t), n.forEach(o), he(e, a);
|
|
625
644
|
}
|
|
626
|
-
function
|
|
645
|
+
function ge(e, t) {
|
|
627
646
|
let n = [];
|
|
628
647
|
if (typeof e != "object" || typeof e.icons != "object") return n;
|
|
629
648
|
e.not_found instanceof Array && e.not_found.forEach((e) => {
|
|
@@ -632,38 +651,38 @@ function _e(e, t) {
|
|
|
632
651
|
let r = fe(e);
|
|
633
652
|
for (let i in r) {
|
|
634
653
|
let a = r[i];
|
|
635
|
-
a && (t(i,
|
|
654
|
+
a && (t(i, Y(e, i, a)), n.push(i));
|
|
636
655
|
}
|
|
637
656
|
return n;
|
|
638
657
|
}
|
|
639
|
-
var
|
|
658
|
+
var _e = {
|
|
640
659
|
provider: "",
|
|
641
660
|
aliases: {},
|
|
642
661
|
not_found: {},
|
|
643
|
-
...
|
|
662
|
+
...pe
|
|
644
663
|
};
|
|
645
|
-
function
|
|
664
|
+
function ve(e, t) {
|
|
646
665
|
for (let n in t) if (n in e && typeof e[n] != typeof t[n]) return !1;
|
|
647
666
|
return !0;
|
|
648
667
|
}
|
|
649
|
-
function
|
|
668
|
+
function ye(e) {
|
|
650
669
|
if (typeof e != "object" || !e) return null;
|
|
651
670
|
let t = e;
|
|
652
|
-
if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !
|
|
671
|
+
if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !ve(e, _e)) return null;
|
|
653
672
|
let n = t.icons;
|
|
654
673
|
for (let e in n) {
|
|
655
674
|
let t = n[e];
|
|
656
|
-
if (!e || typeof t.body != "string" || !
|
|
675
|
+
if (!e || typeof t.body != "string" || !ve(t, me)) return null;
|
|
657
676
|
}
|
|
658
677
|
let r = t.aliases || Object.create(null);
|
|
659
678
|
for (let e in r) {
|
|
660
679
|
let t = r[e], i = t.parent;
|
|
661
|
-
if (!e || typeof i != "string" || !n[i] && !r[i] || !
|
|
680
|
+
if (!e || typeof i != "string" || !n[i] && !r[i] || !ve(t, me)) return null;
|
|
662
681
|
}
|
|
663
682
|
return t;
|
|
664
683
|
}
|
|
665
|
-
var
|
|
666
|
-
function
|
|
684
|
+
var be = Object.create(null);
|
|
685
|
+
function xe(e, t) {
|
|
667
686
|
return {
|
|
668
687
|
provider: e,
|
|
669
688
|
prefix: t,
|
|
@@ -671,66 +690,66 @@ function Se(e, t) {
|
|
|
671
690
|
missing: /* @__PURE__ */ new Set()
|
|
672
691
|
};
|
|
673
692
|
}
|
|
674
|
-
function
|
|
675
|
-
let n =
|
|
676
|
-
return n[t] || (n[t] =
|
|
693
|
+
function X(e, t) {
|
|
694
|
+
let n = be[e] || (be[e] = Object.create(null));
|
|
695
|
+
return n[t] || (n[t] = xe(e, t));
|
|
677
696
|
}
|
|
678
|
-
function
|
|
679
|
-
return
|
|
697
|
+
function Se(e, t) {
|
|
698
|
+
return ye(t) ? ge(t, (t, n) => {
|
|
680
699
|
n ? e.icons[t] = n : e.missing.add(t);
|
|
681
700
|
}) : [];
|
|
682
701
|
}
|
|
683
|
-
function
|
|
702
|
+
function Ce(e, t, n) {
|
|
684
703
|
try {
|
|
685
704
|
if (typeof n.body == "string") return e.icons[t] = { ...n }, !0;
|
|
686
705
|
} catch {}
|
|
687
706
|
return !1;
|
|
688
707
|
}
|
|
689
|
-
var
|
|
690
|
-
function
|
|
691
|
-
return typeof e == "boolean" && (
|
|
708
|
+
var Z = !1;
|
|
709
|
+
function we(e) {
|
|
710
|
+
return typeof e == "boolean" && (Z = e), Z;
|
|
692
711
|
}
|
|
693
|
-
function
|
|
694
|
-
let t = typeof e == "string" ?
|
|
712
|
+
function Te(e) {
|
|
713
|
+
let t = typeof e == "string" ? W(e, !0, Z) : e;
|
|
695
714
|
if (t) {
|
|
696
|
-
let e =
|
|
715
|
+
let e = X(t.provider, t.prefix), n = t.name;
|
|
697
716
|
return e.icons[n] || (e.missing.has(n) ? null : void 0);
|
|
698
717
|
}
|
|
699
718
|
}
|
|
700
|
-
function
|
|
701
|
-
let n =
|
|
719
|
+
function Ee(e, t) {
|
|
720
|
+
let n = W(e, !0, Z);
|
|
702
721
|
if (!n) return !1;
|
|
703
|
-
let r =
|
|
704
|
-
return t ?
|
|
722
|
+
let r = X(n.provider, n.prefix);
|
|
723
|
+
return t ? Ce(r, n.name, t) : (r.missing.add(n.name), !0);
|
|
705
724
|
}
|
|
706
|
-
function
|
|
725
|
+
function De(e, t) {
|
|
707
726
|
if (typeof e != "object") return !1;
|
|
708
|
-
if (typeof t != "string" && (t = e.provider || ""),
|
|
727
|
+
if (typeof t != "string" && (t = e.provider || ""), Z && !t && !e.prefix) {
|
|
709
728
|
let t = !1;
|
|
710
|
-
return
|
|
711
|
-
|
|
729
|
+
return ye(e) && (e.prefix = "", ge(e, (e, n) => {
|
|
730
|
+
Ee(e, n) && (t = !0);
|
|
712
731
|
})), t;
|
|
713
732
|
}
|
|
714
733
|
let n = e.prefix;
|
|
715
|
-
return
|
|
734
|
+
return G({
|
|
716
735
|
prefix: n,
|
|
717
736
|
name: "a"
|
|
718
|
-
}) ? !!
|
|
737
|
+
}) ? !!Se(X(t, n), e) : !1;
|
|
719
738
|
}
|
|
720
|
-
var
|
|
739
|
+
var Oe = Object.freeze({
|
|
721
740
|
width: null,
|
|
722
741
|
height: null
|
|
723
|
-
}),
|
|
724
|
-
...
|
|
742
|
+
}), ke = Object.freeze({
|
|
743
|
+
...Oe,
|
|
725
744
|
...K
|
|
726
|
-
}),
|
|
727
|
-
function
|
|
745
|
+
}), Ae = /(-?[0-9.]*[0-9]+[0-9.]*)/g, je = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
746
|
+
function Me(e, t, n) {
|
|
728
747
|
if (t === 1) return e;
|
|
729
748
|
if (n ||= 100, typeof e == "number") return Math.ceil(e * t * n) / n;
|
|
730
749
|
if (typeof e != "string") return e;
|
|
731
|
-
let r = e.split(
|
|
750
|
+
let r = e.split(Ae);
|
|
732
751
|
if (r === null || !r.length) return e;
|
|
733
|
-
let i = [], a = r.shift(), o =
|
|
752
|
+
let i = [], a = r.shift(), o = je.test(a);
|
|
734
753
|
for (;;) {
|
|
735
754
|
if (o) {
|
|
736
755
|
let e = parseFloat(a);
|
|
@@ -767,7 +786,7 @@ function Le(e, t) {
|
|
|
767
786
|
...q,
|
|
768
787
|
...e
|
|
769
788
|
}, r = {
|
|
770
|
-
...
|
|
789
|
+
...ke,
|
|
771
790
|
...t
|
|
772
791
|
}, i = {
|
|
773
792
|
left: n.left,
|
|
@@ -793,7 +812,7 @@ function Le(e, t) {
|
|
|
793
812
|
o % 2 == 1 && (i.left !== i.top && (s = i.left, i.left = i.top, i.top = s), i.width !== i.height && (s = i.width, i.width = i.height, i.height = s)), t.length && (a = Fe(a, "<g transform=\"" + t.join(" ") + "\">", "</g>"));
|
|
794
813
|
});
|
|
795
814
|
let o = r.width, s = r.height, c = i.width, l = i.height, u, d;
|
|
796
|
-
o === null ? (d = s === null ? "1em" : s === "auto" ? l : s, u =
|
|
815
|
+
o === null ? (d = s === null ? "1em" : s === "auto" ? l : s, u = Me(d, c / l)) : (u = o === "auto" ? c : o, d = s === null ? Me(u, l / c) : s === "auto" ? l : s);
|
|
797
816
|
let f = {}, p = (e, t) => {
|
|
798
817
|
Ie(t) || (f[e] = t.toString());
|
|
799
818
|
};
|
|
@@ -1014,7 +1033,7 @@ function st(e) {
|
|
|
1014
1033
|
return e.forEach((e) => {
|
|
1015
1034
|
if (r.name === e.name && r.prefix === e.prefix && r.provider === e.provider) return;
|
|
1016
1035
|
r = e;
|
|
1017
|
-
let i = e.provider, a = e.prefix, o = e.name, s = n[i] || (n[i] = Object.create(null)), c = s[a] || (s[a] =
|
|
1036
|
+
let i = e.provider, a = e.prefix, o = e.name, s = n[i] || (n[i] = Object.create(null)), c = s[a] || (s[a] = X(i, a)), l;
|
|
1018
1037
|
l = o in c.icons ? t.loaded : a === "" || c.missing.has(o) ? t.missing : t.pending;
|
|
1019
1038
|
let u = {
|
|
1020
1039
|
provider: i,
|
|
@@ -1027,7 +1046,7 @@ function st(e) {
|
|
|
1027
1046
|
function ct(e, t = !0, n = !1) {
|
|
1028
1047
|
let r = [];
|
|
1029
1048
|
return e.forEach((e) => {
|
|
1030
|
-
let i = typeof e == "string" ?
|
|
1049
|
+
let i = typeof e == "string" ? W(e, t, n) : e;
|
|
1031
1050
|
i && r.push(i);
|
|
1032
1051
|
}), r;
|
|
1033
1052
|
}
|
|
@@ -1200,13 +1219,13 @@ function _t(e) {
|
|
|
1200
1219
|
function vt(e) {
|
|
1201
1220
|
let t = [], n = [];
|
|
1202
1221
|
return e.forEach((e) => {
|
|
1203
|
-
(e.match(
|
|
1222
|
+
(e.match(de) ? t : n).push(e);
|
|
1204
1223
|
}), {
|
|
1205
1224
|
valid: t,
|
|
1206
1225
|
invalid: n
|
|
1207
1226
|
};
|
|
1208
1227
|
}
|
|
1209
|
-
function
|
|
1228
|
+
function yt(e, t, n) {
|
|
1210
1229
|
function r() {
|
|
1211
1230
|
let n = e.pendingIcons;
|
|
1212
1231
|
t.forEach((t) => {
|
|
@@ -1214,7 +1233,7 @@ function Z(e, t, n) {
|
|
|
1214
1233
|
});
|
|
1215
1234
|
}
|
|
1216
1235
|
if (n && typeof n == "object") try {
|
|
1217
|
-
if (!
|
|
1236
|
+
if (!Se(e, n).length) {
|
|
1218
1237
|
r();
|
|
1219
1238
|
return;
|
|
1220
1239
|
}
|
|
@@ -1223,29 +1242,29 @@ function Z(e, t, n) {
|
|
|
1223
1242
|
}
|
|
1224
1243
|
r(), _t(e);
|
|
1225
1244
|
}
|
|
1226
|
-
function
|
|
1245
|
+
function bt(e, t) {
|
|
1227
1246
|
e instanceof Promise ? e.then((e) => {
|
|
1228
1247
|
t(e);
|
|
1229
1248
|
}).catch(() => {
|
|
1230
1249
|
t(null);
|
|
1231
1250
|
}) : t(e);
|
|
1232
1251
|
}
|
|
1233
|
-
function
|
|
1252
|
+
function xt(e, t) {
|
|
1234
1253
|
e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
|
|
1235
1254
|
e.iconsQueueFlag = !1;
|
|
1236
1255
|
let { provider: t, prefix: n } = e, r = e.iconsToLoad;
|
|
1237
1256
|
if (delete e.iconsToLoad, !r || !r.length) return;
|
|
1238
1257
|
let i = e.loadIcon;
|
|
1239
1258
|
if (e.loadIcons && (r.length > 1 || !i)) {
|
|
1240
|
-
|
|
1241
|
-
|
|
1259
|
+
bt(e.loadIcons(r, n, t), (t) => {
|
|
1260
|
+
yt(e, r, t);
|
|
1242
1261
|
});
|
|
1243
1262
|
return;
|
|
1244
1263
|
}
|
|
1245
1264
|
if (i) {
|
|
1246
1265
|
r.forEach((r) => {
|
|
1247
|
-
|
|
1248
|
-
|
|
1266
|
+
bt(i(r, n, t), (t) => {
|
|
1267
|
+
yt(e, [r], t ? {
|
|
1249
1268
|
prefix: n,
|
|
1250
1269
|
icons: { [r]: t }
|
|
1251
1270
|
} : null);
|
|
@@ -1254,21 +1273,21 @@ function bt(e, t) {
|
|
|
1254
1273
|
return;
|
|
1255
1274
|
}
|
|
1256
1275
|
let { valid: a, invalid: o } = vt(r);
|
|
1257
|
-
if (o.length &&
|
|
1258
|
-
let s = n.match(
|
|
1276
|
+
if (o.length && yt(e, o, null), !a.length) return;
|
|
1277
|
+
let s = n.match(de) ? We(t) : null;
|
|
1259
1278
|
if (!s) {
|
|
1260
|
-
|
|
1279
|
+
yt(e, a, null);
|
|
1261
1280
|
return;
|
|
1262
1281
|
}
|
|
1263
1282
|
s.prepare(t, n, a).forEach((n) => {
|
|
1264
1283
|
ht(t, n, (t) => {
|
|
1265
|
-
|
|
1284
|
+
yt(e, n.icons, t);
|
|
1266
1285
|
});
|
|
1267
1286
|
});
|
|
1268
1287
|
}));
|
|
1269
1288
|
}
|
|
1270
|
-
var
|
|
1271
|
-
let n = st(ct(e, !0,
|
|
1289
|
+
var St = (e, t) => {
|
|
1290
|
+
let n = st(ct(e, !0, we()));
|
|
1272
1291
|
if (!n.pending.length) {
|
|
1273
1292
|
let e = !0;
|
|
1274
1293
|
return t && setTimeout(() => {
|
|
@@ -1281,28 +1300,28 @@ var xt = (e, t) => {
|
|
|
1281
1300
|
return n.pending.forEach((e) => {
|
|
1282
1301
|
let { provider: t, prefix: n } = e;
|
|
1283
1302
|
if (n === o && t === a) return;
|
|
1284
|
-
a = t, o = n, i.push(
|
|
1303
|
+
a = t, o = n, i.push(X(t, n));
|
|
1285
1304
|
let s = r[t] || (r[t] = Object.create(null));
|
|
1286
1305
|
s[n] || (s[n] = []);
|
|
1287
1306
|
}), n.pending.forEach((e) => {
|
|
1288
|
-
let { provider: t, prefix: n, name: i } = e, a =
|
|
1307
|
+
let { provider: t, prefix: n, name: i } = e, a = X(t, n), o = a.pendingIcons ||= /* @__PURE__ */ new Set();
|
|
1289
1308
|
o.has(i) || (o.add(i), r[t][n].push(i));
|
|
1290
1309
|
}), i.forEach((e) => {
|
|
1291
1310
|
let t = r[e.provider][e.prefix];
|
|
1292
|
-
t.length &&
|
|
1311
|
+
t.length && xt(e, t);
|
|
1293
1312
|
}), t ? ot(t, n, i) : gt;
|
|
1294
1313
|
};
|
|
1295
|
-
function
|
|
1314
|
+
function Ct(e, t) {
|
|
1296
1315
|
let n = { ...e };
|
|
1297
1316
|
for (let e in t) {
|
|
1298
1317
|
let r = t[e], i = typeof r;
|
|
1299
|
-
e in
|
|
1318
|
+
e in Oe ? (r === null || r && (i === "string" || i === "number")) && (n[e] = r) : i === typeof n[e] && (n[e] = e === "rotate" ? r % 4 : r);
|
|
1300
1319
|
}
|
|
1301
1320
|
return n;
|
|
1302
1321
|
}
|
|
1303
|
-
var
|
|
1304
|
-
function
|
|
1305
|
-
t.split(
|
|
1322
|
+
var wt = /[\s,]+/;
|
|
1323
|
+
function Tt(e, t) {
|
|
1324
|
+
t.split(wt).forEach((t) => {
|
|
1306
1325
|
switch (t.trim()) {
|
|
1307
1326
|
case "horizontal":
|
|
1308
1327
|
e.hFlip = !0;
|
|
@@ -1313,7 +1332,7 @@ function wt(e, t) {
|
|
|
1313
1332
|
}
|
|
1314
1333
|
});
|
|
1315
1334
|
}
|
|
1316
|
-
function
|
|
1335
|
+
function Et(e, t = 0) {
|
|
1317
1336
|
let n = e.replace(/^-?[0-9.]*/, "");
|
|
1318
1337
|
function r(e) {
|
|
1319
1338
|
for (; e < 0;) e += 4;
|
|
@@ -1337,51 +1356,51 @@ function Tt(e, t = 0) {
|
|
|
1337
1356
|
}
|
|
1338
1357
|
return t;
|
|
1339
1358
|
}
|
|
1340
|
-
function
|
|
1359
|
+
function Dt(e, t) {
|
|
1341
1360
|
let n = e.indexOf("xlink:") === -1 ? "" : " xmlns:xlink=\"http://www.w3.org/1999/xlink\"";
|
|
1342
1361
|
for (let e in t) n += " " + e + "=\"" + t[e] + "\"";
|
|
1343
1362
|
return "<svg xmlns=\"http://www.w3.org/2000/svg\"" + n + ">" + e + "</svg>";
|
|
1344
1363
|
}
|
|
1345
|
-
function Dt(e) {
|
|
1346
|
-
return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
|
|
1347
|
-
}
|
|
1348
1364
|
function Ot(e) {
|
|
1349
|
-
return "
|
|
1365
|
+
return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
|
|
1350
1366
|
}
|
|
1351
1367
|
function kt(e) {
|
|
1352
|
-
return "
|
|
1368
|
+
return "data:image/svg+xml," + Ot(e);
|
|
1369
|
+
}
|
|
1370
|
+
function At(e) {
|
|
1371
|
+
return "url(\"" + kt(e) + "\")";
|
|
1353
1372
|
}
|
|
1354
|
-
var
|
|
1355
|
-
...
|
|
1373
|
+
var jt = {
|
|
1374
|
+
...ke,
|
|
1356
1375
|
inline: !1
|
|
1357
|
-
},
|
|
1376
|
+
}, Mt = {
|
|
1358
1377
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1359
1378
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
1360
1379
|
"aria-hidden": !0,
|
|
1361
1380
|
role: "img"
|
|
1362
|
-
},
|
|
1381
|
+
}, Nt = { display: "inline-block" }, Pt = { backgroundColor: "currentColor" }, Ft = { backgroundColor: "transparent" }, It = {
|
|
1363
1382
|
Image: "var(--svg)",
|
|
1364
1383
|
Repeat: "no-repeat",
|
|
1365
1384
|
Size: "100% 100%"
|
|
1366
|
-
},
|
|
1367
|
-
webkitMask:
|
|
1368
|
-
mask:
|
|
1369
|
-
background:
|
|
1385
|
+
}, Lt = {
|
|
1386
|
+
webkitMask: Pt,
|
|
1387
|
+
mask: Pt,
|
|
1388
|
+
background: Ft
|
|
1370
1389
|
};
|
|
1371
|
-
for (let e in
|
|
1372
|
-
let t =
|
|
1373
|
-
for (let n in
|
|
1390
|
+
for (let e in Lt) {
|
|
1391
|
+
let t = Lt[e];
|
|
1392
|
+
for (let n in It) t[e + n] = It[n];
|
|
1374
1393
|
}
|
|
1375
|
-
var
|
|
1394
|
+
var Rt = {};
|
|
1376
1395
|
["horizontal", "vertical"].forEach((e) => {
|
|
1377
1396
|
let t = e.slice(0, 1) + "Flip";
|
|
1378
|
-
|
|
1397
|
+
Rt[e + "-flip"] = t, Rt[e.slice(0, 1) + "-flip"] = t, Rt[e + "Flip"] = t;
|
|
1379
1398
|
});
|
|
1380
|
-
function
|
|
1399
|
+
function zt(e) {
|
|
1381
1400
|
return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
|
|
1382
1401
|
}
|
|
1383
|
-
var
|
|
1384
|
-
let n =
|
|
1402
|
+
var Bt = (e, t) => {
|
|
1403
|
+
let n = Ct(jt, t), r = { ...Mt }, i = t.mode || "svg", a = {}, o = t.style, s = typeof o == "object" && !(o instanceof Array) ? o : {};
|
|
1385
1404
|
for (let e in t) {
|
|
1386
1405
|
let i = t[e];
|
|
1387
1406
|
if (i !== void 0) switch (e) {
|
|
@@ -1397,51 +1416,51 @@ var zt = (e, t) => {
|
|
|
1397
1416
|
n[e] = i === !0 || i === "true" || i === 1;
|
|
1398
1417
|
break;
|
|
1399
1418
|
case "flip":
|
|
1400
|
-
typeof i == "string" &&
|
|
1419
|
+
typeof i == "string" && Tt(n, i);
|
|
1401
1420
|
break;
|
|
1402
1421
|
case "color":
|
|
1403
1422
|
a.color = i;
|
|
1404
1423
|
break;
|
|
1405
1424
|
case "rotate":
|
|
1406
|
-
typeof i == "string" ? n[e] =
|
|
1425
|
+
typeof i == "string" ? n[e] = Et(i) : typeof i == "number" && (n[e] = i);
|
|
1407
1426
|
break;
|
|
1408
1427
|
case "ariaHidden":
|
|
1409
1428
|
case "aria-hidden":
|
|
1410
1429
|
i !== !0 && i !== "true" && delete r["aria-hidden"];
|
|
1411
1430
|
break;
|
|
1412
1431
|
default: {
|
|
1413
|
-
let t =
|
|
1414
|
-
t ? (i === !0 || i === "true" || i === 1) && (n[t] = !0) :
|
|
1432
|
+
let t = Rt[e];
|
|
1433
|
+
t ? (i === !0 || i === "true" || i === 1) && (n[t] = !0) : jt[e] === void 0 && (r[e] = i);
|
|
1415
1434
|
}
|
|
1416
1435
|
}
|
|
1417
1436
|
}
|
|
1418
|
-
let
|
|
1437
|
+
let c = Le(e, n), u = c.attributes;
|
|
1419
1438
|
if (n.inline && (a.verticalAlign = "-0.125em"), i === "svg") return r.style = {
|
|
1420
1439
|
...a,
|
|
1421
1440
|
...s
|
|
1422
|
-
}, Object.assign(r, u), r.innerHTML = Ve(
|
|
1423
|
-
let { body: d, width: f, height: p } = e, m = i === "mask" || (i === "bg" ? !1 : d.indexOf("currentColor") !== -1), h =
|
|
1441
|
+
}, Object.assign(r, u), r.innerHTML = Ve(c.body), l("svg", r);
|
|
1442
|
+
let { body: d, width: f, height: p } = e, m = i === "mask" || (i === "bg" ? !1 : d.indexOf("currentColor") !== -1), h = Dt(d, {
|
|
1424
1443
|
...u,
|
|
1425
1444
|
width: f + "",
|
|
1426
1445
|
height: p + ""
|
|
1427
1446
|
});
|
|
1428
1447
|
return r.style = {
|
|
1429
1448
|
...a,
|
|
1430
|
-
"--svg":
|
|
1431
|
-
width:
|
|
1432
|
-
height:
|
|
1433
|
-
...
|
|
1434
|
-
...m ?
|
|
1449
|
+
"--svg": At(h),
|
|
1450
|
+
width: zt(u.width),
|
|
1451
|
+
height: zt(u.height),
|
|
1452
|
+
...Nt,
|
|
1453
|
+
...m ? Pt : Ft,
|
|
1435
1454
|
...s
|
|
1436
|
-
},
|
|
1455
|
+
}, l("span", r);
|
|
1437
1456
|
};
|
|
1438
|
-
if (
|
|
1457
|
+
if (we(!0), Ue("", nt), typeof document < "u" && typeof window < "u") {
|
|
1439
1458
|
let e = window;
|
|
1440
1459
|
if (e.IconifyPreload !== void 0) {
|
|
1441
1460
|
let t = e.IconifyPreload, n = "Invalid IconifyPreload syntax.";
|
|
1442
1461
|
typeof t == "object" && t && (t instanceof Array ? t : [t]).forEach((e) => {
|
|
1443
1462
|
try {
|
|
1444
|
-
(typeof e != "object" || !e || e instanceof Array || typeof e.icons != "object" || typeof e.prefix != "string" || !
|
|
1463
|
+
(typeof e != "object" || !e || e instanceof Array || typeof e.icons != "object" || typeof e.prefix != "string" || !De(e)) && console.error(n);
|
|
1445
1464
|
} catch {
|
|
1446
1465
|
console.error(n);
|
|
1447
1466
|
}
|
|
@@ -1461,29 +1480,29 @@ if (Te(!0), Ue("", nt), typeof document < "u" && typeof window < "u") {
|
|
|
1461
1480
|
}
|
|
1462
1481
|
}
|
|
1463
1482
|
}
|
|
1464
|
-
var
|
|
1483
|
+
var Vt = {
|
|
1465
1484
|
...q,
|
|
1466
1485
|
body: ""
|
|
1467
|
-
},
|
|
1468
|
-
let n =
|
|
1486
|
+
}, Ht = s((e, { emit: t }) => {
|
|
1487
|
+
let n = m(null);
|
|
1469
1488
|
function r() {
|
|
1470
1489
|
n.value &&= (n.value.abort?.(), null);
|
|
1471
1490
|
}
|
|
1472
|
-
let i =
|
|
1491
|
+
let i = m(!!e.ssr), a = m(""), o = h(null);
|
|
1473
1492
|
function s() {
|
|
1474
1493
|
let i = e.icon;
|
|
1475
1494
|
if (typeof i == "object" && i && typeof i.body == "string") return a.value = "", { data: i };
|
|
1476
1495
|
let o;
|
|
1477
|
-
if (typeof i != "string" || (o =
|
|
1478
|
-
let s =
|
|
1496
|
+
if (typeof i != "string" || (o = W(i, !1, !0)) === null) return null;
|
|
1497
|
+
let s = Te(o);
|
|
1479
1498
|
if (!s) {
|
|
1480
1499
|
let e = n.value;
|
|
1481
1500
|
return (!e || e.name !== i) && (s === null ? n.value = { name: i } : n.value = {
|
|
1482
1501
|
name: i,
|
|
1483
|
-
abort:
|
|
1502
|
+
abort: St([o], c)
|
|
1484
1503
|
}), null;
|
|
1485
1504
|
}
|
|
1486
|
-
r(), a.value !== i && (a.value = i,
|
|
1505
|
+
r(), a.value !== i && (a.value = i, d(() => {
|
|
1487
1506
|
t("load", i);
|
|
1488
1507
|
}));
|
|
1489
1508
|
let l = e.customise;
|
|
@@ -1492,26 +1511,26 @@ var Bt = {
|
|
|
1492
1511
|
let e = l(s.body, o.name, o.prefix, o.provider);
|
|
1493
1512
|
typeof e == "string" && (s.body = e);
|
|
1494
1513
|
}
|
|
1495
|
-
let
|
|
1496
|
-
return o.prefix !== "" &&
|
|
1514
|
+
let u = ["iconify"];
|
|
1515
|
+
return o.prefix !== "" && u.push("iconify--" + o.prefix), o.provider !== "" && u.push("iconify--" + o.provider), {
|
|
1497
1516
|
data: s,
|
|
1498
|
-
classes:
|
|
1517
|
+
classes: u
|
|
1499
1518
|
};
|
|
1500
1519
|
}
|
|
1501
1520
|
function c() {
|
|
1502
1521
|
let e = s();
|
|
1503
1522
|
e ? e.data !== o.value?.data && (o.value = e) : o.value = null;
|
|
1504
1523
|
}
|
|
1505
|
-
return i.value ? c() :
|
|
1524
|
+
return i.value ? c() : f(() => {
|
|
1506
1525
|
i.value = !0, c();
|
|
1507
|
-
}),
|
|
1526
|
+
}), g(() => e.icon, c), p(r), () => {
|
|
1508
1527
|
let t = o.value;
|
|
1509
|
-
if (!t) return
|
|
1528
|
+
if (!t) return Bt(Vt, e);
|
|
1510
1529
|
let n = e;
|
|
1511
1530
|
return t.classes && (n = {
|
|
1512
1531
|
...e,
|
|
1513
1532
|
class: t.classes.join(" ")
|
|
1514
|
-
}),
|
|
1533
|
+
}), Bt({
|
|
1515
1534
|
...q,
|
|
1516
1535
|
...t.data
|
|
1517
1536
|
}, n);
|
|
@@ -1538,18 +1557,98 @@ var Bt = {
|
|
|
1538
1557
|
"title"
|
|
1539
1558
|
],
|
|
1540
1559
|
emits: ["load"]
|
|
1541
|
-
})
|
|
1560
|
+
}), Ut = {
|
|
1561
|
+
prefix: "mdi",
|
|
1562
|
+
icons: {
|
|
1563
|
+
"alert-circle": {
|
|
1564
|
+
width: 24,
|
|
1565
|
+
height: 24,
|
|
1566
|
+
body: "<path fill=\"currentColor\" d=\"M13 13h-2V7h2m0 10h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2Z\"/>"
|
|
1567
|
+
},
|
|
1568
|
+
"arrow-up": {
|
|
1569
|
+
width: 24,
|
|
1570
|
+
height: 24,
|
|
1571
|
+
body: "<path fill=\"currentColor\" d=\"M13 20h-2V8l-5.5 5.5l-1.42-1.42L12 4.16l7.92 7.92l-1.42 1.42L13 8v12Z\"/>"
|
|
1572
|
+
},
|
|
1573
|
+
"calendar-outline": {
|
|
1574
|
+
width: 24,
|
|
1575
|
+
height: 24,
|
|
1576
|
+
body: "<path fill=\"currentColor\" d=\"M12 12h5v5h-5v-5m7-9h-1V1h-2v2H8V1H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 2v2H5V5h14M5 19V9h14v10H5Z\"/>"
|
|
1577
|
+
},
|
|
1578
|
+
check: {
|
|
1579
|
+
width: 24,
|
|
1580
|
+
height: 24,
|
|
1581
|
+
body: "<path fill=\"currentColor\" d=\"M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59L21 7Z\"/>"
|
|
1582
|
+
},
|
|
1583
|
+
"check-circle": {
|
|
1584
|
+
width: 24,
|
|
1585
|
+
height: 24,
|
|
1586
|
+
body: "<path fill=\"currentColor\" d=\"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10s10-4.5 10-10S17.5 2 12 2m-2 15l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9Z\"/>"
|
|
1587
|
+
},
|
|
1588
|
+
"chevron-right": {
|
|
1589
|
+
width: 24,
|
|
1590
|
+
height: 24,
|
|
1591
|
+
body: "<path fill=\"currentColor\" d=\"M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6l-1.41-1.42Z\"/>"
|
|
1592
|
+
},
|
|
1593
|
+
"clock-outline": {
|
|
1594
|
+
width: 24,
|
|
1595
|
+
height: 24,
|
|
1596
|
+
body: "<path fill=\"currentColor\" d=\"M12 20a8 8 0 0 0 8-8a8 8 0 0 0-8-8a8 8 0 0 0-8 8a8 8 0 0 0 8 8m0-18a10 10 0 0 1 10 10a10 10 0 0 1-10 10C6.47 22 2 17.5 2 12A10 10 0 0 1 12 2m.5 5v5.25l4.5 2.67l-.75 1.23L11 13V7h1.5Z\"/>"
|
|
1597
|
+
},
|
|
1598
|
+
close: {
|
|
1599
|
+
width: 24,
|
|
1600
|
+
height: 24,
|
|
1601
|
+
body: "<path fill=\"currentColor\" d=\"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z\"/>"
|
|
1602
|
+
},
|
|
1603
|
+
"close-circle": {
|
|
1604
|
+
width: 24,
|
|
1605
|
+
height: 24,
|
|
1606
|
+
body: "<path fill=\"currentColor\" d=\"M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12S6.47 2 12 2m3.59 5L12 10.59L8.41 7L7 8.41L10.59 12L7 15.59L8.41 17L12 13.41L15.59 17L17 15.59L13.41 12L17 8.41L15.59 7Z\"/>"
|
|
1607
|
+
},
|
|
1608
|
+
"content-copy": {
|
|
1609
|
+
width: 24,
|
|
1610
|
+
height: 24,
|
|
1611
|
+
body: "<path fill=\"currentColor\" d=\"M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1Z\"/>"
|
|
1612
|
+
},
|
|
1613
|
+
loading: {
|
|
1614
|
+
width: 24,
|
|
1615
|
+
height: 24,
|
|
1616
|
+
body: "<path fill=\"currentColor\" d=\"M12 4V2A10 10 0 0 0 2 12h2a8 8 0 0 1 8-8Z\"/>"
|
|
1617
|
+
},
|
|
1618
|
+
magnify: {
|
|
1619
|
+
width: 24,
|
|
1620
|
+
height: 24,
|
|
1621
|
+
body: "<path fill=\"currentColor\" d=\"M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5l-1.5 1.5l-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16A6.5 6.5 0 0 1 3 9.5A6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14S14 12 14 9.5S12 5 9.5 5Z\"/>"
|
|
1622
|
+
},
|
|
1623
|
+
"menu-down": {
|
|
1624
|
+
width: 24,
|
|
1625
|
+
height: 24,
|
|
1626
|
+
body: "<path fill=\"currentColor\" d=\"m7 10l5 5l5-5H7Z\"/>"
|
|
1627
|
+
},
|
|
1628
|
+
"menu-right": {
|
|
1629
|
+
width: 24,
|
|
1630
|
+
height: 24,
|
|
1631
|
+
body: "<path fill=\"currentColor\" d=\"m10 17l5-5l-5-5v10Z\"/>"
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
}, Wt = !1;
|
|
1635
|
+
function Gt() {
|
|
1636
|
+
Wt ||= (De(Ut), !0);
|
|
1637
|
+
}
|
|
1638
|
+
//#endregion
|
|
1639
|
+
//#region ../icons/dist/install.js
|
|
1640
|
+
Gt();
|
|
1542
1641
|
//#endregion
|
|
1543
1642
|
//#region ../ccui/ui/shared/hooks/use-icon.ts
|
|
1544
|
-
function
|
|
1643
|
+
function Kt(e) {
|
|
1545
1644
|
return e.includes(":");
|
|
1546
1645
|
}
|
|
1547
|
-
function
|
|
1548
|
-
return e ? typeof e == "string" ?
|
|
1646
|
+
function qt(e) {
|
|
1647
|
+
return e ? typeof e == "string" ? Kt(e) ? l(Ht, { icon: e }) : l("i", { class: e }) : e : null;
|
|
1549
1648
|
}
|
|
1550
1649
|
//#endregion
|
|
1551
1650
|
//#region ../../node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/advancedFormat.js
|
|
1552
|
-
var
|
|
1651
|
+
var Jt = /* @__PURE__ */ O(((e, t) => {
|
|
1553
1652
|
(function(n, r) {
|
|
1554
1653
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_advancedFormat = r();
|
|
1555
1654
|
})(e, (function() {
|
|
@@ -1582,7 +1681,7 @@ var Wt = /* @__PURE__ */ D(((e, t) => {
|
|
|
1582
1681
|
};
|
|
1583
1682
|
};
|
|
1584
1683
|
}));
|
|
1585
|
-
})),
|
|
1684
|
+
})), Yt = /* @__PURE__ */ O(((e, t) => {
|
|
1586
1685
|
(function(n, r) {
|
|
1587
1686
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_customParseFormat = r();
|
|
1588
1687
|
})(e, (function() {
|
|
@@ -1738,7 +1837,7 @@ var Wt = /* @__PURE__ */ D(((e, t) => {
|
|
|
1738
1837
|
};
|
|
1739
1838
|
};
|
|
1740
1839
|
}));
|
|
1741
|
-
})),
|
|
1840
|
+
})), Xt = /* @__PURE__ */ O(((e, t) => {
|
|
1742
1841
|
(function(n, r) {
|
|
1743
1842
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_quarterOfYear = r();
|
|
1744
1843
|
})(e, (function() {
|
|
@@ -1763,30 +1862,30 @@ var Wt = /* @__PURE__ */ D(((e, t) => {
|
|
|
1763
1862
|
};
|
|
1764
1863
|
};
|
|
1765
1864
|
}));
|
|
1766
|
-
})),
|
|
1767
|
-
|
|
1865
|
+
})), Zt = /* @__PURE__ */ M(Jt(), 1), Qt = /* @__PURE__ */ M(Yt(), 1), $t = /* @__PURE__ */ M(Xt(), 1);
|
|
1866
|
+
N.default.extend(Qt.default), N.default.extend($t.default), N.default.extend(Zt.default);
|
|
1768
1867
|
function Q(e, t) {
|
|
1769
1868
|
if (e == null || e === "") return null;
|
|
1770
1869
|
if (typeof e == "string" && t) {
|
|
1771
|
-
let n = (0,
|
|
1870
|
+
let n = (0, N.default)(e, t, !0);
|
|
1772
1871
|
return n.isValid() ? n : null;
|
|
1773
1872
|
}
|
|
1774
|
-
let n = (0,
|
|
1873
|
+
let n = (0, N.default)(e);
|
|
1775
1874
|
return n.isValid() ? n : null;
|
|
1776
1875
|
}
|
|
1777
|
-
function
|
|
1876
|
+
function en(e, t, n) {
|
|
1778
1877
|
return e === null ? null : t === "date" ? e.toDate() : t === "number" ? e.valueOf() : e.format(n);
|
|
1779
1878
|
}
|
|
1780
|
-
function
|
|
1879
|
+
function tn(e, t) {
|
|
1781
1880
|
return !e || !t ? e === t : e.year() === t.year() && e.month() === t.month() && e.date() === t.date();
|
|
1782
1881
|
}
|
|
1783
|
-
function
|
|
1882
|
+
function nn(e, t) {
|
|
1784
1883
|
return !e || !t ? e === t : e.year() === t.year() && e.month() === t.month();
|
|
1785
1884
|
}
|
|
1786
|
-
function
|
|
1787
|
-
return
|
|
1885
|
+
function rn(e) {
|
|
1886
|
+
return tn(e, (0, N.default)());
|
|
1788
1887
|
}
|
|
1789
|
-
function
|
|
1888
|
+
function an(e, t, n) {
|
|
1790
1889
|
let r = t > 0 ? t : 1, i = n ? new Set(n) : null, a = [];
|
|
1791
1890
|
for (let t = 0; t < e; t += r) a.push({
|
|
1792
1891
|
value: t,
|
|
@@ -1794,7 +1893,7 @@ function en(e, t, n) {
|
|
|
1794
1893
|
});
|
|
1795
1894
|
return a;
|
|
1796
1895
|
}
|
|
1797
|
-
function
|
|
1896
|
+
function on(e, t = 0) {
|
|
1798
1897
|
let n = e.startOf("month"), r = (n.day() - t + 7) % 7, i = n.subtract(r, "day"), a = [];
|
|
1799
1898
|
for (let t = 0; t < 42; t += 1) {
|
|
1800
1899
|
let n = i.add(t, "day");
|
|
@@ -1802,13 +1901,13 @@ function tn(e, t = 0) {
|
|
|
1802
1901
|
date: n,
|
|
1803
1902
|
day: n.date(),
|
|
1804
1903
|
isCurrentMonth: n.month() === e.month() && n.year() === e.year(),
|
|
1805
|
-
isToday:
|
|
1904
|
+
isToday: rn(n)
|
|
1806
1905
|
});
|
|
1807
1906
|
}
|
|
1808
1907
|
return a;
|
|
1809
1908
|
}
|
|
1810
|
-
function
|
|
1811
|
-
let t = e.year(), n = (0,
|
|
1909
|
+
function sn(e) {
|
|
1910
|
+
let t = e.year(), n = (0, N.default)(), r = [];
|
|
1812
1911
|
for (let i = 0; i < 12; i += 1) r.push({
|
|
1813
1912
|
date: e.year(t).month(i).date(1),
|
|
1814
1913
|
month: i,
|
|
@@ -1816,8 +1915,8 @@ function nn(e) {
|
|
|
1816
1915
|
});
|
|
1817
1916
|
return r;
|
|
1818
1917
|
}
|
|
1819
|
-
function
|
|
1820
|
-
let t = e.year(), n = Math.floor(t / 10) * 10, r = (0,
|
|
1918
|
+
function cn(e) {
|
|
1919
|
+
let t = e.year(), n = Math.floor(t / 10) * 10, r = (0, N.default)().year(), i = [];
|
|
1821
1920
|
for (let t = -1; t <= 10; t += 1) {
|
|
1822
1921
|
let a = n + t;
|
|
1823
1922
|
i.push({
|
|
@@ -1829,8 +1928,8 @@ function rn(e) {
|
|
|
1829
1928
|
}
|
|
1830
1929
|
return i;
|
|
1831
1930
|
}
|
|
1832
|
-
function
|
|
1833
|
-
let t = e.year(), n = (0,
|
|
1931
|
+
function ln(e) {
|
|
1932
|
+
let t = e.year(), n = (0, N.default)(), r = Math.floor(n.month() / 3) + 1, i = [];
|
|
1834
1933
|
for (let a = 1; a <= 4; a += 1) {
|
|
1835
1934
|
let o = (a - 1) * 3;
|
|
1836
1935
|
i.push({
|
|
@@ -1841,16 +1940,16 @@ function an(e) {
|
|
|
1841
1940
|
}
|
|
1842
1941
|
return i;
|
|
1843
1942
|
}
|
|
1844
|
-
function
|
|
1943
|
+
function un(e, t = 0) {
|
|
1845
1944
|
let n = e.startOf("day");
|
|
1846
1945
|
if (t === 1) {
|
|
1847
|
-
let e = (n.day() + 6) % 7, t = n.add(3 - e, "day"), r = t.year(), i = (0,
|
|
1946
|
+
let e = (n.day() + 6) % 7, t = n.add(3 - e, "day"), r = t.year(), i = (0, N.default)(new Date(r, 0, 4)), a = (i.day() + 6) % 7, o = i.subtract(a, "day").startOf("day");
|
|
1848
1947
|
return {
|
|
1849
1948
|
weekYear: r,
|
|
1850
1949
|
weekNumber: Math.floor(t.diff(o, "day") / 7) + 1
|
|
1851
1950
|
};
|
|
1852
1951
|
}
|
|
1853
|
-
let r = n.year(), i = (0,
|
|
1952
|
+
let r = n.year(), i = (0, N.default)(new Date(r, 0, 1)).startOf("day"), a = i.subtract(i.day(), "day");
|
|
1854
1953
|
return {
|
|
1855
1954
|
weekYear: r,
|
|
1856
1955
|
weekNumber: Math.floor(n.diff(a, "day") / 7) + 1
|
|
@@ -1858,13 +1957,13 @@ function on(e, t = 0) {
|
|
|
1858
1957
|
}
|
|
1859
1958
|
//#endregion
|
|
1860
1959
|
//#region ../ccui/ui/date-picker/src/date-picker-types.ts
|
|
1861
|
-
var
|
|
1960
|
+
var dn = {
|
|
1862
1961
|
date: "YYYY-MM-DD",
|
|
1863
1962
|
week: "YYYY-MM-DD",
|
|
1864
1963
|
month: "YYYY-MM",
|
|
1865
1964
|
year: "YYYY",
|
|
1866
1965
|
quarter: "YYYY-[Q]Q"
|
|
1867
|
-
},
|
|
1966
|
+
}, fn = {
|
|
1868
1967
|
modelValue: {
|
|
1869
1968
|
type: [
|
|
1870
1969
|
String,
|
|
@@ -1918,6 +2017,28 @@ var sn = {
|
|
|
1918
2017
|
type: Function,
|
|
1919
2018
|
default: void 0
|
|
1920
2019
|
},
|
|
2020
|
+
minDate: {
|
|
2021
|
+
type: [
|
|
2022
|
+
String,
|
|
2023
|
+
Number,
|
|
2024
|
+
Date,
|
|
2025
|
+
Object
|
|
2026
|
+
],
|
|
2027
|
+
default: void 0
|
|
2028
|
+
},
|
|
2029
|
+
maxDate: {
|
|
2030
|
+
type: [
|
|
2031
|
+
String,
|
|
2032
|
+
Number,
|
|
2033
|
+
Date,
|
|
2034
|
+
Object
|
|
2035
|
+
],
|
|
2036
|
+
default: void 0
|
|
2037
|
+
},
|
|
2038
|
+
disabledTime: {
|
|
2039
|
+
type: Function,
|
|
2040
|
+
default: void 0
|
|
2041
|
+
},
|
|
1921
2042
|
placement: {
|
|
1922
2043
|
type: String,
|
|
1923
2044
|
default: "bottomLeft"
|
|
@@ -1974,12 +2095,12 @@ var sn = {
|
|
|
1974
2095
|
type: Object,
|
|
1975
2096
|
default: void 0
|
|
1976
2097
|
}
|
|
1977
|
-
},
|
|
2098
|
+
}, pn = {
|
|
1978
2099
|
bottomLeft: "bottom-start",
|
|
1979
2100
|
bottomRight: "bottom-end",
|
|
1980
2101
|
topLeft: "top-start",
|
|
1981
2102
|
topRight: "top-end"
|
|
1982
|
-
},
|
|
2103
|
+
}, mn = [
|
|
1983
2104
|
"日",
|
|
1984
2105
|
"一",
|
|
1985
2106
|
"二",
|
|
@@ -1987,7 +2108,7 @@ var sn = {
|
|
|
1987
2108
|
"四",
|
|
1988
2109
|
"五",
|
|
1989
2110
|
"六"
|
|
1990
|
-
],
|
|
2111
|
+
], hn = "YYYY 年 M 月", gn = [
|
|
1991
2112
|
"1月",
|
|
1992
2113
|
"2月",
|
|
1993
2114
|
"3月",
|
|
@@ -2000,38 +2121,38 @@ var sn = {
|
|
|
2000
2121
|
"10月",
|
|
2001
2122
|
"11月",
|
|
2002
2123
|
"12月"
|
|
2003
|
-
],
|
|
2124
|
+
], _n = [
|
|
2004
2125
|
"Q1",
|
|
2005
2126
|
"Q2",
|
|
2006
2127
|
"Q3",
|
|
2007
2128
|
"Q4"
|
|
2008
|
-
],
|
|
2009
|
-
function
|
|
2129
|
+
], vn = "{weekYear}-W{weekNumber}";
|
|
2130
|
+
function yn(e) {
|
|
2010
2131
|
return e === "month" ? "month" : e === "year" ? "year" : e === "quarter" ? "quarter" : "date";
|
|
2011
2132
|
}
|
|
2012
|
-
function
|
|
2133
|
+
function bn(e, t) {
|
|
2013
2134
|
let n = e.day(), r = t === 0 ? n : (n + 6) % 7;
|
|
2014
2135
|
return e.subtract(r, "day").startOf("day");
|
|
2015
2136
|
}
|
|
2016
|
-
function
|
|
2017
|
-
return !e || !t ? e === t :
|
|
2137
|
+
function xn(e, t, n) {
|
|
2138
|
+
return !e || !t ? e === t : bn(e, n).isSame(bn(t, n), "day");
|
|
2018
2139
|
}
|
|
2019
|
-
function
|
|
2140
|
+
function Sn(e, t) {
|
|
2020
2141
|
return !e || !t ? e === t : e.year() === t.year() && Math.floor(e.month() / 3) === Math.floor(t.month() / 3);
|
|
2021
2142
|
}
|
|
2022
|
-
function
|
|
2143
|
+
function Cn(e, t) {
|
|
2023
2144
|
let n = String(t.weekNumber).padStart(2, "0");
|
|
2024
2145
|
return e.replace("{weekYear}", String(t.weekYear)).replace("{weekNumber}", n);
|
|
2025
2146
|
}
|
|
2026
|
-
function
|
|
2147
|
+
function wn(e) {
|
|
2027
2148
|
return e === !0 || e === !1 || e == null ? {} : e;
|
|
2028
2149
|
}
|
|
2029
|
-
function
|
|
2150
|
+
function Tn(e) {
|
|
2030
2151
|
return String(e).padStart(2, "0");
|
|
2031
2152
|
}
|
|
2032
2153
|
var $ = /* @__PURE__ */ s({
|
|
2033
2154
|
name: "CDatePicker",
|
|
2034
|
-
props:
|
|
2155
|
+
props: fn,
|
|
2035
2156
|
emits: [
|
|
2036
2157
|
"update:modelValue",
|
|
2037
2158
|
"change",
|
|
@@ -2040,394 +2161,455 @@ var $ = /* @__PURE__ */ s({
|
|
|
2040
2161
|
"blur",
|
|
2041
2162
|
"panel-change"
|
|
2042
2163
|
],
|
|
2043
|
-
setup(e, { emit: s, slots:
|
|
2044
|
-
let
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2164
|
+
setup(e, { emit: s, slots: v }) {
|
|
2165
|
+
let S = oe("date-picker"), C = le(), w = i(() => C.locale?.DatePicker ?? {}), T = `ccui-date-picker-popup-${c()?.uid ?? 0}`, E = m(null), D = m(null), O = m(null), k = h(!1), A = u(ue, null), j = i(() => !!e.showTime && e.picker === "date"), M = i(() => wn(e.showTime)), ee = i(() => Q(e.minDate)), te = i(() => Q(e.maxDate));
|
|
2166
|
+
function ne(e, t = "day") {
|
|
2167
|
+
let n = ee.value, r = te.value;
|
|
2168
|
+
if (t === "day") return !!(n && e.isBefore(n, "day") || r && e.isAfter(r, "day"));
|
|
2169
|
+
let i = e.startOf(t), a = e.endOf(t);
|
|
2170
|
+
return !!(n && a.isBefore(n, "day") || r && i.isAfter(r, "day"));
|
|
2171
|
+
}
|
|
2172
|
+
function P(t, n = "day") {
|
|
2173
|
+
return ne(t, n) ? !0 : !!e.disabledDate?.(t);
|
|
2174
|
+
}
|
|
2175
|
+
let F = i(() => j.value ? M.value.format || "HH:mm:ss" : ""), re = i(() => /s/.test(F.value)), ie = i(() => /m/.test(F.value)), I = i(() => e.format ? e.format : j.value ? `${dn.date} ${F.value}` : dn[e.picker]), L = i(() => Q(e.modelValue, I.value)), R = h(L.value ?? Q(void 0) ?? Q(/* @__PURE__ */ new Date())), z = h(yn(e.picker)), B = h(null), V = h(!1), H = h(null);
|
|
2176
|
+
g(L, (e) => {
|
|
2177
|
+
e && !nn(e, R.value) && (R.value = e);
|
|
2178
|
+
}), g(() => e.picker, (e) => {
|
|
2179
|
+
z.value = yn(e);
|
|
2049
2180
|
});
|
|
2050
|
-
let
|
|
2051
|
-
placement:
|
|
2052
|
-
open:
|
|
2053
|
-
whileElementsMounted:
|
|
2181
|
+
let U = i(() => pn[e.placement]), se = i(() => typeof document > "u" ? null : e.getPopupContainer ? e.getPopupContainer(E.value) : e.popupAppendToBody ? document.body : null), ce = i(() => se.value !== null), { floatingStyles: de } = ae(E, D, {
|
|
2182
|
+
placement: U,
|
|
2183
|
+
open: k,
|
|
2184
|
+
whileElementsMounted: _,
|
|
2054
2185
|
middleware: [
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2186
|
+
b(4),
|
|
2187
|
+
y(),
|
|
2188
|
+
x({ padding: 8 })
|
|
2058
2189
|
],
|
|
2059
|
-
strategy: i(() =>
|
|
2060
|
-
}),
|
|
2061
|
-
if (!
|
|
2190
|
+
strategy: i(() => ce.value ? "fixed" : "absolute")
|
|
2191
|
+
}), W = i(() => A?.validateStatus.value ?? ""), G = i(() => e.status || W.value), fe = i(() => {
|
|
2192
|
+
if (!L.value) return "";
|
|
2062
2193
|
if (e.picker === "week") {
|
|
2063
|
-
let t =
|
|
2064
|
-
return
|
|
2194
|
+
let t = un(L.value, e.weekStart);
|
|
2195
|
+
return Cn(w.value.weekFormat || vn, t);
|
|
2065
2196
|
}
|
|
2066
|
-
return
|
|
2067
|
-
}),
|
|
2068
|
-
function
|
|
2069
|
-
|
|
2197
|
+
return L.value.format(I.value);
|
|
2198
|
+
}), pe = i(() => e.placeholder || w.value.placeholder || "请选择日期");
|
|
2199
|
+
function K(e) {
|
|
2200
|
+
z.value !== e && (z.value = e, s("panel-change", e, R.value));
|
|
2070
2201
|
}
|
|
2071
|
-
function
|
|
2072
|
-
if (
|
|
2073
|
-
let e = Q(
|
|
2074
|
-
return e ? (0,
|
|
2202
|
+
function q() {
|
|
2203
|
+
if (L.value) return L.value;
|
|
2204
|
+
let e = Q(M.value.defaultValue);
|
|
2205
|
+
return e ? (0, N.default)().hour(e.hour()).minute(e.minute()).second(e.second()) : (0, N.default)().hour(0).minute(0).second(0).millisecond(0);
|
|
2075
2206
|
}
|
|
2076
|
-
function
|
|
2077
|
-
e.disabled ||
|
|
2207
|
+
function me() {
|
|
2208
|
+
e.disabled || k.value || (k.value = !0, s("open-change", !0), L.value && (R.value = L.value), z.value = yn(e.picker), B.value = j.value ? q() : null, V.value = !1);
|
|
2078
2209
|
}
|
|
2079
|
-
function
|
|
2080
|
-
|
|
2210
|
+
function J() {
|
|
2211
|
+
k.value && (k.value = !1, H.value = null, s("open-change", !1));
|
|
2081
2212
|
}
|
|
2082
|
-
function
|
|
2083
|
-
|
|
2213
|
+
function he() {
|
|
2214
|
+
k.value ? J() : me();
|
|
2084
2215
|
}
|
|
2085
|
-
function
|
|
2086
|
-
let n =
|
|
2087
|
-
s("update:modelValue", n), s("change", n, t ? t.format(
|
|
2216
|
+
function Y(t) {
|
|
2217
|
+
let n = en(t, e.valueFormat, I.value);
|
|
2218
|
+
s("update:modelValue", n), s("change", n, t ? t.format(I.value) : ""), A?.validate("change");
|
|
2088
2219
|
}
|
|
2089
|
-
function
|
|
2090
|
-
if (!
|
|
2220
|
+
function ge(t) {
|
|
2221
|
+
if (!P(t)) {
|
|
2091
2222
|
if (e.picker === "week") {
|
|
2092
|
-
let n =
|
|
2093
|
-
if (
|
|
2094
|
-
|
|
2223
|
+
let n = bn(t, e.weekStart);
|
|
2224
|
+
if (L.value && xn(L.value, t, e.weekStart)) {
|
|
2225
|
+
J();
|
|
2095
2226
|
return;
|
|
2096
2227
|
}
|
|
2097
|
-
|
|
2228
|
+
Y(n), J();
|
|
2098
2229
|
return;
|
|
2099
2230
|
}
|
|
2100
|
-
if (
|
|
2101
|
-
let e =
|
|
2102
|
-
|
|
2231
|
+
if (j.value) {
|
|
2232
|
+
let e = B.value ?? q();
|
|
2233
|
+
B.value = t.hour(e.hour()).minute(e.minute()).second(e.second()).millisecond(0), V.value = !0;
|
|
2103
2234
|
return;
|
|
2104
2235
|
}
|
|
2105
|
-
if (
|
|
2106
|
-
|
|
2236
|
+
if (L.value && tn(L.value, t)) {
|
|
2237
|
+
J();
|
|
2107
2238
|
return;
|
|
2108
2239
|
}
|
|
2109
|
-
|
|
2240
|
+
Y(t), J();
|
|
2110
2241
|
}
|
|
2111
2242
|
}
|
|
2112
|
-
function
|
|
2113
|
-
let n =
|
|
2114
|
-
e === "hour" ?
|
|
2243
|
+
function _e(e, t) {
|
|
2244
|
+
let n = B.value ?? q();
|
|
2245
|
+
e === "hour" ? B.value = n.hour(t) : e === "minute" ? B.value = n.minute(t) : B.value = n.second(t), V.value = !0;
|
|
2115
2246
|
}
|
|
2116
|
-
function
|
|
2117
|
-
let e = (0,
|
|
2118
|
-
|
|
2247
|
+
function ve() {
|
|
2248
|
+
let e = (0, N.default)();
|
|
2249
|
+
j.value ? Y(e) : Y(e.startOf("day")), J();
|
|
2119
2250
|
}
|
|
2120
|
-
function
|
|
2121
|
-
if (!
|
|
2122
|
-
|
|
2251
|
+
function ye() {
|
|
2252
|
+
if (!B.value) {
|
|
2253
|
+
J();
|
|
2123
2254
|
return;
|
|
2124
2255
|
}
|
|
2125
|
-
|
|
2256
|
+
Y(B.value), J();
|
|
2126
2257
|
}
|
|
2127
|
-
function
|
|
2258
|
+
function be(t) {
|
|
2128
2259
|
let n = Q(typeof t.value == "function" ? t.value() : t.value);
|
|
2129
2260
|
if (n) {
|
|
2130
|
-
if (
|
|
2131
|
-
|
|
2261
|
+
if (j.value) {
|
|
2262
|
+
B.value = n, V.value = !0, R.value = n;
|
|
2132
2263
|
return;
|
|
2133
2264
|
}
|
|
2134
|
-
e.picker === "week" ?
|
|
2265
|
+
e.picker === "week" ? Y(bn(n, e.weekStart)) : Y(n), J();
|
|
2135
2266
|
}
|
|
2136
2267
|
}
|
|
2137
|
-
function
|
|
2138
|
-
if (!
|
|
2268
|
+
function xe(t) {
|
|
2269
|
+
if (!P(t, "month")) {
|
|
2139
2270
|
if (e.picker === "month") {
|
|
2140
|
-
|
|
2271
|
+
Y(t), J();
|
|
2141
2272
|
return;
|
|
2142
2273
|
}
|
|
2143
|
-
|
|
2274
|
+
R.value = t, K("date");
|
|
2144
2275
|
}
|
|
2145
2276
|
}
|
|
2146
|
-
function
|
|
2147
|
-
if (!
|
|
2277
|
+
function X(t) {
|
|
2278
|
+
if (!P(t, "year")) {
|
|
2148
2279
|
if (e.picker === "year") {
|
|
2149
|
-
|
|
2280
|
+
Y(t), J();
|
|
2150
2281
|
return;
|
|
2151
2282
|
}
|
|
2152
|
-
|
|
2283
|
+
R.value = t, e.picker === "quarter" ? K("quarter") : K("month");
|
|
2153
2284
|
}
|
|
2154
2285
|
}
|
|
2155
|
-
function
|
|
2156
|
-
e
|
|
2286
|
+
function Se(e) {
|
|
2287
|
+
P(e, "quarter") || (Y(e), J());
|
|
2157
2288
|
}
|
|
2158
|
-
function
|
|
2159
|
-
|
|
2289
|
+
function Ce() {
|
|
2290
|
+
z.value === "date" ? R.value = R.value.subtract(1, "month") : z.value === "month" || z.value === "quarter" ? R.value = R.value.subtract(1, "year") : z.value === "year" && (R.value = R.value.subtract(10, "year"));
|
|
2160
2291
|
}
|
|
2161
|
-
function
|
|
2162
|
-
|
|
2292
|
+
function Z() {
|
|
2293
|
+
z.value === "date" ? R.value = R.value.add(1, "month") : z.value === "month" || z.value === "quarter" ? R.value = R.value.add(1, "year") : z.value === "year" && (R.value = R.value.add(10, "year"));
|
|
2163
2294
|
}
|
|
2164
|
-
function
|
|
2165
|
-
|
|
2295
|
+
function we() {
|
|
2296
|
+
z.value === "date" ? R.value = R.value.subtract(1, "year") : (z.value === "month" || z.value === "quarter") && (R.value = R.value.subtract(10, "year"));
|
|
2166
2297
|
}
|
|
2167
|
-
function
|
|
2168
|
-
|
|
2298
|
+
function Te() {
|
|
2299
|
+
z.value === "date" ? R.value = R.value.add(1, "year") : (z.value === "month" || z.value === "quarter") && (R.value = R.value.add(10, "year"));
|
|
2169
2300
|
}
|
|
2170
|
-
function
|
|
2171
|
-
|
|
2301
|
+
function Ee() {
|
|
2302
|
+
z.value === "date" ? K("month") : (z.value === "month" || z.value === "quarter") && K("year");
|
|
2172
2303
|
}
|
|
2173
|
-
function
|
|
2174
|
-
e.stopPropagation(),
|
|
2304
|
+
function De(e) {
|
|
2305
|
+
e.stopPropagation(), L.value && Y(null);
|
|
2175
2306
|
}
|
|
2176
|
-
function
|
|
2177
|
-
if (!
|
|
2307
|
+
function Oe(e) {
|
|
2308
|
+
if (!k.value) return;
|
|
2178
2309
|
let t = e.target;
|
|
2179
|
-
t && (
|
|
2310
|
+
t && (E.value?.contains(t) || D.value?.contains(t) || J());
|
|
2180
2311
|
}
|
|
2181
|
-
|
|
2182
|
-
document.addEventListener("mousedown",
|
|
2183
|
-
}),
|
|
2184
|
-
document.removeEventListener("mousedown",
|
|
2312
|
+
f(() => {
|
|
2313
|
+
document.addEventListener("mousedown", Oe, !0), e.autoFocus && d(() => O.value?.focus());
|
|
2314
|
+
}), p(() => {
|
|
2315
|
+
document.removeEventListener("mousedown", Oe, !0);
|
|
2185
2316
|
});
|
|
2186
|
-
let
|
|
2187
|
-
if (
|
|
2188
|
-
if (
|
|
2189
|
-
let e = Math.floor(
|
|
2317
|
+
let ke = i(() => e.clearable && !e.disabled && !!L.value), Ae = i(() => {
|
|
2318
|
+
if (z.value === "date") return R.value.format(w.value.panelLabelFormat || hn);
|
|
2319
|
+
if (z.value === "month" || z.value === "quarter") return String(R.value.year());
|
|
2320
|
+
let e = Math.floor(R.value.year() / 10) * 10;
|
|
2190
2321
|
return `${e}-${e + 9}`;
|
|
2191
|
-
}),
|
|
2192
|
-
let t =
|
|
2322
|
+
}), je = i(() => w.value.monthNamesShort ?? gn), Me = i(() => w.value.quarterNames ?? _n), Ne = i(() => {
|
|
2323
|
+
let t = w.value.weekdaysShort ?? mn;
|
|
2193
2324
|
return e.weekStart === 1 ? [...t.slice(1), t[0]] : t;
|
|
2194
|
-
}),
|
|
2195
|
-
function
|
|
2196
|
-
let e =
|
|
2197
|
-
return o("div", { class:
|
|
2325
|
+
}), Pe = i(() => w.value.weekHeader || "周");
|
|
2326
|
+
function Fe() {
|
|
2327
|
+
let e = z.value, t = e !== "year", n = e === "date" ? "prev-month" : e === "year" ? "prev-decade" : "prev-year", r = e === "date" ? "next-month" : e === "year" ? "next-decade" : "next-year", i = e === "date" ? "prev-year" : "prev-decade", s = e === "date" ? "next-year" : "next-decade", c = e === "date" ? w.value.prevMonthLabel || "上个月" : e === "year" ? "前十年" : w.value.prevYearLabel || "前一年", l = e === "date" ? w.value.nextMonthLabel || "下个月" : e === "year" ? "后十年" : w.value.nextYearLabel || "后一年", u = e === "date" ? w.value.prevYearLabel || "前一年" : "前十年", d = e === "date" ? w.value.nextYearLabel || "后一年" : "后十年";
|
|
2328
|
+
return o("div", { class: S.e("panel-header") }, [
|
|
2198
2329
|
t && o("button", {
|
|
2199
2330
|
type: "button",
|
|
2200
|
-
class: [
|
|
2331
|
+
class: [S.e("arrow"), S.em("arrow", i)],
|
|
2201
2332
|
"aria-label": u,
|
|
2202
|
-
onClick:
|
|
2333
|
+
onClick: we
|
|
2203
2334
|
}, [a("«")]),
|
|
2204
2335
|
o("button", {
|
|
2205
2336
|
type: "button",
|
|
2206
|
-
class: [
|
|
2337
|
+
class: [S.e("arrow"), S.em("arrow", n)],
|
|
2207
2338
|
"aria-label": c,
|
|
2208
|
-
onClick:
|
|
2339
|
+
onClick: Ce
|
|
2209
2340
|
}, [a("‹")]),
|
|
2210
2341
|
o("span", {
|
|
2211
|
-
class: [
|
|
2342
|
+
class: [S.e("panel-label"), e !== "year" && S.em("panel-label", "clickable")],
|
|
2212
2343
|
role: "button",
|
|
2213
|
-
onClick:
|
|
2214
|
-
}, [
|
|
2344
|
+
onClick: Ee
|
|
2345
|
+
}, [Ae.value]),
|
|
2215
2346
|
o("button", {
|
|
2216
2347
|
type: "button",
|
|
2217
|
-
class: [
|
|
2348
|
+
class: [S.e("arrow"), S.em("arrow", r)],
|
|
2218
2349
|
"aria-label": l,
|
|
2219
|
-
onClick:
|
|
2350
|
+
onClick: Z
|
|
2220
2351
|
}, [a("›")]),
|
|
2221
2352
|
t && o("button", {
|
|
2222
2353
|
type: "button",
|
|
2223
|
-
class: [
|
|
2354
|
+
class: [S.e("arrow"), S.em("arrow", s)],
|
|
2224
2355
|
"aria-label": d,
|
|
2225
|
-
onClick:
|
|
2356
|
+
onClick: Te
|
|
2226
2357
|
}, [a("»")])
|
|
2227
2358
|
]);
|
|
2228
2359
|
}
|
|
2229
|
-
let
|
|
2230
|
-
function
|
|
2231
|
-
let
|
|
2360
|
+
let Ie = i(() => j.value ? B.value : L.value);
|
|
2361
|
+
function Le() {
|
|
2362
|
+
let t = M.value.disabledHours?.() ?? [], n = e.disabledTime?.(B.value)?.disabledHours?.() ?? [];
|
|
2363
|
+
return t.length === 0 ? n : n.length === 0 ? t : Array.from(new Set([...t, ...n]));
|
|
2364
|
+
}
|
|
2365
|
+
function Re(t) {
|
|
2366
|
+
let n = M.value.disabledMinutes?.() ?? [], r = e.disabledTime?.(B.value)?.disabledMinutes?.(t) ?? [];
|
|
2367
|
+
return n.length === 0 ? r : r.length === 0 ? n : Array.from(new Set([...n, ...r]));
|
|
2368
|
+
}
|
|
2369
|
+
function ze(t, n) {
|
|
2370
|
+
let r = M.value.disabledSeconds?.() ?? [], i = e.disabledTime?.(B.value)?.disabledSeconds?.(t, n) ?? [];
|
|
2371
|
+
return r.length === 0 ? i : i.length === 0 ? r : Array.from(new Set([...r, ...i]));
|
|
2372
|
+
}
|
|
2373
|
+
function Be(e, t, n) {
|
|
2374
|
+
return v.cell ? v.cell({
|
|
2375
|
+
current: e,
|
|
2376
|
+
type: t,
|
|
2377
|
+
today: (0, N.default)()
|
|
2378
|
+
}) : o("span", { class: S.e("cell-inner") }, [n]);
|
|
2379
|
+
}
|
|
2380
|
+
function Ve(t) {
|
|
2381
|
+
if (e.disabled) return;
|
|
2382
|
+
let n = t.key;
|
|
2383
|
+
if (!k.value) {
|
|
2384
|
+
(n === "Enter" || n === " " || n === "ArrowDown") && (t.preventDefault(), me());
|
|
2385
|
+
return;
|
|
2386
|
+
}
|
|
2387
|
+
if (n === "Escape") {
|
|
2388
|
+
t.preventDefault(), J();
|
|
2389
|
+
return;
|
|
2390
|
+
}
|
|
2391
|
+
if (n === "Tab") {
|
|
2392
|
+
J();
|
|
2393
|
+
return;
|
|
2394
|
+
}
|
|
2395
|
+
if (z.value !== "date") return;
|
|
2396
|
+
let r = H.value ?? Ie.value ?? R.value, i = null;
|
|
2397
|
+
if (n === "ArrowLeft") i = r.subtract(1, "day");
|
|
2398
|
+
else if (n === "ArrowRight") i = r.add(1, "day");
|
|
2399
|
+
else if (n === "ArrowUp") i = r.subtract(7, "day");
|
|
2400
|
+
else if (n === "ArrowDown") i = r.add(7, "day");
|
|
2401
|
+
else if (n === "Enter") {
|
|
2402
|
+
t.preventDefault(), H.value && ge(H.value);
|
|
2403
|
+
return;
|
|
2404
|
+
}
|
|
2405
|
+
i && (t.preventDefault(), H.value = i, nn(i, R.value) || (R.value = i));
|
|
2406
|
+
}
|
|
2407
|
+
function He() {
|
|
2408
|
+
let n = on(R.value, e.weekStart), r = [];
|
|
2232
2409
|
for (let e = 0; e < 6; e += 1) r.push(n.slice(e * 7, e * 7 + 7));
|
|
2233
|
-
let i = e.picker === "week", a =
|
|
2234
|
-
return o(t, null, [o("div", { class: [
|
|
2235
|
-
let r = i ?
|
|
2236
|
-
return o(t, null, [r && o("div", { class: [
|
|
2237
|
-
let
|
|
2410
|
+
let i = e.picker === "week", a = Ie.value;
|
|
2411
|
+
return o(t, null, [o("div", { class: [S.e("week-row"), i && S.em("week-row", "with-week")] }, [i && o("div", { class: S.e("week-cell") }, [Pe.value]), Ne.value.map((e) => o("div", { class: S.e("week-cell") }, [e]))]), o("div", { class: [S.e("grid"), i && S.em("grid", "with-week")] }, [r.map((n) => {
|
|
2412
|
+
let r = i ? un(n[0].date, e.weekStart) : null, s = i && !!a && n.some((t) => xn(a, t.date, e.weekStart));
|
|
2413
|
+
return o(t, null, [r && o("div", { class: [S.e("week-number"), s && S.em("week-number", "selected")] }, [r.weekNumber]), n.map((e) => {
|
|
2414
|
+
let t = P(e.date), n = i ? s : !!a && tn(a, e.date), r = !!H.value && tn(H.value, e.date);
|
|
2238
2415
|
return o("div", {
|
|
2239
2416
|
class: [
|
|
2240
|
-
|
|
2241
|
-
!
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
i && s &&
|
|
2245
|
-
|
|
2417
|
+
S.e("cell"),
|
|
2418
|
+
!e.isCurrentMonth && S.em("cell", "outside"),
|
|
2419
|
+
e.isToday && S.em("cell", "today"),
|
|
2420
|
+
n && S.em("cell", "selected"),
|
|
2421
|
+
i && s && S.em("cell", "in-week"),
|
|
2422
|
+
t && S.em("cell", "disabled"),
|
|
2423
|
+
r && S.em("cell", "focused")
|
|
2246
2424
|
],
|
|
2247
2425
|
role: "gridcell",
|
|
2248
|
-
"aria-selected":
|
|
2249
|
-
"aria-disabled":
|
|
2250
|
-
onClick: () => !
|
|
2251
|
-
}, [
|
|
2426
|
+
"aria-selected": n,
|
|
2427
|
+
"aria-disabled": t,
|
|
2428
|
+
onClick: () => !t && ge(e.date)
|
|
2429
|
+
}, [Be(e.date, "date", e.day)]);
|
|
2252
2430
|
})]);
|
|
2253
2431
|
})])]);
|
|
2254
2432
|
}
|
|
2255
|
-
function
|
|
2256
|
-
let t =
|
|
2257
|
-
t.hideDisabledOptions && (
|
|
2258
|
-
let
|
|
2433
|
+
function Ue(e) {
|
|
2434
|
+
let t = M.value, n = e === "hour" ? 24 : 60, r = e === "hour" ? t.hourStep ?? 1 : e === "minute" ? t.minuteStep ?? 1 : t.secondStep ?? 1, i = B.value?.hour() ?? 0, a = B.value?.minute() ?? 0, s = an(n, r, e === "hour" ? Le() : e === "minute" ? Re(i) : ze(i, a));
|
|
2435
|
+
t.hideDisabledOptions && (s = s.filter((e) => !e.disabled));
|
|
2436
|
+
let c = B.value, l = c ? e === "hour" ? c.hour() : e === "minute" ? c.minute() : c.second() : -1;
|
|
2259
2437
|
return o("div", {
|
|
2260
|
-
class: [
|
|
2438
|
+
class: [S.e("time-column"), S.em("time-column", e)],
|
|
2261
2439
|
role: "listbox"
|
|
2262
|
-
}, [
|
|
2263
|
-
let n = t.value ===
|
|
2440
|
+
}, [s.map((t) => {
|
|
2441
|
+
let n = t.value === l;
|
|
2264
2442
|
return o("div", {
|
|
2265
2443
|
class: [
|
|
2266
|
-
|
|
2267
|
-
n &&
|
|
2268
|
-
t.disabled &&
|
|
2444
|
+
S.e("time-cell"),
|
|
2445
|
+
n && S.em("time-cell", "selected"),
|
|
2446
|
+
t.disabled && S.em("time-cell", "disabled")
|
|
2269
2447
|
],
|
|
2270
2448
|
role: "option",
|
|
2271
2449
|
"aria-selected": n,
|
|
2272
2450
|
"aria-disabled": t.disabled,
|
|
2273
|
-
onClick: () => !t.disabled &&
|
|
2274
|
-
}, [
|
|
2451
|
+
onClick: () => !t.disabled && _e(e, t.value)
|
|
2452
|
+
}, [Tn(t.value)]);
|
|
2275
2453
|
})]);
|
|
2276
2454
|
}
|
|
2277
|
-
function
|
|
2278
|
-
return o("div", { class:
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2455
|
+
function We() {
|
|
2456
|
+
return o("div", { class: S.e("time-columns") }, [
|
|
2457
|
+
Ue("hour"),
|
|
2458
|
+
ie.value && Ue("minute"),
|
|
2459
|
+
re.value && Ue("second")
|
|
2282
2460
|
]);
|
|
2283
2461
|
}
|
|
2284
|
-
function
|
|
2285
|
-
return o("ul", { class:
|
|
2462
|
+
function Ge() {
|
|
2463
|
+
return o("ul", { class: S.e("presets") }, [e.presets.map((e) => {
|
|
2286
2464
|
let t = typeof e.label == "function" ? e.label() : e.label;
|
|
2287
2465
|
return o("li", {
|
|
2288
|
-
class:
|
|
2466
|
+
class: S.e("preset-item"),
|
|
2289
2467
|
role: "button",
|
|
2290
|
-
onClick: () =>
|
|
2468
|
+
onClick: () => be(e)
|
|
2291
2469
|
}, [t]);
|
|
2292
2470
|
})]);
|
|
2293
2471
|
}
|
|
2294
|
-
function
|
|
2295
|
-
let t =
|
|
2296
|
-
return o("div", { class:
|
|
2472
|
+
function Ke() {
|
|
2473
|
+
let t = j.value && !L.value && !V.value, n = !!v["extra-footer"], r = j.value;
|
|
2474
|
+
return !n && !r ? null : o("div", { class: S.e("footer") }, [n && o("div", { class: S.e("extra-footer") }, [v["extra-footer"]()]), r && o("div", { class: S.e("footer-actions") }, [e.showNow && o("button", {
|
|
2297
2475
|
type: "button",
|
|
2298
|
-
class: [
|
|
2299
|
-
onClick:
|
|
2300
|
-
}, [
|
|
2476
|
+
class: [S.e("footer-btn"), S.em("footer-btn", "now")],
|
|
2477
|
+
onClick: ve
|
|
2478
|
+
}, [w.value.now || "此刻"]), o("button", {
|
|
2301
2479
|
type: "button",
|
|
2302
|
-
class: [
|
|
2480
|
+
class: [S.e("footer-btn"), S.em("footer-btn", "ok")],
|
|
2303
2481
|
disabled: t,
|
|
2304
|
-
onClick:
|
|
2305
|
-
}, [
|
|
2482
|
+
onClick: ye
|
|
2483
|
+
}, [w.value.ok || "确定"])])]);
|
|
2306
2484
|
}
|
|
2307
|
-
function
|
|
2308
|
-
let
|
|
2309
|
-
return o("div", { class: [
|
|
2310
|
-
let
|
|
2485
|
+
function qe() {
|
|
2486
|
+
let e = sn(R.value);
|
|
2487
|
+
return o("div", { class: [S.e("grid"), S.em("grid", "month")] }, [e.map((e) => {
|
|
2488
|
+
let t = P(e.date, "month"), n = !!L.value && nn(L.value, e.date);
|
|
2311
2489
|
return o("div", {
|
|
2312
2490
|
class: [
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2491
|
+
S.e("cell"),
|
|
2492
|
+
S.em("cell", "month"),
|
|
2493
|
+
e.isToday && S.em("cell", "today"),
|
|
2494
|
+
n && S.em("cell", "selected"),
|
|
2495
|
+
t && S.em("cell", "disabled")
|
|
2318
2496
|
],
|
|
2319
2497
|
role: "gridcell",
|
|
2320
|
-
"aria-selected":
|
|
2321
|
-
"aria-disabled":
|
|
2322
|
-
onClick: () => !
|
|
2323
|
-
}, [
|
|
2498
|
+
"aria-selected": n,
|
|
2499
|
+
"aria-disabled": t,
|
|
2500
|
+
onClick: () => !t && xe(e.date)
|
|
2501
|
+
}, [Be(e.date, "month", je.value[e.month])]);
|
|
2324
2502
|
})]);
|
|
2325
2503
|
}
|
|
2326
|
-
function
|
|
2327
|
-
let
|
|
2328
|
-
return o("div", { class: [
|
|
2329
|
-
let
|
|
2504
|
+
function Je() {
|
|
2505
|
+
let e = cn(R.value);
|
|
2506
|
+
return o("div", { class: [S.e("grid"), S.em("grid", "year")] }, [e.map((e) => {
|
|
2507
|
+
let t = P(e.date, "year"), n = !!L.value && L.value.year() === e.year;
|
|
2330
2508
|
return o("div", {
|
|
2331
2509
|
class: [
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
!
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2510
|
+
S.e("cell"),
|
|
2511
|
+
S.em("cell", "year"),
|
|
2512
|
+
!e.isInDecade && S.em("cell", "outside"),
|
|
2513
|
+
e.isToday && S.em("cell", "today"),
|
|
2514
|
+
n && S.em("cell", "selected"),
|
|
2515
|
+
t && S.em("cell", "disabled")
|
|
2338
2516
|
],
|
|
2339
2517
|
role: "gridcell",
|
|
2340
|
-
"aria-selected":
|
|
2341
|
-
"aria-disabled":
|
|
2342
|
-
onClick: () => !
|
|
2343
|
-
}, [
|
|
2518
|
+
"aria-selected": n,
|
|
2519
|
+
"aria-disabled": t,
|
|
2520
|
+
onClick: () => !t && X(e.date)
|
|
2521
|
+
}, [Be(e.date, "year", e.year)]);
|
|
2344
2522
|
})]);
|
|
2345
2523
|
}
|
|
2346
|
-
function
|
|
2347
|
-
let
|
|
2348
|
-
return o("div", { class: [
|
|
2349
|
-
let
|
|
2524
|
+
function Ye() {
|
|
2525
|
+
let e = ln(R.value);
|
|
2526
|
+
return o("div", { class: [S.e("grid"), S.em("grid", "quarter")] }, [e.map((e) => {
|
|
2527
|
+
let t = P(e.date, "quarter"), n = !!L.value && Sn(L.value, e.date);
|
|
2350
2528
|
return o("div", {
|
|
2351
2529
|
class: [
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2530
|
+
S.e("cell"),
|
|
2531
|
+
S.em("cell", "quarter"),
|
|
2532
|
+
e.isCurrentQuarter && S.em("cell", "today"),
|
|
2533
|
+
n && S.em("cell", "selected"),
|
|
2534
|
+
t && S.em("cell", "disabled")
|
|
2357
2535
|
],
|
|
2358
2536
|
role: "gridcell",
|
|
2359
|
-
"aria-selected":
|
|
2360
|
-
"aria-disabled":
|
|
2361
|
-
onClick: () => !
|
|
2362
|
-
}, [
|
|
2537
|
+
"aria-selected": n,
|
|
2538
|
+
"aria-disabled": t,
|
|
2539
|
+
onClick: () => !t && Se(e.date)
|
|
2540
|
+
}, [Be(e.date, "quarter", Me.value[e.quarter - 1])]);
|
|
2363
2541
|
})]);
|
|
2364
2542
|
}
|
|
2365
|
-
function
|
|
2366
|
-
return
|
|
2543
|
+
function Xe() {
|
|
2544
|
+
return z.value === "month" ? qe() : z.value === "year" ? Je() : z.value === "quarter" ? Ye() : He();
|
|
2367
2545
|
}
|
|
2368
|
-
function
|
|
2546
|
+
function Ze() {
|
|
2369
2547
|
let n = e.presets.length > 0, r = [
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
n &&
|
|
2548
|
+
S.e("panel"),
|
|
2549
|
+
S.em("panel", `picker-${e.picker}`),
|
|
2550
|
+
S.em("panel", `mode-${z.value}`),
|
|
2551
|
+
j.value && S.em("panel", "with-time"),
|
|
2552
|
+
n && S.em("panel", "with-presets"),
|
|
2375
2553
|
e.popupClassName
|
|
2376
|
-
].filter(Boolean), i =
|
|
2377
|
-
return
|
|
2378
|
-
ref:
|
|
2554
|
+
].filter(Boolean), i = j.value && z.value === "date" ? l("div", { class: S.e("body-row") }, [l("div", { class: S.e("date-side") }, [Fe(), Xe()]), We()]) : l(t, null, [Fe(), Xe()]), a = n ? l("div", { class: S.e("main-row") }, [Ge(), l("div", { class: S.e("main-body") }, [i])]) : i, o = Ke(), s = o ? [a, o] : [a];
|
|
2555
|
+
return l("div", {
|
|
2556
|
+
ref: D,
|
|
2557
|
+
id: T,
|
|
2379
2558
|
class: [r, e.classNames?.popup],
|
|
2380
|
-
style: [
|
|
2381
|
-
role: "dialog"
|
|
2382
|
-
|
|
2559
|
+
style: [de.value, e.styles?.popup],
|
|
2560
|
+
role: "dialog",
|
|
2561
|
+
"aria-label": w.value.placeholder || "选择日期"
|
|
2562
|
+
}, s);
|
|
2383
2563
|
}
|
|
2384
|
-
function
|
|
2385
|
-
let t =
|
|
2564
|
+
function Qe() {
|
|
2565
|
+
let t = k.value ? Ze() : null, i = l(r, {
|
|
2386
2566
|
name: e.transitionName,
|
|
2387
2567
|
appear: !0
|
|
2388
2568
|
}, { default: () => t });
|
|
2389
|
-
return
|
|
2390
|
-
}
|
|
2391
|
-
let
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
e.disabled &&
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
e.variant &&
|
|
2569
|
+
return ce.value && se.value ? l(n, { to: se.value }, [i]) : i;
|
|
2570
|
+
}
|
|
2571
|
+
let $e = i(() => [
|
|
2572
|
+
S.b(),
|
|
2573
|
+
S.m(`picker-${e.picker}`),
|
|
2574
|
+
e.disabled && S.is("disabled"),
|
|
2575
|
+
k.value && S.is("open"),
|
|
2576
|
+
S.m(e.size),
|
|
2577
|
+
G.value && S.m(`status-${G.value}`),
|
|
2578
|
+
e.variant && S.m(`variant-${e.variant}`)
|
|
2399
2579
|
]);
|
|
2400
2580
|
return () => o("div", {
|
|
2401
|
-
ref:
|
|
2402
|
-
class: [
|
|
2581
|
+
ref: E,
|
|
2582
|
+
class: [$e.value, e.classNames?.root],
|
|
2403
2583
|
style: e.styles?.root
|
|
2404
2584
|
}, [o("div", {
|
|
2405
|
-
class:
|
|
2406
|
-
onClick:
|
|
2585
|
+
class: S.e("input-wrap"),
|
|
2586
|
+
onClick: he
|
|
2407
2587
|
}, [o("input", {
|
|
2408
|
-
ref:
|
|
2409
|
-
class: [
|
|
2588
|
+
ref: O,
|
|
2589
|
+
class: [S.e("input"), e.classNames?.input],
|
|
2410
2590
|
style: e.styles?.input,
|
|
2411
2591
|
type: "text",
|
|
2412
2592
|
readonly: e.inputReadOnly,
|
|
2413
2593
|
disabled: e.disabled,
|
|
2414
|
-
placeholder:
|
|
2415
|
-
value:
|
|
2594
|
+
placeholder: pe.value,
|
|
2595
|
+
value: fe.value,
|
|
2416
2596
|
"aria-haspopup": "dialog",
|
|
2417
|
-
"aria-expanded":
|
|
2597
|
+
"aria-expanded": k.value,
|
|
2598
|
+
"aria-controls": T,
|
|
2418
2599
|
onFocus: () => s("focus"),
|
|
2419
2600
|
onBlur: () => {
|
|
2420
|
-
s("blur"),
|
|
2421
|
-
}
|
|
2422
|
-
|
|
2423
|
-
|
|
2601
|
+
s("blur"), A?.validate("blur");
|
|
2602
|
+
},
|
|
2603
|
+
onKeydown: Ve
|
|
2604
|
+
}, null), ke.value ? o("span", {
|
|
2605
|
+
class: S.e("clear"),
|
|
2424
2606
|
role: "button",
|
|
2425
|
-
"aria-label":
|
|
2426
|
-
onClick:
|
|
2427
|
-
}, [
|
|
2428
|
-
class:
|
|
2607
|
+
"aria-label": w.value.clearLabel || "清除",
|
|
2608
|
+
onClick: De
|
|
2609
|
+
}, [v.clearIcon ? v.clearIcon() : qt(e.clearIcon) ?? "×"]) : o("span", {
|
|
2610
|
+
class: S.e("suffix"),
|
|
2429
2611
|
"aria-hidden": "true"
|
|
2430
|
-
}, [
|
|
2612
|
+
}, [v.suffixIcon ? v.suffixIcon() : qt(e.suffixIcon) ?? qt("mdi:calendar-outline")])]), Qe()]);
|
|
2431
2613
|
}
|
|
2432
2614
|
});
|
|
2433
2615
|
//#endregion
|
|
@@ -2435,7 +2617,7 @@ var $ = /* @__PURE__ */ s({
|
|
|
2435
2617
|
$.install = function(e) {
|
|
2436
2618
|
e.component($.name, $);
|
|
2437
2619
|
};
|
|
2438
|
-
var
|
|
2620
|
+
var En = {
|
|
2439
2621
|
title: "DatePicker 日期选择框",
|
|
2440
2622
|
category: "数据录入",
|
|
2441
2623
|
status: "80%",
|
|
@@ -2444,4 +2626,4 @@ var Sn = {
|
|
|
2444
2626
|
}
|
|
2445
2627
|
};
|
|
2446
2628
|
//#endregion
|
|
2447
|
-
export { $ as DatePicker,
|
|
2629
|
+
export { $ as DatePicker, En as default };
|