@me-framework/me-ui-antdv-next 0.0.35 → 0.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +160 -54
- package/dist/input-property/index.js +334 -321
- package/dist/me-ui-antdv-next.js +476 -448
- package/dist/me-ui-antdv-next.umd.cjs +10 -10
- package/dist/menu/index.js +49 -34
- package/dist/menu/index.vue.d.ts +2 -0
- package/dist/menu/types.d.ts +8 -0
- package/package.json +1 -1
package/dist/me-ui-antdv-next.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createSlots as c, createTextVNode as l, createVNode as u, defineComponent as d, guardReactiveProps as f, h as p, inject as m, mergeProps as h, nextTick as g, normalizeClass as _, normalizeProps as v, normalizeStyle as y, onBeforeUnmount as b, onMounted as x, onUnmounted as S, openBlock as C, provide as w, reactive as T, ref as E, render as D, renderList as O, renderSlot as k, resolveComponent as A, resolveDynamicComponent as j, shallowRef as M, toDisplayString as N, unref as P, useAttrs as F, useSlots as I, vShow as L, watch as R, withCtx as z, withDirectives as B, withModifiers as V } from "vue";
|
|
2
2
|
import { message as H, theme as ee } from "antdv-next";
|
|
3
3
|
import * as U from "@lucide/vue";
|
|
4
|
-
import { Check as W, ChevronDown as
|
|
4
|
+
import { Check as W, ChevronDown as G, ChevronLeft as K, ChevronRight as q, Copy as J, Download as Y, FileCode as te, Maximize as ne, Maximize2 as re, Minimize as X, Minimize2 as Z, Upload as Q, X as ie } from "@lucide/vue";
|
|
5
5
|
import { useDraggable as ae } from "vue-draggable-plus";
|
|
6
6
|
import $ from "dayjs";
|
|
7
7
|
//#region \0rolldown/runtime.js
|
|
@@ -93,7 +93,7 @@ var oe = Object.create, se = Object.defineProperty, ce = Object.getOwnPropertyDe
|
|
|
93
93
|
algorithm: F.value ? c : o,
|
|
94
94
|
token: { borderRadius: 6 },
|
|
95
95
|
components: { Modal: { titleFontSize: 18 } }
|
|
96
|
-
})), V = r(() => v.value === "process" ? d.data.process?.title ?? d.data.normal?.title : d.data.normal?.title), H = r(() => v.value === "process" ? d.data.process?.message ?? d.data.normal?.message : d.data.normal?.message), U = r(() => v.value === "process" ? d.data.process?.loading ?? !1 : d.data.normal?.loading ?? !1), W = r(() => v.value === "process" ? d.data.process?.type ?? d.data.normal?.type ?? "default" : d.data.normal?.type ?? "default"),
|
|
96
|
+
})), V = r(() => v.value === "process" ? d.data.process?.title ?? d.data.normal?.title : d.data.normal?.title), H = r(() => v.value === "process" ? d.data.process?.message ?? d.data.normal?.message : d.data.normal?.message), U = r(() => v.value === "process" ? d.data.process?.loading ?? !1 : d.data.normal?.loading ?? !1), W = r(() => v.value === "process" ? d.data.process?.type ?? d.data.normal?.type ?? "default" : d.data.normal?.type ?? "default"), G = r(() => !!d.handler?.cancel), K = r(() => W.value === "default" ? "default" : "primary"), q = r(() => W.value === "danger");
|
|
97
97
|
R(h, async (e) => {
|
|
98
98
|
if (e ? (D && d.closeOnRouteChange && (O.value = D.currentRoute.value.fullPath), j || (w = !1)) : !w && !j && (O.value = null), e && !d.centered && d.top !== void 0) {
|
|
99
99
|
await g();
|
|
@@ -101,14 +101,14 @@ var oe = Object.create, se = Object.defineProperty, ce = Object.getOwnPropertyDe
|
|
|
101
101
|
n && (n.style.marginTop = e);
|
|
102
102
|
}
|
|
103
103
|
});
|
|
104
|
-
let
|
|
104
|
+
let J = (e, ...t) => new Promise((n) => {
|
|
105
105
|
if (!e) {
|
|
106
106
|
n(!0);
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
109
|
let r = e(...t);
|
|
110
110
|
r instanceof Promise ? r.then((e) => n(e !== !1)).catch(() => n(!1)) : n(r !== !1);
|
|
111
|
-
}),
|
|
111
|
+
}), Y = () => {
|
|
112
112
|
T = null;
|
|
113
113
|
let e = d.data.request;
|
|
114
114
|
return !e || new Promise((t) => {
|
|
@@ -122,17 +122,17 @@ var oe = Object.create, se = Object.defineProperty, ce = Object.getOwnPropertyDe
|
|
|
122
122
|
t(!0);
|
|
123
123
|
}) : t(!0);
|
|
124
124
|
});
|
|
125
|
-
},
|
|
125
|
+
}, te = async () => {
|
|
126
126
|
if (w) {
|
|
127
127
|
w = !1, y = !1;
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
|
-
y || (y = !0, await
|
|
131
|
-
},
|
|
130
|
+
y || (y = !0, await J(d.handler?.cancel) ? h.value = !1 : (v.value = "normal", y = !1));
|
|
131
|
+
}, ne = async () => {
|
|
132
132
|
if (y) return;
|
|
133
133
|
y = !0, v.value = "process";
|
|
134
134
|
let e = !0;
|
|
135
|
-
d.data.request && (e = await
|
|
135
|
+
d.data.request && (e = await Y()), e && d.handler?.confirm ? await J(d.handler.confirm, T) ? h.value = !1 : (v.value = "normal", y = !1) : h.value = !1;
|
|
136
136
|
};
|
|
137
137
|
return (t, n) => {
|
|
138
138
|
let r = A("a-button"), o = A("a-modal"), c = A("a-config-provider");
|
|
@@ -147,24 +147,24 @@ var oe = Object.create, se = Object.defineProperty, ce = Object.getOwnPropertyDe
|
|
|
147
147
|
"mask-closable": !1,
|
|
148
148
|
keyboard: !1,
|
|
149
149
|
"wrap-class-name": "me-message-modal",
|
|
150
|
-
onCancel:
|
|
150
|
+
onCancel: te
|
|
151
151
|
}, {
|
|
152
|
-
footer: z(() => [s("div", he, [k(t.$slots, "me-message-footer", {}, () => [n[3] ||= s("div", null, null, -1), s("div", ge, [
|
|
152
|
+
footer: z(() => [s("div", he, [k(t.$slots, "me-message-footer", {}, () => [n[3] ||= s("div", null, null, -1), s("div", ge, [G.value ? (C(), i(r, {
|
|
153
153
|
key: 0,
|
|
154
154
|
type: "link",
|
|
155
155
|
class: "me-message__cancel",
|
|
156
156
|
autoInsertSpace: !1,
|
|
157
|
-
onClick:
|
|
157
|
+
onClick: te
|
|
158
158
|
}, {
|
|
159
159
|
default: z(() => [...n[1] ||= [l("取消 ", -1)]]),
|
|
160
160
|
_: 1
|
|
161
161
|
})) : a("", !0), u(r, {
|
|
162
|
-
type:
|
|
163
|
-
danger:
|
|
162
|
+
type: K.value,
|
|
163
|
+
danger: q.value,
|
|
164
164
|
loading: U.value,
|
|
165
165
|
autoInsertSpace: !1,
|
|
166
166
|
class: _(["me-message__confirm", `me-message__confirm--${W.value}`]),
|
|
167
|
-
onClick:
|
|
167
|
+
onClick: ne
|
|
168
168
|
}, {
|
|
169
169
|
default: z(() => [...n[2] ||= [l(" 确定 ", -1)]]),
|
|
170
170
|
_: 1
|
|
@@ -714,7 +714,7 @@ var Ue = ["onClick"], We = /* @__PURE__ */ d({
|
|
|
714
714
|
onMenuClick: ({ key: n }) => b(e, t, n),
|
|
715
715
|
onClick: r[1] ||= V(() => {}, ["stop"])
|
|
716
716
|
}, {
|
|
717
|
-
default: z(() => [s("span", { class: _(["me-breadcrumb__menu-trigger", { "is-bold": e.bold }]) }, [l(N(e.label) + " ", 1), u(P(
|
|
717
|
+
default: z(() => [s("span", { class: _(["me-breadcrumb__menu-trigger", { "is-bold": e.bold }]) }, [l(N(e.label) + " ", 1), u(P(G), {
|
|
718
718
|
size: 14,
|
|
719
719
|
"stroke-width": 2
|
|
720
720
|
})], 2)]),
|
|
@@ -893,7 +893,10 @@ var it = rt, at = { class: "me-menu__tree-text" }, ot = { class: "me-menu__tree-
|
|
|
893
893
|
},
|
|
894
894
|
emits: ["click", "toggle"],
|
|
895
895
|
setup(t, { emit: c }) {
|
|
896
|
-
let l = m("meMenuCtx"), d = t, f = c, p = (e) => e[l.keyField]
|
|
896
|
+
let l = m("meMenuCtx"), d = t, f = c, p = (e) => e[l.keyField], h = (e) => !(!l.showHidden && e.hideFlag || e.meta?.hideMenu || l.hideDisabled && !e.enableFlag), g = r(() => {
|
|
897
|
+
let e = d.item[l.childrenField] || [];
|
|
898
|
+
return !e.length || d.item.meta?.hideChildrenMenu ? [] : e.filter((e) => h(e)).sort((e, t) => e.sort - t.sort);
|
|
899
|
+
}), v = r(() => g.value.length > 0), b = r(() => l.selectedId === p(d.item)), x = r(() => l.expandedSections.has(p(d.item))), S = () => {
|
|
897
900
|
d.item.enableFlag && f("toggle", p(d.item));
|
|
898
901
|
}, w = () => {
|
|
899
902
|
d.item.enableFlag && f("click", d.item);
|
|
@@ -936,7 +939,7 @@ var it = rt, at = { class: "me-menu__tree-text" }, ot = { class: "me-menu__tree-
|
|
|
936
939
|
"dot",
|
|
937
940
|
"color"
|
|
938
941
|
])) : a("", !0),
|
|
939
|
-
u(P(
|
|
942
|
+
u(P(G), {
|
|
940
943
|
class: "me-menu__tree-arrow",
|
|
941
944
|
size: 12
|
|
942
945
|
})
|
|
@@ -1009,6 +1012,8 @@ var it = rt, at = { class: "me-menu__tree-text" }, ot = { class: "me-menu__tree-
|
|
|
1009
1012
|
height: { default: "100%" },
|
|
1010
1013
|
background: { default: "" },
|
|
1011
1014
|
keyField: { default: "id" },
|
|
1015
|
+
parentField: { default: "parentId" },
|
|
1016
|
+
childrenField: { default: "children" },
|
|
1012
1017
|
rightCollapsed: { type: Boolean },
|
|
1013
1018
|
showRightToggle: {
|
|
1014
1019
|
type: Boolean,
|
|
@@ -1030,6 +1035,9 @@ var it = rt, at = { class: "me-menu__tree-text" }, ot = { class: "me-menu__tree-
|
|
|
1030
1035
|
get keyField() {
|
|
1031
1036
|
return d.keyField;
|
|
1032
1037
|
},
|
|
1038
|
+
get childrenField() {
|
|
1039
|
+
return d.childrenField;
|
|
1040
|
+
},
|
|
1033
1041
|
get hideDisabled() {
|
|
1034
1042
|
return d.hideDisabled;
|
|
1035
1043
|
},
|
|
@@ -1037,7 +1045,7 @@ var it = rt, at = { class: "me-menu__tree-text" }, ot = { class: "me-menu__tree-
|
|
|
1037
1045
|
return d.showHidden;
|
|
1038
1046
|
},
|
|
1039
1047
|
get selectedId() {
|
|
1040
|
-
return
|
|
1048
|
+
return se.value;
|
|
1041
1049
|
},
|
|
1042
1050
|
get expandedSections() {
|
|
1043
1051
|
return v.value;
|
|
@@ -1071,45 +1079,48 @@ var it = rt, at = { class: "me-menu__tree-text" }, ot = { class: "me-menu__tree-
|
|
|
1071
1079
|
backgroundImage: D.value ? `linear-gradient(rgb(0 0 0 / 70%), rgb(0 0 0 / 80%)), url(${e})` : `url(${e})`,
|
|
1072
1080
|
backgroundSize: "cover"
|
|
1073
1081
|
} : { background: e };
|
|
1074
|
-
}), V = r(() => b.value), H = r(() =>
|
|
1082
|
+
}), V = r(() => b.value), H = r(() => oe.value.length > 0), ee = r(() => typeof d.leftWidth == "number" ? `${d.leftWidth}px` : d.leftWidth), U = r(() => typeof d.rightWidth == "number" ? `${d.rightWidth}px` : d.rightWidth), W = r(() => {
|
|
1075
1083
|
let e = {};
|
|
1076
1084
|
if (d.collapseDuration !== void 0) {
|
|
1077
1085
|
let t = d.collapseDuration;
|
|
1078
1086
|
e["--me-menu-transition-duration"] = typeof t == "number" || /^\d+(\.\d+)?$/.test(t) ? `${t}ms` : t;
|
|
1079
1087
|
}
|
|
1080
1088
|
return d.collapseAnimation !== void 0 && (e["--me-menu-transition-timing"] = d.collapseAnimation), e;
|
|
1081
|
-
}),
|
|
1089
|
+
}), J = E(0), Y = r(() => {
|
|
1082
1090
|
let e = Number.parseFloat(String(d.leftWidth)) || 0, t = Number.parseFloat(String(d.rightWidth)) || 0;
|
|
1083
1091
|
return {
|
|
1084
1092
|
left: `${(H.value && !b.value ? e + t : e) - 8}px`,
|
|
1085
|
-
top: `${
|
|
1093
|
+
top: `${J.value}px`
|
|
1086
1094
|
};
|
|
1087
|
-
}),
|
|
1095
|
+
}), te = E(!1), ne = (e) => {
|
|
1088
1096
|
if (!d.showRightToggle || !H.value) return;
|
|
1089
1097
|
let t = e.currentTarget, n = t.querySelector(".me-menu__right"), r = n && n.offsetParent !== null ? n : t.querySelector(".me-menu__left");
|
|
1090
1098
|
if (!r) return;
|
|
1091
1099
|
let i = r.getBoundingClientRect(), a = Math.abs(e.clientX - i.right) <= 16;
|
|
1092
|
-
if (a && !
|
|
1100
|
+
if (a && !te.value) {
|
|
1093
1101
|
let n = t.getBoundingClientRect();
|
|
1094
|
-
|
|
1102
|
+
J.value = Math.max(36, Math.min(e.clientY - n.top, n.height - 8 - 28));
|
|
1095
1103
|
}
|
|
1096
|
-
|
|
1097
|
-
},
|
|
1098
|
-
|
|
1099
|
-
},
|
|
1100
|
-
|
|
1104
|
+
te.value = a;
|
|
1105
|
+
}, re = () => {
|
|
1106
|
+
te.value = !1;
|
|
1107
|
+
}, X = (e) => e[d.keyField], Z = (e) => e && e[d.childrenField] || [], Q = (e) => !(!d.showHidden && e.hideFlag || e.meta?.hideMenu || d.hideDisabled && !e.enableFlag), ie = r(() => d.data.filter((e) => e[d.parentField] === "0" && Q(e)).sort((e, t) => e.sort - t.sort)), ae = r(() => h.value ? h.value : d.activeId ? d.activeId : d.defaultActiveId ? d.defaultActiveId : ie.value[0] ? X(ie.value[0]) : ""), $ = r(() => ae.value && ie.value.find((e) => X(e) === ae.value) || null), oe = r(() => {
|
|
1108
|
+
let e = Z($.value);
|
|
1109
|
+
return e.length ? e.filter((e) => Q(e)).sort((e, t) => e.sort - t.sort) : [];
|
|
1110
|
+
}), se = r(() => g.value ? g.value : d.selectedId ? d.selectedId : d.defaultSelectedId ? d.defaultSelectedId : ""), ce = r(() => se.value ? ue(d.data, se.value) : null);
|
|
1111
|
+
R(() => se.value, (e) => {
|
|
1101
1112
|
if (!e) return;
|
|
1102
|
-
|
|
1103
|
-
let t =
|
|
1104
|
-
if (t && !
|
|
1105
|
-
let e =
|
|
1113
|
+
he(e);
|
|
1114
|
+
let t = ge(e);
|
|
1115
|
+
if (t && !ye(t)) {
|
|
1116
|
+
let e = be(t);
|
|
1106
1117
|
if (e) {
|
|
1107
|
-
let t =
|
|
1108
|
-
g.value = t, f("update:selectedId", t), f("select", e),
|
|
1118
|
+
let t = X(e);
|
|
1119
|
+
g.value = t, f("update:selectedId", t), f("select", e), ve(e);
|
|
1109
1120
|
}
|
|
1110
1121
|
}
|
|
1111
1122
|
});
|
|
1112
|
-
let
|
|
1123
|
+
let le = (e) => {
|
|
1113
1124
|
if (e) return {
|
|
1114
1125
|
danger: "error",
|
|
1115
1126
|
info: "default",
|
|
@@ -1117,101 +1128,105 @@ var it = rt, at = { class: "me-menu__tree-text" }, ot = { class: "me-menu__tree-
|
|
|
1117
1128
|
success: "success",
|
|
1118
1129
|
warning: "warning"
|
|
1119
1130
|
}[e] || e;
|
|
1120
|
-
},
|
|
1131
|
+
}, ue = (e, t) => {
|
|
1121
1132
|
for (let n of e) {
|
|
1122
|
-
if (
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1133
|
+
if (X(n) === t) return n;
|
|
1134
|
+
let e = Z(n);
|
|
1135
|
+
if (e.length > 0) {
|
|
1136
|
+
let n = ue(e, t);
|
|
1137
|
+
if (n) return n;
|
|
1126
1138
|
}
|
|
1127
1139
|
}
|
|
1128
1140
|
return null;
|
|
1129
|
-
},
|
|
1141
|
+
}, de = (e) => {
|
|
1142
|
+
let t = Z(e);
|
|
1143
|
+
return !t.length || e.meta?.hideChildrenMenu ? [] : t.filter((e) => Q(e)).sort((e, t) => e.sort - t.sort);
|
|
1144
|
+
}, fe = (e) => {
|
|
1130
1145
|
v.value.has(e) ? v.value.delete(e) : v.value.add(e);
|
|
1131
|
-
},
|
|
1146
|
+
}, pe = (e) => v.value.has(e), me = (e, t = oe.value) => {
|
|
1132
1147
|
for (let n of t) {
|
|
1133
|
-
let t =
|
|
1134
|
-
if (t.some((t) =>
|
|
1148
|
+
let t = de(n);
|
|
1149
|
+
if (t.some((t) => X(t) === e)) return [X(n)];
|
|
1135
1150
|
if (t.length > 0) {
|
|
1136
|
-
let r =
|
|
1137
|
-
if (r.length > 0) return [
|
|
1151
|
+
let r = me(e, t);
|
|
1152
|
+
if (r.length > 0) return [X(n), ...r];
|
|
1138
1153
|
}
|
|
1139
1154
|
}
|
|
1140
1155
|
return [];
|
|
1141
|
-
},
|
|
1142
|
-
|
|
1156
|
+
}, he = (e) => {
|
|
1157
|
+
me(e).forEach((e) => {
|
|
1143
1158
|
v.value.add(e);
|
|
1144
1159
|
});
|
|
1145
|
-
},
|
|
1146
|
-
if (!e ||
|
|
1147
|
-
for (let t of
|
|
1148
|
-
if (
|
|
1149
|
-
let n =
|
|
1160
|
+
}, ge = (e) => {
|
|
1161
|
+
if (!e || !oe.value) return null;
|
|
1162
|
+
for (let t of oe.value) {
|
|
1163
|
+
if (X(t) === e) return t;
|
|
1164
|
+
let n = de(t);
|
|
1150
1165
|
if (n.length > 0) {
|
|
1151
|
-
let t =
|
|
1166
|
+
let t = ue(n, e);
|
|
1152
1167
|
if (t) return t;
|
|
1153
1168
|
}
|
|
1154
1169
|
}
|
|
1155
1170
|
return null;
|
|
1156
|
-
}, ge = (e) => {
|
|
1157
|
-
if (e.length === 0) return null;
|
|
1158
|
-
let t = e[0], n = ue(t);
|
|
1159
|
-
return n.length > 0 ? (v.value.add(Y(t)), ge(n)) : t;
|
|
1160
1171
|
}, _e = (e) => {
|
|
1172
|
+
if (e.length === 0) return null;
|
|
1173
|
+
let t = e[0], n = de(t);
|
|
1174
|
+
return n.length > 0 ? (v.value.add(X(t)), _e(n)) : t;
|
|
1175
|
+
}, ve = (e) => {
|
|
1161
1176
|
if (!d.router || !p) return;
|
|
1162
1177
|
let t = e.meta?.path;
|
|
1163
1178
|
t && p.push(t);
|
|
1164
|
-
},
|
|
1165
|
-
if (
|
|
1166
|
-
let t =
|
|
1167
|
-
return t.length === 0 ? null :
|
|
1179
|
+
}, ye = (e) => e.meta?.type !== "group" && de(e).length === 0, be = (e) => {
|
|
1180
|
+
if (ye(e)) return e;
|
|
1181
|
+
let t = de(e);
|
|
1182
|
+
return t.length === 0 ? null : _e(t);
|
|
1168
1183
|
};
|
|
1169
|
-
R(() =>
|
|
1170
|
-
let e = d.selectedId || g.value || d.defaultSelectedId, t =
|
|
1171
|
-
if (t &&
|
|
1172
|
-
if (
|
|
1184
|
+
R(() => ae.value, () => {
|
|
1185
|
+
let e = d.selectedId || g.value || d.defaultSelectedId, t = ge(e);
|
|
1186
|
+
if (t && oe.value.length > 0) {
|
|
1187
|
+
if (he(e), ye(t)) {
|
|
1173
1188
|
g.value !== e && (g.value = e);
|
|
1174
1189
|
return;
|
|
1175
1190
|
}
|
|
1176
|
-
let n =
|
|
1191
|
+
let n = be(t);
|
|
1177
1192
|
if (n) {
|
|
1178
|
-
let e =
|
|
1179
|
-
g.value = e, f("update:selectedId", e), f("select", n),
|
|
1193
|
+
let e = X(n);
|
|
1194
|
+
g.value = e, f("update:selectedId", e), f("select", n), ve(n);
|
|
1180
1195
|
return;
|
|
1181
1196
|
}
|
|
1182
1197
|
}
|
|
1183
|
-
let n =
|
|
1198
|
+
let n = _e(oe.value);
|
|
1184
1199
|
if (n) {
|
|
1185
|
-
let e =
|
|
1186
|
-
g.value = e, f("update:selectedId", e), f("select", n),
|
|
1200
|
+
let e = X(n);
|
|
1201
|
+
g.value = e, f("update:selectedId", e), f("select", n), ve(n);
|
|
1187
1202
|
} else g.value = "", f("update:selectedId", "");
|
|
1188
1203
|
}, { immediate: !0 });
|
|
1189
|
-
let
|
|
1204
|
+
let xe = () => {
|
|
1190
1205
|
b.value = !b.value, f("update:rightCollapsed", b.value);
|
|
1191
|
-
},
|
|
1206
|
+
}, Se = (e) => {
|
|
1192
1207
|
if (!e.enableFlag) return;
|
|
1193
|
-
let t =
|
|
1208
|
+
let t = X(e);
|
|
1194
1209
|
if (h.value === t) {
|
|
1195
|
-
|
|
1210
|
+
xe();
|
|
1196
1211
|
return;
|
|
1197
1212
|
}
|
|
1198
1213
|
h.value = t, g.value = "", b.value = !1, f("update:rightCollapsed", !1), f("update:activeId", t), f("change", e);
|
|
1199
|
-
},
|
|
1214
|
+
}, Ce = (e) => {
|
|
1200
1215
|
if (!e.enableFlag) return;
|
|
1201
|
-
let t =
|
|
1202
|
-
g.value = t, f("update:selectedId", t), f("select", e),
|
|
1216
|
+
let t = X(e);
|
|
1217
|
+
g.value = t, f("update:selectedId", t), f("select", e), ve(e);
|
|
1203
1218
|
};
|
|
1204
1219
|
return c({
|
|
1205
1220
|
setBadge: (e, t, n) => {
|
|
1206
|
-
let r =
|
|
1221
|
+
let r = ue(d.data, e);
|
|
1207
1222
|
r && (r.meta ||= {}, t === !0 ? (r.meta.dot = !0, r.meta.badge = "") : (r.meta.badge = String(t), r.meta.dot = !1), n && (r.meta.badgeColor = n));
|
|
1208
1223
|
},
|
|
1209
1224
|
removeBadge: (e) => {
|
|
1210
|
-
let t =
|
|
1225
|
+
let t = ue(d.data, e);
|
|
1211
1226
|
!t || !t.meta || (t.meta.badge = "", t.meta.dot = !1);
|
|
1212
1227
|
},
|
|
1213
|
-
selectedItem:
|
|
1214
|
-
toggleRightCollapse:
|
|
1228
|
+
selectedItem: ce,
|
|
1229
|
+
toggleRightCollapse: xe,
|
|
1215
1230
|
rightCollapsed: V
|
|
1216
1231
|
}), (r, c) => {
|
|
1217
1232
|
let l = A("a-badge");
|
|
@@ -1221,8 +1236,8 @@ var it = rt, at = { class: "me-menu__tree-text" }, ot = { class: "me-menu__tree-
|
|
|
1221
1236
|
height: F.value,
|
|
1222
1237
|
...W.value
|
|
1223
1238
|
}),
|
|
1224
|
-
onMousemove:
|
|
1225
|
-
onMouseleave:
|
|
1239
|
+
onMousemove: ne,
|
|
1240
|
+
onMouseleave: re
|
|
1226
1241
|
}, [
|
|
1227
1242
|
s("div", {
|
|
1228
1243
|
class: "me-menu__left",
|
|
@@ -1232,12 +1247,12 @@ var it = rt, at = { class: "me-menu__tree-text" }, ot = { class: "me-menu__tree-
|
|
|
1232
1247
|
})
|
|
1233
1248
|
}, [
|
|
1234
1249
|
s("div", lt, [k(r.$slots, "logo", {}, () => [c[0] ||= s("span", { class: "me-menu__logo-text" }, "MeMenu", -1)])]),
|
|
1235
|
-
s("div", ut, [(C(!0), o(e, null, O(
|
|
1250
|
+
s("div", ut, [(C(!0), o(e, null, O(ie.value, (t) => (C(), o(e, { key: X(t) }, [t.meta?.divider ? (C(), o("div", dt)) : a("", !0), s("div", {
|
|
1236
1251
|
class: _(["me-menu__left-item", {
|
|
1237
|
-
"is-active":
|
|
1252
|
+
"is-active": ae.value === X(t),
|
|
1238
1253
|
"is-disabled": !t.enableFlag
|
|
1239
1254
|
}]),
|
|
1240
|
-
onClick: (e) =>
|
|
1255
|
+
onClick: (e) => Se(t)
|
|
1241
1256
|
}, [
|
|
1242
1257
|
t.icon ? (C(), i(P(Fe), {
|
|
1243
1258
|
key: 0,
|
|
@@ -1250,7 +1265,7 @@ var it = rt, at = { class: "me-menu__tree-text" }, ot = { class: "me-menu__tree-
|
|
|
1250
1265
|
key: 1,
|
|
1251
1266
|
count: t.meta?.dot ? void 0 : t.meta?.badge,
|
|
1252
1267
|
dot: !!t.meta?.dot,
|
|
1253
|
-
color:
|
|
1268
|
+
color: le(t.meta?.badgeColor),
|
|
1254
1269
|
class: "me-menu__left-badge"
|
|
1255
1270
|
}, null, 8, [
|
|
1256
1271
|
"count",
|
|
@@ -1264,43 +1279,43 @@ var it = rt, at = { class: "me-menu__tree-text" }, ot = { class: "me-menu__tree-
|
|
|
1264
1279
|
B(s("div", {
|
|
1265
1280
|
class: _(["me-menu__right", { "is-collapsed": b.value }]),
|
|
1266
1281
|
style: y({ "--me-menu-right-width": U.value })
|
|
1267
|
-
}, [s("div", ht, [(C(!0), o(e, null, O(
|
|
1282
|
+
}, [s("div", ht, [(C(!0), o(e, null, O(oe.value, (t) => (C(), o(e, { key: X(t) }, [t.meta?.type === "group" ? (C(), o(e, { key: 0 }, [s("div", gt, [s("div", {
|
|
1268
1283
|
class: "me-menu__section-header",
|
|
1269
|
-
onClick: (e) =>
|
|
1270
|
-
}, [u(P(
|
|
1271
|
-
class: _(["me-menu__section-arrow", { "is-expanded":
|
|
1284
|
+
onClick: (e) => fe(X(t))
|
|
1285
|
+
}, [u(P(G), {
|
|
1286
|
+
class: _(["me-menu__section-arrow", { "is-expanded": pe(X(t)) }]),
|
|
1272
1287
|
size: 12
|
|
1273
1288
|
}, null, 8, ["class"]), s("span", vt, N(t.title), 1)], 8, _t), u(n, { name: "me-menu-section" }, {
|
|
1274
|
-
default: z(() => [B(s("div", yt, [(C(!0), o(e, null, O(
|
|
1275
|
-
key:
|
|
1289
|
+
default: z(() => [B(s("div", yt, [(C(!0), o(e, null, O(de(t), (e) => (C(), i(ct, {
|
|
1290
|
+
key: X(e),
|
|
1276
1291
|
item: e,
|
|
1277
1292
|
level: 0,
|
|
1278
|
-
onClick:
|
|
1279
|
-
onToggle:
|
|
1280
|
-
}, null, 8, ["item"]))), 128))], 512), [[L,
|
|
1293
|
+
onClick: Ce,
|
|
1294
|
+
onToggle: fe
|
|
1295
|
+
}, null, 8, ["item"]))), 128))], 512), [[L, pe(X(t))]])]),
|
|
1281
1296
|
_: 2
|
|
1282
|
-
}, 1024)]), c[2] ||= s("div", { class: "me-menu__section-divider" }, null, -1)], 64)) :
|
|
1297
|
+
}, 1024)]), c[2] ||= s("div", { class: "me-menu__section-divider" }, null, -1)], 64)) : de(t).length > 0 ? (C(), o(e, { key: 1 }, [s("div", bt, [s("div", {
|
|
1283
1298
|
class: "me-menu__section-header",
|
|
1284
|
-
onClick: (e) =>
|
|
1285
|
-
}, [u(P(
|
|
1286
|
-
class: _(["me-menu__section-arrow", { "is-expanded":
|
|
1299
|
+
onClick: (e) => fe(X(t))
|
|
1300
|
+
}, [u(P(G), {
|
|
1301
|
+
class: _(["me-menu__section-arrow", { "is-expanded": pe(X(t)) }]),
|
|
1287
1302
|
size: 12
|
|
1288
1303
|
}, null, 8, ["class"]), s("span", St, N(t.title), 1)], 8, xt), u(n, { name: "me-menu-section" }, {
|
|
1289
|
-
default: z(() => [B(s("div", Ct, [(C(!0), o(e, null, O(
|
|
1290
|
-
key:
|
|
1304
|
+
default: z(() => [B(s("div", Ct, [(C(!0), o(e, null, O(de(t), (e) => (C(), i(ct, {
|
|
1305
|
+
key: X(e),
|
|
1291
1306
|
item: e,
|
|
1292
1307
|
level: 0,
|
|
1293
|
-
onClick:
|
|
1294
|
-
onToggle:
|
|
1295
|
-
}, null, 8, ["item"]))), 128))], 512), [[L,
|
|
1308
|
+
onClick: Ce,
|
|
1309
|
+
onToggle: fe
|
|
1310
|
+
}, null, 8, ["item"]))), 128))], 512), [[L, pe(X(t))]])]),
|
|
1296
1311
|
_: 2
|
|
1297
1312
|
}, 1024)]), c[3] ||= s("div", { class: "me-menu__section-divider" }, null, -1)], 64)) : (C(), o("div", {
|
|
1298
1313
|
key: 2,
|
|
1299
1314
|
class: _(["me-menu__item me-menu__item--standalone", {
|
|
1300
|
-
"is-active":
|
|
1315
|
+
"is-active": se.value === X(t),
|
|
1301
1316
|
"is-disabled": !t.enableFlag
|
|
1302
1317
|
}]),
|
|
1303
|
-
onClick: (e) =>
|
|
1318
|
+
onClick: (e) => Ce(t)
|
|
1304
1319
|
}, [
|
|
1305
1320
|
t.icon ? (C(), i(P(Fe), {
|
|
1306
1321
|
key: 0,
|
|
@@ -1313,7 +1328,7 @@ var it = rt, at = { class: "me-menu__tree-text" }, ot = { class: "me-menu__tree-
|
|
|
1313
1328
|
key: 1,
|
|
1314
1329
|
count: t.meta?.dot ? void 0 : t.meta?.badge,
|
|
1315
1330
|
dot: !!t.meta?.dot,
|
|
1316
|
-
color:
|
|
1331
|
+
color: le(t.meta?.badgeColor),
|
|
1317
1332
|
class: "me-menu__item-badge"
|
|
1318
1333
|
}, null, 8, [
|
|
1319
1334
|
"count",
|
|
@@ -1323,13 +1338,13 @@ var it = rt, at = { class: "me-menu__tree-text" }, ot = { class: "me-menu__tree-
|
|
|
1323
1338
|
], 10, wt))], 64))), 128))])], 6), [[L, H.value]]),
|
|
1324
1339
|
t.showRightToggle ? (C(), o("div", {
|
|
1325
1340
|
key: 0,
|
|
1326
|
-
class: _(["me-menu__right-toggle", { "is-visible":
|
|
1327
|
-
style: y(
|
|
1328
|
-
onClick:
|
|
1329
|
-
}, [k(r.$slots, "right-toggle", { collapsed: V.value }, () => [V.value ? (C(), i(P(
|
|
1341
|
+
class: _(["me-menu__right-toggle", { "is-visible": te.value }]),
|
|
1342
|
+
style: y(Y.value),
|
|
1343
|
+
onClick: xe
|
|
1344
|
+
}, [k(r.$slots, "right-toggle", { collapsed: V.value }, () => [V.value ? (C(), i(P(q), {
|
|
1330
1345
|
key: 0,
|
|
1331
1346
|
size: 14
|
|
1332
|
-
})) : (C(), i(P(
|
|
1347
|
+
})) : (C(), i(P(K), {
|
|
1333
1348
|
key: 1,
|
|
1334
1349
|
size: 14
|
|
1335
1350
|
}))])], 6)) : a("", !0)
|
|
@@ -1535,24 +1550,24 @@ var At = {
|
|
|
1535
1550
|
"close-all"
|
|
1536
1551
|
],
|
|
1537
1552
|
setup(t, { expose: n, emit: c }) {
|
|
1538
|
-
let l = t, d = c, f = r(() => l.tabProps.key ?? "path"), m = r(() => l.tabProps.label ?? "title"), h = r(() => l.tabProps.isHome ?? "isHome"), v = r(() => l.tabProps.lock ?? "lock"), S = r(() => l.tabProps.icon ?? "icon"), w = r(() => l.width ? typeof l.width == "number" ? `${l.width}px` : l.width : ""), T = r(() => l.titleMaxWidth === void 0 ? {} : { maxWidth: typeof l.titleMaxWidth == "number" ? `${l.titleMaxWidth}px` : l.titleMaxWidth }), D = r(() => l.titleMaxWidth !== void 0), M = (e) => e ? (typeof e == "object" || typeof e == "function") && typeof e != "string" : !1, F = E(null), I = E(null), L = E(null), B = E(l.modelValue), { translateX: H, showLeftArrow: ee, showRightArrow: W, isSmooth:
|
|
1553
|
+
let l = t, d = c, f = r(() => l.tabProps.key ?? "path"), m = r(() => l.tabProps.label ?? "title"), h = r(() => l.tabProps.isHome ?? "isHome"), v = r(() => l.tabProps.lock ?? "lock"), S = r(() => l.tabProps.icon ?? "icon"), w = r(() => l.width ? typeof l.width == "number" ? `${l.width}px` : l.width : ""), T = r(() => l.titleMaxWidth === void 0 ? {} : { maxWidth: typeof l.titleMaxWidth == "number" ? `${l.titleMaxWidth}px` : l.titleMaxWidth }), D = r(() => l.titleMaxWidth !== void 0), M = (e) => e ? (typeof e == "object" || typeof e == "function") && typeof e != "string" : !1, F = E(null), I = E(null), L = E(null), B = E(l.modelValue), { translateX: H, showLeftArrow: ee, showRightArrow: W, isSmooth: G, isScrollable: K, withSmooth: q, updateArrowVisibility: J, clampTranslateX: Y, scrollLeft: te, scrollRight: ne, canScroll: re } = Ot(I, L), X = null;
|
|
1539
1554
|
R(H, (e) => {
|
|
1540
|
-
|
|
1541
|
-
|
|
1555
|
+
X === null && (X = requestAnimationFrame(() => {
|
|
1556
|
+
X = null, d("scroll", e);
|
|
1542
1557
|
}));
|
|
1543
1558
|
}), b(() => {
|
|
1544
|
-
|
|
1559
|
+
X !== null && cancelAnimationFrame(X);
|
|
1545
1560
|
});
|
|
1546
|
-
let { isDragging:
|
|
1547
|
-
canScroll:
|
|
1561
|
+
let { isDragging: Z, handleDragStart: Q, handleTouchStart: ie, setDragRefs: ae, getHasDragged: $, resetHasDragged: oe } = kt({
|
|
1562
|
+
canScroll: re,
|
|
1548
1563
|
translateX: H,
|
|
1549
|
-
clampTranslateX:
|
|
1550
|
-
updateArrowVisibility:
|
|
1564
|
+
clampTranslateX: Y,
|
|
1565
|
+
updateArrowVisibility: J
|
|
1551
1566
|
}), se = 0, ce = null, le = (e) => {
|
|
1552
|
-
if (!
|
|
1567
|
+
if (!re()) return;
|
|
1553
1568
|
let t = Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY;
|
|
1554
1569
|
t !== 0 && (e.preventDefault(), se += t, ce === null && (ce = requestAnimationFrame(() => {
|
|
1555
|
-
ce = null, H.value -= se, se = 0,
|
|
1570
|
+
ce = null, H.value -= se, se = 0, Y(), J();
|
|
1556
1571
|
})));
|
|
1557
1572
|
};
|
|
1558
1573
|
b(() => {
|
|
@@ -1572,10 +1587,10 @@ var At = {
|
|
|
1572
1587
|
let n = I.value.getBoundingClientRect(), r = t.getBoundingClientRect();
|
|
1573
1588
|
if (r.left >= n.left && r.right <= n.right) return;
|
|
1574
1589
|
let i = l.scrollTargetOffset, a = i <= 1 ? n.width * i : i, o;
|
|
1575
|
-
o = r.left < n.left ? r.left - n.left - a : r.right - n.right + a, !(Math.abs(o) < 1) && (
|
|
1590
|
+
o = r.left < n.left ? r.left - n.left - a : r.right - n.right + a, !(Math.abs(o) < 1) && (G.value = !0, requestAnimationFrame(() => {
|
|
1576
1591
|
requestAnimationFrame(() => {
|
|
1577
|
-
H.value -= o,
|
|
1578
|
-
|
|
1592
|
+
H.value -= o, Y(), J(), setTimeout(() => {
|
|
1593
|
+
G.value = !1;
|
|
1579
1594
|
}, 300);
|
|
1580
1595
|
});
|
|
1581
1596
|
}));
|
|
@@ -1584,12 +1599,12 @@ var At = {
|
|
|
1584
1599
|
let t = e ?? B.value;
|
|
1585
1600
|
t && fe(t);
|
|
1586
1601
|
}, me = () => {
|
|
1587
|
-
|
|
1588
|
-
H.value = 0,
|
|
1602
|
+
q(() => {
|
|
1603
|
+
H.value = 0, Y(), J();
|
|
1589
1604
|
});
|
|
1590
1605
|
}, he = () => {
|
|
1591
|
-
|
|
1592
|
-
!I.value || !L.value || (H.value = I.value.clientWidth - L.value.scrollWidth,
|
|
1606
|
+
q(() => {
|
|
1607
|
+
!I.value || !L.value || (H.value = I.value.clientWidth - L.value.scrollWidth, Y(), J());
|
|
1593
1608
|
});
|
|
1594
1609
|
}, ge = (e) => l.closable ? !e[h.value] && !e[v.value] : !1, _e = {
|
|
1595
1610
|
refresh: "RefreshCw",
|
|
@@ -1750,22 +1765,22 @@ var At = {
|
|
|
1750
1765
|
B.value = e, pe(e);
|
|
1751
1766
|
}), R(() => l.tabList, () => {
|
|
1752
1767
|
g(() => {
|
|
1753
|
-
pe(B.value),
|
|
1768
|
+
pe(B.value), J();
|
|
1754
1769
|
});
|
|
1755
1770
|
}, {
|
|
1756
1771
|
flush: "post",
|
|
1757
1772
|
deep: !0
|
|
1758
1773
|
}), R(() => l.width, () => {
|
|
1759
1774
|
g(() => {
|
|
1760
|
-
|
|
1775
|
+
Y(), J(), pe(B.value);
|
|
1761
1776
|
});
|
|
1762
1777
|
});
|
|
1763
1778
|
let Ee = null, De = () => {
|
|
1764
|
-
|
|
1779
|
+
Y(), J(), pe(B.value);
|
|
1765
1780
|
};
|
|
1766
1781
|
return x(() => {
|
|
1767
1782
|
ae(I.value, L.value), g(() => {
|
|
1768
|
-
|
|
1783
|
+
J(), B.value && pe(B.value);
|
|
1769
1784
|
}), typeof ResizeObserver < "u" && I.value && (Ee = new ResizeObserver(() => {
|
|
1770
1785
|
De();
|
|
1771
1786
|
}), Ee.observe(I.value));
|
|
@@ -1792,26 +1807,26 @@ var At = {
|
|
|
1792
1807
|
class: _(["me-nav__arrow me-nav__arrow--left", { "is-hidden": !P(ee) }]),
|
|
1793
1808
|
role: "button",
|
|
1794
1809
|
"aria-label": "向左滚动",
|
|
1795
|
-
onClick: r[0] ||= (...e) => P(
|
|
1810
|
+
onClick: r[0] ||= (...e) => P(te) && P(te)(...e)
|
|
1796
1811
|
}, [u(Me, {
|
|
1797
1812
|
name: "ChevronLeft",
|
|
1798
1813
|
size: 14
|
|
1799
1814
|
})], 2),
|
|
1800
1815
|
s("div", {
|
|
1801
1816
|
class: _(["me-nav__scroll", {
|
|
1802
|
-
"is-dragging": P(
|
|
1803
|
-
"is-scrollable": P(
|
|
1817
|
+
"is-dragging": P(Z),
|
|
1818
|
+
"is-scrollable": P(K)
|
|
1804
1819
|
}]),
|
|
1805
1820
|
ref_key: "scrollRef",
|
|
1806
1821
|
ref: I,
|
|
1807
1822
|
onWheel: le,
|
|
1808
|
-
onMousedown: r[1] ||= (...e) => P(
|
|
1809
|
-
onTouchstartPassive: r[2] ||= (...e) => P(
|
|
1823
|
+
onMousedown: r[1] ||= (...e) => P(Q) && P(Q)(...e),
|
|
1824
|
+
onTouchstartPassive: r[2] ||= (...e) => P(ie) && P(ie)(...e),
|
|
1810
1825
|
onContextmenu: r[3] ||= V(() => {}, ["prevent"])
|
|
1811
1826
|
}, [
|
|
1812
1827
|
t.edgeFade && P(ee) ? (C(), o("div", jt)) : a("", !0),
|
|
1813
1828
|
s("div", {
|
|
1814
|
-
class: _(["me-nav__list", { "is-smooth": P(
|
|
1829
|
+
class: _(["me-nav__list", { "is-smooth": P(G) }]),
|
|
1815
1830
|
ref_key: "listRef",
|
|
1816
1831
|
ref: L,
|
|
1817
1832
|
style: y({ transform: `translateX(${P(H)}px)` })
|
|
@@ -1883,7 +1898,7 @@ var At = {
|
|
|
1883
1898
|
class: _(["me-nav__arrow me-nav__arrow--right", { "is-hidden": !P(W) }]),
|
|
1884
1899
|
role: "button",
|
|
1885
1900
|
"aria-label": "向右滚动",
|
|
1886
|
-
onClick: r[4] ||= (...e) => P(
|
|
1901
|
+
onClick: r[4] ||= (...e) => P(ne) && P(ne)(...e)
|
|
1887
1902
|
}, [u(Me, {
|
|
1888
1903
|
name: "ChevronRight",
|
|
1889
1904
|
size: 14
|
|
@@ -2153,10 +2168,10 @@ var Bt = zt, Vt = { class: "me-skeleton__card-body" }, Ht = { class: "me-skeleto
|
|
|
2153
2168
|
type: "button",
|
|
2154
2169
|
title: g.value ? "退出全屏" : "全屏",
|
|
2155
2170
|
onClick: V(S, ["stop"])
|
|
2156
|
-
}, [g.value ? (C(), i(P(
|
|
2171
|
+
}, [g.value ? (C(), i(P(X), {
|
|
2157
2172
|
key: 1,
|
|
2158
2173
|
size: 16
|
|
2159
|
-
})) : (C(), i(P(
|
|
2174
|
+
})) : (C(), i(P(ne), {
|
|
2160
2175
|
key: 0,
|
|
2161
2176
|
size: 16
|
|
2162
2177
|
}))], 8, Yt)) : a("", !0), e.closable ? (C(), o("button", {
|
|
@@ -2165,7 +2180,7 @@ var Bt = zt, Vt = { class: "me-skeleton__card-body" }, Ht = { class: "me-skeleto
|
|
|
2165
2180
|
type: "button",
|
|
2166
2181
|
title: "关闭",
|
|
2167
2182
|
onClick: V(w, ["stop"])
|
|
2168
|
-
}, [u(P(
|
|
2183
|
+
}, [u(P(ie), { size: 16 })])) : a("", !0)])]),
|
|
2169
2184
|
s("div", {
|
|
2170
2185
|
class: "me-modal__body",
|
|
2171
2186
|
style: y(e.bodyStyle)
|
|
@@ -3045,7 +3060,7 @@ var Cn = Sn, wn = { class: "me-tree-menu-edit__scroll" }, Tn = { class: "me-tree
|
|
|
3045
3060
|
};
|
|
3046
3061
|
return r(c.list);
|
|
3047
3062
|
}), L = E(""), B = () => {
|
|
3048
|
-
L.value = "create",
|
|
3063
|
+
L.value = "create", Y(), d("create");
|
|
3049
3064
|
}, H = async () => {
|
|
3050
3065
|
await m.value?.validate() && d("update", c.form);
|
|
3051
3066
|
}, ee = (e) => [
|
|
@@ -3053,21 +3068,21 @@ var Cn = Sn, wn = { class: "me-tree-menu-edit__scroll" }, Tn = { class: "me-tree
|
|
|
3053
3068
|
label: `添加子${c.label}`,
|
|
3054
3069
|
icon: "PlusCircle",
|
|
3055
3070
|
onClick: () => {
|
|
3056
|
-
L.value = "create-child",
|
|
3071
|
+
L.value = "create-child", Y(), d("context-menu-add", e);
|
|
3057
3072
|
}
|
|
3058
3073
|
},
|
|
3059
3074
|
{
|
|
3060
3075
|
label: `编辑${c.label}`,
|
|
3061
3076
|
icon: "Pencil",
|
|
3062
3077
|
onClick: () => {
|
|
3063
|
-
L.value = "edit",
|
|
3078
|
+
L.value = "edit", Y(), d("context-menu-edit", e);
|
|
3064
3079
|
}
|
|
3065
3080
|
},
|
|
3066
3081
|
{
|
|
3067
3082
|
label: `复制${c.label}`,
|
|
3068
3083
|
icon: "Copy",
|
|
3069
3084
|
onClick: () => {
|
|
3070
|
-
L.value = "copy",
|
|
3085
|
+
L.value = "copy", Y(), d("context-menu-copy", e);
|
|
3071
3086
|
}
|
|
3072
3087
|
},
|
|
3073
3088
|
{
|
|
@@ -3091,18 +3106,18 @@ var Cn = Sn, wn = { class: "me-tree-menu-edit__scroll" }, Tn = { class: "me-tree
|
|
|
3091
3106
|
}
|
|
3092
3107
|
})),
|
|
3093
3108
|
onClick: () => {}
|
|
3094
|
-
}),
|
|
3109
|
+
}), G = (e) => {
|
|
3095
3110
|
e.event.preventDefault();
|
|
3096
3111
|
let t = e.node?.dataRef || e.node || {}, n = D.value.key || "id";
|
|
3097
3112
|
v.value = [t[n]];
|
|
3098
|
-
},
|
|
3113
|
+
}, K = (e, t) => {
|
|
3099
3114
|
if (v.value = e, e.length > 0 && t?.node) {
|
|
3100
3115
|
let e = t.node.dataRef || t.node || {};
|
|
3101
|
-
L.value = "edit",
|
|
3116
|
+
L.value = "edit", Y(), d("node-click", e);
|
|
3102
3117
|
}
|
|
3103
|
-
},
|
|
3118
|
+
}, q = (e) => {
|
|
3104
3119
|
if (!c.fetchDataHandle) return;
|
|
3105
|
-
let t = e.dragNode, n = e.node, r = e.dropPosition, i = D.value.key || "id", a = D.value.children || "children", o = String(t[i]), s = r === 0 ? String(n[i]) : n.parentId || n.parentNode?.[i] || "0", l =
|
|
3120
|
+
let t = e.dragNode, n = e.node, r = e.dropPosition, i = D.value.key || "id", a = D.value.children || "children", o = String(t[i]), s = r === 0 ? String(n[i]) : n.parentId || n.parentNode?.[i] || "0", l = J(n, r, o, i, a), u = c.moveConfirm.title || "提示", d = c.moveConfirm.message || "确定保存移动吗?", f = c.moveConfirm.type || "danger";
|
|
3106
3121
|
if (!c.showMoveConfirm) {
|
|
3107
3122
|
c.apiMoveHandle?.({
|
|
3108
3123
|
id: o,
|
|
@@ -3138,18 +3153,18 @@ var Cn = Sn, wn = { class: "me-tree-menu-edit__scroll" }, Tn = { class: "me-tree
|
|
|
3138
3153
|
cancel: () => (c.fetchDataHandle?.({ expandKeys: [s] }), !0)
|
|
3139
3154
|
}
|
|
3140
3155
|
});
|
|
3141
|
-
},
|
|
3156
|
+
}, J = (e, t, n, r, i) => {
|
|
3142
3157
|
let a = e.parentNode?.[i] || e.parent?.children || c.list, o = [];
|
|
3143
3158
|
for (let i of a) {
|
|
3144
3159
|
let a = String(i[r]);
|
|
3145
3160
|
a !== n && t !== 0 && (t === -1 && a === String(e[r]) ? (o.push(n), o.push(a)) : t === 1 && a === String(e[r]) ? (o.push(a), o.push(n)) : o.push(a));
|
|
3146
3161
|
}
|
|
3147
3162
|
return t === 0 ? [...e[i]?.map((e) => String(e[r])) || [], n] : o;
|
|
3148
|
-
},
|
|
3163
|
+
}, Y = () => {
|
|
3149
3164
|
c.openHandle ? c.openHandle() : m.value?.open();
|
|
3150
3165
|
};
|
|
3151
3166
|
return t({
|
|
3152
|
-
open:
|
|
3167
|
+
open: Y,
|
|
3153
3168
|
close: () => {
|
|
3154
3169
|
m.value?.close();
|
|
3155
3170
|
},
|
|
@@ -3210,9 +3225,9 @@ var Cn = Sn, wn = { class: "me-tree-menu-edit__scroll" }, Tn = { class: "me-tree
|
|
|
3210
3225
|
"expanded-keys": _.value,
|
|
3211
3226
|
"selected-keys": v.value,
|
|
3212
3227
|
"onUpdate:expandedKeys": S,
|
|
3213
|
-
onSelect:
|
|
3214
|
-
onRightClick:
|
|
3215
|
-
onDrop:
|
|
3228
|
+
onSelect: K,
|
|
3229
|
+
onRightClick: G,
|
|
3230
|
+
onDrop: q
|
|
3216
3231
|
}, {
|
|
3217
3232
|
titleRender: z((e) => [s("div", Nn, [s("div", Pn, [k(t.$slots, "label", { data: e }, () => [u(rn, {
|
|
3218
3233
|
actions: h.value,
|
|
@@ -7319,7 +7334,7 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
7319
7334
|
})(e);
|
|
7320
7335
|
}
|
|
7321
7336
|
n.r(t), n.d(t, { treeModeMixins: function() {
|
|
7322
|
-
return
|
|
7337
|
+
return ne;
|
|
7323
7338
|
} });
|
|
7324
7339
|
function i(e) {
|
|
7325
7340
|
return c(e) ? e : String(e);
|
|
@@ -9587,7 +9602,7 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
9587
9602
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
9588
9603
|
})(e);
|
|
9589
9604
|
}
|
|
9590
|
-
function
|
|
9605
|
+
function G(e, t) {
|
|
9591
9606
|
for (var n = 0; n < t.length; n++) {
|
|
9592
9607
|
var r = t[n];
|
|
9593
9608
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, ((e) => (e = ((e, t) => {
|
|
@@ -9599,7 +9614,7 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
9599
9614
|
})(e, "string"), W(e) == "symbol" ? e : e + ""))(r.key), r);
|
|
9600
9615
|
}
|
|
9601
9616
|
}
|
|
9602
|
-
var
|
|
9617
|
+
var K = (() => {
|
|
9603
9618
|
function e(t, n) {
|
|
9604
9619
|
if (!(this instanceof e)) throw TypeError("Cannot call a class as a function");
|
|
9605
9620
|
var r = this, t = (this.editor = t, this.timeout = void 0, this.delay = 200, this.lastText = void 0, this.results = null, this.dom = {}, this.dom.container = n, document.createElement("div")), n = ((this.dom.wrapper = t).className = "jsoneditor-search", n.appendChild(t), document.createElement("div")), n = ((this.dom.results = n).className = "jsoneditor-results", t.appendChild(n), document.createElement("div")), t = ((this.dom.input = n).className = "jsoneditor-frame", n.title = (0, _.Tl)("searchTitle"), t.appendChild(n), document.createElement("button")), i = (t.type = "button", t.className = "jsoneditor-refresh", n.appendChild(t), document.createElement("input")), t = (i.type = "text", (this.dom.search = i).oninput = function(e) {
|
|
@@ -9715,29 +9730,29 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
9715
9730
|
this.editor = null, this.dom.container.removeChild(this.dom.wrapper), this.dom = null, this.results = null, this.activeResult = null, this._clearDelay();
|
|
9716
9731
|
}
|
|
9717
9732
|
}
|
|
9718
|
-
]) &&
|
|
9733
|
+
]) && G(t.prototype, n), r && G(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t;
|
|
9719
9734
|
var t, n, r;
|
|
9720
9735
|
})();
|
|
9721
|
-
function
|
|
9722
|
-
return (
|
|
9736
|
+
function q(e) {
|
|
9737
|
+
return (q = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
9723
9738
|
return typeof e;
|
|
9724
9739
|
} : function(e) {
|
|
9725
9740
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
9726
9741
|
})(e);
|
|
9727
9742
|
}
|
|
9728
|
-
function
|
|
9743
|
+
function J(e, t) {
|
|
9729
9744
|
for (var n = 0; n < t.length; n++) {
|
|
9730
9745
|
var r = t[n];
|
|
9731
9746
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, ((e) => (e = ((e, t) => {
|
|
9732
|
-
if (
|
|
9747
|
+
if (q(e) != "object" || !e) return e;
|
|
9733
9748
|
var n = e[Symbol.toPrimitive];
|
|
9734
9749
|
if (n === void 0) return (t === "string" ? String : Number)(e);
|
|
9735
|
-
if (
|
|
9750
|
+
if (q(n = n.call(e, t || "default")) != "object") return n;
|
|
9736
9751
|
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
9737
|
-
})(e, "string"),
|
|
9752
|
+
})(e, "string"), q(e) == "symbol" ? e : e + ""))(r.key), r);
|
|
9738
9753
|
}
|
|
9739
9754
|
}
|
|
9740
|
-
var
|
|
9755
|
+
var Y = (() => {
|
|
9741
9756
|
function e(t, n) {
|
|
9742
9757
|
if (!(this instanceof e)) throw TypeError("Cannot call a class as a function");
|
|
9743
9758
|
t && (this.root = n, this.path = document.createElement("div"), this.path.className = "jsoneditor-treepath", this.path.setAttribute("tabindex", 0), this.contentMenuClicked = !1, t.appendChild(this.path), this.reset());
|
|
@@ -9789,9 +9804,9 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
9789
9804
|
typeof e == "function" && (this.contextMenuCallback = e);
|
|
9790
9805
|
}
|
|
9791
9806
|
}
|
|
9792
|
-
]) &&
|
|
9807
|
+
]) && J(t.prototype, n), r && J(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t;
|
|
9793
9808
|
var t, n, r;
|
|
9794
|
-
})(), t = n(1746),
|
|
9809
|
+
})(), t = n(1746), te = n.n(t), n = {
|
|
9795
9810
|
create: function(e, t) {
|
|
9796
9811
|
if (!e) throw Error("No container element provided.");
|
|
9797
9812
|
this.container = e, this.dom = {}, this.highlighter = new g(), this.selection = void 0, this.multiselection = { nodes: [] }, this.validateSchema = null, this.validationSequence = 0, this.errorNodes = [], this.lastSchemaErrors = void 0, this.node = null, this.focusTarget = null, this._setOptions(t), t.autocomplete && (this.autocomplete = d(t.autocomplete)), this.options.history && this.options.mode !== "view" && (this.history = new U(this)), this._createFrame(), this._createTable();
|
|
@@ -9816,7 +9831,7 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
9816
9831
|
colorPicker: !0,
|
|
9817
9832
|
onColorPicker: function(e, t, n) {
|
|
9818
9833
|
var r;
|
|
9819
|
-
|
|
9834
|
+
te() ? (r = e.getBoundingClientRect().top, r = (0, S.getWindow)(e).innerHeight - r < 300 && 300 < r, new (te())({
|
|
9820
9835
|
parent: e,
|
|
9821
9836
|
color: t,
|
|
9822
9837
|
popup: r ? "top" : "bottom",
|
|
@@ -10091,7 +10106,7 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
10091
10106
|
} catch (e) {
|
|
10092
10107
|
a._onError(e);
|
|
10093
10108
|
}
|
|
10094
|
-
})), this.options.search) && (this.searchBox = new
|
|
10109
|
+
})), this.options.search) && (this.searchBox = new K(this, this.menu)), this.options.navigationBar && (this.navBar = document.createElement("div"), this.navBar.className = "jsoneditor-navigation-bar nav-bar-empty", this.frame.appendChild(this.navBar), this.treePath = new Y(this.navBar, this.getPopupAnchor()), this.treePath.onSectionSelected(this._onTreePathSectionSelected.bind(this)), this.treePath.onContextMenuItemSelected(this._onTreePathMenuItemSelected.bind(this)));
|
|
10095
10110
|
},
|
|
10096
10111
|
_onUndo: function() {
|
|
10097
10112
|
this.history && (this.history.undo(), this._onChange());
|
|
@@ -10276,7 +10291,7 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
10276
10291
|
n.push(e.serialize());
|
|
10277
10292
|
}), n;
|
|
10278
10293
|
}
|
|
10279
|
-
},
|
|
10294
|
+
}, ne = [
|
|
10280
10295
|
{
|
|
10281
10296
|
mode: "tree",
|
|
10282
10297
|
mixin: n,
|
|
@@ -10325,13 +10340,13 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
10325
10340
|
return v;
|
|
10326
10341
|
},
|
|
10327
10342
|
compileJSONPointer: function() {
|
|
10328
|
-
return
|
|
10343
|
+
return Q;
|
|
10329
10344
|
},
|
|
10330
10345
|
contains: function() {
|
|
10331
10346
|
return ge;
|
|
10332
10347
|
},
|
|
10333
10348
|
debounce: function() {
|
|
10334
|
-
return
|
|
10349
|
+
return te;
|
|
10335
10350
|
},
|
|
10336
10351
|
escapeUnicodeChars: function() {
|
|
10337
10352
|
return h;
|
|
@@ -10358,22 +10373,22 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
10358
10373
|
return ce;
|
|
10359
10374
|
},
|
|
10360
10375
|
getColorCSS: function() {
|
|
10361
|
-
return
|
|
10376
|
+
return ie;
|
|
10362
10377
|
},
|
|
10363
10378
|
getIndexForPosition: function() {
|
|
10364
|
-
return
|
|
10379
|
+
return X;
|
|
10365
10380
|
},
|
|
10366
10381
|
getInnerText: function() {
|
|
10367
10382
|
return I;
|
|
10368
10383
|
},
|
|
10369
10384
|
getInputSelection: function() {
|
|
10370
|
-
return
|
|
10385
|
+
return re;
|
|
10371
10386
|
},
|
|
10372
10387
|
getInternetExplorerVersion: function() {
|
|
10373
10388
|
return z;
|
|
10374
10389
|
},
|
|
10375
10390
|
getPositionForPath: function() {
|
|
10376
|
-
return
|
|
10391
|
+
return Z;
|
|
10377
10392
|
},
|
|
10378
10393
|
getSelection: function() {
|
|
10379
10394
|
return M;
|
|
@@ -10391,10 +10406,10 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
10391
10406
|
return R;
|
|
10392
10407
|
},
|
|
10393
10408
|
improveSchemaError: function() {
|
|
10394
|
-
return
|
|
10409
|
+
return K;
|
|
10395
10410
|
},
|
|
10396
10411
|
insideRect: function() {
|
|
10397
|
-
return
|
|
10412
|
+
return Y;
|
|
10398
10413
|
},
|
|
10399
10414
|
isArray: function() {
|
|
10400
10415
|
return S;
|
|
@@ -10409,7 +10424,7 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
10409
10424
|
return he;
|
|
10410
10425
|
},
|
|
10411
10426
|
isPromise: function() {
|
|
10412
|
-
return
|
|
10427
|
+
return q;
|
|
10413
10428
|
},
|
|
10414
10429
|
isTimestamp: function() {
|
|
10415
10430
|
return fe;
|
|
@@ -10421,7 +10436,7 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
10421
10436
|
return ae;
|
|
10422
10437
|
},
|
|
10423
10438
|
isValidValidationError: function() {
|
|
10424
|
-
return
|
|
10439
|
+
return J;
|
|
10425
10440
|
},
|
|
10426
10441
|
isValidationErrorChanged: function() {
|
|
10427
10442
|
return _e;
|
|
@@ -10472,13 +10487,13 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
10472
10487
|
return ue;
|
|
10473
10488
|
},
|
|
10474
10489
|
stringifyPath: function() {
|
|
10475
|
-
return
|
|
10490
|
+
return G;
|
|
10476
10491
|
},
|
|
10477
10492
|
stripFormatting: function() {
|
|
10478
10493
|
return k;
|
|
10479
10494
|
},
|
|
10480
10495
|
textDiff: function() {
|
|
10481
|
-
return
|
|
10496
|
+
return ne;
|
|
10482
10497
|
},
|
|
10483
10498
|
tryJsonRepair: function() {
|
|
10484
10499
|
return m;
|
|
@@ -10700,27 +10715,27 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
10700
10715
|
}
|
|
10701
10716
|
return t;
|
|
10702
10717
|
}
|
|
10703
|
-
function
|
|
10718
|
+
function G(e) {
|
|
10704
10719
|
return e.map(function(e) {
|
|
10705
10720
|
return typeof e == "number" ? "[" + e + "]" : typeof e == "string" && e.match(/^[A-Za-z0-9_$]+$/) ? "." + e : "[\"" + e + "\"]";
|
|
10706
10721
|
}).join("");
|
|
10707
10722
|
}
|
|
10708
|
-
function
|
|
10723
|
+
function K(e) {
|
|
10709
10724
|
var t, n;
|
|
10710
10725
|
return e.keyword === "enum" && Array.isArray(e.schema) && (n = e.schema) && (5 < (n = n.map(function(e) {
|
|
10711
10726
|
return JSON.stringify(e);
|
|
10712
10727
|
})).length && (t = ["(" + (n.length - 5) + " more...)"], (n = n.slice(0, 5)).push(t)), e.message = "should be equal to one of: " + n.join(", ")), e.keyword === "additionalProperties" && (e.message = "should NOT have additional property: " + e.params.additionalProperty), e;
|
|
10713
10728
|
}
|
|
10714
|
-
function
|
|
10729
|
+
function q(e) {
|
|
10715
10730
|
return e && typeof e.then == "function" && typeof e.catch == "function";
|
|
10716
10731
|
}
|
|
10717
|
-
function
|
|
10732
|
+
function J(e) {
|
|
10718
10733
|
return u(e) === "object" && Array.isArray(e.path) && typeof e.message == "string";
|
|
10719
10734
|
}
|
|
10720
|
-
function
|
|
10735
|
+
function Y(e, t, n) {
|
|
10721
10736
|
return n = n === void 0 ? 0 : n, t.left - n >= e.left && t.right + n <= e.right && t.top - n >= e.top && t.bottom + n <= e.bottom;
|
|
10722
10737
|
}
|
|
10723
|
-
function
|
|
10738
|
+
function te(e, t, n) {
|
|
10724
10739
|
var r;
|
|
10725
10740
|
return function() {
|
|
10726
10741
|
var i = this, a = arguments, o = n && !r;
|
|
@@ -10729,7 +10744,7 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
10729
10744
|
}, t), o && e.apply(i, a);
|
|
10730
10745
|
};
|
|
10731
10746
|
}
|
|
10732
|
-
function
|
|
10747
|
+
function ne(e, t) {
|
|
10733
10748
|
for (var n = t.length, r = 0, i = e.length, a = t.length; t.charAt(r) === e.charAt(r) && r < n;) r++;
|
|
10734
10749
|
for (; t.charAt(a - 1) === e.charAt(i - 1) && r < a && 0 < i;) a--, i--;
|
|
10735
10750
|
return {
|
|
@@ -10737,7 +10752,7 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
10737
10752
|
end: a
|
|
10738
10753
|
};
|
|
10739
10754
|
}
|
|
10740
|
-
function
|
|
10755
|
+
function re(e) {
|
|
10741
10756
|
var t, n, r, i, a = 0, o = 0;
|
|
10742
10757
|
return typeof e.selectionStart == "number" && typeof e.selectionEnd == "number" ? (a = e.selectionStart, o = e.selectionEnd) : (i = document.selection.createRange()) && i.parentElement() === e && (r = e.value.length, t = e.value.replace(/\r\n/g, "\n"), (n = e.createTextRange()).moveToBookmark(i.getBookmark()), (i = e.createTextRange()).collapse(!1), -1 < n.compareEndPoints("StartToEnd", i) ? a = o = r : (a = -n.moveStart("character", -r), a += t.slice(0, a).split("\n").length - 1, -1 < n.compareEndPoints("EndToEnd", i) ? o = r : (o = -n.moveEnd("character", -r), o += t.slice(0, o).split("\n").length - 1))), {
|
|
10743
10758
|
startIndex: a,
|
|
@@ -10752,11 +10767,11 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
10752
10767
|
};
|
|
10753
10768
|
}
|
|
10754
10769
|
}
|
|
10755
|
-
function
|
|
10770
|
+
function X(e, t, n) {
|
|
10756
10771
|
var e = e.value || "";
|
|
10757
10772
|
return 0 < t && 0 < n ? (e = e.split("\n", t), t = Math.min(e.length, t), n = Math.min(e[t - 1].length, n - 1), n = t === 1 ? n : n + 1, e.slice(0, t - 1).join("\n").length + n) : -1;
|
|
10758
10773
|
}
|
|
10759
|
-
function
|
|
10774
|
+
function Z(e, t) {
|
|
10760
10775
|
var n, r = [];
|
|
10761
10776
|
if (t && t.length) {
|
|
10762
10777
|
try {
|
|
@@ -10765,7 +10780,7 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
10765
10780
|
return r;
|
|
10766
10781
|
}
|
|
10767
10782
|
t.forEach(function(e) {
|
|
10768
|
-
var t =
|
|
10783
|
+
var t = Q(W(e)), t = n.pointers[t];
|
|
10769
10784
|
t && r.push({
|
|
10770
10785
|
path: e,
|
|
10771
10786
|
line: t.key ? t.key.line : t.value ? t.value.line : 0,
|
|
@@ -10775,17 +10790,17 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
10775
10790
|
}
|
|
10776
10791
|
return r;
|
|
10777
10792
|
}
|
|
10778
|
-
function
|
|
10793
|
+
function Q(e) {
|
|
10779
10794
|
return e.map(function(e) {
|
|
10780
10795
|
return "/" + String(e).replace(/~/g, "~0").replace(/\//g, "~1");
|
|
10781
10796
|
}).join("");
|
|
10782
10797
|
}
|
|
10783
|
-
function
|
|
10798
|
+
function ie(e) {
|
|
10784
10799
|
var t = document.createElement("div");
|
|
10785
10800
|
return t.style.color = e, t.style.color.split(/\s+/).join("").toLowerCase() || null;
|
|
10786
10801
|
}
|
|
10787
10802
|
function ae(e) {
|
|
10788
|
-
return !!
|
|
10803
|
+
return !!ie(e);
|
|
10789
10804
|
}
|
|
10790
10805
|
function $(e, t) {
|
|
10791
10806
|
var n;
|
|
@@ -24910,25 +24925,25 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
24910
24925
|
}
|
|
24911
24926
|
if (x.length) {
|
|
24912
24927
|
var F = x;
|
|
24913
|
-
if (F) for (var I = -1, L = F.length - 1; I < L;)
|
|
24928
|
+
if (F) for (var I = -1, L = F.length - 1; I < L;) ne = F[I += 1], i += " || " + e.usePattern(ne) + ".test(" + h + ") ";
|
|
24914
24929
|
}
|
|
24915
24930
|
i += " ); if (isAdditional" + a + ") { ";
|
|
24916
24931
|
}
|
|
24917
|
-
E == "all" ? i += " delete " + d + "[" + h + "]; " : (W = e.errorPath, A = "' + " + h + " + '", e.opts._errorDataPathProperty && (e.errorPath = e.util.getPathExpr(e.errorPath, h, e.opts.jsonPointers)), w ? E ? i += " delete " + d + "[" + h + "]; " : (
|
|
24932
|
+
E == "all" ? i += " delete " + d + "[" + h + "]; " : (W = e.errorPath, A = "' + " + h + " + '", e.opts._errorDataPathProperty && (e.errorPath = e.util.getPathExpr(e.errorPath, h, e.opts.jsonPointers)), w ? E ? i += " delete " + d + "[" + h + "]; " : (G = l, l = e.errSchemaPath + "/additionalProperties", (q ||= []).push(i += " " + m + " = false; "), i = "", !1 === e.createErrors ? i += " {} " : (i += " { keyword: 'additionalProperties' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(l) + " , params: { additionalProperty: '" + A + "' } ", !1 !== e.opts.messages && (i += " , message: '", e.opts._errorDataPathProperty ? i += "is an invalid additional property" : i += "should NOT have additional properties", i += "' "), e.opts.verbose && (i += " , schema: false , parentSchema: validate.schema" + e.schemaPath + " , data: " + d + " "), i += " } "), J = i, i = q.pop(), !e.compositeRule && u ? e.async ? i += " throw new ValidationError([" + J + "]); " : i += " validate.errors = [" + J + "]; return false; " : i += " var err = " + J + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", l = G, u && (i += " break; ")) : T && (E == "failing" ? (i += " var " + t + " = errors; ", D = e.compositeRule, e.compositeRule = f.compositeRule = !0, f.schema = S, f.schemaPath = e.schemaPath + ".additionalProperties", f.errSchemaPath = e.errSchemaPath + "/additionalProperties", f.errorPath = e.opts._errorDataPathProperty ? e.errorPath : e.util.getPathExpr(e.errorPath, h, e.opts.jsonPointers), Z = d + "[" + h + "]", f.dataPathArr[_] = h, Q = e.validate(f), f.baseId = k, e.util.varOccurences(Q, v) < 2 ? i += " " + e.util.varReplace(Q, v, Z) + " " : i += " var " + v + " = " + Z + "; " + Q + " ", i += " if (!" + m + ") { errors = " + t + "; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete " + d + "[" + h + "]; } ", e.compositeRule = f.compositeRule = D) : (f.schema = S, f.schemaPath = e.schemaPath + ".additionalProperties", f.errSchemaPath = e.errSchemaPath + "/additionalProperties", f.errorPath = e.opts._errorDataPathProperty ? e.errorPath : e.util.getPathExpr(e.errorPath, h, e.opts.jsonPointers), Z = d + "[" + h + "]", f.dataPathArr[_] = h, Q = e.validate(f), f.baseId = k, e.util.varOccurences(Q, v) < 2 ? i += " " + e.util.varReplace(Q, v, Z) + " " : i += " var " + v + " = " + Z + "; " + Q + " ", u && (i += " if (!" + m + ") break; "))), e.errorPath = W), C && (i += " } "), i += " } ", u && (i += " if (" + m + ") { ", p += "}");
|
|
24918
24933
|
}
|
|
24919
24934
|
var R = e.opts.useDefaults && !e.compositeRule;
|
|
24920
24935
|
if (o.length) {
|
|
24921
24936
|
var z = o;
|
|
24922
24937
|
if (z) for (var B, V = -1, H = z.length - 1; V < H;) {
|
|
24923
|
-
var ee, U, W,
|
|
24924
|
-
(e.opts.strictKeywords ? typeof
|
|
24938
|
+
var ee, U, W, G, K, q, J, Y = s[B = z[V += 1]];
|
|
24939
|
+
(e.opts.strictKeywords ? typeof Y == "object" && 0 < Object.keys(Y).length || !1 === Y : e.util.schemaHasRules(Y, e.RULES.all)) && (Z = d + (K = e.util.getProperty(B)), ee = R && Y.default !== void 0, f.schema = Y, f.schemaPath = c + K, f.errSchemaPath = l + "/" + e.util.escapeFragment(B), f.errorPath = e.util.getPath(e.errorPath, B, e.opts.jsonPointers), f.dataPathArr[_] = e.util.toQuotedString(B), Q = e.validate(f), f.baseId = k, e.util.varOccurences(Q, v) < 2 ? (Q = e.util.varReplace(Q, v, Z), U = Z) : i += " var " + (U = v) + " = " + Z + "; ", ee ? i += " " + Q + " " : (r && r[B] ? (i += " if ( " + U + " === undefined ", O && (i += " || ! Object.prototype.hasOwnProperty.call(" + d + ", '" + e.util.escapeQuotes(B) + "') "), i += ") { " + m + " = false; ", W = e.errorPath, G = l, K = e.util.escapeQuotes(B), e.opts._errorDataPathProperty && (e.errorPath = e.util.getPath(W, B, e.opts.jsonPointers)), l = e.errSchemaPath + "/required", (q ||= []).push(i), i = "", !1 === e.createErrors ? i += " {} " : (i += " { keyword: 'required' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(l) + " , params: { missingProperty: '" + K + "' } ", !1 !== e.opts.messages && (i += " , message: '", e.opts._errorDataPathProperty ? i += "is a required property" : i += "should have required property \\'" + K + "\\'", i += "' "), e.opts.verbose && (i += " , schema: validate.schema" + c + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + d + " "), i += " } "), J = i, i = q.pop(), !e.compositeRule && u ? e.async ? i += " throw new ValidationError([" + J + "]); " : i += " validate.errors = [" + J + "]; return false; " : i += " var err = " + J + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", l = G, e.errorPath = W, i += " } else { ") : u ? (i += " if ( " + U + " === undefined ", O && (i += " || ! Object.prototype.hasOwnProperty.call(" + d + ", '" + e.util.escapeQuotes(B) + "') "), i += ") { " + m + " = true; } else { ") : (i += " if (" + U + " !== undefined ", O && (i += " && Object.prototype.hasOwnProperty.call(" + d + ", '" + e.util.escapeQuotes(B) + "') "), i += " ) { "), i += " " + Q + " } ")), u && (i += " if (" + m + ") { ", p += "}");
|
|
24925
24940
|
}
|
|
24926
24941
|
}
|
|
24927
24942
|
if (x.length) {
|
|
24928
|
-
var
|
|
24929
|
-
if (
|
|
24930
|
-
var
|
|
24931
|
-
(e.opts.strictKeywords ? typeof
|
|
24943
|
+
var te = x;
|
|
24944
|
+
if (te) for (var ne, re = -1, X = te.length - 1; re < X;) {
|
|
24945
|
+
var Z, Q, Y = b[ne = te[re += 1]];
|
|
24946
|
+
(e.opts.strictKeywords ? typeof Y == "object" && 0 < Object.keys(Y).length || !1 === Y : e.util.schemaHasRules(Y, e.RULES.all)) && (f.schema = Y, f.schemaPath = e.schemaPath + ".patternProperties" + e.util.getProperty(ne), f.errSchemaPath = e.errSchemaPath + "/patternProperties/" + e.util.escapeFragment(ne), i = (i += O ? " " + y + " = " + y + " || Object.keys(" + d + "); for (var " + g + "=0; " + g + "<" + y + ".length; " + g + "++) { var " + h + " = " + y + "[" + g + "]; " : " for (var " + h + " in " + d + ") { ") + " if (" + e.usePattern(ne) + ".test(" + h + ")) { ", f.errorPath = e.util.getPathExpr(e.errorPath, h, e.opts.jsonPointers), Z = d + "[" + h + "]", f.dataPathArr[_] = h, Q = e.validate(f), f.baseId = k, e.util.varOccurences(Q, v) < 2 ? i += " " + e.util.varReplace(Q, v, Z) + " " : i += " var " + v + " = " + Z + "; " + Q + " ", u && (i += " if (!" + m + ") break; "), i += " } ", u && (i += " else " + m + " = true; "), i += " } ", u) && (i += " if (" + m + ") { ", p += "}");
|
|
24932
24947
|
}
|
|
24933
24948
|
}
|
|
24934
24949
|
return u && (i += " " + p + " if (" + t + " == errors) {"), i;
|
|
@@ -25050,7 +25065,7 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
25050
25065
|
if (e.schema.$comment && e.opts.$comment && (r += " " + e.RULES.all.$comment.code(e, "$comment")), _) {
|
|
25051
25066
|
e.opts.coerceTypes && (y = e.util.coerceToTypes(e.opts.coerceTypes, _));
|
|
25052
25067
|
var y, b = e.RULES.types[_];
|
|
25053
|
-
if (y || v || !0 === b || b && !
|
|
25068
|
+
if (y || v || !0 === b || b && !K(b)) {
|
|
25054
25069
|
var x = e.schemaPath + ".type", S = e.errSchemaPath + "/type", x = e.schemaPath + ".type", S = e.errSchemaPath + "/type";
|
|
25055
25070
|
if (r += " if (" + e.util[v ? "checkDataTypes" : "checkDataType"](_, d, e.opts.strictNumbers, !0) + ") { ", y) {
|
|
25056
25071
|
var C = "dataType" + l, w = "coerced" + l, T = (r += " var " + C + " = typeof " + d + "; var " + w + " = undefined; ", e.opts.coerceTypes == "array" && (r += " if (" + C + " == 'object' && Array.isArray(" + d + ") && " + d + ".length == 1) { " + d + " = " + d + "[0]; " + C + " = typeof " + d + "; if (" + e.util.checkDataType(e.schema.type, d, e.opts.strictNumbers) + ") " + w + " = " + d + "; } "), r += " if (" + w + " !== undefined) ; ", y);
|
|
@@ -25066,7 +25081,7 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
25066
25081
|
else {
|
|
25067
25082
|
var A = e.RULES;
|
|
25068
25083
|
if (A) {
|
|
25069
|
-
for (var j = -1, M = A.length - 1; j < M;) if (
|
|
25084
|
+
for (var j = -1, M = A.length - 1; j < M;) if (K(b = A[j += 1])) {
|
|
25070
25085
|
if (b.type && (r += " if (" + e.util.checkDataType(b.type, d, e.opts.strictNumbers) + ") { "), e.opts.useDefaults) {
|
|
25071
25086
|
if (b.type == "object" && e.schema.properties) {
|
|
25072
25087
|
var N = e.schema.properties, P = Object.keys(N);
|
|
@@ -25096,7 +25111,7 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
25096
25111
|
}
|
|
25097
25112
|
}
|
|
25098
25113
|
var H, ee = b.rules;
|
|
25099
|
-
if (ee) for (var U, W = -1,
|
|
25114
|
+
if (ee) for (var U, W = -1, G = ee.length - 1; W < G;) q(U = ee[W += 1]) && (U = U.code(e, U.keyword, b.type)) && (r += " " + U + " ", m) && (h += "}");
|
|
25100
25115
|
m && (r += " " + h + " ", h = ""), b.type && (r += " } ", _) && _ === b.type && !y && (r += " else { ", x = e.schemaPath + ".type", S = e.errSchemaPath + "/type", (H ||= []).push(r), r = "", !1 === e.createErrors ? r += " {} " : (r = (r += " { keyword: 'type' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(S) + " , params: { type: '") + (v ? "" + _.join(",") : "" + _) + "' } ", !1 !== e.opts.messages && (r = (r += " , message: 'should be ") + (v ? "" + _.join(",") : "" + _) + "' "), e.opts.verbose && (r += " , schema: validate.schema" + x + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + d + " "), r += " } "), k = r, r = H.pop(), !e.compositeRule && m ? e.async ? r += " throw new ValidationError([" + k + "]); " : r += " validate.errors = [" + k + "]; return false; " : r += " var err = " + k + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", r += " } "), m && (r = (r += " if (errors === ") + (c ? "0" : "errs_" + l) + ") { ", g += "}");
|
|
25101
25116
|
}
|
|
25102
25117
|
}
|
|
@@ -25104,10 +25119,10 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
25104
25119
|
m && (r += " " + g + " "), c ? r = r + (i ? " if (errors === 0) return data; else throw new ValidationError(vErrors); " : " validate.errors = vErrors; return errors === 0; ") + " }; return validate;" : r += " var " + p + " = errors === errs_" + l + ";";
|
|
25105
25120
|
}
|
|
25106
25121
|
return r;
|
|
25107
|
-
function
|
|
25108
|
-
for (var t = e.rules, n = 0; n < t.length; n++) if (
|
|
25122
|
+
function K(e) {
|
|
25123
|
+
for (var t = e.rules, n = 0; n < t.length; n++) if (q(t[n])) return 1;
|
|
25109
25124
|
}
|
|
25110
|
-
function
|
|
25125
|
+
function q(t) {
|
|
25111
25126
|
return e.schema[t.keyword] !== void 0 || t.implements && ((t) => {
|
|
25112
25127
|
for (var n = t.implements, r = 0; r < n.length; r++) if (e.schema[n[r]] !== void 0) return 1;
|
|
25113
25128
|
})(t);
|
|
@@ -26964,14 +26979,14 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
26964
26979
|
var a, c = a.length ? a.join("") : void 0;
|
|
26965
26980
|
return c !== void 0 && (t.reference !== "suffix" && r.push("//"), r.push(c), e.path) && e.path.charAt(0) !== "/" && r.push("/"), e.path !== void 0 && (n = e.path, t.absolutePath || i && i.absolutePath || (n = U(n)), c === void 0 && (n = n.replace(/^\/\//, "/%2F")), r.push(n)), e.query !== void 0 && (r.push("?"), r.push(e.query)), e.fragment !== void 0 && (r.push("#"), r.push(e.fragment)), r.join("");
|
|
26966
26981
|
}
|
|
26967
|
-
function
|
|
26982
|
+
function G(e, t) {
|
|
26968
26983
|
var n = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : {}, r = {};
|
|
26969
26984
|
return arguments[3] || (e = z(W(e, n), n), t = z(W(t, n), n)), !(n || {}).tolerant && t.scheme ? (r.scheme = t.scheme, r.userinfo = t.userinfo, r.host = t.host, r.port = t.port, r.path = U(t.path || ""), r.query = t.query) : (t.userinfo !== void 0 || t.host !== void 0 || t.port !== void 0 ? (r.userinfo = t.userinfo, r.host = t.host, r.port = t.port, r.path = U(t.path || ""), r.query = t.query) : (t.path ? (t.path.charAt(0) === "/" ? r.path = U(t.path) : (r.path = e.userinfo === void 0 && e.host === void 0 && e.port === void 0 || e.path ? e.path ? e.path.slice(0, e.path.lastIndexOf("/") + 1) + t.path : t.path : "/" + t.path, r.path = U(r.path)), r.query = t.query) : (r.path = e.path, r.query = t.query === void 0 ? e.query : t.query), r.userinfo = e.userinfo, r.host = e.host, r.port = e.port), r.scheme = e.scheme), r.fragment = t.fragment, r;
|
|
26970
26985
|
}
|
|
26971
|
-
function
|
|
26986
|
+
function K(e, t) {
|
|
26972
26987
|
return e && e.toString().replace((t && t.iri ? s : o).PCT_ENCODED, M);
|
|
26973
26988
|
}
|
|
26974
|
-
var
|
|
26989
|
+
var q = {
|
|
26975
26990
|
scheme: "http",
|
|
26976
26991
|
domainHost: !0,
|
|
26977
26992
|
parse: function(e, t) {
|
|
@@ -26981,36 +26996,36 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
26981
26996
|
var n = String(e.scheme).toLowerCase() === "https";
|
|
26982
26997
|
return e.port !== (n ? 443 : 80) && e.port !== "" || (e.port = void 0), e.path ||= "/", e;
|
|
26983
26998
|
}
|
|
26984
|
-
},
|
|
26999
|
+
}, J = {
|
|
26985
27000
|
scheme: "https",
|
|
26986
|
-
domainHost:
|
|
26987
|
-
parse:
|
|
26988
|
-
serialize:
|
|
27001
|
+
domainHost: q.domainHost,
|
|
27002
|
+
parse: q.parse,
|
|
27003
|
+
serialize: q.serialize
|
|
26989
27004
|
};
|
|
26990
|
-
function
|
|
27005
|
+
function Y(e) {
|
|
26991
27006
|
return typeof e.secure == "boolean" ? e.secure : String(e.scheme).toLowerCase() === "wss";
|
|
26992
27007
|
}
|
|
26993
|
-
var
|
|
27008
|
+
var te = {
|
|
26994
27009
|
scheme: "ws",
|
|
26995
27010
|
domainHost: !0,
|
|
26996
27011
|
parse: function(e, t) {
|
|
26997
|
-
return e.secure =
|
|
27012
|
+
return e.secure = Y(e), e.resourceName = (e.path || "/") + (e.query ? "?" + e.query : ""), e.path = void 0, e.query = void 0, e;
|
|
26998
27013
|
},
|
|
26999
27014
|
serialize: function(e, t) {
|
|
27000
27015
|
var n, r;
|
|
27001
|
-
return e.port !== (
|
|
27016
|
+
return e.port !== (Y(e) ? 443 : 80) && e.port !== "" || (e.port = void 0), typeof e.secure == "boolean" && (e.scheme = e.secure ? "wss" : "ws", e.secure = void 0), e.resourceName &&= (r = e.resourceName.split("?"), n = (r = c(r, 2))[0], r = r[1], e.path = n && n !== "/" ? n : void 0, e.query = r, void 0), e.fragment = void 0, e;
|
|
27002
27017
|
}
|
|
27003
|
-
},
|
|
27018
|
+
}, ne = {
|
|
27004
27019
|
scheme: "wss",
|
|
27005
|
-
domainHost:
|
|
27006
|
-
parse:
|
|
27007
|
-
serialize:
|
|
27008
|
-
},
|
|
27020
|
+
domainHost: te.domainHost,
|
|
27021
|
+
parse: te.parse,
|
|
27022
|
+
serialize: te.serialize
|
|
27023
|
+
}, re = {}, X = "[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]", Z = t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]", "[\\\"\\\\]"), Q = new RegExp(X, "g"), ie = /* @__PURE__ */ RegExp("(?:(?:%[EFef][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f])|(?:%[89A-Fa-f][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f])|(?:%[0-9A-Fa-f][0-9A-Fa-f]))", "g"), ae = new RegExp(t("[^]", "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]", "[\\.]", "[\\\"]", Z), "g"), $ = new RegExp(t("[^]", X, "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"), "g"), oe = $;
|
|
27009
27024
|
function se(e) {
|
|
27010
27025
|
var t = M(e);
|
|
27011
|
-
return t.match(
|
|
27026
|
+
return t.match(Q) ? t : e;
|
|
27012
27027
|
}
|
|
27013
|
-
var
|
|
27028
|
+
var Z = {
|
|
27014
27029
|
scheme: "mailto",
|
|
27015
27030
|
parse: function(e, t) {
|
|
27016
27031
|
var n = e, r = n.to = n.path ? n.path.split(",") : [];
|
|
@@ -27022,12 +27037,12 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
27022
27037
|
for (var u = l[1].split(","), d = 0, f = u.length; d < f; ++d) r.push(u[d]);
|
|
27023
27038
|
break;
|
|
27024
27039
|
case "subject":
|
|
27025
|
-
n.subject =
|
|
27040
|
+
n.subject = K(l[1], t);
|
|
27026
27041
|
break;
|
|
27027
27042
|
case "body":
|
|
27028
|
-
n.body =
|
|
27043
|
+
n.body = K(l[1], t);
|
|
27029
27044
|
break;
|
|
27030
|
-
default: i = !0, a[
|
|
27045
|
+
default: i = !0, a[K(l[0], t)] = K(l[1], t);
|
|
27031
27046
|
}
|
|
27032
27047
|
}
|
|
27033
27048
|
i && (n.headers = a);
|
|
@@ -27035,9 +27050,9 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
27035
27050
|
n.query = void 0;
|
|
27036
27051
|
for (var p = 0, m = r.length; p < m; ++p) {
|
|
27037
27052
|
var h = r[p].split("@");
|
|
27038
|
-
if (h[0] =
|
|
27053
|
+
if (h[0] = K(h[0]), t.unicodeSupport) h[1] = K(h[1], t).toLowerCase();
|
|
27039
27054
|
else try {
|
|
27040
|
-
h[1] = O(
|
|
27055
|
+
h[1] = O(K(h[1], t).toLowerCase());
|
|
27041
27056
|
} catch (e) {
|
|
27042
27057
|
n.error = n.error || "Email address's domain name can not be converted to ASCII via punycode: " + e;
|
|
27043
27058
|
}
|
|
@@ -27049,9 +27064,9 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
27049
27064
|
var n, r = e, a = (n = e.to) == null ? [] : n instanceof Array ? n : typeof n.length != "number" || n.split || n.setInterval || n.call ? [n] : Array.prototype.slice.call(n);
|
|
27050
27065
|
if (a) {
|
|
27051
27066
|
for (var o = 0, s = a.length; o < s; ++o) {
|
|
27052
|
-
var c = String(a[o]), l = c.lastIndexOf("@"), u = c.slice(0, l).replace(
|
|
27067
|
+
var c = String(a[o]), l = c.lastIndexOf("@"), u = c.slice(0, l).replace(ie, se).replace(ie, i).replace(ae, j), c = c.slice(l + 1);
|
|
27053
27068
|
try {
|
|
27054
|
-
c = t.iri ? k(c) : O(
|
|
27069
|
+
c = t.iri ? k(c) : O(K(c, t).toLowerCase());
|
|
27055
27070
|
} catch (e) {
|
|
27056
27071
|
r.error = r.error || "Email address's domain name can not be converted to " + (t.iri ? "Unicode" : "ASCII") + " via punycode: " + e;
|
|
27057
27072
|
}
|
|
@@ -27060,10 +27075,10 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
27060
27075
|
r.path = a.join(",");
|
|
27061
27076
|
}
|
|
27062
27077
|
var d, f = e.headers = e.headers || {}, p = (e.subject && (f.subject = e.subject), e.body && (f.body = e.body), []);
|
|
27063
|
-
for (d in f) f[d] !==
|
|
27078
|
+
for (d in f) f[d] !== re[d] && p.push(d.replace(ie, se).replace(ie, i).replace($, j) + "=" + f[d].replace(ie, se).replace(ie, i).replace(oe, j));
|
|
27064
27079
|
return p.length && (r.query = p.join("&")), r;
|
|
27065
27080
|
}
|
|
27066
|
-
}, ce = /^([^\:]+)\:(.*)/,
|
|
27081
|
+
}, ce = /^([^\:]+)\:(.*)/, X = {
|
|
27067
27082
|
scheme: "urn",
|
|
27068
27083
|
parse: function(e, t) {
|
|
27069
27084
|
var n, r, i = e.path && e.path.match(ce);
|
|
@@ -27083,19 +27098,19 @@ var er = /* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
27083
27098
|
return n.nss = (e.uuid || "").toLowerCase(), n;
|
|
27084
27099
|
}
|
|
27085
27100
|
};
|
|
27086
|
-
A[
|
|
27101
|
+
A[q.scheme] = q, A[J.scheme] = J, A[te.scheme] = te, A[ne.scheme] = ne, A[Z.scheme] = Z, A[X.scheme] = X, A[ue.scheme] = ue, e.SCHEMES = A, e.pctEncChar = j, e.pctDecChars = M, e.parse = z, e.removeDotSegments = U, e.serialize = W, e.resolveComponents = G, e.resolve = function(e, t, n) {
|
|
27087
27102
|
return n = ((e, t) => {
|
|
27088
27103
|
var n = e;
|
|
27089
27104
|
if (t) for (var r in t) n[r] = t[r];
|
|
27090
27105
|
return n;
|
|
27091
|
-
})({ scheme: "null" }, n), W(
|
|
27106
|
+
})({ scheme: "null" }, n), W(G(z(e, n), z(t, n), n, !0), n);
|
|
27092
27107
|
}, e.normalize = function(e, t) {
|
|
27093
27108
|
return typeof e == "string" ? e = W(z(e, t), t) : r(e) === "object" && (e = z(W(e, t), t)), e;
|
|
27094
27109
|
}, e.equal = function(e, t, n) {
|
|
27095
27110
|
return typeof e == "string" ? e = W(z(e, n), n) : r(e) === "object" && (e = W(e, n)), typeof t == "string" ? t = W(z(t, n), n) : r(t) === "object" && (t = W(t, n)), e === t;
|
|
27096
27111
|
}, e.escapeComponent = function(e, t) {
|
|
27097
27112
|
return e && e.toString().replace((t && t.iri ? s : o).ESCAPE, j);
|
|
27098
|
-
}, e.unescapeComponent =
|
|
27113
|
+
}, e.unescapeComponent = K, Object.defineProperty(e, "__esModule", { value: !0 });
|
|
27099
27114
|
})(t);
|
|
27100
27115
|
},
|
|
27101
27116
|
7598: function(e) {
|
|
@@ -28187,7 +28202,7 @@ ${n = t ? n : b(n, ",")}
|
|
|
28187
28202
|
type: "primary",
|
|
28188
28203
|
size: "small"
|
|
28189
28204
|
}, {
|
|
28190
|
-
icon: z(() => [u(P(
|
|
28205
|
+
icon: z(() => [u(P(Y), { size: 14 })]),
|
|
28191
28206
|
default: z(() => [n[1] ||= l(" 导入 JSON ", -1)]),
|
|
28192
28207
|
_: 1
|
|
28193
28208
|
})])]), u(Zt, {
|
|
@@ -28202,7 +28217,7 @@ ${n = t ? n : b(n, ",")}
|
|
|
28202
28217
|
size: "small",
|
|
28203
28218
|
onClick: g
|
|
28204
28219
|
}, {
|
|
28205
|
-
icon: z(() => [u(P(
|
|
28220
|
+
icon: z(() => [u(P(Y), { size: 14 })]),
|
|
28206
28221
|
default: z(() => [n[2] ||= l(" 导出 ", -1)]),
|
|
28207
28222
|
_: 1
|
|
28208
28223
|
})])]), s("div", ar, [
|
|
@@ -28210,7 +28225,7 @@ ${n = t ? n : b(n, ",")}
|
|
|
28210
28225
|
size: "small",
|
|
28211
28226
|
onClick: _
|
|
28212
28227
|
}, {
|
|
28213
|
-
icon: z(() => [u(P(
|
|
28228
|
+
icon: z(() => [u(P(Q), { size: 14 })]),
|
|
28214
28229
|
default: z(() => [n[3] ||= l(" 导入 ", -1)]),
|
|
28215
28230
|
_: 1
|
|
28216
28231
|
}),
|
|
@@ -28622,7 +28637,7 @@ var xr = br, Sr = { class: "me-card__title-wrapper" }, Cr = { class: "me-card__t
|
|
|
28622
28637
|
class: "me-card__action-btn",
|
|
28623
28638
|
onClick: O
|
|
28624
28639
|
}, {
|
|
28625
|
-
default: z(() => [(C(), i(j(w.value ? P(
|
|
28640
|
+
default: z(() => [(C(), i(j(w.value ? P(Z) : P(re)), { size: 16 }))]),
|
|
28626
28641
|
_: 1
|
|
28627
28642
|
})) : a("", !0),
|
|
28628
28643
|
n.collapsible && !D.value ? (C(), i(r, {
|
|
@@ -28632,7 +28647,7 @@ var xr = br, Sr = { class: "me-card__title-wrapper" }, Cr = { class: "me-card__t
|
|
|
28632
28647
|
class: _(["me-card__action-btn", { "me-card__collapse-btn--collapsed": y.value }]),
|
|
28633
28648
|
onClick: S
|
|
28634
28649
|
}, {
|
|
28635
|
-
default: z(() => [u(P(
|
|
28650
|
+
default: z(() => [u(P(G), {
|
|
28636
28651
|
size: 16,
|
|
28637
28652
|
class: "me-card__collapse-icon"
|
|
28638
28653
|
})]),
|
|
@@ -28935,7 +28950,21 @@ var si = {
|
|
|
28935
28950
|
"cancel"
|
|
28936
28951
|
],
|
|
28937
28952
|
setup(t, { emit: n }) {
|
|
28938
|
-
let c = t, d = n, p = E([]), m = E([]), h = E("object"), y =
|
|
28953
|
+
let c = t, d = n, p = E([]), m = E([]), h = E("object"), y = null;
|
|
28954
|
+
function b(e, t) {
|
|
28955
|
+
if (e === t) return !0;
|
|
28956
|
+
if (typeof e != "object" || typeof t != "object" || e == null || t == null || Array.isArray(e) !== Array.isArray(t)) return !1;
|
|
28957
|
+
if (Array.isArray(e)) {
|
|
28958
|
+
if (e.length !== t.length) return !1;
|
|
28959
|
+
for (let n = 0; n < e.length; n++) if (!b(e[n], t[n])) return !1;
|
|
28960
|
+
return !0;
|
|
28961
|
+
}
|
|
28962
|
+
let n = Object.keys(e), r = Object.keys(t);
|
|
28963
|
+
if (n.length !== r.length) return !1;
|
|
28964
|
+
for (let r of n) if (!Object.prototype.hasOwnProperty.call(t, r) || !b(e[r], t[r])) return !1;
|
|
28965
|
+
return !0;
|
|
28966
|
+
}
|
|
28967
|
+
let S = r(() => {
|
|
28939
28968
|
let e = [{
|
|
28940
28969
|
title: c.keyColumnTitle,
|
|
28941
28970
|
key: "key",
|
|
@@ -28959,34 +28988,39 @@ var si = {
|
|
|
28959
28988
|
width: 72,
|
|
28960
28989
|
align: "center"
|
|
28961
28990
|
}), e;
|
|
28962
|
-
}),
|
|
28963
|
-
function
|
|
28991
|
+
}), w = r(() => c.draggable && !c.disabled);
|
|
28992
|
+
function D(e) {
|
|
28964
28993
|
h.value = Array.isArray(e) ? "array" : "object";
|
|
28965
|
-
let t = /* @__PURE__ */ new Map();
|
|
28994
|
+
let t = /* @__PURE__ */ new Map(), n = [];
|
|
28966
28995
|
for (let e of p.value) {
|
|
28967
|
-
let
|
|
28968
|
-
|
|
28996
|
+
let r = e.key.trim();
|
|
28997
|
+
r ? t.set(r, e) : n.push(e);
|
|
28969
28998
|
}
|
|
28970
|
-
let
|
|
28971
|
-
|
|
28972
|
-
|
|
28999
|
+
let r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
29000
|
+
let n = t.get(e.trim());
|
|
29001
|
+
if (n && !r.has(n.id)) return r.add(n.id), n.id;
|
|
29002
|
+
let i = Ir();
|
|
29003
|
+
return r.add(i), i;
|
|
29004
|
+
}, a = (e) => t.get(e.trim())?.rules ?? c.rules?.[e.trim()], o = h.value === "array" ? e.map((e) => {
|
|
29005
|
+
let t = String(e[c.keyField] ?? ""), n = e[c.valueField];
|
|
28973
29006
|
return {
|
|
28974
|
-
id:
|
|
29007
|
+
id: i(t),
|
|
28975
29008
|
key: t,
|
|
28976
|
-
type: Br(
|
|
28977
|
-
value:
|
|
29009
|
+
type: Br(n),
|
|
29010
|
+
value: n,
|
|
28978
29011
|
raw: { ...e },
|
|
28979
|
-
rules:
|
|
29012
|
+
rules: a(t)
|
|
28980
29013
|
};
|
|
28981
|
-
}) :
|
|
28982
|
-
id:
|
|
29014
|
+
}) : Object.entries(e).map(([e, t]) => ({
|
|
29015
|
+
id: i(e),
|
|
28983
29016
|
key: e,
|
|
28984
29017
|
type: Br(t),
|
|
28985
29018
|
value: t,
|
|
28986
|
-
rules:
|
|
28987
|
-
}))
|
|
29019
|
+
rules: a(e)
|
|
29020
|
+
}));
|
|
29021
|
+
p.value = [...o, ...n], J();
|
|
28988
29022
|
}
|
|
28989
|
-
function
|
|
29023
|
+
function O() {
|
|
28990
29024
|
let e = {};
|
|
28991
29025
|
for (let t of p.value) {
|
|
28992
29026
|
let n = t.key.trim();
|
|
@@ -28994,7 +29028,7 @@ var si = {
|
|
|
28994
29028
|
}
|
|
28995
29029
|
return e;
|
|
28996
29030
|
}
|
|
28997
|
-
function
|
|
29031
|
+
function k() {
|
|
28998
29032
|
let e = [];
|
|
28999
29033
|
for (let t of p.value) {
|
|
29000
29034
|
let n = t.key.trim();
|
|
@@ -29004,9 +29038,9 @@ var si = {
|
|
|
29004
29038
|
}
|
|
29005
29039
|
return e;
|
|
29006
29040
|
}
|
|
29007
|
-
function
|
|
29008
|
-
let e = h.value === "array" ?
|
|
29009
|
-
y =
|
|
29041
|
+
function M() {
|
|
29042
|
+
let e = h.value === "array" ? k() : O();
|
|
29043
|
+
y = e, d("update:modelValue", e);
|
|
29010
29044
|
let t = c.validate ? {
|
|
29011
29045
|
duplicatedKeys: m.value,
|
|
29012
29046
|
hasEmptyKey: p.value.some((e) => !e.key.trim()),
|
|
@@ -29021,36 +29055,30 @@ var si = {
|
|
|
29021
29055
|
d("change", e, t);
|
|
29022
29056
|
}
|
|
29023
29057
|
R(() => c.modelValue, (e) => {
|
|
29024
|
-
|
|
29025
|
-
if (y) {
|
|
29026
|
-
y = !1;
|
|
29027
|
-
return;
|
|
29028
|
-
}
|
|
29029
|
-
w(e);
|
|
29030
|
-
}
|
|
29058
|
+
e && (y != null && b(e, y) || (y = null, D(e)));
|
|
29031
29059
|
}, { immediate: !0 });
|
|
29032
|
-
let
|
|
29060
|
+
let N = E(!!c.open);
|
|
29033
29061
|
R(() => c.open, (e) => {
|
|
29034
|
-
|
|
29062
|
+
N.value = !!e;
|
|
29035
29063
|
});
|
|
29036
|
-
let
|
|
29037
|
-
open:
|
|
29064
|
+
let F = r(() => c.modalMode ? {
|
|
29065
|
+
open: N.value,
|
|
29038
29066
|
title: c.title,
|
|
29039
29067
|
width: c.modalWidth,
|
|
29040
29068
|
position: "center",
|
|
29041
29069
|
okText: c.okText,
|
|
29042
29070
|
cancelText: c.cancelText,
|
|
29043
|
-
"onUpdate:open":
|
|
29044
|
-
onOk:
|
|
29045
|
-
onCancel:
|
|
29071
|
+
"onUpdate:open": I,
|
|
29072
|
+
onOk: V,
|
|
29073
|
+
onCancel: L
|
|
29046
29074
|
} : {});
|
|
29047
|
-
function
|
|
29048
|
-
|
|
29075
|
+
function I(e) {
|
|
29076
|
+
N.value = e, d("update:open", e);
|
|
29049
29077
|
}
|
|
29050
|
-
function
|
|
29078
|
+
function L() {
|
|
29051
29079
|
d("cancel");
|
|
29052
29080
|
}
|
|
29053
|
-
function
|
|
29081
|
+
function B() {
|
|
29054
29082
|
return c.validate ? {
|
|
29055
29083
|
duplicatedKeys: Jr(p.value),
|
|
29056
29084
|
hasEmptyKey: p.value.some((e) => !e.key.trim()),
|
|
@@ -29063,82 +29091,82 @@ var si = {
|
|
|
29063
29091
|
valueErrors: {}
|
|
29064
29092
|
};
|
|
29065
29093
|
}
|
|
29066
|
-
function
|
|
29067
|
-
let e =
|
|
29094
|
+
function V() {
|
|
29095
|
+
let e = B(), t = [];
|
|
29068
29096
|
e.hasEmptyKey && t.push("存在为空的 key,请补充或删除该属性"), e.duplicatedKeys.length && t.push(`key 重复(忽略大小写):${e.duplicatedKeys.join("、")}`);
|
|
29069
29097
|
for (let [n, r] of Object.entries(e.valueErrors)) t.push(`${n}:${r}`);
|
|
29070
29098
|
if (t.length) {
|
|
29071
29099
|
H.error(`校验未通过:${t.join(";")}`);
|
|
29072
29100
|
return;
|
|
29073
29101
|
}
|
|
29074
|
-
|
|
29075
|
-
}
|
|
29076
|
-
function V(e) {
|
|
29077
|
-
K(), k();
|
|
29102
|
+
N.value = !1, d("update:open", !1), d("ok", h.value === "array" ? k() : O());
|
|
29078
29103
|
}
|
|
29079
29104
|
function ee(e) {
|
|
29080
|
-
|
|
29105
|
+
J(), M();
|
|
29081
29106
|
}
|
|
29082
|
-
function U(e
|
|
29083
|
-
|
|
29107
|
+
function U(e) {
|
|
29108
|
+
J(), M();
|
|
29084
29109
|
}
|
|
29085
29110
|
function W(e, t) {
|
|
29086
|
-
e.value = t,
|
|
29111
|
+
e.type !== t && (e.type = t, e.value = Vr(e.value, t), e.rules = ti(e.rules, t), J(), M());
|
|
29112
|
+
}
|
|
29113
|
+
function G(e, t) {
|
|
29114
|
+
e.value = t, J(), M();
|
|
29087
29115
|
}
|
|
29088
|
-
function
|
|
29116
|
+
function K() {
|
|
29089
29117
|
p.value = [...p.value, {
|
|
29090
29118
|
id: Ir(),
|
|
29091
29119
|
key: "",
|
|
29092
29120
|
type: "string",
|
|
29093
29121
|
value: "",
|
|
29094
29122
|
raw: {}
|
|
29095
|
-
}],
|
|
29123
|
+
}], J(), M();
|
|
29096
29124
|
}
|
|
29097
|
-
function
|
|
29125
|
+
function q(e) {
|
|
29098
29126
|
let t = p.value.indexOf(e);
|
|
29099
|
-
t !== -1 && (p.value.splice(t, 1),
|
|
29127
|
+
t !== -1 && (p.value.splice(t, 1), J(), M());
|
|
29100
29128
|
}
|
|
29101
|
-
function
|
|
29129
|
+
function J() {
|
|
29102
29130
|
m.value = Jr(p.value);
|
|
29103
29131
|
}
|
|
29104
|
-
function
|
|
29132
|
+
function Y(e) {
|
|
29105
29133
|
return Yr(e, m.value);
|
|
29106
29134
|
}
|
|
29107
|
-
function
|
|
29108
|
-
return c.validate ? e.trim() ?
|
|
29135
|
+
function te(e) {
|
|
29136
|
+
return c.validate ? e.trim() ? Y(e) ? "Key 不能重复(忽略大小写)" : "" : "Key 不能为空" : "";
|
|
29109
29137
|
}
|
|
29110
29138
|
function ne(e) {
|
|
29111
|
-
return c.validate ? !e.key.trim() ||
|
|
29139
|
+
return c.validate ? !e.key.trim() || Y(e.key) : !1;
|
|
29112
29140
|
}
|
|
29113
29141
|
function re(e) {
|
|
29114
29142
|
return c.disabled || !c.validate ? "" : ai(e.value, e.type, e.rules) ?? "";
|
|
29115
29143
|
}
|
|
29116
|
-
function
|
|
29144
|
+
function X(e) {
|
|
29117
29145
|
return !!ei(e.rules);
|
|
29118
29146
|
}
|
|
29119
|
-
let
|
|
29120
|
-
let e =
|
|
29121
|
-
return e ? `校验规则${e.key.trim() ? ` · ${e.key.trim()}` : ""}(${
|
|
29147
|
+
let Z = E(!1), Q = E(null), ie = E(), $ = T({}), oe = r(() => Q.value?.type ?? "string"), se = Object.fromEntries(jr.map((e) => [e.value, e.label])), ce = r(() => {
|
|
29148
|
+
let e = Q.value;
|
|
29149
|
+
return e ? `校验规则${e.key.trim() ? ` · ${e.key.trim()}` : ""}(${se[e.type] ?? e.type})` : "校验规则";
|
|
29122
29150
|
});
|
|
29123
|
-
function
|
|
29151
|
+
function le(e) {
|
|
29124
29152
|
return e === "int" || e === "float";
|
|
29125
29153
|
}
|
|
29126
|
-
function
|
|
29127
|
-
|
|
29154
|
+
function ue(e) {
|
|
29155
|
+
Q.value = e, Object.keys($).forEach((e) => delete $[e]), Object.assign($, ei(e.rules) ?? {}), Z.value = !0;
|
|
29128
29156
|
}
|
|
29129
|
-
function
|
|
29130
|
-
|
|
29131
|
-
|
|
29157
|
+
function de() {
|
|
29158
|
+
Q.value && ie.value?.validate().then(() => {
|
|
29159
|
+
Q.value && (Q.value.rules = ei($), Z.value = !1, Q.value = null, J(), M());
|
|
29132
29160
|
}).catch(() => {});
|
|
29133
29161
|
}
|
|
29134
|
-
function
|
|
29135
|
-
|
|
29162
|
+
function fe() {
|
|
29163
|
+
Z.value = !1, Q.value = null;
|
|
29136
29164
|
}
|
|
29137
|
-
function
|
|
29165
|
+
function pe(e, t) {
|
|
29138
29166
|
return typeof e == "string" && typeof t == "string" ? e < t ? -1 : +(e > t) : Number(e) - Number(t);
|
|
29139
29167
|
}
|
|
29140
|
-
let
|
|
29141
|
-
let e =
|
|
29168
|
+
let me = r(() => {
|
|
29169
|
+
let e = $.minLength ?? null, t = $.maxLength ?? null, n = $.min ?? null, r = $.max ?? null;
|
|
29142
29170
|
return {
|
|
29143
29171
|
minLength: [{ validator: (e, n) => n != null && t != null && n > t ? Promise.reject(/* @__PURE__ */ Error("最短长度不能大于最大长度")) : Promise.resolve() }],
|
|
29144
29172
|
maxLength: [{ validator: (t, n) => n != null && e != null && n < e ? Promise.reject(/* @__PURE__ */ Error("最大长度不能小于最短长度")) : Promise.resolve() }],
|
|
@@ -29150,36 +29178,36 @@ var si = {
|
|
|
29150
29178
|
}
|
|
29151
29179
|
return Promise.resolve();
|
|
29152
29180
|
} }],
|
|
29153
|
-
min: [{ validator: (e, t) => t != null && r != null &&
|
|
29154
|
-
max: [{ validator: (e, t) => t != null && n != null &&
|
|
29181
|
+
min: [{ validator: (e, t) => t != null && r != null && pe(t, r) > 0 ? Promise.reject(/* @__PURE__ */ Error("最小值不能大于最大值")) : Promise.resolve() }],
|
|
29182
|
+
max: [{ validator: (e, t) => t != null && n != null && pe(t, n) < 0 ? Promise.reject(/* @__PURE__ */ Error("最大值不能小于最小值")) : Promise.resolve() }]
|
|
29155
29183
|
};
|
|
29156
|
-
}),
|
|
29157
|
-
function ge() {
|
|
29158
|
-
me.value && (he.value = me.value.querySelector("tbody"));
|
|
29159
|
-
}
|
|
29184
|
+
}), he = E(null), ge = E(null);
|
|
29160
29185
|
function _e() {
|
|
29161
|
-
he.value && (
|
|
29186
|
+
he.value && (ge.value = he.value.querySelector("tbody"));
|
|
29162
29187
|
}
|
|
29163
|
-
|
|
29188
|
+
function ve() {
|
|
29189
|
+
ge.value && (ye && Te.destroy(), Te.start(ge.value), ye = !0);
|
|
29190
|
+
}
|
|
29191
|
+
let ye = !1;
|
|
29164
29192
|
x(async () => {
|
|
29165
|
-
await g(),
|
|
29166
|
-
}), R(
|
|
29167
|
-
!e || !c.modalMode || (await g(),
|
|
29193
|
+
await g(), _e(), ve();
|
|
29194
|
+
}), R(N, async (e) => {
|
|
29195
|
+
!e || !c.modalMode || (await g(), _e(), ve());
|
|
29168
29196
|
});
|
|
29169
|
-
let
|
|
29170
|
-
function
|
|
29171
|
-
|
|
29197
|
+
let be = E(null);
|
|
29198
|
+
function xe() {
|
|
29199
|
+
be.value && (be.value.style.display = "none");
|
|
29172
29200
|
}
|
|
29173
|
-
function
|
|
29174
|
-
let t =
|
|
29201
|
+
function Se(e) {
|
|
29202
|
+
let t = ge.value, n = he.value, r = be.value, i = e?.related, a = i instanceof Element ? i.closest("tr") : null;
|
|
29175
29203
|
if (!t || !n || !r || !a || !t.contains(a)) {
|
|
29176
|
-
|
|
29204
|
+
xe();
|
|
29177
29205
|
return;
|
|
29178
29206
|
}
|
|
29179
29207
|
let o = a.getBoundingClientRect(), s = n.getBoundingClientRect(), c = e.willInsertAfter ? o.bottom : o.top;
|
|
29180
29208
|
r.style.top = `${c - s.top - 1}px`, r.style.left = "0px", r.style.width = `${n.clientWidth}px`, r.style.display = "block";
|
|
29181
29209
|
}
|
|
29182
|
-
function
|
|
29210
|
+
function Ce(e) {
|
|
29183
29211
|
if (!e) return;
|
|
29184
29212
|
let t = document.querySelector(".me-input-property__drag-fallback");
|
|
29185
29213
|
if (!t) return;
|
|
@@ -29190,37 +29218,37 @@ var si = {
|
|
|
29190
29218
|
r[t].style.width = `${e.getBoundingClientRect().width}px`;
|
|
29191
29219
|
});
|
|
29192
29220
|
}
|
|
29193
|
-
let
|
|
29221
|
+
let we = T({
|
|
29194
29222
|
handle: ".me-input-property__drag",
|
|
29195
29223
|
animation: 150,
|
|
29196
29224
|
forceFallback: !0,
|
|
29197
29225
|
fallbackOnBody: !0,
|
|
29198
29226
|
fallbackClass: "me-input-property__drag-fallback",
|
|
29199
29227
|
ghostClass: "me-input-property__row--ghost",
|
|
29200
|
-
disabled: r(() => !
|
|
29228
|
+
disabled: r(() => !w.value),
|
|
29201
29229
|
onStart: (e) => {
|
|
29202
|
-
|
|
29230
|
+
xe(), Ce(e.item);
|
|
29203
29231
|
},
|
|
29204
|
-
onMove: ((e) => (
|
|
29232
|
+
onMove: ((e) => (Se(e), !0)),
|
|
29205
29233
|
onEnd: () => {
|
|
29206
|
-
|
|
29234
|
+
xe(), J(), M();
|
|
29207
29235
|
}
|
|
29208
|
-
}),
|
|
29209
|
-
...
|
|
29236
|
+
}), Te = ae(ge, p, {
|
|
29237
|
+
...we,
|
|
29210
29238
|
immediate: !1
|
|
29211
29239
|
});
|
|
29212
|
-
return R(
|
|
29213
|
-
|
|
29240
|
+
return R(w, (e) => {
|
|
29241
|
+
Te.option("disabled", !e);
|
|
29214
29242
|
}), (n, r) => {
|
|
29215
|
-
let c = A("a-button"), d = A("a-tooltip"), m = A("a-input"), h = A("a-select"), g = A("a-input-number"), y = A("a-date-picker"),
|
|
29216
|
-
return C(), i(j(t.modalMode ? P(Qt) : "div"), v(f(
|
|
29243
|
+
let c = A("a-button"), d = A("a-tooltip"), m = A("a-input"), h = A("a-select"), g = A("a-input-number"), y = A("a-date-picker"), b = A("a-time-picker"), x = A("a-space-compact"), T = A("a-table"), E = A("a-checkbox"), D = A("a-form-item"), O = A("a-form");
|
|
29244
|
+
return C(), i(j(t.modalMode ? P(Qt) : "div"), v(f(F.value)), {
|
|
29217
29245
|
default: z(() => [s("div", {
|
|
29218
29246
|
ref_key: "rootEl",
|
|
29219
|
-
ref:
|
|
29247
|
+
ref: he,
|
|
29220
29248
|
class: "me-input-property"
|
|
29221
29249
|
}, [
|
|
29222
29250
|
u(T, {
|
|
29223
|
-
columns:
|
|
29251
|
+
columns: S.value,
|
|
29224
29252
|
"data-source": p.value,
|
|
29225
29253
|
"row-key": (e) => e.id,
|
|
29226
29254
|
pagination: !1,
|
|
@@ -29238,7 +29266,7 @@ var si = {
|
|
|
29238
29266
|
shape: "circle",
|
|
29239
29267
|
class: "me-input-property__add-btn",
|
|
29240
29268
|
disabled: t.disabled,
|
|
29241
|
-
onClick:
|
|
29269
|
+
onClick: K
|
|
29242
29270
|
}, {
|
|
29243
29271
|
default: z(() => [u(P(Fe), {
|
|
29244
29272
|
name: "Plus",
|
|
@@ -29248,7 +29276,7 @@ var si = {
|
|
|
29248
29276
|
}, 8, ["disabled"])]),
|
|
29249
29277
|
_: 1
|
|
29250
29278
|
})) : a("", !0)]),
|
|
29251
|
-
bodyCell: z(({ column: e, record: n }) => [e.key === "action" ? (C(), o("div", si, [
|
|
29279
|
+
bodyCell: z(({ column: e, record: n }) => [e.key === "action" ? (C(), o("div", si, [w.value ? (C(), o("span", ci, [u(P(Fe), {
|
|
29252
29280
|
name: "GripVertical",
|
|
29253
29281
|
size: 14
|
|
29254
29282
|
})])) : a("", !0), u(c, {
|
|
@@ -29257,7 +29285,7 @@ var si = {
|
|
|
29257
29285
|
class: "me-input-property__del",
|
|
29258
29286
|
disabled: t.disabled,
|
|
29259
29287
|
title: "删除该属性",
|
|
29260
|
-
onClick: (e) =>
|
|
29288
|
+
onClick: (e) => q(n)
|
|
29261
29289
|
}, {
|
|
29262
29290
|
default: z(() => [u(P(Fe), {
|
|
29263
29291
|
name: "Trash2",
|
|
@@ -29266,12 +29294,12 @@ var si = {
|
|
|
29266
29294
|
_: 1
|
|
29267
29295
|
}, 8, ["disabled", "onClick"])])) : e.key === "key" ? (C(), i(d, {
|
|
29268
29296
|
key: 1,
|
|
29269
|
-
title: t.disabled ? "" :
|
|
29297
|
+
title: t.disabled ? "" : te(n.key),
|
|
29270
29298
|
visible: !t.disabled && ne(n)
|
|
29271
29299
|
}, {
|
|
29272
29300
|
default: z(() => [u(m, {
|
|
29273
29301
|
value: n.key,
|
|
29274
|
-
"onUpdate:value": [(e) => n.key = e, (e) =>
|
|
29302
|
+
"onUpdate:value": [(e) => n.key = e, (e) => ee(n)],
|
|
29275
29303
|
class: _(["me-input-property__key-input", { "me-input-property__field--error": !t.disabled && ne(n) }]),
|
|
29276
29304
|
disabled: t.disabled,
|
|
29277
29305
|
placeholder: t.keyPlaceholder
|
|
@@ -29288,7 +29316,7 @@ var si = {
|
|
|
29288
29316
|
title: re(n),
|
|
29289
29317
|
visible: !!re(n)
|
|
29290
29318
|
}, {
|
|
29291
|
-
default: z(() => [u(
|
|
29319
|
+
default: z(() => [u(x, {
|
|
29292
29320
|
block: !0,
|
|
29293
29321
|
class: _(["me-input-property__value", { "me-input-property__field--error": !!re(n) }])
|
|
29294
29322
|
}, {
|
|
@@ -29298,7 +29326,7 @@ var si = {
|
|
|
29298
29326
|
disabled: t.disabled,
|
|
29299
29327
|
options: P(jr),
|
|
29300
29328
|
class: "me-input-property__value-type",
|
|
29301
|
-
onChange: (e) =>
|
|
29329
|
+
onChange: (e) => W(n, e)
|
|
29302
29330
|
}, null, 8, [
|
|
29303
29331
|
"value",
|
|
29304
29332
|
"disabled",
|
|
@@ -29307,7 +29335,7 @@ var si = {
|
|
|
29307
29335
|
])) : a("", !0), n.type === "string" ? (C(), i(m, {
|
|
29308
29336
|
key: 1,
|
|
29309
29337
|
value: n.value,
|
|
29310
|
-
"onUpdate:value": [(e) => n.value = e, (e) =>
|
|
29338
|
+
"onUpdate:value": [(e) => n.value = e, (e) => U(n)],
|
|
29311
29339
|
class: "me-input-property__value-editor",
|
|
29312
29340
|
disabled: t.disabled,
|
|
29313
29341
|
placeholder: t.valuePlaceholder
|
|
@@ -29319,7 +29347,7 @@ var si = {
|
|
|
29319
29347
|
])) : n.type === "int" ? (C(), i(g, {
|
|
29320
29348
|
key: 2,
|
|
29321
29349
|
value: n.value,
|
|
29322
|
-
"onUpdate:value": [(e) => n.value = e, (e) =>
|
|
29350
|
+
"onUpdate:value": [(e) => n.value = e, (e) => U(n)],
|
|
29323
29351
|
class: "me-input-property__value-editor",
|
|
29324
29352
|
disabled: t.disabled,
|
|
29325
29353
|
placeholder: t.valuePlaceholder
|
|
@@ -29331,7 +29359,7 @@ var si = {
|
|
|
29331
29359
|
])) : n.type === "float" ? (C(), i(g, {
|
|
29332
29360
|
key: 3,
|
|
29333
29361
|
value: n.value,
|
|
29334
|
-
"onUpdate:value": [(e) => n.value = e, (e) =>
|
|
29362
|
+
"onUpdate:value": [(e) => n.value = e, (e) => U(n)],
|
|
29335
29363
|
class: "me-input-property__value-editor",
|
|
29336
29364
|
disabled: t.disabled,
|
|
29337
29365
|
placeholder: t.valuePlaceholder,
|
|
@@ -29345,7 +29373,7 @@ var si = {
|
|
|
29345
29373
|
])) : n.type === "date" ? (C(), i(y, {
|
|
29346
29374
|
key: 4,
|
|
29347
29375
|
value: n.value,
|
|
29348
|
-
"onUpdate:value": [(e) => n.value = e, (e) =>
|
|
29376
|
+
"onUpdate:value": [(e) => n.value = e, (e) => U(n)],
|
|
29349
29377
|
class: "me-input-property__value-editor",
|
|
29350
29378
|
"value-format": P(Nr),
|
|
29351
29379
|
disabled: t.disabled
|
|
@@ -29354,10 +29382,10 @@ var si = {
|
|
|
29354
29382
|
"onUpdate:value",
|
|
29355
29383
|
"value-format",
|
|
29356
29384
|
"disabled"
|
|
29357
|
-
])) : n.type === "time" ? (C(), i(
|
|
29385
|
+
])) : n.type === "time" ? (C(), i(b, {
|
|
29358
29386
|
key: 5,
|
|
29359
29387
|
value: n.value,
|
|
29360
|
-
"onUpdate:value": [(e) => n.value = e, (e) =>
|
|
29388
|
+
"onUpdate:value": [(e) => n.value = e, (e) => U(n)],
|
|
29361
29389
|
class: "me-input-property__value-editor",
|
|
29362
29390
|
"value-format": P(Pr),
|
|
29363
29391
|
disabled: t.disabled
|
|
@@ -29372,7 +29400,7 @@ var si = {
|
|
|
29372
29400
|
class: "me-input-property__value-editor",
|
|
29373
29401
|
disabled: t.disabled,
|
|
29374
29402
|
options: P(Fr),
|
|
29375
|
-
onChange: (e) =>
|
|
29403
|
+
onChange: (e) => G(n, e)
|
|
29376
29404
|
}, null, 8, [
|
|
29377
29405
|
"value",
|
|
29378
29406
|
"disabled",
|
|
@@ -29389,9 +29417,9 @@ var si = {
|
|
|
29389
29417
|
default: z(() => [u(c, {
|
|
29390
29418
|
type: "text",
|
|
29391
29419
|
size: "small",
|
|
29392
|
-
class: _(["me-input-property__rules-btn", { "is-active":
|
|
29420
|
+
class: _(["me-input-property__rules-btn", { "is-active": X(n) }]),
|
|
29393
29421
|
disabled: t.disabled,
|
|
29394
|
-
onClick: (e) =>
|
|
29422
|
+
onClick: (e) => ue(n)
|
|
29395
29423
|
}, {
|
|
29396
29424
|
default: z(() => [u(P(Fe), {
|
|
29397
29425
|
name: "WandSparkles",
|
|
@@ -29414,43 +29442,43 @@ var si = {
|
|
|
29414
29442
|
"locale"
|
|
29415
29443
|
]),
|
|
29416
29444
|
u(P(Qt), {
|
|
29417
|
-
open:
|
|
29418
|
-
"onUpdate:open": r[11] ||= (e) =>
|
|
29445
|
+
open: Z.value,
|
|
29446
|
+
"onUpdate:open": r[11] ||= (e) => Z.value = e,
|
|
29419
29447
|
width: 480,
|
|
29420
29448
|
fullscreen: !1,
|
|
29421
|
-
title:
|
|
29449
|
+
title: ce.value,
|
|
29422
29450
|
"ok-text": "保存",
|
|
29423
29451
|
"cancel-text": "取消",
|
|
29424
|
-
onOk:
|
|
29425
|
-
onCancel:
|
|
29452
|
+
onOk: de,
|
|
29453
|
+
onCancel: fe
|
|
29426
29454
|
}, {
|
|
29427
29455
|
default: z(() => [u(O, {
|
|
29428
29456
|
ref_key: "ruleFormRef",
|
|
29429
|
-
ref:
|
|
29430
|
-
model:
|
|
29431
|
-
rules:
|
|
29457
|
+
ref: ie,
|
|
29458
|
+
model: $,
|
|
29459
|
+
rules: me.value,
|
|
29432
29460
|
layout: "vertical",
|
|
29433
29461
|
class: "me-input-property__rule-form"
|
|
29434
29462
|
}, {
|
|
29435
29463
|
default: z(() => [
|
|
29436
29464
|
u(D, { name: "required" }, {
|
|
29437
29465
|
default: z(() => [u(E, {
|
|
29438
|
-
checked:
|
|
29439
|
-
"onUpdate:checked": r[0] ||= (e) =>
|
|
29466
|
+
checked: $.required,
|
|
29467
|
+
"onUpdate:checked": r[0] ||= (e) => $.required = e
|
|
29440
29468
|
}, {
|
|
29441
29469
|
default: z(() => [...r[12] ||= [l("必填(值不能为空)", -1)]]),
|
|
29442
29470
|
_: 1
|
|
29443
29471
|
}, 8, ["checked"])]),
|
|
29444
29472
|
_: 1
|
|
29445
29473
|
}),
|
|
29446
|
-
|
|
29474
|
+
oe.value === "string" ? (C(), o(e, { key: 0 }, [
|
|
29447
29475
|
u(D, {
|
|
29448
29476
|
name: "minLength",
|
|
29449
29477
|
label: "最短长度"
|
|
29450
29478
|
}, {
|
|
29451
29479
|
default: z(() => [u(g, {
|
|
29452
|
-
value:
|
|
29453
|
-
"onUpdate:value": r[1] ||= (e) =>
|
|
29480
|
+
value: $.minLength,
|
|
29481
|
+
"onUpdate:value": r[1] ||= (e) => $.minLength = e,
|
|
29454
29482
|
min: 0,
|
|
29455
29483
|
precision: 0,
|
|
29456
29484
|
placeholder: "不限",
|
|
@@ -29463,8 +29491,8 @@ var si = {
|
|
|
29463
29491
|
label: "最大长度"
|
|
29464
29492
|
}, {
|
|
29465
29493
|
default: z(() => [u(g, {
|
|
29466
|
-
value:
|
|
29467
|
-
"onUpdate:value": r[2] ||= (e) =>
|
|
29494
|
+
value: $.maxLength,
|
|
29495
|
+
"onUpdate:value": r[2] ||= (e) => $.maxLength = e,
|
|
29468
29496
|
min: 0,
|
|
29469
29497
|
precision: 0,
|
|
29470
29498
|
placeholder: "不限",
|
|
@@ -29478,22 +29506,22 @@ var si = {
|
|
|
29478
29506
|
extra: "校验值格式,如 ^[a-zA-Z0-9]+$"
|
|
29479
29507
|
}, {
|
|
29480
29508
|
default: z(() => [u(m, {
|
|
29481
|
-
value:
|
|
29482
|
-
"onUpdate:value": r[3] ||= (e) =>
|
|
29509
|
+
value: $.pattern,
|
|
29510
|
+
"onUpdate:value": r[3] ||= (e) => $.pattern = e,
|
|
29483
29511
|
placeholder: "如 ^[a-zA-Z0-9]+$",
|
|
29484
29512
|
"allow-clear": ""
|
|
29485
29513
|
}, null, 8, ["value"])]),
|
|
29486
29514
|
_: 1
|
|
29487
29515
|
})
|
|
29488
29516
|
], 64)) : a("", !0),
|
|
29489
|
-
|
|
29517
|
+
le(oe.value) ? (C(), o(e, { key: 1 }, [u(D, {
|
|
29490
29518
|
name: "min",
|
|
29491
29519
|
label: "最小值"
|
|
29492
29520
|
}, {
|
|
29493
29521
|
default: z(() => [u(g, {
|
|
29494
|
-
value:
|
|
29495
|
-
"onUpdate:value": r[4] ||= (e) =>
|
|
29496
|
-
precision:
|
|
29522
|
+
value: $.min,
|
|
29523
|
+
"onUpdate:value": r[4] ||= (e) => $.min = e,
|
|
29524
|
+
precision: oe.value === "float" ? P(2) : 0,
|
|
29497
29525
|
placeholder: "不限",
|
|
29498
29526
|
class: "me-input-property__rule-input"
|
|
29499
29527
|
}, null, 8, ["value", "precision"])]),
|
|
@@ -29503,28 +29531,28 @@ var si = {
|
|
|
29503
29531
|
label: "最大值"
|
|
29504
29532
|
}, {
|
|
29505
29533
|
default: z(() => [u(g, {
|
|
29506
|
-
value:
|
|
29507
|
-
"onUpdate:value": r[5] ||= (e) =>
|
|
29508
|
-
precision:
|
|
29534
|
+
value: $.max,
|
|
29535
|
+
"onUpdate:value": r[5] ||= (e) => $.max = e,
|
|
29536
|
+
precision: oe.value === "float" ? P(2) : 0,
|
|
29509
29537
|
placeholder: "不限",
|
|
29510
29538
|
class: "me-input-property__rule-input"
|
|
29511
29539
|
}, null, 8, ["value", "precision"])]),
|
|
29512
29540
|
_: 1
|
|
29513
29541
|
})], 64)) : a("", !0),
|
|
29514
|
-
|
|
29542
|
+
oe.value === "date" || oe.value === "time" ? (C(), o(e, { key: 2 }, [u(D, {
|
|
29515
29543
|
name: "min",
|
|
29516
29544
|
label: "最早边界"
|
|
29517
29545
|
}, {
|
|
29518
|
-
default: z(() => [
|
|
29546
|
+
default: z(() => [oe.value === "date" ? (C(), i(y, {
|
|
29519
29547
|
key: 0,
|
|
29520
|
-
value:
|
|
29521
|
-
"onUpdate:value": r[6] ||= (e) =>
|
|
29548
|
+
value: $.min,
|
|
29549
|
+
"onUpdate:value": r[6] ||= (e) => $.min = e,
|
|
29522
29550
|
"value-format": P(Nr),
|
|
29523
29551
|
style: { width: "100%" }
|
|
29524
|
-
}, null, 8, ["value", "value-format"])) : (C(), i(
|
|
29552
|
+
}, null, 8, ["value", "value-format"])) : (C(), i(b, {
|
|
29525
29553
|
key: 1,
|
|
29526
|
-
value:
|
|
29527
|
-
"onUpdate:value": r[7] ||= (e) =>
|
|
29554
|
+
value: $.min,
|
|
29555
|
+
"onUpdate:value": r[7] ||= (e) => $.min = e,
|
|
29528
29556
|
"value-format": P(Pr),
|
|
29529
29557
|
style: { width: "100%" }
|
|
29530
29558
|
}, null, 8, ["value", "value-format"]))]),
|
|
@@ -29533,16 +29561,16 @@ var si = {
|
|
|
29533
29561
|
name: "max",
|
|
29534
29562
|
label: "最晚边界"
|
|
29535
29563
|
}, {
|
|
29536
|
-
default: z(() => [
|
|
29564
|
+
default: z(() => [oe.value === "date" ? (C(), i(y, {
|
|
29537
29565
|
key: 0,
|
|
29538
|
-
value:
|
|
29539
|
-
"onUpdate:value": r[8] ||= (e) =>
|
|
29566
|
+
value: $.max,
|
|
29567
|
+
"onUpdate:value": r[8] ||= (e) => $.max = e,
|
|
29540
29568
|
"value-format": P(Nr),
|
|
29541
29569
|
style: { width: "100%" }
|
|
29542
|
-
}, null, 8, ["value", "value-format"])) : (C(), i(
|
|
29570
|
+
}, null, 8, ["value", "value-format"])) : (C(), i(b, {
|
|
29543
29571
|
key: 1,
|
|
29544
|
-
value:
|
|
29545
|
-
"onUpdate:value": r[9] ||= (e) =>
|
|
29572
|
+
value: $.max,
|
|
29573
|
+
"onUpdate:value": r[9] ||= (e) => $.max = e,
|
|
29546
29574
|
"value-format": P(Pr),
|
|
29547
29575
|
style: { width: "100%" }
|
|
29548
29576
|
}, null, 8, ["value", "value-format"]))]),
|
|
@@ -29554,8 +29582,8 @@ var si = {
|
|
|
29554
29582
|
extra: "可选,覆盖所有校验规则的默认提示文案"
|
|
29555
29583
|
}, {
|
|
29556
29584
|
default: z(() => [u(m, {
|
|
29557
|
-
value:
|
|
29558
|
-
"onUpdate:value": r[10] ||= (e) =>
|
|
29585
|
+
value: $.message,
|
|
29586
|
+
"onUpdate:value": r[10] ||= (e) => $.message = e,
|
|
29559
29587
|
placeholder: "如:该属性不合法",
|
|
29560
29588
|
"allow-clear": ""
|
|
29561
29589
|
}, null, 8, ["value"])]),
|
|
@@ -29568,7 +29596,7 @@ var si = {
|
|
|
29568
29596
|
}, 8, ["open", "title"]),
|
|
29569
29597
|
s("div", {
|
|
29570
29598
|
ref_key: "dropLineEl",
|
|
29571
|
-
ref:
|
|
29599
|
+
ref: be,
|
|
29572
29600
|
class: "me-input-property__drop-line"
|
|
29573
29601
|
}, null, 512)
|
|
29574
29602
|
], 512)]),
|
|
@@ -30042,10 +30070,10 @@ var fi = di, pi = (/* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
30042
30070
|
e.begin = e.match, delete e.match;
|
|
30043
30071
|
}
|
|
30044
30072
|
}
|
|
30045
|
-
function
|
|
30073
|
+
function G(e, t) {
|
|
30046
30074
|
e.relevance === void 0 && (e.relevance = 1);
|
|
30047
30075
|
}
|
|
30048
|
-
var
|
|
30076
|
+
var K = (e, t) => {
|
|
30049
30077
|
if (!e.beforeMatch) return;
|
|
30050
30078
|
if (e.starts) throw Error("beforeMatch cannot be used with starts");
|
|
30051
30079
|
let n = Object.assign({}, e);
|
|
@@ -30055,7 +30083,7 @@ var fi = di, pi = (/* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
30055
30083
|
relevance: 0,
|
|
30056
30084
|
contains: [Object.assign(n, { endsParent: !0 })]
|
|
30057
30085
|
}, e.relevance = 0, delete n.beforeMatch;
|
|
30058
|
-
},
|
|
30086
|
+
}, q = [
|
|
30059
30087
|
"of",
|
|
30060
30088
|
"and",
|
|
30061
30089
|
"for",
|
|
@@ -30067,32 +30095,32 @@ var fi = di, pi = (/* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
30067
30095
|
"parent",
|
|
30068
30096
|
"list",
|
|
30069
30097
|
"value"
|
|
30070
|
-
],
|
|
30071
|
-
function
|
|
30098
|
+
], J = "keyword";
|
|
30099
|
+
function Y(e, t, n = J) {
|
|
30072
30100
|
let r = Object.create(null);
|
|
30073
30101
|
return typeof e == "string" ? i(n, e.split(" ")) : Array.isArray(e) ? i(n, e) : Object.keys(e).forEach(function(n) {
|
|
30074
|
-
Object.assign(r,
|
|
30102
|
+
Object.assign(r, Y(e[n], t, n));
|
|
30075
30103
|
}), r;
|
|
30076
30104
|
function i(e, n) {
|
|
30077
30105
|
t && (n = n.map((e) => e.toLowerCase())), n.forEach(function(t) {
|
|
30078
30106
|
let n = t.split("|");
|
|
30079
|
-
r[n[0]] = [e,
|
|
30107
|
+
r[n[0]] = [e, te(n[0], n[1])];
|
|
30080
30108
|
});
|
|
30081
30109
|
}
|
|
30082
30110
|
}
|
|
30083
|
-
function
|
|
30084
|
-
return t ? Number(t) : +!
|
|
30111
|
+
function te(e, t) {
|
|
30112
|
+
return t ? Number(t) : +!ne(e);
|
|
30085
30113
|
}
|
|
30086
|
-
function
|
|
30087
|
-
return
|
|
30114
|
+
function ne(e) {
|
|
30115
|
+
return q.includes(e.toLowerCase());
|
|
30088
30116
|
}
|
|
30089
|
-
var
|
|
30117
|
+
var re = {}, X = (e) => {
|
|
30090
30118
|
console.error(e);
|
|
30091
|
-
},
|
|
30119
|
+
}, Z = (e, ...t) => {
|
|
30092
30120
|
console.log(`WARN: ${e}`, ...t);
|
|
30093
|
-
},
|
|
30094
|
-
|
|
30095
|
-
},
|
|
30121
|
+
}, Q = (e, t) => {
|
|
30122
|
+
re[`${e}/${t}`] || (console.log(`Deprecated as of ${e}. ${t}`), re[`${e}/${t}`] = !0);
|
|
30123
|
+
}, ie = /* @__PURE__ */ Error();
|
|
30096
30124
|
function ae(e, t, { key: n }) {
|
|
30097
30125
|
let r = 0, i = e[n], a = {}, o = {};
|
|
30098
30126
|
for (let e = 1; e <= t.length; e++) o[e + r] = i[e], a[e + r] = !0, r += b(t[e - 1]);
|
|
@@ -30100,15 +30128,15 @@ var fi = di, pi = (/* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
30100
30128
|
}
|
|
30101
30129
|
function $(e) {
|
|
30102
30130
|
if (Array.isArray(e.begin)) {
|
|
30103
|
-
if (e.skip || e.excludeBegin || e.returnBegin) throw
|
|
30104
|
-
if (typeof e.beginScope != "object" || e.beginScope === null) throw
|
|
30131
|
+
if (e.skip || e.excludeBegin || e.returnBegin) throw X("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), ie;
|
|
30132
|
+
if (typeof e.beginScope != "object" || e.beginScope === null) throw X("beginScope must be object"), ie;
|
|
30105
30133
|
ae(e, e.begin, { key: "beginScope" }), e.begin = C(e.begin, { joinWith: "" });
|
|
30106
30134
|
}
|
|
30107
30135
|
}
|
|
30108
30136
|
function oe(e) {
|
|
30109
30137
|
if (Array.isArray(e.end)) {
|
|
30110
|
-
if (e.skip || e.excludeEnd || e.returnEnd) throw
|
|
30111
|
-
if (typeof e.endScope != "object" || e.endScope === null) throw
|
|
30138
|
+
if (e.skip || e.excludeEnd || e.returnEnd) throw X("skip, excludeEnd, returnEnd not compatible with endScope: {}"), ie;
|
|
30139
|
+
if (typeof e.endScope != "object" || e.endScope === null) throw X("endScope must be object"), ie;
|
|
30112
30140
|
ae(e, e.end, { key: "endScope" }), e.end = C(e.end, { joinWith: "" });
|
|
30113
30141
|
}
|
|
30114
30142
|
}
|
|
@@ -30185,14 +30213,14 @@ var fi = di, pi = (/* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
30185
30213
|
H,
|
|
30186
30214
|
W,
|
|
30187
30215
|
ce,
|
|
30188
|
-
|
|
30216
|
+
K
|
|
30189
30217
|
].forEach((e) => e(n, r)), e.compilerExtensions.forEach((e) => e(n, r)), n.__beforeBegin = null, [
|
|
30190
30218
|
ee,
|
|
30191
30219
|
U,
|
|
30192
|
-
|
|
30220
|
+
G
|
|
30193
30221
|
].forEach((e) => e(n, r)), n.isCompiled = !0;
|
|
30194
30222
|
let s = null;
|
|
30195
|
-
return typeof n.keywords == "object" && n.keywords.$pattern && (n.keywords = Object.assign({}, n.keywords), s = n.keywords.$pattern, delete n.keywords.$pattern), s ||= /\w+/, n.keywords &&=
|
|
30223
|
+
return typeof n.keywords == "object" && n.keywords.$pattern && (n.keywords = Object.assign({}, n.keywords), s = n.keywords.$pattern, delete n.keywords.$pattern), s ||= /\w+/, n.keywords &&= Y(n.keywords, e.case_insensitive), a.keywordPatternRe = t(s, !0), r && (n.begin ||= /\B|\b/, a.beginRe = t(a.begin), !n.end && !n.endsWithParent && (n.end = /\B|\b/), n.end && (a.endRe = t(a.end)), a.terminatorEnd = p(a.end) || "", n.endsWithParent && r.terminatorEnd && (a.terminatorEnd += (n.end ? "|" : "") + r.terminatorEnd)), n.illegal && (a.illegalRe = t(n.illegal)), n.contains ||= [], n.contains = [].concat(...n.contains.map(function(e) {
|
|
30196
30224
|
return de(e === "self" ? n : e);
|
|
30197
30225
|
})), n.contains.forEach(function(e) {
|
|
30198
30226
|
o(e, a);
|
|
@@ -30237,13 +30265,13 @@ var fi = di, pi = (/* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
30237
30265
|
let n = l.languageDetectRe.exec(t);
|
|
30238
30266
|
if (n) {
|
|
30239
30267
|
let t = N(n[1]);
|
|
30240
|
-
return t || (
|
|
30268
|
+
return t || (Z(s.replace("{}", n[1])), Z("Falling back to no-highlight mode for this block.", e)), t ? n[1] : "no-highlight";
|
|
30241
30269
|
}
|
|
30242
30270
|
return t.split(/\s+/).find((e) => u(e) || N(e));
|
|
30243
30271
|
}
|
|
30244
30272
|
function p(e, t, n) {
|
|
30245
30273
|
let r = "", i = "";
|
|
30246
|
-
typeof t == "object" ? (r = e, n = t.ignoreIllegals, i = t.language) : (
|
|
30274
|
+
typeof t == "object" ? (r = e, n = t.ignoreIllegals, i = t.language) : (Q("10.7.0", "highlight(lang, code, ...args) has been deprecated."), Q("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), i = e, r = t), n === void 0 && (n = !0);
|
|
30247
30275
|
let a = {
|
|
30248
30276
|
code: r,
|
|
30249
30277
|
language: i
|
|
@@ -30374,7 +30402,7 @@ var fi = di, pi = (/* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
30374
30402
|
return P += a, a.length;
|
|
30375
30403
|
}
|
|
30376
30404
|
let D = N(e);
|
|
30377
|
-
if (!D) throw
|
|
30405
|
+
if (!D) throw X(s.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
|
|
30378
30406
|
let O = le(D), k = "", A = a || O, j = {}, M = new l.__emitter(l);
|
|
30379
30407
|
w();
|
|
30380
30408
|
let P = "", F = 0, I = 0, L = 0, R = !1;
|
|
@@ -30486,10 +30514,10 @@ var fi = di, pi = (/* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
30486
30514
|
l = he(l, e);
|
|
30487
30515
|
}
|
|
30488
30516
|
let E = () => {
|
|
30489
|
-
k(),
|
|
30517
|
+
k(), Q("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
30490
30518
|
};
|
|
30491
30519
|
function D() {
|
|
30492
|
-
k(),
|
|
30520
|
+
k(), Q("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
30493
30521
|
}
|
|
30494
30522
|
let O = !1;
|
|
30495
30523
|
function k() {
|
|
@@ -30507,7 +30535,7 @@ var fi = di, pi = (/* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
30507
30535
|
try {
|
|
30508
30536
|
i = r(e);
|
|
30509
30537
|
} catch (e) {
|
|
30510
|
-
if (
|
|
30538
|
+
if (X("Language definition for '{}' could not be registered.".replace("{}", n)), o) X(e);
|
|
30511
30539
|
else throw e;
|
|
30512
30540
|
i = c;
|
|
30513
30541
|
}
|
|
@@ -30553,7 +30581,7 @@ var fi = di, pi = (/* @__PURE__ */ me((/* @__PURE__ */ fe(((e, t) => {
|
|
|
30553
30581
|
});
|
|
30554
30582
|
}
|
|
30555
30583
|
function V(e) {
|
|
30556
|
-
return
|
|
30584
|
+
return Q("10.7.0", "highlightBlock will be removed entirely in v12.0"), Q("10.7.0", "Please use highlightElement now."), w(e);
|
|
30557
30585
|
}
|
|
30558
30586
|
Object.assign(e, {
|
|
30559
30587
|
highlight: p,
|
|
@@ -32336,7 +32364,7 @@ var ta = /\r\n|\r|\n/g, na = (e) => e.length === 0 ? [] : e.split(ta), ra = (e)
|
|
|
32336
32364
|
class: _(["me-code-box__tab", { "me-code-box__tab--active": t === v.value }]),
|
|
32337
32365
|
"aria-selected": t === v.value,
|
|
32338
32366
|
onClick: (e) => j(t)
|
|
32339
|
-
}, N(e.label), 11, ua))), 128))])) : x.value ? (C(), o("div", da, [u(P(
|
|
32367
|
+
}, N(e.label), 11, ua))), 128))])) : x.value ? (C(), o("div", da, [u(P(te), { size: 14 }), s("span", null, N(x.value), 1)])) : a("", !0),
|
|
32340
32368
|
n[0] ||= s("div", { class: "me-code-box__spacer" }, null, -1),
|
|
32341
32369
|
c.showCopy ? (C(), o("button", {
|
|
32342
32370
|
key: 2,
|
|
@@ -32347,7 +32375,7 @@ var ta = /\r\n|\r|\n/g, na = (e) => e.length === 0 ? [] : e.split(ta), ra = (e)
|
|
|
32347
32375
|
}, [M.value ? (C(), i(P(W), {
|
|
32348
32376
|
key: 0,
|
|
32349
32377
|
size: 14
|
|
32350
|
-
})) : (C(), i(P(
|
|
32378
|
+
})) : (C(), i(P(J), {
|
|
32351
32379
|
key: 1,
|
|
32352
32380
|
size: 14
|
|
32353
32381
|
})), s("span", null, N(M.value ? c.copiedText : c.copyText), 1)], 8, fa)) : a("", !0)
|
|
@@ -32451,7 +32479,7 @@ var _a = ha, va = /* @__PURE__ */ d({
|
|
|
32451
32479
|
}, [u.value ? (C(), i(P(W), {
|
|
32452
32480
|
key: 0,
|
|
32453
32481
|
size: 14
|
|
32454
|
-
})) : (C(), i(P(
|
|
32482
|
+
})) : (C(), i(P(J), {
|
|
32455
32483
|
key: 1,
|
|
32456
32484
|
size: 14
|
|
32457
32485
|
}))])) : a("", !0)]),
|
|
@@ -32701,7 +32729,7 @@ var xa = ba, Sa = [
|
|
|
32701
32729
|
typeof window < "u" && window.Vue && Ca(window.Vue);
|
|
32702
32730
|
var wa = {
|
|
32703
32731
|
install: Ca,
|
|
32704
|
-
version: "0.0.
|
|
32732
|
+
version: "0.0.36"
|
|
32705
32733
|
};
|
|
32706
32734
|
//#endregion
|
|
32707
32735
|
export { Oe as $message, Oe as MeMessage, Fr as BOOLEAN_OPTIONS, Nr as DATE_FORMAT, Mr as FLOAT_PRECISION, it as MeBody, Be as MeBox, Ge as MeBreadcrumb, kr as MeCard, _a as MeCodeBox, ga as MeCodeItem, Fe as MeIcon, Wn as MeInputGps, Cn as MeInputIconSelector, xa as MeInputJson, fi as MeInputNumber, ui as MeInputProperty, Qn as MeInputRadio, sr as MeLoadJson, xr as MeLoginPage, Dt as MeMenu, ye as MeMessageComponent, Qt as MeModal, Bt as MeNav, Ar as MeSkeleton, ya as MeText, Ln as MeTreeMenu, Pr as TIME_FORMAT, jr as VALUE_TYPE_OPTIONS, Jr as checkDuplicateKeys, wa as default, Ur as exportValue, Ir as genId, Br as inferValueType, Ca as install, Yr as isDuplicateKey, Qr as isRuleApplicable, Pe as loadIconfont, qr as normalizeKey, ei as normalizeRuleSet, Vr as normalizeValue, ti as sanitizeRulesForType, ii as toRuleMap, oi as toValueErrorMap, ri as validateValue, ai as valueError };
|