@grapesjs/studio-sdk-plugins 1.0.32 → 1.0.33-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/googleFontsAssetProvider/index.cjs.js +1 -1
- package/dist/googleFontsAssetProvider/index.es.js +21 -21
- package/dist/googleFontsAssetProvider/index.umd.js +1 -1
- package/dist/iconifyComponent/index.cjs.js +2 -2
- package/dist/iconifyComponent/index.es.js +57 -57
- package/dist/iconifyComponent/index.umd.js +2 -2
- package/dist/index.cjs.js +32 -32
- package/dist/index.es.js +684 -673
- package/dist/index.umd.js +66 -66
- package/dist/layoutSidebarButtons/index.cjs.js +1 -1
- package/dist/layoutSidebarButtons/index.es.js +31 -31
- package/dist/layoutSidebarButtons/index.umd.js +1 -1
- package/dist/presetPrintable/index.cjs.js +4 -4
- package/dist/presetPrintable/index.es.js +80 -80
- package/dist/presetPrintable/index.umd.js +3 -3
- package/dist/prosemirror/index.cjs.js +9 -9
- package/dist/prosemirror/index.es.js +340 -329
- package/dist/prosemirror/index.umd.js +3 -3
- package/dist/prosemirror/schema.d.ts +8 -4
- package/dist/prosemirror/utils.d.ts +9 -3
- package/dist/rteTinyMce/index.cjs.js +2 -2
- package/dist/rteTinyMce/index.es.js +11 -11
- package/dist/rteTinyMce/index.umd.js +2 -2
- package/dist/tableComponent/index.cjs.js +1 -1
- package/dist/tableComponent/index.es.js +1 -1
- package/dist/tableComponent/index.umd.js +1 -1
- package/dist/youtubeAssetProvider/index.cjs.js +1 -1
- package/dist/youtubeAssetProvider/index.es.js +39 -39
- package/dist/youtubeAssetProvider/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import xp from "handlebars/dist/cjs/handlebars";
|
|
2
|
-
const
|
|
3
|
-
|
|
2
|
+
const Na = "app.grapesjs.com", Oa = "app-stage.grapesjs.com", wp = "app2.grapesjs.com", Cp = "app-stage2.grapesjs.com", wr = [
|
|
3
|
+
Na,
|
|
4
4
|
wp,
|
|
5
5
|
Oa,
|
|
6
6
|
Cp,
|
|
@@ -43,10 +43,10 @@ const Ia = "app.grapesjs.com", Oa = "app-stage.grapesjs.com", wp = "app2.grapesj
|
|
|
43
43
|
window.define = void 0;
|
|
44
44
|
const t = await Mp(n);
|
|
45
45
|
return window.define = e, t;
|
|
46
|
-
}, Pp = ({ isDev: n, isStage: e }) => `${n ? "" : `https://${e ? Oa :
|
|
46
|
+
}, Pp = ({ isDev: n, isStage: e }) => `${n ? "" : `https://${e ? Oa : Na}`}/api`, Np = () => {
|
|
47
47
|
const n = Tp() && window.location.hostname;
|
|
48
48
|
return !!n && (wr.includes(n) || wr.some((e) => n.endsWith(e)));
|
|
49
|
-
},
|
|
49
|
+
}, Op = (n) => n.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (e, t) => (t ? "-" : "") + e.toLowerCase()), Ip = (n) => typeof n < "u", Rp = (n) => typeof n == "string";
|
|
50
50
|
function _t(n) {
|
|
51
51
|
return typeof n == "function";
|
|
52
52
|
}
|
|
@@ -71,7 +71,7 @@ async function Dp({
|
|
|
71
71
|
throw new Error(`HTTP error! status: ${p.status}`);
|
|
72
72
|
return p.json();
|
|
73
73
|
}
|
|
74
|
-
var H = /* @__PURE__ */ ((n) => (n.free = "free", n.startup = "startup", n.business = "business", n.enterprise = "enterprise", n))(H || {}),
|
|
74
|
+
var H = /* @__PURE__ */ ((n) => (n.free = "free", n.startup = "startup", n.business = "business", n.enterprise = "enterprise", n))(H || {}), Ia = /* @__PURE__ */ ((n) => (n.Info = "info", n.Error = "error", n.Success = "success", n.Warning = "warning", n))(Ia || {}), W = /* @__PURE__ */ ((n) => (n.toastAdd = "studio:toastAdd", n.toastRemove = "studio:toastRemove", n.dialogOpen = "studio:dialogOpen", n.dialogClose = "studio:dialogClose", n.dialogExportCode = "studio:dialogExportCode", n.sidebarLeftSet = "studio:sidebarLeft:set", n.sidebarLeftGet = "studio:sidebarLeft:get", n.sidebarLeftToggle = "studio:sidebarLeft:toggle", n.sidebarRightSet = "studio:sidebarRight:set", n.sidebarRightGet = "studio:sidebarRight:get", n.sidebarRightToggle = "studio:sidebarRight:toggle", n.sidebarTopSet = "studio:sidebarTop:set", n.sidebarTopGet = "studio:sidebarTop:get", n.sidebarTopToggle = "studio:sidebarTop:toggle", n.sidebarBottomSet = "studio:sidebarBottom:set", n.sidebarBottomGet = "studio:sidebarBottom:get", n.sidebarBottomToggle = "studio:sidebarBottom:toggle", n.symbolAdd = "studio:symbolAdd", n.symbolDetach = "studio:symbolDetach", n.symbolOverride = "studio:symbolOverride", n.symbolPropagateStyles = "studio:propagateStyles", n.getPagesConfig = "studio:getPagesConfig", n.setPagesConfig = "studio:setPagesConfig", n.getPageSettings = "studio:getPageSettings", n.setPageSettings = "studio:setPageSettings", n.clearPage = "studio:clearPage", n.projectFiles = "studio:projectFiles", n.validateCode = "studio:validateCode", n.canvasReload = "studio:canvasReload", n.getBlocksPanel = "studio:getBlocksPanel", n.setBlocksPanel = "studio:setBlocksPanel", n.getStateContextMenu = "studio:getStateContextMenu", n.setStateContextMenu = "studio:setStateContextMenu", n.contextMenuComponent = "studio:contextMenuComponent", n.layoutAdd = "studio:layoutAdd", n.layoutRemove = "studio:layoutRemove", n.layoutToggle = "studio:layoutToggle", n.layoutUpdate = "studio:layoutUpdate", n.layoutGet = "studio:layoutGet", n.layoutConfigGet = "studio:layoutConfigGet", n.layoutConfigSet = "studio:layoutConfigSet", n.layoutComponentAdd = "studio:layoutComponentAdd", n.layoutComponentGet = "studio:layoutComponentGet", n.layoutComponentRemove = "studio:layoutComponentRemove", n.getStateTheme = "studio:getStateTheme", n.setStateTheme = "studio:setStateTheme", n.assetProviderGet = "studio:assetProviderGet", n.assetProviderAdd = "studio:assetProviderAdd", n.assetProviderRemove = "studio:assetProviderRemove", n.fontGet = "studio:fontGet", n.fontAdd = "studio:fontAdd", n.fontRemove = "studio:fontRemove", n.fontManagerOpen = "studio:fontManagerOpen", n.menuFontLoad = "studio:menuFontLoad", n.toggleStateDataSource = "studio:toggleStateDataSource", n.getStateDataSource = "studio:getStateDataSource", n.dataSourceSetGlobalData = "studio:dataSourceSetGlobalData", n.dataSourceSetImporter = "studio:dataSourceSetImporter", n.dataSourceSetExporter = "studio:dataSourceSetExporter", n.setDragAbsolute = "studio:setDragAbsolute", n))(W || {}), Ra = /* @__PURE__ */ ((n) => (n.layoutToggleId = "studio:layoutToggle:", n.toggleBlocksPanel = "studio:toggleBlocksPanel", n.pageSettingsUpdate = "studio:pageSettingsUpdate", n.toggleDataSourcesPreview = "studio:toggleDataSourcesPreview", n))(Ra || {}), Da = /* @__PURE__ */ ((n) => (n.dark = "dark", n.light = "light", n.auto = "auto", n))(Da || {}), La = /* @__PURE__ */ ((n) => (n.web = "web", n.email = "email", n.document = "document", n.react = "react", n))(La || {});
|
|
75
75
|
const Cr = {
|
|
76
76
|
[H.free]: 0,
|
|
77
77
|
[H.startup]: 10,
|
|
@@ -140,7 +140,7 @@ const Ps = (n, e) => {
|
|
|
140
140
|
}, gt = (n, e) => {
|
|
141
141
|
var t;
|
|
142
142
|
return !!((t = n == null ? void 0 : n.classList) != null && t.contains(e));
|
|
143
|
-
},
|
|
143
|
+
}, Ge = (n) => (e) => {
|
|
144
144
|
var t;
|
|
145
145
|
return ((t = e.getAttribute) == null ? void 0 : t.call(e, Re)) === n;
|
|
146
146
|
}, ao = (...n) => (e) => n.some((t) => e.is(t)), qi = (...n) => (e, t) => n.some((s) => t.is(s)), zp = (n, e = {}) => {
|
|
@@ -148,7 +148,7 @@ const Ps = (n, e) => {
|
|
|
148
148
|
const t = {}, s = [], o = [];
|
|
149
149
|
for (const r in n) {
|
|
150
150
|
const { value: l, ...a } = n[r];
|
|
151
|
-
s.push({ id: r, name: r, changeProp: !0, category: e.category, ...a }), t[r] = l, !
|
|
151
|
+
s.push({ id: r, name: r, changeProp: !0, category: e.category, ...a }), t[r] = l, !Ip(l) && o.push(r);
|
|
152
152
|
const { subTraits: c = {} } = a;
|
|
153
153
|
for (const d in a.subTraits)
|
|
154
154
|
(i = c[d]) == null || i.forEach((p) => {
|
|
@@ -182,7 +182,7 @@ const Ps = (n, e) => {
|
|
|
182
182
|
i.setAttribute(n, "true"), i.innerHTML = e, !o.contains(i) && o.appendChild(i);
|
|
183
183
|
}, Bp = (n, e) => {
|
|
184
184
|
e.forEach((t) => {
|
|
185
|
-
const s =
|
|
185
|
+
const s = Op(t);
|
|
186
186
|
s !== t && n.has(s) && n.set({ [t]: n.get(s), [s]: void 0 });
|
|
187
187
|
});
|
|
188
188
|
}, Me = "gjs-plg-", Bs = "data-gs-plg-", Re = "data-type-role", Er = (...n) => n.map((e) => `[data-gjs-type="${e}"]`).join(","), Hp = "dialogComponent", Fp = function(n, e = {}) {
|
|
@@ -459,10 +459,10 @@ const Ps = (n, e) => {
|
|
|
459
459
|
});
|
|
460
460
|
}, Cb = _(Fp), _p = "iconifyComponent", Gp = H.startup, Wp = { ratioDefault: !0, tc: !1, cl: !1, cr: !1, bc: !1 }, wo = `<svg viewBox="0 0 24 24">
|
|
461
461
|
<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" />
|
|
462
|
-
</svg>`,
|
|
462
|
+
</svg>`, $a = "layout-icon-picker", jp = "icons-layout-", za = "icons-list-layout", Va = "gs-iconify-picker", Ki = "__iconify_collection", qp = "https://api.iconify.design", Co = /* @__PURE__ */ new Map();
|
|
463
463
|
let fs;
|
|
464
464
|
const Up = ({ collectionId: n }) => `https://cdn.jsdelivr.net/npm/@iconify-json/${n}@latest/icons.json`;
|
|
465
|
-
async function
|
|
465
|
+
async function Ba({ collectionId: n, editor: e }) {
|
|
466
466
|
try {
|
|
467
467
|
if (Co.has(n)) return Co.get(n);
|
|
468
468
|
const t = await fetch(Up({ collectionId: n }));
|
|
@@ -481,7 +481,7 @@ async function Kp({ collectionIds: n, editor: e }) {
|
|
|
481
481
|
if (!s.ok) throw new Error(`Failed to fetch collections: ${s.statusText}`);
|
|
482
482
|
return fs = await s.json(), fs;
|
|
483
483
|
} catch (t) {
|
|
484
|
-
console.error("Error fetching collections", t), e.runCommand(W.toastAdd,
|
|
484
|
+
console.error("Error fetching collections", t), e.runCommand(W.toastAdd, Fa());
|
|
485
485
|
return;
|
|
486
486
|
}
|
|
487
487
|
}
|
|
@@ -504,7 +504,7 @@ async function Jp({ collectionIds: n, editor: e, component: t }) {
|
|
|
504
504
|
t.components(a), t.set({ collectionId: c, iconId: d });
|
|
505
505
|
}, i = Object.entries(s).map(([a, c]) => ({ id: a, ...c })).sort((a, c) => a.name.localeCompare(c.name)), r = t.get("collectionId") ?? i[0].id;
|
|
506
506
|
e.runCommand(W.layoutToggle, {
|
|
507
|
-
id:
|
|
507
|
+
id: $a,
|
|
508
508
|
placer: { type: "dialog", size: "l", title: "Select Icon" },
|
|
509
509
|
header: !1,
|
|
510
510
|
layout: {
|
|
@@ -517,19 +517,19 @@ async function Jp({ collectionIds: n, editor: e, component: t }) {
|
|
|
517
517
|
editor: e,
|
|
518
518
|
handleClick: o
|
|
519
519
|
}),
|
|
520
|
-
{ id:
|
|
520
|
+
{ id: za, type: "column", grow: !0 }
|
|
521
521
|
]
|
|
522
522
|
}
|
|
523
523
|
});
|
|
524
|
-
const l = await
|
|
525
|
-
l && (
|
|
524
|
+
const l = await Ba({ collectionId: r, editor: e });
|
|
525
|
+
l && (Ha({ editor: e, collection: l }), ei({
|
|
526
526
|
editor: e,
|
|
527
527
|
collection: l,
|
|
528
528
|
handleClick: o,
|
|
529
529
|
collectionId: r
|
|
530
530
|
}));
|
|
531
531
|
}
|
|
532
|
-
function
|
|
532
|
+
function Ha({ editor: n, collection: e }) {
|
|
533
533
|
n.em.set(Ki, e);
|
|
534
534
|
}
|
|
535
535
|
function Zp(n) {
|
|
@@ -542,7 +542,7 @@ function ei(n) {
|
|
|
542
542
|
layout: Xp(n),
|
|
543
543
|
header: !1,
|
|
544
544
|
style: { height: "100%" },
|
|
545
|
-
placer: { type: "static", layoutId:
|
|
545
|
+
placer: { type: "static", layoutId: za }
|
|
546
546
|
});
|
|
547
547
|
}
|
|
548
548
|
function Yp(n) {
|
|
@@ -550,7 +550,7 @@ function Yp(n) {
|
|
|
550
550
|
return {
|
|
551
551
|
type: "column",
|
|
552
552
|
style: { gap: 10 },
|
|
553
|
-
className: `${
|
|
553
|
+
className: `${Va}__header`,
|
|
554
554
|
children: [
|
|
555
555
|
{
|
|
556
556
|
type: "selectField",
|
|
@@ -558,8 +558,8 @@ function Yp(n) {
|
|
|
558
558
|
options: i,
|
|
559
559
|
emptyState: "Select an icon collection",
|
|
560
560
|
onChange: async ({ setState: r, value: l }) => {
|
|
561
|
-
const a = await
|
|
562
|
-
a && (r({ value: l }),
|
|
561
|
+
const a = await Ba({ collectionId: l, editor: s });
|
|
562
|
+
a && (r({ value: l }), Ha({ editor: s, collection: a }), ei({
|
|
563
563
|
editor: s,
|
|
564
564
|
collection: a,
|
|
565
565
|
handleClick: o,
|
|
@@ -600,7 +600,7 @@ function Xp({
|
|
|
600
600
|
const { height: s = 24, width: o = 24, icons: i, prefix: r } = e || n, l = Object.entries(i).map(([a, c]) => ({ name: a, ...c }), {});
|
|
601
601
|
return {
|
|
602
602
|
type: "column",
|
|
603
|
-
className: `${
|
|
603
|
+
className: `${Va}__content`,
|
|
604
604
|
style: { height: "100%" },
|
|
605
605
|
children: {
|
|
606
606
|
type: "virtualList",
|
|
@@ -619,7 +619,7 @@ function Xp({
|
|
|
619
619
|
const b = h.cloneNode(!0);
|
|
620
620
|
b.removeAttribute("style");
|
|
621
621
|
const C = b.outerHTML;
|
|
622
|
-
t({ icon: C, collectionId: r, iconId: a.name }), d == null || d.runCommand(W.layoutRemove, { id:
|
|
622
|
+
t({ icon: C, collectionId: r, iconId: a.name }), d == null || d.runCommand(W.layoutRemove, { id: $a });
|
|
623
623
|
}
|
|
624
624
|
],
|
|
625
625
|
[
|
|
@@ -643,17 +643,17 @@ function Xp({
|
|
|
643
643
|
}
|
|
644
644
|
};
|
|
645
645
|
}
|
|
646
|
-
function
|
|
646
|
+
function Fa() {
|
|
647
647
|
return {
|
|
648
648
|
id: "toast-error-getCollections",
|
|
649
649
|
header: "Error",
|
|
650
650
|
content: "Error fetching collections",
|
|
651
|
-
variant:
|
|
651
|
+
variant: Ia.Error
|
|
652
652
|
};
|
|
653
653
|
}
|
|
654
654
|
function Qp() {
|
|
655
655
|
return {
|
|
656
|
-
...
|
|
656
|
+
...Fa(),
|
|
657
657
|
id: "toast-error-getCollection",
|
|
658
658
|
content: "Error fetching collection"
|
|
659
659
|
};
|
|
@@ -735,7 +735,7 @@ function jn(n, e, t) {
|
|
|
735
735
|
}, d;
|
|
736
736
|
}
|
|
737
737
|
const tu = "tableComponent", nu = H.startup;
|
|
738
|
-
var
|
|
738
|
+
var I = /* @__PURE__ */ ((n) => (n.table = "table", n.tableSettings = "tableSettings", n.tableDelete = "tableDelete", n.tableHead = "tableHead", n.tableFoot = "tableFoot", n.tableCellItems = "tableCellItems", n.tableCellProperties = "tableCellProperties", n.tableCellMerge = "tableCellMerge", n.tableCellSplit = "tableCellSplit", n.tableRowItems = "tableRowItems", n.tableRowInsertBefore = "tableRowInsertBefore", n.tableRowInsertAfter = "tableRowInsertAfter", n.tableRowDelete = "tableRowDelete", n.tableRowProperties = "tableRowProperties", n.tableRowCut = "tableRowCut", n.tableRowCopy = "tableRowCopy", n.tableRowPasteBefore = "tableRowPasteBefore", n.tableRowPasteAfter = "tableRowPasteAfter", n.tableColumn = "tableColumn", n.tableColumnItems = "tableColumnItems", n.tableColumnInsertBefore = "tableColumnInsertBefore", n.tableColumnInsertAfter = "tableColumnInsertAfter", n.tableColumnDelete = "tableColumnDelete", n.tableColumnCut = "tableColumnCut", n.tableColumnCopy = "tableColumnCopy", n.tableColumnPasteBefore = "tableColumnPasteBefore", n.tableColumnPasteAfter = "tableColumnPasteAfter", n))(I || {});
|
|
739
739
|
const V = {
|
|
740
740
|
table: '<svg viewBox="0 0 24 24"><path d="M5 4h14a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2m0 4v4h6V8H5m8 0v4h6V8h-6m-8 6v4h6v-4H5m8 0v4h6v-4h-6Z"/></svg>',
|
|
741
741
|
tableSettings: '<svg viewBox="0 0 24 24"><path d="M5 4h14a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2m0 4v4h6V8H5m8 0v4h6V8h-6m-8 6v4h6v-4H5m8 0v4h6v-4h-6Z"/></svg>',
|
|
@@ -764,7 +764,7 @@ const V = {
|
|
|
764
764
|
tableColumnCopy: '<svg viewBox="0 0 24 24"><path d="M17 6v16h-7V6h7zm-2 2h-3v12h3V8zm-2-6v2H8v15H6V2h7z"/></svg>',
|
|
765
765
|
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>',
|
|
766
766
|
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>'
|
|
767
|
-
},
|
|
767
|
+
}, _e = "table", _a = "thead", Ga = "tfoot", ti = "tbody", ge = "row", q = "cell", Ji = "clipboardTable", su = [_e, _a, Ga, ti, ge, q], co = (n) => n.em.get(Ji) || [], ou = (n) => n.every((e) => e.is(q)), Zi = (n, e) => {
|
|
768
768
|
const { editor: t, event: s, opts: o } = n, i = s.currentTarget || s.target, { x: r, y: l, width: a, height: c } = i.getBoundingClientRect(), d = {
|
|
769
769
|
style: { width: 240, height: 300 },
|
|
770
770
|
placer: { type: "popover", closeOnClickAway: !0, x: r, y: l, w: a, h: c },
|
|
@@ -800,27 +800,27 @@ const V = {
|
|
|
800
800
|
components: s ? { type: "text", content: _t(s) ? s({ y: o, x: i }) : s } : void 0
|
|
801
801
|
}))
|
|
802
802
|
}))
|
|
803
|
-
}),
|
|
803
|
+
}), Wa = "Table settings", ja = (n) => {
|
|
804
804
|
const { component: e } = n;
|
|
805
|
-
return e.is(
|
|
805
|
+
return e.is(_e) ? e : e.closestType(_e);
|
|
806
806
|
}, ru = (n) => {
|
|
807
807
|
var e;
|
|
808
|
-
(e =
|
|
808
|
+
(e = ja(n)) == null || e.remove(n.opts);
|
|
809
809
|
}, lu = (n) => {
|
|
810
|
-
const e =
|
|
810
|
+
const e = ja(n);
|
|
811
811
|
e && (n.editor.select(e), Zi(n, {
|
|
812
812
|
id: "tableSettings",
|
|
813
|
-
header: { label:
|
|
813
|
+
header: { label: Wa }
|
|
814
814
|
}));
|
|
815
|
-
},
|
|
816
|
-
id:
|
|
817
|
-
icon: V[
|
|
815
|
+
}, qa = (n) => [{
|
|
816
|
+
id: I.table,
|
|
817
|
+
icon: V[I.table],
|
|
818
818
|
label: "Table",
|
|
819
819
|
items: [
|
|
820
820
|
{
|
|
821
|
-
id:
|
|
822
|
-
label:
|
|
823
|
-
icon: V[
|
|
821
|
+
id: I.tableSettings,
|
|
822
|
+
label: Wa,
|
|
823
|
+
icon: V[I.tableSettings],
|
|
824
824
|
onClick: ({ event: t }) => lu({
|
|
825
825
|
...n,
|
|
826
826
|
// @ts-expect-error workaround for the build
|
|
@@ -828,97 +828,97 @@ const V = {
|
|
|
828
828
|
})
|
|
829
829
|
},
|
|
830
830
|
{
|
|
831
|
-
id:
|
|
831
|
+
id: I.tableDelete,
|
|
832
832
|
label: "Delete table",
|
|
833
|
-
icon: V[
|
|
833
|
+
icon: V[I.tableDelete],
|
|
834
834
|
onClick: () => ru(n)
|
|
835
835
|
}
|
|
836
836
|
]
|
|
837
|
-
}],
|
|
837
|
+
}], Ua = ({ editor: n }) => {
|
|
838
838
|
const e = co(n);
|
|
839
839
|
return e.length && ou(e);
|
|
840
840
|
}, Mr = ({ component: n, editor: e, after: t }) => {
|
|
841
841
|
if (!n.is(q)) return;
|
|
842
|
-
const s = n.closestType(
|
|
842
|
+
const s = n.closestType(_e), o = n.closestType(ge), i = n.index() + (t ? 1 : 0);
|
|
843
843
|
s == null || s.findType(ge).forEach((l) => l.append({ type: q }, { at: i }));
|
|
844
844
|
const r = o == null ? void 0 : o.components().at(i);
|
|
845
845
|
r && e.select(r);
|
|
846
|
-
},
|
|
846
|
+
}, Ka = ({ component: n, opts: e }) => {
|
|
847
847
|
if (!n.is(q)) return;
|
|
848
|
-
const t = n.closestType(
|
|
848
|
+
const t = n.closestType(_e), s = n.index();
|
|
849
849
|
t == null || t.findType(ge).forEach((o) => {
|
|
850
850
|
var i;
|
|
851
851
|
return (i = o.components().at(s)) == null ? void 0 : i.remove(e);
|
|
852
852
|
});
|
|
853
|
-
},
|
|
853
|
+
}, Ja = ({ component: n, editor: e }) => {
|
|
854
854
|
if (!n.is(q)) return;
|
|
855
|
-
const t = n.closestType(
|
|
855
|
+
const t = n.closestType(_e), s = n.index(), o = (t == null ? void 0 : t.findType(ge).map((i) => i.components().at(s))) || [];
|
|
856
856
|
o.length && e.em.set(Ji, o);
|
|
857
857
|
}, Ar = (n) => {
|
|
858
858
|
const { component: e, editor: t, after: s } = n;
|
|
859
|
-
if (!e.is(q) || !
|
|
860
|
-
const o = co(t), i = e.closestType(
|
|
859
|
+
if (!e.is(q) || !Ua(n)) return;
|
|
860
|
+
const o = co(t), i = e.closestType(_e), r = e.index() + (s ? 1 : 0);
|
|
861
861
|
i == null || i.findType(ge).forEach((l, a) => {
|
|
862
862
|
const c = o[a], d = (c == null ? void 0 : c.clone()) || { type: q };
|
|
863
863
|
l.append(d, { at: r });
|
|
864
864
|
});
|
|
865
865
|
}, au = (n) => {
|
|
866
866
|
const { component: e } = n;
|
|
867
|
-
e.is(q) && (
|
|
867
|
+
e.is(q) && (Ja(n), Ka({ ...n, opts: { temporary: !0 } }));
|
|
868
868
|
}, cu = (n) => {
|
|
869
|
-
const e =
|
|
869
|
+
const e = Ua(n);
|
|
870
870
|
return [{
|
|
871
|
-
id:
|
|
872
|
-
icon: V[
|
|
871
|
+
id: I.tableColumnItems,
|
|
872
|
+
icon: V[I.tableColumn],
|
|
873
873
|
label: "Column",
|
|
874
874
|
items: [
|
|
875
875
|
{
|
|
876
|
-
id:
|
|
876
|
+
id: I.tableColumnInsertBefore,
|
|
877
877
|
label: "Insert column before",
|
|
878
|
-
icon: V[
|
|
878
|
+
icon: V[I.tableColumnInsertBefore],
|
|
879
879
|
onClick: () => Mr(n)
|
|
880
880
|
},
|
|
881
881
|
{
|
|
882
|
-
id:
|
|
882
|
+
id: I.tableColumnInsertAfter,
|
|
883
883
|
label: "Insert column after",
|
|
884
|
-
icon: V[
|
|
884
|
+
icon: V[I.tableColumnInsertAfter],
|
|
885
885
|
onClick: () => Mr({ ...n, after: !0 })
|
|
886
886
|
},
|
|
887
887
|
{
|
|
888
|
-
id:
|
|
888
|
+
id: I.tableColumnDelete,
|
|
889
889
|
label: "Delete column",
|
|
890
|
-
icon: V[
|
|
891
|
-
onClick: () =>
|
|
890
|
+
icon: V[I.tableColumnDelete],
|
|
891
|
+
onClick: () => Ka(n)
|
|
892
892
|
},
|
|
893
893
|
{
|
|
894
|
-
id:
|
|
894
|
+
id: I.tableColumnCut,
|
|
895
895
|
label: "Cut column",
|
|
896
|
-
icon: V[
|
|
896
|
+
icon: V[I.tableColumnCut],
|
|
897
897
|
onClick: () => au(n)
|
|
898
898
|
},
|
|
899
899
|
{
|
|
900
|
-
id:
|
|
900
|
+
id: I.tableColumnCopy,
|
|
901
901
|
label: "Copy column",
|
|
902
|
-
icon: V[
|
|
903
|
-
onClick: () =>
|
|
902
|
+
icon: V[I.tableColumnCopy],
|
|
903
|
+
onClick: () => Ja(n)
|
|
904
904
|
},
|
|
905
905
|
{
|
|
906
|
-
id:
|
|
906
|
+
id: I.tableColumnPasteBefore,
|
|
907
907
|
label: "Paste column before",
|
|
908
|
-
icon: V[
|
|
908
|
+
icon: V[I.tableColumnPasteBefore],
|
|
909
909
|
disabled: !e,
|
|
910
910
|
onClick: () => Ar(n)
|
|
911
911
|
},
|
|
912
912
|
{
|
|
913
|
-
id:
|
|
913
|
+
id: I.tableColumnPasteAfter,
|
|
914
914
|
label: "Paste column after",
|
|
915
|
-
icon: V[
|
|
915
|
+
icon: V[I.tableColumnPasteAfter],
|
|
916
916
|
disabled: !e,
|
|
917
917
|
onClick: () => Ar({ ...n, after: !0 })
|
|
918
918
|
}
|
|
919
919
|
]
|
|
920
920
|
}];
|
|
921
|
-
},
|
|
921
|
+
}, Za = "Row settings", du = (n) => n.every((e) => e.is(ge)), Sn = (n) => {
|
|
922
922
|
const { component: e } = n, t = e.is(q), s = e.is(ge);
|
|
923
923
|
if (!(!t && !s))
|
|
924
924
|
return s ? e : e.closestType(ge);
|
|
@@ -933,58 +933,58 @@ const V = {
|
|
|
933
933
|
p && t.select(p);
|
|
934
934
|
}
|
|
935
935
|
}
|
|
936
|
-
},
|
|
936
|
+
}, Ya = (n) => {
|
|
937
937
|
var e;
|
|
938
938
|
(e = Sn(n)) == null || e.remove(n.opts);
|
|
939
|
-
},
|
|
939
|
+
}, Xa = (n) => {
|
|
940
940
|
const e = Sn(n);
|
|
941
941
|
e && n.editor.em.set(Ji, [e]);
|
|
942
942
|
}, Nr = (n) => {
|
|
943
943
|
var l;
|
|
944
944
|
const { editor: e, after: t } = n, s = Sn(n);
|
|
945
|
-
if (!s || !
|
|
945
|
+
if (!s || !Qa(n)) return;
|
|
946
946
|
const i = co(e)[0], r = s.index() + (t ? 1 : 0);
|
|
947
947
|
i && ((l = s.parent()) == null || l.append(i.clone(), { at: r }));
|
|
948
948
|
}, pu = (n) => {
|
|
949
|
-
Sn(n) && (
|
|
950
|
-
},
|
|
949
|
+
Sn(n) && (Xa(n), Ya({ ...n, opts: { temporary: !0 } }));
|
|
950
|
+
}, Qa = ({ editor: n }) => {
|
|
951
951
|
const e = co(n);
|
|
952
952
|
return e.length && du(e);
|
|
953
953
|
}, uu = (n) => {
|
|
954
954
|
const e = Sn(n);
|
|
955
955
|
e && (n.editor.select(e), Zi(n, {
|
|
956
956
|
id: "tableRowSettings",
|
|
957
|
-
header: { label:
|
|
957
|
+
header: { label: Za }
|
|
958
958
|
}));
|
|
959
|
-
},
|
|
960
|
-
const e =
|
|
959
|
+
}, ec = (n) => {
|
|
960
|
+
const e = Qa(n);
|
|
961
961
|
return [{
|
|
962
|
-
id:
|
|
963
|
-
icon: V[
|
|
962
|
+
id: I.tableRowItems,
|
|
963
|
+
icon: V[I.tableRowProperties],
|
|
964
964
|
label: "Row",
|
|
965
965
|
items: [
|
|
966
966
|
{
|
|
967
|
-
id:
|
|
967
|
+
id: I.tableRowInsertBefore,
|
|
968
968
|
label: "Insert row before",
|
|
969
|
-
icon: V[
|
|
969
|
+
icon: V[I.tableRowInsertBefore],
|
|
970
970
|
onClick: () => Pr(n)
|
|
971
971
|
},
|
|
972
972
|
{
|
|
973
|
-
id:
|
|
973
|
+
id: I.tableRowInsertAfter,
|
|
974
974
|
label: "Insert row after",
|
|
975
|
-
icon: V[
|
|
975
|
+
icon: V[I.tableRowInsertAfter],
|
|
976
976
|
onClick: () => Pr({ ...n, after: !0 })
|
|
977
977
|
},
|
|
978
978
|
{
|
|
979
|
-
id:
|
|
979
|
+
id: I.tableRowDelete,
|
|
980
980
|
label: "Delete row",
|
|
981
|
-
icon: V[
|
|
982
|
-
onClick: () =>
|
|
981
|
+
icon: V[I.tableRowDelete],
|
|
982
|
+
onClick: () => Ya(n)
|
|
983
983
|
},
|
|
984
984
|
{
|
|
985
|
-
id:
|
|
986
|
-
label:
|
|
987
|
-
icon: V[
|
|
985
|
+
id: I.tableRowProperties,
|
|
986
|
+
label: Za,
|
|
987
|
+
icon: V[I.tableRowProperties],
|
|
988
988
|
onClick: ({ event: s }) => uu({
|
|
989
989
|
...n,
|
|
990
990
|
// @ts-expect-error workaround for the build
|
|
@@ -992,38 +992,38 @@ const V = {
|
|
|
992
992
|
})
|
|
993
993
|
},
|
|
994
994
|
{
|
|
995
|
-
id:
|
|
995
|
+
id: I.tableRowCut,
|
|
996
996
|
label: "Cut row",
|
|
997
|
-
icon: V[
|
|
997
|
+
icon: V[I.tableRowCut],
|
|
998
998
|
onClick: () => pu(n)
|
|
999
999
|
},
|
|
1000
1000
|
{
|
|
1001
|
-
id:
|
|
1001
|
+
id: I.tableRowCopy,
|
|
1002
1002
|
label: "Copy row",
|
|
1003
|
-
icon: V[
|
|
1004
|
-
onClick: () =>
|
|
1003
|
+
icon: V[I.tableRowCopy],
|
|
1004
|
+
onClick: () => Xa(n)
|
|
1005
1005
|
},
|
|
1006
1006
|
{
|
|
1007
|
-
id:
|
|
1007
|
+
id: I.tableRowPasteBefore,
|
|
1008
1008
|
label: "Paste row before",
|
|
1009
|
-
icon: V[
|
|
1009
|
+
icon: V[I.tableRowPasteBefore],
|
|
1010
1010
|
disabled: !e,
|
|
1011
1011
|
onClick: () => Nr(n)
|
|
1012
1012
|
},
|
|
1013
1013
|
{
|
|
1014
|
-
id:
|
|
1014
|
+
id: I.tableRowPasteAfter,
|
|
1015
1015
|
label: "Paste row after",
|
|
1016
|
-
icon: V[
|
|
1016
|
+
icon: V[I.tableRowPasteAfter],
|
|
1017
1017
|
disabled: !e,
|
|
1018
1018
|
onClick: () => Nr({ ...n, after: !0 })
|
|
1019
1019
|
}
|
|
1020
1020
|
]
|
|
1021
|
-
}, ...
|
|
1021
|
+
}, ...qa(n)];
|
|
1022
1022
|
}, Yi = (n) => {
|
|
1023
1023
|
const e = n.attributes.attributes || {}, t = parseInt(`${e.rowspan || 1}`, 10), s = parseInt(`${e.colspan || 1}`, 10);
|
|
1024
1024
|
return { rowspan: t, colspan: s };
|
|
1025
1025
|
};
|
|
1026
|
-
function
|
|
1026
|
+
function tc(n) {
|
|
1027
1027
|
const e = [];
|
|
1028
1028
|
return n.components().forEach((t, s) => {
|
|
1029
1029
|
t.components().each((o, i) => {
|
|
@@ -1071,7 +1071,7 @@ function hu(n, { x: e, y: t, rows: s, cols: o }) {
|
|
|
1071
1071
|
}
|
|
1072
1072
|
}
|
|
1073
1073
|
}
|
|
1074
|
-
function
|
|
1074
|
+
function nc(n) {
|
|
1075
1075
|
for (let e = 0; e < n.length; e++)
|
|
1076
1076
|
for (let t = 0; t < n[e].length; t++) {
|
|
1077
1077
|
const o = n[e][t].cell;
|
|
@@ -1096,7 +1096,7 @@ function fu(n) {
|
|
|
1096
1096
|
}
|
|
1097
1097
|
const po = (n, e = {}) => {
|
|
1098
1098
|
var r;
|
|
1099
|
-
const t =
|
|
1099
|
+
const t = tc(n), { em: s } = n;
|
|
1100
1100
|
let o, i;
|
|
1101
1101
|
for (let l = 0; l < t.length; l++)
|
|
1102
1102
|
for (let a = 0; a < t[l].length; a++) {
|
|
@@ -1120,7 +1120,7 @@ function mu(n, e = {}) {
|
|
|
1120
1120
|
return;
|
|
1121
1121
|
const l = s.x, a = s.y, c = o.x, d = o.y, p = en(i, l, a), u = en(i, c, d);
|
|
1122
1122
|
if (p && u) {
|
|
1123
|
-
|
|
1123
|
+
nc(i), i = tc(n);
|
|
1124
1124
|
const h = [], f = en(i, l, a).cell;
|
|
1125
1125
|
f.addAttributes({
|
|
1126
1126
|
colspan: c - l + 1,
|
|
@@ -1138,7 +1138,7 @@ function mu(n, e = {}) {
|
|
|
1138
1138
|
}), r.setSelected(f), fu(n);
|
|
1139
1139
|
}
|
|
1140
1140
|
}
|
|
1141
|
-
const
|
|
1141
|
+
const sc = "Cell settings", gu = "Merge cells", yu = "Split cell", bu = (n) => n.closestType(ge), hn = (n) => {
|
|
1142
1142
|
var e;
|
|
1143
1143
|
return (e = bu(n)) == null ? void 0 : e.parent();
|
|
1144
1144
|
}, vu = (n) => {
|
|
@@ -1149,8 +1149,8 @@ const oc = "Cell settings", gu = "Merge cells", yu = "Split cell", bu = (n) => n
|
|
|
1149
1149
|
return !(i < 2 && o < 2);
|
|
1150
1150
|
}, Su = (n) => {
|
|
1151
1151
|
const t = n.editor.getSelectedAll()[0], s = hn(t), { grid: o } = po(s);
|
|
1152
|
-
|
|
1153
|
-
},
|
|
1152
|
+
nc(o);
|
|
1153
|
+
}, oc = (n) => {
|
|
1154
1154
|
const e = n.editor.getSelectedAll(), t = hn(e[0]);
|
|
1155
1155
|
if (!t || e.length < 2 || e.some((l) => !l.is(q) || hn(l) !== t))
|
|
1156
1156
|
return !1;
|
|
@@ -1165,23 +1165,23 @@ const oc = "Cell settings", gu = "Merge cells", yu = "Split cell", bu = (n) => n
|
|
|
1165
1165
|
return !0;
|
|
1166
1166
|
}, xu = (n) => {
|
|
1167
1167
|
const { editor: e } = n;
|
|
1168
|
-
if (!
|
|
1168
|
+
if (!oc(n)) return;
|
|
1169
1169
|
const t = e.getSelectedAll(), s = hn(t[0]);
|
|
1170
1170
|
mu(s, { mergeContent: !0 });
|
|
1171
1171
|
}, wu = (n) => {
|
|
1172
1172
|
Zi(n, {
|
|
1173
1173
|
id: "tableCellSettings",
|
|
1174
|
-
header: { label:
|
|
1174
|
+
header: { label: sc }
|
|
1175
1175
|
});
|
|
1176
1176
|
}, Cu = (n) => [{
|
|
1177
|
-
id:
|
|
1178
|
-
icon: V[
|
|
1177
|
+
id: I.tableCellItems,
|
|
1178
|
+
icon: V[I.tableCellProperties],
|
|
1179
1179
|
label: "Cell",
|
|
1180
1180
|
items: [
|
|
1181
1181
|
{
|
|
1182
|
-
id:
|
|
1183
|
-
label:
|
|
1184
|
-
icon: V[
|
|
1182
|
+
id: I.tableCellProperties,
|
|
1183
|
+
label: sc,
|
|
1184
|
+
icon: V[I.tableCellProperties],
|
|
1185
1185
|
onClick: ({ event: t }) => wu({
|
|
1186
1186
|
...n,
|
|
1187
1187
|
// @ts-expect-error workaround for the build
|
|
@@ -1189,21 +1189,21 @@ const oc = "Cell settings", gu = "Merge cells", yu = "Split cell", bu = (n) => n
|
|
|
1189
1189
|
})
|
|
1190
1190
|
},
|
|
1191
1191
|
{
|
|
1192
|
-
id:
|
|
1192
|
+
id: I.tableCellMerge,
|
|
1193
1193
|
label: gu,
|
|
1194
|
-
icon: V[
|
|
1194
|
+
icon: V[I.tableCellMerge],
|
|
1195
1195
|
onClick: () => xu(n),
|
|
1196
|
-
disabled: !
|
|
1196
|
+
disabled: !oc(n)
|
|
1197
1197
|
},
|
|
1198
1198
|
{
|
|
1199
|
-
id:
|
|
1199
|
+
id: I.tableCellSplit,
|
|
1200
1200
|
label: yu,
|
|
1201
|
-
icon: V[
|
|
1201
|
+
icon: V[I.tableCellSplit],
|
|
1202
1202
|
onClick: () => Su(n),
|
|
1203
1203
|
disabled: !vu(n)
|
|
1204
1204
|
}
|
|
1205
1205
|
]
|
|
1206
|
-
}, ...cu(n), ...
|
|
1206
|
+
}, ...cu(n), ...ec(n)], ku = (n) => {
|
|
1207
1207
|
const e = n[0] && hn(n[0]);
|
|
1208
1208
|
if (!e) return;
|
|
1209
1209
|
const { grid: t, startPos: s, endPos: o } = po(e, { selected: n });
|
|
@@ -1240,13 +1240,13 @@ const oc = "Cell settings", gu = "Merge cells", yu = "Split cell", bu = (n) => n
|
|
|
1240
1240
|
"border-color"
|
|
1241
1241
|
]
|
|
1242
1242
|
};
|
|
1243
|
-
s.addType(
|
|
1243
|
+
s.addType(_e, {
|
|
1244
1244
|
block: t.block && {
|
|
1245
1245
|
label: "Table",
|
|
1246
1246
|
media: V.table,
|
|
1247
1247
|
category: "Extra",
|
|
1248
1248
|
content: {
|
|
1249
|
-
type:
|
|
1249
|
+
type: _e,
|
|
1250
1250
|
style: { width: "100%" }
|
|
1251
1251
|
},
|
|
1252
1252
|
select: !0,
|
|
@@ -1305,19 +1305,19 @@ const oc = "Cell settings", gu = "Merge cells", yu = "Split cell", bu = (n) => n
|
|
|
1305
1305
|
],
|
|
1306
1306
|
components: iu(ti, { rows: 5 }),
|
|
1307
1307
|
contextMenu: ({ items: r, editor: l, component: a }) => [
|
|
1308
|
-
...
|
|
1308
|
+
...qa({ editor: l, component: a, opts: t }),
|
|
1309
1309
|
...r
|
|
1310
1310
|
]
|
|
1311
1311
|
}
|
|
1312
1312
|
}
|
|
1313
|
-
}), s.addType(
|
|
1313
|
+
}), s.addType(_a, {
|
|
1314
1314
|
model: {
|
|
1315
1315
|
defaults: {
|
|
1316
1316
|
icon: V.tableHead,
|
|
1317
1317
|
...o
|
|
1318
1318
|
}
|
|
1319
1319
|
}
|
|
1320
|
-
}), s.addType(
|
|
1320
|
+
}), s.addType(Ga, {
|
|
1321
1321
|
model: {
|
|
1322
1322
|
defaults: {
|
|
1323
1323
|
icon: V.tableFoot,
|
|
@@ -1340,7 +1340,7 @@ const oc = "Cell settings", gu = "Merge cells", yu = "Split cell", bu = (n) => n
|
|
|
1340
1340
|
stylable: ["height", "text-align", "border-width", "border-style", "border-color"],
|
|
1341
1341
|
traits: [],
|
|
1342
1342
|
contextMenu: ({ items: r, editor: l, component: a }) => [
|
|
1343
|
-
...
|
|
1343
|
+
...ec({ editor: l, component: a, opts: t }),
|
|
1344
1344
|
...r
|
|
1345
1345
|
]
|
|
1346
1346
|
}
|
|
@@ -1410,13 +1410,13 @@ const oc = "Cell settings", gu = "Merge cells", yu = "Split cell", bu = (n) => n
|
|
|
1410
1410
|
pluginName: tu,
|
|
1411
1411
|
licenseKey: t.licenseKey,
|
|
1412
1412
|
cleanup: () => {
|
|
1413
|
-
n.off("component:select", i), n.Blocks.remove(
|
|
1413
|
+
n.off("component:select", i), n.Blocks.remove(_e), su.forEach((r) => s.removeType(r));
|
|
1414
1414
|
}
|
|
1415
1415
|
});
|
|
1416
|
-
}, Eb = _(Eu), Tu = "listPagesComponent", Mu = H.startup,
|
|
1416
|
+
}, Eb = _(Eu), Tu = "listPagesComponent", Mu = H.startup, Or = "page://", St = "list-pages", jt = "list-pages-item", xt = "list-pages-link", Au = (n) => n.components().reduce(
|
|
1417
1417
|
(e, t) => {
|
|
1418
1418
|
var r;
|
|
1419
|
-
const s = t.findFirstType(xt), o = (r = s == null ? void 0 : s.attributes.attributes) == null ? void 0 : r.href, i = o != null && o.startsWith(
|
|
1419
|
+
const s = t.findFirstType(xt), o = (r = s == null ? void 0 : s.attributes.attributes) == null ? void 0 : r.href, i = o != null && o.startsWith(Or) ? o.replace(Or, "") : "";
|
|
1420
1420
|
if (i && s) {
|
|
1421
1421
|
const l = e[i];
|
|
1422
1422
|
l ? l.push(s) : e[i] = [s];
|
|
@@ -1424,10 +1424,10 @@ const oc = "Cell settings", gu = "Merge cells", yu = "Split cell", bu = (n) => n
|
|
|
1424
1424
|
return e;
|
|
1425
1425
|
},
|
|
1426
1426
|
{}
|
|
1427
|
-
), Ns = "data-type-role", Pu = "page_root", Nu = (n) => (e) => e.is(n),
|
|
1427
|
+
), Ns = "data-type-role", Pu = "page_root", Nu = (n) => (e) => e.is(n), Ou = (n) => (e, t) => t.is(n), ko = (n) => (e) => {
|
|
1428
1428
|
var t;
|
|
1429
1429
|
return ((t = e.getAttribute) == null ? void 0 : t.call(e, Ns)) === n;
|
|
1430
|
-
},
|
|
1430
|
+
}, Iu = function(n, e = {}) {
|
|
1431
1431
|
const { Blocks: t, Components: s, Pages: o } = n, { licenseKey: i, block: r = {} } = e, l = "List Pages", a = "List Pages Item", c = "Link", d = `${Me}${St}`, p = `${Me}${xt}`, u = '<svg viewBox="0 0 24 24"><path d="M11 15H17V17H11V15M9 7H7V9H9V7M11 13H17V11H11V13M11 9H17V7H11V9M9 11H7V13H9V11M21 5V19C21 20.1 20.1 21 19 21H5C3.9 21 3 20.1 3 19V5C3 3.9 3.9 3 5 3H19C20.1 3 21 3.9 21 5M19 5H5V19H19V5M9 15H7V17H9V15Z"/></svg>', h = '<svg viewBox="0 0 24 24"><path d="M7,5H21V7H7V5M7,13V11H21V13H7M4,4.5A1.5,1.5 0 0,1 5.5,6A1.5,1.5 0 0,1 4,7.5A1.5,1.5 0 0,1 2.5,6A1.5,1.5 0 0,1 4,4.5M4,10.5A1.5,1.5 0 0,1 5.5,12A1.5,1.5 0 0,1 4,13.5A1.5,1.5 0 0,1 2.5,12A1.5,1.5 0 0,1 4,10.5M7,19V17H21V19H7M4,16.5A1.5,1.5 0 0,1 5.5,18A1.5,1.5 0 0,1 4,19.5A1.5,1.5 0 0,1 2.5,18A1.5,1.5 0 0,1 4,16.5Z" /></svg>';
|
|
1432
1432
|
s.addType(St, {
|
|
1433
1433
|
block: r && {
|
|
@@ -1489,7 +1489,7 @@ const oc = "Cell settings", gu = "Merge cells", yu = "Split cell", bu = (n) => n
|
|
|
1489
1489
|
icon: h,
|
|
1490
1490
|
attributes: { [Ns]: jt },
|
|
1491
1491
|
components: { type: xt },
|
|
1492
|
-
draggable:
|
|
1492
|
+
draggable: Ou(St)
|
|
1493
1493
|
}
|
|
1494
1494
|
}
|
|
1495
1495
|
}), s.addType(xt, {
|
|
@@ -1522,7 +1522,7 @@ const oc = "Cell settings", gu = "Merge cells", yu = "Split cell", bu = (n) => n
|
|
|
1522
1522
|
t.remove(St), s.removeType(St);
|
|
1523
1523
|
}
|
|
1524
1524
|
});
|
|
1525
|
-
}, Tb = _(
|
|
1525
|
+
}, Tb = _(Iu), Ru = "fsLightboxComponent", Du = H.startup, ms = "data-fslightbox", gs = "data-type", Lu = "fslightbox-open", qt = "fslightbox", Ut = {
|
|
1526
1526
|
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>',
|
|
1527
1527
|
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>',
|
|
1528
1528
|
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>',
|
|
@@ -1544,10 +1544,10 @@ const oc = "Cell settings", gu = "Merge cells", yu = "Split cell", bu = (n) => n
|
|
|
1544
1544
|
if ((M = w.fsLightboxInstances) == null || M[k], !w._isEditor) return;
|
|
1545
1545
|
Array.from(document.querySelectorAll(`[${v}]`)).forEach((P) => {
|
|
1546
1546
|
const N = P.onclick;
|
|
1547
|
-
P.onclick = function(
|
|
1548
|
-
|
|
1547
|
+
P.onclick = function(O) {
|
|
1548
|
+
O.preventDefault();
|
|
1549
1549
|
const R = P;
|
|
1550
|
-
!R.__skipLb && (N == null || N(
|
|
1550
|
+
!R.__skipLb && (N == null || N(O)), R.__skipLb = !0;
|
|
1551
1551
|
};
|
|
1552
1552
|
});
|
|
1553
1553
|
};
|
|
@@ -1694,7 +1694,7 @@ const oc = "Cell settings", gu = "Merge cells", yu = "Split cell", bu = (n) => n
|
|
|
1694
1694
|
E.props.onOpen = () => {
|
|
1695
1695
|
N = w.getSpots(), setTimeout(() => w.removeSpots());
|
|
1696
1696
|
}, E.props.onClose = () => {
|
|
1697
|
-
N.forEach((
|
|
1697
|
+
N.forEach((O) => w.addSpot(O.attributes));
|
|
1698
1698
|
}, y.click();
|
|
1699
1699
|
}
|
|
1700
1700
|
}
|
|
@@ -1710,7 +1710,7 @@ const oc = "Cell settings", gu = "Merge cells", yu = "Split cell", bu = (n) => n
|
|
|
1710
1710
|
});
|
|
1711
1711
|
}, Mb = _($u), zu = "lightGalleryComponent", Vu = H.startup;
|
|
1712
1712
|
var Yt = /* @__PURE__ */ ((n) => (n.image = "image", n.video = "video", n.external = "external", n))(Yt || {});
|
|
1713
|
-
const Ct = "lightGallery",
|
|
1713
|
+
const Ct = "lightGallery", Ir = `${Ct}-item`, Os = "data-lightgallery", Rr = `${Os}-item`, Hs = "toggle", Tt = {
|
|
1714
1714
|
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>',
|
|
1715
1715
|
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>',
|
|
1716
1716
|
gallery: '<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>',
|
|
@@ -2094,7 +2094,7 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
2094
2094
|
name: "data-src",
|
|
2095
2095
|
label: "External Source",
|
|
2096
2096
|
placeholder: "https://some-external-source.com/...."
|
|
2097
|
-
},
|
|
2097
|
+
}, ic = {
|
|
2098
2098
|
label: "Caption",
|
|
2099
2099
|
name: "data-sub-html",
|
|
2100
2100
|
placeholder: "My caption",
|
|
@@ -2128,7 +2128,7 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
2128
2128
|
{ id: "external", label: Dr.label || "", icon: Tt.external }
|
|
2129
2129
|
]
|
|
2130
2130
|
},
|
|
2131
|
-
subHtml:
|
|
2131
|
+
subHtml: ic
|
|
2132
2132
|
// This unfortuntaly breaks other thumbnails
|
|
2133
2133
|
// customThumb: traitCustomThumb
|
|
2134
2134
|
}, Lr = "lgThumbnail", ju = "lgVideo", $r = "lgAutoplay", zr = "lgZoom", Kt = "https://cdn.jsdelivr.net/npm/lightgallery@2.8.2", qu = function(n, e = {}) {
|
|
@@ -2148,7 +2148,7 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
2148
2148
|
cdnStyle: `${Kt}/css/lightgallery-bundle.min.css`,
|
|
2149
2149
|
...e
|
|
2150
2150
|
}, { block: l, toolbarIconOpen: a, defaultSrc: c } = r, d = function(y) {
|
|
2151
|
-
const v = this, w = window, { plugins: S, cdnScript: x, cdnStyle: k, inline: E, lgLicenseKey: M, ...P } = y || {}, N = (R) => isNaN(R) ? void 0 : parseInt(R, 10),
|
|
2151
|
+
const v = this, w = window, { plugins: S, cdnScript: x, cdnStyle: k, inline: E, lgLicenseKey: M, ...P } = y || {}, N = (R) => isNaN(R) ? void 0 : parseInt(R, 10), O = () => {
|
|
2152
2152
|
var ie;
|
|
2153
2153
|
const R = {
|
|
2154
2154
|
...P,
|
|
@@ -2167,21 +2167,21 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
2167
2167
|
E && F.openGallery();
|
|
2168
2168
|
};
|
|
2169
2169
|
if (w.lightGallery)
|
|
2170
|
-
|
|
2170
|
+
O();
|
|
2171
2171
|
else {
|
|
2172
2172
|
const { head: R } = document, F = Array.isArray(x) ? [...x] : [x], ie = Array.isArray(k) ? [...k] : [k], re = (ye) => {
|
|
2173
2173
|
if (ye.length) {
|
|
2174
2174
|
const xe = document.createElement("link");
|
|
2175
2175
|
xe.href = ye.shift(), xe.rel = "stylesheet", R.appendChild(xe), re(ye);
|
|
2176
2176
|
}
|
|
2177
|
-
},
|
|
2177
|
+
}, Ue = (ye) => {
|
|
2178
2178
|
if (ye.length) {
|
|
2179
2179
|
const xe = document.createElement("script");
|
|
2180
|
-
xe.src = ye.shift(), xe.onerror = xe.onload =
|
|
2180
|
+
xe.src = ye.shift(), xe.onerror = xe.onload = Ue.bind(null, ye), R.appendChild(xe);
|
|
2181
2181
|
} else
|
|
2182
|
-
|
|
2182
|
+
O();
|
|
2183
2183
|
};
|
|
2184
|
-
re(ie),
|
|
2184
|
+
re(ie), Ue(F);
|
|
2185
2185
|
}
|
|
2186
2186
|
}, p = (y) => {
|
|
2187
2187
|
const v = y.getTrait(Hs);
|
|
@@ -2203,15 +2203,15 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
2203
2203
|
select: !0,
|
|
2204
2204
|
...r.block
|
|
2205
2205
|
},
|
|
2206
|
-
isComponent: (y) => Ps(y,
|
|
2206
|
+
isComponent: (y) => Ps(y, Os),
|
|
2207
2207
|
extendFn: ["init", "initToolbar"],
|
|
2208
2208
|
model: {
|
|
2209
2209
|
defaults: {
|
|
2210
2210
|
name: o,
|
|
2211
2211
|
icon: Tt.gallery,
|
|
2212
2212
|
draggable: (y, v) => !v.is(Ct),
|
|
2213
|
-
attributes: { [
|
|
2214
|
-
components: { type:
|
|
2213
|
+
attributes: { [Os]: !0 },
|
|
2214
|
+
components: { type: Ir },
|
|
2215
2215
|
script: d,
|
|
2216
2216
|
selector: "",
|
|
2217
2217
|
exThumbImage: "",
|
|
@@ -2290,8 +2290,8 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
2290
2290
|
}
|
|
2291
2291
|
});
|
|
2292
2292
|
const C = Cn(Wu);
|
|
2293
|
-
s.addType(
|
|
2294
|
-
isComponent: (y) => Ps(y, Rr) || y.tagName === "A" && Ps(y.parentElement,
|
|
2293
|
+
s.addType(Ir, {
|
|
2294
|
+
isComponent: (y) => Ps(y, Rr) || y.tagName === "A" && Ps(y.parentElement, Os),
|
|
2295
2295
|
extendFn: ["init", "initToolbar"],
|
|
2296
2296
|
model: {
|
|
2297
2297
|
defaults: {
|
|
@@ -2311,7 +2311,7 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
2311
2311
|
p(this);
|
|
2312
2312
|
},
|
|
2313
2313
|
initScriptUpdate() {
|
|
2314
|
-
const y = [
|
|
2314
|
+
const y = [ic.name].map((v) => `change:attributes:${v}`).join(" ");
|
|
2315
2315
|
this.on(y, this.triggerGalleryUpdate);
|
|
2316
2316
|
},
|
|
2317
2317
|
triggerGalleryUpdate(...y) {
|
|
@@ -2344,7 +2344,7 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
2344
2344
|
t.remove(Ct), s.removeType(Ct);
|
|
2345
2345
|
}
|
|
2346
2346
|
});
|
|
2347
|
-
}, Ab = _(qu),
|
|
2347
|
+
}, Ab = _(qu), Ie = "swiper", qn = `${Ie}-slide`, on = `${Ie}-wrapper`, rn = `${Ie}-nav-prev`, _s = `${Ie}-nav-next`, ln = `${Ie}-pagination`, Dn = `${Ie}-scrollbar`, le = {
|
|
2348
2348
|
slider: `<svg viewBox="0 0 24 24">
|
|
2349
2349
|
<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"/>
|
|
2350
2350
|
<path d="M4 12.5L6 14v-3zM20 12.5L18 14v-3z"/>
|
|
@@ -2988,16 +2988,16 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
2988
2988
|
}
|
|
2989
2989
|
};
|
|
2990
2990
|
if (u.tablet) {
|
|
2991
|
-
const { tabletBreakpoint: P, tabletSlidesPerView: N } = u,
|
|
2992
|
-
E.breakpoints[
|
|
2991
|
+
const { tabletBreakpoint: P, tabletSlidesPerView: N } = u, O = S(P);
|
|
2992
|
+
E.breakpoints[O] = {
|
|
2993
2993
|
slidesPerView: isNaN(N) ? N : S(N),
|
|
2994
2994
|
slidesPerGroup: S(u.tabletSlidesPerGroup),
|
|
2995
2995
|
spaceBetween: S(u.tabletSpaceBetween)
|
|
2996
2996
|
};
|
|
2997
2997
|
}
|
|
2998
2998
|
if (u.mobile) {
|
|
2999
|
-
const { mobileBreakpoint: P, mobileSlidesPerView: N } = u,
|
|
3000
|
-
E.breakpoints[
|
|
2999
|
+
const { mobileBreakpoint: P, mobileSlidesPerView: N } = u, O = S(P);
|
|
3000
|
+
E.breakpoints[O] = {
|
|
3001
3001
|
slidesPerView: isNaN(N) ? N : S(N),
|
|
3002
3002
|
slidesPerGroup: S(u.mobileSlidesPerGroup),
|
|
3003
3003
|
spaceBetween: S(u.mobileSpaceBetween)
|
|
@@ -3010,15 +3010,15 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
3010
3010
|
if (f.Swiper)
|
|
3011
3011
|
x();
|
|
3012
3012
|
else {
|
|
3013
|
-
const { head: k } = document, E = Array.isArray(y) ? [...y] : [y], M = Array.isArray(v) ? [...v] : [v], P = (
|
|
3014
|
-
if (
|
|
3013
|
+
const { head: k } = document, E = Array.isArray(y) ? [...y] : [y], M = Array.isArray(v) ? [...v] : [v], P = (O) => {
|
|
3014
|
+
if (O.length) {
|
|
3015
3015
|
const R = document.createElement("link");
|
|
3016
|
-
R.href =
|
|
3016
|
+
R.href = O.shift(), R.rel = "stylesheet", k.prepend(R), P(O);
|
|
3017
3017
|
}
|
|
3018
|
-
}, N = (
|
|
3019
|
-
if (
|
|
3018
|
+
}, N = (O) => {
|
|
3019
|
+
if (O.length) {
|
|
3020
3020
|
const R = document.createElement("script");
|
|
3021
|
-
R.src =
|
|
3021
|
+
R.src = O.shift(), R.onerror = R.onload = N.bind(null, O), k.appendChild(R);
|
|
3022
3022
|
} else
|
|
3023
3023
|
x();
|
|
3024
3024
|
};
|
|
@@ -3029,7 +3029,7 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
3029
3029
|
style: { padding: "50px" },
|
|
3030
3030
|
components: { type: "text", components: { type: "textnode", content: `Slide ${u}` } }
|
|
3031
3031
|
}), p = t.getType("default").model;
|
|
3032
|
-
return t.addType(
|
|
3032
|
+
return t.addType(Ie, {
|
|
3033
3033
|
block: i && {
|
|
3034
3034
|
label: Hr,
|
|
3035
3035
|
media: le.slider,
|
|
@@ -3043,7 +3043,7 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
3043
3043
|
name: Hr,
|
|
3044
3044
|
icon: le.slider,
|
|
3045
3045
|
classes: ri,
|
|
3046
|
-
draggable: (u, h) => !h.is(
|
|
3046
|
+
draggable: (u, h) => !h.is(Ie),
|
|
3047
3047
|
components: [
|
|
3048
3048
|
{
|
|
3049
3049
|
type: on,
|
|
@@ -3105,7 +3105,7 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
3105
3105
|
}
|
|
3106
3106
|
}
|
|
3107
3107
|
}), () => {
|
|
3108
|
-
t.removeType(
|
|
3108
|
+
t.removeType(Ie), s.remove(Ie);
|
|
3109
3109
|
};
|
|
3110
3110
|
}, Ju = "Nav Prev", Zu = "Nav Next", bs = `${xn}button-prev`, vs = `${xn}button-next`, Yu = (n) => {
|
|
3111
3111
|
const { Components: e } = n, t = (s) => ({
|
|
@@ -3249,7 +3249,7 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
3249
3249
|
this.listenTo(s, "add remove", this.updateSlider);
|
|
3250
3250
|
},
|
|
3251
3251
|
updateSlider(s) {
|
|
3252
|
-
const o = this.closestType(
|
|
3252
|
+
const o = this.closestType(Ie);
|
|
3253
3253
|
if (o) {
|
|
3254
3254
|
const i = o.getView();
|
|
3255
3255
|
o.reloadSlider(), this.em.once(t.scriptMount, () => {
|
|
@@ -3287,7 +3287,7 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
3287
3287
|
s.forEach((o) => o());
|
|
3288
3288
|
}
|
|
3289
3289
|
});
|
|
3290
|
-
}, Pb = _(lh), he = "accordion", kn = `${he}-group`, Qe = `${he}-header`, at = `${he}-content`, Mt = `${he}-marker`, Wr = `${Me}${Qe}`, li = `${Me}${Mt}`, ah = `${Me}${at}`,
|
|
3290
|
+
}, Pb = _(lh), he = "accordion", kn = `${he}-group`, Qe = `${he}-header`, at = `${he}-content`, Mt = `${he}-marker`, Wr = `${Me}${Qe}`, li = `${Me}${Mt}`, ah = `${Me}${at}`, rc = `${li}-open`, zt = {
|
|
3291
3291
|
accordion: '<svg viewBox="0 0 24 24"><path fill="currentColor" d="M5.616 20q-.691 0-1.153-.462T4 18.384V5.616q0-.691.463-1.153T5.616 4h12.769q.69 0 1.153.463T20 5.616v12.769q0 .69-.462 1.153T18.384 20zm0-1h12.769q.23 0 .423-.192t.192-.424V8.154H5v10.23q0 .232.192.424t.423.192"/></svg>',
|
|
3292
3292
|
accordionGroup: '<svg viewBox="0 0 24 24"><path fill="currentColor" d="M8.116 16h10.769q.23 0 .423-.192t.192-.423V6h-12v9.385q0 .23.192.423t.423.192m0 1q-.69 0-1.153-.462T6.5 15.385V4.615q0-.69.463-1.153T8.116 3h10.769q.69 0 1.153.462t.462 1.153v10.77q0 .69-.462 1.152T18.884 17zm-3 3q-.69 0-1.153-.462T3.5 18.385V6.615h1v11.77q0 .23.192.423t.423.192h11.77v1zM7.5 4v12z"/></svg>',
|
|
3293
3293
|
accordionHeader: '<svg viewBox="0 0 24 24"><path fill="currentColor" d="M5.616 20q-.691 0-1.153-.462T4 18.384V5.616q0-.691.463-1.153T5.616 4h12.769q.69 0 1.153.463T20 5.616v12.769q0 .69-.462 1.153T18.384 20zm0-1h12.769q.23 0 .423-.192t.192-.424V5.616q0-.231-.192-.424T18.384 5H5.616q-.231 0-.424.192T5 5.616v12.769q0 .23.192.423t.423.192M5 5v14zm2.616 4.192h6q.413 0 .706-.293q.294-.293.294-.707t-.294-.706q-.293-.294-.706-.294h-6q-.414 0-.707.294t-.293.706t.293.707t.707.293"/></svg>',
|
|
@@ -3295,7 +3295,7 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
3295
3295
|
accordionMarker: '<svg viewBox="0 0 24 24"><path fill="currentColor" d="m12 15.596l3.173-3.192H8.827zM5.616 20q-.672 0-1.144-.472T4 18.385V5.615q0-.67.472-1.143Q4.944 4 5.616 4h12.769q.67 0 1.143.472q.472.472.472 1.144v12.769q0 .67-.472 1.143q-.472.472-1.143.472zM5 9v9.385q0 .23.192.423t.423.192h12.77q.23 0 .423-.192t.192-.423V9z"/></svg>',
|
|
3296
3296
|
caret: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m7.4 8.6 4.6 4.6 4.6-4.6L18 10l-6 6-6-6 1.4-1.4Z"/></svg>',
|
|
3297
3297
|
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>'
|
|
3298
|
-
},
|
|
3298
|
+
}, lc = (n, e) => {
|
|
3299
3299
|
const { toolbarIconOpen: t = zt.eye } = e, s = n.is(he) ? n : n.closestType(he);
|
|
3300
3300
|
if (!t || !s) return;
|
|
3301
3301
|
const { toolbar: o } = n, i = {
|
|
@@ -3322,7 +3322,7 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
3322
3322
|
select: !0,
|
|
3323
3323
|
...o
|
|
3324
3324
|
},
|
|
3325
|
-
isComponent:
|
|
3325
|
+
isComponent: Ge(he),
|
|
3326
3326
|
extendFn: ["initToolbar"],
|
|
3327
3327
|
model: {
|
|
3328
3328
|
defaults: {
|
|
@@ -3330,7 +3330,7 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
3330
3330
|
name: i,
|
|
3331
3331
|
classes: r,
|
|
3332
3332
|
emptyState: !0,
|
|
3333
|
-
clsMarkerOpen:
|
|
3333
|
+
clsMarkerOpen: rc,
|
|
3334
3334
|
attributes: { [Re]: he },
|
|
3335
3335
|
droppable: ao(Qe, at),
|
|
3336
3336
|
components: [{ type: Qe }, { type: at }],
|
|
@@ -3366,7 +3366,7 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
3366
3366
|
this.addAttributes({ open: !this.getAttributes().open });
|
|
3367
3367
|
},
|
|
3368
3368
|
initToolbar() {
|
|
3369
|
-
|
|
3369
|
+
lc(this, e);
|
|
3370
3370
|
}
|
|
3371
3371
|
}
|
|
3372
3372
|
}), () => {
|
|
@@ -3375,7 +3375,7 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
3375
3375
|
}, dh = (n) => {
|
|
3376
3376
|
const { Components: e } = n;
|
|
3377
3377
|
return e.addType(at, {
|
|
3378
|
-
isComponent:
|
|
3378
|
+
isComponent: Ge(at),
|
|
3379
3379
|
model: {
|
|
3380
3380
|
defaults: {
|
|
3381
3381
|
name: "Accordion Content",
|
|
@@ -3425,7 +3425,7 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
3425
3425
|
select: !0,
|
|
3426
3426
|
...o
|
|
3427
3427
|
},
|
|
3428
|
-
isComponent:
|
|
3428
|
+
isComponent: Ge(kn),
|
|
3429
3429
|
model: {
|
|
3430
3430
|
defaults: {
|
|
3431
3431
|
name: i,
|
|
@@ -3459,7 +3459,7 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
3459
3459
|
}, uh = (n, e) => {
|
|
3460
3460
|
const { Components: t } = n;
|
|
3461
3461
|
return t.addType(Qe, {
|
|
3462
|
-
isComponent:
|
|
3462
|
+
isComponent: Ge(Qe),
|
|
3463
3463
|
extendFn: ["initToolbar"],
|
|
3464
3464
|
model: {
|
|
3465
3465
|
defaults: {
|
|
@@ -3487,7 +3487,7 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
3487
3487
|
`
|
|
3488
3488
|
},
|
|
3489
3489
|
initToolbar() {
|
|
3490
|
-
|
|
3490
|
+
lc(this, e);
|
|
3491
3491
|
}
|
|
3492
3492
|
}
|
|
3493
3493
|
}), () => {
|
|
@@ -3497,7 +3497,7 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
3497
3497
|
const { Components: e } = n;
|
|
3498
3498
|
return e.addType(Mt, {
|
|
3499
3499
|
extend: "icon",
|
|
3500
|
-
isComponent:
|
|
3500
|
+
isComponent: Ge(Mt),
|
|
3501
3501
|
model: {
|
|
3502
3502
|
defaults: {
|
|
3503
3503
|
name: "Accordion Marker",
|
|
@@ -3514,7 +3514,7 @@ const Ct = "lightGallery", Or = `${Ct}-item`, Is = "data-lightgallery", Rr = `${
|
|
|
3514
3514
|
height: 24px;
|
|
3515
3515
|
transition: transform 0.2s ease-in-out;
|
|
3516
3516
|
}
|
|
3517
|
-
.${
|
|
3517
|
+
.${rc} {
|
|
3518
3518
|
transform: rotateZ(180deg);
|
|
3519
3519
|
}
|
|
3520
3520
|
`
|
|
@@ -3704,7 +3704,7 @@ const jr = (n) => {
|
|
|
3704
3704
|
n.style.display = "none";
|
|
3705
3705
|
}, qr = (n) => {
|
|
3706
3706
|
n.style.display = "block";
|
|
3707
|
-
}, Ln = (n) => +parseFloat(`${n}`).toFixed(2), fn = (n) => n.projectType ===
|
|
3707
|
+
}, Ln = (n) => +parseFloat(`${n}`).toFixed(2), fn = (n) => n.projectType === La.email, bh = (n) => n ? ["top", "bottom"] : ["left", "right"], vh = (n) => {
|
|
3708
3708
|
const e = n.parent();
|
|
3709
3709
|
return e ? e.components().models.indexOf(n) === 0 : !1;
|
|
3710
3710
|
}, Sh = (n) => {
|
|
@@ -3744,10 +3744,10 @@ const jr = (n) => {
|
|
|
3744
3744
|
return o / 100 * i;
|
|
3745
3745
|
}, fi = (n, e) => Gt(e).parentSizeHandler.getParentSize(n), $n = (n, e) => {
|
|
3746
3746
|
Gt(e).sizeHandler.setSize(n);
|
|
3747
|
-
},
|
|
3747
|
+
}, ac = (n, e) => {
|
|
3748
3748
|
const t = Kn(n, e);
|
|
3749
3749
|
$n({ ...n, sizeValue: `${t}%`, partial: !1 }, e);
|
|
3750
|
-
},
|
|
3750
|
+
}, cc = (n, e) => {
|
|
3751
3751
|
if (e != null && e.disableGapHandler) return;
|
|
3752
3752
|
const { gapHandler: t } = Gt(e);
|
|
3753
3753
|
t.isGapSupported() && t.setGap(n);
|
|
@@ -3755,7 +3755,7 @@ const jr = (n) => {
|
|
|
3755
3755
|
const t = n.getStyle().gap;
|
|
3756
3756
|
if (!t) return;
|
|
3757
3757
|
const s = n.components().models, o = { componentRow: n, isVertical: Un(n, e) };
|
|
3758
|
-
s.map((i) =>
|
|
3758
|
+
s.map((i) => ac({ ...o, componentColumn: i }, e)), cc({ ...o, gapValue: String(t), partial: !1 }, e);
|
|
3759
3759
|
};
|
|
3760
3760
|
function Th(n, e) {
|
|
3761
3761
|
const { Blocks: t } = n, { typeColumn: s, typeRow: o, blocks: i } = e;
|
|
@@ -3797,7 +3797,7 @@ const Mh = (n, e) => {
|
|
|
3797
3797
|
const { Components: t } = n, { typeRow: s, typeColumn: o, extendTypeColumn: i } = e, r = `${Me}${o}`, a = !!o && !!t.getType(o) && !i;
|
|
3798
3798
|
if (!(!o || a || fn(e)))
|
|
3799
3799
|
return t.addType(o, {
|
|
3800
|
-
isComponent:
|
|
3800
|
+
isComponent: Ge(o),
|
|
3801
3801
|
model: {
|
|
3802
3802
|
defaults: {
|
|
3803
3803
|
name: "Column",
|
|
@@ -3821,7 +3821,7 @@ const Mh = (n, e) => {
|
|
|
3821
3821
|
const { Components: t } = n, { typeRow: s, typeColumn: o, extendTypeRow: i } = e, r = `${Me}${s}`, a = !!s && !!t.getType(s) && !i;
|
|
3822
3822
|
if (!(!s || a || fn(e)))
|
|
3823
3823
|
return t.addType(s, {
|
|
3824
|
-
isComponent:
|
|
3824
|
+
isComponent: Ge(s),
|
|
3825
3825
|
model: {
|
|
3826
3826
|
defaults: {
|
|
3827
3827
|
name: "Row",
|
|
@@ -3888,7 +3888,7 @@ const Mh = (n, e) => {
|
|
|
3888
3888
|
t.removeType(s);
|
|
3889
3889
|
};
|
|
3890
3890
|
}, Ph = "flexComponent", Nh = H.startup;
|
|
3891
|
-
class
|
|
3891
|
+
class Oh {
|
|
3892
3892
|
constructor() {
|
|
3893
3893
|
this.resizableChildTypes = /* @__PURE__ */ new Set(), this.gapAdjustableParentTypes = /* @__PURE__ */ new Set(), this.typeRelationships = /* @__PURE__ */ new Map();
|
|
3894
3894
|
}
|
|
@@ -3912,7 +3912,7 @@ class Ih {
|
|
|
3912
3912
|
return this.typeRelationships.has(s) ? this.typeRelationships.get(s).has(o) : !1;
|
|
3913
3913
|
}
|
|
3914
3914
|
}
|
|
3915
|
-
class
|
|
3915
|
+
class Ih {
|
|
3916
3916
|
constructor(e, t, s) {
|
|
3917
3917
|
this.editor = e, this.registry = t, this.opts = s, this.resizeState = /* @__PURE__ */ new WeakMap();
|
|
3918
3918
|
}
|
|
@@ -3942,7 +3942,7 @@ class Oh {
|
|
|
3942
3942
|
}
|
|
3943
3943
|
finishResize(e) {
|
|
3944
3944
|
const t = e.parent(), s = t == null ? void 0 : t.components().models, o = { componentRow: t, isVertical: !!t && Un(t, this.opts) };
|
|
3945
|
-
s == null || s.forEach((i) =>
|
|
3945
|
+
s == null || s.forEach((i) => ac({ ...o, componentColumn: i }, this.opts)), this.clearState(e);
|
|
3946
3946
|
}
|
|
3947
3947
|
updateContinuesResize(e, t, s) {
|
|
3948
3948
|
const o = this.getState(e), i = e.parent(), { opts: r } = this;
|
|
@@ -3984,7 +3984,7 @@ class Rh {
|
|
|
3984
3984
|
c.map((v) => {
|
|
3985
3985
|
const w = Kn({ ...p, componentColumn: v }, i), S = w - w / u * C;
|
|
3986
3986
|
$n({ ...y, componentColumn: v, sizeValue: `${Ln(S)}%` }, i);
|
|
3987
|
-
}),
|
|
3987
|
+
}), cc({ ...y, gapValue: `${Ln(a)}%` }, i);
|
|
3988
3988
|
}
|
|
3989
3989
|
finishGapAdjust(e) {
|
|
3990
3990
|
Eh(e, this.opts);
|
|
@@ -3992,7 +3992,7 @@ class Rh {
|
|
|
3992
3992
|
}
|
|
3993
3993
|
class Dh {
|
|
3994
3994
|
constructor(e, t, s) {
|
|
3995
|
-
this.editor = e, this.registry = t, this.opts = s, this.resizeHandler = new
|
|
3995
|
+
this.editor = e, this.registry = t, this.opts = s, this.resizeHandler = new Ih(e, t, s), this.gapHandler = new Rh(e, t, s);
|
|
3996
3996
|
}
|
|
3997
3997
|
startResize(e, t, s) {
|
|
3998
3998
|
this.resizeHandler.startResize(e, t, s);
|
|
@@ -4021,7 +4021,7 @@ const Ws = "gs-flex-spots", Jr = `${Ws}__handle-size`, Lh = `${Ws}__handle-gap`;
|
|
|
4021
4021
|
function $h(n, e) {
|
|
4022
4022
|
const { Canvas: t } = n, s = "flex-resize-spot";
|
|
4023
4023
|
let o, i, r, l, a = null, c = null;
|
|
4024
|
-
const d = new
|
|
4024
|
+
const d = new Oh(), p = new Dh(n, d, e), u = () => {
|
|
4025
4025
|
var S;
|
|
4026
4026
|
o = document.createElement("div"), o.className = Ws, o.style.display = "none", i = document.createElement("div"), i.className = `${Ws}__handles`, i.style.position = "absolute", i.style.pointerEvents = "none", i.style.zIndex = "21", r = {
|
|
4027
4027
|
left: document.createElement("div"),
|
|
@@ -4058,7 +4058,7 @@ function $h(n, e) {
|
|
|
4058
4058
|
const k = x.clientX, E = x.clientY;
|
|
4059
4059
|
x.target.setPointerCapture(x.pointerId);
|
|
4060
4060
|
const M = (N) => {
|
|
4061
|
-
const
|
|
4061
|
+
const O = n.Canvas.getZoomMultiplier(), R = (N.clientX - k) * O, F = (N.clientY - E) * O, ie = Gs(S) ? F : R;
|
|
4062
4062
|
p.updateResizeByDelta(a, S, ie);
|
|
4063
4063
|
}, P = () => {
|
|
4064
4064
|
p.finishResize(a), x.target.releasePointerCapture(x.pointerId), document.removeEventListener("pointermove", M), document.removeEventListener("pointerup", P);
|
|
@@ -4073,10 +4073,10 @@ function $h(n, e) {
|
|
|
4073
4073
|
const N = (R) => {
|
|
4074
4074
|
const F = n.Canvas.getZoomMultiplier(), ie = k ? (R.clientY - P) * F : (R.clientX - M) * F;
|
|
4075
4075
|
p.updateGapByDelta(x, ie, E, k);
|
|
4076
|
-
},
|
|
4077
|
-
p.finishGapAdjust(x), S.target.releasePointerCapture(S.pointerId), document.removeEventListener("pointermove", N), document.removeEventListener("pointerup",
|
|
4076
|
+
}, O = () => {
|
|
4077
|
+
p.finishGapAdjust(x), S.target.releasePointerCapture(S.pointerId), document.removeEventListener("pointermove", N), document.removeEventListener("pointerup", O);
|
|
4078
4078
|
};
|
|
4079
|
-
document.addEventListener("pointermove", N), document.addEventListener("pointerup",
|
|
4079
|
+
document.addEventListener("pointermove", N), document.addEventListener("pointerup", O);
|
|
4080
4080
|
}, m = (S) => {
|
|
4081
4081
|
const x = S.component;
|
|
4082
4082
|
if (!x || !o || (a = x, c = x.parent(), !c)) return;
|
|
@@ -4085,13 +4085,13 @@ function $h(n, e) {
|
|
|
4085
4085
|
const E = S.getStyle();
|
|
4086
4086
|
i && Object.assign(i.style, E);
|
|
4087
4087
|
const M = Un(k, e), P = bh(M);
|
|
4088
|
-
if (Object.values(r).forEach(jr), P.forEach((
|
|
4089
|
-
if (Ch(x,
|
|
4090
|
-
const R = r[
|
|
4088
|
+
if (Object.values(r).forEach(jr), P.forEach((O) => {
|
|
4089
|
+
if (Ch(x, O)) return;
|
|
4090
|
+
const R = r[O];
|
|
4091
4091
|
qr(R);
|
|
4092
4092
|
}), Gt(e).gapHandler.isGapSupported() && l && kh(x)) {
|
|
4093
|
-
const
|
|
4094
|
-
g(
|
|
4093
|
+
const O = hi({ componentRow: k, isVertical: M }, e);
|
|
4094
|
+
g(O, M, xh(x));
|
|
4095
4095
|
}
|
|
4096
4096
|
}, g = (S, x, k = !1) => {
|
|
4097
4097
|
const E = e.gapHandleSize, M = l.style;
|
|
@@ -4142,23 +4142,23 @@ const zh = function(n, e = {}) {
|
|
|
4142
4142
|
s.forEach((r) => r == null ? void 0 : r()), o(), i == null || i();
|
|
4143
4143
|
}
|
|
4144
4144
|
});
|
|
4145
|
-
},
|
|
4145
|
+
}, Ob = _(zh);
|
|
4146
4146
|
var Ne = /* @__PURE__ */ ((n) => (n.name = "animation-name", n.duration = "animation-duration", n.delay = "animation-delay", n.iterationCount = "animation-iteration-count", n.timingFunction = "animation-timing-function", n.fillMode = "animation-fill-mode", n))(Ne || {}), an = /* @__PURE__ */ ((n) => (n.onScroll = "--animation-on-scroll", n.threshold = "--animation-threshold", n.repeat = "--animation-repeat", n))(an || {});
|
|
4147
|
-
const
|
|
4147
|
+
const He = "animation", nn = "animation-group", Zr = "animation:update", mi = "animation-group:update", dc = {
|
|
4148
4148
|
category: { id: "animations", label: "Animations" },
|
|
4149
4149
|
select: !0
|
|
4150
|
-
}, uo = (n) => (n == null ? void 0 : n.getType()) ===
|
|
4150
|
+
}, uo = (n) => (n == null ? void 0 : n.getType()) === He, ho = (n) => (n == null ? void 0 : n.getType()) === nn, pc = (n) => uo(n) || ho(n), En = {
|
|
4151
4151
|
isVisible: ({ component: n }) => uo(n)
|
|
4152
4152
|
}, Vh = {
|
|
4153
4153
|
isVisible: ({ component: n }) => ho(n)
|
|
4154
4154
|
}, Bh = {
|
|
4155
|
-
isVisible: ({ component: n }) => uo(n) && ho(n == null ? void 0 : n.parent()) ? !1 :
|
|
4155
|
+
isVisible: ({ component: n }) => uo(n) && ho(n == null ? void 0 : n.parent()) ? !1 : pc(n)
|
|
4156
4156
|
}, Yr = {
|
|
4157
4157
|
isVisible: ({ component: n, sector: e }) => {
|
|
4158
4158
|
var t;
|
|
4159
|
-
return uo(n) && ho(n == null ? void 0 : n.parent()) ? !1 :
|
|
4159
|
+
return uo(n) && ho(n == null ? void 0 : n.parent()) ? !1 : pc(n) && ((t = e.getProperty(an.onScroll)) == null ? void 0 : t.getValue()) === "true";
|
|
4160
4160
|
}
|
|
4161
|
-
},
|
|
4161
|
+
}, uc = {
|
|
4162
4162
|
animation: '<svg viewBox="0 0 24 24"><path fill="currentColor" d="M16.5 14a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13"/><path fill="currentColor" d="M17.14 15.98a8.5 8.5 0 0 1-9.12-9.12 6.5 6.5 0 1 0 9.12 9.12"/><path fill="currentColor" d="M12.64 20.48a8.5 8.5 0 0 1-9.12-9.12 6.5 6.5 0 1 0 9.12 9.12"/></svg>',
|
|
4163
4163
|
animationGroup: '<svg viewBox="0 0 24 24"><path d="M4 2a2 2 0 0 0-2 2v10h2V4h10V2H4m4 4a2 2 0 0 0-2 2v10h2V8h10V6H8m4 4a2 2 0 0 0-2 2v8c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-8Z"/></svg>'
|
|
4164
4164
|
}, Hh = function(n) {
|
|
@@ -4194,12 +4194,12 @@ const Ve = "animation", nn = "animation-group", Zr = "animation:update", mi = "a
|
|
|
4194
4194
|
e.addEventListener(n.animationUpdateEvent, o), o();
|
|
4195
4195
|
}, Fh = (n, e) => {
|
|
4196
4196
|
const { Components: t, Blocks: s, Canvas: o } = n, { block: i = {}, animationList: r = [] } = e, l = n.Components.events, a = "Animation", c = Object.values(an), d = Object.values(Ne);
|
|
4197
|
-
return t.addType(
|
|
4197
|
+
return t.addType(He, {
|
|
4198
4198
|
block: i ? {
|
|
4199
4199
|
label: a,
|
|
4200
|
-
media:
|
|
4201
|
-
content: { type:
|
|
4202
|
-
...
|
|
4200
|
+
media: uc.animation,
|
|
4201
|
+
content: { type: He },
|
|
4202
|
+
...dc,
|
|
4203
4203
|
...i
|
|
4204
4204
|
} : void 0,
|
|
4205
4205
|
model: {
|
|
@@ -4258,7 +4258,7 @@ const Ve = "animation", nn = "animation-group", Zr = "animation:update", mi = "a
|
|
|
4258
4258
|
}
|
|
4259
4259
|
}
|
|
4260
4260
|
}), () => {
|
|
4261
|
-
s.remove(
|
|
4261
|
+
s.remove(He), t.removeType(He);
|
|
4262
4262
|
};
|
|
4263
4263
|
}, _h = function(n) {
|
|
4264
4264
|
const e = this, t = "--animation-on-scroll", s = "--animation-threshold", o = "--animation-repeat";
|
|
@@ -4293,16 +4293,16 @@ const Ve = "animation", nn = "animation-group", Zr = "animation:update", mi = "a
|
|
|
4293
4293
|
return t.addType(nn, {
|
|
4294
4294
|
block: o ? {
|
|
4295
4295
|
label: i,
|
|
4296
|
-
media:
|
|
4296
|
+
media: uc.animationGroup,
|
|
4297
4297
|
content: {
|
|
4298
4298
|
type: nn,
|
|
4299
4299
|
components: [
|
|
4300
|
-
{ type:
|
|
4301
|
-
{ type:
|
|
4302
|
-
{ type:
|
|
4300
|
+
{ type: He },
|
|
4301
|
+
{ type: He },
|
|
4302
|
+
{ type: He }
|
|
4303
4303
|
]
|
|
4304
4304
|
},
|
|
4305
|
-
...
|
|
4305
|
+
...dc,
|
|
4306
4306
|
...o
|
|
4307
4307
|
} : void 0,
|
|
4308
4308
|
model: {
|
|
@@ -4313,7 +4313,7 @@ const Ve = "animation", nn = "animation-group", Zr = "animation:update", mi = "a
|
|
|
4313
4313
|
script: _h,
|
|
4314
4314
|
animationGroupUpdateEvent: mi,
|
|
4315
4315
|
"script-props": ["animationGroupUpdateEvent"],
|
|
4316
|
-
droppable: ao(
|
|
4316
|
+
droppable: ao(He)
|
|
4317
4317
|
},
|
|
4318
4318
|
init() {
|
|
4319
4319
|
this.addStyle({
|
|
@@ -4325,7 +4325,7 @@ const Ve = "animation", nn = "animation-group", Zr = "animation:update", mi = "a
|
|
|
4325
4325
|
},
|
|
4326
4326
|
updateChildrenStaggerStyles() {
|
|
4327
4327
|
this.components().forEach((r, l) => {
|
|
4328
|
-
r.is(
|
|
4328
|
+
r.is(He) && r.addStyle(
|
|
4329
4329
|
{
|
|
4330
4330
|
"--stagger-index": l.toString(),
|
|
4331
4331
|
[Ne.delay]: "calc(var(--stagger-index, 0) * var(--stagger-delay, 0.3s))"
|
|
@@ -5162,7 +5162,7 @@ const Ve = "animation", nn = "animation-group", Zr = "animation:update", mi = "a
|
|
|
5162
5162
|
s.forEach((i) => i());
|
|
5163
5163
|
}
|
|
5164
5164
|
});
|
|
5165
|
-
},
|
|
5165
|
+
}, Ib = _(qh), Uh = "shapeDividerComponent", Kh = H.startup, Jh = function(n, e = {}) {
|
|
5166
5166
|
const { Components: t, Blocks: s, Selectors: o } = n, i = "shape-divider", r = `${i}-cnt`, l = `${Me}${i}`, a = `${Me}${r}`, c = [
|
|
5167
5167
|
{
|
|
5168
5168
|
id: "tilt",
|
|
@@ -5349,7 +5349,7 @@ const Ve = "animation", nn = "animation-group", Zr = "animation:update", mi = "a
|
|
|
5349
5349
|
n.on(o.events.add, (y) => {
|
|
5350
5350
|
y.getFullName().startsWith(`.${l}`) && y.set({ private: !0 });
|
|
5351
5351
|
}), t.addType(i, {
|
|
5352
|
-
isComponent: (y) =>
|
|
5352
|
+
isComponent: (y) => Ge(i)(y) || gt(y, l),
|
|
5353
5353
|
block: C && {
|
|
5354
5354
|
label: g,
|
|
5355
5355
|
media: b,
|
|
@@ -5377,7 +5377,7 @@ const Ve = "animation", nn = "animation-group", Zr = "animation:update", mi = "a
|
|
|
5377
5377
|
}
|
|
5378
5378
|
}
|
|
5379
5379
|
}), t.addType(r, {
|
|
5380
|
-
isComponent:
|
|
5380
|
+
isComponent: Ge(r),
|
|
5381
5381
|
model: {
|
|
5382
5382
|
defaults: {
|
|
5383
5383
|
droppable: !1,
|
|
@@ -5489,7 +5489,7 @@ const Ve = "animation", nn = "animation-group", Zr = "animation:update", mi = "a
|
|
|
5489
5489
|
document.addEventListener(t, s), n.on(n.events.destroy, o);
|
|
5490
5490
|
}), o;
|
|
5491
5491
|
};
|
|
5492
|
-
function
|
|
5492
|
+
function hc(n, e) {
|
|
5493
5493
|
if (!e) return () => {
|
|
5494
5494
|
};
|
|
5495
5495
|
const t = n.Components.events, s = (d) => n.getSelectedAll().includes(d), o = (d) => d.isInstanceOf("text") && !d.isChildOf("text"), i = (d) => d.isChildOf("text"), r = (d) => n.getEditing() === d, l = (d, p = {}) => {
|
|
@@ -5640,7 +5640,7 @@ const Xh = "rteTinyMce", Qh = H.startup, ef = `
|
|
|
5640
5640
|
const { el: e, editor: t, componentView: s } = n, o = t.runCommand(W.getStateTheme), i = s.model, r = {
|
|
5641
5641
|
target: e,
|
|
5642
5642
|
inline: !0,
|
|
5643
|
-
skin: (o == null ? void 0 : o.theme) ===
|
|
5643
|
+
skin: (o == null ? void 0 : o.theme) === Da.dark ? "oxide-dark" : "oxide",
|
|
5644
5644
|
menubar: !1,
|
|
5645
5645
|
image_advtab: !0,
|
|
5646
5646
|
paste_data_images: !0,
|
|
@@ -5723,7 +5723,7 @@ const Xh = "rteTinyMce", Qh = H.startup, ef = `
|
|
|
5723
5723
|
return f && !f.isDirty() ? u.view.lastContent : f ? (m = f.getContent) == null ? void 0 : m.call(f) : d.innerHTML;
|
|
5724
5724
|
}
|
|
5725
5725
|
});
|
|
5726
|
-
const c =
|
|
5726
|
+
const c = hc(n, t.enableOnClick);
|
|
5727
5727
|
G({
|
|
5728
5728
|
editor: n,
|
|
5729
5729
|
licenseKey: t.licenseKey,
|
|
@@ -5834,7 +5834,7 @@ Y.from = function(n) {
|
|
|
5834
5834
|
if (n) for (var t in n) e.push(t, n[t]);
|
|
5835
5835
|
return new Y(e);
|
|
5836
5836
|
};
|
|
5837
|
-
function
|
|
5837
|
+
function fc(n, e, t) {
|
|
5838
5838
|
for (let s = 0; ; s++) {
|
|
5839
5839
|
if (s == n.childCount || s == e.childCount)
|
|
5840
5840
|
return n.childCount == e.childCount ? null : t;
|
|
@@ -5851,14 +5851,14 @@ function mc(n, e, t) {
|
|
|
5851
5851
|
return t;
|
|
5852
5852
|
}
|
|
5853
5853
|
if (o.content.size || i.content.size) {
|
|
5854
|
-
let r =
|
|
5854
|
+
let r = fc(o.content, i.content, t + 1);
|
|
5855
5855
|
if (r != null)
|
|
5856
5856
|
return r;
|
|
5857
5857
|
}
|
|
5858
5858
|
t += o.nodeSize;
|
|
5859
5859
|
}
|
|
5860
5860
|
}
|
|
5861
|
-
function
|
|
5861
|
+
function mc(n, e, t, s) {
|
|
5862
5862
|
for (let o = n.childCount, i = e.childCount; ; ) {
|
|
5863
5863
|
if (o == 0 || i == 0)
|
|
5864
5864
|
return o == i ? null : { a: t, b: s };
|
|
@@ -5876,7 +5876,7 @@ function gc(n, e, t, s) {
|
|
|
5876
5876
|
return { a: t, b: s };
|
|
5877
5877
|
}
|
|
5878
5878
|
if (r.content.size || l.content.size) {
|
|
5879
|
-
let c =
|
|
5879
|
+
let c = mc(r.content, l.content, t - 1, s - 1);
|
|
5880
5880
|
if (c)
|
|
5881
5881
|
return c;
|
|
5882
5882
|
}
|
|
@@ -6045,7 +6045,7 @@ class T {
|
|
|
6045
6045
|
fragment differ, or `null` if they are the same.
|
|
6046
6046
|
*/
|
|
6047
6047
|
findDiffStart(e, t = 0) {
|
|
6048
|
-
return
|
|
6048
|
+
return fc(this, e, t);
|
|
6049
6049
|
}
|
|
6050
6050
|
/**
|
|
6051
6051
|
Find the first position, searching from the end, at which this
|
|
@@ -6054,7 +6054,7 @@ class T {
|
|
|
6054
6054
|
nodes, an object with two separate positions is returned.
|
|
6055
6055
|
*/
|
|
6056
6056
|
findDiffEnd(e, t = this.size, s = e.size) {
|
|
6057
|
-
return
|
|
6057
|
+
return mc(this, e, t, s);
|
|
6058
6058
|
}
|
|
6059
6059
|
/**
|
|
6060
6060
|
Find the index and inner offset corresponding to a given relative
|
|
@@ -6298,14 +6298,14 @@ class A {
|
|
|
6298
6298
|
@internal
|
|
6299
6299
|
*/
|
|
6300
6300
|
insertAt(e, t) {
|
|
6301
|
-
let s =
|
|
6301
|
+
let s = yc(this.content, e + this.openStart, t);
|
|
6302
6302
|
return s && new A(s, this.openStart, this.openEnd);
|
|
6303
6303
|
}
|
|
6304
6304
|
/**
|
|
6305
6305
|
@internal
|
|
6306
6306
|
*/
|
|
6307
6307
|
removeBetween(e, t) {
|
|
6308
|
-
return new A(
|
|
6308
|
+
return new A(gc(this.content, e + this.openStart, t + this.openStart), this.openStart, this.openEnd);
|
|
6309
6309
|
}
|
|
6310
6310
|
/**
|
|
6311
6311
|
Tests whether this slice is equal to another slice.
|
|
@@ -6353,7 +6353,7 @@ class A {
|
|
|
6353
6353
|
}
|
|
6354
6354
|
}
|
|
6355
6355
|
A.empty = new A(T.empty, 0, 0);
|
|
6356
|
-
function
|
|
6356
|
+
function gc(n, e, t) {
|
|
6357
6357
|
let { index: s, offset: o } = n.findIndex(e), i = n.maybeChild(s), { index: r, offset: l } = n.findIndex(t);
|
|
6358
6358
|
if (o == e || i.isText) {
|
|
6359
6359
|
if (l != t && !n.child(r).isText)
|
|
@@ -6362,13 +6362,13 @@ function yc(n, e, t) {
|
|
|
6362
6362
|
}
|
|
6363
6363
|
if (s != r)
|
|
6364
6364
|
throw new RangeError("Removing non-flat range");
|
|
6365
|
-
return n.replaceChild(s, i.copy(
|
|
6365
|
+
return n.replaceChild(s, i.copy(gc(i.content, e - o - 1, t - o - 1)));
|
|
6366
6366
|
}
|
|
6367
|
-
function
|
|
6367
|
+
function yc(n, e, t, s) {
|
|
6368
6368
|
let { index: o, offset: i } = n.findIndex(e), r = n.maybeChild(o);
|
|
6369
6369
|
if (i == e || r.isText)
|
|
6370
6370
|
return n.cut(0, e).append(t).append(n.cut(e));
|
|
6371
|
-
let l =
|
|
6371
|
+
let l = yc(r.content, e - i - 1, t);
|
|
6372
6372
|
return l && n.replaceChild(o, r.copy(l));
|
|
6373
6373
|
}
|
|
6374
6374
|
function lf(n, e, t) {
|
|
@@ -6376,54 +6376,54 @@ function lf(n, e, t) {
|
|
|
6376
6376
|
throw new qs("Inserted content deeper than insertion position");
|
|
6377
6377
|
if (n.depth - t.openStart != e.depth - t.openEnd)
|
|
6378
6378
|
throw new qs("Inconsistent open depths");
|
|
6379
|
-
return
|
|
6379
|
+
return bc(n, e, t, 0);
|
|
6380
6380
|
}
|
|
6381
|
-
function
|
|
6381
|
+
function bc(n, e, t, s) {
|
|
6382
6382
|
let o = n.index(s), i = n.node(s);
|
|
6383
6383
|
if (o == e.index(s) && s < n.depth - t.openStart) {
|
|
6384
|
-
let r =
|
|
6384
|
+
let r = bc(n, e, t, s + 1);
|
|
6385
6385
|
return i.copy(i.content.replaceChild(o, r));
|
|
6386
6386
|
} else if (t.content.size)
|
|
6387
6387
|
if (!t.openStart && !t.openEnd && n.depth == s && e.depth == s) {
|
|
6388
6388
|
let r = n.parent, l = r.content;
|
|
6389
|
-
return
|
|
6389
|
+
return It(r, l.cut(0, n.parentOffset).append(t.content).append(l.cut(e.parentOffset)));
|
|
6390
6390
|
} else {
|
|
6391
6391
|
let { start: r, end: l } = af(t, n);
|
|
6392
|
-
return
|
|
6392
|
+
return It(i, Sc(n, r, l, e, s));
|
|
6393
6393
|
}
|
|
6394
|
-
else return
|
|
6394
|
+
else return It(i, Us(n, e, s));
|
|
6395
6395
|
}
|
|
6396
|
-
function
|
|
6396
|
+
function vc(n, e) {
|
|
6397
6397
|
if (!e.type.compatibleContent(n.type))
|
|
6398
6398
|
throw new qs("Cannot join " + e.type.name + " onto " + n.type.name);
|
|
6399
6399
|
}
|
|
6400
6400
|
function gi(n, e, t) {
|
|
6401
6401
|
let s = n.node(t);
|
|
6402
|
-
return
|
|
6402
|
+
return vc(s, e.node(t)), s;
|
|
6403
6403
|
}
|
|
6404
|
-
function
|
|
6404
|
+
function Ot(n, e) {
|
|
6405
6405
|
let t = e.length - 1;
|
|
6406
6406
|
t >= 0 && n.isText && n.sameMarkup(e[t]) ? e[t] = n.withText(e[t].text + n.text) : e.push(n);
|
|
6407
6407
|
}
|
|
6408
6408
|
function zn(n, e, t, s) {
|
|
6409
6409
|
let o = (e || n).node(t), i = 0, r = e ? e.index(t) : o.childCount;
|
|
6410
|
-
n && (i = n.index(t), n.depth > t ? i++ : n.textOffset && (
|
|
6410
|
+
n && (i = n.index(t), n.depth > t ? i++ : n.textOffset && (Ot(n.nodeAfter, s), i++));
|
|
6411
6411
|
for (let l = i; l < r; l++)
|
|
6412
|
-
|
|
6413
|
-
e && e.depth == t && e.textOffset &&
|
|
6412
|
+
Ot(o.child(l), s);
|
|
6413
|
+
e && e.depth == t && e.textOffset && Ot(e.nodeBefore, s);
|
|
6414
6414
|
}
|
|
6415
|
-
function
|
|
6415
|
+
function It(n, e) {
|
|
6416
6416
|
return n.type.checkContent(e), n.copy(e);
|
|
6417
6417
|
}
|
|
6418
|
-
function
|
|
6418
|
+
function Sc(n, e, t, s, o) {
|
|
6419
6419
|
let i = n.depth > o && gi(n, e, o + 1), r = s.depth > o && gi(t, s, o + 1), l = [];
|
|
6420
|
-
return zn(null, n, o, l), i && r && e.index(o) == t.index(o) ? (
|
|
6420
|
+
return zn(null, n, o, l), i && r && e.index(o) == t.index(o) ? (vc(i, r), Ot(It(i, Sc(n, e, t, s, o + 1)), l)) : (i && Ot(It(i, Us(n, e, o + 1)), l), zn(e, t, o, l), r && Ot(It(r, Us(t, s, o + 1)), l)), zn(s, null, o, l), new T(l);
|
|
6421
6421
|
}
|
|
6422
6422
|
function Us(n, e, t) {
|
|
6423
6423
|
let s = [];
|
|
6424
6424
|
if (zn(null, n, t, s), n.depth > t) {
|
|
6425
6425
|
let o = gi(n, e, t + 1);
|
|
6426
|
-
It(
|
|
6426
|
+
Ot(It(o, Us(n, e, t + 1)), s);
|
|
6427
6427
|
}
|
|
6428
6428
|
return zn(e, null, t, s), new T(s);
|
|
6429
6429
|
}
|
|
@@ -7006,7 +7006,7 @@ let Rt = class yi {
|
|
|
7006
7006
|
if (this.type.spec.toDebugString)
|
|
7007
7007
|
return this.type.spec.toDebugString(this);
|
|
7008
7008
|
let e = this.type.name;
|
|
7009
|
-
return this.content.size && (e += "(" + this.content.toStringInner() + ")"),
|
|
7009
|
+
return this.content.size && (e += "(" + this.content.toStringInner() + ")"), xc(this.marks, e);
|
|
7010
7010
|
}
|
|
7011
7011
|
/**
|
|
7012
7012
|
Get the content match in this node at the given index.
|
|
@@ -7110,7 +7110,7 @@ class Js extends Rt {
|
|
|
7110
7110
|
this.text = s;
|
|
7111
7111
|
}
|
|
7112
7112
|
toString() {
|
|
7113
|
-
return this.type.spec.toDebugString ? this.type.spec.toDebugString(this) :
|
|
7113
|
+
return this.type.spec.toDebugString ? this.type.spec.toDebugString(this) : xc(this.marks, JSON.stringify(this.text));
|
|
7114
7114
|
}
|
|
7115
7115
|
get textContent() {
|
|
7116
7116
|
return this.text;
|
|
@@ -7138,7 +7138,7 @@ class Js extends Rt {
|
|
|
7138
7138
|
return e.text = this.text, e;
|
|
7139
7139
|
}
|
|
7140
7140
|
}
|
|
7141
|
-
function
|
|
7141
|
+
function xc(n, e) {
|
|
7142
7142
|
for (let t = n.length - 1; t >= 0; t--)
|
|
7143
7143
|
e = n[t].type.name + "(" + e + ")";
|
|
7144
7144
|
return e;
|
|
@@ -7157,7 +7157,7 @@ class Vt {
|
|
|
7157
7157
|
let s = new uf(e, t);
|
|
7158
7158
|
if (s.next == null)
|
|
7159
7159
|
return Vt.empty;
|
|
7160
|
-
let o =
|
|
7160
|
+
let o = wc(s);
|
|
7161
7161
|
s.next && s.err("Unexpected trailing text");
|
|
7162
7162
|
let i = vf(bf(o));
|
|
7163
7163
|
return Sf(i, s), i;
|
|
@@ -7320,7 +7320,7 @@ class uf {
|
|
|
7320
7320
|
throw new SyntaxError(e + " (in content expression '" + this.string + "')");
|
|
7321
7321
|
}
|
|
7322
7322
|
}
|
|
7323
|
-
function
|
|
7323
|
+
function wc(n) {
|
|
7324
7324
|
let e = [];
|
|
7325
7325
|
do
|
|
7326
7326
|
e.push(hf(n));
|
|
@@ -7371,7 +7371,7 @@ function gf(n, e) {
|
|
|
7371
7371
|
}
|
|
7372
7372
|
function yf(n) {
|
|
7373
7373
|
if (n.eat("(")) {
|
|
7374
|
-
let e =
|
|
7374
|
+
let e = wc(n);
|
|
7375
7375
|
return n.eat(")") || n.err("Missing closing paren"), e;
|
|
7376
7376
|
} else if (/\W/.test(n.next))
|
|
7377
7377
|
n.err("Unexpected token '" + n.next + "'");
|
|
@@ -7434,12 +7434,12 @@ function bf(n) {
|
|
|
7434
7434
|
}
|
|
7435
7435
|
}
|
|
7436
7436
|
}
|
|
7437
|
-
function
|
|
7437
|
+
function Cc(n, e) {
|
|
7438
7438
|
return e - n;
|
|
7439
7439
|
}
|
|
7440
7440
|
function sl(n, e) {
|
|
7441
7441
|
let t = [];
|
|
7442
|
-
return s(e), t.sort(
|
|
7442
|
+
return s(e), t.sort(Cc);
|
|
7443
7443
|
function s(o) {
|
|
7444
7444
|
let i = n[o];
|
|
7445
7445
|
if (i.length == 1 && !i[0].term)
|
|
@@ -7470,7 +7470,7 @@ function vf(n) {
|
|
|
7470
7470
|
});
|
|
7471
7471
|
let i = e[s.join(",")] = new Vt(s.indexOf(n.length - 1) > -1);
|
|
7472
7472
|
for (let r = 0; r < o.length; r++) {
|
|
7473
|
-
let l = o[r][1].sort(
|
|
7473
|
+
let l = o[r][1].sort(Cc);
|
|
7474
7474
|
i.next.push({ type: o[r][0], next: e[l.join(",")] || t(l) });
|
|
7475
7475
|
}
|
|
7476
7476
|
return i;
|
|
@@ -7486,7 +7486,7 @@ function Sf(n, e) {
|
|
|
7486
7486
|
i && e.err("Only non-generatable nodes (" + r.join(", ") + ") in a required position (see https://prosemirror.net/docs/guide/#generatable)");
|
|
7487
7487
|
}
|
|
7488
7488
|
}
|
|
7489
|
-
function
|
|
7489
|
+
function kc(n) {
|
|
7490
7490
|
let e = /* @__PURE__ */ Object.create(null);
|
|
7491
7491
|
for (let t in n) {
|
|
7492
7492
|
let s = n[t];
|
|
@@ -7496,7 +7496,7 @@ function Ec(n) {
|
|
|
7496
7496
|
}
|
|
7497
7497
|
return e;
|
|
7498
7498
|
}
|
|
7499
|
-
function
|
|
7499
|
+
function Ec(n, e) {
|
|
7500
7500
|
let t = /* @__PURE__ */ Object.create(null);
|
|
7501
7501
|
for (let s in n) {
|
|
7502
7502
|
let o = e && e[s];
|
|
@@ -7511,7 +7511,7 @@ function Tc(n, e) {
|
|
|
7511
7511
|
}
|
|
7512
7512
|
return t;
|
|
7513
7513
|
}
|
|
7514
|
-
function
|
|
7514
|
+
function Tc(n, e, t, s) {
|
|
7515
7515
|
for (let o in e)
|
|
7516
7516
|
if (!(o in n))
|
|
7517
7517
|
throw new RangeError(`Unsupported attribute ${o} for ${t} of type ${o}`);
|
|
@@ -7520,19 +7520,19 @@ function Mc(n, e, t, s) {
|
|
|
7520
7520
|
i.validate && i.validate(e[o]);
|
|
7521
7521
|
}
|
|
7522
7522
|
}
|
|
7523
|
-
function
|
|
7523
|
+
function Mc(n, e) {
|
|
7524
7524
|
let t = /* @__PURE__ */ Object.create(null);
|
|
7525
7525
|
if (e)
|
|
7526
7526
|
for (let s in e)
|
|
7527
7527
|
t[s] = new wf(n, s, e[s]);
|
|
7528
7528
|
return t;
|
|
7529
7529
|
}
|
|
7530
|
-
let ol = class
|
|
7530
|
+
let ol = class Ac {
|
|
7531
7531
|
/**
|
|
7532
7532
|
@internal
|
|
7533
7533
|
*/
|
|
7534
7534
|
constructor(e, t, s) {
|
|
7535
|
-
this.name = e, this.schema = t, this.spec = s, this.markSet = null, this.groups = s.group ? s.group.split(" ") : [], this.attrs =
|
|
7535
|
+
this.name = e, this.schema = t, this.spec = s, this.markSet = null, this.groups = s.group ? s.group.split(" ") : [], this.attrs = Mc(e, s.attrs), this.defaultAttrs = kc(this.attrs), this.contentMatch = null, this.inlineContent = null, this.isBlock = !(s.inline || e == "text"), this.isText = e == "text";
|
|
7536
7536
|
}
|
|
7537
7537
|
/**
|
|
7538
7538
|
True if this is an inline type.
|
|
@@ -7593,7 +7593,7 @@ let ol = class Pc {
|
|
|
7593
7593
|
@internal
|
|
7594
7594
|
*/
|
|
7595
7595
|
computeAttrs(e) {
|
|
7596
|
-
return !e && this.defaultAttrs ? this.defaultAttrs :
|
|
7596
|
+
return !e && this.defaultAttrs ? this.defaultAttrs : Ec(this.attrs, e);
|
|
7597
7597
|
}
|
|
7598
7598
|
/**
|
|
7599
7599
|
Create a `Node` of this type. The given attributes are
|
|
@@ -7660,7 +7660,7 @@ let ol = class Pc {
|
|
|
7660
7660
|
@internal
|
|
7661
7661
|
*/
|
|
7662
7662
|
checkAttrs(e) {
|
|
7663
|
-
|
|
7663
|
+
Tc(this.attrs, e, "node", this.name);
|
|
7664
7664
|
}
|
|
7665
7665
|
/**
|
|
7666
7666
|
Check whether the given mark type is allowed in this node.
|
|
@@ -7695,7 +7695,7 @@ let ol = class Pc {
|
|
|
7695
7695
|
*/
|
|
7696
7696
|
static compile(e, t) {
|
|
7697
7697
|
let s = /* @__PURE__ */ Object.create(null);
|
|
7698
|
-
e.forEach((i, r) => s[i] = new
|
|
7698
|
+
e.forEach((i, r) => s[i] = new Ac(i, t, r));
|
|
7699
7699
|
let o = t.spec.topNode || "doc";
|
|
7700
7700
|
if (!s[o])
|
|
7701
7701
|
throw new RangeError("Schema is missing its top node type ('" + o + "')");
|
|
@@ -7727,8 +7727,8 @@ class fo {
|
|
|
7727
7727
|
@internal
|
|
7728
7728
|
*/
|
|
7729
7729
|
constructor(e, t, s, o) {
|
|
7730
|
-
this.name = e, this.rank = t, this.schema = s, this.spec = o, this.attrs =
|
|
7731
|
-
let i =
|
|
7730
|
+
this.name = e, this.rank = t, this.schema = s, this.spec = o, this.attrs = Mc(e, o.attrs), this.excluded = null;
|
|
7731
|
+
let i = kc(this.attrs);
|
|
7732
7732
|
this.instance = i ? new B(this, i) : null;
|
|
7733
7733
|
}
|
|
7734
7734
|
/**
|
|
@@ -7737,7 +7737,7 @@ class fo {
|
|
|
7737
7737
|
they have defaults, will be added.
|
|
7738
7738
|
*/
|
|
7739
7739
|
create(e = null) {
|
|
7740
|
-
return !e && this.instance ? this.instance : new B(this,
|
|
7740
|
+
return !e && this.instance ? this.instance : new B(this, Ec(this.attrs, e));
|
|
7741
7741
|
}
|
|
7742
7742
|
/**
|
|
7743
7743
|
@internal
|
|
@@ -7767,7 +7767,7 @@ class fo {
|
|
|
7767
7767
|
@internal
|
|
7768
7768
|
*/
|
|
7769
7769
|
checkAttrs(e) {
|
|
7770
|
-
|
|
7770
|
+
Tc(this.attrs, e, "mark", this.name);
|
|
7771
7771
|
}
|
|
7772
7772
|
/**
|
|
7773
7773
|
Queries whether a given mark type is
|
|
@@ -7997,7 +7997,7 @@ class Bt {
|
|
|
7997
7997
|
return e.cached.domParser || (e.cached.domParser = new Bt(e, Bt.schemaRules(e)));
|
|
7998
7998
|
}
|
|
7999
7999
|
}
|
|
8000
|
-
const
|
|
8000
|
+
const Pc = {
|
|
8001
8001
|
address: !0,
|
|
8002
8002
|
article: !0,
|
|
8003
8003
|
aside: !0,
|
|
@@ -8037,7 +8037,7 @@ const Nc = {
|
|
|
8037
8037
|
script: !0,
|
|
8038
8038
|
style: !0,
|
|
8039
8039
|
title: !0
|
|
8040
|
-
},
|
|
8040
|
+
}, Nc = { ol: !0, ul: !0 }, Zs = 1, Ys = 2, Vn = 4;
|
|
8041
8041
|
function rl(n, e, t) {
|
|
8042
8042
|
return e != null ? (e ? Zs : 0) | (e === "full" ? Ys : 0) : n && n.whitespace == "pre" ? Zs | Ys : t & ~Vn;
|
|
8043
8043
|
}
|
|
@@ -8071,7 +8071,7 @@ class ws {
|
|
|
8071
8071
|
return !e && this.match && (t = t.append(this.match.fillBefore(T.empty, !0))), this.type ? this.type.create(this.attrs, t, this.marks) : t;
|
|
8072
8072
|
}
|
|
8073
8073
|
inlineContext(e) {
|
|
8074
|
-
return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !
|
|
8074
|
+
return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !Pc.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
|
|
8075
8075
|
}
|
|
8076
8076
|
}
|
|
8077
8077
|
class ll {
|
|
@@ -8107,14 +8107,14 @@ class ll {
|
|
|
8107
8107
|
// none is found, the element's content nodes are added directly.
|
|
8108
8108
|
addElement(e, t, s) {
|
|
8109
8109
|
let o = e.nodeName.toLowerCase(), i;
|
|
8110
|
-
|
|
8110
|
+
Nc.hasOwnProperty(o) && this.parser.normalizeLists && Mf(e);
|
|
8111
8111
|
let r = this.options.ruleFromNode && this.options.ruleFromNode(e) || (i = this.parser.matchTag(e, this, s));
|
|
8112
8112
|
if (r ? r.ignore : Tf.hasOwnProperty(o))
|
|
8113
8113
|
this.findInside(e), this.ignoreFallback(e, t);
|
|
8114
8114
|
else if (!r || r.skip || r.closeParent) {
|
|
8115
8115
|
r && r.closeParent ? this.open = Math.max(0, this.open - 1) : r && r.skip.nodeType && (e = r.skip);
|
|
8116
8116
|
let l, a = this.top, c = this.needsBlock;
|
|
8117
|
-
if (
|
|
8117
|
+
if (Pc.hasOwnProperty(o))
|
|
8118
8118
|
a.content.length && a.content[0].isInline && this.open && (this.open--, a = this.top), l = !0, a.type || (this.needsBlock = !0);
|
|
8119
8119
|
else if (!e.firstChild) {
|
|
8120
8120
|
this.leafFallback(e, t);
|
|
@@ -8341,7 +8341,7 @@ class ll {
|
|
|
8341
8341
|
function Mf(n) {
|
|
8342
8342
|
for (let e = n.firstChild, t = null; e; e = e.nextSibling) {
|
|
8343
8343
|
let s = e.nodeType == 1 ? e.nodeName.toLowerCase() : null;
|
|
8344
|
-
s &&
|
|
8344
|
+
s && Nc.hasOwnProperty(s) && t ? (t.appendChild(e), e = t) : s == "li" ? t = e : s && (t = null);
|
|
8345
8345
|
}
|
|
8346
8346
|
}
|
|
8347
8347
|
function Af(n, e) {
|
|
@@ -8420,7 +8420,7 @@ class Wt {
|
|
|
8420
8420
|
@internal
|
|
8421
8421
|
*/
|
|
8422
8422
|
serializeNodeInner(e, t) {
|
|
8423
|
-
let { dom: s, contentDOM: o } =
|
|
8423
|
+
let { dom: s, contentDOM: o } = Is(Po(t), this.nodes[e.type.name](e), null, e.attrs);
|
|
8424
8424
|
if (o) {
|
|
8425
8425
|
if (e.isLeaf)
|
|
8426
8426
|
throw new RangeError("Content hole not allowed in a leaf node spec");
|
|
@@ -8448,10 +8448,10 @@ class Wt {
|
|
|
8448
8448
|
*/
|
|
8449
8449
|
serializeMark(e, t, s = {}) {
|
|
8450
8450
|
let o = this.marks[e.type.name];
|
|
8451
|
-
return o &&
|
|
8451
|
+
return o && Is(Po(s), o(e, t), null, e.attrs);
|
|
8452
8452
|
}
|
|
8453
8453
|
static renderSpec(e, t, s = null, o) {
|
|
8454
|
-
return
|
|
8454
|
+
return Is(e, t, s, o);
|
|
8455
8455
|
}
|
|
8456
8456
|
/**
|
|
8457
8457
|
Build a serializer using the [`toDOM`](https://prosemirror.net/docs/ref/#model.NodeSpec.toDOM)
|
|
@@ -8507,7 +8507,7 @@ function Nf(n) {
|
|
|
8507
8507
|
}
|
|
8508
8508
|
return t(n), e;
|
|
8509
8509
|
}
|
|
8510
|
-
function
|
|
8510
|
+
function Is(n, e, t, s) {
|
|
8511
8511
|
if (typeof e == "string")
|
|
8512
8512
|
return { dom: n.createTextNode(e) };
|
|
8513
8513
|
if (e.nodeType != null)
|
|
@@ -8537,7 +8537,7 @@ function Os(n, e, t, s) {
|
|
|
8537
8537
|
throw new RangeError("Content hole must be the only child of its parent node");
|
|
8538
8538
|
return { dom: a, contentDOM: a };
|
|
8539
8539
|
} else {
|
|
8540
|
-
let { dom: h, contentDOM: f } =
|
|
8540
|
+
let { dom: h, contentDOM: f } = Is(n, u, t, s);
|
|
8541
8541
|
if (a.appendChild(h), f) {
|
|
8542
8542
|
if (l)
|
|
8543
8543
|
throw new RangeError("Multiple content holes");
|
|
@@ -8547,17 +8547,17 @@ function Os(n, e, t, s) {
|
|
|
8547
8547
|
}
|
|
8548
8548
|
return { dom: a, contentDOM: l };
|
|
8549
8549
|
}
|
|
8550
|
-
const Oc = 65535,
|
|
8551
|
-
function
|
|
8552
|
-
return n + e *
|
|
8550
|
+
const Oc = 65535, Ic = Math.pow(2, 16);
|
|
8551
|
+
function Of(n, e) {
|
|
8552
|
+
return n + e * Ic;
|
|
8553
8553
|
}
|
|
8554
8554
|
function ul(n) {
|
|
8555
8555
|
return n & Oc;
|
|
8556
8556
|
}
|
|
8557
|
-
function
|
|
8558
|
-
return (n - (n & Oc)) /
|
|
8557
|
+
function If(n) {
|
|
8558
|
+
return (n - (n & Oc)) / Ic;
|
|
8559
8559
|
}
|
|
8560
|
-
const
|
|
8560
|
+
const Rc = 1, Dc = 2, Rs = 4, Lc = 8;
|
|
8561
8561
|
class bi {
|
|
8562
8562
|
/**
|
|
8563
8563
|
@internal
|
|
@@ -8571,19 +8571,19 @@ class bi {
|
|
|
8571
8571
|
argument from the document.
|
|
8572
8572
|
*/
|
|
8573
8573
|
get deleted() {
|
|
8574
|
-
return (this.delInfo &
|
|
8574
|
+
return (this.delInfo & Lc) > 0;
|
|
8575
8575
|
}
|
|
8576
8576
|
/**
|
|
8577
8577
|
Tells you whether the token before the mapped position was deleted.
|
|
8578
8578
|
*/
|
|
8579
8579
|
get deletedBefore() {
|
|
8580
|
-
return (this.delInfo & (
|
|
8580
|
+
return (this.delInfo & (Rc | Rs)) > 0;
|
|
8581
8581
|
}
|
|
8582
8582
|
/**
|
|
8583
8583
|
True when the token after the mapped position was deleted.
|
|
8584
8584
|
*/
|
|
8585
8585
|
get deletedAfter() {
|
|
8586
|
-
return (this.delInfo & (
|
|
8586
|
+
return (this.delInfo & (Dc | Rs)) > 0;
|
|
8587
8587
|
}
|
|
8588
8588
|
/**
|
|
8589
8589
|
Tells whether any of the steps mapped through deletes across the
|
|
@@ -8612,7 +8612,7 @@ class be {
|
|
|
8612
8612
|
if (!this.inverted)
|
|
8613
8613
|
for (let o = 0; o < s; o++)
|
|
8614
8614
|
t += this.ranges[o * 3 + 2] - this.ranges[o * 3 + 1];
|
|
8615
|
-
return this.ranges[s * 3] + t +
|
|
8615
|
+
return this.ranges[s * 3] + t + If(e);
|
|
8616
8616
|
}
|
|
8617
8617
|
mapResult(e, t = 1) {
|
|
8618
8618
|
return this._map(e, t, !1);
|
|
@@ -8634,8 +8634,8 @@ class be {
|
|
|
8634
8634
|
let u = c ? e == a ? -1 : e == p ? 1 : t : t, h = a + o + (u < 0 ? 0 : d);
|
|
8635
8635
|
if (s)
|
|
8636
8636
|
return h;
|
|
8637
|
-
let f = e == (t < 0 ? a : p) ? null :
|
|
8638
|
-
return (t < 0 ? e != a : e != p) && (m |=
|
|
8637
|
+
let f = e == (t < 0 ? a : p) ? null : Of(l / 3, e - a), m = e == a ? Dc : e == p ? Rc : Rs;
|
|
8638
|
+
return (t < 0 ? e != a : e != p) && (m |= Lc), new bi(h, m, f);
|
|
8639
8639
|
}
|
|
8640
8640
|
o += d - c;
|
|
8641
8641
|
}
|
|
@@ -8894,7 +8894,7 @@ class ct extends oe {
|
|
|
8894
8894
|
return K.fromReplace(e, this.from, this.to, i);
|
|
8895
8895
|
}
|
|
8896
8896
|
invert() {
|
|
8897
|
-
return new
|
|
8897
|
+
return new Fe(this.from, this.to, this.mark);
|
|
8898
8898
|
}
|
|
8899
8899
|
map(e) {
|
|
8900
8900
|
let t = e.mapResult(this.from, 1), s = e.mapResult(this.to, -1);
|
|
@@ -8921,7 +8921,7 @@ class ct extends oe {
|
|
|
8921
8921
|
}
|
|
8922
8922
|
}
|
|
8923
8923
|
oe.jsonID("addMark", ct);
|
|
8924
|
-
class
|
|
8924
|
+
class Fe extends oe {
|
|
8925
8925
|
/**
|
|
8926
8926
|
Create a mark-removing step.
|
|
8927
8927
|
*/
|
|
@@ -8937,10 +8937,10 @@ class Be extends oe {
|
|
|
8937
8937
|
}
|
|
8938
8938
|
map(e) {
|
|
8939
8939
|
let t = e.mapResult(this.from, 1), s = e.mapResult(this.to, -1);
|
|
8940
|
-
return t.deleted && s.deleted || t.pos >= s.pos ? null : new
|
|
8940
|
+
return t.deleted && s.deleted || t.pos >= s.pos ? null : new Fe(t.pos, s.pos, this.mark);
|
|
8941
8941
|
}
|
|
8942
8942
|
merge(e) {
|
|
8943
|
-
return e instanceof
|
|
8943
|
+
return e instanceof Fe && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new Fe(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
|
|
8944
8944
|
}
|
|
8945
8945
|
toJSON() {
|
|
8946
8946
|
return {
|
|
@@ -8956,10 +8956,10 @@ class Be extends oe {
|
|
|
8956
8956
|
static fromJSON(e, t) {
|
|
8957
8957
|
if (typeof t.from != "number" || typeof t.to != "number")
|
|
8958
8958
|
throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");
|
|
8959
|
-
return new
|
|
8959
|
+
return new Fe(t.from, t.to, e.markFromJSON(t.mark));
|
|
8960
8960
|
}
|
|
8961
8961
|
}
|
|
8962
|
-
oe.jsonID("removeMark",
|
|
8962
|
+
oe.jsonID("removeMark", Fe);
|
|
8963
8963
|
class dt extends oe {
|
|
8964
8964
|
/**
|
|
8965
8965
|
Create a node mark step.
|
|
@@ -9172,7 +9172,7 @@ function Rf(n, e, t, s) {
|
|
|
9172
9172
|
if (!s.isInSet(p) && d.type.allowsMarkType(s.type)) {
|
|
9173
9173
|
let u = Math.max(c, e), h = Math.min(c + a.nodeSize, t), f = s.addToSet(p);
|
|
9174
9174
|
for (let m = 0; m < p.length; m++)
|
|
9175
|
-
p[m].isInSet(f) || (r && r.to == u && r.mark.eq(p[m]) ? r.to = h : o.push(r = new
|
|
9175
|
+
p[m].isInSet(f) || (r && r.to == u && r.mark.eq(p[m]) ? r.to = h : o.push(r = new Fe(u, h, p[m])));
|
|
9176
9176
|
l && l.to == u ? l.to = h : i.push(l = new ct(u, h, s));
|
|
9177
9177
|
}
|
|
9178
9178
|
}), o.forEach((a) => n.step(a)), i.forEach((a) => n.step(a));
|
|
@@ -9200,7 +9200,7 @@ function Df(n, e, t, s) {
|
|
|
9200
9200
|
u ? (u.to = c, u.step = i) : o.push({ style: p, from: Math.max(l, e), to: c, step: i });
|
|
9201
9201
|
}
|
|
9202
9202
|
}
|
|
9203
|
-
}), o.forEach((r) => n.step(new
|
|
9203
|
+
}), o.forEach((r) => n.step(new Fe(r.from, r.to, r.style)));
|
|
9204
9204
|
}
|
|
9205
9205
|
function tr(n, e, t, s = t.contentMatch, o = !0) {
|
|
9206
9206
|
let i = n.doc.nodeAt(e), r = [], l = e + 1;
|
|
@@ -9211,7 +9211,7 @@ function tr(n, e, t, s = t.contentMatch, o = !0) {
|
|
|
9211
9211
|
else {
|
|
9212
9212
|
s = p;
|
|
9213
9213
|
for (let u = 0; u < c.marks.length; u++)
|
|
9214
|
-
t.allowsMarkType(c.marks[u].type) || n.step(new
|
|
9214
|
+
t.allowsMarkType(c.marks[u].type) || n.step(new Fe(l, d, c.marks[u]));
|
|
9215
9215
|
if (o && c.isText && t.whitespace != "pre") {
|
|
9216
9216
|
let u, h = /\r?\n|\r/g, f;
|
|
9217
9217
|
for (; u = h.exec(c.text); )
|
|
@@ -9250,7 +9250,7 @@ function $f(n, e, t) {
|
|
|
9250
9250
|
m || o.after(f + 1) < o.end(f) ? (m = !0, u = T.from(o.node(f).copy(u)), h++) : c++;
|
|
9251
9251
|
n.step(new ee(a, c, r, l, new A(d.append(u), p, h), d.size - p, !0));
|
|
9252
9252
|
}
|
|
9253
|
-
function
|
|
9253
|
+
function $c(n, e, t = null, s = n) {
|
|
9254
9254
|
let o = zf(n, e), i = o && Vf(s, e);
|
|
9255
9255
|
return i ? o.map(hl).concat({ type: e, attrs: t }).concat(i.map(hl)) : null;
|
|
9256
9256
|
}
|
|
@@ -9298,13 +9298,13 @@ function Hf(n, e, t, s, o) {
|
|
|
9298
9298
|
let h = s.whitespace == "pre", f = !!s.contentMatch.matchType(s.schema.linebreakReplacement);
|
|
9299
9299
|
h && !f ? c = !1 : !h && f && (c = !0);
|
|
9300
9300
|
}
|
|
9301
|
-
c === !1 &&
|
|
9301
|
+
c === !1 && Vc(n, r, l, i), tr(n, n.mapping.slice(i).map(l, 1), s, void 0, c === null);
|
|
9302
9302
|
let d = n.mapping.slice(i), p = d.map(l, 1), u = d.map(l + r.nodeSize, 1);
|
|
9303
|
-
return n.step(new ee(p, u, p + 1, u - 1, new A(T.from(s.create(a, null, r.marks)), 0, 0), 1, !0)), c === !0 &&
|
|
9303
|
+
return n.step(new ee(p, u, p + 1, u - 1, new A(T.from(s.create(a, null, r.marks)), 0, 0), 1, !0)), c === !0 && zc(n, r, l, i), !1;
|
|
9304
9304
|
}
|
|
9305
9305
|
});
|
|
9306
9306
|
}
|
|
9307
|
-
function
|
|
9307
|
+
function zc(n, e, t, s) {
|
|
9308
9308
|
e.forEach((o, i) => {
|
|
9309
9309
|
if (o.isText) {
|
|
9310
9310
|
let r, l = /\r?\n|\r/g;
|
|
@@ -9315,7 +9315,7 @@ function Vc(n, e, t, s) {
|
|
|
9315
9315
|
}
|
|
9316
9316
|
});
|
|
9317
9317
|
}
|
|
9318
|
-
function
|
|
9318
|
+
function Vc(n, e, t, s) {
|
|
9319
9319
|
e.forEach((o, i) => {
|
|
9320
9320
|
if (o.type == o.type.schema.linebreakReplacement) {
|
|
9321
9321
|
let r = n.mapping.slice(s).map(t + 1 + i);
|
|
@@ -9392,13 +9392,13 @@ function qf(n, e, t) {
|
|
|
9392
9392
|
let l = n.steps.length;
|
|
9393
9393
|
if (s === !1) {
|
|
9394
9394
|
let d = n.doc.resolve(e + t);
|
|
9395
|
-
|
|
9395
|
+
Vc(n, d.node(), d.before(), l);
|
|
9396
9396
|
}
|
|
9397
9397
|
r.inlineContent && tr(n, e + t - 1, r, i.node().contentMatchAt(i.index()), s == null);
|
|
9398
9398
|
let a = n.mapping.slice(l), c = a.map(e - t);
|
|
9399
9399
|
if (n.step(new ne(c, a.map(e + t, -1), A.empty, !0)), s === !0) {
|
|
9400
9400
|
let d = n.doc.resolve(c);
|
|
9401
|
-
|
|
9401
|
+
zc(n, d.node(), d.before(), n.steps.length);
|
|
9402
9402
|
}
|
|
9403
9403
|
return n;
|
|
9404
9404
|
}
|
|
@@ -9449,9 +9449,9 @@ function nr(n, e, t = e, s = A.empty) {
|
|
|
9449
9449
|
if (e == t && !s.size)
|
|
9450
9450
|
return null;
|
|
9451
9451
|
let o = n.resolve(e), i = n.resolve(t);
|
|
9452
|
-
return
|
|
9452
|
+
return Bc(o, i, s) ? new ne(e, t, s) : new Jf(o, i, s).fit();
|
|
9453
9453
|
}
|
|
9454
|
-
function
|
|
9454
|
+
function Bc(n, e, t) {
|
|
9455
9455
|
return !t.openStart && !t.openEnd && n.start() == e.start() && n.parent.canReplace(n.index(), e.index(), t.content);
|
|
9456
9456
|
}
|
|
9457
9457
|
class Jf {
|
|
@@ -9500,7 +9500,7 @@ class Jf {
|
|
|
9500
9500
|
for (let t = 1; t <= 2; t++)
|
|
9501
9501
|
for (let s = t == 1 ? e : this.unplaced.openStart; s >= 0; s--) {
|
|
9502
9502
|
let o, i = null;
|
|
9503
|
-
s ? (i =
|
|
9503
|
+
s ? (i = Oo(this.unplaced.content, s - 1).firstChild, o = i.content) : o = this.unplaced.content;
|
|
9504
9504
|
let r = o.firstChild;
|
|
9505
9505
|
for (let l = this.depth; l >= 0; l--) {
|
|
9506
9506
|
let { type: a, match: c } = this.frontier[l], d, p = null;
|
|
@@ -9514,16 +9514,16 @@ class Jf {
|
|
|
9514
9514
|
}
|
|
9515
9515
|
}
|
|
9516
9516
|
openMore() {
|
|
9517
|
-
let { content: e, openStart: t, openEnd: s } = this.unplaced, o =
|
|
9517
|
+
let { content: e, openStart: t, openEnd: s } = this.unplaced, o = Oo(e, t);
|
|
9518
9518
|
return !o.childCount || o.firstChild.isLeaf ? !1 : (this.unplaced = new A(e, t + 1, Math.max(s, o.size + t >= e.size - s ? t + 1 : 0)), !0);
|
|
9519
9519
|
}
|
|
9520
9520
|
dropNode() {
|
|
9521
|
-
let { content: e, openStart: t, openEnd: s } = this.unplaced, o =
|
|
9521
|
+
let { content: e, openStart: t, openEnd: s } = this.unplaced, o = Oo(e, t);
|
|
9522
9522
|
if (o.childCount <= 1 && t > 0) {
|
|
9523
9523
|
let i = e.size - t <= t + o.size;
|
|
9524
|
-
this.unplaced = new A(
|
|
9524
|
+
this.unplaced = new A(On(e, t - 1, 1), t - 1, i ? t - 1 : s);
|
|
9525
9525
|
} else
|
|
9526
|
-
this.unplaced = new A(
|
|
9526
|
+
this.unplaced = new A(On(e, t, 1), t, s);
|
|
9527
9527
|
}
|
|
9528
9528
|
// Move content from the unplaced slice at `sliceDepth` to the
|
|
9529
9529
|
// frontier node at `frontierDepth`. Close that frontier node when
|
|
@@ -9545,21 +9545,21 @@ class Jf {
|
|
|
9545
9545
|
let m = l.child(c), g = p.matchType(m.type);
|
|
9546
9546
|
if (!g)
|
|
9547
9547
|
break;
|
|
9548
|
-
c++, (c > 1 || a == 0 || m.content.size) && (p = g, d.push(
|
|
9548
|
+
c++, (c > 1 || a == 0 || m.content.size) && (p = g, d.push(Hc(m.mark(u.allowedMarks(m.marks)), c == 1 ? a : 0, c == l.childCount ? h : -1)));
|
|
9549
9549
|
}
|
|
9550
9550
|
let f = c == l.childCount;
|
|
9551
|
-
f || (h = -1), this.placed =
|
|
9551
|
+
f || (h = -1), this.placed = In(this.placed, t, T.from(d)), this.frontier[t].match = p, f && h < 0 && s && s.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
|
|
9552
9552
|
for (let m = 0, g = l; m < h; m++) {
|
|
9553
9553
|
let b = g.lastChild;
|
|
9554
9554
|
this.frontier.push({ type: b.type, match: b.contentMatchAt(b.childCount) }), g = b.content;
|
|
9555
9555
|
}
|
|
9556
|
-
this.unplaced = f ? e == 0 ? A.empty : new A(
|
|
9556
|
+
this.unplaced = f ? e == 0 ? A.empty : new A(On(r.content, e - 1, 1), e - 1, h < 0 ? r.openEnd : e - 1) : new A(On(r.content, e, c), r.openStart, r.openEnd);
|
|
9557
9557
|
}
|
|
9558
9558
|
mustMoveInline() {
|
|
9559
9559
|
if (!this.$to.parent.isTextblock)
|
|
9560
9560
|
return -1;
|
|
9561
9561
|
let e = this.frontier[this.depth], t;
|
|
9562
|
-
if (!e.type.isTextblock || !
|
|
9562
|
+
if (!e.type.isTextblock || !Io(this.$to, this.$to.depth, e.type, e.match, !1) || this.$to.depth == this.depth && (t = this.findCloseLevel(this.$to)) && t.depth == this.depth)
|
|
9563
9563
|
return -1;
|
|
9564
9564
|
let { depth: s } = this.$to, o = this.$to.after(s);
|
|
9565
9565
|
for (; s > 1 && o == this.$to.end(--s); )
|
|
@@ -9568,10 +9568,10 @@ class Jf {
|
|
|
9568
9568
|
}
|
|
9569
9569
|
findCloseLevel(e) {
|
|
9570
9570
|
e: for (let t = Math.min(this.depth, e.depth); t >= 0; t--) {
|
|
9571
|
-
let { match: s, type: o } = this.frontier[t], i = t < e.depth && e.end(t + 1) == e.pos + (e.depth - (t + 1)), r =
|
|
9571
|
+
let { match: s, type: o } = this.frontier[t], i = t < e.depth && e.end(t + 1) == e.pos + (e.depth - (t + 1)), r = Io(e, t, o, s, i);
|
|
9572
9572
|
if (r) {
|
|
9573
9573
|
for (let l = t - 1; l >= 0; l--) {
|
|
9574
|
-
let { match: a, type: c } = this.frontier[l], d =
|
|
9574
|
+
let { match: a, type: c } = this.frontier[l], d = Io(e, l, c, a, !0);
|
|
9575
9575
|
if (!d || d.childCount)
|
|
9576
9576
|
continue e;
|
|
9577
9577
|
}
|
|
@@ -9585,7 +9585,7 @@ class Jf {
|
|
|
9585
9585
|
return null;
|
|
9586
9586
|
for (; this.depth > t.depth; )
|
|
9587
9587
|
this.closeFrontierNode();
|
|
9588
|
-
t.fit.childCount && (this.placed =
|
|
9588
|
+
t.fit.childCount && (this.placed = In(this.placed, t.depth, t.fit)), e = t.move;
|
|
9589
9589
|
for (let s = t.depth + 1; s <= e.depth; s++) {
|
|
9590
9590
|
let o = e.node(s), i = o.type.contentMatch.fillBefore(o.content, !0, e.index(s));
|
|
9591
9591
|
this.openFrontierNode(o.type, o.attrs, i);
|
|
@@ -9594,31 +9594,31 @@ class Jf {
|
|
|
9594
9594
|
}
|
|
9595
9595
|
openFrontierNode(e, t = null, s) {
|
|
9596
9596
|
let o = this.frontier[this.depth];
|
|
9597
|
-
o.match = o.match.matchType(e), this.placed =
|
|
9597
|
+
o.match = o.match.matchType(e), this.placed = In(this.placed, this.depth, T.from(e.create(t, s))), this.frontier.push({ type: e, match: e.contentMatch });
|
|
9598
9598
|
}
|
|
9599
9599
|
closeFrontierNode() {
|
|
9600
9600
|
let t = this.frontier.pop().match.fillBefore(T.empty, !0);
|
|
9601
|
-
t.childCount && (this.placed =
|
|
9601
|
+
t.childCount && (this.placed = In(this.placed, this.frontier.length, t));
|
|
9602
9602
|
}
|
|
9603
9603
|
}
|
|
9604
|
-
function In(n, e, t) {
|
|
9605
|
-
return e == 0 ? n.cutByIndex(t, n.childCount) : n.replaceChild(0, n.firstChild.copy(In(n.firstChild.content, e - 1, t)));
|
|
9606
|
-
}
|
|
9607
9604
|
function On(n, e, t) {
|
|
9608
|
-
return e == 0 ? n.
|
|
9605
|
+
return e == 0 ? n.cutByIndex(t, n.childCount) : n.replaceChild(0, n.firstChild.copy(On(n.firstChild.content, e - 1, t)));
|
|
9606
|
+
}
|
|
9607
|
+
function In(n, e, t) {
|
|
9608
|
+
return e == 0 ? n.append(t) : n.replaceChild(n.childCount - 1, n.lastChild.copy(In(n.lastChild.content, e - 1, t)));
|
|
9609
9609
|
}
|
|
9610
|
-
function
|
|
9610
|
+
function Oo(n, e) {
|
|
9611
9611
|
for (let t = 0; t < e; t++)
|
|
9612
9612
|
n = n.firstChild.content;
|
|
9613
9613
|
return n;
|
|
9614
9614
|
}
|
|
9615
|
-
function
|
|
9615
|
+
function Hc(n, e, t) {
|
|
9616
9616
|
if (e <= 0)
|
|
9617
9617
|
return n;
|
|
9618
9618
|
let s = n.content;
|
|
9619
|
-
return e > 1 && (s = s.replaceChild(0,
|
|
9619
|
+
return e > 1 && (s = s.replaceChild(0, Hc(s.firstChild, e - 1, s.childCount == 1 ? t - 1 : 0))), e > 0 && (s = n.type.contentMatch.fillBefore(s).append(s), t <= 0 && (s = s.append(n.type.contentMatch.matchFragment(s).fillBefore(T.empty, !0)))), n.copy(s);
|
|
9620
9620
|
}
|
|
9621
|
-
function
|
|
9621
|
+
function Io(n, e, t, s, o) {
|
|
9622
9622
|
let i = n.node(e), r = o ? n.indexAfter(e) : n.index(e);
|
|
9623
9623
|
if (r == i.childCount && !t.compatibleContent(i.type))
|
|
9624
9624
|
return null;
|
|
@@ -9638,9 +9638,9 @@ function Xf(n, e, t, s) {
|
|
|
9638
9638
|
if (!s.size)
|
|
9639
9639
|
return n.deleteRange(e, t);
|
|
9640
9640
|
let o = n.doc.resolve(e), i = n.doc.resolve(t);
|
|
9641
|
-
if (
|
|
9641
|
+
if (Bc(o, i, s))
|
|
9642
9642
|
return n.step(new ne(e, t, s));
|
|
9643
|
-
let r =
|
|
9643
|
+
let r = _c(o, n.doc.resolve(t));
|
|
9644
9644
|
r[r.length - 1] == 0 && r.pop();
|
|
9645
9645
|
let l = -(o.depth + 1);
|
|
9646
9646
|
r.unshift(l);
|
|
@@ -9672,7 +9672,7 @@ function Xf(n, e, t, s) {
|
|
|
9672
9672
|
g < 0 && (b = !1, g = -g);
|
|
9673
9673
|
let C = o.node(g - 1), y = o.index(g - 1);
|
|
9674
9674
|
if (C.canReplaceWith(y, y, f.type, f.marks))
|
|
9675
|
-
return n.replace(o.before(g), b ? i.after(g) : t, new A(
|
|
9675
|
+
return n.replace(o.before(g), b ? i.after(g) : t, new A(Fc(s.content, 0, s.openStart, h), h, s.openEnd));
|
|
9676
9676
|
}
|
|
9677
9677
|
}
|
|
9678
9678
|
let p = n.steps.length;
|
|
@@ -9681,10 +9681,10 @@ function Xf(n, e, t, s) {
|
|
|
9681
9681
|
h < 0 || (e = o.before(h), t = i.after(h));
|
|
9682
9682
|
}
|
|
9683
9683
|
}
|
|
9684
|
-
function
|
|
9684
|
+
function Fc(n, e, t, s, o) {
|
|
9685
9685
|
if (e < t) {
|
|
9686
9686
|
let i = n.firstChild;
|
|
9687
|
-
n = n.replaceChild(0, i.copy(
|
|
9687
|
+
n = n.replaceChild(0, i.copy(Fc(i.content, e + 1, t, s, i)));
|
|
9688
9688
|
}
|
|
9689
9689
|
if (e > s) {
|
|
9690
9690
|
let i = o.contentMatchAt(0), r = i.fillBefore(n).append(n);
|
|
@@ -9700,7 +9700,7 @@ function Qf(n, e, t, s) {
|
|
|
9700
9700
|
n.replaceRange(e, t, new A(T.from(s), 0, 0));
|
|
9701
9701
|
}
|
|
9702
9702
|
function em(n, e, t) {
|
|
9703
|
-
let s = n.doc.resolve(e), o = n.doc.resolve(t), i =
|
|
9703
|
+
let s = n.doc.resolve(e), o = n.doc.resolve(t), i = _c(s, o);
|
|
9704
9704
|
for (let r = 0; r < i.length; r++) {
|
|
9705
9705
|
let l = i[r], a = r == i.length - 1;
|
|
9706
9706
|
if (a && l == 0 || s.node(l).type.contentMatch.validEnd)
|
|
@@ -9713,7 +9713,7 @@ function em(n, e, t) {
|
|
|
9713
9713
|
return n.delete(s.before(r), t);
|
|
9714
9714
|
n.delete(e, t);
|
|
9715
9715
|
}
|
|
9716
|
-
function
|
|
9716
|
+
function _c(n, e) {
|
|
9717
9717
|
let t = [], s = Math.min(n.depth, e.depth);
|
|
9718
9718
|
for (let o = s; o >= 0; o--) {
|
|
9719
9719
|
let i = n.start(o);
|
|
@@ -9804,7 +9804,7 @@ gn = function n(e) {
|
|
|
9804
9804
|
gn.prototype = Object.create(Error.prototype);
|
|
9805
9805
|
gn.prototype.constructor = gn;
|
|
9806
9806
|
gn.prototype.name = "TransformError";
|
|
9807
|
-
class
|
|
9807
|
+
class Gc {
|
|
9808
9808
|
/**
|
|
9809
9809
|
Create a transform that starts with the given document.
|
|
9810
9810
|
*/
|
|
@@ -10032,7 +10032,7 @@ class L {
|
|
|
10032
10032
|
`$head`.
|
|
10033
10033
|
*/
|
|
10034
10034
|
constructor(e, t, s) {
|
|
10035
|
-
this.$anchor = e, this.$head = t, this.ranges = s || [new
|
|
10035
|
+
this.$anchor = e, this.$head = t, this.ranges = s || [new Wc(e.min(t), e.max(t))];
|
|
10036
10036
|
}
|
|
10037
10037
|
/**
|
|
10038
10038
|
The selection's anchor, as an unresolved position.
|
|
@@ -10190,7 +10190,7 @@ class L {
|
|
|
10190
10190
|
}
|
|
10191
10191
|
}
|
|
10192
10192
|
L.prototype.visible = !0;
|
|
10193
|
-
class
|
|
10193
|
+
class Wc {
|
|
10194
10194
|
/**
|
|
10195
10195
|
Create a range.
|
|
10196
10196
|
*/
|
|
@@ -10420,7 +10420,7 @@ function gl(n, e, t) {
|
|
|
10420
10420
|
}), n.setSelection(L.near(n.doc.resolve(r), t));
|
|
10421
10421
|
}
|
|
10422
10422
|
const yl = 1, Cs = 2, bl = 4;
|
|
10423
|
-
class nm extends
|
|
10423
|
+
class nm extends Gc {
|
|
10424
10424
|
/**
|
|
10425
10425
|
@internal
|
|
10426
10426
|
*/
|
|
@@ -10787,10 +10787,10 @@ class sn {
|
|
|
10787
10787
|
}), i;
|
|
10788
10788
|
}
|
|
10789
10789
|
}
|
|
10790
|
-
function
|
|
10790
|
+
function jc(n, e, t) {
|
|
10791
10791
|
for (let s in n) {
|
|
10792
10792
|
let o = n[s];
|
|
10793
|
-
o instanceof Function ? o = o.bind(e) : s == "handleDOMEvents" && (o =
|
|
10793
|
+
o instanceof Function ? o = o.bind(e) : s == "handleDOMEvents" && (o = jc(o, e, {})), t[s] = o;
|
|
10794
10794
|
}
|
|
10795
10795
|
return t;
|
|
10796
10796
|
}
|
|
@@ -10799,7 +10799,7 @@ class wn {
|
|
|
10799
10799
|
Create a plugin.
|
|
10800
10800
|
*/
|
|
10801
10801
|
constructor(e) {
|
|
10802
|
-
this.spec = e, this.props = {}, e.props &&
|
|
10802
|
+
this.spec = e, this.props = {}, e.props && jc(e.props, this, this.props), this.key = e.key ? e.key.key : qc("plugin");
|
|
10803
10803
|
}
|
|
10804
10804
|
/**
|
|
10805
10805
|
Extract the plugin's state field from an editor state.
|
|
@@ -10809,7 +10809,7 @@ class wn {
|
|
|
10809
10809
|
}
|
|
10810
10810
|
}
|
|
10811
10811
|
const Lo = /* @__PURE__ */ Object.create(null);
|
|
10812
|
-
function
|
|
10812
|
+
function qc(n) {
|
|
10813
10813
|
return n in Lo ? n + "$" + ++Lo[n] : (Lo[n] = 0, n + "$");
|
|
10814
10814
|
}
|
|
10815
10815
|
class is {
|
|
@@ -10817,7 +10817,7 @@ class is {
|
|
|
10817
10817
|
Create a plugin key.
|
|
10818
10818
|
*/
|
|
10819
10819
|
constructor(e = "key") {
|
|
10820
|
-
this.key =
|
|
10820
|
+
this.key = qc(e);
|
|
10821
10821
|
}
|
|
10822
10822
|
/**
|
|
10823
10823
|
Get the active plugin with this key, if any, from an editor
|
|
@@ -10833,7 +10833,7 @@ class is {
|
|
|
10833
10833
|
return e[this.key];
|
|
10834
10834
|
}
|
|
10835
10835
|
}
|
|
10836
|
-
const
|
|
10836
|
+
const Uc = (n, e) => n.selection.empty ? !1 : (e && e(n.tr.deleteSelection().scrollIntoView()), !0);
|
|
10837
10837
|
function om(n, e) {
|
|
10838
10838
|
let { $cursor: t } = n.selection;
|
|
10839
10839
|
return !t || (e ? !e.endOfTextblock("backward", n) : t.parentOffset > 0) ? null : t;
|
|
@@ -10842,13 +10842,13 @@ const im = (n, e, t) => {
|
|
|
10842
10842
|
let s = om(n, t);
|
|
10843
10843
|
if (!s)
|
|
10844
10844
|
return !1;
|
|
10845
|
-
let o =
|
|
10845
|
+
let o = Kc(s);
|
|
10846
10846
|
if (!o) {
|
|
10847
10847
|
let r = s.blockRange(), l = r && mo(r);
|
|
10848
10848
|
return l == null ? !1 : (e && e(n.tr.lift(r, l).scrollIntoView()), !0);
|
|
10849
10849
|
}
|
|
10850
10850
|
let i = o.nodeBefore;
|
|
10851
|
-
if (
|
|
10851
|
+
if (ed(n, o, e, -1))
|
|
10852
10852
|
return !0;
|
|
10853
10853
|
if (s.parent.content.size == 0 && (yn(i, "end") || D.isSelectable(i)))
|
|
10854
10854
|
for (let r = s.depth; ; r--) {
|
|
@@ -10881,12 +10881,12 @@ const rm = (n, e, t) => {
|
|
|
10881
10881
|
if (s.parent.isTextblock) {
|
|
10882
10882
|
if (t ? !t.endOfTextblock("backward", n) : s.parentOffset > 0)
|
|
10883
10883
|
return !1;
|
|
10884
|
-
i =
|
|
10884
|
+
i = Kc(s);
|
|
10885
10885
|
}
|
|
10886
10886
|
let r = i && i.nodeBefore;
|
|
10887
10887
|
return !r || !D.isSelectable(r) ? !1 : (e && e(n.tr.setSelection(D.create(n.doc, i.pos - r.nodeSize)).scrollIntoView()), !0);
|
|
10888
10888
|
};
|
|
10889
|
-
function
|
|
10889
|
+
function Kc(n) {
|
|
10890
10890
|
if (!n.parent.type.spec.isolating)
|
|
10891
10891
|
for (let e = n.depth - 1; e >= 0; e--) {
|
|
10892
10892
|
if (n.index(e) > 0)
|
|
@@ -10904,11 +10904,11 @@ const am = (n, e, t) => {
|
|
|
10904
10904
|
let s = lm(n, t);
|
|
10905
10905
|
if (!s)
|
|
10906
10906
|
return !1;
|
|
10907
|
-
let o =
|
|
10907
|
+
let o = Jc(s);
|
|
10908
10908
|
if (!o)
|
|
10909
10909
|
return !1;
|
|
10910
10910
|
let i = o.nodeAfter;
|
|
10911
|
-
if (
|
|
10911
|
+
if (ed(n, o, e, 1))
|
|
10912
10912
|
return !0;
|
|
10913
10913
|
if (s.parent.content.size == 0 && (yn(i, "start") || D.isSelectable(i))) {
|
|
10914
10914
|
let r = nr(n.doc, s.before(), s.after(), A.empty);
|
|
@@ -10928,12 +10928,12 @@ const am = (n, e, t) => {
|
|
|
10928
10928
|
if (s.parent.isTextblock) {
|
|
10929
10929
|
if (t ? !t.endOfTextblock("forward", n) : s.parentOffset < s.parent.content.size)
|
|
10930
10930
|
return !1;
|
|
10931
|
-
i =
|
|
10931
|
+
i = Jc(s);
|
|
10932
10932
|
}
|
|
10933
10933
|
let r = i && i.nodeAfter;
|
|
10934
10934
|
return !r || !D.isSelectable(r) ? !1 : (e && e(n.tr.setSelection(D.create(n.doc, i.pos)).scrollIntoView()), !0);
|
|
10935
10935
|
};
|
|
10936
|
-
function
|
|
10936
|
+
function Jc(n) {
|
|
10937
10937
|
if (!n.parent.type.spec.isolating)
|
|
10938
10938
|
for (let e = n.depth - 1; e >= 0; e--) {
|
|
10939
10939
|
let t = n.node(e);
|
|
@@ -10957,7 +10957,7 @@ function or(n) {
|
|
|
10957
10957
|
}
|
|
10958
10958
|
return null;
|
|
10959
10959
|
}
|
|
10960
|
-
const
|
|
10960
|
+
const Zc = (n, e) => {
|
|
10961
10961
|
let { $head: t, $anchor: s } = n.selection;
|
|
10962
10962
|
if (!t.parent.type.spec.code || !t.sameParent(s))
|
|
10963
10963
|
return !1;
|
|
@@ -10981,7 +10981,7 @@ const Yc = (n, e) => {
|
|
|
10981
10981
|
l.setSelection($.create(l.doc, r + 1)), e(l.scrollIntoView());
|
|
10982
10982
|
}
|
|
10983
10983
|
return !0;
|
|
10984
|
-
},
|
|
10984
|
+
}, Yc = (n, e) => {
|
|
10985
10985
|
let { $cursor: t } = n.selection;
|
|
10986
10986
|
if (!t || t.parent.content.size)
|
|
10987
10987
|
return !1;
|
|
@@ -10993,7 +10993,7 @@ const Yc = (n, e) => {
|
|
|
10993
10993
|
let s = t.blockRange(), o = s && mo(s);
|
|
10994
10994
|
return o == null ? !1 : (e && e(n.tr.lift(s, o).scrollIntoView()), !0);
|
|
10995
10995
|
};
|
|
10996
|
-
function
|
|
10996
|
+
function Xc(n) {
|
|
10997
10997
|
return (e, t) => {
|
|
10998
10998
|
let { $from: s, $to: o } = e.selection;
|
|
10999
10999
|
if (e.selection instanceof D && e.selection.node.isBlock)
|
|
@@ -11022,12 +11022,12 @@ function Qc(n) {
|
|
|
11022
11022
|
return t && t(d.scrollIntoView()), !0;
|
|
11023
11023
|
};
|
|
11024
11024
|
}
|
|
11025
|
-
const um =
|
|
11025
|
+
const um = Xc(), Qc = (n, e) => (e && e(n.tr.setSelection(new Se(n.doc))), !0);
|
|
11026
11026
|
function hm(n, e, t) {
|
|
11027
11027
|
let s = e.nodeBefore, o = e.nodeAfter, i = e.index();
|
|
11028
11028
|
return !s || !o || !s.type.compatibleContent(o.type) ? !1 : !s.content.size && e.parent.canReplace(i - 1, i) ? (t && t(n.tr.delete(e.pos - s.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(i, i + 1) || !(o.isTextblock || go(n.doc, e.pos)) ? !1 : (t && t(n.tr.join(e.pos).scrollIntoView()), !0);
|
|
11029
11029
|
}
|
|
11030
|
-
function
|
|
11030
|
+
function ed(n, e, t, s) {
|
|
11031
11031
|
let o = e.nodeBefore, i = e.nodeAfter, r, l, a = o.type.spec.isolating || i.type.spec.isolating;
|
|
11032
11032
|
if (!a && hm(n, e, t))
|
|
11033
11033
|
return !0;
|
|
@@ -11066,7 +11066,7 @@ function td(n, e, t, s) {
|
|
|
11066
11066
|
}
|
|
11067
11067
|
return !1;
|
|
11068
11068
|
}
|
|
11069
|
-
function
|
|
11069
|
+
function td(n) {
|
|
11070
11070
|
return function(e, t) {
|
|
11071
11071
|
let s = e.selection, o = n < 0 ? s.$from : s.$to, i = o.depth;
|
|
11072
11072
|
for (; o.node(i).isInline; ) {
|
|
@@ -11077,7 +11077,7 @@ function nd(n) {
|
|
|
11077
11077
|
return o.node(i).isTextblock ? (t && t(e.tr.setSelection($.create(e.doc, n < 0 ? o.start(i) : o.end(i)))), !0) : !1;
|
|
11078
11078
|
};
|
|
11079
11079
|
}
|
|
11080
|
-
const fm =
|
|
11080
|
+
const fm = td(-1), mm = td(1);
|
|
11081
11081
|
function gm(n, e = null) {
|
|
11082
11082
|
return function(t, s) {
|
|
11083
11083
|
let o = !1;
|
|
@@ -11154,17 +11154,17 @@ function Yn(...n) {
|
|
|
11154
11154
|
return !1;
|
|
11155
11155
|
};
|
|
11156
11156
|
}
|
|
11157
|
-
let $o = Yn(
|
|
11157
|
+
let $o = Yn(Uc, im, rm), Sl = Yn(Uc, am, cm);
|
|
11158
11158
|
const Ye = {
|
|
11159
|
-
Enter: Yn(dm, pm,
|
|
11160
|
-
"Mod-Enter":
|
|
11159
|
+
Enter: Yn(dm, pm, Yc, um),
|
|
11160
|
+
"Mod-Enter": Zc,
|
|
11161
11161
|
Backspace: $o,
|
|
11162
11162
|
"Mod-Backspace": $o,
|
|
11163
11163
|
"Shift-Backspace": $o,
|
|
11164
11164
|
Delete: Sl,
|
|
11165
11165
|
"Mod-Delete": Sl,
|
|
11166
|
-
"Mod-a":
|
|
11167
|
-
},
|
|
11166
|
+
"Mod-a": Qc
|
|
11167
|
+
}, nd = {
|
|
11168
11168
|
"Ctrl-h": Ye.Backspace,
|
|
11169
11169
|
"Alt-Backspace": Ye["Mod-Backspace"],
|
|
11170
11170
|
"Ctrl-d": Ye.Delete,
|
|
@@ -11175,8 +11175,8 @@ const Ye = {
|
|
|
11175
11175
|
"Ctrl-e": mm
|
|
11176
11176
|
};
|
|
11177
11177
|
for (let n in Ye)
|
|
11178
|
-
|
|
11179
|
-
const bm = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform ? os.platform() == "darwin" : !1, vm = bm ?
|
|
11178
|
+
nd[n] = Ye[n];
|
|
11179
|
+
const bm = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform ? os.platform() == "darwin" : !1, vm = bm ? nd : Ye;
|
|
11180
11180
|
var Xs = 200, J = function() {
|
|
11181
11181
|
};
|
|
11182
11182
|
J.prototype.append = function(e) {
|
|
@@ -11206,9 +11206,9 @@ J.prototype.map = function(e, t, s) {
|
|
|
11206
11206
|
}, t, s), o;
|
|
11207
11207
|
};
|
|
11208
11208
|
J.from = function(e) {
|
|
11209
|
-
return e instanceof J ? e : e && e.length ? new
|
|
11209
|
+
return e instanceof J ? e : e && e.length ? new sd(e) : J.empty;
|
|
11210
11210
|
};
|
|
11211
|
-
var
|
|
11211
|
+
var sd = /* @__PURE__ */ function(n) {
|
|
11212
11212
|
function e(s) {
|
|
11213
11213
|
n.call(this), this.values = s;
|
|
11214
11214
|
}
|
|
@@ -11240,7 +11240,7 @@ var od = /* @__PURE__ */ function(n) {
|
|
|
11240
11240
|
return 0;
|
|
11241
11241
|
}, Object.defineProperties(e.prototype, t), e;
|
|
11242
11242
|
}(J);
|
|
11243
|
-
J.empty = new
|
|
11243
|
+
J.empty = new sd([]);
|
|
11244
11244
|
var Sm = /* @__PURE__ */ function(n) {
|
|
11245
11245
|
function e(t, s) {
|
|
11246
11246
|
n.call(this), this.left = t, this.right = s, this.length = t.length + s.length, this.depth = Math.max(t.depth, s.depth) + 1;
|
|
@@ -11275,7 +11275,7 @@ var Sm = /* @__PURE__ */ function(n) {
|
|
|
11275
11275
|
}, e;
|
|
11276
11276
|
}(J);
|
|
11277
11277
|
const xm = 500;
|
|
11278
|
-
class
|
|
11278
|
+
class Oe {
|
|
11279
11279
|
constructor(e, t) {
|
|
11280
11280
|
this.items = e, this.eventCount = t;
|
|
11281
11281
|
}
|
|
@@ -11299,24 +11299,24 @@ class Ie {
|
|
|
11299
11299
|
return;
|
|
11300
11300
|
}
|
|
11301
11301
|
if (o) {
|
|
11302
|
-
d.push(new
|
|
11302
|
+
d.push(new Ve(p.map));
|
|
11303
11303
|
let h = p.step.map(o.slice(i)), f;
|
|
11304
|
-
h && r.maybeStep(h).doc && (f = r.mapping.maps[r.mapping.maps.length - 1], c.push(new
|
|
11304
|
+
h && r.maybeStep(h).doc && (f = r.mapping.maps[r.mapping.maps.length - 1], c.push(new Ve(f, void 0, void 0, c.length + d.length))), i--, f && o.appendMap(f, i);
|
|
11305
11305
|
} else
|
|
11306
11306
|
r.maybeStep(p.step);
|
|
11307
11307
|
if (p.selection)
|
|
11308
|
-
return l = o ? p.selection.map(o.slice(i)) : p.selection, a = new
|
|
11308
|
+
return l = o ? p.selection.map(o.slice(i)) : p.selection, a = new Oe(this.items.slice(0, s).append(d.reverse().concat(c)), this.eventCount - 1), !1;
|
|
11309
11309
|
}, this.items.length, 0), { remaining: a, transform: r, selection: l };
|
|
11310
11310
|
}
|
|
11311
11311
|
// Create a new branch with the given transform added.
|
|
11312
11312
|
addTransform(e, t, s, o) {
|
|
11313
11313
|
let i = [], r = this.eventCount, l = this.items, a = !o && l.length ? l.get(l.length - 1) : null;
|
|
11314
11314
|
for (let d = 0; d < e.steps.length; d++) {
|
|
11315
|
-
let p = e.steps[d].invert(e.docs[d]), u = new
|
|
11315
|
+
let p = e.steps[d].invert(e.docs[d]), u = new Ve(e.mapping.maps[d], p, t), h;
|
|
11316
11316
|
(h = a && a.merge(u)) && (u = h, d ? i.pop() : l = l.slice(0, l.length - 1)), i.push(u), t && (r++, t = void 0), o || (a = u);
|
|
11317
11317
|
}
|
|
11318
11318
|
let c = r - s.depth;
|
|
11319
|
-
return c > Cm && (l = wm(l, c), r -= c), new
|
|
11319
|
+
return c > Cm && (l = wm(l, c), r -= c), new Oe(l.append(i), r);
|
|
11320
11320
|
}
|
|
11321
11321
|
remapping(e, t) {
|
|
11322
11322
|
let s = new cn();
|
|
@@ -11326,7 +11326,7 @@ class Ie {
|
|
|
11326
11326
|
}, e, t), s;
|
|
11327
11327
|
}
|
|
11328
11328
|
addMaps(e) {
|
|
11329
|
-
return this.eventCount == 0 ? this : new
|
|
11329
|
+
return this.eventCount == 0 ? this : new Oe(this.items.append(e.map((t) => new Ve(t))), this.eventCount);
|
|
11330
11330
|
}
|
|
11331
11331
|
// When the collab module receives remote changes, the history has
|
|
11332
11332
|
// to know about those, so that it can adjust the steps that were
|
|
@@ -11348,14 +11348,14 @@ class Ie {
|
|
|
11348
11348
|
let f = i.maps[h];
|
|
11349
11349
|
if (u.step) {
|
|
11350
11350
|
let m = e.steps[h].invert(e.docs[h]), g = u.selection && u.selection.map(i.slice(a + 1, h));
|
|
11351
|
-
g && l++, s.push(new
|
|
11351
|
+
g && l++, s.push(new Ve(f, m, g));
|
|
11352
11352
|
} else
|
|
11353
|
-
s.push(new
|
|
11353
|
+
s.push(new Ve(f));
|
|
11354
11354
|
}, o);
|
|
11355
11355
|
let c = [];
|
|
11356
11356
|
for (let u = t; u < r; u++)
|
|
11357
|
-
c.push(new
|
|
11358
|
-
let d = this.items.slice(0, o).append(c).append(s), p = new
|
|
11357
|
+
c.push(new Ve(i.maps[u]));
|
|
11358
|
+
let d = this.items.slice(0, o).append(c).append(s), p = new Oe(d, l);
|
|
11359
11359
|
return p.emptyItemCount() > xm && (p = p.compress(this.items.length - s.length)), p;
|
|
11360
11360
|
}
|
|
11361
11361
|
emptyItemCount() {
|
|
@@ -11380,14 +11380,14 @@ class Ie {
|
|
|
11380
11380
|
if (s--, c && t.appendMap(c, s), a) {
|
|
11381
11381
|
let d = r.selection && r.selection.map(t.slice(s));
|
|
11382
11382
|
d && i++;
|
|
11383
|
-
let p = new
|
|
11383
|
+
let p = new Ve(c.invert(), a, d), u, h = o.length - 1;
|
|
11384
11384
|
(u = o.length && o[h].merge(p)) ? o[h] = u : o.push(p);
|
|
11385
11385
|
}
|
|
11386
11386
|
} else r.map && s--;
|
|
11387
|
-
}, this.items.length, 0), new
|
|
11387
|
+
}, this.items.length, 0), new Oe(J.from(o.reverse()), i);
|
|
11388
11388
|
}
|
|
11389
11389
|
}
|
|
11390
|
-
|
|
11390
|
+
Oe.empty = new Oe(J.empty, 0);
|
|
11391
11391
|
function wm(n, e) {
|
|
11392
11392
|
let t;
|
|
11393
11393
|
return n.forEach((s, o) => {
|
|
@@ -11395,7 +11395,7 @@ function wm(n, e) {
|
|
|
11395
11395
|
return t = o, !1;
|
|
11396
11396
|
}), n.slice(t);
|
|
11397
11397
|
}
|
|
11398
|
-
class
|
|
11398
|
+
class Ve {
|
|
11399
11399
|
constructor(e, t, s, o) {
|
|
11400
11400
|
this.map = e, this.step = t, this.selection = s, this.mirrorOffset = o;
|
|
11401
11401
|
}
|
|
@@ -11403,7 +11403,7 @@ class $e {
|
|
|
11403
11403
|
if (this.step && e.step && !e.selection) {
|
|
11404
11404
|
let t = e.step.merge(this.step);
|
|
11405
11405
|
if (t)
|
|
11406
|
-
return new
|
|
11406
|
+
return new Ve(t.getMap().invert(), t, this.selection);
|
|
11407
11407
|
}
|
|
11408
11408
|
}
|
|
11409
11409
|
}
|
|
@@ -11425,7 +11425,7 @@ function km(n, e, t, s) {
|
|
|
11425
11425
|
return r.getMeta(Dt).redo ? new ot(n.done.addTransform(t, void 0, s, Ds(e)), n.undone, xl(t.mapping.maps), n.prevTime, n.prevComposition) : new ot(n.done, n.undone.addTransform(t, void 0, s, Ds(e)), null, n.prevTime, n.prevComposition);
|
|
11426
11426
|
if (t.getMeta("addToHistory") !== !1 && !(r && r.getMeta("addToHistory") === !1)) {
|
|
11427
11427
|
let l = t.getMeta("composition"), a = n.prevTime == 0 || !r && n.prevComposition != l && (n.prevTime < (t.time || 0) - s.newGroupDelay || !Em(t, n.prevRanges)), c = r ? zo(n.prevRanges, t.mapping) : xl(t.mapping.maps);
|
|
11428
|
-
return new ot(n.done.addTransform(t, a ? e.selection.getBookmark() : void 0, s, Ds(e)),
|
|
11428
|
+
return new ot(n.done.addTransform(t, a ? e.selection.getBookmark() : void 0, s, Ds(e)), Oe.empty, c, t.time, l ?? n.prevComposition);
|
|
11429
11429
|
} else return (i = t.getMeta("rebased")) ? new ot(n.done.rebased(t, i), n.undone.rebased(t, i), zo(n.prevRanges, t.mapping), n.prevTime, n.prevComposition) : new ot(n.done.addMaps(t.mapping.maps), n.undone.addMaps(t.mapping.maps), zo(n.prevRanges, t.mapping), n.prevTime, n.prevComposition);
|
|
11430
11430
|
}
|
|
11431
11431
|
function Em(n, e) {
|
|
@@ -11484,7 +11484,7 @@ function Am(n = {}) {
|
|
|
11484
11484
|
key: Dt,
|
|
11485
11485
|
state: {
|
|
11486
11486
|
init() {
|
|
11487
|
-
return new ot(
|
|
11487
|
+
return new ot(Oe.empty, Oe.empty, null, 0, -1);
|
|
11488
11488
|
},
|
|
11489
11489
|
apply(e, t, s) {
|
|
11490
11490
|
return km(t, s, e, n);
|
|
@@ -11494,14 +11494,14 @@ function Am(n = {}) {
|
|
|
11494
11494
|
props: {
|
|
11495
11495
|
handleDOMEvents: {
|
|
11496
11496
|
beforeinput(e, t) {
|
|
11497
|
-
let s = t.inputType, o = s == "historyUndo" ?
|
|
11497
|
+
let s = t.inputType, o = s == "historyUndo" ? id : s == "historyRedo" ? Si : null;
|
|
11498
11498
|
return o ? (t.preventDefault(), o(e.state, e.dispatch)) : !1;
|
|
11499
11499
|
}
|
|
11500
11500
|
}
|
|
11501
11501
|
}
|
|
11502
11502
|
});
|
|
11503
11503
|
}
|
|
11504
|
-
function
|
|
11504
|
+
function od(n, e) {
|
|
11505
11505
|
return (t, s) => {
|
|
11506
11506
|
let o = Dt.getState(t);
|
|
11507
11507
|
if (!o || (n ? o.undone : o.done).eventCount == 0)
|
|
@@ -11513,7 +11513,7 @@ function id(n, e) {
|
|
|
11513
11513
|
return !0;
|
|
11514
11514
|
};
|
|
11515
11515
|
}
|
|
11516
|
-
const
|
|
11516
|
+
const id = od(!1, !0), Si = od(!0, !0);
|
|
11517
11517
|
var yt = {
|
|
11518
11518
|
8: "Backspace",
|
|
11519
11519
|
9: "Tab",
|
|
@@ -11598,11 +11598,11 @@ for (var X = 1; X <= 24; X++) yt[X + 111] = "F" + X;
|
|
|
11598
11598
|
for (var X = 65; X <= 90; X++)
|
|
11599
11599
|
yt[X] = String.fromCharCode(X + 32), Qs[X] = String.fromCharCode(X);
|
|
11600
11600
|
for (var Bo in yt) Qs.hasOwnProperty(Bo) || (Qs[Bo] = yt[Bo]);
|
|
11601
|
-
function
|
|
11601
|
+
function Om(n) {
|
|
11602
11602
|
var e = Pm && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || Nm && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ? Qs : yt)[n.keyCode] || n.key || "Unidentified";
|
|
11603
11603
|
return t == "Esc" && (t = "Escape"), t == "Del" && (t = "Delete"), t == "Left" && (t = "ArrowLeft"), t == "Up" && (t = "ArrowUp"), t == "Right" && (t = "ArrowRight"), t == "Down" && (t = "ArrowDown"), t;
|
|
11604
11604
|
}
|
|
11605
|
-
const
|
|
11605
|
+
const Im = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !1;
|
|
11606
11606
|
function Rm(n) {
|
|
11607
11607
|
let e = n.split(/-(?!$)/), t = e[e.length - 1];
|
|
11608
11608
|
t == "Space" && (t = " ");
|
|
@@ -11618,7 +11618,7 @@ function Rm(n) {
|
|
|
11618
11618
|
else if (/^s(hift)?$/i.test(a))
|
|
11619
11619
|
i = !0;
|
|
11620
11620
|
else if (/^mod$/i.test(a))
|
|
11621
|
-
|
|
11621
|
+
Im ? r = !0 : o = !0;
|
|
11622
11622
|
else
|
|
11623
11623
|
throw new Error("Unrecognized modifier name: " + a);
|
|
11624
11624
|
}
|
|
@@ -11634,12 +11634,12 @@ function Ho(n, e, t = !0) {
|
|
|
11634
11634
|
return e.altKey && (n = "Alt-" + n), e.ctrlKey && (n = "Ctrl-" + n), e.metaKey && (n = "Meta-" + n), t && e.shiftKey && (n = "Shift-" + n), n;
|
|
11635
11635
|
}
|
|
11636
11636
|
function Fo(n) {
|
|
11637
|
-
return new wn({ props: { handleKeyDown:
|
|
11637
|
+
return new wn({ props: { handleKeyDown: rd(n) } });
|
|
11638
11638
|
}
|
|
11639
|
-
function
|
|
11639
|
+
function rd(n) {
|
|
11640
11640
|
let e = Dm(n);
|
|
11641
11641
|
return function(t, s) {
|
|
11642
|
-
let o =
|
|
11642
|
+
let o = Om(s), i, r = e[Ho(o, s)];
|
|
11643
11643
|
if (r && r(t.state, t.dispatch, t))
|
|
11644
11644
|
return !0;
|
|
11645
11645
|
if (o.length == 1 && o != " ") {
|
|
@@ -11668,7 +11668,7 @@ function Cl(n, e = null) {
|
|
|
11668
11668
|
let d = t.doc.resolve(r.start - 2);
|
|
11669
11669
|
a = new Ks(d, d, r.depth), r.endIndex < r.parent.childCount && (r = new Ks(o, t.doc.resolve(i.end(r.depth)), r.depth)), l = !0;
|
|
11670
11670
|
}
|
|
11671
|
-
let c =
|
|
11671
|
+
let c = $c(a, n, e, r);
|
|
11672
11672
|
return c ? (s && s(Lm(t.tr, r, c, l, n).scrollIntoView()), !0) : !1;
|
|
11673
11673
|
};
|
|
11674
11674
|
}
|
|
@@ -11870,9 +11870,9 @@ function qm(n, e, t) {
|
|
|
11870
11870
|
return { node: s.startContainer, offset: Math.min(Ee(s.startContainer), s.startOffset) };
|
|
11871
11871
|
}
|
|
11872
11872
|
}
|
|
11873
|
-
const
|
|
11873
|
+
const We = typeof navigator < "u" ? navigator : null, El = typeof document < "u" ? document : null, bt = We && We.userAgent || "", Ci = /Edge\/(\d+)/.exec(bt), ld = /MSIE \d/.exec(bt), ki = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(bt), me = !!(ld || ki || Ci), ht = ld ? document.documentMode : ki ? +ki[1] : Ci ? +Ci[1] : 0, De = !me && /gecko\/(\d+)/i.test(bt);
|
|
11874
11874
|
De && +(/Firefox\/(\d+)/.exec(bt) || [0, 0])[1];
|
|
11875
|
-
const Ei = !me && /Chrome\/(\d+)/.exec(bt), se = !!Ei,
|
|
11875
|
+
const Ei = !me && /Chrome\/(\d+)/.exec(bt), se = !!Ei, ad = Ei ? +Ei[1] : 0, ae = !me && !!We && /Apple Computer/.test(We.vendor), bn = ae && (/Mobile\/\w+/.test(bt) || !!We && We.maxTouchPoints > 2), ke = bn || (We ? /Mac/.test(We.platform) : !1), Um = We ? /Win/.test(We.platform) : !1, Pe = /Android \d/.test(bt), ls = !!El && "webkitFontSmoothing" in El.documentElement.style, Km = ls ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
11876
11876
|
function Jm(n) {
|
|
11877
11877
|
let e = n.defaultView && n.defaultView.visualViewport;
|
|
11878
11878
|
return e ? {
|
|
@@ -11887,7 +11887,7 @@ function Jm(n) {
|
|
|
11887
11887
|
bottom: n.documentElement.clientHeight
|
|
11888
11888
|
};
|
|
11889
11889
|
}
|
|
11890
|
-
function
|
|
11890
|
+
function Ke(n, e) {
|
|
11891
11891
|
return typeof n == "number" ? n : n[e];
|
|
11892
11892
|
}
|
|
11893
11893
|
function Zm(n) {
|
|
@@ -11905,7 +11905,7 @@ function Tl(n, e, t) {
|
|
|
11905
11905
|
if (r.nodeType != 1)
|
|
11906
11906
|
continue;
|
|
11907
11907
|
let l = r, a = l == i.body, c = a ? Jm(i) : Zm(l), d = 0, p = 0;
|
|
11908
|
-
if (e.top < c.top +
|
|
11908
|
+
if (e.top < c.top + Ke(s, "top") ? p = -(c.top - e.top + Ke(o, "top")) : e.bottom > c.bottom - Ke(s, "bottom") && (p = e.bottom - e.top > c.bottom - c.top ? e.top + Ke(o, "top") - c.top : e.bottom - c.bottom + Ke(o, "bottom")), e.left < c.left + Ke(s, "left") ? d = -(c.left - e.left + Ke(o, "left")) : e.right > c.right - Ke(s, "right") && (d = e.right - c.right + Ke(o, "right")), d || p)
|
|
11909
11909
|
if (a)
|
|
11910
11910
|
i.defaultView.scrollBy(d, p);
|
|
11911
11911
|
else {
|
|
@@ -11930,9 +11930,9 @@ function Ym(n) {
|
|
|
11930
11930
|
break;
|
|
11931
11931
|
}
|
|
11932
11932
|
}
|
|
11933
|
-
return { refDOM: s, refTop: o, stack:
|
|
11933
|
+
return { refDOM: s, refTop: o, stack: cd(n.dom) };
|
|
11934
11934
|
}
|
|
11935
|
-
function
|
|
11935
|
+
function cd(n) {
|
|
11936
11936
|
let e = [], t = n.ownerDocument;
|
|
11937
11937
|
for (let s = n; s && (e.push({ dom: s, top: s.scrollTop, left: s.scrollLeft }), n != t); s = Xn(s))
|
|
11938
11938
|
;
|
|
@@ -11940,9 +11940,9 @@ function dd(n) {
|
|
|
11940
11940
|
}
|
|
11941
11941
|
function Xm({ refDOM: n, refTop: e, stack: t }) {
|
|
11942
11942
|
let s = n ? n.getBoundingClientRect().top : 0;
|
|
11943
|
-
|
|
11943
|
+
dd(t, s == 0 ? 0 : s - e);
|
|
11944
11944
|
}
|
|
11945
|
-
function
|
|
11945
|
+
function dd(n, e) {
|
|
11946
11946
|
for (let t = 0; t < n.length; t++) {
|
|
11947
11947
|
let { dom: s, top: o, left: i } = n[t];
|
|
11948
11948
|
s.scrollTop != o + e && (s.scrollTop = o + e), s.scrollLeft != i && (s.scrollLeft = i);
|
|
@@ -11954,14 +11954,14 @@ function Qm(n) {
|
|
|
11954
11954
|
return n.setActive();
|
|
11955
11955
|
if (Jt)
|
|
11956
11956
|
return n.focus(Jt);
|
|
11957
|
-
let e =
|
|
11957
|
+
let e = cd(n);
|
|
11958
11958
|
n.focus(Jt == null ? {
|
|
11959
11959
|
get preventScroll() {
|
|
11960
11960
|
return Jt = { preventScroll: !0 }, !0;
|
|
11961
11961
|
}
|
|
11962
|
-
} : void 0), Jt || (Jt = !1,
|
|
11962
|
+
} : void 0), Jt || (Jt = !1, dd(e, 0));
|
|
11963
11963
|
}
|
|
11964
|
-
function
|
|
11964
|
+
function pd(n, e) {
|
|
11965
11965
|
let t, s = 2e8, o, i = 0, r = e.top, l = e.top, a, c;
|
|
11966
11966
|
for (let d = n.firstChild, p = 0; d; d = d.nextSibling, p++) {
|
|
11967
11967
|
let u;
|
|
@@ -11987,7 +11987,7 @@ function ud(n, e) {
|
|
|
11987
11987
|
!t && (e.left >= f.right && e.top >= f.top || e.left >= f.left && e.top >= f.bottom) && (i = p + 1);
|
|
11988
11988
|
}
|
|
11989
11989
|
}
|
|
11990
|
-
return !t && a && (t = a, o = c, s = 0), t && t.nodeType == 3 ? eg(t, o) : !t || s && t.nodeType == 1 ? { node: n, offset: i } :
|
|
11990
|
+
return !t && a && (t = a, o = c, s = 0), t && t.nodeType == 3 ? eg(t, o) : !t || s && t.nodeType == 1 ? { node: n, offset: i } : pd(t, o);
|
|
11991
11991
|
}
|
|
11992
11992
|
function eg(n, e) {
|
|
11993
11993
|
let t = n.nodeValue.length, s = document.createRange();
|
|
@@ -12007,7 +12007,7 @@ function tg(n, e) {
|
|
|
12007
12007
|
return t && /^li$/i.test(t.nodeName) && e.left < n.getBoundingClientRect().left ? t : n;
|
|
12008
12008
|
}
|
|
12009
12009
|
function ng(n, e, t) {
|
|
12010
|
-
let { node: s, offset: o } =
|
|
12010
|
+
let { node: s, offset: o } = pd(e, t), i = -1;
|
|
12011
12011
|
if (s.nodeType == 1 && !s.firstChild) {
|
|
12012
12012
|
let r = s.getBoundingClientRect();
|
|
12013
12013
|
i = r.left != r.right && t.left > (r.left + r.right) / 2 ? 1 : -1;
|
|
@@ -12029,7 +12029,7 @@ function sg(n, e, t, s) {
|
|
|
12029
12029
|
}
|
|
12030
12030
|
return o > -1 ? o : n.docView.posFromDOM(e, t, -1);
|
|
12031
12031
|
}
|
|
12032
|
-
function
|
|
12032
|
+
function ud(n, e, t) {
|
|
12033
12033
|
let s = n.childNodes.length;
|
|
12034
12034
|
if (s && t.top < t.bottom)
|
|
12035
12035
|
for (let o = Math.max(0, Math.min(s - 1, Math.floor(s * (e.top - t.top) / (t.bottom - t.top)) - 2)), i = o; ; ) {
|
|
@@ -12039,7 +12039,7 @@ function hd(n, e, t) {
|
|
|
12039
12039
|
for (let a = 0; a < l.length; a++) {
|
|
12040
12040
|
let c = l[a];
|
|
12041
12041
|
if (ir(e, c))
|
|
12042
|
-
return
|
|
12042
|
+
return ud(r, e, c);
|
|
12043
12043
|
}
|
|
12044
12044
|
}
|
|
12045
12045
|
if ((i = (i + 1) % s) == o)
|
|
@@ -12053,7 +12053,7 @@ function og(n, e) {
|
|
|
12053
12053
|
let r = (n.root.elementFromPoint ? n.root : t).elementFromPoint(e.left, e.top), l;
|
|
12054
12054
|
if (!r || !n.dom.contains(r.nodeType != 1 ? r.parentNode : r)) {
|
|
12055
12055
|
let c = n.dom.getBoundingClientRect();
|
|
12056
|
-
if (!ir(e, c) || (r =
|
|
12056
|
+
if (!ir(e, c) || (r = ud(n.dom, e, c), !r))
|
|
12057
12057
|
return null;
|
|
12058
12058
|
}
|
|
12059
12059
|
if (ae)
|
|
@@ -12084,7 +12084,7 @@ function st(n, e) {
|
|
|
12084
12084
|
return Array.prototype.find.call(t, Ml) || n.getBoundingClientRect();
|
|
12085
12085
|
}
|
|
12086
12086
|
const ig = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
|
|
12087
|
-
function
|
|
12087
|
+
function hd(n, e, t) {
|
|
12088
12088
|
let { node: s, offset: o, atom: i } = n.docView.domFromPos(e, t < 0 ? -1 : 1), r = ls || De;
|
|
12089
12089
|
if (s.nodeType == 3)
|
|
12090
12090
|
if (r && (ig.test(s.nodeValue) || (t < 0 ? !o : o == s.nodeValue.length))) {
|
|
@@ -12142,7 +12142,7 @@ function _o(n, e) {
|
|
|
12142
12142
|
let t = e ? n.top : n.bottom;
|
|
12143
12143
|
return { top: t, bottom: t, left: n.left, right: n.right };
|
|
12144
12144
|
}
|
|
12145
|
-
function
|
|
12145
|
+
function fd(n, e, t) {
|
|
12146
12146
|
let s = n.state, o = n.root.activeElement;
|
|
12147
12147
|
s != e && n.updateState(e), o != n.dom && n.focus();
|
|
12148
12148
|
try {
|
|
@@ -12153,7 +12153,7 @@ function md(n, e, t) {
|
|
|
12153
12153
|
}
|
|
12154
12154
|
function rg(n, e, t) {
|
|
12155
12155
|
let s = e.selection, o = t == "up" ? s.$from : s.$to;
|
|
12156
|
-
return
|
|
12156
|
+
return fd(n, e, () => {
|
|
12157
12157
|
let { node: i } = n.docView.domFromPos(o.pos, t == "up" ? -1 : 1);
|
|
12158
12158
|
for (; ; ) {
|
|
12159
12159
|
let l = n.docView.nearestDesc(i, !0);
|
|
@@ -12165,7 +12165,7 @@ function rg(n, e, t) {
|
|
|
12165
12165
|
}
|
|
12166
12166
|
i = l.dom.parentNode;
|
|
12167
12167
|
}
|
|
12168
|
-
let r =
|
|
12168
|
+
let r = hd(n, o.pos, 1);
|
|
12169
12169
|
for (let l = i.firstChild; l; l = l.nextSibling) {
|
|
12170
12170
|
let a;
|
|
12171
12171
|
if (l.nodeType == 1)
|
|
@@ -12189,7 +12189,7 @@ function ag(n, e, t) {
|
|
|
12189
12189
|
if (!s.parent.isTextblock)
|
|
12190
12190
|
return !1;
|
|
12191
12191
|
let o = s.parentOffset, i = !o, r = o == s.parent.content.size, l = n.domSelection();
|
|
12192
|
-
return l ? !lg.test(s.parent.textContent) || !l.modify ? t == "left" || t == "backward" ? i : r :
|
|
12192
|
+
return l ? !lg.test(s.parent.textContent) || !l.modify ? t == "left" || t == "backward" ? i : r : fd(n, e, () => {
|
|
12193
12193
|
let { focusNode: a, focusOffset: c, anchorNode: d, anchorOffset: p } = n.domSelectionRange(), u = l.caretBidiLevel;
|
|
12194
12194
|
l.modify("move", t, "character");
|
|
12195
12195
|
let h = s.depth ? n.docView.domAfterPos(s.before()) : n.dom, { focusNode: f, focusOffset: m } = n.domSelectionRange(), g = f && !h.contains(f.nodeType == 1 ? f : f.parentNode) || a == f && c == m;
|
|
@@ -12204,7 +12204,7 @@ let Al = null, Pl = null, Nl = !1;
|
|
|
12204
12204
|
function cg(n, e, t) {
|
|
12205
12205
|
return Al == e && Pl == t ? Nl : (Al = e, Pl = t, Nl = t == "up" || t == "down" ? rg(n, e, t) : ag(n, e, t));
|
|
12206
12206
|
}
|
|
12207
|
-
const Te = 0,
|
|
12207
|
+
const Te = 0, Ol = 1, At = 2, je = 3;
|
|
12208
12208
|
class as {
|
|
12209
12209
|
constructor(e, t, s, o) {
|
|
12210
12210
|
this.parent = e, this.children = t, this.dom = s, this.contentDOM = o, this.dirty = Te, s.pmViewDesc = this;
|
|
@@ -12370,7 +12370,7 @@ class as {
|
|
|
12370
12370
|
let s = 0, o = 0;
|
|
12371
12371
|
for (let i = 0; s < this.children.length; s++) {
|
|
12372
12372
|
let r = this.children[s], l = i + r.size;
|
|
12373
|
-
if (l > e || r instanceof
|
|
12373
|
+
if (l > e || r instanceof gd) {
|
|
12374
12374
|
o = e - i;
|
|
12375
12375
|
break;
|
|
12376
12376
|
}
|
|
@@ -12378,7 +12378,7 @@ class as {
|
|
|
12378
12378
|
}
|
|
12379
12379
|
if (o)
|
|
12380
12380
|
return this.children[s].domFromPos(o - this.children[s].border, t);
|
|
12381
|
-
for (let i; s && !(i = this.children[s - 1]).size && i instanceof
|
|
12381
|
+
for (let i; s && !(i = this.children[s - 1]).size && i instanceof md && i.side >= 0; s--)
|
|
12382
12382
|
;
|
|
12383
12383
|
if (t <= 0) {
|
|
12384
12384
|
let i, r = !0;
|
|
@@ -12514,10 +12514,10 @@ class as {
|
|
|
12514
12514
|
if (s == r ? e <= r && t >= s : e < r && t > s) {
|
|
12515
12515
|
let l = s + i.border, a = r - i.border;
|
|
12516
12516
|
if (e >= l && t <= a) {
|
|
12517
|
-
this.dirty = e == s || t == r ? At :
|
|
12517
|
+
this.dirty = e == s || t == r ? At : Ol, e == l && t == a && (i.contentLost || i.dom.parentNode != this.contentDOM) ? i.dirty = je : i.markDirty(e - l, t - l);
|
|
12518
12518
|
return;
|
|
12519
12519
|
} else
|
|
12520
|
-
i.dirty = i.dom == i.contentDOM && i.dom.parentNode == this.contentDOM && !i.children.length ? At :
|
|
12520
|
+
i.dirty = i.dom == i.contentDOM && i.dom.parentNode == this.contentDOM && !i.children.length ? At : je;
|
|
12521
12521
|
}
|
|
12522
12522
|
s = r;
|
|
12523
12523
|
}
|
|
@@ -12526,7 +12526,7 @@ class as {
|
|
|
12526
12526
|
markParentsDirty() {
|
|
12527
12527
|
let e = 1;
|
|
12528
12528
|
for (let t = this.parent; t; t = t.parent, e++) {
|
|
12529
|
-
let s = e == 1 ? At :
|
|
12529
|
+
let s = e == 1 ? At : Ol;
|
|
12530
12530
|
t.dirty < s && (t.dirty = s);
|
|
12531
12531
|
}
|
|
12532
12532
|
}
|
|
@@ -12540,7 +12540,7 @@ class as {
|
|
|
12540
12540
|
return !1;
|
|
12541
12541
|
}
|
|
12542
12542
|
}
|
|
12543
|
-
class
|
|
12543
|
+
class md extends as {
|
|
12544
12544
|
constructor(e, t, s, o) {
|
|
12545
12545
|
let i, r = t.type.toDOM;
|
|
12546
12546
|
if (typeof r == "function" && (r = r(s, () => {
|
|
@@ -12606,10 +12606,10 @@ class Ft extends as {
|
|
|
12606
12606
|
return (!r || !r.dom) && (r = Wt.renderSpec(document, t.type.spec.toDOM(t, s), null, t.attrs)), new Ft(e, t, r.dom, r.contentDOM || r.dom, r);
|
|
12607
12607
|
}
|
|
12608
12608
|
parseRule() {
|
|
12609
|
-
return this.dirty &
|
|
12609
|
+
return this.dirty & je || this.mark.type.spec.reparseInView ? null : { mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM };
|
|
12610
12610
|
}
|
|
12611
12611
|
matchesMark(e) {
|
|
12612
|
-
return this.dirty !=
|
|
12612
|
+
return this.dirty != je && this.mark.eq(e);
|
|
12613
12613
|
}
|
|
12614
12614
|
markDirty(e, t) {
|
|
12615
12615
|
if (super.markDirty(e, t), this.dirty != Te) {
|
|
@@ -12661,7 +12661,7 @@ class ft extends as {
|
|
|
12661
12661
|
} else d || ({ dom: d, contentDOM: p } = Wt.renderSpec(document, t.type.spec.toDOM(t), null, t.attrs));
|
|
12662
12662
|
!p && !t.isText && d.nodeName != "BR" && (d.hasAttribute("contenteditable") || (d.contentEditable = "false"), t.type.spec.draggable && (d.draggable = !0));
|
|
12663
12663
|
let u = d;
|
|
12664
|
-
return d =
|
|
12664
|
+
return d = vd(d, s, t), c ? a = new pg(e, t, s, o, d, p || null, u, c, i, r + 1) : t.isText ? new vo(e, t, s, o, d, u, i) : new ft(e, t, s, o, d, p || null, u, i, r + 1);
|
|
12665
12665
|
}
|
|
12666
12666
|
parseRule() {
|
|
12667
12667
|
if (this.node.type.spec.reparseInView)
|
|
@@ -12704,7 +12704,7 @@ class ft extends as {
|
|
|
12704
12704
|
a.syncToMarks(c.marks, s, e);
|
|
12705
12705
|
let h;
|
|
12706
12706
|
a.findNodeMatch(c, d, p, u) || l && e.state.selection.from > o && e.state.selection.to < o + c.nodeSize && (h = a.findIndexWithChild(i.node)) > -1 && a.updateNodeAt(c, d, p, h, e) || a.updateNextNode(c, d, p, e, u, o) || a.addNode(c, d, p, e, o), o += c.nodeSize;
|
|
12707
|
-
}), a.syncToMarks([], s, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == At) && (r && this.protectLocalComposition(e, r),
|
|
12707
|
+
}), a.syncToMarks([], s, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == At) && (r && this.protectLocalComposition(e, r), yd(this.contentDOM, this.children, e), bn && yg(this.dom));
|
|
12708
12708
|
}
|
|
12709
12709
|
localCompositionInfo(e, t) {
|
|
12710
12710
|
let { from: s, to: o } = e.state.selection;
|
|
@@ -12736,7 +12736,7 @@ class ft extends as {
|
|
|
12736
12736
|
// If this desc must be updated to match the given node decoration,
|
|
12737
12737
|
// do so and return true.
|
|
12738
12738
|
update(e, t, s, o) {
|
|
12739
|
-
return this.dirty ==
|
|
12739
|
+
return this.dirty == je || !e.sameMarkup(this.node) ? !1 : (this.updateInner(e, t, s, o), !0);
|
|
12740
12740
|
}
|
|
12741
12741
|
updateInner(e, t, s, o) {
|
|
12742
12742
|
this.updateOuterDeco(t), this.node = e, this.innerDeco = s, this.contentDOM && this.updateChildren(o, this.posAtStart), this.dirty = Te;
|
|
@@ -12745,7 +12745,7 @@ class ft extends as {
|
|
|
12745
12745
|
if (eo(e, this.outerDeco))
|
|
12746
12746
|
return;
|
|
12747
12747
|
let t = this.nodeDOM.nodeType != 1, s = this.dom;
|
|
12748
|
-
this.dom =
|
|
12748
|
+
this.dom = bd(this.dom, this.nodeDOM, Ti(this.outerDeco, this.node, t), Ti(e, this.node, t)), this.dom != s && (s.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
|
|
12749
12749
|
}
|
|
12750
12750
|
// Mark this node as being the selected node.
|
|
12751
12751
|
selectNode() {
|
|
@@ -12759,8 +12759,8 @@ class ft extends as {
|
|
|
12759
12759
|
return this.node.isAtom;
|
|
12760
12760
|
}
|
|
12761
12761
|
}
|
|
12762
|
-
function
|
|
12763
|
-
|
|
12762
|
+
function Il(n, e, t, s, o) {
|
|
12763
|
+
vd(s, e, n);
|
|
12764
12764
|
let i = new ft(void 0, n, e, t, s, s, s, o, 0);
|
|
12765
12765
|
return i.contentDOM && i.updateChildren(o, 0), i;
|
|
12766
12766
|
}
|
|
@@ -12775,7 +12775,7 @@ class vo extends ft {
|
|
|
12775
12775
|
return { skip: e || !0 };
|
|
12776
12776
|
}
|
|
12777
12777
|
update(e, t, s, o) {
|
|
12778
|
-
return this.dirty ==
|
|
12778
|
+
return this.dirty == je || this.dirty != Te && !this.inParent() || !e.sameMarkup(this.node) ? !1 : (this.updateOuterDeco(t), (this.dirty != Te || e.text != this.node.text) && e.text != this.nodeDOM.nodeValue && (this.nodeDOM.nodeValue = e.text, o.trackWrites == this.nodeDOM && (o.trackWrites = null)), this.node = e, this.dirty = Te, !0);
|
|
12779
12779
|
}
|
|
12780
12780
|
inParent() {
|
|
12781
12781
|
let e = this.parent.contentDOM;
|
|
@@ -12798,7 +12798,7 @@ class vo extends ft {
|
|
|
12798
12798
|
return new vo(this.parent, o, this.outerDeco, this.innerDeco, i, i, s);
|
|
12799
12799
|
}
|
|
12800
12800
|
markDirty(e, t) {
|
|
12801
|
-
super.markDirty(e, t), this.dom != this.nodeDOM && (e == 0 || t == this.nodeDOM.nodeValue.length) && (this.dirty =
|
|
12801
|
+
super.markDirty(e, t), this.dom != this.nodeDOM && (e == 0 || t == this.nodeDOM.nodeValue.length) && (this.dirty = je);
|
|
12802
12802
|
}
|
|
12803
12803
|
get domAtom() {
|
|
12804
12804
|
return !1;
|
|
@@ -12807,7 +12807,7 @@ class vo extends ft {
|
|
|
12807
12807
|
return this.node.text == e;
|
|
12808
12808
|
}
|
|
12809
12809
|
}
|
|
12810
|
-
class
|
|
12810
|
+
class gd extends as {
|
|
12811
12811
|
parseRule() {
|
|
12812
12812
|
return { ignore: !0 };
|
|
12813
12813
|
}
|
|
@@ -12829,7 +12829,7 @@ class pg extends ft {
|
|
|
12829
12829
|
// through. If it does, and there's a `contentDOM` node, our logic
|
|
12830
12830
|
// updates the children.
|
|
12831
12831
|
update(e, t, s, o) {
|
|
12832
|
-
if (this.dirty ==
|
|
12832
|
+
if (this.dirty == je)
|
|
12833
12833
|
return !1;
|
|
12834
12834
|
if (this.spec.update && (this.node.type == e.type || this.spec.multiType)) {
|
|
12835
12835
|
let i = this.spec.update(e, t, s);
|
|
@@ -12855,7 +12855,7 @@ class pg extends ft {
|
|
|
12855
12855
|
return this.spec.ignoreMutation ? this.spec.ignoreMutation(e) : super.ignoreMutation(e);
|
|
12856
12856
|
}
|
|
12857
12857
|
}
|
|
12858
|
-
function
|
|
12858
|
+
function yd(n, e, t) {
|
|
12859
12859
|
let s = n.firstChild, o = !1;
|
|
12860
12860
|
for (let i = 0; i < e.length; i++) {
|
|
12861
12861
|
let r = e[i], l = r.dom;
|
|
@@ -12867,7 +12867,7 @@ function bd(n, e, t) {
|
|
|
12867
12867
|
o = !0, n.insertBefore(l, s);
|
|
12868
12868
|
if (r instanceof Ft) {
|
|
12869
12869
|
let a = s ? s.previousSibling : n.lastChild;
|
|
12870
|
-
|
|
12870
|
+
yd(r.contentDOM, r.children, t), s = a ? a.nextSibling : n.firstChild;
|
|
12871
12871
|
}
|
|
12872
12872
|
}
|
|
12873
12873
|
for (; s; )
|
|
@@ -12895,7 +12895,7 @@ function Ti(n, e, t) {
|
|
|
12895
12895
|
}
|
|
12896
12896
|
return o;
|
|
12897
12897
|
}
|
|
12898
|
-
function
|
|
12898
|
+
function bd(n, e, t, s) {
|
|
12899
12899
|
if (t == Pt && s == Pt)
|
|
12900
12900
|
return e;
|
|
12901
12901
|
let o = e;
|
|
@@ -12931,8 +12931,8 @@ function ug(n, e, t) {
|
|
|
12931
12931
|
t.style && (n.style.cssText += t.style);
|
|
12932
12932
|
}
|
|
12933
12933
|
}
|
|
12934
|
-
function
|
|
12935
|
-
return
|
|
12934
|
+
function vd(n, e, t) {
|
|
12935
|
+
return bd(n, n, Pt, Ti(e, t, n.nodeType != 1));
|
|
12936
12936
|
}
|
|
12937
12937
|
function eo(n, e) {
|
|
12938
12938
|
if (n.length != e.length)
|
|
@@ -13008,7 +13008,7 @@ class hg {
|
|
|
13008
13008
|
}
|
|
13009
13009
|
updateNodeAt(e, t, s, o, i) {
|
|
13010
13010
|
let r = this.top.children[o];
|
|
13011
|
-
return r.dirty ==
|
|
13011
|
+
return r.dirty == je && r.dom == r.contentDOM && (r.dirty = At), r.update(e, t, s, i) ? (this.destroyBetween(this.index, o), this.index++, !0) : !1;
|
|
13012
13012
|
}
|
|
13013
13013
|
findIndexWithChild(e) {
|
|
13014
13014
|
for (; ; ) {
|
|
@@ -13036,7 +13036,7 @@ class hg {
|
|
|
13036
13036
|
let c = this.preMatch.matched.get(a);
|
|
13037
13037
|
if (c != null && c != i)
|
|
13038
13038
|
return !1;
|
|
13039
|
-
let d = a.dom, p, u = this.isLocked(d) && !(e.isText && a.node && a.node.isText && a.nodeDOM.nodeValue == e.text && a.dirty !=
|
|
13039
|
+
let d = a.dom, p, u = this.isLocked(d) && !(e.isText && a.node && a.node.isText && a.nodeDOM.nodeValue == e.text && a.dirty != je && eo(t, a.outerDeco));
|
|
13040
13040
|
if (!u && a.update(e, t, s, o))
|
|
13041
13041
|
return this.destroyBetween(this.index, l), a.dom != d && (this.changed = !0), this.index++, !0;
|
|
13042
13042
|
if (!u && (p = this.recreateWrapper(a, e, t, s, o, r)))
|
|
@@ -13069,7 +13069,7 @@ class hg {
|
|
|
13069
13069
|
if (o && o.matchesWidget(e) && (e == o.widget || !o.widget.type.toDOM.parentNode))
|
|
13070
13070
|
this.index++;
|
|
13071
13071
|
else {
|
|
13072
|
-
let i = new
|
|
13072
|
+
let i = new md(this.top, e, t, s);
|
|
13073
13073
|
this.top.children.splice(this.index++, 0, i), this.changed = !0;
|
|
13074
13074
|
}
|
|
13075
13075
|
}
|
|
@@ -13088,7 +13088,7 @@ class hg {
|
|
|
13088
13088
|
else {
|
|
13089
13089
|
let s = document.createElement(e);
|
|
13090
13090
|
e == "IMG" && (s.className = "ProseMirror-separator", s.alt = ""), e == "BR" && (s.className = "ProseMirror-trailingBreak");
|
|
13091
|
-
let o = new
|
|
13091
|
+
let o = new gd(this.top, [], s, null);
|
|
13092
13092
|
t != this.top ? t.children.push(o) : t.children.splice(this.index++, 0, o), this.changed = !0;
|
|
13093
13093
|
}
|
|
13094
13094
|
}
|
|
@@ -13250,12 +13250,12 @@ function rr(n, e = null) {
|
|
|
13250
13250
|
}
|
|
13251
13251
|
return c;
|
|
13252
13252
|
}
|
|
13253
|
-
function
|
|
13254
|
-
return n.editable ? n.hasFocus() :
|
|
13253
|
+
function Sd(n) {
|
|
13254
|
+
return n.editable ? n.hasFocus() : wd(n) && document.activeElement && document.activeElement.contains(n.dom);
|
|
13255
13255
|
}
|
|
13256
13256
|
function et(n, e = !1) {
|
|
13257
13257
|
let t = n.state.selection;
|
|
13258
|
-
if (
|
|
13258
|
+
if (xd(n, t), !!Sd(n)) {
|
|
13259
13259
|
if (!e && n.input.mouseDown && n.input.mouseDown.allowDefault && se) {
|
|
13260
13260
|
let s = n.domSelectionRange(), o = n.domObserver.currentSelection;
|
|
13261
13261
|
if (s.anchorNode && o.anchorNode && Ht(s.anchorNode, s.anchorOffset, o.anchorNode, o.anchorOffset)) {
|
|
@@ -13272,7 +13272,7 @@ function et(n, e = !1) {
|
|
|
13272
13272
|
n.domObserver.setCurSelection(), n.domObserver.connectSelection();
|
|
13273
13273
|
}
|
|
13274
13274
|
}
|
|
13275
|
-
const Dl = ae || se &&
|
|
13275
|
+
const Dl = ae || se && ad < 63;
|
|
13276
13276
|
function Ll(n, e) {
|
|
13277
13277
|
let { node: t, offset: s } = n.docView.domFromPos(e, 0), o = s < t.childNodes.length ? t.childNodes[s] : null, i = s ? t.childNodes[s - 1] : null;
|
|
13278
13278
|
if (ae && o && o.contentEditable == "false")
|
|
@@ -13296,7 +13296,7 @@ function vg(n) {
|
|
|
13296
13296
|
let t = n.domSelectionRange(), s = t.anchorNode, o = t.anchorOffset;
|
|
13297
13297
|
e.addEventListener("selectionchange", n.input.hideSelectionGuard = () => {
|
|
13298
13298
|
(t.anchorNode != s || t.anchorOffset != o) && (e.removeEventListener("selectionchange", n.input.hideSelectionGuard), setTimeout(() => {
|
|
13299
|
-
(!
|
|
13299
|
+
(!Sd(n) || n.state.selection.visible) && n.dom.classList.remove("ProseMirror-hideselection");
|
|
13300
13300
|
}, 20));
|
|
13301
13301
|
});
|
|
13302
13302
|
}
|
|
@@ -13307,7 +13307,7 @@ function Sg(n) {
|
|
|
13307
13307
|
let s = n.cursorWrapper.dom, o = s.nodeName == "IMG";
|
|
13308
13308
|
o ? t.setStart(s.parentNode, Q(s) + 1) : t.setStart(s, 0), t.collapse(!0), e.removeAllRanges(), e.addRange(t), !o && !n.state.selection.visible && me && ht <= 11 && (s.disabled = !0, s.disabled = !1);
|
|
13309
13309
|
}
|
|
13310
|
-
function
|
|
13310
|
+
function xd(n, e) {
|
|
13311
13311
|
if (e instanceof D) {
|
|
13312
13312
|
let t = n.docView.descAt(e.from);
|
|
13313
13313
|
t != n.lastSelectedViewDesc && (zl(n), t && t.selectNode(), n.lastSelectedViewDesc = t);
|
|
@@ -13321,9 +13321,9 @@ function lr(n, e, t, s) {
|
|
|
13321
13321
|
return n.someProp("createSelectionBetween", (o) => o(n, e, t)) || $.between(e, t, s);
|
|
13322
13322
|
}
|
|
13323
13323
|
function Vl(n) {
|
|
13324
|
-
return n.editable && !n.hasFocus() ? !1 :
|
|
13324
|
+
return n.editable && !n.hasFocus() ? !1 : wd(n);
|
|
13325
13325
|
}
|
|
13326
|
-
function
|
|
13326
|
+
function wd(n) {
|
|
13327
13327
|
let e = n.domSelectionRange();
|
|
13328
13328
|
if (!e.anchorNode)
|
|
13329
13329
|
return !1;
|
|
@@ -13403,7 +13403,7 @@ function wg(n) {
|
|
|
13403
13403
|
break;
|
|
13404
13404
|
}
|
|
13405
13405
|
} else {
|
|
13406
|
-
if (
|
|
13406
|
+
if (Cd(t))
|
|
13407
13407
|
break;
|
|
13408
13408
|
{
|
|
13409
13409
|
let l = t.previousSibling;
|
|
@@ -13435,7 +13435,7 @@ function Cg(n) {
|
|
|
13435
13435
|
else
|
|
13436
13436
|
break;
|
|
13437
13437
|
} else {
|
|
13438
|
-
if (
|
|
13438
|
+
if (Cd(t))
|
|
13439
13439
|
break;
|
|
13440
13440
|
{
|
|
13441
13441
|
let l = t.nextSibling;
|
|
@@ -13452,7 +13452,7 @@ function Cg(n) {
|
|
|
13452
13452
|
}
|
|
13453
13453
|
i && Pi(n, i, r);
|
|
13454
13454
|
}
|
|
13455
|
-
function
|
|
13455
|
+
function Cd(n) {
|
|
13456
13456
|
let e = n.pmViewDesc;
|
|
13457
13457
|
return e && e.node && e.node.isBlock;
|
|
13458
13458
|
}
|
|
@@ -13589,7 +13589,7 @@ function Ag(n, e) {
|
|
|
13589
13589
|
}
|
|
13590
13590
|
return !1;
|
|
13591
13591
|
}
|
|
13592
|
-
function
|
|
13592
|
+
function kd(n, e) {
|
|
13593
13593
|
n.someProp("transformCopied", (h) => {
|
|
13594
13594
|
e = h(e, n);
|
|
13595
13595
|
});
|
|
@@ -13599,10 +13599,10 @@ function Ed(n, e) {
|
|
|
13599
13599
|
let h = s.firstChild;
|
|
13600
13600
|
t.push(h.type.name, h.attrs != h.type.defaultAttrs ? h.attrs : null), s = h.content;
|
|
13601
13601
|
}
|
|
13602
|
-
let r = n.someProp("clipboardSerializer") || Wt.fromSchema(n.state.schema), l =
|
|
13602
|
+
let r = n.someProp("clipboardSerializer") || Wt.fromSchema(n.state.schema), l = Nd(), a = l.createElement("div");
|
|
13603
13603
|
a.appendChild(r.serializeFragment(s, { document: l }));
|
|
13604
13604
|
let c = a.firstChild, d, p = 0;
|
|
13605
|
-
for (; c && c.nodeType == 1 && (d =
|
|
13605
|
+
for (; c && c.nodeType == 1 && (d = Pd[c.nodeName.toLowerCase()]); ) {
|
|
13606
13606
|
for (let h = d.length - 1; h >= 0; h--) {
|
|
13607
13607
|
let f = l.createElement(d[h]);
|
|
13608
13608
|
for (; a.firstChild; )
|
|
@@ -13617,7 +13617,7 @@ function Ed(n, e) {
|
|
|
13617
13617
|
`);
|
|
13618
13618
|
return { dom: a, text: u, slice: e };
|
|
13619
13619
|
}
|
|
13620
|
-
function
|
|
13620
|
+
function Ed(n, e, t, s, o) {
|
|
13621
13621
|
let i = o.parent.type.spec.code, r, l;
|
|
13622
13622
|
if (!t && !e)
|
|
13623
13623
|
return null;
|
|
@@ -13641,7 +13641,7 @@ function Td(n, e, t, s, o) {
|
|
|
13641
13641
|
} else
|
|
13642
13642
|
n.someProp("transformPastedHTML", (p) => {
|
|
13643
13643
|
t = p(t, n);
|
|
13644
|
-
}), r =
|
|
13644
|
+
}), r = Ig(t), ls && Rg(r);
|
|
13645
13645
|
let c = r && r.querySelector("[data-pm-slice]"), d = c && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice") || "");
|
|
13646
13646
|
if (d && d[3])
|
|
13647
13647
|
for (let p = +d[3]; p > 0; p--) {
|
|
@@ -13684,11 +13684,11 @@ function Ng(n, e) {
|
|
|
13684
13684
|
let a = o.findWrapping(l.type), c;
|
|
13685
13685
|
if (!a)
|
|
13686
13686
|
return r = null;
|
|
13687
|
-
if (c = r.length && i.length &&
|
|
13687
|
+
if (c = r.length && i.length && Md(a, i, l, r[r.length - 1], 0))
|
|
13688
13688
|
r[r.length - 1] = c;
|
|
13689
13689
|
else {
|
|
13690
|
-
r.length && (r[r.length - 1] =
|
|
13691
|
-
let d =
|
|
13690
|
+
r.length && (r[r.length - 1] = Ad(r[r.length - 1], i.length));
|
|
13691
|
+
let d = Td(l, a);
|
|
13692
13692
|
r.push(d), o = o.matchType(d.type), i = a;
|
|
13693
13693
|
}
|
|
13694
13694
|
}), r)
|
|
@@ -13696,24 +13696,24 @@ function Ng(n, e) {
|
|
|
13696
13696
|
}
|
|
13697
13697
|
return n;
|
|
13698
13698
|
}
|
|
13699
|
-
function
|
|
13699
|
+
function Td(n, e, t = 0) {
|
|
13700
13700
|
for (let s = e.length - 1; s >= t; s--)
|
|
13701
13701
|
n = e[s].create(null, T.from(n));
|
|
13702
13702
|
return n;
|
|
13703
13703
|
}
|
|
13704
|
-
function
|
|
13704
|
+
function Md(n, e, t, s, o) {
|
|
13705
13705
|
if (o < n.length && o < e.length && n[o] == e[o]) {
|
|
13706
|
-
let i =
|
|
13706
|
+
let i = Md(n, e, t, s.lastChild, o + 1);
|
|
13707
13707
|
if (i)
|
|
13708
13708
|
return s.copy(s.content.replaceChild(s.childCount - 1, i));
|
|
13709
13709
|
if (s.contentMatchAt(s.childCount).matchType(o == n.length - 1 ? t.type : n[o + 1]))
|
|
13710
|
-
return s.copy(s.content.append(T.from(
|
|
13710
|
+
return s.copy(s.content.append(T.from(Td(t, n, o + 1))));
|
|
13711
13711
|
}
|
|
13712
13712
|
}
|
|
13713
|
-
function
|
|
13713
|
+
function Ad(n, e) {
|
|
13714
13714
|
if (e == 0)
|
|
13715
13715
|
return n;
|
|
13716
|
-
let t = n.content.replaceChild(n.childCount - 1,
|
|
13716
|
+
let t = n.content.replaceChild(n.childCount - 1, Ad(n.lastChild, e - 1)), s = n.contentMatchAt(n.childCount).fillBefore(T.empty, !0);
|
|
13717
13717
|
return n.copy(t.append(s));
|
|
13718
13718
|
}
|
|
13719
13719
|
function Ni(n, e, t, s, o, i) {
|
|
@@ -13723,7 +13723,7 @@ function Ni(n, e, t, s, o, i) {
|
|
|
13723
13723
|
function Wl(n, e, t) {
|
|
13724
13724
|
return e < n.openStart && (n = new A(Ni(n.content, -1, e, n.openStart, 0, n.openEnd), e, n.openEnd)), t < n.openEnd && (n = new A(Ni(n.content, 1, t, n.openEnd, 0, 0), n.openStart, t)), n;
|
|
13725
13725
|
}
|
|
13726
|
-
const
|
|
13726
|
+
const Pd = {
|
|
13727
13727
|
thead: ["table"],
|
|
13728
13728
|
tbody: ["table"],
|
|
13729
13729
|
tfoot: ["table"],
|
|
@@ -13735,19 +13735,19 @@ const Nd = {
|
|
|
13735
13735
|
th: ["table", "tbody", "tr"]
|
|
13736
13736
|
};
|
|
13737
13737
|
let jl = null;
|
|
13738
|
-
function
|
|
13738
|
+
function Nd() {
|
|
13739
13739
|
return jl || (jl = document.implementation.createHTMLDocument("title"));
|
|
13740
13740
|
}
|
|
13741
13741
|
let Wo = null;
|
|
13742
|
-
function
|
|
13742
|
+
function Og(n) {
|
|
13743
13743
|
let e = window.trustedTypes;
|
|
13744
13744
|
return e ? (Wo || (Wo = e.createPolicy("ProseMirrorClipboard", { createHTML: (t) => t })), Wo.createHTML(n)) : n;
|
|
13745
13745
|
}
|
|
13746
|
-
function
|
|
13746
|
+
function Ig(n) {
|
|
13747
13747
|
let e = /^(\s*<meta [^>]*>)*/.exec(n);
|
|
13748
13748
|
e && (n = n.slice(e[0].length));
|
|
13749
|
-
let t =
|
|
13750
|
-
if ((o = s &&
|
|
13749
|
+
let t = Nd().createElement("div"), s = /<([a-z][^>\s]+)/i.exec(n), o;
|
|
13750
|
+
if ((o = s && Pd[s[1].toLowerCase()]) && (n = o.map((i) => "<" + i + ">").join("") + n + o.map((i) => "</" + i + ">").reverse().join("")), t.innerHTML = Og(n), o)
|
|
13751
13751
|
for (let i = 0; i < o.length; i++)
|
|
13752
13752
|
t = t.querySelector(o[i]) || t;
|
|
13753
13753
|
return t;
|
|
@@ -13790,7 +13790,7 @@ function zg(n) {
|
|
|
13790
13790
|
Bg(n, s) && !ar(n, s) && (n.editable || !(s.type in de)) && t(n, s);
|
|
13791
13791
|
}, Lg[e] ? { passive: !0 } : void 0);
|
|
13792
13792
|
}
|
|
13793
|
-
ae && n.dom.addEventListener("input", () => null),
|
|
13793
|
+
ae && n.dom.addEventListener("input", () => null), Oi(n);
|
|
13794
13794
|
}
|
|
13795
13795
|
function pt(n, e) {
|
|
13796
13796
|
n.input.lastSelectionOrigin = e, n.input.lastSelectionTime = Date.now();
|
|
@@ -13801,7 +13801,7 @@ function Vg(n) {
|
|
|
13801
13801
|
n.dom.removeEventListener(e, n.input.eventHandlers[e]);
|
|
13802
13802
|
clearTimeout(n.input.composingTimeout), clearTimeout(n.input.lastIOSEnterFallbackTimeout);
|
|
13803
13803
|
}
|
|
13804
|
-
function
|
|
13804
|
+
function Oi(n) {
|
|
13805
13805
|
n.someProp("handleDOMEvents", (e) => {
|
|
13806
13806
|
for (let t in e)
|
|
13807
13807
|
n.input.eventHandlers[t] || n.dom.addEventListener(t, n.input.eventHandlers[t] = (s) => ar(n, s));
|
|
@@ -13828,7 +13828,7 @@ function Hg(n, e) {
|
|
|
13828
13828
|
}
|
|
13829
13829
|
de.keydown = (n, e) => {
|
|
13830
13830
|
let t = e;
|
|
13831
|
-
if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !
|
|
13831
|
+
if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !Id(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(Pe && se && t.keyCode == 13)))
|
|
13832
13832
|
if (t.keyCode != 229 && n.domObserver.forceFlush(), bn && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
|
|
13833
13833
|
let s = Date.now();
|
|
13834
13834
|
n.input.lastIOSEnter = s, n.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
@@ -13841,7 +13841,7 @@ de.keyup = (n, e) => {
|
|
|
13841
13841
|
};
|
|
13842
13842
|
de.keypress = (n, e) => {
|
|
13843
13843
|
let t = e;
|
|
13844
|
-
if (
|
|
13844
|
+
if (Id(n, t) || !t.charCode || t.ctrlKey && !t.altKey || ke && t.metaKey)
|
|
13845
13845
|
return;
|
|
13846
13846
|
if (n.someProp("handleKeyPress", (o) => o(n, t))) {
|
|
13847
13847
|
t.preventDefault();
|
|
@@ -13988,7 +13988,7 @@ ce.touchmove = (n) => {
|
|
|
13988
13988
|
n.input.lastTouch = Date.now(), pt(n, "pointer");
|
|
13989
13989
|
};
|
|
13990
13990
|
ce.contextmenu = (n) => dr(n);
|
|
13991
|
-
function
|
|
13991
|
+
function Id(n, e) {
|
|
13992
13992
|
return n.composing ? !0 : ae && Math.abs(e.timeStamp - n.input.compositionEndedAt) < 500 ? (n.input.compositionEndedAt = -2e8, !0) : !1;
|
|
13993
13993
|
}
|
|
13994
13994
|
const Jg = Pe ? 5e3 : -1;
|
|
@@ -14014,15 +14014,15 @@ de.compositionstart = de.compositionupdate = (n) => {
|
|
|
14014
14014
|
}
|
|
14015
14015
|
n.input.composing = !0;
|
|
14016
14016
|
}
|
|
14017
|
-
|
|
14017
|
+
Rd(n, Jg);
|
|
14018
14018
|
};
|
|
14019
14019
|
de.compositionend = (n, e) => {
|
|
14020
|
-
n.composing && (n.input.composing = !1, n.input.compositionEndedAt = e.timeStamp, n.input.compositionPendingChanges = n.domObserver.pendingRecords().length ? n.input.compositionID : 0, n.input.compositionNode = null, n.input.compositionPendingChanges && Promise.resolve().then(() => n.domObserver.flush()), n.input.compositionID++,
|
|
14020
|
+
n.composing && (n.input.composing = !1, n.input.compositionEndedAt = e.timeStamp, n.input.compositionPendingChanges = n.domObserver.pendingRecords().length ? n.input.compositionID : 0, n.input.compositionNode = null, n.input.compositionPendingChanges && Promise.resolve().then(() => n.domObserver.flush()), n.input.compositionID++, Rd(n, 20));
|
|
14021
14021
|
};
|
|
14022
|
-
function
|
|
14022
|
+
function Rd(n, e) {
|
|
14023
14023
|
clearTimeout(n.input.composingTimeout), e > -1 && (n.input.composingTimeout = setTimeout(() => no(n), e));
|
|
14024
14024
|
}
|
|
14025
|
-
function
|
|
14025
|
+
function Dd(n) {
|
|
14026
14026
|
for (n.composing && (n.input.composing = !1, n.input.compositionEndedAt = Yg()); n.input.compositionNodes.length > 0; )
|
|
14027
14027
|
n.input.compositionNodes.pop().markParentsDirty();
|
|
14028
14028
|
}
|
|
@@ -14051,7 +14051,7 @@ function Yg() {
|
|
|
14051
14051
|
}
|
|
14052
14052
|
function no(n, e = !1) {
|
|
14053
14053
|
if (!(Pe && n.domObserver.flushingSoon >= 0)) {
|
|
14054
|
-
if (n.domObserver.forceFlush(),
|
|
14054
|
+
if (n.domObserver.forceFlush(), Dd(n), e || n.docView && n.docView.dirty) {
|
|
14055
14055
|
let t = rr(n);
|
|
14056
14056
|
return t && !t.eq(n.state.selection) ? n.dispatch(n.state.tr.setSelection(t)) : (n.markCursor || e) && !n.state.selection.empty ? n.dispatch(n.state.tr.deleteSelection()) : n.updateState(n.state), !0;
|
|
14057
14057
|
}
|
|
@@ -14073,7 +14073,7 @@ ce.copy = de.cut = (n, e) => {
|
|
|
14073
14073
|
let t = e, s = n.state.selection, o = t.type == "cut";
|
|
14074
14074
|
if (s.empty)
|
|
14075
14075
|
return;
|
|
14076
|
-
let i = Qn ? null : t.clipboardData, r = s.content(), { dom: l, text: a } =
|
|
14076
|
+
let i = Qn ? null : t.clipboardData, r = s.content(), { dom: l, text: a } = kd(n, r);
|
|
14077
14077
|
i ? (t.preventDefault(), i.clearData(), i.setData("text/html", l.innerHTML), i.setData("text/plain", a)) : Xg(n, l), o && n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
|
|
14078
14078
|
};
|
|
14079
14079
|
function Qg(n) {
|
|
@@ -14090,7 +14090,7 @@ function e1(n, e) {
|
|
|
14090
14090
|
}, 50);
|
|
14091
14091
|
}
|
|
14092
14092
|
function es(n, e, t, s, o) {
|
|
14093
|
-
let i =
|
|
14093
|
+
let i = Ed(n, e, t, s, n.state.selection.$from);
|
|
14094
14094
|
if (n.someProp("handlePaste", (a) => a(n, o, i || A.empty)))
|
|
14095
14095
|
return !0;
|
|
14096
14096
|
if (!i)
|
|
@@ -14098,7 +14098,7 @@ function es(n, e, t, s, o) {
|
|
|
14098
14098
|
let r = Qg(i), l = r ? n.state.tr.replaceSelectionWith(r, s) : n.state.tr.replaceSelection(i);
|
|
14099
14099
|
return n.dispatch(l.scrollIntoView().setMeta("paste", !0).setMeta("uiEvent", "paste")), !0;
|
|
14100
14100
|
}
|
|
14101
|
-
function
|
|
14101
|
+
function Ld(n) {
|
|
14102
14102
|
let e = n.getData("text/plain") || n.getData("Text");
|
|
14103
14103
|
if (e)
|
|
14104
14104
|
return e;
|
|
@@ -14110,14 +14110,14 @@ de.paste = (n, e) => {
|
|
|
14110
14110
|
if (n.composing && !Pe)
|
|
14111
14111
|
return;
|
|
14112
14112
|
let s = Qn ? null : t.clipboardData, o = n.input.shiftKey && n.input.lastKeyCode != 45;
|
|
14113
|
-
s && es(n,
|
|
14113
|
+
s && es(n, Ld(s), s.getData("text/html"), o, t) ? t.preventDefault() : e1(n, t);
|
|
14114
14114
|
};
|
|
14115
|
-
class
|
|
14115
|
+
class $d {
|
|
14116
14116
|
constructor(e, t, s) {
|
|
14117
14117
|
this.slice = e, this.move = t, this.node = s;
|
|
14118
14118
|
}
|
|
14119
14119
|
}
|
|
14120
|
-
const
|
|
14120
|
+
const zd = ke ? "altKey" : "ctrlKey";
|
|
14121
14121
|
ce.dragstart = (n, e) => {
|
|
14122
14122
|
let t = e, s = n.input.mouseDown;
|
|
14123
14123
|
if (s && s.done(), !t.dataTransfer)
|
|
@@ -14131,8 +14131,8 @@ ce.dragstart = (n, e) => {
|
|
|
14131
14131
|
p && p.node.type.spec.draggable && p != n.docView && (r = D.create(n.state.doc, p.posBefore));
|
|
14132
14132
|
}
|
|
14133
14133
|
}
|
|
14134
|
-
let l = (r || n.state.selection).content(), { dom: a, text: c, slice: d } =
|
|
14135
|
-
(!t.dataTransfer.files.length || !se ||
|
|
14134
|
+
let l = (r || n.state.selection).content(), { dom: a, text: c, slice: d } = kd(n, l);
|
|
14135
|
+
(!t.dataTransfer.files.length || !se || ad > 120) && t.dataTransfer.clearData(), t.dataTransfer.setData(Qn ? "Text" : "text/html", a.innerHTML), t.dataTransfer.effectAllowed = "copyMove", Qn || t.dataTransfer.setData("text/plain", c), n.dragging = new $d(d, !t[zd], r);
|
|
14136
14136
|
};
|
|
14137
14137
|
ce.dragend = (n) => {
|
|
14138
14138
|
let e = n.dragging;
|
|
@@ -14151,8 +14151,8 @@ de.drop = (n, e) => {
|
|
|
14151
14151
|
let i = n.state.doc.resolve(o.pos), r = s && s.slice;
|
|
14152
14152
|
r ? n.someProp("transformPasted", (f) => {
|
|
14153
14153
|
r = f(r, n);
|
|
14154
|
-
}) : r =
|
|
14155
|
-
let l = !!(s && !t[
|
|
14154
|
+
}) : r = Ed(n, Ld(t.dataTransfer), Qn ? null : t.dataTransfer.getData("text/html"), !1, i);
|
|
14155
|
+
let l = !!(s && !t[zd]);
|
|
14156
14156
|
if (n.someProp("handleDrop", (f) => f(n, t, r || A.empty, l))) {
|
|
14157
14157
|
t.preventDefault();
|
|
14158
14158
|
return;
|
|
@@ -14413,13 +14413,13 @@ class j {
|
|
|
14413
14413
|
let o, i = 0;
|
|
14414
14414
|
e.forEach((l, a) => {
|
|
14415
14415
|
let c = a + s, d;
|
|
14416
|
-
if (d =
|
|
14416
|
+
if (d = Bd(t, l, c)) {
|
|
14417
14417
|
for (o || (o = this.children.slice()); i < o.length && o[i] < a; )
|
|
14418
14418
|
i += 3;
|
|
14419
14419
|
o[i] == a ? o[i + 2] = o[i + 2].addInner(l, d, c + 1) : o.splice(i, 0, a, a + l.nodeSize, oo(d, l, c + 1, Lt)), i += 3;
|
|
14420
14420
|
}
|
|
14421
14421
|
});
|
|
14422
|
-
let r =
|
|
14422
|
+
let r = Vd(i ? Hd(t) : t, -s);
|
|
14423
14423
|
for (let l = 0; l < r.length; l++)
|
|
14424
14424
|
r[l].type.valid(e, r[l]) || r.splice(l--, 1);
|
|
14425
14425
|
return new j(r.length ? this.local.concat(r).sort($t) : this.local, o || this.children);
|
|
@@ -14625,7 +14625,7 @@ function t1(n, e, t, s, o, i, r) {
|
|
|
14625
14625
|
}
|
|
14626
14626
|
return new j(e.sort($t), l);
|
|
14627
14627
|
}
|
|
14628
|
-
function
|
|
14628
|
+
function Vd(n, e) {
|
|
14629
14629
|
if (!e || !n.length)
|
|
14630
14630
|
return n;
|
|
14631
14631
|
let t = [];
|
|
@@ -14648,7 +14648,7 @@ function n1(n, e, t, s, o, i, r) {
|
|
|
14648
14648
|
n[a + 1] == -1 && l(n[a + 2], e[a] + i + 1);
|
|
14649
14649
|
return t;
|
|
14650
14650
|
}
|
|
14651
|
-
function
|
|
14651
|
+
function Bd(n, e, t) {
|
|
14652
14652
|
if (e.isLeaf)
|
|
14653
14653
|
return null;
|
|
14654
14654
|
let s = t + e.nodeSize, o = null;
|
|
@@ -14656,7 +14656,7 @@ function Hd(n, e, t) {
|
|
|
14656
14656
|
(r = n[i]) && r.from > t && r.to < s && ((o || (o = [])).push(r), n[i] = null);
|
|
14657
14657
|
return o;
|
|
14658
14658
|
}
|
|
14659
|
-
function
|
|
14659
|
+
function Hd(n) {
|
|
14660
14660
|
let e = [];
|
|
14661
14661
|
for (let t = 0; t < n.length; t++)
|
|
14662
14662
|
n[t] != null && e.push(n[t]);
|
|
@@ -14665,14 +14665,14 @@ function Fd(n) {
|
|
|
14665
14665
|
function oo(n, e, t, s) {
|
|
14666
14666
|
let o = [], i = !1;
|
|
14667
14667
|
e.forEach((l, a) => {
|
|
14668
|
-
let c =
|
|
14668
|
+
let c = Bd(n, l, a + t);
|
|
14669
14669
|
if (c) {
|
|
14670
14670
|
i = !0;
|
|
14671
14671
|
let d = oo(c, l, t + a + 1, s);
|
|
14672
14672
|
d != te && o.push(a, a + l.nodeSize, d);
|
|
14673
14673
|
}
|
|
14674
14674
|
});
|
|
14675
|
-
let r =
|
|
14675
|
+
let r = Vd(i ? Hd(n) : n, -t).sort($t);
|
|
14676
14676
|
for (let l = 0; l < r.length; l++)
|
|
14677
14677
|
r[l].type.valid(e, r[l]) || (s.onRemove && s.onRemove(r[l].spec), r.splice(l--, 1));
|
|
14678
14678
|
return r.length || o.length ? new j(r, o) : te;
|
|
@@ -15103,7 +15103,7 @@ class y1 {
|
|
|
15103
15103
|
added to the document.
|
|
15104
15104
|
*/
|
|
15105
15105
|
constructor(e, t) {
|
|
15106
|
-
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 $g(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(na), 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 = ea(this), Ql(this), this.nodeViews = ta(this), this.docView =
|
|
15106
|
+
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 $g(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(na), 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 = ea(this), Ql(this), this.nodeViews = ta(this), this.docView = Il(this.state.doc, Xl(this), jo(this), this.dom, this), this.domObserver = new r1(this, (s, o, i, r) => h1(this, s, o, i, r)), this.domObserver.start(), zg(this), this.updatePluginViews();
|
|
15107
15107
|
}
|
|
15108
15108
|
/**
|
|
15109
15109
|
Holds `true` when a
|
|
@@ -15131,7 +15131,7 @@ class y1 {
|
|
|
15131
15131
|
the DOM.
|
|
15132
15132
|
*/
|
|
15133
15133
|
update(e) {
|
|
15134
|
-
e.handleDOMEvents != this._props.handleDOMEvents &&
|
|
15134
|
+
e.handleDOMEvents != this._props.handleDOMEvents && Oi(this);
|
|
15135
15135
|
let t = this._props;
|
|
15136
15136
|
this._props = e, e.plugins && (e.plugins.forEach(na), this.directPlugins = e.plugins), this.updateStateInner(e.state, t);
|
|
15137
15137
|
}
|
|
@@ -15159,13 +15159,13 @@ class y1 {
|
|
|
15159
15159
|
updateStateInner(e, t) {
|
|
15160
15160
|
var s;
|
|
15161
15161
|
let o = this.state, i = !1, r = !1;
|
|
15162
|
-
e.storedMarks && this.composing && (
|
|
15162
|
+
e.storedMarks && this.composing && (Dd(this), r = !0), this.state = e;
|
|
15163
15163
|
let l = o.plugins != e.plugins || this._props.plugins != t.plugins;
|
|
15164
15164
|
if (l || this._props.plugins != t.plugins || this._props.nodeViews != t.nodeViews) {
|
|
15165
15165
|
let h = ta(this);
|
|
15166
15166
|
v1(h, this.nodeViews) && (this.nodeViews = h, i = !0);
|
|
15167
15167
|
}
|
|
15168
|
-
(l || t.handleDOMEvents != this._props.handleDOMEvents) &&
|
|
15168
|
+
(l || t.handleDOMEvents != this._props.handleDOMEvents) && Oi(this), this.editable = ea(this), Ql(this);
|
|
15169
15169
|
let a = jo(this), c = Xl(this), d = o.plugins != e.plugins && !o.doc.eq(e.doc) ? "reset" : e.scrollToSelection > o.scrollToSelection ? "to selection" : "preserve", p = i || !this.docView.matchesNode(e.doc, c, a);
|
|
15170
15170
|
(p || !e.selection.eq(o.selection)) && (r = !0);
|
|
15171
15171
|
let u = d == "preserve" && r && this.dom.style.overflowAnchor == null && Ym(this);
|
|
@@ -15174,9 +15174,9 @@ class y1 {
|
|
|
15174
15174
|
let h = p && (me || se) && !this.composing && !o.selection.empty && !e.selection.empty && b1(o.selection, e.selection);
|
|
15175
15175
|
if (p) {
|
|
15176
15176
|
let f = se ? this.trackWrites = this.domSelectionRange().focusNode : null;
|
|
15177
|
-
this.composing && (this.input.compositionNode = Zg(this)), (i || !this.docView.update(e.doc, c, a, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView =
|
|
15177
|
+
this.composing && (this.input.compositionNode = Zg(this)), (i || !this.docView.update(e.doc, c, a, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = Il(e.doc, c, a, this.dom, this)), f && !this.trackWrites && (h = !0);
|
|
15178
15178
|
}
|
|
15179
|
-
h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && xg(this)) ? et(this, h) : (
|
|
15179
|
+
h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && xg(this)) ? et(this, h) : (xd(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
|
|
15180
15180
|
}
|
|
15181
15181
|
this.updatePluginViews(o), !((s = this.dragging) === null || s === void 0) && s.node && !o.doc.eq(e.doc) && this.updateDraggedNode(this.dragging, o), d == "reset" ? this.dom.scrollTop = 0 : d == "to selection" ? this.scrollToSelection() : u && Xm(u);
|
|
15182
15182
|
}
|
|
@@ -15221,7 +15221,7 @@ class y1 {
|
|
|
15221
15221
|
let i = s.from + (this.state.doc.content.size - t.doc.content.size);
|
|
15222
15222
|
(i > 0 && this.state.doc.nodeAt(i)) == s.node && (o = i);
|
|
15223
15223
|
}
|
|
15224
|
-
this.dragging = new
|
|
15224
|
+
this.dragging = new $d(e.slice, e.move, o < 0 ? void 0 : D.create(this.state.doc, o));
|
|
15225
15225
|
}
|
|
15226
15226
|
someProp(e, t) {
|
|
15227
15227
|
let s = this._props && this._props[e], o;
|
|
@@ -15308,7 +15308,7 @@ class y1 {
|
|
|
15308
15308
|
otherwise the element after.
|
|
15309
15309
|
*/
|
|
15310
15310
|
coordsAtPos(e, t = 1) {
|
|
15311
|
-
return
|
|
15311
|
+
return hd(this, e, t);
|
|
15312
15312
|
}
|
|
15313
15313
|
/**
|
|
15314
15314
|
Find the DOM position that corresponds to the given document
|
|
@@ -15471,14 +15471,14 @@ function na(n) {
|
|
|
15471
15471
|
if (n.spec.state || n.spec.filterTransaction || n.spec.appendTransaction)
|
|
15472
15472
|
throw new RangeError("Plugins passed directly to the view must not have a state component");
|
|
15473
15473
|
}
|
|
15474
|
-
var
|
|
15474
|
+
var Ii, Ri;
|
|
15475
15475
|
if (typeof WeakMap < "u") {
|
|
15476
15476
|
let n = /* @__PURE__ */ new WeakMap();
|
|
15477
|
-
|
|
15477
|
+
Ii = (e) => n.get(e), Ri = (e, t) => (n.set(e, t), t);
|
|
15478
15478
|
} else {
|
|
15479
15479
|
const n = [];
|
|
15480
15480
|
let t = 0;
|
|
15481
|
-
|
|
15481
|
+
Ii = (s) => {
|
|
15482
15482
|
for (let o = 0; o < n.length; o += 2)
|
|
15483
15483
|
if (n[o] == s)
|
|
15484
15484
|
return n[o + 1];
|
|
@@ -15565,7 +15565,7 @@ var U = class {
|
|
|
15565
15565
|
}
|
|
15566
15566
|
// Find the table map for the given table node.
|
|
15567
15567
|
static get(n) {
|
|
15568
|
-
return
|
|
15568
|
+
return Ii(n) || Ri(n, S1(n));
|
|
15569
15569
|
}
|
|
15570
15570
|
};
|
|
15571
15571
|
function S1(n) {
|
|
@@ -15752,7 +15752,7 @@ function k1(n) {
|
|
|
15752
15752
|
}
|
|
15753
15753
|
};
|
|
15754
15754
|
}
|
|
15755
|
-
function
|
|
15755
|
+
function qe(n) {
|
|
15756
15756
|
let e = n.cached.tableNodeTypes;
|
|
15757
15757
|
if (!e) {
|
|
15758
15758
|
e = n.cached.tableNodeTypes = {};
|
|
@@ -15809,7 +15809,7 @@ function T1(n) {
|
|
|
15809
15809
|
function fr(n, e) {
|
|
15810
15810
|
return n.depth == e.depth && n.pos >= e.start(-1) && n.pos <= e.end(-1);
|
|
15811
15811
|
}
|
|
15812
|
-
function
|
|
15812
|
+
function Fd(n, e, t) {
|
|
15813
15813
|
const s = n.node(-1), o = U.get(s), i = n.start(-1), r = o.nextCell(n.pos - i, e, t);
|
|
15814
15814
|
return r == null ? null : n.node(0).resolve(i + r);
|
|
15815
15815
|
}
|
|
@@ -15833,7 +15833,7 @@ var Z = class Je extends L {
|
|
|
15833
15833
|
if (!p)
|
|
15834
15834
|
throw RangeError(`No cell with offset ${d} found`);
|
|
15835
15835
|
const u = i + d + 1;
|
|
15836
|
-
return new
|
|
15836
|
+
return new Wc(
|
|
15837
15837
|
l.resolve(u),
|
|
15838
15838
|
l.resolve(u + p.content.size)
|
|
15839
15839
|
);
|
|
@@ -15986,12 +15986,12 @@ var Z = class Je extends L {
|
|
|
15986
15986
|
};
|
|
15987
15987
|
Z.prototype.visible = !1;
|
|
15988
15988
|
L.jsonID("cell", Z);
|
|
15989
|
-
var M1 = class
|
|
15989
|
+
var M1 = class _d {
|
|
15990
15990
|
constructor(e, t) {
|
|
15991
15991
|
this.anchor = e, this.head = t;
|
|
15992
15992
|
}
|
|
15993
15993
|
map(e) {
|
|
15994
|
-
return new
|
|
15994
|
+
return new _d(e.map(this.anchor), e.map(this.head));
|
|
15995
15995
|
}
|
|
15996
15996
|
resolve(e) {
|
|
15997
15997
|
const t = e.resolve(this.anchor), s = e.resolve(this.head);
|
|
@@ -16036,7 +16036,7 @@ function N1({ $from: n, $to: e }) {
|
|
|
16036
16036
|
}
|
|
16037
16037
|
return t !== s && e.parentOffset === 0;
|
|
16038
16038
|
}
|
|
16039
|
-
function
|
|
16039
|
+
function O1(n, e, t) {
|
|
16040
16040
|
const s = (e || n).selection, o = (e || n).doc;
|
|
16041
16041
|
let i, r;
|
|
16042
16042
|
if (s instanceof D && (r = s.node.type.spec.tableRole)) {
|
|
@@ -16052,8 +16052,8 @@ function I1(n, e, t) {
|
|
|
16052
16052
|
} else s instanceof $ && P1(s) ? i = $.create(o, s.from) : s instanceof $ && N1(s) && (i = $.create(o, s.$from.start(), s.$from.end()));
|
|
16053
16053
|
return i && (e || (e = n.tr)).setSelection(i), e;
|
|
16054
16054
|
}
|
|
16055
|
-
var
|
|
16056
|
-
function
|
|
16055
|
+
var I1 = new is("fix-tables");
|
|
16056
|
+
function Gd(n, e, t, s) {
|
|
16057
16057
|
const o = n.childCount, i = e.childCount;
|
|
16058
16058
|
e:
|
|
16059
16059
|
for (let r = 0, l = 0; r < i; r++) {
|
|
@@ -16063,7 +16063,7 @@ function Wd(n, e, t, s) {
|
|
|
16063
16063
|
l = c + 1, t += a.nodeSize;
|
|
16064
16064
|
continue e;
|
|
16065
16065
|
}
|
|
16066
|
-
s(a, t), l < o && n.child(l).sameMarkup(a) ?
|
|
16066
|
+
s(a, t), l < o && n.child(l).sameMarkup(a) ? Gd(n.child(l), a, t + 1, s) : a.nodesBetween(0, a.content.size, s, t + 1), t += a.nodeSize;
|
|
16067
16067
|
}
|
|
16068
16068
|
}
|
|
16069
16069
|
function R1(n, e) {
|
|
@@ -16071,7 +16071,7 @@ function R1(n, e) {
|
|
|
16071
16071
|
const s = (o, i) => {
|
|
16072
16072
|
o.type.spec.tableRole == "table" && (t = D1(n, o, i, t));
|
|
16073
16073
|
};
|
|
16074
|
-
return e ? e.doc != n.doc &&
|
|
16074
|
+
return e ? e.doc != n.doc && Gd(e.doc, n.doc, 0, s) : n.doc.descendants(s), t;
|
|
16075
16075
|
}
|
|
16076
16076
|
function D1(n, e, t, s) {
|
|
16077
16077
|
const o = U.get(e);
|
|
@@ -16125,7 +16125,7 @@ function D1(n, e, t, s) {
|
|
|
16125
16125
|
d.firstChild && (h = d.firstChild.type.spec.tableRole);
|
|
16126
16126
|
const f = [];
|
|
16127
16127
|
for (let g = 0; g < u; g++) {
|
|
16128
|
-
const b =
|
|
16128
|
+
const b = qe(n.schema)[h].createAndFill();
|
|
16129
16129
|
b && f.push(b);
|
|
16130
16130
|
}
|
|
16131
16131
|
const m = (a == 0 || r == a - 1) && l == a ? c + 1 : p - 1;
|
|
@@ -16133,9 +16133,9 @@ function D1(n, e, t, s) {
|
|
|
16133
16133
|
}
|
|
16134
16134
|
c = p;
|
|
16135
16135
|
}
|
|
16136
|
-
return s.setMeta(
|
|
16136
|
+
return s.setMeta(I1, { fixTables: !0 });
|
|
16137
16137
|
}
|
|
16138
|
-
function
|
|
16138
|
+
function Wd(n) {
|
|
16139
16139
|
const e = n.selection, t = hr(n), s = t.node(-1), o = t.start(-1), i = U.get(s);
|
|
16140
16140
|
return { ...e instanceof Z ? i.rectBetween(
|
|
16141
16141
|
e.$anchorCell.pos - o,
|
|
@@ -16147,7 +16147,7 @@ function L1(n) {
|
|
|
16147
16147
|
if (!xo(e))
|
|
16148
16148
|
return !1;
|
|
16149
16149
|
if (t) {
|
|
16150
|
-
const s =
|
|
16150
|
+
const s = qe(e.schema), o = Wd(e), i = e.tr, r = o.map.cellsInRect(
|
|
16151
16151
|
n == "column" ? {
|
|
16152
16152
|
left: o.left,
|
|
16153
16153
|
top: 0,
|
|
@@ -16197,7 +16197,7 @@ function mr(n, e) {
|
|
|
16197
16197
|
if (!xo(t))
|
|
16198
16198
|
return !1;
|
|
16199
16199
|
if (s) {
|
|
16200
|
-
const o =
|
|
16200
|
+
const o = qe(t.schema), i = Wd(t), r = t.tr, l = ia("row", i, o), a = ia(
|
|
16201
16201
|
"column",
|
|
16202
16202
|
i,
|
|
16203
16203
|
o
|
|
@@ -16274,7 +16274,7 @@ function ks(n, e) {
|
|
|
16274
16274
|
if (!(t instanceof Z))
|
|
16275
16275
|
return !1;
|
|
16276
16276
|
if (e) {
|
|
16277
|
-
const s = n.tr, o =
|
|
16277
|
+
const s = n.tr, o = qe(n.schema).cell.createAndFill().content;
|
|
16278
16278
|
t.forEachCell((i, r) => {
|
|
16279
16279
|
i.content.eq(o) || s.replace(
|
|
16280
16280
|
s.mapping.map(r + 1),
|
|
@@ -16297,14 +16297,14 @@ function z1(n) {
|
|
|
16297
16297
|
let c = e.child(a).content;
|
|
16298
16298
|
const d = a ? 0 : Math.max(0, t - 1), p = a < e.childCount - 1 ? 0 : Math.max(0, s - 1);
|
|
16299
16299
|
(d || p) && (c = Li(
|
|
16300
|
-
|
|
16300
|
+
qe(r).row,
|
|
16301
16301
|
new A(c, d, p)
|
|
16302
16302
|
).content), l.push(c);
|
|
16303
16303
|
}
|
|
16304
16304
|
else if (i == "cell" || i == "header_cell")
|
|
16305
16305
|
l.push(
|
|
16306
16306
|
t || s ? Li(
|
|
16307
|
-
|
|
16307
|
+
qe(r).row,
|
|
16308
16308
|
new A(e, t, s)
|
|
16309
16309
|
).content : e
|
|
16310
16310
|
);
|
|
@@ -16327,7 +16327,7 @@ function V1(n, e) {
|
|
|
16327
16327
|
s = Math.max(s, t[o]);
|
|
16328
16328
|
for (let o = 0; o < t.length; o++)
|
|
16329
16329
|
if (o >= e.length && e.push(T.empty), t[o] < s) {
|
|
16330
|
-
const i =
|
|
16330
|
+
const i = qe(n).cell.createAndFill(), r = [];
|
|
16331
16331
|
for (let l = t[o]; l < s; l++)
|
|
16332
16332
|
r.push(i);
|
|
16333
16333
|
e[o] = e[o].append(T.from(r));
|
|
@@ -16336,7 +16336,7 @@ function V1(n, e) {
|
|
|
16336
16336
|
}
|
|
16337
16337
|
function Li(n, e) {
|
|
16338
16338
|
const t = n.createAndFill();
|
|
16339
|
-
return new
|
|
16339
|
+
return new Gc(t).replace(0, t.content.size, e).doc;
|
|
16340
16340
|
}
|
|
16341
16341
|
function B1({ width: n, height: e, rows: t }, s, o) {
|
|
16342
16342
|
if (n != s) {
|
|
@@ -16381,7 +16381,7 @@ function B1({ width: n, height: e, rows: t }, s, o) {
|
|
|
16381
16381
|
return { width: n, height: e, rows: t };
|
|
16382
16382
|
}
|
|
16383
16383
|
function H1(n, e, t, s, o, i, r) {
|
|
16384
|
-
const l = n.doc.type.schema, a =
|
|
16384
|
+
const l = n.doc.type.schema, a = qe(l);
|
|
16385
16385
|
let c, d;
|
|
16386
16386
|
if (o > e.width)
|
|
16387
16387
|
for (let p = 0, u = 0; p < e.height; p++) {
|
|
@@ -16487,7 +16487,7 @@ function ca(n, e, t, s, o) {
|
|
|
16487
16487
|
)
|
|
16488
16488
|
), e(p);
|
|
16489
16489
|
}
|
|
16490
|
-
var F1 =
|
|
16490
|
+
var F1 = rd({
|
|
16491
16491
|
ArrowLeft: Es("horiz", -1),
|
|
16492
16492
|
ArrowRight: Es("horiz", 1),
|
|
16493
16493
|
ArrowUp: Es("vert", -1),
|
|
@@ -16517,7 +16517,7 @@ function Es(n, e) {
|
|
|
16517
16517
|
);
|
|
16518
16518
|
if (n != "horiz" && !i.empty)
|
|
16519
16519
|
return !1;
|
|
16520
|
-
const r =
|
|
16520
|
+
const r = jd(o, n, e);
|
|
16521
16521
|
if (r == null)
|
|
16522
16522
|
return !1;
|
|
16523
16523
|
if (n == "horiz")
|
|
@@ -16527,7 +16527,7 @@ function Es(n, e) {
|
|
|
16527
16527
|
L.near(t.doc.resolve(i.head + e), e)
|
|
16528
16528
|
);
|
|
16529
16529
|
{
|
|
16530
|
-
const l = t.doc.resolve(r), a =
|
|
16530
|
+
const l = t.doc.resolve(r), a = Fd(l, n, e);
|
|
16531
16531
|
let c;
|
|
16532
16532
|
return a ? c = L.near(a, 1) : e < 0 ? c = L.near(t.doc.resolve(l.before(-1)), -1) : c = L.near(t.doc.resolve(l.after(-1)), 1), Ls(t, s, c);
|
|
16533
16533
|
}
|
|
@@ -16542,12 +16542,12 @@ function Ts(n, e) {
|
|
|
16542
16542
|
if (i instanceof Z)
|
|
16543
16543
|
r = i;
|
|
16544
16544
|
else {
|
|
16545
|
-
const a =
|
|
16545
|
+
const a = jd(o, n, e);
|
|
16546
16546
|
if (a == null)
|
|
16547
16547
|
return !1;
|
|
16548
16548
|
r = new Z(t.doc.resolve(a));
|
|
16549
16549
|
}
|
|
16550
|
-
const l =
|
|
16550
|
+
const l = Fd(r.$headCell, n, e);
|
|
16551
16551
|
return l ? Ls(
|
|
16552
16552
|
t,
|
|
16553
16553
|
s,
|
|
@@ -16570,7 +16570,7 @@ function G1(n, e, t) {
|
|
|
16570
16570
|
height: 1,
|
|
16571
16571
|
rows: [
|
|
16572
16572
|
T.from(
|
|
16573
|
-
Li(
|
|
16573
|
+
Li(qe(n.state.schema).cell, t)
|
|
16574
16574
|
)
|
|
16575
16575
|
]
|
|
16576
16576
|
});
|
|
@@ -16631,7 +16631,7 @@ function W1(n, e) {
|
|
|
16631
16631
|
}
|
|
16632
16632
|
n.root.addEventListener("mouseup", r), n.root.addEventListener("dragstart", r), n.root.addEventListener("mousemove", l);
|
|
16633
16633
|
}
|
|
16634
|
-
function
|
|
16634
|
+
function jd(n, e, t) {
|
|
16635
16635
|
if (!(n.state.selection instanceof $))
|
|
16636
16636
|
return null;
|
|
16637
16637
|
const { $head: s } = n.state.selection;
|
|
@@ -16717,7 +16717,7 @@ function q1({
|
|
|
16717
16717
|
state: {
|
|
16718
16718
|
init(r, l) {
|
|
16719
16719
|
var a, c;
|
|
16720
|
-
const d = (c = (a = i.spec) == null ? void 0 : a.props) == null ? void 0 : c.nodeViews, p =
|
|
16720
|
+
const d = (c = (a = i.spec) == null ? void 0 : a.props) == null ? void 0 : c.nodeViews, p = qe(l.schema).table.name;
|
|
16721
16721
|
return s && d && (d[p] = (u, h) => new s(u, t, h)), new U1(-1, !1);
|
|
16722
16722
|
},
|
|
16723
16723
|
apply(r, l) {
|
|
@@ -16782,13 +16782,13 @@ function K1(n, e, t, s) {
|
|
|
16782
16782
|
if (c.colCount(l.pos - d) + l.nodeAfter.attrs.colspan - 1 == c.width - 1)
|
|
16783
16783
|
return;
|
|
16784
16784
|
}
|
|
16785
|
-
|
|
16785
|
+
qd(n, r);
|
|
16786
16786
|
}
|
|
16787
16787
|
}
|
|
16788
16788
|
}
|
|
16789
16789
|
function J1(n) {
|
|
16790
16790
|
const e = ve.getState(n.state);
|
|
16791
|
-
e && e.activeHandle > -1 && !e.dragging &&
|
|
16791
|
+
e && e.activeHandle > -1 && !e.dragging && qd(n, -1);
|
|
16792
16792
|
}
|
|
16793
16793
|
function Z1(n, e, t, s) {
|
|
16794
16794
|
var o;
|
|
@@ -16868,7 +16868,7 @@ function ua(n, e, t) {
|
|
|
16868
16868
|
const s = e.clientX - n.startX;
|
|
16869
16869
|
return Math.max(t, n.startWidth + s);
|
|
16870
16870
|
}
|
|
16871
|
-
function
|
|
16871
|
+
function qd(n, e) {
|
|
16872
16872
|
n.dispatch(
|
|
16873
16873
|
n.state.tr.setMeta(ve, { setHandle: e })
|
|
16874
16874
|
);
|
|
@@ -16962,7 +16962,7 @@ function n0({
|
|
|
16962
16962
|
handlePaste: G1
|
|
16963
16963
|
},
|
|
16964
16964
|
appendTransaction(e, t, s) {
|
|
16965
|
-
return
|
|
16965
|
+
return O1(
|
|
16966
16966
|
s,
|
|
16967
16967
|
R1(s, t),
|
|
16968
16968
|
n
|
|
@@ -16973,13 +16973,13 @@ function n0({
|
|
|
16973
16973
|
const Fn = (n) => {
|
|
16974
16974
|
const e = Object.fromEntries(Array.from(n.attributes).map((t) => [t.name, t.value]));
|
|
16975
16975
|
return delete e.draggable, e;
|
|
16976
|
-
}, fa = "data-gs-mrk-fs",
|
|
16976
|
+
}, fa = "data-gs-mrk-fs", Ud = "data-gs-mrk-wrap", io = "data-gs-ifrg", tt = "attrs", gr = {
|
|
16977
16977
|
[tt]: { default: "{}" }
|
|
16978
|
-
},
|
|
16978
|
+
}, $e = {
|
|
16979
16979
|
[tt]: { default: {} }
|
|
16980
16980
|
}, yr = (n) => ({
|
|
16981
16981
|
[tt]: JSON.stringify(Fn(n))
|
|
16982
|
-
}),
|
|
16982
|
+
}), ze = (n) => ({ attrs: Fn(n) }), Mn = (n) => (e) => [n, e.attrs.attrs, 0], Xe = (n) => n.attrs[tt] ? JSON.parse(n.attrs[tt]) : {}, s0 = {
|
|
16983
16983
|
doc: {
|
|
16984
16984
|
content: "block+"
|
|
16985
16985
|
},
|
|
@@ -16991,42 +16991,42 @@ const Fn = (n) => {
|
|
|
16991
16991
|
group: "block",
|
|
16992
16992
|
content: "inline*",
|
|
16993
16993
|
isTextBlock: !0,
|
|
16994
|
-
parseDOM: [{ tag: `span[${io}]`, getAttrs:
|
|
16994
|
+
parseDOM: [{ tag: `span[${io}]`, getAttrs: ze }],
|
|
16995
16995
|
toDOM: () => ["span", { [io]: "" }, 0]
|
|
16996
16996
|
},
|
|
16997
16997
|
div: {
|
|
16998
16998
|
group: "block",
|
|
16999
16999
|
content: "inline*",
|
|
17000
|
-
attrs:
|
|
17001
|
-
parseDOM: [{ tag: "div", getAttrs:
|
|
17000
|
+
attrs: $e,
|
|
17001
|
+
parseDOM: [{ tag: "div", getAttrs: ze }],
|
|
17002
17002
|
toDOM: Mn("div")
|
|
17003
17003
|
},
|
|
17004
17004
|
paragraph: {
|
|
17005
17005
|
group: "block",
|
|
17006
17006
|
content: "inline*",
|
|
17007
|
-
attrs:
|
|
17008
|
-
parseDOM: [{ tag: "p", getAttrs:
|
|
17007
|
+
attrs: $e,
|
|
17008
|
+
parseDOM: [{ tag: "p", getAttrs: ze }],
|
|
17009
17009
|
toDOM: Mn("p")
|
|
17010
17010
|
},
|
|
17011
17011
|
orderedList: {
|
|
17012
17012
|
group: "block",
|
|
17013
17013
|
content: "listItem+",
|
|
17014
|
-
attrs:
|
|
17015
|
-
parseDOM: [{ tag: "ol", getAttrs:
|
|
17014
|
+
attrs: $e,
|
|
17015
|
+
parseDOM: [{ tag: "ol", getAttrs: ze }],
|
|
17016
17016
|
toDOM: Mn("ol")
|
|
17017
17017
|
},
|
|
17018
17018
|
bulletList: {
|
|
17019
17019
|
group: "block",
|
|
17020
17020
|
content: "listItem+",
|
|
17021
|
-
attrs:
|
|
17022
|
-
parseDOM: [{ tag: "ul", getAttrs:
|
|
17021
|
+
attrs: $e,
|
|
17022
|
+
parseDOM: [{ tag: "ul", getAttrs: ze }],
|
|
17023
17023
|
toDOM: Mn("ul")
|
|
17024
17024
|
},
|
|
17025
17025
|
listItem: {
|
|
17026
17026
|
content: "block*",
|
|
17027
17027
|
group: "block",
|
|
17028
|
-
attrs:
|
|
17029
|
-
parseDOM: [{ tag: "li", getAttrs:
|
|
17028
|
+
attrs: $e,
|
|
17029
|
+
parseDOM: [{ tag: "li", getAttrs: ze }],
|
|
17030
17030
|
toDOM: Mn("li"),
|
|
17031
17031
|
defining: !0
|
|
17032
17032
|
},
|
|
@@ -17034,33 +17034,33 @@ const Fn = (n) => {
|
|
|
17034
17034
|
group: "block",
|
|
17035
17035
|
content: "text*",
|
|
17036
17036
|
marks: "",
|
|
17037
|
-
attrs:
|
|
17038
|
-
parseDOM: [{ tag: "pre", getAttrs:
|
|
17037
|
+
attrs: $e,
|
|
17038
|
+
parseDOM: [{ tag: "pre", getAttrs: ze }],
|
|
17039
17039
|
toDOM: (n) => ["pre", n.attrs.attrs, ["code", 0]]
|
|
17040
17040
|
},
|
|
17041
17041
|
image: {
|
|
17042
17042
|
inline: !0,
|
|
17043
17043
|
group: "inline",
|
|
17044
17044
|
selectable: !0,
|
|
17045
|
-
attrs:
|
|
17046
|
-
parseDOM: [{ tag: "img[src]", getAttrs:
|
|
17045
|
+
attrs: $e,
|
|
17046
|
+
parseDOM: [{ tag: "img[src]", getAttrs: ze }],
|
|
17047
17047
|
toDOM: (n) => ["img", n.attrs.attrs]
|
|
17048
17048
|
},
|
|
17049
17049
|
inlineBreak: {
|
|
17050
17050
|
inline: !0,
|
|
17051
17051
|
group: "inline",
|
|
17052
17052
|
selectable: !1,
|
|
17053
|
-
|
|
17054
|
-
|
|
17055
|
-
|
|
17056
|
-
}
|
|
17053
|
+
attrs: $e,
|
|
17054
|
+
parseDOM: [{ tag: "br", getAttrs: ze }],
|
|
17055
|
+
toDOM: (n) => ["br", { ...n.attrs.attrs }]
|
|
17057
17056
|
},
|
|
17057
|
+
// same as above, keeping this one only to avoid breaking changes
|
|
17058
17058
|
hardBreak: {
|
|
17059
|
-
inline: !
|
|
17060
|
-
group: "
|
|
17059
|
+
inline: !0,
|
|
17060
|
+
group: "inline",
|
|
17061
17061
|
selectable: !1,
|
|
17062
|
-
attrs:
|
|
17063
|
-
parseDOM: [{ tag: "br", getAttrs:
|
|
17062
|
+
attrs: $e,
|
|
17063
|
+
parseDOM: [{ tag: "br", getAttrs: ze }],
|
|
17064
17064
|
toDOM: (n) => ["br", { ...n.attrs.attrs }]
|
|
17065
17065
|
},
|
|
17066
17066
|
heading: {
|
|
@@ -17088,7 +17088,7 @@ const Fn = (n) => {
|
|
|
17088
17088
|
cellContent: "block+",
|
|
17089
17089
|
cellAttributes: {
|
|
17090
17090
|
[tt]: {
|
|
17091
|
-
default:
|
|
17091
|
+
default: $e[tt].default,
|
|
17092
17092
|
getFromDOM: Fn,
|
|
17093
17093
|
setDOMAttr: (n, e) => {
|
|
17094
17094
|
n && Object.assign(e, n);
|
|
@@ -17155,7 +17155,7 @@ const Fn = (n) => {
|
|
|
17155
17155
|
em: An(["em", "i"], (n) => ["em", Xe(n)]),
|
|
17156
17156
|
underline: An(["u"], (n) => ["u", Xe(n), 0]),
|
|
17157
17157
|
strikethrough: An(["s"], (n) => ["s", Xe(n), 0]),
|
|
17158
|
-
wrapStyle: o0(
|
|
17158
|
+
wrapStyle: o0(Ud),
|
|
17159
17159
|
font_size: {
|
|
17160
17160
|
attrs: {
|
|
17161
17161
|
...gr,
|
|
@@ -17178,19 +17178,19 @@ const Fn = (n) => {
|
|
|
17178
17178
|
return e && (t.style = `font-size: ${e}`), ["span", t, 0];
|
|
17179
17179
|
}
|
|
17180
17180
|
}
|
|
17181
|
-
},
|
|
17181
|
+
}, ma = new Cf({
|
|
17182
17182
|
nodes: s0,
|
|
17183
17183
|
marks: i0
|
|
17184
17184
|
}), ds = /* @__PURE__ */ new WeakMap(), br = /* @__PURE__ */ new WeakMap(), r0 = (n, e, t) => {
|
|
17185
17185
|
ds.set(n, { view: e, gjsView: t, initialDoc: e.state.doc }), br.set(e, { el: n, gjsView: t });
|
|
17186
17186
|
}, l0 = (n, e) => {
|
|
17187
17187
|
ds.delete(n), br.delete(e);
|
|
17188
|
-
}, zs = (n) => ds.get(n),
|
|
17188
|
+
}, zs = (n) => ds.get(n), Kd = (n) => br.get(n), ga = (n) => {
|
|
17189
17189
|
const e = zs(n), t = e == null ? void 0 : e.view, s = e == null ? void 0 : e.initialDoc;
|
|
17190
17190
|
return !(t && s && s.eq(t.state.doc));
|
|
17191
17191
|
}, Ko = (n) => {
|
|
17192
17192
|
var e, t;
|
|
17193
|
-
return (t = (e =
|
|
17193
|
+
return (t = (e = Kd(n)) == null ? void 0 : e.gjsView) == null ? void 0 : t.model;
|
|
17194
17194
|
}, a0 = (n) => n.dispatchEvent(new CustomEvent("input"));
|
|
17195
17195
|
function c0(n) {
|
|
17196
17196
|
const e = (t) => {
|
|
@@ -17210,9 +17210,17 @@ function c0(n) {
|
|
|
17210
17210
|
};
|
|
17211
17211
|
e(n);
|
|
17212
17212
|
}
|
|
17213
|
-
const
|
|
17213
|
+
const Jd = (n) => {
|
|
17214
|
+
n.childNodes.forEach((e) => {
|
|
17215
|
+
if (e.nodeName === "BR") {
|
|
17216
|
+
const { nextSibling: t } = e, s = n.lastChild === e, o = (t == null ? void 0 : t.nodeType) === Node.ELEMENT_NODE && (t == null ? void 0 : t.nodeName) !== "BR";
|
|
17217
|
+
(s || o) && e.remove();
|
|
17218
|
+
} else
|
|
17219
|
+
Jd(e);
|
|
17220
|
+
});
|
|
17221
|
+
}, d0 = (n, e) => {
|
|
17214
17222
|
const t = Zd(n);
|
|
17215
|
-
return t && S0(t) ? u0(n, e) : t ?
|
|
17223
|
+
return t && S0(t) ? u0(n, e) : t ? Xc(() => ({ type: n.schema.nodes.div }))(n, e) : !1;
|
|
17216
17224
|
}, p0 = (n, e) => (t, s) => {
|
|
17217
17225
|
var l;
|
|
17218
17226
|
const o = Zd(t), i = ds.get(n.el).view, r = (l = e.onEnter) == null ? void 0 : l.call(e, {
|
|
@@ -17340,9 +17348,9 @@ const b0 = (n, e) => {
|
|
|
17340
17348
|
const { event: o } = e, i = n.posAtCoords({ left: o.clientX, top: o.clientY });
|
|
17341
17349
|
i != null && i.pos && s(t.tr.setSelection($.create(t.doc, i.pos)));
|
|
17342
17350
|
} else
|
|
17343
|
-
|
|
17351
|
+
Qc(t, s);
|
|
17344
17352
|
setTimeout(() => setTimeout(() => n.focus()));
|
|
17345
|
-
}, zi = (n) => n.isBlock, Yd = (n) => n.type.name === "inlineFragment", v0 = (n) => zi(n) && !Yd(n), Xd = (n) => n.type.name === "bulletList", Qd = (n) => n.type.name === "orderedList", S0 = (n) => n.type.name === "heading", x0 = (n) => Xd(n) || Qd(n),
|
|
17353
|
+
}, zi = (n) => n.isBlock, Yd = (n) => n.type.name === "inlineFragment", v0 = (n) => zi(n) && !Yd(n), Xd = (n) => n.type.name === "bulletList", Qd = (n) => n.type.name === "orderedList", S0 = (n) => n.type.name === "heading", x0 = (n) => Xd(n) || Qd(n), ya = (n, e) => {
|
|
17346
17354
|
var i, r;
|
|
17347
17355
|
const t = (i = Nt(n, (l) => l.type === e)) == null ? void 0 : i.node, s = n.state.schema.nodes.listItem;
|
|
17348
17356
|
let o;
|
|
@@ -17398,7 +17406,7 @@ const b0 = (n, e) => {
|
|
|
17398
17406
|
},
|
|
17399
17407
|
wrapStyle: () => {
|
|
17400
17408
|
const l = Ko(n), a = r.text.selected(), c = `i${e.Components._createId().slice(0, 4)}`;
|
|
17401
|
-
r.text.replaceHtml(`<span id="${c}" ${
|
|
17409
|
+
r.text.replaceHtml(`<span id="${c}" ${Ud}>${a}</span>`), l == null || l.trigger("disable"), setTimeout(() => {
|
|
17402
17410
|
const d = l == null ? void 0 : l.find(`#${c}`)[0];
|
|
17403
17411
|
d && e.select(d);
|
|
17404
17412
|
});
|
|
@@ -17441,7 +17449,7 @@ const b0 = (n, e) => {
|
|
|
17441
17449
|
create: (l) => {
|
|
17442
17450
|
const a = Ko(n), c = a == null ? void 0 : a.getTrait("href"), { url: d, target: p } = l, u = () => {
|
|
17443
17451
|
var f, m;
|
|
17444
|
-
const h = (m = (f =
|
|
17452
|
+
const h = (m = (f = Kd(n)) == null ? void 0 : f.gjsView) == null ? void 0 : m.el;
|
|
17445
17453
|
h && h.contentEditable !== "true" && (h.contentEditable = "true"), n.focus();
|
|
17446
17454
|
};
|
|
17447
17455
|
a != null && a.is("link") ? (a.addAttributes({ href: d, target: p }), u()) : c ? (a == null || a.addAttributes({ [c.getName()]: d }), u()) : f0({ view: n, href: d, target: p, options: t });
|
|
@@ -17493,14 +17501,14 @@ const b0 = (n, e) => {
|
|
|
17493
17501
|
var l;
|
|
17494
17502
|
return !!((l = Nt(n, Xd)) != null && l.node);
|
|
17495
17503
|
},
|
|
17496
|
-
toggle: () =>
|
|
17504
|
+
toggle: () => ya(n, o.bulletList)
|
|
17497
17505
|
},
|
|
17498
17506
|
listOrdered: {
|
|
17499
17507
|
isActive: () => {
|
|
17500
17508
|
var l;
|
|
17501
17509
|
return !!((l = Nt(n, Qd)) != null && l.node);
|
|
17502
17510
|
},
|
|
17503
|
-
toggle: () =>
|
|
17511
|
+
toggle: () => ya(n, o.orderedList)
|
|
17504
17512
|
}
|
|
17505
17513
|
};
|
|
17506
17514
|
return r;
|
|
@@ -17553,13 +17561,13 @@ function T0({ rules: n }) {
|
|
|
17553
17561
|
},
|
|
17554
17562
|
props: {
|
|
17555
17563
|
handleTextInput(t, s, o, i) {
|
|
17556
|
-
return
|
|
17564
|
+
return ba(t, s, o, i, n, e);
|
|
17557
17565
|
},
|
|
17558
17566
|
handleDOMEvents: {
|
|
17559
17567
|
compositionend: (t) => {
|
|
17560
17568
|
setTimeout(() => {
|
|
17561
17569
|
let { $cursor: s } = t.state.selection;
|
|
17562
|
-
s &&
|
|
17570
|
+
s && ba(t, s.pos, s.pos, "", n, e);
|
|
17563
17571
|
});
|
|
17564
17572
|
}
|
|
17565
17573
|
}
|
|
@@ -17568,7 +17576,7 @@ function T0({ rules: n }) {
|
|
|
17568
17576
|
});
|
|
17569
17577
|
return e;
|
|
17570
17578
|
}
|
|
17571
|
-
function
|
|
17579
|
+
function ba(n, e, t, s, o, i) {
|
|
17572
17580
|
if (n.composing)
|
|
17573
17581
|
return !1;
|
|
17574
17582
|
let r = n.state, l = r.doc.resolve(e), a = l.parent.textBetween(Math.max(0, l.parentOffset - E0), l.parentOffset, null, "") + s;
|
|
@@ -17585,10 +17593,10 @@ function va(n, e, t, s, o, i) {
|
|
|
17585
17593
|
}
|
|
17586
17594
|
return !1;
|
|
17587
17595
|
}
|
|
17588
|
-
const M0 = new vt(/--$/, "—"), A0 = new vt(/\.\.\.$/, "…"), P0 = new vt(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/, "“"), N0 = new vt(/"$/, "”"),
|
|
17596
|
+
const M0 = new vt(/--$/, "—"), A0 = new vt(/\.\.\.$/, "…"), P0 = new vt(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/, "“"), N0 = new vt(/"$/, "”"), O0 = new vt(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/, "‘"), I0 = new vt(/'$/, "’"), R0 = [P0, N0, O0, I0];
|
|
17589
17597
|
function Sr(n, e, t = null, s) {
|
|
17590
17598
|
return new vt(n, (o, i, r, l) => {
|
|
17591
|
-
let a = t instanceof Function ? t(i) : t, c = o.tr.delete(r, l), d = c.doc.resolve(r), p = d.blockRange(), u = p &&
|
|
17599
|
+
let a = t instanceof Function ? t(i) : t, c = o.tr.delete(r, l), d = c.doc.resolve(r), p = d.blockRange(), u = p && $c(p, e, a);
|
|
17592
17600
|
if (!u)
|
|
17593
17601
|
return null;
|
|
17594
17602
|
c.wrap(p, u);
|
|
@@ -17947,12 +17955,14 @@ const W0 = function(n, e = {}) {
|
|
|
17947
17955
|
...e
|
|
17948
17956
|
}, s = (l, a) => {
|
|
17949
17957
|
var g, b;
|
|
17950
|
-
const c = ((g = t.schema) == null ? void 0 : g.call(t, { editor: n, schema:
|
|
17958
|
+
const c = ((g = t.schema) == null ? void 0 : g.call(t, { editor: n, schema: ma })) || ma, { nodes: d, marks: p } = c, u = {
|
|
17951
17959
|
...a,
|
|
17952
17960
|
component: a.view.model,
|
|
17953
17961
|
editor: n,
|
|
17954
17962
|
el: l
|
|
17955
|
-
}
|
|
17963
|
+
};
|
|
17964
|
+
Jd(l);
|
|
17965
|
+
const h = Bt.fromSchema(c).parse(l), f = sn.create({
|
|
17956
17966
|
doc: h,
|
|
17957
17967
|
schema: c,
|
|
17958
17968
|
plugins: (b = t.plugins) == null ? void 0 : b.call(t, {
|
|
@@ -17968,9 +17978,9 @@ const W0 = function(n, e = {}) {
|
|
|
17968
17978
|
"Shift-Tab": ra(-1)
|
|
17969
17979
|
}),
|
|
17970
17980
|
Fo({
|
|
17971
|
-
Enter: Yn(
|
|
17972
|
-
"Shift-Enter": Yn(
|
|
17973
|
-
"Mod-z":
|
|
17981
|
+
Enter: Yn(Yc, $m(d.listItem), p0(u, t)),
|
|
17982
|
+
"Shift-Enter": Yn(Zc, (C, y) => (y && y(C.tr.replaceSelectionWith(d.inlineBreak.create()).scrollIntoView()), !0)),
|
|
17983
|
+
"Mod-z": id,
|
|
17974
17984
|
"Mod-y": Si,
|
|
17975
17985
|
// On Windows
|
|
17976
17986
|
"Mod-Shift-z": Si,
|
|
@@ -18019,7 +18029,7 @@ const W0 = function(n, e = {}) {
|
|
|
18019
18029
|
disable(l) {
|
|
18020
18030
|
const a = zs(l), c = a == null ? void 0 : a.view;
|
|
18021
18031
|
if (c) {
|
|
18022
|
-
const d =
|
|
18032
|
+
const d = ga(l);
|
|
18023
18033
|
return l0(l, c), d || n.once(n.RichTextEditor.events.disable, () => {
|
|
18024
18034
|
a.gjsView.model.trigger("rerender");
|
|
18025
18035
|
}), c.destroy(), { forceSync: d };
|
|
@@ -18030,17 +18040,18 @@ const W0 = function(n, e = {}) {
|
|
|
18030
18040
|
const d = (p = zs(l)) == null ? void 0 : p.view;
|
|
18031
18041
|
if (d) {
|
|
18032
18042
|
const { schema: u, doc: h } = d.state;
|
|
18033
|
-
if (!
|
|
18043
|
+
if (!ga(l))
|
|
18034
18044
|
return c.view.lastContent;
|
|
18035
18045
|
const f = document.createElement("div"), m = Wt.fromSchema(u).serializeFragment(h.content);
|
|
18036
18046
|
return m.childNodes.forEach((g) => {
|
|
18037
|
-
|
|
18047
|
+
var b;
|
|
18048
|
+
g.nodeType === Node.ELEMENT_NODE && (g.innerHTML === "" ? g.innerHTML = "<br/>" : ((b = g.lastChild) == null ? void 0 : b.nodeName) === "BR" && g.appendChild(document.createElement("br")));
|
|
18038
18049
|
}), f.appendChild(m), c0(f), l.classList.remove("ProseMirror-focused"), f.innerHTML;
|
|
18039
18050
|
}
|
|
18040
18051
|
return l.innerHTML;
|
|
18041
18052
|
}
|
|
18042
18053
|
});
|
|
18043
|
-
const i =
|
|
18054
|
+
const i = hc(n, t.enableOnClick), r = Yh(n, t.disableOnEsc);
|
|
18044
18055
|
G({
|
|
18045
18056
|
editor: n,
|
|
18046
18057
|
licenseKey: t.licenseKey,
|
|
@@ -18109,7 +18120,7 @@ const W0 = function(n, e = {}) {
|
|
|
18109
18120
|
n.off(m, p), n.off(g, p), n.off(C, u), n.off(b, h);
|
|
18110
18121
|
}
|
|
18111
18122
|
});
|
|
18112
|
-
}, $b = _(U0),
|
|
18123
|
+
}, $b = _(U0), va = "canvasFullSize", K0 = H.startup, J0 = (n, e) => {
|
|
18113
18124
|
const { rule: t, ruleView: s } = e, { style: o } = t.attributes;
|
|
18114
18125
|
if (o && o[n]) {
|
|
18115
18126
|
const i = o[n], r = /([0-9.]+)(vh|dvh|lvh|svh)/g, l = r.test(i), a = s.frameView.model;
|
|
@@ -18144,7 +18155,7 @@ const W0 = function(n, e = {}) {
|
|
|
18144
18155
|
deviceFixedHeight: u,
|
|
18145
18156
|
frameBorderRadius: h,
|
|
18146
18157
|
frameTransition: f
|
|
18147
|
-
} = r, m = `${p}px`, g = t.events, b = "core:preview", C = `${s.events.stopCommand}${b}`, y = t.getConfig(), v = `${
|
|
18158
|
+
} = r, m = `${p}px`, g = t.events, b = "core:preview", C = `${s.events.stopCommand}${b}`, y = t.getConfig(), v = `${va}:disable`, w = o.getAll().map((z) => ({ ...z.attributes })), S = c * 1e3, x = { x: a, y: l };
|
|
18148
18159
|
let k = {}, E, M;
|
|
18149
18160
|
y.scrollableCanvas = !u, o.getAll().map((z) => {
|
|
18150
18161
|
!z.get("width") && z.set("width", `${d}px`), !z.get("height") && z.set("height", u ? "100vh" : "auto"), !z.get("minHeight") && z.set("minHeight", m);
|
|
@@ -18170,7 +18181,7 @@ const W0 = function(n, e = {}) {
|
|
|
18170
18181
|
[data-gjs-type="mj-body"] { min-height: ${m} !important; }
|
|
18171
18182
|
`, !Le.contains(hs) && Le.appendChild(hs);
|
|
18172
18183
|
});
|
|
18173
|
-
const N = () => E.style.display = "none",
|
|
18184
|
+
const N = () => E.style.display = "none", O = () => E.style.display = "", R = () => {
|
|
18174
18185
|
var Le;
|
|
18175
18186
|
if (!u) return;
|
|
18176
18187
|
const z = t.getZoomMultiplier(), ue = t.getRect().height * z - l * 2;
|
|
@@ -18183,7 +18194,7 @@ const W0 = function(n, e = {}) {
|
|
|
18183
18194
|
}), R(), P(), setTimeout(() => {
|
|
18184
18195
|
var pe, ue;
|
|
18185
18196
|
const { em: z } = n;
|
|
18186
|
-
z.destroyed || ((ue = (pe = n.getSelected()) == null ? void 0 : pe.getEl()) == null || ue.scrollIntoView({ block: "nearest" }), n.refresh({ tools: !0 }),
|
|
18197
|
+
z.destroyed || ((ue = (pe = n.getSelected()) == null ? void 0 : pe.getEl()) == null || ue.scrollIntoView({ block: "nearest" }), n.refresh({ tools: !0 }), O(), s.isActive(b) ? z.stopDefault() : z.runDefault());
|
|
18187
18198
|
}, S);
|
|
18188
18199
|
}, 100), ie = (z = {}) => {
|
|
18189
18200
|
z.options && z.options.from !== "fitViewport" && t.fitViewport({
|
|
@@ -18193,14 +18204,14 @@ const W0 = function(n, e = {}) {
|
|
|
18193
18204
|
});
|
|
18194
18205
|
}, re = () => {
|
|
18195
18206
|
N(), F();
|
|
18196
|
-
},
|
|
18207
|
+
}, Ue = () => {
|
|
18197
18208
|
k.overflowX = "hidden", k.overflowY = "auto";
|
|
18198
18209
|
}, ye = () => {
|
|
18199
18210
|
M == null || M.disconnect(), F.clear();
|
|
18200
18211
|
}, xe = [
|
|
18201
18212
|
[o.events.select, re],
|
|
18202
18213
|
[g.zoom, ie],
|
|
18203
|
-
[C,
|
|
18214
|
+
[C, Ue],
|
|
18204
18215
|
[n.events.destroy, ye],
|
|
18205
18216
|
[i.events.mountBefore, Z0]
|
|
18206
18217
|
];
|
|
@@ -18215,7 +18226,7 @@ const W0 = function(n, e = {}) {
|
|
|
18215
18226
|
editor: n,
|
|
18216
18227
|
licenseKey: r.licenseKey,
|
|
18217
18228
|
plan: K0,
|
|
18218
|
-
pluginName:
|
|
18229
|
+
pluginName: va,
|
|
18219
18230
|
cleanup: () => {
|
|
18220
18231
|
n.runCommand(v);
|
|
18221
18232
|
}
|
|
@@ -18380,7 +18391,7 @@ function Jo(n, e, t = {}) {
|
|
|
18380
18391
|
const { enableGrid: r } = t, l = window.getComputedStyle(i).display === "grid";
|
|
18381
18392
|
return _t(r) ? r({ component: s, parent: o, isParentGrid: l }) : l;
|
|
18382
18393
|
}
|
|
18383
|
-
const
|
|
18394
|
+
const Sa = (n) => n.split(" ").map((e) => parseFloat(e));
|
|
18384
18395
|
function dp(n, e) {
|
|
18385
18396
|
const t = n.ownerDocument.defaultView, s = e || t.getComputedStyle(n), o = s.gridArea.split("/").some((w) => isNaN(parseInt(w.trim()))), i = {
|
|
18386
18397
|
isComputed: o,
|
|
@@ -18398,10 +18409,10 @@ function dp(n, e) {
|
|
|
18398
18409
|
end: parseInt(s.gridColumnEnd)
|
|
18399
18410
|
}
|
|
18400
18411
|
};
|
|
18401
|
-
const r = n.parentElement, l = t.getComputedStyle(r), a = parseFloat(l.columnGap) || 0, c = parseFloat(l.rowGap) || 0, d =
|
|
18412
|
+
const r = n.parentElement, l = t.getComputedStyle(r), a = parseFloat(l.columnGap) || 0, c = parseFloat(l.rowGap) || 0, d = Sa(l.gridTemplateColumns), p = Sa(l.gridTemplateRows), u = parseFloat(l.paddingLeft) || 0, h = parseFloat(l.paddingTop) || 0, f = r.getBoundingClientRect(), m = n.getBoundingClientRect(), g = (w, S, x, k, E) => {
|
|
18402
18413
|
let M = 1, P = k + E;
|
|
18403
18414
|
for (let N = 0; N < S.length; N++) {
|
|
18404
|
-
const
|
|
18415
|
+
const O = S[N], R = P + O;
|
|
18405
18416
|
if (w >= P && w < R)
|
|
18406
18417
|
return M;
|
|
18407
18418
|
P = R + x, M++;
|
|
@@ -18460,8 +18471,8 @@ function ly(n) {
|
|
|
18460
18471
|
const { scroll: g } = cp(e), { columns: b, rows: C, gap: y, offset: v, padding: w } = p, { offset: S, margin: x } = r, k = S.top - v.top - w.top - x.top + m - d.top + g.top, E = S.left - v.left - w.left - x.left + f - d.left + g.left, M = Math.min(ut(b, 1, E, y.column, 0.5), b.length), P = Math.min(ut(C, 1, k, y.row, 0.5), C.length), N = Math.min(
|
|
18461
18472
|
ut(b, M, S.width, y.column) + 1,
|
|
18462
18473
|
b.length + 1
|
|
18463
|
-
),
|
|
18464
|
-
a.style.gridArea = `${P} / ${M} / ${
|
|
18474
|
+
), O = Math.min(ut(C, P, S.height, y.row) + 1, C.length + 1);
|
|
18475
|
+
a.style.gridArea = `${P} / ${M} / ${O} / ${N}`, c.style.top = `${k + w.top}px`, c.style.left = `${E + w.left}px`;
|
|
18465
18476
|
}
|
|
18466
18477
|
}).start(s.event);
|
|
18467
18478
|
}
|
|
@@ -18520,7 +18531,7 @@ function ay(n, e) {
|
|
|
18520
18531
|
}
|
|
18521
18532
|
};
|
|
18522
18533
|
}
|
|
18523
|
-
const
|
|
18534
|
+
const xa = ["px", "%", "em", "rem", "vw", "vh"], cy = (n, e) => {
|
|
18524
18535
|
const t = n.Styles.getSectors().find((s) => !!s.getProperty(e));
|
|
18525
18536
|
return {
|
|
18526
18537
|
sector: t,
|
|
@@ -18530,12 +18541,12 @@ const wa = ["px", "%", "em", "rem", "vw", "vh"], cy = (n, e) => {
|
|
|
18530
18541
|
const o = {
|
|
18531
18542
|
property: `${n}-x`,
|
|
18532
18543
|
type: "integer",
|
|
18533
|
-
units:
|
|
18544
|
+
units: xa,
|
|
18534
18545
|
...e
|
|
18535
18546
|
}, i = {
|
|
18536
18547
|
property: `${n}-y`,
|
|
18537
18548
|
type: "integer",
|
|
18538
|
-
units:
|
|
18549
|
+
units: xa,
|
|
18539
18550
|
...t
|
|
18540
18551
|
};
|
|
18541
18552
|
return {
|
|
@@ -18582,7 +18593,7 @@ function hy(n = {}) {
|
|
|
18582
18593
|
rowEnd: o
|
|
18583
18594
|
};
|
|
18584
18595
|
}
|
|
18585
|
-
function
|
|
18596
|
+
function wa(n) {
|
|
18586
18597
|
const { property: e, label: t } = n, s = "1", o = "1fr";
|
|
18587
18598
|
return {
|
|
18588
18599
|
property: e,
|
|
@@ -18638,13 +18649,13 @@ function fy(n, e) {
|
|
|
18638
18649
|
if (!t) return;
|
|
18639
18650
|
const o = t.getOption("grid"), i = s.sector;
|
|
18640
18651
|
o || t.addOption({ id: "grid", label: "Grid" }), i.addProperty(
|
|
18641
|
-
|
|
18652
|
+
wa({
|
|
18642
18653
|
label: "Columns",
|
|
18643
18654
|
property: "grid-template-columns"
|
|
18644
18655
|
}),
|
|
18645
18656
|
{}
|
|
18646
18657
|
), i.addProperty(
|
|
18647
|
-
|
|
18658
|
+
wa({
|
|
18648
18659
|
label: "Rows",
|
|
18649
18660
|
property: "grid-template-rows"
|
|
18650
18661
|
}),
|
|
@@ -18859,7 +18870,7 @@ const by = async (n) => await Ap([{ id: "html-to-image", src: n }]), vy = async
|
|
|
18859
18870
|
cleanup: a
|
|
18860
18871
|
});
|
|
18861
18872
|
}, Bb = _(Sy);
|
|
18862
|
-
var
|
|
18873
|
+
var Be = /* @__PURE__ */ ((n) => (n.panelBlocks = "panelBlocks", n.panelPagesLayers = "panelPagesLayers", n.panelGlobalStyles = "panelGlobalStyles", n.panelSidebarTabs = "panelSidebarTabs", n.panelAssets = "panelAssets", n.aiChatPanel = "aiChatPanel", n.panelDataSources = "panelDataSources", n))(Be || {});
|
|
18863
18874
|
const up = "sidebarButtonsTarget", Ms = (n, e) => {
|
|
18864
18875
|
const { id: t, icon: s, label: o, tooltip: i, className: r, skipSelfClose: l, removeLayouts: a, layoutComponent: c, layoutCommand: d } = n, { pluginOpts: p, breakpointProps: u } = e, h = t;
|
|
18865
18876
|
return {
|
|
@@ -18869,14 +18880,14 @@ const up = "sidebarButtonsTarget", Ms = (n, e) => {
|
|
|
18869
18880
|
tooltip: o || i,
|
|
18870
18881
|
className: r,
|
|
18871
18882
|
editorEvents: {
|
|
18872
|
-
[`${
|
|
18883
|
+
[`${Ra.layoutToggleId}${h}`]: ({ fromEvent: f, setState: m, editor: g }) => {
|
|
18873
18884
|
m({ active: f.isOpen }), setTimeout(() => g.refresh({ tools: !0 }), 20);
|
|
18874
18885
|
}
|
|
18875
18886
|
},
|
|
18876
18887
|
onClick: ({ editor: f, state: m }) => {
|
|
18877
18888
|
var w;
|
|
18878
18889
|
if (m.active && l) return;
|
|
18879
|
-
const g = (d == null ? void 0 : d.placer) || { type: "static", layoutId: up }, b = { ...g, skipCleanup: g.type === "static" }, C = a || Object.keys(
|
|
18890
|
+
const g = (d == null ? void 0 : d.placer) || { type: "static", layoutId: up }, b = { ...g, skipCleanup: g.type === "static" }, C = a || Object.keys(Be).filter((S) => S !== h);
|
|
18880
18891
|
fp(f, { removeLayouts: C, layout: { placer: b } });
|
|
18881
18892
|
const y = {
|
|
18882
18893
|
id: h,
|
|
@@ -18898,29 +18909,29 @@ const up = "sidebarButtonsTarget", Ms = (n, e) => {
|
|
|
18898
18909
|
}
|
|
18899
18910
|
};
|
|
18900
18911
|
}, hp = (n) => `button__${n}`, fp = (n, e = {}) => {
|
|
18901
|
-
(e.removeLayouts || Object.keys(
|
|
18912
|
+
(e.removeLayouts || Object.keys(Be)).forEach((s) => n.runCommand(W.layoutRemove, { id: s, layout: e.layout }));
|
|
18902
18913
|
}, mp = (n) => {
|
|
18903
18914
|
const e = (n == null ? void 0 : n.breakpointTablet) ?? 1024, t = (n == null ? void 0 : n.breakpointMobile) ?? 768, s = {}, o = [
|
|
18904
18915
|
{
|
|
18905
|
-
id:
|
|
18916
|
+
id: Be.panelBlocks,
|
|
18906
18917
|
icon: "plusBox",
|
|
18907
18918
|
label: "Blocks",
|
|
18908
18919
|
layoutComponent: { type: "panelBlocks" }
|
|
18909
18920
|
},
|
|
18910
18921
|
{
|
|
18911
|
-
id:
|
|
18922
|
+
id: Be.panelPagesLayers,
|
|
18912
18923
|
icon: "layers",
|
|
18913
18924
|
label: "Pages & Layers",
|
|
18914
18925
|
layoutComponent: { type: "panelPagesLayers" }
|
|
18915
18926
|
},
|
|
18916
18927
|
{
|
|
18917
|
-
id:
|
|
18928
|
+
id: Be.panelGlobalStyles,
|
|
18918
18929
|
icon: '<svg viewBox="0 0 24 24"> <path d="M20 14H6c-2.2 0-4 1.8-4 4s1.8 4 4 4h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2M6 20c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m.3-8L13 5.3a2 2 0 0 1 2.8 0l2.8 2.8c.8.8.8 2 0 2.8l-.9 1.1H6.3M2 13.5V4c0-1.1.9-2 2-2h4a2 2 0 0 1 2 2v1.5l-8 8Z"/></svg>',
|
|
18919
18930
|
label: "Global Styles",
|
|
18920
18931
|
layoutComponent: { type: "panelGlobalStyles" }
|
|
18921
18932
|
},
|
|
18922
18933
|
{
|
|
18923
|
-
id:
|
|
18934
|
+
id: Be.panelAssets,
|
|
18924
18935
|
icon: '<svg viewBox="0 0 24 24"><path d="M22,16V4A2,2 0 0,0 20,2H8A2,2 0 0,0 6,4V16A2,2 0 0,0 8,18H20A2,2 0 0,0 22,16M11,12L13.03,14.71L16,11L20,16H8M2,6V20A2,2 0 0,0 4,22H18V20H4V6" /></svg>',
|
|
18925
18936
|
label: "Assets",
|
|
18926
18937
|
layoutComponent: {
|
|
@@ -18940,7 +18951,7 @@ const up = "sidebarButtonsTarget", Ms = (n, e) => {
|
|
|
18940
18951
|
], i = [
|
|
18941
18952
|
...o,
|
|
18942
18953
|
{
|
|
18943
|
-
id:
|
|
18954
|
+
id: Be.panelSidebarTabs,
|
|
18944
18955
|
layoutCommand: { header: !1 },
|
|
18945
18956
|
icon: '<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 0 1-1.5-1.5A1.5 1.5 0 0 1 17.5 9a1.5 1.5 0 0 1 1.5 1.5 1.5 1.5 0 0 1-1.5 1.5m-3-4A1.5 1.5 0 0 1 13 6.5 1.5 1.5 0 0 1 14.5 5 1.5 1.5 0 0 1 16 6.5 1.5 1.5 0 0 1 14.5 8m-5 0A1.5 1.5 0 0 1 8 6.5 1.5 1.5 0 0 1 9.5 5 1.5 1.5 0 0 1 11 6.5 1.5 1.5 0 0 1 9.5 8m-3 4A1.5 1.5 0 0 1 5 10.5 1.5 1.5 0 0 1 6.5 9 1.5 1.5 0 0 1 8 10.5 1.5 1.5 0 0 1 6.5 12M12 3a9 9 0 0 0-9 9 9 9 0 0 0 9 9 1.5 1.5 0 0 0 1.5-1.5c0-.4-.2-.7-.4-1-.2-.3-.4-.6-.4-1a1.5 1.5 0 0 1 1.5-1.5H16a5 5 0 0 0 5-5c0-4.4-4-8-9-8Z"/></svg>',
|
|
18946
18957
|
label: "Styles & Props",
|
|
@@ -18972,7 +18983,7 @@ const up = "sidebarButtonsTarget", Ms = (n, e) => {
|
|
|
18972
18983
|
const w = Ms(v, b);
|
|
18973
18984
|
return n != null && n.sidebarButton ? n.sidebarButton({
|
|
18974
18985
|
id: v.id,
|
|
18975
|
-
buttonIds:
|
|
18986
|
+
buttonIds: Be,
|
|
18976
18987
|
buttonProps: w,
|
|
18977
18988
|
sidebarButtonProps: v,
|
|
18978
18989
|
...g,
|
|
@@ -18980,7 +18991,7 @@ const up = "sidebarButtonsTarget", Ms = (n, e) => {
|
|
|
18980
18991
|
}) : w;
|
|
18981
18992
|
}).filter(Boolean);
|
|
18982
18993
|
return (n != null && n.sidebarButtons ? n == null ? void 0 : n.sidebarButtons({
|
|
18983
|
-
buttonIds:
|
|
18994
|
+
buttonIds: Be,
|
|
18984
18995
|
sidebarButtons: C,
|
|
18985
18996
|
...g,
|
|
18986
18997
|
createSidebarButton: (v) => Ms(
|
|
@@ -19069,7 +19080,7 @@ const up = "sidebarButtonsTarget", Ms = (n, e) => {
|
|
|
19069
19080
|
),
|
|
19070
19081
|
responsive: s
|
|
19071
19082
|
};
|
|
19072
|
-
},
|
|
19083
|
+
}, Ca = "layoutSidebarButtons", xy = H.free, wy = function(n, e = {}) {
|
|
19073
19084
|
const { Commands: t } = n, s = t.events, o = {
|
|
19074
19085
|
...e
|
|
19075
19086
|
};
|
|
@@ -19077,7 +19088,7 @@ const up = "sidebarButtonsTarget", Ms = (n, e) => {
|
|
|
19077
19088
|
if (n.runCommand(W.layoutConfigGet) || o.skipLayoutConfig === !0) return;
|
|
19078
19089
|
const l = mp(o);
|
|
19079
19090
|
n.runCommand(W.layoutConfigSet, { ...l });
|
|
19080
|
-
})(), t.add(`${
|
|
19091
|
+
})(), t.add(`${Ca}:toggleButton`, (r, l, a) => {
|
|
19081
19092
|
const c = document.getElementById(hp(a == null ? void 0 : a.id));
|
|
19082
19093
|
c == null || c.click();
|
|
19083
19094
|
}), n.on(`${s.runCommand}core:preview`, () => {
|
|
@@ -19086,7 +19097,7 @@ const up = "sidebarButtonsTarget", Ms = (n, e) => {
|
|
|
19086
19097
|
editor: n,
|
|
19087
19098
|
licenseKey: o.licenseKey,
|
|
19088
19099
|
plan: xy,
|
|
19089
|
-
pluginName:
|
|
19100
|
+
pluginName: Ca,
|
|
19090
19101
|
cleanup: () => {
|
|
19091
19102
|
n.runCommand(W.layoutConfigSet);
|
|
19092
19103
|
}
|
|
@@ -19205,7 +19216,7 @@ function Ty(n, e) {
|
|
|
19205
19216
|
};
|
|
19206
19217
|
}
|
|
19207
19218
|
var Gi = /* @__PURE__ */ ((n) => (n.print = "presetPrintable:print", n))(Gi || {});
|
|
19208
|
-
const
|
|
19219
|
+
const ka = (n) => new Promise((e) => {
|
|
19209
19220
|
const t = document.createElement("iframe");
|
|
19210
19221
|
t.style.cssText = "position: absolute; width: 0; height: 0; border: 0; opacity: 0; pointer-events: none;", t.srcdoc = n.content, t.onload = () => e(t), document.body.appendChild(t);
|
|
19211
19222
|
});
|
|
@@ -19224,9 +19235,9 @@ function My(n, e) {
|
|
|
19224
19235
|
}, c = (await t.run(W.projectFiles, l)).filter((u) => u.filename.endsWith(".html")), d = c.map((u) => u.content).join('<div style="break-before: page;"></div>'), p = [];
|
|
19225
19236
|
if (r.separatePrints)
|
|
19226
19237
|
for (const u of c)
|
|
19227
|
-
p.push(await
|
|
19238
|
+
p.push(await ka(u));
|
|
19228
19239
|
else
|
|
19229
|
-
p.push(await
|
|
19240
|
+
p.push(await ka({ content: d, filename: "", mimeType: "" }));
|
|
19230
19241
|
for (const u of p) {
|
|
19231
19242
|
const h = u.contentWindow;
|
|
19232
19243
|
h.focus(), h.print();
|
|
@@ -19251,7 +19262,7 @@ function Ay(n, e) {
|
|
|
19251
19262
|
select: !0,
|
|
19252
19263
|
...t
|
|
19253
19264
|
},
|
|
19254
|
-
isComponent:
|
|
19265
|
+
isComponent: Ge(wt),
|
|
19255
19266
|
model: {
|
|
19256
19267
|
defaults: {
|
|
19257
19268
|
name: i,
|
|
@@ -19269,7 +19280,7 @@ function Ay(n, e) {
|
|
|
19269
19280
|
s.removeType(wt), o.remove(wt);
|
|
19270
19281
|
};
|
|
19271
19282
|
}
|
|
19272
|
-
const Py = "presetPrintable", Ny = H.free,
|
|
19283
|
+
const Py = "presetPrintable", Ny = H.free, Oy = function(n, e = {}) {
|
|
19273
19284
|
var S;
|
|
19274
19285
|
const t = {
|
|
19275
19286
|
selectedDevice: Ae.A4,
|
|
@@ -19289,7 +19300,7 @@ const Py = "presetPrintable", Ny = H.free, Iy = function(n, e = {}) {
|
|
|
19289
19300
|
const u = a && o.get(a) || o.getAll().at(0);
|
|
19290
19301
|
o.select(u), ["map", "video"].forEach((x) => i.remove(x));
|
|
19291
19302
|
const f = (x = {}) => {
|
|
19292
|
-
const k = "page-rule", { rules: E } = n.Css, { width: M, height: P, minHeight: N } = o.getSelected().attributes,
|
|
19303
|
+
const k = "page-rule", { rules: E } = n.Css, { width: M, height: P, minHeight: N } = o.getSelected().attributes, O = P && P !== "auto" ? P : N, R = E.where({ id: k }).pop(), F = R || E.add(
|
|
19293
19304
|
{
|
|
19294
19305
|
id: k,
|
|
19295
19306
|
selectors: [],
|
|
@@ -19298,7 +19309,7 @@ const Py = "presetPrintable", Ny = H.free, Iy = function(n, e = {}) {
|
|
|
19298
19309
|
{ at: 0 }
|
|
19299
19310
|
);
|
|
19300
19311
|
(x.fromDeviceChange || !R) && F.addStyle({
|
|
19301
|
-
size: `${M} ${
|
|
19312
|
+
size: `${M} ${O}`,
|
|
19302
19313
|
...!R && { margin: "0" }
|
|
19303
19314
|
});
|
|
19304
19315
|
}, m = (x, k = {}) => {
|
|
@@ -19357,7 +19368,7 @@ const Py = "presetPrintable", Ny = H.free, Iy = function(n, e = {}) {
|
|
|
19357
19368
|
pluginName: Py,
|
|
19358
19369
|
cleanup: w
|
|
19359
19370
|
});
|
|
19360
|
-
}, Hb = _(
|
|
19371
|
+
}, Hb = _(Oy), Iy = (n) => {
|
|
19361
19372
|
const e = n;
|
|
19362
19373
|
return e.logicalOperator === "and" || e.logicalOperator === "or";
|
|
19363
19374
|
}, gp = (n, e) => (n.config.optsHtml = {
|
|
@@ -19411,7 +19422,7 @@ const ${l}={ currentItem, currentIndex: startIndex + index, remainingItems: endI
|
|
|
19411
19422
|
}
|
|
19412
19423
|
_parseCondition(e) {
|
|
19413
19424
|
if (!e) return "";
|
|
19414
|
-
if (
|
|
19425
|
+
if (Iy(e)) {
|
|
19415
19426
|
const t = e.statements.map((i) => this._parseCondition(i)), s = Dy[e.logicalOperator];
|
|
19416
19427
|
let o = t.length > 1 ? `(${t.join(`)${s}(`)})` : t[0];
|
|
19417
19428
|
return e.logicalOperator === "xor" && (o = `!!(${o})`), o;
|
|
@@ -20298,7 +20309,7 @@ const Wi = (n) => {
|
|
|
20298
20309
|
s && (Array.isArray(s) ? s = s.map((o) => o.toString()).join(",") : s = s.toString(), e[t] = s);
|
|
20299
20310
|
}
|
|
20300
20311
|
return new URLSearchParams(e);
|
|
20301
|
-
},
|
|
20312
|
+
}, Ea = "youtube-video", Zy = (n) => {
|
|
20302
20313
|
const { apiKey: e, searchParams: t, thumbnailQuality: s = "high" } = n, o = (l = {}) => {
|
|
20303
20314
|
const c = "https://www.googleapis.com/youtube/v3/search", d = Jy(l);
|
|
20304
20315
|
return `${c}?${d}`;
|
|
@@ -20311,13 +20322,13 @@ const Wi = (n) => {
|
|
|
20311
20322
|
id: l.id.videoId,
|
|
20312
20323
|
src: `https://www.youtube.com/watch?v=${l.id.videoId}`,
|
|
20313
20324
|
name: l.snippet.title,
|
|
20314
|
-
type:
|
|
20325
|
+
type: Ea,
|
|
20315
20326
|
customData: { thumbnailUrl: a, videoItem: l }
|
|
20316
20327
|
};
|
|
20317
20328
|
};
|
|
20318
20329
|
return {
|
|
20319
20330
|
id: "youtube",
|
|
20320
|
-
types: [
|
|
20331
|
+
types: [Ea],
|
|
20321
20332
|
label: ({ editor: l }) => l.I18n.t("youtubeAssetProvider.providerLabel"),
|
|
20322
20333
|
search: { reloadOnInput: !0, debounceMs: 1e3 },
|
|
20323
20334
|
async onLoad({ searchValue: l, pageCustomData: a }) {
|
|
@@ -20445,13 +20456,13 @@ const Wi = (n) => {
|
|
|
20445
20456
|
});
|
|
20446
20457
|
}
|
|
20447
20458
|
});
|
|
20448
|
-
}, Gb = _(eb), ss = (n) => n.replaceAll('"', "").replaceAll("'", ""), ji = (n) => n.includes(",") ? n : /\s/.test(n) ? `'${ss(n)}'` : ss(n),
|
|
20459
|
+
}, Gb = _(eb), ss = (n) => n.replaceAll('"', "").replaceAll("'", ""), ji = (n) => n.includes(",") ? n : /\s/.test(n) ? `'${ss(n)}'` : ss(n), Ta = (n, e, t) => ({ family: n, variant: e, ...t }), vp = (n, e) => {
|
|
20449
20460
|
n = ji(n);
|
|
20450
20461
|
const { menuVariant: t, variants: s } = e;
|
|
20451
20462
|
return {
|
|
20452
20463
|
family: n,
|
|
20453
20464
|
familyLabel: ss(n),
|
|
20454
|
-
menuVariant: t &&
|
|
20465
|
+
menuVariant: t && Ta(
|
|
20455
20466
|
ji(`menuFont-${ss(n)}`),
|
|
20456
20467
|
"regular",
|
|
20457
20468
|
t
|
|
@@ -20459,11 +20470,11 @@ const Wi = (n) => {
|
|
|
20459
20470
|
variants: Object.assign(
|
|
20460
20471
|
{},
|
|
20461
20472
|
...Object.entries(s).map(([o, i]) => ({
|
|
20462
|
-
[o]:
|
|
20473
|
+
[o]: Ta(n, o, i)
|
|
20463
20474
|
}))
|
|
20464
20475
|
)
|
|
20465
20476
|
};
|
|
20466
|
-
},
|
|
20477
|
+
}, Ma = (n, e) => {
|
|
20467
20478
|
var l;
|
|
20468
20479
|
const t = vp(n.family, n), s = t.menuVariant ?? ((l = Object.values(t.variants)) == null ? void 0 : l[0]);
|
|
20469
20480
|
if (!s)
|
|
@@ -20515,7 +20526,7 @@ const Wi = (n) => {
|
|
|
20515
20526
|
customData: { font: tb(n), needsLoading: !0 }
|
|
20516
20527
|
}), sb = (n) => {
|
|
20517
20528
|
const { font: e } = n.customData;
|
|
20518
|
-
return n.customData.needsLoading ? (n.customData.needsLoading = !1,
|
|
20529
|
+
return n.customData.needsLoading ? (n.customData.needsLoading = !1, Ma(e)) : Ma(e, !0);
|
|
20519
20530
|
};
|
|
20520
20531
|
let Nn;
|
|
20521
20532
|
const ob = (n) => {
|
|
@@ -20660,15 +20671,15 @@ function Sp({
|
|
|
20660
20671
|
var P, N;
|
|
20661
20672
|
const { command: s, guidesMatched: o } = t, i = t.component, r = i.getEl(), l = e.Canvas.getCanvasView(), { x: a, y: c } = n ?? { x: 10, y: 10 }, d = s.opts.event, p = d.clientX, u = d.clientY;
|
|
20662
20673
|
if (!i.__lastSnappedPosition) {
|
|
20663
|
-
const
|
|
20664
|
-
i.__lastSnappedPosition = { left:
|
|
20674
|
+
const O = l.getElBoxRect(r), R = p - O.x, F = u - O.y;
|
|
20675
|
+
i.__lastSnappedPosition = { left: O.x, top: O.y }, i.__dragOffset = { x: R, y: F };
|
|
20665
20676
|
}
|
|
20666
20677
|
const h = ((P = i.__dragOffset) == null ? void 0 : P.x) || 0, f = ((N = i.__dragOffset) == null ? void 0 : N.y) || 0, m = i.__lastSnappedPosition, g = p - m.left - h, b = u - m.top - f;
|
|
20667
20678
|
let C = m.left, y = m.top;
|
|
20668
20679
|
const v = o == null ? void 0 : o[0], w = (v == null ? void 0 : v.guide.type) === "l", S = (v == null ? void 0 : v.guide.type) === "x", x = (v == null ? void 0 : v.guide.type) === "r", k = (v == null ? void 0 : v.guide.type) === "t", E = (v == null ? void 0 : v.guide.type) === "b", M = (v == null ? void 0 : v.guide.type) === "y";
|
|
20669
20680
|
if (v) {
|
|
20670
|
-
const { x:
|
|
20671
|
-
w ? C =
|
|
20681
|
+
const { x: O, y: R } = Vs({ guideMatched: v, canvasView: l }), F = r.offsetWidth, ie = r.offsetHeight;
|
|
20682
|
+
w ? C = O : x ? C = O - F : S ? C = O - F / 2 : k ? y = R : E ? y = R - ie : M && (y = R - ie / 2), i.__lastSnappedGuideMatched = v;
|
|
20672
20683
|
} else
|
|
20673
20684
|
Math.abs(g) >= a && (C = Math.round((m.left + g) / a) * a, i.__lastSnappedGuideMatched = null), Math.abs(b) >= c && (y = Math.round((m.top + b) / c) * c, i.__lastSnappedGuideMatched = null);
|
|
20674
20685
|
return i.addStyle({ left: `${C}px`, top: `${y}px` }, { partial: !0 }), i.__lastSnappedPosition = { left: C, top: y }, { x: C, y, guideMatched: i.__lastSnappedGuideMatched };
|
|
@@ -20681,7 +20692,7 @@ function fb({
|
|
|
20681
20692
|
const { x: s, y: o } = Sp({ snapping: n, props: e, editor: t }), i = e.component;
|
|
20682
20693
|
i.addStyle({ left: `${s}px`, top: `${o}px` }), delete i.__lastSnappedPosition, delete i.__lastSnappedGuideMatched;
|
|
20683
20694
|
}
|
|
20684
|
-
const mb = "core:component-drag", gb = "studio:setDragAbsolute", yb = "dmode:start",
|
|
20695
|
+
const mb = "core:component-drag", gb = "studio:setDragAbsolute", yb = "dmode:start", Aa = "dmode:move", Pa = "dmode:end", Xo = "dragAbsolute", bb = "select", vb = "hover", Sb = "spacing", xb = function(n, e = {}) {
|
|
20685
20696
|
const { Commands: t } = n, s = t.events, o = t.getConfig().defaultOptions ?? {}, i = `${s.runBeforeCommand}tlb-move`;
|
|
20686
20697
|
o[mb] = {
|
|
20687
20698
|
run: (x) => ({
|
|
@@ -20694,7 +20705,7 @@ const mb = "core:component-drag", gb = "studio:setDragAbsolute", yb = "dmode:sta
|
|
|
20694
20705
|
const c = !!(r != null && r.x || r != null && r.y), d = !!(l != null && l.x || l != null && l.y), { Canvas: p } = n;
|
|
20695
20706
|
let u = null;
|
|
20696
20707
|
const h = (x) => {
|
|
20697
|
-
const { component: k, guidesMatched: E, command: M } = x, P = k.view, N = n.Canvas.getCanvasView(),
|
|
20708
|
+
const { component: k, guidesMatched: E, command: M } = x, P = k.view, N = n.Canvas.getCanvasView(), O = k.getEl();
|
|
20698
20709
|
let R = E.map((re) => re.matched.componentEl), F = E.map((re) => Vs({ guideMatched: re, canvasView: N }));
|
|
20699
20710
|
if (c) {
|
|
20700
20711
|
const { guideMatched: re } = Sp({ snapping: r, props: x, editor: n });
|
|
@@ -20705,8 +20716,8 @@ const mb = "core:component-drag", gb = "studio:setDragAbsolute", yb = "dmode:sta
|
|
|
20705
20716
|
if (!u)
|
|
20706
20717
|
u = E[0];
|
|
20707
20718
|
else {
|
|
20708
|
-
const
|
|
20709
|
-
(ye === "x" && (l == null ? void 0 : l.x) || ye === "y" && (l == null ? void 0 : l.y)) && (hb({ guideMatched:
|
|
20719
|
+
const Ue = u, ye = Ue.guide.x === void 0 ? "x" : "y";
|
|
20720
|
+
(ye === "x" && (l == null ? void 0 : l.x) || ye === "y" && (l == null ? void 0 : l.y)) && (hb({ guideMatched: Ue, component: k, canvasView: N }), R = [Ue.matched.componentEl], F = [Vs({ guideMatched: Ue, canvasView: N })]);
|
|
20710
20721
|
}
|
|
20711
20722
|
else
|
|
20712
20723
|
u = null;
|
|
@@ -20715,7 +20726,7 @@ const mb = "core:component-drag", gb = "studio:setDragAbsolute", yb = "dmode:sta
|
|
|
20715
20726
|
type: Xo,
|
|
20716
20727
|
component: k,
|
|
20717
20728
|
componentView: P,
|
|
20718
|
-
originComponent:
|
|
20729
|
+
originComponent: O,
|
|
20719
20730
|
matchedComponents: R,
|
|
20720
20731
|
originMatchedDistances: F
|
|
20721
20732
|
};
|
|
@@ -20734,11 +20745,11 @@ const mb = "core:component-drag", gb = "studio:setDragAbsolute", yb = "dmode:sta
|
|
|
20734
20745
|
m({ type: Xo }), c && fb({ snapping: r, props: x, editor: n }), f({ enabled: !1 });
|
|
20735
20746
|
}, S = [
|
|
20736
20747
|
[yb, (x) => {
|
|
20737
|
-
b(x), n.on(
|
|
20748
|
+
b(x), n.on(Aa, C);
|
|
20738
20749
|
const k = () => {
|
|
20739
|
-
y(x), n.off(
|
|
20750
|
+
y(x), n.off(Aa, C), n.off(Pa, k);
|
|
20740
20751
|
};
|
|
20741
|
-
n.on(
|
|
20752
|
+
n.on(Pa, k);
|
|
20742
20753
|
}],
|
|
20743
20754
|
[i, (x) => {
|
|
20744
20755
|
if (a) return;
|
|
@@ -20758,7 +20769,7 @@ const mb = "core:component-drag", gb = "studio:setDragAbsolute", yb = "dmode:sta
|
|
|
20758
20769
|
}, jb = _(xb);
|
|
20759
20770
|
export {
|
|
20760
20771
|
Nb as accordionComponent,
|
|
20761
|
-
|
|
20772
|
+
Ib as animationComponent,
|
|
20762
20773
|
jb as canvasAbsoluteMode,
|
|
20763
20774
|
$b as canvasEmptyState,
|
|
20764
20775
|
zb as canvasFullSize,
|
|
@@ -20767,7 +20778,7 @@ export {
|
|
|
20767
20778
|
Fb as dataSourceEjs,
|
|
20768
20779
|
_b as dataSourceHandlebars,
|
|
20769
20780
|
Cb as dialogComponent,
|
|
20770
|
-
|
|
20781
|
+
Ob as flexComponent,
|
|
20771
20782
|
Mb as fsLightboxComponent,
|
|
20772
20783
|
Wb as googleFontsAssetProvider,
|
|
20773
20784
|
kb as iconifyComponent,
|