@myissue/vue-website-page-builder 3.3.49 → 3.3.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -0
- package/dist/home/page_builder_architecture.png +0 -0
- package/dist/jane_doe.jpg +0 -0
- package/dist/vue-website-page-builder.js +793 -812
- package/dist/vue-website-page-builder.umd.cjs +28 -28
- package/package.json +1 -1
- package/src/Components/Loaders/GlobalLoader.vue +10 -3
- package/src/Components/Modals/DynamicModalBuilder.vue +1 -1
- package/src/Components/PageBuilder/EditorMenu/Editables/ImageEditor.vue +1 -1
- package/src/DemoComponents/DemoUnsplash.vue +2 -2
- package/src/DemoComponents/HomeSection.vue +1 -1
- package/src/PageBuilder/PageBuilder.vue +1 -1
- package/src/composables/PageBuilderService.ts +34 -53
|
@@ -3,18 +3,18 @@ var Pp = (r) => {
|
|
|
3
3
|
throw TypeError(r);
|
|
4
4
|
};
|
|
5
5
|
var Wu = (r, t, e) => t in r ? Vu(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
6
|
-
var
|
|
7
|
-
var
|
|
6
|
+
var kt = (r, t, e) => Wu(r, typeof t != "symbol" ? t + "" : t, e), Ap = (r, t, e) => t.has(r) || Pp("Cannot " + e);
|
|
7
|
+
var Xt = (r, t, e) => (Ap(r, t, "read from private field"), e ? e.call(r) : t.get(r)), Lo = (r, t, e) => t.has(r) ? Pp("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e);
|
|
8
8
|
var V = (r, t, e) => (Ap(r, t, "access private method"), e);
|
|
9
9
|
import * as Dp from "vue";
|
|
10
|
-
import { defineComponent as ce, computed as $, createBlock as xt, openBlock as v, Teleport as qu, createElementVNode as b, createElementBlock as C, createCommentVNode as L, normalizeClass as tt, toDisplayString as W, renderSlot as co, ref as S, Fragment as dt, withCtx as U, nextTick as
|
|
10
|
+
import { defineComponent as ce, computed as $, createBlock as xt, openBlock as v, Teleport as qu, createElementVNode as b, createElementBlock as C, createCommentVNode as L, normalizeClass as tt, toDisplayString as W, renderSlot as co, ref as S, Fragment as dt, withCtx as U, nextTick as pt, effectScope as Lc, markRaw as Dr, toRaw as Ut, hasInjectionContext as Uu, inject as Wr, getCurrentInstance as Rc, watch as ot, unref as T, reactive as Ku, isRef as Fi, isReactive as Nl, toRef as ps, getCurrentScope as Gu, onScopeDispose as Ju, toRefs as Np, createVNode as G, shallowRef as Yu, onMounted as xr, onBeforeUnmount as ja, h as qr, watchEffect as an, customRef as Xu, onBeforeMount as Qu, withDirectives as Ct, vModelText as Il, createTextVNode as Ft, provide as Br, resolveDynamicComponent as $c, cloneVNode as Zu, onUnmounted as tx, Transition as sn, renderList as ht, withKeys as ex, vShow as qs, vModelSelect as Zt, withModifiers as Ne, createStaticVNode as Ip } from "vue";
|
|
11
11
|
const rx = { class: "pbx-font-sans" }, ox = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "pbx-fixed pbx-inset-0 pbx-z-40 pbx-flex pbx-items-center pbx-justify-center pbx-mx-4",
|
|
14
14
|
role: "dialog",
|
|
15
15
|
"aria-modal": "true",
|
|
16
16
|
"aria-labelledby": "dialog-title"
|
|
17
|
-
}, ix = { class: "pbx-px-4 pbx-min-h-32" },
|
|
17
|
+
}, ix = { class: "pbx-px-4 pbx-min-h-32" }, zr = /* @__PURE__ */ ce({
|
|
18
18
|
__name: "ModalBuilder",
|
|
19
19
|
props: {
|
|
20
20
|
title: {
|
|
@@ -227,7 +227,7 @@ const rx = { class: "pbx-font-sans" }, ox = {
|
|
|
227
227
|
}, n = function() {
|
|
228
228
|
e("thirdModalButtonFunctionDynamicModalBuilder");
|
|
229
229
|
};
|
|
230
|
-
return (a, s) => (v(), xt(
|
|
230
|
+
return (a, s) => (v(), xt(zr, {
|
|
231
231
|
title: r.title,
|
|
232
232
|
showModalBuilder: r.showDynamicModalBuilder,
|
|
233
233
|
type: r.type,
|
|
@@ -283,7 +283,7 @@ const rx = { class: "pbx-font-sans" }, ox = {
|
|
|
283
283
|
], 2)
|
|
284
284
|
])) : L("", !0),
|
|
285
285
|
r.isLoading ? (v(), C("div", fx, s[0] || (s[0] = [
|
|
286
|
-
b("div", { class: "pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border
|
|
286
|
+
b("div", { class: "pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]" }, [
|
|
287
287
|
b("span", { class: "!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]" }, "Loading...")
|
|
288
288
|
], -1)
|
|
289
289
|
]))) : L("", !0)
|
|
@@ -893,7 +893,7 @@ const rx = { class: "pbx-font-sans" }, ox = {
|
|
|
893
893
|
"pbx-font-baskerville"
|
|
894
894
|
],
|
|
895
895
|
fontStyle: ["none", "pbx-italic", "pbx-non-italic"]
|
|
896
|
-
},
|
|
896
|
+
}, Nr = {
|
|
897
897
|
verticalPadding: [
|
|
898
898
|
"none",
|
|
899
899
|
"pbx-py-0",
|
|
@@ -1042,7 +1042,7 @@ const rx = { class: "pbx-font-sans" }, ox = {
|
|
|
1042
1042
|
"pbx-mx-80",
|
|
1043
1043
|
"pbx-mx-96"
|
|
1044
1044
|
]
|
|
1045
|
-
},
|
|
1045
|
+
}, qe = {
|
|
1046
1046
|
roundedGlobal: [
|
|
1047
1047
|
"none",
|
|
1048
1048
|
"pbx-rounded-sm",
|
|
@@ -1367,37 +1367,36 @@ function ds(r, t, e) {
|
|
|
1367
1367
|
const o = r.random || (r.rng || yx)();
|
|
1368
1368
|
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, wx(o);
|
|
1369
1369
|
}
|
|
1370
|
-
const
|
|
1370
|
+
const Se = function(t = 200) {
|
|
1371
1371
|
return new Promise((e) => {
|
|
1372
1372
|
setTimeout(e, t);
|
|
1373
1373
|
});
|
|
1374
1374
|
}, Ho = function(r) {
|
|
1375
1375
|
return !r || typeof r == "object" && r.constructor === Object && Object.keys(r).length === 0;
|
|
1376
1376
|
};
|
|
1377
|
-
var _, _c, zc, Fc, Hc, Rn, hi, yt, jc, Vc, za, Fa, Ha,
|
|
1377
|
+
var _, _c, zc, Fc, Hc, Rn, hi, yt, jc, Vc, za, Fa, Ha, ae, Wc, qc, io, Us, Uc, yi, Kc, Gc, $n, no, Ks, Jc;
|
|
1378
1378
|
class kx {
|
|
1379
1379
|
constructor(t) {
|
|
1380
1380
|
Lo(this, _);
|
|
1381
1381
|
// Class properties with types
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
wt(this, "hasStartedEditing", !1);
|
|
1382
|
+
kt(this, "fontSizeRegex", /^(sm:|md:|lg:|xl:|2xl:)?pbx-text-(xs|sm|base|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl|8xl|9xl)$/);
|
|
1383
|
+
kt(this, "pageBuilderStateStore");
|
|
1384
|
+
kt(this, "getLocalStorageItemName");
|
|
1385
|
+
kt(this, "getApplyImageToSelection");
|
|
1386
|
+
kt(this, "getHyberlinkEnable");
|
|
1387
|
+
kt(this, "getComponents");
|
|
1388
|
+
kt(this, "getComponent");
|
|
1389
|
+
kt(this, "getElement");
|
|
1390
|
+
kt(this, "getNextSibling");
|
|
1391
|
+
kt(this, "getParentElement");
|
|
1392
|
+
kt(this, "getRestoredElement");
|
|
1393
|
+
kt(this, "getComponentArrayAddMethod");
|
|
1394
|
+
kt(this, "NoneListernesTags");
|
|
1395
|
+
kt(this, "hasStartedEditing", !1);
|
|
1397
1396
|
// Hold data from Database or Backend for updated post
|
|
1398
|
-
|
|
1397
|
+
kt(this, "originalComponents");
|
|
1399
1398
|
// Holds data to be mounted when #pagebuilder is not yet present in the DOM
|
|
1400
|
-
|
|
1399
|
+
kt(this, "pendingMountData", null);
|
|
1401
1400
|
Lo(this, za, async (t, e) => {
|
|
1402
1401
|
t.preventDefault(), t.stopPropagation(), await this.handleAutoSave();
|
|
1403
1402
|
const o = document.querySelector("#pagebuilder");
|
|
@@ -1424,23 +1423,23 @@ class kx {
|
|
|
1424
1423
|
* The function is used to
|
|
1425
1424
|
* attach event listeners to each element within a 'section'
|
|
1426
1425
|
*/
|
|
1427
|
-
Lo(this,
|
|
1426
|
+
Lo(this, ae, async () => {
|
|
1428
1427
|
const t = /* @__PURE__ */ new WeakSet(), e = document.querySelector("#pagebuilder");
|
|
1429
|
-
e && (await
|
|
1428
|
+
e && (await pt(), e.querySelectorAll("section *").forEach((o) => {
|
|
1430
1429
|
if (this.isEditableElement(o) && t && !t.has(o)) {
|
|
1431
1430
|
t.add(o);
|
|
1432
1431
|
const i = o;
|
|
1433
|
-
i.addEventListener("click", (n) =>
|
|
1432
|
+
i.addEventListener("click", (n) => Xt(this, za).call(this, n, i)), i.addEventListener("mouseover", (n) => Xt(this, Fa).call(this, n, i)), i.addEventListener("mouseleave", (n) => Xt(this, Ha).call(this, n));
|
|
1434
1433
|
}
|
|
1435
1434
|
}));
|
|
1436
1435
|
});
|
|
1437
|
-
|
|
1436
|
+
kt(this, "handleAutoSave", async () => {
|
|
1438
1437
|
this.startEditing();
|
|
1439
1438
|
const t = this.pageBuilderStateStore.getPageBuilderConfig;
|
|
1440
1439
|
if (t && t.userSettings && typeof t.userSettings.autoSave == "boolean" && t.userSettings.autoSave !== !1) {
|
|
1441
1440
|
if (this.pageBuilderStateStore.getIsSaving) return;
|
|
1442
1441
|
try {
|
|
1443
|
-
this.pageBuilderStateStore.setIsSaving(!0), V(this, _, yi).call(this), await
|
|
1442
|
+
this.pageBuilderStateStore.setIsSaving(!0), V(this, _, yi).call(this), await Se(400);
|
|
1444
1443
|
} catch (e) {
|
|
1445
1444
|
console.error("Error trying auto save.", e);
|
|
1446
1445
|
} finally {
|
|
@@ -1449,27 +1448,27 @@ class kx {
|
|
|
1449
1448
|
}
|
|
1450
1449
|
if (t && !t.userSettings)
|
|
1451
1450
|
try {
|
|
1452
|
-
this.pageBuilderStateStore.setIsSaving(!0), V(this, _, yi).call(this), await
|
|
1451
|
+
this.pageBuilderStateStore.setIsSaving(!0), V(this, _, yi).call(this), await Se(400);
|
|
1453
1452
|
} catch (e) {
|
|
1454
1453
|
console.error("Error trying saving.", e);
|
|
1455
1454
|
} finally {
|
|
1456
1455
|
this.pageBuilderStateStore.setIsSaving(!1);
|
|
1457
1456
|
}
|
|
1458
1457
|
});
|
|
1459
|
-
|
|
1458
|
+
kt(this, "handleManualSave", async () => {
|
|
1460
1459
|
this.startEditing();
|
|
1461
1460
|
const t = this.pageBuilderStateStore.getPageBuilderConfig;
|
|
1462
|
-
t && t.userSettings && (typeof t.userSettings.autoSave == "boolean" && !t.userSettings.autoSave || typeof t.userSettings.autoSave == "boolean" && t.userSettings.autoSave) && (this.pageBuilderStateStore.setIsSaving(!0), V(this, _, yi).call(this), await
|
|
1461
|
+
t && t.userSettings && (typeof t.userSettings.autoSave == "boolean" && !t.userSettings.autoSave || typeof t.userSettings.autoSave == "boolean" && t.userSettings.autoSave) && (this.pageBuilderStateStore.setIsSaving(!0), V(this, _, yi).call(this), await Se(400), this.pageBuilderStateStore.setIsSaving(!1)), t && !t.userSettings && (this.pageBuilderStateStore.setIsSaving(!0), V(this, _, yi).call(this), await Se(400), this.pageBuilderStateStore.setIsSaving(!1));
|
|
1463
1462
|
});
|
|
1464
|
-
|
|
1463
|
+
kt(this, "ensureTextAreaHasContent", () => {
|
|
1465
1464
|
if (!this.getElement.value || typeof this.getElement.value.innerHTML != "string")
|
|
1466
1465
|
return;
|
|
1467
1466
|
const t = this.getElement.value, e = t.tagName;
|
|
1468
1467
|
["DIV"].includes(e) && t.tagName.toLowerCase() !== "img" && t.textContent && Number(t.textContent.length) === 0 ? (t.classList.add("h-6"), t.classList.add("bg-red-50")) : (t.classList.remove("h-6"), t.classList.remove("bg-red-50"));
|
|
1469
1468
|
});
|
|
1470
|
-
|
|
1469
|
+
kt(this, "handleTextInput", async (t) => {
|
|
1471
1470
|
var e;
|
|
1472
|
-
typeof ((e = this.getElement.value) == null ? void 0 : e.innerHTML) == "string" && (typeof this.getElement.value.innerHTML == "string" && (await
|
|
1471
|
+
typeof ((e = this.getElement.value) == null ? void 0 : e.innerHTML) == "string" && (typeof this.getElement.value.innerHTML == "string" && (await pt(), this.getElement.value.textContent = t, this.pageBuilderStateStore.setTextAreaVueModel(this.getElement.value.innerHTML), this.getElement.value.innerHTML = t), this.ensureTextAreaHasContent());
|
|
1473
1472
|
});
|
|
1474
1473
|
this.hasStartedEditing = !1, this.pageBuilderStateStore = t, this.getLocalStorageItemName = $(
|
|
1475
1474
|
() => this.pageBuilderStateStore.getLocalStorageItemName
|
|
@@ -1496,37 +1495,16 @@ class kx {
|
|
|
1496
1495
|
"SPAN",
|
|
1497
1496
|
"BLOCKQUOTE",
|
|
1498
1497
|
"BR"
|
|
1499
|
-
]
|
|
1498
|
+
];
|
|
1500
1499
|
}
|
|
1501
1500
|
// Deselect any selected or hovered elements in the builder UI
|
|
1502
1501
|
async clearHtmlSelection() {
|
|
1503
1502
|
this.pageBuilderStateStore.setComponent(null), this.pageBuilderStateStore.setElement(null), await V(this, _, Wc).call(this);
|
|
1504
1503
|
}
|
|
1505
1504
|
async tryMountPendingComponents() {
|
|
1506
|
-
this.deleteAllComponentsFromDOM();
|
|
1507
|
-
const t = this.loadStoredComponentsFromStorage();
|
|
1508
|
-
this.pageBuilderStateStore.
|
|
1509
|
-
const e = this.pageBuilderStateStore.getPageBuilderConfig, o = e && e.updateOrCreate && e.updateOrCreate.formType;
|
|
1510
|
-
if (e) {
|
|
1511
|
-
if (e && o === "update" && t && typeof t == "string" && this.pendingMountData && this.pageBuilderStateStore.setHasLocalDraftForUpdate(!0), e && o === "update") {
|
|
1512
|
-
if (this.pendingMountData) {
|
|
1513
|
-
V(this, _, hi).call(this, this.pendingMountData);
|
|
1514
|
-
return;
|
|
1515
|
-
}
|
|
1516
|
-
if (typeof t == "string") {
|
|
1517
|
-
await V(this, _, no).call(this, t), V(this, _, hi).call(this);
|
|
1518
|
-
return;
|
|
1519
|
-
}
|
|
1520
|
-
await lt(), await qt(this, Qt).call(this), this.pageBuilderStateStore.setIsRestoring(!1), this.pageBuilderStateStore.setIsLoadingGlobal(!1);
|
|
1521
|
-
}
|
|
1522
|
-
if (e && o === "create") {
|
|
1523
|
-
if (typeof t == "string") {
|
|
1524
|
-
await V(this, _, no).call(this, t), V(this, _, hi).call(this);
|
|
1525
|
-
return;
|
|
1526
|
-
}
|
|
1527
|
-
await lt(), await qt(this, Qt).call(this), this.pageBuilderStateStore.setIsRestoring(!1), this.pageBuilderStateStore.setIsLoadingGlobal(!1);
|
|
1528
|
-
}
|
|
1529
|
-
}
|
|
1505
|
+
this.pageBuilderStateStore.setIsLoadingGlobal(!0), await Se(400), this.deleteAllComponentsFromDOM();
|
|
1506
|
+
const t = this.loadStoredComponentsFromStorage(), e = this.pageBuilderStateStore.getPageBuilderConfig, o = e && e.updateOrCreate && e.updateOrCreate.formType;
|
|
1507
|
+
e && (o === "update" && (t && typeof t == "string" && this.pageBuilderStateStore.setHasLocalDraftForUpdate(!0), this.pendingMountData && V(this, _, hi).call(this, this.pendingMountData), typeof t == "string" && !this.pendingMountData && (await V(this, _, no).call(this, t), V(this, _, hi).call(this))), o === "create" && typeof t == "string" && (await V(this, _, no).call(this, t), V(this, _, hi).call(this)), await pt(), await Xt(this, ae).call(this), this.pageBuilderStateStore.setIsRestoring(!1), this.pageBuilderStateStore.setIsLoadingGlobal(!1));
|
|
1530
1508
|
}
|
|
1531
1509
|
/**
|
|
1532
1510
|
* - Entry point for initializing the Page Builder.
|
|
@@ -1549,7 +1527,7 @@ class kx {
|
|
|
1549
1527
|
};
|
|
1550
1528
|
return i && (n.validation = i), Array.isArray(e) && e.length >= 0 && (n.passedComponentsArray = e), n;
|
|
1551
1529
|
} catch (n) {
|
|
1552
|
-
return console.error("Not able to start the Page Builder", n),
|
|
1530
|
+
return console.error("Not able to start the Page Builder", n), {
|
|
1553
1531
|
error: !0,
|
|
1554
1532
|
reason: "Failed to start the Page Builder due to an unexpected error."
|
|
1555
1533
|
};
|
|
@@ -1590,7 +1568,7 @@ class kx {
|
|
|
1590
1568
|
t || this.pageBuilderStateStore.setFontDesktop("none"), i && !t && this.pageBuilderStateStore.setFontDesktop(i);
|
|
1591
1569
|
}
|
|
1592
1570
|
async toggleTipTapModal(t) {
|
|
1593
|
-
this.pageBuilderStateStore.setShowModalTipTap(t), await
|
|
1571
|
+
this.pageBuilderStateStore.setShowModalTipTap(t), await pt(), await Xt(this, ae).call(this), t || await this.handleAutoSave();
|
|
1594
1572
|
}
|
|
1595
1573
|
isEditableElement(t) {
|
|
1596
1574
|
return t ? !this.NoneListernesTags.includes(t.tagName) : !1;
|
|
@@ -1628,16 +1606,16 @@ class kx {
|
|
|
1628
1606
|
V(this, _, yt).call(this, t, Jo.fontStyle, "setFontStyle");
|
|
1629
1607
|
}
|
|
1630
1608
|
handleVerticalPadding(t) {
|
|
1631
|
-
V(this, _, yt).call(this, t,
|
|
1609
|
+
V(this, _, yt).call(this, t, Nr.verticalPadding, "setFontVerticalPadding");
|
|
1632
1610
|
}
|
|
1633
1611
|
handleHorizontalPadding(t) {
|
|
1634
|
-
V(this, _, yt).call(this, t,
|
|
1612
|
+
V(this, _, yt).call(this, t, Nr.horizontalPadding, "setFontHorizontalPadding");
|
|
1635
1613
|
}
|
|
1636
1614
|
handleVerticalMargin(t) {
|
|
1637
|
-
V(this, _, yt).call(this, t,
|
|
1615
|
+
V(this, _, yt).call(this, t, Nr.verticalMargin, "setFontVerticalMargin");
|
|
1638
1616
|
}
|
|
1639
1617
|
handleHorizontalMargin(t) {
|
|
1640
|
-
V(this, _, yt).call(this, t,
|
|
1618
|
+
V(this, _, yt).call(this, t, Nr.horizontalMargin, "setFontHorizontalMargin");
|
|
1641
1619
|
}
|
|
1642
1620
|
handleBorderStyle(t) {
|
|
1643
1621
|
V(this, _, yt).call(this, t, Yo.borderStyle, "setBorderStyle");
|
|
@@ -1656,19 +1634,19 @@ class kx {
|
|
|
1656
1634
|
V(this, _, yt).call(this, t, Gn.textColorVariables, "setTextColor");
|
|
1657
1635
|
}
|
|
1658
1636
|
handleBorderRadiusGlobal(t) {
|
|
1659
|
-
V(this, _, yt).call(this, t,
|
|
1637
|
+
V(this, _, yt).call(this, t, qe.roundedGlobal, "setBorderRadiusGlobal");
|
|
1660
1638
|
}
|
|
1661
1639
|
handleBorderRadiusTopLeft(t) {
|
|
1662
|
-
V(this, _, yt).call(this, t,
|
|
1640
|
+
V(this, _, yt).call(this, t, qe.roundedTopLeft, "setBorderRadiusTopLeft");
|
|
1663
1641
|
}
|
|
1664
1642
|
handleBorderRadiusTopRight(t) {
|
|
1665
|
-
V(this, _, yt).call(this, t,
|
|
1643
|
+
V(this, _, yt).call(this, t, qe.roundedTopRight, "setBorderRadiusTopRight");
|
|
1666
1644
|
}
|
|
1667
1645
|
handleBorderRadiusBottomleft(t) {
|
|
1668
|
-
V(this, _, yt).call(this, t,
|
|
1646
|
+
V(this, _, yt).call(this, t, qe.roundedBottomLeft, "setBorderRadiusBottomleft");
|
|
1669
1647
|
}
|
|
1670
1648
|
handleBorderRadiusBottomRight(t) {
|
|
1671
|
-
V(this, _, yt).call(this, t,
|
|
1649
|
+
V(this, _, yt).call(this, t, qe.roundedBottomRight, "setBorderRadiusBottomRight");
|
|
1672
1650
|
}
|
|
1673
1651
|
// border radius / end
|
|
1674
1652
|
handleFontSizeTablet(t) {
|
|
@@ -1699,7 +1677,7 @@ class kx {
|
|
|
1699
1677
|
}
|
|
1700
1678
|
async deleteComponentFromDOM() {
|
|
1701
1679
|
var n;
|
|
1702
|
-
V(this, _, Uc).call(this), await
|
|
1680
|
+
V(this, _, Uc).call(this), await pt();
|
|
1703
1681
|
const t = this.getComponents.value;
|
|
1704
1682
|
if (!t) return;
|
|
1705
1683
|
const e = t.findIndex(
|
|
@@ -1722,7 +1700,7 @@ class kx {
|
|
|
1722
1700
|
);
|
|
1723
1701
|
a && a.remove();
|
|
1724
1702
|
}
|
|
1725
|
-
await
|
|
1703
|
+
await pt(), await Xt(this, ae).call(this), this.pageBuilderStateStore.setComponent(null), this.pageBuilderStateStore.setElement(null), await this.handleAutoSave();
|
|
1726
1704
|
}
|
|
1727
1705
|
async deleteElementFromDOM() {
|
|
1728
1706
|
var e;
|
|
@@ -1732,7 +1710,7 @@ class kx {
|
|
|
1732
1710
|
this.pageBuilderStateStore.setComponent(null), this.pageBuilderStateStore.setElement(null);
|
|
1733
1711
|
return;
|
|
1734
1712
|
}
|
|
1735
|
-
((e = t.parentElement) == null ? void 0 : e.tagName) !== "SECTION" && (this.pageBuilderStateStore.setParentElement(t.parentNode), this.pageBuilderStateStore.setRestoredElement(t.outerHTML), this.pageBuilderStateStore.setNextSibling(t.nextSibling), t.remove()), this.pageBuilderStateStore.setComponent(null), this.pageBuilderStateStore.setElement(null), await this.clearHtmlSelection(), await
|
|
1713
|
+
((e = t.parentElement) == null ? void 0 : e.tagName) !== "SECTION" && (this.pageBuilderStateStore.setParentElement(t.parentNode), this.pageBuilderStateStore.setRestoredElement(t.outerHTML), this.pageBuilderStateStore.setNextSibling(t.nextSibling), t.remove()), this.pageBuilderStateStore.setComponent(null), this.pageBuilderStateStore.setElement(null), await this.clearHtmlSelection(), await pt(), await Xt(this, ae).call(this);
|
|
1736
1714
|
}
|
|
1737
1715
|
}
|
|
1738
1716
|
async restoreDeletedElementToDOM() {
|
|
@@ -1741,7 +1719,7 @@ class kx {
|
|
|
1741
1719
|
const i = document.createElement("div");
|
|
1742
1720
|
i.innerHTML = t, i.firstChild && e.insertBefore(i.firstChild, o);
|
|
1743
1721
|
}
|
|
1744
|
-
this.pageBuilderStateStore.setParentElement(null), this.pageBuilderStateStore.setRestoredElement(null), this.pageBuilderStateStore.setNextSibling(null), this.pageBuilderStateStore.setComponent(null), this.pageBuilderStateStore.setElement(null), await
|
|
1722
|
+
this.pageBuilderStateStore.setParentElement(null), this.pageBuilderStateStore.setRestoredElement(null), this.pageBuilderStateStore.setNextSibling(null), this.pageBuilderStateStore.setComponent(null), this.pageBuilderStateStore.setElement(null), await pt(), await Xt(this, ae).call(this);
|
|
1745
1723
|
}
|
|
1746
1724
|
handleRemoveClasses(t) {
|
|
1747
1725
|
var e, o;
|
|
@@ -1796,7 +1774,7 @@ class kx {
|
|
|
1796
1774
|
return t.trim().toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "").replace(/-+/g, "-").replace(/^-+|-+$/g, "");
|
|
1797
1775
|
}
|
|
1798
1776
|
async removeCurrentComponentsFromLocalStorage() {
|
|
1799
|
-
V(this, _, io).call(this), await
|
|
1777
|
+
V(this, _, io).call(this), await pt();
|
|
1800
1778
|
const t = this.getLocalStorageItemName.value;
|
|
1801
1779
|
t && localStorage.removeItem(t);
|
|
1802
1780
|
}
|
|
@@ -1838,14 +1816,14 @@ class kx {
|
|
|
1838
1816
|
const o = this.getLocalStorageItemName.value;
|
|
1839
1817
|
if (typeof o == "string") {
|
|
1840
1818
|
const i = localStorage.getItem(o);
|
|
1841
|
-
typeof i == "string" && (this.pageBuilderStateStore.setIsLoadingResumeEditing(!0), await
|
|
1819
|
+
typeof i == "string" && (this.pageBuilderStateStore.setIsLoadingResumeEditing(!0), await Se(400), await V(this, _, no).call(this, i), this.pageBuilderStateStore.setIsLoadingResumeEditing(!1));
|
|
1842
1820
|
}
|
|
1843
|
-
await
|
|
1821
|
+
await pt(), await Xt(this, ae).call(this), this.pageBuilderStateStore.setIsLoadingResumeEditing(!1);
|
|
1844
1822
|
}
|
|
1845
1823
|
async restoreOriginalContent() {
|
|
1846
1824
|
V(this, _, io).call(this);
|
|
1847
1825
|
const t = this.pageBuilderStateStore.getPageBuilderConfig;
|
|
1848
|
-
(t && t.updateOrCreate && t.updateOrCreate.formType) === "update" && (this.pageBuilderStateStore.setIsRestoring(!0), await
|
|
1826
|
+
(t && t.updateOrCreate && t.updateOrCreate.formType) === "update" && (this.pageBuilderStateStore.setIsRestoring(!0), await Se(400), Array.isArray(this.originalComponents) && (await V(this, _, Rn).call(this, this.originalComponents), this.removeCurrentComponentsFromLocalStorage()), await pt(), await Xt(this, ae).call(this), this.pageBuilderStateStore.setIsRestoring(!1));
|
|
1849
1827
|
}
|
|
1850
1828
|
getStorageItemNameForResource() {
|
|
1851
1829
|
return this.getLocalStorageItemName.value;
|
|
@@ -1874,7 +1852,7 @@ class kx {
|
|
|
1874
1852
|
* If no element is selected or no image is staged, nothing happens.
|
|
1875
1853
|
*/
|
|
1876
1854
|
async applyPendingImageToSelectedElement() {
|
|
1877
|
-
this.getElement.value && this.getApplyImageToSelection.value && this.getApplyImageToSelection.value.src && (await
|
|
1855
|
+
this.getElement.value && this.getApplyImageToSelection.value && this.getApplyImageToSelection.value.src && (await pt(), this.pageBuilderStateStore.setBasePrimaryImage(`${this.getApplyImageToSelection.value.src}`), await this.handleAutoSave());
|
|
1878
1856
|
}
|
|
1879
1857
|
/**
|
|
1880
1858
|
* Inspects the currently selected element and, if it contains exactly one <img> and no <div>,
|
|
@@ -1920,13 +1898,13 @@ class kx {
|
|
|
1920
1898
|
o && this.getComponentArrayAddMethod.value === "push" && o.scrollTo({
|
|
1921
1899
|
top: o.scrollHeight + 50,
|
|
1922
1900
|
behavior: "smooth"
|
|
1923
|
-
}), await
|
|
1901
|
+
}), await pt(), await Xt(this, ae).call(this), await this.handleAutoSave();
|
|
1924
1902
|
} catch (e) {
|
|
1925
1903
|
console.error("Error adding component:", e);
|
|
1926
1904
|
}
|
|
1927
1905
|
}
|
|
1928
1906
|
async initializeElementStyles() {
|
|
1929
|
-
await
|
|
1907
|
+
await pt(), this.handleHyperlink(void 0, null, !1), this.handleOpacity(void 0), this.handleBackgroundOpacity(void 0), this.setBasePrimaryImageFromSelectedElement(), this.handleBorderStyle(void 0), this.handleBorderWidth(void 0), this.handleBorderColor(void 0), this.handleBorderRadiusGlobal(void 0), this.handleBorderRadiusTopLeft(void 0), this.handleBorderRadiusTopRight(void 0), this.handleBorderRadiusBottomleft(void 0), this.handleBorderRadiusBottomRight(void 0), this.handleFontSizeBase(void 0), this.handleFontSizeDesktop(void 0), this.handleFontSizeTablet(void 0), this.handleFontSizeMobile(void 0), this.handleFontWeight(void 0), this.handleFontFamily(void 0), this.handleFontStyle(void 0), this.handleVerticalPadding(void 0), this.handleHorizontalPadding(void 0), this.handleVerticalMargin(void 0), this.handleHorizontalMargin(void 0), this.handleBackgroundColor(void 0), this.handleTextColor(void 0), await V(this, _, qc).call(this);
|
|
1930
1908
|
}
|
|
1931
1909
|
}
|
|
1932
1910
|
_ = new WeakSet(), _c = function(t) {
|
|
@@ -2012,9 +1990,8 @@ _ = new WeakSet(), _c = function(t) {
|
|
|
2012
1990
|
let o;
|
|
2013
1991
|
typeof t == "string" ? o = t : t !== void 0 ? o = JSON.stringify(t) : o = "", await V(this, _, no).call(this, o);
|
|
2014
1992
|
}, hi = async function(t) {
|
|
2015
|
-
this.pageBuilderStateStore.setIsLoadingGlobal(!0);
|
|
2016
1993
|
const e = this.loadStoredComponentsFromStorage();
|
|
2017
|
-
await this.
|
|
1994
|
+
await this.clearHtmlSelection(), t && (!this.pendingMountData && e && typeof e == "string" ? await V(this, _, no).call(this, e) : (await V(this, _, Rn).call(this, t), this.pendingMountData = null)), t || (e && typeof e == "string" ? await V(this, _, no).call(this, e) : await V(this, _, Rn).call(this, [])), await pt(), await Xt(this, ae).call(this), this.deleteOldPageBuilderLocalStorage();
|
|
2018
1995
|
}, yt = function(t, e, o) {
|
|
2019
1996
|
const i = this.getElement.value;
|
|
2020
1997
|
if (!i) return;
|
|
@@ -2034,7 +2011,7 @@ _ = new WeakSet(), _c = function(t) {
|
|
|
2034
2011
|
const o = document.createElement("div");
|
|
2035
2012
|
(e = t.parentNode) == null || e.insertBefore(o, t), o.appendChild(t);
|
|
2036
2013
|
}
|
|
2037
|
-
}, za = new WeakMap(), Fa = new WeakMap(), Ha = new WeakMap(),
|
|
2014
|
+
}, za = new WeakMap(), Fa = new WeakMap(), Ha = new WeakMap(), ae = new WeakMap(), Wc = async function() {
|
|
2038
2015
|
const t = document.querySelector("#pagebuilder");
|
|
2039
2016
|
if (!t) return;
|
|
2040
2017
|
const e = t.querySelector("[hovered]");
|
|
@@ -2234,7 +2211,7 @@ $n = function(t, e = "pbx-") {
|
|
|
2234
2211
|
l.setAttribute("data-component-title", p), n.title = p, n.html_code = l.outerHTML;
|
|
2235
2212
|
}
|
|
2236
2213
|
return n;
|
|
2237
|
-
})), this.pageBuilderStateStore.setComponents(i), await
|
|
2214
|
+
})), this.pageBuilderStateStore.setComponents(i), await pt(), await Xt(this, ae).call(this);
|
|
2238
2215
|
} catch (e) {
|
|
2239
2216
|
console.error("Error parsing JSON components:", e), this.deleteAllComponentsFromDOM();
|
|
2240
2217
|
}
|
|
@@ -2256,7 +2233,7 @@ $n = function(t, e = "pbx-") {
|
|
|
2256
2233
|
id: l,
|
|
2257
2234
|
title: p
|
|
2258
2235
|
});
|
|
2259
|
-
}), this.pageBuilderStateStore.setComponents(n), await this.clearHtmlSelection(), await
|
|
2236
|
+
}), this.pageBuilderStateStore.setComponents(n), await this.clearHtmlSelection(), await pt(), await Xt(this, ae).call(this);
|
|
2260
2237
|
} catch (e) {
|
|
2261
2238
|
console.error("Error parsing HTML components:", e), this.deleteAllComponentsFromDOM();
|
|
2262
2239
|
}
|
|
@@ -2374,11 +2351,11 @@ const Hi = (r) => wi = r, Qc = process.env.NODE_ENV !== "production" ? Symbol("p
|
|
|
2374
2351
|
function ko(r) {
|
|
2375
2352
|
return r && typeof r == "object" && Object.prototype.toString.call(r) === "[object Object]" && typeof r.toJSON != "function";
|
|
2376
2353
|
}
|
|
2377
|
-
var
|
|
2354
|
+
var Ke;
|
|
2378
2355
|
(function(r) {
|
|
2379
2356
|
r.direct = "direct", r.patchObject = "patch object", r.patchFunction = "patch function";
|
|
2380
|
-
})(
|
|
2381
|
-
const
|
|
2357
|
+
})(Ke || (Ke = {}));
|
|
2358
|
+
const Ir = typeof window < "u", $p = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof global == "object" && global.global === global ? global : typeof globalThis == "object" ? globalThis : { HTMLElement: null };
|
|
2382
2359
|
function Px(r, { autoBom: t = !1 } = {}) {
|
|
2383
2360
|
return t && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(r.type) ? new Blob(["\uFEFF", r], { type: r.type }) : r;
|
|
2384
2361
|
}
|
|
@@ -2407,7 +2384,7 @@ function _n(r) {
|
|
|
2407
2384
|
e.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), r.dispatchEvent(e);
|
|
2408
2385
|
}
|
|
2409
2386
|
}
|
|
2410
|
-
const zn = typeof navigator == "object" ? navigator : { userAgent: "" }, tb = /Macintosh/.test(zn.userAgent) && /AppleWebKit/.test(zn.userAgent) && !/Safari/.test(zn.userAgent), eb =
|
|
2387
|
+
const zn = typeof navigator == "object" ? navigator : { userAgent: "" }, tb = /Macintosh/.test(zn.userAgent) && /AppleWebKit/.test(zn.userAgent) && !/Safari/.test(zn.userAgent), eb = Ir ? (
|
|
2411
2388
|
// Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
|
|
2412
2389
|
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !tb ? Ax : (
|
|
2413
2390
|
// Use msSaveOrOpenBlob as a second approach
|
|
@@ -2501,18 +2478,18 @@ async function Rx(r) {
|
|
|
2501
2478
|
At("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(t);
|
|
2502
2479
|
}
|
|
2503
2480
|
}
|
|
2504
|
-
let
|
|
2481
|
+
let ir;
|
|
2505
2482
|
function $x() {
|
|
2506
|
-
|
|
2483
|
+
ir || (ir = document.createElement("input"), ir.type = "file", ir.accept = ".json");
|
|
2507
2484
|
function r() {
|
|
2508
2485
|
return new Promise((t, e) => {
|
|
2509
|
-
|
|
2510
|
-
const o =
|
|
2486
|
+
ir.onchange = async () => {
|
|
2487
|
+
const o = ir.files;
|
|
2511
2488
|
if (!o)
|
|
2512
2489
|
return t(null);
|
|
2513
2490
|
const i = o.item(0);
|
|
2514
2491
|
return t(i ? { text: await i.text(), file: i } : null);
|
|
2515
|
-
},
|
|
2492
|
+
}, ir.oncancel = () => t(null), ir.onerror = e, ir.click();
|
|
2516
2493
|
});
|
|
2517
2494
|
}
|
|
2518
2495
|
return r;
|
|
@@ -2534,7 +2511,7 @@ function ib(r, t) {
|
|
|
2534
2511
|
o ? Object.assign(o, t[e]) : r.state.value[e] = t[e];
|
|
2535
2512
|
}
|
|
2536
2513
|
}
|
|
2537
|
-
function
|
|
2514
|
+
function Ie(r) {
|
|
2538
2515
|
return {
|
|
2539
2516
|
_custom: {
|
|
2540
2517
|
display: r
|
|
@@ -2594,26 +2571,26 @@ function Hx(r) {
|
|
|
2594
2571
|
operations: [],
|
|
2595
2572
|
newValue: {}
|
|
2596
2573
|
}) : {
|
|
2597
|
-
operation:
|
|
2598
|
-
key:
|
|
2574
|
+
operation: Ie(r.type),
|
|
2575
|
+
key: Ie(r.key),
|
|
2599
2576
|
oldValue: r.oldValue,
|
|
2600
2577
|
newValue: r.newValue
|
|
2601
2578
|
} : {};
|
|
2602
2579
|
}
|
|
2603
2580
|
function jx(r) {
|
|
2604
2581
|
switch (r) {
|
|
2605
|
-
case
|
|
2582
|
+
case Ke.direct:
|
|
2606
2583
|
return "mutation";
|
|
2607
|
-
case
|
|
2584
|
+
case Ke.patchFunction:
|
|
2608
2585
|
return "$patch";
|
|
2609
|
-
case
|
|
2586
|
+
case Ke.patchObject:
|
|
2610
2587
|
return "$patch";
|
|
2611
2588
|
default:
|
|
2612
2589
|
return "unknown";
|
|
2613
2590
|
}
|
|
2614
2591
|
}
|
|
2615
2592
|
let Uo = !0;
|
|
2616
|
-
const Hn = [], ao = "pinia:mutations",
|
|
2593
|
+
const Hn = [], ao = "pinia:mutations", Kt = "pinia", { assign: Vx } = Object, Yn = (r) => "🍍 " + r;
|
|
2617
2594
|
function Wx(r, t) {
|
|
2618
2595
|
Xc({
|
|
2619
2596
|
id: "dev.esm.pinia",
|
|
@@ -2629,7 +2606,7 @@ function Wx(r, t) {
|
|
|
2629
2606
|
label: "Pinia 🍍",
|
|
2630
2607
|
color: 15064968
|
|
2631
2608
|
}), e.addInspector({
|
|
2632
|
-
id:
|
|
2609
|
+
id: Kt,
|
|
2633
2610
|
label: "Pinia 🍍",
|
|
2634
2611
|
icon: "storage",
|
|
2635
2612
|
treeFilterPlaceholder: "Search stores",
|
|
@@ -2644,7 +2621,7 @@ function Wx(r, t) {
|
|
|
2644
2621
|
{
|
|
2645
2622
|
icon: "content_paste",
|
|
2646
2623
|
action: async () => {
|
|
2647
|
-
await Lx(t), e.sendInspectorTree(
|
|
2624
|
+
await Lx(t), e.sendInspectorTree(Kt), e.sendInspectorState(Kt);
|
|
2648
2625
|
},
|
|
2649
2626
|
tooltip: "Replace the state with the content of your clipboard"
|
|
2650
2627
|
},
|
|
@@ -2658,7 +2635,7 @@ function Wx(r, t) {
|
|
|
2658
2635
|
{
|
|
2659
2636
|
icon: "folder_open",
|
|
2660
2637
|
action: async () => {
|
|
2661
|
-
await _x(t), e.sendInspectorTree(
|
|
2638
|
+
await _x(t), e.sendInspectorTree(Kt), e.sendInspectorState(Kt);
|
|
2662
2639
|
},
|
|
2663
2640
|
tooltip: "Import the state from a JSON file"
|
|
2664
2641
|
}
|
|
@@ -2684,7 +2661,7 @@ function Wx(r, t) {
|
|
|
2684
2661
|
editable: !0,
|
|
2685
2662
|
value: s._isOptionsAPI ? {
|
|
2686
2663
|
_custom: {
|
|
2687
|
-
value:
|
|
2664
|
+
value: Ut(s.$state),
|
|
2688
2665
|
actions: [
|
|
2689
2666
|
{
|
|
2690
2667
|
icon: "restore",
|
|
@@ -2713,19 +2690,19 @@ function Wx(r, t) {
|
|
|
2713
2690
|
});
|
|
2714
2691
|
}
|
|
2715
2692
|
}), e.on.getInspectorTree((o) => {
|
|
2716
|
-
if (o.app === r && o.inspectorId ===
|
|
2693
|
+
if (o.app === r && o.inspectorId === Kt) {
|
|
2717
2694
|
let i = [t];
|
|
2718
2695
|
i = i.concat(Array.from(t._s.values())), o.rootNodes = (o.filter ? i.filter((n) => "$id" in n ? n.$id.toLowerCase().includes(o.filter.toLowerCase()) : nb.toLowerCase().includes(o.filter.toLowerCase())) : i).map(zx);
|
|
2719
2696
|
}
|
|
2720
2697
|
}), globalThis.$pinia = t, e.on.getInspectorState((o) => {
|
|
2721
|
-
if (o.app === r && o.inspectorId ===
|
|
2698
|
+
if (o.app === r && o.inspectorId === Kt) {
|
|
2722
2699
|
const i = o.nodeId === Fn ? t : t._s.get(o.nodeId);
|
|
2723
2700
|
if (!i)
|
|
2724
2701
|
return;
|
|
2725
|
-
i && (o.nodeId !== Fn && (globalThis.$store =
|
|
2702
|
+
i && (o.nodeId !== Fn && (globalThis.$store = Ut(i)), o.state = Fx(i));
|
|
2726
2703
|
}
|
|
2727
2704
|
}), e.on.editInspectorState((o, i) => {
|
|
2728
|
-
if (o.app === r && o.inspectorId ===
|
|
2705
|
+
if (o.app === r && o.inspectorId === Kt) {
|
|
2729
2706
|
const n = o.nodeId === Fn ? t : t._s.get(o.nodeId);
|
|
2730
2707
|
if (!n)
|
|
2731
2708
|
return At(`store "${o.nodeId}" not found`, "error");
|
|
@@ -2779,22 +2756,22 @@ function qx(r, t) {
|
|
|
2779
2756
|
title: "🛫 " + l,
|
|
2780
2757
|
subtitle: "start",
|
|
2781
2758
|
data: {
|
|
2782
|
-
store:
|
|
2783
|
-
action:
|
|
2759
|
+
store: Ie(t.$id),
|
|
2760
|
+
action: Ie(l),
|
|
2784
2761
|
args: p
|
|
2785
2762
|
},
|
|
2786
2763
|
groupId: d
|
|
2787
2764
|
}
|
|
2788
2765
|
}), a((c) => {
|
|
2789
|
-
|
|
2766
|
+
Lr = void 0, e.addTimelineEvent({
|
|
2790
2767
|
layerId: ao,
|
|
2791
2768
|
event: {
|
|
2792
2769
|
time: o(),
|
|
2793
2770
|
title: "🛬 " + l,
|
|
2794
2771
|
subtitle: "end",
|
|
2795
2772
|
data: {
|
|
2796
|
-
store:
|
|
2797
|
-
action:
|
|
2773
|
+
store: Ie(t.$id),
|
|
2774
|
+
action: Ie(l),
|
|
2798
2775
|
args: p,
|
|
2799
2776
|
result: c
|
|
2800
2777
|
},
|
|
@@ -2802,7 +2779,7 @@ function qx(r, t) {
|
|
|
2802
2779
|
}
|
|
2803
2780
|
});
|
|
2804
2781
|
}), s((c) => {
|
|
2805
|
-
|
|
2782
|
+
Lr = void 0, e.addTimelineEvent({
|
|
2806
2783
|
layerId: ao,
|
|
2807
2784
|
event: {
|
|
2808
2785
|
time: o(),
|
|
@@ -2810,8 +2787,8 @@ function qx(r, t) {
|
|
|
2810
2787
|
title: "💥 " + l,
|
|
2811
2788
|
subtitle: "end",
|
|
2812
2789
|
data: {
|
|
2813
|
-
store:
|
|
2814
|
-
action:
|
|
2790
|
+
store: Ie(t.$id),
|
|
2791
|
+
action: Ie(l),
|
|
2815
2792
|
args: p,
|
|
2816
2793
|
error: c
|
|
2817
2794
|
},
|
|
@@ -2821,7 +2798,7 @@ function qx(r, t) {
|
|
|
2821
2798
|
});
|
|
2822
2799
|
}, !0), t._customProperties.forEach((a) => {
|
|
2823
2800
|
ot(() => T(t[a]), (s, l) => {
|
|
2824
|
-
e.notifyComponentUpdate(), e.sendInspectorState(
|
|
2801
|
+
e.notifyComponentUpdate(), e.sendInspectorState(Kt), Uo && e.addTimelineEvent({
|
|
2825
2802
|
layerId: ao,
|
|
2826
2803
|
event: {
|
|
2827
2804
|
time: o(),
|
|
@@ -2831,20 +2808,20 @@ function qx(r, t) {
|
|
|
2831
2808
|
newValue: s,
|
|
2832
2809
|
oldValue: l
|
|
2833
2810
|
},
|
|
2834
|
-
groupId:
|
|
2811
|
+
groupId: Lr
|
|
2835
2812
|
}
|
|
2836
2813
|
});
|
|
2837
2814
|
}, { deep: !0 });
|
|
2838
2815
|
}), t.$subscribe(({ events: a, type: s }, l) => {
|
|
2839
|
-
if (e.notifyComponentUpdate(), e.sendInspectorState(
|
|
2816
|
+
if (e.notifyComponentUpdate(), e.sendInspectorState(Kt), !Uo)
|
|
2840
2817
|
return;
|
|
2841
2818
|
const p = {
|
|
2842
2819
|
time: o(),
|
|
2843
2820
|
title: jx(s),
|
|
2844
|
-
data: Vx({ store:
|
|
2845
|
-
groupId:
|
|
2821
|
+
data: Vx({ store: Ie(t.$id) }, Hx(a)),
|
|
2822
|
+
groupId: Lr
|
|
2846
2823
|
};
|
|
2847
|
-
s ===
|
|
2824
|
+
s === Ke.patchFunction ? p.subtitle = "⤵️" : s === Ke.patchObject ? p.subtitle = "🧩" : a && !Array.isArray(a) && (p.subtitle = a.type), a && (p.data["rawEvent(s)"] = {
|
|
2848
2825
|
_custom: {
|
|
2849
2826
|
display: "DebuggerEvent",
|
|
2850
2827
|
type: "object",
|
|
@@ -2857,7 +2834,7 @@ function qx(r, t) {
|
|
|
2857
2834
|
});
|
|
2858
2835
|
}, { detached: !0, flush: "sync" });
|
|
2859
2836
|
const i = t._hotUpdate;
|
|
2860
|
-
t._hotUpdate =
|
|
2837
|
+
t._hotUpdate = Dr((a) => {
|
|
2861
2838
|
i(a), e.addTimelineEvent({
|
|
2862
2839
|
layerId: ao,
|
|
2863
2840
|
event: {
|
|
@@ -2865,34 +2842,34 @@ function qx(r, t) {
|
|
|
2865
2842
|
title: "🔥 " + t.$id,
|
|
2866
2843
|
subtitle: "HMR update",
|
|
2867
2844
|
data: {
|
|
2868
|
-
store:
|
|
2869
|
-
info:
|
|
2845
|
+
store: Ie(t.$id),
|
|
2846
|
+
info: Ie("HMR update")
|
|
2870
2847
|
}
|
|
2871
2848
|
}
|
|
2872
|
-
}), e.notifyComponentUpdate(), e.sendInspectorTree(
|
|
2849
|
+
}), e.notifyComponentUpdate(), e.sendInspectorTree(Kt), e.sendInspectorState(Kt);
|
|
2873
2850
|
});
|
|
2874
2851
|
const { $dispose: n } = t;
|
|
2875
2852
|
t.$dispose = () => {
|
|
2876
|
-
n(), e.notifyComponentUpdate(), e.sendInspectorTree(
|
|
2877
|
-
}, e.notifyComponentUpdate(), e.sendInspectorTree(
|
|
2853
|
+
n(), e.notifyComponentUpdate(), e.sendInspectorTree(Kt), e.sendInspectorState(Kt), e.getSettings().logStoreChanges && At(`Disposed "${t.$id}" store 🗑`);
|
|
2854
|
+
}, e.notifyComponentUpdate(), e.sendInspectorTree(Kt), e.sendInspectorState(Kt), e.getSettings().logStoreChanges && At(`"${t.$id}" store installed 🆕`);
|
|
2878
2855
|
});
|
|
2879
2856
|
}
|
|
2880
|
-
let ab = 0,
|
|
2857
|
+
let ab = 0, Lr;
|
|
2881
2858
|
function _p(r, t, e) {
|
|
2882
|
-
const o = t.reduce((i, n) => (i[n] =
|
|
2859
|
+
const o = t.reduce((i, n) => (i[n] = Ut(r)[n], i), {});
|
|
2883
2860
|
for (const i in o)
|
|
2884
2861
|
r[i] = function() {
|
|
2885
2862
|
const n = ab, a = e ? new Proxy(r, {
|
|
2886
2863
|
get(...l) {
|
|
2887
|
-
return
|
|
2864
|
+
return Lr = n, Reflect.get(...l);
|
|
2888
2865
|
},
|
|
2889
2866
|
set(...l) {
|
|
2890
|
-
return
|
|
2867
|
+
return Lr = n, Reflect.set(...l);
|
|
2891
2868
|
}
|
|
2892
2869
|
}) : r;
|
|
2893
|
-
|
|
2870
|
+
Lr = n;
|
|
2894
2871
|
const s = o[i].apply(a, arguments);
|
|
2895
|
-
return
|
|
2872
|
+
return Lr = void 0, s;
|
|
2896
2873
|
};
|
|
2897
2874
|
}
|
|
2898
2875
|
function Ux({ app: r, store: t, options: e }) {
|
|
@@ -2900,7 +2877,7 @@ function Ux({ app: r, store: t, options: e }) {
|
|
|
2900
2877
|
if (t._isOptionsAPI = !!e.state, !t._p._testing) {
|
|
2901
2878
|
_p(t, Object.keys(e.actions), t._isOptionsAPI);
|
|
2902
2879
|
const o = t._hotUpdate;
|
|
2903
|
-
|
|
2880
|
+
Ut(t)._hotUpdate = function(i) {
|
|
2904
2881
|
o.apply(this, arguments), _p(t, Object.keys(i._hmrPayload.actions), !!t._isOptionsAPI);
|
|
2905
2882
|
};
|
|
2906
2883
|
}
|
|
@@ -2914,9 +2891,9 @@ function Ux({ app: r, store: t, options: e }) {
|
|
|
2914
2891
|
function Kx() {
|
|
2915
2892
|
const r = Lc(!0), t = r.run(() => S({}));
|
|
2916
2893
|
let e = [], o = [];
|
|
2917
|
-
const i =
|
|
2894
|
+
const i = Dr({
|
|
2918
2895
|
install(n) {
|
|
2919
|
-
Hi(i), i._a = n, n.provide(Qc, i), n.config.globalProperties.$pinia = i, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" &&
|
|
2896
|
+
Hi(i), i._a = n, n.provide(Qc, i), n.config.globalProperties.$pinia = i, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && Ir && Wx(n, i), o.forEach((a) => e.push(a)), o = [];
|
|
2920
2897
|
},
|
|
2921
2898
|
use(n) {
|
|
2922
2899
|
return this._a ? e.push(n) : o.push(n), this;
|
|
@@ -2929,7 +2906,7 @@ function Kx() {
|
|
|
2929
2906
|
_s: /* @__PURE__ */ new Map(),
|
|
2930
2907
|
state: t
|
|
2931
2908
|
});
|
|
2932
|
-
return process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" &&
|
|
2909
|
+
return process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && Ir && typeof Proxy < "u" && i.use(Ux), i;
|
|
2933
2910
|
}
|
|
2934
2911
|
function sb(r, t) {
|
|
2935
2912
|
for (const e in t) {
|
|
@@ -2987,7 +2964,7 @@ function jp(r, t, e, o) {
|
|
|
2987
2964
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
2988
2965
|
Np(S(i ? i() : {}).value)
|
|
2989
2966
|
) : Np(e.state.value[r]);
|
|
2990
|
-
return ve(d, n, Object.keys(a || {}).reduce((c, m) => (process.env.NODE_ENV !== "production" && m in d && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${m}" in store "${r}".`), c[m] =
|
|
2967
|
+
return ve(d, n, Object.keys(a || {}).reduce((c, m) => (process.env.NODE_ENV !== "production" && m in d && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${m}" in store "${r}".`), c[m] = Dr($(() => {
|
|
2991
2968
|
Hi(e);
|
|
2992
2969
|
const u = e._s.get(r);
|
|
2993
2970
|
return a[m].call(u, u);
|
|
@@ -3012,17 +2989,17 @@ function Ys(r, t, e = {}, o, i, n) {
|
|
|
3012
2989
|
function y(P) {
|
|
3013
2990
|
let E;
|
|
3014
2991
|
p = d = !1, process.env.NODE_ENV !== "production" && (u = []), typeof P == "function" ? (P(o.state.value[r]), E = {
|
|
3015
|
-
type:
|
|
2992
|
+
type: Ke.patchFunction,
|
|
3016
2993
|
storeId: r,
|
|
3017
2994
|
events: u
|
|
3018
2995
|
}) : (Js(o.state.value[r], P), E = {
|
|
3019
|
-
type:
|
|
2996
|
+
type: Ke.patchObject,
|
|
3020
2997
|
payload: P,
|
|
3021
2998
|
storeId: r,
|
|
3022
2999
|
events: u
|
|
3023
3000
|
});
|
|
3024
3001
|
const z = f = Symbol();
|
|
3025
|
-
|
|
3002
|
+
pt().then(() => {
|
|
3026
3003
|
f === z && (p = !0);
|
|
3027
3004
|
}), d = !0, $o(c, E, o.state.value[r]);
|
|
3028
3005
|
}
|
|
@@ -3059,16 +3036,16 @@ function Ys(r, t, e = {}, o, i, n) {
|
|
|
3059
3036
|
after: it,
|
|
3060
3037
|
onError: K
|
|
3061
3038
|
});
|
|
3062
|
-
let
|
|
3039
|
+
let lt;
|
|
3063
3040
|
try {
|
|
3064
|
-
|
|
3041
|
+
lt = P.apply(this && this.$id === r ? this : A, X);
|
|
3065
3042
|
} catch (gt) {
|
|
3066
3043
|
throw $o(ut, gt), gt;
|
|
3067
3044
|
}
|
|
3068
|
-
return
|
|
3045
|
+
return lt instanceof Promise ? lt.then((gt) => ($o(bt, gt), gt)).catch((gt) => ($o(ut, gt), Promise.reject(gt))) : ($o(bt, lt), lt);
|
|
3069
3046
|
};
|
|
3070
3047
|
return z[Fp] = !0, z[bs] = E, z;
|
|
3071
|
-
}, B = /* @__PURE__ */
|
|
3048
|
+
}, B = /* @__PURE__ */ Dr({
|
|
3072
3049
|
actions: {},
|
|
3073
3050
|
getters: {},
|
|
3074
3051
|
state: [],
|
|
@@ -3084,17 +3061,17 @@ function Ys(r, t, e = {}, o, i, n) {
|
|
|
3084
3061
|
const z = zp(c, P, E.detached, () => X()), X = a.run(() => ot(() => o.state.value[r], (bt) => {
|
|
3085
3062
|
(E.flush === "sync" ? d : p) && P({
|
|
3086
3063
|
storeId: r,
|
|
3087
|
-
type:
|
|
3064
|
+
type: Ke.direct,
|
|
3088
3065
|
events: u
|
|
3089
3066
|
}, bt);
|
|
3090
3067
|
}, ve({}, l, E)));
|
|
3091
3068
|
return z;
|
|
3092
3069
|
},
|
|
3093
3070
|
$dispose: k
|
|
3094
|
-
}, A = Ku(process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" &&
|
|
3071
|
+
}, A = Ku(process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && Ir ? ve(
|
|
3095
3072
|
{
|
|
3096
3073
|
_hmrPayload: B,
|
|
3097
|
-
_customProperties:
|
|
3074
|
+
_customProperties: Dr(/* @__PURE__ */ new Set())
|
|
3098
3075
|
// devtools custom properties
|
|
3099
3076
|
},
|
|
3100
3077
|
M
|
|
@@ -3113,10 +3090,10 @@ function Ys(r, t, e = {}, o, i, n) {
|
|
|
3113
3090
|
} else process.env.NODE_ENV !== "production" && Hp(E) && (B.getters[P] = n ? (
|
|
3114
3091
|
// @ts-expect-error
|
|
3115
3092
|
e.getters[P]
|
|
3116
|
-
) : E,
|
|
3117
|
-
(H._getters =
|
|
3093
|
+
) : E, Ir && (H._getters || // @ts-expect-error: same
|
|
3094
|
+
(H._getters = Dr([]))).push(P));
|
|
3118
3095
|
}
|
|
3119
|
-
if (ve(A, H), ve(
|
|
3096
|
+
if (ve(A, H), ve(Ut(A), H), Object.defineProperty(A, "$state", {
|
|
3120
3097
|
get: () => process.env.NODE_ENV !== "production" && i ? g.value : o.state.value[r],
|
|
3121
3098
|
set: (P) => {
|
|
3122
3099
|
if (process.env.NODE_ENV !== "production" && i)
|
|
@@ -3125,7 +3102,7 @@ function Ys(r, t, e = {}, o, i, n) {
|
|
|
3125
3102
|
ve(E, P);
|
|
3126
3103
|
});
|
|
3127
3104
|
}
|
|
3128
|
-
}), process.env.NODE_ENV !== "production" && (A._hotUpdate =
|
|
3105
|
+
}), process.env.NODE_ENV !== "production" && (A._hotUpdate = Dr((P) => {
|
|
3129
3106
|
A._hotUpdating = !0, P._hmrPayload.state.forEach((E) => {
|
|
3130
3107
|
if (E in A.$state) {
|
|
3131
3108
|
const z = P.$state[E], X = A.$state[E];
|
|
@@ -3134,7 +3111,7 @@ function Ys(r, t, e = {}, o, i, n) {
|
|
|
3134
3111
|
vn(A, E, ps(P.$state, E));
|
|
3135
3112
|
}), Object.keys(A.$state).forEach((E) => {
|
|
3136
3113
|
E in P.$state || cs(A, E);
|
|
3137
|
-
}), p = !1, d = !1, o.state.value[r] = ps(P._hmrPayload, "hotState"), d = !0,
|
|
3114
|
+
}), p = !1, d = !1, o.state.value[r] = ps(P._hmrPayload, "hotState"), d = !0, pt().then(() => {
|
|
3138
3115
|
p = !0;
|
|
3139
3116
|
});
|
|
3140
3117
|
for (const E in P._hmrPayload.actions) {
|
|
@@ -3153,7 +3130,7 @@ function Ys(r, t, e = {}, o, i, n) {
|
|
|
3153
3130
|
}), Object.keys(A._hmrPayload.actions).forEach((E) => {
|
|
3154
3131
|
E in P._hmrPayload.actions || cs(A, E);
|
|
3155
3132
|
}), A._hmrPayload = P._hmrPayload, A._getters = P._getters, A._hotUpdating = !1;
|
|
3156
|
-
})), process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" &&
|
|
3133
|
+
})), process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && Ir) {
|
|
3157
3134
|
const P = {
|
|
3158
3135
|
writable: !0,
|
|
3159
3136
|
configurable: !0,
|
|
@@ -3165,7 +3142,7 @@ function Ys(r, t, e = {}, o, i, n) {
|
|
|
3165
3142
|
});
|
|
3166
3143
|
}
|
|
3167
3144
|
return o._p.forEach((P) => {
|
|
3168
|
-
if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" &&
|
|
3145
|
+
if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && Ir) {
|
|
3169
3146
|
const E = a.run(() => P({
|
|
3170
3147
|
store: A,
|
|
3171
3148
|
app: o._a,
|
|
@@ -3204,7 +3181,7 @@ This will fail in production.`);
|
|
|
3204
3181
|
const c = "__hot:" + o, m = n ? Ys(c, t, i, s, !0) : jp(c, ve({}, i), s, !0);
|
|
3205
3182
|
l._hotUpdate(m), delete s.state.value[c], s._s.delete(c);
|
|
3206
3183
|
}
|
|
3207
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
3184
|
+
if (process.env.NODE_ENV !== "production" && Ir) {
|
|
3208
3185
|
const c = Rc();
|
|
3209
3186
|
if (c && c.proxy && // avoid adding stores that are just built for hot module replacement
|
|
3210
3187
|
!l) {
|
|
@@ -3547,7 +3524,7 @@ const Qx = /* @__PURE__ */ Xx("pageBuilderState", {
|
|
|
3547
3524
|
this.textColor = r;
|
|
3548
3525
|
},
|
|
3549
3526
|
setElement(r) {
|
|
3550
|
-
this.element = null,
|
|
3527
|
+
this.element = null, pt(() => {
|
|
3551
3528
|
this.element = r;
|
|
3552
3529
|
});
|
|
3553
3530
|
},
|
|
@@ -3556,12 +3533,12 @@ const Qx = /* @__PURE__ */ Xx("pageBuilderState", {
|
|
|
3556
3533
|
this.element = null, this.component = null;
|
|
3557
3534
|
return;
|
|
3558
3535
|
}
|
|
3559
|
-
this.component = null,
|
|
3536
|
+
this.component = null, pt(() => {
|
|
3560
3537
|
this.component = r;
|
|
3561
3538
|
});
|
|
3562
3539
|
},
|
|
3563
3540
|
setComponents(r) {
|
|
3564
|
-
this.components = [],
|
|
3541
|
+
this.components = [], pt(() => {
|
|
3565
3542
|
this.components = r || [];
|
|
3566
3543
|
});
|
|
3567
3544
|
},
|
|
@@ -6753,7 +6730,7 @@ class Wi {
|
|
|
6753
6730
|
}
|
|
6754
6731
|
}
|
|
6755
6732
|
const xs = /* @__PURE__ */ Object.create(null);
|
|
6756
|
-
class
|
|
6733
|
+
class Jt {
|
|
6757
6734
|
/**
|
|
6758
6735
|
Get the step map that represents the changes made by this step,
|
|
6759
6736
|
and which can be used to transform between positions in the old
|
|
@@ -6836,7 +6813,7 @@ function $l(r, t, e) {
|
|
|
6836
6813
|
}
|
|
6837
6814
|
return N.fromArray(o);
|
|
6838
6815
|
}
|
|
6839
|
-
class
|
|
6816
|
+
class Rr extends Jt {
|
|
6840
6817
|
/**
|
|
6841
6818
|
Create a mark step.
|
|
6842
6819
|
*/
|
|
@@ -6848,14 +6825,14 @@ class Lr extends Yt {
|
|
|
6848
6825
|
return Mt.fromReplace(t, this.from, this.to, n);
|
|
6849
6826
|
}
|
|
6850
6827
|
invert() {
|
|
6851
|
-
return new
|
|
6828
|
+
return new Ue(this.from, this.to, this.mark);
|
|
6852
6829
|
}
|
|
6853
6830
|
map(t) {
|
|
6854
6831
|
let e = t.mapResult(this.from, 1), o = t.mapResult(this.to, -1);
|
|
6855
|
-
return e.deleted && o.deleted || e.pos >= o.pos ? null : new
|
|
6832
|
+
return e.deleted && o.deleted || e.pos >= o.pos ? null : new Rr(e.pos, o.pos, this.mark);
|
|
6856
6833
|
}
|
|
6857
6834
|
merge(t) {
|
|
6858
|
-
return t instanceof
|
|
6835
|
+
return t instanceof Rr && t.mark.eq(this.mark) && this.from <= t.to && this.to >= t.from ? new Rr(Math.min(this.from, t.from), Math.max(this.to, t.to), this.mark) : null;
|
|
6859
6836
|
}
|
|
6860
6837
|
toJSON() {
|
|
6861
6838
|
return {
|
|
@@ -6871,11 +6848,11 @@ class Lr extends Yt {
|
|
|
6871
6848
|
static fromJSON(t, e) {
|
|
6872
6849
|
if (typeof e.from != "number" || typeof e.to != "number")
|
|
6873
6850
|
throw new RangeError("Invalid input for AddMarkStep.fromJSON");
|
|
6874
|
-
return new
|
|
6851
|
+
return new Rr(e.from, e.to, t.markFromJSON(e.mark));
|
|
6875
6852
|
}
|
|
6876
6853
|
}
|
|
6877
|
-
|
|
6878
|
-
class
|
|
6854
|
+
Jt.jsonID("addMark", Rr);
|
|
6855
|
+
class Ue extends Jt {
|
|
6879
6856
|
/**
|
|
6880
6857
|
Create a mark-removing step.
|
|
6881
6858
|
*/
|
|
@@ -6887,14 +6864,14 @@ class qe extends Yt {
|
|
|
6887
6864
|
return Mt.fromReplace(t, this.from, this.to, o);
|
|
6888
6865
|
}
|
|
6889
6866
|
invert() {
|
|
6890
|
-
return new
|
|
6867
|
+
return new Rr(this.from, this.to, this.mark);
|
|
6891
6868
|
}
|
|
6892
6869
|
map(t) {
|
|
6893
6870
|
let e = t.mapResult(this.from, 1), o = t.mapResult(this.to, -1);
|
|
6894
|
-
return e.deleted && o.deleted || e.pos >= o.pos ? null : new
|
|
6871
|
+
return e.deleted && o.deleted || e.pos >= o.pos ? null : new Ue(e.pos, o.pos, this.mark);
|
|
6895
6872
|
}
|
|
6896
6873
|
merge(t) {
|
|
6897
|
-
return t instanceof
|
|
6874
|
+
return t instanceof Ue && t.mark.eq(this.mark) && this.from <= t.to && this.to >= t.from ? new Ue(Math.min(this.from, t.from), Math.max(this.to, t.to), this.mark) : null;
|
|
6898
6875
|
}
|
|
6899
6876
|
toJSON() {
|
|
6900
6877
|
return {
|
|
@@ -6910,11 +6887,11 @@ class qe extends Yt {
|
|
|
6910
6887
|
static fromJSON(t, e) {
|
|
6911
6888
|
if (typeof e.from != "number" || typeof e.to != "number")
|
|
6912
6889
|
throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");
|
|
6913
|
-
return new
|
|
6890
|
+
return new Ue(e.from, e.to, t.markFromJSON(e.mark));
|
|
6914
6891
|
}
|
|
6915
6892
|
}
|
|
6916
|
-
|
|
6917
|
-
class
|
|
6893
|
+
Jt.jsonID("removeMark", Ue);
|
|
6894
|
+
class $r extends Jt {
|
|
6918
6895
|
/**
|
|
6919
6896
|
Create a node mark step.
|
|
6920
6897
|
*/
|
|
@@ -6935,15 +6912,15 @@ class Rr extends Yt {
|
|
|
6935
6912
|
if (o.length == e.marks.length) {
|
|
6936
6913
|
for (let i = 0; i < e.marks.length; i++)
|
|
6937
6914
|
if (!e.marks[i].isInSet(o))
|
|
6938
|
-
return new
|
|
6939
|
-
return new
|
|
6915
|
+
return new $r(this.pos, e.marks[i]);
|
|
6916
|
+
return new $r(this.pos, this.mark);
|
|
6940
6917
|
}
|
|
6941
6918
|
}
|
|
6942
6919
|
return new Co(this.pos, this.mark);
|
|
6943
6920
|
}
|
|
6944
6921
|
map(t) {
|
|
6945
6922
|
let e = t.mapResult(this.pos, 1);
|
|
6946
|
-
return e.deletedAfter ? null : new
|
|
6923
|
+
return e.deletedAfter ? null : new $r(e.pos, this.mark);
|
|
6947
6924
|
}
|
|
6948
6925
|
toJSON() {
|
|
6949
6926
|
return { stepType: "addNodeMark", pos: this.pos, mark: this.mark.toJSON() };
|
|
@@ -6954,11 +6931,11 @@ class Rr extends Yt {
|
|
|
6954
6931
|
static fromJSON(t, e) {
|
|
6955
6932
|
if (typeof e.pos != "number")
|
|
6956
6933
|
throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");
|
|
6957
|
-
return new
|
|
6934
|
+
return new $r(e.pos, t.markFromJSON(e.mark));
|
|
6958
6935
|
}
|
|
6959
6936
|
}
|
|
6960
|
-
|
|
6961
|
-
class Co extends
|
|
6937
|
+
Jt.jsonID("addNodeMark", $r);
|
|
6938
|
+
class Co extends Jt {
|
|
6962
6939
|
/**
|
|
6963
6940
|
Create a mark-removing step.
|
|
6964
6941
|
*/
|
|
@@ -6974,7 +6951,7 @@ class Co extends Yt {
|
|
|
6974
6951
|
}
|
|
6975
6952
|
invert(t) {
|
|
6976
6953
|
let e = t.nodeAt(this.pos);
|
|
6977
|
-
return !e || !this.mark.isInSet(e.marks) ? this : new
|
|
6954
|
+
return !e || !this.mark.isInSet(e.marks) ? this : new $r(this.pos, this.mark);
|
|
6978
6955
|
}
|
|
6979
6956
|
map(t) {
|
|
6980
6957
|
let e = t.mapResult(this.pos, 1);
|
|
@@ -6992,8 +6969,8 @@ class Co extends Yt {
|
|
|
6992
6969
|
return new Co(e.pos, t.markFromJSON(e.mark));
|
|
6993
6970
|
}
|
|
6994
6971
|
}
|
|
6995
|
-
|
|
6996
|
-
class Dt extends
|
|
6972
|
+
Jt.jsonID("removeNodeMark", Co);
|
|
6973
|
+
class Dt extends Jt {
|
|
6997
6974
|
/**
|
|
6998
6975
|
The given `slice` should fit the 'gap' between `from` and
|
|
6999
6976
|
`to`—the depths must line up, and the surrounding nodes must be
|
|
@@ -7044,8 +7021,8 @@ class Dt extends Yt {
|
|
|
7044
7021
|
return new Dt(e.from, e.to, F.fromJSON(t, e.slice), !!e.structure);
|
|
7045
7022
|
}
|
|
7046
7023
|
}
|
|
7047
|
-
|
|
7048
|
-
class Nt extends
|
|
7024
|
+
Jt.jsonID("replace", Dt);
|
|
7025
|
+
class Nt extends Jt {
|
|
7049
7026
|
/**
|
|
7050
7027
|
Create a replace-around step with the given range and gap.
|
|
7051
7028
|
`insert` should be the point in the slice into which the content
|
|
@@ -7102,7 +7079,7 @@ class Nt extends Yt {
|
|
|
7102
7079
|
return new Nt(e.from, e.to, e.gapFrom, e.gapTo, F.fromJSON(t, e.slice), e.insert, !!e.structure);
|
|
7103
7080
|
}
|
|
7104
7081
|
}
|
|
7105
|
-
|
|
7082
|
+
Jt.jsonID("replaceAround", Nt);
|
|
7106
7083
|
function ol(r, t, e) {
|
|
7107
7084
|
let o = r.resolve(t), i = e - t, n = o.depth;
|
|
7108
7085
|
for (; i > 0 && n > 0 && o.indexAfter(n) == o.node(n).childCount; )
|
|
@@ -7126,8 +7103,8 @@ function Tg(r, t, e, o) {
|
|
|
7126
7103
|
if (!o.isInSet(c) && d.type.allowsMarkType(o.type)) {
|
|
7127
7104
|
let m = Math.max(p, t), u = Math.min(p + l.nodeSize, e), x = o.addToSet(c);
|
|
7128
7105
|
for (let g = 0; g < c.length; g++)
|
|
7129
|
-
c[g].isInSet(x) || (a && a.to == m && a.mark.eq(c[g]) ? a.to = u : i.push(a = new
|
|
7130
|
-
s && s.to == m ? s.to = u : n.push(s = new
|
|
7106
|
+
c[g].isInSet(x) || (a && a.to == m && a.mark.eq(c[g]) ? a.to = u : i.push(a = new Ue(m, u, c[g])));
|
|
7107
|
+
s && s.to == m ? s.to = u : n.push(s = new Rr(m, u, o));
|
|
7131
7108
|
}
|
|
7132
7109
|
}), i.forEach((l) => r.step(l)), n.forEach((l) => r.step(l));
|
|
7133
7110
|
}
|
|
@@ -7154,7 +7131,7 @@ function Og(r, t, e, o) {
|
|
|
7154
7131
|
m ? (m.to = p, m.step = n) : i.push({ style: c, from: Math.max(s, t), to: p, step: n });
|
|
7155
7132
|
}
|
|
7156
7133
|
}
|
|
7157
|
-
}), i.forEach((a) => r.step(new
|
|
7134
|
+
}), i.forEach((a) => r.step(new Ue(a.from, a.to, a.style)));
|
|
7158
7135
|
}
|
|
7159
7136
|
function _l(r, t, e, o = e.contentMatch, i = !0) {
|
|
7160
7137
|
let n = r.doc.nodeAt(t), a = [], s = t + 1;
|
|
@@ -7165,7 +7142,7 @@ function _l(r, t, e, o = e.contentMatch, i = !0) {
|
|
|
7165
7142
|
else {
|
|
7166
7143
|
o = c;
|
|
7167
7144
|
for (let m = 0; m < p.marks.length; m++)
|
|
7168
|
-
e.allowsMarkType(p.marks[m].type) || r.step(new
|
|
7145
|
+
e.allowsMarkType(p.marks[m].type) || r.step(new Ue(s, d, p.marks[m]));
|
|
7169
7146
|
if (i && p.isText && e.whitespace != "pre") {
|
|
7170
7147
|
let m, u = /\r?\n|\r/g, x;
|
|
7171
7148
|
for (; m = u.exec(p.text); )
|
|
@@ -7294,7 +7271,7 @@ function Rg(r, t, e, o, i) {
|
|
|
7294
7271
|
throw new RangeError("Invalid content for node type " + e.name);
|
|
7295
7272
|
r.step(new Nt(t, t + n.nodeSize, t + 1, t + n.nodeSize - 1, new F(N.from(a), 0, 0), 1, !0));
|
|
7296
7273
|
}
|
|
7297
|
-
function
|
|
7274
|
+
function mr(r, t, e = 1, o) {
|
|
7298
7275
|
let i = r.resolve(t), n = i.depth - e, a = o && o[o.length - 1] || i.parent;
|
|
7299
7276
|
if (n < 0 || i.parent.type.spec.isolating || !i.parent.canReplace(i.index(), i.parent.childCount) || !a.type.validContent(i.parent.content.cutByIndex(i.index(), i.parent.childCount)))
|
|
7300
7277
|
return !1;
|
|
@@ -7688,7 +7665,7 @@ function Fb(r, t) {
|
|
|
7688
7665
|
}
|
|
7689
7666
|
return e;
|
|
7690
7667
|
}
|
|
7691
|
-
class Xo extends
|
|
7668
|
+
class Xo extends Jt {
|
|
7692
7669
|
/**
|
|
7693
7670
|
Construct an attribute step.
|
|
7694
7671
|
*/
|
|
@@ -7725,8 +7702,8 @@ class Xo extends Yt {
|
|
|
7725
7702
|
return new Xo(e.pos, e.attr, e.value);
|
|
7726
7703
|
}
|
|
7727
7704
|
}
|
|
7728
|
-
|
|
7729
|
-
class qi extends
|
|
7705
|
+
Jt.jsonID("attr", Xo);
|
|
7706
|
+
class qi extends Jt {
|
|
7730
7707
|
/**
|
|
7731
7708
|
Construct an attribute step.
|
|
7732
7709
|
*/
|
|
@@ -7759,7 +7736,7 @@ class qi extends Yt {
|
|
|
7759
7736
|
return new qi(e.attr, e.value);
|
|
7760
7737
|
}
|
|
7761
7738
|
}
|
|
7762
|
-
|
|
7739
|
+
Jt.jsonID("docAttr", qi);
|
|
7763
7740
|
let Zo = class extends Error {
|
|
7764
7741
|
};
|
|
7765
7742
|
Zo = function r(t) {
|
|
@@ -7938,7 +7915,7 @@ class Hb {
|
|
|
7938
7915
|
Add a mark to the node at position `pos`.
|
|
7939
7916
|
*/
|
|
7940
7917
|
addNodeMark(t, e) {
|
|
7941
|
-
return this.step(new
|
|
7918
|
+
return this.step(new $r(t, e)), this;
|
|
7942
7919
|
}
|
|
7943
7920
|
/**
|
|
7944
7921
|
Remove a mark (or all marks of the given type) from the node at
|
|
@@ -8782,7 +8759,7 @@ const ws = /* @__PURE__ */ Object.create(null);
|
|
|
8782
8759
|
function Vb(r) {
|
|
8783
8760
|
return r in ws ? r + "$" + ++ws[r] : (ws[r] = 0, r + "$");
|
|
8784
8761
|
}
|
|
8785
|
-
class
|
|
8762
|
+
class oe {
|
|
8786
8763
|
/**
|
|
8787
8764
|
Create a plugin key.
|
|
8788
8765
|
*/
|
|
@@ -8812,7 +8789,7 @@ const _t = function(r) {
|
|
|
8812
8789
|
return t && t.nodeType == 11 ? t.host : t;
|
|
8813
8790
|
};
|
|
8814
8791
|
let il = null;
|
|
8815
|
-
const
|
|
8792
|
+
const pr = function(r, t, e) {
|
|
8816
8793
|
let o = il || (il = document.createRange());
|
|
8817
8794
|
return o.setEnd(r, e ?? r.nodeValue.length), o.setStart(r, t || 0), o;
|
|
8818
8795
|
}, Xg = function() {
|
|
@@ -8824,7 +8801,7 @@ function ld(r, t, e, o, i) {
|
|
|
8824
8801
|
for (var n; ; ) {
|
|
8825
8802
|
if (r == e && t == o)
|
|
8826
8803
|
return !0;
|
|
8827
|
-
if (t == (i < 0 ? 0 :
|
|
8804
|
+
if (t == (i < 0 ? 0 : Me(r))) {
|
|
8828
8805
|
let a = r.parentNode;
|
|
8829
8806
|
if (!a || a.nodeType != 1 || ln(r) || Qg.test(r.nodeName) || r.contentEditable == "false")
|
|
8830
8807
|
return !1;
|
|
@@ -8837,12 +8814,12 @@ function ld(r, t, e, o, i) {
|
|
|
8837
8814
|
else
|
|
8838
8815
|
return !1;
|
|
8839
8816
|
else
|
|
8840
|
-
r = a, t = i < 0 ?
|
|
8817
|
+
r = a, t = i < 0 ? Me(r) : 0;
|
|
8841
8818
|
} else
|
|
8842
8819
|
return !1;
|
|
8843
8820
|
}
|
|
8844
8821
|
}
|
|
8845
|
-
function
|
|
8822
|
+
function Me(r) {
|
|
8846
8823
|
return r.nodeType == 3 ? r.nodeValue.length : r.childNodes.length;
|
|
8847
8824
|
}
|
|
8848
8825
|
function Zg(r, t) {
|
|
@@ -8852,7 +8829,7 @@ function Zg(r, t) {
|
|
|
8852
8829
|
if (r.nodeType == 1 && t > 0) {
|
|
8853
8830
|
if (r.contentEditable == "false")
|
|
8854
8831
|
return null;
|
|
8855
|
-
r = r.childNodes[t - 1], t =
|
|
8832
|
+
r = r.childNodes[t - 1], t = Me(r);
|
|
8856
8833
|
} else if (r.parentNode && !ln(r))
|
|
8857
8834
|
t = _t(r), r = r.parentNode;
|
|
8858
8835
|
else
|
|
@@ -8874,13 +8851,13 @@ function tf(r, t) {
|
|
|
8874
8851
|
}
|
|
8875
8852
|
}
|
|
8876
8853
|
function ef(r, t, e) {
|
|
8877
|
-
for (let o = t == 0, i = t ==
|
|
8854
|
+
for (let o = t == 0, i = t == Me(r); o || i; ) {
|
|
8878
8855
|
if (r == e)
|
|
8879
8856
|
return !0;
|
|
8880
8857
|
let n = _t(r);
|
|
8881
8858
|
if (r = r.parentNode, !r)
|
|
8882
8859
|
return !1;
|
|
8883
|
-
o = o && n == 0, i = i && n ==
|
|
8860
|
+
o = o && n == 0, i = i && n == Me(r);
|
|
8884
8861
|
}
|
|
8885
8862
|
}
|
|
8886
8863
|
function ln(r) {
|
|
@@ -8907,18 +8884,18 @@ function of(r, t, e) {
|
|
|
8907
8884
|
try {
|
|
8908
8885
|
let o = r.caretPositionFromPoint(t, e);
|
|
8909
8886
|
if (o)
|
|
8910
|
-
return { node: o.offsetNode, offset: Math.min(
|
|
8887
|
+
return { node: o.offsetNode, offset: Math.min(Me(o.offsetNode), o.offset) };
|
|
8911
8888
|
} catch {
|
|
8912
8889
|
}
|
|
8913
8890
|
if (r.caretRangeFromPoint) {
|
|
8914
8891
|
let o = r.caretRangeFromPoint(t, e);
|
|
8915
8892
|
if (o)
|
|
8916
|
-
return { node: o.startContainer, offset: Math.min(
|
|
8893
|
+
return { node: o.startContainer, offset: Math.min(Me(o.startContainer), o.startOffset) };
|
|
8917
8894
|
}
|
|
8918
8895
|
}
|
|
8919
|
-
const
|
|
8920
|
-
|
|
8921
|
-
const sl = !le && /Chrome\/(\d+)/.exec(Gr),
|
|
8896
|
+
const Je = typeof navigator < "u" ? navigator : null, pd = typeof document < "u" ? document : null, Gr = Je && Je.userAgent || "", nl = /Edge\/(\d+)/.exec(Gr), Wb = /MSIE \d/.exec(Gr), al = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Gr), le = !!(Wb || al || nl), Hr = Wb ? document.documentMode : al ? +al[1] : nl ? +nl[1] : 0, $e = !le && /gecko\/(\d+)/i.test(Gr);
|
|
8897
|
+
$e && +(/Firefox\/(\d+)/.exec(Gr) || [0, 0])[1];
|
|
8898
|
+
const sl = !le && /Chrome\/(\d+)/.exec(Gr), Gt = !!sl, qb = sl ? +sl[1] : 0, te = !le && !!Je && /Apple Computer/.test(Je.vendor), ei = te && (/Mobile\/\w+/.test(Gr) || !!Je && Je.maxTouchPoints > 2), Ce = ei || (Je ? /Mac/.test(Je.platform) : !1), nf = Je ? /Win/.test(Je.platform) : !1, cr = /Android \d/.test(Gr), pn = !!pd && "webkitFontSmoothing" in pd.documentElement.style, af = pn ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
8922
8899
|
function sf(r) {
|
|
8923
8900
|
let t = r.defaultView && r.defaultView.visualViewport;
|
|
8924
8901
|
return t ? {
|
|
@@ -8933,7 +8910,7 @@ function sf(r) {
|
|
|
8933
8910
|
bottom: r.documentElement.clientHeight
|
|
8934
8911
|
};
|
|
8935
8912
|
}
|
|
8936
|
-
function
|
|
8913
|
+
function nr(r, t) {
|
|
8937
8914
|
return typeof r == "number" ? r : r[t];
|
|
8938
8915
|
}
|
|
8939
8916
|
function lf(r) {
|
|
@@ -8953,7 +8930,7 @@ function dd(r, t, e) {
|
|
|
8953
8930
|
continue;
|
|
8954
8931
|
}
|
|
8955
8932
|
let s = a, l = s == n.body, p = l ? sf(n) : lf(s), d = 0, c = 0;
|
|
8956
|
-
if (t.top < p.top +
|
|
8933
|
+
if (t.top < p.top + nr(o, "top") ? c = -(p.top - t.top + nr(i, "top")) : t.bottom > p.bottom - nr(o, "bottom") && (c = t.bottom - t.top > p.bottom - p.top ? t.top + nr(i, "top") - p.top : t.bottom - p.bottom + nr(i, "bottom")), t.left < p.left + nr(o, "left") ? d = -(p.left - t.left + nr(i, "left")) : t.right > p.right - nr(o, "right") && (d = t.right - p.right + nr(i, "right")), d || c)
|
|
8957
8934
|
if (l)
|
|
8958
8935
|
n.defaultView.scrollBy(d, c);
|
|
8959
8936
|
else {
|
|
@@ -9018,7 +8995,7 @@ function Gb(r, t) {
|
|
|
9018
8995
|
if (d.nodeType == 1)
|
|
9019
8996
|
m = d.getClientRects();
|
|
9020
8997
|
else if (d.nodeType == 3)
|
|
9021
|
-
m =
|
|
8998
|
+
m = pr(d).getClientRects();
|
|
9022
8999
|
else
|
|
9023
9000
|
continue;
|
|
9024
9001
|
for (let u = 0; u < m.length; u++) {
|
|
@@ -9043,7 +9020,7 @@ function bf(r, t) {
|
|
|
9043
9020
|
let e = r.nodeValue.length, o = document.createRange();
|
|
9044
9021
|
for (let i = 0; i < e; i++) {
|
|
9045
9022
|
o.setEnd(r, i + 1), o.setStart(r, i);
|
|
9046
|
-
let n =
|
|
9023
|
+
let n = Mr(o, 1);
|
|
9047
9024
|
if (n.top != n.bottom && Hl(t, n))
|
|
9048
9025
|
return { node: r, offset: i + (t.left >= (n.left + n.right) / 2 ? 1 : 0) };
|
|
9049
9026
|
}
|
|
@@ -9104,11 +9081,11 @@ function gf(r, t) {
|
|
|
9104
9081
|
if (!Hl(t, p) || (a = Jb(r.dom, t, p), !a))
|
|
9105
9082
|
return null;
|
|
9106
9083
|
}
|
|
9107
|
-
if (
|
|
9084
|
+
if (te)
|
|
9108
9085
|
for (let p = a; o && p; p = ti(p))
|
|
9109
9086
|
p.draggable && (o = void 0);
|
|
9110
9087
|
if (a = mf(a, t), o) {
|
|
9111
|
-
if (
|
|
9088
|
+
if ($e && o.nodeType == 1 && (i = Math.min(i, o.childNodes.length), i < o.childNodes.length)) {
|
|
9112
9089
|
let d = o.childNodes[i], c;
|
|
9113
9090
|
d.nodeName == "IMG" && (c = d.getBoundingClientRect()).right <= t.left && c.bottom > t.top && i++;
|
|
9114
9091
|
}
|
|
@@ -9122,7 +9099,7 @@ function gf(r, t) {
|
|
|
9122
9099
|
function cd(r) {
|
|
9123
9100
|
return r.top < r.bottom || r.left < r.right;
|
|
9124
9101
|
}
|
|
9125
|
-
function
|
|
9102
|
+
function Mr(r, t) {
|
|
9126
9103
|
let e = r.getClientRects();
|
|
9127
9104
|
if (e.length) {
|
|
9128
9105
|
let o = e[t < 0 ? 0 : e.length - 1];
|
|
@@ -9133,14 +9110,14 @@ function Cr(r, t) {
|
|
|
9133
9110
|
}
|
|
9134
9111
|
const ff = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
|
|
9135
9112
|
function Yb(r, t, e) {
|
|
9136
|
-
let { node: o, offset: i, atom: n } = r.docView.domFromPos(t, e < 0 ? -1 : 1), a = pn ||
|
|
9113
|
+
let { node: o, offset: i, atom: n } = r.docView.domFromPos(t, e < 0 ? -1 : 1), a = pn || $e;
|
|
9137
9114
|
if (o.nodeType == 3)
|
|
9138
9115
|
if (a && (ff.test(o.nodeValue) || (e < 0 ? !i : i == o.nodeValue.length))) {
|
|
9139
|
-
let l =
|
|
9140
|
-
if (
|
|
9141
|
-
let p =
|
|
9116
|
+
let l = Mr(pr(o, i, i), e);
|
|
9117
|
+
if ($e && i && /\s/.test(o.nodeValue[i - 1]) && i < o.nodeValue.length) {
|
|
9118
|
+
let p = Mr(pr(o, i - 1, i - 1), -1);
|
|
9142
9119
|
if (p.top == l.top) {
|
|
9143
|
-
let d =
|
|
9120
|
+
let d = Mr(pr(o, i, i + 1), -1);
|
|
9144
9121
|
if (d.top != l.top)
|
|
9145
9122
|
return ui(d, d.left < p.left);
|
|
9146
9123
|
}
|
|
@@ -9148,35 +9125,35 @@ function Yb(r, t, e) {
|
|
|
9148
9125
|
return l;
|
|
9149
9126
|
} else {
|
|
9150
9127
|
let l = i, p = i, d = e < 0 ? 1 : -1;
|
|
9151
|
-
return e < 0 && !i ? (p++, d = -1) : e >= 0 && i == o.nodeValue.length ? (l--, d = 1) : e < 0 ? l-- : p++, ui(
|
|
9128
|
+
return e < 0 && !i ? (p++, d = -1) : e >= 0 && i == o.nodeValue.length ? (l--, d = 1) : e < 0 ? l-- : p++, ui(Mr(pr(o, l, p), d), d < 0);
|
|
9152
9129
|
}
|
|
9153
9130
|
if (!r.state.doc.resolve(t - (n || 0)).parent.inlineContent) {
|
|
9154
|
-
if (n == null && i && (e < 0 || i ==
|
|
9131
|
+
if (n == null && i && (e < 0 || i == Me(o))) {
|
|
9155
9132
|
let l = o.childNodes[i - 1];
|
|
9156
9133
|
if (l.nodeType == 1)
|
|
9157
9134
|
return vs(l.getBoundingClientRect(), !1);
|
|
9158
9135
|
}
|
|
9159
|
-
if (n == null && i <
|
|
9136
|
+
if (n == null && i < Me(o)) {
|
|
9160
9137
|
let l = o.childNodes[i];
|
|
9161
9138
|
if (l.nodeType == 1)
|
|
9162
9139
|
return vs(l.getBoundingClientRect(), !0);
|
|
9163
9140
|
}
|
|
9164
9141
|
return vs(o.getBoundingClientRect(), e >= 0);
|
|
9165
9142
|
}
|
|
9166
|
-
if (n == null && i && (e < 0 || i ==
|
|
9167
|
-
let l = o.childNodes[i - 1], p = l.nodeType == 3 ?
|
|
9143
|
+
if (n == null && i && (e < 0 || i == Me(o))) {
|
|
9144
|
+
let l = o.childNodes[i - 1], p = l.nodeType == 3 ? pr(l, Me(l) - (a ? 0 : 1)) : l.nodeType == 1 && (l.nodeName != "BR" || !l.nextSibling) ? l : null;
|
|
9168
9145
|
if (p)
|
|
9169
|
-
return ui(
|
|
9146
|
+
return ui(Mr(p, 1), !1);
|
|
9170
9147
|
}
|
|
9171
|
-
if (n == null && i <
|
|
9148
|
+
if (n == null && i < Me(o)) {
|
|
9172
9149
|
let l = o.childNodes[i];
|
|
9173
9150
|
for (; l.pmViewDesc && l.pmViewDesc.ignoreForCoords; )
|
|
9174
9151
|
l = l.nextSibling;
|
|
9175
|
-
let p = l ? l.nodeType == 3 ?
|
|
9152
|
+
let p = l ? l.nodeType == 3 ? pr(l, 0, a ? 0 : 1) : l.nodeType == 1 ? l : null : null;
|
|
9176
9153
|
if (p)
|
|
9177
|
-
return ui(
|
|
9154
|
+
return ui(Mr(p, -1), !0);
|
|
9178
9155
|
}
|
|
9179
|
-
return ui(
|
|
9156
|
+
return ui(Mr(o.nodeType == 3 ? pr(o) : o, -e), e >= 0);
|
|
9180
9157
|
}
|
|
9181
9158
|
function ui(r, t) {
|
|
9182
9159
|
if (r.width == 0)
|
|
@@ -9219,7 +9196,7 @@ function hf(r, t, e) {
|
|
|
9219
9196
|
if (s.nodeType == 1)
|
|
9220
9197
|
l = s.getClientRects();
|
|
9221
9198
|
else if (s.nodeType == 3)
|
|
9222
|
-
l =
|
|
9199
|
+
l = pr(s, 0, s.nodeValue.length).getClientRects();
|
|
9223
9200
|
else
|
|
9224
9201
|
continue;
|
|
9225
9202
|
for (let p = 0; p < l.length; p++) {
|
|
@@ -9252,10 +9229,10 @@ let bd = null, md = null, ud = !1;
|
|
|
9252
9229
|
function vf(r, t, e) {
|
|
9253
9230
|
return bd == t && md == e ? ud : (bd = t, md = e, ud = e == "up" || e == "down" ? hf(r, t, e) : wf(r, t, e));
|
|
9254
9231
|
}
|
|
9255
|
-
const
|
|
9232
|
+
const Te = 0, xd = 1, bo = 2, Ye = 3;
|
|
9256
9233
|
class dn {
|
|
9257
9234
|
constructor(t, e, o, i) {
|
|
9258
|
-
this.parent = t, this.children = e, this.dom = o, this.contentDOM = i, this.dirty =
|
|
9235
|
+
this.parent = t, this.children = e, this.dom = o, this.contentDOM = i, this.dirty = Te, o.pmViewDesc = this;
|
|
9259
9236
|
}
|
|
9260
9237
|
// Used to check whether a given description corresponds to a
|
|
9261
9238
|
// widget/mark/node.
|
|
@@ -9512,7 +9489,7 @@ class dn {
|
|
|
9512
9489
|
x = f;
|
|
9513
9490
|
}
|
|
9514
9491
|
let s = this.domFromPos(t, t ? -1 : 1), l = e == t ? s : this.domFromPos(e, e ? -1 : 1), p = o.root.getSelection(), d = o.domSelectionRange(), c = !1;
|
|
9515
|
-
if ((
|
|
9492
|
+
if (($e || te) && t == e) {
|
|
9516
9493
|
let { node: u, offset: x } = s;
|
|
9517
9494
|
if (u.nodeType == 3) {
|
|
9518
9495
|
if (c = !!(x && u.nodeValue[x - 1] == `
|
|
@@ -9531,11 +9508,11 @@ class dn {
|
|
|
9531
9508
|
c = g && (g.nodeName == "BR" || g.contentEditable == "false");
|
|
9532
9509
|
}
|
|
9533
9510
|
}
|
|
9534
|
-
if (
|
|
9511
|
+
if ($e && d.focusNode && d.focusNode != l.node && d.focusNode.nodeType == 1) {
|
|
9535
9512
|
let u = d.focusNode.childNodes[d.focusOffset];
|
|
9536
9513
|
u && u.contentEditable == "false" && (i = !0);
|
|
9537
9514
|
}
|
|
9538
|
-
if (!(i || c &&
|
|
9515
|
+
if (!(i || c && te) && Mo(s.node, s.offset, d.anchorNode, d.anchorOffset) && Mo(l.node, l.offset, d.focusNode, d.focusOffset))
|
|
9539
9516
|
return;
|
|
9540
9517
|
let m = !1;
|
|
9541
9518
|
if ((p.extend || t == e) && !c) {
|
|
@@ -9568,10 +9545,10 @@ class dn {
|
|
|
9568
9545
|
if (o == a ? t <= a && e >= o : t < a && e > o) {
|
|
9569
9546
|
let s = o + n.border, l = a - n.border;
|
|
9570
9547
|
if (t >= s && e <= l) {
|
|
9571
|
-
this.dirty = t == o || e == a ? bo : xd, t == s && e == l && (n.contentLost || n.dom.parentNode != this.contentDOM) ? n.dirty =
|
|
9548
|
+
this.dirty = t == o || e == a ? bo : xd, t == s && e == l && (n.contentLost || n.dom.parentNode != this.contentDOM) ? n.dirty = Ye : n.markDirty(t - s, e - s);
|
|
9572
9549
|
return;
|
|
9573
9550
|
} else
|
|
9574
|
-
n.dirty = n.dom == n.contentDOM && n.dom.parentNode == this.contentDOM && !n.children.length ? bo :
|
|
9551
|
+
n.dirty = n.dom == n.contentDOM && n.dom.parentNode == this.contentDOM && !n.children.length ? bo : Ye;
|
|
9575
9552
|
}
|
|
9576
9553
|
o = a;
|
|
9577
9554
|
}
|
|
@@ -9615,7 +9592,7 @@ class Qb extends dn {
|
|
|
9615
9592
|
super(t, [], a, null), this.widget = e, this.widget = e, n = this;
|
|
9616
9593
|
}
|
|
9617
9594
|
matchesWidget(t) {
|
|
9618
|
-
return this.dirty ==
|
|
9595
|
+
return this.dirty == Te && t.type.eq(this.widget.type);
|
|
9619
9596
|
}
|
|
9620
9597
|
parseRule() {
|
|
9621
9598
|
return { ignore: !0 };
|
|
@@ -9666,17 +9643,17 @@ class Eo extends dn {
|
|
|
9666
9643
|
return (!a || !a.dom) && (a = Bo.renderSpec(document, e.type.spec.toDOM(e, o), null, e.attrs)), new Eo(t, e, a.dom, a.contentDOM || a.dom, a);
|
|
9667
9644
|
}
|
|
9668
9645
|
parseRule() {
|
|
9669
|
-
return this.dirty &
|
|
9646
|
+
return this.dirty & Ye || this.mark.type.spec.reparseInView ? null : { mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM };
|
|
9670
9647
|
}
|
|
9671
9648
|
matchesMark(t) {
|
|
9672
|
-
return this.dirty !=
|
|
9649
|
+
return this.dirty != Ye && this.mark.eq(t);
|
|
9673
9650
|
}
|
|
9674
9651
|
markDirty(t, e) {
|
|
9675
|
-
if (super.markDirty(t, e), this.dirty !=
|
|
9652
|
+
if (super.markDirty(t, e), this.dirty != Te) {
|
|
9676
9653
|
let o = this.parent;
|
|
9677
9654
|
for (; !o.node; )
|
|
9678
9655
|
o = o.parent;
|
|
9679
|
-
o.dirty < this.dirty && (o.dirty = this.dirty), this.dirty =
|
|
9656
|
+
o.dirty < this.dirty && (o.dirty = this.dirty), this.dirty = Te;
|
|
9680
9657
|
}
|
|
9681
9658
|
}
|
|
9682
9659
|
slice(t, e, o) {
|
|
@@ -9744,7 +9721,7 @@ class jr extends dn {
|
|
|
9744
9721
|
return t;
|
|
9745
9722
|
}
|
|
9746
9723
|
matchesNode(t, e, o) {
|
|
9747
|
-
return this.dirty ==
|
|
9724
|
+
return this.dirty == Te && t.eq(this.node) && ra(e, this.outerDeco) && o.eq(this.innerDeco);
|
|
9748
9725
|
}
|
|
9749
9726
|
get size() {
|
|
9750
9727
|
return this.node.nodeSize;
|
|
@@ -9796,10 +9773,10 @@ class jr extends dn {
|
|
|
9796
9773
|
// If this desc must be updated to match the given node decoration,
|
|
9797
9774
|
// do so and return true.
|
|
9798
9775
|
update(t, e, o, i) {
|
|
9799
|
-
return this.dirty ==
|
|
9776
|
+
return this.dirty == Ye || !t.sameMarkup(this.node) ? !1 : (this.updateInner(t, e, o, i), !0);
|
|
9800
9777
|
}
|
|
9801
9778
|
updateInner(t, e, o, i) {
|
|
9802
|
-
this.updateOuterDeco(e), this.node = t, this.innerDeco = o, this.contentDOM && this.updateChildren(i, this.posAtStart), this.dirty =
|
|
9779
|
+
this.updateOuterDeco(e), this.node = t, this.innerDeco = o, this.contentDOM && this.updateChildren(i, this.posAtStart), this.dirty = Te;
|
|
9803
9780
|
}
|
|
9804
9781
|
updateOuterDeco(t) {
|
|
9805
9782
|
if (ra(t, this.outerDeco))
|
|
@@ -9835,7 +9812,7 @@ class Ga extends jr {
|
|
|
9835
9812
|
return { skip: t || !0 };
|
|
9836
9813
|
}
|
|
9837
9814
|
update(t, e, o, i) {
|
|
9838
|
-
return this.dirty ==
|
|
9815
|
+
return this.dirty == Ye || this.dirty != Te && !this.inParent() || !t.sameMarkup(this.node) ? !1 : (this.updateOuterDeco(e), (this.dirty != Te || t.text != this.node.text) && t.text != this.nodeDOM.nodeValue && (this.nodeDOM.nodeValue = t.text, i.trackWrites == this.nodeDOM && (i.trackWrites = null)), this.node = t, this.dirty = Te, !0);
|
|
9839
9816
|
}
|
|
9840
9817
|
inParent() {
|
|
9841
9818
|
let t = this.parent.contentDOM;
|
|
@@ -9858,7 +9835,7 @@ class Ga extends jr {
|
|
|
9858
9835
|
return new Ga(this.parent, i, this.outerDeco, this.innerDeco, n, n, o);
|
|
9859
9836
|
}
|
|
9860
9837
|
markDirty(t, e) {
|
|
9861
|
-
super.markDirty(t, e), this.dom != this.nodeDOM && (t == 0 || e == this.nodeDOM.nodeValue.length) && (this.dirty =
|
|
9838
|
+
super.markDirty(t, e), this.dom != this.nodeDOM && (t == 0 || e == this.nodeDOM.nodeValue.length) && (this.dirty = Ye);
|
|
9862
9839
|
}
|
|
9863
9840
|
get domAtom() {
|
|
9864
9841
|
return !1;
|
|
@@ -9872,7 +9849,7 @@ class Zb extends dn {
|
|
|
9872
9849
|
return { ignore: !0 };
|
|
9873
9850
|
}
|
|
9874
9851
|
matchesHack(t) {
|
|
9875
|
-
return this.dirty ==
|
|
9852
|
+
return this.dirty == Te && this.dom.nodeName == t;
|
|
9876
9853
|
}
|
|
9877
9854
|
get domAtom() {
|
|
9878
9855
|
return !0;
|
|
@@ -9889,7 +9866,7 @@ class Sf extends jr {
|
|
|
9889
9866
|
// through. If it does, and there's a `contentDOM` node, our logic
|
|
9890
9867
|
// updates the children.
|
|
9891
9868
|
update(t, e, o, i) {
|
|
9892
|
-
if (this.dirty ==
|
|
9869
|
+
if (this.dirty == Ye)
|
|
9893
9870
|
return !1;
|
|
9894
9871
|
if (this.spec.update && (this.node.type == t.type || this.spec.multiType)) {
|
|
9895
9872
|
let n = this.spec.update(t, e, o);
|
|
@@ -10030,7 +10007,7 @@ class Mf {
|
|
|
10030
10007
|
for (; i < a && (i == n - 1 ? this.top : this.stack[i + 1 << 1]).matchesMark(t[i]) && t[i].type.spec.spanning !== !1; )
|
|
10031
10008
|
i++;
|
|
10032
10009
|
for (; i < n; )
|
|
10033
|
-
this.destroyRest(), this.top.dirty =
|
|
10010
|
+
this.destroyRest(), this.top.dirty = Te, this.index = this.stack.pop(), this.top = this.stack.pop(), n--;
|
|
10034
10011
|
for (; n < t.length; ) {
|
|
10035
10012
|
this.stack.push(this.top, this.index + 1);
|
|
10036
10013
|
let s = -1;
|
|
@@ -10068,7 +10045,7 @@ class Mf {
|
|
|
10068
10045
|
}
|
|
10069
10046
|
updateNodeAt(t, e, o, i, n) {
|
|
10070
10047
|
let a = this.top.children[i];
|
|
10071
|
-
return a.dirty ==
|
|
10048
|
+
return a.dirty == Ye && a.dom == a.contentDOM && (a.dirty = bo), a.update(t, e, o, n) ? (this.destroyBetween(this.index, i), this.index++, !0) : !1;
|
|
10072
10049
|
}
|
|
10073
10050
|
findIndexWithChild(t) {
|
|
10074
10051
|
for (; ; ) {
|
|
@@ -10096,11 +10073,11 @@ class Mf {
|
|
|
10096
10073
|
let p = this.preMatch.matched.get(l);
|
|
10097
10074
|
if (p != null && p != n)
|
|
10098
10075
|
return !1;
|
|
10099
|
-
let d = l.dom, c, m = this.isLocked(d) && !(t.isText && l.node && l.node.isText && l.nodeDOM.nodeValue == t.text && l.dirty !=
|
|
10076
|
+
let d = l.dom, c, m = this.isLocked(d) && !(t.isText && l.node && l.node.isText && l.nodeDOM.nodeValue == t.text && l.dirty != Ye && ra(e, l.outerDeco));
|
|
10100
10077
|
if (!m && l.update(t, e, o, i))
|
|
10101
10078
|
return this.destroyBetween(this.index, s), l.dom != d && (this.changed = !0), this.index++, !0;
|
|
10102
10079
|
if (!m && (c = this.recreateWrapper(l, t, e, o, i, a)))
|
|
10103
|
-
return this.destroyBetween(this.index, s), this.top.children[this.index] = c, c.contentDOM && (c.dirty = bo, c.updateChildren(i, a + 1), c.dirty =
|
|
10080
|
+
return this.destroyBetween(this.index, s), this.top.children[this.index] = c, c.contentDOM && (c.dirty = bo, c.updateChildren(i, a + 1), c.dirty = Te), this.changed = !0, this.index++, !0;
|
|
10104
10081
|
break;
|
|
10105
10082
|
}
|
|
10106
10083
|
}
|
|
@@ -10140,7 +10117,7 @@ class Mf {
|
|
|
10140
10117
|
for (; t instanceof Eo; )
|
|
10141
10118
|
e = t, t = e.children[e.children.length - 1];
|
|
10142
10119
|
(!t || // Empty textblock
|
|
10143
|
-
!(t instanceof Ga) || /\n$/.test(t.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(t.node.text)) && ((
|
|
10120
|
+
!(t instanceof Ga) || /\n$/.test(t.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(t.node.text)) && ((te || Gt) && t && t.dom.contentEditable == "false" && this.addHackNode("IMG", e), this.addHackNode("BR", this.top));
|
|
10144
10121
|
}
|
|
10145
10122
|
addHackNode(t, e) {
|
|
10146
10123
|
if (e == this.top && this.index < e.children.length && e.children[this.index].matchesHack(t))
|
|
@@ -10313,10 +10290,10 @@ function jl(r, t = null) {
|
|
|
10313
10290
|
function om(r) {
|
|
10314
10291
|
return r.editable ? r.hasFocus() : nm(r) && document.activeElement && document.activeElement.contains(r.dom);
|
|
10315
10292
|
}
|
|
10316
|
-
function
|
|
10293
|
+
function ur(r, t = !1) {
|
|
10317
10294
|
let e = r.state.selection;
|
|
10318
10295
|
if (im(r, e), !!om(r)) {
|
|
10319
|
-
if (!t && r.input.mouseDown && r.input.mouseDown.allowDefault &&
|
|
10296
|
+
if (!t && r.input.mouseDown && r.input.mouseDown.allowDefault && Gt) {
|
|
10320
10297
|
let o = r.domSelectionRange(), i = r.domObserver.currentSelection;
|
|
10321
10298
|
if (o.anchorNode && i.anchorNode && Mo(o.anchorNode, o.anchorOffset, i.anchorNode, i.anchorOffset)) {
|
|
10322
10299
|
r.input.mouseDown.delayedSelectionSync = !0, r.domObserver.setCurSelection();
|
|
@@ -10332,10 +10309,10 @@ function mr(r, t = !1) {
|
|
|
10332
10309
|
r.domObserver.setCurSelection(), r.domObserver.connectSelection();
|
|
10333
10310
|
}
|
|
10334
10311
|
}
|
|
10335
|
-
const hd =
|
|
10312
|
+
const hd = te || Gt && qb < 63;
|
|
10336
10313
|
function yd(r, t) {
|
|
10337
10314
|
let { node: e, offset: o } = r.docView.domFromPos(t, 0), i = o < e.childNodes.length ? e.childNodes[o] : null, n = o ? e.childNodes[o - 1] : null;
|
|
10338
|
-
if (
|
|
10315
|
+
if (te && i && i.contentEditable == "false")
|
|
10339
10316
|
return ks(i);
|
|
10340
10317
|
if ((!i || i.contentEditable == "false") && (!n || n.contentEditable == "false")) {
|
|
10341
10318
|
if (i)
|
|
@@ -10345,7 +10322,7 @@ function yd(r, t) {
|
|
|
10345
10322
|
}
|
|
10346
10323
|
}
|
|
10347
10324
|
function ks(r) {
|
|
10348
|
-
return r.contentEditable = "true",
|
|
10325
|
+
return r.contentEditable = "true", te && r.draggable && (r.draggable = !1, r.wasDraggable = !0), r;
|
|
10349
10326
|
}
|
|
10350
10327
|
function wd(r) {
|
|
10351
10328
|
r.contentEditable = "false", r.wasDraggable && (r.draggable = !0, r.wasDraggable = null);
|
|
@@ -10401,7 +10378,7 @@ function dl(r, t) {
|
|
|
10401
10378
|
let { $anchor: e, $head: o } = r.selection, i = t > 0 ? e.max(o) : e.min(o), n = i.parent.inlineContent ? i.depth ? r.doc.resolve(t > 0 ? i.after() : i.before()) : null : i;
|
|
10402
10379
|
return n && Z.findFrom(n, t);
|
|
10403
10380
|
}
|
|
10404
|
-
function
|
|
10381
|
+
function Er(r, t) {
|
|
10405
10382
|
return r.dispatch(r.state.tr.setSelection(t).scrollIntoView()), !0;
|
|
10406
10383
|
}
|
|
10407
10384
|
function Sd(r, t, e) {
|
|
@@ -10412,25 +10389,25 @@ function Sd(r, t, e) {
|
|
|
10412
10389
|
if (!n || n.isText || !n.isLeaf)
|
|
10413
10390
|
return !1;
|
|
10414
10391
|
let a = r.state.doc.resolve(i.pos + n.nodeSize * (t < 0 ? -1 : 1));
|
|
10415
|
-
return
|
|
10392
|
+
return Er(r, new Q(o.$anchor, a));
|
|
10416
10393
|
} else if (o.empty) {
|
|
10417
10394
|
if (r.endOfTextblock(t > 0 ? "forward" : "backward")) {
|
|
10418
10395
|
let i = dl(r.state, t);
|
|
10419
|
-
return i && i instanceof J ?
|
|
10420
|
-
} else if (!(
|
|
10396
|
+
return i && i instanceof J ? Er(r, i) : !1;
|
|
10397
|
+
} else if (!(Ce && e.indexOf("m") > -1)) {
|
|
10421
10398
|
let i = o.$head, n = i.textOffset ? null : t < 0 ? i.nodeBefore : i.nodeAfter, a;
|
|
10422
10399
|
if (!n || n.isText)
|
|
10423
10400
|
return !1;
|
|
10424
10401
|
let s = t < 0 ? i.pos - n.nodeSize : i.pos;
|
|
10425
|
-
return n.isAtom || (a = r.docView.descAt(s)) && !a.contentDOM ? J.isSelectable(n) ?
|
|
10402
|
+
return n.isAtom || (a = r.docView.descAt(s)) && !a.contentDOM ? J.isSelectable(n) ? Er(r, new J(t < 0 ? r.state.doc.resolve(i.pos - n.nodeSize) : i)) : pn ? Er(r, new Q(r.state.doc.resolve(t < 0 ? s : s + n.nodeSize))) : !1 : !1;
|
|
10426
10403
|
}
|
|
10427
10404
|
} else return !1;
|
|
10428
10405
|
else {
|
|
10429
10406
|
if (o instanceof J && o.node.isInline)
|
|
10430
|
-
return
|
|
10407
|
+
return Er(r, new Q(t > 0 ? o.$to : o.$from));
|
|
10431
10408
|
{
|
|
10432
10409
|
let i = dl(r.state, t);
|
|
10433
|
-
return i ?
|
|
10410
|
+
return i ? Er(r, i) : !1;
|
|
10434
10411
|
}
|
|
10435
10412
|
}
|
|
10436
10413
|
}
|
|
@@ -10449,7 +10426,7 @@ function If(r) {
|
|
|
10449
10426
|
if (!e)
|
|
10450
10427
|
return;
|
|
10451
10428
|
let i, n, a = !1;
|
|
10452
|
-
for (
|
|
10429
|
+
for ($e && e.nodeType == 1 && o < oa(e) && Pi(e.childNodes[o], -1) && (a = !0); ; )
|
|
10453
10430
|
if (o > 0) {
|
|
10454
10431
|
if (e.nodeType != 1)
|
|
10455
10432
|
break;
|
|
@@ -10555,12 +10532,12 @@ function cl(r, t, e) {
|
|
|
10555
10532
|
r.domObserver.setCurSelection();
|
|
10556
10533
|
let { state: i } = r;
|
|
10557
10534
|
setTimeout(() => {
|
|
10558
|
-
r.state == i &&
|
|
10535
|
+
r.state == i && ur(r);
|
|
10559
10536
|
}, 50);
|
|
10560
10537
|
}
|
|
10561
10538
|
function Cd(r, t) {
|
|
10562
10539
|
let e = r.state.doc.resolve(t);
|
|
10563
|
-
if (!(
|
|
10540
|
+
if (!(Gt || nf) && e.parent.inlineContent) {
|
|
10564
10541
|
let i = r.coordsAtPos(t);
|
|
10565
10542
|
if (t > e.start()) {
|
|
10566
10543
|
let n = r.coordsAtPos(t - 1), a = (n.top + n.bottom) / 2;
|
|
@@ -10577,17 +10554,17 @@ function Cd(r, t) {
|
|
|
10577
10554
|
}
|
|
10578
10555
|
function Md(r, t, e) {
|
|
10579
10556
|
let o = r.state.selection;
|
|
10580
|
-
if (o instanceof Q && !o.empty || e.indexOf("s") > -1 ||
|
|
10557
|
+
if (o instanceof Q && !o.empty || e.indexOf("s") > -1 || Ce && e.indexOf("m") > -1)
|
|
10581
10558
|
return !1;
|
|
10582
10559
|
let { $from: i, $to: n } = o;
|
|
10583
10560
|
if (!i.parent.inlineContent || r.endOfTextblock(t < 0 ? "up" : "down")) {
|
|
10584
10561
|
let a = dl(r.state, t);
|
|
10585
10562
|
if (a && a instanceof J)
|
|
10586
|
-
return
|
|
10563
|
+
return Er(r, a);
|
|
10587
10564
|
}
|
|
10588
10565
|
if (!i.parent.inlineContent) {
|
|
10589
10566
|
let a = t < 0 ? i : n, s = o instanceof ue ? Z.near(a, t) : Z.findFrom(a, t);
|
|
10590
|
-
return s ?
|
|
10567
|
+
return s ? Er(r, s) : !1;
|
|
10591
10568
|
}
|
|
10592
10569
|
return !1;
|
|
10593
10570
|
}
|
|
@@ -10612,7 +10589,7 @@ function Td(r, t, e) {
|
|
|
10612
10589
|
r.domObserver.stop(), t.contentEditable = e, r.domObserver.start();
|
|
10613
10590
|
}
|
|
10614
10591
|
function _f(r) {
|
|
10615
|
-
if (!
|
|
10592
|
+
if (!te || r.state.selection.$head.parentOffset > 0)
|
|
10616
10593
|
return !1;
|
|
10617
10594
|
let { focusNode: t, focusOffset: e } = r.domSelectionRange();
|
|
10618
10595
|
if (t && t.nodeType == 1 && e == 0 && t.firstChild && t.firstChild.contentEditable == "false") {
|
|
@@ -10627,24 +10604,24 @@ function zf(r) {
|
|
|
10627
10604
|
}
|
|
10628
10605
|
function Ff(r, t) {
|
|
10629
10606
|
let e = t.keyCode, o = zf(t);
|
|
10630
|
-
if (e == 8 ||
|
|
10607
|
+
if (e == 8 || Ce && e == 72 && o == "c")
|
|
10631
10608
|
return Ed(r, -1) || zo(r, -1);
|
|
10632
|
-
if (e == 46 && !t.shiftKey ||
|
|
10609
|
+
if (e == 46 && !t.shiftKey || Ce && e == 68 && o == "c")
|
|
10633
10610
|
return Ed(r, 1) || zo(r, 1);
|
|
10634
10611
|
if (e == 13 || e == 27)
|
|
10635
10612
|
return !0;
|
|
10636
|
-
if (e == 37 ||
|
|
10613
|
+
if (e == 37 || Ce && e == 66 && o == "c") {
|
|
10637
10614
|
let i = e == 37 ? Cd(r, r.state.selection.from) == "ltr" ? -1 : 1 : -1;
|
|
10638
10615
|
return Sd(r, i, o) || zo(r, i);
|
|
10639
|
-
} else if (e == 39 ||
|
|
10616
|
+
} else if (e == 39 || Ce && e == 70 && o == "c") {
|
|
10640
10617
|
let i = e == 39 ? Cd(r, r.state.selection.from) == "ltr" ? 1 : -1 : 1;
|
|
10641
10618
|
return Sd(r, i, o) || zo(r, i);
|
|
10642
10619
|
} else {
|
|
10643
|
-
if (e == 38 ||
|
|
10620
|
+
if (e == 38 || Ce && e == 80 && o == "c")
|
|
10644
10621
|
return Md(r, -1, o) || zo(r, -1);
|
|
10645
|
-
if (e == 40 ||
|
|
10622
|
+
if (e == 40 || Ce && e == 78 && o == "c")
|
|
10646
10623
|
return _f(r) || Md(r, 1, o) || zo(r, 1);
|
|
10647
|
-
if (o == (
|
|
10624
|
+
if (o == (Ce ? "m" : "c") && (e == 66 || e == 73 || e == 89 || e == 90))
|
|
10648
10625
|
return !0;
|
|
10649
10626
|
}
|
|
10650
10627
|
return !1;
|
|
@@ -10813,7 +10790,7 @@ function Wf(r) {
|
|
|
10813
10790
|
return e;
|
|
10814
10791
|
}
|
|
10815
10792
|
function qf(r) {
|
|
10816
|
-
let t = r.querySelectorAll(
|
|
10793
|
+
let t = r.querySelectorAll(Gt ? "span:not([class]):not([style])" : "span.Apple-converted-space");
|
|
10817
10794
|
for (let e = 0; e < t.length; e++) {
|
|
10818
10795
|
let o = t[e];
|
|
10819
10796
|
o.childNodes.length == 1 && o.textContent == " " && o.parentNode && o.parentNode.replaceChild(r.ownerDocument.createTextNode(" "), o);
|
|
@@ -10837,22 +10814,22 @@ function Uf(r, t) {
|
|
|
10837
10814
|
}
|
|
10838
10815
|
return new F(i, n, a);
|
|
10839
10816
|
}
|
|
10840
|
-
const
|
|
10817
|
+
const ee = {}, re = {}, Kf = { touchstart: !0, touchmove: !0 };
|
|
10841
10818
|
class Gf {
|
|
10842
10819
|
constructor() {
|
|
10843
10820
|
this.shiftKey = !1, this.mouseDown = null, this.lastKeyCode = null, this.lastKeyCodeTime = 0, this.lastClick = { time: 0, x: 0, y: 0, type: "", button: 0 }, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastIOSEnter = 0, this.lastIOSEnterFallbackTimeout = -1, this.lastFocus = 0, this.lastTouch = 0, this.lastChromeDelete = 0, this.composing = !1, this.compositionNode = null, this.composingTimeout = -1, this.compositionNodes = [], this.compositionEndedAt = -2e8, this.compositionID = 1, this.compositionPendingChanges = 0, this.domChangeCount = 0, this.eventHandlers = /* @__PURE__ */ Object.create(null), this.hideSelectionGuard = null;
|
|
10844
10821
|
}
|
|
10845
10822
|
}
|
|
10846
10823
|
function Jf(r) {
|
|
10847
|
-
for (let t in
|
|
10848
|
-
let e =
|
|
10824
|
+
for (let t in ee) {
|
|
10825
|
+
let e = ee[t];
|
|
10849
10826
|
r.dom.addEventListener(t, r.input.eventHandlers[t] = (o) => {
|
|
10850
|
-
Xf(r, o) && !ql(r, o) && (r.editable || !(o.type in
|
|
10827
|
+
Xf(r, o) && !ql(r, o) && (r.editable || !(o.type in re)) && e(r, o);
|
|
10851
10828
|
}, Kf[t] ? { passive: !0 } : void 0);
|
|
10852
10829
|
}
|
|
10853
|
-
|
|
10830
|
+
te && r.dom.addEventListener("input", () => null), ml(r);
|
|
10854
10831
|
}
|
|
10855
|
-
function
|
|
10832
|
+
function _r(r, t) {
|
|
10856
10833
|
r.input.lastSelectionOrigin = t, r.input.lastSelectionTime = Date.now();
|
|
10857
10834
|
}
|
|
10858
10835
|
function Yf(r) {
|
|
@@ -10884,24 +10861,24 @@ function Xf(r, t) {
|
|
|
10884
10861
|
return !0;
|
|
10885
10862
|
}
|
|
10886
10863
|
function Qf(r, t) {
|
|
10887
|
-
!ql(r, t) &&
|
|
10864
|
+
!ql(r, t) && ee[t.type] && (r.editable || !(t.type in re)) && ee[t.type](r, t);
|
|
10888
10865
|
}
|
|
10889
|
-
|
|
10866
|
+
re.keydown = (r, t) => {
|
|
10890
10867
|
let e = t;
|
|
10891
|
-
if (r.input.shiftKey = e.keyCode == 16 || e.shiftKey, !um(r, e) && (r.input.lastKeyCode = e.keyCode, r.input.lastKeyCodeTime = Date.now(), !(
|
|
10868
|
+
if (r.input.shiftKey = e.keyCode == 16 || e.shiftKey, !um(r, e) && (r.input.lastKeyCode = e.keyCode, r.input.lastKeyCodeTime = Date.now(), !(cr && Gt && e.keyCode == 13)))
|
|
10892
10869
|
if (e.keyCode != 229 && r.domObserver.forceFlush(), ei && e.keyCode == 13 && !e.ctrlKey && !e.altKey && !e.metaKey) {
|
|
10893
10870
|
let o = Date.now();
|
|
10894
10871
|
r.input.lastIOSEnter = o, r.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
10895
10872
|
r.input.lastIOSEnter == o && (r.someProp("handleKeyDown", (i) => i(r, lo(13, "Enter"))), r.input.lastIOSEnter = 0);
|
|
10896
10873
|
}, 200);
|
|
10897
|
-
} else r.someProp("handleKeyDown", (o) => o(r, e)) || Ff(r, e) ? e.preventDefault() :
|
|
10874
|
+
} else r.someProp("handleKeyDown", (o) => o(r, e)) || Ff(r, e) ? e.preventDefault() : _r(r, "key");
|
|
10898
10875
|
};
|
|
10899
|
-
|
|
10876
|
+
re.keyup = (r, t) => {
|
|
10900
10877
|
t.keyCode == 16 && (r.input.shiftKey = !1);
|
|
10901
10878
|
};
|
|
10902
|
-
|
|
10879
|
+
re.keypress = (r, t) => {
|
|
10903
10880
|
let e = t;
|
|
10904
|
-
if (um(r, e) || !e.charCode || e.ctrlKey && !e.altKey ||
|
|
10881
|
+
if (um(r, e) || !e.charCode || e.ctrlKey && !e.altKey || Ce && e.metaKey)
|
|
10905
10882
|
return;
|
|
10906
10883
|
if (r.someProp("handleKeyPress", (i) => i(r, e))) {
|
|
10907
10884
|
e.preventDefault();
|
|
@@ -10986,14 +10963,14 @@ function nh(r, t, e) {
|
|
|
10986
10963
|
function Kl(r) {
|
|
10987
10964
|
return ia(r);
|
|
10988
10965
|
}
|
|
10989
|
-
const mm =
|
|
10990
|
-
|
|
10966
|
+
const mm = Ce ? "metaKey" : "ctrlKey";
|
|
10967
|
+
ee.mousedown = (r, t) => {
|
|
10991
10968
|
let e = t;
|
|
10992
10969
|
r.input.shiftKey = e.shiftKey;
|
|
10993
10970
|
let o = Kl(r), i = Date.now(), n = "singleClick";
|
|
10994
10971
|
i - r.input.lastClick.time < 500 && Zf(e, r.input.lastClick) && !e[mm] && r.input.lastClick.button == e.button && (r.input.lastClick.type == "singleClick" ? n = "doubleClick" : r.input.lastClick.type == "doubleClick" && (n = "tripleClick")), r.input.lastClick = { time: i, x: e.clientX, y: e.clientY, type: n, button: e.button };
|
|
10995
10972
|
let a = r.posAtCoords(Ja(e));
|
|
10996
|
-
a && (n == "singleClick" ? (r.input.mouseDown && r.input.mouseDown.done(), r.input.mouseDown = new ah(r, a, e, !!o)) : (n == "doubleClick" ? oh : ih)(r, a.pos, a.inside, e) ? e.preventDefault() :
|
|
10973
|
+
a && (n == "singleClick" ? (r.input.mouseDown && r.input.mouseDown.done(), r.input.mouseDown = new ah(r, a, e, !!o)) : (n == "doubleClick" ? oh : ih)(r, a.pos, a.inside, e) ? e.preventDefault() : _r(r, "pointer"));
|
|
10997
10974
|
};
|
|
10998
10975
|
class ah {
|
|
10999
10976
|
constructor(t, e, o, i) {
|
|
@@ -11012,53 +10989,53 @@ class ah {
|
|
|
11012
10989
|
node: n,
|
|
11013
10990
|
pos: a,
|
|
11014
10991
|
addAttr: !!(this.target && !this.target.draggable),
|
|
11015
|
-
setUneditable: !!(this.target &&
|
|
10992
|
+
setUneditable: !!(this.target && $e && !this.target.hasAttribute("contentEditable"))
|
|
11016
10993
|
}), this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable) && (this.view.domObserver.stop(), this.mightDrag.addAttr && (this.target.draggable = !0), this.mightDrag.setUneditable && setTimeout(() => {
|
|
11017
10994
|
this.view.input.mouseDown == this && this.target.setAttribute("contentEditable", "false");
|
|
11018
|
-
}, 20), this.view.domObserver.start()), t.root.addEventListener("mouseup", this.up = this.up.bind(this)), t.root.addEventListener("mousemove", this.move = this.move.bind(this)),
|
|
10995
|
+
}, 20), this.view.domObserver.start()), t.root.addEventListener("mouseup", this.up = this.up.bind(this)), t.root.addEventListener("mousemove", this.move = this.move.bind(this)), _r(t, "pointer");
|
|
11019
10996
|
}
|
|
11020
10997
|
done() {
|
|
11021
|
-
this.view.root.removeEventListener("mouseup", this.up), this.view.root.removeEventListener("mousemove", this.move), this.mightDrag && this.target && (this.view.domObserver.stop(), this.mightDrag.addAttr && this.target.removeAttribute("draggable"), this.mightDrag.setUneditable && this.target.removeAttribute("contentEditable"), this.view.domObserver.start()), this.delayedSelectionSync && setTimeout(() =>
|
|
10998
|
+
this.view.root.removeEventListener("mouseup", this.up), this.view.root.removeEventListener("mousemove", this.move), this.mightDrag && this.target && (this.view.domObserver.stop(), this.mightDrag.addAttr && this.target.removeAttribute("draggable"), this.mightDrag.setUneditable && this.target.removeAttribute("contentEditable"), this.view.domObserver.start()), this.delayedSelectionSync && setTimeout(() => ur(this.view)), this.view.input.mouseDown = null;
|
|
11022
10999
|
}
|
|
11023
11000
|
up(t) {
|
|
11024
11001
|
if (this.done(), !this.view.dom.contains(t.target))
|
|
11025
11002
|
return;
|
|
11026
11003
|
let e = this.pos;
|
|
11027
|
-
this.view.state.doc != this.startDoc && (e = this.view.posAtCoords(Ja(t))), this.updateAllowDefault(t), this.allowDefault || !e ?
|
|
11028
|
-
|
|
11004
|
+
this.view.state.doc != this.startDoc && (e = this.view.posAtCoords(Ja(t))), this.updateAllowDefault(t), this.allowDefault || !e ? _r(this.view, "pointer") : rh(this.view, e.pos, e.inside, t, this.selectNode) ? t.preventDefault() : t.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
|
|
11005
|
+
te && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
|
|
11029
11006
|
// cursor, but still report that the node is selected
|
|
11030
11007
|
// when asked through getSelection. You'll then get a
|
|
11031
11008
|
// situation where clicking at the point where that
|
|
11032
11009
|
// (hidden) cursor is doesn't change the selection, and
|
|
11033
11010
|
// thus doesn't get a reaction from ProseMirror. This
|
|
11034
11011
|
// works around that.
|
|
11035
|
-
|
|
11012
|
+
Gt && !this.view.state.selection.visible && Math.min(Math.abs(e.pos - this.view.state.selection.from), Math.abs(e.pos - this.view.state.selection.to)) <= 2) ? (Qo(this.view, Z.near(this.view.state.doc.resolve(e.pos))), t.preventDefault()) : _r(this.view, "pointer");
|
|
11036
11013
|
}
|
|
11037
11014
|
move(t) {
|
|
11038
|
-
this.updateAllowDefault(t),
|
|
11015
|
+
this.updateAllowDefault(t), _r(this.view, "pointer"), t.buttons == 0 && this.done();
|
|
11039
11016
|
}
|
|
11040
11017
|
updateAllowDefault(t) {
|
|
11041
11018
|
!this.allowDefault && (Math.abs(this.event.x - t.clientX) > 4 || Math.abs(this.event.y - t.clientY) > 4) && (this.allowDefault = !0);
|
|
11042
11019
|
}
|
|
11043
11020
|
}
|
|
11044
|
-
|
|
11045
|
-
r.input.lastTouch = Date.now(), Kl(r),
|
|
11021
|
+
ee.touchstart = (r) => {
|
|
11022
|
+
r.input.lastTouch = Date.now(), Kl(r), _r(r, "pointer");
|
|
11046
11023
|
};
|
|
11047
|
-
|
|
11048
|
-
r.input.lastTouch = Date.now(),
|
|
11024
|
+
ee.touchmove = (r) => {
|
|
11025
|
+
r.input.lastTouch = Date.now(), _r(r, "pointer");
|
|
11049
11026
|
};
|
|
11050
|
-
|
|
11027
|
+
ee.contextmenu = (r) => Kl(r);
|
|
11051
11028
|
function um(r, t) {
|
|
11052
|
-
return r.composing ? !0 :
|
|
11029
|
+
return r.composing ? !0 : te && Math.abs(t.timeStamp - r.input.compositionEndedAt) < 500 ? (r.input.compositionEndedAt = -2e8, !0) : !1;
|
|
11053
11030
|
}
|
|
11054
|
-
const sh =
|
|
11055
|
-
|
|
11031
|
+
const sh = cr ? 5e3 : -1;
|
|
11032
|
+
re.compositionstart = re.compositionupdate = (r) => {
|
|
11056
11033
|
if (!r.composing) {
|
|
11057
11034
|
r.domObserver.flush();
|
|
11058
11035
|
let { state: t } = r, e = t.selection.$to;
|
|
11059
11036
|
if (t.selection instanceof Q && (t.storedMarks || !e.textOffset && e.parentOffset && e.nodeBefore.marks.some((o) => o.type.spec.inclusive === !1)))
|
|
11060
11037
|
r.markCursor = r.state.storedMarks || e.marks(), ia(r, !0), r.markCursor = null;
|
|
11061
|
-
else if (ia(r, !t.selection.empty),
|
|
11038
|
+
else if (ia(r, !t.selection.empty), $e && t.selection.empty && e.parentOffset && !e.textOffset && e.nodeBefore.marks.length) {
|
|
11062
11039
|
let o = r.domSelectionRange();
|
|
11063
11040
|
for (let i = o.focusNode, n = o.focusOffset; i && i.nodeType == 1 && n != 0; ) {
|
|
11064
11041
|
let a = n < 0 ? i.lastChild : i.childNodes[n - 1];
|
|
@@ -11076,7 +11053,7 @@ oe.compositionstart = oe.compositionupdate = (r) => {
|
|
|
11076
11053
|
}
|
|
11077
11054
|
xm(r, sh);
|
|
11078
11055
|
};
|
|
11079
|
-
|
|
11056
|
+
re.compositionend = (r, t) => {
|
|
11080
11057
|
r.composing && (r.input.composing = !1, r.input.compositionEndedAt = t.timeStamp, r.input.compositionPendingChanges = r.domObserver.pendingRecords().length ? r.input.compositionID : 0, r.input.compositionNode = null, r.input.compositionPendingChanges && Promise.resolve().then(() => r.domObserver.flush()), r.input.compositionID++, xm(r, 20));
|
|
11081
11058
|
};
|
|
11082
11059
|
function xm(r, t) {
|
|
@@ -11110,7 +11087,7 @@ function ph() {
|
|
|
11110
11087
|
return r.initEvent("event", !0, !0), r.timeStamp;
|
|
11111
11088
|
}
|
|
11112
11089
|
function ia(r, t = !1) {
|
|
11113
|
-
if (!(
|
|
11090
|
+
if (!(cr && r.domObserver.flushingSoon >= 0)) {
|
|
11114
11091
|
if (r.domObserver.forceFlush(), gm(r), t || r.docView && r.docView.dirty) {
|
|
11115
11092
|
let e = jl(r), o = r.state.selection;
|
|
11116
11093
|
return e && !e.eq(o) ? r.dispatch(r.state.tr.setSelection(e)) : (r.markCursor || t) && !o.$from.node(o.$from.sharedDepth(o.to)).inlineContent ? r.dispatch(r.state.tr.deleteSelection()) : r.updateState(r.state), !0;
|
|
@@ -11129,7 +11106,7 @@ function dh(r, t) {
|
|
|
11129
11106
|
}, 50);
|
|
11130
11107
|
}
|
|
11131
11108
|
const Ui = le && Hr < 15 || ei && af < 604;
|
|
11132
|
-
|
|
11109
|
+
ee.copy = re.cut = (r, t) => {
|
|
11133
11110
|
let e = t, o = r.state.selection, i = e.type == "cut";
|
|
11134
11111
|
if (o.empty)
|
|
11135
11112
|
return;
|
|
@@ -11165,9 +11142,9 @@ function fm(r) {
|
|
|
11165
11142
|
let e = r.getData("text/uri-list");
|
|
11166
11143
|
return e ? e.replace(/\r?\n/g, " ") : "";
|
|
11167
11144
|
}
|
|
11168
|
-
|
|
11145
|
+
re.paste = (r, t) => {
|
|
11169
11146
|
let e = t;
|
|
11170
|
-
if (r.composing && !
|
|
11147
|
+
if (r.composing && !cr)
|
|
11171
11148
|
return;
|
|
11172
11149
|
let o = Ui ? null : e.clipboardData, i = r.input.shiftKey && r.input.lastKeyCode != 45;
|
|
11173
11150
|
o && Ki(r, fm(o), o.getData("text/html"), i, e) ? e.preventDefault() : bh(r, e);
|
|
@@ -11177,12 +11154,12 @@ class hm {
|
|
|
11177
11154
|
this.slice = t, this.move = e, this.node = o;
|
|
11178
11155
|
}
|
|
11179
11156
|
}
|
|
11180
|
-
const mh =
|
|
11157
|
+
const mh = Ce ? "altKey" : "ctrlKey";
|
|
11181
11158
|
function ym(r, t) {
|
|
11182
11159
|
let e = r.someProp("dragCopies", (o) => !o(t));
|
|
11183
11160
|
return e ?? !t[mh];
|
|
11184
11161
|
}
|
|
11185
|
-
|
|
11162
|
+
ee.dragstart = (r, t) => {
|
|
11186
11163
|
let e = t, o = r.input.mouseDown;
|
|
11187
11164
|
if (o && o.done(), !e.dataTransfer)
|
|
11188
11165
|
return;
|
|
@@ -11196,16 +11173,16 @@ re.dragstart = (r, t) => {
|
|
|
11196
11173
|
}
|
|
11197
11174
|
}
|
|
11198
11175
|
let s = (a || r.state.selection).content(), { dom: l, text: p, slice: d } = Wl(r, s);
|
|
11199
|
-
(!e.dataTransfer.files.length || !
|
|
11176
|
+
(!e.dataTransfer.files.length || !Gt || qb > 120) && e.dataTransfer.clearData(), e.dataTransfer.setData(Ui ? "Text" : "text/html", l.innerHTML), e.dataTransfer.effectAllowed = "copyMove", Ui || e.dataTransfer.setData("text/plain", p), r.dragging = new hm(d, ym(r, e), a);
|
|
11200
11177
|
};
|
|
11201
|
-
|
|
11178
|
+
ee.dragend = (r) => {
|
|
11202
11179
|
let t = r.dragging;
|
|
11203
11180
|
window.setTimeout(() => {
|
|
11204
11181
|
r.dragging == t && (r.dragging = null);
|
|
11205
11182
|
}, 50);
|
|
11206
11183
|
};
|
|
11207
|
-
|
|
11208
|
-
|
|
11184
|
+
re.dragover = re.dragenter = (r, t) => t.preventDefault();
|
|
11185
|
+
re.drop = (r, t) => {
|
|
11209
11186
|
let e = t, o = r.dragging;
|
|
11210
11187
|
if (r.dragging = null, !e.dataTransfer)
|
|
11211
11188
|
return;
|
|
@@ -11243,17 +11220,17 @@ oe.drop = (r, t) => {
|
|
|
11243
11220
|
}
|
|
11244
11221
|
r.focus(), r.dispatch(p.setMeta("uiEvent", "drop"));
|
|
11245
11222
|
};
|
|
11246
|
-
|
|
11223
|
+
ee.focus = (r) => {
|
|
11247
11224
|
r.input.lastFocus = Date.now(), r.focused || (r.domObserver.stop(), r.dom.classList.add("ProseMirror-focused"), r.domObserver.start(), r.focused = !0, setTimeout(() => {
|
|
11248
|
-
r.docView && r.hasFocus() && !r.domObserver.currentSelection.eq(r.domSelectionRange()) &&
|
|
11225
|
+
r.docView && r.hasFocus() && !r.domObserver.currentSelection.eq(r.domSelectionRange()) && ur(r);
|
|
11249
11226
|
}, 20));
|
|
11250
11227
|
};
|
|
11251
|
-
|
|
11228
|
+
ee.blur = (r, t) => {
|
|
11252
11229
|
let e = t;
|
|
11253
11230
|
r.focused && (r.domObserver.stop(), r.dom.classList.remove("ProseMirror-focused"), r.domObserver.start(), e.relatedTarget && r.dom.contains(e.relatedTarget) && r.domObserver.currentSelection.clear(), r.focused = !1);
|
|
11254
11231
|
};
|
|
11255
|
-
|
|
11256
|
-
if (
|
|
11232
|
+
ee.beforeinput = (r, t) => {
|
|
11233
|
+
if (Gt && cr && t.inputType == "deleteContentBackward") {
|
|
11257
11234
|
r.domObserver.flushSoon();
|
|
11258
11235
|
let { domChangeCount: o } = r.input;
|
|
11259
11236
|
setTimeout(() => {
|
|
@@ -11264,8 +11241,8 @@ re.beforeinput = (r, t) => {
|
|
|
11264
11241
|
}, 50);
|
|
11265
11242
|
}
|
|
11266
11243
|
};
|
|
11267
|
-
for (let r in
|
|
11268
|
-
|
|
11244
|
+
for (let r in re)
|
|
11245
|
+
ee[r] = re[r];
|
|
11269
11246
|
function Gi(r, t) {
|
|
11270
11247
|
if (r == t)
|
|
11271
11248
|
return !0;
|
|
@@ -11283,7 +11260,7 @@ class na {
|
|
|
11283
11260
|
}
|
|
11284
11261
|
map(t, e, o, i) {
|
|
11285
11262
|
let { pos: n, deleted: a } = t.mapResult(e.from + i, this.side < 0 ? -1 : 1);
|
|
11286
|
-
return a ? null : new
|
|
11263
|
+
return a ? null : new Ee(n - o, n - o, this);
|
|
11287
11264
|
}
|
|
11288
11265
|
valid() {
|
|
11289
11266
|
return !0;
|
|
@@ -11301,7 +11278,7 @@ class Vr {
|
|
|
11301
11278
|
}
|
|
11302
11279
|
map(t, e, o, i) {
|
|
11303
11280
|
let n = t.map(e.from + i, this.spec.inclusiveStart ? -1 : 1) - o, a = t.map(e.to + i, this.spec.inclusiveEnd ? 1 : -1) - o;
|
|
11304
|
-
return n >= a ? null : new
|
|
11281
|
+
return n >= a ? null : new Ee(n, a, this);
|
|
11305
11282
|
}
|
|
11306
11283
|
valid(t, e) {
|
|
11307
11284
|
return e.from < e.to;
|
|
@@ -11324,7 +11301,7 @@ class Gl {
|
|
|
11324
11301
|
if (n.deleted)
|
|
11325
11302
|
return null;
|
|
11326
11303
|
let a = t.mapResult(e.to + i, -1);
|
|
11327
|
-
return a.deleted || a.pos <= n.pos ? null : new
|
|
11304
|
+
return a.deleted || a.pos <= n.pos ? null : new Ee(n.pos - o, a.pos - o, this);
|
|
11328
11305
|
}
|
|
11329
11306
|
valid(t, e) {
|
|
11330
11307
|
let { index: o, offset: i } = t.content.findIndex(e.from), n;
|
|
@@ -11336,7 +11313,7 @@ class Gl {
|
|
|
11336
11313
|
destroy() {
|
|
11337
11314
|
}
|
|
11338
11315
|
}
|
|
11339
|
-
class
|
|
11316
|
+
class Ee {
|
|
11340
11317
|
/**
|
|
11341
11318
|
@internal
|
|
11342
11319
|
*/
|
|
@@ -11347,7 +11324,7 @@ class Me {
|
|
|
11347
11324
|
@internal
|
|
11348
11325
|
*/
|
|
11349
11326
|
copy(t, e) {
|
|
11350
|
-
return new
|
|
11327
|
+
return new Ee(t, e, this.type);
|
|
11351
11328
|
}
|
|
11352
11329
|
/**
|
|
11353
11330
|
@internal
|
|
@@ -11370,14 +11347,14 @@ class Me {
|
|
|
11370
11347
|
widget's current document position.
|
|
11371
11348
|
*/
|
|
11372
11349
|
static widget(t, e, o) {
|
|
11373
|
-
return new
|
|
11350
|
+
return new Ee(t, t, new na(e, o));
|
|
11374
11351
|
}
|
|
11375
11352
|
/**
|
|
11376
11353
|
Creates an inline decoration, which adds the given attributes to
|
|
11377
11354
|
each inline node between `from` and `to`.
|
|
11378
11355
|
*/
|
|
11379
11356
|
static inline(t, e, o, i) {
|
|
11380
|
-
return new
|
|
11357
|
+
return new Ee(t, e, new Vr(o, i));
|
|
11381
11358
|
}
|
|
11382
11359
|
/**
|
|
11383
11360
|
Creates a node decoration. `from` and `to` should point precisely
|
|
@@ -11385,7 +11362,7 @@ class Me {
|
|
|
11385
11362
|
node, will receive the given attributes.
|
|
11386
11363
|
*/
|
|
11387
11364
|
static node(t, e, o, i) {
|
|
11388
|
-
return new
|
|
11365
|
+
return new Ee(t, e, new Gl(o, i));
|
|
11389
11366
|
}
|
|
11390
11367
|
/**
|
|
11391
11368
|
The spec provided when creating this decoration. Can be useful
|
|
@@ -11421,7 +11398,7 @@ class Tt {
|
|
|
11421
11398
|
you must make a copy if you want need to preserve that.
|
|
11422
11399
|
*/
|
|
11423
11400
|
static create(t, e) {
|
|
11424
|
-
return e.length ? aa(e, t, 0, fo) :
|
|
11401
|
+
return e.length ? aa(e, t, 0, fo) : qt;
|
|
11425
11402
|
}
|
|
11426
11403
|
/**
|
|
11427
11404
|
Find all decorations in this set which touch the given range
|
|
@@ -11451,7 +11428,7 @@ class Tt {
|
|
|
11451
11428
|
document.
|
|
11452
11429
|
*/
|
|
11453
11430
|
map(t, e, o) {
|
|
11454
|
-
return this ==
|
|
11431
|
+
return this == qt || t.maps.length == 0 ? this : this.mapInner(t, e, 0, 0, o || fo);
|
|
11455
11432
|
}
|
|
11456
11433
|
/**
|
|
11457
11434
|
@internal
|
|
@@ -11462,7 +11439,7 @@ class Tt {
|
|
|
11462
11439
|
let l = this.local[s].map(t, o, i);
|
|
11463
11440
|
l && l.type.valid(e, l) ? (a || (a = [])).push(l) : n.onRemove && n.onRemove(this.local[s].spec);
|
|
11464
11441
|
}
|
|
11465
|
-
return this.children.length ? uh(this.children, a || [], t, e, o, i, n) : a ? new Tt(a.sort(ho), Vo) :
|
|
11442
|
+
return this.children.length ? uh(this.children, a || [], t, e, o, i, n) : a ? new Tt(a.sort(ho), Vo) : qt;
|
|
11466
11443
|
}
|
|
11467
11444
|
/**
|
|
11468
11445
|
Add the given array of decorations to the ones in the set,
|
|
@@ -11471,7 +11448,7 @@ class Tt {
|
|
|
11471
11448
|
structure.
|
|
11472
11449
|
*/
|
|
11473
11450
|
add(t, e) {
|
|
11474
|
-
return e.length ? this ==
|
|
11451
|
+
return e.length ? this == qt ? Tt.create(t, e) : this.addInner(t, e, 0) : this;
|
|
11475
11452
|
}
|
|
11476
11453
|
addInner(t, e, o) {
|
|
11477
11454
|
let i, n = 0;
|
|
@@ -11493,7 +11470,7 @@ class Tt {
|
|
|
11493
11470
|
the ones in the given array.
|
|
11494
11471
|
*/
|
|
11495
11472
|
remove(t) {
|
|
11496
|
-
return t.length == 0 || this ==
|
|
11473
|
+
return t.length == 0 || this == qt ? this : this.removeInner(t, 0);
|
|
11497
11474
|
}
|
|
11498
11475
|
removeInner(t, e) {
|
|
11499
11476
|
let o = this.children, i = this.local;
|
|
@@ -11505,7 +11482,7 @@ class Tt {
|
|
|
11505
11482
|
continue;
|
|
11506
11483
|
o == this.children && (o = this.children.slice());
|
|
11507
11484
|
let p = o[n + 2].removeInner(a, s + 1);
|
|
11508
|
-
p !=
|
|
11485
|
+
p != qt ? o[n + 2] = p : (o.splice(n, 3), n -= 3);
|
|
11509
11486
|
}
|
|
11510
11487
|
if (i.length) {
|
|
11511
11488
|
for (let n = 0, a; n < t.length; n++)
|
|
@@ -11513,10 +11490,10 @@ class Tt {
|
|
|
11513
11490
|
for (let s = 0; s < i.length; s++)
|
|
11514
11491
|
i[s].eq(a, e) && (i == this.local && (i = this.local.slice()), i.splice(s--, 1));
|
|
11515
11492
|
}
|
|
11516
|
-
return o == this.children && i == this.local ? this : i.length || o.length ? new Tt(i, o) :
|
|
11493
|
+
return o == this.children && i == this.local ? this : i.length || o.length ? new Tt(i, o) : qt;
|
|
11517
11494
|
}
|
|
11518
11495
|
forChild(t, e) {
|
|
11519
|
-
if (this ==
|
|
11496
|
+
if (this == qt)
|
|
11520
11497
|
return this;
|
|
11521
11498
|
if (e.isLeaf)
|
|
11522
11499
|
return Tt.empty;
|
|
@@ -11536,9 +11513,9 @@ class Tt {
|
|
|
11536
11513
|
}
|
|
11537
11514
|
if (i) {
|
|
11538
11515
|
let s = new Tt(i.sort(ho), Vo);
|
|
11539
|
-
return o ? new
|
|
11516
|
+
return o ? new Pr([s, o]) : s;
|
|
11540
11517
|
}
|
|
11541
|
-
return o ||
|
|
11518
|
+
return o || qt;
|
|
11542
11519
|
}
|
|
11543
11520
|
/**
|
|
11544
11521
|
@internal
|
|
@@ -11566,7 +11543,7 @@ class Tt {
|
|
|
11566
11543
|
@internal
|
|
11567
11544
|
*/
|
|
11568
11545
|
localsInner(t) {
|
|
11569
|
-
if (this ==
|
|
11546
|
+
if (this == qt)
|
|
11570
11547
|
return Vo;
|
|
11571
11548
|
if (t.inlineContent || !this.local.some(Vr.is))
|
|
11572
11549
|
return this.local;
|
|
@@ -11581,14 +11558,14 @@ class Tt {
|
|
|
11581
11558
|
}
|
|
11582
11559
|
Tt.empty = new Tt([], []);
|
|
11583
11560
|
Tt.removeOverlap = Jl;
|
|
11584
|
-
const
|
|
11585
|
-
class
|
|
11561
|
+
const qt = Tt.empty;
|
|
11562
|
+
class Pr {
|
|
11586
11563
|
constructor(t) {
|
|
11587
11564
|
this.members = t;
|
|
11588
11565
|
}
|
|
11589
11566
|
map(t, e) {
|
|
11590
11567
|
const o = this.members.map((i) => i.map(t, e, fo));
|
|
11591
|
-
return
|
|
11568
|
+
return Pr.from(o);
|
|
11592
11569
|
}
|
|
11593
11570
|
forChild(t, e) {
|
|
11594
11571
|
if (e.isLeaf)
|
|
@@ -11596,12 +11573,12 @@ class Br {
|
|
|
11596
11573
|
let o = [];
|
|
11597
11574
|
for (let i = 0; i < this.members.length; i++) {
|
|
11598
11575
|
let n = this.members[i].forChild(t, e);
|
|
11599
|
-
n !=
|
|
11576
|
+
n != qt && (n instanceof Pr ? o = o.concat(n.members) : o.push(n));
|
|
11600
11577
|
}
|
|
11601
|
-
return
|
|
11578
|
+
return Pr.from(o);
|
|
11602
11579
|
}
|
|
11603
11580
|
eq(t) {
|
|
11604
|
-
if (!(t instanceof
|
|
11581
|
+
if (!(t instanceof Pr) || t.members.length != this.members.length)
|
|
11605
11582
|
return !1;
|
|
11606
11583
|
for (let e = 0; e < this.members.length; e++)
|
|
11607
11584
|
if (!this.members[e].eq(t.members[e]))
|
|
@@ -11628,11 +11605,11 @@ class Br {
|
|
|
11628
11605
|
static from(t) {
|
|
11629
11606
|
switch (t.length) {
|
|
11630
11607
|
case 0:
|
|
11631
|
-
return
|
|
11608
|
+
return qt;
|
|
11632
11609
|
case 1:
|
|
11633
11610
|
return t[0];
|
|
11634
11611
|
default:
|
|
11635
|
-
return new
|
|
11612
|
+
return new Pr(t.every((e) => e instanceof Tt) ? t : t.reduce((e, o) => e.concat(o instanceof Tt ? o : o.members), []));
|
|
11636
11613
|
}
|
|
11637
11614
|
}
|
|
11638
11615
|
forEachSet(t) {
|
|
@@ -11671,7 +11648,7 @@ function uh(r, t, e, o, i, n, a) {
|
|
|
11671
11648
|
let m = e.map(r[p + 1] + n, -1), u = m - i, { index: x, offset: g } = o.content.findIndex(c), f = o.maybeChild(x);
|
|
11672
11649
|
if (f && g == c && g + f.nodeSize == u) {
|
|
11673
11650
|
let y = s[p + 2].mapInner(e, f, d + 1, r[p] + n + 1, a);
|
|
11674
|
-
y !=
|
|
11651
|
+
y != qt ? (s[p] = c, s[p + 1] = u, s[p + 2] = y) : (s[p + 1] = -2, l = !0);
|
|
11675
11652
|
} else
|
|
11676
11653
|
l = !0;
|
|
11677
11654
|
}
|
|
@@ -11695,7 +11672,7 @@ function wm(r, t) {
|
|
|
11695
11672
|
let e = [];
|
|
11696
11673
|
for (let o = 0; o < r.length; o++) {
|
|
11697
11674
|
let i = r[o];
|
|
11698
|
-
e.push(new
|
|
11675
|
+
e.push(new Ee(i.from + t, i.to + t, i.type));
|
|
11699
11676
|
}
|
|
11700
11677
|
return e;
|
|
11701
11678
|
}
|
|
@@ -11733,13 +11710,13 @@ function aa(r, t, e, o) {
|
|
|
11733
11710
|
if (p) {
|
|
11734
11711
|
n = !0;
|
|
11735
11712
|
let d = aa(p, s, e + l + 1, o);
|
|
11736
|
-
d !=
|
|
11713
|
+
d != qt && i.push(l, l + s.nodeSize, d);
|
|
11737
11714
|
}
|
|
11738
11715
|
});
|
|
11739
11716
|
let a = wm(n ? km(r) : r, -e).sort(ho);
|
|
11740
11717
|
for (let s = 0; s < a.length; s++)
|
|
11741
11718
|
a[s].type.valid(t, a[s]) || (o.onRemove && o.onRemove(a[s].spec), a.splice(s--, 1));
|
|
11742
|
-
return a.length || i.length ? new Tt(a, i) :
|
|
11719
|
+
return a.length || i.length ? new Tt(a, i) : qt;
|
|
11743
11720
|
}
|
|
11744
11721
|
function ho(r, t) {
|
|
11745
11722
|
return r.from - t.from || r.to - t.to;
|
|
@@ -11771,8 +11748,8 @@ function Cs(r) {
|
|
|
11771
11748
|
let t = [];
|
|
11772
11749
|
return r.someProp("decorations", (e) => {
|
|
11773
11750
|
let o = e(r.state);
|
|
11774
|
-
o && o !=
|
|
11775
|
-
}), r.cursorWrapper && t.push(Tt.create(r.state.doc, [r.cursorWrapper.deco])),
|
|
11751
|
+
o && o != qt && t.push(o);
|
|
11752
|
+
}), r.cursorWrapper && t.push(Tt.create(r.state.doc, [r.cursorWrapper.deco])), Pr.from(t);
|
|
11776
11753
|
}
|
|
11777
11754
|
const gh = {
|
|
11778
11755
|
childList: !0,
|
|
@@ -11841,7 +11818,7 @@ class yh {
|
|
|
11841
11818
|
onSelectionChange() {
|
|
11842
11819
|
if (kd(this.view)) {
|
|
11843
11820
|
if (this.suppressingSelectionUpdates)
|
|
11844
|
-
return
|
|
11821
|
+
return ur(this.view);
|
|
11845
11822
|
if (le && Hr <= 11 && !this.view.state.selection.empty) {
|
|
11846
11823
|
let t = this.view.domSelectionRange();
|
|
11847
11824
|
if (t.focusNode && Mo(t.focusNode, t.focusOffset, t.anchorNode, t.anchorOffset))
|
|
@@ -11889,7 +11866,7 @@ class yh {
|
|
|
11889
11866
|
let c = this.registerMutation(e[d], l);
|
|
11890
11867
|
c && (n = n < 0 ? c.from : Math.min(c.from, n), a = a < 0 ? c.to : Math.max(c.to, a), c.typeOver && (s = !0));
|
|
11891
11868
|
}
|
|
11892
|
-
if (
|
|
11869
|
+
if ($e && l.length) {
|
|
11893
11870
|
let d = l.filter((c) => c.nodeName == "BR");
|
|
11894
11871
|
if (d.length == 2) {
|
|
11895
11872
|
let [c, m] = d;
|
|
@@ -11903,7 +11880,7 @@ class yh {
|
|
|
11903
11880
|
}
|
|
11904
11881
|
}
|
|
11905
11882
|
let p = null;
|
|
11906
|
-
n < 0 && i && t.input.lastFocus > Date.now() - 200 && Math.max(t.input.lastTouch, t.input.lastClick.time) < Date.now() - 300 && Ka(o) && (p = jl(t)) && p.eq(Z.near(t.state.doc.resolve(0), 1)) ? (t.input.lastFocus = 0,
|
|
11883
|
+
n < 0 && i && t.input.lastFocus > Date.now() - 200 && Math.max(t.input.lastTouch, t.input.lastClick.time) < Date.now() - 300 && Ka(o) && (p = jl(t)) && p.eq(Z.near(t.state.doc.resolve(0), 1)) ? (t.input.lastFocus = 0, ur(t), this.currentSelection.set(o), t.scrollToSelection()) : (n > -1 || i) && (n > -1 && (t.docView.markDirty(n, a), wh(t)), this.handleDOMChange(n, a, s, l), t.docView && t.docView.dirty ? t.updateState(t.state) : this.currentSelection.eq(o) || ur(t), this.currentSelection.set(o));
|
|
11907
11884
|
}
|
|
11908
11885
|
registerMutation(t, e) {
|
|
11909
11886
|
if (e.indexOf(t.target) > -1)
|
|
@@ -11941,7 +11918,7 @@ class yh {
|
|
|
11941
11918
|
let Ad = /* @__PURE__ */ new WeakMap(), Dd = !1;
|
|
11942
11919
|
function wh(r) {
|
|
11943
11920
|
if (!Ad.has(r) && (Ad.set(r, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(r.dom).whiteSpace) !== -1)) {
|
|
11944
|
-
if (r.requiresGeckoHackNode =
|
|
11921
|
+
if (r.requiresGeckoHackNode = $e, Dd)
|
|
11945
11922
|
return;
|
|
11946
11923
|
console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."), Dd = !0;
|
|
11947
11924
|
}
|
|
@@ -11972,7 +11949,7 @@ function kh(r, t) {
|
|
|
11972
11949
|
}
|
|
11973
11950
|
function Sh(r, t, e) {
|
|
11974
11951
|
let { node: o, fromOffset: i, toOffset: n, from: a, to: s } = r.docView.parseRange(t, e), l = r.domSelectionRange(), p, d = l.anchorNode;
|
|
11975
|
-
if (d && r.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (p = [{ node: d, offset: l.anchorOffset }], Ka(l) || p.push({ node: l.focusNode, offset: l.focusOffset })),
|
|
11952
|
+
if (d && r.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (p = [{ node: d, offset: l.anchorOffset }], Ka(l) || p.push({ node: l.focusNode, offset: l.focusOffset })), Gt && r.input.lastKeyCode === 8)
|
|
11976
11953
|
for (let f = n; f > i; f--) {
|
|
11977
11954
|
let y = o.childNodes[f - 1], w = y.pmViewDesc;
|
|
11978
11955
|
if (y.nodeName == "BR" && !w) {
|
|
@@ -12004,10 +11981,10 @@ function Ch(r) {
|
|
|
12004
11981
|
if (t)
|
|
12005
11982
|
return t.parseRule();
|
|
12006
11983
|
if (r.nodeName == "BR" && r.parentNode) {
|
|
12007
|
-
if (
|
|
11984
|
+
if (te && /^(ul|ol)$/i.test(r.parentNode.nodeName)) {
|
|
12008
11985
|
let e = document.createElement("div");
|
|
12009
11986
|
return e.appendChild(document.createElement("li")), { skip: e };
|
|
12010
|
-
} else if (r.parentNode.lastChild == r ||
|
|
11987
|
+
} else if (r.parentNode.lastChild == r || te && /^(tr|table)$/i.test(r.parentNode.nodeName))
|
|
12011
11988
|
return { ignore: !0 };
|
|
12012
11989
|
} else if (r.nodeName == "IMG" && r.getAttribute("mark-placeholder"))
|
|
12013
11990
|
return { ignore: !0 };
|
|
@@ -12019,7 +11996,7 @@ function Eh(r, t, e, o, i) {
|
|
|
12019
11996
|
if (r.input.compositionPendingChanges = 0, t < 0) {
|
|
12020
11997
|
let R = r.input.lastSelectionTime > Date.now() - 50 ? r.input.lastSelectionOrigin : null, H = jl(r, R);
|
|
12021
11998
|
if (H && !r.state.selection.eq(H)) {
|
|
12022
|
-
if (
|
|
11999
|
+
if (Gt && cr && r.input.lastKeyCode === 13 && Date.now() - 100 < r.input.lastKeyCodeTime && r.someProp("handleKeyDown", (E) => E(r, lo(13, "Enter"))))
|
|
12023
12000
|
return;
|
|
12024
12001
|
let P = r.state.tr.setSelection(H);
|
|
12025
12002
|
R == "pointer" ? P.setMeta("pointer", !0) : R == "key" && P.scrollIntoView(), n && P.setMeta("composition", n), r.dispatch(P);
|
|
@@ -12031,7 +12008,7 @@ function Eh(r, t, e, o, i) {
|
|
|
12031
12008
|
let l = r.state.selection, p = Sh(r, t, e), d = r.state.doc, c = d.slice(p.from, p.to), m, u;
|
|
12032
12009
|
r.input.lastKeyCode === 8 && Date.now() - 100 < r.input.lastKeyCodeTime ? (m = r.state.selection.to, u = "end") : (m = r.state.selection.from, u = "start"), r.input.lastKeyCode = null;
|
|
12033
12010
|
let x = Bh(c.content, p.doc.content, p.from, m, u);
|
|
12034
|
-
if (x && r.input.domChangeCount++, (ei && r.input.lastIOSEnter > Date.now() - 225 ||
|
|
12011
|
+
if (x && r.input.domChangeCount++, (ei && r.input.lastIOSEnter > Date.now() - 225 || cr) && i.some((R) => R.nodeType == 1 && !Mh.test(R.nodeName)) && (!x || x.endA >= x.endB) && r.someProp("handleKeyDown", (R) => R(r, lo(13, "Enter")))) {
|
|
12035
12012
|
r.input.lastIOSEnter = 0;
|
|
12036
12013
|
return;
|
|
12037
12014
|
}
|
|
@@ -12055,10 +12032,10 @@ function Eh(r, t, e, o, i) {
|
|
|
12055
12032
|
return;
|
|
12056
12033
|
}
|
|
12057
12034
|
if (r.state.selection.anchor > x.start && Oh(d, x.start, x.endA, g, f) && r.someProp("handleKeyDown", (R) => R(r, lo(8, "Backspace")))) {
|
|
12058
|
-
|
|
12035
|
+
cr && Gt && r.domObserver.suppressSelectionUpdates();
|
|
12059
12036
|
return;
|
|
12060
12037
|
}
|
|
12061
|
-
|
|
12038
|
+
Gt && x.endB == x.start && (r.input.lastChromeDelete = Date.now()), cr && !w && g.start() != f.start() && f.parentOffset == 0 && g.depth == f.depth && p.sel && p.sel.anchor == p.sel.head && p.sel.head == x.endA && (x.endB -= 2, f = p.doc.resolveNoCache(x.endB - p.from), setTimeout(() => {
|
|
12062
12039
|
r.someProp("handleKeyDown", function(R) {
|
|
12063
12040
|
return R(r, lo(13, "Enter"));
|
|
12064
12041
|
});
|
|
@@ -12067,13 +12044,13 @@ function Eh(r, t, e, o, i) {
|
|
|
12067
12044
|
let H = R || r.state.tr.replace(h, B, p.doc.slice(x.start - p.from, x.endB - p.from));
|
|
12068
12045
|
if (p.sel) {
|
|
12069
12046
|
let P = Id(r, H.doc, p.sel);
|
|
12070
|
-
P && !(
|
|
12047
|
+
P && !(Gt && r.composing && P.empty && (x.start != x.endB || r.input.lastChromeDelete < Date.now() - 100) && (P.head == h || P.head == H.mapping.map(B) - 1) || le && P.empty && P.head == h) && H.setSelection(P);
|
|
12071
12048
|
}
|
|
12072
12049
|
return n && H.setMeta("composition", n), H.scrollIntoView();
|
|
12073
12050
|
}, A;
|
|
12074
12051
|
if (w) {
|
|
12075
12052
|
if (g.pos == f.pos) {
|
|
12076
|
-
le && Hr <= 11 && g.parentOffset == 0 && (r.domObserver.suppressSelectionUpdates(), setTimeout(() =>
|
|
12053
|
+
le && Hr <= 11 && g.parentOffset == 0 && (r.domObserver.suppressSelectionUpdates(), setTimeout(() => ur(r), 20));
|
|
12077
12054
|
let R = M(r.state.tr.delete(h, B)), H = d.resolve(x.start).marksAcross(d.resolve(x.endA));
|
|
12078
12055
|
H && R.ensureMarks(H), r.dispatch(R);
|
|
12079
12056
|
} else if (
|
|
@@ -12239,12 +12216,12 @@ class Sm {
|
|
|
12239
12216
|
let m = d == "preserve" && a && this.dom.style.overflowAnchor == null && pf(this);
|
|
12240
12217
|
if (a) {
|
|
12241
12218
|
this.domObserver.stop();
|
|
12242
|
-
let u = c && (le ||
|
|
12219
|
+
let u = c && (le || Gt) && !this.composing && !i.selection.empty && !t.selection.empty && Ph(i.selection, t.selection);
|
|
12243
12220
|
if (c) {
|
|
12244
|
-
let x =
|
|
12221
|
+
let x = Gt ? this.trackWrites = this.domSelectionRange().focusNode : null;
|
|
12245
12222
|
this.composing && (this.input.compositionNode = lh(this)), (n || !this.docView.update(t.doc, p, l, this)) && (this.docView.updateOuterDeco(p), this.docView.destroy(), this.docView = gd(t.doc, p, l, this.dom, this)), x && !this.trackWrites && (u = !0);
|
|
12246
12223
|
}
|
|
12247
|
-
u || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && Nf(this)) ?
|
|
12224
|
+
u || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && Nf(this)) ? ur(this, u) : (im(this, t.selection), this.domObserver.setCurSelection()), this.domObserver.start();
|
|
12248
12225
|
}
|
|
12249
12226
|
this.updatePluginViews(i), !((o = this.dragging) === null || o === void 0) && o.node && !i.doc.eq(t.doc) && this.updateDraggedNode(this.dragging, i), d == "reset" ? this.dom.scrollTop = 0 : d == "to selection" ? this.scrollToSelection() : m && df(m);
|
|
12250
12227
|
}
|
|
@@ -12333,7 +12310,7 @@ class Sm {
|
|
|
12333
12310
|
Focus the editor.
|
|
12334
12311
|
*/
|
|
12335
12312
|
focus() {
|
|
12336
|
-
this.domObserver.stop(), this.editable && cf(this.dom),
|
|
12313
|
+
this.domObserver.stop(), this.editable && cf(this.dom), ur(this), this.domObserver.start();
|
|
12337
12314
|
}
|
|
12338
12315
|
/**
|
|
12339
12316
|
Get the document root in which the editor exists. This will
|
|
@@ -12485,7 +12462,7 @@ class Sm {
|
|
|
12485
12462
|
*/
|
|
12486
12463
|
domSelectionRange() {
|
|
12487
12464
|
let t = this.domSelection();
|
|
12488
|
-
return t ?
|
|
12465
|
+
return t ? te && this.root.nodeType === 11 && rf(this.dom.ownerDocument) == this.dom && vh(this, t) || t : { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };
|
|
12489
12466
|
}
|
|
12490
12467
|
/**
|
|
12491
12468
|
@internal
|
|
@@ -12504,12 +12481,12 @@ function Rd(r) {
|
|
|
12504
12481
|
if (typeof e == "function" && (e = e(r.state)), e)
|
|
12505
12482
|
for (let o in e)
|
|
12506
12483
|
o == "class" ? t.class += " " + e[o] : o == "style" ? t.style = (t.style ? t.style + ";" : "") + e[o] : !t[o] && o != "contenteditable" && o != "nodeName" && (t[o] = String(e[o]));
|
|
12507
|
-
}), t.translate || (t.translate = "no"), [
|
|
12484
|
+
}), t.translate || (t.translate = "no"), [Ee.node(0, r.state.doc.content.size, t)];
|
|
12508
12485
|
}
|
|
12509
12486
|
function $d(r) {
|
|
12510
12487
|
if (r.markCursor) {
|
|
12511
12488
|
let t = document.createElement("img");
|
|
12512
|
-
t.className = "ProseMirror-separator", t.setAttribute("mark-placeholder", "true"), t.setAttribute("alt", ""), r.cursorWrapper = { dom: t, deco:
|
|
12489
|
+
t.className = "ProseMirror-separator", t.setAttribute("mark-placeholder", "true"), t.setAttribute("alt", ""), r.cursorWrapper = { dom: t, deco: Ee.widget(r.state.selection.from, t, { raw: !0, marks: r.markCursor }) };
|
|
12513
12490
|
} else
|
|
12514
12491
|
r.cursorWrapper = null;
|
|
12515
12492
|
}
|
|
@@ -12906,7 +12883,7 @@ const qh = (r, t) => {
|
|
|
12906
12883
|
return !1;
|
|
12907
12884
|
if (e.depth > 1 && e.after() != e.end(-1)) {
|
|
12908
12885
|
let n = e.before();
|
|
12909
|
-
if (
|
|
12886
|
+
if (mr(r.doc, n))
|
|
12910
12887
|
return t && t(r.tr.split(n).scrollIntoView()), !0;
|
|
12911
12888
|
}
|
|
12912
12889
|
let o = e.blockRange(), i = o && pi(o);
|
|
@@ -12916,7 +12893,7 @@ function Uh(r) {
|
|
|
12916
12893
|
return (t, e) => {
|
|
12917
12894
|
let { $from: o, $to: i } = t.selection;
|
|
12918
12895
|
if (t.selection instanceof J && t.selection.node.isBlock)
|
|
12919
|
-
return !o.parentOffset || !
|
|
12896
|
+
return !o.parentOffset || !mr(t.doc, o.pos) ? !1 : (e && e(t.tr.split(o.pos).scrollIntoView()), !0);
|
|
12920
12897
|
if (!o.depth)
|
|
12921
12898
|
return !1;
|
|
12922
12899
|
let n = [], a, s, l = !1, p = !1;
|
|
@@ -12931,8 +12908,8 @@ function Uh(r) {
|
|
|
12931
12908
|
}
|
|
12932
12909
|
let d = t.tr;
|
|
12933
12910
|
(t.selection instanceof Q || t.selection instanceof ue) && d.deleteSelection();
|
|
12934
|
-
let c = d.mapping.map(o.pos), m =
|
|
12935
|
-
if (m || (n[0] = s ? { type: s } : null, m =
|
|
12911
|
+
let c = d.mapping.map(o.pos), m = mr(d.doc, c, n.length, n);
|
|
12912
|
+
if (m || (n[0] = s ? { type: s } : null, m = mr(d.doc, c, n.length, n)), !m)
|
|
12936
12913
|
return !1;
|
|
12937
12914
|
if (d.split(c, n.length, n), !l && p && o.node(a).type != s) {
|
|
12938
12915
|
let u = d.mapping.map(o.before(a)), x = d.doc.resolve(u);
|
|
@@ -13078,7 +13055,7 @@ function e0(r, t, e, o, i) {
|
|
|
13078
13055
|
e[d].type == i && (a = d + 1);
|
|
13079
13056
|
let s = e.length - a, l = t.start + e.length - (o ? 2 : 0), p = t.parent;
|
|
13080
13057
|
for (let d = t.startIndex, c = t.endIndex, m = !0; d < c; d++, m = !1)
|
|
13081
|
-
!m &&
|
|
13058
|
+
!m && mr(r.doc, l, s) && (r.split(l, s), l += 2 * s), l += p.child(d).nodeSize;
|
|
13082
13059
|
return r;
|
|
13083
13060
|
}
|
|
13084
13061
|
function r0(r) {
|
|
@@ -13627,7 +13604,7 @@ function ts(r, t) {
|
|
|
13627
13604
|
En(t[o]) && En(r[o]) ? e[o] = ts(r[o], t[o]) : e[o] = t[o];
|
|
13628
13605
|
}), e;
|
|
13629
13606
|
}
|
|
13630
|
-
class
|
|
13607
|
+
class gr {
|
|
13631
13608
|
constructor(t = {}) {
|
|
13632
13609
|
this.type = "mark", this.name = "mark", this.parent = null, this.child = null, this.config = {
|
|
13633
13610
|
name: this.name,
|
|
@@ -13643,7 +13620,7 @@ class xr {
|
|
|
13643
13620
|
})) || {};
|
|
13644
13621
|
}
|
|
13645
13622
|
static create(t = {}) {
|
|
13646
|
-
return new
|
|
13623
|
+
return new gr(t);
|
|
13647
13624
|
}
|
|
13648
13625
|
configure(t = {}) {
|
|
13649
13626
|
const e = this.extend({
|
|
@@ -13653,7 +13630,7 @@ class xr {
|
|
|
13653
13630
|
return e.name = this.name, e.parent = this.parent, e;
|
|
13654
13631
|
}
|
|
13655
13632
|
extend(t = {}) {
|
|
13656
|
-
const e = new
|
|
13633
|
+
const e = new gr(t);
|
|
13657
13634
|
return e.parent = this, this.child = e, e.name = t.name ? t.name : e.parent.name, t.defaultOptions && Object.keys(t.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`), e.options = rt(q(e, "addOptions", {
|
|
13658
13635
|
name: e.name
|
|
13659
13636
|
})), e.storage = rt(q(e, "addStorage", {
|
|
@@ -13896,7 +13873,7 @@ class Go {
|
|
|
13896
13873
|
type: Os(a.name, this.schema)
|
|
13897
13874
|
}, l = [], p = q(a, "addKeyboardShortcuts", s);
|
|
13898
13875
|
let d = {};
|
|
13899
|
-
if (a.type === "mark" && q(a, "exitable", s) && (d.ArrowRight = () =>
|
|
13876
|
+
if (a.type === "mark" && q(a, "exitable", s) && (d.ArrowRight = () => gr.handleExit({ editor: t, mark: a })), p) {
|
|
13900
13877
|
const g = Object.fromEntries(Object.entries(p()).map(([f, y]) => [f, () => y({ editor: t })]));
|
|
13901
13878
|
d = { ...d, ...g };
|
|
13902
13879
|
}
|
|
@@ -14055,7 +14032,7 @@ const v0 = jt.create({
|
|
|
14055
14032
|
addProseMirrorPlugins() {
|
|
14056
14033
|
return [
|
|
14057
14034
|
new Bt({
|
|
14058
|
-
key: new
|
|
14035
|
+
key: new oe("clipboardTextSerializer"),
|
|
14059
14036
|
props: {
|
|
14060
14037
|
clipboardTextSerializer: () => {
|
|
14061
14038
|
const { editor: r } = this, { state: t, schema: e } = r, { doc: o, selection: i } = t, { ranges: n } = i, a = Math.min(...n.map((d) => d.$from.pos)), s = Math.max(...n.map((d) => d.$to.pos)), l = op(e);
|
|
@@ -14181,7 +14158,7 @@ const I0 = (r, t = {}) => ({ tr: e, state: o, dispatch: i }) => {
|
|
|
14181
14158
|
function np(r) {
|
|
14182
14159
|
return r instanceof Q;
|
|
14183
14160
|
}
|
|
14184
|
-
function
|
|
14161
|
+
function br(r = 0, t = 0, e = 0) {
|
|
14185
14162
|
return Math.min(Math.max(r, t), e);
|
|
14186
14163
|
}
|
|
14187
14164
|
function Hm(r, t = null) {
|
|
@@ -14193,7 +14170,7 @@ function Hm(r, t = null) {
|
|
|
14193
14170
|
if (t === "end")
|
|
14194
14171
|
return o;
|
|
14195
14172
|
const i = e.from, n = o.to;
|
|
14196
|
-
return t === "all" ? Q.create(r,
|
|
14173
|
+
return t === "all" ? Q.create(r, br(0, i, n), br(r.content.size, i, n)) : Q.create(r, br(t, i, n), br(t, i, n));
|
|
14197
14174
|
}
|
|
14198
14175
|
function R0() {
|
|
14199
14176
|
return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
|
|
@@ -14680,7 +14657,7 @@ function Km(r) {
|
|
|
14680
14657
|
return r instanceof J;
|
|
14681
14658
|
}
|
|
14682
14659
|
function Gm(r, t, e) {
|
|
14683
|
-
const i = r.state.doc.content.size, n =
|
|
14660
|
+
const i = r.state.doc.content.size, n = br(t, 0, i), a = br(e, 0, i), s = r.coordsAtPos(n), l = r.coordsAtPos(a, -1), p = Math.min(s.top, l.top), d = Math.max(s.bottom, l.bottom), c = Math.min(s.left, l.left), m = Math.max(s.right, l.right), u = m - c, x = d - p, y = {
|
|
14684
14661
|
top: p,
|
|
14685
14662
|
bottom: d,
|
|
14686
14663
|
left: c,
|
|
@@ -14746,13 +14723,13 @@ const k1 = (r, t = {}) => ({ tr: e, state: o, dispatch: i }) => {
|
|
|
14746
14723
|
return e.selection.$anchor.sameParent(e.selection.$head) && (a = e.selection.$anchor.parent.attrs), n.isTextblock ? i().command(({ commands: s }) => Hd(n, { ...a, ...t })(e) ? !0 : s.clearNodes()).command(({ state: s }) => Hd(n, { ...a, ...t })(s, o)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
|
|
14747
14724
|
}, M1 = (r) => ({ tr: t, dispatch: e }) => {
|
|
14748
14725
|
if (e) {
|
|
14749
|
-
const { doc: o } = t, i =
|
|
14726
|
+
const { doc: o } = t, i = br(r, 0, o.content.size), n = J.create(o, i);
|
|
14750
14727
|
t.setSelection(n);
|
|
14751
14728
|
}
|
|
14752
14729
|
return !0;
|
|
14753
14730
|
}, E1 = (r) => ({ tr: t, dispatch: e }) => {
|
|
14754
14731
|
if (e) {
|
|
14755
|
-
const { doc: o } = t, { from: i, to: n } = typeof r == "number" ? { from: r, to: r } : r, a = Q.atStart(o).from, s = Q.atEnd(o).to, l =
|
|
14732
|
+
const { doc: o } = t, { from: i, to: n } = typeof r == "number" ? { from: r, to: r } : r, a = Q.atStart(o).from, s = Q.atEnd(o).to, l = br(i, a, s), p = br(n, a, s), d = Q.create(o, l, p);
|
|
14756
14733
|
t.setSelection(d);
|
|
14757
14734
|
}
|
|
14758
14735
|
return !0;
|
|
@@ -14770,7 +14747,7 @@ function Gd(r, t) {
|
|
|
14770
14747
|
const O1 = ({ keepMarks: r = !0 } = {}) => ({ tr: t, state: e, dispatch: o, editor: i }) => {
|
|
14771
14748
|
const { selection: n, doc: a } = t, { $from: s, $to: l } = n, p = i.extensionManager.attributes, d = Wn(p, s.node().type.name, s.node().attrs);
|
|
14772
14749
|
if (n instanceof J && n.node.isBlock)
|
|
14773
|
-
return !s.parentOffset || !
|
|
14750
|
+
return !s.parentOffset || !mr(a, s.pos) ? !1 : (o && (r && Gd(e, i.extensionManager.splittableMarks), t.split(s.pos).scrollIntoView()), !0);
|
|
14774
14751
|
if (!s.parent.isBlock)
|
|
14775
14752
|
return !1;
|
|
14776
14753
|
const c = l.parentOffset === l.parent.content.size, m = s.depth === 0 ? void 0 : m1(s.node(-1).contentMatchAt(s.indexAfter(-1)));
|
|
@@ -14779,8 +14756,8 @@ const O1 = ({ keepMarks: r = !0 } = {}) => ({ tr: t, state: e, dispatch: o, edit
|
|
|
14779
14756
|
type: m,
|
|
14780
14757
|
attrs: d
|
|
14781
14758
|
}
|
|
14782
|
-
] : void 0, x =
|
|
14783
|
-
if (!u && !x &&
|
|
14759
|
+
] : void 0, x = mr(t.doc, t.mapping.map(s.pos), 1, u);
|
|
14760
|
+
if (!u && !x && mr(t.doc, t.mapping.map(s.pos), 1, m ? [{ type: m }] : void 0) && (x = !0, u = m ? [
|
|
14784
14761
|
{
|
|
14785
14762
|
type: m,
|
|
14786
14763
|
attrs: d
|
|
@@ -14838,7 +14815,7 @@ const O1 = ({ keepMarks: r = !0 } = {}) => ({ tr: t, state: e, dispatch: o, edit
|
|
|
14838
14815
|
{ type: s, attrs: x },
|
|
14839
14816
|
{ type: u, attrs: g }
|
|
14840
14817
|
] : [{ type: s, attrs: x }];
|
|
14841
|
-
if (!
|
|
14818
|
+
if (!mr(e.doc, l.pos, 2))
|
|
14842
14819
|
return !1;
|
|
14843
14820
|
if (i) {
|
|
14844
14821
|
const { selection: y, storedMarks: w } = o, { splittableMarks: k } = n.extensionManager, h = w || y.$to.parentOffset && y.$from.marks();
|
|
@@ -15041,7 +15018,7 @@ const H1 = jt.create({
|
|
|
15041
15018
|
addProseMirrorPlugins() {
|
|
15042
15019
|
return [
|
|
15043
15020
|
new Bt({
|
|
15044
|
-
key: new
|
|
15021
|
+
key: new oe("tiptapDrop"),
|
|
15045
15022
|
props: {
|
|
15046
15023
|
handleDrop: (r, t, e, o) => {
|
|
15047
15024
|
this.editor.emit("drop", {
|
|
@@ -15060,14 +15037,14 @@ const H1 = jt.create({
|
|
|
15060
15037
|
addProseMirrorPlugins() {
|
|
15061
15038
|
return [
|
|
15062
15039
|
new Bt({
|
|
15063
|
-
key: new
|
|
15040
|
+
key: new oe("editable"),
|
|
15064
15041
|
props: {
|
|
15065
15042
|
editable: () => this.editor.options.editable
|
|
15066
15043
|
}
|
|
15067
15044
|
})
|
|
15068
15045
|
];
|
|
15069
15046
|
}
|
|
15070
|
-
}), W1 = new
|
|
15047
|
+
}), W1 = new oe("focusEvents"), q1 = jt.create({
|
|
15071
15048
|
name: "focusEvents",
|
|
15072
15049
|
addProseMirrorPlugins() {
|
|
15073
15050
|
const { editor: r } = this;
|
|
@@ -15146,7 +15123,7 @@ const H1 = jt.create({
|
|
|
15146
15123
|
// This is an alternative to ProseMirror's `AllSelection`, which doesn’t work well
|
|
15147
15124
|
// with many other commands.
|
|
15148
15125
|
new Bt({
|
|
15149
|
-
key: new
|
|
15126
|
+
key: new oe("clearDocument"),
|
|
15150
15127
|
appendTransaction: (r, t, e) => {
|
|
15151
15128
|
if (r.some((g) => g.getMeta("composition")))
|
|
15152
15129
|
return;
|
|
@@ -15174,7 +15151,7 @@ const H1 = jt.create({
|
|
|
15174
15151
|
addProseMirrorPlugins() {
|
|
15175
15152
|
return [
|
|
15176
15153
|
new Bt({
|
|
15177
|
-
key: new
|
|
15154
|
+
key: new oe("tiptapPaste"),
|
|
15178
15155
|
props: {
|
|
15179
15156
|
handlePaste: (r, t, e) => {
|
|
15180
15157
|
this.editor.emit("paste", {
|
|
@@ -15192,7 +15169,7 @@ const H1 = jt.create({
|
|
|
15192
15169
|
addProseMirrorPlugins() {
|
|
15193
15170
|
return [
|
|
15194
15171
|
new Bt({
|
|
15195
|
-
key: new
|
|
15172
|
+
key: new oe("tabindex"),
|
|
15196
15173
|
props: {
|
|
15197
15174
|
attributes: () => this.editor.isEditable ? { tabindex: "0" } : {}
|
|
15198
15175
|
}
|
|
@@ -15826,7 +15803,7 @@ function Xi(r) {
|
|
|
15826
15803
|
}
|
|
15827
15804
|
});
|
|
15828
15805
|
}
|
|
15829
|
-
let
|
|
15806
|
+
let _e = class hl {
|
|
15830
15807
|
constructor(t = {}) {
|
|
15831
15808
|
this.type = "node", this.name = "node", this.parent = null, this.child = null, this.config = {
|
|
15832
15809
|
name: this.name,
|
|
@@ -15879,12 +15856,12 @@ function To(r) {
|
|
|
15879
15856
|
}
|
|
15880
15857
|
});
|
|
15881
15858
|
}
|
|
15882
|
-
var pe = "top",
|
|
15859
|
+
var pe = "top", Be = "bottom", Pe = "right", de = "left", dp = "auto", cn = [pe, Be, Pe, de], ii = "start", Qi = "end", Z1 = "clippingParents", Jm = "viewport", xi = "popper", ty = "reference", Jd = /* @__PURE__ */ cn.reduce(function(r, t) {
|
|
15883
15860
|
return r.concat([t + "-" + ii, t + "-" + Qi]);
|
|
15884
15861
|
}, []), Ym = /* @__PURE__ */ [].concat(cn, [dp]).reduce(function(r, t) {
|
|
15885
15862
|
return r.concat([t, t + "-" + ii, t + "-" + Qi]);
|
|
15886
15863
|
}, []), ey = "beforeRead", ry = "read", oy = "afterRead", iy = "beforeMain", ny = "main", ay = "afterMain", sy = "beforeWrite", ly = "write", py = "afterWrite", dy = [ey, ry, oy, iy, ny, ay, sy, ly, py];
|
|
15887
|
-
function
|
|
15864
|
+
function Xe(r) {
|
|
15888
15865
|
return r ? (r.nodeName || "").toLowerCase() : null;
|
|
15889
15866
|
}
|
|
15890
15867
|
function xe(r) {
|
|
@@ -15900,7 +15877,7 @@ function Oo(r) {
|
|
|
15900
15877
|
var t = xe(r).Element;
|
|
15901
15878
|
return r instanceof t || r instanceof Element;
|
|
15902
15879
|
}
|
|
15903
|
-
function
|
|
15880
|
+
function Oe(r) {
|
|
15904
15881
|
var t = xe(r).HTMLElement;
|
|
15905
15882
|
return r instanceof t || r instanceof HTMLElement;
|
|
15906
15883
|
}
|
|
@@ -15914,7 +15891,7 @@ function cy(r) {
|
|
|
15914
15891
|
var t = r.state;
|
|
15915
15892
|
Object.keys(t.elements).forEach(function(e) {
|
|
15916
15893
|
var o = t.styles[e] || {}, i = t.attributes[e] || {}, n = t.elements[e];
|
|
15917
|
-
!
|
|
15894
|
+
!Oe(n) || !Xe(n) || (Object.assign(n.style, o), Object.keys(i).forEach(function(a) {
|
|
15918
15895
|
var s = i[a];
|
|
15919
15896
|
s === !1 ? n.removeAttribute(a) : n.setAttribute(a, s === !0 ? "" : s);
|
|
15920
15897
|
}));
|
|
@@ -15938,7 +15915,7 @@ function by(r) {
|
|
|
15938
15915
|
var i = t.elements[o], n = t.attributes[o] || {}, a = Object.keys(t.styles.hasOwnProperty(o) ? t.styles[o] : e[o]), s = a.reduce(function(l, p) {
|
|
15939
15916
|
return l[p] = "", l;
|
|
15940
15917
|
}, {});
|
|
15941
|
-
!
|
|
15918
|
+
!Oe(i) || !Xe(i) || (Object.assign(i.style, s), Object.keys(n).forEach(function(l) {
|
|
15942
15919
|
i.removeAttribute(l);
|
|
15943
15920
|
}));
|
|
15944
15921
|
});
|
|
@@ -15952,7 +15929,7 @@ const Xm = {
|
|
|
15952
15929
|
effect: by,
|
|
15953
15930
|
requires: ["computeStyles"]
|
|
15954
15931
|
};
|
|
15955
|
-
function
|
|
15932
|
+
function Ge(r) {
|
|
15956
15933
|
return r.split("-")[0];
|
|
15957
15934
|
}
|
|
15958
15935
|
var yo = Math.max, pa = Math.min, ni = Math.round;
|
|
@@ -15968,7 +15945,7 @@ function Qm() {
|
|
|
15968
15945
|
function ai(r, t, e) {
|
|
15969
15946
|
t === void 0 && (t = !1), e === void 0 && (e = !1);
|
|
15970
15947
|
var o = r.getBoundingClientRect(), i = 1, n = 1;
|
|
15971
|
-
t &&
|
|
15948
|
+
t && Oe(r) && (i = r.offsetWidth > 0 && ni(o.width) / r.offsetWidth || 1, n = r.offsetHeight > 0 && ni(o.height) / r.offsetHeight || 1);
|
|
15972
15949
|
var a = Oo(r) ? xe(r) : window, s = a.visualViewport, l = !Qm() && e, p = (o.left + (l && s ? s.offsetLeft : 0)) / i, d = (o.top + (l && s ? s.offsetTop : 0)) / n, c = o.width / i, m = o.height / n;
|
|
15973
15950
|
return {
|
|
15974
15951
|
width: c,
|
|
@@ -16004,11 +15981,11 @@ function Zm(r, t) {
|
|
|
16004
15981
|
}
|
|
16005
15982
|
return !1;
|
|
16006
15983
|
}
|
|
16007
|
-
function
|
|
15984
|
+
function fr(r) {
|
|
16008
15985
|
return xe(r).getComputedStyle(r);
|
|
16009
15986
|
}
|
|
16010
15987
|
function my(r) {
|
|
16011
|
-
return ["table", "td", "th"].indexOf(
|
|
15988
|
+
return ["table", "td", "th"].indexOf(Xe(r)) >= 0;
|
|
16012
15989
|
}
|
|
16013
15990
|
function Yr(r) {
|
|
16014
15991
|
return ((Oo(r) ? r.ownerDocument : (
|
|
@@ -16017,7 +15994,7 @@ function Yr(r) {
|
|
|
16017
15994
|
)) || window.document).documentElement;
|
|
16018
15995
|
}
|
|
16019
15996
|
function rs(r) {
|
|
16020
|
-
return
|
|
15997
|
+
return Xe(r) === "html" ? r : (
|
|
16021
15998
|
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
16022
15999
|
// $FlowFixMe[incompatible-return]
|
|
16023
16000
|
// $FlowFixMe[prop-missing]
|
|
@@ -16029,19 +16006,19 @@ function rs(r) {
|
|
|
16029
16006
|
);
|
|
16030
16007
|
}
|
|
16031
16008
|
function Yd(r) {
|
|
16032
|
-
return !
|
|
16033
|
-
|
|
16009
|
+
return !Oe(r) || // https://github.com/popperjs/popper-core/issues/837
|
|
16010
|
+
fr(r).position === "fixed" ? null : r.offsetParent;
|
|
16034
16011
|
}
|
|
16035
16012
|
function uy(r) {
|
|
16036
16013
|
var t = /firefox/i.test(yl()), e = /Trident/i.test(yl());
|
|
16037
|
-
if (e &&
|
|
16038
|
-
var o =
|
|
16014
|
+
if (e && Oe(r)) {
|
|
16015
|
+
var o = fr(r);
|
|
16039
16016
|
if (o.position === "fixed")
|
|
16040
16017
|
return null;
|
|
16041
16018
|
}
|
|
16042
16019
|
var i = rs(r);
|
|
16043
|
-
for (cp(i) && (i = i.host);
|
|
16044
|
-
var n =
|
|
16020
|
+
for (cp(i) && (i = i.host); Oe(i) && ["html", "body"].indexOf(Xe(i)) < 0; ) {
|
|
16021
|
+
var n = fr(i);
|
|
16045
16022
|
if (n.transform !== "none" || n.perspective !== "none" || n.contain === "paint" || ["transform", "perspective"].indexOf(n.willChange) !== -1 || t && n.willChange === "filter" || t && n.filter && n.filter !== "none")
|
|
16046
16023
|
return i;
|
|
16047
16024
|
i = i.parentNode;
|
|
@@ -16049,9 +16026,9 @@ function uy(r) {
|
|
|
16049
16026
|
return null;
|
|
16050
16027
|
}
|
|
16051
16028
|
function bn(r) {
|
|
16052
|
-
for (var t = xe(r), e = Yd(r); e && my(e) &&
|
|
16029
|
+
for (var t = xe(r), e = Yd(r); e && my(e) && fr(e).position === "static"; )
|
|
16053
16030
|
e = Yd(e);
|
|
16054
|
-
return e && (
|
|
16031
|
+
return e && (Xe(e) === "html" || Xe(e) === "body" && fr(e).position === "static") ? t : e || uy(r) || t;
|
|
16055
16032
|
}
|
|
16056
16033
|
function mp(r) {
|
|
16057
16034
|
return ["top", "bottom"].indexOf(r) >= 0 ? "x" : "y";
|
|
@@ -16085,9 +16062,9 @@ var gy = function(t, e) {
|
|
|
16085
16062
|
})) : t, eu(typeof t != "number" ? t : ru(t, cn));
|
|
16086
16063
|
};
|
|
16087
16064
|
function fy(r) {
|
|
16088
|
-
var t, e = r.state, o = r.name, i = r.options, n = e.elements.arrow, a = e.modifiersData.popperOffsets, s =
|
|
16065
|
+
var t, e = r.state, o = r.name, i = r.options, n = e.elements.arrow, a = e.modifiersData.popperOffsets, s = Ge(e.placement), l = mp(s), p = [de, Pe].indexOf(s) >= 0, d = p ? "height" : "width";
|
|
16089
16066
|
if (!(!n || !a)) {
|
|
16090
|
-
var c = gy(i.padding, e), m = bp(n), u = l === "y" ? pe : de, x = l === "y" ?
|
|
16067
|
+
var c = gy(i.padding, e), m = bp(n), u = l === "y" ? pe : de, x = l === "y" ? Be : Pe, g = e.rects.reference[d] + e.rects.reference[l] - a[l] - e.rects.popper[d], f = a[l] - e.rects.reference[l], y = bn(n), w = y ? l === "y" ? y.clientHeight || 0 : y.clientWidth || 0 : 0, k = g / 2 - f / 2, h = c[u], B = w - m[d] - c[x], M = w / 2 - m[d] / 2 + k, A = Ai(h, M, B), R = l;
|
|
16091
16068
|
e.modifiersData[o] = (t = {}, t[R] = A, t.centerOffset = A - M, t);
|
|
16092
16069
|
}
|
|
16093
16070
|
}
|
|
@@ -16132,16 +16109,16 @@ function Xd(r) {
|
|
|
16132
16109
|
var y = a.hasOwnProperty("x"), w = a.hasOwnProperty("y"), k = de, h = pe, B = window;
|
|
16133
16110
|
if (p) {
|
|
16134
16111
|
var M = bn(e), A = "clientHeight", R = "clientWidth";
|
|
16135
|
-
if (M === xe(e) && (M = Yr(e),
|
|
16136
|
-
h =
|
|
16112
|
+
if (M === xe(e) && (M = Yr(e), fr(M).position !== "static" && s === "absolute" && (A = "scrollHeight", R = "scrollWidth")), M = M, i === pe || (i === de || i === Pe) && n === Qi) {
|
|
16113
|
+
h = Be;
|
|
16137
16114
|
var H = c && M === B && B.visualViewport ? B.visualViewport.height : (
|
|
16138
16115
|
// $FlowFixMe[prop-missing]
|
|
16139
16116
|
M[A]
|
|
16140
16117
|
);
|
|
16141
16118
|
g -= H - o.height, g *= l ? 1 : -1;
|
|
16142
16119
|
}
|
|
16143
|
-
if (i === de || (i === pe || i ===
|
|
16144
|
-
k =
|
|
16120
|
+
if (i === de || (i === pe || i === Be) && n === Qi) {
|
|
16121
|
+
k = Pe;
|
|
16145
16122
|
var P = c && M === B && B.visualViewport ? B.visualViewport.width : (
|
|
16146
16123
|
// $FlowFixMe[prop-missing]
|
|
16147
16124
|
M[R]
|
|
@@ -16166,7 +16143,7 @@ function Xd(r) {
|
|
|
16166
16143
|
}
|
|
16167
16144
|
function ky(r) {
|
|
16168
16145
|
var t = r.state, e = r.options, o = e.gpuAcceleration, i = o === void 0 ? !0 : o, n = e.adaptive, a = n === void 0 ? !0 : n, s = e.roundOffsets, l = s === void 0 ? !0 : s, p = {
|
|
16169
|
-
placement:
|
|
16146
|
+
placement: Ge(t.placement),
|
|
16170
16147
|
variation: si(t.placement),
|
|
16171
16148
|
popper: t.elements.popper,
|
|
16172
16149
|
popperRect: t.rects.popper,
|
|
@@ -16262,7 +16239,7 @@ function Oy(r, t) {
|
|
|
16262
16239
|
}
|
|
16263
16240
|
function By(r) {
|
|
16264
16241
|
var t, e = Yr(r), o = up(r), i = (t = r.ownerDocument) == null ? void 0 : t.body, n = yo(e.scrollWidth, e.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), a = yo(e.scrollHeight, e.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), s = -o.scrollLeft + xp(r), l = -o.scrollTop;
|
|
16265
|
-
return
|
|
16242
|
+
return fr(i || e).direction === "rtl" && (s += yo(e.clientWidth, i ? i.clientWidth : 0) - n), {
|
|
16266
16243
|
width: n,
|
|
16267
16244
|
height: a,
|
|
16268
16245
|
x: s,
|
|
@@ -16270,11 +16247,11 @@ function By(r) {
|
|
|
16270
16247
|
};
|
|
16271
16248
|
}
|
|
16272
16249
|
function gp(r) {
|
|
16273
|
-
var t =
|
|
16250
|
+
var t = fr(r), e = t.overflow, o = t.overflowX, i = t.overflowY;
|
|
16274
16251
|
return /auto|scroll|overlay|hidden/.test(e + i + o);
|
|
16275
16252
|
}
|
|
16276
16253
|
function ou(r) {
|
|
16277
|
-
return ["html", "body", "#document"].indexOf(
|
|
16254
|
+
return ["html", "body", "#document"].indexOf(Xe(r)) >= 0 ? r.ownerDocument.body : Oe(r) && gp(r) ? r : ou(rs(r));
|
|
16278
16255
|
}
|
|
16279
16256
|
function Di(r, t) {
|
|
16280
16257
|
var e;
|
|
@@ -16301,9 +16278,9 @@ function Zd(r, t, e) {
|
|
|
16301
16278
|
return t === Jm ? wl(Oy(r, e)) : Oo(t) ? Py(t, e) : wl(By(Yr(r)));
|
|
16302
16279
|
}
|
|
16303
16280
|
function Ay(r) {
|
|
16304
|
-
var t = Di(rs(r)), e = ["absolute", "fixed"].indexOf(
|
|
16281
|
+
var t = Di(rs(r)), e = ["absolute", "fixed"].indexOf(fr(r).position) >= 0, o = e && Oe(r) ? bn(r) : r;
|
|
16305
16282
|
return Oo(o) ? t.filter(function(i) {
|
|
16306
|
-
return Oo(i) && Zm(i, o) &&
|
|
16283
|
+
return Oo(i) && Zm(i, o) && Xe(i) !== "body";
|
|
16307
16284
|
}) : [];
|
|
16308
16285
|
}
|
|
16309
16286
|
function Dy(r, t, e, o) {
|
|
@@ -16314,7 +16291,7 @@ function Dy(r, t, e, o) {
|
|
|
16314
16291
|
return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
|
|
16315
16292
|
}
|
|
16316
16293
|
function iu(r) {
|
|
16317
|
-
var t = r.reference, e = r.element, o = r.placement, i = o ?
|
|
16294
|
+
var t = r.reference, e = r.element, o = r.placement, i = o ? Ge(o) : null, n = o ? si(o) : null, a = t.x + t.width / 2 - e.width / 2, s = t.y + t.height / 2 - e.height / 2, l;
|
|
16318
16295
|
switch (i) {
|
|
16319
16296
|
case pe:
|
|
16320
16297
|
l = {
|
|
@@ -16322,13 +16299,13 @@ function iu(r) {
|
|
|
16322
16299
|
y: t.y - e.height
|
|
16323
16300
|
};
|
|
16324
16301
|
break;
|
|
16325
|
-
case
|
|
16302
|
+
case Be:
|
|
16326
16303
|
l = {
|
|
16327
16304
|
x: a,
|
|
16328
16305
|
y: t.y + t.height
|
|
16329
16306
|
};
|
|
16330
16307
|
break;
|
|
16331
|
-
case
|
|
16308
|
+
case Pe:
|
|
16332
16309
|
l = {
|
|
16333
16310
|
x: t.x + t.width,
|
|
16334
16311
|
y: s
|
|
@@ -16375,7 +16352,7 @@ function Zi(r, t) {
|
|
|
16375
16352
|
if (m === xi && E) {
|
|
16376
16353
|
var z = E[i];
|
|
16377
16354
|
Object.keys(P).forEach(function(X) {
|
|
16378
|
-
var bt = [
|
|
16355
|
+
var bt = [Pe, Be].indexOf(X) >= 0 ? 1 : -1, ut = [pe, Be].indexOf(X) >= 0 ? "y" : "x";
|
|
16379
16356
|
P[X] += z[ut] * bt;
|
|
16380
16357
|
});
|
|
16381
16358
|
}
|
|
@@ -16395,14 +16372,14 @@ function Ny(r, t) {
|
|
|
16395
16372
|
boundary: i,
|
|
16396
16373
|
rootBoundary: n,
|
|
16397
16374
|
padding: a
|
|
16398
|
-
})[
|
|
16375
|
+
})[Ge(g)], x;
|
|
16399
16376
|
}, {});
|
|
16400
16377
|
return Object.keys(u).sort(function(x, g) {
|
|
16401
16378
|
return u[x] - u[g];
|
|
16402
16379
|
});
|
|
16403
16380
|
}
|
|
16404
16381
|
function Iy(r) {
|
|
16405
|
-
if (
|
|
16382
|
+
if (Ge(r) === dp)
|
|
16406
16383
|
return [];
|
|
16407
16384
|
var t = qn(r);
|
|
16408
16385
|
return [Qd(r), t, Qd(t)];
|
|
@@ -16410,8 +16387,8 @@ function Iy(r) {
|
|
|
16410
16387
|
function Ly(r) {
|
|
16411
16388
|
var t = r.state, e = r.options, o = r.name;
|
|
16412
16389
|
if (!t.modifiersData[o]._skip) {
|
|
16413
|
-
for (var i = e.mainAxis, n = i === void 0 ? !0 : i, a = e.altAxis, s = a === void 0 ? !0 : a, l = e.fallbackPlacements, p = e.padding, d = e.boundary, c = e.rootBoundary, m = e.altBoundary, u = e.flipVariations, x = u === void 0 ? !0 : u, g = e.allowedAutoPlacements, f = t.options.placement, y =
|
|
16414
|
-
return ge.concat(
|
|
16390
|
+
for (var i = e.mainAxis, n = i === void 0 ? !0 : i, a = e.altAxis, s = a === void 0 ? !0 : a, l = e.fallbackPlacements, p = e.padding, d = e.boundary, c = e.rootBoundary, m = e.altBoundary, u = e.flipVariations, x = u === void 0 ? !0 : u, g = e.allowedAutoPlacements, f = t.options.placement, y = Ge(f), w = y === f, k = l || (w || !x ? [qn(f)] : Iy(f)), h = [f].concat(k).reduce(function(ge, Vt) {
|
|
16391
|
+
return ge.concat(Ge(Vt) === dp ? Ny(t, {
|
|
16415
16392
|
placement: Vt,
|
|
16416
16393
|
boundary: d,
|
|
16417
16394
|
rootBoundary: c,
|
|
@@ -16420,16 +16397,16 @@ function Ly(r) {
|
|
|
16420
16397
|
allowedAutoPlacements: g
|
|
16421
16398
|
}) : Vt);
|
|
16422
16399
|
}, []), B = t.rects.reference, M = t.rects.popper, A = /* @__PURE__ */ new Map(), R = !0, H = h[0], P = 0; P < h.length; P++) {
|
|
16423
|
-
var E = h[P], z =
|
|
16400
|
+
var E = h[P], z = Ge(E), X = si(E) === ii, bt = [pe, Be].indexOf(z) >= 0, ut = bt ? "width" : "height", it = Zi(t, {
|
|
16424
16401
|
placement: E,
|
|
16425
16402
|
boundary: d,
|
|
16426
16403
|
rootBoundary: c,
|
|
16427
16404
|
altBoundary: m,
|
|
16428
16405
|
padding: p
|
|
16429
|
-
}), K = bt ? X ?
|
|
16406
|
+
}), K = bt ? X ? Pe : de : X ? Be : pe;
|
|
16430
16407
|
B[ut] > M[ut] && (K = qn(K));
|
|
16431
|
-
var
|
|
16432
|
-
if (n && gt.push(it[z] <= 0), s && gt.push(it[K] <= 0, it[
|
|
16408
|
+
var lt = qn(K), gt = [];
|
|
16409
|
+
if (n && gt.push(it[z] <= 0), s && gt.push(it[K] <= 0, it[lt] <= 0), gt.every(function(ge) {
|
|
16433
16410
|
return ge;
|
|
16434
16411
|
})) {
|
|
16435
16412
|
H = E, R = !1;
|
|
@@ -16438,19 +16415,19 @@ function Ly(r) {
|
|
|
16438
16415
|
A.set(E, gt);
|
|
16439
16416
|
}
|
|
16440
16417
|
if (R)
|
|
16441
|
-
for (var
|
|
16442
|
-
var fe = h.find(function(
|
|
16443
|
-
var he = A.get(
|
|
16418
|
+
for (var ie = x ? 3 : 1, Qe = function(Vt) {
|
|
16419
|
+
var fe = h.find(function(tr) {
|
|
16420
|
+
var he = A.get(tr);
|
|
16444
16421
|
if (he)
|
|
16445
|
-
return he.slice(0, Vt).every(function(
|
|
16446
|
-
return
|
|
16422
|
+
return he.slice(0, Vt).every(function(er) {
|
|
16423
|
+
return er;
|
|
16447
16424
|
});
|
|
16448
16425
|
});
|
|
16449
16426
|
if (fe)
|
|
16450
16427
|
return H = fe, "break";
|
|
16451
|
-
},
|
|
16452
|
-
var
|
|
16453
|
-
if (
|
|
16428
|
+
}, Yt = ie; Yt > 0; Yt--) {
|
|
16429
|
+
var Ze = Qe(Yt);
|
|
16430
|
+
if (Ze === "break") break;
|
|
16454
16431
|
}
|
|
16455
16432
|
t.placement !== H && (t.modifiersData[o]._skip = !0, t.placement = H, t.reset = !0);
|
|
16456
16433
|
}
|
|
@@ -16477,7 +16454,7 @@ function tc(r, t, e) {
|
|
|
16477
16454
|
};
|
|
16478
16455
|
}
|
|
16479
16456
|
function ec(r) {
|
|
16480
|
-
return [pe,
|
|
16457
|
+
return [pe, Pe, Be, de].some(function(t) {
|
|
16481
16458
|
return r[t] >= 0;
|
|
16482
16459
|
});
|
|
16483
16460
|
}
|
|
@@ -16505,10 +16482,10 @@ const _y = {
|
|
|
16505
16482
|
fn: $y
|
|
16506
16483
|
};
|
|
16507
16484
|
function zy(r, t, e) {
|
|
16508
|
-
var o =
|
|
16485
|
+
var o = Ge(r), i = [de, pe].indexOf(o) >= 0 ? -1 : 1, n = typeof e == "function" ? e(Object.assign({}, t, {
|
|
16509
16486
|
placement: r
|
|
16510
16487
|
})) : e, a = n[0], s = n[1];
|
|
16511
|
-
return a = a || 0, s = (s || 0) * i, [de,
|
|
16488
|
+
return a = a || 0, s = (s || 0) * i, [de, Pe].indexOf(o) >= 0 ? {
|
|
16512
16489
|
x: s,
|
|
16513
16490
|
y: a
|
|
16514
16491
|
} : {
|
|
@@ -16553,7 +16530,7 @@ function qy(r) {
|
|
|
16553
16530
|
rootBoundary: p,
|
|
16554
16531
|
padding: c,
|
|
16555
16532
|
altBoundary: d
|
|
16556
|
-
}), y =
|
|
16533
|
+
}), y = Ge(t.placement), w = si(t.placement), k = !w, h = mp(y), B = Wy(h), M = t.modifiersData.popperOffsets, A = t.rects.reference, R = t.rects.popper, H = typeof g == "function" ? g(Object.assign({}, t.rects, {
|
|
16557
16534
|
placement: t.placement
|
|
16558
16535
|
})) : g, P = typeof H == "number" ? {
|
|
16559
16536
|
mainAxis: H,
|
|
@@ -16567,15 +16544,15 @@ function qy(r) {
|
|
|
16567
16544
|
};
|
|
16568
16545
|
if (M) {
|
|
16569
16546
|
if (n) {
|
|
16570
|
-
var X, bt = h === "y" ? pe : de, ut = h === "y" ?
|
|
16547
|
+
var X, bt = h === "y" ? pe : de, ut = h === "y" ? Be : Pe, it = h === "y" ? "height" : "width", K = M[h], lt = K + f[bt], gt = K - f[ut], ie = u ? -R[it] / 2 : 0, Qe = w === ii ? A[it] : R[it], Yt = w === ii ? -R[it] : -A[it], Ze = t.elements.arrow, ge = u && Ze ? bp(Ze) : {
|
|
16571
16548
|
width: 0,
|
|
16572
16549
|
height: 0
|
|
16573
|
-
}, Vt = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : tu(), fe = Vt[bt],
|
|
16574
|
-
M[h] =
|
|
16550
|
+
}, Vt = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : tu(), fe = Vt[bt], tr = Vt[ut], he = Ai(0, A[it], ge[it]), er = k ? A[it] / 2 - ie - he - fe - P.mainAxis : Qe - he - fe - P.mainAxis, Ae = k ? -A[it] / 2 + ie + he + tr + P.mainAxis : Yt + he + tr + P.mainAxis, rr = t.elements.arrow && bn(t.elements.arrow), Qr = rr ? h === "y" ? rr.clientTop || 0 : rr.clientLeft || 0 : 0, hr = (X = E == null ? void 0 : E[h]) != null ? X : 0, Po = K + er - hr - Qr, Ao = K + Ae - hr, yr = Ai(u ? pa(lt, Po) : lt, K, u ? yo(gt, Ao) : gt);
|
|
16551
|
+
M[h] = yr, z[h] = yr - K;
|
|
16575
16552
|
}
|
|
16576
16553
|
if (s) {
|
|
16577
|
-
var
|
|
16578
|
-
M[B] =
|
|
16554
|
+
var ze, Zr = h === "x" ? pe : de, to = h === "x" ? Be : Pe, ye = M[B], De = B === "y" ? "height" : "width", wr = ye + f[Zr], Fe = ye - f[to], vr = [pe, de].indexOf(y) !== -1, eo = (ze = E == null ? void 0 : E[B]) != null ? ze : 0, Do = vr ? wr : ye - A[De] - R[De] - eo + P.altAxis, kr = vr ? ye + A[De] + R[De] - eo - P.altAxis : Fe, Sr = u && vr ? xy(Do, ye, kr) : Ai(u ? Do : wr, ye, u ? kr : Fe);
|
|
16555
|
+
M[B] = Sr, z[B] = Sr - ye;
|
|
16579
16556
|
}
|
|
16580
16557
|
t.modifiersData[o] = z;
|
|
16581
16558
|
}
|
|
@@ -16594,7 +16571,7 @@ function Ky(r) {
|
|
|
16594
16571
|
};
|
|
16595
16572
|
}
|
|
16596
16573
|
function Gy(r) {
|
|
16597
|
-
return r === xe(r) || !
|
|
16574
|
+
return r === xe(r) || !Oe(r) ? up(r) : Ky(r);
|
|
16598
16575
|
}
|
|
16599
16576
|
function Jy(r) {
|
|
16600
16577
|
var t = r.getBoundingClientRect(), e = ni(t.width) / r.offsetWidth || 1, o = ni(t.height) / r.offsetHeight || 1;
|
|
@@ -16602,15 +16579,15 @@ function Jy(r) {
|
|
|
16602
16579
|
}
|
|
16603
16580
|
function Yy(r, t, e) {
|
|
16604
16581
|
e === void 0 && (e = !1);
|
|
16605
|
-
var o =
|
|
16582
|
+
var o = Oe(t), i = Oe(t) && Jy(t), n = Yr(t), a = ai(r, i, e), s = {
|
|
16606
16583
|
scrollLeft: 0,
|
|
16607
16584
|
scrollTop: 0
|
|
16608
16585
|
}, l = {
|
|
16609
16586
|
x: 0,
|
|
16610
16587
|
y: 0
|
|
16611
16588
|
};
|
|
16612
|
-
return (o || !o && !e) && ((
|
|
16613
|
-
gp(n)) && (s = Gy(t)),
|
|
16589
|
+
return (o || !o && !e) && ((Xe(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
16590
|
+
gp(n)) && (s = Gy(t)), Oe(t) ? (l = ai(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : n && (l.x = xp(n))), {
|
|
16614
16591
|
x: a.left + s.scrollLeft - l.x,
|
|
16615
16592
|
y: a.top + s.scrollTop - l.y,
|
|
16616
16593
|
width: a.width,
|
|
@@ -16902,15 +16879,15 @@ function lc(r, t) {
|
|
|
16902
16879
|
}
|
|
16903
16880
|
return !1;
|
|
16904
16881
|
}
|
|
16905
|
-
var
|
|
16882
|
+
var We = {
|
|
16906
16883
|
isTouch: !1
|
|
16907
16884
|
}, pc = 0;
|
|
16908
16885
|
function fw() {
|
|
16909
|
-
|
|
16886
|
+
We.isTouch || (We.isTouch = !0, window.performance && document.addEventListener("mousemove", du));
|
|
16910
16887
|
}
|
|
16911
16888
|
function du() {
|
|
16912
16889
|
var r = performance.now();
|
|
16913
|
-
r - pc < 20 && (
|
|
16890
|
+
r - pc < 20 && (We.isTouch = !1, document.removeEventListener("mousemove", du)), pc = r;
|
|
16914
16891
|
}
|
|
16915
16892
|
function hw() {
|
|
16916
16893
|
var r = document.activeElement;
|
|
@@ -16959,7 +16936,7 @@ process.env.NODE_ENV !== "production" && Sw();
|
|
|
16959
16936
|
function Sw() {
|
|
16960
16937
|
en = /* @__PURE__ */ new Set();
|
|
16961
16938
|
}
|
|
16962
|
-
function
|
|
16939
|
+
function dr(r, t) {
|
|
16963
16940
|
if (r && !en.has(t)) {
|
|
16964
16941
|
var e;
|
|
16965
16942
|
en.add(t), (e = console).warn.apply(e, cu(t));
|
|
@@ -17091,7 +17068,7 @@ function uu(r, t) {
|
|
|
17091
17068
|
var i = sw(me, Object.keys(bu)), n = !aw(i, o);
|
|
17092
17069
|
n && (n = t.filter(function(a) {
|
|
17093
17070
|
return a.name === o;
|
|
17094
|
-
}).length === 0),
|
|
17071
|
+
}).length === 0), dr(n, ["`" + o + "`", "is not a valid prop. You may have spelled it incorrectly, or if it's", "a plugin, forgot to pass it in an array as props.plugins.", `
|
|
17095
17072
|
|
|
17096
17073
|
`, `All props: https://atomiks.github.io/tippyjs/v6/all-props/
|
|
17097
17074
|
`, "Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "));
|
|
@@ -17164,12 +17141,12 @@ function Aw(r, t) {
|
|
|
17164
17141
|
plugins: w,
|
|
17165
17142
|
// methods
|
|
17166
17143
|
clearDelayTimeouts: Do,
|
|
17167
|
-
setProps:
|
|
17168
|
-
setContent:
|
|
17144
|
+
setProps: kr,
|
|
17145
|
+
setContent: Sr,
|
|
17169
17146
|
show: bi,
|
|
17170
17147
|
hide: mi,
|
|
17171
17148
|
hideWithInteractivity: No,
|
|
17172
|
-
enable:
|
|
17149
|
+
enable: vr,
|
|
17173
17150
|
disable: eo,
|
|
17174
17151
|
unmount: at,
|
|
17175
17152
|
destroy: D
|
|
@@ -17181,7 +17158,7 @@ function Aw(r, t) {
|
|
|
17181
17158
|
var R = w.map(function(O) {
|
|
17182
17159
|
return O.fn(h);
|
|
17183
17160
|
}), H = r.hasAttribute("aria-expanded");
|
|
17184
|
-
return
|
|
17161
|
+
return rr(), ie(), K(), lt("onCreate", [h]), e.showOnCreate && wr(), M.addEventListener("mouseenter", function() {
|
|
17185
17162
|
h.props.interactive && h.state.isVisible && h.clearDelayTimeouts();
|
|
17186
17163
|
}), M.addEventListener("mouseleave", function() {
|
|
17187
17164
|
h.props.interactive && h.props.trigger.indexOf("mouseenter") >= 0 && bt().addEventListener("mousemove", x);
|
|
@@ -17208,12 +17185,12 @@ function Aw(r, t) {
|
|
|
17208
17185
|
return Sl(M);
|
|
17209
17186
|
}
|
|
17210
17187
|
function it(O) {
|
|
17211
|
-
return h.state.isMounted && !h.state.isVisible ||
|
|
17188
|
+
return h.state.isMounted && !h.state.isVisible || We.isTouch || d && d.type === "focus" ? 0 : As(h.props.delay, O ? 0 : 1, me.delay);
|
|
17212
17189
|
}
|
|
17213
17190
|
function K(O) {
|
|
17214
17191
|
O === void 0 && (O = !1), M.style.pointerEvents = h.props.interactive && !O ? "" : "none", M.style.zIndex = "" + h.props.zIndex;
|
|
17215
17192
|
}
|
|
17216
|
-
function
|
|
17193
|
+
function lt(O, j, Y) {
|
|
17217
17194
|
if (Y === void 0 && (Y = !0), R.forEach(function(nt) {
|
|
17218
17195
|
nt[O] && nt[O].apply(nt, j);
|
|
17219
17196
|
}), Y) {
|
|
@@ -17230,13 +17207,13 @@ function Aw(r, t) {
|
|
|
17230
17207
|
if (h.state.isVisible)
|
|
17231
17208
|
nt.setAttribute(j, Wt ? Wt + " " + Y : Y);
|
|
17232
17209
|
else {
|
|
17233
|
-
var
|
|
17234
|
-
|
|
17210
|
+
var ne = Wt && Wt.replace(Y, "").trim();
|
|
17211
|
+
ne ? nt.setAttribute(j, ne) : nt.removeAttribute(j);
|
|
17235
17212
|
}
|
|
17236
17213
|
});
|
|
17237
17214
|
}
|
|
17238
17215
|
}
|
|
17239
|
-
function
|
|
17216
|
+
function ie() {
|
|
17240
17217
|
if (!(H || !h.props.aria.expanded)) {
|
|
17241
17218
|
var O = Wo(h.props.triggerTarget || r);
|
|
17242
17219
|
O.forEach(function(j) {
|
|
@@ -17244,29 +17221,29 @@ function Aw(r, t) {
|
|
|
17244
17221
|
});
|
|
17245
17222
|
}
|
|
17246
17223
|
}
|
|
17247
|
-
function
|
|
17224
|
+
function Qe() {
|
|
17248
17225
|
bt().removeEventListener("mousemove", x), Pn = Pn.filter(function(O) {
|
|
17249
17226
|
return O !== x;
|
|
17250
17227
|
});
|
|
17251
17228
|
}
|
|
17252
|
-
function
|
|
17253
|
-
if (!(
|
|
17229
|
+
function Yt(O) {
|
|
17230
|
+
if (!(We.isTouch && (l || O.type === "mousedown"))) {
|
|
17254
17231
|
var j = O.composedPath && O.composedPath()[0] || O.target;
|
|
17255
17232
|
if (!(h.props.interactive && lc(M, j))) {
|
|
17256
17233
|
if (Wo(h.props.triggerTarget || r).some(function(Y) {
|
|
17257
17234
|
return lc(Y, j);
|
|
17258
17235
|
})) {
|
|
17259
|
-
if (
|
|
17236
|
+
if (We.isTouch || h.state.isVisible && h.props.trigger.indexOf("click") >= 0)
|
|
17260
17237
|
return;
|
|
17261
17238
|
} else
|
|
17262
|
-
|
|
17239
|
+
lt("onClickOutside", [h, O]);
|
|
17263
17240
|
h.props.hideOnClick === !0 && (h.clearDelayTimeouts(), h.hide(), s = !0, setTimeout(function() {
|
|
17264
17241
|
s = !1;
|
|
17265
17242
|
}), h.state.isMounted || fe());
|
|
17266
17243
|
}
|
|
17267
17244
|
}
|
|
17268
17245
|
}
|
|
17269
|
-
function
|
|
17246
|
+
function Ze() {
|
|
17270
17247
|
l = !0;
|
|
17271
17248
|
}
|
|
17272
17249
|
function ge() {
|
|
@@ -17274,21 +17251,21 @@ function Aw(r, t) {
|
|
|
17274
17251
|
}
|
|
17275
17252
|
function Vt() {
|
|
17276
17253
|
var O = bt();
|
|
17277
|
-
O.addEventListener("mousedown",
|
|
17254
|
+
O.addEventListener("mousedown", Yt, !0), O.addEventListener("touchend", Yt, so), O.addEventListener("touchstart", ge, so), O.addEventListener("touchmove", Ze, so);
|
|
17278
17255
|
}
|
|
17279
17256
|
function fe() {
|
|
17280
17257
|
var O = bt();
|
|
17281
|
-
O.removeEventListener("mousedown",
|
|
17258
|
+
O.removeEventListener("mousedown", Yt, !0), O.removeEventListener("touchend", Yt, so), O.removeEventListener("touchstart", ge, so), O.removeEventListener("touchmove", Ze, so);
|
|
17282
17259
|
}
|
|
17283
|
-
function
|
|
17284
|
-
|
|
17260
|
+
function tr(O, j) {
|
|
17261
|
+
er(O, function() {
|
|
17285
17262
|
!h.state.isVisible && M.parentNode && M.parentNode.contains(M) && j();
|
|
17286
17263
|
});
|
|
17287
17264
|
}
|
|
17288
17265
|
function he(O, j) {
|
|
17289
|
-
|
|
17266
|
+
er(O, j);
|
|
17290
17267
|
}
|
|
17291
|
-
function
|
|
17268
|
+
function er(O, j) {
|
|
17292
17269
|
var Y = ut().box;
|
|
17293
17270
|
function st(nt) {
|
|
17294
17271
|
nt.target === Y && (Ns(Y, "remove", st), j());
|
|
@@ -17297,7 +17274,7 @@ function Aw(r, t) {
|
|
|
17297
17274
|
return j();
|
|
17298
17275
|
Ns(Y, "remove", c), Ns(Y, "add", st), c = st;
|
|
17299
17276
|
}
|
|
17300
|
-
function
|
|
17277
|
+
function Ae(O, j, Y) {
|
|
17301
17278
|
Y === void 0 && (Y = !1);
|
|
17302
17279
|
var st = Wo(h.props.triggerTarget || r);
|
|
17303
17280
|
st.forEach(function(nt) {
|
|
@@ -17309,22 +17286,22 @@ function Aw(r, t) {
|
|
|
17309
17286
|
});
|
|
17310
17287
|
});
|
|
17311
17288
|
}
|
|
17312
|
-
function
|
|
17313
|
-
E() && (
|
|
17289
|
+
function rr() {
|
|
17290
|
+
E() && (Ae("touchstart", hr, {
|
|
17314
17291
|
passive: !0
|
|
17315
|
-
}),
|
|
17292
|
+
}), Ae("touchend", Ao, {
|
|
17316
17293
|
passive: !0
|
|
17317
17294
|
})), lw(h.props.trigger).forEach(function(O) {
|
|
17318
17295
|
if (O !== "manual")
|
|
17319
|
-
switch (
|
|
17296
|
+
switch (Ae(O, hr), O) {
|
|
17320
17297
|
case "mouseenter":
|
|
17321
|
-
|
|
17298
|
+
Ae("mouseleave", Ao);
|
|
17322
17299
|
break;
|
|
17323
17300
|
case "focus":
|
|
17324
|
-
|
|
17301
|
+
Ae(vw ? "focusout" : "blur", yr);
|
|
17325
17302
|
break;
|
|
17326
17303
|
case "focusin":
|
|
17327
|
-
|
|
17304
|
+
Ae("focusout", yr);
|
|
17328
17305
|
break;
|
|
17329
17306
|
}
|
|
17330
17307
|
});
|
|
@@ -17335,48 +17312,48 @@ function Aw(r, t) {
|
|
|
17335
17312
|
j.removeEventListener(Y, st, nt);
|
|
17336
17313
|
}), u = [];
|
|
17337
17314
|
}
|
|
17338
|
-
function
|
|
17315
|
+
function hr(O) {
|
|
17339
17316
|
var j, Y = !1;
|
|
17340
|
-
if (!(!h.state.isEnabled ||
|
|
17317
|
+
if (!(!h.state.isEnabled || ze(O) || s)) {
|
|
17341
17318
|
var st = ((j = d) == null ? void 0 : j.type) === "focus";
|
|
17342
|
-
d = O, g = O.currentTarget,
|
|
17319
|
+
d = O, g = O.currentTarget, ie(), !h.state.isVisible && bw(O) && Pn.forEach(function(nt) {
|
|
17343
17320
|
return nt(O);
|
|
17344
|
-
}), O.type === "click" && (h.props.trigger.indexOf("mouseenter") < 0 || a) && h.props.hideOnClick !== !1 && h.state.isVisible ? Y = !0 :
|
|
17321
|
+
}), O.type === "click" && (h.props.trigger.indexOf("mouseenter") < 0 || a) && h.props.hideOnClick !== !1 && h.state.isVisible ? Y = !0 : wr(O), O.type === "click" && (a = !Y), Y && !st && Fe(O);
|
|
17345
17322
|
}
|
|
17346
17323
|
}
|
|
17347
17324
|
function Po(O) {
|
|
17348
17325
|
var j = O.target, Y = X().contains(j) || M.contains(j);
|
|
17349
17326
|
if (!(O.type === "mousemove" && Y)) {
|
|
17350
|
-
var st =
|
|
17351
|
-
var Wt,
|
|
17352
|
-
return
|
|
17327
|
+
var st = De().concat(M).map(function(nt) {
|
|
17328
|
+
var Wt, ne = nt._tippy, or = (Wt = ne.popperInstance) == null ? void 0 : Wt.state;
|
|
17329
|
+
return or ? {
|
|
17353
17330
|
popperRect: nt.getBoundingClientRect(),
|
|
17354
|
-
popperState:
|
|
17331
|
+
popperState: or,
|
|
17355
17332
|
props: e
|
|
17356
17333
|
} : null;
|
|
17357
17334
|
}).filter(Boolean);
|
|
17358
|
-
gw(st, O) && (
|
|
17335
|
+
gw(st, O) && (Qe(), Fe(O));
|
|
17359
17336
|
}
|
|
17360
17337
|
}
|
|
17361
17338
|
function Ao(O) {
|
|
17362
|
-
var j =
|
|
17339
|
+
var j = ze(O) || h.props.trigger.indexOf("click") >= 0 && a;
|
|
17363
17340
|
if (!j) {
|
|
17364
17341
|
if (h.props.interactive) {
|
|
17365
17342
|
h.hideWithInteractivity(O);
|
|
17366
17343
|
return;
|
|
17367
17344
|
}
|
|
17368
|
-
|
|
17345
|
+
Fe(O);
|
|
17369
17346
|
}
|
|
17370
17347
|
}
|
|
17371
|
-
function
|
|
17372
|
-
h.props.trigger.indexOf("focusin") < 0 && O.target !== X() || h.props.interactive && O.relatedTarget && M.contains(O.relatedTarget) ||
|
|
17348
|
+
function yr(O) {
|
|
17349
|
+
h.props.trigger.indexOf("focusin") < 0 && O.target !== X() || h.props.interactive && O.relatedTarget && M.contains(O.relatedTarget) || Fe(O);
|
|
17373
17350
|
}
|
|
17374
|
-
function
|
|
17375
|
-
return
|
|
17351
|
+
function ze(O) {
|
|
17352
|
+
return We.isTouch ? E() !== O.type.indexOf("touch") >= 0 : !1;
|
|
17376
17353
|
}
|
|
17377
17354
|
function Zr() {
|
|
17378
17355
|
to();
|
|
17379
|
-
var O = h.props, j = O.popperOptions, Y = O.placement, st = O.offset, nt = O.getReferenceClientRect, Wt = O.moveTransition,
|
|
17356
|
+
var O = h.props, j = O.popperOptions, Y = O.placement, st = O.offset, nt = O.getReferenceClientRect, Wt = O.moveTransition, ne = z() ? Sl(M).arrow : null, or = nt ? {
|
|
17380
17357
|
getBoundingClientRect: nt,
|
|
17381
17358
|
contextElement: nt.contextElement || X()
|
|
17382
17359
|
} : r, Bp = {
|
|
@@ -17419,13 +17396,13 @@ function Aw(r, t) {
|
|
|
17419
17396
|
adaptive: !Wt
|
|
17420
17397
|
}
|
|
17421
17398
|
}, Bp];
|
|
17422
|
-
z() &&
|
|
17399
|
+
z() && ne && ro.push({
|
|
17423
17400
|
name: "arrow",
|
|
17424
17401
|
options: {
|
|
17425
|
-
element:
|
|
17402
|
+
element: ne,
|
|
17426
17403
|
padding: 3
|
|
17427
17404
|
}
|
|
17428
|
-
}), ro.push.apply(ro, (j == null ? void 0 : j.modifiers) || []), h.popperInstance = ow(
|
|
17405
|
+
}), ro.push.apply(ro, (j == null ? void 0 : j.modifiers) || []), h.popperInstance = ow(or, M, Object.assign({}, j, {
|
|
17429
17406
|
placement: Y,
|
|
17430
17407
|
onFirstUpdate: m,
|
|
17431
17408
|
modifiers: ro
|
|
@@ -17436,7 +17413,7 @@ function Aw(r, t) {
|
|
|
17436
17413
|
}
|
|
17437
17414
|
function ye() {
|
|
17438
17415
|
var O = h.props.appendTo, j, Y = X();
|
|
17439
|
-
h.props.interactive && O === lu || O === "parent" ? j = Y.parentNode : j = pu(O, [Y]), j.contains(M) || j.appendChild(M), h.state.isMounted = !0, Zr(), process.env.NODE_ENV !== "production" &&
|
|
17416
|
+
h.props.interactive && O === lu || O === "parent" ? j = Y.parentNode : j = pu(O, [Y]), j.contains(M) || j.appendChild(M), h.state.isMounted = !0, Zr(), process.env.NODE_ENV !== "production" && dr(h.props.interactive && O === me.appendTo && Y.nextElementSibling !== M, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
|
|
17440
17417
|
|
|
17441
17418
|
`, "Using a wrapper <div> or <span> tag around the reference element", "solves this by creating a new parentNode context.", `
|
|
17442
17419
|
|
|
@@ -17444,18 +17421,18 @@ function Aw(r, t) {
|
|
|
17444
17421
|
|
|
17445
17422
|
`, "See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "));
|
|
17446
17423
|
}
|
|
17447
|
-
function
|
|
17424
|
+
function De() {
|
|
17448
17425
|
return da(M.querySelectorAll("[data-tippy-root]"));
|
|
17449
17426
|
}
|
|
17450
|
-
function
|
|
17451
|
-
h.clearDelayTimeouts(), O &&
|
|
17427
|
+
function wr(O) {
|
|
17428
|
+
h.clearDelayTimeouts(), O && lt("onTrigger", [h, O]), Vt();
|
|
17452
17429
|
var j = it(!0), Y = P(), st = Y[0], nt = Y[1];
|
|
17453
|
-
|
|
17430
|
+
We.isTouch && st === "hold" && nt && (j = nt), j ? o = setTimeout(function() {
|
|
17454
17431
|
h.show();
|
|
17455
17432
|
}, j) : h.show();
|
|
17456
17433
|
}
|
|
17457
|
-
function
|
|
17458
|
-
if (h.clearDelayTimeouts(),
|
|
17434
|
+
function Fe(O) {
|
|
17435
|
+
if (h.clearDelayTimeouts(), lt("onUntrigger", [h, O]), !h.state.isVisible) {
|
|
17459
17436
|
fe();
|
|
17460
17437
|
return;
|
|
17461
17438
|
}
|
|
@@ -17468,7 +17445,7 @@ function Aw(r, t) {
|
|
|
17468
17445
|
});
|
|
17469
17446
|
}
|
|
17470
17447
|
}
|
|
17471
|
-
function
|
|
17448
|
+
function vr() {
|
|
17472
17449
|
h.state.isEnabled = !0;
|
|
17473
17450
|
}
|
|
17474
17451
|
function eo() {
|
|
@@ -17477,31 +17454,31 @@ function Aw(r, t) {
|
|
|
17477
17454
|
function Do() {
|
|
17478
17455
|
clearTimeout(o), clearTimeout(i), cancelAnimationFrame(n);
|
|
17479
17456
|
}
|
|
17480
|
-
function
|
|
17481
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
17482
|
-
|
|
17457
|
+
function kr(O) {
|
|
17458
|
+
if (process.env.NODE_ENV !== "production" && dr(h.state.isDestroyed, Fo("setProps")), !h.state.isDestroyed) {
|
|
17459
|
+
lt("onBeforeUpdate", [h, O]), Qr();
|
|
17483
17460
|
var j = h.props, Y = cc(r, Object.assign({}, j, ac(O), {
|
|
17484
17461
|
ignoreAttributes: !0
|
|
17485
17462
|
}));
|
|
17486
|
-
h.props = Y,
|
|
17463
|
+
h.props = Y, rr(), j.interactiveDebounce !== Y.interactiveDebounce && (Qe(), x = ic(Po, Y.interactiveDebounce)), j.triggerTarget && !Y.triggerTarget ? Wo(j.triggerTarget).forEach(function(st) {
|
|
17487
17464
|
st.removeAttribute("aria-expanded");
|
|
17488
|
-
}) : Y.triggerTarget && r.removeAttribute("aria-expanded"),
|
|
17465
|
+
}) : Y.triggerTarget && r.removeAttribute("aria-expanded"), ie(), K(), A && A(j, Y), h.popperInstance && (Zr(), De().forEach(function(st) {
|
|
17489
17466
|
requestAnimationFrame(st._tippy.popperInstance.forceUpdate);
|
|
17490
|
-
})),
|
|
17467
|
+
})), lt("onAfterUpdate", [h, O]);
|
|
17491
17468
|
}
|
|
17492
17469
|
}
|
|
17493
|
-
function
|
|
17470
|
+
function Sr(O) {
|
|
17494
17471
|
h.setProps({
|
|
17495
17472
|
content: O
|
|
17496
17473
|
});
|
|
17497
17474
|
}
|
|
17498
17475
|
function bi() {
|
|
17499
|
-
process.env.NODE_ENV !== "production" &&
|
|
17500
|
-
var O = h.state.isVisible, j = h.state.isDestroyed, Y = !h.state.isEnabled, st =
|
|
17501
|
-
if (!(O || j || Y || st) && !X().hasAttribute("disabled") && (
|
|
17476
|
+
process.env.NODE_ENV !== "production" && dr(h.state.isDestroyed, Fo("show"));
|
|
17477
|
+
var O = h.state.isVisible, j = h.state.isDestroyed, Y = !h.state.isEnabled, st = We.isTouch && !h.props.touch, nt = As(h.props.duration, 0, me.duration);
|
|
17478
|
+
if (!(O || j || Y || st) && !X().hasAttribute("disabled") && (lt("onShow", [h], !1), h.props.onShow(h) !== !1)) {
|
|
17502
17479
|
if (h.state.isVisible = !0, z() && (M.style.visibility = "visible"), K(), Vt(), h.state.isMounted || (M.style.transition = "none"), z()) {
|
|
17503
|
-
var Wt = ut(),
|
|
17504
|
-
Ds([
|
|
17480
|
+
var Wt = ut(), ne = Wt.box, or = Wt.content;
|
|
17481
|
+
Ds([ne, or], 0);
|
|
17505
17482
|
}
|
|
17506
17483
|
m = function() {
|
|
17507
17484
|
var ro;
|
|
@@ -17510,36 +17487,36 @@ function Aw(r, t) {
|
|
|
17510
17487
|
var ss = ut(), hn = ss.box, Io = ss.content;
|
|
17511
17488
|
Ds([hn, Io], nt), sc([hn, Io], "visible");
|
|
17512
17489
|
}
|
|
17513
|
-
gt(),
|
|
17514
|
-
h.state.isShown = !0,
|
|
17490
|
+
gt(), ie(), nc(Is, h), (ro = h.popperInstance) == null || ro.forceUpdate(), lt("onMount", [h]), h.props.animation && z() && he(nt, function() {
|
|
17491
|
+
h.state.isShown = !0, lt("onShown", [h]);
|
|
17515
17492
|
});
|
|
17516
17493
|
}
|
|
17517
17494
|
}, ye();
|
|
17518
17495
|
}
|
|
17519
17496
|
}
|
|
17520
17497
|
function mi() {
|
|
17521
|
-
process.env.NODE_ENV !== "production" &&
|
|
17498
|
+
process.env.NODE_ENV !== "production" && dr(h.state.isDestroyed, Fo("hide"));
|
|
17522
17499
|
var O = !h.state.isVisible, j = h.state.isDestroyed, Y = !h.state.isEnabled, st = As(h.props.duration, 1, me.duration);
|
|
17523
|
-
if (!(O || j || Y) && (
|
|
17524
|
-
if (h.state.isVisible = !1, h.state.isShown = !1, p = !1, a = !1, z() && (M.style.visibility = "hidden"),
|
|
17525
|
-
var nt = ut(), Wt = nt.box,
|
|
17526
|
-
h.props.animation && (Ds([Wt,
|
|
17500
|
+
if (!(O || j || Y) && (lt("onHide", [h], !1), h.props.onHide(h) !== !1)) {
|
|
17501
|
+
if (h.state.isVisible = !1, h.state.isShown = !1, p = !1, a = !1, z() && (M.style.visibility = "hidden"), Qe(), fe(), K(!0), z()) {
|
|
17502
|
+
var nt = ut(), Wt = nt.box, ne = nt.content;
|
|
17503
|
+
h.props.animation && (Ds([Wt, ne], st), sc([Wt, ne], "hidden"));
|
|
17527
17504
|
}
|
|
17528
|
-
gt(),
|
|
17505
|
+
gt(), ie(), h.props.animation ? z() && tr(st, h.unmount) : h.unmount();
|
|
17529
17506
|
}
|
|
17530
17507
|
}
|
|
17531
17508
|
function No(O) {
|
|
17532
|
-
process.env.NODE_ENV !== "production" &&
|
|
17509
|
+
process.env.NODE_ENV !== "production" && dr(h.state.isDestroyed, Fo("hideWithInteractivity")), bt().addEventListener("mousemove", x), nc(Pn, x), x(O);
|
|
17533
17510
|
}
|
|
17534
17511
|
function at() {
|
|
17535
|
-
process.env.NODE_ENV !== "production" &&
|
|
17512
|
+
process.env.NODE_ENV !== "production" && dr(h.state.isDestroyed, Fo("unmount")), h.state.isVisible && h.hide(), h.state.isMounted && (to(), De().forEach(function(O) {
|
|
17536
17513
|
O._tippy.unmount();
|
|
17537
17514
|
}), M.parentNode && M.parentNode.removeChild(M), Is = Is.filter(function(O) {
|
|
17538
17515
|
return O !== h;
|
|
17539
|
-
}), h.state.isMounted = !1,
|
|
17516
|
+
}), h.state.isMounted = !1, lt("onHidden", [h]));
|
|
17540
17517
|
}
|
|
17541
17518
|
function D() {
|
|
17542
|
-
process.env.NODE_ENV !== "production" &&
|
|
17519
|
+
process.env.NODE_ENV !== "production" && dr(h.state.isDestroyed, Fo("destroy")), !h.state.isDestroyed && (h.clearDelayTimeouts(), h.unmount(), Qr(), delete r._tippy, h.state.isDestroyed = !0, lt("onDestroy", [h]));
|
|
17543
17520
|
}
|
|
17544
17521
|
}
|
|
17545
17522
|
function di(r, t) {
|
|
@@ -17551,7 +17528,7 @@ function di(r, t) {
|
|
|
17551
17528
|
}), i = uw(r);
|
|
17552
17529
|
if (process.env.NODE_ENV !== "production") {
|
|
17553
17530
|
var n = tn(o.content), a = i.length > 1;
|
|
17554
|
-
|
|
17531
|
+
dr(n && a, ["tippy() was passed an Element as the `content` prop, but more than", "one tippy instance was created by this invocation. This means the", "content element will only be appended to the last tippy instance.", `
|
|
17555
17532
|
|
|
17556
17533
|
`, "Instead, pass the .innerHTML of the element, or use a function that", "returns a cloned version of the element instead.", `
|
|
17557
17534
|
|
|
@@ -17566,7 +17543,7 @@ function di(r, t) {
|
|
|
17566
17543
|
}
|
|
17567
17544
|
di.defaultProps = me;
|
|
17568
17545
|
di.setDefaultProps = Tw;
|
|
17569
|
-
di.currentInput =
|
|
17546
|
+
di.currentInput = We;
|
|
17570
17547
|
Object.assign({}, Xm, {
|
|
17571
17548
|
effect: function(t) {
|
|
17572
17549
|
var e = t.state, o = {
|
|
@@ -17682,7 +17659,7 @@ class Dw {
|
|
|
17682
17659
|
}
|
|
17683
17660
|
}
|
|
17684
17661
|
const gu = (r) => new Bt({
|
|
17685
|
-
key: typeof r.pluginKey == "string" ? new
|
|
17662
|
+
key: typeof r.pluginKey == "string" ? new oe(r.pluginKey) : r.pluginKey,
|
|
17686
17663
|
view: (t) => new Dw({ view: t, ...r })
|
|
17687
17664
|
});
|
|
17688
17665
|
jt.create({
|
|
@@ -17777,7 +17754,7 @@ class Nw {
|
|
|
17777
17754
|
}
|
|
17778
17755
|
}
|
|
17779
17756
|
const fu = (r) => new Bt({
|
|
17780
|
-
key: typeof r.pluginKey == "string" ? new
|
|
17757
|
+
key: typeof r.pluginKey == "string" ? new oe(r.pluginKey) : r.pluginKey,
|
|
17781
17758
|
view: (t) => new Nw({ view: t, ...r })
|
|
17782
17759
|
});
|
|
17783
17760
|
jt.create({
|
|
@@ -17828,7 +17805,7 @@ ce({
|
|
|
17828
17805
|
},
|
|
17829
17806
|
setup(r, { slots: t }) {
|
|
17830
17807
|
const e = S(null);
|
|
17831
|
-
return
|
|
17808
|
+
return xr(() => {
|
|
17832
17809
|
const { updateDelay: o, editor: i, pluginKey: n, shouldShow: a, tippyOptions: s } = r;
|
|
17833
17810
|
i.registerPlugin(gu({
|
|
17834
17811
|
updateDelay: o,
|
|
@@ -17865,7 +17842,7 @@ class Iw extends X1 {
|
|
|
17865
17842
|
constructor(t = {}) {
|
|
17866
17843
|
return super(t), this.contentComponent = null, this.appContext = null, this.reactiveState = uc(this.view.state), this.reactiveExtensionStorage = uc(this.extensionStorage), this.on("beforeTransaction", ({ nextState: e }) => {
|
|
17867
17844
|
this.reactiveState.value = e, this.reactiveExtensionStorage.value = this.extensionStorage;
|
|
17868
|
-
}),
|
|
17845
|
+
}), Dr(this);
|
|
17869
17846
|
}
|
|
17870
17847
|
get state() {
|
|
17871
17848
|
return this.reactiveState ? this.reactiveState.value : this.view.state;
|
|
@@ -17900,7 +17877,7 @@ const Lw = ce({
|
|
|
17900
17877
|
const t = S(), e = Rc();
|
|
17901
17878
|
return an(() => {
|
|
17902
17879
|
const o = r.editor;
|
|
17903
|
-
o && o.options.element && t.value &&
|
|
17880
|
+
o && o.options.element && t.value && pt(() => {
|
|
17904
17881
|
if (!t.value || !o.options.element.firstChild)
|
|
17905
17882
|
return;
|
|
17906
17883
|
const i = T(t.value);
|
|
@@ -17951,7 +17928,7 @@ ce({
|
|
|
17951
17928
|
},
|
|
17952
17929
|
setup(r, { slots: t }) {
|
|
17953
17930
|
const e = S(null);
|
|
17954
|
-
return
|
|
17931
|
+
return xr(() => {
|
|
17955
17932
|
const { pluginKey: o, editor: i, tippyOptions: n, shouldShow: a } = r;
|
|
17956
17933
|
i.registerPlugin(fu({
|
|
17957
17934
|
pluginKey: o,
|
|
@@ -18011,14 +17988,14 @@ ce({
|
|
|
18011
17988
|
});
|
|
18012
17989
|
const Rw = (r = {}) => {
|
|
18013
17990
|
const t = Yu();
|
|
18014
|
-
return
|
|
17991
|
+
return xr(() => {
|
|
18015
17992
|
t.value = new Iw(r);
|
|
18016
17993
|
}), ja(() => {
|
|
18017
17994
|
var e, o, i;
|
|
18018
17995
|
const n = (e = t.value) === null || e === void 0 ? void 0 : e.options.element, a = n == null ? void 0 : n.cloneNode(!0);
|
|
18019
17996
|
(o = n == null ? void 0 : n.parentNode) === null || o === void 0 || o.replaceChild(a, n), (i = t.value) === null || i === void 0 || i.destroy();
|
|
18020
17997
|
}), t;
|
|
18021
|
-
}, $w = /^\s*>\s$/, _w =
|
|
17998
|
+
}, $w = /^\s*>\s$/, _w = _e.create({
|
|
18022
17999
|
name: "blockquote",
|
|
18023
18000
|
addOptions() {
|
|
18024
18001
|
return {
|
|
@@ -18056,7 +18033,7 @@ const Rw = (r = {}) => {
|
|
|
18056
18033
|
})
|
|
18057
18034
|
];
|
|
18058
18035
|
}
|
|
18059
|
-
}), zw = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Fw = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, Hw = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, jw = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, Vw =
|
|
18036
|
+
}), zw = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Fw = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, Hw = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, jw = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, Vw = gr.create({
|
|
18060
18037
|
name: "bold",
|
|
18061
18038
|
addOptions() {
|
|
18062
18039
|
return {
|
|
@@ -18122,7 +18099,7 @@ const Rw = (r = {}) => {
|
|
|
18122
18099
|
})
|
|
18123
18100
|
];
|
|
18124
18101
|
}
|
|
18125
|
-
}), Ww = "listItem", xc = "textStyle", gc = /^\s*([-+*])\s$/, qw =
|
|
18102
|
+
}), Ww = "listItem", xc = "textStyle", gc = /^\s*([-+*])\s$/, qw = _e.create({
|
|
18126
18103
|
name: "bulletList",
|
|
18127
18104
|
addOptions() {
|
|
18128
18105
|
return {
|
|
@@ -18170,7 +18147,7 @@ const Rw = (r = {}) => {
|
|
|
18170
18147
|
r
|
|
18171
18148
|
];
|
|
18172
18149
|
}
|
|
18173
|
-
}), Uw = /(^|[^`])`([^`]+)`(?!`)/, Kw = /(^|[^`])`([^`]+)`(?!`)/g, Gw =
|
|
18150
|
+
}), Uw = /(^|[^`])`([^`]+)`(?!`)/, Kw = /(^|[^`])`([^`]+)`(?!`)/g, Gw = gr.create({
|
|
18174
18151
|
name: "code",
|
|
18175
18152
|
addOptions() {
|
|
18176
18153
|
return {
|
|
@@ -18216,7 +18193,7 @@ const Rw = (r = {}) => {
|
|
|
18216
18193
|
})
|
|
18217
18194
|
];
|
|
18218
18195
|
}
|
|
18219
|
-
}), Jw = /^```([a-z]+)?[\s\n]$/, Yw = /^~~~([a-z]+)?[\s\n]$/, Xw =
|
|
18196
|
+
}), Jw = /^```([a-z]+)?[\s\n]$/, Yw = /^~~~([a-z]+)?[\s\n]$/, Xw = _e.create({
|
|
18220
18197
|
name: "codeBlock",
|
|
18221
18198
|
addOptions() {
|
|
18222
18199
|
return {
|
|
@@ -18327,7 +18304,7 @@ const Rw = (r = {}) => {
|
|
|
18327
18304
|
// this plugin creates a code block for pasted content from VS Code
|
|
18328
18305
|
// we can also detect the copied code language
|
|
18329
18306
|
new Bt({
|
|
18330
|
-
key: new
|
|
18307
|
+
key: new oe("codeBlockVSCodeHandler"),
|
|
18331
18308
|
props: {
|
|
18332
18309
|
handlePaste: (r, t) => {
|
|
18333
18310
|
if (!t.clipboardData || this.editor.isActive(this.type.name))
|
|
@@ -18343,7 +18320,7 @@ const Rw = (r = {}) => {
|
|
|
18343
18320
|
})
|
|
18344
18321
|
];
|
|
18345
18322
|
}
|
|
18346
|
-
}), Qw =
|
|
18323
|
+
}), Qw = _e.create({
|
|
18347
18324
|
name: "doc",
|
|
18348
18325
|
topNode: !0,
|
|
18349
18326
|
content: "block+"
|
|
@@ -18444,7 +18421,7 @@ const e2 = jt.create({
|
|
|
18444
18421
|
];
|
|
18445
18422
|
}
|
|
18446
18423
|
});
|
|
18447
|
-
class
|
|
18424
|
+
class vt extends Z {
|
|
18448
18425
|
/**
|
|
18449
18426
|
Create a gap cursor.
|
|
18450
18427
|
*/
|
|
@@ -18453,13 +18430,13 @@ class kt extends Z {
|
|
|
18453
18430
|
}
|
|
18454
18431
|
map(t, e) {
|
|
18455
18432
|
let o = t.resolve(e.map(this.head));
|
|
18456
|
-
return
|
|
18433
|
+
return vt.valid(o) ? new vt(o) : Z.near(o);
|
|
18457
18434
|
}
|
|
18458
18435
|
content() {
|
|
18459
18436
|
return F.empty;
|
|
18460
18437
|
}
|
|
18461
18438
|
eq(t) {
|
|
18462
|
-
return t instanceof
|
|
18439
|
+
return t instanceof vt && t.head == this.head;
|
|
18463
18440
|
}
|
|
18464
18441
|
toJSON() {
|
|
18465
18442
|
return { type: "gapcursor", pos: this.head };
|
|
@@ -18470,7 +18447,7 @@ class kt extends Z {
|
|
|
18470
18447
|
static fromJSON(t, e) {
|
|
18471
18448
|
if (typeof e.pos != "number")
|
|
18472
18449
|
throw new RangeError("Invalid input for GapCursor.fromJSON");
|
|
18473
|
-
return new
|
|
18450
|
+
return new vt(t.resolve(e.pos));
|
|
18474
18451
|
}
|
|
18475
18452
|
/**
|
|
18476
18453
|
@internal
|
|
@@ -18496,7 +18473,7 @@ class kt extends Z {
|
|
|
18496
18473
|
*/
|
|
18497
18474
|
static findGapCursorFrom(t, e, o = !1) {
|
|
18498
18475
|
t: for (; ; ) {
|
|
18499
|
-
if (!o &&
|
|
18476
|
+
if (!o && vt.valid(t))
|
|
18500
18477
|
return t;
|
|
18501
18478
|
let i = t.pos, n = null;
|
|
18502
18479
|
for (let a = t.depth; ; a--) {
|
|
@@ -18508,7 +18485,7 @@ class kt extends Z {
|
|
|
18508
18485
|
return null;
|
|
18509
18486
|
i += e;
|
|
18510
18487
|
let l = t.doc.resolve(i);
|
|
18511
|
-
if (
|
|
18488
|
+
if (vt.valid(l))
|
|
18512
18489
|
return l;
|
|
18513
18490
|
}
|
|
18514
18491
|
for (; ; ) {
|
|
@@ -18522,16 +18499,16 @@ class kt extends Z {
|
|
|
18522
18499
|
}
|
|
18523
18500
|
n = a, i += e;
|
|
18524
18501
|
let s = t.doc.resolve(i);
|
|
18525
|
-
if (
|
|
18502
|
+
if (vt.valid(s))
|
|
18526
18503
|
return s;
|
|
18527
18504
|
}
|
|
18528
18505
|
return null;
|
|
18529
18506
|
}
|
|
18530
18507
|
}
|
|
18531
18508
|
}
|
|
18532
|
-
|
|
18533
|
-
|
|
18534
|
-
Z.jsonID("gapcursor",
|
|
18509
|
+
vt.prototype.visible = !1;
|
|
18510
|
+
vt.findFrom = vt.findGapCursorFrom;
|
|
18511
|
+
Z.jsonID("gapcursor", vt);
|
|
18535
18512
|
class hp {
|
|
18536
18513
|
constructor(t) {
|
|
18537
18514
|
this.pos = t;
|
|
@@ -18541,7 +18518,7 @@ class hp {
|
|
|
18541
18518
|
}
|
|
18542
18519
|
resolve(t) {
|
|
18543
18520
|
let e = t.resolve(this.pos);
|
|
18544
|
-
return
|
|
18521
|
+
return vt.valid(e) ? new vt(e) : Z.near(e);
|
|
18545
18522
|
}
|
|
18546
18523
|
}
|
|
18547
18524
|
function r2(r) {
|
|
@@ -18583,7 +18560,7 @@ function i2() {
|
|
|
18583
18560
|
props: {
|
|
18584
18561
|
decorations: l2,
|
|
18585
18562
|
createSelectionBetween(r, t, e) {
|
|
18586
|
-
return t.pos == e.pos &&
|
|
18563
|
+
return t.pos == e.pos && vt.valid(e) ? new vt(e) : null;
|
|
18587
18564
|
},
|
|
18588
18565
|
handleClick: a2,
|
|
18589
18566
|
handleKeyDown: n2,
|
|
@@ -18606,21 +18583,21 @@ function An(r, t) {
|
|
|
18606
18583
|
return !1;
|
|
18607
18584
|
l = !1, s = o.doc.resolve(t > 0 ? s.after() : s.before());
|
|
18608
18585
|
}
|
|
18609
|
-
let p =
|
|
18610
|
-
return p ? (i && i(o.tr.setSelection(new
|
|
18586
|
+
let p = vt.findGapCursorFrom(s, t, l);
|
|
18587
|
+
return p ? (i && i(o.tr.setSelection(new vt(p))), !0) : !1;
|
|
18611
18588
|
};
|
|
18612
18589
|
}
|
|
18613
18590
|
function a2(r, t, e) {
|
|
18614
18591
|
if (!r || !r.editable)
|
|
18615
18592
|
return !1;
|
|
18616
18593
|
let o = r.state.doc.resolve(t);
|
|
18617
|
-
if (!
|
|
18594
|
+
if (!vt.valid(o))
|
|
18618
18595
|
return !1;
|
|
18619
18596
|
let i = r.posAtCoords({ left: e.clientX, top: e.clientY });
|
|
18620
|
-
return i && i.inside > -1 && J.isSelectable(r.state.doc.nodeAt(i.inside)) ? !1 : (r.dispatch(r.state.tr.setSelection(new
|
|
18597
|
+
return i && i.inside > -1 && J.isSelectable(r.state.doc.nodeAt(i.inside)) ? !1 : (r.dispatch(r.state.tr.setSelection(new vt(o))), !0);
|
|
18621
18598
|
}
|
|
18622
18599
|
function s2(r, t) {
|
|
18623
|
-
if (t.inputType != "insertCompositionText" || !(r.state.selection instanceof
|
|
18600
|
+
if (t.inputType != "insertCompositionText" || !(r.state.selection instanceof vt))
|
|
18624
18601
|
return !1;
|
|
18625
18602
|
let { $from: e } = r.state.selection, o = e.parent.contentMatchAt(e.index()).findWrapping(r.state.schema.nodes.text);
|
|
18626
18603
|
if (!o)
|
|
@@ -18632,10 +18609,10 @@ function s2(r, t) {
|
|
|
18632
18609
|
return n.setSelection(Q.near(n.doc.resolve(e.pos + 1))), r.dispatch(n), !1;
|
|
18633
18610
|
}
|
|
18634
18611
|
function l2(r) {
|
|
18635
|
-
if (!(r.selection instanceof
|
|
18612
|
+
if (!(r.selection instanceof vt))
|
|
18636
18613
|
return null;
|
|
18637
18614
|
let t = document.createElement("div");
|
|
18638
|
-
return t.className = "ProseMirror-gapcursor", Tt.create(r.doc, [
|
|
18615
|
+
return t.className = "ProseMirror-gapcursor", Tt.create(r.doc, [Ee.widget(r.selection.head, t, { key: "gapcursor" })]);
|
|
18639
18616
|
}
|
|
18640
18617
|
const p2 = jt.create({
|
|
18641
18618
|
name: "gapCursor",
|
|
@@ -18655,7 +18632,7 @@ const p2 = jt.create({
|
|
|
18655
18632
|
allowGapCursor: (t = rt(q(r, "allowGapCursor", e))) !== null && t !== void 0 ? t : null
|
|
18656
18633
|
};
|
|
18657
18634
|
}
|
|
18658
|
-
}), d2 =
|
|
18635
|
+
}), d2 = _e.create({
|
|
18659
18636
|
name: "hardBreak",
|
|
18660
18637
|
addOptions() {
|
|
18661
18638
|
return {
|
|
@@ -18705,7 +18682,7 @@ const p2 = jt.create({
|
|
|
18705
18682
|
"Shift-Enter": () => this.editor.commands.setHardBreak()
|
|
18706
18683
|
};
|
|
18707
18684
|
}
|
|
18708
|
-
}), c2 =
|
|
18685
|
+
}), c2 = _e.create({
|
|
18709
18686
|
name: "heading",
|
|
18710
18687
|
addOptions() {
|
|
18711
18688
|
return {
|
|
@@ -18853,7 +18830,7 @@ var b2 = /* @__PURE__ */ function(r) {
|
|
|
18853
18830
|
}, t;
|
|
18854
18831
|
}(It);
|
|
18855
18832
|
const m2 = 500;
|
|
18856
|
-
class
|
|
18833
|
+
class Le {
|
|
18857
18834
|
constructor(t, e) {
|
|
18858
18835
|
this.items = t, this.eventCount = e;
|
|
18859
18836
|
}
|
|
@@ -18877,24 +18854,24 @@ class Ie {
|
|
|
18877
18854
|
return;
|
|
18878
18855
|
}
|
|
18879
18856
|
if (i) {
|
|
18880
|
-
d.push(new
|
|
18857
|
+
d.push(new He(c.map));
|
|
18881
18858
|
let u = c.step.map(i.slice(n)), x;
|
|
18882
|
-
u && a.maybeStep(u).doc && (x = a.mapping.maps[a.mapping.maps.length - 1], p.push(new
|
|
18859
|
+
u && a.maybeStep(u).doc && (x = a.mapping.maps[a.mapping.maps.length - 1], p.push(new He(x, void 0, void 0, p.length + d.length))), n--, x && i.appendMap(x, n);
|
|
18883
18860
|
} else
|
|
18884
18861
|
a.maybeStep(c.step);
|
|
18885
18862
|
if (c.selection)
|
|
18886
|
-
return s = i ? c.selection.map(i.slice(n)) : c.selection, l = new
|
|
18863
|
+
return s = i ? c.selection.map(i.slice(n)) : c.selection, l = new Le(this.items.slice(0, o).append(d.reverse().concat(p)), this.eventCount - 1), !1;
|
|
18887
18864
|
}, this.items.length, 0), { remaining: l, transform: a, selection: s };
|
|
18888
18865
|
}
|
|
18889
18866
|
// Create a new branch with the given transform added.
|
|
18890
18867
|
addTransform(t, e, o, i) {
|
|
18891
18868
|
let n = [], a = this.eventCount, s = this.items, l = !i && s.length ? s.get(s.length - 1) : null;
|
|
18892
18869
|
for (let d = 0; d < t.steps.length; d++) {
|
|
18893
|
-
let c = t.steps[d].invert(t.docs[d]), m = new
|
|
18870
|
+
let c = t.steps[d].invert(t.docs[d]), m = new He(t.mapping.maps[d], c, e), u;
|
|
18894
18871
|
(u = l && l.merge(m)) && (m = u, d ? n.pop() : s = s.slice(0, s.length - 1)), n.push(m), e && (a++, e = void 0), i || (l = m);
|
|
18895
18872
|
}
|
|
18896
18873
|
let p = a - o.depth;
|
|
18897
|
-
return p > x2 && (s = u2(s, p), a -= p), new
|
|
18874
|
+
return p > x2 && (s = u2(s, p), a -= p), new Le(s.append(n), a);
|
|
18898
18875
|
}
|
|
18899
18876
|
remapping(t, e) {
|
|
18900
18877
|
let o = new Wi();
|
|
@@ -18904,7 +18881,7 @@ class Ie {
|
|
|
18904
18881
|
}, t, e), o;
|
|
18905
18882
|
}
|
|
18906
18883
|
addMaps(t) {
|
|
18907
|
-
return this.eventCount == 0 ? this : new
|
|
18884
|
+
return this.eventCount == 0 ? this : new Le(this.items.append(t.map((e) => new He(e))), this.eventCount);
|
|
18908
18885
|
}
|
|
18909
18886
|
// When the collab module receives remote changes, the history has
|
|
18910
18887
|
// to know about those, so that it can adjust the steps that were
|
|
@@ -18926,14 +18903,14 @@ class Ie {
|
|
|
18926
18903
|
let x = n.maps[u];
|
|
18927
18904
|
if (m.step) {
|
|
18928
18905
|
let g = t.steps[u].invert(t.docs[u]), f = m.selection && m.selection.map(n.slice(l + 1, u));
|
|
18929
|
-
f && s++, o.push(new
|
|
18906
|
+
f && s++, o.push(new He(x, g, f));
|
|
18930
18907
|
} else
|
|
18931
|
-
o.push(new
|
|
18908
|
+
o.push(new He(x));
|
|
18932
18909
|
}, i);
|
|
18933
18910
|
let p = [];
|
|
18934
18911
|
for (let m = e; m < a; m++)
|
|
18935
|
-
p.push(new
|
|
18936
|
-
let d = this.items.slice(0, i).append(p).append(o), c = new
|
|
18912
|
+
p.push(new He(n.maps[m]));
|
|
18913
|
+
let d = this.items.slice(0, i).append(p).append(o), c = new Le(d, s);
|
|
18937
18914
|
return c.emptyItemCount() > m2 && (c = c.compress(this.items.length - o.length)), c;
|
|
18938
18915
|
}
|
|
18939
18916
|
emptyItemCount() {
|
|
@@ -18958,14 +18935,14 @@ class Ie {
|
|
|
18958
18935
|
if (o--, p && e.appendMap(p, o), l) {
|
|
18959
18936
|
let d = a.selection && a.selection.map(e.slice(o));
|
|
18960
18937
|
d && n++;
|
|
18961
|
-
let c = new
|
|
18938
|
+
let c = new He(p.invert(), l, d), m, u = i.length - 1;
|
|
18962
18939
|
(m = i.length && i[u].merge(c)) ? i[u] = m : i.push(c);
|
|
18963
18940
|
}
|
|
18964
18941
|
} else a.map && o--;
|
|
18965
|
-
}, this.items.length, 0), new
|
|
18942
|
+
}, this.items.length, 0), new Le(It.from(i.reverse()), n);
|
|
18966
18943
|
}
|
|
18967
18944
|
}
|
|
18968
|
-
|
|
18945
|
+
Le.empty = new Le(It.empty, 0);
|
|
18969
18946
|
function u2(r, t) {
|
|
18970
18947
|
let e;
|
|
18971
18948
|
return r.forEach((o, i) => {
|
|
@@ -18973,7 +18950,7 @@ function u2(r, t) {
|
|
|
18973
18950
|
return e = i, !1;
|
|
18974
18951
|
}), r.slice(e);
|
|
18975
18952
|
}
|
|
18976
|
-
class
|
|
18953
|
+
class He {
|
|
18977
18954
|
constructor(t, e, o, i) {
|
|
18978
18955
|
this.map = t, this.step = e, this.selection = o, this.mirrorOffset = i;
|
|
18979
18956
|
}
|
|
@@ -18981,11 +18958,11 @@ class Fe {
|
|
|
18981
18958
|
if (this.step && t.step && !t.selection) {
|
|
18982
18959
|
let e = t.step.merge(this.step);
|
|
18983
18960
|
if (e)
|
|
18984
|
-
return new
|
|
18961
|
+
return new He(e.getMap().invert(), e, this.selection);
|
|
18985
18962
|
}
|
|
18986
18963
|
}
|
|
18987
18964
|
}
|
|
18988
|
-
class
|
|
18965
|
+
class Tr {
|
|
18989
18966
|
constructor(t, e, o, i, n) {
|
|
18990
18967
|
this.done = t, this.undone = e, this.prevRanges = o, this.prevTime = i, this.prevComposition = n;
|
|
18991
18968
|
}
|
|
@@ -18995,16 +18972,16 @@ function g2(r, t, e, o) {
|
|
|
18995
18972
|
let i = e.getMeta(wo), n;
|
|
18996
18973
|
if (i)
|
|
18997
18974
|
return i.historyState;
|
|
18998
|
-
e.getMeta(y2) && (r = new
|
|
18975
|
+
e.getMeta(y2) && (r = new Tr(r.done, r.undone, null, 0, -1));
|
|
18999
18976
|
let a = e.getMeta("appendedTransaction");
|
|
19000
18977
|
if (e.steps.length == 0)
|
|
19001
18978
|
return r;
|
|
19002
18979
|
if (a && a.getMeta(wo))
|
|
19003
|
-
return a.getMeta(wo).redo ? new
|
|
18980
|
+
return a.getMeta(wo).redo ? new Tr(r.done.addTransform(e, void 0, o, Un(t)), r.undone, fc(e.mapping.maps), r.prevTime, r.prevComposition) : new Tr(r.done, r.undone.addTransform(e, void 0, o, Un(t)), null, r.prevTime, r.prevComposition);
|
|
19004
18981
|
if (e.getMeta("addToHistory") !== !1 && !(a && a.getMeta("addToHistory") === !1)) {
|
|
19005
18982
|
let s = e.getMeta("composition"), l = r.prevTime == 0 || !a && r.prevComposition != s && (r.prevTime < (e.time || 0) - o.newGroupDelay || !f2(e, r.prevRanges)), p = a ? Ls(r.prevRanges, e.mapping) : fc(e.mapping.maps);
|
|
19006
|
-
return new
|
|
19007
|
-
} else return (n = e.getMeta("rebased")) ? new
|
|
18983
|
+
return new Tr(r.done.addTransform(e, l ? t.selection.getBookmark() : void 0, o, Un(t)), Le.empty, p, e.time, s ?? r.prevComposition);
|
|
18984
|
+
} else return (n = e.getMeta("rebased")) ? new Tr(r.done.rebased(e, n), r.undone.rebased(e, n), Ls(r.prevRanges, e.mapping), r.prevTime, r.prevComposition) : new Tr(r.done.addMaps(e.mapping.maps), r.undone.addMaps(e.mapping.maps), Ls(r.prevRanges, e.mapping), r.prevTime, r.prevComposition);
|
|
19008
18985
|
}
|
|
19009
18986
|
function f2(r, t) {
|
|
19010
18987
|
if (!t)
|
|
@@ -19037,7 +19014,7 @@ function h2(r, t, e) {
|
|
|
19037
19014
|
let o = Un(t), i = wo.get(t).spec.config, n = (e ? r.undone : r.done).popEvent(t, o);
|
|
19038
19015
|
if (!n)
|
|
19039
19016
|
return null;
|
|
19040
|
-
let a = n.selection.resolve(n.transform.doc), s = (e ? r.done : r.undone).addTransform(n.transform, t.selection.getBookmark(), i, o), l = new
|
|
19017
|
+
let a = n.selection.resolve(n.transform.doc), s = (e ? r.done : r.undone).addTransform(n.transform, t.selection.getBookmark(), i, o), l = new Tr(e ? s : n.remaining, e ? n.remaining : s, null, 0, -1);
|
|
19041
19018
|
return n.transform.setSelection(a).setMeta(wo, { redo: e, historyState: l });
|
|
19042
19019
|
}
|
|
19043
19020
|
let Rs = !1, hc = null;
|
|
@@ -19053,7 +19030,7 @@ function Un(r) {
|
|
|
19053
19030
|
}
|
|
19054
19031
|
return Rs;
|
|
19055
19032
|
}
|
|
19056
|
-
const wo = new
|
|
19033
|
+
const wo = new oe("history"), y2 = new oe("closeHistory");
|
|
19057
19034
|
function w2(r = {}) {
|
|
19058
19035
|
return r = {
|
|
19059
19036
|
depth: r.depth || 100,
|
|
@@ -19062,7 +19039,7 @@ function w2(r = {}) {
|
|
|
19062
19039
|
key: wo,
|
|
19063
19040
|
state: {
|
|
19064
19041
|
init() {
|
|
19065
|
-
return new
|
|
19042
|
+
return new Tr(Le.empty, Le.empty, null, 0, -1);
|
|
19066
19043
|
},
|
|
19067
19044
|
apply(t, e, o) {
|
|
19068
19045
|
return g2(e, o, t, r);
|
|
@@ -19120,7 +19097,7 @@ const wu = yu(!1, !0), vu = yu(!0, !0), v2 = jt.create({
|
|
|
19120
19097
|
"Shift-Mod-я": () => this.editor.commands.redo()
|
|
19121
19098
|
};
|
|
19122
19099
|
}
|
|
19123
|
-
}), k2 =
|
|
19100
|
+
}), k2 = _e.create({
|
|
19124
19101
|
name: "horizontalRule",
|
|
19125
19102
|
addOptions() {
|
|
19126
19103
|
return {
|
|
@@ -19170,7 +19147,7 @@ const wu = yu(!1, !0), vu = yu(!0, !0), v2 = jt.create({
|
|
|
19170
19147
|
})
|
|
19171
19148
|
];
|
|
19172
19149
|
}
|
|
19173
|
-
}), S2 = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, C2 = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, M2 = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, E2 = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, T2 =
|
|
19150
|
+
}), S2 = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, C2 = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, M2 = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, E2 = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, T2 = gr.create({
|
|
19174
19151
|
name: "italic",
|
|
19175
19152
|
addOptions() {
|
|
19176
19153
|
return {
|
|
@@ -19235,7 +19212,7 @@ const wu = yu(!1, !0), vu = yu(!0, !0), v2 = jt.create({
|
|
|
19235
19212
|
})
|
|
19236
19213
|
];
|
|
19237
19214
|
}
|
|
19238
|
-
}), O2 =
|
|
19215
|
+
}), O2 = _e.create({
|
|
19239
19216
|
name: "listItem",
|
|
19240
19217
|
addOptions() {
|
|
19241
19218
|
return {
|
|
@@ -19263,7 +19240,7 @@ const wu = yu(!1, !0), vu = yu(!0, !0), v2 = jt.create({
|
|
|
19263
19240
|
"Shift-Tab": () => this.editor.commands.liftListItem(this.name)
|
|
19264
19241
|
};
|
|
19265
19242
|
}
|
|
19266
|
-
}), B2 = "listItem", yc = "textStyle", wc = /^(\d+)\.\s$/, P2 =
|
|
19243
|
+
}), B2 = "listItem", yc = "textStyle", wc = /^(\d+)\.\s$/, P2 = _e.create({
|
|
19267
19244
|
name: "orderedList",
|
|
19268
19245
|
addOptions() {
|
|
19269
19246
|
return {
|
|
@@ -19329,7 +19306,7 @@ const wu = yu(!1, !0), vu = yu(!0, !0), v2 = jt.create({
|
|
|
19329
19306
|
r
|
|
19330
19307
|
];
|
|
19331
19308
|
}
|
|
19332
|
-
}), A2 =
|
|
19309
|
+
}), A2 = _e.create({
|
|
19333
19310
|
name: "paragraph",
|
|
19334
19311
|
priority: 1e3,
|
|
19335
19312
|
addOptions() {
|
|
@@ -19357,7 +19334,7 @@ const wu = yu(!1, !0), vu = yu(!0, !0), v2 = jt.create({
|
|
|
19357
19334
|
"Mod-Alt-0": () => this.editor.commands.setParagraph()
|
|
19358
19335
|
};
|
|
19359
19336
|
}
|
|
19360
|
-
}), D2 = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, N2 = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, I2 =
|
|
19337
|
+
}), D2 = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, N2 = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, I2 = gr.create({
|
|
19361
19338
|
name: "strike",
|
|
19362
19339
|
addOptions() {
|
|
19363
19340
|
return {
|
|
@@ -19413,7 +19390,7 @@ const wu = yu(!1, !0), vu = yu(!0, !0), v2 = jt.create({
|
|
|
19413
19390
|
})
|
|
19414
19391
|
];
|
|
19415
19392
|
}
|
|
19416
|
-
}), L2 =
|
|
19393
|
+
}), L2 = _e.create({
|
|
19417
19394
|
name: "text",
|
|
19418
19395
|
group: "inline"
|
|
19419
19396
|
}), R2 = jt.create({
|
|
@@ -19567,7 +19544,7 @@ se.prototype = {
|
|
|
19567
19544
|
return i.j[r] = a, a;
|
|
19568
19545
|
}
|
|
19569
19546
|
};
|
|
19570
|
-
const et = (r, t, e, o, i) => r.ta(t, e, o, i),
|
|
19547
|
+
const et = (r, t, e, o, i) => r.ta(t, e, o, i), wt = (r, t, e, o, i) => r.tr(t, e, o, i), vc = (r, t, e, o, i) => r.ts(t, e, o, i), I = (r, t, e, o, i) => r.tt(t, e, o, i), lr = "WORD", Ol = "UWORD", Su = "ASCIINUMERICAL", Cu = "ALPHANUMERICAL", rn = "LOCALHOST", Bl = "TLD", Pl = "UTLD", Kn = "SCHEME", qo = "SLASH_SCHEME", yp = "NUM", Al = "WS", wp = "NL", Li = "OPENBRACE", Ri = "CLOSEBRACE", ba = "OPENBRACKET", ma = "CLOSEBRACKET", ua = "OPENPAREN", xa = "CLOSEPAREN", ga = "OPENANGLEBRACKET", fa = "CLOSEANGLEBRACKET", ha = "FULLWIDTHLEFTPAREN", ya = "FULLWIDTHRIGHTPAREN", wa = "LEFTCORNERBRACKET", va = "RIGHTCORNERBRACKET", ka = "LEFTWHITECORNERBRACKET", Sa = "RIGHTWHITECORNERBRACKET", Ca = "FULLWIDTHLESSTHAN", Ma = "FULLWIDTHGREATERTHAN", Ea = "AMPERSAND", Ta = "APOSTROPHE", Oa = "ASTERISK", Or = "AT", Ba = "BACKSLASH", Pa = "BACKTICK", Aa = "CARET", Ar = "COLON", vp = "COMMA", Da = "DOLLAR", je = "DOT", Na = "EQUALS", kp = "EXCLAMATION", ke = "HYPHEN", $i = "PERCENT", Ia = "PIPE", La = "PLUS", Ra = "POUND", _i = "QUERY", Sp = "QUOTE", Mu = "FULLWIDTHMIDDLEDOT", Cp = "SEMI", Ve = "SLASH", zi = "TILDE", $a = "UNDERSCORE", Eu = "EMOJI", _a = "SYM";
|
|
19571
19548
|
var Tu = /* @__PURE__ */ Object.freeze({
|
|
19572
19549
|
__proto__: null,
|
|
19573
19550
|
ALPHANUMERICAL: Cu,
|
|
@@ -19575,7 +19552,7 @@ var Tu = /* @__PURE__ */ Object.freeze({
|
|
|
19575
19552
|
APOSTROPHE: Ta,
|
|
19576
19553
|
ASCIINUMERICAL: Su,
|
|
19577
19554
|
ASTERISK: Oa,
|
|
19578
|
-
AT:
|
|
19555
|
+
AT: Or,
|
|
19579
19556
|
BACKSLASH: Ba,
|
|
19580
19557
|
BACKTICK: Pa,
|
|
19581
19558
|
CARET: Aa,
|
|
@@ -19583,10 +19560,10 @@ var Tu = /* @__PURE__ */ Object.freeze({
|
|
|
19583
19560
|
CLOSEBRACE: Ri,
|
|
19584
19561
|
CLOSEBRACKET: ma,
|
|
19585
19562
|
CLOSEPAREN: xa,
|
|
19586
|
-
COLON:
|
|
19563
|
+
COLON: Ar,
|
|
19587
19564
|
COMMA: vp,
|
|
19588
19565
|
DOLLAR: Da,
|
|
19589
|
-
DOT:
|
|
19566
|
+
DOT: je,
|
|
19590
19567
|
EMOJI: Eu,
|
|
19591
19568
|
EQUALS: Na,
|
|
19592
19569
|
EXCLAMATION: kp,
|
|
@@ -19615,7 +19592,7 @@ var Tu = /* @__PURE__ */ Object.freeze({
|
|
|
19615
19592
|
RIGHTWHITECORNERBRACKET: Sa,
|
|
19616
19593
|
SCHEME: Kn,
|
|
19617
19594
|
SEMI: Cp,
|
|
19618
|
-
SLASH:
|
|
19595
|
+
SLASH: Ve,
|
|
19619
19596
|
SLASH_SCHEME: qo,
|
|
19620
19597
|
SYM: _a,
|
|
19621
19598
|
TILDE: zi,
|
|
@@ -19623,59 +19600,59 @@ var Tu = /* @__PURE__ */ Object.freeze({
|
|
|
19623
19600
|
UNDERSCORE: $a,
|
|
19624
19601
|
UTLD: Pl,
|
|
19625
19602
|
UWORD: Ol,
|
|
19626
|
-
WORD:
|
|
19603
|
+
WORD: lr,
|
|
19627
19604
|
WS: Al
|
|
19628
19605
|
});
|
|
19629
|
-
const
|
|
19606
|
+
const ar = /[a-z]/, gi = new RegExp("\\p{L}", "u"), _s = new RegExp("\\p{Emoji}", "u"), sr = /\d/, zs = /\s/, kc = "\r", Fs = `
|
|
19630
19607
|
`, V2 = "️", W2 = "", Hs = "";
|
|
19631
19608
|
let Dn = null, Nn = null;
|
|
19632
19609
|
function q2(r = []) {
|
|
19633
19610
|
const t = {};
|
|
19634
19611
|
se.groups = t;
|
|
19635
19612
|
const e = new se();
|
|
19636
|
-
Dn == null && (Dn = Sc($2)), Nn == null && (Nn = Sc(_2)), I(e, "'", Ta), I(e, "{", Li), I(e, "}", Ri), I(e, "[", ba), I(e, "]", ma), I(e, "(", ua), I(e, ")", xa), I(e, "<", ga), I(e, ">", fa), I(e, "(", ha), I(e, ")", ya), I(e, "「", wa), I(e, "」", va), I(e, "『", ka), I(e, "』", Sa), I(e, "<", Ca), I(e, ">", Ma), I(e, "&", Ea), I(e, "*", Oa), I(e, "@",
|
|
19637
|
-
const o =
|
|
19613
|
+
Dn == null && (Dn = Sc($2)), Nn == null && (Nn = Sc(_2)), I(e, "'", Ta), I(e, "{", Li), I(e, "}", Ri), I(e, "[", ba), I(e, "]", ma), I(e, "(", ua), I(e, ")", xa), I(e, "<", ga), I(e, ">", fa), I(e, "(", ha), I(e, ")", ya), I(e, "「", wa), I(e, "」", va), I(e, "『", ka), I(e, "』", Sa), I(e, "<", Ca), I(e, ">", Ma), I(e, "&", Ea), I(e, "*", Oa), I(e, "@", Or), I(e, "`", Pa), I(e, "^", Aa), I(e, ":", Ar), I(e, ",", vp), I(e, "$", Da), I(e, ".", je), I(e, "=", Na), I(e, "!", kp), I(e, "-", ke), I(e, "%", $i), I(e, "|", Ia), I(e, "+", La), I(e, "#", Ra), I(e, "?", _i), I(e, '"', Sp), I(e, "/", Ve), I(e, ";", Cp), I(e, "~", zi), I(e, "_", $a), I(e, "\\", Ba), I(e, "・", Mu);
|
|
19614
|
+
const o = wt(e, sr, yp, {
|
|
19638
19615
|
[Cl]: !0
|
|
19639
19616
|
});
|
|
19640
|
-
|
|
19641
|
-
const i =
|
|
19617
|
+
wt(o, sr, o);
|
|
19618
|
+
const i = wt(o, ar, Su, {
|
|
19642
19619
|
[Ii]: !0
|
|
19643
|
-
}), n =
|
|
19620
|
+
}), n = wt(o, gi, Cu, {
|
|
19644
19621
|
[Ci]: !0
|
|
19645
|
-
}), a =
|
|
19622
|
+
}), a = wt(e, ar, lr, {
|
|
19646
19623
|
[Ml]: !0
|
|
19647
19624
|
});
|
|
19648
|
-
|
|
19649
|
-
const s =
|
|
19625
|
+
wt(a, sr, i), wt(a, ar, a), wt(i, sr, i), wt(i, ar, i);
|
|
19626
|
+
const s = wt(e, gi, Ol, {
|
|
19650
19627
|
[El]: !0
|
|
19651
19628
|
});
|
|
19652
|
-
|
|
19629
|
+
wt(s, ar), wt(s, sr, n), wt(s, gi, s), wt(n, sr, n), wt(n, ar), wt(n, gi, n);
|
|
19653
19630
|
const l = I(e, Fs, wp, {
|
|
19654
19631
|
[$s]: !0
|
|
19655
19632
|
}), p = I(e, kc, Al, {
|
|
19656
19633
|
[$s]: !0
|
|
19657
|
-
}), d =
|
|
19634
|
+
}), d = wt(e, zs, Al, {
|
|
19658
19635
|
[$s]: !0
|
|
19659
19636
|
});
|
|
19660
|
-
I(e, Hs, d), I(p, Fs, l), I(p, Hs, d),
|
|
19661
|
-
const c =
|
|
19637
|
+
I(e, Hs, d), I(p, Fs, l), I(p, Hs, d), wt(p, zs, d), I(d, kc), I(d, Fs), wt(d, zs, d), I(d, Hs, d);
|
|
19638
|
+
const c = wt(e, _s, Eu, {
|
|
19662
19639
|
[ku]: !0
|
|
19663
19640
|
});
|
|
19664
|
-
I(c, "#"),
|
|
19641
|
+
I(c, "#"), wt(c, _s, c), I(c, V2, c);
|
|
19665
19642
|
const m = I(c, W2);
|
|
19666
|
-
I(m, "#"),
|
|
19667
|
-
const u = [[
|
|
19643
|
+
I(m, "#"), wt(m, _s, c);
|
|
19644
|
+
const u = [[ar, a], [sr, i]], x = [[ar, null], [gi, s], [sr, n]];
|
|
19668
19645
|
for (let g = 0; g < Dn.length; g++)
|
|
19669
|
-
|
|
19646
|
+
Cr(e, Dn[g], Bl, lr, u);
|
|
19670
19647
|
for (let g = 0; g < Nn.length; g++)
|
|
19671
|
-
|
|
19648
|
+
Cr(e, Nn[g], Pl, Ol, x);
|
|
19672
19649
|
uo(Bl, {
|
|
19673
19650
|
tld: !0,
|
|
19674
19651
|
ascii: !0
|
|
19675
19652
|
}, t), uo(Pl, {
|
|
19676
19653
|
utld: !0,
|
|
19677
19654
|
alpha: !0
|
|
19678
|
-
}, t),
|
|
19655
|
+
}, t), Cr(e, "file", Kn, lr, u), Cr(e, "mailto", Kn, lr, u), Cr(e, "http", qo, lr, u), Cr(e, "https", qo, lr, u), Cr(e, "ftp", qo, lr, u), Cr(e, "ftps", qo, lr, u), uo(Kn, {
|
|
19679
19656
|
scheme: !0,
|
|
19680
19657
|
ascii: !0
|
|
19681
19658
|
}, t), uo(qo, {
|
|
@@ -19688,7 +19665,7 @@ function q2(r = []) {
|
|
|
19688
19665
|
} : {
|
|
19689
19666
|
[F2]: !0
|
|
19690
19667
|
};
|
|
19691
|
-
f.indexOf("-") >= 0 ? w[Tl] = !0 :
|
|
19668
|
+
f.indexOf("-") >= 0 ? w[Tl] = !0 : ar.test(f) ? sr.test(f) ? w[Ii] = !0 : w[Ml] = !0 : w[Cl] = !0, vc(e, f, f, w);
|
|
19692
19669
|
}
|
|
19693
19670
|
return vc(e, "localhost", rn, {
|
|
19694
19671
|
ascii: !0
|
|
@@ -19728,7 +19705,7 @@ function U2(r) {
|
|
|
19728
19705
|
}
|
|
19729
19706
|
return t;
|
|
19730
19707
|
}
|
|
19731
|
-
function
|
|
19708
|
+
function Cr(r, t, e, o, i) {
|
|
19732
19709
|
let n;
|
|
19733
19710
|
const a = t.length;
|
|
19734
19711
|
for (let s = 0; s < a - 1; s++) {
|
|
@@ -19983,40 +19960,40 @@ const Mc = is("email", {
|
|
|
19983
19960
|
*/
|
|
19984
19961
|
hasProtocol() {
|
|
19985
19962
|
const r = this.tk;
|
|
19986
|
-
return r.length >= 2 && r[0].t !== rn && r[1].t ===
|
|
19963
|
+
return r.length >= 2 && r[0].t !== rn && r[1].t === Ar;
|
|
19987
19964
|
}
|
|
19988
19965
|
}), we = (r) => new se(r);
|
|
19989
19966
|
function G2({
|
|
19990
19967
|
groups: r
|
|
19991
19968
|
}) {
|
|
19992
|
-
const t = r.domain.concat([Ea, Oa,
|
|
19969
|
+
const t = r.domain.concat([Ea, Oa, Or, Ba, Pa, Aa, Da, Na, ke, yp, $i, Ia, La, Ra, Ve, _a, zi, $a]), e = [Ta, Ar, vp, je, kp, $i, _i, Sp, Cp, ga, fa, Li, Ri, ma, ba, ua, xa, ha, ya, wa, va, ka, Sa, Ca, Ma], o = [Ea, Ta, Oa, Ba, Pa, Aa, Da, Na, ke, Li, Ri, $i, Ia, La, Ra, _i, Ve, _a, zi, $a], i = we(), n = I(i, zi);
|
|
19993
19970
|
et(n, o, n), et(n, r.domain, n);
|
|
19994
19971
|
const a = we(), s = we(), l = we();
|
|
19995
19972
|
et(i, r.domain, a), et(i, r.scheme, s), et(i, r.slashscheme, l), et(a, o, n), et(a, r.domain, a);
|
|
19996
|
-
const p = I(a,
|
|
19997
|
-
I(n,
|
|
19998
|
-
const d = I(n,
|
|
19973
|
+
const p = I(a, Or);
|
|
19974
|
+
I(n, Or, p), I(s, Or, p), I(l, Or, p);
|
|
19975
|
+
const d = I(n, je);
|
|
19999
19976
|
et(d, o, n), et(d, r.domain, n);
|
|
20000
19977
|
const c = we();
|
|
20001
19978
|
et(p, r.domain, c), et(c, r.domain, c);
|
|
20002
|
-
const m = I(c,
|
|
19979
|
+
const m = I(c, je);
|
|
20003
19980
|
et(m, r.domain, c);
|
|
20004
19981
|
const u = we(Mc);
|
|
20005
19982
|
et(m, r.tld, u), et(m, r.utld, u), I(p, rn, u);
|
|
20006
19983
|
const x = I(c, ke);
|
|
20007
|
-
I(x, ke, x), et(x, r.domain, c), et(u, r.domain, c), I(u,
|
|
20008
|
-
const g = I(u,
|
|
19984
|
+
I(x, ke, x), et(x, r.domain, c), et(u, r.domain, c), I(u, je, m), I(u, ke, x);
|
|
19985
|
+
const g = I(u, Ar);
|
|
20009
19986
|
et(g, r.numeric, Mc);
|
|
20010
|
-
const f = I(a, ke), y = I(a,
|
|
19987
|
+
const f = I(a, ke), y = I(a, je);
|
|
20011
19988
|
I(f, ke, f), et(f, r.domain, a), et(y, o, n), et(y, r.domain, a);
|
|
20012
19989
|
const w = we(In);
|
|
20013
|
-
et(y, r.tld, w), et(y, r.utld, w), et(w, r.domain, a), et(w, o, n), I(w,
|
|
20014
|
-
const k = I(w,
|
|
19990
|
+
et(y, r.tld, w), et(y, r.utld, w), et(w, r.domain, a), et(w, o, n), I(w, je, y), I(w, ke, f), I(w, Or, p);
|
|
19991
|
+
const k = I(w, Ar), h = we(In);
|
|
20015
19992
|
et(k, r.numeric, h);
|
|
20016
19993
|
const B = we(In), M = we();
|
|
20017
|
-
et(B, t, B), et(B, e, M), et(M, t, B), et(M, e, M), I(w,
|
|
20018
|
-
const A = I(s,
|
|
20019
|
-
et(s, r.domain, a), I(s,
|
|
19994
|
+
et(B, t, B), et(B, e, M), et(M, t, B), et(M, e, M), I(w, Ve, B), I(h, Ve, B);
|
|
19995
|
+
const A = I(s, Ar), R = I(l, Ar), H = I(R, Ve), P = I(H, Ve);
|
|
19996
|
+
et(s, r.domain, a), I(s, je, y), I(s, ke, f), et(l, r.domain, a), I(l, je, y), I(l, ke, f), et(A, r.domain, B), I(A, Ve, B), I(A, _i, B), et(P, r.domain, B), et(P, t, B), I(P, Ve, B);
|
|
20020
19997
|
const E = [
|
|
20021
19998
|
[Li, Ri],
|
|
20022
19999
|
// {}
|
|
@@ -20126,7 +20103,7 @@ function tv(r) {
|
|
|
20126
20103
|
}
|
|
20127
20104
|
function ev(r) {
|
|
20128
20105
|
return new Bt({
|
|
20129
|
-
key: new
|
|
20106
|
+
key: new oe("autolink"),
|
|
20130
20107
|
appendTransaction: (t, e, o) => {
|
|
20131
20108
|
const i = t.some((p) => p.docChanged) && !e.doc.eq(o.doc), n = t.some((p) => p.getMeta("preventAutolink"));
|
|
20132
20109
|
if (!i || n)
|
|
@@ -20162,7 +20139,7 @@ function ev(r) {
|
|
|
20162
20139
|
}
|
|
20163
20140
|
function rv(r) {
|
|
20164
20141
|
return new Bt({
|
|
20165
|
-
key: new
|
|
20142
|
+
key: new oe("handleClickLink"),
|
|
20166
20143
|
props: {
|
|
20167
20144
|
handleClick: (t, e, o) => {
|
|
20168
20145
|
var i, n;
|
|
@@ -20182,7 +20159,7 @@ function rv(r) {
|
|
|
20182
20159
|
}
|
|
20183
20160
|
function ov(r) {
|
|
20184
20161
|
return new Bt({
|
|
20185
|
-
key: new
|
|
20162
|
+
key: new oe("handlePasteLink"),
|
|
20186
20163
|
props: {
|
|
20187
20164
|
handlePaste: (t, e, o) => {
|
|
20188
20165
|
const { state: i } = t, { selection: n } = i, { empty: a } = n;
|
|
@@ -20223,7 +20200,7 @@ function oo(r, t) {
|
|
|
20223
20200
|
"i"
|
|
20224
20201
|
));
|
|
20225
20202
|
}
|
|
20226
|
-
const nv =
|
|
20203
|
+
const nv = gr.create({
|
|
20227
20204
|
name: "link",
|
|
20228
20205
|
priority: 1e3,
|
|
20229
20206
|
keepOnSplit: !1,
|
|
@@ -20437,7 +20414,7 @@ const nv = xr.create({
|
|
|
20437
20414
|
return Qu(() => {
|
|
20438
20415
|
var P;
|
|
20439
20416
|
(P = w.value) == null || P.destroy();
|
|
20440
|
-
}),
|
|
20417
|
+
}), xr(() => {
|
|
20441
20418
|
k();
|
|
20442
20419
|
}), (P, E) => (v(), C("div", null, [
|
|
20443
20420
|
G(vo, {
|
|
@@ -20632,9 +20609,9 @@ const Mv = /* @__PURE__ */ ns(kv, [["render", Cv]]), Ev = {
|
|
|
20632
20609
|
const e = t, o = function() {
|
|
20633
20610
|
e("firstMediaButtonFunction");
|
|
20634
20611
|
};
|
|
20635
|
-
return
|
|
20612
|
+
return Br("closeMediaLibraryModal", () => {
|
|
20636
20613
|
o();
|
|
20637
|
-
}), (n, a) => (v(), xt(
|
|
20614
|
+
}), (n, a) => (v(), xt(zr, {
|
|
20638
20615
|
title: r.title,
|
|
20639
20616
|
showModalBuilder: r.open,
|
|
20640
20617
|
onCloseMainModalBuilder: o,
|
|
@@ -20668,13 +20645,13 @@ function St(r) {
|
|
|
20668
20645
|
let e = (t = r.value.$el) != null ? t : r.value;
|
|
20669
20646
|
return e instanceof Node ? e : null;
|
|
20670
20647
|
}
|
|
20671
|
-
function
|
|
20648
|
+
function Re(r, t, ...e) {
|
|
20672
20649
|
if (r in t) {
|
|
20673
20650
|
let i = t[r];
|
|
20674
20651
|
return typeof i == "function" ? i(...e) : i;
|
|
20675
20652
|
}
|
|
20676
20653
|
let o = new Error(`Tried to handle "${r}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((i) => `"${i}"`).join(", ")}.`);
|
|
20677
|
-
throw Error.captureStackTrace && Error.captureStackTrace(o,
|
|
20654
|
+
throw Error.captureStackTrace && Error.captureStackTrace(o, Re), o;
|
|
20678
20655
|
}
|
|
20679
20656
|
var Av = Object.defineProperty, Dv = (r, t, e) => t in r ? Av(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, Bc = (r, t, e) => (Dv(r, typeof t != "symbol" ? t + "" : t, e), e);
|
|
20680
20657
|
let Nv = class {
|
|
@@ -20713,7 +20690,7 @@ let Pc = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "butt
|
|
|
20713
20690
|
var Lv = ((r) => (r[r.First = 1] = "First", r[r.Previous = 2] = "Previous", r[r.Next = 4] = "Next", r[r.Last = 8] = "Last", r[r.WrapAround = 16] = "WrapAround", r[r.NoScroll = 32] = "NoScroll", r))(Lv || {}), Rv = ((r) => (r[r.Error = 0] = "Error", r[r.Overflow = 1] = "Overflow", r[r.Success = 2] = "Success", r[r.Underflow = 3] = "Underflow", r))(Rv || {}), $v = ((r) => (r[r.Previous = -1] = "Previous", r[r.Next = 1] = "Next", r))($v || {}), Op = ((r) => (r[r.Strict = 0] = "Strict", r[r.Loose = 1] = "Loose", r))(Op || {});
|
|
20714
20691
|
function Du(r, t = 0) {
|
|
20715
20692
|
var e;
|
|
20716
|
-
return r === ((e = Iv(r)) == null ? void 0 : e.body) ? !1 :
|
|
20693
|
+
return r === ((e = Iv(r)) == null ? void 0 : e.body) ? !1 : Re(t, { 0() {
|
|
20717
20694
|
return r.matches(Pc);
|
|
20718
20695
|
}, 1() {
|
|
20719
20696
|
let o = r;
|
|
@@ -20790,7 +20767,7 @@ function Ac(r, t) {
|
|
|
20790
20767
|
}
|
|
20791
20768
|
function qv(r, t) {
|
|
20792
20769
|
let e = S(Ac(r.value.type, r.value.as));
|
|
20793
|
-
return
|
|
20770
|
+
return xr(() => {
|
|
20794
20771
|
e.value = Ac(r.value.type, r.value.as);
|
|
20795
20772
|
}), an(() => {
|
|
20796
20773
|
var o;
|
|
@@ -20816,7 +20793,7 @@ function ci({ visible: r = !0, features: t = 0, ourProps: e, theirProps: o, ...i
|
|
|
20816
20793
|
if (r || t & 2 && a.static) return Vs(s);
|
|
20817
20794
|
if (t & 1) {
|
|
20818
20795
|
let l = (n = a.unmount) == null || n ? 0 : 1;
|
|
20819
|
-
return
|
|
20796
|
+
return Re(l, { 0() {
|
|
20820
20797
|
return null;
|
|
20821
20798
|
}, 1() {
|
|
20822
20799
|
return Vs({ ...i, props: { ...a, hidden: !0, style: { display: "none" } } });
|
|
@@ -20891,13 +20868,13 @@ function Xv() {
|
|
|
20891
20868
|
return Wr($u, null);
|
|
20892
20869
|
}
|
|
20893
20870
|
function Qv(r) {
|
|
20894
|
-
|
|
20871
|
+
Br($u, r);
|
|
20895
20872
|
}
|
|
20896
20873
|
var Pt = ((r) => (r.Space = " ", r.Enter = "Enter", r.Escape = "Escape", r.Backspace = "Backspace", r.Delete = "Delete", r.ArrowLeft = "ArrowLeft", r.ArrowUp = "ArrowUp", r.ArrowRight = "ArrowRight", r.ArrowDown = "ArrowDown", r.Home = "Home", r.End = "End", r.PageUp = "PageUp", r.PageDown = "PageDown", r.Tab = "Tab", r))(Pt || {});
|
|
20897
20874
|
function Zv(r) {
|
|
20898
20875
|
throw new Error("Unexpected object: " + r);
|
|
20899
20876
|
}
|
|
20900
|
-
var
|
|
20877
|
+
var Qt = ((r) => (r[r.First = 0] = "First", r[r.Previous = 1] = "Previous", r[r.Next = 2] = "Next", r[r.Last = 3] = "Last", r[r.Specific = 4] = "Specific", r[r.Nothing = 5] = "Nothing", r))(Qt || {});
|
|
20901
20878
|
function t5(r, t) {
|
|
20902
20879
|
let e = t.resolveItems();
|
|
20903
20880
|
if (e.length <= 0) return null;
|
|
@@ -21001,7 +20978,7 @@ let un = ce({ name: "Listbox", emits: { "update:modelValue": (r) => !0 }, props:
|
|
|
21001
20978
|
let h = d.value !== null ? l.value[d.value] : null, B = zv(k(l.value.slice()), (A) => St(A.dataRef.domRef)), M = h ? B.indexOf(h) : null;
|
|
21002
20979
|
return M === -1 && (M = null), { options: B, activeOptionIndex: M };
|
|
21003
20980
|
}
|
|
21004
|
-
let u = $(() => r.multiple ? 1 : 0), [x, g] = Ov($(() => r.modelValue), (k) => o("update:modelValue", k), $(() => r.defaultValue)), f = $(() => x.value === void 0 ?
|
|
20981
|
+
let u = $(() => r.multiple ? 1 : 0), [x, g] = Ov($(() => r.modelValue), (k) => o("update:modelValue", k), $(() => r.defaultValue)), f = $(() => x.value === void 0 ? Re(u.value, { 1: [], 0: void 0 }) : x.value), y = { listboxState: i, value: f, mode: u, compare(k, h) {
|
|
21005
20982
|
if (typeof r.by == "string") {
|
|
21006
20983
|
let B = r.by;
|
|
21007
20984
|
return (k == null ? void 0 : k[B]) === (h == null ? void 0 : h[B]);
|
|
@@ -21013,7 +20990,7 @@ let un = ce({ name: "Listbox", emits: { "update:modelValue": (r) => !0 }, props:
|
|
|
21013
20990
|
r.disabled || i.value !== 0 && (i.value = 0);
|
|
21014
20991
|
}, goToOption(k, h, B) {
|
|
21015
20992
|
if (r.disabled || i.value === 1) return;
|
|
21016
|
-
let M = m(), A = t5(k ===
|
|
20993
|
+
let M = m(), A = t5(k === Qt.Specific ? { focus: Qt.Specific, id: h } : { focus: k }, { resolveItems: () => M.options, resolveActiveIndex: () => M.activeOptionIndex, resolveId: (R) => R.id, resolveDisabled: (R) => R.dataRef.disabled });
|
|
21017
20994
|
p.value = "", d.value = A, c.value = B ?? 1, l.value = M.options;
|
|
21018
20995
|
}, search(k) {
|
|
21019
20996
|
if (r.disabled || i.value === 1) return;
|
|
@@ -21035,20 +21012,20 @@ let un = ce({ name: "Listbox", emits: { "update:modelValue": (r) => !0 }, props:
|
|
|
21035
21012
|
}, theirOnChange(k) {
|
|
21036
21013
|
r.disabled || g(k);
|
|
21037
21014
|
}, select(k) {
|
|
21038
|
-
r.disabled || g(
|
|
21039
|
-
let h =
|
|
21015
|
+
r.disabled || g(Re(u.value, { 0: () => k, 1: () => {
|
|
21016
|
+
let h = Ut(y.value.value).slice(), B = Ut(k), M = h.findIndex((A) => y.compare(B, Ut(A)));
|
|
21040
21017
|
return M === -1 ? h.push(B) : h.splice(M, 1), h;
|
|
21041
21018
|
} }));
|
|
21042
21019
|
} };
|
|
21043
21020
|
Wv([a, s], (k, h) => {
|
|
21044
21021
|
var B;
|
|
21045
21022
|
y.closeListbox(), Du(h, Op.Loose) || (k.preventDefault(), (B = St(a)) == null || B.focus());
|
|
21046
|
-
}, $(() => i.value === 0)),
|
|
21023
|
+
}, $(() => i.value === 0)), Br(Hu, y), Qv($(() => Re(i.value, { 0: nn.Open, 1: nn.Closed })));
|
|
21047
21024
|
let w = $(() => {
|
|
21048
21025
|
var k;
|
|
21049
21026
|
return (k = St(a)) == null ? void 0 : k.closest("form");
|
|
21050
21027
|
});
|
|
21051
|
-
return
|
|
21028
|
+
return xr(() => {
|
|
21052
21029
|
ot([w], () => {
|
|
21053
21030
|
if (!w.value || r.defaultValue === void 0) return;
|
|
21054
21031
|
function k() {
|
|
@@ -21085,15 +21062,15 @@ let xn = ce({ name: "ListboxButton", props: { as: { type: [Object, String], defa
|
|
|
21085
21062
|
case Pt.Space:
|
|
21086
21063
|
case Pt.Enter:
|
|
21087
21064
|
case Pt.ArrowDown:
|
|
21088
|
-
c.preventDefault(), a.openListbox(),
|
|
21065
|
+
c.preventDefault(), a.openListbox(), pt(() => {
|
|
21089
21066
|
var m;
|
|
21090
|
-
(m = St(a.optionsRef)) == null || m.focus({ preventScroll: !0 }), a.value.value || a.goToOption(
|
|
21067
|
+
(m = St(a.optionsRef)) == null || m.focus({ preventScroll: !0 }), a.value.value || a.goToOption(Qt.First);
|
|
21091
21068
|
});
|
|
21092
21069
|
break;
|
|
21093
21070
|
case Pt.ArrowUp:
|
|
21094
|
-
c.preventDefault(), a.openListbox(),
|
|
21071
|
+
c.preventDefault(), a.openListbox(), pt(() => {
|
|
21095
21072
|
var m;
|
|
21096
|
-
(m = St(a.optionsRef)) == null || m.focus({ preventScroll: !0 }), a.value.value || a.goToOption(
|
|
21073
|
+
(m = St(a.optionsRef)) == null || m.focus({ preventScroll: !0 }), a.value.value || a.goToOption(Qt.Last);
|
|
21097
21074
|
});
|
|
21098
21075
|
break;
|
|
21099
21076
|
}
|
|
@@ -21106,7 +21083,7 @@ let xn = ce({ name: "ListboxButton", props: { as: { type: [Object, String], defa
|
|
|
21106
21083
|
}
|
|
21107
21084
|
}
|
|
21108
21085
|
function p(c) {
|
|
21109
|
-
a.disabled.value || (a.listboxState.value === 0 ? (a.closeListbox(),
|
|
21086
|
+
a.disabled.value || (a.listboxState.value === 0 ? (a.closeListbox(), pt(() => {
|
|
21110
21087
|
var m;
|
|
21111
21088
|
return (m = St(a.buttonRef)) == null ? void 0 : m.focus({ preventScroll: !0 });
|
|
21112
21089
|
})) : (c.preventDefault(), a.openListbox(), s5(() => {
|
|
@@ -21133,23 +21110,23 @@ let xn = ce({ name: "ListboxButton", props: { as: { type: [Object, String], defa
|
|
|
21133
21110
|
let m = a.options.value[a.activeOptionIndex.value];
|
|
21134
21111
|
a.select(m.dataRef.value);
|
|
21135
21112
|
}
|
|
21136
|
-
a.mode.value === 0 && (a.closeListbox(),
|
|
21113
|
+
a.mode.value === 0 && (a.closeListbox(), pt(() => {
|
|
21137
21114
|
var m;
|
|
21138
21115
|
return (m = St(a.buttonRef)) == null ? void 0 : m.focus({ preventScroll: !0 });
|
|
21139
21116
|
}));
|
|
21140
21117
|
break;
|
|
21141
|
-
case
|
|
21142
|
-
return c.preventDefault(), c.stopPropagation(), a.goToOption(
|
|
21143
|
-
case
|
|
21144
|
-
return c.preventDefault(), c.stopPropagation(), a.goToOption(
|
|
21118
|
+
case Re(a.orientation.value, { vertical: Pt.ArrowDown, horizontal: Pt.ArrowRight }):
|
|
21119
|
+
return c.preventDefault(), c.stopPropagation(), a.goToOption(Qt.Next);
|
|
21120
|
+
case Re(a.orientation.value, { vertical: Pt.ArrowUp, horizontal: Pt.ArrowLeft }):
|
|
21121
|
+
return c.preventDefault(), c.stopPropagation(), a.goToOption(Qt.Previous);
|
|
21145
21122
|
case Pt.Home:
|
|
21146
21123
|
case Pt.PageUp:
|
|
21147
|
-
return c.preventDefault(), c.stopPropagation(), a.goToOption(
|
|
21124
|
+
return c.preventDefault(), c.stopPropagation(), a.goToOption(Qt.First);
|
|
21148
21125
|
case Pt.End:
|
|
21149
21126
|
case Pt.PageDown:
|
|
21150
|
-
return c.preventDefault(), c.stopPropagation(), a.goToOption(
|
|
21127
|
+
return c.preventDefault(), c.stopPropagation(), a.goToOption(Qt.Last);
|
|
21151
21128
|
case Pt.Escape:
|
|
21152
|
-
c.preventDefault(), c.stopPropagation(), a.closeListbox(),
|
|
21129
|
+
c.preventDefault(), c.stopPropagation(), a.closeListbox(), pt(() => {
|
|
21153
21130
|
var m;
|
|
21154
21131
|
return (m = St(a.buttonRef)) == null ? void 0 : m.focus({ preventScroll: !0 });
|
|
21155
21132
|
});
|
|
@@ -21172,47 +21149,47 @@ let xn = ce({ name: "ListboxButton", props: { as: { type: [Object, String], defa
|
|
|
21172
21149
|
var i;
|
|
21173
21150
|
let n = (i = r.id) != null ? i : `headlessui-listbox-option-${as()}`, a = mn("ListboxOption"), s = S(null);
|
|
21174
21151
|
o({ el: s, $el: s });
|
|
21175
|
-
let l = $(() => a.activeOptionIndex.value !== null ? a.options.value[a.activeOptionIndex.value].id === n : !1), p = $(() =>
|
|
21152
|
+
let l = $(() => a.activeOptionIndex.value !== null ? a.options.value[a.activeOptionIndex.value].id === n : !1), p = $(() => Re(a.mode.value, { 0: () => a.compare(Ut(a.value.value), Ut(r.value)), 1: () => Ut(a.value.value).some((k) => a.compare(Ut(k), Ut(r.value))) })), d = $(() => Re(a.mode.value, { 1: () => {
|
|
21176
21153
|
var k;
|
|
21177
|
-
let h =
|
|
21178
|
-
return ((k = a.options.value.find((B) => h.some((M) => a.compare(
|
|
21154
|
+
let h = Ut(a.value.value);
|
|
21155
|
+
return ((k = a.options.value.find((B) => h.some((M) => a.compare(Ut(M), Ut(B.dataRef.value))))) == null ? void 0 : k.id) === n;
|
|
21179
21156
|
}, 0: () => p.value })), c = r5(s), m = $(() => ({ disabled: r.disabled, value: r.value, get textValue() {
|
|
21180
21157
|
return c();
|
|
21181
21158
|
}, domRef: s }));
|
|
21182
|
-
|
|
21159
|
+
xr(() => a.registerOption(n, m)), tx(() => a.unregisterOption(n)), xr(() => {
|
|
21183
21160
|
ot([a.listboxState, p], () => {
|
|
21184
|
-
a.listboxState.value === 0 && p.value &&
|
|
21185
|
-
d.value && a.goToOption(
|
|
21161
|
+
a.listboxState.value === 0 && p.value && Re(a.mode.value, { 1: () => {
|
|
21162
|
+
d.value && a.goToOption(Qt.Specific, n);
|
|
21186
21163
|
}, 0: () => {
|
|
21187
|
-
a.goToOption(
|
|
21164
|
+
a.goToOption(Qt.Specific, n);
|
|
21188
21165
|
} });
|
|
21189
21166
|
}, { immediate: !0 });
|
|
21190
21167
|
}), an(() => {
|
|
21191
|
-
a.listboxState.value === 0 && l.value && a.activationTrigger.value !== 0 &&
|
|
21168
|
+
a.listboxState.value === 0 && l.value && a.activationTrigger.value !== 0 && pt(() => {
|
|
21192
21169
|
var k, h;
|
|
21193
21170
|
return (h = (k = St(s)) == null ? void 0 : k.scrollIntoView) == null ? void 0 : h.call(k, { block: "nearest" });
|
|
21194
21171
|
});
|
|
21195
21172
|
});
|
|
21196
21173
|
function u(k) {
|
|
21197
21174
|
if (r.disabled) return k.preventDefault();
|
|
21198
|
-
a.select(r.value), a.mode.value === 0 && (a.closeListbox(),
|
|
21175
|
+
a.select(r.value), a.mode.value === 0 && (a.closeListbox(), pt(() => {
|
|
21199
21176
|
var h;
|
|
21200
21177
|
return (h = St(a.buttonRef)) == null ? void 0 : h.focus({ preventScroll: !0 });
|
|
21201
21178
|
}));
|
|
21202
21179
|
}
|
|
21203
21180
|
function x() {
|
|
21204
|
-
if (r.disabled) return a.goToOption(
|
|
21205
|
-
a.goToOption(
|
|
21181
|
+
if (r.disabled) return a.goToOption(Qt.Nothing);
|
|
21182
|
+
a.goToOption(Qt.Specific, n);
|
|
21206
21183
|
}
|
|
21207
21184
|
let g = Uv();
|
|
21208
21185
|
function f(k) {
|
|
21209
21186
|
g.update(k);
|
|
21210
21187
|
}
|
|
21211
21188
|
function y(k) {
|
|
21212
|
-
g.wasMoved(k) && (r.disabled || l.value || a.goToOption(
|
|
21189
|
+
g.wasMoved(k) && (r.disabled || l.value || a.goToOption(Qt.Specific, n, 0));
|
|
21213
21190
|
}
|
|
21214
21191
|
function w(k) {
|
|
21215
|
-
g.wasMoved(k) && (r.disabled || l.value && a.goToOption(
|
|
21192
|
+
g.wasMoved(k) && (r.disabled || l.value && a.goToOption(Qt.Nothing));
|
|
21216
21193
|
}
|
|
21217
21194
|
return () => {
|
|
21218
21195
|
let { disabled: k } = r, h = { active: l.value, selected: p.value, disabled: k }, { value: B, disabled: M, ...A } = r, R = { id: n, ref: s, role: "option", tabIndex: k === !0 ? void 0 : -1, "aria-disabled": k === !0 ? !0 : void 0, "aria-selected": p.value, disabled: void 0, onClick: u, onFocus: x, onPointerenter: f, onMouseenter: f, onPointermove: y, onMousemove: y, onPointerleave: w, onMouseleave: w };
|
|
@@ -21461,7 +21438,7 @@ const l5 = { class: "pbx-relative" }, p5 = { class: "pbx-flex pbx-gap-2 pbx-item
|
|
|
21461
21438
|
class: "pbx-myPrimaryInputLabel"
|
|
21462
21439
|
}, "Video url:", -1)),
|
|
21463
21440
|
Ct(b("input", {
|
|
21464
|
-
"onUpdate:modelValue": K[0] || (K[0] = (
|
|
21441
|
+
"onUpdate:modelValue": K[0] || (K[0] = (lt) => z.value = lt),
|
|
21465
21442
|
type: "text",
|
|
21466
21443
|
class: "pbx-myPrimaryInput",
|
|
21467
21444
|
name: "video"
|
|
@@ -21550,7 +21527,7 @@ const l5 = { class: "pbx-relative" }, p5 = { class: "pbx-flex pbx-gap-2 pbx-item
|
|
|
21550
21527
|
i.value && i.value.nodeType === 1 && !w.value && !T(t).ElOrFirstChildIsIframe() ? (v(), xt(S5, { key: 3 })) : L("", !0),
|
|
21551
21528
|
i.value ? (v(), C("button", {
|
|
21552
21529
|
key: 4,
|
|
21553
|
-
onClick: K[1] || (K[1] = (...
|
|
21530
|
+
onClick: K[1] || (K[1] = (...lt) => T(t).deleteElementFromDOM && T(t).deleteElementFromDOM(...lt)),
|
|
21554
21531
|
type: "button",
|
|
21555
21532
|
class: "pbx-h-10 pbx-w-10 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-red-500 hover:pbx-fill-white focus-visible:pbx-ring-0"
|
|
21556
21533
|
}, K[10] || (K[10] = [
|
|
@@ -21559,7 +21536,7 @@ const l5 = { class: "pbx-relative" }, p5 = { class: "pbx-flex pbx-gap-2 pbx-item
|
|
|
21559
21536
|
i.value && a.value ? (v(), C("div", {
|
|
21560
21537
|
key: 5,
|
|
21561
21538
|
class: "pbx-h-10 pbx-w-10 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0",
|
|
21562
|
-
onClick: K[2] || (K[2] = (
|
|
21539
|
+
onClick: K[2] || (K[2] = (lt) => T(t).clearHtmlSelection())
|
|
21563
21540
|
}, K[11] || (K[11] = [
|
|
21564
21541
|
b("span", { class: "material-symbols-outlined" }, " close ", -1)
|
|
21565
21542
|
]))) : L("", !0)
|
|
@@ -22220,7 +22197,7 @@ const _5 = { class: "pbx-mb-8" }, z5 = { class: "pbx-grid pbx-grid-cols-1 sm:pbx
|
|
|
22220
22197
|
const e = Wr("CustomMediaComponent"), o = t, i = function() {
|
|
22221
22198
|
o("firstModalButtonSearchComponentsFunction");
|
|
22222
22199
|
};
|
|
22223
|
-
return (n, a) => (v(), xt(
|
|
22200
|
+
return (n, a) => (v(), xt(zr, {
|
|
22224
22201
|
title: r.title,
|
|
22225
22202
|
maxWidth: "6xl",
|
|
22226
22203
|
showModalBuilder: r.show,
|
|
@@ -22358,12 +22335,12 @@ const y3 = ["src"], w3 = {
|
|
|
22358
22335
|
i.value = !1;
|
|
22359
22336
|
};
|
|
22360
22337
|
}, u = async function(x) {
|
|
22361
|
-
o.value = !0, x && typeof x == "string" && x.length > 2 && (await h3(x), await
|
|
22338
|
+
o.value = !0, x && typeof x == "string" && x.length > 2 && (await h3(x), await Se(200), o.value = !1);
|
|
22362
22339
|
};
|
|
22363
22340
|
return (x, g) => (v(), C("div", null, [
|
|
22364
22341
|
Ct(b("div", null, g[0] || (g[0] = [
|
|
22365
22342
|
b("div", { class: "pbx-flex pbx-items-center pbx-justify-center pbx-mt-4 pbx-min-h-80" }, [
|
|
22366
|
-
b("div", { class: "pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border
|
|
22343
|
+
b("div", { class: "pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]" }, [
|
|
22367
22344
|
b("span", { class: "!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]" }, "Loading...")
|
|
22368
22345
|
])
|
|
22369
22346
|
], -1)
|
|
@@ -22672,7 +22649,7 @@ const y3 = ["src"], w3 = {
|
|
|
22672
22649
|
}, "Select", -1)),
|
|
22673
22650
|
(v(!0), C(dt, null, ht(T(fi).fontDesktop, (k) => (v(), C("option", { key: k }, W(k), 1))), 128))
|
|
22674
22651
|
], 544), [
|
|
22675
|
-
[
|
|
22652
|
+
[Zt, i.value]
|
|
22676
22653
|
])
|
|
22677
22654
|
]),
|
|
22678
22655
|
L("", !0),
|
|
@@ -22690,7 +22667,7 @@ const y3 = ["src"], w3 = {
|
|
|
22690
22667
|
}, "Select", -1)),
|
|
22691
22668
|
(v(!0), C(dt, null, ht(T(Jo).fontWeight, (k) => (v(), C("option", { key: k }, W(k), 1))), 128))
|
|
22692
22669
|
], 544), [
|
|
22693
|
-
[
|
|
22670
|
+
[Zt, s.value]
|
|
22694
22671
|
])
|
|
22695
22672
|
]),
|
|
22696
22673
|
w[31] || (w[31] = b("hr", null, null, -1)),
|
|
@@ -22707,7 +22684,7 @@ const y3 = ["src"], w3 = {
|
|
|
22707
22684
|
}, "Select", -1)),
|
|
22708
22685
|
(v(!0), C(dt, null, ht(T(Jo).fontFamily, (k) => (v(), C("option", { key: k }, W(k), 1))), 128))
|
|
22709
22686
|
], 544), [
|
|
22710
|
-
[
|
|
22687
|
+
[Zt, l.value]
|
|
22711
22688
|
])
|
|
22712
22689
|
]),
|
|
22713
22690
|
w[32] || (w[32] = b("hr", null, null, -1)),
|
|
@@ -22724,7 +22701,7 @@ const y3 = ["src"], w3 = {
|
|
|
22724
22701
|
}, "Select", -1)),
|
|
22725
22702
|
(v(!0), C(dt, null, ht(T(Jo).fontStyle, (k) => (v(), C("option", { key: k }, W(k), 1))), 128))
|
|
22726
22703
|
], 544), [
|
|
22727
|
-
[
|
|
22704
|
+
[Zt, p.value]
|
|
22728
22705
|
])
|
|
22729
22706
|
])
|
|
22730
22707
|
]),
|
|
@@ -22775,9 +22752,9 @@ const y3 = ["src"], w3 = {
|
|
|
22775
22752
|
disabled: "",
|
|
22776
22753
|
value: ""
|
|
22777
22754
|
}, "Select", -1)),
|
|
22778
|
-
(v(!0), C(dt, null, ht(T(
|
|
22755
|
+
(v(!0), C(dt, null, ht(T(Nr).verticalPadding, (u) => (v(), C("option", { key: u }, W(u), 1))), 128))
|
|
22779
22756
|
], 544), [
|
|
22780
|
-
[
|
|
22757
|
+
[Zt, o.value]
|
|
22781
22758
|
])
|
|
22782
22759
|
]),
|
|
22783
22760
|
m[9] || (m[9] = b("hr", null, null, -1)),
|
|
@@ -22792,9 +22769,9 @@ const y3 = ["src"], w3 = {
|
|
|
22792
22769
|
disabled: "",
|
|
22793
22770
|
value: ""
|
|
22794
22771
|
}, "Select", -1)),
|
|
22795
|
-
(v(!0), C(dt, null, ht(T(
|
|
22772
|
+
(v(!0), C(dt, null, ht(T(Nr).horizontalPadding, (u) => (v(), C("option", { key: u }, W(u), 1))), 128))
|
|
22796
22773
|
], 544), [
|
|
22797
|
-
[
|
|
22774
|
+
[Zt, i.value]
|
|
22798
22775
|
])
|
|
22799
22776
|
])
|
|
22800
22777
|
]),
|
|
@@ -22845,9 +22822,9 @@ const y3 = ["src"], w3 = {
|
|
|
22845
22822
|
disabled: "",
|
|
22846
22823
|
value: ""
|
|
22847
22824
|
}, "Select", -1)),
|
|
22848
|
-
(v(!0), C(dt, null, ht(T(
|
|
22825
|
+
(v(!0), C(dt, null, ht(T(Nr).verticalMargin, (u) => (v(), C("option", { key: u }, W(u), 1))), 128))
|
|
22849
22826
|
], 544), [
|
|
22850
|
-
[
|
|
22827
|
+
[Zt, n.value]
|
|
22851
22828
|
])
|
|
22852
22829
|
]),
|
|
22853
22830
|
m[9] || (m[9] = b("hr", null, null, -1)),
|
|
@@ -22862,9 +22839,9 @@ const y3 = ["src"], w3 = {
|
|
|
22862
22839
|
disabled: "",
|
|
22863
22840
|
value: ""
|
|
22864
22841
|
}, "Select", -1)),
|
|
22865
|
-
(v(!0), C(dt, null, ht(T(
|
|
22842
|
+
(v(!0), C(dt, null, ht(T(Nr).horizontalMargin, (u) => (v(), C("option", { key: u }, W(u), 1))), 128))
|
|
22866
22843
|
], 544), [
|
|
22867
|
-
[
|
|
22844
|
+
[Zt, a.value]
|
|
22868
22845
|
])
|
|
22869
22846
|
])
|
|
22870
22847
|
]),
|
|
@@ -22922,9 +22899,9 @@ const y3 = ["src"], w3 = {
|
|
|
22922
22899
|
disabled: "",
|
|
22923
22900
|
value: ""
|
|
22924
22901
|
}, "Select", -1)),
|
|
22925
|
-
(v(!0), C(dt, null, ht(T(
|
|
22902
|
+
(v(!0), C(dt, null, ht(T(qe).roundedGlobal, (g) => (v(), C("option", { key: g }, W(g), 1))), 128))
|
|
22926
22903
|
], 544), [
|
|
22927
|
-
[
|
|
22904
|
+
[Zt, o.value]
|
|
22928
22905
|
])
|
|
22929
22906
|
]),
|
|
22930
22907
|
x[22] || (x[22] = b("p", { class: "pbx-myPrimaryParagraph pbx-font-medium pbx-py-0 pbx-my-4" }, "Specific", -1)),
|
|
@@ -22939,9 +22916,9 @@ const y3 = ["src"], w3 = {
|
|
|
22939
22916
|
disabled: "",
|
|
22940
22917
|
value: ""
|
|
22941
22918
|
}, "Select", -1)),
|
|
22942
|
-
(v(!0), C(dt, null, ht(T(
|
|
22919
|
+
(v(!0), C(dt, null, ht(T(qe).roundedTopLeft, (g) => (v(), C("option", { key: g }, W(g), 1))), 128))
|
|
22943
22920
|
], 544), [
|
|
22944
|
-
[
|
|
22921
|
+
[Zt, i.value]
|
|
22945
22922
|
])
|
|
22946
22923
|
]),
|
|
22947
22924
|
b("div", Z3, [
|
|
@@ -22955,9 +22932,9 @@ const y3 = ["src"], w3 = {
|
|
|
22955
22932
|
disabled: "",
|
|
22956
22933
|
value: ""
|
|
22957
22934
|
}, "Select", -1)),
|
|
22958
|
-
(v(!0), C(dt, null, ht(T(
|
|
22935
|
+
(v(!0), C(dt, null, ht(T(qe).roundedTopRight, (g) => (v(), C("option", { key: g }, W(g), 1))), 128))
|
|
22959
22936
|
], 544), [
|
|
22960
|
-
[
|
|
22937
|
+
[Zt, n.value]
|
|
22961
22938
|
])
|
|
22962
22939
|
]),
|
|
22963
22940
|
b("div", tk, [
|
|
@@ -22971,9 +22948,9 @@ const y3 = ["src"], w3 = {
|
|
|
22971
22948
|
disabled: "",
|
|
22972
22949
|
value: ""
|
|
22973
22950
|
}, "Select", -1)),
|
|
22974
|
-
(v(!0), C(dt, null, ht(T(
|
|
22951
|
+
(v(!0), C(dt, null, ht(T(qe).roundedBottomLeft, (g) => (v(), C("option", { key: g }, W(g), 1))), 128))
|
|
22975
22952
|
], 544), [
|
|
22976
|
-
[
|
|
22953
|
+
[Zt, a.value]
|
|
22977
22954
|
])
|
|
22978
22955
|
]),
|
|
22979
22956
|
b("div", ek, [
|
|
@@ -22987,9 +22964,9 @@ const y3 = ["src"], w3 = {
|
|
|
22987
22964
|
disabled: "",
|
|
22988
22965
|
value: ""
|
|
22989
22966
|
}, "Select", -1)),
|
|
22990
|
-
(v(!0), C(dt, null, ht(T(
|
|
22967
|
+
(v(!0), C(dt, null, ht(T(qe).roundedBottomRight, (g) => (v(), C("option", { key: g }, W(g), 1))), 128))
|
|
22991
22968
|
], 544), [
|
|
22992
|
-
[
|
|
22969
|
+
[Zt, s.value]
|
|
22993
22970
|
])
|
|
22994
22971
|
])
|
|
22995
22972
|
]),
|
|
@@ -23043,7 +23020,7 @@ const y3 = ["src"], w3 = {
|
|
|
23043
23020
|
}, "Select", -1)),
|
|
23044
23021
|
(v(!0), C(dt, null, ht(T(Yo).borderStyle, (c) => (v(), C("option", { key: c }, W(c), 1))), 128))
|
|
23045
23022
|
], 544), [
|
|
23046
|
-
[
|
|
23023
|
+
[Zt, o.value]
|
|
23047
23024
|
])
|
|
23048
23025
|
]),
|
|
23049
23026
|
b("div", ik, [
|
|
@@ -23059,7 +23036,7 @@ const y3 = ["src"], w3 = {
|
|
|
23059
23036
|
}, "Select", -1)),
|
|
23060
23037
|
(v(!0), C(dt, null, ht(T(Yo).borderWidth, (c) => (v(), C("option", { key: c }, W(c), 1))), 128))
|
|
23061
23038
|
], 544), [
|
|
23062
|
-
[
|
|
23039
|
+
[Zt, i.value]
|
|
23063
23040
|
])
|
|
23064
23041
|
]),
|
|
23065
23042
|
d[15] || (d[15] = b("label", { class: "pbx-myPrimaryInputLabel" }, " Border Color ", -1)),
|
|
@@ -23229,7 +23206,7 @@ const y3 = ["src"], w3 = {
|
|
|
23229
23206
|
// or the specific value that triggers re-render
|
|
23230
23207
|
() => o.getElement,
|
|
23231
23208
|
() => {
|
|
23232
|
-
|
|
23209
|
+
pt(() => {
|
|
23233
23210
|
a.value && (a.value.scrollTop = s);
|
|
23234
23211
|
});
|
|
23235
23212
|
}
|
|
@@ -23324,7 +23301,7 @@ const y3 = ["src"], w3 = {
|
|
|
23324
23301
|
}, Z4 = { class: "pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg" }, tS = { class: "pbx-overflow-x-auto" }, eS = { class: "pbx-w-max" }, rS = { class: "pbx-bg-white pbx-divide-y pbx-divide-gray-200" }, oS = { class: "pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500" }, iS = { class: "pbx-min-w-[30rem] pbx-w-max" }, nS = { key: 0 }, aS = { key: 1 }, sS = { key: 0 }, lS = { class: "pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500" }, pS = { class: "pbx-min-w-[30rem] pbx-w-max" }, dS = { class: "pbx-inline-flex pbx-items-center pbx-px-2.5 pbx-py-0.5 pbx-rounded-full pbx-text-xs pbx-font-medium" }, cS = { class: "pbx-mt-4 pbx-mb-4 pbx-py-8 pbx-px-2 pbx-border pbx-border-solid pbx-border-gray-600 pbx-rounded-xl" }, bS = { class: "pbx-mt-4 pbx-whitespace-pre-wrap pbx-text-white pbx-overflow-hidden pbx-bg-gray-900" }, mS = { class: "pbx-px-4 pbx-pb-8 pbx-pt-4 pbx-text-white pbx-text-xs pbx-break-all" }, uS = { class: "pbx-myPrimaryParagraph pbx-text-xs pbx-text-white" }, xS = {
|
|
23325
23302
|
__name: "PageBuilderSettings",
|
|
23326
23303
|
setup(r) {
|
|
23327
|
-
const t = "3.3.
|
|
23304
|
+
const t = "3.3.53", e = Et, o = S(null), i = $(() => e.getPageBuilderConfig), n = $(() => e.getComponents), a = function(l, p) {
|
|
23328
23305
|
const d = document.createElement("a");
|
|
23329
23306
|
d.setAttribute(
|
|
23330
23307
|
"href",
|
|
@@ -23942,7 +23919,7 @@ const y3 = ["src"], w3 = {
|
|
|
23942
23919
|
n.value = !0, a.value = "delete", s.value = 2, l.value = "Remove all Components", p.value = "Are you sure you want to remove all Components?", d.value = "Close", c.value = null, m.value = "Delete", u.value = function() {
|
|
23943
23920
|
n.value = !1;
|
|
23944
23921
|
}, g.value = async function() {
|
|
23945
|
-
i.value = !0, t.deleteAllComponentsFromDOM(), await t.clearHtmlSelection(), await t.removeCurrentComponentsFromLocalStorage(), await
|
|
23922
|
+
i.value = !0, t.deleteAllComponentsFromDOM(), await t.clearHtmlSelection(), await t.removeCurrentComponentsFromLocalStorage(), await Se(500), n.value = !1, i.value = !1;
|
|
23946
23923
|
};
|
|
23947
23924
|
}, y = S(!1), w = function() {
|
|
23948
23925
|
y.value = !1;
|
|
@@ -24003,7 +23980,7 @@ const y3 = ["src"], w3 = {
|
|
|
24003
23980
|
])
|
|
24004
23981
|
])
|
|
24005
23982
|
]),
|
|
24006
|
-
G(
|
|
23983
|
+
G(zr, {
|
|
24007
23984
|
maxWidth: "5xl",
|
|
24008
23985
|
showModalBuilder: y.value,
|
|
24009
23986
|
title: "Main Settings",
|
|
@@ -24016,7 +23993,7 @@ const y3 = ["src"], w3 = {
|
|
|
24016
23993
|
]),
|
|
24017
23994
|
_: 1
|
|
24018
23995
|
}, 8, ["showModalBuilder"]),
|
|
24019
|
-
G(
|
|
23996
|
+
G(zr, {
|
|
24020
23997
|
maxWidth: "5xl",
|
|
24021
23998
|
showModalBuilder: h.value,
|
|
24022
23999
|
title: "Selected HTML",
|
|
@@ -24064,7 +24041,11 @@ const j6 = {}, V6 = { class: "pbx-bg-white pbx-flex pbx-justify-center pbx-items
|
|
|
24064
24041
|
function W6(r, t) {
|
|
24065
24042
|
return v(), C("div", V6, t[0] || (t[0] = [
|
|
24066
24043
|
b("div", { class: "pbx-absolute pbx-top-1/3" }, [
|
|
24067
|
-
b("div", { class: "pbx-
|
|
24044
|
+
b("div", { class: "pbx-flex pbx-items-center pbx-justify-center pbx-mt-4" }, [
|
|
24045
|
+
b("div", { class: "pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]" }, [
|
|
24046
|
+
b("span", { class: "!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]" }, "Loading...")
|
|
24047
|
+
])
|
|
24048
|
+
])
|
|
24068
24049
|
], -1)
|
|
24069
24050
|
]));
|
|
24070
24051
|
}
|
|
@@ -24115,11 +24096,11 @@ const q6 = /* @__PURE__ */ ns(j6, [["render", W6]]), U6 = { class: "pbx-font-san
|
|
|
24115
24096
|
emits: ["handleClosePageBuilder"],
|
|
24116
24097
|
setup(r, { emit: t }) {
|
|
24117
24098
|
const e = Ot(), o = r, i = pb, n = Et;
|
|
24118
|
-
|
|
24099
|
+
Br("pageBuilderStateStore", n), Br("internalPinia", i), Br("CustomMediaComponent", o.CustomMediaLibraryComponent), Br("CustomBuilderComponents", o.CustomBuilderComponents);
|
|
24119
24100
|
const a = t, s = function() {
|
|
24120
24101
|
a("handleClosePageBuilder");
|
|
24121
24102
|
};
|
|
24122
|
-
|
|
24103
|
+
Br("closeAddComponentModal", () => {
|
|
24123
24104
|
M.value = !1;
|
|
24124
24105
|
});
|
|
24125
24106
|
const p = $(() => n.getBuilderStarted), d = $(() => n.getPageBuilderConfig), c = $(() => n.getMenuRight), m = S(!1), u = function() {
|
|
@@ -24158,46 +24139,46 @@ const q6 = /* @__PURE__ */ ns(j6, [["render", W6]]), U6 = { class: "pbx-font-san
|
|
|
24158
24139
|
});
|
|
24159
24140
|
const K = function(at) {
|
|
24160
24141
|
n.setComponent(at);
|
|
24161
|
-
},
|
|
24162
|
-
ge.value = "warning", Vt.value = !0, fe.value = "Continue Your Work?",
|
|
24142
|
+
}, lt = S(null), gt = $(() => n.getIsLoadingGlobal), ie = $(() => n.getIsSaving), Qe = $(() => n.getIsLoadingResumeEditing), Yt = $(() => n.getIsRestoring), Ze = S(1), ge = S(""), Vt = S(!1), fe = S(""), tr = S(""), he = S(""), er = S(null), Ae = S(null), rr = S(null), Qr = S(null), hr = S(null), Po = async function() {
|
|
24143
|
+
ge.value = "warning", Vt.value = !0, fe.value = "Continue Your Work?", tr.value = "We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?", he.value = "Use Saved Version", er.value = null, Ae.value = "Continue Where I Left Off", rr.value = async function() {
|
|
24163
24144
|
n.setHasLocalDraftForUpdate(!1), Vt.value = !1;
|
|
24164
24145
|
}, Qr.value = function() {
|
|
24165
|
-
},
|
|
24146
|
+
}, hr.value = async function() {
|
|
24166
24147
|
await e.resumeEditingForUpdate(), n.setHasLocalDraftForUpdate(!1), Vt.value = !1;
|
|
24167
24148
|
};
|
|
24168
|
-
}, Ao = S(1),
|
|
24169
|
-
await e.clearHtmlSelection(),
|
|
24170
|
-
|
|
24171
|
-
},
|
|
24149
|
+
}, Ao = S(1), yr = S(""), ze = S(!1), Zr = S(""), to = S(""), ye = S(""), De = S(null), wr = S(null), Fe = S(null), vr = S(null), eo = S(null), Do = async function() {
|
|
24150
|
+
await e.clearHtmlSelection(), yr.value = "success", ze.value = !0, Zr.value = "Do you want to reset this page?", to.value = "Are you sure you want to reset this page? This will overwrite your current changes.", ye.value = "Close", De.value = null, wr.value = "Reset changes", Fe.value = function() {
|
|
24151
|
+
ze.value = !1;
|
|
24152
|
+
}, vr.value = async function() {
|
|
24172
24153
|
}, eo.value = async function() {
|
|
24173
|
-
await e.restoreOriginalContent(),
|
|
24154
|
+
await e.restoreOriginalContent(), ze.value = !1;
|
|
24174
24155
|
};
|
|
24175
|
-
},
|
|
24156
|
+
}, kr = function() {
|
|
24176
24157
|
p.value || (w.value = !0);
|
|
24177
|
-
},
|
|
24158
|
+
}, Sr = S(null);
|
|
24178
24159
|
let bi = null, mi = null;
|
|
24179
24160
|
function No() {
|
|
24180
|
-
const at =
|
|
24161
|
+
const at = Sr.value, D = at && at.querySelector("#editToolbar"), O = z.value;
|
|
24181
24162
|
if (!at || !D) return;
|
|
24182
24163
|
const j = at.querySelector("[selected]");
|
|
24183
24164
|
if (j && typeof j.getBoundingClientRect == "function") {
|
|
24184
|
-
const Y = j.getBoundingClientRect(), st = at.getBoundingClientRect(), nt = Y.left - st.left + Y.width / 2 - D.offsetWidth / 2,
|
|
24185
|
-
D.style.position = "absolute", D.style.left = `${nt}px`, D.style.top = `${
|
|
24165
|
+
const Y = j.getBoundingClientRect(), st = at.getBoundingClientRect(), nt = Y.left - st.left + Y.width / 2 - D.offsetWidth / 2, ne = Y.top - st.top + at.scrollTop - D.offsetHeight - 20, or = Math.max(0, ne);
|
|
24166
|
+
D.style.position = "absolute", D.style.left = `${nt}px`, D.style.top = `${or}px`, D.classList.add("is-visible"), bi = nt, mi = or;
|
|
24186
24167
|
} else O && bi !== null && mi !== null ? (D.style.position = "absolute", D.style.left = `${bi}px`, D.style.top = `${mi}px`, D.classList.add("is-visible")) : D.classList.remove("is-visible");
|
|
24187
24168
|
}
|
|
24188
|
-
return
|
|
24169
|
+
return xr(async () => {
|
|
24189
24170
|
await e.tryMountPendingComponents(), No();
|
|
24190
|
-
const at =
|
|
24171
|
+
const at = Sr.value;
|
|
24191
24172
|
if (!at) return;
|
|
24192
24173
|
new MutationObserver(No).observe(at, {
|
|
24193
24174
|
childList: !0,
|
|
24194
24175
|
subtree: !0,
|
|
24195
24176
|
attributes: !0,
|
|
24196
24177
|
attributeFilter: ["selected"]
|
|
24197
|
-
}), window.addEventListener("scroll", No), window.addEventListener("resize", No), await
|
|
24178
|
+
}), window.addEventListener("scroll", No), window.addEventListener("resize", No), await Se(1e4), kr(), await Se(1e4), kr(), await Se(1e4), kr();
|
|
24198
24179
|
}), (at, D) => (v(), C("div", U6, [
|
|
24199
|
-
gt.value
|
|
24200
|
-
G(
|
|
24180
|
+
gt.value && !w.value ? (v(), xt(q6, { key: 0 })) : L("", !0),
|
|
24181
|
+
G(zr, {
|
|
24201
24182
|
title: "The builder hasn’t started yet",
|
|
24202
24183
|
showModalBuilder: w.value,
|
|
24203
24184
|
onCloseMainModalBuilder: k,
|
|
@@ -24219,7 +24200,7 @@ const q6 = /* @__PURE__ */ ns(j6, [["render", W6]]), U6 = { class: "pbx-font-san
|
|
|
24219
24200
|
CustomBuilderComponents: o.CustomBuilderComponents,
|
|
24220
24201
|
onFirstModalButtonSearchComponentsFunction: H.value
|
|
24221
24202
|
}, null, 8, ["show", "firstButtonText", "title", "CustomBuilderComponents", "onFirstModalButtonSearchComponentsFunction"])) : L("", !0),
|
|
24222
|
-
G(
|
|
24203
|
+
G(zr, {
|
|
24223
24204
|
title: "Preview",
|
|
24224
24205
|
showModalBuilder: m.value,
|
|
24225
24206
|
onCloseMainModalBuilder: h,
|
|
@@ -24230,7 +24211,7 @@ const q6 = /* @__PURE__ */ ns(j6, [["render", W6]]), U6 = { class: "pbx-font-san
|
|
|
24230
24211
|
]),
|
|
24231
24212
|
_: 1
|
|
24232
24213
|
}, 8, ["showModalBuilder"]),
|
|
24233
|
-
G(
|
|
24214
|
+
G(zr, {
|
|
24234
24215
|
title: "Mobile",
|
|
24235
24216
|
showModalBuilder: g.value,
|
|
24236
24217
|
onCloseMainModalBuilder: B,
|
|
@@ -24243,17 +24224,17 @@ const q6 = /* @__PURE__ */ ns(j6, [["render", W6]]), U6 = { class: "pbx-font-san
|
|
|
24243
24224
|
}, 8, ["showModalBuilder"]),
|
|
24244
24225
|
G(vo, {
|
|
24245
24226
|
showDynamicModalBuilder: Vt.value,
|
|
24246
|
-
isLoading:
|
|
24227
|
+
isLoading: Qe.value,
|
|
24247
24228
|
type: ge.value,
|
|
24248
|
-
gridColumnAmount:
|
|
24229
|
+
gridColumnAmount: Ze.value,
|
|
24249
24230
|
title: fe.value,
|
|
24250
|
-
description:
|
|
24231
|
+
description: tr.value,
|
|
24251
24232
|
firstButtonText: he.value,
|
|
24252
|
-
secondButtonText:
|
|
24253
|
-
thirdButtonText:
|
|
24254
|
-
onFirstModalButtonFunctionDynamicModalBuilder:
|
|
24233
|
+
secondButtonText: er.value,
|
|
24234
|
+
thirdButtonText: Ae.value,
|
|
24235
|
+
onFirstModalButtonFunctionDynamicModalBuilder: rr.value,
|
|
24255
24236
|
onSecondModalButtonFunctionDynamicModalBuilder: Qr.value,
|
|
24256
|
-
onThirdModalButtonFunctionDynamicModalBuilder:
|
|
24237
|
+
onThirdModalButtonFunctionDynamicModalBuilder: hr.value
|
|
24257
24238
|
}, {
|
|
24258
24239
|
default: U(() => D[22] || (D[22] = [
|
|
24259
24240
|
b("header", null, null, -1),
|
|
@@ -24263,17 +24244,17 @@ const q6 = /* @__PURE__ */ ns(j6, [["render", W6]]), U6 = { class: "pbx-font-san
|
|
|
24263
24244
|
__: [22]
|
|
24264
24245
|
}, 8, ["showDynamicModalBuilder", "isLoading", "type", "gridColumnAmount", "title", "description", "firstButtonText", "secondButtonText", "thirdButtonText", "onFirstModalButtonFunctionDynamicModalBuilder", "onSecondModalButtonFunctionDynamicModalBuilder", "onThirdModalButtonFunctionDynamicModalBuilder"]),
|
|
24265
24246
|
G(vo, {
|
|
24266
|
-
showDynamicModalBuilder:
|
|
24267
|
-
isLoading:
|
|
24268
|
-
type:
|
|
24247
|
+
showDynamicModalBuilder: ze.value,
|
|
24248
|
+
isLoading: Yt.value,
|
|
24249
|
+
type: yr.value,
|
|
24269
24250
|
gridColumnAmount: Ao.value,
|
|
24270
24251
|
title: Zr.value,
|
|
24271
24252
|
description: to.value,
|
|
24272
24253
|
firstButtonText: ye.value,
|
|
24273
|
-
secondButtonText:
|
|
24274
|
-
thirdButtonText:
|
|
24275
|
-
onFirstModalButtonFunctionDynamicModalBuilder:
|
|
24276
|
-
onSecondModalButtonFunctionDynamicModalBuilder:
|
|
24254
|
+
secondButtonText: De.value,
|
|
24255
|
+
thirdButtonText: wr.value,
|
|
24256
|
+
onFirstModalButtonFunctionDynamicModalBuilder: Fe.value,
|
|
24257
|
+
onSecondModalButtonFunctionDynamicModalBuilder: vr.value,
|
|
24277
24258
|
onThirdModalButtonFunctionDynamicModalBuilder: eo.value
|
|
24278
24259
|
}, {
|
|
24279
24260
|
default: U(() => D[23] || (D[23] = [
|
|
@@ -24287,7 +24268,7 @@ const q6 = /* @__PURE__ */ ns(j6, [["render", W6]]), U6 = { class: "pbx-font-san
|
|
|
24287
24268
|
b("div", K6, [
|
|
24288
24269
|
d.value && d.value.pageBuilderLogo && d.value.pageBuilderLogo.src ? (v(), C("div", {
|
|
24289
24270
|
key: 0,
|
|
24290
|
-
onClick: D[1] || (D[1] =
|
|
24271
|
+
onClick: D[1] || (D[1] = Ne(
|
|
24291
24272
|
async () => {
|
|
24292
24273
|
await T(e).clearHtmlSelection();
|
|
24293
24274
|
},
|
|
@@ -24311,7 +24292,7 @@ const q6 = /* @__PURE__ */ ns(j6, [["render", W6]]), U6 = { class: "pbx-font-san
|
|
|
24311
24292
|
])
|
|
24312
24293
|
])) : L("", !0),
|
|
24313
24294
|
b("div", {
|
|
24314
|
-
onClick: D[4] || (D[4] =
|
|
24295
|
+
onClick: D[4] || (D[4] = Ne(
|
|
24315
24296
|
async () => {
|
|
24316
24297
|
await T(e).clearHtmlSelection();
|
|
24317
24298
|
},
|
|
@@ -24322,19 +24303,19 @@ const q6 = /* @__PURE__ */ ns(j6, [["render", W6]]), U6 = { class: "pbx-font-san
|
|
|
24322
24303
|
b("div", Y6, [
|
|
24323
24304
|
b("button", {
|
|
24324
24305
|
class: "pbx-mySecondaryButton pbx-h-6 pbx-flex pbx-gap-2 pbx-mr-2",
|
|
24325
|
-
onClick: D[2] || (D[2] =
|
|
24306
|
+
onClick: D[2] || (D[2] = Ne(
|
|
24326
24307
|
async () => {
|
|
24327
24308
|
await T(e).clearHtmlSelection(), await T(e).handleManualSave();
|
|
24328
24309
|
},
|
|
24329
24310
|
["stop"]
|
|
24330
24311
|
)),
|
|
24331
24312
|
type: "button",
|
|
24332
|
-
disabled:
|
|
24313
|
+
disabled: ie.value
|
|
24333
24314
|
}, [
|
|
24334
|
-
|
|
24315
|
+
ie.value ? L("", !0) : (v(), C("div", Q6, D[24] || (D[24] = [
|
|
24335
24316
|
b("span", { class: "material-symbols-outlined" }, "save", -1)
|
|
24336
24317
|
]))),
|
|
24337
|
-
|
|
24318
|
+
ie.value ? (v(), C("div", Z6, D[25] || (D[25] = [
|
|
24338
24319
|
b("span", { class: "pbx-relative pbx-flex pbx-size-3" }, [
|
|
24339
24320
|
b("span", { class: "pbx-absolute pbx-inline-flex pbx-h-full pbx-w-full pbx-animate-ping pbx-rounded-full pbx-bg-gray-400 pbx-opacity-75" }),
|
|
24340
24321
|
b("span", { class: "pbx-relative pbx-inline-flex pbx-size-3 pbx-rounded-full pbx-bg-green-200" })
|
|
@@ -24345,19 +24326,19 @@ const q6 = /* @__PURE__ */ ns(j6, [["render", W6]]), U6 = { class: "pbx-font-san
|
|
|
24345
24326
|
d.value && d.value.updateOrCreate && d.value.updateOrCreate.formType === "update" ? (v(), C("button", {
|
|
24346
24327
|
key: 0,
|
|
24347
24328
|
class: "pbx-mySecondaryButton pbx-h-6 pbx-flex pbx-gap-2 lg:mr-2",
|
|
24348
|
-
onClick: D[3] || (D[3] =
|
|
24329
|
+
onClick: D[3] || (D[3] = Ne(
|
|
24349
24330
|
async () => {
|
|
24350
24331
|
await T(e).clearHtmlSelection(), await Do();
|
|
24351
24332
|
},
|
|
24352
24333
|
["stop"]
|
|
24353
24334
|
)),
|
|
24354
24335
|
type: "button",
|
|
24355
|
-
disabled:
|
|
24336
|
+
disabled: Yt.value
|
|
24356
24337
|
}, [
|
|
24357
|
-
|
|
24338
|
+
Yt.value ? L("", !0) : (v(), C("div", eC, D[27] || (D[27] = [
|
|
24358
24339
|
b("span", { class: "material-symbols-outlined" }, " settings_backup_restore ", -1)
|
|
24359
24340
|
]))),
|
|
24360
|
-
|
|
24341
|
+
Yt.value ? (v(), C("div", rC, D[28] || (D[28] = [
|
|
24361
24342
|
b("span", { class: "pbx-relative pbx-flex pbx-size-3" }, [
|
|
24362
24343
|
b("span", { class: "pbx-absolute pbx-inline-flex pbx-h-full pbx-w-full pbx-animate-ping pbx-rounded-full pbx-bg-gray-400 pbx-opacity-75" }),
|
|
24363
24344
|
b("span", { class: "pbx-relative pbx-inline-flex pbx-size-3 pbx-rounded-full pbx-bg-green-200" })
|
|
@@ -24370,7 +24351,7 @@ const q6 = /* @__PURE__ */ ns(j6, [["render", W6]]), U6 = { class: "pbx-font-san
|
|
|
24370
24351
|
])
|
|
24371
24352
|
]),
|
|
24372
24353
|
b("div", {
|
|
24373
|
-
onClick: D[9] || (D[9] =
|
|
24354
|
+
onClick: D[9] || (D[9] = Ne(
|
|
24374
24355
|
async () => {
|
|
24375
24356
|
await T(e).clearHtmlSelection();
|
|
24376
24357
|
},
|
|
@@ -24379,7 +24360,7 @@ const q6 = /* @__PURE__ */ ns(j6, [["render", W6]]), U6 = { class: "pbx-font-san
|
|
|
24379
24360
|
class: "pbx-flex pbx-justify-center pbx-items-center pbx-py-2 pbx-min-h-20 pbx-max-h-20 pbx-w-full"
|
|
24380
24361
|
}, [
|
|
24381
24362
|
b("div", {
|
|
24382
|
-
onClick: D[8] || (D[8] =
|
|
24363
|
+
onClick: D[8] || (D[8] = Ne(
|
|
24383
24364
|
async () => {
|
|
24384
24365
|
await T(e).clearHtmlSelection();
|
|
24385
24366
|
},
|
|
@@ -24424,7 +24405,7 @@ const q6 = /* @__PURE__ */ ns(j6, [["render", W6]]), U6 = { class: "pbx-font-san
|
|
|
24424
24405
|
])
|
|
24425
24406
|
]),
|
|
24426
24407
|
b("div", {
|
|
24427
|
-
onClick: D[11] || (D[11] =
|
|
24408
|
+
onClick: D[11] || (D[11] = Ne(
|
|
24428
24409
|
async () => {
|
|
24429
24410
|
await T(e).clearHtmlSelection();
|
|
24430
24411
|
},
|
|
@@ -24446,7 +24427,7 @@ const q6 = /* @__PURE__ */ ns(j6, [["render", W6]]), U6 = { class: "pbx-font-san
|
|
|
24446
24427
|
]),
|
|
24447
24428
|
b("div", nC, [
|
|
24448
24429
|
b("div", {
|
|
24449
|
-
onClick: D[14] || (D[14] =
|
|
24430
|
+
onClick: D[14] || (D[14] = Ne(
|
|
24450
24431
|
async () => {
|
|
24451
24432
|
await T(e).clearHtmlSelection();
|
|
24452
24433
|
},
|
|
@@ -24468,7 +24449,7 @@ const q6 = /* @__PURE__ */ ns(j6, [["render", W6]]), U6 = { class: "pbx-font-san
|
|
|
24468
24449
|
]))
|
|
24469
24450
|
]),
|
|
24470
24451
|
b("div", {
|
|
24471
|
-
onClick: D[13] || (D[13] =
|
|
24452
|
+
onClick: D[13] || (D[13] = Ne(
|
|
24472
24453
|
async () => {
|
|
24473
24454
|
await T(e).clearHtmlSelection();
|
|
24474
24455
|
},
|
|
@@ -24481,7 +24462,7 @@ const q6 = /* @__PURE__ */ ns(j6, [["render", W6]]), U6 = { class: "pbx-font-san
|
|
|
24481
24462
|
]),
|
|
24482
24463
|
b("main", {
|
|
24483
24464
|
ref_key: "pbxToolBar",
|
|
24484
|
-
ref:
|
|
24465
|
+
ref: Sr,
|
|
24485
24466
|
class: tt(["pbx-flex pbx-flex-col pbx-grow pbx-rounded-tr-2xl pbx-rounded-tl-2xl pbx-border-solid pbx-border pbx-border-gray-200 pbx-items-stretch pbx-h-[100vh]", { "pbx-mr-2": !c.value, "": c.value }])
|
|
24486
24467
|
}, [
|
|
24487
24468
|
b("div", lC, [
|
|
@@ -24499,7 +24480,7 @@ const q6 = /* @__PURE__ */ ns(j6, [["render", W6]]), U6 = { class: "pbx-font-san
|
|
|
24499
24480
|
b("div", dC, [
|
|
24500
24481
|
b("div", {
|
|
24501
24482
|
ref_key: "draggableZone",
|
|
24502
|
-
ref:
|
|
24483
|
+
ref: lt
|
|
24503
24484
|
}, [
|
|
24504
24485
|
(v(!0), C(dt, null, ht(X.value, (O) => (v(), C("div", {
|
|
24505
24486
|
key: O.id,
|
|
@@ -24521,7 +24502,7 @@ const q6 = /* @__PURE__ */ ns(j6, [["render", W6]]), U6 = { class: "pbx-font-san
|
|
|
24521
24502
|
], 2),
|
|
24522
24503
|
c.value ? L("", !0) : (v(), C("div", {
|
|
24523
24504
|
key: 0,
|
|
24524
|
-
onClick: D[18] || (D[18] =
|
|
24505
|
+
onClick: D[18] || (D[18] = Ne(
|
|
24525
24506
|
async () => {
|
|
24526
24507
|
await T(e).clearHtmlSelection();
|
|
24527
24508
|
},
|
|
@@ -24530,7 +24511,7 @@ const q6 = /* @__PURE__ */ ns(j6, [["render", W6]]), U6 = { class: "pbx-font-san
|
|
|
24530
24511
|
class: "pbx-min-w-[3.5rem] pbx-pt-7 pbx-pb-2 pbx-ml-2 pbx-border-l-solid pbx-border-gray-200"
|
|
24531
24512
|
}, [
|
|
24532
24513
|
b("div", {
|
|
24533
|
-
onClick: D[17] || (D[17] =
|
|
24514
|
+
onClick: D[17] || (D[17] = Ne(
|
|
24534
24515
|
async () => {
|
|
24535
24516
|
await T(e).clearHtmlSelection();
|
|
24536
24517
|
},
|