nicklabs-ui 1.0.18 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +544 -499
- package/dist/nicklabs-ui.css +1 -1
- package/dist/src/composables/useBreadcrumb.d.ts +15 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/layouts/NBreadcrumb.vue.d.ts +1 -3
- package/dist/src/layouts/NLayout.vue.d.ts +2 -2
- package/dist/src/layouts/NSidebar.vue.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -50,7 +50,7 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
50
50
|
}, j = /* @__PURE__ */ A(ae, [["__scopeId", "data-v-a30a1234"]]), oe = { class: "input" }, se = {
|
|
51
51
|
key: 0,
|
|
52
52
|
class: "label"
|
|
53
|
-
},
|
|
53
|
+
}, ce = ["disabled"], M = [
|
|
54
54
|
"type",
|
|
55
55
|
"placeholder",
|
|
56
56
|
"disabled",
|
|
@@ -58,10 +58,10 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
58
58
|
"value",
|
|
59
59
|
"maxlength",
|
|
60
60
|
"autocomplete"
|
|
61
|
-
],
|
|
61
|
+
], N = ["disabled"], P = {
|
|
62
62
|
key: 2,
|
|
63
63
|
class: "actions"
|
|
64
|
-
},
|
|
64
|
+
}, F = {
|
|
65
65
|
key: 0,
|
|
66
66
|
xmlns: "http://www.w3.org/2000/svg",
|
|
67
67
|
width: "16",
|
|
@@ -72,7 +72,7 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
72
72
|
"stroke-width": "2",
|
|
73
73
|
"stroke-linecap": "round",
|
|
74
74
|
"stroke-linejoin": "round"
|
|
75
|
-
},
|
|
75
|
+
}, I = {
|
|
76
76
|
key: 1,
|
|
77
77
|
xmlns: "http://www.w3.org/2000/svg",
|
|
78
78
|
width: "16",
|
|
@@ -83,7 +83,7 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
83
83
|
"stroke-width": "2",
|
|
84
84
|
"stroke-linecap": "round",
|
|
85
85
|
"stroke-linejoin": "round"
|
|
86
|
-
},
|
|
86
|
+
}, L = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
87
87
|
__name: "NInput",
|
|
88
88
|
props: {
|
|
89
89
|
modelValue: { default: "" },
|
|
@@ -207,7 +207,7 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
207
207
|
"stroke-width": "2",
|
|
208
208
|
"stroke-linecap": "round",
|
|
209
209
|
"stroke-linejoin": "round"
|
|
210
|
-
}, [c("path", { d: "M5 12h14" })], -1)]], 8,
|
|
210
|
+
}, [c("path", { d: "M5 12h14" })], -1)]], 8, ce)) : o("", !0),
|
|
211
211
|
c("input", {
|
|
212
212
|
type: u.value,
|
|
213
213
|
placeholder: e.placeholder,
|
|
@@ -222,7 +222,7 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
222
222
|
onChange: i[1] ||= (e) => n("change", e),
|
|
223
223
|
onKeydown: m,
|
|
224
224
|
onCompositionend: g
|
|
225
|
-
}, null, 40,
|
|
225
|
+
}, null, 40, M),
|
|
226
226
|
a.value ? (b(), s("button", {
|
|
227
227
|
key: 1,
|
|
228
228
|
class: "tool-button",
|
|
@@ -239,18 +239,18 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
239
239
|
"stroke-width": "2",
|
|
240
240
|
"stroke-linecap": "round",
|
|
241
241
|
"stroke-linejoin": "round"
|
|
242
|
-
}, [c("path", { d: "M5 12h14" }), c("path", { d: "M12 5v14" })], -1)]], 8,
|
|
243
|
-
a.value ? o("", !0) : (b(), s("div",
|
|
242
|
+
}, [c("path", { d: "M5 12h14" }), c("path", { d: "M12 5v14" })], -1)]], 8, N)) : o("", !0),
|
|
243
|
+
a.value ? o("", !0) : (b(), s("div", P, [r.value && !e.disabled ? (b(), s("button", {
|
|
244
244
|
key: 0,
|
|
245
245
|
type: "button",
|
|
246
246
|
onClick: w,
|
|
247
247
|
"aria-label": "Toggle password visibility"
|
|
248
|
-
}, [l.value ? (b(), s("svg",
|
|
248
|
+
}, [l.value ? (b(), s("svg", I, [...i[5] ||= [
|
|
249
249
|
c("path", { d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" }, null, -1),
|
|
250
250
|
c("path", { d: "M14.084 14.158a3 3 0 0 1-4.242-4.242" }, null, -1),
|
|
251
251
|
c("path", { d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" }, null, -1),
|
|
252
252
|
c("path", { d: "m2 2 20 20" }, null, -1)
|
|
253
|
-
]])) : (b(), s("svg",
|
|
253
|
+
]])) : (b(), s("svg", F, [...i[4] ||= [c("path", { d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" }, null, -1), c("circle", {
|
|
254
254
|
cx: "12",
|
|
255
255
|
cy: "12",
|
|
256
256
|
r: "3"
|
|
@@ -272,7 +272,7 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
272
272
|
}, [c("path", { d: "M18 6 6 18" }), c("path", { d: "m6 6 12 12" })], -1)]])) : o("", !0)]))
|
|
273
273
|
], 2)]));
|
|
274
274
|
}
|
|
275
|
-
}), [["__scopeId", "data-v-d5f9697c"]]),
|
|
275
|
+
}), [["__scopeId", "data-v-d5f9697c"]]), le = { class: "textarea" }, ue = ["textContent"], R = [
|
|
276
276
|
"rows",
|
|
277
277
|
"placeholder",
|
|
278
278
|
"disabled",
|
|
@@ -281,10 +281,10 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
281
281
|
"maxlength",
|
|
282
282
|
"autocomplete",
|
|
283
283
|
"wrap"
|
|
284
|
-
],
|
|
284
|
+
], z = {
|
|
285
285
|
key: 1,
|
|
286
286
|
class: "char-count"
|
|
287
|
-
},
|
|
287
|
+
}, de = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
288
288
|
__name: "NTextarea",
|
|
289
289
|
props: {
|
|
290
290
|
modelValue: { default: "" },
|
|
@@ -334,12 +334,12 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
334
334
|
};
|
|
335
335
|
return v(() => {
|
|
336
336
|
e.autofocus && r.value?.focus();
|
|
337
|
-
}), (t, i) => (b(), s("div",
|
|
337
|
+
}), (t, i) => (b(), s("div", le, [
|
|
338
338
|
e.title ? (b(), s("label", {
|
|
339
339
|
key: 0,
|
|
340
340
|
class: "label",
|
|
341
341
|
textContent: T(e.title)
|
|
342
|
-
}, null, 8,
|
|
342
|
+
}, null, 8, ue)) : o("", !0),
|
|
343
343
|
c("textarea", {
|
|
344
344
|
ref_key: "textareaRef",
|
|
345
345
|
ref: r,
|
|
@@ -358,14 +358,14 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
358
358
|
onChange: i[2] ||= (e) => n("change", e),
|
|
359
359
|
onKeydown: i[3] ||= (e) => n("keydown", e),
|
|
360
360
|
onPaste: i[4] ||= (e) => n("paste", e)
|
|
361
|
-
}, null, 40,
|
|
362
|
-
e.showCount ? (b(), s("div",
|
|
361
|
+
}, null, 40, R),
|
|
362
|
+
e.showCount ? (b(), s("div", z, T(u.value), 1)) : o("", !0)
|
|
363
363
|
]));
|
|
364
364
|
}
|
|
365
|
-
}), [["__scopeId", "data-v-4e18ca96"]]),
|
|
365
|
+
}), [["__scopeId", "data-v-4e18ca96"]]), B = { class: "checkbox" }, fe = {
|
|
366
366
|
key: 0,
|
|
367
367
|
class: "label"
|
|
368
|
-
},
|
|
368
|
+
}, pe = ["onClick"], me = ["checked", "disabled"], he = ["checked", "disabled"], ge = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
369
369
|
__name: "NCheckbox",
|
|
370
370
|
props: {
|
|
371
371
|
modelValue: { default: !1 },
|
|
@@ -407,7 +407,7 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
407
407
|
};
|
|
408
408
|
return v(() => {
|
|
409
409
|
t.autofocus || a.value?.focus();
|
|
410
|
-
}), (n, r) => (b(), s("div",
|
|
410
|
+
}), (n, r) => (b(), s("div", B, [t.title ? (b(), s("h3", fe, T(t.title), 1)) : o("", !0), c("div", { class: h(["group", [t.direction]]) }, [l.value ? (b(), s("label", {
|
|
411
411
|
key: 1,
|
|
412
412
|
class: "item",
|
|
413
413
|
onClick: r[0] ||= k((e) => g(), ["prevent"])
|
|
@@ -416,7 +416,7 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
416
416
|
type: "checkbox",
|
|
417
417
|
checked: !!t.modelValue,
|
|
418
418
|
disabled: t.disabled
|
|
419
|
-
}, null, 8,
|
|
419
|
+
}, null, 8, he),
|
|
420
420
|
r[2] ||= c("span", { class: "icon" }, [c("svg", {
|
|
421
421
|
xmlns: "http://www.w3.org/2000/svg",
|
|
422
422
|
width: "24",
|
|
@@ -438,7 +438,7 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
438
438
|
type: "checkbox",
|
|
439
439
|
checked: m(e.value),
|
|
440
440
|
disabled: t.disabled
|
|
441
|
-
}, null, 8,
|
|
441
|
+
}, null, 8, me),
|
|
442
442
|
r[1] ||= c("span", { class: "icon" }, [c("svg", {
|
|
443
443
|
xmlns: "http://www.w3.org/2000/svg",
|
|
444
444
|
width: "24",
|
|
@@ -451,15 +451,15 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
451
451
|
"stroke-linejoin": "round"
|
|
452
452
|
}, [c("path", { d: "M20 6 9 17l-5-5" })])], -1),
|
|
453
453
|
d(" " + T(e.label), 1)
|
|
454
|
-
], 8,
|
|
454
|
+
], 8, pe))), 128))], 2)]));
|
|
455
455
|
}
|
|
456
|
-
}), [["__scopeId", "data-v-575d5145"]]),
|
|
456
|
+
}), [["__scopeId", "data-v-575d5145"]]), _e = { class: "select" }, ve = {
|
|
457
457
|
key: 0,
|
|
458
458
|
class: "label"
|
|
459
|
-
},
|
|
459
|
+
}, ye = { class: "select-chips-container" }, be = ["textContent"], xe = ["onClick"], Se = {
|
|
460
460
|
key: 0,
|
|
461
461
|
class: "search-box"
|
|
462
|
-
},
|
|
462
|
+
}, Ce = { class: "options" }, we = ["onClick"], V = {
|
|
463
463
|
key: 0,
|
|
464
464
|
xmlns: "http://www.w3.org/2000/svg",
|
|
465
465
|
width: "14",
|
|
@@ -470,10 +470,10 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
470
470
|
"stroke-width": "2.5",
|
|
471
471
|
"stroke-linecap": "round",
|
|
472
472
|
"stroke-linejoin": "round"
|
|
473
|
-
},
|
|
473
|
+
}, H = {
|
|
474
474
|
key: 0,
|
|
475
475
|
class: "empty"
|
|
476
|
-
},
|
|
476
|
+
}, Te = 240, U = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
477
477
|
__name: "NSelect",
|
|
478
478
|
props: {
|
|
479
479
|
modelValue: { default: () => void 0 },
|
|
@@ -515,7 +515,7 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
515
515
|
if (!t.disabled && (a.value = !a.value, a.value)) {
|
|
516
516
|
if (await m(), d.value) {
|
|
517
517
|
let e = d.value.getBoundingClientRect();
|
|
518
|
-
u.value = window.innerHeight - e.bottom <
|
|
518
|
+
u.value = window.innerHeight - e.bottom < Te;
|
|
519
519
|
}
|
|
520
520
|
t.searchable && f.value?.focus();
|
|
521
521
|
}
|
|
@@ -546,7 +546,7 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
546
546
|
let e = Object.keys(p.value), n = e.length;
|
|
547
547
|
return n === 0 ? "" : t.multiple ? `已選 ${n} 項` : p.value[e[0]]?.label ?? "";
|
|
548
548
|
});
|
|
549
|
-
return (n, r) => (b(), s("div",
|
|
549
|
+
return (n, r) => (b(), s("div", _e, [t.title ? (b(), s("label", ve, T(t.title), 1)) : o("", !0), c("div", {
|
|
550
550
|
ref_key: "selectGroupRef",
|
|
551
551
|
ref: d,
|
|
552
552
|
class: h(["group", {
|
|
@@ -557,11 +557,11 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
557
557
|
class: h(["trigger", { disabled: t.disabled }]),
|
|
558
558
|
onClick: y
|
|
559
559
|
}, [
|
|
560
|
-
c("div",
|
|
560
|
+
c("div", ye, [!g.value || !t.multiple || t.multiple && t.multipleDisplay === "count" ? (b(), s("span", {
|
|
561
561
|
key: 0,
|
|
562
562
|
class: h(["trigger-text", { placeholder: !g.value }]),
|
|
563
563
|
textContent: T(g.value ? O.value : t.placeholder)
|
|
564
|
-
}, null, 10,
|
|
564
|
+
}, null, 10, be)) : o("", !0), t.multiple && t.multipleDisplay === "tags" ? (b(!0), s(e, { key: 1 }, C(p.value, (e, t) => (b(), s("div", {
|
|
565
565
|
key: `${e.label}${t}`,
|
|
566
566
|
class: "select-chip"
|
|
567
567
|
}, [c("span", null, T(e.label), 1), c("span", {
|
|
@@ -577,7 +577,7 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
577
577
|
"stroke-width": "2",
|
|
578
578
|
"stroke-linecap": "round",
|
|
579
579
|
"stroke-linejoin": "round"
|
|
580
|
-
}, [c("path", { d: "M18 6 6 18" }), c("path", { d: "m6 6 12 12" })], -1)]], 8,
|
|
580
|
+
}, [c("path", { d: "M18 6 6 18" }), c("path", { d: "m6 6 12 12" })], -1)]], 8, xe)]))), 128)) : o("", !0)]),
|
|
581
581
|
t.clearable && g.value && !t.disabled ? (b(), s("button", {
|
|
582
582
|
key: 0,
|
|
583
583
|
class: "clear-btn",
|
|
@@ -606,7 +606,7 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
606
606
|
"stroke-linejoin": "round",
|
|
607
607
|
class: "arrow-icon"
|
|
608
608
|
}, [c("path", { d: "m6 10 6 6 6-6" })], -1)
|
|
609
|
-
], 2), c("div", { class: h(["dropdown", { upward: u.value }]) }, [t.searchable ? (b(), s("div",
|
|
609
|
+
], 2), c("div", { class: h(["dropdown", { upward: u.value }]) }, [t.searchable ? (b(), s("div", Se, [r[4] ||= c("svg", {
|
|
610
610
|
xmlns: "http://www.w3.org/2000/svg",
|
|
611
611
|
width: "14",
|
|
612
612
|
height: "14",
|
|
@@ -628,95 +628,95 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
628
628
|
class: "search-input",
|
|
629
629
|
placeholder: "Search...",
|
|
630
630
|
"onUpdate:modelValue": r[0] ||= (e) => l.value = e
|
|
631
|
-
}, null, 512), [[te, l.value]])])) : o("", !0), c("div",
|
|
631
|
+
}, null, 512), [[te, l.value]])])) : o("", !0), c("div", Ce, [(b(!0), s(e, null, C(ne.value, (e, t) => (b(), s("div", {
|
|
632
632
|
key: `${e.label}${t}`,
|
|
633
633
|
class: h(["option", { selected: E(e.value) }]),
|
|
634
634
|
onClick: (t) => D(e)
|
|
635
|
-
}, [c("span", null, T(e.label), 1), E(e.value) ? (b(), s("svg",
|
|
635
|
+
}, [c("span", null, T(e.label), 1), E(e.value) ? (b(), s("svg", V, [...r[5] ||= [c("path", { d: "M20 6 9 17l-5-5" }, null, -1)]])) : o("", !0)], 10, we))), 128)), ne.value.length === 0 ? (b(), s("div", H, " 無符合選項 ")) : o("", !0)])], 2)], 2)]));
|
|
636
636
|
}
|
|
637
|
-
}), [["__scopeId", "data-v-08bb043e"]]),
|
|
637
|
+
}), [["__scopeId", "data-v-08bb043e"]]), W = typeof Buffer == "function", G = typeof TextDecoder == "function" ? new TextDecoder() : void 0, K = typeof TextEncoder == "function" ? new TextEncoder() : void 0, q = Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="), J = ((e) => {
|
|
638
638
|
let t = {};
|
|
639
639
|
return e.forEach((e, n) => t[e] = n), t;
|
|
640
|
-
})(
|
|
640
|
+
})(q), Ee = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/, Y = String.fromCharCode.bind(String), De = typeof Uint8Array.from == "function" ? Uint8Array.from.bind(Uint8Array) : (e) => new Uint8Array(Array.prototype.slice.call(e, 0)), Oe = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (e) => e == "+" ? "-" : "_"), ke = (e) => e.replace(/[^A-Za-z0-9\+\/]/g, ""), Ae = typeof btoa == "function" ? (e) => btoa(e) : W ? (e) => Buffer.from(e, "binary").toString("base64") : (e) => {
|
|
641
641
|
let t, n, r, i, a = "", o = e.length % 3;
|
|
642
642
|
for (let o = 0; o < e.length;) {
|
|
643
643
|
if ((n = e.charCodeAt(o++)) > 255 || (r = e.charCodeAt(o++)) > 255 || (i = e.charCodeAt(o++)) > 255) throw TypeError("invalid character found");
|
|
644
|
-
t = n << 16 | r << 8 | i, a +=
|
|
644
|
+
t = n << 16 | r << 8 | i, a += q[t >> 18 & 63] + q[t >> 12 & 63] + q[t >> 6 & 63] + q[t & 63];
|
|
645
645
|
}
|
|
646
646
|
return o ? a.slice(0, o - 3) + "===".substring(o) : a;
|
|
647
|
-
},
|
|
647
|
+
}, je = W ? (e) => Buffer.from(e).toString("base64") : (e) => {
|
|
648
648
|
let t = 4096, n = [];
|
|
649
|
-
for (let r = 0, i = e.length; r < i; r += t) n.push(
|
|
650
|
-
return
|
|
651
|
-
},
|
|
649
|
+
for (let r = 0, i = e.length; r < i; r += t) n.push(Y.apply(null, e.subarray(r, r + t)));
|
|
650
|
+
return Ae(n.join(""));
|
|
651
|
+
}, Me = (e) => {
|
|
652
652
|
if (e.length < 2) {
|
|
653
653
|
var t = e.charCodeAt(0);
|
|
654
|
-
return t < 128 ? e : t < 2048 ?
|
|
654
|
+
return t < 128 ? e : t < 2048 ? Y(192 | t >>> 6) + Y(128 | t & 63) : Y(224 | t >>> 12 & 15) + Y(128 | t >>> 6 & 63) + Y(128 | t & 63);
|
|
655
655
|
} else {
|
|
656
656
|
var t = 65536 + (e.charCodeAt(0) - 55296) * 1024 + (e.charCodeAt(1) - 56320);
|
|
657
|
-
return
|
|
657
|
+
return Y(240 | t >>> 18 & 7) + Y(128 | t >>> 12 & 63) + Y(128 | t >>> 6 & 63) + Y(128 | t & 63);
|
|
658
658
|
}
|
|
659
|
-
},
|
|
659
|
+
}, Ne = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, Pe = (e) => e.replace(Ne, Me), Fe = W ? (e) => Buffer.from(e, "utf8").toString("base64") : K ? (e) => je(K.encode(e)) : (e) => Ae(Pe(e)), Ie = (e, t = !1) => t ? Oe(Fe(e)) : Fe(e), Le = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g, Re = (e) => {
|
|
660
660
|
switch (e.length) {
|
|
661
661
|
case 4:
|
|
662
662
|
var t = ((7 & e.charCodeAt(0)) << 18 | (63 & e.charCodeAt(1)) << 12 | (63 & e.charCodeAt(2)) << 6 | 63 & e.charCodeAt(3)) - 65536;
|
|
663
|
-
return
|
|
664
|
-
case 3: return
|
|
665
|
-
default: return
|
|
663
|
+
return Y((t >>> 10) + 55296) + Y((t & 1023) + 56320);
|
|
664
|
+
case 3: return Y((15 & e.charCodeAt(0)) << 12 | (63 & e.charCodeAt(1)) << 6 | 63 & e.charCodeAt(2));
|
|
665
|
+
default: return Y((31 & e.charCodeAt(0)) << 6 | 63 & e.charCodeAt(1));
|
|
666
666
|
}
|
|
667
|
-
},
|
|
668
|
-
if (e = e.replace(/\s+/g, ""), !
|
|
667
|
+
}, ze = (e) => e.replace(Le, Re), Be = typeof atob == "function" ? (e) => atob(ke(e)) : W ? (e) => Buffer.from(e, "base64").toString("binary") : (e) => {
|
|
668
|
+
if (e = e.replace(/\s+/g, ""), !Ee.test(e)) throw TypeError("malformed base64.");
|
|
669
669
|
e += "==".slice(2 - (e.length & 3));
|
|
670
670
|
let t, n, r, i = [];
|
|
671
|
-
for (let a = 0; a < e.length;) t =
|
|
671
|
+
for (let a = 0; a < e.length;) t = J[e.charAt(a++)] << 18 | J[e.charAt(a++)] << 12 | (n = J[e.charAt(a++)]) << 6 | (r = J[e.charAt(a++)]), n === 64 ? i.push(Y(t >> 16 & 255)) : r === 64 ? i.push(Y(t >> 16 & 255, t >> 8 & 255)) : i.push(Y(t >> 16 & 255, t >> 8 & 255, t & 255));
|
|
672
672
|
return i.join("");
|
|
673
|
-
},
|
|
674
|
-
let e =
|
|
675
|
-
localStorage.setItem(
|
|
676
|
-
},
|
|
677
|
-
let e = localStorage.getItem(
|
|
673
|
+
}, Ve = W ? (e) => De(Buffer.from(e, "base64")) : (e) => De(Be(e).split("").map((e) => e.charCodeAt(0))), He = W ? (e) => Buffer.from(e, "base64").toString("utf8") : G ? (e) => G.decode(Ve(e)) : (e) => ze(Be(e)), X = (e) => ke(e.replace(/[-_]/g, (e) => e == "-" ? "+" : "/")), Ue = (e) => He(X(e)), We = "N_UTILS_KEY", Z = [], Ge = () => {
|
|
674
|
+
let e = Ie(JSON.stringify(Z));
|
|
675
|
+
localStorage.setItem(We, e);
|
|
676
|
+
}, Ke = () => {
|
|
677
|
+
let e = localStorage.getItem(We) ?? "";
|
|
678
678
|
if (e.length == 0) return [];
|
|
679
679
|
try {
|
|
680
|
-
return JSON.parse(
|
|
680
|
+
return JSON.parse(Ue(e));
|
|
681
681
|
} catch {
|
|
682
682
|
return [];
|
|
683
683
|
}
|
|
684
|
-
},
|
|
685
|
-
|
|
686
|
-
let e =
|
|
684
|
+
}, qe = () => {
|
|
685
|
+
Z.clear();
|
|
686
|
+
let e = Ke(), t = (/* @__PURE__ */ new Date()).getTime();
|
|
687
687
|
e.forEach((e) => {
|
|
688
|
-
e.expireTime && e.expireTime < t ||
|
|
688
|
+
e.expireTime && e.expireTime < t || Z.push({
|
|
689
689
|
key: e.key,
|
|
690
690
|
value: e.value,
|
|
691
691
|
expireTime: e.expireTime
|
|
692
692
|
});
|
|
693
|
-
}),
|
|
694
|
-
},
|
|
695
|
-
|
|
693
|
+
}), Z.length > 0 && Ge();
|
|
694
|
+
}, Je = (e) => (qe(), Z.some((t) => t.key == e)), Ye = (e, t, n) => {
|
|
695
|
+
Ze(e);
|
|
696
696
|
let r = {
|
|
697
697
|
key: e,
|
|
698
698
|
value: t
|
|
699
699
|
};
|
|
700
|
-
n && (r.expireTime = (/* @__PURE__ */ new Date()).getTime() + n * 1e3),
|
|
701
|
-
},
|
|
702
|
-
|
|
703
|
-
let n =
|
|
700
|
+
n && (r.expireTime = (/* @__PURE__ */ new Date()).getTime() + n * 1e3), Z.push(r), Ge();
|
|
701
|
+
}, Xe = (e, t) => {
|
|
702
|
+
qe();
|
|
703
|
+
let n = Z.find((t) => t.key == e);
|
|
704
704
|
return n ? n.value : t;
|
|
705
|
-
},
|
|
706
|
-
|
|
707
|
-
let t =
|
|
708
|
-
t != -1 && (
|
|
709
|
-
},
|
|
710
|
-
set:
|
|
711
|
-
get:
|
|
712
|
-
has:
|
|
713
|
-
forget:
|
|
714
|
-
},
|
|
705
|
+
}, Ze = (e) => {
|
|
706
|
+
qe();
|
|
707
|
+
let t = Z.findIndex((t) => t.key == e);
|
|
708
|
+
t != -1 && (Z.splice(t, 1), Ge());
|
|
709
|
+
}, Qe = {
|
|
710
|
+
set: Ye,
|
|
711
|
+
get: Xe,
|
|
712
|
+
has: Je,
|
|
713
|
+
forget: Ze
|
|
714
|
+
}, $e = { fullScreenToggle: (() => {
|
|
715
715
|
let e = !1;
|
|
716
716
|
return () => {
|
|
717
717
|
e ? document.exitFullscreen() : document.documentElement.requestFullscreen(), e = !e;
|
|
718
718
|
};
|
|
719
|
-
})() },
|
|
719
|
+
})() }, et = {
|
|
720
720
|
random: (e = 5) => Array(e).fill(null).map(() => {
|
|
721
721
|
let e = Math.random() * 62;
|
|
722
722
|
return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".charAt(e);
|
|
@@ -724,9 +724,9 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
724
724
|
copy: (e) => {
|
|
725
725
|
navigator.clipboard.writeText(e);
|
|
726
726
|
}
|
|
727
|
-
},
|
|
727
|
+
}, tt = [], Q = (e = "", t = !1, n = !1) => (tt.clear(), new Promise((r, i) => {
|
|
728
728
|
let a = document.createElement("input");
|
|
729
|
-
|
|
729
|
+
tt.push(a), a.hidden = !0, a.type = "file", a.accept = e, a.multiple = t, a.onchange = async (e) => {
|
|
730
730
|
let t = [];
|
|
731
731
|
a.files && a.files.length === 0 && r(t);
|
|
732
732
|
for (let e of a.files) {
|
|
@@ -745,15 +745,15 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
745
745
|
i(e);
|
|
746
746
|
}, a.click();
|
|
747
747
|
})), nt = {
|
|
748
|
-
all: (e = !1, t = !1) =>
|
|
749
|
-
image: async (e = !1, t = !1) =>
|
|
748
|
+
all: (e = !1, t = !1) => Q("", e, t),
|
|
749
|
+
image: async (e = !1, t = !1) => Q([
|
|
750
750
|
"image/jpg",
|
|
751
751
|
"image/jpeg",
|
|
752
752
|
"image/png",
|
|
753
753
|
"image/gif",
|
|
754
754
|
"image/bmp"
|
|
755
755
|
].join(","), e, t),
|
|
756
|
-
documentFile: async (e = !1, t = !1) =>
|
|
756
|
+
documentFile: async (e = !1, t = !1) => Q([
|
|
757
757
|
".pdf",
|
|
758
758
|
"application/pdf",
|
|
759
759
|
".doc",
|
|
@@ -764,20 +764,20 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
764
764
|
"text/plain",
|
|
765
765
|
".md"
|
|
766
766
|
].join(","), e, t),
|
|
767
|
-
video: async (e = !1, t = !1) =>
|
|
767
|
+
video: async (e = !1, t = !1) => Q([
|
|
768
768
|
"video/mp4",
|
|
769
769
|
"video/quicktime",
|
|
770
770
|
"video/webm",
|
|
771
771
|
"video/ogg"
|
|
772
772
|
].join(","), e, t),
|
|
773
|
-
audio: async (e = !1, t = !1) =>
|
|
773
|
+
audio: async (e = !1, t = !1) => Q([
|
|
774
774
|
"audio/mp3",
|
|
775
775
|
"audio/wav",
|
|
776
776
|
"audio/ogg",
|
|
777
777
|
"audio/aac",
|
|
778
778
|
"audio/flac"
|
|
779
779
|
].join(","), e, t),
|
|
780
|
-
custom: (e = "", t = !1, n = !1) =>
|
|
780
|
+
custom: (e = "", t = !1, n = !1) => Q(e, t, n)
|
|
781
781
|
}, rt = (e) => new Promise((t, n) => {
|
|
782
782
|
let r = new FileReader();
|
|
783
783
|
r.readAsDataURL(e), r.onload = () => {
|
|
@@ -836,9 +836,9 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
836
836
|
let e = navigator.userAgent;
|
|
837
837
|
return !!/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(e);
|
|
838
838
|
}, $ = {
|
|
839
|
-
store:
|
|
840
|
-
screen:
|
|
841
|
-
str:
|
|
839
|
+
store: Qe,
|
|
840
|
+
screen: $e,
|
|
841
|
+
str: et,
|
|
842
842
|
input: nt,
|
|
843
843
|
file: ot,
|
|
844
844
|
link: st,
|
|
@@ -930,40 +930,85 @@ var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
|
930
930
|
textContent: T(e.hint)
|
|
931
931
|
}, null, 8, Ct)])])], 10, yt)]));
|
|
932
932
|
}
|
|
933
|
-
}), [["__scopeId", "data-v-c90d900b"]]), Tt =
|
|
933
|
+
}), [["__scopeId", "data-v-c90d900b"]]), Tt = null, Et = (e) => e.meta?.breadcrumb ?? "", Dt = S((e) => e);
|
|
934
|
+
function Ot() {
|
|
935
|
+
function e(e) {
|
|
936
|
+
Tt = e;
|
|
937
|
+
}
|
|
938
|
+
function t(e) {
|
|
939
|
+
Et = e;
|
|
940
|
+
}
|
|
941
|
+
function n(e) {
|
|
942
|
+
Dt.value = e;
|
|
943
|
+
}
|
|
944
|
+
let r = i(() => {
|
|
945
|
+
if (!Tt) return [];
|
|
946
|
+
let e = Tt.currentRoute.value.matched, t = [];
|
|
947
|
+
return e.forEach((n, r) => {
|
|
948
|
+
let i = Et(n);
|
|
949
|
+
if (!i) return;
|
|
950
|
+
let a = r === e.length - 1;
|
|
951
|
+
t.push({
|
|
952
|
+
label: a ? Dt.value(i) : i,
|
|
953
|
+
path: a ? void 0 : n.path
|
|
954
|
+
});
|
|
955
|
+
}), t;
|
|
956
|
+
});
|
|
957
|
+
function a(e) {
|
|
958
|
+
Tt?.push(e);
|
|
959
|
+
}
|
|
960
|
+
function o() {
|
|
961
|
+
Dt.value = (e) => e;
|
|
962
|
+
}
|
|
963
|
+
return {
|
|
964
|
+
breadcrumbs: r,
|
|
965
|
+
setRouter: e,
|
|
966
|
+
setLabelResolver: t,
|
|
967
|
+
setBreadcrumbSuffix: n,
|
|
968
|
+
clearSuffix: o,
|
|
969
|
+
navigate: a
|
|
970
|
+
};
|
|
971
|
+
}
|
|
972
|
+
//#endregion
|
|
973
|
+
//#region src/layouts/NBreadcrumb.vue?vue&type=script&setup=true&lang.ts
|
|
974
|
+
var kt = { class: "breadcrumbs" }, At = ["onClick"], jt = {
|
|
975
|
+
key: 1,
|
|
976
|
+
class: "active"
|
|
977
|
+
}, Mt = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
934
978
|
__name: "NBreadcrumb",
|
|
935
|
-
setup(
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
979
|
+
setup(t) {
|
|
980
|
+
let { breadcrumbs: n, navigate: r } = Ot();
|
|
981
|
+
return (t, i) => (b(), s("nav", kt, [(b(!0), s(e, null, C(E(n), (t, n) => (b(), s(e, { key: n }, [t.path ? (b(), s("span", {
|
|
982
|
+
key: 0,
|
|
983
|
+
class: "crumb-link",
|
|
984
|
+
onClick: (e) => E(r)(t.path)
|
|
985
|
+
}, T(t.label), 9, At)) : (b(), s("span", jt, T(t.label), 1))], 64))), 128))]));
|
|
941
986
|
}
|
|
942
|
-
}), [["__scopeId", "data-v-
|
|
943
|
-
function
|
|
987
|
+
}), [["__scopeId", "data-v-06520596"]]), Nt = S(!1);
|
|
988
|
+
function Pt(e = "default") {
|
|
944
989
|
let t = `NSidebar:${e}:expanded`, n = x($.store.get(t, {}));
|
|
945
|
-
|
|
990
|
+
Nt.value = $.store.get("NSidebar:expanded", !1);
|
|
946
991
|
let r = (e) => !!n[e];
|
|
947
992
|
return {
|
|
948
993
|
isMenuExpanded: r,
|
|
949
994
|
toggleMenu: (e) => {
|
|
950
995
|
n[e] = !r(e), $.store.set(t, n);
|
|
951
996
|
},
|
|
952
|
-
isSidebarExpanded: () =>
|
|
997
|
+
isSidebarExpanded: () => Nt.value,
|
|
953
998
|
toggleSidebar: () => {
|
|
954
|
-
|
|
999
|
+
Nt.value = !Nt.value, $.store.set("NSidebar:expanded", Nt.value);
|
|
955
1000
|
}
|
|
956
1001
|
};
|
|
957
1002
|
}
|
|
958
1003
|
//#endregion
|
|
959
1004
|
//#region src/layouts/NHeroSection.vue?vue&type=script&setup=true&lang.ts
|
|
960
|
-
var
|
|
1005
|
+
var Ft = { class: "hero-section-container" }, It = { class: "hero-section" }, Lt = { class: "header" }, Rt = ["innerHTML"], zt = { class: "body" }, Bt = { class: "title-section" }, Vt = { class: "title" }, Ht = { key: 0 }, Ut = {
|
|
961
1006
|
key: 1,
|
|
962
1007
|
class: "description"
|
|
963
|
-
},
|
|
1008
|
+
}, Wt = {
|
|
964
1009
|
key: 0,
|
|
965
1010
|
class: "toolbar"
|
|
966
|
-
},
|
|
1011
|
+
}, Gt = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
967
1012
|
__name: "NHeroSection",
|
|
968
1013
|
props: {
|
|
969
1014
|
icon: { default: "" },
|
|
@@ -971,11 +1016,11 @@ var kt = { class: "hero-section-container" }, At = { class: "hero-section" }, jt
|
|
|
971
1016
|
description: { default: "" }
|
|
972
1017
|
},
|
|
973
1018
|
setup(e) {
|
|
974
|
-
let t =
|
|
975
|
-
return (n, r) => (b(), s("div",
|
|
1019
|
+
let t = Pt();
|
|
1020
|
+
return (n, r) => (b(), s("div", Ft, [c("div", It, [
|
|
976
1021
|
r[2] ||= c("div", { class: "effect-background-left" }, null, -1),
|
|
977
1022
|
r[3] ||= c("div", { class: "effect-background-right" }, null, -1),
|
|
978
|
-
c("div",
|
|
1023
|
+
c("div", Lt, [f(j, {
|
|
979
1024
|
class: "sidebar-toggle-button",
|
|
980
1025
|
padding: "8px",
|
|
981
1026
|
intent: "none",
|
|
@@ -998,19 +1043,19 @@ var kt = { class: "hero-section-container" }, At = { class: "hero-section" }, jt
|
|
|
998
1043
|
c("path", { d: "M4 19h16" })
|
|
999
1044
|
], -1)]]),
|
|
1000
1045
|
_: 1
|
|
1001
|
-
}), f(
|
|
1046
|
+
}), f(Mt)]),
|
|
1002
1047
|
e.icon ? (b(), s("div", {
|
|
1003
1048
|
key: 0,
|
|
1004
1049
|
class: "icon-bg",
|
|
1005
1050
|
innerHTML: e.icon
|
|
1006
|
-
}, null, 8,
|
|
1007
|
-
c("div",
|
|
1051
|
+
}, null, 8, Rt)) : o("", !0),
|
|
1052
|
+
c("div", zt, [c("div", Bt, [c("div", Vt, [e.title ? (b(), s("h1", Ht, T(e.title), 1)) : o("", !0), n.$slots.description || e.description ? (b(), s("div", Ut, [w(n.$slots, "description", {}, () => [d(T(e.description), 1)], !0)])) : o("", !0)])]), n.$slots.toolbar ? (b(), s("div", Wt, [w(n.$slots, "toolbar", {}, void 0, !0)])) : o("", !0)])
|
|
1008
1053
|
])]));
|
|
1009
1054
|
}
|
|
1010
|
-
}), [["__scopeId", "data-v-09f59057"]]),
|
|
1055
|
+
}), [["__scopeId", "data-v-09f59057"]]), Kt = { class: "content-container" }, qt = {
|
|
1011
1056
|
key: 0,
|
|
1012
1057
|
class: "nav-tabs"
|
|
1013
|
-
},
|
|
1058
|
+
}, Jt = ["textContent", "onClick"], Yt = { class: "tab-content" }, Xt = { class: "footer" }, Zt = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1014
1059
|
__name: "NForm",
|
|
1015
1060
|
props: {
|
|
1016
1061
|
model: { default: () => ({}) },
|
|
@@ -1030,7 +1075,7 @@ var kt = { class: "hero-section-container" }, At = { class: "hero-section" }, jt
|
|
|
1030
1075
|
}, d = () => {
|
|
1031
1076
|
t.disabled || r("reset");
|
|
1032
1077
|
};
|
|
1033
|
-
return (n, r) => (b(), s("div",
|
|
1078
|
+
return (n, r) => (b(), s("div", Kt, [f(Gt, {
|
|
1034
1079
|
icon: t.icon,
|
|
1035
1080
|
title: t.title,
|
|
1036
1081
|
description: t.description
|
|
@@ -1049,25 +1094,25 @@ var kt = { class: "hero-section-container" }, At = { class: "hero-section" }, jt
|
|
|
1049
1094
|
onSubmit: k(u, ["prevent"]),
|
|
1050
1095
|
onReset: k(d, ["prevent"])
|
|
1051
1096
|
}, [
|
|
1052
|
-
t.tabs.length > 0 ? (b(), s("div",
|
|
1097
|
+
t.tabs.length > 0 ? (b(), s("div", qt, [(b(!0), s(e, null, C(t.tabs, (e, t) => (b(), s("button", {
|
|
1053
1098
|
key: `${e}${t}`,
|
|
1054
1099
|
class: h(["nav-link", { active: a.value === t }]),
|
|
1055
1100
|
textContent: T(e),
|
|
1056
1101
|
onClick: () => {
|
|
1057
1102
|
a.value = t, E($).store.set(i, t);
|
|
1058
1103
|
}
|
|
1059
|
-
}, null, 10,
|
|
1060
|
-
c("div",
|
|
1061
|
-
c("div",
|
|
1104
|
+
}, null, 10, Jt))), 128))])) : o("", !0),
|
|
1105
|
+
c("div", Yt, [t.tabs.length > 0 ? (b(!0), s(e, { key: 0 }, C(t.tabs, (t, r) => (b(), s(e, null, [a.value === r ? w(n.$slots, `tab${r}`, { key: 0 }, void 0, !0) : o("", !0)], 64))), 256)) : o("", !0), t.tabs.length == 0 && n.$slots.tab0 ? w(n.$slots, "tab0", { key: 1 }, void 0, !0) : o("", !0)]),
|
|
1106
|
+
c("div", Xt, [w(n.$slots, "footer", {}, void 0, !0)])
|
|
1062
1107
|
], 32)]));
|
|
1063
1108
|
}
|
|
1064
|
-
}), [["__scopeId", "data-v-b0993eee"]]),
|
|
1109
|
+
}), [["__scopeId", "data-v-b0993eee"]]), Qt = ["innerHTML"], $t = { class: "title" }, en = {
|
|
1065
1110
|
key: 1,
|
|
1066
1111
|
class: "description"
|
|
1067
|
-
},
|
|
1112
|
+
}, tn = {
|
|
1068
1113
|
key: 2,
|
|
1069
1114
|
class: "action"
|
|
1070
|
-
},
|
|
1115
|
+
}, nn = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1071
1116
|
__name: "NEmpty",
|
|
1072
1117
|
props: {
|
|
1073
1118
|
title: { default: "目前沒有資料" },
|
|
@@ -1081,13 +1126,13 @@ var kt = { class: "hero-section-container" }, At = { class: "hero-section" }, jt
|
|
|
1081
1126
|
key: 0,
|
|
1082
1127
|
class: "icon",
|
|
1083
1128
|
innerHTML: e.icon
|
|
1084
|
-
}, null, 8,
|
|
1085
|
-
c("p",
|
|
1086
|
-
e.description ? (b(), s("p",
|
|
1087
|
-
t.$slots.default ? (b(), s("div",
|
|
1129
|
+
}, null, 8, Qt)) : o("", !0),
|
|
1130
|
+
c("p", $t, T(e.title), 1),
|
|
1131
|
+
e.description ? (b(), s("p", en, T(e.description), 1)) : o("", !0),
|
|
1132
|
+
t.$slots.default ? (b(), s("div", tn, [w(t.$slots, "default", {}, void 0, !0)])) : o("", !0)
|
|
1088
1133
|
], 2));
|
|
1089
1134
|
}
|
|
1090
|
-
}), [["__scopeId", "data-v-b9482c23"]]),
|
|
1135
|
+
}), [["__scopeId", "data-v-b9482c23"]]), rn = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1091
1136
|
__name: "NCard",
|
|
1092
1137
|
props: {
|
|
1093
1138
|
size: { default: "md" },
|
|
@@ -1099,13 +1144,13 @@ var kt = { class: "hero-section-container" }, At = { class: "hero-section" }, jt
|
|
|
1099
1144
|
[`radius-${e.radius}`]: !0
|
|
1100
1145
|
}]) }, [w(t.$slots, "default", {}, void 0, !0)], 2));
|
|
1101
1146
|
}
|
|
1102
|
-
}), [["__scopeId", "data-v-56a18223"]]),
|
|
1147
|
+
}), [["__scopeId", "data-v-56a18223"]]), an = {
|
|
1103
1148
|
key: 0,
|
|
1104
1149
|
class: "paginate"
|
|
1105
|
-
},
|
|
1150
|
+
}, on = { class: "summary" }, sn = { class: "pages" }, cn = {
|
|
1106
1151
|
key: 1,
|
|
1107
1152
|
class: "separator"
|
|
1108
|
-
},
|
|
1153
|
+
}, ln = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1109
1154
|
__name: "NPaginate",
|
|
1110
1155
|
props: {
|
|
1111
1156
|
totalItems: {},
|
|
@@ -1136,7 +1181,7 @@ var kt = { class: "hero-section-container" }, At = { class: "hero-section" }, jt
|
|
|
1136
1181
|
let t = Math.min(Math.max(1, e), u.value);
|
|
1137
1182
|
l.value !== t && (l.value = t, r("onPageChange", l.value));
|
|
1138
1183
|
}
|
|
1139
|
-
return (n, r) => t.totalItems > 0 ? (b(), s("div",
|
|
1184
|
+
return (n, r) => t.totalItems > 0 ? (b(), s("div", an, [c("span", on, "第 " + T(l.value) + " / " + T(u.value) + " 頁,共 " + T(t.totalItems) + " 筆", 1), c("div", sn, [
|
|
1140
1185
|
f(j, {
|
|
1141
1186
|
variant: "outline",
|
|
1142
1187
|
padding: "",
|
|
@@ -1173,7 +1218,7 @@ var kt = { class: "hero-section-container" }, At = { class: "hero-section" }, jt
|
|
|
1173
1218
|
"variant",
|
|
1174
1219
|
"intent",
|
|
1175
1220
|
"onClick"
|
|
1176
|
-
])) : (b(), s("span",
|
|
1221
|
+
])) : (b(), s("span", cn, "…"))], 64))), 128)),
|
|
1177
1222
|
f(j, {
|
|
1178
1223
|
variant: "outline",
|
|
1179
1224
|
padding: "",
|
|
@@ -1197,10 +1242,10 @@ var kt = { class: "hero-section-container" }, At = { class: "hero-section" }, jt
|
|
|
1197
1242
|
}, 8, ["disabled"])
|
|
1198
1243
|
])])) : o("", !0);
|
|
1199
1244
|
}
|
|
1200
|
-
}), [["__scopeId", "data-v-06443bd8"]]),
|
|
1245
|
+
}), [["__scopeId", "data-v-06443bd8"]]), un = { class: "table-scroll" }, dn = ["onClick"], fn = { class: "th-content" }, pn = {
|
|
1201
1246
|
key: 0,
|
|
1202
1247
|
class: "sort-icon"
|
|
1203
|
-
},
|
|
1248
|
+
}, mn = {
|
|
1204
1249
|
key: 0,
|
|
1205
1250
|
viewBox: "0 0 24 24",
|
|
1206
1251
|
fill: "none",
|
|
@@ -1208,7 +1253,7 @@ var kt = { class: "hero-section-container" }, At = { class: "hero-section" }, jt
|
|
|
1208
1253
|
"stroke-width": "2",
|
|
1209
1254
|
"stroke-linecap": "round",
|
|
1210
1255
|
"stroke-linejoin": "round"
|
|
1211
|
-
},
|
|
1256
|
+
}, hn = {
|
|
1212
1257
|
key: 1,
|
|
1213
1258
|
viewBox: "0 0 24 24",
|
|
1214
1259
|
fill: "none",
|
|
@@ -1216,7 +1261,7 @@ var kt = { class: "hero-section-container" }, At = { class: "hero-section" }, jt
|
|
|
1216
1261
|
"stroke-width": "2",
|
|
1217
1262
|
"stroke-linecap": "round",
|
|
1218
1263
|
"stroke-linejoin": "round"
|
|
1219
|
-
},
|
|
1264
|
+
}, gn = {
|
|
1220
1265
|
key: 2,
|
|
1221
1266
|
viewBox: "0 0 24 24",
|
|
1222
1267
|
fill: "none",
|
|
@@ -1224,13 +1269,13 @@ var kt = { class: "hero-section-container" }, At = { class: "hero-section" }, jt
|
|
|
1224
1269
|
"stroke-width": "2",
|
|
1225
1270
|
"stroke-linecap": "round",
|
|
1226
1271
|
"stroke-linejoin": "round"
|
|
1227
|
-
},
|
|
1272
|
+
}, _n = {
|
|
1228
1273
|
key: 0,
|
|
1229
1274
|
class: "col-actions"
|
|
1230
|
-
},
|
|
1275
|
+
}, vn = ["onClick"], yn = {
|
|
1231
1276
|
key: 0,
|
|
1232
1277
|
class: "col-actions"
|
|
1233
|
-
},
|
|
1278
|
+
}, bn = { key: 1 }, xn = ["colspan"], Sn = { key: 2 }, Cn = ["colspan"], wn = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1234
1279
|
__name: "NTable",
|
|
1235
1280
|
props: {
|
|
1236
1281
|
columns: { default: () => [] },
|
|
@@ -1270,7 +1315,7 @@ var kt = { class: "hero-section-container" }, At = { class: "hero-section" }, jt
|
|
|
1270
1315
|
{ bordered: t.bordered },
|
|
1271
1316
|
{ hoverable: t.hoverable },
|
|
1272
1317
|
{ loading: t.loading }
|
|
1273
|
-
]]) }, [c("div",
|
|
1318
|
+
]]) }, [c("div", un, [c("table", null, [c("thead", null, [c("tr", null, [(b(!0), s(e, null, C(t.columns, (e) => (b(), s("th", {
|
|
1274
1319
|
key: e.key,
|
|
1275
1320
|
style: g({
|
|
1276
1321
|
width: e.width,
|
|
@@ -1278,7 +1323,7 @@ var kt = { class: "hero-section-container" }, At = { class: "hero-section" }, jt
|
|
|
1278
1323
|
}),
|
|
1279
1324
|
class: h({ sortable: e.sortable }),
|
|
1280
1325
|
onClick: (t) => a(e)
|
|
1281
|
-
}, [c("span",
|
|
1326
|
+
}, [c("span", fn, [w(n.$slots, `header-${e.key}`, { col: e }, () => [d(T(e.label), 1)], !0), e.sortable ? (b(), s("span", pn, [i.value.key !== e.key || i.value.order === null ? (b(), s("svg", mn, [...u[0] ||= [c("path", { d: "M8 9l4-4 4 4" }, null, -1), c("path", { d: "M16 15l-4 4-4-4" }, null, -1)]])) : i.value.order === "asc" ? (b(), s("svg", hn, [...u[1] ||= [c("path", { d: "M8 15l4-6 4 6" }, null, -1)]])) : (b(), s("svg", gn, [...u[2] ||= [c("path", { d: "M8 9l4 6 4-6" }, null, -1)]]))])) : o("", !0)])], 14, dn))), 128)), n.$slots.actions ? (b(), s("th", _n, [w(n.$slots, "actions-header", {}, () => [u[3] ||= d("操作", -1)], !0)])) : o("", !0)])]), c("tbody", null, [!t.loading && t.rows.length > 0 ? (b(!0), s(e, { key: 0 }, C(t.rows, (i, a) => (b(), s("tr", {
|
|
1282
1327
|
key: i[t.rowKey] ?? a,
|
|
1283
1328
|
onClick: (e) => r("row-click", i)
|
|
1284
1329
|
}, [(b(!0), s(e, null, C(t.columns, (e) => (b(), s("td", {
|
|
@@ -1288,25 +1333,25 @@ var kt = { class: "hero-section-container" }, At = { class: "hero-section" }, jt
|
|
|
1288
1333
|
value: l(i, e),
|
|
1289
1334
|
row: i,
|
|
1290
1335
|
index: a
|
|
1291
|
-
}, () => [d(T(l(i, e)), 1)], !0)], 4))), 128)), n.$slots.actions ? (b(), s("td",
|
|
1336
|
+
}, () => [d(T(l(i, e)), 1)], !0)], 4))), 128)), n.$slots.actions ? (b(), s("td", yn, [w(n.$slots, "actions", {
|
|
1292
1337
|
row: i,
|
|
1293
1338
|
index: a
|
|
1294
|
-
}, void 0, !0)])) : o("", !0)], 8,
|
|
1339
|
+
}, void 0, !0)])) : o("", !0)], 8, vn))), 128)) : !t.loading && t.rows.length === 0 ? (b(), s("tr", bn, [c("td", {
|
|
1295
1340
|
colspan: t.columns.length + +!!n.$slots.actions,
|
|
1296
1341
|
class: "empty-cell"
|
|
1297
|
-
}, [w(n.$slots, "empty", {}, () => [d(T(t.emptyText), 1)], !0)], 8,
|
|
1342
|
+
}, [w(n.$slots, "empty", {}, () => [d(T(t.emptyText), 1)], !0)], 8, xn)])) : t.loading ? (b(), s("tr", Sn, [c("td", {
|
|
1298
1343
|
colspan: t.columns.length + +!!n.$slots.actions,
|
|
1299
1344
|
class: "loading-cell"
|
|
1300
1345
|
}, [w(n.$slots, "loading", {}, () => [u[4] ||= c("span", { class: "loading-dots" }, [
|
|
1301
1346
|
c("span"),
|
|
1302
1347
|
c("span"),
|
|
1303
1348
|
c("span")
|
|
1304
|
-
], -1)], !0)], 8,
|
|
1349
|
+
], -1)], !0)], 8, Cn)])) : o("", !0)])])])], 2));
|
|
1305
1350
|
}
|
|
1306
|
-
}), [["__scopeId", "data-v-0b022d68"]]),
|
|
1351
|
+
}), [["__scopeId", "data-v-0b022d68"]]), Tn = { class: "content-container" }, En = {
|
|
1307
1352
|
key: 0,
|
|
1308
1353
|
class: "toolbar"
|
|
1309
|
-
},
|
|
1354
|
+
}, Dn = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1310
1355
|
__name: "NList",
|
|
1311
1356
|
props: {
|
|
1312
1357
|
title: { default: "" },
|
|
@@ -1367,11 +1412,11 @@ var kt = { class: "hero-section-container" }, At = { class: "hero-section" }, jt
|
|
|
1367
1412
|
function v() {
|
|
1368
1413
|
e.batchDeletable && (h.value ? e.items.forEach((e) => u.value.delete(e.id)) : e.items.forEach((e) => u.value.add(e.id)), u.value = new Set(u.value));
|
|
1369
1414
|
}
|
|
1370
|
-
return (t, i) => (b(), s("div",
|
|
1415
|
+
return (t, i) => (b(), s("div", Tn, [f(Gt, {
|
|
1371
1416
|
icon: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"28\" height=\"28\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\"></path>\n <circle cx=\"12\" cy=\"7\" r=\"4\"></circle>\n </svg>",
|
|
1372
1417
|
title: e.title
|
|
1373
1418
|
}, {
|
|
1374
|
-
default: O(() => [n.toolbar || e.refreshable || e.creatable || e.batchDeletable ? (b(), s("div",
|
|
1419
|
+
default: O(() => [n.toolbar || e.refreshable || e.creatable || e.batchDeletable ? (b(), s("div", En, [
|
|
1375
1420
|
w(t.$slots, "toolbar", {}, void 0, !0),
|
|
1376
1421
|
e.refreshable ? (b(), a(j, {
|
|
1377
1422
|
key: 0,
|
|
@@ -1461,11 +1506,11 @@ var kt = { class: "hero-section-container" }, At = { class: "hero-section" }, jt
|
|
|
1461
1506
|
})) : o("", !0)
|
|
1462
1507
|
])) : o("", !0)]),
|
|
1463
1508
|
_: 3
|
|
1464
|
-
}, 8, ["title"]), f(
|
|
1509
|
+
}, 8, ["title"]), f(rn, {
|
|
1465
1510
|
size: "none",
|
|
1466
1511
|
radius: "xl"
|
|
1467
1512
|
}, {
|
|
1468
|
-
default: O(() => [f(
|
|
1513
|
+
default: O(() => [f(wn, {
|
|
1469
1514
|
columns: g.value,
|
|
1470
1515
|
rows: e.items,
|
|
1471
1516
|
hoverable: "",
|
|
@@ -1476,7 +1521,7 @@ var kt = { class: "hero-section-container" }, At = { class: "hero-section" }, jt
|
|
|
1476
1521
|
},
|
|
1477
1522
|
onSort: i[6] ||= (e) => r("sort", e)
|
|
1478
1523
|
}, l({
|
|
1479
|
-
empty: O(() => [f(
|
|
1524
|
+
empty: O(() => [f(nn, {
|
|
1480
1525
|
title: e.emptyTitle,
|
|
1481
1526
|
description: e.emptyDescription,
|
|
1482
1527
|
icon: e.emptyIcon,
|
|
@@ -1493,7 +1538,7 @@ var kt = { class: "hero-section-container" }, At = { class: "hero-section" }, jt
|
|
|
1493
1538
|
}, [
|
|
1494
1539
|
e.batchDeletable ? {
|
|
1495
1540
|
name: "header-__select__",
|
|
1496
|
-
fn: O(() => [f(
|
|
1541
|
+
fn: O(() => [f(ge, {
|
|
1497
1542
|
"model-value": h.value,
|
|
1498
1543
|
"onUpdate:modelValue": i[4] ||= () => v()
|
|
1499
1544
|
}, null, 8, ["model-value"])]),
|
|
@@ -1501,7 +1546,7 @@ var kt = { class: "hero-section-container" }, At = { class: "hero-section" }, jt
|
|
|
1501
1546
|
} : void 0,
|
|
1502
1547
|
e.batchDeletable ? {
|
|
1503
1548
|
name: "cell-__select__",
|
|
1504
|
-
fn: O(({ row: e }) => [f(
|
|
1549
|
+
fn: O(({ row: e }) => [f(ge, {
|
|
1505
1550
|
onClick: k((t) => _(e), ["stop"]),
|
|
1506
1551
|
"model-value": m(e.id)
|
|
1507
1552
|
}, null, 8, ["onClick", "model-value"])]),
|
|
@@ -1535,7 +1580,7 @@ var kt = { class: "hero-section-container" }, At = { class: "hero-section" }, jt
|
|
|
1535
1580
|
fn: O(() => [w(t.$slots, "actions-header", {}, void 0, !0)]),
|
|
1536
1581
|
key: "3"
|
|
1537
1582
|
} : void 0
|
|
1538
|
-
]), 1032, ["columns", "rows"]), e.items.length > 0 ? (b(), a(
|
|
1583
|
+
]), 1032, ["columns", "rows"]), e.items.length > 0 ? (b(), a(ln, {
|
|
1539
1584
|
key: 0,
|
|
1540
1585
|
totalItems: e.items.length,
|
|
1541
1586
|
pageSize: e.pageSize,
|
|
@@ -1549,11 +1594,11 @@ var kt = { class: "hero-section-container" }, At = { class: "hero-section" }, jt
|
|
|
1549
1594
|
_: 3
|
|
1550
1595
|
})]));
|
|
1551
1596
|
}
|
|
1552
|
-
}), [["__scopeId", "data-v-6967052d"]]),
|
|
1553
|
-
function
|
|
1597
|
+
}), [["__scopeId", "data-v-6967052d"]]), On = 0, kn = x([]);
|
|
1598
|
+
function An() {
|
|
1554
1599
|
let e = function(e, n = {}) {
|
|
1555
|
-
let r = ++
|
|
1556
|
-
|
|
1600
|
+
let r = ++On, i = n.duration ?? 4e3;
|
|
1601
|
+
kn.push({
|
|
1557
1602
|
id: r,
|
|
1558
1603
|
description: e,
|
|
1559
1604
|
status: n.status ?? "info",
|
|
@@ -1575,34 +1620,34 @@ function wn() {
|
|
|
1575
1620
|
status: "info"
|
|
1576
1621
|
});
|
|
1577
1622
|
function t(e) {
|
|
1578
|
-
let t =
|
|
1579
|
-
t !== -1 &&
|
|
1623
|
+
let t = kn.findIndex((t) => t.id === e);
|
|
1624
|
+
t !== -1 && kn.splice(t, 1);
|
|
1580
1625
|
}
|
|
1581
1626
|
return {
|
|
1582
|
-
toasts:
|
|
1627
|
+
toasts: kn,
|
|
1583
1628
|
toast: e,
|
|
1584
1629
|
removeToast: t
|
|
1585
1630
|
};
|
|
1586
1631
|
}
|
|
1587
1632
|
//#endregion
|
|
1588
1633
|
//#region src/components/NToast.vue?vue&type=script&setup=true&lang.ts
|
|
1589
|
-
var
|
|
1634
|
+
var jn = { class: "icon-wrap" }, Mn = ["innerHTML"], Nn = {
|
|
1590
1635
|
key: 0,
|
|
1591
1636
|
class: "arc-timer",
|
|
1592
1637
|
viewBox: "0 0 36 36",
|
|
1593
1638
|
width: "36",
|
|
1594
1639
|
height: "36",
|
|
1595
1640
|
"shape-rendering": "geometricPrecision"
|
|
1596
|
-
},
|
|
1641
|
+
}, Pn = { class: "body" }, Fn = {
|
|
1597
1642
|
key: 0,
|
|
1598
1643
|
class: "title"
|
|
1599
|
-
},
|
|
1644
|
+
}, In = {
|
|
1600
1645
|
key: 1,
|
|
1601
1646
|
class: "description"
|
|
1602
|
-
},
|
|
1647
|
+
}, Ln = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1603
1648
|
__name: "NToast",
|
|
1604
1649
|
setup(n) {
|
|
1605
|
-
let { toasts: i } =
|
|
1650
|
+
let { toasts: i } = An(), l = {
|
|
1606
1651
|
success: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M20 6 9 17l-5-5\"/>\n </svg>",
|
|
1607
1652
|
danger: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"/>\n <path d=\"m15 9-6 6\"/>\n <path d=\"m9 9 6 6\"/>\n </svg>",
|
|
1608
1653
|
warning: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\"/>\n <path d=\"M12 9v4\"/>\n <path d=\"M12 17h.01\"/>\n </svg>",
|
|
@@ -1616,10 +1661,10 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
1616
1661
|
default: O(() => [(b(!0), s(e, null, C(E(i), (e) => (b(), s("div", {
|
|
1617
1662
|
key: e.id,
|
|
1618
1663
|
class: h(["toast", [`${e.status}`]])
|
|
1619
|
-
}, [c("div",
|
|
1664
|
+
}, [c("div", jn, [c("div", {
|
|
1620
1665
|
class: "icon",
|
|
1621
1666
|
innerHTML: l[e.status]
|
|
1622
|
-
}, null, 8,
|
|
1667
|
+
}, null, 8, Mn), e.duration > 0 ? (b(), s("svg", Nn, [u[0] ||= c("circle", {
|
|
1623
1668
|
class: "arc-track",
|
|
1624
1669
|
cx: "18",
|
|
1625
1670
|
cy: "18",
|
|
@@ -1631,29 +1676,29 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
1631
1676
|
r: "16",
|
|
1632
1677
|
transform: "rotate(-90 18 18)",
|
|
1633
1678
|
style: g({ animationDuration: `${e.duration}ms` })
|
|
1634
|
-
}, null, 4)])) : o("", !0)]), c("div",
|
|
1679
|
+
}, null, 4)])) : o("", !0)]), c("div", Pn, [e.title ? (b(), s("p", Fn, T(e.title), 1)) : o("", !0), e.description ? (b(), s("p", In, T(e.description), 1)) : o("", !0)])], 2))), 128))]),
|
|
1635
1680
|
_: 1
|
|
1636
1681
|
})]));
|
|
1637
1682
|
}
|
|
1638
|
-
}), [["__scopeId", "data-v-3d2f3052"]]),
|
|
1683
|
+
}), [["__scopeId", "data-v-3d2f3052"]]), Rn = {
|
|
1639
1684
|
key: 0,
|
|
1640
1685
|
class: "loading-wrapper"
|
|
1641
|
-
},
|
|
1686
|
+
}, zn = {
|
|
1642
1687
|
key: 0,
|
|
1643
1688
|
class: "overlay"
|
|
1644
|
-
},
|
|
1689
|
+
}, Bn = { class: "content" }, Vn = {
|
|
1645
1690
|
key: 0,
|
|
1646
1691
|
class: "title"
|
|
1647
|
-
},
|
|
1692
|
+
}, Hn = {
|
|
1648
1693
|
key: 0,
|
|
1649
1694
|
class: "loading-inline"
|
|
1650
|
-
},
|
|
1695
|
+
}, Un = {
|
|
1651
1696
|
key: 0,
|
|
1652
1697
|
class: "title"
|
|
1653
|
-
},
|
|
1698
|
+
}, Wn = {
|
|
1654
1699
|
key: 0,
|
|
1655
1700
|
class: "title"
|
|
1656
|
-
},
|
|
1701
|
+
}, Gn = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1657
1702
|
__name: "NLoading",
|
|
1658
1703
|
props: {
|
|
1659
1704
|
loading: {
|
|
@@ -1668,31 +1713,31 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
1668
1713
|
}
|
|
1669
1714
|
},
|
|
1670
1715
|
setup(t) {
|
|
1671
|
-
return (r, i) => t.overlay ? (b(), s("div",
|
|
1672
|
-
default: O(() => [t.loading ? (b(), s("div",
|
|
1716
|
+
return (r, i) => t.overlay ? (b(), s("div", Rn, [w(r.$slots, "default", {}, void 0, !0), f(n, { name: "fade" }, {
|
|
1717
|
+
default: O(() => [t.loading ? (b(), s("div", zn, [c("div", Bn, [i[0] ||= c("div", { class: "spinner" }, [c("svg", { viewBox: "0 0 50 50" }, [c("circle", {
|
|
1673
1718
|
cx: "25",
|
|
1674
1719
|
cy: "25",
|
|
1675
1720
|
r: "20",
|
|
1676
1721
|
fill: "none",
|
|
1677
1722
|
"stroke-width": "4"
|
|
1678
|
-
})])], -1), t.title ? (b(), s("p",
|
|
1723
|
+
})])], -1), t.title ? (b(), s("p", Vn, T(t.title), 1)) : o("", !0)])])) : o("", !0)]),
|
|
1679
1724
|
_: 1
|
|
1680
|
-
})])) : (b(), s(e, { key: 1 }, [t.loading ? (b(), s("div",
|
|
1725
|
+
})])) : (b(), s(e, { key: 1 }, [t.loading ? (b(), s("div", Hn, [t.variant === "spinner" ? (b(), s(e, { key: 0 }, [i[1] ||= c("div", { class: "spinner" }, [c("svg", { viewBox: "0 0 50 50" }, [c("circle", {
|
|
1681
1726
|
cx: "25",
|
|
1682
1727
|
cy: "25",
|
|
1683
1728
|
r: "20",
|
|
1684
1729
|
fill: "none",
|
|
1685
1730
|
"stroke-width": "4"
|
|
1686
|
-
})])], -1), t.title ? (b(), s("p",
|
|
1731
|
+
})])], -1), t.title ? (b(), s("p", Un, T(t.title), 1)) : o("", !0)], 64)) : o("", !0), t.variant === "dots" ? (b(), s(e, { key: 1 }, [i[2] ||= c("div", { class: "dots" }, [
|
|
1687
1732
|
c("span"),
|
|
1688
1733
|
c("span"),
|
|
1689
1734
|
c("span")
|
|
1690
|
-
], -1), t.title ? (b(), s("p",
|
|
1735
|
+
], -1), t.title ? (b(), s("p", Wn, T(t.title), 1)) : o("", !0)], 64)) : o("", !0)])) : w(r.$slots, "default", { key: 1 }, void 0, !0)], 64));
|
|
1691
1736
|
}
|
|
1692
|
-
}), [["__scopeId", "data-v-2d28d23d"]]),
|
|
1737
|
+
}), [["__scopeId", "data-v-2d28d23d"]]), Kn = { class: "code" }, qn = {
|
|
1693
1738
|
key: 0,
|
|
1694
1739
|
class: "header"
|
|
1695
|
-
},
|
|
1740
|
+
}, Jn = { class: "language-label" }, Yn = {
|
|
1696
1741
|
key: 0,
|
|
1697
1742
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1698
1743
|
width: "14",
|
|
@@ -1703,7 +1748,7 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
1703
1748
|
"stroke-width": "2",
|
|
1704
1749
|
"stroke-linecap": "round",
|
|
1705
1750
|
"stroke-linejoin": "round"
|
|
1706
|
-
},
|
|
1751
|
+
}, Xn = {
|
|
1707
1752
|
key: 1,
|
|
1708
1753
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1709
1754
|
width: "14",
|
|
@@ -1714,10 +1759,10 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
1714
1759
|
"stroke-width": "2",
|
|
1715
1760
|
"stroke-linecap": "round",
|
|
1716
1761
|
"stroke-linejoin": "round"
|
|
1717
|
-
},
|
|
1762
|
+
}, Zn = { class: "code-body" }, Qn = {
|
|
1718
1763
|
key: 0,
|
|
1719
1764
|
class: "gutter"
|
|
1720
|
-
},
|
|
1765
|
+
}, $n = ["textContent"], er = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1721
1766
|
__name: "NCode",
|
|
1722
1767
|
props: {
|
|
1723
1768
|
code: {},
|
|
@@ -1736,28 +1781,28 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
1736
1781
|
}, 2e3);
|
|
1737
1782
|
} catch {}
|
|
1738
1783
|
}
|
|
1739
|
-
return (i, l) => (b(), s("div",
|
|
1784
|
+
return (i, l) => (b(), s("div", Kn, [(t.language, b(), s("div", qn, [c("span", Jn, T(t.language || "code"), 1), c("button", {
|
|
1740
1785
|
class: h(["copy-btn", { copied: n.value }]),
|
|
1741
1786
|
onClick: a
|
|
1742
|
-
}, [n.value ? (b(), s("svg",
|
|
1787
|
+
}, [n.value ? (b(), s("svg", Xn, [...l[1] ||= [c("polyline", { points: "20 6 9 17 4 12" }, null, -1)]])) : (b(), s("svg", Yn, [...l[0] ||= [c("rect", {
|
|
1743
1788
|
x: "9",
|
|
1744
1789
|
y: "9",
|
|
1745
1790
|
width: "13",
|
|
1746
1791
|
height: "13",
|
|
1747
1792
|
rx: "2",
|
|
1748
1793
|
ry: "2"
|
|
1749
|
-
}, null, -1), c("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)]])), c("span", null, T(n.value ? "Copied!" : "Copy"), 1)], 2)])), c("div",
|
|
1794
|
+
}, null, -1), c("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)]])), c("span", null, T(n.value ? "Copied!" : "Copy"), 1)], 2)])), c("div", Zn, [t.showLineNumbers ? (b(), s("div", Qn, [(b(!0), s(e, null, C(r.value, (e, t) => (b(), s("span", {
|
|
1750
1795
|
key: t,
|
|
1751
1796
|
class: "line-number"
|
|
1752
1797
|
}, T(t + 1), 1))), 128))])) : o("", !0), c("pre", {
|
|
1753
1798
|
class: "code-content",
|
|
1754
1799
|
textContent: T(t.code.trim())
|
|
1755
|
-
}, null, 8,
|
|
1800
|
+
}, null, 8, $n)])]));
|
|
1756
1801
|
}
|
|
1757
|
-
}), [["__scopeId", "data-v-6fed5425"]]),
|
|
1802
|
+
}), [["__scopeId", "data-v-6fed5425"]]), tr = {
|
|
1758
1803
|
key: 0,
|
|
1759
1804
|
class: "label"
|
|
1760
|
-
},
|
|
1805
|
+
}, nr = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1761
1806
|
__name: "NSwitch",
|
|
1762
1807
|
props: {
|
|
1763
1808
|
modelValue: {
|
|
@@ -1785,9 +1830,9 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
1785
1830
|
{ disabled: e.disabled }
|
|
1786
1831
|
]]),
|
|
1787
1832
|
onClick: l
|
|
1788
|
-
}, [n[0] ||= c("div", { class: "inner" }, [c("div", { class: "handle" })], -1), e.label ? (b(), s("span",
|
|
1833
|
+
}, [n[0] ||= c("div", { class: "inner" }, [c("div", { class: "handle" })], -1), e.label ? (b(), s("span", tr, T(e.label), 1)) : o("", !0)], 2));
|
|
1789
1834
|
}
|
|
1790
|
-
}), [["__scopeId", "data-v-432f1697"]]),
|
|
1835
|
+
}), [["__scopeId", "data-v-432f1697"]]), rr = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1791
1836
|
__name: "NTag",
|
|
1792
1837
|
props: {
|
|
1793
1838
|
intent: { default: "none" },
|
|
@@ -1836,49 +1881,49 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
1836
1881
|
y2: "18"
|
|
1837
1882
|
})], -1)]])) : o("", !0)], 2));
|
|
1838
1883
|
}
|
|
1839
|
-
}), [["__scopeId", "data-v-55e5be0f"]]),
|
|
1884
|
+
}), [["__scopeId", "data-v-55e5be0f"]]), ir = {
|
|
1840
1885
|
key: 0,
|
|
1841
1886
|
class: "label"
|
|
1842
|
-
},
|
|
1887
|
+
}, ar = {
|
|
1843
1888
|
key: 0,
|
|
1844
1889
|
class: "picker-dropdown"
|
|
1845
|
-
},
|
|
1890
|
+
}, or = { class: "picker-header" }, sr = { class: "header-nav" }, cr = { class: "header-nav" }, lr = { class: "picker-body" }, ur = { class: "weekday-grid" }, dr = { class: "day-grid" }, fr = {
|
|
1846
1891
|
key: 1,
|
|
1847
1892
|
class: "year-grid"
|
|
1848
|
-
},
|
|
1893
|
+
}, pr = {
|
|
1849
1894
|
key: 0,
|
|
1850
1895
|
class: "time-section"
|
|
1851
|
-
},
|
|
1896
|
+
}, mr = { class: "time-sliders" }, hr = {
|
|
1852
1897
|
key: 0,
|
|
1853
1898
|
class: "time-row"
|
|
1854
|
-
},
|
|
1899
|
+
}, gr = ["value"], _r = { class: "time-val" }, vr = {
|
|
1855
1900
|
key: 1,
|
|
1856
1901
|
class: "time-row"
|
|
1857
|
-
},
|
|
1902
|
+
}, yr = ["value"], br = { class: "time-val" }, xr = { class: "mobile-sheet" }, Sr = { class: "picker-header" }, Cr = { class: "header-nav" }, wr = { class: "header-nav" }, Tr = { class: "picker-body" }, Er = { class: "weekday-grid" }, Dr = { class: "day-grid" }, Or = {
|
|
1858
1903
|
key: 1,
|
|
1859
1904
|
class: "year-grid"
|
|
1860
|
-
},
|
|
1905
|
+
}, kr = {
|
|
1861
1906
|
key: 0,
|
|
1862
1907
|
class: "time-section"
|
|
1863
|
-
},
|
|
1908
|
+
}, Ar = { class: "time-sliders" }, jr = {
|
|
1864
1909
|
key: 0,
|
|
1865
1910
|
class: "time-row"
|
|
1866
|
-
},
|
|
1911
|
+
}, Mr = ["value"], Nr = { class: "time-val" }, Pr = {
|
|
1867
1912
|
key: 1,
|
|
1868
1913
|
class: "time-row"
|
|
1869
|
-
},
|
|
1914
|
+
}, Fr = ["value"], Ir = { class: "time-val" }, Lr = { class: "range-modal" }, Rr = { class: "range-body" }, zr = {
|
|
1870
1915
|
key: 0,
|
|
1871
1916
|
class: "range-sep"
|
|
1872
|
-
},
|
|
1917
|
+
}, Br = { class: "range-cal" }, Vr = { class: "picker-header" }, Hr = { class: "header-nav" }, Ur = {
|
|
1873
1918
|
key: 1,
|
|
1874
1919
|
class: "header-nav-placeholder"
|
|
1875
|
-
},
|
|
1920
|
+
}, Wr = { class: "header-title no-click" }, Gr = { class: "header-nav" }, Kr = {
|
|
1876
1921
|
key: 1,
|
|
1877
1922
|
class: "header-nav-placeholder"
|
|
1878
|
-
},
|
|
1923
|
+
}, qr = { class: "weekday-grid" }, Jr = { class: "day-grid range-day-grid" }, Yr = ["onClick", "onMouseenter"], Xr = { class: "range-footer" }, Zr = { class: "range-display" }, Qr = { class: "mobile-sheet" }, $r = {
|
|
1879
1924
|
class: "picker-header",
|
|
1880
1925
|
style: { "margin-top": "8px" }
|
|
1881
|
-
},
|
|
1926
|
+
}, ei = { class: "header-nav" }, ti = { class: "header-title no-click" }, ni = { class: "header-nav" }, ri = { class: "weekday-grid" }, ii = { class: "day-grid range-day-grid" }, ai = ["onClick"], oi = { class: "range-footer" }, si = { class: "range-display" }, ci = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1882
1927
|
__name: "NDatePicker",
|
|
1883
1928
|
props: {
|
|
1884
1929
|
modelValue: { default: "" },
|
|
@@ -1982,96 +2027,96 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
1982
2027
|
});
|
|
1983
2028
|
return a;
|
|
1984
2029
|
}
|
|
1985
|
-
function
|
|
2030
|
+
function ce(e, t) {
|
|
1986
2031
|
return e.year === t.year ? e.month === t.month ? e.day - t.day : e.month - t.month : e.year - t.year;
|
|
1987
2032
|
}
|
|
1988
|
-
function
|
|
2033
|
+
function M(e) {
|
|
1989
2034
|
return String(e).padStart(2, "0");
|
|
1990
2035
|
}
|
|
1991
|
-
let
|
|
2036
|
+
let N = S("date"), P = S(/* @__PURE__ */ new Date()), F = S(null), I = S(0), L = S(0), le = null, ue = null, R = i(() => P.value.getFullYear()), z = i(() => P.value.getMonth()), de = S(Math.floor((/* @__PURE__ */ new Date()).getFullYear() / 12) * 12), B = i(() => {
|
|
1992
2037
|
let e = [];
|
|
1993
|
-
for (let t = 0; t < 12; t++) e.push(
|
|
2038
|
+
for (let t = 0; t < 12; t++) e.push(de.value + t);
|
|
1994
2039
|
return e;
|
|
1995
2040
|
});
|
|
1996
|
-
ne(
|
|
1997
|
-
|
|
2041
|
+
ne(R, (e) => {
|
|
2042
|
+
de.value = Math.floor(e / 12) * 12;
|
|
1998
2043
|
}, { immediate: !0 }), ne(() => t.modelValue, (e) => {
|
|
1999
2044
|
if (!e) return;
|
|
2000
2045
|
let t = p(String(e));
|
|
2001
|
-
t && (
|
|
2046
|
+
t && (P.value = new Date(t.year, t.month, 1));
|
|
2002
2047
|
}, { immediate: !0 });
|
|
2003
|
-
let
|
|
2048
|
+
let fe = i(() => se(R.value, z.value)), pe = i(() => {
|
|
2004
2049
|
if (!t.modelValue) return "";
|
|
2005
2050
|
let e = p(String(t.modelValue));
|
|
2006
2051
|
return e ? u(e.year, e.month, e.day, e.hour, e.min) : "";
|
|
2007
|
-
}),
|
|
2008
|
-
function
|
|
2052
|
+
}), me = i(() => t.range ? t.start && t.end ? `${t.start} → ${t.end}` : t.start ? `${t.start} → ...` : "" : pe.value);
|
|
2053
|
+
function he() {
|
|
2009
2054
|
let e = p(String(t.modelValue));
|
|
2010
|
-
e ? (
|
|
2055
|
+
e ? (P.value = new Date(e.year, e.month, 1), I.value = e.hour, L.value = e.min, F.value = y.value ? {
|
|
2011
2056
|
year: e.year,
|
|
2012
2057
|
month: e.month,
|
|
2013
2058
|
day: e.day,
|
|
2014
2059
|
isCurrentMonth: !0
|
|
2015
|
-
} : null) : (
|
|
2060
|
+
} : null) : (I.value = 0, L.value = 0, F.value = null), N.value = "date";
|
|
2016
2061
|
}
|
|
2017
|
-
function
|
|
2062
|
+
function ge(e) {
|
|
2018
2063
|
if (!t.modelValue) return !1;
|
|
2019
2064
|
let n = p(String(t.modelValue));
|
|
2020
2065
|
return n ? n.year === e.year && n.month === e.month && n.day === e.day : !1;
|
|
2021
2066
|
}
|
|
2022
|
-
function ge(e) {
|
|
2023
|
-
return ae === e.year && A === e.month && oe === e.day;
|
|
2024
|
-
}
|
|
2025
2067
|
function _e(e) {
|
|
2026
|
-
return
|
|
2068
|
+
return ae === e.year && A === e.month && oe === e.day;
|
|
2027
2069
|
}
|
|
2028
2070
|
function ve(e) {
|
|
2029
|
-
|
|
2030
|
-
l("update:modelValue", t), l("change", t);
|
|
2071
|
+
return y.value ? F.value !== null && F.value.year === e.year && F.value.month === e.month && F.value.day === e.day : ge(e);
|
|
2031
2072
|
}
|
|
2032
2073
|
function ye(e) {
|
|
2033
|
-
|
|
2074
|
+
let t = u(e.year, e.month, e.day, I.value, L.value);
|
|
2075
|
+
l("update:modelValue", t), l("change", t);
|
|
2076
|
+
}
|
|
2077
|
+
function be(e) {
|
|
2078
|
+
if (y.value) F.value = { ...e }, P.value = new Date(e.year, e.month, 1), ye(e);
|
|
2034
2079
|
else {
|
|
2035
2080
|
let t = u(e.year, e.month, e.day, 0, 0);
|
|
2036
|
-
l("update:modelValue", t), l("change", t),
|
|
2081
|
+
l("update:modelValue", t), l("change", t), X();
|
|
2037
2082
|
}
|
|
2038
2083
|
}
|
|
2039
|
-
function be(e) {
|
|
2040
|
-
F.value = new Date(e, B.value, 1), P.value = "date";
|
|
2041
|
-
}
|
|
2042
2084
|
function xe(e) {
|
|
2043
|
-
|
|
2085
|
+
P.value = new Date(e, z.value, 1), N.value = "date";
|
|
2044
2086
|
}
|
|
2045
2087
|
function Se(e) {
|
|
2046
|
-
P.value
|
|
2088
|
+
P.value = new Date(R.value, z.value + e, 1);
|
|
2047
2089
|
}
|
|
2048
|
-
function Ce(e
|
|
2049
|
-
|
|
2090
|
+
function Ce(e) {
|
|
2091
|
+
N.value === "year" ? de.value += e * 12 : P.value = new Date(R.value + e, z.value, 1);
|
|
2050
2092
|
}
|
|
2051
|
-
function
|
|
2052
|
-
|
|
2053
|
-
|
|
2093
|
+
function we(e, t) {
|
|
2094
|
+
e === "H" ? I.value = Math.max(0, Math.min(23, I.value + t)) : L.value = Math.max(0, Math.min(59, L.value + t)), F.value && ye(F.value);
|
|
2095
|
+
}
|
|
2096
|
+
function V(e, t) {
|
|
2097
|
+
we(e, t), le = setTimeout(() => {
|
|
2098
|
+
ue = setInterval(() => we(e, t), 100);
|
|
2054
2099
|
}, 300);
|
|
2055
2100
|
}
|
|
2056
|
-
function
|
|
2057
|
-
|
|
2101
|
+
function H() {
|
|
2102
|
+
le &&= (clearTimeout(le), null), ue &&= (clearInterval(ue), null);
|
|
2058
2103
|
}
|
|
2059
|
-
function
|
|
2104
|
+
function Te(e, t) {
|
|
2060
2105
|
let n = parseInt(e.target.value);
|
|
2061
|
-
t === "H" ?
|
|
2106
|
+
t === "H" ? I.value = n : L.value = n, F.value && ye(F.value);
|
|
2062
2107
|
}
|
|
2063
|
-
let
|
|
2064
|
-
year:
|
|
2065
|
-
month:
|
|
2066
|
-
days:
|
|
2108
|
+
let U = S(ae), W = S(A), G = S(null), K = S(null), q = S(null), J = S(null), Ee = i(() => !!K.value && !!q.value), Y = i(() => W.value === 11 ? U.value + 1 : U.value), De = i(() => W.value === 11 ? 0 : W.value + 1), Oe = i(() => se(U.value, W.value)), ke = i(() => se(Y.value, De.value)), Ae = i(() => [{
|
|
2109
|
+
year: U.value,
|
|
2110
|
+
month: W.value,
|
|
2111
|
+
days: Oe.value,
|
|
2067
2112
|
isLeft: !0
|
|
2068
2113
|
}, {
|
|
2069
|
-
year:
|
|
2070
|
-
month:
|
|
2071
|
-
days:
|
|
2114
|
+
year: Y.value,
|
|
2115
|
+
month: De.value,
|
|
2116
|
+
days: ke.value,
|
|
2072
2117
|
isLeft: !1
|
|
2073
2118
|
}]);
|
|
2074
|
-
function
|
|
2119
|
+
function je(e) {
|
|
2075
2120
|
let t = p(e);
|
|
2076
2121
|
return t ? {
|
|
2077
2122
|
year: t.year,
|
|
@@ -2080,25 +2125,25 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2080
2125
|
isCurrentMonth: !0
|
|
2081
2126
|
} : null;
|
|
2082
2127
|
}
|
|
2083
|
-
let
|
|
2128
|
+
let Me = i(() => G.value && J.value ? ce(G.value, J.value) <= 0 ? G.value : J.value : K.value ?? je(t.start)), Ne = i(() => G.value && J.value ? ce(G.value, J.value) <= 0 ? J.value : G.value : q.value ?? je(t.end)), Pe = i(() => {
|
|
2129
|
+
if (G.value) {
|
|
2130
|
+
let e = G.value;
|
|
2131
|
+
return `${e.year}-${M(e.month + 1)}-${M(e.day)}`;
|
|
2132
|
+
}
|
|
2084
2133
|
if (K.value) {
|
|
2085
2134
|
let e = K.value;
|
|
2086
|
-
return `${e.year}-${
|
|
2135
|
+
return `${e.year}-${M(e.month + 1)}-${M(e.day)}`;
|
|
2087
2136
|
}
|
|
2137
|
+
return t.start;
|
|
2138
|
+
}), Fe = i(() => {
|
|
2139
|
+
if (G.value) return "";
|
|
2088
2140
|
if (q.value) {
|
|
2089
2141
|
let e = q.value;
|
|
2090
|
-
return `${e.year}-${
|
|
2091
|
-
}
|
|
2092
|
-
return t.start;
|
|
2093
|
-
}), Pe = i(() => {
|
|
2094
|
-
if (K.value) return "";
|
|
2095
|
-
if (J.value) {
|
|
2096
|
-
let e = J.value;
|
|
2097
|
-
return `${e.year}-${N(e.month + 1)}-${N(e.day)}`;
|
|
2142
|
+
return `${e.year}-${M(e.month + 1)}-${M(e.day)}`;
|
|
2098
2143
|
}
|
|
2099
2144
|
return t.end;
|
|
2100
2145
|
});
|
|
2101
|
-
function
|
|
2146
|
+
function Ie() {
|
|
2102
2147
|
let e = p(t.start) ?? {
|
|
2103
2148
|
year: ae,
|
|
2104
2149
|
month: A,
|
|
@@ -2106,23 +2151,23 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2106
2151
|
hour: 0,
|
|
2107
2152
|
min: 0
|
|
2108
2153
|
};
|
|
2109
|
-
|
|
2110
|
-
}
|
|
2111
|
-
function Ie() {
|
|
2112
|
-
G.value === 0 ? (W.value--, G.value = 11) : G.value--;
|
|
2154
|
+
U.value = e.year, W.value = e.month, K.value = je(t.start), q.value = je(t.end), G.value = null, J.value = null;
|
|
2113
2155
|
}
|
|
2114
2156
|
function Le() {
|
|
2115
|
-
|
|
2157
|
+
W.value === 0 ? (U.value--, W.value = 11) : W.value--;
|
|
2116
2158
|
}
|
|
2117
|
-
function Re(
|
|
2118
|
-
|
|
2159
|
+
function Re() {
|
|
2160
|
+
W.value === 11 ? (U.value++, W.value = 0) : W.value++;
|
|
2161
|
+
}
|
|
2162
|
+
function ze(e) {
|
|
2163
|
+
if (!G.value) G.value = { ...e }, K.value = null, q.value = null;
|
|
2119
2164
|
else {
|
|
2120
|
-
let t =
|
|
2121
|
-
|
|
2165
|
+
let t = G.value, [n, r] = ce(t, e) <= 0 ? [t, e] : [e, t];
|
|
2166
|
+
K.value = n, q.value = r, G.value = null, J.value = null;
|
|
2122
2167
|
}
|
|
2123
2168
|
}
|
|
2124
|
-
function
|
|
2125
|
-
let t = e.year === ae && e.month === A && e.day === oe, n =
|
|
2169
|
+
function Be(e) {
|
|
2170
|
+
let t = e.year === ae && e.month === A && e.day === oe, n = G.value && e.year === G.value.year && e.month === G.value.month && e.day === G.value.day, r = Me.value, i = Ne.value, a = r && e.year === r.year && e.month === r.month && e.day === r.day, o = i && e.year === i.year && e.month === i.month && e.day === i.day, s = r && i && ce(e, r) > 0 && ce(e, i) < 0;
|
|
2126
2171
|
return {
|
|
2127
2172
|
"is-other-month": !e.isCurrentMonth,
|
|
2128
2173
|
"is-today": t && !a && !o,
|
|
@@ -2132,30 +2177,30 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2132
2177
|
"is-pending": !!n && !a
|
|
2133
2178
|
};
|
|
2134
2179
|
}
|
|
2135
|
-
function Be() {
|
|
2136
|
-
if (!q.value || !J.value) return;
|
|
2137
|
-
let e = q.value, t = J.value;
|
|
2138
|
-
l("update:start", `${e.year}-${N(e.month + 1)}-${N(e.day)}`), l("update:end", `${t.year}-${N(t.month + 1)}-${N(t.day)}`), Z();
|
|
2139
|
-
}
|
|
2140
2180
|
function Ve() {
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
x.value = !1, K.value = null, Y.value = null;
|
|
2181
|
+
if (!K.value || !q.value) return;
|
|
2182
|
+
let e = K.value, t = q.value;
|
|
2183
|
+
l("update:start", `${e.year}-${M(e.month + 1)}-${M(e.day)}`), l("update:end", `${t.year}-${M(t.month + 1)}-${M(t.day)}`), X();
|
|
2145
2184
|
}
|
|
2146
2185
|
function He() {
|
|
2147
|
-
|
|
2186
|
+
t.disabled || (x.value || (t.range ? Ie() : he()), x.value = !x.value);
|
|
2187
|
+
}
|
|
2188
|
+
function X() {
|
|
2189
|
+
x.value = !1, G.value = null, J.value = null;
|
|
2190
|
+
}
|
|
2191
|
+
function Ue() {
|
|
2192
|
+
N.value = N.value === "date" ? "year" : "date";
|
|
2148
2193
|
}
|
|
2149
|
-
let
|
|
2194
|
+
let We = (e) => {
|
|
2150
2195
|
let t = e.target;
|
|
2151
|
-
w.value?.contains(t) || E.value ||
|
|
2196
|
+
w.value?.contains(t) || E.value || X();
|
|
2152
2197
|
};
|
|
2153
2198
|
v(() => {
|
|
2154
|
-
document.addEventListener("mousedown",
|
|
2199
|
+
document.addEventListener("mousedown", We), window.addEventListener("resize", ee);
|
|
2155
2200
|
}), _(() => {
|
|
2156
|
-
document.removeEventListener("mousedown",
|
|
2201
|
+
document.removeEventListener("mousedown", We), window.removeEventListener("resize", ee), D && clearTimeout(D), H();
|
|
2157
2202
|
});
|
|
2158
|
-
let
|
|
2203
|
+
let Z = (e) => {
|
|
2159
2204
|
e.stopPropagation(), l("update:modelValue", ""), l("change", ""), l("clear");
|
|
2160
2205
|
};
|
|
2161
2206
|
return (r, i) => (b(), s("div", {
|
|
@@ -2163,19 +2208,19 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2163
2208
|
ref: w,
|
|
2164
2209
|
class: "datepicker"
|
|
2165
2210
|
}, [
|
|
2166
|
-
t.title ? (b(), s("label",
|
|
2211
|
+
t.title ? (b(), s("label", ir, T(t.title), 1)) : o("", !0),
|
|
2167
2212
|
c("div", { class: h(["date-picker", {
|
|
2168
2213
|
open: x.value && !t.range && !E.value,
|
|
2169
2214
|
disabled: t.disabled
|
|
2170
2215
|
}]) }, [c("div", {
|
|
2171
2216
|
class: "picker-trigger",
|
|
2172
|
-
onClick:
|
|
2173
|
-
}, [c("span", { class: h(["text", { placeholder: !
|
|
2217
|
+
onClick: He
|
|
2218
|
+
}, [c("span", { class: h(["text", { placeholder: !me.value }]) }, T(me.value || t.placeholder), 3), t.clearable && pe.value && !t.range ? (b(), a(j, {
|
|
2174
2219
|
key: 0,
|
|
2175
2220
|
variant: "ghost",
|
|
2176
2221
|
square: "",
|
|
2177
2222
|
class: "clear",
|
|
2178
|
-
onClick:
|
|
2223
|
+
onClick: Z
|
|
2179
2224
|
}, {
|
|
2180
2225
|
default: O(() => [...i[20] ||= [c("svg", {
|
|
2181
2226
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2190,12 +2235,12 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2190
2235
|
}, [c("path", { d: "M18 6 6 18" }), c("path", { d: "m6 6 12 12" })], -1)]]),
|
|
2191
2236
|
_: 1
|
|
2192
2237
|
})) : o("", !0)]), f(n, { name: "fade" }, {
|
|
2193
|
-
default: O(() => [x.value && !t.range && !E.value ? (b(), s("div",
|
|
2194
|
-
c("div",
|
|
2195
|
-
c("div",
|
|
2238
|
+
default: O(() => [x.value && !t.range && !E.value ? (b(), s("div", ar, [
|
|
2239
|
+
c("div", or, [
|
|
2240
|
+
c("div", sr, [f(j, {
|
|
2196
2241
|
variant: "ghost",
|
|
2197
2242
|
square: "",
|
|
2198
|
-
onClick: i[0] ||= (e) =>
|
|
2243
|
+
onClick: i[0] ||= (e) => Ce(-1)
|
|
2199
2244
|
}, {
|
|
2200
2245
|
default: O(() => [...i[21] ||= [c("svg", {
|
|
2201
2246
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2209,11 +2254,11 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2209
2254
|
"stroke-linejoin": "round"
|
|
2210
2255
|
}, [c("path", { d: "m11 17-5-5 5-5" }), c("path", { d: "m18 17-5-5 5-5" })], -1)]]),
|
|
2211
2256
|
_: 1
|
|
2212
|
-
}),
|
|
2257
|
+
}), N.value === "date" ? (b(), a(j, {
|
|
2213
2258
|
key: 0,
|
|
2214
2259
|
variant: "ghost",
|
|
2215
2260
|
square: "",
|
|
2216
|
-
onClick: i[1] ||= (e) =>
|
|
2261
|
+
onClick: i[1] ||= (e) => Se(-1)
|
|
2217
2262
|
}, {
|
|
2218
2263
|
default: O(() => [...i[22] ||= [c("svg", {
|
|
2219
2264
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2230,13 +2275,13 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2230
2275
|
})) : o("", !0)]),
|
|
2231
2276
|
c("div", {
|
|
2232
2277
|
class: "header-title",
|
|
2233
|
-
onClick:
|
|
2234
|
-
}, [
|
|
2235
|
-
c("div",
|
|
2278
|
+
onClick: Ue
|
|
2279
|
+
}, [N.value === "date" ? (b(), s(e, { key: 0 }, [d(T(te[z.value]) + " " + T(R.value), 1)], 64)) : (b(), s(e, { key: 1 }, [d(T(B.value[0]) + " - " + T(B.value[B.value.length - 1]), 1)], 64))]),
|
|
2280
|
+
c("div", cr, [N.value === "date" ? (b(), a(j, {
|
|
2236
2281
|
key: 0,
|
|
2237
2282
|
variant: "ghost",
|
|
2238
2283
|
square: "",
|
|
2239
|
-
onClick: i[2] ||= (e) =>
|
|
2284
|
+
onClick: i[2] ||= (e) => Se(1)
|
|
2240
2285
|
}, {
|
|
2241
2286
|
default: O(() => [...i[23] ||= [c("svg", {
|
|
2242
2287
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2253,7 +2298,7 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2253
2298
|
})) : o("", !0), f(j, {
|
|
2254
2299
|
variant: "ghost",
|
|
2255
2300
|
square: "",
|
|
2256
|
-
onClick: i[3] ||= (e) =>
|
|
2301
|
+
onClick: i[3] ||= (e) => Ce(1)
|
|
2257
2302
|
}, {
|
|
2258
2303
|
default: O(() => [...i[24] ||= [c("svg", {
|
|
2259
2304
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2269,16 +2314,16 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2269
2314
|
_: 1
|
|
2270
2315
|
})])
|
|
2271
2316
|
]),
|
|
2272
|
-
c("div",
|
|
2317
|
+
c("div", lr, [N.value === "date" ? (b(), s(e, { key: 0 }, [c("div", ur, [(b(), s(e, null, C(re, (e) => c("span", {
|
|
2273
2318
|
key: e,
|
|
2274
2319
|
class: "weekday"
|
|
2275
|
-
}, T(e), 1)), 64))]), c("div",
|
|
2320
|
+
}, T(e), 1)), 64))]), c("div", dr, [(b(!0), s(e, null, C(fe.value, (e, t) => (b(), a(j, {
|
|
2276
2321
|
key: t,
|
|
2277
|
-
variant:
|
|
2278
|
-
intent:
|
|
2322
|
+
variant: ve(e) ? "solid" : _e(e) ? "mute" : "ghost",
|
|
2323
|
+
intent: ve(e) || _e(e) ? "primary" : "none",
|
|
2279
2324
|
class: h(["day-cell", { "is-not-current": !e.isCurrentMonth }]),
|
|
2280
2325
|
padding: "0",
|
|
2281
|
-
onClick: (t) =>
|
|
2326
|
+
onClick: (t) => be(e)
|
|
2282
2327
|
}, {
|
|
2283
2328
|
default: O(() => [d(T(e.day), 1)]),
|
|
2284
2329
|
_: 2
|
|
@@ -2287,12 +2332,12 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2287
2332
|
"intent",
|
|
2288
2333
|
"class",
|
|
2289
2334
|
"onClick"
|
|
2290
|
-
]))), 128))])], 64)) : (b(), s("div",
|
|
2335
|
+
]))), 128))])], 64)) : (b(), s("div", fr, [(b(!0), s(e, null, C(B.value, (e) => (b(), a(j, {
|
|
2291
2336
|
key: e,
|
|
2292
|
-
variant: e ===
|
|
2293
|
-
intent: e ===
|
|
2337
|
+
variant: e === R.value ? "solid" : "ghost",
|
|
2338
|
+
intent: e === R.value ? "primary" : "none",
|
|
2294
2339
|
class: "year-cell",
|
|
2295
|
-
onClick: (t) =>
|
|
2340
|
+
onClick: (t) => xe(e)
|
|
2296
2341
|
}, {
|
|
2297
2342
|
default: O(() => [d(T(e), 1)]),
|
|
2298
2343
|
_: 2
|
|
@@ -2301,16 +2346,16 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2301
2346
|
"intent",
|
|
2302
2347
|
"onClick"
|
|
2303
2348
|
]))), 128))]))]),
|
|
2304
|
-
y.value &&
|
|
2349
|
+
y.value && N.value === "date" ? (b(), s("div", pr, [c("div", mr, [m.value ? (b(), s("div", hr, [
|
|
2305
2350
|
i[27] ||= c("span", { class: "time-label" }, "時", -1),
|
|
2306
2351
|
f(j, {
|
|
2307
2352
|
variant: "ghost",
|
|
2308
2353
|
square: "",
|
|
2309
2354
|
size: "sm",
|
|
2310
2355
|
class: "time-step",
|
|
2311
|
-
onMousedown: i[4] ||= k((e) =>
|
|
2312
|
-
onMouseup:
|
|
2313
|
-
onMouseleave:
|
|
2356
|
+
onMousedown: i[4] ||= k((e) => V("H", -1), ["prevent"]),
|
|
2357
|
+
onMouseup: H,
|
|
2358
|
+
onMouseleave: H
|
|
2314
2359
|
}, {
|
|
2315
2360
|
default: O(() => [...i[25] ||= [c("svg", {
|
|
2316
2361
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2330,17 +2375,17 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2330
2375
|
type: "range",
|
|
2331
2376
|
min: "0",
|
|
2332
2377
|
max: "23",
|
|
2333
|
-
value:
|
|
2334
|
-
onInput: i[5] ||= (e) =>
|
|
2335
|
-
}, null, 40,
|
|
2378
|
+
value: I.value,
|
|
2379
|
+
onInput: i[5] ||= (e) => Te(e, "H")
|
|
2380
|
+
}, null, 40, gr),
|
|
2336
2381
|
f(j, {
|
|
2337
2382
|
variant: "ghost",
|
|
2338
2383
|
square: "",
|
|
2339
2384
|
size: "sm",
|
|
2340
2385
|
class: "time-step",
|
|
2341
|
-
onMousedown: i[6] ||= k((e) =>
|
|
2342
|
-
onMouseup:
|
|
2343
|
-
onMouseleave:
|
|
2386
|
+
onMousedown: i[6] ||= k((e) => V("H", 1), ["prevent"]),
|
|
2387
|
+
onMouseup: H,
|
|
2388
|
+
onMouseleave: H
|
|
2344
2389
|
}, {
|
|
2345
2390
|
default: O(() => [...i[26] ||= [c("svg", {
|
|
2346
2391
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2355,17 +2400,17 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2355
2400
|
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)]]),
|
|
2356
2401
|
_: 1
|
|
2357
2402
|
}),
|
|
2358
|
-
c("span",
|
|
2359
|
-
])) : o("", !0), g.value ? (b(), s("div",
|
|
2403
|
+
c("span", _r, T(M(I.value)), 1)
|
|
2404
|
+
])) : o("", !0), g.value ? (b(), s("div", vr, [
|
|
2360
2405
|
i[30] ||= c("span", { class: "time-label" }, "分", -1),
|
|
2361
2406
|
f(j, {
|
|
2362
2407
|
variant: "ghost",
|
|
2363
2408
|
square: "",
|
|
2364
2409
|
size: "sm",
|
|
2365
2410
|
class: "time-step",
|
|
2366
|
-
onMousedown: i[7] ||= k((e) =>
|
|
2367
|
-
onMouseup:
|
|
2368
|
-
onMouseleave:
|
|
2411
|
+
onMousedown: i[7] ||= k((e) => V("m", -1), ["prevent"]),
|
|
2412
|
+
onMouseup: H,
|
|
2413
|
+
onMouseleave: H
|
|
2369
2414
|
}, {
|
|
2370
2415
|
default: O(() => [...i[28] ||= [c("svg", {
|
|
2371
2416
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2385,17 +2430,17 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2385
2430
|
type: "range",
|
|
2386
2431
|
min: "0",
|
|
2387
2432
|
max: "59",
|
|
2388
|
-
value:
|
|
2389
|
-
onInput: i[8] ||= (e) =>
|
|
2390
|
-
}, null, 40,
|
|
2433
|
+
value: L.value,
|
|
2434
|
+
onInput: i[8] ||= (e) => Te(e, "m")
|
|
2435
|
+
}, null, 40, yr),
|
|
2391
2436
|
f(j, {
|
|
2392
2437
|
variant: "ghost",
|
|
2393
2438
|
square: "",
|
|
2394
2439
|
size: "sm",
|
|
2395
2440
|
class: "time-step",
|
|
2396
|
-
onMousedown: i[9] ||= k((e) =>
|
|
2397
|
-
onMouseup:
|
|
2398
|
-
onMouseleave:
|
|
2441
|
+
onMousedown: i[9] ||= k((e) => V("m", 1), ["prevent"]),
|
|
2442
|
+
onMouseup: H,
|
|
2443
|
+
onMouseleave: H
|
|
2399
2444
|
}, {
|
|
2400
2445
|
default: O(() => [...i[29] ||= [c("svg", {
|
|
2401
2446
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2410,7 +2455,7 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2410
2455
|
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)]]),
|
|
2411
2456
|
_: 1
|
|
2412
2457
|
}),
|
|
2413
|
-
c("span",
|
|
2458
|
+
c("span", br, T(M(L.value)), 1)
|
|
2414
2459
|
])) : o("", !0)])])) : o("", !0)
|
|
2415
2460
|
])) : o("", !0)]),
|
|
2416
2461
|
_: 1
|
|
@@ -2419,14 +2464,14 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2419
2464
|
default: O(() => [x.value && !t.range && E.value ? (b(), s("div", {
|
|
2420
2465
|
key: 0,
|
|
2421
2466
|
class: "mobile-overlay",
|
|
2422
|
-
onClick: k(
|
|
2423
|
-
}, [c("div",
|
|
2467
|
+
onClick: k(X, ["self"])
|
|
2468
|
+
}, [c("div", xr, [
|
|
2424
2469
|
i[41] ||= c("div", { class: "sheet-handle" }, null, -1),
|
|
2425
|
-
c("div",
|
|
2426
|
-
c("div",
|
|
2470
|
+
c("div", Sr, [
|
|
2471
|
+
c("div", Cr, [f(j, {
|
|
2427
2472
|
variant: "ghost",
|
|
2428
2473
|
square: "",
|
|
2429
|
-
onClick: i[10] ||= (e) =>
|
|
2474
|
+
onClick: i[10] ||= (e) => Ce(-1)
|
|
2430
2475
|
}, {
|
|
2431
2476
|
default: O(() => [...i[31] ||= [c("svg", {
|
|
2432
2477
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2440,11 +2485,11 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2440
2485
|
"stroke-linejoin": "round"
|
|
2441
2486
|
}, [c("path", { d: "m11 17-5-5 5-5" }), c("path", { d: "m18 17-5-5 5-5" })], -1)]]),
|
|
2442
2487
|
_: 1
|
|
2443
|
-
}),
|
|
2488
|
+
}), N.value === "date" ? (b(), a(j, {
|
|
2444
2489
|
key: 0,
|
|
2445
2490
|
variant: "ghost",
|
|
2446
2491
|
square: "",
|
|
2447
|
-
onClick: i[11] ||= (e) =>
|
|
2492
|
+
onClick: i[11] ||= (e) => Se(-1)
|
|
2448
2493
|
}, {
|
|
2449
2494
|
default: O(() => [...i[32] ||= [c("svg", {
|
|
2450
2495
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2461,13 +2506,13 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2461
2506
|
})) : o("", !0)]),
|
|
2462
2507
|
c("div", {
|
|
2463
2508
|
class: "header-title",
|
|
2464
|
-
onClick:
|
|
2465
|
-
}, [
|
|
2466
|
-
c("div",
|
|
2509
|
+
onClick: Ue
|
|
2510
|
+
}, [N.value === "date" ? (b(), s(e, { key: 0 }, [d(T(te[z.value]) + " " + T(R.value), 1)], 64)) : (b(), s(e, { key: 1 }, [d(T(B.value[0]) + " - " + T(B.value[B.value.length - 1]), 1)], 64))]),
|
|
2511
|
+
c("div", wr, [N.value === "date" ? (b(), a(j, {
|
|
2467
2512
|
key: 0,
|
|
2468
2513
|
variant: "ghost",
|
|
2469
2514
|
square: "",
|
|
2470
|
-
onClick: i[12] ||= (e) =>
|
|
2515
|
+
onClick: i[12] ||= (e) => Se(1)
|
|
2471
2516
|
}, {
|
|
2472
2517
|
default: O(() => [...i[33] ||= [c("svg", {
|
|
2473
2518
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2484,7 +2529,7 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2484
2529
|
})) : o("", !0), f(j, {
|
|
2485
2530
|
variant: "ghost",
|
|
2486
2531
|
square: "",
|
|
2487
|
-
onClick: i[13] ||= (e) =>
|
|
2532
|
+
onClick: i[13] ||= (e) => Ce(1)
|
|
2488
2533
|
}, {
|
|
2489
2534
|
default: O(() => [...i[34] ||= [c("svg", {
|
|
2490
2535
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2500,16 +2545,16 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2500
2545
|
_: 1
|
|
2501
2546
|
})])
|
|
2502
2547
|
]),
|
|
2503
|
-
c("div",
|
|
2548
|
+
c("div", Tr, [N.value === "date" ? (b(), s(e, { key: 0 }, [c("div", Er, [(b(), s(e, null, C(re, (e) => c("span", {
|
|
2504
2549
|
key: e,
|
|
2505
2550
|
class: "weekday"
|
|
2506
|
-
}, T(e), 1)), 64))]), c("div",
|
|
2551
|
+
}, T(e), 1)), 64))]), c("div", Dr, [(b(!0), s(e, null, C(fe.value, (e, t) => (b(), a(j, {
|
|
2507
2552
|
key: t,
|
|
2508
|
-
variant:
|
|
2509
|
-
intent:
|
|
2553
|
+
variant: ve(e) ? "solid" : _e(e) ? "mute" : "ghost",
|
|
2554
|
+
intent: ve(e) || _e(e) ? "primary" : "none",
|
|
2510
2555
|
class: h(["day-cell", { "is-not-current": !e.isCurrentMonth }]),
|
|
2511
2556
|
padding: "0",
|
|
2512
|
-
onClick: (t) =>
|
|
2557
|
+
onClick: (t) => be(e)
|
|
2513
2558
|
}, {
|
|
2514
2559
|
default: O(() => [d(T(e.day), 1)]),
|
|
2515
2560
|
_: 2
|
|
@@ -2518,12 +2563,12 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2518
2563
|
"intent",
|
|
2519
2564
|
"class",
|
|
2520
2565
|
"onClick"
|
|
2521
|
-
]))), 128))])], 64)) : (b(), s("div",
|
|
2566
|
+
]))), 128))])], 64)) : (b(), s("div", Or, [(b(!0), s(e, null, C(B.value, (e) => (b(), a(j, {
|
|
2522
2567
|
key: e,
|
|
2523
|
-
variant: e ===
|
|
2524
|
-
intent: e ===
|
|
2568
|
+
variant: e === R.value ? "solid" : "ghost",
|
|
2569
|
+
intent: e === R.value ? "primary" : "none",
|
|
2525
2570
|
class: "year-cell",
|
|
2526
|
-
onClick: (t) =>
|
|
2571
|
+
onClick: (t) => xe(e)
|
|
2527
2572
|
}, {
|
|
2528
2573
|
default: O(() => [d(T(e), 1)]),
|
|
2529
2574
|
_: 2
|
|
@@ -2532,16 +2577,16 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2532
2577
|
"intent",
|
|
2533
2578
|
"onClick"
|
|
2534
2579
|
]))), 128))]))]),
|
|
2535
|
-
y.value &&
|
|
2580
|
+
y.value && N.value === "date" ? (b(), s("div", kr, [c("div", Ar, [m.value ? (b(), s("div", jr, [
|
|
2536
2581
|
i[37] ||= c("span", { class: "time-label" }, "時", -1),
|
|
2537
2582
|
f(j, {
|
|
2538
2583
|
variant: "ghost",
|
|
2539
2584
|
square: "",
|
|
2540
2585
|
size: "sm",
|
|
2541
2586
|
class: "time-step",
|
|
2542
|
-
onMousedown: i[14] ||= k((e) =>
|
|
2543
|
-
onMouseup:
|
|
2544
|
-
onMouseleave:
|
|
2587
|
+
onMousedown: i[14] ||= k((e) => V("H", -1), ["prevent"]),
|
|
2588
|
+
onMouseup: H,
|
|
2589
|
+
onMouseleave: H
|
|
2545
2590
|
}, {
|
|
2546
2591
|
default: O(() => [...i[35] ||= [c("svg", {
|
|
2547
2592
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2561,17 +2606,17 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2561
2606
|
type: "range",
|
|
2562
2607
|
min: "0",
|
|
2563
2608
|
max: "23",
|
|
2564
|
-
value:
|
|
2565
|
-
onInput: i[15] ||= (e) =>
|
|
2566
|
-
}, null, 40,
|
|
2609
|
+
value: I.value,
|
|
2610
|
+
onInput: i[15] ||= (e) => Te(e, "H")
|
|
2611
|
+
}, null, 40, Mr),
|
|
2567
2612
|
f(j, {
|
|
2568
2613
|
variant: "ghost",
|
|
2569
2614
|
square: "",
|
|
2570
2615
|
size: "sm",
|
|
2571
2616
|
class: "time-step",
|
|
2572
|
-
onMousedown: i[16] ||= k((e) =>
|
|
2573
|
-
onMouseup:
|
|
2574
|
-
onMouseleave:
|
|
2617
|
+
onMousedown: i[16] ||= k((e) => V("H", 1), ["prevent"]),
|
|
2618
|
+
onMouseup: H,
|
|
2619
|
+
onMouseleave: H
|
|
2575
2620
|
}, {
|
|
2576
2621
|
default: O(() => [...i[36] ||= [c("svg", {
|
|
2577
2622
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2586,17 +2631,17 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2586
2631
|
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)]]),
|
|
2587
2632
|
_: 1
|
|
2588
2633
|
}),
|
|
2589
|
-
c("span",
|
|
2590
|
-
])) : o("", !0), g.value ? (b(), s("div",
|
|
2634
|
+
c("span", Nr, T(M(I.value)), 1)
|
|
2635
|
+
])) : o("", !0), g.value ? (b(), s("div", Pr, [
|
|
2591
2636
|
i[40] ||= c("span", { class: "time-label" }, "分", -1),
|
|
2592
2637
|
f(j, {
|
|
2593
2638
|
variant: "ghost",
|
|
2594
2639
|
square: "",
|
|
2595
2640
|
size: "sm",
|
|
2596
2641
|
class: "time-step",
|
|
2597
|
-
onMousedown: i[17] ||= k((e) =>
|
|
2598
|
-
onMouseup:
|
|
2599
|
-
onMouseleave:
|
|
2642
|
+
onMousedown: i[17] ||= k((e) => V("m", -1), ["prevent"]),
|
|
2643
|
+
onMouseup: H,
|
|
2644
|
+
onMouseleave: H
|
|
2600
2645
|
}, {
|
|
2601
2646
|
default: O(() => [...i[38] ||= [c("svg", {
|
|
2602
2647
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2616,17 +2661,17 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2616
2661
|
type: "range",
|
|
2617
2662
|
min: "0",
|
|
2618
2663
|
max: "59",
|
|
2619
|
-
value:
|
|
2620
|
-
onInput: i[18] ||= (e) =>
|
|
2621
|
-
}, null, 40,
|
|
2664
|
+
value: L.value,
|
|
2665
|
+
onInput: i[18] ||= (e) => Te(e, "m")
|
|
2666
|
+
}, null, 40, Fr),
|
|
2622
2667
|
f(j, {
|
|
2623
2668
|
variant: "ghost",
|
|
2624
2669
|
square: "",
|
|
2625
2670
|
size: "sm",
|
|
2626
2671
|
class: "time-step",
|
|
2627
|
-
onMousedown: i[19] ||= k((e) =>
|
|
2628
|
-
onMouseup:
|
|
2629
|
-
onMouseleave:
|
|
2672
|
+
onMousedown: i[19] ||= k((e) => V("m", 1), ["prevent"]),
|
|
2673
|
+
onMouseup: H,
|
|
2674
|
+
onMouseleave: H
|
|
2630
2675
|
}, {
|
|
2631
2676
|
default: O(() => [...i[39] ||= [c("svg", {
|
|
2632
2677
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2641,7 +2686,7 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2641
2686
|
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)]]),
|
|
2642
2687
|
_: 1
|
|
2643
2688
|
}),
|
|
2644
|
-
c("span",
|
|
2689
|
+
c("span", Ir, T(M(L.value)), 1)
|
|
2645
2690
|
])) : o("", !0)])])) : o("", !0)
|
|
2646
2691
|
])])) : o("", !0)]),
|
|
2647
2692
|
_: 1
|
|
@@ -2650,16 +2695,16 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2650
2695
|
default: O(() => [x.value && t.range && !E.value ? (b(), s("div", {
|
|
2651
2696
|
key: 0,
|
|
2652
2697
|
class: "range-overlay",
|
|
2653
|
-
onClick: k(
|
|
2654
|
-
}, [c("div",
|
|
2698
|
+
onClick: k(X, ["self"])
|
|
2699
|
+
}, [c("div", Lr, [
|
|
2655
2700
|
i[46] ||= c("p", { class: "range-modal-title" }, "選擇日期範圍", -1),
|
|
2656
|
-
c("div",
|
|
2657
|
-
c("div",
|
|
2658
|
-
c("div",
|
|
2701
|
+
c("div", Rr, [(b(!0), s(e, null, C(Ae.value, (t) => (b(), s(e, { key: t.isLeft ? "left" : "right" }, [t.isLeft ? o("", !0) : (b(), s("div", zr)), c("div", Br, [
|
|
2702
|
+
c("div", Vr, [
|
|
2703
|
+
c("div", Hr, [t.isLeft ? (b(), a(j, {
|
|
2659
2704
|
key: 0,
|
|
2660
2705
|
variant: "ghost",
|
|
2661
2706
|
square: "",
|
|
2662
|
-
onClick:
|
|
2707
|
+
onClick: Le
|
|
2663
2708
|
}, {
|
|
2664
2709
|
default: O(() => [...i[42] ||= [c("svg", {
|
|
2665
2710
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2673,13 +2718,13 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2673
2718
|
"stroke-linejoin": "round"
|
|
2674
2719
|
}, [c("path", { d: "m15 18-6-6 6-6" })], -1)]]),
|
|
2675
2720
|
_: 1
|
|
2676
|
-
})) : (b(), s("div",
|
|
2677
|
-
c("div",
|
|
2678
|
-
c("div",
|
|
2721
|
+
})) : (b(), s("div", Ur))]),
|
|
2722
|
+
c("div", Wr, T(te[t.month]) + " " + T(t.year), 1),
|
|
2723
|
+
c("div", Gr, [t.isLeft ? (b(), s("div", Kr)) : (b(), a(j, {
|
|
2679
2724
|
key: 0,
|
|
2680
2725
|
variant: "ghost",
|
|
2681
2726
|
square: "",
|
|
2682
|
-
onClick:
|
|
2727
|
+
onClick: Re
|
|
2683
2728
|
}, {
|
|
2684
2729
|
default: O(() => [...i[43] ||= [c("svg", {
|
|
2685
2730
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2695,27 +2740,27 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2695
2740
|
_: 1
|
|
2696
2741
|
}))])
|
|
2697
2742
|
]),
|
|
2698
|
-
c("div",
|
|
2743
|
+
c("div", qr, [(b(), s(e, null, C(re, (e) => c("span", {
|
|
2699
2744
|
key: e,
|
|
2700
2745
|
class: "weekday"
|
|
2701
2746
|
}, T(e), 1)), 64))]),
|
|
2702
|
-
c("div",
|
|
2747
|
+
c("div", Jr, [(b(!0), s(e, null, C(t.days, (e, t) => (b(), s("div", {
|
|
2703
2748
|
key: t,
|
|
2704
|
-
class: h(["range-day",
|
|
2705
|
-
onClick: (t) =>
|
|
2706
|
-
onMouseenter: (t) =>
|
|
2707
|
-
}, T(e.day), 43,
|
|
2749
|
+
class: h(["range-day", Be(e)]),
|
|
2750
|
+
onClick: (t) => ze(e),
|
|
2751
|
+
onMouseenter: (t) => J.value = e
|
|
2752
|
+
}, T(e.day), 43, Yr))), 128))])
|
|
2708
2753
|
])], 64))), 128))]),
|
|
2709
|
-
c("div",
|
|
2710
|
-
c("span", { class: h(["range-val", { "is-empty": !
|
|
2754
|
+
c("div", Xr, [c("div", Zr, [
|
|
2755
|
+
c("span", { class: h(["range-val", { "is-empty": !Pe.value }]) }, T(Pe.value || "開始日期"), 3),
|
|
2711
2756
|
i[44] ||= c("span", { class: "range-arrow" }, "→", -1),
|
|
2712
|
-
c("span", { class: h(["range-val", { "is-empty": !
|
|
2757
|
+
c("span", { class: h(["range-val", { "is-empty": !Fe.value }]) }, T(Fe.value || "結束日期"), 3)
|
|
2713
2758
|
]), f(j, {
|
|
2714
2759
|
variant: "solid",
|
|
2715
2760
|
intent: "primary",
|
|
2716
2761
|
class: "confirm-btn",
|
|
2717
|
-
disabled: !
|
|
2718
|
-
onClick: k(
|
|
2762
|
+
disabled: !Ee.value,
|
|
2763
|
+
onClick: k(Ve, ["stop"])
|
|
2719
2764
|
}, {
|
|
2720
2765
|
default: O(() => [...i[45] ||= [d("確認", -1)]]),
|
|
2721
2766
|
_: 1
|
|
@@ -2727,15 +2772,15 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2727
2772
|
default: O(() => [x.value && t.range && E.value ? (b(), s("div", {
|
|
2728
2773
|
key: 0,
|
|
2729
2774
|
class: "mobile-overlay",
|
|
2730
|
-
onClick: k(
|
|
2731
|
-
}, [c("div",
|
|
2775
|
+
onClick: k(X, ["self"])
|
|
2776
|
+
}, [c("div", Qr, [
|
|
2732
2777
|
i[51] ||= c("div", { class: "sheet-handle" }, null, -1),
|
|
2733
2778
|
i[52] ||= c("p", { class: "range-modal-title" }, "選擇日期範圍", -1),
|
|
2734
|
-
c("div",
|
|
2735
|
-
c("div",
|
|
2779
|
+
c("div", $r, [
|
|
2780
|
+
c("div", ei, [f(j, {
|
|
2736
2781
|
variant: "ghost",
|
|
2737
2782
|
square: "",
|
|
2738
|
-
onClick:
|
|
2783
|
+
onClick: Le
|
|
2739
2784
|
}, {
|
|
2740
2785
|
default: O(() => [...i[47] ||= [c("svg", {
|
|
2741
2786
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2750,11 +2795,11 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2750
2795
|
}, [c("path", { d: "m15 18-6-6 6-6" })], -1)]]),
|
|
2751
2796
|
_: 1
|
|
2752
2797
|
})]),
|
|
2753
|
-
c("div",
|
|
2754
|
-
c("div",
|
|
2798
|
+
c("div", ti, T(te[W.value]) + " " + T(U.value), 1),
|
|
2799
|
+
c("div", ni, [f(j, {
|
|
2755
2800
|
variant: "ghost",
|
|
2756
2801
|
square: "",
|
|
2757
|
-
onClick:
|
|
2802
|
+
onClick: Re
|
|
2758
2803
|
}, {
|
|
2759
2804
|
default: O(() => [...i[48] ||= [c("svg", {
|
|
2760
2805
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2770,25 +2815,25 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2770
2815
|
_: 1
|
|
2771
2816
|
})])
|
|
2772
2817
|
]),
|
|
2773
|
-
c("div",
|
|
2818
|
+
c("div", ri, [(b(), s(e, null, C(re, (e) => c("span", {
|
|
2774
2819
|
key: e,
|
|
2775
2820
|
class: "weekday"
|
|
2776
2821
|
}, T(e), 1)), 64))]),
|
|
2777
|
-
c("div",
|
|
2822
|
+
c("div", ii, [(b(!0), s(e, null, C(Oe.value, (e, t) => (b(), s("div", {
|
|
2778
2823
|
key: t,
|
|
2779
|
-
class: h(["range-day",
|
|
2780
|
-
onClick: (t) =>
|
|
2781
|
-
}, T(e.day), 11,
|
|
2782
|
-
c("div",
|
|
2783
|
-
c("span", { class: h(["range-val", { "is-empty": !
|
|
2824
|
+
class: h(["range-day", Be(e)]),
|
|
2825
|
+
onClick: (t) => ze(e)
|
|
2826
|
+
}, T(e.day), 11, ai))), 128))]),
|
|
2827
|
+
c("div", oi, [c("div", si, [
|
|
2828
|
+
c("span", { class: h(["range-val", { "is-empty": !Pe.value }]) }, T(Pe.value || "開始日期"), 3),
|
|
2784
2829
|
i[49] ||= c("span", { class: "range-arrow" }, "→", -1),
|
|
2785
|
-
c("span", { class: h(["range-val", { "is-empty": !
|
|
2830
|
+
c("span", { class: h(["range-val", { "is-empty": !Fe.value }]) }, T(Fe.value || "結束日期"), 3)
|
|
2786
2831
|
]), f(j, {
|
|
2787
2832
|
variant: "solid",
|
|
2788
2833
|
intent: "primary",
|
|
2789
2834
|
class: "confirm-btn",
|
|
2790
|
-
disabled: !
|
|
2791
|
-
onClick: k(
|
|
2835
|
+
disabled: !Ee.value,
|
|
2836
|
+
onClick: k(Ve, ["stop"])
|
|
2792
2837
|
}, {
|
|
2793
2838
|
default: O(() => [...i[50] ||= [d("確認", -1)]]),
|
|
2794
2839
|
_: 1
|
|
@@ -2798,7 +2843,7 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2798
2843
|
})
|
|
2799
2844
|
], 512));
|
|
2800
2845
|
}
|
|
2801
|
-
}), [["__scopeId", "data-v-9f942c6b"]]),
|
|
2846
|
+
}), [["__scopeId", "data-v-9f942c6b"]]), li = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
2802
2847
|
__name: "NTooltip",
|
|
2803
2848
|
props: {
|
|
2804
2849
|
content: { default: "" },
|
|
@@ -2833,10 +2878,10 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2833
2878
|
_: 3
|
|
2834
2879
|
})], 32));
|
|
2835
2880
|
}
|
|
2836
|
-
}), [["__scopeId", "data-v-7a53ca0a"]]),
|
|
2881
|
+
}), [["__scopeId", "data-v-7a53ca0a"]]), ui = { class: "modal-header" }, di = { class: "modal-title" }, fi = { class: "modal-content" }, pi = {
|
|
2837
2882
|
key: 0,
|
|
2838
2883
|
class: "modal-footer"
|
|
2839
|
-
},
|
|
2884
|
+
}, mi = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
2840
2885
|
__name: "NModal",
|
|
2841
2886
|
props: {
|
|
2842
2887
|
show: {
|
|
@@ -2880,7 +2925,7 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2880
2925
|
class: "modal-container",
|
|
2881
2926
|
style: g({ width: e.width })
|
|
2882
2927
|
}, [
|
|
2883
|
-
c("header",
|
|
2928
|
+
c("header", ui, [c("h3", di, T(e.title), 1), e.showClose ? (b(), s("button", {
|
|
2884
2929
|
key: 0,
|
|
2885
2930
|
class: "close-btn",
|
|
2886
2931
|
onClick: l
|
|
@@ -2892,18 +2937,18 @@ var Tn = { class: "icon-wrap" }, En = ["innerHTML"], Dn = {
|
|
|
2892
2937
|
fill: "currentColor",
|
|
2893
2938
|
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"
|
|
2894
2939
|
})], -1)]])) : o("", !0)]),
|
|
2895
|
-
c("main",
|
|
2896
|
-
r.$slots.footer ? (b(), s("footer",
|
|
2940
|
+
c("main", fi, [w(r.$slots, "default", {}, void 0, !0)]),
|
|
2941
|
+
r.$slots.footer ? (b(), s("footer", pi, [w(r.$slots, "footer", {}, void 0, !0)])) : o("", !0)
|
|
2897
2942
|
], 4)], 4)) : o("", !0)]),
|
|
2898
2943
|
_: 3
|
|
2899
2944
|
})]));
|
|
2900
2945
|
}
|
|
2901
|
-
}), [["__scopeId", "data-v-ee2fac3c"]]),
|
|
2902
|
-
function
|
|
2946
|
+
}), [["__scopeId", "data-v-ee2fac3c"]]), hi = 0, gi = x([]);
|
|
2947
|
+
function _i() {
|
|
2903
2948
|
let e = function(e, t = {}) {
|
|
2904
|
-
let n = ++
|
|
2949
|
+
let n = ++hi;
|
|
2905
2950
|
return new Promise((r) => {
|
|
2906
|
-
|
|
2951
|
+
gi.push({
|
|
2907
2952
|
id: n,
|
|
2908
2953
|
type: "alert",
|
|
2909
2954
|
message: e,
|
|
@@ -2929,8 +2974,8 @@ function di() {
|
|
|
2929
2974
|
});
|
|
2930
2975
|
function t(e, t = {}) {
|
|
2931
2976
|
return new Promise((n) => {
|
|
2932
|
-
let r = ++
|
|
2933
|
-
|
|
2977
|
+
let r = ++hi;
|
|
2978
|
+
gi.push({
|
|
2934
2979
|
id: r,
|
|
2935
2980
|
type: "confirm",
|
|
2936
2981
|
message: e,
|
|
@@ -2943,10 +2988,10 @@ function di() {
|
|
|
2943
2988
|
});
|
|
2944
2989
|
}
|
|
2945
2990
|
function n() {
|
|
2946
|
-
for (;
|
|
2991
|
+
for (; gi.length > 0;) gi.shift().resolve(!1);
|
|
2947
2992
|
}
|
|
2948
2993
|
return {
|
|
2949
|
-
alerts:
|
|
2994
|
+
alerts: gi,
|
|
2950
2995
|
alert: e,
|
|
2951
2996
|
confirm: t,
|
|
2952
2997
|
clearAlerts: n
|
|
@@ -2954,13 +2999,13 @@ function di() {
|
|
|
2954
2999
|
}
|
|
2955
3000
|
//#endregion
|
|
2956
3001
|
//#region src/components/NAlert.vue?vue&type=script&setup=true&lang.ts
|
|
2957
|
-
var
|
|
3002
|
+
var vi = { class: "cards-wrapper" }, yi = ["innerHTML"], bi = { class: "card-body" }, xi = {
|
|
2958
3003
|
key: 0,
|
|
2959
3004
|
class: "card-title"
|
|
2960
|
-
},
|
|
3005
|
+
}, Si = { class: "card-message" }, Ci = { class: "card-footer" }, wi = ["onClick"], Ti = ["onClick"], Ei = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
2961
3006
|
__name: "NAlert",
|
|
2962
3007
|
setup(n) {
|
|
2963
|
-
let { alerts: r, clearAlerts: i } =
|
|
3008
|
+
let { alerts: r, clearAlerts: i } = _i(), l = {
|
|
2964
3009
|
success: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"72\" height=\"72\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M8 12l3 3 5-6\"/></svg>",
|
|
2965
3010
|
warning: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"72\" height=\"72\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\"/><path d=\"M12 9v4\"/><path d=\"M12 17h.01\"/></svg>",
|
|
2966
3011
|
danger: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"72\" height=\"72\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m15 9-6 6\"/><path d=\"m9 9 6 6\"/></svg>",
|
|
@@ -2997,7 +3042,7 @@ var fi = { class: "cards-wrapper" }, pi = ["innerHTML"], mi = { class: "card-bod
|
|
|
2997
3042
|
}
|
|
2998
3043
|
return v(() => document.addEventListener("keydown", m)), y(() => {
|
|
2999
3044
|
document.removeEventListener("keydown", m), i();
|
|
3000
|
-
}), (n, i) => (b(), a(t, { to: "body" }, [c("div", { class: h(["backdrop", { open: E(r).length > 0 }]) }, null, 2), c("div", { class: h(["alert-stack", { open: E(r).length > 0 }]) }, [c("div",
|
|
3045
|
+
}), (n, i) => (b(), a(t, { to: "body" }, [c("div", { class: h(["backdrop", { open: E(r).length > 0 }]) }, null, 2), c("div", { class: h(["alert-stack", { open: E(r).length > 0 }]) }, [c("div", vi, [(b(!0), s(e, null, C(E(r), (e, t) => (b(), s("div", {
|
|
3001
3046
|
key: e.id,
|
|
3002
3047
|
class: h(["alert-card", `status-${e.status}`]),
|
|
3003
3048
|
style: g(d(t))
|
|
@@ -3005,25 +3050,25 @@ var fi = { class: "cards-wrapper" }, pi = ["innerHTML"], mi = { class: "card-bod
|
|
|
3005
3050
|
c("div", {
|
|
3006
3051
|
class: "card-icon",
|
|
3007
3052
|
innerHTML: u(e)
|
|
3008
|
-
}, null, 8,
|
|
3009
|
-
c("div",
|
|
3010
|
-
c("div",
|
|
3053
|
+
}, null, 8, yi),
|
|
3054
|
+
c("div", bi, [e.title ? (b(), s("p", xi, T(e.title), 1)) : o("", !0), c("p", Si, T(e.message), 1)]),
|
|
3055
|
+
c("div", Ci, [e.type === "confirm" ? (b(), s("button", {
|
|
3011
3056
|
key: 0,
|
|
3012
3057
|
class: "btn btn-cancel",
|
|
3013
3058
|
onClick: (t) => p(e)
|
|
3014
|
-
}, T(e.cancelText), 9,
|
|
3059
|
+
}, T(e.cancelText), 9, wi)) : o("", !0), c("button", {
|
|
3015
3060
|
class: h(["btn btn-confirm", `btn-${e.status}`]),
|
|
3016
3061
|
onClick: (t) => f(e)
|
|
3017
|
-
}, T(e.confirmText), 11,
|
|
3062
|
+
}, T(e.confirmText), 11, Ti)])
|
|
3018
3063
|
], 6))), 128))])], 2)]));
|
|
3019
3064
|
}
|
|
3020
|
-
}), [["__scopeId", "data-v-55bcfae2"]]),
|
|
3065
|
+
}), [["__scopeId", "data-v-55bcfae2"]]), Di = { class: "nav" }, Oi = ["onClick"], ki = ["innerHTML"], Ai = { class: "nav-list" }, ji = ["href", "onClick"], Mi = ["innerHTML"], Ni = { class: "nav-text" }, Pi = { class: "user-capsule" }, Fi = { class: "user-avatar" }, Ii = ["src"], Li = {
|
|
3021
3066
|
key: 1,
|
|
3022
3067
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3023
3068
|
width: "36",
|
|
3024
3069
|
height: "36",
|
|
3025
3070
|
viewBox: "0 0 36 36"
|
|
3026
|
-
},
|
|
3071
|
+
}, Ri = { class: "user-info" }, zi = { class: "user-name-row" }, Bi = { class: "user-name" }, Vi = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
3027
3072
|
__name: "NSidebar",
|
|
3028
3073
|
props: {
|
|
3029
3074
|
isOpen: {
|
|
@@ -3041,7 +3086,7 @@ var fi = { class: "cards-wrapper" }, pi = ["innerHTML"], mi = { class: "card-bod
|
|
|
3041
3086
|
"navigate"
|
|
3042
3087
|
],
|
|
3043
3088
|
setup(n, { emit: r }) {
|
|
3044
|
-
let { isMenuExpanded: i, toggleMenu: o } =
|
|
3089
|
+
let { isMenuExpanded: i, toggleMenu: o } = Pt(), l = S(!1), d = r, p = (e) => e.children?.some((e) => e.route === n.currentPath), m = (e) => n.currentPath === e, g = (e) => {
|
|
3045
3090
|
n.currentPath !== e.route && d("navigate", e);
|
|
3046
3091
|
};
|
|
3047
3092
|
return (r, _) => (b(), s("nav", {
|
|
@@ -3070,13 +3115,13 @@ var fi = { class: "cards-wrapper" }, pi = ["innerHTML"], mi = { class: "card-bod
|
|
|
3070
3115
|
onMouseenter: _[2] ||= (e) => l.value = !0
|
|
3071
3116
|
}, [
|
|
3072
3117
|
_[9] ||= c("div", { class: "header" }, [c("div", { class: "brand-logo" }, [c("span", { class: "logo-text" }, "NICKLABS"), c("span", { class: "logo-icon" }, "N")])], -1),
|
|
3073
|
-
c("div",
|
|
3118
|
+
c("div", Di, [(b(!0), s(e, null, C(n.menus, (t) => (b(), s("div", { class: h(["menu", {
|
|
3074
3119
|
open: E(i)(t.title),
|
|
3075
3120
|
active: p(t)
|
|
3076
3121
|
}]) }, [c("div", {
|
|
3077
3122
|
class: "title",
|
|
3078
3123
|
onClick: (e) => E(o)(t.title)
|
|
3079
|
-
}, [c("div", null, [c("div", { innerHTML: t.icon }, null, 8,
|
|
3124
|
+
}, [c("div", null, [c("div", { innerHTML: t.icon }, null, 8, ki), c("span", null, T(t.title), 1)]), _[6] ||= c("svg", {
|
|
3080
3125
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3081
3126
|
width: "14",
|
|
3082
3127
|
height: "14",
|
|
@@ -3087,17 +3132,17 @@ var fi = { class: "cards-wrapper" }, pi = ["innerHTML"], mi = { class: "card-bod
|
|
|
3087
3132
|
"stroke-linecap": "round",
|
|
3088
3133
|
"stroke-linejoin": "round",
|
|
3089
3134
|
class: "icon"
|
|
3090
|
-
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)], 8,
|
|
3135
|
+
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)], 8, Oi), c("div", Ai, [c("div", null, [(b(!0), s(e, null, C(t.children, (e) => (b(), s("a", {
|
|
3091
3136
|
href: e.route,
|
|
3092
3137
|
onClick: k((t) => g(e), ["prevent"])
|
|
3093
|
-
}, [c("div", { class: h(["nav-item", { active: m(e.route) }]) }, [c("div", { innerHTML: e.icon }, null, 8,
|
|
3094
|
-
c("div",
|
|
3095
|
-
c("div",
|
|
3138
|
+
}, [c("div", { class: h(["nav-item", { active: m(e.route) }]) }, [c("div", { innerHTML: e.icon }, null, 8, Mi), c("span", Ni, T(e.title), 1)], 2)], 8, ji))), 256))])])], 2))), 256))]),
|
|
3139
|
+
c("div", Pi, [w(r.$slots, "user", {}, () => [
|
|
3140
|
+
c("div", Fi, [n.userAvatarUrl ? (b(), s("img", {
|
|
3096
3141
|
key: 0,
|
|
3097
3142
|
src: n.userAvatarUrl,
|
|
3098
3143
|
alt: "User Avatar"
|
|
3099
|
-
}, null, 8,
|
|
3100
|
-
c("div",
|
|
3144
|
+
}, null, 8, Ii)) : (b(), s("svg", Li, [..._[7] ||= [u("<defs data-v-f8786adf><clipPath id=\"avatarClip\" data-v-f8786adf><circle cx=\"18\" cy=\"18\" r=\"18\" data-v-f8786adf></circle></clipPath></defs><circle cx=\"18\" cy=\"18\" r=\"18\" fill=\"#dbeafe\" data-v-f8786adf></circle><g clip-path=\"url(#avatarClip)\" data-v-f8786adf><circle cx=\"18\" cy=\"14\" r=\"6\" fill=\"#2563eb\" data-v-f8786adf></circle><path d=\"M6,34 Q6,24 18,24 Q30,24 30,34\" fill=\"#2563eb\" data-v-f8786adf></path></g>", 3)]]))]),
|
|
3145
|
+
c("div", Ri, [c("div", zi, [c("span", Bi, T(n.userName || "ADMINISTRATOR"), 1)])]),
|
|
3101
3146
|
f(j, {
|
|
3102
3147
|
class: "logout-btn",
|
|
3103
3148
|
intent: "error",
|
|
@@ -3136,7 +3181,7 @@ var fi = { class: "cards-wrapper" }, pi = ["innerHTML"], mi = { class: "card-bod
|
|
|
3136
3181
|
}, null, 2)]))
|
|
3137
3182
|
], 34));
|
|
3138
3183
|
}
|
|
3139
|
-
}), [["__scopeId", "data-v-f8786adf"]]),
|
|
3184
|
+
}), [["__scopeId", "data-v-f8786adf"]]), Hi = { class: "layout" }, Ui = { class: "main-content" }, Wi = { class: "copyright" }, Gi = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
3140
3185
|
__name: "NLayout",
|
|
3141
3186
|
props: {
|
|
3142
3187
|
isShowSidebar: {
|
|
@@ -3149,8 +3194,8 @@ var fi = { class: "cards-wrapper" }, pi = ["innerHTML"], mi = { class: "card-bod
|
|
|
3149
3194
|
},
|
|
3150
3195
|
emits: ["logout", "navigate"],
|
|
3151
3196
|
setup(e, { emit: t }) {
|
|
3152
|
-
let n =
|
|
3153
|
-
return (t, i) => (b(), s("div",
|
|
3197
|
+
let n = Pt(), r = t;
|
|
3198
|
+
return (t, i) => (b(), s("div", Hi, [e.isShowSidebar ? (b(), a(Vi, {
|
|
3154
3199
|
key: 0,
|
|
3155
3200
|
isOpen: E(n).isSidebarExpanded(),
|
|
3156
3201
|
"onUpdate:isOpen": i[0] ||= (e) => E(n).toggleSidebar(),
|
|
@@ -3162,18 +3207,18 @@ var fi = { class: "cards-wrapper" }, pi = ["innerHTML"], mi = { class: "card-bod
|
|
|
3162
3207
|
"isOpen",
|
|
3163
3208
|
"menus",
|
|
3164
3209
|
"currentPath"
|
|
3165
|
-
])) : o("", !0), c("main",
|
|
3210
|
+
])) : o("", !0), c("main", Ui, [w(t.$slots, "default", {}, void 0, !0), c("div", Wi, T(e.copyright), 1)])]));
|
|
3166
3211
|
}
|
|
3167
|
-
}), [["__scopeId", "data-v-42c0ab8b"]]),
|
|
3212
|
+
}), [["__scopeId", "data-v-42c0ab8b"]]), Ki = { class: "topbar" }, qi = { class: "topbar-left" }, Ji = { class: "topbar-right" }, Yi = {
|
|
3168
3213
|
key: 0,
|
|
3169
3214
|
class: "pill"
|
|
3170
|
-
},
|
|
3215
|
+
}, Xi = {
|
|
3171
3216
|
key: 0,
|
|
3172
3217
|
class: "name"
|
|
3173
|
-
},
|
|
3218
|
+
}, Zi = {
|
|
3174
3219
|
key: 1,
|
|
3175
3220
|
class: "separator"
|
|
3176
|
-
},
|
|
3221
|
+
}, Qi = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
3177
3222
|
__name: "NNavigation",
|
|
3178
3223
|
props: {
|
|
3179
3224
|
isShowSidebar: {
|
|
@@ -3198,7 +3243,7 @@ var fi = { class: "cards-wrapper" }, pi = ["innerHTML"], mi = { class: "card-bod
|
|
|
3198
3243
|
let n = t, r = () => {
|
|
3199
3244
|
document.fullscreenElement ? document.exitFullscreen?.() : document.documentElement.requestFullscreen();
|
|
3200
3245
|
};
|
|
3201
|
-
return (t, i) => (b(), s("header",
|
|
3246
|
+
return (t, i) => (b(), s("header", Ki, [c("div", qi, [e.isShowSidebar ? (b(), a(j, {
|
|
3202
3247
|
key: 0,
|
|
3203
3248
|
onClick: i[0] ||= (e) => n("toggleSidebar"),
|
|
3204
3249
|
padding: "8px"
|
|
@@ -3241,9 +3286,9 @@ var fi = { class: "cards-wrapper" }, pi = ["innerHTML"], mi = { class: "card-bod
|
|
|
3241
3286
|
c("path", { d: "M16 21h3a2 2 0 0 0 2-2v-3" })
|
|
3242
3287
|
], -1)]]),
|
|
3243
3288
|
_: 1
|
|
3244
|
-
})) : o("", !0)]), c("div",
|
|
3245
|
-
e.isShowUser ? (b(), s("span",
|
|
3246
|
-
e.isShowUser && e.isShowLogoutButton ? (b(), s("div",
|
|
3289
|
+
})) : o("", !0)]), c("div", Ji, [e.isShowUser || e.isShowLogoutButton ? (b(), s("div", Yi, [
|
|
3290
|
+
e.isShowUser ? (b(), s("span", Xi, "Nick")) : o("", !0),
|
|
3291
|
+
e.isShowUser && e.isShowLogoutButton ? (b(), s("div", Zi)) : o("", !0),
|
|
3247
3292
|
e.isShowLogoutButton ? (b(), a(j, {
|
|
3248
3293
|
key: 2,
|
|
3249
3294
|
variant: "mute",
|
|
@@ -3269,10 +3314,10 @@ var fi = { class: "cards-wrapper" }, pi = ["innerHTML"], mi = { class: "card-bod
|
|
|
3269
3314
|
})) : o("", !0)
|
|
3270
3315
|
])) : o("", !0)])]));
|
|
3271
3316
|
}
|
|
3272
|
-
}), [["__scopeId", "data-v-bb912f40"]]),
|
|
3317
|
+
}), [["__scopeId", "data-v-bb912f40"]]), $i = { class: "brand" }, ea = ["src", "alt"], ta = {
|
|
3273
3318
|
key: 1,
|
|
3274
3319
|
class: "icon"
|
|
3275
|
-
},
|
|
3320
|
+
}, na = { key: 2 }, ra = { key: 3 }, ia = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
3276
3321
|
__name: "NLoginLayout",
|
|
3277
3322
|
props: {
|
|
3278
3323
|
backgroundImage: { default: "" },
|
|
@@ -3285,54 +3330,54 @@ var fi = { class: "cards-wrapper" }, pi = ["innerHTML"], mi = { class: "card-bod
|
|
|
3285
3330
|
return (n, r) => (b(), s("div", {
|
|
3286
3331
|
class: "login-wrapper",
|
|
3287
3332
|
style: g({ "--login-bg": e.backgroundImage ? `url('${e.backgroundImage}')` : "var(--bg-gradient)" })
|
|
3288
|
-
}, [f(
|
|
3333
|
+
}, [f(rn, {
|
|
3289
3334
|
size: "lg",
|
|
3290
3335
|
radius: "xl",
|
|
3291
3336
|
class: "card"
|
|
3292
3337
|
}, {
|
|
3293
|
-
default: O(() => [c("div",
|
|
3338
|
+
default: O(() => [c("div", $i, [
|
|
3294
3339
|
t.value ? (b(), s("img", {
|
|
3295
3340
|
key: 0,
|
|
3296
3341
|
class: "logo-img",
|
|
3297
3342
|
src: e.logo,
|
|
3298
3343
|
alt: e.title
|
|
3299
|
-
}, null, 8,
|
|
3300
|
-
e.title ? (b(), s("h1",
|
|
3301
|
-
e.description ? (b(), s("p",
|
|
3344
|
+
}, null, 8, ea)) : (b(), s("div", ta, T(e.logo), 1)),
|
|
3345
|
+
e.title ? (b(), s("h1", na, T(e.title), 1)) : o("", !0),
|
|
3346
|
+
e.description ? (b(), s("p", ra, T(e.description), 1)) : o("", !0)
|
|
3302
3347
|
]), w(n.$slots, "default", {}, void 0, !0)]),
|
|
3303
3348
|
_: 3
|
|
3304
3349
|
})], 4));
|
|
3305
3350
|
}
|
|
3306
|
-
}), [["__scopeId", "data-v-f0866bc5"]]),
|
|
3351
|
+
}), [["__scopeId", "data-v-f0866bc5"]]), aa = {
|
|
3307
3352
|
NButton: j,
|
|
3308
|
-
NInput:
|
|
3309
|
-
NTextarea:
|
|
3310
|
-
NCheckbox:
|
|
3311
|
-
NSelect:
|
|
3353
|
+
NInput: L,
|
|
3354
|
+
NTextarea: de,
|
|
3355
|
+
NCheckbox: ge,
|
|
3356
|
+
NSelect: U,
|
|
3312
3357
|
NFileSelect: wt,
|
|
3313
|
-
NForm:
|
|
3314
|
-
NList:
|
|
3315
|
-
NEmpty:
|
|
3316
|
-
NToast:
|
|
3317
|
-
NLoading:
|
|
3318
|
-
NCode:
|
|
3319
|
-
NSwitch:
|
|
3320
|
-
NTag:
|
|
3321
|
-
NDatePicker:
|
|
3322
|
-
NTooltip:
|
|
3323
|
-
NModal:
|
|
3324
|
-
NAlert:
|
|
3325
|
-
NTable:
|
|
3326
|
-
NLayout:
|
|
3327
|
-
NNavigation:
|
|
3328
|
-
NSidebar:
|
|
3329
|
-
NCard:
|
|
3330
|
-
NLoginLayout:
|
|
3358
|
+
NForm: Zt,
|
|
3359
|
+
NList: Dn,
|
|
3360
|
+
NEmpty: nn,
|
|
3361
|
+
NToast: Ln,
|
|
3362
|
+
NLoading: Gn,
|
|
3363
|
+
NCode: er,
|
|
3364
|
+
NSwitch: nr,
|
|
3365
|
+
NTag: rr,
|
|
3366
|
+
NDatePicker: ci,
|
|
3367
|
+
NTooltip: li,
|
|
3368
|
+
NModal: mi,
|
|
3369
|
+
NAlert: Ei,
|
|
3370
|
+
NTable: wn,
|
|
3371
|
+
NLayout: Gi,
|
|
3372
|
+
NNavigation: Qi,
|
|
3373
|
+
NSidebar: Vi,
|
|
3374
|
+
NCard: rn,
|
|
3375
|
+
NLoginLayout: ia
|
|
3331
3376
|
};
|
|
3332
|
-
function
|
|
3333
|
-
Object.entries(
|
|
3377
|
+
function oa(e) {
|
|
3378
|
+
Object.entries(aa).forEach(([t, n]) => {
|
|
3334
3379
|
e.component(t, n);
|
|
3335
3380
|
});
|
|
3336
3381
|
}
|
|
3337
3382
|
//#endregion
|
|
3338
|
-
export {
|
|
3383
|
+
export { Ei as NAlert, j as NButton, rn as NCard, ge as NCheckbox, er as NCode, ci as NDatePicker, nn as NEmpty, wt as NFileSelect, Zt as NForm, L as NInput, Gi as NLayout, Dn as NList, Gn as NLoading, ia as NLoginLayout, mi as NModal, Qi as NNavigation, U as NSelect, Vi as NSidebar, nr as NSwitch, wn as NTable, rr as NTag, de as NTextarea, Ln as NToast, li as NTooltip, oa as NickLabsUI, _i as useAlert, Ot as useBreadcrumb, Pt as useSidebarManager, An as useToast };
|