doph-js 0.2.46 → 0.2.48
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/dophJs.js +106 -106
- package/dist/dophJs.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/dophJs.js
CHANGED
|
@@ -124,7 +124,7 @@ const re = (e, t) => {
|
|
|
124
124
|
o("click", k);
|
|
125
125
|
}, i = (k) => {
|
|
126
126
|
o("contextmenu", k);
|
|
127
|
-
},
|
|
127
|
+
}, u = m(() => s.scale === "large" ? "button-lg" : s.scale === "small" ? "button-sm" : ""), c = m(() => s.disabled ? "disabled" : ""), h = (k) => !!n[k], b = m(() => h("default") ? "" : s.scale === "large" ? "d-button-lg-icon" : s.scale === "small" ? "d-button-sm-icon" : "d-button-icon"), S = m(() => {
|
|
128
128
|
const k = s.outline ? "-outline" : "";
|
|
129
129
|
return s.type === "primary" ? `button${k}-blue` : s.type === "success" ? `button${k}-green` : s.type === "error" ? `button${k}-red` : s.type === "warning" ? `button${k}-orange` : s.type === "wait" ? `button${k}-violet` : s.outline ? `button${k}` : "";
|
|
130
130
|
});
|
|
@@ -137,7 +137,7 @@ const re = (e, t) => {
|
|
|
137
137
|
ref: a,
|
|
138
138
|
onClick: l,
|
|
139
139
|
onContextmenu: i,
|
|
140
|
-
class: D(["button", [s.class,
|
|
140
|
+
class: D(["button", [s.class, u.value, S.value, c.value].join(" ")])
|
|
141
141
|
}, [
|
|
142
142
|
L(k.$slots, "default", {}, void 0, !0),
|
|
143
143
|
s.loading ? (d(), f("svg", Vt, Ft)) : $("", !0)
|
|
@@ -148,7 +148,7 @@ const re = (e, t) => {
|
|
|
148
148
|
ref: a,
|
|
149
149
|
onClick: l,
|
|
150
150
|
onContextmenu: i,
|
|
151
|
-
class: D(["button button-ext", [s.class,
|
|
151
|
+
class: D(["button button-ext", [s.class, u.value, b.value, S.value, c.value].join(" ")]),
|
|
152
152
|
style: H(s.style)
|
|
153
153
|
}, [
|
|
154
154
|
s.icon ? (d(), x(X(de), {
|
|
@@ -213,12 +213,12 @@ const Ut = {
|
|
|
213
213
|
};
|
|
214
214
|
return t({
|
|
215
215
|
focus: l
|
|
216
|
-
}), (i,
|
|
216
|
+
}), (i, u) => !s.post && !s.pre ? (d(), f("div", Ut, [
|
|
217
217
|
s.label ? (d(), f("div", qt, A(s.label), 1)) : $("", !0),
|
|
218
218
|
te(_("input", {
|
|
219
219
|
ref_key: "inputRef",
|
|
220
220
|
ref: n,
|
|
221
|
-
"onUpdate:modelValue":
|
|
221
|
+
"onUpdate:modelValue": u[0] || (u[0] = (c) => r.value = c),
|
|
222
222
|
type: s.password ? "password" : "text",
|
|
223
223
|
class: D(a.value),
|
|
224
224
|
placeholder: s.placeholder,
|
|
@@ -234,7 +234,7 @@ const Ut = {
|
|
|
234
234
|
ref_key: "inputRef",
|
|
235
235
|
ref: n,
|
|
236
236
|
class: D(["d-input-post-field", a.value]),
|
|
237
|
-
"onUpdate:modelValue":
|
|
237
|
+
"onUpdate:modelValue": u[1] || (u[1] = (c) => r.value = c),
|
|
238
238
|
type: s.password ? "password" : "text",
|
|
239
239
|
placeholder: s.placeholder,
|
|
240
240
|
style: { width: "100%" }
|
|
@@ -287,7 +287,7 @@ const Ut = {
|
|
|
287
287
|
ref_key: "inputRef",
|
|
288
288
|
ref: n,
|
|
289
289
|
class: D(["d-input-pre-field", a.value]),
|
|
290
|
-
"onUpdate:modelValue":
|
|
290
|
+
"onUpdate:modelValue": u[2] || (u[2] = (c) => r.value = c),
|
|
291
291
|
type: s.password ? "password" : "text",
|
|
292
292
|
placeholder: s.placeholder,
|
|
293
293
|
style: { width: "100%" }
|
|
@@ -357,28 +357,28 @@ const Ut = {
|
|
|
357
357
|
borderBottomWidth: i == null ? void 0 : i.style.borderBottomWidth,
|
|
358
358
|
marginTop: i == null ? void 0 : i.style.marginTop,
|
|
359
359
|
marginBottom: i == null ? void 0 : i.style.marginBottom
|
|
360
|
-
}), s = (i,
|
|
361
|
-
const { width:
|
|
362
|
-
i.style.width =
|
|
360
|
+
}), s = (i, u) => {
|
|
361
|
+
const { width: c } = getComputedStyle(i);
|
|
362
|
+
i.style.width = c, i.style.position = "absolute", i.style.visibility = "hidden", i.style.height = "";
|
|
363
363
|
let { height: h } = getComputedStyle(i);
|
|
364
|
-
return i.style.width =
|
|
365
|
-
}, n = (i,
|
|
364
|
+
return i.style.width = u.width, i.style.position = u.position, i.style.visibility = u.visibility, i.style.height = ne, i.style.overflow = "hidden", u.height && u.height !== ne ? u.height : h;
|
|
365
|
+
}, n = (i, u, c, h, b) => {
|
|
366
366
|
const S = i.animate(h, b);
|
|
367
|
-
i.style.height =
|
|
368
|
-
i.style.overflow =
|
|
367
|
+
i.style.height = u.height, S.onfinish = () => {
|
|
368
|
+
i.style.overflow = u.overflow, c();
|
|
369
369
|
};
|
|
370
|
-
}, a = (i,
|
|
371
|
-
const
|
|
370
|
+
}, a = (i, u) => {
|
|
371
|
+
const c = {
|
|
372
372
|
height: i,
|
|
373
373
|
opacity: t.opacityOpened,
|
|
374
|
-
paddingTop:
|
|
375
|
-
paddingBottom:
|
|
376
|
-
borderTopWidth:
|
|
377
|
-
borderBottomWidth:
|
|
378
|
-
marginTop:
|
|
379
|
-
marginBottom:
|
|
374
|
+
paddingTop: u.paddingTop,
|
|
375
|
+
paddingBottom: u.paddingBottom,
|
|
376
|
+
borderTopWidth: u.borderTopWidth,
|
|
377
|
+
borderBottomWidth: u.borderBottomWidth,
|
|
378
|
+
marginTop: u.marginTop,
|
|
379
|
+
marginBottom: u.marginBottom
|
|
380
380
|
};
|
|
381
|
-
return Object.keys(
|
|
381
|
+
return Object.keys(c).forEach((h) => (c[h] == null || c[h] === "") && delete c[h]), [
|
|
382
382
|
{
|
|
383
383
|
height: ne,
|
|
384
384
|
opacity: t.opacityClosed,
|
|
@@ -389,18 +389,18 @@ const Ut = {
|
|
|
389
389
|
marginTop: ne,
|
|
390
390
|
marginBottom: ne
|
|
391
391
|
},
|
|
392
|
-
|
|
392
|
+
c
|
|
393
393
|
];
|
|
394
|
-
}, r = (i,
|
|
395
|
-
const
|
|
396
|
-
n(
|
|
397
|
-
}, l = (i,
|
|
398
|
-
const
|
|
399
|
-
|
|
394
|
+
}, r = (i, u) => {
|
|
395
|
+
const c = i, h = o(c), b = s(c, h), S = a(b, h), N = { duration: t.duration, easing: t.easingEnter };
|
|
396
|
+
n(c, h, u, S, N);
|
|
397
|
+
}, l = (i, u) => {
|
|
398
|
+
const c = i, h = o(c), { height: b } = getComputedStyle(c);
|
|
399
|
+
c.style.height = b, c.style.overflow = "hidden";
|
|
400
400
|
const S = a(b, h).reverse(), N = { duration: t.duration, easing: t.easingLeave };
|
|
401
|
-
n(
|
|
401
|
+
n(c, h, u, S, N);
|
|
402
402
|
};
|
|
403
|
-
return (i,
|
|
403
|
+
return (i, u) => (d(), x(Ne, {
|
|
404
404
|
css: !1,
|
|
405
405
|
onEnter: r,
|
|
406
406
|
onLeave: l
|
|
@@ -446,22 +446,22 @@ const Ut = {
|
|
|
446
446
|
},
|
|
447
447
|
setup(e) {
|
|
448
448
|
const t = e, o = Le(), s = w(!1), n = m(() => s && t.transferData), a = m(() => ({ position: "fixed", top: "-1000px" })), r = (l, i) => {
|
|
449
|
-
const
|
|
450
|
-
if ([j.dragenter, j.dragover].includes(l) && t.dropEffect && (
|
|
451
|
-
if (t.effectAllowed && (
|
|
452
|
-
let
|
|
453
|
-
t.image ? (
|
|
449
|
+
const u = i.dataTransfer;
|
|
450
|
+
if ([j.dragenter, j.dragover].includes(l) && t.dropEffect && (u.dropEffect = t.dropEffect), l === j.dragstart) {
|
|
451
|
+
if (t.effectAllowed && (u.effectAllowed = t.effectAllowed), t.image || o.image) {
|
|
452
|
+
let c;
|
|
453
|
+
t.image ? (c = new Image(), c.src = t.image) : o.image && (c = o.image[0].elm), u.setDragImage && u.setDragImage(c, t.imageXOffset, t.imageYOffset);
|
|
454
454
|
}
|
|
455
455
|
t.transferData !== void 0 && (De.data = t.transferData, i.dataTransfer.setData("text", "")), s.value = !0;
|
|
456
456
|
}
|
|
457
457
|
};
|
|
458
458
|
return (l, i) => (d(), x(X(e.tag), {
|
|
459
459
|
draggable: t.draggable,
|
|
460
|
-
onDrag: i[0] || (i[0] = (
|
|
461
|
-
onDragstart: i[1] || (i[1] = Z((
|
|
462
|
-
onDragenter: i[2] || (i[2] = (
|
|
463
|
-
onDragleave: i[3] || (i[3] = (
|
|
464
|
-
onDragend: i[4] || (i[4] = (
|
|
460
|
+
onDrag: i[0] || (i[0] = (u) => r(E(j).drag, u)),
|
|
461
|
+
onDragstart: i[1] || (i[1] = Z((u) => r(E(j).dragstart, u), ["stop"])),
|
|
462
|
+
onDragenter: i[2] || (i[2] = (u) => r(E(j).dragenter, u)),
|
|
463
|
+
onDragleave: i[3] || (i[3] = (u) => r(E(j).dragleave, u)),
|
|
464
|
+
onDragend: i[4] || (i[4] = (u) => r(E(j).dragend, u))
|
|
465
465
|
}, {
|
|
466
466
|
default: I(() => [
|
|
467
467
|
L(l.$slots, "default", { transferData: n.value }),
|
|
@@ -501,9 +501,9 @@ const fo = (e) => (St("data-v-e40122f5"), e = e(), Tt(), e), mo = {
|
|
|
501
501
|
},
|
|
502
502
|
emits: ["nodedrop", "nodedragover", "nodedragleave", "nodeclick", "nodecontext"],
|
|
503
503
|
setup(e, { emit: t }) {
|
|
504
|
-
const o = e, s = w(null), n = w(!1), a = w(!1), r = w(!1), l = m(() => o.model.children && o.model.children.length), i = m(() => (v.actions.isTreeExpanded(o.treeId) && (o.model.expanded = o.model.expanded === void 0 ? !0 : o.model.expanded), o.model.expanded)),
|
|
504
|
+
const o = e, s = w(null), n = w(!1), a = w(!1), r = w(!1), l = m(() => o.model.children && o.model.children.length), i = m(() => (v.actions.isTreeExpanded(o.treeId) && (o.model.expanded = o.model.expanded === void 0 ? !0 : o.model.expanded), o.model.expanded)), u = (M) => {
|
|
505
505
|
t("nodeclick", { event: M, model: o.model });
|
|
506
|
-
},
|
|
506
|
+
}, c = (M) => {
|
|
507
507
|
t("nodeclick", M);
|
|
508
508
|
}, h = (M) => {
|
|
509
509
|
t("nodedrop", M);
|
|
@@ -611,7 +611,7 @@ const fo = (e) => (St("data-v-e40122f5"), e = e(), Tt(), e), mo = {
|
|
|
611
611
|
}, null, 8, ["component", "color", "class"])) : $("", !0)
|
|
612
612
|
])
|
|
613
613
|
], 34)), [
|
|
614
|
-
[W,
|
|
614
|
+
[W, u]
|
|
615
615
|
]),
|
|
616
616
|
oe(lo, null, {
|
|
617
617
|
default: I(() => [
|
|
@@ -623,7 +623,7 @@ const fo = (e) => (St("data-v-e40122f5"), e = e(), Tt(), e), mo = {
|
|
|
623
623
|
treeId: o.treeId,
|
|
624
624
|
items: o.items,
|
|
625
625
|
search: o.search,
|
|
626
|
-
onNodeclick:
|
|
626
|
+
onNodeclick: c,
|
|
627
627
|
onNodedrop: h,
|
|
628
628
|
onNodecontext: b
|
|
629
629
|
}, null, 8, ["model", "treeId", "items", "search"]))), 128))
|
|
@@ -795,12 +795,12 @@ const U = Lo(), v = {
|
|
|
795
795
|
emits: Object.keys(j),
|
|
796
796
|
setup(e, { expose: t, emit: o }) {
|
|
797
797
|
let s = Oe({});
|
|
798
|
-
const n = w("false"), a = w(null), r = /* @__PURE__ */ new Set(), l = m(() => n.value && s), i = (
|
|
799
|
-
s = De.data, o(
|
|
798
|
+
const n = w("false"), a = w(null), r = /* @__PURE__ */ new Set(), l = m(() => n.value && s), i = (c, h) => {
|
|
799
|
+
s = De.data, o(c, h, s), c === j.dragenter && (r.size || h.target === a.value) && r.add(h.target), c === j.dragleave && r.delete(h.target), c === j.drop && r.clear(), n.value = !!r.size;
|
|
800
800
|
};
|
|
801
801
|
return t({
|
|
802
802
|
elementSize: () => ht(a)
|
|
803
|
-
}), (
|
|
803
|
+
}), (c, h) => (d(), x(X(e.tag), {
|
|
804
804
|
ref_key: "el",
|
|
805
805
|
ref: a,
|
|
806
806
|
onDragenter: h[0] || (h[0] = (b) => i(E(j).dragenter, b)),
|
|
@@ -809,7 +809,7 @@ const U = Lo(), v = {
|
|
|
809
809
|
onDrop: h[3] || (h[3] = Z((b) => i(E(j).drop, b), ["prevent"]))
|
|
810
810
|
}, {
|
|
811
811
|
default: I(() => [
|
|
812
|
-
L(
|
|
812
|
+
L(c.$slots, "default", { transferData: l.value })
|
|
813
813
|
]),
|
|
814
814
|
_: 3
|
|
815
815
|
}, 544));
|
|
@@ -885,20 +885,20 @@ const U = Lo(), v = {
|
|
|
885
885
|
const s = e, n = w(null), a = w(0), r = w(0), l = m(() => ({
|
|
886
886
|
left: a.value + "px",
|
|
887
887
|
top: r.value + "px"
|
|
888
|
-
})), i = (
|
|
888
|
+
})), i = (c) => {
|
|
889
889
|
n.value.show(), ut(() => {
|
|
890
890
|
const h = n.value.elementSize(), b = window.innerWidth, S = window.innerHeight;
|
|
891
|
-
a.value = b -
|
|
891
|
+
a.value = b - c.pageX < h.width ? c.pageX - h.width : c.pageX, r.value = S - c.pageY < h.height ? c.pageY - h.height : c.pageY, n.value.itemsCount() === 0 && n.value.hide();
|
|
892
892
|
});
|
|
893
|
-
},
|
|
894
|
-
o("select",
|
|
893
|
+
}, u = (c) => {
|
|
894
|
+
o("select", c);
|
|
895
895
|
};
|
|
896
896
|
return t({
|
|
897
897
|
show: i
|
|
898
|
-
}), (
|
|
898
|
+
}), (c, h) => (d(), x(gt, {
|
|
899
899
|
ref_key: "dMenuRef",
|
|
900
900
|
ref: n,
|
|
901
|
-
onSelect:
|
|
901
|
+
onSelect: u,
|
|
902
902
|
items: s.items,
|
|
903
903
|
style: H(l.value),
|
|
904
904
|
class: "context-menu",
|
|
@@ -954,7 +954,7 @@ const U = Lo(), v = {
|
|
|
954
954
|
}), U.on(`move-${l}`, (g) => {
|
|
955
955
|
o("move", g);
|
|
956
956
|
});
|
|
957
|
-
const
|
|
957
|
+
const u = m(() => s.search ? v.actions.deepSearchByTitle(s.items, s.search) : s.items), c = (g = null) => {
|
|
958
958
|
v.mutations.setItemSelect(l, g.model), v.actions.toggleItem(l, g.model), o("select", g);
|
|
959
959
|
}, h = (g = null) => {
|
|
960
960
|
o("over", g);
|
|
@@ -970,7 +970,7 @@ const U = Lo(), v = {
|
|
|
970
970
|
R(g) && v.mutations.setItemSelect(l, R(g));
|
|
971
971
|
}, B = (g) => {
|
|
972
972
|
s.contextClick({ e: g.e, model: g.model, target: r.value });
|
|
973
|
-
}, M = (g) => s.contextBeforeClick({ model: g, target: r.value }), y = m(() => s.context), O = (g) => (y.value && (r.value = g.model, a.value.show(g.e)), !1), W = () => P(
|
|
973
|
+
}, M = (g) => s.contextBeforeClick({ model: g, target: r.value }), y = m(() => s.context), O = (g) => (y.value && (r.value = g.model, a.value.show(g.e)), !1), W = () => P(u.value), P = (g) => {
|
|
974
974
|
let V = 0;
|
|
975
975
|
for (let p = 0; p < g.length; p++)
|
|
976
976
|
V += v.actions.beforeItem(l, g[p]) ? 1 : 0, g[p].children && g[p].children.length > 0 && (V += P(g[p].children));
|
|
@@ -992,13 +992,13 @@ const U = Lo(), v = {
|
|
|
992
992
|
onDrop: Z(i, ["stop"])
|
|
993
993
|
}, {
|
|
994
994
|
default: I(() => [
|
|
995
|
-
(d(!0), f(ie, null, ge(
|
|
995
|
+
(d(!0), f(ie, null, ge(u.value, (p) => (d(), x(Do, {
|
|
996
996
|
key: p.id,
|
|
997
997
|
model: p,
|
|
998
998
|
treeId: E(l),
|
|
999
999
|
items: s.items,
|
|
1000
1000
|
search: s.search,
|
|
1001
|
-
onNodeclick:
|
|
1001
|
+
onNodeclick: c,
|
|
1002
1002
|
onNodedragover: h,
|
|
1003
1003
|
onNodedrop: b,
|
|
1004
1004
|
onNodecontext: O
|
|
@@ -1071,8 +1071,8 @@ const Eo = {
|
|
|
1071
1071
|
},
|
|
1072
1072
|
setup(e) {
|
|
1073
1073
|
const t = e, o = m(() => {
|
|
1074
|
-
const { fixed: s, zIndex: n, minWidth: a, height: r, paddingLeft: l, transitionDuration: i, transitionTimingFunction:
|
|
1075
|
-
return `position:${
|
|
1074
|
+
const { fixed: s, zIndex: n, minWidth: a, height: r, paddingLeft: l, transitionDuration: i, transitionTimingFunction: u } = t, c = s ? "fixed" : "static", h = t.useMinWidthLayout ? `min-width:${a}px;` : "";
|
|
1075
|
+
return `position:${c};z-index:${n};${h}height:${r}px;padding-left:${l}px;transition-duration:${i}ms;transition-timing-function:${u};`;
|
|
1076
1076
|
});
|
|
1077
1077
|
return (s, n) => (d(), f("header", {
|
|
1078
1078
|
class: "d-layout-header",
|
|
@@ -1120,8 +1120,8 @@ const Eo = {
|
|
|
1120
1120
|
},
|
|
1121
1121
|
setup(e) {
|
|
1122
1122
|
const t = e, o = m(() => {
|
|
1123
|
-
const { fixed: s, top: n, zIndex: a, minWidth: r, height: l, paddingLeft: i, transitionDuration:
|
|
1124
|
-
return `position:${h};top:${n}px;z-index:${a};${b}height:${l}px;padding-left:${i}px;transition-duration:${
|
|
1123
|
+
const { fixed: s, top: n, zIndex: a, minWidth: r, height: l, paddingLeft: i, transitionDuration: u, transitionTimingFunction: c } = t, h = s ? "fixed" : "static", b = t.useMinWidthLayout ? `min-width: ${r}px;` : "";
|
|
1124
|
+
return `position:${h};top:${n}px;z-index:${a};${b}height:${l}px;padding-left:${i}px;transition-duration:${u}ms;transition-timing-function:${c};`;
|
|
1125
1125
|
});
|
|
1126
1126
|
return (s, n) => (d(), f("div", {
|
|
1127
1127
|
class: "d-layout-tab",
|
|
@@ -1165,8 +1165,8 @@ const Eo = {
|
|
|
1165
1165
|
},
|
|
1166
1166
|
setup(e) {
|
|
1167
1167
|
const t = e, o = m(() => {
|
|
1168
|
-
const { fixed: s, zIndex: n, minWidth: a, height: r, paddingLeft: l, transitionDuration: i, transitionTimingFunction:
|
|
1169
|
-
return `position:${
|
|
1168
|
+
const { fixed: s, zIndex: n, minWidth: a, height: r, paddingLeft: l, transitionDuration: i, transitionTimingFunction: u } = t, c = s ? "fixed" : "static", h = t.useMinWidthLayout ? `min-width:${a}px;` : "";
|
|
1169
|
+
return `position:${c};z-index:${n};${h}height:${r}px;padding-left:${l}px;transition-duration:${i}ms;transition-timing-function:${u};`;
|
|
1170
1170
|
});
|
|
1171
1171
|
return (s, n) => (d(), f("footer", {
|
|
1172
1172
|
class: "d-layout-footer",
|
|
@@ -1256,12 +1256,12 @@ const Eo = {
|
|
|
1256
1256
|
function Ao(e) {
|
|
1257
1257
|
const t = w(0), o = m(() => `transform: translateX(${-t.value}px);`);
|
|
1258
1258
|
let s = !1;
|
|
1259
|
-
function n(
|
|
1260
|
-
t.value =
|
|
1259
|
+
function n(c) {
|
|
1260
|
+
t.value = c;
|
|
1261
1261
|
}
|
|
1262
1262
|
function a() {
|
|
1263
|
-
var
|
|
1264
|
-
const h = ((
|
|
1263
|
+
var c;
|
|
1264
|
+
const h = ((c = document.scrollingElement) === null || c === void 0 ? void 0 : c.scrollLeft) || 0;
|
|
1265
1265
|
n(h);
|
|
1266
1266
|
}
|
|
1267
1267
|
function r() {
|
|
@@ -1273,11 +1273,11 @@ function Ao(e) {
|
|
|
1273
1273
|
function i() {
|
|
1274
1274
|
s && document.removeEventListener("scroll", a);
|
|
1275
1275
|
}
|
|
1276
|
-
function
|
|
1276
|
+
function u() {
|
|
1277
1277
|
r(), l(), s = !0;
|
|
1278
1278
|
}
|
|
1279
|
-
return ft(e, (
|
|
1280
|
-
|
|
1279
|
+
return ft(e, (c) => {
|
|
1280
|
+
c ? u() : i();
|
|
1281
1281
|
}, { immediate: !0 }), Dt(() => {
|
|
1282
1282
|
i();
|
|
1283
1283
|
}), o;
|
|
@@ -1379,7 +1379,7 @@ const Ho = 1001, Vo = 999, zo = 998, Ln = {
|
|
|
1379
1379
|
transitionDuration: y,
|
|
1380
1380
|
transitionTimingFunction: O
|
|
1381
1381
|
};
|
|
1382
|
-
}),
|
|
1382
|
+
}), u = m(() => o.mode === "vertical"), c = m(() => o.isMobile || u.value ? 1003 : 1e3), h = m({
|
|
1383
1383
|
get() {
|
|
1384
1384
|
return o.sidebarCollapse;
|
|
1385
1385
|
},
|
|
@@ -1396,8 +1396,8 @@ const Ho = 1001, Vo = 999, zo = 998, Ln = {
|
|
|
1396
1396
|
}), k = m(() => {
|
|
1397
1397
|
const { sidebarWidth: y, sidebarCollapsedWidth: O } = o, W = o.isMobile ? 0 : O, P = h.value ? W : y;
|
|
1398
1398
|
return o.sidebarVisible ? P : 0;
|
|
1399
|
-
}), F = m(() => o.isMobile ? 0 : k.value), R = m(() =>
|
|
1400
|
-
() => !o.isMobile && !
|
|
1399
|
+
}), F = m(() => o.isMobile ? 0 : k.value), R = m(() => u.value ? F.value : 0), C = m(
|
|
1400
|
+
() => !o.isMobile && !u.value && o.headerVisible ? o.headerHeight : 0
|
|
1401
1401
|
), B = m(() => {
|
|
1402
1402
|
let y = 0;
|
|
1403
1403
|
return o.fixedHeaderAndTab && (o.headerVisible && (y += o.headerHeight), o.tabVisible && (y += o.tabHeight)), y;
|
|
@@ -1434,7 +1434,7 @@ const Ho = 1001, Vo = 999, zo = 998, Ln = {
|
|
|
1434
1434
|
_: 3
|
|
1435
1435
|
}, 16, ["fixed", "min-width", "top", "height", "padding-left", "style"])) : $("", !0),
|
|
1436
1436
|
e.sidebarVisible ? (d(), x(Ro, ue({ key: 2 }, i.value, {
|
|
1437
|
-
"z-index":
|
|
1437
|
+
"z-index": c.value,
|
|
1438
1438
|
width: k.value,
|
|
1439
1439
|
"padding-top": C.value
|
|
1440
1440
|
}), {
|
|
@@ -1585,8 +1585,8 @@ const Fo = {
|
|
|
1585
1585
|
return t({
|
|
1586
1586
|
show: r,
|
|
1587
1587
|
hide: l
|
|
1588
|
-
}), (i,
|
|
1589
|
-
const
|
|
1588
|
+
}), (i, u) => {
|
|
1589
|
+
const c = Re("keydown");
|
|
1590
1590
|
return d(), x(ct, { to: "body" }, [
|
|
1591
1591
|
oe(Ne, { name: "fade" }, {
|
|
1592
1592
|
default: I(() => [
|
|
@@ -1615,7 +1615,7 @@ const Fo = {
|
|
|
1615
1615
|
])
|
|
1616
1616
|
], 4)
|
|
1617
1617
|
])), [
|
|
1618
|
-
[
|
|
1618
|
+
[c, l, "Escape"]
|
|
1619
1619
|
]) : $("", !0)
|
|
1620
1620
|
]),
|
|
1621
1621
|
_: 3
|
|
@@ -1769,7 +1769,7 @@ const Ko = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1769
1769
|
},
|
|
1770
1770
|
emits: ["select", "click"],
|
|
1771
1771
|
setup(e, { expose: t, emit: o }) {
|
|
1772
|
-
const s = e, n = Le(), a = w(null), r = w(null), l = w(0), i = w(0),
|
|
1772
|
+
const s = e, n = Le(), a = w(null), r = w(null), l = w(0), i = w(0), u = (S) => {
|
|
1773
1773
|
if (o("click", S), a.value.isShowed()) {
|
|
1774
1774
|
a.value.hide();
|
|
1775
1775
|
return;
|
|
@@ -1778,11 +1778,11 @@ const Ko = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1778
1778
|
const N = a.value.elementSize(), k = r.value.elementSize(), F = window.innerWidth, R = window.innerHeight;
|
|
1779
1779
|
l.value = F - (k.x + k.width) < N.width ? k.left - N.width + k.width : k.left, i.value = R - (k.y + k.height) < N.height ? k.top - N.height - 5 : k.height + k.top + 5;
|
|
1780
1780
|
});
|
|
1781
|
-
},
|
|
1781
|
+
}, c = (S) => {
|
|
1782
1782
|
o("select", S);
|
|
1783
1783
|
}, h = m(() => ({ left: l.value + "px", top: i.value + "px", position: s.bodyAsParent ? "absolute" : "fixed", ...s.menuStyle }));
|
|
1784
1784
|
t({
|
|
1785
|
-
show:
|
|
1785
|
+
show: u
|
|
1786
1786
|
});
|
|
1787
1787
|
const b = (S) => !!n[S];
|
|
1788
1788
|
return (S, N) => (d(), f("div", ts, [
|
|
@@ -1792,7 +1792,7 @@ const Ko = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1792
1792
|
ref: r,
|
|
1793
1793
|
class: D(s.class),
|
|
1794
1794
|
icon: s.icon,
|
|
1795
|
-
onClick: Z(
|
|
1795
|
+
onClick: Z(u, ["stop", "prevent"]),
|
|
1796
1796
|
type: s.type
|
|
1797
1797
|
}, {
|
|
1798
1798
|
default: I(() => [
|
|
@@ -1805,7 +1805,7 @@ const Ko = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1805
1805
|
ref: r,
|
|
1806
1806
|
class: D(s.class),
|
|
1807
1807
|
icon: s.icon,
|
|
1808
|
-
onClick: Z(
|
|
1808
|
+
onClick: Z(u, ["stop", "prevent"]),
|
|
1809
1809
|
type: s.type
|
|
1810
1810
|
}, null, 8, ["class", "icon", "onClick", "type"])),
|
|
1811
1811
|
oe(gt, {
|
|
@@ -1815,7 +1815,7 @@ const Ko = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1815
1815
|
class: "dropdown-menu",
|
|
1816
1816
|
style: H(h.value),
|
|
1817
1817
|
"no-select": !0,
|
|
1818
|
-
onSelect:
|
|
1818
|
+
onSelect: c,
|
|
1819
1819
|
"render-item-title": s.renderItemTitle,
|
|
1820
1820
|
"before-item": s.beforeItem,
|
|
1821
1821
|
"body-as-parent": s.bodyAsParent
|
|
@@ -2045,8 +2045,8 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", nt = [
|
|
|
2045
2045
|
const o = e, s = {
|
|
2046
2046
|
IDLE: 0,
|
|
2047
2047
|
DESTROYED: 2
|
|
2048
|
-
}, n = w([]), a = w(null), r = w(cs.get("velocity")), l = m(() => o.animationType === "velocity"), i = m(() => l.value ? vs : ys),
|
|
2049
|
-
const { x: p, y: z } = gs(o.position), T =
|
|
2048
|
+
}, n = w([]), a = w(null), r = w(cs.get("velocity")), l = m(() => o.animationType === "velocity"), i = m(() => l.value ? vs : ys), u = m(() => n.value.filter((p) => p.state !== s.DESTROYED)), c = m(() => fs(o.width)), h = m(() => {
|
|
2049
|
+
const { x: p, y: z } = gs(o.position), T = c.value.value, q = c.value.type, se = {
|
|
2050
2050
|
width: T + q
|
|
2051
2051
|
};
|
|
2052
2052
|
return z && (se[z] = "0px"), p && (p === "center" ? se.left = `calc(50% - ${+T / 2}${q})` : se[p] = "0px"), se;
|
|
@@ -2078,8 +2078,8 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", nt = [
|
|
|
2078
2078
|
z >= 0 && (a.value = new us(() => M(J), J.length, J));
|
|
2079
2079
|
const xe = o.reverse ? !b.value : b.value;
|
|
2080
2080
|
let le = -1;
|
|
2081
|
-
const $e =
|
|
2082
|
-
(!q || !$e) && (xe ? (n.value.push(J), t("start", J),
|
|
2081
|
+
const $e = u.value.some((me) => me.title === p.title && me.text === p.text);
|
|
2082
|
+
(!q || !$e) && (xe ? (n.value.push(J), t("start", J), u.value.length > o.max && (le = 0)) : (n.value.unshift(J), t("start", J), u.value.length > o.max && (le = u.value.length - 1)), le !== -1 && M(u.value[le]));
|
|
2083
2083
|
}, R = (p) => {
|
|
2084
2084
|
y(p);
|
|
2085
2085
|
}, C = (p) => [
|
|
@@ -2092,7 +2092,7 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", nt = [
|
|
|
2092
2092
|
const z = n.value.find((T) => T.id === p);
|
|
2093
2093
|
z && M(z);
|
|
2094
2094
|
}, O = () => {
|
|
2095
|
-
|
|
2095
|
+
u.value.forEach(M);
|
|
2096
2096
|
}, W = (p, z) => {
|
|
2097
2097
|
var q;
|
|
2098
2098
|
const T = (q = o.animation) == null ? void 0 : q[p];
|
|
@@ -2130,7 +2130,7 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", nt = [
|
|
|
2130
2130
|
onAfterLeave: V
|
|
2131
2131
|
}, {
|
|
2132
2132
|
default: I(() => [
|
|
2133
|
-
(d(!0), f(ie, null, ge(
|
|
2133
|
+
(d(!0), f(ie, null, ge(u.value, (T) => (d(), f("div", {
|
|
2134
2134
|
key: T.id,
|
|
2135
2135
|
class: "d-notification-wrapper",
|
|
2136
2136
|
style: H(B(T)),
|
|
@@ -2337,7 +2337,7 @@ const zs = { class: "d-tabs" }, Fs = {
|
|
|
2337
2337
|
index: i,
|
|
2338
2338
|
tab: l,
|
|
2339
2339
|
class: D(["d-tab-title", i === s.value ? "active" : ""]),
|
|
2340
|
-
onClick: (
|
|
2340
|
+
onClick: (u) => n(i)
|
|
2341
2341
|
}, null, 8, ["index", "tab", "class", "onClick"]))), 256))
|
|
2342
2342
|
]),
|
|
2343
2343
|
(d(), x(Rt, null, [
|
|
@@ -2365,7 +2365,7 @@ const Ws = { class: "d-grid" }, Ps = {
|
|
|
2365
2365
|
},
|
|
2366
2366
|
setup(e) {
|
|
2367
2367
|
const t = e;
|
|
2368
|
-
Ae((
|
|
2368
|
+
Ae((c) => ({
|
|
2369
2369
|
"09eba472": i[0],
|
|
2370
2370
|
"09eba434": i[1],
|
|
2371
2371
|
"09eba3f6": i[2],
|
|
@@ -2375,11 +2375,11 @@ const Ws = { class: "d-grid" }, Ps = {
|
|
|
2375
2375
|
"898eb2ac": t.gap
|
|
2376
2376
|
}));
|
|
2377
2377
|
const { colXs: o, colSm: s, colMd: n, colLg: a, colXl: r, colXxl: l } = Ot(t), i = [o.value, s.value, n.value, a.value, r.value, l.value];
|
|
2378
|
-
let
|
|
2379
|
-
for (let
|
|
2380
|
-
|
|
2381
|
-
return (
|
|
2382
|
-
L(
|
|
2378
|
+
let u = null;
|
|
2379
|
+
for (let c = 0; c < i.length; c++)
|
|
2380
|
+
u || (u = i[0]), c > 0 && (i[c] ? u = i[c] : i[c] = u);
|
|
2381
|
+
return (c, h) => (d(), f("div", Ws, [
|
|
2382
|
+
L(c.$slots, "default", {}, void 0, !0)
|
|
2383
2383
|
]));
|
|
2384
2384
|
}
|
|
2385
2385
|
}, zn = /* @__PURE__ */ re(Ps, [["__scopeId", "data-v-b45e8130"]]), js = ["src", "alt", "title"], Fn = {
|
|
@@ -2447,12 +2447,12 @@ const Xs = { class: "d-textarea" }, Ys = {
|
|
|
2447
2447
|
};
|
|
2448
2448
|
return t({
|
|
2449
2449
|
focus: l
|
|
2450
|
-
}), (i,
|
|
2450
|
+
}), (i, u) => (d(), f("div", Xs, [
|
|
2451
2451
|
s.label ? (d(), f("div", Ys, A(s.label), 1)) : $("", !0),
|
|
2452
2452
|
te(_("textarea", {
|
|
2453
2453
|
ref_key: "inputRef",
|
|
2454
2454
|
ref: n,
|
|
2455
|
-
"onUpdate:modelValue":
|
|
2455
|
+
"onUpdate:modelValue": u[0] || (u[0] = (c) => r.value = c),
|
|
2456
2456
|
rows: s.rows,
|
|
2457
2457
|
cols: s.cols,
|
|
2458
2458
|
placeholder: s.placeholder,
|
|
@@ -2551,7 +2551,7 @@ const rn = new an(), Y = {
|
|
|
2551
2551
|
};
|
|
2552
2552
|
class ln {
|
|
2553
2553
|
validate(t, o) {
|
|
2554
|
-
var n, a, r, l, i,
|
|
2554
|
+
var n, a, r, l, i, u, c, h, b, S, N, k, F, R;
|
|
2555
2555
|
let s = "";
|
|
2556
2556
|
if (o) {
|
|
2557
2557
|
let C = !1;
|
|
@@ -2565,7 +2565,7 @@ class ln {
|
|
|
2565
2565
|
s = Y.RulesRequired.validate(t) ? "" : Y.RulesRequired.message((r = o[B]) != null && r.message ? (l = o[B]) == null ? void 0 : l.message : "required"), C = s !== "";
|
|
2566
2566
|
break;
|
|
2567
2567
|
case "min":
|
|
2568
|
-
s = Y.RulesMin.validate(t, (i = o[B]) == null ? void 0 : i.value) ? "" : Y.RulesMin.message((
|
|
2568
|
+
s = Y.RulesMin.validate(t, (i = o[B]) == null ? void 0 : i.value) ? "" : Y.RulesMin.message((u = o[B]) != null && u.message ? (c = o[B]) == null ? void 0 : c.message : "very_small"), C = s !== "";
|
|
2569
2569
|
break;
|
|
2570
2570
|
case "max":
|
|
2571
2571
|
s = Y.RulesMax.validate(t, (h = o[B]) == null ? void 0 : h.value) ? "" : Y.RulesMax.message((b = o[B]) != null && b.message ? (S = o[B]) == null ? void 0 : S.message : "vary_large"), C = s !== "";
|
|
@@ -2647,7 +2647,7 @@ const dn = new ln(), cn = { style: { display: "flex", "flex-direction": "column"
|
|
|
2647
2647
|
set: (R) => {
|
|
2648
2648
|
o("update:modelValue", R);
|
|
2649
2649
|
}
|
|
2650
|
-
}),
|
|
2650
|
+
}), u = m(() => s.type === "password" ? "password" : "text"), c = m(() => s.scale), h = (R) => {
|
|
2651
2651
|
o("input", R), b();
|
|
2652
2652
|
}, b = () => (n.value = dn.validate(i.value, s.form.fields[s.name].rules), !!n.value);
|
|
2653
2653
|
fe(() => {
|
|
@@ -2670,7 +2670,7 @@ const dn = new ln(), cn = { style: { display: "flex", "flex-direction": "column"
|
|
|
2670
2670
|
}), (R, C) => {
|
|
2671
2671
|
var B, M, y, O, W, P, g, V, p, z, T, q, se, ve, ye, _e, be, J, xe, le, $e, Ce, me, Fe, We, Pe, je, Xe, Ye, Ue, qe, Ge, Ze, Ke, Je, Qe, et, tt, ot;
|
|
2672
2672
|
return d(), f("div", {
|
|
2673
|
-
class: D(["d-input-string",
|
|
2673
|
+
class: D(["d-input-string", c.value])
|
|
2674
2674
|
}, [
|
|
2675
2675
|
_("div", cn, [
|
|
2676
2676
|
s.label ? (d(), f("div", un, [
|
|
@@ -2703,7 +2703,7 @@ const dn = new ln(), cn = { style: { display: "flex", "flex-direction": "column"
|
|
|
2703
2703
|
ref: l,
|
|
2704
2704
|
"onUpdate:modelValue": C[0] || (C[0] = (Ie) => i.value = Ie),
|
|
2705
2705
|
style: { width: "100%" },
|
|
2706
|
-
type:
|
|
2706
|
+
type: u.value,
|
|
2707
2707
|
placeholder: s.placeholder,
|
|
2708
2708
|
onInput: h,
|
|
2709
2709
|
onFocus: C[1] || (C[1] = (Ie) => k(!0)),
|
package/dist/dophJs.umd.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(f,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(f=typeof globalThis<"u"?globalThis:f||self,e(f.DophJs={},f.Vue))})(this,function(f,e){"use strict";const jn="",Xn="",Yn="",Un="",qn="",Y={__name:"DIcon",props:{component:[Object,String],size:[Number,String],color:String,className:String},setup(t){const o=t,n=e.useSlots(),s=e.computed(()=>{const{className:c}=o;return c===void 0?"icon":["icon",c].join(" ")}),l=e.computed(()=>{const{color:c}=o;return c===void 0?null:c}),a=e.computed(()=>{const c=o.size??null;if(c!==void 0)return typeof c=="number"||/^\d+$/.test(c)?`${c}px`:c}),i=e.computed(()=>e.h("i",{class:s.value,style:{color:l.value,fontSize:a.value}},o.component?e.h(o.component):n));return(c,r)=>(e.openBlock(),e.createBlock(e.unref(i)))}},R={state:{},getters:{getIcon(t){return R.state[t]},getIcons(){return R.state}},mutations:{addIcon(t,o){R.state.name=o},addIcons(t){for(const o in t)t.hasOwnProperty(o)&&(R.state[o]=t[o])}}};function ke(t){const o=t.value.getBoundingClientRect();let n=t.value,s=0,l=0;for(;n&&!isNaN(n.offsetLeft)&&!isNaN(n.offsetTop);)s+=n.offsetLeft-n.scrollLeft,l+=n.offsetTop-n.scrollTop,n=n.offsetParent;return{top:l,left:s,x:o.x,y:o.y,width:o.width,height:o.height}}function it(){function t(l){return l*Math.random()|0}function o(){return t(16).toString(16)}function n(l){let a="";for(let i=0;i<l;++i)a+=o();return a}function s(){return(t(16)&3|8).toString(16)}return n(8)+"-"+n(4)+"-4"+n(3)+"-"+s()+n(3)+"-"+n(12)}const Gn="",W=(t,o)=>{const n=t.__vccOpts||t;for(const[s,l]of o)n[s]=l;return n},ct={key:0,class:"loading-svg rotating",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},dt=[e.createStaticVNode('<g fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-v-e5cd6ccd><path d="M8.56 3.69a9 9 0 0 0-2.92 1.95" data-v-e5cd6ccd></path><path d="M3.69 8.56A9 9 0 0 0 3 12" data-v-e5cd6ccd></path><path d="M3.69 15.44a9 9 0 0 0 1.95 2.92" data-v-e5cd6ccd></path><path d="M8.56 20.31A9 9 0 0 0 12 21" data-v-e5cd6ccd></path><path d="M15.44 20.31a9 9 0 0 0 2.92-1.95" data-v-e5cd6ccd></path><path d="M20.31 15.44A9 9 0 0 0 21 12" data-v-e5cd6ccd></path><path d="M20.31 8.56a9 9 0 0 0-1.95-2.92" data-v-e5cd6ccd></path><path d="M15.44 3.69A9 9 0 0 0 12 3" data-v-e5cd6ccd></path></g>',1)],pt={key:1},mt={key:2,class:"loading-svg rotating",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},ut=[e.createStaticVNode('<g fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-v-e5cd6ccd><path d="M8.56 3.69a9 9 0 0 0-2.92 1.95" data-v-e5cd6ccd></path><path d="M3.69 8.56A9 9 0 0 0 3 12" data-v-e5cd6ccd></path><path d="M3.69 15.44a9 9 0 0 0 1.95 2.92" data-v-e5cd6ccd></path><path d="M8.56 20.31A9 9 0 0 0 12 21" data-v-e5cd6ccd></path><path d="M15.44 20.31a9 9 0 0 0 2.92-1.95" data-v-e5cd6ccd></path><path d="M20.31 15.44A9 9 0 0 0 21 12" data-v-e5cd6ccd></path><path d="M20.31 8.56a9 9 0 0 0-1.95-2.92" data-v-e5cd6ccd></path><path d="M15.44 3.69A9 9 0 0 0 12 3" data-v-e5cd6ccd></path></g>',1)],H=W({__name:"DButton",props:{class:String,style:[String,Object],icon:String,scale:String,type:String,outline:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["click","contextmenu"],setup(t,{expose:o,emit:n}){const s=t,l=e.useSlots(),a=e.ref(null),i=e.computed(()=>s.icon?R.getters.getIcon(s.icon):null),c=k=>{n("click",k)},r=k=>{n("contextmenu",k)},d=e.computed(()=>s.scale==="large"?"button-lg":s.scale==="small"?"button-sm":""),p=e.computed(()=>s.disabled?"disabled":""),u=k=>!!l[k],_=e.computed(()=>u("default")?"":s.scale==="large"?"d-button-lg-icon":s.scale==="small"?"d-button-sm-icon":"d-button-icon"),b=e.computed(()=>{const k=s.outline?"-outline":"";return s.type==="primary"?`button${k}-blue`:s.type==="success"?`button${k}-green`:s.type==="error"?`button${k}-red`:s.type==="warning"?`button${k}-orange`:s.type==="wait"?`button${k}-violet`:s.outline?`button${k}`:""});return o({elementSize:()=>ke(a)}),(k,N)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"el",ref:a,onClick:c,onContextmenu:r,class:e.normalizeClass(["button",[s.class,d.value,b.value,p.value].join(" ")])},[e.renderSlot(k.$slots,"default",{},void 0,!0),s.loading?(e.openBlock(),e.createElementBlock("svg",ct,dt)):e.createCommentVNode("",!0)],34)),i.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"el",ref:a,onClick:c,onContextmenu:r,class:e.normalizeClass(["button button-ext",[s.class,d.value,_.value,b.value,p.value].join(" ")]),style:e.normalizeStyle(s.style)},[s.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:0,component:i.value,color:"inherit"},null,8,["component"])):e.createCommentVNode("",!0),e.unref(l).default?(e.openBlock(),e.createElementBlock("div",pt,[e.renderSlot(k.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0),s.loading?(e.openBlock(),e.createElementBlock("svg",mt,ut)):e.createCommentVNode("",!0)],38)):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-e5cd6ccd"]]),Qn="",ft={key:0,class:"d-input"},ht={key:0,class:"label"},gt=["type","placeholder"],yt={key:1,class:"d-input",style:{display:"flex","flex-direction":"column"}},_t={key:0,class:"label"},kt={style:{display:"flex","align-items":"flex-end","justify-content":"flex-start"}},bt={style:{flex:"1"}},Bt=["type","placeholder"],St={key:2,class:"d-input",style:{display:"flex","flex-direction":"column"}},xt={key:0,class:"label"},wt={style:{display:"flex","align-items":"flex-end","justify-content":"flex-start"}},Dt={style:{flex:"1"}},$t=["type","placeholder"],Ct=W({__name:"DInput",props:{label:String,placeholder:String,scale:String,modelValue:String,password:Boolean,pre:Object,post:Object,focus:Boolean},emits:["update:modelValue"],setup(t,{expose:o,emit:n}){const s=t,l=e.ref(null),a=e.computed(()=>s.scale==="small"?"d-input-small":s.scale==="large"?"d-input-large":""),i=e.computed({get:()=>s.modelValue,set:r=>{n("update:modelValue",r)}});e.onMounted(()=>{s.focus&&c()});const c=()=>{l.value.focus()};return o({focus:c}),(r,d)=>!s.post&&!s.pre?(e.openBlock(),e.createElementBlock("div",ft,[s.label?(e.openBlock(),e.createElementBlock("div",ht,e.toDisplayString(s.label),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":d[0]||(d[0]=p=>i.value=p),type:s.password?"password":"text",class:e.normalizeClass(a.value),placeholder:s.placeholder,style:{width:"100%"}},null,10,gt),[[e.vModelDynamic,i.value]])])):s.post&&s.post.click&&!s.pre?(e.openBlock(),e.createElementBlock("div",yt,[s.label?(e.openBlock(),e.createElementBlock("div",_t,e.toDisplayString(s.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",kt,[e.createElementVNode("div",bt,[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:l,class:e.normalizeClass(["d-input-post-field",a.value]),"onUpdate:modelValue":d[1]||(d[1]=p=>i.value=p),type:s.password?"password":"text",placeholder:s.placeholder,style:{width:"100%"}},null,10,Bt),[[e.vModelDynamic,i.value]])]),s.post.label?(e.openBlock(),e.createBlock(H,{key:0,scale:s.scale,class:e.normalizeClass(["d-input-post-button",s.post.class]),onClick:s.post.click,icon:s.post.icon},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.post.label),1)]),_:1},8,["scale","onClick","icon","class"])):(e.openBlock(),e.createBlock(H,{key:1,scale:s.scale,class:e.normalizeClass(["d-input-post-button",s.post.class]),onClick:s.post.click,icon:s.post.icon},null,8,["scale","onClick","icon","class"]))])])):!s.post&&s.pre&&s.pre.click?(e.openBlock(),e.createElementBlock("div",St,[s.label?(e.openBlock(),e.createElementBlock("div",xt,e.toDisplayString(s.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",wt,[s.pre.label?(e.openBlock(),e.createBlock(H,{key:0,scale:s.scale,class:e.normalizeClass(["d-input-pre-button",s.pre.class]),onClick:s.pre.click,icon:s.pre.icon},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.pre.label),1)]),_:1},8,["scale","onClick","icon","class"])):(e.openBlock(),e.createBlock(H,{key:1,scale:s.scale,class:e.normalizeClass(["d-input-pre-button",s.pre.class]),onClick:s.pre.click,icon:s.pre.icon},null,8,["scale","onClick","icon","class"])),e.createElementVNode("div",Dt,[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:l,class:e.normalizeClass(["d-input-pre-field",a.value]),"onUpdate:modelValue":d[2]||(d[2]=p=>i.value=p),type:s.password?"password":"text",placeholder:s.placeholder,style:{width:"100%"}},null,10,$t),[[e.vModelDynamic,i.value]])])])])):e.createCommentVNode("",!0)}},[["__scopeId","data-v-a972038a"]]),be={__name:"DBadge",props:{scale:String,type:String,class:String,stress:{type:Boolean,default:!1}},setup(t){const o=t,n=e.computed(()=>o.scale==="large"?"badge-lg":o.scale==="small"?"badge-sm":""),s=e.computed(()=>{const l=o.stress?"-stress":"";return o.type==="primary"?`badge${l}-blue`:o.type==="success"?`badge${l}-green`:o.type==="error"?`badge${l}-red`:o.type==="warning"?`badge${l}-orange`:o.type==="wait"?`badge${l}-violet`:o.stress?`badge${l}-gray`:""});return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["badge",[o.class,n.value,s.value].join(" ")])},[e.renderSlot(l.$slots,"default")],2))}},j="0px",Be={__name:"DCollapse",props:{duration:{type:Number,default:200},easingEnter:{type:String,default:"ease-in-out"},easingLeave:{type:String,default:"ease-in-out"},opacityClosed:{type:Number,default:0},opacityOpened:{type:Number,default:1}},setup(t){const o=t,n=r=>({height:r==null?void 0:r.style.height,width:r==null?void 0:r.style.width,position:r==null?void 0:r.style.position,visibility:r==null?void 0:r.style.visibility,overflow:r==null?void 0:r.style.overflow,paddingTop:r==null?void 0:r.style.paddingTop,paddingBottom:r==null?void 0:r.style.paddingBottom,borderTopWidth:r==null?void 0:r.style.borderTopWidth,borderBottomWidth:r==null?void 0:r.style.borderBottomWidth,marginTop:r==null?void 0:r.style.marginTop,marginBottom:r==null?void 0:r.style.marginBottom}),s=(r,d)=>{const{width:p}=getComputedStyle(r);r.style.width=p,r.style.position="absolute",r.style.visibility="hidden",r.style.height="";let{height:u}=getComputedStyle(r);return r.style.width=d.width,r.style.position=d.position,r.style.visibility=d.visibility,r.style.height=j,r.style.overflow="hidden",d.height&&d.height!==j?d.height:u},l=(r,d,p,u,_)=>{const b=r.animate(u,_);r.style.height=d.height,b.onfinish=()=>{r.style.overflow=d.overflow,p()}},a=(r,d)=>{const p={height:r,opacity:o.opacityOpened,paddingTop:d.paddingTop,paddingBottom:d.paddingBottom,borderTopWidth:d.borderTopWidth,borderBottomWidth:d.borderBottomWidth,marginTop:d.marginTop,marginBottom:d.marginBottom};return Object.keys(p).forEach(u=>p[u]==null&&delete p[u]),[{height:j,opacity:o.opacityClosed,paddingTop:j,paddingBottom:j,borderTopWidth:j,borderBottomWidth:j,marginTop:j,marginBottom:j},p]},i=(r,d)=>{const p=r,u=n(p),_=s(p,u),b=a(_,u),D={duration:o.duration,easing:o.easingEnter};l(p,u,d,b,D)},c=(r,d)=>{const p=r,u=n(p),{height:_}=getComputedStyle(p);p.style.height=_,p.style.overflow="hidden";const b=a(_,u).reverse(),D={duration:o.duration,easing:o.easingLeave};l(p,u,d,b,D)};return(r,d)=>(e.openBlock(),e.createBlock(e.Transition,{css:!1,onEnter:i,onLeave:c},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3}))}},K={data:void 0},re=t=>t.reduce((o,n)=>(o[n]=n)&&o,{}),V=re(["drag","dragend","dragenter","dragleave","dragstart","dragover","drop"]),Et=re(["copy","move","link","none"]),Tt=re(["none","copy","copyLink","copyMove","link","linkMove","move","all","uninitialized"]),Se={__name:"DDrag",props:{draggable:{type:Boolean,default:!0},transferData:{},dropEffect:{validator:t=>t in Et},effectAllowed:{validator:t=>t in Tt},image:String,imageXOffset:{type:Number,default:0},imageYOffset:{type:Number,default:0},hideImageHtml:{type:Boolean,default:!1},tag:{type:String,default:"div"}},setup(t){const o=t,n=e.useSlots(),s=e.ref(!1),l=e.computed(()=>s&&o.transferData),a=e.computed(()=>({position:"fixed",top:"-1000px"})),i=(c,r)=>{const d=r.dataTransfer;if([V.dragenter,V.dragover].includes(c)&&o.dropEffect&&(d.dropEffect=o.dropEffect),c===V.dragstart){if(o.effectAllowed&&(d.effectAllowed=o.effectAllowed),o.image||n.image){let p;o.image?(p=new Image,p.src=o.image):n.image&&(p=n.image[0].elm),d.setDragImage&&d.setDragImage(p,o.imageXOffset,o.imageYOffset)}o.transferData!==void 0&&(K.data=o.transferData,r.dataTransfer.setData("text","")),s.value=!0}};return(c,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{draggable:o.draggable,onDrag:r[0]||(r[0]=d=>i(e.unref(V).drag,d)),onDragstart:r[1]||(r[1]=e.withModifiers(d=>i(e.unref(V).dragstart,d),["stop"])),onDragenter:r[2]||(r[2]=d=>i(e.unref(V).dragenter,d)),onDragleave:r[3]||(r[3]=d=>i(e.unref(V).dragleave,d)),onDragend:r[4]||(r[4]=d=>i(e.unref(V).dragend,d))},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{transferData:l.value}),t.hideImageHtml?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(a.value)},[e.renderSlot(c.$slots,"image",{transferData:l.value})],4)):e.renderSlot(c.$slots,"image",{key:1,transferData:l.value})]),_:3},40,["draggable"]))}},es="",Nt=t=>(e.pushScopeId("data-v-e40122f5"),t=t(),e.popScopeId(),t),Vt={key:0,style:{display:"none"}},Lt={key:1},Mt=[Nt(()=>e.createElementVNode("div",{class:"tree-divider"},null,-1))],It={key:2},zt={class:"tree-divider-header"},Rt={key:3},Ot={class:"item-title"},At={key:0,class:"tree-divider"},Ht={key:1},Ft={style:{display:"flex","flex-direction":"row","justify-content":"flex-end"}},Pt={key:0,class:"sub-menu"},xe=W({__name:"DTreeItem",props:{model:Object,treeId:[String,Number],items:Array,search:String,component:Object},emits:["nodedrop","nodedragover","nodedragleave","nodeclick","nodecontext"],setup(t,{emit:o}){const n=t,s=e.ref(null),l=e.ref(!1),a=e.ref(!1),i=e.ref(!1),c=e.computed(()=>n.model.children&&n.model.children.length),r=e.computed(()=>(g.actions.isTreeExpanded(n.treeId)&&(n.model.expanded=n.model.expanded===void 0?!0:n.model.expanded),n.model.expanded)),d=w=>{o("nodeclick",{event:w,model:n.model})},p=w=>{o("nodeclick",w)},u=w=>{o("nodedrop",w)},_=w=>{o("nodecontext",w)},b=e.computed(()=>(g.actions.isItemSelected(n.treeId,n.model.id)?"selected":"")+(l.value?"node-over ":"")+(a.value?"node-top ":"")+(i.value?"node-bottom ":"")),D=e.computed(()=>n.search?!1:n.model.draggable===!0),k=w=>{o("nodedrop",{e:w,model:n.model});let y=K.data;if(y===void 0||y.model===void 0)return l.value=!1,!1;if(y.model.id===n.model.id||g.actions.isChildOfParent(n.treeId,n.items,n.model.id,y.model.id)||g.actions.isParentOfChild(n.treeId,n.items,y.model.id,n.model.id))return l.value=!1,a.value=!1,i.value=!1,!1;if(!g.state.trees[n.treeId].transfer&&y.id!==n.treeId)return!1;let C="";a.value?C="before":i.value?C="after":C="inside",g.actions.moveTreeNode(y.id,n.treeId,n.items,y.model.id,n.model.id,C),l.value=!1,a.value=!1,i.value=!1},N=w=>{o("nodedragover",{e:w,model:n.model});let y=K.data;if(y===void 0||y.model===void 0)return l.value=!0,!1;if(y.model.id===n.model.id||g.actions.isChildOfParent(n.treeId,n.items,n.model.id,y.model.id)||g.actions.isParentOfChild(n.treeId,n.items,y.model.id,n.model.id))return!1;const C=w.y,L=s.value.getBoundingClientRect().top,M=s.value.getBoundingClientRect().height,h=M/3;C>L&&C<=L+h?(l.value=!1,a.value=!0,i.value=!1):C<L+M&&C>=L+M-h?(l.value=!1,a.value=!1,i.value=!0):(l.value=!0,a.value=!1,i.value=!1)},$=()=>{l.value=!1,a.value=!1,i.value=!1},S=e.computed(()=>n.model.title.startsWith("-")),x=e.computed(()=>{if(n.model.title.startsWith("-")){let[w,...y]=n.model.title.split(" ");return y=y.join(" "),y}return null});return(w,y)=>{const C=e.resolveComponent("d-tree-item",!0),L=e.resolveDirective("touch");return e.unref(g).actions.beforeItem(n.treeId,t.model)?S.value&&!x.value?(e.openBlock(),e.createElementBlock("li",Lt,Mt)):S.value&&x.value?(e.openBlock(),e.createElementBlock("li",It,[e.createElementVNode("div",zt,e.toDisplayString(e.unref(g).actions.renderTitle(n.treeId,x.value)),1)])):n.model.component?(e.openBlock(),e.createElementBlock("li",Rt,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Z).getters.getComponent(n.model.component))))])):(e.openBlock(),e.createBlock(Se,{key:4,tag:"li",class:"tree-item","transfer-data":{id:n.treeId,model:n.model},draggable:D.value,onDrop:e.withModifiers(k,["stop"]),onDragenter:y[1]||(y[1]=e.withModifiers(()=>{},["prevent"])),onDragover:e.withModifiers(N,["prevent","stop"]),onDragleave:e.withModifiers($,["prevent"])},{default:e.withCtx(()=>{var M,h;return[e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"node",ref:s,class:e.normalizeClass(b.value),onContextmenu:y[0]||(y[0]=e.withModifiers(E=>o("nodecontext",{e:E,model:n.model}),["prevent"]))},[e.createElementVNode("div",null,[n.model.icons&&n.model.icons.pre&&c.value&&!n.search&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:0,component:e.unref(R).getters.getIcon(n.model.icons.pre.component),size:18,color:n.model.icons.pre.color?n.model.icons.pre.color:"inherit",class:e.normalizeClass(r.value?"tree-open-pre":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0),n.model.icons&&n.model.icons.pre&&!c.value&&!n.search&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:1,component:e.unref(R).getters.getIcon(n.model.icons.pre.component),size:18,color:"rgba(0,0,0,0)",class:e.normalizeClass(r.value?"tree-open-pre":"")},null,8,["component","class"])):e.createCommentVNode("",!0),n.model.icons&&n.model.icons.icon&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:2,component:e.unref(R).getters.getIcon(n.model.icons.icon.component),color:n.model.icons.icon.color?n.model.icons.icon.color:"inherit",size:n.model.icons.icon.size?n.model.icons.icon.size:null,className:n.model.icons.icon.class?n.model.icons.icon.class:null},null,8,["component","color","size","className"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ot,[S.value?(e.openBlock(),e.createElementBlock("div",At)):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ht,e.toDisplayString(e.unref(g).actions.renderTitle(n.treeId,n.model.title)),1))])]),e.createElementVNode("div",Ft,[((M=n.model.badge)==null?void 0:M.value)!==void 0&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(be),{key:0,class:e.normalizeClass([(h=n.model.badge)==null?void 0:h.class,"badge-sm"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.model.badge.value),1)]),_:1},8,["class"])):e.createCommentVNode("",!0),n.model.icons&&n.model.icons.post&&c.value&&!n.search&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:1,component:e.unref(R).getters.getIcon(n.model.icons.post.component),size:20,color:n.model.icons.post.color?n.model.icons.post.color:"inherit",class:e.normalizeClass(r.value?"tree-open-post":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0)])],34)),[[L,d]]),e.createVNode(Be,null,{default:e.withCtx(()=>[c.value&&r.value&&!n.search?(e.openBlock(),e.createElementBlock("ul",Pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.model.children,E=>(e.openBlock(),e.createBlock(C,{class:"tree-item",key:E.id,model:E,treeId:n.treeId,items:n.items,search:n.search,onNodeclick:p,onNodedrop:u,onNodecontext:_},null,8,["model","treeId","items","search"]))),128))])):e.createCommentVNode("",!0)]),_:1})]}),_:1},8,["transfer-data","draggable","onDrop","onDragover","onDragleave"])):(e.openBlock(),e.createElementBlock("li",Vt))}}},[["__scopeId","data-v-e40122f5"]]);function we(t){return t=t||new Map,{all:t,on(o,n){const s=t.get(o);s?s.push(n):t.set(o,[n])},off(o,n){const s=t.get(o);s&&(n?s.splice(s.indexOf(n)>>>0,1):t.set(o,[]))},emit(o,n){let s=t.get(o);s&&s.slice().map(l=>{l(n)}),s=t.get("*"),s&&s.slice().map(l=>{l(o,n)})}}}const I=we(),g={state:e.reactive({trees:{}}),getters:{getItems(t){return g.state.trees[t].items},getItemsSelect(t){return g.state.trees[t].selected},getParentId(t,o,n,s="id",l="children",a={}){return n&&t&&(t.find(i=>i[s]===n?(a.found=o,i):g.getters.getParentId(i[l],i.id,n,s,l,a)),a.found)?a.found:!1}},mutations:{setTreeItems(t,o){g.state.trees[t].items=o},setItemSelect(t,o){g.state.trees[t].noSelect||(g.state.trees[t].multiSelect?g.state.trees[t].selected.includes(o.id)?g.state.trees[t].selected=g.state.trees[t].selected.filter(function(n){return n!==o.id}):g.state.trees[t].selected=[...g.state.trees[t].selected,o.id]:g.state.trees[t].selected=[o.id])}},actions:{initTreeStore(t,o,n,s,l,a,i){g.state.trees[t]=[],g.state.trees[t].selected=[],g.state.trees[t].noSelect=o,g.state.trees[t].multiSelect=n,g.state.trees[t].expanded=s,g.state.trees[t].transfer=l,g.state.trees[t].renderTitle=a,g.state.trees[t].beforeItem=i},renderTitle(t,o){return g.state.trees[t].renderTitle?g.state.trees[t].renderTitle(o):o},beforeItem(t,o){return g.state.trees[t].beforeItem?g.state.trees[t].beforeItem(o):!0},isItemSelected(t,o){return g.state.trees[t].selected.includes(o)},toggleItem(t,o){o.expanded=o.expanded===void 0||!o.expanded,o.children&&o.children.length&&(o.expanded?I.emit(`expand-${t}`,{id:t,model:o}):I.emit(`collapse-${t}`,{id:t,model:o}))},isTreeExpanded(t){return g.state.trees[t].expanded},isChildOfParent(t,o,n,s){const l=g.actions.deepSearch(o,n);if(l&&l.children){for(let a=0;a<l.children.length;a++)if(l.children[a].id===s)return!0}return!1},isParentOfChild(t,o,n,s){const l=g.actions.deepSearch(o,n);return!!(l&&l.children&&g.actions.deepSearch(l.children,s))},deepSearch(t,o,n="id",s="children",l={}){return o&&t&&(t.find(a=>a[n]===o?(l.found=a,a):g.actions.deepSearch(a[s],o,n,s,l)),l.found)?l.found:!1},deepSearchByTitle(t,o,n="title",s="children",l=[]){if(o&&t&&(t.find(a=>{const i=new RegExp(o,"gi");a[n].toString().toLowerCase().match(i)!==null&&l.push(a),g.actions.deepSearchByTitle(a[s],o,n,s,l)}),l)){for(let a=0;a<l.length;a++);return l}return l},moveTreeNode(t,o,n,s,l,a){const i=g.actions.deleteTreeNode(n,s);g.actions.insertTreeNode(n,l,i,a),I.emit(`move-${o}`,{fromTreeId:t,toTreeId:o,moved:i.id,target:l,position:a})},insertTreeNode(t,o,n,s){if(t)for(let l=0;l<t.length;l++){if(t[l].id===o){let i=l;return s==="after"?(i++,t.splice(i,0,n)):s==="before"?t.splice(i,0,n):s==="inside"&&(Object.hasOwn(t[l],"children")||(t[l].children=[],t[l].opened=!0),t[l].children.splice(0,0,n)),t[l]}const a=this.insertTreeNode(t[l].children,o,n,s);if(a)return a}},deleteTreeNode(t,o){if(t)for(let n=0;n<t.length;n++){if(t[n].id===o){const l=t[n];return t.splice(n,1),l}const s=g.actions.deleteTreeNode(t[n].children,o);if(s)return s}}}},De={__name:"DDrop",props:{tag:{type:String,default:"div"}},emits:Object.keys(V),setup(t,{expose:o,emit:n}){let s=e.reactive({});const l=e.ref("false"),a=e.ref(null),i=new Set,c=e.computed(()=>l.value&&s),r=(p,u)=>{s=K.data,n(p,u,s),p===V.dragenter&&(i.size||u.target===a.value)&&i.add(u.target),p===V.dragleave&&i.delete(u.target),p===V.drop&&i.clear(),l.value=!!i.size};return o({elementSize:()=>ke(a)}),(p,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{ref_key:"el",ref:a,onDragenter:u[0]||(u[0]=_=>r(e.unref(V).dragenter,_)),onDragleave:u[1]||(u[1]=_=>r(e.unref(V).dragleave,_)),onDragover:u[2]||(u[2]=e.withModifiers(_=>r(e.unref(V).dragover,_),["prevent"])),onDrop:u[3]||(u[3]=e.withModifiers(_=>r(e.unref(V).drop,_),["prevent"]))},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"default",{transferData:c.value})]),_:3},544))}},ie={__name:"DMenu",props:{class:String,items:Array,style:[String,Object],noSelect:{type:Boolean,default:!0},renderItemTitle:Function,beforeItem:Function,bodyAsParent:{type:Boolean,default:!0}},emits:["select"],setup(t,{expose:o,emit:n}){const s=t;let l=e.ref(null),a=e.ref(!1);const i=()=>{I.emit("menu-show-request"),a.value=!0},c=()=>{var _;(_=l.value)==null||_.collapseAll(),a.value=!1},r=()=>a.value;I.on("menu-show-request",()=>{c()}),o({show:i,hide:c,elementSize:()=>l.value.elementSize(),isShowed:r,itemsCount:()=>l.value.itemsCount()});const u=_=>{n("select",_),_.model.children||c()};return(_,b)=>{const D=e.resolveDirective("click-outside");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.unref(a)?e.withDirectives((e.openBlock(),e.createBlock(ce,{key:0,ref_key:"treeRef",ref:l,items:s.items,"no-select":s.noSelect,class:e.normalizeClass(s.class),style:e.normalizeStyle(s.style),onSelect:u,"render-title":s.renderItemTitle,"before-item":s.beforeItem},null,8,["items","no-select","class","style","render-title","before-item"])),[[D,()=>c()]]):e.createCommentVNode("",!0)])}}},$e={__name:"DContextMenu",props:{items:Array,renderItemTitle:Function,beforeItem:Function},emits:["select"],setup(t,{expose:o,emit:n}){const s=t,l=e.ref(null),a=e.ref(0),i=e.ref(0),c=e.computed(()=>({left:a.value+"px",top:i.value+"px"})),r=p=>{l.value.show(),e.nextTick(()=>{const u=l.value.elementSize(),_=window.innerWidth,b=window.innerHeight;a.value=_-p.pageX<u.width?p.pageX-u.width:p.pageX,i.value=b-p.pageY<u.height?p.pageY-u.height:p.pageY,l.value.itemsCount()===0&&l.value.hide()})},d=p=>{n("select",p)};return o({show:r}),(p,u)=>(e.openBlock(),e.createBlock(ie,{ref_key:"dMenuRef",ref:l,onSelect:d,items:s.items,style:e.normalizeStyle(c.value),class:"context-menu","no-select":!0,"render-item-title":s.renderItemTitle,"before-item":s.beforeItem},null,8,["items","style","render-item-title","before-item"]))}},ce={__name:"DTree",props:{items:Array,noSelect:Boolean,multiSelect:Boolean,expanded:Boolean,transfer:Boolean,renderTitle:Function,beforeItem:Function,search:String,context:Array,contextClick:{type:Function,default:()=>{}},contextBeforeClick:{type:Function,default:()=>!0}},emits:["select","collapse","expand","move","over","drop"],setup(t,{expose:o,emit:n}){const s=t,l=e.ref(null),a=e.ref(!1),i=e.ref(null),c=e.getCurrentInstance().uid;g.actions.initTreeStore(c,s.noSelect,s.multiSelect,s.expanded,s.transfer,s.renderTitle,s.beforeItem);const r=(h,E)=>{console.log(h,E)};I.on(`expand-${c}`,h=>{n("expand",h)}),I.on(`collapse-${c}`,h=>{n("collapse",h)}),I.on(`move-${c}`,h=>{n("move",h)});const d=e.computed(()=>s.search?g.actions.deepSearchByTitle(s.items,s.search):s.items),p=(h=null)=>{g.mutations.setItemSelect(c,h.model),g.actions.toggleItem(c,h.model),n("select",h)},u=(h=null)=>{n("over",h)},_=(h=null)=>{n("drop",h)},b=()=>l.value.elementSize(),D=()=>{for(let h=0;h<s.items.length;h++)s.items[h].expanded=!0},k=()=>{for(let h=0;h<s.items.length;h++)s.items[h].expanded=!1},N=()=>c,$=h=>g.actions.deepSearch(s.items,h),S=h=>{$(h)&&g.mutations.setItemSelect(c,$(h))},x=h=>{s.contextClick({e:h.e,model:h.model,target:i.value})},w=h=>s.contextBeforeClick({model:h,target:i.value}),y=e.computed(()=>s.context),C=h=>(y.value&&(i.value=h.model,a.value.show(h.e)),!1),L=()=>M(d.value),M=h=>{let E=0;for(let m=0;m<h.length;m++)E+=g.actions.beforeItem(c,h[m])?1:0,h[m].children&&h[m].children.length>0&&(E+=M(h[m].children));return E};return o({elementSize:b,expandAll:D,collapseAll:k,getId:N,getNode:$,selectNode:S,itemsCount:L}),(h,E)=>(e.openBlock(),e.createBlock(De,{ref_key:"treeRef",ref:l,class:"tree",tag:"ul",onDrop:e.withModifiers(r,["stop"])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,m=>(e.openBlock(),e.createBlock(xe,{key:m.id,model:m,treeId:e.unref(c),items:s.items,search:s.search,onNodeclick:p,onNodedragover:u,onNodedrop:_,onNodecontext:C},null,8,["model","treeId","items","search"]))),128)),y.value?(e.openBlock(),e.createBlock($e,{key:0,ref_key:"contextTreeRef",ref:a,items:y.value,onSelect:x,"before-item":w},null,8,["items"])):e.createCommentVNode("",!0)]),_:1},8,["onDrop"]))}},ns="",Wt=W({__name:"DAccordion",props:{items:Array,renderTitle:Function,noSelect:{type:Boolean,default:!0}},setup(t){const o=t;return(n,s)=>(e.openBlock(),e.createBlock(ce,{class:"accordion",items:o.items,"no-select":o.noSelect,"render-title":o.renderTitle},null,8,["items","no-select","render-title"]))}},[["__scopeId","data-v-642edace"]]),Ce={__name:"DLayoutHeader",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:1001},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(t){const o=t,n=e.computed(()=>{const{fixed:s,zIndex:l,minWidth:a,height:i,paddingLeft:c,transitionDuration:r,transitionTimingFunction:d}=o,p=s?"fixed":"static",u=o.useMinWidthLayout?`min-width:${a}px;`:"";return`position:${p};z-index:${l};${u}height:${i}px;padding-left:${c}px;transition-duration:${r}ms;transition-timing-function:${d};`});return(s,l)=>(e.openBlock(),e.createElementBlock("header",{class:"d-layout-header",style:e.normalizeStyle(n.value)},[e.renderSlot(s.$slots,"default")],4))}},Ee={__name:"DLayoutTab",props:{fixed:{type:Boolean,default:!0},top:{type:Number,default:56},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(t){const o=t,n=e.computed(()=>{const{fixed:s,top:l,zIndex:a,minWidth:i,height:c,paddingLeft:r,transitionDuration:d,transitionTimingFunction:p}=o,u=s?"fixed":"static",_=o.useMinWidthLayout?`min-width: ${i}px;`:"";return`position:${u};top:${l}px;z-index:${a};${_}height:${c}px;padding-left:${r}px;transition-duration:${d}ms;transition-timing-function:${p};`});return(s,l)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout-tab",style:e.normalizeStyle(n.value)},[e.renderSlot(s.$slots,"default")],4))}},Te={__name:"DLayoutFooter",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(t){const o=t,n=e.computed(()=>{const{fixed:s,zIndex:l,minWidth:a,height:i,paddingLeft:c,transitionDuration:r,transitionTimingFunction:d}=o,p=s?"fixed":"static",u=o.useMinWidthLayout?`min-width:${a}px;`:"";return`position:${p};z-index:${l};${u}height:${i}px;padding-left:${c}px;transition-duration:${r}ms;transition-timing-function:${d};`});return(s,l)=>(e.openBlock(),e.createElementBlock("footer",{class:"d-layout-footer",style:e.normalizeStyle(n.value)},[e.renderSlot(s.$slots,"default")],4))}},Ne={__name:"DLayoutSidebar",props:{zIndex:{type:Number,default:1002},width:{type:Number,default:200},paddingTop:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1}},setup(t){const o=t,n=e.computed(()=>{const{zIndex:s,width:l,paddingTop:a,transitionDuration:i,transitionTimingFunction:c}=o;return`z-index:${s};width:${l}px;padding-top:${a}px;transition-duration:${i}ms;transition-timing-function:${c};`});return(s,l)=>(e.openBlock(),e.createElementBlock("aside",{class:"d-layout-sidebar",style:e.normalizeStyle(n.value)},[e.renderSlot(s.$slots,"default")],4))}},Ve={__name:"DLayoutContent",props:{paddingTop:{type:Number,default:0},paddingBottom:{type:Number,default:0},paddingLeft:{type:Number,default:0},overflowHidden:Boolean,transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"}},setup(t){const o=t,n=e.computed(()=>{const{paddingTop:s,paddingBottom:l,paddingLeft:a,transitionDuration:i,transitionTimingFunction:c}=o,r=`overflow:${o.overflowHidden?"hidden":"visible"};`;return`padding-top:${s}px;padding-bottom:${l}px;padding-left:${a}px;${r}transition-duration:${i}ms;transition-timing-function:${c};`});return(s,l)=>(e.openBlock(),e.createElementBlock("main",{style:e.normalizeStyle(n.value),class:"d-layout-content"},[e.renderSlot(s.$slots,"default")],4))}};function jt(t){const o=e.ref(0),n=e.computed(()=>`transform: translateX(${-o.value}px);`);let s=!1;function l(p){o.value=p}function a(){var p;const u=((p=document.scrollingElement)===null||p===void 0?void 0:p.scrollLeft)||0;l(u)}function i(){a()}function c(){document.addEventListener("scroll",a)}function r(){s&&document.removeEventListener("scroll",a)}function d(){i(),c(),s=!0}return e.watch(t,p=>{p?d():r()},{immediate:!0}),e.onUnmounted(()=>{r()}),n}const Xt=1001,Yt=999,Ut=998,qt={__name:"DLayoutAdmin",props:{mode:{type:String,default:"vertical"},isMobile:{type:Boolean,default:!1},useMinWidthLayout:{type:Boolean,default:!1},minWidth:{type:Number,default:1200},headerVisible:{type:Boolean,default:!0},headerHeight:{type:Number,default:56},tabVisible:{type:Boolean,default:!0},tabHeight:{type:Number,default:44},fixedHeaderAndTab:{type:Boolean,default:!0},addMainOverflowHidden:{type:Boolean,default:!1},footerVisible:{type:Boolean,default:!0},footerHeight:{type:Number,default:48},fixedFooter:{type:Boolean,default:!0},sidebarVisible:{type:Boolean,default:!0},sidebarWidth:{type:Number,default:200},sidebarCollapsedWidth:{type:Number,default:0},sidebarCollapse:{type:Boolean,default:!1},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1},maskBg:{type:String,default:"rgba(0,0,0,0.3)"}},emits:["update:sidebar-collapse","sidebar-mask-click"],setup(t,{emit:o}){const n=t,s=e.computed(()=>n.useMinWidthLayout?`min-width:${n.minWidth}px;`:""),l=e.computed(()=>n.useMinWidthLayout&&(n.fixedHeaderAndTab||n.fixedFooter)),a=jt(l),i=e.computed(()=>n.fixedHeaderAndTab?a.value:""),c=e.computed(()=>n.fixedFooter?a.value:""),r=e.computed(()=>{const{transitionDuration:y,transitionTimingFunction:C}=n;return{transitionDuration:y,transitionTimingFunction:C}}),d=e.computed(()=>n.mode==="vertical"),p=e.computed(()=>n.isMobile||d.value?1003:1e3),u=e.computed({get(){return n.sidebarCollapse},set(y){o("update:sidebar-collapse",y)}});function _(){o("sidebar-mask-click")}const b=e.computed(()=>n.isMobile&&!u.value),D=e.computed(()=>{const{transitionDuration:y,transitionTimingFunction:C}=n;return`background-color:${n.maskBg};transition-duration:${y}ms;transition-timing-function:${C};`}),k=e.computed(()=>{const{sidebarWidth:y,sidebarCollapsedWidth:C}=n,L=n.isMobile?0:C,M=u.value?L:y;return n.sidebarVisible?M:0}),N=e.computed(()=>n.isMobile?0:k.value),$=e.computed(()=>d.value?N.value:0),S=e.computed(()=>!n.isMobile&&!d.value&&n.headerVisible?n.headerHeight:0),x=e.computed(()=>{let y=0;return n.fixedHeaderAndTab&&(n.headerVisible&&(y+=n.headerHeight),n.tabVisible&&(y+=n.tabHeight)),y}),w=e.computed(()=>n.fixedFooter&&n.footerVisible?n.footerHeight:0);return(y,C)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout",style:e.normalizeStyle(s.value)},[t.headerVisible?(e.openBlock(),e.createBlock(Ce,e.mergeProps({key:0},r.value,{fixed:t.fixedHeaderAndTab,"z-index":Xt,"min-width":t.minWidth,height:t.headerHeight,"padding-left":$.value,style:i.value}),{default:e.withCtx(()=>[e.renderSlot(y.$slots,"header")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0),t.tabVisible?(e.openBlock(),e.createBlock(Ee,e.mergeProps({key:1},r.value,{fixed:t.fixedHeaderAndTab,"z-index":Yt,"min-width":t.minWidth,top:t.headerHeight,height:t.tabHeight,"padding-left":N.value,style:i.value}),{default:e.withCtx(()=>[e.renderSlot(y.$slots,"tab")]),_:3},16,["fixed","min-width","top","height","padding-left","style"])):e.createCommentVNode("",!0),t.sidebarVisible?(e.openBlock(),e.createBlock(Ne,e.mergeProps({key:2},r.value,{"z-index":p.value,width:k.value,"padding-top":S.value}),{default:e.withCtx(()=>[e.renderSlot(y.$slots,"sidebar")]),_:3},16,["z-index","width","padding-top"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"d-layout-sidebar-mask",style:e.normalizeStyle(D.value),onClick:_},null,4)):e.createCommentVNode("",!0),e.createVNode(Ve,e.mergeProps(r.value,{"padding-top":x.value,"padding-bottom":w.value,"padding-left":N.value,"overflow-hidden":t.addMainOverflowHidden}),{default:e.withCtx(()=>[e.renderSlot(y.$slots,"default")]),_:3},16,["padding-top","padding-bottom","padding-left","overflow-hidden"]),t.footerVisible?(e.openBlock(),e.createBlock(Te,e.mergeProps({key:4},r.value,{fixed:t.fixedFooter,"z-index":Ut,"min-width":t.minWidth,height:t.footerHeight,"padding-left":N.value,style:c.value}),{default:e.withCtx(()=>[e.renderSlot(y.$slots,"footer")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0)],4))}},U={state:e.reactive({theme:"dark"}),getters:{theme(){return U.state.theme}},mutations:{setTheme(t){U.state.theme=t,document.documentElement.classList.remove("dark"),document.documentElement.classList.remove("light"),document.documentElement.classList.add(t)}},actions:{toggleTheme(){U.state.theme=U.state.theme==="dark"?"light":"dark",document.documentElement.classList.remove("dark"),document.documentElement.classList.remove("light"),document.documentElement.classList.add(U.state.theme)}}},Gt={__name:"DConfigProvider",props:{theme:{type:String,default:"dark"}},setup(t){const o=t;return U.mutations.setTheme(o.theme),(n,s)=>e.renderSlot(n.$slots,"default")}},ls="",Zt={__name:"DScrollProvider",props:{xHide:{type:Boolean,default:!0},yHide:{type:Boolean,default:!1}},setup(t){const o=t;e.useCssVars(a=>({e35a6f9a:n.value,e35a6f98:s.value}));const n=e.computed(()=>o.xHide?"hidden":"visible"),s=e.computed(()=>o.yHide?"hidden":"visible"),l=a=>{document.body.classList.add(a),document.documentElement.classList.add(a),document.documentElement.classList.add("d-global-scroll")};return e.onMounted(()=>{l("colored-scroller")}),(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.renderSlot(a.$slots,"default")]))}},as="",Kt=W({__name:"DScroll",props:{autoHide:{type:Boolean,default:!0},xHide:{type:Boolean,default:!0},yHide:{type:Boolean,default:!1}},setup(t){const o=t;e.useCssVars(l=>({c07fa29a:n.value,c07fa298:s.value}));const n=e.computed(()=>o.xHide?"hidden":"visible"),s=e.computed(()=>o.yHide?"hidden":"visible");return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(o.autoHide?"d-scroll-hide":"d-scroll")},[e.renderSlot(l.$slots,"default",{},void 0,!0)],2))}},[["__scopeId","data-v-d50b3609"]]),Jt={class:"modal-content"},Qt={class:"modal-header"},vt={class:"modal-title"},eo={class:"modal-body"},to={class:"modal-footer"},de={__name:"DModal",props:{show:Boolean,width:String,maxWidth:String},emits:["open","close"],setup(t,{expose:o,emit:n}){const s=t,l=e.ref(null),a=e.ref(!1);a.value=s==null?void 0:s.show;const i=()=>{a.value=!0,n("open",l)},c=()=>{a.value=!1,n("close",l)};return o({show:i,hide:c}),(r,d)=>{const p=e.resolveDirective("keydown");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[a.value?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"modalRef",ref:l,class:"modal"},[e.createElementVNode("div",{class:"modal-dialog",style:e.normalizeStyle({width:s.width,maxWidth:s.maxWidth})},[e.createElementVNode("div",Jt,[e.createElementVNode("div",Qt,[e.createElementVNode("h5",vt,[e.renderSlot(r.$slots,"modal-title")])]),e.createElementVNode("div",eo,[e.renderSlot(r.$slots,"default")]),e.createElementVNode("div",to,[e.renderSlot(r.$slots,"modal-footer")])])],4)])),[[p,c,"Escape"]]):e.createCommentVNode("",!0)]),_:3})])}}},q=e.shallowRef();function pe(t){t===void 0&&(t=q.value.comp.returnValue()),q.value.resolve(t),q.value=null}function Le(t,o,n="default"){return new Promise(s=>{q.value={dialog:t,props:o,wrapper:n,resolve:s}})}var oo=(t,o)=>{const n=t.__vccOpts||t;for(const[s,l]of o)n[s]=l;return n};const no=e.defineComponent({name:"DialogWrapper",components:{},props:{name:{type:String,default:"default"},transitionAttrs:Object},setup(){const t=e.ref();return e.watch(t,()=>{q.value&&(q.value.comp=t.value)}),{dialogRef:q,dialogInstance:t}}});function so(t,o,n,s,l,a){return e.openBlock(),e.createBlock(e.Transition,e.normalizeProps(e.guardReactiveProps(t.transitionAttrs)),{default:e.withCtx(()=>[t.dialogRef&&t.dialogRef.wrapper===t.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.dialogRef.dialog),e.mergeProps({key:0},t.dialogRef.props,{ref:"dialogInstance"}),null,16)):e.createCommentVNode("",!0)]),_:1},16)}var lo=oo(no,[["render",so]]);const ao={style:{display:"flex","flex-direction":"row","justify-content":"center",gap:"5px"}},Me={__name:"DAlertDialog",props:{title:String,message:String},setup(t,{expose:o}){const n=t;return o({returnValue:()=>!0}),(l,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(de,{show:!0},{"modal-title":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.message),1)]),"modal-footer":e.withCtx(()=>[e.createElementVNode("div",ao,[e.createVNode(H,{onClick:a[0]||(a[0]=i=>e.unref(pe)())},{default:e.withCtx(()=>[e.createTextVNode("Закрыть")]),_:1})])]),_:1})]))}},ro={style:{display:"flex","flex-direction":"row","justify-content":"center",gap:"5px"}},Ie={__name:"DConfirmDialog",props:{title:String,message:String},setup(t,{expose:o}){const n=t;return o({returnValue:()=>!0}),(l,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(de,{show:!0},{"modal-title":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.message),1)]),"modal-footer":e.withCtx(()=>[e.createElementVNode("div",ro,[e.createVNode(H,{onClick:a[0]||(a[0]=i=>e.unref(pe)())},{default:e.withCtx(()=>[e.createTextVNode("Да")]),_:1}),e.createVNode(H,{class:"button-red",onClick:a[1]||(a[1]=i=>e.unref(pe)(!1))},{default:e.withCtx(()=>[e.createTextVNode("Нет")]),_:1})])]),_:1})]))}},io={class:"dropdown"},co={__name:"DDropdown",props:{class:String,icon:{type:[String,null],default:null},items:Array,menuStyle:Object,renderItemTitle:Function,beforeItem:Function,type:String,bodyAsParent:{type:Boolean,default:!0}},emits:["select","click"],setup(t,{expose:o,emit:n}){const s=t,l=e.useSlots(),a=e.ref(null),i=e.ref(null),c=e.ref(0),r=e.ref(0),d=b=>{if(n("click",b),a.value.isShowed()){a.value.hide();return}a.value.show(),e.nextTick(()=>{const D=a.value.elementSize(),k=i.value.elementSize(),N=window.innerWidth,$=window.innerHeight;c.value=N-(k.x+k.width)<D.width?k.left-D.width+k.width:k.left,r.value=$-(k.y+k.height)<D.height?k.top-D.height-5:k.height+k.top+5})},p=b=>{n("select",b)},u=e.computed(()=>({left:c.value+"px",top:r.value+"px",position:s.bodyAsParent?"absolute":"fixed",...s.menuStyle}));o({show:d});const _=b=>!!l[b];return(b,D)=>(e.openBlock(),e.createElementBlock("div",io,[_("default")?(e.openBlock(),e.createBlock(H,{key:0,ref_key:"buttonRef",ref:i,class:e.normalizeClass(s.class),icon:s.icon,onClick:e.withModifiers(d,["stop","prevent"]),type:s.type},{default:e.withCtx(()=>[e.renderSlot(b.$slots,"default")]),_:3},8,["class","icon","onClick","type"])):(e.openBlock(),e.createBlock(H,{key:1,ref_key:"buttonRef",ref:i,class:e.normalizeClass(s.class),icon:s.icon,onClick:e.withModifiers(d,["stop","prevent"]),type:s.type},null,8,["class","icon","onClick","type"])),e.createVNode(ie,{ref_key:"dMenuRef",ref:a,items:s.items,class:"dropdown-menu",style:e.normalizeStyle(u.value),"no-select":!0,onSelect:p,"render-item-title":s.renderItemTitle,"before-item":s.beforeItem,"body-as-parent":s.bodyAsParent},null,8,["items","style","render-item-title","before-item","body-as-parent"])]))}},po={},mo={class:"d-panel"};function uo(t,o){return e.openBlock(),e.createElementBlock("div",mo,[e.renderSlot(t.$slots,"default")])}const ze=W(po,[["render",uo]]),fo={class:"card-header"},ho={class:"modal-title"},go={class:"card-body"},yo={class:"card-footer"},_o={__name:"DCard",setup(t){return(o,n)=>(e.openBlock(),e.createBlock(ze,{class:"d-card"},{default:e.withCtx(()=>[e.createElementVNode("div",fo,[e.createElementVNode("h5",ho,[e.renderSlot(o.$slots,"title")])]),e.createElementVNode("div",go,[e.renderSlot(o.$slots,"default")]),e.createElementVNode("div",yo,[e.renderSlot(o.$slots,"footer")])]),_:3}))}},ko=new Map;class bo{constructor(o,n,s){this.remaining=n,this.callback=o,this.notifyItem=s,this.resume()}pause(){clearTimeout(this.notifyItem.timer),this.remaining-=Date.now()-this.start}resume(){this.start=Date.now(),clearTimeout(this.notifyItem.timer),this.notifyItem.timer=setTimeout(this.callback,this.remaining)}}const me="[-+]?[0-9]*.?[0-9]+",Re=[{name:"px",regexp:new RegExp(`^${me}px$`)},{name:"%",regexp:new RegExp(`^${me}%$`)},{name:"px",regexp:new RegExp(`^${me}$`)}],Bo=t=>{if(t==="auto")return{type:t,value:0};for(let o=0;o<Re.length;o++){const n=Re[o];if(n.regexp.test(t))return{type:n.name,value:parseFloat(t)}}return{type:"",value:t}},So=t=>{switch(typeof t){case"number":return{type:"px",value:t};case"string":return Bo(t);default:return{type:"",value:t}}},Oe={x:new Set(["left","center","right"]),y:new Set(["top","bottom"])},xo=(t=>()=>t++)(0),wo=t=>typeof t!="string"?[]:t.split(/\s+/gi).filter(Boolean),Do=t=>{typeof t=="string"&&(t=wo(t));let o=null,n=null;return t.forEach(s=>{Oe.y.has(s)&&(n=s),Oe.x.has(s)&&(o=s)}),{x:o,y:n}},ue={position:["top","right"],cssAnimation:"fade",velocityAnimation:{enter:t=>({height:[t.clientHeight,0],opacity:[1,0]}),leave:{height:0,opacity:[0,1]}}},$o={__name:"VelocityGroup",emits:["enter","leave","after-leave"],setup(t,{emit:o}){const n=(a,i)=>{o("enter",a,i)},s=(a,i)=>{o("leave",a,i)},l=()=>{o("after-leave")};return(a,i)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{tag:"span",css:!1,onEnter:n,onLeave:s,onAfterLeave:l},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3}))}},Co=Object.assign({inheritAttrs:!1},{__name:"CssGroup",props:{name:String},setup(t){const o=t;return(n,s)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{tag:"span",name:o.name},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},8,["name"]))}}),Eo=["data-id"],To=["onClick"],No=["innerHTML"],Vo=["innerHTML"],Lo={key:0,class:"d-notification-title"},Mo={class:"notification-content"},Io={__name:"DNotificationProvider",props:{group:{type:String,default:""},width:{type:[String,Number],default:300},reverse:{type:Boolean,default:!1},position:{type:[String,Array,null],default:ue.position},classes:{type:String,default:"d-notification"},animationType:{type:String,default:"css"},animation:{type:[String,Object],default:ue.velocityAnimation},animationName:{type:String,default:ue.cssAnimation},speed:{type:Number,default:300},duration:{type:Number,default:3e3},delay:{type:Number,default:0},max:{type:Number,default:1/0},ignoreDuplicates:{type:Boolean,default:!1},closeOnClick:{type:Boolean,default:!0},pauseOnHover:{type:Boolean,default:!1},dangerouslySetInnerHtml:{type:Boolean,default:!1}},emits:["click","destroy","start"],setup(t,{emit:o}){const n=t,s={IDLE:0,DESTROYED:2},l=e.ref([]),a=e.ref(null),i=e.ref(ko.get("velocity")),c=e.computed(()=>n.animationType==="velocity"),r=e.computed(()=>c.value?$o:Co),d=e.computed(()=>l.value.filter(m=>m.state!==s.DESTROYED)),p=e.computed(()=>So(n.width)),u=e.computed(()=>{const{x:m,y:T}=Do(n.position),B=p.value.value,A=p.value.type,X={width:B+A};return T&&(X[T]="0px"),m&&(m==="center"?X.left=`calc(50% - ${+B/2}${A})`:X[m]="0px"),X}),_=e.computed(()=>"bottom"in u.value),b=m=>{o("click",m),n.closeOnClick&&w(m)},D=()=>{var m;n.pauseOnHover&&((m=a.value)==null||m.pause())},k=()=>{var m;n.pauseOnHover&&((m=a.value)==null||m.resume())},N=m=>{if(m.group||(m.group=""),m.data||(m.data={}),n.group!==m.group)return;if(m.clean||m.clear){C();return}const T=typeof m.duration=="number"?m.duration:n.duration,B=typeof m.speed=="number"?m.speed:n.speed,A=typeof m.ignoreDuplicates=="boolean"?m.ignoreDuplicates:n.ignoreDuplicates,{title:X,text:te,type:oe,data:ne,id:se}=m,P={id:se||xo(),title:X,text:te,type:oe,state:s.IDLE,speed:B,length:T+2*B,data:ne};T>=0&&(a.value=new bo(()=>w(P),P.length,P));const le=n.reverse?!_.value:_.value;let G=-1;const ae=d.value.some(J=>J.title===m.title&&J.text===m.text);(!A||!ae)&&(le?(l.value.push(P),o("start",P),d.value.length>n.max&&(G=0)):(l.value.unshift(P),o("start",P),d.value.length>n.max&&(G=d.value.length-1)),G!==-1&&w(d.value[G]))},$=m=>{y(m)},S=m=>["d-notification-template",n.classes,m.type||""],x=m=>c.value?void 0:{transition:`all ${m.speed}ms`},w=m=>{clearTimeout(m.timer),m.state=s.DESTROYED,E(),o("destroy",m)},y=m=>{const T=l.value.find(B=>B.id===m);T&&w(T)},C=()=>{d.value.forEach(w)},L=(m,T)=>{var A;const B=(A=n.animation)==null?void 0:A[m];return typeof B=="function"?B(T):B},M=(m,T)=>{if(!c.value)return;const B=L("enter",m);i.value(m,B,{duration:n.speed,complete:T})},h=(m,T)=>{if(!c.value)return;const B=L("leave",m);i.value(m,B,{duration:n.speed,complete:T})};function E(){l.value=l.value.filter(m=>m.state!==s.DESTROYED)}return e.onMounted(()=>{I.on("notification-add",N),I.on("notification-close",$)}),(m,T)=>(e.openBlock(),e.createElementBlock("div",{class:"d-notification-group",style:e.normalizeStyle(u.value)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{name:t.animationName,onEnter:M,onLeave:h,onAfterLeave:E},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,B=>(e.openBlock(),e.createElementBlock("div",{key:B.id,class:"d-notification-wrapper",style:e.normalizeStyle(x(B)),"data-id":B.id,onMouseenter:D,onMouseleave:k},[e.renderSlot(m.$slots,"body",{class:e.normalizeClass([t.classes,B.type]),item:B,close:()=>w(B)},()=>[e.createElementVNode("div",{class:e.normalizeClass(S(B)),onClick:A=>b(B)},[t.dangerouslySetInnerHtml?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[B.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:"d-notification-title",innerHTML:B.timer},null,8,No)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"notification-content",innerHTML:B.text},null,8,Vo)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[B.title?(e.openBlock(),e.createElementBlock("div",Lo,e.toDisplayString(B.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Mo,e.toDisplayString(B.text),1)],64))],10,To)])],44,Eo))),128))]),_:3},40,["name"]))],4))}},zo={class:"d-info-progress-icon-container"},Ro={class:"d-info-progress-icon"},Oo={class:"d-info-progress-data-container"},Ao=["innerHTML"],Ho={__name:"DInfoProgress",props:{style:[String,Object],label:String,progress:Number,icon:String,type:String},emits:["click"],setup(t,{emit:o}){const n=t,s=e.computed(()=>n.icon?R.getters.getIcon(n.icon):null);return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["d-info-progress",n.type?`d-info-progress-${n.type}`:null]),style:e.normalizeStyle(n.style),onClick:a[0]||(a[0]=i=>{o("click",i)})},[e.createElementVNode("div",zo,[e.createElementVNode("div",Ro,[n.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:0,component:s.value,color:"inherit",size:17},null,8,["component"])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Oo,[e.createElementVNode("div",{class:"d-info-progress-line",style:e.normalizeStyle("width: "+n.progress+"%;")},null,4),e.createElementVNode("div",{class:"d-info-progress-label",innerHTML:t.label},null,8,Ao)])],6))}},Fo={class:"d-checkbox"},Po=["id","checked","disabled"],Wo=["for"],jo={__name:"DCheckbox",props:{label:String,modelValue:Boolean,disabled:{type:Boolean,default:!1},change:Function,checked:Boolean},emits:["update:modelValue"],setup(t,{emit:o}){const n=t,l=e.getCurrentInstance().uid,a=e.computed({get:()=>n.modelValue,set:i=>{o("update:modelValue",i)}});return(i,c)=>(e.openBlock(),e.createElementBlock("div",Fo,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":c[0]||(c[0]=r=>a.value=r),id:`i-${e.unref(l)}`,type:"checkbox",checked:n.checked,disabled:n.disabled,onChange:c[1]||(c[1]=(...r)=>n.change&&n.change(...r))},null,40,Po),[[e.vModelCheckbox,a.value]]),e.createElementVNode("label",{for:`i-${e.unref(l)}`},e.toDisplayString(n.label),9,Wo)]))}};async function Ae(t,o){return await Le(Ie,{title:t,message:o})}async function He(t,o){return await Le(Me,{title:t,message:o})}const Xo={__name:"DDialogProvider",setup(t){return window.alert=He,window.confirm=Ae,(o,n)=>(e.openBlock(),e.createBlock(e.unref(lo)))}},Yo={class:"d-select"},Uo={key:0,class:"label"},qo=["value","selected","disabled"],Go={__name:"DSelect",props:{label:String,size:String,options:Array,modelValue:String,scale:String},emits:["update:modelValue"],setup(t,{emit:o}){const n=t,s=e.computed(()=>n.scale?"d-select-"+n.scale:""),l=e.computed({get:()=>n.modelValue,set:a=>{o("update:modelValue",a)}});for(let a=0;a<n.options.length;a++)if(n.options[a].selected){l.value=n.options[a].value;break}return(a,i)=>(e.openBlock(),e.createElementBlock("div",Yo,[n.label?(e.openBlock(),e.createElementBlock("div",Uo,e.toDisplayString(n.label),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":i[0]||(i[0]=c=>l.value=c),class:e.normalizeClass(s.value),style:e.normalizeStyle(n.size==="wide"?"width:100%":"")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.options,(c,r)=>(e.openBlock(),e.createElementBlock("option",{key:r,value:c.value,selected:c.selected,disabled:c.disabled},e.toDisplayString(c.label),9,qo))),128))],6),[[e.vModelSelect,l.value]])]))}},Zo=["title"],Ko=["title"],Jo={__name:"DTabLabel",props:{tab:Object},setup(t){const o=t;return(n,s)=>o.tab.label?(e.openBlock(),e.createElementBlock("span",{key:0,title:o.tab.title?o.tab.title:""},e.toDisplayString(o.tab.label),9,Zo)):o.tab.icon?(e.openBlock(),e.createElementBlock("span",{key:1,title:o.tab.title?o.tab.title:""},[e.createVNode(e.unref(Y),{component:o.tab.icon},null,8,["component"])],8,Ko)):e.createCommentVNode("",!0)}},is="",Qo={class:"d-tabs"},vo=W({__name:"DTabs",props:{tabs:Array},setup(t){const o=t,n=e.toRef(o,"tabs"),s=e.ref(0),l=a=>{s.value=a};return(a,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Qo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(c,r)=>(e.openBlock(),e.createBlock(Jo,{index:r,tab:c,class:e.normalizeClass(["d-tab-title",r===s.value?"active":""]),onClick:d=>l(r)},null,8,["index","tab","class","onClick"]))),256))]),(e.openBlock(),e.createBlock(e.KeepAlive,null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value[s.value].component)))],1024))],64))}},[["__scopeId","data-v-c98761cd"]]),ds="",en={class:"d-grid"},tn=W({__name:"DGrid",props:{gap:{type:String,default:"1em"},colXs:{type:String,default:"repeat(1, 1fr)"},colSm:String,colMd:String,colLg:String,colXl:String,colXxl:String},setup(t){const o=t;e.useCssVars(p=>({"09eba472":r[0],"09eba434":r[1],"09eba3f6":r[2],"09eba3b8":r[3],"09eba37a":r[4],"09eba33c":r[5],"898eb2ac":o.gap}));const{colXs:n,colSm:s,colMd:l,colLg:a,colXl:i,colXxl:c}=e.toRefs(o),r=[n.value,s.value,l.value,a.value,i.value,c.value];let d=null;for(let p=0;p<r.length;p++)d||(d=r[0]),p>0&&(r[p]?d=r[p]:r[p]=d);return(p,u)=>(e.openBlock(),e.createElementBlock("div",en,[e.renderSlot(p.$slots,"default",{},void 0,!0)]))}},[["__scopeId","data-v-b45e8130"]]),on=["src","alt","title"],nn={__name:"DImage",props:{src:String,srcFail:String,alt:String,title:String,width:String,height:String,radius:String},setup(t){const o=t,n=e.ref(null),s=new Image;return s.onload=()=>{n.value=s.src},s.onerror=()=>{n.value=o.srcFail},e.onMounted(()=>{s.src=o.src}),(l,a)=>n.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.value,alt:o.alt,title:o.title,style:e.normalizeStyle({width:o.width,height:o.height,borderRadius:o.radius})},null,12,on)):e.createCommentVNode("",!0)}},ms="",sn={class:"d-textarea"},ln={key:0,class:"label"},an=["rows","cols","placeholder"],rn=W({__name:"DTextarea",props:{label:String,placeholder:String,scale:String,modelValue:String,rows:{type:Number,default:3},cols:{type:Number,default:null},focus:Boolean},emits:["update:modelValue"],setup(t,{expose:o,emit:n}){const s=t,l=e.ref(null),a=e.computed(()=>s.scale==="small"?"d-textarea-small":s.scale==="large"?"d-textarea-large":""),i=e.computed({get:()=>s.modelValue,set:r=>{n("update:modelValue",r)}});e.onMounted(()=>{s.focus&&c()});const c=()=>{l.value.focus()};return o({focus:c}),(r,d)=>(e.openBlock(),e.createElementBlock("div",sn,[s.label?(e.openBlock(),e.createElementBlock("div",ln,e.toDisplayString(s.label),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("textarea",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":d[0]||(d[0]=p=>i.value=p),rows:s.rows,cols:s.cols,placeholder:s.placeholder,class:e.normalizeClass(a.value),style:{width:"100%"}},null,10,an),[[e.vModelText,i.value]])]))}},[["__scopeId","data-v-0e805d5d"]]);class cn{constructor(o){this.fields=o}validate(){let o=!1;for(let n in this.fields)this.fields[n].ref.value.validate()===!0&&(o=!0);return!o}}class dn{validate(o,n="https"){return this._isValidURL(o)||(o=n+"://"+o),this._isValidURL(o)}message(o,n){let s="";switch(o){case"url":s=n;break}return s}_isValidURL(o){try{return new URL(o),!0}catch{return!1}}}const pn=new dn;class mn{validate(o=""){return o!==""}message(o){return o}}const un=new mn;class fn{validate(o="",n=0){return o.length>=n}message(o){return o}}const hn=new fn;class gn{validate(o="",n=0){return o.length<=n}message(o){return o}}const yn=new gn;class _n{validate(o){return/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/.test(o)}message(o){return o}}const kn=new _n;class bn{validate(o){return!isNaN(parseFloat(o))&&!isNaN(o-0)}message(o){return o}}const Bn=new bn,z={RulesUrl:pn,RulesRequired:un,RulesMin:hn,RulesMax:yn,RulesEmail:kn,RulesNumber:Bn};class Sn{validate(o,n){var l,a,i,c,r,d,p,u,_,b,D,k,N,$;let s="";if(n){let S=!1;for(let x in n)if(!S)switch(x){case"url":s=z.RulesUrl.validate(o,"https")||o.length===0?"":z.RulesUrl.message("url",(l=n[x])!=null&&l.message?(a=n[x])==null?void 0:a.message:"url_incorrect"),S=s!=="";break;case"required":s=z.RulesRequired.validate(o)?"":z.RulesRequired.message((i=n[x])!=null&&i.message?(c=n[x])==null?void 0:c.message:"required"),S=s!=="";break;case"min":s=z.RulesMin.validate(o,(r=n[x])==null?void 0:r.value)?"":z.RulesMin.message((d=n[x])!=null&&d.message?(p=n[x])==null?void 0:p.message:"very_small"),S=s!=="";break;case"max":s=z.RulesMax.validate(o,(u=n[x])==null?void 0:u.value)?"":z.RulesMax.message((_=n[x])!=null&&_.message?(b=n[x])==null?void 0:b.message:"vary_large"),S=s!=="";break;case"email":s=z.RulesEmail.validate(o)?"":z.RulesMax.message((D=n[x])!=null&&D.message?(k=n[x])==null?void 0:k.message:"email_incorrect"),S=s!=="";break;case"number":s=z.RulesNumber.validate(o)?"":z.RulesNumber.message((N=n[x])!=null&&N.message?($=n[x])==null?void 0:$.message:"number_incorrect"),S=s!=="";break}}return s}}const xn=new Sn,wn={style:{display:"flex","flex-direction":"column"}},Dn={key:0,class:"d-label"},$n={key:0,class:"text-red"},Cn={style:{display:"flex","flex-direction":"row"}},En={style:{flex:"1",position:"relative"}},Tn=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{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",fill:"currentColor"})],-1)],Nn=["id","type","placeholder","disabled"],Vn=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{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",fill:"currentColor"})],-1)],Ln={key:1,class:"d-help"},Mn={key:2,class:"d-error text-red"},In={__name:"DInputString",props:{form:Object,name:String,modelValue:String,label:String,error:String,help:String,placeholder:String,type:{type:String,default:"text"},pre:Object,post:Object,fieldRules:Object,scale:String,focus:Boolean,disabled:Boolean},emits:["update:modelValue","input"],setup(t,{expose:o,emit:n}){const s=t,l=e.ref(s.error),a=it(),i=e.ref(!1),c=e.ref(null);//!props.form ? ref(null) : props.form.fields[props.name].ref
|
|
2
|
-
const r=e.computed({get:()=>s.modelValue,set:$=>{n("update:modelValue",$)}}),d=e.computed(()=>s.type==="password"?"password":"text"),p=e.computed(()=>s.scale),u=$=>{n("input",$),_()},_=()=>(l.value=xn.validate(r.value,s.form.fields[s.name].rules),!!l.value);e.onMounted(()=>{b()});const b=()=>{var $;($=c.value)==null||$.focus()},D=()=>{r.value=""},k=$=>{i.value=$};return o({focus:b,setError:$=>{l.value=$},validate:_}),($,S)=>{var x,w,y,C,L,M,h,E,m,T,B,A,X,te,oe,ne,se,P,le,G,ae,ye,J,Ue,qe,Ge,Ze,Ke,Je,Qe,ve,et,tt,ot,nt,st,lt,at,rt;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["d-input-string",p.value])},[e.createElementVNode("div",wn,[s.label?(e.openBlock(),e.createElementBlock("div",Dn,[e.createTextVNode(e.toDisplayString(s.label),1),(x=s.form)!=null&&x.fields[s.name].rules&&s.form.fields[s.name].rules.hasOwnProperty("required")?(e.openBlock(),e.createElementBlock("span",$n,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Cn,[(y=(w=s.pre)==null?void 0:w.outside)!=null&&y.component?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["d-pre",s.disabled?"disabled":""])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((L=(C=s.pre)==null?void 0:C.outside)==null?void 0:L.component)))],2)):(h=(M=s.pre)==null?void 0:M.outside)!=null&&h.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["d-pre",s.disabled?"disabled":""])},[e.createElementVNode("div",{class:e.normalizeClass(["d-text",i.value?"focused":""])},e.toDisplayString((m=(E=s.pre)==null?void 0:E.outside)==null?void 0:m.text),3)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",En,[(B=(T=s.pre)==null?void 0:T.inside)!=null&&B.action&&((X=(A=s.pre)==null?void 0:A.inside)==null?void 0:X.action)==="clear"&&((te=r.value)==null?void 0:te.length)>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"d-pre-inside-button",onClick:D},Tn)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{id:e.unref(a),ref_key:"inputRef",ref:c,"onUpdate:modelValue":S[0]||(S[0]=_e=>r.value=_e),style:{width:"100%"},type:d.value,placeholder:s.placeholder,onInput:u,onFocus:S[1]||(S[1]=_e=>k(!0)),onFocusout:S[2]||(S[2]=_e=>k(!1)),class:e.normalizeClass([(ne=(oe=s.pre)==null?void 0:oe.outside)!=null&&ne.component||(P=(se=s.pre)==null?void 0:se.outside)!=null&&P.text?"has-pre":"",(G=(le=s.post)==null?void 0:le.outside)!=null&&G.component||(ye=(ae=s.post)==null?void 0:ae.outside)!=null&&ye.text?"has-post":"",(Ue=(J=s.pre)==null?void 0:J.inside)!=null&&Ue.action?"has-pre-inside-button":"",(Ge=(qe=s.post)==null?void 0:qe.inside)!=null&&Ge.action?"has-post-inside-button":"",i.value?"focused":""]),disabled:s.disabled},null,42,Nn),[[e.vModelDynamic,r.value]]),(Ke=(Ze=s.post)==null?void 0:Ze.inside)!=null&&Ke.action&&((Qe=(Je=s.post)==null?void 0:Je.inside)==null?void 0:Qe.action)==="clear"&&((ve=r.value)==null?void 0:ve.length)>0?(e.openBlock(),e.createElementBlock("div",{key:1,class:"d-post-inside-button",onClick:D},Vn)):e.createCommentVNode("",!0)]),(tt=(et=s.post)==null?void 0:et.outside)!=null&&tt.component?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["d-post",s.disabled?"disabled":""])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((nt=(ot=s.post)==null?void 0:ot.outside)==null?void 0:nt.component)))],2)):(lt=(st=s.post)==null?void 0:st.outside)!=null&<.text?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["d-post",s.disabled?"disabled":""])},[e.createElementVNode("div",{class:e.normalizeClass(["d-text",i.value?"focused":""])},e.toDisplayString((rt=(at=s.post)==null?void 0:at.outside)==null?void 0:rt.text),3)],2)):e.createCommentVNode("",!0)]),s.help?(e.openBlock(),e.createElementBlock("div",Ln,e.toDisplayString(s.help),1)):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("div",Mn,e.toDisplayString(l.value),1)):e.createCommentVNode("",!0)])],2)}}},Z={state:{},getters:{getComponent(t){return Z.state[t]},getComponents(){return Z.state}},mutations:{addComponent(t,o){Z.state.name=o},addComponents(t){for(const o in t)t.hasOwnProperty(o)&&(Z.state[o]=t[o])}}},fe=t=>{typeof t=="string"&&(t={title:"",text:t}),typeof t=="object"&&I.emit("notification-add",t)};fe.close=t=>{I.emit("notification-close",t)};const zn=()=>({notify:fe}),Rn={mounted:function(t,o){t.clickOutsideEvent=function(n){t===n.target||t.contains(n.target)||o.value(n,t)},document.addEventListener("click",t.clickOutsideEvent)},unmounted:function(t){document.removeEventListener("click",t.clickOutsideEvent)}},On={beforeMount(t,o){t._keydownCallback=n=>{n.key===o.arg&&o.value()},document.addEventListener("keydown",t._keydownCallback)},unmounted(t,o){document.removeEventListener("keydown",t._keydownCallback),delete t._keydownCallback}},An={beforeMount(t){t.focus()}};function Fe(t){return t.type.indexOf("mouse")!==-1?t.clientX:t.touches[0].clientX}function Pe(t){return t.type.indexOf("mouse")!==-1?t.clientY:t.touches[0].clientY}var Hn=function(){var t=!1;try{var o=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,o)}catch{}return t}(),Fn={disableClick:!1,tapTolerance:10,swipeTolerance:30,touchHoldTolerance:400,longTapTimeInterval:400,touchClass:"",dragFrequency:100,rollOverFrequency:100};function Q(t){var o=this.$$touchObj,n=t.type.indexOf("touch")>=0,s=t.type.indexOf("mouse")>=0,l=this;n&&(o.lastTouchStartTime=t.timeStamp),!(s&&o.lastTouchStartTime&&t.timeStamp-o.lastTouchStartTime<350)&&(o.touchStarted||(Ye(this),o.touchStarted=!0,o.touchMoved=!1,o.swipeOutBounded=!1,o.startX=Fe(t),o.startY=Pe(t),o.currentX=0,o.currentY=0,o.touchStartTime=t.timeStamp,o.hasSwipe=O(this,"swipe")||O(this,"swipe.left")||O(this,"swipe.right")||O(this,"swipe.top")||O(this,"swipe.bottom"),O(this,"hold")&&(o.touchHoldTimer=setTimeout(function(){o.touchHoldTimer=null,F(t,l,"hold")},o.options.touchHoldTolerance)),F(t,this,"press")))}function v(t){var o=this.$$touchObj,n=Fe(t),s=Pe(t),l=o.currentX!=n||o.currentY!=s;if(o.currentX=n,o.currentY=s,o.touchMoved){if(o.hasSwipe&&!o.swipeOutBounded){var i=o.options.swipeTolerance;o.swipeOutBounded=Math.abs(o.startX-o.currentX)>i&&Math.abs(o.startY-o.currentY)>i}}else{var a=o.options.tapTolerance;o.touchMoved=Math.abs(o.startX-o.currentX)>a||Math.abs(o.startY-o.currentY)>a,o.touchMoved&&(ge(o),F(t,this,"drag.once"))}if(O(this,"rollover")&&l){var c=t.timeStamp,r=o.options.rollOverFrequency;(o.touchRollTime==null||c>o.touchRollTime+r)&&(o.touchRollTime=c,F(t,this,"rollover"))}if(O(this,"drag")&&o.touchStarted&&o.touchMoved&&l){var c=t.timeStamp,r=o.options.dragFrequency;(o.touchDragTime==null||c>o.touchDragTime+r)&&(o.touchDragTime=c,F(t,this,"drag"))}}function We(){var t=this.$$touchObj;ge(t),he(this),t.touchStarted=t.touchMoved=!1,t.startX=t.startY=0}function ee(t){var o=this.$$touchObj,n=t.type.indexOf("touch")>=0,s=t.type.indexOf("mouse")>=0;n&&(o.lastTouchEndTime=t.timeStamp);var l=n&&!o.touchHoldTimer;if(ge(o),o.touchStarted=!1,he(this),!(s&&o.lastTouchEndTime&&t.timeStamp-o.lastTouchEndTime<350))if(F(t,this,"release"),o.touchMoved){if(o.hasSwipe&&!o.swipeOutBounded){var a=o.options.swipeTolerance,i,c=Math.abs(o.startY-o.currentY),r=Math.abs(o.startX-o.currentX);(c>a||r>a)&&(c>a?i=o.startY>o.currentY?"top":"bottom":i=o.startX>o.currentX?"left":"right",O(this,"swipe."+i)?F(t,this,"swipe."+i,i):F(t,this,"swipe",i))}}else if(O(this,"longtap")&&t.timeStamp-o.touchStartTime>o.options.longTapTimeInterval)t.cancelable&&t.preventDefault(),F(t,this,"longtap");else if(O(this,"hold")&&l){t.cancelable&&t.preventDefault();return}else F(t,this,"tap")}function je(){Ye(this)}function Xe(){he(this)}function O(t,o){var n=t.$$touchObj.callbacks[o];return n!=null&&n.length>0}function F(t,o,n,s){var l=o.$$touchObj,a=l.callbacks[n];if(a==null||a.length===0)return null;for(var i=0;i<a.length;i++){var c=a[i];c.modifiers.stop&&t.stopPropagation(),c.modifiers.prevent&&t.preventDefault(),!(c.modifiers.self&&t.target!==t.currentTarget)&&typeof c.value=="function"&&(s?c.value(s,t):c.value(t))}}function Ye(t){var o=t.$$touchObj.options.touchClass;o&&t.classList.add(o)}function he(t){var o=t.$$touchObj.options.touchClass;o&&t.classList.remove(o)}function ge(t){t.touchHoldTimer&&(clearTimeout(t.touchHoldTimer),t.touchHoldTimer=null)}function Pn(t,o){var n=t.$$touchObj||{callbacks:{},hasBindTouchEvents:!1,options:Fn};return o&&(n.options=Object.assign({},n.options,o)),t.$$touchObj=n,t.$$touchObj}const Wn={beforeMount:function(t,o){const n=Pn(t);let s=Hn?{passive:!0}:!1;const l=o.arg||"tap";switch(l){case"swipe":let a=o.modifiers;if(a.left||a.right||a.top||a.bottom){for(let i in o.modifiers)if(["left","right","top","bottom"].indexOf(i)>=0){let c="swipe."+i;n.callbacks[c]=n.callbacks[c]||[],n.callbacks[c].push(o)}}else n.callbacks.swipe=n.callbacks.swipe||[],n.callbacks.swipe.push(o);break;case"press":case"drag":o.modifiers.disablePassive&&(s=!1);default:n.callbacks[l]=n.callbacks[l]||[],n.callbacks[l].push(o)}n.hasBindTouchEvents||(t.addEventListener("touchstart",Q,s),t.addEventListener("touchmove",v,s),t.addEventListener("touchcancel",We),t.addEventListener("touchend",ee),n.options.disableClick||(t.addEventListener("mousedown",Q),t.addEventListener("mousemove",v),t.addEventListener("mouseup",ee),t.addEventListener("mouseenter",je),t.addEventListener("mouseleave",Xe)),n.hasBindTouchEvents=!0)},unmounted:function(t){t.removeEventListener("touchstart",Q),t.removeEventListener("touchmove",v),t.removeEventListener("touchcancel",We),t.removeEventListener("touchend",ee),t.$$touchObj&&!t.$$touchObj.options.disableClick&&(t.removeEventListener("mousedown",Q),t.removeEventListener("mousemove",v),t.removeEventListener("mouseup",ee),t.removeEventListener("mouseenter",je),t.removeEventListener("mouseleave",Xe)),delete t.$$touchObj}};f.DAccordion=Wt,f.DAlertDialog=Me,f.DBadge=be,f.DButton=H,f.DCard=_o,f.DCheckbox=jo,f.DCollapse=Be,f.DComponentStore=Z,f.DConfigProvider=Gt,f.DConfirmDialog=Ie,f.DContextMenu=$e,f.DDialogProvider=Xo,f.DDrag=Se,f.DDrop=De,f.DDropdown=co,f.DForm=cn,f.DGlobalStore=U,f.DGrid=tn,f.DIcon=Y,f.DIconStore=R,f.DImage=nn,f.DInfoProgress=Ho,f.DInput=Ct,f.DInputString=In,f.DLayoutAdmin=qt,f.DLayoutContent=Ve,f.DLayoutFooter=Te,f.DLayoutHeader=Ce,f.DLayoutSidebar=Ne,f.DLayoutTab=Ee,f.DMenu=ie,f.DModal=de,f.DNotificationProvider=Io,f.DPanel=ze,f.DScroll=Kt,f.DScrollProvider=Zt,f.DSelect=Go,f.DTabs=vo,f.DTextarea=rn,f.DTransferStore=K,f.DTree=ce,f.DTreeItem=xe,f.DTreeStore=g,f.Rules=z,f.alert=He,f.clickOutside=Rn,f.confirm=Ae,f.emitter=I,f.eventsBus=we,f.focus=An,f.keydown=On,f.notify=fe,f.touch=Wn,f.useNotification=zn,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(f,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(f=typeof globalThis<"u"?globalThis:f||self,e(f.DophJs={},f.Vue))})(this,function(f,e){"use strict";const jn="",Xn="",Yn="",Un="",qn="",Y={__name:"DIcon",props:{component:[Object,String],size:[Number,String],color:String,className:String},setup(t){const o=t,n=e.useSlots(),s=e.computed(()=>{const{className:c}=o;return c===void 0?"icon":["icon",c].join(" ")}),l=e.computed(()=>{const{color:c}=o;return c===void 0?null:c}),a=e.computed(()=>{const c=o.size??null;if(c!==void 0)return typeof c=="number"||/^\d+$/.test(c)?`${c}px`:c}),i=e.computed(()=>e.h("i",{class:s.value,style:{color:l.value,fontSize:a.value}},o.component?e.h(o.component):n));return(c,r)=>(e.openBlock(),e.createBlock(e.unref(i)))}},R={state:{},getters:{getIcon(t){return R.state[t]},getIcons(){return R.state}},mutations:{addIcon(t,o){R.state.name=o},addIcons(t){for(const o in t)t.hasOwnProperty(o)&&(R.state[o]=t[o])}}};function ke(t){const o=t.value.getBoundingClientRect();let n=t.value,s=0,l=0;for(;n&&!isNaN(n.offsetLeft)&&!isNaN(n.offsetTop);)s+=n.offsetLeft-n.scrollLeft,l+=n.offsetTop-n.scrollTop,n=n.offsetParent;return{top:l,left:s,x:o.x,y:o.y,width:o.width,height:o.height}}function it(){function t(l){return l*Math.random()|0}function o(){return t(16).toString(16)}function n(l){let a="";for(let i=0;i<l;++i)a+=o();return a}function s(){return(t(16)&3|8).toString(16)}return n(8)+"-"+n(4)+"-4"+n(3)+"-"+s()+n(3)+"-"+n(12)}const Gn="",W=(t,o)=>{const n=t.__vccOpts||t;for(const[s,l]of o)n[s]=l;return n},ct={key:0,class:"loading-svg rotating",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},dt=[e.createStaticVNode('<g fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-v-e5cd6ccd><path d="M8.56 3.69a9 9 0 0 0-2.92 1.95" data-v-e5cd6ccd></path><path d="M3.69 8.56A9 9 0 0 0 3 12" data-v-e5cd6ccd></path><path d="M3.69 15.44a9 9 0 0 0 1.95 2.92" data-v-e5cd6ccd></path><path d="M8.56 20.31A9 9 0 0 0 12 21" data-v-e5cd6ccd></path><path d="M15.44 20.31a9 9 0 0 0 2.92-1.95" data-v-e5cd6ccd></path><path d="M20.31 15.44A9 9 0 0 0 21 12" data-v-e5cd6ccd></path><path d="M20.31 8.56a9 9 0 0 0-1.95-2.92" data-v-e5cd6ccd></path><path d="M15.44 3.69A9 9 0 0 0 12 3" data-v-e5cd6ccd></path></g>',1)],pt={key:1},mt={key:2,class:"loading-svg rotating",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},ut=[e.createStaticVNode('<g fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-v-e5cd6ccd><path d="M8.56 3.69a9 9 0 0 0-2.92 1.95" data-v-e5cd6ccd></path><path d="M3.69 8.56A9 9 0 0 0 3 12" data-v-e5cd6ccd></path><path d="M3.69 15.44a9 9 0 0 0 1.95 2.92" data-v-e5cd6ccd></path><path d="M8.56 20.31A9 9 0 0 0 12 21" data-v-e5cd6ccd></path><path d="M15.44 20.31a9 9 0 0 0 2.92-1.95" data-v-e5cd6ccd></path><path d="M20.31 15.44A9 9 0 0 0 21 12" data-v-e5cd6ccd></path><path d="M20.31 8.56a9 9 0 0 0-1.95-2.92" data-v-e5cd6ccd></path><path d="M15.44 3.69A9 9 0 0 0 12 3" data-v-e5cd6ccd></path></g>',1)],H=W({__name:"DButton",props:{class:String,style:[String,Object],icon:String,scale:String,type:String,outline:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["click","contextmenu"],setup(t,{expose:o,emit:n}){const s=t,l=e.useSlots(),a=e.ref(null),i=e.computed(()=>s.icon?R.getters.getIcon(s.icon):null),c=k=>{n("click",k)},r=k=>{n("contextmenu",k)},p=e.computed(()=>s.scale==="large"?"button-lg":s.scale==="small"?"button-sm":""),d=e.computed(()=>s.disabled?"disabled":""),u=k=>!!l[k],_=e.computed(()=>u("default")?"":s.scale==="large"?"d-button-lg-icon":s.scale==="small"?"d-button-sm-icon":"d-button-icon"),b=e.computed(()=>{const k=s.outline?"-outline":"";return s.type==="primary"?`button${k}-blue`:s.type==="success"?`button${k}-green`:s.type==="error"?`button${k}-red`:s.type==="warning"?`button${k}-orange`:s.type==="wait"?`button${k}-violet`:s.outline?`button${k}`:""});return o({elementSize:()=>ke(a)}),(k,N)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"el",ref:a,onClick:c,onContextmenu:r,class:e.normalizeClass(["button",[s.class,p.value,b.value,d.value].join(" ")])},[e.renderSlot(k.$slots,"default",{},void 0,!0),s.loading?(e.openBlock(),e.createElementBlock("svg",ct,dt)):e.createCommentVNode("",!0)],34)),i.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"el",ref:a,onClick:c,onContextmenu:r,class:e.normalizeClass(["button button-ext",[s.class,p.value,_.value,b.value,d.value].join(" ")]),style:e.normalizeStyle(s.style)},[s.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:0,component:i.value,color:"inherit"},null,8,["component"])):e.createCommentVNode("",!0),e.unref(l).default?(e.openBlock(),e.createElementBlock("div",pt,[e.renderSlot(k.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0),s.loading?(e.openBlock(),e.createElementBlock("svg",mt,ut)):e.createCommentVNode("",!0)],38)):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-e5cd6ccd"]]),Qn="",ft={key:0,class:"d-input"},ht={key:0,class:"label"},gt=["type","placeholder"],yt={key:1,class:"d-input",style:{display:"flex","flex-direction":"column"}},_t={key:0,class:"label"},kt={style:{display:"flex","align-items":"flex-end","justify-content":"flex-start"}},bt={style:{flex:"1"}},Bt=["type","placeholder"],St={key:2,class:"d-input",style:{display:"flex","flex-direction":"column"}},xt={key:0,class:"label"},wt={style:{display:"flex","align-items":"flex-end","justify-content":"flex-start"}},Dt={style:{flex:"1"}},$t=["type","placeholder"],Ct=W({__name:"DInput",props:{label:String,placeholder:String,scale:String,modelValue:String,password:Boolean,pre:Object,post:Object,focus:Boolean},emits:["update:modelValue"],setup(t,{expose:o,emit:n}){const s=t,l=e.ref(null),a=e.computed(()=>s.scale==="small"?"d-input-small":s.scale==="large"?"d-input-large":""),i=e.computed({get:()=>s.modelValue,set:r=>{n("update:modelValue",r)}});e.onMounted(()=>{s.focus&&c()});const c=()=>{l.value.focus()};return o({focus:c}),(r,p)=>!s.post&&!s.pre?(e.openBlock(),e.createElementBlock("div",ft,[s.label?(e.openBlock(),e.createElementBlock("div",ht,e.toDisplayString(s.label),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":p[0]||(p[0]=d=>i.value=d),type:s.password?"password":"text",class:e.normalizeClass(a.value),placeholder:s.placeholder,style:{width:"100%"}},null,10,gt),[[e.vModelDynamic,i.value]])])):s.post&&s.post.click&&!s.pre?(e.openBlock(),e.createElementBlock("div",yt,[s.label?(e.openBlock(),e.createElementBlock("div",_t,e.toDisplayString(s.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",kt,[e.createElementVNode("div",bt,[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:l,class:e.normalizeClass(["d-input-post-field",a.value]),"onUpdate:modelValue":p[1]||(p[1]=d=>i.value=d),type:s.password?"password":"text",placeholder:s.placeholder,style:{width:"100%"}},null,10,Bt),[[e.vModelDynamic,i.value]])]),s.post.label?(e.openBlock(),e.createBlock(H,{key:0,scale:s.scale,class:e.normalizeClass(["d-input-post-button",s.post.class]),onClick:s.post.click,icon:s.post.icon},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.post.label),1)]),_:1},8,["scale","onClick","icon","class"])):(e.openBlock(),e.createBlock(H,{key:1,scale:s.scale,class:e.normalizeClass(["d-input-post-button",s.post.class]),onClick:s.post.click,icon:s.post.icon},null,8,["scale","onClick","icon","class"]))])])):!s.post&&s.pre&&s.pre.click?(e.openBlock(),e.createElementBlock("div",St,[s.label?(e.openBlock(),e.createElementBlock("div",xt,e.toDisplayString(s.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",wt,[s.pre.label?(e.openBlock(),e.createBlock(H,{key:0,scale:s.scale,class:e.normalizeClass(["d-input-pre-button",s.pre.class]),onClick:s.pre.click,icon:s.pre.icon},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.pre.label),1)]),_:1},8,["scale","onClick","icon","class"])):(e.openBlock(),e.createBlock(H,{key:1,scale:s.scale,class:e.normalizeClass(["d-input-pre-button",s.pre.class]),onClick:s.pre.click,icon:s.pre.icon},null,8,["scale","onClick","icon","class"])),e.createElementVNode("div",Dt,[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:l,class:e.normalizeClass(["d-input-pre-field",a.value]),"onUpdate:modelValue":p[2]||(p[2]=d=>i.value=d),type:s.password?"password":"text",placeholder:s.placeholder,style:{width:"100%"}},null,10,$t),[[e.vModelDynamic,i.value]])])])])):e.createCommentVNode("",!0)}},[["__scopeId","data-v-a972038a"]]),be={__name:"DBadge",props:{scale:String,type:String,class:String,stress:{type:Boolean,default:!1}},setup(t){const o=t,n=e.computed(()=>o.scale==="large"?"badge-lg":o.scale==="small"?"badge-sm":""),s=e.computed(()=>{const l=o.stress?"-stress":"";return o.type==="primary"?`badge${l}-blue`:o.type==="success"?`badge${l}-green`:o.type==="error"?`badge${l}-red`:o.type==="warning"?`badge${l}-orange`:o.type==="wait"?`badge${l}-violet`:o.stress?`badge${l}-gray`:""});return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["badge",[o.class,n.value,s.value].join(" ")])},[e.renderSlot(l.$slots,"default")],2))}},j="0px",Be={__name:"DCollapse",props:{duration:{type:Number,default:200},easingEnter:{type:String,default:"ease-in-out"},easingLeave:{type:String,default:"ease-in-out"},opacityClosed:{type:Number,default:0},opacityOpened:{type:Number,default:1}},setup(t){const o=t,n=r=>({height:r==null?void 0:r.style.height,width:r==null?void 0:r.style.width,position:r==null?void 0:r.style.position,visibility:r==null?void 0:r.style.visibility,overflow:r==null?void 0:r.style.overflow,paddingTop:r==null?void 0:r.style.paddingTop,paddingBottom:r==null?void 0:r.style.paddingBottom,borderTopWidth:r==null?void 0:r.style.borderTopWidth,borderBottomWidth:r==null?void 0:r.style.borderBottomWidth,marginTop:r==null?void 0:r.style.marginTop,marginBottom:r==null?void 0:r.style.marginBottom}),s=(r,p)=>{const{width:d}=getComputedStyle(r);r.style.width=d,r.style.position="absolute",r.style.visibility="hidden",r.style.height="";let{height:u}=getComputedStyle(r);return r.style.width=p.width,r.style.position=p.position,r.style.visibility=p.visibility,r.style.height=j,r.style.overflow="hidden",p.height&&p.height!==j?p.height:u},l=(r,p,d,u,_)=>{const b=r.animate(u,_);r.style.height=p.height,b.onfinish=()=>{r.style.overflow=p.overflow,d()}},a=(r,p)=>{const d={height:r,opacity:o.opacityOpened,paddingTop:p.paddingTop,paddingBottom:p.paddingBottom,borderTopWidth:p.borderTopWidth,borderBottomWidth:p.borderBottomWidth,marginTop:p.marginTop,marginBottom:p.marginBottom};return Object.keys(d).forEach(u=>(d[u]==null||d[u]==="")&&delete d[u]),[{height:j,opacity:o.opacityClosed,paddingTop:j,paddingBottom:j,borderTopWidth:j,borderBottomWidth:j,marginTop:j,marginBottom:j},d]},i=(r,p)=>{const d=r,u=n(d),_=s(d,u),b=a(_,u),D={duration:o.duration,easing:o.easingEnter};l(d,u,p,b,D)},c=(r,p)=>{const d=r,u=n(d),{height:_}=getComputedStyle(d);d.style.height=_,d.style.overflow="hidden";const b=a(_,u).reverse(),D={duration:o.duration,easing:o.easingLeave};l(d,u,p,b,D)};return(r,p)=>(e.openBlock(),e.createBlock(e.Transition,{css:!1,onEnter:i,onLeave:c},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3}))}},K={data:void 0},re=t=>t.reduce((o,n)=>(o[n]=n)&&o,{}),V=re(["drag","dragend","dragenter","dragleave","dragstart","dragover","drop"]),Et=re(["copy","move","link","none"]),Tt=re(["none","copy","copyLink","copyMove","link","linkMove","move","all","uninitialized"]),Se={__name:"DDrag",props:{draggable:{type:Boolean,default:!0},transferData:{},dropEffect:{validator:t=>t in Et},effectAllowed:{validator:t=>t in Tt},image:String,imageXOffset:{type:Number,default:0},imageYOffset:{type:Number,default:0},hideImageHtml:{type:Boolean,default:!1},tag:{type:String,default:"div"}},setup(t){const o=t,n=e.useSlots(),s=e.ref(!1),l=e.computed(()=>s&&o.transferData),a=e.computed(()=>({position:"fixed",top:"-1000px"})),i=(c,r)=>{const p=r.dataTransfer;if([V.dragenter,V.dragover].includes(c)&&o.dropEffect&&(p.dropEffect=o.dropEffect),c===V.dragstart){if(o.effectAllowed&&(p.effectAllowed=o.effectAllowed),o.image||n.image){let d;o.image?(d=new Image,d.src=o.image):n.image&&(d=n.image[0].elm),p.setDragImage&&p.setDragImage(d,o.imageXOffset,o.imageYOffset)}o.transferData!==void 0&&(K.data=o.transferData,r.dataTransfer.setData("text","")),s.value=!0}};return(c,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{draggable:o.draggable,onDrag:r[0]||(r[0]=p=>i(e.unref(V).drag,p)),onDragstart:r[1]||(r[1]=e.withModifiers(p=>i(e.unref(V).dragstart,p),["stop"])),onDragenter:r[2]||(r[2]=p=>i(e.unref(V).dragenter,p)),onDragleave:r[3]||(r[3]=p=>i(e.unref(V).dragleave,p)),onDragend:r[4]||(r[4]=p=>i(e.unref(V).dragend,p))},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{transferData:l.value}),t.hideImageHtml?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(a.value)},[e.renderSlot(c.$slots,"image",{transferData:l.value})],4)):e.renderSlot(c.$slots,"image",{key:1,transferData:l.value})]),_:3},40,["draggable"]))}},es="",Nt=t=>(e.pushScopeId("data-v-e40122f5"),t=t(),e.popScopeId(),t),Vt={key:0,style:{display:"none"}},Lt={key:1},Mt=[Nt(()=>e.createElementVNode("div",{class:"tree-divider"},null,-1))],It={key:2},zt={class:"tree-divider-header"},Rt={key:3},Ot={class:"item-title"},At={key:0,class:"tree-divider"},Ht={key:1},Ft={style:{display:"flex","flex-direction":"row","justify-content":"flex-end"}},Pt={key:0,class:"sub-menu"},xe=W({__name:"DTreeItem",props:{model:Object,treeId:[String,Number],items:Array,search:String,component:Object},emits:["nodedrop","nodedragover","nodedragleave","nodeclick","nodecontext"],setup(t,{emit:o}){const n=t,s=e.ref(null),l=e.ref(!1),a=e.ref(!1),i=e.ref(!1),c=e.computed(()=>n.model.children&&n.model.children.length),r=e.computed(()=>(g.actions.isTreeExpanded(n.treeId)&&(n.model.expanded=n.model.expanded===void 0?!0:n.model.expanded),n.model.expanded)),p=w=>{o("nodeclick",{event:w,model:n.model})},d=w=>{o("nodeclick",w)},u=w=>{o("nodedrop",w)},_=w=>{o("nodecontext",w)},b=e.computed(()=>(g.actions.isItemSelected(n.treeId,n.model.id)?"selected":"")+(l.value?"node-over ":"")+(a.value?"node-top ":"")+(i.value?"node-bottom ":"")),D=e.computed(()=>n.search?!1:n.model.draggable===!0),k=w=>{o("nodedrop",{e:w,model:n.model});let y=K.data;if(y===void 0||y.model===void 0)return l.value=!1,!1;if(y.model.id===n.model.id||g.actions.isChildOfParent(n.treeId,n.items,n.model.id,y.model.id)||g.actions.isParentOfChild(n.treeId,n.items,y.model.id,n.model.id))return l.value=!1,a.value=!1,i.value=!1,!1;if(!g.state.trees[n.treeId].transfer&&y.id!==n.treeId)return!1;let C="";a.value?C="before":i.value?C="after":C="inside",g.actions.moveTreeNode(y.id,n.treeId,n.items,y.model.id,n.model.id,C),l.value=!1,a.value=!1,i.value=!1},N=w=>{o("nodedragover",{e:w,model:n.model});let y=K.data;if(y===void 0||y.model===void 0)return l.value=!0,!1;if(y.model.id===n.model.id||g.actions.isChildOfParent(n.treeId,n.items,n.model.id,y.model.id)||g.actions.isParentOfChild(n.treeId,n.items,y.model.id,n.model.id))return!1;const C=w.y,L=s.value.getBoundingClientRect().top,M=s.value.getBoundingClientRect().height,h=M/3;C>L&&C<=L+h?(l.value=!1,a.value=!0,i.value=!1):C<L+M&&C>=L+M-h?(l.value=!1,a.value=!1,i.value=!0):(l.value=!0,a.value=!1,i.value=!1)},$=()=>{l.value=!1,a.value=!1,i.value=!1},S=e.computed(()=>n.model.title.startsWith("-")),x=e.computed(()=>{if(n.model.title.startsWith("-")){let[w,...y]=n.model.title.split(" ");return y=y.join(" "),y}return null});return(w,y)=>{const C=e.resolveComponent("d-tree-item",!0),L=e.resolveDirective("touch");return e.unref(g).actions.beforeItem(n.treeId,t.model)?S.value&&!x.value?(e.openBlock(),e.createElementBlock("li",Lt,Mt)):S.value&&x.value?(e.openBlock(),e.createElementBlock("li",It,[e.createElementVNode("div",zt,e.toDisplayString(e.unref(g).actions.renderTitle(n.treeId,x.value)),1)])):n.model.component?(e.openBlock(),e.createElementBlock("li",Rt,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Z).getters.getComponent(n.model.component))))])):(e.openBlock(),e.createBlock(Se,{key:4,tag:"li",class:"tree-item","transfer-data":{id:n.treeId,model:n.model},draggable:D.value,onDrop:e.withModifiers(k,["stop"]),onDragenter:y[1]||(y[1]=e.withModifiers(()=>{},["prevent"])),onDragover:e.withModifiers(N,["prevent","stop"]),onDragleave:e.withModifiers($,["prevent"])},{default:e.withCtx(()=>{var M,h;return[e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"node",ref:s,class:e.normalizeClass(b.value),onContextmenu:y[0]||(y[0]=e.withModifiers(E=>o("nodecontext",{e:E,model:n.model}),["prevent"]))},[e.createElementVNode("div",null,[n.model.icons&&n.model.icons.pre&&c.value&&!n.search&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:0,component:e.unref(R).getters.getIcon(n.model.icons.pre.component),size:18,color:n.model.icons.pre.color?n.model.icons.pre.color:"inherit",class:e.normalizeClass(r.value?"tree-open-pre":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0),n.model.icons&&n.model.icons.pre&&!c.value&&!n.search&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:1,component:e.unref(R).getters.getIcon(n.model.icons.pre.component),size:18,color:"rgba(0,0,0,0)",class:e.normalizeClass(r.value?"tree-open-pre":"")},null,8,["component","class"])):e.createCommentVNode("",!0),n.model.icons&&n.model.icons.icon&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:2,component:e.unref(R).getters.getIcon(n.model.icons.icon.component),color:n.model.icons.icon.color?n.model.icons.icon.color:"inherit",size:n.model.icons.icon.size?n.model.icons.icon.size:null,className:n.model.icons.icon.class?n.model.icons.icon.class:null},null,8,["component","color","size","className"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ot,[S.value?(e.openBlock(),e.createElementBlock("div",At)):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ht,e.toDisplayString(e.unref(g).actions.renderTitle(n.treeId,n.model.title)),1))])]),e.createElementVNode("div",Ft,[((M=n.model.badge)==null?void 0:M.value)!==void 0&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(be),{key:0,class:e.normalizeClass([(h=n.model.badge)==null?void 0:h.class,"badge-sm"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.model.badge.value),1)]),_:1},8,["class"])):e.createCommentVNode("",!0),n.model.icons&&n.model.icons.post&&c.value&&!n.search&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:1,component:e.unref(R).getters.getIcon(n.model.icons.post.component),size:20,color:n.model.icons.post.color?n.model.icons.post.color:"inherit",class:e.normalizeClass(r.value?"tree-open-post":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0)])],34)),[[L,p]]),e.createVNode(Be,null,{default:e.withCtx(()=>[c.value&&r.value&&!n.search?(e.openBlock(),e.createElementBlock("ul",Pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.model.children,E=>(e.openBlock(),e.createBlock(C,{class:"tree-item",key:E.id,model:E,treeId:n.treeId,items:n.items,search:n.search,onNodeclick:d,onNodedrop:u,onNodecontext:_},null,8,["model","treeId","items","search"]))),128))])):e.createCommentVNode("",!0)]),_:1})]}),_:1},8,["transfer-data","draggable","onDrop","onDragover","onDragleave"])):(e.openBlock(),e.createElementBlock("li",Vt))}}},[["__scopeId","data-v-e40122f5"]]);function we(t){return t=t||new Map,{all:t,on(o,n){const s=t.get(o);s?s.push(n):t.set(o,[n])},off(o,n){const s=t.get(o);s&&(n?s.splice(s.indexOf(n)>>>0,1):t.set(o,[]))},emit(o,n){let s=t.get(o);s&&s.slice().map(l=>{l(n)}),s=t.get("*"),s&&s.slice().map(l=>{l(o,n)})}}}const I=we(),g={state:e.reactive({trees:{}}),getters:{getItems(t){return g.state.trees[t].items},getItemsSelect(t){return g.state.trees[t].selected},getParentId(t,o,n,s="id",l="children",a={}){return n&&t&&(t.find(i=>i[s]===n?(a.found=o,i):g.getters.getParentId(i[l],i.id,n,s,l,a)),a.found)?a.found:!1}},mutations:{setTreeItems(t,o){g.state.trees[t].items=o},setItemSelect(t,o){g.state.trees[t].noSelect||(g.state.trees[t].multiSelect?g.state.trees[t].selected.includes(o.id)?g.state.trees[t].selected=g.state.trees[t].selected.filter(function(n){return n!==o.id}):g.state.trees[t].selected=[...g.state.trees[t].selected,o.id]:g.state.trees[t].selected=[o.id])}},actions:{initTreeStore(t,o,n,s,l,a,i){g.state.trees[t]=[],g.state.trees[t].selected=[],g.state.trees[t].noSelect=o,g.state.trees[t].multiSelect=n,g.state.trees[t].expanded=s,g.state.trees[t].transfer=l,g.state.trees[t].renderTitle=a,g.state.trees[t].beforeItem=i},renderTitle(t,o){return g.state.trees[t].renderTitle?g.state.trees[t].renderTitle(o):o},beforeItem(t,o){return g.state.trees[t].beforeItem?g.state.trees[t].beforeItem(o):!0},isItemSelected(t,o){return g.state.trees[t].selected.includes(o)},toggleItem(t,o){o.expanded=o.expanded===void 0||!o.expanded,o.children&&o.children.length&&(o.expanded?I.emit(`expand-${t}`,{id:t,model:o}):I.emit(`collapse-${t}`,{id:t,model:o}))},isTreeExpanded(t){return g.state.trees[t].expanded},isChildOfParent(t,o,n,s){const l=g.actions.deepSearch(o,n);if(l&&l.children){for(let a=0;a<l.children.length;a++)if(l.children[a].id===s)return!0}return!1},isParentOfChild(t,o,n,s){const l=g.actions.deepSearch(o,n);return!!(l&&l.children&&g.actions.deepSearch(l.children,s))},deepSearch(t,o,n="id",s="children",l={}){return o&&t&&(t.find(a=>a[n]===o?(l.found=a,a):g.actions.deepSearch(a[s],o,n,s,l)),l.found)?l.found:!1},deepSearchByTitle(t,o,n="title",s="children",l=[]){if(o&&t&&(t.find(a=>{const i=new RegExp(o,"gi");a[n].toString().toLowerCase().match(i)!==null&&l.push(a),g.actions.deepSearchByTitle(a[s],o,n,s,l)}),l)){for(let a=0;a<l.length;a++);return l}return l},moveTreeNode(t,o,n,s,l,a){const i=g.actions.deleteTreeNode(n,s);g.actions.insertTreeNode(n,l,i,a),I.emit(`move-${o}`,{fromTreeId:t,toTreeId:o,moved:i.id,target:l,position:a})},insertTreeNode(t,o,n,s){if(t)for(let l=0;l<t.length;l++){if(t[l].id===o){let i=l;return s==="after"?(i++,t.splice(i,0,n)):s==="before"?t.splice(i,0,n):s==="inside"&&(Object.hasOwn(t[l],"children")||(t[l].children=[],t[l].opened=!0),t[l].children.splice(0,0,n)),t[l]}const a=this.insertTreeNode(t[l].children,o,n,s);if(a)return a}},deleteTreeNode(t,o){if(t)for(let n=0;n<t.length;n++){if(t[n].id===o){const l=t[n];return t.splice(n,1),l}const s=g.actions.deleteTreeNode(t[n].children,o);if(s)return s}}}},De={__name:"DDrop",props:{tag:{type:String,default:"div"}},emits:Object.keys(V),setup(t,{expose:o,emit:n}){let s=e.reactive({});const l=e.ref("false"),a=e.ref(null),i=new Set,c=e.computed(()=>l.value&&s),r=(d,u)=>{s=K.data,n(d,u,s),d===V.dragenter&&(i.size||u.target===a.value)&&i.add(u.target),d===V.dragleave&&i.delete(u.target),d===V.drop&&i.clear(),l.value=!!i.size};return o({elementSize:()=>ke(a)}),(d,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{ref_key:"el",ref:a,onDragenter:u[0]||(u[0]=_=>r(e.unref(V).dragenter,_)),onDragleave:u[1]||(u[1]=_=>r(e.unref(V).dragleave,_)),onDragover:u[2]||(u[2]=e.withModifiers(_=>r(e.unref(V).dragover,_),["prevent"])),onDrop:u[3]||(u[3]=e.withModifiers(_=>r(e.unref(V).drop,_),["prevent"]))},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"default",{transferData:c.value})]),_:3},544))}},ie={__name:"DMenu",props:{class:String,items:Array,style:[String,Object],noSelect:{type:Boolean,default:!0},renderItemTitle:Function,beforeItem:Function,bodyAsParent:{type:Boolean,default:!0}},emits:["select"],setup(t,{expose:o,emit:n}){const s=t;let l=e.ref(null),a=e.ref(!1);const i=()=>{I.emit("menu-show-request"),a.value=!0},c=()=>{var _;(_=l.value)==null||_.collapseAll(),a.value=!1},r=()=>a.value;I.on("menu-show-request",()=>{c()}),o({show:i,hide:c,elementSize:()=>l.value.elementSize(),isShowed:r,itemsCount:()=>l.value.itemsCount()});const u=_=>{n("select",_),_.model.children||c()};return(_,b)=>{const D=e.resolveDirective("click-outside");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.unref(a)?e.withDirectives((e.openBlock(),e.createBlock(ce,{key:0,ref_key:"treeRef",ref:l,items:s.items,"no-select":s.noSelect,class:e.normalizeClass(s.class),style:e.normalizeStyle(s.style),onSelect:u,"render-title":s.renderItemTitle,"before-item":s.beforeItem},null,8,["items","no-select","class","style","render-title","before-item"])),[[D,()=>c()]]):e.createCommentVNode("",!0)])}}},$e={__name:"DContextMenu",props:{items:Array,renderItemTitle:Function,beforeItem:Function},emits:["select"],setup(t,{expose:o,emit:n}){const s=t,l=e.ref(null),a=e.ref(0),i=e.ref(0),c=e.computed(()=>({left:a.value+"px",top:i.value+"px"})),r=d=>{l.value.show(),e.nextTick(()=>{const u=l.value.elementSize(),_=window.innerWidth,b=window.innerHeight;a.value=_-d.pageX<u.width?d.pageX-u.width:d.pageX,i.value=b-d.pageY<u.height?d.pageY-u.height:d.pageY,l.value.itemsCount()===0&&l.value.hide()})},p=d=>{n("select",d)};return o({show:r}),(d,u)=>(e.openBlock(),e.createBlock(ie,{ref_key:"dMenuRef",ref:l,onSelect:p,items:s.items,style:e.normalizeStyle(c.value),class:"context-menu","no-select":!0,"render-item-title":s.renderItemTitle,"before-item":s.beforeItem},null,8,["items","style","render-item-title","before-item"]))}},ce={__name:"DTree",props:{items:Array,noSelect:Boolean,multiSelect:Boolean,expanded:Boolean,transfer:Boolean,renderTitle:Function,beforeItem:Function,search:String,context:Array,contextClick:{type:Function,default:()=>{}},contextBeforeClick:{type:Function,default:()=>!0}},emits:["select","collapse","expand","move","over","drop"],setup(t,{expose:o,emit:n}){const s=t,l=e.ref(null),a=e.ref(!1),i=e.ref(null),c=e.getCurrentInstance().uid;g.actions.initTreeStore(c,s.noSelect,s.multiSelect,s.expanded,s.transfer,s.renderTitle,s.beforeItem);const r=(h,E)=>{console.log(h,E)};I.on(`expand-${c}`,h=>{n("expand",h)}),I.on(`collapse-${c}`,h=>{n("collapse",h)}),I.on(`move-${c}`,h=>{n("move",h)});const p=e.computed(()=>s.search?g.actions.deepSearchByTitle(s.items,s.search):s.items),d=(h=null)=>{g.mutations.setItemSelect(c,h.model),g.actions.toggleItem(c,h.model),n("select",h)},u=(h=null)=>{n("over",h)},_=(h=null)=>{n("drop",h)},b=()=>l.value.elementSize(),D=()=>{for(let h=0;h<s.items.length;h++)s.items[h].expanded=!0},k=()=>{for(let h=0;h<s.items.length;h++)s.items[h].expanded=!1},N=()=>c,$=h=>g.actions.deepSearch(s.items,h),S=h=>{$(h)&&g.mutations.setItemSelect(c,$(h))},x=h=>{s.contextClick({e:h.e,model:h.model,target:i.value})},w=h=>s.contextBeforeClick({model:h,target:i.value}),y=e.computed(()=>s.context),C=h=>(y.value&&(i.value=h.model,a.value.show(h.e)),!1),L=()=>M(p.value),M=h=>{let E=0;for(let m=0;m<h.length;m++)E+=g.actions.beforeItem(c,h[m])?1:0,h[m].children&&h[m].children.length>0&&(E+=M(h[m].children));return E};return o({elementSize:b,expandAll:D,collapseAll:k,getId:N,getNode:$,selectNode:S,itemsCount:L}),(h,E)=>(e.openBlock(),e.createBlock(De,{ref_key:"treeRef",ref:l,class:"tree",tag:"ul",onDrop:e.withModifiers(r,["stop"])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,m=>(e.openBlock(),e.createBlock(xe,{key:m.id,model:m,treeId:e.unref(c),items:s.items,search:s.search,onNodeclick:d,onNodedragover:u,onNodedrop:_,onNodecontext:C},null,8,["model","treeId","items","search"]))),128)),y.value?(e.openBlock(),e.createBlock($e,{key:0,ref_key:"contextTreeRef",ref:a,items:y.value,onSelect:x,"before-item":w},null,8,["items"])):e.createCommentVNode("",!0)]),_:1},8,["onDrop"]))}},ns="",Wt=W({__name:"DAccordion",props:{items:Array,renderTitle:Function,noSelect:{type:Boolean,default:!0}},setup(t){const o=t;return(n,s)=>(e.openBlock(),e.createBlock(ce,{class:"accordion",items:o.items,"no-select":o.noSelect,"render-title":o.renderTitle},null,8,["items","no-select","render-title"]))}},[["__scopeId","data-v-642edace"]]),Ce={__name:"DLayoutHeader",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:1001},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(t){const o=t,n=e.computed(()=>{const{fixed:s,zIndex:l,minWidth:a,height:i,paddingLeft:c,transitionDuration:r,transitionTimingFunction:p}=o,d=s?"fixed":"static",u=o.useMinWidthLayout?`min-width:${a}px;`:"";return`position:${d};z-index:${l};${u}height:${i}px;padding-left:${c}px;transition-duration:${r}ms;transition-timing-function:${p};`});return(s,l)=>(e.openBlock(),e.createElementBlock("header",{class:"d-layout-header",style:e.normalizeStyle(n.value)},[e.renderSlot(s.$slots,"default")],4))}},Ee={__name:"DLayoutTab",props:{fixed:{type:Boolean,default:!0},top:{type:Number,default:56},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(t){const o=t,n=e.computed(()=>{const{fixed:s,top:l,zIndex:a,minWidth:i,height:c,paddingLeft:r,transitionDuration:p,transitionTimingFunction:d}=o,u=s?"fixed":"static",_=o.useMinWidthLayout?`min-width: ${i}px;`:"";return`position:${u};top:${l}px;z-index:${a};${_}height:${c}px;padding-left:${r}px;transition-duration:${p}ms;transition-timing-function:${d};`});return(s,l)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout-tab",style:e.normalizeStyle(n.value)},[e.renderSlot(s.$slots,"default")],4))}},Te={__name:"DLayoutFooter",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(t){const o=t,n=e.computed(()=>{const{fixed:s,zIndex:l,minWidth:a,height:i,paddingLeft:c,transitionDuration:r,transitionTimingFunction:p}=o,d=s?"fixed":"static",u=o.useMinWidthLayout?`min-width:${a}px;`:"";return`position:${d};z-index:${l};${u}height:${i}px;padding-left:${c}px;transition-duration:${r}ms;transition-timing-function:${p};`});return(s,l)=>(e.openBlock(),e.createElementBlock("footer",{class:"d-layout-footer",style:e.normalizeStyle(n.value)},[e.renderSlot(s.$slots,"default")],4))}},Ne={__name:"DLayoutSidebar",props:{zIndex:{type:Number,default:1002},width:{type:Number,default:200},paddingTop:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1}},setup(t){const o=t,n=e.computed(()=>{const{zIndex:s,width:l,paddingTop:a,transitionDuration:i,transitionTimingFunction:c}=o;return`z-index:${s};width:${l}px;padding-top:${a}px;transition-duration:${i}ms;transition-timing-function:${c};`});return(s,l)=>(e.openBlock(),e.createElementBlock("aside",{class:"d-layout-sidebar",style:e.normalizeStyle(n.value)},[e.renderSlot(s.$slots,"default")],4))}},Ve={__name:"DLayoutContent",props:{paddingTop:{type:Number,default:0},paddingBottom:{type:Number,default:0},paddingLeft:{type:Number,default:0},overflowHidden:Boolean,transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"}},setup(t){const o=t,n=e.computed(()=>{const{paddingTop:s,paddingBottom:l,paddingLeft:a,transitionDuration:i,transitionTimingFunction:c}=o,r=`overflow:${o.overflowHidden?"hidden":"visible"};`;return`padding-top:${s}px;padding-bottom:${l}px;padding-left:${a}px;${r}transition-duration:${i}ms;transition-timing-function:${c};`});return(s,l)=>(e.openBlock(),e.createElementBlock("main",{style:e.normalizeStyle(n.value),class:"d-layout-content"},[e.renderSlot(s.$slots,"default")],4))}};function jt(t){const o=e.ref(0),n=e.computed(()=>`transform: translateX(${-o.value}px);`);let s=!1;function l(d){o.value=d}function a(){var d;const u=((d=document.scrollingElement)===null||d===void 0?void 0:d.scrollLeft)||0;l(u)}function i(){a()}function c(){document.addEventListener("scroll",a)}function r(){s&&document.removeEventListener("scroll",a)}function p(){i(),c(),s=!0}return e.watch(t,d=>{d?p():r()},{immediate:!0}),e.onUnmounted(()=>{r()}),n}const Xt=1001,Yt=999,Ut=998,qt={__name:"DLayoutAdmin",props:{mode:{type:String,default:"vertical"},isMobile:{type:Boolean,default:!1},useMinWidthLayout:{type:Boolean,default:!1},minWidth:{type:Number,default:1200},headerVisible:{type:Boolean,default:!0},headerHeight:{type:Number,default:56},tabVisible:{type:Boolean,default:!0},tabHeight:{type:Number,default:44},fixedHeaderAndTab:{type:Boolean,default:!0},addMainOverflowHidden:{type:Boolean,default:!1},footerVisible:{type:Boolean,default:!0},footerHeight:{type:Number,default:48},fixedFooter:{type:Boolean,default:!0},sidebarVisible:{type:Boolean,default:!0},sidebarWidth:{type:Number,default:200},sidebarCollapsedWidth:{type:Number,default:0},sidebarCollapse:{type:Boolean,default:!1},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1},maskBg:{type:String,default:"rgba(0,0,0,0.3)"}},emits:["update:sidebar-collapse","sidebar-mask-click"],setup(t,{emit:o}){const n=t,s=e.computed(()=>n.useMinWidthLayout?`min-width:${n.minWidth}px;`:""),l=e.computed(()=>n.useMinWidthLayout&&(n.fixedHeaderAndTab||n.fixedFooter)),a=jt(l),i=e.computed(()=>n.fixedHeaderAndTab?a.value:""),c=e.computed(()=>n.fixedFooter?a.value:""),r=e.computed(()=>{const{transitionDuration:y,transitionTimingFunction:C}=n;return{transitionDuration:y,transitionTimingFunction:C}}),p=e.computed(()=>n.mode==="vertical"),d=e.computed(()=>n.isMobile||p.value?1003:1e3),u=e.computed({get(){return n.sidebarCollapse},set(y){o("update:sidebar-collapse",y)}});function _(){o("sidebar-mask-click")}const b=e.computed(()=>n.isMobile&&!u.value),D=e.computed(()=>{const{transitionDuration:y,transitionTimingFunction:C}=n;return`background-color:${n.maskBg};transition-duration:${y}ms;transition-timing-function:${C};`}),k=e.computed(()=>{const{sidebarWidth:y,sidebarCollapsedWidth:C}=n,L=n.isMobile?0:C,M=u.value?L:y;return n.sidebarVisible?M:0}),N=e.computed(()=>n.isMobile?0:k.value),$=e.computed(()=>p.value?N.value:0),S=e.computed(()=>!n.isMobile&&!p.value&&n.headerVisible?n.headerHeight:0),x=e.computed(()=>{let y=0;return n.fixedHeaderAndTab&&(n.headerVisible&&(y+=n.headerHeight),n.tabVisible&&(y+=n.tabHeight)),y}),w=e.computed(()=>n.fixedFooter&&n.footerVisible?n.footerHeight:0);return(y,C)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout",style:e.normalizeStyle(s.value)},[t.headerVisible?(e.openBlock(),e.createBlock(Ce,e.mergeProps({key:0},r.value,{fixed:t.fixedHeaderAndTab,"z-index":Xt,"min-width":t.minWidth,height:t.headerHeight,"padding-left":$.value,style:i.value}),{default:e.withCtx(()=>[e.renderSlot(y.$slots,"header")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0),t.tabVisible?(e.openBlock(),e.createBlock(Ee,e.mergeProps({key:1},r.value,{fixed:t.fixedHeaderAndTab,"z-index":Yt,"min-width":t.minWidth,top:t.headerHeight,height:t.tabHeight,"padding-left":N.value,style:i.value}),{default:e.withCtx(()=>[e.renderSlot(y.$slots,"tab")]),_:3},16,["fixed","min-width","top","height","padding-left","style"])):e.createCommentVNode("",!0),t.sidebarVisible?(e.openBlock(),e.createBlock(Ne,e.mergeProps({key:2},r.value,{"z-index":d.value,width:k.value,"padding-top":S.value}),{default:e.withCtx(()=>[e.renderSlot(y.$slots,"sidebar")]),_:3},16,["z-index","width","padding-top"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"d-layout-sidebar-mask",style:e.normalizeStyle(D.value),onClick:_},null,4)):e.createCommentVNode("",!0),e.createVNode(Ve,e.mergeProps(r.value,{"padding-top":x.value,"padding-bottom":w.value,"padding-left":N.value,"overflow-hidden":t.addMainOverflowHidden}),{default:e.withCtx(()=>[e.renderSlot(y.$slots,"default")]),_:3},16,["padding-top","padding-bottom","padding-left","overflow-hidden"]),t.footerVisible?(e.openBlock(),e.createBlock(Te,e.mergeProps({key:4},r.value,{fixed:t.fixedFooter,"z-index":Ut,"min-width":t.minWidth,height:t.footerHeight,"padding-left":N.value,style:c.value}),{default:e.withCtx(()=>[e.renderSlot(y.$slots,"footer")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0)],4))}},U={state:e.reactive({theme:"dark"}),getters:{theme(){return U.state.theme}},mutations:{setTheme(t){U.state.theme=t,document.documentElement.classList.remove("dark"),document.documentElement.classList.remove("light"),document.documentElement.classList.add(t)}},actions:{toggleTheme(){U.state.theme=U.state.theme==="dark"?"light":"dark",document.documentElement.classList.remove("dark"),document.documentElement.classList.remove("light"),document.documentElement.classList.add(U.state.theme)}}},Gt={__name:"DConfigProvider",props:{theme:{type:String,default:"dark"}},setup(t){const o=t;return U.mutations.setTheme(o.theme),(n,s)=>e.renderSlot(n.$slots,"default")}},ls="",Zt={__name:"DScrollProvider",props:{xHide:{type:Boolean,default:!0},yHide:{type:Boolean,default:!1}},setup(t){const o=t;e.useCssVars(a=>({e35a6f9a:n.value,e35a6f98:s.value}));const n=e.computed(()=>o.xHide?"hidden":"visible"),s=e.computed(()=>o.yHide?"hidden":"visible"),l=a=>{document.body.classList.add(a),document.documentElement.classList.add(a),document.documentElement.classList.add("d-global-scroll")};return e.onMounted(()=>{l("colored-scroller")}),(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.renderSlot(a.$slots,"default")]))}},as="",Kt=W({__name:"DScroll",props:{autoHide:{type:Boolean,default:!0},xHide:{type:Boolean,default:!0},yHide:{type:Boolean,default:!1}},setup(t){const o=t;e.useCssVars(l=>({c07fa29a:n.value,c07fa298:s.value}));const n=e.computed(()=>o.xHide?"hidden":"visible"),s=e.computed(()=>o.yHide?"hidden":"visible");return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(o.autoHide?"d-scroll-hide":"d-scroll")},[e.renderSlot(l.$slots,"default",{},void 0,!0)],2))}},[["__scopeId","data-v-d50b3609"]]),Jt={class:"modal-content"},Qt={class:"modal-header"},vt={class:"modal-title"},eo={class:"modal-body"},to={class:"modal-footer"},de={__name:"DModal",props:{show:Boolean,width:String,maxWidth:String},emits:["open","close"],setup(t,{expose:o,emit:n}){const s=t,l=e.ref(null),a=e.ref(!1);a.value=s==null?void 0:s.show;const i=()=>{a.value=!0,n("open",l)},c=()=>{a.value=!1,n("close",l)};return o({show:i,hide:c}),(r,p)=>{const d=e.resolveDirective("keydown");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[a.value?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"modalRef",ref:l,class:"modal"},[e.createElementVNode("div",{class:"modal-dialog",style:e.normalizeStyle({width:s.width,maxWidth:s.maxWidth})},[e.createElementVNode("div",Jt,[e.createElementVNode("div",Qt,[e.createElementVNode("h5",vt,[e.renderSlot(r.$slots,"modal-title")])]),e.createElementVNode("div",eo,[e.renderSlot(r.$slots,"default")]),e.createElementVNode("div",to,[e.renderSlot(r.$slots,"modal-footer")])])],4)])),[[d,c,"Escape"]]):e.createCommentVNode("",!0)]),_:3})])}}},q=e.shallowRef();function pe(t){t===void 0&&(t=q.value.comp.returnValue()),q.value.resolve(t),q.value=null}function Le(t,o,n="default"){return new Promise(s=>{q.value={dialog:t,props:o,wrapper:n,resolve:s}})}var oo=(t,o)=>{const n=t.__vccOpts||t;for(const[s,l]of o)n[s]=l;return n};const no=e.defineComponent({name:"DialogWrapper",components:{},props:{name:{type:String,default:"default"},transitionAttrs:Object},setup(){const t=e.ref();return e.watch(t,()=>{q.value&&(q.value.comp=t.value)}),{dialogRef:q,dialogInstance:t}}});function so(t,o,n,s,l,a){return e.openBlock(),e.createBlock(e.Transition,e.normalizeProps(e.guardReactiveProps(t.transitionAttrs)),{default:e.withCtx(()=>[t.dialogRef&&t.dialogRef.wrapper===t.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.dialogRef.dialog),e.mergeProps({key:0},t.dialogRef.props,{ref:"dialogInstance"}),null,16)):e.createCommentVNode("",!0)]),_:1},16)}var lo=oo(no,[["render",so]]);const ao={style:{display:"flex","flex-direction":"row","justify-content":"center",gap:"5px"}},Me={__name:"DAlertDialog",props:{title:String,message:String},setup(t,{expose:o}){const n=t;return o({returnValue:()=>!0}),(l,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(de,{show:!0},{"modal-title":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.message),1)]),"modal-footer":e.withCtx(()=>[e.createElementVNode("div",ao,[e.createVNode(H,{onClick:a[0]||(a[0]=i=>e.unref(pe)())},{default:e.withCtx(()=>[e.createTextVNode("Закрыть")]),_:1})])]),_:1})]))}},ro={style:{display:"flex","flex-direction":"row","justify-content":"center",gap:"5px"}},Ie={__name:"DConfirmDialog",props:{title:String,message:String},setup(t,{expose:o}){const n=t;return o({returnValue:()=>!0}),(l,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(de,{show:!0},{"modal-title":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.message),1)]),"modal-footer":e.withCtx(()=>[e.createElementVNode("div",ro,[e.createVNode(H,{onClick:a[0]||(a[0]=i=>e.unref(pe)())},{default:e.withCtx(()=>[e.createTextVNode("Да")]),_:1}),e.createVNode(H,{class:"button-red",onClick:a[1]||(a[1]=i=>e.unref(pe)(!1))},{default:e.withCtx(()=>[e.createTextVNode("Нет")]),_:1})])]),_:1})]))}},io={class:"dropdown"},co={__name:"DDropdown",props:{class:String,icon:{type:[String,null],default:null},items:Array,menuStyle:Object,renderItemTitle:Function,beforeItem:Function,type:String,bodyAsParent:{type:Boolean,default:!0}},emits:["select","click"],setup(t,{expose:o,emit:n}){const s=t,l=e.useSlots(),a=e.ref(null),i=e.ref(null),c=e.ref(0),r=e.ref(0),p=b=>{if(n("click",b),a.value.isShowed()){a.value.hide();return}a.value.show(),e.nextTick(()=>{const D=a.value.elementSize(),k=i.value.elementSize(),N=window.innerWidth,$=window.innerHeight;c.value=N-(k.x+k.width)<D.width?k.left-D.width+k.width:k.left,r.value=$-(k.y+k.height)<D.height?k.top-D.height-5:k.height+k.top+5})},d=b=>{n("select",b)},u=e.computed(()=>({left:c.value+"px",top:r.value+"px",position:s.bodyAsParent?"absolute":"fixed",...s.menuStyle}));o({show:p});const _=b=>!!l[b];return(b,D)=>(e.openBlock(),e.createElementBlock("div",io,[_("default")?(e.openBlock(),e.createBlock(H,{key:0,ref_key:"buttonRef",ref:i,class:e.normalizeClass(s.class),icon:s.icon,onClick:e.withModifiers(p,["stop","prevent"]),type:s.type},{default:e.withCtx(()=>[e.renderSlot(b.$slots,"default")]),_:3},8,["class","icon","onClick","type"])):(e.openBlock(),e.createBlock(H,{key:1,ref_key:"buttonRef",ref:i,class:e.normalizeClass(s.class),icon:s.icon,onClick:e.withModifiers(p,["stop","prevent"]),type:s.type},null,8,["class","icon","onClick","type"])),e.createVNode(ie,{ref_key:"dMenuRef",ref:a,items:s.items,class:"dropdown-menu",style:e.normalizeStyle(u.value),"no-select":!0,onSelect:d,"render-item-title":s.renderItemTitle,"before-item":s.beforeItem,"body-as-parent":s.bodyAsParent},null,8,["items","style","render-item-title","before-item","body-as-parent"])]))}},po={},mo={class:"d-panel"};function uo(t,o){return e.openBlock(),e.createElementBlock("div",mo,[e.renderSlot(t.$slots,"default")])}const ze=W(po,[["render",uo]]),fo={class:"card-header"},ho={class:"modal-title"},go={class:"card-body"},yo={class:"card-footer"},_o={__name:"DCard",setup(t){return(o,n)=>(e.openBlock(),e.createBlock(ze,{class:"d-card"},{default:e.withCtx(()=>[e.createElementVNode("div",fo,[e.createElementVNode("h5",ho,[e.renderSlot(o.$slots,"title")])]),e.createElementVNode("div",go,[e.renderSlot(o.$slots,"default")]),e.createElementVNode("div",yo,[e.renderSlot(o.$slots,"footer")])]),_:3}))}},ko=new Map;class bo{constructor(o,n,s){this.remaining=n,this.callback=o,this.notifyItem=s,this.resume()}pause(){clearTimeout(this.notifyItem.timer),this.remaining-=Date.now()-this.start}resume(){this.start=Date.now(),clearTimeout(this.notifyItem.timer),this.notifyItem.timer=setTimeout(this.callback,this.remaining)}}const me="[-+]?[0-9]*.?[0-9]+",Re=[{name:"px",regexp:new RegExp(`^${me}px$`)},{name:"%",regexp:new RegExp(`^${me}%$`)},{name:"px",regexp:new RegExp(`^${me}$`)}],Bo=t=>{if(t==="auto")return{type:t,value:0};for(let o=0;o<Re.length;o++){const n=Re[o];if(n.regexp.test(t))return{type:n.name,value:parseFloat(t)}}return{type:"",value:t}},So=t=>{switch(typeof t){case"number":return{type:"px",value:t};case"string":return Bo(t);default:return{type:"",value:t}}},Oe={x:new Set(["left","center","right"]),y:new Set(["top","bottom"])},xo=(t=>()=>t++)(0),wo=t=>typeof t!="string"?[]:t.split(/\s+/gi).filter(Boolean),Do=t=>{typeof t=="string"&&(t=wo(t));let o=null,n=null;return t.forEach(s=>{Oe.y.has(s)&&(n=s),Oe.x.has(s)&&(o=s)}),{x:o,y:n}},ue={position:["top","right"],cssAnimation:"fade",velocityAnimation:{enter:t=>({height:[t.clientHeight,0],opacity:[1,0]}),leave:{height:0,opacity:[0,1]}}},$o={__name:"VelocityGroup",emits:["enter","leave","after-leave"],setup(t,{emit:o}){const n=(a,i)=>{o("enter",a,i)},s=(a,i)=>{o("leave",a,i)},l=()=>{o("after-leave")};return(a,i)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{tag:"span",css:!1,onEnter:n,onLeave:s,onAfterLeave:l},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3}))}},Co=Object.assign({inheritAttrs:!1},{__name:"CssGroup",props:{name:String},setup(t){const o=t;return(n,s)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{tag:"span",name:o.name},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},8,["name"]))}}),Eo=["data-id"],To=["onClick"],No=["innerHTML"],Vo=["innerHTML"],Lo={key:0,class:"d-notification-title"},Mo={class:"notification-content"},Io={__name:"DNotificationProvider",props:{group:{type:String,default:""},width:{type:[String,Number],default:300},reverse:{type:Boolean,default:!1},position:{type:[String,Array,null],default:ue.position},classes:{type:String,default:"d-notification"},animationType:{type:String,default:"css"},animation:{type:[String,Object],default:ue.velocityAnimation},animationName:{type:String,default:ue.cssAnimation},speed:{type:Number,default:300},duration:{type:Number,default:3e3},delay:{type:Number,default:0},max:{type:Number,default:1/0},ignoreDuplicates:{type:Boolean,default:!1},closeOnClick:{type:Boolean,default:!0},pauseOnHover:{type:Boolean,default:!1},dangerouslySetInnerHtml:{type:Boolean,default:!1}},emits:["click","destroy","start"],setup(t,{emit:o}){const n=t,s={IDLE:0,DESTROYED:2},l=e.ref([]),a=e.ref(null),i=e.ref(ko.get("velocity")),c=e.computed(()=>n.animationType==="velocity"),r=e.computed(()=>c.value?$o:Co),p=e.computed(()=>l.value.filter(m=>m.state!==s.DESTROYED)),d=e.computed(()=>So(n.width)),u=e.computed(()=>{const{x:m,y:T}=Do(n.position),B=d.value.value,A=d.value.type,X={width:B+A};return T&&(X[T]="0px"),m&&(m==="center"?X.left=`calc(50% - ${+B/2}${A})`:X[m]="0px"),X}),_=e.computed(()=>"bottom"in u.value),b=m=>{o("click",m),n.closeOnClick&&w(m)},D=()=>{var m;n.pauseOnHover&&((m=a.value)==null||m.pause())},k=()=>{var m;n.pauseOnHover&&((m=a.value)==null||m.resume())},N=m=>{if(m.group||(m.group=""),m.data||(m.data={}),n.group!==m.group)return;if(m.clean||m.clear){C();return}const T=typeof m.duration=="number"?m.duration:n.duration,B=typeof m.speed=="number"?m.speed:n.speed,A=typeof m.ignoreDuplicates=="boolean"?m.ignoreDuplicates:n.ignoreDuplicates,{title:X,text:te,type:oe,data:ne,id:se}=m,P={id:se||xo(),title:X,text:te,type:oe,state:s.IDLE,speed:B,length:T+2*B,data:ne};T>=0&&(a.value=new bo(()=>w(P),P.length,P));const le=n.reverse?!_.value:_.value;let G=-1;const ae=p.value.some(J=>J.title===m.title&&J.text===m.text);(!A||!ae)&&(le?(l.value.push(P),o("start",P),p.value.length>n.max&&(G=0)):(l.value.unshift(P),o("start",P),p.value.length>n.max&&(G=p.value.length-1)),G!==-1&&w(p.value[G]))},$=m=>{y(m)},S=m=>["d-notification-template",n.classes,m.type||""],x=m=>c.value?void 0:{transition:`all ${m.speed}ms`},w=m=>{clearTimeout(m.timer),m.state=s.DESTROYED,E(),o("destroy",m)},y=m=>{const T=l.value.find(B=>B.id===m);T&&w(T)},C=()=>{p.value.forEach(w)},L=(m,T)=>{var A;const B=(A=n.animation)==null?void 0:A[m];return typeof B=="function"?B(T):B},M=(m,T)=>{if(!c.value)return;const B=L("enter",m);i.value(m,B,{duration:n.speed,complete:T})},h=(m,T)=>{if(!c.value)return;const B=L("leave",m);i.value(m,B,{duration:n.speed,complete:T})};function E(){l.value=l.value.filter(m=>m.state!==s.DESTROYED)}return e.onMounted(()=>{I.on("notification-add",N),I.on("notification-close",$)}),(m,T)=>(e.openBlock(),e.createElementBlock("div",{class:"d-notification-group",style:e.normalizeStyle(u.value)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{name:t.animationName,onEnter:M,onLeave:h,onAfterLeave:E},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,B=>(e.openBlock(),e.createElementBlock("div",{key:B.id,class:"d-notification-wrapper",style:e.normalizeStyle(x(B)),"data-id":B.id,onMouseenter:D,onMouseleave:k},[e.renderSlot(m.$slots,"body",{class:e.normalizeClass([t.classes,B.type]),item:B,close:()=>w(B)},()=>[e.createElementVNode("div",{class:e.normalizeClass(S(B)),onClick:A=>b(B)},[t.dangerouslySetInnerHtml?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[B.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:"d-notification-title",innerHTML:B.timer},null,8,No)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"notification-content",innerHTML:B.text},null,8,Vo)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[B.title?(e.openBlock(),e.createElementBlock("div",Lo,e.toDisplayString(B.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Mo,e.toDisplayString(B.text),1)],64))],10,To)])],44,Eo))),128))]),_:3},40,["name"]))],4))}},zo={class:"d-info-progress-icon-container"},Ro={class:"d-info-progress-icon"},Oo={class:"d-info-progress-data-container"},Ao=["innerHTML"],Ho={__name:"DInfoProgress",props:{style:[String,Object],label:String,progress:Number,icon:String,type:String},emits:["click"],setup(t,{emit:o}){const n=t,s=e.computed(()=>n.icon?R.getters.getIcon(n.icon):null);return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["d-info-progress",n.type?`d-info-progress-${n.type}`:null]),style:e.normalizeStyle(n.style),onClick:a[0]||(a[0]=i=>{o("click",i)})},[e.createElementVNode("div",zo,[e.createElementVNode("div",Ro,[n.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:0,component:s.value,color:"inherit",size:17},null,8,["component"])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Oo,[e.createElementVNode("div",{class:"d-info-progress-line",style:e.normalizeStyle("width: "+n.progress+"%;")},null,4),e.createElementVNode("div",{class:"d-info-progress-label",innerHTML:t.label},null,8,Ao)])],6))}},Fo={class:"d-checkbox"},Po=["id","checked","disabled"],Wo=["for"],jo={__name:"DCheckbox",props:{label:String,modelValue:Boolean,disabled:{type:Boolean,default:!1},change:Function,checked:Boolean},emits:["update:modelValue"],setup(t,{emit:o}){const n=t,l=e.getCurrentInstance().uid,a=e.computed({get:()=>n.modelValue,set:i=>{o("update:modelValue",i)}});return(i,c)=>(e.openBlock(),e.createElementBlock("div",Fo,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":c[0]||(c[0]=r=>a.value=r),id:`i-${e.unref(l)}`,type:"checkbox",checked:n.checked,disabled:n.disabled,onChange:c[1]||(c[1]=(...r)=>n.change&&n.change(...r))},null,40,Po),[[e.vModelCheckbox,a.value]]),e.createElementVNode("label",{for:`i-${e.unref(l)}`},e.toDisplayString(n.label),9,Wo)]))}};async function Ae(t,o){return await Le(Ie,{title:t,message:o})}async function He(t,o){return await Le(Me,{title:t,message:o})}const Xo={__name:"DDialogProvider",setup(t){return window.alert=He,window.confirm=Ae,(o,n)=>(e.openBlock(),e.createBlock(e.unref(lo)))}},Yo={class:"d-select"},Uo={key:0,class:"label"},qo=["value","selected","disabled"],Go={__name:"DSelect",props:{label:String,size:String,options:Array,modelValue:String,scale:String},emits:["update:modelValue"],setup(t,{emit:o}){const n=t,s=e.computed(()=>n.scale?"d-select-"+n.scale:""),l=e.computed({get:()=>n.modelValue,set:a=>{o("update:modelValue",a)}});for(let a=0;a<n.options.length;a++)if(n.options[a].selected){l.value=n.options[a].value;break}return(a,i)=>(e.openBlock(),e.createElementBlock("div",Yo,[n.label?(e.openBlock(),e.createElementBlock("div",Uo,e.toDisplayString(n.label),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":i[0]||(i[0]=c=>l.value=c),class:e.normalizeClass(s.value),style:e.normalizeStyle(n.size==="wide"?"width:100%":"")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.options,(c,r)=>(e.openBlock(),e.createElementBlock("option",{key:r,value:c.value,selected:c.selected,disabled:c.disabled},e.toDisplayString(c.label),9,qo))),128))],6),[[e.vModelSelect,l.value]])]))}},Zo=["title"],Ko=["title"],Jo={__name:"DTabLabel",props:{tab:Object},setup(t){const o=t;return(n,s)=>o.tab.label?(e.openBlock(),e.createElementBlock("span",{key:0,title:o.tab.title?o.tab.title:""},e.toDisplayString(o.tab.label),9,Zo)):o.tab.icon?(e.openBlock(),e.createElementBlock("span",{key:1,title:o.tab.title?o.tab.title:""},[e.createVNode(e.unref(Y),{component:o.tab.icon},null,8,["component"])],8,Ko)):e.createCommentVNode("",!0)}},is="",Qo={class:"d-tabs"},vo=W({__name:"DTabs",props:{tabs:Array},setup(t){const o=t,n=e.toRef(o,"tabs"),s=e.ref(0),l=a=>{s.value=a};return(a,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Qo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(c,r)=>(e.openBlock(),e.createBlock(Jo,{index:r,tab:c,class:e.normalizeClass(["d-tab-title",r===s.value?"active":""]),onClick:p=>l(r)},null,8,["index","tab","class","onClick"]))),256))]),(e.openBlock(),e.createBlock(e.KeepAlive,null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value[s.value].component)))],1024))],64))}},[["__scopeId","data-v-c98761cd"]]),ds="",en={class:"d-grid"},tn=W({__name:"DGrid",props:{gap:{type:String,default:"1em"},colXs:{type:String,default:"repeat(1, 1fr)"},colSm:String,colMd:String,colLg:String,colXl:String,colXxl:String},setup(t){const o=t;e.useCssVars(d=>({"09eba472":r[0],"09eba434":r[1],"09eba3f6":r[2],"09eba3b8":r[3],"09eba37a":r[4],"09eba33c":r[5],"898eb2ac":o.gap}));const{colXs:n,colSm:s,colMd:l,colLg:a,colXl:i,colXxl:c}=e.toRefs(o),r=[n.value,s.value,l.value,a.value,i.value,c.value];let p=null;for(let d=0;d<r.length;d++)p||(p=r[0]),d>0&&(r[d]?p=r[d]:r[d]=p);return(d,u)=>(e.openBlock(),e.createElementBlock("div",en,[e.renderSlot(d.$slots,"default",{},void 0,!0)]))}},[["__scopeId","data-v-b45e8130"]]),on=["src","alt","title"],nn={__name:"DImage",props:{src:String,srcFail:String,alt:String,title:String,width:String,height:String,radius:String},setup(t){const o=t,n=e.ref(null),s=new Image;return s.onload=()=>{n.value=s.src},s.onerror=()=>{n.value=o.srcFail},e.onMounted(()=>{s.src=o.src}),(l,a)=>n.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.value,alt:o.alt,title:o.title,style:e.normalizeStyle({width:o.width,height:o.height,borderRadius:o.radius})},null,12,on)):e.createCommentVNode("",!0)}},ms="",sn={class:"d-textarea"},ln={key:0,class:"label"},an=["rows","cols","placeholder"],rn=W({__name:"DTextarea",props:{label:String,placeholder:String,scale:String,modelValue:String,rows:{type:Number,default:3},cols:{type:Number,default:null},focus:Boolean},emits:["update:modelValue"],setup(t,{expose:o,emit:n}){const s=t,l=e.ref(null),a=e.computed(()=>s.scale==="small"?"d-textarea-small":s.scale==="large"?"d-textarea-large":""),i=e.computed({get:()=>s.modelValue,set:r=>{n("update:modelValue",r)}});e.onMounted(()=>{s.focus&&c()});const c=()=>{l.value.focus()};return o({focus:c}),(r,p)=>(e.openBlock(),e.createElementBlock("div",sn,[s.label?(e.openBlock(),e.createElementBlock("div",ln,e.toDisplayString(s.label),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("textarea",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":p[0]||(p[0]=d=>i.value=d),rows:s.rows,cols:s.cols,placeholder:s.placeholder,class:e.normalizeClass(a.value),style:{width:"100%"}},null,10,an),[[e.vModelText,i.value]])]))}},[["__scopeId","data-v-0e805d5d"]]);class cn{constructor(o){this.fields=o}validate(){let o=!1;for(let n in this.fields)this.fields[n].ref.value.validate()===!0&&(o=!0);return!o}}class dn{validate(o,n="https"){return this._isValidURL(o)||(o=n+"://"+o),this._isValidURL(o)}message(o,n){let s="";switch(o){case"url":s=n;break}return s}_isValidURL(o){try{return new URL(o),!0}catch{return!1}}}const pn=new dn;class mn{validate(o=""){return o!==""}message(o){return o}}const un=new mn;class fn{validate(o="",n=0){return o.length>=n}message(o){return o}}const hn=new fn;class gn{validate(o="",n=0){return o.length<=n}message(o){return o}}const yn=new gn;class _n{validate(o){return/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/.test(o)}message(o){return o}}const kn=new _n;class bn{validate(o){return!isNaN(parseFloat(o))&&!isNaN(o-0)}message(o){return o}}const Bn=new bn,z={RulesUrl:pn,RulesRequired:un,RulesMin:hn,RulesMax:yn,RulesEmail:kn,RulesNumber:Bn};class Sn{validate(o,n){var l,a,i,c,r,p,d,u,_,b,D,k,N,$;let s="";if(n){let S=!1;for(let x in n)if(!S)switch(x){case"url":s=z.RulesUrl.validate(o,"https")||o.length===0?"":z.RulesUrl.message("url",(l=n[x])!=null&&l.message?(a=n[x])==null?void 0:a.message:"url_incorrect"),S=s!=="";break;case"required":s=z.RulesRequired.validate(o)?"":z.RulesRequired.message((i=n[x])!=null&&i.message?(c=n[x])==null?void 0:c.message:"required"),S=s!=="";break;case"min":s=z.RulesMin.validate(o,(r=n[x])==null?void 0:r.value)?"":z.RulesMin.message((p=n[x])!=null&&p.message?(d=n[x])==null?void 0:d.message:"very_small"),S=s!=="";break;case"max":s=z.RulesMax.validate(o,(u=n[x])==null?void 0:u.value)?"":z.RulesMax.message((_=n[x])!=null&&_.message?(b=n[x])==null?void 0:b.message:"vary_large"),S=s!=="";break;case"email":s=z.RulesEmail.validate(o)?"":z.RulesMax.message((D=n[x])!=null&&D.message?(k=n[x])==null?void 0:k.message:"email_incorrect"),S=s!=="";break;case"number":s=z.RulesNumber.validate(o)?"":z.RulesNumber.message((N=n[x])!=null&&N.message?($=n[x])==null?void 0:$.message:"number_incorrect"),S=s!=="";break}}return s}}const xn=new Sn,wn={style:{display:"flex","flex-direction":"column"}},Dn={key:0,class:"d-label"},$n={key:0,class:"text-red"},Cn={style:{display:"flex","flex-direction":"row"}},En={style:{flex:"1",position:"relative"}},Tn=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{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",fill:"currentColor"})],-1)],Nn=["id","type","placeholder","disabled"],Vn=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{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",fill:"currentColor"})],-1)],Ln={key:1,class:"d-help"},Mn={key:2,class:"d-error text-red"},In={__name:"DInputString",props:{form:Object,name:String,modelValue:String,label:String,error:String,help:String,placeholder:String,type:{type:String,default:"text"},pre:Object,post:Object,fieldRules:Object,scale:String,focus:Boolean,disabled:Boolean},emits:["update:modelValue","input"],setup(t,{expose:o,emit:n}){const s=t,l=e.ref(s.error),a=it(),i=e.ref(!1),c=e.ref(null);//!props.form ? ref(null) : props.form.fields[props.name].ref
|
|
2
|
+
const r=e.computed({get:()=>s.modelValue,set:$=>{n("update:modelValue",$)}}),p=e.computed(()=>s.type==="password"?"password":"text"),d=e.computed(()=>s.scale),u=$=>{n("input",$),_()},_=()=>(l.value=xn.validate(r.value,s.form.fields[s.name].rules),!!l.value);e.onMounted(()=>{b()});const b=()=>{var $;($=c.value)==null||$.focus()},D=()=>{r.value=""},k=$=>{i.value=$};return o({focus:b,setError:$=>{l.value=$},validate:_}),($,S)=>{var x,w,y,C,L,M,h,E,m,T,B,A,X,te,oe,ne,se,P,le,G,ae,ye,J,Ue,qe,Ge,Ze,Ke,Je,Qe,ve,et,tt,ot,nt,st,lt,at,rt;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["d-input-string",d.value])},[e.createElementVNode("div",wn,[s.label?(e.openBlock(),e.createElementBlock("div",Dn,[e.createTextVNode(e.toDisplayString(s.label),1),(x=s.form)!=null&&x.fields[s.name].rules&&s.form.fields[s.name].rules.hasOwnProperty("required")?(e.openBlock(),e.createElementBlock("span",$n,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Cn,[(y=(w=s.pre)==null?void 0:w.outside)!=null&&y.component?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["d-pre",s.disabled?"disabled":""])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((L=(C=s.pre)==null?void 0:C.outside)==null?void 0:L.component)))],2)):(h=(M=s.pre)==null?void 0:M.outside)!=null&&h.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["d-pre",s.disabled?"disabled":""])},[e.createElementVNode("div",{class:e.normalizeClass(["d-text",i.value?"focused":""])},e.toDisplayString((m=(E=s.pre)==null?void 0:E.outside)==null?void 0:m.text),3)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",En,[(B=(T=s.pre)==null?void 0:T.inside)!=null&&B.action&&((X=(A=s.pre)==null?void 0:A.inside)==null?void 0:X.action)==="clear"&&((te=r.value)==null?void 0:te.length)>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"d-pre-inside-button",onClick:D},Tn)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{id:e.unref(a),ref_key:"inputRef",ref:c,"onUpdate:modelValue":S[0]||(S[0]=_e=>r.value=_e),style:{width:"100%"},type:p.value,placeholder:s.placeholder,onInput:u,onFocus:S[1]||(S[1]=_e=>k(!0)),onFocusout:S[2]||(S[2]=_e=>k(!1)),class:e.normalizeClass([(ne=(oe=s.pre)==null?void 0:oe.outside)!=null&&ne.component||(P=(se=s.pre)==null?void 0:se.outside)!=null&&P.text?"has-pre":"",(G=(le=s.post)==null?void 0:le.outside)!=null&&G.component||(ye=(ae=s.post)==null?void 0:ae.outside)!=null&&ye.text?"has-post":"",(Ue=(J=s.pre)==null?void 0:J.inside)!=null&&Ue.action?"has-pre-inside-button":"",(Ge=(qe=s.post)==null?void 0:qe.inside)!=null&&Ge.action?"has-post-inside-button":"",i.value?"focused":""]),disabled:s.disabled},null,42,Nn),[[e.vModelDynamic,r.value]]),(Ke=(Ze=s.post)==null?void 0:Ze.inside)!=null&&Ke.action&&((Qe=(Je=s.post)==null?void 0:Je.inside)==null?void 0:Qe.action)==="clear"&&((ve=r.value)==null?void 0:ve.length)>0?(e.openBlock(),e.createElementBlock("div",{key:1,class:"d-post-inside-button",onClick:D},Vn)):e.createCommentVNode("",!0)]),(tt=(et=s.post)==null?void 0:et.outside)!=null&&tt.component?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["d-post",s.disabled?"disabled":""])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((nt=(ot=s.post)==null?void 0:ot.outside)==null?void 0:nt.component)))],2)):(lt=(st=s.post)==null?void 0:st.outside)!=null&<.text?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["d-post",s.disabled?"disabled":""])},[e.createElementVNode("div",{class:e.normalizeClass(["d-text",i.value?"focused":""])},e.toDisplayString((rt=(at=s.post)==null?void 0:at.outside)==null?void 0:rt.text),3)],2)):e.createCommentVNode("",!0)]),s.help?(e.openBlock(),e.createElementBlock("div",Ln,e.toDisplayString(s.help),1)):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("div",Mn,e.toDisplayString(l.value),1)):e.createCommentVNode("",!0)])],2)}}},Z={state:{},getters:{getComponent(t){return Z.state[t]},getComponents(){return Z.state}},mutations:{addComponent(t,o){Z.state.name=o},addComponents(t){for(const o in t)t.hasOwnProperty(o)&&(Z.state[o]=t[o])}}},fe=t=>{typeof t=="string"&&(t={title:"",text:t}),typeof t=="object"&&I.emit("notification-add",t)};fe.close=t=>{I.emit("notification-close",t)};const zn=()=>({notify:fe}),Rn={mounted:function(t,o){t.clickOutsideEvent=function(n){t===n.target||t.contains(n.target)||o.value(n,t)},document.addEventListener("click",t.clickOutsideEvent)},unmounted:function(t){document.removeEventListener("click",t.clickOutsideEvent)}},On={beforeMount(t,o){t._keydownCallback=n=>{n.key===o.arg&&o.value()},document.addEventListener("keydown",t._keydownCallback)},unmounted(t,o){document.removeEventListener("keydown",t._keydownCallback),delete t._keydownCallback}},An={beforeMount(t){t.focus()}};function Fe(t){return t.type.indexOf("mouse")!==-1?t.clientX:t.touches[0].clientX}function Pe(t){return t.type.indexOf("mouse")!==-1?t.clientY:t.touches[0].clientY}var Hn=function(){var t=!1;try{var o=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,o)}catch{}return t}(),Fn={disableClick:!1,tapTolerance:10,swipeTolerance:30,touchHoldTolerance:400,longTapTimeInterval:400,touchClass:"",dragFrequency:100,rollOverFrequency:100};function Q(t){var o=this.$$touchObj,n=t.type.indexOf("touch")>=0,s=t.type.indexOf("mouse")>=0,l=this;n&&(o.lastTouchStartTime=t.timeStamp),!(s&&o.lastTouchStartTime&&t.timeStamp-o.lastTouchStartTime<350)&&(o.touchStarted||(Ye(this),o.touchStarted=!0,o.touchMoved=!1,o.swipeOutBounded=!1,o.startX=Fe(t),o.startY=Pe(t),o.currentX=0,o.currentY=0,o.touchStartTime=t.timeStamp,o.hasSwipe=O(this,"swipe")||O(this,"swipe.left")||O(this,"swipe.right")||O(this,"swipe.top")||O(this,"swipe.bottom"),O(this,"hold")&&(o.touchHoldTimer=setTimeout(function(){o.touchHoldTimer=null,F(t,l,"hold")},o.options.touchHoldTolerance)),F(t,this,"press")))}function v(t){var o=this.$$touchObj,n=Fe(t),s=Pe(t),l=o.currentX!=n||o.currentY!=s;if(o.currentX=n,o.currentY=s,o.touchMoved){if(o.hasSwipe&&!o.swipeOutBounded){var i=o.options.swipeTolerance;o.swipeOutBounded=Math.abs(o.startX-o.currentX)>i&&Math.abs(o.startY-o.currentY)>i}}else{var a=o.options.tapTolerance;o.touchMoved=Math.abs(o.startX-o.currentX)>a||Math.abs(o.startY-o.currentY)>a,o.touchMoved&&(ge(o),F(t,this,"drag.once"))}if(O(this,"rollover")&&l){var c=t.timeStamp,r=o.options.rollOverFrequency;(o.touchRollTime==null||c>o.touchRollTime+r)&&(o.touchRollTime=c,F(t,this,"rollover"))}if(O(this,"drag")&&o.touchStarted&&o.touchMoved&&l){var c=t.timeStamp,r=o.options.dragFrequency;(o.touchDragTime==null||c>o.touchDragTime+r)&&(o.touchDragTime=c,F(t,this,"drag"))}}function We(){var t=this.$$touchObj;ge(t),he(this),t.touchStarted=t.touchMoved=!1,t.startX=t.startY=0}function ee(t){var o=this.$$touchObj,n=t.type.indexOf("touch")>=0,s=t.type.indexOf("mouse")>=0;n&&(o.lastTouchEndTime=t.timeStamp);var l=n&&!o.touchHoldTimer;if(ge(o),o.touchStarted=!1,he(this),!(s&&o.lastTouchEndTime&&t.timeStamp-o.lastTouchEndTime<350))if(F(t,this,"release"),o.touchMoved){if(o.hasSwipe&&!o.swipeOutBounded){var a=o.options.swipeTolerance,i,c=Math.abs(o.startY-o.currentY),r=Math.abs(o.startX-o.currentX);(c>a||r>a)&&(c>a?i=o.startY>o.currentY?"top":"bottom":i=o.startX>o.currentX?"left":"right",O(this,"swipe."+i)?F(t,this,"swipe."+i,i):F(t,this,"swipe",i))}}else if(O(this,"longtap")&&t.timeStamp-o.touchStartTime>o.options.longTapTimeInterval)t.cancelable&&t.preventDefault(),F(t,this,"longtap");else if(O(this,"hold")&&l){t.cancelable&&t.preventDefault();return}else F(t,this,"tap")}function je(){Ye(this)}function Xe(){he(this)}function O(t,o){var n=t.$$touchObj.callbacks[o];return n!=null&&n.length>0}function F(t,o,n,s){var l=o.$$touchObj,a=l.callbacks[n];if(a==null||a.length===0)return null;for(var i=0;i<a.length;i++){var c=a[i];c.modifiers.stop&&t.stopPropagation(),c.modifiers.prevent&&t.preventDefault(),!(c.modifiers.self&&t.target!==t.currentTarget)&&typeof c.value=="function"&&(s?c.value(s,t):c.value(t))}}function Ye(t){var o=t.$$touchObj.options.touchClass;o&&t.classList.add(o)}function he(t){var o=t.$$touchObj.options.touchClass;o&&t.classList.remove(o)}function ge(t){t.touchHoldTimer&&(clearTimeout(t.touchHoldTimer),t.touchHoldTimer=null)}function Pn(t,o){var n=t.$$touchObj||{callbacks:{},hasBindTouchEvents:!1,options:Fn};return o&&(n.options=Object.assign({},n.options,o)),t.$$touchObj=n,t.$$touchObj}const Wn={beforeMount:function(t,o){const n=Pn(t);let s=Hn?{passive:!0}:!1;const l=o.arg||"tap";switch(l){case"swipe":let a=o.modifiers;if(a.left||a.right||a.top||a.bottom){for(let i in o.modifiers)if(["left","right","top","bottom"].indexOf(i)>=0){let c="swipe."+i;n.callbacks[c]=n.callbacks[c]||[],n.callbacks[c].push(o)}}else n.callbacks.swipe=n.callbacks.swipe||[],n.callbacks.swipe.push(o);break;case"press":case"drag":o.modifiers.disablePassive&&(s=!1);default:n.callbacks[l]=n.callbacks[l]||[],n.callbacks[l].push(o)}n.hasBindTouchEvents||(t.addEventListener("touchstart",Q,s),t.addEventListener("touchmove",v,s),t.addEventListener("touchcancel",We),t.addEventListener("touchend",ee),n.options.disableClick||(t.addEventListener("mousedown",Q),t.addEventListener("mousemove",v),t.addEventListener("mouseup",ee),t.addEventListener("mouseenter",je),t.addEventListener("mouseleave",Xe)),n.hasBindTouchEvents=!0)},unmounted:function(t){t.removeEventListener("touchstart",Q),t.removeEventListener("touchmove",v),t.removeEventListener("touchcancel",We),t.removeEventListener("touchend",ee),t.$$touchObj&&!t.$$touchObj.options.disableClick&&(t.removeEventListener("mousedown",Q),t.removeEventListener("mousemove",v),t.removeEventListener("mouseup",ee),t.removeEventListener("mouseenter",je),t.removeEventListener("mouseleave",Xe)),delete t.$$touchObj}};f.DAccordion=Wt,f.DAlertDialog=Me,f.DBadge=be,f.DButton=H,f.DCard=_o,f.DCheckbox=jo,f.DCollapse=Be,f.DComponentStore=Z,f.DConfigProvider=Gt,f.DConfirmDialog=Ie,f.DContextMenu=$e,f.DDialogProvider=Xo,f.DDrag=Se,f.DDrop=De,f.DDropdown=co,f.DForm=cn,f.DGlobalStore=U,f.DGrid=tn,f.DIcon=Y,f.DIconStore=R,f.DImage=nn,f.DInfoProgress=Ho,f.DInput=Ct,f.DInputString=In,f.DLayoutAdmin=qt,f.DLayoutContent=Ve,f.DLayoutFooter=Te,f.DLayoutHeader=Ce,f.DLayoutSidebar=Ne,f.DLayoutTab=Ee,f.DMenu=ie,f.DModal=de,f.DNotificationProvider=Io,f.DPanel=ze,f.DScroll=Kt,f.DScrollProvider=Zt,f.DSelect=Go,f.DTabs=vo,f.DTextarea=rn,f.DTransferStore=K,f.DTree=ce,f.DTreeItem=xe,f.DTreeStore=g,f.Rules=z,f.alert=He,f.clickOutside=Rn,f.confirm=Ae,f.emitter=I,f.eventsBus=we,f.focus=An,f.keydown=On,f.notify=fe,f.touch=Wn,f.useNotification=zn,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
|