@ebl-vue/editorjs 2.31.10 → 2.31.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editorjs.mjs +861 -816
- package/dist/editorjs.mjs.map +1 -1
- package/dist/editorjs.umd.js +12 -12
- package/dist/editorjs.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/editorjs.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".ce-hint--align-start{text-align:left}.ce-hint--align-center{text-align:center}.ce-hint__description{opacity:.6;margin-top:3px}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
var
|
|
2
|
+
var Be = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
3
3
|
function Ke(n) {
|
|
4
4
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function Vn(n) {
|
|
7
7
|
if (n.__esModule)
|
|
8
8
|
return n;
|
|
9
9
|
var e = n.default;
|
|
@@ -77,8 +77,8 @@ window.requestIdleCallback = window.requestIdleCallback || function(n) {
|
|
|
77
77
|
window.cancelIdleCallback = window.cancelIdleCallback || function(n) {
|
|
78
78
|
clearTimeout(n);
|
|
79
79
|
};
|
|
80
|
-
let
|
|
81
|
-
var
|
|
80
|
+
let Xn = (n = 21) => crypto.getRandomValues(new Uint8Array(n)).reduce((e, t) => (t &= 63, t < 36 ? e += t.toString(36) : t < 62 ? e += (t - 26).toString(36).toUpperCase() : t > 62 ? e += "-" : e += "_", e), "");
|
|
81
|
+
var Ao = /* @__PURE__ */ ((n) => (n.VERBOSE = "VERBOSE", n.INFO = "INFO", n.WARN = "WARN", n.ERROR = "ERROR", n))(Ao || {});
|
|
82
82
|
const y = {
|
|
83
83
|
BACKSPACE: 8,
|
|
84
84
|
TAB: 9,
|
|
@@ -121,7 +121,7 @@ function Oe(n, e, t = "log", o, i = "color: inherit") {
|
|
|
121
121
|
break;
|
|
122
122
|
}
|
|
123
123
|
o && r.push(o);
|
|
124
|
-
const a = "Editor.js 2.31.
|
|
124
|
+
const a = "Editor.js 2.31.17", l = `line-height: 1em;
|
|
125
125
|
color: #006FEA;
|
|
126
126
|
display: inline-block;
|
|
127
127
|
font-size: 11px;
|
|
@@ -141,11 +141,11 @@ Oe.logLevel = "VERBOSE";
|
|
|
141
141
|
function Zn(n) {
|
|
142
142
|
Oe.logLevel = n;
|
|
143
143
|
}
|
|
144
|
-
const
|
|
144
|
+
const I = Oe.bind(window, !1), V = Oe.bind(window, !0);
|
|
145
145
|
function le(n) {
|
|
146
146
|
return Object.prototype.toString.call(n).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function L(n) {
|
|
149
149
|
return le(n) === "function" || le(n) === "asyncfunction";
|
|
150
150
|
}
|
|
151
151
|
function F(n) {
|
|
@@ -163,7 +163,7 @@ function yo(n) {
|
|
|
163
163
|
function wo(n) {
|
|
164
164
|
return le(n) === "undefined";
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function X(n) {
|
|
167
167
|
return n ? Object.keys(n).length === 0 && n.constructor === Object : !0;
|
|
168
168
|
}
|
|
169
169
|
function Po(n) {
|
|
@@ -175,7 +175,7 @@ function Po(n) {
|
|
|
175
175
|
n > 185 && n < 193 || // ;=,-./` (in order)
|
|
176
176
|
n > 218 && n < 223;
|
|
177
177
|
}
|
|
178
|
-
async function
|
|
178
|
+
async function Jn(n, e = () => {
|
|
179
179
|
}, t = () => {
|
|
180
180
|
}) {
|
|
181
181
|
async function o(i, s, r) {
|
|
@@ -190,13 +190,13 @@ async function Qn(n, e = () => {
|
|
|
190
190
|
function No(n) {
|
|
191
191
|
return Array.prototype.slice.call(n);
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function He(n, e) {
|
|
194
194
|
return function() {
|
|
195
195
|
const t = this, o = arguments;
|
|
196
196
|
window.setTimeout(() => n.apply(t, o), e);
|
|
197
197
|
};
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function Qn(n) {
|
|
200
200
|
return n.name.split(".").pop();
|
|
201
201
|
}
|
|
202
202
|
function ei(n) {
|
|
@@ -236,14 +236,14 @@ function ti() {
|
|
|
236
236
|
function Te(n) {
|
|
237
237
|
return n[0].toUpperCase() + n.slice(1);
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function ht(n, ...e) {
|
|
240
240
|
if (!e.length)
|
|
241
241
|
return n;
|
|
242
242
|
const t = e.shift();
|
|
243
243
|
if (F(n) && F(t))
|
|
244
244
|
for (const o in t)
|
|
245
|
-
F(t[o]) ? (n[o] || Object.assign(n, { [o]: {} }),
|
|
246
|
-
return
|
|
245
|
+
F(t[o]) ? (n[o] || Object.assign(n, { [o]: {} }), ht(n[o], t[o])) : Object.assign(n, { [o]: t[o] });
|
|
246
|
+
return ht(n, ...e);
|
|
247
247
|
}
|
|
248
248
|
function vt(n) {
|
|
249
249
|
const e = ti();
|
|
@@ -257,7 +257,7 @@ function oi(n) {
|
|
|
257
257
|
return n.substring(0, 2) === "//" ? window.location.protocol + n : window.location.origin + n;
|
|
258
258
|
}
|
|
259
259
|
function ni() {
|
|
260
|
-
return
|
|
260
|
+
return Xn(10);
|
|
261
261
|
}
|
|
262
262
|
function ii(n) {
|
|
263
263
|
window.open(n, "_blank");
|
|
@@ -265,9 +265,9 @@ function ii(n) {
|
|
|
265
265
|
function si(n = "") {
|
|
266
266
|
return `${n}${Math.floor(Math.random() * 1e8).toString(16)}`;
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function ut(n, e, t) {
|
|
269
269
|
const o = `«${e}» is deprecated and will be removed in the next major release. Please use the «${t}» instead.`;
|
|
270
|
-
n &&
|
|
270
|
+
n && V(o, "warn");
|
|
271
271
|
}
|
|
272
272
|
function me(n, e, t) {
|
|
273
273
|
const o = t.value ? "value" : "get", i = t[o], s = `#${e}Cache`;
|
|
@@ -290,7 +290,7 @@ function ri(n, e) {
|
|
|
290
290
|
const t = Array.isArray(n) || F(n), o = Array.isArray(e) || F(e);
|
|
291
291
|
return t || o ? JSON.stringify(n) === JSON.stringify(e) : n === e;
|
|
292
292
|
}
|
|
293
|
-
class
|
|
293
|
+
class h {
|
|
294
294
|
/**
|
|
295
295
|
* Check if passed tag has no closed tag
|
|
296
296
|
*
|
|
@@ -431,7 +431,7 @@ class u {
|
|
|
431
431
|
* @param holder - element where to find inputs
|
|
432
432
|
*/
|
|
433
433
|
static findAllInputs(e) {
|
|
434
|
-
return No(e.querySelectorAll(
|
|
434
|
+
return No(e.querySelectorAll(h.allInputsSelector)).reduce((t, o) => h.isNativeInput(o) || h.containsOnlyInlineElements(o) ? [...t, o] : [...t, ...h.getDeepestBlockElements(o)], []);
|
|
435
435
|
}
|
|
436
436
|
/**
|
|
437
437
|
* Search for deepest node which is Leaf.
|
|
@@ -448,7 +448,7 @@ class u {
|
|
|
448
448
|
const o = t ? "lastChild" : "firstChild", i = t ? "previousSibling" : "nextSibling";
|
|
449
449
|
if (e && e.nodeType === Node.ELEMENT_NODE && e[o]) {
|
|
450
450
|
let s = e[o];
|
|
451
|
-
if (
|
|
451
|
+
if (h.isSingleTag(s) && !h.isNativeInput(s) && !h.isLineBreakTag(s))
|
|
452
452
|
if (s[i])
|
|
453
453
|
s = s[i];
|
|
454
454
|
else if (s.parentNode[i])
|
|
@@ -510,7 +510,7 @@ class u {
|
|
|
510
510
|
*/
|
|
511
511
|
static canSetCaret(e) {
|
|
512
512
|
let t = !0;
|
|
513
|
-
if (
|
|
513
|
+
if (h.isNativeInput(e))
|
|
514
514
|
switch (e.type) {
|
|
515
515
|
case "file":
|
|
516
516
|
case "checkbox":
|
|
@@ -524,7 +524,7 @@ class u {
|
|
|
524
524
|
break;
|
|
525
525
|
}
|
|
526
526
|
else
|
|
527
|
-
t =
|
|
527
|
+
t = h.isContentEditable(e);
|
|
528
528
|
return t;
|
|
529
529
|
}
|
|
530
530
|
/**
|
|
@@ -575,7 +575,7 @@ class u {
|
|
|
575
575
|
* @returns {boolean}
|
|
576
576
|
*/
|
|
577
577
|
static isHTMLString(e) {
|
|
578
|
-
const t =
|
|
578
|
+
const t = h.make("div");
|
|
579
579
|
return t.innerHTML = e, t.childElementCount > 0;
|
|
580
580
|
}
|
|
581
581
|
/**
|
|
@@ -585,7 +585,7 @@ class u {
|
|
|
585
585
|
* @returns {number}
|
|
586
586
|
*/
|
|
587
587
|
static getContentLength(e) {
|
|
588
|
-
return
|
|
588
|
+
return h.isNativeInput(e) ? e.value.length : e.nodeType === Node.TEXT_NODE ? e.length : e.textContent.length;
|
|
589
589
|
}
|
|
590
590
|
/**
|
|
591
591
|
* Return array of names of block html elements
|
|
@@ -644,7 +644,7 @@ class u {
|
|
|
644
644
|
static containsOnlyInlineElements(e) {
|
|
645
645
|
let t;
|
|
646
646
|
te(e) ? (t = document.createElement("div"), t.innerHTML = e) : t = e;
|
|
647
|
-
const o = (i) => !
|
|
647
|
+
const o = (i) => !h.blockElements.includes(i.tagName.toLowerCase()) && Array.from(i.children).every(o);
|
|
648
648
|
return Array.from(t.children).every(o);
|
|
649
649
|
}
|
|
650
650
|
/**
|
|
@@ -654,7 +654,7 @@ class u {
|
|
|
654
654
|
* @returns {HTMLElement[]}
|
|
655
655
|
*/
|
|
656
656
|
static getDeepestBlockElements(e) {
|
|
657
|
-
return
|
|
657
|
+
return h.containsOnlyInlineElements(e) ? [e] : Array.from(e.children).reduce((t, o) => [...t, ...h.getDeepestBlockElements(o)], []);
|
|
658
658
|
}
|
|
659
659
|
/**
|
|
660
660
|
* Helper for get holder from {string} or return HTMLElement
|
|
@@ -736,7 +736,7 @@ function li(n) {
|
|
|
736
736
|
return r + s + i + l + a;
|
|
737
737
|
}
|
|
738
738
|
function Do(n) {
|
|
739
|
-
n.dataset.empty =
|
|
739
|
+
n.dataset.empty = h.isEmpty(n) ? "true" : "false";
|
|
740
740
|
}
|
|
741
741
|
const ci = {
|
|
742
742
|
blockTunes: {
|
|
@@ -765,14 +765,14 @@ const ci = {
|
|
|
765
765
|
Link: "",
|
|
766
766
|
Bold: "",
|
|
767
767
|
Italic: ""
|
|
768
|
-
},
|
|
768
|
+
}, hi = {
|
|
769
769
|
link: {
|
|
770
770
|
"Add a link": ""
|
|
771
771
|
},
|
|
772
772
|
stub: {
|
|
773
773
|
"The block can not be displayed correctly.": ""
|
|
774
774
|
}
|
|
775
|
-
},
|
|
775
|
+
}, ui = {
|
|
776
776
|
delete: {
|
|
777
777
|
Delete: "",
|
|
778
778
|
"Click to delete": ""
|
|
@@ -786,9 +786,9 @@ const ci = {
|
|
|
786
786
|
}, Fo = {
|
|
787
787
|
ui: ci,
|
|
788
788
|
toolNames: di,
|
|
789
|
-
tools:
|
|
790
|
-
blockTunes:
|
|
791
|
-
},
|
|
789
|
+
tools: hi,
|
|
790
|
+
blockTunes: ui
|
|
791
|
+
}, Ho = class ue {
|
|
792
792
|
/**
|
|
793
793
|
* Type-safe translation for internal UI texts:
|
|
794
794
|
* Perform translation of the string by namespace and a key
|
|
@@ -798,7 +798,7 @@ const ci = {
|
|
|
798
798
|
* @param dictKey - dictionary key. Better to use default locale original text
|
|
799
799
|
*/
|
|
800
800
|
static ui(e, t) {
|
|
801
|
-
return
|
|
801
|
+
return ue._t(e, t);
|
|
802
802
|
}
|
|
803
803
|
/**
|
|
804
804
|
* Translate for external strings that is not presented in default dictionary.
|
|
@@ -808,7 +808,7 @@ const ci = {
|
|
|
808
808
|
* @param dictKey - dictionary key. Better to use default locale original text
|
|
809
809
|
*/
|
|
810
810
|
static t(e, t) {
|
|
811
|
-
return
|
|
811
|
+
return ue._t(e, t);
|
|
812
812
|
}
|
|
813
813
|
/**
|
|
814
814
|
* Adjust module for using external dictionary
|
|
@@ -816,7 +816,7 @@ const ci = {
|
|
|
816
816
|
* @param dictionary - new messages list to override default
|
|
817
817
|
*/
|
|
818
818
|
static setDictionary(e) {
|
|
819
|
-
|
|
819
|
+
ue.currentDictionary = e;
|
|
820
820
|
}
|
|
821
821
|
/**
|
|
822
822
|
* Perform translation both for internal and external namespaces
|
|
@@ -826,7 +826,7 @@ const ci = {
|
|
|
826
826
|
* @param dictKey - dictionary key. Better to use default locale original text
|
|
827
827
|
*/
|
|
828
828
|
static _t(e, t) {
|
|
829
|
-
const o =
|
|
829
|
+
const o = ue.getNamespace(e);
|
|
830
830
|
return !o || !o[t] ? t : o[t];
|
|
831
831
|
}
|
|
832
832
|
/**
|
|
@@ -835,12 +835,12 @@ const ci = {
|
|
|
835
835
|
* @param namespace - path to section
|
|
836
836
|
*/
|
|
837
837
|
static getNamespace(e) {
|
|
838
|
-
return e.split(".").reduce((o, i) => !o || !Object.keys(o).length ? {} : o[i],
|
|
838
|
+
return e.split(".").reduce((o, i) => !o || !Object.keys(o).length ? {} : o[i], ue.currentDictionary);
|
|
839
839
|
}
|
|
840
840
|
};
|
|
841
|
-
|
|
842
|
-
let N =
|
|
843
|
-
class
|
|
841
|
+
Ho.currentDictionary = Fo;
|
|
842
|
+
let N = Ho;
|
|
843
|
+
class jo extends Error {
|
|
844
844
|
}
|
|
845
845
|
class _e {
|
|
846
846
|
constructor() {
|
|
@@ -876,7 +876,7 @@ class _e {
|
|
|
876
876
|
* @param data - subscribers get this data when they were fired
|
|
877
877
|
*/
|
|
878
878
|
emit(e, t) {
|
|
879
|
-
|
|
879
|
+
X(this.subscribers) || !this.subscribers[e] || this.subscribers[e].reduce((o, i) => {
|
|
880
880
|
const s = i(o);
|
|
881
881
|
return s !== void 0 ? s : o;
|
|
882
882
|
}, t);
|
|
@@ -906,7 +906,7 @@ class _e {
|
|
|
906
906
|
this.subscribers = {};
|
|
907
907
|
}
|
|
908
908
|
}
|
|
909
|
-
function
|
|
909
|
+
function Q(n) {
|
|
910
910
|
Object.setPrototypeOf(this, {
|
|
911
911
|
/**
|
|
912
912
|
* Block id
|
|
@@ -1246,7 +1246,7 @@ class b {
|
|
|
1246
1246
|
if (!e)
|
|
1247
1247
|
return null;
|
|
1248
1248
|
const t = e.anchorNode;
|
|
1249
|
-
return t ?
|
|
1249
|
+
return t ? h.isElement(t) ? t : t.parentElement : null;
|
|
1250
1250
|
}
|
|
1251
1251
|
/**
|
|
1252
1252
|
* Returns selection offset according to the anchor node
|
|
@@ -1338,9 +1338,9 @@ class b {
|
|
|
1338
1338
|
if (e && e.type !== "Control")
|
|
1339
1339
|
return e = e, t = e.createRange(), o.x = t.boundingLeft, o.y = t.boundingTop, o.width = t.boundingWidth, o.height = t.boundingHeight, o;
|
|
1340
1340
|
if (!window.getSelection)
|
|
1341
|
-
return
|
|
1341
|
+
return I("Method window.getSelection is not supported", "warn"), o;
|
|
1342
1342
|
if (e = window.getSelection(), e.rangeCount === null || isNaN(e.rangeCount))
|
|
1343
|
-
return
|
|
1343
|
+
return I("Method SelectionUtils.rangeCount is not supported", "warn"), o;
|
|
1344
1344
|
if (e.rangeCount === 0)
|
|
1345
1345
|
return o;
|
|
1346
1346
|
if (t = e.getRangeAt(0).cloneRange(), t.getBoundingClientRect && (o = t.getBoundingClientRect()), o.x === 0 && o.y === 0) {
|
|
@@ -1378,7 +1378,7 @@ class b {
|
|
|
1378
1378
|
*/
|
|
1379
1379
|
static setCursor(e, t = 0) {
|
|
1380
1380
|
const o = document.createRange(), i = window.getSelection();
|
|
1381
|
-
return
|
|
1381
|
+
return h.isNativeInput(e) ? h.canSetCaret(e) ? (e.focus(), e.selectionStart = e.selectionEnd = t, e.getBoundingClientRect()) : void 0 : (o.setStart(e, t), o.setEnd(e, t), i.removeAllRanges(), i.addRange(o), o.getBoundingClientRect());
|
|
1382
1382
|
}
|
|
1383
1383
|
/**
|
|
1384
1384
|
* Check if current range exists and belongs to container
|
|
@@ -1396,7 +1396,7 @@ class b {
|
|
|
1396
1396
|
const e = b.range;
|
|
1397
1397
|
if (e === null)
|
|
1398
1398
|
return;
|
|
1399
|
-
const t =
|
|
1399
|
+
const t = h.make("span", "codex-editor__fake-cursor");
|
|
1400
1400
|
t.dataset.mutationFree = "true", e.collapse(), e.insertNode(t);
|
|
1401
1401
|
}
|
|
1402
1402
|
/**
|
|
@@ -1405,7 +1405,7 @@ class b {
|
|
|
1405
1405
|
* @param el - where to check
|
|
1406
1406
|
*/
|
|
1407
1407
|
static isFakeCursorInsideContainer(e) {
|
|
1408
|
-
return
|
|
1408
|
+
return h.find(e, ".codex-editor__fake-cursor") !== null;
|
|
1409
1409
|
}
|
|
1410
1410
|
/**
|
|
1411
1411
|
* Removes fake cursor from a container
|
|
@@ -1413,7 +1413,7 @@ class b {
|
|
|
1413
1413
|
* @param container - container to look for
|
|
1414
1414
|
*/
|
|
1415
1415
|
static removeFakeCursor(e = document.body) {
|
|
1416
|
-
const t =
|
|
1416
|
+
const t = h.find(e, ".codex-editor__fake-cursor");
|
|
1417
1417
|
t && t.remove();
|
|
1418
1418
|
}
|
|
1419
1419
|
/**
|
|
@@ -1499,9 +1499,9 @@ function gt(n, e) {
|
|
|
1499
1499
|
if (!n.conversionConfig)
|
|
1500
1500
|
return !1;
|
|
1501
1501
|
const t = n.conversionConfig[e];
|
|
1502
|
-
return
|
|
1502
|
+
return L(t) || te(t);
|
|
1503
1503
|
}
|
|
1504
|
-
function
|
|
1504
|
+
function je(n, e) {
|
|
1505
1505
|
return gt(n.tool, e);
|
|
1506
1506
|
}
|
|
1507
1507
|
function Wo(n, e) {
|
|
@@ -1513,7 +1513,7 @@ async function Yo(n, e) {
|
|
|
1513
1513
|
if (!gt(r, "import") || r.toolbox === void 0)
|
|
1514
1514
|
return s;
|
|
1515
1515
|
const a = r.toolbox.filter((l) => {
|
|
1516
|
-
if (
|
|
1516
|
+
if (X(l) || l.icon === void 0)
|
|
1517
1517
|
return !1;
|
|
1518
1518
|
if (l.data !== void 0) {
|
|
1519
1519
|
if (Wo(l.data, o))
|
|
@@ -1529,19 +1529,19 @@ async function Yo(n, e) {
|
|
|
1529
1529
|
}, []);
|
|
1530
1530
|
}
|
|
1531
1531
|
function xo(n, e) {
|
|
1532
|
-
return n.mergeable ? n.name === e.name ? !0 :
|
|
1532
|
+
return n.mergeable ? n.name === e.name ? !0 : je(e, "export") && je(n, "import") : !1;
|
|
1533
1533
|
}
|
|
1534
1534
|
function fi(n, e) {
|
|
1535
1535
|
const t = e == null ? void 0 : e.export;
|
|
1536
|
-
return
|
|
1536
|
+
return L(t) ? t(n) : te(t) ? n[t] : (t !== void 0 && I("Conversion «export» property must be a string or function. String means key of saved data object to export. Function should export processed string to export."), "");
|
|
1537
1537
|
}
|
|
1538
|
-
function
|
|
1538
|
+
function Co(n, e, t) {
|
|
1539
1539
|
const o = e == null ? void 0 : e.import;
|
|
1540
|
-
return
|
|
1540
|
+
return L(o) ? o(n, t) : te(o) ? {
|
|
1541
1541
|
[o]: n
|
|
1542
|
-
} : (o !== void 0 &&
|
|
1542
|
+
} : (o !== void 0 && I("Conversion «import» property must be a string or function. String means key of tool data to import. Function accepts a imported string and return composed tool data."), {});
|
|
1543
1543
|
}
|
|
1544
|
-
var
|
|
1544
|
+
var M = /* @__PURE__ */ ((n) => (n.Default = "default", n.Separator = "separator", n.Html = "html", n))(M || {}), ee = /* @__PURE__ */ ((n) => (n.APPEND_CALLBACK = "appendCallback", n.RENDERED = "rendered", n.MOVED = "moved", n.UPDATED = "updated", n.REMOVED = "removed", n.ON_PASTE = "onPaste", n))(ee || {});
|
|
1545
1545
|
class D extends _e {
|
|
1546
1546
|
/**
|
|
1547
1547
|
* @param options - block constructor options
|
|
@@ -1571,12 +1571,12 @@ class D extends _e {
|
|
|
1571
1571
|
...Array.from(g),
|
|
1572
1572
|
...Array.from(f),
|
|
1573
1573
|
v
|
|
1574
|
-
].some((
|
|
1574
|
+
].some((x) => (h.isElement(x) || (x = x.parentElement), x && x.closest('[data-mutation-free="true"]') !== null));
|
|
1575
1575
|
})), d && (this.dropInputsCache(), this.updateCurrentInput(), this.toggleInputsEmptyMark(), this.call(
|
|
1576
1576
|
"updated"
|
|
1577
1577
|
/* UPDATED */
|
|
1578
1578
|
), this.emit("didMutated", this));
|
|
1579
|
-
}, this.name = o.name, this.id = e, this.settings = o.settings, this.config = o.settings.config || {}, this.editorEventBus = r || null, this.blockAPI = new
|
|
1579
|
+
}, this.name = o.name, this.id = e, this.settings = o.settings, this.config = o.settings.config || {}, this.editorEventBus = r || null, this.blockAPI = new Q(this), this.tool = o, this.toolInstance = o.create(t, this.blockAPI, i), this.tunes = o.tunes, this.composeTunes(s), this.holder = this.compose(), window.requestIdleCallback(() => {
|
|
1580
1580
|
this.watchBlockMutations(), this.addInputEvents(), this.toggleInputsEmptyMark();
|
|
1581
1581
|
});
|
|
1582
1582
|
}
|
|
@@ -1600,7 +1600,7 @@ class D extends _e {
|
|
|
1600
1600
|
get inputs() {
|
|
1601
1601
|
if (this.cachedInputs.length !== 0)
|
|
1602
1602
|
return this.cachedInputs;
|
|
1603
|
-
const e =
|
|
1603
|
+
const e = h.findAllInputs(this.holder);
|
|
1604
1604
|
return this.inputIndex > e.length - 1 && (this.inputIndex = e.length - 1), this.cachedInputs = e, e;
|
|
1605
1605
|
}
|
|
1606
1606
|
/**
|
|
@@ -1654,7 +1654,7 @@ class D extends _e {
|
|
|
1654
1654
|
* @returns {object}
|
|
1655
1655
|
*/
|
|
1656
1656
|
get data() {
|
|
1657
|
-
return this.save().then((e) => e && !
|
|
1657
|
+
return this.save().then((e) => e && !X(e.data) ? e.data : {});
|
|
1658
1658
|
}
|
|
1659
1659
|
/**
|
|
1660
1660
|
* Returns tool's sanitizer config
|
|
@@ -1671,7 +1671,7 @@ class D extends _e {
|
|
|
1671
1671
|
* @returns {boolean}
|
|
1672
1672
|
*/
|
|
1673
1673
|
get mergeable() {
|
|
1674
|
-
return
|
|
1674
|
+
return L(this.toolInstance.merge);
|
|
1675
1675
|
}
|
|
1676
1676
|
/**
|
|
1677
1677
|
* If Block contains inputs, it is focusable
|
|
@@ -1685,7 +1685,7 @@ class D extends _e {
|
|
|
1685
1685
|
* @returns {boolean}
|
|
1686
1686
|
*/
|
|
1687
1687
|
get isEmpty() {
|
|
1688
|
-
const e =
|
|
1688
|
+
const e = h.isEmpty(this.pluginsContent, "/"), t = !this.hasMedia;
|
|
1689
1689
|
return e && t;
|
|
1690
1690
|
}
|
|
1691
1691
|
/**
|
|
@@ -1767,15 +1767,15 @@ class D extends _e {
|
|
|
1767
1767
|
* @param {object} params - method argument
|
|
1768
1768
|
*/
|
|
1769
1769
|
call(e, t) {
|
|
1770
|
-
if (
|
|
1771
|
-
e === "appendCallback" &&
|
|
1770
|
+
if (L(this.toolInstance[e])) {
|
|
1771
|
+
e === "appendCallback" && I(
|
|
1772
1772
|
"`appendCallback` hook is deprecated and will be removed in the next major release. Use `rendered` hook instead",
|
|
1773
1773
|
"warn"
|
|
1774
1774
|
);
|
|
1775
1775
|
try {
|
|
1776
1776
|
this.toolInstance[e].call(this.toolInstance, t);
|
|
1777
1777
|
} catch (o) {
|
|
1778
|
-
|
|
1778
|
+
I(`Error during '${e}' call: ${o.message}`, "error");
|
|
1779
1779
|
}
|
|
1780
1780
|
}
|
|
1781
1781
|
}
|
|
@@ -1799,11 +1799,11 @@ class D extends _e {
|
|
|
1799
1799
|
...this.tunesInstances.entries(),
|
|
1800
1800
|
...this.defaultTunesInstances.entries()
|
|
1801
1801
|
].forEach(([s, r]) => {
|
|
1802
|
-
if (
|
|
1802
|
+
if (L(r.save))
|
|
1803
1803
|
try {
|
|
1804
1804
|
t[s] = r.save();
|
|
1805
1805
|
} catch (a) {
|
|
1806
|
-
|
|
1806
|
+
I(`Tune ${r.constructor.name} save method throws an Error %o`, "warn", a);
|
|
1807
1807
|
}
|
|
1808
1808
|
});
|
|
1809
1809
|
const o = window.performance.now();
|
|
@@ -1815,7 +1815,7 @@ class D extends _e {
|
|
|
1815
1815
|
tunes: t,
|
|
1816
1816
|
time: i - o
|
|
1817
1817
|
})).catch((s) => {
|
|
1818
|
-
|
|
1818
|
+
I(`Saving process for ${this.name} tool failed due to the ${s}`, "log", "red");
|
|
1819
1819
|
});
|
|
1820
1820
|
}
|
|
1821
1821
|
/**
|
|
@@ -1836,15 +1836,15 @@ class D extends _e {
|
|
|
1836
1836
|
*/
|
|
1837
1837
|
getTunes() {
|
|
1838
1838
|
const e = [], t = [], o = typeof this.toolInstance.renderSettings == "function" ? this.toolInstance.renderSettings() : [];
|
|
1839
|
-
return
|
|
1840
|
-
type:
|
|
1839
|
+
return h.isElement(o) ? e.push({
|
|
1840
|
+
type: M.Html,
|
|
1841
1841
|
element: o
|
|
1842
1842
|
}) : Array.isArray(o) ? e.push(...o) : e.push(o), [
|
|
1843
1843
|
...this.tunesInstances.values(),
|
|
1844
1844
|
...this.defaultTunesInstances.values()
|
|
1845
1845
|
].map((s) => s.render()).forEach((s) => {
|
|
1846
|
-
|
|
1847
|
-
type:
|
|
1846
|
+
h.isElement(s) ? t.push({
|
|
1847
|
+
type: M.Html,
|
|
1848
1848
|
element: s
|
|
1849
1849
|
}) : Array.isArray(s) ? t.push(...s) : t.push(s);
|
|
1850
1850
|
}), {
|
|
@@ -1856,7 +1856,7 @@ class D extends _e {
|
|
|
1856
1856
|
* Update current input index with selection anchor node
|
|
1857
1857
|
*/
|
|
1858
1858
|
updateCurrentInput() {
|
|
1859
|
-
this.currentInput =
|
|
1859
|
+
this.currentInput = h.isNativeInput(document.activeElement) || !b.anchorNode ? document.activeElement : b.anchorNode;
|
|
1860
1860
|
}
|
|
1861
1861
|
/**
|
|
1862
1862
|
* Allows to say Editor that Block was changed. Used to manually trigger Editor's 'onChange' callback
|
|
@@ -1869,7 +1869,7 @@ class D extends _e {
|
|
|
1869
1869
|
* Call Tool instance destroy method
|
|
1870
1870
|
*/
|
|
1871
1871
|
destroy() {
|
|
1872
|
-
this.unwatchBlockMutations(), this.removeInputEvents(), super.destroy(),
|
|
1872
|
+
this.unwatchBlockMutations(), this.removeInputEvents(), super.destroy(), L(this.toolInstance.destroy) && this.toolInstance.destroy();
|
|
1873
1873
|
}
|
|
1874
1874
|
/**
|
|
1875
1875
|
* Tool could specify several entries to be displayed at the Toolbox (for example, "Heading 1", "Heading 2", "Heading 3")
|
|
@@ -1895,15 +1895,15 @@ class D extends _e {
|
|
|
1895
1895
|
* @returns {HTMLDivElement}
|
|
1896
1896
|
*/
|
|
1897
1897
|
compose() {
|
|
1898
|
-
const e =
|
|
1898
|
+
const e = h.make("div", D.CSS.wrapper), t = h.make("div", D.CSS.content), o = this.toolInstance.render();
|
|
1899
1899
|
e.dataset.id = this.id, this.toolRenderedElement = o, t.appendChild(this.toolRenderedElement);
|
|
1900
1900
|
let i = t;
|
|
1901
1901
|
return [...this.tunesInstances.values(), ...this.defaultTunesInstances.values()].forEach((s) => {
|
|
1902
|
-
if (
|
|
1902
|
+
if (L(s.wrap))
|
|
1903
1903
|
try {
|
|
1904
1904
|
i = s.wrap(i);
|
|
1905
1905
|
} catch (r) {
|
|
1906
|
-
|
|
1906
|
+
I(`Tune ${s.constructor.name} wrap method throws an Error %o`, "warn", r);
|
|
1907
1907
|
}
|
|
1908
1908
|
}), e.appendChild(i), e;
|
|
1909
1909
|
}
|
|
@@ -1925,7 +1925,7 @@ class D extends _e {
|
|
|
1925
1925
|
*/
|
|
1926
1926
|
addInputEvents() {
|
|
1927
1927
|
this.inputs.forEach((e) => {
|
|
1928
|
-
e.addEventListener("focus", this.handleFocus),
|
|
1928
|
+
e.addEventListener("focus", this.handleFocus), h.isNativeInput(e) && e.addEventListener("input", this.didMutated);
|
|
1929
1929
|
});
|
|
1930
1930
|
}
|
|
1931
1931
|
/**
|
|
@@ -1933,7 +1933,7 @@ class D extends _e {
|
|
|
1933
1933
|
*/
|
|
1934
1934
|
removeInputEvents() {
|
|
1935
1935
|
this.inputs.forEach((e) => {
|
|
1936
|
-
e.removeEventListener("focus", this.handleFocus),
|
|
1936
|
+
e.removeEventListener("focus", this.handleFocus), h.isNativeInput(e) && e.removeEventListener("input", this.didMutated);
|
|
1937
1937
|
});
|
|
1938
1938
|
}
|
|
1939
1939
|
/**
|
|
@@ -1991,7 +1991,7 @@ class gi extends E {
|
|
|
1991
1991
|
needToFocus: s,
|
|
1992
1992
|
replace: r
|
|
1993
1993
|
});
|
|
1994
|
-
return new
|
|
1994
|
+
return new Q(l);
|
|
1995
1995
|
}, this.composeBlockData = async (e) => {
|
|
1996
1996
|
const t = this.Editor.Tools.blockTools.get(e);
|
|
1997
1997
|
return new D({
|
|
@@ -2006,19 +2006,19 @@ class gi extends E {
|
|
|
2006
2006
|
if (s === void 0)
|
|
2007
2007
|
throw new Error(`Block with id "${e}" not found`);
|
|
2008
2008
|
const r = await i.update(s, t, o);
|
|
2009
|
-
return new
|
|
2009
|
+
return new Q(r);
|
|
2010
2010
|
}, this.convert = async (e, t, o) => {
|
|
2011
|
-
var
|
|
2011
|
+
var u, p;
|
|
2012
2012
|
const { BlockManager: i, Tools: s } = this.Editor, r = i.getBlockById(e);
|
|
2013
2013
|
if (!r)
|
|
2014
2014
|
throw new Error(`Block with id "${e}" not found`);
|
|
2015
2015
|
const a = s.blockTools.get(r.name), l = s.blockTools.get(t);
|
|
2016
2016
|
if (!l)
|
|
2017
2017
|
throw new Error(`Block Tool with type "${t}" not found`);
|
|
2018
|
-
const c = ((
|
|
2018
|
+
const c = ((u = a == null ? void 0 : a.conversionConfig) == null ? void 0 : u.export) !== void 0, d = ((p = l.conversionConfig) == null ? void 0 : p.import) !== void 0;
|
|
2019
2019
|
if (c && d) {
|
|
2020
2020
|
const g = await i.convert(r, t, o);
|
|
2021
|
-
return new
|
|
2021
|
+
return new Q(g);
|
|
2022
2022
|
} else {
|
|
2023
2023
|
const g = [
|
|
2024
2024
|
c ? !1 : Te(r.name),
|
|
@@ -2033,7 +2033,7 @@ class gi extends E {
|
|
|
2033
2033
|
tool: s || this.config.defaultBlock,
|
|
2034
2034
|
data: r
|
|
2035
2035
|
}));
|
|
2036
|
-
return this.Editor.BlockManager.insertMany(o, t), o.map((i) => new
|
|
2036
|
+
return this.Editor.BlockManager.insertMany(o, t), o.map((i) => new Q(i));
|
|
2037
2037
|
};
|
|
2038
2038
|
}
|
|
2039
2039
|
/**
|
|
@@ -2088,7 +2088,7 @@ class gi extends E {
|
|
|
2088
2088
|
getBlockIndex(e) {
|
|
2089
2089
|
const t = this.Editor.BlockManager.getBlockById(e);
|
|
2090
2090
|
if (!t) {
|
|
2091
|
-
|
|
2091
|
+
V("There is no block with id `" + e + "`", "warn");
|
|
2092
2092
|
return;
|
|
2093
2093
|
}
|
|
2094
2094
|
return this.Editor.BlockManager.getBlockIndex(t);
|
|
@@ -2101,10 +2101,10 @@ class gi extends E {
|
|
|
2101
2101
|
getBlockByIndex(e) {
|
|
2102
2102
|
const t = this.Editor.BlockManager.getBlockByIndex(e);
|
|
2103
2103
|
if (t === void 0) {
|
|
2104
|
-
|
|
2104
|
+
V("There is no block at index `" + e + "`", "warn");
|
|
2105
2105
|
return;
|
|
2106
2106
|
}
|
|
2107
|
-
return new
|
|
2107
|
+
return new Q(t);
|
|
2108
2108
|
}
|
|
2109
2109
|
/**
|
|
2110
2110
|
* Returns BlockAPI object by Block id
|
|
@@ -2113,7 +2113,7 @@ class gi extends E {
|
|
|
2113
2113
|
*/
|
|
2114
2114
|
getById(e) {
|
|
2115
2115
|
const t = this.Editor.BlockManager.getBlockById(e);
|
|
2116
|
-
return t === void 0 ? (
|
|
2116
|
+
return t === void 0 ? (V("There is no block with id `" + e + "`", "warn"), null) : new Q(t);
|
|
2117
2117
|
}
|
|
2118
2118
|
/**
|
|
2119
2119
|
* Get Block API object by any child html element
|
|
@@ -2123,10 +2123,10 @@ class gi extends E {
|
|
|
2123
2123
|
getBlockByElement(e) {
|
|
2124
2124
|
const t = this.Editor.BlockManager.getBlock(e);
|
|
2125
2125
|
if (t === void 0) {
|
|
2126
|
-
|
|
2126
|
+
V("There is no block corresponding to element `" + e + "`", "warn");
|
|
2127
2127
|
return;
|
|
2128
2128
|
}
|
|
2129
|
-
return new
|
|
2129
|
+
return new Q(t);
|
|
2130
2130
|
}
|
|
2131
2131
|
/**
|
|
2132
2132
|
* Call Block Manager method that swap Blocks
|
|
@@ -2136,7 +2136,7 @@ class gi extends E {
|
|
|
2136
2136
|
* @deprecated — use 'move' instead
|
|
2137
2137
|
*/
|
|
2138
2138
|
swap(e, t) {
|
|
2139
|
-
|
|
2139
|
+
I(
|
|
2140
2140
|
"`blocks.swap()` method is deprecated and will be removed in the next major release. Use `block.move()` method instead",
|
|
2141
2141
|
"info"
|
|
2142
2142
|
), this.Editor.BlockManager.swap(e, t);
|
|
@@ -2160,7 +2160,7 @@ class gi extends E {
|
|
|
2160
2160
|
const t = this.Editor.BlockManager.getBlockByIndex(e);
|
|
2161
2161
|
this.Editor.BlockManager.removeBlock(t);
|
|
2162
2162
|
} catch (t) {
|
|
2163
|
-
|
|
2163
|
+
V(t, "warn");
|
|
2164
2164
|
return;
|
|
2165
2165
|
}
|
|
2166
2166
|
this.Editor.BlockManager.blocks.length === 0 && this.Editor.BlockManager.insert(), this.Editor.BlockManager.currentBlock && this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock, this.Editor.Caret.positions.END), this.Editor.Toolbar.close();
|
|
@@ -2198,7 +2198,7 @@ class gi extends E {
|
|
|
2198
2198
|
* @deprecated Use BlockAPI interface to stretch Blocks
|
|
2199
2199
|
*/
|
|
2200
2200
|
stretchBlock(e, t = !0) {
|
|
2201
|
-
|
|
2201
|
+
ut(
|
|
2202
2202
|
!0,
|
|
2203
2203
|
"blocks.stretchBlock()",
|
|
2204
2204
|
"BlockAPI"
|
|
@@ -2214,7 +2214,7 @@ class gi extends E {
|
|
|
2214
2214
|
* @deprecated with insert() method
|
|
2215
2215
|
*/
|
|
2216
2216
|
insertNewBlock() {
|
|
2217
|
-
|
|
2217
|
+
I("Method blocks.insertNewBlock() is deprecated and it will be removed in the next major release. Use blocks.insert() instead.", "warn"), this.insert();
|
|
2218
2218
|
}
|
|
2219
2219
|
/**
|
|
2220
2220
|
* Validated block index and throws an error if it's invalid
|
|
@@ -2313,7 +2313,7 @@ class kt extends E {
|
|
|
2313
2313
|
get methods() {
|
|
2314
2314
|
return {
|
|
2315
2315
|
t: () => {
|
|
2316
|
-
|
|
2316
|
+
V("I18n.t() method can be accessed only from Tools", "warn");
|
|
2317
2317
|
}
|
|
2318
2318
|
};
|
|
2319
2319
|
}
|
|
@@ -2521,12 +2521,12 @@ var Ko = { exports: {} };
|
|
|
2521
2521
|
return s.toString = function() {
|
|
2522
2522
|
return this.map(function(r) {
|
|
2523
2523
|
var a = function(l, c) {
|
|
2524
|
-
var d = l[1] || "",
|
|
2525
|
-
if (!
|
|
2524
|
+
var d = l[1] || "", u = l[3];
|
|
2525
|
+
if (!u)
|
|
2526
2526
|
return d;
|
|
2527
2527
|
if (c && typeof btoa == "function") {
|
|
2528
|
-
var p = (f =
|
|
2529
|
-
return "/*# sourceURL=" +
|
|
2528
|
+
var p = (f = u, "/*# sourceMappingURL=data:application/json;charset=utf-8;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(f)))) + " */"), g = u.sources.map(function(v) {
|
|
2529
|
+
return "/*# sourceURL=" + u.sourceRoot + v + " */";
|
|
2530
2530
|
});
|
|
2531
2531
|
return [d].concat(g).concat([p]).join(`
|
|
2532
2532
|
`);
|
|
@@ -2544,8 +2544,8 @@ var Ko = { exports: {} };
|
|
|
2544
2544
|
typeof d == "number" && (l[d] = !0);
|
|
2545
2545
|
}
|
|
2546
2546
|
for (c = 0; c < r.length; c++) {
|
|
2547
|
-
var
|
|
2548
|
-
typeof
|
|
2547
|
+
var u = r[c];
|
|
2548
|
+
typeof u[0] == "number" && l[u[0]] || (a && !u[2] ? u[2] = a : a && (u[2] = "(" + u[2] + ") and (" + a + ")"), s.push(u));
|
|
2549
2549
|
}
|
|
2550
2550
|
}, s;
|
|
2551
2551
|
};
|
|
@@ -2560,51 +2560,51 @@ var Ko = { exports: {} };
|
|
|
2560
2560
|
if (typeof w == "function")
|
|
2561
2561
|
return w();
|
|
2562
2562
|
if (m[w] === void 0) {
|
|
2563
|
-
var
|
|
2564
|
-
return document.querySelector(
|
|
2563
|
+
var C = (function(O) {
|
|
2564
|
+
return document.querySelector(O);
|
|
2565
2565
|
}).call(this, w);
|
|
2566
|
-
if (window.HTMLIFrameElement &&
|
|
2566
|
+
if (window.HTMLIFrameElement && C instanceof window.HTMLIFrameElement)
|
|
2567
2567
|
try {
|
|
2568
|
-
|
|
2568
|
+
C = C.contentDocument.head;
|
|
2569
2569
|
} catch {
|
|
2570
|
-
|
|
2570
|
+
C = null;
|
|
2571
2571
|
}
|
|
2572
|
-
m[w] =
|
|
2572
|
+
m[w] = C;
|
|
2573
2573
|
}
|
|
2574
2574
|
return m[w];
|
|
2575
2575
|
};
|
|
2576
|
-
}(), d = null,
|
|
2576
|
+
}(), d = null, u = 0, p = [], g = i(5);
|
|
2577
2577
|
function f(k, m) {
|
|
2578
2578
|
for (var w = 0; w < k.length; w++) {
|
|
2579
|
-
var
|
|
2580
|
-
if (
|
|
2581
|
-
|
|
2582
|
-
for (var
|
|
2583
|
-
|
|
2584
|
-
for (;
|
|
2585
|
-
|
|
2579
|
+
var C = k[w], O = a[C.id];
|
|
2580
|
+
if (O) {
|
|
2581
|
+
O.refs++;
|
|
2582
|
+
for (var S = 0; S < O.parts.length; S++)
|
|
2583
|
+
O.parts[S](C.parts[S]);
|
|
2584
|
+
for (; S < C.parts.length; S++)
|
|
2585
|
+
O.parts.push(H(C.parts[S], m));
|
|
2586
2586
|
} else {
|
|
2587
2587
|
var R = [];
|
|
2588
|
-
for (
|
|
2589
|
-
R.push(
|
|
2590
|
-
a[
|
|
2588
|
+
for (S = 0; S < C.parts.length; S++)
|
|
2589
|
+
R.push(H(C.parts[S], m));
|
|
2590
|
+
a[C.id] = { id: C.id, refs: 1, parts: R };
|
|
2591
2591
|
}
|
|
2592
2592
|
}
|
|
2593
2593
|
}
|
|
2594
2594
|
function v(k, m) {
|
|
2595
|
-
for (var w = [],
|
|
2596
|
-
var
|
|
2597
|
-
|
|
2595
|
+
for (var w = [], C = {}, O = 0; O < k.length; O++) {
|
|
2596
|
+
var S = k[O], R = m.base ? S[0] + m.base : S[0], T = { css: S[1], media: S[2], sourceMap: S[3] };
|
|
2597
|
+
C[R] ? C[R].parts.push(T) : w.push(C[R] = { id: R, parts: [T] });
|
|
2598
2598
|
}
|
|
2599
2599
|
return w;
|
|
2600
2600
|
}
|
|
2601
|
-
function
|
|
2601
|
+
function B(k, m) {
|
|
2602
2602
|
var w = c(k.insertInto);
|
|
2603
2603
|
if (!w)
|
|
2604
2604
|
throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
|
|
2605
|
-
var
|
|
2605
|
+
var C = p[p.length - 1];
|
|
2606
2606
|
if (k.insertAt === "top")
|
|
2607
|
-
|
|
2607
|
+
C ? C.nextSibling ? w.insertBefore(m, C.nextSibling) : w.appendChild(m) : w.insertBefore(m, w.firstChild), p.push(m);
|
|
2608
2608
|
else if (k.insertAt === "bottom")
|
|
2609
2609
|
w.appendChild(m);
|
|
2610
2610
|
else {
|
|
@@ -2615,68 +2615,68 @@ var Ko = { exports: {} };
|
|
|
2615
2615
|
Must be 'top', 'bottom', or Object.
|
|
2616
2616
|
(https://github.com/webpack-contrib/style-loader#insertat)
|
|
2617
2617
|
`);
|
|
2618
|
-
var
|
|
2619
|
-
w.insertBefore(m,
|
|
2618
|
+
var O = c(k.insertInto + " " + k.insertAt.before);
|
|
2619
|
+
w.insertBefore(m, O);
|
|
2620
2620
|
}
|
|
2621
2621
|
}
|
|
2622
|
-
function
|
|
2622
|
+
function x(k) {
|
|
2623
2623
|
if (k.parentNode === null)
|
|
2624
2624
|
return !1;
|
|
2625
2625
|
k.parentNode.removeChild(k);
|
|
2626
2626
|
var m = p.indexOf(k);
|
|
2627
2627
|
m >= 0 && p.splice(m, 1);
|
|
2628
2628
|
}
|
|
2629
|
-
function
|
|
2629
|
+
function _(k) {
|
|
2630
2630
|
var m = document.createElement("style");
|
|
2631
|
-
return k.attrs.type === void 0 && (k.attrs.type = "text/css"), q(m, k.attrs),
|
|
2631
|
+
return k.attrs.type === void 0 && (k.attrs.type = "text/css"), q(m, k.attrs), B(k, m), m;
|
|
2632
2632
|
}
|
|
2633
2633
|
function q(k, m) {
|
|
2634
2634
|
Object.keys(m).forEach(function(w) {
|
|
2635
2635
|
k.setAttribute(w, m[w]);
|
|
2636
2636
|
});
|
|
2637
2637
|
}
|
|
2638
|
-
function
|
|
2639
|
-
var w,
|
|
2638
|
+
function H(k, m) {
|
|
2639
|
+
var w, C, O, S;
|
|
2640
2640
|
if (m.transform && k.css) {
|
|
2641
|
-
if (!(
|
|
2641
|
+
if (!(S = m.transform(k.css)))
|
|
2642
2642
|
return function() {
|
|
2643
2643
|
};
|
|
2644
|
-
k.css =
|
|
2644
|
+
k.css = S;
|
|
2645
2645
|
}
|
|
2646
2646
|
if (m.singleton) {
|
|
2647
|
-
var R =
|
|
2648
|
-
w = d || (d =
|
|
2647
|
+
var R = u++;
|
|
2648
|
+
w = d || (d = _(m)), C = ie.bind(null, w, R, !1), O = ie.bind(null, w, R, !0);
|
|
2649
2649
|
} else
|
|
2650
|
-
k.sourceMap && typeof URL == "function" && typeof URL.createObjectURL == "function" && typeof URL.revokeObjectURL == "function" && typeof Blob == "function" && typeof btoa == "function" ? (w = function(
|
|
2650
|
+
k.sourceMap && typeof URL == "function" && typeof URL.createObjectURL == "function" && typeof URL.revokeObjectURL == "function" && typeof Blob == "function" && typeof btoa == "function" ? (w = function(T) {
|
|
2651
2651
|
var Y = document.createElement("link");
|
|
2652
|
-
return
|
|
2653
|
-
}(m),
|
|
2652
|
+
return T.attrs.type === void 0 && (T.attrs.type = "text/css"), T.attrs.rel = "stylesheet", q(Y, T.attrs), B(T, Y), Y;
|
|
2653
|
+
}(m), C = (function(T, Y, ve) {
|
|
2654
2654
|
var se = ve.css, tt = ve.sourceMap, Yn = Y.convertToAbsoluteUrls === void 0 && tt;
|
|
2655
2655
|
(Y.convertToAbsoluteUrls || Yn) && (se = g(se)), tt && (se += `
|
|
2656
2656
|
/*# sourceMappingURL=data:application/json;base64,` + btoa(unescape(encodeURIComponent(JSON.stringify(tt)))) + " */");
|
|
2657
|
-
var Kn = new Blob([se], { type: "text/css" }), ko =
|
|
2658
|
-
|
|
2659
|
-
}).bind(null, w, m),
|
|
2660
|
-
|
|
2661
|
-
}) : (w =
|
|
2657
|
+
var Kn = new Blob([se], { type: "text/css" }), ko = T.href;
|
|
2658
|
+
T.href = URL.createObjectURL(Kn), ko && URL.revokeObjectURL(ko);
|
|
2659
|
+
}).bind(null, w, m), O = function() {
|
|
2660
|
+
x(w), w.href && URL.revokeObjectURL(w.href);
|
|
2661
|
+
}) : (w = _(m), C = (function(T, Y) {
|
|
2662
2662
|
var ve = Y.css, se = Y.media;
|
|
2663
|
-
if (se &&
|
|
2664
|
-
|
|
2663
|
+
if (se && T.setAttribute("media", se), T.styleSheet)
|
|
2664
|
+
T.styleSheet.cssText = ve;
|
|
2665
2665
|
else {
|
|
2666
|
-
for (;
|
|
2667
|
-
|
|
2668
|
-
|
|
2666
|
+
for (; T.firstChild; )
|
|
2667
|
+
T.removeChild(T.firstChild);
|
|
2668
|
+
T.appendChild(document.createTextNode(ve));
|
|
2669
2669
|
}
|
|
2670
|
-
}).bind(null, w),
|
|
2671
|
-
|
|
2670
|
+
}).bind(null, w), O = function() {
|
|
2671
|
+
x(w);
|
|
2672
2672
|
});
|
|
2673
|
-
return
|
|
2674
|
-
if (
|
|
2675
|
-
if (
|
|
2673
|
+
return C(k), function(T) {
|
|
2674
|
+
if (T) {
|
|
2675
|
+
if (T.css === k.css && T.media === k.media && T.sourceMap === k.sourceMap)
|
|
2676
2676
|
return;
|
|
2677
|
-
|
|
2677
|
+
C(k = T);
|
|
2678
2678
|
} else
|
|
2679
|
-
|
|
2679
|
+
O();
|
|
2680
2680
|
};
|
|
2681
2681
|
}
|
|
2682
2682
|
t.exports = function(k, m) {
|
|
@@ -2684,32 +2684,32 @@ var Ko = { exports: {} };
|
|
|
2684
2684
|
throw new Error("The style-loader cannot be used in a non-browser environment");
|
|
2685
2685
|
(m = m || {}).attrs = typeof m.attrs == "object" ? m.attrs : {}, m.singleton || typeof m.singleton == "boolean" || (m.singleton = l()), m.insertInto || (m.insertInto = "head"), m.insertAt || (m.insertAt = "bottom");
|
|
2686
2686
|
var w = v(k, m);
|
|
2687
|
-
return f(w, m), function(
|
|
2688
|
-
for (var
|
|
2689
|
-
var R = w[
|
|
2690
|
-
(
|
|
2687
|
+
return f(w, m), function(C) {
|
|
2688
|
+
for (var O = [], S = 0; S < w.length; S++) {
|
|
2689
|
+
var R = w[S];
|
|
2690
|
+
(T = a[R.id]).refs--, O.push(T);
|
|
2691
2691
|
}
|
|
2692
|
-
for (
|
|
2693
|
-
var
|
|
2694
|
-
if ((
|
|
2695
|
-
for (var Y = 0; Y <
|
|
2696
|
-
|
|
2697
|
-
delete a[
|
|
2692
|
+
for (C && f(v(C, m), m), S = 0; S < O.length; S++) {
|
|
2693
|
+
var T;
|
|
2694
|
+
if ((T = O[S]).refs === 0) {
|
|
2695
|
+
for (var Y = 0; Y < T.parts.length; Y++)
|
|
2696
|
+
T.parts[Y]();
|
|
2697
|
+
delete a[T.id];
|
|
2698
2698
|
}
|
|
2699
2699
|
}
|
|
2700
2700
|
};
|
|
2701
2701
|
};
|
|
2702
|
-
var z,
|
|
2702
|
+
var z, J = (z = [], function(k, m) {
|
|
2703
2703
|
return z[k] = m, z.filter(Boolean).join(`
|
|
2704
2704
|
`);
|
|
2705
2705
|
});
|
|
2706
|
-
function ie(k, m, w,
|
|
2707
|
-
var
|
|
2706
|
+
function ie(k, m, w, C) {
|
|
2707
|
+
var O = w ? "" : C.css;
|
|
2708
2708
|
if (k.styleSheet)
|
|
2709
|
-
k.styleSheet.cssText =
|
|
2709
|
+
k.styleSheet.cssText = J(m, O);
|
|
2710
2710
|
else {
|
|
2711
|
-
var
|
|
2712
|
-
R[m] && k.removeChild(R[m]), R.length ? k.insertBefore(
|
|
2711
|
+
var S = document.createTextNode(O), R = k.childNodes;
|
|
2712
|
+
R[m] && k.removeChild(R[m]), R.length ? k.insertBefore(S, R[m]) : k.appendChild(S);
|
|
2713
2713
|
}
|
|
2714
2714
|
}
|
|
2715
2715
|
}, function(t, o) {
|
|
@@ -2721,27 +2721,27 @@ var Ko = { exports: {} };
|
|
|
2721
2721
|
return i;
|
|
2722
2722
|
var r = s.protocol + "//" + s.host, a = r + s.pathname.replace(/\/[^\/]*$/, "/");
|
|
2723
2723
|
return i.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(l, c) {
|
|
2724
|
-
var d,
|
|
2724
|
+
var d, u = c.trim().replace(/^"(.*)"$/, function(p, g) {
|
|
2725
2725
|
return g;
|
|
2726
2726
|
}).replace(/^'(.*)'$/, function(p, g) {
|
|
2727
2727
|
return g;
|
|
2728
2728
|
});
|
|
2729
|
-
return /^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(
|
|
2729
|
+
return /^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(u) ? l : (d = u.indexOf("//") === 0 ? u : u.indexOf("/") === 0 ? r + u : a + u.replace(/^\.\//, ""), "url(" + JSON.stringify(d) + ")");
|
|
2730
2730
|
});
|
|
2731
2731
|
};
|
|
2732
2732
|
}, function(t, o, i) {
|
|
2733
|
-
var s, r, a, l, c, d,
|
|
2734
|
-
t.exports = (s = "cdx-notifies", r = "cdx-notify", a = "cdx-notify__cross", l = "cdx-notify__button--confirm", c = "cdx-notify__button--cancel", d = "cdx-notify__input",
|
|
2735
|
-
var v = document.createElement("DIV"),
|
|
2736
|
-
return v.classList.add(r),
|
|
2733
|
+
var s, r, a, l, c, d, u, p, g;
|
|
2734
|
+
t.exports = (s = "cdx-notifies", r = "cdx-notify", a = "cdx-notify__cross", l = "cdx-notify__button--confirm", c = "cdx-notify__button--cancel", d = "cdx-notify__input", u = "cdx-notify__button", p = "cdx-notify__btns-wrapper", { alert: g = function(f) {
|
|
2735
|
+
var v = document.createElement("DIV"), B = document.createElement("DIV"), x = f.message, _ = f.style;
|
|
2736
|
+
return v.classList.add(r), _ && v.classList.add(r + "--" + _), v.innerHTML = x, B.classList.add(a), B.addEventListener("click", v.remove.bind(v)), v.appendChild(B), v;
|
|
2737
2737
|
}, confirm: function(f) {
|
|
2738
|
-
var v = g(f),
|
|
2739
|
-
return
|
|
2738
|
+
var v = g(f), B = document.createElement("div"), x = document.createElement("button"), _ = document.createElement("button"), q = v.querySelector("." + a), H = f.cancelHandler, z = f.okHandler;
|
|
2739
|
+
return B.classList.add(p), x.innerHTML = f.okText || "Confirm", _.innerHTML = f.cancelText || "Cancel", x.classList.add(u), _.classList.add(u), x.classList.add(l), _.classList.add(c), H && typeof H == "function" && (_.addEventListener("click", H), q.addEventListener("click", H)), z && typeof z == "function" && x.addEventListener("click", z), x.addEventListener("click", v.remove.bind(v)), _.addEventListener("click", v.remove.bind(v)), B.appendChild(x), B.appendChild(_), v.appendChild(B), v;
|
|
2740
2740
|
}, prompt: function(f) {
|
|
2741
|
-
var v = g(f),
|
|
2742
|
-
return
|
|
2743
|
-
z(
|
|
2744
|
-
}),
|
|
2741
|
+
var v = g(f), B = document.createElement("div"), x = document.createElement("button"), _ = document.createElement("input"), q = v.querySelector("." + a), H = f.cancelHandler, z = f.okHandler;
|
|
2742
|
+
return B.classList.add(p), x.innerHTML = f.okText || "Ok", x.classList.add(u), x.classList.add(l), _.classList.add(d), f.placeholder && _.setAttribute("placeholder", f.placeholder), f.default && (_.value = f.default), f.inputType && (_.type = f.inputType), H && typeof H == "function" && q.addEventListener("click", H), z && typeof z == "function" && x.addEventListener("click", function() {
|
|
2743
|
+
z(_.value);
|
|
2744
|
+
}), x.addEventListener("click", v.remove.bind(v)), B.appendChild(_), B.appendChild(x), v.appendChild(B), v;
|
|
2745
2745
|
}, getWrapper: function() {
|
|
2746
2746
|
var f = document.createElement("DIV");
|
|
2747
2747
|
return f.classList.add(s), f;
|
|
@@ -2751,7 +2751,7 @@ var Ko = { exports: {} };
|
|
|
2751
2751
|
})(Ko);
|
|
2752
2752
|
var Ei = Ko.exports;
|
|
2753
2753
|
const xi = /* @__PURE__ */ Ke(Ei);
|
|
2754
|
-
class
|
|
2754
|
+
class Ci {
|
|
2755
2755
|
/**
|
|
2756
2756
|
* Show web notification
|
|
2757
2757
|
*
|
|
@@ -2761,7 +2761,7 @@ class Bi {
|
|
|
2761
2761
|
xi.show(e);
|
|
2762
2762
|
}
|
|
2763
2763
|
}
|
|
2764
|
-
class
|
|
2764
|
+
class Bi extends E {
|
|
2765
2765
|
/**
|
|
2766
2766
|
* @param moduleConfiguration - Module Configuration
|
|
2767
2767
|
* @param moduleConfiguration.config - Editor's config
|
|
@@ -2771,7 +2771,7 @@ class Ci extends E {
|
|
|
2771
2771
|
super({
|
|
2772
2772
|
config: e,
|
|
2773
2773
|
eventsDispatcher: t
|
|
2774
|
-
}), this.notifier = new
|
|
2774
|
+
}), this.notifier = new Ci();
|
|
2775
2775
|
}
|
|
2776
2776
|
/**
|
|
2777
2777
|
* Available methods
|
|
@@ -2819,90 +2819,90 @@ class Ti extends E {
|
|
|
2819
2819
|
return this.Editor.ReadOnly.isEnabled;
|
|
2820
2820
|
}
|
|
2821
2821
|
}
|
|
2822
|
-
var
|
|
2822
|
+
var Vo = { exports: {} };
|
|
2823
2823
|
(function(n, e) {
|
|
2824
2824
|
(function(t, o) {
|
|
2825
2825
|
n.exports = o();
|
|
2826
|
-
})(
|
|
2827
|
-
function t(
|
|
2828
|
-
var p =
|
|
2826
|
+
})(Be, function() {
|
|
2827
|
+
function t(u) {
|
|
2828
|
+
var p = u.tags, g = Object.keys(p), f = g.map(function(v) {
|
|
2829
2829
|
return typeof p[v];
|
|
2830
2830
|
}).every(function(v) {
|
|
2831
2831
|
return v === "object" || v === "boolean" || v === "function";
|
|
2832
2832
|
});
|
|
2833
2833
|
if (!f)
|
|
2834
2834
|
throw new Error("The configuration was invalid");
|
|
2835
|
-
this.config =
|
|
2835
|
+
this.config = u;
|
|
2836
2836
|
}
|
|
2837
2837
|
var o = ["P", "LI", "TD", "TH", "DIV", "H1", "H2", "H3", "H4", "H5", "H6", "PRE"];
|
|
2838
|
-
function i(
|
|
2839
|
-
return o.indexOf(
|
|
2838
|
+
function i(u) {
|
|
2839
|
+
return o.indexOf(u.nodeName) !== -1;
|
|
2840
2840
|
}
|
|
2841
2841
|
var s = ["A", "B", "STRONG", "I", "EM", "SUB", "SUP", "U", "STRIKE"];
|
|
2842
|
-
function r(
|
|
2843
|
-
return s.indexOf(
|
|
2842
|
+
function r(u) {
|
|
2843
|
+
return s.indexOf(u.nodeName) !== -1;
|
|
2844
2844
|
}
|
|
2845
|
-
t.prototype.clean = function(
|
|
2845
|
+
t.prototype.clean = function(u) {
|
|
2846
2846
|
const p = document.implementation.createHTMLDocument(), g = p.createElement("div");
|
|
2847
|
-
return g.innerHTML =
|
|
2848
|
-
}, t.prototype._sanitize = function(
|
|
2849
|
-
var g = a(
|
|
2847
|
+
return g.innerHTML = u, this._sanitize(p, g), g.innerHTML;
|
|
2848
|
+
}, t.prototype._sanitize = function(u, p) {
|
|
2849
|
+
var g = a(u, p), f = g.firstChild();
|
|
2850
2850
|
if (f)
|
|
2851
2851
|
do {
|
|
2852
2852
|
if (f.nodeType === Node.TEXT_NODE)
|
|
2853
2853
|
if (f.data.trim() === "" && (f.previousElementSibling && i(f.previousElementSibling) || f.nextElementSibling && i(f.nextElementSibling))) {
|
|
2854
|
-
p.removeChild(f), this._sanitize(
|
|
2854
|
+
p.removeChild(f), this._sanitize(u, p);
|
|
2855
2855
|
break;
|
|
2856
2856
|
} else
|
|
2857
2857
|
continue;
|
|
2858
2858
|
if (f.nodeType === Node.COMMENT_NODE) {
|
|
2859
|
-
p.removeChild(f), this._sanitize(
|
|
2859
|
+
p.removeChild(f), this._sanitize(u, p);
|
|
2860
2860
|
break;
|
|
2861
2861
|
}
|
|
2862
|
-
var v = r(f),
|
|
2863
|
-
v && (
|
|
2864
|
-
var
|
|
2865
|
-
if (z || c(f,
|
|
2862
|
+
var v = r(f), B;
|
|
2863
|
+
v && (B = Array.prototype.some.call(f.childNodes, i));
|
|
2864
|
+
var x = !!p.parentNode, _ = i(p) && i(f) && x, q = f.nodeName.toLowerCase(), H = l(this.config, q, f), z = v && B;
|
|
2865
|
+
if (z || c(f, H) || !this.config.keepNestedBlockElements && _) {
|
|
2866
2866
|
if (!(f.nodeName === "SCRIPT" || f.nodeName === "STYLE"))
|
|
2867
2867
|
for (; f.childNodes.length > 0; )
|
|
2868
2868
|
p.insertBefore(f.childNodes[0], f);
|
|
2869
|
-
p.removeChild(f), this._sanitize(
|
|
2869
|
+
p.removeChild(f), this._sanitize(u, p);
|
|
2870
2870
|
break;
|
|
2871
2871
|
}
|
|
2872
|
-
for (var
|
|
2873
|
-
var ie = f.attributes[
|
|
2874
|
-
d(ie,
|
|
2872
|
+
for (var J = 0; J < f.attributes.length; J += 1) {
|
|
2873
|
+
var ie = f.attributes[J];
|
|
2874
|
+
d(ie, H, f) && (f.removeAttribute(ie.name), J = J - 1);
|
|
2875
2875
|
}
|
|
2876
|
-
this._sanitize(
|
|
2876
|
+
this._sanitize(u, f);
|
|
2877
2877
|
} while (f = g.nextSibling());
|
|
2878
2878
|
};
|
|
2879
|
-
function a(
|
|
2880
|
-
return
|
|
2879
|
+
function a(u, p) {
|
|
2880
|
+
return u.createTreeWalker(
|
|
2881
2881
|
p,
|
|
2882
2882
|
NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT,
|
|
2883
2883
|
null,
|
|
2884
2884
|
!1
|
|
2885
2885
|
);
|
|
2886
2886
|
}
|
|
2887
|
-
function l(
|
|
2888
|
-
return typeof
|
|
2887
|
+
function l(u, p, g) {
|
|
2888
|
+
return typeof u.tags[p] == "function" ? u.tags[p](g) : u.tags[p];
|
|
2889
2889
|
}
|
|
2890
|
-
function c(
|
|
2890
|
+
function c(u, p) {
|
|
2891
2891
|
return typeof p > "u" ? !0 : typeof p == "boolean" ? !p : !1;
|
|
2892
2892
|
}
|
|
2893
|
-
function d(
|
|
2894
|
-
var f =
|
|
2895
|
-
return p === !0 ? !1 : typeof p[f] == "function" ? !p[f](
|
|
2893
|
+
function d(u, p, g) {
|
|
2894
|
+
var f = u.name.toLowerCase();
|
|
2895
|
+
return p === !0 ? !1 : typeof p[f] == "function" ? !p[f](u.value, g) : typeof p[f] > "u" || p[f] === !1 ? !0 : typeof p[f] == "string" ? p[f] !== u.value : !1;
|
|
2896
2896
|
}
|
|
2897
2897
|
return t;
|
|
2898
2898
|
});
|
|
2899
|
-
})(
|
|
2900
|
-
var Si =
|
|
2899
|
+
})(Vo);
|
|
2900
|
+
var Si = Vo.exports;
|
|
2901
2901
|
const Ii = /* @__PURE__ */ Ke(Si);
|
|
2902
2902
|
function yt(n, e) {
|
|
2903
2903
|
return n.map((t) => {
|
|
2904
|
-
const o =
|
|
2905
|
-
return
|
|
2904
|
+
const o = L(e) ? e(t.tool) : e;
|
|
2905
|
+
return X(o) || (t.data = wt(t.data, o)), t;
|
|
2906
2906
|
});
|
|
2907
2907
|
}
|
|
2908
2908
|
function Z(n, e = {}) {
|
|
@@ -2922,7 +2922,7 @@ function _i(n, e) {
|
|
|
2922
2922
|
for (const o in n) {
|
|
2923
2923
|
if (!Object.prototype.hasOwnProperty.call(n, o))
|
|
2924
2924
|
continue;
|
|
2925
|
-
const i = n[o], s =
|
|
2925
|
+
const i = n[o], s = Li(e[o]) ? e[o] : e;
|
|
2926
2926
|
t[o] = wt(i, s);
|
|
2927
2927
|
}
|
|
2928
2928
|
return t;
|
|
@@ -2930,10 +2930,10 @@ function _i(n, e) {
|
|
|
2930
2930
|
function Mi(n, e) {
|
|
2931
2931
|
return F(e) ? Z(n, e) : e === !1 ? Z(n, {}) : n;
|
|
2932
2932
|
}
|
|
2933
|
-
function
|
|
2934
|
-
return F(n) || Gn(n) ||
|
|
2933
|
+
function Li(n) {
|
|
2934
|
+
return F(n) || Gn(n) || L(n);
|
|
2935
2935
|
}
|
|
2936
|
-
class
|
|
2936
|
+
class Ai extends E {
|
|
2937
2937
|
/**
|
|
2938
2938
|
* Available methods
|
|
2939
2939
|
*
|
|
@@ -2973,7 +2973,7 @@ class Pi extends E {
|
|
|
2973
2973
|
*/
|
|
2974
2974
|
save() {
|
|
2975
2975
|
const e = "Editor's content can not be saved in read-only mode";
|
|
2976
|
-
return this.Editor.ReadOnly.isEnabled ? (
|
|
2976
|
+
return this.Editor.ReadOnly.isEnabled ? (V(e, "warn"), Promise.reject(new Error(e))) : this.Editor.Saver.save();
|
|
2977
2977
|
}
|
|
2978
2978
|
}
|
|
2979
2979
|
class Ni extends E {
|
|
@@ -3086,7 +3086,7 @@ class Fi extends E {
|
|
|
3086
3086
|
*/
|
|
3087
3087
|
toggleBlockSettings(e) {
|
|
3088
3088
|
if (this.Editor.BlockManager.currentBlockIndex === -1) {
|
|
3089
|
-
|
|
3089
|
+
V("Could't toggle the Toolbar because there is no block selected ", "warn");
|
|
3090
3090
|
return;
|
|
3091
3091
|
}
|
|
3092
3092
|
e ?? !this.Editor.BlockSettings.opened ? (this.Editor.Toolbar.moveAndOpen(), this.Editor.BlockSettings.open()) : this.Editor.BlockSettings.close();
|
|
@@ -3098,13 +3098,13 @@ class Fi extends E {
|
|
|
3098
3098
|
*/
|
|
3099
3099
|
toggleToolbox(e) {
|
|
3100
3100
|
if (this.Editor.BlockManager.currentBlockIndex === -1) {
|
|
3101
|
-
|
|
3101
|
+
V("Could't toggle the Toolbox because there is no block selected ", "warn");
|
|
3102
3102
|
return;
|
|
3103
3103
|
}
|
|
3104
3104
|
e ?? !this.Editor.Toolbar.toolbox.opened ? (this.Editor.Toolbar.moveAndOpen(), this.Editor.Toolbar.toolbox.open()) : this.Editor.Toolbar.toolbox.close();
|
|
3105
3105
|
}
|
|
3106
3106
|
}
|
|
3107
|
-
var
|
|
3107
|
+
var Xo = { exports: {} };
|
|
3108
3108
|
/*!
|
|
3109
3109
|
* CodeX.Tooltips
|
|
3110
3110
|
*
|
|
@@ -3222,20 +3222,20 @@ var Vo = { exports: {} };
|
|
|
3222
3222
|
this.prepend(document.head, c);
|
|
3223
3223
|
}
|
|
3224
3224
|
placeBottom(a, l) {
|
|
3225
|
-
const c = a.getBoundingClientRect(), d = c.left + a.clientWidth / 2 - this.nodes.wrapper.offsetWidth / 2,
|
|
3226
|
-
this.applyPlacement("bottom", d,
|
|
3225
|
+
const c = a.getBoundingClientRect(), d = c.left + a.clientWidth / 2 - this.nodes.wrapper.offsetWidth / 2, u = c.bottom + window.pageYOffset + this.offsetTop + l.marginTop;
|
|
3226
|
+
this.applyPlacement("bottom", d, u);
|
|
3227
3227
|
}
|
|
3228
3228
|
placeTop(a, l) {
|
|
3229
|
-
const c = a.getBoundingClientRect(), d = c.left + a.clientWidth / 2 - this.nodes.wrapper.offsetWidth / 2,
|
|
3230
|
-
this.applyPlacement("top", d,
|
|
3229
|
+
const c = a.getBoundingClientRect(), d = c.left + a.clientWidth / 2 - this.nodes.wrapper.offsetWidth / 2, u = c.top + window.pageYOffset - this.nodes.wrapper.clientHeight - this.offsetTop;
|
|
3230
|
+
this.applyPlacement("top", d, u);
|
|
3231
3231
|
}
|
|
3232
3232
|
placeLeft(a, l) {
|
|
3233
|
-
const c = a.getBoundingClientRect(), d = c.left - this.nodes.wrapper.offsetWidth - this.offsetLeft - l.marginLeft,
|
|
3234
|
-
this.applyPlacement("left", d,
|
|
3233
|
+
const c = a.getBoundingClientRect(), d = c.left - this.nodes.wrapper.offsetWidth - this.offsetLeft - l.marginLeft, u = c.top + window.pageYOffset + a.clientHeight / 2 - this.nodes.wrapper.offsetHeight / 2;
|
|
3234
|
+
this.applyPlacement("left", d, u);
|
|
3235
3235
|
}
|
|
3236
3236
|
placeRight(a, l) {
|
|
3237
|
-
const c = a.getBoundingClientRect(), d = c.right + this.offsetRight + l.marginRight,
|
|
3238
|
-
this.applyPlacement("right", d,
|
|
3237
|
+
const c = a.getBoundingClientRect(), d = c.right + this.offsetRight + l.marginRight, u = c.top + window.pageYOffset + a.clientHeight / 2 - this.nodes.wrapper.offsetHeight / 2;
|
|
3238
|
+
this.applyPlacement("right", d, u);
|
|
3239
3239
|
}
|
|
3240
3240
|
applyPlacement(a, l, c) {
|
|
3241
3241
|
this.nodes.wrapper.classList.add(this.CSS.placement[a]), this.nodes.wrapper.style.left = l + "px", this.nodes.wrapper.style.top = c + "px";
|
|
@@ -3243,8 +3243,8 @@ var Vo = { exports: {} };
|
|
|
3243
3243
|
make(a, l = null, c = {}) {
|
|
3244
3244
|
const d = document.createElement(a);
|
|
3245
3245
|
Array.isArray(l) ? d.classList.add(...l) : l && d.classList.add(l);
|
|
3246
|
-
for (const
|
|
3247
|
-
c.hasOwnProperty(
|
|
3246
|
+
for (const u in c)
|
|
3247
|
+
c.hasOwnProperty(u) && (d[u] = c[u]);
|
|
3248
3248
|
return d;
|
|
3249
3249
|
}
|
|
3250
3250
|
append(a, l) {
|
|
@@ -3258,12 +3258,12 @@ var Vo = { exports: {} };
|
|
|
3258
3258
|
t.exports = `.ct{z-index:999;opacity:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;-webkit-transition:opacity 50ms ease-in,-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,transform 70ms cubic-bezier(.215,.61,.355,1),-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);will-change:opacity,top,left;-webkit-box-shadow:0 8px 12px 0 rgba(29,32,43,.17),0 4px 5px -3px rgba(5,6,12,.49);box-shadow:0 8px 12px 0 rgba(29,32,43,.17),0 4px 5px -3px rgba(5,6,12,.49);border-radius:9px}.ct,.ct:before{position:absolute;top:0;left:0}.ct:before{content:"";bottom:0;right:0;background-color:#1d202b;z-index:-1;border-radius:4px}@supports(-webkit-mask-box-image:url("")){.ct:before{border-radius:0;-webkit-mask-box-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M10.71 0h2.58c3.02 0 4.64.42 6.1 1.2a8.18 8.18 0 013.4 3.4C23.6 6.07 24 7.7 24 10.71v2.58c0 3.02-.42 4.64-1.2 6.1a8.18 8.18 0 01-3.4 3.4c-1.47.8-3.1 1.21-6.11 1.21H10.7c-3.02 0-4.64-.42-6.1-1.2a8.18 8.18 0 01-3.4-3.4C.4 17.93 0 16.3 0 13.29V10.7c0-3.02.42-4.64 1.2-6.1a8.18 8.18 0 013.4-3.4C6.07.4 7.7 0 10.71 0z"/></svg>') 48% 41% 37.9% 53.3%}}@media (--mobile){.ct{display:none}}.ct__content{padding:6px 10px;color:#cdd1e0;font-size:12px;text-align:center;letter-spacing:.02em;line-height:1em}.ct:after{content:"";width:8px;height:8px;position:absolute;background-color:#1d202b;z-index:-1}.ct--bottom{-webkit-transform:translateY(5px);transform:translateY(5px)}.ct--bottom:after{top:-3px;left:50%;-webkit-transform:translateX(-50%) rotate(-45deg);transform:translateX(-50%) rotate(-45deg)}.ct--top{-webkit-transform:translateY(-5px);transform:translateY(-5px)}.ct--top:after{top:auto;bottom:-3px;left:50%;-webkit-transform:translateX(-50%) rotate(-45deg);transform:translateX(-50%) rotate(-45deg)}.ct--left{-webkit-transform:translateX(-5px);transform:translateX(-5px)}.ct--left:after{top:50%;left:auto;right:0;-webkit-transform:translate(41.6%,-50%) rotate(-45deg);transform:translate(41.6%,-50%) rotate(-45deg)}.ct--right{-webkit-transform:translateX(5px);transform:translateX(5px)}.ct--right:after{top:50%;left:0;-webkit-transform:translate(-41.6%,-50%) rotate(-45deg);transform:translate(-41.6%,-50%) rotate(-45deg)}.ct--shown{opacity:1;-webkit-transform:none;transform:none}`;
|
|
3259
3259
|
}]).default;
|
|
3260
3260
|
});
|
|
3261
|
-
})(
|
|
3262
|
-
var
|
|
3263
|
-
const
|
|
3261
|
+
})(Xo);
|
|
3262
|
+
var Hi = Xo.exports;
|
|
3263
|
+
const ji = /* @__PURE__ */ Ke(Hi);
|
|
3264
3264
|
let W = null;
|
|
3265
3265
|
function Et() {
|
|
3266
|
-
W || (W = new
|
|
3266
|
+
W || (W = new ji());
|
|
3267
3267
|
}
|
|
3268
3268
|
function $i(n, e, t) {
|
|
3269
3269
|
Et(), W == null || W.show(n, e, t);
|
|
@@ -3434,7 +3434,7 @@ const Zo = class Ee {
|
|
|
3434
3434
|
if (this.items.length === 0)
|
|
3435
3435
|
return this.cursor;
|
|
3436
3436
|
let t = this.cursor;
|
|
3437
|
-
return t === -1 ? t = e === Ee.directions.RIGHT ? -1 : 0 : this.items[t].classList.remove(this.focusedCssClass), e === Ee.directions.RIGHT ? t = (t + 1) % this.items.length : t = (this.items.length + t - 1) % this.items.length,
|
|
3437
|
+
return t === -1 ? t = e === Ee.directions.RIGHT ? -1 : 0 : this.items[t].classList.remove(this.focusedCssClass), e === Ee.directions.RIGHT ? t = (t + 1) % this.items.length : t = (this.items.length + t - 1) % this.items.length, h.canSetCaret(this.items[t]) && He(() => b.setCursor(this.items[t]), 50)(), this.items[t].classList.add(this.focusedCssClass), t;
|
|
3438
3438
|
}
|
|
3439
3439
|
};
|
|
3440
3440
|
Zo.directions = {
|
|
@@ -3583,7 +3583,7 @@ class ce {
|
|
|
3583
3583
|
* @param {KeyboardEvent} event - enter keydown event
|
|
3584
3584
|
*/
|
|
3585
3585
|
handleEnterPress(e) {
|
|
3586
|
-
this.activated && (this.iterator.currentItem && (e.stopPropagation(), e.preventDefault(), this.iterator.currentItem.click()),
|
|
3586
|
+
this.activated && (this.iterator.currentItem && (e.stopPropagation(), e.preventDefault(), this.iterator.currentItem.click()), L(this.activateCallback) && this.activateCallback(this.iterator.currentItem));
|
|
3587
3587
|
}
|
|
3588
3588
|
/**
|
|
3589
3589
|
* Fired after flipping in any direction
|
|
@@ -3592,9 +3592,9 @@ class ce {
|
|
|
3592
3592
|
this.iterator.currentItem && this.iterator.currentItem.scrollIntoViewIfNeeded(), this.flipCallbacks.forEach((e) => e());
|
|
3593
3593
|
}
|
|
3594
3594
|
}
|
|
3595
|
-
const Ki = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M9 12L9 7.1C9 7.04477 9.04477 7 9.1 7H10.4C11.5 7 14 7.1 14 9.5C14 9.5 14 12 11 12M9 12V16.8C9 16.9105 9.08954 17 9.2 17H12.5C14 17 15 16 15 14.5C15 11.7046 11 12 11 12M9 12H11"/></svg>', Xi = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7 10L11.8586 14.8586C11.9367 14.9367 12.0633 14.9367 12.1414 14.8586L17 10"/></svg>', Vi = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M14.5 17.5L9.64142 12.6414C9.56331 12.5633 9.56331 12.4367 9.64142 12.3586L14.5 7.5"/></svg>', qi = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M9.58284 17.5L14.4414 12.6414C14.5195 12.5633 14.5195 12.4367 14.4414 12.3586L9.58284 7.5"/></svg>', Zi = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7 15L11.8586 10.1414C11.9367 10.0633 12.0633 10.0633 12.1414 10.1414L17 15"/></svg>', Gi = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8 8L12 12M12 12L16 16M12 12L16 8M12 12L8 16"/></svg>', Qi = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4" stroke="currentColor" stroke-width="2"/></svg>', Ji = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M13.34 10C12.4223 12.7337 11 17 11 17"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M14.21 7H14.2"/></svg>', Co = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7.69998 12.6L7.67896 12.62C6.53993 13.7048 6.52012 15.5155 7.63516 16.625V16.625C8.72293 17.7073 10.4799 17.7102 11.5712 16.6314L13.0263 15.193C14.0703 14.1609 14.2141 12.525 13.3662 11.3266L13.22 11.12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16.22 11.12L16.3564 10.9805C17.2895 10.0265 17.3478 8.5207 16.4914 7.49733V7.49733C15.5691 6.39509 13.9269 6.25143 12.8271 7.17675L11.3901 8.38588C10.0935 9.47674 9.95706 11.4241 11.0888 12.6852L11.12 12.72"/></svg>', es = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M9.40999 7.29999H9.4"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M14.6 7.29999H14.59"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M9.30999 12H9.3"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M14.6 12H14.59"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M9.40999 16.7H9.4"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M14.6 16.7H14.59"/></svg>', ts = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M12 7V12M12 17V12M17 12H12M12 12H7"/></svg>', Go = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M11.5 17.5L5 11M5 11V15.5M5 11H9.5"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M12.5 6.5L19 13M19 13V8.5M19 13H14.5"/></svg>', os = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><circle cx="10.5" cy="10.5" r="5.5" stroke="currentColor" stroke-width="2"/><line x1="15.4142" x2="19" y1="15" y2="18.5858" stroke="currentColor" stroke-linecap="round" stroke-width="2"/></svg>', ns = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M15.7795 11.5C15.7795 11.5 16.053 11.1962 16.5497 10.6722C17.4442 9.72856 17.4701 8.2475 16.5781 7.30145V7.30145C15.6482 6.31522 14.0873 6.29227 13.1288 7.25073L11.8796 8.49999"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8.24517 12.3883C8.24517 12.3883 7.97171 12.6922 7.47504 13.2161C6.58051 14.1598 6.55467 15.6408 7.44666 16.5869V16.5869C8.37653 17.5731 9.93744 17.5961 10.8959 16.6376L12.1452 15.3883"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M17.7802 15.1032L16.597 14.9422C16.0109 14.8624 15.4841 15.3059 15.4627 15.8969L15.4199 17.0818"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6.39064 9.03238L7.58432 9.06668C8.17551 9.08366 8.6522 8.58665 8.61056 7.99669L8.5271 6.81397"/><line x1="12.1142" x2="11.7" y1="12.2" y2="11.7858" stroke="currentColor" stroke-linecap="round" stroke-width="2"/></svg>', is = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><rect width="14" height="14" x="5" y="5" stroke="currentColor" stroke-width="2" rx="4"/><line x1="12" x2="12" y1="9" y2="12" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M12 15.02V15.01"/></svg>', ss = "__", rs = "--";
|
|
3595
|
+
const Ki = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M19 17V10.2135C19 10.1287 18.9011 10.0824 18.836 10.1367L16 12.5"/></svg>', Vi = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16 11C16 10 19 9.5 19 12C19 13.9771 16.0684 13.9997 16.0012 16.8981C15.9999 16.9533 16.0448 17 16.1 17L19.3 17"/></svg>', Xi = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16 11C16 10.5 16.8323 10 17.6 10C18.3677 10 19.5 10.311 19.5 11.5C19.5 12.5315 18.7474 12.9022 18.548 12.9823C18.5378 12.9864 18.5395 13.0047 18.5503 13.0063C18.8115 13.0456 20 13.3065 20 14.8C20 16 19.5 17 17.8 17C17.8 17 16 17 16 16.3"/></svg>', qi = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M18 10L15.2834 14.8511C15.246 14.9178 15.294 15 15.3704 15C16.8489 15 18.7561 15 20.2 15M19 17C19 15.7187 19 14.8813 19 13.6"/></svg>', Zi = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16 15.9C16 15.9 16.3768 17 17.8 17C19.5 17 20 15.6199 20 14.7C20 12.7323 17.6745 12.0486 16.1635 12.9894C16.094 13.0327 16 12.9846 16 12.9027V10.1C16 10.0448 16.0448 10 16.1 10H19.8"/></svg>', Gi = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M19.5 10C16.5 10.5 16 13.3285 16 15M16 15V15C16 16.1046 16.8954 17 18 17H18.3246C19.3251 17 20.3191 16.3492 20.2522 15.3509C20.0612 12.4958 16 12.6611 16 15Z"/></svg>', Ji = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M9 12L9 7.1C9 7.04477 9.04477 7 9.1 7H10.4C11.5 7 14 7.1 14 9.5C14 9.5 14 12 11 12M9 12V16.8C9 16.9105 9.08954 17 9.2 17H12.5C14 17 15 16 15 14.5C15 11.7046 11 12 11 12M9 12H11"/></svg>', Qi = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M9.2 12L11.0586 13.8586C11.1367 13.9367 11.2633 13.9367 11.3414 13.8586L14.7 10.5"/><rect width="14" height="14" x="5" y="5" stroke="currentColor" stroke-width="2" rx="4"/></svg>', es = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7 10L11.8586 14.8586C11.9367 14.9367 12.0633 14.9367 12.1414 14.8586L17 10"/></svg>', ts = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M14.5 17.5L9.64142 12.6414C9.56331 12.5633 9.56331 12.4367 9.64142 12.3586L14.5 7.5"/></svg>', os = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M9.58284 17.5L14.4414 12.6414C14.5195 12.5633 14.5195 12.4367 14.4414 12.3586L9.58284 7.5"/></svg>', ns = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7 15L11.8586 10.1414C11.9367 10.0633 12.0633 10.0633 12.1414 10.1414L17 15"/></svg>', is = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8 8L12 12M12 12L16 16M12 12L16 8M12 12L8 16"/></svg>', ss = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><line x1="6" x2="10" y1="12" y2="12" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><line x1="14" x2="18" y1="12" y2="12" stroke="currentColor" stroke-linecap="round" stroke-width="2"/></svg>', rs = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4" stroke="currentColor" stroke-width="2"/></svg>', as = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M13.34 10C12.4223 12.7337 11 17 11 17"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M14.21 7H14.2"/></svg>', Bo = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7.69998 12.6L7.67896 12.62C6.53993 13.7048 6.52012 15.5155 7.63516 16.625V16.625C8.72293 17.7073 10.4799 17.7102 11.5712 16.6314L13.0263 15.193C14.0703 14.1609 14.2141 12.525 13.3662 11.3266L13.22 11.12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16.22 11.12L16.3564 10.9805C17.2895 10.0265 17.3478 8.5207 16.4914 7.49733V7.49733C15.5691 6.39509 13.9269 6.25143 12.8271 7.17675L11.3901 8.38588C10.0935 9.47674 9.95706 11.4241 11.0888 12.6852L11.12 12.72"/></svg>', ls = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><line x1="9" x2="19" y1="7" y2="7" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><line x1="9" x2="19" y1="12" y2="12" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><line x1="9" x2="19" y1="17" y2="17" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M5.00001 17H4.99002"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M5.00001 12H4.99002"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M5.00001 7H4.99002"/></svg>', cs = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><line x1="12" x2="19" y1="7" y2="7" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><line x1="12" x2="19" y1="12" y2="12" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><line x1="12" x2="19" y1="17" y2="17" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7.79999 14L7.79999 7.2135C7.79999 7.12872 7.7011 7.0824 7.63597 7.13668L4.79999 9.5"/></svg>', ds = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M9.40999 7.29999H9.4"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M14.6 7.29999H14.59"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M9.30999 12H9.3"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M14.6 12H14.59"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M9.40999 16.7H9.4"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M14.6 16.7H14.59"/></svg>', hs = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><rect width="14" height="14" x="5" y="5" stroke="currentColor" stroke-width="2" rx="4"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5.13968 15.32L8.69058 11.5661C9.02934 11.2036 9.48873 11 9.96774 11C10.4467 11 10.9061 11.2036 11.2449 11.5661L15.3871 16M13.5806 14.0664L15.0132 12.533C15.3519 12.1705 15.8113 11.9668 16.2903 11.9668C16.7693 11.9668 17.2287 12.1705 17.5675 12.533L18.841 13.9634"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.7778 9.33331H13.7867"/></svg>', us = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M12 7V12M12 17V12M17 12H12M12 12H7"/></svg>', ps = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 10.8182L9 10.8182C8.80222 10.8182 8.60888 10.7649 8.44443 10.665C8.27998 10.5651 8.15181 10.4231 8.07612 10.257C8.00043 10.0909 7.98063 9.90808 8.01922 9.73174C8.0578 9.55539 8.15304 9.39341 8.29289 9.26627C8.43275 9.13913 8.61093 9.05255 8.80491 9.01747C8.99889 8.98239 9.19996 9.00039 9.38268 9.0692C9.56541 9.13801 9.72159 9.25453 9.83147 9.40403C9.94135 9.55353 10 9.72929 10 9.90909L10 12.1818C10 12.664 9.78929 13.1265 9.41421 13.4675C9.03914 13.8084 8.53043 14 8 14"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 10.8182L15 10.8182C14.8022 10.8182 14.6089 10.7649 14.4444 10.665C14.28 10.5651 14.1518 10.4231 14.0761 10.257C14.0004 10.0909 13.9806 9.90808 14.0192 9.73174C14.0578 9.55539 14.153 9.39341 14.2929 9.26627C14.4327 9.13913 14.6109 9.05255 14.8049 9.01747C14.9989 8.98239 15.2 9.00039 15.3827 9.0692C15.5654 9.13801 15.7216 9.25453 15.8315 9.40403C15.9414 9.55353 16 9.72929 16 9.90909L16 12.1818C16 12.664 15.7893 13.1265 15.4142 13.4675C15.0391 13.8084 14.5304 14 14 14"/></svg>', Go = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M11.5 17.5L5 11M5 11V15.5M5 11H9.5"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M12.5 6.5L19 13M19 13V8.5M19 13H14.5"/></svg>', fs = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><circle cx="10.5" cy="10.5" r="5.5" stroke="currentColor" stroke-width="2"/><line x1="15.4142" x2="19" y1="15" y2="18.5858" stroke="currentColor" stroke-linecap="round" stroke-width="2"/></svg>', gs = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-width="2" d="M10 5V18.5"/><path stroke="currentColor" stroke-width="2" d="M5 10H19"/><rect width="14" height="14" x="5" y="5" stroke="currentColor" stroke-width="2" rx="4"/></svg>', ms = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8 9V7.2C8 7.08954 8.08954 7 8.2 7L12 7M16 9V7.2C16 7.08954 15.9105 7 15.8 7L12 7M12 7L12 17M12 17H10M12 17H14"/></svg>', bs = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M15.7795 11.5C15.7795 11.5 16.053 11.1962 16.5497 10.6722C17.4442 9.72856 17.4701 8.2475 16.5781 7.30145V7.30145C15.6482 6.31522 14.0873 6.29227 13.1288 7.25073L11.8796 8.49999"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8.24517 12.3883C8.24517 12.3883 7.97171 12.6922 7.47504 13.2161C6.58051 14.1598 6.55467 15.6408 7.44666 16.5869V16.5869C8.37653 17.5731 9.93744 17.5961 10.8959 16.6376L12.1452 15.3883"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M17.7802 15.1032L16.597 14.9422C16.0109 14.8624 15.4841 15.3059 15.4627 15.8969L15.4199 17.0818"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6.39064 9.03238L7.58432 9.06668C8.17551 9.08366 8.6522 8.58665 8.61056 7.99669L8.5271 6.81397"/><line x1="12.1142" x2="11.7" y1="12.2" y2="11.7858" stroke="currentColor" stroke-linecap="round" stroke-width="2"/></svg>', vs = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><rect width="14" height="14" x="5" y="5" stroke="currentColor" stroke-width="2" rx="4"/><line x1="12" x2="12" y1="9" y2="12" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M12 15.02V15.01"/></svg>', ks = "__", ys = "--";
|
|
3596
3596
|
function ne(n) {
|
|
3597
|
-
return (e, t) => [[n, e].filter((i) => !!i).join(
|
|
3597
|
+
return (e, t) => [[n, e].filter((i) => !!i).join(ks), t].filter((i) => !!i).join(ys);
|
|
3598
3598
|
}
|
|
3599
3599
|
const ye = ne("ce-hint"), we = {
|
|
3600
3600
|
root: ye(),
|
|
@@ -3603,7 +3603,7 @@ const ye = ne("ce-hint"), we = {
|
|
|
3603
3603
|
title: ye("title"),
|
|
3604
3604
|
description: ye("description")
|
|
3605
3605
|
};
|
|
3606
|
-
class
|
|
3606
|
+
class ws {
|
|
3607
3607
|
/**
|
|
3608
3608
|
* Constructs the hint content instance
|
|
3609
3609
|
*
|
|
@@ -3611,9 +3611,9 @@ class as {
|
|
|
3611
3611
|
*/
|
|
3612
3612
|
constructor(e) {
|
|
3613
3613
|
this.nodes = {
|
|
3614
|
-
root:
|
|
3615
|
-
title:
|
|
3616
|
-
}, this.nodes.root.appendChild(this.nodes.title), e.description !== void 0 && (this.nodes.description =
|
|
3614
|
+
root: h.make("div", [we.root, e.alignment === "center" ? we.alignedCenter : we.alignedStart]),
|
|
3615
|
+
title: h.make("div", we.title, { textContent: e.title })
|
|
3616
|
+
}, this.nodes.root.appendChild(this.nodes.title), e.description !== void 0 && (this.nodes.description = h.make("div", we.description, { textContent: e.description }), this.nodes.root.appendChild(this.nodes.description));
|
|
3617
3617
|
}
|
|
3618
3618
|
/**
|
|
3619
3619
|
* Returns the root element of the hint content
|
|
@@ -3672,7 +3672,7 @@ class xt {
|
|
|
3672
3672
|
* @param hintData - hint data
|
|
3673
3673
|
*/
|
|
3674
3674
|
addHint(e, t) {
|
|
3675
|
-
const o = new
|
|
3675
|
+
const o = new ws(t);
|
|
3676
3676
|
ze(e, o.getElement(), {
|
|
3677
3677
|
placement: t.position,
|
|
3678
3678
|
hidingDelay: 100
|
|
@@ -3725,7 +3725,7 @@ class xt {
|
|
|
3725
3725
|
return this.params === void 0 || !("isActive" in this.params) ? !1 : typeof this.params.isActive == "function" ? this.params.isActive() : this.params.isActive === !0;
|
|
3726
3726
|
}
|
|
3727
3727
|
}
|
|
3728
|
-
const K = ne("ce-popover-item"),
|
|
3728
|
+
const K = ne("ce-popover-item"), A = {
|
|
3729
3729
|
container: K(),
|
|
3730
3730
|
active: K(null, "active"),
|
|
3731
3731
|
disabled: K(null, "disabled"),
|
|
@@ -3755,13 +3755,13 @@ class re extends xt {
|
|
|
3755
3755
|
icon: null
|
|
3756
3756
|
}, this.confirmationState = null, this.removeSpecialFocusBehavior = () => {
|
|
3757
3757
|
var o;
|
|
3758
|
-
(o = this.nodes.root) == null || o.classList.remove(
|
|
3758
|
+
(o = this.nodes.root) == null || o.classList.remove(A.noFocus);
|
|
3759
3759
|
}, this.removeSpecialHoverBehavior = () => {
|
|
3760
3760
|
var o;
|
|
3761
|
-
(o = this.nodes.root) == null || o.classList.remove(
|
|
3761
|
+
(o = this.nodes.root) == null || o.classList.remove(A.noHover);
|
|
3762
3762
|
}, this.onErrorAnimationEnd = () => {
|
|
3763
3763
|
var o, i;
|
|
3764
|
-
(o = this.nodes.icon) == null || o.classList.remove(
|
|
3764
|
+
(o = this.nodes.icon) == null || o.classList.remove(A.wobbleAnimation), (i = this.nodes.icon) == null || i.removeEventListener("animationend", this.onErrorAnimationEnd);
|
|
3765
3765
|
}, this.nodes.root = this.make(e, t);
|
|
3766
3766
|
}
|
|
3767
3767
|
/**
|
|
@@ -3792,7 +3792,7 @@ class re extends xt {
|
|
|
3792
3792
|
* True if item is focused in keyboard navigation process
|
|
3793
3793
|
*/
|
|
3794
3794
|
get isFocused() {
|
|
3795
|
-
return this.nodes.root === null ? !1 : this.nodes.root.classList.contains(
|
|
3795
|
+
return this.nodes.root === null ? !1 : this.nodes.root.classList.contains(A.focused);
|
|
3796
3796
|
}
|
|
3797
3797
|
/**
|
|
3798
3798
|
* Returns popover item root element
|
|
@@ -3817,7 +3817,7 @@ class re extends xt {
|
|
|
3817
3817
|
*/
|
|
3818
3818
|
toggleActive(e) {
|
|
3819
3819
|
var t;
|
|
3820
|
-
(t = this.nodes.root) == null || t.classList.toggle(
|
|
3820
|
+
(t = this.nodes.root) == null || t.classList.toggle(A.active, e);
|
|
3821
3821
|
}
|
|
3822
3822
|
/**
|
|
3823
3823
|
* Toggles item hidden state
|
|
@@ -3826,7 +3826,7 @@ class re extends xt {
|
|
|
3826
3826
|
*/
|
|
3827
3827
|
toggleHidden(e) {
|
|
3828
3828
|
var t;
|
|
3829
|
-
(t = this.nodes.root) == null || t.classList.toggle(
|
|
3829
|
+
(t = this.nodes.root) == null || t.classList.toggle(A.hidden, e);
|
|
3830
3830
|
}
|
|
3831
3831
|
/**
|
|
3832
3832
|
* Resets popover item to its original state
|
|
@@ -3848,18 +3848,18 @@ class re extends xt {
|
|
|
3848
3848
|
*/
|
|
3849
3849
|
make(e, t) {
|
|
3850
3850
|
var s, r;
|
|
3851
|
-
const o = (t == null ? void 0 : t.wrapperTag) || "div", i =
|
|
3851
|
+
const o = (t == null ? void 0 : t.wrapperTag) || "div", i = h.make(o, A.container, {
|
|
3852
3852
|
type: o === "button" ? "button" : void 0
|
|
3853
3853
|
});
|
|
3854
|
-
return e.name && (i.dataset.itemName = e.name), this.nodes.icon =
|
|
3855
|
-
innerHTML: e.icon ||
|
|
3856
|
-
}), i.appendChild(this.nodes.icon), e.title !== void 0 && i.appendChild(
|
|
3854
|
+
return e.name && (i.dataset.itemName = e.name), this.nodes.icon = h.make("div", [A.icon, A.iconTool], {
|
|
3855
|
+
innerHTML: e.icon || rs
|
|
3856
|
+
}), i.appendChild(this.nodes.icon), e.title !== void 0 && i.appendChild(h.make("div", A.title, {
|
|
3857
3857
|
innerHTML: e.title || ""
|
|
3858
|
-
})), e.secondaryLabel && i.appendChild(
|
|
3858
|
+
})), e.secondaryLabel && i.appendChild(h.make("div", A.secondaryTitle, {
|
|
3859
3859
|
textContent: e.secondaryLabel
|
|
3860
|
-
})), this.hasChildren && i.appendChild(
|
|
3861
|
-
innerHTML:
|
|
3862
|
-
})), this.isActive && i.classList.add(
|
|
3860
|
+
})), this.hasChildren && i.appendChild(h.make("div", [A.icon, A.iconChevronRight], {
|
|
3861
|
+
innerHTML: os
|
|
3862
|
+
})), this.isActive && i.classList.add(A.active), e.isDisabled && i.classList.add(A.disabled), e.hint !== void 0 && ((s = t == null ? void 0 : t.hint) == null ? void 0 : s.enabled) !== !1 && this.addHint(i, {
|
|
3863
3863
|
...e.hint,
|
|
3864
3864
|
position: ((r = t == null ? void 0 : t.hint) == null ? void 0 : r.position) || "right"
|
|
3865
3865
|
}), i;
|
|
@@ -3877,7 +3877,7 @@ class re extends xt {
|
|
|
3877
3877
|
...e,
|
|
3878
3878
|
confirmation: "confirmation" in e ? e.confirmation : void 0
|
|
3879
3879
|
}, o = this.make(t);
|
|
3880
|
-
this.nodes.root.innerHTML = o.innerHTML, this.nodes.root.classList.add(
|
|
3880
|
+
this.nodes.root.innerHTML = o.innerHTML, this.nodes.root.classList.add(A.confirmationState), this.confirmationState = e, this.enableSpecialHoverAndFocusBehavior();
|
|
3881
3881
|
}
|
|
3882
3882
|
/**
|
|
3883
3883
|
* Returns item to its original state
|
|
@@ -3886,7 +3886,7 @@ class re extends xt {
|
|
|
3886
3886
|
if (this.nodes.root === null)
|
|
3887
3887
|
return;
|
|
3888
3888
|
const e = this.make(this.params);
|
|
3889
|
-
this.nodes.root.innerHTML = e.innerHTML, this.nodes.root.classList.remove(
|
|
3889
|
+
this.nodes.root.innerHTML = e.innerHTML, this.nodes.root.classList.remove(A.confirmationState), this.confirmationState = null, this.disableSpecialHoverAndFocusBehavior();
|
|
3890
3890
|
}
|
|
3891
3891
|
/**
|
|
3892
3892
|
* Enables special focus and hover behavior for item in confirmation state.
|
|
@@ -3894,7 +3894,7 @@ class re extends xt {
|
|
|
3894
3894
|
*/
|
|
3895
3895
|
enableSpecialHoverAndFocusBehavior() {
|
|
3896
3896
|
var e, t, o;
|
|
3897
|
-
(e = this.nodes.root) == null || e.classList.add(
|
|
3897
|
+
(e = this.nodes.root) == null || e.classList.add(A.noHover), (t = this.nodes.root) == null || t.classList.add(A.noFocus), (o = this.nodes.root) == null || o.addEventListener("mouseleave", this.removeSpecialHoverBehavior, { once: !0 });
|
|
3898
3898
|
}
|
|
3899
3899
|
/**
|
|
3900
3900
|
* Disables special focus and hover behavior
|
|
@@ -3924,7 +3924,7 @@ class re extends xt {
|
|
|
3924
3924
|
*/
|
|
3925
3925
|
animateError() {
|
|
3926
3926
|
var e, t, o;
|
|
3927
|
-
(e = this.nodes.icon) != null && e.classList.contains(
|
|
3927
|
+
(e = this.nodes.icon) != null && e.classList.contains(A.wobbleAnimation) || ((t = this.nodes.icon) == null || t.classList.add(A.wobbleAnimation), (o = this.nodes.icon) == null || o.addEventListener("animationend", this.onErrorAnimationEnd));
|
|
3928
3928
|
}
|
|
3929
3929
|
}
|
|
3930
3930
|
const nt = ne("ce-popover-item-separator"), it = {
|
|
@@ -3932,14 +3932,14 @@ const nt = ne("ce-popover-item-separator"), it = {
|
|
|
3932
3932
|
line: nt("line"),
|
|
3933
3933
|
hidden: nt(null, "hidden")
|
|
3934
3934
|
};
|
|
3935
|
-
class
|
|
3935
|
+
class Jo extends xt {
|
|
3936
3936
|
/**
|
|
3937
3937
|
* Constructs the instance
|
|
3938
3938
|
*/
|
|
3939
3939
|
constructor() {
|
|
3940
3940
|
super(), this.nodes = {
|
|
3941
|
-
root:
|
|
3942
|
-
line:
|
|
3941
|
+
root: h.make("div", it.container),
|
|
3942
|
+
line: h.make("div", it.line)
|
|
3943
3943
|
}, this.nodes.root.appendChild(this.nodes.line);
|
|
3944
3944
|
}
|
|
3945
3945
|
/**
|
|
@@ -3992,7 +3992,7 @@ class Ie extends xt {
|
|
|
3992
3992
|
constructor(e, t) {
|
|
3993
3993
|
var o, i;
|
|
3994
3994
|
super(e), this.nodes = {
|
|
3995
|
-
root:
|
|
3995
|
+
root: h.make("div", So.root)
|
|
3996
3996
|
}, this.nodes.root.appendChild(e.element), e.name && (this.nodes.root.dataset.itemName = e.name), e.hint !== void 0 && ((o = t == null ? void 0 : t.hint) == null ? void 0 : o.enabled) !== !1 && this.addHint(this.nodes.root, {
|
|
3997
3997
|
...e.hint,
|
|
3998
3998
|
position: ((i = t == null ? void 0 : t.hint) == null ? void 0 : i.position) || "right"
|
|
@@ -4018,12 +4018,12 @@ class Ie extends xt {
|
|
|
4018
4018
|
*/
|
|
4019
4019
|
getControls() {
|
|
4020
4020
|
const e = this.nodes.root.querySelectorAll(
|
|
4021
|
-
`button, ${
|
|
4021
|
+
`button, ${h.allInputsSelector}`
|
|
4022
4022
|
);
|
|
4023
4023
|
return Array.from(e);
|
|
4024
4024
|
}
|
|
4025
4025
|
}
|
|
4026
|
-
class
|
|
4026
|
+
class Qo extends _e {
|
|
4027
4027
|
/**
|
|
4028
4028
|
* Constructs the instance
|
|
4029
4029
|
*
|
|
@@ -4038,12 +4038,12 @@ class Jo extends _e {
|
|
|
4038
4038
|
}, this.items = this.buildItems(e.items), e.messages && (this.messages = {
|
|
4039
4039
|
...this.messages,
|
|
4040
4040
|
...e.messages
|
|
4041
|
-
}), this.nodes = {}, this.nodes.popoverContainer =
|
|
4041
|
+
}), this.nodes = {}, this.nodes.popoverContainer = h.make("div", [P.popoverContainer]), this.nodes.nothingFoundMessage = h.make("div", [P.nothingFoundMessage], {
|
|
4042
4042
|
textContent: this.messages.nothingFound
|
|
4043
|
-
}), this.nodes.popoverContainer.appendChild(this.nodes.nothingFoundMessage), this.nodes.items =
|
|
4043
|
+
}), this.nodes.popoverContainer.appendChild(this.nodes.nothingFoundMessage), this.nodes.items = h.make("div", [P.items]), this.items.forEach((o) => {
|
|
4044
4044
|
const i = o.getElement();
|
|
4045
4045
|
i !== null && this.nodes.items.appendChild(i);
|
|
4046
|
-
}), this.nodes.popoverContainer.appendChild(this.nodes.items), this.listeners.on(this.nodes.popoverContainer, "click", (o) => this.handleClick(o)), this.nodes.popover =
|
|
4046
|
+
}), this.nodes.popoverContainer.appendChild(this.nodes.items), this.listeners.on(this.nodes.popoverContainer, "click", (o) => this.handleClick(o)), this.nodes.popover = h.make("div", [
|
|
4047
4047
|
P.popover,
|
|
4048
4048
|
this.params.class
|
|
4049
4049
|
]), this.nodes.popover.appendChild(this.nodes.popoverContainer);
|
|
@@ -4096,12 +4096,12 @@ class Jo extends _e {
|
|
|
4096
4096
|
buildItems(e) {
|
|
4097
4097
|
return e.map((t) => {
|
|
4098
4098
|
switch (t.type) {
|
|
4099
|
-
case
|
|
4100
|
-
return new
|
|
4101
|
-
case
|
|
4102
|
-
return new Ie(t, this.itemsRenderParams[
|
|
4099
|
+
case M.Separator:
|
|
4100
|
+
return new Jo();
|
|
4101
|
+
case M.Html:
|
|
4102
|
+
return new Ie(t, this.itemsRenderParams[M.Html]);
|
|
4103
4103
|
default:
|
|
4104
|
-
return new re(t, this.itemsRenderParams[
|
|
4104
|
+
return new re(t, this.itemsRenderParams[M.Default]);
|
|
4105
4105
|
}
|
|
4106
4106
|
});
|
|
4107
4107
|
}
|
|
@@ -4166,18 +4166,18 @@ const st = ne("cdx-search-field"), rt = {
|
|
|
4166
4166
|
icon: st("icon"),
|
|
4167
4167
|
input: st("input")
|
|
4168
4168
|
};
|
|
4169
|
-
class
|
|
4169
|
+
class Es extends _e {
|
|
4170
4170
|
/**
|
|
4171
4171
|
* @param options - available config
|
|
4172
4172
|
* @param options.items - searchable items list
|
|
4173
4173
|
* @param options.placeholder - input placeholder
|
|
4174
4174
|
*/
|
|
4175
4175
|
constructor({ items: e, placeholder: t }) {
|
|
4176
|
-
super(), this.listeners = new Me(), this.items = e, this.wrapper =
|
|
4177
|
-
const o =
|
|
4178
|
-
innerHTML:
|
|
4176
|
+
super(), this.listeners = new Me(), this.items = e, this.wrapper = h.make("div", rt.wrapper);
|
|
4177
|
+
const o = h.make("div", rt.icon, {
|
|
4178
|
+
innerHTML: fs
|
|
4179
4179
|
});
|
|
4180
|
-
this.input =
|
|
4180
|
+
this.input = h.make("input", rt.input, {
|
|
4181
4181
|
placeholder: t,
|
|
4182
4182
|
/**
|
|
4183
4183
|
* Used to prevent focusing on the input by Tab key
|
|
@@ -4236,12 +4236,12 @@ class ls extends _e {
|
|
|
4236
4236
|
return o !== void 0 ? t.includes(o) : !1;
|
|
4237
4237
|
}
|
|
4238
4238
|
}
|
|
4239
|
-
var
|
|
4240
|
-
for (var i = o > 1 ? void 0 : o ?
|
|
4239
|
+
var xs = Object.defineProperty, Cs = Object.getOwnPropertyDescriptor, Bs = (n, e, t, o) => {
|
|
4240
|
+
for (var i = o > 1 ? void 0 : o ? Cs(e, t) : e, s = n.length - 1, r; s >= 0; s--)
|
|
4241
4241
|
(r = n[s]) && (i = (o ? r(e, t, i) : r(i)) || i);
|
|
4242
|
-
return o && i &&
|
|
4242
|
+
return o && i && xs(e, t, i), i;
|
|
4243
4243
|
};
|
|
4244
|
-
const en = class tn extends
|
|
4244
|
+
const en = class tn extends Qo {
|
|
4245
4245
|
/**
|
|
4246
4246
|
* Construct the instance
|
|
4247
4247
|
*
|
|
@@ -4261,13 +4261,13 @@ const en = class tn extends Jo {
|
|
|
4261
4261
|
const i = o.query === "", s = o.items.length === 0;
|
|
4262
4262
|
this.items.forEach((l) => {
|
|
4263
4263
|
let c = !1;
|
|
4264
|
-
l instanceof re ? c = !o.items.includes(l) : (l instanceof
|
|
4264
|
+
l instanceof re ? c = !o.items.includes(l) : (l instanceof Jo || l instanceof Ie) && (c = s || !i), l.toggleHidden(c);
|
|
4265
4265
|
}), this.toggleNothingFoundMessage(s);
|
|
4266
4266
|
const r = o.query === "" ? this.flippableElements : o.items.map((l) => l.getElement());
|
|
4267
4267
|
(a = this.flipper) != null && a.isActivated && (this.flipper.deactivate(), this.flipper.activate(r));
|
|
4268
4268
|
}, e.nestingLevel !== void 0 && (this.nestingLevel = e.nestingLevel), this.nestingLevel > 0 && this.nodes.popover.classList.add(P.popoverNested), e.scopeElement !== void 0 && (this.scopeElement = e.scopeElement), this.nodes.popoverContainer !== null && this.listeners.on(this.nodes.popoverContainer, "mouseover", (o) => this.handleHover(o)), e.searchable && this.addSearch(), e.flippable !== !1 && (this.flipper = new ce({
|
|
4269
4269
|
items: this.flippableElements,
|
|
4270
|
-
focusedItemClass:
|
|
4270
|
+
focusedItemClass: A.focused,
|
|
4271
4271
|
allowedKeys: [
|
|
4272
4272
|
y.TAB,
|
|
4273
4273
|
y.UP,
|
|
@@ -4408,7 +4408,7 @@ const en = class tn extends Jo {
|
|
|
4408
4408
|
* Adds search to the popover
|
|
4409
4409
|
*/
|
|
4410
4410
|
addSearch() {
|
|
4411
|
-
this.search = new
|
|
4411
|
+
this.search = new Es({
|
|
4412
4412
|
items: this.itemsDefault,
|
|
4413
4413
|
placeholder: this.messages.search
|
|
4414
4414
|
}), this.search.on(Ue.Search, this.onSearch);
|
|
@@ -4424,11 +4424,11 @@ const en = class tn extends Jo {
|
|
|
4424
4424
|
this.nodes.nothingFoundMessage.classList.toggle(P.nothingFoundMessageDisplayed, e);
|
|
4425
4425
|
}
|
|
4426
4426
|
};
|
|
4427
|
-
|
|
4427
|
+
Bs([
|
|
4428
4428
|
me
|
|
4429
4429
|
], en.prototype, "size", 1);
|
|
4430
|
-
let
|
|
4431
|
-
class
|
|
4430
|
+
let Ct = en;
|
|
4431
|
+
class Ts extends Ct {
|
|
4432
4432
|
/**
|
|
4433
4433
|
* Constructs the instance
|
|
4434
4434
|
*
|
|
@@ -4442,7 +4442,7 @@ class hs extends Bt {
|
|
|
4442
4442
|
class: P.popoverInline
|
|
4443
4443
|
},
|
|
4444
4444
|
{
|
|
4445
|
-
[
|
|
4445
|
+
[M.Default]: {
|
|
4446
4446
|
/**
|
|
4447
4447
|
* We use button instead of div here to fix bug associated with focus loss (which leads to selection change) on click in safari
|
|
4448
4448
|
*
|
|
@@ -4455,7 +4455,7 @@ class hs extends Bt {
|
|
|
4455
4455
|
enabled: t
|
|
4456
4456
|
}
|
|
4457
4457
|
},
|
|
4458
|
-
[
|
|
4458
|
+
[M.Html]: {
|
|
4459
4459
|
hint: {
|
|
4460
4460
|
position: "top",
|
|
4461
4461
|
alignment: "center",
|
|
@@ -4572,13 +4572,13 @@ on.CSS = {
|
|
|
4572
4572
|
scrollLocked: "ce-scroll-locked",
|
|
4573
4573
|
scrollLockedHard: "ce-scroll-locked--hard"
|
|
4574
4574
|
};
|
|
4575
|
-
let
|
|
4575
|
+
let Ss = on;
|
|
4576
4576
|
const at = ne("ce-popover-header"), lt = {
|
|
4577
4577
|
root: at(),
|
|
4578
4578
|
text: at("text"),
|
|
4579
4579
|
backButton: at("back-button")
|
|
4580
4580
|
};
|
|
4581
|
-
class
|
|
4581
|
+
class Is {
|
|
4582
4582
|
/**
|
|
4583
4583
|
* Constructs the instance
|
|
4584
4584
|
*
|
|
@@ -4586,10 +4586,10 @@ class fs {
|
|
|
4586
4586
|
*/
|
|
4587
4587
|
constructor({ text: e, onBackButtonClick: t }) {
|
|
4588
4588
|
this.listeners = new Me(), this.text = e, this.onBackButtonClick = t, this.nodes = {
|
|
4589
|
-
root:
|
|
4590
|
-
backButton:
|
|
4591
|
-
text:
|
|
4592
|
-
}, this.nodes.backButton.innerHTML =
|
|
4589
|
+
root: h.make("div", [lt.root]),
|
|
4590
|
+
backButton: h.make("button", [lt.backButton]),
|
|
4591
|
+
text: h.make("div", [lt.text])
|
|
4592
|
+
}, this.nodes.backButton.innerHTML = ts, this.nodes.root.appendChild(this.nodes.backButton), this.listeners.on(this.nodes.backButton, "click", this.onBackButtonClick), this.nodes.text.innerText = this.text, this.nodes.root.appendChild(this.nodes.text);
|
|
4593
4593
|
}
|
|
4594
4594
|
/**
|
|
4595
4595
|
* Returns popover header root html element
|
|
@@ -4604,7 +4604,7 @@ class fs {
|
|
|
4604
4604
|
this.nodes.root.remove(), this.listeners.destroy();
|
|
4605
4605
|
}
|
|
4606
4606
|
}
|
|
4607
|
-
class
|
|
4607
|
+
class Os {
|
|
4608
4608
|
constructor() {
|
|
4609
4609
|
this.history = [];
|
|
4610
4610
|
}
|
|
@@ -4642,7 +4642,7 @@ class gs {
|
|
|
4642
4642
|
this.pop();
|
|
4643
4643
|
}
|
|
4644
4644
|
}
|
|
4645
|
-
class nn extends
|
|
4645
|
+
class nn extends Qo {
|
|
4646
4646
|
/**
|
|
4647
4647
|
* Construct the instance
|
|
4648
4648
|
*
|
|
@@ -4650,17 +4650,17 @@ class nn extends Jo {
|
|
|
4650
4650
|
*/
|
|
4651
4651
|
constructor(e) {
|
|
4652
4652
|
super(e, {
|
|
4653
|
-
[
|
|
4653
|
+
[M.Default]: {
|
|
4654
4654
|
hint: {
|
|
4655
4655
|
enabled: !1
|
|
4656
4656
|
}
|
|
4657
4657
|
},
|
|
4658
|
-
[
|
|
4658
|
+
[M.Html]: {
|
|
4659
4659
|
hint: {
|
|
4660
4660
|
enabled: !1
|
|
4661
4661
|
}
|
|
4662
4662
|
}
|
|
4663
|
-
}), this.scrollLocker = new
|
|
4663
|
+
}), this.scrollLocker = new Ss(), this.history = new Os(), this.isHidden = !0, this.nodes.overlay = h.make("div", [P.overlay, P.overlayHidden]), this.nodes.popover.insertBefore(this.nodes.overlay, this.nodes.popover.firstChild), this.listeners.on(this.nodes.overlay, "click", () => {
|
|
4664
4664
|
this.hide();
|
|
4665
4665
|
}), this.history.push({ items: e.items });
|
|
4666
4666
|
}
|
|
@@ -4701,7 +4701,7 @@ class nn extends Jo {
|
|
|
4701
4701
|
*/
|
|
4702
4702
|
updateItemsAndHeader(e, t) {
|
|
4703
4703
|
if (this.header !== null && this.header !== void 0 && (this.header.destroy(), this.header = null), t !== void 0) {
|
|
4704
|
-
this.header = new
|
|
4704
|
+
this.header = new Is({
|
|
4705
4705
|
text: t,
|
|
4706
4706
|
onBackButtonClick: () => {
|
|
4707
4707
|
this.history.pop(), this.updateItemsAndHeader(this.history.currentItems, this.history.currentTitle);
|
|
@@ -4720,7 +4720,7 @@ class nn extends Jo {
|
|
|
4720
4720
|
});
|
|
4721
4721
|
}
|
|
4722
4722
|
}
|
|
4723
|
-
class
|
|
4723
|
+
class _s extends E {
|
|
4724
4724
|
constructor() {
|
|
4725
4725
|
super(...arguments), this.opened = !1, this.selection = new b(), this.popover = null, this.close = () => {
|
|
4726
4726
|
this.opened && (this.opened = !1, b.isAtEditor || this.selection.restore(), this.selection.clearSaved(), !this.Editor.CrossBlockSelection.isCrossBlockSelectionStarted && this.Editor.BlockManager.currentBlock && this.Editor.BlockSelection.unselectBlock(this.Editor.BlockManager.currentBlock), this.eventsDispatcher.emit(this.events.closed), this.popover && (this.popover.off(G.Closed, this.onPopoverClose), this.popover.destroy(), this.popover.getElement().remove(), this.popover = null));
|
|
@@ -4761,7 +4761,7 @@ class ms extends E {
|
|
|
4761
4761
|
* - Default Settings [Move, Remove, etc]
|
|
4762
4762
|
*/
|
|
4763
4763
|
make() {
|
|
4764
|
-
this.nodes.wrapper =
|
|
4764
|
+
this.nodes.wrapper = h.make("div", [this.CSS.settings]), this.eventsDispatcher.on(Se, this.close);
|
|
4765
4765
|
}
|
|
4766
4766
|
/**
|
|
4767
4767
|
* Destroys module
|
|
@@ -4779,7 +4779,7 @@ class ms extends E {
|
|
|
4779
4779
|
this.opened = !0, this.selection.save(), this.Editor.BlockSelection.selectBlock(e), this.Editor.BlockSelection.clearCache();
|
|
4780
4780
|
const { toolTunes: t, commonTunes: o } = e.getTunes();
|
|
4781
4781
|
this.eventsDispatcher.emit(this.events.opened);
|
|
4782
|
-
const i = be() ? nn :
|
|
4782
|
+
const i = be() ? nn : Ct;
|
|
4783
4783
|
this.popover = new i({
|
|
4784
4784
|
searchable: !1,
|
|
4785
4785
|
//lrj:关闭搜索功能
|
|
@@ -4808,7 +4808,7 @@ class ms extends E {
|
|
|
4808
4808
|
async getTunesItems(e, t, o) {
|
|
4809
4809
|
const i = [];
|
|
4810
4810
|
o !== void 0 && o.length > 0 && (i.push(...o), i.push({
|
|
4811
|
-
type:
|
|
4811
|
+
type: M.Separator
|
|
4812
4812
|
}));
|
|
4813
4813
|
const s = Array.from(this.Editor.Tools.blockTools.values()), a = (await Yo(e, s)).reduce((l, c) => (c.toolbox.forEach((d) => {
|
|
4814
4814
|
l.push({
|
|
@@ -4821,7 +4821,7 @@ class ms extends E {
|
|
|
4821
4821
|
},
|
|
4822
4822
|
closeOnActivate: !0,
|
|
4823
4823
|
onActivate: async () => {
|
|
4824
|
-
const { BlockManager:
|
|
4824
|
+
const { BlockManager: u, Caret: p, Toolbar: g } = this.Editor, f = await u.convert(e, c.name, d.data);
|
|
4825
4825
|
g.close(), p.setToBlock(f, p.positions.END);
|
|
4826
4826
|
}
|
|
4827
4827
|
});
|
|
@@ -4836,7 +4836,7 @@ class ms extends E {
|
|
|
4836
4836
|
items: a
|
|
4837
4837
|
}
|
|
4838
4838
|
}), i.push({
|
|
4839
|
-
type:
|
|
4839
|
+
type: M.Separator
|
|
4840
4840
|
})), i.push(...t), i.map((l) => this.resolveTuneAliases(l));
|
|
4841
4841
|
}
|
|
4842
4842
|
/**
|
|
@@ -4845,7 +4845,7 @@ class ms extends E {
|
|
|
4845
4845
|
* @param item - item with resolved aliases
|
|
4846
4846
|
*/
|
|
4847
4847
|
resolveTuneAliases(e) {
|
|
4848
|
-
if (e.type ===
|
|
4848
|
+
if (e.type === M.Separator || e.type === M.Html)
|
|
4849
4849
|
return e;
|
|
4850
4850
|
const t = Yi(e, { label: "title" });
|
|
4851
4851
|
return e.confirmation && (t.confirmation = this.resolveTuneAliases(e.confirmation)), t;
|
|
@@ -4898,8 +4898,8 @@ var sn = { exports: {} };
|
|
|
4898
4898
|
}([function(t, o, i) {
|
|
4899
4899
|
function s(l, c) {
|
|
4900
4900
|
for (var d = 0; d < c.length; d++) {
|
|
4901
|
-
var
|
|
4902
|
-
|
|
4901
|
+
var u = c[d];
|
|
4902
|
+
u.enumerable = u.enumerable || !1, u.configurable = !0, "value" in u && (u.writable = !0), Object.defineProperty(l, u.key, u);
|
|
4903
4903
|
}
|
|
4904
4904
|
}
|
|
4905
4905
|
function r(l, c, d) {
|
|
@@ -4909,11 +4909,11 @@ var sn = { exports: {} };
|
|
|
4909
4909
|
var a = function() {
|
|
4910
4910
|
function l(c) {
|
|
4911
4911
|
var d = this;
|
|
4912
|
-
(function(
|
|
4913
|
-
if (!(
|
|
4912
|
+
(function(u, p) {
|
|
4913
|
+
if (!(u instanceof p))
|
|
4914
4914
|
throw new TypeError("Cannot call a class as a function");
|
|
4915
|
-
})(this, l), this.commands = {}, this.keys = {}, this.name = c.name, this.parseShortcutName(c.name), this.element = c.on, this.callback = c.callback, this.executeShortcut = function(
|
|
4916
|
-
d.execute(
|
|
4915
|
+
})(this, l), this.commands = {}, this.keys = {}, this.name = c.name, this.parseShortcutName(c.name), this.element = c.on, this.callback = c.callback, this.executeShortcut = function(u) {
|
|
4916
|
+
d.execute(u);
|
|
4917
4917
|
}, this.element.addEventListener("keydown", this.executeShortcut, !1);
|
|
4918
4918
|
}
|
|
4919
4919
|
return r(l, null, [{ key: "supportedCommands", get: function() {
|
|
@@ -4924,20 +4924,20 @@ var sn = { exports: {} };
|
|
|
4924
4924
|
c = c.split("+");
|
|
4925
4925
|
for (var d = 0; d < c.length; d++) {
|
|
4926
4926
|
c[d] = c[d].toUpperCase();
|
|
4927
|
-
var
|
|
4927
|
+
var u = !1;
|
|
4928
4928
|
for (var p in l.supportedCommands)
|
|
4929
4929
|
if (l.supportedCommands[p].includes(c[d])) {
|
|
4930
|
-
|
|
4930
|
+
u = this.commands[p] = !0;
|
|
4931
4931
|
break;
|
|
4932
4932
|
}
|
|
4933
|
-
|
|
4933
|
+
u || (this.keys[c[d]] = !0);
|
|
4934
4934
|
}
|
|
4935
4935
|
for (var g in l.supportedCommands)
|
|
4936
4936
|
this.commands[g] || (this.commands[g] = !1);
|
|
4937
4937
|
} }, { key: "execute", value: function(c) {
|
|
4938
|
-
var d,
|
|
4938
|
+
var d, u = { CMD: c.ctrlKey || c.metaKey, SHIFT: c.shiftKey, ALT: c.altKey }, p = !0;
|
|
4939
4939
|
for (d in this.commands)
|
|
4940
|
-
this.commands[d] !==
|
|
4940
|
+
this.commands[d] !== u[d] && (p = !1);
|
|
4941
4941
|
var g, f = !0;
|
|
4942
4942
|
for (g in this.keys)
|
|
4943
4943
|
f = f && c.keyCode === l.keyCodes[g];
|
|
@@ -4950,9 +4950,9 @@ var sn = { exports: {} };
|
|
|
4950
4950
|
}]).default;
|
|
4951
4951
|
});
|
|
4952
4952
|
})(sn);
|
|
4953
|
-
var
|
|
4954
|
-
const
|
|
4955
|
-
class
|
|
4953
|
+
var Ms = sn.exports;
|
|
4954
|
+
const Ls = /* @__PURE__ */ Ke(Ms);
|
|
4955
|
+
class As {
|
|
4956
4956
|
constructor() {
|
|
4957
4957
|
this.registeredShortcuts = /* @__PURE__ */ new Map();
|
|
4958
4958
|
}
|
|
@@ -4966,7 +4966,7 @@ class ks {
|
|
|
4966
4966
|
throw Error(
|
|
4967
4967
|
`Shortcut ${e.name} is already registered for ${e.on}. Please remove it before add a new handler.`
|
|
4968
4968
|
);
|
|
4969
|
-
const o = new
|
|
4969
|
+
const o = new Ls({
|
|
4970
4970
|
name: e.name,
|
|
4971
4971
|
on: e.on,
|
|
4972
4972
|
callback: e.handler
|
|
@@ -5002,13 +5002,13 @@ class ks {
|
|
|
5002
5002
|
return (this.registeredShortcuts.get(e) || []).find(({ name: i }) => i === t);
|
|
5003
5003
|
}
|
|
5004
5004
|
}
|
|
5005
|
-
const ge = new
|
|
5006
|
-
var
|
|
5007
|
-
for (var i = o > 1 ? void 0 : o ?
|
|
5005
|
+
const ge = new As();
|
|
5006
|
+
var Ps = Object.defineProperty, Ns = Object.getOwnPropertyDescriptor, rn = (n, e, t, o) => {
|
|
5007
|
+
for (var i = o > 1 ? void 0 : o ? Ns(e, t) : e, s = n.length - 1, r; s >= 0; s--)
|
|
5008
5008
|
(r = n[s]) && (i = (o ? r(e, t, i) : r(i)) || i);
|
|
5009
|
-
return o && i &&
|
|
5009
|
+
return o && i && Ps(e, t, i), i;
|
|
5010
5010
|
}, Pe = /* @__PURE__ */ ((n) => (n.Opened = "toolbox-opened", n.Closed = "toolbox-closed", n.BlockAdded = "toolbox-block-added", n))(Pe || {});
|
|
5011
|
-
const
|
|
5011
|
+
const Bt = class an extends _e {
|
|
5012
5012
|
/**
|
|
5013
5013
|
* Toolbox constructor
|
|
5014
5014
|
*
|
|
@@ -5025,7 +5025,7 @@ const Ct = class an extends _e {
|
|
|
5025
5025
|
/* Closed */
|
|
5026
5026
|
);
|
|
5027
5027
|
}, this.api = e, this.tools = t, this.i18nLabels = o, this.enableShortcuts(), this.nodes = {
|
|
5028
|
-
toolbox:
|
|
5028
|
+
toolbox: h.make("div", an.CSS.toolbox)
|
|
5029
5029
|
}, this.initPopover(), this.api.events.on(Se, this.handleMobileLayoutToggle);
|
|
5030
5030
|
}
|
|
5031
5031
|
/**
|
|
@@ -5104,7 +5104,7 @@ const Ct = class an extends _e {
|
|
|
5104
5104
|
*/
|
|
5105
5105
|
initPopover() {
|
|
5106
5106
|
var t;
|
|
5107
|
-
const e = be() ? nn :
|
|
5107
|
+
const e = be() ? nn : Ct;
|
|
5108
5108
|
this.popover = new e({
|
|
5109
5109
|
scopeElement: this.api.ui.nodes.redactor,
|
|
5110
5110
|
searchable: !1,
|
|
@@ -5221,13 +5221,13 @@ const Ct = class an extends _e {
|
|
|
5221
5221
|
};
|
|
5222
5222
|
rn([
|
|
5223
5223
|
me
|
|
5224
|
-
],
|
|
5224
|
+
], Bt.prototype, "toolsToBeDisplayed", 1);
|
|
5225
5225
|
rn([
|
|
5226
5226
|
me
|
|
5227
|
-
],
|
|
5228
|
-
let
|
|
5227
|
+
], Bt.prototype, "toolboxItemsToBeDisplayed", 1);
|
|
5228
|
+
let Rs = Bt;
|
|
5229
5229
|
const ln = "block hovered";
|
|
5230
|
-
async function
|
|
5230
|
+
async function Ds(n, e) {
|
|
5231
5231
|
const t = navigator.keyboard;
|
|
5232
5232
|
if (!t)
|
|
5233
5233
|
return e;
|
|
@@ -5237,7 +5237,8 @@ async function xs(n, e) {
|
|
|
5237
5237
|
return console.error(o), e;
|
|
5238
5238
|
}
|
|
5239
5239
|
}
|
|
5240
|
-
class
|
|
5240
|
+
const Fs = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 17C7 17 7 15.2536 7 13.5L5.5 12L7 10.5C7 8.74644 7 7 9 7"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 17C17 17 17 15.2536 17 13.5L18.5 12L17 10.5C17 8.74644 17 7 15 7"/></svg>', Hs = '<svg class="icon-toolbox-alert" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M83.2 147.2V448c0 25.6 19.2 44.8 44.8 44.8h768c25.6 0 44.8-19.2 44.8-44.8V147.2c0-25.6-19.2-44.8-44.8-44.8H128c-25.6 6.4-44.8 25.6-44.8 44.8z m89.6 256V192h684.8v211.2H172.8zM810.24 642.56c0-25.6-19.2-44.8-44.8-44.8h-640c-25.6 0-44.8 19.2-44.8 44.8 0 25.6 19.2 44.8 44.8 44.8h640c25.6 6.4 44.8-12.8 44.8-44.8zM554.56 866.24c0-25.6-19.2-44.8-44.8-44.8h-384c-25.6 0-44.8 19.2-44.8 44.8 0 25.6 19.2 44.8 44.8 44.8h384c25.6 6.4 44.8-12.8 44.8-44.8z" fill="#000000" ></path></svg>';
|
|
5241
|
+
class js extends E {
|
|
5241
5242
|
/**
|
|
5242
5243
|
* @class
|
|
5243
5244
|
* @param moduleConfiguration - Module Configuration
|
|
@@ -5290,14 +5291,14 @@ class Bs extends E {
|
|
|
5290
5291
|
},
|
|
5291
5292
|
open: () => {
|
|
5292
5293
|
if (this.toolboxInstance === null) {
|
|
5293
|
-
|
|
5294
|
+
I("toolbox.open() called before initialization is finished", "warn");
|
|
5294
5295
|
return;
|
|
5295
5296
|
}
|
|
5296
5297
|
this.Editor.BlockManager.currentBlock = this.hoveredBlock, this.toolboxInstance.open();
|
|
5297
5298
|
},
|
|
5298
5299
|
toggle: () => {
|
|
5299
5300
|
if (this.toolboxInstance === null) {
|
|
5300
|
-
|
|
5301
|
+
I("toolbox.toggle() called before initialization is finished", "warn");
|
|
5301
5302
|
return;
|
|
5302
5303
|
}
|
|
5303
5304
|
this.toolboxInstance.toggle();
|
|
@@ -5345,9 +5346,10 @@ class Bs extends E {
|
|
|
5345
5346
|
*
|
|
5346
5347
|
* @param block - block to move Toolbar near it
|
|
5347
5348
|
*/
|
|
5348
|
-
moveAndOpen(e = this.Editor.BlockManager.currentBlock) {
|
|
5349
|
+
async moveAndOpen(e = this.Editor.BlockManager.currentBlock) {
|
|
5350
|
+
var u, p, g, f, v;
|
|
5349
5351
|
if (this.toolboxInstance === null) {
|
|
5350
|
-
|
|
5352
|
+
I("Can't open Toolbar since Editor initialization is not finished yet", "warn");
|
|
5351
5353
|
return;
|
|
5352
5354
|
}
|
|
5353
5355
|
if (this.toolboxInstance.opened && this.toolboxInstance.close(), this.Editor.BlockSettings.opened && this.Editor.BlockSettings.close(), !e)
|
|
@@ -5359,13 +5361,54 @@ class Bs extends E {
|
|
|
5359
5361
|
if (o)
|
|
5360
5362
|
i = t.offsetTop + t.offsetHeight;
|
|
5361
5363
|
else if (r === void 0 || d) {
|
|
5362
|
-
const
|
|
5363
|
-
i = t.offsetTop +
|
|
5364
|
+
const B = parseInt(window.getComputedStyle(e.pluginsContent).paddingTop);
|
|
5365
|
+
i = t.offsetTop + B;
|
|
5364
5366
|
} else {
|
|
5365
|
-
const
|
|
5366
|
-
i = t.offsetTop +
|
|
5367
|
+
const B = li(r), x = parseInt(window.getComputedStyle(this.nodes.plusButton).height, 10), _ = 8;
|
|
5368
|
+
i = t.offsetTop + B - x + _ + c;
|
|
5369
|
+
}
|
|
5370
|
+
if (this.nodes.wrapper.style.top = `${Math.floor(i)}px`, this.Editor.BlockManager.blocks.length === 1 && e.isEmpty ? this.blockTunesToggler.hide() : this.blockTunesToggler.show(), console.log("block", e), (u = this.nodes.plusButton) == null || u.classList.remove("ce-toolbar__plus--hidden"), (p = this.nodes.settingsToggler) == null || p.classList.remove("ce-toolbar__settings-btn--hidden"), e.isEmpty && e.name !== "delimiter")
|
|
5371
|
+
(g = this.nodes.settingsToggler) == null || g.classList.add("ce-toolbar__settings-btn--hidden");
|
|
5372
|
+
else {
|
|
5373
|
+
const B = (f = this.nodes.settingsToggler) == null ? void 0 : f.querySelector(".icon-block-name");
|
|
5374
|
+
B && (B.innerHTML = await this.getIconBlockName(e)), (v = this.nodes.plusButton) == null || v.classList.add("ce-toolbar__plus--hidden");
|
|
5375
|
+
}
|
|
5376
|
+
this.open();
|
|
5377
|
+
}
|
|
5378
|
+
async getIconBlockName(e) {
|
|
5379
|
+
switch (e.name) {
|
|
5380
|
+
case "image":
|
|
5381
|
+
return hs;
|
|
5382
|
+
case "table":
|
|
5383
|
+
return gs;
|
|
5384
|
+
case "alert":
|
|
5385
|
+
return Hs;
|
|
5386
|
+
case "List":
|
|
5387
|
+
const t = await e.data;
|
|
5388
|
+
return t.style === "checklist" ? Qi : t.style === "ordered" ? cs : t.style === "unordered" ? ls : "";
|
|
5389
|
+
case "delimiter":
|
|
5390
|
+
return ss;
|
|
5391
|
+
case "h1":
|
|
5392
|
+
return Ki;
|
|
5393
|
+
case "h2":
|
|
5394
|
+
return Vi;
|
|
5395
|
+
case "h3":
|
|
5396
|
+
return Xi;
|
|
5397
|
+
case "h4":
|
|
5398
|
+
return qi;
|
|
5399
|
+
case "h5":
|
|
5400
|
+
return Zi;
|
|
5401
|
+
case "h6":
|
|
5402
|
+
return Gi;
|
|
5403
|
+
case "paragraph":
|
|
5404
|
+
return ms;
|
|
5405
|
+
case "code":
|
|
5406
|
+
return Fs;
|
|
5407
|
+
case "quote":
|
|
5408
|
+
return ps;
|
|
5409
|
+
default:
|
|
5410
|
+
return "";
|
|
5367
5411
|
}
|
|
5368
|
-
this.nodes.wrapper.style.top = `${Math.floor(i)}px`, this.Editor.BlockManager.blocks.length === 1 && e.isEmpty ? this.blockTunesToggler.hide() : this.blockTunesToggler.show(), this.open();
|
|
5369
5412
|
}
|
|
5370
5413
|
/**
|
|
5371
5414
|
* Close the Toolbar
|
|
@@ -5393,33 +5436,35 @@ class Bs extends E {
|
|
|
5393
5436
|
* Draws Toolbar elements
|
|
5394
5437
|
*/
|
|
5395
5438
|
async make() {
|
|
5396
|
-
this.nodes.wrapper =
|
|
5397
|
-
this.nodes[
|
|
5398
|
-
}),
|
|
5399
|
-
innerHTML:
|
|
5400
|
-
}),
|
|
5439
|
+
this.nodes.wrapper = h.make("div", this.CSS.toolbar), ["content", "actions"].forEach((r) => {
|
|
5440
|
+
this.nodes[r] = h.make("div", this.CSS[r]);
|
|
5441
|
+
}), h.append(this.nodes.wrapper, this.nodes.content), h.append(this.nodes.content, this.nodes.actions), this.nodes.plusButton = h.make("div", this.CSS.plusButton, {
|
|
5442
|
+
innerHTML: us
|
|
5443
|
+
}), h.append(this.nodes.actions, this.nodes.plusButton), this.readOnlyMutableListeners.on(this.nodes.plusButton, "click", () => {
|
|
5401
5444
|
$e(!0), this.plusButtonClicked();
|
|
5402
5445
|
}, !1);
|
|
5403
|
-
const e =
|
|
5404
|
-
e.appendChild(document.createTextNode(N.ui($.ui.toolbar.toolbox, "Add"))), e.appendChild(
|
|
5446
|
+
const e = h.make("div");
|
|
5447
|
+
e.appendChild(document.createTextNode(N.ui($.ui.toolbar.toolbox, "Add"))), e.appendChild(h.make("div", this.CSS.plusButtonShortcut, {
|
|
5405
5448
|
textContent: "/"
|
|
5406
5449
|
})), ze(this.nodes.plusButton, e, {
|
|
5407
5450
|
hidingDelay: 400
|
|
5408
|
-
})
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
t
|
|
5413
|
-
|
|
5414
|
-
|
|
5451
|
+
});
|
|
5452
|
+
const t = h.make("span", this.CSS.settingsToggler, {
|
|
5453
|
+
innerHTML: "<span class='icon-block-name'></span><span class='icon-menu'>" + ds + "</span>"
|
|
5454
|
+
});
|
|
5455
|
+
this.nodes.settingsToggler = t, h.append(this.nodes.actions, this.nodes.settingsToggler);
|
|
5456
|
+
const o = h.make("div"), i = h.text(N.ui($.ui.blockTunes.toggler, "Click to tune")), s = await Ds("Slash", "/");
|
|
5457
|
+
o.appendChild(i), o.appendChild(h.make("div", this.CSS.plusButtonShortcut, {
|
|
5458
|
+
textContent: vt(`CMD + ${s}`)
|
|
5459
|
+
})), ze(this.nodes.settingsToggler, o, {
|
|
5415
5460
|
hidingDelay: 400
|
|
5416
|
-
}),
|
|
5461
|
+
}), h.append(this.nodes.actions, this.makeToolbox()), h.append(this.nodes.actions, this.Editor.BlockSettings.getElement()), h.append(this.Editor.UI.nodes.wrapper, this.nodes.wrapper);
|
|
5417
5462
|
}
|
|
5418
5463
|
/**
|
|
5419
5464
|
* Creates the Toolbox instance and return it's rendered element
|
|
5420
5465
|
*/
|
|
5421
5466
|
makeToolbox() {
|
|
5422
|
-
return this.toolboxInstance = new
|
|
5467
|
+
return this.toolboxInstance = new Rs({
|
|
5423
5468
|
api: this.Editor.API.methods,
|
|
5424
5469
|
tools: this.Editor.Tools.blockTools,
|
|
5425
5470
|
i18nLabels: {
|
|
@@ -5516,14 +5561,14 @@ class Tt {
|
|
|
5516
5561
|
* Calls Tool's reset method
|
|
5517
5562
|
*/
|
|
5518
5563
|
reset() {
|
|
5519
|
-
if (
|
|
5564
|
+
if (L(this.constructable.reset))
|
|
5520
5565
|
return this.constructable.reset();
|
|
5521
5566
|
}
|
|
5522
5567
|
/**
|
|
5523
5568
|
* Calls Tool's prepare method
|
|
5524
5569
|
*/
|
|
5525
5570
|
prepare() {
|
|
5526
|
-
if (
|
|
5571
|
+
if (L(this.constructable.prepare))
|
|
5527
5572
|
return this.constructable.prepare({
|
|
5528
5573
|
toolName: this.name,
|
|
5529
5574
|
config: this.settings
|
|
@@ -5561,7 +5606,7 @@ class Tt {
|
|
|
5561
5606
|
return this.type === ae.Tune;
|
|
5562
5607
|
}
|
|
5563
5608
|
}
|
|
5564
|
-
class
|
|
5609
|
+
class $s extends E {
|
|
5565
5610
|
/**
|
|
5566
5611
|
* @param moduleConfiguration - Module Configuration
|
|
5567
5612
|
* @param moduleConfiguration.config - Editor's config
|
|
@@ -5598,7 +5643,7 @@ class Cs extends E {
|
|
|
5598
5643
|
if (this.opened) {
|
|
5599
5644
|
for (const [o, i] of this.tools) {
|
|
5600
5645
|
const s = this.getToolShortcut(o.name);
|
|
5601
|
-
s !== void 0 && ge.remove(this.Editor.UI.nodes.redactor, s),
|
|
5646
|
+
s !== void 0 && ge.remove(this.Editor.UI.nodes.redactor, s), L(i.clear) && i.clear();
|
|
5602
5647
|
}
|
|
5603
5648
|
this.tools = /* @__PURE__ */ new Map(), this.reset(), this.opened = !1, (e = this.popover) == null || e.hide(), (t = this.popover) == null || t.destroy(), this.popover = null;
|
|
5604
5649
|
}
|
|
@@ -5622,10 +5667,10 @@ class Cs extends E {
|
|
|
5622
5667
|
* Making DOM
|
|
5623
5668
|
*/
|
|
5624
5669
|
make() {
|
|
5625
|
-
this.nodes.wrapper =
|
|
5670
|
+
this.nodes.wrapper = h.make("div", [
|
|
5626
5671
|
this.CSS.inlineToolbar,
|
|
5627
5672
|
...this.isRtl ? [this.Editor.UI.CSS.editorRtlFix] : []
|
|
5628
|
-
]),
|
|
5673
|
+
]), h.append(this.Editor.UI.nodes.wrapper, this.nodes.wrapper);
|
|
5629
5674
|
}
|
|
5630
5675
|
/**
|
|
5631
5676
|
* Shows Inline Toolbar
|
|
@@ -5636,7 +5681,7 @@ class Cs extends E {
|
|
|
5636
5681
|
return;
|
|
5637
5682
|
this.opened = !0, this.popover !== null && this.popover.destroy(), this.createToolsInstances();
|
|
5638
5683
|
const e = await this.getPopoverItems();
|
|
5639
|
-
this.popover = new
|
|
5684
|
+
this.popover = new Ts({
|
|
5640
5685
|
items: e,
|
|
5641
5686
|
scopeElement: this.Editor.API.methods.ui.nodes.redactor,
|
|
5642
5687
|
messages: {
|
|
@@ -5671,7 +5716,7 @@ class Cs extends E {
|
|
|
5671
5716
|
const e = ["IMG", "INPUT"], t = b.get(), o = b.text;
|
|
5672
5717
|
if (!t || !t.anchorNode || t.isCollapsed || o.length < 1)
|
|
5673
5718
|
return !1;
|
|
5674
|
-
const i =
|
|
5719
|
+
const i = h.isElement(t.anchorNode) ? t.anchorNode : t.anchorNode.parentElement;
|
|
5675
5720
|
if (i === null || t !== null && e.includes(i.tagName))
|
|
5676
5721
|
return !1;
|
|
5677
5722
|
const s = this.Editor.BlockManager.getBlock(t.anchorNode);
|
|
@@ -5718,7 +5763,7 @@ class Cs extends E {
|
|
|
5718
5763
|
o.title || Te(o.name)
|
|
5719
5764
|
);
|
|
5720
5765
|
[s].flat().forEach((c) => {
|
|
5721
|
-
var
|
|
5766
|
+
var u, p;
|
|
5722
5767
|
const d = {
|
|
5723
5768
|
name: o.name,
|
|
5724
5769
|
onActivate: () => {
|
|
@@ -5729,21 +5774,21 @@ class Cs extends E {
|
|
|
5729
5774
|
description: a
|
|
5730
5775
|
}
|
|
5731
5776
|
};
|
|
5732
|
-
if (
|
|
5777
|
+
if (h.isElement(c)) {
|
|
5733
5778
|
const g = {
|
|
5734
5779
|
...d,
|
|
5735
5780
|
element: c,
|
|
5736
|
-
type:
|
|
5781
|
+
type: M.Html
|
|
5737
5782
|
};
|
|
5738
|
-
if (
|
|
5783
|
+
if (L(i.renderActions)) {
|
|
5739
5784
|
const f = i.renderActions();
|
|
5740
5785
|
g.children = {
|
|
5741
|
-
isOpen: (
|
|
5786
|
+
isOpen: (u = i.checkState) == null ? void 0 : u.call(i, b.get()),
|
|
5742
5787
|
/** Disable keyboard navigation in actions, as it might conflict with enter press handling */
|
|
5743
5788
|
isFlippable: !1,
|
|
5744
5789
|
items: [
|
|
5745
5790
|
{
|
|
5746
|
-
type:
|
|
5791
|
+
type: M.Html,
|
|
5747
5792
|
element: f
|
|
5748
5793
|
}
|
|
5749
5794
|
]
|
|
@@ -5751,26 +5796,26 @@ class Cs extends E {
|
|
|
5751
5796
|
} else
|
|
5752
5797
|
(p = i.checkState) == null || p.call(i, b.get());
|
|
5753
5798
|
e.push(g);
|
|
5754
|
-
} else if (c.type ===
|
|
5799
|
+
} else if (c.type === M.Html)
|
|
5755
5800
|
e.push({
|
|
5756
5801
|
...d,
|
|
5757
5802
|
...c,
|
|
5758
|
-
type:
|
|
5803
|
+
type: M.Html
|
|
5759
5804
|
});
|
|
5760
|
-
else if (c.type ===
|
|
5805
|
+
else if (c.type === M.Separator)
|
|
5761
5806
|
e.push({
|
|
5762
|
-
type:
|
|
5807
|
+
type: M.Separator
|
|
5763
5808
|
});
|
|
5764
5809
|
else {
|
|
5765
5810
|
const g = {
|
|
5766
5811
|
...d,
|
|
5767
5812
|
...c,
|
|
5768
|
-
type:
|
|
5813
|
+
type: M.Default
|
|
5769
5814
|
};
|
|
5770
5815
|
"children" in g && t !== 0 && e.push({
|
|
5771
|
-
type:
|
|
5816
|
+
type: M.Separator
|
|
5772
5817
|
}), e.push(g), "children" in g && t < this.tools.size - 1 && e.push({
|
|
5773
|
-
type:
|
|
5818
|
+
type: M.Separator
|
|
5774
5819
|
});
|
|
5775
5820
|
}
|
|
5776
5821
|
}), t++;
|
|
@@ -5844,7 +5889,7 @@ function dn() {
|
|
|
5844
5889
|
let e = n.focusNode, t = n.focusOffset;
|
|
5845
5890
|
return e === null ? [null, 0] : (e.nodeType !== Node.TEXT_NODE && e.childNodes.length > 0 && (e.childNodes[t] ? (e = e.childNodes[t], t = 0) : (e = e.childNodes[t - 1], t = e.textContent.length)), [e, t]);
|
|
5846
5891
|
}
|
|
5847
|
-
function
|
|
5892
|
+
function hn(n, e, t, o) {
|
|
5848
5893
|
const i = document.createRange();
|
|
5849
5894
|
o === "left" ? (i.setStart(n, 0), i.setEnd(e, t)) : (i.setStart(e, t), i.setEnd(n, n.childNodes.length));
|
|
5850
5895
|
const s = i.cloneContents(), r = document.createElement("div");
|
|
@@ -5853,29 +5898,29 @@ function un(n, e, t, o) {
|
|
|
5853
5898
|
return ai(a);
|
|
5854
5899
|
}
|
|
5855
5900
|
function Re(n) {
|
|
5856
|
-
const e =
|
|
5857
|
-
if (e === null ||
|
|
5901
|
+
const e = h.getDeepestNode(n);
|
|
5902
|
+
if (e === null || h.isEmpty(n))
|
|
5858
5903
|
return !0;
|
|
5859
|
-
if (
|
|
5904
|
+
if (h.isNativeInput(e))
|
|
5860
5905
|
return e.selectionEnd === 0;
|
|
5861
|
-
if (
|
|
5906
|
+
if (h.isEmpty(n))
|
|
5862
5907
|
return !0;
|
|
5863
5908
|
const [t, o] = dn();
|
|
5864
|
-
return t === null ? !1 :
|
|
5909
|
+
return t === null ? !1 : hn(n, t, o, "left");
|
|
5865
5910
|
}
|
|
5866
5911
|
function De(n) {
|
|
5867
|
-
const e =
|
|
5912
|
+
const e = h.getDeepestNode(n, !0);
|
|
5868
5913
|
if (e === null)
|
|
5869
5914
|
return !0;
|
|
5870
|
-
if (
|
|
5915
|
+
if (h.isNativeInput(e))
|
|
5871
5916
|
return e.selectionEnd === e.value.length;
|
|
5872
5917
|
const [t, o] = dn();
|
|
5873
|
-
return t === null ? !1 :
|
|
5918
|
+
return t === null ? !1 : hn(n, t, o, "right");
|
|
5874
5919
|
}
|
|
5875
|
-
var
|
|
5920
|
+
var un = {}, St = {}, Ve = {}, de = {}, It = {}, Ot = {};
|
|
5876
5921
|
Object.defineProperty(Ot, "__esModule", { value: !0 });
|
|
5877
|
-
Ot.allInputsSelector =
|
|
5878
|
-
function
|
|
5922
|
+
Ot.allInputsSelector = zs;
|
|
5923
|
+
function zs() {
|
|
5879
5924
|
var n = ["text", "password", "email", "number", "search", "tel", "url"];
|
|
5880
5925
|
return "[contenteditable=true], textarea, input:not([type]), " + n.map(function(e) {
|
|
5881
5926
|
return 'input[type="'.concat(e, '"]');
|
|
@@ -5888,10 +5933,10 @@ function Ts() {
|
|
|
5888
5933
|
return e.allInputsSelector;
|
|
5889
5934
|
} });
|
|
5890
5935
|
})(It);
|
|
5891
|
-
var
|
|
5936
|
+
var he = {}, _t = {};
|
|
5892
5937
|
Object.defineProperty(_t, "__esModule", { value: !0 });
|
|
5893
|
-
_t.isNativeInput =
|
|
5894
|
-
function
|
|
5938
|
+
_t.isNativeInput = Us;
|
|
5939
|
+
function Us(n) {
|
|
5895
5940
|
var e = [
|
|
5896
5941
|
"INPUT",
|
|
5897
5942
|
"TEXTAREA"
|
|
@@ -5904,11 +5949,11 @@ function Ss(n) {
|
|
|
5904
5949
|
Object.defineProperty(n, "isNativeInput", { enumerable: !0, get: function() {
|
|
5905
5950
|
return e.isNativeInput;
|
|
5906
5951
|
} });
|
|
5907
|
-
})(
|
|
5952
|
+
})(he);
|
|
5908
5953
|
var pn = {}, Mt = {};
|
|
5909
5954
|
Object.defineProperty(Mt, "__esModule", { value: !0 });
|
|
5910
|
-
Mt.append =
|
|
5911
|
-
function
|
|
5955
|
+
Mt.append = Ws;
|
|
5956
|
+
function Ws(n, e) {
|
|
5912
5957
|
Array.isArray(e) ? e.forEach(function(t) {
|
|
5913
5958
|
n.appendChild(t);
|
|
5914
5959
|
}) : n.appendChild(e);
|
|
@@ -5920,10 +5965,10 @@ function Is(n, e) {
|
|
|
5920
5965
|
return e.append;
|
|
5921
5966
|
} });
|
|
5922
5967
|
})(pn);
|
|
5923
|
-
var
|
|
5924
|
-
Object.defineProperty(
|
|
5925
|
-
|
|
5926
|
-
function
|
|
5968
|
+
var Lt = {}, At = {};
|
|
5969
|
+
Object.defineProperty(At, "__esModule", { value: !0 });
|
|
5970
|
+
At.blockElements = Ys;
|
|
5971
|
+
function Ys() {
|
|
5927
5972
|
return [
|
|
5928
5973
|
"address",
|
|
5929
5974
|
"article",
|
|
@@ -5968,15 +6013,15 @@ function Os() {
|
|
|
5968
6013
|
}
|
|
5969
6014
|
(function(n) {
|
|
5970
6015
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.blockElements = void 0;
|
|
5971
|
-
var e =
|
|
6016
|
+
var e = At;
|
|
5972
6017
|
Object.defineProperty(n, "blockElements", { enumerable: !0, get: function() {
|
|
5973
6018
|
return e.blockElements;
|
|
5974
6019
|
} });
|
|
5975
|
-
})(
|
|
6020
|
+
})(Lt);
|
|
5976
6021
|
var fn = {}, Pt = {};
|
|
5977
6022
|
Object.defineProperty(Pt, "__esModule", { value: !0 });
|
|
5978
|
-
Pt.calculateBaseline =
|
|
5979
|
-
function
|
|
6023
|
+
Pt.calculateBaseline = Ks;
|
|
6024
|
+
function Ks(n) {
|
|
5980
6025
|
var e = window.getComputedStyle(n), t = parseFloat(e.fontSize), o = parseFloat(e.lineHeight) || t * 1.2, i = parseFloat(e.paddingTop), s = parseFloat(e.borderTopWidth), r = parseFloat(e.marginTop), a = t * 0.8, l = (o - t) / 2, c = r + s + i + l + a;
|
|
5981
6026
|
return c;
|
|
5982
6027
|
}
|
|
@@ -5989,8 +6034,8 @@ function _s(n) {
|
|
|
5989
6034
|
})(fn);
|
|
5990
6035
|
var gn = {}, Nt = {}, Rt = {}, Dt = {};
|
|
5991
6036
|
Object.defineProperty(Dt, "__esModule", { value: !0 });
|
|
5992
|
-
Dt.isContentEditable =
|
|
5993
|
-
function
|
|
6037
|
+
Dt.isContentEditable = Vs;
|
|
6038
|
+
function Vs(n) {
|
|
5994
6039
|
return n.contentEditable === "true";
|
|
5995
6040
|
}
|
|
5996
6041
|
(function(n) {
|
|
@@ -6001,11 +6046,11 @@ function Ms(n) {
|
|
|
6001
6046
|
} });
|
|
6002
6047
|
})(Rt);
|
|
6003
6048
|
Object.defineProperty(Nt, "__esModule", { value: !0 });
|
|
6004
|
-
Nt.canSetCaret =
|
|
6005
|
-
var
|
|
6006
|
-
function
|
|
6049
|
+
Nt.canSetCaret = Zs;
|
|
6050
|
+
var Xs = he, qs = Rt;
|
|
6051
|
+
function Zs(n) {
|
|
6007
6052
|
var e = !0;
|
|
6008
|
-
if ((0,
|
|
6053
|
+
if ((0, Xs.isNativeInput)(n))
|
|
6009
6054
|
switch (n.type) {
|
|
6010
6055
|
case "file":
|
|
6011
6056
|
case "checkbox":
|
|
@@ -6019,7 +6064,7 @@ function Ps(n) {
|
|
|
6019
6064
|
break;
|
|
6020
6065
|
}
|
|
6021
6066
|
else
|
|
6022
|
-
e = (0,
|
|
6067
|
+
e = (0, qs.isContentEditable)(n);
|
|
6023
6068
|
return e;
|
|
6024
6069
|
}
|
|
6025
6070
|
(function(n) {
|
|
@@ -6029,8 +6074,8 @@ function Ps(n) {
|
|
|
6029
6074
|
return e.canSetCaret;
|
|
6030
6075
|
} });
|
|
6031
6076
|
})(gn);
|
|
6032
|
-
var
|
|
6033
|
-
function
|
|
6077
|
+
var Xe = {}, Ft = {};
|
|
6078
|
+
function Gs(n, e, t) {
|
|
6034
6079
|
const o = t.value !== void 0 ? "value" : "get", i = t[o], s = `#${e}Cache`;
|
|
6035
6080
|
if (t[o] = function(...r) {
|
|
6036
6081
|
return this[s] === void 0 && (this[s] = i.apply(this, r)), this[s];
|
|
@@ -6051,21 +6096,21 @@ function mn() {
|
|
|
6051
6096
|
}, e = Object.keys(n).find((t) => window.navigator.appVersion.toLowerCase().indexOf(t) !== -1);
|
|
6052
6097
|
return e !== void 0 && (n[e] = !0), n;
|
|
6053
6098
|
}
|
|
6054
|
-
function
|
|
6099
|
+
function Ht(n) {
|
|
6055
6100
|
return n != null && n !== "" && (typeof n != "object" || Object.keys(n).length > 0);
|
|
6056
6101
|
}
|
|
6057
|
-
function
|
|
6058
|
-
return !
|
|
6102
|
+
function Js(n) {
|
|
6103
|
+
return !Ht(n);
|
|
6059
6104
|
}
|
|
6060
|
-
const
|
|
6061
|
-
function
|
|
6105
|
+
const Qs = () => typeof window < "u" && window.navigator !== null && Ht(window.navigator.platform) && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === "MacIntel" && window.navigator.maxTouchPoints > 1);
|
|
6106
|
+
function er(n) {
|
|
6062
6107
|
const e = mn();
|
|
6063
6108
|
return n = n.replace(/shift/gi, "⇧").replace(/backspace/gi, "⌫").replace(/enter/gi, "⏎").replace(/up/gi, "↑").replace(/left/gi, "→").replace(/down/gi, "↓").replace(/right/gi, "←").replace(/escape/gi, "⎋").replace(/insert/gi, "Ins").replace(/delete/gi, "␡").replace(/\+/gi, "+"), e.mac ? n = n.replace(/ctrl|cmd/gi, "⌘").replace(/alt/gi, "⌥") : n = n.replace(/cmd/gi, "Ctrl").replace(/windows/gi, "WIN"), n;
|
|
6064
6109
|
}
|
|
6065
|
-
function
|
|
6110
|
+
function tr(n) {
|
|
6066
6111
|
return n[0].toUpperCase() + n.slice(1);
|
|
6067
6112
|
}
|
|
6068
|
-
function
|
|
6113
|
+
function or(n) {
|
|
6069
6114
|
const e = document.createElement("div");
|
|
6070
6115
|
e.style.position = "absolute", e.style.left = "-999px", e.style.bottom = "-999px", e.innerHTML = n, document.body.appendChild(e);
|
|
6071
6116
|
const t = window.getSelection(), o = document.createRange();
|
|
@@ -6073,7 +6118,7 @@ function Hs(n) {
|
|
|
6073
6118
|
throw new Error("Cannot copy text to clipboard");
|
|
6074
6119
|
t.removeAllRanges(), t.addRange(o), document.execCommand("copy"), document.body.removeChild(e);
|
|
6075
6120
|
}
|
|
6076
|
-
function
|
|
6121
|
+
function nr(n, e, t) {
|
|
6077
6122
|
let o;
|
|
6078
6123
|
return (...i) => {
|
|
6079
6124
|
const s = this, r = () => {
|
|
@@ -6085,28 +6130,28 @@ function $s(n, e, t) {
|
|
|
6085
6130
|
function oe(n) {
|
|
6086
6131
|
return Object.prototype.toString.call(n).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
|
|
6087
6132
|
}
|
|
6088
|
-
function
|
|
6133
|
+
function ir(n) {
|
|
6089
6134
|
return oe(n) === "boolean";
|
|
6090
6135
|
}
|
|
6091
6136
|
function bn(n) {
|
|
6092
6137
|
return oe(n) === "function" || oe(n) === "asyncfunction";
|
|
6093
6138
|
}
|
|
6094
|
-
function
|
|
6139
|
+
function sr(n) {
|
|
6095
6140
|
return bn(n) && /^\s*class\s+/.test(n.toString());
|
|
6096
6141
|
}
|
|
6097
|
-
function
|
|
6142
|
+
function rr(n) {
|
|
6098
6143
|
return oe(n) === "number";
|
|
6099
6144
|
}
|
|
6100
6145
|
function Fe(n) {
|
|
6101
6146
|
return oe(n) === "object";
|
|
6102
6147
|
}
|
|
6103
|
-
function
|
|
6148
|
+
function ar(n) {
|
|
6104
6149
|
return Promise.resolve(n) === n;
|
|
6105
6150
|
}
|
|
6106
|
-
function
|
|
6151
|
+
function lr(n) {
|
|
6107
6152
|
return oe(n) === "string";
|
|
6108
6153
|
}
|
|
6109
|
-
function
|
|
6154
|
+
function cr(n) {
|
|
6110
6155
|
return oe(n) === "undefined";
|
|
6111
6156
|
}
|
|
6112
6157
|
function bt(n, ...e) {
|
|
@@ -6118,21 +6163,21 @@ function bt(n, ...e) {
|
|
|
6118
6163
|
Fe(t[o]) ? (n[o] === void 0 && Object.assign(n, { [o]: {} }), bt(n[o], t[o])) : Object.assign(n, { [o]: t[o] });
|
|
6119
6164
|
return bt(n, ...e);
|
|
6120
6165
|
}
|
|
6121
|
-
function
|
|
6166
|
+
function dr(n, e, t) {
|
|
6122
6167
|
const o = `«${e}» is deprecated and will be removed in the next major release. Please use the «${t}» instead.`;
|
|
6123
6168
|
n && console.warn(o);
|
|
6124
6169
|
}
|
|
6125
|
-
function
|
|
6170
|
+
function hr(n) {
|
|
6126
6171
|
try {
|
|
6127
6172
|
return new URL(n).href;
|
|
6128
6173
|
} catch {
|
|
6129
6174
|
}
|
|
6130
6175
|
return n.substring(0, 2) === "//" ? window.location.protocol + n : window.location.origin + n;
|
|
6131
6176
|
}
|
|
6132
|
-
function
|
|
6177
|
+
function ur(n) {
|
|
6133
6178
|
return n > 47 && n < 58 || n === 32 || n === 13 || n === 229 || n > 64 && n < 91 || n > 95 && n < 112 || n > 185 && n < 193 || n > 218 && n < 223;
|
|
6134
6179
|
}
|
|
6135
|
-
const
|
|
6180
|
+
const pr = {
|
|
6136
6181
|
BACKSPACE: 8,
|
|
6137
6182
|
TAB: 9,
|
|
6138
6183
|
ENTER: 13,
|
|
@@ -6148,14 +6193,14 @@ const Gs = {
|
|
|
6148
6193
|
DELETE: 46,
|
|
6149
6194
|
META: 91,
|
|
6150
6195
|
SLASH: 191
|
|
6151
|
-
},
|
|
6196
|
+
}, fr = {
|
|
6152
6197
|
LEFT: 0,
|
|
6153
6198
|
WHEEL: 1,
|
|
6154
6199
|
RIGHT: 2,
|
|
6155
6200
|
BACKWARD: 3,
|
|
6156
6201
|
FORWARD: 4
|
|
6157
6202
|
};
|
|
6158
|
-
let
|
|
6203
|
+
let gr = class {
|
|
6159
6204
|
constructor() {
|
|
6160
6205
|
this.completed = Promise.resolve();
|
|
6161
6206
|
}
|
|
@@ -6169,7 +6214,7 @@ let Js = class {
|
|
|
6169
6214
|
});
|
|
6170
6215
|
}
|
|
6171
6216
|
};
|
|
6172
|
-
function
|
|
6217
|
+
function mr(n, e, t = void 0) {
|
|
6173
6218
|
let o, i, s, r = null, a = 0;
|
|
6174
6219
|
t || (t = {});
|
|
6175
6220
|
const l = function() {
|
|
@@ -6182,43 +6227,43 @@ function er(n, e, t = void 0) {
|
|
|
6182
6227
|
return o = this, i = arguments, d <= 0 || d > e ? (r && (clearTimeout(r), r = null), a = c, s = n.apply(o, i), r === null && (o = i = null)) : !r && t.trailing !== !1 && (r = setTimeout(l, d)), s;
|
|
6183
6228
|
};
|
|
6184
6229
|
}
|
|
6185
|
-
const
|
|
6230
|
+
const br = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6186
6231
|
__proto__: null,
|
|
6187
|
-
PromiseQueue:
|
|
6188
|
-
beautifyShortcut:
|
|
6189
|
-
cacheable:
|
|
6190
|
-
capitalize:
|
|
6191
|
-
copyTextToClipboard:
|
|
6192
|
-
debounce:
|
|
6232
|
+
PromiseQueue: gr,
|
|
6233
|
+
beautifyShortcut: er,
|
|
6234
|
+
cacheable: Gs,
|
|
6235
|
+
capitalize: tr,
|
|
6236
|
+
copyTextToClipboard: or,
|
|
6237
|
+
debounce: nr,
|
|
6193
6238
|
deepMerge: bt,
|
|
6194
|
-
deprecationAssert:
|
|
6239
|
+
deprecationAssert: dr,
|
|
6195
6240
|
getUserOS: mn,
|
|
6196
|
-
getValidUrl:
|
|
6197
|
-
isBoolean:
|
|
6198
|
-
isClass:
|
|
6199
|
-
isEmpty:
|
|
6241
|
+
getValidUrl: hr,
|
|
6242
|
+
isBoolean: ir,
|
|
6243
|
+
isClass: sr,
|
|
6244
|
+
isEmpty: Js,
|
|
6200
6245
|
isFunction: bn,
|
|
6201
|
-
isIosDevice:
|
|
6202
|
-
isNumber:
|
|
6246
|
+
isIosDevice: Qs,
|
|
6247
|
+
isNumber: rr,
|
|
6203
6248
|
isObject: Fe,
|
|
6204
|
-
isPrintableKey:
|
|
6205
|
-
isPromise:
|
|
6206
|
-
isString:
|
|
6207
|
-
isUndefined:
|
|
6208
|
-
keyCodes:
|
|
6209
|
-
mouseButtons:
|
|
6210
|
-
notEmpty:
|
|
6211
|
-
throttle:
|
|
6249
|
+
isPrintableKey: ur,
|
|
6250
|
+
isPromise: ar,
|
|
6251
|
+
isString: lr,
|
|
6252
|
+
isUndefined: cr,
|
|
6253
|
+
keyCodes: pr,
|
|
6254
|
+
mouseButtons: fr,
|
|
6255
|
+
notEmpty: Ht,
|
|
6256
|
+
throttle: mr,
|
|
6212
6257
|
typeOf: oe
|
|
6213
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
6258
|
+
}, Symbol.toStringTag, { value: "Module" })), jt = /* @__PURE__ */ Vn(br);
|
|
6214
6259
|
Object.defineProperty(Ft, "__esModule", { value: !0 });
|
|
6215
|
-
Ft.containsOnlyInlineElements =
|
|
6216
|
-
var
|
|
6217
|
-
function
|
|
6260
|
+
Ft.containsOnlyInlineElements = yr;
|
|
6261
|
+
var vr = jt, kr = Lt;
|
|
6262
|
+
function yr(n) {
|
|
6218
6263
|
var e;
|
|
6219
|
-
(0,
|
|
6264
|
+
(0, vr.isString)(n) ? (e = document.createElement("div"), e.innerHTML = n) : e = n;
|
|
6220
6265
|
var t = function(o) {
|
|
6221
|
-
return !(0,
|
|
6266
|
+
return !(0, kr.blockElements)().includes(o.tagName.toLowerCase()) && Array.from(o.children).every(t);
|
|
6222
6267
|
};
|
|
6223
6268
|
return Array.from(e.children).every(t);
|
|
6224
6269
|
}
|
|
@@ -6228,11 +6273,11 @@ function ir(n) {
|
|
|
6228
6273
|
Object.defineProperty(n, "containsOnlyInlineElements", { enumerable: !0, get: function() {
|
|
6229
6274
|
return e.containsOnlyInlineElements;
|
|
6230
6275
|
} });
|
|
6231
|
-
})(
|
|
6276
|
+
})(Xe);
|
|
6232
6277
|
var vn = {}, $t = {}, qe = {}, zt = {};
|
|
6233
6278
|
Object.defineProperty(zt, "__esModule", { value: !0 });
|
|
6234
|
-
zt.make =
|
|
6235
|
-
function
|
|
6279
|
+
zt.make = wr;
|
|
6280
|
+
function wr(n, e, t) {
|
|
6236
6281
|
var o;
|
|
6237
6282
|
e === void 0 && (e = null), t === void 0 && (t = {});
|
|
6238
6283
|
var i = document.createElement(n);
|
|
@@ -6255,10 +6300,10 @@ function sr(n, e, t) {
|
|
|
6255
6300
|
} });
|
|
6256
6301
|
})(qe);
|
|
6257
6302
|
Object.defineProperty($t, "__esModule", { value: !0 });
|
|
6258
|
-
$t.fragmentToString =
|
|
6259
|
-
var
|
|
6260
|
-
function
|
|
6261
|
-
var e = (0,
|
|
6303
|
+
$t.fragmentToString = xr;
|
|
6304
|
+
var Er = qe;
|
|
6305
|
+
function xr(n) {
|
|
6306
|
+
var e = (0, Er.make)("div");
|
|
6262
6307
|
return e.appendChild(n), e.innerHTML;
|
|
6263
6308
|
}
|
|
6264
6309
|
(function(n) {
|
|
@@ -6270,11 +6315,11 @@ function ar(n) {
|
|
|
6270
6315
|
})(vn);
|
|
6271
6316
|
var kn = {}, Ut = {};
|
|
6272
6317
|
Object.defineProperty(Ut, "__esModule", { value: !0 });
|
|
6273
|
-
Ut.getContentLength =
|
|
6274
|
-
var
|
|
6275
|
-
function
|
|
6318
|
+
Ut.getContentLength = Br;
|
|
6319
|
+
var Cr = he;
|
|
6320
|
+
function Br(n) {
|
|
6276
6321
|
var e, t;
|
|
6277
|
-
return (0,
|
|
6322
|
+
return (0, Cr.isNativeInput)(n) ? n.value.length : n.nodeType === Node.TEXT_NODE ? n.length : (t = (e = n.textContent) === null || e === void 0 ? void 0 : e.length) !== null && t !== void 0 ? t : 0;
|
|
6278
6323
|
}
|
|
6279
6324
|
(function(n) {
|
|
6280
6325
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.getContentLength = void 0;
|
|
@@ -6283,7 +6328,7 @@ function cr(n) {
|
|
|
6283
6328
|
return e.getContentLength;
|
|
6284
6329
|
} });
|
|
6285
6330
|
})(kn);
|
|
6286
|
-
var Wt = {}, Yt = {}, Io =
|
|
6331
|
+
var Wt = {}, Yt = {}, Io = Be && Be.__spreadArray || function(n, e, t) {
|
|
6287
6332
|
if (t || arguments.length === 2)
|
|
6288
6333
|
for (var o = 0, i = e.length, s; o < i; o++)
|
|
6289
6334
|
(s || !(o in e)) && (s || (s = Array.prototype.slice.call(e, 0, o)), s[o] = e[o]);
|
|
@@ -6291,9 +6336,9 @@ var Wt = {}, Yt = {}, Io = Ce && Ce.__spreadArray || function(n, e, t) {
|
|
|
6291
6336
|
};
|
|
6292
6337
|
Object.defineProperty(Yt, "__esModule", { value: !0 });
|
|
6293
6338
|
Yt.getDeepestBlockElements = yn;
|
|
6294
|
-
var
|
|
6339
|
+
var Tr = Xe;
|
|
6295
6340
|
function yn(n) {
|
|
6296
|
-
return (0,
|
|
6341
|
+
return (0, Tr.containsOnlyInlineElements)(n) ? [n] : Array.from(n.children).reduce(function(e, t) {
|
|
6297
6342
|
return Io(Io([], e, !0), yn(t), !0);
|
|
6298
6343
|
}, []);
|
|
6299
6344
|
}
|
|
@@ -6304,10 +6349,10 @@ function yn(n) {
|
|
|
6304
6349
|
return e.getDeepestBlockElements;
|
|
6305
6350
|
} });
|
|
6306
6351
|
})(Wt);
|
|
6307
|
-
var wn = {}, Kt = {}, Ze = {},
|
|
6308
|
-
Object.defineProperty(
|
|
6309
|
-
|
|
6310
|
-
function
|
|
6352
|
+
var wn = {}, Kt = {}, Ze = {}, Vt = {};
|
|
6353
|
+
Object.defineProperty(Vt, "__esModule", { value: !0 });
|
|
6354
|
+
Vt.isLineBreakTag = Sr;
|
|
6355
|
+
function Sr(n) {
|
|
6311
6356
|
return [
|
|
6312
6357
|
"BR",
|
|
6313
6358
|
"WBR"
|
|
@@ -6315,15 +6360,15 @@ function ur(n) {
|
|
|
6315
6360
|
}
|
|
6316
6361
|
(function(n) {
|
|
6317
6362
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.isLineBreakTag = void 0;
|
|
6318
|
-
var e =
|
|
6363
|
+
var e = Vt;
|
|
6319
6364
|
Object.defineProperty(n, "isLineBreakTag", { enumerable: !0, get: function() {
|
|
6320
6365
|
return e.isLineBreakTag;
|
|
6321
6366
|
} });
|
|
6322
6367
|
})(Ze);
|
|
6323
|
-
var Ge = {},
|
|
6324
|
-
Object.defineProperty(
|
|
6325
|
-
|
|
6326
|
-
function
|
|
6368
|
+
var Ge = {}, Xt = {};
|
|
6369
|
+
Object.defineProperty(Xt, "__esModule", { value: !0 });
|
|
6370
|
+
Xt.isSingleTag = Ir;
|
|
6371
|
+
function Ir(n) {
|
|
6327
6372
|
return [
|
|
6328
6373
|
"AREA",
|
|
6329
6374
|
"BASE",
|
|
@@ -6345,20 +6390,20 @@ function hr(n) {
|
|
|
6345
6390
|
}
|
|
6346
6391
|
(function(n) {
|
|
6347
6392
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.isSingleTag = void 0;
|
|
6348
|
-
var e =
|
|
6393
|
+
var e = Xt;
|
|
6349
6394
|
Object.defineProperty(n, "isSingleTag", { enumerable: !0, get: function() {
|
|
6350
6395
|
return e.isSingleTag;
|
|
6351
6396
|
} });
|
|
6352
6397
|
})(Ge);
|
|
6353
6398
|
Object.defineProperty(Kt, "__esModule", { value: !0 });
|
|
6354
6399
|
Kt.getDeepestNode = En;
|
|
6355
|
-
var
|
|
6400
|
+
var Or = he, _r = Ze, Mr = Ge;
|
|
6356
6401
|
function En(n, e) {
|
|
6357
6402
|
e === void 0 && (e = !1);
|
|
6358
6403
|
var t = e ? "lastChild" : "firstChild", o = e ? "previousSibling" : "nextSibling";
|
|
6359
6404
|
if (n.nodeType === Node.ELEMENT_NODE && n[t]) {
|
|
6360
6405
|
var i = n[t];
|
|
6361
|
-
if ((0,
|
|
6406
|
+
if ((0, Mr.isSingleTag)(i) && !(0, Or.isNativeInput)(i) && !(0, _r.isLineBreakTag)(i))
|
|
6362
6407
|
if (i[o])
|
|
6363
6408
|
i = i[o];
|
|
6364
6409
|
else if (i.parentNode !== null && i.parentNode[o])
|
|
@@ -6376,18 +6421,18 @@ function En(n, e) {
|
|
|
6376
6421
|
return e.getDeepestNode;
|
|
6377
6422
|
} });
|
|
6378
6423
|
})(wn);
|
|
6379
|
-
var xn = {}, qt = {},
|
|
6424
|
+
var xn = {}, qt = {}, Le = Be && Be.__spreadArray || function(n, e, t) {
|
|
6380
6425
|
if (t || arguments.length === 2)
|
|
6381
6426
|
for (var o = 0, i = e.length, s; o < i; o++)
|
|
6382
6427
|
(s || !(o in e)) && (s || (s = Array.prototype.slice.call(e, 0, o)), s[o] = e[o]);
|
|
6383
6428
|
return n.concat(s || Array.prototype.slice.call(e));
|
|
6384
6429
|
};
|
|
6385
6430
|
Object.defineProperty(qt, "__esModule", { value: !0 });
|
|
6386
|
-
qt.findAllInputs =
|
|
6387
|
-
var
|
|
6388
|
-
function
|
|
6389
|
-
return Array.from(n.querySelectorAll((0,
|
|
6390
|
-
return (0,
|
|
6431
|
+
qt.findAllInputs = Rr;
|
|
6432
|
+
var Lr = Xe, Ar = Wt, Pr = It, Nr = he;
|
|
6433
|
+
function Rr(n) {
|
|
6434
|
+
return Array.from(n.querySelectorAll((0, Pr.allInputsSelector)())).reduce(function(e, t) {
|
|
6435
|
+
return (0, Nr.isNativeInput)(t) || (0, Lr.containsOnlyInlineElements)(t) ? Le(Le([], e, !0), [t], !1) : Le(Le([], e, !0), (0, Ar.getDeepestBlockElements)(t), !0);
|
|
6391
6436
|
}, []);
|
|
6392
6437
|
}
|
|
6393
6438
|
(function(n) {
|
|
@@ -6397,10 +6442,10 @@ function yr(n) {
|
|
|
6397
6442
|
return e.findAllInputs;
|
|
6398
6443
|
} });
|
|
6399
6444
|
})(xn);
|
|
6400
|
-
var
|
|
6445
|
+
var Cn = {}, Zt = {};
|
|
6401
6446
|
Object.defineProperty(Zt, "__esModule", { value: !0 });
|
|
6402
|
-
Zt.isCollapsedWhitespaces =
|
|
6403
|
-
function
|
|
6447
|
+
Zt.isCollapsedWhitespaces = Dr;
|
|
6448
|
+
function Dr(n) {
|
|
6404
6449
|
return !/[^\t\n\r ]/.test(n);
|
|
6405
6450
|
}
|
|
6406
6451
|
(function(n) {
|
|
@@ -6409,25 +6454,25 @@ function wr(n) {
|
|
|
6409
6454
|
Object.defineProperty(n, "isCollapsedWhitespaces", { enumerable: !0, get: function() {
|
|
6410
6455
|
return e.isCollapsedWhitespaces;
|
|
6411
6456
|
} });
|
|
6412
|
-
})(
|
|
6413
|
-
var Gt = {},
|
|
6414
|
-
Object.defineProperty(
|
|
6415
|
-
|
|
6416
|
-
var
|
|
6417
|
-
function
|
|
6418
|
-
return (0,
|
|
6457
|
+
})(Cn);
|
|
6458
|
+
var Gt = {}, Jt = {};
|
|
6459
|
+
Object.defineProperty(Jt, "__esModule", { value: !0 });
|
|
6460
|
+
Jt.isElement = Hr;
|
|
6461
|
+
var Fr = jt;
|
|
6462
|
+
function Hr(n) {
|
|
6463
|
+
return (0, Fr.isNumber)(n) ? !1 : !!n && !!n.nodeType && n.nodeType === Node.ELEMENT_NODE;
|
|
6419
6464
|
}
|
|
6420
6465
|
(function(n) {
|
|
6421
6466
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.isElement = void 0;
|
|
6422
|
-
var e =
|
|
6467
|
+
var e = Jt;
|
|
6423
6468
|
Object.defineProperty(n, "isElement", { enumerable: !0, get: function() {
|
|
6424
6469
|
return e.isElement;
|
|
6425
6470
|
} });
|
|
6426
6471
|
})(Gt);
|
|
6427
|
-
var
|
|
6472
|
+
var Bn = {}, Qt = {}, eo = {}, to = {};
|
|
6428
6473
|
Object.defineProperty(to, "__esModule", { value: !0 });
|
|
6429
|
-
to.isLeaf =
|
|
6430
|
-
function
|
|
6474
|
+
to.isLeaf = jr;
|
|
6475
|
+
function jr(n) {
|
|
6431
6476
|
return n === null ? !1 : n.childNodes.length === 0;
|
|
6432
6477
|
}
|
|
6433
6478
|
(function(n) {
|
|
@@ -6439,11 +6484,11 @@ function Br(n) {
|
|
|
6439
6484
|
})(eo);
|
|
6440
6485
|
var oo = {}, no = {};
|
|
6441
6486
|
Object.defineProperty(no, "__esModule", { value: !0 });
|
|
6442
|
-
no.isNodeEmpty =
|
|
6443
|
-
var
|
|
6444
|
-
function
|
|
6487
|
+
no.isNodeEmpty = Yr;
|
|
6488
|
+
var $r = Ze, zr = Gt, Ur = he, Wr = Ge;
|
|
6489
|
+
function Yr(n, e) {
|
|
6445
6490
|
var t = "";
|
|
6446
|
-
return (0,
|
|
6491
|
+
return (0, Wr.isSingleTag)(n) && !(0, $r.isLineBreakTag)(n) ? !1 : ((0, zr.isElement)(n) && (0, Ur.isNativeInput)(n) ? t = n.value : n.textContent !== null && (t = n.textContent.replace("", "")), e !== void 0 && (t = t.replace(new RegExp(e, "g"), "")), t.trim().length === 0);
|
|
6447
6492
|
}
|
|
6448
6493
|
(function(n) {
|
|
6449
6494
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.isNodeEmpty = void 0;
|
|
@@ -6452,15 +6497,15 @@ function Or(n, e) {
|
|
|
6452
6497
|
return e.isNodeEmpty;
|
|
6453
6498
|
} });
|
|
6454
6499
|
})(oo);
|
|
6455
|
-
Object.defineProperty(
|
|
6456
|
-
|
|
6457
|
-
var
|
|
6458
|
-
function
|
|
6500
|
+
Object.defineProperty(Qt, "__esModule", { value: !0 });
|
|
6501
|
+
Qt.isEmpty = Xr;
|
|
6502
|
+
var Kr = eo, Vr = oo;
|
|
6503
|
+
function Xr(n, e) {
|
|
6459
6504
|
n.normalize();
|
|
6460
6505
|
for (var t = [n]; t.length > 0; ) {
|
|
6461
6506
|
var o = t.shift();
|
|
6462
6507
|
if (o) {
|
|
6463
|
-
if (n = o, (0,
|
|
6508
|
+
if (n = o, (0, Kr.isLeaf)(n) && !(0, Vr.isNodeEmpty)(n, e))
|
|
6464
6509
|
return !1;
|
|
6465
6510
|
t.push.apply(t, Array.from(n.childNodes));
|
|
6466
6511
|
}
|
|
@@ -6469,17 +6514,17 @@ function Ar(n, e) {
|
|
|
6469
6514
|
}
|
|
6470
6515
|
(function(n) {
|
|
6471
6516
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.isEmpty = void 0;
|
|
6472
|
-
var e =
|
|
6517
|
+
var e = Qt;
|
|
6473
6518
|
Object.defineProperty(n, "isEmpty", { enumerable: !0, get: function() {
|
|
6474
6519
|
return e.isEmpty;
|
|
6475
6520
|
} });
|
|
6476
|
-
})(
|
|
6521
|
+
})(Bn);
|
|
6477
6522
|
var Tn = {}, io = {};
|
|
6478
6523
|
Object.defineProperty(io, "__esModule", { value: !0 });
|
|
6479
|
-
io.isFragment =
|
|
6480
|
-
var
|
|
6481
|
-
function
|
|
6482
|
-
return (0,
|
|
6524
|
+
io.isFragment = Zr;
|
|
6525
|
+
var qr = jt;
|
|
6526
|
+
function Zr(n) {
|
|
6527
|
+
return (0, qr.isNumber)(n) ? !1 : !!n && !!n.nodeType && n.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
|
|
6483
6528
|
}
|
|
6484
6529
|
(function(n) {
|
|
6485
6530
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.isFragment = void 0;
|
|
@@ -6490,10 +6535,10 @@ function Pr(n) {
|
|
|
6490
6535
|
})(Tn);
|
|
6491
6536
|
var Sn = {}, so = {};
|
|
6492
6537
|
Object.defineProperty(so, "__esModule", { value: !0 });
|
|
6493
|
-
so.isHTMLString =
|
|
6494
|
-
var
|
|
6495
|
-
function
|
|
6496
|
-
var e = (0,
|
|
6538
|
+
so.isHTMLString = Jr;
|
|
6539
|
+
var Gr = qe;
|
|
6540
|
+
function Jr(n) {
|
|
6541
|
+
var e = (0, Gr.make)("div");
|
|
6497
6542
|
return e.innerHTML = n, e.childElementCount > 0;
|
|
6498
6543
|
}
|
|
6499
6544
|
(function(n) {
|
|
@@ -6505,8 +6550,8 @@ function Rr(n) {
|
|
|
6505
6550
|
})(Sn);
|
|
6506
6551
|
var In = {}, ro = {};
|
|
6507
6552
|
Object.defineProperty(ro, "__esModule", { value: !0 });
|
|
6508
|
-
ro.offset =
|
|
6509
|
-
function
|
|
6553
|
+
ro.offset = Qr;
|
|
6554
|
+
function Qr(n) {
|
|
6510
6555
|
var e = n.getBoundingClientRect(), t = window.pageXOffset || document.documentElement.scrollLeft, o = window.pageYOffset || document.documentElement.scrollTop, i = e.top + o, s = e.left + t;
|
|
6511
6556
|
return {
|
|
6512
6557
|
top: i,
|
|
@@ -6524,8 +6569,8 @@ function Dr(n) {
|
|
|
6524
6569
|
})(In);
|
|
6525
6570
|
var On = {}, ao = {};
|
|
6526
6571
|
Object.defineProperty(ao, "__esModule", { value: !0 });
|
|
6527
|
-
ao.prepend =
|
|
6528
|
-
function
|
|
6572
|
+
ao.prepend = ea;
|
|
6573
|
+
function ea(n, e) {
|
|
6529
6574
|
Array.isArray(e) ? (e = e.reverse(), e.forEach(function(t) {
|
|
6530
6575
|
return n.prepend(t);
|
|
6531
6576
|
})) : n.prepend(e);
|
|
@@ -6543,7 +6588,7 @@ function Fr(n, e) {
|
|
|
6543
6588
|
Object.defineProperty(n, "allInputsSelector", { enumerable: !0, get: function() {
|
|
6544
6589
|
return e.allInputsSelector;
|
|
6545
6590
|
} });
|
|
6546
|
-
var t =
|
|
6591
|
+
var t = he;
|
|
6547
6592
|
Object.defineProperty(n, "isNativeInput", { enumerable: !0, get: function() {
|
|
6548
6593
|
return t.isNativeInput;
|
|
6549
6594
|
} });
|
|
@@ -6551,7 +6596,7 @@ function Fr(n, e) {
|
|
|
6551
6596
|
Object.defineProperty(n, "append", { enumerable: !0, get: function() {
|
|
6552
6597
|
return o.append;
|
|
6553
6598
|
} });
|
|
6554
|
-
var i =
|
|
6599
|
+
var i = Lt;
|
|
6555
6600
|
Object.defineProperty(n, "blockElements", { enumerable: !0, get: function() {
|
|
6556
6601
|
return i.blockElements;
|
|
6557
6602
|
} });
|
|
@@ -6563,7 +6608,7 @@ function Fr(n, e) {
|
|
|
6563
6608
|
Object.defineProperty(n, "canSetCaret", { enumerable: !0, get: function() {
|
|
6564
6609
|
return r.canSetCaret;
|
|
6565
6610
|
} });
|
|
6566
|
-
var a =
|
|
6611
|
+
var a = Xe;
|
|
6567
6612
|
Object.defineProperty(n, "containsOnlyInlineElements", { enumerable: !0, get: function() {
|
|
6568
6613
|
return a.containsOnlyInlineElements;
|
|
6569
6614
|
} });
|
|
@@ -6579,15 +6624,15 @@ function Fr(n, e) {
|
|
|
6579
6624
|
Object.defineProperty(n, "getDeepestBlockElements", { enumerable: !0, get: function() {
|
|
6580
6625
|
return d.getDeepestBlockElements;
|
|
6581
6626
|
} });
|
|
6582
|
-
var
|
|
6627
|
+
var u = wn;
|
|
6583
6628
|
Object.defineProperty(n, "getDeepestNode", { enumerable: !0, get: function() {
|
|
6584
|
-
return
|
|
6629
|
+
return u.getDeepestNode;
|
|
6585
6630
|
} });
|
|
6586
6631
|
var p = xn;
|
|
6587
6632
|
Object.defineProperty(n, "findAllInputs", { enumerable: !0, get: function() {
|
|
6588
6633
|
return p.findAllInputs;
|
|
6589
6634
|
} });
|
|
6590
|
-
var g =
|
|
6635
|
+
var g = Cn;
|
|
6591
6636
|
Object.defineProperty(n, "isCollapsedWhitespaces", { enumerable: !0, get: function() {
|
|
6592
6637
|
return g.isCollapsedWhitespaces;
|
|
6593
6638
|
} });
|
|
@@ -6599,33 +6644,33 @@ function Fr(n, e) {
|
|
|
6599
6644
|
Object.defineProperty(n, "isElement", { enumerable: !0, get: function() {
|
|
6600
6645
|
return v.isElement;
|
|
6601
6646
|
} });
|
|
6602
|
-
var
|
|
6647
|
+
var B = Bn;
|
|
6603
6648
|
Object.defineProperty(n, "isEmpty", { enumerable: !0, get: function() {
|
|
6604
|
-
return
|
|
6649
|
+
return B.isEmpty;
|
|
6605
6650
|
} });
|
|
6606
|
-
var
|
|
6651
|
+
var x = Tn;
|
|
6607
6652
|
Object.defineProperty(n, "isFragment", { enumerable: !0, get: function() {
|
|
6608
|
-
return
|
|
6653
|
+
return x.isFragment;
|
|
6609
6654
|
} });
|
|
6610
|
-
var
|
|
6655
|
+
var _ = Sn;
|
|
6611
6656
|
Object.defineProperty(n, "isHTMLString", { enumerable: !0, get: function() {
|
|
6612
|
-
return
|
|
6657
|
+
return _.isHTMLString;
|
|
6613
6658
|
} });
|
|
6614
6659
|
var q = eo;
|
|
6615
6660
|
Object.defineProperty(n, "isLeaf", { enumerable: !0, get: function() {
|
|
6616
6661
|
return q.isLeaf;
|
|
6617
6662
|
} });
|
|
6618
|
-
var
|
|
6663
|
+
var H = oo;
|
|
6619
6664
|
Object.defineProperty(n, "isNodeEmpty", { enumerable: !0, get: function() {
|
|
6620
|
-
return
|
|
6665
|
+
return H.isNodeEmpty;
|
|
6621
6666
|
} });
|
|
6622
6667
|
var z = Ze;
|
|
6623
6668
|
Object.defineProperty(n, "isLineBreakTag", { enumerable: !0, get: function() {
|
|
6624
6669
|
return z.isLineBreakTag;
|
|
6625
6670
|
} });
|
|
6626
|
-
var
|
|
6671
|
+
var J = Ge;
|
|
6627
6672
|
Object.defineProperty(n, "isSingleTag", { enumerable: !0, get: function() {
|
|
6628
|
-
return
|
|
6673
|
+
return J.isSingleTag;
|
|
6629
6674
|
} });
|
|
6630
6675
|
var ie = qe;
|
|
6631
6676
|
Object.defineProperty(n, "make", { enumerable: !0, get: function() {
|
|
@@ -6640,33 +6685,33 @@ function Fr(n, e) {
|
|
|
6640
6685
|
return m.prepend;
|
|
6641
6686
|
} });
|
|
6642
6687
|
})(de);
|
|
6643
|
-
var
|
|
6644
|
-
Object.defineProperty(
|
|
6645
|
-
|
|
6646
|
-
var
|
|
6647
|
-
function
|
|
6688
|
+
var Je = {};
|
|
6689
|
+
Object.defineProperty(Je, "__esModule", { value: !0 });
|
|
6690
|
+
Je.getContenteditableSlice = oa;
|
|
6691
|
+
var ta = de;
|
|
6692
|
+
function oa(n, e, t, o, i) {
|
|
6648
6693
|
var s;
|
|
6649
6694
|
i === void 0 && (i = !1);
|
|
6650
6695
|
var r = document.createRange();
|
|
6651
6696
|
if (o === "left" ? (r.setStart(n, 0), r.setEnd(e, t)) : (r.setStart(e, t), r.setEnd(n, n.childNodes.length)), i === !0) {
|
|
6652
6697
|
var a = r.extractContents();
|
|
6653
|
-
return (0,
|
|
6698
|
+
return (0, ta.fragmentToString)(a);
|
|
6654
6699
|
}
|
|
6655
6700
|
var l = r.cloneContents(), c = document.createElement("div");
|
|
6656
6701
|
c.appendChild(l);
|
|
6657
6702
|
var d = (s = c.textContent) !== null && s !== void 0 ? s : "";
|
|
6658
6703
|
return d;
|
|
6659
6704
|
}
|
|
6660
|
-
Object.defineProperty(
|
|
6661
|
-
|
|
6662
|
-
var
|
|
6663
|
-
function
|
|
6664
|
-
var i = (0,
|
|
6665
|
-
return (0,
|
|
6705
|
+
Object.defineProperty(Ve, "__esModule", { value: !0 });
|
|
6706
|
+
Ve.checkContenteditableSliceForEmptiness = sa;
|
|
6707
|
+
var na = de, ia = Je;
|
|
6708
|
+
function sa(n, e, t, o) {
|
|
6709
|
+
var i = (0, ia.getContenteditableSlice)(n, e, t, o);
|
|
6710
|
+
return (0, na.isCollapsedWhitespaces)(i);
|
|
6666
6711
|
}
|
|
6667
6712
|
(function(n) {
|
|
6668
6713
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.checkContenteditableSliceForEmptiness = void 0;
|
|
6669
|
-
var e =
|
|
6714
|
+
var e = Ve;
|
|
6670
6715
|
Object.defineProperty(n, "checkContenteditableSliceForEmptiness", { enumerable: !0, get: function() {
|
|
6671
6716
|
return e.checkContenteditableSliceForEmptiness;
|
|
6672
6717
|
} });
|
|
@@ -6674,18 +6719,18 @@ function Ur(n, e, t, o) {
|
|
|
6674
6719
|
var _n = {};
|
|
6675
6720
|
(function(n) {
|
|
6676
6721
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.getContenteditableSlice = void 0;
|
|
6677
|
-
var e =
|
|
6722
|
+
var e = Je;
|
|
6678
6723
|
Object.defineProperty(n, "getContenteditableSlice", { enumerable: !0, get: function() {
|
|
6679
6724
|
return e.getContenteditableSlice;
|
|
6680
6725
|
} });
|
|
6681
6726
|
})(_n);
|
|
6682
6727
|
var Mn = {}, lo = {};
|
|
6683
6728
|
Object.defineProperty(lo, "__esModule", { value: !0 });
|
|
6684
|
-
lo.focus =
|
|
6685
|
-
var
|
|
6686
|
-
function
|
|
6729
|
+
lo.focus = aa;
|
|
6730
|
+
var ra = de;
|
|
6731
|
+
function aa(n, e) {
|
|
6687
6732
|
var t, o;
|
|
6688
|
-
if (e === void 0 && (e = !0), (0,
|
|
6733
|
+
if (e === void 0 && (e = !0), (0, ra.isNativeInput)(n)) {
|
|
6689
6734
|
n.focus();
|
|
6690
6735
|
var i = e ? 0 : n.value.length;
|
|
6691
6736
|
n.setSelectionRange(i, i);
|
|
@@ -6704,7 +6749,7 @@ function Yr(n, e) {
|
|
|
6704
6749
|
for (; l(d) && d.nodeType !== Node.TEXT_NODE; )
|
|
6705
6750
|
d = e ? d.firstChild : d.lastChild;
|
|
6706
6751
|
if (l(d) && d.nodeType === Node.TEXT_NODE) {
|
|
6707
|
-
var
|
|
6752
|
+
var u = (o = (t = d.textContent) === null || t === void 0 ? void 0 : t.length) !== null && o !== void 0 ? o : 0, i = e ? 0 : u;
|
|
6708
6753
|
s.setStart(d, i), s.setEnd(d, i);
|
|
6709
6754
|
} else
|
|
6710
6755
|
a(n, e);
|
|
@@ -6720,10 +6765,10 @@ function Yr(n, e) {
|
|
|
6720
6765
|
return e.focus;
|
|
6721
6766
|
} });
|
|
6722
6767
|
})(Mn);
|
|
6723
|
-
var co = {},
|
|
6724
|
-
Object.defineProperty(
|
|
6725
|
-
|
|
6726
|
-
function
|
|
6768
|
+
var co = {}, Qe = {};
|
|
6769
|
+
Object.defineProperty(Qe, "__esModule", { value: !0 });
|
|
6770
|
+
Qe.getCaretNodeAndOffset = la;
|
|
6771
|
+
function la() {
|
|
6727
6772
|
var n = window.getSelection();
|
|
6728
6773
|
if (n === null)
|
|
6729
6774
|
return [null, 0];
|
|
@@ -6732,15 +6777,15 @@ function Kr() {
|
|
|
6732
6777
|
}
|
|
6733
6778
|
(function(n) {
|
|
6734
6779
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.getCaretNodeAndOffset = void 0;
|
|
6735
|
-
var e =
|
|
6780
|
+
var e = Qe;
|
|
6736
6781
|
Object.defineProperty(n, "getCaretNodeAndOffset", { enumerable: !0, get: function() {
|
|
6737
6782
|
return e.getCaretNodeAndOffset;
|
|
6738
6783
|
} });
|
|
6739
6784
|
})(co);
|
|
6740
|
-
var
|
|
6785
|
+
var Ln = {}, et = {};
|
|
6741
6786
|
Object.defineProperty(et, "__esModule", { value: !0 });
|
|
6742
|
-
et.getRange =
|
|
6743
|
-
function
|
|
6787
|
+
et.getRange = ca;
|
|
6788
|
+
function ca() {
|
|
6744
6789
|
var n = window.getSelection();
|
|
6745
6790
|
return n && n.rangeCount ? n.getRangeAt(0) : null;
|
|
6746
6791
|
}
|
|
@@ -6750,55 +6795,55 @@ function Xr() {
|
|
|
6750
6795
|
Object.defineProperty(n, "getRange", { enumerable: !0, get: function() {
|
|
6751
6796
|
return e.getRange;
|
|
6752
6797
|
} });
|
|
6753
|
-
})(
|
|
6754
|
-
var
|
|
6755
|
-
Object.defineProperty(
|
|
6756
|
-
|
|
6757
|
-
var Oo = de,
|
|
6758
|
-
function
|
|
6798
|
+
})(Ln);
|
|
6799
|
+
var An = {}, ho = {};
|
|
6800
|
+
Object.defineProperty(ho, "__esModule", { value: !0 });
|
|
6801
|
+
ho.isCaretAtEndOfInput = ua;
|
|
6802
|
+
var Oo = de, da = co, ha = St;
|
|
6803
|
+
function ua(n) {
|
|
6759
6804
|
var e = (0, Oo.getDeepestNode)(n, !0);
|
|
6760
6805
|
if (e === null)
|
|
6761
6806
|
return !0;
|
|
6762
6807
|
if ((0, Oo.isNativeInput)(e))
|
|
6763
6808
|
return e.selectionEnd === e.value.length;
|
|
6764
|
-
var t = (0,
|
|
6765
|
-
return o === null ? !1 : (0,
|
|
6809
|
+
var t = (0, da.getCaretNodeAndOffset)(), o = t[0], i = t[1];
|
|
6810
|
+
return o === null ? !1 : (0, ha.checkContenteditableSliceForEmptiness)(n, o, i, "right");
|
|
6766
6811
|
}
|
|
6767
6812
|
(function(n) {
|
|
6768
6813
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.isCaretAtEndOfInput = void 0;
|
|
6769
|
-
var e =
|
|
6814
|
+
var e = ho;
|
|
6770
6815
|
Object.defineProperty(n, "isCaretAtEndOfInput", { enumerable: !0, get: function() {
|
|
6771
6816
|
return e.isCaretAtEndOfInput;
|
|
6772
6817
|
} });
|
|
6773
|
-
})(
|
|
6774
|
-
var Pn = {},
|
|
6775
|
-
Object.defineProperty(
|
|
6776
|
-
|
|
6777
|
-
var
|
|
6778
|
-
function
|
|
6779
|
-
var e = (0,
|
|
6780
|
-
if (e === null || (0,
|
|
6818
|
+
})(An);
|
|
6819
|
+
var Pn = {}, uo = {};
|
|
6820
|
+
Object.defineProperty(uo, "__esModule", { value: !0 });
|
|
6821
|
+
uo.isCaretAtStartOfInput = ga;
|
|
6822
|
+
var Ae = de, pa = Qe, fa = Ve;
|
|
6823
|
+
function ga(n) {
|
|
6824
|
+
var e = (0, Ae.getDeepestNode)(n);
|
|
6825
|
+
if (e === null || (0, Ae.isEmpty)(n))
|
|
6781
6826
|
return !0;
|
|
6782
|
-
if ((0,
|
|
6827
|
+
if ((0, Ae.isNativeInput)(e))
|
|
6783
6828
|
return e.selectionEnd === 0;
|
|
6784
|
-
if ((0,
|
|
6829
|
+
if ((0, Ae.isEmpty)(n))
|
|
6785
6830
|
return !0;
|
|
6786
|
-
var t = (0,
|
|
6787
|
-
return o === null ? !1 : (0,
|
|
6831
|
+
var t = (0, pa.getCaretNodeAndOffset)(), o = t[0], i = t[1];
|
|
6832
|
+
return o === null ? !1 : (0, fa.checkContenteditableSliceForEmptiness)(n, o, i, "left");
|
|
6788
6833
|
}
|
|
6789
6834
|
(function(n) {
|
|
6790
6835
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.isCaretAtStartOfInput = void 0;
|
|
6791
|
-
var e =
|
|
6836
|
+
var e = uo;
|
|
6792
6837
|
Object.defineProperty(n, "isCaretAtStartOfInput", { enumerable: !0, get: function() {
|
|
6793
6838
|
return e.isCaretAtStartOfInput;
|
|
6794
6839
|
} });
|
|
6795
6840
|
})(Pn);
|
|
6796
6841
|
var Nn = {}, po = {};
|
|
6797
6842
|
Object.defineProperty(po, "__esModule", { value: !0 });
|
|
6798
|
-
po.save =
|
|
6799
|
-
var
|
|
6800
|
-
function
|
|
6801
|
-
var n = (0,
|
|
6843
|
+
po.save = va;
|
|
6844
|
+
var ma = de, ba = et;
|
|
6845
|
+
function va() {
|
|
6846
|
+
var n = (0, ba.getRange)(), e = (0, ma.make)("span");
|
|
6802
6847
|
if (e.id = "cursor", e.hidden = !0, !!n)
|
|
6803
6848
|
return n.insertNode(e), function() {
|
|
6804
6849
|
var o = window.getSelection();
|
|
@@ -6832,11 +6877,11 @@ function oa() {
|
|
|
6832
6877
|
Object.defineProperty(n, "getCaretNodeAndOffset", { enumerable: !0, get: function() {
|
|
6833
6878
|
return i.getCaretNodeAndOffset;
|
|
6834
6879
|
} });
|
|
6835
|
-
var s =
|
|
6880
|
+
var s = Ln;
|
|
6836
6881
|
Object.defineProperty(n, "getRange", { enumerable: !0, get: function() {
|
|
6837
6882
|
return s.getRange;
|
|
6838
6883
|
} });
|
|
6839
|
-
var r =
|
|
6884
|
+
var r = An;
|
|
6840
6885
|
Object.defineProperty(n, "isCaretAtEndOfInput", { enumerable: !0, get: function() {
|
|
6841
6886
|
return r.isCaretAtEndOfInput;
|
|
6842
6887
|
} });
|
|
@@ -6848,8 +6893,8 @@ function oa() {
|
|
|
6848
6893
|
Object.defineProperty(n, "save", { enumerable: !0, get: function() {
|
|
6849
6894
|
return l.save;
|
|
6850
6895
|
} });
|
|
6851
|
-
})(
|
|
6852
|
-
class
|
|
6896
|
+
})(un);
|
|
6897
|
+
class ka extends E {
|
|
6853
6898
|
/**
|
|
6854
6899
|
* All keydowns on Block
|
|
6855
6900
|
*
|
|
@@ -7037,7 +7082,7 @@ class na extends E {
|
|
|
7037
7082
|
*/
|
|
7038
7083
|
mergeBlocks(e, t) {
|
|
7039
7084
|
const { BlockManager: o, Toolbar: i } = this.Editor;
|
|
7040
|
-
e.lastInput !== void 0 && (
|
|
7085
|
+
e.lastInput !== void 0 && (un.focus(e.lastInput, !1), o.mergeBlocks(e, t).then(() => {
|
|
7041
7086
|
i.close();
|
|
7042
7087
|
}));
|
|
7043
7088
|
}
|
|
@@ -7060,7 +7105,7 @@ class na extends E {
|
|
|
7060
7105
|
e.preventDefault();
|
|
7061
7106
|
return;
|
|
7062
7107
|
}
|
|
7063
|
-
|
|
7108
|
+
He(() => {
|
|
7064
7109
|
this.Editor.BlockManager.currentBlock && this.Editor.BlockManager.currentBlock.updateCurrentInput();
|
|
7065
7110
|
}, 20)(), this.Editor.BlockSelection.clearSelection(e);
|
|
7066
7111
|
}
|
|
@@ -7085,7 +7130,7 @@ class na extends E {
|
|
|
7085
7130
|
e.preventDefault();
|
|
7086
7131
|
return;
|
|
7087
7132
|
}
|
|
7088
|
-
|
|
7133
|
+
He(() => {
|
|
7089
7134
|
this.Editor.BlockManager.currentBlock && this.Editor.BlockManager.currentBlock.updateCurrentInput();
|
|
7090
7135
|
}, 20)(), this.Editor.BlockSelection.clearSelection(e);
|
|
7091
7136
|
}
|
|
@@ -7183,7 +7228,7 @@ class ct {
|
|
|
7183
7228
|
*/
|
|
7184
7229
|
swap(e, t) {
|
|
7185
7230
|
const o = this.blocks[t];
|
|
7186
|
-
|
|
7231
|
+
h.swap(this.blocks[e].holder, o.holder), this.blocks[t] = this.blocks[e], this.blocks[e] = o;
|
|
7187
7232
|
}
|
|
7188
7233
|
/**
|
|
7189
7234
|
* Move a block from one to another index
|
|
@@ -7319,8 +7364,8 @@ class ct {
|
|
|
7319
7364
|
});
|
|
7320
7365
|
}
|
|
7321
7366
|
}
|
|
7322
|
-
const _o = "block-removed", Mo = "block-added",
|
|
7323
|
-
class
|
|
7367
|
+
const _o = "block-removed", Mo = "block-added", ya = "block-moved", Lo = "block-changed";
|
|
7368
|
+
class wa {
|
|
7324
7369
|
constructor() {
|
|
7325
7370
|
this.completed = Promise.resolve();
|
|
7326
7371
|
}
|
|
@@ -7335,7 +7380,7 @@ class sa {
|
|
|
7335
7380
|
});
|
|
7336
7381
|
}
|
|
7337
7382
|
}
|
|
7338
|
-
class
|
|
7383
|
+
class Ea extends E {
|
|
7339
7384
|
constructor() {
|
|
7340
7385
|
super(...arguments), this._currentBlockIndex = -1, this._blocks = null;
|
|
7341
7386
|
}
|
|
@@ -7556,7 +7601,7 @@ class ra extends E {
|
|
|
7556
7601
|
data: Object.assign({}, i, t ?? {}),
|
|
7557
7602
|
tunes: o ?? e.tunes
|
|
7558
7603
|
}), r = this.getBlockIndex(e);
|
|
7559
|
-
return this._blocks.replace(r, s), this.blockDidMutated(
|
|
7604
|
+
return this._blocks.replace(r, s), this.blockDidMutated(Lo, s, {
|
|
7560
7605
|
index: r
|
|
7561
7606
|
}), s;
|
|
7562
7607
|
}
|
|
@@ -7593,7 +7638,7 @@ class ra extends E {
|
|
|
7593
7638
|
i.call(ee.ON_PASTE, t);
|
|
7594
7639
|
});
|
|
7595
7640
|
} catch (s) {
|
|
7596
|
-
|
|
7641
|
+
I(`${e}: onPaste callback call is failed`, "error", s);
|
|
7597
7642
|
}
|
|
7598
7643
|
return i;
|
|
7599
7644
|
}
|
|
@@ -7631,15 +7676,15 @@ class ra extends E {
|
|
|
7631
7676
|
let o;
|
|
7632
7677
|
if (e.name === t.name && e.mergeable) {
|
|
7633
7678
|
const i = await t.data;
|
|
7634
|
-
if (
|
|
7679
|
+
if (X(i)) {
|
|
7635
7680
|
console.error("Could not merge Block. Failed to extract original Block data.");
|
|
7636
7681
|
return;
|
|
7637
7682
|
}
|
|
7638
7683
|
const [s] = yt([i], e.tool.sanitizeConfig);
|
|
7639
7684
|
o = s;
|
|
7640
|
-
} else if (e.mergeable &&
|
|
7685
|
+
} else if (e.mergeable && je(t, "export") && je(e, "import")) {
|
|
7641
7686
|
const i = await t.exportDataAsString(), s = Z(i, e.tool.sanitizeConfig);
|
|
7642
|
-
o =
|
|
7687
|
+
o = Co(s, e.tool.conversionConfig);
|
|
7643
7688
|
}
|
|
7644
7689
|
o !== void 0 && (await e.mergeWith(o), this.removeBlock(t), this.currentBlockIndex = this._blocks.indexOf(e));
|
|
7645
7690
|
}
|
|
@@ -7689,10 +7734,10 @@ class ra extends E {
|
|
|
7689
7734
|
* @returns {Block}
|
|
7690
7735
|
*/
|
|
7691
7736
|
split() {
|
|
7692
|
-
const e = this.Editor.Caret.extractFragmentFromCaretPosition(), t =
|
|
7737
|
+
const e = this.Editor.Caret.extractFragmentFromCaretPosition(), t = h.make("div");
|
|
7693
7738
|
t.appendChild(e);
|
|
7694
7739
|
const o = {
|
|
7695
|
-
text:
|
|
7740
|
+
text: h.isEmpty(t) ? "" : t.innerHTML
|
|
7696
7741
|
};
|
|
7697
7742
|
return this.insert({ data: o });
|
|
7698
7743
|
}
|
|
@@ -7728,7 +7773,7 @@ class ra extends E {
|
|
|
7728
7773
|
* @param {Node} element - html element to get Block by
|
|
7729
7774
|
*/
|
|
7730
7775
|
getBlock(e) {
|
|
7731
|
-
|
|
7776
|
+
h.isElement(e) || (e = e.parentNode);
|
|
7732
7777
|
const t = this._blocks.nodes, o = e.closest(`.${D.CSS.wrapper}`), i = t.indexOf(o);
|
|
7733
7778
|
if (i >= 0)
|
|
7734
7779
|
return this._blocks[i];
|
|
@@ -7741,7 +7786,7 @@ class ra extends E {
|
|
|
7741
7786
|
* @returns {Block | undefined} can return undefined in case when the passed child note is not a part of the current editor instance
|
|
7742
7787
|
*/
|
|
7743
7788
|
setCurrentBlockByChildNode(e) {
|
|
7744
|
-
|
|
7789
|
+
h.isElement(e) || (e = e.parentNode);
|
|
7745
7790
|
const t = e.closest(`.${D.CSS.wrapper}`);
|
|
7746
7791
|
if (!t)
|
|
7747
7792
|
return;
|
|
@@ -7758,7 +7803,7 @@ class ra extends E {
|
|
|
7758
7803
|
getBlockByChildNode(e) {
|
|
7759
7804
|
if (!e || !(e instanceof Node))
|
|
7760
7805
|
return;
|
|
7761
|
-
|
|
7806
|
+
h.isElement(e) || (e = e.parentNode);
|
|
7762
7807
|
const t = e.closest(`.${D.CSS.wrapper}`);
|
|
7763
7808
|
return this.blocks.find((o) => o.holder === t);
|
|
7764
7809
|
}
|
|
@@ -7780,14 +7825,14 @@ class ra extends E {
|
|
|
7780
7825
|
*/
|
|
7781
7826
|
move(e, t = this.currentBlockIndex) {
|
|
7782
7827
|
if (isNaN(e) || isNaN(t)) {
|
|
7783
|
-
|
|
7828
|
+
I("Warning during 'move' call: incorrect indices provided.", "warn");
|
|
7784
7829
|
return;
|
|
7785
7830
|
}
|
|
7786
7831
|
if (!this.validateIndex(e) || !this.validateIndex(t)) {
|
|
7787
|
-
|
|
7832
|
+
I("Warning during 'move' call: indices cannot be lower than 0 or greater than the amount of blocks.", "warn");
|
|
7788
7833
|
return;
|
|
7789
7834
|
}
|
|
7790
|
-
this._blocks.move(e, t), this.currentBlockIndex = e, this.blockDidMutated(
|
|
7835
|
+
this._blocks.move(e, t), this.currentBlockIndex = e, this.blockDidMutated(ya, this.currentBlock, {
|
|
7791
7836
|
fromIndex: t,
|
|
7792
7837
|
toIndex: e
|
|
7793
7838
|
});
|
|
@@ -7810,7 +7855,7 @@ class ra extends E {
|
|
|
7810
7855
|
r,
|
|
7811
7856
|
s.sanitizeConfig
|
|
7812
7857
|
);
|
|
7813
|
-
let l =
|
|
7858
|
+
let l = Co(a, s.conversionConfig, s.settings);
|
|
7814
7859
|
return o && (l = Object.assign(l, o)), this.replace(e, s.name, l);
|
|
7815
7860
|
}
|
|
7816
7861
|
/**
|
|
@@ -7828,7 +7873,7 @@ class ra extends E {
|
|
|
7828
7873
|
* 2) in api.blocks.clear we should add empty block
|
|
7829
7874
|
*/
|
|
7830
7875
|
async clear(e = !1) {
|
|
7831
|
-
const t = new
|
|
7876
|
+
const t = new wa();
|
|
7832
7877
|
[...this.blocks].forEach((i) => {
|
|
7833
7878
|
t.add(async () => {
|
|
7834
7879
|
await this.removeBlock(i, !1);
|
|
@@ -7857,7 +7902,7 @@ class ra extends E {
|
|
|
7857
7902
|
t.dragOver(o);
|
|
7858
7903
|
}), this.readOnlyMutableListeners.on(e.holder, "dragleave", (o) => {
|
|
7859
7904
|
t.dragLeave(o);
|
|
7860
|
-
}), e.on("didMutated", (o) => this.blockDidMutated(
|
|
7905
|
+
}), e.on("didMutated", (o) => this.blockDidMutated(Lo, o, {
|
|
7861
7906
|
index: this.getBlockIndex(o)
|
|
7862
7907
|
}));
|
|
7863
7908
|
}
|
|
@@ -7898,7 +7943,7 @@ class ra extends E {
|
|
|
7898
7943
|
blockDidMutated(e, t, o) {
|
|
7899
7944
|
const i = new CustomEvent(e, {
|
|
7900
7945
|
detail: {
|
|
7901
|
-
target: new
|
|
7946
|
+
target: new Q(t),
|
|
7902
7947
|
...o
|
|
7903
7948
|
}
|
|
7904
7949
|
});
|
|
@@ -7907,7 +7952,7 @@ class ra extends E {
|
|
|
7907
7952
|
}), t;
|
|
7908
7953
|
}
|
|
7909
7954
|
}
|
|
7910
|
-
class
|
|
7955
|
+
class xa extends E {
|
|
7911
7956
|
constructor() {
|
|
7912
7957
|
super(...arguments), this.anyBlockSelectedCache = null, this.needToSelectAll = !1, this.nativeInputSelected = !1, this.readyToBlockSelection = !1;
|
|
7913
7958
|
}
|
|
@@ -8029,7 +8074,7 @@ class aa extends E {
|
|
|
8029
8074
|
const r = e && e instanceof KeyboardEvent, a = r && Po(e.keyCode);
|
|
8030
8075
|
if (this.anyBlockSelected && r && a && !b.isSelectionExists) {
|
|
8031
8076
|
const l = o.removeSelectedBlocks();
|
|
8032
|
-
o.insertDefaultBlockAtIndex(l, !0), i.setToBlock(o.currentBlock),
|
|
8077
|
+
o.insertDefaultBlockAtIndex(l, !0), i.setToBlock(o.currentBlock), He(() => {
|
|
8033
8078
|
const c = e.key;
|
|
8034
8079
|
i.insertContentAtCaretPosition(c.length > 1 ? "" : c);
|
|
8035
8080
|
}, 20)();
|
|
@@ -8048,9 +8093,9 @@ class aa extends E {
|
|
|
8048
8093
|
*/
|
|
8049
8094
|
copySelectedBlocks(e) {
|
|
8050
8095
|
e.preventDefault();
|
|
8051
|
-
const t =
|
|
8096
|
+
const t = h.make("div");
|
|
8052
8097
|
this.selectedBlocks.forEach((s) => {
|
|
8053
|
-
const r = Z(s.holder.innerHTML, this.sanitizerConfig), a =
|
|
8098
|
+
const r = Z(s.holder.innerHTML, this.sanitizerConfig), a = h.make("p");
|
|
8054
8099
|
a.innerHTML = r, t.appendChild(a);
|
|
8055
8100
|
});
|
|
8056
8101
|
const o = Array.from(t.childNodes).map((s) => s.textContent).join(`
|
|
@@ -8108,7 +8153,7 @@ class aa extends E {
|
|
|
8108
8153
|
* @param {KeyboardEvent} event - keyboard event
|
|
8109
8154
|
*/
|
|
8110
8155
|
handleCommandA(e) {
|
|
8111
|
-
if (this.Editor.RectangleSelection.clearSelection(),
|
|
8156
|
+
if (this.Editor.RectangleSelection.clearSelection(), h.isNativeInput(e.target) && !this.readyToBlockSelection) {
|
|
8112
8157
|
this.readyToBlockSelection = !0;
|
|
8113
8158
|
return;
|
|
8114
8159
|
}
|
|
@@ -8186,12 +8231,12 @@ class Ye extends E {
|
|
|
8186
8231
|
return;
|
|
8187
8232
|
let a, l = o;
|
|
8188
8233
|
if (t === this.positions.START)
|
|
8189
|
-
a =
|
|
8234
|
+
a = h.getDeepestNode(r, !1), l = 0;
|
|
8190
8235
|
else if (t === this.positions.END)
|
|
8191
|
-
a =
|
|
8236
|
+
a = h.getDeepestNode(r, !0), l = h.getContentLength(a);
|
|
8192
8237
|
else {
|
|
8193
|
-
const { node: d, offset:
|
|
8194
|
-
d ? (a = d, l =
|
|
8238
|
+
const { node: d, offset: u } = h.getNodeByOffset(r, o);
|
|
8239
|
+
d ? (a = d, l = u) : (a = h.getDeepestNode(r, !1), l = 0);
|
|
8195
8240
|
}
|
|
8196
8241
|
this.set(a, l), i.setCurrentBlockByChildNode(e.holder), i.currentBlock.currentInput = r;
|
|
8197
8242
|
}
|
|
@@ -8204,13 +8249,13 @@ class Ye extends E {
|
|
|
8204
8249
|
* @param {number} offset - caret offset regarding to the text node
|
|
8205
8250
|
*/
|
|
8206
8251
|
setToInput(e, t = this.positions.DEFAULT, o = 0) {
|
|
8207
|
-
const { currentBlock: i } = this.Editor.BlockManager, s =
|
|
8252
|
+
const { currentBlock: i } = this.Editor.BlockManager, s = h.getDeepestNode(e);
|
|
8208
8253
|
switch (t) {
|
|
8209
8254
|
case this.positions.START:
|
|
8210
8255
|
this.set(s, 0);
|
|
8211
8256
|
break;
|
|
8212
8257
|
case this.positions.END:
|
|
8213
|
-
this.set(s,
|
|
8258
|
+
this.set(s, h.getContentLength(s));
|
|
8214
8259
|
break;
|
|
8215
8260
|
default:
|
|
8216
8261
|
o && this.set(s, o);
|
|
@@ -8249,7 +8294,7 @@ class Ye extends E {
|
|
|
8249
8294
|
if (e.rangeCount) {
|
|
8250
8295
|
const t = e.getRangeAt(0), o = this.Editor.BlockManager.currentBlock.currentInput;
|
|
8251
8296
|
if (t.deleteContents(), o)
|
|
8252
|
-
if (
|
|
8297
|
+
if (h.isNativeInput(o)) {
|
|
8253
8298
|
const i = o, s = document.createDocumentFragment(), r = i.value.substring(0, i.selectionStart), a = i.value.substring(i.selectionStart);
|
|
8254
8299
|
return s.textContent = a, i.value = r, s;
|
|
8255
8300
|
} else {
|
|
@@ -8331,7 +8376,7 @@ class Ye extends E {
|
|
|
8331
8376
|
l !== null && l.textContent !== null && a.setStart(l, l.textContent.length), i.removeAllRanges(), i.addRange(a);
|
|
8332
8377
|
}
|
|
8333
8378
|
}
|
|
8334
|
-
class
|
|
8379
|
+
class Ca extends E {
|
|
8335
8380
|
constructor() {
|
|
8336
8381
|
super(...arguments), this.onMouseUp = () => {
|
|
8337
8382
|
this.listeners.off(document, "mouseover", this.onMouseOver), this.listeners.off(document, "mouseup", this.onMouseUp);
|
|
@@ -8440,7 +8485,7 @@ class la extends E {
|
|
|
8440
8485
|
}
|
|
8441
8486
|
}
|
|
8442
8487
|
}
|
|
8443
|
-
class
|
|
8488
|
+
class Ba extends E {
|
|
8444
8489
|
constructor() {
|
|
8445
8490
|
super(...arguments), this.isStartedAtEditor = !1;
|
|
8446
8491
|
}
|
|
@@ -8513,8 +8558,8 @@ class ca extends E {
|
|
|
8513
8558
|
e.preventDefault();
|
|
8514
8559
|
}
|
|
8515
8560
|
}
|
|
8516
|
-
const
|
|
8517
|
-
class
|
|
8561
|
+
const Ta = 180, Sa = 400;
|
|
8562
|
+
class Ia extends E {
|
|
8518
8563
|
/**
|
|
8519
8564
|
* Prepare the module
|
|
8520
8565
|
*
|
|
@@ -8526,7 +8571,7 @@ class ha extends E {
|
|
|
8526
8571
|
super({
|
|
8527
8572
|
config: e,
|
|
8528
8573
|
eventsDispatcher: t
|
|
8529
|
-
}), this.disabled = !1, this.batchingTimeout = null, this.batchingOnChangeQueue = /* @__PURE__ */ new Map(), this.batchTime =
|
|
8574
|
+
}), this.disabled = !1, this.batchingTimeout = null, this.batchingOnChangeQueue = /* @__PURE__ */ new Map(), this.batchTime = Sa, this.mutationObserver = new MutationObserver((o) => {
|
|
8530
8575
|
this.redactorChanged(o);
|
|
8531
8576
|
}), this.eventsDispatcher.on($o, (o) => {
|
|
8532
8577
|
this.particularBlockChanged(o.event);
|
|
@@ -8562,7 +8607,7 @@ class ha extends E {
|
|
|
8562
8607
|
* @param event - some of our custom change events
|
|
8563
8608
|
*/
|
|
8564
8609
|
particularBlockChanged(e) {
|
|
8565
|
-
this.disabled || !
|
|
8610
|
+
this.disabled || !L(this.config.onChange) || (this.batchingOnChangeQueue.set(`block:${e.detail.target.id}:event:${e.type}`, e), this.batchingTimeout && clearTimeout(this.batchingTimeout), this.batchingTimeout = setTimeout(() => {
|
|
8566
8611
|
let t;
|
|
8567
8612
|
this.batchingOnChangeQueue.size === 1 ? t = this.batchingOnChangeQueue.values().next().value : t = Array.from(this.batchingOnChangeQueue.values()), this.config.onChange && this.config.onChange(this.Editor.API.methods, t), this.batchingOnChangeQueue.clear();
|
|
8568
8613
|
}, this.batchTime));
|
|
@@ -8587,11 +8632,11 @@ const Rn = class Dn extends E {
|
|
|
8587
8632
|
this.exceptionList.push(e.name);
|
|
8588
8633
|
return;
|
|
8589
8634
|
}
|
|
8590
|
-
if (!
|
|
8635
|
+
if (!L(t.onPaste))
|
|
8591
8636
|
return;
|
|
8592
8637
|
this.getTagsConfig(e), this.getFilesConfig(e), this.getPatternsConfig(e);
|
|
8593
8638
|
} catch (t) {
|
|
8594
|
-
|
|
8639
|
+
I(
|
|
8595
8640
|
`Paste handling for «${e.name}» Tool hasn't been set up because of the error`,
|
|
8596
8641
|
"warn",
|
|
8597
8642
|
t
|
|
@@ -8624,7 +8669,7 @@ const Rn = class Dn extends E {
|
|
|
8624
8669
|
*/
|
|
8625
8670
|
async processDataTransfer(e, t = !1) {
|
|
8626
8671
|
const { Tools: o } = this.Editor, i = e.types;
|
|
8627
|
-
if ((i.includes ? i.includes("Files") : i.contains("Files")) && !
|
|
8672
|
+
if ((i.includes ? i.includes("Files") : i.contains("Files")) && !X(this.toolsFiles)) {
|
|
8628
8673
|
await this.processFiles(e.files);
|
|
8629
8674
|
return;
|
|
8630
8675
|
}
|
|
@@ -8637,8 +8682,8 @@ const Rn = class Dn extends E {
|
|
|
8637
8682
|
} catch {
|
|
8638
8683
|
}
|
|
8639
8684
|
t && a.trim() && l.trim() && (l = "<p>" + (l.trim() ? l : a) + "</p>");
|
|
8640
|
-
const c = Object.keys(this.toolsTags).reduce((p, g) => (p[g.toLowerCase()] = this.toolsTags[g].sanitizationConfig ?? {}, p), {}), d = Object.assign({}, c, o.getAllInlineToolsSanitizeConfig(), { br: {} }),
|
|
8641
|
-
!
|
|
8685
|
+
const c = Object.keys(this.toolsTags).reduce((p, g) => (p[g.toLowerCase()] = this.toolsTags[g].sanitizationConfig ?? {}, p), {}), d = Object.assign({}, c, o.getAllInlineToolsSanitizeConfig(), { br: {} }), u = Z(l, d);
|
|
8686
|
+
!u.trim() || u.trim() === a || !h.isHTMLString(u) ? await this.processText(a) : await this.processText(u, !0);
|
|
8642
8687
|
}
|
|
8643
8688
|
/**
|
|
8644
8689
|
* Process pasted text and divide them into Blocks
|
|
@@ -8700,7 +8745,7 @@ const Rn = class Dn extends E {
|
|
|
8700
8745
|
const s = this.collectTagNames(i);
|
|
8701
8746
|
o.push(...s), s.forEach((r) => {
|
|
8702
8747
|
if (Object.prototype.hasOwnProperty.call(this.toolsTags, r)) {
|
|
8703
|
-
|
|
8748
|
+
I(
|
|
8704
8749
|
`Paste handler for «${e.name}» Tool on «${r}» tag is skipped because it is already used by «${this.toolsTags[r].tool.name}» Tool.`,
|
|
8705
8750
|
"warn"
|
|
8706
8751
|
);
|
|
@@ -8724,7 +8769,7 @@ const Rn = class Dn extends E {
|
|
|
8724
8769
|
return;
|
|
8725
8770
|
const { files: t = {} } = e.pasteConfig;
|
|
8726
8771
|
let { extensions: o, mimeTypes: i } = t;
|
|
8727
|
-
!o && !i || (o && !Array.isArray(o) && (
|
|
8772
|
+
!o && !i || (o && !Array.isArray(o) && (I(`«extensions» property of the onDrop config for «${e.name}» Tool should be an array`), o = []), i && !Array.isArray(i) && (I(`«mimeTypes» property of the onDrop config for «${e.name}» Tool should be an array`), i = []), i && (i = i.filter((s) => ei(s) ? !0 : (I(`MIME type value «${s}» for the «${e.name}» Tool is not a valid MIME type`, "warn"), !1))), this.toolsFiles[e.name] = {
|
|
8728
8773
|
extensions: o || [],
|
|
8729
8774
|
mimeTypes: i || []
|
|
8730
8775
|
});
|
|
@@ -8735,8 +8780,8 @@ const Rn = class Dn extends E {
|
|
|
8735
8780
|
* @param tool - BlockTool object
|
|
8736
8781
|
*/
|
|
8737
8782
|
getPatternsConfig(e) {
|
|
8738
|
-
e.pasteConfig === !1 || !e.pasteConfig.patterns ||
|
|
8739
|
-
o instanceof RegExp ||
|
|
8783
|
+
e.pasteConfig === !1 || !e.pasteConfig.patterns || X(e.pasteConfig.patterns) || Object.entries(e.pasteConfig.patterns).forEach(([t, o]) => {
|
|
8784
|
+
o instanceof RegExp || I(
|
|
8740
8785
|
`Pattern ${o} for «${e.name}» Tool is skipped because it should be a Regexp instance.`,
|
|
8741
8786
|
"warn"
|
|
8742
8787
|
), this.toolsPatterns.push({
|
|
@@ -8753,7 +8798,7 @@ const Rn = class Dn extends E {
|
|
|
8753
8798
|
* @returns {boolean}
|
|
8754
8799
|
*/
|
|
8755
8800
|
isNativeBehaviour(e) {
|
|
8756
|
-
return
|
|
8801
|
+
return h.isNativeInput(e);
|
|
8757
8802
|
}
|
|
8758
8803
|
/**
|
|
8759
8804
|
* Get files from data transfer object and insert related Tools
|
|
@@ -8779,12 +8824,12 @@ const Rn = class Dn extends E {
|
|
|
8779
8824
|
* @param {File} file - file to process
|
|
8780
8825
|
*/
|
|
8781
8826
|
async processFile(e) {
|
|
8782
|
-
const t =
|
|
8783
|
-
const [c, d] = e.type.split("/"),
|
|
8827
|
+
const t = Qn(e), o = Object.entries(this.toolsFiles).find(([r, { mimeTypes: a, extensions: l }]) => {
|
|
8828
|
+
const [c, d] = e.type.split("/"), u = l.find((g) => g.toLowerCase() === t.toLowerCase()), p = a.find((g) => {
|
|
8784
8829
|
const [f, v] = g.split("/");
|
|
8785
8830
|
return f === c && (v === d || v === "*");
|
|
8786
8831
|
});
|
|
8787
|
-
return !!
|
|
8832
|
+
return !!u || !!p;
|
|
8788
8833
|
});
|
|
8789
8834
|
if (!o)
|
|
8790
8835
|
return;
|
|
@@ -8803,28 +8848,28 @@ const Rn = class Dn extends E {
|
|
|
8803
8848
|
* @returns {PasteData[]}
|
|
8804
8849
|
*/
|
|
8805
8850
|
processHTML(e) {
|
|
8806
|
-
const { Tools: t } = this.Editor, o =
|
|
8851
|
+
const { Tools: t } = this.Editor, o = h.make("DIV");
|
|
8807
8852
|
return o.innerHTML = e, this.getNodes(o).map((s) => {
|
|
8808
8853
|
let r, a = t.defaultTool, l = !1;
|
|
8809
8854
|
switch (s.nodeType) {
|
|
8810
8855
|
case Node.DOCUMENT_FRAGMENT_NODE:
|
|
8811
|
-
r =
|
|
8856
|
+
r = h.make("div"), r.appendChild(s);
|
|
8812
8857
|
break;
|
|
8813
8858
|
case Node.ELEMENT_NODE:
|
|
8814
8859
|
r = s, l = !0, this.toolsTags[r.tagName] && (a = this.toolsTags[r.tagName].tool);
|
|
8815
8860
|
break;
|
|
8816
8861
|
}
|
|
8817
|
-
const { tags: c } = a.pasteConfig || { tags: [] }, d = c.reduce((g, f) => (this.collectTagNames(f).forEach((
|
|
8818
|
-
const
|
|
8819
|
-
g[
|
|
8820
|
-
}), g), {}),
|
|
8862
|
+
const { tags: c } = a.pasteConfig || { tags: [] }, d = c.reduce((g, f) => (this.collectTagNames(f).forEach((B) => {
|
|
8863
|
+
const x = F(f) ? f[B] : null;
|
|
8864
|
+
g[B.toLowerCase()] = x || {};
|
|
8865
|
+
}), g), {}), u = Object.assign({}, d, a.baseSanitizeConfig);
|
|
8821
8866
|
if (r.tagName.toLowerCase() === "table") {
|
|
8822
|
-
const g = Z(r.outerHTML,
|
|
8823
|
-
r =
|
|
8867
|
+
const g = Z(r.outerHTML, u);
|
|
8868
|
+
r = h.make("div", void 0, {
|
|
8824
8869
|
innerHTML: g
|
|
8825
8870
|
}).firstChild;
|
|
8826
8871
|
} else
|
|
8827
|
-
r.innerHTML = Z(r.innerHTML,
|
|
8872
|
+
r.innerHTML = Z(r.innerHTML, u);
|
|
8828
8873
|
const p = this.composePasteEvent("tag", {
|
|
8829
8874
|
data: r
|
|
8830
8875
|
});
|
|
@@ -8835,7 +8880,7 @@ const Rn = class Dn extends E {
|
|
|
8835
8880
|
event: p
|
|
8836
8881
|
};
|
|
8837
8882
|
}).filter((s) => {
|
|
8838
|
-
const r =
|
|
8883
|
+
const r = h.isEmpty(s.content), a = h.isSingleTag(s.content);
|
|
8839
8884
|
return !r || a;
|
|
8840
8885
|
});
|
|
8841
8886
|
}
|
|
@@ -8851,7 +8896,7 @@ const Rn = class Dn extends E {
|
|
|
8851
8896
|
return [];
|
|
8852
8897
|
const o = t;
|
|
8853
8898
|
return e.split(/\r?\n/).filter((i) => i.trim()).map((i) => {
|
|
8854
|
-
const s =
|
|
8899
|
+
const s = h.make("div");
|
|
8855
8900
|
s.textContent = i;
|
|
8856
8901
|
const r = this.composePasteEvent("tag", {
|
|
8857
8902
|
data: s
|
|
@@ -8871,7 +8916,7 @@ const Rn = class Dn extends E {
|
|
|
8871
8916
|
*/
|
|
8872
8917
|
async processSingleBlock(e) {
|
|
8873
8918
|
const { Caret: t, BlockManager: o } = this.Editor, { currentBlock: i } = o;
|
|
8874
|
-
if (!i || e.tool !== i.name || !
|
|
8919
|
+
if (!i || e.tool !== i.name || !h.containsOnlyInlineElements(e.content.innerHTML)) {
|
|
8875
8920
|
this.insertBlock(e, (i == null ? void 0 : i.tool.isDefault) && i.isEmpty);
|
|
8876
8921
|
return;
|
|
8877
8922
|
}
|
|
@@ -8970,14 +9015,14 @@ const Rn = class Dn extends E {
|
|
|
8970
9015
|
* @param {Node} destNode - destination node
|
|
8971
9016
|
*/
|
|
8972
9017
|
processElementNode(e, t, o) {
|
|
8973
|
-
const i = Object.keys(this.toolsTags), s = e, { tool: r } = this.toolsTags[s.tagName] || {}, a = this.tagsByTool[r == null ? void 0 : r.name] || [], l = i.includes(s.tagName), c =
|
|
9018
|
+
const i = Object.keys(this.toolsTags), s = e, { tool: r } = this.toolsTags[s.tagName] || {}, a = this.tagsByTool[r == null ? void 0 : r.name] || [], l = i.includes(s.tagName), c = h.blockElements.includes(s.tagName.toLowerCase()), d = Array.from(s.children).some(
|
|
8974
9019
|
({ tagName: p }) => i.includes(p) && !a.includes(p)
|
|
8975
|
-
),
|
|
8976
|
-
({ tagName: p }) =>
|
|
9020
|
+
), u = Array.from(s.children).some(
|
|
9021
|
+
({ tagName: p }) => h.blockElements.includes(p.toLowerCase())
|
|
8977
9022
|
);
|
|
8978
9023
|
if (!c && !l && !d)
|
|
8979
9024
|
return o.appendChild(s), [...t, o];
|
|
8980
|
-
if (l && !d || c && !
|
|
9025
|
+
if (l && !d || c && !u && !d)
|
|
8981
9026
|
return [...t, o, s];
|
|
8982
9027
|
}
|
|
8983
9028
|
/**
|
|
@@ -8992,11 +9037,11 @@ const Rn = class Dn extends E {
|
|
|
8992
9037
|
const t = Array.from(e.childNodes);
|
|
8993
9038
|
let o;
|
|
8994
9039
|
const i = (s, r) => {
|
|
8995
|
-
if (
|
|
9040
|
+
if (h.isEmpty(r) && !h.isSingleTag(r))
|
|
8996
9041
|
return s;
|
|
8997
9042
|
const a = s[s.length - 1];
|
|
8998
9043
|
let l = new DocumentFragment();
|
|
8999
|
-
switch (a &&
|
|
9044
|
+
switch (a && h.isFragment(a) && (l = s.pop()), r.nodeType) {
|
|
9000
9045
|
case Node.ELEMENT_NODE:
|
|
9001
9046
|
if (o = this.processElementNode(r, s, l), o)
|
|
9002
9047
|
return o;
|
|
@@ -9023,8 +9068,8 @@ const Rn = class Dn extends E {
|
|
|
9023
9068
|
}
|
|
9024
9069
|
};
|
|
9025
9070
|
Rn.PATTERN_PROCESSING_MAX_LENGTH = 450;
|
|
9026
|
-
let
|
|
9027
|
-
class
|
|
9071
|
+
let Oa = Rn;
|
|
9072
|
+
class _a extends E {
|
|
9028
9073
|
constructor() {
|
|
9029
9074
|
super(...arguments), this.toolsDontSupportReadOnly = [], this.readOnlyEnabled = !1;
|
|
9030
9075
|
}
|
|
@@ -9068,12 +9113,12 @@ class fa extends E {
|
|
|
9068
9113
|
* Throws an error about tools which don't support read-only mode
|
|
9069
9114
|
*/
|
|
9070
9115
|
throwCriticalError() {
|
|
9071
|
-
throw new
|
|
9116
|
+
throw new jo(
|
|
9072
9117
|
`To enable read-only mode all connected tools should support it. Tools ${this.toolsDontSupportReadOnly.join(", ")} don't support read-only mode.`
|
|
9073
9118
|
);
|
|
9074
9119
|
}
|
|
9075
9120
|
}
|
|
9076
|
-
class
|
|
9121
|
+
class Ce extends E {
|
|
9077
9122
|
constructor() {
|
|
9078
9123
|
super(...arguments), this.isRectSelectionActivated = !1, this.SCROLL_SPEED = 3, this.HEIGHT_OF_SCROLL_ZONE = 40, this.BOTTOM_SCROLL_ZONE = 1, this.TOP_SCROLL_ZONE = 2, this.MAIN_MOUSE_BUTTON = 0, this.mousedown = !1, this.isScrolling = !1, this.inScrollZone = null, this.startX = 0, this.startY = 0, this.mouseX = 0, this.mouseY = 0, this.stackOfSelected = [], this.listenerIds = [];
|
|
9079
9124
|
}
|
|
@@ -9161,7 +9206,7 @@ class Be extends E {
|
|
|
9161
9206
|
processMouseDown(e) {
|
|
9162
9207
|
if (e.button !== this.MAIN_MOUSE_BUTTON)
|
|
9163
9208
|
return;
|
|
9164
|
-
e.target.closest(
|
|
9209
|
+
e.target.closest(h.allInputsSelector) !== null || this.startSelection(e.pageX, e.pageY);
|
|
9165
9210
|
}
|
|
9166
9211
|
/**
|
|
9167
9212
|
* Handle mouse move events
|
|
@@ -9207,7 +9252,7 @@ class Be extends E {
|
|
|
9207
9252
|
* @returns {Object<string, Element>}
|
|
9208
9253
|
*/
|
|
9209
9254
|
genHTML() {
|
|
9210
|
-
const { UI: e } = this.Editor, t = e.nodes.holder.querySelector("." + e.CSS.editorWrapper), o =
|
|
9255
|
+
const { UI: e } = this.Editor, t = e.nodes.holder.querySelector("." + e.CSS.editorWrapper), o = h.make("div", Ce.CSS.overlay, {}), i = h.make("div", Ce.CSS.overlayContainer, {}), s = h.make("div", Ce.CSS.rect, {});
|
|
9211
9256
|
return i.appendChild(s), o.appendChild(i), t.appendChild(o), this.overlayRectangle = s, {
|
|
9212
9257
|
container: t,
|
|
9213
9258
|
overlay: o
|
|
@@ -9270,7 +9315,7 @@ class Be extends E {
|
|
|
9270
9315
|
genInfoForMouseSelection() {
|
|
9271
9316
|
const t = document.body.offsetWidth / 2, o = this.mouseY - window.pageYOffset, i = document.elementFromPoint(t, o), s = this.Editor.BlockManager.getBlockByChildNode(i);
|
|
9272
9317
|
let r;
|
|
9273
|
-
s !== void 0 && (r = this.Editor.BlockManager.blocks.findIndex((
|
|
9318
|
+
s !== void 0 && (r = this.Editor.BlockManager.blocks.findIndex((u) => u.holder === s.holder));
|
|
9274
9319
|
const a = this.Editor.BlockManager.lastBlock.holder.querySelector("." + D.CSS.content), l = Number.parseInt(window.getComputedStyle(a).width, 10) / 2, c = t - l, d = t + l;
|
|
9275
9320
|
return {
|
|
9276
9321
|
index: r,
|
|
@@ -9317,7 +9362,7 @@ class Be extends E {
|
|
|
9317
9362
|
this.rectCrossesBlocks && this.Editor.BlockSelection.unSelectBlockByIndex(this.stackOfSelected[g]), this.stackOfSelected.pop(), g--;
|
|
9318
9363
|
}
|
|
9319
9364
|
}
|
|
9320
|
-
class
|
|
9365
|
+
class Ma extends E {
|
|
9321
9366
|
/**
|
|
9322
9367
|
* Renders passed blocks as one batch
|
|
9323
9368
|
*
|
|
@@ -9330,7 +9375,7 @@ class ga extends E {
|
|
|
9330
9375
|
i.insert();
|
|
9331
9376
|
else {
|
|
9332
9377
|
const s = e.map(({ type: r, data: a, tunes: l, id: c }) => {
|
|
9333
|
-
o.available.has(r) === !1 && (
|
|
9378
|
+
o.available.has(r) === !1 && (V(`Tool «${r}» is not found. Check 'tools' property at the Editor.js config.`, "warn"), a = this.composeStubDataForTool(r, a, c), r = o.stubTool);
|
|
9334
9379
|
let d;
|
|
9335
9380
|
try {
|
|
9336
9381
|
d = i.composeBlock({
|
|
@@ -9339,10 +9384,10 @@ class ga extends E {
|
|
|
9339
9384
|
data: a,
|
|
9340
9385
|
tunes: l
|
|
9341
9386
|
});
|
|
9342
|
-
} catch (
|
|
9343
|
-
|
|
9387
|
+
} catch (u) {
|
|
9388
|
+
I(`Block «${r}» skipped because of plugins error`, "error", {
|
|
9344
9389
|
data: a,
|
|
9345
|
-
error:
|
|
9390
|
+
error: u
|
|
9346
9391
|
}), a = this.composeStubDataForTool(r, a, c), r = o.stubTool, d = i.composeBlock({
|
|
9347
9392
|
id: c,
|
|
9348
9393
|
tool: r,
|
|
@@ -9383,7 +9428,7 @@ class ga extends E {
|
|
|
9383
9428
|
};
|
|
9384
9429
|
}
|
|
9385
9430
|
}
|
|
9386
|
-
class
|
|
9431
|
+
class La extends E {
|
|
9387
9432
|
/**
|
|
9388
9433
|
* Composes new chain of Promises to fire them alternatelly
|
|
9389
9434
|
*
|
|
@@ -9398,7 +9443,7 @@ class ma extends E {
|
|
|
9398
9443
|
const s = await Promise.all(i), r = await yt(s, (a) => t.blockTools.get(a).sanitizeConfig);
|
|
9399
9444
|
return this.makeOutput(r);
|
|
9400
9445
|
} catch (s) {
|
|
9401
|
-
|
|
9446
|
+
V("Saving failed due to the Error %o", "error", s);
|
|
9402
9447
|
}
|
|
9403
9448
|
}
|
|
9404
9449
|
/**
|
|
@@ -9424,7 +9469,7 @@ class ma extends E {
|
|
|
9424
9469
|
const t = [];
|
|
9425
9470
|
return e.forEach(({ id: o, tool: i, data: s, tunes: r, isValid: a }) => {
|
|
9426
9471
|
if (!a) {
|
|
9427
|
-
|
|
9472
|
+
I(`Block «${i}» skipped because saved data is invalid`);
|
|
9428
9473
|
return;
|
|
9429
9474
|
}
|
|
9430
9475
|
if (i === this.Editor.Tools.stubTool) {
|
|
@@ -9435,7 +9480,7 @@ class ma extends E {
|
|
|
9435
9480
|
id: o,
|
|
9436
9481
|
type: i,
|
|
9437
9482
|
data: s,
|
|
9438
|
-
...!
|
|
9483
|
+
...!X(r) && {
|
|
9439
9484
|
tunes: r
|
|
9440
9485
|
}
|
|
9441
9486
|
};
|
|
@@ -9443,7 +9488,7 @@ class ma extends E {
|
|
|
9443
9488
|
}), {
|
|
9444
9489
|
time: +/* @__PURE__ */ new Date(),
|
|
9445
9490
|
blocks: t,
|
|
9446
|
-
version: "2.31.
|
|
9491
|
+
version: "2.31.17"
|
|
9447
9492
|
};
|
|
9448
9493
|
}
|
|
9449
9494
|
}
|
|
@@ -9457,8 +9502,8 @@ class ma extends E {
|
|
|
9457
9502
|
console.error("vite-plugin-css-injected-by-js", e);
|
|
9458
9503
|
}
|
|
9459
9504
|
})();
|
|
9460
|
-
const
|
|
9461
|
-
function
|
|
9505
|
+
const Aa = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8 9V7.2C8 7.08954 8.08954 7 8.2 7L12 7M16 9V7.2C16 7.08954 15.9105 7 15.8 7L12 7M12 7L12 17M12 17H10M12 17H14"/></svg>';
|
|
9506
|
+
function Pa(n) {
|
|
9462
9507
|
const e = document.createElement("div");
|
|
9463
9508
|
e.innerHTML = n.trim();
|
|
9464
9509
|
const t = document.createDocumentFragment();
|
|
@@ -9538,7 +9583,7 @@ class fo {
|
|
|
9538
9583
|
if (!this._element)
|
|
9539
9584
|
return;
|
|
9540
9585
|
this._data.text += e.text;
|
|
9541
|
-
const t =
|
|
9586
|
+
const t = Pa(e.text);
|
|
9542
9587
|
this._element.appendChild(t), this._element.normalize();
|
|
9543
9588
|
}
|
|
9544
9589
|
/**
|
|
@@ -9626,7 +9671,7 @@ class fo {
|
|
|
9626
9671
|
*/
|
|
9627
9672
|
static get toolbox() {
|
|
9628
9673
|
return {
|
|
9629
|
-
icon:
|
|
9674
|
+
icon: Aa,
|
|
9630
9675
|
title: "Text"
|
|
9631
9676
|
};
|
|
9632
9677
|
}
|
|
@@ -9651,7 +9696,7 @@ class go {
|
|
|
9651
9696
|
*/
|
|
9652
9697
|
render() {
|
|
9653
9698
|
return {
|
|
9654
|
-
icon:
|
|
9699
|
+
icon: Ji,
|
|
9655
9700
|
name: "bold",
|
|
9656
9701
|
onActivate: () => {
|
|
9657
9702
|
document.execCommand(this.commandName);
|
|
@@ -9695,7 +9740,7 @@ class mo {
|
|
|
9695
9740
|
* Create button for Inline Toolbar
|
|
9696
9741
|
*/
|
|
9697
9742
|
render() {
|
|
9698
|
-
return this.nodes.button = document.createElement("button"), this.nodes.button.type = "button", this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier), this.nodes.button.innerHTML =
|
|
9743
|
+
return this.nodes.button = document.createElement("button"), this.nodes.button.type = "button", this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier), this.nodes.button.innerHTML = as, this.nodes.button;
|
|
9699
9744
|
}
|
|
9700
9745
|
/**
|
|
9701
9746
|
* Wrap range with <i> tag
|
|
@@ -9758,7 +9803,7 @@ class bo {
|
|
|
9758
9803
|
* Create button for Inline Toolbar
|
|
9759
9804
|
*/
|
|
9760
9805
|
render() {
|
|
9761
|
-
return this.nodes.button = document.createElement("button"), this.nodes.button.type = "button", this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier), this.nodes.button.innerHTML =
|
|
9806
|
+
return this.nodes.button = document.createElement("button"), this.nodes.button.type = "button", this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier), this.nodes.button.innerHTML = Bo, this.nodes.button;
|
|
9762
9807
|
}
|
|
9763
9808
|
/**
|
|
9764
9809
|
* Input for the link
|
|
@@ -9794,11 +9839,11 @@ class bo {
|
|
|
9794
9839
|
checkState() {
|
|
9795
9840
|
const e = this.selection.findParentTag("A");
|
|
9796
9841
|
if (e) {
|
|
9797
|
-
this.nodes.button.innerHTML =
|
|
9842
|
+
this.nodes.button.innerHTML = bs, this.nodes.button.classList.add(this.CSS.buttonUnlink), this.nodes.button.classList.add(this.CSS.buttonActive), this.openActions();
|
|
9798
9843
|
const t = e.getAttribute("href");
|
|
9799
9844
|
this.nodes.input.value = t !== "null" ? t : "", this.selection.save();
|
|
9800
9845
|
} else
|
|
9801
|
-
this.nodes.button.innerHTML =
|
|
9846
|
+
this.nodes.button.innerHTML = Bo, this.nodes.button.classList.remove(this.CSS.buttonUnlink), this.nodes.button.classList.remove(this.CSS.buttonActive);
|
|
9802
9847
|
return !!e;
|
|
9803
9848
|
}
|
|
9804
9849
|
/**
|
|
@@ -9853,7 +9898,7 @@ class bo {
|
|
|
9853
9898
|
this.notifier.show({
|
|
9854
9899
|
message: this.i18n.t("Pasted link is not valid."),
|
|
9855
9900
|
style: "error"
|
|
9856
|
-
}),
|
|
9901
|
+
}), I("Incorrect Link pasted", "warn", t);
|
|
9857
9902
|
return;
|
|
9858
9903
|
}
|
|
9859
9904
|
t = this.prepareLink(t), this.selection.restore(), this.selection.removeFakeBackground(), this.insertLink(t), e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(), this.selection.collapseToEnd(), this.inlineToolbar.close();
|
|
@@ -9924,8 +9969,8 @@ class Fn {
|
|
|
9924
9969
|
if (i.length === 0)
|
|
9925
9970
|
return [];
|
|
9926
9971
|
const s = i.reduce((c, d) => {
|
|
9927
|
-
var
|
|
9928
|
-
return (
|
|
9972
|
+
var u;
|
|
9973
|
+
return (u = d.toolbox) == null || u.forEach((p) => {
|
|
9929
9974
|
c.push({
|
|
9930
9975
|
icon: p.icon,
|
|
9931
9976
|
title: N.t($.toolNames, p.title),
|
|
@@ -9961,7 +10006,7 @@ class Fn {
|
|
|
9961
10006
|
}
|
|
9962
10007
|
}
|
|
9963
10008
|
Fn.isInline = !0;
|
|
9964
|
-
class
|
|
10009
|
+
class Hn {
|
|
9965
10010
|
/**
|
|
9966
10011
|
* @param options - constructor options
|
|
9967
10012
|
* @param options.data - stub tool data
|
|
@@ -9997,16 +10042,16 @@ class jn {
|
|
|
9997
10042
|
* @returns {HTMLElement}
|
|
9998
10043
|
*/
|
|
9999
10044
|
make() {
|
|
10000
|
-
const e =
|
|
10045
|
+
const e = h.make("div", this.CSS.wrapper), t = vs, o = h.make("div", this.CSS.info), i = h.make("div", this.CSS.title, {
|
|
10001
10046
|
textContent: this.title
|
|
10002
|
-
}), s =
|
|
10047
|
+
}), s = h.make("div", this.CSS.subtitle, {
|
|
10003
10048
|
textContent: this.subtitle
|
|
10004
10049
|
});
|
|
10005
10050
|
return e.innerHTML = t, o.appendChild(i), o.appendChild(s), e.appendChild(o), e;
|
|
10006
10051
|
}
|
|
10007
10052
|
}
|
|
10008
|
-
|
|
10009
|
-
class
|
|
10053
|
+
Hn.isReadOnlySupported = !0;
|
|
10054
|
+
class Na extends Tt {
|
|
10010
10055
|
constructor() {
|
|
10011
10056
|
super(...arguments), this.type = ae.Inline;
|
|
10012
10057
|
}
|
|
@@ -10033,7 +10078,7 @@ class ka extends Tt {
|
|
|
10033
10078
|
return this.constructable[We.IsReadOnlySupported] ?? !1;
|
|
10034
10079
|
}
|
|
10035
10080
|
}
|
|
10036
|
-
class
|
|
10081
|
+
class Ra extends Tt {
|
|
10037
10082
|
constructor() {
|
|
10038
10083
|
super(...arguments), this.type = ae.Tune;
|
|
10039
10084
|
}
|
|
@@ -10052,51 +10097,51 @@ class ya extends Tt {
|
|
|
10052
10097
|
});
|
|
10053
10098
|
}
|
|
10054
10099
|
}
|
|
10055
|
-
class
|
|
10100
|
+
class j extends Map {
|
|
10056
10101
|
/**
|
|
10057
10102
|
* Returns Block Tools collection
|
|
10058
10103
|
*/
|
|
10059
10104
|
get blockTools() {
|
|
10060
10105
|
const e = Array.from(this.entries()).filter(([, t]) => t.isBlock());
|
|
10061
|
-
return new
|
|
10106
|
+
return new j(e);
|
|
10062
10107
|
}
|
|
10063
10108
|
/**
|
|
10064
10109
|
* Returns Inline Tools collection
|
|
10065
10110
|
*/
|
|
10066
10111
|
get inlineTools() {
|
|
10067
10112
|
const e = Array.from(this.entries()).filter(([, t]) => t.isInline());
|
|
10068
|
-
return new
|
|
10113
|
+
return new j(e);
|
|
10069
10114
|
}
|
|
10070
10115
|
/**
|
|
10071
10116
|
* Returns Block Tunes collection
|
|
10072
10117
|
*/
|
|
10073
10118
|
get blockTunes() {
|
|
10074
10119
|
const e = Array.from(this.entries()).filter(([, t]) => t.isTune());
|
|
10075
|
-
return new
|
|
10120
|
+
return new j(e);
|
|
10076
10121
|
}
|
|
10077
10122
|
/**
|
|
10078
10123
|
* Returns internal Tools collection
|
|
10079
10124
|
*/
|
|
10080
10125
|
get internalTools() {
|
|
10081
10126
|
const e = Array.from(this.entries()).filter(([, t]) => t.isInternal);
|
|
10082
|
-
return new
|
|
10127
|
+
return new j(e);
|
|
10083
10128
|
}
|
|
10084
10129
|
/**
|
|
10085
10130
|
* Returns Tools collection provided by user
|
|
10086
10131
|
*/
|
|
10087
10132
|
get externalTools() {
|
|
10088
10133
|
const e = Array.from(this.entries()).filter(([, t]) => !t.isInternal);
|
|
10089
|
-
return new
|
|
10134
|
+
return new j(e);
|
|
10090
10135
|
}
|
|
10091
10136
|
}
|
|
10092
|
-
var
|
|
10093
|
-
for (var i = o > 1 ? void 0 : o ?
|
|
10137
|
+
var Da = Object.defineProperty, Fa = Object.getOwnPropertyDescriptor, jn = (n, e, t, o) => {
|
|
10138
|
+
for (var i = o > 1 ? void 0 : o ? Fa(e, t) : e, s = n.length - 1, r; s >= 0; s--)
|
|
10094
10139
|
(r = n[s]) && (i = (o ? r(e, t, i) : r(i)) || i);
|
|
10095
|
-
return o && i &&
|
|
10140
|
+
return o && i && Da(e, t, i), i;
|
|
10096
10141
|
};
|
|
10097
10142
|
class vo extends Tt {
|
|
10098
10143
|
constructor() {
|
|
10099
|
-
super(...arguments), this.type = ae.Block, this.inlineTools = new
|
|
10144
|
+
super(...arguments), this.type = ae.Block, this.inlineTools = new j(), this.tunes = new j();
|
|
10100
10145
|
}
|
|
10101
10146
|
/**
|
|
10102
10147
|
* Creates new Tool instance
|
|
@@ -10141,7 +10186,7 @@ class vo extends Tt {
|
|
|
10141
10186
|
*/
|
|
10142
10187
|
get toolbox() {
|
|
10143
10188
|
const e = this.constructable[pe.Toolbox], t = this.config[Ne.Toolbox];
|
|
10144
|
-
if (!
|
|
10189
|
+
if (!X(e) && t !== !1)
|
|
10145
10190
|
return t ? Array.isArray(e) ? Array.isArray(t) ? t.map((o, i) => {
|
|
10146
10191
|
const s = e[i];
|
|
10147
10192
|
return s ? {
|
|
@@ -10181,7 +10226,7 @@ class vo extends Tt {
|
|
|
10181
10226
|
}
|
|
10182
10227
|
get sanitizeConfig() {
|
|
10183
10228
|
const e = super.sanitizeConfig, t = this.baseSanitizeConfig;
|
|
10184
|
-
if (
|
|
10229
|
+
if (X(e))
|
|
10185
10230
|
return t;
|
|
10186
10231
|
const o = {};
|
|
10187
10232
|
for (const i in e)
|
|
@@ -10196,13 +10241,13 @@ class vo extends Tt {
|
|
|
10196
10241
|
return Array.from(this.inlineTools.values()).forEach((t) => Object.assign(e, t.sanitizeConfig)), Array.from(this.tunes.values()).forEach((t) => Object.assign(e, t.sanitizeConfig)), e;
|
|
10197
10242
|
}
|
|
10198
10243
|
}
|
|
10199
|
-
|
|
10244
|
+
jn([
|
|
10200
10245
|
me
|
|
10201
10246
|
], vo.prototype, "sanitizeConfig", 1);
|
|
10202
|
-
|
|
10247
|
+
jn([
|
|
10203
10248
|
me
|
|
10204
10249
|
], vo.prototype, "baseSanitizeConfig", 1);
|
|
10205
|
-
class
|
|
10250
|
+
class Ha {
|
|
10206
10251
|
/**
|
|
10207
10252
|
* @class
|
|
10208
10253
|
* @param config - tools config
|
|
@@ -10237,9 +10282,9 @@ class xa {
|
|
|
10237
10282
|
getConstructor(e) {
|
|
10238
10283
|
switch (!0) {
|
|
10239
10284
|
case e[We.IsInline]:
|
|
10240
|
-
return
|
|
10285
|
+
return Na;
|
|
10241
10286
|
case e[mt.IsTune]:
|
|
10242
|
-
return
|
|
10287
|
+
return Ra;
|
|
10243
10288
|
default:
|
|
10244
10289
|
return vo;
|
|
10245
10290
|
}
|
|
@@ -10261,7 +10306,7 @@ class $n {
|
|
|
10261
10306
|
*/
|
|
10262
10307
|
render() {
|
|
10263
10308
|
return {
|
|
10264
|
-
icon:
|
|
10309
|
+
icon: es,
|
|
10265
10310
|
title: this.api.i18n.t("Move down"),
|
|
10266
10311
|
onActivate: () => this.handleClick(),
|
|
10267
10312
|
name: "move-down",
|
|
@@ -10298,7 +10343,7 @@ class zn {
|
|
|
10298
10343
|
*/
|
|
10299
10344
|
render() {
|
|
10300
10345
|
return {
|
|
10301
|
-
icon:
|
|
10346
|
+
icon: is,
|
|
10302
10347
|
title: this.api.i18n.t("Delete"),
|
|
10303
10348
|
name: "delete",
|
|
10304
10349
|
confirmation: {
|
|
@@ -10335,7 +10380,7 @@ class Un {
|
|
|
10335
10380
|
*/
|
|
10336
10381
|
render() {
|
|
10337
10382
|
return {
|
|
10338
|
-
icon:
|
|
10383
|
+
icon: ns,
|
|
10339
10384
|
title: this.api.i18n.t("Move up"),
|
|
10340
10385
|
onActivate: () => this.handleClick(),
|
|
10341
10386
|
name: "move-up",
|
|
@@ -10358,14 +10403,14 @@ class Un {
|
|
|
10358
10403
|
}
|
|
10359
10404
|
}
|
|
10360
10405
|
Un.isTune = !0;
|
|
10361
|
-
var
|
|
10362
|
-
for (var i = o > 1 ? void 0 : o ?
|
|
10406
|
+
var ja = Object.defineProperty, $a = Object.getOwnPropertyDescriptor, za = (n, e, t, o) => {
|
|
10407
|
+
for (var i = o > 1 ? void 0 : o ? $a(e, t) : e, s = n.length - 1, r; s >= 0; s--)
|
|
10363
10408
|
(r = n[s]) && (i = (o ? r(e, t, i) : r(i)) || i);
|
|
10364
|
-
return o && i &&
|
|
10409
|
+
return o && i && ja(e, t, i), i;
|
|
10365
10410
|
};
|
|
10366
10411
|
class Wn extends E {
|
|
10367
10412
|
constructor() {
|
|
10368
|
-
super(...arguments), this.stubTool = "stub", this.toolsAvailable = new
|
|
10413
|
+
super(...arguments), this.stubTool = "stub", this.toolsAvailable = new j(), this.toolsUnavailable = new j();
|
|
10369
10414
|
}
|
|
10370
10415
|
/**
|
|
10371
10416
|
* Returns available Tools
|
|
@@ -10417,14 +10462,14 @@ class Wn extends E {
|
|
|
10417
10462
|
* @returns {Promise<void>}
|
|
10418
10463
|
*/
|
|
10419
10464
|
async prepare() {
|
|
10420
|
-
if (this.validateTools(), this.config.tools =
|
|
10465
|
+
if (this.validateTools(), this.config.tools = ht({}, this.internalTools, this.config.tools), !Object.prototype.hasOwnProperty.call(this.config, "tools") || Object.keys(this.config.tools).length === 0)
|
|
10421
10466
|
throw Error("Can't start without tools");
|
|
10422
10467
|
const e = this.prepareConfig();
|
|
10423
|
-
this.factory = new
|
|
10468
|
+
this.factory = new Ha(e, this.config, this.Editor.API);
|
|
10424
10469
|
const t = this.getListOfPrepareFunctions(e);
|
|
10425
10470
|
if (t.length === 0)
|
|
10426
10471
|
return Promise.resolve();
|
|
10427
|
-
await
|
|
10472
|
+
await Jn(t, (o) => {
|
|
10428
10473
|
this.toolPrepareMethodSuccess(o);
|
|
10429
10474
|
}, (o) => {
|
|
10430
10475
|
this.toolPrepareMethodFallback(o);
|
|
@@ -10441,7 +10486,7 @@ class Wn extends E {
|
|
|
10441
10486
|
*/
|
|
10442
10487
|
destroy() {
|
|
10443
10488
|
Object.values(this.available).forEach(async (e) => {
|
|
10444
|
-
|
|
10489
|
+
L(e.reset) && await e.reset();
|
|
10445
10490
|
});
|
|
10446
10491
|
}
|
|
10447
10492
|
/**
|
|
@@ -10472,7 +10517,7 @@ class Wn extends E {
|
|
|
10472
10517
|
isInternal: !0
|
|
10473
10518
|
},
|
|
10474
10519
|
stub: {
|
|
10475
|
-
class:
|
|
10520
|
+
class: Hn,
|
|
10476
10521
|
isInternal: !0
|
|
10477
10522
|
},
|
|
10478
10523
|
moveUp: {
|
|
@@ -10499,7 +10544,7 @@ class Wn extends E {
|
|
|
10499
10544
|
if (t.isInline()) {
|
|
10500
10545
|
const i = ["render"].filter((s) => !t.create()[s]);
|
|
10501
10546
|
if (i.length) {
|
|
10502
|
-
|
|
10547
|
+
I(
|
|
10503
10548
|
`Incorrect Inline Tool: ${t.name}. Some of required methods is not implemented %o`,
|
|
10504
10549
|
"warn",
|
|
10505
10550
|
i
|
|
@@ -10528,7 +10573,7 @@ class Wn extends E {
|
|
|
10528
10573
|
return Object.entries(e).forEach(([o, i]) => {
|
|
10529
10574
|
t.push({
|
|
10530
10575
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
10531
|
-
function:
|
|
10576
|
+
function: L(i.class.prepare) ? i.class.prepare : () => {
|
|
10532
10577
|
},
|
|
10533
10578
|
data: {
|
|
10534
10579
|
toolName: o,
|
|
@@ -10553,12 +10598,12 @@ class Wn extends E {
|
|
|
10553
10598
|
assignInlineToolsToBlockTool(e) {
|
|
10554
10599
|
if (this.config.inlineToolbar !== !1) {
|
|
10555
10600
|
if (e.enabledInlineTools === !0) {
|
|
10556
|
-
e.inlineTools = new
|
|
10601
|
+
e.inlineTools = new j(
|
|
10557
10602
|
Array.isArray(this.config.inlineToolbar) ? this.config.inlineToolbar.map((t) => [t, this.inlineTools.get(t)]) : Array.from(this.inlineTools.entries())
|
|
10558
10603
|
);
|
|
10559
10604
|
return;
|
|
10560
10605
|
}
|
|
10561
|
-
Array.isArray(e.enabledInlineTools) && (e.inlineTools = new
|
|
10606
|
+
Array.isArray(e.enabledInlineTools) && (e.inlineTools = new j(
|
|
10562
10607
|
/** Prepend ConvertTo Inline Tool */
|
|
10563
10608
|
["convertTo", ...e.enabledInlineTools].map((t) => [t, this.inlineTools.get(t)])
|
|
10564
10609
|
));
|
|
@@ -10572,17 +10617,17 @@ class Wn extends E {
|
|
|
10572
10617
|
assignBlockTunesToBlockTool(e) {
|
|
10573
10618
|
if (e.enabledBlockTunes !== !1) {
|
|
10574
10619
|
if (Array.isArray(e.enabledBlockTunes)) {
|
|
10575
|
-
const t = new
|
|
10620
|
+
const t = new j(
|
|
10576
10621
|
e.enabledBlockTunes.map((o) => [o, this.blockTunes.get(o)])
|
|
10577
10622
|
);
|
|
10578
|
-
e.tunes = new
|
|
10623
|
+
e.tunes = new j([...t, ...this.blockTunes.internalTools]);
|
|
10579
10624
|
return;
|
|
10580
10625
|
}
|
|
10581
10626
|
if (Array.isArray(this.config.tunes)) {
|
|
10582
|
-
const t = new
|
|
10627
|
+
const t = new j(
|
|
10583
10628
|
this.config.tunes.map((o) => [o, this.blockTunes.get(o)])
|
|
10584
10629
|
);
|
|
10585
|
-
e.tunes = new
|
|
10630
|
+
e.tunes = new j([...t, ...this.blockTunes.internalTools]);
|
|
10586
10631
|
return;
|
|
10587
10632
|
}
|
|
10588
10633
|
e.tunes = this.blockTunes.internalTools;
|
|
@@ -10597,7 +10642,7 @@ class Wn extends E {
|
|
|
10597
10642
|
if (e in this.internalTools)
|
|
10598
10643
|
return;
|
|
10599
10644
|
const t = this.config.tools[e];
|
|
10600
|
-
if (!
|
|
10645
|
+
if (!L(t) && !L(t.class))
|
|
10601
10646
|
throw Error(
|
|
10602
10647
|
`Tool «${e}» must be a constructor function or an object with function in the «class» property`
|
|
10603
10648
|
);
|
|
@@ -10613,18 +10658,18 @@ class Wn extends E {
|
|
|
10613
10658
|
return e;
|
|
10614
10659
|
}
|
|
10615
10660
|
}
|
|
10616
|
-
|
|
10661
|
+
za([
|
|
10617
10662
|
me
|
|
10618
10663
|
], Wn.prototype, "getAllInlineToolsSanitizeConfig", 1);
|
|
10619
|
-
const Sa = `:root{--selectionColor: #e1f2ff;--inlineSelectionColor: #d4ecff;--bg-light: #eff2f5;--grayText: #707684;--color-dark: #1D202B;--color-active-icon: #388AE5;--color-gray-border: rgba(201, 201, 204, .48);--content-width: 650px;--narrow-mode-right-padding: 50px;--toolbox-buttons-size: 26px;--toolbox-buttons-size--mobile: 36px;--icon-size: 20px;--icon-size--mobile: 28px;--block-padding-vertical: 8px;--color-line-gray: #EFF0F1 }.codex-editor{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:1}.codex-editor .hide{display:none}.codex-editor__redactor [contenteditable]:empty:after{content:"\\feff"}@media (min-width: 651px){.codex-editor--narrow .codex-editor__redactor{margin-right:50px}}@media (min-width: 651px){.codex-editor--narrow.codex-editor--rtl .codex-editor__redactor{margin-left:50px;margin-right:0}}@media (min-width: 651px){.codex-editor--narrow .ce-toolbar__actions{right:-5px}}.codex-editor-copyable{position:absolute;height:1px;width:1px;top:-400%;opacity:.001}.codex-editor-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:999;pointer-events:none;overflow:hidden}.codex-editor-overlay__container{position:relative;pointer-events:auto;z-index:0}.codex-editor-overlay__rectangle{position:absolute;pointer-events:none;background-color:#2eaadc33;border:1px solid transparent}.codex-editor svg{max-height:100%}.codex-editor path{stroke:currentColor}.codex-editor ::-moz-selection{background-color:#d4ecff}.codex-editor ::selection{background-color:#d4ecff}.codex-editor--toolbox-opened [contentEditable=true][data-placeholder]:focus:before{opacity:0!important}.ce-scroll-locked{overflow:hidden}.ce-scroll-locked--hard{overflow:hidden;top:calc(-1 * var(--window-scroll-offset));position:fixed;width:100%}.ce-toolbar{position:absolute;left:0;right:0;top:0;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;will-change:opacity,top;display:none}.ce-toolbar--opened{display:block}.ce-toolbar__content{max-width:650px;margin:0 auto;position:relative}.ce-toolbar__plus{color:#1d202b;cursor:pointer;width:26px;height:26px;border-radius:7px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-flex-negative:0;flex-shrink:0}@media (max-width: 650px){.ce-toolbar__plus{width:36px;height:36px}}@media (hover: hover){.ce-toolbar__plus:hover{background-color:#eff2f5}}.ce-toolbar__plus--active{background-color:#eff2f5;-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-toolbar__plus-shortcut{opacity:.6;word-spacing:-2px;margin-top:5px}@media (max-width: 650px){.ce-toolbar__plus{position:absolute;background-color:#fff;border:1px solid #E8E8EB;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;z-index:2;position:static}.ce-toolbar__plus--left-oriented:before{left:15px;margin-left:0}.ce-toolbar__plus--right-oriented:before{left:auto;right:15px;margin-left:0}}.ce-toolbar__actions{position:absolute;right:100%;opacity:0;display:-webkit-box;display:-ms-flexbox;display:flex;padding-right:5px}.ce-toolbar__actions--opened{opacity:1}@media (max-width: 650px){.ce-toolbar__actions{right:auto}}.ce-toolbar__settings-btn{color:#1d202b;width:26px;height:26px;border-radius:7px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;margin-left:3px;cursor:pointer;user-select:none}@media (max-width: 650px){.ce-toolbar__settings-btn{width:36px;height:36px}}@media (hover: hover){.ce-toolbar__settings-btn:hover{background-color:#eff2f5}}.ce-toolbar__settings-btn--active{background-color:#eff2f5;-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@media (min-width: 651px){.ce-toolbar__settings-btn{width:24px}}.ce-toolbar__settings-btn--hidden{display:none}@media (max-width: 650px){.ce-toolbar__settings-btn{position:absolute;background-color:#fff;border:1px solid #E8E8EB;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;z-index:2;position:static}.ce-toolbar__settings-btn--left-oriented:before{left:15px;margin-left:0}.ce-toolbar__settings-btn--right-oriented:before{left:auto;right:15px;margin-left:0}}.ce-toolbar__plus svg,.ce-toolbar__settings-btn svg{width:24px;height:24px}@media (min-width: 651px){.codex-editor--narrow .ce-toolbar__plus{left:5px}}@media (min-width: 651px){.codex-editor--narrow .ce-toolbox .ce-popover{right:0;left:auto;left:initial}}.ce-inline-toolbar{--y-offset: 8px;--color-background-icon-active: rgba(56, 138, 229, .1);--color-text-icon-active: #388AE5;--color-text-primary: black;position:absolute;visibility:hidden;-webkit-transition:opacity .25s ease;transition:opacity .25s ease;will-change:opacity,left,top;top:0;left:0;z-index:3;opacity:1;visibility:visible}.ce-inline-toolbar [hidden]{display:none!important}.ce-inline-toolbar__toggler-and-button-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;padding:0 6px}.ce-inline-toolbar__buttons{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-toolbar__dropdown{display:-webkit-box;display:-ms-flexbox;display:flex;padding:6px;margin:0 6px 0 -6px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;border-right:1px solid rgba(201,201,204,.48);-webkit-box-sizing:border-box;box-sizing:border-box}@media (hover: hover){.ce-inline-toolbar__dropdown:hover{background:#eff2f5}}.ce-inline-toolbar__dropdown--hidden{display:none}.ce-inline-toolbar__dropdown-content,.ce-inline-toolbar__dropdown-arrow{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-toolbar__dropdown-content svg,.ce-inline-toolbar__dropdown-arrow svg{width:20px;height:20px}.ce-inline-toolbar__shortcut{opacity:.6;word-spacing:-3px;margin-top:3px}.ce-inline-tool{color:var(--color-text-primary);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:0;border-radius:4px;line-height:normal;height:100%;padding:0;width:28px;background-color:transparent;cursor:pointer}@media (max-width: 650px){.ce-inline-tool{width:36px;height:36px}}@media (hover: hover){.ce-inline-tool:hover{background-color:#f8f8f8}}.ce-inline-tool svg{display:block;width:20px;height:20px}@media (max-width: 650px){.ce-inline-tool svg{width:28px;height:28px}}.ce-inline-tool--link .icon--unlink,.ce-inline-tool--unlink .icon--link{display:none}.ce-inline-tool--unlink .icon--unlink{display:inline-block;margin-bottom:-1px}.ce-inline-tool-input-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;gap:5px}.ce-inline-tool-input-btn{width:50px;border-radius:5px;background-color:#1456f0;color:#fff;border:none;cursor:pointer}.ce-inline-tool-input{-webkit-box-flex:1;-ms-flex:1;flex:1;background:#F8F8F8;border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:4px 8px;font-size:14px;line-height:22px;outline:none;margin:0;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:none;font-weight:500;-webkit-appearance:none;font-family:inherit}@media (max-width: 650px){.ce-inline-tool-input{font-size:15px;font-weight:500}}.ce-inline-tool-input::-webkit-input-placeholder{color:#707684}.ce-inline-tool-input::-moz-placeholder{color:#707684}.ce-inline-tool-input:-ms-input-placeholder{color:#707684}.ce-inline-tool-input::-ms-input-placeholder{color:#707684}.ce-inline-tool-input::placeholder{color:#707684}.ce-inline-tool-input--showed{display:block}.ce-inline-tool--active{background:var(--color-background-icon-active);color:var(--color-text-icon-active)}@-webkit-keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.ce-block{-webkit-animation:fade-in .3s ease;animation:fade-in .3s ease;-webkit-animation-fill-mode:none;animation-fill-mode:none;-webkit-animation-fill-mode:initial;animation-fill-mode:initial}.ce-block:first-of-type{margin-top:0}.ce-block--selected .ce-block__content{background:#e1f2ff}.ce-block--selected .ce-block__content [contenteditable]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ce-block--selected .ce-block__content img,.ce-block--selected .ce-block__content .ce-stub{opacity:.55}.ce-block--stretched .ce-block__content{max-width:none}.ce-block__content{position:relative;max-width:650px;margin:0 auto;-webkit-transition:background-color .15s ease;transition:background-color .15s ease}.ce-block--drop-target .ce-block__content:before{content:"";position:absolute;top:100%;left:-20px;margin-top:-1px;height:8px;width:8px;border:solid #388AE5;border-width:1px 1px 0 0;-webkit-transform-origin:right;transform-origin:right;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ce-block--drop-target .ce-block__content:after{content:"";position:absolute;top:100%;height:1px;width:100%;color:#388ae5;background:repeating-linear-gradient(90deg,#388AE5,#388AE5 1px,#fff 1px,#fff 6px)}.ce-block a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}.ce-block b{font-weight:700}.ce-block i{font-style:italic}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@-webkit-keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@-webkit-keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.cdx-block{padding:8px 0}.cdx-block::-webkit-input-placeholder{line-height:normal!important}.cdx-input{border:1px solid rgba(201,201,204,.48);-webkit-box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);box-shadow:inset 0 1px 2px #232c480f;border-radius:3px;padding:10px 12px;outline:none;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.cdx-input[data-placeholder]:before{position:static!important}.cdx-input[data-placeholder]:before{display:inline-block;width:0;white-space:nowrap;pointer-events:none}.cdx-settings-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:inherit;margin:0;min-width:26px;min-height:26px}.cdx-settings-button--focused{background:rgba(34,186,255,.08)!important}.cdx-settings-button--focused{-webkit-box-shadow:inset 0 0 0px 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px #07a1e314}.cdx-settings-button--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.cdx-settings-button--active{color:#388ae5}.cdx-settings-button svg{width:auto;height:auto}@media (max-width: 650px){.cdx-settings-button svg{width:28px;height:28px}}@media (max-width: 650px){.cdx-settings-button{width:36px;height:36px;border-radius:8px}}@media (hover: hover){.cdx-settings-button:hover{background-color:#eff2f5}}.cdx-loader{position:relative;border:1px solid rgba(201,201,204,.48)}.cdx-loader:before{content:"";position:absolute;left:50%;top:50%;width:18px;height:18px;margin:-11px 0 0 -11px;border:2px solid rgba(201,201,204,.48);border-left-color:#388ae5;border-radius:50%;-webkit-animation:cdxRotation 1.2s infinite linear;animation:cdxRotation 1.2s infinite linear}@-webkit-keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.cdx-button{padding:13px;border-radius:3px;border:1px solid rgba(201,201,204,.48);font-size:14.9px;background:#fff;-webkit-box-shadow:0 2px 2px 0 rgba(18,30,57,.04);box-shadow:0 2px 2px #121e390a;color:#707684;text-align:center;cursor:pointer}@media (hover: hover){.cdx-button:hover{background:#FBFCFE;-webkit-box-shadow:0 1px 3px 0 rgba(18,30,57,.08);box-shadow:0 1px 3px #121e3914}}.cdx-button svg{height:20px;margin-right:.2em;margin-top:-2px}.ce-stub{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:12px 18px;margin:10px 0;border-radius:10px;background:#eff2f5;border:1px solid #EFF0F1;color:#707684;font-size:14px}.ce-stub svg{width:20px;height:20px}.ce-stub__info{margin-left:14px}.ce-stub__title{font-weight:500;text-transform:capitalize}.codex-editor.codex-editor--rtl{direction:rtl}.codex-editor.codex-editor--rtl .cdx-list{padding-left:0;padding-right:40px}.codex-editor.codex-editor--rtl .ce-toolbar__plus{right:-26px;left:auto}.codex-editor.codex-editor--rtl .ce-toolbar__actions{right:auto;left:-26px}@media (max-width: 650px){.codex-editor.codex-editor--rtl .ce-toolbar__actions{margin-left:0;margin-right:auto;padding-right:0;padding-left:10px}}.codex-editor.codex-editor--rtl .ce-settings{left:5px;right:auto}.codex-editor.codex-editor--rtl .ce-settings:before{right:auto;left:25px}.codex-editor.codex-editor--rtl .ce-settings__button:not(:nth-child(3n+3)){margin-left:3px;margin-right:0}.codex-editor.codex-editor--rtl .ce-conversion-tool__icon{margin-right:0;margin-left:10px}.codex-editor.codex-editor--rtl .ce-inline-toolbar__dropdown{border-right:0px solid transparent;border-left:1px solid rgba(201,201,204,.48);margin:0 -6px 0 6px}.codex-editor.codex-editor--rtl .ce-inline-toolbar__dropdown .icon--toggler-down{margin-left:0;margin-right:4px}@media (min-width: 651px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__plus{left:0;right:5px}}@media (min-width: 651px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__actions{left:-5px}}.cdx-search-field{--icon-margin-right: 10px;background:#F8F8F8;border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:2px;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:auto}.cdx-search-field__icon{width:26px;height:26px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:var(--icon-margin-right)}.cdx-search-field__icon svg{width:20px;height:20px;color:#707684}.cdx-search-field__input{font-size:14px;outline:none;font-weight:500;font-family:inherit;border:0;background:transparent;margin:0;padding:0;line-height:22px;min-width:calc(100% - 26px - var(--icon-margin-right))}.cdx-search-field__input::-webkit-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::-moz-placeholder{color:#707684;font-weight:500}.cdx-search-field__input:-ms-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::-ms-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::placeholder{color:#707684;font-weight:500}.ce-popover{--border-radius: 6px;--width: 200px;--max-height: 270px;--padding: 6px;--offset-from-target: 8px;--color-border: #EFF0F1;--color-shadow: rgba(13, 20, 33, .1);--color-background: white;--color-text-primary: black;--color-text-secondary: #707684;--color-border-icon: rgba(201, 201, 204, .48);--color-border-icon-disabled: #EFF0F1;--color-text-icon-active: #388AE5;--color-background-icon-active: rgba(56, 138, 229, .1);--color-background-item-focus: rgba(34, 186, 255, .08);--color-shadow-item-focus: rgba(7, 161, 227, .08);--color-background-item-hover: #F8F8F8;--color-background-item-confirm: #E24A4A;--color-background-item-confirm-hover: #CE4343;--popover-top: calc(100% + var(--offset-from-target));--popover-left: 0;--nested-popover-overlap: 4px;--icon-size: 20px;--item-padding: 3px;--item-height: calc(var(--icon-size) + 2 * var(--item-padding))}.ce-popover__container{min-width:var(--width);width:var(--width);max-height:var(--max-height);border-radius:var(--border-radius);overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0px 3px 15px -3px var(--color-shadow);box-shadow:0 3px 15px -3px var(--color-shadow);position:absolute;left:var(--popover-left);top:var(--popover-top);background:var(--color-background);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;z-index:4;opacity:0;max-height:0;pointer-events:none;padding:0;border:none}.ce-popover--opened>.ce-popover__container{opacity:1;padding:var(--padding);max-height:var(--max-height);pointer-events:auto;-webkit-animation:panelShowing .1s ease;animation:panelShowing .1s ease;border:1px solid var(--color-border)}@media (max-width: 650px){.ce-popover--opened>.ce-popover__container{-webkit-animation:panelShowingMobile .25s ease;animation:panelShowingMobile .25s ease}}.ce-popover--open-top .ce-popover__container{--popover-top: calc(-1 * (var(--offset-from-target) + var(--popover-height)))}.ce-popover--open-left .ce-popover__container{--popover-left: calc(-1 * var(--width) + 100%)}.ce-popover__items{overflow-y:auto;-ms-scroll-chaining:none;overscroll-behavior:contain}@media (max-width: 650px){.ce-popover__overlay{position:fixed;top:0;bottom:0;left:0;right:0;background:#1D202B;z-index:3;opacity:.5;-webkit-transition:opacity .12s ease-in;transition:opacity .12s ease-in;will-change:opacity;visibility:visible}}.ce-popover__overlay--hidden{display:none}@media (max-width: 650px){.ce-popover .ce-popover__container{--offset: 5px;position:fixed;max-width:none;min-width:calc(100% - var(--offset) * 2);left:var(--offset);right:var(--offset);bottom:calc(var(--offset) + env(safe-area-inset-bottom));top:auto;border-radius:10px}}.ce-popover__search{margin-bottom:5px}.ce-popover__nothing-found-message{color:#707684;display:none;cursor:default;padding:3px;font-size:14px;line-height:20px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ce-popover__nothing-found-message--displayed{display:block}.ce-popover--nested .ce-popover__container{--popover-left: calc(var(--nesting-level) * (var(--width) - var(--nested-popover-overlap)));top:calc(var(--trigger-item-top) - var(--nested-popover-overlap));position:absolute}.ce-popover--open-top.ce-popover--nested .ce-popover__container{top:calc(var(--trigger-item-top) - var(--popover-height) + var(--item-height) + var(--offset-from-target) + var(--nested-popover-overlap))}.ce-popover--open-left .ce-popover--nested .ce-popover__container{--popover-left: calc(-1 * (var(--nesting-level) + 1) * var(--width) + 100%)}.ce-popover-item-separator{padding:4px 3px}.ce-popover-item-separator--hidden{display:none}.ce-popover-item-separator__line{height:1px;background:var(--color-border);width:100%}.ce-popover-item-html--hidden{display:none}.ce-popover-item{--border-radius: 6px;border-radius:var(--border-radius);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:var(--item-padding);color:var(--color-text-primary);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:none;background:transparent}@media (max-width: 650px){.ce-popover-item{padding:4px}}.ce-popover-item:not(:last-of-type){margin-bottom:1px}.ce-popover-item__icon{width:26px;height:26px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ce-popover-item__icon svg{width:20px;height:20px}@media (max-width: 650px){.ce-popover-item__icon{width:36px;height:36px;border-radius:8px}.ce-popover-item__icon svg{width:28px;height:28px}}.ce-popover-item__icon--tool{margin-right:4px}.ce-popover-item__title{font-size:14px;line-height:20px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:auto}@media (max-width: 650px){.ce-popover-item__title{font-size:16px}}.ce-popover-item__secondary-title{color:var(--color-text-secondary);font-size:12px;white-space:nowrap;letter-spacing:-.1em;padding-right:5px;opacity:.6}@media (max-width: 650px){.ce-popover-item__secondary-title{display:none}}.ce-popover-item--active{background:var(--color-background-icon-active);color:var(--color-text-icon-active)}.ce-popover-item--disabled{color:var(--color-text-secondary);cursor:default;pointer-events:none}.ce-popover-item--focused:not(.ce-popover-item--no-focus){background:var(--color-background-item-focus)!important}.ce-popover-item--hidden{display:none}@media (hover: hover){.ce-popover-item:hover{cursor:pointer}.ce-popover-item:hover:not(.ce-popover-item--no-hover){background-color:var(--color-background-item-hover)}}.ce-popover-item--confirmation{background:var(--color-background-item-confirm)}.ce-popover-item--confirmation .ce-popover-item__title,.ce-popover-item--confirmation .ce-popover-item__icon{color:#fff}@media (hover: hover){.ce-popover-item--confirmation:not(.ce-popover-item--no-hover):hover{background:var(--color-background-item-confirm-hover)}}.ce-popover-item--confirmation:not(.ce-popover-item--no-focus).ce-popover-item--focused{background:var(--color-background-item-confirm-hover)!important}@-webkit-keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes panelShowingMobile{0%{opacity:0;-webkit-transform:translateY(14px) scale(.98);transform:translateY(14px) scale(.98)}70%{opacity:1;-webkit-transform:translateY(-4px);transform:translateY(-4px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowingMobile{0%{opacity:0;-webkit-transform:translateY(14px) scale(.98);transform:translateY(14px) scale(.98)}70%{opacity:1;-webkit-transform:translateY(-4px);transform:translateY(-4px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}.wobble{-webkit-animation-name:wobble;animation-name:wobble;-webkit-animation-duration:.4s;animation-duration:.4s}@-webkit-keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-9%,0,0);transform:translate3d(-9%,0,0)}30%{-webkit-transform:translate3d(9%,0,0);transform:translate3d(9%,0,0)}45%{-webkit-transform:translate3d(-4%,0,0);transform:translate3d(-4%,0,0)}60%{-webkit-transform:translate3d(4%,0,0);transform:translate3d(4%,0,0)}75%{-webkit-transform:translate3d(-1%,0,0);transform:translate3d(-1%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-9%,0,0);transform:translate3d(-9%,0,0)}30%{-webkit-transform:translate3d(9%,0,0);transform:translate3d(9%,0,0)}45%{-webkit-transform:translate3d(-4%,0,0);transform:translate3d(-4%,0,0)}60%{-webkit-transform:translate3d(4%,0,0);transform:translate3d(4%,0,0)}75%{-webkit-transform:translate3d(-1%,0,0);transform:translate3d(-1%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.ce-popover-header{margin-bottom:8px;margin-top:4px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ce-popover-header__text{font-size:18px;font-weight:600}.ce-popover-header__back-button{border:0;background:transparent;width:36px;height:36px;color:var(--color-text-primary)}.ce-popover-header__back-button svg{display:block;width:28px;height:28px}.ce-popover--inline{--height: 38px;--height-mobile: 46px;--container-padding: 4px;position:relative}.ce-popover--inline .ce-popover__custom-content{margin-bottom:0}.ce-popover--inline .ce-popover__items{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-popover--inline .ce-popover__container{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;padding:var(--container-padding);height:var(--height);top:0;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;width:-webkit-max-content;width:-moz-max-content;width:max-content;-webkit-animation:none;animation:none}@media (max-width: 650px){.ce-popover--inline .ce-popover__container{height:var(--height-mobile);position:absolute}}.ce-popover--inline .ce-popover-item-separator{padding:0 4px}.ce-popover--inline .ce-popover-item-separator__line{height:100%;width:1px}.ce-popover--inline .ce-popover-item{border-radius:4px;padding:4px}.ce-popover--inline .ce-popover-item__icon--tool{-webkit-box-shadow:none;box-shadow:none;background:transparent;margin-right:0}.ce-popover--inline .ce-popover-item__icon{width:auto;width:initial;height:auto;height:initial}.ce-popover--inline .ce-popover-item__icon svg{width:20px;height:20px}@media (max-width: 650px){.ce-popover--inline .ce-popover-item__icon svg{width:28px;height:28px}}.ce-popover--inline .ce-popover-item:not(:last-of-type){margin-bottom:0;margin-bottom:initial}.ce-popover--inline .ce-popover-item-html{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ce-popover--inline .ce-popover-item__icon--chevron-right{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.ce-popover--inline .ce-popover--nested-level-1 .ce-popover__container{--offset: 3px;left:0;top:calc(var(--height) + var(--offset))}@media (max-width: 650px){.ce-popover--inline .ce-popover--nested-level-1 .ce-popover__container{top:calc(var(--height-mobile) + var(--offset))}}.ce-popover--inline .ce-popover--nested .ce-popover__container{min-width:var(--width);width:var(--width);height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;padding:6px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ce-popover--inline .ce-popover--nested .ce-popover__items{display:block;width:100%}.ce-popover--inline .ce-popover--nested .ce-popover-item{border-radius:6px;padding:3px}@media (max-width: 650px){.ce-popover--inline .ce-popover--nested .ce-popover-item{padding:4px}}.ce-popover--inline .ce-popover--nested .ce-popover-item__icon--tool{margin-right:4px}.ce-popover--inline .ce-popover--nested .ce-popover-item__icon{width:26px;height:26px}.ce-popover--inline .ce-popover--nested .ce-popover-item-separator{padding:4px 3px}.ce-popover--inline .ce-popover--nested .ce-popover-item-separator__line{width:100%;height:1px}.codex-editor [data-placeholder]:empty:before,.codex-editor [data-placeholder][data-empty=true]:before{pointer-events:none;color:#707684;cursor:text;content:attr(data-placeholder)}.codex-editor [data-placeholder-active]:empty:before,.codex-editor [data-placeholder-active][data-empty=true]:before{pointer-events:none;color:#707684;cursor:text}.codex-editor [data-placeholder-active]:empty:focus:before,.codex-editor [data-placeholder-active][data-empty=true]:focus:before{content:attr(data-placeholder-active)}
|
|
10664
|
+
const Ua = `:root{--selectionColor: #e1f2ff;--inlineSelectionColor: #d4ecff;--bg-light: #eff2f5;--grayText: #707684;--color-dark: #1D202B;--color-active-icon: #388AE5;--color-gray-border: rgba(201, 201, 204, .48);--content-width: 650px;--narrow-mode-right-padding: 50px;--toolbox-buttons-size: 26px;--toolbox-buttons-size--mobile: 36px;--icon-size: 20px;--icon-size--mobile: 28px;--block-padding-vertical: 8px;--color-line-gray: #EFF0F1 }.codex-editor{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:1}.codex-editor .hide{display:none}.codex-editor__redactor [contenteditable]:empty:after{content:"\\feff"}@media (min-width: 651px){.codex-editor--narrow .codex-editor__redactor{margin-right:50px}}@media (min-width: 651px){.codex-editor--narrow.codex-editor--rtl .codex-editor__redactor{margin-left:50px;margin-right:0}}@media (min-width: 651px){.codex-editor--narrow .ce-toolbar__actions{right:-5px}}.codex-editor-copyable{position:absolute;height:1px;width:1px;top:-400%;opacity:.001}.codex-editor-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:999;pointer-events:none;overflow:hidden}.codex-editor-overlay__container{position:relative;pointer-events:auto;z-index:0}.codex-editor-overlay__rectangle{position:absolute;pointer-events:none;background-color:#2eaadc33;border:1px solid transparent}.codex-editor svg{max-height:100%}.codex-editor path{stroke:currentColor}.codex-editor ::-moz-selection{background-color:#d4ecff}.codex-editor ::selection{background-color:#d4ecff}.codex-editor--toolbox-opened [contentEditable=true][data-placeholder]:focus:before{opacity:0!important}.ce-scroll-locked{overflow:hidden}.ce-scroll-locked--hard{overflow:hidden;top:calc(-1 * var(--window-scroll-offset));position:fixed;width:100%}.ce-toolbar{position:absolute;left:0;right:0;top:0;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;will-change:opacity,top;display:none}.ce-toolbar--opened{display:block}.ce-toolbar__content{max-width:650px;margin:0 auto;position:relative}.ce-toolbar__plus{color:#1d202b;cursor:pointer;width:26px;height:26px;border-radius:7px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-flex-negative:0;flex-shrink:0}@media (max-width: 650px){.ce-toolbar__plus{width:36px;height:36px}}@media (hover: hover){.ce-toolbar__plus:hover{background-color:#eff2f5}}.ce-toolbar__plus--active{background-color:#eff2f5;-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-toolbar__plus-shortcut{opacity:.6;word-spacing:-2px;margin-top:5px}.ce-toolbar__plus--hidden{display:none}@media (max-width: 650px){.ce-toolbar__plus{position:absolute;background-color:#fff;border:1px solid #E8E8EB;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;z-index:2;position:static}.ce-toolbar__plus--left-oriented:before{left:15px;margin-left:0}.ce-toolbar__plus--right-oriented:before{left:auto;right:15px;margin-left:0}}.ce-toolbar__actions{position:absolute;right:100%;opacity:0;display:-webkit-box;display:-ms-flexbox;display:flex;padding-right:5px}.ce-toolbar__actions--opened{opacity:1}@media (max-width: 650px){.ce-toolbar__actions{right:auto}}.ce-toolbar__settings-btn{color:#1d202b;width:26px;height:26px;border-radius:7px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;border:1px solid rgba(201,201,204,.48);color:#707684;margin-left:3px;cursor:pointer;user-select:none}@media (max-width: 650px){.ce-toolbar__settings-btn{width:36px;height:36px}}@media (hover: hover){.ce-toolbar__settings-btn:hover{background-color:#eff2f5}}.ce-toolbar__settings-btn--active{background-color:#eff2f5;-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-toolbar__settings-btn--hidden{display:none}@media (max-width: 650px){.ce-toolbar__settings-btn{position:absolute;background-color:#fff;border:1px solid #E8E8EB;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;z-index:2;position:static}.ce-toolbar__settings-btn--left-oriented:before{left:15px;margin-left:0}.ce-toolbar__settings-btn--right-oriented:before{left:auto;right:15px;margin-left:0}}.ce-toolbar__plus svg,.ce-toolbar__settings-btn svg{width:24px;height:24px}.ce-toolbar__plus svg path,.ce-toolbar__settings-btn svg path{fill:#707684}.ce-toolbar__settings-btn{width:auto}.ce-toolbar__settings-btn .icon-block-name,.ce-toolbar__settings-btn .icon-menu{display:inline-block;width:24px;height:24px}.ce-toolbar__settings-btn .icon-block-name{text-align:center}.ce-toolbar__settings-btn .icon-block-name .icon-toolbox-alert{width:20px!important;height:20px!important}.ce-toolbar__settings-btn .icon-menu{width:16px}.ce-toolbar__settings-btn .icon-menu svg{margin-left:-6px}@media (min-width: 651px){.codex-editor--narrow .ce-toolbar__plus{left:5px}}@media (min-width: 651px){.codex-editor--narrow .ce-toolbox .ce-popover{right:0;left:auto;left:initial}}.ce-inline-toolbar{--y-offset: 8px;--color-background-icon-active: rgba(56, 138, 229, .1);--color-text-icon-active: #388AE5;--color-text-primary: black;position:absolute;visibility:hidden;-webkit-transition:opacity .25s ease;transition:opacity .25s ease;will-change:opacity,left,top;top:0;left:0;z-index:3;opacity:1;visibility:visible}.ce-inline-toolbar [hidden]{display:none!important}.ce-inline-toolbar__toggler-and-button-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;padding:0 6px}.ce-inline-toolbar__buttons{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-toolbar__dropdown{display:-webkit-box;display:-ms-flexbox;display:flex;padding:6px;margin:0 6px 0 -6px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;border-right:1px solid rgba(201,201,204,.48);-webkit-box-sizing:border-box;box-sizing:border-box}@media (hover: hover){.ce-inline-toolbar__dropdown:hover{background:#eff2f5}}.ce-inline-toolbar__dropdown--hidden{display:none}.ce-inline-toolbar__dropdown-content,.ce-inline-toolbar__dropdown-arrow{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-toolbar__dropdown-content svg,.ce-inline-toolbar__dropdown-arrow svg{width:20px;height:20px}.ce-inline-toolbar__shortcut{opacity:.6;word-spacing:-3px;margin-top:3px}.ce-inline-tool{color:var(--color-text-primary);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:0;border-radius:4px;line-height:normal;height:100%;padding:0;width:28px;background-color:transparent;cursor:pointer}@media (max-width: 650px){.ce-inline-tool{width:36px;height:36px}}@media (hover: hover){.ce-inline-tool:hover{background-color:#f8f8f8}}.ce-inline-tool svg{display:block;width:20px;height:20px}@media (max-width: 650px){.ce-inline-tool svg{width:28px;height:28px}}.ce-inline-tool--link .icon--unlink,.ce-inline-tool--unlink .icon--link{display:none}.ce-inline-tool--unlink .icon--unlink{display:inline-block;margin-bottom:-1px}.ce-inline-tool-input-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;gap:5px}.ce-inline-tool-input-btn{width:50px;border-radius:5px;background-color:#1456f0;color:#fff;border:none;cursor:pointer}.ce-inline-tool-input{-webkit-box-flex:1;-ms-flex:1;flex:1;background:#F8F8F8;border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:4px 8px;font-size:14px;line-height:22px;outline:none;margin:0;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:none;font-weight:500;-webkit-appearance:none;font-family:inherit}@media (max-width: 650px){.ce-inline-tool-input{font-size:15px;font-weight:500}}.ce-inline-tool-input::-webkit-input-placeholder{color:#707684}.ce-inline-tool-input::-moz-placeholder{color:#707684}.ce-inline-tool-input:-ms-input-placeholder{color:#707684}.ce-inline-tool-input::-ms-input-placeholder{color:#707684}.ce-inline-tool-input::placeholder{color:#707684}.ce-inline-tool-input--showed{display:block}.ce-inline-tool--active{background:var(--color-background-icon-active);color:var(--color-text-icon-active)}@-webkit-keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.ce-block{-webkit-animation:fade-in .3s ease;animation:fade-in .3s ease;-webkit-animation-fill-mode:none;animation-fill-mode:none;-webkit-animation-fill-mode:initial;animation-fill-mode:initial}.ce-block:first-of-type{margin-top:0}.ce-block--selected .ce-block__content{background:#e1f2ff}.ce-block--selected .ce-block__content [contenteditable]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ce-block--selected .ce-block__content img,.ce-block--selected .ce-block__content .ce-stub{opacity:.55}.ce-block--stretched .ce-block__content{max-width:none}.ce-block__content{position:relative;max-width:650px;margin:0 auto;-webkit-transition:background-color .15s ease;transition:background-color .15s ease}.ce-block--drop-target .ce-block__content:before{content:"";position:absolute;top:100%;left:-20px;margin-top:-1px;height:8px;width:8px;border:solid #388AE5;border-width:1px 1px 0 0;-webkit-transform-origin:right;transform-origin:right;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ce-block--drop-target .ce-block__content:after{content:"";position:absolute;top:100%;height:1px;width:100%;color:#388ae5;background:repeating-linear-gradient(90deg,#388AE5,#388AE5 1px,#fff 1px,#fff 6px)}.ce-block a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}.ce-block b{font-weight:700}.ce-block i{font-style:italic}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@-webkit-keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@-webkit-keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.cdx-block{padding:8px 0}.cdx-block::-webkit-input-placeholder{line-height:normal!important}.cdx-input{border:1px solid rgba(201,201,204,.48);-webkit-box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);box-shadow:inset 0 1px 2px #232c480f;border-radius:3px;padding:10px 12px;outline:none;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.cdx-input[data-placeholder]:before{position:static!important}.cdx-input[data-placeholder]:before{display:inline-block;width:0;white-space:nowrap;pointer-events:none}.cdx-settings-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:inherit;margin:0;min-width:26px;min-height:26px}.cdx-settings-button--focused{background:rgba(34,186,255,.08)!important}.cdx-settings-button--focused{-webkit-box-shadow:inset 0 0 0px 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px #07a1e314}.cdx-settings-button--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.cdx-settings-button--active{color:#388ae5}.cdx-settings-button svg{width:auto;height:auto}@media (max-width: 650px){.cdx-settings-button svg{width:28px;height:28px}}@media (max-width: 650px){.cdx-settings-button{width:36px;height:36px;border-radius:8px}}@media (hover: hover){.cdx-settings-button:hover{background-color:#eff2f5}}.cdx-loader{position:relative;border:1px solid rgba(201,201,204,.48)}.cdx-loader:before{content:"";position:absolute;left:50%;top:50%;width:18px;height:18px;margin:-11px 0 0 -11px;border:2px solid rgba(201,201,204,.48);border-left-color:#388ae5;border-radius:50%;-webkit-animation:cdxRotation 1.2s infinite linear;animation:cdxRotation 1.2s infinite linear}@-webkit-keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.cdx-button{padding:13px;border-radius:3px;border:1px solid rgba(201,201,204,.48);font-size:14.9px;background:#fff;-webkit-box-shadow:0 2px 2px 0 rgba(18,30,57,.04);box-shadow:0 2px 2px #121e390a;color:#707684;text-align:center;cursor:pointer}@media (hover: hover){.cdx-button:hover{background:#FBFCFE;-webkit-box-shadow:0 1px 3px 0 rgba(18,30,57,.08);box-shadow:0 1px 3px #121e3914}}.cdx-button svg{height:20px;margin-right:.2em;margin-top:-2px}.ce-stub{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:12px 18px;margin:10px 0;border-radius:10px;background:#eff2f5;border:1px solid #EFF0F1;color:#707684;font-size:14px}.ce-stub svg{width:20px;height:20px}.ce-stub__info{margin-left:14px}.ce-stub__title{font-weight:500;text-transform:capitalize}.codex-editor.codex-editor--rtl{direction:rtl}.codex-editor.codex-editor--rtl .cdx-list{padding-left:0;padding-right:40px}.codex-editor.codex-editor--rtl .ce-toolbar__plus{right:-26px;left:auto}.codex-editor.codex-editor--rtl .ce-toolbar__actions{right:auto;left:-26px}@media (max-width: 650px){.codex-editor.codex-editor--rtl .ce-toolbar__actions{margin-left:0;margin-right:auto;padding-right:0;padding-left:10px}}.codex-editor.codex-editor--rtl .ce-settings{left:5px;right:auto}.codex-editor.codex-editor--rtl .ce-settings:before{right:auto;left:25px}.codex-editor.codex-editor--rtl .ce-settings__button:not(:nth-child(3n+3)){margin-left:3px;margin-right:0}.codex-editor.codex-editor--rtl .ce-conversion-tool__icon{margin-right:0;margin-left:10px}.codex-editor.codex-editor--rtl .ce-inline-toolbar__dropdown{border-right:0px solid transparent;border-left:1px solid rgba(201,201,204,.48);margin:0 -6px 0 6px}.codex-editor.codex-editor--rtl .ce-inline-toolbar__dropdown .icon--toggler-down{margin-left:0;margin-right:4px}@media (min-width: 651px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__plus{left:0;right:5px}}@media (min-width: 651px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__actions{left:-5px}}.cdx-search-field{--icon-margin-right: 10px;background:#F8F8F8;border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:2px;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:auto}.cdx-search-field__icon{width:26px;height:26px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:var(--icon-margin-right)}.cdx-search-field__icon svg{width:20px;height:20px;color:#707684}.cdx-search-field__input{font-size:14px;outline:none;font-weight:500;font-family:inherit;border:0;background:transparent;margin:0;padding:0;line-height:22px;min-width:calc(100% - 26px - var(--icon-margin-right))}.cdx-search-field__input::-webkit-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::-moz-placeholder{color:#707684;font-weight:500}.cdx-search-field__input:-ms-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::-ms-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::placeholder{color:#707684;font-weight:500}.ce-popover{--border-radius: 6px;--width: 200px;--max-height: 270px;--padding: 6px;--offset-from-target: 8px;--color-border: #EFF0F1;--color-shadow: rgba(13, 20, 33, .1);--color-background: white;--color-text-primary: black;--color-text-secondary: #707684;--color-border-icon: rgba(201, 201, 204, .48);--color-border-icon-disabled: #EFF0F1;--color-text-icon-active: #388AE5;--color-background-icon-active: rgba(56, 138, 229, .1);--color-background-item-focus: rgba(34, 186, 255, .08);--color-shadow-item-focus: rgba(7, 161, 227, .08);--color-background-item-hover: #F8F8F8;--color-background-item-confirm: #E24A4A;--color-background-item-confirm-hover: #CE4343;--popover-top: calc(100% + var(--offset-from-target));--popover-left: 0;--nested-popover-overlap: 4px;--icon-size: 20px;--item-padding: 3px;--item-height: calc(var(--icon-size) + 2 * var(--item-padding))}.ce-popover__container{min-width:var(--width);width:var(--width);max-height:var(--max-height);border-radius:var(--border-radius);overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0px 3px 15px -3px var(--color-shadow);box-shadow:0 3px 15px -3px var(--color-shadow);position:absolute;left:var(--popover-left);top:var(--popover-top);background:var(--color-background);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;z-index:4;opacity:0;max-height:0;pointer-events:none;padding:0;border:none}.ce-popover--opened>.ce-popover__container{opacity:1;padding:var(--padding);max-height:var(--max-height);pointer-events:auto;-webkit-animation:panelShowing .1s ease;animation:panelShowing .1s ease;border:1px solid var(--color-border)}@media (max-width: 650px){.ce-popover--opened>.ce-popover__container{-webkit-animation:panelShowingMobile .25s ease;animation:panelShowingMobile .25s ease}}.ce-popover--open-top .ce-popover__container{--popover-top: calc(-1 * (var(--offset-from-target) + var(--popover-height)))}.ce-popover--open-left .ce-popover__container{--popover-left: calc(-1 * var(--width) + 100%)}.ce-popover__items{overflow-y:auto;-ms-scroll-chaining:none;overscroll-behavior:contain}@media (max-width: 650px){.ce-popover__overlay{position:fixed;top:0;bottom:0;left:0;right:0;background:#1D202B;z-index:3;opacity:.5;-webkit-transition:opacity .12s ease-in;transition:opacity .12s ease-in;will-change:opacity;visibility:visible}}.ce-popover__overlay--hidden{display:none}@media (max-width: 650px){.ce-popover .ce-popover__container{--offset: 5px;position:fixed;max-width:none;min-width:calc(100% - var(--offset) * 2);left:var(--offset);right:var(--offset);bottom:calc(var(--offset) + env(safe-area-inset-bottom));top:auto;border-radius:10px}}.ce-popover__search{margin-bottom:5px}.ce-popover__nothing-found-message{color:#707684;display:none;cursor:default;padding:3px;font-size:14px;line-height:20px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ce-popover__nothing-found-message--displayed{display:block}.ce-popover--nested .ce-popover__container{--popover-left: calc(var(--nesting-level) * (var(--width) - var(--nested-popover-overlap)));top:calc(var(--trigger-item-top) - var(--nested-popover-overlap));position:absolute}.ce-popover--open-top.ce-popover--nested .ce-popover__container{top:calc(var(--trigger-item-top) - var(--popover-height) + var(--item-height) + var(--offset-from-target) + var(--nested-popover-overlap))}.ce-popover--open-left .ce-popover--nested .ce-popover__container{--popover-left: calc(-1 * (var(--nesting-level) + 1) * var(--width) + 100%)}.ce-popover-item-separator{padding:4px 3px}.ce-popover-item-separator--hidden{display:none}.ce-popover-item-separator__line{height:1px;background:var(--color-border);width:100%}.ce-popover-item-html--hidden{display:none}.ce-popover-item{--border-radius: 6px;border-radius:var(--border-radius);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:var(--item-padding);color:var(--color-text-primary);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:none;background:transparent}@media (max-width: 650px){.ce-popover-item{padding:4px}}.ce-popover-item:not(:last-of-type){margin-bottom:1px}.ce-popover-item__icon{width:26px;height:26px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ce-popover-item__icon svg{width:20px;height:20px}@media (max-width: 650px){.ce-popover-item__icon{width:36px;height:36px;border-radius:8px}.ce-popover-item__icon svg{width:28px;height:28px}}.ce-popover-item__icon--tool{margin-right:4px}.ce-popover-item__title{font-size:14px;line-height:20px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:auto}@media (max-width: 650px){.ce-popover-item__title{font-size:16px}}.ce-popover-item__secondary-title{color:var(--color-text-secondary);font-size:12px;white-space:nowrap;letter-spacing:-.1em;padding-right:5px;opacity:.6}@media (max-width: 650px){.ce-popover-item__secondary-title{display:none}}.ce-popover-item--active{background:var(--color-background-icon-active);color:var(--color-text-icon-active)}.ce-popover-item--disabled{color:var(--color-text-secondary);cursor:default;pointer-events:none}.ce-popover-item--focused:not(.ce-popover-item--no-focus){background:var(--color-background-item-focus)!important}.ce-popover-item--hidden{display:none}@media (hover: hover){.ce-popover-item:hover{cursor:pointer}.ce-popover-item:hover:not(.ce-popover-item--no-hover){background-color:var(--color-background-item-hover)}}.ce-popover-item--confirmation{background:var(--color-background-item-confirm)}.ce-popover-item--confirmation .ce-popover-item__title,.ce-popover-item--confirmation .ce-popover-item__icon{color:#fff}@media (hover: hover){.ce-popover-item--confirmation:not(.ce-popover-item--no-hover):hover{background:var(--color-background-item-confirm-hover)}}.ce-popover-item--confirmation:not(.ce-popover-item--no-focus).ce-popover-item--focused{background:var(--color-background-item-confirm-hover)!important}@-webkit-keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes panelShowingMobile{0%{opacity:0;-webkit-transform:translateY(14px) scale(.98);transform:translateY(14px) scale(.98)}70%{opacity:1;-webkit-transform:translateY(-4px);transform:translateY(-4px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowingMobile{0%{opacity:0;-webkit-transform:translateY(14px) scale(.98);transform:translateY(14px) scale(.98)}70%{opacity:1;-webkit-transform:translateY(-4px);transform:translateY(-4px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}.wobble{-webkit-animation-name:wobble;animation-name:wobble;-webkit-animation-duration:.4s;animation-duration:.4s}@-webkit-keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-9%,0,0);transform:translate3d(-9%,0,0)}30%{-webkit-transform:translate3d(9%,0,0);transform:translate3d(9%,0,0)}45%{-webkit-transform:translate3d(-4%,0,0);transform:translate3d(-4%,0,0)}60%{-webkit-transform:translate3d(4%,0,0);transform:translate3d(4%,0,0)}75%{-webkit-transform:translate3d(-1%,0,0);transform:translate3d(-1%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-9%,0,0);transform:translate3d(-9%,0,0)}30%{-webkit-transform:translate3d(9%,0,0);transform:translate3d(9%,0,0)}45%{-webkit-transform:translate3d(-4%,0,0);transform:translate3d(-4%,0,0)}60%{-webkit-transform:translate3d(4%,0,0);transform:translate3d(4%,0,0)}75%{-webkit-transform:translate3d(-1%,0,0);transform:translate3d(-1%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.ce-popover-header{margin-bottom:8px;margin-top:4px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ce-popover-header__text{font-size:18px;font-weight:600}.ce-popover-header__back-button{border:0;background:transparent;width:36px;height:36px;color:var(--color-text-primary)}.ce-popover-header__back-button svg{display:block;width:28px;height:28px}.ce-popover--inline{--height: 38px;--height-mobile: 46px;--container-padding: 4px;position:relative}.ce-popover--inline .ce-popover__custom-content{margin-bottom:0}.ce-popover--inline .ce-popover__items{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-popover--inline .ce-popover__container{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;padding:var(--container-padding);height:var(--height);top:0;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;width:-webkit-max-content;width:-moz-max-content;width:max-content;-webkit-animation:none;animation:none}@media (max-width: 650px){.ce-popover--inline .ce-popover__container{height:var(--height-mobile);position:absolute}}.ce-popover--inline .ce-popover-item-separator{padding:0 4px}.ce-popover--inline .ce-popover-item-separator__line{height:100%;width:1px}.ce-popover--inline .ce-popover-item{border-radius:4px;padding:4px}.ce-popover--inline .ce-popover-item__icon--tool{-webkit-box-shadow:none;box-shadow:none;background:transparent;margin-right:0}.ce-popover--inline .ce-popover-item__icon{width:auto;width:initial;height:auto;height:initial}.ce-popover--inline .ce-popover-item__icon svg{width:20px;height:20px}@media (max-width: 650px){.ce-popover--inline .ce-popover-item__icon svg{width:28px;height:28px}}.ce-popover--inline .ce-popover-item:not(:last-of-type){margin-bottom:0;margin-bottom:initial}.ce-popover--inline .ce-popover-item-html{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ce-popover--inline .ce-popover-item__icon--chevron-right{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.ce-popover--inline .ce-popover--nested-level-1 .ce-popover__container{--offset: 3px;left:0;top:calc(var(--height) + var(--offset))}@media (max-width: 650px){.ce-popover--inline .ce-popover--nested-level-1 .ce-popover__container{top:calc(var(--height-mobile) + var(--offset))}}.ce-popover--inline .ce-popover--nested .ce-popover__container{min-width:var(--width);width:var(--width);height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;padding:6px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ce-popover--inline .ce-popover--nested .ce-popover__items{display:block;width:100%}.ce-popover--inline .ce-popover--nested .ce-popover-item{border-radius:6px;padding:3px}@media (max-width: 650px){.ce-popover--inline .ce-popover--nested .ce-popover-item{padding:4px}}.ce-popover--inline .ce-popover--nested .ce-popover-item__icon--tool{margin-right:4px}.ce-popover--inline .ce-popover--nested .ce-popover-item__icon{width:26px;height:26px}.ce-popover--inline .ce-popover--nested .ce-popover-item-separator{padding:4px 3px}.ce-popover--inline .ce-popover--nested .ce-popover-item-separator__line{width:100%;height:1px}.codex-editor [data-placeholder]:empty:before,.codex-editor [data-placeholder][data-empty=true]:before{pointer-events:none;color:#707684;cursor:text;content:attr(data-placeholder)}.codex-editor [data-placeholder-active]:empty:before,.codex-editor [data-placeholder-active][data-empty=true]:before{pointer-events:none;color:#707684;cursor:text}.codex-editor [data-placeholder-active]:empty:focus:before,.codex-editor [data-placeholder-active][data-empty=true]:focus:before{content:attr(data-placeholder-active)}
|
|
10620
10665
|
`;
|
|
10621
|
-
class
|
|
10666
|
+
class Wa extends E {
|
|
10622
10667
|
constructor() {
|
|
10623
10668
|
super(...arguments), this.isMobile = !1, this.contentRectCache = null, this.resizeDebouncer = Eo(() => {
|
|
10624
10669
|
this.windowResize();
|
|
10625
10670
|
}, 200), this.selectionChangeDebounced = Eo(() => {
|
|
10626
10671
|
this.selectionChanged();
|
|
10627
|
-
},
|
|
10672
|
+
}, Ta), this.documentTouchedListener = (e) => {
|
|
10628
10673
|
this.documentTouched(e);
|
|
10629
10674
|
};
|
|
10630
10675
|
}
|
|
@@ -10731,23 +10776,23 @@ class Ia extends E {
|
|
|
10731
10776
|
* Makes Editor.js interface
|
|
10732
10777
|
*/
|
|
10733
10778
|
make() {
|
|
10734
|
-
this.nodes.holder =
|
|
10779
|
+
this.nodes.holder = h.getHolder(this.config.holder), this.nodes.wrapper = h.make("div", [
|
|
10735
10780
|
this.CSS.editorWrapper,
|
|
10736
10781
|
...this.isRtl ? [this.CSS.editorRtlFix] : []
|
|
10737
|
-
]), this.nodes.redactor =
|
|
10782
|
+
]), this.nodes.redactor = h.make("div", this.CSS.editorZone), this.nodes.holder.offsetWidth < this.contentRect.width && this.nodes.wrapper.classList.add(this.CSS.editorWrapperNarrow), this.nodes.redactor.style.paddingBottom = this.config.minHeight + "px", this.nodes.wrapper.appendChild(this.nodes.redactor), this.nodes.holder.appendChild(this.nodes.wrapper), this.bindReadOnlyInsensitiveListeners();
|
|
10738
10783
|
}
|
|
10739
10784
|
/**
|
|
10740
10785
|
* Appends CSS
|
|
10741
10786
|
*/
|
|
10742
10787
|
loadStyles() {
|
|
10743
10788
|
const e = "editor-js-styles";
|
|
10744
|
-
if (
|
|
10789
|
+
if (h.get(e))
|
|
10745
10790
|
return;
|
|
10746
|
-
const t =
|
|
10791
|
+
const t = h.make("style", null, {
|
|
10747
10792
|
id: e,
|
|
10748
|
-
textContent:
|
|
10793
|
+
textContent: Ua.toString()
|
|
10749
10794
|
});
|
|
10750
|
-
this.config.style && !
|
|
10795
|
+
this.config.style && !X(this.config.style) && this.config.style.nonce && t.setAttribute("nonce", this.config.style.nonce), h.prepend(document.head, t);
|
|
10751
10796
|
}
|
|
10752
10797
|
/**
|
|
10753
10798
|
* Adds listeners that should work both in read-only and read-write modes
|
|
@@ -10937,7 +10982,7 @@ class Ia extends E {
|
|
|
10937
10982
|
if (!b.isCollapsed)
|
|
10938
10983
|
return;
|
|
10939
10984
|
const t = e.target, o = e.metaKey || e.ctrlKey;
|
|
10940
|
-
if (
|
|
10985
|
+
if (h.isAnchor(t) && o) {
|
|
10941
10986
|
e.stopImmediatePropagation(), e.stopPropagation();
|
|
10942
10987
|
const i = t.getAttribute("href"), s = oi(i);
|
|
10943
10988
|
ii(s);
|
|
@@ -10953,7 +10998,7 @@ class Ia extends E {
|
|
|
10953
10998
|
* @param event - click event
|
|
10954
10999
|
*/
|
|
10955
11000
|
processBottomZoneClick(e) {
|
|
10956
|
-
const t = this.Editor.BlockManager.getBlockByIndex(-1), o =
|
|
11001
|
+
const t = this.Editor.BlockManager.getBlockByIndex(-1), o = h.offset(t.holder).bottom, i = e.pageY, { BlockSelection: s } = this.Editor;
|
|
10957
11002
|
if (e.target instanceof Element && e.target.isEqualNode(this.nodes.redactor) && /**
|
|
10958
11003
|
* If there is cross block selection started, target will be equal to redactor so we need additional check
|
|
10959
11004
|
*/
|
|
@@ -10994,7 +11039,7 @@ class Ia extends E {
|
|
|
10994
11039
|
this.readOnlyMutableListeners.on(this.nodes.wrapper, "input", e), this.readOnlyMutableListeners.on(this.nodes.wrapper, "focusin", e), this.readOnlyMutableListeners.on(this.nodes.wrapper, "focusout", e);
|
|
10995
11040
|
}
|
|
10996
11041
|
}
|
|
10997
|
-
const
|
|
11042
|
+
const Ya = {
|
|
10998
11043
|
// API Modules
|
|
10999
11044
|
BlocksAPI: gi,
|
|
11000
11045
|
CaretAPI: bi,
|
|
@@ -11003,9 +11048,9 @@ const Oa = {
|
|
|
11003
11048
|
API: ki,
|
|
11004
11049
|
InlineToolbarAPI: yi,
|
|
11005
11050
|
ListenersAPI: wi,
|
|
11006
|
-
NotifierAPI:
|
|
11051
|
+
NotifierAPI: Bi,
|
|
11007
11052
|
ReadOnlyAPI: Ti,
|
|
11008
|
-
SanitizerAPI:
|
|
11053
|
+
SanitizerAPI: Ai,
|
|
11009
11054
|
SaverAPI: Pi,
|
|
11010
11055
|
SelectionAPI: Ni,
|
|
11011
11056
|
ToolsAPI: Ri,
|
|
@@ -11014,26 +11059,26 @@ const Oa = {
|
|
|
11014
11059
|
TooltipAPI: Ui,
|
|
11015
11060
|
UiAPI: Wi,
|
|
11016
11061
|
// Toolbar Modules
|
|
11017
|
-
BlockSettings:
|
|
11018
|
-
Toolbar:
|
|
11019
|
-
InlineToolbar:
|
|
11062
|
+
BlockSettings: _s,
|
|
11063
|
+
Toolbar: js,
|
|
11064
|
+
InlineToolbar: $s,
|
|
11020
11065
|
// Modules
|
|
11021
|
-
BlockEvents:
|
|
11022
|
-
BlockManager:
|
|
11023
|
-
BlockSelection:
|
|
11066
|
+
BlockEvents: ka,
|
|
11067
|
+
BlockManager: Ea,
|
|
11068
|
+
BlockSelection: xa,
|
|
11024
11069
|
Caret: Ye,
|
|
11025
|
-
CrossBlockSelection:
|
|
11026
|
-
DragNDrop:
|
|
11027
|
-
ModificationsObserver:
|
|
11028
|
-
Paste:
|
|
11029
|
-
ReadOnly:
|
|
11030
|
-
RectangleSelection:
|
|
11031
|
-
Renderer:
|
|
11032
|
-
Saver:
|
|
11070
|
+
CrossBlockSelection: Ca,
|
|
11071
|
+
DragNDrop: Ba,
|
|
11072
|
+
ModificationsObserver: Ia,
|
|
11073
|
+
Paste: Oa,
|
|
11074
|
+
ReadOnly: _a,
|
|
11075
|
+
RectangleSelection: Ce,
|
|
11076
|
+
Renderer: Ma,
|
|
11077
|
+
Saver: La,
|
|
11033
11078
|
Tools: Wn,
|
|
11034
|
-
UI:
|
|
11079
|
+
UI: Wa
|
|
11035
11080
|
};
|
|
11036
|
-
class
|
|
11081
|
+
class Ka {
|
|
11037
11082
|
/**
|
|
11038
11083
|
* @param {EditorConfig} config - user configuration
|
|
11039
11084
|
*/
|
|
@@ -11047,7 +11092,7 @@ class _a {
|
|
|
11047
11092
|
const { BlockManager: i, Caret: s, UI: r, ModificationsObserver: a } = this.moduleInstances;
|
|
11048
11093
|
r.checkEmptiness(), a.enable(), this.configuration.autofocus === !0 && this.configuration.readOnly !== !0 && s.setToBlock(i.blocks[0], s.positions.START), t();
|
|
11049
11094
|
}).catch((i) => {
|
|
11050
|
-
|
|
11095
|
+
I(`Editor.js is not ready because of ${i}`, "error"), o(i);
|
|
11051
11096
|
});
|
|
11052
11097
|
}
|
|
11053
11098
|
/**
|
|
@@ -11061,7 +11106,7 @@ class _a {
|
|
|
11061
11106
|
...e
|
|
11062
11107
|
} : this.config = {
|
|
11063
11108
|
holder: e
|
|
11064
|
-
},
|
|
11109
|
+
}, ut(!!this.config.holderId, "config.holderId", "config.holder"), this.config.holderId && !this.config.holder && (this.config.holder = this.config.holderId, this.config.holderId = null), this.config.holder == null && (this.config.holder = "editorjs"), this.config.logLevel || (this.config.logLevel = Ao.VERBOSE), Zn(this.config.logLevel), ut(!!this.config.initialBlock, "config.initialBlock", "config.defaultBlock"), this.config.defaultBlock = this.config.defaultBlock || this.config.initialBlock || "paragraph", this.config.minHeight = this.config.minHeight !== void 0 ? this.config.minHeight : 300;
|
|
11065
11110
|
const t = {
|
|
11066
11111
|
type: this.config.defaultBlock,
|
|
11067
11112
|
data: {}
|
|
@@ -11072,7 +11117,7 @@ class _a {
|
|
|
11072
11117
|
a: !0
|
|
11073
11118
|
}, this.config.hideToolbar = this.config.hideToolbar ? this.config.hideToolbar : !1, this.config.tools = this.config.tools || {}, this.config.i18n = this.config.i18n || {}, this.config.data = this.config.data || { blocks: [] }, this.config.onReady = this.config.onReady || (() => {
|
|
11074
11119
|
}), this.config.onChange = this.config.onChange || (() => {
|
|
11075
|
-
}), this.config.inlineToolbar = this.config.inlineToolbar !== void 0 ? this.config.inlineToolbar : !0, (
|
|
11120
|
+
}), this.config.inlineToolbar = this.config.inlineToolbar !== void 0 ? this.config.inlineToolbar : !0, (X(this.config.data) || !this.config.data.blocks || this.config.data.blocks.length === 0) && (this.config.data = { blocks: [t] }), this.config.readOnly = this.config.readOnly || !1, (o = this.config.i18n) != null && o.messages && N.setDictionary(this.config.i18n.messages), this.config.i18n.direction = ((i = this.config.i18n) == null ? void 0 : i.direction) || "ltr";
|
|
11076
11121
|
}
|
|
11077
11122
|
/**
|
|
11078
11123
|
* Returns private property
|
|
@@ -11089,9 +11134,9 @@ class _a {
|
|
|
11089
11134
|
const { holderId: e, holder: t } = this.config;
|
|
11090
11135
|
if (e && t)
|
|
11091
11136
|
throw Error("«holderId» and «holder» param can't assign at the same time.");
|
|
11092
|
-
if (te(t) && !
|
|
11137
|
+
if (te(t) && !h.get(t))
|
|
11093
11138
|
throw Error(`element with ID «${t}» is missing. Pass correct holder's ID.`);
|
|
11094
|
-
if (t && F(t) && !
|
|
11139
|
+
if (t && F(t) && !h.isElement(t))
|
|
11095
11140
|
throw Error("«holder» value must be an Element node");
|
|
11096
11141
|
}
|
|
11097
11142
|
/**
|
|
@@ -11124,9 +11169,9 @@ class _a {
|
|
|
11124
11169
|
try {
|
|
11125
11170
|
await this.moduleInstances[o].prepare();
|
|
11126
11171
|
} catch (i) {
|
|
11127
|
-
if (i instanceof
|
|
11172
|
+
if (i instanceof jo)
|
|
11128
11173
|
throw new Error(i.message);
|
|
11129
|
-
|
|
11174
|
+
I(`Module ${o} was skipped because of %o`, "warn", i);
|
|
11130
11175
|
}
|
|
11131
11176
|
}),
|
|
11132
11177
|
Promise.resolve()
|
|
@@ -11142,14 +11187,14 @@ class _a {
|
|
|
11142
11187
|
* Make modules instances and save it to the @property this.moduleInstances
|
|
11143
11188
|
*/
|
|
11144
11189
|
constructModules() {
|
|
11145
|
-
Object.entries(
|
|
11190
|
+
Object.entries(Ya).forEach(([e, t]) => {
|
|
11146
11191
|
try {
|
|
11147
11192
|
this.moduleInstances[e] = new t({
|
|
11148
11193
|
config: this.configuration,
|
|
11149
11194
|
eventsDispatcher: this.eventsDispatcher
|
|
11150
11195
|
});
|
|
11151
11196
|
} catch (o) {
|
|
11152
|
-
|
|
11197
|
+
I("[constructModules]", `Module ${e} skipped because`, "error", o);
|
|
11153
11198
|
}
|
|
11154
11199
|
});
|
|
11155
11200
|
}
|
|
@@ -11181,10 +11226,10 @@ class _a {
|
|
|
11181
11226
|
* @see Editor.js <https://editorjs.io>
|
|
11182
11227
|
* @author CodeX Team <https://codex.so>
|
|
11183
11228
|
*/
|
|
11184
|
-
class
|
|
11229
|
+
class Xa {
|
|
11185
11230
|
/** Editor version */
|
|
11186
11231
|
static get version() {
|
|
11187
|
-
return "2.31.
|
|
11232
|
+
return "2.31.17";
|
|
11188
11233
|
}
|
|
11189
11234
|
/**
|
|
11190
11235
|
* @param {EditorConfig|string|undefined} [configuration] - user configuration
|
|
@@ -11192,8 +11237,8 @@ class Aa {
|
|
|
11192
11237
|
constructor(e) {
|
|
11193
11238
|
let t = () => {
|
|
11194
11239
|
};
|
|
11195
|
-
F(e) &&
|
|
11196
|
-
const o = new
|
|
11240
|
+
F(e) && L(e.onReady) && (t = e.onReady);
|
|
11241
|
+
const o = new Ka(e);
|
|
11197
11242
|
this.isReady = o.isReady.then(() => {
|
|
11198
11243
|
this.exportAPI(o), t();
|
|
11199
11244
|
});
|
|
@@ -11206,7 +11251,7 @@ class Aa {
|
|
|
11206
11251
|
exportAPI(e) {
|
|
11207
11252
|
const t = ["configuration"], o = () => {
|
|
11208
11253
|
Object.values(e.moduleInstances).forEach((s) => {
|
|
11209
|
-
|
|
11254
|
+
L(s.destroy) && s.destroy(), s.listeners.removeAll();
|
|
11210
11255
|
}), zi(), e = null;
|
|
11211
11256
|
for (const s in this)
|
|
11212
11257
|
Object.prototype.hasOwnProperty.call(this, s) && delete this[s];
|
|
@@ -11238,6 +11283,6 @@ class Aa {
|
|
|
11238
11283
|
}
|
|
11239
11284
|
}
|
|
11240
11285
|
export {
|
|
11241
|
-
|
|
11286
|
+
Xa as default
|
|
11242
11287
|
};
|
|
11243
11288
|
//# sourceMappingURL=editorjs.mjs.map
|