@pubwave/editor 0.5.6 → 0.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/index.cjs +6 -6
- package/dist/index.d.ts +10 -10
- package/dist/index.js +525 -523
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node as rn, mergeAttributes as
|
|
1
|
+
import { Node as rn, mergeAttributes as vt, Extension as St, Mark as Zn, Editor as Uo } from "@tiptap/core";
|
|
2
2
|
import qo from "@tiptap/extension-placeholder";
|
|
3
3
|
import Wo from "@tiptap/extension-history";
|
|
4
4
|
import Fo from "@tiptap/extension-dropcursor";
|
|
@@ -54,9 +54,9 @@ function Rr({
|
|
|
54
54
|
onCancel: n,
|
|
55
55
|
locale: o
|
|
56
56
|
}) {
|
|
57
|
-
var M, J, v, B,
|
|
58
|
-
const [r, a] = re(e.type), [i, s] = re(((v = (J = (M = e.options) == null ? void 0 : M.plugins) == null ? void 0 : J.title) == null ? void 0 : v.text) ?? ""), [l, f] = re(((F = (
|
|
59
|
-
((
|
|
57
|
+
var M, J, v, B, D, F, K, V, z;
|
|
58
|
+
const [r, a] = re(e.type), [i, s] = re(((v = (J = (M = e.options) == null ? void 0 : M.plugins) == null ? void 0 : J.title) == null ? void 0 : v.text) ?? ""), [l, f] = re(((F = (D = (B = e.options) == null ? void 0 : B.plugins) == null ? void 0 : D.legend) == null ? void 0 : F.display) ?? !0), [p, w] = re(
|
|
59
|
+
((z = (V = (K = e.options) == null ? void 0 : K.plugins) == null ? void 0 : V.legend) == null ? void 0 : z.position) ?? "bottom"
|
|
60
60
|
), [d, b] = re(e.data.labels), [h, g] = re(e.data.datasets), x = ne(null), m = (o == null ? void 0 : o.chart) || {
|
|
61
61
|
modal: {
|
|
62
62
|
title: "Edit Chart",
|
|
@@ -98,36 +98,36 @@ function Rr({
|
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
100
|
ae(() => {
|
|
101
|
-
const S = (
|
|
102
|
-
|
|
101
|
+
const S = (O) => {
|
|
102
|
+
O.key === "Escape" && n();
|
|
103
103
|
};
|
|
104
104
|
return document.addEventListener("keydown", S), () => document.removeEventListener("keydown", S);
|
|
105
105
|
}, [n]), ae(() => {
|
|
106
106
|
const S = (ie) => {
|
|
107
107
|
x.current && x.current.contains(ie.target);
|
|
108
|
-
},
|
|
108
|
+
}, O = setTimeout(() => {
|
|
109
109
|
document.addEventListener("mousedown", S);
|
|
110
110
|
}, 100);
|
|
111
111
|
return () => {
|
|
112
|
-
clearTimeout(
|
|
112
|
+
clearTimeout(O), document.removeEventListener("mousedown", S);
|
|
113
113
|
};
|
|
114
114
|
}, []);
|
|
115
|
-
const A = H((S,
|
|
115
|
+
const A = H((S, O) => {
|
|
116
116
|
g(
|
|
117
|
-
(ie) => ie.map((se, de) => de === S ? { ...se, label:
|
|
117
|
+
(ie) => ie.map((se, de) => de === S ? { ...se, label: O } : se)
|
|
118
118
|
);
|
|
119
|
-
}, []), k = H((S,
|
|
119
|
+
}, []), k = H((S, O) => {
|
|
120
120
|
g(
|
|
121
121
|
(ie) => ie.map(
|
|
122
|
-
(se, de) => de === S ? { ...se, data:
|
|
122
|
+
(se, de) => de === S ? { ...se, data: O.split(",").map((T) => parseFloat(T.trim()) || 0) } : se
|
|
123
123
|
)
|
|
124
124
|
);
|
|
125
125
|
}, []), u = H(() => {
|
|
126
126
|
const S = Pr(h.length);
|
|
127
|
-
g((
|
|
128
|
-
...
|
|
127
|
+
g((O) => [
|
|
128
|
+
...O,
|
|
129
129
|
{
|
|
130
|
-
label: `${m.modal.fields.datasets.title} ${
|
|
130
|
+
label: `${m.modal.fields.datasets.title} ${O.length + 1}`,
|
|
131
131
|
data: d.map(() => Math.floor(Math.random() * 100)),
|
|
132
132
|
backgroundColor: S.backgroundColor,
|
|
133
133
|
borderColor: S.borderColor,
|
|
@@ -135,9 +135,9 @@ function Rr({
|
|
|
135
135
|
}
|
|
136
136
|
]);
|
|
137
137
|
}, [h.length, d, m]), C = H((S) => {
|
|
138
|
-
g((
|
|
138
|
+
g((O) => O.filter((ie, se) => se !== S));
|
|
139
139
|
}, []), L = H((S) => {
|
|
140
|
-
b(S.split(",").map((
|
|
140
|
+
b(S.split(",").map((O) => O.trim()).filter(Boolean));
|
|
141
141
|
}, []), E = H(() => {
|
|
142
142
|
const S = {
|
|
143
143
|
type: r,
|
|
@@ -273,53 +273,53 @@ function Rr({
|
|
|
273
273
|
}
|
|
274
274
|
)
|
|
275
275
|
] }),
|
|
276
|
-
h.map((S,
|
|
276
|
+
h.map((S, O) => /* @__PURE__ */ P("div", { className: "pubwave-form__dataset", children: [
|
|
277
277
|
/* @__PURE__ */ P("div", { className: "pubwave-form__dataset-header", children: [
|
|
278
278
|
/* @__PURE__ */ P("span", { className: "pubwave-form__dataset-title", children: [
|
|
279
279
|
m.modal.fields.datasets.datasetLabel,
|
|
280
280
|
" ",
|
|
281
|
-
|
|
281
|
+
O + 1
|
|
282
282
|
] }),
|
|
283
283
|
h.length > 1 && /* @__PURE__ */ c(
|
|
284
284
|
"button",
|
|
285
285
|
{
|
|
286
286
|
type: "button",
|
|
287
287
|
className: "pubwave-button pubwave-button--danger pubwave-button--small",
|
|
288
|
-
onClick: () => C(
|
|
289
|
-
"aria-label": `${m.modal.fields.datasets.remove} ${
|
|
288
|
+
onClick: () => C(O),
|
|
289
|
+
"aria-label": `${m.modal.fields.datasets.remove} ${O + 1}`,
|
|
290
290
|
children: m.modal.fields.datasets.remove
|
|
291
291
|
}
|
|
292
292
|
)
|
|
293
293
|
] }),
|
|
294
294
|
/* @__PURE__ */ P("div", { className: "pubwave-form__field", children: [
|
|
295
|
-
/* @__PURE__ */ c("label", { htmlFor: `dataset-label-${
|
|
295
|
+
/* @__PURE__ */ c("label", { htmlFor: `dataset-label-${O}`, className: "pubwave-form__label", children: m.modal.fields.datasets.datasetLabel }),
|
|
296
296
|
/* @__PURE__ */ c(
|
|
297
297
|
"input",
|
|
298
298
|
{
|
|
299
|
-
id: `dataset-label-${
|
|
299
|
+
id: `dataset-label-${O}`,
|
|
300
300
|
type: "text",
|
|
301
301
|
className: "pubwave-form__input",
|
|
302
302
|
value: S.label ?? "",
|
|
303
|
-
onChange: (ie) => A(
|
|
303
|
+
onChange: (ie) => A(O, ie.target.value),
|
|
304
304
|
placeholder: m.modal.fields.datasets.datasetLabelPlaceholder
|
|
305
305
|
}
|
|
306
306
|
)
|
|
307
307
|
] }),
|
|
308
308
|
/* @__PURE__ */ P("div", { className: "pubwave-form__field", children: [
|
|
309
|
-
/* @__PURE__ */ c("label", { htmlFor: `dataset-data-${
|
|
309
|
+
/* @__PURE__ */ c("label", { htmlFor: `dataset-data-${O}`, className: "pubwave-form__label", children: m.modal.fields.datasets.data }),
|
|
310
310
|
/* @__PURE__ */ c(
|
|
311
311
|
"input",
|
|
312
312
|
{
|
|
313
|
-
id: `dataset-data-${
|
|
313
|
+
id: `dataset-data-${O}`,
|
|
314
314
|
type: "text",
|
|
315
315
|
className: "pubwave-form__input",
|
|
316
316
|
value: S.data.join(", "),
|
|
317
|
-
onChange: (ie) => k(
|
|
317
|
+
onChange: (ie) => k(O, ie.target.value),
|
|
318
318
|
placeholder: m.modal.fields.datasets.dataPlaceholder
|
|
319
319
|
}
|
|
320
320
|
)
|
|
321
321
|
] })
|
|
322
|
-
] },
|
|
322
|
+
] }, O))
|
|
323
323
|
] })
|
|
324
324
|
] }),
|
|
325
325
|
/* @__PURE__ */ P("div", { className: "pubwave-modal__footer", children: [
|
|
@@ -427,108 +427,110 @@ function Mt(e) {
|
|
|
427
427
|
const to = hr({
|
|
428
428
|
locale: Kt
|
|
429
429
|
}), kn = to.Provider;
|
|
430
|
-
function
|
|
430
|
+
function Ge() {
|
|
431
431
|
return br(to).locale;
|
|
432
432
|
}
|
|
433
433
|
const $a = async () => import("chart.js/auto");
|
|
434
|
-
function
|
|
434
|
+
function Ze(e, t, n) {
|
|
435
435
|
const o = getComputedStyle(e), r = t.replace(/^var\(/, "").replace(/\)$/, "");
|
|
436
436
|
return o.getPropertyValue(r).trim() || n;
|
|
437
437
|
}
|
|
438
438
|
function ja(e) {
|
|
439
439
|
var M, J, v;
|
|
440
|
-
const { node: t, updateAttributes: n, editor: o, selected: r } = e, a = t.attrs.data, [i, s] = re(!1), [l, f] = re(!1), [p, w] = re(null), d = ne(null), b = ne(null), h = ne(null), g =
|
|
440
|
+
const { node: t, updateAttributes: n, editor: o, selected: r } = e, a = t.attrs.data, [i, s] = re(!1), [l, f] = re(!1), [p, w] = re(null), d = ne(null), b = ne(null), h = ne(null), g = Ge(), x = ((M = o == null ? void 0 : o.options) == null ? void 0 : M.editable) ?? !0, m = x ? r : !1, A = H(() => {
|
|
441
441
|
if (!p || !h.current || !b.current)
|
|
442
442
|
return;
|
|
443
|
-
const B = b.current,
|
|
443
|
+
const B = b.current, D = Ze(
|
|
444
444
|
B,
|
|
445
445
|
"--pubwave-text",
|
|
446
446
|
"#37352f"
|
|
447
|
-
), F =
|
|
447
|
+
), F = Ze(
|
|
448
448
|
B,
|
|
449
449
|
"--pubwave-text-muted",
|
|
450
450
|
"#9b9a97"
|
|
451
|
-
), K =
|
|
451
|
+
), K = Ze(
|
|
452
452
|
B,
|
|
453
453
|
"--pubwave-border",
|
|
454
454
|
"#e3e2e0"
|
|
455
|
-
), V = p.options.plugins || {},
|
|
455
|
+
), V = p.options.plugins || {}, z = p.options.scales;
|
|
456
456
|
if (V.legend) {
|
|
457
457
|
const S = V.legend;
|
|
458
|
-
S.labels ? S.labels.color =
|
|
459
|
-
const
|
|
460
|
-
|
|
458
|
+
S.labels ? S.labels.color = D : V.legend.labels = { color: D }, S.onHover = () => {
|
|
459
|
+
const O = d.current;
|
|
460
|
+
O && (O.style.cursor = "pointer");
|
|
461
461
|
}, S.onLeave = () => {
|
|
462
|
-
const
|
|
463
|
-
|
|
462
|
+
const O = d.current;
|
|
463
|
+
O && (O.style.cursor = "default");
|
|
464
464
|
};
|
|
465
465
|
}
|
|
466
|
-
V.title && (V.title.color =
|
|
466
|
+
V.title && (V.title.color = D), z && (z.x && (z.x.ticks && (z.x.ticks.color = F), z.x.grid && (z.x.grid.color = K), z.x.title ? z.x.title.color = D : z.x.title = { color: D }), z.y && (z.y.ticks && (z.y.ticks.color = F), z.y.grid && (z.y.grid.color = K), z.y.title ? z.y.title.color = D : z.y.title = { color: D })), p.update("none");
|
|
467
467
|
}, [p]);
|
|
468
468
|
ae(() => !d.current || !a ? void 0 : ((async () => {
|
|
469
|
-
var
|
|
469
|
+
var D, F, K, V, z, S, O, ie, se, de, T, R, N, W, G, Z, U, X, q, ee;
|
|
470
470
|
try {
|
|
471
|
-
const
|
|
472
|
-
if (h.current =
|
|
473
|
-
const
|
|
474
|
-
|
|
471
|
+
const he = (await $a()).default;
|
|
472
|
+
if (h.current = he, d.current) {
|
|
473
|
+
const ye = he.getChart(d.current);
|
|
474
|
+
ye && ye.destroy();
|
|
475
475
|
}
|
|
476
476
|
p && p.destroy();
|
|
477
|
-
const
|
|
478
|
-
if (!
|
|
477
|
+
const te = (D = d.current) == null ? void 0 : D.getContext("2d");
|
|
478
|
+
if (!te) {
|
|
479
479
|
console.warn("Failed to get 2D context for chart");
|
|
480
480
|
return;
|
|
481
481
|
}
|
|
482
|
-
const
|
|
482
|
+
const le = b.current, ue = le ? Ze(le, "--pubwave-text", "#37352f") : "#37352f", Ie = le ? Ze(le, "--pubwave-text-muted", "#9b9a97") : "#9b9a97", ge = le ? Ze(le, "--pubwave-border", "#e3e2e0") : "#e3e2e0", pe = ((F = a.options) == null ? void 0 : F.scales) ?? {}, ze = k(a.type) ? {
|
|
483
483
|
x: {
|
|
484
|
-
...
|
|
485
|
-
ticks: { ...((K =
|
|
486
|
-
grid: { ...((V =
|
|
484
|
+
...pe.x ?? {},
|
|
485
|
+
ticks: { ...((K = pe.x) == null ? void 0 : K.ticks) ?? {}, color: Ie },
|
|
486
|
+
grid: { ...((V = pe.x) == null ? void 0 : V.grid) ?? {}, color: ge },
|
|
487
|
+
title: { ...((z = pe.x) == null ? void 0 : z.title) ?? {}, color: ue }
|
|
487
488
|
},
|
|
488
489
|
y: {
|
|
489
|
-
...
|
|
490
|
-
ticks: { ...((
|
|
491
|
-
grid: { ...((
|
|
490
|
+
...pe.y ?? {},
|
|
491
|
+
ticks: { ...((S = pe.y) == null ? void 0 : S.ticks) ?? {}, color: Ie },
|
|
492
|
+
grid: { ...((O = pe.y) == null ? void 0 : O.grid) ?? {}, color: ge },
|
|
493
|
+
title: { ...((ie = pe.y) == null ? void 0 : ie.title) ?? {}, color: ue }
|
|
492
494
|
}
|
|
493
|
-
} : void 0,
|
|
495
|
+
} : void 0, De = {
|
|
494
496
|
...a.options,
|
|
495
497
|
responsive: !0,
|
|
496
498
|
maintainAspectRatio: !1,
|
|
497
499
|
plugins: {
|
|
498
|
-
...(
|
|
500
|
+
...(se = a.options) == null ? void 0 : se.plugins,
|
|
499
501
|
legend: {
|
|
500
|
-
display: ((
|
|
501
|
-
position: ((
|
|
502
|
-
...(
|
|
502
|
+
display: ((R = (T = (de = a.options) == null ? void 0 : de.plugins) == null ? void 0 : T.legend) == null ? void 0 : R.display) ?? !0,
|
|
503
|
+
position: ((G = (W = (N = a.options) == null ? void 0 : N.plugins) == null ? void 0 : W.legend) == null ? void 0 : G.position) ?? "top",
|
|
504
|
+
...(X = (U = (Z = a.options) == null ? void 0 : Z.plugins) == null ? void 0 : U.legend) != null && X.labels ? {
|
|
503
505
|
labels: {
|
|
504
506
|
...a.options.plugins.legend.labels,
|
|
505
|
-
color:
|
|
507
|
+
color: ue
|
|
506
508
|
}
|
|
507
|
-
} : { labels: { color:
|
|
509
|
+
} : { labels: { color: ue } },
|
|
508
510
|
onHover: () => {
|
|
509
|
-
const
|
|
510
|
-
|
|
511
|
+
const ye = d.current;
|
|
512
|
+
ye && (ye.style.cursor = "pointer");
|
|
511
513
|
},
|
|
512
514
|
onLeave: () => {
|
|
513
|
-
const
|
|
514
|
-
|
|
515
|
+
const ye = d.current;
|
|
516
|
+
ye && (ye.style.cursor = "default");
|
|
515
517
|
}
|
|
516
518
|
},
|
|
517
|
-
title: (
|
|
519
|
+
title: (ee = (q = a.options) == null ? void 0 : q.plugins) != null && ee.title ? {
|
|
518
520
|
...a.options.plugins.title,
|
|
519
|
-
color:
|
|
521
|
+
color: ue,
|
|
520
522
|
...a.options.plugins.title.font ? { font: { ...a.options.plugins.title.font } } : {}
|
|
521
523
|
} : void 0
|
|
522
524
|
},
|
|
523
|
-
scales:
|
|
524
|
-
},
|
|
525
|
+
scales: ze
|
|
526
|
+
}, $e = new he(te, {
|
|
525
527
|
type: a.type,
|
|
526
528
|
data: a.data,
|
|
527
|
-
options:
|
|
529
|
+
options: De
|
|
528
530
|
});
|
|
529
|
-
w(
|
|
530
|
-
} catch (
|
|
531
|
-
console.error("Failed to load Chart.js:",
|
|
531
|
+
w($e);
|
|
532
|
+
} catch (ce) {
|
|
533
|
+
console.error("Failed to load Chart.js:", ce);
|
|
532
534
|
}
|
|
533
535
|
})(), () => {
|
|
534
536
|
p && p.destroy();
|
|
@@ -539,19 +541,19 @@ function ja(e) {
|
|
|
539
541
|
setTimeout(() => {
|
|
540
542
|
A();
|
|
541
543
|
}, 0);
|
|
542
|
-
},
|
|
544
|
+
}, D = new MutationObserver((K) => {
|
|
543
545
|
K.forEach((V) => {
|
|
544
546
|
(V.attributeName === "style" || V.attributeName === "class") && B();
|
|
545
547
|
});
|
|
546
548
|
});
|
|
547
549
|
let F = b.current;
|
|
548
|
-
for (; F && (
|
|
550
|
+
for (; F && (D.observe(F, { attributes: !0 }), !(F.classList.contains("pubwave-editor") || F === document.body)); )
|
|
549
551
|
F = F.parentElement;
|
|
550
|
-
return
|
|
552
|
+
return D.observe(document.body, {
|
|
551
553
|
attributes: !0,
|
|
552
554
|
attributeFilter: ["class"]
|
|
553
555
|
}), () => {
|
|
554
|
-
|
|
556
|
+
D.disconnect();
|
|
555
557
|
};
|
|
556
558
|
}, [p, A]);
|
|
557
559
|
function k(B) {
|
|
@@ -687,7 +689,7 @@ const Ua = rn.create({
|
|
|
687
689
|
* This is used for copy/paste and serialization
|
|
688
690
|
*/
|
|
689
691
|
renderHTML({ HTMLAttributes: e }) {
|
|
690
|
-
return ["div",
|
|
692
|
+
return ["div", vt({ "data-type": "chart" }, e)];
|
|
691
693
|
},
|
|
692
694
|
/**
|
|
693
695
|
* Use React component to render the chart node
|
|
@@ -769,7 +771,7 @@ const Wa = rn.create({
|
|
|
769
771
|
];
|
|
770
772
|
return [
|
|
771
773
|
"div",
|
|
772
|
-
|
|
774
|
+
vt({
|
|
773
775
|
"data-type": "layout",
|
|
774
776
|
"data-layout-columns": String(n),
|
|
775
777
|
class: o.join(" ")
|
|
@@ -811,7 +813,7 @@ const Wa = rn.create({
|
|
|
811
813
|
* this is primarily for HTML serialization/export.
|
|
812
814
|
*/
|
|
813
815
|
renderHTML({ HTMLAttributes: e }) {
|
|
814
|
-
return ["div",
|
|
816
|
+
return ["div", vt({
|
|
815
817
|
"data-type": "layoutColumn",
|
|
816
818
|
class: "pubwave-layout__column"
|
|
817
819
|
}, e), 0];
|
|
@@ -1093,7 +1095,7 @@ const Ka = Zn.create({
|
|
|
1093
1095
|
];
|
|
1094
1096
|
},
|
|
1095
1097
|
renderHTML({ HTMLAttributes: e }) {
|
|
1096
|
-
return ["span",
|
|
1098
|
+
return ["span", vt(this.options.HTMLAttributes, e), 0];
|
|
1097
1099
|
},
|
|
1098
1100
|
addCommands() {
|
|
1099
1101
|
return {
|
|
@@ -1143,7 +1145,7 @@ const Ka = Zn.create({
|
|
|
1143
1145
|
];
|
|
1144
1146
|
},
|
|
1145
1147
|
renderHTML({ HTMLAttributes: e }) {
|
|
1146
|
-
return ["span",
|
|
1148
|
+
return ["span", vt(this.options.HTMLAttributes, e), 0];
|
|
1147
1149
|
},
|
|
1148
1150
|
addCommands() {
|
|
1149
1151
|
return {
|
|
@@ -2152,12 +2154,12 @@ function _i(e, t) {
|
|
|
2152
2154
|
return a || i;
|
|
2153
2155
|
});
|
|
2154
2156
|
}
|
|
2155
|
-
var
|
|
2156
|
-
return e.concat([t + "-" +
|
|
2157
|
-
}, []), co = /* @__PURE__ */ [].concat(
|
|
2158
|
-
return e.concat([t, t + "-" +
|
|
2157
|
+
var me = "top", Ae = "bottom", Be = "right", we = "left", dn = "auto", mt = [me, Ae, Be, we], tt = "start", pt = "end", Ni = "clippingParents", lo = "viewport", it = "popper", Hi = "reference", Tn = /* @__PURE__ */ mt.reduce(function(e, t) {
|
|
2158
|
+
return e.concat([t + "-" + tt, t + "-" + pt]);
|
|
2159
|
+
}, []), co = /* @__PURE__ */ [].concat(mt, [dn]).reduce(function(e, t) {
|
|
2160
|
+
return e.concat([t, t + "-" + tt, t + "-" + pt]);
|
|
2159
2161
|
}, []), zi = "beforeRead", $i = "read", ji = "afterRead", Ui = "beforeMain", qi = "main", Wi = "afterMain", Fi = "beforeWrite", Vi = "write", Gi = "afterWrite", Yi = [zi, $i, ji, Ui, qi, Wi, Fi, Vi, Gi];
|
|
2160
|
-
function
|
|
2162
|
+
function Re(e) {
|
|
2161
2163
|
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
2162
2164
|
}
|
|
2163
2165
|
function xe(e) {
|
|
@@ -2169,7 +2171,7 @@ function xe(e) {
|
|
|
2169
2171
|
}
|
|
2170
2172
|
return e;
|
|
2171
2173
|
}
|
|
2172
|
-
function
|
|
2174
|
+
function Ve(e) {
|
|
2173
2175
|
var t = xe(e).Element;
|
|
2174
2176
|
return e instanceof t || e instanceof Element;
|
|
2175
2177
|
}
|
|
@@ -2187,7 +2189,7 @@ function Xi(e) {
|
|
|
2187
2189
|
var t = e.state;
|
|
2188
2190
|
Object.keys(t.elements).forEach(function(n) {
|
|
2189
2191
|
var o = t.styles[n] || {}, r = t.attributes[n] || {}, a = t.elements[n];
|
|
2190
|
-
!Le(a) || !
|
|
2192
|
+
!Le(a) || !Re(a) || (Object.assign(a.style, o), Object.keys(r).forEach(function(i) {
|
|
2191
2193
|
var s = r[i];
|
|
2192
2194
|
s === !1 ? a.removeAttribute(i) : a.setAttribute(i, s === !0 ? "" : s);
|
|
2193
2195
|
}));
|
|
@@ -2211,7 +2213,7 @@ function Ki(e) {
|
|
|
2211
2213
|
var r = t.elements[o], a = t.attributes[o] || {}, i = Object.keys(t.styles.hasOwnProperty(o) ? t.styles[o] : n[o]), s = i.reduce(function(l, f) {
|
|
2212
2214
|
return l[f] = "", l;
|
|
2213
2215
|
}, {});
|
|
2214
|
-
!Le(r) || !
|
|
2216
|
+
!Le(r) || !Re(r) || (Object.assign(r.style, s), Object.keys(a).forEach(function(l) {
|
|
2215
2217
|
r.removeAttribute(l);
|
|
2216
2218
|
}));
|
|
2217
2219
|
});
|
|
@@ -2225,10 +2227,10 @@ const uo = {
|
|
|
2225
2227
|
effect: Ki,
|
|
2226
2228
|
requires: ["computeStyles"]
|
|
2227
2229
|
};
|
|
2228
|
-
function
|
|
2230
|
+
function Pe(e) {
|
|
2229
2231
|
return e.split("-")[0];
|
|
2230
2232
|
}
|
|
2231
|
-
var
|
|
2233
|
+
var Fe = Math.max, Dt = Math.min, nt = Math.round;
|
|
2232
2234
|
function Jt() {
|
|
2233
2235
|
var e = navigator.userAgentData;
|
|
2234
2236
|
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
|
|
@@ -2238,11 +2240,11 @@ function Jt() {
|
|
|
2238
2240
|
function po() {
|
|
2239
2241
|
return !/^((?!chrome|android).)*safari/i.test(Jt());
|
|
2240
2242
|
}
|
|
2241
|
-
function
|
|
2243
|
+
function ot(e, t, n) {
|
|
2242
2244
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
2243
2245
|
var o = e.getBoundingClientRect(), r = 1, a = 1;
|
|
2244
|
-
t && Le(e) && (r = e.offsetWidth > 0 &&
|
|
2245
|
-
var i =
|
|
2246
|
+
t && Le(e) && (r = e.offsetWidth > 0 && nt(o.width) / e.offsetWidth || 1, a = e.offsetHeight > 0 && nt(o.height) / e.offsetHeight || 1);
|
|
2247
|
+
var i = Ve(e) ? xe(e) : window, s = i.visualViewport, l = !po() && n, f = (o.left + (l && s ? s.offsetLeft : 0)) / r, p = (o.top + (l && s ? s.offsetTop : 0)) / a, w = o.width / r, d = o.height / a;
|
|
2246
2248
|
return {
|
|
2247
2249
|
width: w,
|
|
2248
2250
|
height: d,
|
|
@@ -2255,7 +2257,7 @@ function tt(e, t, n) {
|
|
|
2255
2257
|
};
|
|
2256
2258
|
}
|
|
2257
2259
|
function fn(e) {
|
|
2258
|
-
var t =
|
|
2260
|
+
var t = ot(e), n = e.offsetWidth, o = e.offsetHeight;
|
|
2259
2261
|
return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - o) <= 1 && (o = t.height), {
|
|
2260
2262
|
x: e.offsetLeft,
|
|
2261
2263
|
y: e.offsetTop,
|
|
@@ -2277,20 +2279,20 @@ function fo(e, t) {
|
|
|
2277
2279
|
}
|
|
2278
2280
|
return !1;
|
|
2279
2281
|
}
|
|
2280
|
-
function
|
|
2282
|
+
function Ee(e) {
|
|
2281
2283
|
return xe(e).getComputedStyle(e);
|
|
2282
2284
|
}
|
|
2283
2285
|
function Ji(e) {
|
|
2284
|
-
return ["table", "td", "th"].indexOf(
|
|
2286
|
+
return ["table", "td", "th"].indexOf(Re(e)) >= 0;
|
|
2285
2287
|
}
|
|
2286
|
-
function
|
|
2287
|
-
return ((
|
|
2288
|
+
function Ne(e) {
|
|
2289
|
+
return ((Ve(e) ? e.ownerDocument : (
|
|
2288
2290
|
// $FlowFixMe[prop-missing]
|
|
2289
2291
|
e.document
|
|
2290
2292
|
)) || window.document).documentElement;
|
|
2291
2293
|
}
|
|
2292
2294
|
function Ht(e) {
|
|
2293
|
-
return
|
|
2295
|
+
return Re(e) === "html" ? e : (
|
|
2294
2296
|
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
2295
2297
|
// $FlowFixMe[incompatible-return]
|
|
2296
2298
|
// $FlowFixMe[prop-missing]
|
|
@@ -2298,42 +2300,42 @@ function Ht(e) {
|
|
|
2298
2300
|
e.parentNode || // DOM Element detected
|
|
2299
2301
|
(pn(e) ? e.host : null) || // ShadowRoot detected
|
|
2300
2302
|
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
2301
|
-
|
|
2303
|
+
Ne(e)
|
|
2302
2304
|
);
|
|
2303
2305
|
}
|
|
2304
2306
|
function Ln(e) {
|
|
2305
2307
|
return !Le(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
2306
|
-
|
|
2308
|
+
Ee(e).position === "fixed" ? null : e.offsetParent;
|
|
2307
2309
|
}
|
|
2308
2310
|
function Zi(e) {
|
|
2309
2311
|
var t = /firefox/i.test(Jt()), n = /Trident/i.test(Jt());
|
|
2310
2312
|
if (n && Le(e)) {
|
|
2311
|
-
var o =
|
|
2313
|
+
var o = Ee(e);
|
|
2312
2314
|
if (o.position === "fixed")
|
|
2313
2315
|
return null;
|
|
2314
2316
|
}
|
|
2315
2317
|
var r = Ht(e);
|
|
2316
|
-
for (pn(r) && (r = r.host); Le(r) && ["html", "body"].indexOf(
|
|
2317
|
-
var a =
|
|
2318
|
+
for (pn(r) && (r = r.host); Le(r) && ["html", "body"].indexOf(Re(r)) < 0; ) {
|
|
2319
|
+
var a = Ee(r);
|
|
2318
2320
|
if (a.transform !== "none" || a.perspective !== "none" || a.contain === "paint" || ["transform", "perspective"].indexOf(a.willChange) !== -1 || t && a.willChange === "filter" || t && a.filter && a.filter !== "none")
|
|
2319
2321
|
return r;
|
|
2320
2322
|
r = r.parentNode;
|
|
2321
2323
|
}
|
|
2322
2324
|
return null;
|
|
2323
2325
|
}
|
|
2324
|
-
function
|
|
2325
|
-
for (var t = xe(e), n = Ln(e); n && Ji(n) &&
|
|
2326
|
+
function wt(e) {
|
|
2327
|
+
for (var t = xe(e), n = Ln(e); n && Ji(n) && Ee(n).position === "static"; )
|
|
2326
2328
|
n = Ln(n);
|
|
2327
|
-
return n && (
|
|
2329
|
+
return n && (Re(n) === "html" || Re(n) === "body" && Ee(n).position === "static") ? t : n || Zi(e) || t;
|
|
2328
2330
|
}
|
|
2329
2331
|
function hn(e) {
|
|
2330
2332
|
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
2331
2333
|
}
|
|
2332
|
-
function
|
|
2333
|
-
return
|
|
2334
|
+
function ct(e, t, n) {
|
|
2335
|
+
return Fe(e, Dt(t, n));
|
|
2334
2336
|
}
|
|
2335
2337
|
function Qi(e, t, n) {
|
|
2336
|
-
var o =
|
|
2338
|
+
var o = ct(e, t, n);
|
|
2337
2339
|
return o > n ? n : o;
|
|
2338
2340
|
}
|
|
2339
2341
|
function ho() {
|
|
@@ -2355,12 +2357,12 @@ function go(e, t) {
|
|
|
2355
2357
|
var es = function(t, n) {
|
|
2356
2358
|
return t = typeof t == "function" ? t(Object.assign({}, n.rects, {
|
|
2357
2359
|
placement: n.placement
|
|
2358
|
-
})) : t, bo(typeof t != "number" ? t : go(t,
|
|
2360
|
+
})) : t, bo(typeof t != "number" ? t : go(t, mt));
|
|
2359
2361
|
};
|
|
2360
2362
|
function ts(e) {
|
|
2361
|
-
var t, n = e.state, o = e.name, r = e.options, a = n.elements.arrow, i = n.modifiersData.popperOffsets, s =
|
|
2363
|
+
var t, n = e.state, o = e.name, r = e.options, a = n.elements.arrow, i = n.modifiersData.popperOffsets, s = Pe(n.placement), l = hn(s), f = [we, Be].indexOf(s) >= 0, p = f ? "height" : "width";
|
|
2362
2364
|
if (!(!a || !i)) {
|
|
2363
|
-
var w = es(r.padding, n), d = fn(a), b = l === "y" ?
|
|
2365
|
+
var w = es(r.padding, n), d = fn(a), b = l === "y" ? me : we, h = l === "y" ? Ae : Be, g = n.rects.reference[p] + n.rects.reference[l] - i[l] - n.rects.popper[p], x = i[l] - n.rects.reference[l], m = wt(a), A = m ? l === "y" ? m.clientHeight || 0 : m.clientWidth || 0 : 0, k = g / 2 - x / 2, u = w[b], C = A - d[p] - w[h], L = A / 2 - d[p] / 2 + k, E = ct(u, L, C), _ = l;
|
|
2364
2366
|
n.modifiersData[o] = (t = {}, t[_] = E, t.centerOffset = E - L, t);
|
|
2365
2367
|
}
|
|
2366
2368
|
}
|
|
@@ -2377,7 +2379,7 @@ const os = {
|
|
|
2377
2379
|
requires: ["popperOffsets"],
|
|
2378
2380
|
requiresIfExists: ["preventOverflow"]
|
|
2379
2381
|
};
|
|
2380
|
-
function
|
|
2382
|
+
function rt(e) {
|
|
2381
2383
|
return e.split("-")[1];
|
|
2382
2384
|
}
|
|
2383
2385
|
var rs = {
|
|
@@ -2389,8 +2391,8 @@ var rs = {
|
|
|
2389
2391
|
function as(e, t) {
|
|
2390
2392
|
var n = e.x, o = e.y, r = t.devicePixelRatio || 1;
|
|
2391
2393
|
return {
|
|
2392
|
-
x:
|
|
2393
|
-
y:
|
|
2394
|
+
x: nt(n * r) / r || 0,
|
|
2395
|
+
y: nt(o * r) / r || 0
|
|
2394
2396
|
};
|
|
2395
2397
|
}
|
|
2396
2398
|
function An(e) {
|
|
@@ -2402,10 +2404,10 @@ function An(e) {
|
|
|
2402
2404
|
y: g
|
|
2403
2405
|
};
|
|
2404
2406
|
b = x.x, g = x.y;
|
|
2405
|
-
var m = i.hasOwnProperty("x"), A = i.hasOwnProperty("y"), k =
|
|
2407
|
+
var m = i.hasOwnProperty("x"), A = i.hasOwnProperty("y"), k = we, u = me, C = window;
|
|
2406
2408
|
if (f) {
|
|
2407
|
-
var L =
|
|
2408
|
-
if (L === xe(n) && (L =
|
|
2409
|
+
var L = wt(n), E = "clientHeight", _ = "clientWidth";
|
|
2410
|
+
if (L === xe(n) && (L = Ne(n), Ee(L).position !== "static" && s === "absolute" && (E = "scrollHeight", _ = "scrollWidth")), L = L, r === me || (r === we || r === Be) && a === pt) {
|
|
2409
2411
|
u = Ae;
|
|
2410
2412
|
var Y = w && L === C && C.visualViewport ? C.visualViewport.height : (
|
|
2411
2413
|
// $FlowFixMe[prop-missing]
|
|
@@ -2413,7 +2415,7 @@ function An(e) {
|
|
|
2413
2415
|
);
|
|
2414
2416
|
g -= Y - o.height, g *= l ? 1 : -1;
|
|
2415
2417
|
}
|
|
2416
|
-
if (r ===
|
|
2418
|
+
if (r === we || (r === me || r === Ae) && a === pt) {
|
|
2417
2419
|
k = Be;
|
|
2418
2420
|
var M = w && L === C && C.visualViewport ? C.visualViewport.width : (
|
|
2419
2421
|
// $FlowFixMe[prop-missing]
|
|
@@ -2439,8 +2441,8 @@ function An(e) {
|
|
|
2439
2441
|
}
|
|
2440
2442
|
function is(e) {
|
|
2441
2443
|
var t = e.state, n = e.options, o = n.gpuAcceleration, r = o === void 0 ? !0 : o, a = n.adaptive, i = a === void 0 ? !0 : a, s = n.roundOffsets, l = s === void 0 ? !0 : s, f = {
|
|
2442
|
-
placement:
|
|
2443
|
-
variation:
|
|
2444
|
+
placement: Pe(t.placement),
|
|
2445
|
+
variation: rt(t.placement),
|
|
2444
2446
|
popper: t.elements.popper,
|
|
2445
2447
|
popperRect: t.rects.popper,
|
|
2446
2448
|
gpuAcceleration: r,
|
|
@@ -2517,10 +2519,10 @@ function bn(e) {
|
|
|
2517
2519
|
};
|
|
2518
2520
|
}
|
|
2519
2521
|
function gn(e) {
|
|
2520
|
-
return
|
|
2522
|
+
return ot(Ne(e)).left + bn(e).scrollLeft;
|
|
2521
2523
|
}
|
|
2522
2524
|
function ps(e, t) {
|
|
2523
|
-
var n = xe(e), o =
|
|
2525
|
+
var n = xe(e), o = Ne(e), r = n.visualViewport, a = o.clientWidth, i = o.clientHeight, s = 0, l = 0;
|
|
2524
2526
|
if (r) {
|
|
2525
2527
|
a = r.width, i = r.height;
|
|
2526
2528
|
var f = po();
|
|
@@ -2534,8 +2536,8 @@ function ps(e, t) {
|
|
|
2534
2536
|
};
|
|
2535
2537
|
}
|
|
2536
2538
|
function fs(e) {
|
|
2537
|
-
var t, n =
|
|
2538
|
-
return
|
|
2539
|
+
var t, n = Ne(e), o = bn(e), r = (t = e.ownerDocument) == null ? void 0 : t.body, a = Fe(n.scrollWidth, n.clientWidth, r ? r.scrollWidth : 0, r ? r.clientWidth : 0), i = Fe(n.scrollHeight, n.clientHeight, r ? r.scrollHeight : 0, r ? r.clientHeight : 0), s = -o.scrollLeft + gn(e), l = -o.scrollTop;
|
|
2540
|
+
return Ee(r || n).direction === "rtl" && (s += Fe(n.clientWidth, r ? r.clientWidth : 0) - a), {
|
|
2539
2541
|
width: a,
|
|
2540
2542
|
height: i,
|
|
2541
2543
|
x: s,
|
|
@@ -2543,19 +2545,19 @@ function fs(e) {
|
|
|
2543
2545
|
};
|
|
2544
2546
|
}
|
|
2545
2547
|
function vn(e) {
|
|
2546
|
-
var t =
|
|
2548
|
+
var t = Ee(e), n = t.overflow, o = t.overflowX, r = t.overflowY;
|
|
2547
2549
|
return /auto|scroll|overlay|hidden/.test(n + r + o);
|
|
2548
2550
|
}
|
|
2549
2551
|
function vo(e) {
|
|
2550
|
-
return ["html", "body", "#document"].indexOf(
|
|
2552
|
+
return ["html", "body", "#document"].indexOf(Re(e)) >= 0 ? e.ownerDocument.body : Le(e) && vn(e) ? e : vo(Ht(e));
|
|
2551
2553
|
}
|
|
2552
|
-
function
|
|
2554
|
+
function ut(e, t) {
|
|
2553
2555
|
var n;
|
|
2554
2556
|
t === void 0 && (t = []);
|
|
2555
2557
|
var o = vo(e), r = o === ((n = e.ownerDocument) == null ? void 0 : n.body), a = xe(o), i = r ? [a].concat(a.visualViewport || [], vn(o) ? o : []) : o, s = t.concat(i);
|
|
2556
2558
|
return r ? s : (
|
|
2557
2559
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
2558
|
-
s.concat(
|
|
2560
|
+
s.concat(ut(Ht(i)))
|
|
2559
2561
|
);
|
|
2560
2562
|
}
|
|
2561
2563
|
function Zt(e) {
|
|
@@ -2567,29 +2569,29 @@ function Zt(e) {
|
|
|
2567
2569
|
});
|
|
2568
2570
|
}
|
|
2569
2571
|
function hs(e, t) {
|
|
2570
|
-
var n =
|
|
2572
|
+
var n = ot(e, !1, t === "fixed");
|
|
2571
2573
|
return n.top = n.top + e.clientTop, n.left = n.left + e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n;
|
|
2572
2574
|
}
|
|
2573
2575
|
function Mn(e, t, n) {
|
|
2574
|
-
return t === lo ? Zt(ps(e, n)) :
|
|
2576
|
+
return t === lo ? Zt(ps(e, n)) : Ve(t) ? hs(t, n) : Zt(fs(Ne(e)));
|
|
2575
2577
|
}
|
|
2576
2578
|
function bs(e) {
|
|
2577
|
-
var t =
|
|
2578
|
-
return
|
|
2579
|
-
return
|
|
2579
|
+
var t = ut(Ht(e)), n = ["absolute", "fixed"].indexOf(Ee(e).position) >= 0, o = n && Le(e) ? wt(e) : e;
|
|
2580
|
+
return Ve(o) ? t.filter(function(r) {
|
|
2581
|
+
return Ve(r) && fo(r, o) && Re(r) !== "body";
|
|
2580
2582
|
}) : [];
|
|
2581
2583
|
}
|
|
2582
2584
|
function gs(e, t, n, o) {
|
|
2583
2585
|
var r = t === "clippingParents" ? bs(e) : [].concat(t), a = [].concat(r, [n]), i = a[0], s = a.reduce(function(l, f) {
|
|
2584
2586
|
var p = Mn(e, f, o);
|
|
2585
|
-
return l.top =
|
|
2587
|
+
return l.top = Fe(p.top, l.top), l.right = Dt(p.right, l.right), l.bottom = Dt(p.bottom, l.bottom), l.left = Fe(p.left, l.left), l;
|
|
2586
2588
|
}, Mn(e, i, o));
|
|
2587
2589
|
return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
|
|
2588
2590
|
}
|
|
2589
2591
|
function mo(e) {
|
|
2590
|
-
var t = e.reference, n = e.element, o = e.placement, r = o ?
|
|
2592
|
+
var t = e.reference, n = e.element, o = e.placement, r = o ? Pe(o) : null, a = o ? rt(o) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l;
|
|
2591
2593
|
switch (r) {
|
|
2592
|
-
case
|
|
2594
|
+
case me:
|
|
2593
2595
|
l = {
|
|
2594
2596
|
x: i,
|
|
2595
2597
|
y: t.y - n.height
|
|
@@ -2607,7 +2609,7 @@ function mo(e) {
|
|
|
2607
2609
|
y: s
|
|
2608
2610
|
};
|
|
2609
2611
|
break;
|
|
2610
|
-
case
|
|
2612
|
+
case we:
|
|
2611
2613
|
l = {
|
|
2612
2614
|
x: t.x - n.width,
|
|
2613
2615
|
y: s
|
|
@@ -2623,59 +2625,59 @@ function mo(e) {
|
|
|
2623
2625
|
if (f != null) {
|
|
2624
2626
|
var p = f === "y" ? "height" : "width";
|
|
2625
2627
|
switch (a) {
|
|
2626
|
-
case
|
|
2628
|
+
case tt:
|
|
2627
2629
|
l[f] = l[f] - (t[p] / 2 - n[p] / 2);
|
|
2628
2630
|
break;
|
|
2629
|
-
case
|
|
2631
|
+
case pt:
|
|
2630
2632
|
l[f] = l[f] + (t[p] / 2 - n[p] / 2);
|
|
2631
2633
|
break;
|
|
2632
2634
|
}
|
|
2633
2635
|
}
|
|
2634
2636
|
return l;
|
|
2635
2637
|
}
|
|
2636
|
-
function
|
|
2638
|
+
function ft(e, t) {
|
|
2637
2639
|
t === void 0 && (t = {});
|
|
2638
|
-
var n = t, o = n.placement, r = o === void 0 ? e.placement : o, a = n.strategy, i = a === void 0 ? e.strategy : a, s = n.boundary, l = s === void 0 ? Ni : s, f = n.rootBoundary, p = f === void 0 ? lo : f, w = n.elementContext, d = w === void 0 ?
|
|
2640
|
+
var n = t, o = n.placement, r = o === void 0 ? e.placement : o, a = n.strategy, i = a === void 0 ? e.strategy : a, s = n.boundary, l = s === void 0 ? Ni : s, f = n.rootBoundary, p = f === void 0 ? lo : f, w = n.elementContext, d = w === void 0 ? it : w, b = n.altBoundary, h = b === void 0 ? !1 : b, g = n.padding, x = g === void 0 ? 0 : g, m = bo(typeof x != "number" ? x : go(x, mt)), A = d === it ? Hi : it, k = e.rects.popper, u = e.elements[h ? A : d], C = gs(Ve(u) ? u : u.contextElement || Ne(e.elements.popper), l, p, i), L = ot(e.elements.reference), E = mo({
|
|
2639
2641
|
reference: L,
|
|
2640
2642
|
element: k,
|
|
2641
2643
|
placement: r
|
|
2642
|
-
}), _ = Zt(Object.assign({}, k, E)), Y = d ===
|
|
2644
|
+
}), _ = Zt(Object.assign({}, k, E)), Y = d === it ? _ : L, M = {
|
|
2643
2645
|
top: C.top - Y.top + m.top,
|
|
2644
2646
|
bottom: Y.bottom - C.bottom + m.bottom,
|
|
2645
2647
|
left: C.left - Y.left + m.left,
|
|
2646
2648
|
right: Y.right - C.right + m.right
|
|
2647
2649
|
}, J = e.modifiersData.offset;
|
|
2648
|
-
if (d ===
|
|
2650
|
+
if (d === it && J) {
|
|
2649
2651
|
var v = J[r];
|
|
2650
2652
|
Object.keys(M).forEach(function(B) {
|
|
2651
|
-
var
|
|
2652
|
-
M[B] += v[F] *
|
|
2653
|
+
var D = [Be, Ae].indexOf(B) >= 0 ? 1 : -1, F = [me, Ae].indexOf(B) >= 0 ? "y" : "x";
|
|
2654
|
+
M[B] += v[F] * D;
|
|
2653
2655
|
});
|
|
2654
2656
|
}
|
|
2655
2657
|
return M;
|
|
2656
2658
|
}
|
|
2657
2659
|
function vs(e, t) {
|
|
2658
2660
|
t === void 0 && (t = {});
|
|
2659
|
-
var n = t, o = n.placement, r = n.boundary, a = n.rootBoundary, i = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, f = l === void 0 ? co : l, p =
|
|
2660
|
-
return
|
|
2661
|
-
}) :
|
|
2661
|
+
var n = t, o = n.placement, r = n.boundary, a = n.rootBoundary, i = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, f = l === void 0 ? co : l, p = rt(o), w = p ? s ? Tn : Tn.filter(function(h) {
|
|
2662
|
+
return rt(h) === p;
|
|
2663
|
+
}) : mt, d = w.filter(function(h) {
|
|
2662
2664
|
return f.indexOf(h) >= 0;
|
|
2663
2665
|
});
|
|
2664
2666
|
d.length === 0 && (d = w);
|
|
2665
2667
|
var b = d.reduce(function(h, g) {
|
|
2666
|
-
return h[g] =
|
|
2668
|
+
return h[g] = ft(e, {
|
|
2667
2669
|
placement: g,
|
|
2668
2670
|
boundary: r,
|
|
2669
2671
|
rootBoundary: a,
|
|
2670
2672
|
padding: i
|
|
2671
|
-
})[
|
|
2673
|
+
})[Pe(g)], h;
|
|
2672
2674
|
}, {});
|
|
2673
2675
|
return Object.keys(b).sort(function(h, g) {
|
|
2674
2676
|
return b[h] - b[g];
|
|
2675
2677
|
});
|
|
2676
2678
|
}
|
|
2677
2679
|
function ms(e) {
|
|
2678
|
-
if (
|
|
2680
|
+
if (Pe(e) === dn)
|
|
2679
2681
|
return [];
|
|
2680
2682
|
var t = Pt(e);
|
|
2681
2683
|
return [Bn(e), t, Bn(t)];
|
|
@@ -2683,8 +2685,8 @@ function ms(e) {
|
|
|
2683
2685
|
function ws(e) {
|
|
2684
2686
|
var t = e.state, n = e.options, o = e.name;
|
|
2685
2687
|
if (!t.modifiersData[o]._skip) {
|
|
2686
|
-
for (var r = n.mainAxis, a = r === void 0 ? !0 : r, i = n.altAxis, s = i === void 0 ? !0 : i, l = n.fallbackPlacements, f = n.padding, p = n.boundary, w = n.rootBoundary, d = n.altBoundary, b = n.flipVariations, h = b === void 0 ? !0 : b, g = n.allowedAutoPlacements, x = t.options.placement, m =
|
|
2687
|
-
return T.concat(
|
|
2688
|
+
for (var r = n.mainAxis, a = r === void 0 ? !0 : r, i = n.altAxis, s = i === void 0 ? !0 : i, l = n.fallbackPlacements, f = n.padding, p = n.boundary, w = n.rootBoundary, d = n.altBoundary, b = n.flipVariations, h = b === void 0 ? !0 : b, g = n.allowedAutoPlacements, x = t.options.placement, m = Pe(x), A = m === x, k = l || (A || !h ? [Pt(x)] : ms(x)), u = [x].concat(k).reduce(function(T, R) {
|
|
2689
|
+
return T.concat(Pe(R) === dn ? vs(t, {
|
|
2688
2690
|
placement: R,
|
|
2689
2691
|
boundary: p,
|
|
2690
2692
|
rootBoundary: w,
|
|
@@ -2693,16 +2695,16 @@ function ws(e) {
|
|
|
2693
2695
|
allowedAutoPlacements: g
|
|
2694
2696
|
}) : R);
|
|
2695
2697
|
}, []), C = t.rects.reference, L = t.rects.popper, E = /* @__PURE__ */ new Map(), _ = !0, Y = u[0], M = 0; M < u.length; M++) {
|
|
2696
|
-
var J = u[M], v =
|
|
2698
|
+
var J = u[M], v = Pe(J), B = rt(J) === tt, D = [me, Ae].indexOf(v) >= 0, F = D ? "width" : "height", K = ft(t, {
|
|
2697
2699
|
placement: J,
|
|
2698
2700
|
boundary: p,
|
|
2699
2701
|
rootBoundary: w,
|
|
2700
2702
|
altBoundary: d,
|
|
2701
2703
|
padding: f
|
|
2702
|
-
}), V =
|
|
2704
|
+
}), V = D ? B ? Be : we : B ? Ae : me;
|
|
2703
2705
|
C[F] > L[F] && (V = Pt(V));
|
|
2704
|
-
var
|
|
2705
|
-
if (a && S.push(K[v] <= 0), s && S.push(K[V] <= 0, K[
|
|
2706
|
+
var z = Pt(V), S = [];
|
|
2707
|
+
if (a && S.push(K[v] <= 0), s && S.push(K[V] <= 0, K[z] <= 0), S.every(function(T) {
|
|
2706
2708
|
return T;
|
|
2707
2709
|
})) {
|
|
2708
2710
|
Y = J, _ = !1;
|
|
@@ -2711,7 +2713,7 @@ function ws(e) {
|
|
|
2711
2713
|
E.set(J, S);
|
|
2712
2714
|
}
|
|
2713
2715
|
if (_)
|
|
2714
|
-
for (var
|
|
2716
|
+
for (var O = h ? 3 : 1, ie = function(R) {
|
|
2715
2717
|
var N = u.find(function(W) {
|
|
2716
2718
|
var G = E.get(W);
|
|
2717
2719
|
if (G)
|
|
@@ -2721,7 +2723,7 @@ function ws(e) {
|
|
|
2721
2723
|
});
|
|
2722
2724
|
if (N)
|
|
2723
2725
|
return Y = N, "break";
|
|
2724
|
-
}, se =
|
|
2726
|
+
}, se = O; se > 0; se--) {
|
|
2725
2727
|
var de = ie(se);
|
|
2726
2728
|
if (de === "break") break;
|
|
2727
2729
|
}
|
|
@@ -2750,14 +2752,14 @@ function Pn(e, t, n) {
|
|
|
2750
2752
|
};
|
|
2751
2753
|
}
|
|
2752
2754
|
function Rn(e) {
|
|
2753
|
-
return [
|
|
2755
|
+
return [me, Be, Ae, we].some(function(t) {
|
|
2754
2756
|
return e[t] >= 0;
|
|
2755
2757
|
});
|
|
2756
2758
|
}
|
|
2757
2759
|
function ks(e) {
|
|
2758
|
-
var t = e.state, n = e.name, o = t.rects.reference, r = t.rects.popper, a = t.modifiersData.preventOverflow, i =
|
|
2760
|
+
var t = e.state, n = e.name, o = t.rects.reference, r = t.rects.popper, a = t.modifiersData.preventOverflow, i = ft(t, {
|
|
2759
2761
|
elementContext: "reference"
|
|
2760
|
-
}), s =
|
|
2762
|
+
}), s = ft(t, {
|
|
2761
2763
|
altBoundary: !0
|
|
2762
2764
|
}), l = Pn(i, o), f = Pn(s, r, a), p = Rn(l), w = Rn(f);
|
|
2763
2765
|
t.modifiersData[n] = {
|
|
@@ -2778,10 +2780,10 @@ const xs = {
|
|
|
2778
2780
|
fn: ks
|
|
2779
2781
|
};
|
|
2780
2782
|
function Cs(e, t, n) {
|
|
2781
|
-
var o =
|
|
2783
|
+
var o = Pe(e), r = [we, me].indexOf(o) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, {
|
|
2782
2784
|
placement: e
|
|
2783
2785
|
})) : n, i = a[0], s = a[1];
|
|
2784
|
-
return i = i || 0, s = (s || 0) * r, [
|
|
2786
|
+
return i = i || 0, s = (s || 0) * r, [we, Be].indexOf(o) >= 0 ? {
|
|
2785
2787
|
x: s,
|
|
2786
2788
|
y: i
|
|
2787
2789
|
} : {
|
|
@@ -2821,12 +2823,12 @@ function Ms(e) {
|
|
|
2821
2823
|
return e === "x" ? "y" : "x";
|
|
2822
2824
|
}
|
|
2823
2825
|
function Ps(e) {
|
|
2824
|
-
var t = e.state, n = e.options, o = e.name, r = n.mainAxis, a = r === void 0 ? !0 : r, i = n.altAxis, s = i === void 0 ? !1 : i, l = n.boundary, f = n.rootBoundary, p = n.altBoundary, w = n.padding, d = n.tether, b = d === void 0 ? !0 : d, h = n.tetherOffset, g = h === void 0 ? 0 : h, x =
|
|
2826
|
+
var t = e.state, n = e.options, o = e.name, r = n.mainAxis, a = r === void 0 ? !0 : r, i = n.altAxis, s = i === void 0 ? !1 : i, l = n.boundary, f = n.rootBoundary, p = n.altBoundary, w = n.padding, d = n.tether, b = d === void 0 ? !0 : d, h = n.tetherOffset, g = h === void 0 ? 0 : h, x = ft(t, {
|
|
2825
2827
|
boundary: l,
|
|
2826
2828
|
rootBoundary: f,
|
|
2827
2829
|
padding: w,
|
|
2828
2830
|
altBoundary: p
|
|
2829
|
-
}), m =
|
|
2831
|
+
}), m = Pe(t.placement), A = rt(t.placement), k = !A, u = hn(m), C = Ms(u), L = t.modifiersData.popperOffsets, E = t.rects.reference, _ = t.rects.popper, Y = typeof g == "function" ? g(Object.assign({}, t.rects, {
|
|
2830
2832
|
placement: t.placement
|
|
2831
2833
|
})) : g, M = typeof Y == "number" ? {
|
|
2832
2834
|
mainAxis: Y,
|
|
@@ -2840,15 +2842,15 @@ function Ps(e) {
|
|
|
2840
2842
|
};
|
|
2841
2843
|
if (L) {
|
|
2842
2844
|
if (a) {
|
|
2843
|
-
var B,
|
|
2845
|
+
var B, D = u === "y" ? me : we, F = u === "y" ? Ae : Be, K = u === "y" ? "height" : "width", V = L[u], z = V + x[D], S = V - x[F], O = b ? -_[K] / 2 : 0, ie = A === tt ? E[K] : _[K], se = A === tt ? -_[K] : -E[K], de = t.elements.arrow, T = b && de ? fn(de) : {
|
|
2844
2846
|
width: 0,
|
|
2845
2847
|
height: 0
|
|
2846
|
-
}, R = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ho(), N = R[
|
|
2848
|
+
}, R = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ho(), N = R[D], W = R[F], G = ct(0, E[K], T[K]), Z = k ? E[K] / 2 - O - G - N - M.mainAxis : ie - G - N - M.mainAxis, U = k ? -E[K] / 2 + O + G + W + M.mainAxis : se + G + W + M.mainAxis, X = t.elements.arrow && wt(t.elements.arrow), q = X ? u === "y" ? X.clientTop || 0 : X.clientLeft || 0 : 0, ee = (B = J == null ? void 0 : J[u]) != null ? B : 0, ce = V + Z - ee - q, he = V + U - ee, te = ct(b ? Dt(z, ce) : z, V, b ? Fe(S, he) : S);
|
|
2847
2849
|
L[u] = te, v[u] = te - V;
|
|
2848
2850
|
}
|
|
2849
2851
|
if (s) {
|
|
2850
|
-
var
|
|
2851
|
-
L[C] = xt, v[C] = xt -
|
|
2852
|
+
var le, ue = u === "x" ? me : we, Ie = u === "x" ? Ae : Be, ge = L[C], pe = C === "y" ? "height" : "width", ze = ge + x[ue], De = ge - x[Ie], $e = [me, we].indexOf(m) !== -1, ye = (le = J == null ? void 0 : J[C]) != null ? le : 0, yt = $e ? ze : ge - E[pe] - _[pe] - ye + M.altAxis, kt = $e ? ge + E[pe] + _[pe] - ye - M.altAxis : De, xt = b && $e ? Qi(yt, ge, kt) : ct(b ? yt : ze, ge, b ? kt : De);
|
|
2853
|
+
L[C] = xt, v[C] = xt - ge;
|
|
2852
2854
|
}
|
|
2853
2855
|
t.modifiersData[o] = v;
|
|
2854
2856
|
}
|
|
@@ -2870,20 +2872,20 @@ function Is(e) {
|
|
|
2870
2872
|
return e === xe(e) || !Le(e) ? bn(e) : Ss(e);
|
|
2871
2873
|
}
|
|
2872
2874
|
function Ds(e) {
|
|
2873
|
-
var t = e.getBoundingClientRect(), n =
|
|
2875
|
+
var t = e.getBoundingClientRect(), n = nt(t.width) / e.offsetWidth || 1, o = nt(t.height) / e.offsetHeight || 1;
|
|
2874
2876
|
return n !== 1 || o !== 1;
|
|
2875
2877
|
}
|
|
2876
2878
|
function Os(e, t, n) {
|
|
2877
2879
|
n === void 0 && (n = !1);
|
|
2878
|
-
var o = Le(t), r = Le(t) && Ds(t), a =
|
|
2880
|
+
var o = Le(t), r = Le(t) && Ds(t), a = Ne(t), i = ot(e, r, n), s = {
|
|
2879
2881
|
scrollLeft: 0,
|
|
2880
2882
|
scrollTop: 0
|
|
2881
2883
|
}, l = {
|
|
2882
2884
|
x: 0,
|
|
2883
2885
|
y: 0
|
|
2884
2886
|
};
|
|
2885
|
-
return (o || !o && !n) && ((
|
|
2886
|
-
vn(a)) && (s = Is(t)), Le(t) ? (l =
|
|
2887
|
+
return (o || !o && !n) && ((Re(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
2888
|
+
vn(a)) && (s = Is(t)), Le(t) ? (l = ot(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : a && (l.x = gn(a))), {
|
|
2887
2889
|
x: i.left + s.scrollLeft - l.x,
|
|
2888
2890
|
y: i.top + s.scrollTop - l.y,
|
|
2889
2891
|
width: i.width,
|
|
@@ -2972,8 +2974,8 @@ function zs(e) {
|
|
|
2972
2974
|
setOptions: function(m) {
|
|
2973
2975
|
var A = typeof m == "function" ? m(p.options) : m;
|
|
2974
2976
|
g(), p.options = Object.assign({}, a, p.options, A), p.scrollParents = {
|
|
2975
|
-
reference:
|
|
2976
|
-
popper:
|
|
2977
|
+
reference: Ve(s) ? ut(s) : s.contextElement ? ut(s.contextElement) : [],
|
|
2978
|
+
popper: ut(l)
|
|
2977
2979
|
};
|
|
2978
2980
|
var k = _s(Hs([].concat(o, p.options.modifiers)));
|
|
2979
2981
|
return p.orderedModifiers = k.filter(function(u) {
|
|
@@ -2990,7 +2992,7 @@ function zs(e) {
|
|
|
2990
2992
|
var m = p.elements, A = m.reference, k = m.popper;
|
|
2991
2993
|
if (In(A, k)) {
|
|
2992
2994
|
p.rects = {
|
|
2993
|
-
reference: Os(A,
|
|
2995
|
+
reference: Os(A, wt(k), p.options.strategy === "fixed"),
|
|
2994
2996
|
popper: fn(k)
|
|
2995
2997
|
}, p.reset = !1, p.placement = p.options.placement, p.orderedModifiers.forEach(function(M) {
|
|
2996
2998
|
return p.modifiersData[M.name] = Object.assign({}, M.data);
|
|
@@ -3052,7 +3054,7 @@ function zs(e) {
|
|
|
3052
3054
|
}
|
|
3053
3055
|
var $s = [cs, Bs, ss, uo, Ls, ys, Rs, os, xs], js = /* @__PURE__ */ zs({
|
|
3054
3056
|
defaultModifiers: $s
|
|
3055
|
-
}), Us = "tippy-box", wo = "tippy-content", qs = "tippy-backdrop", yo = "tippy-arrow", ko = "tippy-svg-arrow",
|
|
3057
|
+
}), Us = "tippy-box", wo = "tippy-content", qs = "tippy-backdrop", yo = "tippy-arrow", ko = "tippy-svg-arrow", qe = {
|
|
3056
3058
|
passive: !0,
|
|
3057
3059
|
capture: !0
|
|
3058
3060
|
}, xo = function() {
|
|
@@ -3094,7 +3096,7 @@ function Fs(e, t) {
|
|
|
3094
3096
|
function Vs(e) {
|
|
3095
3097
|
return e.split(/\s+/).filter(Boolean);
|
|
3096
3098
|
}
|
|
3097
|
-
function
|
|
3099
|
+
function et(e) {
|
|
3098
3100
|
return [].concat(e);
|
|
3099
3101
|
}
|
|
3100
3102
|
function On(e, t) {
|
|
@@ -3116,10 +3118,10 @@ function En(e) {
|
|
|
3116
3118
|
return e[n] !== void 0 && (t[n] = e[n]), t;
|
|
3117
3119
|
}, {});
|
|
3118
3120
|
}
|
|
3119
|
-
function
|
|
3121
|
+
function dt() {
|
|
3120
3122
|
return document.createElement("div");
|
|
3121
3123
|
}
|
|
3122
|
-
function
|
|
3124
|
+
function ht(e) {
|
|
3123
3125
|
return ["Element", "Fragment"].some(function(t) {
|
|
3124
3126
|
return mn(e, t);
|
|
3125
3127
|
});
|
|
@@ -3134,7 +3136,7 @@ function Js(e) {
|
|
|
3134
3136
|
return !!(e && e._tippy && e._tippy.reference === e);
|
|
3135
3137
|
}
|
|
3136
3138
|
function Zs(e) {
|
|
3137
|
-
return
|
|
3139
|
+
return ht(e) ? [e] : Xs(e) ? Ot(e) : Array.isArray(e) ? e : Ot(document.querySelectorAll(e));
|
|
3138
3140
|
}
|
|
3139
3141
|
function qt(e, t) {
|
|
3140
3142
|
e.forEach(function(n) {
|
|
@@ -3147,7 +3149,7 @@ function _n(e, t) {
|
|
|
3147
3149
|
});
|
|
3148
3150
|
}
|
|
3149
3151
|
function Qs(e) {
|
|
3150
|
-
var t, n =
|
|
3152
|
+
var t, n = et(e), o = n[0];
|
|
3151
3153
|
return o != null && (t = o.ownerDocument) != null && t.body ? o.ownerDocument : document;
|
|
3152
3154
|
}
|
|
3153
3155
|
function el(e, t) {
|
|
@@ -3175,15 +3177,15 @@ function Nn(e, t) {
|
|
|
3175
3177
|
}
|
|
3176
3178
|
return !1;
|
|
3177
3179
|
}
|
|
3178
|
-
var
|
|
3180
|
+
var Me = {
|
|
3179
3181
|
isTouch: !1
|
|
3180
3182
|
}, Hn = 0;
|
|
3181
3183
|
function tl() {
|
|
3182
|
-
|
|
3184
|
+
Me.isTouch || (Me.isTouch = !0, window.performance && document.addEventListener("mousemove", To));
|
|
3183
3185
|
}
|
|
3184
3186
|
function To() {
|
|
3185
3187
|
var e = performance.now();
|
|
3186
|
-
e - Hn < 20 && (
|
|
3188
|
+
e - Hn < 20 && (Me.isTouch = !1, document.removeEventListener("mousemove", To)), Hn = e;
|
|
3187
3189
|
}
|
|
3188
3190
|
function nl() {
|
|
3189
3191
|
var e = document.activeElement;
|
|
@@ -3193,13 +3195,13 @@ function nl() {
|
|
|
3193
3195
|
}
|
|
3194
3196
|
}
|
|
3195
3197
|
function ol() {
|
|
3196
|
-
document.addEventListener("touchstart", tl,
|
|
3198
|
+
document.addEventListener("touchstart", tl, qe), window.addEventListener("blur", nl);
|
|
3197
3199
|
}
|
|
3198
3200
|
var rl = typeof window < "u" && typeof document < "u", al = rl ? (
|
|
3199
3201
|
// @ts-ignore
|
|
3200
3202
|
!!window.msCrypto
|
|
3201
3203
|
) : !1;
|
|
3202
|
-
function
|
|
3204
|
+
function Qe(e) {
|
|
3203
3205
|
var t = e === "destroy" ? "n already-" : " ";
|
|
3204
3206
|
return [e + "() was called on a" + t + "destroyed instance. This is a no-op but", "indicates a potential memory leak."].join(" ");
|
|
3205
3207
|
}
|
|
@@ -3227,21 +3229,21 @@ function Lo(e) {
|
|
|
3227
3229
|
"color: #a6a095;"
|
|
3228
3230
|
];
|
|
3229
3231
|
}
|
|
3230
|
-
var
|
|
3232
|
+
var bt;
|
|
3231
3233
|
process.env.NODE_ENV !== "production" && sl();
|
|
3232
3234
|
function sl() {
|
|
3233
|
-
|
|
3235
|
+
bt = /* @__PURE__ */ new Set();
|
|
3234
3236
|
}
|
|
3235
|
-
function
|
|
3236
|
-
if (e && !
|
|
3237
|
+
function Oe(e, t) {
|
|
3238
|
+
if (e && !bt.has(t)) {
|
|
3237
3239
|
var n;
|
|
3238
|
-
|
|
3240
|
+
bt.add(t), (n = console).warn.apply(n, Lo(t));
|
|
3239
3241
|
}
|
|
3240
3242
|
}
|
|
3241
3243
|
function Qt(e, t) {
|
|
3242
|
-
if (e && !
|
|
3244
|
+
if (e && !bt.has(t)) {
|
|
3243
3245
|
var n;
|
|
3244
|
-
|
|
3246
|
+
bt.add(t), (n = console).error.apply(n, Lo(t));
|
|
3245
3247
|
}
|
|
3246
3248
|
}
|
|
3247
3249
|
function ll(e) {
|
|
@@ -3364,7 +3366,7 @@ function Mo(e, t) {
|
|
|
3364
3366
|
var r = Fs(ke, Object.keys(Ao)), a = !Ws(r, o);
|
|
3365
3367
|
a && (a = t.filter(function(i) {
|
|
3366
3368
|
return i.name === o;
|
|
3367
|
-
}).length === 0),
|
|
3369
|
+
}).length === 0), Oe(a, ["`" + o + "`", "is not a valid prop. You may have spelled it incorrectly, or if it's", "a plugin, forgot to pass it in an array as props.plugins.", `
|
|
3368
3370
|
|
|
3369
3371
|
`, `All props: https://atomiks.github.io/tippyjs/v6/all-props/
|
|
3370
3372
|
`, "Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "));
|
|
@@ -3377,11 +3379,11 @@ function en(e, t) {
|
|
|
3377
3379
|
e[fl()] = t;
|
|
3378
3380
|
}
|
|
3379
3381
|
function jn(e) {
|
|
3380
|
-
var t =
|
|
3381
|
-
return e === !0 ? t.className = yo : (t.className = ko,
|
|
3382
|
+
var t = dt();
|
|
3383
|
+
return e === !0 ? t.className = yo : (t.className = ko, ht(e) ? t.appendChild(e) : en(t, e)), t;
|
|
3382
3384
|
}
|
|
3383
3385
|
function Un(e, t) {
|
|
3384
|
-
|
|
3386
|
+
ht(t.content) ? (en(e, ""), e.appendChild(t.content)) : typeof t.content != "function" && (t.allowHTML ? en(e, t.content) : e.textContent = t.content);
|
|
3385
3387
|
}
|
|
3386
3388
|
function tn(e) {
|
|
3387
3389
|
var t = e.firstElementChild, n = Ot(t.children);
|
|
@@ -3399,9 +3401,9 @@ function tn(e) {
|
|
|
3399
3401
|
};
|
|
3400
3402
|
}
|
|
3401
3403
|
function Po(e) {
|
|
3402
|
-
var t =
|
|
3404
|
+
var t = dt(), n = dt();
|
|
3403
3405
|
n.className = Us, n.setAttribute("data-state", "hidden"), n.setAttribute("tabindex", "-1");
|
|
3404
|
-
var o =
|
|
3406
|
+
var o = dt();
|
|
3405
3407
|
o.className = wo, o.setAttribute("data-state", "hidden"), Un(o, e.props), t.appendChild(n), n.appendChild(o), r(e.props, e.props);
|
|
3406
3408
|
function r(a, i) {
|
|
3407
3409
|
var s = tn(t), l = s.box, f = s.content, p = s.arrow;
|
|
@@ -3415,7 +3417,7 @@ function Po(e) {
|
|
|
3415
3417
|
Po.$$tippy = !0;
|
|
3416
3418
|
var hl = 1, At = [], Ft = [];
|
|
3417
3419
|
function bl(e, t) {
|
|
3418
|
-
var n = $n(e, Object.assign({}, ke, Bo(En(t)))), o, r, a, i = !1, s = !1, l = !1, f = !1, p, w, d, b = [], h = Dn(
|
|
3420
|
+
var n = $n(e, Object.assign({}, ke, Bo(En(t)))), o, r, a, i = !1, s = !1, l = !1, f = !1, p, w, d, b = [], h = Dn(ce, n.interactiveDebounce), g, x = hl++, m = null, A = Gs(n.plugins), k = {
|
|
3419
3421
|
// Is the instance currently enabled?
|
|
3420
3422
|
isEnabled: !0,
|
|
3421
3423
|
// Is the tippy currently showing and not transitioning out?
|
|
@@ -3430,7 +3432,7 @@ function bl(e, t) {
|
|
|
3430
3432
|
// properties
|
|
3431
3433
|
id: x,
|
|
3432
3434
|
reference: e,
|
|
3433
|
-
popper:
|
|
3435
|
+
popper: dt(),
|
|
3434
3436
|
popperInstance: m,
|
|
3435
3437
|
props: n,
|
|
3436
3438
|
state: k,
|
|
@@ -3442,8 +3444,8 @@ function bl(e, t) {
|
|
|
3442
3444
|
show: _o,
|
|
3443
3445
|
hide: No,
|
|
3444
3446
|
hideWithInteractivity: Ho,
|
|
3445
|
-
enable:
|
|
3446
|
-
disable:
|
|
3447
|
+
enable: $e,
|
|
3448
|
+
disable: ye,
|
|
3447
3449
|
unmount: zo,
|
|
3448
3450
|
destroy: $o
|
|
3449
3451
|
};
|
|
@@ -3454,10 +3456,10 @@ function bl(e, t) {
|
|
|
3454
3456
|
var _ = A.map(function(y) {
|
|
3455
3457
|
return y.fn(u);
|
|
3456
3458
|
}), Y = e.hasAttribute("aria-expanded");
|
|
3457
|
-
return X(),
|
|
3459
|
+
return X(), O(), V(), z("onCreate", [u]), n.showOnCreate && ze(), L.addEventListener("mouseenter", function() {
|
|
3458
3460
|
u.props.interactive && u.state.isVisible && u.clearDelayTimeouts();
|
|
3459
3461
|
}), L.addEventListener("mouseleave", function() {
|
|
3460
|
-
u.props.interactive && u.props.trigger.indexOf("mouseenter") >= 0 &&
|
|
3462
|
+
u.props.interactive && u.props.trigger.indexOf("mouseenter") >= 0 && D().addEventListener("mousemove", h);
|
|
3461
3463
|
}), u;
|
|
3462
3464
|
function M() {
|
|
3463
3465
|
var y = u.props.touch;
|
|
@@ -3473,7 +3475,7 @@ function bl(e, t) {
|
|
|
3473
3475
|
function B() {
|
|
3474
3476
|
return g || e;
|
|
3475
3477
|
}
|
|
3476
|
-
function
|
|
3478
|
+
function D() {
|
|
3477
3479
|
var y = B().parentNode;
|
|
3478
3480
|
return y ? Qs(y) : document;
|
|
3479
3481
|
}
|
|
@@ -3481,15 +3483,15 @@ function bl(e, t) {
|
|
|
3481
3483
|
return tn(L);
|
|
3482
3484
|
}
|
|
3483
3485
|
function K(y) {
|
|
3484
|
-
return u.state.isMounted && !u.state.isVisible ||
|
|
3486
|
+
return u.state.isMounted && !u.state.isVisible || Me.isTouch || p && p.type === "focus" ? 0 : Ut(u.props.delay, y ? 0 : 1, ke.delay);
|
|
3485
3487
|
}
|
|
3486
3488
|
function V(y) {
|
|
3487
3489
|
y === void 0 && (y = !1), L.style.pointerEvents = u.props.interactive && !y ? "" : "none", L.style.zIndex = "" + u.props.zIndex;
|
|
3488
3490
|
}
|
|
3489
|
-
function
|
|
3490
|
-
if (
|
|
3491
|
-
|
|
3492
|
-
}),
|
|
3491
|
+
function z(y, I, $) {
|
|
3492
|
+
if ($ === void 0 && ($ = !0), _.forEach(function(Q) {
|
|
3493
|
+
Q[y] && Q[y].apply(Q, I);
|
|
3494
|
+
}), $) {
|
|
3493
3495
|
var oe;
|
|
3494
3496
|
(oe = u.props)[y].apply(oe, I);
|
|
3495
3497
|
}
|
|
@@ -3497,42 +3499,42 @@ function bl(e, t) {
|
|
|
3497
3499
|
function S() {
|
|
3498
3500
|
var y = u.props.aria;
|
|
3499
3501
|
if (y.content) {
|
|
3500
|
-
var I = "aria-" + y.content,
|
|
3501
|
-
oe.forEach(function(
|
|
3502
|
-
var be =
|
|
3502
|
+
var I = "aria-" + y.content, $ = L.id, oe = et(u.props.triggerTarget || e);
|
|
3503
|
+
oe.forEach(function(Q) {
|
|
3504
|
+
var be = Q.getAttribute(I);
|
|
3503
3505
|
if (u.state.isVisible)
|
|
3504
|
-
|
|
3506
|
+
Q.setAttribute(I, be ? be + " " + $ : $);
|
|
3505
3507
|
else {
|
|
3506
|
-
var Ce = be && be.replace(
|
|
3507
|
-
Ce ?
|
|
3508
|
+
var Ce = be && be.replace($, "").trim();
|
|
3509
|
+
Ce ? Q.setAttribute(I, Ce) : Q.removeAttribute(I);
|
|
3508
3510
|
}
|
|
3509
3511
|
});
|
|
3510
3512
|
}
|
|
3511
3513
|
}
|
|
3512
|
-
function
|
|
3514
|
+
function O() {
|
|
3513
3515
|
if (!(Y || !u.props.aria.expanded)) {
|
|
3514
|
-
var y =
|
|
3516
|
+
var y = et(u.props.triggerTarget || e);
|
|
3515
3517
|
y.forEach(function(I) {
|
|
3516
3518
|
u.props.interactive ? I.setAttribute("aria-expanded", u.state.isVisible && I === B() ? "true" : "false") : I.removeAttribute("aria-expanded");
|
|
3517
3519
|
});
|
|
3518
3520
|
}
|
|
3519
3521
|
}
|
|
3520
3522
|
function ie() {
|
|
3521
|
-
|
|
3523
|
+
D().removeEventListener("mousemove", h), At = At.filter(function(y) {
|
|
3522
3524
|
return y !== h;
|
|
3523
3525
|
});
|
|
3524
3526
|
}
|
|
3525
3527
|
function se(y) {
|
|
3526
|
-
if (!(
|
|
3528
|
+
if (!(Me.isTouch && (l || y.type === "mousedown"))) {
|
|
3527
3529
|
var I = y.composedPath && y.composedPath()[0] || y.target;
|
|
3528
3530
|
if (!(u.props.interactive && Nn(L, I))) {
|
|
3529
|
-
if (
|
|
3530
|
-
return Nn(
|
|
3531
|
+
if (et(u.props.triggerTarget || e).some(function($) {
|
|
3532
|
+
return Nn($, I);
|
|
3531
3533
|
})) {
|
|
3532
|
-
if (
|
|
3534
|
+
if (Me.isTouch || u.state.isVisible && u.props.trigger.indexOf("click") >= 0)
|
|
3533
3535
|
return;
|
|
3534
3536
|
} else
|
|
3535
|
-
|
|
3537
|
+
z("onClickOutside", [u, y]);
|
|
3536
3538
|
u.props.hideOnClick === !0 && (u.clearDelayTimeouts(), u.hide(), s = !0, setTimeout(function() {
|
|
3537
3539
|
s = !1;
|
|
3538
3540
|
}), u.state.isMounted || N());
|
|
@@ -3546,12 +3548,12 @@ function bl(e, t) {
|
|
|
3546
3548
|
l = !1;
|
|
3547
3549
|
}
|
|
3548
3550
|
function R() {
|
|
3549
|
-
var y =
|
|
3550
|
-
y.addEventListener("mousedown", se, !0), y.addEventListener("touchend", se,
|
|
3551
|
+
var y = D();
|
|
3552
|
+
y.addEventListener("mousedown", se, !0), y.addEventListener("touchend", se, qe), y.addEventListener("touchstart", T, qe), y.addEventListener("touchmove", de, qe);
|
|
3551
3553
|
}
|
|
3552
3554
|
function N() {
|
|
3553
|
-
var y =
|
|
3554
|
-
y.removeEventListener("mousedown", se, !0), y.removeEventListener("touchend", se,
|
|
3555
|
+
var y = D();
|
|
3556
|
+
y.removeEventListener("mousedown", se, !0), y.removeEventListener("touchend", se, qe), y.removeEventListener("touchstart", T, qe), y.removeEventListener("touchmove", de, qe);
|
|
3555
3557
|
}
|
|
3556
3558
|
function W(y, I) {
|
|
3557
3559
|
Z(y, function() {
|
|
@@ -3562,36 +3564,36 @@ function bl(e, t) {
|
|
|
3562
3564
|
Z(y, I);
|
|
3563
3565
|
}
|
|
3564
3566
|
function Z(y, I) {
|
|
3565
|
-
var
|
|
3566
|
-
function oe(
|
|
3567
|
-
|
|
3567
|
+
var $ = F().box;
|
|
3568
|
+
function oe(Q) {
|
|
3569
|
+
Q.target === $ && (Wt($, "remove", oe), I());
|
|
3568
3570
|
}
|
|
3569
3571
|
if (y === 0)
|
|
3570
3572
|
return I();
|
|
3571
|
-
Wt(
|
|
3573
|
+
Wt($, "remove", w), Wt($, "add", oe), w = oe;
|
|
3572
3574
|
}
|
|
3573
|
-
function U(y, I,
|
|
3574
|
-
|
|
3575
|
-
var oe =
|
|
3576
|
-
oe.forEach(function(
|
|
3577
|
-
|
|
3578
|
-
node:
|
|
3575
|
+
function U(y, I, $) {
|
|
3576
|
+
$ === void 0 && ($ = !1);
|
|
3577
|
+
var oe = et(u.props.triggerTarget || e);
|
|
3578
|
+
oe.forEach(function(Q) {
|
|
3579
|
+
Q.addEventListener(y, I, $), b.push({
|
|
3580
|
+
node: Q,
|
|
3579
3581
|
eventType: y,
|
|
3580
3582
|
handler: I,
|
|
3581
|
-
options:
|
|
3583
|
+
options: $
|
|
3582
3584
|
});
|
|
3583
3585
|
});
|
|
3584
3586
|
}
|
|
3585
3587
|
function X() {
|
|
3586
|
-
J() && (U("touchstart",
|
|
3588
|
+
J() && (U("touchstart", ee, {
|
|
3587
3589
|
passive: !0
|
|
3588
|
-
}), U("touchend",
|
|
3590
|
+
}), U("touchend", he, {
|
|
3589
3591
|
passive: !0
|
|
3590
3592
|
})), Vs(u.props.trigger).forEach(function(y) {
|
|
3591
3593
|
if (y !== "manual")
|
|
3592
|
-
switch (U(y,
|
|
3594
|
+
switch (U(y, ee), y) {
|
|
3593
3595
|
case "mouseenter":
|
|
3594
|
-
U("mouseleave",
|
|
3596
|
+
U("mouseleave", he);
|
|
3595
3597
|
break;
|
|
3596
3598
|
case "focus":
|
|
3597
3599
|
U(al ? "focusout" : "blur", te);
|
|
@@ -3604,69 +3606,69 @@ function bl(e, t) {
|
|
|
3604
3606
|
}
|
|
3605
3607
|
function q() {
|
|
3606
3608
|
b.forEach(function(y) {
|
|
3607
|
-
var I = y.node,
|
|
3608
|
-
I.removeEventListener(
|
|
3609
|
+
var I = y.node, $ = y.eventType, oe = y.handler, Q = y.options;
|
|
3610
|
+
I.removeEventListener($, oe, Q);
|
|
3609
3611
|
}), b = [];
|
|
3610
3612
|
}
|
|
3611
|
-
function
|
|
3612
|
-
var I,
|
|
3613
|
-
if (!(!u.state.isEnabled ||
|
|
3613
|
+
function ee(y) {
|
|
3614
|
+
var I, $ = !1;
|
|
3615
|
+
if (!(!u.state.isEnabled || le(y) || s)) {
|
|
3614
3616
|
var oe = ((I = p) == null ? void 0 : I.type) === "focus";
|
|
3615
|
-
p = y, g = y.currentTarget,
|
|
3616
|
-
return
|
|
3617
|
-
}), y.type === "click" && (u.props.trigger.indexOf("mouseenter") < 0 || i) && u.props.hideOnClick !== !1 && u.state.isVisible ?
|
|
3617
|
+
p = y, g = y.currentTarget, O(), !u.state.isVisible && Ks(y) && At.forEach(function(Q) {
|
|
3618
|
+
return Q(y);
|
|
3619
|
+
}), y.type === "click" && (u.props.trigger.indexOf("mouseenter") < 0 || i) && u.props.hideOnClick !== !1 && u.state.isVisible ? $ = !0 : ze(y), y.type === "click" && (i = !$), $ && !oe && De(y);
|
|
3618
3620
|
}
|
|
3619
3621
|
}
|
|
3620
|
-
function
|
|
3621
|
-
var I = y.target,
|
|
3622
|
-
if (!(y.type === "mousemove" &&
|
|
3623
|
-
var oe =
|
|
3624
|
-
var be, Ce =
|
|
3625
|
-
return
|
|
3626
|
-
popperRect:
|
|
3627
|
-
popperState:
|
|
3622
|
+
function ce(y) {
|
|
3623
|
+
var I = y.target, $ = B().contains(I) || L.contains(I);
|
|
3624
|
+
if (!(y.type === "mousemove" && $)) {
|
|
3625
|
+
var oe = pe().concat(L).map(function(Q) {
|
|
3626
|
+
var be, Ce = Q._tippy, Ke = (be = Ce.popperInstance) == null ? void 0 : be.state;
|
|
3627
|
+
return Ke ? {
|
|
3628
|
+
popperRect: Q.getBoundingClientRect(),
|
|
3629
|
+
popperState: Ke,
|
|
3628
3630
|
props: n
|
|
3629
3631
|
} : null;
|
|
3630
3632
|
}).filter(Boolean);
|
|
3631
|
-
el(oe, y) && (ie(),
|
|
3633
|
+
el(oe, y) && (ie(), De(y));
|
|
3632
3634
|
}
|
|
3633
3635
|
}
|
|
3634
|
-
function
|
|
3635
|
-
var I =
|
|
3636
|
+
function he(y) {
|
|
3637
|
+
var I = le(y) || u.props.trigger.indexOf("click") >= 0 && i;
|
|
3636
3638
|
if (!I) {
|
|
3637
3639
|
if (u.props.interactive) {
|
|
3638
3640
|
u.hideWithInteractivity(y);
|
|
3639
3641
|
return;
|
|
3640
3642
|
}
|
|
3641
|
-
|
|
3643
|
+
De(y);
|
|
3642
3644
|
}
|
|
3643
3645
|
}
|
|
3644
3646
|
function te(y) {
|
|
3645
|
-
u.props.trigger.indexOf("focusin") < 0 && y.target !== B() || u.props.interactive && y.relatedTarget && L.contains(y.relatedTarget) ||
|
|
3647
|
+
u.props.trigger.indexOf("focusin") < 0 && y.target !== B() || u.props.interactive && y.relatedTarget && L.contains(y.relatedTarget) || De(y);
|
|
3646
3648
|
}
|
|
3647
|
-
function
|
|
3648
|
-
return
|
|
3649
|
+
function le(y) {
|
|
3650
|
+
return Me.isTouch ? J() !== y.type.indexOf("touch") >= 0 : !1;
|
|
3649
3651
|
}
|
|
3650
|
-
function
|
|
3651
|
-
|
|
3652
|
-
var y = u.props, I = y.popperOptions,
|
|
3653
|
-
getBoundingClientRect:
|
|
3654
|
-
contextElement:
|
|
3652
|
+
function ue() {
|
|
3653
|
+
Ie();
|
|
3654
|
+
var y = u.props, I = y.popperOptions, $ = y.placement, oe = y.offset, Q = y.getReferenceClientRect, be = y.moveTransition, Ce = v() ? tn(L).arrow : null, Ke = Q ? {
|
|
3655
|
+
getBoundingClientRect: Q,
|
|
3656
|
+
contextElement: Q.contextElement || B()
|
|
3655
3657
|
} : e, yn = {
|
|
3656
3658
|
name: "$$tippy",
|
|
3657
3659
|
enabled: !0,
|
|
3658
3660
|
phase: "beforeWrite",
|
|
3659
3661
|
requires: ["computeStyles"],
|
|
3660
3662
|
fn: function(Ct) {
|
|
3661
|
-
var
|
|
3663
|
+
var Je = Ct.state;
|
|
3662
3664
|
if (v()) {
|
|
3663
3665
|
var jo = F(), jt = jo.box;
|
|
3664
3666
|
["placement", "reference-hidden", "escaped"].forEach(function(Tt) {
|
|
3665
|
-
Tt === "placement" ? jt.setAttribute("data-placement",
|
|
3666
|
-
}),
|
|
3667
|
+
Tt === "placement" ? jt.setAttribute("data-placement", Je.placement) : Je.attributes.popper["data-popper-" + Tt] ? jt.setAttribute("data-" + Tt, "") : jt.removeAttribute("data-" + Tt);
|
|
3668
|
+
}), Je.attributes.popper = {};
|
|
3667
3669
|
}
|
|
3668
3670
|
}
|
|
3669
|
-
},
|
|
3671
|
+
}, je = [{
|
|
3670
3672
|
name: "offset",
|
|
3671
3673
|
options: {
|
|
3672
3674
|
offset: oe
|
|
@@ -3692,24 +3694,24 @@ function bl(e, t) {
|
|
|
3692
3694
|
adaptive: !be
|
|
3693
3695
|
}
|
|
3694
3696
|
}, yn];
|
|
3695
|
-
v() && Ce &&
|
|
3697
|
+
v() && Ce && je.push({
|
|
3696
3698
|
name: "arrow",
|
|
3697
3699
|
options: {
|
|
3698
3700
|
element: Ce,
|
|
3699
3701
|
padding: 3
|
|
3700
3702
|
}
|
|
3701
|
-
}),
|
|
3702
|
-
placement:
|
|
3703
|
+
}), je.push.apply(je, (I == null ? void 0 : I.modifiers) || []), u.popperInstance = js(Ke, L, Object.assign({}, I, {
|
|
3704
|
+
placement: $,
|
|
3703
3705
|
onFirstUpdate: d,
|
|
3704
|
-
modifiers:
|
|
3706
|
+
modifiers: je
|
|
3705
3707
|
}));
|
|
3706
3708
|
}
|
|
3707
|
-
function
|
|
3709
|
+
function Ie() {
|
|
3708
3710
|
u.popperInstance && (u.popperInstance.destroy(), u.popperInstance = null);
|
|
3709
3711
|
}
|
|
3710
|
-
function
|
|
3711
|
-
var y = u.props.appendTo, I,
|
|
3712
|
-
u.props.interactive && y === xo || y === "parent" ? I =
|
|
3712
|
+
function ge() {
|
|
3713
|
+
var y = u.props.appendTo, I, $ = B();
|
|
3714
|
+
u.props.interactive && y === xo || y === "parent" ? I = $.parentNode : I = Co(y, [$]), I.contains(L) || I.appendChild(L), u.state.isMounted = !0, ue(), process.env.NODE_ENV !== "production" && Oe(u.props.interactive && y === ke.appendTo && $.nextElementSibling !== L, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
|
|
3713
3715
|
|
|
3714
3716
|
`, "Using a wrapper <div> or <span> tag around the reference element", "solves this by creating a new parentNode context.", `
|
|
3715
3717
|
|
|
@@ -3717,18 +3719,18 @@ function bl(e, t) {
|
|
|
3717
3719
|
|
|
3718
3720
|
`, "See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "));
|
|
3719
3721
|
}
|
|
3720
|
-
function
|
|
3722
|
+
function pe() {
|
|
3721
3723
|
return Ot(L.querySelectorAll("[data-tippy-root]"));
|
|
3722
3724
|
}
|
|
3723
|
-
function
|
|
3724
|
-
u.clearDelayTimeouts(), y &&
|
|
3725
|
-
var I = K(!0),
|
|
3726
|
-
|
|
3725
|
+
function ze(y) {
|
|
3726
|
+
u.clearDelayTimeouts(), y && z("onTrigger", [u, y]), R();
|
|
3727
|
+
var I = K(!0), $ = M(), oe = $[0], Q = $[1];
|
|
3728
|
+
Me.isTouch && oe === "hold" && Q && (I = Q), I ? o = setTimeout(function() {
|
|
3727
3729
|
u.show();
|
|
3728
3730
|
}, I) : u.show();
|
|
3729
3731
|
}
|
|
3730
|
-
function
|
|
3731
|
-
if (u.clearDelayTimeouts(),
|
|
3732
|
+
function De(y) {
|
|
3733
|
+
if (u.clearDelayTimeouts(), z("onUntrigger", [u, y]), !u.state.isVisible) {
|
|
3732
3734
|
N();
|
|
3733
3735
|
return;
|
|
3734
3736
|
}
|
|
@@ -3741,26 +3743,26 @@ function bl(e, t) {
|
|
|
3741
3743
|
});
|
|
3742
3744
|
}
|
|
3743
3745
|
}
|
|
3744
|
-
function
|
|
3746
|
+
function $e() {
|
|
3745
3747
|
u.state.isEnabled = !0;
|
|
3746
3748
|
}
|
|
3747
|
-
function
|
|
3749
|
+
function ye() {
|
|
3748
3750
|
u.hide(), u.state.isEnabled = !1;
|
|
3749
3751
|
}
|
|
3750
3752
|
function yt() {
|
|
3751
3753
|
clearTimeout(o), clearTimeout(r), cancelAnimationFrame(a);
|
|
3752
3754
|
}
|
|
3753
3755
|
function kt(y) {
|
|
3754
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
3755
|
-
|
|
3756
|
-
var I = u.props,
|
|
3756
|
+
if (process.env.NODE_ENV !== "production" && Oe(u.state.isDestroyed, Qe("setProps")), !u.state.isDestroyed) {
|
|
3757
|
+
z("onBeforeUpdate", [u, y]), q();
|
|
3758
|
+
var I = u.props, $ = $n(e, Object.assign({}, I, En(y), {
|
|
3757
3759
|
ignoreAttributes: !0
|
|
3758
3760
|
}));
|
|
3759
|
-
u.props =
|
|
3761
|
+
u.props = $, X(), I.interactiveDebounce !== $.interactiveDebounce && (ie(), h = Dn(ce, $.interactiveDebounce)), I.triggerTarget && !$.triggerTarget ? et(I.triggerTarget).forEach(function(oe) {
|
|
3760
3762
|
oe.removeAttribute("aria-expanded");
|
|
3761
|
-
}) :
|
|
3763
|
+
}) : $.triggerTarget && e.removeAttribute("aria-expanded"), O(), V(), E && E(I, $), u.popperInstance && (ue(), pe().forEach(function(oe) {
|
|
3762
3764
|
requestAnimationFrame(oe._tippy.popperInstance.forceUpdate);
|
|
3763
|
-
})),
|
|
3765
|
+
})), z("onAfterUpdate", [u, y]);
|
|
3764
3766
|
}
|
|
3765
3767
|
}
|
|
3766
3768
|
function xt(y) {
|
|
@@ -3769,53 +3771,53 @@ function bl(e, t) {
|
|
|
3769
3771
|
});
|
|
3770
3772
|
}
|
|
3771
3773
|
function _o() {
|
|
3772
|
-
process.env.NODE_ENV !== "production" &&
|
|
3773
|
-
var y = u.state.isVisible, I = u.state.isDestroyed,
|
|
3774
|
-
if (!(y || I ||
|
|
3774
|
+
process.env.NODE_ENV !== "production" && Oe(u.state.isDestroyed, Qe("show"));
|
|
3775
|
+
var y = u.state.isVisible, I = u.state.isDestroyed, $ = !u.state.isEnabled, oe = Me.isTouch && !u.props.touch, Q = Ut(u.props.duration, 0, ke.duration);
|
|
3776
|
+
if (!(y || I || $ || oe) && !B().hasAttribute("disabled") && (z("onShow", [u], !1), u.props.onShow(u) !== !1)) {
|
|
3775
3777
|
if (u.state.isVisible = !0, v() && (L.style.visibility = "visible"), V(), R(), u.state.isMounted || (L.style.transition = "none"), v()) {
|
|
3776
|
-
var be = F(), Ce = be.box,
|
|
3777
|
-
qt([Ce,
|
|
3778
|
+
var be = F(), Ce = be.box, Ke = be.content;
|
|
3779
|
+
qt([Ce, Ke], 0);
|
|
3778
3780
|
}
|
|
3779
3781
|
d = function() {
|
|
3780
|
-
var
|
|
3782
|
+
var je;
|
|
3781
3783
|
if (!(!u.state.isVisible || f)) {
|
|
3782
3784
|
if (f = !0, L.offsetHeight, L.style.transition = u.props.moveTransition, v() && u.props.animation) {
|
|
3783
|
-
var $t = F(), Ct = $t.box,
|
|
3784
|
-
qt([Ct,
|
|
3785
|
+
var $t = F(), Ct = $t.box, Je = $t.content;
|
|
3786
|
+
qt([Ct, Je], Q), _n([Ct, Je], "visible");
|
|
3785
3787
|
}
|
|
3786
|
-
S(),
|
|
3787
|
-
u.state.isShown = !0,
|
|
3788
|
+
S(), O(), On(Ft, u), (je = u.popperInstance) == null || je.forceUpdate(), z("onMount", [u]), u.props.animation && v() && G(Q, function() {
|
|
3789
|
+
u.state.isShown = !0, z("onShown", [u]);
|
|
3788
3790
|
});
|
|
3789
3791
|
}
|
|
3790
|
-
},
|
|
3792
|
+
}, ge();
|
|
3791
3793
|
}
|
|
3792
3794
|
}
|
|
3793
3795
|
function No() {
|
|
3794
|
-
process.env.NODE_ENV !== "production" &&
|
|
3795
|
-
var y = !u.state.isVisible, I = u.state.isDestroyed,
|
|
3796
|
-
if (!(y || I ||
|
|
3796
|
+
process.env.NODE_ENV !== "production" && Oe(u.state.isDestroyed, Qe("hide"));
|
|
3797
|
+
var y = !u.state.isVisible, I = u.state.isDestroyed, $ = !u.state.isEnabled, oe = Ut(u.props.duration, 1, ke.duration);
|
|
3798
|
+
if (!(y || I || $) && (z("onHide", [u], !1), u.props.onHide(u) !== !1)) {
|
|
3797
3799
|
if (u.state.isVisible = !1, u.state.isShown = !1, f = !1, i = !1, v() && (L.style.visibility = "hidden"), ie(), N(), V(!0), v()) {
|
|
3798
|
-
var
|
|
3800
|
+
var Q = F(), be = Q.box, Ce = Q.content;
|
|
3799
3801
|
u.props.animation && (qt([be, Ce], oe), _n([be, Ce], "hidden"));
|
|
3800
3802
|
}
|
|
3801
|
-
S(),
|
|
3803
|
+
S(), O(), u.props.animation ? v() && W(oe, u.unmount) : u.unmount();
|
|
3802
3804
|
}
|
|
3803
3805
|
}
|
|
3804
3806
|
function Ho(y) {
|
|
3805
|
-
process.env.NODE_ENV !== "production" &&
|
|
3807
|
+
process.env.NODE_ENV !== "production" && Oe(u.state.isDestroyed, Qe("hideWithInteractivity")), D().addEventListener("mousemove", h), On(At, h), h(y);
|
|
3806
3808
|
}
|
|
3807
3809
|
function zo() {
|
|
3808
|
-
process.env.NODE_ENV !== "production" &&
|
|
3810
|
+
process.env.NODE_ENV !== "production" && Oe(u.state.isDestroyed, Qe("unmount")), u.state.isVisible && u.hide(), u.state.isMounted && (Ie(), pe().forEach(function(y) {
|
|
3809
3811
|
y._tippy.unmount();
|
|
3810
3812
|
}), L.parentNode && L.parentNode.removeChild(L), Ft = Ft.filter(function(y) {
|
|
3811
3813
|
return y !== u;
|
|
3812
|
-
}), u.state.isMounted = !1,
|
|
3814
|
+
}), u.state.isMounted = !1, z("onHidden", [u]));
|
|
3813
3815
|
}
|
|
3814
3816
|
function $o() {
|
|
3815
|
-
process.env.NODE_ENV !== "production" &&
|
|
3817
|
+
process.env.NODE_ENV !== "production" && Oe(u.state.isDestroyed, Qe("destroy")), !u.state.isDestroyed && (u.clearDelayTimeouts(), u.unmount(), q(), delete e._tippy, u.state.isDestroyed = !0, z("onDestroy", [u]));
|
|
3816
3818
|
}
|
|
3817
3819
|
}
|
|
3818
|
-
function
|
|
3820
|
+
function He(e, t) {
|
|
3819
3821
|
t === void 0 && (t = {});
|
|
3820
3822
|
var n = ke.plugins.concat(t.plugins || []);
|
|
3821
3823
|
process.env.NODE_ENV !== "production" && (ll(e), Mo(t, n)), ol();
|
|
@@ -3823,8 +3825,8 @@ function Ne(e, t) {
|
|
|
3823
3825
|
plugins: n
|
|
3824
3826
|
}), r = Zs(e);
|
|
3825
3827
|
if (process.env.NODE_ENV !== "production") {
|
|
3826
|
-
var a =
|
|
3827
|
-
|
|
3828
|
+
var a = ht(o.content), i = r.length > 1;
|
|
3829
|
+
Oe(a && i, ["tippy() was passed an Element as the `content` prop, but more than", "one tippy instance was created by this invocation. This means the", "content element will only be appended to the last tippy instance.", `
|
|
3828
3830
|
|
|
3829
3831
|
`, "Instead, pass the .innerHTML of the element, or use a function that", "returns a cloned version of the element instead.", `
|
|
3830
3832
|
|
|
@@ -3835,11 +3837,11 @@ function Ne(e, t) {
|
|
|
3835
3837
|
var p = f && bl(f, o);
|
|
3836
3838
|
return p && l.push(p), l;
|
|
3837
3839
|
}, []);
|
|
3838
|
-
return
|
|
3840
|
+
return ht(e) ? s[0] : s;
|
|
3839
3841
|
}
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3842
|
+
He.defaultProps = ke;
|
|
3843
|
+
He.setDefaultProps = dl;
|
|
3844
|
+
He.currentInput = Me;
|
|
3843
3845
|
Object.assign({}, uo, {
|
|
3844
3846
|
effect: function(t) {
|
|
3845
3847
|
var n = t.state, o = {
|
|
@@ -3857,10 +3859,10 @@ Object.assign({}, uo, {
|
|
|
3857
3859
|
Object.assign(n.elements.popper.style, o.popper), n.styles = o, n.elements.arrow && Object.assign(n.elements.arrow.style, o.arrow);
|
|
3858
3860
|
}
|
|
3859
3861
|
});
|
|
3860
|
-
|
|
3862
|
+
He.setDefaultProps({
|
|
3861
3863
|
render: Po
|
|
3862
3864
|
});
|
|
3863
|
-
const
|
|
3865
|
+
const j = {
|
|
3864
3866
|
// Colors - all use CSS custom properties
|
|
3865
3867
|
colors: {
|
|
3866
3868
|
background: "var(--pubwave-color-background)",
|
|
@@ -4011,7 +4013,7 @@ const $ = {
|
|
|
4011
4013
|
}
|
|
4012
4014
|
}
|
|
4013
4015
|
`, Wc = gl;
|
|
4014
|
-
function
|
|
4016
|
+
function at(...e) {
|
|
4015
4017
|
return e.filter(Boolean).join(" ");
|
|
4016
4018
|
}
|
|
4017
4019
|
const Rt = {
|
|
@@ -4092,7 +4094,7 @@ function vl(e, t, n) {
|
|
|
4092
4094
|
groupLabels: r
|
|
4093
4095
|
},
|
|
4094
4096
|
editor: this.editor
|
|
4095
|
-
}), f.clientRect && (l =
|
|
4097
|
+
}), f.clientRect && (l = He("body", {
|
|
4096
4098
|
getReferenceClientRect: f.clientRect,
|
|
4097
4099
|
appendTo: () => document.body,
|
|
4098
4100
|
content: s.element,
|
|
@@ -4101,7 +4103,7 @@ function vl(e, t, n) {
|
|
|
4101
4103
|
trigger: "manual",
|
|
4102
4104
|
placement: "bottom-start",
|
|
4103
4105
|
offset: [0, 8],
|
|
4104
|
-
zIndex:
|
|
4106
|
+
zIndex: j.zIndex.dropdown,
|
|
4105
4107
|
arrow: !1,
|
|
4106
4108
|
// Disable animations to prevent black block flash
|
|
4107
4109
|
duration: [0, 0],
|
|
@@ -4126,7 +4128,7 @@ function vl(e, t, n) {
|
|
|
4126
4128
|
},
|
|
4127
4129
|
onShow(p) {
|
|
4128
4130
|
const w = p.popper.querySelector(".tippy-box");
|
|
4129
|
-
w && (w.style.zIndex = String(
|
|
4131
|
+
w && (w.style.zIndex = String(j.zIndex.dropdown), w.style.backgroundColor = "transparent", w.style.background = "transparent", w.style.border = "none");
|
|
4130
4132
|
const d = p.popper.querySelector(".pubwave-slash-menu");
|
|
4131
4133
|
if (d) {
|
|
4132
4134
|
const b = document.querySelector(".ProseMirror");
|
|
@@ -4231,14 +4233,14 @@ const ml = Xt.forwardRef(function({ items: t, command: n, query: o = "", groupLa
|
|
|
4231
4233
|
] }, x);
|
|
4232
4234
|
});
|
|
4233
4235
|
})() }) });
|
|
4234
|
-
}),
|
|
4236
|
+
}), ve = new ln("pubwave-dnd"), Et = {
|
|
4235
4237
|
draggingBlockId: null,
|
|
4236
4238
|
draggingBlockPos: null,
|
|
4237
4239
|
dropTargetPos: null,
|
|
4238
4240
|
dropPosition: null,
|
|
4239
4241
|
cancelled: !1
|
|
4240
4242
|
};
|
|
4241
|
-
function
|
|
4243
|
+
function We(e, t) {
|
|
4242
4244
|
switch (t.type) {
|
|
4243
4245
|
case "START_DRAG":
|
|
4244
4246
|
return {
|
|
@@ -4278,7 +4280,7 @@ function Ue(e, t) {
|
|
|
4278
4280
|
return e;
|
|
4279
4281
|
}
|
|
4280
4282
|
}
|
|
4281
|
-
function
|
|
4283
|
+
function gt(e, t) {
|
|
4282
4284
|
const n = Math.max(0, Math.min(t, e.content.size));
|
|
4283
4285
|
try {
|
|
4284
4286
|
const o = e.resolve(n);
|
|
@@ -4326,10 +4328,10 @@ function bt(e, t) {
|
|
|
4326
4328
|
}
|
|
4327
4329
|
}
|
|
4328
4330
|
function wl(e, t, n, o) {
|
|
4329
|
-
const { state: r } = e, { tr: a, doc: i } = r, s =
|
|
4331
|
+
const { state: r } = e, { tr: a, doc: i } = r, s = gt(i, t);
|
|
4330
4332
|
if (!s)
|
|
4331
4333
|
return !1;
|
|
4332
|
-
const l =
|
|
4334
|
+
const l = gt(i, n);
|
|
4333
4335
|
if (!l)
|
|
4334
4336
|
return !1;
|
|
4335
4337
|
let f = l.pos;
|
|
@@ -4368,7 +4370,7 @@ function qn(e, t) {
|
|
|
4368
4370
|
top: t.clientY
|
|
4369
4371
|
});
|
|
4370
4372
|
if (l) {
|
|
4371
|
-
const f =
|
|
4373
|
+
const f = gt(n, l.pos);
|
|
4372
4374
|
if (f) {
|
|
4373
4375
|
const p = e.nodeDOM(f.pos);
|
|
4374
4376
|
if (p) {
|
|
@@ -4385,38 +4387,38 @@ function qn(e, t) {
|
|
|
4385
4387
|
function yl(e) {
|
|
4386
4388
|
let t = Et;
|
|
4387
4389
|
return new sn({
|
|
4388
|
-
key:
|
|
4390
|
+
key: ve,
|
|
4389
4391
|
state: {
|
|
4390
4392
|
init() {
|
|
4391
4393
|
return Et;
|
|
4392
4394
|
},
|
|
4393
4395
|
apply(n, o) {
|
|
4394
|
-
const r = n.getMeta(
|
|
4396
|
+
const r = n.getMeta(ve);
|
|
4395
4397
|
return r !== void 0 ? (t = r, r) : (t = o, o);
|
|
4396
4398
|
}
|
|
4397
4399
|
},
|
|
4398
4400
|
props: {
|
|
4399
4401
|
handleKeyDown(n, o) {
|
|
4400
|
-
return o.key === "Escape" && t.draggingBlockId ? (t =
|
|
4402
|
+
return o.key === "Escape" && t.draggingBlockId ? (t = We(t, { type: "CANCEL_DRAG" }), n.dispatch(n.state.tr.setMeta(ve, t)), !0) : !1;
|
|
4401
4403
|
},
|
|
4402
4404
|
handleDOMEvents: {
|
|
4403
4405
|
dragover(n, o) {
|
|
4404
4406
|
var i;
|
|
4405
4407
|
if (!((i = o.dataTransfer) != null && i.types.includes("application/x-pubwave-block")))
|
|
4406
4408
|
return !1;
|
|
4407
|
-
o.preventDefault(), o.dataTransfer.dropEffect = "move", t =
|
|
4409
|
+
o.preventDefault(), o.dataTransfer.dropEffect = "move", t = ve.getState(
|
|
4408
4410
|
n.state
|
|
4409
4411
|
) ?? t;
|
|
4410
4412
|
const a = qn(n, o);
|
|
4411
|
-
return a ? (t =
|
|
4413
|
+
return a ? (t = We(t, {
|
|
4412
4414
|
type: "UPDATE_DROP_TARGET",
|
|
4413
4415
|
pos: a.pos,
|
|
4414
4416
|
position: a.position
|
|
4415
|
-
}), n.dispatch(n.state.tr.setMeta(
|
|
4417
|
+
}), n.dispatch(n.state.tr.setMeta(ve, t))) : t.dropTargetPos !== null && (t = We(t, {
|
|
4416
4418
|
type: "UPDATE_DROP_TARGET",
|
|
4417
4419
|
pos: null,
|
|
4418
4420
|
position: null
|
|
4419
|
-
}), n.dispatch(n.state.tr.setMeta(
|
|
4421
|
+
}), n.dispatch(n.state.tr.setMeta(ve, t))), !0;
|
|
4420
4422
|
},
|
|
4421
4423
|
drop(n, o) {
|
|
4422
4424
|
var d;
|
|
@@ -4426,7 +4428,7 @@ function yl(e) {
|
|
|
4426
4428
|
if (!r)
|
|
4427
4429
|
return !1;
|
|
4428
4430
|
o.preventDefault(), o.stopPropagation();
|
|
4429
|
-
let s = (
|
|
4431
|
+
let s = (ve.getState(
|
|
4430
4432
|
n.state
|
|
4431
4433
|
) ?? t).draggingBlockPos;
|
|
4432
4434
|
if (s === null && r.startsWith("block-")) {
|
|
@@ -4447,30 +4449,30 @@ function yl(e) {
|
|
|
4447
4449
|
f,
|
|
4448
4450
|
p
|
|
4449
4451
|
);
|
|
4450
|
-
return t =
|
|
4452
|
+
return t = We(t, { type: "COMPLETE_DRAG" }), n.dispatch(n.state.tr.setMeta(ve, t)), w;
|
|
4451
4453
|
},
|
|
4452
4454
|
dragleave(n, o) {
|
|
4453
4455
|
const r = o.relatedTarget;
|
|
4454
|
-
return r != null && r.closest(".pubwave-editor") || (t =
|
|
4456
|
+
return r != null && r.closest(".pubwave-editor") || (t = We(t, {
|
|
4455
4457
|
type: "UPDATE_DROP_TARGET",
|
|
4456
4458
|
pos: null,
|
|
4457
4459
|
position: null
|
|
4458
|
-
}), n.dispatch(n.state.tr.setMeta(
|
|
4460
|
+
}), n.dispatch(n.state.tr.setMeta(ve, t))), !1;
|
|
4459
4461
|
}
|
|
4460
4462
|
}
|
|
4461
4463
|
}
|
|
4462
4464
|
});
|
|
4463
4465
|
}
|
|
4464
4466
|
function Ro(e) {
|
|
4465
|
-
return
|
|
4467
|
+
return ve.getState(e.state) ?? Et;
|
|
4466
4468
|
}
|
|
4467
4469
|
function kl(e, t, n) {
|
|
4468
|
-
const { view: o } = e, r = { type: "START_DRAG", blockId: t, pos: n }, a =
|
|
4469
|
-
o.dispatch(o.state.tr.setMeta(
|
|
4470
|
+
const { view: o } = e, r = { type: "START_DRAG", blockId: t, pos: n }, a = We(Ro(e), r);
|
|
4471
|
+
o.dispatch(o.state.tr.setMeta(ve, a));
|
|
4470
4472
|
}
|
|
4471
4473
|
function Fc(e) {
|
|
4472
|
-
const { view: t } = e, n = { type: "CANCEL_DRAG" }, o =
|
|
4473
|
-
t.dispatch(t.state.tr.setMeta(
|
|
4474
|
+
const { view: t } = e, n = { type: "CANCEL_DRAG" }, o = We(Ro(e), n);
|
|
4475
|
+
t.dispatch(t.state.tr.setMeta(ve, o));
|
|
4474
4476
|
}
|
|
4475
4477
|
const xl = new ln("editorBehaviors");
|
|
4476
4478
|
function nn(e, t) {
|
|
@@ -4828,14 +4830,14 @@ const _t = {
|
|
|
4828
4830
|
toolbar: "Text formatting toolbar",
|
|
4829
4831
|
// Drag and Drop
|
|
4830
4832
|
dragHandle: "Drag to reorder block"
|
|
4831
|
-
},
|
|
4833
|
+
}, st = {
|
|
4832
4834
|
bold: "Cmd+B",
|
|
4833
4835
|
italic: "Cmd+I",
|
|
4834
4836
|
underline: "Cmd+U",
|
|
4835
4837
|
strike: "Cmd+Shift+X",
|
|
4836
4838
|
code: "Cmd+E"
|
|
4837
4839
|
};
|
|
4838
|
-
function
|
|
4840
|
+
function _e(e, t) {
|
|
4839
4841
|
return t ? `${e} (${t})` : e;
|
|
4840
4842
|
}
|
|
4841
4843
|
const Te = Xt.forwardRef(
|
|
@@ -4844,7 +4846,7 @@ const Te = Xt.forwardRef(
|
|
|
4844
4846
|
{
|
|
4845
4847
|
ref: l,
|
|
4846
4848
|
type: "button",
|
|
4847
|
-
className:
|
|
4849
|
+
className: at(
|
|
4848
4850
|
"pubwave-toolbar__button",
|
|
4849
4851
|
e && "pubwave-toolbar__button--active",
|
|
4850
4852
|
t && "pubwave-toolbar__button--disabled"
|
|
@@ -5024,7 +5026,7 @@ function wn({
|
|
|
5024
5026
|
);
|
|
5025
5027
|
}
|
|
5026
5028
|
function Dl({ editor: e, isOpen: t, onToggle: n, onClose: o }) {
|
|
5027
|
-
const r =
|
|
5029
|
+
const r = Ge(), a = ne(null), i = H(() => e.isActive("heading", { level: 1 }) ? "heading1" : e.isActive("heading", { level: 2 }) ? "heading2" : e.isActive("heading", { level: 3 }) ? "heading3" : e.isActive("bulletList") ? "bulletList" : e.isActive("orderedList") ? "orderedList" : e.isActive("taskList") ? "taskList" : e.isActive("blockquote") ? "blockquote" : e.isActive("codeBlock") ? "codeBlock" : "paragraph", [e]), s = an(
|
|
5028
5030
|
() => [
|
|
5029
5031
|
{
|
|
5030
5032
|
id: "paragraph",
|
|
@@ -5085,7 +5087,7 @@ function Dl({ editor: e, isOpen: t, onToggle: n, onClose: o }) {
|
|
|
5085
5087
|
ref: a,
|
|
5086
5088
|
active: t,
|
|
5087
5089
|
onClick: n,
|
|
5088
|
-
"data-tooltip":
|
|
5090
|
+
"data-tooltip": _e(r.toolbar.turnInto),
|
|
5089
5091
|
"data-testid": "toolbar-turnInto",
|
|
5090
5092
|
"aria-label": r.aria.turnIntoButton,
|
|
5091
5093
|
style: { width: "auto", minWidth: "auto", padding: "0 8px", height: "var(--pubwave-button-height, 28px)" },
|
|
@@ -5112,7 +5114,7 @@ function Dl({ editor: e, isOpen: t, onToggle: n, onClose: o }) {
|
|
|
5112
5114
|
boxShadow: "var(--pubwave-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05))",
|
|
5113
5115
|
padding: "var(--pubwave-spacing-1, 4px)",
|
|
5114
5116
|
minWidth: "240px",
|
|
5115
|
-
zIndex:
|
|
5117
|
+
zIndex: j.zIndex.dropdown + 1
|
|
5116
5118
|
},
|
|
5117
5119
|
children: [
|
|
5118
5120
|
/* @__PURE__ */ c("div", { style: Rt, children: r.toolbar.turnInto }),
|
|
@@ -5122,7 +5124,7 @@ function Dl({ editor: e, isOpen: t, onToggle: n, onClose: o }) {
|
|
|
5122
5124
|
"button",
|
|
5123
5125
|
{
|
|
5124
5126
|
type: "button",
|
|
5125
|
-
className:
|
|
5127
|
+
className: at(
|
|
5126
5128
|
"pubwave-toolbar__turn-into-option",
|
|
5127
5129
|
b && "pubwave-toolbar__turn-into-option--active"
|
|
5128
5130
|
),
|
|
@@ -5167,12 +5169,12 @@ function Dl({ editor: e, isOpen: t, onToggle: n, onClose: o }) {
|
|
|
5167
5169
|
)
|
|
5168
5170
|
] });
|
|
5169
5171
|
}
|
|
5170
|
-
function
|
|
5172
|
+
function Se(e) {
|
|
5171
5173
|
return !!(e && !e.isDestroyed);
|
|
5172
5174
|
}
|
|
5173
5175
|
function wu(e, t) {
|
|
5174
|
-
|
|
5175
|
-
if (
|
|
5176
|
+
Se(e) && fe(() => {
|
|
5177
|
+
if (Se(e))
|
|
5176
5178
|
switch (t) {
|
|
5177
5179
|
case "start":
|
|
5178
5180
|
e.commands.focus("start");
|
|
@@ -5188,18 +5190,18 @@ function wu(e, t) {
|
|
|
5188
5190
|
}
|
|
5189
5191
|
});
|
|
5190
5192
|
}
|
|
5191
|
-
function
|
|
5192
|
-
|
|
5193
|
-
|
|
5193
|
+
function Ye(e) {
|
|
5194
|
+
Se(e) && fe(() => {
|
|
5195
|
+
Se(e) && (e.isFocused || e.commands.focus());
|
|
5194
5196
|
});
|
|
5195
5197
|
}
|
|
5196
5198
|
function yu(e, t) {
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
+
Se(e) && (t.preventDefault(), fe(() => {
|
|
5200
|
+
Se(e) && e.commands.focus();
|
|
5199
5201
|
}));
|
|
5200
5202
|
}
|
|
5201
5203
|
function ku(e) {
|
|
5202
|
-
if (!
|
|
5204
|
+
if (!Se(e))
|
|
5203
5205
|
return function() {
|
|
5204
5206
|
};
|
|
5205
5207
|
const t = (o) => {
|
|
@@ -5216,17 +5218,17 @@ function ku(e) {
|
|
|
5216
5218
|
};
|
|
5217
5219
|
}
|
|
5218
5220
|
function Ol(e) {
|
|
5219
|
-
if (!
|
|
5221
|
+
if (!Se(e)) return null;
|
|
5220
5222
|
const { from: t, to: n, empty: o } = e.state.selection;
|
|
5221
5223
|
return { from: t, to: n, empty: o };
|
|
5222
5224
|
}
|
|
5223
5225
|
function Bt(e, t) {
|
|
5224
|
-
if (!
|
|
5226
|
+
if (!Se(e) || !t) return;
|
|
5225
5227
|
const { from: n, to: o } = t, r = e.state.doc.content.size, a = Math.min(n, r), i = Math.min(o, r);
|
|
5226
5228
|
e.commands.setTextSelection({ from: a, to: i });
|
|
5227
5229
|
}
|
|
5228
5230
|
function xu(e) {
|
|
5229
|
-
if (!
|
|
5231
|
+
if (!Se(e)) return;
|
|
5230
5232
|
const { selection: t } = e.state;
|
|
5231
5233
|
if (t.$anchor.pos > 0) {
|
|
5232
5234
|
e.commands.focus();
|
|
@@ -5250,7 +5252,7 @@ function Cu(e) {
|
|
|
5250
5252
|
};
|
|
5251
5253
|
}
|
|
5252
5254
|
function El({ editor: e, isOpen: t, onToggle: n, onClose: o, selectionState: r }) {
|
|
5253
|
-
const a =
|
|
5255
|
+
const a = Ge(), i = ne(null), s = ne(null), l = ne(null), f = ne([]), p = ne(null), [w, d] = re(""), b = (r == null ? void 0 : r.hasLink) ?? !1, h = (r == null ? void 0 : r.linkHref) ?? null;
|
|
5254
5256
|
ae(() => {
|
|
5255
5257
|
t ? (p.current = Ol(e), d(h || ""), setTimeout(() => {
|
|
5256
5258
|
var k, u;
|
|
@@ -5268,7 +5270,7 @@ function El({ editor: e, isOpen: t, onToggle: n, onClose: o, selectionState: r }
|
|
|
5268
5270
|
l.current.querySelectorAll("[data-tooltip]").forEach((u) => {
|
|
5269
5271
|
const C = u.getAttribute("data-tooltip");
|
|
5270
5272
|
if (C) {
|
|
5271
|
-
const L =
|
|
5273
|
+
const L = He(u, {
|
|
5272
5274
|
content: C,
|
|
5273
5275
|
placement: "top",
|
|
5274
5276
|
delay: [300, 0],
|
|
@@ -5318,7 +5320,7 @@ function El({ editor: e, isOpen: t, onToggle: n, onClose: o, selectionState: r }
|
|
|
5318
5320
|
ref: i,
|
|
5319
5321
|
active: b,
|
|
5320
5322
|
onClick: n,
|
|
5321
|
-
"data-tooltip":
|
|
5323
|
+
"data-tooltip": _e(a.toolbar.link),
|
|
5322
5324
|
"data-testid": "toolbar-link",
|
|
5323
5325
|
"aria-label": a.aria.linkButton,
|
|
5324
5326
|
children: /* @__PURE__ */ c(fi, {})
|
|
@@ -5340,7 +5342,7 @@ function El({ editor: e, isOpen: t, onToggle: n, onClose: o, selectionState: r }
|
|
|
5340
5342
|
boxShadow: "var(--pubwave-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05))",
|
|
5341
5343
|
padding: "var(--pubwave-spacing-2, 8px)",
|
|
5342
5344
|
minWidth: "280px",
|
|
5343
|
-
zIndex:
|
|
5345
|
+
zIndex: j.zIndex.dropdown + 1
|
|
5344
5346
|
},
|
|
5345
5347
|
children: /* @__PURE__ */ c("div", { ref: l, children: /* @__PURE__ */ c("form", { onSubmit: g, style: { display: "flex", flexDirection: "column", gap: "8px" }, children: /* @__PURE__ */ P("div", { style: { position: "relative", display: "flex", alignItems: "center" }, children: [
|
|
5346
5348
|
/* @__PURE__ */ c(
|
|
@@ -5509,7 +5511,7 @@ function Vn(e) {
|
|
|
5509
5511
|
}
|
|
5510
5512
|
}
|
|
5511
5513
|
function zl({ editor: e, onClose: t, buttonRef: n }) {
|
|
5512
|
-
const o =
|
|
5514
|
+
const o = Ge(), [r, a] = re([]), i = ne(null), s = ne([]);
|
|
5513
5515
|
ae(() => {
|
|
5514
5516
|
const h = Hl();
|
|
5515
5517
|
h.length > 0 && a(h);
|
|
@@ -5546,7 +5548,7 @@ function zl({ editor: e, onClose: t, buttonRef: n }) {
|
|
|
5546
5548
|
i.current.querySelectorAll("[data-tooltip]").forEach((g) => {
|
|
5547
5549
|
const x = g.getAttribute("data-tooltip");
|
|
5548
5550
|
if (x) {
|
|
5549
|
-
const m =
|
|
5551
|
+
const m = He(g, {
|
|
5550
5552
|
content: x,
|
|
5551
5553
|
placement: "top",
|
|
5552
5554
|
delay: [300, 0],
|
|
@@ -5576,7 +5578,7 @@ function zl({ editor: e, onClose: t, buttonRef: n }) {
|
|
|
5576
5578
|
boxShadow: "var(--pubwave-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1))",
|
|
5577
5579
|
padding: "12px",
|
|
5578
5580
|
minWidth: "240px",
|
|
5579
|
-
zIndex:
|
|
5581
|
+
zIndex: j.zIndex.dropdown + 1
|
|
5580
5582
|
},
|
|
5581
5583
|
children: /* @__PURE__ */ P("div", { ref: i, children: [
|
|
5582
5584
|
r.length > 0 && /* @__PURE__ */ P("div", { style: { marginBottom: "16px" }, children: [
|
|
@@ -5717,7 +5719,7 @@ function zl({ editor: e, onClose: t, buttonRef: n }) {
|
|
|
5717
5719
|
);
|
|
5718
5720
|
}
|
|
5719
5721
|
function $l({ editor: e, isOpen: t, onToggle: n, onClose: o }) {
|
|
5720
|
-
const r =
|
|
5722
|
+
const r = Ge(), a = ne(null), i = () => {
|
|
5721
5723
|
try {
|
|
5722
5724
|
const h = e.getAttributes("textColor");
|
|
5723
5725
|
return (h == null ? void 0 : h.color) || null;
|
|
@@ -5745,7 +5747,7 @@ function $l({ editor: e, isOpen: t, onToggle: n, onClose: o }) {
|
|
|
5745
5747
|
ref: a,
|
|
5746
5748
|
active: !!p,
|
|
5747
5749
|
onClick: n,
|
|
5748
|
-
"data-tooltip":
|
|
5750
|
+
"data-tooltip": _e(r.toolbar.textColor),
|
|
5749
5751
|
"data-testid": "toolbar-colorPicker",
|
|
5750
5752
|
"aria-label": r.aria.colorPickerButton,
|
|
5751
5753
|
children: /* @__PURE__ */ c(vi, { textColor: d, backgroundColor: b })
|
|
@@ -5765,7 +5767,7 @@ function jl({
|
|
|
5765
5767
|
editor: e,
|
|
5766
5768
|
selectionState: t
|
|
5767
5769
|
}) {
|
|
5768
|
-
const n =
|
|
5770
|
+
const n = Ge(), [o, r] = re(null), a = H(() => {
|
|
5769
5771
|
r(null), e.chain().focus().toggleBold().run();
|
|
5770
5772
|
}, [e]), i = H(() => {
|
|
5771
5773
|
r(null), e.chain().focus().toggleItalic().run();
|
|
@@ -5804,7 +5806,7 @@ function jl({
|
|
|
5804
5806
|
{
|
|
5805
5807
|
active: x,
|
|
5806
5808
|
onClick: a,
|
|
5807
|
-
"data-tooltip":
|
|
5809
|
+
"data-tooltip": _e(n.toolbar.bold, st.bold),
|
|
5808
5810
|
"data-testid": "toolbar-bold",
|
|
5809
5811
|
"aria-label": n.aria.boldButton,
|
|
5810
5812
|
children: /* @__PURE__ */ c(li, {})
|
|
@@ -5815,7 +5817,7 @@ function jl({
|
|
|
5815
5817
|
{
|
|
5816
5818
|
active: m,
|
|
5817
5819
|
onClick: i,
|
|
5818
|
-
"data-tooltip":
|
|
5820
|
+
"data-tooltip": _e(n.toolbar.italic, st.italic),
|
|
5819
5821
|
"data-testid": "toolbar-italic",
|
|
5820
5822
|
"aria-label": n.aria.italicButton,
|
|
5821
5823
|
children: /* @__PURE__ */ c(ci, {})
|
|
@@ -5826,7 +5828,7 @@ function jl({
|
|
|
5826
5828
|
{
|
|
5827
5829
|
active: A,
|
|
5828
5830
|
onClick: s,
|
|
5829
|
-
"data-tooltip":
|
|
5831
|
+
"data-tooltip": _e(n.toolbar.underline, st.underline),
|
|
5830
5832
|
"data-testid": "toolbar-underline",
|
|
5831
5833
|
"aria-label": n.aria.underlineButton,
|
|
5832
5834
|
children: /* @__PURE__ */ c(ui, {})
|
|
@@ -5837,7 +5839,7 @@ function jl({
|
|
|
5837
5839
|
{
|
|
5838
5840
|
active: k,
|
|
5839
5841
|
onClick: l,
|
|
5840
|
-
"data-tooltip":
|
|
5842
|
+
"data-tooltip": _e(n.toolbar.strike, st.strike),
|
|
5841
5843
|
"data-testid": "toolbar-strike",
|
|
5842
5844
|
"aria-label": n.aria.strikeButton,
|
|
5843
5845
|
children: /* @__PURE__ */ c(di, {})
|
|
@@ -5848,7 +5850,7 @@ function jl({
|
|
|
5848
5850
|
{
|
|
5849
5851
|
active: u,
|
|
5850
5852
|
onClick: f,
|
|
5851
|
-
"data-tooltip":
|
|
5853
|
+
"data-tooltip": _e(n.toolbar.code, st.code),
|
|
5852
5854
|
"data-testid": "toolbar-code",
|
|
5853
5855
|
"aria-label": n.aria.codeButton,
|
|
5854
5856
|
children: /* @__PURE__ */ c(pi, {})
|
|
@@ -5909,8 +5911,8 @@ function jl({
|
|
|
5909
5911
|
)
|
|
5910
5912
|
] });
|
|
5911
5913
|
}
|
|
5912
|
-
const
|
|
5913
|
-
function
|
|
5914
|
+
const lt = 8;
|
|
5915
|
+
function Ue(e) {
|
|
5914
5916
|
return !e.isDestroyed;
|
|
5915
5917
|
}
|
|
5916
5918
|
function Ul(e, t) {
|
|
@@ -5920,18 +5922,18 @@ function Ul(e, t) {
|
|
|
5920
5922
|
s,
|
|
5921
5923
|
b,
|
|
5922
5924
|
d,
|
|
5923
|
-
|
|
5925
|
+
lt
|
|
5924
5926
|
);
|
|
5925
5927
|
let g;
|
|
5926
|
-
h === "top" ? g = s - d -
|
|
5928
|
+
h === "top" ? g = s - d - lt : g = b + lt;
|
|
5927
5929
|
const m = Oo(
|
|
5928
5930
|
l,
|
|
5929
5931
|
f,
|
|
5930
5932
|
w,
|
|
5931
5933
|
"center",
|
|
5932
5934
|
// Default to center alignment
|
|
5933
|
-
|
|
5934
|
-
).left, A = window.innerWidth, k = window.innerHeight, u =
|
|
5935
|
+
lt
|
|
5936
|
+
).left, A = window.innerWidth, k = window.innerHeight, u = lt, C = Math.max(u, Math.min(m, A - w - u));
|
|
5935
5937
|
return { top: Math.max(u, Math.min(g, k - d - u)), left: C, visible: !0 };
|
|
5936
5938
|
}
|
|
5937
5939
|
function ql({
|
|
@@ -5946,8 +5948,8 @@ function ql({
|
|
|
5946
5948
|
visible: !1
|
|
5947
5949
|
}), [p, w] = re(
|
|
5948
5950
|
null
|
|
5949
|
-
), [d, b] = re(!1), h = ne([]), g = an(() =>
|
|
5950
|
-
if (
|
|
5951
|
+
), [d, b] = re(!1), h = ne([]), g = an(() => !Ue(e) || a.current || !d ? !1 : Vt(e), [e, p, d]), x = H(() => {
|
|
5952
|
+
if (!Ue(e)) return;
|
|
5951
5953
|
const k = Io(e);
|
|
5952
5954
|
w(k);
|
|
5953
5955
|
}, [e]), m = H(() => {
|
|
@@ -5956,13 +5958,13 @@ function ql({
|
|
|
5956
5958
|
return;
|
|
5957
5959
|
}
|
|
5958
5960
|
fe(() => {
|
|
5959
|
-
if (
|
|
5961
|
+
if (!Ue(e)) return;
|
|
5960
5962
|
const k = Ul(e, r.current);
|
|
5961
5963
|
f(k);
|
|
5962
5964
|
});
|
|
5963
5965
|
}, [e, g]);
|
|
5964
5966
|
ae(() => {
|
|
5965
|
-
if (
|
|
5967
|
+
if (!Ue(e)) return;
|
|
5966
5968
|
const u = e.view.dom.closest(".pubwave-editor"), C = (E) => {
|
|
5967
5969
|
const _ = E.target, Y = r.current;
|
|
5968
5970
|
if (Y && _ && Y.contains(_)) {
|
|
@@ -5983,16 +5985,16 @@ function ql({
|
|
|
5983
5985
|
return;
|
|
5984
5986
|
}
|
|
5985
5987
|
setTimeout(() => {
|
|
5986
|
-
|
|
5988
|
+
Ue(e) && (Vt(e) ? (x(), b(!0), fe(() => {
|
|
5987
5989
|
m();
|
|
5988
|
-
})) : (b(!1), f((
|
|
5990
|
+
})) : (b(!1), f((D) => ({ ...D, visible: !1 }))));
|
|
5989
5991
|
}, M ? 100 : 10);
|
|
5990
5992
|
};
|
|
5991
5993
|
return document.addEventListener("mousedown", C), document.addEventListener("mouseup", L), () => {
|
|
5992
5994
|
document.removeEventListener("mousedown", C), document.removeEventListener("mouseup", L);
|
|
5993
5995
|
};
|
|
5994
5996
|
}, [e, x, m]), ae(() => {
|
|
5995
|
-
if (
|
|
5997
|
+
if (!Ue(e)) return;
|
|
5996
5998
|
x();
|
|
5997
5999
|
const k = () => {
|
|
5998
6000
|
!a.current && d && x();
|
|
@@ -6020,7 +6022,7 @@ function ql({
|
|
|
6020
6022
|
window.removeEventListener("resize", k), window.removeEventListener("scroll", k, !0);
|
|
6021
6023
|
};
|
|
6022
6024
|
}, [g, m]);
|
|
6023
|
-
const A =
|
|
6025
|
+
const A = Ge();
|
|
6024
6026
|
return ae(() => {
|
|
6025
6027
|
if (!Nt()) {
|
|
6026
6028
|
if (!g || !l.visible || !r.current) {
|
|
@@ -6032,7 +6034,7 @@ function ql({
|
|
|
6032
6034
|
r.current.querySelectorAll("[data-tooltip]").forEach((u) => {
|
|
6033
6035
|
const C = u.getAttribute("data-tooltip");
|
|
6034
6036
|
if (C) {
|
|
6035
|
-
const L =
|
|
6037
|
+
const L = He(u, {
|
|
6036
6038
|
content: C,
|
|
6037
6039
|
placement: "top",
|
|
6038
6040
|
delay: [300, 0],
|
|
@@ -6046,11 +6048,11 @@ function ql({
|
|
|
6046
6048
|
h.current.forEach((k) => k.destroy()), h.current = [];
|
|
6047
6049
|
};
|
|
6048
6050
|
}
|
|
6049
|
-
}, [g, l.visible, A]),
|
|
6051
|
+
}, [g, l.visible, A]), Ue(e) ? /* @__PURE__ */ c(
|
|
6050
6052
|
"div",
|
|
6051
6053
|
{
|
|
6052
6054
|
ref: r,
|
|
6053
|
-
className:
|
|
6055
|
+
className: at(
|
|
6054
6056
|
"pubwave-toolbar",
|
|
6055
6057
|
g && l.visible ? "pubwave-toolbar--visible" : "pubwave-toolbar--hidden",
|
|
6056
6058
|
t
|
|
@@ -6059,11 +6061,11 @@ function ql({
|
|
|
6059
6061
|
position: "fixed",
|
|
6060
6062
|
top: l.top,
|
|
6061
6063
|
left: l.left,
|
|
6062
|
-
zIndex:
|
|
6064
|
+
zIndex: j.zIndex.toolbar,
|
|
6063
6065
|
opacity: g && l.visible ? 1 : 0,
|
|
6064
6066
|
pointerEvents: g && l.visible ? "auto" : "none",
|
|
6065
6067
|
transform: g && l.visible ? "translateY(0)" : "translateY(4px)",
|
|
6066
|
-
transition: `opacity ${
|
|
6068
|
+
transition: `opacity ${j.transition.fast}, transform ${j.transition.fast}`,
|
|
6067
6069
|
// Ensure toolbar is above editor container and can receive clicks
|
|
6068
6070
|
isolation: "isolate"
|
|
6069
6071
|
},
|
|
@@ -6163,14 +6165,14 @@ function Vl({ editor: e }) {
|
|
|
6163
6165
|
var ie, se, de;
|
|
6164
6166
|
const t = ne(null), n = ne(null), o = ne(!1), r = ne(null), [a, i] = re(!1), [s, l] = re(!1), [f, p] = re({ top: 0 }), [w, d] = re(!1), [b, h] = re(!1), [g, x] = re({ showRow: !1, showCol: !1, rect: null }), m = ne(null), A = ne(g), k = ne(null), u = ne(null), C = H(
|
|
6165
6167
|
(T) => {
|
|
6166
|
-
var N, W, G, Z, U, X, q,
|
|
6168
|
+
var N, W, G, Z, U, X, q, ee;
|
|
6167
6169
|
const R = A.current;
|
|
6168
|
-
R.showRow === T.showRow && R.showCol === T.showCol && ((N = R.rect) == null ? void 0 : N.top) === ((W = T.rect) == null ? void 0 : W.top) && ((G = R.rect) == null ? void 0 : G.left) === ((Z = T.rect) == null ? void 0 : Z.left) && ((U = R.rect) == null ? void 0 : U.width) === ((X = T.rect) == null ? void 0 : X.width) && ((q = R.rect) == null ? void 0 : q.height) === ((
|
|
6170
|
+
R.showRow === T.showRow && R.showCol === T.showCol && ((N = R.rect) == null ? void 0 : N.top) === ((W = T.rect) == null ? void 0 : W.top) && ((G = R.rect) == null ? void 0 : G.left) === ((Z = T.rect) == null ? void 0 : Z.left) && ((U = R.rect) == null ? void 0 : U.width) === ((X = T.rect) == null ? void 0 : X.width) && ((q = R.rect) == null ? void 0 : q.height) === ((ee = T.rect) == null ? void 0 : ee.height) || (A.current = T, x(T));
|
|
6169
6171
|
},
|
|
6170
6172
|
[]
|
|
6171
6173
|
), L = H(
|
|
6172
6174
|
(T, R) => {
|
|
6173
|
-
var
|
|
6175
|
+
var he;
|
|
6174
6176
|
if (o.current || w || b) {
|
|
6175
6177
|
C({ showRow: !1, showCol: !1, rect: null }), m.current = null;
|
|
6176
6178
|
return;
|
|
@@ -6182,7 +6184,7 @@ function Vl({ editor: e }) {
|
|
|
6182
6184
|
}
|
|
6183
6185
|
const W = N.closest(".pubwave-table-add-column"), G = N.closest(".pubwave-table-add-row");
|
|
6184
6186
|
if (W || G) {
|
|
6185
|
-
const te = ((
|
|
6187
|
+
const te = ((he = m.current) == null ? void 0 : he.getBoundingClientRect()) ?? A.current.rect;
|
|
6186
6188
|
if (!te)
|
|
6187
6189
|
return;
|
|
6188
6190
|
C({
|
|
@@ -6195,23 +6197,23 @@ function Vl({ editor: e }) {
|
|
|
6195
6197
|
const Z = N.closest(".tableWrapper");
|
|
6196
6198
|
let U = N.closest("table");
|
|
6197
6199
|
!U && Z instanceof HTMLElement && (U = Z.querySelector("table"));
|
|
6198
|
-
const X = 14, q = 56,
|
|
6199
|
-
const
|
|
6200
|
-
return { nearRight:
|
|
6200
|
+
const X = 14, q = 56, ee = 20, ce = (te) => {
|
|
6201
|
+
const le = T.clientY >= te.top - ee && T.clientY <= te.bottom + ee, ue = T.clientX >= te.left - ee && T.clientX <= te.right + ee, Ie = le && T.clientX >= te.right - X && T.clientX <= te.right + q, ge = ue && T.clientY >= te.bottom - X && T.clientY <= te.bottom + q;
|
|
6202
|
+
return { nearRight: Ie, nearBottom: ge };
|
|
6201
6203
|
};
|
|
6202
6204
|
if (U && R.contains(U)) {
|
|
6203
|
-
const te = U.getBoundingClientRect(), { nearRight:
|
|
6204
|
-
if (!
|
|
6205
|
+
const te = U.getBoundingClientRect(), { nearRight: le, nearBottom: ue } = ce(te);
|
|
6206
|
+
if (!le && !ue) {
|
|
6205
6207
|
C({ showRow: !1, showCol: !1, rect: null }), m.current = null;
|
|
6206
6208
|
return;
|
|
6207
6209
|
}
|
|
6208
|
-
m.current = U, C({ showRow:
|
|
6210
|
+
m.current = U, C({ showRow: ue, showCol: le, rect: te });
|
|
6209
6211
|
return;
|
|
6210
6212
|
}
|
|
6211
6213
|
if (m.current) {
|
|
6212
|
-
const te = m.current.getBoundingClientRect(), { nearRight:
|
|
6213
|
-
if (
|
|
6214
|
-
C({ showRow:
|
|
6214
|
+
const te = m.current.getBoundingClientRect(), { nearRight: le, nearBottom: ue } = ce(te);
|
|
6215
|
+
if (le || ue) {
|
|
6216
|
+
C({ showRow: ue, showCol: le, rect: te });
|
|
6215
6217
|
return;
|
|
6216
6218
|
}
|
|
6217
6219
|
}
|
|
@@ -6222,7 +6224,7 @@ function Vl({ editor: e }) {
|
|
|
6222
6224
|
const T = m.current;
|
|
6223
6225
|
if (!T) return null;
|
|
6224
6226
|
try {
|
|
6225
|
-
const R = e.view.posAtDOM(T, 0), N =
|
|
6227
|
+
const R = e.view.posAtDOM(T, 0), N = gt(e.state.doc, R);
|
|
6226
6228
|
return !N || N.node.type.name !== "table" ? null : N;
|
|
6227
6229
|
} catch {
|
|
6228
6230
|
return null;
|
|
@@ -6299,13 +6301,13 @@ function Vl({ editor: e }) {
|
|
|
6299
6301
|
Z.offsetHeight;
|
|
6300
6302
|
const U = Z.getBoundingClientRect();
|
|
6301
6303
|
try {
|
|
6302
|
-
const q = window.getComputedStyle(Z),
|
|
6303
|
-
if (
|
|
6304
|
-
const
|
|
6305
|
-
isNaN(
|
|
6304
|
+
const q = window.getComputedStyle(Z), ee = q.lineHeight;
|
|
6305
|
+
if (ee && ee !== "normal") {
|
|
6306
|
+
const ce = parseFloat(ee);
|
|
6307
|
+
isNaN(ce) || (G = ce / 2);
|
|
6306
6308
|
} else {
|
|
6307
|
-
const
|
|
6308
|
-
isNaN(
|
|
6309
|
+
const ce = parseFloat(q.fontSize);
|
|
6310
|
+
isNaN(ce) || (G = ce * 1.5 / 2);
|
|
6309
6311
|
}
|
|
6310
6312
|
} catch {
|
|
6311
6313
|
}
|
|
@@ -6330,8 +6332,8 @@ function Vl({ editor: e }) {
|
|
|
6330
6332
|
const q = X.target;
|
|
6331
6333
|
if (!q || (B(), q.closest(".pubwave-block-handle")) || !T.contains(q))
|
|
6332
6334
|
return;
|
|
6333
|
-
const
|
|
6334
|
-
|
|
6335
|
+
const ee = Fl(q, T, e);
|
|
6336
|
+
ee && (ee !== n.current ? J(ee) : i(!0));
|
|
6335
6337
|
}, W = (X) => {
|
|
6336
6338
|
if (o.current) return;
|
|
6337
6339
|
const q = X.relatedTarget;
|
|
@@ -6438,7 +6440,7 @@ function Vl({ editor: e }) {
|
|
|
6438
6440
|
window.removeEventListener("resize", N), k.current && (k.current.disconnect(), k.current = null), u.current = null;
|
|
6439
6441
|
};
|
|
6440
6442
|
}, [g.showRow, g.showCol, C]);
|
|
6441
|
-
const
|
|
6443
|
+
const D = H(() => {
|
|
6442
6444
|
const T = n.current;
|
|
6443
6445
|
if (T)
|
|
6444
6446
|
try {
|
|
@@ -6462,7 +6464,7 @@ function Vl({ editor: e }) {
|
|
|
6462
6464
|
o.current = !0, requestAnimationFrame(() => {
|
|
6463
6465
|
l(!0);
|
|
6464
6466
|
});
|
|
6465
|
-
const N = e.view.posAtDOM(R, 0), W =
|
|
6467
|
+
const N = e.view.posAtDOM(R, 0), W = gt(e.state.doc, N);
|
|
6466
6468
|
if (!W)
|
|
6467
6469
|
return;
|
|
6468
6470
|
const G = W.pos, Z = `block-${G}`;
|
|
@@ -6470,29 +6472,29 @@ function Vl({ editor: e }) {
|
|
|
6470
6472
|
const U = R.cloneNode(!0);
|
|
6471
6473
|
U.classList.add("pubwave-block--drag-preview"), U.style.opacity = "1";
|
|
6472
6474
|
const X = (te) => {
|
|
6473
|
-
te.style.setProperty("color", "#9b9a97", "important"), te.style.setProperty("border-color", "#9b9a97", "important"), te.style.setProperty("--pubwave-text", "#9b9a97", "important"), Array.from(te.children).forEach((
|
|
6474
|
-
|
|
6475
|
+
te.style.setProperty("color", "#9b9a97", "important"), te.style.setProperty("border-color", "#9b9a97", "important"), te.style.setProperty("--pubwave-text", "#9b9a97", "important"), Array.from(te.children).forEach((le) => {
|
|
6476
|
+
le instanceof HTMLElement && X(le);
|
|
6475
6477
|
});
|
|
6476
6478
|
};
|
|
6477
6479
|
X(U);
|
|
6478
6480
|
const q = R.getBoundingClientRect();
|
|
6479
6481
|
U.style.width = `${q.width}px`, U.style.position = "static", U.style.transform = "none";
|
|
6480
|
-
const
|
|
6481
|
-
|
|
6482
|
-
const
|
|
6483
|
-
|
|
6484
|
-
const
|
|
6485
|
-
|
|
6486
|
-
document.body.removeChild(
|
|
6482
|
+
const ee = document.createElement("div");
|
|
6483
|
+
ee.className = "pubwave-editor";
|
|
6484
|
+
const ce = document.createElement("div");
|
|
6485
|
+
ce.className = "pubwave-editor__content";
|
|
6486
|
+
const he = document.createElement("div");
|
|
6487
|
+
he.className = "ProseMirror", he.appendChild(U), ce.appendChild(he), ee.appendChild(ce), ee.style.position = "absolute", ee.style.top = "-9999px", ee.style.left = "-9999px", document.body.appendChild(ee), T.dataTransfer.setDragImage(U, 0, 0), setTimeout(() => {
|
|
6488
|
+
document.body.removeChild(ee);
|
|
6487
6489
|
}, 0);
|
|
6488
6490
|
}, [e]), K = H(() => {
|
|
6489
6491
|
o.current = !1, l(!1), n.current && n.current.classList.remove("pubwave-block--dragging"), i(!1);
|
|
6490
6492
|
}, []), V = g.showRow || g.showCol;
|
|
6491
6493
|
if (w || b || !a && !V)
|
|
6492
6494
|
return null;
|
|
6493
|
-
const
|
|
6495
|
+
const z = ((ie = m.current) == null ? void 0 : ie.closest(".pubwave-editor")) || ((se = t.current) == null ? void 0 : se.closest(".pubwave-editor")), S = z ? z.getBoundingClientRect() : null, O = ((de = m.current) == null ? void 0 : de.getBoundingClientRect()) || g.rect;
|
|
6494
6496
|
return /* @__PURE__ */ P(Yt, { children: [
|
|
6495
|
-
|
|
6497
|
+
O && S && /* @__PURE__ */ P(Yt, { children: [
|
|
6496
6498
|
g.showCol && /* @__PURE__ */ c(
|
|
6497
6499
|
"button",
|
|
6498
6500
|
{
|
|
@@ -6503,15 +6505,15 @@ function Vl({ editor: e }) {
|
|
|
6503
6505
|
},
|
|
6504
6506
|
style: {
|
|
6505
6507
|
position: "fixed",
|
|
6506
|
-
left: `${
|
|
6507
|
-
top: `${
|
|
6508
|
+
left: `${O.right + 2}px`,
|
|
6509
|
+
top: `${O.top}px`,
|
|
6508
6510
|
width: "16px",
|
|
6509
|
-
height: `${
|
|
6511
|
+
height: `${O.height}px`,
|
|
6510
6512
|
border: "none",
|
|
6511
6513
|
padding: 0,
|
|
6512
6514
|
background: "transparent",
|
|
6513
6515
|
cursor: "pointer",
|
|
6514
|
-
zIndex:
|
|
6516
|
+
zIndex: j.zIndex.dragHandle
|
|
6515
6517
|
},
|
|
6516
6518
|
"aria-label": "Add column",
|
|
6517
6519
|
title: "Add column",
|
|
@@ -6524,7 +6526,7 @@ function Vl({ editor: e }) {
|
|
|
6524
6526
|
height: "100%",
|
|
6525
6527
|
margin: "0 auto",
|
|
6526
6528
|
borderRadius: "999px",
|
|
6527
|
-
background: `var(--pubwave-border, ${
|
|
6529
|
+
background: `var(--pubwave-border, ${j.colors.border})`
|
|
6528
6530
|
},
|
|
6529
6531
|
children: /* @__PURE__ */ c(
|
|
6530
6532
|
"div",
|
|
@@ -6537,7 +6539,7 @@ function Vl({ editor: e }) {
|
|
|
6537
6539
|
display: "flex",
|
|
6538
6540
|
alignItems: "center",
|
|
6539
6541
|
justifyContent: "center",
|
|
6540
|
-
color: `var(--pubwave-text-muted, ${
|
|
6542
|
+
color: `var(--pubwave-text-muted, ${j.colors.textMuted})`,
|
|
6541
6543
|
fontSize: "14px",
|
|
6542
6544
|
fontWeight: 700,
|
|
6543
6545
|
lineHeight: "14px"
|
|
@@ -6559,15 +6561,15 @@ function Vl({ editor: e }) {
|
|
|
6559
6561
|
},
|
|
6560
6562
|
style: {
|
|
6561
6563
|
position: "fixed",
|
|
6562
|
-
left: `${
|
|
6563
|
-
top: `${
|
|
6564
|
-
width: `${
|
|
6564
|
+
left: `${O.left}px`,
|
|
6565
|
+
top: `${O.bottom + 2}px`,
|
|
6566
|
+
width: `${O.width}px`,
|
|
6565
6567
|
height: "16px",
|
|
6566
6568
|
border: "none",
|
|
6567
6569
|
padding: 0,
|
|
6568
6570
|
background: "transparent",
|
|
6569
6571
|
cursor: "pointer",
|
|
6570
|
-
zIndex:
|
|
6572
|
+
zIndex: j.zIndex.dragHandle
|
|
6571
6573
|
},
|
|
6572
6574
|
"aria-label": "Add row",
|
|
6573
6575
|
title: "Add row",
|
|
@@ -6580,7 +6582,7 @@ function Vl({ editor: e }) {
|
|
|
6580
6582
|
height: "12px",
|
|
6581
6583
|
margin: "0 auto",
|
|
6582
6584
|
borderRadius: "999px",
|
|
6583
|
-
background: `var(--pubwave-border, ${
|
|
6585
|
+
background: `var(--pubwave-border, ${j.colors.border})`
|
|
6584
6586
|
},
|
|
6585
6587
|
children: /* @__PURE__ */ c(
|
|
6586
6588
|
"div",
|
|
@@ -6593,7 +6595,7 @@ function Vl({ editor: e }) {
|
|
|
6593
6595
|
display: "flex",
|
|
6594
6596
|
alignItems: "center",
|
|
6595
6597
|
justifyContent: "center",
|
|
6596
|
-
color: `var(--pubwave-text-muted, ${
|
|
6598
|
+
color: `var(--pubwave-text-muted, ${j.colors.textMuted})`,
|
|
6597
6599
|
fontSize: "14px",
|
|
6598
6600
|
fontWeight: 700,
|
|
6599
6601
|
lineHeight: "14px"
|
|
@@ -6621,8 +6623,8 @@ function Vl({ editor: e }) {
|
|
|
6621
6623
|
alignItems: "center",
|
|
6622
6624
|
gap: "2px",
|
|
6623
6625
|
pointerEvents: "auto",
|
|
6624
|
-
transition: `opacity ${
|
|
6625
|
-
zIndex:
|
|
6626
|
+
transition: `opacity ${j.transition.fast}`,
|
|
6627
|
+
zIndex: j.zIndex.dragHandle,
|
|
6626
6628
|
opacity: a && !s ? 1 : 0
|
|
6627
6629
|
},
|
|
6628
6630
|
onMouseEnter: (T) => {
|
|
@@ -6641,7 +6643,7 @@ function Vl({ editor: e }) {
|
|
|
6641
6643
|
{
|
|
6642
6644
|
type: "button",
|
|
6643
6645
|
className: "pubwave-block-handle__add",
|
|
6644
|
-
onClick:
|
|
6646
|
+
onClick: D,
|
|
6645
6647
|
"data-testid": "add-block-button",
|
|
6646
6648
|
style: {
|
|
6647
6649
|
width: "var(--pubwave-button-width, 28px)",
|
|
@@ -6650,11 +6652,11 @@ function Vl({ editor: e }) {
|
|
|
6650
6652
|
alignItems: "center",
|
|
6651
6653
|
justifyContent: "center",
|
|
6652
6654
|
border: "none",
|
|
6653
|
-
borderRadius:
|
|
6655
|
+
borderRadius: j.borderRadius.sm,
|
|
6654
6656
|
background: "transparent",
|
|
6655
|
-
color: `var(--pubwave-text-muted, ${
|
|
6657
|
+
color: `var(--pubwave-text-muted, ${j.colors.textMuted})`,
|
|
6656
6658
|
cursor: "pointer",
|
|
6657
|
-
transition: `background-color ${
|
|
6659
|
+
transition: `background-color ${j.transition.fast}, color ${j.transition.fast}`
|
|
6658
6660
|
},
|
|
6659
6661
|
title: "Add block",
|
|
6660
6662
|
"aria-label": "Add block below",
|
|
@@ -6679,11 +6681,11 @@ function Vl({ editor: e }) {
|
|
|
6679
6681
|
display: "flex",
|
|
6680
6682
|
alignItems: "center",
|
|
6681
6683
|
justifyContent: "center",
|
|
6682
|
-
borderRadius:
|
|
6684
|
+
borderRadius: j.borderRadius.sm,
|
|
6683
6685
|
background: "transparent",
|
|
6684
|
-
color: `var(--pubwave-text-muted, ${
|
|
6686
|
+
color: `var(--pubwave-text-muted, ${j.colors.textMuted})`,
|
|
6685
6687
|
cursor: "grab",
|
|
6686
|
-
transition: `background-color ${
|
|
6688
|
+
transition: `background-color ${j.transition.fast}, color ${j.transition.fast}`
|
|
6687
6689
|
},
|
|
6688
6690
|
role: "button",
|
|
6689
6691
|
tabIndex: -1,
|
|
@@ -6721,7 +6723,7 @@ function Xl({
|
|
|
6721
6723
|
return /* @__PURE__ */ P(
|
|
6722
6724
|
"div",
|
|
6723
6725
|
{
|
|
6724
|
-
className:
|
|
6726
|
+
className: at(
|
|
6725
6727
|
"pubwave-drop-indicator",
|
|
6726
6728
|
e && "pubwave-drop-indicator--visible",
|
|
6727
6729
|
`pubwave-drop-indicator--${t}`,
|
|
@@ -6733,14 +6735,14 @@ function Xl({
|
|
|
6733
6735
|
left: 0,
|
|
6734
6736
|
right: 0,
|
|
6735
6737
|
height: "2px",
|
|
6736
|
-
backgroundColor: `var(--pubwave-drop-indicator-color, ${
|
|
6738
|
+
backgroundColor: `var(--pubwave-drop-indicator-color, ${j.colors.dropIndicator})`,
|
|
6737
6739
|
borderRadius: "1px",
|
|
6738
6740
|
// Position based on before/after
|
|
6739
6741
|
...t === "before" ? { top: "-1px" } : { bottom: "-1px" },
|
|
6740
6742
|
// Visibility and animation
|
|
6741
6743
|
opacity: e ? 1 : 0,
|
|
6742
6744
|
transform: e ? "scaleX(1)" : "scaleX(0.8)",
|
|
6743
|
-
transition: `opacity ${
|
|
6745
|
+
transition: `opacity ${j.transition.fast}, transform ${j.transition.fast}`,
|
|
6744
6746
|
// Ensure it's above other content
|
|
6745
6747
|
zIndex: 10,
|
|
6746
6748
|
pointerEvents: "none"
|
|
@@ -6766,9 +6768,9 @@ function Yn({ position: e, visible: t }) {
|
|
|
6766
6768
|
width: "8px",
|
|
6767
6769
|
height: "8px",
|
|
6768
6770
|
borderRadius: "50%",
|
|
6769
|
-
backgroundColor: `var(--pubwave-drop-indicator-color, ${
|
|
6771
|
+
backgroundColor: `var(--pubwave-drop-indicator-color, ${j.colors.dropIndicator})`,
|
|
6770
6772
|
opacity: t ? 1 : 0,
|
|
6771
|
-
transition: `opacity ${
|
|
6773
|
+
transition: `opacity ${j.transition.fast}`
|
|
6772
6774
|
}
|
|
6773
6775
|
}
|
|
6774
6776
|
);
|
|
@@ -6776,10 +6778,10 @@ function Yn({ position: e, visible: t }) {
|
|
|
6776
6778
|
function Kl({ editor: e }) {
|
|
6777
6779
|
const [t, n] = re(null), [o, r] = re(null);
|
|
6778
6780
|
return ae(() => {
|
|
6779
|
-
const a =
|
|
6781
|
+
const a = ve.getState(e.state);
|
|
6780
6782
|
a && n(a);
|
|
6781
6783
|
const i = () => {
|
|
6782
|
-
const s =
|
|
6784
|
+
const s = ve.getState(e.state);
|
|
6783
6785
|
s && (s.dropTargetPos !== (t == null ? void 0 : t.dropTargetPos) || s.dropPosition !== (t == null ? void 0 : t.dropPosition)) && n(s);
|
|
6784
6786
|
};
|
|
6785
6787
|
return e.on("transaction", i), () => {
|
|
@@ -6961,7 +6963,7 @@ const Tu = gr(
|
|
|
6961
6963
|
} : {}
|
|
6962
6964
|
};
|
|
6963
6965
|
if (g && (M["--pubwave-container-width"] = g, M.width = g, M["--pubwave-container-max-width"] = g, M.maxWidth = g), x && (M["--pubwave-container-height"] = x, M.height = x), m && (M["--pubwave-container-min-height"] = m, M.minHeight = m), i != null && i.colors) {
|
|
6964
|
-
const { colors: v } = i,
|
|
6966
|
+
const { colors: v } = i, D = (v.text || "#1f2937").toLowerCase().trim(), F = D.startsWith("#f") || D.startsWith("#e") || D.includes("f1") || D.includes("f3") || D.includes("f0") || D.includes("fdf") || D.includes("ffb") || D.includes("ffc") || D.includes("ffd") || D.includes("ffe") || D.includes("fff") || D.includes("e0") || D.includes("e5") || D.includes("ecf") || D.includes("eef");
|
|
6965
6967
|
v.background && (v.background.includes("gradient") ? (M.background = v.background, F ? (M["--pubwave-surface"] = "rgba(38, 38, 38, 0.95)", M["--pubwave-bg"] = "#1a1a1a") : (M["--pubwave-surface"] = "rgba(255, 255, 255, 0.95)", M["--pubwave-bg"] = "#ffffff")) : (M["--pubwave-bg"] = v.background, M["--pubwave-surface"] = v.background)), v.text && (M["--pubwave-text"] = v.text), v.textMuted && (M["--pubwave-text-muted"] = v.textMuted), v.border && (M["--pubwave-border"] = v.border), v.primary && (M["--pubwave-primary"] = v.primary), v.linkColor && (M["--pubwave-link-color"] = v.linkColor), F ? M["--pubwave-hover"] = "rgba(255, 255, 255, 0.1)" : M["--pubwave-hover"] = "rgba(0, 0, 0, 0.05)";
|
|
6966
6968
|
}
|
|
6967
6969
|
if (i != null && i.backgroundImage) {
|
|
@@ -6983,9 +6985,9 @@ const Tu = gr(
|
|
|
6983
6985
|
if (!C || !r || v.button !== 0 || v.defaultPrevented) return;
|
|
6984
6986
|
const B = v.target;
|
|
6985
6987
|
if (!B) return;
|
|
6986
|
-
const
|
|
6987
|
-
if (
|
|
6988
|
-
const F =
|
|
6988
|
+
const D = C.view.dom;
|
|
6989
|
+
if (D && D.contains(B)) return;
|
|
6990
|
+
const F = D == null ? void 0 : D.lastElementChild, K = v.currentTarget.getBoundingClientRect();
|
|
6989
6991
|
if (v.clientX < K.left || v.clientX > K.right || v.clientY < K.top || v.clientY > K.bottom)
|
|
6990
6992
|
return;
|
|
6991
6993
|
if (F) {
|
|
@@ -6993,10 +6995,10 @@ const Tu = gr(
|
|
|
6993
6995
|
if (v.clientY <= ie.bottom + 1)
|
|
6994
6996
|
return;
|
|
6995
6997
|
}
|
|
6996
|
-
const { state: V } = C,
|
|
6997
|
-
if (!
|
|
6998
|
-
const S = V.doc.content.size,
|
|
6999
|
-
if (
|
|
6998
|
+
const { state: V } = C, z = V.schema.nodes.paragraph;
|
|
6999
|
+
if (!z) return;
|
|
7000
|
+
const S = V.doc.content.size, O = V.doc.lastChild;
|
|
7001
|
+
if (O && O.type === z && O.content.size === 0) {
|
|
7000
7002
|
C.chain().focus().setTextSelection(Math.max(1, S - 1)).run();
|
|
7001
7003
|
return;
|
|
7002
7004
|
}
|
|
@@ -7021,62 +7023,62 @@ const Tu = gr(
|
|
|
7021
7023
|
) });
|
|
7022
7024
|
}
|
|
7023
7025
|
);
|
|
7024
|
-
function
|
|
7026
|
+
function Xe(e) {
|
|
7025
7027
|
return !e.isDestroyed;
|
|
7026
7028
|
}
|
|
7027
7029
|
function Jl(e) {
|
|
7028
|
-
if (!
|
|
7030
|
+
if (!Xe(e))
|
|
7029
7031
|
return { success: !1, message: "Editor not available" };
|
|
7030
7032
|
const t = e.chain().focus().toggleBold().run();
|
|
7031
|
-
return
|
|
7033
|
+
return Ye(e), {
|
|
7032
7034
|
success: t,
|
|
7033
7035
|
message: t ? "Bold toggled" : "Could not toggle bold"
|
|
7034
7036
|
};
|
|
7035
7037
|
}
|
|
7036
7038
|
function Zl(e) {
|
|
7037
|
-
if (!
|
|
7039
|
+
if (!Xe(e))
|
|
7038
7040
|
return { success: !1, message: "Editor not available" };
|
|
7039
7041
|
const t = e.chain().focus().toggleItalic().run();
|
|
7040
|
-
return
|
|
7042
|
+
return Ye(e), {
|
|
7041
7043
|
success: t,
|
|
7042
7044
|
message: t ? "Italic toggled" : "Could not toggle italic"
|
|
7043
7045
|
};
|
|
7044
7046
|
}
|
|
7045
7047
|
function Ql(e, t) {
|
|
7046
|
-
if (!
|
|
7048
|
+
if (!Xe(e))
|
|
7047
7049
|
return { success: !1, message: "Editor not available" };
|
|
7048
7050
|
if (!t.trim())
|
|
7049
7051
|
return { success: !1, message: "URL is required" };
|
|
7050
7052
|
let n = t.trim();
|
|
7051
7053
|
!/^https?:\/\//i.test(n) && !n.startsWith("/") && (n = `https://${n}`);
|
|
7052
7054
|
const o = e.chain().focus().setLink({ href: n }).run();
|
|
7053
|
-
return
|
|
7055
|
+
return Ye(e), {
|
|
7054
7056
|
success: o,
|
|
7055
7057
|
message: o ? "Link added" : "Could not add link"
|
|
7056
7058
|
};
|
|
7057
7059
|
}
|
|
7058
7060
|
function ec(e) {
|
|
7059
|
-
if (!
|
|
7061
|
+
if (!Xe(e))
|
|
7060
7062
|
return { success: !1, message: "Editor not available" };
|
|
7061
7063
|
const t = e.chain().focus().unsetLink().run();
|
|
7062
|
-
return
|
|
7064
|
+
return Ye(e), {
|
|
7063
7065
|
success: t,
|
|
7064
7066
|
message: t ? "Link removed" : "Could not remove link"
|
|
7065
7067
|
};
|
|
7066
7068
|
}
|
|
7067
7069
|
function tc(e, t = window.prompt.bind(window)) {
|
|
7068
|
-
if (!
|
|
7070
|
+
if (!Xe(e))
|
|
7069
7071
|
return { success: !1, message: "Editor not available" };
|
|
7070
7072
|
if (e.isActive("link"))
|
|
7071
7073
|
return ec(e);
|
|
7072
7074
|
const o = t("Enter URL:");
|
|
7073
|
-
return o ? Ql(e, o) : (
|
|
7075
|
+
return o ? Ql(e, o) : (Ye(e), { success: !1, message: "Link cancelled" });
|
|
7074
7076
|
}
|
|
7075
7077
|
function Lu(e, t) {
|
|
7076
|
-
if (!
|
|
7078
|
+
if (!Xe(e))
|
|
7077
7079
|
return { success: !1, message: "Editor not available" };
|
|
7078
7080
|
const n = e.chain().focus().setHeading({ level: t }).run();
|
|
7079
|
-
|
|
7081
|
+
Ye(e);
|
|
7080
7082
|
const o = String(t);
|
|
7081
7083
|
return {
|
|
7082
7084
|
success: n,
|
|
@@ -7084,10 +7086,10 @@ function Lu(e, t) {
|
|
|
7084
7086
|
};
|
|
7085
7087
|
}
|
|
7086
7088
|
function Au(e) {
|
|
7087
|
-
if (!
|
|
7089
|
+
if (!Xe(e))
|
|
7088
7090
|
return { success: !1, message: "Editor not available" };
|
|
7089
7091
|
const t = e.chain().focus().setParagraph().run();
|
|
7090
|
-
return
|
|
7092
|
+
return Ye(e), {
|
|
7091
7093
|
success: t,
|
|
7092
7094
|
message: t ? "Paragraph applied" : "Could not set paragraph"
|
|
7093
7095
|
};
|
|
@@ -7158,7 +7160,7 @@ function Pu({
|
|
|
7158
7160
|
"div",
|
|
7159
7161
|
{
|
|
7160
7162
|
ref: i,
|
|
7161
|
-
className:
|
|
7163
|
+
className: at(
|
|
7162
7164
|
"pubwave-drag-handle",
|
|
7163
7165
|
b && "pubwave-drag-handle--visible",
|
|
7164
7166
|
n && "pubwave-drag-handle--dragging",
|
|
@@ -7181,7 +7183,7 @@ function Pu({
|
|
|
7181
7183
|
// Visual styling
|
|
7182
7184
|
cursor: n ? "grabbing" : "grab",
|
|
7183
7185
|
opacity: b ? 1 : 0,
|
|
7184
|
-
transition: `opacity ${
|
|
7186
|
+
transition: `opacity ${j.transition.fast}`,
|
|
7185
7187
|
// Ensure clickable without stealing text selection
|
|
7186
7188
|
userSelect: "none",
|
|
7187
7189
|
WebkitUserSelect: "none"
|
|
@@ -7204,9 +7206,9 @@ function Pu({
|
|
|
7204
7206
|
display: "flex",
|
|
7205
7207
|
alignItems: "center",
|
|
7206
7208
|
justifyContent: "center",
|
|
7207
|
-
borderRadius:
|
|
7208
|
-
backgroundColor: s ? `var(--pubwave-drag-handle-active-bg, ${
|
|
7209
|
-
transition: `background-color ${
|
|
7209
|
+
borderRadius: j.borderRadius.sm,
|
|
7210
|
+
backgroundColor: s ? `var(--pubwave-drag-handle-active-bg, ${j.colors.focus})` : "transparent",
|
|
7211
|
+
transition: `background-color ${j.transition.fast}`
|
|
7210
7212
|
},
|
|
7211
7213
|
children: /* @__PURE__ */ c(nc, {})
|
|
7212
7214
|
}
|
|
@@ -7223,7 +7225,7 @@ function nc() {
|
|
|
7223
7225
|
viewBox: "0 0 12 16",
|
|
7224
7226
|
fill: "currentColor",
|
|
7225
7227
|
style: {
|
|
7226
|
-
color: `var(--pubwave-drag-handle-color, ${
|
|
7228
|
+
color: `var(--pubwave-drag-handle-color, ${j.colors.textMuted})`
|
|
7227
7229
|
},
|
|
7228
7230
|
children: [
|
|
7229
7231
|
/* @__PURE__ */ c("circle", { cx: "3", cy: "3", r: "1.5" }),
|
|
@@ -7318,15 +7320,15 @@ function ic({
|
|
|
7318
7320
|
const s = H(() => {
|
|
7319
7321
|
i(!1), o == null || o();
|
|
7320
7322
|
}, [o]), l = {
|
|
7321
|
-
info:
|
|
7323
|
+
info: j.colors.text,
|
|
7322
7324
|
success: "var(--pubwave-color-success, #10b981)",
|
|
7323
|
-
error:
|
|
7325
|
+
error: j.colors.error,
|
|
7324
7326
|
warning: "var(--pubwave-color-warning, #f59e0b)"
|
|
7325
7327
|
};
|
|
7326
7328
|
return /* @__PURE__ */ P(
|
|
7327
7329
|
"div",
|
|
7328
7330
|
{
|
|
7329
|
-
className:
|
|
7331
|
+
className: at(
|
|
7330
7332
|
"pubwave-toast",
|
|
7331
7333
|
`pubwave-toast--${t}`,
|
|
7332
7334
|
a ? "pubwave-toast--visible" : "pubwave-toast--hidden",
|
|
@@ -7337,15 +7339,15 @@ function ic({
|
|
|
7337
7339
|
bottom: "24px",
|
|
7338
7340
|
left: "50%",
|
|
7339
7341
|
transform: `translateX(-50%) translateY(${a ? "0" : "16px"})`,
|
|
7340
|
-
padding: `${
|
|
7341
|
-
backgroundColor: `var(--pubwave-toast-bg, ${
|
|
7342
|
-
border: `1px solid var(--pubwave-toast-border, ${
|
|
7343
|
-
borderRadius:
|
|
7344
|
-
boxShadow:
|
|
7342
|
+
padding: `${j.spacing.sm} ${j.spacing.md}`,
|
|
7343
|
+
backgroundColor: `var(--pubwave-toast-bg, ${j.colors.surface})`,
|
|
7344
|
+
border: `1px solid var(--pubwave-toast-border, ${j.colors.border})`,
|
|
7345
|
+
borderRadius: j.borderRadius.md,
|
|
7346
|
+
boxShadow: j.shadow.md,
|
|
7345
7347
|
color: l[t],
|
|
7346
|
-
fontSize:
|
|
7348
|
+
fontSize: j.typography.fontSizeSmall,
|
|
7347
7349
|
opacity: a ? 1 : 0,
|
|
7348
|
-
transition: `opacity ${
|
|
7350
|
+
transition: `opacity ${j.transition.normal}, transform ${j.transition.normal}`,
|
|
7349
7351
|
zIndex: 100,
|
|
7350
7352
|
maxWidth: "400px",
|
|
7351
7353
|
textAlign: "center"
|
|
@@ -7361,11 +7363,11 @@ function ic({
|
|
|
7361
7363
|
className: "pubwave-toast__dismiss",
|
|
7362
7364
|
onClick: s,
|
|
7363
7365
|
style: {
|
|
7364
|
-
marginLeft:
|
|
7366
|
+
marginLeft: j.spacing.sm,
|
|
7365
7367
|
padding: "0 4px",
|
|
7366
7368
|
background: "none",
|
|
7367
7369
|
border: "none",
|
|
7368
|
-
color:
|
|
7370
|
+
color: j.colors.textMuted,
|
|
7369
7371
|
cursor: "pointer",
|
|
7370
7372
|
fontSize: "16px",
|
|
7371
7373
|
lineHeight: 1
|
|
@@ -7428,7 +7430,7 @@ export {
|
|
|
7428
7430
|
cn as canUseDOM,
|
|
7429
7431
|
Fc as cancelDrag,
|
|
7430
7432
|
uu as clearFormatting,
|
|
7431
|
-
|
|
7433
|
+
at as cn,
|
|
7432
7434
|
Bu as createActionHandler,
|
|
7433
7435
|
rc as createAutoScroller,
|
|
7434
7436
|
yl as createDndPlugin,
|
|
@@ -7441,8 +7443,8 @@ export {
|
|
|
7441
7443
|
Wc as defaultTokens,
|
|
7442
7444
|
Mu as defaultToolbarActions,
|
|
7443
7445
|
Xc as destroyEditor,
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
+
ve as dndPluginKey,
|
|
7447
|
+
gt as findBlockAtPos,
|
|
7446
7448
|
yu as focusAfterClick,
|
|
7447
7449
|
wu as focusAt,
|
|
7448
7450
|
lu as focusEditor,
|
|
@@ -7463,7 +7465,7 @@ export {
|
|
|
7463
7465
|
ku as maintainFocus,
|
|
7464
7466
|
wl as moveBlock,
|
|
7465
7467
|
su as redo,
|
|
7466
|
-
|
|
7468
|
+
Ye as restoreFocus,
|
|
7467
7469
|
Bt as restoreSelection,
|
|
7468
7470
|
Ol as saveSelection,
|
|
7469
7471
|
cu as selectAll,
|
|
@@ -7479,7 +7481,7 @@ export {
|
|
|
7479
7481
|
Qc as toggleBold,
|
|
7480
7482
|
au as toggleHeading,
|
|
7481
7483
|
eu as toggleItalic,
|
|
7482
|
-
|
|
7484
|
+
j as tokens,
|
|
7483
7485
|
ec as toolbarRemoveLink,
|
|
7484
7486
|
Lu as toolbarSetHeading,
|
|
7485
7487
|
Ql as toolbarSetLink,
|