reactjs-tiptap-editor-pro 0.2.33 → 0.2.35
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/lib/{ColorPicker-MEAh4MhG.js → ColorPicker-BGCCdXrc.js} +5665 -6323
- package/lib/ColorPicker-DGbrNkQ-.cjs +142 -0
- package/lib/extension-bundle.cjs +2 -2
- package/lib/extension-bundle.d.cts +58 -69
- package/lib/extension-bundle.d.ts +58 -69
- package/lib/extension-bundle.js +9 -10
- package/lib/index.cjs +3 -3
- package/lib/index.d.cts +58 -67
- package/lib/index.d.ts +58 -67
- package/lib/index.js +927 -1007
- package/lib/{locale-bundle-DxCAtRDI.js → locale-bundle-CT7qZRHF.js} +6 -7
- package/lib/locale-bundle-PAhriAQT.cjs +1 -0
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.d.cts +58 -67
- package/lib/locale-bundle.d.ts +58 -67
- package/lib/locale-bundle.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -2
- package/lib/ColorPicker-ZncOwjAP.cjs +0 -142
- package/lib/locale-bundle-DiqW5jwb.cjs +0 -1
package/lib/index.js
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import * as
|
|
5
|
-
import { useRef as
|
|
1
|
+
var dr = Object.defineProperty;
|
|
2
|
+
var ur = (e, t, n) => t in e ? dr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var me = (e, t, n) => ur(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import * as ie from "react";
|
|
5
|
+
import { useRef as ne, useState as I, useEffect as R, useMemo as F, Fragment as Ve, useCallback as O, memo as fr, forwardRef as hr, useId as mr, useImperativeHandle as gr, useLayoutEffect as pr } from "react";
|
|
6
6
|
import { jsx as a, jsxs as p, Fragment as N } from "react/jsx-runtime";
|
|
7
|
-
import { i as
|
|
8
|
-
import { u as
|
|
7
|
+
import { i as Ke, S as re, t as vr, a as Ce, b as oe, r as J, c as Z, f as yr, d as ae, e as wr, D as Xe, g as qe, A as C, h as Ye, j as Je, C as xr, k as Ze, B as Y, s as cn, l as dn, m as un, u as Te, n as vt, o as L, p as U, P as br, q as Cr, v as Tr, L as $e, I as ye, w as se, x as Ae, y as Ar, K as ge, T as fn, M as yt, z as wt, F as Sr, E as hn, G as mn, H as Pr, J as he, N as _r, O as Nr, Q as Er, R as gn, U as $r, V as Or, W as z, X as Rr, Y as Ir, Z as Dr, _ as Mr, $ as Br, a0 as kr, a1 as W, a2 as Lr, a3 as xt, a4 as bt, a5 as Ct, a6 as Tt, a7 as At, a8 as St, a9 as pn, aa as zr, ab as vn, ac as yn, ad as Fr, ae as jr, af as Hr, ag as Pt, ah as Ur, ai as Gr, aj as Wr, ak as Vr, al as Kr, am as _t, an as Nt, ao as Xr, ap as qr, aq as Yr, ar as Jr, as as Zr, at as Qr, au as ei } from "./ColorPicker-BGCCdXrc.js";
|
|
8
|
+
import { u as D, B as ti, l as M, I as we, V as Et, E as ni } from "./locale-bundle-CT7qZRHF.js";
|
|
9
9
|
import * as j from "@radix-ui/react-toast";
|
|
10
|
-
import { X as
|
|
11
|
-
import { Editor as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
function
|
|
10
|
+
import { X as ri, HelpCircle as ii, Pencil as oi, Trash2 as ai } from "lucide-react";
|
|
11
|
+
import { Editor as si, makeDropdownToolbar as li } from "easydrawer";
|
|
12
|
+
import ci from "katex";
|
|
13
|
+
import $t from "mermaid";
|
|
14
|
+
import di, { sticky as ui } from "tippy.js";
|
|
15
|
+
function Gc() {
|
|
16
16
|
var o;
|
|
17
|
-
const e =
|
|
17
|
+
const e = ne({ editor: null }), [t, n] = I(!1), [r, i] = I(null);
|
|
18
18
|
return R(() => {
|
|
19
19
|
var s;
|
|
20
20
|
(s = e.current) != null && s.editor && (n(!0), i(e.current.editor));
|
|
21
21
|
}, [e, (o = e.current) == null ? void 0 : o.editor]), { isReady: t, editor: r, editorRef: e };
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function wn(e, t) {
|
|
24
24
|
for (var n = -1, r = e == null ? 0 : e.length, i = Array(r); ++n < r; )
|
|
25
25
|
i[n] = t(e[n], n, e);
|
|
26
26
|
return i;
|
|
27
27
|
}
|
|
28
|
-
var
|
|
29
|
-
function
|
|
28
|
+
var G = Array.isArray, Ot = re ? re.prototype : void 0, Rt = Ot ? Ot.toString : void 0;
|
|
29
|
+
function xe(e) {
|
|
30
30
|
if (typeof e == "string")
|
|
31
31
|
return e;
|
|
32
|
-
if (
|
|
33
|
-
return
|
|
34
|
-
if (
|
|
35
|
-
return
|
|
32
|
+
if (G(e))
|
|
33
|
+
return wn(e, xe) + "";
|
|
34
|
+
if (Ke(e))
|
|
35
|
+
return Rt ? Rt.call(e) : "";
|
|
36
36
|
var t = e + "";
|
|
37
37
|
return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
|
|
38
38
|
}
|
|
39
|
-
var
|
|
40
|
-
function
|
|
39
|
+
var fi = 1 / 0, hi = 17976931348623157e292;
|
|
40
|
+
function mi(e) {
|
|
41
41
|
if (!e)
|
|
42
42
|
return e === 0 ? e : 0;
|
|
43
|
-
if (e =
|
|
43
|
+
if (e = vr(e), e === fi || e === -1 / 0) {
|
|
44
44
|
var t = e < 0 ? -1 : 1;
|
|
45
|
-
return t *
|
|
45
|
+
return t * hi;
|
|
46
46
|
}
|
|
47
47
|
return e === e ? e : 0;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
var t =
|
|
49
|
+
function gi(e) {
|
|
50
|
+
var t = mi(e), n = t % 1;
|
|
51
51
|
return t === t ? n ? t - n : t : 0;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function Qe(e) {
|
|
54
54
|
return e;
|
|
55
55
|
}
|
|
56
|
-
var
|
|
57
|
-
function
|
|
58
|
-
if (!
|
|
56
|
+
var pi = "[object AsyncFunction]", vi = "[object Function]", yi = "[object GeneratorFunction]", wi = "[object Proxy]";
|
|
57
|
+
function xn(e) {
|
|
58
|
+
if (!Ce(e))
|
|
59
59
|
return !1;
|
|
60
|
-
var t =
|
|
61
|
-
return t ==
|
|
60
|
+
var t = oe(e);
|
|
61
|
+
return t == vi || t == yi || t == pi || t == wi;
|
|
62
62
|
}
|
|
63
|
-
var
|
|
64
|
-
var e = /[^.]+$/.exec(
|
|
63
|
+
var Oe = J["__core-js_shared__"], It = function() {
|
|
64
|
+
var e = /[^.]+$/.exec(Oe && Oe.keys && Oe.keys.IE_PROTO || "");
|
|
65
65
|
return e ? "Symbol(src)_1." + e : "";
|
|
66
66
|
}();
|
|
67
|
-
function
|
|
68
|
-
return !!
|
|
67
|
+
function xi(e) {
|
|
68
|
+
return !!It && It in e;
|
|
69
69
|
}
|
|
70
|
-
var
|
|
71
|
-
function
|
|
70
|
+
var bi = Function.prototype, Ci = bi.toString;
|
|
71
|
+
function ee(e) {
|
|
72
72
|
if (e != null) {
|
|
73
73
|
try {
|
|
74
|
-
return
|
|
74
|
+
return Ci.call(e);
|
|
75
75
|
} catch {
|
|
76
76
|
}
|
|
77
77
|
try {
|
|
@@ -81,24 +81,24 @@ function te(e) {
|
|
|
81
81
|
}
|
|
82
82
|
return "";
|
|
83
83
|
}
|
|
84
|
-
var
|
|
85
|
-
"^" +
|
|
84
|
+
var Ti = /[\\^$.*+?()[\]{}|]/g, Ai = /^\[object .+?Constructor\]$/, Si = Function.prototype, Pi = Object.prototype, _i = Si.toString, Ni = Pi.hasOwnProperty, Ei = RegExp(
|
|
85
|
+
"^" + _i.call(Ni).replace(Ti, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
86
86
|
);
|
|
87
|
-
function
|
|
88
|
-
if (!
|
|
87
|
+
function $i(e) {
|
|
88
|
+
if (!Ce(e) || xi(e))
|
|
89
89
|
return !1;
|
|
90
|
-
var t =
|
|
91
|
-
return t.test(
|
|
90
|
+
var t = xn(e) ? Ei : Ai;
|
|
91
|
+
return t.test(ee(e));
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function Oi(e, t) {
|
|
94
94
|
return e == null ? void 0 : e[t];
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
var n =
|
|
98
|
-
return
|
|
96
|
+
function te(e, t) {
|
|
97
|
+
var n = Oi(e, t);
|
|
98
|
+
return $i(n) ? n : void 0;
|
|
99
99
|
}
|
|
100
|
-
var
|
|
101
|
-
function
|
|
100
|
+
var Me = te(J, "WeakMap");
|
|
101
|
+
function Ri(e, t, n) {
|
|
102
102
|
switch (n.length) {
|
|
103
103
|
case 0:
|
|
104
104
|
return e.call(t);
|
|
@@ -111,228 +111,228 @@ function ki(e, t, n) {
|
|
|
111
111
|
}
|
|
112
112
|
return e.apply(t, n);
|
|
113
113
|
}
|
|
114
|
-
var
|
|
115
|
-
function
|
|
114
|
+
var Ii = 800, Di = 16, Mi = Date.now;
|
|
115
|
+
function Bi(e) {
|
|
116
116
|
var t = 0, n = 0;
|
|
117
117
|
return function() {
|
|
118
|
-
var r =
|
|
118
|
+
var r = Mi(), i = Di - (r - n);
|
|
119
119
|
if (n = r, i > 0) {
|
|
120
|
-
if (++t >=
|
|
120
|
+
if (++t >= Ii)
|
|
121
121
|
return arguments[0];
|
|
122
122
|
} else
|
|
123
123
|
t = 0;
|
|
124
124
|
return e.apply(void 0, arguments);
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function ki(e) {
|
|
128
128
|
return function() {
|
|
129
129
|
return e;
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
-
var
|
|
132
|
+
var Dt = function() {
|
|
133
133
|
try {
|
|
134
|
-
var e =
|
|
134
|
+
var e = te(Object, "defineProperty");
|
|
135
135
|
return e({}, "", {}), e;
|
|
136
136
|
} catch {
|
|
137
137
|
}
|
|
138
|
-
}(),
|
|
139
|
-
return
|
|
138
|
+
}(), Li = Dt ? function(e, t) {
|
|
139
|
+
return Dt(e, "toString", {
|
|
140
140
|
configurable: !0,
|
|
141
141
|
enumerable: !1,
|
|
142
|
-
value:
|
|
142
|
+
value: ki(t),
|
|
143
143
|
writable: !0
|
|
144
144
|
});
|
|
145
|
-
} :
|
|
146
|
-
function
|
|
145
|
+
} : Qe, zi = Bi(Li);
|
|
146
|
+
function Fi(e, t, n, r) {
|
|
147
147
|
for (var i = e.length, o = n + -1; ++o < i; )
|
|
148
148
|
if (t(e[o], o, e))
|
|
149
149
|
return o;
|
|
150
150
|
return -1;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function ji(e) {
|
|
153
153
|
return e !== e;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Hi(e, t, n) {
|
|
156
156
|
for (var r = n - 1, i = e.length; ++r < i; )
|
|
157
157
|
if (e[r] === t)
|
|
158
158
|
return r;
|
|
159
159
|
return -1;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
162
|
-
return t === t ?
|
|
161
|
+
function Ui(e, t, n) {
|
|
162
|
+
return t === t ? Hi(e, t, n) : Fi(e, ji, n);
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function Gi(e, t) {
|
|
165
165
|
var n = e == null ? 0 : e.length;
|
|
166
|
-
return !!n &&
|
|
166
|
+
return !!n && Ui(e, t, 0) > -1;
|
|
167
167
|
}
|
|
168
|
-
var
|
|
169
|
-
function
|
|
168
|
+
var Wi = 9007199254740991, Vi = /^(?:0|[1-9]\d*)$/;
|
|
169
|
+
function bn(e, t) {
|
|
170
170
|
var n = typeof e;
|
|
171
|
-
return t = t ??
|
|
171
|
+
return t = t ?? Wi, !!t && (n == "number" || n != "symbol" && Vi.test(e)) && e > -1 && e % 1 == 0 && e < t;
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function Cn(e, t) {
|
|
174
174
|
return e === t || e !== e && t !== t;
|
|
175
175
|
}
|
|
176
|
-
var
|
|
177
|
-
function
|
|
178
|
-
return t =
|
|
179
|
-
for (var r = arguments, i = -1, o =
|
|
176
|
+
var Mt = Math.max;
|
|
177
|
+
function Ki(e, t, n) {
|
|
178
|
+
return t = Mt(t === void 0 ? e.length - 1 : t, 0), function() {
|
|
179
|
+
for (var r = arguments, i = -1, o = Mt(r.length - t, 0), s = Array(o); ++i < o; )
|
|
180
180
|
s[i] = r[t + i];
|
|
181
181
|
i = -1;
|
|
182
182
|
for (var c = Array(t + 1); ++i < t; )
|
|
183
183
|
c[i] = r[i];
|
|
184
|
-
return c[t] = n(s),
|
|
184
|
+
return c[t] = n(s), Ri(e, this, c);
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
return
|
|
187
|
+
function Xi(e, t) {
|
|
188
|
+
return zi(Ki(e, t, Qe), e + "");
|
|
189
189
|
}
|
|
190
|
-
var
|
|
191
|
-
function
|
|
192
|
-
return typeof e == "number" && e > -1 && e % 1 == 0 && e <=
|
|
190
|
+
var qi = 9007199254740991;
|
|
191
|
+
function et(e) {
|
|
192
|
+
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= qi;
|
|
193
193
|
}
|
|
194
|
-
function
|
|
195
|
-
return e != null &&
|
|
194
|
+
function Tn(e) {
|
|
195
|
+
return e != null && et(e.length) && !xn(e);
|
|
196
196
|
}
|
|
197
|
-
var
|
|
198
|
-
function
|
|
199
|
-
var t = e && e.constructor, n = typeof t == "function" && t.prototype ||
|
|
197
|
+
var Yi = Object.prototype;
|
|
198
|
+
function Ji(e) {
|
|
199
|
+
var t = e && e.constructor, n = typeof t == "function" && t.prototype || Yi;
|
|
200
200
|
return e === n;
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function Zi(e, t) {
|
|
203
203
|
for (var n = -1, r = Array(e); ++n < e; )
|
|
204
204
|
r[n] = t(n);
|
|
205
205
|
return r;
|
|
206
206
|
}
|
|
207
|
-
var
|
|
208
|
-
function
|
|
209
|
-
return
|
|
207
|
+
var Qi = "[object Arguments]";
|
|
208
|
+
function Bt(e) {
|
|
209
|
+
return Z(e) && oe(e) == Qi;
|
|
210
210
|
}
|
|
211
|
-
var
|
|
211
|
+
var An = Object.prototype, eo = An.hasOwnProperty, to = An.propertyIsEnumerable, tt = Bt(/* @__PURE__ */ function() {
|
|
212
212
|
return arguments;
|
|
213
|
-
}()) ?
|
|
214
|
-
return
|
|
213
|
+
}()) ? Bt : function(e) {
|
|
214
|
+
return Z(e) && eo.call(e, "callee") && !to.call(e, "callee");
|
|
215
215
|
};
|
|
216
|
-
function
|
|
216
|
+
function no() {
|
|
217
217
|
return !1;
|
|
218
218
|
}
|
|
219
|
-
var
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
function
|
|
223
|
-
return
|
|
219
|
+
var Sn = typeof exports == "object" && exports && !exports.nodeType && exports, kt = Sn && typeof module == "object" && module && !module.nodeType && module, ro = kt && kt.exports === Sn, Lt = ro ? J.Buffer : void 0, io = Lt ? Lt.isBuffer : void 0, Be = io || no, oo = "[object Arguments]", ao = "[object Array]", so = "[object Boolean]", lo = "[object Date]", co = "[object Error]", uo = "[object Function]", fo = "[object Map]", ho = "[object Number]", mo = "[object Object]", go = "[object RegExp]", po = "[object Set]", vo = "[object String]", yo = "[object WeakMap]", wo = "[object ArrayBuffer]", xo = "[object DataView]", bo = "[object Float32Array]", Co = "[object Float64Array]", To = "[object Int8Array]", Ao = "[object Int16Array]", So = "[object Int32Array]", Po = "[object Uint8Array]", _o = "[object Uint8ClampedArray]", No = "[object Uint16Array]", Eo = "[object Uint32Array]", $ = {};
|
|
220
|
+
$[bo] = $[Co] = $[To] = $[Ao] = $[So] = $[Po] = $[_o] = $[No] = $[Eo] = !0;
|
|
221
|
+
$[oo] = $[ao] = $[wo] = $[so] = $[xo] = $[lo] = $[co] = $[uo] = $[fo] = $[ho] = $[mo] = $[go] = $[po] = $[vo] = $[yo] = !1;
|
|
222
|
+
function $o(e) {
|
|
223
|
+
return Z(e) && et(e.length) && !!$[oe(e)];
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function nt(e) {
|
|
226
226
|
return function(t) {
|
|
227
227
|
return e(t);
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
|
-
var
|
|
230
|
+
var Pn = typeof exports == "object" && exports && !exports.nodeType && exports, ce = Pn && typeof module == "object" && module && !module.nodeType && module, Oo = ce && ce.exports === Pn, Re = Oo && yr.process, be = function() {
|
|
231
231
|
try {
|
|
232
|
-
var e =
|
|
233
|
-
return e ||
|
|
232
|
+
var e = ce && ce.require && ce.require("util").types;
|
|
233
|
+
return e || Re && Re.binding && Re.binding("util");
|
|
234
234
|
} catch {
|
|
235
235
|
}
|
|
236
|
-
}(),
|
|
237
|
-
function
|
|
238
|
-
var n =
|
|
236
|
+
}(), zt = be && be.isTypedArray, _n = zt ? nt(zt) : $o, Ro = Object.prototype, Io = Ro.hasOwnProperty;
|
|
237
|
+
function Do(e, t) {
|
|
238
|
+
var n = G(e), r = !n && tt(e), i = !n && !r && Be(e), o = !n && !r && !i && _n(e), s = n || r || i || o, c = s ? Zi(e.length, String) : [], l = c.length;
|
|
239
239
|
for (var d in e)
|
|
240
|
-
|
|
240
|
+
Io.call(e, d) && !(s && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
241
241
|
(d == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
242
242
|
i && (d == "offset" || d == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
243
243
|
o && (d == "buffer" || d == "byteLength" || d == "byteOffset") || // Skip index properties.
|
|
244
|
-
|
|
244
|
+
bn(d, l))) && c.push(d);
|
|
245
245
|
return c;
|
|
246
246
|
}
|
|
247
|
-
function
|
|
247
|
+
function Mo(e, t) {
|
|
248
248
|
return function(n) {
|
|
249
249
|
return e(t(n));
|
|
250
250
|
};
|
|
251
251
|
}
|
|
252
|
-
var
|
|
253
|
-
function
|
|
254
|
-
if (!
|
|
255
|
-
return
|
|
252
|
+
var Bo = Mo(Object.keys, Object), ko = Object.prototype, Lo = ko.hasOwnProperty;
|
|
253
|
+
function zo(e) {
|
|
254
|
+
if (!Ji(e))
|
|
255
|
+
return Bo(e);
|
|
256
256
|
var t = [];
|
|
257
257
|
for (var n in Object(e))
|
|
258
|
-
|
|
258
|
+
Lo.call(e, n) && n != "constructor" && t.push(n);
|
|
259
259
|
return t;
|
|
260
260
|
}
|
|
261
|
-
function
|
|
262
|
-
return
|
|
261
|
+
function Nn(e) {
|
|
262
|
+
return Tn(e) ? Do(e) : zo(e);
|
|
263
263
|
}
|
|
264
|
-
var
|
|
265
|
-
function
|
|
266
|
-
if (
|
|
264
|
+
var Fo = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, jo = /^\w*$/;
|
|
265
|
+
function rt(e, t) {
|
|
266
|
+
if (G(e))
|
|
267
267
|
return !1;
|
|
268
268
|
var n = typeof e;
|
|
269
|
-
return n == "number" || n == "symbol" || n == "boolean" || e == null ||
|
|
269
|
+
return n == "number" || n == "symbol" || n == "boolean" || e == null || Ke(e) ? !0 : jo.test(e) || !Fo.test(e) || t != null && e in Object(t);
|
|
270
270
|
}
|
|
271
|
-
var
|
|
272
|
-
function
|
|
273
|
-
this.__data__ =
|
|
271
|
+
var de = te(Object, "create");
|
|
272
|
+
function Ho() {
|
|
273
|
+
this.__data__ = de ? de(null) : {}, this.size = 0;
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function Uo(e) {
|
|
276
276
|
var t = this.has(e) && delete this.__data__[e];
|
|
277
277
|
return this.size -= t ? 1 : 0, t;
|
|
278
278
|
}
|
|
279
|
-
var
|
|
280
|
-
function
|
|
279
|
+
var Go = "__lodash_hash_undefined__", Wo = Object.prototype, Vo = Wo.hasOwnProperty;
|
|
280
|
+
function Ko(e) {
|
|
281
281
|
var t = this.__data__;
|
|
282
|
-
if (
|
|
282
|
+
if (de) {
|
|
283
283
|
var n = t[e];
|
|
284
|
-
return n ===
|
|
284
|
+
return n === Go ? void 0 : n;
|
|
285
285
|
}
|
|
286
|
-
return
|
|
286
|
+
return Vo.call(t, e) ? t[e] : void 0;
|
|
287
287
|
}
|
|
288
|
-
var
|
|
289
|
-
function
|
|
288
|
+
var Xo = Object.prototype, qo = Xo.hasOwnProperty;
|
|
289
|
+
function Yo(e) {
|
|
290
290
|
var t = this.__data__;
|
|
291
|
-
return
|
|
291
|
+
return de ? t[e] !== void 0 : qo.call(t, e);
|
|
292
292
|
}
|
|
293
|
-
var
|
|
294
|
-
function
|
|
293
|
+
var Jo = "__lodash_hash_undefined__";
|
|
294
|
+
function Zo(e, t) {
|
|
295
295
|
var n = this.__data__;
|
|
296
|
-
return this.size += this.has(e) ? 0 : 1, n[e] =
|
|
296
|
+
return this.size += this.has(e) ? 0 : 1, n[e] = de && t === void 0 ? Jo : t, this;
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function Q(e) {
|
|
299
299
|
var t = -1, n = e == null ? 0 : e.length;
|
|
300
300
|
for (this.clear(); ++t < n; ) {
|
|
301
301
|
var r = e[t];
|
|
302
302
|
this.set(r[0], r[1]);
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
function
|
|
305
|
+
Q.prototype.clear = Ho;
|
|
306
|
+
Q.prototype.delete = Uo;
|
|
307
|
+
Q.prototype.get = Ko;
|
|
308
|
+
Q.prototype.has = Yo;
|
|
309
|
+
Q.prototype.set = Zo;
|
|
310
|
+
function Qo() {
|
|
311
311
|
this.__data__ = [], this.size = 0;
|
|
312
312
|
}
|
|
313
|
-
function
|
|
313
|
+
function Se(e, t) {
|
|
314
314
|
for (var n = e.length; n--; )
|
|
315
|
-
if (
|
|
315
|
+
if (Cn(e[n][0], t))
|
|
316
316
|
return n;
|
|
317
317
|
return -1;
|
|
318
318
|
}
|
|
319
|
-
var
|
|
320
|
-
function
|
|
321
|
-
var t = this.__data__, n =
|
|
319
|
+
var ea = Array.prototype, ta = ea.splice;
|
|
320
|
+
function na(e) {
|
|
321
|
+
var t = this.__data__, n = Se(t, e);
|
|
322
322
|
if (n < 0)
|
|
323
323
|
return !1;
|
|
324
324
|
var r = t.length - 1;
|
|
325
|
-
return n == r ? t.pop() :
|
|
325
|
+
return n == r ? t.pop() : ta.call(t, n, 1), --this.size, !0;
|
|
326
326
|
}
|
|
327
|
-
function
|
|
328
|
-
var t = this.__data__, n =
|
|
327
|
+
function ra(e) {
|
|
328
|
+
var t = this.__data__, n = Se(t, e);
|
|
329
329
|
return n < 0 ? void 0 : t[n][1];
|
|
330
330
|
}
|
|
331
|
-
function
|
|
332
|
-
return
|
|
331
|
+
function ia(e) {
|
|
332
|
+
return Se(this.__data__, e) > -1;
|
|
333
333
|
}
|
|
334
|
-
function
|
|
335
|
-
var n = this.__data__, r =
|
|
334
|
+
function oa(e, t) {
|
|
335
|
+
var n = this.__data__, r = Se(n, e);
|
|
336
336
|
return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
|
|
337
337
|
}
|
|
338
338
|
function K(e) {
|
|
@@ -342,39 +342,39 @@ function K(e) {
|
|
|
342
342
|
this.set(r[0], r[1]);
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
|
-
K.prototype.clear =
|
|
346
|
-
K.prototype.delete =
|
|
347
|
-
K.prototype.get =
|
|
348
|
-
K.prototype.has =
|
|
349
|
-
K.prototype.set =
|
|
350
|
-
var
|
|
351
|
-
function
|
|
345
|
+
K.prototype.clear = Qo;
|
|
346
|
+
K.prototype.delete = na;
|
|
347
|
+
K.prototype.get = ra;
|
|
348
|
+
K.prototype.has = ia;
|
|
349
|
+
K.prototype.set = oa;
|
|
350
|
+
var ue = te(J, "Map");
|
|
351
|
+
function aa() {
|
|
352
352
|
this.size = 0, this.__data__ = {
|
|
353
|
-
hash: new
|
|
354
|
-
map: new (
|
|
355
|
-
string: new
|
|
353
|
+
hash: new Q(),
|
|
354
|
+
map: new (ue || K)(),
|
|
355
|
+
string: new Q()
|
|
356
356
|
};
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function sa(e) {
|
|
359
359
|
var t = typeof e;
|
|
360
360
|
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function Pe(e, t) {
|
|
363
363
|
var n = e.__data__;
|
|
364
|
-
return
|
|
364
|
+
return sa(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
|
|
365
365
|
}
|
|
366
|
-
function
|
|
367
|
-
var t =
|
|
366
|
+
function la(e) {
|
|
367
|
+
var t = Pe(this, e).delete(e);
|
|
368
368
|
return this.size -= t ? 1 : 0, t;
|
|
369
369
|
}
|
|
370
|
-
function
|
|
371
|
-
return
|
|
370
|
+
function ca(e) {
|
|
371
|
+
return Pe(this, e).get(e);
|
|
372
372
|
}
|
|
373
|
-
function
|
|
374
|
-
return
|
|
373
|
+
function da(e) {
|
|
374
|
+
return Pe(this, e).has(e);
|
|
375
375
|
}
|
|
376
|
-
function
|
|
377
|
-
var n =
|
|
376
|
+
function ua(e, t) {
|
|
377
|
+
var n = Pe(this, e), r = n.size;
|
|
378
378
|
return n.set(e, t), this.size += n.size == r ? 0 : 1, this;
|
|
379
379
|
}
|
|
380
380
|
function X(e) {
|
|
@@ -384,15 +384,15 @@ function X(e) {
|
|
|
384
384
|
this.set(r[0], r[1]);
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
|
-
X.prototype.clear =
|
|
388
|
-
X.prototype.delete =
|
|
389
|
-
X.prototype.get =
|
|
390
|
-
X.prototype.has =
|
|
391
|
-
X.prototype.set =
|
|
392
|
-
var
|
|
393
|
-
function
|
|
387
|
+
X.prototype.clear = aa;
|
|
388
|
+
X.prototype.delete = la;
|
|
389
|
+
X.prototype.get = ca;
|
|
390
|
+
X.prototype.has = da;
|
|
391
|
+
X.prototype.set = ua;
|
|
392
|
+
var fa = "Expected a function";
|
|
393
|
+
function it(e, t) {
|
|
394
394
|
if (typeof e != "function" || t != null && typeof t != "function")
|
|
395
|
-
throw new TypeError(
|
|
395
|
+
throw new TypeError(fa);
|
|
396
396
|
var n = function() {
|
|
397
397
|
var r = arguments, i = t ? t.apply(this, r) : r[0], o = n.cache;
|
|
398
398
|
if (o.has(i))
|
|
@@ -400,105 +400,105 @@ function at(e, t) {
|
|
|
400
400
|
var s = e.apply(this, r);
|
|
401
401
|
return n.cache = o.set(i, s) || o, s;
|
|
402
402
|
};
|
|
403
|
-
return n.cache = new (
|
|
403
|
+
return n.cache = new (it.Cache || X)(), n;
|
|
404
404
|
}
|
|
405
|
-
|
|
406
|
-
var
|
|
407
|
-
function
|
|
408
|
-
var t =
|
|
409
|
-
return n.size ===
|
|
405
|
+
it.Cache = X;
|
|
406
|
+
var ha = 500;
|
|
407
|
+
function ma(e) {
|
|
408
|
+
var t = it(e, function(r) {
|
|
409
|
+
return n.size === ha && n.clear(), r;
|
|
410
410
|
}), n = t.cache;
|
|
411
411
|
return t;
|
|
412
412
|
}
|
|
413
|
-
var
|
|
413
|
+
var ga = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, pa = /\\(\\)?/g, va = ma(function(e) {
|
|
414
414
|
var t = [];
|
|
415
|
-
return e.charCodeAt(0) === 46 && t.push(""), e.replace(
|
|
416
|
-
t.push(i ? o.replace(
|
|
415
|
+
return e.charCodeAt(0) === 46 && t.push(""), e.replace(ga, function(n, r, i, o) {
|
|
416
|
+
t.push(i ? o.replace(pa, "$1") : r || n);
|
|
417
417
|
}), t;
|
|
418
418
|
});
|
|
419
|
-
function
|
|
420
|
-
return e == null ? "" :
|
|
419
|
+
function ke(e) {
|
|
420
|
+
return e == null ? "" : xe(e);
|
|
421
421
|
}
|
|
422
|
-
function
|
|
423
|
-
return
|
|
422
|
+
function En(e, t) {
|
|
423
|
+
return G(e) ? e : rt(e, t) ? [e] : va(ke(e));
|
|
424
424
|
}
|
|
425
|
-
function
|
|
426
|
-
if (typeof e == "string" ||
|
|
425
|
+
function _e(e) {
|
|
426
|
+
if (typeof e == "string" || Ke(e))
|
|
427
427
|
return e;
|
|
428
428
|
var t = e + "";
|
|
429
429
|
return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
|
|
430
430
|
}
|
|
431
|
-
function
|
|
432
|
-
t =
|
|
431
|
+
function $n(e, t) {
|
|
432
|
+
t = En(t, e);
|
|
433
433
|
for (var n = 0, r = t.length; e != null && n < r; )
|
|
434
|
-
e = e[
|
|
434
|
+
e = e[_e(t[n++])];
|
|
435
435
|
return n && n == r ? e : void 0;
|
|
436
436
|
}
|
|
437
|
-
function
|
|
438
|
-
var r = e == null ? void 0 :
|
|
437
|
+
function ya(e, t, n) {
|
|
438
|
+
var r = e == null ? void 0 : $n(e, t);
|
|
439
439
|
return r === void 0 ? n : r;
|
|
440
440
|
}
|
|
441
|
-
function
|
|
441
|
+
function On(e, t) {
|
|
442
442
|
for (var n = -1, r = t.length, i = e.length; ++n < r; )
|
|
443
443
|
e[i + n] = t[n];
|
|
444
444
|
return e;
|
|
445
445
|
}
|
|
446
|
-
var
|
|
447
|
-
function
|
|
448
|
-
return
|
|
446
|
+
var Ft = re ? re.isConcatSpreadable : void 0;
|
|
447
|
+
function wa(e) {
|
|
448
|
+
return G(e) || tt(e) || !!(Ft && e && e[Ft]);
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function xa(e, t, n, r, i) {
|
|
451
451
|
var o = -1, s = e.length;
|
|
452
|
-
for (n || (n =
|
|
452
|
+
for (n || (n = wa), i || (i = []); ++o < s; ) {
|
|
453
453
|
var c = e[o];
|
|
454
|
-
n(c) &&
|
|
454
|
+
n(c) && On(i, c);
|
|
455
455
|
}
|
|
456
456
|
return i;
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function ba(e, t, n) {
|
|
459
459
|
var r = -1, i = e.length;
|
|
460
460
|
t < 0 && (t = -t > i ? 0 : i + t), n = n > i ? i : n, n < 0 && (n += i), i = t > n ? 0 : n - t >>> 0, t >>>= 0;
|
|
461
461
|
for (var o = Array(i); ++r < i; )
|
|
462
462
|
o[r] = e[r + t];
|
|
463
463
|
return o;
|
|
464
464
|
}
|
|
465
|
-
function
|
|
465
|
+
function Ca(e, t, n) {
|
|
466
466
|
var r = e.length;
|
|
467
|
-
return n = n === void 0 ? r : n, n >= r ? e :
|
|
467
|
+
return n = n === void 0 ? r : n, n >= r ? e : ba(e, t, n);
|
|
468
468
|
}
|
|
469
|
-
var
|
|
470
|
-
function
|
|
471
|
-
return
|
|
469
|
+
var Ta = "\\ud800-\\udfff", Aa = "\\u0300-\\u036f", Sa = "\\ufe20-\\ufe2f", Pa = "\\u20d0-\\u20ff", _a = Aa + Sa + Pa, Na = "\\ufe0e\\ufe0f", Ea = "\\u200d", $a = RegExp("[" + Ea + Ta + _a + Na + "]");
|
|
470
|
+
function ot(e) {
|
|
471
|
+
return $a.test(e);
|
|
472
472
|
}
|
|
473
|
-
function
|
|
473
|
+
function Oa(e) {
|
|
474
474
|
return e.split("");
|
|
475
475
|
}
|
|
476
|
-
var
|
|
477
|
-
function
|
|
478
|
-
return e.match(
|
|
476
|
+
var Rn = "\\ud800-\\udfff", Ra = "\\u0300-\\u036f", Ia = "\\ufe20-\\ufe2f", Da = "\\u20d0-\\u20ff", Ma = Ra + Ia + Da, Ba = "\\ufe0e\\ufe0f", ka = "[" + Rn + "]", Le = "[" + Ma + "]", ze = "\\ud83c[\\udffb-\\udfff]", La = "(?:" + Le + "|" + ze + ")", In = "[^" + Rn + "]", Dn = "(?:\\ud83c[\\udde6-\\uddff]){2}", Mn = "[\\ud800-\\udbff][\\udc00-\\udfff]", za = "\\u200d", Bn = La + "?", kn = "[" + Ba + "]?", Fa = "(?:" + za + "(?:" + [In, Dn, Mn].join("|") + ")" + kn + Bn + ")*", ja = kn + Bn + Fa, Ha = "(?:" + [In + Le + "?", Le, Dn, Mn, ka].join("|") + ")", Ua = RegExp(ze + "(?=" + ze + ")|" + Ha + ja, "g");
|
|
477
|
+
function Ga(e) {
|
|
478
|
+
return e.match(Ua) || [];
|
|
479
479
|
}
|
|
480
|
-
function
|
|
481
|
-
return
|
|
480
|
+
function Wa(e) {
|
|
481
|
+
return ot(e) ? Ga(e) : Oa(e);
|
|
482
482
|
}
|
|
483
|
-
function
|
|
483
|
+
function Va() {
|
|
484
484
|
this.__data__ = new K(), this.size = 0;
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function Ka(e) {
|
|
487
487
|
var t = this.__data__, n = t.delete(e);
|
|
488
488
|
return this.size = t.size, n;
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function Xa(e) {
|
|
491
491
|
return this.__data__.get(e);
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function qa(e) {
|
|
494
494
|
return this.__data__.has(e);
|
|
495
495
|
}
|
|
496
|
-
var
|
|
497
|
-
function
|
|
496
|
+
var Ya = 200;
|
|
497
|
+
function Ja(e, t) {
|
|
498
498
|
var n = this.__data__;
|
|
499
499
|
if (n instanceof K) {
|
|
500
500
|
var r = n.__data__;
|
|
501
|
-
if (!
|
|
501
|
+
if (!ue || r.length < Ya - 1)
|
|
502
502
|
return r.push([e, t]), this.size = ++n.size, this;
|
|
503
503
|
n = this.__data__ = new X(r);
|
|
504
504
|
}
|
|
@@ -508,214 +508,214 @@ function V(e) {
|
|
|
508
508
|
var t = this.__data__ = new K(e);
|
|
509
509
|
this.size = t.size;
|
|
510
510
|
}
|
|
511
|
-
V.prototype.clear =
|
|
512
|
-
V.prototype.delete =
|
|
513
|
-
V.prototype.get =
|
|
514
|
-
V.prototype.has =
|
|
515
|
-
V.prototype.set =
|
|
516
|
-
function
|
|
511
|
+
V.prototype.clear = Va;
|
|
512
|
+
V.prototype.delete = Ka;
|
|
513
|
+
V.prototype.get = Xa;
|
|
514
|
+
V.prototype.has = qa;
|
|
515
|
+
V.prototype.set = Ja;
|
|
516
|
+
function Za(e, t) {
|
|
517
517
|
for (var n = -1, r = e == null ? 0 : e.length, i = 0, o = []; ++n < r; ) {
|
|
518
518
|
var s = e[n];
|
|
519
519
|
t(s, n, e) && (o[i++] = s);
|
|
520
520
|
}
|
|
521
521
|
return o;
|
|
522
522
|
}
|
|
523
|
-
function
|
|
523
|
+
function Qa() {
|
|
524
524
|
return [];
|
|
525
525
|
}
|
|
526
|
-
var
|
|
527
|
-
return e == null ? [] : (e = Object(e),
|
|
528
|
-
return
|
|
526
|
+
var es = Object.prototype, ts = es.propertyIsEnumerable, jt = Object.getOwnPropertySymbols, ns = jt ? function(e) {
|
|
527
|
+
return e == null ? [] : (e = Object(e), Za(jt(e), function(t) {
|
|
528
|
+
return ts.call(e, t);
|
|
529
529
|
}));
|
|
530
|
-
} :
|
|
531
|
-
function
|
|
530
|
+
} : Qa;
|
|
531
|
+
function rs(e, t, n) {
|
|
532
532
|
var r = t(e);
|
|
533
|
-
return
|
|
533
|
+
return G(e) ? r : On(r, n(e));
|
|
534
534
|
}
|
|
535
|
-
function
|
|
536
|
-
return
|
|
535
|
+
function Ht(e) {
|
|
536
|
+
return rs(e, Nn, ns);
|
|
537
537
|
}
|
|
538
|
-
var
|
|
539
|
-
(
|
|
540
|
-
var t =
|
|
538
|
+
var Fe = te(J, "DataView"), je = te(J, "Promise"), He = te(J, "Set"), Ut = "[object Map]", is = "[object Object]", Gt = "[object Promise]", Wt = "[object Set]", Vt = "[object WeakMap]", Kt = "[object DataView]", os = ee(Fe), as = ee(ue), ss = ee(je), ls = ee(He), cs = ee(Me), q = oe;
|
|
539
|
+
(Fe && q(new Fe(new ArrayBuffer(1))) != Kt || ue && q(new ue()) != Ut || je && q(je.resolve()) != Gt || He && q(new He()) != Wt || Me && q(new Me()) != Vt) && (q = function(e) {
|
|
540
|
+
var t = oe(e), n = t == is ? e.constructor : void 0, r = n ? ee(n) : "";
|
|
541
541
|
if (r)
|
|
542
542
|
switch (r) {
|
|
543
|
-
case
|
|
544
|
-
return
|
|
545
|
-
case
|
|
543
|
+
case os:
|
|
544
|
+
return Kt;
|
|
545
|
+
case as:
|
|
546
|
+
return Ut;
|
|
547
|
+
case ss:
|
|
546
548
|
return Gt;
|
|
547
|
-
case
|
|
549
|
+
case ls:
|
|
550
|
+
return Wt;
|
|
551
|
+
case cs:
|
|
548
552
|
return Vt;
|
|
549
|
-
case fs:
|
|
550
|
-
return Kt;
|
|
551
|
-
case hs:
|
|
552
|
-
return Xt;
|
|
553
553
|
}
|
|
554
554
|
return t;
|
|
555
555
|
});
|
|
556
|
-
var
|
|
557
|
-
function
|
|
558
|
-
return this.__data__.set(e,
|
|
556
|
+
var Xt = J.Uint8Array, ds = "__lodash_hash_undefined__";
|
|
557
|
+
function us(e) {
|
|
558
|
+
return this.__data__.set(e, ds), this;
|
|
559
559
|
}
|
|
560
|
-
function
|
|
560
|
+
function fs(e) {
|
|
561
561
|
return this.__data__.has(e);
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function fe(e) {
|
|
564
564
|
var t = -1, n = e == null ? 0 : e.length;
|
|
565
565
|
for (this.__data__ = new X(); ++t < n; )
|
|
566
566
|
this.add(e[t]);
|
|
567
567
|
}
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
function
|
|
568
|
+
fe.prototype.add = fe.prototype.push = us;
|
|
569
|
+
fe.prototype.has = fs;
|
|
570
|
+
function hs(e, t) {
|
|
571
571
|
for (var n = -1, r = e == null ? 0 : e.length; ++n < r; )
|
|
572
572
|
if (t(e[n], n, e))
|
|
573
573
|
return !0;
|
|
574
574
|
return !1;
|
|
575
575
|
}
|
|
576
|
-
function
|
|
576
|
+
function Ln(e, t) {
|
|
577
577
|
return e.has(t);
|
|
578
578
|
}
|
|
579
|
-
var
|
|
580
|
-
function
|
|
581
|
-
var s = n &
|
|
579
|
+
var ms = 1, gs = 2;
|
|
580
|
+
function zn(e, t, n, r, i, o) {
|
|
581
|
+
var s = n & ms, c = e.length, l = t.length;
|
|
582
582
|
if (c != l && !(s && l > c))
|
|
583
583
|
return !1;
|
|
584
584
|
var d = o.get(e), f = o.get(t);
|
|
585
585
|
if (d && f)
|
|
586
586
|
return d == t && f == e;
|
|
587
|
-
var u = -1, h = !0, m = n &
|
|
587
|
+
var u = -1, h = !0, m = n & gs ? new fe() : void 0;
|
|
588
588
|
for (o.set(e, t), o.set(t, e); ++u < c; ) {
|
|
589
|
-
var g = e[u],
|
|
589
|
+
var g = e[u], v = t[u];
|
|
590
590
|
if (r)
|
|
591
|
-
var
|
|
592
|
-
if (
|
|
593
|
-
if (
|
|
591
|
+
var x = s ? r(v, g, u, t, e, o) : r(g, v, u, e, t, o);
|
|
592
|
+
if (x !== void 0) {
|
|
593
|
+
if (x)
|
|
594
594
|
continue;
|
|
595
595
|
h = !1;
|
|
596
596
|
break;
|
|
597
597
|
}
|
|
598
598
|
if (m) {
|
|
599
|
-
if (!
|
|
600
|
-
if (!
|
|
599
|
+
if (!hs(t, function(A, _) {
|
|
600
|
+
if (!Ln(m, _) && (g === A || i(g, A, n, r, o)))
|
|
601
601
|
return m.push(_);
|
|
602
602
|
})) {
|
|
603
603
|
h = !1;
|
|
604
604
|
break;
|
|
605
605
|
}
|
|
606
|
-
} else if (!(g ===
|
|
606
|
+
} else if (!(g === v || i(g, v, n, r, o))) {
|
|
607
607
|
h = !1;
|
|
608
608
|
break;
|
|
609
609
|
}
|
|
610
610
|
}
|
|
611
611
|
return o.delete(e), o.delete(t), h;
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function ps(e) {
|
|
614
614
|
var t = -1, n = Array(e.size);
|
|
615
615
|
return e.forEach(function(r, i) {
|
|
616
616
|
n[++t] = [i, r];
|
|
617
617
|
}), n;
|
|
618
618
|
}
|
|
619
|
-
function
|
|
619
|
+
function vs(e) {
|
|
620
620
|
var t = -1, n = Array(e.size);
|
|
621
621
|
return e.forEach(function(r) {
|
|
622
622
|
n[++t] = r;
|
|
623
623
|
}), n;
|
|
624
624
|
}
|
|
625
|
-
var
|
|
626
|
-
function
|
|
625
|
+
var ys = 1, ws = 2, xs = "[object Boolean]", bs = "[object Date]", Cs = "[object Error]", Ts = "[object Map]", As = "[object Number]", Ss = "[object RegExp]", Ps = "[object Set]", _s = "[object String]", Ns = "[object Symbol]", Es = "[object ArrayBuffer]", $s = "[object DataView]", qt = re ? re.prototype : void 0, Ie = qt ? qt.valueOf : void 0;
|
|
626
|
+
function Os(e, t, n, r, i, o, s) {
|
|
627
627
|
switch (n) {
|
|
628
|
-
case
|
|
628
|
+
case $s:
|
|
629
629
|
if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
|
|
630
630
|
return !1;
|
|
631
631
|
e = e.buffer, t = t.buffer;
|
|
632
|
-
case
|
|
633
|
-
return !(e.byteLength != t.byteLength || !o(new
|
|
632
|
+
case Es:
|
|
633
|
+
return !(e.byteLength != t.byteLength || !o(new Xt(e), new Xt(t)));
|
|
634
|
+
case xs:
|
|
635
|
+
case bs:
|
|
634
636
|
case As:
|
|
635
|
-
|
|
636
|
-
case
|
|
637
|
-
return An(+e, +t);
|
|
638
|
-
case Ps:
|
|
637
|
+
return Cn(+e, +t);
|
|
638
|
+
case Cs:
|
|
639
639
|
return e.name == t.name && e.message == t.message;
|
|
640
|
-
case
|
|
641
|
-
case $s:
|
|
642
|
-
return e == t + "";
|
|
640
|
+
case Ss:
|
|
643
641
|
case _s:
|
|
644
|
-
|
|
645
|
-
case
|
|
646
|
-
var
|
|
647
|
-
|
|
642
|
+
return e == t + "";
|
|
643
|
+
case Ts:
|
|
644
|
+
var c = ps;
|
|
645
|
+
case Ps:
|
|
646
|
+
var l = r & ys;
|
|
647
|
+
if (c || (c = vs), e.size != t.size && !l)
|
|
648
648
|
return !1;
|
|
649
649
|
var d = s.get(e);
|
|
650
650
|
if (d)
|
|
651
651
|
return d == t;
|
|
652
|
-
r |=
|
|
653
|
-
var f =
|
|
652
|
+
r |= ws, s.set(e, t);
|
|
653
|
+
var f = zn(c(e), c(t), r, i, o, s);
|
|
654
654
|
return s.delete(e), f;
|
|
655
|
-
case
|
|
656
|
-
if (
|
|
657
|
-
return
|
|
655
|
+
case Ns:
|
|
656
|
+
if (Ie)
|
|
657
|
+
return Ie.call(e) == Ie.call(t);
|
|
658
658
|
}
|
|
659
659
|
return !1;
|
|
660
660
|
}
|
|
661
|
-
var
|
|
662
|
-
function
|
|
663
|
-
var s = n &
|
|
661
|
+
var Rs = 1, Is = Object.prototype, Ds = Is.hasOwnProperty;
|
|
662
|
+
function Ms(e, t, n, r, i, o) {
|
|
663
|
+
var s = n & Rs, c = Ht(e), l = c.length, d = Ht(t), f = d.length;
|
|
664
664
|
if (l != f && !s)
|
|
665
665
|
return !1;
|
|
666
666
|
for (var u = l; u--; ) {
|
|
667
667
|
var h = c[u];
|
|
668
|
-
if (!(s ? h in t :
|
|
668
|
+
if (!(s ? h in t : Ds.call(t, h)))
|
|
669
669
|
return !1;
|
|
670
670
|
}
|
|
671
671
|
var m = o.get(e), g = o.get(t);
|
|
672
672
|
if (m && g)
|
|
673
673
|
return m == t && g == e;
|
|
674
|
-
var
|
|
674
|
+
var v = !0;
|
|
675
675
|
o.set(e, t), o.set(t, e);
|
|
676
|
-
for (var
|
|
676
|
+
for (var x = s; ++u < l; ) {
|
|
677
677
|
h = c[u];
|
|
678
678
|
var A = e[h], _ = t[h];
|
|
679
679
|
if (r)
|
|
680
680
|
var E = s ? r(_, A, h, t, e, o) : r(A, _, h, e, t, o);
|
|
681
681
|
if (!(E === void 0 ? A === _ || i(A, _, n, r, o) : E)) {
|
|
682
|
-
|
|
682
|
+
v = !1;
|
|
683
683
|
break;
|
|
684
684
|
}
|
|
685
|
-
|
|
685
|
+
x || (x = h == "constructor");
|
|
686
686
|
}
|
|
687
|
-
if (
|
|
688
|
-
var
|
|
689
|
-
|
|
687
|
+
if (v && !x) {
|
|
688
|
+
var b = e.constructor, y = t.constructor;
|
|
689
|
+
b != y && "constructor" in e && "constructor" in t && !(typeof b == "function" && b instanceof b && typeof y == "function" && y instanceof y) && (v = !1);
|
|
690
690
|
}
|
|
691
|
-
return o.delete(e), o.delete(t),
|
|
691
|
+
return o.delete(e), o.delete(t), v;
|
|
692
692
|
}
|
|
693
|
-
var
|
|
694
|
-
function
|
|
695
|
-
var s =
|
|
696
|
-
l = l ==
|
|
697
|
-
var f = l ==
|
|
698
|
-
if (h &&
|
|
699
|
-
if (!
|
|
693
|
+
var Bs = 1, Yt = "[object Arguments]", Jt = "[object Array]", pe = "[object Object]", ks = Object.prototype, Zt = ks.hasOwnProperty;
|
|
694
|
+
function Ls(e, t, n, r, i, o) {
|
|
695
|
+
var s = G(e), c = G(t), l = s ? Jt : q(e), d = c ? Jt : q(t);
|
|
696
|
+
l = l == Yt ? pe : l, d = d == Yt ? pe : d;
|
|
697
|
+
var f = l == pe, u = d == pe, h = l == d;
|
|
698
|
+
if (h && Be(e)) {
|
|
699
|
+
if (!Be(t))
|
|
700
700
|
return !1;
|
|
701
701
|
s = !0, f = !1;
|
|
702
702
|
}
|
|
703
703
|
if (h && !f)
|
|
704
|
-
return o || (o = new V()), s ||
|
|
705
|
-
if (!(n &
|
|
706
|
-
var m = f &&
|
|
704
|
+
return o || (o = new V()), s || _n(e) ? zn(e, t, n, r, i, o) : Os(e, t, l, n, r, i, o);
|
|
705
|
+
if (!(n & Bs)) {
|
|
706
|
+
var m = f && Zt.call(e, "__wrapped__"), g = u && Zt.call(t, "__wrapped__");
|
|
707
707
|
if (m || g) {
|
|
708
|
-
var
|
|
709
|
-
return o || (o = new V()), i(
|
|
708
|
+
var v = m ? e.value() : e, x = g ? t.value() : t;
|
|
709
|
+
return o || (o = new V()), i(v, x, n, r, o);
|
|
710
710
|
}
|
|
711
711
|
}
|
|
712
|
-
return h ? (o || (o = new V()),
|
|
712
|
+
return h ? (o || (o = new V()), Ms(e, t, n, r, i, o)) : !1;
|
|
713
713
|
}
|
|
714
|
-
function
|
|
715
|
-
return e === t ? !0 : e == null || t == null || !
|
|
714
|
+
function at(e, t, n, r, i) {
|
|
715
|
+
return e === t ? !0 : e == null || t == null || !Z(e) && !Z(t) ? e !== e && t !== t : Ls(e, t, n, r, at, i);
|
|
716
716
|
}
|
|
717
|
-
var
|
|
718
|
-
function
|
|
717
|
+
var zs = 1, Fs = 2;
|
|
718
|
+
function js(e, t, n, r) {
|
|
719
719
|
var i = n.length, o = i;
|
|
720
720
|
if (e == null)
|
|
721
721
|
return !o;
|
|
@@ -732,81 +732,81 @@ function Gs(e, t, n, r) {
|
|
|
732
732
|
return !1;
|
|
733
733
|
} else {
|
|
734
734
|
var f = new V(), u;
|
|
735
|
-
if (!(u === void 0 ?
|
|
735
|
+
if (!(u === void 0 ? at(d, l, zs | Fs, r, f) : u))
|
|
736
736
|
return !1;
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
739
|
return !0;
|
|
740
740
|
}
|
|
741
|
-
function
|
|
742
|
-
return e === e && !
|
|
741
|
+
function Fn(e) {
|
|
742
|
+
return e === e && !Ce(e);
|
|
743
743
|
}
|
|
744
|
-
function
|
|
745
|
-
for (var t =
|
|
744
|
+
function Hs(e) {
|
|
745
|
+
for (var t = Nn(e), n = t.length; n--; ) {
|
|
746
746
|
var r = t[n], i = e[r];
|
|
747
|
-
t[n] = [r, i,
|
|
747
|
+
t[n] = [r, i, Fn(i)];
|
|
748
748
|
}
|
|
749
749
|
return t;
|
|
750
750
|
}
|
|
751
|
-
function
|
|
751
|
+
function jn(e, t) {
|
|
752
752
|
return function(n) {
|
|
753
753
|
return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n));
|
|
754
754
|
};
|
|
755
755
|
}
|
|
756
|
-
function
|
|
757
|
-
var t =
|
|
758
|
-
return t.length == 1 && t[0][2] ?
|
|
759
|
-
return n === e ||
|
|
756
|
+
function Us(e) {
|
|
757
|
+
var t = Hs(e);
|
|
758
|
+
return t.length == 1 && t[0][2] ? jn(t[0][0], t[0][1]) : function(n) {
|
|
759
|
+
return n === e || js(n, e, t);
|
|
760
760
|
};
|
|
761
761
|
}
|
|
762
|
-
function
|
|
762
|
+
function Gs(e, t) {
|
|
763
763
|
return e != null && t in Object(e);
|
|
764
764
|
}
|
|
765
|
-
function
|
|
766
|
-
t =
|
|
765
|
+
function Ws(e, t, n) {
|
|
766
|
+
t = En(t, e);
|
|
767
767
|
for (var r = -1, i = t.length, o = !1; ++r < i; ) {
|
|
768
|
-
var s =
|
|
768
|
+
var s = _e(t[r]);
|
|
769
769
|
if (!(o = e != null && n(e, s)))
|
|
770
770
|
break;
|
|
771
771
|
e = e[s];
|
|
772
772
|
}
|
|
773
|
-
return o || ++r != i ? o : (i = e == null ? 0 : e.length, !!i &&
|
|
773
|
+
return o || ++r != i ? o : (i = e == null ? 0 : e.length, !!i && et(i) && bn(s, i) && (G(e) || tt(e)));
|
|
774
774
|
}
|
|
775
|
-
function
|
|
776
|
-
return e != null &&
|
|
775
|
+
function Vs(e, t) {
|
|
776
|
+
return e != null && Ws(e, t, Gs);
|
|
777
777
|
}
|
|
778
|
-
var
|
|
779
|
-
function
|
|
780
|
-
return
|
|
781
|
-
var r =
|
|
782
|
-
return r === void 0 && r === t ?
|
|
778
|
+
var Ks = 1, Xs = 2;
|
|
779
|
+
function qs(e, t) {
|
|
780
|
+
return rt(e) && Fn(t) ? jn(_e(e), t) : function(n) {
|
|
781
|
+
var r = ya(n, e);
|
|
782
|
+
return r === void 0 && r === t ? Vs(n, e) : at(t, r, Ks | Xs);
|
|
783
783
|
};
|
|
784
784
|
}
|
|
785
|
-
function
|
|
785
|
+
function Hn(e) {
|
|
786
786
|
return function(t) {
|
|
787
787
|
return t == null ? void 0 : t[e];
|
|
788
788
|
};
|
|
789
789
|
}
|
|
790
|
-
function
|
|
790
|
+
function Ys(e) {
|
|
791
791
|
return function(t) {
|
|
792
|
-
return
|
|
792
|
+
return $n(t, e);
|
|
793
793
|
};
|
|
794
794
|
}
|
|
795
|
-
function
|
|
796
|
-
return
|
|
795
|
+
function Js(e) {
|
|
796
|
+
return rt(e) ? Hn(_e(e)) : Ys(e);
|
|
797
797
|
}
|
|
798
|
-
function
|
|
799
|
-
return typeof e == "function" ? e : e == null ?
|
|
798
|
+
function Zs(e) {
|
|
799
|
+
return typeof e == "function" ? e : e == null ? Qe : typeof e == "object" ? G(e) ? qs(e[0], e[1]) : Us(e) : Js(e);
|
|
800
800
|
}
|
|
801
|
-
function
|
|
802
|
-
return
|
|
801
|
+
function De(e) {
|
|
802
|
+
return Z(e) && Tn(e);
|
|
803
803
|
}
|
|
804
|
-
var
|
|
805
|
-
function
|
|
806
|
-
var i = -1, o =
|
|
804
|
+
var Qs = 200;
|
|
805
|
+
function el(e, t, n, r) {
|
|
806
|
+
var i = -1, o = Gi, s = !0, c = e.length, l = [], d = t.length;
|
|
807
807
|
if (!c)
|
|
808
808
|
return l;
|
|
809
|
-
n && (t =
|
|
809
|
+
n && (t = wn(t, nt(n))), t.length >= Qs && (o = Ln, s = !1, t = new fe(t));
|
|
810
810
|
e:
|
|
811
811
|
for (; ++i < c; ) {
|
|
812
812
|
var f = e[i], u = n == null ? f : n(f);
|
|
@@ -819,73 +819,73 @@ function il(e, t, n, r) {
|
|
|
819
819
|
}
|
|
820
820
|
return l;
|
|
821
821
|
}
|
|
822
|
-
function
|
|
822
|
+
function tl(e) {
|
|
823
823
|
var t = e == null ? 0 : e.length;
|
|
824
824
|
return t ? e[t - 1] : void 0;
|
|
825
825
|
}
|
|
826
|
-
var
|
|
827
|
-
var n =
|
|
828
|
-
return
|
|
829
|
-
}),
|
|
830
|
-
function
|
|
831
|
-
return
|
|
826
|
+
var nl = Xi(function(e, t) {
|
|
827
|
+
var n = tl(t);
|
|
828
|
+
return De(n) && (n = void 0), De(e) ? el(e, xa(t, 1, De), Zs(n)) : [];
|
|
829
|
+
}), rl = "[object RegExp]";
|
|
830
|
+
function il(e) {
|
|
831
|
+
return Z(e) && oe(e) == rl;
|
|
832
832
|
}
|
|
833
|
-
var
|
|
834
|
-
function
|
|
835
|
-
for (var t =
|
|
833
|
+
var Qt = be && be.isRegExp, ol = Qt ? nt(Qt) : il, al = Hn("length"), Un = "\\ud800-\\udfff", sl = "\\u0300-\\u036f", ll = "\\ufe20-\\ufe2f", cl = "\\u20d0-\\u20ff", dl = sl + ll + cl, ul = "\\ufe0e\\ufe0f", fl = "[" + Un + "]", Ue = "[" + dl + "]", Ge = "\\ud83c[\\udffb-\\udfff]", hl = "(?:" + Ue + "|" + Ge + ")", Gn = "[^" + Un + "]", Wn = "(?:\\ud83c[\\udde6-\\uddff]){2}", Vn = "[\\ud800-\\udbff][\\udc00-\\udfff]", ml = "\\u200d", Kn = hl + "?", Xn = "[" + ul + "]?", gl = "(?:" + ml + "(?:" + [Gn, Wn, Vn].join("|") + ")" + Xn + Kn + ")*", pl = Xn + Kn + gl, vl = "(?:" + [Gn + Ue + "?", Ue, Wn, Vn, fl].join("|") + ")", en = RegExp(Ge + "(?=" + Ge + ")|" + vl + pl, "g");
|
|
834
|
+
function yl(e) {
|
|
835
|
+
for (var t = en.lastIndex = 0; en.test(e); )
|
|
836
836
|
++t;
|
|
837
837
|
return t;
|
|
838
838
|
}
|
|
839
|
-
function
|
|
840
|
-
return
|
|
839
|
+
function wl(e) {
|
|
840
|
+
return ot(e) ? yl(e) : al(e);
|
|
841
841
|
}
|
|
842
|
-
var
|
|
843
|
-
function
|
|
844
|
-
var n =
|
|
845
|
-
if (
|
|
842
|
+
var xl = 30, bl = "...", Cl = /\w*$/;
|
|
843
|
+
function Tl(e, t) {
|
|
844
|
+
var n = xl, r = bl;
|
|
845
|
+
if (Ce(t)) {
|
|
846
846
|
var i = "separator" in t ? t.separator : i;
|
|
847
|
-
n = "length" in t ?
|
|
847
|
+
n = "length" in t ? gi(t.length) : n, r = "omission" in t ? xe(t.omission) : r;
|
|
848
848
|
}
|
|
849
|
-
e =
|
|
849
|
+
e = ke(e);
|
|
850
850
|
var o = e.length;
|
|
851
|
-
if (
|
|
852
|
-
var s =
|
|
851
|
+
if (ot(e)) {
|
|
852
|
+
var s = Wa(e);
|
|
853
853
|
o = s.length;
|
|
854
854
|
}
|
|
855
855
|
if (n >= o)
|
|
856
856
|
return e;
|
|
857
|
-
var c = n -
|
|
857
|
+
var c = n - wl(r);
|
|
858
858
|
if (c < 1)
|
|
859
859
|
return r;
|
|
860
|
-
var l = s ?
|
|
860
|
+
var l = s ? Ca(s, 0, c).join("") : e.slice(0, c);
|
|
861
861
|
if (i === void 0)
|
|
862
862
|
return l + r;
|
|
863
|
-
if (s && (c += l.length - c),
|
|
863
|
+
if (s && (c += l.length - c), ol(i)) {
|
|
864
864
|
if (e.slice(c).search(i)) {
|
|
865
865
|
var d, f = l;
|
|
866
|
-
for (i.global || (i = RegExp(i.source,
|
|
866
|
+
for (i.global || (i = RegExp(i.source, ke(Cl.exec(i)) + "g")), i.lastIndex = 0; d = i.exec(f); )
|
|
867
867
|
var u = d.index;
|
|
868
868
|
l = l.slice(0, u === void 0 ? c : u);
|
|
869
869
|
}
|
|
870
|
-
} else if (e.indexOf(
|
|
870
|
+
} else if (e.indexOf(xe(i), c) != c) {
|
|
871
871
|
var h = l.lastIndexOf(i);
|
|
872
872
|
h > -1 && (l = l.slice(0, h));
|
|
873
873
|
}
|
|
874
874
|
return l + r;
|
|
875
875
|
}
|
|
876
|
-
const
|
|
876
|
+
const Al = j.Provider, qn = ie.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a(
|
|
877
877
|
j.Viewport,
|
|
878
878
|
{
|
|
879
879
|
ref: n,
|
|
880
|
-
className:
|
|
880
|
+
className: ae(
|
|
881
881
|
"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
|
|
882
882
|
e
|
|
883
883
|
),
|
|
884
884
|
...t
|
|
885
885
|
}
|
|
886
886
|
));
|
|
887
|
-
|
|
888
|
-
const
|
|
887
|
+
qn.displayName = j.Viewport.displayName;
|
|
888
|
+
const Sl = wr(
|
|
889
889
|
"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md !border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
890
890
|
{
|
|
891
891
|
variants: {
|
|
@@ -898,68 +898,68 @@ const El = Cr(
|
|
|
898
898
|
variant: "default"
|
|
899
899
|
}
|
|
900
900
|
}
|
|
901
|
-
),
|
|
901
|
+
), Yn = ie.forwardRef(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ a(
|
|
902
902
|
j.Root,
|
|
903
903
|
{
|
|
904
904
|
ref: r,
|
|
905
|
-
className:
|
|
905
|
+
className: ae(Sl({ variant: t }), e),
|
|
906
906
|
...n
|
|
907
907
|
}
|
|
908
908
|
));
|
|
909
|
-
|
|
910
|
-
const
|
|
909
|
+
Yn.displayName = j.Root.displayName;
|
|
910
|
+
const Pl = ie.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a(
|
|
911
911
|
j.Action,
|
|
912
912
|
{
|
|
913
913
|
ref: n,
|
|
914
|
-
className:
|
|
914
|
+
className: ae(
|
|
915
915
|
"inline-flex h-8 shrink-0 items-center justify-center rounded-md !border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",
|
|
916
916
|
e
|
|
917
917
|
),
|
|
918
918
|
...t
|
|
919
919
|
}
|
|
920
920
|
));
|
|
921
|
-
|
|
922
|
-
const
|
|
921
|
+
Pl.displayName = j.Action.displayName;
|
|
922
|
+
const Jn = ie.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a(
|
|
923
923
|
j.Close,
|
|
924
924
|
{
|
|
925
925
|
ref: n,
|
|
926
|
-
className:
|
|
926
|
+
className: ae(
|
|
927
927
|
"absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
|
|
928
928
|
e
|
|
929
929
|
),
|
|
930
930
|
"toast-close": "",
|
|
931
931
|
...t,
|
|
932
|
-
children: /* @__PURE__ */ a(
|
|
932
|
+
children: /* @__PURE__ */ a(ri, { className: "h-4 w-4" })
|
|
933
933
|
}
|
|
934
934
|
));
|
|
935
|
-
|
|
936
|
-
const
|
|
935
|
+
Jn.displayName = j.Close.displayName;
|
|
936
|
+
const Zn = ie.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a(
|
|
937
937
|
j.Title,
|
|
938
938
|
{
|
|
939
939
|
ref: n,
|
|
940
|
-
className:
|
|
940
|
+
className: ae("text-sm font-semibold", e),
|
|
941
941
|
...t
|
|
942
942
|
}
|
|
943
943
|
));
|
|
944
|
-
|
|
945
|
-
const
|
|
944
|
+
Zn.displayName = j.Title.displayName;
|
|
945
|
+
const Qn = ie.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a(
|
|
946
946
|
j.Description,
|
|
947
947
|
{
|
|
948
948
|
ref: n,
|
|
949
|
-
className:
|
|
949
|
+
className: ae("text-sm opacity-90", e),
|
|
950
950
|
...t
|
|
951
951
|
}
|
|
952
952
|
));
|
|
953
|
-
|
|
954
|
-
let
|
|
955
|
-
function
|
|
956
|
-
const [r, i] =
|
|
953
|
+
Qn.displayName = j.Description.displayName;
|
|
954
|
+
let le = !1;
|
|
955
|
+
function _l({ editor: e, attrs: t, extension: n }) {
|
|
956
|
+
const [r, i] = I(!1), o = ne(null), s = ne(null), { alt: c, align: l } = t, d = n == null ? void 0 : n.options.upload, f = () => {
|
|
957
957
|
(async () => {
|
|
958
|
-
const
|
|
959
|
-
|
|
958
|
+
const w = document.querySelector("#easydrawer");
|
|
959
|
+
w && (o.current = new si(w, {
|
|
960
960
|
wheelEventsEnabled: !1,
|
|
961
961
|
disableZoom: !0
|
|
962
|
-
}), s.current =
|
|
962
|
+
}), s.current = li(o.current), s.current.addDefaultToolWidgets(), o.current.loadFromSVG(decodeURIComponent(c)));
|
|
963
963
|
})();
|
|
964
964
|
};
|
|
965
965
|
R(() => {
|
|
@@ -969,70 +969,70 @@ function $l({ editor: e, attrs: t, extension: n }) {
|
|
|
969
969
|
}, [r]);
|
|
970
970
|
const u = async () => {
|
|
971
971
|
if (o.current) {
|
|
972
|
-
const T = o.current.toSVG(),
|
|
973
|
-
let
|
|
972
|
+
const T = o.current.toSVG(), w = T.outerHTML, P = `drawer-${cn()}.svg`;
|
|
973
|
+
let B = dn(T.outerHTML);
|
|
974
974
|
if (d) {
|
|
975
|
-
const
|
|
976
|
-
|
|
975
|
+
const k = un(B, P);
|
|
976
|
+
B = await d(k);
|
|
977
977
|
}
|
|
978
978
|
e == null || e.chain().focus().setDrawer(
|
|
979
979
|
{
|
|
980
980
|
type: "drawer",
|
|
981
|
-
src:
|
|
982
|
-
alt: encodeURIComponent(
|
|
981
|
+
src: B,
|
|
982
|
+
alt: encodeURIComponent(w),
|
|
983
983
|
width: 426,
|
|
984
984
|
height: 212
|
|
985
985
|
},
|
|
986
|
-
!!
|
|
986
|
+
!!w
|
|
987
987
|
).run(), e == null || e.commands.setAlignImageDrawer(l);
|
|
988
988
|
}
|
|
989
989
|
i(!1);
|
|
990
990
|
}, h = (T) => {
|
|
991
|
-
const
|
|
992
|
-
|
|
991
|
+
const w = o.current.toolController.getPrimaryTools()[2], P = s.current.getWidgetById("pen-1");
|
|
992
|
+
w && P && (w.setColor(T), P.serializeState());
|
|
993
993
|
}, m = (T) => {
|
|
994
|
-
const
|
|
995
|
-
|
|
994
|
+
const w = o.current.toolController.getPrimaryTools()[2], P = s.current.getWidgetById("pen-1");
|
|
995
|
+
w && P && (w.setThickness(T), P.serializeState());
|
|
996
996
|
}, g = (T) => {
|
|
997
|
-
const
|
|
998
|
-
|
|
999
|
-
},
|
|
1000
|
-
const
|
|
1001
|
-
|
|
1002
|
-
},
|
|
1003
|
-
const
|
|
1004
|
-
|
|
997
|
+
const w = o.current.toolController.getPrimaryTools()[3], P = s.current.getWidgetById("pen-2");
|
|
998
|
+
w && P && (w.setColor(T), P.serializeState());
|
|
999
|
+
}, v = (T) => {
|
|
1000
|
+
const w = s.current.getWidgetById("shape");
|
|
1001
|
+
w && w.setShapeType(T);
|
|
1002
|
+
}, x = (T) => {
|
|
1003
|
+
const w = o.current.toolController.getPrimaryTools()[5], P = s.current.getWidgetById("shape");
|
|
1004
|
+
w && P && (w.setColor(T), P.serializeState());
|
|
1005
1005
|
}, A = (T) => {
|
|
1006
|
-
const
|
|
1007
|
-
|
|
1006
|
+
const w = o.current.toolController.getPrimaryTools()[5], P = s.current.getWidgetById("shape");
|
|
1007
|
+
w && P && (w.setThickness(T), P.serializeState());
|
|
1008
1008
|
}, _ = (T) => {
|
|
1009
|
-
const
|
|
1010
|
-
|
|
1009
|
+
const w = o.current.toolController.getPrimaryTools()[5], P = s.current.getWidgetById("shape");
|
|
1010
|
+
w && P && (w.setBorderColor(T), P.serializeState());
|
|
1011
1011
|
}, E = () => {
|
|
1012
|
-
if (
|
|
1012
|
+
if (le) {
|
|
1013
1013
|
for (; o.current.history.redoStackSize > 0; )
|
|
1014
1014
|
o.current.history.redo();
|
|
1015
|
-
|
|
1015
|
+
le = !1;
|
|
1016
1016
|
return;
|
|
1017
1017
|
}
|
|
1018
1018
|
o.current.history.undo();
|
|
1019
1019
|
};
|
|
1020
1020
|
return /* @__PURE__ */ p(
|
|
1021
|
-
|
|
1021
|
+
Xe,
|
|
1022
1022
|
{
|
|
1023
1023
|
onOpenChange: i,
|
|
1024
1024
|
open: r,
|
|
1025
1025
|
children: [
|
|
1026
|
-
/* @__PURE__ */ a(
|
|
1027
|
-
|
|
1026
|
+
/* @__PURE__ */ a(qe, { asChild: !0, children: /* @__PURE__ */ a(
|
|
1027
|
+
C,
|
|
1028
1028
|
{
|
|
1029
1029
|
action: () => i(!0),
|
|
1030
1030
|
icon: "Pencil",
|
|
1031
1031
|
tooltip: "Edit Drawer"
|
|
1032
1032
|
}
|
|
1033
1033
|
) }),
|
|
1034
|
-
/* @__PURE__ */ p(
|
|
1035
|
-
/* @__PURE__ */ a(
|
|
1034
|
+
/* @__PURE__ */ p(Ye, { className: "z-[99999] !max-w-[1300px]", children: [
|
|
1035
|
+
/* @__PURE__ */ a(Je, { children: "Edit Drawer" }),
|
|
1036
1036
|
/* @__PURE__ */ p("div", { style: { height: "100%", borderWidth: 1, background: "white", position: "relative" }, children: [
|
|
1037
1037
|
/* @__PURE__ */ a(
|
|
1038
1038
|
"div",
|
|
@@ -1042,20 +1042,20 @@ function $l({ editor: e, attrs: t, extension: n }) {
|
|
|
1042
1042
|
}
|
|
1043
1043
|
),
|
|
1044
1044
|
/* @__PURE__ */ a(
|
|
1045
|
-
|
|
1045
|
+
xr,
|
|
1046
1046
|
{
|
|
1047
1047
|
changeBorderColorShape: _,
|
|
1048
|
-
changeColorShape:
|
|
1049
|
-
changeShape:
|
|
1048
|
+
changeColorShape: x,
|
|
1049
|
+
changeShape: v,
|
|
1050
1050
|
onClear: () => {
|
|
1051
|
-
if (!
|
|
1051
|
+
if (!le) {
|
|
1052
1052
|
for (; o.current.history.undoStackSize > 0; )
|
|
1053
1053
|
E();
|
|
1054
|
-
|
|
1054
|
+
le = !0;
|
|
1055
1055
|
}
|
|
1056
1056
|
},
|
|
1057
1057
|
onRedo: () => {
|
|
1058
|
-
|
|
1058
|
+
le || o.current.history.redo();
|
|
1059
1059
|
},
|
|
1060
1060
|
onThicknessChange: A,
|
|
1061
1061
|
onUndo: E,
|
|
@@ -1066,7 +1066,7 @@ function $l({ editor: e, attrs: t, extension: n }) {
|
|
|
1066
1066
|
}
|
|
1067
1067
|
)
|
|
1068
1068
|
] }),
|
|
1069
|
-
/* @__PURE__ */ a(
|
|
1069
|
+
/* @__PURE__ */ a(Ze, { children: /* @__PURE__ */ a(
|
|
1070
1070
|
Y,
|
|
1071
1071
|
{
|
|
1072
1072
|
onClick: u,
|
|
@@ -1079,8 +1079,8 @@ function $l({ editor: e, attrs: t, extension: n }) {
|
|
|
1079
1079
|
}
|
|
1080
1080
|
);
|
|
1081
1081
|
}
|
|
1082
|
-
function
|
|
1083
|
-
const [n, r] =
|
|
1082
|
+
function er(e, t) {
|
|
1083
|
+
const [n, r] = I(void 0);
|
|
1084
1084
|
return R(() => {
|
|
1085
1085
|
const i = () => {
|
|
1086
1086
|
const o = e.extensionManager.extensions.find((s) => s.name === t);
|
|
@@ -1091,16 +1091,16 @@ function nr(e, t) {
|
|
|
1091
1091
|
};
|
|
1092
1092
|
}, [e, t]), n;
|
|
1093
1093
|
}
|
|
1094
|
-
const
|
|
1094
|
+
const Nl = {
|
|
1095
1095
|
maxWidth: "auto",
|
|
1096
1096
|
zIndex: 20,
|
|
1097
1097
|
appendTo: "parent",
|
|
1098
1098
|
moveTransition: "transform 0.1s ease-out"
|
|
1099
1099
|
};
|
|
1100
|
-
function
|
|
1100
|
+
function El({ item: e, disabled: t, editor: n }) {
|
|
1101
1101
|
var i;
|
|
1102
1102
|
const r = e.component;
|
|
1103
|
-
return r ? /* @__PURE__ */ a(
|
|
1103
|
+
return r ? /* @__PURE__ */ a(Ve, { children: e.type === "divider" ? /* @__PURE__ */ a(
|
|
1104
1104
|
U,
|
|
1105
1105
|
{
|
|
1106
1106
|
className: "!mx-1 !my-2 !h-[16px]",
|
|
@@ -1115,26 +1115,26 @@ function Il({ item: e, disabled: t, editor: n }) {
|
|
|
1115
1115
|
}
|
|
1116
1116
|
) }) : /* @__PURE__ */ a(N, {});
|
|
1117
1117
|
}
|
|
1118
|
-
function
|
|
1118
|
+
function $l(e) {
|
|
1119
1119
|
return e.type.name === "drawer";
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1122
|
-
const { lang: t } =
|
|
1121
|
+
function Ol(e) {
|
|
1122
|
+
const { lang: t } = D(), n = Te(e.editor, vt.name), r = er(e.editor, vt.name), i = ({ editor: s }) => {
|
|
1123
1123
|
const { selection: c } = s.view.state, { $from: l, to: d } = c;
|
|
1124
1124
|
let f = !1;
|
|
1125
1125
|
return s.view.state.doc.nodesBetween(l.pos, d, (u) => {
|
|
1126
|
-
if (
|
|
1126
|
+
if ($l(u))
|
|
1127
1127
|
return f = !0, !1;
|
|
1128
1128
|
}), f;
|
|
1129
|
-
}, o = F(() => e.disabled ? [] :
|
|
1129
|
+
}, o = F(() => e.disabled ? [] : ec(e.editor), [e.disabled, e.editor, t]);
|
|
1130
1130
|
return /* @__PURE__ */ a(N, { children: /* @__PURE__ */ a(
|
|
1131
|
-
|
|
1131
|
+
L,
|
|
1132
1132
|
{
|
|
1133
1133
|
editor: e == null ? void 0 : e.editor,
|
|
1134
1134
|
shouldShow: i,
|
|
1135
|
-
tippyOptions:
|
|
1135
|
+
tippyOptions: Nl,
|
|
1136
1136
|
children: o != null && o.length ? /* @__PURE__ */ a("div", { className: "pointer-events-auto w-auto select-none rounded-sm !border border-neutral-200 bg-background px-3 py-2 shadow-sm transition-all dark:border-neutral-800", children: /* @__PURE__ */ a("div", { className: "relative flex h-[26px] flex-nowrap items-center justify-start whitespace-nowrap", children: o == null ? void 0 : o.map((s, c) => s.type === "edit" && (n != null && n.src) ? /* @__PURE__ */ a(
|
|
1137
|
-
|
|
1137
|
+
_l,
|
|
1138
1138
|
{
|
|
1139
1139
|
attrs: n,
|
|
1140
1140
|
editor: e.editor,
|
|
@@ -1142,7 +1142,7 @@ function Ml(e) {
|
|
|
1142
1142
|
},
|
|
1143
1143
|
`bubbleMenu-drawer-${c}`
|
|
1144
1144
|
) : /* @__PURE__ */ a(
|
|
1145
|
-
|
|
1145
|
+
El,
|
|
1146
1146
|
{
|
|
1147
1147
|
disabled: e.disabled,
|
|
1148
1148
|
editor: e.editor,
|
|
@@ -1153,8 +1153,8 @@ function Ml(e) {
|
|
|
1153
1153
|
}
|
|
1154
1154
|
) });
|
|
1155
1155
|
}
|
|
1156
|
-
const
|
|
1157
|
-
const { t: o } =
|
|
1156
|
+
const Rl = { padding: "0 12px 12px" }, Il = ({ width: e, maxWidth: t, height: n, onOk: r, children: i }) => {
|
|
1157
|
+
const { t: o } = D(), [s, c] = I({
|
|
1158
1158
|
width: "",
|
|
1159
1159
|
height: "",
|
|
1160
1160
|
maxWidth: ""
|
|
@@ -1169,12 +1169,12 @@ const kl = { padding: "0 12px 12px" }, rr = ({ width: e, maxWidth: t, height: n,
|
|
|
1169
1169
|
function l(d) {
|
|
1170
1170
|
d.preventDefault(), d.stopPropagation(), r(s);
|
|
1171
1171
|
}
|
|
1172
|
-
return /* @__PURE__ */ p(
|
|
1173
|
-
/* @__PURE__ */ a(
|
|
1174
|
-
/* @__PURE__ */ a(
|
|
1175
|
-
/* @__PURE__ */ a(
|
|
1172
|
+
return /* @__PURE__ */ p(br, { modal: !0, children: [
|
|
1173
|
+
/* @__PURE__ */ a(Cr, { asChild: !0, children: i }),
|
|
1174
|
+
/* @__PURE__ */ a(Tr, { children: /* @__PURE__ */ a("div", { style: Rl, children: /* @__PURE__ */ p("form", { className: "flex flex-col gap-2", onSubmit: l, children: [
|
|
1175
|
+
/* @__PURE__ */ a($e, { className: "mb-[6px]", children: "Width" }),
|
|
1176
1176
|
/* @__PURE__ */ a("div", { className: "flex w-full max-w-sm items-center gap-1.5", children: /* @__PURE__ */ a("div", { className: "relative items-center w-full max-w-sm", children: /* @__PURE__ */ a(
|
|
1177
|
-
|
|
1177
|
+
ye,
|
|
1178
1178
|
{
|
|
1179
1179
|
type: "number",
|
|
1180
1180
|
value: s.width,
|
|
@@ -1182,9 +1182,9 @@ const kl = { padding: "0 12px 12px" }, rr = ({ width: e, maxWidth: t, height: n,
|
|
|
1182
1182
|
onChange: (d) => c({ ...s, width: d.target.value })
|
|
1183
1183
|
}
|
|
1184
1184
|
) }) }),
|
|
1185
|
-
/* @__PURE__ */ a(
|
|
1185
|
+
/* @__PURE__ */ a($e, { className: "mb-[6px]", children: "Max Width" }),
|
|
1186
1186
|
/* @__PURE__ */ a("div", { className: "flex w-full max-w-sm items-center gap-1.5", children: /* @__PURE__ */ a("div", { className: "relative items-center w-full max-w-sm", children: /* @__PURE__ */ a(
|
|
1187
|
-
|
|
1187
|
+
ye,
|
|
1188
1188
|
{
|
|
1189
1189
|
type: "number",
|
|
1190
1190
|
value: s.maxWidth,
|
|
@@ -1192,9 +1192,9 @@ const kl = { padding: "0 12px 12px" }, rr = ({ width: e, maxWidth: t, height: n,
|
|
|
1192
1192
|
onChange: (d) => c({ ...s, maxWidth: d.target.value })
|
|
1193
1193
|
}
|
|
1194
1194
|
) }) }),
|
|
1195
|
-
/* @__PURE__ */ a(
|
|
1195
|
+
/* @__PURE__ */ a($e, { className: "mb-[6px]", children: "Height" }),
|
|
1196
1196
|
/* @__PURE__ */ a("div", { className: "flex w-full max-w-sm items-center gap-1.5", children: /* @__PURE__ */ a("div", { className: "relative items-center w-full max-w-sm", children: /* @__PURE__ */ a(
|
|
1197
|
-
|
|
1197
|
+
ye,
|
|
1198
1198
|
{
|
|
1199
1199
|
type: "number",
|
|
1200
1200
|
value: s.height,
|
|
@@ -1205,108 +1205,36 @@ const kl = { padding: "0 12px 12px" }, rr = ({ width: e, maxWidth: t, height: n,
|
|
|
1205
1205
|
/* @__PURE__ */ a(Y, { type: "submit", className: "self-end mt-2", children: o("editor.link.dialog.button.apply") })
|
|
1206
1206
|
] }) }) })
|
|
1207
1207
|
] });
|
|
1208
|
-
}
|
|
1209
|
-
function
|
|
1210
|
-
const t = e.
|
|
1211
|
-
Z.has("width") || Z.set("width", t.clientWidth), Z.has("width") && Z.get("width") <= 0 && Z.set("width", t.clientWidth);
|
|
1212
|
-
const n = { attributes: !0, childList: !0, subtree: !0 }, r = function() {
|
|
1213
|
-
Z.set("width", t.clientWidth);
|
|
1214
|
-
}, i = new MutationObserver(r);
|
|
1215
|
-
return i.observe(t, n), e.on("destroy", () => {
|
|
1216
|
-
i.disconnect();
|
|
1217
|
-
}), { width: Z.get("width") };
|
|
1218
|
-
}
|
|
1219
|
-
function Ll({ editor: e }) {
|
|
1220
|
-
const { t } = I(), { width: n } = Bl(e), r = ge(e, le.name, {
|
|
1221
|
-
defaultShowPicker: !1,
|
|
1222
|
-
createUser: "",
|
|
1223
|
-
width: 0,
|
|
1224
|
-
height: 0
|
|
1225
|
-
}), { defaultShowPicker: i, createUser: o, width: s, height: c } = r, l = $(
|
|
1226
|
-
(h) => {
|
|
1227
|
-
e.chain().updateAttributes(le.name, h).setNodeSelection(e.state.selection.from).focus().run();
|
|
1228
|
-
},
|
|
1229
|
-
[e]
|
|
1230
|
-
), d = $(() => {
|
|
1231
|
-
_r(r);
|
|
1232
|
-
}, [e, r]), f = $(() => e.isActive(le.name), [e]), u = $(() => pe(le.name, e), [e]);
|
|
1233
|
-
return R(() => {
|
|
1234
|
-
i && (d(), e.chain().updateAttributes(le.name, { defaultShowPicker: !1 }).focus().run());
|
|
1235
|
-
}, [o, i, e, d]), /* @__PURE__ */ a(
|
|
1236
|
-
B,
|
|
1237
|
-
{
|
|
1238
|
-
className: "bubble-menu",
|
|
1239
|
-
editor: e,
|
|
1240
|
-
pluginKey: "excalidraw-bubble-menu",
|
|
1241
|
-
shouldShow: f,
|
|
1242
|
-
tippyOptions: {
|
|
1243
|
-
popperOptions: {
|
|
1244
|
-
modifiers: [{ name: "flip", enabled: !1 }]
|
|
1245
|
-
},
|
|
1246
|
-
placement: "bottom-start",
|
|
1247
|
-
offset: [-2, 16],
|
|
1248
|
-
zIndex: 9999
|
|
1249
|
-
// onHidden: () => {
|
|
1250
|
-
// toggleVisible(false)
|
|
1251
|
-
// },
|
|
1252
|
-
},
|
|
1253
|
-
children: /* @__PURE__ */ p("div", { className: "w-auto px-3 py-2 transition-all !border rounded-sm shadow-sm pointer-events-auto select-none border-neutral-200 dark:border-neutral-800 bg-background", children: [
|
|
1254
|
-
/* @__PURE__ */ a(
|
|
1255
|
-
x,
|
|
1256
|
-
{
|
|
1257
|
-
icon: "Pencil",
|
|
1258
|
-
action: d,
|
|
1259
|
-
tooltip: t("editor.edit")
|
|
1260
|
-
}
|
|
1261
|
-
),
|
|
1262
|
-
/* @__PURE__ */ a(rr, { width: s, maxWidth: n, height: c, onOk: l, children: /* @__PURE__ */ a(
|
|
1263
|
-
x,
|
|
1264
|
-
{
|
|
1265
|
-
icon: "Settings",
|
|
1266
|
-
tooltip: t("editor.settings")
|
|
1267
|
-
}
|
|
1268
|
-
) }),
|
|
1269
|
-
/* @__PURE__ */ a(
|
|
1270
|
-
x,
|
|
1271
|
-
{
|
|
1272
|
-
icon: "Trash2",
|
|
1273
|
-
action: u,
|
|
1274
|
-
tooltip: t("editor.delete")
|
|
1275
|
-
}
|
|
1276
|
-
)
|
|
1277
|
-
] })
|
|
1278
|
-
}
|
|
1279
|
-
);
|
|
1280
|
-
}
|
|
1281
|
-
function zl({ editor: e }) {
|
|
1282
|
-
const { t } = I(), { width: n, height: r, url: i } = ge(e, ce.name, {
|
|
1208
|
+
};
|
|
1209
|
+
function Dl({ editor: e }) {
|
|
1210
|
+
const { t } = D(), { width: n, height: r, url: i } = Te(e, se.name, {
|
|
1283
1211
|
width: 0,
|
|
1284
1212
|
height: 0,
|
|
1285
1213
|
url: "",
|
|
1286
1214
|
defaultShowPicker: !1
|
|
1287
|
-
}), [o, s] =
|
|
1215
|
+
}), [o, s] = I(!1), [c, l] = I(""), d = O(() => {
|
|
1288
1216
|
s(!1);
|
|
1289
1217
|
}, [s]);
|
|
1290
1218
|
R(() => {
|
|
1291
1219
|
o && l(i);
|
|
1292
1220
|
}, [o, i]);
|
|
1293
|
-
const f =
|
|
1294
|
-
e.chain().updateAttributes(
|
|
1221
|
+
const f = O(() => {
|
|
1222
|
+
e.chain().updateAttributes(se.name, {
|
|
1295
1223
|
url: c
|
|
1296
1224
|
}).setNodeSelection(e.state.selection.from).focus().run(), s(!1);
|
|
1297
|
-
}, [e, c, s]), u =
|
|
1225
|
+
}, [e, c, s]), u = O(() => {
|
|
1298
1226
|
window.open(i, "_blank");
|
|
1299
|
-
}, [i]), h =
|
|
1227
|
+
}, [i]), h = O(() => {
|
|
1300
1228
|
s(!0);
|
|
1301
|
-
}, [s]), m =
|
|
1302
|
-
(
|
|
1303
|
-
e.chain().updateAttributes(
|
|
1229
|
+
}, [s]), m = O(
|
|
1230
|
+
(x) => {
|
|
1231
|
+
e.chain().updateAttributes(se.name, x).setNodeSelection(e.state.selection.from).focus().run();
|
|
1304
1232
|
},
|
|
1305
1233
|
[e]
|
|
1306
|
-
), g =
|
|
1234
|
+
), g = O(() => e.isActive(se.name) && !i, [e, i]), v = O(() => Ae(se.name, e), [e]);
|
|
1307
1235
|
return /* @__PURE__ */ p(N, { children: [
|
|
1308
1236
|
/* @__PURE__ */ a(
|
|
1309
|
-
|
|
1237
|
+
L,
|
|
1310
1238
|
{
|
|
1311
1239
|
className: "bubble-menu",
|
|
1312
1240
|
editor: e,
|
|
@@ -1325,7 +1253,7 @@ function zl({ editor: e }) {
|
|
|
1325
1253
|
},
|
|
1326
1254
|
children: /* @__PURE__ */ p("div", { className: "w-auto px-3 py-2 transition-all !border rounded-sm shadow-sm pointer-events-auto select-none border-neutral-200 dark:border-neutral-800 bg-background", children: [
|
|
1327
1255
|
/* @__PURE__ */ a(
|
|
1328
|
-
|
|
1256
|
+
C,
|
|
1329
1257
|
{
|
|
1330
1258
|
action: u,
|
|
1331
1259
|
icon: "Eye",
|
|
@@ -1333,24 +1261,24 @@ function zl({ editor: e }) {
|
|
|
1333
1261
|
}
|
|
1334
1262
|
),
|
|
1335
1263
|
/* @__PURE__ */ a(
|
|
1336
|
-
|
|
1264
|
+
C,
|
|
1337
1265
|
{
|
|
1338
1266
|
action: h,
|
|
1339
1267
|
icon: "Pencil",
|
|
1340
1268
|
tooltip: "Open Edit Link"
|
|
1341
1269
|
}
|
|
1342
1270
|
),
|
|
1343
|
-
/* @__PURE__ */ a(
|
|
1344
|
-
|
|
1271
|
+
/* @__PURE__ */ a(Il, { width: n, height: r, onOk: m, children: /* @__PURE__ */ a(
|
|
1272
|
+
C,
|
|
1345
1273
|
{
|
|
1346
1274
|
icon: "Settings",
|
|
1347
1275
|
tooltip: t("editor.settings")
|
|
1348
1276
|
}
|
|
1349
1277
|
) }),
|
|
1350
1278
|
/* @__PURE__ */ a(
|
|
1351
|
-
|
|
1279
|
+
C,
|
|
1352
1280
|
{
|
|
1353
|
-
action:
|
|
1281
|
+
action: v,
|
|
1354
1282
|
icon: "Trash2",
|
|
1355
1283
|
tooltip: t("editor.delete")
|
|
1356
1284
|
}
|
|
@@ -1359,25 +1287,25 @@ function zl({ editor: e }) {
|
|
|
1359
1287
|
}
|
|
1360
1288
|
),
|
|
1361
1289
|
/* @__PURE__ */ p(
|
|
1362
|
-
|
|
1290
|
+
Xe,
|
|
1363
1291
|
{
|
|
1364
1292
|
open: o,
|
|
1365
1293
|
onOpenChange: s,
|
|
1366
1294
|
children: [
|
|
1367
|
-
/* @__PURE__ */ a(
|
|
1368
|
-
/* @__PURE__ */ p(
|
|
1369
|
-
/* @__PURE__ */ a(
|
|
1295
|
+
/* @__PURE__ */ a(qe, {}),
|
|
1296
|
+
/* @__PURE__ */ p(Ye, { children: [
|
|
1297
|
+
/* @__PURE__ */ a(Ar, { children: /* @__PURE__ */ a(Je, { children: "Edit Link Iframe" }) }),
|
|
1370
1298
|
/* @__PURE__ */ a(
|
|
1371
|
-
|
|
1299
|
+
ye,
|
|
1372
1300
|
{
|
|
1373
1301
|
value: c,
|
|
1374
|
-
onInput: (
|
|
1302
|
+
onInput: (x) => l(x.target.value),
|
|
1375
1303
|
type: "url",
|
|
1376
1304
|
autoFocus: !0,
|
|
1377
1305
|
placeholder: "Enter link"
|
|
1378
1306
|
}
|
|
1379
1307
|
),
|
|
1380
|
-
/* @__PURE__ */ p(
|
|
1308
|
+
/* @__PURE__ */ p(Ze, { children: [
|
|
1381
1309
|
/* @__PURE__ */ a(Y, { onClick: d, children: "Cancel" }),
|
|
1382
1310
|
/* @__PURE__ */ a(Y, { onClick: f, children: "OK" })
|
|
1383
1311
|
] })
|
|
@@ -1387,21 +1315,21 @@ function zl({ editor: e }) {
|
|
|
1387
1315
|
)
|
|
1388
1316
|
] });
|
|
1389
1317
|
}
|
|
1390
|
-
function
|
|
1391
|
-
const n =
|
|
1318
|
+
function Ml({ editor: e, ...t }) {
|
|
1319
|
+
const n = Te(e, ge.name, {
|
|
1392
1320
|
text: "",
|
|
1393
1321
|
defaultShowPicker: !1
|
|
1394
|
-
}), { text: r, defaultShowPicker: i } = n, [o, s] =
|
|
1322
|
+
}), { text: r, defaultShowPicker: i } = n, [o, s] = I(""), [c, l] = I(!1), d = O(() => e.isActive(ge.name), [e]), f = O(() => Ae(ge.name, e), [e]), u = O(() => {
|
|
1395
1323
|
e.chain().focus().setKatex({ text: o }).run(), l(!1);
|
|
1396
1324
|
}, [e, o]);
|
|
1397
1325
|
R(() => {
|
|
1398
|
-
i && (l(!0), e.chain().updateAttributes(
|
|
1326
|
+
i && (l(!0), e.chain().updateAttributes(ge.name, { defaultShowPicker: !1 }).focus().run());
|
|
1399
1327
|
}, [e, i, l]), R(() => {
|
|
1400
1328
|
c && s(r || "");
|
|
1401
1329
|
}, [c]);
|
|
1402
1330
|
const h = F(() => {
|
|
1403
1331
|
try {
|
|
1404
|
-
return
|
|
1332
|
+
return ci.renderToString(`${o}`);
|
|
1405
1333
|
} catch {
|
|
1406
1334
|
return o;
|
|
1407
1335
|
}
|
|
@@ -1410,7 +1338,7 @@ function Fl({ editor: e, ...t }) {
|
|
|
1410
1338
|
[o, h]
|
|
1411
1339
|
);
|
|
1412
1340
|
return /* @__PURE__ */ a(
|
|
1413
|
-
|
|
1341
|
+
L,
|
|
1414
1342
|
{
|
|
1415
1343
|
editor: e,
|
|
1416
1344
|
pluginKey: "Katex-bubble-menu",
|
|
@@ -1428,7 +1356,7 @@ function Fl({ editor: e, ...t }) {
|
|
|
1428
1356
|
},
|
|
1429
1357
|
children: t != null && t.disabled ? /* @__PURE__ */ a(N, {}) : /* @__PURE__ */ a("div", { className: "p-2 bg-white !border rounded-lg shadow-sm dark:bg-black border-neutral-200 dark:border-neutral-800", children: c ? /* @__PURE__ */ p(N, { children: [
|
|
1430
1358
|
/* @__PURE__ */ a(
|
|
1431
|
-
|
|
1359
|
+
fn,
|
|
1432
1360
|
{
|
|
1433
1361
|
value: o,
|
|
1434
1362
|
onChange: (g) => s(g.target.value),
|
|
@@ -1442,26 +1370,26 @@ function Fl({ editor: e, ...t }) {
|
|
|
1442
1370
|
m && /* @__PURE__ */ a("div", { className: "my-[10px] p-[10px] rounded-[6px] !border-[1px] whitespace-nowrap overflow-auto", children: m }),
|
|
1443
1371
|
/* @__PURE__ */ p("div", { className: "flex items-center justify-between gap-[6px]", children: [
|
|
1444
1372
|
/* @__PURE__ */ a(Y, { onClick: u, className: "flex-1", children: "Submit" }),
|
|
1445
|
-
/* @__PURE__ */ a("a", { href: "https://katex.org/docs/supported", target: "_blank", rel: "noreferrer noopener", children: /* @__PURE__ */ a(
|
|
1373
|
+
/* @__PURE__ */ a("a", { href: "https://katex.org/docs/supported", target: "_blank", rel: "noreferrer noopener", children: /* @__PURE__ */ a(ii, { size: 16 }) })
|
|
1446
1374
|
] })
|
|
1447
1375
|
] }) : /* @__PURE__ */ p("div", { className: "flex items-center justify-center gap-[6px]", children: [
|
|
1448
|
-
/* @__PURE__ */ a(
|
|
1449
|
-
/* @__PURE__ */ a(
|
|
1376
|
+
/* @__PURE__ */ a(C, { tooltip: "Edit", action: () => l(!c), children: /* @__PURE__ */ a(oi, { size: 16 }) }),
|
|
1377
|
+
/* @__PURE__ */ a(C, { tooltip: "Delete", action: f, children: /* @__PURE__ */ a(ai, { size: 16 }) })
|
|
1450
1378
|
] }) })
|
|
1451
1379
|
}
|
|
1452
1380
|
);
|
|
1453
1381
|
}
|
|
1454
|
-
const
|
|
1455
|
-
a-->b`,
|
|
1456
|
-
const { alt: r, align: i } = t, [o, s] =
|
|
1382
|
+
const tn = `graph TB
|
|
1383
|
+
a-->b`, Bl = ({ editor: e, attrs: t, extension: n }) => {
|
|
1384
|
+
const { alt: r, align: i } = t, [o, s] = I(decodeURIComponent(r ?? tn)), [c, l] = I(""), [d, f] = I(!1), u = ne(null), h = n == null ? void 0 : n.options.upload, m = async (x) => {
|
|
1457
1385
|
try {
|
|
1458
|
-
const { svg: A } = await
|
|
1386
|
+
const { svg: A } = await $t.render("mermaid-svg", x);
|
|
1459
1387
|
l(A);
|
|
1460
1388
|
} catch {
|
|
1461
1389
|
l("");
|
|
1462
1390
|
}
|
|
1463
1391
|
}, g = () => {
|
|
1464
|
-
|
|
1392
|
+
$t.initialize({
|
|
1465
1393
|
darkMode: !1,
|
|
1466
1394
|
startOnLoad: !1,
|
|
1467
1395
|
// fontFamily:'',
|
|
@@ -1474,29 +1402,29 @@ a-->b`, jl = ({ editor: e, attrs: t, extension: n }) => {
|
|
|
1474
1402
|
}, [d]), R(() => {
|
|
1475
1403
|
d && m(o);
|
|
1476
1404
|
}, [o]), /* @__PURE__ */ p(
|
|
1477
|
-
|
|
1405
|
+
Xe,
|
|
1478
1406
|
{
|
|
1479
1407
|
onOpenChange: f,
|
|
1480
1408
|
open: d,
|
|
1481
1409
|
children: [
|
|
1482
|
-
/* @__PURE__ */ a(
|
|
1483
|
-
|
|
1410
|
+
/* @__PURE__ */ a(qe, { asChild: !0, children: /* @__PURE__ */ a(
|
|
1411
|
+
C,
|
|
1484
1412
|
{
|
|
1485
1413
|
action: () => f(!0),
|
|
1486
1414
|
icon: "Pencil",
|
|
1487
1415
|
tooltip: "Edit Mermaid"
|
|
1488
1416
|
}
|
|
1489
1417
|
) }),
|
|
1490
|
-
/* @__PURE__ */ p(
|
|
1491
|
-
/* @__PURE__ */ a(
|
|
1418
|
+
/* @__PURE__ */ p(Ye, { className: "z-[99999] !max-w-[1300px]", children: [
|
|
1419
|
+
/* @__PURE__ */ a(Je, { children: "Edit Mermaid" }),
|
|
1492
1420
|
/* @__PURE__ */ a("div", { style: { height: "100%", border: "1px solid hsl(var(--border))" }, children: /* @__PURE__ */ p("div", { className: "flex gap-[10px] rounded-[10px] p-[10px]", children: [
|
|
1493
1421
|
/* @__PURE__ */ a(
|
|
1494
|
-
|
|
1422
|
+
fn,
|
|
1495
1423
|
{
|
|
1496
1424
|
autoFocus: !0,
|
|
1497
1425
|
className: "flex-1",
|
|
1498
|
-
defaultValue:
|
|
1499
|
-
onChange: (
|
|
1426
|
+
defaultValue: tn,
|
|
1427
|
+
onChange: (x) => s(x.target.value),
|
|
1500
1428
|
placeholder: "Text",
|
|
1501
1429
|
required: !0,
|
|
1502
1430
|
rows: 10,
|
|
@@ -1516,22 +1444,22 @@ a-->b`, jl = ({ editor: e, attrs: t, extension: n }) => {
|
|
|
1516
1444
|
}
|
|
1517
1445
|
)
|
|
1518
1446
|
] }) }),
|
|
1519
|
-
/* @__PURE__ */ a(
|
|
1447
|
+
/* @__PURE__ */ a(Ze, { children: /* @__PURE__ */ a(
|
|
1520
1448
|
Y,
|
|
1521
1449
|
{
|
|
1522
1450
|
onClick: async () => {
|
|
1523
1451
|
if (o !== "") {
|
|
1524
1452
|
if (o) {
|
|
1525
|
-
const
|
|
1526
|
-
let
|
|
1453
|
+
const x = u.current.querySelector("svg"), { width: A, height: _ } = x.getBoundingClientRect(), E = `mermaid-${cn()}.svg`;
|
|
1454
|
+
let b = dn(x.outerHTML);
|
|
1527
1455
|
if (h) {
|
|
1528
|
-
const
|
|
1529
|
-
|
|
1456
|
+
const y = un(b, E);
|
|
1457
|
+
b = await h(y);
|
|
1530
1458
|
}
|
|
1531
1459
|
e == null || e.chain().focus().setMermaid(
|
|
1532
1460
|
{
|
|
1533
1461
|
type: "mermaid",
|
|
1534
|
-
src:
|
|
1462
|
+
src: b,
|
|
1535
1463
|
alt: encodeURIComponent(o),
|
|
1536
1464
|
width: A,
|
|
1537
1465
|
height: _
|
|
@@ -1550,16 +1478,16 @@ a-->b`, jl = ({ editor: e, attrs: t, extension: n }) => {
|
|
|
1550
1478
|
]
|
|
1551
1479
|
}
|
|
1552
1480
|
);
|
|
1553
|
-
},
|
|
1481
|
+
}, kl = {
|
|
1554
1482
|
maxWidth: "auto",
|
|
1555
1483
|
zIndex: 20,
|
|
1556
1484
|
appendTo: "parent",
|
|
1557
1485
|
moveTransition: "transform 0.1s ease-out"
|
|
1558
1486
|
};
|
|
1559
|
-
function
|
|
1487
|
+
function Ll({ item: e, disabled: t, editor: n }) {
|
|
1560
1488
|
var i;
|
|
1561
1489
|
const r = e.component;
|
|
1562
|
-
return r ? /* @__PURE__ */ a(
|
|
1490
|
+
return r ? /* @__PURE__ */ a(Ve, { children: e.type === "divider" ? /* @__PURE__ */ a(
|
|
1563
1491
|
U,
|
|
1564
1492
|
{
|
|
1565
1493
|
className: "!mx-1 !my-2 !h-[16px]",
|
|
@@ -1574,26 +1502,26 @@ function Ul({ item: e, disabled: t, editor: n }) {
|
|
|
1574
1502
|
}
|
|
1575
1503
|
) }) : /* @__PURE__ */ a(N, {});
|
|
1576
1504
|
}
|
|
1577
|
-
function
|
|
1505
|
+
function zl(e) {
|
|
1578
1506
|
return e.type.name === "mermaid";
|
|
1579
1507
|
}
|
|
1580
|
-
function
|
|
1581
|
-
const { lang: t } =
|
|
1508
|
+
function Fl(e) {
|
|
1509
|
+
const { lang: t } = D(), n = Te(e.editor, yt.name), r = er(e.editor, yt.name), i = ({ editor: s }) => {
|
|
1582
1510
|
const { selection: c } = s.view.state, { $from: l, to: d } = c;
|
|
1583
1511
|
let f = !1;
|
|
1584
1512
|
return s.view.state.doc.nodesBetween(l.pos, d, (u) => {
|
|
1585
|
-
if (
|
|
1513
|
+
if (zl(u))
|
|
1586
1514
|
return f = !0, !1;
|
|
1587
1515
|
}), f;
|
|
1588
|
-
}, o = F(() => e.disabled ? [] :
|
|
1516
|
+
}, o = F(() => e.disabled ? [] : Ql(e.editor), [e.disabled, e.editor, t]);
|
|
1589
1517
|
return /* @__PURE__ */ a(N, { children: /* @__PURE__ */ a(
|
|
1590
|
-
|
|
1518
|
+
L,
|
|
1591
1519
|
{
|
|
1592
1520
|
editor: e == null ? void 0 : e.editor,
|
|
1593
1521
|
shouldShow: i,
|
|
1594
|
-
tippyOptions:
|
|
1522
|
+
tippyOptions: kl,
|
|
1595
1523
|
children: o != null && o.length ? /* @__PURE__ */ a("div", { className: "pointer-events-auto w-auto select-none rounded-sm !border border-neutral-200 bg-background px-3 py-2 shadow-sm transition-all dark:border-neutral-800", children: /* @__PURE__ */ a("div", { className: "relative flex h-[26px] flex-nowrap items-center justify-start whitespace-nowrap", children: o == null ? void 0 : o.map((s, c) => s.type === "edit" && (n != null && n.src) ? /* @__PURE__ */ a(
|
|
1596
|
-
|
|
1524
|
+
Bl,
|
|
1597
1525
|
{
|
|
1598
1526
|
attrs: n,
|
|
1599
1527
|
editor: e.editor,
|
|
@@ -1601,7 +1529,7 @@ function Gl(e) {
|
|
|
1601
1529
|
},
|
|
1602
1530
|
`bubbleMenu-mermaid-${c}`
|
|
1603
1531
|
) : /* @__PURE__ */ a(
|
|
1604
|
-
|
|
1532
|
+
Ll,
|
|
1605
1533
|
{
|
|
1606
1534
|
disabled: e.disabled,
|
|
1607
1535
|
editor: e.editor,
|
|
@@ -1612,12 +1540,12 @@ function Gl(e) {
|
|
|
1612
1540
|
}
|
|
1613
1541
|
) });
|
|
1614
1542
|
}
|
|
1615
|
-
function
|
|
1616
|
-
const [n, r] =
|
|
1543
|
+
function jl({ editor: e, disabled: t }) {
|
|
1544
|
+
const [n, r] = I(!1), { t: i } = D(), o = O(({ editor: l }) => l.isActive(wt.name), []), s = (l) => {
|
|
1617
1545
|
e.commands.updateTweet({ src: l }), r(!1);
|
|
1618
|
-
}, c =
|
|
1546
|
+
}, c = O(() => Ae(wt.name, e), [e]);
|
|
1619
1547
|
return /* @__PURE__ */ a(N, { children: /* @__PURE__ */ a(
|
|
1620
|
-
|
|
1548
|
+
L,
|
|
1621
1549
|
{
|
|
1622
1550
|
editor: e,
|
|
1623
1551
|
shouldShow: o,
|
|
@@ -1633,14 +1561,14 @@ function Vl({ editor: e, disabled: t }) {
|
|
|
1633
1561
|
}
|
|
1634
1562
|
},
|
|
1635
1563
|
children: t ? /* @__PURE__ */ a(N, {}) : /* @__PURE__ */ a(N, { children: n ? /* @__PURE__ */ a(
|
|
1636
|
-
|
|
1564
|
+
Sr,
|
|
1637
1565
|
{
|
|
1638
1566
|
editor: e,
|
|
1639
1567
|
onSetLink: s
|
|
1640
1568
|
}
|
|
1641
1569
|
) : /* @__PURE__ */ a("div", { className: "flex items-center gap-2 rounded-lg !border border-neutral-200 bg-white p-2 shadow-sm dark:border-neutral-800 dark:bg-black", children: /* @__PURE__ */ p("div", { className: "flex flex-nowrap", children: [
|
|
1642
1570
|
/* @__PURE__ */ a(
|
|
1643
|
-
|
|
1571
|
+
C,
|
|
1644
1572
|
{
|
|
1645
1573
|
icon: "Pencil",
|
|
1646
1574
|
tooltip: i("editor.link.edit.tooltip"),
|
|
@@ -1651,7 +1579,7 @@ function Vl({ editor: e, disabled: t }) {
|
|
|
1651
1579
|
}
|
|
1652
1580
|
),
|
|
1653
1581
|
/* @__PURE__ */ a(
|
|
1654
|
-
|
|
1582
|
+
C,
|
|
1655
1583
|
{
|
|
1656
1584
|
action: c,
|
|
1657
1585
|
icon: "Trash",
|
|
@@ -1663,19 +1591,19 @@ function Vl({ editor: e, disabled: t }) {
|
|
|
1663
1591
|
}
|
|
1664
1592
|
) });
|
|
1665
1593
|
}
|
|
1666
|
-
function
|
|
1594
|
+
function Hl({ editor: e, disabled: t, bubbleMenu: n }) {
|
|
1667
1595
|
const r = e.extensionManager.extensions.map((o) => o.name), i = () => {
|
|
1668
|
-
var o, s, c, l, d, f, u, h, m, g,
|
|
1596
|
+
var o, s, c, l, d, f, u, h, m, g, v, x, A, _, E, b;
|
|
1669
1597
|
return [
|
|
1670
1598
|
r.includes("columns") && !((o = n == null ? void 0 : n.columnConfig) != null && o.hidden) ? /* @__PURE__ */ a(
|
|
1671
|
-
|
|
1599
|
+
bc,
|
|
1672
1600
|
{
|
|
1673
1601
|
editor: e
|
|
1674
1602
|
},
|
|
1675
1603
|
"columns"
|
|
1676
1604
|
) : null,
|
|
1677
1605
|
r.includes("table") && !((s = n == null ? void 0 : n.tableConfig) != null && s.hidden) ? /* @__PURE__ */ a(
|
|
1678
|
-
|
|
1606
|
+
fc,
|
|
1679
1607
|
{
|
|
1680
1608
|
editor: e,
|
|
1681
1609
|
items: (c = n == null ? void 0 : n.tableConfig) == null ? void 0 : c.items,
|
|
@@ -1684,23 +1612,23 @@ function Kl({ editor: e, disabled: t, bubbleMenu: n }) {
|
|
|
1684
1612
|
"table"
|
|
1685
1613
|
) : null,
|
|
1686
1614
|
r.includes("link") && !((d = n == null ? void 0 : n.linkConfig) != null && d.hidden) ? /* @__PURE__ */ a(
|
|
1687
|
-
|
|
1615
|
+
mc,
|
|
1688
1616
|
{
|
|
1689
1617
|
disabled: t,
|
|
1690
1618
|
editor: e
|
|
1691
1619
|
},
|
|
1692
1620
|
"link"
|
|
1693
1621
|
) : null,
|
|
1694
|
-
r.includes(
|
|
1695
|
-
|
|
1622
|
+
r.includes(hn.name) && !((f = n == null ? void 0 : n.imageConfig) != null && f.hidden) ? /* @__PURE__ */ a(
|
|
1623
|
+
yc,
|
|
1696
1624
|
{
|
|
1697
1625
|
disabled: t,
|
|
1698
1626
|
editor: e
|
|
1699
1627
|
},
|
|
1700
1628
|
"image"
|
|
1701
1629
|
) : null,
|
|
1702
|
-
r.includes(
|
|
1703
|
-
|
|
1630
|
+
r.includes(mn.name) && !((u = n == null ? void 0 : n.imageGifConfig) != null && u.hidden) ? /* @__PURE__ */ a(
|
|
1631
|
+
wc,
|
|
1704
1632
|
{
|
|
1705
1633
|
disabled: t,
|
|
1706
1634
|
editor: e
|
|
@@ -1708,7 +1636,7 @@ function Kl({ editor: e, disabled: t, bubbleMenu: n }) {
|
|
|
1708
1636
|
"imageGif"
|
|
1709
1637
|
) : null,
|
|
1710
1638
|
r.includes("video") && !((h = n == null ? void 0 : n.videoConfig) != null && h.hidden) ? /* @__PURE__ */ a(
|
|
1711
|
-
|
|
1639
|
+
xc,
|
|
1712
1640
|
{
|
|
1713
1641
|
disabled: t,
|
|
1714
1642
|
editor: e
|
|
@@ -1716,64 +1644,56 @@ function Kl({ editor: e, disabled: t, bubbleMenu: n }) {
|
|
|
1716
1644
|
"video"
|
|
1717
1645
|
) : null,
|
|
1718
1646
|
r.includes("katex") && !((m = n == null ? void 0 : n.katexConfig) != null && m.hidden) ? /* @__PURE__ */ a(
|
|
1719
|
-
|
|
1647
|
+
Ml,
|
|
1720
1648
|
{
|
|
1721
1649
|
disabled: t,
|
|
1722
1650
|
editor: e
|
|
1723
1651
|
},
|
|
1724
1652
|
"katex"
|
|
1725
1653
|
) : null,
|
|
1726
|
-
r.includes("
|
|
1727
|
-
|
|
1728
|
-
{
|
|
1729
|
-
disabled: t,
|
|
1730
|
-
editor: e
|
|
1731
|
-
},
|
|
1732
|
-
"excalidraw"
|
|
1733
|
-
) : null,
|
|
1734
|
-
r.includes("mermaid") && !((w = n == null ? void 0 : n.mermaidConfig) != null && w.hidden) ? /* @__PURE__ */ a(
|
|
1735
|
-
Gl,
|
|
1654
|
+
r.includes("mermaid") && !((g = n == null ? void 0 : n.mermaidConfig) != null && g.hidden) ? /* @__PURE__ */ a(
|
|
1655
|
+
Fl,
|
|
1736
1656
|
{
|
|
1737
1657
|
disabled: t,
|
|
1738
1658
|
editor: e
|
|
1739
1659
|
},
|
|
1740
1660
|
"mermaid"
|
|
1741
1661
|
) : null,
|
|
1742
|
-
r.includes("iframe") && !((
|
|
1743
|
-
|
|
1662
|
+
r.includes("iframe") && !((v = n == null ? void 0 : n.iframeConfig) != null && v.hidden) ? /* @__PURE__ */ a(
|
|
1663
|
+
Dl,
|
|
1744
1664
|
{
|
|
1745
1665
|
disabled: t,
|
|
1746
1666
|
editor: e
|
|
1747
1667
|
},
|
|
1748
1668
|
"iframe"
|
|
1749
1669
|
) : null,
|
|
1750
|
-
r.includes("twitter") && !((
|
|
1751
|
-
|
|
1670
|
+
r.includes("twitter") && !((x = n == null ? void 0 : n.twitterConfig) != null && x.hidden) ? /* @__PURE__ */ a(
|
|
1671
|
+
jl,
|
|
1752
1672
|
{
|
|
1753
1673
|
disabled: t,
|
|
1754
1674
|
editor: e
|
|
1755
1675
|
},
|
|
1756
1676
|
"twitter"
|
|
1757
1677
|
) : null,
|
|
1758
|
-
(
|
|
1759
|
-
|
|
1678
|
+
(A = n == null ? void 0 : n.floatingMenuConfig) != null && A.hidden ? null : /* @__PURE__ */ a(
|
|
1679
|
+
ac,
|
|
1760
1680
|
{
|
|
1761
1681
|
disabled: t,
|
|
1762
1682
|
editor: e
|
|
1763
1683
|
},
|
|
1764
1684
|
"content"
|
|
1765
1685
|
),
|
|
1766
|
-
(
|
|
1767
|
-
|
|
1686
|
+
(_ = n == null ? void 0 : n.textConfig) != null && _.hidden ? null : /* @__PURE__ */ a(
|
|
1687
|
+
lc,
|
|
1768
1688
|
{
|
|
1769
1689
|
disabled: t,
|
|
1770
1690
|
editor: e,
|
|
1771
|
-
items: (
|
|
1691
|
+
items: (E = n == null ? void 0 : n.textConfig) == null ? void 0 : E.items
|
|
1772
1692
|
},
|
|
1773
1693
|
"text"
|
|
1774
1694
|
),
|
|
1775
|
-
r.includes("drawer") && !((
|
|
1776
|
-
|
|
1695
|
+
r.includes("drawer") && !((b = n == null ? void 0 : n.drawerConfig) != null && b.hidden) ? /* @__PURE__ */ a(
|
|
1696
|
+
Ol,
|
|
1777
1697
|
{
|
|
1778
1698
|
disabled: t,
|
|
1779
1699
|
editor: e
|
|
@@ -1784,8 +1704,8 @@ function Kl({ editor: e, disabled: t, bubbleMenu: n }) {
|
|
|
1784
1704
|
};
|
|
1785
1705
|
return n != null && n.render ? n.render({ editor: e, disabled: t || !1, bubbleMenu: n }, i()) : i().filter(Boolean);
|
|
1786
1706
|
}
|
|
1787
|
-
function
|
|
1788
|
-
const { t: r, lang: i } =
|
|
1707
|
+
function Ul({ editor: e, disabled: t, toolbar: n }) {
|
|
1708
|
+
const { t: r, lang: i } = D(), o = F(() => {
|
|
1789
1709
|
const d = [...e.extensionManager.extensions].sort((u, h) => {
|
|
1790
1710
|
const m = u.options.sort ?? -1, g = h.options.sort ?? -1;
|
|
1791
1711
|
return m - g;
|
|
@@ -1796,19 +1716,19 @@ function Xl({ editor: e, disabled: t, toolbar: n }) {
|
|
|
1796
1716
|
button: h,
|
|
1797
1717
|
divider: m = !1,
|
|
1798
1718
|
spacer: g = !1,
|
|
1799
|
-
toolbar:
|
|
1719
|
+
toolbar: v = !0
|
|
1800
1720
|
} = u.options;
|
|
1801
|
-
if (!h || !
|
|
1721
|
+
if (!h || !Pr(h) || !v)
|
|
1802
1722
|
continue;
|
|
1803
|
-
const
|
|
1723
|
+
const x = h({
|
|
1804
1724
|
editor: e,
|
|
1805
1725
|
extension: u,
|
|
1806
1726
|
t: r
|
|
1807
1727
|
});
|
|
1808
|
-
if (Array.isArray(
|
|
1809
|
-
const A =
|
|
1728
|
+
if (Array.isArray(x)) {
|
|
1729
|
+
const A = x.map((_, E) => ({
|
|
1810
1730
|
button: _,
|
|
1811
|
-
divider: E ===
|
|
1731
|
+
divider: E === x.length - 1 ? m : !1,
|
|
1812
1732
|
spacer: E === 0 ? g : !1,
|
|
1813
1733
|
type: u.type,
|
|
1814
1734
|
name: u.name
|
|
@@ -1817,7 +1737,7 @@ function Xl({ editor: e, disabled: t, toolbar: n }) {
|
|
|
1817
1737
|
continue;
|
|
1818
1738
|
}
|
|
1819
1739
|
f.push({
|
|
1820
|
-
button:
|
|
1740
|
+
button: x,
|
|
1821
1741
|
divider: m,
|
|
1822
1742
|
spacer: g,
|
|
1823
1743
|
type: u.type,
|
|
@@ -1852,7 +1772,7 @@ function Xl({ editor: e, disabled: t, toolbar: n }) {
|
|
|
1852
1772
|
});
|
|
1853
1773
|
return n && (n != null && n.render) ? n.render({ editor: e, disabled: t || !1 }, o, c, s) : s(c);
|
|
1854
1774
|
}
|
|
1855
|
-
function
|
|
1775
|
+
function Gl(e) {
|
|
1856
1776
|
const t = ["size-small", "size-medium", "size-large"], n = [
|
|
1857
1777
|
"SizeS",
|
|
1858
1778
|
"SizeM",
|
|
@@ -1860,16 +1780,16 @@ function ql(e) {
|
|
|
1860
1780
|
];
|
|
1861
1781
|
return t.map((r, i) => ({
|
|
1862
1782
|
type: `image-${r}`,
|
|
1863
|
-
component:
|
|
1783
|
+
component: C,
|
|
1864
1784
|
componentProps: {
|
|
1865
1785
|
tooltip: M.t(`editor.${r.replace("-", ".")}.tooltip`),
|
|
1866
1786
|
icon: n[i],
|
|
1867
|
-
action: () => e.commands.updateImage({ width:
|
|
1868
|
-
isActive: () => e.isActive("image", { width:
|
|
1787
|
+
action: () => e.commands.updateImage({ width: we[r] }),
|
|
1788
|
+
isActive: () => e.isActive("image", { width: we[r] })
|
|
1869
1789
|
}
|
|
1870
1790
|
}));
|
|
1871
1791
|
}
|
|
1872
|
-
function
|
|
1792
|
+
function Wl(e) {
|
|
1873
1793
|
const t = ["size-small", "size-medium", "size-large"], n = [
|
|
1874
1794
|
"SizeS",
|
|
1875
1795
|
"SizeM",
|
|
@@ -1877,16 +1797,16 @@ function Yl(e) {
|
|
|
1877
1797
|
];
|
|
1878
1798
|
return t.map((r, i) => ({
|
|
1879
1799
|
type: `image-${r}`,
|
|
1880
|
-
component:
|
|
1800
|
+
component: C,
|
|
1881
1801
|
componentProps: {
|
|
1882
1802
|
tooltip: M.t(`editor.${r.replace("-", ".")}.tooltip`),
|
|
1883
1803
|
icon: n[i],
|
|
1884
|
-
action: () => e.commands.updateImageGif({ width:
|
|
1885
|
-
isActive: () => e.isActive("image", { width:
|
|
1804
|
+
action: () => e.commands.updateImageGif({ width: we[r] }),
|
|
1805
|
+
isActive: () => e.isActive("image", { width: we[r] })
|
|
1886
1806
|
}
|
|
1887
1807
|
}));
|
|
1888
1808
|
}
|
|
1889
|
-
function
|
|
1809
|
+
function Vl(e) {
|
|
1890
1810
|
const t = ["left", "center", "right"], n = {
|
|
1891
1811
|
left: "AlignLeft",
|
|
1892
1812
|
center: "AlignCenter",
|
|
@@ -1894,7 +1814,7 @@ function Jl(e) {
|
|
|
1894
1814
|
};
|
|
1895
1815
|
return t.map((r) => ({
|
|
1896
1816
|
type: `image-${r}`,
|
|
1897
|
-
component:
|
|
1817
|
+
component: C,
|
|
1898
1818
|
componentProps: {
|
|
1899
1819
|
tooltip: M.t(`editor.textalign.${r}.tooltip`),
|
|
1900
1820
|
icon: n[r],
|
|
@@ -1907,7 +1827,7 @@ function Jl(e) {
|
|
|
1907
1827
|
}
|
|
1908
1828
|
}));
|
|
1909
1829
|
}
|
|
1910
|
-
function
|
|
1830
|
+
function Kl(e) {
|
|
1911
1831
|
const t = ["left", "center", "right"], n = {
|
|
1912
1832
|
left: "AlignLeft",
|
|
1913
1833
|
center: "AlignCenter",
|
|
@@ -1915,7 +1835,7 @@ function Zl(e) {
|
|
|
1915
1835
|
};
|
|
1916
1836
|
return t.map((r) => ({
|
|
1917
1837
|
type: `image-${r}`,
|
|
1918
|
-
component:
|
|
1838
|
+
component: C,
|
|
1919
1839
|
componentProps: {
|
|
1920
1840
|
tooltip: M.t(`editor.textalign.${r}.tooltip`),
|
|
1921
1841
|
icon: n[r],
|
|
@@ -1928,7 +1848,7 @@ function Zl(e) {
|
|
|
1928
1848
|
}
|
|
1929
1849
|
}));
|
|
1930
1850
|
}
|
|
1931
|
-
function
|
|
1851
|
+
function Xl(e) {
|
|
1932
1852
|
const t = ["left", "center", "right"], n = {
|
|
1933
1853
|
left: "AlignLeft",
|
|
1934
1854
|
center: "AlignCenter",
|
|
@@ -1936,7 +1856,7 @@ function Ql(e) {
|
|
|
1936
1856
|
};
|
|
1937
1857
|
return t.map((r) => ({
|
|
1938
1858
|
type: `image-${r}`,
|
|
1939
|
-
component:
|
|
1859
|
+
component: C,
|
|
1940
1860
|
componentProps: {
|
|
1941
1861
|
tooltip: M.t(`editor.textalign.${r}.tooltip`),
|
|
1942
1862
|
icon: n[r],
|
|
@@ -1949,7 +1869,7 @@ function Ql(e) {
|
|
|
1949
1869
|
}
|
|
1950
1870
|
}));
|
|
1951
1871
|
}
|
|
1952
|
-
function
|
|
1872
|
+
function ql(e) {
|
|
1953
1873
|
const t = ["left", "center", "right"], n = {
|
|
1954
1874
|
left: "AlignLeft",
|
|
1955
1875
|
center: "AlignCenter",
|
|
@@ -1957,7 +1877,7 @@ function ec(e) {
|
|
|
1957
1877
|
};
|
|
1958
1878
|
return t.map((r) => ({
|
|
1959
1879
|
type: `image-${r}`,
|
|
1960
|
-
component:
|
|
1880
|
+
component: C,
|
|
1961
1881
|
componentProps: {
|
|
1962
1882
|
tooltip: M.t(`editor.textalign.${r}.tooltip`),
|
|
1963
1883
|
icon: n[r],
|
|
@@ -1970,7 +1890,7 @@ function ec(e) {
|
|
|
1970
1890
|
}
|
|
1971
1891
|
}));
|
|
1972
1892
|
}
|
|
1973
|
-
function
|
|
1893
|
+
function Yl(e) {
|
|
1974
1894
|
const t = ["size-small", "size-medium", "size-large"], n = [
|
|
1975
1895
|
"SizeS",
|
|
1976
1896
|
"SizeM",
|
|
@@ -1978,20 +1898,20 @@ function tc(e) {
|
|
|
1978
1898
|
];
|
|
1979
1899
|
return t.map((r, i) => ({
|
|
1980
1900
|
type: `video-${r}`,
|
|
1981
|
-
component:
|
|
1901
|
+
component: C,
|
|
1982
1902
|
componentProps: {
|
|
1983
1903
|
tooltip: M.t(`editor.${r.replace("-", ".")}.tooltip`),
|
|
1984
1904
|
icon: n[i],
|
|
1985
|
-
action: () => e.commands.updateVideo({ width:
|
|
1986
|
-
isActive: () => e.isActive("video", { width:
|
|
1905
|
+
action: () => e.commands.updateVideo({ width: Et[r] }),
|
|
1906
|
+
isActive: () => e.isActive("video", { width: Et[r] })
|
|
1987
1907
|
}
|
|
1988
1908
|
}));
|
|
1989
1909
|
}
|
|
1990
|
-
function
|
|
1910
|
+
function Jl(e) {
|
|
1991
1911
|
return [
|
|
1992
1912
|
{
|
|
1993
1913
|
type: "flipX",
|
|
1994
|
-
component:
|
|
1914
|
+
component: C,
|
|
1995
1915
|
componentProps: {
|
|
1996
1916
|
editor: e,
|
|
1997
1917
|
tooltip: M.t("editor.tooltip.flipX"),
|
|
@@ -2006,7 +1926,7 @@ function nc(e) {
|
|
|
2006
1926
|
},
|
|
2007
1927
|
{
|
|
2008
1928
|
type: "flipY",
|
|
2009
|
-
component:
|
|
1929
|
+
component: C,
|
|
2010
1930
|
componentProps: {
|
|
2011
1931
|
editor: e,
|
|
2012
1932
|
tooltip: M.t("editor.tooltip.flipY"),
|
|
@@ -2019,48 +1939,48 @@ function nc(e) {
|
|
|
2019
1939
|
}
|
|
2020
1940
|
}
|
|
2021
1941
|
},
|
|
2022
|
-
...
|
|
2023
|
-
...
|
|
1942
|
+
...Gl(e),
|
|
1943
|
+
...Vl(e),
|
|
2024
1944
|
{
|
|
2025
1945
|
type: "remove",
|
|
2026
|
-
component:
|
|
1946
|
+
component: C,
|
|
2027
1947
|
componentProps: {
|
|
2028
1948
|
editor: e,
|
|
2029
1949
|
tooltip: M.t("editor.remove"),
|
|
2030
1950
|
icon: "Trash2",
|
|
2031
1951
|
action: () => {
|
|
2032
1952
|
const { state: t, dispatch: n } = e.view;
|
|
2033
|
-
|
|
1953
|
+
he(t, n);
|
|
2034
1954
|
}
|
|
2035
1955
|
}
|
|
2036
1956
|
}
|
|
2037
1957
|
];
|
|
2038
1958
|
}
|
|
2039
|
-
function
|
|
1959
|
+
function Zl(e) {
|
|
2040
1960
|
return [
|
|
2041
|
-
...
|
|
2042
|
-
...
|
|
1961
|
+
...Wl(e),
|
|
1962
|
+
...Kl(e),
|
|
2043
1963
|
{
|
|
2044
1964
|
type: "remove",
|
|
2045
|
-
component:
|
|
1965
|
+
component: C,
|
|
2046
1966
|
componentProps: {
|
|
2047
1967
|
editor: e,
|
|
2048
1968
|
tooltip: M.t("editor.remove"),
|
|
2049
1969
|
icon: "Trash2",
|
|
2050
1970
|
action: () => {
|
|
2051
1971
|
const { state: t, dispatch: n } = e.view;
|
|
2052
|
-
|
|
1972
|
+
he(t, n);
|
|
2053
1973
|
}
|
|
2054
1974
|
}
|
|
2055
1975
|
}
|
|
2056
1976
|
];
|
|
2057
1977
|
}
|
|
2058
|
-
function
|
|
1978
|
+
function Ql(e) {
|
|
2059
1979
|
return [
|
|
2060
|
-
...
|
|
1980
|
+
...Xl(e),
|
|
2061
1981
|
{
|
|
2062
1982
|
type: "edit",
|
|
2063
|
-
component:
|
|
1983
|
+
component: C,
|
|
2064
1984
|
componentProps: {
|
|
2065
1985
|
editor: e,
|
|
2066
1986
|
tooltip: M.t("editor.edit"),
|
|
@@ -2070,25 +1990,25 @@ function ic(e) {
|
|
|
2070
1990
|
},
|
|
2071
1991
|
{
|
|
2072
1992
|
type: "remove",
|
|
2073
|
-
component:
|
|
1993
|
+
component: C,
|
|
2074
1994
|
componentProps: {
|
|
2075
1995
|
editor: e,
|
|
2076
1996
|
tooltip: M.t("editor.remove"),
|
|
2077
1997
|
icon: "Trash2",
|
|
2078
1998
|
action: () => {
|
|
2079
1999
|
const { state: t, dispatch: n } = e.view;
|
|
2080
|
-
|
|
2000
|
+
he(t, n);
|
|
2081
2001
|
}
|
|
2082
2002
|
}
|
|
2083
2003
|
}
|
|
2084
2004
|
];
|
|
2085
2005
|
}
|
|
2086
|
-
function
|
|
2006
|
+
function ec(e) {
|
|
2087
2007
|
return [
|
|
2088
|
-
...
|
|
2008
|
+
...ql(e),
|
|
2089
2009
|
{
|
|
2090
2010
|
type: "edit",
|
|
2091
|
-
component:
|
|
2011
|
+
component: C,
|
|
2092
2012
|
componentProps: {
|
|
2093
2013
|
editor: e,
|
|
2094
2014
|
tooltip: M.t("editor.edit"),
|
|
@@ -2098,38 +2018,38 @@ function oc(e) {
|
|
|
2098
2018
|
},
|
|
2099
2019
|
{
|
|
2100
2020
|
type: "remove",
|
|
2101
|
-
component:
|
|
2021
|
+
component: C,
|
|
2102
2022
|
componentProps: {
|
|
2103
2023
|
editor: e,
|
|
2104
2024
|
tooltip: M.t("editor.remove"),
|
|
2105
2025
|
icon: "Trash2",
|
|
2106
2026
|
action: () => {
|
|
2107
2027
|
const { state: t, dispatch: n } = e.view;
|
|
2108
|
-
|
|
2028
|
+
he(t, n);
|
|
2109
2029
|
}
|
|
2110
2030
|
}
|
|
2111
2031
|
}
|
|
2112
2032
|
];
|
|
2113
2033
|
}
|
|
2114
|
-
function
|
|
2034
|
+
function tc(e) {
|
|
2115
2035
|
return [
|
|
2116
|
-
...
|
|
2036
|
+
...Yl(e),
|
|
2117
2037
|
{
|
|
2118
2038
|
type: "remove",
|
|
2119
|
-
component:
|
|
2039
|
+
component: C,
|
|
2120
2040
|
componentProps: {
|
|
2121
2041
|
editor: e,
|
|
2122
2042
|
tooltip: M.t("editor.remove"),
|
|
2123
2043
|
icon: "Trash2",
|
|
2124
2044
|
action: () => {
|
|
2125
2045
|
const { state: t, dispatch: n } = e.view;
|
|
2126
|
-
|
|
2046
|
+
he(t, n);
|
|
2127
2047
|
}
|
|
2128
2048
|
}
|
|
2129
2049
|
}
|
|
2130
2050
|
];
|
|
2131
2051
|
}
|
|
2132
|
-
function
|
|
2052
|
+
function tr(e, t, n = ti) {
|
|
2133
2053
|
return n.reduce((r, i) => {
|
|
2134
2054
|
if (i === "divider" && r.length > 0)
|
|
2135
2055
|
return [...r, {
|
|
@@ -2141,40 +2061,40 @@ function ir(e, t, n = oi) {
|
|
|
2141
2061
|
return o ? [...r, o.configure().options.button({ editor: e, t, extension: o })] : r;
|
|
2142
2062
|
}, []);
|
|
2143
2063
|
}
|
|
2144
|
-
function
|
|
2064
|
+
function st(e, t, n) {
|
|
2145
2065
|
const r = [], i = e.node(0);
|
|
2146
2066
|
n = typeof n == "number" && n >= 0 ? n : e.sameParent(t) ? Math.max(0, e.sharedDepth(t.pos) - 1) : e.sharedDepth(t.pos);
|
|
2147
|
-
const o = new
|
|
2067
|
+
const o = new _r(e, t, n), s = o.depth === 0 ? 0 : i.resolve(o.start).posAtIndex(0);
|
|
2148
2068
|
return o.parent.forEach((c, l) => {
|
|
2149
2069
|
const d = s + l, f = d + c.nodeSize;
|
|
2150
2070
|
if (d < o.start || d >= o.end) return;
|
|
2151
|
-
const u = new
|
|
2071
|
+
const u = new Nr(i.resolve(d), i.resolve(f));
|
|
2152
2072
|
r.push(u);
|
|
2153
2073
|
}), r;
|
|
2154
2074
|
}
|
|
2155
|
-
class
|
|
2075
|
+
class lt {
|
|
2156
2076
|
constructor(t, n) {
|
|
2157
|
-
|
|
2158
|
-
|
|
2077
|
+
me(this, "anchor");
|
|
2078
|
+
me(this, "head");
|
|
2159
2079
|
this.anchor = t, this.head = n;
|
|
2160
2080
|
}
|
|
2161
2081
|
map(t) {
|
|
2162
|
-
return new
|
|
2082
|
+
return new lt(t.map(this.anchor), t.map(this.head));
|
|
2163
2083
|
}
|
|
2164
2084
|
resolve(t) {
|
|
2165
2085
|
const n = t.resolve(this.anchor), r = t.resolve(this.head);
|
|
2166
2086
|
return new H(n, r);
|
|
2167
2087
|
}
|
|
2168
2088
|
}
|
|
2169
|
-
class H extends
|
|
2089
|
+
class H extends Er {
|
|
2170
2090
|
constructor(n, r, i, o = 1) {
|
|
2171
|
-
const { doc: s } = n, c = n === r, l = n.pos === s.content.size && r.pos === s.content.size, d = c && !l ? s.resolve(r.pos + (o > 0 ? 1 : -1)) : r, f = c && l ? s.resolve(n.pos - (o > 0 ? 1 : -1)) : n, u =
|
|
2091
|
+
const { doc: s } = n, c = n === r, l = n.pos === s.content.size && r.pos === s.content.size, d = c && !l ? s.resolve(r.pos + (o > 0 ? 1 : -1)) : r, f = c && l ? s.resolve(n.pos - (o > 0 ? 1 : -1)) : n, u = st(f.min(d), f.max(d), i);
|
|
2172
2092
|
super(
|
|
2173
2093
|
d.pos >= n.pos ? u[0].$from : u[u.length - 1].$to,
|
|
2174
2094
|
d.pos >= n.pos ? u[u.length - 1].$to : u[0].$from,
|
|
2175
2095
|
u
|
|
2176
2096
|
);
|
|
2177
|
-
|
|
2097
|
+
me(this, "depth");
|
|
2178
2098
|
this.depth = i;
|
|
2179
2099
|
}
|
|
2180
2100
|
get $to() {
|
|
@@ -2221,10 +2141,10 @@ class H extends Ir {
|
|
|
2221
2141
|
return new this(n.resolve(r), n.resolve(i), o, s);
|
|
2222
2142
|
}
|
|
2223
2143
|
getBookmark() {
|
|
2224
|
-
return new
|
|
2144
|
+
return new lt(this.anchor, this.head);
|
|
2225
2145
|
}
|
|
2226
2146
|
}
|
|
2227
|
-
function
|
|
2147
|
+
function nc(e) {
|
|
2228
2148
|
const t = e.cloneNode(!0), n = [e, ...Array.from(e.getElementsByTagName("*"))], r = [t, ...Array.from(t.getElementsByTagName("*"))];
|
|
2229
2149
|
return n.forEach((i, o) => {
|
|
2230
2150
|
r[o].style.cssText = function(s) {
|
|
@@ -2236,16 +2156,16 @@ function sc(e) {
|
|
|
2236
2156
|
}(i);
|
|
2237
2157
|
}), t;
|
|
2238
2158
|
}
|
|
2239
|
-
function
|
|
2159
|
+
function ve(e, t) {
|
|
2240
2160
|
return window.getComputedStyle(e)[t];
|
|
2241
2161
|
}
|
|
2242
|
-
function
|
|
2162
|
+
function rc(e = 0, t = 0, n = 0) {
|
|
2243
2163
|
return Math.min(Math.max(e, t), n);
|
|
2244
2164
|
}
|
|
2245
|
-
function
|
|
2165
|
+
function nn(e) {
|
|
2246
2166
|
e.parentNode !== null && e.parentNode !== void 0 && e.parentNode.removeChild(e);
|
|
2247
2167
|
}
|
|
2248
|
-
function
|
|
2168
|
+
function nr(e) {
|
|
2249
2169
|
const { x: t, y: n, direction: r, editor: i } = e;
|
|
2250
2170
|
let o = null, s = null, c = null, l = t;
|
|
2251
2171
|
for (; s === null && l < window.innerWidth && l > 0; ) {
|
|
@@ -2265,16 +2185,16 @@ function or(e) {
|
|
|
2265
2185
|
pos: c !== null ? c : null
|
|
2266
2186
|
};
|
|
2267
2187
|
}
|
|
2268
|
-
function
|
|
2269
|
-
const { doc: n } = t.view.state, r =
|
|
2188
|
+
function ic(e, t) {
|
|
2189
|
+
const { doc: n } = t.view.state, r = nr({ editor: t, x: e.clientX, y: e.clientY, direction: "right" });
|
|
2270
2190
|
if (!r.resultNode || r.pos === null) return [];
|
|
2271
2191
|
const i = e.clientX, o = function(f, u, h) {
|
|
2272
|
-
const m = Number.parseInt(
|
|
2192
|
+
const m = Number.parseInt(ve(f.dom, "paddingLeft"), 10), g = Number.parseInt(ve(f.dom, "paddingRight"), 10), v = Number.parseInt(ve(f.dom, "borderLeftWidth"), 10), x = Number.parseInt(ve(f.dom, "borderLeftWidth"), 10), A = f.dom.getBoundingClientRect();
|
|
2273
2193
|
return {
|
|
2274
|
-
left:
|
|
2194
|
+
left: rc(
|
|
2275
2195
|
u,
|
|
2276
|
-
A.left + m +
|
|
2277
|
-
A.right - g -
|
|
2196
|
+
A.left + m + v,
|
|
2197
|
+
A.right - g - x
|
|
2278
2198
|
),
|
|
2279
2199
|
top: h
|
|
2280
2200
|
};
|
|
@@ -2283,13 +2203,13 @@ function cc(e, t) {
|
|
|
2283
2203
|
const { pos: c } = s;
|
|
2284
2204
|
if (!n.resolve(c).parent) return [];
|
|
2285
2205
|
const l = n.resolve(r.pos), d = n.resolve(r.pos + 1);
|
|
2286
|
-
return
|
|
2206
|
+
return st(l, d, 0);
|
|
2287
2207
|
}
|
|
2288
|
-
function
|
|
2208
|
+
function rn(e, t) {
|
|
2289
2209
|
const n = e.resolve(t), { depth: r } = n;
|
|
2290
2210
|
return r === 0 ? t : n.pos - n.parentOffset - 1;
|
|
2291
2211
|
}
|
|
2292
|
-
function
|
|
2212
|
+
function on(e, t) {
|
|
2293
2213
|
const n = e.nodeAt(t), r = e.resolve(t);
|
|
2294
2214
|
let { depth: i } = r, o = n;
|
|
2295
2215
|
for (; i > 0; ) {
|
|
@@ -2298,14 +2218,14 @@ function sn(e, t) {
|
|
|
2298
2218
|
}
|
|
2299
2219
|
return o;
|
|
2300
2220
|
}
|
|
2301
|
-
function
|
|
2221
|
+
function an(e, t) {
|
|
2302
2222
|
let n = t;
|
|
2303
2223
|
for (; n && n.parentNode && n.parentNode !== e.dom; ) n = n.parentNode;
|
|
2304
2224
|
return n;
|
|
2305
2225
|
}
|
|
2306
|
-
const
|
|
2307
|
-
function
|
|
2308
|
-
pluginKey: e =
|
|
2226
|
+
const rr = new gn("dragHandle");
|
|
2227
|
+
function oc({
|
|
2228
|
+
pluginKey: e = rr,
|
|
2309
2229
|
element: t,
|
|
2310
2230
|
editor: n,
|
|
2311
2231
|
tippyOptions: r,
|
|
@@ -2316,19 +2236,19 @@ function dc({
|
|
|
2316
2236
|
return t.addEventListener("dragstart", (f) => {
|
|
2317
2237
|
const { view: u } = n;
|
|
2318
2238
|
if (!f.dataTransfer) return;
|
|
2319
|
-
const { empty: h, $from: m, $to: g } = u.state.selection,
|
|
2239
|
+
const { empty: h, $from: m, $to: g } = u.state.selection, v = ic(f, n), x = st(m, g, 0), A = x.some((B) => v.find((k) => k.$from === B.$from && k.$to === B.$to)), _ = h || !A ? v : x;
|
|
2320
2240
|
if (_.length === 0) return;
|
|
2321
|
-
const { tr: E } = u.state,
|
|
2322
|
-
_.forEach((
|
|
2323
|
-
const
|
|
2324
|
-
|
|
2325
|
-
}),
|
|
2241
|
+
const { tr: E } = u.state, b = document.createElement("div"), y = _[0].$from.pos, T = _[_.length - 1].$to.pos, w = H.create(u.state.doc, y, T), P = w.content();
|
|
2242
|
+
_.forEach((B) => {
|
|
2243
|
+
const k = nc(u.nodeDOM(B.$from.pos));
|
|
2244
|
+
b.append(k);
|
|
2245
|
+
}), b.style.position = "absolute", b.style.top = "-10000px", document.body.append(b), f.dataTransfer.clearData(), f.dataTransfer.setDragImage(b, 0, 0), u.dragging = { slice: P, move: !0 }, E.setSelection(w), u.dispatch(E), document.addEventListener("drop", () => nn(b), { once: !0 }), setTimeout(() => {
|
|
2326
2246
|
t && (t.style.pointerEvents = "none");
|
|
2327
2247
|
}, 0);
|
|
2328
2248
|
}), t.addEventListener("dragend", () => {
|
|
2329
2249
|
t && (t.style.pointerEvents = "auto");
|
|
2330
|
-
}), new
|
|
2331
|
-
key: typeof e == "string" ? new
|
|
2250
|
+
}), new $r({
|
|
2251
|
+
key: typeof e == "string" ? new gn(e) : e,
|
|
2332
2252
|
state: {
|
|
2333
2253
|
init: () => ({ locked: !1 }),
|
|
2334
2254
|
apply(f, u) {
|
|
@@ -2343,15 +2263,15 @@ function dc({
|
|
|
2343
2263
|
}
|
|
2344
2264
|
},
|
|
2345
2265
|
view: (f) => {
|
|
2346
|
-
return u(), h(n.view.dom), s =
|
|
2266
|
+
return u(), h(n.view.dom), s = di(f.dom, {
|
|
2347
2267
|
...m(),
|
|
2348
2268
|
...r
|
|
2349
2269
|
}), {
|
|
2350
|
-
update(
|
|
2351
|
-
if (!g(t, s) || (t.draggable = !c, !
|
|
2270
|
+
update(b, y) {
|
|
2271
|
+
if (!g(t, s) || (t.draggable = !c, !v(b, y)))
|
|
2352
2272
|
return;
|
|
2353
|
-
const T = b
|
|
2354
|
-
T && A(
|
|
2273
|
+
const T = x(b);
|
|
2274
|
+
T && A(b, T);
|
|
2355
2275
|
},
|
|
2356
2276
|
destroy() {
|
|
2357
2277
|
E();
|
|
@@ -2360,9 +2280,9 @@ function dc({
|
|
|
2360
2280
|
function u() {
|
|
2361
2281
|
t.draggable = !0, t.style.pointerEvents = "auto";
|
|
2362
2282
|
}
|
|
2363
|
-
function h(
|
|
2364
|
-
var
|
|
2365
|
-
(
|
|
2283
|
+
function h(b) {
|
|
2284
|
+
var y;
|
|
2285
|
+
(y = b.parentElement) == null || y.appendChild(o), o.appendChild(t), Object.assign(o.style, {
|
|
2366
2286
|
pointerEvents: "none",
|
|
2367
2287
|
position: "absolute",
|
|
2368
2288
|
top: "0",
|
|
@@ -2394,34 +2314,34 @@ function dc({
|
|
|
2394
2314
|
}
|
|
2395
2315
|
};
|
|
2396
2316
|
}
|
|
2397
|
-
function g(
|
|
2398
|
-
return
|
|
2317
|
+
function g(b, y) {
|
|
2318
|
+
return b && y;
|
|
2399
2319
|
}
|
|
2400
|
-
function
|
|
2401
|
-
return !
|
|
2320
|
+
function v(b, y) {
|
|
2321
|
+
return !b.state.doc.eq(y.doc) && d !== -1;
|
|
2402
2322
|
}
|
|
2403
|
-
function b
|
|
2404
|
-
let
|
|
2405
|
-
return
|
|
2323
|
+
function x(b) {
|
|
2324
|
+
let y = b.nodeDOM(d);
|
|
2325
|
+
return y = an(b, y), y === b.dom || (y == null ? void 0 : y.nodeType) !== 1 ? null : y;
|
|
2406
2326
|
}
|
|
2407
|
-
function A(
|
|
2408
|
-
const T =
|
|
2409
|
-
if (
|
|
2327
|
+
function A(b, y) {
|
|
2328
|
+
const T = b.posAtDOM(y, 0), w = on(n.state.doc, T);
|
|
2329
|
+
if (w === l)
|
|
2410
2330
|
return;
|
|
2411
|
-
const P =
|
|
2412
|
-
l =
|
|
2331
|
+
const P = rn(n.state.doc, T);
|
|
2332
|
+
l = w, d = P, i == null || i({
|
|
2413
2333
|
editor: n,
|
|
2414
2334
|
node: l,
|
|
2415
2335
|
pos: d
|
|
2416
|
-
}), _(
|
|
2336
|
+
}), _(y);
|
|
2417
2337
|
}
|
|
2418
|
-
function _(
|
|
2338
|
+
function _(b) {
|
|
2419
2339
|
s.setProps({
|
|
2420
|
-
getReferenceClientRect: () =>
|
|
2340
|
+
getReferenceClientRect: () => b.getBoundingClientRect()
|
|
2421
2341
|
}), s.show();
|
|
2422
2342
|
}
|
|
2423
2343
|
function E() {
|
|
2424
|
-
s == null || s.destroy(), t &&
|
|
2344
|
+
s == null || s.destroy(), t && nn(o);
|
|
2425
2345
|
}
|
|
2426
2346
|
},
|
|
2427
2347
|
props: {
|
|
@@ -2429,8 +2349,8 @@ function dc({
|
|
|
2429
2349
|
mouseleave: (f, u) => {
|
|
2430
2350
|
if (c || !h(u)) return !1;
|
|
2431
2351
|
return m(), g(), !1;
|
|
2432
|
-
function h(
|
|
2433
|
-
return
|
|
2352
|
+
function h(v) {
|
|
2353
|
+
return v.target && !o.contains(v.relatedTarget);
|
|
2434
2354
|
}
|
|
2435
2355
|
function m() {
|
|
2436
2356
|
s == null || s.hide();
|
|
@@ -2443,10 +2363,10 @@ function dc({
|
|
|
2443
2363
|
});
|
|
2444
2364
|
}
|
|
2445
2365
|
},
|
|
2446
|
-
mousemove:
|
|
2366
|
+
mousemove: Or((f, u) => {
|
|
2447
2367
|
if (!t || !s || c)
|
|
2448
2368
|
return !1;
|
|
2449
|
-
const h =
|
|
2369
|
+
const h = nr({
|
|
2450
2370
|
x: u.clientX,
|
|
2451
2371
|
y: u.clientY,
|
|
2452
2372
|
direction: "right",
|
|
@@ -2454,14 +2374,14 @@ function dc({
|
|
|
2454
2374
|
});
|
|
2455
2375
|
if (!h.resultElement || h.resultElement === f.dom)
|
|
2456
2376
|
return !1;
|
|
2457
|
-
const m =
|
|
2377
|
+
const m = an(f, h.resultElement);
|
|
2458
2378
|
if (m === f.dom || (m == null ? void 0 : m.nodeType) !== 1)
|
|
2459
2379
|
return !1;
|
|
2460
|
-
const g = f.posAtDOM(m, 0),
|
|
2461
|
-
if (
|
|
2380
|
+
const g = f.posAtDOM(m, 0), v = on(n.state.doc, g);
|
|
2381
|
+
if (v === l)
|
|
2462
2382
|
return !1;
|
|
2463
|
-
const
|
|
2464
|
-
return l =
|
|
2383
|
+
const x = rn(n.state.doc, g);
|
|
2384
|
+
return l = v, d = x, i == null || i({
|
|
2465
2385
|
editor: n,
|
|
2466
2386
|
node: l,
|
|
2467
2387
|
pos: d
|
|
@@ -2473,11 +2393,11 @@ function dc({
|
|
|
2473
2393
|
}
|
|
2474
2394
|
});
|
|
2475
2395
|
}
|
|
2476
|
-
function
|
|
2477
|
-
var P,
|
|
2478
|
-
const { pluginKey: t =
|
|
2396
|
+
function ac(e) {
|
|
2397
|
+
var P, B, k;
|
|
2398
|
+
const { pluginKey: t = rr } = e, { t: n } = D(), [r, i] = I(null), [o, s] = I(-1), c = ne(null), l = ne(null), [d, f] = I(!1), u = e.editor.extensionManager.extensions.some((S) => S.name === "textAlign"), h = e.editor.extensionManager.extensions.some((S) => S.name === "indent"), m = e.editor.extensionManager.extensions.some((S) => S.name === "clear");
|
|
2479
2399
|
R(() => {
|
|
2480
|
-
c.current && !e.editor.isDestroyed && (l.current =
|
|
2400
|
+
c.current && !e.editor.isDestroyed && (l.current = oc({
|
|
2481
2401
|
editor: e.editor,
|
|
2482
2402
|
element: c.current,
|
|
2483
2403
|
pluginKey: "ContentItemMenu",
|
|
@@ -2486,46 +2406,46 @@ function uc(e) {
|
|
|
2486
2406
|
zIndex: 99,
|
|
2487
2407
|
moveTransition: "transform 0.15s ease-out"
|
|
2488
2408
|
},
|
|
2489
|
-
onNodeChange:
|
|
2409
|
+
onNodeChange: y
|
|
2490
2410
|
}), e.editor.registerPlugin(l.current));
|
|
2491
2411
|
}, [e.editor, c]);
|
|
2492
2412
|
function g() {
|
|
2493
2413
|
const S = e.editor.chain();
|
|
2494
2414
|
S.setNodeSelection(o).unsetAllMarks(), (r == null ? void 0 : r.type.name) !== "paragraph" && S.setParagraph(), S.run();
|
|
2495
2415
|
}
|
|
2496
|
-
function
|
|
2416
|
+
function v() {
|
|
2497
2417
|
e.editor.chain().focus().setNodeSelection(o).run(), document.execCommand("copy");
|
|
2498
2418
|
}
|
|
2499
|
-
function
|
|
2419
|
+
function x() {
|
|
2500
2420
|
e.editor.commands.setNodeSelection(o);
|
|
2501
|
-
const { $anchor: S } = e.editor.state.selection,
|
|
2502
|
-
e.editor.chain().setMeta("hideDragHandle", !0).insertContentAt(o + ((r == null ? void 0 : r.nodeSize) || 0),
|
|
2421
|
+
const { $anchor: S } = e.editor.state.selection, Ne = S.node(1) || e.editor.state.selection.node;
|
|
2422
|
+
e.editor.chain().setMeta("hideDragHandle", !0).insertContentAt(o + ((r == null ? void 0 : r.nodeSize) || 0), Ne.toJSON()).run();
|
|
2503
2423
|
}
|
|
2504
2424
|
function A(S) {
|
|
2505
2425
|
e.editor.commands.setTextAlign(S);
|
|
2506
2426
|
}
|
|
2507
2427
|
function _() {
|
|
2508
|
-
const S =
|
|
2428
|
+
const S = St(e.editor.state.tr, o, 1);
|
|
2509
2429
|
S.setMeta("hideDragHandle", !0), e.editor.view.dispatch && e.editor.view.dispatch(S);
|
|
2510
2430
|
}
|
|
2511
2431
|
function E() {
|
|
2512
|
-
const S =
|
|
2432
|
+
const S = St(e.editor.state.tr, o, -1);
|
|
2513
2433
|
e.editor.view.dispatch && e.editor.view.dispatch(S);
|
|
2514
2434
|
}
|
|
2515
|
-
function
|
|
2435
|
+
function b() {
|
|
2516
2436
|
e.editor.chain().setMeta("hideDragHandle", !0).setNodeSelection(o).deleteSelection().run();
|
|
2517
2437
|
}
|
|
2518
|
-
function
|
|
2438
|
+
function y(S) {
|
|
2519
2439
|
S.node && i(S.node), s(S.pos);
|
|
2520
2440
|
}
|
|
2521
2441
|
function T() {
|
|
2522
2442
|
var S;
|
|
2523
2443
|
if (o !== -1) {
|
|
2524
|
-
const
|
|
2525
|
-
e.editor.chain().command(({ dispatch:
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
),
|
|
2444
|
+
const Ne = (r == null ? void 0 : r.nodeSize) || 0, ht = o + Ne, mt = (r == null ? void 0 : r.type.name) === "paragraph" && ((S = r == null ? void 0 : r.content) == null ? void 0 : S.size) === 0, cr = mt ? o + 2 : ht + 2;
|
|
2445
|
+
e.editor.chain().command(({ dispatch: gt, tr: Ee, state: pt }) => gt ? (mt ? Ee.insertText("/", o, o + 1) : Ee.insert(
|
|
2446
|
+
ht,
|
|
2447
|
+
pt.schema.nodes.paragraph.create(null, [pt.schema.text("/")])
|
|
2448
|
+
), gt(Ee)) : !0).focus(cr).run();
|
|
2529
2449
|
}
|
|
2530
2450
|
}
|
|
2531
2451
|
R(() => (d ? e.editor.commands.setMeta("lockDragHandle", !0) : e.editor.commands.setMeta("lockDragHandle", !1), () => {
|
|
@@ -2536,7 +2456,7 @@ function uc(e) {
|
|
|
2536
2456
|
var S;
|
|
2537
2457
|
(S = e.editor) != null && S.isDestroyed && l.current && (e.editor.unregisterPlugin(t), l.current = null);
|
|
2538
2458
|
}, [(P = e.editor) == null ? void 0 : P.isDestroyed]);
|
|
2539
|
-
const
|
|
2459
|
+
const w = (S) => {
|
|
2540
2460
|
e != null && e.disabled || f(S);
|
|
2541
2461
|
};
|
|
2542
2462
|
return /* @__PURE__ */ a(
|
|
@@ -2567,15 +2487,15 @@ function uc(e) {
|
|
|
2567
2487
|
}
|
|
2568
2488
|
),
|
|
2569
2489
|
/* @__PURE__ */ p(
|
|
2570
|
-
|
|
2490
|
+
Rr,
|
|
2571
2491
|
{
|
|
2572
|
-
onOpenChange:
|
|
2492
|
+
onOpenChange: w,
|
|
2573
2493
|
open: d,
|
|
2574
2494
|
children: [
|
|
2575
2495
|
/* @__PURE__ */ p("div", { className: "relative flex flex-col", children: [
|
|
2576
|
-
/* @__PURE__ */ p(
|
|
2496
|
+
/* @__PURE__ */ p(Ir, { children: [
|
|
2577
2497
|
/* @__PURE__ */ a(
|
|
2578
|
-
|
|
2498
|
+
Dr,
|
|
2579
2499
|
{
|
|
2580
2500
|
asChild: !0,
|
|
2581
2501
|
disabled: e == null ? void 0 : e.disabled,
|
|
@@ -2601,12 +2521,12 @@ function uc(e) {
|
|
|
2601
2521
|
)
|
|
2602
2522
|
}
|
|
2603
2523
|
),
|
|
2604
|
-
/* @__PURE__ */ a(
|
|
2524
|
+
/* @__PURE__ */ a(Mr, { children: n("editor.draghandle.tooltip") })
|
|
2605
2525
|
] }),
|
|
2606
|
-
/* @__PURE__ */ a(
|
|
2526
|
+
/* @__PURE__ */ a(Br, { className: "absolute left-0 top-0 z-0 size-[28px]" })
|
|
2607
2527
|
] }),
|
|
2608
2528
|
/* @__PURE__ */ p(
|
|
2609
|
-
|
|
2529
|
+
kr,
|
|
2610
2530
|
{
|
|
2611
2531
|
align: "start",
|
|
2612
2532
|
className: "w-48",
|
|
@@ -2614,10 +2534,10 @@ function uc(e) {
|
|
|
2614
2534
|
sideOffset: 0,
|
|
2615
2535
|
children: [
|
|
2616
2536
|
/* @__PURE__ */ p(
|
|
2617
|
-
|
|
2537
|
+
W,
|
|
2618
2538
|
{
|
|
2619
2539
|
className: "flex gap-3 bg-opacity-10 hover:bg-red-400 hover:bg-opacity-20 focus:bg-red-400 focus:bg-opacity-30 focus:text-red-500 dark:hover:bg-opacity-20 dark:hover:text-red-500",
|
|
2620
|
-
onClick:
|
|
2540
|
+
onClick: b,
|
|
2621
2541
|
children: [
|
|
2622
2542
|
/* @__PURE__ */ a(z, { name: "Trash2" }),
|
|
2623
2543
|
/* @__PURE__ */ a("span", { children: n("editor.remove") })
|
|
@@ -2625,7 +2545,7 @@ function uc(e) {
|
|
|
2625
2545
|
}
|
|
2626
2546
|
),
|
|
2627
2547
|
m ? /* @__PURE__ */ p(
|
|
2628
|
-
|
|
2548
|
+
W,
|
|
2629
2549
|
{
|
|
2630
2550
|
className: "flex gap-3",
|
|
2631
2551
|
onClick: g,
|
|
@@ -2636,10 +2556,10 @@ function uc(e) {
|
|
|
2636
2556
|
}
|
|
2637
2557
|
) : null,
|
|
2638
2558
|
/* @__PURE__ */ p(
|
|
2639
|
-
|
|
2559
|
+
W,
|
|
2640
2560
|
{
|
|
2641
2561
|
className: "flex gap-3",
|
|
2642
|
-
onClick:
|
|
2562
|
+
onClick: v,
|
|
2643
2563
|
children: [
|
|
2644
2564
|
/* @__PURE__ */ a(z, { name: "Clipboard" }),
|
|
2645
2565
|
/* @__PURE__ */ a("span", { children: n("editor.copyToClipboard") })
|
|
@@ -2647,25 +2567,25 @@ function uc(e) {
|
|
|
2647
2567
|
}
|
|
2648
2568
|
),
|
|
2649
2569
|
/* @__PURE__ */ p(
|
|
2650
|
-
|
|
2570
|
+
W,
|
|
2651
2571
|
{
|
|
2652
2572
|
className: "flex gap-3",
|
|
2653
|
-
onClick:
|
|
2573
|
+
onClick: x,
|
|
2654
2574
|
children: [
|
|
2655
2575
|
/* @__PURE__ */ a(z, { name: "Copy" }),
|
|
2656
2576
|
/* @__PURE__ */ a("span", { children: n("editor.copy") })
|
|
2657
2577
|
]
|
|
2658
2578
|
}
|
|
2659
2579
|
),
|
|
2660
|
-
u || h ? /* @__PURE__ */ a(
|
|
2661
|
-
u ? /* @__PURE__ */ p(
|
|
2662
|
-
/* @__PURE__ */ p(
|
|
2580
|
+
u || h ? /* @__PURE__ */ a(Lr, {}) : null,
|
|
2581
|
+
u ? /* @__PURE__ */ p(xt, { children: [
|
|
2582
|
+
/* @__PURE__ */ p(bt, { className: "flex gap-3", children: [
|
|
2663
2583
|
/* @__PURE__ */ a(z, { name: "AlignCenter" }),
|
|
2664
2584
|
/* @__PURE__ */ a("span", { children: n("editor.textalign.tooltip") })
|
|
2665
2585
|
] }),
|
|
2666
|
-
/* @__PURE__ */ a(
|
|
2586
|
+
/* @__PURE__ */ a(Ct, { children: /* @__PURE__ */ p(Tt, { children: [
|
|
2667
2587
|
/* @__PURE__ */ p(
|
|
2668
|
-
|
|
2588
|
+
W,
|
|
2669
2589
|
{
|
|
2670
2590
|
className: "flex gap-3",
|
|
2671
2591
|
onClick: () => A("left"),
|
|
@@ -2676,7 +2596,7 @@ function uc(e) {
|
|
|
2676
2596
|
}
|
|
2677
2597
|
),
|
|
2678
2598
|
/* @__PURE__ */ p(
|
|
2679
|
-
|
|
2599
|
+
W,
|
|
2680
2600
|
{
|
|
2681
2601
|
className: "flex gap-3",
|
|
2682
2602
|
onClick: () => A("center"),
|
|
@@ -2687,7 +2607,7 @@ function uc(e) {
|
|
|
2687
2607
|
}
|
|
2688
2608
|
),
|
|
2689
2609
|
/* @__PURE__ */ p(
|
|
2690
|
-
|
|
2610
|
+
W,
|
|
2691
2611
|
{
|
|
2692
2612
|
className: "flex gap-3",
|
|
2693
2613
|
onClick: () => A("right"),
|
|
@@ -2699,17 +2619,17 @@ function uc(e) {
|
|
|
2699
2619
|
)
|
|
2700
2620
|
] }) })
|
|
2701
2621
|
] }) : null,
|
|
2702
|
-
h ? /* @__PURE__ */ p(
|
|
2703
|
-
/* @__PURE__ */ p(
|
|
2622
|
+
h ? /* @__PURE__ */ p(xt, { children: [
|
|
2623
|
+
/* @__PURE__ */ p(bt, { className: "flex gap-3", children: [
|
|
2704
2624
|
/* @__PURE__ */ a(z, { name: "IndentIncrease" }),
|
|
2705
2625
|
/* @__PURE__ */ a("span", { children: n("editor.indent") })
|
|
2706
2626
|
] }),
|
|
2707
|
-
/* @__PURE__ */ a(
|
|
2627
|
+
/* @__PURE__ */ a(Ct, { children: /* @__PURE__ */ p(Tt, { children: [
|
|
2708
2628
|
/* @__PURE__ */ p(
|
|
2709
|
-
|
|
2629
|
+
W,
|
|
2710
2630
|
{
|
|
2711
2631
|
className: "flex gap-3",
|
|
2712
|
-
disabled: ((
|
|
2632
|
+
disabled: ((B = r == null ? void 0 : r.attrs) == null ? void 0 : B.indent) >= At.max,
|
|
2713
2633
|
onClick: _,
|
|
2714
2634
|
children: [
|
|
2715
2635
|
/* @__PURE__ */ a(z, { name: "IndentIncrease" }),
|
|
@@ -2718,10 +2638,10 @@ function uc(e) {
|
|
|
2718
2638
|
}
|
|
2719
2639
|
),
|
|
2720
2640
|
/* @__PURE__ */ p(
|
|
2721
|
-
|
|
2641
|
+
W,
|
|
2722
2642
|
{
|
|
2723
2643
|
className: "flex gap-3",
|
|
2724
|
-
disabled: ((
|
|
2644
|
+
disabled: ((k = r == null ? void 0 : r.attrs) == null ? void 0 : k.indent) <= At.min,
|
|
2725
2645
|
onClick: E,
|
|
2726
2646
|
children: [
|
|
2727
2647
|
/* @__PURE__ */ a(z, { name: "IndentDecrease" }),
|
|
@@ -2741,12 +2661,12 @@ function uc(e) {
|
|
|
2741
2661
|
}
|
|
2742
2662
|
);
|
|
2743
2663
|
}
|
|
2744
|
-
const
|
|
2664
|
+
const sc = {
|
|
2745
2665
|
maxWidth: "auto",
|
|
2746
2666
|
zIndex: 20,
|
|
2747
2667
|
moveTransition: "transform 0.1s ease-out"
|
|
2748
2668
|
};
|
|
2749
|
-
function
|
|
2669
|
+
function ir({ item: e, disabled: t, editor: n }) {
|
|
2750
2670
|
var i;
|
|
2751
2671
|
const r = e.component;
|
|
2752
2672
|
return r ? /* @__PURE__ */ a(
|
|
@@ -2758,17 +2678,17 @@ function sr({ item: e, disabled: t, editor: n }) {
|
|
|
2758
2678
|
}
|
|
2759
2679
|
) : /* @__PURE__ */ a(N, {});
|
|
2760
2680
|
}
|
|
2761
|
-
function
|
|
2762
|
-
const { t, lang: n } =
|
|
2681
|
+
function lc(e) {
|
|
2682
|
+
const { t, lang: n } = D(), r = ({ editor: o }) => {
|
|
2763
2683
|
const { selection: s } = o.view.state, { $from: c, to: l } = s;
|
|
2764
|
-
return c.pos === l ? !1 : s instanceof
|
|
2765
|
-
}, i = F(() => e.disabled || !(e != null && e.editor) ? [] :
|
|
2684
|
+
return c.pos === l ? !1 : s instanceof pn;
|
|
2685
|
+
}, i = F(() => e.disabled || !(e != null && e.editor) ? [] : tr(e.editor, t, e.items), [e.disabled, e.editor, e.items, n, t]);
|
|
2766
2686
|
return /* @__PURE__ */ a(
|
|
2767
|
-
|
|
2687
|
+
L,
|
|
2768
2688
|
{
|
|
2769
2689
|
editor: e == null ? void 0 : e.editor,
|
|
2770
2690
|
shouldShow: r,
|
|
2771
|
-
tippyOptions:
|
|
2691
|
+
tippyOptions: sc,
|
|
2772
2692
|
children: i != null && i.length ? /* @__PURE__ */ a("div", { className: "pointer-events-auto w-auto select-none rounded-sm !border border-neutral-200 bg-background px-3 py-2 shadow-sm transition-all dark:border-neutral-800", children: /* @__PURE__ */ a("div", { className: "relative flex h-[26px] flex-nowrap items-center justify-start gap-[4px] whitespace-nowrap", children: i == null ? void 0 : i.map((o, s) => (o == null ? void 0 : o.type) === "divider" ? /* @__PURE__ */ a(
|
|
2773
2693
|
U,
|
|
2774
2694
|
{
|
|
@@ -2777,7 +2697,7 @@ function hc(e) {
|
|
|
2777
2697
|
},
|
|
2778
2698
|
`bubbleMenu-divider-${s}`
|
|
2779
2699
|
) : /* @__PURE__ */ a(
|
|
2780
|
-
|
|
2700
|
+
ir,
|
|
2781
2701
|
{
|
|
2782
2702
|
disabled: e.disabled,
|
|
2783
2703
|
editor: e.editor,
|
|
@@ -2788,7 +2708,7 @@ function hc(e) {
|
|
|
2788
2708
|
}
|
|
2789
2709
|
);
|
|
2790
2710
|
}
|
|
2791
|
-
function
|
|
2711
|
+
function ct({ children: e, vertical: t }) {
|
|
2792
2712
|
return /* @__PURE__ */ a("div", { className: "pointer-events-auto w-auto select-none rounded-sm !border border-neutral-200 bg-background px-3 py-2 shadow-sm transition-all dark:border-neutral-800", children: /* @__PURE__ */ a(
|
|
2793
2713
|
"div",
|
|
2794
2714
|
{
|
|
@@ -2797,10 +2717,10 @@ function ut({ children: e, vertical: t }) {
|
|
|
2797
2717
|
}
|
|
2798
2718
|
) });
|
|
2799
2719
|
}
|
|
2800
|
-
function
|
|
2720
|
+
function cc({ editor: e, disabled: t }) {
|
|
2801
2721
|
var c, l, d, f, u, h;
|
|
2802
|
-
const { t: n } =
|
|
2803
|
-
({ view: m, state: g, from:
|
|
2722
|
+
const { t: n } = D(), r = O(
|
|
2723
|
+
({ view: m, state: g, from: v }) => !g || !v ? !1 : vn({ editor: e, view: m, state: g, from: v }),
|
|
2804
2724
|
[e]
|
|
2805
2725
|
);
|
|
2806
2726
|
function i() {
|
|
@@ -2813,7 +2733,7 @@ function mc({ editor: e, disabled: t }) {
|
|
|
2813
2733
|
e.chain().focus().deleteRow().run();
|
|
2814
2734
|
}
|
|
2815
2735
|
return t ? null : /* @__PURE__ */ a(
|
|
2816
|
-
|
|
2736
|
+
L,
|
|
2817
2737
|
{
|
|
2818
2738
|
editor: e,
|
|
2819
2739
|
pluginKey: "tableRowMenu",
|
|
@@ -2826,9 +2746,9 @@ function mc({ editor: e, disabled: t }) {
|
|
|
2826
2746
|
modifiers: [{ name: "flip", enabled: !1 }]
|
|
2827
2747
|
}
|
|
2828
2748
|
},
|
|
2829
|
-
children: /* @__PURE__ */ p(
|
|
2749
|
+
children: /* @__PURE__ */ p(ct, { vertical: !0, children: [
|
|
2830
2750
|
/* @__PURE__ */ a(
|
|
2831
|
-
|
|
2751
|
+
C,
|
|
2832
2752
|
{
|
|
2833
2753
|
action: i,
|
|
2834
2754
|
disabled: !((l = e == null ? void 0 : (c = e.can()).addRowBefore) != null && l.call(c)),
|
|
@@ -2840,7 +2760,7 @@ function mc({ editor: e, disabled: t }) {
|
|
|
2840
2760
|
}
|
|
2841
2761
|
),
|
|
2842
2762
|
/* @__PURE__ */ a(
|
|
2843
|
-
|
|
2763
|
+
C,
|
|
2844
2764
|
{
|
|
2845
2765
|
action: o,
|
|
2846
2766
|
disabled: !((f = (d = e == null ? void 0 : e.can()) == null ? void 0 : d.addRowAfter) != null && f.call(d)),
|
|
@@ -2852,7 +2772,7 @@ function mc({ editor: e, disabled: t }) {
|
|
|
2852
2772
|
}
|
|
2853
2773
|
),
|
|
2854
2774
|
/* @__PURE__ */ a(
|
|
2855
|
-
|
|
2775
|
+
C,
|
|
2856
2776
|
{
|
|
2857
2777
|
action: s,
|
|
2858
2778
|
disabled: !((h = (u = e == null ? void 0 : e.can()) == null ? void 0 : u.deleteRow) != null && h.call(u)),
|
|
@@ -2867,10 +2787,10 @@ function mc({ editor: e, disabled: t }) {
|
|
|
2867
2787
|
}
|
|
2868
2788
|
);
|
|
2869
2789
|
}
|
|
2870
|
-
function
|
|
2790
|
+
function dc({ editor: e, disabled: t }) {
|
|
2871
2791
|
var c, l, d, f, u, h;
|
|
2872
|
-
const { t: n } =
|
|
2873
|
-
({ view: m, state: g, from:
|
|
2792
|
+
const { t: n } = D(), r = O(
|
|
2793
|
+
({ view: m, state: g, from: v }) => g ? yn({ editor: e, view: m, state: g, from: v || 0 }) : !1,
|
|
2874
2794
|
[e]
|
|
2875
2795
|
);
|
|
2876
2796
|
function i() {
|
|
@@ -2883,7 +2803,7 @@ function gc({ editor: e, disabled: t }) {
|
|
|
2883
2803
|
e.chain().focus().deleteColumn().run();
|
|
2884
2804
|
}
|
|
2885
2805
|
return t ? null : /* @__PURE__ */ a(
|
|
2886
|
-
|
|
2806
|
+
L,
|
|
2887
2807
|
{
|
|
2888
2808
|
editor: e,
|
|
2889
2809
|
pluginKey: "tableColumnMenu",
|
|
@@ -2895,9 +2815,9 @@ function gc({ editor: e, disabled: t }) {
|
|
|
2895
2815
|
modifiers: [{ name: "flip", enabled: !1 }]
|
|
2896
2816
|
}
|
|
2897
2817
|
},
|
|
2898
|
-
children: /* @__PURE__ */ p(
|
|
2818
|
+
children: /* @__PURE__ */ p(ct, { children: [
|
|
2899
2819
|
/* @__PURE__ */ a(
|
|
2900
|
-
|
|
2820
|
+
C,
|
|
2901
2821
|
{
|
|
2902
2822
|
action: i,
|
|
2903
2823
|
disabled: !((l = (c = e == null ? void 0 : e.can()) == null ? void 0 : c.addColumnBefore) != null && l.call(c)),
|
|
@@ -2909,7 +2829,7 @@ function gc({ editor: e, disabled: t }) {
|
|
|
2909
2829
|
}
|
|
2910
2830
|
),
|
|
2911
2831
|
/* @__PURE__ */ a(
|
|
2912
|
-
|
|
2832
|
+
C,
|
|
2913
2833
|
{
|
|
2914
2834
|
action: o,
|
|
2915
2835
|
disabled: !((f = (d = e == null ? void 0 : e.can()) == null ? void 0 : d.addColumnAfter) != null && f.call(d)),
|
|
@@ -2921,7 +2841,7 @@ function gc({ editor: e, disabled: t }) {
|
|
|
2921
2841
|
}
|
|
2922
2842
|
),
|
|
2923
2843
|
/* @__PURE__ */ a(
|
|
2924
|
-
|
|
2844
|
+
C,
|
|
2925
2845
|
{
|
|
2926
2846
|
action: s,
|
|
2927
2847
|
disabled: !((h = e == null ? void 0 : (u = e.can()).deleteColumn) != null && h.call(u)),
|
|
@@ -2936,12 +2856,12 @@ function gc({ editor: e, disabled: t }) {
|
|
|
2936
2856
|
}
|
|
2937
2857
|
);
|
|
2938
2858
|
}
|
|
2939
|
-
function
|
|
2940
|
-
var
|
|
2941
|
-
const i = ({ editor:
|
|
2942
|
-
const { selection:
|
|
2943
|
-
return
|
|
2944
|
-
}, o = ({ editor:
|
|
2859
|
+
function uc({ editor: e, disabled: t, actions: n, ...r }) {
|
|
2860
|
+
var v, x, A, _, E, b;
|
|
2861
|
+
const i = ({ editor: y, view: T, state: w, from: P }) => {
|
|
2862
|
+
const { selection: B } = y.view.state, { $from: k, to: S } = B;
|
|
2863
|
+
return k.pos === S || !w || !P ? !1 : B instanceof pn || vn({ editor: y, view: T, state: w, from: P }) || yn({ editor: y, view: T, state: w, from: P });
|
|
2864
|
+
}, o = ({ editor: y }) => Fr(y.view.state, "table"), s = (y) => o(y) && !i(y), { t: c, lang: l } = D();
|
|
2945
2865
|
function d() {
|
|
2946
2866
|
e.chain().focus().mergeCells().run();
|
|
2947
2867
|
}
|
|
@@ -2951,24 +2871,24 @@ function pc({ editor: e, disabled: t, actions: n, ...r }) {
|
|
|
2951
2871
|
function u() {
|
|
2952
2872
|
e.chain().focus().deleteTable().run();
|
|
2953
2873
|
}
|
|
2954
|
-
function h(
|
|
2955
|
-
e.chain().focus().setTableCellBackground(
|
|
2874
|
+
function h(y) {
|
|
2875
|
+
e.chain().focus().setTableCellBackground(y).run();
|
|
2956
2876
|
}
|
|
2957
2877
|
const m = () => {
|
|
2958
|
-
var
|
|
2878
|
+
var k;
|
|
2959
2879
|
const {
|
|
2960
|
-
view:
|
|
2880
|
+
view: y,
|
|
2961
2881
|
state: {
|
|
2962
2882
|
selection: { from: T }
|
|
2963
2883
|
}
|
|
2964
|
-
} = e,
|
|
2965
|
-
if (!
|
|
2884
|
+
} = e, w = y.domAtPos(T).node;
|
|
2885
|
+
if (!w)
|
|
2966
2886
|
return new DOMRect(-1e3, -1e3, 0, 0);
|
|
2967
|
-
const P = (
|
|
2887
|
+
const P = (k = w == null ? void 0 : w.closest) == null ? void 0 : k.call(w, ".tableWrapper");
|
|
2968
2888
|
return P ? P.getBoundingClientRect() : new DOMRect(-1e3, -1e3, 0, 0);
|
|
2969
|
-
}, g = F(() => t || !e ? [] :
|
|
2889
|
+
}, g = F(() => t || !e ? [] : tr(e, c, r.items || []), [t, e, r.items, l, c]);
|
|
2970
2890
|
return t ? null : /* @__PURE__ */ a(
|
|
2971
|
-
|
|
2891
|
+
L,
|
|
2972
2892
|
{
|
|
2973
2893
|
editor: e,
|
|
2974
2894
|
pluginKey: "table",
|
|
@@ -2981,12 +2901,12 @@ function pc({ editor: e, disabled: t, actions: n, ...r }) {
|
|
|
2981
2901
|
},
|
|
2982
2902
|
maxWidth: "auto",
|
|
2983
2903
|
getReferenceClientRect: m,
|
|
2984
|
-
plugins: [
|
|
2904
|
+
plugins: [ui],
|
|
2985
2905
|
sticky: "popper"
|
|
2986
2906
|
},
|
|
2987
|
-
children: /* @__PURE__ */ p(
|
|
2907
|
+
children: /* @__PURE__ */ p(ct, { children: [
|
|
2988
2908
|
n && /* @__PURE__ */ p(N, { children: [
|
|
2989
|
-
n.map((
|
|
2909
|
+
n.map((y, T) => /* @__PURE__ */ a(C, { ...y }, T)),
|
|
2990
2910
|
/* @__PURE__ */ a(
|
|
2991
2911
|
U,
|
|
2992
2912
|
{
|
|
@@ -2996,12 +2916,12 @@ function pc({ editor: e, disabled: t, actions: n, ...r }) {
|
|
|
2996
2916
|
)
|
|
2997
2917
|
] }),
|
|
2998
2918
|
r.items && /* @__PURE__ */ p(N, { children: [
|
|
2999
|
-
g.map((
|
|
3000
|
-
|
|
2919
|
+
g.map((y, T) => /* @__PURE__ */ a(
|
|
2920
|
+
ir,
|
|
3001
2921
|
{
|
|
3002
2922
|
disabled: t,
|
|
3003
2923
|
editor: e,
|
|
3004
|
-
item:
|
|
2924
|
+
item: y
|
|
3005
2925
|
},
|
|
3006
2926
|
T
|
|
3007
2927
|
)),
|
|
@@ -3014,10 +2934,10 @@ function pc({ editor: e, disabled: t, actions: n, ...r }) {
|
|
|
3014
2934
|
)
|
|
3015
2935
|
] }),
|
|
3016
2936
|
/* @__PURE__ */ a(
|
|
3017
|
-
|
|
2937
|
+
C,
|
|
3018
2938
|
{
|
|
3019
2939
|
action: d,
|
|
3020
|
-
disabled: !((
|
|
2940
|
+
disabled: !((x = (v = e == null ? void 0 : e.can()) == null ? void 0 : v.mergeCells) != null && x.call(v)),
|
|
3021
2941
|
icon: "TableCellsMerge",
|
|
3022
2942
|
tooltip: c("editor.table.menu.mergeCells"),
|
|
3023
2943
|
"tooltip-options": {
|
|
@@ -3026,7 +2946,7 @@ function pc({ editor: e, disabled: t, actions: n, ...r }) {
|
|
|
3026
2946
|
}
|
|
3027
2947
|
),
|
|
3028
2948
|
/* @__PURE__ */ a(
|
|
3029
|
-
|
|
2949
|
+
C,
|
|
3030
2950
|
{
|
|
3031
2951
|
action: f,
|
|
3032
2952
|
disabled: !((_ = (A = e == null ? void 0 : e.can()) == null ? void 0 : A.splitCell) != null && _.call(A)),
|
|
@@ -3039,7 +2959,7 @@ function pc({ editor: e, disabled: t, actions: n, ...r }) {
|
|
|
3039
2959
|
),
|
|
3040
2960
|
/* @__PURE__ */ a(U, { className: "!mx-1 !my-2 !h-[16px]", orientation: "vertical" }),
|
|
3041
2961
|
/* @__PURE__ */ a(
|
|
3042
|
-
|
|
2962
|
+
zr,
|
|
3043
2963
|
{
|
|
3044
2964
|
action: h,
|
|
3045
2965
|
editor: e,
|
|
@@ -3050,10 +2970,10 @@ function pc({ editor: e, disabled: t, actions: n, ...r }) {
|
|
|
3050
2970
|
}
|
|
3051
2971
|
),
|
|
3052
2972
|
/* @__PURE__ */ a(
|
|
3053
|
-
|
|
2973
|
+
C,
|
|
3054
2974
|
{
|
|
3055
2975
|
action: u,
|
|
3056
|
-
disabled: !((
|
|
2976
|
+
disabled: !((b = (E = e == null ? void 0 : e.can()) == null ? void 0 : E.deleteTable) != null && b.call(E)),
|
|
3057
2977
|
icon: "Trash2",
|
|
3058
2978
|
tooltip: c("editor.table.menu.deleteTable"),
|
|
3059
2979
|
"tooltip-options": {
|
|
@@ -3065,15 +2985,15 @@ function pc({ editor: e, disabled: t, actions: n, ...r }) {
|
|
|
3065
2985
|
}
|
|
3066
2986
|
);
|
|
3067
2987
|
}
|
|
3068
|
-
function
|
|
2988
|
+
function fc(e) {
|
|
3069
2989
|
return /* @__PURE__ */ p(N, { children: [
|
|
3070
|
-
/* @__PURE__ */ a(
|
|
3071
|
-
/* @__PURE__ */ a(
|
|
3072
|
-
/* @__PURE__ */ a(
|
|
2990
|
+
/* @__PURE__ */ a(uc, { ...e }),
|
|
2991
|
+
/* @__PURE__ */ a(cc, { ...e }),
|
|
2992
|
+
/* @__PURE__ */ a(dc, { ...e })
|
|
3073
2993
|
] });
|
|
3074
2994
|
}
|
|
3075
|
-
function
|
|
3076
|
-
const { t } =
|
|
2995
|
+
function hc(e) {
|
|
2996
|
+
const { t } = D();
|
|
3077
2997
|
return /* @__PURE__ */ p("div", { className: "flex items-center gap-2 p-2 bg-white !border rounded-lg shadow-sm dark:bg-black border-neutral-200 dark:border-neutral-800", children: [
|
|
3078
2998
|
/* @__PURE__ */ a(
|
|
3079
2999
|
"a",
|
|
@@ -3082,7 +3002,7 @@ function wc(e) {
|
|
|
3082
3002
|
target: "_blank",
|
|
3083
3003
|
rel: "noopener noreferrer",
|
|
3084
3004
|
className: "text-sm underline break-all",
|
|
3085
|
-
children:
|
|
3005
|
+
children: Tl(e == null ? void 0 : e.link, {
|
|
3086
3006
|
length: 50,
|
|
3087
3007
|
omission: "…"
|
|
3088
3008
|
})
|
|
@@ -3091,7 +3011,7 @@ function wc(e) {
|
|
|
3091
3011
|
(e == null ? void 0 : e.link) && /* @__PURE__ */ a(U, { orientation: "vertical", className: "!h-4" }),
|
|
3092
3012
|
/* @__PURE__ */ p("div", { className: "flex flex-nowrap", children: [
|
|
3093
3013
|
/* @__PURE__ */ a(
|
|
3094
|
-
|
|
3014
|
+
C,
|
|
3095
3015
|
{
|
|
3096
3016
|
icon: "Pencil",
|
|
3097
3017
|
tooltip: t("editor.link.edit.tooltip"),
|
|
@@ -3102,7 +3022,7 @@ function wc(e) {
|
|
|
3102
3022
|
}
|
|
3103
3023
|
),
|
|
3104
3024
|
/* @__PURE__ */ a(
|
|
3105
|
-
|
|
3025
|
+
C,
|
|
3106
3026
|
{
|
|
3107
3027
|
icon: "Unlink",
|
|
3108
3028
|
tooltip: t("editor.link.unlink.tooltip"),
|
|
@@ -3115,11 +3035,11 @@ function wc(e) {
|
|
|
3115
3035
|
] })
|
|
3116
3036
|
] });
|
|
3117
3037
|
}
|
|
3118
|
-
function
|
|
3119
|
-
const [n, r] =
|
|
3038
|
+
function mc({ editor: e, disabled: t }) {
|
|
3039
|
+
const [n, r] = I(!1), i = F(() => {
|
|
3120
3040
|
const { href: l } = e.getAttributes("link");
|
|
3121
3041
|
return l;
|
|
3122
|
-
}, [e]), o =
|
|
3042
|
+
}, [e]), o = O(({ editor: l }) => l.isActive("link"), []), s = (l, d, f) => {
|
|
3123
3043
|
e.chain().extendMarkRange("link").insertContent({
|
|
3124
3044
|
type: "text",
|
|
3125
3045
|
text: d,
|
|
@@ -3133,11 +3053,11 @@ function yc({ editor: e, disabled: t }) {
|
|
|
3133
3053
|
}
|
|
3134
3054
|
]
|
|
3135
3055
|
}).setLink({ href: l }).focus().run(), r(!1);
|
|
3136
|
-
}, c =
|
|
3056
|
+
}, c = O(() => {
|
|
3137
3057
|
e.chain().extendMarkRange("link").unsetLink().focus().run(), r(!1);
|
|
3138
3058
|
}, [e]);
|
|
3139
3059
|
return /* @__PURE__ */ a(N, { children: /* @__PURE__ */ a(
|
|
3140
|
-
|
|
3060
|
+
L,
|
|
3141
3061
|
{
|
|
3142
3062
|
editor: e,
|
|
3143
3063
|
shouldShow: o,
|
|
@@ -3152,8 +3072,8 @@ function yc({ editor: e, disabled: t }) {
|
|
|
3152
3072
|
r(!1);
|
|
3153
3073
|
}
|
|
3154
3074
|
},
|
|
3155
|
-
children: t ? /* @__PURE__ */ a(N, {}) : /* @__PURE__ */ a(N, { children: n ? /* @__PURE__ */ a(
|
|
3156
|
-
|
|
3075
|
+
children: t ? /* @__PURE__ */ a(N, {}) : /* @__PURE__ */ a(N, { children: n ? /* @__PURE__ */ a(jr, { onSetLink: s, editor: e }) : /* @__PURE__ */ a(
|
|
3076
|
+
hc,
|
|
3157
3077
|
{
|
|
3158
3078
|
editor: e,
|
|
3159
3079
|
onClear: c,
|
|
@@ -3166,16 +3086,16 @@ function yc({ editor: e, disabled: t }) {
|
|
|
3166
3086
|
}
|
|
3167
3087
|
) });
|
|
3168
3088
|
}
|
|
3169
|
-
const
|
|
3089
|
+
const dt = {
|
|
3170
3090
|
maxWidth: "auto",
|
|
3171
3091
|
zIndex: 20,
|
|
3172
3092
|
appendTo: "parent",
|
|
3173
3093
|
moveTransition: "transform 0.1s ease-out"
|
|
3174
3094
|
};
|
|
3175
|
-
function
|
|
3095
|
+
function ut({ item: e, disabled: t, editor: n }) {
|
|
3176
3096
|
var i;
|
|
3177
3097
|
const r = e.component;
|
|
3178
|
-
return r ? /* @__PURE__ */ a(
|
|
3098
|
+
return r ? /* @__PURE__ */ a(Ve, { children: e.type === "divider" ? /* @__PURE__ */ a(
|
|
3179
3099
|
U,
|
|
3180
3100
|
{
|
|
3181
3101
|
className: "!mx-1 !my-2 !h-[16px]",
|
|
@@ -3190,32 +3110,32 @@ function ht({ item: e, disabled: t, editor: n }) {
|
|
|
3190
3110
|
}
|
|
3191
3111
|
) }) : /* @__PURE__ */ a(N, {});
|
|
3192
3112
|
}
|
|
3193
|
-
function
|
|
3194
|
-
return e.type.name ===
|
|
3113
|
+
function gc(e) {
|
|
3114
|
+
return e.type.name === hn.name;
|
|
3195
3115
|
}
|
|
3196
|
-
function
|
|
3197
|
-
return e.type.name ===
|
|
3116
|
+
function pc(e) {
|
|
3117
|
+
return e.type.name === mn.name;
|
|
3198
3118
|
}
|
|
3199
|
-
function
|
|
3200
|
-
return e.type.name ===
|
|
3119
|
+
function vc(e) {
|
|
3120
|
+
return e.type.name === Hr.name;
|
|
3201
3121
|
}
|
|
3202
|
-
function
|
|
3203
|
-
const { lang: t } =
|
|
3122
|
+
function yc(e) {
|
|
3123
|
+
const { lang: t } = D(), n = ({ editor: i }) => {
|
|
3204
3124
|
const { selection: o } = i.view.state, { $from: s, to: c } = o;
|
|
3205
3125
|
let l = !1;
|
|
3206
3126
|
return i.view.state.doc.nodesBetween(s.pos, c, (d) => {
|
|
3207
|
-
if (
|
|
3127
|
+
if (gc(d))
|
|
3208
3128
|
return l = !0, !1;
|
|
3209
3129
|
}), l;
|
|
3210
|
-
}, r = F(() => e.disabled ? [] :
|
|
3130
|
+
}, r = F(() => e.disabled ? [] : Jl(e.editor), [e.disabled, e.editor, t]);
|
|
3211
3131
|
return /* @__PURE__ */ a(N, { children: /* @__PURE__ */ a(
|
|
3212
|
-
|
|
3132
|
+
L,
|
|
3213
3133
|
{
|
|
3214
3134
|
editor: e == null ? void 0 : e.editor,
|
|
3215
3135
|
shouldShow: n,
|
|
3216
|
-
tippyOptions:
|
|
3136
|
+
tippyOptions: dt,
|
|
3217
3137
|
children: r != null && r.length ? /* @__PURE__ */ a("div", { className: "pointer-events-auto w-auto select-none rounded-sm !border border-neutral-200 bg-background px-3 py-2 shadow-sm transition-all dark:border-neutral-800", children: /* @__PURE__ */ a("div", { className: "relative flex h-[26px] flex-nowrap items-center justify-start whitespace-nowrap", children: r == null ? void 0 : r.map((i, o) => /* @__PURE__ */ a(
|
|
3218
|
-
|
|
3138
|
+
ut,
|
|
3219
3139
|
{
|
|
3220
3140
|
disabled: e.disabled,
|
|
3221
3141
|
editor: e.editor,
|
|
@@ -3226,23 +3146,23 @@ function Tc(e) {
|
|
|
3226
3146
|
}
|
|
3227
3147
|
) });
|
|
3228
3148
|
}
|
|
3229
|
-
function
|
|
3230
|
-
const { lang: t } =
|
|
3149
|
+
function wc(e) {
|
|
3150
|
+
const { lang: t } = D(), n = ({ editor: i }) => {
|
|
3231
3151
|
const { selection: o } = i.view.state, { $from: s, to: c } = o;
|
|
3232
3152
|
let l = !1;
|
|
3233
3153
|
return i.view.state.doc.nodesBetween(s.pos, c, (d) => {
|
|
3234
|
-
if (
|
|
3154
|
+
if (pc(d))
|
|
3235
3155
|
return l = !0, !1;
|
|
3236
3156
|
}), l;
|
|
3237
|
-
}, r = F(() => e.disabled ? [] :
|
|
3157
|
+
}, r = F(() => e.disabled ? [] : Zl(e.editor), [e.disabled, e.editor, t]);
|
|
3238
3158
|
return /* @__PURE__ */ a(N, { children: /* @__PURE__ */ a(
|
|
3239
|
-
|
|
3159
|
+
L,
|
|
3240
3160
|
{
|
|
3241
3161
|
editor: e == null ? void 0 : e.editor,
|
|
3242
3162
|
shouldShow: n,
|
|
3243
|
-
tippyOptions:
|
|
3163
|
+
tippyOptions: dt,
|
|
3244
3164
|
children: r != null && r.length ? /* @__PURE__ */ a("div", { className: "pointer-events-auto w-auto select-none rounded-sm !border border-neutral-200 bg-background px-3 py-2 shadow-sm transition-all dark:border-neutral-800", children: /* @__PURE__ */ a("div", { className: "relative flex h-[26px] flex-nowrap items-center justify-start whitespace-nowrap", children: r == null ? void 0 : r.map((i, o) => /* @__PURE__ */ a(
|
|
3245
|
-
|
|
3165
|
+
ut,
|
|
3246
3166
|
{
|
|
3247
3167
|
disabled: e.disabled,
|
|
3248
3168
|
editor: e.editor,
|
|
@@ -3253,23 +3173,23 @@ function Ac(e) {
|
|
|
3253
3173
|
}
|
|
3254
3174
|
) });
|
|
3255
3175
|
}
|
|
3256
|
-
function
|
|
3257
|
-
const { lang: t } =
|
|
3176
|
+
function xc(e) {
|
|
3177
|
+
const { lang: t } = D(), n = ({ editor: i }) => {
|
|
3258
3178
|
const { selection: o } = i.view.state, { $from: s, to: c } = o;
|
|
3259
3179
|
let l = !1;
|
|
3260
3180
|
return i.view.state.doc.nodesBetween(s.pos, c, (d) => {
|
|
3261
|
-
if (
|
|
3181
|
+
if (vc(d))
|
|
3262
3182
|
return l = !0, !1;
|
|
3263
3183
|
}), l;
|
|
3264
|
-
}, r = F(() => e.disabled ? [] :
|
|
3184
|
+
}, r = F(() => e.disabled ? [] : tc(e.editor), [e.editor, e.disabled, t]);
|
|
3265
3185
|
return /* @__PURE__ */ a(N, { children: /* @__PURE__ */ a(
|
|
3266
|
-
|
|
3186
|
+
L,
|
|
3267
3187
|
{
|
|
3268
3188
|
editor: e == null ? void 0 : e.editor,
|
|
3269
3189
|
shouldShow: n,
|
|
3270
|
-
tippyOptions:
|
|
3190
|
+
tippyOptions: dt,
|
|
3271
3191
|
children: r != null && r.length ? /* @__PURE__ */ a("div", { className: "pointer-events-auto w-auto select-none rounded-sm !border border-neutral-200 bg-background px-3 py-2 shadow-sm transition-all dark:border-neutral-800", children: /* @__PURE__ */ a("div", { className: "relative flex h-[26px] flex-nowrap items-center justify-start whitespace-nowrap", children: r == null ? void 0 : r.map((i, o) => /* @__PURE__ */ a(
|
|
3272
|
-
|
|
3192
|
+
ut,
|
|
3273
3193
|
{
|
|
3274
3194
|
disabled: e.disabled,
|
|
3275
3195
|
editor: e.editor,
|
|
@@ -3280,10 +3200,10 @@ function Sc(e) {
|
|
|
3280
3200
|
}
|
|
3281
3201
|
) });
|
|
3282
3202
|
}
|
|
3283
|
-
function
|
|
3284
|
-
const { t } =
|
|
3203
|
+
function bc({ editor: e }) {
|
|
3204
|
+
const { t } = D(), n = O(() => e.isActive(Pt.name), [e]), r = O(() => Ae(Pt.name, e), [e]), i = O(() => e.chain().focus().addColBefore().run(), [e]), o = O(() => e.chain().focus().addColAfter().run(), [e]), s = O(() => e.chain().focus().deleteCol().run(), [e]);
|
|
3285
3205
|
return /* @__PURE__ */ a(
|
|
3286
|
-
|
|
3206
|
+
L,
|
|
3287
3207
|
{
|
|
3288
3208
|
pluginKey: "columns-bubble-menu",
|
|
3289
3209
|
editor: e,
|
|
@@ -3301,7 +3221,7 @@ function Pc({ editor: e }) {
|
|
|
3301
3221
|
},
|
|
3302
3222
|
children: /* @__PURE__ */ p("div", { className: "w-auto px-3 py-2 transition-all !border rounded-sm shadow-sm pointer-events-auto select-none border-neutral-200 dark:border-neutral-800 bg-background", children: [
|
|
3303
3223
|
/* @__PURE__ */ a(
|
|
3304
|
-
|
|
3224
|
+
C,
|
|
3305
3225
|
{
|
|
3306
3226
|
action: i,
|
|
3307
3227
|
icon: "ColumnAddLeft",
|
|
@@ -3309,7 +3229,7 @@ function Pc({ editor: e }) {
|
|
|
3309
3229
|
}
|
|
3310
3230
|
),
|
|
3311
3231
|
/* @__PURE__ */ a(
|
|
3312
|
-
|
|
3232
|
+
C,
|
|
3313
3233
|
{
|
|
3314
3234
|
action: o,
|
|
3315
3235
|
icon: "ColumnAddRight",
|
|
@@ -3317,7 +3237,7 @@ function Pc({ editor: e }) {
|
|
|
3317
3237
|
}
|
|
3318
3238
|
),
|
|
3319
3239
|
/* @__PURE__ */ a(
|
|
3320
|
-
|
|
3240
|
+
C,
|
|
3321
3241
|
{
|
|
3322
3242
|
action: s,
|
|
3323
3243
|
icon: "DeleteColumn",
|
|
@@ -3325,7 +3245,7 @@ function Pc({ editor: e }) {
|
|
|
3325
3245
|
}
|
|
3326
3246
|
),
|
|
3327
3247
|
/* @__PURE__ */ a(
|
|
3328
|
-
|
|
3248
|
+
C,
|
|
3329
3249
|
{
|
|
3330
3250
|
action: r,
|
|
3331
3251
|
icon: "Trash2",
|
|
@@ -3336,8 +3256,8 @@ function Pc({ editor: e }) {
|
|
|
3336
3256
|
}
|
|
3337
3257
|
);
|
|
3338
3258
|
}
|
|
3339
|
-
function
|
|
3340
|
-
const { t: n } =
|
|
3259
|
+
function Cc({ editor: e, extensions: t }) {
|
|
3260
|
+
const { t: n } = D(), r = F(() => {
|
|
3341
3261
|
var i, o, s;
|
|
3342
3262
|
return (s = (o = (i = t == null ? void 0 : t.find((c) => c.name === "base-kit")) == null ? void 0 : i.options) == null ? void 0 : o.characterCount) == null ? void 0 : s.limit;
|
|
3343
3263
|
}, [t]);
|
|
@@ -3353,28 +3273,28 @@ function _c({ editor: e, extensions: t }) {
|
|
|
3353
3273
|
n("editor.characters")
|
|
3354
3274
|
] }) }) }) });
|
|
3355
3275
|
}
|
|
3356
|
-
function
|
|
3357
|
-
const { toasts: e } =
|
|
3358
|
-
return /* @__PURE__ */ p(
|
|
3276
|
+
function Tc() {
|
|
3277
|
+
const { toasts: e } = Ur();
|
|
3278
|
+
return /* @__PURE__ */ p(Al, { children: [
|
|
3359
3279
|
e.map(({ id: t, title: n, description: r, action: i, ...o }) => /* @__PURE__ */ p(
|
|
3360
|
-
|
|
3280
|
+
Yn,
|
|
3361
3281
|
{
|
|
3362
3282
|
...o,
|
|
3363
3283
|
children: [
|
|
3364
3284
|
/* @__PURE__ */ p("div", { className: "grid gap-1", children: [
|
|
3365
|
-
n && /* @__PURE__ */ a(
|
|
3366
|
-
r && /* @__PURE__ */ a(
|
|
3285
|
+
n && /* @__PURE__ */ a(Zn, { children: n }),
|
|
3286
|
+
r && /* @__PURE__ */ a(Qn, { children: r })
|
|
3367
3287
|
] }),
|
|
3368
3288
|
i,
|
|
3369
|
-
/* @__PURE__ */ a(
|
|
3289
|
+
/* @__PURE__ */ a(Jn, {})
|
|
3370
3290
|
]
|
|
3371
3291
|
},
|
|
3372
3292
|
t
|
|
3373
3293
|
)),
|
|
3374
|
-
/* @__PURE__ */ a(
|
|
3294
|
+
/* @__PURE__ */ a(qn, {})
|
|
3375
3295
|
] });
|
|
3376
3296
|
}
|
|
3377
|
-
const
|
|
3297
|
+
const Ac = `
|
|
3378
3298
|
.reactjs-tiptap-editor,
|
|
3379
3299
|
.dialog-content {
|
|
3380
3300
|
button,
|
|
@@ -3512,8 +3432,8 @@ div[data-tippy-root] {
|
|
|
3512
3432
|
color: inherit;
|
|
3513
3433
|
}
|
|
3514
3434
|
}
|
|
3515
|
-
`,
|
|
3516
|
-
const [, n] =
|
|
3435
|
+
`, Sc = fr(({ children: e, id: t }) => {
|
|
3436
|
+
const [, n] = Vr((s) => s.value), [, r] = Kr((s) => s.value), i = (s) => {
|
|
3517
3437
|
n({
|
|
3518
3438
|
value: s.detail
|
|
3519
3439
|
});
|
|
@@ -3523,17 +3443,17 @@ div[data-tippy-root] {
|
|
|
3523
3443
|
});
|
|
3524
3444
|
};
|
|
3525
3445
|
return R(() => {
|
|
3526
|
-
const s =
|
|
3446
|
+
const s = _t(Nt.EDIT(t), i), c = _t(Nt.UPDATE_THEME(t), o);
|
|
3527
3447
|
return () => {
|
|
3528
3448
|
s(), c();
|
|
3529
3449
|
};
|
|
3530
3450
|
}, []), /* @__PURE__ */ a(N, { children: e });
|
|
3531
3451
|
});
|
|
3532
|
-
function
|
|
3533
|
-
return /* @__PURE__ */ a(
|
|
3452
|
+
function Pc({ children: e, id: t }) {
|
|
3453
|
+
return /* @__PURE__ */ a(Gr, { children: /* @__PURE__ */ a(Wr, { children: /* @__PURE__ */ a(Sc, { id: t, children: e }) }) });
|
|
3534
3454
|
}
|
|
3535
|
-
const
|
|
3536
|
-
function
|
|
3455
|
+
const sn = "data-rc-order", ln = "data-rc-priority", _c = "rc-util-key", We = /* @__PURE__ */ new Map();
|
|
3456
|
+
function Nc(e, t) {
|
|
3537
3457
|
if (!e)
|
|
3538
3458
|
return !1;
|
|
3539
3459
|
if (e.contains)
|
|
@@ -3546,30 +3466,30 @@ function Ic(e, t) {
|
|
|
3546
3466
|
}
|
|
3547
3467
|
return !1;
|
|
3548
3468
|
}
|
|
3549
|
-
function
|
|
3550
|
-
return e ? e.startsWith("data-") ? e : `data-${e}` :
|
|
3469
|
+
function or({ mark: e } = {}) {
|
|
3470
|
+
return e ? e.startsWith("data-") ? e : `data-${e}` : _c;
|
|
3551
3471
|
}
|
|
3552
|
-
function
|
|
3472
|
+
function ft(e) {
|
|
3553
3473
|
return e.attachTo ? e.attachTo : document.querySelector("head") || document.body;
|
|
3554
3474
|
}
|
|
3555
|
-
function
|
|
3475
|
+
function Ec(e) {
|
|
3556
3476
|
return e === "queue" ? "prependQueue" : e ? "prepend" : "append";
|
|
3557
3477
|
}
|
|
3558
|
-
function
|
|
3559
|
-
return [...(
|
|
3478
|
+
function ar(e) {
|
|
3479
|
+
return [...(We.get(e) || e).children].filter(
|
|
3560
3480
|
(t) => t.tagName === "STYLE"
|
|
3561
3481
|
);
|
|
3562
3482
|
}
|
|
3563
|
-
function
|
|
3564
|
-
const { csp: n, prepend: r, priority: i = 0 } = t, o =
|
|
3565
|
-
c.setAttribute(
|
|
3566
|
-
const l =
|
|
3483
|
+
function sr(e, t = {}) {
|
|
3484
|
+
const { csp: n, prepend: r, priority: i = 0 } = t, o = Ec(r), s = o === "prependQueue", c = document.createElement("style");
|
|
3485
|
+
c.setAttribute(sn, o), s && i && c.setAttribute(ln, `${i}`), n != null && n.nonce && (c.nonce = n == null ? void 0 : n.nonce), c.innerHTML = e;
|
|
3486
|
+
const l = ft(t), { firstChild: d } = l;
|
|
3567
3487
|
if (r) {
|
|
3568
3488
|
if (s) {
|
|
3569
|
-
const f =
|
|
3570
|
-
if (!["prepend", "prependQueue"].includes(u.getAttribute(
|
|
3489
|
+
const f = ar(l).filter((u) => {
|
|
3490
|
+
if (!["prepend", "prependQueue"].includes(u.getAttribute(sn)))
|
|
3571
3491
|
return !1;
|
|
3572
|
-
const h = Number(u.getAttribute(
|
|
3492
|
+
const h = Number(u.getAttribute(ln) || 0);
|
|
3573
3493
|
return i >= h;
|
|
3574
3494
|
});
|
|
3575
3495
|
if (f.length > 0)
|
|
@@ -3580,43 +3500,43 @@ function dr(e, t = {}) {
|
|
|
3580
3500
|
l.append(c);
|
|
3581
3501
|
return c;
|
|
3582
3502
|
}
|
|
3583
|
-
function
|
|
3584
|
-
const n =
|
|
3585
|
-
return
|
|
3503
|
+
function lr(e, t = {}) {
|
|
3504
|
+
const n = ft(t);
|
|
3505
|
+
return ar(n).find((r) => r.getAttribute(or(t)) === e);
|
|
3586
3506
|
}
|
|
3587
|
-
function
|
|
3588
|
-
const n =
|
|
3507
|
+
function $c(e, t = {}) {
|
|
3508
|
+
const n = lr(e, t);
|
|
3589
3509
|
n && n.remove();
|
|
3590
3510
|
}
|
|
3591
|
-
function
|
|
3592
|
-
const n =
|
|
3593
|
-
if (!n || !
|
|
3594
|
-
const r =
|
|
3595
|
-
|
|
3511
|
+
function Oc(e, t) {
|
|
3512
|
+
const n = We.get(e);
|
|
3513
|
+
if (!n || !Nc(document, n)) {
|
|
3514
|
+
const r = sr("", t), { parentNode: i } = r;
|
|
3515
|
+
We.set(e, i), r.remove();
|
|
3596
3516
|
}
|
|
3597
3517
|
}
|
|
3598
|
-
function
|
|
3518
|
+
function Rc(e, t, n = {}) {
|
|
3599
3519
|
var s, c, l;
|
|
3600
|
-
const r =
|
|
3601
|
-
|
|
3602
|
-
const i =
|
|
3520
|
+
const r = ft(n);
|
|
3521
|
+
Oc(r, n);
|
|
3522
|
+
const i = lr(t, n);
|
|
3603
3523
|
if (i)
|
|
3604
3524
|
return (s = n.csp) != null && s.nonce && i.nonce !== ((c = n.csp) == null ? void 0 : c.nonce) && (i.nonce = (l = n.csp) == null ? void 0 : l.nonce), i.innerHTML !== e && (i.innerHTML = e), i;
|
|
3605
|
-
const o =
|
|
3606
|
-
return o.setAttribute(
|
|
3525
|
+
const o = sr(e, n);
|
|
3526
|
+
return o.setAttribute(or(n), t), o;
|
|
3607
3527
|
}
|
|
3608
|
-
function
|
|
3609
|
-
const { content: n, extensions: r, useEditorOptions: i = {} } = e, o =
|
|
3610
|
-
const u =
|
|
3528
|
+
function Ic(e, t) {
|
|
3529
|
+
const { content: n, extensions: r, useEditorOptions: i = {} } = e, o = mr(), s = F(() => {
|
|
3530
|
+
const u = nl(r, r, "name");
|
|
3611
3531
|
return [...r.map((m) => {
|
|
3612
|
-
const g = r.find((
|
|
3532
|
+
const g = r.find((v) => v.name === m.name);
|
|
3613
3533
|
return g ? m.configure(g.options) : m;
|
|
3614
3534
|
}), ...u].map((m, g) => m.configure({ sort: g }));
|
|
3615
|
-
}, [r]), c =
|
|
3535
|
+
}, [r]), c = Xr((u) => {
|
|
3616
3536
|
var m;
|
|
3617
3537
|
const h = d(u, e.output);
|
|
3618
3538
|
(m = e == null ? void 0 : e.onChangeContent) == null || m.call(e, h);
|
|
3619
|
-
},
|
|
3539
|
+
}, ni), l = qr({
|
|
3620
3540
|
extensions: s,
|
|
3621
3541
|
content: n,
|
|
3622
3542
|
onUpdate: ({ editor: u }) => {
|
|
@@ -3624,38 +3544,38 @@ function Lc(e, t) {
|
|
|
3624
3544
|
},
|
|
3625
3545
|
...i
|
|
3626
3546
|
});
|
|
3627
|
-
|
|
3547
|
+
gr(t, () => ({
|
|
3628
3548
|
editor: l
|
|
3629
3549
|
})), R(() => {
|
|
3630
|
-
document.documentElement.classList.toggle("dark", e.dark),
|
|
3550
|
+
document.documentElement.classList.toggle("dark", e.dark), Yr.setTheme(o, e.dark ? "dark" : "light");
|
|
3631
3551
|
}, [e.dark]), R(() => {
|
|
3632
|
-
l == null || l.setEditable(!(e != null && e.disabled)),
|
|
3633
|
-
}, [l, e == null ? void 0 : e.disabled]), R(() => ((e == null ? void 0 : e.resetCSS) !== !1 &&
|
|
3634
|
-
|
|
3552
|
+
l == null || l.setEditable(!(e != null && e.disabled)), Jr.setDisable(o, !(e != null && e.disabled));
|
|
3553
|
+
}, [l, e == null ? void 0 : e.disabled]), R(() => ((e == null ? void 0 : e.resetCSS) !== !1 && Rc(Ac, "react-tiptap-reset"), () => {
|
|
3554
|
+
$c("react-tiptap-reset");
|
|
3635
3555
|
}), [e == null ? void 0 : e.resetCSS]);
|
|
3636
3556
|
function d(u, h) {
|
|
3637
3557
|
return e != null && e.removeDefaultWrapper ? h === "html" ? u.isEmpty ? "" : u.getHTML() : h === "json" ? u.isEmpty ? {} : u.getJSON() : h === "text" ? u.isEmpty ? "" : u.getText() : "" : h === "html" ? u.getHTML() : h === "json" ? u.getJSON() : h === "text" ? u.getText() : "";
|
|
3638
3558
|
}
|
|
3639
|
-
|
|
3559
|
+
pr(() => {
|
|
3640
3560
|
l && (l.id = o);
|
|
3641
3561
|
}, [o, l]), R(() => () => {
|
|
3642
3562
|
var u;
|
|
3643
3563
|
(u = l == null ? void 0 : l.destroy) == null || u.call(l);
|
|
3644
3564
|
}, []);
|
|
3645
|
-
const f =
|
|
3565
|
+
const f = Zr(l, "characterCount");
|
|
3646
3566
|
return l ? /* @__PURE__ */ p("div", { className: "reactjs-tiptap-editor", children: [
|
|
3647
3567
|
/* @__PURE__ */ a(
|
|
3648
|
-
|
|
3568
|
+
Pc,
|
|
3649
3569
|
{
|
|
3650
3570
|
id: o,
|
|
3651
3571
|
children: /* @__PURE__ */ a(
|
|
3652
|
-
|
|
3572
|
+
Qr,
|
|
3653
3573
|
{
|
|
3654
3574
|
delayDuration: 0,
|
|
3655
3575
|
disableHoverableContent: !0,
|
|
3656
3576
|
children: /* @__PURE__ */ a("div", { className: "overflow-hidden rounded-[0.5rem] bg-background", children: /* @__PURE__ */ p("div", { className: "flex max-h-full w-full flex-col", children: [
|
|
3657
3577
|
!(e != null && e.hideToolbar) && /* @__PURE__ */ a(
|
|
3658
|
-
|
|
3578
|
+
Ul,
|
|
3659
3579
|
{
|
|
3660
3580
|
disabled: !!(e != null && e.disabled),
|
|
3661
3581
|
editor: l,
|
|
@@ -3663,21 +3583,21 @@ function Lc(e, t) {
|
|
|
3663
3583
|
}
|
|
3664
3584
|
),
|
|
3665
3585
|
/* @__PURE__ */ a(
|
|
3666
|
-
|
|
3586
|
+
ei,
|
|
3667
3587
|
{
|
|
3668
3588
|
className: `relative ${(e == null ? void 0 : e.contentClass) || ""}`,
|
|
3669
3589
|
editor: l
|
|
3670
3590
|
}
|
|
3671
3591
|
),
|
|
3672
3592
|
f && /* @__PURE__ */ a(
|
|
3673
|
-
|
|
3593
|
+
Cc,
|
|
3674
3594
|
{
|
|
3675
3595
|
editor: l,
|
|
3676
3596
|
extensions: r
|
|
3677
3597
|
}
|
|
3678
3598
|
),
|
|
3679
3599
|
!(e != null && e.hideBubble) && /* @__PURE__ */ a(
|
|
3680
|
-
|
|
3600
|
+
Hl,
|
|
3681
3601
|
{
|
|
3682
3602
|
bubbleMenu: e == null ? void 0 : e.bubbleMenu,
|
|
3683
3603
|
disabled: e == null ? void 0 : e.disabled,
|
|
@@ -3689,12 +3609,12 @@ function Lc(e, t) {
|
|
|
3689
3609
|
)
|
|
3690
3610
|
}
|
|
3691
3611
|
),
|
|
3692
|
-
/* @__PURE__ */ a(
|
|
3612
|
+
/* @__PURE__ */ a(Tc, {})
|
|
3693
3613
|
] }) : /* @__PURE__ */ a(N, {});
|
|
3694
3614
|
}
|
|
3695
|
-
const
|
|
3615
|
+
const Wc = hr(Ic);
|
|
3696
3616
|
export {
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3617
|
+
L as BubbleMenu,
|
|
3618
|
+
Wc as default,
|
|
3619
|
+
Gc as useEditorState
|
|
3700
3620
|
};
|