@enos5/enos-vue-default 1.8.12 → 1.8.13
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/components/CustomSelect.vue.d.ts +0 -9
- package/dist/components/InputGroup.vue.d.ts +0 -9
- package/dist/components/SelectInput.vue.d.ts +0 -9
- package/dist/{index-G1cAlO5C.js → index-1G1T4Qrv.js} +373 -203
- package/dist/index-1G1T4Qrv.js.map +1 -0
- package/dist/{index-Ch9hFG6f.js → index-BBGZQp5w.js} +17 -6
- package/dist/{index-Ch9hFG6f.js.map → index-BBGZQp5w.js.map} +1 -1
- package/dist/{index-BHTvTOGk.js → index-BR_u7CCm.js} +4 -2
- package/dist/{index-BHTvTOGk.js.map → index-BR_u7CCm.js.map} +1 -1
- package/dist/{index-6eLEqodC.js → index-Bsqrrc8R.js} +35 -4
- package/dist/index-Bsqrrc8R.js.map +1 -0
- package/dist/index-CiFpmPug.js.map +1 -1
- package/dist/{index-Cjhk16SP.js → index-CuSlJQwq.js} +10 -8
- package/dist/index-CuSlJQwq.js.map +1 -0
- package/dist/{index-D7sesyMc.js → index-D72Leh_x.js} +4 -4
- package/dist/{index-D7sesyMc.js.map → index-D72Leh_x.js.map} +1 -1
- package/dist/{index-BPcdR1qv.js → index-ukywSRmc.js} +10 -9
- package/dist/index-ukywSRmc.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.node.js +1 -1
- package/dist/{plugin-BB5Wpvyp.js → plugin-BckDeD_m.js} +12 -29
- package/dist/plugin-BckDeD_m.js.map +1 -0
- package/dist/styles.css +1603 -143
- package/dist/{tinymce-WPdeGquX.js → tinymce-Dg510HCs.js} +659 -388
- package/dist/tinymce-Dg510HCs.js.map +1 -0
- package/package.json +36 -36
- package/dist/index-6eLEqodC.js.map +0 -1
- package/dist/index-BPcdR1qv.js.map +0 -1
- package/dist/index-Cjhk16SP.js.map +0 -1
- package/dist/index-G1cAlO5C.js.map +0 -1
- package/dist/plugin-BB5Wpvyp.js.map +0 -1
- package/dist/tinymce-WPdeGquX.js.map +0 -1
|
@@ -595,9 +595,9 @@ function requireTinymce() {
|
|
|
595
595
|
copy2.sort(comparator);
|
|
596
596
|
return copy2;
|
|
597
597
|
};
|
|
598
|
-
const get$
|
|
599
|
-
const head = (xs) => get$
|
|
600
|
-
const last$2 = (xs) => get$
|
|
598
|
+
const get$c = (xs, i) => i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none();
|
|
599
|
+
const head = (xs) => get$c(xs, 0);
|
|
600
|
+
const last$2 = (xs) => get$c(xs, xs.length - 1);
|
|
601
601
|
const from = isFunction(Array.from) ? Array.from : (x) => nativeSlice.call(x);
|
|
602
602
|
const findMap = (arr, f) => {
|
|
603
603
|
for (let i = 0; i < arr.length; i++) {
|
|
@@ -672,7 +672,7 @@ function requireTinymce() {
|
|
|
672
672
|
const values = (obj) => {
|
|
673
673
|
return mapToArray(obj, identity);
|
|
674
674
|
};
|
|
675
|
-
const get$
|
|
675
|
+
const get$b = (obj, key) => {
|
|
676
676
|
return has$2(obj, key) ? Optional.from(obj[key]) : Optional.none();
|
|
677
677
|
};
|
|
678
678
|
const has$2 = (obj, key) => hasOwnProperty$1.call(obj, key);
|
|
@@ -2011,7 +2011,7 @@ function requireTinymce() {
|
|
|
2011
2011
|
throw new Error("Attribute value was not simple");
|
|
2012
2012
|
}
|
|
2013
2013
|
};
|
|
2014
|
-
const set$
|
|
2014
|
+
const set$5 = (element, key, value2) => {
|
|
2015
2015
|
rawSet(element.dom, key, value2);
|
|
2016
2016
|
};
|
|
2017
2017
|
const setAll$1 = (element, attrs) => {
|
|
@@ -2020,11 +2020,11 @@ function requireTinymce() {
|
|
|
2020
2020
|
rawSet(dom2, k, v);
|
|
2021
2021
|
});
|
|
2022
2022
|
};
|
|
2023
|
-
const get$
|
|
2023
|
+
const get$a = (element, key) => {
|
|
2024
2024
|
const v = element.dom.getAttribute(key);
|
|
2025
2025
|
return v === null ? void 0 : v;
|
|
2026
2026
|
};
|
|
2027
|
-
const getOpt = (element, key) => Optional.from(get$
|
|
2027
|
+
const getOpt = (element, key) => Optional.from(get$a(element, key));
|
|
2028
2028
|
const has$1 = (element, key) => {
|
|
2029
2029
|
const dom2 = element.dom;
|
|
2030
2030
|
return dom2 && dom2.hasAttribute ? dom2.hasAttribute(key) : false;
|
|
@@ -2083,8 +2083,8 @@ function requireTinymce() {
|
|
|
2083
2083
|
return children$1(SugarElement.fromDom(div));
|
|
2084
2084
|
};
|
|
2085
2085
|
const fromDom$1 = (nodes) => map$3(nodes, SugarElement.fromDom);
|
|
2086
|
-
const get$
|
|
2087
|
-
const set$
|
|
2086
|
+
const get$9 = (element) => element.dom.innerHTML;
|
|
2087
|
+
const set$4 = (element, content) => {
|
|
2088
2088
|
const owner2 = owner$1(element);
|
|
2089
2089
|
const docDom = owner2.dom;
|
|
2090
2090
|
const fragment = SugarElement.fromDom(docDom.createDocumentFragment());
|
|
@@ -2097,7 +2097,7 @@ function requireTinymce() {
|
|
|
2097
2097
|
const container = SugarElement.fromTag("div");
|
|
2098
2098
|
const clone2 = SugarElement.fromDom(element.dom.cloneNode(true));
|
|
2099
2099
|
append$1(container, clone2);
|
|
2100
|
-
return get$
|
|
2100
|
+
return get$9(container);
|
|
2101
2101
|
};
|
|
2102
2102
|
const isSupported = (dom2) => dom2.style !== void 0 && isFunction(dom2.style.getPropertyValue);
|
|
2103
2103
|
const inBody = (element) => {
|
|
@@ -2122,7 +2122,7 @@ function requireTinymce() {
|
|
|
2122
2122
|
dom2.style.removeProperty(property);
|
|
2123
2123
|
}
|
|
2124
2124
|
};
|
|
2125
|
-
const set$
|
|
2125
|
+
const set$3 = (element, property, value2) => {
|
|
2126
2126
|
const dom2 = element.dom;
|
|
2127
2127
|
internalSet(dom2, property, value2);
|
|
2128
2128
|
};
|
|
@@ -2132,7 +2132,7 @@ function requireTinymce() {
|
|
|
2132
2132
|
internalSet(dom2, k, v);
|
|
2133
2133
|
});
|
|
2134
2134
|
};
|
|
2135
|
-
const get$
|
|
2135
|
+
const get$8 = (element, property) => {
|
|
2136
2136
|
const dom2 = element.dom;
|
|
2137
2137
|
const styles = window.getComputedStyle(dom2);
|
|
2138
2138
|
const r2 = styles.getPropertyValue(property);
|
|
@@ -2176,14 +2176,14 @@ function requireTinymce() {
|
|
|
2176
2176
|
const get2 = (element) => {
|
|
2177
2177
|
const r2 = getOffset(element);
|
|
2178
2178
|
if (r2 <= 0 || r2 === null) {
|
|
2179
|
-
const css = get$
|
|
2179
|
+
const css = get$8(element, name2);
|
|
2180
2180
|
return parseFloat(css) || 0;
|
|
2181
2181
|
}
|
|
2182
2182
|
return r2;
|
|
2183
2183
|
};
|
|
2184
2184
|
const getOuter2 = get2;
|
|
2185
2185
|
const aggregate = (element, properties) => foldl(properties, (acc, property) => {
|
|
2186
|
-
const val = get$
|
|
2186
|
+
const val = get$8(element, property);
|
|
2187
2187
|
const value2 = val === void 0 ? 0 : parseInt(val, 10);
|
|
2188
2188
|
return isNaN(value2) ? acc : acc + value2;
|
|
2189
2189
|
}, 0);
|
|
@@ -2204,7 +2204,7 @@ function requireTinymce() {
|
|
|
2204
2204
|
const dom2 = element.dom;
|
|
2205
2205
|
return inBody(element) ? dom2.getBoundingClientRect().height : dom2.offsetHeight;
|
|
2206
2206
|
});
|
|
2207
|
-
const get$
|
|
2207
|
+
const get$7 = (element) => api$1.get(element);
|
|
2208
2208
|
const r = (left, top) => {
|
|
2209
2209
|
const translate2 = (x, y) => r(left + x, top + y);
|
|
2210
2210
|
return {
|
|
@@ -2251,7 +2251,7 @@ function requireTinymce() {
|
|
|
2251
2251
|
}
|
|
2252
2252
|
return boxPosition(dom2);
|
|
2253
2253
|
};
|
|
2254
|
-
const get$
|
|
2254
|
+
const get$6 = (_DOC) => {
|
|
2255
2255
|
const doc = _DOC !== void 0 ? _DOC.dom : document;
|
|
2256
2256
|
const x = doc.body.scrollLeft || doc.documentElement.scrollLeft;
|
|
2257
2257
|
const y = doc.body.scrollTop || doc.documentElement.scrollTop;
|
|
@@ -2301,23 +2301,23 @@ function requireTinymce() {
|
|
|
2301
2301
|
return SugarElement.fromDom(fragment);
|
|
2302
2302
|
};
|
|
2303
2303
|
const api = NodeValue(isText$c, "text");
|
|
2304
|
-
const get$
|
|
2304
|
+
const get$5 = (element) => api.get(element);
|
|
2305
2305
|
const getOption = (element) => api.getOption(element);
|
|
2306
|
-
const set$
|
|
2306
|
+
const set$2 = (element, value2) => api.set(element, value2);
|
|
2307
2307
|
const read$4 = (element, attr) => {
|
|
2308
|
-
const value2 = get$
|
|
2308
|
+
const value2 = get$a(element, attr);
|
|
2309
2309
|
return value2 === void 0 || value2 === "" ? [] : value2.split(" ");
|
|
2310
2310
|
};
|
|
2311
2311
|
const add$4 = (element, attr, id) => {
|
|
2312
2312
|
const old = read$4(element, attr);
|
|
2313
2313
|
const nu2 = old.concat([id]);
|
|
2314
|
-
set$
|
|
2314
|
+
set$5(element, attr, nu2.join(" "));
|
|
2315
2315
|
return true;
|
|
2316
2316
|
};
|
|
2317
2317
|
const remove$6 = (element, attr, id) => {
|
|
2318
2318
|
const nu2 = filter$5(read$4(element, attr), (v) => v !== id);
|
|
2319
2319
|
if (nu2.length > 0) {
|
|
2320
|
-
set$
|
|
2320
|
+
set$5(element, attr, nu2.join(" "));
|
|
2321
2321
|
} else {
|
|
2322
2322
|
remove$9(element, attr);
|
|
2323
2323
|
}
|
|
@@ -2385,11 +2385,11 @@ function requireTinymce() {
|
|
|
2385
2385
|
return ClosestOrAncestor(is2, ancestor$4, scope, selector, isRoot2);
|
|
2386
2386
|
};
|
|
2387
2387
|
const supports = (element) => element.dom.classList !== void 0;
|
|
2388
|
-
const get$
|
|
2388
|
+
const get$4 = (element) => read$4(element, "class");
|
|
2389
2389
|
const add$3 = (element, clazz) => add$4(element, "class", clazz);
|
|
2390
2390
|
const remove$5 = (element, clazz) => remove$6(element, "class", clazz);
|
|
2391
2391
|
const toggle$2 = (element, clazz) => {
|
|
2392
|
-
if (contains$2(get$
|
|
2392
|
+
if (contains$2(get$4(element), clazz)) {
|
|
2393
2393
|
return remove$5(element, clazz);
|
|
2394
2394
|
} else {
|
|
2395
2395
|
return add$3(element, clazz);
|
|
@@ -2403,7 +2403,7 @@ function requireTinymce() {
|
|
|
2403
2403
|
}
|
|
2404
2404
|
};
|
|
2405
2405
|
const cleanClass = (element) => {
|
|
2406
|
-
const classList = supports(element) ? element.dom.classList : get$
|
|
2406
|
+
const classList = supports(element) ? element.dom.classList : get$4(element);
|
|
2407
2407
|
if (classList.length === 0) {
|
|
2408
2408
|
remove$9(element, "class");
|
|
2409
2409
|
}
|
|
@@ -2442,9 +2442,13 @@ function requireTinymce() {
|
|
|
2442
2442
|
}
|
|
2443
2443
|
};
|
|
2444
2444
|
const getRaw = (element) => element.dom.contentEditable;
|
|
2445
|
-
const set = (element, editable) => {
|
|
2445
|
+
const set$1 = (element, editable) => {
|
|
2446
2446
|
element.dom.contentEditable = editable ? "true" : "false";
|
|
2447
2447
|
};
|
|
2448
|
+
const get$3 = (element) => element.dom.textContent;
|
|
2449
|
+
const set = (element, value2) => {
|
|
2450
|
+
element.dom.textContent = value2;
|
|
2451
|
+
};
|
|
2448
2452
|
const ancestors$1 = (scope, predicate, isRoot2) => filter$5(parents$1(scope, isRoot2), predicate);
|
|
2449
2453
|
const children = (scope, predicate) => filter$5(children$1(scope), predicate);
|
|
2450
2454
|
const descendants$1 = (scope, predicate) => {
|
|
@@ -2495,7 +2499,7 @@ function requireTinymce() {
|
|
|
2495
2499
|
// but trim removes and that's allowed
|
|
2496
2500
|
text2.trim().length !== 0 || text2.indexOf(nbsp) > -1
|
|
2497
2501
|
)).isSome();
|
|
2498
|
-
const isContentEditableFalse$b = (elem) => isHTMLElement$1(elem) && get$
|
|
2502
|
+
const isContentEditableFalse$b = (elem) => isHTMLElement$1(elem) && get$a(elem, "contenteditable") === "false";
|
|
2499
2503
|
const elementsWithCursorPosition = ["img", "br"];
|
|
2500
2504
|
const isCursorPosition = (elem) => {
|
|
2501
2505
|
const hasCursorPosition = isTextNodeWithCursorPosition(elem);
|
|
@@ -2636,7 +2640,7 @@ function requireTinymce() {
|
|
|
2636
2640
|
const getBounds = (_win) => {
|
|
2637
2641
|
const win = _win === void 0 ? window : _win;
|
|
2638
2642
|
const doc = win.document;
|
|
2639
|
-
const scroll = get$
|
|
2643
|
+
const scroll = get$6(SugarElement.fromDom(doc));
|
|
2640
2644
|
return get$2(win).fold(() => {
|
|
2641
2645
|
const html2 = win.document.documentElement;
|
|
2642
2646
|
const width = html2.clientWidth;
|
|
@@ -2848,7 +2852,7 @@ function requireTinymce() {
|
|
|
2848
2852
|
const isDetails = matchNodeName$1("details");
|
|
2849
2853
|
const isSummary$1 = matchNodeName$1("summary");
|
|
2850
2854
|
const ucVideoNodeName = "uc-video";
|
|
2851
|
-
const isUcVideo = (
|
|
2855
|
+
const isUcVideo = matchNodeName$1(ucVideoNodeName);
|
|
2852
2856
|
const defaultOptionValues = {
|
|
2853
2857
|
skipBogus: true,
|
|
2854
2858
|
includeZwsp: false,
|
|
@@ -3048,7 +3052,7 @@ function requireTinymce() {
|
|
|
3048
3052
|
const updateCaret = (schema, root, caretParent) => {
|
|
3049
3053
|
const isRoot2 = (el) => eq(el, SugarElement.fromDom(root));
|
|
3050
3054
|
const parents2 = parents$1(SugarElement.fromDom(caretParent), isRoot2);
|
|
3051
|
-
get$
|
|
3055
|
+
get$c(parents2, parents2.length - 2).filter(isElement$8).fold(() => updateChildren(schema, root), (scope) => updateChildren(schema, scope.dom));
|
|
3052
3056
|
};
|
|
3053
3057
|
const hasBlockAttr = (el) => el.hasAttribute(transparentBlockAttr);
|
|
3054
3058
|
const isTransparentElementName = (schema, name2) => has$2(schema.getTransparentElements(), name2);
|
|
@@ -3080,7 +3084,7 @@ function requireTinymce() {
|
|
|
3080
3084
|
const doc = body.ownerDocument;
|
|
3081
3085
|
rootElm = rootElm ? rootElm : body;
|
|
3082
3086
|
if (elm) {
|
|
3083
|
-
if (rootElm === body && elm.getBoundingClientRect && get$
|
|
3087
|
+
if (rootElm === body && elm.getBoundingClientRect && get$8(SugarElement.fromDom(body), "position") === "static") {
|
|
3084
3088
|
const pos = elm.getBoundingClientRect();
|
|
3085
3089
|
x = pos.left + (doc.documentElement.scrollLeft || body.scrollLeft) - doc.documentElement.clientLeft;
|
|
3086
3090
|
y = pos.top + (doc.documentElement.scrollTop || body.scrollTop) - doc.documentElement.clientTop;
|
|
@@ -3134,7 +3138,7 @@ function requireTinymce() {
|
|
|
3134
3138
|
const styleContainer = getStyleContainer(edos);
|
|
3135
3139
|
descendant$1(styleContainer, "#" + id).each(remove$8);
|
|
3136
3140
|
};
|
|
3137
|
-
const getOrCreateState = (url) => get$
|
|
3141
|
+
const getOrCreateState = (url) => get$b(loadedStates, url).getOrThunk(() => ({
|
|
3138
3142
|
id: "mce-u" + idCount++,
|
|
3139
3143
|
passed: [],
|
|
3140
3144
|
failed: [],
|
|
@@ -3185,16 +3189,16 @@ function requireTinymce() {
|
|
|
3185
3189
|
});
|
|
3186
3190
|
const crossorigin = getCrossOrigin$1(url, settings);
|
|
3187
3191
|
if (crossorigin !== void 0) {
|
|
3188
|
-
set$
|
|
3192
|
+
set$5(linkElem, "crossOrigin", crossorigin);
|
|
3189
3193
|
}
|
|
3190
3194
|
if (settings.referrerPolicy) {
|
|
3191
|
-
set$
|
|
3195
|
+
set$5(linkElem, "referrerpolicy", settings.referrerPolicy);
|
|
3192
3196
|
}
|
|
3193
3197
|
link = linkElem.dom;
|
|
3194
3198
|
link.onload = passed;
|
|
3195
3199
|
link.onerror = failed;
|
|
3196
3200
|
addStyle(linkElem);
|
|
3197
|
-
set$
|
|
3201
|
+
set$5(linkElem, "href", urlWithSuffix);
|
|
3198
3202
|
});
|
|
3199
3203
|
const loadRawCss = (key, css) => {
|
|
3200
3204
|
const state = getOrCreateState(key);
|
|
@@ -3223,7 +3227,7 @@ function requireTinymce() {
|
|
|
3223
3227
|
};
|
|
3224
3228
|
const unload = (url) => {
|
|
3225
3229
|
const urlWithSuffix = Tools._addCacheSuffix(url);
|
|
3226
|
-
get$
|
|
3230
|
+
get$b(loadedStates, urlWithSuffix).each((state) => {
|
|
3227
3231
|
const count2 = --state.count;
|
|
3228
3232
|
if (count2 === 0) {
|
|
3229
3233
|
delete loadedStates[urlWithSuffix];
|
|
@@ -3232,7 +3236,7 @@ function requireTinymce() {
|
|
|
3232
3236
|
});
|
|
3233
3237
|
};
|
|
3234
3238
|
const unloadRawCss = (key) => {
|
|
3235
|
-
get$
|
|
3239
|
+
get$b(loadedStates, key).each((state) => {
|
|
3236
3240
|
const count2 = --state.count;
|
|
3237
3241
|
if (count2 === 0) {
|
|
3238
3242
|
delete loadedStates[key];
|
|
@@ -4453,7 +4457,9 @@ function requireTinymce() {
|
|
|
4453
4457
|
compress("border", "-style");
|
|
4454
4458
|
compress("padding", "");
|
|
4455
4459
|
compress("margin", "");
|
|
4456
|
-
|
|
4460
|
+
if (!/(#.* rgb(a?)\(.*)|(rgb(a?)\(.*\) )/.test(styles["border-color"])) {
|
|
4461
|
+
compress2("border", "border-width", "border-style", "border-color");
|
|
4462
|
+
}
|
|
4457
4463
|
if (styles.border === "medium none") {
|
|
4458
4464
|
delete styles.border;
|
|
4459
4465
|
}
|
|
@@ -4519,7 +4525,8 @@ function requireTinymce() {
|
|
|
4519
4525
|
webkitMovementX: true,
|
|
4520
4526
|
webkitMovementY: true,
|
|
4521
4527
|
keyIdentifier: true,
|
|
4522
|
-
mozPressure: true
|
|
4528
|
+
mozPressure: true,
|
|
4529
|
+
mozInputSource: true
|
|
4523
4530
|
};
|
|
4524
4531
|
const isNativeEvent = (event) => event instanceof Event || isFunction(event.initEvent);
|
|
4525
4532
|
const hasIsDefaultPrevented = (event) => event.isDefaultPrevented === always || event.isDefaultPrevented === never;
|
|
@@ -4868,7 +4875,7 @@ function requireTinymce() {
|
|
|
4868
4875
|
if (isNullable(value2) || value2 === "") {
|
|
4869
4876
|
remove$9(elm, name2);
|
|
4870
4877
|
} else {
|
|
4871
|
-
set$
|
|
4878
|
+
set$5(elm, name2, value2);
|
|
4872
4879
|
}
|
|
4873
4880
|
};
|
|
4874
4881
|
const camelCaseToHyphens = (name2) => name2.replace(/[A-Z]/g, (v) => "-" + v.toLowerCase());
|
|
@@ -4889,7 +4896,7 @@ function requireTinymce() {
|
|
|
4889
4896
|
return idx;
|
|
4890
4897
|
};
|
|
4891
4898
|
const updateInternalStyleAttr = (styles, elm) => {
|
|
4892
|
-
const rawValue = get$
|
|
4899
|
+
const rawValue = get$a(elm, "style");
|
|
4893
4900
|
const value2 = styles.serialize(styles.parse(rawValue), name(elm));
|
|
4894
4901
|
legacySetAttribute(elm, internalStyleName, value2);
|
|
4895
4902
|
};
|
|
@@ -4905,7 +4912,7 @@ function requireTinymce() {
|
|
|
4905
4912
|
if (isNullable(cssValue) || cssValue === "") {
|
|
4906
4913
|
remove$7($elm, normalizedName);
|
|
4907
4914
|
} else {
|
|
4908
|
-
set$
|
|
4915
|
+
set$3($elm, normalizedName, convertStyleToString(cssValue, normalizedName));
|
|
4909
4916
|
}
|
|
4910
4917
|
};
|
|
4911
4918
|
const setupAttrHooks = (styles, settings, getContext2) => {
|
|
@@ -4922,7 +4929,7 @@ function requireTinymce() {
|
|
|
4922
4929
|
},
|
|
4923
4930
|
get: (elm, name2) => {
|
|
4924
4931
|
const sugarElm = SugarElement.fromDom(elm);
|
|
4925
|
-
return get$
|
|
4932
|
+
return get$a(sugarElm, "data-mce-" + name2) || get$a(sugarElm, name2);
|
|
4926
4933
|
}
|
|
4927
4934
|
};
|
|
4928
4935
|
const attrHooks = {
|
|
@@ -4939,7 +4946,7 @@ function requireTinymce() {
|
|
|
4939
4946
|
},
|
|
4940
4947
|
get: (elm) => {
|
|
4941
4948
|
const sugarElm = SugarElement.fromDom(elm);
|
|
4942
|
-
const value2 = get$
|
|
4949
|
+
const value2 = get$a(sugarElm, internalStyleName) || get$a(sugarElm, "style");
|
|
4943
4950
|
return styles.serialize(styles.parse(value2), name(sugarElm));
|
|
4944
4951
|
}
|
|
4945
4952
|
}
|
|
@@ -4996,7 +5003,7 @@ function requireTinymce() {
|
|
|
4996
5003
|
if (hook && hook.get) {
|
|
4997
5004
|
value2 = hook.get($elm.dom, name2);
|
|
4998
5005
|
} else {
|
|
4999
|
-
value2 = get$
|
|
5006
|
+
value2 = get$a($elm, name2);
|
|
5000
5007
|
}
|
|
5001
5008
|
}
|
|
5002
5009
|
return isNonNullable(value2) ? value2 : defaultVal;
|
|
@@ -5010,7 +5017,7 @@ function requireTinymce() {
|
|
|
5010
5017
|
if (isElement$7(e)) {
|
|
5011
5018
|
const $elm = SugarElement.fromDom(e);
|
|
5012
5019
|
const val = value2 === "" ? null : value2;
|
|
5013
|
-
const originalValue = get$
|
|
5020
|
+
const originalValue = get$a($elm, name2);
|
|
5014
5021
|
const hook = attrHooks[name2];
|
|
5015
5022
|
if (hook && hook.set) {
|
|
5016
5023
|
hook.set($elm.dom, val, name2);
|
|
@@ -5068,7 +5075,7 @@ function requireTinymce() {
|
|
|
5068
5075
|
return void 0;
|
|
5069
5076
|
}
|
|
5070
5077
|
if (computed) {
|
|
5071
|
-
return get$
|
|
5078
|
+
return get$8(SugarElement.fromDom($elm), camelCaseToHyphens(name2));
|
|
5072
5079
|
} else {
|
|
5073
5080
|
name2 = name2.replace(/-(\D)/g, (a, b) => b.toUpperCase());
|
|
5074
5081
|
if (name2 === "float") {
|
|
@@ -5196,7 +5203,7 @@ function requireTinymce() {
|
|
|
5196
5203
|
const setHTML = (elm, html2) => {
|
|
5197
5204
|
run(elm, (e) => {
|
|
5198
5205
|
const $elm = SugarElement.fromDom(e);
|
|
5199
|
-
set$
|
|
5206
|
+
set$4($elm, html2);
|
|
5200
5207
|
});
|
|
5201
5208
|
};
|
|
5202
5209
|
const add2 = (parentElm, name2, attrs, html2, create3) => run(parentElm, (parentElm2) => {
|
|
@@ -5332,7 +5339,7 @@ function requireTinymce() {
|
|
|
5332
5339
|
run(elm, (e) => remove$7(SugarElement.fromDom(e), "display"));
|
|
5333
5340
|
};
|
|
5334
5341
|
const hide = (elm) => {
|
|
5335
|
-
run(elm, (e) => set$
|
|
5342
|
+
run(elm, (e) => set$3(SugarElement.fromDom(e), "display", "none"));
|
|
5336
5343
|
};
|
|
5337
5344
|
const isHidden = (elm) => {
|
|
5338
5345
|
const $elm = _get(elm);
|
|
@@ -6313,7 +6320,7 @@ function requireTinymce() {
|
|
|
6313
6320
|
loadScripts(scripts) {
|
|
6314
6321
|
const self = this;
|
|
6315
6322
|
const execCallbacks = (name2, url) => {
|
|
6316
|
-
get$
|
|
6323
|
+
get$b(self.scriptLoadedCallbacks, url).each((callbacks) => {
|
|
6317
6324
|
each$e(callbacks, (callback) => callback[name2](url));
|
|
6318
6325
|
});
|
|
6319
6326
|
delete self.scriptLoadedCallbacks[url];
|
|
@@ -6402,7 +6409,7 @@ function requireTinymce() {
|
|
|
6402
6409
|
const isTokenised = (str) => isArray$1(str) && str.length > 1;
|
|
6403
6410
|
const data = {};
|
|
6404
6411
|
const currentCode = Cell("en");
|
|
6405
|
-
const getLanguageData = () => get$
|
|
6412
|
+
const getLanguageData = () => get$b(data, currentCode.get());
|
|
6406
6413
|
const getData$1 = () => map$2(data, (value2) => ({ ...value2 }));
|
|
6407
6414
|
const setCode = (newCode) => {
|
|
6408
6415
|
if (newCode) {
|
|
@@ -6439,7 +6446,7 @@ function requireTinymce() {
|
|
|
6439
6446
|
const isEmpty2 = (text3) => text3 === "" || text3 === null || text3 === void 0;
|
|
6440
6447
|
const getLangData = (text3) => {
|
|
6441
6448
|
const textStr = toString2(text3);
|
|
6442
|
-
return has$2(langData, textStr) ? toString2(langData[textStr]) : get$
|
|
6449
|
+
return has$2(langData, textStr) ? toString2(langData[textStr]) : get$b(langData, textStr.toLowerCase()).map(toString2).getOr(textStr);
|
|
6443
6450
|
};
|
|
6444
6451
|
const removeContext = (str) => str.replace(/{context:\w+}$/, "");
|
|
6445
6452
|
const replaceWithEllipsisChar = (text3) => text3.replaceAll("...", ellipsis);
|
|
@@ -6456,7 +6463,7 @@ function requireTinymce() {
|
|
|
6456
6463
|
}
|
|
6457
6464
|
return replaceWithEllipsisChar(removeContext(getLangData(text2)));
|
|
6458
6465
|
};
|
|
6459
|
-
const isRtl$1 = () => getLanguageData().bind((items) => get$
|
|
6466
|
+
const isRtl$1 = () => getLanguageData().bind((items) => get$b(items, "_dir")).exists((dir) => dir === "rtl");
|
|
6460
6467
|
const hasCode = (code) => has$2(data, code);
|
|
6461
6468
|
const I18n = {
|
|
6462
6469
|
getData: getData$1,
|
|
@@ -6657,8 +6664,8 @@ function requireTinymce() {
|
|
|
6657
6664
|
const directory = {};
|
|
6658
6665
|
each$e(markers, (m) => {
|
|
6659
6666
|
if (!isBogusElement(m, body)) {
|
|
6660
|
-
const uid2 = get$
|
|
6661
|
-
const nodesAlready = get$
|
|
6667
|
+
const uid2 = get$a(m, dataAnnotationId());
|
|
6668
|
+
const nodesAlready = get$b(directory, uid2).getOr([]);
|
|
6662
6669
|
directory[uid2] = nodesAlready.concat([m]);
|
|
6663
6670
|
}
|
|
6664
6671
|
});
|
|
@@ -6678,7 +6685,7 @@ function requireTinymce() {
|
|
|
6678
6685
|
};
|
|
6679
6686
|
const updateCallbacks = (name2, f) => {
|
|
6680
6687
|
const callbackMap = changeCallbacks.get();
|
|
6681
|
-
const data2 = get$
|
|
6688
|
+
const data2 = get$b(callbackMap, name2).getOrThunk(initData);
|
|
6682
6689
|
const outputData = f(data2);
|
|
6683
6690
|
callbackMap[name2] = outputData;
|
|
6684
6691
|
changeCallbacks.set(callbackMap);
|
|
@@ -6699,7 +6706,7 @@ function requireTinymce() {
|
|
|
6699
6706
|
const toggleActiveAttr = (uid2, state) => {
|
|
6700
6707
|
each$e(findMarkers(editor, uid2), (elem) => {
|
|
6701
6708
|
if (state) {
|
|
6702
|
-
set$
|
|
6709
|
+
set$5(elem, dataAnnotationActive(), "true");
|
|
6703
6710
|
} else {
|
|
6704
6711
|
remove$9(elem, dataAnnotationActive());
|
|
6705
6712
|
}
|
|
@@ -6786,7 +6793,7 @@ function requireTinymce() {
|
|
|
6786
6793
|
settings
|
|
6787
6794
|
};
|
|
6788
6795
|
};
|
|
6789
|
-
const lookup2 = (name2) => get$
|
|
6796
|
+
const lookup2 = (name2) => get$b(annotations, name2).map((a) => a.settings);
|
|
6790
6797
|
const getNames = () => keys(annotations);
|
|
6791
6798
|
return {
|
|
6792
6799
|
register: register2,
|
|
@@ -6873,6 +6880,9 @@ function requireTinymce() {
|
|
|
6873
6880
|
};
|
|
6874
6881
|
const isTable$1 = (node) => name(node) === "table";
|
|
6875
6882
|
const isBr$6 = (node) => isElement$8(node) && name(node) === "br";
|
|
6883
|
+
const isScript = (node) => isElement$8(node) && name(node) === "script";
|
|
6884
|
+
const isStyle = (node) => isElement$8(node) && name(node) === "style";
|
|
6885
|
+
const isIframe = (node) => isElement$8(node) && name(node) === "iframe";
|
|
6876
6886
|
const isTextBlock$3 = lazyLookup(textBlocks);
|
|
6877
6887
|
const isList$1 = lazyLookup(lists);
|
|
6878
6888
|
const isListItem$2 = lazyLookup(listItems$1);
|
|
@@ -6897,7 +6907,7 @@ function requireTinymce() {
|
|
|
6897
6907
|
};
|
|
6898
6908
|
const createPaddingBr = () => {
|
|
6899
6909
|
const br = SugarElement.fromTag("br");
|
|
6900
|
-
set$
|
|
6910
|
+
set$5(br, "data-mce-bogus", "1");
|
|
6901
6911
|
return br;
|
|
6902
6912
|
};
|
|
6903
6913
|
const fillWithPaddingBr = (elm) => {
|
|
@@ -7902,15 +7912,15 @@ function requireTinymce() {
|
|
|
7902
7912
|
};
|
|
7903
7913
|
const requiredAccess = (path2, obj, key, bundle) => (
|
|
7904
7914
|
// In required mode, if it is undefined, it is an error.
|
|
7905
|
-
get$
|
|
7915
|
+
get$b(obj, key).fold(() => missingRequired(path2, key, obj), bundle)
|
|
7906
7916
|
);
|
|
7907
7917
|
const fallbackAccess = (obj, key, fallback2, bundle) => {
|
|
7908
|
-
const v = get$
|
|
7918
|
+
const v = get$b(obj, key).getOrThunk(() => fallback2(obj));
|
|
7909
7919
|
return bundle(v);
|
|
7910
7920
|
};
|
|
7911
|
-
const optionAccess = (obj, key, bundle) => bundle(get$
|
|
7921
|
+
const optionAccess = (obj, key, bundle) => bundle(get$b(obj, key));
|
|
7912
7922
|
const optionDefaultedAccess = (obj, key, fallback2, bundle) => {
|
|
7913
|
-
const opt = get$
|
|
7923
|
+
const opt = get$b(obj, key).map((val) => val === true ? fallback2(obj) : val);
|
|
7914
7924
|
return bundle(opt);
|
|
7915
7925
|
};
|
|
7916
7926
|
const extractField = (field2, path2, obj, key, prop) => {
|
|
@@ -8185,7 +8195,7 @@ function requireTinymce() {
|
|
|
8185
8195
|
if (valid) {
|
|
8186
8196
|
if (value2.indexOf("=") !== -1) {
|
|
8187
8197
|
const bodyObj = getHash(value2);
|
|
8188
|
-
return { value: get$
|
|
8198
|
+
return { value: get$b(bodyObj, editor.id).getOr(defaultValue), valid };
|
|
8189
8199
|
} else {
|
|
8190
8200
|
return { value: value2, valid };
|
|
8191
8201
|
}
|
|
@@ -8406,6 +8416,9 @@ function requireTinymce() {
|
|
|
8406
8416
|
registerOption("content_style", {
|
|
8407
8417
|
processor: "string"
|
|
8408
8418
|
});
|
|
8419
|
+
registerOption("content_language", {
|
|
8420
|
+
processor: "string"
|
|
8421
|
+
});
|
|
8409
8422
|
registerOption("content_css_cors", {
|
|
8410
8423
|
processor: "boolean",
|
|
8411
8424
|
default: false
|
|
@@ -8822,6 +8835,10 @@ function requireTinymce() {
|
|
|
8822
8835
|
},
|
|
8823
8836
|
default: (_ctx) => []
|
|
8824
8837
|
});
|
|
8838
|
+
registerOption("allow_noneditable", {
|
|
8839
|
+
processor: "boolean",
|
|
8840
|
+
default: true
|
|
8841
|
+
});
|
|
8825
8842
|
registerOption("noneditable_class", {
|
|
8826
8843
|
processor: "string",
|
|
8827
8844
|
default: "mceNonEditable"
|
|
@@ -8903,6 +8920,9 @@ function requireTinymce() {
|
|
|
8903
8920
|
processor: "string",
|
|
8904
8921
|
default: "Anonymous"
|
|
8905
8922
|
});
|
|
8923
|
+
registerOption("content_id", {
|
|
8924
|
+
processor: "string"
|
|
8925
|
+
});
|
|
8906
8926
|
registerOption("fetch_users", {
|
|
8907
8927
|
processor: (value2) => {
|
|
8908
8928
|
if (value2 === void 0) {
|
|
@@ -8994,6 +9014,7 @@ function requireTinymce() {
|
|
|
8994
9014
|
const getIndentation = option("indentation");
|
|
8995
9015
|
const getContentCss = option("content_css");
|
|
8996
9016
|
const getContentStyle = option("content_style");
|
|
9017
|
+
const getContentLanguage = option("content_language");
|
|
8997
9018
|
const getFontCss = option("font_css");
|
|
8998
9019
|
const getDirectionality = option("directionality");
|
|
8999
9020
|
const getInlineBoundarySelector = option("inline_boundaries_selector");
|
|
@@ -9049,6 +9070,7 @@ function requireTinymce() {
|
|
|
9049
9070
|
const shouldAllowHtmlDataUrls = option("allow_html_data_urls");
|
|
9050
9071
|
const getTextPatterns = option("text_patterns");
|
|
9051
9072
|
const getTextPatternsLookup = option("text_patterns_lookup");
|
|
9073
|
+
const shouldAllowNonEditable = option("allow_noneditable");
|
|
9052
9074
|
const getNonEditableClass = option("noneditable_class");
|
|
9053
9075
|
const getEditableClass = option("editable_class");
|
|
9054
9076
|
const getNonEditableRegExps = option("noneditable_regexp");
|
|
@@ -9339,7 +9361,7 @@ function requireTinymce() {
|
|
|
9339
9361
|
const isRoot2 = (node2) => node2.dom === rootNode;
|
|
9340
9362
|
return ancestor$5(SugarElement.fromDom(node), isCETrue, isRoot2).map((elm) => elm.dom).getOr(rootNode);
|
|
9341
9363
|
};
|
|
9342
|
-
const isAbsPositionedElement = (node) => isElement$7(node) && get$
|
|
9364
|
+
const isAbsPositionedElement = (node) => isElement$7(node) && get$8(SugarElement.fromDom(node), "position") === "absolute";
|
|
9343
9365
|
const isInlineBlock = (node, rootNode) => node.parentNode !== rootNode;
|
|
9344
9366
|
const isInlineAbsPositionedCEF = (node, rootNode) => isContentEditableFalse$6(node) && isAbsPositionedElement(node) && isInlineBlock(node, rootNode);
|
|
9345
9367
|
const getParentBlock$3 = (node, rootNode) => {
|
|
@@ -10229,7 +10251,7 @@ function requireTinymce() {
|
|
|
10229
10251
|
const isVariableFormatName = (editor, formatName) => {
|
|
10230
10252
|
const hasVariableValues = (format) => {
|
|
10231
10253
|
const isVariableValue = (val) => isFunction(val) || val.length > 1 && val.charAt(0) === "%";
|
|
10232
|
-
return exists(["styles", "attributes"], (key) => get$
|
|
10254
|
+
return exists(["styles", "attributes"], (key) => get$b(format, key).exists((field2) => {
|
|
10233
10255
|
const fieldValues = isArray$1(field2) ? field2 : values(field2);
|
|
10234
10256
|
return exists(fieldValues, isVariableValue);
|
|
10235
10257
|
}));
|
|
@@ -10252,7 +10274,7 @@ function requireTinymce() {
|
|
|
10252
10274
|
const isNonWrappingBlockFormat = (format) => isBlockFormat(format) && format.wrapper !== true;
|
|
10253
10275
|
const isSelectorFormat = (format) => hasNonNullableKey(format, "selector");
|
|
10254
10276
|
const isInlineFormat = (format) => hasNonNullableKey(format, "inline");
|
|
10255
|
-
const isMixedFormat = (format) => isSelectorFormat(format) && isInlineFormat(format) && is$4(get$
|
|
10277
|
+
const isMixedFormat = (format) => isSelectorFormat(format) && isInlineFormat(format) && is$4(get$b(format, "mixed"), true);
|
|
10256
10278
|
const shouldExpandToSelector = (format) => isSelectorFormat(format) && format.expand !== false && !isInlineFormat(format);
|
|
10257
10279
|
const getEmptyCaretContainers = (node) => {
|
|
10258
10280
|
const nodes = [];
|
|
@@ -10589,7 +10611,7 @@ function requireTinymce() {
|
|
|
10589
10611
|
// Footnootes plugin
|
|
10590
10612
|
"div.mce-footnotes"
|
|
10591
10613
|
];
|
|
10592
|
-
const isZeroWidth = (elem) => isText$c(elem) && get$
|
|
10614
|
+
const isZeroWidth = (elem) => isText$c(elem) && get$5(elem) === ZWSP$1;
|
|
10593
10615
|
const context = (editor, elem, wrapName, nodeName) => parentElement(elem).fold(() => "skipping", (parent2) => {
|
|
10594
10616
|
if (nodeName === "br" || isZeroWidth(elem)) {
|
|
10595
10617
|
return "valid";
|
|
@@ -10614,18 +10636,18 @@ function requireTinymce() {
|
|
|
10614
10636
|
const applyAnnotation = (elem, masterUId, data2, annotationName, decorate, directAnnotation) => {
|
|
10615
10637
|
const { uid: uid2 = masterUId, ...otherData } = data2;
|
|
10616
10638
|
add$2(elem, annotation());
|
|
10617
|
-
set$
|
|
10618
|
-
set$
|
|
10639
|
+
set$5(elem, `${dataAnnotationId()}`, uid2);
|
|
10640
|
+
set$5(elem, `${dataAnnotation()}`, annotationName);
|
|
10619
10641
|
const { attributes = {}, classes = [] } = decorate(uid2, otherData);
|
|
10620
10642
|
setAll$1(elem, attributes);
|
|
10621
10643
|
add$1(elem, classes);
|
|
10622
10644
|
if (directAnnotation) {
|
|
10623
10645
|
if (classes.length > 0) {
|
|
10624
|
-
set$
|
|
10646
|
+
set$5(elem, `${dataAnnotationClasses()}`, classes.join(","));
|
|
10625
10647
|
}
|
|
10626
10648
|
const attributeNames = keys(attributes);
|
|
10627
10649
|
if (attributeNames.length > 0) {
|
|
10628
|
-
set$
|
|
10650
|
+
set$5(elem, `${dataAnnotationAttributes()}`, attributeNames.join(","));
|
|
10629
10651
|
}
|
|
10630
10652
|
}
|
|
10631
10653
|
};
|
|
@@ -10705,7 +10727,7 @@ function requireTinymce() {
|
|
|
10705
10727
|
}
|
|
10706
10728
|
if (selection.getRng().collapsed && !hasFakeSelection) {
|
|
10707
10729
|
const wrapper = makeAnnotation(editor.getDoc(), masterUid, data2, name2, settings.decorate);
|
|
10708
|
-
set$
|
|
10730
|
+
set$4(wrapper, nbsp);
|
|
10709
10731
|
selection.getRng().insertNode(wrapper.dom);
|
|
10710
10732
|
selection.select(wrapper.dom);
|
|
10711
10733
|
} else {
|
|
@@ -10852,7 +10874,7 @@ function requireTinymce() {
|
|
|
10852
10874
|
}
|
|
10853
10875
|
};
|
|
10854
10876
|
const clamp$1 = (offset, element) => {
|
|
10855
|
-
const max2 = isText$c(element) ? get$
|
|
10877
|
+
const max2 = isText$c(element) ? get$5(element).length : children$1(element).length + 1;
|
|
10856
10878
|
if (offset > max2) {
|
|
10857
10879
|
return max2;
|
|
10858
10880
|
} else if (offset < 0) {
|
|
@@ -11851,7 +11873,7 @@ function requireTinymce() {
|
|
|
11851
11873
|
});
|
|
11852
11874
|
const find = (element) => {
|
|
11853
11875
|
const doc = getDocument();
|
|
11854
|
-
const scroll = get$
|
|
11876
|
+
const scroll = get$6(doc);
|
|
11855
11877
|
const frames = pathTo(element, Navigation);
|
|
11856
11878
|
const offset = viewport(element);
|
|
11857
11879
|
const r2 = foldr(frames, (b, a) => {
|
|
@@ -11885,7 +11907,7 @@ function requireTinymce() {
|
|
|
11885
11907
|
if (name(last2) === "img") {
|
|
11886
11908
|
return { element: last2, offset: 1 };
|
|
11887
11909
|
} else if (isText$c(last2)) {
|
|
11888
|
-
return { element: last2, offset: get$
|
|
11910
|
+
return { element: last2, offset: get$5(last2).length };
|
|
11889
11911
|
} else {
|
|
11890
11912
|
return { element: last2, offset: children$1(last2).length };
|
|
11891
11913
|
}
|
|
@@ -11894,7 +11916,7 @@ function requireTinymce() {
|
|
|
11894
11916
|
};
|
|
11895
11917
|
const markerInfo = (element, cleanupFun) => {
|
|
11896
11918
|
const pos = absolute(element);
|
|
11897
|
-
const height = get$
|
|
11919
|
+
const height = get$7(element);
|
|
11898
11920
|
return {
|
|
11899
11921
|
element,
|
|
11900
11922
|
bottom: pos.top + height,
|
|
@@ -11918,7 +11940,7 @@ function requireTinymce() {
|
|
|
11918
11940
|
if (fireScrollIntoViewEvent(editor, data2)) {
|
|
11919
11941
|
return;
|
|
11920
11942
|
}
|
|
11921
|
-
const scrollTop = get$
|
|
11943
|
+
const scrollTop = get$6(doc).top;
|
|
11922
11944
|
f(editor, doc, scrollTop, marker, alignToTop);
|
|
11923
11945
|
fireAfterScrollIntoViewEvent(editor, data2);
|
|
11924
11946
|
};
|
|
@@ -12521,7 +12543,7 @@ function requireTinymce() {
|
|
|
12521
12543
|
const trimTemporaryNodes = (tempAttrs, body) => {
|
|
12522
12544
|
each$e(getTemporaryNodes(tempAttrs, body), (elm) => {
|
|
12523
12545
|
const element = SugarElement.fromDom(elm);
|
|
12524
|
-
if (get$
|
|
12546
|
+
if (get$a(element, "data-mce-bogus") === "all") {
|
|
12525
12547
|
remove$8(element);
|
|
12526
12548
|
} else {
|
|
12527
12549
|
each$e(tempAttrs, (attr) => {
|
|
@@ -12572,7 +12594,7 @@ function requireTinymce() {
|
|
|
12572
12594
|
const cleanupBogusElements = (parent2) => {
|
|
12573
12595
|
const bogusElements = descendants(parent2, "[data-mce-bogus]");
|
|
12574
12596
|
each$e(bogusElements, (elem) => {
|
|
12575
|
-
const bogusValue = get$
|
|
12597
|
+
const bogusValue = get$a(elem, "data-mce-bogus");
|
|
12576
12598
|
if (bogusValue === "all") {
|
|
12577
12599
|
remove$8(elem);
|
|
12578
12600
|
} else if (isBr$6(elem)) {
|
|
@@ -12600,13 +12622,13 @@ function requireTinymce() {
|
|
|
12600
12622
|
const doc = editor.getDoc();
|
|
12601
12623
|
const dos = getRootNode(SugarElement.fromDom(editor.getBody()));
|
|
12602
12624
|
const offscreenDiv = SugarElement.fromTag("div", doc);
|
|
12603
|
-
set$
|
|
12625
|
+
set$5(offscreenDiv, "data-mce-bogus", "all");
|
|
12604
12626
|
setAll(offscreenDiv, {
|
|
12605
12627
|
position: "fixed",
|
|
12606
12628
|
left: "-9999999px",
|
|
12607
12629
|
top: "0"
|
|
12608
12630
|
});
|
|
12609
|
-
set$
|
|
12631
|
+
set$4(offscreenDiv, body.innerHTML);
|
|
12610
12632
|
cleanupBogusElements(offscreenDiv);
|
|
12611
12633
|
cleanupInputNames(offscreenDiv);
|
|
12612
12634
|
const root = getContentContainer(dos);
|
|
@@ -12970,7 +12992,7 @@ function requireTinymce() {
|
|
|
12970
12992
|
return isText$b(container) && (container.data.length === 0 || isZwsp(container.data) && BookmarkManager.isBookmarkNode(container.parentNode));
|
|
12971
12993
|
};
|
|
12972
12994
|
const matchesElementPosition = (before2, predicate) => (pos) => getChildNodeAtRelativeOffset(before2 ? 0 : -1, pos).filter(predicate).isSome();
|
|
12973
|
-
const isImageBlock = (node) => isImg(node) && get$
|
|
12995
|
+
const isImageBlock = (node) => isImg(node) && get$8(SugarElement.fromDom(node), "display") === "block";
|
|
12974
12996
|
const isCefNode = (node) => isContentEditableFalse$a(node) && !isBogusAll(node);
|
|
12975
12997
|
const isBeforeImageBlock = matchesElementPosition(true, isImageBlock);
|
|
12976
12998
|
const isAfterImageBlock = matchesElementPosition(false, isImageBlock);
|
|
@@ -13031,7 +13053,7 @@ function requireTinymce() {
|
|
|
13031
13053
|
}
|
|
13032
13054
|
};
|
|
13033
13055
|
const isPreValue = (value2) => contains$2(["pre", "pre-wrap"], value2);
|
|
13034
|
-
const isInPre = (pos) => getElementFromPosition(pos).bind((elm) => closest$5(elm, isElement$8)).exists((elm) => isPreValue(get$
|
|
13056
|
+
const isInPre = (pos) => getElementFromPosition(pos).bind((elm) => closest$5(elm, isElement$8)).exists((elm) => isPreValue(get$8(elm, "white-space")));
|
|
13035
13057
|
const isAtBeginningOfBody = (root, pos) => prevPosition(root.dom, pos).isNone();
|
|
13036
13058
|
const isAtEndOfBody = (root, pos) => nextPosition(root.dom, pos).isNone();
|
|
13037
13059
|
const isAtLineBoundary = (root, pos, schema) => isAtBeginningOfBody(root, pos) || isAtEndOfBody(root, pos) || isAtStartOfBlock(root, pos, schema) || isAtEndOfBlock(root, pos, schema) || isAfterBr(root, pos, schema) || isBeforeBr$1(root, pos, schema);
|
|
@@ -13557,7 +13579,7 @@ function requireTinymce() {
|
|
|
13557
13579
|
editor.selection.collapse(true);
|
|
13558
13580
|
}
|
|
13559
13581
|
if (selectedCells.length > 1 && exists(selectedCells, (cell2) => eq(cell2, selectedNode))) {
|
|
13560
|
-
set$
|
|
13582
|
+
set$5(selectedNode, "data-mce-selected", "1");
|
|
13561
13583
|
}
|
|
13562
13584
|
};
|
|
13563
13585
|
const emptySingleTableCells = (editor, cells2, outsideDetails) => Optional.some(() => {
|
|
@@ -14110,7 +14132,7 @@ function requireTinymce() {
|
|
|
14110
14132
|
return Optional.none();
|
|
14111
14133
|
}
|
|
14112
14134
|
};
|
|
14113
|
-
const normalizeNbsps = (node) => set$
|
|
14135
|
+
const normalizeNbsps = (node) => set$2(node, get$5(node).replace(new RegExp(`${nbsp}$`), " "));
|
|
14114
14136
|
const normalizeNbspsBetween = (editor, caretContainer) => {
|
|
14115
14137
|
const handler = () => {
|
|
14116
14138
|
if (caretContainer !== null && !editor.dom.isEmpty(caretContainer)) {
|
|
@@ -15330,12 +15352,13 @@ function requireTinymce() {
|
|
|
15330
15352
|
const uniqueId$1 = (prefix) => {
|
|
15331
15353
|
return "blobid" + count$1++;
|
|
15332
15354
|
};
|
|
15355
|
+
const utf8Encode = (str) => foldl(new window.TextEncoder().encode(str), (acc, charCode) => acc + String.fromCharCode(charCode), "");
|
|
15333
15356
|
const processDataUri = (dataUri, base64Only, generateBlobInfo) => {
|
|
15334
15357
|
return parseDataUri(dataUri).bind(({ data: data2, type: type2, base64Encoded }) => {
|
|
15335
15358
|
if (base64Only && !base64Encoded) {
|
|
15336
15359
|
return Optional.none();
|
|
15337
15360
|
} else {
|
|
15338
|
-
const base64 = base64Encoded ? data2 : btoa(data2);
|
|
15361
|
+
const base64 = base64Encoded ? data2 : btoa(utf8Encode(data2));
|
|
15339
15362
|
return generateBlobInfo(base64, type2);
|
|
15340
15363
|
}
|
|
15341
15364
|
});
|
|
@@ -15370,7 +15393,7 @@ function requireTinymce() {
|
|
|
15370
15393
|
}
|
|
15371
15394
|
};
|
|
15372
15395
|
const hostCaptureRegex = /^(?:(?:(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)([A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*))(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+)?)?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+)?)?)$/;
|
|
15373
|
-
const extractHost = (url) => Optional.from(url.match(hostCaptureRegex)).bind((ms) => get$
|
|
15396
|
+
const extractHost = (url) => Optional.from(url.match(hostCaptureRegex)).bind((ms) => get$c(ms, 1)).map((h) => startsWith(h, "www.") ? h.substring(4) : h);
|
|
15374
15397
|
const sandboxIframe = (iframeNode, exclusions) => {
|
|
15375
15398
|
if (Optional.from(iframeNode.attr("src")).bind(extractHost).forall((host) => !contains$2(exclusions, host))) {
|
|
15376
15399
|
iframeNode.attr("sandbox", "");
|
|
@@ -15530,22 +15553,49 @@ function requireTinymce() {
|
|
|
15530
15553
|
parser.addNodeFilter("iframe", (nodes) => each$e(nodes, (node) => sandboxIframe(node, sandboxIframesExclusions)));
|
|
15531
15554
|
}
|
|
15532
15555
|
};
|
|
15533
|
-
|
|
15534
|
-
|
|
15535
|
-
|
|
15536
|
-
|
|
15537
|
-
|
|
15538
|
-
|
|
15539
|
-
|
|
15540
|
-
|
|
15541
|
-
|
|
15542
|
-
|
|
15543
|
-
|
|
15544
|
-
|
|
15545
|
-
|
|
15546
|
-
|
|
15547
|
-
|
|
15548
|
-
|
|
15556
|
+
function _arrayLikeToArray(r2, a) {
|
|
15557
|
+
(null == a || a > r2.length) && (a = r2.length);
|
|
15558
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r2[e];
|
|
15559
|
+
return n;
|
|
15560
|
+
}
|
|
15561
|
+
function _arrayWithHoles(r2) {
|
|
15562
|
+
if (Array.isArray(r2)) return r2;
|
|
15563
|
+
}
|
|
15564
|
+
function _iterableToArrayLimit(r2, l) {
|
|
15565
|
+
var t = null == r2 ? null : "undefined" != typeof Symbol && r2[Symbol.iterator] || r2["@@iterator"];
|
|
15566
|
+
if (null != t) {
|
|
15567
|
+
var e, n, i, u, a = [], f = true, o = false;
|
|
15568
|
+
try {
|
|
15569
|
+
if (i = (t = t.call(r2)).next, 0 === l) ;
|
|
15570
|
+
else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true) ;
|
|
15571
|
+
} catch (r3) {
|
|
15572
|
+
o = true, n = r3;
|
|
15573
|
+
} finally {
|
|
15574
|
+
try {
|
|
15575
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
15576
|
+
} finally {
|
|
15577
|
+
if (o) throw n;
|
|
15578
|
+
}
|
|
15579
|
+
}
|
|
15580
|
+
return a;
|
|
15581
|
+
}
|
|
15582
|
+
}
|
|
15583
|
+
function _nonIterableRest() {
|
|
15584
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
15585
|
+
}
|
|
15586
|
+
function _slicedToArray(r2, e) {
|
|
15587
|
+
return _arrayWithHoles(r2) || _iterableToArrayLimit(r2, e) || _unsupportedIterableToArray(r2, e) || _nonIterableRest();
|
|
15588
|
+
}
|
|
15589
|
+
function _unsupportedIterableToArray(r2, a) {
|
|
15590
|
+
if (r2) {
|
|
15591
|
+
if ("string" == typeof r2) return _arrayLikeToArray(r2, a);
|
|
15592
|
+
var t = {}.toString.call(r2).slice(8, -1);
|
|
15593
|
+
return "Object" === t && r2.constructor && (t = r2.constructor.name), "Map" === t || "Set" === t ? Array.from(r2) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r2, a) : void 0;
|
|
15594
|
+
}
|
|
15595
|
+
}
|
|
15596
|
+
const entries = Object.entries, setPrototypeOf = Object.setPrototypeOf, isFrozen = Object.isFrozen, getPrototypeOf = Object.getPrototypeOf, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
15597
|
+
let freeze = Object.freeze, seal = Object.seal, create$7 = Object.create;
|
|
15598
|
+
let _ref = typeof Reflect !== "undefined" && Reflect, apply = _ref.apply, construct = _ref.construct;
|
|
15549
15599
|
if (!freeze) {
|
|
15550
15600
|
freeze = function freeze2(x) {
|
|
15551
15601
|
return x;
|
|
@@ -15557,12 +15607,18 @@ function requireTinymce() {
|
|
|
15557
15607
|
};
|
|
15558
15608
|
}
|
|
15559
15609
|
if (!apply) {
|
|
15560
|
-
apply = function apply2(
|
|
15561
|
-
|
|
15610
|
+
apply = function apply2(func, thisArg) {
|
|
15611
|
+
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
15612
|
+
args[_key - 2] = arguments[_key];
|
|
15613
|
+
}
|
|
15614
|
+
return func.apply(thisArg, args);
|
|
15562
15615
|
};
|
|
15563
15616
|
}
|
|
15564
15617
|
if (!construct) {
|
|
15565
|
-
construct = function construct2(Func
|
|
15618
|
+
construct = function construct2(Func) {
|
|
15619
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
15620
|
+
args[_key2 - 1] = arguments[_key2];
|
|
15621
|
+
}
|
|
15566
15622
|
return new Func(...args);
|
|
15567
15623
|
};
|
|
15568
15624
|
}
|
|
@@ -15571,13 +15627,19 @@ function requireTinymce() {
|
|
|
15571
15627
|
const arrayPop = unapply(Array.prototype.pop);
|
|
15572
15628
|
const arrayPush = unapply(Array.prototype.push);
|
|
15573
15629
|
const arraySplice = unapply(Array.prototype.splice);
|
|
15630
|
+
const arrayIsArray = Array.isArray;
|
|
15574
15631
|
const stringToLowerCase = unapply(String.prototype.toLowerCase);
|
|
15575
15632
|
const stringToString = unapply(String.prototype.toString);
|
|
15576
15633
|
const stringMatch = unapply(String.prototype.match);
|
|
15577
15634
|
const stringReplace = unapply(String.prototype.replace);
|
|
15578
15635
|
const stringIndexOf = unapply(String.prototype.indexOf);
|
|
15579
15636
|
const stringTrim = unapply(String.prototype.trim);
|
|
15637
|
+
const numberToString = unapply(Number.prototype.toString);
|
|
15638
|
+
const booleanToString = unapply(Boolean.prototype.toString);
|
|
15639
|
+
const bigintToString = typeof BigInt === "undefined" ? null : unapply(BigInt.prototype.toString);
|
|
15640
|
+
const symbolToString = typeof Symbol === "undefined" ? null : unapply(Symbol.prototype.toString);
|
|
15580
15641
|
const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
|
|
15642
|
+
const objectToString = unapply(Object.prototype.toString);
|
|
15581
15643
|
const regExpTest = unapply(RegExp.prototype.test);
|
|
15582
15644
|
const typeErrorCreate = unconstruct(TypeError);
|
|
15583
15645
|
function unapply(func) {
|
|
@@ -15585,18 +15647,18 @@ function requireTinymce() {
|
|
|
15585
15647
|
if (thisArg instanceof RegExp) {
|
|
15586
15648
|
thisArg.lastIndex = 0;
|
|
15587
15649
|
}
|
|
15588
|
-
for (var
|
|
15589
|
-
args[
|
|
15650
|
+
for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
|
|
15651
|
+
args[_key3 - 1] = arguments[_key3];
|
|
15590
15652
|
}
|
|
15591
15653
|
return apply(func, thisArg, args);
|
|
15592
15654
|
};
|
|
15593
15655
|
}
|
|
15594
|
-
function unconstruct(
|
|
15656
|
+
function unconstruct(Func) {
|
|
15595
15657
|
return function() {
|
|
15596
|
-
for (var
|
|
15597
|
-
args[
|
|
15658
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
15659
|
+
args[_key4] = arguments[_key4];
|
|
15598
15660
|
}
|
|
15599
|
-
return construct(
|
|
15661
|
+
return construct(Func, args);
|
|
15600
15662
|
};
|
|
15601
15663
|
}
|
|
15602
15664
|
function addToSet(set2, array) {
|
|
@@ -15604,6 +15666,9 @@ function requireTinymce() {
|
|
|
15604
15666
|
if (setPrototypeOf) {
|
|
15605
15667
|
setPrototypeOf(set2, null);
|
|
15606
15668
|
}
|
|
15669
|
+
if (!arrayIsArray(array)) {
|
|
15670
|
+
return set2;
|
|
15671
|
+
}
|
|
15607
15672
|
let l = array.length;
|
|
15608
15673
|
while (l--) {
|
|
15609
15674
|
let element = array[l];
|
|
@@ -15631,10 +15696,13 @@ function requireTinymce() {
|
|
|
15631
15696
|
}
|
|
15632
15697
|
function clone(object) {
|
|
15633
15698
|
const newObject = create$7(null);
|
|
15634
|
-
for (const
|
|
15699
|
+
for (const _ref2 of entries(object)) {
|
|
15700
|
+
var _ref3 = _slicedToArray(_ref2, 2);
|
|
15701
|
+
const property = _ref3[0];
|
|
15702
|
+
const value2 = _ref3[1];
|
|
15635
15703
|
const isPropertyExist = objectHasOwnProperty(object, property);
|
|
15636
15704
|
if (isPropertyExist) {
|
|
15637
|
-
if (
|
|
15705
|
+
if (arrayIsArray(value2)) {
|
|
15638
15706
|
newObject[property] = cleanArray(value2);
|
|
15639
15707
|
} else if (value2 && typeof value2 === "object" && value2.constructor === Object) {
|
|
15640
15708
|
newObject[property] = clone(value2);
|
|
@@ -15645,6 +15713,44 @@ function requireTinymce() {
|
|
|
15645
15713
|
}
|
|
15646
15714
|
return newObject;
|
|
15647
15715
|
}
|
|
15716
|
+
function stringifyValue(value2) {
|
|
15717
|
+
switch (typeof value2) {
|
|
15718
|
+
case "string": {
|
|
15719
|
+
return value2;
|
|
15720
|
+
}
|
|
15721
|
+
case "number": {
|
|
15722
|
+
return numberToString(value2);
|
|
15723
|
+
}
|
|
15724
|
+
case "boolean": {
|
|
15725
|
+
return booleanToString(value2);
|
|
15726
|
+
}
|
|
15727
|
+
case "bigint": {
|
|
15728
|
+
return bigintToString ? bigintToString(value2) : "0";
|
|
15729
|
+
}
|
|
15730
|
+
case "symbol": {
|
|
15731
|
+
return symbolToString ? symbolToString(value2) : "Symbol()";
|
|
15732
|
+
}
|
|
15733
|
+
case "undefined": {
|
|
15734
|
+
return objectToString(value2);
|
|
15735
|
+
}
|
|
15736
|
+
case "function":
|
|
15737
|
+
case "object": {
|
|
15738
|
+
if (value2 === null) {
|
|
15739
|
+
return objectToString(value2);
|
|
15740
|
+
}
|
|
15741
|
+
const valueAsRecord = value2;
|
|
15742
|
+
const valueToString = lookupGetter(valueAsRecord, "toString");
|
|
15743
|
+
if (typeof valueToString === "function") {
|
|
15744
|
+
const stringified = valueToString(valueAsRecord);
|
|
15745
|
+
return typeof stringified === "string" ? stringified : objectToString(stringified);
|
|
15746
|
+
}
|
|
15747
|
+
return objectToString(value2);
|
|
15748
|
+
}
|
|
15749
|
+
default: {
|
|
15750
|
+
return objectToString(value2);
|
|
15751
|
+
}
|
|
15752
|
+
}
|
|
15753
|
+
}
|
|
15648
15754
|
function lookupGetter(object, prop) {
|
|
15649
15755
|
while (object !== null) {
|
|
15650
15756
|
const desc = getOwnPropertyDescriptor(object, prop);
|
|
@@ -15663,20 +15769,28 @@ function requireTinymce() {
|
|
|
15663
15769
|
}
|
|
15664
15770
|
return fallbackValue;
|
|
15665
15771
|
}
|
|
15666
|
-
|
|
15667
|
-
|
|
15772
|
+
function isRegex(value2) {
|
|
15773
|
+
try {
|
|
15774
|
+
regExpTest(value2, "");
|
|
15775
|
+
return true;
|
|
15776
|
+
} catch (_unused) {
|
|
15777
|
+
return false;
|
|
15778
|
+
}
|
|
15779
|
+
}
|
|
15780
|
+
const html$1 = freeze(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]);
|
|
15781
|
+
const svg$1 = freeze(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]);
|
|
15668
15782
|
const svgFilters = freeze(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]);
|
|
15669
15783
|
const svgDisallowed = freeze(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]);
|
|
15670
15784
|
const mathMl$1 = freeze(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]);
|
|
15671
15785
|
const mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]);
|
|
15672
15786
|
const text = freeze(["#text"]);
|
|
15673
|
-
const html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"
|
|
15674
|
-
const svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]);
|
|
15675
|
-
const mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "
|
|
15787
|
+
const html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]);
|
|
15788
|
+
const svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]);
|
|
15789
|
+
const mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]);
|
|
15676
15790
|
const xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
|
|
15677
|
-
const MUSTACHE_EXPR = seal(
|
|
15678
|
-
const ERB_EXPR = seal(/<%[\w\W]
|
|
15679
|
-
const TMPLIT_EXPR = seal(
|
|
15791
|
+
const MUSTACHE_EXPR = seal(/{{[\w\W]*|^[\w\W]*}}/g);
|
|
15792
|
+
const ERB_EXPR = seal(/<%[\w\W]*|^[\w\W]*%>/g);
|
|
15793
|
+
const TMPLIT_EXPR = seal(/\${[\w\W]*/g);
|
|
15680
15794
|
const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/);
|
|
15681
15795
|
const ARIA_ATTR = seal(/^aria-[\-\w]+$/);
|
|
15682
15796
|
const IS_ALLOWED_URI = seal(
|
|
@@ -15690,19 +15804,6 @@ function requireTinymce() {
|
|
|
15690
15804
|
);
|
|
15691
15805
|
const DOCTYPE_NAME = seal(/^html$/i);
|
|
15692
15806
|
const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
15693
|
-
var EXPRESSIONS = /* @__PURE__ */ Object.freeze({
|
|
15694
|
-
__proto__: null,
|
|
15695
|
-
ARIA_ATTR,
|
|
15696
|
-
ATTR_WHITESPACE,
|
|
15697
|
-
CUSTOM_ELEMENT,
|
|
15698
|
-
DATA_ATTR,
|
|
15699
|
-
DOCTYPE_NAME,
|
|
15700
|
-
ERB_EXPR,
|
|
15701
|
-
IS_ALLOWED_URI,
|
|
15702
|
-
IS_SCRIPT_OR_DATA,
|
|
15703
|
-
MUSTACHE_EXPR,
|
|
15704
|
-
TMPLIT_EXPR
|
|
15705
|
-
});
|
|
15706
15807
|
const NODE_TYPE = {
|
|
15707
15808
|
element: 1,
|
|
15708
15809
|
text: 3,
|
|
@@ -15754,34 +15855,23 @@ function requireTinymce() {
|
|
|
15754
15855
|
function createDOMPurify() {
|
|
15755
15856
|
let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
|
|
15756
15857
|
const DOMPurify = (root) => createDOMPurify(root);
|
|
15757
|
-
DOMPurify.version = "3.
|
|
15858
|
+
DOMPurify.version = "3.4.5";
|
|
15758
15859
|
DOMPurify.removed = [];
|
|
15759
15860
|
if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
|
|
15760
15861
|
DOMPurify.isSupported = false;
|
|
15761
15862
|
return DOMPurify;
|
|
15762
15863
|
}
|
|
15763
|
-
let
|
|
15764
|
-
document: document2
|
|
15765
|
-
} = window2;
|
|
15864
|
+
let document2 = window2.document;
|
|
15766
15865
|
const originalDocument = document2;
|
|
15767
15866
|
const currentScript = originalDocument.currentScript;
|
|
15768
|
-
const
|
|
15769
|
-
DocumentFragment,
|
|
15770
|
-
HTMLTemplateElement,
|
|
15771
|
-
Node,
|
|
15772
|
-
Element,
|
|
15773
|
-
NodeFilter: NodeFilter2,
|
|
15774
|
-
NamedNodeMap = window2.NamedNodeMap || window2.MozNamedAttrMap,
|
|
15775
|
-
HTMLFormElement,
|
|
15776
|
-
DOMParser: DOMParser2,
|
|
15777
|
-
trustedTypes
|
|
15778
|
-
} = window2;
|
|
15867
|
+
const DocumentFragment = window2.DocumentFragment, HTMLTemplateElement = window2.HTMLTemplateElement, Node = window2.Node, Element = window2.Element, NodeFilter2 = window2.NodeFilter, _window$NamedNodeMap = window2.NamedNodeMap, NamedNodeMap = _window$NamedNodeMap === void 0 ? window2.NamedNodeMap || window2.MozNamedAttrMap : _window$NamedNodeMap, HTMLFormElement = window2.HTMLFormElement, DOMParser2 = window2.DOMParser, trustedTypes = window2.trustedTypes;
|
|
15779
15868
|
const ElementPrototype = Element.prototype;
|
|
15780
15869
|
const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
|
|
15781
15870
|
const remove2 = lookupGetter(ElementPrototype, "remove");
|
|
15782
15871
|
const getNextSibling = lookupGetter(ElementPrototype, "nextSibling");
|
|
15783
15872
|
const getChildNodes2 = lookupGetter(ElementPrototype, "childNodes");
|
|
15784
15873
|
const getParentNode = lookupGetter(ElementPrototype, "parentNode");
|
|
15874
|
+
const getNodeType = Node && Node.prototype ? lookupGetter(Node.prototype, "nodeType") : null;
|
|
15785
15875
|
if (typeof HTMLTemplateElement === "function") {
|
|
15786
15876
|
const template = document2.createElement("template");
|
|
15787
15877
|
if (template.content && template.content.ownerDocument) {
|
|
@@ -15790,30 +15880,12 @@ function requireTinymce() {
|
|
|
15790
15880
|
}
|
|
15791
15881
|
let trustedTypesPolicy;
|
|
15792
15882
|
let emptyHTML = "";
|
|
15793
|
-
const
|
|
15794
|
-
|
|
15795
|
-
createNodeIterator,
|
|
15796
|
-
createDocumentFragment,
|
|
15797
|
-
getElementsByTagName
|
|
15798
|
-
} = document2;
|
|
15799
|
-
const {
|
|
15800
|
-
importNode: importNode2
|
|
15801
|
-
} = originalDocument;
|
|
15883
|
+
const _document = document2, implementation = _document.implementation, createNodeIterator = _document.createNodeIterator, createDocumentFragment = _document.createDocumentFragment, getElementsByTagName = _document.getElementsByTagName;
|
|
15884
|
+
const importNode2 = originalDocument.importNode;
|
|
15802
15885
|
let hooks = _createHooksMap();
|
|
15803
15886
|
DOMPurify.isSupported = typeof entries === "function" && typeof getParentNode === "function" && implementation && implementation.createHTMLDocument !== void 0;
|
|
15804
|
-
const
|
|
15805
|
-
|
|
15806
|
-
ERB_EXPR: ERB_EXPR2,
|
|
15807
|
-
TMPLIT_EXPR: TMPLIT_EXPR2,
|
|
15808
|
-
DATA_ATTR: DATA_ATTR2,
|
|
15809
|
-
ARIA_ATTR: ARIA_ATTR2,
|
|
15810
|
-
IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA2,
|
|
15811
|
-
ATTR_WHITESPACE: ATTR_WHITESPACE2,
|
|
15812
|
-
CUSTOM_ELEMENT: CUSTOM_ELEMENT2
|
|
15813
|
-
} = EXPRESSIONS;
|
|
15814
|
-
let {
|
|
15815
|
-
IS_ALLOWED_URI: IS_ALLOWED_URI$1
|
|
15816
|
-
} = EXPRESSIONS;
|
|
15887
|
+
const MUSTACHE_EXPR$1 = MUSTACHE_EXPR, ERB_EXPR$1 = ERB_EXPR, TMPLIT_EXPR$1 = TMPLIT_EXPR, DATA_ATTR$1 = DATA_ATTR, ARIA_ATTR$1 = ARIA_ATTR, IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA, ATTR_WHITESPACE$1 = ATTR_WHITESPACE, CUSTOM_ELEMENT$1 = CUSTOM_ELEMENT;
|
|
15888
|
+
let IS_ALLOWED_URI$1 = IS_ALLOWED_URI;
|
|
15817
15889
|
let ALLOWED_TAGS = null;
|
|
15818
15890
|
const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
|
|
15819
15891
|
let ALLOWED_ATTR = null;
|
|
@@ -15840,6 +15912,20 @@ function requireTinymce() {
|
|
|
15840
15912
|
}));
|
|
15841
15913
|
let FORBID_TAGS = null;
|
|
15842
15914
|
let FORBID_ATTR = null;
|
|
15915
|
+
const EXTRA_ELEMENT_HANDLING = Object.seal(create$7(null, {
|
|
15916
|
+
tagCheck: {
|
|
15917
|
+
writable: true,
|
|
15918
|
+
configurable: false,
|
|
15919
|
+
enumerable: true,
|
|
15920
|
+
value: null
|
|
15921
|
+
},
|
|
15922
|
+
attributeCheck: {
|
|
15923
|
+
writable: true,
|
|
15924
|
+
configurable: false,
|
|
15925
|
+
enumerable: true,
|
|
15926
|
+
value: null
|
|
15927
|
+
}
|
|
15928
|
+
}));
|
|
15843
15929
|
let ALLOW_ARIA_ATTR = true;
|
|
15844
15930
|
let ALLOW_DATA_ATTR = true;
|
|
15845
15931
|
let ALLOW_UNKNOWN_PROTOCOLS = false;
|
|
@@ -15895,15 +15981,15 @@ function requireTinymce() {
|
|
|
15895
15981
|
PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes
|
|
15896
15982
|
SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
|
|
15897
15983
|
transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? stringToString : stringToLowerCase;
|
|
15898
|
-
ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
|
|
15899
|
-
ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
|
|
15900
|
-
ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
|
|
15901
|
-
URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
|
|
15902
|
-
DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
|
|
15903
|
-
FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
|
|
15904
|
-
FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
|
|
15905
|
-
FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
|
|
15906
|
-
USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES : false;
|
|
15984
|
+
ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") && arrayIsArray(cfg.ALLOWED_TAGS) ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
|
|
15985
|
+
ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") && arrayIsArray(cfg.ALLOWED_ATTR) ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
|
|
15986
|
+
ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") && arrayIsArray(cfg.ALLOWED_NAMESPACES) ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
|
|
15987
|
+
URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") && arrayIsArray(cfg.ADD_URI_SAFE_ATTR) ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
|
|
15988
|
+
DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") && arrayIsArray(cfg.ADD_DATA_URI_TAGS) ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
|
|
15989
|
+
FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") && arrayIsArray(cfg.FORBID_CONTENTS) ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
|
|
15990
|
+
FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") && arrayIsArray(cfg.FORBID_TAGS) ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
|
|
15991
|
+
FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") && arrayIsArray(cfg.FORBID_ATTR) ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
|
|
15992
|
+
USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === "object" ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;
|
|
15907
15993
|
ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
|
|
15908
15994
|
ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
|
|
15909
15995
|
ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;
|
|
@@ -15919,19 +16005,20 @@ function requireTinymce() {
|
|
|
15919
16005
|
SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false;
|
|
15920
16006
|
KEEP_CONTENT = cfg.KEEP_CONTENT !== false;
|
|
15921
16007
|
IN_PLACE = cfg.IN_PLACE || false;
|
|
15922
|
-
IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP
|
|
15923
|
-
NAMESPACE = cfg.NAMESPACE
|
|
15924
|
-
MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS
|
|
15925
|
-
HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS
|
|
15926
|
-
|
|
15927
|
-
|
|
15928
|
-
|
|
16008
|
+
IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI;
|
|
16009
|
+
NAMESPACE = typeof cfg.NAMESPACE === "string" ? cfg.NAMESPACE : HTML_NAMESPACE;
|
|
16010
|
+
MATHML_TEXT_INTEGRATION_POINTS = objectHasOwnProperty(cfg, "MATHML_TEXT_INTEGRATION_POINTS") && cfg.MATHML_TEXT_INTEGRATION_POINTS && typeof cfg.MATHML_TEXT_INTEGRATION_POINTS === "object" ? clone(cfg.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]);
|
|
16011
|
+
HTML_INTEGRATION_POINTS = objectHasOwnProperty(cfg, "HTML_INTEGRATION_POINTS") && cfg.HTML_INTEGRATION_POINTS && typeof cfg.HTML_INTEGRATION_POINTS === "object" ? clone(cfg.HTML_INTEGRATION_POINTS) : addToSet({}, ["annotation-xml"]);
|
|
16012
|
+
const customElementHandling = objectHasOwnProperty(cfg, "CUSTOM_ELEMENT_HANDLING") && cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING === "object" ? clone(cfg.CUSTOM_ELEMENT_HANDLING) : create$7(null);
|
|
16013
|
+
CUSTOM_ELEMENT_HANDLING = create$7(null);
|
|
16014
|
+
if (objectHasOwnProperty(customElementHandling, "tagNameCheck") && isRegexOrFunction(customElementHandling.tagNameCheck)) {
|
|
16015
|
+
CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck;
|
|
15929
16016
|
}
|
|
15930
|
-
if (
|
|
15931
|
-
CUSTOM_ELEMENT_HANDLING.attributeNameCheck =
|
|
16017
|
+
if (objectHasOwnProperty(customElementHandling, "attributeNameCheck") && isRegexOrFunction(customElementHandling.attributeNameCheck)) {
|
|
16018
|
+
CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck;
|
|
15932
16019
|
}
|
|
15933
|
-
if (
|
|
15934
|
-
CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements =
|
|
16020
|
+
if (objectHasOwnProperty(customElementHandling, "allowCustomizedBuiltInElements") && typeof customElementHandling.allowCustomizedBuiltInElements === "boolean") {
|
|
16021
|
+
CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements;
|
|
15935
16022
|
}
|
|
15936
16023
|
if (SAFE_FOR_TEMPLATES) {
|
|
15937
16024
|
ALLOW_DATA_ATTR = false;
|
|
@@ -15941,7 +16028,7 @@ function requireTinymce() {
|
|
|
15941
16028
|
}
|
|
15942
16029
|
if (USE_PROFILES) {
|
|
15943
16030
|
ALLOWED_TAGS = addToSet({}, text);
|
|
15944
|
-
ALLOWED_ATTR =
|
|
16031
|
+
ALLOWED_ATTR = create$7(null);
|
|
15945
16032
|
if (USE_PROFILES.html === true) {
|
|
15946
16033
|
addToSet(ALLOWED_TAGS, html$1);
|
|
15947
16034
|
addToSet(ALLOWED_ATTR, html);
|
|
@@ -15962,27 +16049,43 @@ function requireTinymce() {
|
|
|
15962
16049
|
addToSet(ALLOWED_ATTR, xml);
|
|
15963
16050
|
}
|
|
15964
16051
|
}
|
|
15965
|
-
|
|
15966
|
-
|
|
15967
|
-
|
|
16052
|
+
EXTRA_ELEMENT_HANDLING.tagCheck = null;
|
|
16053
|
+
EXTRA_ELEMENT_HANDLING.attributeCheck = null;
|
|
16054
|
+
if (objectHasOwnProperty(cfg, "ADD_TAGS")) {
|
|
16055
|
+
if (typeof cfg.ADD_TAGS === "function") {
|
|
16056
|
+
EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
|
|
16057
|
+
} else if (arrayIsArray(cfg.ADD_TAGS)) {
|
|
16058
|
+
if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
|
|
16059
|
+
ALLOWED_TAGS = clone(ALLOWED_TAGS);
|
|
16060
|
+
}
|
|
16061
|
+
addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
|
|
15968
16062
|
}
|
|
15969
|
-
addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
|
|
15970
16063
|
}
|
|
15971
|
-
if (cfg
|
|
15972
|
-
if (
|
|
15973
|
-
|
|
16064
|
+
if (objectHasOwnProperty(cfg, "ADD_ATTR")) {
|
|
16065
|
+
if (typeof cfg.ADD_ATTR === "function") {
|
|
16066
|
+
EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
|
|
16067
|
+
} else if (arrayIsArray(cfg.ADD_ATTR)) {
|
|
16068
|
+
if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
|
|
16069
|
+
ALLOWED_ATTR = clone(ALLOWED_ATTR);
|
|
16070
|
+
}
|
|
16071
|
+
addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
|
|
15974
16072
|
}
|
|
15975
|
-
addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
|
|
15976
16073
|
}
|
|
15977
|
-
if (cfg.ADD_URI_SAFE_ATTR) {
|
|
16074
|
+
if (objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") && arrayIsArray(cfg.ADD_URI_SAFE_ATTR)) {
|
|
15978
16075
|
addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
|
|
15979
16076
|
}
|
|
15980
|
-
if (cfg.FORBID_CONTENTS) {
|
|
16077
|
+
if (objectHasOwnProperty(cfg, "FORBID_CONTENTS") && arrayIsArray(cfg.FORBID_CONTENTS)) {
|
|
15981
16078
|
if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
|
|
15982
16079
|
FORBID_CONTENTS = clone(FORBID_CONTENTS);
|
|
15983
16080
|
}
|
|
15984
16081
|
addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
|
|
15985
16082
|
}
|
|
16083
|
+
if (objectHasOwnProperty(cfg, "ADD_FORBID_CONTENTS") && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {
|
|
16084
|
+
if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
|
|
16085
|
+
FORBID_CONTENTS = clone(FORBID_CONTENTS);
|
|
16086
|
+
}
|
|
16087
|
+
addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);
|
|
16088
|
+
}
|
|
15986
16089
|
if (KEEP_CONTENT) {
|
|
15987
16090
|
ALLOWED_TAGS["#text"] = true;
|
|
15988
16091
|
}
|
|
@@ -16143,11 +16246,37 @@ function requireTinymce() {
|
|
|
16143
16246
|
null
|
|
16144
16247
|
);
|
|
16145
16248
|
};
|
|
16249
|
+
const _scrubTemplateExpressions = function _scrubTemplateExpressions2(node) {
|
|
16250
|
+
node.normalize();
|
|
16251
|
+
const walker = createNodeIterator.call(
|
|
16252
|
+
node.ownerDocument || node,
|
|
16253
|
+
node,
|
|
16254
|
+
// eslint-disable-next-line no-bitwise
|
|
16255
|
+
NodeFilter2.SHOW_TEXT | NodeFilter2.SHOW_COMMENT | NodeFilter2.SHOW_CDATA_SECTION | NodeFilter2.SHOW_PROCESSING_INSTRUCTION,
|
|
16256
|
+
null
|
|
16257
|
+
);
|
|
16258
|
+
let currentNode = walker.nextNode();
|
|
16259
|
+
while (currentNode) {
|
|
16260
|
+
let data2 = currentNode.data;
|
|
16261
|
+
arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
|
|
16262
|
+
data2 = stringReplace(data2, expr, " ");
|
|
16263
|
+
});
|
|
16264
|
+
currentNode.data = data2;
|
|
16265
|
+
currentNode = walker.nextNode();
|
|
16266
|
+
}
|
|
16267
|
+
};
|
|
16146
16268
|
const _isClobbered = function _isClobbered2(element) {
|
|
16147
16269
|
return element instanceof HTMLFormElement && (typeof element.nodeName !== "string" || typeof element.textContent !== "string" || typeof element.removeChild !== "function" || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== "function" || typeof element.setAttribute !== "function" || typeof element.namespaceURI !== "string" || typeof element.insertBefore !== "function" || typeof element.hasChildNodes !== "function");
|
|
16148
16270
|
};
|
|
16149
16271
|
const _isNode = function _isNode2(value2) {
|
|
16150
|
-
|
|
16272
|
+
if (!getNodeType || typeof value2 !== "object" || value2 === null) {
|
|
16273
|
+
return false;
|
|
16274
|
+
}
|
|
16275
|
+
try {
|
|
16276
|
+
return typeof getNodeType(value2) === "number";
|
|
16277
|
+
} catch (_) {
|
|
16278
|
+
return false;
|
|
16279
|
+
}
|
|
16151
16280
|
};
|
|
16152
16281
|
function _executeHooks(hooks2, currentNode, data2) {
|
|
16153
16282
|
arrayForEach(hooks2, (hook) => {
|
|
@@ -16170,6 +16299,10 @@ function requireTinymce() {
|
|
|
16170
16299
|
_forceRemove(currentNode);
|
|
16171
16300
|
return true;
|
|
16172
16301
|
}
|
|
16302
|
+
if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === "style" && _isNode(currentNode.firstElementChild)) {
|
|
16303
|
+
_forceRemove(currentNode);
|
|
16304
|
+
return true;
|
|
16305
|
+
}
|
|
16173
16306
|
if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
|
|
16174
16307
|
_forceRemove(currentNode);
|
|
16175
16308
|
return true;
|
|
@@ -16178,7 +16311,7 @@ function requireTinymce() {
|
|
|
16178
16311
|
_forceRemove(currentNode);
|
|
16179
16312
|
return true;
|
|
16180
16313
|
}
|
|
16181
|
-
if (
|
|
16314
|
+
if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
|
|
16182
16315
|
if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
|
|
16183
16316
|
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
|
|
16184
16317
|
return false;
|
|
@@ -16194,7 +16327,6 @@ function requireTinymce() {
|
|
|
16194
16327
|
const childCount = childNodes.length;
|
|
16195
16328
|
for (let i = childCount - 1; i >= 0; --i) {
|
|
16196
16329
|
const childClone = cloneNode(childNodes[i], true);
|
|
16197
|
-
childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
|
|
16198
16330
|
parentNode.insertBefore(childClone, getNextSibling(currentNode));
|
|
16199
16331
|
}
|
|
16200
16332
|
}
|
|
@@ -16212,7 +16344,7 @@ function requireTinymce() {
|
|
|
16212
16344
|
}
|
|
16213
16345
|
if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
|
|
16214
16346
|
content = currentNode.textContent;
|
|
16215
|
-
arrayForEach([
|
|
16347
|
+
arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
|
|
16216
16348
|
content = stringReplace(content, expr, " ");
|
|
16217
16349
|
});
|
|
16218
16350
|
if (currentNode.textContent !== content) {
|
|
@@ -16226,17 +16358,21 @@ function requireTinymce() {
|
|
|
16226
16358
|
return false;
|
|
16227
16359
|
};
|
|
16228
16360
|
const _isValidAttribute = function _isValidAttribute2(lcTag, lcName, value2) {
|
|
16361
|
+
if (FORBID_ATTR[lcName]) {
|
|
16362
|
+
return false;
|
|
16363
|
+
}
|
|
16229
16364
|
if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value2 in document2 || value2 in formElement)) {
|
|
16230
16365
|
return false;
|
|
16231
16366
|
}
|
|
16232
|
-
|
|
16233
|
-
|
|
16234
|
-
else if (
|
|
16367
|
+
const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
|
|
16368
|
+
if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$1, lcName)) ;
|
|
16369
|
+
else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ;
|
|
16370
|
+
else if (!nameIsPermitted || FORBID_ATTR[lcName]) {
|
|
16235
16371
|
if (
|
|
16236
16372
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
16237
16373
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
16238
16374
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
16239
|
-
_isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
16375
|
+
_isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
16240
16376
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
16241
16377
|
lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value2) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value2))
|
|
16242
16378
|
) ;
|
|
@@ -16244,22 +16380,21 @@ function requireTinymce() {
|
|
|
16244
16380
|
return false;
|
|
16245
16381
|
}
|
|
16246
16382
|
} else if (URI_SAFE_ATTRIBUTES[lcName]) ;
|
|
16247
|
-
else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value2,
|
|
16383
|
+
else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value2, ATTR_WHITESPACE$1, ""))) ;
|
|
16248
16384
|
else if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value2, "data:") === 0 && DATA_URI_TAGS[lcTag]) ;
|
|
16249
|
-
else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(
|
|
16385
|
+
else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value2, ATTR_WHITESPACE$1, ""))) ;
|
|
16250
16386
|
else if (value2) {
|
|
16251
16387
|
return false;
|
|
16252
16388
|
} else ;
|
|
16253
16389
|
return true;
|
|
16254
16390
|
};
|
|
16391
|
+
const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]);
|
|
16255
16392
|
const _isBasicCustomElement = function _isBasicCustomElement2(tagName) {
|
|
16256
|
-
return tagName
|
|
16393
|
+
return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);
|
|
16257
16394
|
};
|
|
16258
16395
|
const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) {
|
|
16259
16396
|
_executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
|
|
16260
|
-
const
|
|
16261
|
-
attributes
|
|
16262
|
-
} = currentNode;
|
|
16397
|
+
const attributes = currentNode.attributes;
|
|
16263
16398
|
if (!attributes || _isClobbered(currentNode)) {
|
|
16264
16399
|
return;
|
|
16265
16400
|
}
|
|
@@ -16273,11 +16408,7 @@ function requireTinymce() {
|
|
|
16273
16408
|
let l = attributes.length;
|
|
16274
16409
|
while (l--) {
|
|
16275
16410
|
const attr = attributes[l];
|
|
16276
|
-
const
|
|
16277
|
-
name: name2,
|
|
16278
|
-
namespaceURI,
|
|
16279
|
-
value: attrValue
|
|
16280
|
-
} = attr;
|
|
16411
|
+
const name2 = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;
|
|
16281
16412
|
const lcName = transformCaseFunc(name2);
|
|
16282
16413
|
const initValue = attrValue;
|
|
16283
16414
|
let value2 = name2 === "value" ? initValue : stringTrim(initValue);
|
|
@@ -16287,11 +16418,15 @@ function requireTinymce() {
|
|
|
16287
16418
|
hookEvent.forceKeepAttr = void 0;
|
|
16288
16419
|
_executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
|
|
16289
16420
|
value2 = hookEvent.attrValue;
|
|
16290
|
-
if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name")) {
|
|
16421
|
+
if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name") && stringIndexOf(value2, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {
|
|
16291
16422
|
_removeAttribute(name2, currentNode);
|
|
16292
16423
|
value2 = SANITIZE_NAMED_PROPS_PREFIX + value2;
|
|
16293
16424
|
}
|
|
16294
|
-
if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value2)) {
|
|
16425
|
+
if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value2)) {
|
|
16426
|
+
_removeAttribute(name2, currentNode);
|
|
16427
|
+
continue;
|
|
16428
|
+
}
|
|
16429
|
+
if (lcName === "attributename" && stringMatch(value2, "href")) {
|
|
16295
16430
|
_removeAttribute(name2, currentNode);
|
|
16296
16431
|
continue;
|
|
16297
16432
|
}
|
|
@@ -16307,7 +16442,7 @@ function requireTinymce() {
|
|
|
16307
16442
|
continue;
|
|
16308
16443
|
}
|
|
16309
16444
|
if (SAFE_FOR_TEMPLATES) {
|
|
16310
|
-
arrayForEach([
|
|
16445
|
+
arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
|
|
16311
16446
|
value2 = stringReplace(value2, expr, " ");
|
|
16312
16447
|
});
|
|
16313
16448
|
}
|
|
@@ -16350,7 +16485,7 @@ function requireTinymce() {
|
|
|
16350
16485
|
}
|
|
16351
16486
|
_executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
|
|
16352
16487
|
};
|
|
16353
|
-
const
|
|
16488
|
+
const _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {
|
|
16354
16489
|
let shadowNode = null;
|
|
16355
16490
|
const shadowIterator = _createNodeIterator(fragment);
|
|
16356
16491
|
_executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
|
|
@@ -16364,6 +16499,24 @@ function requireTinymce() {
|
|
|
16364
16499
|
}
|
|
16365
16500
|
_executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
|
|
16366
16501
|
};
|
|
16502
|
+
const _sanitizeAttachedShadowRoots2 = function _sanitizeAttachedShadowRoots(root) {
|
|
16503
|
+
if (root.nodeType === NODE_TYPE.element && root.shadowRoot instanceof DocumentFragment) {
|
|
16504
|
+
const sr = root.shadowRoot;
|
|
16505
|
+
_sanitizeAttachedShadowRoots2(sr);
|
|
16506
|
+
_sanitizeShadowDOM2(sr);
|
|
16507
|
+
}
|
|
16508
|
+
const childNodes = root.childNodes;
|
|
16509
|
+
if (!childNodes) {
|
|
16510
|
+
return;
|
|
16511
|
+
}
|
|
16512
|
+
const snapshot = [];
|
|
16513
|
+
arrayForEach(childNodes, (child2) => {
|
|
16514
|
+
arrayPush(snapshot, child2);
|
|
16515
|
+
});
|
|
16516
|
+
for (const child2 of snapshot) {
|
|
16517
|
+
_sanitizeAttachedShadowRoots2(child2);
|
|
16518
|
+
}
|
|
16519
|
+
};
|
|
16367
16520
|
DOMPurify.sanitize = function(dirty) {
|
|
16368
16521
|
let cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
16369
16522
|
let body = null;
|
|
@@ -16375,13 +16528,9 @@ function requireTinymce() {
|
|
|
16375
16528
|
dirty = "<!-->";
|
|
16376
16529
|
}
|
|
16377
16530
|
if (typeof dirty !== "string" && !_isNode(dirty)) {
|
|
16378
|
-
|
|
16379
|
-
|
|
16380
|
-
|
|
16381
|
-
throw typeErrorCreate("dirty is not a string, aborting");
|
|
16382
|
-
}
|
|
16383
|
-
} else {
|
|
16384
|
-
throw typeErrorCreate("toString is not a function");
|
|
16531
|
+
dirty = stringifyValue(dirty);
|
|
16532
|
+
if (typeof dirty !== "string") {
|
|
16533
|
+
throw typeErrorCreate("dirty is not a string, aborting");
|
|
16385
16534
|
}
|
|
16386
16535
|
}
|
|
16387
16536
|
if (!DOMPurify.isSupported) {
|
|
@@ -16395,13 +16544,15 @@ function requireTinymce() {
|
|
|
16395
16544
|
IN_PLACE = false;
|
|
16396
16545
|
}
|
|
16397
16546
|
if (IN_PLACE) {
|
|
16398
|
-
|
|
16399
|
-
|
|
16547
|
+
const nn = dirty.nodeName;
|
|
16548
|
+
if (typeof nn === "string") {
|
|
16549
|
+
const tagName = transformCaseFunc(nn);
|
|
16400
16550
|
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
|
16401
16551
|
throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
|
|
16402
16552
|
}
|
|
16403
16553
|
}
|
|
16404
|
-
|
|
16554
|
+
_sanitizeAttachedShadowRoots2(dirty);
|
|
16555
|
+
} else if (_isNode(dirty)) {
|
|
16405
16556
|
body = _initDocument("<!---->");
|
|
16406
16557
|
importedNode = body.ownerDocument.importNode(dirty, true);
|
|
16407
16558
|
if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === "BODY") {
|
|
@@ -16411,6 +16562,7 @@ function requireTinymce() {
|
|
|
16411
16562
|
} else {
|
|
16412
16563
|
body.appendChild(importedNode);
|
|
16413
16564
|
}
|
|
16565
|
+
_sanitizeAttachedShadowRoots2(importedNode);
|
|
16414
16566
|
} else {
|
|
16415
16567
|
if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
|
|
16416
16568
|
dirty.indexOf("<") === -1) {
|
|
@@ -16429,13 +16581,19 @@ function requireTinymce() {
|
|
|
16429
16581
|
_sanitizeElements(currentNode);
|
|
16430
16582
|
_sanitizeAttributes(currentNode);
|
|
16431
16583
|
if (currentNode.content instanceof DocumentFragment) {
|
|
16432
|
-
|
|
16584
|
+
_sanitizeShadowDOM2(currentNode.content);
|
|
16433
16585
|
}
|
|
16434
16586
|
}
|
|
16435
16587
|
if (IN_PLACE) {
|
|
16588
|
+
if (SAFE_FOR_TEMPLATES) {
|
|
16589
|
+
_scrubTemplateExpressions(dirty);
|
|
16590
|
+
}
|
|
16436
16591
|
return dirty;
|
|
16437
16592
|
}
|
|
16438
16593
|
if (RETURN_DOM) {
|
|
16594
|
+
if (SAFE_FOR_TEMPLATES) {
|
|
16595
|
+
_scrubTemplateExpressions(body);
|
|
16596
|
+
}
|
|
16439
16597
|
if (RETURN_DOM_FRAGMENT) {
|
|
16440
16598
|
returnNode = createDocumentFragment.call(body.ownerDocument);
|
|
16441
16599
|
while (body.firstChild) {
|
|
@@ -16454,7 +16612,7 @@ function requireTinymce() {
|
|
|
16454
16612
|
serializedHTML = "<!DOCTYPE " + body.ownerDocument.doctype.name + ">\n" + serializedHTML;
|
|
16455
16613
|
}
|
|
16456
16614
|
if (SAFE_FOR_TEMPLATES) {
|
|
16457
|
-
arrayForEach([
|
|
16615
|
+
arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
|
|
16458
16616
|
serializedHTML = stringReplace(serializedHTML, expr, " ");
|
|
16459
16617
|
});
|
|
16460
16618
|
}
|
|
@@ -16913,8 +17071,18 @@ function requireTinymce() {
|
|
|
16913
17071
|
return;
|
|
16914
17072
|
}
|
|
16915
17073
|
const element = SugarElement.fromDom(node);
|
|
17074
|
+
if (settings.sanitize) {
|
|
17075
|
+
const shouldKeepContent = isScript(element) && schema.isValid("script") || isStyle(element) && schema.isValid("style");
|
|
17076
|
+
if (shouldKeepContent) {
|
|
17077
|
+
Optional.from(get$3(element)).each((content) => set$5(element, "data-mce-tmp", content));
|
|
17078
|
+
}
|
|
17079
|
+
const shouldClearContent = isIframe(element) && schema.isValid("iframe");
|
|
17080
|
+
if (shouldKeepContent || shouldClearContent) {
|
|
17081
|
+
empty(element);
|
|
17082
|
+
}
|
|
17083
|
+
}
|
|
16916
17084
|
const isInternalElement = has$1(element, internalElementAttr);
|
|
16917
|
-
const bogus = get$
|
|
17085
|
+
const bogus = get$a(element, "data-mce-bogus");
|
|
16918
17086
|
if (!isInternalElement && isString(bogus)) {
|
|
16919
17087
|
if (bogus === "all") {
|
|
16920
17088
|
remove$8(element);
|
|
@@ -16938,11 +17106,11 @@ function requireTinymce() {
|
|
|
16938
17106
|
}
|
|
16939
17107
|
if (validate2 && rule && !isInternalElement) {
|
|
16940
17108
|
each$e(rule.attributesForced ?? [], (attr) => {
|
|
16941
|
-
set$
|
|
17109
|
+
set$5(element, attr.name, attr.value === "{$uid}" ? `mce_${uid++}` : attr.value);
|
|
16942
17110
|
});
|
|
16943
17111
|
each$e(rule.attributesDefault ?? [], (attr) => {
|
|
16944
17112
|
if (!has$1(element, attr.name)) {
|
|
16945
|
-
set$
|
|
17113
|
+
set$5(element, attr.name, attr.value === "{$uid}" ? `mce_${uid++}` : attr.value);
|
|
16946
17114
|
}
|
|
16947
17115
|
});
|
|
16948
17116
|
if (rule.attributesRequired && !exists(rule.attributesRequired, (attr) => has$1(element, attr))) {
|
|
@@ -16995,11 +17163,23 @@ function requireTinymce() {
|
|
|
16995
17163
|
}
|
|
16996
17164
|
}
|
|
16997
17165
|
};
|
|
17166
|
+
const restoreValidContent = (node) => {
|
|
17167
|
+
const element = SugarElement.fromDom(node);
|
|
17168
|
+
if (isScript(element) || isStyle(element)) {
|
|
17169
|
+
getOpt(element, "data-mce-tmp").each((content) => {
|
|
17170
|
+
set(element, content);
|
|
17171
|
+
remove$9(element, "data-mce-tmp");
|
|
17172
|
+
});
|
|
17173
|
+
}
|
|
17174
|
+
};
|
|
16998
17175
|
const setupPurify = (settings, schema, namespaceTracker) => {
|
|
16999
17176
|
const purify$1 = purify();
|
|
17000
17177
|
purify$1.addHook("uponSanitizeElement", (ele, evt) => {
|
|
17001
17178
|
processNode(ele, settings, schema, namespaceTracker.track(ele), evt);
|
|
17002
17179
|
});
|
|
17180
|
+
purify$1.addHook("afterSanitizeElements", (ele) => {
|
|
17181
|
+
restoreValidContent(ele);
|
|
17182
|
+
});
|
|
17003
17183
|
purify$1.addHook("uponSanitizeAttribute", (ele, evt) => {
|
|
17004
17184
|
processAttr(ele, settings, schema, namespaceTracker.current(), evt);
|
|
17005
17185
|
});
|
|
@@ -18501,7 +18681,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
18501
18681
|
const addListeners = (editor, registeredFormatListeners, formats, callback, similar, vars) => {
|
|
18502
18682
|
const formatChangeItems = registeredFormatListeners.get();
|
|
18503
18683
|
each$e(formats.split(","), (format) => {
|
|
18504
|
-
const group = get$
|
|
18684
|
+
const group = get$b(formatChangeItems, format).getOrThunk(() => {
|
|
18505
18685
|
const base = {
|
|
18506
18686
|
withSimilar: {
|
|
18507
18687
|
state: Cell(false),
|
|
@@ -18541,7 +18721,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
18541
18721
|
};
|
|
18542
18722
|
const removeListeners = (registeredFormatListeners, formats, callback) => {
|
|
18543
18723
|
const formatChangeItems = registeredFormatListeners.get();
|
|
18544
|
-
each$e(formats.split(","), (format) => get$
|
|
18724
|
+
each$e(formats.split(","), (format) => get$b(formatChangeItems, format).each((group) => {
|
|
18545
18725
|
formatChangeItems[format] = {
|
|
18546
18726
|
withSimilar: {
|
|
18547
18727
|
...group.withSimilar,
|
|
@@ -19013,12 +19193,12 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
19013
19193
|
};
|
|
19014
19194
|
const getCleanLevelContent = (isReadonly, level) => {
|
|
19015
19195
|
const elm = SugarElement.fromTag("body", lazyTempDocument());
|
|
19016
|
-
set$
|
|
19196
|
+
set$4(elm, getLevelContent(level));
|
|
19017
19197
|
each$e(descendants(elm, "*[data-mce-bogus]"), unwrap);
|
|
19018
19198
|
if (isReadonly) {
|
|
19019
19199
|
each$e(descendants(elm, "details[open]"), (element) => remove$9(element, "open"));
|
|
19020
19200
|
}
|
|
19021
|
-
return get$
|
|
19201
|
+
return get$9(elm);
|
|
19022
19202
|
};
|
|
19023
19203
|
const hasEqualContent = (level1, level2) => getLevelContent(level1) === getLevelContent(level2);
|
|
19024
19204
|
const hasEqualCleanedContent = (isReadonly, level1, level2) => getCleanLevelContent(isReadonly, level1) === getCleanLevelContent(isReadonly, level2);
|
|
@@ -19344,7 +19524,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
19344
19524
|
};
|
|
19345
19525
|
};
|
|
19346
19526
|
const isRtc = (editor) => has$2(editor.plugins, "rtc");
|
|
19347
|
-
const getRtcSetup = (editor) => get$
|
|
19527
|
+
const getRtcSetup = (editor) => get$b(editor.plugins, "rtc").bind((rtcPlugin) => (
|
|
19348
19528
|
// This might not exist if the stub plugin is loaded on cloud
|
|
19349
19529
|
Optional.from(rtcPlugin.setup)
|
|
19350
19530
|
));
|
|
@@ -19879,11 +20059,6 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
19879
20059
|
node.name = "#cdata";
|
|
19880
20060
|
node.type = 4;
|
|
19881
20061
|
node.value = dom2.decode(value2.replace(/^\[CDATA\[|\]\]$/g, ""));
|
|
19882
|
-
} else if (value2?.indexOf("mce:protected ") === 0) {
|
|
19883
|
-
node.name = "#text";
|
|
19884
|
-
node.type = 3;
|
|
19885
|
-
node.raw = true;
|
|
19886
|
-
node.value = unescape(value2).substr(14);
|
|
19887
20062
|
}
|
|
19888
20063
|
}
|
|
19889
20064
|
});
|
|
@@ -20283,7 +20458,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
20283
20458
|
const rawElm = elm.dom;
|
|
20284
20459
|
return rawElm[propName];
|
|
20285
20460
|
};
|
|
20286
|
-
const getComputedSizeProp = (propName, elm) => parseInt(get$
|
|
20461
|
+
const getComputedSizeProp = (propName, elm) => parseInt(get$8(elm, propName), 10);
|
|
20287
20462
|
const getClientWidth = curry(getProp, "clientWidth");
|
|
20288
20463
|
const getClientHeight = curry(getProp, "clientHeight");
|
|
20289
20464
|
const getMarginTop = curry(getComputedSizeProp, "margin-top");
|
|
@@ -20843,7 +21018,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
20843
21018
|
const load = (editor, suffix) => {
|
|
20844
21019
|
const strategy = determineStrategy(editor);
|
|
20845
21020
|
if (strategy.type === "use_plugin") {
|
|
20846
|
-
const externalUrl = get$
|
|
21021
|
+
const externalUrl = get$b(getExternalPlugins$1(editor), PLUGIN_CODE).map(trim$4).filter(isNotEmpty);
|
|
20847
21022
|
const url = externalUrl.getOr(`plugins/${PLUGIN_CODE}/plugin${suffix}.js`);
|
|
20848
21023
|
addOnManager.load(ADDON_KEY, url).catch(() => {
|
|
20849
21024
|
licenseKeyManagerLoadError(editor, url);
|
|
@@ -20928,7 +21103,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
20928
21103
|
const body = SugarElement.fromDom(editor.getBody());
|
|
20929
21104
|
toggleClass(body, "mce-content-readonly", false);
|
|
20930
21105
|
if (editor.hasEditableRoot()) {
|
|
20931
|
-
set(body, true);
|
|
21106
|
+
set$1(body, true);
|
|
20932
21107
|
}
|
|
20933
21108
|
setCommonEditorCommands(editor, false);
|
|
20934
21109
|
if (hasEditorOrUiFocus(editor)) {
|
|
@@ -20941,21 +21116,21 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
20941
21116
|
const internalContentEditableAttr = "data-mce-contenteditable";
|
|
20942
21117
|
const switchOffContentEditableTrue = (elm) => {
|
|
20943
21118
|
each$e(descendants(elm, '*[contenteditable="true"]'), (elm2) => {
|
|
20944
|
-
set$
|
|
20945
|
-
set(elm2, false);
|
|
21119
|
+
set$5(elm2, internalContentEditableAttr, "true");
|
|
21120
|
+
set$1(elm2, false);
|
|
20946
21121
|
});
|
|
20947
21122
|
};
|
|
20948
21123
|
const switchOnContentEditableTrue = (elm) => {
|
|
20949
21124
|
each$e(descendants(elm, `*[${internalContentEditableAttr}="true"]`), (elm2) => {
|
|
20950
21125
|
remove$9(elm2, internalContentEditableAttr);
|
|
20951
|
-
set(elm2, true);
|
|
21126
|
+
set$1(elm2, true);
|
|
20952
21127
|
});
|
|
20953
21128
|
};
|
|
20954
21129
|
const toggleDisabled = (editor, state) => {
|
|
20955
21130
|
const body = SugarElement.fromDom(editor.getBody());
|
|
20956
21131
|
if (state) {
|
|
20957
21132
|
disableEditor(editor);
|
|
20958
|
-
set(body, false);
|
|
21133
|
+
set$1(body, false);
|
|
20959
21134
|
switchOffContentEditableTrue(body);
|
|
20960
21135
|
} else {
|
|
20961
21136
|
switchOnContentEditableTrue(body);
|
|
@@ -21039,8 +21214,8 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
21039
21214
|
registerDisabledModeEventHandlers(editor);
|
|
21040
21215
|
};
|
|
21041
21216
|
const isContentCssSkinName = (url) => /^[a-z0-9\-]+$/i.test(url);
|
|
21042
|
-
const toContentSkinResourceName = (
|
|
21043
|
-
const isBundledCssSkinName = (
|
|
21217
|
+
const toContentSkinResourceName = (name2) => "content/" + name2 + "/content.css";
|
|
21218
|
+
const isBundledCssSkinName = (name2) => tinymce.Resource.has(toContentSkinResourceName(name2));
|
|
21044
21219
|
const getContentCssUrls = (editor) => {
|
|
21045
21220
|
return transformToUrls(editor, getContentCss(editor));
|
|
21046
21221
|
};
|
|
@@ -21053,7 +21228,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
21053
21228
|
const contentCssFile = `content${suffix}.css`;
|
|
21054
21229
|
return map$3(cssLinks, (url) => {
|
|
21055
21230
|
if (isBundledCssSkinName(url)) {
|
|
21056
|
-
return url;
|
|
21231
|
+
return toContentSkinResourceName(url);
|
|
21057
21232
|
} else if (isContentCssSkinName(url) && !editor.inline) {
|
|
21058
21233
|
return `${skinUrl}/${url}/${contentCssFile}`;
|
|
21059
21234
|
} else {
|
|
@@ -21210,7 +21385,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
21210
21385
|
}
|
|
21211
21386
|
};
|
|
21212
21387
|
const toBlobInfo = (o) => {
|
|
21213
|
-
if (
|
|
21388
|
+
if (isNullable(o.blob) || isNullable(o.base64) || o.base64 === "" && !o.allowEmptyFile) {
|
|
21214
21389
|
throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");
|
|
21215
21390
|
}
|
|
21216
21391
|
const id = o.id || uuid("blobid");
|
|
@@ -22480,7 +22655,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
22480
22655
|
level.bookmark = getUndoBookmark(editor.selection);
|
|
22481
22656
|
editor.dispatch("change", {
|
|
22482
22657
|
level,
|
|
22483
|
-
lastLevel: get$
|
|
22658
|
+
lastLevel: get$c(undoManager.data, index.get()).getOrUndefined()
|
|
22484
22659
|
});
|
|
22485
22660
|
},
|
|
22486
22661
|
/**
|
|
@@ -22670,6 +22845,49 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
22670
22845
|
});
|
|
22671
22846
|
}
|
|
22672
22847
|
};
|
|
22848
|
+
const createAndFireInputEvent = (eventType) => (editor, inputType, specifics = {}) => {
|
|
22849
|
+
const target = editor.getBody();
|
|
22850
|
+
const overrides = {
|
|
22851
|
+
bubbles: true,
|
|
22852
|
+
composed: true,
|
|
22853
|
+
data: null,
|
|
22854
|
+
isComposing: false,
|
|
22855
|
+
detail: 0,
|
|
22856
|
+
view: null,
|
|
22857
|
+
target,
|
|
22858
|
+
currentTarget: target,
|
|
22859
|
+
eventPhase: Event.AT_TARGET,
|
|
22860
|
+
originalTarget: target,
|
|
22861
|
+
explicitOriginalTarget: target,
|
|
22862
|
+
isTrusted: false,
|
|
22863
|
+
srcElement: target,
|
|
22864
|
+
cancelable: false,
|
|
22865
|
+
preventDefault: noop,
|
|
22866
|
+
inputType
|
|
22867
|
+
};
|
|
22868
|
+
const input = clone$2(new InputEvent(eventType));
|
|
22869
|
+
return editor.dispatch(eventType, { ...input, ...overrides, ...specifics });
|
|
22870
|
+
};
|
|
22871
|
+
const fireInputEvent = createAndFireInputEvent("input");
|
|
22872
|
+
const fireBeforeInputEvent = createAndFireInputEvent("beforeinput");
|
|
22873
|
+
const symulateDelete = (editor, isForward, deleteFun) => {
|
|
22874
|
+
let shouldFireInput = true;
|
|
22875
|
+
const inputHandler = () => shouldFireInput = false;
|
|
22876
|
+
const beforeInputEvent = fireBeforeInputEvent(editor, isForward ? "deleteContentForward" : "deleteContentBackward");
|
|
22877
|
+
if (beforeInputEvent.isDefaultPrevented()) {
|
|
22878
|
+
return false;
|
|
22879
|
+
}
|
|
22880
|
+
editor.on("input", inputHandler);
|
|
22881
|
+
try {
|
|
22882
|
+
deleteFun();
|
|
22883
|
+
} finally {
|
|
22884
|
+
editor.off("input", inputHandler);
|
|
22885
|
+
}
|
|
22886
|
+
if (shouldFireInput) {
|
|
22887
|
+
editor.dispatch("input");
|
|
22888
|
+
}
|
|
22889
|
+
return true;
|
|
22890
|
+
};
|
|
22673
22891
|
const matchNodeName = (name2) => (node) => isNonNullable(node) && node.nodeName.toLowerCase() === name2;
|
|
22674
22892
|
const matchNodeNames = (regex) => (node) => isNonNullable(node) && regex.test(node.nodeName);
|
|
22675
22893
|
const isTextNode$1 = (node) => isNonNullable(node) && node.nodeType === 3;
|
|
@@ -22678,6 +22896,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
22678
22896
|
const isOlUlNode = matchNodeNames(/^(OL|UL)$/);
|
|
22679
22897
|
const isListItemNode = matchNodeNames(/^(LI|DT|DD)$/);
|
|
22680
22898
|
const isDlItemNode = matchNodeNames(/^(DT|DD)$/);
|
|
22899
|
+
const isTableCellNode = matchNodeNames(/^(TH|TD)$/);
|
|
22681
22900
|
const isBr$1 = matchNodeName("br");
|
|
22682
22901
|
const isFirstChild$1 = (node) => node.parentNode?.firstChild === node;
|
|
22683
22902
|
const isTextBlock = (editor, node) => isNonNullable(node) && node.nodeName in editor.schema.getTextBlockElements();
|
|
@@ -22755,11 +22974,18 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
22755
22974
|
outRng.setEnd(rangeEnd.container, rangeEnd.offset);
|
|
22756
22975
|
return outRng;
|
|
22757
22976
|
};
|
|
22977
|
+
const isList = (el) => is$1(el, "OL,UL");
|
|
22978
|
+
const isListItem$1 = (el) => is$1(el, "LI");
|
|
22979
|
+
const hasFirstChildList = (el) => firstChild(el).exists(isList);
|
|
22980
|
+
const hasLastChildList = (el) => lastChild(el).exists(isList);
|
|
22981
|
+
const canIncreaseDepthOfList = (editor, amount) => {
|
|
22982
|
+
return getListMaxDepth(editor).map((max2) => max2 >= amount).getOr(true);
|
|
22983
|
+
};
|
|
22758
22984
|
const listNames = ["OL", "UL", "DL"];
|
|
22759
22985
|
const listSelector = listNames.join(",");
|
|
22760
22986
|
const getParentList = (editor, node) => {
|
|
22761
22987
|
const selectionStart = editor.selection.getStart(true);
|
|
22762
|
-
return editor.dom.getParent(selectionStart, listSelector, getClosestListHost(editor, selectionStart));
|
|
22988
|
+
return editor.dom.getParent(selectionStart, listSelector, getClosestListHost(editor, selectionStart, editor.selection.isCollapsed()));
|
|
22763
22989
|
};
|
|
22764
22990
|
const isParentListSelected = (parentList, selectedBlocks) => isNonNullable(parentList) && selectedBlocks.length === 1 && selectedBlocks[0] === parentList;
|
|
22765
22991
|
const findSubLists = (parentList) => filter$5(parentList.querySelectorAll(listSelector), isListNode);
|
|
@@ -22774,16 +23000,16 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
22774
23000
|
});
|
|
22775
23001
|
}
|
|
22776
23002
|
};
|
|
22777
|
-
const findParentListItemsNodes = (editor, elms) => {
|
|
23003
|
+
const findParentListItemsNodes = (editor, elms, isCollapsed) => {
|
|
22778
23004
|
const listItemsElms = Tools.map(elms, (elm) => {
|
|
22779
|
-
const parentLi = editor.dom.getParent(elm, "li,dd,dt", getClosestListHost(editor, elm));
|
|
23005
|
+
const parentLi = editor.dom.getParent(elm, "li,dd,dt", getClosestListHost(editor, elm, isCollapsed));
|
|
22780
23006
|
return parentLi ? parentLi : elm;
|
|
22781
23007
|
});
|
|
22782
23008
|
return unique$1(listItemsElms);
|
|
22783
23009
|
};
|
|
22784
23010
|
const getSelectedListItems = (editor) => {
|
|
22785
23011
|
const selectedBlocks = editor.selection.getSelectedBlocks();
|
|
22786
|
-
return filter$5(findParentListItemsNodes(editor, selectedBlocks), isListItemNode);
|
|
23012
|
+
return filter$5(findParentListItemsNodes(editor, selectedBlocks, editor.selection.isCollapsed()), isListItemNode);
|
|
22787
23013
|
};
|
|
22788
23014
|
const getSelectedDlItems = (editor) => filter$5(getSelectedListItems(editor), isDlItemNode);
|
|
22789
23015
|
const getClosestEditingHost = (editor, elm) => {
|
|
@@ -22791,15 +23017,34 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
22791
23017
|
return parentTableCell.length > 0 ? parentTableCell[0] : editor.getBody();
|
|
22792
23018
|
};
|
|
22793
23019
|
const isListHost = (schema, node) => !isListNode(node) && !isListItemNode(node) && exists(listNames, (listName) => schema.isValidChild(node.nodeName, listName));
|
|
22794
|
-
const
|
|
23020
|
+
const requireLiElementFirst = (parentBlocks) => {
|
|
23021
|
+
const result = findMap(parentBlocks, (element) => {
|
|
23022
|
+
if (isListItem$1(SugarElement.fromDom(element))) {
|
|
23023
|
+
return Optional.some(true);
|
|
23024
|
+
}
|
|
23025
|
+
if (isTableCellNode(element)) {
|
|
23026
|
+
return Optional.some(false);
|
|
23027
|
+
}
|
|
23028
|
+
return Optional.none();
|
|
23029
|
+
});
|
|
23030
|
+
return result.getOr(false);
|
|
23031
|
+
};
|
|
23032
|
+
const getClosestListHost = (editor, elm, isCollapsed) => {
|
|
22795
23033
|
const parentBlocks = editor.dom.getParents(elm, editor.dom.isBlock);
|
|
23034
|
+
let foundListBlock = !requireLiElementFirst(parentBlocks);
|
|
22796
23035
|
const isNotForcedRootBlock = (elm2) => elm2.nodeName.toLowerCase() !== getForcedRootBlock(editor);
|
|
22797
|
-
const
|
|
23036
|
+
const checkListRequirement = (element) => {
|
|
23037
|
+
if (isListItem$1(SugarElement.fromDom(element)) || isList(SugarElement.fromDom(element))) {
|
|
23038
|
+
foundListBlock = true;
|
|
23039
|
+
}
|
|
23040
|
+
return foundListBlock;
|
|
23041
|
+
};
|
|
23042
|
+
const parentBlock = find$2(parentBlocks, (elm2) => checkListRequirement(elm2) && (!isCollapsed || isNotForcedRootBlock(elm2)) && isListHost(editor.schema, elm2));
|
|
22798
23043
|
return parentBlock.getOr(editor.getBody());
|
|
22799
23044
|
};
|
|
22800
23045
|
const isListInsideAnLiWithFirstAndLastNotListElement = (list) => parent(list).exists((parent2) => isListItemNode(parent2.dom) && firstChild(parent2).exists((firstChild2) => !isListNode(firstChild2.dom)) && lastChild(parent2).exists((lastChild2) => !isListNode(lastChild2.dom)));
|
|
22801
23046
|
const findLastParentListNode = (editor, elm) => {
|
|
22802
|
-
const parentLists = editor.dom.getParents(elm, "ol,ul", getClosestListHost(editor, elm));
|
|
23047
|
+
const parentLists = editor.dom.getParents(elm, "ol,ul", getClosestListHost(editor, elm, true));
|
|
22803
23048
|
return last$2(parentLists);
|
|
22804
23049
|
};
|
|
22805
23050
|
const getSelectedLists = (editor) => {
|
|
@@ -22809,7 +23054,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
22809
23054
|
};
|
|
22810
23055
|
const getParentLists = (editor) => {
|
|
22811
23056
|
const elm = editor.selection.getStart();
|
|
22812
|
-
return editor.dom.getParents(elm, "ol,ul", getClosestListHost(editor, elm));
|
|
23057
|
+
return editor.dom.getParents(elm, "ol,ul", getClosestListHost(editor, elm, editor.selection.isCollapsed()));
|
|
22813
23058
|
};
|
|
22814
23059
|
const getSelectedListRoots = (editor) => {
|
|
22815
23060
|
const selectedLists = getSelectedLists(editor);
|
|
@@ -22868,13 +23113,6 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
22868
23113
|
}
|
|
22869
23114
|
return fragment;
|
|
22870
23115
|
};
|
|
22871
|
-
const isList = (el) => is$1(el, "OL,UL");
|
|
22872
|
-
const isListItem$1 = (el) => is$1(el, "LI");
|
|
22873
|
-
const hasFirstChildList = (el) => firstChild(el).exists(isList);
|
|
22874
|
-
const hasLastChildList = (el) => lastChild(el).exists(isList);
|
|
22875
|
-
const canIncreaseDepthOfList = (editor, amount) => {
|
|
22876
|
-
return getListMaxDepth(editor).map((max2) => max2 >= amount).getOr(true);
|
|
22877
|
-
};
|
|
22878
23116
|
const isEntryList = (entry) => "listAttributes" in entry;
|
|
22879
23117
|
const isEntryComment = (entry) => "isComment" in entry;
|
|
22880
23118
|
const isEntryFragment = (entry) => "isFragment" in entry;
|
|
@@ -22923,7 +23161,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
22923
23161
|
};
|
|
22924
23162
|
const populateSegments = (segments, entry) => {
|
|
22925
23163
|
for (let i = 0; i < segments.length - 1; i++) {
|
|
22926
|
-
set$
|
|
23164
|
+
set$3(segments[i].item, "list-style-type", "none");
|
|
22927
23165
|
}
|
|
22928
23166
|
last$2(segments).each((segment) => {
|
|
22929
23167
|
if (isEntryList(entry)) {
|
|
@@ -23378,7 +23616,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
23378
23616
|
const applyList = (editor, listName, detail) => {
|
|
23379
23617
|
const rng = editor.selection.getRng();
|
|
23380
23618
|
let listItemName = "LI";
|
|
23381
|
-
const root = getClosestListHost(editor, getRootSearchStart(editor, rng));
|
|
23619
|
+
const root = getClosestListHost(editor, getRootSearchStart(editor, rng), rng.collapsed);
|
|
23382
23620
|
const dom2 = editor.dom;
|
|
23383
23621
|
if (dom2.getContentEditable(editor.selection.getNode()) === "false") {
|
|
23384
23622
|
return;
|
|
@@ -23747,18 +23985,12 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
23747
23985
|
const startListParent = editor.dom.getParent(selectionStartElm, "LI,DT,DD", root);
|
|
23748
23986
|
return isNonNullable(startListParent) || getSelectedListItems(editor).length > 0;
|
|
23749
23987
|
};
|
|
23750
|
-
const backspaceDeleteRange$1 = (editor) => {
|
|
23988
|
+
const backspaceDeleteRange$1 = (editor, isForward) => {
|
|
23751
23989
|
if (hasListSelection(editor)) {
|
|
23752
23990
|
editor.undoManager.transact(() => {
|
|
23753
|
-
|
|
23754
|
-
|
|
23755
|
-
editor.on("input", inputHandler);
|
|
23756
|
-
editor.execCommand("Delete");
|
|
23757
|
-
editor.off("input", inputHandler);
|
|
23758
|
-
if (shouldFireInput) {
|
|
23759
|
-
editor.dispatch("input");
|
|
23991
|
+
if (symulateDelete(editor, isForward, () => editor.execCommand("Delete"))) {
|
|
23992
|
+
normalizeLists(editor.dom, editor.getBody());
|
|
23760
23993
|
}
|
|
23761
|
-
normalizeLists(editor.dom, editor.getBody());
|
|
23762
23994
|
});
|
|
23763
23995
|
return true;
|
|
23764
23996
|
}
|
|
@@ -23766,7 +23998,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
23766
23998
|
};
|
|
23767
23999
|
const backspaceDelete$c = (editor, isForward) => {
|
|
23768
24000
|
const selection = editor.selection;
|
|
23769
|
-
return !isWithinNonEditableList$1(editor, selection.getNode()) && (selection.isCollapsed() ? backspaceDeleteCaret$1(editor, isForward) : backspaceDeleteRange$1(editor));
|
|
24001
|
+
return !isWithinNonEditableList$1(editor, selection.getNode()) && (selection.isCollapsed() ? backspaceDeleteCaret$1(editor, isForward) : backspaceDeleteRange$1(editor, isForward));
|
|
23770
24002
|
};
|
|
23771
24003
|
const blockPosition = (block, position) => ({
|
|
23772
24004
|
block,
|
|
@@ -25085,7 +25317,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
25085
25317
|
const parseIndentValue = (value2) => toInt(value2 ?? "").getOr(0);
|
|
25086
25318
|
const getIndentStyleName = (useMargin, element) => {
|
|
25087
25319
|
const indentStyleName = useMargin || isTable$1(element) ? "margin" : "padding";
|
|
25088
|
-
const suffix = get$
|
|
25320
|
+
const suffix = get$8(element, "direction") === "rtl" ? "-right" : "-left";
|
|
25089
25321
|
return indentStyleName + suffix;
|
|
25090
25322
|
};
|
|
25091
25323
|
const indentElement = (dom2, command, useMargin, value2, unit, element) => {
|
|
@@ -25146,8 +25378,9 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
25146
25378
|
return Optional.none();
|
|
25147
25379
|
};
|
|
25148
25380
|
const deleteRange = (editor, forward) => {
|
|
25149
|
-
const
|
|
25150
|
-
|
|
25381
|
+
const range2 = editor.selection.getRng();
|
|
25382
|
+
const rng = normalize(range2);
|
|
25383
|
+
return isSelectionOverWholeHTMLElement(rng) ? Optional.some(() => deleteElement$2(editor, forward, SugarElement.fromDom(range2.startContainer.childNodes[range2.startOffset]))) : Optional.none();
|
|
25151
25384
|
};
|
|
25152
25385
|
const backspaceDelete$1 = (editor, forward) => editor.selection.isCollapsed() ? Optional.none() : deleteRange(editor, forward);
|
|
25153
25386
|
const findAction = (editor, caret, forward) => findMap([
|
|
@@ -25436,6 +25669,43 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
25436
25669
|
}
|
|
25437
25670
|
});
|
|
25438
25671
|
};
|
|
25672
|
+
const setupInputFiltering = (editor, protect) => {
|
|
25673
|
+
editor.on("BeforeSetContent", (e) => {
|
|
25674
|
+
each$e(protect, (pattern) => {
|
|
25675
|
+
e.content = e.content.replace(pattern, (str) => {
|
|
25676
|
+
return "<!--mce:protected " + escape(str) + "-->";
|
|
25677
|
+
});
|
|
25678
|
+
});
|
|
25679
|
+
});
|
|
25680
|
+
};
|
|
25681
|
+
const setupOutputFiltering = (editor, protect) => {
|
|
25682
|
+
editor.serializer.addNodeFilter("#comment", (nodes) => {
|
|
25683
|
+
let i = nodes.length;
|
|
25684
|
+
while (i--) {
|
|
25685
|
+
const node = nodes[i];
|
|
25686
|
+
const value2 = node.value;
|
|
25687
|
+
if (value2?.indexOf("mce:protected ") === 0) {
|
|
25688
|
+
const protectedHtml = unescape(value2).substr(14);
|
|
25689
|
+
const valid = exists(protect, (pattern) => {
|
|
25690
|
+
const matches = protectedHtml.match(pattern);
|
|
25691
|
+
return matches !== null && matches[0].length === protectedHtml.length;
|
|
25692
|
+
});
|
|
25693
|
+
if (valid) {
|
|
25694
|
+
node.name = "#text";
|
|
25695
|
+
node.type = 3;
|
|
25696
|
+
node.raw = true;
|
|
25697
|
+
node.value = protectedHtml;
|
|
25698
|
+
} else {
|
|
25699
|
+
node.remove();
|
|
25700
|
+
}
|
|
25701
|
+
}
|
|
25702
|
+
}
|
|
25703
|
+
});
|
|
25704
|
+
};
|
|
25705
|
+
const registerProtectedHtmlFilters = (editor, protect) => {
|
|
25706
|
+
setupInputFiltering(editor, protect);
|
|
25707
|
+
setupOutputFiltering(editor, protect);
|
|
25708
|
+
};
|
|
25439
25709
|
const findBlockCaretContainer = (editor) => descendant$1(SugarElement.fromDom(editor.getBody()), "*[data-mce-caret]").map((elm) => elm.dom).getOrNull();
|
|
25440
25710
|
const showBlockCaretContainer = (editor, blockCaretContainer) => {
|
|
25441
25711
|
if (blockCaretContainer.hasAttribute("data-mce-caret")) {
|
|
@@ -25790,7 +26060,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
25790
26060
|
}
|
|
25791
26061
|
return contains$2(["br", "img", "hr", "input"], name(element));
|
|
25792
26062
|
};
|
|
25793
|
-
const isNonEditable = (element) => isElement$8(element) && get$
|
|
26063
|
+
const isNonEditable = (element) => isElement$8(element) && get$a(element, "contenteditable") === "false";
|
|
25794
26064
|
const comparePosition = (element, other) => {
|
|
25795
26065
|
return element.dom.compareDocumentPosition(other.dom);
|
|
25796
26066
|
};
|
|
@@ -25825,14 +26095,14 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
25825
26095
|
predicate: descendants$1
|
|
25826
26096
|
}),
|
|
25827
26097
|
styles: constant({
|
|
25828
|
-
get: get$
|
|
26098
|
+
get: get$8,
|
|
25829
26099
|
getRaw: getRaw$1,
|
|
25830
|
-
set: set$
|
|
26100
|
+
set: set$3,
|
|
25831
26101
|
remove: remove$7
|
|
25832
26102
|
}),
|
|
25833
26103
|
attrs: constant({
|
|
25834
|
-
get: get$
|
|
25835
|
-
set: set$
|
|
26104
|
+
get: get$a,
|
|
26105
|
+
set: set$5,
|
|
25836
26106
|
remove: remove$9,
|
|
25837
26107
|
copyTo: copyAttributesTo
|
|
25838
26108
|
}),
|
|
@@ -25869,8 +26139,8 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
25869
26139
|
isElement: isElement$8,
|
|
25870
26140
|
isSpecial,
|
|
25871
26141
|
getLanguage,
|
|
25872
|
-
getText: get$
|
|
25873
|
-
setText: set$
|
|
26142
|
+
getText: get$5,
|
|
26143
|
+
setText: set$2,
|
|
25874
26144
|
isBoundary: isBoundary2,
|
|
25875
26145
|
isEmptyTag,
|
|
25876
26146
|
isNonEditable
|
|
@@ -26795,31 +27065,6 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
26795
27065
|
}
|
|
26796
27066
|
};
|
|
26797
27067
|
const backspaceDelete = (editor, forward, granularity) => shouldPreventDeleteAction(editor, forward, granularity) || isSafari && handleDeleteActionSafari(editor, forward, granularity) ? Optional.some(noop) : Optional.none();
|
|
26798
|
-
const createAndFireInputEvent = (eventType) => (editor, inputType, specifics = {}) => {
|
|
26799
|
-
const target = editor.getBody();
|
|
26800
|
-
const overrides = {
|
|
26801
|
-
bubbles: true,
|
|
26802
|
-
composed: true,
|
|
26803
|
-
data: null,
|
|
26804
|
-
isComposing: false,
|
|
26805
|
-
detail: 0,
|
|
26806
|
-
view: null,
|
|
26807
|
-
target,
|
|
26808
|
-
currentTarget: target,
|
|
26809
|
-
eventPhase: Event.AT_TARGET,
|
|
26810
|
-
originalTarget: target,
|
|
26811
|
-
explicitOriginalTarget: target,
|
|
26812
|
-
isTrusted: false,
|
|
26813
|
-
srcElement: target,
|
|
26814
|
-
cancelable: false,
|
|
26815
|
-
preventDefault: noop,
|
|
26816
|
-
inputType
|
|
26817
|
-
};
|
|
26818
|
-
const input = clone$2(new InputEvent(eventType));
|
|
26819
|
-
return editor.dispatch(eventType, { ...input, ...overrides, ...specifics });
|
|
26820
|
-
};
|
|
26821
|
-
const fireInputEvent = createAndFireInputEvent("input");
|
|
26822
|
-
const fireBeforeInputEvent = createAndFireInputEvent("beforeinput");
|
|
26823
27068
|
const platform$2 = detect$1();
|
|
26824
27069
|
const os = platform$2.os;
|
|
26825
27070
|
const isMacOSOriOS = os.isMacOS() || os.isiOS();
|
|
@@ -26904,19 +27149,21 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
26904
27149
|
const setup$o = (editor, caret) => {
|
|
26905
27150
|
let isBackspaceKeydown = false;
|
|
26906
27151
|
let formatNodes = [];
|
|
26907
|
-
editor.on("
|
|
26908
|
-
|
|
26909
|
-
|
|
26910
|
-
|
|
26911
|
-
|
|
26912
|
-
|
|
26913
|
-
|
|
26914
|
-
|
|
26915
|
-
|
|
26916
|
-
|
|
26917
|
-
|
|
26918
|
-
|
|
26919
|
-
|
|
27152
|
+
editor.on("init", () => {
|
|
27153
|
+
editor.on("keydown", (evt) => {
|
|
27154
|
+
isBackspaceKeydown = evt.keyCode === VK.BACKSPACE;
|
|
27155
|
+
formatNodes = getFormatNodesAtStart(editor);
|
|
27156
|
+
if (!evt.isDefaultPrevented()) {
|
|
27157
|
+
executeKeydownOverride$3(editor, caret, evt);
|
|
27158
|
+
}
|
|
27159
|
+
});
|
|
27160
|
+
editor.on("keyup", (evt) => {
|
|
27161
|
+
if (!evt.isDefaultPrevented()) {
|
|
27162
|
+
executeKeyupOverride(editor, evt, isBackspaceKeydown, formatNodes);
|
|
27163
|
+
formatNodes.length = 0;
|
|
27164
|
+
}
|
|
27165
|
+
isBackspaceKeydown = false;
|
|
27166
|
+
});
|
|
26920
27167
|
});
|
|
26921
27168
|
};
|
|
26922
27169
|
const reduceFontStyleNesting = (block, node) => {
|
|
@@ -26952,16 +27199,15 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
26952
27199
|
if (!root) {
|
|
26953
27200
|
return;
|
|
26954
27201
|
}
|
|
26955
|
-
if (
|
|
26956
|
-
const
|
|
26957
|
-
const findFirstList = (e) => isList2(e) ? Optional.from(e) : descendant$2(e, isList2);
|
|
27202
|
+
if (isListItem$2(SugarElement.fromDom(root))) {
|
|
27203
|
+
const findFirstList = (e) => isList$1(e) ? Optional.from(e) : descendant$2(e, isList$1);
|
|
26958
27204
|
const isEmpty2 = (e) => dom2.isEmpty(e.dom);
|
|
26959
27205
|
firstNonWhiteSpaceNodeSibling(root.firstChild).each((firstChild2) => {
|
|
26960
27206
|
findFirstList(firstChild2).fold(() => {
|
|
26961
27207
|
if (isEmpty2(firstChild2)) {
|
|
26962
27208
|
const element = toLeaf$1(firstChild2, 0).element;
|
|
26963
27209
|
if (isElement$8(element) && !isBr$6(element)) {
|
|
26964
|
-
append$1(element, SugarElement.
|
|
27210
|
+
append$1(element, SugarElement.fromHtml('<br data-mce-bogus="1" />'));
|
|
26965
27211
|
}
|
|
26966
27212
|
}
|
|
26967
27213
|
}, (firstList) => {
|
|
@@ -27415,6 +27661,16 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
27415
27661
|
}
|
|
27416
27662
|
return true;
|
|
27417
27663
|
};
|
|
27664
|
+
const isInsideLiBeforeAList = (newBlock2) => {
|
|
27665
|
+
const nextSibling$1 = firstChild(newBlock2).bind(nextSibling);
|
|
27666
|
+
return isListItem$2(newBlock2) && nextSibling$1.exists(isList$1);
|
|
27667
|
+
};
|
|
27668
|
+
const trimEmptySpacesInLeftLeaf = (newBlock2) => {
|
|
27669
|
+
const leaf = toLeaf$1(SugarElement.fromDom(newBlock2), 0).element;
|
|
27670
|
+
if (isText$c(leaf) && dom2.isEmpty(leaf.dom)) {
|
|
27671
|
+
leaf.dom.remove();
|
|
27672
|
+
}
|
|
27673
|
+
};
|
|
27418
27674
|
const insertNewBlockAfter = () => {
|
|
27419
27675
|
let block;
|
|
27420
27676
|
if (/^(H[1-6]|PRE|FIGURE)$/.test(parentBlockName) && containerBlockName !== "HGROUP") {
|
|
@@ -27518,8 +27774,12 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
27518
27774
|
} else {
|
|
27519
27775
|
dom2.insertAfter(fragment, parentBlock);
|
|
27520
27776
|
}
|
|
27521
|
-
|
|
27522
|
-
|
|
27777
|
+
if (!isInsideLiBeforeAList(SugarElement.fromDom(newBlock))) {
|
|
27778
|
+
trimInlineElementsOnLeftSideOfBlock(dom2, nonEmptyElementsMap, newBlock);
|
|
27779
|
+
addBrToBlockIfNeeded(dom2, parentBlock);
|
|
27780
|
+
} else {
|
|
27781
|
+
trimEmptySpacesInLeftLeaf(newBlock);
|
|
27782
|
+
}
|
|
27523
27783
|
if (dom2.isEmpty(parentBlock)) {
|
|
27524
27784
|
emptyBlock(parentBlock);
|
|
27525
27785
|
}
|
|
@@ -28076,16 +28336,21 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
28076
28336
|
editor.addQueryStateHandler("InsertDefinitionList", queryListCommandState(editor, "DL"));
|
|
28077
28337
|
};
|
|
28078
28338
|
const setup$e = (editor) => {
|
|
28079
|
-
editor.on("
|
|
28080
|
-
|
|
28081
|
-
if (
|
|
28082
|
-
|
|
28339
|
+
editor.on("init", () => {
|
|
28340
|
+
editor.on("keydown", (e) => {
|
|
28341
|
+
if (e.defaultPrevented) {
|
|
28342
|
+
return;
|
|
28083
28343
|
}
|
|
28084
|
-
|
|
28085
|
-
|
|
28086
|
-
|
|
28344
|
+
if (e.keyCode === VK.BACKSPACE) {
|
|
28345
|
+
if (backspaceDelete$c(editor, false)) {
|
|
28346
|
+
e.preventDefault();
|
|
28347
|
+
}
|
|
28348
|
+
} else if (e.keyCode === VK.DELETE) {
|
|
28349
|
+
if (backspaceDelete$c(editor, true)) {
|
|
28350
|
+
e.preventDefault();
|
|
28351
|
+
}
|
|
28087
28352
|
}
|
|
28088
|
-
}
|
|
28353
|
+
});
|
|
28089
28354
|
});
|
|
28090
28355
|
};
|
|
28091
28356
|
const isTextNode = (node) => node.type === 3;
|
|
@@ -29792,7 +30057,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
29792
30057
|
const doc = editor.getDoc();
|
|
29793
30058
|
const realSelectionContainer = descendant$1(body, "#" + realSelectionId).getOrThunk(() => {
|
|
29794
30059
|
const newContainer = SugarElement.fromHtml('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>', doc);
|
|
29795
|
-
set$
|
|
30060
|
+
set$5(newContainer, "id", realSelectionId);
|
|
29796
30061
|
append$1(body, newContainer);
|
|
29797
30062
|
return newContainer;
|
|
29798
30063
|
});
|
|
@@ -30310,9 +30575,9 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
30310
30575
|
const stripPattern = (dom2, block, pattern) => {
|
|
30311
30576
|
stripPattern$1(dom2, block, pattern).each((node) => {
|
|
30312
30577
|
const text2 = SugarElement.fromDom(node);
|
|
30313
|
-
const textContent = get$
|
|
30578
|
+
const textContent = get$5(text2);
|
|
30314
30579
|
if (startsWithSingleSpace(textContent)) {
|
|
30315
|
-
set$
|
|
30580
|
+
set$2(text2, textContent.slice(1));
|
|
30316
30581
|
}
|
|
30317
30582
|
});
|
|
30318
30583
|
};
|
|
@@ -30501,13 +30766,13 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
30501
30766
|
return;
|
|
30502
30767
|
}
|
|
30503
30768
|
e.preventDefault();
|
|
30504
|
-
editor.setContent("")
|
|
30505
|
-
|
|
30506
|
-
|
|
30507
|
-
|
|
30508
|
-
|
|
30769
|
+
if (symulateDelete(editor, keyCode === DELETE2, () => editor.setContent(""))) {
|
|
30770
|
+
if (body.firstChild && dom2.isBlock(body.firstChild)) {
|
|
30771
|
+
editor.selection.setCursorLocation(body.firstChild, 0);
|
|
30772
|
+
} else {
|
|
30773
|
+
editor.selection.setCursorLocation(body, 0);
|
|
30774
|
+
}
|
|
30509
30775
|
}
|
|
30510
|
-
editor.nodeChanged();
|
|
30511
30776
|
}
|
|
30512
30777
|
});
|
|
30513
30778
|
};
|
|
@@ -30930,7 +31195,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
30930
31195
|
};
|
|
30931
31196
|
const loadComponentsForInlineEditor = (componentUrls) => {
|
|
30932
31197
|
return mapToArray(componentUrls, (url, elementName) => {
|
|
30933
|
-
return get$
|
|
31198
|
+
return get$b(hostWindowComponentScripts, url).getOrThunk(() => {
|
|
30934
31199
|
if (isNullable(window.customElements.get(elementName))) {
|
|
30935
31200
|
const loadPromise = loadComponent(url, getDocument());
|
|
30936
31201
|
hostWindowComponentScripts[url] = loadPromise;
|
|
@@ -30976,7 +31241,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
30976
31241
|
const body = SugarElement.fromDom(editor.getBody());
|
|
30977
31242
|
const container = getStyleContainer(getRootNode(body));
|
|
30978
31243
|
const style = SugarElement.fromTag("style");
|
|
30979
|
-
set$
|
|
31244
|
+
set$5(style, "type", "text/css");
|
|
30980
31245
|
append$1(style, SugarElement.fromText(text2));
|
|
30981
31246
|
append$1(container, style);
|
|
30982
31247
|
editor.on("remove", () => {
|
|
@@ -31055,6 +31320,11 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
31055
31320
|
};
|
|
31056
31321
|
const createParser = (editor) => {
|
|
31057
31322
|
const parser = DomParser(mkParserSettings(editor), editor.schema);
|
|
31323
|
+
parser.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style", (nodes, name2) => {
|
|
31324
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
31325
|
+
nodes[i].attr(name2, null);
|
|
31326
|
+
}
|
|
31327
|
+
});
|
|
31058
31328
|
parser.addAttributeFilter("src,href,style,tabindex", (nodes, name2) => {
|
|
31059
31329
|
const dom2 = editor.dom;
|
|
31060
31330
|
const internalName = "data-mce-" + name2;
|
|
@@ -31160,11 +31430,11 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
31160
31430
|
};
|
|
31161
31431
|
const getStyleSheetLoader$1 = (editor) => editor.inline ? editor.ui.styleSheetLoader : editor.dom.styleSheetLoader;
|
|
31162
31432
|
const makeStylesheetLoadingPromises = (editor, css, framedFonts) => {
|
|
31163
|
-
const { pass: bundledCss, fail: normalCss } = partition$2(css, (
|
|
31164
|
-
const bundledPromises = bundledCss.map((
|
|
31165
|
-
const css2 = tinymce.Resource.get(
|
|
31433
|
+
const { pass: bundledCss, fail: normalCss } = partition$2(css, (key) => tinymce.Resource.has(key));
|
|
31434
|
+
const bundledPromises = bundledCss.map((key) => {
|
|
31435
|
+
const css2 = tinymce.Resource.get(key);
|
|
31166
31436
|
if (isString(css2)) {
|
|
31167
|
-
return Promise.resolve(getStyleSheetLoader$1(editor).loadRawCss(
|
|
31437
|
+
return Promise.resolve(getStyleSheetLoader$1(editor).loadRawCss(key, css2));
|
|
31168
31438
|
}
|
|
31169
31439
|
return Promise.resolve();
|
|
31170
31440
|
});
|
|
@@ -31226,13 +31496,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
31226
31496
|
}
|
|
31227
31497
|
const protect = getProtect(editor);
|
|
31228
31498
|
if (protect) {
|
|
31229
|
-
editor
|
|
31230
|
-
Tools.each(protect, (pattern) => {
|
|
31231
|
-
e.content = e.content.replace(pattern, (str) => {
|
|
31232
|
-
return "<!--mce:protected " + escape(str) + "-->";
|
|
31233
|
-
});
|
|
31234
|
-
});
|
|
31235
|
-
});
|
|
31499
|
+
registerProtectedHtmlFilters(editor, protect);
|
|
31236
31500
|
}
|
|
31237
31501
|
editor.on("SetContent", () => {
|
|
31238
31502
|
editor.addVisual(editor.getBody());
|
|
@@ -31276,6 +31540,11 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
31276
31540
|
editor.bodyElement = targetElm;
|
|
31277
31541
|
editor.contentAreaContainer = targetElm;
|
|
31278
31542
|
}
|
|
31543
|
+
const contentLanguage = getContentLanguage(editor);
|
|
31544
|
+
if (contentLanguage) {
|
|
31545
|
+
const langTarget = editor.inline ? targetElm : doc.documentElement;
|
|
31546
|
+
DOM$6.setAttrib(langTarget, "lang", contentLanguage);
|
|
31547
|
+
}
|
|
31279
31548
|
const body = editor.getBody();
|
|
31280
31549
|
body.disabled = true;
|
|
31281
31550
|
editor.readonly = isReadOnly$1(editor);
|
|
@@ -31317,7 +31586,9 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
31317
31586
|
setup$b(editor);
|
|
31318
31587
|
setup$u(editor);
|
|
31319
31588
|
setup$6(editor);
|
|
31320
|
-
|
|
31589
|
+
if (shouldAllowNonEditable(editor)) {
|
|
31590
|
+
setup$s(editor);
|
|
31591
|
+
}
|
|
31321
31592
|
if (!isRtc(editor)) {
|
|
31322
31593
|
setup$5(editor);
|
|
31323
31594
|
setup$1(editor);
|
|
@@ -31354,7 +31625,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
31354
31625
|
const DOM$5 = DOMUtils.DOM;
|
|
31355
31626
|
const createIframeElement = (id, title, customAttrs, tabindex) => {
|
|
31356
31627
|
const iframe = SugarElement.fromTag("iframe");
|
|
31357
|
-
tabindex.each((t) => set$
|
|
31628
|
+
tabindex.each((t) => set$5(iframe, "tabindex", t));
|
|
31358
31629
|
setAll$1(iframe, customAttrs);
|
|
31359
31630
|
setAll$1(iframe, {
|
|
31360
31631
|
id: id + "_ifr",
|
|
@@ -31975,7 +32246,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
31975
32246
|
};
|
|
31976
32247
|
const getSection = (sectionResult2, name2, defaults = {}) => {
|
|
31977
32248
|
const sections = sectionResult2.sections();
|
|
31978
|
-
const sectionOptions = get$
|
|
32249
|
+
const sectionOptions = get$b(sections, name2).getOr({});
|
|
31979
32250
|
return Tools.extend({}, defaults, sectionOptions);
|
|
31980
32251
|
};
|
|
31981
32252
|
const hasSection = (sectionResult2, name2) => {
|
|
@@ -31992,7 +32263,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
31992
32263
|
// No nice way to do object resizing at this stage
|
|
31993
32264
|
resize: false,
|
|
31994
32265
|
// Editor resize doesn't make sense on mobile
|
|
31995
|
-
toolbar_mode: get$
|
|
32266
|
+
toolbar_mode: get$b(mobileOptions, "toolbar_mode").getOr("scrolling"),
|
|
31996
32267
|
// Use the default side-scrolling toolbar for tablets/phones
|
|
31997
32268
|
toolbar_sticky: false
|
|
31998
32269
|
// Only enable sticky toolbar on desktop by default
|
|
@@ -32219,7 +32490,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
32219
32490
|
const getSpecifiedFontProp = (propName, rootElm, elm) => {
|
|
32220
32491
|
const getProperty = (elm2) => getRaw$1(elm2, propName).orThunk(() => {
|
|
32221
32492
|
if (isFont(elm2)) {
|
|
32222
|
-
return get$
|
|
32493
|
+
return get$b(legacyPropNames, propName).bind((legacyPropName) => getOpt(elm2, legacyPropName));
|
|
32223
32494
|
} else {
|
|
32224
32495
|
return Optional.none();
|
|
32225
32496
|
}
|
|
@@ -32289,8 +32560,8 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
32289
32560
|
const root = SugarElement.fromDom(editor.getBody());
|
|
32290
32561
|
const specifiedStyle = closest$1(elm, (elm2) => getRaw$1(elm2, "line-height"), curry(eq, root));
|
|
32291
32562
|
const computedStyle = () => {
|
|
32292
|
-
const lineHeight = parseFloat(get$
|
|
32293
|
-
const fontSize = parseFloat(get$
|
|
32563
|
+
const lineHeight = parseFloat(get$8(elm, "line-height"));
|
|
32564
|
+
const fontSize = parseFloat(get$8(elm, "font-size"));
|
|
32294
32565
|
return String(lineHeight / fontSize);
|
|
32295
32566
|
};
|
|
32296
32567
|
return specifiedStyle.getOrThunk(computedStyle);
|
|
@@ -33212,11 +33483,11 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
33212
33483
|
default: defaultValue,
|
|
33213
33484
|
processor
|
|
33214
33485
|
};
|
|
33215
|
-
const initValue = get$
|
|
33486
|
+
const initValue = get$b(values2, name2).orThunk(() => get$b(initialOptions, name2));
|
|
33216
33487
|
initValue.each((value2) => setValue(name2, value2, processor));
|
|
33217
33488
|
};
|
|
33218
33489
|
const isRegistered = (name2) => has$2(registry2, name2);
|
|
33219
|
-
const get2 = (name2) => get$
|
|
33490
|
+
const get2 = (name2) => get$b(values2, name2).orThunk(() => get$b(registry2, name2).map((spec) => spec.default)).getOrUndefined();
|
|
33220
33491
|
const set2 = (name2, value2) => {
|
|
33221
33492
|
if (!isRegistered(name2)) {
|
|
33222
33493
|
console.warn(`"${name2}" is not a registered option. Ensure the option has been registered before setting a value.`);
|
|
@@ -34701,14 +34972,14 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
34701
34972
|
* @property minorVersion
|
|
34702
34973
|
* @type String
|
|
34703
34974
|
*/
|
|
34704
|
-
minorVersion: "
|
|
34975
|
+
minorVersion: "6.0",
|
|
34705
34976
|
/**
|
|
34706
34977
|
* Release date of TinyMCE build.
|
|
34707
34978
|
*
|
|
34708
34979
|
* @property releaseDate
|
|
34709
34980
|
* @type String
|
|
34710
34981
|
*/
|
|
34711
|
-
releaseDate: "2026-
|
|
34982
|
+
releaseDate: "2026-06-03",
|
|
34712
34983
|
/**
|
|
34713
34984
|
* Collection of language pack data.
|
|
34714
34985
|
*
|
|
@@ -34842,7 +35113,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
34842
35113
|
const createId = (elm) => {
|
|
34843
35114
|
let id = elm.id;
|
|
34844
35115
|
if (!id) {
|
|
34845
|
-
id = get$
|
|
35116
|
+
id = get$b(elm, "name").filter((name2) => !DOM.get(name2)).getOrThunk(DOM.uniqueId);
|
|
34846
35117
|
elm.setAttribute("id", id);
|
|
34847
35118
|
}
|
|
34848
35119
|
return id;
|
|
@@ -35156,7 +35427,7 @@ Options:${listJoiner}${deprecatedOptions2.join(listJoiner)}` : "";
|
|
|
35156
35427
|
const FakeClipboardItem = (items) => ({
|
|
35157
35428
|
items,
|
|
35158
35429
|
types: keys(items),
|
|
35159
|
-
getType: (type2) => get$
|
|
35430
|
+
getType: (type2) => get$b(items, type2).getOrUndefined()
|
|
35160
35431
|
});
|
|
35161
35432
|
const write2 = (data2) => {
|
|
35162
35433
|
dataValue.set(data2);
|
|
@@ -35482,4 +35753,4 @@ const tinymce$2 = /* @__PURE__ */ _mergeNamespaces({
|
|
|
35482
35753
|
export {
|
|
35483
35754
|
tinymce$2 as t
|
|
35484
35755
|
};
|
|
35485
|
-
//# sourceMappingURL=tinymce-
|
|
35756
|
+
//# sourceMappingURL=tinymce-Dg510HCs.js.map
|