@grapesjs/studio-sdk-plugins 1.0.13 → 1.0.14-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +280 -269
- package/dist/index.umd.js +1 -1
- package/dist/youtubeAssetProvider/index.cjs.js +1 -1
- package/dist/youtubeAssetProvider/index.es.js +79 -68
- package/dist/youtubeAssetProvider/index.umd.js +1 -1
- package/dist/youtubeAssetProvider/locale/en.d.ts +7 -0
- package/dist/youtubeAssetProvider/types.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -222,35 +222,35 @@ const zn = (n, e) => {
|
|
|
222
222
|
script: function(p) {
|
|
223
223
|
const m = this;
|
|
224
224
|
function g(S) {
|
|
225
|
-
const
|
|
225
|
+
const v = m.querySelector('[data-type-role="gjs-plg-dialog-overlay"]'), k = m.querySelector('[data-type-role="gjs-plg-dialog-close"]');
|
|
226
226
|
function A() {
|
|
227
|
-
|
|
227
|
+
v.style.display = "none";
|
|
228
228
|
}
|
|
229
229
|
S ? (m._onCloseWhenPressingX = A, k.addEventListener("click", m._onCloseWhenPressingX)) : (k.removeEventListener("click", m._onCloseWhenPressingX), m._onCloseWhenPressingX = null);
|
|
230
230
|
}
|
|
231
231
|
function y(S) {
|
|
232
|
-
const
|
|
232
|
+
const v = m.querySelector('[data-type-role="gjs-plg-dialog-overlay"]');
|
|
233
233
|
function k(A) {
|
|
234
|
-
A.key === "Escape" && (
|
|
234
|
+
A.key === "Escape" && (v.style.display = "none");
|
|
235
235
|
}
|
|
236
236
|
S ? (m._onCloseWhenPressingEsc = k, m.addEventListener("keydown", m._onCloseWhenPressingEsc)) : (m.removeEventListener("keydown", m._onCloseWhenPressingEsc), m._onCloseWhenPressingEsc = null);
|
|
237
237
|
}
|
|
238
|
-
function
|
|
239
|
-
const
|
|
238
|
+
function x(S) {
|
|
239
|
+
const v = m.querySelector('[data-type-role="gjs-plg-dialog-overlay"]');
|
|
240
240
|
function k() {
|
|
241
|
-
|
|
241
|
+
v.style.display = "flex";
|
|
242
242
|
}
|
|
243
243
|
S ? (m._onOpenWhenLeavingWindow = k, document.addEventListener("mouseleave", m._onOpenWhenLeavingWindow)) : (document.removeEventListener("mouseleave", m._onOpenWhenLeavingWindow), m._onOpenWhenLeavingWindow = null);
|
|
244
244
|
}
|
|
245
245
|
function b(S) {
|
|
246
|
-
const
|
|
246
|
+
const v = m.querySelector('[data-type-role="gjs-plg-dialog-overlay"]');
|
|
247
247
|
function k() {
|
|
248
248
|
const A = document.documentElement.scrollTop;
|
|
249
|
-
S && A >= Number(S) && (
|
|
249
|
+
S && A >= Number(S) && (v.style.display = "flex");
|
|
250
250
|
}
|
|
251
251
|
S ? (m._onOpenWhenScrollingToLevel = k, document.addEventListener("scroll", m._onOpenWhenScrollingToLevel)) : (document.removeEventListener("scroll", m._onOpenWhenScrollingToLevel), m._onOpenWhenScrollingToLevel = null);
|
|
252
252
|
}
|
|
253
|
-
g(p.closeWhenPressingX), y(p.closeWhenPressingEsc),
|
|
253
|
+
g(p.closeWhenPressingX), y(p.closeWhenPressingEsc), x(p.openWhenLeavingWindow), b(p.openWhenScrollingToLevel);
|
|
254
254
|
}
|
|
255
255
|
},
|
|
256
256
|
init() {
|
|
@@ -418,18 +418,18 @@ const zn = (n, e) => {
|
|
|
418
418
|
t.remove(r), i.removeType(r);
|
|
419
419
|
}
|
|
420
420
|
});
|
|
421
|
-
},
|
|
421
|
+
}, Dm = Me(mc), gc = { ratioDefault: !0, tc: !1, cl: !1, cr: !1, bc: !1 }, vi = `<svg viewBox="0 0 24 24">
|
|
422
422
|
<path d="M19 0H9C7.9 0 7 .9 7 2V18C7 19.1 7.9 20 9 20H19C20.1 20 21 19.1 21 18V2C21 .9 20.1 0 19 0M19 18H9V2H19V18M3 4V22C3 23.1 3.9 24 5 24H17V22H5V4H3M14 5L11 10L14 15L17 10L14 5Z" />
|
|
423
|
-
</svg>`, Ks = "layout-icon-picker", yc = "icons-layout-", qs = "icons-list-layout", js = "gs-iconify-picker", To = "__iconify_collection", bc = "https://api.iconify.design",
|
|
423
|
+
</svg>`, Ks = "layout-icon-picker", yc = "icons-layout-", qs = "icons-list-layout", js = "gs-iconify-picker", To = "__iconify_collection", bc = "https://api.iconify.design", xi = /* @__PURE__ */ new Map();
|
|
424
424
|
let kn;
|
|
425
425
|
const wc = ({ collectionId: n }) => `https://cdn.jsdelivr.net/npm/@iconify-json/${n}@latest/icons.json`;
|
|
426
426
|
async function Js({ collectionId: n, editor: e }) {
|
|
427
427
|
try {
|
|
428
|
-
if (
|
|
428
|
+
if (xi.has(n)) return xi.get(n);
|
|
429
429
|
const t = await fetch(wc({ collectionId: n }));
|
|
430
430
|
if (!t.ok) throw new Error(`Failed to fetch collection: ${t.statusText}`);
|
|
431
431
|
const i = await t.json();
|
|
432
|
-
return
|
|
432
|
+
return xi.set(n, i), i;
|
|
433
433
|
} catch (t) {
|
|
434
434
|
console.error("Error fetching collection", t), e.runCommand(Y.toastAdd, Ac());
|
|
435
435
|
return;
|
|
@@ -458,7 +458,7 @@ function Qo() {
|
|
|
458
458
|
}
|
|
459
459
|
};
|
|
460
460
|
}
|
|
461
|
-
async function
|
|
461
|
+
async function vc({ collectionIds: n, editor: e, component: t }) {
|
|
462
462
|
const i = await Sc({ collectionIds: n, editor: e });
|
|
463
463
|
if (!i) return;
|
|
464
464
|
const o = ({ icon: a, collectionId: c, iconId: d }) => {
|
|
@@ -490,7 +490,7 @@ async function xc({ collectionIds: n, editor: e, component: t }) {
|
|
|
490
490
|
collectionId: s
|
|
491
491
|
});
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function xc({ editor: n, collection: e }) {
|
|
494
494
|
n.em.set(To, e);
|
|
495
495
|
}
|
|
496
496
|
function Cc(n) {
|
|
@@ -520,7 +520,7 @@ function kc(n) {
|
|
|
520
520
|
emptyState: "Select an icon collection",
|
|
521
521
|
onChange: async ({ setState: s, value: l }) => {
|
|
522
522
|
const a = await Js({ collectionId: l, editor: i });
|
|
523
|
-
a && (s({ value: l }),
|
|
523
|
+
a && (s({ value: l }), xc({ editor: i, collection: a }), Ui({
|
|
524
524
|
editor: i,
|
|
525
525
|
collection: a,
|
|
526
526
|
handleClick: o,
|
|
@@ -581,8 +581,8 @@ function Tc({
|
|
|
581
581
|
const g = () => {
|
|
582
582
|
const y = f.cloneNode(!0);
|
|
583
583
|
y.removeAttribute("style");
|
|
584
|
-
const
|
|
585
|
-
t({ icon:
|
|
584
|
+
const x = y.outerHTML;
|
|
585
|
+
t({ icon: x, collectionId: s, iconId: a.name }), d == null || d.runCommand(Y.layoutRemove, { id: Ks });
|
|
586
586
|
};
|
|
587
587
|
return f.addEventListener("click", g), h(f), () => {
|
|
588
588
|
f.removeEventListener("click", g), u(f);
|
|
@@ -620,13 +620,13 @@ const Oc = "iconifyComponent", Ec = function(n, e = {}) {
|
|
|
620
620
|
dblclick: "onActive"
|
|
621
621
|
}),
|
|
622
622
|
onActive() {
|
|
623
|
-
|
|
623
|
+
vc({ collectionIds: o, editor: n, component: this.model });
|
|
624
624
|
}
|
|
625
625
|
};
|
|
626
626
|
if (t.addType(c, {
|
|
627
627
|
block: l && {
|
|
628
628
|
label: d,
|
|
629
|
-
media:
|
|
629
|
+
media: vi,
|
|
630
630
|
content: { type: c },
|
|
631
631
|
category: "Extra",
|
|
632
632
|
activate: !0,
|
|
@@ -636,11 +636,11 @@ const Oc = "iconifyComponent", Ec = function(n, e = {}) {
|
|
|
636
636
|
model: {
|
|
637
637
|
defaults: {
|
|
638
638
|
name: d,
|
|
639
|
-
icon:
|
|
639
|
+
icon: vi,
|
|
640
640
|
droppable: !1,
|
|
641
641
|
attributes: { [h]: !0 },
|
|
642
642
|
resizable: gc,
|
|
643
|
-
components:
|
|
643
|
+
components: vi,
|
|
644
644
|
style: { width: "50px", height: "50px" },
|
|
645
645
|
traits: [Qo()]
|
|
646
646
|
},
|
|
@@ -672,7 +672,7 @@ const Oc = "iconifyComponent", Ec = function(n, e = {}) {
|
|
|
672
672
|
i.remove(c), t.removeType(c);
|
|
673
673
|
}
|
|
674
674
|
});
|
|
675
|
-
},
|
|
675
|
+
}, Im = Me(Ec);
|
|
676
676
|
function Us(n, e, t) {
|
|
677
677
|
let i, o, r, s, l;
|
|
678
678
|
const a = e;
|
|
@@ -718,7 +718,7 @@ const D = {
|
|
|
718
718
|
tableColumnCopy: '<svg viewBox="0 0 24 24"><path d="M17 6v16h-7V6h7zm-2 2h-3v12h3V8zm-2-6v2H8v15H6V2h7z"/></svg>',
|
|
719
719
|
tableColumnPasteBefore: '<svg viewBox="0 0 24 24"><path fill-rule="evenodd" d="M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V18c0 1-.8 2-1.9 2H11v-2h7V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v2H4V5c0-1 .8-2 1.9-2h3.3A3 3 0 0 1 12 1zm-2 7v12H4V8h6zM8.5 9.5h-3v9h3v-9zM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/></svg>',
|
|
720
720
|
tableColumnPasteAfter: '<svg viewBox="0 0 24 24"><path fill-rule="evenodd" d="M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h7v2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2h3.3A3 3 0 0 1 12 1zm8 7v12h-6V8h6zm-1.5 1.5h-3v9h3v-9zM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/></svg>'
|
|
721
|
-
},
|
|
721
|
+
}, xe = "table", Zs = "thead", Ys = "tfoot", Zi = "tbody", se = "row", B = "cell", Mo = "clipboardTable", Nc = [xe, Zs, Ys, Zi, se, B], ci = (n) => n.em.get(Mo) || [], Dc = (n) => n.every((e) => e.is(B)), Ao = (n, e) => {
|
|
722
722
|
const { editor: t, event: i, opts: o } = n, r = i.currentTarget || i.target, { x: s, y: l, width: a, height: c } = r.getBoundingClientRect(), d = {
|
|
723
723
|
style: { width: 240, height: 300 },
|
|
724
724
|
placer: { type: "popover", closeOnClickAway: !0, x: s, y: l, w: a, h: c },
|
|
@@ -756,7 +756,7 @@ const D = {
|
|
|
756
756
|
}))
|
|
757
757
|
}), Xs = "Table settings", Qs = (n) => {
|
|
758
758
|
const { component: e } = n;
|
|
759
|
-
return e.is(
|
|
759
|
+
return e.is(xe) ? e : e.closestType(xe);
|
|
760
760
|
}, Pc = (n) => {
|
|
761
761
|
var e;
|
|
762
762
|
(e = Qs(n)) == null || e.remove(n.opts);
|
|
@@ -793,25 +793,25 @@ const D = {
|
|
|
793
793
|
return e.length && Dc(e);
|
|
794
794
|
}, er = ({ component: n, editor: e, after: t }) => {
|
|
795
795
|
if (!n.is(B)) return;
|
|
796
|
-
const i = n.closestType(
|
|
796
|
+
const i = n.closestType(xe), o = n.closestType(se), r = n.index() + (t ? 1 : 0);
|
|
797
797
|
i == null || i.findType(se).forEach((l) => l.append({ type: B }, { at: r }));
|
|
798
798
|
const s = o == null ? void 0 : o.components().at(r);
|
|
799
799
|
s && e.select(s);
|
|
800
800
|
}, nl = ({ component: n, opts: e }) => {
|
|
801
801
|
if (!n.is(B)) return;
|
|
802
|
-
const t = n.closestType(
|
|
802
|
+
const t = n.closestType(xe), i = n.index();
|
|
803
803
|
t == null || t.findType(se).forEach((o) => {
|
|
804
804
|
var r;
|
|
805
805
|
return (r = o.components().at(i)) == null ? void 0 : r.remove(e);
|
|
806
806
|
});
|
|
807
807
|
}, il = ({ component: n, editor: e }) => {
|
|
808
808
|
if (!n.is(B)) return;
|
|
809
|
-
const t = n.closestType(
|
|
809
|
+
const t = n.closestType(xe), i = n.index(), o = (t == null ? void 0 : t.findType(se).map((r) => r.components().at(i))) || [];
|
|
810
810
|
o.length && e.em.set(Mo, o);
|
|
811
811
|
}, tr = (n) => {
|
|
812
812
|
const { component: e, editor: t, after: i } = n;
|
|
813
813
|
if (!e.is(B) || !tl(n)) return;
|
|
814
|
-
const o = ci(t), r = e.closestType(
|
|
814
|
+
const o = ci(t), r = e.closestType(xe), s = e.index() + (i ? 1 : 0);
|
|
815
815
|
r == null || r.findType(se).forEach((l, a) => {
|
|
816
816
|
const c = o[a], d = (c == null ? void 0 : c.clone()) || { type: B };
|
|
817
817
|
l.append(d, { at: s });
|
|
@@ -1084,8 +1084,8 @@ function Wc(n, e = {}) {
|
|
|
1084
1084
|
for (let g = l; g <= c; g++) {
|
|
1085
1085
|
const y = Et(r, g, m);
|
|
1086
1086
|
if (!y) continue;
|
|
1087
|
-
const { cell:
|
|
1088
|
-
|
|
1087
|
+
const { cell: x } = y;
|
|
1088
|
+
x !== p && f.push(x);
|
|
1089
1089
|
}
|
|
1090
1090
|
f.forEach((m) => {
|
|
1091
1091
|
e.mergeContent && p.append(m.components().models), m.remove();
|
|
@@ -1191,13 +1191,13 @@ const hl = "Cell settings", _c = "Merge cells", Kc = "Split cell", qc = (n) => n
|
|
|
1191
1191
|
"border-color"
|
|
1192
1192
|
]
|
|
1193
1193
|
};
|
|
1194
|
-
i.addType(
|
|
1194
|
+
i.addType(xe, {
|
|
1195
1195
|
block: t.block && {
|
|
1196
1196
|
label: "Table",
|
|
1197
1197
|
media: D.table,
|
|
1198
1198
|
category: "Extra",
|
|
1199
1199
|
content: {
|
|
1200
|
-
type:
|
|
1200
|
+
type: xe,
|
|
1201
1201
|
style: { width: "100%" }
|
|
1202
1202
|
},
|
|
1203
1203
|
select: !0,
|
|
@@ -1360,10 +1360,10 @@ const hl = "Cell settings", _c = "Merge cells", Kc = "Split cell", qc = (n) => n
|
|
|
1360
1360
|
licenseKey: t.licenseKey,
|
|
1361
1361
|
pluginName: Xc,
|
|
1362
1362
|
cleanup: () => {
|
|
1363
|
-
n.off("component:select", r), n.Blocks.remove(
|
|
1363
|
+
n.off("component:select", r), n.Blocks.remove(xe), Nc.forEach((s) => i.removeType(s));
|
|
1364
1364
|
}
|
|
1365
1365
|
});
|
|
1366
|
-
},
|
|
1366
|
+
}, Pm = Me(Qc), or = "page://", et = "list-pages", St = "list-pages-item", tt = "list-pages-link", ed = (n) => n.components().reduce(
|
|
1367
1367
|
(e, t) => {
|
|
1368
1368
|
var s;
|
|
1369
1369
|
const i = t.findFirstType(tt), o = (s = i == null ? void 0 : i.attributes.attributes) == null ? void 0 : s.href, r = o != null && o.startsWith(or) ? o.replace(or, "") : "";
|
|
@@ -1410,9 +1410,9 @@ const hl = "Cell settings", _c = "Merge cells", Kc = "Split cell", qc = (n) => n
|
|
|
1410
1410
|
syncPageItems() {
|
|
1411
1411
|
if (n.Components.getSymbolInfo(this).isInstance) return;
|
|
1412
1412
|
const p = this.em.Pages.getAll(), m = this.components(), g = ed(this);
|
|
1413
|
-
p.forEach((y,
|
|
1414
|
-
const b = y.id, S = y.getName(),
|
|
1415
|
-
|
|
1413
|
+
p.forEach((y, x) => {
|
|
1414
|
+
const b = y.id, S = y.getName(), v = g[b];
|
|
1415
|
+
v ? v == null || v.forEach((k) => {
|
|
1416
1416
|
k.getInnerHTML() !== S && k.components(S);
|
|
1417
1417
|
}) : m.add(
|
|
1418
1418
|
{
|
|
@@ -1425,7 +1425,7 @@ const hl = "Cell settings", _c = "Merge cells", Kc = "Split cell", qc = (n) => n
|
|
|
1425
1425
|
}
|
|
1426
1426
|
]
|
|
1427
1427
|
},
|
|
1428
|
-
{ at:
|
|
1428
|
+
{ at: x }
|
|
1429
1429
|
);
|
|
1430
1430
|
});
|
|
1431
1431
|
}
|
|
@@ -1472,26 +1472,26 @@ const hl = "Cell settings", _c = "Merge cells", Kc = "Split cell", qc = (n) => n
|
|
|
1472
1472
|
t.remove(et), i.removeType(et);
|
|
1473
1473
|
}
|
|
1474
1474
|
});
|
|
1475
|
-
},
|
|
1475
|
+
}, Rm = Me(rd), sd = "fsLightboxComponent", Tn = "data-fslightbox", Mn = "data-type", ld = "fslightbox-open", vt = "fslightbox", xt = {
|
|
1476
1476
|
image: '<svg viewBox="0 0 24 24"><path d="m8.5 13.5 2.5 3 3.5-4.5 4.5 6H5m16 1V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2Z"/></svg>',
|
|
1477
1477
|
video: '<svg viewBox="0 0 24 24"><path d="M17 10.5V7a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-3.5l4 4v-11l-4 4Z"/></svg>',
|
|
1478
1478
|
imageLightbox: '<svg viewBox="0 0 24 24"><path d="M4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H16L12,22L8,18H4A2,2 0 0,1 2,16V4A2,2 0 0,1 4,2M19,15V7L15,11L13,9L7,15H19M7,5A2,2 0 0,0 5,7A2,2 0 0,0 7,9A2,2 0 0,0 9,7A2,2 0 0,0 7,5Z" /></svg>',
|
|
1479
1479
|
external: '<svg viewBox="0 0 24 24"><path d="M14 3v2h3.6l-9.8 9.8 1.4 1.4L19 6.4V10h2V3m-2 16H5V5h7V3H5a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h14a2 2 0 0 0 2-2v-7h-2v7z"/></svg>',
|
|
1480
1480
|
eye: '<svg viewBox="0 0 24 24"><path d="M12 9a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3m0 8a5 5 0 0 1-5-5 5 5 0 0 1 5-5 5 5 0 0 1 5 5 5 5 0 0 1-5 5m0-12.5C7 4.5 2.7 7.6 1 12a11.8 11.8 0 0 0 22 0c-1.7-4.4-6-7.5-11-7.5Z"/></svg>'
|
|
1481
1481
|
}, ad = function(n, e = {}) {
|
|
1482
|
-
const { Blocks: t, Components: i } = n, o = "Lightbox", r = `${Gi}${
|
|
1483
|
-
toolbarIconOpen:
|
|
1482
|
+
const { Blocks: t, Components: i } = n, o = "Lightbox", r = `${Gi}${vt}`, s = {
|
|
1483
|
+
toolbarIconOpen: xt.eye,
|
|
1484
1484
|
block: {},
|
|
1485
1485
|
defaultSrc: "https://placehold.co/300/777/white.png?text=Image",
|
|
1486
1486
|
cdnScript: "https://cdn.jsdelivr.net/npm/fslightbox@3.4.2/index.js",
|
|
1487
1487
|
...e
|
|
1488
|
-
}, { block: l, toolbarIconOpen: a, defaultSrc: c } = s, d = function(
|
|
1489
|
-
const b = this, S = "data-fslightbox",
|
|
1488
|
+
}, { block: l, toolbarIconOpen: a, defaultSrc: c } = s, d = function(x) {
|
|
1489
|
+
const b = this, S = "data-fslightbox", v = window, k = () => {
|
|
1490
1490
|
var R;
|
|
1491
|
-
const A =
|
|
1491
|
+
const A = v.refreshFsLightbox;
|
|
1492
1492
|
A == null || A();
|
|
1493
1493
|
const L = b.getAttribute(S);
|
|
1494
|
-
if ((R =
|
|
1494
|
+
if ((R = v.fsLightboxInstances) == null || R[L], !v._isEditor) return;
|
|
1495
1495
|
Array.from(document.querySelectorAll(`[${S}]`)).forEach((P) => {
|
|
1496
1496
|
const V = P.onclick;
|
|
1497
1497
|
P.onclick = function(J) {
|
|
@@ -1501,17 +1501,17 @@ const hl = "Cell settings", _c = "Merge cells", Kc = "Split cell", qc = (n) => n
|
|
|
1501
1501
|
};
|
|
1502
1502
|
});
|
|
1503
1503
|
};
|
|
1504
|
-
if (
|
|
1504
|
+
if (v.refreshFsLightbox)
|
|
1505
1505
|
k();
|
|
1506
1506
|
else {
|
|
1507
1507
|
const A = document.createElement("script");
|
|
1508
|
-
A.src =
|
|
1508
|
+
A.src = x.cdnScript, A.onload = k, document.head.appendChild(A);
|
|
1509
1509
|
}
|
|
1510
|
-
}, h = (
|
|
1511
|
-
id: `${
|
|
1510
|
+
}, h = (x) => ({
|
|
1511
|
+
id: `${vt}-open-lb`,
|
|
1512
1512
|
label: a,
|
|
1513
1513
|
command: () => {
|
|
1514
|
-
const b =
|
|
1514
|
+
const b = x.getView();
|
|
1515
1515
|
b == null || b.toggleLightbox();
|
|
1516
1516
|
}
|
|
1517
1517
|
}), u = "source-type", f = {
|
|
@@ -1520,9 +1520,9 @@ const hl = "Cell settings", _c = "Merge cells", Kc = "Split cell", qc = (n) => n
|
|
|
1520
1520
|
label: "Source type",
|
|
1521
1521
|
changeProp: !0,
|
|
1522
1522
|
options: [
|
|
1523
|
-
{ id: "image", label: "Image", icon:
|
|
1524
|
-
{ id: "video", label: "Video", icon:
|
|
1525
|
-
{ id: "el", label: "Custom Element", icon:
|
|
1523
|
+
{ id: "image", label: "Image", icon: xt.image },
|
|
1524
|
+
{ id: "video", label: "Video", icon: xt.video },
|
|
1525
|
+
{ id: "el", label: "Custom Element", icon: xt.external }
|
|
1526
1526
|
],
|
|
1527
1527
|
// @ts-expect-error Studio related prop
|
|
1528
1528
|
labelToTitle: !0
|
|
@@ -1546,26 +1546,26 @@ const hl = "Cell settings", _c = "Merge cells", Kc = "Split cell", qc = (n) => n
|
|
|
1546
1546
|
video: [m],
|
|
1547
1547
|
el: [g]
|
|
1548
1548
|
};
|
|
1549
|
-
i.addType(
|
|
1549
|
+
i.addType(vt, {
|
|
1550
1550
|
block: l && {
|
|
1551
1551
|
label: o,
|
|
1552
|
-
media:
|
|
1552
|
+
media: xt.imageLightbox,
|
|
1553
1553
|
category: "Extra",
|
|
1554
1554
|
select: !0,
|
|
1555
1555
|
...s.block
|
|
1556
1556
|
},
|
|
1557
|
-
isComponent: (
|
|
1557
|
+
isComponent: (x) => {
|
|
1558
1558
|
var b;
|
|
1559
|
-
return (b =
|
|
1559
|
+
return (b = x.hasAttribute) == null ? void 0 : b.call(x, Tn);
|
|
1560
1560
|
},
|
|
1561
1561
|
extendFn: ["initToolbar"],
|
|
1562
1562
|
model: {
|
|
1563
1563
|
defaults: {
|
|
1564
1564
|
tagName: "a",
|
|
1565
1565
|
name: o,
|
|
1566
|
-
icon:
|
|
1566
|
+
icon: xt.imageLightbox,
|
|
1567
1567
|
classes: r,
|
|
1568
|
-
draggable: (
|
|
1568
|
+
draggable: (x, b) => !b.is(vt),
|
|
1569
1569
|
attributes: {
|
|
1570
1570
|
[Tn]: "lightbox",
|
|
1571
1571
|
[Mn]: "image",
|
|
@@ -1585,9 +1585,9 @@ const hl = "Cell settings", _c = "Merge cells", Kc = "Split cell", qc = (n) => n
|
|
|
1585
1585
|
{
|
|
1586
1586
|
type: "button",
|
|
1587
1587
|
label: "Toggle Lightbox",
|
|
1588
|
-
command(
|
|
1589
|
-
var
|
|
1590
|
-
const S = (
|
|
1588
|
+
command(x, b) {
|
|
1589
|
+
var v;
|
|
1590
|
+
const S = (v = b.target) == null ? void 0 : v.getView();
|
|
1591
1591
|
S == null || S.toggleLightbox();
|
|
1592
1592
|
}
|
|
1593
1593
|
}
|
|
@@ -1600,33 +1600,33 @@ const hl = "Cell settings", _c = "Merge cells", Kc = "Split cell", qc = (n) => n
|
|
|
1600
1600
|
`
|
|
1601
1601
|
},
|
|
1602
1602
|
init() {
|
|
1603
|
-
const
|
|
1604
|
-
this.on(
|
|
1603
|
+
const x = [u].map((b) => `change:${b}`).join(" ");
|
|
1604
|
+
this.on(x, this.updateTraits), this.on(`change:${u}`, this.onSourceTypeChange), this.on("change:attributes:href", this.adjustSourceType), this.updateTraits({ init: !0 }), this.adjustSourceType();
|
|
1605
1605
|
},
|
|
1606
|
-
onSourceTypeChange(
|
|
1606
|
+
onSourceTypeChange(x, b, S) {
|
|
1607
1607
|
if (S.adjust) return;
|
|
1608
1608
|
const k = this.get(u) === "video" ? "video" : "image";
|
|
1609
1609
|
this.addAttributes({ [Mn]: k, href: "" });
|
|
1610
1610
|
},
|
|
1611
1611
|
adjustSourceType() {
|
|
1612
|
-
const
|
|
1613
|
-
if (
|
|
1614
|
-
const
|
|
1615
|
-
this.addAttributes({ [Mn]:
|
|
1616
|
-
} else
|
|
1612
|
+
const x = this.get(u), b = this.getAttributes().href || "", S = { adjust: !0 };
|
|
1613
|
+
if (x === "video") {
|
|
1614
|
+
const v = b.includes("youtube.com") ? "youtube" : "video";
|
|
1615
|
+
this.addAttributes({ [Mn]: v }, S);
|
|
1616
|
+
} else x !== "el" && b.startsWith("#") ? this.set(u, "el", S) : x === "image" && this.addAttributes({ [Mn]: "image" }, S);
|
|
1617
1617
|
},
|
|
1618
|
-
updateTraits(
|
|
1619
|
-
const { changed: b } = this, { init: S } =
|
|
1618
|
+
updateTraits(x = {}) {
|
|
1619
|
+
const { changed: b } = this, { init: S } = x;
|
|
1620
1620
|
if (b[f.name] || S) {
|
|
1621
1621
|
this.removeTrait([p.name, m.name, g.name]);
|
|
1622
|
-
const
|
|
1623
|
-
this.addTrait(y[
|
|
1622
|
+
const v = this.get(u) || "image", k = this.getTraitIndex(u) + 1;
|
|
1623
|
+
this.addTrait(y[v], { at: k });
|
|
1624
1624
|
}
|
|
1625
1625
|
},
|
|
1626
1626
|
initToolbar() {
|
|
1627
1627
|
if (!a) return;
|
|
1628
|
-
const { toolbar:
|
|
1629
|
-
!
|
|
1628
|
+
const { toolbar: x } = this, b = h(this);
|
|
1629
|
+
!x.find((v) => v.id === b.id) && (x == null || x.unshift(b));
|
|
1630
1630
|
}
|
|
1631
1631
|
},
|
|
1632
1632
|
view: {
|
|
@@ -1635,16 +1635,16 @@ const hl = "Cell settings", _c = "Merge cells", Kc = "Split cell", qc = (n) => n
|
|
|
1635
1635
|
},
|
|
1636
1636
|
toggleLightbox() {
|
|
1637
1637
|
var P;
|
|
1638
|
-
const { em:
|
|
1638
|
+
const { em: x, el: b, model: S } = this, { Canvas: v } = x, k = S.getAttributes()[Tn], { defaultView: A, documentElement: L } = b.ownerDocument, M = (P = A.fsLightboxInstances) == null ? void 0 : P[k];
|
|
1639
1639
|
if (L.classList.contains(ld))
|
|
1640
1640
|
M.close();
|
|
1641
1641
|
else {
|
|
1642
1642
|
b.__skipLb = !1;
|
|
1643
1643
|
let V;
|
|
1644
1644
|
M.props.onOpen = () => {
|
|
1645
|
-
V =
|
|
1645
|
+
V = v.getSpots(), setTimeout(() => v.removeSpots());
|
|
1646
1646
|
}, M.props.onClose = () => {
|
|
1647
|
-
V.forEach((J) =>
|
|
1647
|
+
V.forEach((J) => v.addSpot(J.attributes));
|
|
1648
1648
|
}, b.click();
|
|
1649
1649
|
}
|
|
1650
1650
|
}
|
|
@@ -1655,10 +1655,10 @@ const hl = "Cell settings", _c = "Merge cells", Kc = "Split cell", qc = (n) => n
|
|
|
1655
1655
|
licenseKey: s.licenseKey,
|
|
1656
1656
|
pluginName: sd,
|
|
1657
1657
|
cleanup: () => {
|
|
1658
|
-
t.remove(
|
|
1658
|
+
t.remove(vt), i.removeType(vt);
|
|
1659
1659
|
}
|
|
1660
1660
|
});
|
|
1661
|
-
},
|
|
1661
|
+
}, Vm = Me(ad);
|
|
1662
1662
|
var Mt = /* @__PURE__ */ ((n) => (n.image = "image", n.video = "video", n.external = "external", n))(Mt || {});
|
|
1663
1663
|
const nt = "lightGallery", rr = `${nt}-item`, Hn = "data-lightgallery", sr = `${Hn}-item`, qn = "toggle", rt = {
|
|
1664
1664
|
image: '<svg viewBox="0 0 24 24"><path d="m8.5 13.5 2.5 3 3.5-4.5 4.5 6H5m16 1V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2Z"/></svg>',
|
|
@@ -2098,8 +2098,8 @@ const nt = "lightGallery", rr = `${nt}-item`, Hn = "data-lightgallery", sr = `${
|
|
|
2098
2098
|
cdnStyle: `${Ct}/css/lightgallery-bundle.min.css`,
|
|
2099
2099
|
...e
|
|
2100
2100
|
}, { block: l, toolbarIconOpen: a, defaultSrc: c } = s, d = function(b) {
|
|
2101
|
-
const S = this,
|
|
2102
|
-
var
|
|
2101
|
+
const S = this, v = window, { plugins: k, cdnScript: A, cdnStyle: L, inline: M, lgLicenseKey: R, ...P } = b || {}, V = (de) => isNaN(de) ? void 0 : parseInt(de, 10), J = () => {
|
|
2102
|
+
var xn;
|
|
2103
2103
|
const de = {
|
|
2104
2104
|
...P,
|
|
2105
2105
|
licenseKey: R,
|
|
@@ -2110,16 +2110,16 @@ const nt = "lightGallery", rr = `${nt}-item`, Hn = "data-lightgallery", sr = `${
|
|
|
2110
2110
|
slideShowInterval: V(P.slideShowInterval),
|
|
2111
2111
|
scale: V(P.scale),
|
|
2112
2112
|
enableZoomAfter: V(P.enableZoomAfter),
|
|
2113
|
-
plugins: (k || []).map((Cn) =>
|
|
2113
|
+
plugins: (k || []).map((Cn) => v[Cn])
|
|
2114
2114
|
};
|
|
2115
2115
|
M && (de.container = S, de.closable = !1);
|
|
2116
|
-
const Si = (
|
|
2116
|
+
const Si = (xn = v.lightGallery) == null ? void 0 : xn.call(v, S, de);
|
|
2117
2117
|
M && Si.openGallery();
|
|
2118
2118
|
};
|
|
2119
|
-
if (
|
|
2119
|
+
if (v.lightGallery)
|
|
2120
2120
|
J();
|
|
2121
2121
|
else {
|
|
2122
|
-
const { head: de } = document, Si = Array.isArray(A) ? [...A] : [A],
|
|
2122
|
+
const { head: de } = document, Si = Array.isArray(A) ? [...A] : [A], xn = Array.isArray(L) ? [...L] : [L], Cn = (Qe) => {
|
|
2123
2123
|
if (Qe.length) {
|
|
2124
2124
|
const Le = document.createElement("link");
|
|
2125
2125
|
Le.href = Qe.shift(), Le.rel = "stylesheet", de.appendChild(Le), Cn(Qe);
|
|
@@ -2131,17 +2131,17 @@ const nt = "lightGallery", rr = `${nt}-item`, Hn = "data-lightgallery", sr = `${
|
|
|
2131
2131
|
} else
|
|
2132
2132
|
J();
|
|
2133
2133
|
};
|
|
2134
|
-
Cn(
|
|
2134
|
+
Cn(xn), Go(Si);
|
|
2135
2135
|
}
|
|
2136
2136
|
}, h = (b) => {
|
|
2137
2137
|
const S = b.getTrait(qn);
|
|
2138
2138
|
if (!a || !S) return;
|
|
2139
|
-
const { toolbar:
|
|
2139
|
+
const { toolbar: v } = b, k = {
|
|
2140
2140
|
id: qn,
|
|
2141
2141
|
label: a,
|
|
2142
2142
|
command: () => setTimeout(() => S.runCommand(), 100)
|
|
2143
2143
|
};
|
|
2144
|
-
!
|
|
2144
|
+
!v.find((L) => L.id === k.id) && (v == null || v.unshift(k));
|
|
2145
2145
|
};
|
|
2146
2146
|
let u = [];
|
|
2147
2147
|
const f = s.plugins || [], p = Jt(dd), m = f.includes(ar) ? Jt(hd) : ki, g = f.includes(cr) ? Jt(ud) : ki, y = f.includes(dr) ? Jt(fd) : ki;
|
|
@@ -2225,8 +2225,8 @@ const nt = "lightGallery", rr = `${nt}-item`, Hn = "data-lightgallery", sr = `${
|
|
|
2225
2225
|
this.el.__lg = b.detail.instance, !this.isInlineGallery() && this.disableLgInCanvas();
|
|
2226
2226
|
},
|
|
2227
2227
|
onLgOpen() {
|
|
2228
|
-
const { em: b } = this, { Canvas: S } = b,
|
|
2229
|
-
u = S.getSpots(), setTimeout(() => S.removeSpots()),
|
|
2228
|
+
const { em: b } = this, { Canvas: S } = b, v = this.getLightGallery();
|
|
2229
|
+
u = S.getSpots(), setTimeout(() => S.removeSpots()), v.__lgOpened = !0;
|
|
2230
2230
|
},
|
|
2231
2231
|
onLgClose() {
|
|
2232
2232
|
const b = this.getLightGallery();
|
|
@@ -2239,7 +2239,7 @@ const nt = "lightGallery", rr = `${nt}-item`, Hn = "data-lightgallery", sr = `${
|
|
|
2239
2239
|
}
|
|
2240
2240
|
}
|
|
2241
2241
|
});
|
|
2242
|
-
const
|
|
2242
|
+
const x = Jt(pd);
|
|
2243
2243
|
i.addType(rr, {
|
|
2244
2244
|
isComponent: (b) => zn(b, sr) || b.tagName === "A" && zn(b.parentElement, Hn),
|
|
2245
2245
|
extendFn: ["init", "initToolbar"],
|
|
@@ -2250,8 +2250,8 @@ const nt = "lightGallery", rr = `${nt}-item`, Hn = "data-lightgallery", sr = `${
|
|
|
2250
2250
|
icon: rt.galleryItem,
|
|
2251
2251
|
attributes: { [sr]: !0, href: c },
|
|
2252
2252
|
components: { type: "image", attributes: { alt: "Image", src: c } },
|
|
2253
|
-
...
|
|
2254
|
-
traits: [...
|
|
2253
|
+
...x.props,
|
|
2254
|
+
traits: [...x.traits]
|
|
2255
2255
|
},
|
|
2256
2256
|
init() {
|
|
2257
2257
|
const b = [ze].map((S) => `change:${S}`).join(" ");
|
|
@@ -2269,8 +2269,8 @@ const nt = "lightGallery", rr = `${nt}-item`, Hn = "data-lightgallery", sr = `${
|
|
|
2269
2269
|
(S = this.closestType(nt)) == null || S.__scriptPropsChange(...b);
|
|
2270
2270
|
},
|
|
2271
2271
|
updateTraits(b = {}) {
|
|
2272
|
-
const { changed: S } = this, { init:
|
|
2273
|
-
if (S[ze] ||
|
|
2272
|
+
const { changed: S } = this, { init: v } = b;
|
|
2273
|
+
if (S[ze] || v) {
|
|
2274
2274
|
Xi(this, ze);
|
|
2275
2275
|
const k = this.getTrait(ze).getValue();
|
|
2276
2276
|
if (k === Mt.image) {
|
|
@@ -2294,7 +2294,7 @@ const nt = "lightGallery", rr = `${nt}-item`, Hn = "data-lightgallery", sr = `${
|
|
|
2294
2294
|
t.remove(nt), i.removeType(nt);
|
|
2295
2295
|
}
|
|
2296
2296
|
});
|
|
2297
|
-
},
|
|
2297
|
+
}, Lm = Me(yd), be = "swiper", an = `${be}-slide`, Dt = `${be}-wrapper`, It = `${be}-nav-prev`, Jn = `${be}-nav-next`, Pt = `${be}-pagination`, tn = `${be}-scrollbar`, Q = {
|
|
2298
2298
|
slider: `<svg viewBox="0 0 24 24">
|
|
2299
2299
|
<path d="M22 7.6c0-1-.5-1.6-1.3-1.6H3.4C2.5 6 2 6.7 2 7.6v9.8c0 1 .5 1.6 1.3 1.6h17.4c.8 0 1.3-.6 1.3-1.6V7.6zM21 18H3V7h18v11z" fill-rule="nonzero"/>
|
|
2300
2300
|
<path d="M4 12.5L6 14v-3zM20 12.5L18 14v-3z"/>
|
|
@@ -2857,7 +2857,7 @@ const nt = "lightGallery", rr = `${nt}-item`, Hn = "data-lightgallery", sr = `${
|
|
|
2857
2857
|
}
|
|
2858
2858
|
}, fr = "Slider", to = "swiper", jt = `${to}-`, wd = (n, e) => {
|
|
2859
2859
|
const { Components: t, Blocks: i, Commands: o } = n, { block: r } = e, s = hc(bd), l = "core:preview", a = o.events, c = function(u) {
|
|
2860
|
-
const f = this, p = window, m = f.__onLoad, g = f.__activeSlide, y = f.__inPreview, { cdnScript:
|
|
2860
|
+
const f = this, p = window, m = f.__onLoad, g = f.__activeSlide, y = f.__inPreview, { cdnScript: x, cdnStyle: b, slidesPerView: S } = u || {}, v = (A) => isNaN(A) ? void 0 : parseFloat(A), k = () => {
|
|
2861
2861
|
const A = {
|
|
2862
2862
|
loop: u.loop,
|
|
2863
2863
|
speed: u.speed,
|
|
@@ -2871,25 +2871,25 @@ const nt = "lightGallery", rr = `${nt}-item`, Hn = "data-lightgallery", sr = `${
|
|
|
2871
2871
|
grabCursor: u.grabCursor,
|
|
2872
2872
|
simulateTouch: !0,
|
|
2873
2873
|
breakpoints: {},
|
|
2874
|
-
slidesPerView: isNaN(S) ? S :
|
|
2875
|
-
slidesPerGroup:
|
|
2876
|
-
spaceBetween:
|
|
2877
|
-
slidesOffsetBefore:
|
|
2878
|
-
slidesOffsetAfter:
|
|
2874
|
+
slidesPerView: isNaN(S) ? S : v(S),
|
|
2875
|
+
slidesPerGroup: v(u.slidesPerGroup),
|
|
2876
|
+
spaceBetween: v(u.spaceBetween),
|
|
2877
|
+
slidesOffsetBefore: v(u.slidesOffsetBefore),
|
|
2878
|
+
slidesOffsetAfter: v(u.slidesOffsetAfter),
|
|
2879
2879
|
centeredSlides: u.centeredSlides,
|
|
2880
2880
|
fadeEffect: { crossFade: u.crossFade },
|
|
2881
2881
|
cubeEffect: {
|
|
2882
2882
|
shadow: u.cubeEffectShadow,
|
|
2883
2883
|
slideShadows: u.cubeEffectSlideShadows,
|
|
2884
|
-
shadowOffset:
|
|
2885
|
-
shadowScale:
|
|
2884
|
+
shadowOffset: v(u.cubeEffectShadowOffset),
|
|
2885
|
+
shadowScale: v(u.cubeEffectShadowScale)
|
|
2886
2886
|
},
|
|
2887
2887
|
coverflowEffect: {
|
|
2888
|
-
depth:
|
|
2889
|
-
modifier:
|
|
2890
|
-
rotate:
|
|
2891
|
-
scale:
|
|
2892
|
-
stretch:
|
|
2888
|
+
depth: v(u.coverflowEffectDepth),
|
|
2889
|
+
modifier: v(u.coverflowEffectModifier),
|
|
2890
|
+
rotate: v(u.coverflowEffectRotate),
|
|
2891
|
+
scale: v(u.coverflowEffectScale),
|
|
2892
|
+
stretch: v(u.coverflowEffectStretch),
|
|
2893
2893
|
slideShadows: u.coverflowEffectSlideShadows
|
|
2894
2894
|
},
|
|
2895
2895
|
flipEffect: {
|
|
@@ -2897,8 +2897,8 @@ const nt = "lightGallery", rr = `${nt}-item`, Hn = "data-lightgallery", sr = `${
|
|
|
2897
2897
|
slideShadows: u.flipEffectSlideShadows
|
|
2898
2898
|
},
|
|
2899
2899
|
cardsEffect: {
|
|
2900
|
-
perSlideOffset:
|
|
2901
|
-
perSlideRotate:
|
|
2900
|
+
perSlideOffset: v(u.cardsEffectPerSlideOffset),
|
|
2901
|
+
perSlideRotate: v(u.cardsEffectPerSlideRotate),
|
|
2902
2902
|
rotate: u.cardsEffectRotate,
|
|
2903
2903
|
slideShadows: u.cardsEffectSlideShadows
|
|
2904
2904
|
},
|
|
@@ -2928,19 +2928,19 @@ const nt = "lightGallery", rr = `${nt}-item`, Hn = "data-lightgallery", sr = `${
|
|
|
2928
2928
|
}
|
|
2929
2929
|
};
|
|
2930
2930
|
if (u.tablet) {
|
|
2931
|
-
const { tabletBreakpoint: M, tabletSlidesPerView: R } = u, P =
|
|
2931
|
+
const { tabletBreakpoint: M, tabletSlidesPerView: R } = u, P = v(M);
|
|
2932
2932
|
A.breakpoints[P] = {
|
|
2933
|
-
slidesPerView: isNaN(R) ? R :
|
|
2934
|
-
slidesPerGroup:
|
|
2935
|
-
spaceBetween:
|
|
2933
|
+
slidesPerView: isNaN(R) ? R : v(R),
|
|
2934
|
+
slidesPerGroup: v(u.tabletSlidesPerGroup),
|
|
2935
|
+
spaceBetween: v(u.tabletSpaceBetween)
|
|
2936
2936
|
};
|
|
2937
2937
|
}
|
|
2938
2938
|
if (u.mobile) {
|
|
2939
|
-
const { mobileBreakpoint: M, mobileSlidesPerView: R } = u, P =
|
|
2939
|
+
const { mobileBreakpoint: M, mobileSlidesPerView: R } = u, P = v(M);
|
|
2940
2940
|
A.breakpoints[P] = {
|
|
2941
|
-
slidesPerView: isNaN(R) ? R :
|
|
2942
|
-
slidesPerGroup:
|
|
2943
|
-
spaceBetween:
|
|
2941
|
+
slidesPerView: isNaN(R) ? R : v(R),
|
|
2942
|
+
slidesPerGroup: v(u.mobileSlidesPerGroup),
|
|
2943
|
+
spaceBetween: v(u.mobileSpaceBetween)
|
|
2944
2944
|
};
|
|
2945
2945
|
}
|
|
2946
2946
|
m && !y && (A.simulateTouch = !1), g && (A.initialSlide = g);
|
|
@@ -2950,7 +2950,7 @@ const nt = "lightGallery", rr = `${nt}-item`, Hn = "data-lightgallery", sr = `${
|
|
|
2950
2950
|
if (p.Swiper)
|
|
2951
2951
|
k();
|
|
2952
2952
|
else {
|
|
2953
|
-
const { head: A } = document, L = Array.isArray(
|
|
2953
|
+
const { head: A } = document, L = Array.isArray(x) ? [...x] : [x], M = Array.isArray(b) ? [...b] : [b], R = (V) => {
|
|
2954
2954
|
if (V.length) {
|
|
2955
2955
|
const J = document.createElement("link");
|
|
2956
2956
|
J.href = V.shift(), J.rel = "stylesheet", A.appendChild(J), R(V);
|
|
@@ -3047,7 +3047,7 @@ const nt = "lightGallery", rr = `${nt}-item`, Hn = "data-lightgallery", sr = `${
|
|
|
3047
3047
|
}), () => {
|
|
3048
3048
|
t.removeType(be), i.remove(be);
|
|
3049
3049
|
};
|
|
3050
|
-
}, Sd = "Nav Prev",
|
|
3050
|
+
}, Sd = "Nav Prev", vd = "Nav Next", On = `${jt}button-prev`, En = `${jt}button-next`, xd = (n) => {
|
|
3051
3051
|
const { Components: e } = n, t = (i) => ({
|
|
3052
3052
|
type: "svg",
|
|
3053
3053
|
selectable: !1,
|
|
@@ -3088,7 +3088,7 @@ const nt = "lightGallery", rr = `${nt}-item`, Hn = "data-lightgallery", sr = `${
|
|
|
3088
3088
|
isComponent: (i) => mt(i, En),
|
|
3089
3089
|
model: {
|
|
3090
3090
|
defaults: {
|
|
3091
|
-
name:
|
|
3091
|
+
name: vd,
|
|
3092
3092
|
classes: En,
|
|
3093
3093
|
components: t("M27,22L27,22L5,44l-2.1-2.1L22.8,22L2.9,2.1L5,0L27,22L27,22z"),
|
|
3094
3094
|
styles: `
|
|
@@ -3212,7 +3212,7 @@ const nt = "lightGallery", rr = `${nt}-item`, Hn = "data-lightgallery", sr = `${
|
|
|
3212
3212
|
...e
|
|
3213
3213
|
}, i = [
|
|
3214
3214
|
wd(n, t),
|
|
3215
|
-
|
|
3215
|
+
xd(n),
|
|
3216
3216
|
Ed(n),
|
|
3217
3217
|
Ad(n),
|
|
3218
3218
|
Cd(n),
|
|
@@ -3227,7 +3227,7 @@ const nt = "lightGallery", rr = `${nt}-item`, Hn = "data-lightgallery", sr = `${
|
|
|
3227
3227
|
i.forEach((o) => o());
|
|
3228
3228
|
}
|
|
3229
3229
|
});
|
|
3230
|
-
},
|
|
3230
|
+
}, zm = Me(Dd), Id = (n) => n.dispatchEvent(new CustomEvent("input"));
|
|
3231
3231
|
function Pd(n, e) {
|
|
3232
3232
|
if (!e) return () => {
|
|
3233
3233
|
};
|
|
@@ -3327,9 +3327,9 @@ const Eo = /* @__PURE__ */ new WeakMap(), Rd = (n, e) => {
|
|
|
3327
3327
|
}))[0];
|
|
3328
3328
|
return m.ui.show(), d.body.addEventListener("mousedown", Nn), document.body.addEventListener("mousedown", Nn), m.on("Change", () => Id(a)), m.on("blur", () => m.ui.show()), m.on("OpenWindow", function() {
|
|
3329
3329
|
var S;
|
|
3330
|
-
const
|
|
3331
|
-
|
|
3332
|
-
|
|
3330
|
+
const x = (S = d.querySelector(".tox-dialog")) == null ? void 0 : S.closest(".tox");
|
|
3331
|
+
x && (x == null ? void 0 : x.ownerDocument) !== document && (document.body.appendChild(x), m.once("CloseWindow", () => {
|
|
3332
|
+
x && x.ownerDocument === document && d.body.appendChild(x);
|
|
3333
3333
|
}));
|
|
3334
3334
|
}), a.addEventListener("dragstart", yr, { capture: !0 }), n.runCommand(Y.setStateContextMenu, { enabled: !1 }), Ld(m, c), { rteEditor: m, rteEditorShallow: y };
|
|
3335
3335
|
}, s = (a, c) => {
|
|
@@ -3368,7 +3368,7 @@ const Eo = /* @__PURE__ */ new WeakMap(), Rd = (n, e) => {
|
|
|
3368
3368
|
n.RichTextEditor.customRte = void 0, l();
|
|
3369
3369
|
}
|
|
3370
3370
|
});
|
|
3371
|
-
},
|
|
3371
|
+
}, Bm = Me(Hd);
|
|
3372
3372
|
function _(n) {
|
|
3373
3373
|
this.content = n;
|
|
3374
3374
|
}
|
|
@@ -4641,7 +4641,7 @@ let ht = class io {
|
|
|
4641
4641
|
if (this.type.spec.toDebugString)
|
|
4642
4642
|
return this.type.spec.toDebugString(this);
|
|
4643
4643
|
let e = this.type.name;
|
|
4644
|
-
return this.content.size && (e += "(" + this.content.toStringInner() + ")"),
|
|
4644
|
+
return this.content.size && (e += "(" + this.content.toStringInner() + ")"), vl(this.marks, e);
|
|
4645
4645
|
}
|
|
4646
4646
|
/**
|
|
4647
4647
|
Get the content match in this node at the given index.
|
|
@@ -4745,7 +4745,7 @@ class Xn extends ht {
|
|
|
4745
4745
|
this.text = i;
|
|
4746
4746
|
}
|
|
4747
4747
|
toString() {
|
|
4748
|
-
return this.type.spec.toDebugString ? this.type.spec.toDebugString(this) :
|
|
4748
|
+
return this.type.spec.toDebugString ? this.type.spec.toDebugString(this) : vl(this.marks, JSON.stringify(this.text));
|
|
4749
4749
|
}
|
|
4750
4750
|
get textContent() {
|
|
4751
4751
|
return this.text;
|
|
@@ -4773,7 +4773,7 @@ class Xn extends ht {
|
|
|
4773
4773
|
return e.text = this.text, e;
|
|
4774
4774
|
}
|
|
4775
4775
|
}
|
|
4776
|
-
function
|
|
4776
|
+
function vl(n, e) {
|
|
4777
4777
|
for (let t = n.length - 1; t >= 0; t--)
|
|
4778
4778
|
e = n[t].type.name + "(" + e + ")";
|
|
4779
4779
|
return e;
|
|
@@ -4792,7 +4792,7 @@ class gt {
|
|
|
4792
4792
|
let i = new qd(e, t);
|
|
4793
4793
|
if (i.next == null)
|
|
4794
4794
|
return gt.empty;
|
|
4795
|
-
let o =
|
|
4795
|
+
let o = xl(i);
|
|
4796
4796
|
i.next && i.err("Unexpected trailing text");
|
|
4797
4797
|
let r = Xd(Yd(o));
|
|
4798
4798
|
return Qd(r, i), r;
|
|
@@ -4955,7 +4955,7 @@ class qd {
|
|
|
4955
4955
|
throw new SyntaxError(e + " (in content expression '" + this.string + "')");
|
|
4956
4956
|
}
|
|
4957
4957
|
}
|
|
4958
|
-
function
|
|
4958
|
+
function xl(n) {
|
|
4959
4959
|
let e = [];
|
|
4960
4960
|
do
|
|
4961
4961
|
e.push(jd(n));
|
|
@@ -5006,7 +5006,7 @@ function Ud(n, e) {
|
|
|
5006
5006
|
}
|
|
5007
5007
|
function Zd(n) {
|
|
5008
5008
|
if (n.eat("(")) {
|
|
5009
|
-
let e =
|
|
5009
|
+
let e = xl(n);
|
|
5010
5010
|
return n.eat(")") || n.err("Missing closing paren"), e;
|
|
5011
5011
|
} else if (/\W/.test(n.next))
|
|
5012
5012
|
n.err("Unexpected token '" + n.next + "'");
|
|
@@ -5072,7 +5072,7 @@ function Yd(n) {
|
|
|
5072
5072
|
function Cl(n, e) {
|
|
5073
5073
|
return e - n;
|
|
5074
5074
|
}
|
|
5075
|
-
function
|
|
5075
|
+
function vr(n, e) {
|
|
5076
5076
|
let t = [];
|
|
5077
5077
|
return i(e), t.sort(Cl);
|
|
5078
5078
|
function i(o) {
|
|
@@ -5088,7 +5088,7 @@ function xr(n, e) {
|
|
|
5088
5088
|
}
|
|
5089
5089
|
function Xd(n) {
|
|
5090
5090
|
let e = /* @__PURE__ */ Object.create(null);
|
|
5091
|
-
return t(
|
|
5091
|
+
return t(vr(n, 0));
|
|
5092
5092
|
function t(i) {
|
|
5093
5093
|
let o = [];
|
|
5094
5094
|
i.forEach((s) => {
|
|
@@ -5098,7 +5098,7 @@ function Xd(n) {
|
|
|
5098
5098
|
let c;
|
|
5099
5099
|
for (let d = 0; d < o.length; d++)
|
|
5100
5100
|
o[d][0] == l && (c = o[d][1]);
|
|
5101
|
-
|
|
5101
|
+
vr(n, a).forEach((d) => {
|
|
5102
5102
|
c || o.push([l, c = []]), c.indexOf(d) == -1 && c.push(d);
|
|
5103
5103
|
});
|
|
5104
5104
|
});
|
|
@@ -5162,7 +5162,7 @@ function Al(n, e) {
|
|
|
5162
5162
|
t[i] = new th(n, i, e[i]);
|
|
5163
5163
|
return t;
|
|
5164
5164
|
}
|
|
5165
|
-
let
|
|
5165
|
+
let xr = class Ol {
|
|
5166
5166
|
/**
|
|
5167
5167
|
@internal
|
|
5168
5168
|
*/
|
|
@@ -5421,7 +5421,7 @@ class nh {
|
|
|
5421
5421
|
let t = this.spec = {};
|
|
5422
5422
|
for (let o in e)
|
|
5423
5423
|
t[o] = e[o];
|
|
5424
|
-
t.nodes = _.from(e.nodes), t.marks = _.from(e.marks || {}), this.nodes =
|
|
5424
|
+
t.nodes = _.from(e.nodes), t.marks = _.from(e.marks || {}), this.nodes = xr.compile(this.spec.nodes, this), this.marks = hi.compile(this.spec.marks, this);
|
|
5425
5425
|
let i = /* @__PURE__ */ Object.create(null);
|
|
5426
5426
|
for (let o in this.nodes) {
|
|
5427
5427
|
if (o in this.marks)
|
|
@@ -5451,7 +5451,7 @@ class nh {
|
|
|
5451
5451
|
node(e, t = null, i, o) {
|
|
5452
5452
|
if (typeof e == "string")
|
|
5453
5453
|
e = this.nodeType(e);
|
|
5454
|
-
else if (e instanceof
|
|
5454
|
+
else if (e instanceof xr) {
|
|
5455
5455
|
if (e.schema != this)
|
|
5456
5456
|
throw new RangeError("Node type from different schema used (" + e.name + ")");
|
|
5457
5457
|
} else throw new RangeError("Invalid node type: " + e);
|
|
@@ -6529,7 +6529,7 @@ class Ke extends X {
|
|
|
6529
6529
|
return F.fromReplace(e, this.from, this.to, r);
|
|
6530
6530
|
}
|
|
6531
6531
|
invert() {
|
|
6532
|
-
return new
|
|
6532
|
+
return new ve(this.from, this.to, this.mark);
|
|
6533
6533
|
}
|
|
6534
6534
|
map(e) {
|
|
6535
6535
|
let t = e.mapResult(this.from, 1), i = e.mapResult(this.to, -1);
|
|
@@ -6556,7 +6556,7 @@ class Ke extends X {
|
|
|
6556
6556
|
}
|
|
6557
6557
|
}
|
|
6558
6558
|
X.jsonID("addMark", Ke);
|
|
6559
|
-
class
|
|
6559
|
+
class ve extends X {
|
|
6560
6560
|
/**
|
|
6561
6561
|
Create a mark-removing step.
|
|
6562
6562
|
*/
|
|
@@ -6572,10 +6572,10 @@ class xe extends X {
|
|
|
6572
6572
|
}
|
|
6573
6573
|
map(e) {
|
|
6574
6574
|
let t = e.mapResult(this.from, 1), i = e.mapResult(this.to, -1);
|
|
6575
|
-
return t.deleted && i.deleted || t.pos >= i.pos ? null : new
|
|
6575
|
+
return t.deleted && i.deleted || t.pos >= i.pos ? null : new ve(t.pos, i.pos, this.mark);
|
|
6576
6576
|
}
|
|
6577
6577
|
merge(e) {
|
|
6578
|
-
return e instanceof
|
|
6578
|
+
return e instanceof ve && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new ve(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
|
|
6579
6579
|
}
|
|
6580
6580
|
toJSON() {
|
|
6581
6581
|
return {
|
|
@@ -6591,10 +6591,10 @@ class xe extends X {
|
|
|
6591
6591
|
static fromJSON(e, t) {
|
|
6592
6592
|
if (typeof t.from != "number" || typeof t.to != "number")
|
|
6593
6593
|
throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");
|
|
6594
|
-
return new
|
|
6594
|
+
return new ve(t.from, t.to, e.markFromJSON(t.mark));
|
|
6595
6595
|
}
|
|
6596
6596
|
}
|
|
6597
|
-
X.jsonID("removeMark",
|
|
6597
|
+
X.jsonID("removeMark", ve);
|
|
6598
6598
|
class qe extends X {
|
|
6599
6599
|
/**
|
|
6600
6600
|
Create a node mark step.
|
|
@@ -6807,7 +6807,7 @@ function uh(n, e, t, i) {
|
|
|
6807
6807
|
if (!i.isInSet(h) && d.type.allowsMarkType(i.type)) {
|
|
6808
6808
|
let u = Math.max(c, e), f = Math.min(c + a.nodeSize, t), p = i.addToSet(h);
|
|
6809
6809
|
for (let m = 0; m < h.length; m++)
|
|
6810
|
-
h[m].isInSet(p) || (s && s.to == u && s.mark.eq(h[m]) ? s.to = f : o.push(s = new
|
|
6810
|
+
h[m].isInSet(p) || (s && s.to == u && s.mark.eq(h[m]) ? s.to = f : o.push(s = new ve(u, f, h[m])));
|
|
6811
6811
|
l && l.to == u ? l.to = f : r.push(l = new Ke(u, f, i));
|
|
6812
6812
|
}
|
|
6813
6813
|
}), o.forEach((a) => n.step(a)), r.forEach((a) => n.step(a));
|
|
@@ -6835,7 +6835,7 @@ function fh(n, e, t, i) {
|
|
|
6835
6835
|
u ? (u.to = c, u.step = r) : o.push({ style: h, from: Math.max(l, e), to: c, step: r });
|
|
6836
6836
|
}
|
|
6837
6837
|
}
|
|
6838
|
-
}), o.forEach((s) => n.step(new
|
|
6838
|
+
}), o.forEach((s) => n.step(new ve(s.from, s.to, s.style)));
|
|
6839
6839
|
}
|
|
6840
6840
|
function Do(n, e, t, i = t.contentMatch, o = !0) {
|
|
6841
6841
|
let r = n.doc.nodeAt(e), s = [], l = e + 1;
|
|
@@ -6846,7 +6846,7 @@ function Do(n, e, t, i = t.contentMatch, o = !0) {
|
|
|
6846
6846
|
else {
|
|
6847
6847
|
i = h;
|
|
6848
6848
|
for (let u = 0; u < c.marks.length; u++)
|
|
6849
|
-
t.allowsMarkType(c.marks[u].type) || n.step(new
|
|
6849
|
+
t.allowsMarkType(c.marks[u].type) || n.step(new ve(l, d, c.marks[u]));
|
|
6850
6850
|
if (o && c.isText && t.whitespace != "pre") {
|
|
6851
6851
|
let u, f = /\r?\n|\r/g, p;
|
|
6852
6852
|
for (; u = f.exec(c.text); )
|
|
@@ -6963,7 +6963,7 @@ function Sh(n, e, t) {
|
|
|
6963
6963
|
let i = n.resolve(e), o = i.index();
|
|
6964
6964
|
return i.parent.canReplaceWith(o, o + 1, t);
|
|
6965
6965
|
}
|
|
6966
|
-
function
|
|
6966
|
+
function vh(n, e, t, i, o) {
|
|
6967
6967
|
let r = n.doc.nodeAt(e);
|
|
6968
6968
|
if (!r)
|
|
6969
6969
|
throw new RangeError("No node at given position");
|
|
@@ -6992,7 +6992,7 @@ function Vt(n, e, t = 1, i) {
|
|
|
6992
6992
|
let l = o.indexAfter(r), a = i && i[0];
|
|
6993
6993
|
return o.node(r).canReplaceWith(l, l, a ? a.type : o.node(r + 1).type);
|
|
6994
6994
|
}
|
|
6995
|
-
function
|
|
6995
|
+
function xh(n, e, t = 1, i) {
|
|
6996
6996
|
let o = n.doc.resolve(e), r = w.empty, s = w.empty;
|
|
6997
6997
|
for (let l = o.depth, a = o.depth - t, c = t - 1; l > a; l--, c--) {
|
|
6998
6998
|
r = w.from(o.node(l).copy(r));
|
|
@@ -7305,8 +7305,8 @@ function Dh(n, e, t, i) {
|
|
|
7305
7305
|
for (let m = 0; m < s.length; m++) {
|
|
7306
7306
|
let g = s[(m + a) % s.length], y = !0;
|
|
7307
7307
|
g < 0 && (y = !1, g = -g);
|
|
7308
|
-
let
|
|
7309
|
-
if (
|
|
7308
|
+
let x = o.node(g - 1), b = o.index(g - 1);
|
|
7309
|
+
if (x.canReplaceWith(b, b, p.type, p.marks))
|
|
7310
7310
|
return n.replace(o.before(g), y ? r.after(g) : t, new C($l(i.content, 0, i.openStart, f), f, i.openEnd));
|
|
7311
7311
|
}
|
|
7312
7312
|
}
|
|
@@ -7588,7 +7588,7 @@ class _l {
|
|
|
7588
7588
|
When `type` isn't given, the existing node type is preserved,
|
|
7589
7589
|
*/
|
|
7590
7590
|
setNodeMarkup(e, t, i = null, o) {
|
|
7591
|
-
return
|
|
7591
|
+
return vh(this, e, t, i, o), this;
|
|
7592
7592
|
}
|
|
7593
7593
|
/**
|
|
7594
7594
|
Set a single attribute on a given node to a new value.
|
|
@@ -7632,7 +7632,7 @@ class _l {
|
|
|
7632
7632
|
use after the split.
|
|
7633
7633
|
*/
|
|
7634
7634
|
split(e, t = 1, i) {
|
|
7635
|
-
return
|
|
7635
|
+
return xh(this, e, t, i), this;
|
|
7636
7636
|
}
|
|
7637
7637
|
/**
|
|
7638
7638
|
Add the given mark to the inline content between `from` and `to`.
|
|
@@ -8693,8 +8693,8 @@ function ea(n, e, t, i) {
|
|
|
8693
8693
|
let y = w.empty;
|
|
8694
8694
|
for (let b = p.length - 1; b >= 0; b--)
|
|
8695
8695
|
y = w.from(p[b].copy(y));
|
|
8696
|
-
let
|
|
8697
|
-
t(
|
|
8696
|
+
let x = n.tr.step(new j(e.pos - p.length, e.pos + r.nodeSize, e.pos + g, e.pos + r.nodeSize - g, new C(y, p.length, 0), 0, !0));
|
|
8697
|
+
t(x.scrollIntoView());
|
|
8698
8698
|
}
|
|
8699
8699
|
return !0;
|
|
8700
8700
|
}
|
|
@@ -8772,8 +8772,8 @@ function it(n, e = null, t) {
|
|
|
8772
8772
|
if (!c)
|
|
8773
8773
|
d.removeMark(u.pos, f.pos, n);
|
|
8774
8774
|
else {
|
|
8775
|
-
let p = u.pos, m = f.pos, g = u.nodeAfter, y = f.nodeBefore,
|
|
8776
|
-
p +
|
|
8775
|
+
let p = u.pos, m = f.pos, g = u.nodeAfter, y = f.nodeBefore, x = g && g.isText ? /^\s*/.exec(g.text)[0].length : 0, b = y && y.isText ? /\s*$/.exec(y.text)[0].length : 0;
|
|
8776
|
+
p + x < m && (p += x, m -= b), d.addMark(p, m, n.create(e));
|
|
8777
8777
|
}
|
|
8778
8778
|
}
|
|
8779
8779
|
r(d.scrollIntoView());
|
|
@@ -9338,10 +9338,10 @@ function mu(n, e) {
|
|
|
9338
9338
|
let f = o.indexAfter(-1) < o.node(-2).childCount ? 1 : o.indexAfter(-2) < o.node(-3).childCount ? 2 : 3;
|
|
9339
9339
|
h = h.append(w.from(n.createAndFill()));
|
|
9340
9340
|
let p = o.before(o.depth - (u - 1)), m = t.tr.replace(p, o.after(-f), new C(h, 4 - u, 0)), g = -1;
|
|
9341
|
-
m.doc.nodesBetween(p, m.doc.content.size, (y,
|
|
9341
|
+
m.doc.nodesBetween(p, m.doc.content.size, (y, x) => {
|
|
9342
9342
|
if (g > -1)
|
|
9343
9343
|
return !1;
|
|
9344
|
-
y.isTextblock && y.content.size == 0 && (g =
|
|
9344
|
+
y.isTextblock && y.content.size == 0 && (g = x + 1);
|
|
9345
9345
|
}), g > -1 && m.setSelection(E.near(m.doc.resolve(g))), i(m.scrollIntoView());
|
|
9346
9346
|
}
|
|
9347
9347
|
return !0;
|
|
@@ -9434,7 +9434,7 @@ function Wr(n, e, t, i, o) {
|
|
|
9434
9434
|
function fe(n) {
|
|
9435
9435
|
return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
|
|
9436
9436
|
}
|
|
9437
|
-
function
|
|
9437
|
+
function vu(n, e) {
|
|
9438
9438
|
for (; ; ) {
|
|
9439
9439
|
if (n.nodeType == 3 && e)
|
|
9440
9440
|
return n;
|
|
@@ -9448,7 +9448,7 @@ function xu(n, e) {
|
|
|
9448
9448
|
return null;
|
|
9449
9449
|
}
|
|
9450
9450
|
}
|
|
9451
|
-
function
|
|
9451
|
+
function xu(n, e) {
|
|
9452
9452
|
for (; ; ) {
|
|
9453
9453
|
if (n.nodeType == 3 && e < n.nodeValue.length)
|
|
9454
9454
|
return n;
|
|
@@ -10886,11 +10886,11 @@ function Lo(n, e = null) {
|
|
|
10886
10886
|
return c;
|
|
10887
10887
|
}
|
|
10888
10888
|
function Sa(n) {
|
|
10889
|
-
return n.editable ? n.hasFocus() :
|
|
10889
|
+
return n.editable ? n.hasFocus() : xa(n) && document.activeElement && document.activeElement.contains(n.dom);
|
|
10890
10890
|
}
|
|
10891
10891
|
function Re(n, e = !1) {
|
|
10892
10892
|
let t = n.state.selection;
|
|
10893
|
-
if (
|
|
10893
|
+
if (va(n, t), !!Sa(n)) {
|
|
10894
10894
|
if (!e && n.input.mouseDown && n.input.mouseDown.allowDefault && Z) {
|
|
10895
10895
|
let i = n.domSelectionRange(), o = n.domObserver.currentSelection;
|
|
10896
10896
|
if (i.anchorNode && o.anchorNode && yt(i.anchorNode, i.anchorOffset, o.anchorNode, o.anchorOffset)) {
|
|
@@ -10942,7 +10942,7 @@ function Qu(n) {
|
|
|
10942
10942
|
let i = n.cursorWrapper.dom, o = i.nodeName == "IMG";
|
|
10943
10943
|
o ? t.setStart(i.parentNode, q(i) + 1) : t.setStart(i, 0), t.collapse(!0), e.removeAllRanges(), e.addRange(t), !o && !n.state.selection.visible && re && Je <= 11 && (i.disabled = !0, i.disabled = !1);
|
|
10944
10944
|
}
|
|
10945
|
-
function
|
|
10945
|
+
function va(n, e) {
|
|
10946
10946
|
if (e instanceof O) {
|
|
10947
10947
|
let t = n.docView.descAt(e.from);
|
|
10948
10948
|
t != n.lastSelectedViewDesc && (ts(n), t && t.selectNode(), n.lastSelectedViewDesc = t);
|
|
@@ -10956,9 +10956,9 @@ function zo(n, e, t, i) {
|
|
|
10956
10956
|
return n.someProp("createSelectionBetween", (o) => o(n, e, t)) || N.between(e, t, i);
|
|
10957
10957
|
}
|
|
10958
10958
|
function ns(n) {
|
|
10959
|
-
return n.editable && !n.hasFocus() ? !1 :
|
|
10959
|
+
return n.editable && !n.hasFocus() ? !1 : xa(n);
|
|
10960
10960
|
}
|
|
10961
|
-
function
|
|
10961
|
+
function xa(n) {
|
|
10962
10962
|
let e = n.domSelectionRange();
|
|
10963
10963
|
if (!e.anchorNode)
|
|
10964
10964
|
return !1;
|
|
@@ -11491,7 +11491,7 @@ ie.keypress = (n, e) => {
|
|
|
11491
11491
|
function yi(n) {
|
|
11492
11492
|
return { left: n.clientX, top: n.clientY };
|
|
11493
11493
|
}
|
|
11494
|
-
function
|
|
11494
|
+
function vf(n, e) {
|
|
11495
11495
|
let t = e.x - n.clientX, i = e.y - n.clientY;
|
|
11496
11496
|
return t * t + i * i < 100;
|
|
11497
11497
|
}
|
|
@@ -11510,7 +11510,7 @@ function zt(n, e, t) {
|
|
|
11510
11510
|
let i = n.state.tr.setSelection(e);
|
|
11511
11511
|
i.setMeta("pointer", !0), n.dispatch(i);
|
|
11512
11512
|
}
|
|
11513
|
-
function
|
|
11513
|
+
function xf(n, e) {
|
|
11514
11514
|
if (e == -1)
|
|
11515
11515
|
return !1;
|
|
11516
11516
|
let t = n.state.doc.resolve(e), i = t.nodeAfter;
|
|
@@ -11532,7 +11532,7 @@ function Cf(n, e) {
|
|
|
11532
11532
|
return o != null ? (zt(n, O.create(n.state.doc, o)), !0) : !1;
|
|
11533
11533
|
}
|
|
11534
11534
|
function kf(n, e, t, i, o) {
|
|
11535
|
-
return Ho(n, "handleClickOn", e, t, i) || n.someProp("handleClick", (r) => r(n, e, i)) || (o ? Cf(n, t) :
|
|
11535
|
+
return Ho(n, "handleClickOn", e, t, i) || n.someProp("handleClick", (r) => r(n, e, i)) || (o ? Cf(n, t) : xf(n, t));
|
|
11536
11536
|
}
|
|
11537
11537
|
function Tf(n, e, t, i) {
|
|
11538
11538
|
return Ho(n, "handleDoubleClickOn", e, t, i) || n.someProp("handleDoubleClick", (o) => o(n, e, i));
|
|
@@ -11566,7 +11566,7 @@ ne.mousedown = (n, e) => {
|
|
|
11566
11566
|
let t = e;
|
|
11567
11567
|
n.input.shiftKey = t.shiftKey;
|
|
11568
11568
|
let i = Fo(n), o = Date.now(), r = "singleClick";
|
|
11569
|
-
o - n.input.lastClick.time < 500 &&
|
|
11569
|
+
o - n.input.lastClick.time < 500 && vf(t, n.input.lastClick) && !t[Da] && (n.input.lastClick.type == "singleClick" ? r = "doubleClick" : n.input.lastClick.type == "doubleClick" && (r = "tripleClick")), n.input.lastClick = { time: o, x: t.clientX, y: t.clientY, type: r };
|
|
11570
11570
|
let s = n.posAtCoords(yi(t));
|
|
11571
11571
|
s && (r == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new Of(n, s, t, !!i)) : (r == "doubleClick" ? Tf : Mf)(n, s.pos, s.inside, t) ? t.preventDefault() : je(n, "pointer"));
|
|
11572
11572
|
};
|
|
@@ -11665,7 +11665,7 @@ function Nf(n) {
|
|
|
11665
11665
|
let e = n.domSelectionRange();
|
|
11666
11666
|
if (!e.focusNode)
|
|
11667
11667
|
return null;
|
|
11668
|
-
let t =
|
|
11668
|
+
let t = vu(e.focusNode, e.focusOffset), i = xu(e.focusNode, e.focusOffset);
|
|
11669
11669
|
if (t && i && t != i) {
|
|
11670
11670
|
let o = i.pmViewDesc, r = n.domObserver.lastChangedTextNode;
|
|
11671
11671
|
if (t == r || i == r)
|
|
@@ -11810,7 +11810,7 @@ ie.drop = (n, e) => {
|
|
|
11810
11810
|
c.setSelection(new O(f));
|
|
11811
11811
|
else {
|
|
11812
11812
|
let p = c.mapping.map(a);
|
|
11813
|
-
c.mapping.maps[c.mapping.maps.length - 1].forEach((m, g, y,
|
|
11813
|
+
c.mapping.maps[c.mapping.maps.length - 1].forEach((m, g, y, x) => p = x), c.setSelection(zo(n, f, c.doc.resolve(p)));
|
|
11814
11814
|
}
|
|
11815
11815
|
n.focus(), n.dispatch(c.setMeta("uiEvent", "drop"));
|
|
11816
11816
|
};
|
|
@@ -12218,8 +12218,8 @@ function Vf(n, e, t, i, o, r, s) {
|
|
|
12218
12218
|
t.maps[c].forEach((u, f, p, m) => {
|
|
12219
12219
|
let g = m - p - (f - u);
|
|
12220
12220
|
for (let y = 0; y < l.length; y += 3) {
|
|
12221
|
-
let
|
|
12222
|
-
if (
|
|
12221
|
+
let x = l[y + 1];
|
|
12222
|
+
if (x < 0 || u > x + d - h)
|
|
12223
12223
|
continue;
|
|
12224
12224
|
let b = l[y] + d - h;
|
|
12225
12225
|
f >= b ? l[y + 1] = u <= b ? -2 : -1 : u >= d && g && (l[y] += g, l[y + 1] += g);
|
|
@@ -12545,12 +12545,12 @@ function Kf(n, e, t) {
|
|
|
12545
12545
|
let { node: i, fromOffset: o, toOffset: r, from: s, to: l } = n.docView.parseRange(e, t), a = n.domSelectionRange(), c, d = a.anchorNode;
|
|
12546
12546
|
if (d && n.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: a.anchorOffset }], mi(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), Z && n.input.lastKeyCode === 8)
|
|
12547
12547
|
for (let g = r; g > o; g--) {
|
|
12548
|
-
let y = i.childNodes[g - 1],
|
|
12549
|
-
if (y.nodeName == "BR" && !
|
|
12548
|
+
let y = i.childNodes[g - 1], x = y.pmViewDesc;
|
|
12549
|
+
if (y.nodeName == "BR" && !x) {
|
|
12550
12550
|
r = g;
|
|
12551
12551
|
break;
|
|
12552
12552
|
}
|
|
12553
|
-
if (!
|
|
12553
|
+
if (!x || x.size)
|
|
12554
12554
|
break;
|
|
12555
12555
|
}
|
|
12556
12556
|
let h = n.state.doc, u = n.someProp("domParser") || Ht.fromSchema(n.state.schema), f = h.resolve(s), p = null, m = u.parse(i, {
|
|
@@ -12620,8 +12620,8 @@ function Jf(n, e, t, i, o) {
|
|
|
12620
12620
|
return;
|
|
12621
12621
|
}
|
|
12622
12622
|
n.state.selection.from < n.state.selection.to && p.start == p.endB && n.state.selection instanceof N && (p.start > n.state.selection.from && p.start <= n.state.selection.from + 2 && n.state.selection.from >= c.from ? p.start = n.state.selection.from : p.endA < n.state.selection.to && p.endA >= n.state.selection.to - 2 && n.state.selection.to <= c.to && (p.endB += n.state.selection.to - p.endA, p.endA = n.state.selection.to)), re && Je <= 11 && p.endB == p.start + 1 && p.endA == p.start && p.start > c.from && c.doc.textBetween(p.start - c.from - 1, p.start - c.from + 1) == " " && (p.start--, p.endA--, p.endB--);
|
|
12623
|
-
let m = c.doc.resolveNoCache(p.start - c.from), g = c.doc.resolveNoCache(p.endB - c.from), y = d.resolve(p.start),
|
|
12624
|
-
if ((_t && n.input.lastIOSEnter > Date.now() - 225 && (!
|
|
12623
|
+
let m = c.doc.resolveNoCache(p.start - c.from), g = c.doc.resolveNoCache(p.endB - c.from), y = d.resolve(p.start), x = m.sameParent(g) && m.parent.inlineContent && y.end() >= p.endA, b;
|
|
12624
|
+
if ((_t && n.input.lastIOSEnter > Date.now() - 225 && (!x || o.some((M) => M.nodeName == "DIV" || M.nodeName == "P")) || !x && m.pos < c.doc.content.size && !m.sameParent(g) && (b = E.findFrom(c.doc.resolve(m.pos + 1), 1, !0)) && b.head == g.pos) && n.someProp("handleKeyDown", (M) => M(n, ot(13, "Enter")))) {
|
|
12625
12625
|
n.input.lastIOSEnter = 0;
|
|
12626
12626
|
return;
|
|
12627
12627
|
}
|
|
@@ -12629,30 +12629,30 @@ function Jf(n, e, t, i, o) {
|
|
|
12629
12629
|
ge && Z && n.domObserver.suppressSelectionUpdates();
|
|
12630
12630
|
return;
|
|
12631
12631
|
}
|
|
12632
|
-
Z && ge && p.endB == p.start && (n.input.lastAndroidDelete = Date.now()), ge && !
|
|
12632
|
+
Z && ge && p.endB == p.start && (n.input.lastAndroidDelete = Date.now()), ge && !x && m.start() != g.start() && g.parentOffset == 0 && m.depth == g.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == p.endA && (p.endB -= 2, g = c.doc.resolveNoCache(p.endB - c.from), setTimeout(() => {
|
|
12633
12633
|
n.someProp("handleKeyDown", function(M) {
|
|
12634
12634
|
return M(n, ot(13, "Enter"));
|
|
12635
12635
|
});
|
|
12636
12636
|
}, 20));
|
|
12637
|
-
let S = p.start,
|
|
12638
|
-
if (
|
|
12637
|
+
let S = p.start, v = p.endA, k, A, L;
|
|
12638
|
+
if (x) {
|
|
12639
12639
|
if (m.pos == g.pos)
|
|
12640
|
-
re && Je <= 11 && m.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => Re(n), 20)), k = n.state.tr.delete(S,
|
|
12640
|
+
re && Je <= 11 && m.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => Re(n), 20)), k = n.state.tr.delete(S, v), A = d.resolve(p.start).marksAcross(d.resolve(p.endA));
|
|
12641
12641
|
else if (
|
|
12642
12642
|
// Adding or removing a mark
|
|
12643
12643
|
p.endA == p.endB && (L = Gf(m.parent.content.cut(m.parentOffset, g.parentOffset), y.parent.content.cut(y.parentOffset, p.endA - y.start())))
|
|
12644
12644
|
)
|
|
12645
|
-
k = n.state.tr, L.type == "add" ? k.addMark(S,
|
|
12645
|
+
k = n.state.tr, L.type == "add" ? k.addMark(S, v, L.mark) : k.removeMark(S, v, L.mark);
|
|
12646
12646
|
else if (m.parent.child(m.index()).isText && m.index() == g.index() - (g.textOffset ? 0 : 1)) {
|
|
12647
12647
|
let M = m.parent.textBetween(m.parentOffset, g.parentOffset);
|
|
12648
|
-
if (n.someProp("handleTextInput", (R) => R(n, S,
|
|
12648
|
+
if (n.someProp("handleTextInput", (R) => R(n, S, v, M)))
|
|
12649
12649
|
return;
|
|
12650
|
-
k = n.state.tr.insertText(M, S,
|
|
12650
|
+
k = n.state.tr.insertText(M, S, v);
|
|
12651
12651
|
}
|
|
12652
12652
|
}
|
|
12653
|
-
if (k || (k = n.state.tr.replace(S,
|
|
12653
|
+
if (k || (k = n.state.tr.replace(S, v, c.doc.slice(p.start - c.from, p.endB - c.from))), c.sel) {
|
|
12654
12654
|
let M = ms(n, k.doc, c.sel);
|
|
12655
|
-
M && !(Z && ge && n.composing && M.empty && (p.start != p.endB || n.input.lastAndroidDelete < Date.now() - 100) && (M.head == S || M.head == k.mapping.map(
|
|
12655
|
+
M && !(Z && ge && n.composing && M.empty && (p.start != p.endB || n.input.lastAndroidDelete < Date.now() - 100) && (M.head == S || M.head == k.mapping.map(v) - 1) || re && M.empty && M.head == S) && k.setSelection(M);
|
|
12656
12656
|
}
|
|
12657
12657
|
A && k.ensureMarks(A), r && k.setMeta("composition", r), n.dispatch(k.scrollIntoView());
|
|
12658
12658
|
}
|
|
@@ -12738,7 +12738,7 @@ class Yf {
|
|
|
12738
12738
|
added to the document.
|
|
12739
12739
|
*/
|
|
12740
12740
|
constructor(e, t) {
|
|
12741
|
-
this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new gf(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(
|
|
12741
|
+
this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new gf(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(vs), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = ws(this), bs(this), this.nodeViews = Ss(this), this.docView = Zr(this.state.doc, ys(this), Ki(this), this.dom, this), this.domObserver = new Ff(this, (i, o, r, s) => Jf(this, i, o, r, s)), this.domObserver.start(), yf(this), this.updatePluginViews();
|
|
12742
12742
|
}
|
|
12743
12743
|
/**
|
|
12744
12744
|
Holds `true` when a
|
|
@@ -12768,7 +12768,7 @@ class Yf {
|
|
|
12768
12768
|
update(e) {
|
|
12769
12769
|
e.handleDOMEvents != this._props.handleDOMEvents && bo(this);
|
|
12770
12770
|
let t = this._props;
|
|
12771
|
-
this._props = e, e.plugins && (e.plugins.forEach(
|
|
12771
|
+
this._props = e, e.plugins && (e.plugins.forEach(vs), this.directPlugins = e.plugins), this.updateStateInner(e.state, t);
|
|
12772
12772
|
}
|
|
12773
12773
|
/**
|
|
12774
12774
|
Update the view by updating existing props object with the object
|
|
@@ -12811,7 +12811,7 @@ class Yf {
|
|
|
12811
12811
|
let p = Z ? this.trackWrites = this.domSelectionRange().focusNode : null;
|
|
12812
12812
|
this.composing && (this.input.compositionNode = Nf(this)), (r || !this.docView.update(e.doc, c, a, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = Zr(e.doc, c, a, this.dom, this)), p && !this.trackWrites && (f = !0);
|
|
12813
12813
|
}
|
|
12814
|
-
f || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && ef(this)) ? Re(this, f) : (
|
|
12814
|
+
f || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && ef(this)) ? Re(this, f) : (va(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
|
|
12815
12815
|
}
|
|
12816
12816
|
this.updatePluginViews(o), !((i = this.dragging) === null || i === void 0) && i.node && !o.doc.eq(e.doc) && this.updateDraggedNode(this.dragging, o), d == "reset" ? this.dom.scrollTop = 0 : d == "to selection" ? this.scrollToSelection() : u && Du(u);
|
|
12817
12817
|
}
|
|
@@ -13102,7 +13102,7 @@ function Qf(n, e) {
|
|
|
13102
13102
|
i++;
|
|
13103
13103
|
return t != i;
|
|
13104
13104
|
}
|
|
13105
|
-
function
|
|
13105
|
+
function vs(n) {
|
|
13106
13106
|
if (n.spec.state || n.spec.filterTransaction || n.spec.appendTransaction)
|
|
13107
13107
|
throw new RangeError("Plugins passed directly to the view must not have a state component");
|
|
13108
13108
|
}
|
|
@@ -13219,7 +13219,7 @@ function ep(n) {
|
|
|
13219
13219
|
o++;
|
|
13220
13220
|
if (p == h.childCount)
|
|
13221
13221
|
break;
|
|
13222
|
-
const m = h.child(p), { colspan: g, rowspan: y, colwidth:
|
|
13222
|
+
const m = h.child(p), { colspan: g, rowspan: y, colwidth: x } = m.attrs;
|
|
13223
13223
|
for (let b = 0; b < y; b++) {
|
|
13224
13224
|
if (b + c >= t) {
|
|
13225
13225
|
(r || (r = [])).push({
|
|
@@ -13230,16 +13230,16 @@ function ep(n) {
|
|
|
13230
13230
|
break;
|
|
13231
13231
|
}
|
|
13232
13232
|
const S = o + b * e;
|
|
13233
|
-
for (let
|
|
13234
|
-
i[S +
|
|
13233
|
+
for (let v = 0; v < g; v++) {
|
|
13234
|
+
i[S + v] == 0 ? i[S + v] = d : (r || (r = [])).push({
|
|
13235
13235
|
type: "collision",
|
|
13236
13236
|
row: c,
|
|
13237
13237
|
pos: d,
|
|
13238
|
-
n: g -
|
|
13238
|
+
n: g - v
|
|
13239
13239
|
});
|
|
13240
|
-
const k =
|
|
13240
|
+
const k = x && x[v];
|
|
13241
13241
|
if (k) {
|
|
13242
|
-
const A = (S +
|
|
13242
|
+
const A = (S + v) % e * 2, L = s[A];
|
|
13243
13243
|
L == null || L != k && s[A + 1] == 1 ? (s[A] = k, s[A + 1] = 1) : L == k && s[A + 1]++;
|
|
13244
13244
|
}
|
|
13245
13245
|
}
|
|
@@ -13311,7 +13311,7 @@ function ip(n) {
|
|
|
13311
13311
|
e.push(0);
|
|
13312
13312
|
return e;
|
|
13313
13313
|
}
|
|
13314
|
-
function
|
|
13314
|
+
function xs(n, e) {
|
|
13315
13315
|
if (typeof n == "string")
|
|
13316
13316
|
return {};
|
|
13317
13317
|
const t = n.getAttribute("data-colwidth"), i = t && /^\d+(,\d+)*$/.test(t) ? t.split(",").map((s) => Number(s)) : null, o = Number(n.getAttribute("colspan") || 1), r = {
|
|
@@ -13367,7 +13367,7 @@ function op(n) {
|
|
|
13367
13367
|
tableRole: "cell",
|
|
13368
13368
|
isolating: !0,
|
|
13369
13369
|
parseDOM: [
|
|
13370
|
-
{ tag: "td", getAttrs: (i) =>
|
|
13370
|
+
{ tag: "td", getAttrs: (i) => xs(i, e) }
|
|
13371
13371
|
],
|
|
13372
13372
|
toDOM(i) {
|
|
13373
13373
|
return ["td", Cs(i, e), 0];
|
|
@@ -13379,7 +13379,7 @@ function op(n) {
|
|
|
13379
13379
|
tableRole: "header_cell",
|
|
13380
13380
|
isolating: !0,
|
|
13381
13381
|
parseDOM: [
|
|
13382
|
-
{ tag: "th", getAttrs: (i) =>
|
|
13382
|
+
{ tag: "th", getAttrs: (i) => xs(i, e) }
|
|
13383
13383
|
],
|
|
13384
13384
|
toDOM(i) {
|
|
13385
13385
|
return ["th", Cs(i, e), 0];
|
|
@@ -13399,7 +13399,7 @@ function Te(n) {
|
|
|
13399
13399
|
return e;
|
|
13400
13400
|
}
|
|
13401
13401
|
var _e = new yn("selectingCells");
|
|
13402
|
-
function
|
|
13402
|
+
function vn(n) {
|
|
13403
13403
|
for (let e = n.depth - 1; e > 0; e--)
|
|
13404
13404
|
if (n.node(e).type.spec.tableRole == "row")
|
|
13405
13405
|
return n.node(0).resolve(n.before(e + 1));
|
|
@@ -13418,7 +13418,7 @@ function _o(n) {
|
|
|
13418
13418
|
return e.$anchorCell.pos > e.$headCell.pos ? e.$anchorCell : e.$headCell;
|
|
13419
13419
|
if ("node" in e && e.node && e.node.type.spec.tableRole == "cell")
|
|
13420
13420
|
return e.$anchor;
|
|
13421
|
-
const t =
|
|
13421
|
+
const t = vn(e.$head) || rp(e.$head);
|
|
13422
13422
|
if (t)
|
|
13423
13423
|
return t;
|
|
13424
13424
|
throw new RangeError(`No cell found around position ${e.head}`);
|
|
@@ -13435,7 +13435,7 @@ function rp(n) {
|
|
|
13435
13435
|
return n.doc.resolve(t - e.nodeSize);
|
|
13436
13436
|
}
|
|
13437
13437
|
}
|
|
13438
|
-
function
|
|
13438
|
+
function vo(n) {
|
|
13439
13439
|
return n.parent.type.spec.tableRole == "row" && !!n.nodeAfter;
|
|
13440
13440
|
}
|
|
13441
13441
|
function sp(n) {
|
|
@@ -13477,7 +13477,7 @@ var W = class De extends E {
|
|
|
13477
13477
|
}
|
|
13478
13478
|
map(e, t) {
|
|
13479
13479
|
const i = e.resolve(t.map(this.$anchorCell.pos)), o = e.resolve(t.map(this.$headCell.pos));
|
|
13480
|
-
if (
|
|
13480
|
+
if (vo(i) && vo(o) && Ko(i, o)) {
|
|
13481
13481
|
const r = this.$anchorCell.node(-1) != i.node(-1);
|
|
13482
13482
|
return r && this.isRowSelection() ? De.rowSelection(i, o) : r && this.isColSelection() ? De.colSelection(i, o) : new De(i, o);
|
|
13483
13483
|
}
|
|
@@ -13931,14 +13931,14 @@ function yp(n) {
|
|
|
13931
13931
|
for (let a = 0; a < e.childCount; a++) {
|
|
13932
13932
|
let c = e.child(a).content;
|
|
13933
13933
|
const d = a ? 0 : Math.max(0, t - 1), h = a < e.childCount - 1 ? 0 : Math.max(0, i - 1);
|
|
13934
|
-
(d || h) && (c =
|
|
13934
|
+
(d || h) && (c = xo(
|
|
13935
13935
|
Te(s).row,
|
|
13936
13936
|
new C(c, d, h)
|
|
13937
13937
|
).content), l.push(c);
|
|
13938
13938
|
}
|
|
13939
13939
|
else if (r == "cell" || r == "header_cell")
|
|
13940
13940
|
l.push(
|
|
13941
|
-
t || i ?
|
|
13941
|
+
t || i ? xo(
|
|
13942
13942
|
Te(s).row,
|
|
13943
13943
|
new C(e, t, i)
|
|
13944
13944
|
).content : e
|
|
@@ -13969,7 +13969,7 @@ function bp(n, e) {
|
|
|
13969
13969
|
}
|
|
13970
13970
|
return { height: e.length, width: i, rows: e };
|
|
13971
13971
|
}
|
|
13972
|
-
function
|
|
13972
|
+
function xo(n, e) {
|
|
13973
13973
|
const t = n.createAndFill();
|
|
13974
13974
|
return new _l(t).replace(0, t.content.size, e).doc;
|
|
13975
13975
|
}
|
|
@@ -14122,7 +14122,7 @@ function Os(n, e, t, i, o) {
|
|
|
14122
14122
|
)
|
|
14123
14123
|
), e(h);
|
|
14124
14124
|
}
|
|
14125
|
-
var
|
|
14125
|
+
var vp = sa({
|
|
14126
14126
|
ArrowLeft: Vn("horiz", -1),
|
|
14127
14127
|
ArrowRight: Vn("horiz", 1),
|
|
14128
14128
|
ArrowUp: Vn("vert", -1),
|
|
@@ -14190,8 +14190,8 @@ function Ln(n, e) {
|
|
|
14190
14190
|
) : !1;
|
|
14191
14191
|
};
|
|
14192
14192
|
}
|
|
14193
|
-
function
|
|
14194
|
-
const t = n.state.doc, i =
|
|
14193
|
+
function xp(n, e) {
|
|
14194
|
+
const t = n.state.doc, i = vn(t.resolve(e));
|
|
14195
14195
|
return i ? (n.dispatch(n.state.tr.setSelection(new W(i))), !0) : !1;
|
|
14196
14196
|
}
|
|
14197
14197
|
function Cp(n, e, t) {
|
|
@@ -14205,7 +14205,7 @@ function Cp(n, e, t) {
|
|
|
14205
14205
|
height: 1,
|
|
14206
14206
|
rows: [
|
|
14207
14207
|
w.from(
|
|
14208
|
-
|
|
14208
|
+
xo(Te(n.state.schema).cell, t)
|
|
14209
14209
|
)
|
|
14210
14210
|
]
|
|
14211
14211
|
});
|
|
@@ -14234,7 +14234,7 @@ function kp(n, e) {
|
|
|
14234
14234
|
let o;
|
|
14235
14235
|
if (e.shiftKey && n.state.selection instanceof W)
|
|
14236
14236
|
r(n.state.selection.$anchorCell, e), e.preventDefault();
|
|
14237
|
-
else if (e.shiftKey && i && (o =
|
|
14237
|
+
else if (e.shiftKey && i && (o = vn(n.state.selection.$anchor)) != null && ((t = ji(n, e)) == null ? void 0 : t.pos) != o.pos)
|
|
14238
14238
|
r(o, e), e.preventDefault();
|
|
14239
14239
|
else if (!i)
|
|
14240
14240
|
return;
|
|
@@ -14292,7 +14292,7 @@ function ji(n, e) {
|
|
|
14292
14292
|
left: e.clientX,
|
|
14293
14293
|
top: e.clientY
|
|
14294
14294
|
});
|
|
14295
|
-
return t && t ?
|
|
14295
|
+
return t && t ? vn(n.state.doc.resolve(t.pos)) : null;
|
|
14296
14296
|
}
|
|
14297
14297
|
var Tp = class {
|
|
14298
14298
|
constructor(n, e) {
|
|
@@ -14325,8 +14325,8 @@ function Co(n, e, t, i, o, r) {
|
|
|
14325
14325
|
if (l += g || i, g || (a = !1), c)
|
|
14326
14326
|
c.style.width != y && (c.style.width = y), c = c.nextSibling;
|
|
14327
14327
|
else {
|
|
14328
|
-
const
|
|
14329
|
-
|
|
14328
|
+
const x = document.createElement("col");
|
|
14329
|
+
x.style.width = y, e.appendChild(x);
|
|
14330
14330
|
}
|
|
14331
14331
|
}
|
|
14332
14332
|
}
|
|
@@ -14397,7 +14397,7 @@ var Ap = class Kn {
|
|
|
14397
14397
|
return new Kn(t.activeHandle, i.setDragging);
|
|
14398
14398
|
if (t.activeHandle > -1 && e.docChanged) {
|
|
14399
14399
|
let o = e.mapping.map(t.activeHandle, -1);
|
|
14400
|
-
return
|
|
14400
|
+
return vo(e.doc.resolve(o)) || (o = -1), new Kn(o, t.dragging);
|
|
14401
14401
|
}
|
|
14402
14402
|
return t;
|
|
14403
14403
|
}
|
|
@@ -14491,7 +14491,7 @@ function Ns(n, e, t, i) {
|
|
|
14491
14491
|
});
|
|
14492
14492
|
if (!r)
|
|
14493
14493
|
return -1;
|
|
14494
|
-
const { pos: s } = r, l =
|
|
14494
|
+
const { pos: s } = r, l = vn(n.state.doc.resolve(s));
|
|
14495
14495
|
if (!l)
|
|
14496
14496
|
return -1;
|
|
14497
14497
|
if (t == "right")
|
|
@@ -14592,8 +14592,8 @@ function Lp({
|
|
|
14592
14592
|
createSelectionBetween(e) {
|
|
14593
14593
|
return _e.getState(e.state) != null ? e.state.selection : null;
|
|
14594
14594
|
},
|
|
14595
|
-
handleTripleClick:
|
|
14596
|
-
handleKeyDown:
|
|
14595
|
+
handleTripleClick: xp,
|
|
14596
|
+
handleKeyDown: vp,
|
|
14597
14597
|
handlePaste: Cp
|
|
14598
14598
|
},
|
|
14599
14599
|
appendTransaction(e, t, i) {
|
|
@@ -15203,7 +15203,7 @@ const Qp = (n, e) => {
|
|
|
15203
15203
|
}
|
|
15204
15204
|
},
|
|
15205
15205
|
onClick: ({ event: c }) => {
|
|
15206
|
-
const d = c.currentTarget || c.target, { x: h, y: u, width: f, height: p } = d.getBoundingClientRect(), m = "linkLayout", g = () => t.runCommand(Y.layoutRemove, { id: m }), y = r.link.get(),
|
|
15206
|
+
const d = c.currentTarget || c.target, { x: h, y: u, width: f, height: p } = d.getBoundingClientRect(), m = "linkLayout", g = () => t.runCommand(Y.layoutRemove, { id: m }), y = r.link.get(), x = {
|
|
15207
15207
|
id: m,
|
|
15208
15208
|
style: { width: 240 },
|
|
15209
15209
|
disablePropagation: !0,
|
|
@@ -15264,7 +15264,7 @@ const Qp = (n, e) => {
|
|
|
15264
15264
|
]
|
|
15265
15265
|
}
|
|
15266
15266
|
};
|
|
15267
|
-
t.runCommand(Y.layoutToggle,
|
|
15267
|
+
t.runCommand(Y.layoutToggle, x);
|
|
15268
15268
|
}
|
|
15269
15269
|
},
|
|
15270
15270
|
alignText: {
|
|
@@ -15520,15 +15520,15 @@ function wm(n) {
|
|
|
15520
15520
|
function Sm(n) {
|
|
15521
15521
|
return ec(/^```$/, n);
|
|
15522
15522
|
}
|
|
15523
|
-
function
|
|
15523
|
+
function vm(n, e) {
|
|
15524
15524
|
return ec(new RegExp("^(#{1," + e + "})\\s$"), n, (t) => ({
|
|
15525
15525
|
level: t[1].length
|
|
15526
15526
|
}));
|
|
15527
15527
|
}
|
|
15528
|
-
function
|
|
15528
|
+
function xm(n) {
|
|
15529
15529
|
const e = gm.concat(hm, dm);
|
|
15530
15530
|
let t;
|
|
15531
|
-
return (t = n.nodes.blockquote) && e.push(ym(t)), (t = n.nodes.orderedList) && e.push(bm(t)), (t = n.nodes.bulletList) && e.push(wm(t)), (t = n.nodes.codeBlock) && e.push(Sm(t)), (t = n.nodes.heading) && e.push(
|
|
15531
|
+
return (t = n.nodes.blockquote) && e.push(ym(t)), (t = n.nodes.orderedList) && e.push(bm(t)), (t = n.nodes.bulletList) && e.push(wm(t)), (t = n.nodes.codeBlock) && e.push(Sm(t)), (t = n.nodes.heading) && e.push(vm(t, 6)), cm({ rules: e });
|
|
15532
15532
|
}
|
|
15533
15533
|
const Cm = "rteProseMirror", km = function(n, e = {}) {
|
|
15534
15534
|
const t = {
|
|
@@ -15544,7 +15544,7 @@ const Cm = "rteProseMirror", km = function(n, e = {}) {
|
|
|
15544
15544
|
plugins: [
|
|
15545
15545
|
Mp(),
|
|
15546
15546
|
Lp(),
|
|
15547
|
-
|
|
15547
|
+
xm(a),
|
|
15548
15548
|
lu(),
|
|
15549
15549
|
Fi({
|
|
15550
15550
|
Tab: Ts(1),
|
|
@@ -15572,11 +15572,11 @@ const Cm = "rteProseMirror", km = function(n, e = {}) {
|
|
|
15572
15572
|
{
|
|
15573
15573
|
state: u,
|
|
15574
15574
|
dispatchTransaction(g) {
|
|
15575
|
-
var
|
|
15576
|
-
const { state: y } = f,
|
|
15577
|
-
f.updateState(
|
|
15578
|
-
const S = !y.selection.eq(
|
|
15579
|
-
b && (Wp(((
|
|
15575
|
+
var v;
|
|
15576
|
+
const { state: y } = f, x = y.apply(g), b = !y.doc.eq(x.doc);
|
|
15577
|
+
f.updateState(x);
|
|
15578
|
+
const S = !y.selection.eq(x.selection);
|
|
15579
|
+
b && (Wp(((v = l == null ? void 0 : l.view) == null ? void 0 : v.el) || s), f.focus()), (S || b) && n.trigger(me);
|
|
15580
15580
|
}
|
|
15581
15581
|
}
|
|
15582
15582
|
);
|
|
@@ -15625,7 +15625,7 @@ const Cm = "rteProseMirror", km = function(n, e = {}) {
|
|
|
15625
15625
|
n.RichTextEditor.customRte = void 0, r();
|
|
15626
15626
|
}
|
|
15627
15627
|
});
|
|
15628
|
-
},
|
|
15628
|
+
}, Hm = Me(km), Tm = (n) => {
|
|
15629
15629
|
const e = {};
|
|
15630
15630
|
for (const t of Object.keys(n)) {
|
|
15631
15631
|
let i = n[t];
|
|
@@ -15651,7 +15651,7 @@ const Cm = "rteProseMirror", km = function(n, e = {}) {
|
|
|
15651
15651
|
return {
|
|
15652
15652
|
id: "youtube",
|
|
15653
15653
|
types: ["youtube-video"],
|
|
15654
|
-
label:
|
|
15654
|
+
label: ({ editor: l }) => l.I18n.t("youtubeAssetProvider.providerLabel"),
|
|
15655
15655
|
search: { reloadOnInput: !0, debounceMs: 1e3 },
|
|
15656
15656
|
async onLoad({ searchValue: l, pageCustomData: a }) {
|
|
15657
15657
|
var m;
|
|
@@ -15707,26 +15707,34 @@ const Cm = "rteProseMirror", km = function(n, e = {}) {
|
|
|
15707
15707
|
]
|
|
15708
15708
|
})
|
|
15709
15709
|
};
|
|
15710
|
-
}, Am =
|
|
15711
|
-
|
|
15712
|
-
|
|
15713
|
-
|
|
15710
|
+
}, Am = {
|
|
15711
|
+
youtubeAssetProvider: {
|
|
15712
|
+
searchBtn: "Search on YouTube",
|
|
15713
|
+
providerLabel: "YouTube Videos"
|
|
15714
|
+
}
|
|
15715
|
+
}, Om = "youtubeAssetProvider", Em = function(n, e) {
|
|
15716
|
+
const { skipVideoComponent: t, i18n: i = {} } = e, o = Mm(e);
|
|
15717
|
+
n.runCommand(Y.assetProviderAdd, { provider: o });
|
|
15718
|
+
const r = "search-on-youtube", s = "video";
|
|
15714
15719
|
if (!t) {
|
|
15715
|
-
const
|
|
15716
|
-
n.Components.addType(
|
|
15720
|
+
const l = n.Components.getType(s).model.prototype;
|
|
15721
|
+
n.Components.addType(s, {
|
|
15717
15722
|
model: {
|
|
15718
15723
|
getYoutubeTraits() {
|
|
15719
|
-
const [
|
|
15724
|
+
const [a, ...c] = l.getYoutubeTraits.apply(this);
|
|
15720
15725
|
return [
|
|
15721
|
-
|
|
15726
|
+
a,
|
|
15722
15727
|
{
|
|
15723
|
-
id:
|
|
15728
|
+
id: r,
|
|
15724
15729
|
type: "button",
|
|
15725
|
-
label: n.I18n.t("
|
|
15730
|
+
label: n.I18n.t("youtubeAssetProvider.searchBtn"),
|
|
15726
15731
|
command: () => {
|
|
15727
15732
|
n.AssetManager.open({
|
|
15728
|
-
|
|
15729
|
-
|
|
15733
|
+
providerId: o.id,
|
|
15734
|
+
providers: [],
|
|
15735
|
+
types: [],
|
|
15736
|
+
select: (d) => {
|
|
15737
|
+
n.Assets.close(), this.set({ videoId: d.attributes.id });
|
|
15730
15738
|
},
|
|
15731
15739
|
content: {
|
|
15732
15740
|
header: {
|
|
@@ -15737,40 +15745,43 @@ const Cm = "rteProseMirror", km = function(n, e = {}) {
|
|
|
15737
15745
|
});
|
|
15738
15746
|
}
|
|
15739
15747
|
},
|
|
15740
|
-
...
|
|
15748
|
+
...c
|
|
15741
15749
|
];
|
|
15742
15750
|
}
|
|
15743
15751
|
}
|
|
15744
15752
|
});
|
|
15745
15753
|
}
|
|
15746
|
-
|
|
15754
|
+
n.I18n.addMessages({
|
|
15755
|
+
en: Am,
|
|
15756
|
+
...i
|
|
15757
|
+
}), Ae({
|
|
15747
15758
|
editor: n,
|
|
15748
15759
|
licenseKey: e.licenseKey,
|
|
15749
15760
|
plan: ee.startup,
|
|
15750
|
-
pluginName:
|
|
15761
|
+
pluginName: Om,
|
|
15751
15762
|
cleanup: () => {
|
|
15752
|
-
if (n.runCommand(Y.assetProviderRemove, { id:
|
|
15753
|
-
const
|
|
15754
|
-
n.Components.addType(
|
|
15763
|
+
if (n.runCommand(Y.assetProviderRemove, { id: o.id }), !t) {
|
|
15764
|
+
const l = n.Components.getType(s).model.prototype;
|
|
15765
|
+
n.Components.addType(s, {
|
|
15755
15766
|
model: {
|
|
15756
15767
|
getYoutubeTraits() {
|
|
15757
|
-
return
|
|
15768
|
+
return l.getYoutubeTraits.apply(this).filter((a) => a.id !== r);
|
|
15758
15769
|
}
|
|
15759
15770
|
}
|
|
15760
15771
|
});
|
|
15761
15772
|
}
|
|
15762
15773
|
}
|
|
15763
15774
|
});
|
|
15764
|
-
},
|
|
15775
|
+
}, Fm = Me(Em);
|
|
15765
15776
|
export {
|
|
15766
|
-
|
|
15767
|
-
|
|
15768
|
-
|
|
15769
|
-
|
|
15770
|
-
|
|
15771
|
-
|
|
15772
|
-
|
|
15773
|
-
|
|
15774
|
-
|
|
15775
|
-
|
|
15777
|
+
Dm as dialogComponent,
|
|
15778
|
+
Vm as fsLightboxComponent,
|
|
15779
|
+
Im as iconifyComponent,
|
|
15780
|
+
Lm as lightGalleryComponent,
|
|
15781
|
+
Rm as listPagesComponent,
|
|
15782
|
+
Hm as rteProseMirror,
|
|
15783
|
+
Bm as rteTinyMce,
|
|
15784
|
+
zm as swiperComponent,
|
|
15785
|
+
Pm as tableComponent,
|
|
15786
|
+
Fm as youtubeAssetProvider
|
|
15776
15787
|
};
|