@romainbx/wpic-components 0.0.0 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +1 -1
- package/dist/wpic-components.js +1106 -1102
- package/dist/wpic-components.umd.cjs +18 -18
- package/package.json +1 -1
package/dist/wpic-components.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { inject as Zs, computed as Q, toValue as se, getCurrentInstance as an, defineComponent as An, toRef as zn, resolveDynamicComponent as bi, h as ht, unref as
|
|
1
|
+
import { inject as Zs, computed as Q, toValue as se, getCurrentInstance as an, defineComponent as An, toRef as zn, resolveDynamicComponent as bi, h as ht, unref as _, onMounted as rr, provide as Xs, isRef as qi, watch as xt, onBeforeUnmount as ir, ref as me, reactive as ii, nextTick as at, warn as Cf, readonly as Mf, watchEffect as Lc, onUnmounted as zc, shallowRef as Fc, openBlock as D, createElementBlock as V, createElementVNode as j, createVNode as Te, normalizeClass as le, createBlock as ct, withCtx as wt, createCommentVNode as ve, renderSlot as we, createTextVNode as rn, toDisplayString as Le, Fragment as on, Teleport as _c, resolveComponent as Tf, withModifiers as Ef, withDirectives as Bl, vShow as Ll, renderList as vn, normalizeStyle as jc, useSlots as Af, markRaw as Nf, customRef as Df } from "vue";
|
|
2
2
|
function If() {
|
|
3
3
|
return Hc().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
4
4
|
}
|
|
@@ -221,7 +221,7 @@ function el(t) {
|
|
|
221
221
|
function _l(t, e) {
|
|
222
222
|
return e in t && t[e] !== Ui;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function Ue(t, e) {
|
|
225
225
|
if (t === e)
|
|
226
226
|
return !0;
|
|
227
227
|
if (t && e && typeof t == "object" && typeof e == "object") {
|
|
@@ -232,7 +232,7 @@ function qe(t, e) {
|
|
|
232
232
|
if (n = t.length, n != e.length)
|
|
233
233
|
return !1;
|
|
234
234
|
for (r = n; r-- !== 0; )
|
|
235
|
-
if (!
|
|
235
|
+
if (!Ue(t[r], e[r]))
|
|
236
236
|
return !1;
|
|
237
237
|
return !0;
|
|
238
238
|
}
|
|
@@ -243,7 +243,7 @@ function qe(t, e) {
|
|
|
243
243
|
if (!e.has(r[0]))
|
|
244
244
|
return !1;
|
|
245
245
|
for (r of t.entries())
|
|
246
|
-
if (!
|
|
246
|
+
if (!Ue(r[1], e.get(r[0])))
|
|
247
247
|
return !1;
|
|
248
248
|
return !0;
|
|
249
249
|
}
|
|
@@ -273,7 +273,7 @@ function qe(t, e) {
|
|
|
273
273
|
return t.toString() === e.toString();
|
|
274
274
|
for (i = Object.keys(t), n = i.length, r = n; r-- !== 0; ) {
|
|
275
275
|
var o = i[r];
|
|
276
|
-
if (!
|
|
276
|
+
if (!Ue(t[o], e[o]))
|
|
277
277
|
return !1;
|
|
278
278
|
}
|
|
279
279
|
return !0;
|
|
@@ -286,7 +286,7 @@ function jl(t) {
|
|
|
286
286
|
function tl(t) {
|
|
287
287
|
return go(t) ? t.replace(/\[|\]/gi, "") : t;
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function tt(t, e, n) {
|
|
290
290
|
return t ? go(e) ? t[tl(e)] : (e || "").split(/\.|\[(\d+)\]/).filter(Boolean).reduce((i, o) => Uf(i) && o in i ? i[o] : n, t) : n;
|
|
291
291
|
}
|
|
292
292
|
function Qt(t, e, n) {
|
|
@@ -327,7 +327,7 @@ function Hl(t, e) {
|
|
|
327
327
|
break;
|
|
328
328
|
r = r[n[o]];
|
|
329
329
|
}
|
|
330
|
-
const i = n.map((o, s) =>
|
|
330
|
+
const i = n.map((o, s) => tt(t, n.slice(0, s).join(".")));
|
|
331
331
|
for (let o = i.length - 1; o >= 0; o--)
|
|
332
332
|
if (Kf(i[o])) {
|
|
333
333
|
if (o === 0) {
|
|
@@ -337,7 +337,7 @@ function Hl(t, e) {
|
|
|
337
337
|
Lo(i[o - 1], n[o - 1]);
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function Qe(t) {
|
|
341
341
|
return Object.keys(t);
|
|
342
342
|
}
|
|
343
343
|
function nl(t, e = void 0) {
|
|
@@ -346,10 +346,10 @@ function nl(t, e = void 0) {
|
|
|
346
346
|
}
|
|
347
347
|
function Wl(t, e, n) {
|
|
348
348
|
if (Array.isArray(t)) {
|
|
349
|
-
const r = [...t], i = r.findIndex((o) =>
|
|
349
|
+
const r = [...t], i = r.findIndex((o) => Ue(o, e));
|
|
350
350
|
return i >= 0 ? r.splice(i, 1) : r.push(e), r;
|
|
351
351
|
}
|
|
352
|
-
return
|
|
352
|
+
return Ue(t, e) ? n : e;
|
|
353
353
|
}
|
|
354
354
|
function Zf(t, e) {
|
|
355
355
|
let n, r;
|
|
@@ -464,11 +464,11 @@ const nh = (t) => {
|
|
|
464
464
|
return t.includes(":") && (e = t.split(":").slice(1).join(":").split(",")), { name: n, params: e };
|
|
465
465
|
};
|
|
466
466
|
function rh(t) {
|
|
467
|
-
const e = (n) =>
|
|
467
|
+
const e = (n) => tt(n, t) || n[t];
|
|
468
468
|
return e.__locatorRef = t, e;
|
|
469
469
|
}
|
|
470
470
|
function ih(t) {
|
|
471
|
-
return Array.isArray(t) ? t.filter(ys) :
|
|
471
|
+
return Array.isArray(t) ? t.filter(ys) : Qe(t).filter((e) => ys(t[e])).map((e) => t[e]);
|
|
472
472
|
}
|
|
473
473
|
const oh = {
|
|
474
474
|
generateMessage: ({ field: t }) => `${t} is not valid.`,
|
|
@@ -613,9 +613,9 @@ async function fh(t, e) {
|
|
|
613
613
|
};
|
|
614
614
|
}
|
|
615
615
|
async function hh(t, e, n) {
|
|
616
|
-
const i =
|
|
616
|
+
const i = Qe(t).map(async (c) => {
|
|
617
617
|
var u, d, f;
|
|
618
|
-
const h = (u = n == null ? void 0 : n.names) === null || u === void 0 ? void 0 : u[c], p = await Zc(
|
|
618
|
+
const h = (u = n == null ? void 0 : n.names) === null || u === void 0 ? void 0 : u[c], p = await Zc(tt(e, c), t[c], {
|
|
619
619
|
name: (h == null ? void 0 : h.name) || c,
|
|
620
620
|
label: h == null ? void 0 : h.label,
|
|
621
621
|
values: e,
|
|
@@ -665,7 +665,7 @@ function ph(t, e) {
|
|
|
665
665
|
}), s = Q(() => o.errors);
|
|
666
666
|
function l(a) {
|
|
667
667
|
var c, u, d;
|
|
668
|
-
"value" in a && (n.value = a.value), "errors" in a && ((c = e.form) === null || c === void 0 || c.setFieldError(
|
|
668
|
+
"value" in a && (n.value = a.value), "errors" in a && ((c = e.form) === null || c === void 0 || c.setFieldError(_(t), a.errors)), "touched" in a && ((u = e.form) === null || u === void 0 || u.setFieldTouched(_(t), (d = a.touched) !== null && d !== void 0 ? d : !1)), "initialValue" in a && i(a.initialValue);
|
|
669
669
|
}
|
|
670
670
|
return {
|
|
671
671
|
id: Array.isArray(o.id) ? o.id[o.id.length - 1] : o.id,
|
|
@@ -679,16 +679,16 @@ function ph(t, e) {
|
|
|
679
679
|
};
|
|
680
680
|
}
|
|
681
681
|
function mh(t, e, n) {
|
|
682
|
-
const r = me(
|
|
682
|
+
const r = me(_(e));
|
|
683
683
|
function i() {
|
|
684
|
-
return n ?
|
|
684
|
+
return n ? tt(n.initialValues.value, _(t), _(r)) : _(r);
|
|
685
685
|
}
|
|
686
686
|
function o(c) {
|
|
687
687
|
if (!n) {
|
|
688
688
|
r.value = c;
|
|
689
689
|
return;
|
|
690
690
|
}
|
|
691
|
-
n.setFieldInitialValue(
|
|
691
|
+
n.setFieldInitialValue(_(t), c, !0);
|
|
692
692
|
}
|
|
693
693
|
const s = Q(i);
|
|
694
694
|
if (!n)
|
|
@@ -698,13 +698,13 @@ function mh(t, e, n) {
|
|
|
698
698
|
setInitialValue: o
|
|
699
699
|
};
|
|
700
700
|
const l = gh(e, n, s, t);
|
|
701
|
-
return n.stageInitialValue(
|
|
701
|
+
return n.stageInitialValue(_(t), l, !0), {
|
|
702
702
|
value: Q({
|
|
703
703
|
get() {
|
|
704
|
-
return
|
|
704
|
+
return tt(n.values, _(t));
|
|
705
705
|
},
|
|
706
706
|
set(c) {
|
|
707
|
-
n.setFieldValue(
|
|
707
|
+
n.setFieldValue(_(t), c, !1);
|
|
708
708
|
}
|
|
709
709
|
}),
|
|
710
710
|
initialValue: s,
|
|
@@ -712,7 +712,7 @@ function mh(t, e, n) {
|
|
|
712
712
|
};
|
|
713
713
|
}
|
|
714
714
|
function gh(t, e, n, r) {
|
|
715
|
-
return qi(t) ?
|
|
715
|
+
return qi(t) ? _(t) : t !== void 0 ? t : tt(e.values, _(r), _(n));
|
|
716
716
|
}
|
|
717
717
|
function yh(t, e, n, r) {
|
|
718
718
|
const i = Q(() => {
|
|
@@ -723,9 +723,9 @@ function yh(t, e, n, r) {
|
|
|
723
723
|
pending: !1,
|
|
724
724
|
valid: !0,
|
|
725
725
|
required: i,
|
|
726
|
-
validated: !!
|
|
727
|
-
initialValue: Q(() =>
|
|
728
|
-
dirty: Q(() => !
|
|
726
|
+
validated: !!_(n).length,
|
|
727
|
+
initialValue: Q(() => _(e)),
|
|
728
|
+
dirty: Q(() => !Ue(_(t), _(e)))
|
|
729
729
|
});
|
|
730
730
|
return xt(n, (s) => {
|
|
731
731
|
o.valid = !s.length;
|
|
@@ -784,7 +784,7 @@ function wh(t) {
|
|
|
784
784
|
delete Yr[t.id], Cr();
|
|
785
785
|
}), Cr();
|
|
786
786
|
}
|
|
787
|
-
const gr = "vee-validate-inspector",
|
|
787
|
+
const gr = "vee-validate-inspector", et = {
|
|
788
788
|
error: 12405579,
|
|
789
789
|
success: 448379,
|
|
790
790
|
unknown: 5522283,
|
|
@@ -875,7 +875,7 @@ function xh(t) {
|
|
|
875
875
|
function kh(t) {
|
|
876
876
|
const { textColor: e, bgColor: n } = nu(t.meta.value.valid), r = {};
|
|
877
877
|
Object.values(t.getAllPathStates()).forEach((s) => {
|
|
878
|
-
Qt(r,
|
|
878
|
+
Qt(r, _(s.path), Sh(s, t));
|
|
879
879
|
});
|
|
880
880
|
function i(s, l = []) {
|
|
881
881
|
const a = [...l].pop();
|
|
@@ -902,8 +902,8 @@ function kh(t) {
|
|
|
902
902
|
},
|
|
903
903
|
{
|
|
904
904
|
label: `${t.getAllPathStates().length} fields`,
|
|
905
|
-
textColor:
|
|
906
|
-
backgroundColor:
|
|
905
|
+
textColor: et.white,
|
|
906
|
+
backgroundColor: et.unknown
|
|
907
907
|
}
|
|
908
908
|
]
|
|
909
909
|
};
|
|
@@ -911,14 +911,14 @@ function kh(t) {
|
|
|
911
911
|
function Sh(t, e) {
|
|
912
912
|
return {
|
|
913
913
|
id: il(e, t),
|
|
914
|
-
label:
|
|
914
|
+
label: _(t.path),
|
|
915
915
|
tags: tu(t.multiple, t.fieldsCount, t.type, t.valid, e)
|
|
916
916
|
};
|
|
917
917
|
}
|
|
918
918
|
function Oh(t, e) {
|
|
919
919
|
return {
|
|
920
920
|
id: il(e, t),
|
|
921
|
-
label:
|
|
921
|
+
label: _(t.name),
|
|
922
922
|
tags: tu(!1, 1, t.type, t.meta.valid, e)
|
|
923
923
|
};
|
|
924
924
|
}
|
|
@@ -932,28 +932,28 @@ function tu(t, e, n, r, i) {
|
|
|
932
932
|
},
|
|
933
933
|
i ? void 0 : {
|
|
934
934
|
label: "Standalone",
|
|
935
|
-
textColor:
|
|
936
|
-
backgroundColor:
|
|
935
|
+
textColor: et.black,
|
|
936
|
+
backgroundColor: et.gray
|
|
937
937
|
},
|
|
938
938
|
n === "checkbox" ? {
|
|
939
939
|
label: "Checkbox",
|
|
940
|
-
textColor:
|
|
941
|
-
backgroundColor:
|
|
940
|
+
textColor: et.white,
|
|
941
|
+
backgroundColor: et.blue
|
|
942
942
|
} : void 0,
|
|
943
943
|
n === "radio" ? {
|
|
944
944
|
label: "Radio",
|
|
945
|
-
textColor:
|
|
946
|
-
backgroundColor:
|
|
945
|
+
textColor: et.white,
|
|
946
|
+
backgroundColor: et.purple
|
|
947
947
|
} : void 0,
|
|
948
948
|
t ? {
|
|
949
949
|
label: "Multiple",
|
|
950
|
-
textColor:
|
|
951
|
-
backgroundColor:
|
|
950
|
+
textColor: et.black,
|
|
951
|
+
backgroundColor: et.orange
|
|
952
952
|
} : void 0
|
|
953
953
|
].filter(Boolean);
|
|
954
954
|
}
|
|
955
955
|
function il(t, e) {
|
|
956
|
-
const n = e ? "path" in e ? "pathState" : "field" : "form", r = e ? "path" in e ? e == null ? void 0 : e.path :
|
|
956
|
+
const n = e ? "path" in e ? "pathState" : "field" : "form", r = e ? "path" in e ? e == null ? void 0 : e.path : _(e == null ? void 0 : e.name) : "", i = { f: t == null ? void 0 : t.formId, ff: r, type: n };
|
|
957
957
|
return btoa(encodeURIComponent(JSON.stringify(i)));
|
|
958
958
|
}
|
|
959
959
|
function Ch(t) {
|
|
@@ -1043,7 +1043,7 @@ function Mh(t) {
|
|
|
1043
1043
|
},
|
|
1044
1044
|
{
|
|
1045
1045
|
key: "errors",
|
|
1046
|
-
value:
|
|
1046
|
+
value: Qe(e.value).reduce((l, a) => {
|
|
1047
1047
|
var c;
|
|
1048
1048
|
const u = (c = e.value[a]) === null || c === void 0 ? void 0 : c[0];
|
|
1049
1049
|
return u && (l[a] = u), l;
|
|
@@ -1054,36 +1054,36 @@ function Mh(t) {
|
|
|
1054
1054
|
}
|
|
1055
1055
|
function nu(t) {
|
|
1056
1056
|
return {
|
|
1057
|
-
bgColor: t ?
|
|
1058
|
-
textColor: t ?
|
|
1057
|
+
bgColor: t ? et.success : et.error,
|
|
1058
|
+
textColor: t ? et.black : et.white
|
|
1059
1059
|
};
|
|
1060
1060
|
}
|
|
1061
1061
|
function Th(t, e, n) {
|
|
1062
1062
|
return xi(n == null ? void 0 : n.type) ? Ah(t, e, n) : ru(t, e, n);
|
|
1063
1063
|
}
|
|
1064
1064
|
function ru(t, e, n) {
|
|
1065
|
-
const { initialValue: r, validateOnMount: i, bails: o, type: s, checkedValue: l, label: a, validateOnValueUpdate: c, uncheckedValue: u, controlled: d, keepValueOnUnmount: f, syncVModel: h, form: p } = Eh(n), g = d ? nl(wi) : void 0, m = p || g, v = Q(() => qr(se(t))),
|
|
1065
|
+
const { initialValue: r, validateOnMount: i, bails: o, type: s, checkedValue: l, label: a, validateOnValueUpdate: c, uncheckedValue: u, controlled: d, keepValueOnUnmount: f, syncVModel: h, form: p } = Eh(n), g = d ? nl(wi) : void 0, m = p || g, v = Q(() => qr(se(t))), x = Q(() => {
|
|
1066
1066
|
if (se(m == null ? void 0 : m.schema))
|
|
1067
1067
|
return;
|
|
1068
|
-
const K =
|
|
1068
|
+
const K = _(e);
|
|
1069
1069
|
return Ki(K) || At(K) || Ae(K) || Array.isArray(K) ? K : Yc(K);
|
|
1070
|
-
}),
|
|
1070
|
+
}), O = !Ae(x.value) && At(se(e)), { id: y, value: M, initialValue: b, meta: E, setState: R, errors: N, flags: L } = ph(v, {
|
|
1071
1071
|
modelValue: r,
|
|
1072
1072
|
form: m,
|
|
1073
1073
|
bails: o,
|
|
1074
1074
|
label: a,
|
|
1075
1075
|
type: s,
|
|
1076
|
-
validate:
|
|
1077
|
-
schema:
|
|
1078
|
-
}), Z = Q(() =>
|
|
1076
|
+
validate: x.value ? F : void 0,
|
|
1077
|
+
schema: O ? e : void 0
|
|
1078
|
+
}), Z = Q(() => N.value[0]);
|
|
1079
1079
|
h && Nh({
|
|
1080
|
-
value:
|
|
1080
|
+
value: M,
|
|
1081
1081
|
prop: h,
|
|
1082
1082
|
handleChange: re,
|
|
1083
|
-
shouldValidate: () => c && !
|
|
1083
|
+
shouldValidate: () => c && !L.pendingReset
|
|
1084
1084
|
});
|
|
1085
1085
|
const J = (I, K = !1) => {
|
|
1086
|
-
|
|
1086
|
+
E.touched = !0, K && ie();
|
|
1087
1087
|
};
|
|
1088
1088
|
async function te(I) {
|
|
1089
1089
|
var K, ce;
|
|
@@ -1091,20 +1091,20 @@ function ru(t, e, n) {
|
|
|
1091
1091
|
const { results: oe } = await m.validateSchema(I);
|
|
1092
1092
|
return (K = oe[se(v)]) !== null && K !== void 0 ? K : { valid: !0, errors: [] };
|
|
1093
1093
|
}
|
|
1094
|
-
return
|
|
1094
|
+
return x.value ? Zc(M.value, x.value, {
|
|
1095
1095
|
name: se(v),
|
|
1096
1096
|
label: se(a),
|
|
1097
1097
|
values: (ce = m == null ? void 0 : m.values) !== null && ce !== void 0 ? ce : {},
|
|
1098
1098
|
bails: o
|
|
1099
1099
|
}) : { valid: !0, errors: [] };
|
|
1100
1100
|
}
|
|
1101
|
-
const ie = vs(async () => (
|
|
1102
|
-
function
|
|
1101
|
+
const ie = vs(async () => (E.pending = !0, E.validated = !0, te("validated-only")), (I) => (L.pendingUnmount[he.id] || (R({ errors: I.errors }), E.pending = !1, E.valid = I.valid), I)), ne = vs(async () => te("silent"), (I) => (E.valid = I.valid, I));
|
|
1102
|
+
function F(I) {
|
|
1103
1103
|
return (I == null ? void 0 : I.mode) === "silent" ? ne() : ie();
|
|
1104
1104
|
}
|
|
1105
1105
|
function re(I, K = !0) {
|
|
1106
1106
|
const ce = Ji(I);
|
|
1107
|
-
|
|
1107
|
+
Ze(ce, K);
|
|
1108
1108
|
}
|
|
1109
1109
|
rr(() => {
|
|
1110
1110
|
if (i)
|
|
@@ -1112,39 +1112,39 @@ function ru(t, e, n) {
|
|
|
1112
1112
|
(!m || !m.validateSchema) && ne();
|
|
1113
1113
|
});
|
|
1114
1114
|
function ae(I) {
|
|
1115
|
-
|
|
1115
|
+
E.touched = I;
|
|
1116
1116
|
}
|
|
1117
1117
|
function Se(I) {
|
|
1118
1118
|
var K;
|
|
1119
|
-
const ce = I && "value" in I ? I.value :
|
|
1120
|
-
|
|
1119
|
+
const ce = I && "value" in I ? I.value : b.value;
|
|
1120
|
+
R({
|
|
1121
1121
|
value: de(ce),
|
|
1122
1122
|
initialValue: de(ce),
|
|
1123
1123
|
touched: (K = I == null ? void 0 : I.touched) !== null && K !== void 0 ? K : !1,
|
|
1124
1124
|
errors: (I == null ? void 0 : I.errors) || []
|
|
1125
|
-
}),
|
|
1125
|
+
}), E.pending = !1, E.validated = !1, ne();
|
|
1126
1126
|
}
|
|
1127
1127
|
const _e = an();
|
|
1128
|
-
function
|
|
1129
|
-
|
|
1128
|
+
function Ze(I, K = !0) {
|
|
1129
|
+
M.value = _e && h ? Xf(I, _e.props.modelModifiers) : I, (K ? ie : ne)();
|
|
1130
1130
|
}
|
|
1131
1131
|
function ot(I) {
|
|
1132
|
-
|
|
1132
|
+
R({ errors: Array.isArray(I) ? I : [I] });
|
|
1133
1133
|
}
|
|
1134
1134
|
const st = Q({
|
|
1135
1135
|
get() {
|
|
1136
|
-
return
|
|
1136
|
+
return M.value;
|
|
1137
1137
|
},
|
|
1138
1138
|
set(I) {
|
|
1139
|
-
|
|
1139
|
+
Ze(I, c);
|
|
1140
1140
|
}
|
|
1141
1141
|
}), he = {
|
|
1142
1142
|
id: y,
|
|
1143
1143
|
name: v,
|
|
1144
1144
|
label: a,
|
|
1145
1145
|
value: st,
|
|
1146
|
-
meta:
|
|
1147
|
-
errors:
|
|
1146
|
+
meta: E,
|
|
1147
|
+
errors: N,
|
|
1148
1148
|
errorMessage: Z,
|
|
1149
1149
|
type: s,
|
|
1150
1150
|
checkedValue: l,
|
|
@@ -1153,28 +1153,28 @@ function ru(t, e, n) {
|
|
|
1153
1153
|
keepValueOnUnmount: f,
|
|
1154
1154
|
resetField: Se,
|
|
1155
1155
|
handleReset: () => Se(),
|
|
1156
|
-
validate:
|
|
1156
|
+
validate: F,
|
|
1157
1157
|
handleChange: re,
|
|
1158
1158
|
handleBlur: J,
|
|
1159
|
-
setState:
|
|
1159
|
+
setState: R,
|
|
1160
1160
|
setTouched: ae,
|
|
1161
1161
|
setErrors: ot,
|
|
1162
|
-
setValue:
|
|
1162
|
+
setValue: Ze
|
|
1163
1163
|
};
|
|
1164
|
-
if (Xs(Uc, he), qi(e) && typeof
|
|
1165
|
-
|
|
1164
|
+
if (Xs(Uc, he), qi(e) && typeof _(e) != "function" && xt(e, (I, K) => {
|
|
1165
|
+
Ue(I, K) || (E.validated ? ie() : ne());
|
|
1166
1166
|
}, {
|
|
1167
1167
|
deep: !0
|
|
1168
|
-
}), process.env.NODE_ENV !== "production" && (he._vm = an(), xt(() => Object.assign(Object.assign({ errors:
|
|
1168
|
+
}), process.env.NODE_ENV !== "production" && (he._vm = an(), xt(() => Object.assign(Object.assign({ errors: N.value }, E), { value: M.value }), Cr, {
|
|
1169
1169
|
deep: !0
|
|
1170
1170
|
}), m || wh(he)), !m)
|
|
1171
1171
|
return he;
|
|
1172
1172
|
const je = Q(() => {
|
|
1173
|
-
const I =
|
|
1173
|
+
const I = x.value;
|
|
1174
1174
|
return !I || Ae(I) || Ki(I) || At(I) || Array.isArray(I) ? {} : Object.keys(I).reduce((K, ce) => {
|
|
1175
1175
|
const oe = ih(I[ce]).map((Ce) => Ce.__locatorRef).reduce((Ce, Me) => {
|
|
1176
|
-
const
|
|
1177
|
-
return
|
|
1176
|
+
const Xe = tt(m.values, Me) || m.values[Me];
|
|
1177
|
+
return Xe !== void 0 && (Ce[Me] = Xe), Ce;
|
|
1178
1178
|
}, {});
|
|
1179
1179
|
return Object.assign(K, oe), K;
|
|
1180
1180
|
}, {});
|
|
@@ -1182,22 +1182,22 @@ function ru(t, e, n) {
|
|
|
1182
1182
|
return xt(je, (I, K) => {
|
|
1183
1183
|
if (!Object.keys(I).length)
|
|
1184
1184
|
return;
|
|
1185
|
-
!
|
|
1185
|
+
!Ue(I, K) && (E.validated ? ie() : ne());
|
|
1186
1186
|
}), ir(() => {
|
|
1187
1187
|
var I;
|
|
1188
1188
|
const K = (I = se(he.keepValueOnUnmount)) !== null && I !== void 0 ? I : se(m.keepValuesOnUnmount), ce = se(v);
|
|
1189
|
-
if (K || !m ||
|
|
1189
|
+
if (K || !m || L.pendingUnmount[he.id]) {
|
|
1190
1190
|
m == null || m.removePathState(ce, y);
|
|
1191
1191
|
return;
|
|
1192
1192
|
}
|
|
1193
|
-
|
|
1193
|
+
L.pendingUnmount[he.id] = !0;
|
|
1194
1194
|
const oe = m.getPathState(ce);
|
|
1195
1195
|
if (Array.isArray(oe == null ? void 0 : oe.id) && (oe != null && oe.multiple) ? oe != null && oe.id.includes(he.id) : (oe == null ? void 0 : oe.id) === he.id) {
|
|
1196
1196
|
if (oe != null && oe.multiple && Array.isArray(oe.value)) {
|
|
1197
|
-
const Me = oe.value.findIndex((
|
|
1197
|
+
const Me = oe.value.findIndex((Xe) => Ue(Xe, se(he.checkedValue)));
|
|
1198
1198
|
if (Me > -1) {
|
|
1199
|
-
const
|
|
1200
|
-
|
|
1199
|
+
const Xe = [...oe.value];
|
|
1200
|
+
Xe.splice(Me, 1), m.setFieldValue(ce, Xe);
|
|
1201
1201
|
}
|
|
1202
1202
|
Array.isArray(oe.id) && oe.id.splice(oe.id.indexOf(he.id), 1);
|
|
1203
1203
|
} else
|
|
@@ -1232,7 +1232,7 @@ function Ah(t, e, n) {
|
|
|
1232
1232
|
function s(l) {
|
|
1233
1233
|
const a = l.handleChange, c = Q(() => {
|
|
1234
1234
|
const d = se(l.value), f = se(i);
|
|
1235
|
-
return Array.isArray(d) ? d.findIndex((h) =>
|
|
1235
|
+
return Array.isArray(d) ? d.findIndex((h) => Ue(h, f)) >= 0 : Ue(f, d);
|
|
1236
1236
|
});
|
|
1237
1237
|
function u(d, f = !0) {
|
|
1238
1238
|
var h, p;
|
|
@@ -1241,8 +1241,8 @@ function Ah(t, e, n) {
|
|
|
1241
1241
|
return;
|
|
1242
1242
|
}
|
|
1243
1243
|
const g = se(t), m = r == null ? void 0 : r.getPathState(g), v = Ji(d);
|
|
1244
|
-
let
|
|
1245
|
-
r && (m != null && m.multiple) && m.type === "checkbox" ?
|
|
1244
|
+
let x = (p = se(i)) !== null && p !== void 0 ? p : v;
|
|
1245
|
+
r && (m != null && m.multiple) && m.type === "checkbox" ? x = Wl(tt(r.values, g) || [], x, void 0) : (n == null ? void 0 : n.type) === "checkbox" && (x = Wl(se(l.value), x, se(o))), a(x, f);
|
|
1246
1246
|
}
|
|
1247
1247
|
return Object.assign(Object.assign({}, l), {
|
|
1248
1248
|
checked: c,
|
|
@@ -1261,12 +1261,12 @@ function Nh({ prop: t, value: e, handleChange: n, shouldValidate: r }) {
|
|
|
1261
1261
|
}
|
|
1262
1262
|
const o = typeof t == "string" ? t : "modelValue", s = `update:${o}`;
|
|
1263
1263
|
o in i.props && (xt(e, (l) => {
|
|
1264
|
-
|
|
1264
|
+
Ue(l, ws(i, o)) || i.emit(s, l);
|
|
1265
1265
|
}), xt(() => ws(i, o), (l) => {
|
|
1266
1266
|
if (l === Ui && e.value === void 0)
|
|
1267
1267
|
return;
|
|
1268
1268
|
const a = l === Ui ? void 0 : l;
|
|
1269
|
-
|
|
1269
|
+
Ue(a, e.value) || n(a, r());
|
|
1270
1270
|
}));
|
|
1271
1271
|
}
|
|
1272
1272
|
function ws(t, e) {
|
|
@@ -1343,7 +1343,7 @@ const Dh = /* @__PURE__ */ An({
|
|
|
1343
1343
|
}
|
|
1344
1344
|
},
|
|
1345
1345
|
setup(t, e) {
|
|
1346
|
-
const n = zn(t, "rules"), r = zn(t, "name"), i = zn(t, "label"), o = zn(t, "uncheckedValue"), s = zn(t, "keepValue"), { errors: l, value: a, errorMessage: c, validate: u, handleChange: d, handleBlur: f, setTouched: h, resetField: p, handleReset: g, meta: m, checked: v, setErrors:
|
|
1346
|
+
const n = zn(t, "rules"), r = zn(t, "name"), i = zn(t, "label"), o = zn(t, "uncheckedValue"), s = zn(t, "keepValue"), { errors: l, value: a, errorMessage: c, validate: u, handleChange: d, handleBlur: f, setTouched: h, resetField: p, handleReset: g, meta: m, checked: v, setErrors: x } = Th(r, n, {
|
|
1347
1347
|
validateOnMount: t.validateOnMount,
|
|
1348
1348
|
bails: t.bails,
|
|
1349
1349
|
standalone: t.standalone,
|
|
@@ -1356,18 +1356,18 @@ const Dh = /* @__PURE__ */ An({
|
|
|
1356
1356
|
validateOnValueUpdate: t.validateOnModelUpdate,
|
|
1357
1357
|
keepValueOnUnmount: s,
|
|
1358
1358
|
syncVModel: !0
|
|
1359
|
-
}),
|
|
1360
|
-
d(
|
|
1359
|
+
}), O = function(N, L = !0) {
|
|
1360
|
+
d(N, L);
|
|
1361
1361
|
}, y = Q(() => {
|
|
1362
|
-
const { validateOnInput:
|
|
1363
|
-
function J(
|
|
1364
|
-
f(
|
|
1362
|
+
const { validateOnInput: R, validateOnChange: N, validateOnBlur: L, validateOnModelUpdate: Z } = Ih(t);
|
|
1363
|
+
function J(F) {
|
|
1364
|
+
f(F, L), Ae(e.attrs.onBlur) && e.attrs.onBlur(F);
|
|
1365
1365
|
}
|
|
1366
|
-
function te(
|
|
1367
|
-
|
|
1366
|
+
function te(F) {
|
|
1367
|
+
O(F, R), Ae(e.attrs.onInput) && e.attrs.onInput(F);
|
|
1368
1368
|
}
|
|
1369
|
-
function ie(
|
|
1370
|
-
|
|
1369
|
+
function ie(F) {
|
|
1370
|
+
O(F, N), Ae(e.attrs.onChange) && e.attrs.onChange(F);
|
|
1371
1371
|
}
|
|
1372
1372
|
const ne = {
|
|
1373
1373
|
name: t.name,
|
|
@@ -1375,29 +1375,29 @@ const Dh = /* @__PURE__ */ An({
|
|
|
1375
1375
|
onInput: te,
|
|
1376
1376
|
onChange: ie
|
|
1377
1377
|
};
|
|
1378
|
-
return ne["onUpdate:modelValue"] = (
|
|
1379
|
-
}),
|
|
1380
|
-
const
|
|
1381
|
-
xi(e.attrs.type) && v && (
|
|
1382
|
-
const
|
|
1383
|
-
return Yf(
|
|
1384
|
-
}),
|
|
1385
|
-
function
|
|
1378
|
+
return ne["onUpdate:modelValue"] = (F) => O(F, Z), ne;
|
|
1379
|
+
}), M = Q(() => {
|
|
1380
|
+
const R = Object.assign({}, y.value);
|
|
1381
|
+
xi(e.attrs.type) && v && (R.checked = v.value);
|
|
1382
|
+
const N = Gl(t, e);
|
|
1383
|
+
return Yf(N, e.attrs) && (R.value = a.value), R;
|
|
1384
|
+
}), b = Q(() => Object.assign(Object.assign({}, y.value), { modelValue: a.value }));
|
|
1385
|
+
function E() {
|
|
1386
1386
|
return {
|
|
1387
|
-
field:
|
|
1388
|
-
componentField:
|
|
1387
|
+
field: M.value,
|
|
1388
|
+
componentField: b.value,
|
|
1389
1389
|
value: a.value,
|
|
1390
1390
|
meta: m,
|
|
1391
1391
|
errors: l.value,
|
|
1392
1392
|
errorMessage: c.value,
|
|
1393
1393
|
validate: u,
|
|
1394
1394
|
resetField: p,
|
|
1395
|
-
handleChange:
|
|
1396
|
-
handleInput: (
|
|
1395
|
+
handleChange: O,
|
|
1396
|
+
handleInput: (R) => O(R, !1),
|
|
1397
1397
|
handleReset: g,
|
|
1398
1398
|
handleBlur: y.value.onBlur,
|
|
1399
1399
|
setTouched: h,
|
|
1400
|
-
setErrors:
|
|
1400
|
+
setErrors: x
|
|
1401
1401
|
};
|
|
1402
1402
|
}
|
|
1403
1403
|
return e.expose({
|
|
@@ -1405,14 +1405,14 @@ const Dh = /* @__PURE__ */ An({
|
|
|
1405
1405
|
meta: m,
|
|
1406
1406
|
errors: l,
|
|
1407
1407
|
errorMessage: c,
|
|
1408
|
-
setErrors:
|
|
1408
|
+
setErrors: x,
|
|
1409
1409
|
setTouched: h,
|
|
1410
1410
|
reset: p,
|
|
1411
1411
|
validate: u,
|
|
1412
1412
|
handleChange: d
|
|
1413
1413
|
}), () => {
|
|
1414
|
-
const
|
|
1415
|
-
return
|
|
1414
|
+
const R = bi(Gl(t, e)), N = rl(R, e, E);
|
|
1415
|
+
return R ? ht(R, Object.assign(Object.assign({}, e.attrs), M.value), N) : N;
|
|
1416
1416
|
};
|
|
1417
1417
|
}
|
|
1418
1418
|
});
|
|
@@ -1437,7 +1437,7 @@ const Ni = Dh;
|
|
|
1437
1437
|
let Rh = 0;
|
|
1438
1438
|
const Di = ["bails", "fieldsCount", "id", "multiple", "type", "validate"];
|
|
1439
1439
|
function iu(t) {
|
|
1440
|
-
const e = (t == null ? void 0 : t.initialValues) || {}, n = Object.assign({}, se(e)), r =
|
|
1440
|
+
const e = (t == null ? void 0 : t.initialValues) || {}, n = Object.assign({}, se(e)), r = _(t == null ? void 0 : t.validationSchema);
|
|
1441
1441
|
return r && At(r) && Ae(r.cast) ? de(r.cast(n) || {}) : de(n);
|
|
1442
1442
|
}
|
|
1443
1443
|
function $h(t) {
|
|
@@ -1445,69 +1445,69 @@ function $h(t) {
|
|
|
1445
1445
|
const n = Rh++;
|
|
1446
1446
|
let r = 0;
|
|
1447
1447
|
const i = me(!1), o = me(!1), s = me(0), l = [], a = ii(iu(t)), c = me([]), u = me({}), d = me({}), f = Qf(() => {
|
|
1448
|
-
d.value = c.value.reduce((
|
|
1448
|
+
d.value = c.value.reduce((S, k) => (S[qr(se(k.path))] = k, S), {});
|
|
1449
1449
|
});
|
|
1450
|
-
function h(
|
|
1451
|
-
const
|
|
1452
|
-
if (!
|
|
1453
|
-
typeof
|
|
1450
|
+
function h(S, k) {
|
|
1451
|
+
const C = F(S);
|
|
1452
|
+
if (!C) {
|
|
1453
|
+
typeof S == "string" && (u.value[qr(S)] = bs(k));
|
|
1454
1454
|
return;
|
|
1455
1455
|
}
|
|
1456
|
-
if (typeof
|
|
1457
|
-
const $ = qr(
|
|
1456
|
+
if (typeof S == "string") {
|
|
1457
|
+
const $ = qr(S);
|
|
1458
1458
|
u.value[$] && delete u.value[$];
|
|
1459
1459
|
}
|
|
1460
|
-
|
|
1460
|
+
C.errors = bs(k), C.valid = !C.errors.length;
|
|
1461
1461
|
}
|
|
1462
|
-
function p(
|
|
1463
|
-
|
|
1464
|
-
h(
|
|
1462
|
+
function p(S) {
|
|
1463
|
+
Qe(S).forEach((k) => {
|
|
1464
|
+
h(k, S[k]);
|
|
1465
1465
|
});
|
|
1466
1466
|
}
|
|
1467
1467
|
t != null && t.initialErrors && p(t.initialErrors);
|
|
1468
1468
|
const g = Q(() => {
|
|
1469
|
-
const
|
|
1470
|
-
return Object.assign(Object.assign({}, u.value),
|
|
1471
|
-
}), m = Q(() =>
|
|
1472
|
-
const
|
|
1473
|
-
return
|
|
1474
|
-
}, {})), v = Q(() => c.value.reduce((
|
|
1475
|
-
var
|
|
1476
|
-
return
|
|
1477
|
-
}, {})),
|
|
1478
|
-
const
|
|
1479
|
-
return Qt(
|
|
1480
|
-
}, {})),
|
|
1481
|
-
function Z(
|
|
1482
|
-
var
|
|
1483
|
-
const q = Q(() =>
|
|
1484
|
-
if (
|
|
1485
|
-
|
|
1469
|
+
const S = c.value.reduce((k, C) => (C.errors.length && (k[C.path] = C.errors), k), {});
|
|
1470
|
+
return Object.assign(Object.assign({}, u.value), S);
|
|
1471
|
+
}), m = Q(() => Qe(g.value).reduce((S, k) => {
|
|
1472
|
+
const C = g.value[k];
|
|
1473
|
+
return C != null && C.length && (S[k] = C[0]), S;
|
|
1474
|
+
}, {})), v = Q(() => c.value.reduce((S, k) => (S[k.path] = { name: k.path || "", label: k.label || "" }, S), {})), x = Q(() => c.value.reduce((S, k) => {
|
|
1475
|
+
var C;
|
|
1476
|
+
return S[k.path] = (C = k.bails) !== null && C !== void 0 ? C : !0, S;
|
|
1477
|
+
}, {})), O = Object.assign({}, (t == null ? void 0 : t.initialErrors) || {}), y = (e = t == null ? void 0 : t.keepValuesOnUnmount) !== null && e !== void 0 ? e : !1, { initialValues: M, originalInitialValues: b, setInitialValues: E } = Bh(c, a, t), R = Vh(c, a, b, m), N = Q(() => c.value.reduce((S, k) => {
|
|
1478
|
+
const C = tt(a, k.path);
|
|
1479
|
+
return Qt(S, k.path, C), S;
|
|
1480
|
+
}, {})), L = t == null ? void 0 : t.validationSchema;
|
|
1481
|
+
function Z(S, k) {
|
|
1482
|
+
var C, $;
|
|
1483
|
+
const q = Q(() => tt(M.value, se(S))), w = d.value[se(S)], A = (k == null ? void 0 : k.type) === "checkbox" || (k == null ? void 0 : k.type) === "radio";
|
|
1484
|
+
if (w && A) {
|
|
1485
|
+
w.multiple = !0;
|
|
1486
1486
|
const He = r++;
|
|
1487
|
-
return Array.isArray(
|
|
1487
|
+
return Array.isArray(w.id) ? w.id.push(He) : w.id = [w.id, He], w.fieldsCount++, w.__flags.pendingUnmount[He] = !1, w;
|
|
1488
1488
|
}
|
|
1489
|
-
const B = Q(() =>
|
|
1489
|
+
const B = Q(() => tt(a, se(S))), W = se(S), U = ae.findIndex((He) => He === W);
|
|
1490
1490
|
U !== -1 && ae.splice(U, 1);
|
|
1491
1491
|
const Y = Q(() => {
|
|
1492
1492
|
var He, lt, Bn, hn;
|
|
1493
|
-
const Bt = se(
|
|
1493
|
+
const Bt = se(L);
|
|
1494
1494
|
if (At(Bt))
|
|
1495
|
-
return (lt = (He = Bt.describe) === null || He === void 0 ? void 0 : He.call(Bt, se(
|
|
1496
|
-
const _r = se(
|
|
1495
|
+
return (lt = (He = Bt.describe) === null || He === void 0 ? void 0 : He.call(Bt, se(S)).required) !== null && lt !== void 0 ? lt : !1;
|
|
1496
|
+
const _r = se(k == null ? void 0 : k.schema);
|
|
1497
1497
|
return At(_r) && (hn = (Bn = _r.describe) === null || Bn === void 0 ? void 0 : Bn.call(_r).required) !== null && hn !== void 0 ? hn : !1;
|
|
1498
1498
|
}), ue = r++, ge = ii({
|
|
1499
1499
|
id: ue,
|
|
1500
|
-
path:
|
|
1500
|
+
path: S,
|
|
1501
1501
|
touched: !1,
|
|
1502
1502
|
pending: !1,
|
|
1503
1503
|
valid: !0,
|
|
1504
|
-
validated: !!(!((
|
|
1504
|
+
validated: !!(!((C = O[W]) === null || C === void 0) && C.length),
|
|
1505
1505
|
required: Y,
|
|
1506
1506
|
initialValue: q,
|
|
1507
1507
|
errors: Fc([]),
|
|
1508
|
-
bails: ($ =
|
|
1509
|
-
label:
|
|
1510
|
-
type: (
|
|
1508
|
+
bails: ($ = k == null ? void 0 : k.bails) !== null && $ !== void 0 ? $ : !1,
|
|
1509
|
+
label: k == null ? void 0 : k.label,
|
|
1510
|
+
type: (k == null ? void 0 : k.type) || "default",
|
|
1511
1511
|
value: B,
|
|
1512
1512
|
multiple: !1,
|
|
1513
1513
|
__flags: {
|
|
@@ -1515,12 +1515,12 @@ function $h(t) {
|
|
|
1515
1515
|
pendingReset: !1
|
|
1516
1516
|
},
|
|
1517
1517
|
fieldsCount: 1,
|
|
1518
|
-
validate:
|
|
1519
|
-
dirty: Q(() => !
|
|
1518
|
+
validate: k == null ? void 0 : k.validate,
|
|
1519
|
+
dirty: Q(() => !Ue(_(B), _(q)))
|
|
1520
1520
|
});
|
|
1521
|
-
return c.value.push(ge), d.value[W] = ge, f(), m.value[W] && !
|
|
1521
|
+
return c.value.push(ge), d.value[W] = ge, f(), m.value[W] && !O[W] && at(() => {
|
|
1522
1522
|
yt(W, { mode: "silent" });
|
|
1523
|
-
}), qi(
|
|
1523
|
+
}), qi(S) && xt(S, (He) => {
|
|
1524
1524
|
f();
|
|
1525
1525
|
const lt = de(B.value);
|
|
1526
1526
|
d.value[He] = ge, at(() => {
|
|
@@ -1528,48 +1528,48 @@ function $h(t) {
|
|
|
1528
1528
|
});
|
|
1529
1529
|
}), ge;
|
|
1530
1530
|
}
|
|
1531
|
-
const J = ql(Vt, 5), te = ql(Vt, 5), ie = vs(async (
|
|
1532
|
-
const
|
|
1533
|
-
.../* @__PURE__ */ new Set([...
|
|
1534
|
-
].sort().reduce((
|
|
1531
|
+
const J = ql(Vt, 5), te = ql(Vt, 5), ie = vs(async (S) => await (S === "silent" ? J() : te()), (S, [k]) => {
|
|
1532
|
+
const C = Qe(I.errorBag.value), q = [
|
|
1533
|
+
.../* @__PURE__ */ new Set([...Qe(S.results), ...c.value.map((w) => w.path), ...C])
|
|
1534
|
+
].sort().reduce((w, A) => {
|
|
1535
1535
|
var B;
|
|
1536
|
-
const W =
|
|
1537
|
-
return
|
|
1538
|
-
}, { valid:
|
|
1539
|
-
return
|
|
1540
|
-
var
|
|
1541
|
-
const B =
|
|
1542
|
-
B &&
|
|
1536
|
+
const W = A, U = F(W) || re(W), Y = ((B = S.results[W]) === null || B === void 0 ? void 0 : B.errors) || [], ue = se(U == null ? void 0 : U.path) || W, ge = Lh({ errors: Y, valid: !Y.length }, w.results[ue]);
|
|
1537
|
+
return w.results[ue] = ge, ge.valid || (w.errors[ue] = ge.errors[0]), U && u.value[ue] && delete u.value[ue], U ? (U.valid = ge.valid, k === "silent" || k === "validated-only" && !U.validated || h(U, ge.errors), w) : (h(ue, Y), w);
|
|
1538
|
+
}, { valid: S.valid, results: {}, errors: {} });
|
|
1539
|
+
return S.values && (q.values = S.values), Qe(q.results).forEach((w) => {
|
|
1540
|
+
var A;
|
|
1541
|
+
const B = F(w);
|
|
1542
|
+
B && k !== "silent" && (k === "validated-only" && !B.validated || h(B, (A = q.results[w]) === null || A === void 0 ? void 0 : A.errors));
|
|
1543
1543
|
}), q;
|
|
1544
1544
|
});
|
|
1545
|
-
function ne(
|
|
1546
|
-
c.value.forEach(
|
|
1545
|
+
function ne(S) {
|
|
1546
|
+
c.value.forEach(S);
|
|
1547
1547
|
}
|
|
1548
|
-
function
|
|
1549
|
-
const
|
|
1550
|
-
return typeof
|
|
1548
|
+
function F(S) {
|
|
1549
|
+
const k = typeof S == "string" ? qr(S) : S;
|
|
1550
|
+
return typeof k == "string" ? d.value[k] : k;
|
|
1551
1551
|
}
|
|
1552
|
-
function re(
|
|
1553
|
-
return c.value.filter((
|
|
1552
|
+
function re(S) {
|
|
1553
|
+
return c.value.filter((C) => S.startsWith(C.path)).reduce((C, $) => C ? $.path.length > C.path.length ? $ : C : $, void 0);
|
|
1554
1554
|
}
|
|
1555
1555
|
let ae = [], Se;
|
|
1556
|
-
function _e(
|
|
1557
|
-
return ae.push(
|
|
1558
|
-
[...ae].sort().reverse().forEach((
|
|
1559
|
-
Hl(a,
|
|
1556
|
+
function _e(S) {
|
|
1557
|
+
return ae.push(S), Se || (Se = at(() => {
|
|
1558
|
+
[...ae].sort().reverse().forEach((C) => {
|
|
1559
|
+
Hl(a, C);
|
|
1560
1560
|
}), ae = [], Se = null;
|
|
1561
1561
|
})), Se;
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1564
|
-
return function(
|
|
1565
|
-
return function(
|
|
1566
|
-
return
|
|
1563
|
+
function Ze(S) {
|
|
1564
|
+
return function(C, $) {
|
|
1565
|
+
return function(w) {
|
|
1566
|
+
return w instanceof Event && (w.preventDefault(), w.stopPropagation()), ne((A) => A.touched = !0), i.value = !0, s.value++, Mt().then((A) => {
|
|
1567
1567
|
const B = de(a);
|
|
1568
|
-
if (
|
|
1569
|
-
const W = de(
|
|
1570
|
-
let U =
|
|
1571
|
-
return
|
|
1572
|
-
evt:
|
|
1568
|
+
if (A.valid && typeof C == "function") {
|
|
1569
|
+
const W = de(N.value);
|
|
1570
|
+
let U = S ? W : B;
|
|
1571
|
+
return A.values && (U = A.values), C(U, {
|
|
1572
|
+
evt: w,
|
|
1573
1573
|
controlledValues: W,
|
|
1574
1574
|
setErrors: p,
|
|
1575
1575
|
setFieldError: h,
|
|
@@ -1581,53 +1581,53 @@ function $h(t) {
|
|
|
1581
1581
|
resetField: dn
|
|
1582
1582
|
});
|
|
1583
1583
|
}
|
|
1584
|
-
!
|
|
1584
|
+
!A.valid && typeof $ == "function" && $({
|
|
1585
1585
|
values: B,
|
|
1586
|
-
evt:
|
|
1587
|
-
errors:
|
|
1588
|
-
results:
|
|
1586
|
+
evt: w,
|
|
1587
|
+
errors: A.errors,
|
|
1588
|
+
results: A.results
|
|
1589
1589
|
});
|
|
1590
|
-
}).then((
|
|
1591
|
-
throw i.value = !1,
|
|
1590
|
+
}).then((A) => (i.value = !1, A), (A) => {
|
|
1591
|
+
throw i.value = !1, A;
|
|
1592
1592
|
});
|
|
1593
1593
|
};
|
|
1594
1594
|
};
|
|
1595
1595
|
}
|
|
1596
|
-
const st =
|
|
1597
|
-
st.withControlled =
|
|
1598
|
-
function he(
|
|
1599
|
-
const
|
|
1600
|
-
if (!(
|
|
1596
|
+
const st = Ze(!1);
|
|
1597
|
+
st.withControlled = Ze(!0);
|
|
1598
|
+
function he(S, k) {
|
|
1599
|
+
const C = c.value.findIndex((q) => q.path === S && (Array.isArray(q.id) ? q.id.includes(k) : q.id === k)), $ = c.value[C];
|
|
1600
|
+
if (!(C === -1 || !$)) {
|
|
1601
1601
|
if (at(() => {
|
|
1602
|
-
yt(
|
|
1602
|
+
yt(S, { mode: "silent", warn: !1 });
|
|
1603
1603
|
}), $.multiple && $.fieldsCount && $.fieldsCount--, Array.isArray($.id)) {
|
|
1604
|
-
const q = $.id.indexOf(
|
|
1605
|
-
q >= 0 && $.id.splice(q, 1), delete $.__flags.pendingUnmount[
|
|
1604
|
+
const q = $.id.indexOf(k);
|
|
1605
|
+
q >= 0 && $.id.splice(q, 1), delete $.__flags.pendingUnmount[k];
|
|
1606
1606
|
}
|
|
1607
|
-
(!$.multiple || $.fieldsCount <= 0) && (c.value.splice(
|
|
1607
|
+
(!$.multiple || $.fieldsCount <= 0) && (c.value.splice(C, 1), vt(S), f(), delete d.value[S]);
|
|
1608
1608
|
}
|
|
1609
1609
|
}
|
|
1610
|
-
function je(
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
}), c.value = c.value.filter((
|
|
1610
|
+
function je(S) {
|
|
1611
|
+
Qe(d.value).forEach((k) => {
|
|
1612
|
+
k.startsWith(S) && delete d.value[k];
|
|
1613
|
+
}), c.value = c.value.filter((k) => !k.path.startsWith(S)), at(() => {
|
|
1614
1614
|
f();
|
|
1615
1615
|
});
|
|
1616
1616
|
}
|
|
1617
1617
|
const I = {
|
|
1618
1618
|
formId: n,
|
|
1619
1619
|
values: a,
|
|
1620
|
-
controlledValues:
|
|
1620
|
+
controlledValues: N,
|
|
1621
1621
|
errorBag: g,
|
|
1622
1622
|
errors: m,
|
|
1623
|
-
schema:
|
|
1623
|
+
schema: L,
|
|
1624
1624
|
submitCount: s,
|
|
1625
|
-
meta:
|
|
1625
|
+
meta: R,
|
|
1626
1626
|
isSubmitting: i,
|
|
1627
1627
|
isValidating: o,
|
|
1628
1628
|
fieldArrays: l,
|
|
1629
1629
|
keepValuesOnUnmount: y,
|
|
1630
|
-
validateSchema:
|
|
1630
|
+
validateSchema: _(L) ? ie : void 0,
|
|
1631
1631
|
validate: Mt,
|
|
1632
1632
|
setFieldError: h,
|
|
1633
1633
|
validateField: yt,
|
|
@@ -1647,146 +1647,146 @@ function $h(t) {
|
|
|
1647
1647
|
unsetInitialValue: vt,
|
|
1648
1648
|
setFieldInitialValue: Zt,
|
|
1649
1649
|
createPathState: Z,
|
|
1650
|
-
getPathState:
|
|
1650
|
+
getPathState: F,
|
|
1651
1651
|
unsetPathValue: _e,
|
|
1652
1652
|
removePathState: he,
|
|
1653
|
-
initialValues:
|
|
1653
|
+
initialValues: M,
|
|
1654
1654
|
getAllPathStates: () => c.value,
|
|
1655
1655
|
destroyPath: je,
|
|
1656
|
-
isFieldTouched:
|
|
1656
|
+
isFieldTouched: Xe,
|
|
1657
1657
|
isFieldDirty: $n,
|
|
1658
1658
|
isFieldValid: or
|
|
1659
1659
|
};
|
|
1660
|
-
function K(
|
|
1661
|
-
const $ = de(
|
|
1662
|
-
|
|
1663
|
-
}
|
|
1664
|
-
function ce(
|
|
1665
|
-
|
|
1666
|
-
delete a[
|
|
1667
|
-
}),
|
|
1668
|
-
K(
|
|
1669
|
-
}),
|
|
1670
|
-
}
|
|
1671
|
-
function oe(
|
|
1672
|
-
oi(a,
|
|
1673
|
-
}
|
|
1674
|
-
function Ce(
|
|
1675
|
-
const
|
|
1660
|
+
function K(S, k, C = !0) {
|
|
1661
|
+
const $ = de(k), q = typeof S == "string" ? S : S.path;
|
|
1662
|
+
F(q) || Z(q), Qt(a, q, $), C && yt(q);
|
|
1663
|
+
}
|
|
1664
|
+
function ce(S, k = !0) {
|
|
1665
|
+
Qe(a).forEach((C) => {
|
|
1666
|
+
delete a[C];
|
|
1667
|
+
}), Qe(S).forEach((C) => {
|
|
1668
|
+
K(C, S[C], !1);
|
|
1669
|
+
}), k && Mt();
|
|
1670
|
+
}
|
|
1671
|
+
function oe(S, k = !0) {
|
|
1672
|
+
oi(a, S), l.forEach((C) => C && C.reset()), k && Mt();
|
|
1673
|
+
}
|
|
1674
|
+
function Ce(S, k) {
|
|
1675
|
+
const C = F(se(S)) || Z(S);
|
|
1676
1676
|
return Q({
|
|
1677
1677
|
get() {
|
|
1678
|
-
return
|
|
1678
|
+
return C.value;
|
|
1679
1679
|
},
|
|
1680
1680
|
set($) {
|
|
1681
1681
|
var q;
|
|
1682
|
-
const
|
|
1683
|
-
K(
|
|
1682
|
+
const w = se(S);
|
|
1683
|
+
K(w, $, (q = se(k)) !== null && q !== void 0 ? q : !1);
|
|
1684
1684
|
}
|
|
1685
1685
|
});
|
|
1686
1686
|
}
|
|
1687
|
-
function Me(
|
|
1688
|
-
const
|
|
1689
|
-
|
|
1687
|
+
function Me(S, k) {
|
|
1688
|
+
const C = F(S);
|
|
1689
|
+
C && (C.touched = k);
|
|
1690
1690
|
}
|
|
1691
|
-
function
|
|
1692
|
-
const
|
|
1693
|
-
return
|
|
1691
|
+
function Xe(S) {
|
|
1692
|
+
const k = F(S);
|
|
1693
|
+
return k ? k.touched : c.value.filter((C) => C.path.startsWith(S)).some((C) => C.touched);
|
|
1694
1694
|
}
|
|
1695
|
-
function $n(
|
|
1696
|
-
const
|
|
1697
|
-
return
|
|
1695
|
+
function $n(S) {
|
|
1696
|
+
const k = F(S);
|
|
1697
|
+
return k ? k.dirty : c.value.filter((C) => C.path.startsWith(S)).some((C) => C.dirty);
|
|
1698
1698
|
}
|
|
1699
|
-
function or(
|
|
1700
|
-
const
|
|
1701
|
-
return
|
|
1699
|
+
function or(S) {
|
|
1700
|
+
const k = F(S);
|
|
1701
|
+
return k ? k.valid : c.value.filter((C) => C.path.startsWith(S)).every((C) => C.valid);
|
|
1702
1702
|
}
|
|
1703
|
-
function un(
|
|
1704
|
-
if (typeof
|
|
1705
|
-
ne((
|
|
1706
|
-
|
|
1703
|
+
function un(S) {
|
|
1704
|
+
if (typeof S == "boolean") {
|
|
1705
|
+
ne((k) => {
|
|
1706
|
+
k.touched = S;
|
|
1707
1707
|
});
|
|
1708
1708
|
return;
|
|
1709
1709
|
}
|
|
1710
|
-
|
|
1711
|
-
Me(
|
|
1710
|
+
Qe(S).forEach((k) => {
|
|
1711
|
+
Me(k, !!S[k]);
|
|
1712
1712
|
});
|
|
1713
1713
|
}
|
|
1714
|
-
function dn(
|
|
1715
|
-
var
|
|
1716
|
-
const $ =
|
|
1717
|
-
q && (q.__flags.pendingReset = !0), Zt(
|
|
1714
|
+
function dn(S, k) {
|
|
1715
|
+
var C;
|
|
1716
|
+
const $ = k && "value" in k ? k.value : tt(M.value, S), q = F(S);
|
|
1717
|
+
q && (q.__flags.pendingReset = !0), Zt(S, de($), !0), K(S, $, !1), Me(S, (C = k == null ? void 0 : k.touched) !== null && C !== void 0 ? C : !1), h(S, (k == null ? void 0 : k.errors) || []), at(() => {
|
|
1718
1718
|
q && (q.__flags.pendingReset = !1);
|
|
1719
1719
|
});
|
|
1720
1720
|
}
|
|
1721
|
-
function Yt(
|
|
1722
|
-
let
|
|
1723
|
-
|
|
1721
|
+
function Yt(S, k) {
|
|
1722
|
+
let C = de(S != null && S.values ? S.values : b.value);
|
|
1723
|
+
C = k != null && k.force ? C : oi(b.value, C), C = At(L) && Ae(L.cast) ? L.cast(C) : C, E(C), ne(($) => {
|
|
1724
1724
|
var q;
|
|
1725
|
-
$.__flags.pendingReset = !0, $.validated = !1, $.touched = ((q =
|
|
1726
|
-
}),
|
|
1725
|
+
$.__flags.pendingReset = !0, $.validated = !1, $.touched = ((q = S == null ? void 0 : S.touched) === null || q === void 0 ? void 0 : q[$.path]) || !1, K($.path, tt(C, $.path), !1), h($.path, void 0);
|
|
1726
|
+
}), k != null && k.force ? ce(C, !1) : oe(C, !1), p((S == null ? void 0 : S.errors) || {}), s.value = (S == null ? void 0 : S.submitCount) || 0, at(() => {
|
|
1727
1727
|
Mt({ mode: "silent" }), ne(($) => {
|
|
1728
1728
|
$.__flags.pendingReset = !1;
|
|
1729
1729
|
});
|
|
1730
1730
|
});
|
|
1731
1731
|
}
|
|
1732
|
-
async function Mt(
|
|
1733
|
-
const
|
|
1734
|
-
if (
|
|
1735
|
-
return I.validateSchema(
|
|
1732
|
+
async function Mt(S) {
|
|
1733
|
+
const k = (S == null ? void 0 : S.mode) || "force";
|
|
1734
|
+
if (k === "force" && ne((w) => w.validated = !0), I.validateSchema)
|
|
1735
|
+
return I.validateSchema(k);
|
|
1736
1736
|
o.value = !0;
|
|
1737
|
-
const
|
|
1738
|
-
key:
|
|
1739
|
-
valid:
|
|
1740
|
-
errors:
|
|
1737
|
+
const C = await Promise.all(c.value.map((w) => w.validate ? w.validate(S).then((A) => ({
|
|
1738
|
+
key: w.path,
|
|
1739
|
+
valid: A.valid,
|
|
1740
|
+
errors: A.errors
|
|
1741
1741
|
})) : Promise.resolve({
|
|
1742
|
-
key:
|
|
1742
|
+
key: w.path,
|
|
1743
1743
|
valid: !0,
|
|
1744
1744
|
errors: []
|
|
1745
1745
|
})));
|
|
1746
1746
|
o.value = !1;
|
|
1747
1747
|
const $ = {}, q = {};
|
|
1748
|
-
for (const
|
|
1749
|
-
$[
|
|
1750
|
-
valid:
|
|
1751
|
-
errors:
|
|
1752
|
-
},
|
|
1748
|
+
for (const w of C)
|
|
1749
|
+
$[w.key] = {
|
|
1750
|
+
valid: w.valid,
|
|
1751
|
+
errors: w.errors
|
|
1752
|
+
}, w.errors.length && (q[w.key] = w.errors[0]);
|
|
1753
1753
|
return {
|
|
1754
|
-
valid:
|
|
1754
|
+
valid: C.every((w) => w.valid),
|
|
1755
1755
|
results: $,
|
|
1756
1756
|
errors: q
|
|
1757
1757
|
};
|
|
1758
1758
|
}
|
|
1759
|
-
async function yt(
|
|
1760
|
-
var
|
|
1761
|
-
const $ =
|
|
1762
|
-
if ($ && (
|
|
1763
|
-
const { results:
|
|
1764
|
-
return
|
|
1759
|
+
async function yt(S, k) {
|
|
1760
|
+
var C;
|
|
1761
|
+
const $ = F(S);
|
|
1762
|
+
if ($ && (k == null ? void 0 : k.mode) !== "silent" && ($.validated = !0), L) {
|
|
1763
|
+
const { results: w } = await ie((k == null ? void 0 : k.mode) || "validated-only");
|
|
1764
|
+
return w[S] || { errors: [], valid: !0 };
|
|
1765
1765
|
}
|
|
1766
|
-
return $ != null && $.validate ? $.validate(
|
|
1766
|
+
return $ != null && $.validate ? $.validate(k) : (!$ && ((C = k == null ? void 0 : k.warn) !== null && C !== void 0 ? C : !0) && process.env.NODE_ENV !== "production" && Cf(`field with path ${S} was not found`), Promise.resolve({ errors: [], valid: !0 }));
|
|
1767
1767
|
}
|
|
1768
|
-
function vt(
|
|
1769
|
-
Hl(
|
|
1768
|
+
function vt(S) {
|
|
1769
|
+
Hl(M.value, S);
|
|
1770
1770
|
}
|
|
1771
|
-
function $t(
|
|
1772
|
-
Zt(
|
|
1771
|
+
function $t(S, k, C = !1) {
|
|
1772
|
+
Zt(S, k), Qt(a, S, k), C && !(t != null && t.initialValues) && Qt(b.value, S, de(k));
|
|
1773
1773
|
}
|
|
1774
|
-
function Zt(
|
|
1775
|
-
Qt(
|
|
1774
|
+
function Zt(S, k, C = !1) {
|
|
1775
|
+
Qt(M.value, S, de(k)), C && Qt(b.value, S, de(k));
|
|
1776
1776
|
}
|
|
1777
1777
|
async function Vt() {
|
|
1778
|
-
const
|
|
1779
|
-
if (!
|
|
1778
|
+
const S = _(L);
|
|
1779
|
+
if (!S)
|
|
1780
1780
|
return { valid: !0, results: {}, errors: {} };
|
|
1781
1781
|
o.value = !0;
|
|
1782
|
-
const
|
|
1782
|
+
const k = Ki(S) || At(S) ? await fh(S, a) : await hh(S, a, {
|
|
1783
1783
|
names: v.value,
|
|
1784
|
-
bailsMap:
|
|
1784
|
+
bailsMap: x.value
|
|
1785
1785
|
});
|
|
1786
|
-
return o.value = !1,
|
|
1786
|
+
return o.value = !1, k;
|
|
1787
1787
|
}
|
|
1788
|
-
const Vn = st((
|
|
1789
|
-
Jc(
|
|
1788
|
+
const Vn = st((S, { evt: k }) => {
|
|
1789
|
+
Jc(k) && k.target.submit();
|
|
1790
1790
|
});
|
|
1791
1791
|
rr(() => {
|
|
1792
1792
|
if (t != null && t.initialErrors && p(t.initialErrors), t != null && t.initialTouched && un(t.initialTouched), t != null && t.validateOnMount) {
|
|
@@ -1794,19 +1794,19 @@ function $h(t) {
|
|
|
1794
1794
|
return;
|
|
1795
1795
|
}
|
|
1796
1796
|
I.validateSchema && I.validateSchema("silent");
|
|
1797
|
-
}), qi(
|
|
1798
|
-
var
|
|
1799
|
-
(
|
|
1800
|
-
}), Xs(wi, I), process.env.NODE_ENV !== "production" && (bh(I), xt(() => Object.assign(Object.assign({ errors: g.value },
|
|
1797
|
+
}), qi(L) && xt(L, () => {
|
|
1798
|
+
var S;
|
|
1799
|
+
(S = I.validateSchema) === null || S === void 0 || S.call(I, "validated-only");
|
|
1800
|
+
}), Xs(wi, I), process.env.NODE_ENV !== "production" && (bh(I), xt(() => Object.assign(Object.assign({ errors: g.value }, R.value), { values: a, isSubmitting: i.value, isValidating: o.value, submitCount: s.value }), Cr, {
|
|
1801
1801
|
deep: !0
|
|
1802
1802
|
}));
|
|
1803
|
-
function fn(
|
|
1804
|
-
const
|
|
1805
|
-
function
|
|
1803
|
+
function fn(S, k) {
|
|
1804
|
+
const C = Ae(k) || k == null ? void 0 : k.label, $ = F(se(S)) || Z(S, { label: C }), q = () => Ae(k) ? k(Ai($, Di)) : k || {};
|
|
1805
|
+
function w() {
|
|
1806
1806
|
var Y;
|
|
1807
1807
|
$.touched = !0, ((Y = q().validateOnBlur) !== null && Y !== void 0 ? Y : jn().validateOnBlur) && yt($.path);
|
|
1808
1808
|
}
|
|
1809
|
-
function
|
|
1809
|
+
function A() {
|
|
1810
1810
|
var Y;
|
|
1811
1811
|
((Y = q().validateOnInput) !== null && Y !== void 0 ? Y : jn().validateOnInput) && at(() => {
|
|
1812
1812
|
yt($.path);
|
|
@@ -1821,47 +1821,47 @@ function $h(t) {
|
|
|
1821
1821
|
const W = Q(() => {
|
|
1822
1822
|
const Y = {
|
|
1823
1823
|
onChange: B,
|
|
1824
|
-
onInput:
|
|
1825
|
-
onBlur:
|
|
1824
|
+
onInput: A,
|
|
1825
|
+
onBlur: w
|
|
1826
1826
|
};
|
|
1827
|
-
return Ae(
|
|
1827
|
+
return Ae(k) ? Object.assign(Object.assign({}, Y), k(Ai($, Di)).props || {}) : k != null && k.props ? Object.assign(Object.assign({}, Y), k.props(Ai($, Di))) : Y;
|
|
1828
1828
|
});
|
|
1829
|
-
return [Ce(
|
|
1829
|
+
return [Ce(S, () => {
|
|
1830
1830
|
var Y, ue, ge;
|
|
1831
1831
|
return (ge = (Y = q().validateOnModelUpdate) !== null && Y !== void 0 ? Y : (ue = jn()) === null || ue === void 0 ? void 0 : ue.validateOnModelUpdate) !== null && ge !== void 0 ? ge : !0;
|
|
1832
1832
|
}), W];
|
|
1833
1833
|
}
|
|
1834
|
-
function sr(
|
|
1835
|
-
return Array.isArray(
|
|
1834
|
+
function sr(S) {
|
|
1835
|
+
return Array.isArray(S) ? S.map((k) => Ce(k, !0)) : Ce(S);
|
|
1836
1836
|
}
|
|
1837
|
-
function lr(
|
|
1838
|
-
const [
|
|
1837
|
+
function lr(S, k) {
|
|
1838
|
+
const [C, $] = fn(S, k);
|
|
1839
1839
|
function q() {
|
|
1840
1840
|
$.value.onBlur();
|
|
1841
1841
|
}
|
|
1842
|
-
function
|
|
1842
|
+
function w(B) {
|
|
1843
1843
|
const W = Ji(B);
|
|
1844
|
-
K(se(
|
|
1844
|
+
K(se(S), W, !1), $.value.onInput();
|
|
1845
1845
|
}
|
|
1846
|
-
function
|
|
1846
|
+
function A(B) {
|
|
1847
1847
|
const W = Ji(B);
|
|
1848
|
-
K(se(
|
|
1848
|
+
K(se(S), W, !1), $.value.onChange();
|
|
1849
1849
|
}
|
|
1850
1850
|
return Q(() => Object.assign(Object.assign({}, $.value), {
|
|
1851
1851
|
onBlur: q,
|
|
1852
|
-
onInput:
|
|
1853
|
-
onChange:
|
|
1854
|
-
value:
|
|
1852
|
+
onInput: w,
|
|
1853
|
+
onChange: A,
|
|
1854
|
+
value: C.value
|
|
1855
1855
|
}));
|
|
1856
1856
|
}
|
|
1857
|
-
function ar(
|
|
1858
|
-
const [
|
|
1859
|
-
function
|
|
1860
|
-
|
|
1857
|
+
function ar(S, k) {
|
|
1858
|
+
const [C, $] = fn(S, k), q = F(se(S));
|
|
1859
|
+
function w(A) {
|
|
1860
|
+
C.value = A;
|
|
1861
1861
|
}
|
|
1862
1862
|
return Q(() => {
|
|
1863
|
-
const
|
|
1864
|
-
return Object.assign({ [
|
|
1863
|
+
const A = Ae(k) ? k(Ai(q, Di)) : k || {};
|
|
1864
|
+
return Object.assign({ [A.model || "modelValue"]: C.value, [`onUpdate:${A.model || "modelValue"}`]: w }, $.value);
|
|
1865
1865
|
});
|
|
1866
1866
|
}
|
|
1867
1867
|
return Object.assign(Object.assign({}, I), { values: Mf(a), handleReset: () => Yt(), submitForm: Vn });
|
|
@@ -1871,10 +1871,10 @@ function Vh(t, e, n, r) {
|
|
|
1871
1871
|
touched: "some",
|
|
1872
1872
|
pending: "some",
|
|
1873
1873
|
valid: "every"
|
|
1874
|
-
}, o = Q(() => !
|
|
1874
|
+
}, o = Q(() => !Ue(e, _(n)));
|
|
1875
1875
|
function s() {
|
|
1876
1876
|
const a = t.value;
|
|
1877
|
-
return
|
|
1877
|
+
return Qe(i).reduce((c, u) => {
|
|
1878
1878
|
const d = i[u];
|
|
1879
1879
|
return c[u] = a[d]((f) => f[u]), c;
|
|
1880
1880
|
}, {});
|
|
@@ -1883,7 +1883,7 @@ function Vh(t, e, n, r) {
|
|
|
1883
1883
|
return Lc(() => {
|
|
1884
1884
|
const a = s();
|
|
1885
1885
|
l.touched = a.touched, l.valid = a.valid, l.pending = a.pending;
|
|
1886
|
-
}), Q(() => Object.assign(Object.assign({ initialValues:
|
|
1886
|
+
}), Q(() => Object.assign(Object.assign({ initialValues: _(n) }, l), { valid: l.valid && !Qe(r.value).length, dirty: o.value }));
|
|
1887
1887
|
}
|
|
1888
1888
|
function Bh(t, e, n) {
|
|
1889
1889
|
const r = iu(n), i = me(r), o = me(de(r));
|
|
@@ -1891,7 +1891,7 @@ function Bh(t, e, n) {
|
|
|
1891
1891
|
i.value = oi(de(i.value) || {}, de(l)), o.value = oi(de(o.value) || {}, de(l)), a && t.value.forEach((c) => {
|
|
1892
1892
|
if (c.touched)
|
|
1893
1893
|
return;
|
|
1894
|
-
const d =
|
|
1894
|
+
const d = tt(i.value, c.path);
|
|
1895
1895
|
Qt(e, c.path, de(d));
|
|
1896
1896
|
});
|
|
1897
1897
|
}
|
|
@@ -1949,21 +1949,21 @@ const zh = /* @__PURE__ */ An({
|
|
|
1949
1949
|
}
|
|
1950
1950
|
},
|
|
1951
1951
|
setup(t, e) {
|
|
1952
|
-
const n = zn(t, "validationSchema"), r = zn(t, "keepValues"), { errors: i, errorBag: o, values: s, meta: l, isSubmitting: a, isValidating: c, submitCount: u, controlledValues: d, validate: f, validateField: h, handleReset: p, resetForm: g, handleSubmit: m, setErrors: v, setFieldError:
|
|
1952
|
+
const n = zn(t, "validationSchema"), r = zn(t, "keepValues"), { errors: i, errorBag: o, values: s, meta: l, isSubmitting: a, isValidating: c, submitCount: u, controlledValues: d, validate: f, validateField: h, handleReset: p, resetForm: g, handleSubmit: m, setErrors: v, setFieldError: x, setFieldValue: O, setValues: y, setFieldTouched: M, setTouched: b, resetField: E } = $h({
|
|
1953
1953
|
validationSchema: n.value ? n : void 0,
|
|
1954
1954
|
initialValues: t.initialValues,
|
|
1955
1955
|
initialErrors: t.initialErrors,
|
|
1956
1956
|
initialTouched: t.initialTouched,
|
|
1957
1957
|
validateOnMount: t.validateOnMount,
|
|
1958
1958
|
keepValuesOnUnmount: r
|
|
1959
|
-
}),
|
|
1959
|
+
}), R = m((F, { evt: re }) => {
|
|
1960
1960
|
Jc(re) && re.target.submit();
|
|
1961
|
-
}, t.onInvalidSubmit),
|
|
1962
|
-
function
|
|
1963
|
-
el(
|
|
1961
|
+
}, t.onInvalidSubmit), N = t.onSubmit ? m(t.onSubmit, t.onInvalidSubmit) : R;
|
|
1962
|
+
function L(F) {
|
|
1963
|
+
el(F) && F.preventDefault(), p(), typeof e.attrs.onReset == "function" && e.attrs.onReset();
|
|
1964
1964
|
}
|
|
1965
|
-
function Z(
|
|
1966
|
-
return m(typeof
|
|
1965
|
+
function Z(F, re) {
|
|
1966
|
+
return m(typeof F == "function" && !re ? F : re, t.onInvalidSubmit)(F);
|
|
1967
1967
|
}
|
|
1968
1968
|
function J() {
|
|
1969
1969
|
return de(s);
|
|
@@ -1988,31 +1988,31 @@ const zh = /* @__PURE__ */ An({
|
|
|
1988
1988
|
validateField: h,
|
|
1989
1989
|
handleSubmit: Z,
|
|
1990
1990
|
handleReset: p,
|
|
1991
|
-
submitForm:
|
|
1991
|
+
submitForm: R,
|
|
1992
1992
|
setErrors: v,
|
|
1993
|
-
setFieldError:
|
|
1994
|
-
setFieldValue:
|
|
1993
|
+
setFieldError: x,
|
|
1994
|
+
setFieldValue: O,
|
|
1995
1995
|
setValues: y,
|
|
1996
|
-
setFieldTouched:
|
|
1997
|
-
setTouched:
|
|
1996
|
+
setFieldTouched: M,
|
|
1997
|
+
setTouched: b,
|
|
1998
1998
|
resetForm: g,
|
|
1999
|
-
resetField:
|
|
1999
|
+
resetField: E,
|
|
2000
2000
|
getValues: J,
|
|
2001
2001
|
getMeta: te,
|
|
2002
2002
|
getErrors: ie
|
|
2003
2003
|
};
|
|
2004
2004
|
}
|
|
2005
2005
|
return e.expose({
|
|
2006
|
-
setFieldError:
|
|
2006
|
+
setFieldError: x,
|
|
2007
2007
|
setErrors: v,
|
|
2008
|
-
setFieldValue:
|
|
2008
|
+
setFieldValue: O,
|
|
2009
2009
|
setValues: y,
|
|
2010
|
-
setFieldTouched:
|
|
2011
|
-
setTouched:
|
|
2010
|
+
setFieldTouched: M,
|
|
2011
|
+
setTouched: b,
|
|
2012
2012
|
resetForm: g,
|
|
2013
2013
|
validate: f,
|
|
2014
2014
|
validateField: h,
|
|
2015
|
-
resetField:
|
|
2015
|
+
resetField: E,
|
|
2016
2016
|
getValues: J,
|
|
2017
2017
|
getMeta: te,
|
|
2018
2018
|
getErrors: ie,
|
|
@@ -2024,7 +2024,7 @@ const zh = /* @__PURE__ */ An({
|
|
|
2024
2024
|
return re ? ht(re, Object.assign(Object.assign(Object.assign({}, re === "form" ? {
|
|
2025
2025
|
// Disables native validation as vee-validate will handle it.
|
|
2026
2026
|
novalidate: !0
|
|
2027
|
-
} : {}), e.attrs), { onSubmit:
|
|
2027
|
+
} : {}), e.attrs), { onSubmit: N, onReset: L }), ae) : ae;
|
|
2028
2028
|
};
|
|
2029
2029
|
}
|
|
2030
2030
|
}), Fh = zh, _h = /* @__PURE__ */ An({
|
|
@@ -2084,7 +2084,7 @@ const ke = (t, e) => {
|
|
|
2084
2084
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2085
2085
|
viewBox: "0 0 512 512",
|
|
2086
2086
|
fill: "currentColor"
|
|
2087
|
-
}, Uh = /* @__PURE__ */
|
|
2087
|
+
}, Uh = /* @__PURE__ */ j("path", { d: "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200z" }, null, -1), Kh = [
|
|
2088
2088
|
Uh
|
|
2089
2089
|
];
|
|
2090
2090
|
function Jh(t, e) {
|
|
@@ -2094,7 +2094,7 @@ const Gh = /* @__PURE__ */ ke(Wh, [["render", Jh]]), Yh = {}, Zh = {
|
|
|
2094
2094
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2095
2095
|
viewBox: "0 0 512 512",
|
|
2096
2096
|
fill: "currentColor"
|
|
2097
|
-
}, Xh = /* @__PURE__ */
|
|
2097
|
+
}, Xh = /* @__PURE__ */ j("path", { d: "M460.116 373.846l-20.823-12.022c-5.541-3.199-7.54-10.159-4.663-15.874 30.137-59.886 28.343-131.652-5.386-189.946-33.641-58.394-94.896-95.833-161.827-99.676C261.028 55.961 256 50.751 256 44.352V20.309c0-6.904 5.808-12.337 12.703-11.982 83.556 4.306 160.163 50.864 202.11 123.677 42.063 72.696 44.079 162.316 6.031 236.832-3.14 6.148-10.75 8.461-16.728 5.01z" }, null, -1), Qh = [
|
|
2098
2098
|
Xh
|
|
2099
2099
|
];
|
|
2100
2100
|
function ep(t, e) {
|
|
@@ -2118,7 +2118,7 @@ const tp = /* @__PURE__ */ ke(Yh, [["render", ep]]), np = { class: "relative" },
|
|
|
2118
2118
|
]));
|
|
2119
2119
|
}
|
|
2120
2120
|
});
|
|
2121
|
-
let
|
|
2121
|
+
let We = {
|
|
2122
2122
|
theme: "pmi"
|
|
2123
2123
|
};
|
|
2124
2124
|
const ip = {
|
|
@@ -2177,11 +2177,11 @@ const ip = {
|
|
|
2177
2177
|
"active:outline active:outline-2 active:outline-offset-4": !t.disabled && !t.loading && t.outlining,
|
|
2178
2178
|
"cursor-not-allowed": t.disabled,
|
|
2179
2179
|
border: t.outline && !t.plain,
|
|
2180
|
-
[`${r[
|
|
2181
|
-
[`${i[
|
|
2182
|
-
[`${o[
|
|
2183
|
-
[`${s[
|
|
2184
|
-
[`${l[
|
|
2180
|
+
[`${r[_(We).theme]}`]: t.primary && !t.plain && !t.inverse,
|
|
2181
|
+
[`${i[_(We).theme]}`]: t.secondary,
|
|
2182
|
+
[`${o[_(We).theme]}`]: !t.primary && !t.secondary && !t.plain,
|
|
2183
|
+
[`${s[_(We).theme]}`]: t.primary && t.plain,
|
|
2184
|
+
[`${l[_(We).theme]}`]: !t.primary && t.plain,
|
|
2185
2185
|
"bg-zinc-50 border-violet-800 text-violet-800": t.primary && t.inverse,
|
|
2186
2186
|
"hover:bg-white": t.primary && t.inverse && !t.disabled && !t.loading,
|
|
2187
2187
|
"w-full": t.full,
|
|
@@ -2197,7 +2197,7 @@ const ip = {
|
|
|
2197
2197
|
t.loading ? (D(), V("div", ip, [
|
|
2198
2198
|
Te(yo, { class: "w-6 h-6" })
|
|
2199
2199
|
])) : ve("", !0),
|
|
2200
|
-
|
|
2200
|
+
j("span", {
|
|
2201
2201
|
class: le(["flex items-center select-none whitespace-nowrap", { "opacity-0": t.loading }])
|
|
2202
2202
|
}, [
|
|
2203
2203
|
we(a.$slots, "default", {}, () => [
|
|
@@ -2228,7 +2228,7 @@ const pp = /* @__PURE__ */ ke(dp, [["render", hp]]), mp = {
|
|
|
2228
2228
|
name: "WpicForm"
|
|
2229
2229
|
}, gp = /* @__PURE__ */ Object.assign(mp, {
|
|
2230
2230
|
setup(t) {
|
|
2231
|
-
return (e, n) => (D(), ct(
|
|
2231
|
+
return (e, n) => (D(), ct(_(Fh), null, {
|
|
2232
2232
|
default: wt(({ values: r, meta: i, errors: o }) => [
|
|
2233
2233
|
we(e.$slots, "default")
|
|
2234
2234
|
]),
|
|
@@ -2408,10 +2408,10 @@ const Cp = async (t, e, n) => {
|
|
|
2408
2408
|
name: m,
|
|
2409
2409
|
fn: v
|
|
2410
2410
|
} = l[g], {
|
|
2411
|
-
x
|
|
2412
|
-
y:
|
|
2411
|
+
x,
|
|
2412
|
+
y: O,
|
|
2413
2413
|
data: y,
|
|
2414
|
-
reset:
|
|
2414
|
+
reset: M
|
|
2415
2415
|
} = await v({
|
|
2416
2416
|
x: u,
|
|
2417
2417
|
y: d,
|
|
@@ -2426,17 +2426,17 @@ const Cp = async (t, e, n) => {
|
|
|
2426
2426
|
floating: e
|
|
2427
2427
|
}
|
|
2428
2428
|
});
|
|
2429
|
-
u =
|
|
2429
|
+
u = x ?? u, d = O ?? d, h = {
|
|
2430
2430
|
...h,
|
|
2431
2431
|
[m]: {
|
|
2432
2432
|
...h[m],
|
|
2433
2433
|
...y
|
|
2434
2434
|
}
|
|
2435
|
-
},
|
|
2435
|
+
}, M && p <= 50 && (p++, typeof M == "object" && (M.placement && (f = M.placement), M.rects && (c = M.rects === !0 ? await s.getElementRects({
|
|
2436
2436
|
reference: t,
|
|
2437
2437
|
floating: e,
|
|
2438
2438
|
strategy: i
|
|
2439
|
-
}) :
|
|
2439
|
+
}) : M.rects), {
|
|
2440
2440
|
x: u,
|
|
2441
2441
|
y: d
|
|
2442
2442
|
} = Zl(c, f, a)), g = -1);
|
|
@@ -2470,28 +2470,28 @@ async function au(t, e) {
|
|
|
2470
2470
|
boundary: c,
|
|
2471
2471
|
rootBoundary: u,
|
|
2472
2472
|
strategy: a
|
|
2473
|
-
})),
|
|
2473
|
+
})), x = d === "floating" ? {
|
|
2474
2474
|
x: r,
|
|
2475
2475
|
y: i,
|
|
2476
2476
|
width: s.floating.width,
|
|
2477
2477
|
height: s.floating.height
|
|
2478
|
-
} : s.reference,
|
|
2478
|
+
} : s.reference, O = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l.floating)), y = await (o.isElement == null ? void 0 : o.isElement(O)) ? await (o.getScale == null ? void 0 : o.getScale(O)) || {
|
|
2479
2479
|
x: 1,
|
|
2480
2480
|
y: 1
|
|
2481
2481
|
} : {
|
|
2482
2482
|
x: 1,
|
|
2483
2483
|
y: 1
|
|
2484
|
-
},
|
|
2484
|
+
}, M = Zi(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
2485
2485
|
elements: l,
|
|
2486
|
-
rect:
|
|
2487
|
-
offsetParent:
|
|
2486
|
+
rect: x,
|
|
2487
|
+
offsetParent: O,
|
|
2488
2488
|
strategy: a
|
|
2489
|
-
}) :
|
|
2489
|
+
}) : x);
|
|
2490
2490
|
return {
|
|
2491
|
-
top: (v.top -
|
|
2492
|
-
bottom: (
|
|
2493
|
-
left: (v.left -
|
|
2494
|
-
right: (
|
|
2491
|
+
top: (v.top - M.top + p.top) / y.y,
|
|
2492
|
+
bottom: (M.bottom - v.bottom + p.bottom) / y.y,
|
|
2493
|
+
left: (v.left - M.left + p.left) / y.x,
|
|
2494
|
+
right: (M.right - v.right + p.right) / y.x
|
|
2495
2495
|
};
|
|
2496
2496
|
}
|
|
2497
2497
|
const Mp = function(t) {
|
|
@@ -2518,36 +2518,36 @@ const Mp = function(t) {
|
|
|
2518
2518
|
} = vo(t, e);
|
|
2519
2519
|
if ((n = o.arrow) != null && n.alignmentOffset)
|
|
2520
2520
|
return {};
|
|
2521
|
-
const v = Xn(i),
|
|
2522
|
-
!f && p !== "none" && y.push(...kp(l, g, p,
|
|
2523
|
-
const
|
|
2524
|
-
let
|
|
2525
|
-
if (u &&
|
|
2526
|
-
const J = bp(i, s,
|
|
2527
|
-
|
|
2521
|
+
const v = Xn(i), x = Xn(l) === l, O = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), y = f || (x || !g ? [Yi(l)] : wp(l));
|
|
2522
|
+
!f && p !== "none" && y.push(...kp(l, g, p, O));
|
|
2523
|
+
const M = [l, ...y], b = await au(e, m), E = [];
|
|
2524
|
+
let R = ((r = o.flip) == null ? void 0 : r.overflows) || [];
|
|
2525
|
+
if (u && E.push(b[v]), d) {
|
|
2526
|
+
const J = bp(i, s, O);
|
|
2527
|
+
E.push(b[J[0]], b[J[1]]);
|
|
2528
2528
|
}
|
|
2529
|
-
if (
|
|
2529
|
+
if (R = [...R, {
|
|
2530
2530
|
placement: i,
|
|
2531
|
-
overflows:
|
|
2532
|
-
}], !
|
|
2533
|
-
var
|
|
2534
|
-
const J = (((
|
|
2531
|
+
overflows: E
|
|
2532
|
+
}], !E.every((J) => J <= 0)) {
|
|
2533
|
+
var N, L;
|
|
2534
|
+
const J = (((N = o.flip) == null ? void 0 : N.index) || 0) + 1, te = M[J];
|
|
2535
2535
|
if (te)
|
|
2536
2536
|
return {
|
|
2537
2537
|
data: {
|
|
2538
2538
|
index: J,
|
|
2539
|
-
overflows:
|
|
2539
|
+
overflows: R
|
|
2540
2540
|
},
|
|
2541
2541
|
reset: {
|
|
2542
2542
|
placement: te
|
|
2543
2543
|
}
|
|
2544
2544
|
};
|
|
2545
|
-
let ie = (
|
|
2545
|
+
let ie = (L = R.filter((ne) => ne.overflows[0] <= 0).sort((ne, F) => ne.overflows[1] - F.overflows[1])[0]) == null ? void 0 : L.placement;
|
|
2546
2546
|
if (!ie)
|
|
2547
2547
|
switch (h) {
|
|
2548
2548
|
case "bestFit": {
|
|
2549
2549
|
var Z;
|
|
2550
|
-
const ne = (Z =
|
|
2550
|
+
const ne = (Z = R.map((F) => [F.placement, F.overflows.filter((re) => re > 0).reduce((re, ae) => re + ae, 0)]).sort((F, re) => F[1] - re[1])[0]) == null ? void 0 : Z[0];
|
|
2551
2551
|
ne && (ie = ne);
|
|
2552
2552
|
break;
|
|
2553
2553
|
}
|
|
@@ -2632,11 +2632,11 @@ const Ep = function(t) {
|
|
|
2632
2632
|
fn: (m) => {
|
|
2633
2633
|
let {
|
|
2634
2634
|
x: v,
|
|
2635
|
-
y:
|
|
2635
|
+
y: x
|
|
2636
2636
|
} = m;
|
|
2637
2637
|
return {
|
|
2638
2638
|
x: v,
|
|
2639
|
-
y:
|
|
2639
|
+
y: x
|
|
2640
2640
|
};
|
|
2641
2641
|
}
|
|
2642
2642
|
},
|
|
@@ -2647,12 +2647,12 @@ const Ep = function(t) {
|
|
|
2647
2647
|
}, u = await au(e, a), d = wo(Xn(i)), f = ou(d);
|
|
2648
2648
|
let h = c[f], p = c[d];
|
|
2649
2649
|
if (o) {
|
|
2650
|
-
const m = f === "y" ? "top" : "left", v = f === "y" ? "bottom" : "right",
|
|
2651
|
-
h = Yl(
|
|
2650
|
+
const m = f === "y" ? "top" : "left", v = f === "y" ? "bottom" : "right", x = h + u[m], O = h - u[v];
|
|
2651
|
+
h = Yl(x, h, O);
|
|
2652
2652
|
}
|
|
2653
2653
|
if (s) {
|
|
2654
|
-
const m = d === "y" ? "top" : "left", v = d === "y" ? "bottom" : "right",
|
|
2655
|
-
p = Yl(
|
|
2654
|
+
const m = d === "y" ? "top" : "left", v = d === "y" ? "bottom" : "right", x = p + u[m], O = p - u[v];
|
|
2655
|
+
p = Yl(x, p, O);
|
|
2656
2656
|
}
|
|
2657
2657
|
const g = l.fn({
|
|
2658
2658
|
...e,
|
|
@@ -2807,8 +2807,8 @@ function si(t, e, n, r) {
|
|
|
2807
2807
|
const f = pt(o), h = r && Wt(r) ? pt(r) : r;
|
|
2808
2808
|
let p = f, g = p.frameElement;
|
|
2809
2809
|
for (; g && r && h !== p; ) {
|
|
2810
|
-
const m = wr(g), v = g.getBoundingClientRect(),
|
|
2811
|
-
a *= m.x, c *= m.y, u *= m.x, d *= m.y, a +=
|
|
2810
|
+
const m = wr(g), v = g.getBoundingClientRect(), x = Dt(g), O = v.left + (g.clientLeft + parseFloat(x.paddingLeft)) * m.x, y = v.top + (g.clientTop + parseFloat(x.paddingTop)) * m.y;
|
|
2811
|
+
a *= m.x, c *= m.y, u *= m.x, d *= m.y, a += O, c += y, p = pt(g), g = p.frameElement;
|
|
2812
2812
|
}
|
|
2813
2813
|
}
|
|
2814
2814
|
return Zi({
|
|
@@ -3062,7 +3062,7 @@ const Xp = {}, Qp = {
|
|
|
3062
3062
|
viewBox: "0 0 24 24",
|
|
3063
3063
|
"stroke-width": "2",
|
|
3064
3064
|
stroke: "currentColor"
|
|
3065
|
-
}, em = /* @__PURE__ */
|
|
3065
|
+
}, em = /* @__PURE__ */ j("path", {
|
|
3066
3066
|
"stroke-linecap": "round",
|
|
3067
3067
|
"stroke-linejoin": "round",
|
|
3068
3068
|
d: "M6 18L18 6M6 6l12 12"
|
|
@@ -3164,7 +3164,7 @@ const lm = { class: "bg-white rounded-t-lg w-full" }, am = { class: "flex justif
|
|
|
3164
3164
|
return e({ hide: u }), (p, g) => (D(), V(on, null, [
|
|
3165
3165
|
(D(), V("div", {
|
|
3166
3166
|
class: "w-full",
|
|
3167
|
-
key: `reference_${
|
|
3167
|
+
key: `reference_${_(n)}`,
|
|
3168
3168
|
ref_key: "reference",
|
|
3169
3169
|
ref: s,
|
|
3170
3170
|
onMouseenter: f,
|
|
@@ -3175,20 +3175,20 @@ const lm = { class: "bg-white rounded-t-lg w-full" }, am = { class: "flex justif
|
|
|
3175
3175
|
], 32)),
|
|
3176
3176
|
(D(), ct(_c, { to: "body" }, [
|
|
3177
3177
|
(D(), V("div", {
|
|
3178
|
-
key: `floating_${
|
|
3178
|
+
key: `floating_${_(n)}`,
|
|
3179
3179
|
ref_key: "floating",
|
|
3180
3180
|
ref: l,
|
|
3181
|
-
class: le(["z-10 bg-white rounded-md overflow-hidden", { hidden: a.value, [`${i[
|
|
3181
|
+
class: le(["z-10 bg-white rounded-md overflow-hidden", { hidden: a.value, [`${i[_(We).theme]}`]: !a.value, "bg-white px-3 py-2 rounded-md": !t.custom }])
|
|
3182
3182
|
}, [
|
|
3183
3183
|
we(p.$slots, "content")
|
|
3184
3184
|
], 2)),
|
|
3185
|
-
|
|
3185
|
+
j("div", {
|
|
3186
3186
|
onClick: g[1] || (g[1] = (m) => u()),
|
|
3187
|
-
class: le(["fixed z-20 flex items-end w-screen h-screen top-0 bg-black/20", { hidden: a.value, [`${o[
|
|
3187
|
+
class: le(["fixed z-20 flex items-end w-screen h-screen top-0 bg-black/20", { hidden: a.value, [`${o[_(We).theme]}`]: !0 }])
|
|
3188
3188
|
}, [
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3189
|
+
j("div", lm, [
|
|
3190
|
+
j("div", am, [
|
|
3191
|
+
j("span", null, Le(t.label), 1),
|
|
3192
3192
|
Te(al, {
|
|
3193
3193
|
onClick: u,
|
|
3194
3194
|
class: "w-4 h-4"
|
|
@@ -3204,7 +3204,7 @@ const lm = { class: "bg-white rounded-t-lg w-full" }, am = { class: "flex justif
|
|
|
3204
3204
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3205
3205
|
viewBox: "0 0 24 24",
|
|
3206
3206
|
fill: "currentColor"
|
|
3207
|
-
}, fm = /* @__PURE__ */
|
|
3207
|
+
}, fm = /* @__PURE__ */ j("path", { d: "M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" }, null, -1), hm = /* @__PURE__ */ j("path", {
|
|
3208
3208
|
"fill-rule": "evenodd",
|
|
3209
3209
|
d: "M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 0 1 0-1.113ZM17.25 12a5.25 5.25 0 1 1-10.5 0 5.25 5.25 0 0 1 10.5 0Z",
|
|
3210
3210
|
"clip-rule": "evenodd"
|
|
@@ -3219,7 +3219,7 @@ const gm = /* @__PURE__ */ ke(um, [["render", mm]]), ym = {}, vm = {
|
|
|
3219
3219
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3220
3220
|
viewBox: "0 0 24 24",
|
|
3221
3221
|
fill: "currentColor"
|
|
3222
|
-
}, bm = /* @__PURE__ */
|
|
3222
|
+
}, bm = /* @__PURE__ */ j("path", { d: "M3.53 2.47a.75.75 0 0 0-1.06 1.06l18 18a.75.75 0 1 0 1.06-1.06l-18-18ZM22.676 12.553a11.249 11.249 0 0 1-2.631 4.31l-3.099-3.099a5.25 5.25 0 0 0-6.71-6.71L7.759 4.577a11.217 11.217 0 0 1 4.242-.827c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113Z" }, null, -1), wm = /* @__PURE__ */ j("path", { d: "M15.75 12c0 .18-.013.357-.037.53l-4.244-4.243A3.75 3.75 0 0 1 15.75 12ZM12.53 15.713l-4.243-4.244a3.75 3.75 0 0 0 4.244 4.243Z" }, null, -1), xm = /* @__PURE__ */ j("path", { d: "M6.75 12c0-.619.107-1.213.304-1.764l-3.1-3.1a11.25 11.25 0 0 0-2.63 4.31c-.12.362-.12.752 0 1.114 1.489 4.467 5.704 7.69 10.675 7.69 1.5 0 2.933-.294 4.242-.827l-2.477-2.477A5.25 5.25 0 0 1 6.75 12Z" }, null, -1), km = [
|
|
3223
3223
|
bm,
|
|
3224
3224
|
wm,
|
|
3225
3225
|
xm
|
|
@@ -3233,7 +3233,7 @@ const Om = /* @__PURE__ */ ke(ym, [["render", Sm]]), Cm = {}, Mm = {
|
|
|
3233
3233
|
viewBox: "0 0 24 24",
|
|
3234
3234
|
"stroke-width": "2",
|
|
3235
3235
|
stroke: "currentColor"
|
|
3236
|
-
}, Tm = /* @__PURE__ */
|
|
3236
|
+
}, Tm = /* @__PURE__ */ j("path", {
|
|
3237
3237
|
"stroke-linecap": "round",
|
|
3238
3238
|
"stroke-linejoin": "round",
|
|
3239
3239
|
d: "M4.5 12.75l6 6 9-13.5"
|
|
@@ -3247,7 +3247,7 @@ const vu = /* @__PURE__ */ ke(Cm, [["render", Am]]), Nm = {}, Dm = {
|
|
|
3247
3247
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3248
3248
|
viewBox: "0 0 24 24",
|
|
3249
3249
|
fill: "currentColor"
|
|
3250
|
-
}, Im = /* @__PURE__ */
|
|
3250
|
+
}, Im = /* @__PURE__ */ j("path", {
|
|
3251
3251
|
"fill-rule": "evenodd",
|
|
3252
3252
|
d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 0 1 .67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 1 1-.671-1.34l.041-.022ZM12 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",
|
|
3253
3253
|
"clip-rule": "evenodd"
|
|
@@ -3327,39 +3327,39 @@ function Rg(t, e, n) {
|
|
|
3327
3327
|
if (typeof t != "function")
|
|
3328
3328
|
throw new TypeError(Dg);
|
|
3329
3329
|
e = la(e) || 0, Ng(n) && (u = !!n.leading, d = "maxWait" in n, o = d ? Ig(la(n.maxWait) || 0, e) : o, f = "trailing" in n ? !!n.trailing : f);
|
|
3330
|
-
function h(
|
|
3331
|
-
var
|
|
3332
|
-
return r = i = void 0, c =
|
|
3330
|
+
function h(b) {
|
|
3331
|
+
var E = r, R = i;
|
|
3332
|
+
return r = i = void 0, c = b, s = t.apply(R, E), s;
|
|
3333
3333
|
}
|
|
3334
|
-
function p(
|
|
3335
|
-
return c =
|
|
3334
|
+
function p(b) {
|
|
3335
|
+
return c = b, l = setTimeout(v, e), u ? h(b) : s;
|
|
3336
3336
|
}
|
|
3337
|
-
function g(
|
|
3338
|
-
var
|
|
3339
|
-
return d ? Pg(
|
|
3337
|
+
function g(b) {
|
|
3338
|
+
var E = b - a, R = b - c, N = e - E;
|
|
3339
|
+
return d ? Pg(N, o - R) : N;
|
|
3340
3340
|
}
|
|
3341
|
-
function m(
|
|
3342
|
-
var
|
|
3343
|
-
return a === void 0 ||
|
|
3341
|
+
function m(b) {
|
|
3342
|
+
var E = b - a, R = b - c;
|
|
3343
|
+
return a === void 0 || E >= e || E < 0 || d && R >= o;
|
|
3344
3344
|
}
|
|
3345
3345
|
function v() {
|
|
3346
|
-
var
|
|
3347
|
-
if (m(
|
|
3348
|
-
return
|
|
3349
|
-
l = setTimeout(v, g(
|
|
3346
|
+
var b = _o();
|
|
3347
|
+
if (m(b))
|
|
3348
|
+
return x(b);
|
|
3349
|
+
l = setTimeout(v, g(b));
|
|
3350
3350
|
}
|
|
3351
|
-
function
|
|
3352
|
-
return l = void 0, f && r ? h(
|
|
3351
|
+
function x(b) {
|
|
3352
|
+
return l = void 0, f && r ? h(b) : (r = i = void 0, s);
|
|
3353
3353
|
}
|
|
3354
|
-
function
|
|
3354
|
+
function O() {
|
|
3355
3355
|
l !== void 0 && clearTimeout(l), c = 0, r = a = i = l = void 0;
|
|
3356
3356
|
}
|
|
3357
3357
|
function y() {
|
|
3358
|
-
return l === void 0 ? s :
|
|
3358
|
+
return l === void 0 ? s : x(_o());
|
|
3359
3359
|
}
|
|
3360
|
-
function
|
|
3361
|
-
var
|
|
3362
|
-
if (r = arguments, i = this, a =
|
|
3360
|
+
function M() {
|
|
3361
|
+
var b = _o(), E = m(b);
|
|
3362
|
+
if (r = arguments, i = this, a = b, E) {
|
|
3363
3363
|
if (l === void 0)
|
|
3364
3364
|
return p(a);
|
|
3365
3365
|
if (d)
|
|
@@ -3367,7 +3367,7 @@ function Rg(t, e, n) {
|
|
|
3367
3367
|
}
|
|
3368
3368
|
return l === void 0 && (l = setTimeout(v, e)), s;
|
|
3369
3369
|
}
|
|
3370
|
-
return
|
|
3370
|
+
return M.cancel = O, M.flush = y, M;
|
|
3371
3371
|
}
|
|
3372
3372
|
var $g = Rg;
|
|
3373
3373
|
const Vg = /* @__PURE__ */ Vm($g), Bg = {
|
|
@@ -3486,72 +3486,75 @@ const Vg = /* @__PURE__ */ Vm($g), Bg = {
|
|
|
3486
3486
|
},
|
|
3487
3487
|
emits: ["onChange", "update:modelValue", "onClear"],
|
|
3488
3488
|
setup(t, { expose: e, emit: n }) {
|
|
3489
|
-
const r =
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
}
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
let
|
|
3504
|
-
return
|
|
3489
|
+
const r = {
|
|
3490
|
+
pmi: "shadow-inner border-zinc-400 focus-within:border-zinc-500 focus-within:outline focus-within:outline-2 focus-within:outline-offset-3 bg-zinc-100 dark:bg-zinc-700/25 dark:border-zinc-700/50 dark:text-zinc-300",
|
|
3491
|
+
"wpic-tools": "border-slate-300 bg-white focus-within:border-blue-400 outline-blue-200 focus-within:outline focus-within:outline-[3px]"
|
|
3492
|
+
}, i = t, o = Q(() => i.name ? i.name : yu()), s = Hh(o.value), l = Q(() => {
|
|
3493
|
+
if (i.label)
|
|
3494
|
+
return i.label;
|
|
3495
|
+
if (i.name && i.labelName)
|
|
3496
|
+
return `${i.name}#${i.labelName}`;
|
|
3497
|
+
}), a = me(!0), c = Q(() => (i.type == "password" || i.password) && a.value ? "password" : i.type);
|
|
3498
|
+
function u() {
|
|
3499
|
+
a.value = !a.value;
|
|
3500
|
+
}
|
|
3501
|
+
const d = Q(() => {
|
|
3502
|
+
if (i.rules && typeof i.rules == "string") {
|
|
3503
|
+
let b = i.rules.split("|");
|
|
3504
|
+
return i.required && b.push("required"), i.email && b.push("email"), b.join("|");
|
|
3505
|
+
} else if (!i.rules) {
|
|
3506
|
+
let b = [];
|
|
3507
|
+
return i.required && b.push("required"), i.email && b.push("email"), b.join("|");
|
|
3505
3508
|
}
|
|
3506
3509
|
return "required";
|
|
3507
3510
|
});
|
|
3508
|
-
function
|
|
3509
|
-
let
|
|
3510
|
-
|
|
3511
|
+
function f(b) {
|
|
3512
|
+
let E = b && b.target ? b.target.value : b;
|
|
3513
|
+
v(E);
|
|
3511
3514
|
}
|
|
3512
|
-
const
|
|
3513
|
-
function
|
|
3514
|
-
|
|
3515
|
+
const h = n;
|
|
3516
|
+
function p(b) {
|
|
3517
|
+
b === !0 || b === !1 ? h("update:modelValue", !b) : h("update:modelValue", b);
|
|
3515
3518
|
}
|
|
3516
|
-
function
|
|
3517
|
-
let
|
|
3518
|
-
|
|
3519
|
+
function g(b) {
|
|
3520
|
+
let E = b && b.target ? b.target.value : b;
|
|
3521
|
+
h("update:modelValue", E), h("onChange", E);
|
|
3519
3522
|
}
|
|
3520
|
-
function
|
|
3521
|
-
|
|
3523
|
+
function m() {
|
|
3524
|
+
h("update:modelValue", null), h("onChange", null), h("onClear");
|
|
3522
3525
|
}
|
|
3523
|
-
const
|
|
3524
|
-
|
|
3525
|
-
},
|
|
3526
|
+
const v = Vg(function(b) {
|
|
3527
|
+
h("update:modelValue", b), h("onChange", b);
|
|
3528
|
+
}, i.debounce), x = me(null), O = me(!1);
|
|
3526
3529
|
xt(
|
|
3527
|
-
() =>
|
|
3528
|
-
(
|
|
3529
|
-
|
|
3530
|
-
|
|
3530
|
+
() => i.modelValue,
|
|
3531
|
+
(b) => {
|
|
3532
|
+
i.tag == "textarea" && (x.value.$el.style.height = "auto", at(() => {
|
|
3533
|
+
i.minHeight && (x.value.$el.style.height = `${x.value.$el.scrollHeight < i.minHeight ? i.minHeight : x.value.$el.scrollHeight}px`), i.maxHeight && (x.value.$el.scrollHeight > i.maxHeight ? (x.value.$el.style.height = `${i.maxHeight}px`, O.value = !0) : O.value = !1);
|
|
3531
3534
|
}));
|
|
3532
3535
|
},
|
|
3533
3536
|
{ deep: !0 }
|
|
3534
3537
|
);
|
|
3535
|
-
function C() {
|
|
3536
|
-
var O;
|
|
3537
|
-
r.tag == "textarea" ? v.value.$el.focus() : (O = v.value) == null || O.$el.focus();
|
|
3538
|
-
}
|
|
3539
3538
|
function y() {
|
|
3540
|
-
|
|
3539
|
+
var b;
|
|
3540
|
+
i.tag == "textarea" ? x.value.$el.focus() : (b = x.value) == null || b.$el.focus();
|
|
3541
|
+
}
|
|
3542
|
+
function M() {
|
|
3543
|
+
return x.value.meta.valid;
|
|
3541
3544
|
}
|
|
3542
3545
|
return e({
|
|
3543
|
-
focus:
|
|
3544
|
-
isValid:
|
|
3545
|
-
}), (
|
|
3546
|
-
const
|
|
3546
|
+
focus: y,
|
|
3547
|
+
isValid: M
|
|
3548
|
+
}), (b, E) => {
|
|
3549
|
+
const R = Tf("wpic-choice-list");
|
|
3547
3550
|
return D(), V("div", {
|
|
3548
3551
|
class: le(["wpic-form-field", {
|
|
3549
3552
|
"mb-6": !t.slim
|
|
3550
3553
|
}])
|
|
3551
3554
|
}, [
|
|
3552
|
-
|
|
3553
|
-
rn(Le(
|
|
3554
|
-
|
|
3555
|
+
l.value && !t.checkbox && !t.radio ? (D(), V("div", Bg, [
|
|
3556
|
+
rn(Le(l.value) + " ", 1),
|
|
3557
|
+
j("div", Lg, [
|
|
3555
3558
|
t.info ? (D(), ct(cl, {
|
|
3556
3559
|
key: 0,
|
|
3557
3560
|
hover: ""
|
|
@@ -3566,22 +3569,22 @@ const Vg = /* @__PURE__ */ Vm($g), Bg = {
|
|
|
3566
3569
|
})) : ve("", !0)
|
|
3567
3570
|
])
|
|
3568
3571
|
])) : ve("", !0),
|
|
3569
|
-
t.checkbox ? (D(), ct(
|
|
3572
|
+
t.checkbox ? (D(), ct(_(Ni), {
|
|
3570
3573
|
key: 1,
|
|
3571
3574
|
ref_key: "myInput",
|
|
3572
|
-
ref:
|
|
3573
|
-
name:
|
|
3574
|
-
rules:
|
|
3575
|
+
ref: x,
|
|
3576
|
+
name: o.value,
|
|
3577
|
+
rules: d.value,
|
|
3575
3578
|
value: t.checkboxValue,
|
|
3576
3579
|
"unchecked-value": t.uncheckedValue,
|
|
3577
3580
|
modelValue: t.modelValue
|
|
3578
3581
|
}, {
|
|
3579
|
-
default: wt(({ field:
|
|
3580
|
-
|
|
3582
|
+
default: wt(({ field: N }) => [
|
|
3583
|
+
j("div", {
|
|
3581
3584
|
class: "inline-flex items-center gap-2",
|
|
3582
|
-
onClick:
|
|
3585
|
+
onClick: E[0] || (E[0] = (L) => t.disabled ? void 0 : p(t.modelValue))
|
|
3583
3586
|
}, [
|
|
3584
|
-
|
|
3587
|
+
j("div", {
|
|
3585
3588
|
class: le(["w-4 h-4 border rounded-sm cursor-pointer", {
|
|
3586
3589
|
"border-zinc-400": !t.disabled && !t.modelValue,
|
|
3587
3590
|
// 'border-zinc-300': disabled && !modelValue,
|
|
@@ -3591,32 +3594,32 @@ const Vg = /* @__PURE__ */ Vm($g), Bg = {
|
|
|
3591
3594
|
}, [
|
|
3592
3595
|
t.modelValue === !0 ? (D(), ct(vu, { key: 0 })) : ve("", !0)
|
|
3593
3596
|
], 2),
|
|
3594
|
-
|
|
3597
|
+
j("span", {
|
|
3595
3598
|
class: le(["text-base cursor-pointer select-none", { "opacity-50": t.disabled }])
|
|
3596
3599
|
}, [
|
|
3597
|
-
we(
|
|
3598
|
-
rn(Le(
|
|
3600
|
+
we(b.$slots, "default", {}, () => [
|
|
3601
|
+
rn(Le(l.value), 1)
|
|
3599
3602
|
])
|
|
3600
3603
|
], 2)
|
|
3601
3604
|
])
|
|
3602
3605
|
]),
|
|
3603
3606
|
_: 3
|
|
3604
|
-
}, 8, ["name", "rules", "value", "unchecked-value", "modelValue"])) : t.radio ? (D(), ct(
|
|
3607
|
+
}, 8, ["name", "rules", "value", "unchecked-value", "modelValue"])) : t.radio ? (D(), ct(_(Ni), {
|
|
3605
3608
|
key: 2,
|
|
3606
3609
|
ref_key: "myInput",
|
|
3607
|
-
ref:
|
|
3608
|
-
name:
|
|
3610
|
+
ref: x,
|
|
3611
|
+
name: o.value,
|
|
3609
3612
|
value: t.radioValue,
|
|
3610
3613
|
modelValue: t.modelValue
|
|
3611
3614
|
}, {
|
|
3612
|
-
default: wt(({ field:
|
|
3613
|
-
|
|
3614
|
-
onClick:
|
|
3615
|
-
t.disabled ||
|
|
3615
|
+
default: wt(({ field: N }) => [
|
|
3616
|
+
j("div", {
|
|
3617
|
+
onClick: E[2] || (E[2] = () => {
|
|
3618
|
+
t.disabled || g(t.radioValue);
|
|
3616
3619
|
}),
|
|
3617
3620
|
class: le([{ "cursor-pointer": !t.disabled }, "inline-flex items-center gap-2 select-none"])
|
|
3618
3621
|
}, [
|
|
3619
|
-
|
|
3622
|
+
j("span", {
|
|
3620
3623
|
class: le(["h-4 w-4 border border-zinc-400 rounded-full p-[2px]", { "border-opacity-50": t.disabled }])
|
|
3621
3624
|
}, [
|
|
3622
3625
|
t.radioValue == t.modelValue ? (D(), V("span", {
|
|
@@ -3624,42 +3627,42 @@ const Vg = /* @__PURE__ */ Vm($g), Bg = {
|
|
|
3624
3627
|
class: le(["flex rounded-full h-full w-full bg-violet-800", { "bg-opacity-50": t.disabled }])
|
|
3625
3628
|
}, null, 2)) : ve("", !0)
|
|
3626
3629
|
], 2),
|
|
3627
|
-
|
|
3630
|
+
j("input", {
|
|
3628
3631
|
class: "hidden",
|
|
3629
3632
|
type: "radio",
|
|
3630
3633
|
name: t.name,
|
|
3631
3634
|
value: t.radioValue,
|
|
3632
|
-
onChange:
|
|
3635
|
+
onChange: E[1] || (E[1] = (...L) => b.onChange && b.onChange(...L)),
|
|
3633
3636
|
checked: t.radioValue == t.modelValue
|
|
3634
3637
|
}, null, 40, zg),
|
|
3635
|
-
|
|
3638
|
+
l.value ? (D(), V("span", {
|
|
3636
3639
|
key: 0,
|
|
3637
3640
|
class: le(["text-base", { "opacity-50": t.disabled }])
|
|
3638
|
-
}, Le(
|
|
3641
|
+
}, Le(l.value), 3)) : ve("", !0)
|
|
3639
3642
|
], 2)
|
|
3640
3643
|
]),
|
|
3641
3644
|
_: 1
|
|
3642
|
-
}, 8, ["name", "value", "modelValue"])) : t.select ? (D(), ct(
|
|
3645
|
+
}, 8, ["name", "value", "modelValue"])) : t.select ? (D(), ct(_(Ni), {
|
|
3643
3646
|
key: 3,
|
|
3644
3647
|
ref_key: "myInput",
|
|
3645
|
-
ref:
|
|
3648
|
+
ref: x,
|
|
3646
3649
|
modelValue: t.modelValue,
|
|
3647
|
-
rules:
|
|
3648
|
-
name:
|
|
3650
|
+
rules: d.value,
|
|
3651
|
+
name: o.value
|
|
3649
3652
|
}, {
|
|
3650
|
-
default: wt(({ field:
|
|
3651
|
-
var
|
|
3653
|
+
default: wt(({ field: N }) => {
|
|
3654
|
+
var L;
|
|
3652
3655
|
return [
|
|
3653
|
-
Te(
|
|
3656
|
+
Te(R, {
|
|
3654
3657
|
modelValue: t.modelValue,
|
|
3655
|
-
"onUpdate:modelValue":
|
|
3658
|
+
"onUpdate:modelValue": g,
|
|
3656
3659
|
disabled: t.disabled,
|
|
3657
3660
|
options: t.options,
|
|
3658
3661
|
hideSelect: t.hideSelect,
|
|
3659
3662
|
multiple: t.multiple,
|
|
3660
|
-
isInvalid: !!(t.error &&
|
|
3661
|
-
required: t.required || ((
|
|
3662
|
-
label:
|
|
3663
|
+
isInvalid: !!(t.error && _(s)),
|
|
3664
|
+
required: t.required || ((L = d.value) == null ? void 0 : L.indexOf("required")) >= 0,
|
|
3665
|
+
label: l.value,
|
|
3663
3666
|
placeholder: "Select..."
|
|
3664
3667
|
}, null, 8, ["modelValue", "disabled", "options", "hideSelect", "multiple", "isInvalid", "required", "label"])
|
|
3665
3668
|
];
|
|
@@ -3667,83 +3670,84 @@ const Vg = /* @__PURE__ */ Vm($g), Bg = {
|
|
|
3667
3670
|
_: 1
|
|
3668
3671
|
}, 8, ["modelValue", "rules", "name"])) : (D(), V("div", {
|
|
3669
3672
|
key: 4,
|
|
3670
|
-
class: le(["wpic-input rounded flex relative border
|
|
3673
|
+
class: le(["wpic-input rounded flex relative border", {
|
|
3674
|
+
[`${r[_(We).theme]}`]: !0,
|
|
3671
3675
|
"h-10": !t.textarea && !t.large,
|
|
3672
3676
|
"h-12": !t.textarea && t.large,
|
|
3673
3677
|
"border-opacity-50 border-zinc-300 text-zinc-400": t.disabled,
|
|
3674
|
-
"!border-red-600 focus-within:outline-red-600":
|
|
3678
|
+
"!border-red-600 focus-within:outline-red-600": _(s)
|
|
3675
3679
|
}])
|
|
3676
3680
|
}, [
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
we(
|
|
3681
|
+
b.$slots.prepend ? (D(), V("div", Fg, [
|
|
3682
|
+
j("div", _g, [
|
|
3683
|
+
we(b.$slots, "prepend")
|
|
3680
3684
|
])
|
|
3681
3685
|
])) : ve("", !0),
|
|
3682
|
-
Te(
|
|
3686
|
+
Te(_(Ni), {
|
|
3683
3687
|
ref_key: "myInput",
|
|
3684
|
-
ref:
|
|
3688
|
+
ref: x,
|
|
3685
3689
|
as: t.textarea ? "textarea" : void 0,
|
|
3686
3690
|
autocomplete: "off",
|
|
3687
3691
|
style: { "z-index": "1" },
|
|
3688
|
-
class: le(["flex w-full h-full rounded pr-4 bg-transparent outline-none appearance-none", { "pl-4": !
|
|
3689
|
-
type:
|
|
3692
|
+
class: le(["flex w-full h-full rounded pr-4 bg-transparent outline-none appearance-none", { "pl-4": !b.$slots.prepend, "pl-12": b.$slots.prepend, "py-2": t.textarea, "cursor-not-allowed": t.disabled }]),
|
|
3693
|
+
type: c.value,
|
|
3690
3694
|
min: t.min,
|
|
3691
3695
|
max: t.max,
|
|
3692
3696
|
rows: t.rows,
|
|
3693
|
-
name:
|
|
3697
|
+
name: o.value,
|
|
3694
3698
|
disabled: t.disabled,
|
|
3695
3699
|
modelValue: t.modelValue,
|
|
3696
|
-
onInput:
|
|
3700
|
+
onInput: f,
|
|
3697
3701
|
placeholder: t.placeholder,
|
|
3698
|
-
validateOnInput: !!
|
|
3699
|
-
rules:
|
|
3702
|
+
validateOnInput: !!_(s),
|
|
3703
|
+
rules: d.value
|
|
3700
3704
|
}, null, 8, ["as", "class", "type", "min", "max", "rows", "name", "disabled", "modelValue", "placeholder", "validateOnInput", "rules"]),
|
|
3701
3705
|
t.loading ? (D(), V("div", {
|
|
3702
3706
|
key: 1,
|
|
3703
|
-
onClick:
|
|
3707
|
+
onClick: m,
|
|
3704
3708
|
class: "absolute right-0 mr-3 h-full flex items-center cursor-pointer opacity-75 hover:opacity-100"
|
|
3705
3709
|
}, [
|
|
3706
3710
|
Te(yo, { class: "w-6 h-6 opacity-50" })
|
|
3707
3711
|
])) : t.clearable && t.modelValue ? (D(), V("div", {
|
|
3708
3712
|
key: 2,
|
|
3709
|
-
onClick: Ef(
|
|
3713
|
+
onClick: Ef(m, ["stop"]),
|
|
3710
3714
|
style: { "z-index": "2" },
|
|
3711
3715
|
class: "absolute right-0 mr-3 h-full flex items-center cursor-pointer opacity-75 hover:opacity-100"
|
|
3712
3716
|
}, [
|
|
3713
3717
|
Te(al, { class: "w-5 h-5 opacity-50" })
|
|
3714
3718
|
])) : ve("", !0),
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
we(
|
|
3719
|
+
b.$slots.append || t.password || t.type == "password" ? (D(), V("div", jg, [
|
|
3720
|
+
j("div", Hg, [
|
|
3721
|
+
we(b.$slots, "append", {}, () => [
|
|
3718
3722
|
Bl(Te(gm, {
|
|
3719
3723
|
class: "text-zinc-600 select-none",
|
|
3720
|
-
onClick:
|
|
3724
|
+
onClick: u
|
|
3721
3725
|
}, null, 512), [
|
|
3722
|
-
[Ll,
|
|
3726
|
+
[Ll, a.value]
|
|
3723
3727
|
]),
|
|
3724
3728
|
Bl(Te(Om, {
|
|
3725
3729
|
class: "text-zinc-600 select-none",
|
|
3726
|
-
onClick:
|
|
3730
|
+
onClick: u
|
|
3727
3731
|
}, null, 512), [
|
|
3728
|
-
[Ll, !
|
|
3732
|
+
[Ll, !a.value]
|
|
3729
3733
|
])
|
|
3730
3734
|
])
|
|
3731
3735
|
])
|
|
3732
3736
|
])) : ve("", !0)
|
|
3733
3737
|
], 2)),
|
|
3734
|
-
t.error &&
|
|
3735
|
-
Te(
|
|
3736
|
-
default: wt((
|
|
3737
|
-
rn(Le(
|
|
3738
|
+
t.error && _(s) ? (D(), V("div", Wg, [
|
|
3739
|
+
Te(_(jh), { name: o.value }, {
|
|
3740
|
+
default: wt((N) => [
|
|
3741
|
+
rn(Le(N.message), 1)
|
|
3738
3742
|
]),
|
|
3739
3743
|
_: 1
|
|
3740
3744
|
}, 8, ["name"])
|
|
3741
3745
|
])) : ve("", !0),
|
|
3742
|
-
|
|
3746
|
+
b.$slots.help || t.help ? (D(), V("div", {
|
|
3743
3747
|
key: 6,
|
|
3744
3748
|
class: le(["text-base mt-1", { "ml-7": t.type == "checkbox", "opacity-50": t.disabled }])
|
|
3745
3749
|
}, [
|
|
3746
|
-
we(
|
|
3750
|
+
we(b.$slots, "help", {}, () => [
|
|
3747
3751
|
rn(Le(t.help), 1)
|
|
3748
3752
|
])
|
|
3749
3753
|
], 2)) : ve("", !0)
|
|
@@ -3756,7 +3760,7 @@ const Vg = /* @__PURE__ */ Vm($g), Bg = {
|
|
|
3756
3760
|
viewBox: "0 0 24 24",
|
|
3757
3761
|
"stroke-width": "2",
|
|
3758
3762
|
stroke: "currentColor"
|
|
3759
|
-
}, Gg = /* @__PURE__ */
|
|
3763
|
+
}, Gg = /* @__PURE__ */ j("path", {
|
|
3760
3764
|
"stroke-linecap": "round",
|
|
3761
3765
|
"stroke-linejoin": "round",
|
|
3762
3766
|
d: "m19.5 8.25-7.5 7.5-7.5-7.5"
|
|
@@ -3809,8 +3813,8 @@ const Xg = /* @__PURE__ */ ke(Kg, [["render", Zg]]), Qg = ["disabled"], e0 = {
|
|
|
3809
3813
|
if (n.multiple)
|
|
3810
3814
|
if (n.maxDisplay) {
|
|
3811
3815
|
let g = (f = n.options) == null ? void 0 : f.filter((v) => {
|
|
3812
|
-
var
|
|
3813
|
-
return ((
|
|
3816
|
+
var x;
|
|
3817
|
+
return ((x = n.modelValue) == null ? void 0 : x.indexOf(v.value)) >= 0;
|
|
3814
3818
|
}).map((v) => v.label), m = g == null ? void 0 : g.slice(0, n.maxDisplay);
|
|
3815
3819
|
return g.length - m.length > 0 ? (m == null ? void 0 : m.join(", ")) + ` (+${g.length - m.length})` : m == null ? void 0 : m.join(", ");
|
|
3816
3820
|
} else
|
|
@@ -3849,17 +3853,17 @@ const Xg = /* @__PURE__ */ ke(Kg, [["render", Zg]]), Qg = ["disabled"], e0 = {
|
|
|
3849
3853
|
default: wt(({ isHidden: h }) => {
|
|
3850
3854
|
var p;
|
|
3851
3855
|
return [
|
|
3852
|
-
|
|
3856
|
+
j("button", {
|
|
3853
3857
|
class: le(["flex appearance-none w-full items-center gap-2 px-3 lg:text-base rounded border overflow-hidden leading-none", {
|
|
3854
3858
|
"h-10": !t.small,
|
|
3855
3859
|
"h-8": t.small,
|
|
3856
3860
|
"cursor-pointer": !t.disabled,
|
|
3857
3861
|
"!border-red-600 focus-within:outline-red-600": t.isInvalid,
|
|
3858
|
-
[`${c[
|
|
3862
|
+
[`${c[_(We).theme]}`]: !0
|
|
3859
3863
|
}]),
|
|
3860
3864
|
disabled: t.disabled
|
|
3861
3865
|
}, [
|
|
3862
|
-
|
|
3866
|
+
j("span", {
|
|
3863
3867
|
class: le(["select-none w-full text-left flex-1", { "whitespace-pre": !t.multiple }])
|
|
3864
3868
|
}, [
|
|
3865
3869
|
t.modelValue && ((p = t.modelValue) == null ? void 0 : p.length) > 0 && !t.hideSelect ? (D(), V("span", e0, Le(s.value), 1)) : we(d.$slots, "default", { key: 1 }, () => [
|
|
@@ -3879,15 +3883,15 @@ const Xg = /* @__PURE__ */ ke(Kg, [["render", Zg]]), Qg = ["disabled"], e0 = {
|
|
|
3879
3883
|
(D(!0), V(on, null, vn(l.value, (p) => (D(), V("div", {
|
|
3880
3884
|
class: le(["group", { "is-selected": !!a(p.value) }])
|
|
3881
3885
|
}, [
|
|
3882
|
-
|
|
3886
|
+
j("div", {
|
|
3883
3887
|
class: le(["flex items-center py-2 px-4 min-w-64 text-base", {
|
|
3884
3888
|
"cursor-pointer": !t.multiple || p.value,
|
|
3885
|
-
[`${u[
|
|
3889
|
+
[`${u[_(We).theme]}`]: !0
|
|
3886
3890
|
}]),
|
|
3887
3891
|
onClick: (g) => o(p.value)
|
|
3888
3892
|
}, [
|
|
3889
|
-
|
|
3890
|
-
|
|
3893
|
+
j("div", i0, [
|
|
3894
|
+
j("span", null, Le(p.label || p.value), 1),
|
|
3891
3895
|
a(p.value) ? (D(), ct(vu, {
|
|
3892
3896
|
key: 0,
|
|
3893
3897
|
class: "w-4 h-4"
|
|
@@ -3920,7 +3924,7 @@ const Xg = /* @__PURE__ */ ke(Kg, [["render", Zg]]), Qg = ["disabled"], e0 = {
|
|
|
3920
3924
|
return (e, n) => (D(), V("div", l0, [
|
|
3921
3925
|
t.title || e.$slots.actions ? (D(), V("div", a0, [
|
|
3922
3926
|
t.title ? (D(), V("div", c0, Le(t.title), 1)) : ve("", !0),
|
|
3923
|
-
|
|
3927
|
+
j("div", u0, [
|
|
3924
3928
|
we(e.$slots, "actions")
|
|
3925
3929
|
])
|
|
3926
3930
|
])) : ve("", !0),
|
|
@@ -3968,7 +3972,7 @@ const y0 = /* @__PURE__ */ ke(p0, [["render", g0]]), v0 = { class: "flex h-2 rou
|
|
|
3968
3972
|
return (i, o) => (D(), V("div", {
|
|
3969
3973
|
class: le(["wpic-tag select-none border border-cyan-500 bg-cyan-50 inline-flex rounded text-cyan-600 h-8 items-center justify-center pl-3 py-1", { "pr-3": !t.clearable, "pr-2": t.clearable }])
|
|
3970
3974
|
}, [
|
|
3971
|
-
|
|
3975
|
+
j("span", x0, [
|
|
3972
3976
|
we(i.$slots, "default")
|
|
3973
3977
|
]),
|
|
3974
3978
|
t.clearable ? (D(), V("span", {
|
|
@@ -3990,7 +3994,7 @@ const y0 = /* @__PURE__ */ ke(p0, [["render", g0]]), v0 = { class: "flex h-2 rou
|
|
|
3990
3994
|
return (e, n) => (D(), V("div", {
|
|
3991
3995
|
class: le({ "w-full": t.full })
|
|
3992
3996
|
}, [
|
|
3993
|
-
|
|
3997
|
+
j("div", {
|
|
3994
3998
|
class: le(["ui-tag-group flex flex-wrap gap-2", { "w-full": t.full }])
|
|
3995
3999
|
}, [
|
|
3996
4000
|
we(e.$slots, "default")
|
|
@@ -4027,12 +4031,12 @@ const y0 = /* @__PURE__ */ ke(p0, [["render", g0]]), v0 = { class: "flex h-2 rou
|
|
|
4027
4031
|
"bg-violet-800 border-violet-800 hover:bg-violet-900 hover:border-violet-900 text-white": t.active
|
|
4028
4032
|
}])
|
|
4029
4033
|
}, [
|
|
4030
|
-
|
|
4034
|
+
j("span", A0, [
|
|
4031
4035
|
we(e.$slots, "default")
|
|
4032
4036
|
])
|
|
4033
4037
|
], 2));
|
|
4034
4038
|
}
|
|
4035
|
-
}), D0 = { class: "wpic-pagination flex justify-between" }, I0 = { class: "flex flex-wrap gap-2" }, P0 = { class: "hidden lg:flex gap-2 items-center" }, R0 = /* @__PURE__ */
|
|
4039
|
+
}), D0 = { class: "wpic-pagination flex justify-between" }, I0 = { class: "flex flex-wrap gap-2" }, P0 = { class: "hidden lg:flex gap-2 items-center" }, R0 = /* @__PURE__ */ j("span", { class: "text-base text-zinc-500" }, "Results per page", -1), $0 = { class: "flex gap-2" }, V0 = {
|
|
4036
4040
|
name: "WpicPagination"
|
|
4037
4041
|
}, B0 = /* @__PURE__ */ Object.assign(V0, {
|
|
4038
4042
|
props: {
|
|
@@ -4062,7 +4066,7 @@ const y0 = /* @__PURE__ */ ke(p0, [["render", g0]]), v0 = { class: "flex h-2 rou
|
|
|
4062
4066
|
getStart: c,
|
|
4063
4067
|
getEnd: u
|
|
4064
4068
|
}), (d, f) => (D(), V("div", D0, [
|
|
4065
|
-
|
|
4069
|
+
j("div", I0, [
|
|
4066
4070
|
(D(!0), V(on, null, vn(o.value, (h) => (D(), ct(aa, {
|
|
4067
4071
|
onClick: (p) => l(h),
|
|
4068
4072
|
active: h === t.currentPage
|
|
@@ -4073,9 +4077,9 @@ const y0 = /* @__PURE__ */ ke(p0, [["render", g0]]), v0 = { class: "flex h-2 rou
|
|
|
4073
4077
|
_: 2
|
|
4074
4078
|
}, 1032, ["onClick", "active"]))), 256))
|
|
4075
4079
|
]),
|
|
4076
|
-
|
|
4080
|
+
j("div", P0, [
|
|
4077
4081
|
R0,
|
|
4078
|
-
|
|
4082
|
+
j("div", $0, [
|
|
4079
4083
|
(D(), V(on, null, vn(s, (h) => Te(aa, {
|
|
4080
4084
|
onClick: (p) => a(h),
|
|
4081
4085
|
active: h == t.perPage
|
|
@@ -4095,7 +4099,7 @@ const L0 = Su, z0 = {}, F0 = {
|
|
|
4095
4099
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4096
4100
|
viewBox: "0 0 16 16",
|
|
4097
4101
|
fill: "currentColor"
|
|
4098
|
-
}, _0 = /* @__PURE__ */
|
|
4102
|
+
}, _0 = /* @__PURE__ */ j("path", {
|
|
4099
4103
|
"fill-rule": "evenodd",
|
|
4100
4104
|
d: "M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z",
|
|
4101
4105
|
"clip-rule": "evenodd"
|
|
@@ -4141,44 +4145,44 @@ const W0 = /* @__PURE__ */ ke(z0, [["render", H0]]), q0 = { class: "w-full round
|
|
|
4141
4145
|
const c = Af(), u = me([]);
|
|
4142
4146
|
function d() {
|
|
4143
4147
|
const h = (m, v) => {
|
|
4144
|
-
let
|
|
4145
|
-
for (let
|
|
4146
|
-
if (typeof m[
|
|
4147
|
-
|
|
4148
|
+
let x = {};
|
|
4149
|
+
for (let O in m) {
|
|
4150
|
+
if (typeof m[O].default == "boolean" && v[O] !== void 0) {
|
|
4151
|
+
x[O] = v[O] !== !1;
|
|
4148
4152
|
continue;
|
|
4149
4153
|
}
|
|
4150
|
-
if (v[
|
|
4151
|
-
|
|
4154
|
+
if (v[O] !== void 0) {
|
|
4155
|
+
x[O] = v[O];
|
|
4152
4156
|
continue;
|
|
4153
4157
|
}
|
|
4154
|
-
if (typeof m[
|
|
4155
|
-
|
|
4158
|
+
if (typeof m[O].default == "function") {
|
|
4159
|
+
x[O] = m[O].default();
|
|
4156
4160
|
continue;
|
|
4157
4161
|
}
|
|
4158
|
-
|
|
4162
|
+
x[O] = m[O].default;
|
|
4159
4163
|
}
|
|
4160
|
-
return
|
|
4164
|
+
return x;
|
|
4161
4165
|
};
|
|
4162
4166
|
let p = [];
|
|
4163
4167
|
(c.default && c.default() || []).forEach((m) => {
|
|
4164
|
-
var v,
|
|
4165
|
-
((v = m.type) == null ? void 0 : v.name) === "WpicTableColumn" ? p.push(m) : (
|
|
4168
|
+
var v, x;
|
|
4169
|
+
((v = m.type) == null ? void 0 : v.name) === "WpicTableColumn" ? p.push(m) : (x = m.children) != null && x.length && m.children.forEach((O) => {
|
|
4166
4170
|
var y;
|
|
4167
|
-
((y =
|
|
4171
|
+
((y = O.type) == null ? void 0 : y.name) === "WpicTableColumn" && p.push(O);
|
|
4168
4172
|
});
|
|
4169
4173
|
}), u.value = p.map((m) => {
|
|
4170
|
-
let v = m.children,
|
|
4174
|
+
let v = m.children, x = m.props || {}, { field: O, label: y, help: M, width: b, minWidth: E, maxWidth: R, sortable: N, selectable: L, render: Z, type: J, align: te, visible: ie } = h(m.type.props, x);
|
|
4171
4175
|
return {
|
|
4172
4176
|
label: y,
|
|
4173
|
-
help:
|
|
4174
|
-
width:
|
|
4175
|
-
minWidth:
|
|
4176
|
-
maxWidth:
|
|
4177
|
+
help: M,
|
|
4178
|
+
width: b,
|
|
4179
|
+
minWidth: E,
|
|
4180
|
+
maxWidth: R,
|
|
4177
4181
|
type: J,
|
|
4178
4182
|
align: te,
|
|
4179
|
-
sortable:
|
|
4180
|
-
selectable:
|
|
4181
|
-
field:
|
|
4183
|
+
sortable: N,
|
|
4184
|
+
selectable: L,
|
|
4185
|
+
field: O,
|
|
4182
4186
|
render: Z,
|
|
4183
4187
|
children: v,
|
|
4184
4188
|
visible: ie
|
|
@@ -4198,11 +4202,11 @@ const W0 = /* @__PURE__ */ ke(z0, [["render", H0]]), q0 = { class: "w-full round
|
|
|
4198
4202
|
}), (h, p) => (D(), V("div", {
|
|
4199
4203
|
class: le(["relative w-full rounded-lg", {
|
|
4200
4204
|
border: t.border,
|
|
4201
|
-
[`${i[
|
|
4205
|
+
[`${i[_(We).theme]}`]: !0
|
|
4202
4206
|
}])
|
|
4203
4207
|
}, [
|
|
4204
|
-
|
|
4205
|
-
|
|
4208
|
+
j("table", q0, [
|
|
4209
|
+
j("colgroup", null, [
|
|
4206
4210
|
(D(!0), V(on, null, vn(u.value, (g, m) => (D(), V("col", {
|
|
4207
4211
|
style: jc({ minWidth: `${g.minWidth}px` }),
|
|
4208
4212
|
width: g.width,
|
|
@@ -4211,11 +4215,11 @@ const W0 = /* @__PURE__ */ ke(z0, [["render", H0]]), q0 = { class: "w-full round
|
|
|
4211
4215
|
}, null, 12, U0))), 128))
|
|
4212
4216
|
]),
|
|
4213
4217
|
t.hideHeaders ? ve("", !0) : (D(), V("thead", K0, [
|
|
4214
|
-
|
|
4218
|
+
j("tr", null, [
|
|
4215
4219
|
(D(!0), V(on, null, vn(u.value, (g, m) => (D(), V("th", {
|
|
4216
|
-
class: le(["first:rounded-tl-lg last:rounded-tr-lg p-0 border-b", [`${o[
|
|
4220
|
+
class: le(["first:rounded-tl-lg last:rounded-tr-lg p-0 border-b", [`${o[_(We).theme]}`]])
|
|
4217
4221
|
}, [
|
|
4218
|
-
|
|
4222
|
+
j("div", {
|
|
4219
4223
|
onClick: () => {
|
|
4220
4224
|
g.sortable && f(g.field);
|
|
4221
4225
|
},
|
|
@@ -4225,7 +4229,7 @@ const W0 = /* @__PURE__ */ ke(z0, [["render", H0]]), q0 = { class: "w-full round
|
|
|
4225
4229
|
"justify-end": g.align == "right"
|
|
4226
4230
|
}])
|
|
4227
4231
|
}, [
|
|
4228
|
-
|
|
4232
|
+
j("span", G0, Le(g.label), 1),
|
|
4229
4233
|
g.sortable && g.field ? (D(), V("span", {
|
|
4230
4234
|
key: 0,
|
|
4231
4235
|
class: le(["ml-1", { "opacity-25": g.field != t.sortOptions.sortBy }])
|
|
@@ -4238,26 +4242,26 @@ const W0 = /* @__PURE__ */ ke(z0, [["render", H0]]), q0 = { class: "w-full round
|
|
|
4238
4242
|
], 2))), 256))
|
|
4239
4243
|
])
|
|
4240
4244
|
])),
|
|
4241
|
-
|
|
4245
|
+
j("tbody", Y0, [
|
|
4242
4246
|
(D(!0), V(on, null, vn(t.data, (g, m) => (D(), V("tr", {
|
|
4243
|
-
class: le(["tr border-b last:border-b-0 overflow-hidden", [`${s[
|
|
4247
|
+
class: le(["tr border-b last:border-b-0 overflow-hidden", [`${s[_(We).theme]}`]]),
|
|
4244
4248
|
key: `tr_${m}`
|
|
4245
4249
|
}, [
|
|
4246
|
-
(D(!0), V(on, null, vn(u.value, (v,
|
|
4247
|
-
var
|
|
4250
|
+
(D(!0), V(on, null, vn(u.value, (v, x) => {
|
|
4251
|
+
var O, y;
|
|
4248
4252
|
return D(), ct(L0, {
|
|
4249
4253
|
class: le(["py-3 px-6 lg:text-base", {
|
|
4250
4254
|
"first:pl-0 last:pr-0": t.noXPadding,
|
|
4251
|
-
"last:rounded-br-lg": m === ((
|
|
4255
|
+
"last:rounded-br-lg": m === ((O = t.data) == null ? void 0 : O.length) - 1,
|
|
4252
4256
|
"first:rounded-bl-lg": m === ((y = t.data) == null ? void 0 : y.length) - 1,
|
|
4253
4257
|
"text-center": v.align == "center",
|
|
4254
4258
|
"text-right": v.align == "right"
|
|
4255
4259
|
}]),
|
|
4256
|
-
id: `${m}_${
|
|
4260
|
+
id: `${m}_${x}`,
|
|
4257
4261
|
column: v,
|
|
4258
4262
|
item: g,
|
|
4259
4263
|
rowIndex: m,
|
|
4260
|
-
key:
|
|
4264
|
+
key: x
|
|
4261
4265
|
}, null, 8, ["class", "id", "column", "item", "rowIndex"]);
|
|
4262
4266
|
}), 128))
|
|
4263
4267
|
], 2))), 128))
|
|
@@ -4862,7 +4866,7 @@ let fe = class Cs {
|
|
|
4862
4866
|
fe.none = [];
|
|
4863
4867
|
class Qi extends Error {
|
|
4864
4868
|
}
|
|
4865
|
-
class
|
|
4869
|
+
class P {
|
|
4866
4870
|
/**
|
|
4867
4871
|
Create a slice. When specifying a non-zero open depth, you must
|
|
4868
4872
|
make sure that there are nodes of at least that depth at the
|
|
@@ -4889,13 +4893,13 @@ class R {
|
|
|
4889
4893
|
*/
|
|
4890
4894
|
insertAt(e, n) {
|
|
4891
4895
|
let r = Tu(this.content, e + this.openStart, n);
|
|
4892
|
-
return r && new
|
|
4896
|
+
return r && new P(r, this.openStart, this.openEnd);
|
|
4893
4897
|
}
|
|
4894
4898
|
/**
|
|
4895
4899
|
@internal
|
|
4896
4900
|
*/
|
|
4897
4901
|
removeBetween(e, n) {
|
|
4898
|
-
return new
|
|
4902
|
+
return new P(Mu(this.content, e + this.openStart, n + this.openStart), this.openStart, this.openEnd);
|
|
4899
4903
|
}
|
|
4900
4904
|
/**
|
|
4901
4905
|
Tests whether this slice is equal to another slice.
|
|
@@ -4923,11 +4927,11 @@ class R {
|
|
|
4923
4927
|
*/
|
|
4924
4928
|
static fromJSON(e, n) {
|
|
4925
4929
|
if (!n)
|
|
4926
|
-
return
|
|
4930
|
+
return P.empty;
|
|
4927
4931
|
let r = n.openStart || 0, i = n.openEnd || 0;
|
|
4928
4932
|
if (typeof r != "number" || typeof i != "number")
|
|
4929
4933
|
throw new RangeError("Invalid input for Slice.fromJSON");
|
|
4930
|
-
return new
|
|
4934
|
+
return new P(T.fromJSON(e, n.content), r, i);
|
|
4931
4935
|
}
|
|
4932
4936
|
/**
|
|
4933
4937
|
Create a slice from a fragment by taking the maximum possible
|
|
@@ -4939,10 +4943,10 @@ class R {
|
|
|
4939
4943
|
r++;
|
|
4940
4944
|
for (let o = e.lastChild; o && !o.isLeaf && (n || !o.type.spec.isolating); o = o.lastChild)
|
|
4941
4945
|
i++;
|
|
4942
|
-
return new
|
|
4946
|
+
return new P(e, r, i);
|
|
4943
4947
|
}
|
|
4944
4948
|
}
|
|
4945
|
-
|
|
4949
|
+
P.empty = new P(T.empty, 0, 0);
|
|
4946
4950
|
function Mu(t, e, n) {
|
|
4947
4951
|
let { index: r, offset: i } = t.findIndex(e), o = t.maybeChild(r), { index: s, offset: l } = t.findIndex(n);
|
|
4948
4952
|
if (i == e || o.isText) {
|
|
@@ -5454,9 +5458,9 @@ let Kn = class Ts {
|
|
|
5454
5458
|
*/
|
|
5455
5459
|
slice(e, n = this.content.size, r = !1) {
|
|
5456
5460
|
if (e == n)
|
|
5457
|
-
return
|
|
5461
|
+
return P.empty;
|
|
5458
5462
|
let i = this.resolve(e), o = this.resolve(n), s = r ? 0 : i.sharedDepth(n), l = i.start(s), c = i.node(s).content.cut(i.pos - l, o.pos - l);
|
|
5459
|
-
return new
|
|
5463
|
+
return new P(c, i.depth - s, o.depth - s);
|
|
5460
5464
|
}
|
|
5461
5465
|
/**
|
|
5462
5466
|
Replace the part of the document between the given positions with
|
|
@@ -6453,7 +6457,7 @@ class Tr {
|
|
|
6453
6457
|
*/
|
|
6454
6458
|
parseSlice(e, n = {}) {
|
|
6455
6459
|
let r = new pa(this, n, !0);
|
|
6456
|
-
return r.addAll(e, n.from, n.to),
|
|
6460
|
+
return r.addAll(e, n.from, n.to), P.maxOpen(r.finish());
|
|
6457
6461
|
}
|
|
6458
6462
|
/**
|
|
6459
6463
|
@internal
|
|
@@ -7436,7 +7440,7 @@ class bn extends Fe {
|
|
|
7436
7440
|
super(), this.from = e, this.to = n, this.mark = r;
|
|
7437
7441
|
}
|
|
7438
7442
|
apply(e) {
|
|
7439
|
-
let n = e.slice(this.from, this.to), r = e.resolve(this.from), i = r.node(r.sharedDepth(this.to)), o = new
|
|
7443
|
+
let n = e.slice(this.from, this.to), r = e.resolve(this.from), i = r.node(r.sharedDepth(this.to)), o = new P(ul(n.content, (s, l) => !s.isAtom || !l.type.allowsMarkType(this.mark.type) ? s : s.mark(this.mark.addToSet(s.marks)), i), n.openStart, n.openEnd);
|
|
7440
7444
|
return xe.fromReplace(e, this.from, this.to, o);
|
|
7441
7445
|
}
|
|
7442
7446
|
invert() {
|
|
@@ -7475,7 +7479,7 @@ class jt extends Fe {
|
|
|
7475
7479
|
super(), this.from = e, this.to = n, this.mark = r;
|
|
7476
7480
|
}
|
|
7477
7481
|
apply(e) {
|
|
7478
|
-
let n = e.slice(this.from, this.to), r = new
|
|
7482
|
+
let n = e.slice(this.from, this.to), r = new P(ul(n.content, (i) => i.mark(this.mark.removeFromSet(i.marks)), e), n.openStart, n.openEnd);
|
|
7479
7483
|
return xe.fromReplace(e, this.from, this.to, r);
|
|
7480
7484
|
}
|
|
7481
7485
|
invert() {
|
|
@@ -7518,7 +7522,7 @@ class wn extends Fe {
|
|
|
7518
7522
|
if (!n)
|
|
7519
7523
|
return xe.fail("No node at mark step's position");
|
|
7520
7524
|
let r = n.type.create(n.attrs, null, this.mark.addToSet(n.marks));
|
|
7521
|
-
return xe.fromReplace(e, this.pos, this.pos + 1, new
|
|
7525
|
+
return xe.fromReplace(e, this.pos, this.pos + 1, new P(T.from(r), 0, n.isLeaf ? 0 : 1));
|
|
7522
7526
|
}
|
|
7523
7527
|
invert(e) {
|
|
7524
7528
|
let n = e.nodeAt(this.pos);
|
|
@@ -7562,7 +7566,7 @@ class Er extends Fe {
|
|
|
7562
7566
|
if (!n)
|
|
7563
7567
|
return xe.fail("No node at mark step's position");
|
|
7564
7568
|
let r = n.type.create(n.attrs, null, this.mark.removeFromSet(n.marks));
|
|
7565
|
-
return xe.fromReplace(e, this.pos, this.pos + 1, new
|
|
7569
|
+
return xe.fromReplace(e, this.pos, this.pos + 1, new P(T.from(r), 0, n.isLeaf ? 0 : 1));
|
|
7566
7570
|
}
|
|
7567
7571
|
invert(e) {
|
|
7568
7572
|
let n = e.nodeAt(this.pos);
|
|
@@ -7615,10 +7619,10 @@ class Ee extends Fe {
|
|
|
7615
7619
|
if (!(e instanceof Ee) || e.structure || this.structure)
|
|
7616
7620
|
return null;
|
|
7617
7621
|
if (this.from + this.slice.size == e.from && !this.slice.openEnd && !e.slice.openStart) {
|
|
7618
|
-
let n = this.slice.size + e.slice.size == 0 ?
|
|
7622
|
+
let n = this.slice.size + e.slice.size == 0 ? P.empty : new P(this.slice.content.append(e.slice.content), this.slice.openStart, e.slice.openEnd);
|
|
7619
7623
|
return new Ee(this.from, this.to + (e.to - e.from), n, this.structure);
|
|
7620
7624
|
} else if (e.to == this.from && !this.slice.openStart && !e.slice.openEnd) {
|
|
7621
|
-
let n = this.slice.size + e.slice.size == 0 ?
|
|
7625
|
+
let n = this.slice.size + e.slice.size == 0 ? P.empty : new P(e.slice.content.append(this.slice.content), e.slice.openStart, this.slice.openEnd);
|
|
7622
7626
|
return new Ee(e.from, this.to, n, this.structure);
|
|
7623
7627
|
} else
|
|
7624
7628
|
return null;
|
|
@@ -7633,7 +7637,7 @@ class Ee extends Fe {
|
|
|
7633
7637
|
static fromJSON(e, n) {
|
|
7634
7638
|
if (typeof n.from != "number" || typeof n.to != "number")
|
|
7635
7639
|
throw new RangeError("Invalid input for ReplaceStep.fromJSON");
|
|
7636
|
-
return new Ee(n.from, n.to,
|
|
7640
|
+
return new Ee(n.from, n.to, P.fromJSON(e, n.slice), !!n.structure);
|
|
7637
7641
|
}
|
|
7638
7642
|
}
|
|
7639
7643
|
Fe.jsonID("replace", Ee);
|
|
@@ -7691,7 +7695,7 @@ class Ne extends Fe {
|
|
|
7691
7695
|
static fromJSON(e, n) {
|
|
7692
7696
|
if (typeof n.from != "number" || typeof n.to != "number" || typeof n.gapFrom != "number" || typeof n.gapTo != "number" || typeof n.insert != "number")
|
|
7693
7697
|
throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");
|
|
7694
|
-
return new Ne(n.from, n.to, n.gapFrom, n.gapTo,
|
|
7698
|
+
return new Ne(n.from, n.to, n.gapFrom, n.gapTo, P.fromJSON(e, n.slice), n.insert, !!n.structure);
|
|
7695
7699
|
}
|
|
7696
7700
|
}
|
|
7697
7701
|
Fe.jsonID("replaceAround", Ne);
|
|
@@ -7754,7 +7758,7 @@ function qu(t, e, n, r = n.contentMatch, i = !0) {
|
|
|
7754
7758
|
for (let a = 0; a < o.childCount; a++) {
|
|
7755
7759
|
let c = o.child(a), u = l + c.nodeSize, d = r.matchType(c.type);
|
|
7756
7760
|
if (!d)
|
|
7757
|
-
s.push(new Ee(l, u,
|
|
7761
|
+
s.push(new Ee(l, u, P.empty));
|
|
7758
7762
|
else {
|
|
7759
7763
|
r = d;
|
|
7760
7764
|
for (let f = 0; f < c.marks.length; f++)
|
|
@@ -7762,14 +7766,14 @@ function qu(t, e, n, r = n.contentMatch, i = !0) {
|
|
|
7762
7766
|
if (i && c.isText && n.whitespace != "pre") {
|
|
7763
7767
|
let f, h = /\r?\n|\r/g, p;
|
|
7764
7768
|
for (; f = h.exec(c.text); )
|
|
7765
|
-
p || (p = new
|
|
7769
|
+
p || (p = new P(T.from(n.schema.text(" ", n.allowedMarks(c.marks))), 0, 0)), s.push(new Ee(l + f.index, l + f.index + f[0].length, p));
|
|
7766
7770
|
}
|
|
7767
7771
|
}
|
|
7768
7772
|
l = u;
|
|
7769
7773
|
}
|
|
7770
7774
|
if (!r.validEnd) {
|
|
7771
7775
|
let a = r.fillBefore(T.empty, !0);
|
|
7772
|
-
t.replace(l, l, new
|
|
7776
|
+
t.replace(l, l, new P(a, 0, 0));
|
|
7773
7777
|
}
|
|
7774
7778
|
for (let a = s.length - 1; a >= 0; a--)
|
|
7775
7779
|
t.step(s[a]);
|
|
@@ -7795,7 +7799,7 @@ function Ty(t, e, n) {
|
|
|
7795
7799
|
let f = T.empty, h = 0;
|
|
7796
7800
|
for (let p = o, g = !1; p > n; p--)
|
|
7797
7801
|
g || i.after(p + 1) < i.end(p) ? (g = !0, f = T.from(i.node(p).copy(f)), h++) : c++;
|
|
7798
|
-
t.step(new Ne(a, c, s, l, new
|
|
7802
|
+
t.step(new Ne(a, c, s, l, new P(u.append(f), d, h), u.size - d, !0));
|
|
7799
7803
|
}
|
|
7800
7804
|
function dl(t, e, n = null, r = t) {
|
|
7801
7805
|
let i = Ey(t, e), o = i && Ay(r, e);
|
|
@@ -7831,7 +7835,7 @@ function Ny(t, e, n) {
|
|
|
7831
7835
|
r = T.from(n[s].type.create(n[s].attrs, r));
|
|
7832
7836
|
}
|
|
7833
7837
|
let i = e.start, o = e.end;
|
|
7834
|
-
t.step(new Ne(i, o, i, o, new
|
|
7838
|
+
t.step(new Ne(i, o, i, o, new P(r, 0, 0), n.length, !0));
|
|
7835
7839
|
}
|
|
7836
7840
|
function Dy(t, e, n, r, i) {
|
|
7837
7841
|
if (!r.isTextblock)
|
|
@@ -7846,7 +7850,7 @@ function Dy(t, e, n, r, i) {
|
|
|
7846
7850
|
}
|
|
7847
7851
|
a === !1 && Py(t, s, l, o), qu(t, t.mapping.slice(o).map(l, 1), r, void 0, a === null);
|
|
7848
7852
|
let c = t.mapping.slice(o), u = c.map(l, 1), d = c.map(l + s.nodeSize, 1);
|
|
7849
|
-
return t.step(new Ne(u, d, u + 1, d - 1, new
|
|
7853
|
+
return t.step(new Ne(u, d, u + 1, d - 1, new P(T.from(r.create(i, null, s.marks)), 0, 0), 1, !0)), a === !0 && Iy(t, s, l, o), !1;
|
|
7850
7854
|
}
|
|
7851
7855
|
});
|
|
7852
7856
|
}
|
|
@@ -7884,7 +7888,7 @@ function $y(t, e, n, r, i) {
|
|
|
7884
7888
|
return t.replaceWith(e, e + o.nodeSize, s);
|
|
7885
7889
|
if (!n.validContent(o.content))
|
|
7886
7890
|
throw new RangeError("Invalid content for node type " + n.name);
|
|
7887
|
-
t.step(new Ne(e, e + o.nodeSize, e + 1, e + o.nodeSize - 1, new
|
|
7891
|
+
t.step(new Ne(e, e + o.nodeSize, e + 1, e + o.nodeSize - 1, new P(T.from(s), 0, 0), 1, !0));
|
|
7888
7892
|
}
|
|
7889
7893
|
function kr(t, e, n = 1, r) {
|
|
7890
7894
|
let i = t.resolve(e), o = i.depth - n, s = r && r[r.length - 1] || i.parent;
|
|
@@ -7910,7 +7914,7 @@ function Vy(t, e, n = 1, r) {
|
|
|
7910
7914
|
let u = r && r[c];
|
|
7911
7915
|
s = T.from(u ? u.type.create(u.attrs, s) : i.node(l).copy(s));
|
|
7912
7916
|
}
|
|
7913
|
-
t.step(new Ee(e, e, new
|
|
7917
|
+
t.step(new Ee(e, e, new P(o.append(s), n, n), !0));
|
|
7914
7918
|
}
|
|
7915
7919
|
function Dn(t, e) {
|
|
7916
7920
|
let n = t.resolve(e), r = n.index();
|
|
@@ -7931,7 +7935,7 @@ function So(t, e, n = -1) {
|
|
|
7931
7935
|
}
|
|
7932
7936
|
}
|
|
7933
7937
|
function By(t, e, n) {
|
|
7934
|
-
let r = new Ee(e - n, e + n,
|
|
7938
|
+
let r = new Ee(e - n, e + n, P.empty, !0);
|
|
7935
7939
|
t.step(r);
|
|
7936
7940
|
}
|
|
7937
7941
|
function Ly(t, e, n) {
|
|
@@ -7977,7 +7981,7 @@ function Ku(t, e, n) {
|
|
|
7977
7981
|
}
|
|
7978
7982
|
return null;
|
|
7979
7983
|
}
|
|
7980
|
-
function Oo(t, e, n = e, r =
|
|
7984
|
+
function Oo(t, e, n = e, r = P.empty) {
|
|
7981
7985
|
if (e == n && !r.size)
|
|
7982
7986
|
return null;
|
|
7983
7987
|
let i = t.resolve(e), o = t.resolve(n);
|
|
@@ -8013,7 +8017,7 @@ class zy {
|
|
|
8013
8017
|
let o = this.placed, s = r.depth, l = i.depth;
|
|
8014
8018
|
for (; s && l && o.childCount == 1; )
|
|
8015
8019
|
o = o.firstChild.content, s--, l--;
|
|
8016
|
-
let a = new
|
|
8020
|
+
let a = new P(o, s, l);
|
|
8017
8021
|
return e > -1 ? new Ne(r.pos, e, this.$to.pos, this.$to.end(), a, n) : a.size || r.pos != this.$to.pos ? new Ee(r.pos, i.pos, a) : null;
|
|
8018
8022
|
}
|
|
8019
8023
|
// Find a position on the start spine of `this.unplaced` that has
|
|
@@ -8047,15 +8051,15 @@ class zy {
|
|
|
8047
8051
|
}
|
|
8048
8052
|
openMore() {
|
|
8049
8053
|
let { content: e, openStart: n, openEnd: r } = this.unplaced, i = Ko(e, n);
|
|
8050
|
-
return !i.childCount || i.firstChild.isLeaf ? !1 : (this.unplaced = new
|
|
8054
|
+
return !i.childCount || i.firstChild.isLeaf ? !1 : (this.unplaced = new P(e, n + 1, Math.max(r, i.size + n >= e.size - r ? n + 1 : 0)), !0);
|
|
8051
8055
|
}
|
|
8052
8056
|
dropNode() {
|
|
8053
8057
|
let { content: e, openStart: n, openEnd: r } = this.unplaced, i = Ko(e, n);
|
|
8054
8058
|
if (i.childCount <= 1 && n > 0) {
|
|
8055
8059
|
let o = e.size - n <= n + i.size;
|
|
8056
|
-
this.unplaced = new
|
|
8060
|
+
this.unplaced = new P(Ur(e, n - 1, 1), n - 1, o ? n - 1 : r);
|
|
8057
8061
|
} else
|
|
8058
|
-
this.unplaced = new
|
|
8062
|
+
this.unplaced = new P(Ur(e, n, 1), n, r);
|
|
8059
8063
|
}
|
|
8060
8064
|
// Move content from the unplaced slice at `sliceDepth` to the
|
|
8061
8065
|
// frontier node at `frontierDepth`. Close that frontier node when
|
|
@@ -8085,7 +8089,7 @@ class zy {
|
|
|
8085
8089
|
let v = m.lastChild;
|
|
8086
8090
|
this.frontier.push({ type: v.type, match: v.contentMatchAt(v.childCount) }), m = v.content;
|
|
8087
8091
|
}
|
|
8088
|
-
this.unplaced = p ? e == 0 ?
|
|
8092
|
+
this.unplaced = p ? e == 0 ? P.empty : new P(Ur(s.content, e - 1, 1), e - 1, h < 0 ? s.openEnd : e - 1) : new P(Ur(s.content, e, c), s.openStart, s.openEnd);
|
|
8089
8093
|
}
|
|
8090
8094
|
mustMoveInline() {
|
|
8091
8095
|
if (!this.$to.parent.isTextblock)
|
|
@@ -8203,9 +8207,9 @@ function jy(t, e, n, r) {
|
|
|
8203
8207
|
for (let g = 0; g < s.length; g++) {
|
|
8204
8208
|
let m = s[(g + a) % s.length], v = !0;
|
|
8205
8209
|
m < 0 && (v = !1, m = -m);
|
|
8206
|
-
let
|
|
8207
|
-
if (
|
|
8208
|
-
return t.replace(i.before(m), v ? o.after(m) : n, new
|
|
8210
|
+
let x = i.node(m - 1), O = i.index(m - 1);
|
|
8211
|
+
if (x.canReplaceWith(O, O, p.type, p.marks))
|
|
8212
|
+
return t.replace(i.before(m), v ? o.after(m) : n, new P(Yu(r.content, 0, r.openStart, h), h, r.openEnd));
|
|
8209
8213
|
}
|
|
8210
8214
|
}
|
|
8211
8215
|
let d = t.steps.length;
|
|
@@ -8230,7 +8234,7 @@ function Hy(t, e, n, r) {
|
|
|
8230
8234
|
let i = Ly(t.doc, e, r.type);
|
|
8231
8235
|
i != null && (e = n = i);
|
|
8232
8236
|
}
|
|
8233
|
-
t.replaceRange(e, n, new
|
|
8237
|
+
t.replaceRange(e, n, new P(T.from(r), 0, 0));
|
|
8234
8238
|
}
|
|
8235
8239
|
function Wy(t, e, n) {
|
|
8236
8240
|
let r = t.doc.resolve(e), i = t.doc.resolve(n), o = Zu(r, i);
|
|
@@ -8272,7 +8276,7 @@ class Sr extends Fe {
|
|
|
8272
8276
|
r[o] = n.attrs[o];
|
|
8273
8277
|
r[this.attr] = this.value;
|
|
8274
8278
|
let i = n.type.create(r, null, n.marks);
|
|
8275
|
-
return xe.fromReplace(e, this.pos, this.pos + 1, new
|
|
8279
|
+
return xe.fromReplace(e, this.pos, this.pos + 1, new P(T.from(i), 0, n.isLeaf ? 0 : 1));
|
|
8276
8280
|
}
|
|
8277
8281
|
getMap() {
|
|
8278
8282
|
return ut.empty;
|
|
@@ -8385,7 +8389,7 @@ class qy {
|
|
|
8385
8389
|
Replace the part of the document between `from` and `to` with the
|
|
8386
8390
|
given `slice`.
|
|
8387
8391
|
*/
|
|
8388
|
-
replace(e, n = e, r =
|
|
8392
|
+
replace(e, n = e, r = P.empty) {
|
|
8389
8393
|
let i = Oo(this.doc, e, n, r);
|
|
8390
8394
|
return i && this.step(i), this;
|
|
8391
8395
|
}
|
|
@@ -8394,13 +8398,13 @@ class qy {
|
|
|
8394
8398
|
fragment, node, or array of nodes.
|
|
8395
8399
|
*/
|
|
8396
8400
|
replaceWith(e, n, r) {
|
|
8397
|
-
return this.replace(e, n, new
|
|
8401
|
+
return this.replace(e, n, new P(T.from(r), 0, 0));
|
|
8398
8402
|
}
|
|
8399
8403
|
/**
|
|
8400
8404
|
Delete the content between the given positions.
|
|
8401
8405
|
*/
|
|
8402
8406
|
delete(e, n) {
|
|
8403
|
-
return this.replace(e, n,
|
|
8407
|
+
return this.replace(e, n, P.empty);
|
|
8404
8408
|
}
|
|
8405
8409
|
/**
|
|
8406
8410
|
Insert the given content at the given position.
|
|
@@ -8623,14 +8627,14 @@ class ee {
|
|
|
8623
8627
|
Replace the selection with a slice or, if no slice is given,
|
|
8624
8628
|
delete the selection. Will append to the given transaction.
|
|
8625
8629
|
*/
|
|
8626
|
-
replace(e, n =
|
|
8630
|
+
replace(e, n = P.empty) {
|
|
8627
8631
|
let r = n.content.lastChild, i = null;
|
|
8628
8632
|
for (let l = 0; l < n.openEnd; l++)
|
|
8629
8633
|
i = r, r = r.lastChild;
|
|
8630
8634
|
let o = e.steps.length, s = this.ranges;
|
|
8631
8635
|
for (let l = 0; l < s.length; l++) {
|
|
8632
8636
|
let { $from: a, $to: c } = s[l], u = e.mapping.slice(o);
|
|
8633
|
-
e.replaceRange(u.map(a.pos), u.map(c.pos), l ?
|
|
8637
|
+
e.replaceRange(u.map(a.pos), u.map(c.pos), l ? P.empty : n), l == 0 && xa(e, o, (r ? r.isInline : i && i.isTextblock) ? -1 : 1);
|
|
8634
8638
|
}
|
|
8635
8639
|
}
|
|
8636
8640
|
/**
|
|
@@ -8756,8 +8760,8 @@ class G extends ee {
|
|
|
8756
8760
|
let i = e.resolve(n.map(this.anchor));
|
|
8757
8761
|
return new G(i.parent.inlineContent ? i : r, r);
|
|
8758
8762
|
}
|
|
8759
|
-
replace(e, n =
|
|
8760
|
-
if (super.replace(e, n), n ==
|
|
8763
|
+
replace(e, n = P.empty) {
|
|
8764
|
+
if (super.replace(e, n), n == P.empty) {
|
|
8761
8765
|
let r = this.$from.marksAcross(this.$to);
|
|
8762
8766
|
r && e.ensureMarks(r);
|
|
8763
8767
|
}
|
|
@@ -8832,7 +8836,7 @@ class H extends ee {
|
|
|
8832
8836
|
return r ? ee.near(o) : new H(o);
|
|
8833
8837
|
}
|
|
8834
8838
|
content() {
|
|
8835
|
-
return new
|
|
8839
|
+
return new P(T.from(this.node), 0, 0);
|
|
8836
8840
|
}
|
|
8837
8841
|
eq(e) {
|
|
8838
8842
|
return e instanceof H && e.anchor == this.anchor;
|
|
@@ -8887,8 +8891,8 @@ class Nt extends ee {
|
|
|
8887
8891
|
constructor(e) {
|
|
8888
8892
|
super(e.resolve(0), e.resolve(e.content.size));
|
|
8889
8893
|
}
|
|
8890
|
-
replace(e, n =
|
|
8891
|
-
if (n ==
|
|
8894
|
+
replace(e, n = P.empty) {
|
|
8895
|
+
if (n == P.empty) {
|
|
8892
8896
|
e.delete(0, e.doc.content.size);
|
|
8893
8897
|
let r = ee.atStart(e.doc);
|
|
8894
8898
|
r.eq(e.selection) || e.setSelection(r);
|
|
@@ -9327,7 +9331,7 @@ function Xu(t, e, n) {
|
|
|
9327
9331
|
}
|
|
9328
9332
|
return n;
|
|
9329
9333
|
}
|
|
9330
|
-
class
|
|
9334
|
+
class Ye {
|
|
9331
9335
|
/**
|
|
9332
9336
|
Create a plugin.
|
|
9333
9337
|
*/
|
|
@@ -9476,7 +9480,7 @@ function nv(t, e, n) {
|
|
|
9476
9480
|
}
|
|
9477
9481
|
const Ut = typeof navigator < "u" ? navigator : null, Ma = typeof document < "u" ? document : null, In = Ut && Ut.userAgent || "", Ds = /Edge\/(\d+)/.exec(In), ed = /MSIE \d/.exec(In), Is = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(In), nt = !!(ed || Is || Ds), kn = ed ? document.documentMode : Is ? +Is[1] : Ds ? +Ds[1] : 0, It = !nt && /gecko\/(\d+)/i.test(In);
|
|
9478
9482
|
It && +(/Firefox\/(\d+)/.exec(In) || [0, 0])[1];
|
|
9479
|
-
const Ps = !nt && /Chrome\/(\d+)/.exec(In),
|
|
9483
|
+
const Ps = !nt && /Chrome\/(\d+)/.exec(In), qe = !!Ps, rv = Ps ? +Ps[1] : 0, Ke = !nt && !!Ut && /Apple Computer/.test(Ut.vendor), Nr = Ke && (/Mobile\/\w+/.test(In) || !!Ut && Ut.maxTouchPoints > 2), bt = Nr || (Ut ? /Mac/.test(Ut.platform) : !1), iv = Ut ? /Win/.test(Ut.platform) : !1, Tt = /Android \d/.test(In), Oi = !!Ma && "webkitFontSmoothing" in Ma.documentElement.style, ov = Oi ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
9480
9484
|
function sv(t) {
|
|
9481
9485
|
let e = t.defaultView && t.defaultView.visualViewport;
|
|
9482
9486
|
return e ? {
|
|
@@ -9661,7 +9665,7 @@ function mv(t, e) {
|
|
|
9661
9665
|
if (!hl(e, c) || (s = id(t.dom, e, c), !s))
|
|
9662
9666
|
return null;
|
|
9663
9667
|
}
|
|
9664
|
-
if (
|
|
9668
|
+
if (Ke)
|
|
9665
9669
|
for (let c = s; r && c; c = ci(c))
|
|
9666
9670
|
c.draggable && (r = void 0);
|
|
9667
9671
|
if (s = fv(s, e), r) {
|
|
@@ -10063,7 +10067,7 @@ class Ci {
|
|
|
10063
10067
|
h = g;
|
|
10064
10068
|
}
|
|
10065
10069
|
let l = this.domFromPos(e, e ? -1 : 1), a = n == e ? l : this.domFromPos(n, n ? -1 : 1), c = r.getSelection(), u = !1;
|
|
10066
|
-
if ((It ||
|
|
10070
|
+
if ((It || Ke) && e == n) {
|
|
10067
10071
|
let { node: f, offset: h } = l;
|
|
10068
10072
|
if (f.nodeType == 3) {
|
|
10069
10073
|
if (u = !!(h && f.nodeValue[h - 1] == `
|
|
@@ -10086,7 +10090,7 @@ class Ci {
|
|
|
10086
10090
|
let f = c.focusNode.childNodes[c.focusOffset];
|
|
10087
10091
|
f && f.contentEditable == "false" && (i = !0);
|
|
10088
10092
|
}
|
|
10089
|
-
if (!(i || u &&
|
|
10093
|
+
if (!(i || u && Ke) && er(l.node, l.offset, c.anchorNode, c.anchorOffset) && er(a.node, a.offset, c.focusNode, c.focusOffset))
|
|
10090
10094
|
return;
|
|
10091
10095
|
let d = !1;
|
|
10092
10096
|
if ((c.extend || e == n) && !u) {
|
|
@@ -10681,7 +10685,7 @@ class Ov {
|
|
|
10681
10685
|
for (; e instanceof tr; )
|
|
10682
10686
|
n = e, e = n.children[n.children.length - 1];
|
|
10683
10687
|
(!e || // Empty textblock
|
|
10684
|
-
!(e instanceof To) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((
|
|
10688
|
+
!(e instanceof To) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((Ke || qe) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", n), this.addHackNode("BR", this.top));
|
|
10685
10689
|
}
|
|
10686
10690
|
addHackNode(e, n) {
|
|
10687
10691
|
if (n == this.top && this.index < n.children.length && n.children[this.index].matchesHack(e))
|
|
@@ -10848,7 +10852,7 @@ function fd(t) {
|
|
|
10848
10852
|
function ln(t, e = !1) {
|
|
10849
10853
|
let n = t.state.selection;
|
|
10850
10854
|
if (hd(t, n), !!fd(t)) {
|
|
10851
|
-
if (!e && t.input.mouseDown && t.input.mouseDown.allowDefault &&
|
|
10855
|
+
if (!e && t.input.mouseDown && t.input.mouseDown.allowDefault && qe) {
|
|
10852
10856
|
let r = t.domSelectionRange(), i = t.domObserver.currentSelection;
|
|
10853
10857
|
if (r.anchorNode && i.anchorNode && er(r.anchorNode, r.anchorOffset, i.anchorNode, i.anchorOffset)) {
|
|
10854
10858
|
t.input.mouseDown.delayedSelectionSync = !0, t.domObserver.setCurSelection();
|
|
@@ -10864,10 +10868,10 @@ function ln(t, e = !1) {
|
|
|
10864
10868
|
t.domObserver.setCurSelection(), t.domObserver.connectSelection();
|
|
10865
10869
|
}
|
|
10866
10870
|
}
|
|
10867
|
-
const $a =
|
|
10871
|
+
const $a = Ke || qe && rv < 63;
|
|
10868
10872
|
function Va(t, e) {
|
|
10869
10873
|
let { node: n, offset: r } = t.docView.domFromPos(e, 0), i = r < n.childNodes.length ? n.childNodes[r] : null, o = r ? n.childNodes[r - 1] : null;
|
|
10870
|
-
if (
|
|
10874
|
+
if (Ke && i && i.contentEditable == "false")
|
|
10871
10875
|
return Qo(i);
|
|
10872
10876
|
if ((!i || i.contentEditable == "false") && (!o || o.contentEditable == "false")) {
|
|
10873
10877
|
if (i)
|
|
@@ -10877,7 +10881,7 @@ function Va(t, e) {
|
|
|
10877
10881
|
}
|
|
10878
10882
|
}
|
|
10879
10883
|
function Qo(t) {
|
|
10880
|
-
return t.contentEditable = "true",
|
|
10884
|
+
return t.contentEditable = "true", Ke && t.draggable && (t.draggable = !1, t.wasDraggable = !0), t;
|
|
10881
10885
|
}
|
|
10882
10886
|
function Ba(t) {
|
|
10883
10887
|
t.contentEditable = "false", t.wasDraggable && (t.draggable = !0, t.wasDraggable = null);
|
|
@@ -11089,7 +11093,7 @@ function Ls(t, e, n) {
|
|
|
11089
11093
|
}
|
|
11090
11094
|
function _a(t, e) {
|
|
11091
11095
|
let n = t.state.doc.resolve(e);
|
|
11092
|
-
if (!(
|
|
11096
|
+
if (!(qe || iv) && n.parent.inlineContent) {
|
|
11093
11097
|
let i = t.coordsAtPos(e);
|
|
11094
11098
|
if (e > n.start()) {
|
|
11095
11099
|
let o = t.coordsAtPos(e - 1), s = (o.top + o.bottom) / 2;
|
|
@@ -11141,7 +11145,7 @@ function Wa(t, e, n) {
|
|
|
11141
11145
|
t.domObserver.stop(), e.contentEditable = n, t.domObserver.start();
|
|
11142
11146
|
}
|
|
11143
11147
|
function Bv(t) {
|
|
11144
|
-
if (!
|
|
11148
|
+
if (!Ke || t.state.selection.$head.parentOffset > 0)
|
|
11145
11149
|
return !1;
|
|
11146
11150
|
let { focusNode: e, focusOffset: n } = t.domSelectionRange();
|
|
11147
11151
|
if (e && e.nodeType == 1 && n == 0 && e.firstChild && e.firstChild.contentEditable == "false") {
|
|
@@ -11215,8 +11219,8 @@ function yd(t, e, n, r, i) {
|
|
|
11215
11219
|
if (t.someProp("transformPastedText", (f) => {
|
|
11216
11220
|
e = f(e, o || r, t);
|
|
11217
11221
|
}), o)
|
|
11218
|
-
return e ? new
|
|
11219
|
-
`))), 0, 0) :
|
|
11222
|
+
return e ? new P(T.from(t.state.schema.text(e.replace(/\r\n?/g, `
|
|
11223
|
+
`))), 0, 0) : P.empty;
|
|
11220
11224
|
let d = t.someProp("clipboardTextParser", (f) => f(e, i, r, t));
|
|
11221
11225
|
if (d)
|
|
11222
11226
|
l = d;
|
|
@@ -11249,7 +11253,7 @@ function yd(t, e, n, r, i) {
|
|
|
11249
11253
|
}
|
|
11250
11254
|
})), u)
|
|
11251
11255
|
l = Wv(qa(l, +u[1], +u[2]), u[4]);
|
|
11252
|
-
else if (l =
|
|
11256
|
+
else if (l = P.maxOpen(_v(l.content, i), !0), l.openStart || l.openEnd) {
|
|
11253
11257
|
let d = 0, f = 0;
|
|
11254
11258
|
for (let h = l.content.firstChild; d < l.openStart && !h.type.spec.isolating; d++, h = h.firstChild)
|
|
11255
11259
|
;
|
|
@@ -11310,7 +11314,7 @@ function zs(t, e, n, r, i, o) {
|
|
|
11310
11314
|
return t.childCount > 1 && (o = 0), i < r - 1 && (l = zs(l, e, n, r, i + 1, o)), i >= n && (l = e < 0 ? s.contentMatchAt(0).fillBefore(l, o <= i).append(l) : l.append(s.contentMatchAt(s.childCount).fillBefore(T.empty, !0))), t.replaceChild(e < 0 ? 0 : t.childCount - 1, s.copy(l));
|
|
11311
11315
|
}
|
|
11312
11316
|
function qa(t, e, n) {
|
|
11313
|
-
return e < t.openStart && (t = new
|
|
11317
|
+
return e < t.openStart && (t = new P(zs(t.content, -1, e, t.openStart, 0, t.openEnd), e, t.openEnd)), n < t.openEnd && (t = new P(zs(t.content, 1, n, t.openEnd, 0, 0), t.openStart, n)), t;
|
|
11314
11318
|
}
|
|
11315
11319
|
const xd = {
|
|
11316
11320
|
thead: ["table"],
|
|
@@ -11337,7 +11341,7 @@ function jv(t) {
|
|
|
11337
11341
|
return n;
|
|
11338
11342
|
}
|
|
11339
11343
|
function Hv(t) {
|
|
11340
|
-
let e = t.querySelectorAll(
|
|
11344
|
+
let e = t.querySelectorAll(qe ? "span:not([class]):not([style])" : "span.Apple-converted-space");
|
|
11341
11345
|
for (let n = 0; n < e.length; n++) {
|
|
11342
11346
|
let r = e[n];
|
|
11343
11347
|
r.childNodes.length == 1 && r.textContent == " " && r.parentNode && r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "), r);
|
|
@@ -11359,22 +11363,22 @@ function Wv(t, e) {
|
|
|
11359
11363
|
break;
|
|
11360
11364
|
i = T.from(a.create(r[l + 1], i)), o++, s++;
|
|
11361
11365
|
}
|
|
11362
|
-
return new
|
|
11366
|
+
return new P(i, o, s);
|
|
11363
11367
|
}
|
|
11364
|
-
const
|
|
11368
|
+
const Je = {}, Ge = {}, qv = { touchstart: !0, touchmove: !0 };
|
|
11365
11369
|
class Uv {
|
|
11366
11370
|
constructor() {
|
|
11367
11371
|
this.shiftKey = !1, this.mouseDown = null, this.lastKeyCode = null, this.lastKeyCodeTime = 0, this.lastClick = { time: 0, x: 0, y: 0, type: "" }, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastIOSEnter = 0, this.lastIOSEnterFallbackTimeout = -1, this.lastFocus = 0, this.lastTouch = 0, this.lastAndroidDelete = 0, this.composing = !1, this.compositionNode = null, this.composingTimeout = -1, this.compositionNodes = [], this.compositionEndedAt = -2e8, this.compositionID = 1, this.compositionPendingChanges = 0, this.domChangeCount = 0, this.eventHandlers = /* @__PURE__ */ Object.create(null), this.hideSelectionGuard = null;
|
|
11368
11372
|
}
|
|
11369
11373
|
}
|
|
11370
11374
|
function Kv(t) {
|
|
11371
|
-
for (let e in
|
|
11372
|
-
let n =
|
|
11375
|
+
for (let e in Je) {
|
|
11376
|
+
let n = Je[e];
|
|
11373
11377
|
t.dom.addEventListener(e, t.input.eventHandlers[e] = (r) => {
|
|
11374
|
-
Gv(t, r) && !gl(t, r) && (t.editable || !(r.type in
|
|
11378
|
+
Gv(t, r) && !gl(t, r) && (t.editable || !(r.type in Ge)) && n(t, r);
|
|
11375
11379
|
}, qv[e] ? { passive: !0 } : void 0);
|
|
11376
11380
|
}
|
|
11377
|
-
|
|
11381
|
+
Ke && t.dom.addEventListener("input", () => null), Fs(t);
|
|
11378
11382
|
}
|
|
11379
11383
|
function xn(t, e) {
|
|
11380
11384
|
t.input.lastSelectionOrigin = e, t.input.lastSelectionTime = Date.now();
|
|
@@ -11408,11 +11412,11 @@ function Gv(t, e) {
|
|
|
11408
11412
|
return !0;
|
|
11409
11413
|
}
|
|
11410
11414
|
function Yv(t, e) {
|
|
11411
|
-
!gl(t, e) &&
|
|
11415
|
+
!gl(t, e) && Je[e.type] && (t.editable || !(e.type in Ge)) && Je[e.type](t, e);
|
|
11412
11416
|
}
|
|
11413
|
-
|
|
11417
|
+
Ge.keydown = (t, e) => {
|
|
11414
11418
|
let n = e;
|
|
11415
|
-
if (t.input.shiftKey = n.keyCode == 16 || n.shiftKey, !Od(t, n) && (t.input.lastKeyCode = n.keyCode, t.input.lastKeyCodeTime = Date.now(), !(Tt &&
|
|
11419
|
+
if (t.input.shiftKey = n.keyCode == 16 || n.shiftKey, !Od(t, n) && (t.input.lastKeyCode = n.keyCode, t.input.lastKeyCodeTime = Date.now(), !(Tt && qe && n.keyCode == 13)))
|
|
11416
11420
|
if (n.keyCode != 229 && t.domObserver.forceFlush(), Nr && n.keyCode == 13 && !n.ctrlKey && !n.altKey && !n.metaKey) {
|
|
11417
11421
|
let r = Date.now();
|
|
11418
11422
|
t.input.lastIOSEnter = r, t.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
@@ -11421,10 +11425,10 @@ Je.keydown = (t, e) => {
|
|
|
11421
11425
|
} else
|
|
11422
11426
|
t.someProp("handleKeyDown", (r) => r(t, n)) || zv(t, n) ? n.preventDefault() : xn(t, "key");
|
|
11423
11427
|
};
|
|
11424
|
-
|
|
11428
|
+
Ge.keyup = (t, e) => {
|
|
11425
11429
|
e.keyCode == 16 && (t.input.shiftKey = !1);
|
|
11426
11430
|
};
|
|
11427
|
-
|
|
11431
|
+
Ge.keypress = (t, e) => {
|
|
11428
11432
|
let n = e;
|
|
11429
11433
|
if (Od(t, n) || !n.charCode || n.ctrlKey && !n.altKey || bt && n.metaKey)
|
|
11430
11434
|
return;
|
|
@@ -11511,7 +11515,7 @@ function vl(t) {
|
|
|
11511
11515
|
return so(t);
|
|
11512
11516
|
}
|
|
11513
11517
|
const Sd = bt ? "metaKey" : "ctrlKey";
|
|
11514
|
-
|
|
11518
|
+
Je.mousedown = (t, e) => {
|
|
11515
11519
|
let n = e;
|
|
11516
11520
|
t.input.shiftKey = n.shiftKey;
|
|
11517
11521
|
let r = vl(t), i = Date.now(), o = "singleClick";
|
|
@@ -11549,14 +11553,14 @@ class ib {
|
|
|
11549
11553
|
return;
|
|
11550
11554
|
let n = this.pos;
|
|
11551
11555
|
this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(Eo(e))), this.updateAllowDefault(e), this.allowDefault || !n ? xn(this.view, "pointer") : eb(this.view, n.pos, n.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
|
|
11552
|
-
|
|
11556
|
+
Ke && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
|
|
11553
11557
|
// cursor, but still report that the node is selected
|
|
11554
11558
|
// when asked through getSelection. You'll then get a
|
|
11555
11559
|
// situation where clicking at the point where that
|
|
11556
11560
|
// (hidden) cursor is doesn't change the selection, and
|
|
11557
11561
|
// thus doesn't get a reaction from ProseMirror. This
|
|
11558
11562
|
// works around that.
|
|
11559
|
-
|
|
11563
|
+
qe && !this.view.state.selection.visible && Math.min(Math.abs(n.pos - this.view.state.selection.from), Math.abs(n.pos - this.view.state.selection.to)) <= 2) ? (Or(this.view, ee.near(this.view.state.doc.resolve(n.pos))), e.preventDefault()) : xn(this.view, "pointer");
|
|
11560
11564
|
}
|
|
11561
11565
|
move(e) {
|
|
11562
11566
|
this.updateAllowDefault(e), xn(this.view, "pointer"), e.buttons == 0 && this.done();
|
|
@@ -11565,18 +11569,18 @@ class ib {
|
|
|
11565
11569
|
!this.allowDefault && (Math.abs(this.event.x - e.clientX) > 4 || Math.abs(this.event.y - e.clientY) > 4) && (this.allowDefault = !0);
|
|
11566
11570
|
}
|
|
11567
11571
|
}
|
|
11568
|
-
|
|
11572
|
+
Je.touchstart = (t) => {
|
|
11569
11573
|
t.input.lastTouch = Date.now(), vl(t), xn(t, "pointer");
|
|
11570
11574
|
};
|
|
11571
|
-
|
|
11575
|
+
Je.touchmove = (t) => {
|
|
11572
11576
|
t.input.lastTouch = Date.now(), xn(t, "pointer");
|
|
11573
11577
|
};
|
|
11574
|
-
|
|
11578
|
+
Je.contextmenu = (t) => vl(t);
|
|
11575
11579
|
function Od(t, e) {
|
|
11576
|
-
return t.composing ? !0 :
|
|
11580
|
+
return t.composing ? !0 : Ke && Math.abs(e.timeStamp - t.input.compositionEndedAt) < 500 ? (t.input.compositionEndedAt = -2e8, !0) : !1;
|
|
11577
11581
|
}
|
|
11578
11582
|
const ob = Tt ? 5e3 : -1;
|
|
11579
|
-
|
|
11583
|
+
Ge.compositionstart = Ge.compositionupdate = (t) => {
|
|
11580
11584
|
if (!t.composing) {
|
|
11581
11585
|
t.domObserver.flush();
|
|
11582
11586
|
let { state: e } = t, n = e.selection.$from;
|
|
@@ -11599,7 +11603,7 @@ Je.compositionstart = Je.compositionupdate = (t) => {
|
|
|
11599
11603
|
}
|
|
11600
11604
|
Cd(t, ob);
|
|
11601
11605
|
};
|
|
11602
|
-
|
|
11606
|
+
Ge.compositionend = (t, e) => {
|
|
11603
11607
|
t.composing && (t.input.composing = !1, t.input.compositionEndedAt = e.timeStamp, t.input.compositionPendingChanges = t.domObserver.pendingRecords().length ? t.input.compositionID : 0, t.input.compositionNode = null, t.input.compositionPendingChanges && Promise.resolve().then(() => t.domObserver.flush()), t.input.compositionID++, Cd(t, 20));
|
|
11604
11608
|
};
|
|
11605
11609
|
function Cd(t, e) {
|
|
@@ -11652,7 +11656,7 @@ function ab(t, e) {
|
|
|
11652
11656
|
}, 50);
|
|
11653
11657
|
}
|
|
11654
11658
|
const ui = nt && kn < 15 || Nr && ov < 604;
|
|
11655
|
-
|
|
11659
|
+
Je.copy = Ge.cut = (t, e) => {
|
|
11656
11660
|
let n = e, r = t.state.selection, i = n.type == "cut";
|
|
11657
11661
|
if (r.empty)
|
|
11658
11662
|
return;
|
|
@@ -11674,7 +11678,7 @@ function ub(t, e) {
|
|
|
11674
11678
|
}
|
|
11675
11679
|
function di(t, e, n, r, i) {
|
|
11676
11680
|
let o = yd(t, e, n, r, t.state.selection.$from);
|
|
11677
|
-
if (t.someProp("handlePaste", (a) => a(t, i, o ||
|
|
11681
|
+
if (t.someProp("handlePaste", (a) => a(t, i, o || P.empty)))
|
|
11678
11682
|
return !0;
|
|
11679
11683
|
if (!o)
|
|
11680
11684
|
return !1;
|
|
@@ -11688,7 +11692,7 @@ function Td(t) {
|
|
|
11688
11692
|
let n = t.getData("text/uri-list");
|
|
11689
11693
|
return n ? n.replace(/\r?\n/g, " ") : "";
|
|
11690
11694
|
}
|
|
11691
|
-
|
|
11695
|
+
Ge.paste = (t, e) => {
|
|
11692
11696
|
let n = e;
|
|
11693
11697
|
if (t.composing && !Tt)
|
|
11694
11698
|
return;
|
|
@@ -11701,7 +11705,7 @@ class Ed {
|
|
|
11701
11705
|
}
|
|
11702
11706
|
}
|
|
11703
11707
|
const Ad = bt ? "altKey" : "ctrlKey";
|
|
11704
|
-
|
|
11708
|
+
Je.dragstart = (t, e) => {
|
|
11705
11709
|
let n = e, r = t.input.mouseDown;
|
|
11706
11710
|
if (r && r.done(), !n.dataTransfer)
|
|
11707
11711
|
return;
|
|
@@ -11717,14 +11721,14 @@ Ke.dragstart = (t, e) => {
|
|
|
11717
11721
|
let l = (s || t.state.selection).content(), { dom: a, text: c, slice: u } = gd(t, l);
|
|
11718
11722
|
n.dataTransfer.clearData(), n.dataTransfer.setData(ui ? "Text" : "text/html", a.innerHTML), n.dataTransfer.effectAllowed = "copyMove", ui || n.dataTransfer.setData("text/plain", c), t.dragging = new Ed(u, !n[Ad], s);
|
|
11719
11723
|
};
|
|
11720
|
-
|
|
11724
|
+
Je.dragend = (t) => {
|
|
11721
11725
|
let e = t.dragging;
|
|
11722
11726
|
window.setTimeout(() => {
|
|
11723
11727
|
t.dragging == e && (t.dragging = null);
|
|
11724
11728
|
}, 50);
|
|
11725
11729
|
};
|
|
11726
|
-
|
|
11727
|
-
|
|
11730
|
+
Ge.dragover = Ge.dragenter = (t, e) => e.preventDefault();
|
|
11731
|
+
Ge.drop = (t, e) => {
|
|
11728
11732
|
let n = e, r = t.dragging;
|
|
11729
11733
|
if (t.dragging = null, !n.dataTransfer)
|
|
11730
11734
|
return;
|
|
@@ -11736,7 +11740,7 @@ Je.drop = (t, e) => {
|
|
|
11736
11740
|
s = p(s, t);
|
|
11737
11741
|
}) : s = yd(t, Td(n.dataTransfer), ui ? null : n.dataTransfer.getData("text/html"), !1, o);
|
|
11738
11742
|
let l = !!(r && !n[Ad]);
|
|
11739
|
-
if (t.someProp("handleDrop", (p) => p(t, n, s ||
|
|
11743
|
+
if (t.someProp("handleDrop", (p) => p(t, n, s || P.empty, l))) {
|
|
11740
11744
|
n.preventDefault();
|
|
11741
11745
|
return;
|
|
11742
11746
|
}
|
|
@@ -11758,21 +11762,21 @@ Je.drop = (t, e) => {
|
|
|
11758
11762
|
c.setSelection(new H(h));
|
|
11759
11763
|
else {
|
|
11760
11764
|
let p = c.mapping.map(a);
|
|
11761
|
-
c.mapping.maps[c.mapping.maps.length - 1].forEach((g, m, v,
|
|
11765
|
+
c.mapping.maps[c.mapping.maps.length - 1].forEach((g, m, v, x) => p = x), c.setSelection(ml(t, h, c.doc.resolve(p)));
|
|
11762
11766
|
}
|
|
11763
11767
|
t.focus(), t.dispatch(c.setMeta("uiEvent", "drop"));
|
|
11764
11768
|
};
|
|
11765
|
-
|
|
11769
|
+
Je.focus = (t) => {
|
|
11766
11770
|
t.input.lastFocus = Date.now(), t.focused || (t.domObserver.stop(), t.dom.classList.add("ProseMirror-focused"), t.domObserver.start(), t.focused = !0, setTimeout(() => {
|
|
11767
11771
|
t.docView && t.hasFocus() && !t.domObserver.currentSelection.eq(t.domSelectionRange()) && ln(t);
|
|
11768
11772
|
}, 20));
|
|
11769
11773
|
};
|
|
11770
|
-
|
|
11774
|
+
Je.blur = (t, e) => {
|
|
11771
11775
|
let n = e;
|
|
11772
11776
|
t.focused && (t.domObserver.stop(), t.dom.classList.remove("ProseMirror-focused"), t.domObserver.start(), n.relatedTarget && t.dom.contains(n.relatedTarget) && t.domObserver.currentSelection.clear(), t.focused = !1);
|
|
11773
11777
|
};
|
|
11774
|
-
|
|
11775
|
-
if (
|
|
11778
|
+
Je.beforeinput = (t, e) => {
|
|
11779
|
+
if (qe && Tt && e.inputType == "deleteContentBackward") {
|
|
11776
11780
|
t.domObserver.flushSoon();
|
|
11777
11781
|
let { domChangeCount: r } = t.input;
|
|
11778
11782
|
setTimeout(() => {
|
|
@@ -11783,8 +11787,8 @@ Ke.beforeinput = (t, e) => {
|
|
|
11783
11787
|
}, 50);
|
|
11784
11788
|
}
|
|
11785
11789
|
};
|
|
11786
|
-
for (let t in
|
|
11787
|
-
|
|
11790
|
+
for (let t in Ge)
|
|
11791
|
+
Je[t] = Ge[t];
|
|
11788
11792
|
function fi(t, e) {
|
|
11789
11793
|
if (t == e)
|
|
11790
11794
|
return !0;
|
|
@@ -12159,11 +12163,11 @@ function db(t, e, n, r, i, o, s) {
|
|
|
12159
12163
|
n.maps[c].forEach((f, h, p, g) => {
|
|
12160
12164
|
let m = g - p - (h - f);
|
|
12161
12165
|
for (let v = 0; v < l.length; v += 3) {
|
|
12162
|
-
let
|
|
12163
|
-
if (
|
|
12166
|
+
let x = l[v + 1];
|
|
12167
|
+
if (x < 0 || f > x + u - d)
|
|
12164
12168
|
continue;
|
|
12165
|
-
let
|
|
12166
|
-
h >=
|
|
12169
|
+
let O = l[v] + u - d;
|
|
12170
|
+
h >= O ? l[v + 1] = f <= O ? -2 : -1 : f >= u && m && (l[v] += m, l[v + 1] += m);
|
|
12167
12171
|
}
|
|
12168
12172
|
d += m;
|
|
12169
12173
|
}), u = n.maps[c].map(u, -1);
|
|
@@ -12485,14 +12489,14 @@ function bb(t, e) {
|
|
|
12485
12489
|
}
|
|
12486
12490
|
function wb(t, e, n) {
|
|
12487
12491
|
let { node: r, fromOffset: i, toOffset: o, from: s, to: l } = t.docView.parseRange(e, n), a = t.domSelectionRange(), c, u = a.anchorNode;
|
|
12488
|
-
if (u && t.dom.contains(u.nodeType == 1 ? u : u.parentNode) && (c = [{ node: u, offset: a.anchorOffset }], Mo(a) || c.push({ node: a.focusNode, offset: a.focusOffset })),
|
|
12492
|
+
if (u && t.dom.contains(u.nodeType == 1 ? u : u.parentNode) && (c = [{ node: u, offset: a.anchorOffset }], Mo(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), qe && t.input.lastKeyCode === 8)
|
|
12489
12493
|
for (let m = o; m > i; m--) {
|
|
12490
|
-
let v = r.childNodes[m - 1],
|
|
12491
|
-
if (v.nodeName == "BR" && !
|
|
12494
|
+
let v = r.childNodes[m - 1], x = v.pmViewDesc;
|
|
12495
|
+
if (v.nodeName == "BR" && !x) {
|
|
12492
12496
|
o = m;
|
|
12493
12497
|
break;
|
|
12494
12498
|
}
|
|
12495
|
-
if (!
|
|
12499
|
+
if (!x || x.size)
|
|
12496
12500
|
break;
|
|
12497
12501
|
}
|
|
12498
12502
|
let d = t.state.doc, f = t.someProp("domParser") || Tr.fromSchema(t.state.schema), h = d.resolve(s), p = null, g = f.parse(r, {
|
|
@@ -12517,10 +12521,10 @@ function xb(t) {
|
|
|
12517
12521
|
if (e)
|
|
12518
12522
|
return e.parseRule();
|
|
12519
12523
|
if (t.nodeName == "BR" && t.parentNode) {
|
|
12520
|
-
if (
|
|
12524
|
+
if (Ke && /^(ul|ol)$/i.test(t.parentNode.nodeName)) {
|
|
12521
12525
|
let n = document.createElement("div");
|
|
12522
12526
|
return n.appendChild(document.createElement("li")), { skip: n };
|
|
12523
|
-
} else if (t.parentNode.lastChild == t ||
|
|
12527
|
+
} else if (t.parentNode.lastChild == t || Ke && /^(tr|table)$/i.test(t.parentNode.nodeName))
|
|
12524
12528
|
return { ignore: !0 };
|
|
12525
12529
|
} else if (t.nodeName == "IMG" && t.getAttribute("mark-placeholder"))
|
|
12526
12530
|
return { ignore: !0 };
|
|
@@ -12530,12 +12534,12 @@ const kb = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|df
|
|
|
12530
12534
|
function Sb(t, e, n, r, i) {
|
|
12531
12535
|
let o = t.input.compositionPendingChanges || (t.composing ? t.input.compositionID : 0);
|
|
12532
12536
|
if (t.input.compositionPendingChanges = 0, e < 0) {
|
|
12533
|
-
let
|
|
12534
|
-
if (
|
|
12535
|
-
if (
|
|
12537
|
+
let N = t.input.lastSelectionTime > Date.now() - 50 ? t.input.lastSelectionOrigin : null, L = pl(t, N);
|
|
12538
|
+
if (L && !t.state.selection.eq(L)) {
|
|
12539
|
+
if (qe && Tt && t.input.lastKeyCode === 13 && Date.now() - 100 < t.input.lastKeyCodeTime && t.someProp("handleKeyDown", (J) => J(t, Fn(13, "Enter"))))
|
|
12536
12540
|
return;
|
|
12537
|
-
let Z = t.state.tr.setSelection(
|
|
12538
|
-
|
|
12541
|
+
let Z = t.state.tr.setSelection(L);
|
|
12542
|
+
N == "pointer" ? Z.setMeta("pointer", !0) : N == "key" && Z.scrollIntoView(), o && Z.setMeta("composition", o), t.dispatch(Z);
|
|
12539
12543
|
}
|
|
12540
12544
|
return;
|
|
12541
12545
|
}
|
|
@@ -12544,7 +12548,7 @@ function Sb(t, e, n, r, i) {
|
|
|
12544
12548
|
let a = t.state.selection, c = wb(t, e, n), u = t.state.doc, d = u.slice(c.from, c.to), f, h;
|
|
12545
12549
|
t.input.lastKeyCode === 8 && Date.now() - 100 < t.input.lastKeyCodeTime ? (f = t.state.selection.to, h = "end") : (f = t.state.selection.from, h = "start"), t.input.lastKeyCode = null;
|
|
12546
12550
|
let p = Mb(d.content, c.doc.content, c.from, f, h);
|
|
12547
|
-
if ((Nr && t.input.lastIOSEnter > Date.now() - 225 || Tt) && i.some((
|
|
12551
|
+
if ((Nr && t.input.lastIOSEnter > Date.now() - 225 || Tt) && i.some((N) => N.nodeType == 1 && !kb.test(N.nodeName)) && (!p || p.endA >= p.endB) && t.someProp("handleKeyDown", (N) => N(t, Fn(13, "Enter")))) {
|
|
12548
12552
|
t.input.lastIOSEnter = 0;
|
|
12549
12553
|
return;
|
|
12550
12554
|
}
|
|
@@ -12553,50 +12557,50 @@ function Sb(t, e, n, r, i) {
|
|
|
12553
12557
|
p = { start: a.from, endA: a.to, endB: a.to };
|
|
12554
12558
|
else {
|
|
12555
12559
|
if (c.sel) {
|
|
12556
|
-
let
|
|
12557
|
-
if (
|
|
12558
|
-
let
|
|
12559
|
-
o &&
|
|
12560
|
+
let N = Za(t, t.state.doc, c.sel);
|
|
12561
|
+
if (N && !N.eq(t.state.selection)) {
|
|
12562
|
+
let L = t.state.tr.setSelection(N);
|
|
12563
|
+
o && L.setMeta("composition", o), t.dispatch(L);
|
|
12560
12564
|
}
|
|
12561
12565
|
}
|
|
12562
12566
|
return;
|
|
12563
12567
|
}
|
|
12564
12568
|
t.input.domChangeCount++, t.state.selection.from < t.state.selection.to && p.start == p.endB && t.state.selection instanceof G && (p.start > t.state.selection.from && p.start <= t.state.selection.from + 2 && t.state.selection.from >= c.from ? p.start = t.state.selection.from : p.endA < t.state.selection.to && p.endA >= t.state.selection.to - 2 && t.state.selection.to <= c.to && (p.endB += t.state.selection.to - p.endA, p.endA = t.state.selection.to)), nt && kn <= 11 && p.endB == p.start + 1 && p.endA == p.start && p.start > c.from && c.doc.textBetween(p.start - c.from - 1, p.start - c.from + 1) == " " && (p.start--, p.endA--, p.endB--);
|
|
12565
|
-
let g = c.doc.resolveNoCache(p.start - c.from), m = c.doc.resolveNoCache(p.endB - c.from), v = u.resolve(p.start),
|
|
12566
|
-
if ((Nr && t.input.lastIOSEnter > Date.now() - 225 && (!
|
|
12569
|
+
let g = c.doc.resolveNoCache(p.start - c.from), m = c.doc.resolveNoCache(p.endB - c.from), v = u.resolve(p.start), x = g.sameParent(m) && g.parent.inlineContent && v.end() >= p.endA, O;
|
|
12570
|
+
if ((Nr && t.input.lastIOSEnter > Date.now() - 225 && (!x || i.some((N) => N.nodeName == "DIV" || N.nodeName == "P")) || !x && g.pos < c.doc.content.size && !g.sameParent(m) && (O = ee.findFrom(c.doc.resolve(g.pos + 1), 1, !0)) && O.head == m.pos) && t.someProp("handleKeyDown", (N) => N(t, Fn(13, "Enter")))) {
|
|
12567
12571
|
t.input.lastIOSEnter = 0;
|
|
12568
12572
|
return;
|
|
12569
12573
|
}
|
|
12570
|
-
if (t.state.selection.anchor > p.start && Cb(u, p.start, p.endA, g, m) && t.someProp("handleKeyDown", (
|
|
12571
|
-
Tt &&
|
|
12574
|
+
if (t.state.selection.anchor > p.start && Cb(u, p.start, p.endA, g, m) && t.someProp("handleKeyDown", (N) => N(t, Fn(8, "Backspace")))) {
|
|
12575
|
+
Tt && qe && t.domObserver.suppressSelectionUpdates();
|
|
12572
12576
|
return;
|
|
12573
12577
|
}
|
|
12574
|
-
|
|
12575
|
-
t.someProp("handleKeyDown", function(
|
|
12576
|
-
return
|
|
12578
|
+
qe && Tt && p.endB == p.start && (t.input.lastAndroidDelete = Date.now()), Tt && !x && g.start() != m.start() && m.parentOffset == 0 && g.depth == m.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == p.endA && (p.endB -= 2, m = c.doc.resolveNoCache(p.endB - c.from), setTimeout(() => {
|
|
12579
|
+
t.someProp("handleKeyDown", function(N) {
|
|
12580
|
+
return N(t, Fn(13, "Enter"));
|
|
12577
12581
|
});
|
|
12578
12582
|
}, 20));
|
|
12579
|
-
let y = p.start,
|
|
12580
|
-
if (
|
|
12583
|
+
let y = p.start, M = p.endA, b, E, R;
|
|
12584
|
+
if (x) {
|
|
12581
12585
|
if (g.pos == m.pos)
|
|
12582
|
-
nt && kn <= 11 && g.parentOffset == 0 && (t.domObserver.suppressSelectionUpdates(), setTimeout(() => ln(t), 20)),
|
|
12586
|
+
nt && kn <= 11 && g.parentOffset == 0 && (t.domObserver.suppressSelectionUpdates(), setTimeout(() => ln(t), 20)), b = t.state.tr.delete(y, M), E = u.resolve(p.start).marksAcross(u.resolve(p.endA));
|
|
12583
12587
|
else if (
|
|
12584
12588
|
// Adding or removing a mark
|
|
12585
|
-
p.endA == p.endB && (
|
|
12589
|
+
p.endA == p.endB && (R = Ob(g.parent.content.cut(g.parentOffset, m.parentOffset), v.parent.content.cut(v.parentOffset, p.endA - v.start())))
|
|
12586
12590
|
)
|
|
12587
|
-
|
|
12591
|
+
b = t.state.tr, R.type == "add" ? b.addMark(y, M, R.mark) : b.removeMark(y, M, R.mark);
|
|
12588
12592
|
else if (g.parent.child(g.index()).isText && g.index() == m.index() - (m.textOffset ? 0 : 1)) {
|
|
12589
|
-
let
|
|
12590
|
-
if (t.someProp("handleTextInput", (
|
|
12593
|
+
let N = g.parent.textBetween(g.parentOffset, m.parentOffset);
|
|
12594
|
+
if (t.someProp("handleTextInput", (L) => L(t, y, M, N)))
|
|
12591
12595
|
return;
|
|
12592
|
-
|
|
12596
|
+
b = t.state.tr.insertText(N, y, M);
|
|
12593
12597
|
}
|
|
12594
12598
|
}
|
|
12595
|
-
if (
|
|
12596
|
-
let
|
|
12597
|
-
|
|
12599
|
+
if (b || (b = t.state.tr.replace(y, M, c.doc.slice(p.start - c.from, p.endB - c.from))), c.sel) {
|
|
12600
|
+
let N = Za(t, b.doc, c.sel);
|
|
12601
|
+
N && !(qe && Tt && t.composing && N.empty && (p.start != p.endB || t.input.lastAndroidDelete < Date.now() - 100) && (N.head == y || N.head == b.mapping.map(M) - 1) || nt && N.empty && N.head == y) && b.setSelection(N);
|
|
12598
12602
|
}
|
|
12599
|
-
|
|
12603
|
+
E && b.ensureMarks(E), o && b.setMeta("composition", o), t.dispatch(b.scrollIntoView());
|
|
12600
12604
|
}
|
|
12601
12605
|
function Za(t, e, n) {
|
|
12602
12606
|
return Math.max(n.anchor, n.head) > e.content.size ? null : ml(t, e.resolve(n.anchor), e.resolve(n.head));
|
|
@@ -12748,9 +12752,9 @@ class Tb {
|
|
|
12748
12752
|
let f = u == "preserve" && s && this.dom.style.overflowAnchor == null && av(this);
|
|
12749
12753
|
if (s) {
|
|
12750
12754
|
this.domObserver.stop();
|
|
12751
|
-
let h = d && (nt ||
|
|
12755
|
+
let h = d && (nt || qe) && !this.composing && !i.selection.empty && !e.selection.empty && Eb(i.selection, e.selection);
|
|
12752
12756
|
if (d) {
|
|
12753
|
-
let p =
|
|
12757
|
+
let p = qe ? this.trackWrites = this.domSelectionRange().focusNode : null;
|
|
12754
12758
|
this.composing && (this.input.compositionNode = sb(this)), (o || !this.docView.update(e.doc, c, a, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = Pa(e.doc, c, a, this.dom, this)), p && !this.trackWrites && (h = !0);
|
|
12755
12759
|
}
|
|
12756
12760
|
h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && Iv(this)) ? ln(this, h) : (hd(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
|
|
@@ -12995,7 +12999,7 @@ class Tb {
|
|
|
12995
12999
|
*/
|
|
12996
13000
|
domSelectionRange() {
|
|
12997
13001
|
let e = this.domSelection();
|
|
12998
|
-
return
|
|
13002
|
+
return Ke && this.root.nodeType === 11 && tv(this.dom.ownerDocument) == this.dom && vb(this, e) || e;
|
|
12999
13003
|
}
|
|
13000
13004
|
/**
|
|
13001
13005
|
@internal
|
|
@@ -13172,7 +13176,7 @@ function rs(t, e, n = !0) {
|
|
|
13172
13176
|
return e.altKey && (t = "Alt-" + t), e.ctrlKey && (t = "Ctrl-" + t), e.metaKey && (t = "Meta-" + t), n && e.shiftKey && (t = "Shift-" + t), t;
|
|
13173
13177
|
}
|
|
13174
13178
|
function Vb(t) {
|
|
13175
|
-
return new
|
|
13179
|
+
return new Ye({ props: { handleKeyDown: Pd(t) } });
|
|
13176
13180
|
}
|
|
13177
13181
|
function Pd(t) {
|
|
13178
13182
|
let e = $b(t);
|
|
@@ -13213,7 +13217,7 @@ const Lb = (t, e, n) => {
|
|
|
13213
13217
|
if (!o.type.spec.isolating && Ld(t, i, e))
|
|
13214
13218
|
return !0;
|
|
13215
13219
|
if (r.parent.content.size == 0 && (Dr(o, "end") || H.isSelectable(o))) {
|
|
13216
|
-
let s = Oo(t.doc, r.before(), r.after(),
|
|
13220
|
+
let s = Oo(t.doc, r.before(), r.after(), P.empty);
|
|
13217
13221
|
if (s && s.slice.size < s.to - s.from) {
|
|
13218
13222
|
if (e) {
|
|
13219
13223
|
let l = t.tr.step(s);
|
|
@@ -13255,7 +13259,7 @@ function $d(t, e, n) {
|
|
|
13255
13259
|
return !1;
|
|
13256
13260
|
l = u;
|
|
13257
13261
|
}
|
|
13258
|
-
let c = Oo(t.doc, o, a,
|
|
13262
|
+
let c = Oo(t.doc, o, a, P.empty);
|
|
13259
13263
|
if (!c || c.from != o || c instanceof Ee && c.slice.size >= a - o)
|
|
13260
13264
|
return !1;
|
|
13261
13265
|
if (n) {
|
|
@@ -13310,7 +13314,7 @@ const jb = (t, e, n) => {
|
|
|
13310
13314
|
if (Ld(t, i, e))
|
|
13311
13315
|
return !0;
|
|
13312
13316
|
if (r.parent.content.size == 0 && (Dr(o, "start") || H.isSelectable(o))) {
|
|
13313
|
-
let s = Oo(t.doc, r.before(), r.after(),
|
|
13317
|
+
let s = Oo(t.doc, r.before(), r.after(), P.empty);
|
|
13314
13318
|
if (s && s.slice.size < s.to - s.from) {
|
|
13315
13319
|
if (e) {
|
|
13316
13320
|
let l = t.tr.step(s);
|
|
@@ -13437,7 +13441,7 @@ function Ld(t, e, n) {
|
|
|
13437
13441
|
for (let g = o.length - 1; g >= 0; g--)
|
|
13438
13442
|
f = T.from(o[g].create(null, f));
|
|
13439
13443
|
f = T.from(r.copy(f));
|
|
13440
|
-
let h = t.tr.step(new Ne(e.pos - 1, d, e.pos, d, new
|
|
13444
|
+
let h = t.tr.step(new Ne(e.pos - 1, d, e.pos, d, new P(f, 1, 0), o.length, !0)), p = d + 2 * o.length;
|
|
13441
13445
|
Dn(h.doc, p) && h.join(p), n(h.scrollIntoView());
|
|
13442
13446
|
}
|
|
13443
13447
|
return !0;
|
|
@@ -13457,7 +13461,7 @@ function Ld(t, e, n) {
|
|
|
13457
13461
|
let g = T.empty;
|
|
13458
13462
|
for (let v = f.length - 1; v >= 0; v--)
|
|
13459
13463
|
g = T.from(f[v].copy(g));
|
|
13460
|
-
let m = t.tr.step(new Ne(e.pos - f.length, e.pos + i.nodeSize, e.pos + p, e.pos + i.nodeSize - p, new
|
|
13464
|
+
let m = t.tr.step(new Ne(e.pos - f.length, e.pos + i.nodeSize, e.pos + p, e.pos + i.nodeSize - p, new P(g, f.length, 0), 0, !0));
|
|
13461
13465
|
n(m.scrollIntoView());
|
|
13462
13466
|
}
|
|
13463
13467
|
return !0;
|
|
@@ -13533,7 +13537,7 @@ function r1(t, e, n, r, i) {
|
|
|
13533
13537
|
let o = T.empty;
|
|
13534
13538
|
for (let u = n.length - 1; u >= 0; u--)
|
|
13535
13539
|
o = T.from(n[u].type.create(n[u].attrs, o));
|
|
13536
|
-
t.step(new Ne(e.start - (r ? 2 : 0), e.end, e.start, e.end, new
|
|
13540
|
+
t.step(new Ne(e.start - (r ? 2 : 0), e.end, e.start, e.end, new P(o, 0, 0), n.length, !0));
|
|
13537
13541
|
let s = 0;
|
|
13538
13542
|
for (let u = 0; u < n.length; u++)
|
|
13539
13543
|
n[u].type == i && (s = u + 1);
|
|
@@ -13550,7 +13554,7 @@ function i1(t) {
|
|
|
13550
13554
|
}
|
|
13551
13555
|
function o1(t, e, n, r) {
|
|
13552
13556
|
let i = t.tr, o = r.end, s = r.$to.end(r.depth);
|
|
13553
|
-
o < s && (i.step(new Ne(o - 1, s, o, s, new
|
|
13557
|
+
o < s && (i.step(new Ne(o - 1, s, o, s, new P(T.from(n.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new to(i.doc.resolve(r.$from.pos), i.doc.resolve(s), r.depth));
|
|
13554
13558
|
const l = zr(r);
|
|
13555
13559
|
if (l == null)
|
|
13556
13560
|
return !1;
|
|
@@ -13569,7 +13573,7 @@ function s1(t, e, n) {
|
|
|
13569
13573
|
if (!c.canReplace(u + (l ? 0 : 1), u + 1, s.content.append(a ? T.empty : T.from(i))))
|
|
13570
13574
|
return !1;
|
|
13571
13575
|
let d = o.pos, f = d + s.nodeSize;
|
|
13572
|
-
return r.step(new Ne(d - (l ? 1 : 0), f + (a ? 1 : 0), d + 1, f - 1, new
|
|
13576
|
+
return r.step(new Ne(d - (l ? 1 : 0), f + (a ? 1 : 0), d + 1, f - 1, new P((l ? T.empty : T.from(i.copy(T.empty))).append(a ? T.empty : T.from(i.copy(T.empty))), l ? 0 : 1, a ? 0 : 1), l ? 0 : 1)), e(r.scrollIntoView()), !0;
|
|
13573
13577
|
}
|
|
13574
13578
|
function l1(t) {
|
|
13575
13579
|
return function(e, n) {
|
|
@@ -13583,7 +13587,7 @@ function l1(t) {
|
|
|
13583
13587
|
if (a.type != t)
|
|
13584
13588
|
return !1;
|
|
13585
13589
|
if (n) {
|
|
13586
|
-
let c = a.lastChild && a.lastChild.type == l.type, u = T.from(c ? t.create() : null), d = new
|
|
13590
|
+
let c = a.lastChild && a.lastChild.type == l.type, u = T.from(c ? t.create() : null), d = new P(T.from(t.create(null, T.from(l.type.create(null, u)))), c ? 3 : 1, 0), f = o.start, h = o.end;
|
|
13587
13591
|
n(e.tr.step(new Ne(f - (c ? 3 : 1), h, f, h, d, 1, !0)).scrollIntoView());
|
|
13588
13592
|
}
|
|
13589
13593
|
return !0;
|
|
@@ -13693,10 +13697,10 @@ class a1 {
|
|
|
13693
13697
|
this.callbacks = {};
|
|
13694
13698
|
}
|
|
13695
13699
|
}
|
|
13696
|
-
function
|
|
13697
|
-
return t.config[e] === void 0 && t.parent ?
|
|
13700
|
+
function z(t, e, n) {
|
|
13701
|
+
return t.config[e] === void 0 && t.parent ? z(t.parent, e, n) : typeof t.config[e] == "function" ? t.config[e].bind({
|
|
13698
13702
|
...n,
|
|
13699
|
-
parent: t.parent ?
|
|
13703
|
+
parent: t.parent ? z(t.parent, e, n) : null
|
|
13700
13704
|
}) : t.config[e];
|
|
13701
13705
|
}
|
|
13702
13706
|
function Do(t) {
|
|
@@ -13721,7 +13725,7 @@ function Fd(t) {
|
|
|
13721
13725
|
name: s.name,
|
|
13722
13726
|
options: s.options,
|
|
13723
13727
|
storage: s.storage
|
|
13724
|
-
}, a =
|
|
13728
|
+
}, a = z(s, "addGlobalAttributes", l);
|
|
13725
13729
|
if (!a)
|
|
13726
13730
|
return;
|
|
13727
13731
|
a().forEach((u) => {
|
|
@@ -13743,7 +13747,7 @@ function Fd(t) {
|
|
|
13743
13747
|
name: s.name,
|
|
13744
13748
|
options: s.options,
|
|
13745
13749
|
storage: s.storage
|
|
13746
|
-
}, a =
|
|
13750
|
+
}, a = z(s, "addAttributes", l);
|
|
13747
13751
|
if (!a)
|
|
13748
13752
|
return;
|
|
13749
13753
|
const c = a();
|
|
@@ -13827,42 +13831,42 @@ function sc(t) {
|
|
|
13827
13831
|
}
|
|
13828
13832
|
function d1(t, e) {
|
|
13829
13833
|
var n;
|
|
13830
|
-
const r = Fd(t), { nodeExtensions: i, markExtensions: o } = Do(t), s = (n = i.find((c) =>
|
|
13834
|
+
const r = Fd(t), { nodeExtensions: i, markExtensions: o } = Do(t), s = (n = i.find((c) => z(c, "topNode"))) === null || n === void 0 ? void 0 : n.name, l = Object.fromEntries(i.map((c) => {
|
|
13831
13835
|
const u = r.filter((v) => v.type === c.name), d = {
|
|
13832
13836
|
name: c.name,
|
|
13833
13837
|
options: c.options,
|
|
13834
13838
|
storage: c.storage,
|
|
13835
13839
|
editor: e
|
|
13836
|
-
}, f = t.reduce((v,
|
|
13837
|
-
const
|
|
13840
|
+
}, f = t.reduce((v, x) => {
|
|
13841
|
+
const O = z(x, "extendNodeSchema", d);
|
|
13838
13842
|
return {
|
|
13839
13843
|
...v,
|
|
13840
|
-
...
|
|
13844
|
+
...O ? O(c) : {}
|
|
13841
13845
|
};
|
|
13842
13846
|
}, {}), h = sc({
|
|
13843
13847
|
...f,
|
|
13844
|
-
content: X(
|
|
13845
|
-
marks: X(
|
|
13846
|
-
group: X(
|
|
13847
|
-
inline: X(
|
|
13848
|
-
atom: X(
|
|
13849
|
-
selectable: X(
|
|
13850
|
-
draggable: X(
|
|
13851
|
-
code: X(
|
|
13852
|
-
defining: X(
|
|
13853
|
-
isolating: X(
|
|
13848
|
+
content: X(z(c, "content", d)),
|
|
13849
|
+
marks: X(z(c, "marks", d)),
|
|
13850
|
+
group: X(z(c, "group", d)),
|
|
13851
|
+
inline: X(z(c, "inline", d)),
|
|
13852
|
+
atom: X(z(c, "atom", d)),
|
|
13853
|
+
selectable: X(z(c, "selectable", d)),
|
|
13854
|
+
draggable: X(z(c, "draggable", d)),
|
|
13855
|
+
code: X(z(c, "code", d)),
|
|
13856
|
+
defining: X(z(c, "defining", d)),
|
|
13857
|
+
isolating: X(z(c, "isolating", d)),
|
|
13854
13858
|
attrs: Object.fromEntries(u.map((v) => {
|
|
13855
|
-
var
|
|
13856
|
-
return [v.name, { default: (
|
|
13859
|
+
var x;
|
|
13860
|
+
return [v.name, { default: (x = v == null ? void 0 : v.attribute) === null || x === void 0 ? void 0 : x.default }];
|
|
13857
13861
|
}))
|
|
13858
|
-
}), p = X(
|
|
13862
|
+
}), p = X(z(c, "parseHTML", d));
|
|
13859
13863
|
p && (h.parseDOM = p.map((v) => oc(v, u)));
|
|
13860
|
-
const g =
|
|
13864
|
+
const g = z(c, "renderHTML", d);
|
|
13861
13865
|
g && (h.toDOM = (v) => g({
|
|
13862
13866
|
node: v,
|
|
13863
13867
|
HTMLAttributes: _s(v, u)
|
|
13864
13868
|
}));
|
|
13865
|
-
const m =
|
|
13869
|
+
const m = z(c, "renderText", d);
|
|
13866
13870
|
return m && (h.toText = m), [c.name, h];
|
|
13867
13871
|
})), a = Object.fromEntries(o.map((c) => {
|
|
13868
13872
|
const u = r.filter((m) => m.type === c.name), d = {
|
|
@@ -13871,25 +13875,25 @@ function d1(t, e) {
|
|
|
13871
13875
|
storage: c.storage,
|
|
13872
13876
|
editor: e
|
|
13873
13877
|
}, f = t.reduce((m, v) => {
|
|
13874
|
-
const
|
|
13878
|
+
const x = z(v, "extendMarkSchema", d);
|
|
13875
13879
|
return {
|
|
13876
13880
|
...m,
|
|
13877
|
-
...
|
|
13881
|
+
...x ? x(c) : {}
|
|
13878
13882
|
};
|
|
13879
13883
|
}, {}), h = sc({
|
|
13880
13884
|
...f,
|
|
13881
|
-
inclusive: X(
|
|
13882
|
-
excludes: X(
|
|
13883
|
-
group: X(
|
|
13884
|
-
spanning: X(
|
|
13885
|
-
code: X(
|
|
13885
|
+
inclusive: X(z(c, "inclusive", d)),
|
|
13886
|
+
excludes: X(z(c, "excludes", d)),
|
|
13887
|
+
group: X(z(c, "group", d)),
|
|
13888
|
+
spanning: X(z(c, "spanning", d)),
|
|
13889
|
+
code: X(z(c, "code", d)),
|
|
13886
13890
|
attrs: Object.fromEntries(u.map((m) => {
|
|
13887
13891
|
var v;
|
|
13888
13892
|
return [m.name, { default: (v = m == null ? void 0 : m.attribute) === null || v === void 0 ? void 0 : v.default }];
|
|
13889
13893
|
}))
|
|
13890
|
-
}), p = X(
|
|
13894
|
+
}), p = X(z(c, "parseHTML", d));
|
|
13891
13895
|
p && (h.parseDOM = p.map((m) => oc(m, u)));
|
|
13892
|
-
const g =
|
|
13896
|
+
const g = z(c, "renderHTML", d);
|
|
13893
13897
|
return g && (h.toDOM = (m) => g({
|
|
13894
13898
|
mark: m,
|
|
13895
13899
|
HTMLAttributes: _s(m, u)
|
|
@@ -13963,7 +13967,7 @@ function Bi(t) {
|
|
|
13963
13967
|
}), m = {
|
|
13964
13968
|
from: r - (h[0].length - o.length),
|
|
13965
13969
|
to: i
|
|
13966
|
-
}, { commands: v, chain:
|
|
13970
|
+
}, { commands: v, chain: x, can: O } = new No({
|
|
13967
13971
|
editor: n,
|
|
13968
13972
|
state: g
|
|
13969
13973
|
});
|
|
@@ -13972,8 +13976,8 @@ function Bi(t) {
|
|
|
13972
13976
|
range: m,
|
|
13973
13977
|
match: h,
|
|
13974
13978
|
commands: v,
|
|
13975
|
-
chain:
|
|
13976
|
-
can:
|
|
13979
|
+
chain: x,
|
|
13980
|
+
can: O
|
|
13977
13981
|
}) === null || !p.steps.length || (p.setMeta(l, {
|
|
13978
13982
|
transform: p,
|
|
13979
13983
|
from: r,
|
|
@@ -13983,7 +13987,7 @@ function Bi(t) {
|
|
|
13983
13987
|
}), u;
|
|
13984
13988
|
}
|
|
13985
13989
|
function p1(t) {
|
|
13986
|
-
const { editor: e, rules: n } = t, r = new
|
|
13990
|
+
const { editor: e, rules: n } = t, r = new Ye({
|
|
13987
13991
|
state: {
|
|
13988
13992
|
init() {
|
|
13989
13993
|
return null;
|
|
@@ -14078,23 +14082,23 @@ function v1(t) {
|
|
|
14078
14082
|
if (!h.isTextblock || h.type.spec.code)
|
|
14079
14083
|
return;
|
|
14080
14084
|
const g = Math.max(r, p), m = Math.min(i, p + h.content.size), v = h.textBetween(g - p, m - p, void 0, "");
|
|
14081
|
-
y1(v, o.find, s).forEach((
|
|
14082
|
-
if (
|
|
14085
|
+
y1(v, o.find, s).forEach((O) => {
|
|
14086
|
+
if (O.index === void 0)
|
|
14083
14087
|
return;
|
|
14084
|
-
const y = g +
|
|
14088
|
+
const y = g + O.index + 1, M = y + O[0].length, b = {
|
|
14085
14089
|
from: n.tr.mapping.map(y),
|
|
14086
|
-
to: n.tr.mapping.map(
|
|
14087
|
-
},
|
|
14090
|
+
to: n.tr.mapping.map(M)
|
|
14091
|
+
}, E = o.handler({
|
|
14088
14092
|
state: n,
|
|
14089
|
-
range:
|
|
14090
|
-
match:
|
|
14093
|
+
range: b,
|
|
14094
|
+
match: O,
|
|
14091
14095
|
commands: a,
|
|
14092
14096
|
chain: c,
|
|
14093
14097
|
can: u,
|
|
14094
14098
|
pasteEvent: s,
|
|
14095
14099
|
dropEvent: l
|
|
14096
14100
|
});
|
|
14097
|
-
d.push(
|
|
14101
|
+
d.push(E);
|
|
14098
14102
|
});
|
|
14099
14103
|
}), d.every((h) => h !== null);
|
|
14100
14104
|
}
|
|
@@ -14124,7 +14128,7 @@ function w1(t) {
|
|
|
14124
14128
|
}) || !g.steps.length))
|
|
14125
14129
|
return l = typeof DragEvent < "u" ? new DragEvent("drop") : null, s = typeof ClipboardEvent < "u" ? new ClipboardEvent("paste") : null, g;
|
|
14126
14130
|
};
|
|
14127
|
-
return n.map((u) => new
|
|
14131
|
+
return n.map((u) => new Ye({
|
|
14128
14132
|
// we register a global drag handler to track the current drag source element
|
|
14129
14133
|
view(d) {
|
|
14130
14134
|
const f = (h) => {
|
|
@@ -14148,25 +14152,25 @@ function w1(t) {
|
|
|
14148
14152
|
}
|
|
14149
14153
|
},
|
|
14150
14154
|
appendTransaction: (d, f, h) => {
|
|
14151
|
-
const p = d[0], g = p.getMeta("uiEvent") === "paste" && !i, m = p.getMeta("uiEvent") === "drop" && !o, v = p.getMeta("applyPasteRules"),
|
|
14152
|
-
if (!g && !m && !
|
|
14155
|
+
const p = d[0], g = p.getMeta("uiEvent") === "paste" && !i, m = p.getMeta("uiEvent") === "drop" && !o, v = p.getMeta("applyPasteRules"), x = !!v;
|
|
14156
|
+
if (!g && !m && !x)
|
|
14153
14157
|
return;
|
|
14154
|
-
if (
|
|
14155
|
-
const { from:
|
|
14158
|
+
if (x) {
|
|
14159
|
+
const { from: M, text: b } = v, E = M + b.length, R = b1(b);
|
|
14156
14160
|
return a({
|
|
14157
14161
|
rule: u,
|
|
14158
14162
|
state: h,
|
|
14159
|
-
from:
|
|
14160
|
-
to: { b:
|
|
14161
|
-
pasteEvt:
|
|
14163
|
+
from: M,
|
|
14164
|
+
to: { b: E },
|
|
14165
|
+
pasteEvt: R
|
|
14162
14166
|
});
|
|
14163
14167
|
}
|
|
14164
|
-
const
|
|
14165
|
-
if (!(!m1(
|
|
14168
|
+
const O = f.doc.content.findDiffStart(h.doc.content), y = f.doc.content.findDiffEnd(h.doc.content);
|
|
14169
|
+
if (!(!m1(O) || !y || O === y.b))
|
|
14166
14170
|
return a({
|
|
14167
14171
|
rule: u,
|
|
14168
14172
|
state: h,
|
|
14169
|
-
from:
|
|
14173
|
+
from: O,
|
|
14170
14174
|
to: y,
|
|
14171
14175
|
pasteEvt: s
|
|
14172
14176
|
});
|
|
@@ -14202,7 +14206,7 @@ class vr {
|
|
|
14202
14206
|
name: n.name,
|
|
14203
14207
|
options: n.options,
|
|
14204
14208
|
storage: n.storage
|
|
14205
|
-
}, i =
|
|
14209
|
+
}, i = z(n, "addExtensions", r);
|
|
14206
14210
|
return i ? [n, ...this.flatten(i())] : n;
|
|
14207
14211
|
}).flat(10);
|
|
14208
14212
|
}
|
|
@@ -14213,7 +14217,7 @@ class vr {
|
|
|
14213
14217
|
*/
|
|
14214
14218
|
static sort(e) {
|
|
14215
14219
|
return e.sort((r, i) => {
|
|
14216
|
-
const o =
|
|
14220
|
+
const o = z(r, "priority") || 100, s = z(i, "priority") || 100;
|
|
14217
14221
|
return o > s ? -1 : o < s ? 1 : 0;
|
|
14218
14222
|
});
|
|
14219
14223
|
}
|
|
@@ -14229,7 +14233,7 @@ class vr {
|
|
|
14229
14233
|
storage: n.storage,
|
|
14230
14234
|
editor: this.editor,
|
|
14231
14235
|
type: is(n.name, this.schema)
|
|
14232
|
-
}, i =
|
|
14236
|
+
}, i = z(n, "addCommands", r);
|
|
14233
14237
|
return i ? {
|
|
14234
14238
|
...e,
|
|
14235
14239
|
...i()
|
|
@@ -14248,7 +14252,7 @@ class vr {
|
|
|
14248
14252
|
storage: s.storage,
|
|
14249
14253
|
editor: e,
|
|
14250
14254
|
type: is(s.name, this.schema)
|
|
14251
|
-
}, a = [], c =
|
|
14255
|
+
}, a = [], c = z(s, "addKeyboardShortcuts", l);
|
|
14252
14256
|
let u = {};
|
|
14253
14257
|
if (s.type === "mark" && s.config.exitable && (u.ArrowRight = () => Jt.handleExit({ editor: e, mark: s })), c) {
|
|
14254
14258
|
const g = Object.fromEntries(Object.entries(c()).map(([m, v]) => [m, () => v({ editor: e })]));
|
|
@@ -14256,11 +14260,11 @@ class vr {
|
|
|
14256
14260
|
}
|
|
14257
14261
|
const d = Vb(u);
|
|
14258
14262
|
a.push(d);
|
|
14259
|
-
const f =
|
|
14263
|
+
const f = z(s, "addInputRules", l);
|
|
14260
14264
|
lc(s, e.options.enableInputRules) && f && r.push(...f());
|
|
14261
|
-
const h =
|
|
14265
|
+
const h = z(s, "addPasteRules", l);
|
|
14262
14266
|
lc(s, e.options.enablePasteRules) && h && i.push(...h());
|
|
14263
|
-
const p =
|
|
14267
|
+
const p = z(s, "addProseMirrorPlugins", l);
|
|
14264
14268
|
if (p) {
|
|
14265
14269
|
const g = p();
|
|
14266
14270
|
a.push(...g);
|
|
@@ -14292,14 +14296,14 @@ class vr {
|
|
|
14292
14296
|
*/
|
|
14293
14297
|
get nodeViews() {
|
|
14294
14298
|
const { editor: e } = this, { nodeExtensions: n } = Do(this.extensions);
|
|
14295
|
-
return Object.fromEntries(n.filter((r) => !!
|
|
14299
|
+
return Object.fromEntries(n.filter((r) => !!z(r, "addNodeView")).map((r) => {
|
|
14296
14300
|
const i = this.attributes.filter((a) => a.type === r.name), o = {
|
|
14297
14301
|
name: r.name,
|
|
14298
14302
|
options: r.options,
|
|
14299
14303
|
storage: r.storage,
|
|
14300
14304
|
editor: e,
|
|
14301
14305
|
type: Ie(r.name, this.schema)
|
|
14302
|
-
}, s =
|
|
14306
|
+
}, s = z(r, "addNodeView", o);
|
|
14303
14307
|
if (!s)
|
|
14304
14308
|
return [];
|
|
14305
14309
|
const l = (a, c, u, d) => {
|
|
@@ -14331,8 +14335,8 @@ class vr {
|
|
|
14331
14335
|
editor: this.editor,
|
|
14332
14336
|
type: is(e.name, this.schema)
|
|
14333
14337
|
};
|
|
14334
|
-
e.type === "mark" && (!((n = X(
|
|
14335
|
-
const i =
|
|
14338
|
+
e.type === "mark" && (!((n = X(z(e, "keepOnSplit", r))) !== null && n !== void 0) || n) && this.splittableMarks.push(e.name);
|
|
14339
|
+
const i = z(e, "onBeforeCreate", r), o = z(e, "onCreate", r), s = z(e, "onUpdate", r), l = z(e, "onSelectionUpdate", r), a = z(e, "onTransaction", r), c = z(e, "onFocus", r), u = z(e, "onBlur", r), d = z(e, "onDestroy", r);
|
|
14336
14340
|
i && this.editor.on("beforeCreate", i), o && this.editor.on("create", o), s && this.editor.on("update", s), l && this.editor.on("selectionUpdate", l), a && this.editor.on("transaction", a), c && this.editor.on("focus", c), u && this.editor.on("blur", u), d && this.editor.on("destroy", d);
|
|
14337
14341
|
});
|
|
14338
14342
|
}
|
|
@@ -14357,9 +14361,9 @@ class ze {
|
|
|
14357
14361
|
}, this.config = {
|
|
14358
14362
|
...this.config,
|
|
14359
14363
|
...e
|
|
14360
|
-
}, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = X(
|
|
14364
|
+
}, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = X(z(this, "addOptions", {
|
|
14361
14365
|
name: this.name
|
|
14362
|
-
}))), this.storage = X(
|
|
14366
|
+
}))), this.storage = X(z(this, "addStorage", {
|
|
14363
14367
|
name: this.name,
|
|
14364
14368
|
options: this.options
|
|
14365
14369
|
})) || {};
|
|
@@ -14369,16 +14373,16 @@ class ze {
|
|
|
14369
14373
|
}
|
|
14370
14374
|
configure(e = {}) {
|
|
14371
14375
|
const n = this.extend();
|
|
14372
|
-
return n.parent = this.parent, n.options = Po(this.options, e), n.storage = X(
|
|
14376
|
+
return n.parent = this.parent, n.options = Po(this.options, e), n.storage = X(z(n, "addStorage", {
|
|
14373
14377
|
name: n.name,
|
|
14374
14378
|
options: n.options
|
|
14375
14379
|
})), n;
|
|
14376
14380
|
}
|
|
14377
14381
|
extend(e = {}) {
|
|
14378
14382
|
const n = new ze({ ...this.config, ...e });
|
|
14379
|
-
return n.parent = this, this.child = n, n.name = e.name ? e.name : n.parent.name, e.defaultOptions && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`), n.options = X(
|
|
14383
|
+
return n.parent = this, this.child = n, n.name = e.name ? e.name : n.parent.name, e.defaultOptions && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`), n.options = X(z(n, "addOptions", {
|
|
14380
14384
|
name: n.name
|
|
14381
|
-
})), n.storage = X(
|
|
14385
|
+
})), n.storage = X(z(n, "addStorage", {
|
|
14382
14386
|
name: n.name,
|
|
14383
14387
|
options: n.options
|
|
14384
14388
|
})), n;
|
|
@@ -14416,7 +14420,7 @@ const S1 = ze.create({
|
|
|
14416
14420
|
},
|
|
14417
14421
|
addProseMirrorPlugins() {
|
|
14418
14422
|
return [
|
|
14419
|
-
new
|
|
14423
|
+
new Ye({
|
|
14420
14424
|
key: new Rt("clipboardTextSerializer"),
|
|
14421
14425
|
props: {
|
|
14422
14426
|
clipboardTextSerializer: () => {
|
|
@@ -14847,11 +14851,11 @@ function Hs(t, e, n = {}) {
|
|
|
14847
14851
|
t.doc.nodesBetween(h, p, (g, m) => {
|
|
14848
14852
|
if (!g.isText && !g.marks.length)
|
|
14849
14853
|
return;
|
|
14850
|
-
const v = Math.max(h, m),
|
|
14851
|
-
s +=
|
|
14854
|
+
const v = Math.max(h, m), x = Math.min(p, m + g.nodeSize), O = x - v;
|
|
14855
|
+
s += O, l.push(...g.marks.map((y) => ({
|
|
14852
14856
|
mark: y,
|
|
14853
14857
|
from: v,
|
|
14854
|
-
to:
|
|
14858
|
+
to: x
|
|
14855
14859
|
})));
|
|
14856
14860
|
});
|
|
14857
14861
|
}), s === 0)
|
|
@@ -14873,7 +14877,7 @@ function uc(t, e) {
|
|
|
14873
14877
|
name: r.name,
|
|
14874
14878
|
options: r.options,
|
|
14875
14879
|
storage: r.storage
|
|
14876
|
-
}, o = X(
|
|
14880
|
+
}, o = X(z(r, "group", i));
|
|
14877
14881
|
return typeof o != "string" ? !1 : o.split(" ").includes("list");
|
|
14878
14882
|
}
|
|
14879
14883
|
function xw(t) {
|
|
@@ -15014,18 +15018,18 @@ const Nw = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
|
|
|
15014
15018
|
if (r) {
|
|
15015
15019
|
let m = T.empty;
|
|
15016
15020
|
const v = l.index(-1) ? 1 : l.index(-2) ? 2 : 3;
|
|
15017
|
-
for (let
|
|
15018
|
-
m = T.from(l.node(
|
|
15019
|
-
const
|
|
15021
|
+
for (let E = l.depth - v; E >= l.depth - 3; E -= 1)
|
|
15022
|
+
m = T.from(l.node(E).copy(m));
|
|
15023
|
+
const x = l.indexAfter(-1) < l.node(-2).childCount ? 1 : l.indexAfter(-2) < l.node(-3).childCount ? 2 : 3, O = ji(d, l.node().type.name, l.node().attrs), y = ((o = s.contentMatch.defaultType) === null || o === void 0 ? void 0 : o.createAndFill(O)) || void 0;
|
|
15020
15024
|
m = m.append(T.from(s.createAndFill(null, y) || void 0));
|
|
15021
|
-
const
|
|
15022
|
-
e.replace(
|
|
15023
|
-
let
|
|
15024
|
-
e.doc.nodesBetween(
|
|
15025
|
-
if (
|
|
15025
|
+
const M = l.before(l.depth - (v - 1));
|
|
15026
|
+
e.replace(M, l.after(-x), new P(m, 4 - v, 0));
|
|
15027
|
+
let b = -1;
|
|
15028
|
+
e.doc.nodesBetween(M, e.doc.content.size, (E, R) => {
|
|
15029
|
+
if (b > -1)
|
|
15026
15030
|
return !1;
|
|
15027
|
-
|
|
15028
|
-
}),
|
|
15031
|
+
E.isTextblock && E.content.size === 0 && (b = R + 1);
|
|
15032
|
+
}), b > -1 && e.setSelection(G.near(e.doc.resolve(b))), e.scrollIntoView();
|
|
15029
15033
|
}
|
|
15030
15034
|
return !0;
|
|
15031
15035
|
}
|
|
@@ -15038,10 +15042,10 @@ const Nw = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
|
|
|
15038
15042
|
if (!kr(e.doc, l.pos, 2))
|
|
15039
15043
|
return !1;
|
|
15040
15044
|
if (r) {
|
|
15041
|
-
const { selection: m, storedMarks: v } = n, { splittableMarks:
|
|
15042
|
-
if (e.split(l.pos, 2, g).scrollIntoView(), !
|
|
15045
|
+
const { selection: m, storedMarks: v } = n, { splittableMarks: x } = i.extensionManager, O = v || m.$to.parentOffset && m.$from.marks();
|
|
15046
|
+
if (e.split(l.pos, 2, g).scrollIntoView(), !O || !r)
|
|
15043
15047
|
return !0;
|
|
15044
|
-
const y =
|
|
15048
|
+
const y = O.filter((M) => x.includes(M.type.name));
|
|
15045
15049
|
e.ensureMarks(y);
|
|
15046
15050
|
}
|
|
15047
15051
|
return !0;
|
|
@@ -15064,19 +15068,19 @@ const Nw = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
|
|
|
15064
15068
|
const i = t.doc.nodeAt(r);
|
|
15065
15069
|
return n.node.type === (i == null ? void 0 : i.type) && Dn(t.doc, r) && t.join(r), !0;
|
|
15066
15070
|
}, Iw = (t, e, n, r = {}) => ({ editor: i, tr: o, state: s, dispatch: l, chain: a, commands: c, can: u }) => {
|
|
15067
|
-
const { extensions: d, splittableMarks: f } = i.extensionManager, h = Ie(t, s.schema), p = Ie(e, s.schema), { selection: g, storedMarks: m } = s, { $from: v, $to:
|
|
15068
|
-
if (!
|
|
15071
|
+
const { extensions: d, splittableMarks: f } = i.extensionManager, h = Ie(t, s.schema), p = Ie(e, s.schema), { selection: g, storedMarks: m } = s, { $from: v, $to: x } = g, O = v.blockRange(x), y = m || g.$to.parentOffset && g.$from.marks();
|
|
15072
|
+
if (!O)
|
|
15069
15073
|
return !1;
|
|
15070
|
-
const
|
|
15071
|
-
if (
|
|
15072
|
-
if (
|
|
15074
|
+
const M = Tl((b) => uc(b.type.name, d))(g);
|
|
15075
|
+
if (O.depth >= 1 && M && O.depth - M.depth <= 1) {
|
|
15076
|
+
if (M.node.type === h)
|
|
15073
15077
|
return c.liftListItem(p);
|
|
15074
|
-
if (uc(
|
|
15075
|
-
return a().command(() => (o.setNodeMarkup(
|
|
15078
|
+
if (uc(M.node.type.name, d) && h.validContent(M.node.content) && l)
|
|
15079
|
+
return a().command(() => (o.setNodeMarkup(M.pos, h), !0)).command(() => ls(o, h)).command(() => as(o, h)).run();
|
|
15076
15080
|
}
|
|
15077
15081
|
return !n || !y || !l ? a().command(() => u().wrapInList(h, r) ? !0 : c.clearNodes()).wrapInList(h, r).command(() => ls(o, h)).command(() => as(o, h)).run() : a().command(() => {
|
|
15078
|
-
const
|
|
15079
|
-
return o.ensureMarks(
|
|
15082
|
+
const b = u().wrapInList(h, r), E = y.filter((R) => f.includes(R.type.name));
|
|
15083
|
+
return o.ensureMarks(E), b ? !0 : c.clearNodes();
|
|
15080
15084
|
}).wrapInList(h, r).command(() => ls(o, h)).command(() => as(o, h)).run();
|
|
15081
15085
|
}, Pw = (t, e = {}, n = {}) => ({ state: r, commands: i }) => {
|
|
15082
15086
|
const { extendEmptyMarkRange: o = !1 } = n, s = Pn(t, r.schema);
|
|
@@ -15225,7 +15229,7 @@ const Hw = ze.create({
|
|
|
15225
15229
|
name: "editable",
|
|
15226
15230
|
addProseMirrorPlugins() {
|
|
15227
15231
|
return [
|
|
15228
|
-
new
|
|
15232
|
+
new Ye({
|
|
15229
15233
|
key: new Rt("editable"),
|
|
15230
15234
|
props: {
|
|
15231
15235
|
editable: () => this.editor.options.editable
|
|
@@ -15238,7 +15242,7 @@ const Hw = ze.create({
|
|
|
15238
15242
|
addProseMirrorPlugins() {
|
|
15239
15243
|
const { editor: t } = this;
|
|
15240
15244
|
return [
|
|
15241
|
-
new
|
|
15245
|
+
new Ye({
|
|
15242
15246
|
key: new Rt("focusEvents"),
|
|
15243
15247
|
props: {
|
|
15244
15248
|
handleDOMEvents: {
|
|
@@ -15311,7 +15315,7 @@ const Hw = ze.create({
|
|
|
15311
15315
|
// to a paragraph if necessary.
|
|
15312
15316
|
// This is an alternative to ProseMirror's `AllSelection`, which doesn’t work well
|
|
15313
15317
|
// with many other commands.
|
|
15314
|
-
new
|
|
15318
|
+
new Ye({
|
|
15315
15319
|
key: new Rt("clearDocument"),
|
|
15316
15320
|
appendTransaction: (t, e, n) => {
|
|
15317
15321
|
if (!(t.some((p) => p.docChanged) && !e.doc.eq(n.doc)))
|
|
@@ -15336,7 +15340,7 @@ const Hw = ze.create({
|
|
|
15336
15340
|
name: "tabindex",
|
|
15337
15341
|
addProseMirrorPlugins() {
|
|
15338
15342
|
return [
|
|
15339
|
-
new
|
|
15343
|
+
new Ye({
|
|
15340
15344
|
key: new Rt("tabindex"),
|
|
15341
15345
|
props: {
|
|
15342
15346
|
attributes: this.editor.isEditable ? { tabindex: "0" } : {}
|
|
@@ -15929,9 +15933,9 @@ class Jt {
|
|
|
15929
15933
|
}, this.config = {
|
|
15930
15934
|
...this.config,
|
|
15931
15935
|
...e
|
|
15932
|
-
}, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = X(
|
|
15936
|
+
}, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = X(z(this, "addOptions", {
|
|
15933
15937
|
name: this.name
|
|
15934
|
-
}))), this.storage = X(
|
|
15938
|
+
}))), this.storage = X(z(this, "addStorage", {
|
|
15935
15939
|
name: this.name,
|
|
15936
15940
|
options: this.options
|
|
15937
15941
|
})) || {};
|
|
@@ -15941,16 +15945,16 @@ class Jt {
|
|
|
15941
15945
|
}
|
|
15942
15946
|
configure(e = {}) {
|
|
15943
15947
|
const n = this.extend();
|
|
15944
|
-
return n.options = Po(this.options, e), n.storage = X(
|
|
15948
|
+
return n.options = Po(this.options, e), n.storage = X(z(n, "addStorage", {
|
|
15945
15949
|
name: n.name,
|
|
15946
15950
|
options: n.options
|
|
15947
15951
|
})), n;
|
|
15948
15952
|
}
|
|
15949
15953
|
extend(e = {}) {
|
|
15950
15954
|
const n = new Jt({ ...this.config, ...e });
|
|
15951
|
-
return n.parent = this, this.child = n, n.name = e.name ? e.name : n.parent.name, e.defaultOptions && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`), n.options = X(
|
|
15955
|
+
return n.parent = this, this.child = n, n.name = e.name ? e.name : n.parent.name, e.defaultOptions && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`), n.options = X(z(n, "addOptions", {
|
|
15952
15956
|
name: n.name
|
|
15953
|
-
})), n.storage = X(
|
|
15957
|
+
})), n.storage = X(z(n, "addStorage", {
|
|
15954
15958
|
name: n.name,
|
|
15955
15959
|
options: n.options
|
|
15956
15960
|
})), n;
|
|
@@ -15975,9 +15979,9 @@ let gt = class qs {
|
|
|
15975
15979
|
}, this.config = {
|
|
15976
15980
|
...this.config,
|
|
15977
15981
|
...e
|
|
15978
|
-
}, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = X(
|
|
15982
|
+
}, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = X(z(this, "addOptions", {
|
|
15979
15983
|
name: this.name
|
|
15980
|
-
}))), this.storage = X(
|
|
15984
|
+
}))), this.storage = X(z(this, "addStorage", {
|
|
15981
15985
|
name: this.name,
|
|
15982
15986
|
options: this.options
|
|
15983
15987
|
})) || {};
|
|
@@ -15987,16 +15991,16 @@ let gt = class qs {
|
|
|
15987
15991
|
}
|
|
15988
15992
|
configure(e = {}) {
|
|
15989
15993
|
const n = this.extend();
|
|
15990
|
-
return n.options = Po(this.options, e), n.storage = X(
|
|
15994
|
+
return n.options = Po(this.options, e), n.storage = X(z(n, "addStorage", {
|
|
15991
15995
|
name: n.name,
|
|
15992
15996
|
options: n.options
|
|
15993
15997
|
})), n;
|
|
15994
15998
|
}
|
|
15995
15999
|
extend(e = {}) {
|
|
15996
16000
|
const n = new qs({ ...this.config, ...e });
|
|
15997
|
-
return n.parent = this, this.child = n, n.name = e.name ? e.name : n.parent.name, e.defaultOptions && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`), n.options = X(
|
|
16001
|
+
return n.parent = this, this.child = n, n.name = e.name ? e.name : n.parent.name, e.defaultOptions && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`), n.options = X(z(n, "addOptions", {
|
|
15998
16002
|
name: n.name
|
|
15999
|
-
})), n.storage = X(
|
|
16003
|
+
})), n.storage = X(z(n, "addStorage", {
|
|
16000
16004
|
name: n.name,
|
|
16001
16005
|
options: n.options
|
|
16002
16006
|
})), n;
|
|
@@ -16228,8 +16232,8 @@ var mx = function(e, n) {
|
|
|
16228
16232
|
function gx(t) {
|
|
16229
16233
|
var e, n = t.state, r = t.name, i = t.options, o = n.elements.arrow, s = n.modifiersData.popperOffsets, l = Ht(n.placement), a = Dl(l), c = [it, Ct].indexOf(l) >= 0, u = c ? "height" : "width";
|
|
16230
16234
|
if (!(!o || !s)) {
|
|
16231
|
-
var d = mx(i.padding, n), f = Nl(o), h = a === "y" ? rt : it, p = a === "y" ? Ot : Ct, g = n.rects.reference[u] + n.rects.reference[a] - s[a] - n.rects.popper[u], m = s[a] - n.rects.reference[a], v = Ti(o),
|
|
16232
|
-
n.modifiersData[r] = (e = {}, e[
|
|
16235
|
+
var d = mx(i.padding, n), f = Nl(o), h = a === "y" ? rt : it, p = a === "y" ? Ot : Ct, g = n.rects.reference[u] + n.rects.reference[a] - s[a] - n.rects.popper[u], m = s[a] - n.rects.reference[a], v = Ti(o), x = v ? a === "y" ? v.clientHeight || 0 : v.clientWidth || 0 : 0, O = g / 2 - m / 2, y = d[h], M = x - f[u] - d[p], b = x / 2 - f[u] / 2 + O, E = ti(y, b, M), R = a;
|
|
16236
|
+
n.modifiersData[r] = (e = {}, e[R] = E, e.centerOffset = E - b, e);
|
|
16233
16237
|
}
|
|
16234
16238
|
}
|
|
16235
16239
|
function yx(t) {
|
|
@@ -16270,24 +16274,24 @@ function pc(t) {
|
|
|
16270
16274
|
y: g
|
|
16271
16275
|
};
|
|
16272
16276
|
h = m.x, g = m.y;
|
|
16273
|
-
var v = s.hasOwnProperty("x"),
|
|
16277
|
+
var v = s.hasOwnProperty("x"), x = s.hasOwnProperty("y"), O = it, y = rt, M = window;
|
|
16274
16278
|
if (c) {
|
|
16275
|
-
var
|
|
16276
|
-
if (
|
|
16279
|
+
var b = Ti(n), E = "clientHeight", R = "clientWidth";
|
|
16280
|
+
if (b === mt(n) && (b = Rn(n), cn(b).position !== "static" && l === "absolute" && (E = "scrollHeight", R = "scrollWidth")), b = b, i === rt || (i === it || i === Ct) && o === mi) {
|
|
16277
16281
|
y = Ot;
|
|
16278
|
-
var
|
|
16282
|
+
var N = d && b === M && M.visualViewport ? M.visualViewport.height : (
|
|
16279
16283
|
// $FlowFixMe[prop-missing]
|
|
16280
|
-
|
|
16284
|
+
b[E]
|
|
16281
16285
|
);
|
|
16282
|
-
g -=
|
|
16286
|
+
g -= N - r.height, g *= a ? 1 : -1;
|
|
16283
16287
|
}
|
|
16284
16288
|
if (i === it || (i === rt || i === Ot) && o === mi) {
|
|
16285
|
-
|
|
16286
|
-
var
|
|
16289
|
+
O = Ct;
|
|
16290
|
+
var L = d && b === M && M.visualViewport ? M.visualViewport.width : (
|
|
16287
16291
|
// $FlowFixMe[prop-missing]
|
|
16288
|
-
|
|
16292
|
+
b[R]
|
|
16289
16293
|
);
|
|
16290
|
-
h -=
|
|
16294
|
+
h -= L - r.width, h *= a ? 1 : -1;
|
|
16291
16295
|
}
|
|
16292
16296
|
}
|
|
16293
16297
|
var Z = Object.assign({
|
|
@@ -16301,9 +16305,9 @@ function pc(t) {
|
|
|
16301
16305
|
};
|
|
16302
16306
|
if (h = J.x, g = J.y, a) {
|
|
16303
16307
|
var te;
|
|
16304
|
-
return Object.assign({}, Z, (te = {}, te[y] =
|
|
16308
|
+
return Object.assign({}, Z, (te = {}, te[y] = x ? "0" : "", te[O] = v ? "0" : "", te.transform = (M.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + g + "px)" : "translate3d(" + h + "px, " + g + "px, 0)", te));
|
|
16305
16309
|
}
|
|
16306
|
-
return Object.assign({}, Z, (e = {}, e[y] =
|
|
16310
|
+
return Object.assign({}, Z, (e = {}, e[y] = x ? g + "px" : "", e[O] = v ? h + "px" : "", e.transform = "", e));
|
|
16307
16311
|
}
|
|
16308
16312
|
function xx(t) {
|
|
16309
16313
|
var e = t.state, n = t.options, r = n.gpuAcceleration, i = r === void 0 ? !0 : r, o = n.adaptive, s = o === void 0 ? !0 : o, l = n.roundOffsets, a = l === void 0 ? !0 : l, c = {
|
|
@@ -16503,25 +16507,25 @@ function sf(t) {
|
|
|
16503
16507
|
}
|
|
16504
16508
|
function gi(t, e) {
|
|
16505
16509
|
e === void 0 && (e = {});
|
|
16506
|
-
var n = e, r = n.placement, i = r === void 0 ? t.placement : r, o = n.strategy, s = o === void 0 ? t.strategy : o, l = n.boundary, a = l === void 0 ? Xw : l, c = n.rootBoundary, u = c === void 0 ? Yd : c, d = n.elementContext, f = d === void 0 ? Wr : d, h = n.altBoundary, p = h === void 0 ? !1 : h, g = n.padding, m = g === void 0 ? 0 : g, v = nf(typeof m != "number" ? m : rf(m, Mi)),
|
|
16507
|
-
reference:
|
|
16508
|
-
element:
|
|
16510
|
+
var n = e, r = n.placement, i = r === void 0 ? t.placement : r, o = n.strategy, s = o === void 0 ? t.strategy : o, l = n.boundary, a = l === void 0 ? Xw : l, c = n.rootBoundary, u = c === void 0 ? Yd : c, d = n.elementContext, f = d === void 0 ? Wr : d, h = n.altBoundary, p = h === void 0 ? !1 : h, g = n.padding, m = g === void 0 ? 0 : g, v = nf(typeof m != "number" ? m : rf(m, Mi)), x = f === Wr ? Qw : Wr, O = t.rects.popper, y = t.elements[p ? x : f], M = Dx(nr(y) ? y : y.contextElement || Rn(t.elements.popper), a, u, s), b = Vr(t.elements.reference), E = sf({
|
|
16511
|
+
reference: b,
|
|
16512
|
+
element: O,
|
|
16509
16513
|
strategy: "absolute",
|
|
16510
16514
|
placement: i
|
|
16511
|
-
}),
|
|
16512
|
-
top:
|
|
16513
|
-
bottom:
|
|
16514
|
-
left:
|
|
16515
|
-
right:
|
|
16515
|
+
}), R = Ks(Object.assign({}, O, E)), N = f === Wr ? R : b, L = {
|
|
16516
|
+
top: M.top - N.top + v.top,
|
|
16517
|
+
bottom: N.bottom - M.bottom + v.bottom,
|
|
16518
|
+
left: M.left - N.left + v.left,
|
|
16519
|
+
right: N.right - M.right + v.right
|
|
16516
16520
|
}, Z = t.modifiersData.offset;
|
|
16517
16521
|
if (f === Wr && Z) {
|
|
16518
16522
|
var J = Z[i];
|
|
16519
|
-
Object.keys(
|
|
16523
|
+
Object.keys(L).forEach(function(te) {
|
|
16520
16524
|
var ie = [Ct, Ot].indexOf(te) >= 0 ? 1 : -1, ne = [rt, Ot].indexOf(te) >= 0 ? "y" : "x";
|
|
16521
|
-
|
|
16525
|
+
L[te] += J[ne] * ie;
|
|
16522
16526
|
});
|
|
16523
16527
|
}
|
|
16524
|
-
return
|
|
16528
|
+
return L;
|
|
16525
16529
|
}
|
|
16526
16530
|
function Ix(t, e) {
|
|
16527
16531
|
e === void 0 && (e = {});
|
|
@@ -16552,7 +16556,7 @@ function Px(t) {
|
|
|
16552
16556
|
function Rx(t) {
|
|
16553
16557
|
var e = t.state, n = t.options, r = t.name;
|
|
16554
16558
|
if (!e.modifiersData[r]._skip) {
|
|
16555
|
-
for (var i = n.mainAxis, o = i === void 0 ? !0 : i, s = n.altAxis, l = s === void 0 ? !0 : s, a = n.fallbackPlacements, c = n.padding, u = n.boundary, d = n.rootBoundary, f = n.altBoundary, h = n.flipVariations, p = h === void 0 ? !0 : h, g = n.allowedAutoPlacements, m = e.options.placement, v = Ht(m),
|
|
16559
|
+
for (var i = n.mainAxis, o = i === void 0 ? !0 : i, s = n.altAxis, l = s === void 0 ? !0 : s, a = n.fallbackPlacements, c = n.padding, u = n.boundary, d = n.rootBoundary, f = n.altBoundary, h = n.flipVariations, p = h === void 0 ? !0 : h, g = n.allowedAutoPlacements, m = e.options.placement, v = Ht(m), x = v === m, O = a || (x || !p ? [Hi(m)] : Px(m)), y = [m].concat(O).reduce(function(he, je) {
|
|
16556
16560
|
return he.concat(Ht(je) === El ? Ix(e, {
|
|
16557
16561
|
placement: je,
|
|
16558
16562
|
boundary: u,
|
|
@@ -16561,41 +16565,41 @@ function Rx(t) {
|
|
|
16561
16565
|
flipVariations: p,
|
|
16562
16566
|
allowedAutoPlacements: g
|
|
16563
16567
|
}) : je);
|
|
16564
|
-
}, []),
|
|
16565
|
-
var Z = y[
|
|
16568
|
+
}, []), M = e.rects.reference, b = e.rects.popper, E = /* @__PURE__ */ new Map(), R = !0, N = y[0], L = 0; L < y.length; L++) {
|
|
16569
|
+
var Z = y[L], J = Ht(Z), te = Br(Z) === Rr, ie = [rt, Ot].indexOf(J) >= 0, ne = ie ? "width" : "height", F = gi(e, {
|
|
16566
16570
|
placement: Z,
|
|
16567
16571
|
boundary: u,
|
|
16568
16572
|
rootBoundary: d,
|
|
16569
16573
|
altBoundary: f,
|
|
16570
16574
|
padding: c
|
|
16571
16575
|
}), re = ie ? te ? Ct : it : te ? Ot : rt;
|
|
16572
|
-
|
|
16576
|
+
M[ne] > b[ne] && (re = Hi(re));
|
|
16573
16577
|
var ae = Hi(re), Se = [];
|
|
16574
|
-
if (o && Se.push(
|
|
16578
|
+
if (o && Se.push(F[J] <= 0), l && Se.push(F[re] <= 0, F[ae] <= 0), Se.every(function(he) {
|
|
16575
16579
|
return he;
|
|
16576
16580
|
})) {
|
|
16577
|
-
|
|
16581
|
+
N = Z, R = !1;
|
|
16578
16582
|
break;
|
|
16579
16583
|
}
|
|
16580
|
-
|
|
16584
|
+
E.set(Z, Se);
|
|
16581
16585
|
}
|
|
16582
|
-
if (
|
|
16583
|
-
for (var _e = p ? 3 : 1,
|
|
16586
|
+
if (R)
|
|
16587
|
+
for (var _e = p ? 3 : 1, Ze = function(je) {
|
|
16584
16588
|
var I = y.find(function(K) {
|
|
16585
|
-
var ce =
|
|
16589
|
+
var ce = E.get(K);
|
|
16586
16590
|
if (ce)
|
|
16587
16591
|
return ce.slice(0, je).every(function(oe) {
|
|
16588
16592
|
return oe;
|
|
16589
16593
|
});
|
|
16590
16594
|
});
|
|
16591
16595
|
if (I)
|
|
16592
|
-
return
|
|
16596
|
+
return N = I, "break";
|
|
16593
16597
|
}, ot = _e; ot > 0; ot--) {
|
|
16594
|
-
var st =
|
|
16598
|
+
var st = Ze(ot);
|
|
16595
16599
|
if (st === "break")
|
|
16596
16600
|
break;
|
|
16597
16601
|
}
|
|
16598
|
-
e.placement !==
|
|
16602
|
+
e.placement !== N && (e.modifiersData[r]._skip = !0, e.placement = N, e.reset = !0);
|
|
16599
16603
|
}
|
|
16600
16604
|
}
|
|
16601
16605
|
const $x = {
|
|
@@ -16697,29 +16701,29 @@ function Wx(t) {
|
|
|
16697
16701
|
rootBoundary: c,
|
|
16698
16702
|
padding: d,
|
|
16699
16703
|
altBoundary: u
|
|
16700
|
-
}), v = Ht(e.placement),
|
|
16704
|
+
}), v = Ht(e.placement), x = Br(e.placement), O = !x, y = Dl(v), M = Hx(y), b = e.modifiersData.popperOffsets, E = e.rects.reference, R = e.rects.popper, N = typeof g == "function" ? g(Object.assign({}, e.rects, {
|
|
16701
16705
|
placement: e.placement
|
|
16702
|
-
})) : g,
|
|
16703
|
-
mainAxis:
|
|
16704
|
-
altAxis:
|
|
16706
|
+
})) : g, L = typeof N == "number" ? {
|
|
16707
|
+
mainAxis: N,
|
|
16708
|
+
altAxis: N
|
|
16705
16709
|
} : Object.assign({
|
|
16706
16710
|
mainAxis: 0,
|
|
16707
16711
|
altAxis: 0
|
|
16708
|
-
},
|
|
16712
|
+
}, N), Z = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, J = {
|
|
16709
16713
|
x: 0,
|
|
16710
16714
|
y: 0
|
|
16711
16715
|
};
|
|
16712
|
-
if (
|
|
16716
|
+
if (b) {
|
|
16713
16717
|
if (o) {
|
|
16714
|
-
var te, ie = y === "y" ? rt : it, ne = y === "y" ? Ot : Ct,
|
|
16718
|
+
var te, ie = y === "y" ? rt : it, ne = y === "y" ? Ot : Ct, F = y === "y" ? "height" : "width", re = b[y], ae = re + m[ie], Se = re - m[ne], _e = h ? -R[F] / 2 : 0, Ze = x === Rr ? E[F] : R[F], ot = x === Rr ? -R[F] : -E[F], st = e.elements.arrow, he = h && st ? Nl(st) : {
|
|
16715
16719
|
width: 0,
|
|
16716
16720
|
height: 0
|
|
16717
|
-
}, je = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : tf(), I = je[ie], K = je[ne], ce = ti(0,
|
|
16718
|
-
|
|
16721
|
+
}, je = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : tf(), I = je[ie], K = je[ne], ce = ti(0, E[F], he[F]), oe = O ? E[F] / 2 - _e - ce - I - L.mainAxis : Ze - ce - I - L.mainAxis, Ce = O ? -E[F] / 2 + _e + ce + K + L.mainAxis : ot + ce + K + L.mainAxis, Me = e.elements.arrow && Ti(e.elements.arrow), Xe = Me ? y === "y" ? Me.clientTop || 0 : Me.clientLeft || 0 : 0, $n = (te = Z == null ? void 0 : Z[y]) != null ? te : 0, or = re + oe - $n - Xe, un = re + Ce - $n, dn = ti(h ? ho(ae, or) : ae, re, h ? Yn(Se, un) : Se);
|
|
16722
|
+
b[y] = dn, J[y] = dn - re;
|
|
16719
16723
|
}
|
|
16720
16724
|
if (l) {
|
|
16721
|
-
var Yt, Mt = y === "x" ? rt : it, yt = y === "x" ? Ot : Ct, vt =
|
|
16722
|
-
|
|
16725
|
+
var Yt, Mt = y === "x" ? rt : it, yt = y === "x" ? Ot : Ct, vt = b[M], $t = M === "y" ? "height" : "width", Zt = vt + m[Mt], Vt = vt - m[yt], Vn = [rt, it].indexOf(v) !== -1, fn = (Yt = Z == null ? void 0 : Z[M]) != null ? Yt : 0, sr = Vn ? Zt : vt - E[$t] - R[$t] - fn + L.altAxis, lr = Vn ? vt + E[$t] + R[$t] - fn - L.altAxis : Vt, ar = h && Vn ? px(sr, vt, lr) : ti(h ? sr : Zt, vt, h ? lr : Vt);
|
|
16726
|
+
b[M] = ar, J[M] = ar - vt;
|
|
16723
16727
|
}
|
|
16724
16728
|
e.modifiersData[r] = J;
|
|
16725
16729
|
}
|
|
@@ -16841,13 +16845,13 @@ function ek(t) {
|
|
|
16841
16845
|
}, d = [], f = !1, h = {
|
|
16842
16846
|
state: u,
|
|
16843
16847
|
setOptions: function(v) {
|
|
16844
|
-
var
|
|
16845
|
-
g(), u.options = Object.assign({}, o, u.options,
|
|
16848
|
+
var x = typeof v == "function" ? v(u.options) : v;
|
|
16849
|
+
g(), u.options = Object.assign({}, o, u.options, x), u.scrollParents = {
|
|
16846
16850
|
reference: nr(l) ? ni(l) : l.contextElement ? ni(l.contextElement) : [],
|
|
16847
16851
|
popper: ni(a)
|
|
16848
16852
|
};
|
|
16849
|
-
var
|
|
16850
|
-
return u.orderedModifiers =
|
|
16853
|
+
var O = Zx(Qx([].concat(r, u.options.modifiers)));
|
|
16854
|
+
return u.orderedModifiers = O.filter(function(y) {
|
|
16851
16855
|
return y.enabled;
|
|
16852
16856
|
}), p(), h.update();
|
|
16853
16857
|
},
|
|
@@ -16858,24 +16862,24 @@ function ek(t) {
|
|
|
16858
16862
|
// prefer the async Popper#update method
|
|
16859
16863
|
forceUpdate: function() {
|
|
16860
16864
|
if (!f) {
|
|
16861
|
-
var v = u.elements,
|
|
16862
|
-
if (wc(
|
|
16865
|
+
var v = u.elements, x = v.reference, O = v.popper;
|
|
16866
|
+
if (wc(x, O)) {
|
|
16863
16867
|
u.rects = {
|
|
16864
|
-
reference: Gx(
|
|
16865
|
-
popper: Nl(
|
|
16866
|
-
}, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(
|
|
16867
|
-
return u.modifiersData[
|
|
16868
|
+
reference: Gx(x, Ti(O), u.options.strategy === "fixed"),
|
|
16869
|
+
popper: Nl(O)
|
|
16870
|
+
}, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(L) {
|
|
16871
|
+
return u.modifiersData[L.name] = Object.assign({}, L.data);
|
|
16868
16872
|
});
|
|
16869
16873
|
for (var y = 0; y < u.orderedModifiers.length; y++) {
|
|
16870
16874
|
if (u.reset === !0) {
|
|
16871
16875
|
u.reset = !1, y = -1;
|
|
16872
16876
|
continue;
|
|
16873
16877
|
}
|
|
16874
|
-
var
|
|
16875
|
-
typeof
|
|
16878
|
+
var M = u.orderedModifiers[y], b = M.fn, E = M.options, R = E === void 0 ? {} : E, N = M.name;
|
|
16879
|
+
typeof b == "function" && (u = b({
|
|
16876
16880
|
state: u,
|
|
16877
|
-
options:
|
|
16878
|
-
name:
|
|
16881
|
+
options: R,
|
|
16882
|
+
name: N,
|
|
16879
16883
|
instance: h
|
|
16880
16884
|
}) || u);
|
|
16881
16885
|
}
|
|
@@ -16900,16 +16904,16 @@ function ek(t) {
|
|
|
16900
16904
|
});
|
|
16901
16905
|
function p() {
|
|
16902
16906
|
u.orderedModifiers.forEach(function(m) {
|
|
16903
|
-
var v = m.name,
|
|
16907
|
+
var v = m.name, x = m.options, O = x === void 0 ? {} : x, y = m.effect;
|
|
16904
16908
|
if (typeof y == "function") {
|
|
16905
|
-
var
|
|
16909
|
+
var M = y({
|
|
16906
16910
|
state: u,
|
|
16907
16911
|
name: v,
|
|
16908
16912
|
instance: h,
|
|
16909
|
-
options:
|
|
16910
|
-
}),
|
|
16913
|
+
options: O
|
|
16914
|
+
}), b = function() {
|
|
16911
16915
|
};
|
|
16912
|
-
d.push(
|
|
16916
|
+
d.push(M || b);
|
|
16913
16917
|
}
|
|
16914
16918
|
});
|
|
16915
16919
|
}
|
|
@@ -17027,8 +17031,8 @@ function mk(t, e) {
|
|
|
17027
17031
|
var o = i.popperRect, s = i.popperState, l = i.props, a = l.interactiveBorder, c = ck(s.placement), u = s.modifiersData.offset;
|
|
17028
17032
|
if (!u)
|
|
17029
17033
|
return !0;
|
|
17030
|
-
var d = c === "bottom" ? u.top.y : 0, f = c === "top" ? u.bottom.y : 0, h = c === "right" ? u.left.x : 0, p = c === "left" ? u.right.x : 0, g = o.top - r + d > a, m = r - o.bottom - f > a, v = o.left - n + h > a,
|
|
17031
|
-
return g || m || v ||
|
|
17034
|
+
var d = c === "bottom" ? u.top.y : 0, f = c === "top" ? u.bottom.y : 0, h = c === "right" ? u.left.x : 0, p = c === "left" ? u.right.x : 0, g = o.top - r + d > a, m = r - o.bottom - f > a, v = o.left - n + h > a, x = n - o.right - p > a;
|
|
17035
|
+
return g || m || v || x;
|
|
17032
17036
|
});
|
|
17033
17037
|
}
|
|
17034
17038
|
function ds(t, e, n) {
|
|
@@ -17286,7 +17290,7 @@ function yf(t) {
|
|
|
17286
17290
|
yf.$$tippy = !0;
|
|
17287
17291
|
var Ak = 1, zi = [], fs = [];
|
|
17288
17292
|
function Nk(t, e) {
|
|
17289
|
-
var n = Ec(t, Object.assign({}, dt, mf(Sc(e)))), r, i, o, s = !1, l = !1, a = !1, c = !1, u, d, f, h = [], p = xc(or, n.interactiveDebounce), g, m = Ak++, v = null,
|
|
17293
|
+
var n = Ec(t, Object.assign({}, dt, mf(Sc(e)))), r, i, o, s = !1, l = !1, a = !1, c = !1, u, d, f, h = [], p = xc(or, n.interactiveDebounce), g, m = Ak++, v = null, x = ak(n.plugins), O = {
|
|
17290
17294
|
// Is the instance currently enabled?
|
|
17291
17295
|
isEnabled: !0,
|
|
17292
17296
|
// Is the tippy currently showing and not transitioning out?
|
|
@@ -17304,15 +17308,15 @@ function Nk(t, e) {
|
|
|
17304
17308
|
popper: ri(),
|
|
17305
17309
|
popperInstance: v,
|
|
17306
17310
|
props: n,
|
|
17307
|
-
state:
|
|
17308
|
-
plugins:
|
|
17311
|
+
state: O,
|
|
17312
|
+
plugins: x,
|
|
17309
17313
|
// methods
|
|
17310
17314
|
clearDelayTimeouts: sr,
|
|
17311
17315
|
setProps: lr,
|
|
17312
17316
|
setContent: ar,
|
|
17313
|
-
show:
|
|
17314
|
-
hide:
|
|
17315
|
-
hideWithInteractivity:
|
|
17317
|
+
show: S,
|
|
17318
|
+
hide: k,
|
|
17319
|
+
hideWithInteractivity: C,
|
|
17316
17320
|
enable: Vn,
|
|
17317
17321
|
disable: fn,
|
|
17318
17322
|
unmount: $,
|
|
@@ -17320,90 +17324,90 @@ function Nk(t, e) {
|
|
|
17320
17324
|
};
|
|
17321
17325
|
if (!n.render)
|
|
17322
17326
|
return process.env.NODE_ENV !== "production" && Js(!0, "render() function has not been supplied."), y;
|
|
17323
|
-
var
|
|
17324
|
-
|
|
17325
|
-
var
|
|
17326
|
-
return
|
|
17327
|
-
}),
|
|
17328
|
-
return Me(), _e(), re(), ae("onCreate", [y]), n.showOnCreate && Zt(),
|
|
17327
|
+
var M = n.render(y), b = M.popper, E = M.onUpdate;
|
|
17328
|
+
b.setAttribute("data-tippy-root", ""), b.id = "tippy-" + y.id, y.popper = b, t._tippy = y, b._tippy = y;
|
|
17329
|
+
var R = x.map(function(w) {
|
|
17330
|
+
return w.fn(y);
|
|
17331
|
+
}), N = t.hasAttribute("aria-expanded");
|
|
17332
|
+
return Me(), _e(), re(), ae("onCreate", [y]), n.showOnCreate && Zt(), b.addEventListener("mouseenter", function() {
|
|
17329
17333
|
y.props.interactive && y.state.isVisible && y.clearDelayTimeouts();
|
|
17330
|
-
}),
|
|
17334
|
+
}), b.addEventListener("mouseleave", function() {
|
|
17331
17335
|
y.props.interactive && y.props.trigger.indexOf("mouseenter") >= 0 && ie().addEventListener("mousemove", p);
|
|
17332
17336
|
}), y;
|
|
17333
|
-
function
|
|
17334
|
-
var
|
|
17335
|
-
return Array.isArray(
|
|
17337
|
+
function L() {
|
|
17338
|
+
var w = y.props.touch;
|
|
17339
|
+
return Array.isArray(w) ? w : [w, 0];
|
|
17336
17340
|
}
|
|
17337
17341
|
function Z() {
|
|
17338
|
-
return
|
|
17342
|
+
return L()[0] === "hold";
|
|
17339
17343
|
}
|
|
17340
17344
|
function J() {
|
|
17341
|
-
var
|
|
17342
|
-
return !!((
|
|
17345
|
+
var w;
|
|
17346
|
+
return !!((w = y.props.render) != null && w.$$tippy);
|
|
17343
17347
|
}
|
|
17344
17348
|
function te() {
|
|
17345
17349
|
return g || t;
|
|
17346
17350
|
}
|
|
17347
17351
|
function ie() {
|
|
17348
|
-
var
|
|
17349
|
-
return
|
|
17352
|
+
var w = te().parentNode;
|
|
17353
|
+
return w ? pk(w) : document;
|
|
17350
17354
|
}
|
|
17351
17355
|
function ne() {
|
|
17352
|
-
return Ys(
|
|
17356
|
+
return Ys(b);
|
|
17353
17357
|
}
|
|
17354
|
-
function
|
|
17355
|
-
return y.state.isMounted && !y.state.isVisible || zt.isTouch || u && u.type === "focus" ? 0 : cs(y.props.delay,
|
|
17358
|
+
function F(w) {
|
|
17359
|
+
return y.state.isMounted && !y.state.isVisible || zt.isTouch || u && u.type === "focus" ? 0 : cs(y.props.delay, w ? 0 : 1, dt.delay);
|
|
17356
17360
|
}
|
|
17357
|
-
function re(
|
|
17358
|
-
|
|
17361
|
+
function re(w) {
|
|
17362
|
+
w === void 0 && (w = !1), b.style.pointerEvents = y.props.interactive && !w ? "" : "none", b.style.zIndex = "" + y.props.zIndex;
|
|
17359
17363
|
}
|
|
17360
|
-
function ae(
|
|
17361
|
-
if (B === void 0 && (B = !0),
|
|
17362
|
-
U[
|
|
17364
|
+
function ae(w, A, B) {
|
|
17365
|
+
if (B === void 0 && (B = !0), R.forEach(function(U) {
|
|
17366
|
+
U[w] && U[w].apply(U, A);
|
|
17363
17367
|
}), B) {
|
|
17364
17368
|
var W;
|
|
17365
|
-
(W = y.props)[
|
|
17369
|
+
(W = y.props)[w].apply(W, A);
|
|
17366
17370
|
}
|
|
17367
17371
|
}
|
|
17368
17372
|
function Se() {
|
|
17369
|
-
var
|
|
17370
|
-
if (
|
|
17371
|
-
var
|
|
17373
|
+
var w = y.props.aria;
|
|
17374
|
+
if (w.content) {
|
|
17375
|
+
var A = "aria-" + w.content, B = b.id, W = mr(y.props.triggerTarget || t);
|
|
17372
17376
|
W.forEach(function(U) {
|
|
17373
|
-
var Y = U.getAttribute(
|
|
17377
|
+
var Y = U.getAttribute(A);
|
|
17374
17378
|
if (y.state.isVisible)
|
|
17375
|
-
U.setAttribute(
|
|
17379
|
+
U.setAttribute(A, Y ? Y + " " + B : B);
|
|
17376
17380
|
else {
|
|
17377
17381
|
var ue = Y && Y.replace(B, "").trim();
|
|
17378
|
-
ue ? U.setAttribute(
|
|
17382
|
+
ue ? U.setAttribute(A, ue) : U.removeAttribute(A);
|
|
17379
17383
|
}
|
|
17380
17384
|
});
|
|
17381
17385
|
}
|
|
17382
17386
|
}
|
|
17383
17387
|
function _e() {
|
|
17384
|
-
if (!(
|
|
17385
|
-
var
|
|
17386
|
-
|
|
17387
|
-
y.props.interactive ?
|
|
17388
|
+
if (!(N || !y.props.aria.expanded)) {
|
|
17389
|
+
var w = mr(y.props.triggerTarget || t);
|
|
17390
|
+
w.forEach(function(A) {
|
|
17391
|
+
y.props.interactive ? A.setAttribute("aria-expanded", y.state.isVisible && A === te() ? "true" : "false") : A.removeAttribute("aria-expanded");
|
|
17388
17392
|
});
|
|
17389
17393
|
}
|
|
17390
17394
|
}
|
|
17391
|
-
function
|
|
17392
|
-
ie().removeEventListener("mousemove", p), zi = zi.filter(function(
|
|
17393
|
-
return
|
|
17395
|
+
function Ze() {
|
|
17396
|
+
ie().removeEventListener("mousemove", p), zi = zi.filter(function(w) {
|
|
17397
|
+
return w !== p;
|
|
17394
17398
|
});
|
|
17395
17399
|
}
|
|
17396
|
-
function ot(
|
|
17397
|
-
if (!(zt.isTouch && (a ||
|
|
17398
|
-
var
|
|
17399
|
-
if (!(y.props.interactive && Cc(
|
|
17400
|
+
function ot(w) {
|
|
17401
|
+
if (!(zt.isTouch && (a || w.type === "mousedown"))) {
|
|
17402
|
+
var A = w.composedPath && w.composedPath()[0] || w.target;
|
|
17403
|
+
if (!(y.props.interactive && Cc(b, A))) {
|
|
17400
17404
|
if (mr(y.props.triggerTarget || t).some(function(B) {
|
|
17401
|
-
return Cc(B,
|
|
17405
|
+
return Cc(B, A);
|
|
17402
17406
|
})) {
|
|
17403
17407
|
if (zt.isTouch || y.state.isVisible && y.props.trigger.indexOf("click") >= 0)
|
|
17404
17408
|
return;
|
|
17405
17409
|
} else
|
|
17406
|
-
ae("onClickOutside", [y,
|
|
17410
|
+
ae("onClickOutside", [y, w]);
|
|
17407
17411
|
y.props.hideOnClick === !0 && (y.clearDelayTimeouts(), y.hide(), l = !0, setTimeout(function() {
|
|
17408
17412
|
l = !1;
|
|
17409
17413
|
}), y.state.isMounted || I());
|
|
@@ -17417,38 +17421,38 @@ function Nk(t, e) {
|
|
|
17417
17421
|
a = !1;
|
|
17418
17422
|
}
|
|
17419
17423
|
function je() {
|
|
17420
|
-
var
|
|
17421
|
-
|
|
17424
|
+
var w = ie();
|
|
17425
|
+
w.addEventListener("mousedown", ot, !0), w.addEventListener("touchend", ot, Ln), w.addEventListener("touchstart", he, Ln), w.addEventListener("touchmove", st, Ln);
|
|
17422
17426
|
}
|
|
17423
17427
|
function I() {
|
|
17424
|
-
var
|
|
17425
|
-
|
|
17428
|
+
var w = ie();
|
|
17429
|
+
w.removeEventListener("mousedown", ot, !0), w.removeEventListener("touchend", ot, Ln), w.removeEventListener("touchstart", he, Ln), w.removeEventListener("touchmove", st, Ln);
|
|
17426
17430
|
}
|
|
17427
|
-
function K(
|
|
17428
|
-
oe(
|
|
17429
|
-
!y.state.isVisible &&
|
|
17431
|
+
function K(w, A) {
|
|
17432
|
+
oe(w, function() {
|
|
17433
|
+
!y.state.isVisible && b.parentNode && b.parentNode.contains(b) && A();
|
|
17430
17434
|
});
|
|
17431
17435
|
}
|
|
17432
|
-
function ce(
|
|
17433
|
-
oe(
|
|
17436
|
+
function ce(w, A) {
|
|
17437
|
+
oe(w, A);
|
|
17434
17438
|
}
|
|
17435
|
-
function oe(
|
|
17439
|
+
function oe(w, A) {
|
|
17436
17440
|
var B = ne().box;
|
|
17437
17441
|
function W(U) {
|
|
17438
|
-
U.target === B && (ds(B, "remove", W),
|
|
17442
|
+
U.target === B && (ds(B, "remove", W), A());
|
|
17439
17443
|
}
|
|
17440
|
-
if (
|
|
17441
|
-
return
|
|
17444
|
+
if (w === 0)
|
|
17445
|
+
return A();
|
|
17442
17446
|
ds(B, "remove", d), ds(B, "add", W), d = W;
|
|
17443
17447
|
}
|
|
17444
|
-
function Ce(
|
|
17448
|
+
function Ce(w, A, B) {
|
|
17445
17449
|
B === void 0 && (B = !1);
|
|
17446
17450
|
var W = mr(y.props.triggerTarget || t);
|
|
17447
17451
|
W.forEach(function(U) {
|
|
17448
|
-
U.addEventListener(
|
|
17452
|
+
U.addEventListener(w, A, B), h.push({
|
|
17449
17453
|
node: U,
|
|
17450
|
-
eventType:
|
|
17451
|
-
handler:
|
|
17454
|
+
eventType: w,
|
|
17455
|
+
handler: A,
|
|
17452
17456
|
options: B
|
|
17453
17457
|
});
|
|
17454
17458
|
});
|
|
@@ -17458,9 +17462,9 @@ function Nk(t, e) {
|
|
|
17458
17462
|
passive: !0
|
|
17459
17463
|
}), Ce("touchend", un, {
|
|
17460
17464
|
passive: !0
|
|
17461
|
-
})), lk(y.props.trigger).forEach(function(
|
|
17462
|
-
if (
|
|
17463
|
-
switch (Ce(
|
|
17465
|
+
})), lk(y.props.trigger).forEach(function(w) {
|
|
17466
|
+
if (w !== "manual")
|
|
17467
|
+
switch (Ce(w, $n), w) {
|
|
17464
17468
|
case "mouseenter":
|
|
17465
17469
|
Ce("mouseleave", un);
|
|
17466
17470
|
break;
|
|
@@ -17473,25 +17477,25 @@ function Nk(t, e) {
|
|
|
17473
17477
|
}
|
|
17474
17478
|
});
|
|
17475
17479
|
}
|
|
17476
|
-
function
|
|
17477
|
-
h.forEach(function(
|
|
17478
|
-
var
|
|
17479
|
-
|
|
17480
|
+
function Xe() {
|
|
17481
|
+
h.forEach(function(w) {
|
|
17482
|
+
var A = w.node, B = w.eventType, W = w.handler, U = w.options;
|
|
17483
|
+
A.removeEventListener(B, W, U);
|
|
17480
17484
|
}), h = [];
|
|
17481
17485
|
}
|
|
17482
|
-
function $n(
|
|
17483
|
-
var
|
|
17484
|
-
if (!(!y.state.isEnabled || Yt(
|
|
17485
|
-
var W = ((
|
|
17486
|
-
u =
|
|
17487
|
-
return U(
|
|
17488
|
-
}),
|
|
17486
|
+
function $n(w) {
|
|
17487
|
+
var A, B = !1;
|
|
17488
|
+
if (!(!y.state.isEnabled || Yt(w) || l)) {
|
|
17489
|
+
var W = ((A = u) == null ? void 0 : A.type) === "focus";
|
|
17490
|
+
u = w, g = w.currentTarget, _e(), !y.state.isVisible && dk(w) && zi.forEach(function(U) {
|
|
17491
|
+
return U(w);
|
|
17492
|
+
}), w.type === "click" && (y.props.trigger.indexOf("mouseenter") < 0 || s) && y.props.hideOnClick !== !1 && y.state.isVisible ? B = !0 : Zt(w), w.type === "click" && (s = !B), B && !W && Vt(w);
|
|
17489
17493
|
}
|
|
17490
17494
|
}
|
|
17491
|
-
function or(
|
|
17492
|
-
var
|
|
17493
|
-
if (!(
|
|
17494
|
-
var W = $t().concat(
|
|
17495
|
+
function or(w) {
|
|
17496
|
+
var A = w.target, B = te().contains(A) || b.contains(A);
|
|
17497
|
+
if (!(w.type === "mousemove" && B)) {
|
|
17498
|
+
var W = $t().concat(b).map(function(U) {
|
|
17495
17499
|
var Y, ue = U._tippy, ge = (Y = ue.popperInstance) == null ? void 0 : Y.state;
|
|
17496
17500
|
return ge ? {
|
|
17497
17501
|
popperRect: U.getBoundingClientRect(),
|
|
@@ -17499,28 +17503,28 @@ function Nk(t, e) {
|
|
|
17499
17503
|
props: n
|
|
17500
17504
|
} : null;
|
|
17501
17505
|
}).filter(Boolean);
|
|
17502
|
-
mk(W,
|
|
17506
|
+
mk(W, w) && (Ze(), Vt(w));
|
|
17503
17507
|
}
|
|
17504
17508
|
}
|
|
17505
|
-
function un(
|
|
17506
|
-
var
|
|
17507
|
-
if (!
|
|
17509
|
+
function un(w) {
|
|
17510
|
+
var A = Yt(w) || y.props.trigger.indexOf("click") >= 0 && s;
|
|
17511
|
+
if (!A) {
|
|
17508
17512
|
if (y.props.interactive) {
|
|
17509
|
-
y.hideWithInteractivity(
|
|
17513
|
+
y.hideWithInteractivity(w);
|
|
17510
17514
|
return;
|
|
17511
17515
|
}
|
|
17512
|
-
Vt(
|
|
17516
|
+
Vt(w);
|
|
17513
17517
|
}
|
|
17514
17518
|
}
|
|
17515
|
-
function dn(
|
|
17516
|
-
y.props.trigger.indexOf("focusin") < 0 &&
|
|
17519
|
+
function dn(w) {
|
|
17520
|
+
y.props.trigger.indexOf("focusin") < 0 && w.target !== te() || y.props.interactive && w.relatedTarget && b.contains(w.relatedTarget) || Vt(w);
|
|
17517
17521
|
}
|
|
17518
|
-
function Yt(
|
|
17519
|
-
return zt.isTouch ? Z() !==
|
|
17522
|
+
function Yt(w) {
|
|
17523
|
+
return zt.isTouch ? Z() !== w.type.indexOf("touch") >= 0 : !1;
|
|
17520
17524
|
}
|
|
17521
17525
|
function Mt() {
|
|
17522
17526
|
yt();
|
|
17523
|
-
var
|
|
17527
|
+
var w = y.props, A = w.popperOptions, B = w.placement, W = w.offset, U = w.getReferenceClientRect, Y = w.moveTransition, ue = J() ? Ys(b).arrow : null, ge = U ? {
|
|
17524
17528
|
getBoundingClientRect: U,
|
|
17525
17529
|
contextElement: U.contextElement || te()
|
|
17526
17530
|
} : t, He = {
|
|
@@ -17569,7 +17573,7 @@ function Nk(t, e) {
|
|
|
17569
17573
|
element: ue,
|
|
17570
17574
|
padding: 3
|
|
17571
17575
|
}
|
|
17572
|
-
}), lt.push.apply(lt, (
|
|
17576
|
+
}), lt.push.apply(lt, (A == null ? void 0 : A.modifiers) || []), y.popperInstance = nk(ge, b, Object.assign({}, A, {
|
|
17573
17577
|
placement: B,
|
|
17574
17578
|
onFirstUpdate: f,
|
|
17575
17579
|
modifiers: lt
|
|
@@ -17579,8 +17583,8 @@ function Nk(t, e) {
|
|
|
17579
17583
|
y.popperInstance && (y.popperInstance.destroy(), y.popperInstance = null);
|
|
17580
17584
|
}
|
|
17581
17585
|
function vt() {
|
|
17582
|
-
var
|
|
17583
|
-
y.props.interactive &&
|
|
17586
|
+
var w = y.props.appendTo, A, B = te();
|
|
17587
|
+
y.props.interactive && w === uf || w === "parent" ? A = B.parentNode : A = df(w, [B]), A.contains(b) || A.appendChild(b), y.state.isMounted = !0, Mt(), process.env.NODE_ENV !== "production" && tn(y.props.interactive && w === dt.appendTo && B.nextElementSibling !== b, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
|
|
17584
17588
|
|
|
17585
17589
|
`, "Using a wrapper <div> or <span> tag around the reference element", "solves this by creating a new parentNode context.", `
|
|
17586
17590
|
|
|
@@ -17589,25 +17593,25 @@ function Nk(t, e) {
|
|
|
17589
17593
|
`, "See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "));
|
|
17590
17594
|
}
|
|
17591
17595
|
function $t() {
|
|
17592
|
-
return po(
|
|
17596
|
+
return po(b.querySelectorAll("[data-tippy-root]"));
|
|
17593
17597
|
}
|
|
17594
|
-
function Zt(
|
|
17595
|
-
y.clearDelayTimeouts(),
|
|
17596
|
-
var
|
|
17597
|
-
zt.isTouch && W === "hold" && U && (
|
|
17598
|
+
function Zt(w) {
|
|
17599
|
+
y.clearDelayTimeouts(), w && ae("onTrigger", [y, w]), je();
|
|
17600
|
+
var A = F(!0), B = L(), W = B[0], U = B[1];
|
|
17601
|
+
zt.isTouch && W === "hold" && U && (A = U), A ? r = setTimeout(function() {
|
|
17598
17602
|
y.show();
|
|
17599
|
-
},
|
|
17603
|
+
}, A) : y.show();
|
|
17600
17604
|
}
|
|
17601
|
-
function Vt(
|
|
17602
|
-
if (y.clearDelayTimeouts(), ae("onUntrigger", [y,
|
|
17605
|
+
function Vt(w) {
|
|
17606
|
+
if (y.clearDelayTimeouts(), ae("onUntrigger", [y, w]), !y.state.isVisible) {
|
|
17603
17607
|
I();
|
|
17604
17608
|
return;
|
|
17605
17609
|
}
|
|
17606
|
-
if (!(y.props.trigger.indexOf("mouseenter") >= 0 && y.props.trigger.indexOf("click") >= 0 && ["mouseleave", "mousemove"].indexOf(
|
|
17607
|
-
var
|
|
17608
|
-
|
|
17610
|
+
if (!(y.props.trigger.indexOf("mouseenter") >= 0 && y.props.trigger.indexOf("click") >= 0 && ["mouseleave", "mousemove"].indexOf(w.type) >= 0 && s)) {
|
|
17611
|
+
var A = F(!1);
|
|
17612
|
+
A ? i = setTimeout(function() {
|
|
17609
17613
|
y.state.isVisible && y.hide();
|
|
17610
|
-
},
|
|
17614
|
+
}, A) : o = requestAnimationFrame(function() {
|
|
17611
17615
|
y.hide();
|
|
17612
17616
|
});
|
|
17613
17617
|
}
|
|
@@ -17621,36 +17625,36 @@ function Nk(t, e) {
|
|
|
17621
17625
|
function sr() {
|
|
17622
17626
|
clearTimeout(r), clearTimeout(i), cancelAnimationFrame(o);
|
|
17623
17627
|
}
|
|
17624
|
-
function lr(
|
|
17628
|
+
function lr(w) {
|
|
17625
17629
|
if (process.env.NODE_ENV !== "production" && tn(y.state.isDestroyed, fr("setProps")), !y.state.isDestroyed) {
|
|
17626
|
-
ae("onBeforeUpdate", [y,
|
|
17627
|
-
var
|
|
17630
|
+
ae("onBeforeUpdate", [y, w]), Xe();
|
|
17631
|
+
var A = y.props, B = Ec(t, Object.assign({}, A, Sc(w), {
|
|
17628
17632
|
ignoreAttributes: !0
|
|
17629
17633
|
}));
|
|
17630
|
-
y.props = B, Me(),
|
|
17634
|
+
y.props = B, Me(), A.interactiveDebounce !== B.interactiveDebounce && (Ze(), p = xc(or, B.interactiveDebounce)), A.triggerTarget && !B.triggerTarget ? mr(A.triggerTarget).forEach(function(W) {
|
|
17631
17635
|
W.removeAttribute("aria-expanded");
|
|
17632
|
-
}) : B.triggerTarget && t.removeAttribute("aria-expanded"), _e(), re(),
|
|
17636
|
+
}) : B.triggerTarget && t.removeAttribute("aria-expanded"), _e(), re(), E && E(A, B), y.popperInstance && (Mt(), $t().forEach(function(W) {
|
|
17633
17637
|
requestAnimationFrame(W._tippy.popperInstance.forceUpdate);
|
|
17634
|
-
})), ae("onAfterUpdate", [y,
|
|
17638
|
+
})), ae("onAfterUpdate", [y, w]);
|
|
17635
17639
|
}
|
|
17636
17640
|
}
|
|
17637
|
-
function ar(
|
|
17641
|
+
function ar(w) {
|
|
17638
17642
|
y.setProps({
|
|
17639
|
-
content:
|
|
17643
|
+
content: w
|
|
17640
17644
|
});
|
|
17641
17645
|
}
|
|
17642
|
-
function
|
|
17646
|
+
function S() {
|
|
17643
17647
|
process.env.NODE_ENV !== "production" && tn(y.state.isDestroyed, fr("show"));
|
|
17644
|
-
var
|
|
17645
|
-
if (!(
|
|
17646
|
-
if (y.state.isVisible = !0, J() && (
|
|
17648
|
+
var w = y.state.isVisible, A = y.state.isDestroyed, B = !y.state.isEnabled, W = zt.isTouch && !y.props.touch, U = cs(y.props.duration, 0, dt.duration);
|
|
17649
|
+
if (!(w || A || B || W) && !te().hasAttribute("disabled") && (ae("onShow", [y], !1), y.props.onShow(y) !== !1)) {
|
|
17650
|
+
if (y.state.isVisible = !0, J() && (b.style.visibility = "visible"), re(), je(), y.state.isMounted || (b.style.transition = "none"), J()) {
|
|
17647
17651
|
var Y = ne(), ue = Y.box, ge = Y.content;
|
|
17648
17652
|
us([ue, ge], 0);
|
|
17649
17653
|
}
|
|
17650
17654
|
f = function() {
|
|
17651
17655
|
var lt;
|
|
17652
17656
|
if (!(!y.state.isVisible || c)) {
|
|
17653
|
-
if (c = !0,
|
|
17657
|
+
if (c = !0, b.offsetHeight, b.style.transition = y.props.moveTransition, J() && y.props.animation) {
|
|
17654
17658
|
var Bn = ne(), hn = Bn.box, Bt = Bn.content;
|
|
17655
17659
|
us([hn, Bt], U), Oc([hn, Bt], "visible");
|
|
17656
17660
|
}
|
|
@@ -17661,29 +17665,29 @@ function Nk(t, e) {
|
|
|
17661
17665
|
}, vt();
|
|
17662
17666
|
}
|
|
17663
17667
|
}
|
|
17664
|
-
function
|
|
17668
|
+
function k() {
|
|
17665
17669
|
process.env.NODE_ENV !== "production" && tn(y.state.isDestroyed, fr("hide"));
|
|
17666
|
-
var
|
|
17667
|
-
if (!(
|
|
17668
|
-
if (y.state.isVisible = !1, y.state.isShown = !1, c = !1, s = !1, J() && (
|
|
17670
|
+
var w = !y.state.isVisible, A = y.state.isDestroyed, B = !y.state.isEnabled, W = cs(y.props.duration, 1, dt.duration);
|
|
17671
|
+
if (!(w || A || B) && (ae("onHide", [y], !1), y.props.onHide(y) !== !1)) {
|
|
17672
|
+
if (y.state.isVisible = !1, y.state.isShown = !1, c = !1, s = !1, J() && (b.style.visibility = "hidden"), Ze(), I(), re(!0), J()) {
|
|
17669
17673
|
var U = ne(), Y = U.box, ue = U.content;
|
|
17670
17674
|
y.props.animation && (us([Y, ue], W), Oc([Y, ue], "hidden"));
|
|
17671
17675
|
}
|
|
17672
17676
|
Se(), _e(), y.props.animation ? J() && K(W, y.unmount) : y.unmount();
|
|
17673
17677
|
}
|
|
17674
17678
|
}
|
|
17675
|
-
function
|
|
17676
|
-
process.env.NODE_ENV !== "production" && tn(y.state.isDestroyed, fr("hideWithInteractivity")), ie().addEventListener("mousemove", p), kc(zi, p), p(
|
|
17679
|
+
function C(w) {
|
|
17680
|
+
process.env.NODE_ENV !== "production" && tn(y.state.isDestroyed, fr("hideWithInteractivity")), ie().addEventListener("mousemove", p), kc(zi, p), p(w);
|
|
17677
17681
|
}
|
|
17678
17682
|
function $() {
|
|
17679
|
-
process.env.NODE_ENV !== "production" && tn(y.state.isDestroyed, fr("unmount")), y.state.isVisible && y.hide(), y.state.isMounted && (yt(), $t().forEach(function(
|
|
17680
|
-
|
|
17681
|
-
}),
|
|
17682
|
-
return
|
|
17683
|
+
process.env.NODE_ENV !== "production" && tn(y.state.isDestroyed, fr("unmount")), y.state.isVisible && y.hide(), y.state.isMounted && (yt(), $t().forEach(function(w) {
|
|
17684
|
+
w._tippy.unmount();
|
|
17685
|
+
}), b.parentNode && b.parentNode.removeChild(b), fs = fs.filter(function(w) {
|
|
17686
|
+
return w !== y;
|
|
17683
17687
|
}), y.state.isMounted = !1, ae("onHidden", [y]));
|
|
17684
17688
|
}
|
|
17685
17689
|
function q() {
|
|
17686
|
-
process.env.NODE_ENV !== "production" && tn(y.state.isDestroyed, fr("destroy")), !y.state.isDestroyed && (y.clearDelayTimeouts(), y.unmount(),
|
|
17690
|
+
process.env.NODE_ENV !== "production" && tn(y.state.isDestroyed, fr("destroy")), !y.state.isDestroyed && (y.clearDelayTimeouts(), y.unmount(), Xe(), delete t._tippy, y.state.isDestroyed = !0, ae("onDestroy", [y]));
|
|
17687
17691
|
}
|
|
17688
17692
|
}
|
|
17689
17693
|
function Fr(t, e) {
|
|
@@ -17762,13 +17766,13 @@ class Dk {
|
|
|
17762
17766
|
if (g || !a && !c)
|
|
17763
17767
|
return;
|
|
17764
17768
|
this.createTooltip();
|
|
17765
|
-
const { ranges:
|
|
17769
|
+
const { ranges: x } = m, O = Math.min(...x.map((b) => b.$from.pos)), y = Math.max(...x.map((b) => b.$to.pos));
|
|
17766
17770
|
if (!((d = this.shouldShow) === null || d === void 0 ? void 0 : d.call(this, {
|
|
17767
17771
|
editor: this.editor,
|
|
17768
17772
|
view: l,
|
|
17769
17773
|
state: p,
|
|
17770
17774
|
oldState: u,
|
|
17771
|
-
from:
|
|
17775
|
+
from: O,
|
|
17772
17776
|
to: y
|
|
17773
17777
|
}))) {
|
|
17774
17778
|
this.hide();
|
|
@@ -17777,12 +17781,12 @@ class Dk {
|
|
|
17777
17781
|
(f = this.tippy) === null || f === void 0 || f.setProps({
|
|
17778
17782
|
getReferenceClientRect: ((h = this.tippyOptions) === null || h === void 0 ? void 0 : h.getReferenceClientRect) || (() => {
|
|
17779
17783
|
if (kw(p.selection)) {
|
|
17780
|
-
let
|
|
17781
|
-
const
|
|
17782
|
-
if (
|
|
17783
|
-
return
|
|
17784
|
+
let b = l.nodeDOM(O);
|
|
17785
|
+
const E = b.dataset.nodeViewWrapper ? b : b.querySelector("[data-node-view-wrapper]");
|
|
17786
|
+
if (E && (b = E.firstChild), b)
|
|
17787
|
+
return b.getBoundingClientRect();
|
|
17784
17788
|
}
|
|
17785
|
-
return Gd(l,
|
|
17789
|
+
return Gd(l, O, y);
|
|
17786
17790
|
})
|
|
17787
17791
|
}), this.show();
|
|
17788
17792
|
}, this.editor = e, this.element = n, this.view = r, this.updateDelay = o, s && (this.shouldShow = s), this.element.addEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.view.dom.addEventListener("dragstart", this.dragstartHandler), this.editor.on("focus", this.focusHandler), this.editor.on("blur", this.blurHandler), this.tippyOptions = i, this.element.remove(), this.element.style.visibility = "visible";
|
|
@@ -17822,7 +17826,7 @@ class Dk {
|
|
|
17822
17826
|
!((e = this.tippy) === null || e === void 0) && e.popper.firstChild && this.tippy.popper.firstChild.removeEventListener("blur", this.tippyBlurHandler), (n = this.tippy) === null || n === void 0 || n.destroy(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.view.dom.removeEventListener("dragstart", this.dragstartHandler), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler);
|
|
17823
17827
|
}
|
|
17824
17828
|
}
|
|
17825
|
-
const vf = (t) => new
|
|
17829
|
+
const vf = (t) => new Ye({
|
|
17826
17830
|
key: typeof t.pluginKey == "string" ? new Rt(t.pluginKey) : t.pluginKey,
|
|
17827
17831
|
view: (e) => new Dk({ view: e, ...t })
|
|
17828
17832
|
});
|
|
@@ -17914,7 +17918,7 @@ class Ik {
|
|
|
17914
17918
|
!((e = this.tippy) === null || e === void 0) && e.popper.firstChild && this.tippy.popper.firstChild.removeEventListener("blur", this.tippyBlurHandler), (n = this.tippy) === null || n === void 0 || n.destroy(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler);
|
|
17915
17919
|
}
|
|
17916
17920
|
}
|
|
17917
|
-
const bf = (t) => new
|
|
17921
|
+
const bf = (t) => new Ye({
|
|
17918
17922
|
key: typeof t.pluginKey == "string" ? new Rt(t.pluginKey) : t.pluginKey,
|
|
17919
17923
|
view: (e) => new Ik({ view: e, ...t })
|
|
17920
17924
|
});
|
|
@@ -18039,7 +18043,7 @@ const Rk = An({
|
|
|
18039
18043
|
r && r.options.element && e.value && at(() => {
|
|
18040
18044
|
if (!e.value || !r.options.element.firstChild)
|
|
18041
18045
|
return;
|
|
18042
|
-
const i =
|
|
18046
|
+
const i = _(e.value);
|
|
18043
18047
|
e.value.append(...r.options.element.childNodes), r.contentComponent = n.ctx._, r.setOptions({
|
|
18044
18048
|
element: i
|
|
18045
18049
|
}), r.createNodeViews();
|
|
@@ -18521,7 +18525,7 @@ const $k = (t = {}) => {
|
|
|
18521
18525
|
return [
|
|
18522
18526
|
// this plugin creates a code block for pasted content from VS Code
|
|
18523
18527
|
// we can also detect the copied code language
|
|
18524
|
-
new
|
|
18528
|
+
new Ye({
|
|
18525
18529
|
key: new Rt("codeBlockVSCodeHandler"),
|
|
18526
18530
|
props: {
|
|
18527
18531
|
handlePaste: (t, e) => {
|
|
@@ -18544,7 +18548,7 @@ const $k = (t = {}) => {
|
|
|
18544
18548
|
content: "block+"
|
|
18545
18549
|
});
|
|
18546
18550
|
function Xk(t = {}) {
|
|
18547
|
-
return new
|
|
18551
|
+
return new Ye({
|
|
18548
18552
|
view(e) {
|
|
18549
18553
|
return new Qk(e, t);
|
|
18550
18554
|
}
|
|
@@ -18649,7 +18653,7 @@ class pe extends ee {
|
|
|
18649
18653
|
return pe.valid(r) ? new pe(r) : ee.near(r);
|
|
18650
18654
|
}
|
|
18651
18655
|
content() {
|
|
18652
|
-
return
|
|
18656
|
+
return P.empty;
|
|
18653
18657
|
}
|
|
18654
18658
|
eq(e) {
|
|
18655
18659
|
return e instanceof pe && e.head == this.head;
|
|
@@ -18773,7 +18777,7 @@ function nS(t) {
|
|
|
18773
18777
|
return !0;
|
|
18774
18778
|
}
|
|
18775
18779
|
function rS() {
|
|
18776
|
-
return new
|
|
18780
|
+
return new Ye({
|
|
18777
18781
|
props: {
|
|
18778
18782
|
decorations: lS,
|
|
18779
18783
|
createSelectionBetween(t, e, n) {
|
|
@@ -18822,7 +18826,7 @@ function sS(t, e) {
|
|
|
18822
18826
|
let i = T.empty;
|
|
18823
18827
|
for (let s = r.length - 1; s >= 0; s--)
|
|
18824
18828
|
i = T.from(r[s].createAndFill(null, i));
|
|
18825
|
-
let o = t.state.tr.replace(n.pos, n.pos, new
|
|
18829
|
+
let o = t.state.tr.replace(n.pos, n.pos, new P(i, 0, 0));
|
|
18826
18830
|
return o.setSelection(G.near(o.doc.resolve(n.pos + 1))), t.dispatch(o), !1;
|
|
18827
18831
|
}
|
|
18828
18832
|
function lS(t) {
|
|
@@ -18846,7 +18850,7 @@ const aS = ze.create({
|
|
|
18846
18850
|
storage: t.storage
|
|
18847
18851
|
};
|
|
18848
18852
|
return {
|
|
18849
|
-
allowGapCursor: (e = X(
|
|
18853
|
+
allowGapCursor: (e = X(z(t, "allowGapCursor", n))) !== null && e !== void 0 ? e : null
|
|
18850
18854
|
};
|
|
18851
18855
|
}
|
|
18852
18856
|
}), cS = gt.create({
|
|
@@ -19251,7 +19255,7 @@ function bS(t = {}) {
|
|
|
19251
19255
|
return t = {
|
|
19252
19256
|
depth: t.depth || 100,
|
|
19253
19257
|
newGroupDelay: t.newGroupDelay || 500
|
|
19254
|
-
}, new
|
|
19258
|
+
}, new Ye({
|
|
19255
19259
|
key: Zn,
|
|
19256
19260
|
state: {
|
|
19257
19261
|
init() {
|
|
@@ -19652,8 +19656,8 @@ const kf = xf(!1, !0), Sf = xf(!0, !0), wS = ze.create({
|
|
|
19652
19656
|
name: "starterKit",
|
|
19653
19657
|
addExtensions() {
|
|
19654
19658
|
var t, e, n, r, i, o, s, l, a, c, u, d, f, h, p, g, m, v;
|
|
19655
|
-
const
|
|
19656
|
-
return this.options.blockquote !== !1 &&
|
|
19659
|
+
const x = [];
|
|
19660
|
+
return this.options.blockquote !== !1 && x.push(Bk.configure((t = this.options) === null || t === void 0 ? void 0 : t.blockquote)), this.options.bold !== !1 && x.push(jk.configure((e = this.options) === null || e === void 0 ? void 0 : e.bold)), this.options.bulletList !== !1 && x.push(Wk.configure((n = this.options) === null || n === void 0 ? void 0 : n.bulletList)), this.options.code !== !1 && x.push(Kk.configure((r = this.options) === null || r === void 0 ? void 0 : r.code)), this.options.codeBlock !== !1 && x.push(Yk.configure((i = this.options) === null || i === void 0 ? void 0 : i.codeBlock)), this.options.document !== !1 && x.push(Zk.configure((o = this.options) === null || o === void 0 ? void 0 : o.document)), this.options.dropcursor !== !1 && x.push(eS.configure((s = this.options) === null || s === void 0 ? void 0 : s.dropcursor)), this.options.gapcursor !== !1 && x.push(aS.configure((l = this.options) === null || l === void 0 ? void 0 : l.gapcursor)), this.options.hardBreak !== !1 && x.push(cS.configure((a = this.options) === null || a === void 0 ? void 0 : a.hardBreak)), this.options.heading !== !1 && x.push(uS.configure((c = this.options) === null || c === void 0 ? void 0 : c.heading)), this.options.history !== !1 && x.push(wS.configure((u = this.options) === null || u === void 0 ? void 0 : u.history)), this.options.horizontalRule !== !1 && x.push(xS.configure((d = this.options) === null || d === void 0 ? void 0 : d.horizontalRule)), this.options.italic !== !1 && x.push(MS.configure((f = this.options) === null || f === void 0 ? void 0 : f.italic)), this.options.listItem !== !1 && x.push(TS.configure((h = this.options) === null || h === void 0 ? void 0 : h.listItem)), this.options.orderedList !== !1 && x.push(AS.configure((p = this.options) === null || p === void 0 ? void 0 : p.orderedList)), this.options.paragraph !== !1 && x.push(NS.configure((g = this.options) === null || g === void 0 ? void 0 : g.paragraph)), this.options.strike !== !1 && x.push(PS.configure((m = this.options) === null || m === void 0 ? void 0 : m.strike)), this.options.text !== !1 && x.push(RS.configure((v = this.options) === null || v === void 0 ? void 0 : v.text)), x;
|
|
19657
19661
|
}
|
|
19658
19662
|
}), VS = ze.create({
|
|
19659
19663
|
name: "placeholder",
|
|
@@ -19670,7 +19674,7 @@ const kf = xf(!1, !0), Sf = xf(!0, !0), wS = ze.create({
|
|
|
19670
19674
|
},
|
|
19671
19675
|
addProseMirrorPlugins() {
|
|
19672
19676
|
return [
|
|
19673
|
-
new
|
|
19677
|
+
new Ye({
|
|
19674
19678
|
key: new Rt("placeholder"),
|
|
19675
19679
|
props: {
|
|
19676
19680
|
decorations: ({ doc: t, selection: e }) => {
|
|
@@ -19706,7 +19710,7 @@ const kf = xf(!1, !0), Sf = xf(!0, !0), wS = ze.create({
|
|
|
19706
19710
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19707
19711
|
viewBox: "0 0 16 16",
|
|
19708
19712
|
fill: "currentColor"
|
|
19709
|
-
}, zS = /* @__PURE__ */
|
|
19713
|
+
}, zS = /* @__PURE__ */ j("path", { d: "M3 4.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM6.25 3a.75.75 0 0 0 0 1.5h7a.75.75 0 0 0 0-1.5h-7ZM6.25 7.25a.75.75 0 0 0 0 1.5h7a.75.75 0 0 0 0-1.5h-7ZM6.25 11.5a.75.75 0 0 0 0 1.5h7a.75.75 0 0 0 0-1.5h-7ZM4 12.25a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM3 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" }, null, -1), FS = [
|
|
19710
19714
|
zS
|
|
19711
19715
|
];
|
|
19712
19716
|
function _S(t, e) {
|
|
@@ -19716,7 +19720,7 @@ const jS = /* @__PURE__ */ ke(BS, [["render", _S]]), HS = {}, WS = {
|
|
|
19716
19720
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19717
19721
|
viewBox: "0 0 16 16",
|
|
19718
19722
|
fill: "currentColor"
|
|
19719
|
-
}, qS = /* @__PURE__ */
|
|
19723
|
+
}, qS = /* @__PURE__ */ j("path", {
|
|
19720
19724
|
"fill-rule": "evenodd",
|
|
19721
19725
|
d: "M12.5 9.75A2.75 2.75 0 0 0 9.75 7H4.56l2.22 2.22a.75.75 0 1 1-1.06 1.06l-3.5-3.5a.75.75 0 0 1 0-1.06l3.5-3.5a.75.75 0 0 1 1.06 1.06L4.56 5.5h5.19a4.25 4.25 0 0 1 0 8.5h-1a.75.75 0 0 1 0-1.5h1a2.75 2.75 0 0 0 2.75-2.75Z",
|
|
19722
19726
|
"clip-rule": "evenodd"
|
|
@@ -19730,7 +19734,7 @@ const JS = /* @__PURE__ */ ke(HS, [["render", KS]]), GS = {}, YS = {
|
|
|
19730
19734
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19731
19735
|
viewBox: "0 0 16 16",
|
|
19732
19736
|
fill: "currentColor"
|
|
19733
|
-
}, ZS = /* @__PURE__ */
|
|
19737
|
+
}, ZS = /* @__PURE__ */ j("path", {
|
|
19734
19738
|
"fill-rule": "evenodd",
|
|
19735
19739
|
d: "M3.5 9.75A2.75 2.75 0 0 1 6.25 7h5.19L9.22 9.22a.75.75 0 1 0 1.06 1.06l3.5-3.5a.75.75 0 0 0 0-1.06l-3.5-3.5a.75.75 0 1 0-1.06 1.06l2.22 2.22H6.25a4.25 4.25 0 0 0 0 8.5h1a.75.75 0 0 0 0-1.5h-1A2.75 2.75 0 0 1 3.5 9.75Z",
|
|
19736
19740
|
"clip-rule": "evenodd"
|
|
@@ -19746,7 +19750,7 @@ const eO = /* @__PURE__ */ ke(GS, [["render", QS]]), tO = {}, nO = {
|
|
|
19746
19750
|
height: "800px",
|
|
19747
19751
|
viewBox: "0 0 1920 1920",
|
|
19748
19752
|
xmlns: "http://www.w3.org/2000/svg"
|
|
19749
|
-
}, rO = /* @__PURE__ */
|
|
19753
|
+
}, rO = /* @__PURE__ */ j("path", {
|
|
19750
19754
|
d: "M754.429 0v274.423h235.885L647.457 1645.85H343V1920h822.994v-274.149H930.11l342.857-1371.428h304.32V0z",
|
|
19751
19755
|
"fill-rule": "evenodd"
|
|
19752
19756
|
}, null, -1), iO = [
|
|
@@ -19759,7 +19763,7 @@ const sO = /* @__PURE__ */ ke(tO, [["render", oO]]), lO = {}, aO = {
|
|
|
19759
19763
|
fill: "#000000",
|
|
19760
19764
|
viewBox: "0 0 1920 1920",
|
|
19761
19765
|
xmlns: "http://www.w3.org/2000/svg"
|
|
19762
|
-
}, cO = /* @__PURE__ */
|
|
19766
|
+
}, cO = /* @__PURE__ */ j("path", {
|
|
19763
19767
|
d: "M480.286 822.857h548.571c151.269 0 274.286-123.017 274.286-274.286 0-151.268-123.017-274.285-274.286-274.285H480.286v548.571Zm0 822.857H1166c151.269 0 274.286-123.017 274.286-274.285 0-151.269-123.017-274.286-274.286-274.286H480.286v548.571ZM1166 1920H206V0h822.857c302.537 0 548.572 246.034 548.572 548.571 0 134.263-48.549 257.418-128.778 352.732 159.223 96.137 265.92 270.994 265.92 470.126 0 302.537-246.034 548.571-548.571 548.571Z",
|
|
19764
19768
|
"fill-rule": "evenodd"
|
|
19765
19769
|
}, null, -1), uO = [
|
|
@@ -19774,7 +19778,7 @@ const fO = /* @__PURE__ */ ke(lO, [["render", dO]]), hO = {}, pO = {
|
|
|
19774
19778
|
height: "800px",
|
|
19775
19779
|
viewBox: "0 0 16 16",
|
|
19776
19780
|
xmlns: "http://www.w3.org/2000/svg"
|
|
19777
|
-
}, mO = /* @__PURE__ */
|
|
19781
|
+
}, mO = /* @__PURE__ */ j("path", { d: "M3.59 3.03h12.2v1.26H3.59zm0 4.29h12.2v1.26H3.59zm0 4.35h12.2v1.26H3.59zM.99 4.79h.49V2.52H.6v.45h.39v1.82zm.87 3.88H.91l.14-.11.3-.24c.35-.28.49-.5.49-.79A.74.74 0 0 0 1 6.8a.77.77 0 0 0-.81.84h.52A.34.34 0 0 1 1 7.25a.31.31 0 0 1 .31.31.6.6 0 0 1-.22.44l-.87.75v.39h1.64zm-.36 3.56a.52.52 0 0 0 .28-.48.67.67 0 0 0-.78-.62.71.71 0 0 0-.77.75h.5a.3.3 0 0 1 .27-.32.26.26 0 1 1 0 .51H.91v.38H1c.23 0 .37.11.37.29a.29.29 0 0 1-.33.29.35.35 0 0 1-.36-.35H.21a.76.76 0 0 0 .83.8.74.74 0 0 0 .83-.72.53.53 0 0 0-.37-.53z" }, null, -1), gO = [
|
|
19778
19782
|
mO
|
|
19779
19783
|
];
|
|
19780
19784
|
function yO(t, e) {
|
|
@@ -19790,9 +19794,9 @@ const vO = /* @__PURE__ */ ke(hO, [["render", yO]]), bO = {}, wO = {
|
|
|
19790
19794
|
height: "800px",
|
|
19791
19795
|
viewBox: "0 0 96.639 96.639",
|
|
19792
19796
|
"xml:space": "preserve"
|
|
19793
|
-
}, xO = /* @__PURE__ */
|
|
19794
|
-
/* @__PURE__ */
|
|
19795
|
-
/* @__PURE__ */
|
|
19797
|
+
}, xO = /* @__PURE__ */ j("g", null, [
|
|
19798
|
+
/* @__PURE__ */ j("g", null, [
|
|
19799
|
+
/* @__PURE__ */ j("path", { d: `M95.263,12.29V2.277C95.263,1.019,94.245,0,92.987,0H36.921C25.539,0,17.05,2.442,10.969,7.47\r
|
|
19796
19800
|
c-6.364,5.265-9.594,12.724-9.594,22.167c0,10.367,3.124,18.054,9.547,23.499c6.399,5.423,15.696,8.175,27.63,8.175h10.38v33.051\r
|
|
19797
19801
|
c0,1.258,1.02,2.277,2.278,2.277h7.096c1.257,0,2.276-1.02,2.276-2.277V14.566h9.146v79.795c0,1.258,1.021,2.276,2.277,2.276\r
|
|
19798
19802
|
h6.873c1.257,0,2.277-1.021,2.277-2.276V14.566h11.83C94.247,14.566,95.263,13.547,95.263,12.29z` })
|
|
@@ -19809,7 +19813,7 @@ const OO = /* @__PURE__ */ ke(bO, [["render", SO]]), CO = {}, MO = {
|
|
|
19809
19813
|
viewBox: "0 0 24 24",
|
|
19810
19814
|
"stroke-width": "1.5",
|
|
19811
19815
|
stroke: "currentColor"
|
|
19812
|
-
}, TO = /* @__PURE__ */
|
|
19816
|
+
}, TO = /* @__PURE__ */ j("path", {
|
|
19813
19817
|
"stroke-linecap": "round",
|
|
19814
19818
|
"stroke-linejoin": "round",
|
|
19815
19819
|
d: "M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"
|
|
@@ -19871,26 +19875,26 @@ const NO = /* @__PURE__ */ ke(CO, [["render", AO]]), DO = {
|
|
|
19871
19875
|
function l(a, c, u, d) {
|
|
19872
19876
|
return d ? c === "chain" ? u ? !o.value.can().chain().focus()[a](u).run() : !o.value.can().chain().focus()[a]().run() : !o.value.can()[a]().run() : !1;
|
|
19873
19877
|
}
|
|
19874
|
-
return (a, c) =>
|
|
19875
|
-
|
|
19876
|
-
|
|
19877
|
-
(D(), V(on, null, vn(r, (u) =>
|
|
19878
|
+
return (a, c) => _(o) ? (D(), V("div", DO, [
|
|
19879
|
+
j("div", IO, [
|
|
19880
|
+
j("div", PO, [
|
|
19881
|
+
(D(), V(on, null, vn(r, (u) => j("div", {
|
|
19878
19882
|
key: u.method,
|
|
19879
19883
|
class: le(["w-8 h-8 flex items-center justify-center text-xs rounded", {
|
|
19880
19884
|
"cursor-pointer": !l(u.method, u.type, u.params, u.disableCheck),
|
|
19881
|
-
"is-active text-white !bg-zinc-200":
|
|
19885
|
+
"is-active text-white !bg-zinc-200": _(o).isActive(u.label)
|
|
19882
19886
|
}]),
|
|
19883
19887
|
onClick: (d) => s(u.method, u.type, u.params)
|
|
19884
19888
|
}, [
|
|
19885
19889
|
u.icon ? (D(), ct(bi(u.icon), {
|
|
19886
19890
|
key: 0,
|
|
19887
19891
|
class: le(["", { "w-3 h-3": u.smallIcon, "w-4 h-4": !u.smallIcon }])
|
|
19888
|
-
}, null, 8, ["class"])) : (D(), V("span", $O, Le(
|
|
19892
|
+
}, null, 8, ["class"])) : (D(), V("span", $O, Le(_(Os).capitalize(u.label)), 1))
|
|
19889
19893
|
], 10, RO)), 64))
|
|
19890
19894
|
])
|
|
19891
19895
|
]),
|
|
19892
|
-
|
|
19893
|
-
Te(
|
|
19896
|
+
j("div", VO, [
|
|
19897
|
+
Te(_(Rk), { editor: _(o) }, null, 8, ["editor"])
|
|
19894
19898
|
])
|
|
19895
19899
|
])) : ve("", !0);
|
|
19896
19900
|
}
|
|
@@ -19920,7 +19924,7 @@ function Of(t, e) {
|
|
|
19920
19924
|
Object.prototype.hasOwnProperty.call(e, n) && (typeof e[n] == "object" && t[n] ? Of(t[n], e[n]) : t[n] = e[n]);
|
|
19921
19925
|
}
|
|
19922
19926
|
function _O(t, e) {
|
|
19923
|
-
Of(
|
|
19927
|
+
Of(We, e);
|
|
19924
19928
|
for (const n in ms)
|
|
19925
19929
|
if (ms.hasOwnProperty(n)) {
|
|
19926
19930
|
const r = ms[n];
|
|
@@ -19929,7 +19933,7 @@ function _O(t, e) {
|
|
|
19929
19933
|
}
|
|
19930
19934
|
const WO = {
|
|
19931
19935
|
install: _O,
|
|
19932
|
-
options:
|
|
19936
|
+
options: We
|
|
19933
19937
|
};
|
|
19934
19938
|
export {
|
|
19935
19939
|
WO as default
|