easy-email-pro-editor 1.6.1 → 1.6.2
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/index.js +171 -163
- package/lib/typings/typings/custom-types.d.ts +1 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -23,9 +23,9 @@ var M = (e, u, n) => (ki(e, typeof u != "symbol" ? u + "" : u, n), n);
|
|
|
23
23
|
import m, { createContext as il, useEffect as jt, useContext as sl, useRef as cn, useCallback as mu, useState as ln, useMemo as Cu, createElement as ol } from "react";
|
|
24
24
|
import { withHistory as Mc } from "slate-history";
|
|
25
25
|
import { ReactEditor as kt, useSlate as su, withReact as Hc, Slate as eE, useSelected as tE, useSlateStatic as uE, Editable as rE } from "slate-react";
|
|
26
|
-
import { Editor as
|
|
26
|
+
import { Editor as de, Node as Du, Transforms as Ne, Path as rt, Text as zr, Range as Uc } from "slate";
|
|
27
27
|
import { sum as aE, isEqual as qi, cloneDeep as nE, escapeRegExp as cl, some as iE, find as sE, reduce as ll, get as Tu, isEmpty as oE, map as cE, uniqueId as dl, merge as lE, memoize as dE, omitBy as hE, isNil as hl, camelCase as Pu, isString as Qi, identity as fl, min as fE, each as AE, flow as gE, filter as EE, omit as Al, debounce as pE } from "lodash";
|
|
28
|
-
import { BlockManager as Ae, ElementCategory as Mr, ElementType as oe, NodeUtils as
|
|
28
|
+
import { BlockManager as Ae, ElementCategory as Mr, ElementType as oe, NodeUtils as te, StandardType as nr, mergeBlock as dn, EditorCore as sr, t as gl, PluginManager as rs, PageTestingCss as mE, SLATE_NODE_PLACEHOLDER_CLASSNAME as bE, I18nManager as DE } from "easy-email-pro-core";
|
|
29
29
|
import { createPortal as El } from "react-dom";
|
|
30
30
|
let Wi = !1, qc;
|
|
31
31
|
const TE = () => {
|
|
@@ -64,9 +64,17 @@ const TE = () => {
|
|
|
64
64
|
return null;
|
|
65
65
|
}, e.getSelectedBlockElement = () => {
|
|
66
66
|
var x;
|
|
67
|
-
const [D] =
|
|
67
|
+
const [D] = de.nodes(e, {
|
|
68
68
|
at: (x = e.selection) == null ? void 0 : x.anchor.path,
|
|
69
|
-
match:
|
|
69
|
+
match: te.isBlockElement,
|
|
70
|
+
mode: "lowest"
|
|
71
|
+
});
|
|
72
|
+
return D;
|
|
73
|
+
}, e.getSelectedContentElement = () => {
|
|
74
|
+
var x;
|
|
75
|
+
const [D] = de.nodes(e, {
|
|
76
|
+
at: (x = e.selection) == null ? void 0 : x.anchor.path,
|
|
77
|
+
match: te.isContentElement,
|
|
70
78
|
mode: "lowest"
|
|
71
79
|
});
|
|
72
80
|
return D;
|
|
@@ -79,16 +87,16 @@ const TE = () => {
|
|
|
79
87
|
}, e.insertNewLine = (D) => {
|
|
80
88
|
let x = null;
|
|
81
89
|
if (D != null && D.path && (x = Du.get(e, D.path)), !x) {
|
|
82
|
-
const P =
|
|
90
|
+
const P = de.above(e, {
|
|
83
91
|
match(W, H) {
|
|
84
|
-
return
|
|
92
|
+
return te.isElement(W);
|
|
85
93
|
},
|
|
86
94
|
mode: "lowest",
|
|
87
95
|
at: D == null ? void 0 : D.path
|
|
88
96
|
});
|
|
89
97
|
x = P == null ? void 0 : P[0];
|
|
90
98
|
}
|
|
91
|
-
if (x &&
|
|
99
|
+
if (x && te.isContentElement(x) && (Ne.insertNodes(
|
|
92
100
|
e,
|
|
93
101
|
{
|
|
94
102
|
type: nr.STANDARD_PARAGRAPH,
|
|
@@ -98,14 +106,14 @@ const TE = () => {
|
|
|
98
106
|
},
|
|
99
107
|
{ at: D == null ? void 0 : D.path }
|
|
100
108
|
), D != null && D.path)) {
|
|
101
|
-
Ne.select(e,
|
|
102
|
-
const P =
|
|
109
|
+
Ne.select(e, de.end(e, D.path));
|
|
110
|
+
const P = de.end(e, D.path);
|
|
103
111
|
Ne.setSelection(e, { anchor: P, focus: P });
|
|
104
112
|
}
|
|
105
113
|
}, e.insertNewRow = (D) => {
|
|
106
|
-
const x =
|
|
114
|
+
const x = de.above(e, {
|
|
107
115
|
match(H, K) {
|
|
108
|
-
return
|
|
116
|
+
return te.isElement(H);
|
|
109
117
|
},
|
|
110
118
|
mode: "lowest",
|
|
111
119
|
at: D == null ? void 0 : D.path
|
|
@@ -114,9 +122,9 @@ const TE = () => {
|
|
|
114
122
|
return;
|
|
115
123
|
let W = D == null ? void 0 : D.path;
|
|
116
124
|
if (!W) {
|
|
117
|
-
const H =
|
|
125
|
+
const H = de.above(e, {
|
|
118
126
|
match(K) {
|
|
119
|
-
return
|
|
127
|
+
return te.isBlockElement(K) && te.isSectionElement(K);
|
|
120
128
|
}
|
|
121
129
|
});
|
|
122
130
|
H && (W = H[1]);
|
|
@@ -146,20 +154,20 @@ const TE = () => {
|
|
|
146
154
|
]
|
|
147
155
|
}
|
|
148
156
|
});
|
|
149
|
-
const H =
|
|
157
|
+
const H = de.end(e, W);
|
|
150
158
|
setTimeout(() => {
|
|
151
159
|
Ne.select(e, H);
|
|
152
160
|
}, 200);
|
|
153
161
|
}
|
|
154
162
|
}, e.insertBreak = () => {
|
|
155
163
|
if (u.newLineWithBr) {
|
|
156
|
-
const D =
|
|
164
|
+
const D = de.above(e, {
|
|
157
165
|
match(P, W) {
|
|
158
|
-
return
|
|
166
|
+
return te.isElement(P);
|
|
159
167
|
},
|
|
160
168
|
mode: "lowest"
|
|
161
169
|
}), x = D == null ? void 0 : D[0];
|
|
162
|
-
if (x &&
|
|
170
|
+
if (x && te.isTextElement(x)) {
|
|
163
171
|
Ne.insertNodes(e, {
|
|
164
172
|
type: oe.LINE_BREAK,
|
|
165
173
|
children: [{ text: "" }],
|
|
@@ -171,17 +179,17 @@ const TE = () => {
|
|
|
171
179
|
}
|
|
172
180
|
d();
|
|
173
181
|
}, e.splitColumns = (D) => {
|
|
174
|
-
const [x] =
|
|
182
|
+
const [x] = de.nodes(e, {
|
|
175
183
|
at: D.path,
|
|
176
|
-
match:
|
|
184
|
+
match: te.isColumnElement
|
|
177
185
|
}), P = x[0];
|
|
178
|
-
if (!
|
|
186
|
+
if (!te.isElement(P))
|
|
179
187
|
return;
|
|
180
|
-
const H =
|
|
181
|
-
(Ee) =>
|
|
188
|
+
const H = de.parent(e, x[1])[0].children.filter(
|
|
189
|
+
(Ee) => te.isElement(Ee) && Ee.type !== "raw"
|
|
182
190
|
);
|
|
183
191
|
if (H.length >= 2) {
|
|
184
|
-
const Ee =
|
|
192
|
+
const Ee = de.end(
|
|
185
193
|
e,
|
|
186
194
|
kt.findPath(e, H[H.length - 1])
|
|
187
195
|
);
|
|
@@ -191,18 +199,18 @@ const TE = () => {
|
|
|
191
199
|
});
|
|
192
200
|
return;
|
|
193
201
|
}
|
|
194
|
-
const K =
|
|
202
|
+
const K = de.end(e, D.path);
|
|
195
203
|
Ne.setSelection(e, {
|
|
196
204
|
anchor: K,
|
|
197
205
|
focus: K
|
|
198
206
|
}), Ne.splitNodes(e, {
|
|
199
|
-
at:
|
|
200
|
-
match:
|
|
207
|
+
at: de.end(e, D.path),
|
|
208
|
+
match: te.isSectionElement
|
|
201
209
|
});
|
|
202
|
-
const re =
|
|
210
|
+
const re = de.before(e, D.path);
|
|
203
211
|
re && Ne.splitNodes(e, {
|
|
204
|
-
at:
|
|
205
|
-
match:
|
|
212
|
+
at: de.end(e, re),
|
|
213
|
+
match: te.isSectionElement
|
|
206
214
|
});
|
|
207
215
|
const se = `${H.length / 2 * 100}%`;
|
|
208
216
|
Ne.setNodes(
|
|
@@ -211,7 +219,7 @@ const TE = () => {
|
|
|
211
219
|
attributes: ne(_({}, P.attributes), { width: se })
|
|
212
220
|
},
|
|
213
221
|
{
|
|
214
|
-
match:
|
|
222
|
+
match: te.isColumnElement
|
|
215
223
|
}
|
|
216
224
|
), Ne.insertNodes(
|
|
217
225
|
e,
|
|
@@ -228,11 +236,11 @@ const TE = () => {
|
|
|
228
236
|
]
|
|
229
237
|
},
|
|
230
238
|
{
|
|
231
|
-
match:
|
|
239
|
+
match: te.isColumnElement
|
|
232
240
|
}
|
|
233
241
|
);
|
|
234
242
|
}, e.moveNode = (D) => {
|
|
235
|
-
|
|
243
|
+
de.withoutNormalizing(e, () => {
|
|
236
244
|
R({
|
|
237
245
|
type: "move_node",
|
|
238
246
|
path: D.at,
|
|
@@ -240,12 +248,12 @@ const TE = () => {
|
|
|
240
248
|
});
|
|
241
249
|
});
|
|
242
250
|
}, e.insertData = (D) => {
|
|
243
|
-
|
|
244
|
-
const x = D.getData("application/x-slate-fragment"), P =
|
|
245
|
-
match:
|
|
251
|
+
de.withoutNormalizing(e, () => {
|
|
252
|
+
const x = D.getData("application/x-slate-fragment"), P = de.above(e, {
|
|
253
|
+
match: te.isVoidBlockElement
|
|
246
254
|
});
|
|
247
255
|
if (x && !P) {
|
|
248
|
-
const W = decodeURIComponent(window.atob(x)), H = JSON.parse(W), re = [...Du.nodes(H[0])].map((se) => se[0]).filter((se) =>
|
|
256
|
+
const W = decodeURIComponent(window.atob(x)), H = JSON.parse(W), re = [...Du.nodes(H[0])].map((se) => se[0]).filter((se) => te.isTextNode(se));
|
|
249
257
|
e.insertFragment(re);
|
|
250
258
|
} else {
|
|
251
259
|
const W = D.getData("text").split(`
|
|
@@ -263,9 +271,9 @@ const TE = () => {
|
|
|
263
271
|
}
|
|
264
272
|
});
|
|
265
273
|
}, e.insertMergetag = (D) => {
|
|
266
|
-
|
|
267
|
-
const [x] =
|
|
268
|
-
match: (P) =>
|
|
274
|
+
de.withoutNormalizing(e, () => {
|
|
275
|
+
const [x] = de.nodes(e, {
|
|
276
|
+
match: (P) => te.isInlineElement(P) && P.type === oe.MERGETAG,
|
|
269
277
|
mode: "all"
|
|
270
278
|
});
|
|
271
279
|
x || Ne.insertNodes(
|
|
@@ -286,7 +294,7 @@ const TE = () => {
|
|
|
286
294
|
});
|
|
287
295
|
}, e.normalizeNode = (D) => {
|
|
288
296
|
const [x, P] = D;
|
|
289
|
-
if (!
|
|
297
|
+
if (!te.isElement(x)) {
|
|
290
298
|
g(D);
|
|
291
299
|
return;
|
|
292
300
|
}
|
|
@@ -309,7 +317,7 @@ const TE = () => {
|
|
|
309
317
|
{
|
|
310
318
|
at: [0, 0]
|
|
311
319
|
}
|
|
312
|
-
) :
|
|
320
|
+
) : te.isContentElement(x) ? Ne.insertNodes(
|
|
313
321
|
e,
|
|
314
322
|
{ text: "" },
|
|
315
323
|
{
|
|
@@ -341,7 +349,7 @@ const TE = () => {
|
|
|
341
349
|
)
|
|
342
350
|
)) / se.length;
|
|
343
351
|
x.children.forEach((De, ae) => {
|
|
344
|
-
|
|
352
|
+
te.isColumnElement(De) && !De.attributes.width && Ne.setNodes(
|
|
345
353
|
e,
|
|
346
354
|
{
|
|
347
355
|
attributes: {
|
|
@@ -355,17 +363,17 @@ const TE = () => {
|
|
|
355
363
|
});
|
|
356
364
|
}
|
|
357
365
|
}
|
|
358
|
-
if (
|
|
366
|
+
if (te.isElement(x) && x.children.length === 0) {
|
|
359
367
|
Ne.removeNodes(e, { at: P });
|
|
360
368
|
return;
|
|
361
369
|
}
|
|
362
|
-
|
|
363
|
-
|
|
370
|
+
te.isColumnElement(x) && x.children.length > 1 && x.children.forEach((re, se) => {
|
|
371
|
+
te.isPlaceholderElement(re) && Ne.removeNodes(e, {
|
|
364
372
|
at: [...P, se]
|
|
365
373
|
});
|
|
366
374
|
}), g(D);
|
|
367
375
|
}, e.replaceNode = (D) => {
|
|
368
|
-
|
|
376
|
+
de.withoutNormalizing(e, () => {
|
|
369
377
|
const x = D.path, P = Du.get(e, x);
|
|
370
378
|
R({
|
|
371
379
|
type: "insert_node",
|
|
@@ -376,19 +384,19 @@ const TE = () => {
|
|
|
376
384
|
path: x,
|
|
377
385
|
node: P
|
|
378
386
|
});
|
|
379
|
-
const W =
|
|
380
|
-
|
|
387
|
+
const W = de.end(e, x);
|
|
388
|
+
de.above(e, {
|
|
381
389
|
at: W,
|
|
382
|
-
match:
|
|
390
|
+
match: te.isUnsetElement
|
|
383
391
|
}) ? Ne.deselect(e) : Ne.setSelection(e, { anchor: W, focus: W });
|
|
384
392
|
});
|
|
385
393
|
}, e.removeNode = (D) => {
|
|
386
394
|
var W;
|
|
387
|
-
let x = (D == null ? void 0 : D.path) || ((W = e.selection) == null ? void 0 : W.anchor.path), P =
|
|
395
|
+
let x = (D == null ? void 0 : D.path) || ((W = e.selection) == null ? void 0 : W.anchor.path), P = de.above(e, { at: x });
|
|
388
396
|
if (P) {
|
|
389
397
|
for (; P[0].children.length <= 1; ) {
|
|
390
398
|
x = P[1];
|
|
391
|
-
const H =
|
|
399
|
+
const H = de.above(e, { at: x });
|
|
392
400
|
H && (P = H);
|
|
393
401
|
}
|
|
394
402
|
x && R({
|
|
@@ -427,8 +435,8 @@ const TE = () => {
|
|
|
427
435
|
var x, P, W;
|
|
428
436
|
if (!(D.type === "set_node" && qi(D.newProperties, D.properties))) {
|
|
429
437
|
if (D.type === "remove_text") {
|
|
430
|
-
const [H] =
|
|
431
|
-
match: (K) =>
|
|
438
|
+
const [H] = de.nodes(e, {
|
|
439
|
+
match: (K) => te.isElement(K) && K.type === oe.MERGETAG,
|
|
432
440
|
at: D.path
|
|
433
441
|
});
|
|
434
442
|
if (H) {
|
|
@@ -437,30 +445,30 @@ const TE = () => {
|
|
|
437
445
|
}
|
|
438
446
|
}
|
|
439
447
|
if (D.type === "remove_node" || D.type === "merge_node") {
|
|
440
|
-
const H =
|
|
448
|
+
const H = de.above(e, {
|
|
441
449
|
at: D.path,
|
|
442
|
-
match:
|
|
450
|
+
match: te.isBlockElement
|
|
443
451
|
});
|
|
444
|
-
if (H &&
|
|
452
|
+
if (H && te.isVoidBlockElement(H[0]))
|
|
445
453
|
return;
|
|
446
454
|
}
|
|
447
455
|
if (D.type === "set_selection")
|
|
448
456
|
try {
|
|
449
|
-
if (D.newProperties && Uc.isRange(D.newProperties) && Uc.isCollapsed(D.newProperties) && !
|
|
457
|
+
if (D.newProperties && Uc.isRange(D.newProperties) && Uc.isCollapsed(D.newProperties) && !de.isEnd(
|
|
450
458
|
e,
|
|
451
459
|
(x = D.newProperties) == null ? void 0 : x.anchor,
|
|
452
460
|
(W = (P = D.newProperties) == null ? void 0 : P.anchor) == null ? void 0 : W.path
|
|
453
461
|
)) {
|
|
454
|
-
const H =
|
|
455
|
-
match: (K) =>
|
|
462
|
+
const H = de.above(e, {
|
|
463
|
+
match: (K) => te.isBlockElement(K),
|
|
456
464
|
at: D.newProperties.anchor.path,
|
|
457
465
|
mode: "lowest"
|
|
458
466
|
});
|
|
459
467
|
if (H) {
|
|
460
468
|
const K = H[0], re = K.children.findIndex(
|
|
461
|
-
(Ee) =>
|
|
469
|
+
(Ee) => te.isElement(Ee) && Ee.type === oe.MERGETAG
|
|
462
470
|
), se = K.children[K.children.length - 1];
|
|
463
|
-
re === K.children.length - 2 &&
|
|
471
|
+
re === K.children.length - 2 && te.isTextNode(se) && se.text === "" && Ne.insertNodes(
|
|
464
472
|
e,
|
|
465
473
|
{ text: " " },
|
|
466
474
|
{
|
|
@@ -501,15 +509,15 @@ const bl = il({}), NE = ({ children: e }) => {
|
|
|
501
509
|
if (!j)
|
|
502
510
|
Ne.deselect(o);
|
|
503
511
|
else {
|
|
504
|
-
const be = Du.get(o, j), Te =
|
|
505
|
-
if (
|
|
512
|
+
const be = Du.get(o, j), Te = de.end(o, j);
|
|
513
|
+
if (de.above(o, {
|
|
506
514
|
at: Te,
|
|
507
515
|
match(we) {
|
|
508
|
-
return
|
|
516
|
+
return te.isUnsetElement(we);
|
|
509
517
|
}
|
|
510
518
|
}))
|
|
511
519
|
Ne.deselect(o);
|
|
512
|
-
else if (!o.selection &&
|
|
520
|
+
else if (!o.selection && te.isContentElement(be)) {
|
|
513
521
|
const we = { anchor: Te, focus: Te };
|
|
514
522
|
Ne.select(o, we);
|
|
515
523
|
}
|
|
@@ -539,7 +547,7 @@ const bl = il({}), NE = ({ children: e }) => {
|
|
|
539
547
|
} catch (j) {
|
|
540
548
|
}
|
|
541
549
|
jt(() => {
|
|
542
|
-
if (De &&
|
|
550
|
+
if (De && te.isElement(De)) {
|
|
543
551
|
const j = Ae.getBlockByType(De.type);
|
|
544
552
|
[Mr.UNSET].includes(j.category) && R(null);
|
|
545
553
|
}
|
|
@@ -2283,8 +2291,8 @@ var nn = {}, fp = {
|
|
|
2283
2291
|
return C.apply(L, c);
|
|
2284
2292
|
}
|
|
2285
2293
|
function o(C, L, c, G) {
|
|
2286
|
-
for (var
|
|
2287
|
-
var ht = C[
|
|
2294
|
+
for (var ue = -1, Y = C == null ? 0 : C.length; ++ue < Y; ) {
|
|
2295
|
+
var ht = C[ue];
|
|
2288
2296
|
L(G, ht, c(ht), C);
|
|
2289
2297
|
}
|
|
2290
2298
|
return G;
|
|
@@ -2306,9 +2314,9 @@ var nn = {}, fp = {
|
|
|
2306
2314
|
return !0;
|
|
2307
2315
|
}
|
|
2308
2316
|
function R(C, L) {
|
|
2309
|
-
for (var c = -1, G = C == null ? 0 : C.length,
|
|
2317
|
+
for (var c = -1, G = C == null ? 0 : C.length, ue = 0, Y = []; ++c < G; ) {
|
|
2310
2318
|
var ht = C[c];
|
|
2311
|
-
L(ht, c, C) && (Y[
|
|
2319
|
+
L(ht, c, C) && (Y[ue++] = ht);
|
|
2312
2320
|
}
|
|
2313
2321
|
return Y;
|
|
2314
2322
|
}
|
|
@@ -2316,31 +2324,31 @@ var nn = {}, fp = {
|
|
|
2316
2324
|
return !!(C != null && C.length) && Ie(C, L, 0) > -1;
|
|
2317
2325
|
}
|
|
2318
2326
|
function Q(C, L, c) {
|
|
2319
|
-
for (var G = -1,
|
|
2327
|
+
for (var G = -1, ue = C == null ? 0 : C.length; ++G < ue; )
|
|
2320
2328
|
if (c(L, C[G]))
|
|
2321
2329
|
return !0;
|
|
2322
2330
|
return !1;
|
|
2323
2331
|
}
|
|
2324
2332
|
function D(C, L) {
|
|
2325
|
-
for (var c = -1, G = C == null ? 0 : C.length,
|
|
2326
|
-
|
|
2327
|
-
return
|
|
2333
|
+
for (var c = -1, G = C == null ? 0 : C.length, ue = Array(G); ++c < G; )
|
|
2334
|
+
ue[c] = L(C[c], c, C);
|
|
2335
|
+
return ue;
|
|
2328
2336
|
}
|
|
2329
2337
|
function x(C, L) {
|
|
2330
|
-
for (var c = -1, G = L.length,
|
|
2331
|
-
C[
|
|
2338
|
+
for (var c = -1, G = L.length, ue = C.length; ++c < G; )
|
|
2339
|
+
C[ue + c] = L[c];
|
|
2332
2340
|
return C;
|
|
2333
2341
|
}
|
|
2334
2342
|
function P(C, L, c, G) {
|
|
2335
|
-
var
|
|
2336
|
-
for (G && Y && (c = C[++
|
|
2337
|
-
c = L(c, C[
|
|
2343
|
+
var ue = -1, Y = C == null ? 0 : C.length;
|
|
2344
|
+
for (G && Y && (c = C[++ue]); ++ue < Y; )
|
|
2345
|
+
c = L(c, C[ue], ue, C);
|
|
2338
2346
|
return c;
|
|
2339
2347
|
}
|
|
2340
2348
|
function W(C, L, c, G) {
|
|
2341
|
-
var
|
|
2342
|
-
for (G &&
|
|
2343
|
-
c = L(c, C[
|
|
2349
|
+
var ue = C == null ? 0 : C.length;
|
|
2350
|
+
for (G && ue && (c = C[--ue]); ue--; )
|
|
2351
|
+
c = L(c, C[ue], ue, C);
|
|
2344
2352
|
return c;
|
|
2345
2353
|
}
|
|
2346
2354
|
function H(C, L) {
|
|
@@ -2357,13 +2365,13 @@ var nn = {}, fp = {
|
|
|
2357
2365
|
}
|
|
2358
2366
|
function se(C, L, c) {
|
|
2359
2367
|
var G;
|
|
2360
|
-
return c(C, function(
|
|
2361
|
-
if (L(
|
|
2368
|
+
return c(C, function(ue, Y, ht) {
|
|
2369
|
+
if (L(ue, Y, ht))
|
|
2362
2370
|
return G = Y, !1;
|
|
2363
2371
|
}), G;
|
|
2364
2372
|
}
|
|
2365
2373
|
function Ee(C, L, c, G) {
|
|
2366
|
-
for (var
|
|
2374
|
+
for (var ue = C.length, Y = c + (G ? 1 : -1); G ? Y-- : ++Y < ue; )
|
|
2367
2375
|
if (L(C[Y], Y, C))
|
|
2368
2376
|
return Y;
|
|
2369
2377
|
return -1;
|
|
@@ -2372,9 +2380,9 @@ var nn = {}, fp = {
|
|
|
2372
2380
|
return L === L ? $e(C, L, c) : Ee(C, ae, c);
|
|
2373
2381
|
}
|
|
2374
2382
|
function De(C, L, c, G) {
|
|
2375
|
-
for (var
|
|
2376
|
-
if (G(C[
|
|
2377
|
-
return
|
|
2383
|
+
for (var ue = c - 1, Y = C.length; ++ue < Y; )
|
|
2384
|
+
if (G(C[ue], L))
|
|
2385
|
+
return ue;
|
|
2378
2386
|
return -1;
|
|
2379
2387
|
}
|
|
2380
2388
|
function ae(C) {
|
|
@@ -2394,8 +2402,8 @@ var nn = {}, fp = {
|
|
|
2394
2402
|
return C == null ? E : C[L];
|
|
2395
2403
|
};
|
|
2396
2404
|
}
|
|
2397
|
-
function Re(C, L, c, G,
|
|
2398
|
-
return
|
|
2405
|
+
function Re(C, L, c, G, ue) {
|
|
2406
|
+
return ue(C, function(Y, ht, Mn) {
|
|
2399
2407
|
c = G ? (G = !1, Y) : L(c, Y, ht, Mn);
|
|
2400
2408
|
}), c;
|
|
2401
2409
|
}
|
|
@@ -2406,7 +2414,7 @@ var nn = {}, fp = {
|
|
|
2406
2414
|
return C;
|
|
2407
2415
|
}
|
|
2408
2416
|
function Pe(C, L) {
|
|
2409
|
-
for (var c, G = -1,
|
|
2417
|
+
for (var c, G = -1, ue = C.length; ++G < ue; ) {
|
|
2410
2418
|
var Y = L(C[G]);
|
|
2411
2419
|
Y !== E && (c = c === E ? Y : c + Y);
|
|
2412
2420
|
}
|
|
@@ -2472,8 +2480,8 @@ var nn = {}, fp = {
|
|
|
2472
2480
|
}
|
|
2473
2481
|
function q(C) {
|
|
2474
2482
|
var L = -1, c = Array(C.size);
|
|
2475
|
-
return C.forEach(function(G,
|
|
2476
|
-
c[++L] = [
|
|
2483
|
+
return C.forEach(function(G, ue) {
|
|
2484
|
+
c[++L] = [ue, G];
|
|
2477
2485
|
}), c;
|
|
2478
2486
|
}
|
|
2479
2487
|
function U(C, L) {
|
|
@@ -2482,9 +2490,9 @@ var nn = {}, fp = {
|
|
|
2482
2490
|
};
|
|
2483
2491
|
}
|
|
2484
2492
|
function Z(C, L) {
|
|
2485
|
-
for (var c = -1, G = C.length,
|
|
2493
|
+
for (var c = -1, G = C.length, ue = 0, Y = []; ++c < G; ) {
|
|
2486
2494
|
var ht = C[c];
|
|
2487
|
-
ht !== L && ht !== Jr || (C[c] = Jr, Y[
|
|
2495
|
+
ht !== L && ht !== Jr || (C[c] = Jr, Y[ue++] = c);
|
|
2488
2496
|
}
|
|
2489
2497
|
return Y;
|
|
2490
2498
|
}
|
|
@@ -2501,7 +2509,7 @@ var nn = {}, fp = {
|
|
|
2501
2509
|
}), c;
|
|
2502
2510
|
}
|
|
2503
2511
|
function $e(C, L, c) {
|
|
2504
|
-
for (var G = c - 1,
|
|
2512
|
+
for (var G = c - 1, ue = C.length; ++G < ue; )
|
|
2505
2513
|
if (C[G] === L)
|
|
2506
2514
|
return G;
|
|
2507
2515
|
return -1;
|
|
@@ -2738,16 +2746,16 @@ var nn = {}, fp = {
|
|
|
2738
2746
|
}(), Hs = Bt && Bt.isArrayBuffer, Us = Bt && Bt.isDate, qs = Bt && Bt.isMap, Qs = Bt && Bt.isRegExp, Ws = Bt && Bt.isSet, Vs = Bt && Bt.isTypedArray, U2 = be("length"), q2 = Te(O2), Q2 = Te(k2), W2 = Te(F2), V2 = function C(L) {
|
|
2739
2747
|
function c(t) {
|
|
2740
2748
|
if (qe(t) && !le(t) && !(t instanceof Y)) {
|
|
2741
|
-
if (t instanceof
|
|
2749
|
+
if (t instanceof ue)
|
|
2742
2750
|
return t;
|
|
2743
2751
|
if (ye.call(t, "__wrapped__"))
|
|
2744
2752
|
return Ho(t);
|
|
2745
2753
|
}
|
|
2746
|
-
return new
|
|
2754
|
+
return new ue(t);
|
|
2747
2755
|
}
|
|
2748
2756
|
function G() {
|
|
2749
2757
|
}
|
|
2750
|
-
function
|
|
2758
|
+
function ue(t, r) {
|
|
2751
2759
|
this.__wrapped__ = t, this.__actions__ = [], this.__chain__ = !!r, this.__index__ = 0, this.__values__ = E;
|
|
2752
2760
|
}
|
|
2753
2761
|
function Y(t) {
|
|
@@ -2773,8 +2781,8 @@ var nn = {}, fp = {
|
|
|
2773
2781
|
e:
|
|
2774
2782
|
for (; N-- && V < z; ) {
|
|
2775
2783
|
k += r;
|
|
2776
|
-
for (var
|
|
2777
|
-
var pe = S[
|
|
2784
|
+
for (var he = -1, ee = t[k]; ++he < F; ) {
|
|
2785
|
+
var pe = S[he], me = pe.iteratee, it = pe.type, pt = me(ee);
|
|
2778
2786
|
if (it == x0)
|
|
2779
2787
|
ee = pt;
|
|
2780
2788
|
else if (!pt) {
|
|
@@ -2986,9 +2994,9 @@ var nn = {}, fp = {
|
|
|
2986
2994
|
}) : yc(t) && t.forEach(function(ee, pe) {
|
|
2987
2995
|
b.set(pe, yt(ee, r, a, pe, t, f));
|
|
2988
2996
|
});
|
|
2989
|
-
var J = k ? N ? ni : ai : N ? gt : Ze,
|
|
2990
|
-
return d(
|
|
2991
|
-
|
|
2997
|
+
var J = k ? N ? ni : ai : N ? gt : Ze, he = S ? E : J(t);
|
|
2998
|
+
return d(he || t, function(ee, pe) {
|
|
2999
|
+
he && (pe = ee, ee = t[pe]), br(b, pe, yt(ee, r, a, pe, t, f));
|
|
2992
3000
|
}), b;
|
|
2993
3001
|
}
|
|
2994
3002
|
function md(t) {
|
|
@@ -3115,8 +3123,8 @@ var nn = {}, fp = {
|
|
|
3115
3123
|
var z = S[F], J = r ? r(z) : z;
|
|
3116
3124
|
if (z = a || z !== 0 ? z : 0, !(V ? Dt(V, J) : s(k, J, a))) {
|
|
3117
3125
|
for (b = f; --b; ) {
|
|
3118
|
-
var
|
|
3119
|
-
if (!(
|
|
3126
|
+
var he = T[b];
|
|
3127
|
+
if (!(he ? Dt(he, J) : s(t[b], J, a)))
|
|
3120
3128
|
continue e;
|
|
3121
3129
|
}
|
|
3122
3130
|
V && V.push(J), k.push(z);
|
|
@@ -3160,8 +3168,8 @@ var nn = {}, fp = {
|
|
|
3160
3168
|
if (!(a & Qu)) {
|
|
3161
3169
|
var z = S && ye.call(t, "__wrapped__"), J = F && ye.call(r, "__wrapped__");
|
|
3162
3170
|
if (z || J) {
|
|
3163
|
-
var
|
|
3164
|
-
return f || (f = new Mt()), l(
|
|
3171
|
+
var he = z ? t.value() : t, ee = J ? r.value() : r;
|
|
3172
|
+
return f || (f = new Mt()), l(he, ee, a, s, f);
|
|
3165
3173
|
}
|
|
3166
3174
|
}
|
|
3167
3175
|
return !!V && (f || (f = new Mt()), Jd(t, r, a, s, l, f));
|
|
@@ -3397,11 +3405,11 @@ var nn = {}, fp = {
|
|
|
3397
3405
|
return 0;
|
|
3398
3406
|
r = a(r);
|
|
3399
3407
|
for (var b = r !== r, T = r === null, N = _t(r), k = r === E; l < f; ) {
|
|
3400
|
-
var S = Ha((l + f) / 2), F = a(t[S]), V = F !== E, z = F === null, J = F === F,
|
|
3408
|
+
var S = Ha((l + f) / 2), F = a(t[S]), V = F !== E, z = F === null, J = F === F, he = _t(F);
|
|
3401
3409
|
if (b)
|
|
3402
3410
|
var ee = s || J;
|
|
3403
3411
|
else
|
|
3404
|
-
ee = k ? J && (s || V) : T ? J && V && (s || !z) : N ? J && V && !z && (s || !
|
|
3412
|
+
ee = k ? J && (s || V) : T ? J && V && (s || !z) : N ? J && V && !z && (s || !he) : !z && !he && (s ? F <= r : F < r);
|
|
3405
3413
|
ee ? l = S + 1 : f = S;
|
|
3406
3414
|
}
|
|
3407
3415
|
return at(f, R0);
|
|
@@ -3683,13 +3691,13 @@ var nn = {}, fp = {
|
|
|
3683
3691
|
}
|
|
3684
3692
|
function _o(t) {
|
|
3685
3693
|
return ru(function(r) {
|
|
3686
|
-
var a = r.length, s = a, l =
|
|
3694
|
+
var a = r.length, s = a, l = ue.prototype.thru;
|
|
3687
3695
|
for (t && r.reverse(); s--; ) {
|
|
3688
3696
|
var f = r[s];
|
|
3689
3697
|
if (typeof f != "function")
|
|
3690
3698
|
throw new St(It);
|
|
3691
3699
|
if (l && !b && ba(f) == "wrapper")
|
|
3692
|
-
var b = new
|
|
3700
|
+
var b = new ue([], !0);
|
|
3693
3701
|
}
|
|
3694
3702
|
for (s = b ? s : a; ++s < a; ) {
|
|
3695
3703
|
f = r[s];
|
|
@@ -3715,9 +3723,9 @@ var nn = {}, fp = {
|
|
|
3715
3723
|
if (s && (me = po(me, s, l, J)), f && (me = mo(me, f, b, J)), pe -= Eu, J && pe < k)
|
|
3716
3724
|
return xo(t, r, ga, S.placeholder, a, me, Z(me, pt), T, N, k - pe);
|
|
3717
3725
|
var Qe = V ? a : this, Ot = z ? Qe[t] : t;
|
|
3718
|
-
return pe = me.length, T ? me = hh(me, T) :
|
|
3726
|
+
return pe = me.length, T ? me = hh(me, T) : he && pe > 1 && me.reverse(), F && N < pe && (me.length = N), this && this !== tt && this instanceof S && (Ot = ee || Nr(Ot)), Ot.apply(Qe, me);
|
|
3719
3727
|
}
|
|
3720
|
-
var F = r & Zt, V = r & xt, z = r & Iu, J = r & (Qt | Wu),
|
|
3728
|
+
var F = r & Zt, V = r & xt, z = r & Iu, J = r & (Qt | Wu), he = r & bn, ee = z ? E : Nr(t);
|
|
3721
3729
|
return S;
|
|
3722
3730
|
}
|
|
3723
3731
|
function No(t, r) {
|
|
@@ -3780,8 +3788,8 @@ var nn = {}, fp = {
|
|
|
3780
3788
|
function xo(t, r, a, s, l, f, b, T, N, k) {
|
|
3781
3789
|
var S = r & Qt, F = S ? b : E, V = S ? E : b, z = S ? f : E, J = S ? E : f;
|
|
3782
3790
|
r |= S ? Wt : Vu, r &= ~(S ? Vu : Wt), r & ds || (r &= ~(xt | Iu));
|
|
3783
|
-
var
|
|
3784
|
-
return oi(t) && Nc(ee,
|
|
3791
|
+
var he = [t, r, l, z, F, J, V, T, N, k], ee = a.apply(E, he);
|
|
3792
|
+
return oi(t) && Nc(ee, he), ee.placeholder = s, Po(ee, t, r);
|
|
3785
3793
|
}
|
|
3786
3794
|
function ri(t) {
|
|
3787
3795
|
var r = $u[t];
|
|
@@ -3833,9 +3841,9 @@ var nn = {}, fp = {
|
|
|
3833
3841
|
return k == r && S == t;
|
|
3834
3842
|
var F = -1, V = !0, z = a & $r ? new Ru() : E;
|
|
3835
3843
|
for (f.set(t, r), f.set(r, t); ++F < T; ) {
|
|
3836
|
-
var J = t[F],
|
|
3844
|
+
var J = t[F], he = r[F];
|
|
3837
3845
|
if (s)
|
|
3838
|
-
var ee = b ? s(
|
|
3846
|
+
var ee = b ? s(he, J, F, r, t, f) : s(J, he, F, t, r, f);
|
|
3839
3847
|
if (ee !== E) {
|
|
3840
3848
|
if (ee)
|
|
3841
3849
|
continue;
|
|
@@ -3850,7 +3858,7 @@ var nn = {}, fp = {
|
|
|
3850
3858
|
V = !1;
|
|
3851
3859
|
break;
|
|
3852
3860
|
}
|
|
3853
|
-
} else if (J !==
|
|
3861
|
+
} else if (J !== he && !l(J, he, a, s, f)) {
|
|
3854
3862
|
V = !1;
|
|
3855
3863
|
break;
|
|
3856
3864
|
}
|
|
@@ -3908,10 +3916,10 @@ var nn = {}, fp = {
|
|
|
3908
3916
|
f.set(t, r), f.set(r, t);
|
|
3909
3917
|
for (var J = b; ++k < N; ) {
|
|
3910
3918
|
S = T[k];
|
|
3911
|
-
var
|
|
3919
|
+
var he = t[S], ee = r[S];
|
|
3912
3920
|
if (s)
|
|
3913
|
-
var pe = b ? s(ee,
|
|
3914
|
-
if (!(pe === E ?
|
|
3921
|
+
var pe = b ? s(ee, he, S, r, t, f) : s(he, ee, S, t, r, f);
|
|
3922
|
+
if (!(pe === E ? he === ee || l(he, ee, a, s, f) : pe)) {
|
|
3915
3923
|
z = !1;
|
|
3916
3924
|
break;
|
|
3917
3925
|
}
|
|
@@ -4205,7 +4213,7 @@ var nn = {}, fp = {
|
|
|
4205
4213
|
function Ho(t) {
|
|
4206
4214
|
if (t instanceof Y)
|
|
4207
4215
|
return t.clone();
|
|
4208
|
-
var r = new
|
|
4216
|
+
var r = new ue(t.__wrapped__, t.__chain__);
|
|
4209
4217
|
return r.__actions__ = ft(t.__actions__), r.__index__ = t.__index__, r.__values__ = t.__values__, r;
|
|
4210
4218
|
}
|
|
4211
4219
|
function Ah(t, r, a) {
|
|
@@ -4437,7 +4445,7 @@ var nn = {}, fp = {
|
|
|
4437
4445
|
return Yo(this);
|
|
4438
4446
|
}
|
|
4439
4447
|
function ef() {
|
|
4440
|
-
return new
|
|
4448
|
+
return new ue(this.value(), this.__chain__);
|
|
4441
4449
|
}
|
|
4442
4450
|
function tf() {
|
|
4443
4451
|
this.__values__ === E && (this.__values__ = uc(this.value()));
|
|
@@ -4460,7 +4468,7 @@ var nn = {}, fp = {
|
|
|
4460
4468
|
var t = this.__wrapped__;
|
|
4461
4469
|
if (t instanceof Y) {
|
|
4462
4470
|
var r = t;
|
|
4463
|
-
return this.__actions__.length && (r = new Y(this)), r = r.reverse(), r.__actions__.push({ func: Ca, args: [li], thisArg: E }), new
|
|
4471
|
+
return this.__actions__.length && (r = new Y(this)), r = r.reverse(), r.__actions__.push({ func: Ca, args: [li], thisArg: E }), new ue(r, this.__chain__);
|
|
4464
4472
|
}
|
|
4465
4473
|
return this.thru(li);
|
|
4466
4474
|
}
|
|
@@ -4564,10 +4572,10 @@ var nn = {}, fp = {
|
|
|
4564
4572
|
function $o(t, r, a) {
|
|
4565
4573
|
function s(Qe) {
|
|
4566
4574
|
var Ot = V, Or = z;
|
|
4567
|
-
return V = z = E, me = Qe,
|
|
4575
|
+
return V = z = E, me = Qe, he = t.apply(Or, Ot);
|
|
4568
4576
|
}
|
|
4569
4577
|
function l(Qe) {
|
|
4570
|
-
return me = Qe, ee = Sr(T, r), it ? s(Qe) :
|
|
4578
|
+
return me = Qe, ee = Sr(T, r), it ? s(Qe) : he;
|
|
4571
4579
|
}
|
|
4572
4580
|
function f(Qe) {
|
|
4573
4581
|
var Ot = Qe - pe, Or = Qe - me, Fc = r - Ot;
|
|
@@ -4582,13 +4590,13 @@ var nn = {}, fp = {
|
|
|
4582
4590
|
return b(Qe) ? N(Qe) : (ee = Sr(T, f(Qe)), E);
|
|
4583
4591
|
}
|
|
4584
4592
|
function N(Qe) {
|
|
4585
|
-
return ee = E, Eu && V ? s(Qe) : (V = z = E,
|
|
4593
|
+
return ee = E, Eu && V ? s(Qe) : (V = z = E, he);
|
|
4586
4594
|
}
|
|
4587
4595
|
function k() {
|
|
4588
4596
|
ee !== E && Cc(ee), me = 0, V = pe = z = ee = E;
|
|
4589
4597
|
}
|
|
4590
4598
|
function S() {
|
|
4591
|
-
return ee === E ?
|
|
4599
|
+
return ee === E ? he : N(Qa());
|
|
4592
4600
|
}
|
|
4593
4601
|
function F() {
|
|
4594
4602
|
var Qe = Qa(), Ot = b(Qe);
|
|
@@ -4598,9 +4606,9 @@ var nn = {}, fp = {
|
|
|
4598
4606
|
if (pt)
|
|
4599
4607
|
return Cc(ee), ee = Sr(T, r), s(pe);
|
|
4600
4608
|
}
|
|
4601
|
-
return ee === E && (ee = Sr(T, r)),
|
|
4609
|
+
return ee === E && (ee = Sr(T, r)), he;
|
|
4602
4610
|
}
|
|
4603
|
-
var V, z, J,
|
|
4611
|
+
var V, z, J, he, ee, pe, me = 0, it = !1, pt = !1, Eu = !0;
|
|
4604
4612
|
if (typeof t != "function")
|
|
4605
4613
|
throw new St(It);
|
|
4606
4614
|
return r = Lt(r) || 0, Ue(a) && (it = !!a.leading, pt = "maxWait" in a, J = pt ? Xe(Lt(a.maxWait) || 0, r) : J, Eu = "trailing" in a ? !!a.trailing : Eu), F.cancel = k, F.flush = S, F;
|
|
@@ -5057,12 +5065,12 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
5057
5065
|
` : `;
|
|
5058
5066
|
`) + F + `return __p
|
|
5059
5067
|
}`;
|
|
5060
|
-
var
|
|
5068
|
+
var he = kc(function() {
|
|
5061
5069
|
return lc(T, z + "return " + F).apply(E, N);
|
|
5062
5070
|
});
|
|
5063
|
-
if (
|
|
5064
|
-
throw
|
|
5065
|
-
return
|
|
5071
|
+
if (he.source = F, hi(he))
|
|
5072
|
+
throw he;
|
|
5073
|
+
return he;
|
|
5066
5074
|
}
|
|
5067
5075
|
function FA(t) {
|
|
5068
5076
|
return Be(t).toLowerCase();
|
|
@@ -5282,7 +5290,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
5282
5290
|
return t.prototype = E, a;
|
|
5283
5291
|
};
|
|
5284
5292
|
}();
|
|
5285
|
-
c.templateSettings = { escape: W0, evaluate: V0, interpolate: ps, variable: "", imports: { _: c } }, c.prototype = G.prototype, c.prototype.constructor = c,
|
|
5293
|
+
c.templateSettings = { escape: W0, evaluate: V0, interpolate: ps, variable: "", imports: { _: c } }, c.prototype = G.prototype, c.prototype.constructor = c, ue.prototype = rr(G.prototype), ue.prototype.constructor = ue, Y.prototype = rr(G.prototype), Y.prototype.constructor = Y, yu.prototype.clear = Y2, yu.prototype.delete = z2, yu.prototype.get = j2, yu.prototype.has = X2, yu.prototype.set = K2, $t.prototype.clear = Z2, $t.prototype.delete = J2, $t.prototype.get = $2, $t.prototype.has = ed, $t.prototype.set = td, eu.prototype.clear = ud, eu.prototype.delete = rd, eu.prototype.get = ad, eu.prototype.has = nd, eu.prototype.set = id, Ru.prototype.add = Ru.prototype.push = sd, Ru.prototype.has = od, Mt.prototype.clear = cd, Mt.prototype.delete = ld, Mt.prototype.get = dd, Mt.prototype.has = hd, Mt.prototype.set = fd;
|
|
5286
5294
|
var Au = bo(Gt), bc = bo(qn, !0), xi = Do(), Dc = Do(!0), Tc = Ua ? function(t, r) {
|
|
5287
5295
|
return Ua.set(t, r), t;
|
|
5288
5296
|
} : Et, v1 = Pa ? function(t, r) {
|
|
@@ -5378,7 +5386,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
5378
5386
|
var r = t.length, a = r ? t[0] : 0, s = this.__wrapped__, l = function(f) {
|
|
5379
5387
|
return Un(f, t);
|
|
5380
5388
|
};
|
|
5381
|
-
return !(r > 1 || this.__actions__.length) && s instanceof Y && au(a) ? (s = s.slice(a, +a + (r ? 1 : 0)), s.__actions__.push({ func: Ca, args: [l], thisArg: E }), new
|
|
5389
|
+
return !(r > 1 || this.__actions__.length) && s instanceof Y && au(a) ? (s = s.slice(a, +a + (r ? 1 : 0)), s.__actions__.push({ func: Ca, args: [l], thisArg: E }), new ue(s, this.__chain__).thru(function(f) {
|
|
5382
5390
|
return r && !f.length && f.push(E), f;
|
|
5383
5391
|
})) : this.thru(l);
|
|
5384
5392
|
}), J1 = Aa(function(t, r, a) {
|
|
@@ -5586,13 +5594,13 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
5586
5594
|
return s && V ? me[0] : me;
|
|
5587
5595
|
};
|
|
5588
5596
|
S && a && typeof k == "function" && k.length != 1 && (N = S = !1);
|
|
5589
|
-
var V = this.__chain__, z = !!this.__actions__.length, J = f && !V,
|
|
5597
|
+
var V = this.__chain__, z = !!this.__actions__.length, J = f && !V, he = N && !z;
|
|
5590
5598
|
if (!f && S) {
|
|
5591
|
-
b =
|
|
5599
|
+
b = he ? b : new Y(this);
|
|
5592
5600
|
var ee = t.apply(b, T);
|
|
5593
|
-
return ee.__actions__.push({ func: Ca, args: [F], thisArg: E }), new
|
|
5601
|
+
return ee.__actions__.push({ func: Ca, args: [F], thisArg: E }), new ue(ee, V);
|
|
5594
5602
|
}
|
|
5595
|
-
return J &&
|
|
5603
|
+
return J && he ? t.apply(this, T) : (ee = this.thru(F), J ? s ? ee.value()[0] : ee.value() : ee);
|
|
5596
5604
|
});
|
|
5597
5605
|
}), d(["pop", "push", "shift", "sort", "splice", "unshift"], function(t) {
|
|
5598
5606
|
var r = Ra[t], a = /^(?:push|sort|unshift)$/.test(t) ? "tap" : "thru", s = /^(?:pop|shift)$/.test(t);
|
|
@@ -13324,9 +13332,9 @@ const cs = {
|
|
|
13324
13332
|
[oe.STANDARD_TEXT_LIST_ITEM]: g3
|
|
13325
13333
|
}, _3 = (e) => {
|
|
13326
13334
|
var W;
|
|
13327
|
-
const { activeTab: u } = Kr(), n = u === ml.MOBILE, { mergetagsData: o, attributesVariables: d } = Mu(), g = su(), B = (W = e.attributes) == null ? void 0 : W["data-slate-path"], R = B == null ? void 0 : B.split("-").map(Number), v =
|
|
13335
|
+
const { activeTab: u } = Kr(), n = u === ml.MOBILE, { mergetagsData: o, attributesVariables: d } = Mu(), g = su(), B = (W = e.attributes) == null ? void 0 : W["data-slate-path"], R = B == null ? void 0 : B.split("-").map(Number), v = de.above(g, {
|
|
13328
13336
|
at: R,
|
|
13329
|
-
match: (H) =>
|
|
13337
|
+
match: (H) => te.isWidgetElement(H)
|
|
13330
13338
|
}), Q = v ? v[0] : null, D = Cu(() => Q == null ? void 0 : Q.data.input, [Q == null ? void 0 : Q.data.input]), x = Cu(() => B && Q ? dn(d || {}, D) : d, [d, D, Q, B]);
|
|
13331
13339
|
return Cu(() => {
|
|
13332
13340
|
const { element: H } = e;
|
|
@@ -13340,7 +13348,7 @@ const cs = {
|
|
|
13340
13348
|
);
|
|
13341
13349
|
}, [e, n, o, x]);
|
|
13342
13350
|
}, N3 = (e) => {
|
|
13343
|
-
const { element: u, isMobileActive: n } = e, o = cs[u.type], d = su(), g =
|
|
13351
|
+
const { element: u, isMobileActive: n } = e, o = cs[u.type], d = su(), g = de.node(d, [0])[0];
|
|
13344
13352
|
g.data.breakpoint || (g.data.breakpoint = "600px");
|
|
13345
13353
|
const B = rs.enabledResponsive, R = n && B ? dn(u.attributes, u.mobileAttributes) : u.attributes, v = ne(_({}, g), {
|
|
13346
13354
|
data: ne(_({}, g.data), {
|
|
@@ -13364,7 +13372,7 @@ const cs = {
|
|
|
13364
13372
|
displayMode: n ? "only-mobile" : "only-desktop"
|
|
13365
13373
|
}
|
|
13366
13374
|
), D = sr.mjmlToBlockElement(Q);
|
|
13367
|
-
return
|
|
13375
|
+
return te.isTextNode(D) ? null : /* @__PURE__ */ m.createElement(
|
|
13368
13376
|
I3,
|
|
13369
13377
|
ne(_({}, e), {
|
|
13370
13378
|
element: u,
|
|
@@ -13436,7 +13444,7 @@ const x3 = ({
|
|
|
13436
13444
|
R.current = 0;
|
|
13437
13445
|
let v = !1;
|
|
13438
13446
|
const Q = u, D = !!Ae.getBlockByType(B.type).void;
|
|
13439
|
-
return
|
|
13447
|
+
return te.isWidgetElement(B) ? B.data.contentEditable && (v = !0, n["data-slate-widget"] = !0) : D && (o.children.every((P) => te.isTextNode(P)) || o.children.length === 0) && (v = !0), /* @__PURE__ */ m.createElement(
|
|
13440
13448
|
g0,
|
|
13441
13449
|
{
|
|
13442
13450
|
attributes: n,
|
|
@@ -13474,14 +13482,14 @@ function g0({
|
|
|
13474
13482
|
},
|
|
13475
13483
|
!R && e.children.map((D, x) => {
|
|
13476
13484
|
var P;
|
|
13477
|
-
if (
|
|
13485
|
+
if (te.isElement(D) && ((P = D.attributes["css-class"]) == null ? void 0 : P.includes(
|
|
13478
13486
|
bE
|
|
13479
13487
|
))) {
|
|
13480
13488
|
const H = Array.isArray(n) ? n == null ? void 0 : n[d.current++] : n;
|
|
13481
13489
|
if (H)
|
|
13482
13490
|
return /* @__PURE__ */ m.createElement(m.Fragment, { key: x }, H);
|
|
13483
13491
|
}
|
|
13484
|
-
return
|
|
13492
|
+
return te.isTextNode(D) ? /* @__PURE__ */ m.createElement(as, { key: x, leaf: D, text: D, contentUneditable: !0 }, D.text) : /* @__PURE__ */ m.createElement(m.Fragment, { key: x }, /* @__PURE__ */ m.createElement(
|
|
13485
13493
|
g0,
|
|
13486
13494
|
{
|
|
13487
13495
|
isEmptyChildren: R,
|
|
@@ -13498,7 +13506,7 @@ function g0({
|
|
|
13498
13506
|
);
|
|
13499
13507
|
}
|
|
13500
13508
|
const B3 = (e, u) => {
|
|
13501
|
-
const [n] =
|
|
13509
|
+
const [n] = de.nodes(e, {
|
|
13502
13510
|
match: (o) => zr.isText(o) && !!o[u],
|
|
13503
13511
|
mode: "all"
|
|
13504
13512
|
});
|
|
@@ -13553,32 +13561,32 @@ const B3 = (e, u) => {
|
|
|
13553
13561
|
if (R.current && be && !rt.isAncestor(be, Re) && !rt.equals(Re, be))
|
|
13554
13562
|
return null;
|
|
13555
13563
|
let we;
|
|
13556
|
-
const Pe = !!
|
|
13564
|
+
const Pe = !!de.above(x, {
|
|
13557
13565
|
at: Re,
|
|
13558
|
-
match: (_e) =>
|
|
13566
|
+
match: (_e) => te.isUnsetElement(_e)
|
|
13559
13567
|
});
|
|
13560
|
-
if (
|
|
13568
|
+
if (te.isUniversalElement(Te) || te.isVoidBlockElement(Te) ? we = [Te, Re] : we = de.above(x, {
|
|
13561
13569
|
at: Re,
|
|
13562
|
-
match: (_e) => R.current ?
|
|
13570
|
+
match: (_e) => R.current ? te.isVoidBlockElement(_e) : te.isUniversalElement(_e) || te.isVoidBlockElement(_e)
|
|
13563
13571
|
}), we) {
|
|
13564
|
-
const _e =
|
|
13572
|
+
const _e = de.above(x, {
|
|
13565
13573
|
at: we[1],
|
|
13566
13574
|
match(Le, ct) {
|
|
13567
|
-
return
|
|
13575
|
+
return te.isVoidBlockElement(Le);
|
|
13568
13576
|
}
|
|
13569
13577
|
});
|
|
13570
13578
|
Te = (_e == null ? void 0 : _e[0]) || we[0], Re = (_e == null ? void 0 : _e[1]) || we[1];
|
|
13571
13579
|
} else {
|
|
13572
|
-
const [_e] =
|
|
13580
|
+
const [_e] = de.nodes(x, {
|
|
13573
13581
|
at: Re,
|
|
13574
|
-
match: (Le, ct) => !(!rt.equals(ct, Re) && !rt.isAncestor(ct, Re) || !
|
|
13582
|
+
match: (Le, ct) => !(!rt.equals(ct, Re) && !rt.isAncestor(ct, Re) || !te.isBlockElement(Le) || te.isUnsetElement(Le) || te.isColumnElement(Le) || te.isGroupElement(Le)),
|
|
13575
13583
|
mode: "lowest"
|
|
13576
13584
|
});
|
|
13577
13585
|
if (!_e)
|
|
13578
13586
|
return;
|
|
13579
13587
|
Te = _e[0], Re = _e[1];
|
|
13580
13588
|
}
|
|
13581
|
-
if (
|
|
13589
|
+
if (te.isContentElement(Te)) {
|
|
13582
13590
|
if ((Ae.getBlockByType(Te.type).void || we || Pe) && j) {
|
|
13583
13591
|
let Le = null;
|
|
13584
13592
|
Vc(ae.target) && (ae.target.getAttribute("data-slate-node") === "text" || ae.target.getAttribute("data-slate-string") === "true" ? Le = ae.target : Le = ae.target.querySelector(
|
|
@@ -13617,11 +13625,11 @@ const B3 = (e, u) => {
|
|
|
13617
13625
|
var Te, Re, we;
|
|
13618
13626
|
if (!W || !((Te = x.selection) != null && Te.anchor.path))
|
|
13619
13627
|
return;
|
|
13620
|
-
const ae =
|
|
13628
|
+
const ae = de.above(x, {
|
|
13621
13629
|
at: (Re = x.selection) == null ? void 0 : Re.anchor.path
|
|
13622
|
-
}), j = ae == null ? void 0 : ae[0], be = (we =
|
|
13630
|
+
}), j = ae == null ? void 0 : ae[0], be = (we = de.next(x)) == null ? void 0 : we[1];
|
|
13623
13631
|
if (j && j.type === oe.LINE_BREAK && be) {
|
|
13624
|
-
const Pe =
|
|
13632
|
+
const Pe = de.start(x, be);
|
|
13625
13633
|
Ne.select(x, Pe);
|
|
13626
13634
|
}
|
|
13627
13635
|
}, [W, x, se]);
|
|
@@ -13645,9 +13653,9 @@ const B3 = (e, u) => {
|
|
|
13645
13653
|
(ae) => {
|
|
13646
13654
|
if (ae.preventDefault(), W && Tl(ae.target) && ae.target !== W.document.documentElement)
|
|
13647
13655
|
try {
|
|
13648
|
-
const j = kt.toSlateNode(x, ae.target), be =
|
|
13656
|
+
const j = kt.toSlateNode(x, ae.target), be = de.above(x, {
|
|
13649
13657
|
at: kt.findPath(x, j),
|
|
13650
|
-
match: (Te) =>
|
|
13658
|
+
match: (Te) => te.isElement(Te) && Te.type === oe.MERGETAG
|
|
13651
13659
|
});
|
|
13652
13660
|
be && Ne.select(x, be[1]);
|
|
13653
13661
|
} catch (j) {
|
|
@@ -31,6 +31,7 @@ export interface SlateEditor {
|
|
|
31
31
|
to: Path;
|
|
32
32
|
}): void;
|
|
33
33
|
getSelectionRect(): null | DOMRect;
|
|
34
|
+
getSelectedContentElement(): null | NodeEntry<Element>;
|
|
34
35
|
getSelectedBlockElement(): null | NodeEntry<Element>;
|
|
35
36
|
}
|
|
36
37
|
export type CustomSlateEditor = BaseEditor & ReactEditor & HistoryEditor & SlateEditor;
|